webim-adapter 0.26.0 → 0.28.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.
- package/build/webim-adapter.js +634 -364
- package/build/webim-embed.js +3 -3
- package/build/webim-ssr.js +386 -116
- package/package.json +1 -1
package/build/webim-adapter.js
CHANGED
|
@@ -220,26 +220,26 @@ function C(e) {
|
|
|
220
220
|
delete t.textStrokeWidth, delete t.textStrokeColor, (re !== void 0 || ie !== void 0) && (t.WebkitTextStroke = `${x(re ?? 1)} ${ie || "currentColor"}`);
|
|
221
221
|
let { clipText: ae } = t;
|
|
222
222
|
delete t.clipText, ae && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
|
|
223
|
-
let { transitions: oe, transitionDuration:
|
|
223
|
+
let { transitions: oe, transitionDuration: H, transitionEasing: se, transitionProperty: ce } = t, le = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
|
|
224
224
|
delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
|
|
225
|
-
let
|
|
226
|
-
if (
|
|
225
|
+
let ue = (Array.isArray(oe) ? oe : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${le(e.duration ?? 200)} ${e.easing || "ease"}`);
|
|
226
|
+
if (H !== void 0 && ue.push(`${ce || "all"} ${le(H)} ${se || "ease"}`), ue.length && (t.transition = ue.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
|
|
227
227
|
let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
|
|
228
228
|
t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
|
|
229
229
|
}
|
|
230
230
|
delete t.backgroundVideo;
|
|
231
|
-
let { overlayColor:
|
|
232
|
-
if (delete t.overlayColor, delete t.overlayOpacity,
|
|
233
|
-
let e = `color-mix(in srgb, ${
|
|
231
|
+
let { overlayColor: U, overlayOpacity: W } = t;
|
|
232
|
+
if (delete t.overlayColor, delete t.overlayOpacity, U) {
|
|
233
|
+
let e = `color-mix(in srgb, ${U} ${W ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
|
|
234
234
|
t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
|
|
235
235
|
}
|
|
236
236
|
t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
|
|
237
|
-
let { backgroundLayers:
|
|
237
|
+
let { backgroundLayers: G } = t;
|
|
238
238
|
delete t.backgroundLayers;
|
|
239
|
-
let
|
|
240
|
-
if (
|
|
239
|
+
let de = (Array.isArray(G) ? G : []).filter((e) => e && e.on !== !1);
|
|
240
|
+
if (de.length) {
|
|
241
241
|
let e = [], n = [], r = [], i = [], a = [];
|
|
242
|
-
for (let t of
|
|
242
|
+
for (let t of de) if (t.kind === "linear") e.push(`linear-gradient(${t.angle ?? 180}deg, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
|
|
243
243
|
else if (t.kind === "radial") e.push(`radial-gradient(circle, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
|
|
244
244
|
else {
|
|
245
245
|
if (!t.src) continue;
|
|
@@ -480,18 +480,18 @@ function oe({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
480
480
|
}
|
|
481
481
|
//#endregion
|
|
482
482
|
//#region src/fetchPage.js
|
|
483
|
-
var
|
|
483
|
+
var H = async (e) => {
|
|
484
484
|
let t = await e.json().catch(() => null);
|
|
485
485
|
if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
|
|
486
486
|
return t?.payload ?? t;
|
|
487
487
|
};
|
|
488
|
-
async function
|
|
488
|
+
async function se({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
|
|
489
489
|
if (!e) throw Error("fetchPage: apiUrl is required");
|
|
490
490
|
if (!n) throw Error("fetchPage: slug is required");
|
|
491
491
|
let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
|
|
492
492
|
...t ? { "x-tenant": t } : {},
|
|
493
493
|
...a ? { authorization: `Bearer ${a}` } : {}
|
|
494
|
-
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(
|
|
494
|
+
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(H), c(`${l}/settings/public`, { headers: u }).then(H)]), p = oe({
|
|
495
495
|
page: d,
|
|
496
496
|
settings: f,
|
|
497
497
|
tenant: t,
|
|
@@ -499,7 +499,7 @@ async function ce({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
499
499
|
locale: r
|
|
500
500
|
}), m = [...new Set(Object.values(p.blocks ?? {}).map((e) => e?.type?.resolvedName === "CollectionList" ? e.props?.collection : e?.type?.resolvedName === "TableBlock" || e?.type?.resolvedName === "OrgChartBlock" ? e.props?.source : null).filter(Boolean))];
|
|
501
501
|
if (m.length) {
|
|
502
|
-
let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(
|
|
502
|
+
let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(H).then((e) => {
|
|
503
503
|
let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
|
|
504
504
|
return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
|
|
505
505
|
}).catch(() => [[t, []]])));
|
|
@@ -513,7 +513,7 @@ async function ce({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
513
513
|
}
|
|
514
514
|
//#endregion
|
|
515
515
|
//#region ../ui/src/components/builder/locale.js
|
|
516
|
-
var
|
|
516
|
+
var ce = /* @__PURE__ */ new Set([
|
|
517
517
|
"ar",
|
|
518
518
|
"he",
|
|
519
519
|
"fa",
|
|
@@ -524,34 +524,34 @@ var le = /* @__PURE__ */ new Set([
|
|
|
524
524
|
"yi",
|
|
525
525
|
"dv",
|
|
526
526
|
"ckb"
|
|
527
|
-
]),
|
|
527
|
+
]), le = (e) => ce.has(String(e || "").toLowerCase().split(/[-_]/)[0]) ? "rtl" : "ltr", ue = (e, t) => e === "ltr" || e === "rtl" ? e : t ? le(t) : void 0, U = t({
|
|
528
528
|
tenant: "",
|
|
529
529
|
apiUrl: "/api",
|
|
530
530
|
locale: "",
|
|
531
531
|
settings: null
|
|
532
|
-
}),
|
|
532
|
+
}), W = t(null), G = (e) => {
|
|
533
533
|
let t = Number(e?.__page);
|
|
534
534
|
if (Number.isFinite(t) && t >= 1) return Math.floor(t);
|
|
535
535
|
if (typeof window > "u") return 1;
|
|
536
536
|
let n = Number(new URLSearchParams(window.location.search).get("page"));
|
|
537
537
|
return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
|
|
538
|
-
},
|
|
538
|
+
}, de = () => {
|
|
539
539
|
if (typeof window > "u") return {};
|
|
540
540
|
let e = {};
|
|
541
541
|
return new URLSearchParams(window.location.search).forEach((t, n) => {
|
|
542
542
|
n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
|
|
543
543
|
}), e;
|
|
544
|
-
},
|
|
544
|
+
}, fe = (e) => {
|
|
545
545
|
let t = {
|
|
546
546
|
...e && typeof e == "object" && !Array.isArray(e) ? e : {},
|
|
547
|
-
...
|
|
547
|
+
...de()
|
|
548
548
|
};
|
|
549
549
|
return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
|
|
550
|
-
},
|
|
551
|
-
function
|
|
550
|
+
}, pe = t(null), me = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
551
|
+
function K(e, t) {
|
|
552
552
|
if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
|
|
553
553
|
}
|
|
554
|
-
var
|
|
554
|
+
var he = (e) => {
|
|
555
555
|
let t = [];
|
|
556
556
|
for (let [n, r] of Object.entries(e ?? {})) {
|
|
557
557
|
if (!/^[\w-]+$/.test(n)) continue;
|
|
@@ -561,36 +561,36 @@ var ge = (e) => {
|
|
|
561
561
|
}
|
|
562
562
|
return t;
|
|
563
563
|
};
|
|
564
|
-
function
|
|
564
|
+
function q(e) {
|
|
565
565
|
return e == null ? "" : typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? String(e) : typeof e == "object" && !Array.isArray(e) && ("label" in e || "name" in e || "slug" in e) ? String(e.label ?? e.name ?? e.slug ?? "") : typeof e == "object" && !Array.isArray(e) && Number.isFinite(Number(e.lat)) && Number.isFinite(Number(e.lng)) ? `${e.lat}, ${e.lng}` : Array.isArray(e) ? e.map((e) => typeof e == "string" ? e : Array.isArray(e?.parts) ? e.parts.map((e) => e?.text ?? "").join("") : Array.isArray(e?.items) ? e.items.map((e) => e?.text ?? "").join(" ") : e && (e.label != null || e.name != null || e.slug != null) ? String(e.label ?? e.name ?? e.slug) : "").filter(Boolean).join(" ") : "";
|
|
566
566
|
}
|
|
567
|
-
function
|
|
568
|
-
let n = t?.data ?? {}, r =
|
|
567
|
+
function ge(e, t) {
|
|
568
|
+
let n = t?.data ?? {}, r = he(n);
|
|
569
569
|
if (!r.length) return e;
|
|
570
|
-
let i = RegExp(`:(${r.map(
|
|
570
|
+
let i = RegExp(`:(${r.map(me).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => q(K(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
|
|
571
571
|
return a(e);
|
|
572
572
|
}
|
|
573
|
-
var
|
|
573
|
+
var _e = {
|
|
574
574
|
margin: 0,
|
|
575
575
|
fontWeight: 700,
|
|
576
576
|
lineHeight: 1.2,
|
|
577
577
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
578
|
-
},
|
|
578
|
+
}, ve = { margin: 0 }, J = {
|
|
579
579
|
display: "inline-block",
|
|
580
580
|
textDecoration: "none",
|
|
581
581
|
cursor: "pointer",
|
|
582
582
|
backgroundColor: "var(--page-accent, #111827)",
|
|
583
583
|
color: "var(--page-accent-text, #ffffff)"
|
|
584
|
-
},
|
|
584
|
+
}, ye = {
|
|
585
585
|
flexGrow: 1,
|
|
586
586
|
display: "flex",
|
|
587
587
|
flexDirection: "column",
|
|
588
588
|
position: "relative"
|
|
589
|
-
},
|
|
589
|
+
}, be = {
|
|
590
590
|
display: "flex",
|
|
591
591
|
flexDirection: "column"
|
|
592
592
|
};
|
|
593
|
-
function
|
|
593
|
+
function xe({ style: e }) {
|
|
594
594
|
let t = e?.backgroundVideo;
|
|
595
595
|
if (!t) return null;
|
|
596
596
|
let n = {
|
|
@@ -616,7 +616,7 @@ function Se({ style: e }) {
|
|
|
616
616
|
background: r
|
|
617
617
|
} })] });
|
|
618
618
|
}
|
|
619
|
-
var
|
|
619
|
+
var Se = (e, t) => e?.backgroundVideo ? {
|
|
620
620
|
position: "relative",
|
|
621
621
|
...t,
|
|
622
622
|
...C(e)
|
|
@@ -624,24 +624,24 @@ var Ce = (e, t) => e?.backgroundVideo ? {
|
|
|
624
624
|
...t,
|
|
625
625
|
...C(e)
|
|
626
626
|
};
|
|
627
|
-
function
|
|
627
|
+
function Ce({ style: e, nodeRef: t, children: n }) {
|
|
628
628
|
return /* @__PURE__ */ d("div", {
|
|
629
629
|
ref: t,
|
|
630
630
|
style: {
|
|
631
|
-
...
|
|
631
|
+
...ye,
|
|
632
632
|
...C(e)
|
|
633
633
|
},
|
|
634
|
-
children: [/* @__PURE__ */ u(
|
|
634
|
+
children: [/* @__PURE__ */ u(xe, { style: e }), n]
|
|
635
635
|
});
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function we({ style: e, nodeRef: t, children: n }) {
|
|
638
638
|
return /* @__PURE__ */ d("section", {
|
|
639
639
|
ref: t,
|
|
640
|
-
style:
|
|
641
|
-
children: [/* @__PURE__ */ u(
|
|
640
|
+
style: Se(e, be),
|
|
641
|
+
children: [/* @__PURE__ */ u(xe, { style: e }), n]
|
|
642
642
|
});
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function Te({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
645
645
|
let i = t ? {
|
|
646
646
|
position: "relative",
|
|
647
647
|
minHeight: 240
|
|
@@ -650,32 +650,32 @@ function Ee({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
|
650
650
|
ref: n,
|
|
651
651
|
style: i ? {
|
|
652
652
|
...i,
|
|
653
|
-
...
|
|
654
|
-
} :
|
|
655
|
-
children: [/* @__PURE__ */ u(
|
|
653
|
+
...Se(e)
|
|
654
|
+
} : Se(e),
|
|
655
|
+
children: [/* @__PURE__ */ u(xe, { style: e }), r]
|
|
656
656
|
});
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function Ee({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
|
|
659
659
|
return /* @__PURE__ */ u(n, {
|
|
660
660
|
ref: a,
|
|
661
661
|
style: {
|
|
662
|
-
...
|
|
662
|
+
..._e,
|
|
663
663
|
...C(r)
|
|
664
664
|
},
|
|
665
|
-
children:
|
|
665
|
+
children: Y(t, e, i)
|
|
666
666
|
});
|
|
667
667
|
}
|
|
668
|
-
var
|
|
668
|
+
var De = {
|
|
669
669
|
fontFamily: z.mono.value,
|
|
670
670
|
background: "rgba(148, 163, 184, 0.18)",
|
|
671
671
|
padding: "1px 5px",
|
|
672
672
|
borderRadius: 4,
|
|
673
673
|
fontSize: "0.9em"
|
|
674
674
|
};
|
|
675
|
-
function
|
|
675
|
+
function Oe(e, t = [], n, r) {
|
|
676
676
|
let i = e;
|
|
677
677
|
return t.includes("sup") ? i = /* @__PURE__ */ u("sup", { children: i }) : t.includes("sub") && (i = /* @__PURE__ */ u("sub", { children: i })), t.includes("code") && (i = /* @__PURE__ */ u("code", {
|
|
678
|
-
style:
|
|
678
|
+
style: De,
|
|
679
679
|
children: i
|
|
680
680
|
})), t.includes("strike") && (i = /* @__PURE__ */ u("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ u("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ u("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ u("strong", { children: i })), n && (i = /* @__PURE__ */ u("a", {
|
|
681
681
|
href: n,
|
|
@@ -685,13 +685,13 @@ function ke(e, t = [], n, r) {
|
|
|
685
685
|
children: i
|
|
686
686
|
})), i;
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function Y(t, n, r) {
|
|
689
689
|
return t?.length ? t.map((t, n) => {
|
|
690
690
|
if (t.slot) return /* @__PURE__ */ u(e, { children: r?.[t.slot] ?? null }, n);
|
|
691
|
-
if (t.parts) return /* @__PURE__ */ u(e, { children:
|
|
691
|
+
if (t.parts) return /* @__PURE__ */ u(e, { children: Y(t.parts, "", r) }, n);
|
|
692
692
|
let i = t.text;
|
|
693
693
|
return t.sup ? i = /* @__PURE__ */ u("sup", { children: i }) : t.sub && (i = /* @__PURE__ */ u("sub", { children: i })), t.code && (i = /* @__PURE__ */ u("code", {
|
|
694
|
-
style:
|
|
694
|
+
style: De,
|
|
695
695
|
children: i
|
|
696
696
|
})), t.strike && (i = /* @__PURE__ */ u("s", { children: i })), t.underline && (i = /* @__PURE__ */ u("u", { children: i })), t.italic && (i = /* @__PURE__ */ u("em", { children: i })), t.bold && (i = /* @__PURE__ */ u("strong", { children: i })), (t.color || t.background) && (i = /* @__PURE__ */ u("span", {
|
|
697
697
|
style: {
|
|
@@ -708,13 +708,13 @@ function J(t, n, r) {
|
|
|
708
708
|
})), /* @__PURE__ */ u(e, { children: i }, n);
|
|
709
709
|
}) : n;
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function ke({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
|
|
712
712
|
return /* @__PURE__ */ u("span", {
|
|
713
713
|
style: C(a),
|
|
714
|
-
children: e?.length ?
|
|
714
|
+
children: e?.length ? Y(e, t) : Oe(t, n, r, i)
|
|
715
715
|
});
|
|
716
716
|
}
|
|
717
|
-
var
|
|
717
|
+
var Ae = {
|
|
718
718
|
h1: 40,
|
|
719
719
|
h2: 32,
|
|
720
720
|
h3: 26,
|
|
@@ -722,7 +722,7 @@ var je = {
|
|
|
722
722
|
h5: 19,
|
|
723
723
|
h6: 16
|
|
724
724
|
};
|
|
725
|
-
function
|
|
725
|
+
function je({ align: e = "center", width: t, wrap: n } = {}) {
|
|
726
726
|
let r = t ? `${t}%` : void 0;
|
|
727
727
|
if (e === "full") return { width: "100%" };
|
|
728
728
|
let i = e === "left" || e === "right";
|
|
@@ -756,8 +756,8 @@ function Me({ align: e = "center", width: t, wrap: n } = {}) {
|
|
|
756
756
|
marginRight: "auto"
|
|
757
757
|
};
|
|
758
758
|
}
|
|
759
|
-
function
|
|
760
|
-
let r = n ?? ((e, n) =>
|
|
759
|
+
function Me(e = [], t, n) {
|
|
760
|
+
let r = n ?? ((e, n) => Y(e, n, t));
|
|
761
761
|
return e.map((t, n) => {
|
|
762
762
|
let i = {
|
|
763
763
|
marginTop: 0,
|
|
@@ -779,7 +779,7 @@ function Ne(e = [], t, n) {
|
|
|
779
779
|
marginLeft: 0,
|
|
780
780
|
marginRight: 0,
|
|
781
781
|
...i,
|
|
782
|
-
...
|
|
782
|
+
...je(t)
|
|
783
783
|
},
|
|
784
784
|
children: [t.href ? /* @__PURE__ */ u("a", {
|
|
785
785
|
href: t.href,
|
|
@@ -798,16 +798,16 @@ function Ne(e = [], t, n) {
|
|
|
798
798
|
})]
|
|
799
799
|
}, n);
|
|
800
800
|
}
|
|
801
|
-
if (t.type === "video") return
|
|
801
|
+
if (t.type === "video") return Ue(t.url) ? /* @__PURE__ */ u("div", {
|
|
802
802
|
style: {
|
|
803
803
|
...i,
|
|
804
|
-
...
|
|
804
|
+
...je({
|
|
805
805
|
align: t.align,
|
|
806
806
|
wrap: t.wrap,
|
|
807
807
|
width: t.width ?? 100
|
|
808
808
|
})
|
|
809
809
|
},
|
|
810
|
-
children: /* @__PURE__ */ u(
|
|
810
|
+
children: /* @__PURE__ */ u(We, {
|
|
811
811
|
url: t.url,
|
|
812
812
|
autoplay: t.autoplay,
|
|
813
813
|
muted: t.muted,
|
|
@@ -869,17 +869,17 @@ function Ne(e = [], t, n) {
|
|
|
869
869
|
}
|
|
870
870
|
if (t.type === "quote") return /* @__PURE__ */ u("blockquote", {
|
|
871
871
|
style: {
|
|
872
|
-
...
|
|
872
|
+
...Pe,
|
|
873
873
|
...i
|
|
874
874
|
},
|
|
875
875
|
children: r(t.parts, t.text)
|
|
876
876
|
}, n);
|
|
877
|
-
if (
|
|
877
|
+
if (Ae[t.type]) {
|
|
878
878
|
let e = t.type;
|
|
879
879
|
return /* @__PURE__ */ u(e, {
|
|
880
880
|
style: {
|
|
881
|
-
...
|
|
882
|
-
fontSize:
|
|
881
|
+
..._e,
|
|
882
|
+
fontSize: Ae[t.type],
|
|
883
883
|
...i
|
|
884
884
|
},
|
|
885
885
|
children: r(t.parts, t.text)
|
|
@@ -887,39 +887,39 @@ function Ne(e = [], t, n) {
|
|
|
887
887
|
}
|
|
888
888
|
return /* @__PURE__ */ u("p", {
|
|
889
889
|
style: {
|
|
890
|
-
...
|
|
890
|
+
...ve,
|
|
891
891
|
...i
|
|
892
892
|
},
|
|
893
893
|
children: r(t.parts, t.text)
|
|
894
894
|
}, n);
|
|
895
895
|
});
|
|
896
896
|
}
|
|
897
|
-
function
|
|
897
|
+
function Ne({ content: e, style: t, linked: n, nodeRef: r }) {
|
|
898
898
|
return /* @__PURE__ */ u("div", {
|
|
899
899
|
ref: r,
|
|
900
900
|
style: {
|
|
901
901
|
display: "flow-root",
|
|
902
902
|
...C(t)
|
|
903
903
|
},
|
|
904
|
-
children:
|
|
904
|
+
children: Me(e, n)
|
|
905
905
|
});
|
|
906
906
|
}
|
|
907
|
-
var
|
|
907
|
+
var Pe = {
|
|
908
908
|
margin: 0,
|
|
909
909
|
padding: "8px 0 8px 20px",
|
|
910
910
|
borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
|
|
911
911
|
};
|
|
912
|
-
function
|
|
912
|
+
function Fe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
913
913
|
return /* @__PURE__ */ u("blockquote", {
|
|
914
914
|
ref: i,
|
|
915
915
|
style: {
|
|
916
|
-
...
|
|
916
|
+
...Pe,
|
|
917
917
|
...C(n)
|
|
918
918
|
},
|
|
919
|
-
children:
|
|
919
|
+
children: Y(t, e, r)
|
|
920
920
|
});
|
|
921
921
|
}
|
|
922
|
-
function
|
|
922
|
+
function Ie({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
923
923
|
return /* @__PURE__ */ u(e ? "ol" : "ul", {
|
|
924
924
|
ref: r,
|
|
925
925
|
style: {
|
|
@@ -929,53 +929,53 @@ function Le({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
|
929
929
|
},
|
|
930
930
|
children: t.map((e, t) => /* @__PURE__ */ u("li", {
|
|
931
931
|
style: { marginBottom: 4 },
|
|
932
|
-
children:
|
|
932
|
+
children: Y(e.parts, e.text)
|
|
933
933
|
}, t))
|
|
934
934
|
});
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function Le({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
937
937
|
return /* @__PURE__ */ u("p", {
|
|
938
938
|
ref: i,
|
|
939
939
|
style: {
|
|
940
|
-
...
|
|
940
|
+
...ve,
|
|
941
941
|
...C(n)
|
|
942
942
|
},
|
|
943
|
-
children:
|
|
943
|
+
children: Y(t, e, r)
|
|
944
944
|
});
|
|
945
945
|
}
|
|
946
|
-
var
|
|
946
|
+
var Re = {
|
|
947
947
|
color: "var(--page-accent, inherit)",
|
|
948
948
|
textDecoration: "underline",
|
|
949
949
|
textUnderlineOffset: 3,
|
|
950
950
|
cursor: "pointer"
|
|
951
951
|
};
|
|
952
|
-
function
|
|
952
|
+
function ze({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
953
953
|
return /* @__PURE__ */ u("a", {
|
|
954
954
|
ref: o,
|
|
955
955
|
href: n || "#",
|
|
956
956
|
target: r || void 0,
|
|
957
957
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
958
958
|
style: {
|
|
959
|
-
...
|
|
959
|
+
...Re,
|
|
960
960
|
...C(i)
|
|
961
961
|
},
|
|
962
|
-
children:
|
|
962
|
+
children: Y(t, e, a)
|
|
963
963
|
});
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function Be({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
966
966
|
return /* @__PURE__ */ u("a", {
|
|
967
967
|
ref: o,
|
|
968
968
|
href: n || "#",
|
|
969
969
|
target: r || void 0,
|
|
970
970
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
971
971
|
style: {
|
|
972
|
-
...
|
|
972
|
+
...J,
|
|
973
973
|
...C(i)
|
|
974
974
|
},
|
|
975
|
-
children:
|
|
975
|
+
children: Y(t, e, a)
|
|
976
976
|
});
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function Ve({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
979
979
|
return e ? /* @__PURE__ */ u("img", {
|
|
980
980
|
ref: r,
|
|
981
981
|
src: e,
|
|
@@ -987,7 +987,7 @@ function He({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
|
987
987
|
}
|
|
988
988
|
}) : null;
|
|
989
989
|
}
|
|
990
|
-
function
|
|
990
|
+
function He({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
|
|
991
991
|
return e ? /* @__PURE__ */ u("video", {
|
|
992
992
|
ref: s,
|
|
993
993
|
src: e,
|
|
@@ -1005,9 +1005,9 @@ function Ue({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
|
|
|
1005
1005
|
}
|
|
1006
1006
|
}) : null;
|
|
1007
1007
|
}
|
|
1008
|
-
var
|
|
1009
|
-
function
|
|
1010
|
-
let c =
|
|
1008
|
+
var Ue = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
|
|
1009
|
+
function We({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
|
|
1010
|
+
let c = Ue(e);
|
|
1011
1011
|
if (!c) return null;
|
|
1012
1012
|
let l = new URLSearchParams({ rel: "0" });
|
|
1013
1013
|
return t && l.set("autoplay", "1"), (n || t) && l.set("mute", "1"), i || l.set("controls", "0"), r && (l.set("loop", "1"), l.set("playlist", c)), Number(a) > 0 && l.set("start", String(Math.floor(Number(a)))), /* @__PURE__ */ u("div", {
|
|
@@ -1033,7 +1033,7 @@ function Ge({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
|
|
|
1033
1033
|
})
|
|
1034
1034
|
});
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1036
|
+
function Ge({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
|
|
1037
1037
|
return e ? /* @__PURE__ */ u("iframe", {
|
|
1038
1038
|
ref: i,
|
|
1039
1039
|
src: e,
|
|
@@ -1049,7 +1049,7 @@ function Ke({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
|
|
|
1049
1049
|
}
|
|
1050
1050
|
}) : null;
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1052
|
+
function Ke({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
1053
1053
|
let [a, o] = c(null);
|
|
1054
1054
|
return i(() => {
|
|
1055
1055
|
a && (a.innerHTML = e || "", t && a.querySelectorAll("script").forEach((e) => {
|
|
@@ -1068,7 +1068,7 @@ function qe({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
|
1068
1068
|
style: C(n)
|
|
1069
1069
|
});
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function qe({ height: e, nodeRef: t }) {
|
|
1072
1072
|
return /* @__PURE__ */ u("div", {
|
|
1073
1073
|
ref: t,
|
|
1074
1074
|
style: {
|
|
@@ -1078,7 +1078,7 @@ function Je({ height: e, nodeRef: t }) {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
});
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function Je({ style: e, nodeRef: t }) {
|
|
1082
1082
|
return /* @__PURE__ */ u("div", {
|
|
1083
1083
|
ref: t,
|
|
1084
1084
|
style: {
|
|
@@ -1089,7 +1089,7 @@ function Ye({ style: e, nodeRef: t }) {
|
|
|
1089
1089
|
}
|
|
1090
1090
|
});
|
|
1091
1091
|
}
|
|
1092
|
-
var
|
|
1092
|
+
var Ye = {
|
|
1093
1093
|
position: "absolute",
|
|
1094
1094
|
top: "50%",
|
|
1095
1095
|
transform: "translateY(-50%)",
|
|
@@ -1106,7 +1106,7 @@ var Xe = {
|
|
|
1106
1106
|
alignItems: "center",
|
|
1107
1107
|
justifyContent: "center",
|
|
1108
1108
|
padding: 0
|
|
1109
|
-
},
|
|
1109
|
+
}, Xe = {
|
|
1110
1110
|
bottom: {
|
|
1111
1111
|
inset: "auto 0 0 0",
|
|
1112
1112
|
padding: "40px 24px 20px",
|
|
@@ -1125,8 +1125,8 @@ var Xe = {
|
|
|
1125
1125
|
padding: 24,
|
|
1126
1126
|
textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
|
|
1127
1127
|
}
|
|
1128
|
-
},
|
|
1129
|
-
function
|
|
1128
|
+
}, Ze = 48;
|
|
1129
|
+
function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
|
|
1130
1130
|
let [p, m] = c(0), [h, g] = c(!1), [_, v] = c(null), y = e ? Math.min(p, e - 1) : 0;
|
|
1131
1131
|
if (i(() => {
|
|
1132
1132
|
if (!n || h || _ || e < 2) return;
|
|
@@ -1142,7 +1142,7 @@ function $e({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1142
1142
|
let b = (t) => m((t + e) % e), x = () => {
|
|
1143
1143
|
if (!_) return;
|
|
1144
1144
|
let { dx: e } = _;
|
|
1145
|
-
v(null), e < -48 ? b(y + 1) : e >
|
|
1145
|
+
v(null), e < -48 ? b(y + 1) : e > Ze && b(y - 1);
|
|
1146
1146
|
};
|
|
1147
1147
|
return /* @__PURE__ */ d("div", {
|
|
1148
1148
|
ref: f,
|
|
@@ -1190,7 +1190,7 @@ function $e({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1190
1190
|
type: "button",
|
|
1191
1191
|
"aria-label": "Previous slide",
|
|
1192
1192
|
style: {
|
|
1193
|
-
...
|
|
1193
|
+
...Ye,
|
|
1194
1194
|
left: 12
|
|
1195
1195
|
},
|
|
1196
1196
|
onClick: () => b(y - 1),
|
|
@@ -1200,7 +1200,7 @@ function $e({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1200
1200
|
type: "button",
|
|
1201
1201
|
"aria-label": "Next slide",
|
|
1202
1202
|
style: {
|
|
1203
|
-
...
|
|
1203
|
+
...Ye,
|
|
1204
1204
|
right: 12
|
|
1205
1205
|
},
|
|
1206
1206
|
onClick: () => b(y + 1),
|
|
@@ -1234,7 +1234,7 @@ function $e({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1234
1234
|
] })]
|
|
1235
1235
|
});
|
|
1236
1236
|
}
|
|
1237
|
-
var
|
|
1237
|
+
var $e = (e, t) => ({
|
|
1238
1238
|
position: "absolute",
|
|
1239
1239
|
inset: 0,
|
|
1240
1240
|
backgroundImage: e ? `url(${e})` : "none",
|
|
@@ -1242,18 +1242,18 @@ var et = (e, t) => ({
|
|
|
1242
1242
|
backgroundSize: "cover",
|
|
1243
1243
|
backgroundPosition: "center"
|
|
1244
1244
|
});
|
|
1245
|
-
function
|
|
1246
|
-
return e.length ? /* @__PURE__ */ u(
|
|
1245
|
+
function et({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
|
|
1246
|
+
return e.length ? /* @__PURE__ */ u(Qe, {
|
|
1247
1247
|
...r,
|
|
1248
1248
|
count: e.length,
|
|
1249
1249
|
renderSlide: (r) => {
|
|
1250
1250
|
let i = e[r];
|
|
1251
|
-
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style:
|
|
1251
|
+
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: $e(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
|
|
1252
1252
|
style: {
|
|
1253
1253
|
position: "absolute",
|
|
1254
1254
|
color: "#fff",
|
|
1255
1255
|
textAlign: n,
|
|
1256
|
-
...
|
|
1256
|
+
...Xe[t] ?? Xe.bottom
|
|
1257
1257
|
},
|
|
1258
1258
|
children: [i.title && /* @__PURE__ */ u("div", {
|
|
1259
1259
|
style: {
|
|
@@ -1273,13 +1273,13 @@ function tt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
|
|
|
1273
1273
|
}
|
|
1274
1274
|
}) : null;
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1277
|
-
return e.length ? /* @__PURE__ */ u(
|
|
1276
|
+
function tt({ slides: e = [], linked: t, ...n }) {
|
|
1277
|
+
return e.length ? /* @__PURE__ */ u(Qe, {
|
|
1278
1278
|
...n,
|
|
1279
1279
|
count: e.length,
|
|
1280
1280
|
renderSlide: (n) => {
|
|
1281
1281
|
let r = e[n];
|
|
1282
|
-
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style:
|
|
1282
|
+
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: $e(r.image, r.color) }), /* @__PURE__ */ u("div", {
|
|
1283
1283
|
style: {
|
|
1284
1284
|
position: "absolute",
|
|
1285
1285
|
inset: 0,
|
|
@@ -1291,7 +1291,7 @@ function nt({ slides: e = [], linked: t, ...n }) {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
}) : null;
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function nt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: a = !0, style: o, nodeRef: s, inert: f }) {
|
|
1295
1295
|
let p = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], m = Math.max(0, Number(n) || 0), h = f ? (e) => e.preventDefault() : void 0, [g, _] = c(null), v = a && !f && g !== null && p[g];
|
|
1296
1296
|
i(() => {
|
|
1297
1297
|
if (!v) return;
|
|
@@ -1490,19 +1490,19 @@ function rt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
|
|
|
1490
1490
|
]
|
|
1491
1491
|
});
|
|
1492
1492
|
}
|
|
1493
|
-
var
|
|
1493
|
+
var rt = {
|
|
1494
1494
|
color: "inherit",
|
|
1495
1495
|
textDecoration: "none",
|
|
1496
1496
|
fontSize: 14,
|
|
1497
1497
|
opacity: .85
|
|
1498
|
-
},
|
|
1498
|
+
}, it = {
|
|
1499
1499
|
background: "var(--page-surface, #f2f2f2)",
|
|
1500
1500
|
color: "var(--page-text, #111827)",
|
|
1501
1501
|
border: "1px solid rgba(148, 163, 184, 0.25)",
|
|
1502
1502
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
|
|
1503
1503
|
zIndex: 60
|
|
1504
1504
|
};
|
|
1505
|
-
function
|
|
1505
|
+
function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], style: s, nodeRef: f, menu: p = "auto", breakpoint: m = 768 }) {
|
|
1506
1506
|
let [h, g] = c(null), [_, v] = c(!1), [y, b] = c(!1), [x, S] = c(null);
|
|
1507
1507
|
i(() => {
|
|
1508
1508
|
if (!h) return;
|
|
@@ -1512,7 +1512,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1512
1512
|
let w = p === "hamburger" || p === "auto" && _, T = (e, t) => /* @__PURE__ */ d("a", {
|
|
1513
1513
|
href: e.href || "#",
|
|
1514
1514
|
style: {
|
|
1515
|
-
...
|
|
1515
|
+
...rt,
|
|
1516
1516
|
display: "block",
|
|
1517
1517
|
...t
|
|
1518
1518
|
},
|
|
@@ -1600,7 +1600,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1600
1600
|
let t = e.children ?? [];
|
|
1601
1601
|
if (!t.length) return /* @__PURE__ */ u("a", {
|
|
1602
1602
|
href: e.href || "#",
|
|
1603
|
-
style:
|
|
1603
|
+
style: rt,
|
|
1604
1604
|
children: e.label
|
|
1605
1605
|
}, e.key);
|
|
1606
1606
|
let n = e.type === "mega";
|
|
@@ -1614,7 +1614,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1614
1614
|
children: [/* @__PURE__ */ d("a", {
|
|
1615
1615
|
href: e.href || "#",
|
|
1616
1616
|
style: {
|
|
1617
|
-
...
|
|
1617
|
+
...rt,
|
|
1618
1618
|
cursor: "pointer"
|
|
1619
1619
|
},
|
|
1620
1620
|
children: [
|
|
@@ -1630,7 +1630,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1630
1630
|
]
|
|
1631
1631
|
}), x === e.key && (n ? /* @__PURE__ */ u("div", {
|
|
1632
1632
|
style: {
|
|
1633
|
-
...
|
|
1633
|
+
...it,
|
|
1634
1634
|
position: "absolute",
|
|
1635
1635
|
left: 0,
|
|
1636
1636
|
right: 0,
|
|
@@ -1646,7 +1646,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1646
1646
|
}))
|
|
1647
1647
|
}) : /* @__PURE__ */ u("div", {
|
|
1648
1648
|
style: {
|
|
1649
|
-
...
|
|
1649
|
+
...it,
|
|
1650
1650
|
position: "absolute",
|
|
1651
1651
|
top: "100%",
|
|
1652
1652
|
left: 0,
|
|
@@ -1675,7 +1675,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1675
1675
|
children: o.map((t) => /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u("a", {
|
|
1676
1676
|
href: t.href || "#",
|
|
1677
1677
|
style: {
|
|
1678
|
-
...
|
|
1678
|
+
...rt,
|
|
1679
1679
|
padding: "10px 4px",
|
|
1680
1680
|
fontWeight: (t.children ?? []).length ? 600 : 400,
|
|
1681
1681
|
opacity: 1
|
|
@@ -1686,7 +1686,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1686
1686
|
]
|
|
1687
1687
|
});
|
|
1688
1688
|
}
|
|
1689
|
-
function
|
|
1689
|
+
function ot({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
1690
1690
|
let [i, a] = c(0), o = e.length ? Math.min(i, e.length - 1) : 0;
|
|
1691
1691
|
return e.length ? /* @__PURE__ */ d("div", {
|
|
1692
1692
|
ref: r,
|
|
@@ -1726,7 +1726,7 @@ function st({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
|
1726
1726
|
}, e.key))]
|
|
1727
1727
|
}) : null;
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1729
|
+
function st({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
|
|
1730
1730
|
let [a, o] = c(() => new Set(e.length ? [e[0].key] : []));
|
|
1731
1731
|
if (!e.length) return null;
|
|
1732
1732
|
let s = (e) => o((t) => {
|
|
@@ -1783,15 +1783,15 @@ function ct({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
|
|
|
1783
1783
|
})
|
|
1784
1784
|
});
|
|
1785
1785
|
}
|
|
1786
|
-
var
|
|
1786
|
+
var ct = {
|
|
1787
1787
|
display: "flex",
|
|
1788
1788
|
flexDirection: "column",
|
|
1789
1789
|
gap: "12px"
|
|
1790
|
-
},
|
|
1790
|
+
}, X = {
|
|
1791
1791
|
fontSize: "14px",
|
|
1792
1792
|
fontWeight: 500,
|
|
1793
1793
|
color: "var(--page-text, #111827)"
|
|
1794
|
-
},
|
|
1794
|
+
}, Z = {
|
|
1795
1795
|
padding: "10px 12px",
|
|
1796
1796
|
border: "1px solid var(--page-border, #d1d5db)",
|
|
1797
1797
|
borderRadius: "6px",
|
|
@@ -1801,18 +1801,18 @@ var lt = {
|
|
|
1801
1801
|
boxSizing: "border-box",
|
|
1802
1802
|
backgroundColor: "var(--page-surface, #f2f2f2)",
|
|
1803
1803
|
color: "var(--page-text, #111827)"
|
|
1804
|
-
},
|
|
1804
|
+
}, lt = {
|
|
1805
1805
|
display: "flex",
|
|
1806
1806
|
alignItems: "center",
|
|
1807
1807
|
gap: "8px",
|
|
1808
1808
|
fontSize: "14px",
|
|
1809
1809
|
color: "var(--page-text, #111827)"
|
|
1810
|
-
},
|
|
1810
|
+
}, Q = (e) => e ? {
|
|
1811
1811
|
readOnly: !0,
|
|
1812
1812
|
tabIndex: -1,
|
|
1813
1813
|
onMouseDown: (e) => e.preventDefault()
|
|
1814
1814
|
} : {};
|
|
1815
|
-
function
|
|
1815
|
+
function ut(e, t) {
|
|
1816
1816
|
if (!e) return !0;
|
|
1817
1817
|
let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
|
|
1818
1818
|
switch (e.op) {
|
|
@@ -1826,11 +1826,11 @@ function dt(e, t) {
|
|
|
1826
1826
|
default: return !1;
|
|
1827
1827
|
}
|
|
1828
1828
|
}
|
|
1829
|
-
var
|
|
1829
|
+
var dt = {
|
|
1830
1830
|
display: "flex",
|
|
1831
1831
|
flexDirection: "column",
|
|
1832
1832
|
gap: 6
|
|
1833
|
-
},
|
|
1833
|
+
}, ft = {
|
|
1834
1834
|
font: "inherit",
|
|
1835
1835
|
fontSize: 15,
|
|
1836
1836
|
padding: "10px 12px",
|
|
@@ -1841,16 +1841,16 @@ var ft = {
|
|
|
1841
1841
|
width: "100%",
|
|
1842
1842
|
boxSizing: "border-box"
|
|
1843
1843
|
};
|
|
1844
|
-
function
|
|
1844
|
+
function pt(e, t) {
|
|
1845
1845
|
let n = Array.isArray(e?.options) ? e.options : [];
|
|
1846
1846
|
if (!e?.parentField) return n;
|
|
1847
1847
|
let r = t?.[e.parentField];
|
|
1848
1848
|
return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
|
|
1849
1849
|
}
|
|
1850
|
-
function
|
|
1850
|
+
function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
1851
1851
|
let a = /* @__PURE__ */ d("span", {
|
|
1852
1852
|
style: {
|
|
1853
|
-
...
|
|
1853
|
+
...X,
|
|
1854
1854
|
fontSize: 14
|
|
1855
1855
|
},
|
|
1856
1856
|
children: [e.label, e.required ? " *" : ""]
|
|
@@ -1859,7 +1859,7 @@ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1859
1859
|
required: e.required || void 0,
|
|
1860
1860
|
placeholder: e.placeholder || void 0,
|
|
1861
1861
|
disabled: r || void 0,
|
|
1862
|
-
style:
|
|
1862
|
+
style: ft,
|
|
1863
1863
|
value: t ?? "",
|
|
1864
1864
|
onChange: (t) => n(e.name, t.target.value)
|
|
1865
1865
|
};
|
|
@@ -1888,7 +1888,7 @@ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1888
1888
|
borderRadius: 8,
|
|
1889
1889
|
display: "block"
|
|
1890
1890
|
}
|
|
1891
|
-
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(
|
|
1891
|
+
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(We, {
|
|
1892
1892
|
url: e.src,
|
|
1893
1893
|
style: { width: "100%" }
|
|
1894
1894
|
}) : /* @__PURE__ */ u("video", {
|
|
@@ -1900,14 +1900,14 @@ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1900
1900
|
display: "block"
|
|
1901
1901
|
}
|
|
1902
1902
|
}) : null : /* @__PURE__ */ d("label", {
|
|
1903
|
-
style:
|
|
1903
|
+
style: dt,
|
|
1904
1904
|
children: [
|
|
1905
1905
|
a,
|
|
1906
1906
|
e.type === "textarea" || e.multiline ? /* @__PURE__ */ u("textarea", {
|
|
1907
1907
|
...o,
|
|
1908
1908
|
rows: 4,
|
|
1909
1909
|
style: {
|
|
1910
|
-
...
|
|
1910
|
+
...ft,
|
|
1911
1911
|
resize: "vertical"
|
|
1912
1912
|
}
|
|
1913
1913
|
}) : e.type === "select" ? /* @__PURE__ */ d("select", {
|
|
@@ -1916,7 +1916,7 @@ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1916
1916
|
children: [/* @__PURE__ */ u("option", {
|
|
1917
1917
|
value: "",
|
|
1918
1918
|
children: e.placeholder || "—"
|
|
1919
|
-
}),
|
|
1919
|
+
}), pt(e, i).map((e, t) => /* @__PURE__ */ u("option", {
|
|
1920
1920
|
value: typeof e == "string" ? e : e.value,
|
|
1921
1921
|
children: typeof e == "string" ? e : e.label ?? e.value
|
|
1922
1922
|
}, t))]
|
|
@@ -1963,8 +1963,8 @@ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1963
1963
|
]
|
|
1964
1964
|
});
|
|
1965
1965
|
}
|
|
1966
|
-
function
|
|
1967
|
-
let { tenant: y, apiUrl: b } = r(
|
|
1966
|
+
function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s, auto: f, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
|
|
1967
|
+
let { tenant: y, apiUrl: b } = r(U), [x, S] = c("form"), [w, T] = c(null), [E, D] = c({}), [O, k] = c(0), A = h ? v || "form" : x;
|
|
1968
1968
|
i(() => {
|
|
1969
1969
|
if (!f || !s) return;
|
|
1970
1970
|
let e = !0;
|
|
@@ -1985,9 +1985,9 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
1985
1985
|
section: e,
|
|
1986
1986
|
fields: []
|
|
1987
1987
|
}) : j[j.length - 1].fields.push(e);
|
|
1988
|
-
let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section ||
|
|
1988
|
+
let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || ut(e.section.condition, E)).map((e) => ({
|
|
1989
1989
|
...e,
|
|
1990
|
-
fields: e.fields.filter((e) =>
|
|
1990
|
+
fields: e.fields.filter((e) => ut(e.condition, E))
|
|
1991
1991
|
})), P = M.length > 1, F = Math.min(O, Math.max(0, N.length - 1)), I = P ? N[F]?.fields ?? [] : N.flatMap((e) => e.fields), L = I.filter((e) => {
|
|
1992
1992
|
let t = E[e.name];
|
|
1993
1993
|
return e.required && (t == null || t === "" || t === !1);
|
|
@@ -2045,11 +2045,11 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2045
2045
|
}
|
|
2046
2046
|
},
|
|
2047
2047
|
style: {
|
|
2048
|
-
...
|
|
2048
|
+
...ct,
|
|
2049
2049
|
display: A === "success" ? "none" : "flex"
|
|
2050
2050
|
},
|
|
2051
2051
|
children: f && s ? /* @__PURE__ */ d(l, { children: [
|
|
2052
|
-
P && /* @__PURE__ */ u(
|
|
2052
|
+
P && /* @__PURE__ */ u(Ht, {
|
|
2053
2053
|
steps: N.map((e) => ({ label: e.section?.label ?? "Start" })),
|
|
2054
2054
|
active: F + 1,
|
|
2055
2055
|
style: { marginBottom: 8 }
|
|
@@ -2062,7 +2062,7 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2062
2062
|
},
|
|
2063
2063
|
children: N[F].section.help
|
|
2064
2064
|
}),
|
|
2065
|
-
I.map((e) => /* @__PURE__ */ u(
|
|
2065
|
+
I.map((e) => /* @__PURE__ */ u(mt, {
|
|
2066
2066
|
field: e,
|
|
2067
2067
|
value: E[e.name],
|
|
2068
2068
|
values: E,
|
|
@@ -2081,7 +2081,7 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2081
2081
|
disabled: h || void 0,
|
|
2082
2082
|
onClick: () => k(F - 1),
|
|
2083
2083
|
style: {
|
|
2084
|
-
...
|
|
2084
|
+
...J,
|
|
2085
2085
|
background: "transparent",
|
|
2086
2086
|
color: "inherit",
|
|
2087
2087
|
border: 0,
|
|
@@ -2094,7 +2094,7 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2094
2094
|
disabled: h || L.length > 0,
|
|
2095
2095
|
onClick: () => k(F + 1),
|
|
2096
2096
|
style: {
|
|
2097
|
-
...
|
|
2097
|
+
...J,
|
|
2098
2098
|
border: 0,
|
|
2099
2099
|
padding: "10px 22px",
|
|
2100
2100
|
borderRadius: 8,
|
|
@@ -2108,7 +2108,7 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2108
2108
|
type: "submit",
|
|
2109
2109
|
disabled: h || void 0,
|
|
2110
2110
|
style: {
|
|
2111
|
-
...
|
|
2111
|
+
...J,
|
|
2112
2112
|
border: 0,
|
|
2113
2113
|
padding: "10px 22px",
|
|
2114
2114
|
borderRadius: 8,
|
|
@@ -2135,10 +2135,10 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2135
2135
|
]
|
|
2136
2136
|
});
|
|
2137
2137
|
}
|
|
2138
|
-
var
|
|
2138
|
+
var $ = null, gt = null, _t = (e) => {
|
|
2139
2139
|
let t = typeof e == "string" && e.trim() ? e.trim() : "";
|
|
2140
|
-
if (
|
|
2141
|
-
if (
|
|
2140
|
+
if ($ && gt === t) return $;
|
|
2141
|
+
if ($ && typeof window < "u") {
|
|
2142
2142
|
for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
|
|
2143
2143
|
delete window[e];
|
|
2144
2144
|
} catch {
|
|
@@ -2146,22 +2146,22 @@ var Q = null, _t = null, vt = (e) => {
|
|
|
2146
2146
|
}
|
|
2147
2147
|
document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
|
|
2148
2148
|
}
|
|
2149
|
-
return
|
|
2149
|
+
return gt = t, $ = new Promise((e) => {
|
|
2150
2150
|
if (typeof window > "u") return;
|
|
2151
2151
|
if (window.grecaptcha?.render) return e(window.grecaptcha);
|
|
2152
2152
|
window.__webimRecaptchaReady = () => e(window.grecaptcha);
|
|
2153
2153
|
let n = document.createElement("script");
|
|
2154
2154
|
n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
|
|
2155
|
-
}),
|
|
2155
|
+
}), $;
|
|
2156
2156
|
};
|
|
2157
|
-
function
|
|
2158
|
-
let p = r(
|
|
2157
|
+
function vt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert: l, onChange: f }) {
|
|
2158
|
+
let p = r(U), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", h = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), g = s(null), _ = s(f);
|
|
2159
2159
|
if (_.current = f, i(() => {
|
|
2160
2160
|
if (l || !h || !g.current) return;
|
|
2161
2161
|
let e = !0, r = (t) => {
|
|
2162
2162
|
e && typeof _.current == "function" && _.current(t);
|
|
2163
2163
|
};
|
|
2164
|
-
return
|
|
2164
|
+
return _t(a).then((i) => {
|
|
2165
2165
|
if (!(!e || !g.current || !i?.render)) {
|
|
2166
2166
|
g.current.innerHTML = "", r("");
|
|
2167
2167
|
try {
|
|
@@ -2243,17 +2243,17 @@ function yt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert:
|
|
|
2243
2243
|
children: /* @__PURE__ */ u("div", { ref: g })
|
|
2244
2244
|
}) : null;
|
|
2245
2245
|
}
|
|
2246
|
-
function
|
|
2246
|
+
function yt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
2247
2247
|
return /* @__PURE__ */ u("label", {
|
|
2248
2248
|
ref: r,
|
|
2249
2249
|
style: {
|
|
2250
|
-
...
|
|
2250
|
+
...X,
|
|
2251
2251
|
...C(n)
|
|
2252
2252
|
},
|
|
2253
|
-
children:
|
|
2253
|
+
children: Y(t, e, i)
|
|
2254
2254
|
});
|
|
2255
2255
|
}
|
|
2256
|
-
function
|
|
2256
|
+
function bt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2257
2257
|
return /* @__PURE__ */ u("input", {
|
|
2258
2258
|
ref: a,
|
|
2259
2259
|
type: e,
|
|
@@ -2261,13 +2261,13 @@ function xt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
|
|
|
2261
2261
|
placeholder: n,
|
|
2262
2262
|
required: !o && !!r,
|
|
2263
2263
|
style: {
|
|
2264
|
-
...
|
|
2264
|
+
...Z,
|
|
2265
2265
|
...C(i)
|
|
2266
2266
|
},
|
|
2267
|
-
...
|
|
2267
|
+
...Q(o)
|
|
2268
2268
|
});
|
|
2269
2269
|
}
|
|
2270
|
-
function
|
|
2270
|
+
function xt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2271
2271
|
return /* @__PURE__ */ u("textarea", {
|
|
2272
2272
|
ref: a,
|
|
2273
2273
|
name: e || void 0,
|
|
@@ -2275,18 +2275,18 @@ function St({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
|
|
|
2275
2275
|
rows: n,
|
|
2276
2276
|
required: !o && !!r,
|
|
2277
2277
|
style: {
|
|
2278
|
-
...
|
|
2278
|
+
...Z,
|
|
2279
2279
|
resize: "vertical",
|
|
2280
2280
|
...C(i)
|
|
2281
2281
|
},
|
|
2282
|
-
...
|
|
2282
|
+
...Q(o)
|
|
2283
2283
|
});
|
|
2284
2284
|
}
|
|
2285
|
-
function
|
|
2285
|
+
function St({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
|
|
2286
2286
|
return /* @__PURE__ */ d("label", {
|
|
2287
2287
|
ref: o,
|
|
2288
2288
|
style: {
|
|
2289
|
-
...
|
|
2289
|
+
...lt,
|
|
2290
2290
|
...C(a)
|
|
2291
2291
|
},
|
|
2292
2292
|
children: [/* @__PURE__ */ u("input", {
|
|
@@ -2303,7 +2303,7 @@ function Ct({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
|
|
|
2303
2303
|
}), t]
|
|
2304
2304
|
});
|
|
2305
2305
|
}
|
|
2306
|
-
function
|
|
2306
|
+
function Ct({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
|
|
2307
2307
|
return /* @__PURE__ */ d("select", {
|
|
2308
2308
|
ref: a,
|
|
2309
2309
|
name: e || void 0,
|
|
@@ -2312,7 +2312,7 @@ function wt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2312
2312
|
onMouseDown: o ? (e) => e.preventDefault() : void 0,
|
|
2313
2313
|
tabIndex: o ? -1 : void 0,
|
|
2314
2314
|
style: {
|
|
2315
|
-
...
|
|
2315
|
+
...Z,
|
|
2316
2316
|
appearance: "auto",
|
|
2317
2317
|
...C(i)
|
|
2318
2318
|
},
|
|
@@ -2326,12 +2326,12 @@ function wt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2326
2326
|
}, t))]
|
|
2327
2327
|
});
|
|
2328
2328
|
}
|
|
2329
|
-
function
|
|
2329
|
+
function wt({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
|
|
2330
2330
|
let [s, l] = c(null);
|
|
2331
2331
|
return /* @__PURE__ */ d("label", {
|
|
2332
2332
|
ref: a,
|
|
2333
2333
|
style: {
|
|
2334
|
-
...
|
|
2334
|
+
...Z,
|
|
2335
2335
|
display: "flex",
|
|
2336
2336
|
alignItems: "center",
|
|
2337
2337
|
gap: "8px",
|
|
@@ -2358,12 +2358,12 @@ function Tt({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
|
|
|
2358
2358
|
]
|
|
2359
2359
|
});
|
|
2360
2360
|
}
|
|
2361
|
-
function
|
|
2361
|
+
function Tt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
2362
2362
|
return /* @__PURE__ */ u("button", {
|
|
2363
2363
|
ref: n,
|
|
2364
2364
|
type: r ? "button" : "submit",
|
|
2365
2365
|
style: {
|
|
2366
|
-
...
|
|
2366
|
+
...J,
|
|
2367
2367
|
border: 0,
|
|
2368
2368
|
cursor: "pointer",
|
|
2369
2369
|
alignSelf: "flex-start",
|
|
@@ -2378,7 +2378,7 @@ function Et({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
|
2378
2378
|
children: e
|
|
2379
2379
|
});
|
|
2380
2380
|
}
|
|
2381
|
-
function
|
|
2381
|
+
function Et({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
2382
2382
|
let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
|
|
2383
2383
|
return /* @__PURE__ */ u("div", {
|
|
2384
2384
|
ref: r,
|
|
@@ -2395,8 +2395,8 @@ function Dt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
|
2395
2395
|
}, t))
|
|
2396
2396
|
});
|
|
2397
2397
|
}
|
|
2398
|
-
function
|
|
2399
|
-
let { tenant: v, apiUrl: y, locale: b } = r(
|
|
2398
|
+
function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, imageField: o, titleField: s = "name", textField: l, custom: f, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
|
|
2399
|
+
let { tenant: v, apiUrl: y, locale: b } = r(U), x = r(pe), S = r(W), [, w] = c(0);
|
|
2400
2400
|
i(() => {
|
|
2401
2401
|
if (typeof window > "u") return;
|
|
2402
2402
|
let e = () => w((e) => e + 1);
|
|
@@ -2404,7 +2404,7 @@ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2404
2404
|
window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
|
|
2405
2405
|
};
|
|
2406
2406
|
}, []);
|
|
2407
|
-
let T =
|
|
2407
|
+
let T = fe(h), E = JSON.stringify(T), D = E !== "{}" && !e?.startsWith?.("api:"), O = D ? null : S?.[e], k = m ? G(S) : 1, [A, j] = c(null);
|
|
2408
2408
|
if (i(() => {
|
|
2409
2409
|
if (!e || O) return;
|
|
2410
2410
|
let n = !0, r = new URLSearchParams();
|
|
@@ -2449,7 +2449,7 @@ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2449
2449
|
},
|
|
2450
2450
|
children: N.map((e) => /* @__PURE__ */ u("div", {
|
|
2451
2451
|
style: { minWidth: 0 },
|
|
2452
|
-
children: x.render(p, (t) =>
|
|
2452
|
+
children: x.render(p, (t) => ge(t, e))
|
|
2453
2453
|
}, e.id ?? e?.data?.slug))
|
|
2454
2454
|
}) : /* @__PURE__ */ u("div", {
|
|
2455
2455
|
ref: _,
|
|
@@ -2459,7 +2459,7 @@ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2459
2459
|
...C(g)
|
|
2460
2460
|
},
|
|
2461
2461
|
children: N.map((e) => {
|
|
2462
|
-
let t = o ?
|
|
2462
|
+
let t = o ? K(e?.data, o) : null, r = s ? q(K(e?.data, s)) : null, i = l ? K(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : q(i), f = n === "list";
|
|
2463
2463
|
return /* @__PURE__ */ d("div", {
|
|
2464
2464
|
style: {
|
|
2465
2465
|
display: "flex",
|
|
@@ -2506,7 +2506,7 @@ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2506
2506
|
lineHeight: 1.55,
|
|
2507
2507
|
opacity: .85
|
|
2508
2508
|
},
|
|
2509
|
-
children:
|
|
2509
|
+
children: Me(a)
|
|
2510
2510
|
})
|
|
2511
2511
|
]
|
|
2512
2512
|
})]
|
|
@@ -2514,8 +2514,8 @@ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2514
2514
|
})
|
|
2515
2515
|
});
|
|
2516
2516
|
}
|
|
2517
|
-
function
|
|
2518
|
-
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} :
|
|
2517
|
+
function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
|
|
2518
|
+
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : de(), s = {
|
|
2519
2519
|
height: 34,
|
|
2520
2520
|
padding: "0 12px",
|
|
2521
2521
|
borderRadius: 8,
|
|
@@ -2563,7 +2563,7 @@ function kt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2563
2563
|
name: `f_${e.name}`,
|
|
2564
2564
|
defaultValue: o[e.name] ?? "",
|
|
2565
2565
|
style: s,
|
|
2566
|
-
...
|
|
2566
|
+
...Q(i),
|
|
2567
2567
|
children: [/* @__PURE__ */ u("option", {
|
|
2568
2568
|
value: "",
|
|
2569
2569
|
children: e.label || e.name
|
|
@@ -2578,7 +2578,7 @@ function kt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2578
2578
|
name: `f_${e.name}`,
|
|
2579
2579
|
defaultValue: o[e.name] ?? "",
|
|
2580
2580
|
style: s,
|
|
2581
|
-
...
|
|
2581
|
+
...Q(i),
|
|
2582
2582
|
children: [
|
|
2583
2583
|
/* @__PURE__ */ u("option", {
|
|
2584
2584
|
value: "",
|
|
@@ -2599,7 +2599,7 @@ function kt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2599
2599
|
defaultValue: o[e.name] ?? "",
|
|
2600
2600
|
placeholder: e.label || e.name,
|
|
2601
2601
|
style: s,
|
|
2602
|
-
...
|
|
2602
|
+
...Q(i)
|
|
2603
2603
|
}, e.name)), /* @__PURE__ */ u("button", {
|
|
2604
2604
|
type: "submit",
|
|
2605
2605
|
style: {
|
|
@@ -2612,12 +2612,12 @@ function kt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2612
2612
|
fontWeight: 600,
|
|
2613
2613
|
cursor: i ? "default" : "pointer"
|
|
2614
2614
|
},
|
|
2615
|
-
...
|
|
2615
|
+
...Q(i),
|
|
2616
2616
|
children: t
|
|
2617
2617
|
})]
|
|
2618
2618
|
});
|
|
2619
2619
|
}
|
|
2620
|
-
function
|
|
2620
|
+
function kt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
2621
2621
|
return e.length ? /* @__PURE__ */ u("nav", {
|
|
2622
2622
|
ref: r,
|
|
2623
2623
|
"aria-label": "Breadcrumb",
|
|
@@ -2667,8 +2667,8 @@ function At({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
|
2667
2667
|
})
|
|
2668
2668
|
}) : null;
|
|
2669
2669
|
}
|
|
2670
|
-
function
|
|
2671
|
-
let { tenant: g, apiUrl: _ } = r(
|
|
2670
|
+
function At({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", source: o, pageSize: s = 6, align: l, hideEmpty: f, inert: p, style: m, nodeRef: h }) {
|
|
2671
|
+
let { tenant: g, apiUrl: _ } = r(U), v = r(W), [y, b] = c(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
|
|
2672
2672
|
i(() => {
|
|
2673
2673
|
if (!o || Number.isFinite(x)) return;
|
|
2674
2674
|
let e = !0, t = o.startsWith("api:") ? `${_}/data/${encodeURIComponent(o.slice(4))}` : `${_}/dynamic/${encodeURIComponent(o)}?limit=1`;
|
|
@@ -2687,7 +2687,7 @@ function jt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
|
|
|
2687
2687
|
]);
|
|
2688
2688
|
let S = Math.max(1, Number(s) || 6), w = Number.isFinite(x) ? x : y;
|
|
2689
2689
|
if (o && w === null || o && f && !(w > 0)) return null;
|
|
2690
|
-
let T = Math.min(Math.max(o ? Math.ceil(w / S) : Number(e) || 1, 1), 50), E = Math.min(Math.max(o ?
|
|
2690
|
+
let T = Math.min(Math.max(o ? Math.ceil(w / S) : Number(e) || 1, 1), 50), E = Math.min(Math.max(o ? G(v) : Number(t) || 1, 1), T), D = (e) => {
|
|
2691
2691
|
if (o) {
|
|
2692
2692
|
if (typeof window < "u") {
|
|
2693
2693
|
let t = new URLSearchParams(window.location.search);
|
|
@@ -2752,15 +2752,15 @@ function jt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
|
|
|
2752
2752
|
]
|
|
2753
2753
|
});
|
|
2754
2754
|
}
|
|
2755
|
-
var
|
|
2755
|
+
var jt = "webim.page_mode", Mt = () => {
|
|
2756
2756
|
if (typeof window > "u") return "auto";
|
|
2757
2757
|
try {
|
|
2758
|
-
let e = window.localStorage.getItem(
|
|
2758
|
+
let e = window.localStorage.getItem(jt);
|
|
2759
2759
|
return e === "light" || e === "dark" ? e : "auto";
|
|
2760
2760
|
} catch {
|
|
2761
2761
|
return "auto";
|
|
2762
2762
|
}
|
|
2763
|
-
},
|
|
2763
|
+
}, Nt = (e) => {
|
|
2764
2764
|
let t = {
|
|
2765
2765
|
width: 16,
|
|
2766
2766
|
height: 16,
|
|
@@ -2792,13 +2792,13 @@ var Mt = "webim.page_mode", Nt = () => {
|
|
|
2792
2792
|
rx: "2"
|
|
2793
2793
|
}), /* @__PURE__ */ u("path", { d: "M8 21h8M12 17v4" })]
|
|
2794
2794
|
});
|
|
2795
|
-
},
|
|
2795
|
+
}, Pt = {
|
|
2796
2796
|
light: "Light theme",
|
|
2797
2797
|
dark: "Dark theme",
|
|
2798
2798
|
auto: "Follow the device theme"
|
|
2799
2799
|
};
|
|
2800
2800
|
function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
2801
|
-
let [o, l] = c(a ? "auto" :
|
|
2801
|
+
let [o, l] = c(a ? "auto" : Mt), d = s(null), f = (e) => {
|
|
2802
2802
|
d.current = e, typeof r == "function" && r(e);
|
|
2803
2803
|
};
|
|
2804
2804
|
i(() => {
|
|
@@ -2806,7 +2806,7 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2806
2806
|
let e = d.current?.closest?.(".webim-page");
|
|
2807
2807
|
e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
|
|
2808
2808
|
try {
|
|
2809
|
-
o === "auto" ? window.localStorage.removeItem(
|
|
2809
|
+
o === "auto" ? window.localStorage.removeItem(jt) : window.localStorage.setItem(jt, o);
|
|
2810
2810
|
} catch {}
|
|
2811
2811
|
}, [o, a]);
|
|
2812
2812
|
let p = t === !1 ? ["light", "dark"] : [
|
|
@@ -2841,8 +2841,8 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2841
2841
|
},
|
|
2842
2842
|
children: p.map((e) => /* @__PURE__ */ u("button", {
|
|
2843
2843
|
type: "button",
|
|
2844
|
-
title:
|
|
2845
|
-
"aria-label":
|
|
2844
|
+
title: Pt[e],
|
|
2845
|
+
"aria-label": Pt[e],
|
|
2846
2846
|
"aria-pressed": e === m,
|
|
2847
2847
|
onClick: a ? void 0 : () => l(e),
|
|
2848
2848
|
style: {
|
|
@@ -2853,15 +2853,15 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2853
2853
|
background: e === m ? "var(--page-accent, #111827)" : "transparent",
|
|
2854
2854
|
opacity: e === m ? 1 : .7
|
|
2855
2855
|
},
|
|
2856
|
-
children:
|
|
2856
|
+
children: Nt(e)
|
|
2857
2857
|
}, e))
|
|
2858
2858
|
});
|
|
2859
2859
|
let g = p[(p.indexOf(m) + 1) % p.length];
|
|
2860
2860
|
return /* @__PURE__ */ u("button", {
|
|
2861
2861
|
ref: f,
|
|
2862
2862
|
type: "button",
|
|
2863
|
-
title:
|
|
2864
|
-
"aria-label": `Theme: ${
|
|
2863
|
+
title: Pt[m],
|
|
2864
|
+
"aria-label": `Theme: ${Pt[m]} — switch to ${Pt[g]}`,
|
|
2865
2865
|
onClick: a ? void 0 : () => l(g),
|
|
2866
2866
|
style: {
|
|
2867
2867
|
...h,
|
|
@@ -2870,10 +2870,125 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2870
2870
|
border: "1px solid rgba(148, 163, 184, 0.4)",
|
|
2871
2871
|
...C(n)
|
|
2872
2872
|
},
|
|
2873
|
-
children:
|
|
2873
|
+
children: Nt(m)
|
|
2874
|
+
});
|
|
2875
|
+
}
|
|
2876
|
+
function It(e) {
|
|
2877
|
+
let t = e?.parentElement;
|
|
2878
|
+
for (; t && t !== document.body;) {
|
|
2879
|
+
let e = getComputedStyle(t).overflowY;
|
|
2880
|
+
if ((e === "auto" || e === "scroll") && t.scrollHeight > t.clientHeight) return t;
|
|
2881
|
+
t = t.parentElement;
|
|
2882
|
+
}
|
|
2883
|
+
return window;
|
|
2884
|
+
}
|
|
2885
|
+
var Lt = (e) => e === window ? window.scrollY : e.scrollTop, Rt = {
|
|
2886
|
+
"bottom-right": (e) => ({
|
|
2887
|
+
right: e,
|
|
2888
|
+
bottom: e
|
|
2889
|
+
}),
|
|
2890
|
+
"bottom-left": (e) => ({
|
|
2891
|
+
left: e,
|
|
2892
|
+
bottom: e
|
|
2893
|
+
}),
|
|
2894
|
+
"bottom-center": (e) => ({
|
|
2895
|
+
left: "50%",
|
|
2896
|
+
bottom: e,
|
|
2897
|
+
transform: "translateX(-50%)"
|
|
2898
|
+
})
|
|
2899
|
+
};
|
|
2900
|
+
function zt({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth: o, bg: s, fg: l, style: f, nodeRef: p, inert: m, frame: h }) {
|
|
2901
|
+
let [g, _] = c(!!m), [v, y] = c(null), b = (e) => {
|
|
2902
|
+
y(e), typeof p == "function" && p(e);
|
|
2903
|
+
};
|
|
2904
|
+
i(() => {
|
|
2905
|
+
if (m) {
|
|
2906
|
+
_(!0);
|
|
2907
|
+
return;
|
|
2908
|
+
}
|
|
2909
|
+
if (!v) return;
|
|
2910
|
+
let e = It(v), t = Number(a) >= 0 ? Number(a) : 300, n = () => _(Lt(e) > t);
|
|
2911
|
+
return n(), e.addEventListener("scroll", n, { passive: !0 }), () => e.removeEventListener("scroll", n);
|
|
2912
|
+
}, [
|
|
2913
|
+
m,
|
|
2914
|
+
v,
|
|
2915
|
+
a
|
|
2916
|
+
]);
|
|
2917
|
+
let x = () => {
|
|
2918
|
+
if (m) return;
|
|
2919
|
+
let e = It(v), t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, n = o === !1 || t ? "auto" : "smooth";
|
|
2920
|
+
e === window ? window.scrollTo({
|
|
2921
|
+
top: 0,
|
|
2922
|
+
behavior: n
|
|
2923
|
+
}) : e.scrollTo({
|
|
2924
|
+
top: 0,
|
|
2925
|
+
behavior: n
|
|
2926
|
+
});
|
|
2927
|
+
}, S = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E = Rt[n] ? n : "bottom-right", D = h ? {
|
|
2928
|
+
position: "fixed",
|
|
2929
|
+
zIndex: 5,
|
|
2930
|
+
bottom: (h.bottom ?? 0) + S,
|
|
2931
|
+
...E === "bottom-left" ? { left: (h.left ?? 0) + S } : null,
|
|
2932
|
+
...E === "bottom-right" ? { right: (h.right ?? 0) + S } : null,
|
|
2933
|
+
...E === "bottom-center" ? {
|
|
2934
|
+
left: (h.left ?? 0) + (h.width ?? 0) / 2,
|
|
2935
|
+
transform: "translateX(-50%)"
|
|
2936
|
+
} : null
|
|
2937
|
+
} : {
|
|
2938
|
+
position: "fixed",
|
|
2939
|
+
zIndex: 2147482e3,
|
|
2940
|
+
...Rt[E](S)
|
|
2941
|
+
};
|
|
2942
|
+
return /* @__PURE__ */ d("button", {
|
|
2943
|
+
ref: b,
|
|
2944
|
+
type: "button",
|
|
2945
|
+
title: T,
|
|
2946
|
+
"aria-label": T,
|
|
2947
|
+
"aria-hidden": !g,
|
|
2948
|
+
tabIndex: g ? 0 : -1,
|
|
2949
|
+
onClick: x,
|
|
2950
|
+
style: {
|
|
2951
|
+
display: "inline-flex",
|
|
2952
|
+
alignItems: "center",
|
|
2953
|
+
justifyContent: "center",
|
|
2954
|
+
gap: w ? 8 : 0,
|
|
2955
|
+
appearance: "none",
|
|
2956
|
+
font: "inherit",
|
|
2957
|
+
fontSize: 14,
|
|
2958
|
+
fontWeight: 600,
|
|
2959
|
+
width: w ? "auto" : 44,
|
|
2960
|
+
height: 44,
|
|
2961
|
+
padding: w ? "0 18px" : 0,
|
|
2962
|
+
borderRadius: 999,
|
|
2963
|
+
border: "1px solid transparent",
|
|
2964
|
+
background: s || "var(--page-accent, #111827)",
|
|
2965
|
+
color: l || "var(--page-accent-text, #ffffff)",
|
|
2966
|
+
boxShadow: "0 6px 20px rgba(15, 23, 42, 0.25)",
|
|
2967
|
+
cursor: m ? "default" : "pointer",
|
|
2968
|
+
opacity: +!!g,
|
|
2969
|
+
pointerEvents: g ? "auto" : "none",
|
|
2970
|
+
transition: "opacity 160ms ease, transform 160ms ease",
|
|
2971
|
+
...D,
|
|
2972
|
+
...C(f),
|
|
2973
|
+
...D.transform ? { transform: D.transform } : null
|
|
2974
|
+
},
|
|
2975
|
+
children: [/* @__PURE__ */ u("svg", {
|
|
2976
|
+
width: "18",
|
|
2977
|
+
height: "18",
|
|
2978
|
+
viewBox: "0 0 24 24",
|
|
2979
|
+
fill: "none",
|
|
2980
|
+
"aria-hidden": "true",
|
|
2981
|
+
children: /* @__PURE__ */ u("path", {
|
|
2982
|
+
d: "M12 19V5M12 5l-7 7M12 5l7 7",
|
|
2983
|
+
stroke: "currentColor",
|
|
2984
|
+
strokeWidth: "2",
|
|
2985
|
+
strokeLinecap: "round",
|
|
2986
|
+
strokeLinejoin: "round"
|
|
2987
|
+
})
|
|
2988
|
+
}), w ? /* @__PURE__ */ u("span", { children: T }) : null]
|
|
2874
2989
|
});
|
|
2875
2990
|
}
|
|
2876
|
-
var
|
|
2991
|
+
var Bt = {
|
|
2877
2992
|
facebook: {
|
|
2878
2993
|
label: "Facebook",
|
|
2879
2994
|
color: "#1877f2",
|
|
@@ -2940,8 +3055,8 @@ var It = {
|
|
|
2940
3055
|
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"
|
|
2941
3056
|
}
|
|
2942
3057
|
};
|
|
2943
|
-
function
|
|
2944
|
-
let l = Array.isArray(e) ? e.filter((e) => e &&
|
|
3058
|
+
function Vt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
|
|
3059
|
+
let l = Array.isArray(e) ? e.filter((e) => e && Bt[e.network]) : [];
|
|
2945
3060
|
if (!l.length) return null;
|
|
2946
3061
|
let d = Math.min(Math.max(Number(r) || 18, 10), 64), f = Math.round(d * 1.9), p = Number.isFinite(Number(i)) ? Number(i) : 10, m = (e) => n === "accent" ? "var(--page-accent, #111827)" : n === "inherit" ? "currentColor" : e.color, h = c ? (e) => e.preventDefault() : void 0;
|
|
2947
3062
|
return /* @__PURE__ */ u("div", {
|
|
@@ -2954,7 +3069,7 @@ function Lt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
2954
3069
|
...C(o)
|
|
2955
3070
|
},
|
|
2956
3071
|
children: l.map((e, r) => {
|
|
2957
|
-
let i =
|
|
3072
|
+
let i = Bt[e.network], o = t !== "outline" && t !== "plain", s = o ? n === "accent" ? "var(--page-accent-text, #ffffff)" : n === "inherit" ? "var(--page-bg, #ffffff)" : "#ffffff" : m(i);
|
|
2958
3073
|
return /* @__PURE__ */ u("a", {
|
|
2959
3074
|
href: e.url || "#",
|
|
2960
3075
|
onClick: h,
|
|
@@ -2988,7 +3103,7 @@ function Lt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
2988
3103
|
})
|
|
2989
3104
|
});
|
|
2990
3105
|
}
|
|
2991
|
-
function
|
|
3106
|
+
function Ht({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
|
|
2992
3107
|
if (!t.length) return null;
|
|
2993
3108
|
let o = Math.min(Math.max(Number(n) || 1, 1), t.length), s = (e) => ({
|
|
2994
3109
|
width: 32,
|
|
@@ -3066,7 +3181,7 @@ function Rt({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
|
|
|
3066
3181
|
})
|
|
3067
3182
|
});
|
|
3068
3183
|
}
|
|
3069
|
-
var
|
|
3184
|
+
var Ut = {
|
|
3070
3185
|
small: {
|
|
3071
3186
|
w: 132,
|
|
3072
3187
|
h: 46,
|
|
@@ -3088,10 +3203,10 @@ var zt = {
|
|
|
3088
3203
|
title: 12.5,
|
|
3089
3204
|
avatar: 46
|
|
3090
3205
|
}
|
|
3091
|
-
},
|
|
3092
|
-
|
|
3093
|
-
function
|
|
3094
|
-
let r =
|
|
3206
|
+
}, Wt = (e) => Ut[e] ?? Ut.medium;
|
|
3207
|
+
Ut.medium.w, Ut.medium.h;
|
|
3208
|
+
function Gt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
3209
|
+
let r = Wt(t), i = n ? r.h : r.w, a = n ? 16 : 20, o = (n ? r.w : r.h) + (n ? 56 : 48), s = Array.isArray(e) ? e.filter((e) => e && e.id) : [], c = new Set(s.map((e) => e.id)), l = /* @__PURE__ */ new Map(), u = [];
|
|
3095
3210
|
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);
|
|
3096
3211
|
let d = /* @__PURE__ */ new Map(), f = (e, t) => {
|
|
3097
3212
|
if (t.has(e.id)) return 0;
|
|
@@ -3143,19 +3258,19 @@ function Vt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
|
3143
3258
|
horizontal: n
|
|
3144
3259
|
};
|
|
3145
3260
|
}
|
|
3146
|
-
var
|
|
3261
|
+
var Kt = (e, t) => {
|
|
3147
3262
|
let n = String(e ?? "");
|
|
3148
3263
|
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
3149
|
-
},
|
|
3264
|
+
}, qt = (e) => {
|
|
3150
3265
|
let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
|
|
3151
3266
|
if (!t) return "#ffffff";
|
|
3152
3267
|
let n = t[1];
|
|
3153
3268
|
n.length === 3 && (n = [...n].map((e) => e + e).join(""));
|
|
3154
3269
|
let r = parseInt(n, 16);
|
|
3155
3270
|
return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
|
|
3156
|
-
},
|
|
3157
|
-
function
|
|
3158
|
-
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 ? "" :
|
|
3271
|
+
}, Jt = (e) => !!(e?.cv?.trim?.() || e?.photo);
|
|
3272
|
+
function Yt(e, t = {}) {
|
|
3273
|
+
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);
|
|
3159
3274
|
return n.map((e) => {
|
|
3160
3275
|
let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
|
|
3161
3276
|
return {
|
|
@@ -3169,11 +3284,11 @@ function Gt(e, t = {}) {
|
|
|
3169
3284
|
};
|
|
3170
3285
|
});
|
|
3171
3286
|
}
|
|
3172
|
-
var
|
|
3287
|
+
var Xt = {
|
|
3173
3288
|
size: 36,
|
|
3174
3289
|
pad: 10
|
|
3175
3290
|
};
|
|
3176
|
-
function
|
|
3291
|
+
function Zt({ node: e, onClose: t }) {
|
|
3177
3292
|
return i(() => {
|
|
3178
3293
|
let e = (e) => e.key === "Escape" && t();
|
|
3179
3294
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
@@ -3294,8 +3409,8 @@ function qt({ node: e, onClose: t }) {
|
|
|
3294
3409
|
})
|
|
3295
3410
|
});
|
|
3296
3411
|
}
|
|
3297
|
-
function
|
|
3298
|
-
let b = a(), [x, S] = c(null), { tenant: w, apiUrl: T } = r(
|
|
3412
|
+
function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField: s, parentField: f, cvField: p, hrefField: m, size: h = "medium", horizontal: g = !1, style: _, nodeRef: v, interactive: y = !0 }) {
|
|
3413
|
+
let b = a(), [x, S] = c(null), { tenant: w, apiUrl: T } = r(U), E = r(W)?.[t], [D, O] = c(null);
|
|
3299
3414
|
i(() => {
|
|
3300
3415
|
if (!t || E) return;
|
|
3301
3416
|
let e = !0;
|
|
@@ -3311,14 +3426,14 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3311
3426
|
T,
|
|
3312
3427
|
E
|
|
3313
3428
|
]);
|
|
3314
|
-
let k = t ?
|
|
3429
|
+
let k = t ? Yt(E ?? D ?? [], {
|
|
3315
3430
|
nameField: n,
|
|
3316
3431
|
titleField: o,
|
|
3317
3432
|
photoField: s,
|
|
3318
3433
|
parentField: f,
|
|
3319
3434
|
cvField: p,
|
|
3320
3435
|
hrefField: m
|
|
3321
|
-
}) : e, A =
|
|
3436
|
+
}) : e, A = Wt(h), { boxes: j, links: M, width: N, height: P } = Gt(k, {
|
|
3322
3437
|
size: h,
|
|
3323
3438
|
horizontal: g
|
|
3324
3439
|
});
|
|
@@ -3364,7 +3479,7 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3364
3479
|
stroke: "rgba(148, 163, 184, 0.7)",
|
|
3365
3480
|
strokeWidth: "1.5"
|
|
3366
3481
|
}, t)), j.map(({ node: e, x: t, y: n }) => {
|
|
3367
|
-
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 ?
|
|
3482
|
+
let r = F.has(e.id), i = !!e.color2, a = !!e.color || r || i, o = e.color || (r ? "var(--page-accent, #4f46e5)" : "var(--page-bg, #ffffff)"), s = e.color ? qt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? qt(e.color2) : s, f = y && (Jt(e) || e.href), p = () => Jt(e) ? S(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Xt.pad + A.avatar + 8 : t + A.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((A.w - A.avatar - 26) / 7) : Math.floor(A.w / 7.6), _ = A.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
|
|
3368
3483
|
return /* @__PURE__ */ d("g", {
|
|
3369
3484
|
onClick: f ? p : void 0,
|
|
3370
3485
|
style: f ? { cursor: "pointer" } : void 0,
|
|
@@ -3428,13 +3543,13 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3428
3543
|
e.photo && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("clipPath", {
|
|
3429
3544
|
id: `${b}-${e.id}`,
|
|
3430
3545
|
children: /* @__PURE__ */ u("circle", {
|
|
3431
|
-
cx: t +
|
|
3546
|
+
cx: t + Xt.pad + A.avatar / 2,
|
|
3432
3547
|
cy: n + A.h / 2,
|
|
3433
3548
|
r: A.avatar / 2
|
|
3434
3549
|
})
|
|
3435
3550
|
}), /* @__PURE__ */ u("image", {
|
|
3436
3551
|
href: e.photo,
|
|
3437
|
-
x: t +
|
|
3552
|
+
x: t + Xt.pad,
|
|
3438
3553
|
y: n + (A.h - A.avatar) / 2,
|
|
3439
3554
|
width: A.avatar,
|
|
3440
3555
|
height: A.avatar,
|
|
@@ -3448,7 +3563,7 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3448
3563
|
fontSize: A.title,
|
|
3449
3564
|
fontWeight: "600",
|
|
3450
3565
|
fill: s,
|
|
3451
|
-
children:
|
|
3566
|
+
children: Kt(e.title, g + 4)
|
|
3452
3567
|
}), e.name && /* @__PURE__ */ u("text", {
|
|
3453
3568
|
x: m,
|
|
3454
3569
|
y: n + _ + _ / 2 + A.name * .35,
|
|
@@ -3456,7 +3571,7 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3456
3571
|
fontSize: A.name,
|
|
3457
3572
|
fontWeight: "600",
|
|
3458
3573
|
fill: c,
|
|
3459
|
-
children:
|
|
3574
|
+
children: Kt(e.name, g)
|
|
3460
3575
|
})] }) : /* @__PURE__ */ d(l, { children: [v[0] && /* @__PURE__ */ u("text", {
|
|
3461
3576
|
x: m,
|
|
3462
3577
|
y: n + (v[1] ? A.h * .43 : A.h * .57),
|
|
@@ -3464,7 +3579,7 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3464
3579
|
fontSize: A.name,
|
|
3465
3580
|
fontWeight: "600",
|
|
3466
3581
|
fill: s,
|
|
3467
|
-
children:
|
|
3582
|
+
children: Kt(v[0], g)
|
|
3468
3583
|
}), v[1] && /* @__PURE__ */ u("text", {
|
|
3469
3584
|
x: m,
|
|
3470
3585
|
y: n + A.h * .73,
|
|
@@ -3472,19 +3587,19 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3472
3587
|
fontSize: A.title,
|
|
3473
3588
|
opacity: "0.7",
|
|
3474
3589
|
fill: s,
|
|
3475
|
-
children:
|
|
3590
|
+
children: Kt(v[1], g + 4)
|
|
3476
3591
|
})] })
|
|
3477
3592
|
]
|
|
3478
3593
|
}, e.id);
|
|
3479
3594
|
})]
|
|
3480
|
-
}), x && /* @__PURE__ */ u(
|
|
3595
|
+
}), x && /* @__PURE__ */ u(Zt, {
|
|
3481
3596
|
node: x,
|
|
3482
3597
|
onClose: () => S(null)
|
|
3483
3598
|
})]
|
|
3484
3599
|
});
|
|
3485
3600
|
}
|
|
3486
|
-
function
|
|
3487
|
-
let { tenant: g, apiUrl: _ } = r(
|
|
3601
|
+
function $t({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped: o = !0, bordered: s = !1, compact: l = !1, paged: f, emptyText: p, style: m, nodeRef: h }) {
|
|
3602
|
+
let { tenant: g, apiUrl: _ } = r(U), v = r(W), y = v?.[n], b = f ? G(v) : 1, [x, S] = c(null);
|
|
3488
3603
|
if (i(() => {
|
|
3489
3604
|
if (!n || y) return;
|
|
3490
3605
|
let e = !0, t = Math.max(1, Number(a) || 10), r = f && !n.startsWith("api:") ? `?offset=${(b - 1) * t}&limit=${t}` : "", i = n.startsWith("api:") ? `${_}/data/${encodeURIComponent(n.slice(4))}` : `${_}/dynamic/${encodeURIComponent(n)}${r}`;
|
|
@@ -3503,7 +3618,7 @@ function Yt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
|
|
|
3503
3618
|
b,
|
|
3504
3619
|
a
|
|
3505
3620
|
]), !e.length) return null;
|
|
3506
|
-
let w = Math.max(1, Number(a) || 10), T = n ? f ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * w, b * w) : (x ?? []).slice(0, w) : (y ?? x ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => K(
|
|
3621
|
+
let w = Math.max(1, Number(a) || 10), T = n ? f ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * w, b * w) : (x ?? []).slice(0, w) : (y ?? x ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => q(K(t?.data, e.field)))) : t, D = !!n && !(n && !y && x === null) && E.length === 0, O = l ? "6px 10px" : "10px 14px", k = "1px solid rgba(148, 163, 184, 0.35)", A = s ? { border: k } : { borderBottom: k };
|
|
3507
3622
|
return /* @__PURE__ */ u("div", {
|
|
3508
3623
|
ref: h,
|
|
3509
3624
|
style: {
|
|
@@ -3549,79 +3664,80 @@ function Yt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
|
|
|
3549
3664
|
})
|
|
3550
3665
|
});
|
|
3551
3666
|
}
|
|
3552
|
-
var
|
|
3553
|
-
PageRoot:
|
|
3554
|
-
Section:
|
|
3555
|
-
Container:
|
|
3556
|
-
Heading:
|
|
3557
|
-
TextBlock:
|
|
3558
|
-
ButtonBlock:
|
|
3559
|
-
ImageBlock:
|
|
3560
|
-
Spacer:
|
|
3561
|
-
Divider:
|
|
3562
|
-
SliderBlock:
|
|
3563
|
-
CanvasSlider:
|
|
3564
|
-
TabsBlock:
|
|
3565
|
-
QuickStack:
|
|
3566
|
-
CollectionList:
|
|
3567
|
-
CollectionSearch:
|
|
3568
|
-
BreadcrumbsBlock:
|
|
3569
|
-
PaginationBlock:
|
|
3570
|
-
StepperBlock:
|
|
3571
|
-
SocialLinksBlock:
|
|
3667
|
+
var en = {
|
|
3668
|
+
PageRoot: Ce,
|
|
3669
|
+
Section: we,
|
|
3670
|
+
Container: Te,
|
|
3671
|
+
Heading: Ee,
|
|
3672
|
+
TextBlock: Le,
|
|
3673
|
+
ButtonBlock: Be,
|
|
3674
|
+
ImageBlock: Ve,
|
|
3675
|
+
Spacer: qe,
|
|
3676
|
+
Divider: Je,
|
|
3677
|
+
SliderBlock: et,
|
|
3678
|
+
CanvasSlider: tt,
|
|
3679
|
+
TabsBlock: ot,
|
|
3680
|
+
QuickStack: Et,
|
|
3681
|
+
CollectionList: Dt,
|
|
3682
|
+
CollectionSearch: Ot,
|
|
3683
|
+
BreadcrumbsBlock: kt,
|
|
3684
|
+
PaginationBlock: At,
|
|
3685
|
+
StepperBlock: Ht,
|
|
3686
|
+
SocialLinksBlock: Vt,
|
|
3572
3687
|
ThemeModeBlock: Ft,
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3688
|
+
ScrollTopBlock: zt,
|
|
3689
|
+
OrgChartBlock: Qt,
|
|
3690
|
+
TableBlock: $t,
|
|
3691
|
+
MasonryBlock: nt,
|
|
3692
|
+
AccordionBlock: st,
|
|
3693
|
+
NavbarBlock: at,
|
|
3694
|
+
ListBlock: Ie,
|
|
3695
|
+
TextSpan: ke,
|
|
3696
|
+
QuoteBlock: Fe,
|
|
3697
|
+
TextLink: ze,
|
|
3698
|
+
RichTextBlock: Ne,
|
|
3699
|
+
RichContentBlock: Ne,
|
|
3700
|
+
VideoBlock: He,
|
|
3701
|
+
YouTubeBlock: We,
|
|
3702
|
+
IframeBlock: Ge,
|
|
3703
|
+
EmbedBlock: Ke,
|
|
3704
|
+
FormBlock: ht,
|
|
3705
|
+
FormLabel: yt,
|
|
3706
|
+
FormInput: bt,
|
|
3707
|
+
FormTextarea: xt,
|
|
3708
|
+
FormCheckbox: (e) => /* @__PURE__ */ u(St, {
|
|
3593
3709
|
kind: "checkbox",
|
|
3594
3710
|
...e
|
|
3595
3711
|
}),
|
|
3596
|
-
FormRadio: (e) => /* @__PURE__ */ u(
|
|
3712
|
+
FormRadio: (e) => /* @__PURE__ */ u(St, {
|
|
3597
3713
|
kind: "radio",
|
|
3598
3714
|
...e
|
|
3599
3715
|
}),
|
|
3600
|
-
FormSelect:
|
|
3601
|
-
FormFile:
|
|
3602
|
-
FormRecaptcha:
|
|
3603
|
-
FormSubmit:
|
|
3604
|
-
},
|
|
3716
|
+
FormSelect: Ct,
|
|
3717
|
+
FormFile: wt,
|
|
3718
|
+
FormRecaptcha: vt,
|
|
3719
|
+
FormSubmit: Tt
|
|
3720
|
+
}, tn = {
|
|
3605
3721
|
id: "auth",
|
|
3606
3722
|
label: "Accounts",
|
|
3607
3723
|
category: "Apps",
|
|
3608
3724
|
keys: ["SiteLoginForm", "SiteAccountMenu"],
|
|
3609
3725
|
ssr: "shell",
|
|
3610
3726
|
settings: ["site.authRedirect"]
|
|
3611
|
-
},
|
|
3727
|
+
}, nn = t({
|
|
3612
3728
|
user: null,
|
|
3613
3729
|
status: "idle",
|
|
3614
3730
|
ensure: () => {},
|
|
3615
3731
|
refresh: () => {},
|
|
3616
3732
|
signOut: () => {}
|
|
3617
|
-
}),
|
|
3618
|
-
let e = r(
|
|
3733
|
+
}), rn = () => {
|
|
3734
|
+
let e = r(nn);
|
|
3619
3735
|
return i(() => {
|
|
3620
3736
|
e.ensure();
|
|
3621
3737
|
}, [e]), e;
|
|
3622
3738
|
};
|
|
3623
|
-
function
|
|
3624
|
-
let d = r(
|
|
3739
|
+
function an({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l }) {
|
|
3740
|
+
let d = r(U), f = a || d?.apiUrl || "/api", p = l || d?.tenant || "", [m, h] = c(t ?? null), [g, _] = c(t ? "user" : i ? "guest" : "idle"), v = s(!1), y = n((e, t) => fetch(`${f}${e}`, {
|
|
3625
3741
|
...t,
|
|
3626
3742
|
credentials: "include",
|
|
3627
3743
|
headers: {
|
|
@@ -3653,19 +3769,19 @@ function en({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l })
|
|
|
3653
3769
|
b,
|
|
3654
3770
|
x
|
|
3655
3771
|
]);
|
|
3656
|
-
return /* @__PURE__ */ u(
|
|
3772
|
+
return /* @__PURE__ */ u(nn.Provider, {
|
|
3657
3773
|
value: C,
|
|
3658
3774
|
children: e
|
|
3659
3775
|
});
|
|
3660
3776
|
}
|
|
3661
|
-
function
|
|
3662
|
-
let { status: n } =
|
|
3777
|
+
function on({ when: e, children: t }) {
|
|
3778
|
+
let { status: n } = rn();
|
|
3663
3779
|
return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
|
|
3664
3780
|
}
|
|
3665
3781
|
//#endregion
|
|
3666
3782
|
//#region ../ui/src/components/builder/apps/auth/views.jsx
|
|
3667
|
-
function
|
|
3668
|
-
let { tenant: h, apiUrl: g, settings: _ } = r(
|
|
3783
|
+
function sn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordLabel: i = "Password", nameLabel: a = "Name", submitLabel: o, style: s, nodeRef: l, inert: f, linked: p, show: m }) {
|
|
3784
|
+
let { tenant: h, apiUrl: g, settings: _ } = r(U), [v, y] = c("form"), [b, x] = c(""), [S, w] = c(!1), T = e === "register", E = f ? m || "form" : v, D = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", O = async (e) => {
|
|
3669
3785
|
if (e.preventDefault(), f) return;
|
|
3670
3786
|
let n = new FormData(e.currentTarget);
|
|
3671
3787
|
w(!0), x("");
|
|
@@ -3713,20 +3829,20 @@ function nn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3713
3829
|
children: [
|
|
3714
3830
|
T ? /* @__PURE__ */ d("label", {
|
|
3715
3831
|
style: {
|
|
3716
|
-
...
|
|
3832
|
+
...X,
|
|
3717
3833
|
display: "grid",
|
|
3718
3834
|
gap: 6
|
|
3719
3835
|
},
|
|
3720
3836
|
children: [a, /* @__PURE__ */ u("input", {
|
|
3721
3837
|
name: "name",
|
|
3722
3838
|
type: "text",
|
|
3723
|
-
style:
|
|
3724
|
-
...
|
|
3839
|
+
style: Z,
|
|
3840
|
+
...Q(f)
|
|
3725
3841
|
})]
|
|
3726
3842
|
}) : null,
|
|
3727
3843
|
/* @__PURE__ */ d("label", {
|
|
3728
3844
|
style: {
|
|
3729
|
-
...
|
|
3845
|
+
...X,
|
|
3730
3846
|
display: "grid",
|
|
3731
3847
|
gap: 6
|
|
3732
3848
|
},
|
|
@@ -3734,13 +3850,13 @@ function nn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3734
3850
|
name: "email",
|
|
3735
3851
|
type: "email",
|
|
3736
3852
|
required: !f,
|
|
3737
|
-
style:
|
|
3738
|
-
...
|
|
3853
|
+
style: Z,
|
|
3854
|
+
...Q(f)
|
|
3739
3855
|
})]
|
|
3740
3856
|
}),
|
|
3741
3857
|
/* @__PURE__ */ d("label", {
|
|
3742
3858
|
style: {
|
|
3743
|
-
...
|
|
3859
|
+
...X,
|
|
3744
3860
|
display: "grid",
|
|
3745
3861
|
gap: 6
|
|
3746
3862
|
},
|
|
@@ -3748,15 +3864,15 @@ function nn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3748
3864
|
name: "password",
|
|
3749
3865
|
type: "password",
|
|
3750
3866
|
required: !f,
|
|
3751
|
-
style:
|
|
3752
|
-
...
|
|
3867
|
+
style: Z,
|
|
3868
|
+
...Q(f)
|
|
3753
3869
|
})]
|
|
3754
3870
|
}),
|
|
3755
3871
|
/* @__PURE__ */ u("button", {
|
|
3756
3872
|
type: f ? "button" : "submit",
|
|
3757
3873
|
disabled: S || void 0,
|
|
3758
3874
|
style: {
|
|
3759
|
-
...
|
|
3875
|
+
...J,
|
|
3760
3876
|
border: 0,
|
|
3761
3877
|
padding: "10px 22px",
|
|
3762
3878
|
borderRadius: 8,
|
|
@@ -3788,8 +3904,8 @@ function nn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3788
3904
|
]
|
|
3789
3905
|
});
|
|
3790
3906
|
}
|
|
3791
|
-
function
|
|
3792
|
-
let { user: c, status: l, signOut: f } =
|
|
3907
|
+
function cn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
|
|
3908
|
+
let { user: c, status: l, signOut: f } = rn(), p = a ? s || "user" : l, m = a ? {
|
|
3793
3909
|
name: "Ada Lovelace",
|
|
3794
3910
|
email: "ada@example.com"
|
|
3795
3911
|
} : c;
|
|
@@ -3810,7 +3926,7 @@ function rn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3810
3926
|
children: [
|
|
3811
3927
|
/* @__PURE__ */ d("span", {
|
|
3812
3928
|
style: {
|
|
3813
|
-
...
|
|
3929
|
+
...X,
|
|
3814
3930
|
fontWeight: 600
|
|
3815
3931
|
},
|
|
3816
3932
|
children: [
|
|
@@ -3821,7 +3937,7 @@ function rn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3821
3937
|
}),
|
|
3822
3938
|
n && m?.email ? /* @__PURE__ */ u("span", {
|
|
3823
3939
|
style: {
|
|
3824
|
-
...
|
|
3940
|
+
...X,
|
|
3825
3941
|
opacity: .7
|
|
3826
3942
|
},
|
|
3827
3943
|
children: m.email
|
|
@@ -3830,14 +3946,14 @@ function rn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3830
3946
|
type: "button",
|
|
3831
3947
|
onClick: a ? void 0 : f,
|
|
3832
3948
|
style: {
|
|
3833
|
-
...
|
|
3949
|
+
...J,
|
|
3834
3950
|
border: 0,
|
|
3835
3951
|
padding: "8px 16px",
|
|
3836
3952
|
borderRadius: 8,
|
|
3837
3953
|
fontSize: 14,
|
|
3838
3954
|
cursor: a ? "default" : "pointer"
|
|
3839
3955
|
},
|
|
3840
|
-
...
|
|
3956
|
+
...Q(a),
|
|
3841
3957
|
children: t
|
|
3842
3958
|
})
|
|
3843
3959
|
]
|
|
@@ -3853,8 +3969,157 @@ function rn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3853
3969
|
});
|
|
3854
3970
|
}
|
|
3855
3971
|
//#endregion
|
|
3972
|
+
//#region ../ui/src/components/builder/apps/consent/manifest.js
|
|
3973
|
+
var ln = {
|
|
3974
|
+
id: "consent",
|
|
3975
|
+
label: "Cookie consent",
|
|
3976
|
+
category: "Apps",
|
|
3977
|
+
keys: ["CookieConsent"],
|
|
3978
|
+
ssr: "shell",
|
|
3979
|
+
settings: []
|
|
3980
|
+
}, un = "webim.cookie_consent";
|
|
3981
|
+
function dn() {
|
|
3982
|
+
try {
|
|
3983
|
+
let e = window.localStorage.getItem(un), t = e ? JSON.parse(e) : null;
|
|
3984
|
+
return t?.choice === "accepted" || t?.choice === "declined" ? t.choice : "";
|
|
3985
|
+
} catch {
|
|
3986
|
+
return "";
|
|
3987
|
+
}
|
|
3988
|
+
}
|
|
3989
|
+
function fn(e) {
|
|
3990
|
+
try {
|
|
3991
|
+
document.querySelectorAll(".webim-page").forEach((t) => t.setAttribute("data-webim-consent", e));
|
|
3992
|
+
} catch {}
|
|
3993
|
+
}
|
|
3994
|
+
function pn(e) {
|
|
3995
|
+
try {
|
|
3996
|
+
window.localStorage.setItem(un, JSON.stringify({
|
|
3997
|
+
choice: e,
|
|
3998
|
+
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
3999
|
+
}));
|
|
4000
|
+
} catch {}
|
|
4001
|
+
fn(e);
|
|
4002
|
+
try {
|
|
4003
|
+
window.dispatchEvent(new CustomEvent("webim:consent", { detail: { choice: e } }));
|
|
4004
|
+
} catch {}
|
|
4005
|
+
}
|
|
4006
|
+
var mn = {
|
|
4007
|
+
bottom: {
|
|
4008
|
+
left: 0,
|
|
4009
|
+
right: 0,
|
|
4010
|
+
bottom: 0
|
|
4011
|
+
},
|
|
4012
|
+
top: {
|
|
4013
|
+
left: 0,
|
|
4014
|
+
right: 0,
|
|
4015
|
+
top: 0
|
|
4016
|
+
},
|
|
4017
|
+
"bottom-left": {
|
|
4018
|
+
left: 16,
|
|
4019
|
+
bottom: 16,
|
|
4020
|
+
maxWidth: 400
|
|
4021
|
+
},
|
|
4022
|
+
"bottom-right": {
|
|
4023
|
+
right: 16,
|
|
4024
|
+
bottom: 16,
|
|
4025
|
+
maxWidth: 400
|
|
4026
|
+
}
|
|
4027
|
+
};
|
|
4028
|
+
function hn({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: a, linkHref: o, position: s, linked: f, style: p, nodeRef: m, inert: h }) {
|
|
4029
|
+
let [g, _] = c(!!h), [v, y] = c(null), b = (e) => {
|
|
4030
|
+
y(e), typeof m == "function" && m(e);
|
|
4031
|
+
};
|
|
4032
|
+
if (i(() => {
|
|
4033
|
+
if (h) return;
|
|
4034
|
+
let e = dn();
|
|
4035
|
+
if (e) {
|
|
4036
|
+
let t = v?.closest?.(".webim-page");
|
|
4037
|
+
t && t.setAttribute("data-webim-consent", e);
|
|
4038
|
+
} else _(!0);
|
|
4039
|
+
}, [h, v]), !g) return null;
|
|
4040
|
+
let x = (e) => () => {
|
|
4041
|
+
h || (pn(e, v), _(!1));
|
|
4042
|
+
}, S = mn[s] ?? mn.bottom, w = {
|
|
4043
|
+
appearance: "none",
|
|
4044
|
+
font: "inherit",
|
|
4045
|
+
fontSize: 14,
|
|
4046
|
+
fontWeight: 600,
|
|
4047
|
+
padding: "8px 16px",
|
|
4048
|
+
borderRadius: 8,
|
|
4049
|
+
cursor: h ? "default" : "pointer",
|
|
4050
|
+
whiteSpace: "nowrap"
|
|
4051
|
+
};
|
|
4052
|
+
return /* @__PURE__ */ d("div", {
|
|
4053
|
+
ref: b,
|
|
4054
|
+
role: "region",
|
|
4055
|
+
"aria-label": "Cookie consent",
|
|
4056
|
+
style: {
|
|
4057
|
+
...h ? { position: "relative" } : {
|
|
4058
|
+
position: "fixed",
|
|
4059
|
+
zIndex: 2147483e3,
|
|
4060
|
+
...S
|
|
4061
|
+
},
|
|
4062
|
+
display: "flex",
|
|
4063
|
+
flexWrap: "wrap",
|
|
4064
|
+
alignItems: "center",
|
|
4065
|
+
gap: 12,
|
|
4066
|
+
padding: 16,
|
|
4067
|
+
background: "var(--page-surface, #f2f2f2)",
|
|
4068
|
+
color: "var(--page-text, #111827)",
|
|
4069
|
+
border: "1px solid var(--page-border, rgba(148, 163, 184, 0.4))",
|
|
4070
|
+
borderRadius: s === "bottom" || s === "top" ? 0 : 12,
|
|
4071
|
+
boxShadow: "0 8px 30px rgba(15, 23, 42, 0.18)",
|
|
4072
|
+
fontSize: 14,
|
|
4073
|
+
lineHeight: 1.5,
|
|
4074
|
+
...C(p)
|
|
4075
|
+
},
|
|
4076
|
+
children: [/* @__PURE__ */ d("div", {
|
|
4077
|
+
style: {
|
|
4078
|
+
flex: "1 1 260px",
|
|
4079
|
+
minWidth: 0
|
|
4080
|
+
},
|
|
4081
|
+
children: [f?.content ?? (e || "We use cookies to run this site and to understand how it is used."), a && o ? /* @__PURE__ */ d(l, { children: [" ", /* @__PURE__ */ u("a", {
|
|
4082
|
+
href: o,
|
|
4083
|
+
onClick: h ? (e) => e.preventDefault() : void 0,
|
|
4084
|
+
style: {
|
|
4085
|
+
color: "var(--page-accent, inherit)",
|
|
4086
|
+
textDecoration: "underline"
|
|
4087
|
+
},
|
|
4088
|
+
children: a
|
|
4089
|
+
})] }) : null]
|
|
4090
|
+
}), /* @__PURE__ */ d("div", {
|
|
4091
|
+
style: {
|
|
4092
|
+
display: "flex",
|
|
4093
|
+
gap: 8,
|
|
4094
|
+
flexShrink: 0
|
|
4095
|
+
},
|
|
4096
|
+
children: [r === !1 ? null : /* @__PURE__ */ u("button", {
|
|
4097
|
+
type: "button",
|
|
4098
|
+
onClick: x("declined"),
|
|
4099
|
+
style: {
|
|
4100
|
+
...w,
|
|
4101
|
+
background: "transparent",
|
|
4102
|
+
color: "inherit",
|
|
4103
|
+
border: "1px solid var(--page-border, rgba(148, 163, 184, 0.6))"
|
|
4104
|
+
},
|
|
4105
|
+
children: n || "Decline"
|
|
4106
|
+
}), /* @__PURE__ */ u("button", {
|
|
4107
|
+
type: "button",
|
|
4108
|
+
onClick: x("accepted"),
|
|
4109
|
+
style: {
|
|
4110
|
+
...w,
|
|
4111
|
+
background: "var(--page-accent, #111827)",
|
|
4112
|
+
color: "var(--page-accent-text, #ffffff)",
|
|
4113
|
+
border: "1px solid transparent"
|
|
4114
|
+
},
|
|
4115
|
+
children: t || "Accept"
|
|
4116
|
+
})]
|
|
4117
|
+
})]
|
|
4118
|
+
});
|
|
4119
|
+
}
|
|
4120
|
+
//#endregion
|
|
3856
4121
|
//#region ../ui/src/components/builder/apps/language/manifest.js
|
|
3857
|
-
var
|
|
4122
|
+
var gn = {
|
|
3858
4123
|
id: "language",
|
|
3859
4124
|
label: "Language",
|
|
3860
4125
|
category: "Apps",
|
|
@@ -3864,21 +4129,21 @@ var an = {
|
|
|
3864
4129
|
};
|
|
3865
4130
|
//#endregion
|
|
3866
4131
|
//#region ../ui/src/components/builder/apps/language/views.jsx
|
|
3867
|
-
function
|
|
4132
|
+
function _n(e) {
|
|
3868
4133
|
let t = e?.locales, n = [typeof t?.default == "string" && t.default.trim() ? t.default.trim() : "", ...Array.isArray(t?.enabled) ? t.enabled : []].filter((e) => typeof e == "string" && e.trim());
|
|
3869
4134
|
return [...new Set(n.map((e) => e.trim()))];
|
|
3870
4135
|
}
|
|
3871
|
-
var
|
|
3872
|
-
function
|
|
4136
|
+
var vn = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
|
|
4137
|
+
function yn(e, t) {
|
|
3873
4138
|
let n = String(e ?? "").toUpperCase();
|
|
3874
4139
|
if (t === "code") return n;
|
|
3875
4140
|
let r = "";
|
|
3876
4141
|
try {
|
|
3877
|
-
r =
|
|
4142
|
+
r = vn(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
|
|
3878
4143
|
} catch {}
|
|
3879
4144
|
return !r || r.toUpperCase() === n ? n : t === "both" ? `${n} — ${r}` : r;
|
|
3880
4145
|
}
|
|
3881
|
-
function
|
|
4146
|
+
function bn(e, t) {
|
|
3882
4147
|
let n = t ? "" : `?locale=${encodeURIComponent(e)}`;
|
|
3883
4148
|
if (typeof window > "u") return n || "?";
|
|
3884
4149
|
try {
|
|
@@ -3888,8 +4153,8 @@ function ln(e, t) {
|
|
|
3888
4153
|
return n || "/";
|
|
3889
4154
|
}
|
|
3890
4155
|
}
|
|
3891
|
-
function
|
|
3892
|
-
let c = r(
|
|
4156
|
+
function xn({ variant: e, display: t, separator: n, label: i, style: a, nodeRef: o, inert: s }) {
|
|
4157
|
+
let c = r(U), l = _n(c?.settings), f = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : f, m = {
|
|
3893
4158
|
display: "inline-flex",
|
|
3894
4159
|
alignItems: "center",
|
|
3895
4160
|
gap: 8,
|
|
@@ -3924,7 +4189,7 @@ function un({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
|
|
|
3924
4189
|
style: { opacity: .4 },
|
|
3925
4190
|
children: n ?? "·"
|
|
3926
4191
|
}), /* @__PURE__ */ u("a", {
|
|
3927
|
-
href:
|
|
4192
|
+
href: bn(e, e === f),
|
|
3928
4193
|
hrefLang: e,
|
|
3929
4194
|
"aria-current": e === p ? "true" : void 0,
|
|
3930
4195
|
onClick: s ? (e) => e.preventDefault() : void 0,
|
|
@@ -3934,7 +4199,7 @@ function un({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
|
|
|
3934
4199
|
textDecoration: "none",
|
|
3935
4200
|
cursor: s ? "default" : "pointer"
|
|
3936
4201
|
},
|
|
3937
|
-
children:
|
|
4202
|
+
children: yn(e, t)
|
|
3938
4203
|
})]
|
|
3939
4204
|
}, e))]
|
|
3940
4205
|
}) : /* @__PURE__ */ d("div", {
|
|
@@ -3945,7 +4210,7 @@ function un({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
|
|
|
3945
4210
|
value: p,
|
|
3946
4211
|
onChange: s ? void 0 : (e) => {
|
|
3947
4212
|
let t = e.target.value;
|
|
3948
|
-
window.location.assign(
|
|
4213
|
+
window.location.assign(bn(t, t === f));
|
|
3949
4214
|
},
|
|
3950
4215
|
onKeyDown: s ? (e) => e.preventDefault() : void 0,
|
|
3951
4216
|
style: {
|
|
@@ -3959,50 +4224,55 @@ function un({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
|
|
|
3959
4224
|
},
|
|
3960
4225
|
children: l.map((e) => /* @__PURE__ */ u("option", {
|
|
3961
4226
|
value: e,
|
|
3962
|
-
children:
|
|
4227
|
+
children: yn(e, t)
|
|
3963
4228
|
}, e))
|
|
3964
4229
|
})]
|
|
3965
4230
|
});
|
|
3966
4231
|
}
|
|
3967
4232
|
//#endregion
|
|
3968
4233
|
//#region ../ui/src/components/builder/apps/index.js
|
|
3969
|
-
var
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
4234
|
+
var Sn = [
|
|
4235
|
+
tn,
|
|
4236
|
+
gn,
|
|
4237
|
+
ln
|
|
4238
|
+
], Cn = {
|
|
4239
|
+
SiteLoginForm: sn,
|
|
4240
|
+
SiteAccountMenu: cn,
|
|
4241
|
+
SiteLanguagePicker: xn,
|
|
4242
|
+
CookieConsent: hn
|
|
3973
4243
|
};
|
|
3974
|
-
new Set(
|
|
4244
|
+
new Set(Sn.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
|
|
3975
4245
|
//#endregion
|
|
3976
4246
|
//#region ../ui/src/components/builder/plugins/runtime.js
|
|
3977
|
-
var
|
|
3978
|
-
function
|
|
3979
|
-
if (
|
|
4247
|
+
var wn = /* @__PURE__ */ new Map();
|
|
4248
|
+
function Tn(e) {
|
|
4249
|
+
if (wn.has(e)) return wn.get(e);
|
|
3980
4250
|
let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
|
|
3981
4251
|
/* @vite-ignore */
|
|
3982
4252
|
/* webpackIgnore: true */
|
|
3983
4253
|
t
|
|
3984
4254
|
).finally(() => URL.revokeObjectURL(t));
|
|
3985
|
-
return
|
|
4255
|
+
return wn.set(e, n), n;
|
|
3986
4256
|
}
|
|
3987
|
-
function
|
|
4257
|
+
function En(e) {
|
|
3988
4258
|
let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
|
|
3989
4259
|
return n && typeof n == "object" ? n : {};
|
|
3990
4260
|
}
|
|
3991
4261
|
//#endregion
|
|
3992
4262
|
//#region ../ui/src/components/builder/plugins/view.jsx
|
|
3993
|
-
async function
|
|
3994
|
-
let n = await
|
|
4263
|
+
async function Dn(e, t) {
|
|
4264
|
+
let n = await Tn(e);
|
|
3995
4265
|
return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
|
|
3996
4266
|
}
|
|
3997
|
-
var
|
|
4267
|
+
var On = {
|
|
3998
4268
|
padding: "10px 12px",
|
|
3999
4269
|
border: "1px dashed rgba(148, 163, 184, 0.5)",
|
|
4000
4270
|
borderRadius: 8,
|
|
4001
4271
|
fontSize: 12,
|
|
4002
4272
|
opacity: .6
|
|
4003
4273
|
};
|
|
4004
|
-
function
|
|
4005
|
-
let c = r(
|
|
4274
|
+
function kn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
4275
|
+
let c = r(U), l = En(c?.settings)[e], f = s(null), p = s(null), m = {
|
|
4006
4276
|
tenant: c?.tenant ?? "",
|
|
4007
4277
|
apiUrl: c?.apiUrl ?? "/api",
|
|
4008
4278
|
locale: c?.locale ?? "",
|
|
@@ -4014,7 +4284,7 @@ function vn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
4014
4284
|
let e = f.current;
|
|
4015
4285
|
if (!l?.code || !e) return;
|
|
4016
4286
|
let n = !0;
|
|
4017
|
-
return
|
|
4287
|
+
return Dn(l.code, t).then((e) => {
|
|
4018
4288
|
if (!(!n || !e || !f.current)) {
|
|
4019
4289
|
p.current = e;
|
|
4020
4290
|
try {
|
|
@@ -4044,7 +4314,7 @@ function vn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
4044
4314
|
}) : /* @__PURE__ */ d("div", {
|
|
4045
4315
|
ref: o,
|
|
4046
4316
|
style: {
|
|
4047
|
-
...
|
|
4317
|
+
...On,
|
|
4048
4318
|
...C(a)
|
|
4049
4319
|
},
|
|
4050
4320
|
children: [
|
|
@@ -4056,12 +4326,12 @@ function vn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
4056
4326
|
}
|
|
4057
4327
|
//#endregion
|
|
4058
4328
|
//#region ../ui/src/components/builder/render.jsx
|
|
4059
|
-
var
|
|
4060
|
-
...
|
|
4061
|
-
...
|
|
4062
|
-
PluginBlock:
|
|
4329
|
+
var An = {
|
|
4330
|
+
...en,
|
|
4331
|
+
...Cn,
|
|
4332
|
+
PluginBlock: kn
|
|
4063
4333
|
};
|
|
4064
|
-
function
|
|
4334
|
+
function jn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
4065
4335
|
let o = n[t];
|
|
4066
4336
|
if (!o || o.hidden) return null;
|
|
4067
4337
|
let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
|
|
@@ -4069,11 +4339,11 @@ function bn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
4069
4339
|
let n = o.props?.componentId, s = r?.[n];
|
|
4070
4340
|
if (!s?.template || i.has(n)) return null;
|
|
4071
4341
|
let c = new Set(i).add(n);
|
|
4072
|
-
return /* @__PURE__ */ u(e, { children:
|
|
4342
|
+
return /* @__PURE__ */ u(e, { children: jn(s.template.rootId, s.template.nodes, r, c, a) }, t);
|
|
4073
4343
|
}
|
|
4074
|
-
let l =
|
|
4344
|
+
let l = An[s];
|
|
4075
4345
|
if (!l) return null;
|
|
4076
|
-
let d = (o.nodes ?? []).map((e) =>
|
|
4346
|
+
let d = (o.nodes ?? []).map((e) => jn(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, jn(t, n, r, i)])) : void 0, m = /* @__PURE__ */ u(l, {
|
|
4077
4347
|
...c,
|
|
4078
4348
|
...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
|
|
4079
4349
|
linked: p,
|
|
@@ -4082,16 +4352,16 @@ function bn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
4082
4352
|
},
|
|
4083
4353
|
children: d.length ? d : void 0
|
|
4084
4354
|
}, t);
|
|
4085
|
-
return c.when && c.when !== "always" ? /* @__PURE__ */ u(
|
|
4355
|
+
return c.when && c.when !== "always" ? /* @__PURE__ */ u(on, {
|
|
4086
4356
|
when: c.when,
|
|
4087
4357
|
children: m
|
|
4088
4358
|
}, t) : m;
|
|
4089
4359
|
}
|
|
4090
4360
|
//#endregion
|
|
4091
4361
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
4092
|
-
var
|
|
4362
|
+
var Mn = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Nn = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(V(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
|
|
4093
4363
|
.webim-page[data-webim-mode="dark"] { ${Object.entries(V(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
|
|
4094
|
-
function
|
|
4364
|
+
function Pn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, custom: s, tenant: c, apiUrl: l, datasets: f, locale: p, direction: m, settings: h, siteUser: _ }) {
|
|
4095
4365
|
let v = s?.js?.trim();
|
|
4096
4366
|
if (i(() => {
|
|
4097
4367
|
if (!v) return;
|
|
@@ -4100,28 +4370,28 @@ function Cn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
4100
4370
|
}, [v]), !e?.ROOT) return null;
|
|
4101
4371
|
let b = {
|
|
4102
4372
|
lang: p || void 0,
|
|
4103
|
-
dir:
|
|
4373
|
+
dir: ue(m, p)
|
|
4104
4374
|
}, x = ".webim-page, .webim-page *, .webim-page *::before, .webim-page *::after { box-sizing: border-box; }", S = {
|
|
4105
4375
|
minHeight: "100%",
|
|
4106
4376
|
display: "flex",
|
|
4107
4377
|
flexDirection: "column"
|
|
4108
|
-
}, C =
|
|
4378
|
+
}, C = jn("ROOT", e, n), w = o(() => ({ render: (t, r) => jn(t, e, n, void 0, { mapProps: r }) }), [e, n]), T = F(e, n), E = P(e, n), D = s?.css?.trim(), O = B(t), k = [O.font, O.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !z[e]), A = [.../* @__PURE__ */ new Set([...y(e, n), ...k])].map((e) => /* @__PURE__ */ u("link", {
|
|
4109
4379
|
rel: "stylesheet",
|
|
4110
4380
|
precedence: "default",
|
|
4111
4381
|
href: g(e)
|
|
4112
|
-
}, e)), j =
|
|
4113
|
-
return r === "auto" ? /* @__PURE__ */ u(
|
|
4382
|
+
}, e)), j = Nn(O);
|
|
4383
|
+
return r === "auto" ? /* @__PURE__ */ u(U.Provider, {
|
|
4114
4384
|
value: {
|
|
4115
4385
|
tenant: c || "",
|
|
4116
4386
|
apiUrl: l || "/api",
|
|
4117
4387
|
locale: p || "",
|
|
4118
4388
|
settings: h ?? null
|
|
4119
4389
|
},
|
|
4120
|
-
children: /* @__PURE__ */ u(
|
|
4390
|
+
children: /* @__PURE__ */ u(an, {
|
|
4121
4391
|
initialUser: _,
|
|
4122
|
-
children: /* @__PURE__ */ u(
|
|
4392
|
+
children: /* @__PURE__ */ u(W.Provider, {
|
|
4123
4393
|
value: f ?? null,
|
|
4124
|
-
children: /* @__PURE__ */ u(
|
|
4394
|
+
children: /* @__PURE__ */ u(pe.Provider, {
|
|
4125
4395
|
value: w,
|
|
4126
4396
|
children: /* @__PURE__ */ d("div", {
|
|
4127
4397
|
...b,
|
|
@@ -4132,8 +4402,8 @@ function Cn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
4132
4402
|
...a
|
|
4133
4403
|
},
|
|
4134
4404
|
children: [
|
|
4135
|
-
/* @__PURE__ */ u("style", { children: `.webim-page { ${
|
|
4136
|
-
@media (prefers-color-scheme: dark) { .webim-page { ${
|
|
4405
|
+
/* @__PURE__ */ u("style", { children: `.webim-page { ${Mn(V(O.light))} }
|
|
4406
|
+
@media (prefers-color-scheme: dark) { .webim-page { ${Mn(V(O.dark))} } }` }),
|
|
4137
4407
|
/* @__PURE__ */ u("style", { children: j }),
|
|
4138
4408
|
A,
|
|
4139
4409
|
/* @__PURE__ */ u("style", { children: x }),
|
|
@@ -4146,18 +4416,18 @@ function Cn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
4146
4416
|
})
|
|
4147
4417
|
})
|
|
4148
4418
|
})
|
|
4149
|
-
}) : /* @__PURE__ */ u(
|
|
4419
|
+
}) : /* @__PURE__ */ u(U.Provider, {
|
|
4150
4420
|
value: {
|
|
4151
4421
|
tenant: c || "",
|
|
4152
4422
|
apiUrl: l || "/api",
|
|
4153
4423
|
locale: p || "",
|
|
4154
4424
|
settings: h ?? null
|
|
4155
4425
|
},
|
|
4156
|
-
children: /* @__PURE__ */ u(
|
|
4426
|
+
children: /* @__PURE__ */ u(an, {
|
|
4157
4427
|
initialUser: _,
|
|
4158
|
-
children: /* @__PURE__ */ u(
|
|
4428
|
+
children: /* @__PURE__ */ u(W.Provider, {
|
|
4159
4429
|
value: f ?? null,
|
|
4160
|
-
children: /* @__PURE__ */ u(
|
|
4430
|
+
children: /* @__PURE__ */ u(pe.Provider, {
|
|
4161
4431
|
value: w,
|
|
4162
4432
|
children: /* @__PURE__ */ d("div", {
|
|
4163
4433
|
...b,
|
|
@@ -4184,8 +4454,8 @@ function Cn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
4184
4454
|
}
|
|
4185
4455
|
//#endregion
|
|
4186
4456
|
//#region src/WebimContent.jsx
|
|
4187
|
-
function
|
|
4188
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ u(
|
|
4457
|
+
function Fn({ bundle: e, mode: t = "auto", style: n }) {
|
|
4458
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ u(Pn, {
|
|
4189
4459
|
blocks: e.blocks,
|
|
4190
4460
|
theme: e.theme,
|
|
4191
4461
|
components: e.components,
|
|
@@ -4202,7 +4472,7 @@ function wn({ bundle: e, mode: t = "auto", style: n }) {
|
|
|
4202
4472
|
}
|
|
4203
4473
|
//#endregion
|
|
4204
4474
|
//#region src/WebimPage.jsx
|
|
4205
|
-
function
|
|
4475
|
+
function In({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mode: l = "auto", style: d, fallback: f = null, errorFallback: p = null, onLoad: m, onError: h }) {
|
|
4206
4476
|
let [g, _] = c({ status: "loading" }), v = s({
|
|
4207
4477
|
onLoad: m,
|
|
4208
4478
|
onError: h
|
|
@@ -4212,7 +4482,7 @@ function Tn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
|
|
|
4212
4482
|
onError: h
|
|
4213
4483
|
}, i(() => {
|
|
4214
4484
|
let i = !0;
|
|
4215
|
-
return _({ status: "loading" }),
|
|
4485
|
+
return _({ status: "loading" }), se({
|
|
4216
4486
|
apiUrl: e,
|
|
4217
4487
|
tenant: t,
|
|
4218
4488
|
slug: n,
|
|
@@ -4239,11 +4509,11 @@ function Tn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
|
|
|
4239
4509
|
r,
|
|
4240
4510
|
a,
|
|
4241
4511
|
o
|
|
4242
|
-
]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(
|
|
4512
|
+
]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(Fn, {
|
|
4243
4513
|
bundle: g.bundle,
|
|
4244
4514
|
mode: l,
|
|
4245
4515
|
style: d
|
|
4246
4516
|
});
|
|
4247
4517
|
}
|
|
4248
4518
|
//#endregion
|
|
4249
|
-
export {
|
|
4519
|
+
export { Pn as PageRenderer, Fn as WebimContent, In as WebimPage, se as fetchPage, Me as renderRichContent, ie as resolveTheme };
|