webim-adapter 0.27.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/webim-adapter.js +477 -462
- package/build/webim-embed.js +11 -11
- package/build/webim-ssr.js +467 -452
- package/package.json +1 -1
package/build/webim-ssr.js
CHANGED
|
@@ -223,36 +223,36 @@ function D(e) {
|
|
|
223
223
|
color: j,
|
|
224
224
|
inset: M
|
|
225
225
|
})), N.length && (t.boxShadow = N.join(", "));
|
|
226
|
-
let P = (e) => e.type === "blur" ? `blur(${T(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${f(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, F = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(P), { filters: ee, backdropFilters: te, filterBlur: ne, filterGrayscale: re, filterBrightness:
|
|
226
|
+
let P = (e) => e.type === "blur" ? `blur(${T(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${f(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, F = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(P), { filters: ee, backdropFilters: te, filterBlur: ne, filterGrayscale: re, filterBrightness: ie, filterContrast: I, filterSaturate: L } = t;
|
|
227
227
|
delete t.filters, delete t.backdropFilters, delete t.filterBlur, delete t.filterGrayscale, delete t.filterBrightness, delete t.filterContrast, delete t.filterSaturate;
|
|
228
228
|
let R = F(ee);
|
|
229
|
-
ne !== void 0 && R.push(`blur(${T(ne)})`), re !== void 0 && R.push(`grayscale(${re}%)`),
|
|
230
|
-
let
|
|
231
|
-
|
|
232
|
-
let { textStrokeWidth:
|
|
233
|
-
delete t.textStrokeWidth, delete t.textStrokeColor, (
|
|
234
|
-
let { clipText:
|
|
235
|
-
delete t.clipText,
|
|
236
|
-
let { transitions:
|
|
229
|
+
ne !== void 0 && R.push(`blur(${T(ne)})`), re !== void 0 && R.push(`grayscale(${re}%)`), ie !== void 0 && R.push(`brightness(${ie}%)`), I !== void 0 && R.push(`contrast(${I}%)`), L !== void 0 && R.push(`saturate(${L}%)`), R.length && (t.filter = R.join(" "));
|
|
230
|
+
let z = F(te);
|
|
231
|
+
z.length && (t.backdropFilter = z.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
|
|
232
|
+
let { textStrokeWidth: ae, textStrokeColor: oe } = t;
|
|
233
|
+
delete t.textStrokeWidth, delete t.textStrokeColor, (ae !== void 0 || oe !== void 0) && (t.WebkitTextStroke = `${T(ae ?? 1)} ${oe || "currentColor"}`);
|
|
234
|
+
let { clipText: se } = t;
|
|
235
|
+
delete t.clipText, se && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
|
|
236
|
+
let { transitions: B, transitionDuration: ce, transitionEasing: le, transitionProperty: ue } = t, de = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
|
|
237
237
|
delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
|
|
238
|
-
let
|
|
239
|
-
if (ce !== void 0 &&
|
|
238
|
+
let V = (Array.isArray(B) ? B : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${de(e.duration ?? 200)} ${e.easing || "ease"}`);
|
|
239
|
+
if (ce !== void 0 && V.push(`${ue || "all"} ${de(ce)} ${le || "ease"}`), V.length && (t.transition = V.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
|
|
240
240
|
let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
|
|
241
241
|
t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
|
|
242
242
|
}
|
|
243
243
|
delete t.backgroundVideo;
|
|
244
|
-
let { overlayColor:
|
|
245
|
-
if (delete t.overlayColor, delete t.overlayOpacity,
|
|
246
|
-
let e = `color-mix(in srgb, ${
|
|
244
|
+
let { overlayColor: H, overlayOpacity: fe } = t;
|
|
245
|
+
if (delete t.overlayColor, delete t.overlayOpacity, H) {
|
|
246
|
+
let e = `color-mix(in srgb, ${H} ${fe ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
|
|
247
247
|
t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
|
|
248
248
|
}
|
|
249
249
|
t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
|
|
250
|
-
let { backgroundLayers:
|
|
250
|
+
let { backgroundLayers: pe } = t;
|
|
251
251
|
delete t.backgroundLayers;
|
|
252
|
-
let
|
|
253
|
-
if (
|
|
252
|
+
let me = (Array.isArray(pe) ? pe : []).filter((e) => e && e.on !== !1);
|
|
253
|
+
if (me.length) {
|
|
254
254
|
let e = [], n = [], r = [], i = [], a = [];
|
|
255
|
-
for (let t of
|
|
255
|
+
for (let t of me) 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");
|
|
256
256
|
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");
|
|
257
257
|
else {
|
|
258
258
|
if (!t.src) continue;
|
|
@@ -273,26 +273,30 @@ var O = {
|
|
|
273
273
|
"data-wb",
|
|
274
274
|
"data-wb-class",
|
|
275
275
|
"data-slot"
|
|
276
|
-
]), A = (e) => /^[a-zA-Z_][\w-]*$/.test(e) && !/^on/i.test(e) && !k.has(e.toLowerCase());
|
|
277
|
-
function
|
|
276
|
+
]), A = (e) => /^[a-zA-Z_][\w-]*$/.test(e) && !/^on/i.test(e) && !k.has(e.toLowerCase()), j = (e) => [...new Set(String(e ?? "").split(/\s+/).map((e) => e.replace(/^\./, "")).filter((e) => /^-?[_a-zA-Z][\w-]*$/.test(e)))];
|
|
277
|
+
function M(e, t, n = []) {
|
|
278
278
|
t.htmlId ? e.id = t.htmlId : e.removeAttribute("id");
|
|
279
|
+
let r = j(t.classNames), i = j(e.getAttribute("data-wb-class"));
|
|
280
|
+
for (let t of i) r.includes(t) || e.classList.remove(t);
|
|
281
|
+
for (let t of r) e.classList.add(t);
|
|
282
|
+
r.length ? e.setAttribute("data-wb-class", r.join(" ")) : e.removeAttribute("data-wb-class");
|
|
279
283
|
for (let t of n) e.removeAttribute(t);
|
|
280
|
-
let
|
|
284
|
+
let a = [];
|
|
281
285
|
for (let n of t.attributes ?? []) {
|
|
282
286
|
let t = String(n?.name ?? "").trim();
|
|
283
|
-
A(t) && (e.setAttribute(t, n.value ?? ""),
|
|
287
|
+
A(t) && (e.setAttribute(t, n.value ?? ""), a.push(t));
|
|
284
288
|
}
|
|
285
|
-
return
|
|
289
|
+
return a;
|
|
286
290
|
}
|
|
287
|
-
var
|
|
288
|
-
function
|
|
289
|
-
let i = Object.entries(D(t)).map(([e, t]) => `${
|
|
291
|
+
var N = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
292
|
+
function P(e, t, n, r = !1) {
|
|
293
|
+
let i = Object.entries(D(t)).map(([e, t]) => `${N(e)}: ${t} !important;`).join(" ");
|
|
290
294
|
return i ? `[data-wb="${e}"]${r ? "" : n} { ${i} }` : "";
|
|
291
295
|
}
|
|
292
|
-
function
|
|
293
|
-
return Object.entries(O).map(([r, i]) =>
|
|
296
|
+
function F(e, t, n) {
|
|
297
|
+
return Object.entries(O).map(([r, i]) => P(e, t?.[r], i, n === r)).filter(Boolean).join("\n");
|
|
294
298
|
}
|
|
295
|
-
var
|
|
299
|
+
var ee = [
|
|
296
300
|
{
|
|
297
301
|
key: "tablet",
|
|
298
302
|
max: 991
|
|
@@ -305,17 +309,17 @@ var F = [
|
|
|
305
309
|
key: "mobile",
|
|
306
310
|
max: 478
|
|
307
311
|
}
|
|
308
|
-
],
|
|
309
|
-
function
|
|
310
|
-
return
|
|
311
|
-
let i = t?.[n] ?
|
|
312
|
+
], te = (e) => Object.entries(D(e)).map(([e, t]) => `${N(e)}: ${t} !important;`).join(" ");
|
|
313
|
+
function ne(e, t) {
|
|
314
|
+
return ee.map(({ key: n, max: r }) => {
|
|
315
|
+
let i = t?.[n] ? te(t[n]) : "";
|
|
312
316
|
return i ? `@media (max-width: ${r}px) { [data-wb="${e}"] { ${i} } }` : "";
|
|
313
317
|
}).filter(Boolean).join("\n");
|
|
314
318
|
}
|
|
315
|
-
function
|
|
319
|
+
function re(e, t) {
|
|
316
320
|
let n = [], r = (e) => {
|
|
317
321
|
for (let [t, r] of Object.entries(e || {})) {
|
|
318
|
-
let e =
|
|
322
|
+
let e = ne(t, r.props);
|
|
319
323
|
e && n.push(e);
|
|
320
324
|
}
|
|
321
325
|
};
|
|
@@ -323,10 +327,10 @@ function ne(e, t) {
|
|
|
323
327
|
for (let e of Object.values(t || {})) r(e.template?.nodes);
|
|
324
328
|
return n.join("\n");
|
|
325
329
|
}
|
|
326
|
-
function
|
|
330
|
+
function ie(e, t) {
|
|
327
331
|
let n = [], r = (e) => {
|
|
328
332
|
for (let [t, r] of Object.entries(e || {})) {
|
|
329
|
-
let e =
|
|
333
|
+
let e = F(t, r.props);
|
|
330
334
|
e && n.push(e);
|
|
331
335
|
}
|
|
332
336
|
};
|
|
@@ -375,12 +379,12 @@ var I = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
375
379
|
contrastText: "#052e2b"
|
|
376
380
|
}
|
|
377
381
|
}
|
|
378
|
-
},
|
|
382
|
+
}, R = {
|
|
379
383
|
font: "system",
|
|
380
384
|
headingFont: "inherit",
|
|
381
385
|
light: L.light,
|
|
382
386
|
dark: L.dark
|
|
383
|
-
},
|
|
387
|
+
}, z = {
|
|
384
388
|
system: {
|
|
385
389
|
label: "System",
|
|
386
390
|
value: I
|
|
@@ -401,7 +405,7 @@ var I = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
401
405
|
label: "Mono",
|
|
402
406
|
value: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
|
|
403
407
|
}
|
|
404
|
-
}, ae = (e, t) =>
|
|
408
|
+
}, ae = (e, t) => z[e]?.value ?? S(e) ?? (typeof e == "string" && e.trim() ? `"${e.trim()}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` : t), oe = (e, ...t) => {
|
|
405
409
|
let n = Object.assign({}, e, ...t);
|
|
406
410
|
return n.primary = {
|
|
407
411
|
...e.primary,
|
|
@@ -417,11 +421,11 @@ var I = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
417
421
|
}), {})
|
|
418
422
|
}, n;
|
|
419
423
|
};
|
|
420
|
-
function
|
|
424
|
+
function se(e) {
|
|
421
425
|
let { light: t, dark: n, font: r, headingFont: i, ...a } = e ?? {};
|
|
422
426
|
return {
|
|
423
|
-
font: r ??
|
|
424
|
-
headingFont: i ??
|
|
427
|
+
font: r ?? R.font,
|
|
428
|
+
headingFont: i ?? R.headingFont,
|
|
425
429
|
light: oe(L.light, a, t),
|
|
426
430
|
dark: oe(L.dark, n)
|
|
427
431
|
};
|
|
@@ -444,8 +448,8 @@ function B(e) {
|
|
|
444
448
|
"--page-secondary-contrast": e.secondary.contrastText
|
|
445
449
|
};
|
|
446
450
|
}
|
|
447
|
-
function
|
|
448
|
-
let t =
|
|
451
|
+
function ce(e) {
|
|
452
|
+
let t = se(e);
|
|
449
453
|
return {
|
|
450
454
|
backgroundColor: "var(--page-bg)",
|
|
451
455
|
color: "var(--page-text)",
|
|
@@ -453,17 +457,17 @@ function se(e) {
|
|
|
453
457
|
"--page-heading-font": t.headingFont === "inherit" ? "inherit" : ae(t.headingFont, "inherit")
|
|
454
458
|
};
|
|
455
459
|
}
|
|
456
|
-
function
|
|
457
|
-
let n =
|
|
460
|
+
function le(e, t = "light") {
|
|
461
|
+
let n = se(e);
|
|
458
462
|
return {
|
|
459
|
-
...
|
|
463
|
+
...ce(e),
|
|
460
464
|
...B(n[t] ?? n.light)
|
|
461
465
|
};
|
|
462
466
|
}
|
|
463
|
-
function
|
|
467
|
+
function ue(e, t) {
|
|
464
468
|
return e?.themeRef && t?.[e.themeRef] || e?.theme;
|
|
465
469
|
}
|
|
466
|
-
function
|
|
470
|
+
function de(e, t) {
|
|
467
471
|
return e === "light" || e === "dark" ? e : t === "light" || t === "dark" ? t : "auto";
|
|
468
472
|
}
|
|
469
473
|
//#endregion
|
|
@@ -473,29 +477,29 @@ var V = n({
|
|
|
473
477
|
apiUrl: "/api",
|
|
474
478
|
locale: "",
|
|
475
479
|
settings: null
|
|
476
|
-
}), H = n(null),
|
|
480
|
+
}), H = n(null), fe = (e) => {
|
|
477
481
|
let t = Number(e?.__page);
|
|
478
482
|
if (Number.isFinite(t) && t >= 1) return Math.floor(t);
|
|
479
483
|
if (typeof window > "u") return 1;
|
|
480
484
|
let n = Number(new URLSearchParams(window.location.search).get("page"));
|
|
481
485
|
return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
|
|
482
|
-
},
|
|
486
|
+
}, pe = () => {
|
|
483
487
|
if (typeof window > "u") return {};
|
|
484
488
|
let e = {};
|
|
485
489
|
return new URLSearchParams(window.location.search).forEach((t, n) => {
|
|
486
490
|
n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
|
|
487
491
|
}), e;
|
|
488
|
-
},
|
|
492
|
+
}, me = (e) => {
|
|
489
493
|
let t = {
|
|
490
494
|
...e && typeof e == "object" && !Array.isArray(e) ? e : {},
|
|
491
|
-
...
|
|
495
|
+
...pe()
|
|
492
496
|
};
|
|
493
497
|
return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
|
|
494
|
-
},
|
|
495
|
-
function
|
|
498
|
+
}, he = n(null), ge = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
499
|
+
function U(e, t) {
|
|
496
500
|
if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
|
|
497
501
|
}
|
|
498
|
-
var
|
|
502
|
+
var _e = (e) => {
|
|
499
503
|
let t = [];
|
|
500
504
|
for (let [n, r] of Object.entries(e ?? {})) {
|
|
501
505
|
if (!/^[\w-]+$/.test(n)) continue;
|
|
@@ -505,36 +509,36 @@ var me = (e) => {
|
|
|
505
509
|
}
|
|
506
510
|
return t;
|
|
507
511
|
};
|
|
508
|
-
function
|
|
512
|
+
function W(e) {
|
|
509
513
|
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(" ") : "";
|
|
510
514
|
}
|
|
511
|
-
function
|
|
512
|
-
let n = t?.data ?? {}, r =
|
|
515
|
+
function ve(e, t) {
|
|
516
|
+
let n = t?.data ?? {}, r = _e(n);
|
|
513
517
|
if (!r.length) return e;
|
|
514
|
-
let i = RegExp(`:(${r.map(
|
|
518
|
+
let i = RegExp(`:(${r.map(ge).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => W(U(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
|
|
515
519
|
return a(e);
|
|
516
520
|
}
|
|
517
|
-
var
|
|
521
|
+
var ye = {
|
|
518
522
|
margin: 0,
|
|
519
523
|
fontWeight: 700,
|
|
520
524
|
lineHeight: 1.2,
|
|
521
525
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
522
|
-
},
|
|
526
|
+
}, be = { margin: 0 }, G = {
|
|
523
527
|
display: "inline-block",
|
|
524
528
|
textDecoration: "none",
|
|
525
529
|
cursor: "pointer",
|
|
526
530
|
backgroundColor: "var(--page-accent, #111827)",
|
|
527
531
|
color: "var(--page-accent-text, #ffffff)"
|
|
528
|
-
},
|
|
532
|
+
}, xe = {
|
|
529
533
|
flexGrow: 1,
|
|
530
534
|
display: "flex",
|
|
531
535
|
flexDirection: "column",
|
|
532
536
|
position: "relative"
|
|
533
|
-
},
|
|
537
|
+
}, Se = {
|
|
534
538
|
display: "flex",
|
|
535
539
|
flexDirection: "column"
|
|
536
540
|
};
|
|
537
|
-
function
|
|
541
|
+
function Ce({ style: e }) {
|
|
538
542
|
let t = e?.backgroundVideo;
|
|
539
543
|
if (!t) return null;
|
|
540
544
|
let n = {
|
|
@@ -560,7 +564,7 @@ function be({ style: e }) {
|
|
|
560
564
|
background: r
|
|
561
565
|
} })] });
|
|
562
566
|
}
|
|
563
|
-
var
|
|
567
|
+
var we = (e, t) => e?.backgroundVideo ? {
|
|
564
568
|
position: "relative",
|
|
565
569
|
...t,
|
|
566
570
|
...D(e)
|
|
@@ -568,24 +572,24 @@ var xe = (e, t) => e?.backgroundVideo ? {
|
|
|
568
572
|
...t,
|
|
569
573
|
...D(e)
|
|
570
574
|
};
|
|
571
|
-
function
|
|
575
|
+
function Te({ style: e, nodeRef: t, children: n }) {
|
|
572
576
|
return /* @__PURE__ */ f("div", {
|
|
573
577
|
ref: t,
|
|
574
578
|
style: {
|
|
575
|
-
...
|
|
579
|
+
...xe,
|
|
576
580
|
...D(e)
|
|
577
581
|
},
|
|
578
|
-
children: [/* @__PURE__ */ d(
|
|
582
|
+
children: [/* @__PURE__ */ d(Ce, { style: e }), n]
|
|
579
583
|
});
|
|
580
584
|
}
|
|
581
|
-
function
|
|
585
|
+
function Ee({ style: e, nodeRef: t, children: n }) {
|
|
582
586
|
return /* @__PURE__ */ f("section", {
|
|
583
587
|
ref: t,
|
|
584
|
-
style:
|
|
585
|
-
children: [/* @__PURE__ */ d(
|
|
588
|
+
style: we(e, Se),
|
|
589
|
+
children: [/* @__PURE__ */ d(Ce, { style: e }), n]
|
|
586
590
|
});
|
|
587
591
|
}
|
|
588
|
-
function
|
|
592
|
+
function De({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
589
593
|
let i = t ? {
|
|
590
594
|
position: "relative",
|
|
591
595
|
minHeight: 240
|
|
@@ -594,32 +598,32 @@ function we({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
|
594
598
|
ref: n,
|
|
595
599
|
style: i ? {
|
|
596
600
|
...i,
|
|
597
|
-
...
|
|
598
|
-
} :
|
|
599
|
-
children: [/* @__PURE__ */ d(
|
|
601
|
+
...we(e)
|
|
602
|
+
} : we(e),
|
|
603
|
+
children: [/* @__PURE__ */ d(Ce, { style: e }), r]
|
|
600
604
|
});
|
|
601
605
|
}
|
|
602
|
-
function
|
|
606
|
+
function Oe({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
|
|
603
607
|
return /* @__PURE__ */ d(n, {
|
|
604
608
|
ref: a,
|
|
605
609
|
style: {
|
|
606
|
-
...
|
|
610
|
+
...ye,
|
|
607
611
|
...D(r)
|
|
608
612
|
},
|
|
609
|
-
children:
|
|
613
|
+
children: K(t, e, i)
|
|
610
614
|
});
|
|
611
615
|
}
|
|
612
|
-
var
|
|
613
|
-
fontFamily:
|
|
616
|
+
var ke = {
|
|
617
|
+
fontFamily: z.mono.value,
|
|
614
618
|
background: "rgba(148, 163, 184, 0.18)",
|
|
615
619
|
padding: "1px 5px",
|
|
616
620
|
borderRadius: 4,
|
|
617
621
|
fontSize: "0.9em"
|
|
618
622
|
};
|
|
619
|
-
function
|
|
623
|
+
function Ae(e, t = [], n, r) {
|
|
620
624
|
let i = e;
|
|
621
625
|
return t.includes("sup") ? i = /* @__PURE__ */ d("sup", { children: i }) : t.includes("sub") && (i = /* @__PURE__ */ d("sub", { children: i })), t.includes("code") && (i = /* @__PURE__ */ d("code", {
|
|
622
|
-
style:
|
|
626
|
+
style: ke,
|
|
623
627
|
children: i
|
|
624
628
|
})), t.includes("strike") && (i = /* @__PURE__ */ d("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ d("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ d("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ d("strong", { children: i })), n && (i = /* @__PURE__ */ d("a", {
|
|
625
629
|
href: n,
|
|
@@ -629,13 +633,13 @@ function De(e, t = [], n, r) {
|
|
|
629
633
|
children: i
|
|
630
634
|
})), i;
|
|
631
635
|
}
|
|
632
|
-
function
|
|
636
|
+
function K(e, n, r) {
|
|
633
637
|
return e?.length ? e.map((e, n) => {
|
|
634
638
|
if (e.slot) return /* @__PURE__ */ d(t, { children: r?.[e.slot] ?? null }, n);
|
|
635
|
-
if (e.parts) return /* @__PURE__ */ d(t, { children:
|
|
639
|
+
if (e.parts) return /* @__PURE__ */ d(t, { children: K(e.parts, "", r) }, n);
|
|
636
640
|
let i = e.text;
|
|
637
641
|
return e.sup ? i = /* @__PURE__ */ d("sup", { children: i }) : e.sub && (i = /* @__PURE__ */ d("sub", { children: i })), e.code && (i = /* @__PURE__ */ d("code", {
|
|
638
|
-
style:
|
|
642
|
+
style: ke,
|
|
639
643
|
children: i
|
|
640
644
|
})), e.strike && (i = /* @__PURE__ */ d("s", { children: i })), e.underline && (i = /* @__PURE__ */ d("u", { children: i })), e.italic && (i = /* @__PURE__ */ d("em", { children: i })), e.bold && (i = /* @__PURE__ */ d("strong", { children: i })), (e.color || e.background) && (i = /* @__PURE__ */ d("span", {
|
|
641
645
|
style: {
|
|
@@ -652,13 +656,13 @@ function J(e, n, r) {
|
|
|
652
656
|
})), /* @__PURE__ */ d(t, { children: i }, n);
|
|
653
657
|
}) : n;
|
|
654
658
|
}
|
|
655
|
-
function
|
|
659
|
+
function je({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
|
|
656
660
|
return /* @__PURE__ */ d("span", {
|
|
657
661
|
style: D(a),
|
|
658
|
-
children: e?.length ?
|
|
662
|
+
children: e?.length ? K(e, t) : Ae(t, n, r, i)
|
|
659
663
|
});
|
|
660
664
|
}
|
|
661
|
-
var
|
|
665
|
+
var Me = {
|
|
662
666
|
h1: 40,
|
|
663
667
|
h2: 32,
|
|
664
668
|
h3: 26,
|
|
@@ -666,7 +670,7 @@ var ke = {
|
|
|
666
670
|
h5: 19,
|
|
667
671
|
h6: 16
|
|
668
672
|
};
|
|
669
|
-
function
|
|
673
|
+
function Ne({ align: e = "center", width: t, wrap: n } = {}) {
|
|
670
674
|
let r = t ? `${t}%` : void 0;
|
|
671
675
|
if (e === "full") return { width: "100%" };
|
|
672
676
|
let i = e === "left" || e === "right";
|
|
@@ -700,8 +704,8 @@ function Ae({ align: e = "center", width: t, wrap: n } = {}) {
|
|
|
700
704
|
marginRight: "auto"
|
|
701
705
|
};
|
|
702
706
|
}
|
|
703
|
-
function
|
|
704
|
-
let r = n ?? ((e, n) =>
|
|
707
|
+
function Pe(e = [], t, n) {
|
|
708
|
+
let r = n ?? ((e, n) => K(e, n, t));
|
|
705
709
|
return e.map((t, n) => {
|
|
706
710
|
let i = {
|
|
707
711
|
marginTop: 0,
|
|
@@ -723,7 +727,7 @@ function je(e = [], t, n) {
|
|
|
723
727
|
marginLeft: 0,
|
|
724
728
|
marginRight: 0,
|
|
725
729
|
...i,
|
|
726
|
-
...
|
|
730
|
+
...Ne(t)
|
|
727
731
|
},
|
|
728
732
|
children: [t.href ? /* @__PURE__ */ d("a", {
|
|
729
733
|
href: t.href,
|
|
@@ -742,16 +746,16 @@ function je(e = [], t, n) {
|
|
|
742
746
|
})]
|
|
743
747
|
}, n);
|
|
744
748
|
}
|
|
745
|
-
if (t.type === "video") return
|
|
749
|
+
if (t.type === "video") return Ge(t.url) ? /* @__PURE__ */ d("div", {
|
|
746
750
|
style: {
|
|
747
751
|
...i,
|
|
748
|
-
...
|
|
752
|
+
...Ne({
|
|
749
753
|
align: t.align,
|
|
750
754
|
wrap: t.wrap,
|
|
751
755
|
width: t.width ?? 100
|
|
752
756
|
})
|
|
753
757
|
},
|
|
754
|
-
children: /* @__PURE__ */ d(
|
|
758
|
+
children: /* @__PURE__ */ d(Ke, {
|
|
755
759
|
url: t.url,
|
|
756
760
|
autoplay: t.autoplay,
|
|
757
761
|
muted: t.muted,
|
|
@@ -813,17 +817,17 @@ function je(e = [], t, n) {
|
|
|
813
817
|
}
|
|
814
818
|
if (t.type === "quote") return /* @__PURE__ */ d("blockquote", {
|
|
815
819
|
style: {
|
|
816
|
-
...
|
|
820
|
+
...Ie,
|
|
817
821
|
...i
|
|
818
822
|
},
|
|
819
823
|
children: r(t.parts, t.text)
|
|
820
824
|
}, n);
|
|
821
|
-
if (
|
|
825
|
+
if (Me[t.type]) {
|
|
822
826
|
let e = t.type;
|
|
823
827
|
return /* @__PURE__ */ d(e, {
|
|
824
828
|
style: {
|
|
825
|
-
...
|
|
826
|
-
fontSize:
|
|
829
|
+
...ye,
|
|
830
|
+
fontSize: Me[t.type],
|
|
827
831
|
...i
|
|
828
832
|
},
|
|
829
833
|
children: r(t.parts, t.text)
|
|
@@ -831,39 +835,39 @@ function je(e = [], t, n) {
|
|
|
831
835
|
}
|
|
832
836
|
return /* @__PURE__ */ d("p", {
|
|
833
837
|
style: {
|
|
834
|
-
...
|
|
838
|
+
...be,
|
|
835
839
|
...i
|
|
836
840
|
},
|
|
837
841
|
children: r(t.parts, t.text)
|
|
838
842
|
}, n);
|
|
839
843
|
});
|
|
840
844
|
}
|
|
841
|
-
function
|
|
845
|
+
function Fe({ content: e, style: t, linked: n, nodeRef: r }) {
|
|
842
846
|
return /* @__PURE__ */ d("div", {
|
|
843
847
|
ref: r,
|
|
844
848
|
style: {
|
|
845
849
|
display: "flow-root",
|
|
846
850
|
...D(t)
|
|
847
851
|
},
|
|
848
|
-
children:
|
|
852
|
+
children: Pe(e, n)
|
|
849
853
|
});
|
|
850
854
|
}
|
|
851
|
-
var
|
|
855
|
+
var Ie = {
|
|
852
856
|
margin: 0,
|
|
853
857
|
padding: "8px 0 8px 20px",
|
|
854
858
|
borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
|
|
855
859
|
};
|
|
856
|
-
function
|
|
860
|
+
function Le({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
857
861
|
return /* @__PURE__ */ d("blockquote", {
|
|
858
862
|
ref: i,
|
|
859
863
|
style: {
|
|
860
|
-
...
|
|
864
|
+
...Ie,
|
|
861
865
|
...D(n)
|
|
862
866
|
},
|
|
863
|
-
children:
|
|
867
|
+
children: K(t, e, r)
|
|
864
868
|
});
|
|
865
869
|
}
|
|
866
|
-
function
|
|
870
|
+
function Re({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
867
871
|
return /* @__PURE__ */ d(e ? "ol" : "ul", {
|
|
868
872
|
ref: r,
|
|
869
873
|
style: {
|
|
@@ -873,53 +877,53 @@ function Fe({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
|
873
877
|
},
|
|
874
878
|
children: t.map((e, t) => /* @__PURE__ */ d("li", {
|
|
875
879
|
style: { marginBottom: 4 },
|
|
876
|
-
children:
|
|
880
|
+
children: K(e.parts, e.text)
|
|
877
881
|
}, t))
|
|
878
882
|
});
|
|
879
883
|
}
|
|
880
|
-
function
|
|
884
|
+
function ze({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
881
885
|
return /* @__PURE__ */ d("p", {
|
|
882
886
|
ref: i,
|
|
883
887
|
style: {
|
|
884
|
-
...
|
|
888
|
+
...be,
|
|
885
889
|
...D(n)
|
|
886
890
|
},
|
|
887
|
-
children:
|
|
891
|
+
children: K(t, e, r)
|
|
888
892
|
});
|
|
889
893
|
}
|
|
890
|
-
var
|
|
894
|
+
var Be = {
|
|
891
895
|
color: "var(--page-accent, inherit)",
|
|
892
896
|
textDecoration: "underline",
|
|
893
897
|
textUnderlineOffset: 3,
|
|
894
898
|
cursor: "pointer"
|
|
895
899
|
};
|
|
896
|
-
function
|
|
900
|
+
function Ve({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
897
901
|
return /* @__PURE__ */ d("a", {
|
|
898
902
|
ref: o,
|
|
899
903
|
href: n || "#",
|
|
900
904
|
target: r || void 0,
|
|
901
905
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
902
906
|
style: {
|
|
903
|
-
...
|
|
907
|
+
...Be,
|
|
904
908
|
...D(i)
|
|
905
909
|
},
|
|
906
|
-
children:
|
|
910
|
+
children: K(t, e, a)
|
|
907
911
|
});
|
|
908
912
|
}
|
|
909
|
-
function
|
|
913
|
+
function He({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
910
914
|
return /* @__PURE__ */ d("a", {
|
|
911
915
|
ref: o,
|
|
912
916
|
href: n || "#",
|
|
913
917
|
target: r || void 0,
|
|
914
918
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
915
919
|
style: {
|
|
916
|
-
...
|
|
920
|
+
...G,
|
|
917
921
|
...D(i)
|
|
918
922
|
},
|
|
919
|
-
children:
|
|
923
|
+
children: K(t, e, a)
|
|
920
924
|
});
|
|
921
925
|
}
|
|
922
|
-
function
|
|
926
|
+
function Ue({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
923
927
|
return e ? /* @__PURE__ */ d("img", {
|
|
924
928
|
ref: r,
|
|
925
929
|
src: e,
|
|
@@ -931,7 +935,7 @@ function Be({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
|
931
935
|
}
|
|
932
936
|
}) : null;
|
|
933
937
|
}
|
|
934
|
-
function
|
|
938
|
+
function We({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
|
|
935
939
|
return e ? /* @__PURE__ */ d("video", {
|
|
936
940
|
ref: s,
|
|
937
941
|
src: e,
|
|
@@ -949,9 +953,9 @@ function Ve({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
|
|
|
949
953
|
}
|
|
950
954
|
}) : null;
|
|
951
955
|
}
|
|
952
|
-
var
|
|
953
|
-
function
|
|
954
|
-
let c =
|
|
956
|
+
var Ge = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
|
|
957
|
+
function Ke({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
|
|
958
|
+
let c = Ge(e);
|
|
955
959
|
if (!c) return null;
|
|
956
960
|
let l = new URLSearchParams({ rel: "0" });
|
|
957
961
|
return t && l.set("autoplay", "1"), (n || t) && l.set("mute", "1"), i || l.set("controls", "0"), r && (l.set("loop", "1"), l.set("playlist", c)), Number(a) > 0 && l.set("start", String(Math.floor(Number(a)))), /* @__PURE__ */ d("div", {
|
|
@@ -977,7 +981,7 @@ function Ue({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
|
|
|
977
981
|
})
|
|
978
982
|
});
|
|
979
983
|
}
|
|
980
|
-
function
|
|
984
|
+
function qe({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
|
|
981
985
|
return e ? /* @__PURE__ */ d("iframe", {
|
|
982
986
|
ref: i,
|
|
983
987
|
src: e,
|
|
@@ -993,7 +997,7 @@ function We({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
|
|
|
993
997
|
}
|
|
994
998
|
}) : null;
|
|
995
999
|
}
|
|
996
|
-
function
|
|
1000
|
+
function Je({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
997
1001
|
let [i, o] = l(null);
|
|
998
1002
|
return a(() => {
|
|
999
1003
|
i && (i.innerHTML = e || "", t && i.querySelectorAll("script").forEach((e) => {
|
|
@@ -1012,7 +1016,7 @@ function Ge({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
|
1012
1016
|
style: D(n)
|
|
1013
1017
|
});
|
|
1014
1018
|
}
|
|
1015
|
-
function
|
|
1019
|
+
function Ye({ height: e, nodeRef: t }) {
|
|
1016
1020
|
return /* @__PURE__ */ d("div", {
|
|
1017
1021
|
ref: t,
|
|
1018
1022
|
style: {
|
|
@@ -1022,7 +1026,7 @@ function Ke({ height: e, nodeRef: t }) {
|
|
|
1022
1026
|
}
|
|
1023
1027
|
});
|
|
1024
1028
|
}
|
|
1025
|
-
function
|
|
1029
|
+
function Xe({ style: e, nodeRef: t }) {
|
|
1026
1030
|
return /* @__PURE__ */ d("div", {
|
|
1027
1031
|
ref: t,
|
|
1028
1032
|
style: {
|
|
@@ -1033,7 +1037,7 @@ function qe({ style: e, nodeRef: t }) {
|
|
|
1033
1037
|
}
|
|
1034
1038
|
});
|
|
1035
1039
|
}
|
|
1036
|
-
var
|
|
1040
|
+
var Ze = {
|
|
1037
1041
|
position: "absolute",
|
|
1038
1042
|
top: "50%",
|
|
1039
1043
|
transform: "translateY(-50%)",
|
|
@@ -1050,7 +1054,7 @@ var Je = {
|
|
|
1050
1054
|
alignItems: "center",
|
|
1051
1055
|
justifyContent: "center",
|
|
1052
1056
|
padding: 0
|
|
1053
|
-
},
|
|
1057
|
+
}, Qe = {
|
|
1054
1058
|
bottom: {
|
|
1055
1059
|
inset: "auto 0 0 0",
|
|
1056
1060
|
padding: "40px 24px 20px",
|
|
@@ -1069,8 +1073,8 @@ var Je = {
|
|
|
1069
1073
|
padding: 24,
|
|
1070
1074
|
textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
|
|
1071
1075
|
}
|
|
1072
|
-
},
|
|
1073
|
-
function
|
|
1076
|
+
}, $e = 48;
|
|
1077
|
+
function et({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: i = 320, swipe: o = !0, style: s, nodeRef: c }) {
|
|
1074
1078
|
let [p, m] = l(0), [h, g] = l(!1), [_, v] = l(null), y = e ? Math.min(p, e - 1) : 0;
|
|
1075
1079
|
if (a(() => {
|
|
1076
1080
|
if (!n || h || _ || e < 2) return;
|
|
@@ -1086,7 +1090,7 @@ function Ze({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1086
1090
|
let b = (t) => m((t + e) % e), x = () => {
|
|
1087
1091
|
if (!_) return;
|
|
1088
1092
|
let { dx: e } = _;
|
|
1089
|
-
v(null), e < -48 ? b(y + 1) : e >
|
|
1093
|
+
v(null), e < -48 ? b(y + 1) : e > $e && b(y - 1);
|
|
1090
1094
|
};
|
|
1091
1095
|
return /* @__PURE__ */ f("div", {
|
|
1092
1096
|
ref: c,
|
|
@@ -1134,7 +1138,7 @@ function Ze({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1134
1138
|
type: "button",
|
|
1135
1139
|
"aria-label": "Previous slide",
|
|
1136
1140
|
style: {
|
|
1137
|
-
...
|
|
1141
|
+
...Ze,
|
|
1138
1142
|
left: 12
|
|
1139
1143
|
},
|
|
1140
1144
|
onClick: () => b(y - 1),
|
|
@@ -1144,7 +1148,7 @@ function Ze({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1144
1148
|
type: "button",
|
|
1145
1149
|
"aria-label": "Next slide",
|
|
1146
1150
|
style: {
|
|
1147
|
-
...
|
|
1151
|
+
...Ze,
|
|
1148
1152
|
right: 12
|
|
1149
1153
|
},
|
|
1150
1154
|
onClick: () => b(y + 1),
|
|
@@ -1178,7 +1182,7 @@ function Ze({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1178
1182
|
] })]
|
|
1179
1183
|
});
|
|
1180
1184
|
}
|
|
1181
|
-
var
|
|
1185
|
+
var tt = (e, t) => ({
|
|
1182
1186
|
position: "absolute",
|
|
1183
1187
|
inset: 0,
|
|
1184
1188
|
backgroundImage: e ? `url(${e})` : "none",
|
|
@@ -1186,18 +1190,18 @@ var Qe = (e, t) => ({
|
|
|
1186
1190
|
backgroundSize: "cover",
|
|
1187
1191
|
backgroundPosition: "center"
|
|
1188
1192
|
});
|
|
1189
|
-
function
|
|
1190
|
-
return e.length ? /* @__PURE__ */ d(
|
|
1193
|
+
function nt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
|
|
1194
|
+
return e.length ? /* @__PURE__ */ d(et, {
|
|
1191
1195
|
...r,
|
|
1192
1196
|
count: e.length,
|
|
1193
1197
|
renderSlide: (r) => {
|
|
1194
1198
|
let i = e[r];
|
|
1195
|
-
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style:
|
|
1199
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: tt(i.image) }), (i.title || i.text) && /* @__PURE__ */ f("div", {
|
|
1196
1200
|
style: {
|
|
1197
1201
|
position: "absolute",
|
|
1198
1202
|
color: "#fff",
|
|
1199
1203
|
textAlign: n,
|
|
1200
|
-
...
|
|
1204
|
+
...Qe[t] ?? Qe.bottom
|
|
1201
1205
|
},
|
|
1202
1206
|
children: [i.title && /* @__PURE__ */ d("div", {
|
|
1203
1207
|
style: {
|
|
@@ -1217,13 +1221,13 @@ function $e({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
|
|
|
1217
1221
|
}
|
|
1218
1222
|
}) : null;
|
|
1219
1223
|
}
|
|
1220
|
-
function
|
|
1221
|
-
return e.length ? /* @__PURE__ */ d(
|
|
1224
|
+
function rt({ slides: e = [], linked: t, ...n }) {
|
|
1225
|
+
return e.length ? /* @__PURE__ */ d(et, {
|
|
1222
1226
|
...n,
|
|
1223
1227
|
count: e.length,
|
|
1224
1228
|
renderSlide: (n) => {
|
|
1225
1229
|
let r = e[n];
|
|
1226
|
-
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style:
|
|
1230
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: tt(r.image, r.color) }), /* @__PURE__ */ d("div", {
|
|
1227
1231
|
style: {
|
|
1228
1232
|
position: "absolute",
|
|
1229
1233
|
inset: 0,
|
|
@@ -1235,7 +1239,7 @@ function et({ slides: e = [], linked: t, ...n }) {
|
|
|
1235
1239
|
}
|
|
1236
1240
|
}) : null;
|
|
1237
1241
|
}
|
|
1238
|
-
function
|
|
1242
|
+
function it({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: i = !0, style: o, nodeRef: s, inert: c }) {
|
|
1239
1243
|
let p = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], m = Math.max(0, Number(n) || 0), h = c ? (e) => e.preventDefault() : void 0, [g, _] = l(null), v = i && !c && g !== null && p[g];
|
|
1240
1244
|
a(() => {
|
|
1241
1245
|
if (!v) return;
|
|
@@ -1434,19 +1438,19 @@ function tt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
|
|
|
1434
1438
|
]
|
|
1435
1439
|
});
|
|
1436
1440
|
}
|
|
1437
|
-
var
|
|
1441
|
+
var at = {
|
|
1438
1442
|
color: "inherit",
|
|
1439
1443
|
textDecoration: "none",
|
|
1440
1444
|
fontSize: 14,
|
|
1441
1445
|
opacity: .85
|
|
1442
|
-
},
|
|
1446
|
+
}, ot = {
|
|
1443
1447
|
background: "var(--page-surface, #f2f2f2)",
|
|
1444
1448
|
color: "var(--page-text, #111827)",
|
|
1445
1449
|
border: "1px solid rgba(148, 163, 184, 0.25)",
|
|
1446
1450
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
|
|
1447
1451
|
zIndex: 60
|
|
1448
1452
|
};
|
|
1449
|
-
function
|
|
1453
|
+
function st({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], style: s, nodeRef: c, menu: p = "auto", breakpoint: m = 768 }) {
|
|
1450
1454
|
let [h, g] = l(null), [_, v] = l(!1), [y, b] = l(!1), [x, S] = l(null);
|
|
1451
1455
|
a(() => {
|
|
1452
1456
|
if (!h) return;
|
|
@@ -1456,7 +1460,7 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1456
1460
|
let C = p === "hamburger" || p === "auto" && _, w = (e, t) => /* @__PURE__ */ f("a", {
|
|
1457
1461
|
href: e.href || "#",
|
|
1458
1462
|
style: {
|
|
1459
|
-
...
|
|
1463
|
+
...at,
|
|
1460
1464
|
display: "block",
|
|
1461
1465
|
...t
|
|
1462
1466
|
},
|
|
@@ -1544,7 +1548,7 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1544
1548
|
let t = e.children ?? [];
|
|
1545
1549
|
if (!t.length) return /* @__PURE__ */ d("a", {
|
|
1546
1550
|
href: e.href || "#",
|
|
1547
|
-
style:
|
|
1551
|
+
style: at,
|
|
1548
1552
|
children: e.label
|
|
1549
1553
|
}, e.key);
|
|
1550
1554
|
let n = e.type === "mega";
|
|
@@ -1558,7 +1562,7 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1558
1562
|
children: [/* @__PURE__ */ f("a", {
|
|
1559
1563
|
href: e.href || "#",
|
|
1560
1564
|
style: {
|
|
1561
|
-
...
|
|
1565
|
+
...at,
|
|
1562
1566
|
cursor: "pointer"
|
|
1563
1567
|
},
|
|
1564
1568
|
children: [
|
|
@@ -1574,7 +1578,7 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1574
1578
|
]
|
|
1575
1579
|
}), x === e.key && (n ? /* @__PURE__ */ d("div", {
|
|
1576
1580
|
style: {
|
|
1577
|
-
...
|
|
1581
|
+
...ot,
|
|
1578
1582
|
position: "absolute",
|
|
1579
1583
|
left: 0,
|
|
1580
1584
|
right: 0,
|
|
@@ -1590,7 +1594,7 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1590
1594
|
}))
|
|
1591
1595
|
}) : /* @__PURE__ */ d("div", {
|
|
1592
1596
|
style: {
|
|
1593
|
-
...
|
|
1597
|
+
...ot,
|
|
1594
1598
|
position: "absolute",
|
|
1595
1599
|
top: "100%",
|
|
1596
1600
|
left: 0,
|
|
@@ -1619,7 +1623,7 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1619
1623
|
children: o.map((e) => /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ d("a", {
|
|
1620
1624
|
href: e.href || "#",
|
|
1621
1625
|
style: {
|
|
1622
|
-
...
|
|
1626
|
+
...at,
|
|
1623
1627
|
padding: "10px 4px",
|
|
1624
1628
|
fontWeight: (e.children ?? []).length ? 600 : 400,
|
|
1625
1629
|
opacity: 1
|
|
@@ -1630,7 +1634,7 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1630
1634
|
]
|
|
1631
1635
|
});
|
|
1632
1636
|
}
|
|
1633
|
-
function
|
|
1637
|
+
function ct({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
1634
1638
|
let [i, a] = l(0), o = e.length ? Math.min(i, e.length - 1) : 0;
|
|
1635
1639
|
return e.length ? /* @__PURE__ */ f("div", {
|
|
1636
1640
|
ref: r,
|
|
@@ -1670,7 +1674,7 @@ function at({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
|
1670
1674
|
}, e.key))]
|
|
1671
1675
|
}) : null;
|
|
1672
1676
|
}
|
|
1673
|
-
function
|
|
1677
|
+
function lt({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
|
|
1674
1678
|
let [a, o] = l(() => new Set(e.length ? [e[0].key] : []));
|
|
1675
1679
|
if (!e.length) return null;
|
|
1676
1680
|
let s = (e) => o((t) => {
|
|
@@ -1727,15 +1731,15 @@ function ot({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
|
|
|
1727
1731
|
})
|
|
1728
1732
|
});
|
|
1729
1733
|
}
|
|
1730
|
-
var
|
|
1734
|
+
var ut = {
|
|
1731
1735
|
display: "flex",
|
|
1732
1736
|
flexDirection: "column",
|
|
1733
1737
|
gap: "12px"
|
|
1734
|
-
},
|
|
1738
|
+
}, q = {
|
|
1735
1739
|
fontSize: "14px",
|
|
1736
1740
|
fontWeight: 500,
|
|
1737
1741
|
color: "var(--page-text, #111827)"
|
|
1738
|
-
},
|
|
1742
|
+
}, J = {
|
|
1739
1743
|
padding: "10px 12px",
|
|
1740
1744
|
border: "1px solid var(--page-border, #d1d5db)",
|
|
1741
1745
|
borderRadius: "6px",
|
|
@@ -1745,18 +1749,18 @@ var st = {
|
|
|
1745
1749
|
boxSizing: "border-box",
|
|
1746
1750
|
backgroundColor: "var(--page-surface, #f2f2f2)",
|
|
1747
1751
|
color: "var(--page-text, #111827)"
|
|
1748
|
-
},
|
|
1752
|
+
}, dt = {
|
|
1749
1753
|
display: "flex",
|
|
1750
1754
|
alignItems: "center",
|
|
1751
1755
|
gap: "8px",
|
|
1752
1756
|
fontSize: "14px",
|
|
1753
1757
|
color: "var(--page-text, #111827)"
|
|
1754
|
-
},
|
|
1758
|
+
}, Y = (e) => e ? {
|
|
1755
1759
|
readOnly: !0,
|
|
1756
1760
|
tabIndex: -1,
|
|
1757
1761
|
onMouseDown: (e) => e.preventDefault()
|
|
1758
1762
|
} : {};
|
|
1759
|
-
function
|
|
1763
|
+
function ft(e, t) {
|
|
1760
1764
|
if (!e) return !0;
|
|
1761
1765
|
let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
|
|
1762
1766
|
switch (e.op) {
|
|
@@ -1770,11 +1774,11 @@ function lt(e, t) {
|
|
|
1770
1774
|
default: return !1;
|
|
1771
1775
|
}
|
|
1772
1776
|
}
|
|
1773
|
-
var
|
|
1777
|
+
var pt = {
|
|
1774
1778
|
display: "flex",
|
|
1775
1779
|
flexDirection: "column",
|
|
1776
1780
|
gap: 6
|
|
1777
|
-
},
|
|
1781
|
+
}, mt = {
|
|
1778
1782
|
font: "inherit",
|
|
1779
1783
|
fontSize: 15,
|
|
1780
1784
|
padding: "10px 12px",
|
|
@@ -1785,16 +1789,16 @@ var ut = {
|
|
|
1785
1789
|
width: "100%",
|
|
1786
1790
|
boxSizing: "border-box"
|
|
1787
1791
|
};
|
|
1788
|
-
function
|
|
1792
|
+
function ht(e, t) {
|
|
1789
1793
|
let n = Array.isArray(e?.options) ? e.options : [];
|
|
1790
1794
|
if (!e?.parentField) return n;
|
|
1791
1795
|
let r = t?.[e.parentField];
|
|
1792
1796
|
return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
|
|
1793
1797
|
}
|
|
1794
|
-
function
|
|
1798
|
+
function gt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
1795
1799
|
let a = /* @__PURE__ */ f("span", {
|
|
1796
1800
|
style: {
|
|
1797
|
-
...
|
|
1801
|
+
...q,
|
|
1798
1802
|
fontSize: 14
|
|
1799
1803
|
},
|
|
1800
1804
|
children: [e.label, e.required ? " *" : ""]
|
|
@@ -1803,7 +1807,7 @@ function pt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1803
1807
|
required: e.required || void 0,
|
|
1804
1808
|
placeholder: e.placeholder || void 0,
|
|
1805
1809
|
disabled: r || void 0,
|
|
1806
|
-
style:
|
|
1810
|
+
style: mt,
|
|
1807
1811
|
value: t ?? "",
|
|
1808
1812
|
onChange: (t) => n(e.name, t.target.value)
|
|
1809
1813
|
};
|
|
@@ -1832,7 +1836,7 @@ function pt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1832
1836
|
borderRadius: 8,
|
|
1833
1837
|
display: "block"
|
|
1834
1838
|
}
|
|
1835
|
-
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(
|
|
1839
|
+
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(Ke, {
|
|
1836
1840
|
url: e.src,
|
|
1837
1841
|
style: { width: "100%" }
|
|
1838
1842
|
}) : /* @__PURE__ */ d("video", {
|
|
@@ -1844,14 +1848,14 @@ function pt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1844
1848
|
display: "block"
|
|
1845
1849
|
}
|
|
1846
1850
|
}) : null : /* @__PURE__ */ f("label", {
|
|
1847
|
-
style:
|
|
1851
|
+
style: pt,
|
|
1848
1852
|
children: [
|
|
1849
1853
|
a,
|
|
1850
1854
|
e.type === "textarea" || e.multiline ? /* @__PURE__ */ d("textarea", {
|
|
1851
1855
|
...o,
|
|
1852
1856
|
rows: 4,
|
|
1853
1857
|
style: {
|
|
1854
|
-
...
|
|
1858
|
+
...mt,
|
|
1855
1859
|
resize: "vertical"
|
|
1856
1860
|
}
|
|
1857
1861
|
}) : e.type === "select" ? /* @__PURE__ */ f("select", {
|
|
@@ -1860,7 +1864,7 @@ function pt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1860
1864
|
children: [/* @__PURE__ */ d("option", {
|
|
1861
1865
|
value: "",
|
|
1862
1866
|
children: e.placeholder || "—"
|
|
1863
|
-
}),
|
|
1867
|
+
}), ht(e, i).map((e, t) => /* @__PURE__ */ d("option", {
|
|
1864
1868
|
value: typeof e == "string" ? e : e.value,
|
|
1865
1869
|
children: typeof e == "string" ? e : e.label ?? e.value
|
|
1866
1870
|
}, t))]
|
|
@@ -1907,7 +1911,7 @@ function pt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1907
1911
|
]
|
|
1908
1912
|
});
|
|
1909
1913
|
}
|
|
1910
|
-
function
|
|
1914
|
+
function _t({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s, auto: c, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
|
|
1911
1915
|
let { tenant: y, apiUrl: b } = i(V), [x, S] = l("form"), [C, w] = l(null), [T, E] = l({}), [O, k] = l(0), A = h ? v || "form" : x;
|
|
1912
1916
|
a(() => {
|
|
1913
1917
|
if (!c || !s) return;
|
|
@@ -1929,9 +1933,9 @@ function mt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
1929
1933
|
section: e,
|
|
1930
1934
|
fields: []
|
|
1931
1935
|
}) : j[j.length - 1].fields.push(e);
|
|
1932
|
-
let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section ||
|
|
1936
|
+
let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || ft(e.section.condition, T)).map((e) => ({
|
|
1933
1937
|
...e,
|
|
1934
|
-
fields: e.fields.filter((e) =>
|
|
1938
|
+
fields: e.fields.filter((e) => ft(e.condition, T))
|
|
1935
1939
|
})), P = M.length > 1, F = Math.min(O, Math.max(0, N.length - 1)), ee = P ? N[F]?.fields ?? [] : N.flatMap((e) => e.fields), te = ee.filter((e) => {
|
|
1936
1940
|
let t = T[e.name];
|
|
1937
1941
|
return e.required && (t == null || t === "" || t === !1);
|
|
@@ -1989,11 +1993,11 @@ function mt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
1989
1993
|
}
|
|
1990
1994
|
},
|
|
1991
1995
|
style: {
|
|
1992
|
-
...
|
|
1996
|
+
...ut,
|
|
1993
1997
|
display: A === "success" ? "none" : "flex"
|
|
1994
1998
|
},
|
|
1995
1999
|
children: c && s ? /* @__PURE__ */ f(u, { children: [
|
|
1996
|
-
P && /* @__PURE__ */ d(
|
|
2000
|
+
P && /* @__PURE__ */ d(Ut, {
|
|
1997
2001
|
steps: N.map((e) => ({ label: e.section?.label ?? "Start" })),
|
|
1998
2002
|
active: F + 1,
|
|
1999
2003
|
style: { marginBottom: 8 }
|
|
@@ -2006,7 +2010,7 @@ function mt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2006
2010
|
},
|
|
2007
2011
|
children: N[F].section.help
|
|
2008
2012
|
}),
|
|
2009
|
-
ee.map((e) => /* @__PURE__ */ d(
|
|
2013
|
+
ee.map((e) => /* @__PURE__ */ d(gt, {
|
|
2010
2014
|
field: e,
|
|
2011
2015
|
value: T[e.name],
|
|
2012
2016
|
values: T,
|
|
@@ -2025,7 +2029,7 @@ function mt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2025
2029
|
disabled: h || void 0,
|
|
2026
2030
|
onClick: () => k(F - 1),
|
|
2027
2031
|
style: {
|
|
2028
|
-
...
|
|
2032
|
+
...G,
|
|
2029
2033
|
background: "transparent",
|
|
2030
2034
|
color: "inherit",
|
|
2031
2035
|
border: 0,
|
|
@@ -2038,7 +2042,7 @@ function mt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2038
2042
|
disabled: h || te.length > 0,
|
|
2039
2043
|
onClick: () => k(F + 1),
|
|
2040
2044
|
style: {
|
|
2041
|
-
...
|
|
2045
|
+
...G,
|
|
2042
2046
|
border: 0,
|
|
2043
2047
|
padding: "10px 22px",
|
|
2044
2048
|
borderRadius: 8,
|
|
@@ -2052,7 +2056,7 @@ function mt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2052
2056
|
type: "submit",
|
|
2053
2057
|
disabled: h || void 0,
|
|
2054
2058
|
style: {
|
|
2055
|
-
...
|
|
2059
|
+
...G,
|
|
2056
2060
|
border: 0,
|
|
2057
2061
|
padding: "10px 22px",
|
|
2058
2062
|
borderRadius: 8,
|
|
@@ -2079,10 +2083,10 @@ function mt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2079
2083
|
]
|
|
2080
2084
|
});
|
|
2081
2085
|
}
|
|
2082
|
-
var
|
|
2086
|
+
var X = null, vt = null, yt = (e) => {
|
|
2083
2087
|
let t = typeof e == "string" && e.trim() ? e.trim() : "";
|
|
2084
|
-
if (
|
|
2085
|
-
if (
|
|
2088
|
+
if (X && vt === t) return X;
|
|
2089
|
+
if (X && typeof window < "u") {
|
|
2086
2090
|
for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
|
|
2087
2091
|
delete window[e];
|
|
2088
2092
|
} catch {
|
|
@@ -2090,22 +2094,22 @@ var Q = null, ht = null, gt = (e) => {
|
|
|
2090
2094
|
}
|
|
2091
2095
|
document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
|
|
2092
2096
|
}
|
|
2093
|
-
return
|
|
2097
|
+
return vt = t, X = new Promise((e) => {
|
|
2094
2098
|
if (typeof window > "u") return;
|
|
2095
2099
|
if (window.grecaptcha?.render) return e(window.grecaptcha);
|
|
2096
2100
|
window.__webimRecaptchaReady = () => e(window.grecaptcha);
|
|
2097
2101
|
let n = document.createElement("script");
|
|
2098
2102
|
n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
|
|
2099
|
-
}),
|
|
2103
|
+
}), X;
|
|
2100
2104
|
};
|
|
2101
|
-
function
|
|
2105
|
+
function bt({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert: l, onChange: u }) {
|
|
2102
2106
|
let p = i(V), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", h = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), g = c(null), _ = c(u);
|
|
2103
2107
|
if (_.current = u, a(() => {
|
|
2104
2108
|
if (l || !h || !g.current) return;
|
|
2105
2109
|
let e = !0, i = (t) => {
|
|
2106
2110
|
e && typeof _.current == "function" && _.current(t);
|
|
2107
2111
|
};
|
|
2108
|
-
return
|
|
2112
|
+
return yt(r).then((r) => {
|
|
2109
2113
|
if (!(!e || !g.current || !r?.render)) {
|
|
2110
2114
|
g.current.innerHTML = "", i("");
|
|
2111
2115
|
try {
|
|
@@ -2187,17 +2191,17 @@ function _t({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert:
|
|
|
2187
2191
|
children: /* @__PURE__ */ d("div", { ref: g })
|
|
2188
2192
|
}) : null;
|
|
2189
2193
|
}
|
|
2190
|
-
function
|
|
2194
|
+
function xt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
2191
2195
|
return /* @__PURE__ */ d("label", {
|
|
2192
2196
|
ref: r,
|
|
2193
2197
|
style: {
|
|
2194
|
-
...
|
|
2198
|
+
...q,
|
|
2195
2199
|
...D(n)
|
|
2196
2200
|
},
|
|
2197
|
-
children:
|
|
2201
|
+
children: K(t, e, i)
|
|
2198
2202
|
});
|
|
2199
2203
|
}
|
|
2200
|
-
function
|
|
2204
|
+
function St({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2201
2205
|
return /* @__PURE__ */ d("input", {
|
|
2202
2206
|
ref: a,
|
|
2203
2207
|
type: e,
|
|
@@ -2205,13 +2209,13 @@ function yt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
|
|
|
2205
2209
|
placeholder: n,
|
|
2206
2210
|
required: !o && !!r,
|
|
2207
2211
|
style: {
|
|
2208
|
-
...
|
|
2212
|
+
...J,
|
|
2209
2213
|
...D(i)
|
|
2210
2214
|
},
|
|
2211
|
-
...
|
|
2215
|
+
...Y(o)
|
|
2212
2216
|
});
|
|
2213
2217
|
}
|
|
2214
|
-
function
|
|
2218
|
+
function Ct({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2215
2219
|
return /* @__PURE__ */ d("textarea", {
|
|
2216
2220
|
ref: a,
|
|
2217
2221
|
name: e || void 0,
|
|
@@ -2219,18 +2223,18 @@ function bt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
|
|
|
2219
2223
|
rows: n,
|
|
2220
2224
|
required: !o && !!r,
|
|
2221
2225
|
style: {
|
|
2222
|
-
...
|
|
2226
|
+
...J,
|
|
2223
2227
|
resize: "vertical",
|
|
2224
2228
|
...D(i)
|
|
2225
2229
|
},
|
|
2226
|
-
...
|
|
2230
|
+
...Y(o)
|
|
2227
2231
|
});
|
|
2228
2232
|
}
|
|
2229
|
-
function
|
|
2233
|
+
function wt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
|
|
2230
2234
|
return /* @__PURE__ */ f("label", {
|
|
2231
2235
|
ref: o,
|
|
2232
2236
|
style: {
|
|
2233
|
-
...
|
|
2237
|
+
...dt,
|
|
2234
2238
|
...D(a)
|
|
2235
2239
|
},
|
|
2236
2240
|
children: [/* @__PURE__ */ d("input", {
|
|
@@ -2247,7 +2251,7 @@ function xt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
|
|
|
2247
2251
|
}), t]
|
|
2248
2252
|
});
|
|
2249
2253
|
}
|
|
2250
|
-
function
|
|
2254
|
+
function Tt({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
|
|
2251
2255
|
return /* @__PURE__ */ f("select", {
|
|
2252
2256
|
ref: a,
|
|
2253
2257
|
name: e || void 0,
|
|
@@ -2256,7 +2260,7 @@ function St({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2256
2260
|
onMouseDown: o ? (e) => e.preventDefault() : void 0,
|
|
2257
2261
|
tabIndex: o ? -1 : void 0,
|
|
2258
2262
|
style: {
|
|
2259
|
-
...
|
|
2263
|
+
...J,
|
|
2260
2264
|
appearance: "auto",
|
|
2261
2265
|
...D(i)
|
|
2262
2266
|
},
|
|
@@ -2270,12 +2274,12 @@ function St({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2270
2274
|
}, t))]
|
|
2271
2275
|
});
|
|
2272
2276
|
}
|
|
2273
|
-
function
|
|
2277
|
+
function Et({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
|
|
2274
2278
|
let [s, c] = l(null);
|
|
2275
2279
|
return /* @__PURE__ */ f("label", {
|
|
2276
2280
|
ref: a,
|
|
2277
2281
|
style: {
|
|
2278
|
-
...
|
|
2282
|
+
...J,
|
|
2279
2283
|
display: "flex",
|
|
2280
2284
|
alignItems: "center",
|
|
2281
2285
|
gap: "8px",
|
|
@@ -2302,12 +2306,12 @@ function Ct({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
|
|
|
2302
2306
|
]
|
|
2303
2307
|
});
|
|
2304
2308
|
}
|
|
2305
|
-
function
|
|
2309
|
+
function Dt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
2306
2310
|
return /* @__PURE__ */ d("button", {
|
|
2307
2311
|
ref: n,
|
|
2308
2312
|
type: r ? "button" : "submit",
|
|
2309
2313
|
style: {
|
|
2310
|
-
...
|
|
2314
|
+
...G,
|
|
2311
2315
|
border: 0,
|
|
2312
2316
|
cursor: "pointer",
|
|
2313
2317
|
alignSelf: "flex-start",
|
|
@@ -2322,7 +2326,7 @@ function wt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
|
2322
2326
|
children: e
|
|
2323
2327
|
});
|
|
2324
2328
|
}
|
|
2325
|
-
function
|
|
2329
|
+
function Ot({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
2326
2330
|
let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
|
|
2327
2331
|
return /* @__PURE__ */ d("div", {
|
|
2328
2332
|
ref: r,
|
|
@@ -2339,8 +2343,8 @@ function Tt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
|
2339
2343
|
}, t))
|
|
2340
2344
|
});
|
|
2341
2345
|
}
|
|
2342
|
-
function
|
|
2343
|
-
let { tenant: v, apiUrl: y, locale: b } = i(V), x = i(
|
|
2346
|
+
function kt({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, imageField: o, titleField: s = "name", textField: c, custom: u, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
|
|
2347
|
+
let { tenant: v, apiUrl: y, locale: b } = i(V), x = i(he), S = i(H), [, C] = l(0);
|
|
2344
2348
|
a(() => {
|
|
2345
2349
|
if (typeof window > "u") return;
|
|
2346
2350
|
let e = () => C((e) => e + 1);
|
|
@@ -2348,7 +2352,7 @@ function Et({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2348
2352
|
window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
|
|
2349
2353
|
};
|
|
2350
2354
|
}, []);
|
|
2351
|
-
let w =
|
|
2355
|
+
let w = me(h), T = JSON.stringify(w), E = T !== "{}" && !e?.startsWith?.("api:"), O = E ? null : S?.[e], k = m ? fe(S) : 1, [A, j] = l(null);
|
|
2352
2356
|
if (a(() => {
|
|
2353
2357
|
if (!e || O) return;
|
|
2354
2358
|
let n = !0, r = new URLSearchParams();
|
|
@@ -2393,7 +2397,7 @@ function Et({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2393
2397
|
},
|
|
2394
2398
|
children: N.map((e) => /* @__PURE__ */ d("div", {
|
|
2395
2399
|
style: { minWidth: 0 },
|
|
2396
|
-
children: x.render(p, (t) =>
|
|
2400
|
+
children: x.render(p, (t) => ve(t, e))
|
|
2397
2401
|
}, e.id ?? e?.data?.slug))
|
|
2398
2402
|
}) : /* @__PURE__ */ d("div", {
|
|
2399
2403
|
ref: _,
|
|
@@ -2403,7 +2407,7 @@ function Et({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2403
2407
|
...D(g)
|
|
2404
2408
|
},
|
|
2405
2409
|
children: N.map((e) => {
|
|
2406
|
-
let t = o ?
|
|
2410
|
+
let t = o ? U(e?.data, o) : null, r = s ? W(U(e?.data, s)) : null, i = c ? U(e?.data, c) : null, a = Array.isArray(i) ? i : null, l = a || i == null ? null : W(i), u = n === "list";
|
|
2407
2411
|
return /* @__PURE__ */ f("div", {
|
|
2408
2412
|
style: {
|
|
2409
2413
|
display: "flex",
|
|
@@ -2450,7 +2454,7 @@ function Et({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2450
2454
|
lineHeight: 1.55,
|
|
2451
2455
|
opacity: .85
|
|
2452
2456
|
},
|
|
2453
|
-
children:
|
|
2457
|
+
children: Pe(a)
|
|
2454
2458
|
})
|
|
2455
2459
|
]
|
|
2456
2460
|
})]
|
|
@@ -2458,8 +2462,8 @@ function Et({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2458
2462
|
})
|
|
2459
2463
|
});
|
|
2460
2464
|
}
|
|
2461
|
-
function
|
|
2462
|
-
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} :
|
|
2465
|
+
function At({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
|
|
2466
|
+
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : pe(), s = {
|
|
2463
2467
|
height: 34,
|
|
2464
2468
|
padding: "0 12px",
|
|
2465
2469
|
borderRadius: 8,
|
|
@@ -2507,7 +2511,7 @@ function Dt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2507
2511
|
name: `f_${e.name}`,
|
|
2508
2512
|
defaultValue: o[e.name] ?? "",
|
|
2509
2513
|
style: s,
|
|
2510
|
-
...
|
|
2514
|
+
...Y(i),
|
|
2511
2515
|
children: [/* @__PURE__ */ d("option", {
|
|
2512
2516
|
value: "",
|
|
2513
2517
|
children: e.label || e.name
|
|
@@ -2522,7 +2526,7 @@ function Dt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2522
2526
|
name: `f_${e.name}`,
|
|
2523
2527
|
defaultValue: o[e.name] ?? "",
|
|
2524
2528
|
style: s,
|
|
2525
|
-
...
|
|
2529
|
+
...Y(i),
|
|
2526
2530
|
children: [
|
|
2527
2531
|
/* @__PURE__ */ d("option", {
|
|
2528
2532
|
value: "",
|
|
@@ -2543,7 +2547,7 @@ function Dt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2543
2547
|
defaultValue: o[e.name] ?? "",
|
|
2544
2548
|
placeholder: e.label || e.name,
|
|
2545
2549
|
style: s,
|
|
2546
|
-
...
|
|
2550
|
+
...Y(i)
|
|
2547
2551
|
}, e.name)), /* @__PURE__ */ d("button", {
|
|
2548
2552
|
type: "submit",
|
|
2549
2553
|
style: {
|
|
@@ -2556,12 +2560,12 @@ function Dt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2556
2560
|
fontWeight: 600,
|
|
2557
2561
|
cursor: i ? "default" : "pointer"
|
|
2558
2562
|
},
|
|
2559
|
-
...
|
|
2563
|
+
...Y(i),
|
|
2560
2564
|
children: t
|
|
2561
2565
|
})]
|
|
2562
2566
|
});
|
|
2563
2567
|
}
|
|
2564
|
-
function
|
|
2568
|
+
function jt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
2565
2569
|
return e.length ? /* @__PURE__ */ d("nav", {
|
|
2566
2570
|
ref: r,
|
|
2567
2571
|
"aria-label": "Breadcrumb",
|
|
@@ -2611,7 +2615,7 @@ function Ot({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
|
2611
2615
|
})
|
|
2612
2616
|
}) : null;
|
|
2613
2617
|
}
|
|
2614
|
-
function
|
|
2618
|
+
function Mt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", source: o, pageSize: s = 6, align: c, hideEmpty: u, inert: p, style: m, nodeRef: h }) {
|
|
2615
2619
|
let { tenant: g, apiUrl: _ } = i(V), v = i(H), [y, b] = l(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
|
|
2616
2620
|
a(() => {
|
|
2617
2621
|
if (!o || Number.isFinite(x)) return;
|
|
@@ -2631,7 +2635,7 @@ function kt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
|
|
|
2631
2635
|
]);
|
|
2632
2636
|
let S = Math.max(1, Number(s) || 6), C = Number.isFinite(x) ? x : y;
|
|
2633
2637
|
if (o && C === null || o && u && !(C > 0)) return null;
|
|
2634
|
-
let w = Math.min(Math.max(o ? Math.ceil(C / S) : Number(e) || 1, 1), 50), T = Math.min(Math.max(o ?
|
|
2638
|
+
let w = Math.min(Math.max(o ? Math.ceil(C / S) : Number(e) || 1, 1), 50), T = Math.min(Math.max(o ? fe(v) : Number(t) || 1, 1), w), E = (e) => {
|
|
2635
2639
|
if (o) {
|
|
2636
2640
|
if (typeof window < "u") {
|
|
2637
2641
|
let t = new URLSearchParams(window.location.search);
|
|
@@ -2696,15 +2700,15 @@ function kt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
|
|
|
2696
2700
|
]
|
|
2697
2701
|
});
|
|
2698
2702
|
}
|
|
2699
|
-
var
|
|
2703
|
+
var Nt = "webim.page_mode", Pt = () => {
|
|
2700
2704
|
if (typeof window > "u") return "auto";
|
|
2701
2705
|
try {
|
|
2702
|
-
let e = window.localStorage.getItem(
|
|
2706
|
+
let e = window.localStorage.getItem(Nt);
|
|
2703
2707
|
return e === "light" || e === "dark" ? e : "auto";
|
|
2704
2708
|
} catch {
|
|
2705
2709
|
return "auto";
|
|
2706
2710
|
}
|
|
2707
|
-
},
|
|
2711
|
+
}, Ft = (e) => {
|
|
2708
2712
|
let t = {
|
|
2709
2713
|
width: 16,
|
|
2710
2714
|
height: 16,
|
|
@@ -2736,13 +2740,13 @@ var At = "webim.page_mode", jt = () => {
|
|
|
2736
2740
|
rx: "2"
|
|
2737
2741
|
}), /* @__PURE__ */ d("path", { d: "M8 21h8M12 17v4" })]
|
|
2738
2742
|
});
|
|
2739
|
-
},
|
|
2743
|
+
}, Z = {
|
|
2740
2744
|
light: "Light theme",
|
|
2741
2745
|
dark: "Dark theme",
|
|
2742
2746
|
auto: "Follow the device theme"
|
|
2743
2747
|
};
|
|
2744
|
-
function
|
|
2745
|
-
let [o, s] = l(i ? "auto" :
|
|
2748
|
+
function It({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
2749
|
+
let [o, s] = l(i ? "auto" : Pt), u = c(null), f = (e) => {
|
|
2746
2750
|
u.current = e, typeof r == "function" && r(e);
|
|
2747
2751
|
};
|
|
2748
2752
|
a(() => {
|
|
@@ -2750,7 +2754,7 @@ function Pt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
2750
2754
|
let e = u.current?.closest?.(".webim-page");
|
|
2751
2755
|
e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
|
|
2752
2756
|
try {
|
|
2753
|
-
o === "auto" ? window.localStorage.removeItem(
|
|
2757
|
+
o === "auto" ? window.localStorage.removeItem(Nt) : window.localStorage.setItem(Nt, o);
|
|
2754
2758
|
} catch {}
|
|
2755
2759
|
}, [o, i]);
|
|
2756
2760
|
let p = t === !1 ? ["light", "dark"] : [
|
|
@@ -2785,8 +2789,8 @@ function Pt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
2785
2789
|
},
|
|
2786
2790
|
children: p.map((e) => /* @__PURE__ */ d("button", {
|
|
2787
2791
|
type: "button",
|
|
2788
|
-
title:
|
|
2789
|
-
"aria-label":
|
|
2792
|
+
title: Z[e],
|
|
2793
|
+
"aria-label": Z[e],
|
|
2790
2794
|
"aria-pressed": e === m,
|
|
2791
2795
|
onClick: i ? void 0 : () => s(e),
|
|
2792
2796
|
style: {
|
|
@@ -2797,15 +2801,15 @@ function Pt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
2797
2801
|
background: e === m ? "var(--page-accent, #111827)" : "transparent",
|
|
2798
2802
|
opacity: e === m ? 1 : .7
|
|
2799
2803
|
},
|
|
2800
|
-
children:
|
|
2804
|
+
children: Ft(e)
|
|
2801
2805
|
}, e))
|
|
2802
2806
|
});
|
|
2803
2807
|
let g = p[(p.indexOf(m) + 1) % p.length];
|
|
2804
2808
|
return /* @__PURE__ */ d("button", {
|
|
2805
2809
|
ref: f,
|
|
2806
2810
|
type: "button",
|
|
2807
|
-
title:
|
|
2808
|
-
"aria-label": `Theme: ${
|
|
2811
|
+
title: Z[m],
|
|
2812
|
+
"aria-label": `Theme: ${Z[m]} — switch to ${Z[g]}`,
|
|
2809
2813
|
onClick: i ? void 0 : () => s(g),
|
|
2810
2814
|
style: {
|
|
2811
2815
|
...h,
|
|
@@ -2814,10 +2818,10 @@ function Pt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
2814
2818
|
border: "1px solid rgba(148, 163, 184, 0.4)",
|
|
2815
2819
|
...D(n)
|
|
2816
2820
|
},
|
|
2817
|
-
children:
|
|
2821
|
+
children: Ft(m)
|
|
2818
2822
|
});
|
|
2819
2823
|
}
|
|
2820
|
-
function
|
|
2824
|
+
function Lt(e) {
|
|
2821
2825
|
let t = e?.parentElement;
|
|
2822
2826
|
for (; t && t !== document.body;) {
|
|
2823
2827
|
let e = getComputedStyle(t).overflowY;
|
|
@@ -2826,7 +2830,7 @@ function Ft(e) {
|
|
|
2826
2830
|
}
|
|
2827
2831
|
return window;
|
|
2828
2832
|
}
|
|
2829
|
-
var
|
|
2833
|
+
var Rt = (e) => e === window ? window.scrollY : e.scrollTop, zt = {
|
|
2830
2834
|
"bottom-right": (e) => ({
|
|
2831
2835
|
right: e,
|
|
2832
2836
|
bottom: e
|
|
@@ -2841,22 +2845,33 @@ var It = (e) => e === window ? window.scrollY : e.scrollTop, Lt = {
|
|
|
2841
2845
|
transform: "translateX(-50%)"
|
|
2842
2846
|
})
|
|
2843
2847
|
};
|
|
2844
|
-
function
|
|
2845
|
-
let [
|
|
2846
|
-
|
|
2848
|
+
function Bt({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth: o, bg: s, fg: c, style: u, nodeRef: p, inert: m, frame: h, builder: g }) {
|
|
2849
|
+
let [_, v] = l(!!m), [y, b] = l(null), x = (e) => {
|
|
2850
|
+
b(e), typeof p == "function" && p(e);
|
|
2847
2851
|
};
|
|
2848
2852
|
a(() => {
|
|
2849
|
-
if (m
|
|
2850
|
-
|
|
2851
|
-
|
|
2853
|
+
if (m) {
|
|
2854
|
+
v(!0);
|
|
2855
|
+
return;
|
|
2856
|
+
}
|
|
2857
|
+
if (!y) return;
|
|
2858
|
+
let e = Number(i) >= 0 ? Number(i) : 300, t = () => {
|
|
2859
|
+
let t = Lt(y), n = g && !(t === window ? document.documentElement.scrollHeight > window.innerHeight : t.scrollHeight > t.clientHeight);
|
|
2860
|
+
v(n || Rt(t) > e);
|
|
2861
|
+
};
|
|
2862
|
+
return t(), document.addEventListener("scroll", t, {
|
|
2863
|
+
capture: !0,
|
|
2864
|
+
passive: !0
|
|
2865
|
+
}), () => document.removeEventListener("scroll", t, { capture: !0 });
|
|
2852
2866
|
}, [
|
|
2853
2867
|
m,
|
|
2854
|
-
|
|
2855
|
-
i
|
|
2868
|
+
y,
|
|
2869
|
+
i,
|
|
2870
|
+
g
|
|
2856
2871
|
]);
|
|
2857
|
-
let
|
|
2872
|
+
let S = () => {
|
|
2858
2873
|
if (m) return;
|
|
2859
|
-
let e =
|
|
2874
|
+
let e = Lt(y), t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, n = o === !1 || t ? "auto" : "smooth";
|
|
2860
2875
|
e === window ? window.scrollTo({
|
|
2861
2876
|
top: 0,
|
|
2862
2877
|
behavior: n
|
|
@@ -2864,53 +2879,53 @@ function Rt({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
2864
2879
|
top: 0,
|
|
2865
2880
|
behavior: n
|
|
2866
2881
|
});
|
|
2867
|
-
},
|
|
2882
|
+
}, C = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E = zt[n] ? n : "bottom-right", O = h ? {
|
|
2868
2883
|
position: "fixed",
|
|
2869
2884
|
zIndex: 5,
|
|
2870
|
-
bottom: (h.bottom ?? 0) +
|
|
2871
|
-
...
|
|
2872
|
-
...
|
|
2873
|
-
...
|
|
2885
|
+
bottom: (h.bottom ?? 0) + C,
|
|
2886
|
+
...E === "bottom-left" ? { left: (h.left ?? 0) + C } : null,
|
|
2887
|
+
...E === "bottom-right" ? { right: (h.right ?? 0) + C } : null,
|
|
2888
|
+
...E === "bottom-center" ? {
|
|
2874
2889
|
left: (h.left ?? 0) + (h.width ?? 0) / 2,
|
|
2875
2890
|
transform: "translateX(-50%)"
|
|
2876
2891
|
} : null
|
|
2877
2892
|
} : {
|
|
2878
2893
|
position: "fixed",
|
|
2879
2894
|
zIndex: 2147482e3,
|
|
2880
|
-
...
|
|
2895
|
+
...zt[E](C)
|
|
2881
2896
|
};
|
|
2882
2897
|
return /* @__PURE__ */ f("button", {
|
|
2883
|
-
ref:
|
|
2898
|
+
ref: x,
|
|
2884
2899
|
type: "button",
|
|
2885
|
-
title:
|
|
2886
|
-
"aria-label":
|
|
2887
|
-
"aria-hidden": !
|
|
2888
|
-
tabIndex:
|
|
2889
|
-
onClick:
|
|
2900
|
+
title: T,
|
|
2901
|
+
"aria-label": T,
|
|
2902
|
+
"aria-hidden": !_,
|
|
2903
|
+
tabIndex: _ ? 0 : -1,
|
|
2904
|
+
onClick: S,
|
|
2890
2905
|
style: {
|
|
2891
2906
|
display: "inline-flex",
|
|
2892
2907
|
alignItems: "center",
|
|
2893
2908
|
justifyContent: "center",
|
|
2894
|
-
gap:
|
|
2909
|
+
gap: w ? 8 : 0,
|
|
2895
2910
|
appearance: "none",
|
|
2896
2911
|
font: "inherit",
|
|
2897
2912
|
fontSize: 14,
|
|
2898
2913
|
fontWeight: 600,
|
|
2899
|
-
width:
|
|
2914
|
+
width: w ? "auto" : 44,
|
|
2900
2915
|
height: 44,
|
|
2901
|
-
padding:
|
|
2916
|
+
padding: w ? "0 18px" : 0,
|
|
2902
2917
|
borderRadius: 999,
|
|
2903
2918
|
border: "1px solid transparent",
|
|
2904
2919
|
background: s || "var(--page-accent, #111827)",
|
|
2905
2920
|
color: c || "var(--page-accent-text, #ffffff)",
|
|
2906
2921
|
boxShadow: "0 6px 20px rgba(15, 23, 42, 0.25)",
|
|
2907
2922
|
cursor: m ? "default" : "pointer",
|
|
2908
|
-
opacity: +!!
|
|
2909
|
-
pointerEvents:
|
|
2923
|
+
opacity: +!!_,
|
|
2924
|
+
pointerEvents: _ ? "auto" : "none",
|
|
2910
2925
|
transition: "opacity 160ms ease, transform 160ms ease",
|
|
2911
|
-
...
|
|
2926
|
+
...O,
|
|
2912
2927
|
...D(u),
|
|
2913
|
-
...
|
|
2928
|
+
...O.transform ? { transform: O.transform } : null
|
|
2914
2929
|
},
|
|
2915
2930
|
children: [/* @__PURE__ */ d("svg", {
|
|
2916
2931
|
width: "18",
|
|
@@ -2925,10 +2940,10 @@ function Rt({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
2925
2940
|
strokeLinecap: "round",
|
|
2926
2941
|
strokeLinejoin: "round"
|
|
2927
2942
|
})
|
|
2928
|
-
}),
|
|
2943
|
+
}), w ? /* @__PURE__ */ d("span", { children: T }) : null]
|
|
2929
2944
|
});
|
|
2930
2945
|
}
|
|
2931
|
-
var
|
|
2946
|
+
var Vt = {
|
|
2932
2947
|
facebook: {
|
|
2933
2948
|
label: "Facebook",
|
|
2934
2949
|
color: "#1877f2",
|
|
@@ -2995,8 +3010,8 @@ var zt = {
|
|
|
2995
3010
|
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"
|
|
2996
3011
|
}
|
|
2997
3012
|
};
|
|
2998
|
-
function
|
|
2999
|
-
let l = Array.isArray(e) ? e.filter((e) => e &&
|
|
3013
|
+
function Ht({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
|
|
3014
|
+
let l = Array.isArray(e) ? e.filter((e) => e && Vt[e.network]) : [];
|
|
3000
3015
|
if (!l.length) return null;
|
|
3001
3016
|
let u = Math.min(Math.max(Number(r) || 18, 10), 64), f = Math.round(u * 1.9), p = Number.isFinite(Number(i)) ? Number(i) : 10, m = (e) => n === "accent" ? "var(--page-accent, #111827)" : n === "inherit" ? "currentColor" : e.color, h = c ? (e) => e.preventDefault() : void 0;
|
|
3002
3017
|
return /* @__PURE__ */ d("div", {
|
|
@@ -3009,7 +3024,7 @@ function Bt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
3009
3024
|
...D(o)
|
|
3010
3025
|
},
|
|
3011
3026
|
children: l.map((e, r) => {
|
|
3012
|
-
let i =
|
|
3027
|
+
let i = Vt[e.network], o = t !== "outline" && t !== "plain", s = o ? n === "accent" ? "var(--page-accent-text, #ffffff)" : n === "inherit" ? "var(--page-bg, #ffffff)" : "#ffffff" : m(i);
|
|
3013
3028
|
return /* @__PURE__ */ d("a", {
|
|
3014
3029
|
href: e.url || "#",
|
|
3015
3030
|
onClick: h,
|
|
@@ -3043,7 +3058,7 @@ function Bt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
3043
3058
|
})
|
|
3044
3059
|
});
|
|
3045
3060
|
}
|
|
3046
|
-
function
|
|
3061
|
+
function Ut({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
|
|
3047
3062
|
if (!e.length) return null;
|
|
3048
3063
|
let o = Math.min(Math.max(Number(n) || 1, 1), e.length), s = (e) => ({
|
|
3049
3064
|
width: 32,
|
|
@@ -3121,7 +3136,7 @@ function Vt({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
|
|
|
3121
3136
|
})
|
|
3122
3137
|
});
|
|
3123
3138
|
}
|
|
3124
|
-
var
|
|
3139
|
+
var Wt = {
|
|
3125
3140
|
small: {
|
|
3126
3141
|
w: 132,
|
|
3127
3142
|
h: 46,
|
|
@@ -3143,10 +3158,10 @@ var Ht = {
|
|
|
3143
3158
|
title: 12.5,
|
|
3144
3159
|
avatar: 46
|
|
3145
3160
|
}
|
|
3146
|
-
},
|
|
3147
|
-
|
|
3148
|
-
function
|
|
3149
|
-
let r =
|
|
3161
|
+
}, Gt = (e) => Wt[e] ?? Wt.medium;
|
|
3162
|
+
Wt.medium.w, Wt.medium.h;
|
|
3163
|
+
function Kt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
3164
|
+
let r = Gt(t), i = n ? r.h : r.w, a = n ? 16 : 20, o = (n ? r.w : r.h) + (n ? 56 : 48), s = Array.isArray(e) ? e.filter((e) => e && e.id) : [], c = new Set(s.map((e) => e.id)), l = /* @__PURE__ */ new Map(), u = [];
|
|
3150
3165
|
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);
|
|
3151
3166
|
let d = /* @__PURE__ */ new Map(), f = (e, t) => {
|
|
3152
3167
|
if (t.has(e.id)) return 0;
|
|
@@ -3198,19 +3213,19 @@ function Wt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
|
3198
3213
|
horizontal: n
|
|
3199
3214
|
};
|
|
3200
3215
|
}
|
|
3201
|
-
var
|
|
3216
|
+
var qt = (e, t) => {
|
|
3202
3217
|
let n = String(e ?? "");
|
|
3203
3218
|
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
3204
|
-
},
|
|
3219
|
+
}, Jt = (e) => {
|
|
3205
3220
|
let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
|
|
3206
3221
|
if (!t) return "#ffffff";
|
|
3207
3222
|
let n = t[1];
|
|
3208
3223
|
n.length === 3 && (n = [...n].map((e) => e + e).join(""));
|
|
3209
3224
|
let r = parseInt(n, 16);
|
|
3210
3225
|
return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
|
|
3211
|
-
},
|
|
3212
|
-
function
|
|
3213
|
-
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 ? "" :
|
|
3226
|
+
}, Yt = (e) => !!(e?.cv?.trim?.() || e?.photo);
|
|
3227
|
+
function Xt(e, t = {}) {
|
|
3228
|
+
let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], r = (e) => Array.isArray(e) ? e[0] : e, i = (e) => e == null ? "" : W(e);
|
|
3214
3229
|
return n.map((e) => {
|
|
3215
3230
|
let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
|
|
3216
3231
|
return {
|
|
@@ -3224,11 +3239,11 @@ function Jt(e, t = {}) {
|
|
|
3224
3239
|
};
|
|
3225
3240
|
});
|
|
3226
3241
|
}
|
|
3227
|
-
var
|
|
3242
|
+
var Zt = {
|
|
3228
3243
|
size: 36,
|
|
3229
3244
|
pad: 10
|
|
3230
3245
|
};
|
|
3231
|
-
function
|
|
3246
|
+
function Qt({ node: e, onClose: t }) {
|
|
3232
3247
|
return a(() => {
|
|
3233
3248
|
let e = (e) => e.key === "Escape" && t();
|
|
3234
3249
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
@@ -3349,7 +3364,7 @@ function Xt({ node: e, onClose: t }) {
|
|
|
3349
3364
|
})
|
|
3350
3365
|
});
|
|
3351
3366
|
}
|
|
3352
|
-
function
|
|
3367
|
+
function $t({ nodes: e = [], source: t, nameField: n, titleField: r, photoField: s, parentField: c, cvField: p, hrefField: m, size: h = "medium", horizontal: g = !1, style: _, nodeRef: v, interactive: y = !0 }) {
|
|
3353
3368
|
let b = o(), [x, S] = l(null), { tenant: C, apiUrl: w } = i(V), T = i(H)?.[t], [E, O] = l(null);
|
|
3354
3369
|
a(() => {
|
|
3355
3370
|
if (!t || T) return;
|
|
@@ -3366,14 +3381,14 @@ function Zt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3366
3381
|
w,
|
|
3367
3382
|
T
|
|
3368
3383
|
]);
|
|
3369
|
-
let k = t ?
|
|
3384
|
+
let k = t ? Xt(T ?? E ?? [], {
|
|
3370
3385
|
nameField: n,
|
|
3371
3386
|
titleField: r,
|
|
3372
3387
|
photoField: s,
|
|
3373
3388
|
parentField: c,
|
|
3374
3389
|
cvField: p,
|
|
3375
3390
|
hrefField: m
|
|
3376
|
-
}) : e, A =
|
|
3391
|
+
}) : e, A = Gt(h), { boxes: j, links: M, width: N, height: P } = Kt(k, {
|
|
3377
3392
|
size: h,
|
|
3378
3393
|
horizontal: g
|
|
3379
3394
|
});
|
|
@@ -3419,7 +3434,7 @@ function Zt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3419
3434
|
stroke: "rgba(148, 163, 184, 0.7)",
|
|
3420
3435
|
strokeWidth: "1.5"
|
|
3421
3436
|
}, t)), j.map(({ node: e, x: t, y: n }) => {
|
|
3422
|
-
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 ?
|
|
3437
|
+
let r = F.has(e.id), i = !!e.color2, a = !!e.color || r || i, o = e.color || (r ? "var(--page-accent, #4f46e5)" : "var(--page-bg, #ffffff)"), s = e.color ? Jt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? Jt(e.color2) : s, l = y && (Yt(e) || e.href), p = () => Yt(e) ? S(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Zt.pad + A.avatar + 8 : t + A.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((A.w - A.avatar - 26) / 7) : Math.floor(A.w / 7.6), _ = A.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
|
|
3423
3438
|
return /* @__PURE__ */ f("g", {
|
|
3424
3439
|
onClick: l ? p : void 0,
|
|
3425
3440
|
style: l ? { cursor: "pointer" } : void 0,
|
|
@@ -3483,13 +3498,13 @@ function Zt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3483
3498
|
e.photo && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("clipPath", {
|
|
3484
3499
|
id: `${b}-${e.id}`,
|
|
3485
3500
|
children: /* @__PURE__ */ d("circle", {
|
|
3486
|
-
cx: t +
|
|
3501
|
+
cx: t + Zt.pad + A.avatar / 2,
|
|
3487
3502
|
cy: n + A.h / 2,
|
|
3488
3503
|
r: A.avatar / 2
|
|
3489
3504
|
})
|
|
3490
3505
|
}), /* @__PURE__ */ d("image", {
|
|
3491
3506
|
href: e.photo,
|
|
3492
|
-
x: t +
|
|
3507
|
+
x: t + Zt.pad,
|
|
3493
3508
|
y: n + (A.h - A.avatar) / 2,
|
|
3494
3509
|
width: A.avatar,
|
|
3495
3510
|
height: A.avatar,
|
|
@@ -3503,7 +3518,7 @@ function Zt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3503
3518
|
fontSize: A.title,
|
|
3504
3519
|
fontWeight: "600",
|
|
3505
3520
|
fill: s,
|
|
3506
|
-
children:
|
|
3521
|
+
children: qt(e.title, g + 4)
|
|
3507
3522
|
}), e.name && /* @__PURE__ */ d("text", {
|
|
3508
3523
|
x: m,
|
|
3509
3524
|
y: n + _ + _ / 2 + A.name * .35,
|
|
@@ -3511,7 +3526,7 @@ function Zt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3511
3526
|
fontSize: A.name,
|
|
3512
3527
|
fontWeight: "600",
|
|
3513
3528
|
fill: c,
|
|
3514
|
-
children:
|
|
3529
|
+
children: qt(e.name, g)
|
|
3515
3530
|
})] }) : /* @__PURE__ */ f(u, { children: [v[0] && /* @__PURE__ */ d("text", {
|
|
3516
3531
|
x: m,
|
|
3517
3532
|
y: n + (v[1] ? A.h * .43 : A.h * .57),
|
|
@@ -3519,7 +3534,7 @@ function Zt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3519
3534
|
fontSize: A.name,
|
|
3520
3535
|
fontWeight: "600",
|
|
3521
3536
|
fill: s,
|
|
3522
|
-
children:
|
|
3537
|
+
children: qt(v[0], g)
|
|
3523
3538
|
}), v[1] && /* @__PURE__ */ d("text", {
|
|
3524
3539
|
x: m,
|
|
3525
3540
|
y: n + A.h * .73,
|
|
@@ -3527,19 +3542,19 @@ function Zt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3527
3542
|
fontSize: A.title,
|
|
3528
3543
|
opacity: "0.7",
|
|
3529
3544
|
fill: s,
|
|
3530
|
-
children:
|
|
3545
|
+
children: qt(v[1], g + 4)
|
|
3531
3546
|
})] })
|
|
3532
3547
|
]
|
|
3533
3548
|
}, e.id);
|
|
3534
3549
|
})]
|
|
3535
|
-
}), x && /* @__PURE__ */ d(
|
|
3550
|
+
}), x && /* @__PURE__ */ d(Qt, {
|
|
3536
3551
|
node: x,
|
|
3537
3552
|
onClose: () => S(null)
|
|
3538
3553
|
})]
|
|
3539
3554
|
});
|
|
3540
3555
|
}
|
|
3541
|
-
function
|
|
3542
|
-
let { tenant: g, apiUrl: _ } = i(V), v = i(H), y = v?.[n], b = u ?
|
|
3556
|
+
function en({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped: o = !0, bordered: s = !1, compact: c = !1, paged: u, emptyText: p, style: m, nodeRef: h }) {
|
|
3557
|
+
let { tenant: g, apiUrl: _ } = i(V), v = i(H), y = v?.[n], b = u ? fe(v) : 1, [x, S] = l(null);
|
|
3543
3558
|
if (a(() => {
|
|
3544
3559
|
if (!n || y) return;
|
|
3545
3560
|
let e = !0, t = Math.max(1, Number(r) || 10), i = u && !n.startsWith("api:") ? `?offset=${(b - 1) * t}&limit=${t}` : "", a = n.startsWith("api:") ? `${_}/data/${encodeURIComponent(n.slice(4))}` : `${_}/dynamic/${encodeURIComponent(n)}${i}`;
|
|
@@ -3558,7 +3573,7 @@ function Qt({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped:
|
|
|
3558
3573
|
b,
|
|
3559
3574
|
r
|
|
3560
3575
|
]), !e.length) return null;
|
|
3561
|
-
let C = Math.max(1, Number(r) || 10), w = n ? u ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * C, b * C) : (x ?? []).slice(0, C) : (y ?? x ?? []).slice(0, C) : null, T = w ? w.map((t) => e.map((e) =>
|
|
3576
|
+
let C = Math.max(1, Number(r) || 10), w = n ? u ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * C, b * C) : (x ?? []).slice(0, C) : (y ?? x ?? []).slice(0, C) : null, T = w ? w.map((t) => e.map((e) => W(U(t?.data, e.field)))) : t, E = !!n && !(n && !y && x === null) && T.length === 0, O = c ? "6px 10px" : "10px 14px", k = "1px solid rgba(148, 163, 184, 0.35)", A = s ? { border: k } : { borderBottom: k };
|
|
3562
3577
|
return /* @__PURE__ */ d("div", {
|
|
3563
3578
|
ref: h,
|
|
3564
3579
|
style: {
|
|
@@ -3604,79 +3619,79 @@ function Qt({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped:
|
|
|
3604
3619
|
})
|
|
3605
3620
|
});
|
|
3606
3621
|
}
|
|
3607
|
-
var
|
|
3608
|
-
PageRoot:
|
|
3609
|
-
Section:
|
|
3610
|
-
Container:
|
|
3611
|
-
Heading:
|
|
3612
|
-
TextBlock:
|
|
3613
|
-
ButtonBlock:
|
|
3614
|
-
ImageBlock:
|
|
3615
|
-
Spacer:
|
|
3616
|
-
Divider:
|
|
3617
|
-
SliderBlock:
|
|
3618
|
-
CanvasSlider:
|
|
3619
|
-
TabsBlock:
|
|
3620
|
-
QuickStack:
|
|
3621
|
-
CollectionList:
|
|
3622
|
-
CollectionSearch:
|
|
3623
|
-
BreadcrumbsBlock:
|
|
3624
|
-
PaginationBlock:
|
|
3625
|
-
StepperBlock:
|
|
3626
|
-
SocialLinksBlock:
|
|
3627
|
-
ThemeModeBlock:
|
|
3628
|
-
ScrollTopBlock:
|
|
3629
|
-
OrgChartBlock:
|
|
3630
|
-
TableBlock:
|
|
3631
|
-
MasonryBlock:
|
|
3632
|
-
AccordionBlock:
|
|
3633
|
-
NavbarBlock:
|
|
3634
|
-
ListBlock:
|
|
3635
|
-
TextSpan:
|
|
3636
|
-
QuoteBlock:
|
|
3637
|
-
TextLink:
|
|
3638
|
-
RichTextBlock:
|
|
3639
|
-
RichContentBlock:
|
|
3640
|
-
VideoBlock:
|
|
3641
|
-
YouTubeBlock:
|
|
3642
|
-
IframeBlock:
|
|
3643
|
-
EmbedBlock:
|
|
3644
|
-
FormBlock:
|
|
3645
|
-
FormLabel:
|
|
3646
|
-
FormInput:
|
|
3647
|
-
FormTextarea:
|
|
3648
|
-
FormCheckbox: (e) => /* @__PURE__ */ d(
|
|
3622
|
+
var tn = {
|
|
3623
|
+
PageRoot: Te,
|
|
3624
|
+
Section: Ee,
|
|
3625
|
+
Container: De,
|
|
3626
|
+
Heading: Oe,
|
|
3627
|
+
TextBlock: ze,
|
|
3628
|
+
ButtonBlock: He,
|
|
3629
|
+
ImageBlock: Ue,
|
|
3630
|
+
Spacer: Ye,
|
|
3631
|
+
Divider: Xe,
|
|
3632
|
+
SliderBlock: nt,
|
|
3633
|
+
CanvasSlider: rt,
|
|
3634
|
+
TabsBlock: ct,
|
|
3635
|
+
QuickStack: Ot,
|
|
3636
|
+
CollectionList: kt,
|
|
3637
|
+
CollectionSearch: At,
|
|
3638
|
+
BreadcrumbsBlock: jt,
|
|
3639
|
+
PaginationBlock: Mt,
|
|
3640
|
+
StepperBlock: Ut,
|
|
3641
|
+
SocialLinksBlock: Ht,
|
|
3642
|
+
ThemeModeBlock: It,
|
|
3643
|
+
ScrollTopBlock: Bt,
|
|
3644
|
+
OrgChartBlock: $t,
|
|
3645
|
+
TableBlock: en,
|
|
3646
|
+
MasonryBlock: it,
|
|
3647
|
+
AccordionBlock: lt,
|
|
3648
|
+
NavbarBlock: st,
|
|
3649
|
+
ListBlock: Re,
|
|
3650
|
+
TextSpan: je,
|
|
3651
|
+
QuoteBlock: Le,
|
|
3652
|
+
TextLink: Ve,
|
|
3653
|
+
RichTextBlock: Fe,
|
|
3654
|
+
RichContentBlock: Fe,
|
|
3655
|
+
VideoBlock: We,
|
|
3656
|
+
YouTubeBlock: Ke,
|
|
3657
|
+
IframeBlock: qe,
|
|
3658
|
+
EmbedBlock: Je,
|
|
3659
|
+
FormBlock: _t,
|
|
3660
|
+
FormLabel: xt,
|
|
3661
|
+
FormInput: St,
|
|
3662
|
+
FormTextarea: Ct,
|
|
3663
|
+
FormCheckbox: (e) => /* @__PURE__ */ d(wt, {
|
|
3649
3664
|
kind: "checkbox",
|
|
3650
3665
|
...e
|
|
3651
3666
|
}),
|
|
3652
|
-
FormRadio: (e) => /* @__PURE__ */ d(
|
|
3667
|
+
FormRadio: (e) => /* @__PURE__ */ d(wt, {
|
|
3653
3668
|
kind: "radio",
|
|
3654
3669
|
...e
|
|
3655
3670
|
}),
|
|
3656
|
-
FormSelect:
|
|
3657
|
-
FormFile:
|
|
3658
|
-
FormRecaptcha:
|
|
3659
|
-
FormSubmit:
|
|
3660
|
-
},
|
|
3671
|
+
FormSelect: Tt,
|
|
3672
|
+
FormFile: Et,
|
|
3673
|
+
FormRecaptcha: bt,
|
|
3674
|
+
FormSubmit: Dt
|
|
3675
|
+
}, nn = {
|
|
3661
3676
|
id: "auth",
|
|
3662
3677
|
label: "Accounts",
|
|
3663
3678
|
category: "Apps",
|
|
3664
3679
|
keys: ["SiteLoginForm", "SiteAccountMenu"],
|
|
3665
3680
|
ssr: "shell",
|
|
3666
3681
|
settings: ["site.authRedirect"]
|
|
3667
|
-
},
|
|
3682
|
+
}, rn = n({
|
|
3668
3683
|
user: null,
|
|
3669
3684
|
status: "idle",
|
|
3670
3685
|
ensure: () => {},
|
|
3671
3686
|
refresh: () => {},
|
|
3672
3687
|
signOut: () => {}
|
|
3673
|
-
}),
|
|
3674
|
-
let e = i(
|
|
3688
|
+
}), an = () => {
|
|
3689
|
+
let e = i(rn);
|
|
3675
3690
|
return a(() => {
|
|
3676
3691
|
e.ensure();
|
|
3677
3692
|
}, [e]), e;
|
|
3678
3693
|
};
|
|
3679
|
-
function
|
|
3694
|
+
function on({ children: e, initialUser: t, disabled: n, apiUrl: a, tenant: o }) {
|
|
3680
3695
|
let u = i(V), f = a || u?.apiUrl || "/api", p = o || u?.tenant || "", [m, h] = l(t ?? null), [g, _] = l(t ? "user" : n ? "guest" : "idle"), v = c(!1), y = r((e, t) => fetch(`${f}${e}`, {
|
|
3681
3696
|
...t,
|
|
3682
3697
|
credentials: "include",
|
|
@@ -3709,18 +3724,18 @@ function rn({ children: e, initialUser: t, disabled: n, apiUrl: a, tenant: o })
|
|
|
3709
3724
|
b,
|
|
3710
3725
|
x
|
|
3711
3726
|
]);
|
|
3712
|
-
return /* @__PURE__ */ d(
|
|
3727
|
+
return /* @__PURE__ */ d(rn.Provider, {
|
|
3713
3728
|
value: C,
|
|
3714
3729
|
children: e
|
|
3715
3730
|
});
|
|
3716
3731
|
}
|
|
3717
|
-
function
|
|
3718
|
-
let { status: n } =
|
|
3732
|
+
function sn({ when: e, children: t }) {
|
|
3733
|
+
let { status: n } = an();
|
|
3719
3734
|
return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
|
|
3720
3735
|
}
|
|
3721
3736
|
//#endregion
|
|
3722
3737
|
//#region ../ui/src/components/builder/apps/auth/views.jsx
|
|
3723
|
-
function
|
|
3738
|
+
function cn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordLabel: r = "Password", nameLabel: a = "Name", submitLabel: o, style: s, nodeRef: c, inert: u, linked: p, show: m }) {
|
|
3724
3739
|
let { tenant: h, apiUrl: g, settings: _ } = i(V), [v, y] = l("form"), [b, x] = l(""), [S, C] = l(!1), w = e === "register", T = u ? m || "form" : v, E = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", O = async (e) => {
|
|
3725
3740
|
if (e.preventDefault(), u) return;
|
|
3726
3741
|
let n = new FormData(e.currentTarget);
|
|
@@ -3769,20 +3784,20 @@ function on({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3769
3784
|
children: [
|
|
3770
3785
|
w ? /* @__PURE__ */ f("label", {
|
|
3771
3786
|
style: {
|
|
3772
|
-
...
|
|
3787
|
+
...q,
|
|
3773
3788
|
display: "grid",
|
|
3774
3789
|
gap: 6
|
|
3775
3790
|
},
|
|
3776
3791
|
children: [a, /* @__PURE__ */ d("input", {
|
|
3777
3792
|
name: "name",
|
|
3778
3793
|
type: "text",
|
|
3779
|
-
style:
|
|
3780
|
-
...
|
|
3794
|
+
style: J,
|
|
3795
|
+
...Y(u)
|
|
3781
3796
|
})]
|
|
3782
3797
|
}) : null,
|
|
3783
3798
|
/* @__PURE__ */ f("label", {
|
|
3784
3799
|
style: {
|
|
3785
|
-
...
|
|
3800
|
+
...q,
|
|
3786
3801
|
display: "grid",
|
|
3787
3802
|
gap: 6
|
|
3788
3803
|
},
|
|
@@ -3790,13 +3805,13 @@ function on({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3790
3805
|
name: "email",
|
|
3791
3806
|
type: "email",
|
|
3792
3807
|
required: !u,
|
|
3793
|
-
style:
|
|
3794
|
-
...
|
|
3808
|
+
style: J,
|
|
3809
|
+
...Y(u)
|
|
3795
3810
|
})]
|
|
3796
3811
|
}),
|
|
3797
3812
|
/* @__PURE__ */ f("label", {
|
|
3798
3813
|
style: {
|
|
3799
|
-
...
|
|
3814
|
+
...q,
|
|
3800
3815
|
display: "grid",
|
|
3801
3816
|
gap: 6
|
|
3802
3817
|
},
|
|
@@ -3804,15 +3819,15 @@ function on({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3804
3819
|
name: "password",
|
|
3805
3820
|
type: "password",
|
|
3806
3821
|
required: !u,
|
|
3807
|
-
style:
|
|
3808
|
-
...
|
|
3822
|
+
style: J,
|
|
3823
|
+
...Y(u)
|
|
3809
3824
|
})]
|
|
3810
3825
|
}),
|
|
3811
3826
|
/* @__PURE__ */ d("button", {
|
|
3812
3827
|
type: u ? "button" : "submit",
|
|
3813
3828
|
disabled: S || void 0,
|
|
3814
3829
|
style: {
|
|
3815
|
-
...
|
|
3830
|
+
...G,
|
|
3816
3831
|
border: 0,
|
|
3817
3832
|
padding: "10px 22px",
|
|
3818
3833
|
borderRadius: 8,
|
|
@@ -3844,8 +3859,8 @@ function on({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3844
3859
|
]
|
|
3845
3860
|
});
|
|
3846
3861
|
}
|
|
3847
|
-
function
|
|
3848
|
-
let { user: c, status: l, signOut: u } =
|
|
3862
|
+
function ln({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
|
|
3863
|
+
let { user: c, status: l, signOut: u } = an(), p = a ? s || "user" : l, m = a ? {
|
|
3849
3864
|
name: "Ada Lovelace",
|
|
3850
3865
|
email: "ada@example.com"
|
|
3851
3866
|
} : c;
|
|
@@ -3866,7 +3881,7 @@ function sn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3866
3881
|
children: [
|
|
3867
3882
|
/* @__PURE__ */ f("span", {
|
|
3868
3883
|
style: {
|
|
3869
|
-
...
|
|
3884
|
+
...q,
|
|
3870
3885
|
fontWeight: 600
|
|
3871
3886
|
},
|
|
3872
3887
|
children: [
|
|
@@ -3877,7 +3892,7 @@ function sn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3877
3892
|
}),
|
|
3878
3893
|
n && m?.email ? /* @__PURE__ */ d("span", {
|
|
3879
3894
|
style: {
|
|
3880
|
-
...
|
|
3895
|
+
...q,
|
|
3881
3896
|
opacity: .7
|
|
3882
3897
|
},
|
|
3883
3898
|
children: m.email
|
|
@@ -3886,14 +3901,14 @@ function sn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3886
3901
|
type: "button",
|
|
3887
3902
|
onClick: a ? void 0 : u,
|
|
3888
3903
|
style: {
|
|
3889
|
-
...
|
|
3904
|
+
...G,
|
|
3890
3905
|
border: 0,
|
|
3891
3906
|
padding: "8px 16px",
|
|
3892
3907
|
borderRadius: 8,
|
|
3893
3908
|
fontSize: 14,
|
|
3894
3909
|
cursor: a ? "default" : "pointer"
|
|
3895
3910
|
},
|
|
3896
|
-
...
|
|
3911
|
+
...Y(a),
|
|
3897
3912
|
children: t
|
|
3898
3913
|
})
|
|
3899
3914
|
]
|
|
@@ -3910,40 +3925,40 @@ function sn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3910
3925
|
}
|
|
3911
3926
|
//#endregion
|
|
3912
3927
|
//#region ../ui/src/components/builder/apps/consent/manifest.js
|
|
3913
|
-
var
|
|
3928
|
+
var un = {
|
|
3914
3929
|
id: "consent",
|
|
3915
3930
|
label: "Cookie consent",
|
|
3916
3931
|
category: "Apps",
|
|
3917
3932
|
keys: ["CookieConsent"],
|
|
3918
3933
|
ssr: "shell",
|
|
3919
3934
|
settings: []
|
|
3920
|
-
},
|
|
3921
|
-
function
|
|
3935
|
+
}, dn = "webim.cookie_consent";
|
|
3936
|
+
function fn() {
|
|
3922
3937
|
try {
|
|
3923
|
-
let e = window.localStorage.getItem(
|
|
3938
|
+
let e = window.localStorage.getItem(dn), t = e ? JSON.parse(e) : null;
|
|
3924
3939
|
return t?.choice === "accepted" || t?.choice === "declined" ? t.choice : "";
|
|
3925
3940
|
} catch {
|
|
3926
3941
|
return "";
|
|
3927
3942
|
}
|
|
3928
3943
|
}
|
|
3929
|
-
function
|
|
3944
|
+
function pn(e) {
|
|
3930
3945
|
try {
|
|
3931
3946
|
document.querySelectorAll(".webim-page").forEach((t) => t.setAttribute("data-webim-consent", e));
|
|
3932
3947
|
} catch {}
|
|
3933
3948
|
}
|
|
3934
|
-
function
|
|
3949
|
+
function mn(e) {
|
|
3935
3950
|
try {
|
|
3936
|
-
window.localStorage.setItem(
|
|
3951
|
+
window.localStorage.setItem(dn, JSON.stringify({
|
|
3937
3952
|
choice: e,
|
|
3938
3953
|
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
3939
3954
|
}));
|
|
3940
3955
|
} catch {}
|
|
3941
|
-
|
|
3956
|
+
pn(e);
|
|
3942
3957
|
try {
|
|
3943
3958
|
window.dispatchEvent(new CustomEvent("webim:consent", { detail: { choice: e } }));
|
|
3944
3959
|
} catch {}
|
|
3945
3960
|
}
|
|
3946
|
-
var
|
|
3961
|
+
var hn = {
|
|
3947
3962
|
bottom: {
|
|
3948
3963
|
left: 0,
|
|
3949
3964
|
right: 0,
|
|
@@ -3965,21 +3980,21 @@ var pn = {
|
|
|
3965
3980
|
maxWidth: 400
|
|
3966
3981
|
}
|
|
3967
3982
|
};
|
|
3968
|
-
function
|
|
3983
|
+
function gn({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: i, linkHref: o, position: s, linked: c, style: p, nodeRef: m, inert: h }) {
|
|
3969
3984
|
let [g, _] = l(!!h), [v, y] = l(null), b = (e) => {
|
|
3970
3985
|
y(e), typeof m == "function" && m(e);
|
|
3971
3986
|
};
|
|
3972
3987
|
if (a(() => {
|
|
3973
3988
|
if (h) return;
|
|
3974
|
-
let e =
|
|
3989
|
+
let e = fn();
|
|
3975
3990
|
if (e) {
|
|
3976
3991
|
let t = v?.closest?.(".webim-page");
|
|
3977
3992
|
t && t.setAttribute("data-webim-consent", e);
|
|
3978
3993
|
} else _(!0);
|
|
3979
3994
|
}, [h, v]), !g) return null;
|
|
3980
3995
|
let x = (e) => () => {
|
|
3981
|
-
h || (
|
|
3982
|
-
}, S =
|
|
3996
|
+
h || (mn(e, v), _(!1));
|
|
3997
|
+
}, S = hn[s] ?? hn.bottom, C = {
|
|
3983
3998
|
appearance: "none",
|
|
3984
3999
|
font: "inherit",
|
|
3985
4000
|
fontSize: 14,
|
|
@@ -4059,7 +4074,7 @@ function mn({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLab
|
|
|
4059
4074
|
}
|
|
4060
4075
|
//#endregion
|
|
4061
4076
|
//#region ../ui/src/components/builder/apps/language/manifest.js
|
|
4062
|
-
var
|
|
4077
|
+
var _n = {
|
|
4063
4078
|
id: "language",
|
|
4064
4079
|
label: "Language",
|
|
4065
4080
|
category: "Apps",
|
|
@@ -4069,21 +4084,21 @@ var hn = {
|
|
|
4069
4084
|
};
|
|
4070
4085
|
//#endregion
|
|
4071
4086
|
//#region ../ui/src/components/builder/apps/language/views.jsx
|
|
4072
|
-
function
|
|
4087
|
+
function vn(e) {
|
|
4073
4088
|
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());
|
|
4074
4089
|
return [...new Set(n.map((e) => e.trim()))];
|
|
4075
4090
|
}
|
|
4076
|
-
var
|
|
4077
|
-
function
|
|
4091
|
+
var yn = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
|
|
4092
|
+
function bn(e, t) {
|
|
4078
4093
|
let n = String(e ?? "").toUpperCase();
|
|
4079
4094
|
if (t === "code") return n;
|
|
4080
4095
|
let r = "";
|
|
4081
4096
|
try {
|
|
4082
|
-
r =
|
|
4097
|
+
r = yn(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
|
|
4083
4098
|
} catch {}
|
|
4084
4099
|
return !r || r.toUpperCase() === n ? n : t === "both" ? `${n} — ${r}` : r;
|
|
4085
4100
|
}
|
|
4086
|
-
function
|
|
4101
|
+
function xn(e, t) {
|
|
4087
4102
|
let n = t ? "" : `?locale=${encodeURIComponent(e)}`;
|
|
4088
4103
|
if (typeof window > "u") return n || "?";
|
|
4089
4104
|
try {
|
|
@@ -4093,8 +4108,8 @@ function yn(e, t) {
|
|
|
4093
4108
|
return n || "/";
|
|
4094
4109
|
}
|
|
4095
4110
|
}
|
|
4096
|
-
function
|
|
4097
|
-
let c = i(V), l =
|
|
4111
|
+
function Sn({ variant: e, display: t, separator: n, label: r, style: a, nodeRef: o, inert: s }) {
|
|
4112
|
+
let c = i(V), l = vn(c?.settings), u = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : u, m = {
|
|
4098
4113
|
display: "inline-flex",
|
|
4099
4114
|
alignItems: "center",
|
|
4100
4115
|
gap: 8,
|
|
@@ -4129,7 +4144,7 @@ function bn({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
4129
4144
|
style: { opacity: .4 },
|
|
4130
4145
|
children: n ?? "·"
|
|
4131
4146
|
}), /* @__PURE__ */ d("a", {
|
|
4132
|
-
href:
|
|
4147
|
+
href: xn(e, e === u),
|
|
4133
4148
|
hrefLang: e,
|
|
4134
4149
|
"aria-current": e === p ? "true" : void 0,
|
|
4135
4150
|
onClick: s ? (e) => e.preventDefault() : void 0,
|
|
@@ -4139,7 +4154,7 @@ function bn({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
4139
4154
|
textDecoration: "none",
|
|
4140
4155
|
cursor: s ? "default" : "pointer"
|
|
4141
4156
|
},
|
|
4142
|
-
children:
|
|
4157
|
+
children: bn(e, t)
|
|
4143
4158
|
})]
|
|
4144
4159
|
}, e))]
|
|
4145
4160
|
}) : /* @__PURE__ */ f("div", {
|
|
@@ -4150,7 +4165,7 @@ function bn({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
4150
4165
|
value: p,
|
|
4151
4166
|
onChange: s ? void 0 : (e) => {
|
|
4152
4167
|
let t = e.target.value;
|
|
4153
|
-
window.location.assign(
|
|
4168
|
+
window.location.assign(xn(t, t === u));
|
|
4154
4169
|
},
|
|
4155
4170
|
onKeyDown: s ? (e) => e.preventDefault() : void 0,
|
|
4156
4171
|
style: {
|
|
@@ -4164,55 +4179,55 @@ function bn({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
4164
4179
|
},
|
|
4165
4180
|
children: l.map((e) => /* @__PURE__ */ d("option", {
|
|
4166
4181
|
value: e,
|
|
4167
|
-
children:
|
|
4182
|
+
children: bn(e, t)
|
|
4168
4183
|
}, e))
|
|
4169
4184
|
})]
|
|
4170
4185
|
});
|
|
4171
4186
|
}
|
|
4172
4187
|
//#endregion
|
|
4173
4188
|
//#region ../ui/src/components/builder/apps/index.js
|
|
4174
|
-
var
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
],
|
|
4179
|
-
SiteLoginForm:
|
|
4180
|
-
SiteAccountMenu:
|
|
4181
|
-
SiteLanguagePicker:
|
|
4182
|
-
CookieConsent:
|
|
4189
|
+
var Cn = [
|
|
4190
|
+
nn,
|
|
4191
|
+
_n,
|
|
4192
|
+
un
|
|
4193
|
+
], wn = {
|
|
4194
|
+
SiteLoginForm: cn,
|
|
4195
|
+
SiteAccountMenu: ln,
|
|
4196
|
+
SiteLanguagePicker: Sn,
|
|
4197
|
+
CookieConsent: gn
|
|
4183
4198
|
};
|
|
4184
|
-
new Set(
|
|
4199
|
+
new Set(Cn.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
|
|
4185
4200
|
//#endregion
|
|
4186
4201
|
//#region ../ui/src/components/builder/plugins/runtime.js
|
|
4187
|
-
var
|
|
4188
|
-
function
|
|
4189
|
-
if (
|
|
4202
|
+
var Tn = /* @__PURE__ */ new Map();
|
|
4203
|
+
function En(e) {
|
|
4204
|
+
if (Tn.has(e)) return Tn.get(e);
|
|
4190
4205
|
let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
|
|
4191
4206
|
/* @vite-ignore */
|
|
4192
4207
|
/* webpackIgnore: true */
|
|
4193
4208
|
t
|
|
4194
4209
|
).finally(() => URL.revokeObjectURL(t));
|
|
4195
|
-
return
|
|
4210
|
+
return Tn.set(e, n), n;
|
|
4196
4211
|
}
|
|
4197
|
-
function
|
|
4212
|
+
function Dn(e) {
|
|
4198
4213
|
let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
|
|
4199
4214
|
return n && typeof n == "object" ? n : {};
|
|
4200
4215
|
}
|
|
4201
4216
|
//#endregion
|
|
4202
4217
|
//#region ../ui/src/components/builder/plugins/view.jsx
|
|
4203
|
-
async function
|
|
4204
|
-
let n = await
|
|
4218
|
+
async function On(e, t) {
|
|
4219
|
+
let n = await En(e);
|
|
4205
4220
|
return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
|
|
4206
4221
|
}
|
|
4207
|
-
var
|
|
4222
|
+
var kn = {
|
|
4208
4223
|
padding: "10px 12px",
|
|
4209
4224
|
border: "1px dashed rgba(148, 163, 184, 0.5)",
|
|
4210
4225
|
borderRadius: 8,
|
|
4211
4226
|
fontSize: 12,
|
|
4212
4227
|
opacity: .6
|
|
4213
4228
|
};
|
|
4214
|
-
function
|
|
4215
|
-
let s = i(V), l =
|
|
4229
|
+
function An({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
4230
|
+
let s = i(V), l = Dn(s?.settings)[e], u = c(null), p = c(null), m = {
|
|
4216
4231
|
tenant: s?.tenant ?? "",
|
|
4217
4232
|
apiUrl: s?.apiUrl ?? "/api",
|
|
4218
4233
|
locale: s?.locale ?? "",
|
|
@@ -4224,7 +4239,7 @@ function On({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
4224
4239
|
let e = u.current;
|
|
4225
4240
|
if (!l?.code || !e) return;
|
|
4226
4241
|
let n = !0;
|
|
4227
|
-
return
|
|
4242
|
+
return On(l.code, t).then((e) => {
|
|
4228
4243
|
if (!(!n || !e || !u.current)) {
|
|
4229
4244
|
p.current = e;
|
|
4230
4245
|
try {
|
|
@@ -4254,7 +4269,7 @@ function On({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
4254
4269
|
}) : /* @__PURE__ */ f("div", {
|
|
4255
4270
|
ref: o,
|
|
4256
4271
|
style: {
|
|
4257
|
-
...
|
|
4272
|
+
...kn,
|
|
4258
4273
|
...D(r)
|
|
4259
4274
|
},
|
|
4260
4275
|
children: [
|
|
@@ -4266,12 +4281,12 @@ function On({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
4266
4281
|
}
|
|
4267
4282
|
//#endregion
|
|
4268
4283
|
//#region ../ui/src/components/builder/render.jsx
|
|
4269
|
-
var
|
|
4270
|
-
|
|
4271
|
-
...
|
|
4272
|
-
PluginBlock:
|
|
4284
|
+
var jn = {
|
|
4285
|
+
...tn,
|
|
4286
|
+
...wn,
|
|
4287
|
+
PluginBlock: An
|
|
4273
4288
|
};
|
|
4274
|
-
function
|
|
4289
|
+
function Q(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
4275
4290
|
let o = n[e];
|
|
4276
4291
|
if (!o || o.hidden) return null;
|
|
4277
4292
|
let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
|
|
@@ -4279,29 +4294,29 @@ function An(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
4279
4294
|
let n = o.props?.componentId, s = r?.[n];
|
|
4280
4295
|
if (!s?.template || i.has(n)) return null;
|
|
4281
4296
|
let c = new Set(i).add(n);
|
|
4282
|
-
return /* @__PURE__ */ d(t, { children:
|
|
4297
|
+
return /* @__PURE__ */ d(t, { children: Q(s.template.rootId, s.template.nodes, r, c, a) }, e);
|
|
4283
4298
|
}
|
|
4284
|
-
let l =
|
|
4299
|
+
let l = jn[s];
|
|
4285
4300
|
if (!l) return null;
|
|
4286
|
-
let u = (o.nodes ?? []).map((e) =>
|
|
4301
|
+
let u = (o.nodes ?? []).map((e) => Q(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, Q(t, n, r, i)])) : void 0, m = /* @__PURE__ */ d(l, {
|
|
4287
4302
|
...c,
|
|
4288
4303
|
...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
|
|
4289
4304
|
linked: p,
|
|
4290
4305
|
nodeRef: (t) => {
|
|
4291
|
-
t && (t.setAttribute("data-wb", e),
|
|
4306
|
+
t && (t.setAttribute("data-wb", e), M(t, c));
|
|
4292
4307
|
},
|
|
4293
4308
|
children: u.length ? u : void 0
|
|
4294
4309
|
}, e);
|
|
4295
|
-
return c.when && c.when !== "always" ? /* @__PURE__ */ d(
|
|
4310
|
+
return c.when && c.when !== "always" ? /* @__PURE__ */ d(sn, {
|
|
4296
4311
|
when: c.when,
|
|
4297
4312
|
children: m
|
|
4298
4313
|
}, e) : m;
|
|
4299
4314
|
}
|
|
4300
4315
|
//#endregion
|
|
4301
4316
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
4302
|
-
var
|
|
4317
|
+
var Mn = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Nn = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(B(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
|
|
4303
4318
|
.webim-page[data-webim-mode="dark"] { ${Object.entries(B(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
|
|
4304
|
-
function
|
|
4319
|
+
function Pn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, custom: o, tenant: c, apiUrl: l, datasets: u, locale: p, direction: m, settings: g, siteUser: _ }) {
|
|
4305
4320
|
let v = o?.js?.trim();
|
|
4306
4321
|
if (a(() => {
|
|
4307
4322
|
if (!v) return;
|
|
@@ -4315,11 +4330,11 @@ function Nn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
4315
4330
|
minHeight: "100%",
|
|
4316
4331
|
display: "flex",
|
|
4317
4332
|
flexDirection: "column"
|
|
4318
|
-
}, w =
|
|
4333
|
+
}, w = Q("ROOT", e, n), T = s(() => ({ render: (t, r) => Q(t, e, n, void 0, { mapProps: r }) }), [e, n]), E = ie(e, n), D = re(e, n), O = o?.css?.trim(), k = se(t), A = [k.font, k.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !z[e]), j = [.../* @__PURE__ */ new Set([...C(e, n), ...A])].map((e) => /* @__PURE__ */ d("link", {
|
|
4319
4334
|
rel: "stylesheet",
|
|
4320
4335
|
precedence: "default",
|
|
4321
4336
|
href: b(e)
|
|
4322
|
-
}, e)), M =
|
|
4337
|
+
}, e)), M = Nn(k);
|
|
4323
4338
|
return r === "auto" ? /* @__PURE__ */ d(V.Provider, {
|
|
4324
4339
|
value: {
|
|
4325
4340
|
tenant: c || "",
|
|
@@ -4327,23 +4342,23 @@ function Nn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
4327
4342
|
locale: p || "",
|
|
4328
4343
|
settings: g ?? null
|
|
4329
4344
|
},
|
|
4330
|
-
children: /* @__PURE__ */ d(
|
|
4345
|
+
children: /* @__PURE__ */ d(on, {
|
|
4331
4346
|
initialUser: _,
|
|
4332
4347
|
children: /* @__PURE__ */ d(H.Provider, {
|
|
4333
4348
|
value: u ?? null,
|
|
4334
|
-
children: /* @__PURE__ */ d(
|
|
4349
|
+
children: /* @__PURE__ */ d(he.Provider, {
|
|
4335
4350
|
value: T,
|
|
4336
4351
|
children: /* @__PURE__ */ f("div", {
|
|
4337
4352
|
...y,
|
|
4338
4353
|
className: "webim-page",
|
|
4339
4354
|
style: {
|
|
4340
4355
|
...S,
|
|
4341
|
-
...
|
|
4356
|
+
...ce(t),
|
|
4342
4357
|
...i
|
|
4343
4358
|
},
|
|
4344
4359
|
children: [
|
|
4345
|
-
/* @__PURE__ */ d("style", { children: `.webim-page { ${
|
|
4346
|
-
@media (prefers-color-scheme: dark) { .webim-page { ${
|
|
4360
|
+
/* @__PURE__ */ d("style", { children: `.webim-page { ${Mn(B(k.light))} }
|
|
4361
|
+
@media (prefers-color-scheme: dark) { .webim-page { ${Mn(B(k.dark))} } }` }),
|
|
4347
4362
|
/* @__PURE__ */ d("style", { children: M }),
|
|
4348
4363
|
j,
|
|
4349
4364
|
/* @__PURE__ */ d("style", { children: x }),
|
|
@@ -4363,18 +4378,18 @@ function Nn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
4363
4378
|
locale: p || "",
|
|
4364
4379
|
settings: g ?? null
|
|
4365
4380
|
},
|
|
4366
|
-
children: /* @__PURE__ */ d(
|
|
4381
|
+
children: /* @__PURE__ */ d(on, {
|
|
4367
4382
|
initialUser: _,
|
|
4368
4383
|
children: /* @__PURE__ */ d(H.Provider, {
|
|
4369
4384
|
value: u ?? null,
|
|
4370
|
-
children: /* @__PURE__ */ d(
|
|
4385
|
+
children: /* @__PURE__ */ d(he.Provider, {
|
|
4371
4386
|
value: T,
|
|
4372
4387
|
children: /* @__PURE__ */ f("div", {
|
|
4373
4388
|
...y,
|
|
4374
4389
|
className: "webim-page",
|
|
4375
4390
|
style: {
|
|
4376
4391
|
...S,
|
|
4377
|
-
...
|
|
4392
|
+
...le(t, r),
|
|
4378
4393
|
...i
|
|
4379
4394
|
},
|
|
4380
4395
|
children: [
|
|
@@ -4394,8 +4409,8 @@ function Nn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
4394
4409
|
}
|
|
4395
4410
|
//#endregion
|
|
4396
4411
|
//#region src/WebimContent.jsx
|
|
4397
|
-
function
|
|
4398
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ d(
|
|
4412
|
+
function Fn({ bundle: e, mode: t = "auto", style: n }) {
|
|
4413
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ d(Pn, {
|
|
4399
4414
|
blocks: e.blocks,
|
|
4400
4415
|
theme: e.theme,
|
|
4401
4416
|
components: e.components,
|
|
@@ -4406,13 +4421,13 @@ function Pn({ bundle: e, mode: t = "auto", style: n }) {
|
|
|
4406
4421
|
locale: e.locale,
|
|
4407
4422
|
direction: e.direction,
|
|
4408
4423
|
settings: e.settings,
|
|
4409
|
-
mode:
|
|
4424
|
+
mode: de(t, e.scheme),
|
|
4410
4425
|
style: n
|
|
4411
4426
|
}) : null;
|
|
4412
4427
|
}
|
|
4413
4428
|
//#endregion
|
|
4414
4429
|
//#region src/bundle.js
|
|
4415
|
-
function
|
|
4430
|
+
function In({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
4416
4431
|
let a = {
|
|
4417
4432
|
...t?.global ?? {},
|
|
4418
4433
|
...t?.tenant ?? {}
|
|
@@ -4422,7 +4437,7 @@ function Fn({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
4422
4437
|
title: e.title,
|
|
4423
4438
|
slug: e.slug,
|
|
4424
4439
|
blocks: i && o.i18n?.[i]?.blocks || e.blocks,
|
|
4425
|
-
theme:
|
|
4440
|
+
theme: ue(o, a.builder_themes?.themes),
|
|
4426
4441
|
components: a.builder_components?.components ?? {},
|
|
4427
4442
|
custom: o.custom,
|
|
4428
4443
|
seo: o.seo,
|
|
@@ -4437,18 +4452,18 @@ function Fn({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
4437
4452
|
}
|
|
4438
4453
|
//#endregion
|
|
4439
4454
|
//#region src/fetchPage.js
|
|
4440
|
-
var
|
|
4455
|
+
var Ln = async (e) => {
|
|
4441
4456
|
let t = await e.json().catch(() => null);
|
|
4442
4457
|
if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
|
|
4443
4458
|
return t?.payload ?? t;
|
|
4444
4459
|
};
|
|
4445
|
-
async function
|
|
4460
|
+
async function Rn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
|
|
4446
4461
|
if (!e) throw Error("fetchPage: apiUrl is required");
|
|
4447
4462
|
if (!n) throw Error("fetchPage: slug is required");
|
|
4448
4463
|
let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
|
|
4449
4464
|
...t ? { "x-tenant": t } : {},
|
|
4450
4465
|
...a ? { authorization: `Bearer ${a}` } : {}
|
|
4451
|
-
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(
|
|
4466
|
+
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(Ln), c(`${l}/settings/public`, { headers: u }).then(Ln)]), p = In({
|
|
4452
4467
|
page: d,
|
|
4453
4468
|
settings: f,
|
|
4454
4469
|
tenant: t,
|
|
@@ -4456,7 +4471,7 @@ async function Ln({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
4456
4471
|
locale: r
|
|
4457
4472
|
}), 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))];
|
|
4458
4473
|
if (m.length) {
|
|
4459
|
-
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(
|
|
4474
|
+
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(Ln).then((e) => {
|
|
4460
4475
|
let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
|
|
4461
4476
|
return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
|
|
4462
4477
|
}).catch(() => [[t, []]])));
|
|
@@ -4476,14 +4491,14 @@ var $ = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
|
|
|
4476
4491
|
">": ">",
|
|
4477
4492
|
"\"": """
|
|
4478
4493
|
})[e]);
|
|
4479
|
-
function
|
|
4480
|
-
return e(/* @__PURE__ */ d(
|
|
4494
|
+
function zn(t, { mode: n = "auto", style: r } = {}) {
|
|
4495
|
+
return e(/* @__PURE__ */ d(Fn, {
|
|
4481
4496
|
bundle: t,
|
|
4482
4497
|
mode: n,
|
|
4483
4498
|
style: r
|
|
4484
4499
|
}));
|
|
4485
4500
|
}
|
|
4486
|
-
function
|
|
4501
|
+
function Bn(e, { mode: t = "auto", lang: n } = {}) {
|
|
4487
4502
|
let r = e.seo ?? {}, i = n || e.locale || "en", a = h(e.direction, i), o = r.title || e.title || e.slug || "Page", s = e.custom?.js?.trim(), c = [
|
|
4488
4503
|
"<meta charset=\"utf-8\"/>",
|
|
4489
4504
|
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>",
|
|
@@ -4500,10 +4515,10 @@ function zn(e, { mode: t = "auto", lang: n } = {}) {
|
|
|
4500
4515
|
${c}
|
|
4501
4516
|
</head>
|
|
4502
4517
|
<body>
|
|
4503
|
-
${
|
|
4518
|
+
${zn(e, { mode: t })}
|
|
4504
4519
|
${s ? `<script>${s.replaceAll("<\/script", "<\\/script")}<\/script>` : ""}
|
|
4505
4520
|
</body>
|
|
4506
4521
|
</html>`;
|
|
4507
4522
|
}
|
|
4508
4523
|
//#endregion
|
|
4509
|
-
export {
|
|
4524
|
+
export { In as assembleBundle, Rn as fetchPage, zn as renderBundleHtml, Bn as renderPageDocument };
|