webim-adapter 1.1.2 → 2.0.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 +1322 -641
- package/build/webim-embed.js +13 -7
- package/build/webim-ssr.js +1405 -724
- package/package.json +1 -1
package/build/webim-ssr.js
CHANGED
|
@@ -259,36 +259,36 @@ function P(e) {
|
|
|
259
259
|
color: O,
|
|
260
260
|
inset: k
|
|
261
261
|
})), A.length && (t.boxShadow = A.join(", "));
|
|
262
|
-
let P = (e) => e.type === "blur" ? `blur(${M(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: I, backdropFilters: L, filterBlur: R, filterGrayscale: z, filterBrightness: B, filterContrast:
|
|
262
|
+
let P = (e) => e.type === "blur" ? `blur(${M(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: I, backdropFilters: L, filterBlur: R, filterGrayscale: z, filterBrightness: B, filterContrast: V, filterSaturate: H } = t;
|
|
263
263
|
delete t.filters, delete t.backdropFilters, delete t.filterBlur, delete t.filterGrayscale, delete t.filterBrightness, delete t.filterContrast, delete t.filterSaturate;
|
|
264
|
-
let
|
|
265
|
-
R !== void 0 &&
|
|
266
|
-
let
|
|
267
|
-
|
|
268
|
-
let { textStrokeWidth:
|
|
269
|
-
delete t.textStrokeWidth, delete t.textStrokeColor, (
|
|
270
|
-
let { clipText:
|
|
271
|
-
delete t.clipText,
|
|
272
|
-
let { transitions:
|
|
264
|
+
let U = F(I);
|
|
265
|
+
R !== void 0 && U.push(`blur(${M(R)})`), z !== void 0 && U.push(`grayscale(${z}%)`), B !== void 0 && U.push(`brightness(${B}%)`), V !== void 0 && U.push(`contrast(${V}%)`), H !== void 0 && U.push(`saturate(${H}%)`), U.length && (t.filter = U.join(" "));
|
|
266
|
+
let ee = F(L);
|
|
267
|
+
ee.length && (t.backdropFilter = ee.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
|
|
268
|
+
let { textStrokeWidth: te, textStrokeColor: ne } = t;
|
|
269
|
+
delete t.textStrokeWidth, delete t.textStrokeColor, (te !== void 0 || ne !== void 0) && (t.WebkitTextStroke = `${M(te ?? 1)} ${ne || "currentColor"}`);
|
|
270
|
+
let { clipText: re } = t;
|
|
271
|
+
delete t.clipText, re && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
|
|
272
|
+
let { transitions: ie, transitionDuration: W, transitionEasing: ae, transitionProperty: oe } = t, se = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
|
|
273
273
|
delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
|
|
274
|
-
let
|
|
275
|
-
if (
|
|
274
|
+
let ce = (Array.isArray(ie) ? ie : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${se(e.duration ?? 200)} ${e.easing || "ease"}`);
|
|
275
|
+
if (W !== void 0 && ce.push(`${oe || "all"} ${se(W)} ${ae || "ease"}`), ce.length && (t.transition = ce.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
|
|
276
276
|
let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
|
|
277
277
|
t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
|
|
278
278
|
}
|
|
279
279
|
delete t.backgroundVideo;
|
|
280
|
-
let { overlayColor:
|
|
281
|
-
if (delete t.overlayColor, delete t.overlayOpacity,
|
|
282
|
-
let e = `color-mix(in srgb, ${
|
|
280
|
+
let { overlayColor: G, overlayOpacity: le } = t;
|
|
281
|
+
if (delete t.overlayColor, delete t.overlayOpacity, G) {
|
|
282
|
+
let e = `color-mix(in srgb, ${G} ${le ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
|
|
283
283
|
t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
|
|
284
284
|
}
|
|
285
285
|
t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
|
|
286
|
-
let { backgroundLayers:
|
|
286
|
+
let { backgroundLayers: K } = t;
|
|
287
287
|
delete t.backgroundLayers;
|
|
288
|
-
let
|
|
289
|
-
if (
|
|
288
|
+
let q = (Array.isArray(K) ? K : []).filter((e) => e && e.on !== !1);
|
|
289
|
+
if (q.length) {
|
|
290
290
|
let e = [], n = [], r = [], i = [], a = [];
|
|
291
|
-
for (let t of
|
|
291
|
+
for (let t of q) 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");
|
|
292
292
|
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");
|
|
293
293
|
else {
|
|
294
294
|
if (!t.src) continue;
|
|
@@ -322,8 +322,8 @@ var F = {
|
|
|
322
322
|
"submit",
|
|
323
323
|
"keydown",
|
|
324
324
|
"inview"
|
|
325
|
-
], B = ["load", "pagescroll"],
|
|
326
|
-
function
|
|
325
|
+
], B = ["load", "pagescroll"], V = [...z, ...B], H = /^[A-Za-z_$][\w$]*$/;
|
|
326
|
+
function U(e, t) {
|
|
327
327
|
let n = String(t ?? "").trim();
|
|
328
328
|
if (!n) return [e];
|
|
329
329
|
let r = e.closest?.(".webim-page") ?? e.closest?.(".builder-canvas") ?? document, i = /^[A-Za-z_][\w-]*$/.test(n) ? [`#${n}`, n] : [n];
|
|
@@ -335,15 +335,15 @@ function H(e, t) {
|
|
|
335
335
|
}
|
|
336
336
|
return [];
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function ee(e, t) {
|
|
339
339
|
for (let t of e.__webimEvents ?? []) t();
|
|
340
340
|
let n = [];
|
|
341
341
|
for (let r of t ?? []) {
|
|
342
342
|
let t = String(r?.event ?? ""), i = r?.action === "animation", a = i ? (Array.isArray(r?.animations) ? r.animations : [r?.animation]).map((e) => String(e ?? "").trim()).filter(Boolean) : [], o = i ? "" : String(r?.handler ?? "").trim();
|
|
343
|
-
if (!
|
|
343
|
+
if (!V.includes(t) || (i ? !a.length : !H.test(o))) continue;
|
|
344
344
|
let s = (t) => {
|
|
345
345
|
if (i) {
|
|
346
|
-
for (let t of
|
|
346
|
+
for (let t of U(e, r?.target)) x(t, a);
|
|
347
347
|
return;
|
|
348
348
|
}
|
|
349
349
|
let n = window[o];
|
|
@@ -366,7 +366,7 @@ function te(e, t) {
|
|
|
366
366
|
}
|
|
367
367
|
e.__webimEvents = n;
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function te(e, t, n = []) {
|
|
370
370
|
t.htmlId ? e.id = t.htmlId : e.removeAttribute("id");
|
|
371
371
|
let r = R(t.classNames), i = R(e.getAttribute("data-wb-class"));
|
|
372
372
|
for (let t of i) r.includes(t) || e.classList.remove(t);
|
|
@@ -380,15 +380,15 @@ function ne(e, t, n = []) {
|
|
|
380
380
|
}
|
|
381
381
|
return a;
|
|
382
382
|
}
|
|
383
|
-
var
|
|
384
|
-
function
|
|
385
|
-
let i = Object.entries(P(t)).map(([e, t]) => `${
|
|
383
|
+
var ne = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
384
|
+
function re(e, t, n, r = !1) {
|
|
385
|
+
let i = Object.entries(P(t)).map(([e, t]) => `${ne(e)}: ${t} !important;`).join(" ");
|
|
386
386
|
return i ? `[data-wb="${e}"]${r ? "" : n} { ${i} }` : "";
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
return Object.entries(F).map(([r, i]) =>
|
|
388
|
+
function ie(e, t, n) {
|
|
389
|
+
return Object.entries(F).map(([r, i]) => re(e, t?.[r], i, n === r)).filter(Boolean).join("\n");
|
|
390
390
|
}
|
|
391
|
-
var
|
|
391
|
+
var W = [
|
|
392
392
|
{
|
|
393
393
|
key: "tablet",
|
|
394
394
|
max: 991
|
|
@@ -401,17 +401,17 @@ var U = [
|
|
|
401
401
|
key: "mobile",
|
|
402
402
|
max: 478
|
|
403
403
|
}
|
|
404
|
-
],
|
|
405
|
-
function
|
|
406
|
-
return
|
|
407
|
-
let i = t?.[n] ?
|
|
404
|
+
], ae = (e) => Object.entries(P(e)).map(([e, t]) => `${ne(e)}: ${t} !important;`).join(" ");
|
|
405
|
+
function oe(e, t) {
|
|
406
|
+
return W.map(({ key: n, max: r }) => {
|
|
407
|
+
let i = t?.[n] ? ae(t[n]) : "";
|
|
408
408
|
return i ? `@media (max-width: ${r}px) { [data-wb="${e}"] { ${i} } }` : "";
|
|
409
409
|
}).filter(Boolean).join("\n");
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function se(e, t) {
|
|
412
412
|
let n = [], r = (e) => {
|
|
413
413
|
for (let [t, r] of Object.entries(e || {})) {
|
|
414
|
-
let e =
|
|
414
|
+
let e = oe(t, r.props);
|
|
415
415
|
e && n.push(e);
|
|
416
416
|
}
|
|
417
417
|
};
|
|
@@ -419,10 +419,10 @@ function ce(e, t) {
|
|
|
419
419
|
for (let e of Object.values(t || {})) r(e.template?.nodes);
|
|
420
420
|
return n.join("\n");
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function ce(e, t) {
|
|
423
423
|
let n = [], r = (e) => {
|
|
424
424
|
for (let [t, r] of Object.entries(e || {})) {
|
|
425
|
-
let e =
|
|
425
|
+
let e = ie(t, r.props);
|
|
426
426
|
e && n.push(e);
|
|
427
427
|
}
|
|
428
428
|
};
|
|
@@ -430,15 +430,15 @@ function le(e, t) {
|
|
|
430
430
|
for (let e of Object.values(t || {})) r(e.template?.nodes);
|
|
431
431
|
return n.join("\n");
|
|
432
432
|
}
|
|
433
|
-
var
|
|
434
|
-
fontFamily:
|
|
433
|
+
var G = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", le = {
|
|
434
|
+
fontFamily: G,
|
|
435
435
|
fontStyle: "normal",
|
|
436
436
|
fontWeight: 400,
|
|
437
437
|
letterSpacing: "normal",
|
|
438
438
|
textTransform: "none",
|
|
439
439
|
lineHeight: 1.4,
|
|
440
440
|
textShadow: "none"
|
|
441
|
-
},
|
|
441
|
+
}, K = {
|
|
442
442
|
light: {
|
|
443
443
|
background: "#f2f2f2",
|
|
444
444
|
surface: "#f2f2f2",
|
|
@@ -479,23 +479,32 @@ var W = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
479
479
|
contrastText: "#052e2b"
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
},
|
|
482
|
+
}, q = {
|
|
483
|
+
h1: 40,
|
|
484
|
+
h2: 32,
|
|
485
|
+
h3: 26,
|
|
486
|
+
h4: 22,
|
|
487
|
+
h5: 19,
|
|
488
|
+
h6: 16
|
|
489
|
+
}, ue = {
|
|
483
490
|
font: "system",
|
|
484
491
|
headingFont: "inherit",
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
492
|
+
headings: q,
|
|
493
|
+
bodySize: 16,
|
|
494
|
+
light: K.light,
|
|
495
|
+
dark: K.dark
|
|
496
|
+
}, de = {
|
|
488
497
|
system: {
|
|
489
498
|
label: "System",
|
|
490
|
-
value:
|
|
499
|
+
value: G
|
|
491
500
|
},
|
|
492
501
|
inter: {
|
|
493
502
|
label: "Inter",
|
|
494
|
-
value: `"Inter", ${
|
|
503
|
+
value: `"Inter", ${G}`
|
|
495
504
|
},
|
|
496
505
|
outfit: {
|
|
497
506
|
label: "Outfit",
|
|
498
|
-
value: `"Outfit", ${
|
|
507
|
+
value: `"Outfit", ${G}`
|
|
499
508
|
},
|
|
500
509
|
serif: {
|
|
501
510
|
label: "Serif",
|
|
@@ -505,7 +514,7 @@ var W = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
505
514
|
label: "Mono",
|
|
506
515
|
value: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
|
|
507
516
|
}
|
|
508
|
-
},
|
|
517
|
+
}, fe = (e, t) => de[e]?.value ?? k(e) ?? (typeof e == "string" && e.trim() ? `"${e.trim()}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` : t), J = (e, ...t) => {
|
|
509
518
|
let n = Object.assign({}, e, ...t);
|
|
510
519
|
return n.primary = {
|
|
511
520
|
...e.primary,
|
|
@@ -521,20 +530,25 @@ var W = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
521
530
|
}), {})
|
|
522
531
|
}, n;
|
|
523
532
|
};
|
|
524
|
-
function
|
|
525
|
-
let { light: t, dark: n, font: r, headingFont: i,
|
|
533
|
+
function pe(e) {
|
|
534
|
+
let { light: t, dark: n, font: r, headingFont: i, headings: a, bodySize: o, ...s } = e ?? {};
|
|
526
535
|
return {
|
|
527
|
-
font: r ??
|
|
528
|
-
headingFont: i ??
|
|
529
|
-
|
|
530
|
-
|
|
536
|
+
font: r ?? ue.font,
|
|
537
|
+
headingFont: i ?? ue.headingFont,
|
|
538
|
+
headings: {
|
|
539
|
+
...q,
|
|
540
|
+
...a ?? {}
|
|
541
|
+
},
|
|
542
|
+
bodySize: o ?? 16,
|
|
543
|
+
light: J(K.light, s, t),
|
|
544
|
+
dark: J(K.dark, n)
|
|
531
545
|
};
|
|
532
546
|
}
|
|
533
|
-
function
|
|
547
|
+
function me(e) {
|
|
534
548
|
return {
|
|
535
549
|
"--page-bg": e.background,
|
|
536
550
|
"--page-surface": e.surface ?? e.background,
|
|
537
|
-
"--page-border": e.border ??
|
|
551
|
+
"--page-border": e.border ?? K.light.border,
|
|
538
552
|
"--page-text": e.text,
|
|
539
553
|
"--page-accent": e.accent,
|
|
540
554
|
"--page-accent-text": e.accentText,
|
|
@@ -549,57 +563,70 @@ function q(e) {
|
|
|
549
563
|
};
|
|
550
564
|
}
|
|
551
565
|
function he(e) {
|
|
552
|
-
let t =
|
|
566
|
+
let t = pe(e);
|
|
553
567
|
return {
|
|
554
568
|
backgroundColor: "var(--page-bg)",
|
|
555
569
|
color: "var(--page-text)",
|
|
556
|
-
fontFamily:
|
|
557
|
-
"--page-heading-font": t.headingFont === "inherit" ? "inherit" :
|
|
570
|
+
fontFamily: fe(t.font, G),
|
|
571
|
+
"--page-heading-font": t.headingFont === "inherit" ? "inherit" : fe(t.headingFont, "inherit"),
|
|
572
|
+
..._e(t.headings),
|
|
573
|
+
"--page-body-size": ge(t.bodySize, 16)
|
|
558
574
|
};
|
|
559
575
|
}
|
|
560
|
-
function ge(e, t
|
|
561
|
-
|
|
576
|
+
function ge(e, t) {
|
|
577
|
+
return e === "" || e == null ? `${t}px` : isNaN(Number(e)) ? String(e) : `${Number(e)}px`;
|
|
578
|
+
}
|
|
579
|
+
function _e(e) {
|
|
580
|
+
let t = {};
|
|
581
|
+
for (let n of Object.keys(q)) {
|
|
582
|
+
let r = e?.[n] ?? q[n];
|
|
583
|
+
t[`--page-${n}`] = ge(r, q[n]);
|
|
584
|
+
}
|
|
585
|
+
return t;
|
|
586
|
+
}
|
|
587
|
+
function ve(e, t = "light") {
|
|
588
|
+
let n = pe(e);
|
|
562
589
|
return {
|
|
563
590
|
...he(e),
|
|
564
|
-
...
|
|
591
|
+
...me(n[t] ?? n.light)
|
|
565
592
|
};
|
|
566
593
|
}
|
|
567
|
-
function
|
|
594
|
+
function ye(e, t) {
|
|
568
595
|
return e?.themeRef && t?.[e.themeRef] || e?.theme;
|
|
569
596
|
}
|
|
570
|
-
function
|
|
597
|
+
function be(e, t) {
|
|
571
598
|
return e === "light" || e === "dark" ? e : t === "light" || t === "dark" ? t : "auto";
|
|
572
599
|
}
|
|
573
600
|
//#endregion
|
|
574
601
|
//#region ../ui/src/components/builder/views.jsx
|
|
575
|
-
var
|
|
602
|
+
var Y = n({
|
|
576
603
|
tenant: "",
|
|
577
604
|
apiUrl: "/api",
|
|
578
605
|
locale: "",
|
|
579
606
|
settings: null
|
|
580
|
-
}),
|
|
607
|
+
}), xe = n(null), Se = (e) => {
|
|
581
608
|
let t = Number(e?.__page);
|
|
582
609
|
if (Number.isFinite(t) && t >= 1) return Math.floor(t);
|
|
583
610
|
if (typeof window > "u") return 1;
|
|
584
611
|
let n = Number(new URLSearchParams(window.location.search).get("page"));
|
|
585
612
|
return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
|
|
586
|
-
},
|
|
613
|
+
}, X = () => {
|
|
587
614
|
if (typeof window > "u") return {};
|
|
588
615
|
let e = {};
|
|
589
616
|
return new URLSearchParams(window.location.search).forEach((t, n) => {
|
|
590
617
|
n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
|
|
591
618
|
}), e;
|
|
592
|
-
},
|
|
619
|
+
}, Z = (e) => {
|
|
593
620
|
let t = {
|
|
594
621
|
...e && typeof e == "object" && !Array.isArray(e) ? e : {},
|
|
595
|
-
...
|
|
622
|
+
...X()
|
|
596
623
|
};
|
|
597
624
|
return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
|
|
598
|
-
},
|
|
599
|
-
function
|
|
625
|
+
}, Q = n(null), Ce = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
626
|
+
function we(e, t) {
|
|
600
627
|
if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
|
|
601
628
|
}
|
|
602
|
-
var
|
|
629
|
+
var Te = (e) => {
|
|
603
630
|
let t = [];
|
|
604
631
|
for (let [n, r] of Object.entries(e ?? {})) {
|
|
605
632
|
if (!/^[\w-]+$/.test(n)) continue;
|
|
@@ -609,36 +636,39 @@ var Z = (e) => {
|
|
|
609
636
|
}
|
|
610
637
|
return t;
|
|
611
638
|
};
|
|
612
|
-
function
|
|
639
|
+
function Ee(e) {
|
|
613
640
|
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(" ") : "";
|
|
614
641
|
}
|
|
615
|
-
function
|
|
616
|
-
let n = t?.data ?? {}, r =
|
|
642
|
+
function De(e, t) {
|
|
643
|
+
let n = t?.data ?? {}, r = Te(n);
|
|
617
644
|
if (!r.length) return e;
|
|
618
|
-
let i = RegExp(`:(${r.map(
|
|
645
|
+
let i = RegExp(`:(${r.map(Ce).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => Ee(we(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
|
|
619
646
|
return a(e);
|
|
620
647
|
}
|
|
621
|
-
var
|
|
648
|
+
var Oe = {
|
|
622
649
|
margin: 0,
|
|
623
650
|
fontWeight: 700,
|
|
624
651
|
lineHeight: 1.2,
|
|
625
652
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
626
|
-
},
|
|
653
|
+
}, ke = q, Ae = (e) => `var(--page-${e}, ${q[e] ?? q.h2}px)`, je = {
|
|
654
|
+
margin: 0,
|
|
655
|
+
fontSize: "var(--page-body-size, 16px)"
|
|
656
|
+
}, Me = {
|
|
627
657
|
display: "inline-block",
|
|
628
658
|
textDecoration: "none",
|
|
629
659
|
cursor: "pointer",
|
|
630
660
|
backgroundColor: "var(--page-accent, #111827)",
|
|
631
661
|
color: "var(--page-accent-text, #ffffff)"
|
|
632
|
-
},
|
|
662
|
+
}, Ne = {
|
|
633
663
|
flexGrow: 1,
|
|
634
664
|
display: "flex",
|
|
635
665
|
flexDirection: "column",
|
|
636
666
|
position: "relative"
|
|
637
|
-
},
|
|
667
|
+
}, Pe = {
|
|
638
668
|
display: "flex",
|
|
639
669
|
flexDirection: "column"
|
|
640
670
|
};
|
|
641
|
-
function
|
|
671
|
+
function Fe({ style: e }) {
|
|
642
672
|
let t = e?.backgroundVideo;
|
|
643
673
|
if (!t) return null;
|
|
644
674
|
let n = {
|
|
@@ -664,7 +694,7 @@ function Ae({ style: e }) {
|
|
|
664
694
|
background: r
|
|
665
695
|
} })] });
|
|
666
696
|
}
|
|
667
|
-
var
|
|
697
|
+
var Ie = (e, t) => e?.backgroundVideo ? {
|
|
668
698
|
position: "relative",
|
|
669
699
|
...t,
|
|
670
700
|
...P(e)
|
|
@@ -672,24 +702,24 @@ var je = (e, t) => e?.backgroundVideo ? {
|
|
|
672
702
|
...t,
|
|
673
703
|
...P(e)
|
|
674
704
|
};
|
|
675
|
-
function
|
|
705
|
+
function Le({ style: e, nodeRef: t, children: n }) {
|
|
676
706
|
return /* @__PURE__ */ f("div", {
|
|
677
707
|
ref: t,
|
|
678
708
|
style: {
|
|
679
|
-
...
|
|
709
|
+
...Ne,
|
|
680
710
|
...P(e)
|
|
681
711
|
},
|
|
682
|
-
children: [/* @__PURE__ */ d(
|
|
712
|
+
children: [/* @__PURE__ */ d(Fe, { style: e }), n]
|
|
683
713
|
});
|
|
684
714
|
}
|
|
685
|
-
function
|
|
715
|
+
function Re({ style: e, nodeRef: t, children: n }) {
|
|
686
716
|
return /* @__PURE__ */ f("section", {
|
|
687
717
|
ref: t,
|
|
688
|
-
style:
|
|
689
|
-
children: [/* @__PURE__ */ d(
|
|
718
|
+
style: Ie(e, Pe),
|
|
719
|
+
children: [/* @__PURE__ */ d(Fe, { style: e }), n]
|
|
690
720
|
});
|
|
691
721
|
}
|
|
692
|
-
function
|
|
722
|
+
function ze({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
693
723
|
let i = t ? {
|
|
694
724
|
position: "relative",
|
|
695
725
|
minHeight: 240
|
|
@@ -698,32 +728,33 @@ function Pe({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
|
698
728
|
ref: n,
|
|
699
729
|
style: i ? {
|
|
700
730
|
...i,
|
|
701
|
-
...
|
|
702
|
-
} :
|
|
703
|
-
children: [/* @__PURE__ */ d(
|
|
731
|
+
...Ie(e)
|
|
732
|
+
} : Ie(e),
|
|
733
|
+
children: [/* @__PURE__ */ d(Fe, { style: e }), r]
|
|
704
734
|
});
|
|
705
735
|
}
|
|
706
|
-
function
|
|
736
|
+
function Be({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
|
|
707
737
|
return /* @__PURE__ */ d(n, {
|
|
708
738
|
ref: a,
|
|
709
739
|
style: {
|
|
710
|
-
...
|
|
740
|
+
...Oe,
|
|
741
|
+
fontSize: Ae(n),
|
|
711
742
|
...P(r)
|
|
712
743
|
},
|
|
713
|
-
children:
|
|
744
|
+
children: Ue(t, e, i)
|
|
714
745
|
});
|
|
715
746
|
}
|
|
716
|
-
var
|
|
717
|
-
fontFamily:
|
|
747
|
+
var Ve = {
|
|
748
|
+
fontFamily: de.mono.value,
|
|
718
749
|
background: "rgba(148, 163, 184, 0.18)",
|
|
719
750
|
padding: "1px 5px",
|
|
720
751
|
borderRadius: 4,
|
|
721
752
|
fontSize: "0.9em"
|
|
722
753
|
};
|
|
723
|
-
function
|
|
754
|
+
function He(e, t = [], n, r) {
|
|
724
755
|
let i = e;
|
|
725
756
|
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", {
|
|
726
|
-
style:
|
|
757
|
+
style: Ve,
|
|
727
758
|
children: i
|
|
728
759
|
})), 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", {
|
|
729
760
|
href: n,
|
|
@@ -739,13 +770,13 @@ function Le(e, t = [], n, r) {
|
|
|
739
770
|
children: i
|
|
740
771
|
})), i;
|
|
741
772
|
}
|
|
742
|
-
function
|
|
773
|
+
function Ue(e, n, r) {
|
|
743
774
|
return e?.length ? e.map((e, n) => {
|
|
744
775
|
if (e.slot) return /* @__PURE__ */ d(t, { children: r?.[e.slot] ?? null }, n);
|
|
745
|
-
if (e.parts) return /* @__PURE__ */ d(t, { children:
|
|
776
|
+
if (e.parts) return /* @__PURE__ */ d(t, { children: Ue(e.parts, "", r) }, n);
|
|
746
777
|
let i = e.text;
|
|
747
778
|
return e.sup ? i = /* @__PURE__ */ d("sup", { children: i }) : e.sub && (i = /* @__PURE__ */ d("sub", { children: i })), e.code && (i = /* @__PURE__ */ d("code", {
|
|
748
|
-
style:
|
|
779
|
+
style: Ve,
|
|
749
780
|
children: i
|
|
750
781
|
})), 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", {
|
|
751
782
|
style: {
|
|
@@ -768,21 +799,35 @@ function Re(e, n, r) {
|
|
|
768
799
|
})), /* @__PURE__ */ d(t, { children: i }, n);
|
|
769
800
|
}) : n;
|
|
770
801
|
}
|
|
771
|
-
function
|
|
802
|
+
function We({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
|
|
772
803
|
return /* @__PURE__ */ d("span", {
|
|
773
804
|
style: P(a),
|
|
774
|
-
children: e?.length ?
|
|
805
|
+
children: e?.length ? Ue(e, t) : He(t, n, r, i)
|
|
775
806
|
});
|
|
776
807
|
}
|
|
777
|
-
var
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
808
|
+
var Ge = [
|
|
809
|
+
"left",
|
|
810
|
+
"center",
|
|
811
|
+
"right",
|
|
812
|
+
"justify"
|
|
813
|
+
];
|
|
814
|
+
function Ke(e, t, n) {
|
|
815
|
+
let r = e && e.cellStyles;
|
|
816
|
+
if (!r || typeof r != "object" || Array.isArray(r)) return {};
|
|
817
|
+
let i = r[`${t}:${n}`];
|
|
818
|
+
return i && typeof i == "object" && !Array.isArray(i) ? i : {};
|
|
819
|
+
}
|
|
820
|
+
function qe(e, t) {
|
|
821
|
+
let n = e || {}, r = typeof n.bold == "boolean" ? n.bold : !!t;
|
|
822
|
+
return {
|
|
823
|
+
textAlign: Ge.includes(n.align) ? n.align : "left",
|
|
824
|
+
fontWeight: r ? 700 : 400,
|
|
825
|
+
fontStyle: n.italic ? "italic" : void 0,
|
|
826
|
+
color: typeof n.color == "string" && n.color ? n.color : void 0,
|
|
827
|
+
backgroundColor: typeof n.bg == "string" && n.bg ? n.bg : void 0
|
|
828
|
+
};
|
|
829
|
+
}
|
|
830
|
+
function Je({ align: e = "center", width: t, wrap: n } = {}) {
|
|
786
831
|
let r = t ? `${t}%` : void 0;
|
|
787
832
|
if (e === "full") return { width: "100%" };
|
|
788
833
|
let i = e === "left" || e === "right";
|
|
@@ -816,8 +861,8 @@ function Ve({ align: e = "center", width: t, wrap: n } = {}) {
|
|
|
816
861
|
marginRight: "auto"
|
|
817
862
|
};
|
|
818
863
|
}
|
|
819
|
-
function
|
|
820
|
-
let r = n ?? ((e, n) =>
|
|
864
|
+
function Ye(e = [], t, n) {
|
|
865
|
+
let r = n ?? ((e, n) => Ue(e, n, t));
|
|
821
866
|
return e.map((t, n) => {
|
|
822
867
|
let i = {
|
|
823
868
|
marginTop: 0,
|
|
@@ -839,7 +884,7 @@ function He(e = [], t, n) {
|
|
|
839
884
|
marginLeft: 0,
|
|
840
885
|
marginRight: 0,
|
|
841
886
|
...i,
|
|
842
|
-
...
|
|
887
|
+
...Je(t)
|
|
843
888
|
},
|
|
844
889
|
children: [t.href ? /* @__PURE__ */ d("a", {
|
|
845
890
|
href: t.href,
|
|
@@ -858,16 +903,16 @@ function He(e = [], t, n) {
|
|
|
858
903
|
})]
|
|
859
904
|
}, n);
|
|
860
905
|
}
|
|
861
|
-
if (t.type === "video") return
|
|
906
|
+
if (t.type === "video") return ot(t.url) ? /* @__PURE__ */ d("div", {
|
|
862
907
|
style: {
|
|
863
908
|
...i,
|
|
864
|
-
...
|
|
909
|
+
...Je({
|
|
865
910
|
align: t.align,
|
|
866
911
|
wrap: t.wrap,
|
|
867
912
|
width: t.width ?? 100
|
|
868
913
|
})
|
|
869
914
|
},
|
|
870
|
-
children: /* @__PURE__ */ d(
|
|
915
|
+
children: /* @__PURE__ */ d(st, {
|
|
871
916
|
url: t.url,
|
|
872
917
|
autoplay: t.autoplay,
|
|
873
918
|
muted: t.muted,
|
|
@@ -928,9 +973,11 @@ function He(e = [], t, n) {
|
|
|
928
973
|
let r = t.header !== !1, a = {
|
|
929
974
|
border: t.borders === !1 ? void 0 : "1px solid rgba(148, 163, 184, 0.4)",
|
|
930
975
|
padding: "6px 10px",
|
|
931
|
-
textAlign: "left",
|
|
932
976
|
verticalAlign: "top"
|
|
933
|
-
}, o = r ? e.slice(1) : e, s = Array.isArray(t.widths) ? t.widths : null
|
|
977
|
+
}, o = r ? e.slice(1) : e, s = Array.isArray(t.widths) ? t.widths : null, c = (e, n, r) => ({
|
|
978
|
+
...a,
|
|
979
|
+
...qe(Ke(t, e, n), r)
|
|
980
|
+
});
|
|
934
981
|
return /* @__PURE__ */ f("table", {
|
|
935
982
|
style: {
|
|
936
983
|
...i,
|
|
@@ -942,16 +989,13 @@ function He(e = [], t, n) {
|
|
|
942
989
|
children: [
|
|
943
990
|
s && /* @__PURE__ */ d("colgroup", { children: s.map((e, t) => /* @__PURE__ */ d("col", { style: { width: `${e}%` } }, t)) }),
|
|
944
991
|
r && /* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: e[0].map((e, t) => /* @__PURE__ */ d("th", {
|
|
945
|
-
style:
|
|
946
|
-
...a,
|
|
947
|
-
fontWeight: 700
|
|
948
|
-
},
|
|
992
|
+
style: c(0, t, !0),
|
|
949
993
|
children: e
|
|
950
994
|
}, t)) }) }),
|
|
951
|
-
/* @__PURE__ */ d("tbody", { children: o.map((e, t) => /* @__PURE__ */ d("tr", { children: e.map((e,
|
|
952
|
-
style:
|
|
995
|
+
/* @__PURE__ */ d("tbody", { children: o.map((e, t) => /* @__PURE__ */ d("tr", { children: e.map((e, n) => /* @__PURE__ */ d("td", {
|
|
996
|
+
style: c(r ? t + 1 : t, n, !1),
|
|
953
997
|
children: e
|
|
954
|
-
},
|
|
998
|
+
}, n)) }, t)) })
|
|
955
999
|
]
|
|
956
1000
|
}, n);
|
|
957
1001
|
}
|
|
@@ -970,17 +1014,17 @@ function He(e = [], t, n) {
|
|
|
970
1014
|
}
|
|
971
1015
|
if (t.type === "quote") return /* @__PURE__ */ d("blockquote", {
|
|
972
1016
|
style: {
|
|
973
|
-
...
|
|
1017
|
+
...Ze,
|
|
974
1018
|
...i
|
|
975
1019
|
},
|
|
976
1020
|
children: r(t.parts, t.text)
|
|
977
1021
|
}, n);
|
|
978
|
-
if (
|
|
1022
|
+
if (ke[t.type]) {
|
|
979
1023
|
let e = t.type;
|
|
980
1024
|
return /* @__PURE__ */ d(e, {
|
|
981
1025
|
style: {
|
|
982
|
-
...
|
|
983
|
-
fontSize:
|
|
1026
|
+
...Oe,
|
|
1027
|
+
fontSize: Ae(t.type),
|
|
984
1028
|
...i
|
|
985
1029
|
},
|
|
986
1030
|
children: r(t.parts, t.text)
|
|
@@ -988,39 +1032,39 @@ function He(e = [], t, n) {
|
|
|
988
1032
|
}
|
|
989
1033
|
return /* @__PURE__ */ d("p", {
|
|
990
1034
|
style: {
|
|
991
|
-
...
|
|
1035
|
+
...je,
|
|
992
1036
|
...i
|
|
993
1037
|
},
|
|
994
1038
|
children: r(t.parts, t.text)
|
|
995
1039
|
}, n);
|
|
996
1040
|
});
|
|
997
1041
|
}
|
|
998
|
-
function
|
|
1042
|
+
function Xe({ content: e, style: t, linked: n, nodeRef: r }) {
|
|
999
1043
|
return /* @__PURE__ */ d("div", {
|
|
1000
1044
|
ref: r,
|
|
1001
1045
|
style: {
|
|
1002
1046
|
display: "flow-root",
|
|
1003
1047
|
...P(t)
|
|
1004
1048
|
},
|
|
1005
|
-
children:
|
|
1049
|
+
children: Ye(e, n)
|
|
1006
1050
|
});
|
|
1007
1051
|
}
|
|
1008
|
-
var
|
|
1052
|
+
var Ze = {
|
|
1009
1053
|
margin: 0,
|
|
1010
1054
|
padding: "8px 0 8px 20px",
|
|
1011
1055
|
borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
|
|
1012
1056
|
};
|
|
1013
|
-
function
|
|
1057
|
+
function Qe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
1014
1058
|
return /* @__PURE__ */ d("blockquote", {
|
|
1015
1059
|
ref: i,
|
|
1016
1060
|
style: {
|
|
1017
|
-
...
|
|
1061
|
+
...Ze,
|
|
1018
1062
|
...P(n)
|
|
1019
1063
|
},
|
|
1020
|
-
children:
|
|
1064
|
+
children: Ue(t, e, r)
|
|
1021
1065
|
});
|
|
1022
1066
|
}
|
|
1023
|
-
function
|
|
1067
|
+
function $e({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
1024
1068
|
return /* @__PURE__ */ d(e ? "ol" : "ul", {
|
|
1025
1069
|
ref: r,
|
|
1026
1070
|
style: {
|
|
@@ -1030,53 +1074,53 @@ function Ke({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
|
1030
1074
|
},
|
|
1031
1075
|
children: t.map((e, t) => /* @__PURE__ */ d("li", {
|
|
1032
1076
|
style: { marginBottom: 4 },
|
|
1033
|
-
children:
|
|
1077
|
+
children: Ue(e.parts, e.text)
|
|
1034
1078
|
}, t))
|
|
1035
1079
|
});
|
|
1036
1080
|
}
|
|
1037
|
-
function
|
|
1081
|
+
function et({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
1038
1082
|
return /* @__PURE__ */ d("p", {
|
|
1039
1083
|
ref: i,
|
|
1040
1084
|
style: {
|
|
1041
|
-
...
|
|
1085
|
+
...je,
|
|
1042
1086
|
...P(n)
|
|
1043
1087
|
},
|
|
1044
|
-
children:
|
|
1088
|
+
children: Ue(t, e, r)
|
|
1045
1089
|
});
|
|
1046
1090
|
}
|
|
1047
|
-
var
|
|
1091
|
+
var tt = {
|
|
1048
1092
|
color: "var(--page-accent, inherit)",
|
|
1049
1093
|
textDecoration: "underline",
|
|
1050
1094
|
textUnderlineOffset: 3,
|
|
1051
1095
|
cursor: "pointer"
|
|
1052
1096
|
};
|
|
1053
|
-
function
|
|
1097
|
+
function nt({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
1054
1098
|
return /* @__PURE__ */ d("a", {
|
|
1055
1099
|
ref: o,
|
|
1056
1100
|
href: n || "#",
|
|
1057
1101
|
target: r || void 0,
|
|
1058
1102
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
1059
1103
|
style: {
|
|
1060
|
-
...
|
|
1104
|
+
...tt,
|
|
1061
1105
|
...P(i)
|
|
1062
1106
|
},
|
|
1063
|
-
children:
|
|
1107
|
+
children: Ue(t, e, a)
|
|
1064
1108
|
});
|
|
1065
1109
|
}
|
|
1066
|
-
function
|
|
1110
|
+
function rt({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
1067
1111
|
return /* @__PURE__ */ d("a", {
|
|
1068
1112
|
ref: o,
|
|
1069
1113
|
href: n || "#",
|
|
1070
1114
|
target: r || void 0,
|
|
1071
1115
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
1072
1116
|
style: {
|
|
1073
|
-
...
|
|
1117
|
+
...Me,
|
|
1074
1118
|
...P(i)
|
|
1075
1119
|
},
|
|
1076
|
-
children:
|
|
1120
|
+
children: Ue(t, e, a)
|
|
1077
1121
|
});
|
|
1078
1122
|
}
|
|
1079
|
-
function
|
|
1123
|
+
function it({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
1080
1124
|
return e ? /* @__PURE__ */ d("img", {
|
|
1081
1125
|
ref: r,
|
|
1082
1126
|
src: e,
|
|
@@ -1088,7 +1132,7 @@ function Ze({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
|
1088
1132
|
}
|
|
1089
1133
|
}) : null;
|
|
1090
1134
|
}
|
|
1091
|
-
function
|
|
1135
|
+
function at({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
|
|
1092
1136
|
return e ? /* @__PURE__ */ d("video", {
|
|
1093
1137
|
ref: s,
|
|
1094
1138
|
src: e,
|
|
@@ -1106,9 +1150,9 @@ function Qe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
|
|
|
1106
1150
|
}
|
|
1107
1151
|
}) : null;
|
|
1108
1152
|
}
|
|
1109
|
-
var
|
|
1110
|
-
function
|
|
1111
|
-
let c =
|
|
1153
|
+
var ot = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
|
|
1154
|
+
function st({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
|
|
1155
|
+
let c = ot(e);
|
|
1112
1156
|
if (!c) return null;
|
|
1113
1157
|
let l = new URLSearchParams({ rel: "0" });
|
|
1114
1158
|
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", {
|
|
@@ -1134,7 +1178,7 @@ function et({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
|
|
|
1134
1178
|
})
|
|
1135
1179
|
});
|
|
1136
1180
|
}
|
|
1137
|
-
function
|
|
1181
|
+
function ct({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
|
|
1138
1182
|
return e ? /* @__PURE__ */ d("iframe", {
|
|
1139
1183
|
ref: i,
|
|
1140
1184
|
src: e,
|
|
@@ -1150,7 +1194,7 @@ function tt({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
|
|
|
1150
1194
|
}
|
|
1151
1195
|
}) : null;
|
|
1152
1196
|
}
|
|
1153
|
-
function
|
|
1197
|
+
function lt({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
1154
1198
|
let [i, o] = l(null);
|
|
1155
1199
|
return a(() => {
|
|
1156
1200
|
i && (i.innerHTML = e || "", t && i.querySelectorAll("script").forEach((e) => {
|
|
@@ -1169,17 +1213,18 @@ function nt({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
|
1169
1213
|
style: P(n)
|
|
1170
1214
|
});
|
|
1171
1215
|
}
|
|
1172
|
-
function
|
|
1216
|
+
function ut({ height: e, style: t, nodeRef: n }) {
|
|
1173
1217
|
return /* @__PURE__ */ d("div", {
|
|
1174
|
-
ref:
|
|
1218
|
+
ref: n,
|
|
1175
1219
|
style: {
|
|
1176
1220
|
height: e || 32,
|
|
1177
1221
|
flexShrink: 0,
|
|
1178
|
-
alignSelf: "stretch"
|
|
1222
|
+
alignSelf: "stretch",
|
|
1223
|
+
...P(t)
|
|
1179
1224
|
}
|
|
1180
1225
|
});
|
|
1181
1226
|
}
|
|
1182
|
-
function
|
|
1227
|
+
function dt({ style: e, nodeRef: t }) {
|
|
1183
1228
|
return /* @__PURE__ */ d("div", {
|
|
1184
1229
|
ref: t,
|
|
1185
1230
|
style: {
|
|
@@ -1190,7 +1235,16 @@ function it({ style: e, nodeRef: t }) {
|
|
|
1190
1235
|
}
|
|
1191
1236
|
});
|
|
1192
1237
|
}
|
|
1193
|
-
|
|
1238
|
+
function ft({ style: e, nodeRef: t }) {
|
|
1239
|
+
return /* @__PURE__ */ d("div", {
|
|
1240
|
+
ref: t,
|
|
1241
|
+
style: {
|
|
1242
|
+
flexShrink: 0,
|
|
1243
|
+
...P(e)
|
|
1244
|
+
}
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
var pt = {
|
|
1194
1248
|
position: "absolute",
|
|
1195
1249
|
top: "50%",
|
|
1196
1250
|
transform: "translateY(-50%)",
|
|
@@ -1207,7 +1261,7 @@ var at = {
|
|
|
1207
1261
|
alignItems: "center",
|
|
1208
1262
|
justifyContent: "center",
|
|
1209
1263
|
padding: 0
|
|
1210
|
-
},
|
|
1264
|
+
}, mt = {
|
|
1211
1265
|
bottom: {
|
|
1212
1266
|
inset: "auto 0 0 0",
|
|
1213
1267
|
padding: "40px 24px 20px",
|
|
@@ -1226,8 +1280,8 @@ var at = {
|
|
|
1226
1280
|
padding: 24,
|
|
1227
1281
|
textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
|
|
1228
1282
|
}
|
|
1229
|
-
},
|
|
1230
|
-
function
|
|
1283
|
+
}, ht = 48;
|
|
1284
|
+
function gt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: i = 320, swipe: o = !0, style: s, nodeRef: c }) {
|
|
1231
1285
|
let [p, m] = l(0), [h, g] = l(!1), [_, v] = l(null), y = e ? Math.min(p, e - 1) : 0;
|
|
1232
1286
|
if (a(() => {
|
|
1233
1287
|
if (!n || h || _ || e < 2) return;
|
|
@@ -1243,7 +1297,7 @@ function ct({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1243
1297
|
let b = (t) => m((t + e) % e), x = () => {
|
|
1244
1298
|
if (!_) return;
|
|
1245
1299
|
let { dx: e } = _;
|
|
1246
|
-
v(null), e < -48 ? b(y + 1) : e >
|
|
1300
|
+
v(null), e < -48 ? b(y + 1) : e > ht && b(y - 1);
|
|
1247
1301
|
};
|
|
1248
1302
|
return /* @__PURE__ */ f("div", {
|
|
1249
1303
|
ref: c,
|
|
@@ -1291,7 +1345,7 @@ function ct({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1291
1345
|
type: "button",
|
|
1292
1346
|
"aria-label": "Previous slide",
|
|
1293
1347
|
style: {
|
|
1294
|
-
...
|
|
1348
|
+
...pt,
|
|
1295
1349
|
left: 12
|
|
1296
1350
|
},
|
|
1297
1351
|
onClick: () => b(y - 1),
|
|
@@ -1301,7 +1355,7 @@ function ct({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1301
1355
|
type: "button",
|
|
1302
1356
|
"aria-label": "Next slide",
|
|
1303
1357
|
style: {
|
|
1304
|
-
...
|
|
1358
|
+
...pt,
|
|
1305
1359
|
right: 12
|
|
1306
1360
|
},
|
|
1307
1361
|
onClick: () => b(y + 1),
|
|
@@ -1335,7 +1389,7 @@ function ct({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1335
1389
|
] })]
|
|
1336
1390
|
});
|
|
1337
1391
|
}
|
|
1338
|
-
var
|
|
1392
|
+
var _t = (e, t) => ({
|
|
1339
1393
|
position: "absolute",
|
|
1340
1394
|
inset: 0,
|
|
1341
1395
|
backgroundImage: e ? `url(${e})` : "none",
|
|
@@ -1343,18 +1397,18 @@ var lt = (e, t) => ({
|
|
|
1343
1397
|
backgroundSize: "cover",
|
|
1344
1398
|
backgroundPosition: "center"
|
|
1345
1399
|
});
|
|
1346
|
-
function
|
|
1347
|
-
return e.length ? /* @__PURE__ */ d(
|
|
1400
|
+
function vt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
|
|
1401
|
+
return e.length ? /* @__PURE__ */ d(gt, {
|
|
1348
1402
|
...r,
|
|
1349
1403
|
count: e.length,
|
|
1350
1404
|
renderSlide: (r) => {
|
|
1351
1405
|
let i = e[r];
|
|
1352
|
-
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style:
|
|
1406
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: _t(i.image) }), (i.title || i.text) && /* @__PURE__ */ f("div", {
|
|
1353
1407
|
style: {
|
|
1354
1408
|
position: "absolute",
|
|
1355
1409
|
color: "#fff",
|
|
1356
1410
|
textAlign: n,
|
|
1357
|
-
...
|
|
1411
|
+
...mt[t] ?? mt.bottom
|
|
1358
1412
|
},
|
|
1359
1413
|
children: [i.title && /* @__PURE__ */ d("div", {
|
|
1360
1414
|
style: {
|
|
@@ -1374,13 +1428,13 @@ function ut({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
|
|
|
1374
1428
|
}
|
|
1375
1429
|
}) : null;
|
|
1376
1430
|
}
|
|
1377
|
-
function
|
|
1378
|
-
return e.length ? /* @__PURE__ */ d(
|
|
1431
|
+
function yt({ slides: e = [], linked: t, ...n }) {
|
|
1432
|
+
return e.length ? /* @__PURE__ */ d(gt, {
|
|
1379
1433
|
...n,
|
|
1380
1434
|
count: e.length,
|
|
1381
1435
|
renderSlide: (n) => {
|
|
1382
1436
|
let r = e[n];
|
|
1383
|
-
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style:
|
|
1437
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: _t(r.image, r.color) }), /* @__PURE__ */ d("div", {
|
|
1384
1438
|
style: {
|
|
1385
1439
|
position: "absolute",
|
|
1386
1440
|
inset: 0,
|
|
@@ -1392,23 +1446,23 @@ function dt({ slides: e = [], linked: t, ...n }) {
|
|
|
1392
1446
|
}
|
|
1393
1447
|
}) : null;
|
|
1394
1448
|
}
|
|
1395
|
-
var
|
|
1396
|
-
let r =
|
|
1449
|
+
var bt = 256, xt = (e) => Math.log(Math.tan(Math.PI / 4 + Math.max(-85, Math.min(85, e)) * Math.PI / 360)), St = (e, t, n) => {
|
|
1450
|
+
let r = bt * 2 ** n;
|
|
1397
1451
|
return {
|
|
1398
1452
|
x: (Number(t) + 180) / 360 * r,
|
|
1399
|
-
y: (.5 -
|
|
1453
|
+
y: (.5 - xt(Number(e)) / (2 * Math.PI)) * r
|
|
1400
1454
|
};
|
|
1401
1455
|
}, $ = (e, t) => {
|
|
1402
1456
|
if (e === "" || e == null) return null;
|
|
1403
1457
|
let n = Number(e);
|
|
1404
1458
|
return Number.isFinite(n) && Math.abs(n) <= t ? n : null;
|
|
1405
|
-
},
|
|
1406
|
-
function
|
|
1459
|
+
}, Ct = (e) => !!e && $(e.lat, 90) !== null && $(e.lng, 180) !== null;
|
|
1460
|
+
function wt(e, t, n = "directions", r = "") {
|
|
1407
1461
|
let i = `${e},${t}`;
|
|
1408
1462
|
return n === "place" ? `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(i)}${r ? "&query_place_id=" : ""}` : `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(i)}`;
|
|
1409
1463
|
}
|
|
1410
|
-
var
|
|
1411
|
-
function
|
|
1464
|
+
var Tt = (e, t, n = 13) => `https://www.openstreetmap.org/?mlat=${e}&mlon=${t}#map=${Math.round(Number(n) || 13)}/${e}/${t}`;
|
|
1465
|
+
function Et({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize: o = 22, pinLink: s = "directions", link: u = !1, label: p = "", style: m, nodeRef: h, inert: g }) {
|
|
1412
1466
|
let _ = c(null), [v, y] = l(1200);
|
|
1413
1467
|
a(() => {
|
|
1414
1468
|
let e = _.current;
|
|
@@ -1418,7 +1472,7 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1418
1472
|
let n = new ResizeObserver(t);
|
|
1419
1473
|
return n.observe(e), () => n.disconnect();
|
|
1420
1474
|
}, []);
|
|
1421
|
-
let b = (Array.isArray(e) ? e : []).filter(
|
|
1475
|
+
let b = (Array.isArray(e) ? e : []).filter(Ct), x = Ct({
|
|
1422
1476
|
lat: t,
|
|
1423
1477
|
lng: n
|
|
1424
1478
|
}) ? {
|
|
@@ -1430,7 +1484,7 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1430
1484
|
} : null, S = Math.max(80, Number(i) || 320), C = $(r, 19) ? Math.min(Math.max(Math.round(Number(r)), 1), 19) : (() => {
|
|
1431
1485
|
if (b.length < 2) return 13;
|
|
1432
1486
|
for (let e = 19; e >= 1; e--) {
|
|
1433
|
-
let t = b.map((t) =>
|
|
1487
|
+
let t = b.map((t) => St($(t.lat, 90), $(t.lng, 180), e)), n = Math.max(...t.map((e) => e.x)) - Math.min(...t.map((e) => e.x)), r = Math.max(...t.map((e) => e.y)) - Math.min(...t.map((e) => e.y));
|
|
1434
1488
|
if (n <= v * .8 && r <= S * .7) return e;
|
|
1435
1489
|
}
|
|
1436
1490
|
return 1;
|
|
@@ -1454,12 +1508,12 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1454
1508
|
},
|
|
1455
1509
|
children: "Set the coordinates in Settings"
|
|
1456
1510
|
});
|
|
1457
|
-
let T =
|
|
1511
|
+
let T = St(x.lat, x.lng, C), E = {
|
|
1458
1512
|
x: T.x - v / 2,
|
|
1459
1513
|
y: T.y - S / 2
|
|
1460
1514
|
}, D = [], O = [];
|
|
1461
|
-
for (let e = Math.floor(E.x /
|
|
1462
|
-
for (let e = Math.floor(E.y /
|
|
1515
|
+
for (let e = Math.floor(E.x / bt); e <= Math.floor((E.x + v) / bt); e++) D.push(e);
|
|
1516
|
+
for (let e = Math.floor(E.y / bt); e <= Math.floor((E.y + S) / bt); e++) O.push(e);
|
|
1463
1517
|
let k = 2 ** C;
|
|
1464
1518
|
return /* @__PURE__ */ f("div", {
|
|
1465
1519
|
ref: (e) => {
|
|
@@ -1482,22 +1536,22 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1482
1536
|
return e < 0 || e >= k ? null : /* @__PURE__ */ d("img", {
|
|
1483
1537
|
src: `https://tile.openstreetmap.org/${C}/${n}/${e}.png`,
|
|
1484
1538
|
alt: "",
|
|
1485
|
-
width:
|
|
1486
|
-
height:
|
|
1539
|
+
width: bt,
|
|
1540
|
+
height: bt,
|
|
1487
1541
|
loading: "lazy",
|
|
1488
1542
|
style: {
|
|
1489
1543
|
position: "absolute",
|
|
1490
|
-
left: Math.round(t *
|
|
1491
|
-
top: Math.round(e *
|
|
1492
|
-
width:
|
|
1493
|
-
height:
|
|
1544
|
+
left: Math.round(t * bt - E.x),
|
|
1545
|
+
top: Math.round(e * bt - E.y),
|
|
1546
|
+
width: bt,
|
|
1547
|
+
height: bt,
|
|
1494
1548
|
userSelect: "none",
|
|
1495
1549
|
pointerEvents: "none"
|
|
1496
1550
|
}
|
|
1497
1551
|
}, `${t}-${e}`);
|
|
1498
1552
|
})),
|
|
1499
1553
|
b.map((e, t) => {
|
|
1500
|
-
let n =
|
|
1554
|
+
let n = St($(e.lat, 90), $(e.lng, 180), C), r = n.x - E.x, i = n.y - E.y, a = e.color || "var(--page-accent, #dc2626)", c = s === "none" || g ? null : wt($(e.lat, 90), $(e.lng, 180), s, e.title);
|
|
1501
1555
|
return /* @__PURE__ */ f(c ? "a" : "span", {
|
|
1502
1556
|
href: c || void 0,
|
|
1503
1557
|
target: c ? "_blank" : void 0,
|
|
@@ -1536,8 +1590,8 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1536
1590
|
viewBox: "0 0 24 24",
|
|
1537
1591
|
fill: a,
|
|
1538
1592
|
style: { display: "block" },
|
|
1539
|
-
children: [/* @__PURE__ */ d("path", { d: "M12 22s7-6 7-11a7 7 0 1 0-14 0c0 5 7 11 7 11z" }),
|
|
1540
|
-
d:
|
|
1593
|
+
children: [/* @__PURE__ */ d("path", { d: "M12 22s7-6 7-11a7 7 0 1 0-14 0c0 5 7 11 7 11z" }), Dt[e.icon] ? /* @__PURE__ */ d("path", {
|
|
1594
|
+
d: Dt[e.icon],
|
|
1541
1595
|
transform: "translate(12 10.5) scale(0.46) translate(-12 -12)",
|
|
1542
1596
|
fill: "none",
|
|
1543
1597
|
stroke: "#fff",
|
|
@@ -1573,7 +1627,7 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1573
1627
|
})
|
|
1574
1628
|
]
|
|
1575
1629
|
}), u ? /* @__PURE__ */ d("a", {
|
|
1576
|
-
href:
|
|
1630
|
+
href: Tt(x.lat, x.lng, C),
|
|
1577
1631
|
target: "_blank",
|
|
1578
1632
|
rel: "noopener noreferrer",
|
|
1579
1633
|
onClick: g ? (e) => e.preventDefault() : void 0,
|
|
@@ -1587,7 +1641,7 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1587
1641
|
}) : null]
|
|
1588
1642
|
});
|
|
1589
1643
|
}
|
|
1590
|
-
var
|
|
1644
|
+
var Dt = {
|
|
1591
1645
|
check: "M4 12l5 5L20 6",
|
|
1592
1646
|
close: "M6 6l12 12M18 6L6 18",
|
|
1593
1647
|
plus: "M12 5v14M5 12h14",
|
|
@@ -1684,8 +1738,8 @@ var yt = {
|
|
|
1684
1738
|
droplet: "M12 3s6 6.4 6 10.5a6 6 0 0 1-12 0C6 9.4 12 3 12 3z",
|
|
1685
1739
|
leaf: "M4 20c0-8 6-14 16-14 0 10-6 14-12 14H4zM8 16c2-4 5-6 8-7"
|
|
1686
1740
|
};
|
|
1687
|
-
function
|
|
1688
|
-
let p = Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim()) : [], m = n && p.length > 0, h = p.length ? p : [
|
|
1741
|
+
function Ot({ name: e = "star", paths: t, fill: n = !1, size: r = 24, stroke: i = 2, color: a = "", href: o = "", target: s = "", label: c = "", style: l, nodeRef: u, inert: f }) {
|
|
1742
|
+
let p = Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim()) : [], m = n && p.length > 0, h = p.length ? p : [Dt[e] ?? Dt.star], g = Math.min(Math.max(Number(r) || 24, 8), 240), _ = a === "accent" ? "var(--page-accent, currentColor)" : a || "currentColor", v = /* @__PURE__ */ d("svg", {
|
|
1689
1743
|
viewBox: "0 0 24 24",
|
|
1690
1744
|
width: g,
|
|
1691
1745
|
height: g,
|
|
@@ -1721,10 +1775,10 @@ function bt({ name: e = "star", paths: t, fill: n = !1, size: r = 24, stroke: i
|
|
|
1721
1775
|
children: v
|
|
1722
1776
|
});
|
|
1723
1777
|
}
|
|
1724
|
-
function
|
|
1725
|
-
let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], i = (e) => e == null ? "" :
|
|
1778
|
+
function kt(e, t = {}, n = 0) {
|
|
1779
|
+
let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], i = (e) => e == null ? "" : Ee(e), a = Math.max(0, Number(n) || 0), o = [];
|
|
1726
1780
|
for (let e of r) {
|
|
1727
|
-
let n = e.data ?? e, r =
|
|
1781
|
+
let n = e.data ?? e, r = we(n, t.imageField), s = (Array.isArray(r) ? r : [r]).map((e) => e && typeof e == "object" ? e.url ?? e.src ?? "" : e).filter((e) => typeof e == "string" && e.trim()), c = t.nameField ? i(we(n, t.nameField)) : i(n.name), l = t.hrefField ? i(we(n, t.hrefField)) : "";
|
|
1728
1782
|
for (let e of s) if (o.push({
|
|
1729
1783
|
src: e,
|
|
1730
1784
|
name: c,
|
|
@@ -1734,8 +1788,8 @@ function xt(e, t = {}, n = 0) {
|
|
|
1734
1788
|
}
|
|
1735
1789
|
return o;
|
|
1736
1790
|
}
|
|
1737
|
-
function
|
|
1738
|
-
let { tenant: x, apiUrl: S } = i(
|
|
1791
|
+
function At({ images: e = [], source: t = "", entry: n = "", imageField: r = "", nameField: o = "", hrefField: s = "", limit: c = 0, emptyText: p = "", columns: m = 3, gap: h = 8, showNames: g = !1, lightbox: _ = !0, style: v, nodeRef: y, inert: b }) {
|
|
1792
|
+
let { tenant: x, apiUrl: S } = i(Y), C = i(xe)?.[t], [w, T] = l(null), [E, D] = l(() => /* @__PURE__ */ new Set());
|
|
1739
1793
|
a(() => {
|
|
1740
1794
|
if (!t || C) return;
|
|
1741
1795
|
let e = !0;
|
|
@@ -1752,7 +1806,7 @@ function St({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1752
1806
|
C
|
|
1753
1807
|
]);
|
|
1754
1808
|
let O = C ?? w ?? [], k = n ? O.filter((e) => e?.id === n || e?.data?.slug === n || e?.slug === n) : O, A = Math.max(0, Number(c) || 0), j = t ? (() => {
|
|
1755
|
-
let e =
|
|
1809
|
+
let e = kt(k, {
|
|
1756
1810
|
imageField: r,
|
|
1757
1811
|
nameField: o,
|
|
1758
1812
|
hrefField: s
|
|
@@ -1766,7 +1820,7 @@ function St({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1766
1820
|
};
|
|
1767
1821
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1768
1822
|
}, [B, N.length]);
|
|
1769
|
-
let
|
|
1823
|
+
let V = (e) => {
|
|
1770
1824
|
if (typeof e.name == "string" && e.name.trim()) return e.name;
|
|
1771
1825
|
if (typeof e.alt == "string" && e.alt.trim()) return e.alt;
|
|
1772
1826
|
try {
|
|
@@ -1802,7 +1856,7 @@ function St({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1802
1856
|
display: "block",
|
|
1803
1857
|
borderRadius: "inherit"
|
|
1804
1858
|
}
|
|
1805
|
-
}), g &&
|
|
1859
|
+
}), g && V(e) && /* @__PURE__ */ d("span", {
|
|
1806
1860
|
style: {
|
|
1807
1861
|
position: "absolute",
|
|
1808
1862
|
insetInline: 0,
|
|
@@ -1816,7 +1870,7 @@ function St({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1816
1870
|
overflow: "hidden",
|
|
1817
1871
|
textOverflow: "ellipsis"
|
|
1818
1872
|
},
|
|
1819
|
-
children:
|
|
1873
|
+
children: V(e)
|
|
1820
1874
|
})]
|
|
1821
1875
|
}), i = e.href ? /* @__PURE__ */ d("a", {
|
|
1822
1876
|
href: e.href,
|
|
@@ -1887,14 +1941,14 @@ function St({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1887
1941
|
boxShadow: "0 12px 48px rgba(0,0,0,0.5)"
|
|
1888
1942
|
}
|
|
1889
1943
|
}),
|
|
1890
|
-
|
|
1944
|
+
V(N[R]) && /* @__PURE__ */ d("div", {
|
|
1891
1945
|
style: {
|
|
1892
1946
|
color: "#fff",
|
|
1893
1947
|
fontSize: 14,
|
|
1894
1948
|
marginTop: 12,
|
|
1895
1949
|
opacity: .85
|
|
1896
1950
|
},
|
|
1897
|
-
children:
|
|
1951
|
+
children: V(N[R])
|
|
1898
1952
|
}),
|
|
1899
1953
|
/* @__PURE__ */ d("button", {
|
|
1900
1954
|
type: "button",
|
|
@@ -1957,20 +2011,20 @@ function St({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1957
2011
|
]
|
|
1958
2012
|
});
|
|
1959
2013
|
}
|
|
1960
|
-
var
|
|
2014
|
+
var jt = {
|
|
1961
2015
|
color: "inherit",
|
|
1962
2016
|
textDecoration: "none",
|
|
1963
2017
|
fontSize: 14,
|
|
1964
2018
|
opacity: .85
|
|
1965
|
-
},
|
|
2019
|
+
}, Mt = {
|
|
1966
2020
|
background: "var(--page-surface, #f2f2f2)",
|
|
1967
2021
|
color: "var(--page-text, #111827)",
|
|
1968
2022
|
border: "1px solid rgba(148, 163, 184, 0.25)",
|
|
1969
2023
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
|
|
1970
2024
|
zIndex: 60
|
|
1971
2025
|
};
|
|
1972
|
-
function
|
|
1973
|
-
let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], i = (e) => Array.isArray(e) ? e[0] : e, a = (e) => e == null ? "" :
|
|
2026
|
+
function Nt(e, t = {}, n = "dropdown") {
|
|
2027
|
+
let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], i = (e) => Array.isArray(e) ? e[0] : e, a = (e) => e == null ? "" : Ee(e), o = r.map((e) => {
|
|
1974
2028
|
let n = e.data ?? {}, r = t.parentField ? i(n[t.parentField]) : null;
|
|
1975
2029
|
return {
|
|
1976
2030
|
key: e.id,
|
|
@@ -2011,8 +2065,8 @@ function Tt(e, t = {}, n = "dropdown") {
|
|
|
2011
2065
|
type: e.children.length ? n : "link"
|
|
2012
2066
|
}));
|
|
2013
2067
|
}
|
|
2014
|
-
function
|
|
2015
|
-
let [C, w] = l(null), [T, E] = l(!1), [D, O] = l(!1), [k, A] = l(null), { tenant: j, apiUrl: M } = i(
|
|
2068
|
+
function Pt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], style: c, nodeRef: p, menu: m = "auto", breakpoint: h = 768, source: g = "", labelField: _ = "", hrefField: v = "", imageField: y = "", descField: b = "", parentField: x = "", submenu: S = "dropdown" }) {
|
|
2069
|
+
let [C, w] = l(null), [T, E] = l(!1), [D, O] = l(!1), [k, A] = l(null), { tenant: j, apiUrl: M } = i(Y), N = i(xe)?.[g], [F, I] = l(null);
|
|
2016
2070
|
a(() => {
|
|
2017
2071
|
if (!g || N) return;
|
|
2018
2072
|
let e = !0;
|
|
@@ -2032,7 +2086,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2032
2086
|
let e = new ResizeObserver(() => E(C.offsetWidth < h));
|
|
2033
2087
|
return e.observe(C), () => e.disconnect();
|
|
2034
2088
|
}, [C, h]);
|
|
2035
|
-
let L = g ?
|
|
2089
|
+
let L = g ? Nt(N ?? F ?? [], {
|
|
2036
2090
|
labelField: _,
|
|
2037
2091
|
hrefField: v,
|
|
2038
2092
|
imageField: y,
|
|
@@ -2061,7 +2115,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2061
2115
|
return /* @__PURE__ */ f("a", {
|
|
2062
2116
|
href: e.href || "#",
|
|
2063
2117
|
style: {
|
|
2064
|
-
...
|
|
2118
|
+
...jt,
|
|
2065
2119
|
display: n ? "block" : "flex",
|
|
2066
2120
|
alignItems: n ? void 0 : "center",
|
|
2067
2121
|
gap: n ? void 0 : 10,
|
|
@@ -2158,7 +2212,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2158
2212
|
let t = e.children ?? [];
|
|
2159
2213
|
if (!t.length) return /* @__PURE__ */ d("a", {
|
|
2160
2214
|
href: e.href || "#",
|
|
2161
|
-
style:
|
|
2215
|
+
style: jt,
|
|
2162
2216
|
children: e.label
|
|
2163
2217
|
}, e.key);
|
|
2164
2218
|
let n = e.type === "mega";
|
|
@@ -2172,7 +2226,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2172
2226
|
children: [/* @__PURE__ */ f("a", {
|
|
2173
2227
|
href: e.href || "#",
|
|
2174
2228
|
style: {
|
|
2175
|
-
...
|
|
2229
|
+
...jt,
|
|
2176
2230
|
cursor: "pointer"
|
|
2177
2231
|
},
|
|
2178
2232
|
children: [
|
|
@@ -2188,7 +2242,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2188
2242
|
]
|
|
2189
2243
|
}), k === e.key && (n ? /* @__PURE__ */ d("div", {
|
|
2190
2244
|
style: {
|
|
2191
|
-
...
|
|
2245
|
+
...Mt,
|
|
2192
2246
|
position: "absolute",
|
|
2193
2247
|
left: 0,
|
|
2194
2248
|
right: 0,
|
|
@@ -2204,7 +2258,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2204
2258
|
}, !0))
|
|
2205
2259
|
}) : /* @__PURE__ */ d("div", {
|
|
2206
2260
|
style: {
|
|
2207
|
-
...
|
|
2261
|
+
...Mt,
|
|
2208
2262
|
position: "absolute",
|
|
2209
2263
|
top: "100%",
|
|
2210
2264
|
left: 0,
|
|
@@ -2233,7 +2287,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2233
2287
|
children: L.map((e) => /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ d("a", {
|
|
2234
2288
|
href: e.href || "#",
|
|
2235
2289
|
style: {
|
|
2236
|
-
...
|
|
2290
|
+
...jt,
|
|
2237
2291
|
padding: "10px 4px",
|
|
2238
2292
|
fontWeight: (e.children ?? []).length ? 600 : 400,
|
|
2239
2293
|
opacity: 1
|
|
@@ -2244,7 +2298,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2244
2298
|
]
|
|
2245
2299
|
});
|
|
2246
2300
|
}
|
|
2247
|
-
function
|
|
2301
|
+
function Ft({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
2248
2302
|
let [i, a] = l(0), o = e.length ? Math.min(i, e.length - 1) : 0;
|
|
2249
2303
|
return e.length ? /* @__PURE__ */ f("div", {
|
|
2250
2304
|
ref: r,
|
|
@@ -2284,13 +2338,13 @@ function Dt({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
|
2284
2338
|
}, e.key))]
|
|
2285
2339
|
}) : null;
|
|
2286
2340
|
}
|
|
2287
|
-
function
|
|
2341
|
+
function It({ items: e = [], linked: t, multiple: n = !1, icon: r = "", padX: i, padY: a, headerBg: o, headerColor: s, openBg: c, openColor: u, borderColor: p, style: m, nodeRef: h }) {
|
|
2288
2342
|
let [g, _] = l(() => new Set(e.length ? [e[0].key] : []));
|
|
2289
2343
|
if (!e.length) return null;
|
|
2290
2344
|
let v = (e, t) => typeof e == "string" && e ? e : t, y = (e, t) => {
|
|
2291
2345
|
let n = Number(e);
|
|
2292
2346
|
return e === "" || e == null || !Number.isFinite(n) ? t : n;
|
|
2293
|
-
}, b =
|
|
2347
|
+
}, b = Dt[r], x = (e) => _((t) => {
|
|
2294
2348
|
let r = new Set(n ? t : []);
|
|
2295
2349
|
return t.has(e) ? r.delete(e) : r.add(e), r;
|
|
2296
2350
|
});
|
|
@@ -2365,15 +2419,15 @@ function Ot({ items: e = [], linked: t, multiple: n = !1, icon: r = "", padX: i,
|
|
|
2365
2419
|
})
|
|
2366
2420
|
});
|
|
2367
2421
|
}
|
|
2368
|
-
var
|
|
2422
|
+
var Lt = {
|
|
2369
2423
|
display: "flex",
|
|
2370
2424
|
flexDirection: "column",
|
|
2371
2425
|
gap: "12px"
|
|
2372
|
-
},
|
|
2426
|
+
}, Rt = {
|
|
2373
2427
|
fontSize: "14px",
|
|
2374
2428
|
fontWeight: 500,
|
|
2375
2429
|
color: "var(--page-text, #111827)"
|
|
2376
|
-
},
|
|
2430
|
+
}, zt = {
|
|
2377
2431
|
padding: "10px 12px",
|
|
2378
2432
|
border: "1px solid var(--page-border, #d1d5db)",
|
|
2379
2433
|
borderRadius: "6px",
|
|
@@ -2383,18 +2437,18 @@ var kt = {
|
|
|
2383
2437
|
boxSizing: "border-box",
|
|
2384
2438
|
backgroundColor: "var(--page-surface, #f2f2f2)",
|
|
2385
2439
|
color: "var(--page-text, #111827)"
|
|
2386
|
-
},
|
|
2440
|
+
}, Bt = {
|
|
2387
2441
|
display: "flex",
|
|
2388
2442
|
alignItems: "center",
|
|
2389
2443
|
gap: "8px",
|
|
2390
2444
|
fontSize: "14px",
|
|
2391
2445
|
color: "var(--page-text, #111827)"
|
|
2392
|
-
},
|
|
2446
|
+
}, Vt = (e) => e ? {
|
|
2393
2447
|
readOnly: !0,
|
|
2394
2448
|
tabIndex: -1,
|
|
2395
2449
|
onMouseDown: (e) => e.preventDefault()
|
|
2396
2450
|
} : {};
|
|
2397
|
-
function
|
|
2451
|
+
function Ht(e, t) {
|
|
2398
2452
|
if (!e) return !0;
|
|
2399
2453
|
let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
|
|
2400
2454
|
switch (e.op) {
|
|
@@ -2408,11 +2462,11 @@ function Pt(e, t) {
|
|
|
2408
2462
|
default: return !1;
|
|
2409
2463
|
}
|
|
2410
2464
|
}
|
|
2411
|
-
var
|
|
2465
|
+
var Ut = {
|
|
2412
2466
|
display: "flex",
|
|
2413
2467
|
flexDirection: "column",
|
|
2414
2468
|
gap: 6
|
|
2415
|
-
},
|
|
2469
|
+
}, Wt = {
|
|
2416
2470
|
font: "inherit",
|
|
2417
2471
|
fontSize: 15,
|
|
2418
2472
|
padding: "10px 12px",
|
|
@@ -2423,17 +2477,17 @@ var Ft = {
|
|
|
2423
2477
|
width: "100%",
|
|
2424
2478
|
boxSizing: "border-box"
|
|
2425
2479
|
};
|
|
2426
|
-
function
|
|
2480
|
+
function Gt(e, t) {
|
|
2427
2481
|
let n = Array.isArray(e?.options) ? e.options : [];
|
|
2428
2482
|
if (!e?.parentField) return n;
|
|
2429
2483
|
let r = t?.[e.parentField];
|
|
2430
2484
|
return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
|
|
2431
2485
|
}
|
|
2432
|
-
var
|
|
2433
|
-
function
|
|
2486
|
+
var Kt = "g-recaptcha-response", qt = (e) => e?.type === "recaptcha" ? Kt : e?.name;
|
|
2487
|
+
function Jt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
2434
2488
|
let a = /* @__PURE__ */ f("span", {
|
|
2435
2489
|
style: {
|
|
2436
|
-
...
|
|
2490
|
+
...Rt,
|
|
2437
2491
|
fontSize: 14
|
|
2438
2492
|
},
|
|
2439
2493
|
children: [e.label, e.required ? " *" : ""]
|
|
@@ -2442,7 +2496,7 @@ function Bt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2442
2496
|
required: e.required || void 0,
|
|
2443
2497
|
placeholder: e.placeholder || void 0,
|
|
2444
2498
|
disabled: r || void 0,
|
|
2445
|
-
style:
|
|
2499
|
+
style: Wt,
|
|
2446
2500
|
value: t ?? "",
|
|
2447
2501
|
onChange: (t) => n(e.name, t.target.value)
|
|
2448
2502
|
};
|
|
@@ -2471,12 +2525,12 @@ function Bt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2471
2525
|
borderRadius: 8,
|
|
2472
2526
|
display: "block"
|
|
2473
2527
|
}
|
|
2474
|
-
}) : null : e.type === "recaptcha" ? /* @__PURE__ */ d(
|
|
2528
|
+
}) : null : e.type === "recaptcha" ? /* @__PURE__ */ d($t, {
|
|
2475
2529
|
theme: e.captchaTheme,
|
|
2476
2530
|
size: e.captchaSize,
|
|
2477
2531
|
inert: r,
|
|
2478
|
-
onChange: (e) => n(
|
|
2479
|
-
}) : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(
|
|
2532
|
+
onChange: (e) => n(Kt, e)
|
|
2533
|
+
}) : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(st, {
|
|
2480
2534
|
url: e.src,
|
|
2481
2535
|
style: { width: "100%" }
|
|
2482
2536
|
}) : /* @__PURE__ */ d("video", {
|
|
@@ -2488,14 +2542,14 @@ function Bt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2488
2542
|
display: "block"
|
|
2489
2543
|
}
|
|
2490
2544
|
}) : null : /* @__PURE__ */ f("label", {
|
|
2491
|
-
style:
|
|
2545
|
+
style: Ut,
|
|
2492
2546
|
children: [
|
|
2493
2547
|
a,
|
|
2494
2548
|
e.type === "textarea" || e.multiline ? /* @__PURE__ */ d("textarea", {
|
|
2495
2549
|
...o,
|
|
2496
2550
|
rows: 4,
|
|
2497
2551
|
style: {
|
|
2498
|
-
...
|
|
2552
|
+
...Wt,
|
|
2499
2553
|
resize: "vertical"
|
|
2500
2554
|
}
|
|
2501
2555
|
}) : e.type === "select" ? /* @__PURE__ */ f("select", {
|
|
@@ -2504,7 +2558,7 @@ function Bt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2504
2558
|
children: [/* @__PURE__ */ d("option", {
|
|
2505
2559
|
value: "",
|
|
2506
2560
|
children: e.placeholder || "—"
|
|
2507
|
-
}),
|
|
2561
|
+
}), Gt(e, i).map((e, t) => /* @__PURE__ */ d("option", {
|
|
2508
2562
|
value: typeof e == "string" ? e : e.value,
|
|
2509
2563
|
children: typeof e == "string" ? e : e.label ?? e.value
|
|
2510
2564
|
}, t))]
|
|
@@ -2551,8 +2605,8 @@ function Bt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2551
2605
|
]
|
|
2552
2606
|
});
|
|
2553
2607
|
}
|
|
2554
|
-
function
|
|
2555
|
-
let { tenant: y, apiUrl: b } = i(
|
|
2608
|
+
function Yt({ 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 }) {
|
|
2609
|
+
let { tenant: y, apiUrl: b } = i(Y), [x, S] = l("form"), [C, w] = l(null), [T, E] = l({}), [D, O] = l(0), k = h ? v || "form" : x;
|
|
2556
2610
|
a(() => {
|
|
2557
2611
|
if (!c || !s) return;
|
|
2558
2612
|
let e = !0;
|
|
@@ -2573,11 +2627,11 @@ function Vt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2573
2627
|
section: e,
|
|
2574
2628
|
fields: []
|
|
2575
2629
|
}) : A[A.length - 1].fields.push(e);
|
|
2576
|
-
let j = A.filter((e) => e.section || e.fields.length), M = j.filter((e) => !e.section ||
|
|
2630
|
+
let j = A.filter((e) => e.section || e.fields.length), M = j.filter((e) => !e.section || Ht(e.section.condition, T)).map((e) => ({
|
|
2577
2631
|
...e,
|
|
2578
|
-
fields: e.fields.filter((e) =>
|
|
2632
|
+
fields: e.fields.filter((e) => Ht(e.condition, T))
|
|
2579
2633
|
})), N = j.length > 1, F = Math.min(D, Math.max(0, M.length - 1)), I = N ? M[F]?.fields ?? [] : M.flatMap((e) => e.fields), L = I.filter((e) => {
|
|
2580
|
-
let t = T[
|
|
2634
|
+
let t = T[qt(e)];
|
|
2581
2635
|
return e.required && (t == null || t === "" || t === !1);
|
|
2582
2636
|
}), R = F >= M.length - 1, z = (e, t) => E((n) => {
|
|
2583
2637
|
let r = {
|
|
@@ -2633,11 +2687,11 @@ function Vt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2633
2687
|
}
|
|
2634
2688
|
},
|
|
2635
2689
|
style: {
|
|
2636
|
-
...
|
|
2690
|
+
...Lt,
|
|
2637
2691
|
display: k === "success" ? "none" : "flex"
|
|
2638
2692
|
},
|
|
2639
2693
|
children: c && s ? /* @__PURE__ */ f(u, { children: [
|
|
2640
|
-
N && /* @__PURE__ */ d(
|
|
2694
|
+
N && /* @__PURE__ */ d(wn, {
|
|
2641
2695
|
steps: M.map((e) => ({ label: e.section?.label ?? "Start" })),
|
|
2642
2696
|
active: F + 1,
|
|
2643
2697
|
style: { marginBottom: 8 }
|
|
@@ -2650,9 +2704,9 @@ function Vt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2650
2704
|
},
|
|
2651
2705
|
children: M[F].section.help
|
|
2652
2706
|
}),
|
|
2653
|
-
I.map((e) => /* @__PURE__ */ d(
|
|
2707
|
+
I.map((e) => /* @__PURE__ */ d(Jt, {
|
|
2654
2708
|
field: e,
|
|
2655
|
-
value: T[
|
|
2709
|
+
value: T[qt(e)],
|
|
2656
2710
|
values: T,
|
|
2657
2711
|
onChange: z,
|
|
2658
2712
|
inert: h
|
|
@@ -2669,7 +2723,7 @@ function Vt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2669
2723
|
disabled: h || void 0,
|
|
2670
2724
|
onClick: () => O(F - 1),
|
|
2671
2725
|
style: {
|
|
2672
|
-
...
|
|
2726
|
+
...Me,
|
|
2673
2727
|
background: "transparent",
|
|
2674
2728
|
color: "inherit",
|
|
2675
2729
|
border: 0,
|
|
@@ -2682,7 +2736,7 @@ function Vt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2682
2736
|
disabled: h || L.length > 0,
|
|
2683
2737
|
onClick: () => O(F + 1),
|
|
2684
2738
|
style: {
|
|
2685
|
-
...
|
|
2739
|
+
...Me,
|
|
2686
2740
|
border: 0,
|
|
2687
2741
|
padding: "10px 22px",
|
|
2688
2742
|
borderRadius: 8,
|
|
@@ -2696,7 +2750,7 @@ function Vt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2696
2750
|
type: "submit",
|
|
2697
2751
|
disabled: h || void 0,
|
|
2698
2752
|
style: {
|
|
2699
|
-
...
|
|
2753
|
+
...Me,
|
|
2700
2754
|
border: 0,
|
|
2701
2755
|
padding: "10px 22px",
|
|
2702
2756
|
borderRadius: 8,
|
|
@@ -2723,10 +2777,10 @@ function Vt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2723
2777
|
]
|
|
2724
2778
|
});
|
|
2725
2779
|
}
|
|
2726
|
-
var
|
|
2780
|
+
var Xt = null, Zt = null, Qt = (e) => {
|
|
2727
2781
|
let t = typeof e == "string" && e.trim() ? e.trim() : "";
|
|
2728
|
-
if (
|
|
2729
|
-
if (
|
|
2782
|
+
if (Xt && Zt === t) return Xt;
|
|
2783
|
+
if (Xt && typeof window < "u") {
|
|
2730
2784
|
for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
|
|
2731
2785
|
delete window[e];
|
|
2732
2786
|
} catch {
|
|
@@ -2734,22 +2788,22 @@ var Ht = null, Ut = null, Wt = (e) => {
|
|
|
2734
2788
|
}
|
|
2735
2789
|
document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
|
|
2736
2790
|
}
|
|
2737
|
-
return
|
|
2791
|
+
return Zt = t, Xt = new Promise((e) => {
|
|
2738
2792
|
if (typeof window > "u") return;
|
|
2739
2793
|
if (window.grecaptcha?.render) return e(window.grecaptcha);
|
|
2740
2794
|
window.__webimRecaptchaReady = () => e(window.grecaptcha);
|
|
2741
2795
|
let n = document.createElement("script");
|
|
2742
2796
|
n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
|
|
2743
|
-
}),
|
|
2797
|
+
}), Xt;
|
|
2744
2798
|
};
|
|
2745
|
-
function
|
|
2746
|
-
let p = i(
|
|
2799
|
+
function $t({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert: l, onChange: u }) {
|
|
2800
|
+
let p = i(Y), 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);
|
|
2747
2801
|
if (_.current = u, a(() => {
|
|
2748
2802
|
if (l || !h || !g.current) return;
|
|
2749
2803
|
let e = !0, i = (t) => {
|
|
2750
2804
|
e && typeof _.current == "function" && _.current(t);
|
|
2751
2805
|
};
|
|
2752
|
-
return
|
|
2806
|
+
return Qt(r).then((r) => {
|
|
2753
2807
|
if (!(!e || !g.current || !r?.render)) {
|
|
2754
2808
|
g.current.innerHTML = "", i("");
|
|
2755
2809
|
try {
|
|
@@ -2831,17 +2885,17 @@ function Gt({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert:
|
|
|
2831
2885
|
children: /* @__PURE__ */ d("div", { ref: g })
|
|
2832
2886
|
}) : null;
|
|
2833
2887
|
}
|
|
2834
|
-
function
|
|
2888
|
+
function en({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
2835
2889
|
return /* @__PURE__ */ d("label", {
|
|
2836
2890
|
ref: r,
|
|
2837
2891
|
style: {
|
|
2838
|
-
...
|
|
2892
|
+
...Rt,
|
|
2839
2893
|
...P(n)
|
|
2840
2894
|
},
|
|
2841
|
-
children:
|
|
2895
|
+
children: Ue(t, e, i)
|
|
2842
2896
|
});
|
|
2843
2897
|
}
|
|
2844
|
-
function
|
|
2898
|
+
function tn({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2845
2899
|
return /* @__PURE__ */ d("input", {
|
|
2846
2900
|
ref: a,
|
|
2847
2901
|
type: e,
|
|
@@ -2849,13 +2903,13 @@ function qt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
|
|
|
2849
2903
|
placeholder: n,
|
|
2850
2904
|
required: !o && !!r,
|
|
2851
2905
|
style: {
|
|
2852
|
-
...
|
|
2906
|
+
...zt,
|
|
2853
2907
|
...P(i)
|
|
2854
2908
|
},
|
|
2855
|
-
...
|
|
2909
|
+
...Vt(o)
|
|
2856
2910
|
});
|
|
2857
2911
|
}
|
|
2858
|
-
function
|
|
2912
|
+
function nn({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2859
2913
|
return /* @__PURE__ */ d("textarea", {
|
|
2860
2914
|
ref: a,
|
|
2861
2915
|
name: e || void 0,
|
|
@@ -2863,18 +2917,18 @@ function Jt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
|
|
|
2863
2917
|
rows: n,
|
|
2864
2918
|
required: !o && !!r,
|
|
2865
2919
|
style: {
|
|
2866
|
-
...
|
|
2920
|
+
...zt,
|
|
2867
2921
|
resize: "vertical",
|
|
2868
2922
|
...P(i)
|
|
2869
2923
|
},
|
|
2870
|
-
...
|
|
2924
|
+
...Vt(o)
|
|
2871
2925
|
});
|
|
2872
2926
|
}
|
|
2873
|
-
function
|
|
2927
|
+
function rn({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
|
|
2874
2928
|
return /* @__PURE__ */ f("label", {
|
|
2875
2929
|
ref: o,
|
|
2876
2930
|
style: {
|
|
2877
|
-
...
|
|
2931
|
+
...Bt,
|
|
2878
2932
|
...P(a)
|
|
2879
2933
|
},
|
|
2880
2934
|
children: [/* @__PURE__ */ d("input", {
|
|
@@ -2891,7 +2945,7 @@ function Yt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
|
|
|
2891
2945
|
}), t]
|
|
2892
2946
|
});
|
|
2893
2947
|
}
|
|
2894
|
-
function
|
|
2948
|
+
function an({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
|
|
2895
2949
|
return /* @__PURE__ */ f("select", {
|
|
2896
2950
|
ref: a,
|
|
2897
2951
|
name: e || void 0,
|
|
@@ -2900,7 +2954,7 @@ function Xt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2900
2954
|
onMouseDown: o ? (e) => e.preventDefault() : void 0,
|
|
2901
2955
|
tabIndex: o ? -1 : void 0,
|
|
2902
2956
|
style: {
|
|
2903
|
-
...
|
|
2957
|
+
...zt,
|
|
2904
2958
|
appearance: "auto",
|
|
2905
2959
|
...P(i)
|
|
2906
2960
|
},
|
|
@@ -2914,12 +2968,12 @@ function Xt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2914
2968
|
}, t))]
|
|
2915
2969
|
});
|
|
2916
2970
|
}
|
|
2917
|
-
function
|
|
2971
|
+
function on({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
|
|
2918
2972
|
let [s, c] = l(null);
|
|
2919
2973
|
return /* @__PURE__ */ f("label", {
|
|
2920
2974
|
ref: a,
|
|
2921
2975
|
style: {
|
|
2922
|
-
...
|
|
2976
|
+
...zt,
|
|
2923
2977
|
display: "flex",
|
|
2924
2978
|
alignItems: "center",
|
|
2925
2979
|
gap: "8px",
|
|
@@ -2946,12 +3000,12 @@ function Zt({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
|
|
|
2946
3000
|
]
|
|
2947
3001
|
});
|
|
2948
3002
|
}
|
|
2949
|
-
function
|
|
3003
|
+
function sn({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
2950
3004
|
return /* @__PURE__ */ d("button", {
|
|
2951
3005
|
ref: n,
|
|
2952
3006
|
type: r ? "button" : "submit",
|
|
2953
3007
|
style: {
|
|
2954
|
-
...
|
|
3008
|
+
...Me,
|
|
2955
3009
|
border: 0,
|
|
2956
3010
|
cursor: "pointer",
|
|
2957
3011
|
alignSelf: "flex-start",
|
|
@@ -2966,7 +3020,7 @@ function Qt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
|
2966
3020
|
children: e
|
|
2967
3021
|
});
|
|
2968
3022
|
}
|
|
2969
|
-
function
|
|
3023
|
+
function cn({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
2970
3024
|
let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
|
|
2971
3025
|
return /* @__PURE__ */ d("div", {
|
|
2972
3026
|
ref: r,
|
|
@@ -2983,8 +3037,8 @@ function $t({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
|
2983
3037
|
}, t))
|
|
2984
3038
|
});
|
|
2985
3039
|
}
|
|
2986
|
-
function
|
|
2987
|
-
let { tenant: v, apiUrl: y, locale: b } = i(
|
|
3040
|
+
function ln({ 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: _ }) {
|
|
3041
|
+
let { tenant: v, apiUrl: y, locale: b } = i(Y), x = i(Q), S = i(xe), [, C] = l(0);
|
|
2988
3042
|
a(() => {
|
|
2989
3043
|
if (typeof window > "u") return;
|
|
2990
3044
|
let e = () => C((e) => e + 1);
|
|
@@ -2992,7 +3046,7 @@ function en({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2992
3046
|
window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
|
|
2993
3047
|
};
|
|
2994
3048
|
}, []);
|
|
2995
|
-
let w =
|
|
3049
|
+
let w = Z(h), T = JSON.stringify(w), E = T !== "{}" && !e?.startsWith?.("api:"), D = E ? null : S?.[e], O = m ? Se(S) : 1, [k, A] = l(null);
|
|
2996
3050
|
if (a(() => {
|
|
2997
3051
|
if (!e || D) return;
|
|
2998
3052
|
let n = !0, r = new URLSearchParams();
|
|
@@ -3037,7 +3091,7 @@ function en({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
3037
3091
|
},
|
|
3038
3092
|
children: M.map((e) => /* @__PURE__ */ d("div", {
|
|
3039
3093
|
style: { minWidth: 0 },
|
|
3040
|
-
children: x.render(p, (t) =>
|
|
3094
|
+
children: x.render(p, (t) => De(t, e))
|
|
3041
3095
|
}, e.id ?? e?.data?.slug))
|
|
3042
3096
|
}) : /* @__PURE__ */ d("div", {
|
|
3043
3097
|
ref: _,
|
|
@@ -3047,7 +3101,7 @@ function en({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
3047
3101
|
...P(g)
|
|
3048
3102
|
},
|
|
3049
3103
|
children: M.map((e) => {
|
|
3050
|
-
let t = o ?
|
|
3104
|
+
let t = o ? we(e?.data, o) : null, r = s ? Ee(we(e?.data, s)) : null, i = c ? we(e?.data, c) : null, a = Array.isArray(i) ? i : null, l = a || i == null ? null : Ee(i), u = n === "list";
|
|
3051
3105
|
return /* @__PURE__ */ f("div", {
|
|
3052
3106
|
style: {
|
|
3053
3107
|
display: "flex",
|
|
@@ -3094,7 +3148,7 @@ function en({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
3094
3148
|
lineHeight: 1.55,
|
|
3095
3149
|
opacity: .85
|
|
3096
3150
|
},
|
|
3097
|
-
children:
|
|
3151
|
+
children: Ye(a)
|
|
3098
3152
|
})
|
|
3099
3153
|
]
|
|
3100
3154
|
})]
|
|
@@ -3102,8 +3156,8 @@ function en({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
3102
3156
|
})
|
|
3103
3157
|
});
|
|
3104
3158
|
}
|
|
3105
|
-
function
|
|
3106
|
-
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} :
|
|
3159
|
+
function un({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
|
|
3160
|
+
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : X(), s = {
|
|
3107
3161
|
height: 34,
|
|
3108
3162
|
padding: "0 12px",
|
|
3109
3163
|
borderRadius: 8,
|
|
@@ -3151,7 +3205,7 @@ function tn({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3151
3205
|
name: `f_${e.name}`,
|
|
3152
3206
|
defaultValue: o[e.name] ?? "",
|
|
3153
3207
|
style: s,
|
|
3154
|
-
...
|
|
3208
|
+
...Vt(i),
|
|
3155
3209
|
children: [/* @__PURE__ */ d("option", {
|
|
3156
3210
|
value: "",
|
|
3157
3211
|
children: e.label || e.name
|
|
@@ -3166,7 +3220,7 @@ function tn({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3166
3220
|
name: `f_${e.name}`,
|
|
3167
3221
|
defaultValue: o[e.name] ?? "",
|
|
3168
3222
|
style: s,
|
|
3169
|
-
...
|
|
3223
|
+
...Vt(i),
|
|
3170
3224
|
children: [
|
|
3171
3225
|
/* @__PURE__ */ d("option", {
|
|
3172
3226
|
value: "",
|
|
@@ -3187,7 +3241,7 @@ function tn({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3187
3241
|
defaultValue: o[e.name] ?? "",
|
|
3188
3242
|
placeholder: e.label || e.name,
|
|
3189
3243
|
style: s,
|
|
3190
|
-
...
|
|
3244
|
+
...Vt(i)
|
|
3191
3245
|
}, e.name)), /* @__PURE__ */ d("button", {
|
|
3192
3246
|
type: "submit",
|
|
3193
3247
|
style: {
|
|
@@ -3200,12 +3254,12 @@ function tn({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3200
3254
|
fontWeight: 600,
|
|
3201
3255
|
cursor: i ? "default" : "pointer"
|
|
3202
3256
|
},
|
|
3203
|
-
...
|
|
3257
|
+
...Vt(i),
|
|
3204
3258
|
children: t
|
|
3205
3259
|
})]
|
|
3206
3260
|
});
|
|
3207
3261
|
}
|
|
3208
|
-
function
|
|
3262
|
+
function dn({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
3209
3263
|
return e.length ? /* @__PURE__ */ d("nav", {
|
|
3210
3264
|
ref: r,
|
|
3211
3265
|
"aria-label": "Breadcrumb",
|
|
@@ -3255,8 +3309,8 @@ function nn({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
|
3255
3309
|
})
|
|
3256
3310
|
}) : null;
|
|
3257
3311
|
}
|
|
3258
|
-
function
|
|
3259
|
-
let { tenant: g, apiUrl: _ } = i(
|
|
3312
|
+
function fn({ 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 }) {
|
|
3313
|
+
let { tenant: g, apiUrl: _ } = i(Y), v = i(xe), [y, b] = l(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
|
|
3260
3314
|
a(() => {
|
|
3261
3315
|
if (!o || Number.isFinite(x)) return;
|
|
3262
3316
|
let e = !0, t = o.startsWith("api:") ? `${_}/data/${encodeURIComponent(o.slice(4))}` : `${_}/dynamic/${encodeURIComponent(o)}?limit=1`;
|
|
@@ -3275,7 +3329,7 @@ function rn({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
|
|
|
3275
3329
|
]);
|
|
3276
3330
|
let S = Math.max(1, Number(s) || 6), C = Number.isFinite(x) ? x : y;
|
|
3277
3331
|
if (o && C === null || o && u && !(C > 0)) return null;
|
|
3278
|
-
let w = Math.min(Math.max(o ? Math.ceil(C / S) : Number(e) || 1, 1), 50), T = Math.min(Math.max(o ?
|
|
3332
|
+
let w = Math.min(Math.max(o ? Math.ceil(C / S) : Number(e) || 1, 1), 50), T = Math.min(Math.max(o ? Se(v) : Number(t) || 1, 1), w), E = (e) => {
|
|
3279
3333
|
if (o) {
|
|
3280
3334
|
if (typeof window < "u") {
|
|
3281
3335
|
let t = new URLSearchParams(window.location.search);
|
|
@@ -3340,15 +3394,15 @@ function rn({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
|
|
|
3340
3394
|
]
|
|
3341
3395
|
});
|
|
3342
3396
|
}
|
|
3343
|
-
var
|
|
3397
|
+
var pn = "webim.page_mode", mn = () => {
|
|
3344
3398
|
if (typeof window > "u") return "auto";
|
|
3345
3399
|
try {
|
|
3346
|
-
let e = window.localStorage.getItem(
|
|
3400
|
+
let e = window.localStorage.getItem(pn);
|
|
3347
3401
|
return e === "light" || e === "dark" ? e : "auto";
|
|
3348
3402
|
} catch {
|
|
3349
3403
|
return "auto";
|
|
3350
3404
|
}
|
|
3351
|
-
},
|
|
3405
|
+
}, hn = (e) => {
|
|
3352
3406
|
let t = {
|
|
3353
3407
|
width: 16,
|
|
3354
3408
|
height: 16,
|
|
@@ -3380,13 +3434,13 @@ var an = "webim.page_mode", on = () => {
|
|
|
3380
3434
|
rx: "2"
|
|
3381
3435
|
}), /* @__PURE__ */ d("path", { d: "M8 21h8M12 17v4" })]
|
|
3382
3436
|
});
|
|
3383
|
-
},
|
|
3437
|
+
}, gn = {
|
|
3384
3438
|
light: "Light theme",
|
|
3385
3439
|
dark: "Dark theme",
|
|
3386
3440
|
auto: "Follow the device theme"
|
|
3387
3441
|
};
|
|
3388
|
-
function
|
|
3389
|
-
let [o, s] = l(i ? "auto" :
|
|
3442
|
+
function _n({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
3443
|
+
let [o, s] = l(i ? "auto" : mn), u = c(null), f = (e) => {
|
|
3390
3444
|
u.current = e, typeof r == "function" && r(e);
|
|
3391
3445
|
};
|
|
3392
3446
|
a(() => {
|
|
@@ -3394,7 +3448,7 @@ function ln({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3394
3448
|
let e = u.current?.closest?.(".webim-page");
|
|
3395
3449
|
e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
|
|
3396
3450
|
try {
|
|
3397
|
-
o === "auto" ? window.localStorage.removeItem(
|
|
3451
|
+
o === "auto" ? window.localStorage.removeItem(pn) : window.localStorage.setItem(pn, o);
|
|
3398
3452
|
} catch {}
|
|
3399
3453
|
}, [o, i]);
|
|
3400
3454
|
let p = t === !1 ? ["light", "dark"] : [
|
|
@@ -3429,8 +3483,8 @@ function ln({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3429
3483
|
},
|
|
3430
3484
|
children: p.map((e) => /* @__PURE__ */ d("button", {
|
|
3431
3485
|
type: "button",
|
|
3432
|
-
title:
|
|
3433
|
-
"aria-label":
|
|
3486
|
+
title: gn[e],
|
|
3487
|
+
"aria-label": gn[e],
|
|
3434
3488
|
"aria-pressed": e === m,
|
|
3435
3489
|
onClick: i ? void 0 : () => s(e),
|
|
3436
3490
|
style: {
|
|
@@ -3441,15 +3495,15 @@ function ln({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3441
3495
|
background: e === m ? "var(--page-accent, #111827)" : "transparent",
|
|
3442
3496
|
opacity: e === m ? 1 : .7
|
|
3443
3497
|
},
|
|
3444
|
-
children:
|
|
3498
|
+
children: hn(e)
|
|
3445
3499
|
}, e))
|
|
3446
3500
|
});
|
|
3447
3501
|
let g = p[(p.indexOf(m) + 1) % p.length];
|
|
3448
3502
|
return /* @__PURE__ */ d("button", {
|
|
3449
3503
|
ref: f,
|
|
3450
3504
|
type: "button",
|
|
3451
|
-
title:
|
|
3452
|
-
"aria-label": `Theme: ${
|
|
3505
|
+
title: gn[m],
|
|
3506
|
+
"aria-label": `Theme: ${gn[m]} — switch to ${gn[g]}`,
|
|
3453
3507
|
onClick: i ? void 0 : () => s(g),
|
|
3454
3508
|
style: {
|
|
3455
3509
|
...h,
|
|
@@ -3458,10 +3512,10 @@ function ln({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3458
3512
|
border: "1px solid rgba(148, 163, 184, 0.4)",
|
|
3459
3513
|
...P(n)
|
|
3460
3514
|
},
|
|
3461
|
-
children:
|
|
3515
|
+
children: hn(m)
|
|
3462
3516
|
});
|
|
3463
3517
|
}
|
|
3464
|
-
function
|
|
3518
|
+
function vn(e) {
|
|
3465
3519
|
let t = e?.parentElement;
|
|
3466
3520
|
for (; t && t !== document.body;) {
|
|
3467
3521
|
let e = getComputedStyle(t).overflowY;
|
|
@@ -3470,7 +3524,7 @@ function un(e) {
|
|
|
3470
3524
|
}
|
|
3471
3525
|
return window;
|
|
3472
3526
|
}
|
|
3473
|
-
var
|
|
3527
|
+
var yn = (e) => e === window ? window.scrollY : e.scrollTop, bn = {
|
|
3474
3528
|
"bottom-right": (e) => ({
|
|
3475
3529
|
right: e,
|
|
3476
3530
|
bottom: e
|
|
@@ -3485,7 +3539,7 @@ var dn = (e) => e === window ? window.scrollY : e.scrollTop, fn = {
|
|
|
3485
3539
|
transform: "translateX(-50%)"
|
|
3486
3540
|
})
|
|
3487
3541
|
};
|
|
3488
|
-
function
|
|
3542
|
+
function xn({ 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 }) {
|
|
3489
3543
|
let [_, v] = l(!!m), [y, b] = l(null), x = (e) => {
|
|
3490
3544
|
b(e), typeof p == "function" && p(e);
|
|
3491
3545
|
};
|
|
@@ -3496,8 +3550,8 @@ function pn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
3496
3550
|
}
|
|
3497
3551
|
if (!y) return;
|
|
3498
3552
|
let e = Number(i) >= 0 ? Number(i) : 300, t = () => {
|
|
3499
|
-
let t =
|
|
3500
|
-
v(n ||
|
|
3553
|
+
let t = vn(y), n = g && !(t === window ? document.documentElement.scrollHeight > window.innerHeight : t.scrollHeight > t.clientHeight);
|
|
3554
|
+
v(n || yn(t) > e);
|
|
3501
3555
|
};
|
|
3502
3556
|
return t(), document.addEventListener("scroll", t, {
|
|
3503
3557
|
capture: !0,
|
|
@@ -3511,7 +3565,7 @@ function pn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
3511
3565
|
]);
|
|
3512
3566
|
let S = () => {
|
|
3513
3567
|
if (m) return;
|
|
3514
|
-
let e =
|
|
3568
|
+
let e = vn(y), t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, n = o === !1 || t ? "auto" : "smooth";
|
|
3515
3569
|
e === window ? window.scrollTo({
|
|
3516
3570
|
top: 0,
|
|
3517
3571
|
behavior: n
|
|
@@ -3519,7 +3573,7 @@ function pn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
3519
3573
|
top: 0,
|
|
3520
3574
|
behavior: n
|
|
3521
3575
|
});
|
|
3522
|
-
}, C = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E =
|
|
3576
|
+
}, C = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E = bn[n] ? n : "bottom-right", D = h ? {
|
|
3523
3577
|
position: "fixed",
|
|
3524
3578
|
zIndex: 5,
|
|
3525
3579
|
bottom: (h.bottom ?? 0) + C,
|
|
@@ -3532,7 +3586,7 @@ function pn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
3532
3586
|
} : {
|
|
3533
3587
|
position: "fixed",
|
|
3534
3588
|
zIndex: 2147482e3,
|
|
3535
|
-
...
|
|
3589
|
+
...bn[E](C)
|
|
3536
3590
|
};
|
|
3537
3591
|
return /* @__PURE__ */ f("button", {
|
|
3538
3592
|
ref: x,
|
|
@@ -3583,7 +3637,7 @@ function pn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
3583
3637
|
}), w ? /* @__PURE__ */ d("span", { children: T }) : null]
|
|
3584
3638
|
});
|
|
3585
3639
|
}
|
|
3586
|
-
var
|
|
3640
|
+
var Sn = {
|
|
3587
3641
|
facebook: {
|
|
3588
3642
|
label: "Facebook",
|
|
3589
3643
|
color: "#1877f2",
|
|
@@ -3650,8 +3704,8 @@ var mn = {
|
|
|
3650
3704
|
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"
|
|
3651
3705
|
}
|
|
3652
3706
|
};
|
|
3653
|
-
function
|
|
3654
|
-
let l = Array.isArray(e) ? e.filter((e) => e &&
|
|
3707
|
+
function Cn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
|
|
3708
|
+
let l = Array.isArray(e) ? e.filter((e) => e && Sn[e.network]) : [];
|
|
3655
3709
|
if (!l.length) return null;
|
|
3656
3710
|
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;
|
|
3657
3711
|
return /* @__PURE__ */ d("div", {
|
|
@@ -3664,7 +3718,7 @@ function hn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
3664
3718
|
...P(o)
|
|
3665
3719
|
},
|
|
3666
3720
|
children: l.map((e, r) => {
|
|
3667
|
-
let i =
|
|
3721
|
+
let i = Sn[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);
|
|
3668
3722
|
return /* @__PURE__ */ d("a", {
|
|
3669
3723
|
href: e.url || "#",
|
|
3670
3724
|
onClick: h,
|
|
@@ -3698,7 +3752,7 @@ function hn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
3698
3752
|
})
|
|
3699
3753
|
});
|
|
3700
3754
|
}
|
|
3701
|
-
function
|
|
3755
|
+
function wn({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
|
|
3702
3756
|
if (!e.length) return null;
|
|
3703
3757
|
let o = Math.min(Math.max(Number(n) || 1, 1), e.length), s = (e) => ({
|
|
3704
3758
|
width: 32,
|
|
@@ -3776,7 +3830,7 @@ function gn({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
|
|
|
3776
3830
|
})
|
|
3777
3831
|
});
|
|
3778
3832
|
}
|
|
3779
|
-
var
|
|
3833
|
+
var Tn = {
|
|
3780
3834
|
small: {
|
|
3781
3835
|
w: 132,
|
|
3782
3836
|
h: 46,
|
|
@@ -3798,21 +3852,21 @@ var _n = {
|
|
|
3798
3852
|
title: 12.5,
|
|
3799
3853
|
avatar: 46
|
|
3800
3854
|
}
|
|
3801
|
-
},
|
|
3802
|
-
|
|
3803
|
-
var
|
|
3855
|
+
}, En = (e) => Tn[e] ?? Tn.medium;
|
|
3856
|
+
Tn.medium.w, Tn.medium.h;
|
|
3857
|
+
var Dn = (e) => String(e?.group ?? "").trim(), On = (e) => {
|
|
3804
3858
|
let t = [], n = /* @__PURE__ */ new Map();
|
|
3805
3859
|
return e.forEach((e, r) => {
|
|
3806
|
-
let i =
|
|
3860
|
+
let i = Dn(e) || `#${r}`;
|
|
3807
3861
|
n.has(i) || (n.set(i, []), t.push(i)), n.get(i).push(e);
|
|
3808
3862
|
}), t.flatMap((e) => n.get(e));
|
|
3809
3863
|
};
|
|
3810
|
-
function
|
|
3811
|
-
let i =
|
|
3864
|
+
function kn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top" } = {}) {
|
|
3865
|
+
let i = En(t), a = n ? i.h : i.w, o = n ? 16 : 20, s = (n ? i.w : i.h) + (n ? 56 : 48), c = Array.isArray(e) ? e.filter((e) => e && e.id) : [], l = new Set(c.map((e) => e.id)), u = /* @__PURE__ */ new Map(), d = [];
|
|
3812
3866
|
for (let e of c) e.parent && l.has(e.parent) && e.parent !== e.id ? (u.has(e.parent) || u.set(e.parent, []), u.get(e.parent).push(e)) : d.push(e);
|
|
3813
|
-
d =
|
|
3814
|
-
for (let [e, t] of u) u.set(e,
|
|
3815
|
-
let f = (e, t) => o + (
|
|
3867
|
+
d = On(d);
|
|
3868
|
+
for (let [e, t] of u) u.set(e, On(t));
|
|
3869
|
+
let f = (e, t) => o + (Dn(e) !== Dn(t) && (Dn(e) || Dn(t)) ? 24 : 0), p = /* @__PURE__ */ new Map(), m = (e, t) => {
|
|
3816
3870
|
if (t.has(e.id)) return 0;
|
|
3817
3871
|
t.add(e.id);
|
|
3818
3872
|
let n = u.get(e.id) ?? [], r = n.reduce((e, r, i) => e + m(r, t) + (i ? f(n[i - 1], r) : 0), 0), i = Math.max(a, r);
|
|
@@ -3828,7 +3882,7 @@ function xn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top"
|
|
|
3828
3882
|
x: m,
|
|
3829
3883
|
y: b
|
|
3830
3884
|
});
|
|
3831
|
-
let x =
|
|
3885
|
+
let x = Dn(e);
|
|
3832
3886
|
if (x) {
|
|
3833
3887
|
let t = `${e.parent && l.has(e.parent) && e.parent !== e.id ? e.parent : ""}|${x}`;
|
|
3834
3888
|
_.has(t) || _.set(t, {
|
|
@@ -3902,19 +3956,19 @@ function xn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top"
|
|
|
3902
3956
|
horizontal: n
|
|
3903
3957
|
};
|
|
3904
3958
|
}
|
|
3905
|
-
var
|
|
3959
|
+
var An = (e, t) => {
|
|
3906
3960
|
let n = String(e ?? "");
|
|
3907
3961
|
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
3908
|
-
},
|
|
3962
|
+
}, jn = (e) => {
|
|
3909
3963
|
let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
|
|
3910
3964
|
if (!t) return "#ffffff";
|
|
3911
3965
|
let n = t[1];
|
|
3912
3966
|
n.length === 3 && (n = [...n].map((e) => e + e).join(""));
|
|
3913
3967
|
let r = parseInt(n, 16);
|
|
3914
3968
|
return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
|
|
3915
|
-
},
|
|
3916
|
-
function
|
|
3917
|
-
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 ? "" :
|
|
3969
|
+
}, Mn = (e) => !!(e?.cv?.trim?.() || e?.photo);
|
|
3970
|
+
function Nn(e, t = {}) {
|
|
3971
|
+
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 ? "" : Ee(e);
|
|
3918
3972
|
return n.map((e) => {
|
|
3919
3973
|
let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
|
|
3920
3974
|
return {
|
|
@@ -3929,11 +3983,11 @@ function Tn(e, t = {}) {
|
|
|
3929
3983
|
};
|
|
3930
3984
|
});
|
|
3931
3985
|
}
|
|
3932
|
-
var
|
|
3986
|
+
var Pn = {
|
|
3933
3987
|
size: 36,
|
|
3934
3988
|
pad: 10
|
|
3935
3989
|
};
|
|
3936
|
-
function
|
|
3990
|
+
function Fn({ node: e, onClose: t }) {
|
|
3937
3991
|
return a(() => {
|
|
3938
3992
|
let e = (e) => e.key === "Escape" && t();
|
|
3939
3993
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
@@ -4054,8 +4108,8 @@ function Dn({ node: e, onClose: t }) {
|
|
|
4054
4108
|
})
|
|
4055
4109
|
});
|
|
4056
4110
|
}
|
|
4057
|
-
function
|
|
4058
|
-
let C = o(), [w, T] = l(null), { tenant: E, apiUrl: D } = i(
|
|
4111
|
+
function In({ nodes: e = [], source: t, nameField: n, titleField: r, photoField: s, parentField: c, cvField: p, hrefField: m, groupField: h, groupTitles: g = "top", groupBg: _ = "", size: v = "medium", horizontal: y = !1, style: b, nodeRef: x, interactive: S = !0 }) {
|
|
4112
|
+
let C = o(), [w, T] = l(null), { tenant: E, apiUrl: D } = i(Y), O = i(xe)?.[t], [k, A] = l(null);
|
|
4059
4113
|
a(() => {
|
|
4060
4114
|
if (!t || O) return;
|
|
4061
4115
|
let e = !0;
|
|
@@ -4071,7 +4125,7 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4071
4125
|
D,
|
|
4072
4126
|
O
|
|
4073
4127
|
]);
|
|
4074
|
-
let j = t ?
|
|
4128
|
+
let j = t ? Nn(O ?? k ?? [], {
|
|
4075
4129
|
nameField: n,
|
|
4076
4130
|
titleField: r,
|
|
4077
4131
|
photoField: s,
|
|
@@ -4079,7 +4133,7 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4079
4133
|
cvField: p,
|
|
4080
4134
|
hrefField: m,
|
|
4081
4135
|
groupField: h
|
|
4082
|
-
}) : e, M =
|
|
4136
|
+
}) : e, M = En(v), { boxes: N, links: F, groups: I, width: L, height: R } = kn(j, {
|
|
4083
4137
|
size: v,
|
|
4084
4138
|
horizontal: y,
|
|
4085
4139
|
groupTitles: g
|
|
@@ -4137,8 +4191,8 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4137
4191
|
fontSize: M.title + 1,
|
|
4138
4192
|
fontWeight: "600",
|
|
4139
4193
|
opacity: "0.55",
|
|
4140
|
-
fill: r ?
|
|
4141
|
-
children:
|
|
4194
|
+
fill: r ? jn(e.color || _) : "var(--page-text, #111827)",
|
|
4195
|
+
children: An(e.title, Math.floor(e.width / 7))
|
|
4142
4196
|
})] }, `group-${t}`);
|
|
4143
4197
|
}),
|
|
4144
4198
|
F.map((e, t) => /* @__PURE__ */ d("path", {
|
|
@@ -4148,7 +4202,7 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4148
4202
|
strokeWidth: "1.5"
|
|
4149
4203
|
}, t)),
|
|
4150
4204
|
N.map(({ node: e, x: t, y: n }) => {
|
|
4151
|
-
let r = z.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 ?
|
|
4205
|
+
let r = z.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 ? jn(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? jn(e.color2) : s, l = S && (Mn(e) || e.href), p = () => Mn(e) ? T(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Pn.pad + M.avatar + 8 : t + M.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((M.w - M.avatar - 26) / 7) : Math.floor(M.w / 7.6), _ = M.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
|
|
4152
4206
|
return /* @__PURE__ */ f("g", {
|
|
4153
4207
|
onClick: l ? p : void 0,
|
|
4154
4208
|
style: l ? { cursor: "pointer" } : void 0,
|
|
@@ -4212,13 +4266,13 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4212
4266
|
e.photo && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("clipPath", {
|
|
4213
4267
|
id: `${C}-${e.id}`,
|
|
4214
4268
|
children: /* @__PURE__ */ d("circle", {
|
|
4215
|
-
cx: t +
|
|
4269
|
+
cx: t + Pn.pad + M.avatar / 2,
|
|
4216
4270
|
cy: n + M.h / 2,
|
|
4217
4271
|
r: M.avatar / 2
|
|
4218
4272
|
})
|
|
4219
4273
|
}), /* @__PURE__ */ d("image", {
|
|
4220
4274
|
href: e.photo,
|
|
4221
|
-
x: t +
|
|
4275
|
+
x: t + Pn.pad,
|
|
4222
4276
|
y: n + (M.h - M.avatar) / 2,
|
|
4223
4277
|
width: M.avatar,
|
|
4224
4278
|
height: M.avatar,
|
|
@@ -4232,7 +4286,7 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4232
4286
|
fontSize: M.title,
|
|
4233
4287
|
fontWeight: "600",
|
|
4234
4288
|
fill: s,
|
|
4235
|
-
children:
|
|
4289
|
+
children: An(e.title, g + 4)
|
|
4236
4290
|
}), e.name && /* @__PURE__ */ d("text", {
|
|
4237
4291
|
x: m,
|
|
4238
4292
|
y: n + _ + _ / 2 + M.name * .35,
|
|
@@ -4240,7 +4294,7 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4240
4294
|
fontSize: M.name,
|
|
4241
4295
|
fontWeight: "600",
|
|
4242
4296
|
fill: c,
|
|
4243
|
-
children:
|
|
4297
|
+
children: An(e.name, g)
|
|
4244
4298
|
})] }) : /* @__PURE__ */ f(u, { children: [v[0] && /* @__PURE__ */ d("text", {
|
|
4245
4299
|
x: m,
|
|
4246
4300
|
y: n + (v[1] ? M.h * .43 : M.h * .57),
|
|
@@ -4248,7 +4302,7 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4248
4302
|
fontSize: M.name,
|
|
4249
4303
|
fontWeight: "600",
|
|
4250
4304
|
fill: s,
|
|
4251
|
-
children:
|
|
4305
|
+
children: An(v[0], g)
|
|
4252
4306
|
}), v[1] && /* @__PURE__ */ d("text", {
|
|
4253
4307
|
x: m,
|
|
4254
4308
|
y: n + M.h * .73,
|
|
@@ -4256,19 +4310,19 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4256
4310
|
fontSize: M.title,
|
|
4257
4311
|
opacity: "0.7",
|
|
4258
4312
|
fill: s,
|
|
4259
|
-
children:
|
|
4313
|
+
children: An(v[1], g + 4)
|
|
4260
4314
|
})] })
|
|
4261
4315
|
]
|
|
4262
4316
|
}, e.id);
|
|
4263
4317
|
})
|
|
4264
4318
|
]
|
|
4265
|
-
}), w && /* @__PURE__ */ d(
|
|
4319
|
+
}), w && /* @__PURE__ */ d(Fn, {
|
|
4266
4320
|
node: w,
|
|
4267
4321
|
onClose: () => T(null)
|
|
4268
4322
|
})]
|
|
4269
4323
|
});
|
|
4270
4324
|
}
|
|
4271
|
-
function
|
|
4325
|
+
function Ln({ value: e, onCommit: t, style: n, hint: r }) {
|
|
4272
4326
|
let [i, o] = l(!1), s = c(null);
|
|
4273
4327
|
return a(() => {
|
|
4274
4328
|
if (!i || !s.current) return;
|
|
@@ -4298,7 +4352,7 @@ function kn({ value: e, onCommit: t, style: n, hint: r }) {
|
|
|
4298
4352
|
children: e ?? ""
|
|
4299
4353
|
});
|
|
4300
4354
|
}
|
|
4301
|
-
var
|
|
4355
|
+
var Rn = 360, zn = "\n.wb-tedit-btn {\n cursor: pointer;\n border-radius: 4px;\n font-size: 11px;\n line-height: 16px;\n min-width: 20px;\n text-align: center;\n padding: 1px 4px;\n user-select: none;\n color: #e2e8f0;\n background: rgba(148, 163, 184, 0.16);\n}\n.wb-tedit-btn:hover { background: #4f46e5; color: #fff; }\n.wb-tedit-btn[data-hint] { position: relative; }\n.wb-tedit-btn[data-hint]:hover::after {\n content: attr(data-hint);\n position: absolute;\n bottom: calc(100% + 6px);\n left: 50%;\n transform: translateX(-50%);\n padding: 3px 6px;\n border-radius: 5px;\n background: #1e293b;\n border: 1px solid rgba(148, 163, 184, 0.35);\n color: #e2e8f0;\n font-size: 10px;\n line-height: 14px;\n white-space: nowrap;\n pointer-events: none;\n z-index: 6;\n}\n.wb-tedit-grip { position: absolute; top: 0; right: -3px; width: 6px; height: 100%; cursor: col-resize; }\n.wb-tedit-grip:hover { background: rgba(99, 102, 241, 0.55); }\n.wb-tedit-rowgrip { position: absolute; left: 0; right: 0; bottom: -3px; height: 6px; cursor: row-resize; }\n.wb-tedit-rowgrip:hover { background: rgba(99, 102, 241, 0.55); }\n.wb-tedit-cellon { outline: 2px solid rgba(99, 102, 241, 0.75); outline-offset: -2px; }\n.wb-tedit-bar {\n position: absolute;\n z-index: 5;\n display: flex;\n align-items: center;\n gap: 3px;\n padding: 4px 5px;\n border-radius: 8px;\n background: #0f172a;\n border: 1px solid rgba(148, 163, 184, 0.35);\n box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);\n white-space: nowrap;\n}\n.wb-tedit-sep { width: 1px; align-self: stretch; margin: 0 2px; background: rgba(148, 163, 184, 0.3); }\n.wb-tedit-at { font-size: 10px; color: #94a3b8; padding-right: 2px; }\n", Bn = (e, t) => e && t ? `cell-${e}-${t}` : "", Vn = (e) => {
|
|
4302
4356
|
if (!e || typeof e != "object") return e ?? "";
|
|
4303
4357
|
let t = String(e.text ?? "");
|
|
4304
4358
|
return typeof e.href == "string" && e.href ? /* @__PURE__ */ d("a", {
|
|
@@ -4309,8 +4363,8 @@ var An = 360, jn = "\n.wb-tedit-btn {\n cursor: pointer;\n border-radius: 4px;
|
|
|
4309
4363
|
children: t
|
|
4310
4364
|
}) : t;
|
|
4311
4365
|
};
|
|
4312
|
-
function
|
|
4313
|
-
let F = c(null), I = c(null), [L, R] = l(null), [z, B] = l(null),
|
|
4366
|
+
function Hn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], colKeys: o = [], heights: s = [], spans: p, linked: m, source: h, limit: g = 10, header: _ = !0, striped: v = !0, bordered: y = !1, compact: b = !1, padX: x, padY: S, paged: C, emptyText: w, stickyHeader: T, headerBg: E, headerColor: D, headerAlign: O, borderColor: k, maxHeight: A, style: j, nodeRef: M, edit: N }) {
|
|
4367
|
+
let F = c(null), I = c(null), [L, R] = l(null), [z, B] = l(null), V = (e, t) => () => R({
|
|
4314
4368
|
r: e,
|
|
4315
4369
|
c: t
|
|
4316
4370
|
});
|
|
@@ -4323,7 +4377,7 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4323
4377
|
}
|
|
4324
4378
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = {
|
|
4325
4379
|
top: r.bottom - n.top + 4,
|
|
4326
|
-
left: Math.max(0, Math.min(r.left - n.left, n.width -
|
|
4380
|
+
left: Math.max(0, Math.min(r.left - n.left, n.width - Rn))
|
|
4327
4381
|
};
|
|
4328
4382
|
(z?.top !== i.top || z?.left !== i.left) && B(i);
|
|
4329
4383
|
}), a(() => {
|
|
@@ -4333,58 +4387,58 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4333
4387
|
};
|
|
4334
4388
|
return document.addEventListener("mousedown", e, !0), () => document.removeEventListener("mousedown", e, !0);
|
|
4335
4389
|
}, [N, L]);
|
|
4336
|
-
let { tenant:
|
|
4390
|
+
let { tenant: H, apiUrl: U } = i(Y), ee = i(xe), te = ee?.[h], ne = C ? Se(ee) : 1, [re, ie] = l(null);
|
|
4337
4391
|
if (a(() => {
|
|
4338
|
-
if (!h ||
|
|
4339
|
-
let e = !0, t = Math.max(1, Number(g) || 10), n = C && !h.startsWith("api:") ? `?offset=${(
|
|
4340
|
-
return fetch(r, { headers:
|
|
4392
|
+
if (!h || te) return;
|
|
4393
|
+
let e = !0, t = Math.max(1, Number(g) || 10), n = C && !h.startsWith("api:") ? `?offset=${(ne - 1) * t}&limit=${t}` : "", r = h.startsWith("api:") ? `${U}/data/${encodeURIComponent(h.slice(4))}` : `${U}/dynamic/${encodeURIComponent(h)}${n}`;
|
|
4394
|
+
return fetch(r, { headers: H ? { "x-tenant": H } : {} }).then((e) => e.json()).then((t) => {
|
|
4341
4395
|
let n = Array.isArray(t?.payload) ? t.payload : Array.isArray(t?.payload?.data) ? t.payload.data : [];
|
|
4342
|
-
return e &&
|
|
4343
|
-
}).catch(() => e &&
|
|
4396
|
+
return e && ie(n);
|
|
4397
|
+
}).catch(() => e && ie([])), () => {
|
|
4344
4398
|
e = !1;
|
|
4345
4399
|
};
|
|
4346
4400
|
}, [
|
|
4347
4401
|
h,
|
|
4348
|
-
V,
|
|
4349
4402
|
H,
|
|
4350
|
-
|
|
4403
|
+
U,
|
|
4404
|
+
te,
|
|
4351
4405
|
C,
|
|
4352
|
-
|
|
4406
|
+
ne,
|
|
4353
4407
|
g
|
|
4354
4408
|
]), !e.length) return null;
|
|
4355
|
-
let
|
|
4409
|
+
let W = Math.max(1, Number(g) || 10), ae = h ? C ? te || h.startsWith("api:") ? (te ?? re ?? []).slice((ne - 1) * W, ne * W) : (re ?? []).slice(0, W) : (te ?? re ?? []).slice(0, W) : null, oe = ae ? ae.map((t) => e.map((e) => Ee(we(t?.data, e.field)))) : t, se = !!h && !(h && !te && re === null) && oe.length === 0, ce = b ? {
|
|
4356
4410
|
y: 6,
|
|
4357
4411
|
x: 10
|
|
4358
4412
|
} : {
|
|
4359
4413
|
y: 10,
|
|
4360
4414
|
x: 14
|
|
4361
|
-
},
|
|
4415
|
+
}, G = `${Number.isFinite(Number(S)) && S !== "" ? Number(S) : ce.y}px ${Number.isFinite(Number(x)) && x !== "" ? Number(x) : ce.x}px`, le = `1px solid ${typeof k == "string" && k ? k : "rgba(148, 163, 184, 0.35)"}`, K = y ? { border: le } : { borderBottom: le }, q = Array.isArray(n) && n.length === e.length && n.every((e) => Number.isFinite(e) && e > 0), ue = [
|
|
4362
4416
|
"left",
|
|
4363
4417
|
"center",
|
|
4364
4418
|
"right"
|
|
4365
|
-
],
|
|
4366
|
-
...
|
|
4419
|
+
], de = (t) => ue.includes(e[t]?.align) ? e[t].align : "", fe = (e) => de(e) || (ue.includes(O) ? O : "left"), J = Number.isFinite(Number(A)) && Number(A) > 0 ? Number(A) : 0, pe = P(j), me = !J && pe && pe.maxHeight !== void 0 ? pe.maxHeight : 0, he = J || me, ge = me ? {
|
|
4420
|
+
...pe,
|
|
4367
4421
|
maxHeight: void 0
|
|
4368
|
-
} :
|
|
4422
|
+
} : pe, _e = !!N && N.rows !== !1, ve = (t) => (r) => {
|
|
4369
4423
|
if (!N?.resize || t >= e.length - 1) return;
|
|
4370
4424
|
r.preventDefault(), r.stopPropagation();
|
|
4371
4425
|
let i = F.current, a = i ? i.clientWidth : 0;
|
|
4372
4426
|
if (!a) return;
|
|
4373
|
-
let o =
|
|
4427
|
+
let o = q ? [...n] : e.map(() => 100 / e.length), s = r.clientX, c = o[t] + o[t + 1], l = (e) => {
|
|
4374
4428
|
let n = (e.clientX - s) / a * 100, r = Math.min(c - 5, Math.max(5, o[t] + n)), i = [...o];
|
|
4375
4429
|
i[t] = Math.round(r * 10) / 10, i[t + 1] = Math.round((c - r) * 10) / 10, N.resize(i);
|
|
4376
4430
|
}, u = () => {
|
|
4377
4431
|
window.removeEventListener("pointermove", l), window.removeEventListener("pointerup", u);
|
|
4378
4432
|
};
|
|
4379
4433
|
window.addEventListener("pointermove", l), window.addEventListener("pointerup", u);
|
|
4380
|
-
},
|
|
4381
|
-
p &&
|
|
4382
|
-
let i = p[
|
|
4434
|
+
}, ye = /* @__PURE__ */ new Set();
|
|
4435
|
+
p && oe.forEach((t, n) => e.forEach((e, t) => {
|
|
4436
|
+
let i = p[Bn(r[n], o[t])];
|
|
4383
4437
|
if (!i) return;
|
|
4384
4438
|
let a = Math.max(1, Number(i.c) || 1), s = Math.max(1, Number(i.r) || 1);
|
|
4385
|
-
for (let e = 0; e < s; e++) for (let r = 0; r < a; r++) (e || r) &&
|
|
4439
|
+
for (let e = 0; e < s; e++) for (let r = 0; r < a; r++) (e || r) && ye.add(`${n + e},${t + r}`);
|
|
4386
4440
|
}));
|
|
4387
|
-
let
|
|
4441
|
+
let be = (e) => (t) => {
|
|
4388
4442
|
if (!N?.resizeRow) return;
|
|
4389
4443
|
t.preventDefault(), t.stopPropagation();
|
|
4390
4444
|
let n = t.currentTarget.closest("tr");
|
|
@@ -4393,7 +4447,7 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4393
4447
|
window.removeEventListener("pointermove", a), window.removeEventListener("pointerup", o);
|
|
4394
4448
|
};
|
|
4395
4449
|
window.addEventListener("pointermove", a), window.addEventListener("pointerup", o);
|
|
4396
|
-
},
|
|
4450
|
+
}, X = (e, t, n, r) => r ? null : /* @__PURE__ */ d("span", {
|
|
4397
4451
|
className: "wb-tedit-btn",
|
|
4398
4452
|
role: "button",
|
|
4399
4453
|
"data-hint": t,
|
|
@@ -4402,7 +4456,7 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4402
4456
|
},
|
|
4403
4457
|
onClick: n,
|
|
4404
4458
|
children: e
|
|
4405
|
-
}, t), Z = L && L.r <
|
|
4459
|
+
}, t), Z = L && L.r < oe.length && L.c < e.length ? L : null, Q = (e, t) => N?.labels?.[e] ?? t, Ce = Z ? p?.[Bn(r[Z.r], o[Z.c])] : null, Te = Math.max(1, Number(Ce?.c) || 1), De = Math.max(1, Number(Ce?.r) || 1);
|
|
4406
4460
|
return /* @__PURE__ */ f("div", {
|
|
4407
4461
|
ref: (e) => {
|
|
4408
4462
|
I.current = e, typeof M == "function" && M(e);
|
|
@@ -4410,10 +4464,10 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4410
4464
|
style: {
|
|
4411
4465
|
width: "100%",
|
|
4412
4466
|
...N ? { position: "relative" } : null,
|
|
4413
|
-
...
|
|
4467
|
+
...ge
|
|
4414
4468
|
},
|
|
4415
4469
|
children: [
|
|
4416
|
-
N && /* @__PURE__ */ d("style", { children:
|
|
4470
|
+
N && /* @__PURE__ */ d("style", { children: zn }),
|
|
4417
4471
|
N && Z && z && /* @__PURE__ */ f("div", {
|
|
4418
4472
|
className: "wb-tedit-bar",
|
|
4419
4473
|
style: {
|
|
@@ -4426,29 +4480,29 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4426
4480
|
className: "wb-tedit-at",
|
|
4427
4481
|
children: `R${Z.r + 1}·C${Z.c + 1}`
|
|
4428
4482
|
}),
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4483
|
+
X("+↑", Q("rowAbove", "Insert row above"), () => N.addRow(Z.r - 1)),
|
|
4484
|
+
X("+↓", Q("rowBelow", "Insert row below"), () => N.addRow(Z.r)),
|
|
4485
|
+
X("↑", Q("rowUp", "Move row up"), () => N.moveRow(Z.r, -1), Z.r === 0),
|
|
4486
|
+
X("↓", Q("rowDown", "Move row down"), () => N.moveRow(Z.r, 1), Z.r >= oe.length - 1),
|
|
4487
|
+
X("✕ row", Q("rowDelete", "Delete row"), () => N.dropRow(Z.r), oe.length <= 1),
|
|
4434
4488
|
/* @__PURE__ */ d("span", { className: "wb-tedit-sep" }),
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4489
|
+
X("+←", Q("colLeft", "Insert column left"), () => N.addColumn(Z.c - 1)),
|
|
4490
|
+
X("+→", Q("colRight", "Insert column right"), () => N.addColumn(Z.c)),
|
|
4491
|
+
X("←", Q("colMoveLeft", "Move column left"), () => N.moveColumn(Z.c, -1), Z.c === 0),
|
|
4492
|
+
X("→", Q("colMoveRight", "Move column right"), () => N.moveColumn(Z.c, 1), Z.c >= e.length - 1),
|
|
4493
|
+
X("✕ col", Q("colDelete", "Delete column"), () => N.dropColumn(Z.c), e.length <= 1),
|
|
4440
4494
|
/* @__PURE__ */ d("span", { className: "wb-tedit-sep" }),
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4495
|
+
X("↔", Q("mergeRight", "Merge with the cell on the right"), () => N.merge(Z.r, Z.c, "right"), Z.c + Te >= e.length),
|
|
4496
|
+
X("↕", Q("mergeDown", "Merge with the cell below"), () => N.merge(Z.r, Z.c, "down"), Z.r + De >= oe.length),
|
|
4497
|
+
X("⤫", Q("split", "Split this cell"), () => N.split(Z.r, Z.c), Te === 1 && De === 1)
|
|
4444
4498
|
]
|
|
4445
4499
|
}),
|
|
4446
4500
|
/* @__PURE__ */ d("div", {
|
|
4447
4501
|
style: {
|
|
4448
4502
|
width: "100%",
|
|
4449
4503
|
overflowX: "auto",
|
|
4450
|
-
...
|
|
4451
|
-
maxHeight:
|
|
4504
|
+
...he ? {
|
|
4505
|
+
maxHeight: he,
|
|
4452
4506
|
overflowY: "auto"
|
|
4453
4507
|
} : null
|
|
4454
4508
|
},
|
|
@@ -4459,17 +4513,17 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4459
4513
|
borderCollapse: T && _ !== !1 ? "separate" : "collapse",
|
|
4460
4514
|
borderSpacing: 0,
|
|
4461
4515
|
fontSize: 14,
|
|
4462
|
-
...
|
|
4463
|
-
...y ? { border:
|
|
4516
|
+
...q ? { tableLayout: "fixed" } : null,
|
|
4517
|
+
...y ? { border: le } : {}
|
|
4464
4518
|
},
|
|
4465
4519
|
children: [
|
|
4466
|
-
|
|
4520
|
+
q && /* @__PURE__ */ d("colgroup", { children: n.map((e, t) => /* @__PURE__ */ d("col", { style: { width: `${e}%` } }, t)) }),
|
|
4467
4521
|
_ === !1 ? null : /* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: e.map((t, n) => /* @__PURE__ */ d("th", {
|
|
4468
4522
|
className: N ? "wb-tedit-head" : void 0,
|
|
4469
4523
|
style: {
|
|
4470
|
-
textAlign:
|
|
4524
|
+
textAlign: fe(n),
|
|
4471
4525
|
fontWeight: 600,
|
|
4472
|
-
padding:
|
|
4526
|
+
padding: G,
|
|
4473
4527
|
...typeof D == "string" && D ? { color: D } : null,
|
|
4474
4528
|
background: typeof E == "string" && E ? E : T ? "var(--page-surface, #f2f2f2)" : "rgba(148, 163, 184, 0.12)",
|
|
4475
4529
|
...T ? {
|
|
@@ -4477,9 +4531,9 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4477
4531
|
top: 0,
|
|
4478
4532
|
zIndex: 2
|
|
4479
4533
|
} : N ? { position: "relative" } : null,
|
|
4480
|
-
...
|
|
4534
|
+
...K
|
|
4481
4535
|
},
|
|
4482
|
-
children: N ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(
|
|
4536
|
+
children: N ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(Ln, {
|
|
4483
4537
|
value: t.label ?? t,
|
|
4484
4538
|
onCommit: (e) => N.header(n, e),
|
|
4485
4539
|
hint: Q("editCell", "Double-click to edit"),
|
|
@@ -4487,43 +4541,43 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4487
4541
|
}), n < e.length - 1 && /* @__PURE__ */ d("span", {
|
|
4488
4542
|
className: "wb-tedit-grip",
|
|
4489
4543
|
title: Q("colWidth", "Drag to resize the column"),
|
|
4490
|
-
onPointerDown:
|
|
4544
|
+
onPointerDown: ve(n)
|
|
4491
4545
|
})] }) : t.label ?? t
|
|
4492
4546
|
}, n)) }) }),
|
|
4493
|
-
/* @__PURE__ */ f("tbody", { children: [
|
|
4547
|
+
/* @__PURE__ */ f("tbody", { children: [se && /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", {
|
|
4494
4548
|
colSpan: e.length,
|
|
4495
4549
|
style: {
|
|
4496
|
-
padding:
|
|
4550
|
+
padding: G,
|
|
4497
4551
|
textAlign: "center",
|
|
4498
4552
|
opacity: .6,
|
|
4499
|
-
...
|
|
4553
|
+
...K
|
|
4500
4554
|
},
|
|
4501
4555
|
children: w || "No data yet"
|
|
4502
|
-
}) }),
|
|
4556
|
+
}) }), oe.map((t, n) => /* @__PURE__ */ d("tr", {
|
|
4503
4557
|
className: N ? "wb-tedit-row" : void 0,
|
|
4504
4558
|
style: {
|
|
4505
4559
|
...v && n % 2 == 1 ? { background: "rgba(148, 163, 184, 0.07)" } : null,
|
|
4506
4560
|
...Number.isFinite(Number(s?.[n])) && s[n] > 0 ? { height: s[n] } : null
|
|
4507
4561
|
},
|
|
4508
4562
|
children: e.map((e, i) => {
|
|
4509
|
-
if (
|
|
4510
|
-
let a =
|
|
4563
|
+
if (ye.has(`${n},${i}`)) return null;
|
|
4564
|
+
let a = Bn(r[n], o[i]), s = m?.[a], c = p?.[a], l = Math.max(1, Number(c?.c) || 1), u = Math.max(1, Number(c?.r) || 1);
|
|
4511
4565
|
return /* @__PURE__ */ f("td", {
|
|
4512
4566
|
className: N ? `wb-tedit-cell${L?.r === n && L?.c === i ? " wb-tedit-cellon" : ""}` : void 0,
|
|
4513
|
-
onMouseDownCapture:
|
|
4567
|
+
onMouseDownCapture: _e ? V(n, i) : void 0,
|
|
4514
4568
|
"data-cell": N ? `${n}-${i}` : void 0,
|
|
4515
4569
|
colSpan: l > 1 ? l : void 0,
|
|
4516
4570
|
rowSpan: u > 1 ? u : void 0,
|
|
4517
4571
|
style: {
|
|
4518
|
-
padding:
|
|
4519
|
-
...
|
|
4572
|
+
padding: G,
|
|
4573
|
+
...de(i) ? { textAlign: de(i) } : null,
|
|
4520
4574
|
...N ? { position: "relative" } : null,
|
|
4521
|
-
...
|
|
4575
|
+
...K
|
|
4522
4576
|
},
|
|
4523
|
-
children: [s ??
|
|
4577
|
+
children: [s ?? Vn(t?.[i]), N && _e && /* @__PURE__ */ d("span", {
|
|
4524
4578
|
className: "wb-tedit-rowgrip",
|
|
4525
4579
|
title: Q("rowHeight", "Drag to set the row height — double-click to fit the content"),
|
|
4526
|
-
onPointerDown:
|
|
4580
|
+
onPointerDown: be(n),
|
|
4527
4581
|
onDoubleClick: () => N.resizeRow(n, 0)
|
|
4528
4582
|
})]
|
|
4529
4583
|
}, i);
|
|
@@ -4535,7 +4589,7 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4535
4589
|
]
|
|
4536
4590
|
});
|
|
4537
4591
|
}
|
|
4538
|
-
var
|
|
4592
|
+
var Un = {
|
|
4539
4593
|
small: {
|
|
4540
4594
|
cell: 62,
|
|
4541
4595
|
font: 10.5,
|
|
@@ -4560,9 +4614,9 @@ var Fn = {
|
|
|
4560
4614
|
pad: 8,
|
|
4561
4615
|
gap: 4
|
|
4562
4616
|
}
|
|
4563
|
-
},
|
|
4564
|
-
function
|
|
4565
|
-
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 ? "" :
|
|
4617
|
+
}, Wn = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, Gn = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Kn = 366;
|
|
4618
|
+
function qn(e, t = {}) {
|
|
4619
|
+
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 ? "" : Ee(e), a = (e) => {
|
|
4566
4620
|
let t = i(r(e)), n = t ? new Date(t) : null;
|
|
4567
4621
|
return n && !Number.isNaN(n.getTime()) ? n : null;
|
|
4568
4622
|
};
|
|
@@ -4578,7 +4632,7 @@ function zn(e, t = {}) {
|
|
|
4578
4632
|
} : null;
|
|
4579
4633
|
}).filter(Boolean);
|
|
4580
4634
|
}
|
|
4581
|
-
function
|
|
4635
|
+
function Jn(e) {
|
|
4582
4636
|
return (Array.isArray(e) ? e : []).map((e, t) => {
|
|
4583
4637
|
let n = e?.start ? new Date(e.start) : null;
|
|
4584
4638
|
if (!n || Number.isNaN(n.getTime())) return null;
|
|
@@ -4593,20 +4647,20 @@ function Bn(e) {
|
|
|
4593
4647
|
};
|
|
4594
4648
|
}).filter(Boolean);
|
|
4595
4649
|
}
|
|
4596
|
-
function
|
|
4650
|
+
function Yn(e) {
|
|
4597
4651
|
let t = /* @__PURE__ */ new Map();
|
|
4598
4652
|
for (let n of e) {
|
|
4599
|
-
let e =
|
|
4653
|
+
let e = Gn(n.start), r = n.end ? Gn(n.end) : e, i = Math.min(Math.max(0, Math.round((r - e) / 864e5)), Kn);
|
|
4600
4654
|
for (let r = 0; r <= i; r += 1) {
|
|
4601
|
-
let i =
|
|
4655
|
+
let i = Wn(new Date(e.getFullYear(), e.getMonth(), e.getDate() + r));
|
|
4602
4656
|
t.has(i) || t.set(i, []), t.get(i).push(n);
|
|
4603
4657
|
}
|
|
4604
4658
|
}
|
|
4605
4659
|
for (let e of t.values()) e.sort((e, t) => e.start - t.start);
|
|
4606
4660
|
return t;
|
|
4607
4661
|
}
|
|
4608
|
-
function
|
|
4609
|
-
let { tenant: T, apiUrl: E, locale: D } = i(
|
|
4662
|
+
function Xn({ events: e = [], source: t = "", titleField: n = "", startField: r = "", endField: o = "", hrefField: s = "", colorField: c = "", variant: p = "month", size: m = "medium", accent: h = "", eventBg: g = "", eventText: _ = "", borderColor: v = "", weekStart: y = "monday", max: b = 3, emptyText: x = "No events", style: S, nodeRef: C, interactive: w = !0 }) {
|
|
4663
|
+
let { tenant: T, apiUrl: E, locale: D } = i(Y), O = i(xe)?.[t], [k, A] = l(null), [j, M] = l(() => {
|
|
4610
4664
|
let e = /* @__PURE__ */ new Date();
|
|
4611
4665
|
return {
|
|
4612
4666
|
year: e.getFullYear(),
|
|
@@ -4628,13 +4682,13 @@ function Hn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4628
4682
|
E,
|
|
4629
4683
|
O
|
|
4630
4684
|
]);
|
|
4631
|
-
let N =
|
|
4685
|
+
let N = Un[m] ?? Un.medium, F = h || "var(--page-accent, #4f46e5)", I = v || "var(--page-border, rgba(148, 163, 184, 0.35))", L = g || F, R = _ || "var(--page-accent-text, #ffffff)", z = t ? qn(O ?? k ?? [], {
|
|
4632
4686
|
titleField: n,
|
|
4633
4687
|
startField: r,
|
|
4634
4688
|
endField: o,
|
|
4635
4689
|
hrefField: s,
|
|
4636
4690
|
colorField: c
|
|
4637
|
-
}) :
|
|
4691
|
+
}) : Jn(e), B = Yn(z), V = D || void 0, H = (e, t) => {
|
|
4638
4692
|
let n = /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("span", { style: {
|
|
4639
4693
|
width: 6,
|
|
4640
4694
|
height: 6,
|
|
@@ -4672,19 +4726,19 @@ function Hn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4672
4726
|
title: e.title,
|
|
4673
4727
|
children: n
|
|
4674
4728
|
}, e.key);
|
|
4675
|
-
},
|
|
4729
|
+
}, U = new Intl.DateTimeFormat(V, {
|
|
4676
4730
|
month: "long",
|
|
4677
4731
|
year: "numeric"
|
|
4678
|
-
}).format(new Date(j.year, j.month, 1)),
|
|
4732
|
+
}).format(new Date(j.year, j.month, 1)), ee = (e) => M((t) => {
|
|
4679
4733
|
let n = new Date(t.year, t.month + e, 1);
|
|
4680
4734
|
return {
|
|
4681
4735
|
year: n.getFullYear(),
|
|
4682
4736
|
month: n.getMonth()
|
|
4683
4737
|
};
|
|
4684
|
-
}),
|
|
4738
|
+
}), te = (e, t) => /* @__PURE__ */ d("button", {
|
|
4685
4739
|
type: "button",
|
|
4686
4740
|
"aria-label": e,
|
|
4687
|
-
onClick: () =>
|
|
4741
|
+
onClick: () => ee(t),
|
|
4688
4742
|
style: {
|
|
4689
4743
|
background: "transparent",
|
|
4690
4744
|
border: `1px solid ${I}`,
|
|
@@ -4696,7 +4750,7 @@ function Hn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4696
4750
|
padding: "4px 8px"
|
|
4697
4751
|
},
|
|
4698
4752
|
children: t < 0 ? "‹" : "›"
|
|
4699
|
-
}),
|
|
4753
|
+
}), ne = /* @__PURE__ */ f("div", {
|
|
4700
4754
|
style: {
|
|
4701
4755
|
display: "flex",
|
|
4702
4756
|
alignItems: "center",
|
|
@@ -4711,14 +4765,14 @@ function Hn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4711
4765
|
flexGrow: 1,
|
|
4712
4766
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
4713
4767
|
},
|
|
4714
|
-
children:
|
|
4768
|
+
children: U
|
|
4715
4769
|
}),
|
|
4716
|
-
|
|
4717
|
-
|
|
4770
|
+
te("Previous month", -1),
|
|
4771
|
+
te("Next month", 1)
|
|
4718
4772
|
]
|
|
4719
4773
|
});
|
|
4720
4774
|
if (p === "list") {
|
|
4721
|
-
let e = z.filter((e) => e.start.getFullYear() === j.year && e.start.getMonth() === j.month).sort((e, t) => e.start - t.start), t = new Intl.DateTimeFormat(
|
|
4775
|
+
let e = z.filter((e) => e.start.getFullYear() === j.year && e.start.getMonth() === j.month).sort((e, t) => e.start - t.start), t = new Intl.DateTimeFormat(V, {
|
|
4722
4776
|
day: "numeric",
|
|
4723
4777
|
month: "short",
|
|
4724
4778
|
hour: "2-digit",
|
|
@@ -4730,7 +4784,7 @@ function Hn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4730
4784
|
width: "100%",
|
|
4731
4785
|
...P(S)
|
|
4732
4786
|
},
|
|
4733
|
-
children: [
|
|
4787
|
+
children: [ne, e.length ? /* @__PURE__ */ d("div", {
|
|
4734
4788
|
style: {
|
|
4735
4789
|
display: "flex",
|
|
4736
4790
|
flexDirection: "column",
|
|
@@ -4751,7 +4805,7 @@ function Hn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4751
4805
|
minWidth: 96
|
|
4752
4806
|
},
|
|
4753
4807
|
children: t.format(e.start)
|
|
4754
|
-
}),
|
|
4808
|
+
}), H(e, {
|
|
4755
4809
|
flexGrow: 1,
|
|
4756
4810
|
minWidth: 0
|
|
4757
4811
|
})]
|
|
@@ -4766,10 +4820,10 @@ function Hn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4766
4820
|
})]
|
|
4767
4821
|
});
|
|
4768
4822
|
}
|
|
4769
|
-
let
|
|
4770
|
-
for (let e = 0; e <
|
|
4771
|
-
let t = e -
|
|
4772
|
-
|
|
4823
|
+
let re = new Date(j.year, j.month, 1), ie = y === "sunday" ? 0 : 1, W = (re.getDay() - ie + 7) % 7, ae = new Date(j.year, j.month + 1, 0).getDate(), oe = Math.ceil((W + ae) / 7), se = Wn(/* @__PURE__ */ new Date()), ce = new Intl.DateTimeFormat(V, { weekday: "short" }), G = [];
|
|
4824
|
+
for (let e = 0; e < oe * 7; e += 1) {
|
|
4825
|
+
let t = e - W + 1, n = t >= 1 && t <= ae, r = Wn(new Date(j.year, j.month, t)), i = n ? B.get(r) ?? [] : [], a = i.slice(0, Math.max(1, b)), o = n && r === se;
|
|
4826
|
+
G.push(/* @__PURE__ */ f("div", {
|
|
4773
4827
|
style: {
|
|
4774
4828
|
minHeight: N.cell,
|
|
4775
4829
|
borderTop: `1px solid ${I}`,
|
|
@@ -4794,7 +4848,7 @@ function Hn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4794
4848
|
},
|
|
4795
4849
|
children: n ? t : new Date(j.year, j.month, t).getDate()
|
|
4796
4850
|
}),
|
|
4797
|
-
a.map((e) =>
|
|
4851
|
+
a.map((e) => H(e)),
|
|
4798
4852
|
i.length > a.length && /* @__PURE__ */ d("span", {
|
|
4799
4853
|
style: {
|
|
4800
4854
|
fontSize: N.font,
|
|
@@ -4812,7 +4866,7 @@ function Hn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4812
4866
|
...P(S)
|
|
4813
4867
|
},
|
|
4814
4868
|
children: [
|
|
4815
|
-
|
|
4869
|
+
ne,
|
|
4816
4870
|
/* @__PURE__ */ f("div", {
|
|
4817
4871
|
style: {
|
|
4818
4872
|
display: "grid",
|
|
@@ -4826,31 +4880,31 @@ function Hn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4826
4880
|
textAlign: "center",
|
|
4827
4881
|
padding: `0 0 ${N.pad}px`
|
|
4828
4882
|
},
|
|
4829
|
-
children:
|
|
4830
|
-
}, `head-${t}`)),
|
|
4883
|
+
children: ce.format(new Date(2024, 0, 7 + ie + t))
|
|
4884
|
+
}, `head-${t}`)), G]
|
|
4831
4885
|
}),
|
|
4832
4886
|
/* @__PURE__ */ d("div", { style: { borderTop: `1px solid ${I}` } })
|
|
4833
4887
|
]
|
|
4834
4888
|
});
|
|
4835
4889
|
}
|
|
4836
|
-
var
|
|
4890
|
+
var Zn = {
|
|
4837
4891
|
small: 36,
|
|
4838
4892
|
medium: 56,
|
|
4839
4893
|
large: 88
|
|
4840
4894
|
};
|
|
4841
|
-
function
|
|
4842
|
-
let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], r = (e) => e == null ? "" :
|
|
4895
|
+
function Qn(e, t = {}) {
|
|
4896
|
+
let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], r = (e) => e == null ? "" : Ee(e);
|
|
4843
4897
|
return n.map((e) => {
|
|
4844
|
-
let n = e.data ?? e, i =
|
|
4898
|
+
let n = e.data ?? e, i = we(n, t.imageField), a = Array.isArray(i) ? i[0] : i, o = a && typeof a == "object" ? a.url ?? a.src ?? "" : a, s = t.nameField ? r(we(n, t.nameField)) : r(n.name);
|
|
4845
4899
|
return {
|
|
4846
4900
|
src: typeof o == "string" ? o.trim() : "",
|
|
4847
4901
|
alt: s,
|
|
4848
|
-
href: t.hrefField ? r(
|
|
4902
|
+
href: t.hrefField ? r(we(n, t.hrefField)) : ""
|
|
4849
4903
|
};
|
|
4850
4904
|
}).filter((e) => e.src);
|
|
4851
4905
|
}
|
|
4852
|
-
function
|
|
4853
|
-
let { tenant: D, apiUrl: O } = i(
|
|
4906
|
+
function $n({ logos: e = [], source: t = "", imageField: n = "", nameField: r = "", hrefField: o = "", variant: s = "step", size: p = "medium", perView: m = 5, gap: h = 48, hold: g = 3, slideMs: _ = 500, direction: v = "left", arrows: y = "show", pauseOnHover: b = !0, grayscale: x = !0, newTab: S = !0, emptyText: C = "", style: w, nodeRef: T, inert: E }) {
|
|
4907
|
+
let { tenant: D, apiUrl: O } = i(Y), k = i(xe)?.[t], [A, j] = l(null), M = c(null), N = c(null), [F, I] = l(0), [L, R] = l(0), [z, B] = l(0), [V, H] = l(!0), [U, ee] = l(!1), [te, ne] = l(!1);
|
|
4854
4908
|
a(() => {
|
|
4855
4909
|
if (!t || k) return;
|
|
4856
4910
|
let e = !0;
|
|
@@ -4867,7 +4921,7 @@ function Gn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4867
4921
|
k
|
|
4868
4922
|
]), a(() => {
|
|
4869
4923
|
if (typeof window > "u" || !window.matchMedia) return;
|
|
4870
|
-
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () =>
|
|
4924
|
+
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () => ne(e.matches);
|
|
4871
4925
|
return t(), e.addEventListener?.("change", t), () => e.removeEventListener?.("change", t);
|
|
4872
4926
|
}, []), a(() => {
|
|
4873
4927
|
let e = N.current;
|
|
@@ -4880,7 +4934,7 @@ function Gn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4880
4934
|
let e = M.current;
|
|
4881
4935
|
if (!e) return;
|
|
4882
4936
|
let t = !0, n = () => {
|
|
4883
|
-
let n = [...e.querySelectorAll("img")].filter((e) => e.complete && e.naturalHeight).map((e) => e.naturalWidth / e.naturalHeight *
|
|
4937
|
+
let n = [...e.querySelectorAll("img")].filter((e) => e.complete && e.naturalHeight).map((e) => e.naturalWidth / e.naturalHeight * W);
|
|
4884
4938
|
t && n.length && R(Math.ceil(Math.max(...n)));
|
|
4885
4939
|
};
|
|
4886
4940
|
n();
|
|
@@ -4889,12 +4943,12 @@ function Gn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4889
4943
|
t = !1, r.forEach((e) => e.removeEventListener("load", n));
|
|
4890
4944
|
};
|
|
4891
4945
|
});
|
|
4892
|
-
let
|
|
4946
|
+
let re = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], ie = t ? Qn(k ?? A ?? [], {
|
|
4893
4947
|
imageField: n,
|
|
4894
4948
|
nameField: r,
|
|
4895
4949
|
hrefField: o
|
|
4896
|
-
}) :
|
|
4897
|
-
if (!
|
|
4950
|
+
}) : re, W = Zn[p] ?? Zn.medium, ae = Number.isFinite(Number(h)) ? Math.max(0, Number(h)) : 48, oe = s === "marquee" ? "step" : s, se = Math.min(3e4, Math.max(300, (Number(g) || 3) * 1e3)), ce = Math.min(3e3, Math.max(100, Number(_) || 500)), G = Math.min(12, Math.max(1, Math.round(Number(m) || 5))), K = (L || W * 3) + ae, q = F ? Math.max(1, Math.floor(F / K)) : G, ue = Math.min(G, q), de = F ? Math.min(K, F / ue) : K;
|
|
4951
|
+
if (!ie.length) return /* @__PURE__ */ d("div", {
|
|
4898
4952
|
ref: T,
|
|
4899
4953
|
style: {
|
|
4900
4954
|
width: "100%",
|
|
@@ -4906,7 +4960,7 @@ function Gn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4906
4960
|
alignItems: "center",
|
|
4907
4961
|
justifyContent: "center",
|
|
4908
4962
|
flexWrap: "wrap",
|
|
4909
|
-
gap:
|
|
4963
|
+
gap: ae
|
|
4910
4964
|
},
|
|
4911
4965
|
children: [
|
|
4912
4966
|
0,
|
|
@@ -4916,16 +4970,16 @@ function Gn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4916
4970
|
4
|
|
4917
4971
|
].map((e) => /* @__PURE__ */ d("div", {
|
|
4918
4972
|
style: {
|
|
4919
|
-
height:
|
|
4920
|
-
width:
|
|
4973
|
+
height: W,
|
|
4974
|
+
width: W * 3,
|
|
4921
4975
|
border: "1px dashed var(--page-border, rgba(148, 163, 184, 0.5))",
|
|
4922
4976
|
borderRadius: 6,
|
|
4923
4977
|
display: "flex",
|
|
4924
4978
|
alignItems: "center",
|
|
4925
4979
|
justifyContent: "center",
|
|
4926
|
-
fontSize: Math.max(10, Math.round(
|
|
4980
|
+
fontSize: Math.max(10, Math.round(W / 4)),
|
|
4927
4981
|
opacity: .45,
|
|
4928
|
-
...
|
|
4982
|
+
...le
|
|
4929
4983
|
},
|
|
4930
4984
|
children: "LOGO"
|
|
4931
4985
|
}, e))
|
|
@@ -4939,21 +4993,21 @@ function Gn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4939
4993
|
children: C
|
|
4940
4994
|
}) : null
|
|
4941
4995
|
});
|
|
4942
|
-
let
|
|
4996
|
+
let fe = ie.length, J = oe === "step" && fe > ue, pe = oe === "slider", me = J && !E && !U && !te, he = v === "right", ge = he ? fe : 0, _e = J ? [...ie, ...ie] : ie, ve = J ? z * de : 0, ye = (e, t, n) => {
|
|
4943
4997
|
let r = /* @__PURE__ */ d("img", {
|
|
4944
4998
|
src: e.src,
|
|
4945
4999
|
alt: e.alt ?? "",
|
|
4946
5000
|
style: {
|
|
4947
|
-
height:
|
|
5001
|
+
height: W,
|
|
4948
5002
|
width: "auto",
|
|
4949
5003
|
maxWidth: "100%",
|
|
4950
5004
|
objectFit: "contain",
|
|
4951
5005
|
display: "block"
|
|
4952
5006
|
}
|
|
4953
|
-
}), i =
|
|
4954
|
-
width:
|
|
5007
|
+
}), i = J ? {
|
|
5008
|
+
width: de,
|
|
4955
5009
|
flex: "0 0 auto",
|
|
4956
|
-
padding: `0 ${
|
|
5010
|
+
padding: `0 ${ae / 2}px`,
|
|
4957
5011
|
justifyContent: "center"
|
|
4958
5012
|
} : {};
|
|
4959
5013
|
return e.href && !E ? /* @__PURE__ */ d("a", {
|
|
@@ -4976,30 +5030,30 @@ function Gn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4976
5030
|
...n ? { "aria-hidden": "true" } : {},
|
|
4977
5031
|
children: r
|
|
4978
5032
|
}, `${n ? "c" : "o"}-${t}`);
|
|
4979
|
-
},
|
|
5033
|
+
}, be = /* @__PURE__ */ d("div", {
|
|
4980
5034
|
ref: M,
|
|
4981
5035
|
className: "wb-logos-track",
|
|
4982
5036
|
style: {
|
|
4983
5037
|
display: "flex",
|
|
4984
5038
|
alignItems: "center",
|
|
4985
|
-
...
|
|
4986
|
-
width:
|
|
4987
|
-
transform: `translateX(-${
|
|
4988
|
-
transition:
|
|
4989
|
-
} :
|
|
4990
|
-
gap:
|
|
5039
|
+
...J ? {
|
|
5040
|
+
width: _e.length * de,
|
|
5041
|
+
transform: `translateX(-${ve}px)`,
|
|
5042
|
+
transition: V ? `transform ${ce}ms ease` : "none"
|
|
5043
|
+
} : pe ? {
|
|
5044
|
+
gap: ae,
|
|
4991
5045
|
overflowX: "auto",
|
|
4992
5046
|
scrollBehavior: "smooth",
|
|
4993
5047
|
scrollSnapType: "x proximity"
|
|
4994
5048
|
} : {
|
|
4995
|
-
gap:
|
|
5049
|
+
gap: ae,
|
|
4996
5050
|
flexWrap: "wrap",
|
|
4997
5051
|
justifyContent: "center"
|
|
4998
5052
|
}
|
|
4999
5053
|
},
|
|
5000
|
-
children:
|
|
5001
|
-
}),
|
|
5002
|
-
if (
|
|
5054
|
+
children: _e.map((e, t) => ye(e, t, J && t >= fe))
|
|
5055
|
+
}), Se = (e) => {
|
|
5056
|
+
if (pe) {
|
|
5003
5057
|
let t = M.current;
|
|
5004
5058
|
t && t.scrollBy({
|
|
5005
5059
|
left: e * Math.max(120, t.clientWidth * .8),
|
|
@@ -5008,19 +5062,19 @@ function Gn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
5008
5062
|
return;
|
|
5009
5063
|
}
|
|
5010
5064
|
let t = z + e;
|
|
5011
|
-
if (t >= 0 && t <=
|
|
5012
|
-
|
|
5065
|
+
if (t >= 0 && t <= fe) {
|
|
5066
|
+
H(!0), B(t);
|
|
5013
5067
|
return;
|
|
5014
5068
|
}
|
|
5015
|
-
let n = t < 0 ?
|
|
5016
|
-
|
|
5017
|
-
|
|
5069
|
+
let n = t < 0 ? fe : 0;
|
|
5070
|
+
H(!1), B(n), requestAnimationFrame(() => requestAnimationFrame(() => {
|
|
5071
|
+
H(!0), B(n + e);
|
|
5018
5072
|
}));
|
|
5019
|
-
},
|
|
5073
|
+
}, X = y === !1 || y === "off" ? "off" : y === "hover" ? "hover" : "show", Z = X !== "off" && (pe ? F > 0 : J), Q = (e) => /* @__PURE__ */ d("button", {
|
|
5020
5074
|
type: "button",
|
|
5021
5075
|
"aria-label": e < 0 ? "Previous logos" : "Next logos",
|
|
5022
|
-
onClick: () =>
|
|
5023
|
-
className: `wb-logos-arrow${
|
|
5076
|
+
onClick: () => Se(e),
|
|
5077
|
+
className: `wb-logos-arrow${X === "hover" ? " wb-logos-arrow-shy" : ""}`,
|
|
5024
5078
|
style: { [e < 0 ? "left" : "right"]: 0 },
|
|
5025
5079
|
children: e < 0 ? "‹" : "›"
|
|
5026
5080
|
});
|
|
@@ -5035,8 +5089,8 @@ function Gn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
5035
5089
|
overflow: "hidden",
|
|
5036
5090
|
...P(w)
|
|
5037
5091
|
},
|
|
5038
|
-
onMouseEnter: b === !1 ? void 0 : () =>
|
|
5039
|
-
onMouseLeave: b === !1 ? void 0 : () =>
|
|
5092
|
+
onMouseEnter: b === !1 ? void 0 : () => ee(!0),
|
|
5093
|
+
onMouseLeave: b === !1 ? void 0 : () => ee(!1),
|
|
5040
5094
|
children: [
|
|
5041
5095
|
/* @__PURE__ */ d("style", { children: `
|
|
5042
5096
|
.wb-logos .wb-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; box-sizing: border-box; }
|
|
@@ -5058,41 +5112,41 @@ function Gn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
5058
5112
|
border: 1px solid var(--page-border, rgba(148, 163, 184, 0.5));
|
|
5059
5113
|
}
|
|
5060
5114
|
` }),
|
|
5061
|
-
|
|
5115
|
+
J ? /* @__PURE__ */ f("div", {
|
|
5062
5116
|
style: {
|
|
5063
5117
|
position: "relative",
|
|
5064
|
-
width:
|
|
5118
|
+
width: ue * de,
|
|
5065
5119
|
maxWidth: "100%",
|
|
5066
5120
|
margin: "0 auto"
|
|
5067
5121
|
},
|
|
5068
5122
|
children: [
|
|
5069
|
-
|
|
5123
|
+
Z ? Q(-1) : null,
|
|
5070
5124
|
/* @__PURE__ */ d("div", {
|
|
5071
5125
|
style: { overflow: "hidden" },
|
|
5072
|
-
children:
|
|
5126
|
+
children: be
|
|
5073
5127
|
}),
|
|
5074
|
-
|
|
5128
|
+
Z ? Q(1) : null
|
|
5075
5129
|
]
|
|
5076
5130
|
}) : /* @__PURE__ */ f(u, { children: [
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5131
|
+
Z ? Q(-1) : null,
|
|
5132
|
+
be,
|
|
5133
|
+
Z ? Q(1) : null
|
|
5080
5134
|
] }),
|
|
5081
|
-
/* @__PURE__ */ d(
|
|
5082
|
-
running:
|
|
5083
|
-
every:
|
|
5084
|
-
slide:
|
|
5085
|
-
step:
|
|
5135
|
+
/* @__PURE__ */ d(er, {
|
|
5136
|
+
running: me,
|
|
5137
|
+
every: se + ce,
|
|
5138
|
+
slide: ce,
|
|
5139
|
+
step: he ? -1 : 1,
|
|
5086
5140
|
index: z,
|
|
5087
|
-
total:
|
|
5088
|
-
home:
|
|
5141
|
+
total: fe,
|
|
5142
|
+
home: ge,
|
|
5089
5143
|
setIndex: B,
|
|
5090
|
-
setAnimate:
|
|
5144
|
+
setAnimate: H
|
|
5091
5145
|
})
|
|
5092
5146
|
]
|
|
5093
5147
|
});
|
|
5094
5148
|
}
|
|
5095
|
-
function
|
|
5149
|
+
function er({ running: e, every: t, slide: n, step: r, index: i, total: o, home: s, setIndex: c, setAnimate: l }) {
|
|
5096
5150
|
a(() => {
|
|
5097
5151
|
if (!e) return;
|
|
5098
5152
|
let n = setInterval(() => {
|
|
@@ -5128,13 +5182,13 @@ function Kn({ running: e, every: t, slide: n, step: r, index: i, total: o, home:
|
|
|
5128
5182
|
l
|
|
5129
5183
|
]), null;
|
|
5130
5184
|
}
|
|
5131
|
-
var
|
|
5185
|
+
var tr = {
|
|
5132
5186
|
small: 380,
|
|
5133
5187
|
medium: 560,
|
|
5134
5188
|
large: 820,
|
|
5135
5189
|
full: "100%"
|
|
5136
5190
|
};
|
|
5137
|
-
function
|
|
5191
|
+
function nr({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open", openOn: r = "trigger", delay: i = 0, size: o = "medium", title: s = "", showClose: u = !0, backdropClose: p = !0, position: m = "center", actions: h = [], showCloseAction: g = !1, closeLabel: _ = "Close", actionsAlign: v = "right", linked: y, style: b, nodeRef: x, inert: S = !1 }) {
|
|
5138
5192
|
let [C, w] = l(!1), T = c(null);
|
|
5139
5193
|
a(() => {
|
|
5140
5194
|
if (S || !e) return;
|
|
@@ -5159,7 +5213,7 @@ function Jn({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open",
|
|
|
5159
5213
|
document.removeEventListener("keydown", e), document.body.style.overflow = t;
|
|
5160
5214
|
};
|
|
5161
5215
|
}, [S, C]);
|
|
5162
|
-
let E =
|
|
5216
|
+
let E = tr[o] ?? tr.medium, D = (e) => {
|
|
5163
5217
|
let t = {
|
|
5164
5218
|
padding: "9px 16px",
|
|
5165
5219
|
borderRadius: 6,
|
|
@@ -5328,97 +5382,98 @@ function Jn({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open",
|
|
|
5328
5382
|
})]
|
|
5329
5383
|
});
|
|
5330
5384
|
}
|
|
5331
|
-
var
|
|
5332
|
-
PageRoot:
|
|
5333
|
-
CalendarBlock:
|
|
5334
|
-
LogoCarousel:
|
|
5335
|
-
DialogBlock:
|
|
5336
|
-
Section:
|
|
5337
|
-
Container:
|
|
5338
|
-
Heading:
|
|
5339
|
-
TextBlock:
|
|
5340
|
-
ButtonBlock:
|
|
5341
|
-
ImageBlock:
|
|
5342
|
-
Spacer:
|
|
5343
|
-
Divider:
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5385
|
+
var rr = {
|
|
5386
|
+
PageRoot: Le,
|
|
5387
|
+
CalendarBlock: Xn,
|
|
5388
|
+
LogoCarousel: $n,
|
|
5389
|
+
DialogBlock: nr,
|
|
5390
|
+
Section: Re,
|
|
5391
|
+
Container: ze,
|
|
5392
|
+
Heading: Be,
|
|
5393
|
+
TextBlock: et,
|
|
5394
|
+
ButtonBlock: rt,
|
|
5395
|
+
ImageBlock: it,
|
|
5396
|
+
Spacer: ut,
|
|
5397
|
+
Divider: dt,
|
|
5398
|
+
BoxBlock: ft,
|
|
5399
|
+
SliderBlock: vt,
|
|
5400
|
+
CanvasSlider: yt,
|
|
5401
|
+
TabsBlock: Ft,
|
|
5402
|
+
QuickStack: cn,
|
|
5403
|
+
CollectionList: ln,
|
|
5404
|
+
CollectionSearch: un,
|
|
5405
|
+
BreadcrumbsBlock: dn,
|
|
5406
|
+
PaginationBlock: fn,
|
|
5407
|
+
StepperBlock: wn,
|
|
5408
|
+
SocialLinksBlock: Cn,
|
|
5409
|
+
ThemeModeBlock: _n,
|
|
5410
|
+
ScrollTopBlock: xn,
|
|
5411
|
+
OrgChartBlock: In,
|
|
5412
|
+
TableBlock: Hn,
|
|
5413
|
+
IconBlock: Ot,
|
|
5414
|
+
MapBlock: Et,
|
|
5415
|
+
MasonryBlock: At,
|
|
5416
|
+
AccordionBlock: It,
|
|
5417
|
+
NavbarBlock: Pt,
|
|
5418
|
+
ListBlock: $e,
|
|
5419
|
+
TextSpan: We,
|
|
5420
|
+
QuoteBlock: Qe,
|
|
5421
|
+
TextLink: nt,
|
|
5422
|
+
RichTextBlock: Xe,
|
|
5423
|
+
RichContentBlock: Xe,
|
|
5424
|
+
VideoBlock: at,
|
|
5425
|
+
YouTubeBlock: st,
|
|
5426
|
+
IframeBlock: ct,
|
|
5427
|
+
EmbedBlock: lt,
|
|
5428
|
+
FormBlock: Yt,
|
|
5429
|
+
FormLabel: en,
|
|
5430
|
+
FormInput: tn,
|
|
5431
|
+
FormTextarea: nn,
|
|
5432
|
+
FormCheckbox: (e) => /* @__PURE__ */ d(rn, {
|
|
5378
5433
|
kind: "checkbox",
|
|
5379
5434
|
...e
|
|
5380
5435
|
}),
|
|
5381
|
-
FormRadio: (e) => /* @__PURE__ */ d(
|
|
5436
|
+
FormRadio: (e) => /* @__PURE__ */ d(rn, {
|
|
5382
5437
|
kind: "radio",
|
|
5383
5438
|
...e
|
|
5384
5439
|
}),
|
|
5385
|
-
FormSelect:
|
|
5386
|
-
FormFile:
|
|
5387
|
-
FormRecaptcha:
|
|
5388
|
-
FormSubmit:
|
|
5389
|
-
},
|
|
5440
|
+
FormSelect: an,
|
|
5441
|
+
FormFile: on,
|
|
5442
|
+
FormRecaptcha: $t,
|
|
5443
|
+
FormSubmit: sn
|
|
5444
|
+
}, ir = {
|
|
5390
5445
|
id: "auth",
|
|
5391
5446
|
label: "Accounts",
|
|
5392
5447
|
category: "Apps",
|
|
5393
5448
|
keys: ["SiteLoginForm", "SiteAccountMenu"],
|
|
5394
5449
|
ssr: "shell",
|
|
5395
5450
|
settings: ["site.authRedirect"]
|
|
5396
|
-
},
|
|
5451
|
+
}, ar = n({
|
|
5397
5452
|
user: null,
|
|
5398
5453
|
status: "idle",
|
|
5399
5454
|
ensure: () => {},
|
|
5400
5455
|
refresh: () => {},
|
|
5401
5456
|
signOut: () => {}
|
|
5402
5457
|
});
|
|
5403
|
-
function
|
|
5458
|
+
function or(e, t) {
|
|
5404
5459
|
return t ? /^https?:\/\//i.test(t) ? t : `${e.replace(/\/+$/, "")}${t.startsWith("/") ? t : `/${t}`}` : "";
|
|
5405
5460
|
}
|
|
5406
|
-
function
|
|
5461
|
+
function sr(e) {
|
|
5407
5462
|
let t = e && typeof e == "object" ? e["site.session"] : null, n = t && typeof t == "object" && !Array.isArray(t) ? t : {}, r = (e) => typeof e == "string" ? e.trim() : "", i = r(n.url), a = r(n.mePath), o = r(n.logoutPath);
|
|
5408
5463
|
return {
|
|
5409
5464
|
mode: n.mode === "custom" || n.mode === "off" ? n.mode : "system",
|
|
5410
5465
|
url: i,
|
|
5411
5466
|
mePath: a,
|
|
5412
5467
|
logoutPath: o,
|
|
5413
|
-
meUrl:
|
|
5414
|
-
logoutUrl:
|
|
5468
|
+
meUrl: or(i, a),
|
|
5469
|
+
logoutUrl: or(i, o),
|
|
5415
5470
|
loginPage: r(n.loginPage),
|
|
5416
5471
|
userPath: r(n.userPath),
|
|
5417
5472
|
auth: n.auth === "bearer" ? "bearer" : "cookies",
|
|
5418
5473
|
tokenKey: r(n.tokenKey) || "webim_session_token"
|
|
5419
5474
|
};
|
|
5420
5475
|
}
|
|
5421
|
-
function
|
|
5476
|
+
function cr(e, t) {
|
|
5422
5477
|
if (!t) return e ?? null;
|
|
5423
5478
|
let n = e;
|
|
5424
5479
|
for (let e of t.split(".")) {
|
|
@@ -5427,26 +5482,26 @@ function er(e, t) {
|
|
|
5427
5482
|
}
|
|
5428
5483
|
return n ?? null;
|
|
5429
5484
|
}
|
|
5430
|
-
function
|
|
5485
|
+
function lr(e) {
|
|
5431
5486
|
try {
|
|
5432
5487
|
return window.localStorage.getItem(e) || "";
|
|
5433
5488
|
} catch {
|
|
5434
5489
|
return "";
|
|
5435
5490
|
}
|
|
5436
5491
|
}
|
|
5437
|
-
function
|
|
5492
|
+
function ur(e) {
|
|
5438
5493
|
try {
|
|
5439
5494
|
window.localStorage.removeItem(e);
|
|
5440
5495
|
} catch {}
|
|
5441
5496
|
}
|
|
5442
|
-
var
|
|
5443
|
-
let e = i(
|
|
5497
|
+
var dr = () => {
|
|
5498
|
+
let e = i(ar);
|
|
5444
5499
|
return a(() => {
|
|
5445
5500
|
e.ensure();
|
|
5446
5501
|
}, [e]), e;
|
|
5447
5502
|
};
|
|
5448
|
-
function
|
|
5449
|
-
let f = i(
|
|
5503
|
+
function fr({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u }) {
|
|
5504
|
+
let f = i(Y), p = o || f?.apiUrl || "/api", m = u || f?.tenant || "", h = s(() => sr(f?.settings), [f?.settings]), [g, _] = l(t ?? null), [v, y] = l(t ? "user" : n ? "guest" : "idle"), b = c(!1), x = r((e, t) => fetch(`${p}${e}`, {
|
|
5450
5505
|
...t,
|
|
5451
5506
|
credentials: "include",
|
|
5452
5507
|
headers: {
|
|
@@ -5458,9 +5513,9 @@ function ir({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
|
|
|
5458
5513
|
if (n) return Promise.resolve(null);
|
|
5459
5514
|
if (h.mode === "off") return Promise.resolve(S(null));
|
|
5460
5515
|
if (h.mode === "custom") {
|
|
5461
|
-
let e = h.auth === "bearer" ?
|
|
5516
|
+
let e = h.auth === "bearer" ? lr(h.tokenKey) : "";
|
|
5462
5517
|
return !h.meUrl || h.auth === "bearer" && !e ? Promise.resolve(S(null)) : fetch(h.meUrl, { ...h.auth === "bearer" ? { headers: { authorization: `Bearer ${e}` } } : { credentials: "include" } }).then((e) => e.ok ? e.json() : null).then((e) => {
|
|
5463
|
-
let t =
|
|
5518
|
+
let t = cr(e, h.userPath);
|
|
5464
5519
|
return S(t && typeof t == "object" ? t : null);
|
|
5465
5520
|
}).catch(() => S(null));
|
|
5466
5521
|
}
|
|
@@ -5473,12 +5528,12 @@ function ir({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
|
|
|
5473
5528
|
]), w = r(() => {
|
|
5474
5529
|
if (h.mode === "off") return S(null), Promise.resolve();
|
|
5475
5530
|
if (h.mode === "custom") {
|
|
5476
|
-
let e = h.auth === "bearer" ?
|
|
5531
|
+
let e = h.auth === "bearer" ? lr(h.tokenKey) : "";
|
|
5477
5532
|
return (h.logoutUrl ? fetch(h.logoutUrl, {
|
|
5478
5533
|
method: "post",
|
|
5479
5534
|
...h.auth === "bearer" ? { headers: e ? { authorization: `Bearer ${e}` } : {} } : { credentials: "include" }
|
|
5480
5535
|
}).catch(() => {}) : Promise.resolve()).then(() => {
|
|
5481
|
-
h.auth === "bearer" &&
|
|
5536
|
+
h.auth === "bearer" && ur(h.tokenKey), S(null);
|
|
5482
5537
|
});
|
|
5483
5538
|
}
|
|
5484
5539
|
return x("/site/logout", { method: "post" }).catch(() => {}).then(() => {
|
|
@@ -5528,19 +5583,19 @@ function ir({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
|
|
|
5528
5583
|
h.loginPage,
|
|
5529
5584
|
C,
|
|
5530
5585
|
w
|
|
5531
|
-
]), /* @__PURE__ */ d(
|
|
5586
|
+
]), /* @__PURE__ */ d(ar.Provider, {
|
|
5532
5587
|
value: E,
|
|
5533
5588
|
children: e
|
|
5534
5589
|
});
|
|
5535
5590
|
}
|
|
5536
|
-
function
|
|
5537
|
-
let { status: n } =
|
|
5591
|
+
function pr({ when: e, children: t }) {
|
|
5592
|
+
let { status: n } = dr();
|
|
5538
5593
|
return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
|
|
5539
5594
|
}
|
|
5540
5595
|
//#endregion
|
|
5541
5596
|
//#region ../ui/src/components/builder/apps/auth/views.jsx
|
|
5542
|
-
function
|
|
5543
|
-
let { tenant: h, apiUrl: g, settings: _ } = i(
|
|
5597
|
+
function mr({ 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 }) {
|
|
5598
|
+
let { tenant: h, apiUrl: g, settings: _ } = i(Y), [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 : "", D = async (e) => {
|
|
5544
5599
|
if (e.preventDefault(), u) return;
|
|
5545
5600
|
let n = new FormData(e.currentTarget);
|
|
5546
5601
|
C(!0), x("");
|
|
@@ -5588,20 +5643,20 @@ function or({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
5588
5643
|
children: [
|
|
5589
5644
|
w ? /* @__PURE__ */ f("label", {
|
|
5590
5645
|
style: {
|
|
5591
|
-
...
|
|
5646
|
+
...Rt,
|
|
5592
5647
|
display: "grid",
|
|
5593
5648
|
gap: 6
|
|
5594
5649
|
},
|
|
5595
5650
|
children: [a, /* @__PURE__ */ d("input", {
|
|
5596
5651
|
name: "name",
|
|
5597
5652
|
type: "text",
|
|
5598
|
-
style:
|
|
5599
|
-
...
|
|
5653
|
+
style: zt,
|
|
5654
|
+
...Vt(u)
|
|
5600
5655
|
})]
|
|
5601
5656
|
}) : null,
|
|
5602
5657
|
/* @__PURE__ */ f("label", {
|
|
5603
5658
|
style: {
|
|
5604
|
-
...
|
|
5659
|
+
...Rt,
|
|
5605
5660
|
display: "grid",
|
|
5606
5661
|
gap: 6
|
|
5607
5662
|
},
|
|
@@ -5609,13 +5664,13 @@ function or({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
5609
5664
|
name: "email",
|
|
5610
5665
|
type: "email",
|
|
5611
5666
|
required: !u,
|
|
5612
|
-
style:
|
|
5613
|
-
...
|
|
5667
|
+
style: zt,
|
|
5668
|
+
...Vt(u)
|
|
5614
5669
|
})]
|
|
5615
5670
|
}),
|
|
5616
5671
|
/* @__PURE__ */ f("label", {
|
|
5617
5672
|
style: {
|
|
5618
|
-
...
|
|
5673
|
+
...Rt,
|
|
5619
5674
|
display: "grid",
|
|
5620
5675
|
gap: 6
|
|
5621
5676
|
},
|
|
@@ -5623,15 +5678,15 @@ function or({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
5623
5678
|
name: "password",
|
|
5624
5679
|
type: "password",
|
|
5625
5680
|
required: !u,
|
|
5626
|
-
style:
|
|
5627
|
-
...
|
|
5681
|
+
style: zt,
|
|
5682
|
+
...Vt(u)
|
|
5628
5683
|
})]
|
|
5629
5684
|
}),
|
|
5630
5685
|
/* @__PURE__ */ d("button", {
|
|
5631
5686
|
type: u ? "button" : "submit",
|
|
5632
5687
|
disabled: S || void 0,
|
|
5633
5688
|
style: {
|
|
5634
|
-
...
|
|
5689
|
+
...Me,
|
|
5635
5690
|
border: 0,
|
|
5636
5691
|
padding: "10px 22px",
|
|
5637
5692
|
borderRadius: 8,
|
|
@@ -5663,8 +5718,8 @@ function or({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
5663
5718
|
]
|
|
5664
5719
|
});
|
|
5665
5720
|
}
|
|
5666
|
-
function
|
|
5667
|
-
let { user: c, status: l, signOut: u } =
|
|
5721
|
+
function hr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
|
|
5722
|
+
let { user: c, status: l, signOut: u } = dr(), p = a ? s || "user" : l, m = a ? {
|
|
5668
5723
|
name: "Ada Lovelace",
|
|
5669
5724
|
email: "ada@example.com"
|
|
5670
5725
|
} : c;
|
|
@@ -5685,7 +5740,7 @@ function sr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
5685
5740
|
children: [
|
|
5686
5741
|
/* @__PURE__ */ f("span", {
|
|
5687
5742
|
style: {
|
|
5688
|
-
...
|
|
5743
|
+
...Rt,
|
|
5689
5744
|
fontWeight: 600
|
|
5690
5745
|
},
|
|
5691
5746
|
children: [
|
|
@@ -5696,7 +5751,7 @@ function sr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
5696
5751
|
}),
|
|
5697
5752
|
n && m?.email ? /* @__PURE__ */ d("span", {
|
|
5698
5753
|
style: {
|
|
5699
|
-
...
|
|
5754
|
+
...Rt,
|
|
5700
5755
|
opacity: .7
|
|
5701
5756
|
},
|
|
5702
5757
|
children: m.email
|
|
@@ -5705,14 +5760,14 @@ function sr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
5705
5760
|
type: "button",
|
|
5706
5761
|
onClick: a ? void 0 : u,
|
|
5707
5762
|
style: {
|
|
5708
|
-
...
|
|
5763
|
+
...Me,
|
|
5709
5764
|
border: 0,
|
|
5710
5765
|
padding: "8px 16px",
|
|
5711
5766
|
borderRadius: 8,
|
|
5712
5767
|
fontSize: 14,
|
|
5713
5768
|
cursor: a ? "default" : "pointer"
|
|
5714
5769
|
},
|
|
5715
|
-
...
|
|
5770
|
+
...Vt(a),
|
|
5716
5771
|
children: t
|
|
5717
5772
|
})
|
|
5718
5773
|
]
|
|
@@ -5729,40 +5784,40 @@ function sr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
5729
5784
|
}
|
|
5730
5785
|
//#endregion
|
|
5731
5786
|
//#region ../ui/src/components/builder/apps/consent/manifest.js
|
|
5732
|
-
var
|
|
5787
|
+
var gr = {
|
|
5733
5788
|
id: "consent",
|
|
5734
5789
|
label: "Cookie consent",
|
|
5735
5790
|
category: "Apps",
|
|
5736
5791
|
keys: ["CookieConsent"],
|
|
5737
5792
|
ssr: "shell",
|
|
5738
5793
|
settings: []
|
|
5739
|
-
},
|
|
5740
|
-
function
|
|
5794
|
+
}, _r = "webim.cookie_consent";
|
|
5795
|
+
function vr() {
|
|
5741
5796
|
try {
|
|
5742
|
-
let e = window.localStorage.getItem(
|
|
5797
|
+
let e = window.localStorage.getItem(_r), t = e ? JSON.parse(e) : null;
|
|
5743
5798
|
return t?.choice === "accepted" || t?.choice === "declined" ? t.choice : "";
|
|
5744
5799
|
} catch {
|
|
5745
5800
|
return "";
|
|
5746
5801
|
}
|
|
5747
5802
|
}
|
|
5748
|
-
function
|
|
5803
|
+
function yr(e) {
|
|
5749
5804
|
try {
|
|
5750
5805
|
document.querySelectorAll(".webim-page").forEach((t) => t.setAttribute("data-webim-consent", e));
|
|
5751
5806
|
} catch {}
|
|
5752
5807
|
}
|
|
5753
|
-
function
|
|
5808
|
+
function br(e) {
|
|
5754
5809
|
try {
|
|
5755
|
-
window.localStorage.setItem(
|
|
5810
|
+
window.localStorage.setItem(_r, JSON.stringify({
|
|
5756
5811
|
choice: e,
|
|
5757
5812
|
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
5758
5813
|
}));
|
|
5759
5814
|
} catch {}
|
|
5760
|
-
|
|
5815
|
+
yr(e);
|
|
5761
5816
|
try {
|
|
5762
5817
|
window.dispatchEvent(new CustomEvent("webim:consent", { detail: { choice: e } }));
|
|
5763
5818
|
} catch {}
|
|
5764
5819
|
}
|
|
5765
|
-
var
|
|
5820
|
+
var xr = {
|
|
5766
5821
|
bottom: {
|
|
5767
5822
|
left: 0,
|
|
5768
5823
|
right: 0,
|
|
@@ -5784,18 +5839,18 @@ var pr = {
|
|
|
5784
5839
|
maxWidth: 400
|
|
5785
5840
|
}
|
|
5786
5841
|
};
|
|
5787
|
-
function
|
|
5842
|
+
function Sr({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: i, linkHref: o, position: s, linked: c, style: p, nodeRef: m, inert: h }) {
|
|
5788
5843
|
let [g, _] = l(!!h), [v, y] = l(null), b = (e) => {
|
|
5789
5844
|
y(e), typeof m == "function" && m(e);
|
|
5790
5845
|
};
|
|
5791
5846
|
if (a(() => {
|
|
5792
5847
|
if (h) return;
|
|
5793
|
-
let e =
|
|
5794
|
-
e ?
|
|
5848
|
+
let e = vr();
|
|
5849
|
+
e ? yr(e) : _(!0);
|
|
5795
5850
|
}, [h, v]), !g) return null;
|
|
5796
5851
|
let x = (e) => () => {
|
|
5797
|
-
h || (
|
|
5798
|
-
}, S =
|
|
5852
|
+
h || (br(e), _(!1));
|
|
5853
|
+
}, S = xr[s] ?? xr.bottom, C = {
|
|
5799
5854
|
appearance: "none",
|
|
5800
5855
|
font: "inherit",
|
|
5801
5856
|
fontSize: 14,
|
|
@@ -5875,37 +5930,37 @@ function mr({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLab
|
|
|
5875
5930
|
}
|
|
5876
5931
|
//#endregion
|
|
5877
5932
|
//#region ../ui/src/components/builder/apps/language/manifest.js
|
|
5878
|
-
var
|
|
5933
|
+
var Cr = {
|
|
5879
5934
|
id: "language",
|
|
5880
5935
|
label: "Language",
|
|
5881
5936
|
category: "Apps",
|
|
5882
5937
|
keys: ["SiteLanguagePicker"],
|
|
5883
5938
|
ssr: "prefetch",
|
|
5884
5939
|
settings: ["locales"]
|
|
5885
|
-
},
|
|
5940
|
+
}, wr = {
|
|
5886
5941
|
id: "search",
|
|
5887
5942
|
label: "Search",
|
|
5888
5943
|
category: "Apps",
|
|
5889
5944
|
keys: ["SiteSearch"],
|
|
5890
5945
|
ssr: "prefetch",
|
|
5891
5946
|
settings: []
|
|
5892
|
-
},
|
|
5893
|
-
function
|
|
5947
|
+
}, Tr = 50, Er = 2e3;
|
|
5948
|
+
function Dr() {
|
|
5894
5949
|
return typeof window > "u" ? "" : new URLSearchParams(window.location.search).get("q") ?? "";
|
|
5895
5950
|
}
|
|
5896
|
-
function
|
|
5951
|
+
function Or(e, t) {
|
|
5897
5952
|
let n = e?.data ?? {}, r = [];
|
|
5898
5953
|
for (let e of Object.values(n)) {
|
|
5899
|
-
let t = e == null ? "" :
|
|
5900
|
-
if (t && r.push(t), r.join(" ").length >
|
|
5954
|
+
let t = e == null ? "" : Ee(e);
|
|
5955
|
+
if (t && r.push(t), r.join(" ").length > Er) break;
|
|
5901
5956
|
}
|
|
5902
|
-
return r.join(" ").slice(0,
|
|
5957
|
+
return r.join(" ").slice(0, Er).toLocaleLowerCase(t || void 0);
|
|
5903
5958
|
}
|
|
5904
|
-
function
|
|
5905
|
-
let { tenant: b, apiUrl: x, locale: S } = i(
|
|
5959
|
+
function kr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButton: n = !0, live: r = !1, layout: o = "inline", includePages: s = !0, collections: u = [], limit: p = 10, emptyText: m = "Nothing found", hint: h = "", style: g, nodeRef: _, inert: v = !1, sample: y = !1 }) {
|
|
5960
|
+
let { tenant: b, apiUrl: x, locale: S } = i(Y), [C, w] = l(() => Dr()), [T, E] = l(() => Dr()), [D, O] = l(null), [k, A] = l(!1), j = c(null), M = o === "popup";
|
|
5906
5961
|
a(() => {
|
|
5907
5962
|
let e = () => {
|
|
5908
|
-
let e =
|
|
5963
|
+
let e = Dr();
|
|
5909
5964
|
w(e), E(e);
|
|
5910
5965
|
};
|
|
5911
5966
|
return window.addEventListener("popstate", e), window.addEventListener("webim:urlchange", e), () => {
|
|
@@ -5956,8 +6011,8 @@ function xr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
5956
6011
|
});
|
|
5957
6012
|
}
|
|
5958
6013
|
else for (let t of e.rows) {
|
|
5959
|
-
if (!
|
|
5960
|
-
let n = t?.data ?? {}, r =
|
|
6014
|
+
if (!Or(t, S).includes(N)) continue;
|
|
6015
|
+
let n = t?.data ?? {}, r = Ee(n.name) || "Untitled", i = Ee(n.slug);
|
|
5961
6016
|
F.push({
|
|
5962
6017
|
key: `entry:${t.id}`,
|
|
5963
6018
|
title: r,
|
|
@@ -5965,7 +6020,7 @@ function xr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
5965
6020
|
kind: "entry"
|
|
5966
6021
|
});
|
|
5967
6022
|
}
|
|
5968
|
-
let I = F.slice(0, Math.min(Math.max(1, p),
|
|
6023
|
+
let I = F.slice(0, Math.min(Math.max(1, p), Tr)), L = (e) => {
|
|
5969
6024
|
if (v) {
|
|
5970
6025
|
e.preventDefault(), w(T), A(!0);
|
|
5971
6026
|
return;
|
|
@@ -5986,7 +6041,7 @@ function xr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
5986
6041
|
title: "Spring collection",
|
|
5987
6042
|
url: "/blog/spring",
|
|
5988
6043
|
kind: "entry"
|
|
5989
|
-
}] : null, z = R ?? I, B = !R && N && D && !I.length,
|
|
6044
|
+
}] : null, z = R ?? I, B = !R && N && D && !I.length, V = !M || k && (z.length > 0 || B), H = z.length > 0 && /* @__PURE__ */ d("ul", {
|
|
5990
6045
|
style: {
|
|
5991
6046
|
listStyle: "none",
|
|
5992
6047
|
margin: 0,
|
|
@@ -6047,7 +6102,7 @@ function xr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6047
6102
|
onChange: (e) => E(e.target.value),
|
|
6048
6103
|
onFocus: () => N && A(!0),
|
|
6049
6104
|
style: {
|
|
6050
|
-
...
|
|
6105
|
+
...zt,
|
|
6051
6106
|
flexGrow: 1,
|
|
6052
6107
|
minWidth: 0
|
|
6053
6108
|
}
|
|
@@ -6074,7 +6129,7 @@ function xr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6074
6129
|
},
|
|
6075
6130
|
children: h
|
|
6076
6131
|
}),
|
|
6077
|
-
|
|
6132
|
+
V && /* @__PURE__ */ f("div", {
|
|
6078
6133
|
style: M ? {
|
|
6079
6134
|
position: "absolute",
|
|
6080
6135
|
top: "100%",
|
|
@@ -6090,7 +6145,7 @@ function xr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6090
6145
|
background: "var(--page-surface, #f2f2f2)",
|
|
6091
6146
|
boxShadow: "0 12px 32px rgba(15, 23, 42, 0.18)"
|
|
6092
6147
|
} : { marginTop: 14 },
|
|
6093
|
-
children: [
|
|
6148
|
+
children: [H, B && /* @__PURE__ */ d("div", {
|
|
6094
6149
|
style: {
|
|
6095
6150
|
fontSize: 14,
|
|
6096
6151
|
opacity: .65,
|
|
@@ -6105,21 +6160,21 @@ function xr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6105
6160
|
}
|
|
6106
6161
|
//#endregion
|
|
6107
6162
|
//#region ../ui/src/components/builder/apps/language/views.jsx
|
|
6108
|
-
function
|
|
6163
|
+
function Ar(e) {
|
|
6109
6164
|
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());
|
|
6110
6165
|
return [...new Set(n.map((e) => e.trim()))];
|
|
6111
6166
|
}
|
|
6112
|
-
var
|
|
6113
|
-
function
|
|
6167
|
+
var jr = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
|
|
6168
|
+
function Mr(e, t) {
|
|
6114
6169
|
let n = String(e ?? "").toUpperCase();
|
|
6115
6170
|
if (t === "code") return n;
|
|
6116
6171
|
let r = "";
|
|
6117
6172
|
try {
|
|
6118
|
-
r =
|
|
6173
|
+
r = jr(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
|
|
6119
6174
|
} catch {}
|
|
6120
6175
|
return !r || r.toUpperCase() === n ? n : t === "both" ? `${n} — ${r}` : r;
|
|
6121
6176
|
}
|
|
6122
|
-
function
|
|
6177
|
+
function Nr(e, t) {
|
|
6123
6178
|
let n = t ? "" : `?locale=${encodeURIComponent(e)}`;
|
|
6124
6179
|
if (typeof window > "u") return n || "?";
|
|
6125
6180
|
try {
|
|
@@ -6129,8 +6184,8 @@ function Tr(e, t) {
|
|
|
6129
6184
|
return n || "/";
|
|
6130
6185
|
}
|
|
6131
6186
|
}
|
|
6132
|
-
function
|
|
6133
|
-
let c = i(
|
|
6187
|
+
function Pr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef: o, inert: s }) {
|
|
6188
|
+
let c = i(Y), l = Ar(c?.settings), u = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : u, m = {
|
|
6134
6189
|
display: "inline-flex",
|
|
6135
6190
|
alignItems: "center",
|
|
6136
6191
|
gap: 8,
|
|
@@ -6165,7 +6220,7 @@ function Er({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6165
6220
|
style: { opacity: .4 },
|
|
6166
6221
|
children: n ?? "·"
|
|
6167
6222
|
}), /* @__PURE__ */ d("a", {
|
|
6168
|
-
href:
|
|
6223
|
+
href: Nr(e, e === u),
|
|
6169
6224
|
hrefLang: e,
|
|
6170
6225
|
"aria-current": e === p ? "true" : void 0,
|
|
6171
6226
|
onClick: s ? (e) => e.preventDefault() : void 0,
|
|
@@ -6175,7 +6230,7 @@ function Er({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6175
6230
|
textDecoration: "none",
|
|
6176
6231
|
cursor: s ? "default" : "pointer"
|
|
6177
6232
|
},
|
|
6178
|
-
children:
|
|
6233
|
+
children: Mr(e, t)
|
|
6179
6234
|
})]
|
|
6180
6235
|
}, e))]
|
|
6181
6236
|
}) : /* @__PURE__ */ f("div", {
|
|
@@ -6186,7 +6241,7 @@ function Er({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6186
6241
|
value: p,
|
|
6187
6242
|
onChange: s ? void 0 : (e) => {
|
|
6188
6243
|
let t = e.target.value;
|
|
6189
|
-
window.location.assign(
|
|
6244
|
+
window.location.assign(Nr(t, t === u));
|
|
6190
6245
|
},
|
|
6191
6246
|
onKeyDown: s ? (e) => e.preventDefault() : void 0,
|
|
6192
6247
|
style: {
|
|
@@ -6200,57 +6255,682 @@ function Er({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6200
6255
|
},
|
|
6201
6256
|
children: l.map((e) => /* @__PURE__ */ d("option", {
|
|
6202
6257
|
value: e,
|
|
6203
|
-
children:
|
|
6258
|
+
children: Mr(e, t)
|
|
6204
6259
|
}, e))
|
|
6205
6260
|
})]
|
|
6206
6261
|
});
|
|
6207
6262
|
}
|
|
6208
6263
|
//#endregion
|
|
6209
6264
|
//#region ../ui/src/components/builder/apps/index.js
|
|
6210
|
-
var
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
],
|
|
6216
|
-
SiteLoginForm:
|
|
6217
|
-
SiteAccountMenu:
|
|
6218
|
-
SiteLanguagePicker:
|
|
6219
|
-
CookieConsent:
|
|
6220
|
-
SiteSearch:
|
|
6265
|
+
var Fr = [
|
|
6266
|
+
ir,
|
|
6267
|
+
Cr,
|
|
6268
|
+
gr,
|
|
6269
|
+
wr
|
|
6270
|
+
], Ir = {
|
|
6271
|
+
SiteLoginForm: mr,
|
|
6272
|
+
SiteAccountMenu: hr,
|
|
6273
|
+
SiteLanguagePicker: Pr,
|
|
6274
|
+
CookieConsent: Sr,
|
|
6275
|
+
SiteSearch: kr
|
|
6221
6276
|
};
|
|
6222
|
-
new Set(
|
|
6277
|
+
new Set(Fr.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
|
|
6223
6278
|
//#endregion
|
|
6224
|
-
//#region ../ui/src/components/builder/
|
|
6225
|
-
var
|
|
6226
|
-
|
|
6227
|
-
|
|
6279
|
+
//#region ../ui/src/components/builder/three/runtime.js
|
|
6280
|
+
var Lr = "0.185.1", Rr = "4.3.1", zr = "https://cdn.jsdelivr.net/npm", Br = `${zr}/three@${Lr}/build/three.module.js`, Vr = `${zr}/@google/model-viewer@${Rr}/dist/model-viewer.min.js`, Hr = (e) => import(
|
|
6281
|
+
/* @vite-ignore */
|
|
6282
|
+
/* webpackIgnore: true */
|
|
6283
|
+
e
|
|
6284
|
+
), Ur = /* @__PURE__ */ new Map();
|
|
6285
|
+
function Wr(e) {
|
|
6286
|
+
if (Ur.has(e)) return Ur.get(e);
|
|
6287
|
+
if (typeof window > "u") return new Promise(() => {});
|
|
6288
|
+
let t = Hr(e).catch((t) => {
|
|
6289
|
+
throw Ur.delete(e), t;
|
|
6290
|
+
});
|
|
6291
|
+
return Ur.set(e, t), t;
|
|
6292
|
+
}
|
|
6293
|
+
var Gr = () => Wr(Br);
|
|
6294
|
+
function Kr() {
|
|
6295
|
+
return typeof window < "u" && window.customElements?.get("model-viewer") ? Promise.resolve(null) : Wr(Vr);
|
|
6296
|
+
}
|
|
6297
|
+
var qr = () => typeof window < "u" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, Jr = (e = 2) => Math.min(typeof window > "u" ? 1 : window.devicePixelRatio || 1, e);
|
|
6298
|
+
function Yr(e, t) {
|
|
6299
|
+
let n = 0, r = 0, i = 0, a = !0, o = (e) => {
|
|
6300
|
+
n = requestAnimationFrame(o), i ||= e;
|
|
6301
|
+
let a = r ? (e - r) / 1e3 : 0;
|
|
6302
|
+
r = e, t(a, (e - i) / 1e3);
|
|
6303
|
+
}, s = () => {
|
|
6304
|
+
n && cancelAnimationFrame(n), n = 0, r = 0;
|
|
6305
|
+
}, c = () => {
|
|
6306
|
+
let e = a && document.visibilityState !== "hidden";
|
|
6307
|
+
e && !n ? n = requestAnimationFrame(o) : !e && n && s();
|
|
6308
|
+
};
|
|
6309
|
+
t(0, 0);
|
|
6310
|
+
let l = typeof IntersectionObserver > "u" ? null : new IntersectionObserver((e) => {
|
|
6311
|
+
a = e.some((e) => e.isIntersecting), c();
|
|
6312
|
+
}, { rootMargin: "120px" });
|
|
6313
|
+
return l && e && l.observe(e), document.addEventListener("visibilitychange", c), c(), () => {
|
|
6314
|
+
s(), l?.disconnect(), document.removeEventListener("visibilitychange", c);
|
|
6315
|
+
};
|
|
6316
|
+
}
|
|
6317
|
+
function Xr(e, t, n = {}) {
|
|
6318
|
+
let r = {
|
|
6319
|
+
radius: n.distance ?? 4,
|
|
6320
|
+
polar: n.polar ?? Math.PI / 2.4,
|
|
6321
|
+
azimuth: n.azimuth ?? .6,
|
|
6322
|
+
target: n.target ?? {
|
|
6323
|
+
x: 0,
|
|
6324
|
+
y: 0,
|
|
6325
|
+
z: 0
|
|
6326
|
+
}
|
|
6327
|
+
}, i = { ...r }, a = n.minDistance ?? .4, o = n.maxDistance ?? 200, s = n.damping ?? .12, c = .05, l = null, u = (e) => {
|
|
6328
|
+
e.button !== void 0 && e.button !== 0 || (l = {
|
|
6329
|
+
x: e.clientX,
|
|
6330
|
+
y: e.clientY,
|
|
6331
|
+
id: e.pointerId
|
|
6332
|
+
}, t.setPointerCapture?.(e.pointerId));
|
|
6333
|
+
}, d = (e) => {
|
|
6334
|
+
if (!l || e.pointerId !== l.id) return;
|
|
6335
|
+
let t = e.clientX - l.x, n = e.clientY - l.y;
|
|
6336
|
+
l = {
|
|
6337
|
+
...l,
|
|
6338
|
+
x: e.clientX,
|
|
6339
|
+
y: e.clientY
|
|
6340
|
+
}, i.azimuth -= t * .006, i.polar = Math.max(c, Math.min(Math.PI - c, i.polar - n * .006)), e.preventDefault();
|
|
6341
|
+
}, f = (e) => {
|
|
6342
|
+
l && e.pointerId === l.id && t.releasePointerCapture?.(e.pointerId), l = null;
|
|
6343
|
+
}, p = (e) => {
|
|
6344
|
+
n.enableZoom !== !1 && (e.preventDefault(), i.radius = Math.max(a, Math.min(o, i.radius * (1 + Math.sign(e.deltaY) * .12))));
|
|
6345
|
+
};
|
|
6346
|
+
return t.addEventListener("pointerdown", u), t.addEventListener("pointermove", d), t.addEventListener("pointerup", f), t.addEventListener("pointercancel", f), t.addEventListener("wheel", p, { passive: !1 }), {
|
|
6347
|
+
update: () => {
|
|
6348
|
+
r.radius += (i.radius - r.radius) * s, r.polar += (i.polar - r.polar) * s, r.azimuth += (i.azimuth - r.azimuth) * s;
|
|
6349
|
+
let t = Math.sin(r.polar);
|
|
6350
|
+
e.position.set(r.target.x + r.radius * t * Math.sin(r.azimuth), r.target.y + r.radius * Math.cos(r.polar), r.target.z + r.radius * t * Math.cos(r.azimuth)), e.lookAt(r.target.x, r.target.y, r.target.z);
|
|
6351
|
+
},
|
|
6352
|
+
dragging: () => !!l,
|
|
6353
|
+
autoSpin: (e, t) => {
|
|
6354
|
+
!l && e && (i.azimuth += e * t);
|
|
6355
|
+
},
|
|
6356
|
+
frame: (e, t) => {
|
|
6357
|
+
i.radius = Math.max(a, Math.min(o, e)), r.radius = i.radius, t && (r.target = { ...t }, i.target = { ...t });
|
|
6358
|
+
},
|
|
6359
|
+
dispose: () => {
|
|
6360
|
+
t.removeEventListener("pointerdown", u), t.removeEventListener("pointermove", d), t.removeEventListener("pointerup", f), t.removeEventListener("pointercancel", f), t.removeEventListener("wheel", p);
|
|
6361
|
+
}
|
|
6362
|
+
};
|
|
6363
|
+
}
|
|
6364
|
+
//#endregion
|
|
6365
|
+
//#region ../ui/src/components/builder/three/views.jsx
|
|
6366
|
+
var Zr = (e, t) => Number.isFinite(Number(e)) && Number(e) > 0 ? Number(e) : t, Qr = (e, t) => (Number.isFinite(Number(e)) ? Number(e) : t) / 100, $r = (e) => (Number.isFinite(Number(e)) ? Number(e) : 0) * Math.PI / 180;
|
|
6367
|
+
function ei({ label: e, note: t, height: n, nodeRef: r, style: i }) {
|
|
6368
|
+
return /* @__PURE__ */ f("div", {
|
|
6369
|
+
ref: r,
|
|
6370
|
+
style: {
|
|
6371
|
+
...P(i),
|
|
6372
|
+
minHeight: Zr(n, 320),
|
|
6373
|
+
display: "flex",
|
|
6374
|
+
flexDirection: "column",
|
|
6375
|
+
alignItems: "center",
|
|
6376
|
+
justifyContent: "center",
|
|
6377
|
+
gap: 6,
|
|
6378
|
+
border: "1px dashed rgba(148,163,184,.55)",
|
|
6379
|
+
borderRadius: 10,
|
|
6380
|
+
background: "rgba(148,163,184,.08)",
|
|
6381
|
+
...le,
|
|
6382
|
+
color: "rgba(100,116,139,.95)",
|
|
6383
|
+
fontSize: 13,
|
|
6384
|
+
textAlign: "center",
|
|
6385
|
+
padding: 16
|
|
6386
|
+
},
|
|
6387
|
+
children: [/* @__PURE__ */ d("div", {
|
|
6388
|
+
style: { fontWeight: 600 },
|
|
6389
|
+
children: e
|
|
6390
|
+
}), t ? /* @__PURE__ */ d("div", {
|
|
6391
|
+
style: {
|
|
6392
|
+
fontSize: 11,
|
|
6393
|
+
opacity: .8,
|
|
6394
|
+
maxWidth: 320
|
|
6395
|
+
},
|
|
6396
|
+
children: t
|
|
6397
|
+
}) : null]
|
|
6398
|
+
});
|
|
6399
|
+
}
|
|
6400
|
+
function ti({ src: e, poster: t, alt: n, height: r, bg: i, autoRotate: o, rotateDelay: s, cameraControls: c, ar: u, exposure: f, shadow: p, fieldOfView: m, environment: h, style: g, nodeRef: _, inert: v }) {
|
|
6401
|
+
let [y, b] = l(typeof window < "u" && !!window.customElements?.get("model-viewer")), [x, S] = l(!1);
|
|
6402
|
+
a(() => {
|
|
6403
|
+
if (y || !e) return;
|
|
6404
|
+
let t = !0;
|
|
6405
|
+
return Kr().then(() => t && b(!0), () => t && S(!0)), () => {
|
|
6406
|
+
t = !1;
|
|
6407
|
+
};
|
|
6408
|
+
}, [y, e]);
|
|
6409
|
+
let C = {
|
|
6410
|
+
...P(g),
|
|
6411
|
+
display: "block",
|
|
6412
|
+
width: "100%",
|
|
6413
|
+
minHeight: Zr(r, 360),
|
|
6414
|
+
height: Zr(r, 360),
|
|
6415
|
+
backgroundColor: i || "transparent",
|
|
6416
|
+
borderRadius: P(g).borderRadius ?? void 0
|
|
6417
|
+
};
|
|
6418
|
+
if (!e) return v ? /* @__PURE__ */ d(ei, {
|
|
6419
|
+
nodeRef: _,
|
|
6420
|
+
style: g,
|
|
6421
|
+
height: r,
|
|
6422
|
+
label: "3D Model",
|
|
6423
|
+
note: "Pick a .glb or .gltf file in the Settings panel."
|
|
6424
|
+
}) : /* @__PURE__ */ d("div", {
|
|
6425
|
+
ref: _,
|
|
6426
|
+
style: C
|
|
6427
|
+
});
|
|
6428
|
+
if (x) return /* @__PURE__ */ d("div", {
|
|
6429
|
+
ref: _,
|
|
6430
|
+
style: {
|
|
6431
|
+
...C,
|
|
6432
|
+
display: "flex",
|
|
6433
|
+
alignItems: "center",
|
|
6434
|
+
justifyContent: "center"
|
|
6435
|
+
},
|
|
6436
|
+
children: t ? /* @__PURE__ */ d("img", {
|
|
6437
|
+
src: t,
|
|
6438
|
+
alt: n || "",
|
|
6439
|
+
style: {
|
|
6440
|
+
maxWidth: "100%",
|
|
6441
|
+
maxHeight: "100%"
|
|
6442
|
+
}
|
|
6443
|
+
}) : null
|
|
6444
|
+
});
|
|
6445
|
+
let w = (e) => e ? "" : void 0, T = o !== !1;
|
|
6446
|
+
return /* @__PURE__ */ d("model-viewer", {
|
|
6447
|
+
ref: _,
|
|
6448
|
+
src: e,
|
|
6449
|
+
alt: n || "A 3D model",
|
|
6450
|
+
poster: t || void 0,
|
|
6451
|
+
style: C,
|
|
6452
|
+
"camera-controls": w(!v && c !== !1),
|
|
6453
|
+
"auto-rotate": w(T && !qr()),
|
|
6454
|
+
"auto-rotate-delay": T ? String(Zr(s, 0)) : void 0,
|
|
6455
|
+
"rotation-per-second": "18deg",
|
|
6456
|
+
ar: w(!v && u === !0),
|
|
6457
|
+
"ar-modes": "webxr scene-viewer quick-look",
|
|
6458
|
+
"shadow-intensity": String(Qr(p, 100)),
|
|
6459
|
+
exposure: String(Qr(f, 100)),
|
|
6460
|
+
"field-of-view": m ? `${Number(m)}deg` : void 0,
|
|
6461
|
+
"environment-image": h && h !== "neutral" ? h : "neutral",
|
|
6462
|
+
"interaction-prompt": v ? "none" : void 0,
|
|
6463
|
+
loading: "lazy",
|
|
6464
|
+
"touch-action": "pan-y",
|
|
6465
|
+
children: t ? /* @__PURE__ */ d("img", {
|
|
6466
|
+
slot: "poster",
|
|
6467
|
+
src: t,
|
|
6468
|
+
alt: n || "",
|
|
6469
|
+
style: {
|
|
6470
|
+
width: "100%",
|
|
6471
|
+
height: "100%",
|
|
6472
|
+
objectFit: "contain"
|
|
6473
|
+
}
|
|
6474
|
+
}) : null
|
|
6475
|
+
});
|
|
6476
|
+
}
|
|
6477
|
+
var ni = ["attribute vec2 p;", "void main() { gl_Position = vec4(p, 0.0, 1.0); }"].join("\n"), ri = [
|
|
6478
|
+
"precision highp float;",
|
|
6479
|
+
"uniform vec2 u_res;",
|
|
6480
|
+
"uniform float u_time;",
|
|
6481
|
+
"uniform vec2 u_mouse;",
|
|
6482
|
+
"uniform vec3 u_a;",
|
|
6483
|
+
"uniform vec3 u_b;",
|
|
6484
|
+
"uniform vec3 u_c;",
|
|
6485
|
+
"uniform float u_scale;",
|
|
6486
|
+
"",
|
|
6487
|
+
"float hash(vec2 p){ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123); }",
|
|
6488
|
+
"float noise(vec2 p){",
|
|
6489
|
+
" vec2 i = floor(p); vec2 f = fract(p);",
|
|
6490
|
+
" vec2 u = f * f * (3.0 - 2.0 * f);",
|
|
6491
|
+
" return mix(mix(hash(i), hash(i + vec2(1.0, 0.0)), u.x),",
|
|
6492
|
+
" mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), u.x), u.y);",
|
|
6493
|
+
"}",
|
|
6494
|
+
"float fbm(vec2 p){",
|
|
6495
|
+
" float v = 0.0; float a = 0.5;",
|
|
6496
|
+
" for (int i = 0; i < 5; i++) { v += a * noise(p); p *= 2.02; a *= 0.5; }",
|
|
6497
|
+
" return v;",
|
|
6498
|
+
"}",
|
|
6499
|
+
""
|
|
6500
|
+
].join("\n"), ii = {
|
|
6501
|
+
gradient: [
|
|
6502
|
+
"void main(){",
|
|
6503
|
+
" vec2 uv = gl_FragCoord.xy / u_res;",
|
|
6504
|
+
" vec2 sp = (gl_FragCoord.xy - 0.5 * u_res) / min(u_res.x, u_res.y);",
|
|
6505
|
+
" float t = u_time * 0.25;",
|
|
6506
|
+
" float d1 = length(sp - vec2(sin(t) * 0.4, cos(t * 0.8) * 0.3) - u_mouse * 0.25);",
|
|
6507
|
+
" float d2 = length(sp + vec2(cos(t * 1.1) * 0.45, sin(t * 0.7) * 0.35));",
|
|
6508
|
+
" vec3 col = mix(u_a, u_b, smoothstep(0.0, 1.0, d1 * u_scale));",
|
|
6509
|
+
" col = mix(col, u_c, smoothstep(0.0, 1.2, d2 * u_scale) * 0.65);",
|
|
6510
|
+
" gl_FragColor = vec4(col, 1.0);",
|
|
6511
|
+
"}"
|
|
6512
|
+
].join("\n"),
|
|
6513
|
+
waves: [
|
|
6514
|
+
"void main(){",
|
|
6515
|
+
" vec2 uv = gl_FragCoord.xy / u_res;",
|
|
6516
|
+
" float t = u_time * 0.5;",
|
|
6517
|
+
" float y = uv.y * u_scale;",
|
|
6518
|
+
" float w = sin((uv.x * 6.0) + t) * 0.08 + sin((uv.x * 11.0) - (t * 1.3)) * 0.05;",
|
|
6519
|
+
" float band = smoothstep(0.0, 1.0, y + w + (u_mouse.y * 0.1));",
|
|
6520
|
+
" vec3 col = mix(u_a, u_b, band);",
|
|
6521
|
+
" col += u_c * (0.12 * smoothstep(0.02, 0.0, abs(y + w - 0.5)));",
|
|
6522
|
+
" gl_FragColor = vec4(col, 1.0);",
|
|
6523
|
+
"}"
|
|
6524
|
+
].join("\n"),
|
|
6525
|
+
plasma: [
|
|
6526
|
+
"void main(){",
|
|
6527
|
+
" vec2 uv = gl_FragCoord.xy / u_res;",
|
|
6528
|
+
" vec2 p = (uv - 0.5) * u_scale * 3.0 + u_mouse * 0.3;",
|
|
6529
|
+
" float t = u_time * 0.2;",
|
|
6530
|
+
" float n = fbm(p + vec2(fbm(p + t), fbm(p - t)));",
|
|
6531
|
+
" vec3 col = mix(u_a, u_b, smoothstep(0.25, 0.75, n));",
|
|
6532
|
+
" col = mix(col, u_c, smoothstep(0.6, 0.95, n));",
|
|
6533
|
+
" gl_FragColor = vec4(col, 1.0);",
|
|
6534
|
+
"}"
|
|
6535
|
+
].join("\n"),
|
|
6536
|
+
grid: [
|
|
6537
|
+
"void main(){",
|
|
6538
|
+
" vec2 uv = gl_FragCoord.xy / u_res;",
|
|
6539
|
+
" vec2 sp = (gl_FragCoord.xy - 0.5 * u_res) / min(u_res.x, u_res.y);",
|
|
6540
|
+
" float t = u_time * 0.15;",
|
|
6541
|
+
" vec2 g = sp * (8.0 * u_scale);",
|
|
6542
|
+
" g.y += t;",
|
|
6543
|
+
" vec2 f = abs(fract(g) - 0.5);",
|
|
6544
|
+
" float line = smoothstep(0.48, 0.5, max(f.x, f.y));",
|
|
6545
|
+
" float glow = 1.0 - smoothstep(0.0, 0.9, length(sp - u_mouse * 0.4));",
|
|
6546
|
+
" vec3 col = mix(u_a, u_b, line);",
|
|
6547
|
+
" col += u_c * glow * 0.35;",
|
|
6548
|
+
" gl_FragColor = vec4(col, 1.0);",
|
|
6549
|
+
"}"
|
|
6550
|
+
].join("\n")
|
|
6551
|
+
};
|
|
6552
|
+
function ai(e, t) {
|
|
6553
|
+
let n = /^#?([0-9a-f]{6})$/i.exec(String(e ?? "").trim());
|
|
6554
|
+
if (!n) return t;
|
|
6555
|
+
let r = parseInt(n[1], 16);
|
|
6556
|
+
return [
|
|
6557
|
+
(r >> 16 & 255) / 255,
|
|
6558
|
+
(r >> 8 & 255) / 255,
|
|
6559
|
+
(r & 255) / 255
|
|
6560
|
+
];
|
|
6561
|
+
}
|
|
6562
|
+
function oi(e, t, n) {
|
|
6563
|
+
let r = e.createShader(t);
|
|
6564
|
+
if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) {
|
|
6565
|
+
let t = e.getShaderInfoLog(r);
|
|
6566
|
+
throw e.deleteShader(r), Error(t || "Shader failed to compile");
|
|
6567
|
+
}
|
|
6568
|
+
return r;
|
|
6569
|
+
}
|
|
6570
|
+
function si({ preset: e, code: t, colorA: n, colorB: r, colorC: i, speed: o, scale: s, height: u, interactive: p, style: m, nodeRef: h, inert: g }) {
|
|
6571
|
+
let _ = c(null), v = c(null), [y, b] = l(""), x = typeof t == "string" && t.trim() ? t : ii[e] ?? ii.gradient, S = String(n ?? ""), C = String(r ?? ""), w = String(i ?? ""), T = Qr(o, 100), E = Math.max(.05, Qr(s, 100));
|
|
6572
|
+
return a(() => {
|
|
6573
|
+
let e = _.current, t = v.current;
|
|
6574
|
+
if (!e || !t) return;
|
|
6575
|
+
let n = e.getContext("webgl", {
|
|
6576
|
+
antialias: !0,
|
|
6577
|
+
alpha: !0,
|
|
6578
|
+
premultipliedAlpha: !1
|
|
6579
|
+
});
|
|
6580
|
+
if (!n) {
|
|
6581
|
+
b("WebGL is not available in this browser");
|
|
6582
|
+
return;
|
|
6583
|
+
}
|
|
6584
|
+
let r = null;
|
|
6585
|
+
try {
|
|
6586
|
+
let e = oi(n, n.VERTEX_SHADER, ni), t = oi(n, n.FRAGMENT_SHADER, ri + x);
|
|
6587
|
+
if (r = n.createProgram(), n.attachShader(r, e), n.attachShader(r, t), n.linkProgram(r), !n.getProgramParameter(r, n.LINK_STATUS)) throw Error(n.getProgramInfoLog(r) || "Link failed");
|
|
6588
|
+
b("");
|
|
6589
|
+
} catch (e) {
|
|
6590
|
+
b(e?.message || "Shader failed to compile");
|
|
6591
|
+
return;
|
|
6592
|
+
}
|
|
6593
|
+
n.useProgram(r);
|
|
6594
|
+
let i = n.createBuffer();
|
|
6595
|
+
n.bindBuffer(n.ARRAY_BUFFER, i), n.bufferData(n.ARRAY_BUFFER, new Float32Array([
|
|
6596
|
+
-1,
|
|
6597
|
+
-1,
|
|
6598
|
+
3,
|
|
6599
|
+
-1,
|
|
6600
|
+
-1,
|
|
6601
|
+
3
|
|
6602
|
+
]), n.STATIC_DRAW);
|
|
6603
|
+
let a = n.getAttribLocation(r, "p");
|
|
6604
|
+
n.enableVertexAttribArray(a), n.vertexAttribPointer(a, 2, n.FLOAT, !1, 0, 0);
|
|
6605
|
+
let o = (e) => n.getUniformLocation(r, e), s = {
|
|
6606
|
+
res: o("u_res"),
|
|
6607
|
+
time: o("u_time"),
|
|
6608
|
+
mouse: o("u_mouse"),
|
|
6609
|
+
a: o("u_a"),
|
|
6610
|
+
b: o("u_b"),
|
|
6611
|
+
c: o("u_c"),
|
|
6612
|
+
scale: o("u_scale")
|
|
6613
|
+
}, c = {
|
|
6614
|
+
x: 0,
|
|
6615
|
+
y: 0
|
|
6616
|
+
}, l = (t) => {
|
|
6617
|
+
let n = e.getBoundingClientRect();
|
|
6618
|
+
!n.width || !n.height || (c.x = ((t.clientX - n.left) / n.width - .5) * 2, c.y = (.5 - (t.clientY - n.top) / n.height) * 2);
|
|
6619
|
+
};
|
|
6620
|
+
p !== !1 && t.addEventListener("pointermove", l);
|
|
6621
|
+
let u = () => {
|
|
6622
|
+
let r = Jr(), i = Math.max(1, Math.round(t.clientWidth * r)), a = Math.max(1, Math.round(t.clientHeight * r));
|
|
6623
|
+
(e.width !== i || e.height !== a) && (e.width = i, e.height = a, n.viewport(0, 0, i, a));
|
|
6624
|
+
}, d = typeof ResizeObserver > "u" ? null : new ResizeObserver(u);
|
|
6625
|
+
d?.observe(t), u();
|
|
6626
|
+
let f = qr(), m = {
|
|
6627
|
+
a: ai(S, [
|
|
6628
|
+
.35,
|
|
6629
|
+
.4,
|
|
6630
|
+
.95
|
|
6631
|
+
]),
|
|
6632
|
+
b: ai(C, [
|
|
6633
|
+
.05,
|
|
6634
|
+
.06,
|
|
6635
|
+
.16
|
|
6636
|
+
]),
|
|
6637
|
+
c: ai(w, [
|
|
6638
|
+
.95,
|
|
6639
|
+
.35,
|
|
6640
|
+
.6
|
|
6641
|
+
])
|
|
6642
|
+
}, h = {};
|
|
6643
|
+
return h.stop = Yr(t, (t, r) => {
|
|
6644
|
+
u(), n.uniform2f(s.res, e.width, e.height), n.uniform1f(s.time, (f ? 0 : r) * T), n.uniform2f(s.mouse, c.x, c.y), n.uniform3fv(s.a, m.a), n.uniform3fv(s.b, m.b), n.uniform3fv(s.c, m.c), n.uniform1f(s.scale, E), n.drawArrays(n.TRIANGLES, 0, 3), f && h.stop?.();
|
|
6645
|
+
}), () => {
|
|
6646
|
+
h.stop?.(), d?.disconnect(), t.removeEventListener("pointermove", l), n.deleteProgram(r), n.deleteBuffer(i), n.getExtension("WEBGL_lose_context")?.loseContext();
|
|
6647
|
+
};
|
|
6648
|
+
}, [
|
|
6649
|
+
x,
|
|
6650
|
+
S,
|
|
6651
|
+
C,
|
|
6652
|
+
w,
|
|
6653
|
+
T,
|
|
6654
|
+
E,
|
|
6655
|
+
p
|
|
6656
|
+
]), /* @__PURE__ */ f("div", {
|
|
6657
|
+
ref: (e) => {
|
|
6658
|
+
v.current = e, typeof h == "function" && h(e);
|
|
6659
|
+
},
|
|
6660
|
+
style: {
|
|
6661
|
+
...P(m),
|
|
6662
|
+
position: P(m).position ?? "relative",
|
|
6663
|
+
minHeight: Zr(u, 320),
|
|
6664
|
+
overflow: "hidden"
|
|
6665
|
+
},
|
|
6666
|
+
children: [/* @__PURE__ */ d("canvas", {
|
|
6667
|
+
ref: _,
|
|
6668
|
+
style: {
|
|
6669
|
+
display: "block",
|
|
6670
|
+
width: "100%",
|
|
6671
|
+
height: "100%",
|
|
6672
|
+
position: "absolute",
|
|
6673
|
+
inset: 0
|
|
6674
|
+
}
|
|
6675
|
+
}), y && g ? /* @__PURE__ */ d("div", {
|
|
6676
|
+
style: {
|
|
6677
|
+
position: "absolute",
|
|
6678
|
+
inset: 0,
|
|
6679
|
+
display: "flex",
|
|
6680
|
+
alignItems: "center",
|
|
6681
|
+
justifyContent: "center",
|
|
6682
|
+
padding: 12,
|
|
6683
|
+
background: "rgba(15,23,42,.75)",
|
|
6684
|
+
...le,
|
|
6685
|
+
color: "#fecaca",
|
|
6686
|
+
fontSize: 11,
|
|
6687
|
+
whiteSpace: "pre-wrap",
|
|
6688
|
+
overflow: "auto"
|
|
6689
|
+
},
|
|
6690
|
+
children: y
|
|
6691
|
+
}) : null]
|
|
6692
|
+
});
|
|
6693
|
+
}
|
|
6694
|
+
function ci(e, t) {
|
|
6695
|
+
let n = new e.Scene(), r = new e.BoxGeometry();
|
|
6696
|
+
r.deleteAttribute("uv");
|
|
6697
|
+
let i = new e.Mesh(r, new e.MeshBasicMaterial({
|
|
6698
|
+
side: e.BackSide,
|
|
6699
|
+
color: 6710886
|
|
6700
|
+
}));
|
|
6701
|
+
i.scale.setScalar(12), n.add(i);
|
|
6702
|
+
let a = (t, i, a, o, s, c, l, u) => {
|
|
6703
|
+
let d = new e.Mesh(r, new e.MeshBasicMaterial());
|
|
6704
|
+
d.material.color.setHex(t), d.material.color.multiplyScalar(i), d.position.set(a, o, s), d.scale.set(c, l, u), n.add(d);
|
|
6705
|
+
};
|
|
6706
|
+
a(16777215, 4, 0, 6, 0, 10, .5, 10), a(16777215, 1.4, -6, 1, 2, .4, 6, 6), a(16777215, 1, 6, 1, -2, .4, 6, 6);
|
|
6707
|
+
let o = new e.PMREMGenerator(t), s = o.fromScene(n, .04);
|
|
6708
|
+
return o.dispose(), r.dispose(), n.traverse((e) => e.material?.dispose?.()), s.texture;
|
|
6709
|
+
}
|
|
6710
|
+
var li = {
|
|
6711
|
+
box: (e) => new e.BoxGeometry(1, 1, 1, 1, 1, 1),
|
|
6712
|
+
sphere: (e) => new e.SphereGeometry(.62, 48, 32),
|
|
6713
|
+
torus: (e) => new e.TorusGeometry(.5, .2, 24, 64),
|
|
6714
|
+
knot: (e) => new e.TorusKnotGeometry(.44, .15, 128, 24),
|
|
6715
|
+
cone: (e) => new e.ConeGeometry(.55, 1.1, 48),
|
|
6716
|
+
cylinder: (e) => new e.CylinderGeometry(.45, .45, 1.1, 48),
|
|
6717
|
+
plane: (e) => new e.PlaneGeometry(1.4, 1.4),
|
|
6718
|
+
capsule: (e) => new e.CapsuleGeometry(.35, .6, 8, 32)
|
|
6719
|
+
}, ui = (e, t) => Number.isFinite(Number(e)) ? Number(e) : t;
|
|
6720
|
+
function di({ objects: e, background: t, cameraDistance: n, fov: r, autoRotate: i, spinSpeed: o, controls: s, ground: u, height: f, style: p, nodeRef: m, inert: h }) {
|
|
6721
|
+
let g = c(null), [_, v] = l(!1), y = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], b = JSON.stringify(y), x = i !== !1 && !qr(), S = s !== !1 && !h;
|
|
6722
|
+
return a(() => {
|
|
6723
|
+
let e = g.current;
|
|
6724
|
+
if (!e) return;
|
|
6725
|
+
let i = !0, a = null;
|
|
6726
|
+
return Gr().then((s) => {
|
|
6727
|
+
if (!i || !e) return;
|
|
6728
|
+
let c = new s.WebGLRenderer({
|
|
6729
|
+
antialias: !0,
|
|
6730
|
+
alpha: !t
|
|
6731
|
+
});
|
|
6732
|
+
c.setPixelRatio(Jr()), c.shadowMap.enabled = u !== !1, c.shadowMap.type = s.PCFSoftShadowMap, c.outputColorSpace = s.SRGBColorSpace, c.toneMapping = s.ACESFilmicToneMapping, c.domElement.style.display = "block", c.domElement.style.width = "100%", c.domElement.style.height = "100%", e.appendChild(c.domElement);
|
|
6733
|
+
let l = new s.Scene();
|
|
6734
|
+
t && (l.background = new s.Color(t)), l.environment = ci(s, c);
|
|
6735
|
+
let d = new s.PerspectiveCamera(ui(r, 45), 1, .1, 400), f = Xr(d, c.domElement, {
|
|
6736
|
+
distance: ui(n, 5),
|
|
6737
|
+
enableZoom: S
|
|
6738
|
+
}), p = new s.DirectionalLight(16777215, 2.2);
|
|
6739
|
+
p.position.set(4, 7, 5), p.castShadow = u !== !1, p.shadow.mapSize.set(1024, 1024), p.shadow.camera.near = .5, p.shadow.camera.far = 30, l.add(p, new s.AmbientLight(16777215, .35));
|
|
6740
|
+
let m = [], h = new s.Group();
|
|
6741
|
+
for (let e of y) {
|
|
6742
|
+
let t = (li[e.shape] ?? li.box)(s), n = new s.MeshStandardMaterial({
|
|
6743
|
+
color: /^#?[0-9a-f]{6}$/i.test(String(e.color ?? "")) ? e.color : "#6366f1",
|
|
6744
|
+
metalness: Math.min(1, Math.max(0, Qr(e.metalness, 10))),
|
|
6745
|
+
roughness: Math.min(1, Math.max(0, Qr(e.roughness, 35))),
|
|
6746
|
+
transparent: Qr(e.opacity, 100) < 1,
|
|
6747
|
+
opacity: Math.min(1, Math.max(0, Qr(e.opacity, 100))),
|
|
6748
|
+
flatShading: e.flat === !0,
|
|
6749
|
+
wireframe: e.wireframe === !0,
|
|
6750
|
+
side: e.shape === "plane" ? s.DoubleSide : s.FrontSide
|
|
6751
|
+
}), r = new s.Mesh(t, n), i = ui(e.scale, 1);
|
|
6752
|
+
r.position.set(ui(e.x, 0), ui(e.y, 0), ui(e.z, 0)), r.rotation.set(ui(e.rx, 0) * Math.PI / 180, ui(e.ry, 0) * Math.PI / 180, ui(e.rz, 0) * Math.PI / 180), r.scale.setScalar(i > 0 ? i : 1), r.castShadow = !0, r.receiveShadow = !0, r.userData.spin = $r(e.spin), h.add(r), m.push(t, n);
|
|
6753
|
+
}
|
|
6754
|
+
l.add(h);
|
|
6755
|
+
let g = null;
|
|
6756
|
+
if (u !== !1) {
|
|
6757
|
+
let e = new s.ShadowMaterial({ opacity: .22 }), t = new s.PlaneGeometry(60, 60);
|
|
6758
|
+
g = new s.Mesh(t, e), g.rotation.x = -Math.PI / 2, g.position.y = ui(u === !0 ? 0 : u, -.85), g.receiveShadow = !0, l.add(g), m.push(t, e);
|
|
6759
|
+
}
|
|
6760
|
+
let _ = () => {
|
|
6761
|
+
let t = Math.max(1, e.clientWidth), n = Math.max(1, e.clientHeight);
|
|
6762
|
+
c.setSize(t, n, !1), d.aspect = t / n, d.updateProjectionMatrix();
|
|
6763
|
+
}, v = typeof ResizeObserver > "u" ? null : new ResizeObserver(_);
|
|
6764
|
+
v?.observe(e), _();
|
|
6765
|
+
let b = $r(Number.isFinite(Number(o)) ? o : 20), C = Yr(e, (e) => {
|
|
6766
|
+
f.autoSpin(x ? b : 0, e), f.update();
|
|
6767
|
+
for (let t of h.children) t.userData.spin && (t.rotation.y += t.userData.spin * e);
|
|
6768
|
+
c.render(l, d);
|
|
6769
|
+
});
|
|
6770
|
+
a = () => {
|
|
6771
|
+
C(), v?.disconnect(), f.dispose();
|
|
6772
|
+
for (let e of m) e.dispose?.();
|
|
6773
|
+
l.environment?.dispose?.(), c.dispose(), c.domElement.remove();
|
|
6774
|
+
};
|
|
6775
|
+
}, () => {
|
|
6776
|
+
i && v(!0);
|
|
6777
|
+
}), () => {
|
|
6778
|
+
i = !1, a?.();
|
|
6779
|
+
};
|
|
6780
|
+
}, [
|
|
6781
|
+
b,
|
|
6782
|
+
t,
|
|
6783
|
+
n,
|
|
6784
|
+
r,
|
|
6785
|
+
x,
|
|
6786
|
+
o,
|
|
6787
|
+
S,
|
|
6788
|
+
u
|
|
6789
|
+
]), _ && h ? /* @__PURE__ */ d(ei, {
|
|
6790
|
+
nodeRef: m,
|
|
6791
|
+
style: p,
|
|
6792
|
+
height: f,
|
|
6793
|
+
label: "3D Scene",
|
|
6794
|
+
note: "The 3D engine could not be loaded. Check the connection and try again."
|
|
6795
|
+
}) : /* @__PURE__ */ d("div", {
|
|
6796
|
+
ref: (e) => {
|
|
6797
|
+
g.current = e, typeof m == "function" && m(e);
|
|
6798
|
+
},
|
|
6799
|
+
style: {
|
|
6800
|
+
...P(p),
|
|
6801
|
+
minHeight: Zr(f, 380),
|
|
6802
|
+
height: Zr(f, 380),
|
|
6803
|
+
overflow: "hidden",
|
|
6804
|
+
touchAction: S ? "pan-y" : void 0
|
|
6805
|
+
}
|
|
6806
|
+
});
|
|
6807
|
+
}
|
|
6808
|
+
function fi({ code: e, height: t, background: n, style: r, nodeRef: i, inert: o }) {
|
|
6809
|
+
let s = c(null), [u, f] = l("");
|
|
6810
|
+
return a(() => {
|
|
6811
|
+
let t = s.current;
|
|
6812
|
+
if (o || !t || typeof e != "string" || !e.trim()) return;
|
|
6813
|
+
let r = !0, i = null;
|
|
6814
|
+
return Gr().then((a) => {
|
|
6815
|
+
if (!r || !t) return;
|
|
6816
|
+
let o = new a.WebGLRenderer({
|
|
6817
|
+
antialias: !0,
|
|
6818
|
+
alpha: !n
|
|
6819
|
+
});
|
|
6820
|
+
o.setPixelRatio(Jr()), o.outputColorSpace = a.SRGBColorSpace, o.domElement.style.display = "block", o.domElement.style.width = "100%", o.domElement.style.height = "100%", t.appendChild(o.domElement);
|
|
6821
|
+
let s = new a.Scene();
|
|
6822
|
+
n && (s.background = new a.Color(n));
|
|
6823
|
+
let c = new a.PerspectiveCamera(45, 1, .1, 1e3);
|
|
6824
|
+
c.position.set(0, 1.2, 4);
|
|
6825
|
+
let l = null;
|
|
6826
|
+
try {
|
|
6827
|
+
l = Function("ctx", `"use strict";\n${e}`)({
|
|
6828
|
+
THREE: a,
|
|
6829
|
+
scene: s,
|
|
6830
|
+
camera: c,
|
|
6831
|
+
renderer: o,
|
|
6832
|
+
canvas: o.domElement,
|
|
6833
|
+
host: t
|
|
6834
|
+
});
|
|
6835
|
+
} catch (e) {
|
|
6836
|
+
f(e?.message || String(e));
|
|
6837
|
+
}
|
|
6838
|
+
let u = () => {
|
|
6839
|
+
let e = Math.max(1, t.clientWidth), n = Math.max(1, t.clientHeight);
|
|
6840
|
+
o.setSize(e, n, !1), c.aspect = e / n, c.updateProjectionMatrix();
|
|
6841
|
+
}, d = typeof ResizeObserver > "u" ? null : new ResizeObserver(u);
|
|
6842
|
+
d?.observe(t), u();
|
|
6843
|
+
let p = !1, m = Yr(t, (e, t) => {
|
|
6844
|
+
if (!p && typeof l?.frame == "function") try {
|
|
6845
|
+
l.frame(e, t);
|
|
6846
|
+
} catch (e) {
|
|
6847
|
+
p = !0, f(e?.message || String(e));
|
|
6848
|
+
}
|
|
6849
|
+
o.render(s, c);
|
|
6850
|
+
});
|
|
6851
|
+
i = () => {
|
|
6852
|
+
m(), d?.disconnect();
|
|
6853
|
+
try {
|
|
6854
|
+
l?.dispose?.();
|
|
6855
|
+
} catch {}
|
|
6856
|
+
o.dispose(), o.domElement.remove();
|
|
6857
|
+
};
|
|
6858
|
+
}), () => {
|
|
6859
|
+
r = !1, i?.();
|
|
6860
|
+
};
|
|
6861
|
+
}, [
|
|
6862
|
+
e,
|
|
6863
|
+
o,
|
|
6864
|
+
n
|
|
6865
|
+
]), o ? /* @__PURE__ */ d(ei, {
|
|
6866
|
+
nodeRef: i,
|
|
6867
|
+
style: r,
|
|
6868
|
+
height: t,
|
|
6869
|
+
label: "three.js",
|
|
6870
|
+
note: typeof e == "string" && e.trim() ? "Custom scene code runs in Preview and on the published page." : "Open the code editor in the Settings panel to write your scene."
|
|
6871
|
+
}) : /* @__PURE__ */ d("div", {
|
|
6872
|
+
ref: (e) => {
|
|
6873
|
+
s.current = e, typeof i == "function" && i(e);
|
|
6874
|
+
},
|
|
6875
|
+
style: {
|
|
6876
|
+
...P(r),
|
|
6877
|
+
minHeight: Zr(t, 380),
|
|
6878
|
+
height: Zr(t, 380),
|
|
6879
|
+
overflow: "hidden",
|
|
6880
|
+
position: "relative",
|
|
6881
|
+
touchAction: "pan-y"
|
|
6882
|
+
},
|
|
6883
|
+
children: u ? /* @__PURE__ */ d("div", {
|
|
6884
|
+
style: {
|
|
6885
|
+
position: "absolute",
|
|
6886
|
+
left: 8,
|
|
6887
|
+
top: 8,
|
|
6888
|
+
right: 8,
|
|
6889
|
+
padding: "6px 8px",
|
|
6890
|
+
borderRadius: 6,
|
|
6891
|
+
background: "rgba(127,29,29,.85)",
|
|
6892
|
+
...le,
|
|
6893
|
+
color: "#fee2e2",
|
|
6894
|
+
fontSize: 11
|
|
6895
|
+
},
|
|
6896
|
+
children: u
|
|
6897
|
+
}) : null
|
|
6898
|
+
});
|
|
6899
|
+
}
|
|
6900
|
+
var pi = {
|
|
6901
|
+
ModelViewerBlock: ti,
|
|
6902
|
+
ShaderBlock: si,
|
|
6903
|
+
SceneBlock: di,
|
|
6904
|
+
ThreeCanvasBlock: fi
|
|
6905
|
+
}, mi = /* @__PURE__ */ new Map();
|
|
6906
|
+
function hi(e) {
|
|
6907
|
+
if (mi.has(e)) return mi.get(e);
|
|
6228
6908
|
let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
|
|
6229
6909
|
/* @vite-ignore */
|
|
6230
6910
|
/* webpackIgnore: true */
|
|
6231
6911
|
t
|
|
6232
6912
|
).finally(() => URL.revokeObjectURL(t));
|
|
6233
|
-
return
|
|
6913
|
+
return mi.set(e, n), n;
|
|
6234
6914
|
}
|
|
6235
|
-
function
|
|
6915
|
+
function gi(e) {
|
|
6236
6916
|
let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
|
|
6237
6917
|
return n && typeof n == "object" ? n : {};
|
|
6238
6918
|
}
|
|
6239
6919
|
//#endregion
|
|
6240
6920
|
//#region ../ui/src/components/builder/plugins/view.jsx
|
|
6241
|
-
async function
|
|
6242
|
-
let n = await
|
|
6921
|
+
async function _i(e, t) {
|
|
6922
|
+
let n = await hi(e);
|
|
6243
6923
|
return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
|
|
6244
6924
|
}
|
|
6245
|
-
var
|
|
6925
|
+
var vi = {
|
|
6246
6926
|
padding: "10px 12px",
|
|
6247
6927
|
border: "1px dashed rgba(148, 163, 184, 0.5)",
|
|
6248
6928
|
borderRadius: 8,
|
|
6249
6929
|
fontSize: 12,
|
|
6250
6930
|
opacity: .6
|
|
6251
6931
|
};
|
|
6252
|
-
function
|
|
6253
|
-
let s = i(
|
|
6932
|
+
function yi({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
6933
|
+
let s = i(Y), l = gi(s?.settings)[e], u = c(null), p = c(null), m = {
|
|
6254
6934
|
tenant: s?.tenant ?? "",
|
|
6255
6935
|
apiUrl: s?.apiUrl ?? "/api",
|
|
6256
6936
|
locale: s?.locale ?? "",
|
|
@@ -6262,7 +6942,7 @@ function Pr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
6262
6942
|
let e = u.current;
|
|
6263
6943
|
if (!l?.code || !e) return;
|
|
6264
6944
|
let n = !0;
|
|
6265
|
-
return
|
|
6945
|
+
return _i(l.code, t).then((e) => {
|
|
6266
6946
|
if (!(!n || !e || !u.current)) {
|
|
6267
6947
|
p.current = e;
|
|
6268
6948
|
try {
|
|
@@ -6292,7 +6972,7 @@ function Pr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
6292
6972
|
}) : /* @__PURE__ */ f("div", {
|
|
6293
6973
|
ref: o,
|
|
6294
6974
|
style: {
|
|
6295
|
-
...
|
|
6975
|
+
...vi,
|
|
6296
6976
|
...P(r)
|
|
6297
6977
|
},
|
|
6298
6978
|
children: [
|
|
@@ -6304,12 +6984,13 @@ function Pr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
6304
6984
|
}
|
|
6305
6985
|
//#endregion
|
|
6306
6986
|
//#region ../ui/src/components/builder/render.jsx
|
|
6307
|
-
var
|
|
6308
|
-
...
|
|
6309
|
-
...
|
|
6310
|
-
|
|
6987
|
+
var bi = {
|
|
6988
|
+
...rr,
|
|
6989
|
+
...Ir,
|
|
6990
|
+
...pi,
|
|
6991
|
+
PluginBlock: yi
|
|
6311
6992
|
};
|
|
6312
|
-
function
|
|
6993
|
+
function xi(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
6313
6994
|
let o = n[e];
|
|
6314
6995
|
if (!o || o.hidden) return null;
|
|
6315
6996
|
let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
|
|
@@ -6317,29 +6998,29 @@ function Ir(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
6317
6998
|
let n = o.props?.componentId, s = r?.[n];
|
|
6318
6999
|
if (!s?.template || i.has(n)) return null;
|
|
6319
7000
|
let c = new Set(i).add(n);
|
|
6320
|
-
return /* @__PURE__ */ d(t, { children:
|
|
7001
|
+
return /* @__PURE__ */ d(t, { children: xi(s.template.rootId, s.template.nodes, r, c, a) }, e);
|
|
6321
7002
|
}
|
|
6322
|
-
let l =
|
|
7003
|
+
let l = bi[s];
|
|
6323
7004
|
if (!l) return null;
|
|
6324
|
-
let u = (o.nodes ?? []).map((e) =>
|
|
7005
|
+
let u = (o.nodes ?? []).map((e) => xi(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, xi(t, n, r, i, a)])) : void 0, m = /* @__PURE__ */ d(l, {
|
|
6325
7006
|
...c,
|
|
6326
7007
|
...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
|
|
6327
7008
|
linked: p,
|
|
6328
7009
|
nodeRef: (t) => {
|
|
6329
|
-
t && (t.setAttribute("data-wb", e),
|
|
7010
|
+
t && (t.setAttribute("data-wb", e), te(t, c), ee(t, a?.events === !1 ? [] : c.events));
|
|
6330
7011
|
},
|
|
6331
7012
|
children: u.length ? u : void 0
|
|
6332
7013
|
}, e);
|
|
6333
|
-
return c.when && c.when !== "always" ? /* @__PURE__ */ d(
|
|
7014
|
+
return c.when && c.when !== "always" ? /* @__PURE__ */ d(pr, {
|
|
6334
7015
|
when: c.when,
|
|
6335
7016
|
children: m
|
|
6336
7017
|
}, e) : m;
|
|
6337
7018
|
}
|
|
6338
7019
|
//#endregion
|
|
6339
7020
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
6340
|
-
var
|
|
6341
|
-
.webim-page[data-webim-mode="dark"] { ${Object.entries(
|
|
6342
|
-
function
|
|
7021
|
+
var Si = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Ci = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(me(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
|
|
7022
|
+
.webim-page[data-webim-mode="dark"] { ${Object.entries(me(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
|
|
7023
|
+
function wi({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, custom: o, animations: c, tenant: l, apiUrl: u, datasets: p, locale: m, direction: g, settings: _, siteUser: v }) {
|
|
6343
7024
|
let y = o?.js?.trim();
|
|
6344
7025
|
if (a(() => {
|
|
6345
7026
|
if (!y) return;
|
|
@@ -6353,23 +7034,23 @@ function zr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
6353
7034
|
minHeight: "100%",
|
|
6354
7035
|
display: "flex",
|
|
6355
7036
|
flexDirection: "column"
|
|
6356
|
-
}, w =
|
|
7037
|
+
}, w = xi("ROOT", e, n), T = s(() => ({ render: (t, r) => xi(t, e, n, void 0, { mapProps: r }) }), [e, n]), E = ce(e, n), O = se(e, n), k = o?.css?.trim(), j = S(c), M = pe(t), N = [M.font, M.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !de[e]), P = [.../* @__PURE__ */ new Set([...A(e, n), ...N])].map((e) => /* @__PURE__ */ d("link", {
|
|
6357
7038
|
rel: "stylesheet",
|
|
6358
7039
|
precedence: "default",
|
|
6359
7040
|
href: D(e)
|
|
6360
|
-
}, e)), F =
|
|
6361
|
-
return r === "auto" ? /* @__PURE__ */ d(
|
|
7041
|
+
}, e)), F = Ci(M);
|
|
7042
|
+
return r === "auto" ? /* @__PURE__ */ d(Y.Provider, {
|
|
6362
7043
|
value: {
|
|
6363
7044
|
tenant: l || "",
|
|
6364
7045
|
apiUrl: u || "/api",
|
|
6365
7046
|
locale: m || "",
|
|
6366
7047
|
settings: _ ?? null
|
|
6367
7048
|
},
|
|
6368
|
-
children: /* @__PURE__ */ d(
|
|
7049
|
+
children: /* @__PURE__ */ d(fr, {
|
|
6369
7050
|
initialUser: v,
|
|
6370
|
-
children: /* @__PURE__ */ d(
|
|
7051
|
+
children: /* @__PURE__ */ d(xe.Provider, {
|
|
6371
7052
|
value: p ?? null,
|
|
6372
|
-
children: /* @__PURE__ */ d(
|
|
7053
|
+
children: /* @__PURE__ */ d(Q.Provider, {
|
|
6373
7054
|
value: T,
|
|
6374
7055
|
children: /* @__PURE__ */ f("div", {
|
|
6375
7056
|
...b,
|
|
@@ -6380,8 +7061,8 @@ function zr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
6380
7061
|
...i
|
|
6381
7062
|
},
|
|
6382
7063
|
children: [
|
|
6383
|
-
/* @__PURE__ */ d("style", { children: `.webim-page { ${
|
|
6384
|
-
@media (prefers-color-scheme: dark) { .webim-page { ${
|
|
7064
|
+
/* @__PURE__ */ d("style", { children: `.webim-page { ${Si(me(M.light))} }
|
|
7065
|
+
@media (prefers-color-scheme: dark) { .webim-page { ${Si(me(M.dark))} } }` }),
|
|
6385
7066
|
/* @__PURE__ */ d("style", { children: F }),
|
|
6386
7067
|
P,
|
|
6387
7068
|
/* @__PURE__ */ d("style", { children: x }),
|
|
@@ -6394,25 +7075,25 @@ function zr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
6394
7075
|
})
|
|
6395
7076
|
})
|
|
6396
7077
|
})
|
|
6397
|
-
}) : /* @__PURE__ */ d(
|
|
7078
|
+
}) : /* @__PURE__ */ d(Y.Provider, {
|
|
6398
7079
|
value: {
|
|
6399
7080
|
tenant: l || "",
|
|
6400
7081
|
apiUrl: u || "/api",
|
|
6401
7082
|
locale: m || "",
|
|
6402
7083
|
settings: _ ?? null
|
|
6403
7084
|
},
|
|
6404
|
-
children: /* @__PURE__ */ d(
|
|
7085
|
+
children: /* @__PURE__ */ d(fr, {
|
|
6405
7086
|
initialUser: v,
|
|
6406
|
-
children: /* @__PURE__ */ d(
|
|
7087
|
+
children: /* @__PURE__ */ d(xe.Provider, {
|
|
6407
7088
|
value: p ?? null,
|
|
6408
|
-
children: /* @__PURE__ */ d(
|
|
7089
|
+
children: /* @__PURE__ */ d(Q.Provider, {
|
|
6409
7090
|
value: T,
|
|
6410
7091
|
children: /* @__PURE__ */ f("div", {
|
|
6411
7092
|
...b,
|
|
6412
7093
|
className: "webim-page",
|
|
6413
7094
|
style: {
|
|
6414
7095
|
...C,
|
|
6415
|
-
...
|
|
7096
|
+
...ve(t, r),
|
|
6416
7097
|
...i
|
|
6417
7098
|
},
|
|
6418
7099
|
children: [
|
|
@@ -6434,8 +7115,8 @@ function zr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
6434
7115
|
}
|
|
6435
7116
|
//#endregion
|
|
6436
7117
|
//#region src/WebimContent.jsx
|
|
6437
|
-
function
|
|
6438
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ d(
|
|
7118
|
+
function Ti({ bundle: e, mode: t = "auto", style: n }) {
|
|
7119
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ d(wi, {
|
|
6439
7120
|
blocks: e.blocks,
|
|
6440
7121
|
theme: e.theme,
|
|
6441
7122
|
components: e.components,
|
|
@@ -6447,13 +7128,13 @@ function Br({ bundle: e, mode: t = "auto", style: n }) {
|
|
|
6447
7128
|
locale: e.locale,
|
|
6448
7129
|
direction: e.direction,
|
|
6449
7130
|
settings: e.settings,
|
|
6450
|
-
mode:
|
|
7131
|
+
mode: be(t, e.scheme),
|
|
6451
7132
|
style: n
|
|
6452
7133
|
}) : null;
|
|
6453
7134
|
}
|
|
6454
7135
|
//#endregion
|
|
6455
7136
|
//#region src/bundle.js
|
|
6456
|
-
function
|
|
7137
|
+
function Ei({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
6457
7138
|
let a = {
|
|
6458
7139
|
...t?.global ?? {},
|
|
6459
7140
|
...t?.tenant ?? {}
|
|
@@ -6463,7 +7144,7 @@ function Vr({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
6463
7144
|
title: e.title,
|
|
6464
7145
|
slug: e.slug,
|
|
6465
7146
|
blocks: i && o.i18n?.[i]?.blocks || e.blocks,
|
|
6466
|
-
theme:
|
|
7147
|
+
theme: ye(o, a.builder_themes?.themes),
|
|
6467
7148
|
components: a.builder_components?.components ?? {},
|
|
6468
7149
|
custom: o.custom,
|
|
6469
7150
|
animations: o.animations,
|
|
@@ -6479,18 +7160,18 @@ function Vr({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
6479
7160
|
}
|
|
6480
7161
|
//#endregion
|
|
6481
7162
|
//#region src/fetchPage.js
|
|
6482
|
-
var
|
|
7163
|
+
var Di = async (e) => {
|
|
6483
7164
|
let t = await e.json().catch(() => null);
|
|
6484
7165
|
if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
|
|
6485
7166
|
return t?.payload ?? t;
|
|
6486
7167
|
};
|
|
6487
|
-
async function
|
|
7168
|
+
async function Oi({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
|
|
6488
7169
|
if (!e) throw Error("fetchPage: apiUrl is required");
|
|
6489
7170
|
if (!n) throw Error("fetchPage: slug is required");
|
|
6490
7171
|
let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
|
|
6491
7172
|
...t ? { "x-tenant": t } : {},
|
|
6492
7173
|
...a ? { authorization: `Bearer ${a}` } : {}
|
|
6493
|
-
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(
|
|
7174
|
+
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(Di), c(`${l}/settings/public`, { headers: u }).then(Di)]), p = Ei({
|
|
6494
7175
|
page: d,
|
|
6495
7176
|
settings: f,
|
|
6496
7177
|
tenant: t,
|
|
@@ -6505,7 +7186,7 @@ async function Ur({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
6505
7186
|
"LogoCarousel"
|
|
6506
7187
|
].includes(e?.type?.resolvedName) ? e.props?.source : null).filter(Boolean))];
|
|
6507
7188
|
if (m.length) {
|
|
6508
|
-
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(
|
|
7189
|
+
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(Di).then((e) => {
|
|
6509
7190
|
let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
|
|
6510
7191
|
return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
|
|
6511
7192
|
}).catch(() => [[t, []]])));
|
|
@@ -6519,40 +7200,40 @@ async function Ur({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
6519
7200
|
}
|
|
6520
7201
|
//#endregion
|
|
6521
7202
|
//#region src/ssr.jsx
|
|
6522
|
-
var
|
|
7203
|
+
var ki = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
|
|
6523
7204
|
"&": "&",
|
|
6524
7205
|
"<": "<",
|
|
6525
7206
|
">": ">",
|
|
6526
7207
|
"\"": """
|
|
6527
7208
|
})[e]);
|
|
6528
|
-
function
|
|
6529
|
-
return e(/* @__PURE__ */ d(
|
|
7209
|
+
function Ai(t, { mode: n = "auto", style: r } = {}) {
|
|
7210
|
+
return e(/* @__PURE__ */ d(Ti, {
|
|
6530
7211
|
bundle: t,
|
|
6531
7212
|
mode: n,
|
|
6532
7213
|
style: r
|
|
6533
7214
|
}));
|
|
6534
7215
|
}
|
|
6535
|
-
function
|
|
7216
|
+
function ji(e, { mode: t = "auto", lang: n } = {}) {
|
|
6536
7217
|
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 = [
|
|
6537
7218
|
"<meta charset=\"utf-8\"/>",
|
|
6538
7219
|
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>",
|
|
6539
|
-
`<title>${
|
|
6540
|
-
r.description && `<meta name="description" content="${
|
|
6541
|
-
`<meta property="og:title" content="${
|
|
6542
|
-
r.image && `<meta property="og:image" content="${
|
|
7220
|
+
`<title>${ki(o)}</title>`,
|
|
7221
|
+
r.description && `<meta name="description" content="${ki(r.description)}"/>`,
|
|
7222
|
+
`<meta property="og:title" content="${ki(o)}"/>`,
|
|
7223
|
+
r.image && `<meta property="og:image" content="${ki(r.image)}"/>`,
|
|
6543
7224
|
r.noindex && "<meta name=\"robots\" content=\"noindex\"/>",
|
|
6544
7225
|
"<style>html,body{margin:0;height:100%}</style>"
|
|
6545
7226
|
].filter(Boolean).join("\n");
|
|
6546
7227
|
return `<!doctype html>
|
|
6547
|
-
<html lang="${
|
|
7228
|
+
<html lang="${ki(i)}"${a ? ` dir="${a}"` : ""}>
|
|
6548
7229
|
<head>
|
|
6549
7230
|
${c}
|
|
6550
7231
|
</head>
|
|
6551
7232
|
<body>
|
|
6552
|
-
${
|
|
7233
|
+
${Ai(e, { mode: t })}
|
|
6553
7234
|
${s ? `<script>${s.replaceAll("<\/script", "<\\/script")}<\/script>` : ""}
|
|
6554
7235
|
</body>
|
|
6555
7236
|
</html>`;
|
|
6556
7237
|
}
|
|
6557
7238
|
//#endregion
|
|
6558
|
-
export {
|
|
7239
|
+
export { Ei as assembleBundle, Oi as fetchPage, Ai as renderBundleHtml, ji as renderPageDocument };
|