webim-adapter 0.28.0 → 0.29.0

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