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.
@@ -216,12 +216,12 @@ function C(e) {
216
216
  t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
217
217
  }
218
218
  t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
219
- let { backgroundLayers: le } = t;
219
+ let { backgroundLayers: q } = t;
220
220
  delete t.backgroundLayers;
221
- let ue = (Array.isArray(le) ? le : []).filter((e) => e && e.on !== !1);
222
- if (ue.length) {
221
+ let le = (Array.isArray(q) ? q : []).filter((e) => e && e.on !== !1);
222
+ if (le.length) {
223
223
  let e = [], n = [], r = [], i = [], a = [];
224
- 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");
224
+ 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");
225
225
  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");
226
226
  else {
227
227
  if (!t.src) continue;
@@ -439,11 +439,23 @@ var H = n({
439
439
  if (typeof window > "u") return 1;
440
440
  let n = Number(new URLSearchParams(window.location.search).get("page"));
441
441
  return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
442
- }, ae = n(null), oe = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
443
- function G(e, t) {
442
+ }, ae = () => {
443
+ if (typeof window > "u") return {};
444
+ let e = {};
445
+ return new URLSearchParams(window.location.search).forEach((t, n) => {
446
+ n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
447
+ }), e;
448
+ }, oe = (e) => {
449
+ let t = {
450
+ ...e && typeof e == "object" && !Array.isArray(e) ? e : {},
451
+ ...ae()
452
+ };
453
+ return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
454
+ }, G = n(null), se = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
455
+ function K(e, t) {
444
456
  if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
445
457
  }
446
- var se = (e) => {
458
+ var ce = (e) => {
447
459
  let t = [];
448
460
  for (let [n, r] of Object.entries(e ?? {})) {
449
461
  if (!/^[\w-]+$/.test(n)) continue;
@@ -453,36 +465,36 @@ var se = (e) => {
453
465
  }
454
466
  return t;
455
467
  };
456
- function K(e) {
457
- 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(" ") : "";
468
+ function q(e) {
469
+ 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(" ") : "";
458
470
  }
459
- function ce(e, t) {
460
- let n = t?.data ?? {}, r = se(n);
471
+ function le(e, t) {
472
+ let n = t?.data ?? {}, r = ce(n);
461
473
  if (!r.length) return e;
462
- let i = RegExp(`:(${r.map(oe).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;
474
+ let i = RegExp(`:(${r.map(se).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;
463
475
  return a(e);
464
476
  }
465
- var le = {
477
+ var ue = {
466
478
  margin: 0,
467
479
  fontWeight: 700,
468
480
  lineHeight: 1.2,
469
481
  fontFamily: "var(--page-heading-font, inherit)"
470
- }, ue = { margin: 0 }, q = {
482
+ }, de = { margin: 0 }, J = {
471
483
  display: "inline-block",
472
484
  textDecoration: "none",
473
485
  cursor: "pointer",
474
486
  backgroundColor: "var(--page-accent, #111827)",
475
487
  color: "var(--page-accent-text, #ffffff)"
476
- }, de = {
488
+ }, fe = {
477
489
  flexGrow: 1,
478
490
  display: "flex",
479
491
  flexDirection: "column",
480
492
  position: "relative"
481
- }, fe = {
493
+ }, pe = {
482
494
  display: "flex",
483
495
  flexDirection: "column"
484
496
  };
485
- function pe({ style: e }) {
497
+ function me({ style: e }) {
486
498
  let t = e?.backgroundVideo;
487
499
  if (!t) return null;
488
500
  let n = {
@@ -508,7 +520,7 @@ function pe({ style: e }) {
508
520
  background: r
509
521
  } })] });
510
522
  }
511
- var me = (e, t) => e?.backgroundVideo ? {
523
+ var he = (e, t) => e?.backgroundVideo ? {
512
524
  position: "relative",
513
525
  ...t,
514
526
  ...C(e)
@@ -516,24 +528,24 @@ var me = (e, t) => e?.backgroundVideo ? {
516
528
  ...t,
517
529
  ...C(e)
518
530
  };
519
- function he({ style: e, nodeRef: t, children: n }) {
531
+ function ge({ style: e, nodeRef: t, children: n }) {
520
532
  return /* @__PURE__ */ f("div", {
521
533
  ref: t,
522
534
  style: {
523
- ...de,
535
+ ...fe,
524
536
  ...C(e)
525
537
  },
526
- children: [/* @__PURE__ */ d(pe, { style: e }), n]
538
+ children: [/* @__PURE__ */ d(me, { style: e }), n]
527
539
  });
528
540
  }
529
- function ge({ style: e, nodeRef: t, children: n }) {
541
+ function _e({ style: e, nodeRef: t, children: n }) {
530
542
  return /* @__PURE__ */ f("section", {
531
543
  ref: t,
532
- style: me(e, fe),
533
- children: [/* @__PURE__ */ d(pe, { style: e }), n]
544
+ style: he(e, pe),
545
+ children: [/* @__PURE__ */ d(me, { style: e }), n]
534
546
  });
535
547
  }
536
- function _e({ style: e, freeLayout: t, nodeRef: n, children: r }) {
548
+ function ve({ style: e, freeLayout: t, nodeRef: n, children: r }) {
537
549
  let i = t ? {
538
550
  position: "relative",
539
551
  minHeight: 240
@@ -542,32 +554,32 @@ function _e({ style: e, freeLayout: t, nodeRef: n, children: r }) {
542
554
  ref: n,
543
555
  style: i ? {
544
556
  ...i,
545
- ...me(e)
546
- } : me(e),
547
- children: [/* @__PURE__ */ d(pe, { style: e }), r]
557
+ ...he(e)
558
+ } : he(e),
559
+ children: [/* @__PURE__ */ d(me, { style: e }), r]
548
560
  });
549
561
  }
550
- function ve({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
562
+ function ye({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
551
563
  return /* @__PURE__ */ d(n, {
552
564
  ref: a,
553
565
  style: {
554
- ...le,
566
+ ...ue,
555
567
  ...C(r)
556
568
  },
557
- children: J(t, e, i)
569
+ children: Y(t, e, i)
558
570
  });
559
571
  }
560
- var ye = {
572
+ var be = {
561
573
  fontFamily: z.mono.value,
562
574
  background: "rgba(148, 163, 184, 0.18)",
563
575
  padding: "1px 5px",
564
576
  borderRadius: 4,
565
577
  fontSize: "0.9em"
566
578
  };
567
- function be(e, t = [], n, r) {
579
+ function xe(e, t = [], n, r) {
568
580
  let i = e;
569
581
  return t.includes("sup") ? i = /* @__PURE__ */ d("sup", { children: i }) : t.includes("sub") && (i = /* @__PURE__ */ d("sub", { children: i })), t.includes("code") && (i = /* @__PURE__ */ d("code", {
570
- style: ye,
582
+ style: be,
571
583
  children: i
572
584
  })), t.includes("strike") && (i = /* @__PURE__ */ d("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ d("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ d("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ d("strong", { children: i })), n && (i = /* @__PURE__ */ d("a", {
573
585
  href: n,
@@ -577,13 +589,13 @@ function be(e, t = [], n, r) {
577
589
  children: i
578
590
  })), i;
579
591
  }
580
- function J(e, n, r) {
592
+ function Y(e, n, r) {
581
593
  return e?.length ? e.map((e, n) => {
582
594
  if (e.slot) return /* @__PURE__ */ d(t, { children: r?.[e.slot] ?? null }, n);
583
- if (e.parts) return /* @__PURE__ */ d(t, { children: J(e.parts, "", r) }, n);
595
+ if (e.parts) return /* @__PURE__ */ d(t, { children: Y(e.parts, "", r) }, n);
584
596
  let i = e.text;
585
597
  return e.sup ? i = /* @__PURE__ */ d("sup", { children: i }) : e.sub && (i = /* @__PURE__ */ d("sub", { children: i })), e.code && (i = /* @__PURE__ */ d("code", {
586
- style: ye,
598
+ style: be,
587
599
  children: i
588
600
  })), e.strike && (i = /* @__PURE__ */ d("s", { children: i })), e.underline && (i = /* @__PURE__ */ d("u", { children: i })), e.italic && (i = /* @__PURE__ */ d("em", { children: i })), e.bold && (i = /* @__PURE__ */ d("strong", { children: i })), (e.color || e.background) && (i = /* @__PURE__ */ d("span", {
589
601
  style: {
@@ -600,13 +612,13 @@ function J(e, n, r) {
600
612
  })), /* @__PURE__ */ d(t, { children: i }, n);
601
613
  }) : n;
602
614
  }
603
- function xe({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
615
+ function Se({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
604
616
  return /* @__PURE__ */ d("span", {
605
617
  style: C(a),
606
- children: e?.length ? J(e, t) : be(t, n, r, i)
618
+ children: e?.length ? Y(e, t) : xe(t, n, r, i)
607
619
  });
608
620
  }
609
- var Se = {
621
+ var Ce = {
610
622
  h1: 40,
611
623
  h2: 32,
612
624
  h3: 26,
@@ -614,7 +626,7 @@ var Se = {
614
626
  h5: 19,
615
627
  h6: 16
616
628
  };
617
- function Ce({ align: e = "center", width: t, wrap: n } = {}) {
629
+ function we({ align: e = "center", width: t, wrap: n } = {}) {
618
630
  let r = t ? `${t}%` : void 0;
619
631
  if (e === "full") return { width: "100%" };
620
632
  let i = e === "left" || e === "right";
@@ -648,8 +660,8 @@ function Ce({ align: e = "center", width: t, wrap: n } = {}) {
648
660
  marginRight: "auto"
649
661
  };
650
662
  }
651
- function we(e = [], t, n) {
652
- let r = n ?? ((e, n) => J(e, n, t));
663
+ function Te(e = [], t, n) {
664
+ let r = n ?? ((e, n) => Y(e, n, t));
653
665
  return e.map((t, n) => {
654
666
  let i = {
655
667
  marginTop: 0,
@@ -671,7 +683,7 @@ function we(e = [], t, n) {
671
683
  marginLeft: 0,
672
684
  marginRight: 0,
673
685
  ...i,
674
- ...Ce(t)
686
+ ...we(t)
675
687
  },
676
688
  children: [t.href ? /* @__PURE__ */ d("a", {
677
689
  href: t.href,
@@ -690,16 +702,16 @@ function we(e = [], t, n) {
690
702
  })]
691
703
  }, n);
692
704
  }
693
- if (t.type === "video") return Fe(t.url) ? /* @__PURE__ */ d("div", {
705
+ if (t.type === "video") return Ie(t.url) ? /* @__PURE__ */ d("div", {
694
706
  style: {
695
707
  ...i,
696
- ...Ce({
708
+ ...we({
697
709
  align: t.align,
698
710
  wrap: t.wrap,
699
711
  width: t.width ?? 100
700
712
  })
701
713
  },
702
- children: /* @__PURE__ */ d(Ie, {
714
+ children: /* @__PURE__ */ d(Le, {
703
715
  url: t.url,
704
716
  autoplay: t.autoplay,
705
717
  muted: t.muted,
@@ -761,17 +773,17 @@ function we(e = [], t, n) {
761
773
  }
762
774
  if (t.type === "quote") return /* @__PURE__ */ d("blockquote", {
763
775
  style: {
764
- ...Ee,
776
+ ...De,
765
777
  ...i
766
778
  },
767
779
  children: r(t.parts, t.text)
768
780
  }, n);
769
- if (Se[t.type]) {
781
+ if (Ce[t.type]) {
770
782
  let e = t.type;
771
783
  return /* @__PURE__ */ d(e, {
772
784
  style: {
773
- ...le,
774
- fontSize: Se[t.type],
785
+ ...ue,
786
+ fontSize: Ce[t.type],
775
787
  ...i
776
788
  },
777
789
  children: r(t.parts, t.text)
@@ -779,39 +791,39 @@ function we(e = [], t, n) {
779
791
  }
780
792
  return /* @__PURE__ */ d("p", {
781
793
  style: {
782
- ...ue,
794
+ ...de,
783
795
  ...i
784
796
  },
785
797
  children: r(t.parts, t.text)
786
798
  }, n);
787
799
  });
788
800
  }
789
- function Te({ content: e, style: t, linked: n, nodeRef: r }) {
801
+ function Ee({ content: e, style: t, linked: n, nodeRef: r }) {
790
802
  return /* @__PURE__ */ d("div", {
791
803
  ref: r,
792
804
  style: {
793
805
  display: "flow-root",
794
806
  ...C(t)
795
807
  },
796
- children: we(e, n)
808
+ children: Te(e, n)
797
809
  });
798
810
  }
799
- var Ee = {
811
+ var De = {
800
812
  margin: 0,
801
813
  padding: "8px 0 8px 20px",
802
814
  borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
803
815
  };
804
- function De({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
816
+ function Oe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
805
817
  return /* @__PURE__ */ d("blockquote", {
806
818
  ref: i,
807
819
  style: {
808
- ...Ee,
820
+ ...De,
809
821
  ...C(n)
810
822
  },
811
- children: J(t, e, r)
823
+ children: Y(t, e, r)
812
824
  });
813
825
  }
814
- function Oe({ ordered: e, items: t = [], style: n, nodeRef: r }) {
826
+ function ke({ ordered: e, items: t = [], style: n, nodeRef: r }) {
815
827
  return /* @__PURE__ */ d(e ? "ol" : "ul", {
816
828
  ref: r,
817
829
  style: {
@@ -821,53 +833,53 @@ function Oe({ ordered: e, items: t = [], style: n, nodeRef: r }) {
821
833
  },
822
834
  children: t.map((e, t) => /* @__PURE__ */ d("li", {
823
835
  style: { marginBottom: 4 },
824
- children: J(e.parts, e.text)
836
+ children: Y(e.parts, e.text)
825
837
  }, t))
826
838
  });
827
839
  }
828
- function ke({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
840
+ function Ae({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
829
841
  return /* @__PURE__ */ d("p", {
830
842
  ref: i,
831
843
  style: {
832
- ...ue,
844
+ ...de,
833
845
  ...C(n)
834
846
  },
835
- children: J(t, e, r)
847
+ children: Y(t, e, r)
836
848
  });
837
849
  }
838
- var Ae = {
850
+ var je = {
839
851
  color: "var(--page-accent, inherit)",
840
852
  textDecoration: "underline",
841
853
  textUnderlineOffset: 3,
842
854
  cursor: "pointer"
843
855
  };
844
- function je({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
856
+ function Me({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
845
857
  return /* @__PURE__ */ d("a", {
846
858
  ref: o,
847
859
  href: n || "#",
848
860
  target: r || void 0,
849
861
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
850
862
  style: {
851
- ...Ae,
863
+ ...je,
852
864
  ...C(i)
853
865
  },
854
- children: J(t, e, a)
866
+ children: Y(t, e, a)
855
867
  });
856
868
  }
857
- function Me({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
869
+ function Ne({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
858
870
  return /* @__PURE__ */ d("a", {
859
871
  ref: o,
860
872
  href: n || "#",
861
873
  target: r || void 0,
862
874
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
863
875
  style: {
864
- ...q,
876
+ ...J,
865
877
  ...C(i)
866
878
  },
867
- children: J(t, e, a)
879
+ children: Y(t, e, a)
868
880
  });
869
881
  }
870
- function Ne({ src: e, alt: t, style: n, nodeRef: r }) {
882
+ function Pe({ src: e, alt: t, style: n, nodeRef: r }) {
871
883
  return e ? /* @__PURE__ */ d("img", {
872
884
  ref: r,
873
885
  src: e,
@@ -879,7 +891,7 @@ function Ne({ src: e, alt: t, style: n, nodeRef: r }) {
879
891
  }
880
892
  }) : null;
881
893
  }
882
- function Pe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
894
+ function Fe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
883
895
  return e ? /* @__PURE__ */ d("video", {
884
896
  ref: s,
885
897
  src: e,
@@ -897,9 +909,9 @@ function Pe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
897
909
  }
898
910
  }) : null;
899
911
  }
900
- var Fe = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
901
- function Ie({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
902
- let c = Fe(e);
912
+ var Ie = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
913
+ function Le({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
914
+ let c = Ie(e);
903
915
  if (!c) return null;
904
916
  let l = new URLSearchParams({ rel: "0" });
905
917
  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__ */ d("div", {
@@ -925,7 +937,7 @@ function Ie({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
925
937
  })
926
938
  });
927
939
  }
928
- function Le({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
940
+ function Re({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
929
941
  return e ? /* @__PURE__ */ d("iframe", {
930
942
  ref: i,
931
943
  src: e,
@@ -941,7 +953,7 @@ function Le({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
941
953
  }
942
954
  }) : null;
943
955
  }
944
- function Re({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
956
+ function ze({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
945
957
  let [i, o] = l(null);
946
958
  return a(() => {
947
959
  i && (i.innerHTML = e || "", t && i.querySelectorAll("script").forEach((e) => {
@@ -960,7 +972,7 @@ function Re({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
960
972
  style: C(n)
961
973
  });
962
974
  }
963
- function ze({ height: e, nodeRef: t }) {
975
+ function Be({ height: e, nodeRef: t }) {
964
976
  return /* @__PURE__ */ d("div", {
965
977
  ref: t,
966
978
  style: {
@@ -970,7 +982,7 @@ function ze({ height: e, nodeRef: t }) {
970
982
  }
971
983
  });
972
984
  }
973
- function Be({ style: e, nodeRef: t }) {
985
+ function Ve({ style: e, nodeRef: t }) {
974
986
  return /* @__PURE__ */ d("div", {
975
987
  ref: t,
976
988
  style: {
@@ -981,7 +993,7 @@ function Be({ style: e, nodeRef: t }) {
981
993
  }
982
994
  });
983
995
  }
984
- var Ve = {
996
+ var He = {
985
997
  position: "absolute",
986
998
  top: "50%",
987
999
  transform: "translateY(-50%)",
@@ -998,7 +1010,7 @@ var Ve = {
998
1010
  alignItems: "center",
999
1011
  justifyContent: "center",
1000
1012
  padding: 0
1001
- }, He = {
1013
+ }, Ue = {
1002
1014
  bottom: {
1003
1015
  inset: "auto 0 0 0",
1004
1016
  padding: "40px 24px 20px",
@@ -1017,8 +1029,8 @@ var Ve = {
1017
1029
  padding: 24,
1018
1030
  textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
1019
1031
  }
1020
- }, Ue = 48;
1021
- function We({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: i = 320, swipe: o = !0, style: s, nodeRef: c }) {
1032
+ }, We = 48;
1033
+ function Ge({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: i = 320, swipe: o = !0, style: s, nodeRef: c }) {
1022
1034
  let [p, m] = l(0), [h, g] = l(!1), [_, v] = l(null), y = e ? Math.min(p, e - 1) : 0;
1023
1035
  if (a(() => {
1024
1036
  if (!n || h || _ || e < 2) return;
@@ -1034,7 +1046,7 @@ function We({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1034
1046
  let b = (t) => m((t + e) % e), x = () => {
1035
1047
  if (!_) return;
1036
1048
  let { dx: e } = _;
1037
- v(null), e < -48 ? b(y + 1) : e > Ue && b(y - 1);
1049
+ v(null), e < -48 ? b(y + 1) : e > We && b(y - 1);
1038
1050
  };
1039
1051
  return /* @__PURE__ */ f("div", {
1040
1052
  ref: c,
@@ -1082,7 +1094,7 @@ function We({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1082
1094
  type: "button",
1083
1095
  "aria-label": "Previous slide",
1084
1096
  style: {
1085
- ...Ve,
1097
+ ...He,
1086
1098
  left: 12
1087
1099
  },
1088
1100
  onClick: () => b(y - 1),
@@ -1092,7 +1104,7 @@ function We({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1092
1104
  type: "button",
1093
1105
  "aria-label": "Next slide",
1094
1106
  style: {
1095
- ...Ve,
1107
+ ...He,
1096
1108
  right: 12
1097
1109
  },
1098
1110
  onClick: () => b(y + 1),
@@ -1126,7 +1138,7 @@ function We({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1126
1138
  ] })]
1127
1139
  });
1128
1140
  }
1129
- var Ge = (e, t) => ({
1141
+ var Ke = (e, t) => ({
1130
1142
  position: "absolute",
1131
1143
  inset: 0,
1132
1144
  backgroundImage: e ? `url(${e})` : "none",
@@ -1134,18 +1146,18 @@ var Ge = (e, t) => ({
1134
1146
  backgroundSize: "cover",
1135
1147
  backgroundPosition: "center"
1136
1148
  });
1137
- function Ke({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1138
- return e.length ? /* @__PURE__ */ d(We, {
1149
+ function qe({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1150
+ return e.length ? /* @__PURE__ */ d(Ge, {
1139
1151
  ...r,
1140
1152
  count: e.length,
1141
1153
  renderSlide: (r) => {
1142
1154
  let i = e[r];
1143
- return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: Ge(i.image) }), (i.title || i.text) && /* @__PURE__ */ f("div", {
1155
+ return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: Ke(i.image) }), (i.title || i.text) && /* @__PURE__ */ f("div", {
1144
1156
  style: {
1145
1157
  position: "absolute",
1146
1158
  color: "#fff",
1147
1159
  textAlign: n,
1148
- ...He[t] ?? He.bottom
1160
+ ...Ue[t] ?? Ue.bottom
1149
1161
  },
1150
1162
  children: [i.title && /* @__PURE__ */ d("div", {
1151
1163
  style: {
@@ -1165,13 +1177,13 @@ function Ke({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
1165
1177
  }
1166
1178
  }) : null;
1167
1179
  }
1168
- function qe({ slides: e = [], linked: t, ...n }) {
1169
- return e.length ? /* @__PURE__ */ d(We, {
1180
+ function Je({ slides: e = [], linked: t, ...n }) {
1181
+ return e.length ? /* @__PURE__ */ d(Ge, {
1170
1182
  ...n,
1171
1183
  count: e.length,
1172
1184
  renderSlide: (n) => {
1173
1185
  let r = e[n];
1174
- return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: Ge(r.image, r.color) }), /* @__PURE__ */ d("div", {
1186
+ return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: Ke(r.image, r.color) }), /* @__PURE__ */ d("div", {
1175
1187
  style: {
1176
1188
  position: "absolute",
1177
1189
  inset: 0,
@@ -1183,7 +1195,7 @@ function qe({ slides: e = [], linked: t, ...n }) {
1183
1195
  }
1184
1196
  }) : null;
1185
1197
  }
1186
- function Je({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: i = !0, style: o, nodeRef: s, inert: c }) {
1198
+ function Ye({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: i = !0, style: o, nodeRef: s, inert: c }) {
1187
1199
  let p = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], m = Math.max(0, Number(n) || 0), h = c ? (e) => e.preventDefault() : void 0, [g, _] = l(null), v = i && !c && g !== null && p[g];
1188
1200
  a(() => {
1189
1201
  if (!v) return;
@@ -1382,19 +1394,19 @@ function Je({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
1382
1394
  ]
1383
1395
  });
1384
1396
  }
1385
- var Ye = {
1397
+ var Xe = {
1386
1398
  color: "inherit",
1387
1399
  textDecoration: "none",
1388
1400
  fontSize: 14,
1389
1401
  opacity: .85
1390
- }, Xe = {
1402
+ }, Ze = {
1391
1403
  background: "var(--page-bg, #ffffff)",
1392
1404
  color: "var(--page-text, #111827)",
1393
1405
  border: "1px solid rgba(148, 163, 184, 0.25)",
1394
1406
  boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
1395
1407
  zIndex: 60
1396
1408
  };
1397
- function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], style: s, nodeRef: c, menu: p = "auto", breakpoint: m = 768 }) {
1409
+ function Qe({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], style: s, nodeRef: c, menu: p = "auto", breakpoint: m = 768 }) {
1398
1410
  let [h, g] = l(null), [_, v] = l(!1), [y, b] = l(!1), [x, S] = l(null);
1399
1411
  a(() => {
1400
1412
  if (!h) return;
@@ -1404,7 +1416,7 @@ function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
1404
1416
  let w = p === "hamburger" || p === "auto" && _, T = (e, t) => /* @__PURE__ */ f("a", {
1405
1417
  href: e.href || "#",
1406
1418
  style: {
1407
- ...Ye,
1419
+ ...Xe,
1408
1420
  display: "block",
1409
1421
  ...t
1410
1422
  },
@@ -1492,7 +1504,7 @@ function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
1492
1504
  let t = e.children ?? [];
1493
1505
  if (!t.length) return /* @__PURE__ */ d("a", {
1494
1506
  href: e.href || "#",
1495
- style: Ye,
1507
+ style: Xe,
1496
1508
  children: e.label
1497
1509
  }, e.key);
1498
1510
  let n = e.type === "mega";
@@ -1506,7 +1518,7 @@ function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
1506
1518
  children: [/* @__PURE__ */ f("a", {
1507
1519
  href: e.href || "#",
1508
1520
  style: {
1509
- ...Ye,
1521
+ ...Xe,
1510
1522
  cursor: "pointer"
1511
1523
  },
1512
1524
  children: [
@@ -1522,7 +1534,7 @@ function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
1522
1534
  ]
1523
1535
  }), x === e.key && (n ? /* @__PURE__ */ d("div", {
1524
1536
  style: {
1525
- ...Xe,
1537
+ ...Ze,
1526
1538
  position: "absolute",
1527
1539
  left: 0,
1528
1540
  right: 0,
@@ -1538,7 +1550,7 @@ function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
1538
1550
  }))
1539
1551
  }) : /* @__PURE__ */ d("div", {
1540
1552
  style: {
1541
- ...Xe,
1553
+ ...Ze,
1542
1554
  position: "absolute",
1543
1555
  top: "100%",
1544
1556
  left: 0,
@@ -1567,7 +1579,7 @@ function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
1567
1579
  children: o.map((e) => /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ d("a", {
1568
1580
  href: e.href || "#",
1569
1581
  style: {
1570
- ...Ye,
1582
+ ...Xe,
1571
1583
  padding: "10px 4px",
1572
1584
  fontWeight: (e.children ?? []).length ? 600 : 400,
1573
1585
  opacity: 1
@@ -1578,7 +1590,7 @@ function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
1578
1590
  ]
1579
1591
  });
1580
1592
  }
1581
- function Qe({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1593
+ function $e({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1582
1594
  let [i, a] = l(0), o = e.length ? Math.min(i, e.length - 1) : 0;
1583
1595
  return e.length ? /* @__PURE__ */ f("div", {
1584
1596
  ref: r,
@@ -1618,7 +1630,7 @@ function Qe({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1618
1630
  }, e.key))]
1619
1631
  }) : null;
1620
1632
  }
1621
- function $e({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
1633
+ function et({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
1622
1634
  let [a, o] = l(() => new Set(e.length ? [e[0].key] : []));
1623
1635
  if (!e.length) return null;
1624
1636
  let s = (e) => o((t) => {
@@ -1675,15 +1687,15 @@ function $e({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
1675
1687
  })
1676
1688
  });
1677
1689
  }
1678
- var et = {
1690
+ var tt = {
1679
1691
  display: "flex",
1680
1692
  flexDirection: "column",
1681
1693
  gap: "12px"
1682
- }, Y = {
1694
+ }, X = {
1683
1695
  fontSize: "14px",
1684
1696
  fontWeight: 500,
1685
1697
  color: "var(--page-text, #111827)"
1686
- }, X = {
1698
+ }, Z = {
1687
1699
  padding: "10px 12px",
1688
1700
  border: "1px solid #d1d5db",
1689
1701
  borderRadius: "6px",
@@ -1693,18 +1705,18 @@ var et = {
1693
1705
  boxSizing: "border-box",
1694
1706
  backgroundColor: "#ffffff",
1695
1707
  color: "#111827"
1696
- }, tt = {
1708
+ }, nt = {
1697
1709
  display: "flex",
1698
1710
  alignItems: "center",
1699
1711
  gap: "8px",
1700
1712
  fontSize: "14px",
1701
1713
  color: "var(--page-text, #111827)"
1702
- }, Z = (e) => e ? {
1714
+ }, Q = (e) => e ? {
1703
1715
  readOnly: !0,
1704
1716
  tabIndex: -1,
1705
1717
  onMouseDown: (e) => e.preventDefault()
1706
1718
  } : {};
1707
- function nt(e, t) {
1719
+ function rt(e, t) {
1708
1720
  if (!e) return !0;
1709
1721
  let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
1710
1722
  switch (e.op) {
@@ -1718,11 +1730,11 @@ function nt(e, t) {
1718
1730
  default: return !1;
1719
1731
  }
1720
1732
  }
1721
- var rt = {
1733
+ var it = {
1722
1734
  display: "flex",
1723
1735
  flexDirection: "column",
1724
1736
  gap: 6
1725
- }, it = {
1737
+ }, at = {
1726
1738
  font: "inherit",
1727
1739
  fontSize: 15,
1728
1740
  padding: "10px 12px",
@@ -1733,16 +1745,16 @@ var rt = {
1733
1745
  width: "100%",
1734
1746
  boxSizing: "border-box"
1735
1747
  };
1736
- function at(e, t) {
1748
+ function ot(e, t) {
1737
1749
  let n = Array.isArray(e?.options) ? e.options : [];
1738
1750
  if (!e?.parentField) return n;
1739
1751
  let r = t?.[e.parentField];
1740
1752
  return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
1741
1753
  }
1742
- function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1754
+ function st({ field: e, value: t, onChange: n, inert: r, values: i }) {
1743
1755
  let a = /* @__PURE__ */ f("span", {
1744
1756
  style: {
1745
- ...Y,
1757
+ ...X,
1746
1758
  fontSize: 14
1747
1759
  },
1748
1760
  children: [e.label, e.required ? " *" : ""]
@@ -1751,7 +1763,7 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1751
1763
  required: e.required || void 0,
1752
1764
  placeholder: e.placeholder || void 0,
1753
1765
  disabled: r || void 0,
1754
- style: it,
1766
+ style: at,
1755
1767
  value: t ?? "",
1756
1768
  onChange: (t) => n(e.name, t.target.value)
1757
1769
  };
@@ -1780,7 +1792,7 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1780
1792
  borderRadius: 8,
1781
1793
  display: "block"
1782
1794
  }
1783
- }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(Ie, {
1795
+ }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(Le, {
1784
1796
  url: e.src,
1785
1797
  style: { width: "100%" }
1786
1798
  }) : /* @__PURE__ */ d("video", {
@@ -1792,14 +1804,14 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1792
1804
  display: "block"
1793
1805
  }
1794
1806
  }) : null : /* @__PURE__ */ f("label", {
1795
- style: rt,
1807
+ style: it,
1796
1808
  children: [
1797
1809
  a,
1798
1810
  e.type === "textarea" || e.multiline ? /* @__PURE__ */ d("textarea", {
1799
1811
  ...o,
1800
1812
  rows: 4,
1801
1813
  style: {
1802
- ...it,
1814
+ ...at,
1803
1815
  resize: "vertical"
1804
1816
  }
1805
1817
  }) : e.type === "select" ? /* @__PURE__ */ f("select", {
@@ -1808,7 +1820,7 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1808
1820
  children: [/* @__PURE__ */ d("option", {
1809
1821
  value: "",
1810
1822
  children: e.placeholder || "—"
1811
- }), at(e, i).map((e, t) => /* @__PURE__ */ d("option", {
1823
+ }), ot(e, i).map((e, t) => /* @__PURE__ */ d("option", {
1812
1824
  value: typeof e == "string" ? e : e.value,
1813
1825
  children: typeof e == "string" ? e : e.label ?? e.value
1814
1826
  }, t))]
@@ -1855,7 +1867,7 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1855
1867
  ]
1856
1868
  });
1857
1869
  }
1858
- function st({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s, auto: c, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
1870
+ function ct({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s, auto: c, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
1859
1871
  let { tenant: y, apiUrl: b } = i(H), [x, S] = l("form"), [w, T] = l(null), [E, D] = l({}), [O, k] = l(0), A = h ? v || "form" : x;
1860
1872
  a(() => {
1861
1873
  if (!c || !s) return;
@@ -1877,9 +1889,9 @@ function st({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
1877
1889
  section: e,
1878
1890
  fields: []
1879
1891
  }) : j[j.length - 1].fields.push(e);
1880
- let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || nt(e.section.condition, E)).map((e) => ({
1892
+ let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || rt(e.section.condition, E)).map((e) => ({
1881
1893
  ...e,
1882
- fields: e.fields.filter((e) => nt(e.condition, E))
1894
+ fields: e.fields.filter((e) => rt(e.condition, E))
1883
1895
  })), P = M.length > 1, F = Math.min(O, Math.max(0, N.length - 1)), I = P ? N[F]?.fields ?? [] : N.flatMap((e) => e.fields), L = I.filter((e) => {
1884
1896
  let t = E[e.name];
1885
1897
  return e.required && (t == null || t === "" || t === !1);
@@ -1937,11 +1949,11 @@ function st({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
1937
1949
  }
1938
1950
  },
1939
1951
  style: {
1940
- ...et,
1952
+ ...tt,
1941
1953
  display: A === "success" ? "none" : "flex"
1942
1954
  },
1943
1955
  children: c && s ? /* @__PURE__ */ f(u, { children: [
1944
- P && /* @__PURE__ */ d(Ot, {
1956
+ P && /* @__PURE__ */ d(jt, {
1945
1957
  steps: N.map((e) => ({ label: e.section?.label ?? "Start" })),
1946
1958
  active: F + 1,
1947
1959
  style: { marginBottom: 8 }
@@ -1954,7 +1966,7 @@ function st({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
1954
1966
  },
1955
1967
  children: N[F].section.help
1956
1968
  }),
1957
- I.map((e) => /* @__PURE__ */ d(ot, {
1969
+ I.map((e) => /* @__PURE__ */ d(st, {
1958
1970
  field: e,
1959
1971
  value: E[e.name],
1960
1972
  values: E,
@@ -1973,7 +1985,7 @@ function st({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
1973
1985
  disabled: h || void 0,
1974
1986
  onClick: () => k(F - 1),
1975
1987
  style: {
1976
- ...q,
1988
+ ...J,
1977
1989
  background: "transparent",
1978
1990
  color: "inherit",
1979
1991
  border: 0,
@@ -1986,7 +1998,7 @@ function st({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
1986
1998
  disabled: h || L.length > 0,
1987
1999
  onClick: () => k(F + 1),
1988
2000
  style: {
1989
- ...q,
2001
+ ...J,
1990
2002
  border: 0,
1991
2003
  padding: "10px 22px",
1992
2004
  borderRadius: 8,
@@ -2000,7 +2012,7 @@ function st({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
2000
2012
  type: "submit",
2001
2013
  disabled: h || void 0,
2002
2014
  style: {
2003
- ...q,
2015
+ ...J,
2004
2016
  border: 0,
2005
2017
  padding: "10px 22px",
2006
2018
  borderRadius: 8,
@@ -2027,10 +2039,10 @@ function st({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
2027
2039
  ]
2028
2040
  });
2029
2041
  }
2030
- var Q = null, ct = null, lt = (e) => {
2042
+ var $ = null, lt = null, ut = (e) => {
2031
2043
  let t = typeof e == "string" && e.trim() ? e.trim() : "";
2032
- if (Q && ct === t) return Q;
2033
- if (Q && typeof window < "u") {
2044
+ if ($ && lt === t) return $;
2045
+ if ($ && typeof window < "u") {
2034
2046
  for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
2035
2047
  delete window[e];
2036
2048
  } catch {
@@ -2038,27 +2050,32 @@ var Q = null, ct = null, lt = (e) => {
2038
2050
  }
2039
2051
  document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
2040
2052
  }
2041
- return ct = t, Q = new Promise((e) => {
2053
+ return lt = t, $ = new Promise((e) => {
2042
2054
  if (typeof window > "u") return;
2043
2055
  if (window.grecaptcha?.render) return e(window.grecaptcha);
2044
2056
  window.__webimRecaptchaReady = () => e(window.grecaptcha);
2045
2057
  let n = document.createElement("script");
2046
2058
  n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
2047
- }), Q;
2059
+ }), $;
2048
2060
  };
2049
- function ut({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert: l }) {
2050
- let u = i(H), p = u?.settings && typeof u.settings == "object" ? u.settings["google.recaptchaKey"] : "", m = typeof e == "string" && e.trim() || (typeof p == "string" ? p.trim() : ""), h = c(null);
2051
- if (a(() => {
2052
- if (l || !m || !h.current) return;
2053
- let e = !0;
2054
- return lt(r).then((r) => {
2055
- if (!(!e || !h.current || !r?.render)) {
2056
- h.current.innerHTML = "";
2061
+ function dt({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert: l, onChange: u }) {
2062
+ let p = i(H), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", h = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), g = c(null), _ = c(u);
2063
+ if (_.current = u, a(() => {
2064
+ if (l || !h || !g.current) return;
2065
+ let e = !0, i = (t) => {
2066
+ e && typeof _.current == "function" && _.current(t);
2067
+ };
2068
+ return ut(r).then((r) => {
2069
+ if (!(!e || !g.current || !r?.render)) {
2070
+ g.current.innerHTML = "", i("");
2057
2071
  try {
2058
- r.render(h.current, {
2059
- sitekey: m,
2072
+ r.render(g.current, {
2073
+ sitekey: h,
2060
2074
  theme: t === "dark" ? "dark" : "light",
2061
- size: n === "compact" ? "compact" : "normal"
2075
+ size: n === "compact" ? "compact" : "normal",
2076
+ callback: (e) => i(typeof e == "string" ? e : ""),
2077
+ "expired-callback": () => i(""),
2078
+ "error-callback": () => i("")
2062
2079
  });
2063
2080
  } catch {}
2064
2081
  }
@@ -2067,7 +2084,7 @@ function ut({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert:
2067
2084
  };
2068
2085
  }, [
2069
2086
  l,
2070
- m,
2087
+ h,
2071
2088
  t,
2072
2089
  n,
2073
2090
  r
@@ -2114,7 +2131,7 @@ function ut({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert:
2114
2131
  children: "reCAPTCHA"
2115
2132
  })
2116
2133
  ]
2117
- }), !m && /* @__PURE__ */ d("div", {
2134
+ }), !h && /* @__PURE__ */ d("div", {
2118
2135
  style: {
2119
2136
  marginTop: 6,
2120
2137
  fontSize: 11,
@@ -2124,23 +2141,23 @@ function ut({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert:
2124
2141
  })]
2125
2142
  });
2126
2143
  }
2127
- return m ? /* @__PURE__ */ d("div", {
2144
+ return h ? /* @__PURE__ */ d("div", {
2128
2145
  ref: s,
2129
2146
  style: C(o),
2130
- children: /* @__PURE__ */ d("div", { ref: h })
2147
+ children: /* @__PURE__ */ d("div", { ref: g })
2131
2148
  }) : null;
2132
2149
  }
2133
- function dt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
2150
+ function ft({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
2134
2151
  return /* @__PURE__ */ d("label", {
2135
2152
  ref: r,
2136
2153
  style: {
2137
- ...Y,
2154
+ ...X,
2138
2155
  ...C(n)
2139
2156
  },
2140
- children: J(t, e, i)
2157
+ children: Y(t, e, i)
2141
2158
  });
2142
2159
  }
2143
- function ft({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
2160
+ function pt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
2144
2161
  return /* @__PURE__ */ d("input", {
2145
2162
  ref: a,
2146
2163
  type: e,
@@ -2148,13 +2165,13 @@ function ft({ type: e = "text", name: t, placeholder: n, required: r, style: i,
2148
2165
  placeholder: n,
2149
2166
  required: !o && !!r,
2150
2167
  style: {
2151
- ...X,
2168
+ ...Z,
2152
2169
  ...C(i)
2153
2170
  },
2154
- ...Z(o)
2171
+ ...Q(o)
2155
2172
  });
2156
2173
  }
2157
- function pt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
2174
+ function mt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
2158
2175
  return /* @__PURE__ */ d("textarea", {
2159
2176
  ref: a,
2160
2177
  name: e || void 0,
@@ -2162,18 +2179,18 @@ function pt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
2162
2179
  rows: n,
2163
2180
  required: !o && !!r,
2164
2181
  style: {
2165
- ...X,
2182
+ ...Z,
2166
2183
  resize: "vertical",
2167
2184
  ...C(i)
2168
2185
  },
2169
- ...Z(o)
2186
+ ...Q(o)
2170
2187
  });
2171
2188
  }
2172
- function mt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
2189
+ function ht({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
2173
2190
  return /* @__PURE__ */ f("label", {
2174
2191
  ref: o,
2175
2192
  style: {
2176
- ...tt,
2193
+ ...nt,
2177
2194
  ...C(a)
2178
2195
  },
2179
2196
  children: [/* @__PURE__ */ d("input", {
@@ -2190,7 +2207,7 @@ function mt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
2190
2207
  }), t]
2191
2208
  });
2192
2209
  }
2193
- function ht({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
2210
+ function gt({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
2194
2211
  return /* @__PURE__ */ f("select", {
2195
2212
  ref: a,
2196
2213
  name: e || void 0,
@@ -2199,7 +2216,7 @@ function ht({ name: e, placeholder: t, options: n = [], required: r, style: i, n
2199
2216
  onMouseDown: o ? (e) => e.preventDefault() : void 0,
2200
2217
  tabIndex: o ? -1 : void 0,
2201
2218
  style: {
2202
- ...X,
2219
+ ...Z,
2203
2220
  appearance: "auto",
2204
2221
  ...C(i)
2205
2222
  },
@@ -2213,12 +2230,12 @@ function ht({ name: e, placeholder: t, options: n = [], required: r, style: i, n
2213
2230
  }, t))]
2214
2231
  });
2215
2232
  }
2216
- function gt({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
2233
+ function _t({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
2217
2234
  let [s, c] = l(null);
2218
2235
  return /* @__PURE__ */ f("label", {
2219
2236
  ref: a,
2220
2237
  style: {
2221
- ...X,
2238
+ ...Z,
2222
2239
  display: "flex",
2223
2240
  alignItems: "center",
2224
2241
  gap: "8px",
@@ -2245,12 +2262,12 @@ function gt({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
2245
2262
  ]
2246
2263
  });
2247
2264
  }
2248
- function _t({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2265
+ function vt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2249
2266
  return /* @__PURE__ */ d("button", {
2250
2267
  ref: n,
2251
2268
  type: r ? "button" : "submit",
2252
2269
  style: {
2253
- ...q,
2270
+ ...J,
2254
2271
  border: 0,
2255
2272
  cursor: "pointer",
2256
2273
  alignSelf: "flex-start",
@@ -2265,7 +2282,7 @@ function _t({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2265
2282
  children: e
2266
2283
  });
2267
2284
  }
2268
- function vt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2285
+ function yt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2269
2286
  let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
2270
2287
  return /* @__PURE__ */ d("div", {
2271
2288
  ref: r,
@@ -2282,61 +2299,63 @@ function vt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2282
2299
  }, t))
2283
2300
  });
2284
2301
  }
2285
- function yt({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, imageField: o, titleField: s = "name", textField: c, custom: u, templateId: p, paged: m, style: h, nodeRef: g }) {
2286
- let { tenant: _, apiUrl: v, locale: y } = i(H), b = i(ae), x = i(U), S = x?.[e], w = m ? W(x) : 1, [T, E] = l(null);
2302
+ function bt({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, imageField: o, titleField: s = "name", textField: c, custom: u, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
2303
+ let { tenant: v, apiUrl: y, locale: b } = i(H), x = i(G), S = i(U), w = oe(h), T = JSON.stringify(w), E = T !== "{}" && !e?.startsWith?.("api:"), D = E ? null : S?.[e], O = m ? W(S) : 1, [k, A] = l(null);
2287
2304
  if (a(() => {
2288
- if (!e || S) return;
2305
+ if (!e || D) return;
2289
2306
  let n = !0, r = new URLSearchParams();
2290
- if (y && r.set("locale", y), m && !e.startsWith("api:")) {
2307
+ if (b && r.set("locale", b), E && r.set("data_filter", T), m && !e.startsWith("api:")) {
2291
2308
  let e = Math.max(1, Number(t) || 6);
2292
- r.set("offset", String((w - 1) * e)), r.set("limit", String(e));
2309
+ r.set("offset", String((O - 1) * e)), r.set("limit", String(e));
2293
2310
  }
2294
- let i = r.toString(), a = e.startsWith("api:") ? `${v}/data/${encodeURIComponent(e.slice(4))}` : `${v}/dynamic/${encodeURIComponent(e)}${i ? `?${i}` : ""}`;
2295
- return fetch(a, { headers: _ ? { "x-tenant": _ } : {} }).then((e) => e.json()).then((e) => {
2311
+ let i = r.toString(), a = e.startsWith("api:") ? `${y}/data/${encodeURIComponent(e.slice(4))}` : `${y}/dynamic/${encodeURIComponent(e)}${i ? `?${i}` : ""}`;
2312
+ return fetch(a, { headers: v ? { "x-tenant": v } : {} }).then((e) => e.json()).then((e) => {
2296
2313
  let t = Array.isArray(e?.payload) ? e.payload : Array.isArray(e?.payload?.data) ? e.payload.data : [];
2297
- return n && E(t.filter((e) => e && typeof e == "object"));
2298
- }).catch(() => n && E([])), () => {
2314
+ return n && A(t.filter((e) => e && typeof e == "object"));
2315
+ }).catch(() => n && A([])), () => {
2299
2316
  n = !1;
2300
2317
  };
2301
2318
  }, [
2302
2319
  e,
2303
- _,
2304
2320
  v,
2305
2321
  y,
2306
- S,
2322
+ b,
2323
+ D,
2307
2324
  m,
2308
- w,
2309
- t
2325
+ O,
2326
+ t,
2327
+ E,
2328
+ T
2310
2329
  ]), !e) return null;
2311
- let D = Math.max(1, Number(t) || 6), O = m ? S || e.startsWith("api:") ? (S ?? T ?? []).slice((w - 1) * D, w * D) : (T ?? []).slice(0, D) : (S ?? T ?? []).slice(0, D), k = Math.min(Math.max(Number(r) || 3, 1), 6), A = n === "list" ? {
2330
+ 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(r) || 3, 1), 6), P = n === "list" ? {
2312
2331
  display: "flex",
2313
2332
  flexDirection: "column",
2314
2333
  gap: 20
2315
2334
  } : {
2316
2335
  display: "grid",
2317
- gridTemplateColumns: `repeat(${k}, minmax(0, 1fr))`,
2336
+ gridTemplateColumns: `repeat(${N}, minmax(0, 1fr))`,
2318
2337
  gap: 24
2319
2338
  };
2320
- return u && p && b?.render ? /* @__PURE__ */ d("div", {
2321
- ref: g,
2339
+ return u && p && x?.render ? /* @__PURE__ */ d("div", {
2340
+ ref: _,
2322
2341
  style: {
2323
2342
  width: "100%",
2324
- ...A,
2325
- ...C(h)
2343
+ ...P,
2344
+ ...C(g)
2326
2345
  },
2327
- children: O.map((e) => /* @__PURE__ */ d("div", {
2346
+ children: M.map((e) => /* @__PURE__ */ d("div", {
2328
2347
  style: { minWidth: 0 },
2329
- children: b.render(p, (t) => ce(t, e))
2348
+ children: x.render(p, (t) => le(t, e))
2330
2349
  }, e.id ?? e?.data?.slug))
2331
2350
  }) : /* @__PURE__ */ d("div", {
2332
- ref: g,
2351
+ ref: _,
2333
2352
  style: {
2334
2353
  width: "100%",
2335
- ...A,
2336
- ...C(h)
2354
+ ...P,
2355
+ ...C(g)
2337
2356
  },
2338
- children: O.map((e) => {
2339
- let t = o ? G(e?.data, o) : null, r = s ? K(G(e?.data, s)) : null, i = c ? G(e?.data, c) : null, a = Array.isArray(i) ? i : null, l = a || i == null ? null : K(i), u = n === "list";
2357
+ children: M.map((e) => {
2358
+ let t = o ? K(e?.data, o) : null, r = s ? q(K(e?.data, s)) : null, i = c ? K(e?.data, c) : null, a = Array.isArray(i) ? i : null, l = a || i == null ? null : q(i), u = n === "list";
2340
2359
  return /* @__PURE__ */ f("div", {
2341
2360
  style: {
2342
2361
  display: "flex",
@@ -2383,7 +2402,7 @@ function yt({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
2383
2402
  lineHeight: 1.55,
2384
2403
  opacity: .85
2385
2404
  },
2386
- children: we(a)
2405
+ children: Te(a)
2387
2406
  })
2388
2407
  ]
2389
2408
  })]
@@ -2391,7 +2410,91 @@ function yt({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
2391
2410
  })
2392
2411
  });
2393
2412
  }
2394
- function bt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2413
+ function xt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
2414
+ let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : ae(), s = {
2415
+ display: "flex",
2416
+ flexDirection: "column",
2417
+ gap: 4,
2418
+ fontSize: 12,
2419
+ fontWeight: 600,
2420
+ color: "var(--page-text, #111827)",
2421
+ minWidth: 140,
2422
+ flex: "1 1 140px"
2423
+ }, c = (e) => {
2424
+ let t = e && typeof e == "object" ? e.value : e, n = e && typeof e == "object" ? e.label ?? e.value : e;
2425
+ return {
2426
+ value: String(t ?? ""),
2427
+ label: String(n ?? "")
2428
+ };
2429
+ };
2430
+ return /* @__PURE__ */ f("form", {
2431
+ ref: r,
2432
+ method: "get",
2433
+ onSubmit: i ? (e) => e.preventDefault() : void 0,
2434
+ style: {
2435
+ display: "flex",
2436
+ flexWrap: "wrap",
2437
+ alignItems: "flex-end",
2438
+ gap: 12,
2439
+ width: "100%",
2440
+ ...C(n)
2441
+ },
2442
+ children: [a.map((e) => /* @__PURE__ */ f("label", {
2443
+ style: s,
2444
+ children: [/* @__PURE__ */ d("span", { children: e.label || e.name }), e.type === "option" || e.type === "select" ? /* @__PURE__ */ f("select", {
2445
+ name: `f_${e.name}`,
2446
+ defaultValue: o[e.name] ?? "",
2447
+ style: Z,
2448
+ ...Q(i),
2449
+ children: [/* @__PURE__ */ d("option", {
2450
+ value: "",
2451
+ children: "—"
2452
+ }), (Array.isArray(e.options) ? e.options : []).map((e) => {
2453
+ let t = c(e);
2454
+ return /* @__PURE__ */ d("option", {
2455
+ value: t.value,
2456
+ children: t.label
2457
+ }, t.value);
2458
+ })]
2459
+ }) : e.type === "switch" ? /* @__PURE__ */ f("select", {
2460
+ name: `f_${e.name}`,
2461
+ defaultValue: o[e.name] ?? "",
2462
+ style: Z,
2463
+ ...Q(i),
2464
+ children: [
2465
+ /* @__PURE__ */ d("option", {
2466
+ value: "",
2467
+ children: "—"
2468
+ }),
2469
+ /* @__PURE__ */ d("option", {
2470
+ value: "true",
2471
+ children: "Yes"
2472
+ }),
2473
+ /* @__PURE__ */ d("option", {
2474
+ value: "false",
2475
+ children: "No"
2476
+ })
2477
+ ]
2478
+ }) : /* @__PURE__ */ d("input", {
2479
+ type: "text",
2480
+ name: `f_${e.name}`,
2481
+ defaultValue: o[e.name] ?? "",
2482
+ placeholder: e.label || e.name,
2483
+ style: Z,
2484
+ ...Q(i)
2485
+ })]
2486
+ }, e.name)), /* @__PURE__ */ d("button", {
2487
+ type: "submit",
2488
+ style: {
2489
+ ...J,
2490
+ flex: "0 0 auto"
2491
+ },
2492
+ ...Q(i),
2493
+ children: t
2494
+ })]
2495
+ });
2496
+ }
2497
+ function St({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2395
2498
  return e.length ? /* @__PURE__ */ d("nav", {
2396
2499
  ref: r,
2397
2500
  "aria-label": "Breadcrumb",
@@ -2441,7 +2544,7 @@ function bt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2441
2544
  })
2442
2545
  }) : null;
2443
2546
  }
2444
- function xt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", source: o, pageSize: s = 6, align: c, hideEmpty: u, inert: p, style: m, nodeRef: h }) {
2547
+ function Ct({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", source: o, pageSize: s = 6, align: c, hideEmpty: u, inert: p, style: m, nodeRef: h }) {
2445
2548
  let { tenant: g, apiUrl: _ } = i(H), v = i(U), [y, b] = l(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
2446
2549
  a(() => {
2447
2550
  if (!o || Number.isFinite(x)) return;
@@ -2526,15 +2629,15 @@ function xt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
2526
2629
  ]
2527
2630
  });
2528
2631
  }
2529
- var St = "webim.page_mode", Ct = () => {
2632
+ var wt = "webim.page_mode", Tt = () => {
2530
2633
  if (typeof window > "u") return "auto";
2531
2634
  try {
2532
- let e = window.localStorage.getItem(St);
2635
+ let e = window.localStorage.getItem(wt);
2533
2636
  return e === "light" || e === "dark" ? e : "auto";
2534
2637
  } catch {
2535
2638
  return "auto";
2536
2639
  }
2537
- }, wt = (e) => {
2640
+ }, Et = (e) => {
2538
2641
  let t = {
2539
2642
  width: 16,
2540
2643
  height: 16,
@@ -2566,13 +2669,13 @@ var St = "webim.page_mode", Ct = () => {
2566
2669
  rx: "2"
2567
2670
  }), /* @__PURE__ */ d("path", { d: "M8 21h8M12 17v4" })]
2568
2671
  });
2569
- }, $ = {
2672
+ }, Dt = {
2570
2673
  light: "Light theme",
2571
2674
  dark: "Dark theme",
2572
2675
  auto: "Follow the device theme"
2573
2676
  };
2574
- function Tt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
2575
- let [o, s] = l(i ? "auto" : Ct), u = c(null), f = (e) => {
2677
+ function Ot({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
2678
+ let [o, s] = l(i ? "auto" : Tt), u = c(null), f = (e) => {
2576
2679
  u.current = e, typeof r == "function" && r(e);
2577
2680
  };
2578
2681
  a(() => {
@@ -2580,7 +2683,7 @@ function Tt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
2580
2683
  let e = u.current?.closest?.(".webim-page");
2581
2684
  e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
2582
2685
  try {
2583
- o === "auto" ? window.localStorage.removeItem(St) : window.localStorage.setItem(St, o);
2686
+ o === "auto" ? window.localStorage.removeItem(wt) : window.localStorage.setItem(wt, o);
2584
2687
  } catch {}
2585
2688
  }, [o, i]);
2586
2689
  let p = t === !1 ? ["light", "dark"] : [
@@ -2615,8 +2718,8 @@ function Tt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
2615
2718
  },
2616
2719
  children: p.map((e) => /* @__PURE__ */ d("button", {
2617
2720
  type: "button",
2618
- title: $[e],
2619
- "aria-label": $[e],
2721
+ title: Dt[e],
2722
+ "aria-label": Dt[e],
2620
2723
  "aria-pressed": e === m,
2621
2724
  onClick: i ? void 0 : () => s(e),
2622
2725
  style: {
@@ -2627,15 +2730,15 @@ function Tt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
2627
2730
  background: e === m ? "var(--page-accent, #111827)" : "transparent",
2628
2731
  opacity: e === m ? 1 : .7
2629
2732
  },
2630
- children: wt(e)
2733
+ children: Et(e)
2631
2734
  }, e))
2632
2735
  });
2633
2736
  let g = p[(p.indexOf(m) + 1) % p.length];
2634
2737
  return /* @__PURE__ */ d("button", {
2635
2738
  ref: f,
2636
2739
  type: "button",
2637
- title: $[m],
2638
- "aria-label": `Theme: ${$[m]} — switch to ${$[g]}`,
2740
+ title: Dt[m],
2741
+ "aria-label": `Theme: ${Dt[m]} — switch to ${Dt[g]}`,
2639
2742
  onClick: i ? void 0 : () => s(g),
2640
2743
  style: {
2641
2744
  ...h,
@@ -2644,10 +2747,10 @@ function Tt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
2644
2747
  border: "1px solid rgba(148, 163, 184, 0.4)",
2645
2748
  ...C(n)
2646
2749
  },
2647
- children: wt(m)
2750
+ children: Et(m)
2648
2751
  });
2649
2752
  }
2650
- var Et = {
2753
+ var kt = {
2651
2754
  facebook: {
2652
2755
  label: "Facebook",
2653
2756
  color: "#1877f2",
@@ -2714,8 +2817,8 @@ var Et = {
2714
2817
  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"
2715
2818
  }
2716
2819
  };
2717
- function Dt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
2718
- let l = Array.isArray(e) ? e.filter((e) => e && Et[e.network]) : [];
2820
+ function At({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
2821
+ let l = Array.isArray(e) ? e.filter((e) => e && kt[e.network]) : [];
2719
2822
  if (!l.length) return null;
2720
2823
  let u = Math.min(Math.max(Number(r) || 18, 10), 64), f = Math.round(u * 1.9), p = Number.isFinite(Number(i)) ? Number(i) : 10, m = (e) => n === "accent" ? "var(--page-accent, #111827)" : n === "inherit" ? "currentColor" : e.color, h = c ? (e) => e.preventDefault() : void 0;
2721
2824
  return /* @__PURE__ */ d("div", {
@@ -2728,7 +2831,7 @@ function Dt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
2728
2831
  ...C(o)
2729
2832
  },
2730
2833
  children: l.map((e, r) => {
2731
- let i = Et[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);
2834
+ 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);
2732
2835
  return /* @__PURE__ */ d("a", {
2733
2836
  href: e.url || "#",
2734
2837
  onClick: h,
@@ -2762,7 +2865,7 @@ function Dt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
2762
2865
  })
2763
2866
  });
2764
2867
  }
2765
- function Ot({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
2868
+ function jt({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
2766
2869
  if (!e.length) return null;
2767
2870
  let o = Math.min(Math.max(Number(n) || 1, 1), e.length), s = (e) => ({
2768
2871
  width: 32,
@@ -2840,7 +2943,7 @@ function Ot({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
2840
2943
  })
2841
2944
  });
2842
2945
  }
2843
- var kt = {
2946
+ var Mt = {
2844
2947
  small: {
2845
2948
  w: 132,
2846
2949
  h: 46,
@@ -2862,10 +2965,10 @@ var kt = {
2862
2965
  title: 12.5,
2863
2966
  avatar: 46
2864
2967
  }
2865
- }, At = (e) => kt[e] ?? kt.medium;
2866
- kt.medium.w, kt.medium.h;
2867
- function jt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
2868
- let r = At(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 = [];
2968
+ }, Nt = (e) => Mt[e] ?? Mt.medium;
2969
+ Mt.medium.w, Mt.medium.h;
2970
+ function Pt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
2971
+ 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 = [];
2869
2972
  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);
2870
2973
  let d = /* @__PURE__ */ new Map(), f = (e, t) => {
2871
2974
  if (t.has(e.id)) return 0;
@@ -2917,19 +3020,19 @@ function jt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
2917
3020
  horizontal: n
2918
3021
  };
2919
3022
  }
2920
- var Mt = (e, t) => {
3023
+ var Ft = (e, t) => {
2921
3024
  let n = String(e ?? "");
2922
3025
  return n.length > t ? `${n.slice(0, t - 1)}…` : n;
2923
- }, Nt = (e) => {
3026
+ }, It = (e) => {
2924
3027
  let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
2925
3028
  if (!t) return "#ffffff";
2926
3029
  let n = t[1];
2927
3030
  n.length === 3 && (n = [...n].map((e) => e + e).join(""));
2928
3031
  let r = parseInt(n, 16);
2929
3032
  return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
2930
- }, Pt = (e) => !!(e?.cv?.trim?.() || e?.photo);
2931
- function Ft(e, t = {}) {
2932
- 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);
3033
+ }, Lt = (e) => !!(e?.cv?.trim?.() || e?.photo);
3034
+ function Rt(e, t = {}) {
3035
+ 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);
2933
3036
  return n.map((e) => {
2934
3037
  let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
2935
3038
  return {
@@ -2943,11 +3046,11 @@ function Ft(e, t = {}) {
2943
3046
  };
2944
3047
  });
2945
3048
  }
2946
- var It = {
3049
+ var zt = {
2947
3050
  size: 36,
2948
3051
  pad: 10
2949
3052
  };
2950
- function Lt({ node: e, onClose: t }) {
3053
+ function Bt({ node: e, onClose: t }) {
2951
3054
  return a(() => {
2952
3055
  let e = (e) => e.key === "Escape" && t();
2953
3056
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
@@ -3065,7 +3168,7 @@ function Lt({ node: e, onClose: t }) {
3065
3168
  })
3066
3169
  });
3067
3170
  }
3068
- function Rt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField: s, parentField: c, cvField: p, hrefField: m, size: h = "medium", horizontal: g = !1, style: _, nodeRef: v, interactive: y = !0 }) {
3171
+ function Vt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField: s, parentField: c, cvField: p, hrefField: m, size: h = "medium", horizontal: g = !1, style: _, nodeRef: v, interactive: y = !0 }) {
3069
3172
  let b = o(), [x, S] = l(null), { tenant: w, apiUrl: T } = i(H), E = i(U)?.[t], [D, O] = l(null);
3070
3173
  a(() => {
3071
3174
  if (!t || E) return;
@@ -3082,14 +3185,14 @@ function Rt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
3082
3185
  T,
3083
3186
  E
3084
3187
  ]);
3085
- let k = t ? Ft(E ?? D ?? [], {
3188
+ let k = t ? Rt(E ?? D ?? [], {
3086
3189
  nameField: n,
3087
3190
  titleField: r,
3088
3191
  photoField: s,
3089
3192
  parentField: c,
3090
3193
  cvField: p,
3091
3194
  hrefField: m
3092
- }) : e, A = At(h), { boxes: j, links: M, width: N, height: P } = jt(k, {
3195
+ }) : e, A = Nt(h), { boxes: j, links: M, width: N, height: P } = Pt(k, {
3093
3196
  size: h,
3094
3197
  horizontal: g
3095
3198
  });
@@ -3135,7 +3238,7 @@ function Rt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
3135
3238
  stroke: "rgba(148, 163, 184, 0.7)",
3136
3239
  strokeWidth: "1.5"
3137
3240
  }, t)), j.map(({ node: e, x: t, y: n }) => {
3138
- 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 ? Nt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? Nt(e.color2) : s, l = y && (Pt(e) || e.href), p = () => Pt(e) ? S(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + It.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);
3241
+ 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, l = y && (Lt(e) || e.href), p = () => Lt(e) ? S(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + zt.pad + A.avatar + 8 : t + A.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((A.w - A.avatar - 26) / 7) : Math.floor(A.w / 7.6), _ = A.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
3139
3242
  return /* @__PURE__ */ f("g", {
3140
3243
  onClick: l ? p : void 0,
3141
3244
  style: l ? { cursor: "pointer" } : void 0,
@@ -3199,13 +3302,13 @@ function Rt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
3199
3302
  e.photo && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("clipPath", {
3200
3303
  id: `${b}-${e.id}`,
3201
3304
  children: /* @__PURE__ */ d("circle", {
3202
- cx: t + It.pad + A.avatar / 2,
3305
+ cx: t + zt.pad + A.avatar / 2,
3203
3306
  cy: n + A.h / 2,
3204
3307
  r: A.avatar / 2
3205
3308
  })
3206
3309
  }), /* @__PURE__ */ d("image", {
3207
3310
  href: e.photo,
3208
- x: t + It.pad,
3311
+ x: t + zt.pad,
3209
3312
  y: n + (A.h - A.avatar) / 2,
3210
3313
  width: A.avatar,
3211
3314
  height: A.avatar,
@@ -3219,7 +3322,7 @@ function Rt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
3219
3322
  fontSize: A.title,
3220
3323
  fontWeight: "600",
3221
3324
  fill: s,
3222
- children: Mt(e.title, g + 4)
3325
+ children: Ft(e.title, g + 4)
3223
3326
  }), e.name && /* @__PURE__ */ d("text", {
3224
3327
  x: m,
3225
3328
  y: n + _ + _ / 2 + A.name * .35,
@@ -3227,7 +3330,7 @@ function Rt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
3227
3330
  fontSize: A.name,
3228
3331
  fontWeight: "600",
3229
3332
  fill: c,
3230
- children: Mt(e.name, g)
3333
+ children: Ft(e.name, g)
3231
3334
  })] }) : /* @__PURE__ */ f(u, { children: [v[0] && /* @__PURE__ */ d("text", {
3232
3335
  x: m,
3233
3336
  y: n + (v[1] ? A.h * .43 : A.h * .57),
@@ -3235,7 +3338,7 @@ function Rt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
3235
3338
  fontSize: A.name,
3236
3339
  fontWeight: "600",
3237
3340
  fill: s,
3238
- children: Mt(v[0], g)
3341
+ children: Ft(v[0], g)
3239
3342
  }), v[1] && /* @__PURE__ */ d("text", {
3240
3343
  x: m,
3241
3344
  y: n + A.h * .73,
@@ -3243,18 +3346,18 @@ function Rt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
3243
3346
  fontSize: A.title,
3244
3347
  opacity: "0.7",
3245
3348
  fill: s,
3246
- children: Mt(v[1], g + 4)
3349
+ children: Ft(v[1], g + 4)
3247
3350
  })] })
3248
3351
  ]
3249
3352
  }, e.id);
3250
3353
  })]
3251
- }), x && /* @__PURE__ */ d(Lt, {
3354
+ }), x && /* @__PURE__ */ d(Bt, {
3252
3355
  node: x,
3253
3356
  onClose: () => S(null)
3254
3357
  })]
3255
3358
  });
3256
3359
  }
3257
- function zt({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped: o = !0, bordered: s = !1, compact: c = !1, paged: u, emptyText: p, style: m, nodeRef: h }) {
3360
+ function Ht({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped: o = !0, bordered: s = !1, compact: c = !1, paged: u, emptyText: p, style: m, nodeRef: h }) {
3258
3361
  let { tenant: g, apiUrl: _ } = i(H), v = i(U), y = v?.[n], b = u ? W(v) : 1, [x, S] = l(null);
3259
3362
  if (a(() => {
3260
3363
  if (!n || y) return;
@@ -3274,7 +3377,7 @@ function zt({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped:
3274
3377
  b,
3275
3378
  r
3276
3379
  ]), !e.length) return null;
3277
- let w = Math.max(1, Number(r) || 10), T = n ? u ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * w, b * w) : (x ?? []).slice(0, w) : (y ?? x ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => K(G(t?.data, e.field)))) : t, D = !!n && !(n && !y && x === null) && E.length === 0, O = c ? "6px 10px" : "10px 14px", k = "1px solid rgba(148, 163, 184, 0.35)", A = s ? { border: k } : { borderBottom: k };
3380
+ let w = Math.max(1, Number(r) || 10), T = n ? u ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * w, b * w) : (x ?? []).slice(0, w) : (y ?? x ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => q(K(t?.data, e.field)))) : t, D = !!n && !(n && !y && x === null) && E.length === 0, O = c ? "6px 10px" : "10px 14px", k = "1px solid rgba(148, 163, 184, 0.35)", A = s ? { border: k } : { borderBottom: k };
3278
3381
  return /* @__PURE__ */ d("div", {
3279
3382
  ref: h,
3280
3383
  style: {
@@ -3320,77 +3423,78 @@ function zt({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped:
3320
3423
  })
3321
3424
  });
3322
3425
  }
3323
- var Bt = {
3324
- PageRoot: he,
3325
- Section: ge,
3326
- Container: _e,
3327
- Heading: ve,
3328
- TextBlock: ke,
3329
- ButtonBlock: Me,
3330
- ImageBlock: Ne,
3331
- Spacer: ze,
3332
- Divider: Be,
3333
- SliderBlock: Ke,
3334
- CanvasSlider: qe,
3335
- TabsBlock: Qe,
3336
- QuickStack: vt,
3337
- CollectionList: yt,
3338
- BreadcrumbsBlock: bt,
3339
- PaginationBlock: xt,
3340
- StepperBlock: Ot,
3341
- SocialLinksBlock: Dt,
3342
- ThemeModeBlock: Tt,
3343
- OrgChartBlock: Rt,
3344
- TableBlock: zt,
3345
- MasonryBlock: Je,
3346
- AccordionBlock: $e,
3347
- NavbarBlock: Ze,
3348
- ListBlock: Oe,
3349
- TextSpan: xe,
3350
- QuoteBlock: De,
3351
- TextLink: je,
3352
- RichTextBlock: Te,
3353
- RichContentBlock: Te,
3354
- VideoBlock: Pe,
3355
- YouTubeBlock: Ie,
3356
- IframeBlock: Le,
3357
- EmbedBlock: Re,
3358
- FormBlock: st,
3359
- FormLabel: dt,
3360
- FormInput: ft,
3361
- FormTextarea: pt,
3362
- FormCheckbox: (e) => /* @__PURE__ */ d(mt, {
3426
+ var Ut = {
3427
+ PageRoot: ge,
3428
+ Section: _e,
3429
+ Container: ve,
3430
+ Heading: ye,
3431
+ TextBlock: Ae,
3432
+ ButtonBlock: Ne,
3433
+ ImageBlock: Pe,
3434
+ Spacer: Be,
3435
+ Divider: Ve,
3436
+ SliderBlock: qe,
3437
+ CanvasSlider: Je,
3438
+ TabsBlock: $e,
3439
+ QuickStack: yt,
3440
+ CollectionList: bt,
3441
+ CollectionSearch: xt,
3442
+ BreadcrumbsBlock: St,
3443
+ PaginationBlock: Ct,
3444
+ StepperBlock: jt,
3445
+ SocialLinksBlock: At,
3446
+ ThemeModeBlock: Ot,
3447
+ OrgChartBlock: Vt,
3448
+ TableBlock: Ht,
3449
+ MasonryBlock: Ye,
3450
+ AccordionBlock: et,
3451
+ NavbarBlock: Qe,
3452
+ ListBlock: ke,
3453
+ TextSpan: Se,
3454
+ QuoteBlock: Oe,
3455
+ TextLink: Me,
3456
+ RichTextBlock: Ee,
3457
+ RichContentBlock: Ee,
3458
+ VideoBlock: Fe,
3459
+ YouTubeBlock: Le,
3460
+ IframeBlock: Re,
3461
+ EmbedBlock: ze,
3462
+ FormBlock: ct,
3463
+ FormLabel: ft,
3464
+ FormInput: pt,
3465
+ FormTextarea: mt,
3466
+ FormCheckbox: (e) => /* @__PURE__ */ d(ht, {
3363
3467
  kind: "checkbox",
3364
3468
  ...e
3365
3469
  }),
3366
- FormRadio: (e) => /* @__PURE__ */ d(mt, {
3470
+ FormRadio: (e) => /* @__PURE__ */ d(ht, {
3367
3471
  kind: "radio",
3368
3472
  ...e
3369
3473
  }),
3370
- FormSelect: ht,
3371
- FormFile: gt,
3372
- FormRecaptcha: ut,
3373
- FormSubmit: _t
3374
- }, Vt = {
3474
+ FormSelect: gt,
3475
+ FormFile: _t,
3476
+ FormRecaptcha: dt,
3477
+ FormSubmit: vt
3478
+ }, Wt = {
3375
3479
  id: "auth",
3376
3480
  label: "Accounts",
3377
3481
  category: "Apps",
3378
3482
  keys: ["SiteLoginForm", "SiteAccountMenu"],
3379
3483
  ssr: "shell",
3380
3484
  settings: ["site.authRedirect"]
3381
- }, Ht = n({
3485
+ }, Gt = n({
3382
3486
  user: null,
3383
3487
  status: "idle",
3384
3488
  ensure: () => {},
3385
3489
  refresh: () => {},
3386
3490
  signOut: () => {}
3387
- }), Ut = () => {
3388
- let e = i(Ht);
3491
+ }), Kt = () => {
3492
+ let e = i(Gt);
3389
3493
  return a(() => {
3390
3494
  e.ensure();
3391
3495
  }, [e]), e;
3392
3496
  };
3393
- function Wt({ children: e, initialUser: t, disabled: n, apiUrl: a, tenant: o }) {
3497
+ function qt({ children: e, initialUser: t, disabled: n, apiUrl: a, tenant: o }) {
3394
3498
  let u = i(H), f = a || u?.apiUrl || "/api", p = o || u?.tenant || "", [m, h] = l(t ?? null), [g, _] = l(t ? "user" : n ? "guest" : "idle"), v = c(!1), y = r((e, t) => fetch(`${f}${e}`, {
3395
3499
  ...t,
3396
3500
  credentials: "include",
@@ -3423,18 +3527,18 @@ function Wt({ children: e, initialUser: t, disabled: n, apiUrl: a, tenant: o })
3423
3527
  b,
3424
3528
  x
3425
3529
  ]);
3426
- return /* @__PURE__ */ d(Ht.Provider, {
3530
+ return /* @__PURE__ */ d(Gt.Provider, {
3427
3531
  value: C,
3428
3532
  children: e
3429
3533
  });
3430
3534
  }
3431
- function Gt({ when: e, children: t }) {
3432
- let { status: n } = Ut();
3535
+ function Jt({ when: e, children: t }) {
3536
+ let { status: n } = Kt();
3433
3537
  return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
3434
3538
  }
3435
3539
  //#endregion
3436
3540
  //#region ../ui/src/components/builder/apps/auth/views.jsx
3437
- function Kt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordLabel: r = "Password", nameLabel: a = "Name", submitLabel: o, style: s, nodeRef: c, inert: u, linked: p, show: m }) {
3541
+ function Yt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordLabel: r = "Password", nameLabel: a = "Name", submitLabel: o, style: s, nodeRef: c, inert: u, linked: p, show: m }) {
3438
3542
  let { tenant: h, apiUrl: g, settings: _ } = i(H), [v, y] = l("form"), [b, x] = l(""), [S, w] = l(!1), T = e === "register", E = u ? m || "form" : v, D = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", O = async (e) => {
3439
3543
  if (e.preventDefault(), u) return;
3440
3544
  let n = new FormData(e.currentTarget);
@@ -3483,20 +3587,20 @@ function Kt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3483
3587
  children: [
3484
3588
  T ? /* @__PURE__ */ f("label", {
3485
3589
  style: {
3486
- ...Y,
3590
+ ...X,
3487
3591
  display: "grid",
3488
3592
  gap: 6
3489
3593
  },
3490
3594
  children: [a, /* @__PURE__ */ d("input", {
3491
3595
  name: "name",
3492
3596
  type: "text",
3493
- style: X,
3494
- ...Z(u)
3597
+ style: Z,
3598
+ ...Q(u)
3495
3599
  })]
3496
3600
  }) : null,
3497
3601
  /* @__PURE__ */ f("label", {
3498
3602
  style: {
3499
- ...Y,
3603
+ ...X,
3500
3604
  display: "grid",
3501
3605
  gap: 6
3502
3606
  },
@@ -3504,13 +3608,13 @@ function Kt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3504
3608
  name: "email",
3505
3609
  type: "email",
3506
3610
  required: !u,
3507
- style: X,
3508
- ...Z(u)
3611
+ style: Z,
3612
+ ...Q(u)
3509
3613
  })]
3510
3614
  }),
3511
3615
  /* @__PURE__ */ f("label", {
3512
3616
  style: {
3513
- ...Y,
3617
+ ...X,
3514
3618
  display: "grid",
3515
3619
  gap: 6
3516
3620
  },
@@ -3518,15 +3622,15 @@ function Kt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3518
3622
  name: "password",
3519
3623
  type: "password",
3520
3624
  required: !u,
3521
- style: X,
3522
- ...Z(u)
3625
+ style: Z,
3626
+ ...Q(u)
3523
3627
  })]
3524
3628
  }),
3525
3629
  /* @__PURE__ */ d("button", {
3526
3630
  type: u ? "button" : "submit",
3527
3631
  disabled: S || void 0,
3528
3632
  style: {
3529
- ...q,
3633
+ ...J,
3530
3634
  border: 0,
3531
3635
  padding: "10px 22px",
3532
3636
  borderRadius: 8,
@@ -3558,8 +3662,8 @@ function Kt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3558
3662
  ]
3559
3663
  });
3560
3664
  }
3561
- function qt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
3562
- let { user: c, status: l, signOut: u } = Ut(), p = a ? s || "user" : l, m = a ? {
3665
+ function Xt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
3666
+ let { user: c, status: l, signOut: u } = Kt(), p = a ? s || "user" : l, m = a ? {
3563
3667
  name: "Ada Lovelace",
3564
3668
  email: "ada@example.com"
3565
3669
  } : c;
@@ -3580,7 +3684,7 @@ function qt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3580
3684
  children: [
3581
3685
  /* @__PURE__ */ f("span", {
3582
3686
  style: {
3583
- ...Y,
3687
+ ...X,
3584
3688
  fontWeight: 600
3585
3689
  },
3586
3690
  children: [
@@ -3591,7 +3695,7 @@ function qt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3591
3695
  }),
3592
3696
  n && m?.email ? /* @__PURE__ */ d("span", {
3593
3697
  style: {
3594
- ...Y,
3698
+ ...X,
3595
3699
  opacity: .7
3596
3700
  },
3597
3701
  children: m.email
@@ -3600,14 +3704,14 @@ function qt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3600
3704
  type: "button",
3601
3705
  onClick: a ? void 0 : u,
3602
3706
  style: {
3603
- ...q,
3707
+ ...J,
3604
3708
  border: 0,
3605
3709
  padding: "8px 16px",
3606
3710
  borderRadius: 8,
3607
3711
  fontSize: 14,
3608
3712
  cursor: a ? "default" : "pointer"
3609
3713
  },
3610
- ...Z(a),
3714
+ ...Q(a),
3611
3715
  children: t
3612
3716
  })
3613
3717
  ]
@@ -3624,42 +3728,42 @@ function qt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3624
3728
  }
3625
3729
  //#endregion
3626
3730
  //#region ../ui/src/components/builder/apps/index.js
3627
- var Jt = [Vt], Yt = {
3628
- SiteLoginForm: Kt,
3629
- SiteAccountMenu: qt
3731
+ var Zt = [Wt], Qt = {
3732
+ SiteLoginForm: Yt,
3733
+ SiteAccountMenu: Xt
3630
3734
  };
3631
- new Set(Jt.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
3735
+ new Set(Zt.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
3632
3736
  //#endregion
3633
3737
  //#region ../ui/src/components/builder/plugins/runtime.js
3634
- var Xt = /* @__PURE__ */ new Map();
3635
- function Zt(e) {
3636
- if (Xt.has(e)) return Xt.get(e);
3738
+ var $t = /* @__PURE__ */ new Map();
3739
+ function en(e) {
3740
+ if ($t.has(e)) return $t.get(e);
3637
3741
  let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
3638
3742
  /* @vite-ignore */
3639
3743
  /* webpackIgnore: true */
3640
3744
  t
3641
3745
  ).finally(() => URL.revokeObjectURL(t));
3642
- return Xt.set(e, n), n;
3746
+ return $t.set(e, n), n;
3643
3747
  }
3644
- function Qt(e) {
3748
+ function tn(e) {
3645
3749
  let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
3646
3750
  return n && typeof n == "object" ? n : {};
3647
3751
  }
3648
3752
  //#endregion
3649
3753
  //#region ../ui/src/components/builder/plugins/view.jsx
3650
- async function $t(e, t) {
3651
- let n = await Zt(e);
3754
+ async function nn(e, t) {
3755
+ let n = await en(e);
3652
3756
  return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
3653
3757
  }
3654
- var en = {
3758
+ var rn = {
3655
3759
  padding: "10px 12px",
3656
3760
  border: "1px dashed rgba(148, 163, 184, 0.5)",
3657
3761
  borderRadius: 8,
3658
3762
  fontSize: 12,
3659
3763
  opacity: .6
3660
3764
  };
3661
- function tn({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
3662
- let s = i(H), l = Qt(s?.settings)[e], u = c(null), p = c(null), m = {
3765
+ function an({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
3766
+ let s = i(H), l = tn(s?.settings)[e], u = c(null), p = c(null), m = {
3663
3767
  tenant: s?.tenant ?? "",
3664
3768
  apiUrl: s?.apiUrl ?? "/api",
3665
3769
  locale: s?.locale ?? "",
@@ -3671,7 +3775,7 @@ function tn({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
3671
3775
  let e = u.current;
3672
3776
  if (!l?.code || !e) return;
3673
3777
  let n = !0;
3674
- return $t(l.code, t).then((e) => {
3778
+ return nn(l.code, t).then((e) => {
3675
3779
  if (!(!n || !e || !u.current)) {
3676
3780
  p.current = e;
3677
3781
  try {
@@ -3701,7 +3805,7 @@ function tn({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
3701
3805
  }) : /* @__PURE__ */ f("div", {
3702
3806
  ref: o,
3703
3807
  style: {
3704
- ...en,
3808
+ ...rn,
3705
3809
  ...C(r)
3706
3810
  },
3707
3811
  children: [
@@ -3713,12 +3817,12 @@ function tn({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
3713
3817
  }
3714
3818
  //#endregion
3715
3819
  //#region ../ui/src/components/builder/render.jsx
3716
- var nn = {
3717
- ...Bt,
3718
- ...Yt,
3719
- PluginBlock: tn
3820
+ var on = {
3821
+ ...Ut,
3822
+ ...Qt,
3823
+ PluginBlock: an
3720
3824
  };
3721
- function rn(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3825
+ function sn(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3722
3826
  let o = n[e];
3723
3827
  if (!o || o.hidden) return null;
3724
3828
  let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
@@ -3726,11 +3830,11 @@ function rn(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3726
3830
  let n = o.props?.componentId, s = r?.[n];
3727
3831
  if (!s?.template || i.has(n)) return null;
3728
3832
  let c = new Set(i).add(n);
3729
- return /* @__PURE__ */ d(t, { children: rn(s.template.rootId, s.template.nodes, r, c, a) }, e);
3833
+ return /* @__PURE__ */ d(t, { children: sn(s.template.rootId, s.template.nodes, r, c, a) }, e);
3730
3834
  }
3731
- let l = nn[s];
3835
+ let l = on[s];
3732
3836
  if (!l) return null;
3733
- let u = (o.nodes ?? []).map((e) => rn(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, rn(t, n, r, i)])) : void 0, m = /* @__PURE__ */ d(l, {
3837
+ let u = (o.nodes ?? []).map((e) => sn(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, sn(t, n, r, i)])) : void 0, m = /* @__PURE__ */ d(l, {
3734
3838
  ...c,
3735
3839
  ...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
3736
3840
  linked: p,
@@ -3739,16 +3843,16 @@ function rn(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3739
3843
  },
3740
3844
  children: u.length ? u : void 0
3741
3845
  }, e);
3742
- return c.when && c.when !== "always" ? /* @__PURE__ */ d(Gt, {
3846
+ return c.when && c.when !== "always" ? /* @__PURE__ */ d(Jt, {
3743
3847
  when: c.when,
3744
3848
  children: m
3745
3849
  }, e) : m;
3746
3850
  }
3747
3851
  //#endregion
3748
3852
  //#region ../ui/src/components/builder/PageRenderer.jsx
3749
- var an = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), on = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(V(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
3853
+ var cn = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), ln = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(V(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
3750
3854
  .webim-page[data-webim-mode="dark"] { ${Object.entries(V(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
3751
- function sn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, custom: o, tenant: c, apiUrl: l, datasets: u, locale: p, direction: m, settings: g, siteUser: v }) {
3855
+ function un({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, custom: o, tenant: c, apiUrl: l, datasets: u, locale: p, direction: m, settings: g, siteUser: v }) {
3752
3856
  let b = o?.js?.trim();
3753
3857
  if (a(() => {
3754
3858
  if (!b) return;
@@ -3762,11 +3866,11 @@ function sn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
3762
3866
  minHeight: "100%",
3763
3867
  display: "flex",
3764
3868
  flexDirection: "column"
3765
- }, w = rn("ROOT", e, n), T = s(() => ({ render: (t, r) => rn(t, e, n, void 0, { mapProps: r }) }), [e, n]), E = F(e, n), D = P(e, n), O = o?.css?.trim(), k = y(e, n).map((e) => /* @__PURE__ */ d("link", {
3869
+ }, w = sn("ROOT", e, n), T = s(() => ({ render: (t, r) => sn(t, e, n, void 0, { mapProps: r }) }), [e, n]), E = F(e, n), D = P(e, n), O = o?.css?.trim(), k = y(e, n).map((e) => /* @__PURE__ */ d("link", {
3766
3870
  rel: "stylesheet",
3767
3871
  precedence: "default",
3768
3872
  href: _(e)
3769
- }, e)), A = B(t), j = on(A);
3873
+ }, e)), A = B(t), j = ln(A);
3770
3874
  return r === "auto" ? /* @__PURE__ */ d(H.Provider, {
3771
3875
  value: {
3772
3876
  tenant: c || "",
@@ -3774,11 +3878,11 @@ function sn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
3774
3878
  locale: p || "",
3775
3879
  settings: g ?? null
3776
3880
  },
3777
- children: /* @__PURE__ */ d(Wt, {
3881
+ children: /* @__PURE__ */ d(qt, {
3778
3882
  initialUser: v,
3779
3883
  children: /* @__PURE__ */ d(U.Provider, {
3780
3884
  value: u ?? null,
3781
- children: /* @__PURE__ */ d(ae.Provider, {
3885
+ children: /* @__PURE__ */ d(G.Provider, {
3782
3886
  value: T,
3783
3887
  children: /* @__PURE__ */ f("div", {
3784
3888
  ...x,
@@ -3789,8 +3893,8 @@ function sn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
3789
3893
  ...i
3790
3894
  },
3791
3895
  children: [
3792
- /* @__PURE__ */ d("style", { children: `.webim-page { ${an(V(A.light))} }
3793
- @media (prefers-color-scheme: dark) { .webim-page { ${an(V(A.dark))} } }` }),
3896
+ /* @__PURE__ */ d("style", { children: `.webim-page { ${cn(V(A.light))} }
3897
+ @media (prefers-color-scheme: dark) { .webim-page { ${cn(V(A.dark))} } }` }),
3794
3898
  /* @__PURE__ */ d("style", { children: j }),
3795
3899
  k,
3796
3900
  /* @__PURE__ */ d("style", { children: S }),
@@ -3810,11 +3914,11 @@ function sn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
3810
3914
  locale: p || "",
3811
3915
  settings: g ?? null
3812
3916
  },
3813
- children: /* @__PURE__ */ d(Wt, {
3917
+ children: /* @__PURE__ */ d(qt, {
3814
3918
  initialUser: v,
3815
3919
  children: /* @__PURE__ */ d(U.Provider, {
3816
3920
  value: u ?? null,
3817
- children: /* @__PURE__ */ d(ae.Provider, {
3921
+ children: /* @__PURE__ */ d(G.Provider, {
3818
3922
  value: T,
3819
3923
  children: /* @__PURE__ */ f("div", {
3820
3924
  ...x,
@@ -3841,8 +3945,8 @@ function sn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
3841
3945
  }
3842
3946
  //#endregion
3843
3947
  //#region src/WebimContent.jsx
3844
- function cn({ bundle: e, mode: t = "auto", style: n }) {
3845
- return e?.blocks?.ROOT ? /* @__PURE__ */ d(sn, {
3948
+ function dn({ bundle: e, mode: t = "auto", style: n }) {
3949
+ return e?.blocks?.ROOT ? /* @__PURE__ */ d(un, {
3846
3950
  blocks: e.blocks,
3847
3951
  theme: e.theme,
3848
3952
  components: e.components,
@@ -3859,7 +3963,7 @@ function cn({ bundle: e, mode: t = "auto", style: n }) {
3859
3963
  }
3860
3964
  //#endregion
3861
3965
  //#region src/bundle.js
3862
- function ln({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
3966
+ function fn({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
3863
3967
  let a = {
3864
3968
  ...t?.global ?? {},
3865
3969
  ...t?.tenant ?? {}
@@ -3883,18 +3987,18 @@ function ln({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
3883
3987
  }
3884
3988
  //#endregion
3885
3989
  //#region src/fetchPage.js
3886
- var un = async (e) => {
3990
+ var pn = async (e) => {
3887
3991
  let t = await e.json().catch(() => null);
3888
3992
  if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
3889
3993
  return t?.payload ?? t;
3890
3994
  };
3891
- async function dn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
3995
+ async function mn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
3892
3996
  if (!e) throw Error("fetchPage: apiUrl is required");
3893
3997
  if (!n) throw Error("fetchPage: slug is required");
3894
3998
  let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
3895
3999
  ...t ? { "x-tenant": t } : {},
3896
4000
  ...a ? { authorization: `Bearer ${a}` } : {}
3897
- }, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(un), c(`${l}/settings/public`, { headers: u }).then(un)]), p = ln({
4001
+ }, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(pn), c(`${l}/settings/public`, { headers: u }).then(pn)]), p = fn({
3898
4002
  page: d,
3899
4003
  settings: f,
3900
4004
  tenant: t,
@@ -3902,7 +4006,7 @@ async function dn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
3902
4006
  locale: r
3903
4007
  }), m = [...new Set(Object.values(p.blocks ?? {}).map((e) => e?.type?.resolvedName === "CollectionList" ? e.props?.collection : e?.type?.resolvedName === "TableBlock" || e?.type?.resolvedName === "OrgChartBlock" ? e.props?.source : null).filter(Boolean))];
3904
4008
  if (m.length) {
3905
- let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(un).then((e) => {
4009
+ let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(pn).then((e) => {
3906
4010
  let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
3907
4011
  return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
3908
4012
  }).catch(() => [[t, []]])));
@@ -3916,40 +4020,40 @@ async function dn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
3916
4020
  }
3917
4021
  //#endregion
3918
4022
  //#region src/ssr.jsx
3919
- var fn = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
4023
+ var hn = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
3920
4024
  "&": "&amp;",
3921
4025
  "<": "&lt;",
3922
4026
  ">": "&gt;",
3923
4027
  "\"": "&quot;"
3924
4028
  })[e]);
3925
- function pn(t, { mode: n = "auto", style: r } = {}) {
3926
- return e(/* @__PURE__ */ d(cn, {
4029
+ function gn(t, { mode: n = "auto", style: r } = {}) {
4030
+ return e(/* @__PURE__ */ d(dn, {
3927
4031
  bundle: t,
3928
4032
  mode: n,
3929
4033
  style: r
3930
4034
  }));
3931
4035
  }
3932
- function mn(e, { mode: t = "auto", lang: n } = {}) {
4036
+ function _n(e, { mode: t = "auto", lang: n } = {}) {
3933
4037
  let r = e.seo ?? {}, i = n || e.locale || "en", a = h(e.direction, i), o = r.title || e.title || e.slug || "Page", s = e.custom?.js?.trim(), c = [
3934
4038
  "<meta charset=\"utf-8\"/>",
3935
4039
  "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>",
3936
- `<title>${fn(o)}</title>`,
3937
- r.description && `<meta name="description" content="${fn(r.description)}"/>`,
3938
- `<meta property="og:title" content="${fn(o)}"/>`,
3939
- r.image && `<meta property="og:image" content="${fn(r.image)}"/>`,
4040
+ `<title>${hn(o)}</title>`,
4041
+ r.description && `<meta name="description" content="${hn(r.description)}"/>`,
4042
+ `<meta property="og:title" content="${hn(o)}"/>`,
4043
+ r.image && `<meta property="og:image" content="${hn(r.image)}"/>`,
3940
4044
  r.noindex && "<meta name=\"robots\" content=\"noindex\"/>",
3941
4045
  "<style>html,body{margin:0;height:100%}</style>"
3942
4046
  ].filter(Boolean).join("\n");
3943
4047
  return `<!doctype html>
3944
- <html lang="${fn(i)}"${a ? ` dir="${a}"` : ""}>
4048
+ <html lang="${hn(i)}"${a ? ` dir="${a}"` : ""}>
3945
4049
  <head>
3946
4050
  ${c}
3947
4051
  </head>
3948
4052
  <body>
3949
- ${pn(e, { mode: t })}
4053
+ ${gn(e, { mode: t })}
3950
4054
  ${s ? `<script>${s.replaceAll("<\/script", "<\\/script")}<\/script>` : ""}
3951
4055
  </body>
3952
4056
  </html>`;
3953
4057
  }
3954
4058
  //#endregion
3955
- export { ln as assembleBundle, dn as fetchPage, pn as renderBundleHtml, mn as renderPageDocument };
4059
+ export { fn as assembleBundle, mn as fetchPage, gn as renderBundleHtml, _n as renderPageDocument };