@chaibuilder/pages 0.16.15 → 0.16.17

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.
Files changed (82) hide show
  1. package/dist/{2AITGKQY-2rt9M99C.js → 2AITGKQY-BS9f-jSI.js} +2 -2
  2. package/dist/{2AITGKQY-Cs6RBSPQ.cjs → 2AITGKQY-DhZ3CIAd.cjs} +1 -1
  3. package/dist/{NCMVHL6D-vUfYKc6i.js → NCMVHL6D-Bhn1i9Td.js} +2 -2
  4. package/dist/{NCMVHL6D-CsC6nsSQ.cjs → NCMVHL6D-tLp-yfh7.cjs} +1 -1
  5. package/dist/{ZDWCUMSJ-CzEWKlEU.js → ZDWCUMSJ-Cyfoak0s.js} +1 -1
  6. package/dist/{ZDWCUMSJ-B2OZjsr6.cjs → ZDWCUMSJ-DnUbZaON.cjs} +1 -1
  7. package/dist/{active-in-another-tab-B0N5S-Bh.js → active-in-another-tab-CE6mPlAF.js} +1 -1
  8. package/dist/{active-in-another-tab-BK3cZf-x.cjs → active-in-another-tab-DPmHAOnz.cjs} +1 -1
  9. package/dist/{add-new-language-page-Dt1j-8Zg.cjs → add-new-language-page-C_cqrchc.cjs} +1 -1
  10. package/dist/{add-new-language-page-YlqcCdlK.js → add-new-language-page-CfjQxseQ.js} +2 -2
  11. package/dist/{add-new-page-DqhQUQBz.cjs → add-new-page-Cz73obNf.cjs} +1 -1
  12. package/dist/{add-new-page-aYomeid4.js → add-new-page-DrqKQSBZ.js} +1 -1
  13. package/dist/{ai-panel-content-MOZmNIKP.cjs → ai-panel-content-CwzT_8_2.cjs} +1 -1
  14. package/dist/{ai-panel-content-C6cH9rrC.js → ai-panel-content-D0WeLOfT.js} +2 -2
  15. package/dist/{ai-panel-default-lang-BZHkFsox.js → ai-panel-default-lang-BFo0lvIA.js} +3 -3
  16. package/dist/{ai-panel-default-lang-DOk_Q0IO.cjs → ai-panel-default-lang-BWE3xU7D.cjs} +2 -2
  17. package/dist/{ai-panel-other-lang-D2A46FTg.js → ai-panel-other-lang-DMk1Fjnx.js} +3 -3
  18. package/dist/{ai-panel-other-lang-qHrdvAMa.cjs → ai-panel-other-lang-mtv23TJX.cjs} +1 -1
  19. package/dist/{ai-prompt-input-C6gDvvLQ.js → ai-prompt-input-BsZtecyO.js} +2 -2
  20. package/dist/{ai-prompt-input-BZSjjNJd.cjs → ai-prompt-input-DuEk6ni6.cjs} +1 -1
  21. package/dist/{ai-translation-prompt-DTR0wbGt.js → ai-translation-prompt-5zkH9z1O.js} +1 -1
  22. package/dist/{ai-translation-prompt-BqXo2CLp.cjs → ai-translation-prompt-XxU4clD3.cjs} +1 -1
  23. package/dist/{continue-editing-in-this-client-D2S1yCOM.js → continue-editing-in-this-client-BAJLU5V9.js} +1 -1
  24. package/dist/{continue-editing-in-this-client-C3T6Jzhi.cjs → continue-editing-in-this-client-DAPO-FaB.cjs} +1 -1
  25. package/dist/{delete-page-x0DWKzsR.cjs → delete-page-CstA2FGa.cjs} +1 -1
  26. package/dist/{delete-page-BF1k60U2.js → delete-page-Dz7E_Gln.js} +1 -1
  27. package/dist/{digital-asset-manager-C8udwDBW.js → digital-asset-manager-D52Jj1Gh.js} +1 -1
  28. package/dist/{digital-asset-manager-BmlFt2T_.cjs → digital-asset-manager-Id4p005p.cjs} +1 -1
  29. package/dist/{duplicate-page-Dt_QZkTk.cjs → duplicate-page-DwW4tzGq.cjs} +1 -1
  30. package/dist/{duplicate-page-u_6vUVo1.js → duplicate-page-LxJbVeQX.js} +2 -2
  31. package/dist/{dynamic-page-selector-DxBHmglP.js → dynamic-page-selector-6BmMIsBj.js} +1 -1
  32. package/dist/{dynamic-page-selector-Cgs_Y_Kl.cjs → dynamic-page-selector-CIBjgfhU.cjs} +1 -1
  33. package/dist/index-GczdtTmR.cjs +5 -0
  34. package/dist/{index-DI2Rwk5v.js → index-zBK_xIhc.js} +144 -145
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.js +1 -1
  37. package/dist/{json-diff-viewer-QdUwk7yF.js → json-diff-viewer-C5tv7nua.js} +1 -1
  38. package/dist/{json-diff-viewer-D2g0Yab2.cjs → json-diff-viewer-DugqhV-o.cjs} +1 -1
  39. package/dist/{lang-panel-B8OD0GiA.js → lang-panel-Cq1HkfIL.js} +2 -2
  40. package/dist/{lang-panel-M2Zb01lF.cjs → lang-panel-rpel3ady.cjs} +1 -1
  41. package/dist/{mark-as-template-CJ1mlxYT.js → mark-as-template-DHcvdwtH.js} +1 -1
  42. package/dist/{mark-as-template-DONU52b1.cjs → mark-as-template-DIItdNWI.cjs} +1 -1
  43. package/dist/{no-language-page-content-DD9Ok2Ku.cjs → no-language-page-content-BFRBPe6H.cjs} +1 -1
  44. package/dist/{no-language-page-content-Dtm37LTJ.js → no-language-page-content-DA6iLaZm.js} +1 -1
  45. package/dist/{no-language-page-dialog-D3dvenZ7.cjs → no-language-page-dialog-Bp0hhhWQ.cjs} +1 -1
  46. package/dist/{no-language-page-dialog-Dj_z2_hF.js → no-language-page-dialog-CgeVcFEJ.js} +2 -2
  47. package/dist/{page-creator-DIMFISo4.js → page-creator-B1-9ivVp.js} +2 -2
  48. package/dist/{page-creator-DTC66ujU.cjs → page-creator-DPr6rEPU.cjs} +1 -1
  49. package/dist/{page-lock-DUlNr3os.js → page-lock-Kt_How1V.js} +2 -2
  50. package/dist/{page-lock-CI6BYvF_.cjs → page-lock-bteeVlGf.cjs} +1 -1
  51. package/dist/{page-locked-dialog-DorIbva0.cjs → page-locked-dialog-CcmOfDpE.cjs} +1 -1
  52. package/dist/{page-locked-dialog-BKwULMV7.js → page-locked-dialog-DHskFACu.js} +1 -1
  53. package/dist/{page-manager-new-lNVrLOJp.cjs → page-manager-new-B8wYCKP9.cjs} +1 -1
  54. package/dist/{page-manager-new-znvqI9_L.js → page-manager-new-DlyDlsLT.js} +2 -2
  55. package/dist/{page-manager-search-and-filter-C-_w7N27.js → page-manager-search-and-filter-CJH8kViJ.js} +1 -1
  56. package/dist/{page-manager-search-and-filter-pe0q0qnZ.cjs → page-manager-search-and-filter-DXIX1wnh.cjs} +1 -1
  57. package/dist/{page-revisions-content-Caaj5TEI.cjs → page-revisions-content-BEKm2IRj.cjs} +1 -1
  58. package/dist/{page-revisions-content-CyLjyxNU.js → page-revisions-content-Do3_ATby.js} +2 -2
  59. package/dist/{publish-pages-content-Bih1W9C4.js → publish-pages-content-CfIH4-uW.js} +2 -2
  60. package/dist/{publish-pages-content-D5beVcQI.cjs → publish-pages-content-tmYxmeSk.cjs} +1 -1
  61. package/dist/{save-to-lib-BwpkJcT2.js → save-to-lib-DVUkBZb8.js} +1 -1
  62. package/dist/{save-to-lib-DPAERsi4.cjs → save-to-lib-H2XwOH8O.cjs} +1 -1
  63. package/dist/{selected-block-display-GXSf3y2s.js → selected-block-display-BlnYcH8f.js} +1 -1
  64. package/dist/{selected-block-display-s99Y91qI.cjs → selected-block-display-bCgnhTf4.cjs} +1 -1
  65. package/dist/{seo-panel-BurZA566.js → seo-panel-DO9e9dzR.js} +1 -1
  66. package/dist/{seo-panel-BxUfalVy.cjs → seo-panel-uLBliADi.cjs} +1 -1
  67. package/dist/{shared-json-ld-BYAdrPeC.cjs → shared-json-ld-BwEzPasW.cjs} +1 -1
  68. package/dist/{shared-json-ld-DHWdJvQd.js → shared-json-ld-DFwVZaJ7.js} +1 -1
  69. package/dist/{slug-input-CR2B1kDJ.cjs → slug-input-B2GUrPyZ.cjs} +1 -1
  70. package/dist/{slug-input-Z_ny7bgX.js → slug-input-CiuBvodc.js} +1 -1
  71. package/dist/{take-over-request-DF2JsIes.js → take-over-request-D9aGP8wJ.js} +1 -1
  72. package/dist/{take-over-request-CnEpToCM.cjs → take-over-request-Dm4emE8Q.cjs} +1 -1
  73. package/dist/{theme-panel-footer-C2CjHoBu.cjs → theme-panel-footer--fgczfnN.cjs} +1 -1
  74. package/dist/{theme-panel-footer-5mxFeEua.js → theme-panel-footer-DMV_nX6m.js} +1 -1
  75. package/dist/{unmark-as-template-JRRUYTOY.js → unmark-as-template-CBksW8B6.js} +1 -1
  76. package/dist/{unmark-as-template-Dn90g1eh.cjs → unmark-as-template-D6lWcLbq.cjs} +1 -1
  77. package/dist/{unpublish-page-C3C_rTRd.cjs → unpublish-page-B8_HpJ5N.cjs} +1 -1
  78. package/dist/{unpublish-page-FZ8rbi7u.js → unpublish-page-my8VTao9.js} +1 -1
  79. package/dist/{web-preview-CGBKG162.js → web-preview-32tyIOuK.js} +1 -1
  80. package/dist/{web-preview-NdxC92Fk.cjs → web-preview-DQpJA364.cjs} +1 -1
  81. package/package.json +1 -1
  82. package/dist/index-BeWL6Sj6.cjs +0 -5
@@ -2,11 +2,11 @@ var Vn = (e) => {
2
2
  throw TypeError(e);
3
3
  };
4
4
  var Hn = (e, t, n) => t.has(e) || Vn("Cannot " + n);
5
- var A = (e, t, n) => (Hn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), O = (e, t, n) => t.has(e) ? Vn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), G = (e, t, n, s) => (Hn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
5
+ var T = (e, t, n) => (Hn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), O = (e, t, n) => t.has(e) ? Vn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), G = (e, t, n, s) => (Hn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
6
6
  import { jsxs as m, Fragment as me, jsx as c } from "react/jsx-runtime";
7
7
  import { get as H, reverse as Or, sortBy as Dr, find as ae, noop as ms, groupBy as xr, values as Es, first as ps, minBy as ys, keyBy as Rr, map as Kt, isEmpty as Te, compact as As, each as kr, upperCase as qn, filter as Ts, includes as Ur, has as Yt, pick as In, keys as Mr, pickBy as Br, endsWith as Fr, isArray as Kr, startCase as Vr, isFunction as Hr, cloneDeep as qr, isEqual as $r } from "lodash-es";
8
8
  import * as Q from "react";
9
- import Qr, { useMemo as q, useCallback as z, useState as K, useEffect as se, useRef as Ie, lazy as V, Suspense as X, createContext as zr, Component as jr, createElement as $n } from "react";
9
+ import Qr, { useMemo as q, useCallback as z, useState as F, useEffect as ne, useRef as Ie, lazy as V, Suspense as X, createContext as zr, Component as jr, createElement as $n } from "react";
10
10
  import { atom as pe, useAtom as ie } from "jotai";
11
11
  import { useQuery as oe, useMutation as Y, useQueryClient as J, onlineManager as Ss, QueryClient as Wr, QueryClientProvider as Yr } from "@tanstack/react-query";
12
12
  import { useLanguages as _e, useSavePage as ke, useTranslation as Pe, mergeClasses as Vt, usePermissions as _s, PERMISSIONS as Jr, useRightPanel as Zr, useChaiFeatureFlag as Xr, useIsPageLoaded as ea, registerChaiLibrary as ta, getBlocksFromHTML as na, registerChaiSidebarPanel as Gt, registerChaiFeatureFlag as rn, registerChaiTopBar as sa, registerChaiMediaManager as ra, registerChaiSaveToLibrary as aa, ChaiBuilderEditor as ia } from "@chaibuilder/sdk";
@@ -330,10 +330,10 @@ const Vc = () => {
330
330
  );
331
331
  };
332
332
  function we() {
333
- const [e, t] = K(
333
+ const [e, t] = F(
334
334
  new URLSearchParams(window.location.search)
335
335
  );
336
- return se(() => {
336
+ return ne(() => {
337
337
  const n = () => {
338
338
  t(new URLSearchParams(window.location.search));
339
339
  };
@@ -366,8 +366,8 @@ const Me = (e) => {
366
366
  return (e == null ? void 0 : e.slug) || "";
367
367
  };
368
368
  function oi(e, t) {
369
- const [n, s] = K(e);
370
- return se(() => {
369
+ const [n, s] = F(e);
370
+ return ne(() => {
371
371
  const r = setTimeout(() => s(e), t);
372
372
  return () => clearTimeout(r);
373
373
  }, [e, t]), n;
@@ -385,10 +385,10 @@ const li = ({ query: e, uuid: t }) => {
385
385
  }), u = q(() => n === "" ? l.filter((f) => f.lang === "" || f.lang === s) : l.filter((f) => f.lang === n), [n, s, l]);
386
386
  return { allLangPages: l, data: u, isFetching: d };
387
387
  }, ci = () => {
388
- const { selectedLang: e, fallbackLang: t } = _e(), [n, s] = Gs(), [r, a] = K(""), i = oi(r, 500), { allLangPages: o, data: l, isFetching: d } = li({ query: i }), u = z((h) => s(h), [s]), f = z((h) => a(h), [a]), g = z(() => {
388
+ const { selectedLang: e, fallbackLang: t } = _e(), [n, s] = Gs(), [r, a] = F(""), i = oi(r, 500), { allLangPages: o, data: l, isFetching: d } = li({ query: i }), u = z((h) => s(h), [s]), f = z((h) => a(h), [a]), g = z(() => {
389
389
  if (!n) return;
390
- const h = !(n != null && n.primaryPage), p = e.length === 0, T = h ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, D = o.filter(
391
- (y) => (y == null ? void 0 : y.primaryPage) === T || y.id === T
390
+ const h = !(n != null && n.primaryPage), p = e.length === 0, A = h ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, D = o.filter(
391
+ (y) => (y == null ? void 0 : y.primaryPage) === A || y.id === A
392
392
  ).find((y) => p ? y.lang === e || y.lang === t : y.lang === e);
393
393
  s(D || n);
394
394
  }, [n, e, o, s, t]);
@@ -448,7 +448,7 @@ const Dn = pe(null), xn = () => {
448
448
  ACTIVE_IN_ANOTHER_TAB: "ACTIVE_IN_ANOTHER_TAB",
449
449
  FORCE_TAKE_OVER: "FORCE_TAKE_OVER",
450
450
  CONNECTION_LOST: "CONNECTION_LOST"
451
- }, ne = {
451
+ }, se = {
452
452
  FORCE_TAKE_OVER: "FORCE_TAKE_OVER",
453
453
  TAKE_OVER_REQUEST: "TAKE_OVER_REQUEST",
454
454
  TAKE_OVER_APPROVED: "TAKE_OVER_APPROVED",
@@ -457,13 +457,13 @@ const Dn = pe(null), xn = () => {
457
457
  CONTINUE_EDITING_IN_THIS_CLIENT: "CONTINUE_EDITING_IN_THIS_CLIENT",
458
458
  CONTINUE_EDITING_IN_THIS_TAB_REQUEST: "CONTINUE_EDITING_IN_THIS_TAB_REQUEST"
459
459
  }, gi = ["sync", "join", "leave"], mi = [
460
- ne.FORCE_TAKE_OVER,
461
- ne.TAKE_OVER_REQUEST,
462
- ne.TAKE_OVER_APPROVED,
463
- ne.TAKE_OVER_REJECTED,
464
- ne.FORCE_TAKE_OVER_REQUEST,
465
- ne.CONTINUE_EDITING_IN_THIS_CLIENT,
466
- ne.CONTINUE_EDITING_IN_THIS_TAB_REQUEST
460
+ se.FORCE_TAKE_OVER,
461
+ se.TAKE_OVER_REQUEST,
462
+ se.TAKE_OVER_APPROVED,
463
+ se.TAKE_OVER_REJECTED,
464
+ se.FORCE_TAKE_OVER_REQUEST,
465
+ se.CONTINUE_EDITING_IN_THIS_CLIENT,
466
+ se.CONTINUE_EDITING_IN_THIS_TAB_REQUEST
467
467
  ], Ei = pe({}), xs = pe(null), pi = pe(ee.CHECKING), yi = pe({}), Ai = (e) => {
468
468
  const t = {}, n = xr(Es(e).map(ps).filter(Boolean), "pageId");
469
469
  return Object.entries(n).forEach(
@@ -497,7 +497,7 @@ const Rs = () => {
497
497
  return q(() => t[e], [t, e]);
498
498
  }, Rn = () => {
499
499
  const e = Ns(), { setPageStatus: t } = he(), [n] = ie(xs);
500
- return se(() => {
500
+ return ne(() => {
501
501
  if (clearTimeout(ln), !e)
502
502
  return ln = setTimeout(() => {
503
503
  e || t(ee.EDITING);
@@ -541,27 +541,27 @@ const Rs = () => {
541
541
  const u = d || {};
542
542
  if (!(!(u != null && u.pageId) || (u == null ? void 0 : u.pageId) !== i.current || (u == null ? void 0 : u.receiverClientId) !== Ue))
543
543
  switch (r({}), l) {
544
- case ne.FORCE_TAKE_OVER_REQUEST:
545
- case ne.CONTINUE_EDITING_IN_THIS_TAB_REQUEST: {
544
+ case se.FORCE_TAKE_OVER_REQUEST:
545
+ case se.CONTINUE_EDITING_IN_THIS_TAB_REQUEST: {
546
546
  try {
547
547
  await o(!0);
548
548
  } catch (f) {
549
549
  console.error("Failed to save page before releasing lock:", f);
550
550
  }
551
- await a(ne.CONTINUE_EDITING_IN_THIS_CLIENT, { requestingClientId: u == null ? void 0 : u.senderClientId }), setTimeout(() => r({ type: l }), 0);
551
+ await a(se.CONTINUE_EDITING_IN_THIS_CLIENT, { requestingClientId: u == null ? void 0 : u.senderClientId }), setTimeout(() => r({ type: l }), 0);
552
552
  break;
553
553
  }
554
- case ne.TAKE_OVER_REQUEST: {
554
+ case se.TAKE_OVER_REQUEST: {
555
555
  r({ requestingUserId: u == null ? void 0 : u.userId, requestingClientId: u == null ? void 0 : u.senderClientId }), s(ee.TAKE_OVER_REQUESTED);
556
556
  break;
557
557
  }
558
- case ne.CONTINUE_EDITING_IN_THIS_CLIENT: {
558
+ case se.CONTINUE_EDITING_IN_THIS_CLIENT: {
559
559
  const f = Ti(n == null ? void 0 : n.presenceState());
560
560
  s(ee.CHECKING), await (n == null ? void 0 : n.track({ onlineAt: f, pageId: i.current, userId: e, clientId: Ue }));
561
561
  break;
562
562
  }
563
- case ne.TAKE_OVER_REJECTED: {
564
- r({ type: ne.TAKE_OVER_REJECTED });
563
+ case se.TAKE_OVER_REJECTED: {
564
+ r({ type: se.TAKE_OVER_REJECTED });
565
565
  break;
566
566
  }
567
567
  }
@@ -569,36 +569,35 @@ const Rs = () => {
569
569
  [a, r, s, n, e, o]
570
570
  );
571
571
  }, Hc = () => {
572
- const e = Ns(), t = en(), n = Nt(), s = Si(), [r, a] = ie(xs), { setPageStatus: i } = he(), o = vi(), l = Pi(), d = Ie(o), u = Ie(l);
573
- se(() => {
574
- d.current = o, u.current = l;
575
- }, [o, l]), se(() => {
572
+ const e = Ns(), t = en(), n = Nt(), s = Si(), [r, a] = ie(xs), { setPageStatus: i } = he(), [o, l] = F(0), d = vi(), u = Pi(), f = Ie(d), g = Ie(u);
573
+ ne(() => {
574
+ f.current = d, g.current = u;
575
+ }, [d, u]), ne(() => {
576
+ const h = () => {
577
+ document.visibilityState === "visible" && l((p) => p + 1);
578
+ };
579
+ return document.addEventListener("visibilitychange", h), () => {
580
+ document.removeEventListener("visibilitychange", h);
581
+ };
582
+ }, []), ne(() => {
576
583
  if (!e || !t || !s || r && r.topic === s) return;
577
- const f = e.channel(s, {
584
+ const h = e.channel(s, {
578
585
  config: { presence: { key: Ue } }
579
586
  });
580
- return mi.forEach((g) => {
581
- f.on("broadcast", { event: g }, (h) => {
582
- d.current(g)(h);
587
+ return mi.forEach((p) => {
588
+ h.on("broadcast", { event: p }, (A) => {
589
+ f.current(p)(A);
583
590
  });
584
- }), gi.forEach((g) => {
585
- f.on("presence", { event: g }, () => {
586
- u.current(f);
591
+ }), gi.forEach((p) => {
592
+ h.on("presence", { event: p }, () => {
593
+ g.current(h);
587
594
  });
588
- }), f.subscribe(async (g) => {
589
- g === "SUBSCRIBED" ? a(f) : (g === "CHANNEL_ERROR" || g === "TIMED_OUT") && (k.error("Realtime connection failed. Please reload the page.", {
590
- id: "realtime-connection-error",
591
- duration: 1 / 0,
592
- action: {
593
- label: "Reload",
594
- onClick: () => window.location.reload()
595
- },
596
- position: "top-center"
597
- }), a(null), i(ee.CONNECTION_LOST));
595
+ }), h.subscribe(async (p) => {
596
+ p === "SUBSCRIBED" ? (k.dismiss("realtime-connection-error"), a(h)) : (p === "CHANNEL_ERROR" || p === "TIMED_OUT") && (console.log("Realtime connection failed", p), a(null), i(ee.CONNECTION_LOST), document.visibilityState === "visible" && setTimeout(() => l((A) => A + 1), 2e3));
598
597
  }), () => {
599
- f.unsubscribe(), a(null);
598
+ h.unsubscribe(), a(null);
600
599
  };
601
- }, [e, t, s, a]), se(() => (r && n && t && r.track({
600
+ }, [e, t, s, a, o]), ne(() => (r && n && t && r.track({
602
601
  pageId: n,
603
602
  userId: t,
604
603
  clientId: Ue,
@@ -636,13 +635,13 @@ const Rs = () => {
636
635
  },
637
636
  placeholderData: (r) => r || {}
638
637
  });
639
- }, bi = V(() => import("./page-manager-new-znvqI9_L.js")), Ms = ({ children: e }) => {
640
- const { t } = Pe(), [n, s] = we(), r = n.get("page"), { data: a, isFetching: i } = ce(), { data: o, isFetching: l } = Us(), [d, u] = K(!1), [f, g] = K(!0), { savePage: h } = ke(), p = !!r && !Te(a), { isLocked: T } = he(), S = q(() => {
638
+ }, bi = V(() => import("./page-manager-new-DlyDlsLT.js")), Ms = ({ children: e }) => {
639
+ const { t } = Pe(), [n, s] = we(), r = n.get("page"), { data: a, isFetching: i } = ce(), { data: o, isFetching: l } = Us(), [d, u] = F(!1), [f, g] = F(!0), { savePage: h } = ke(), p = !!r && !Te(a), { isLocked: A } = he(), S = q(() => {
641
640
  if (!o || l) return !1;
642
641
  const v = o.find((U) => U.slug === "/");
643
642
  return v == null ? void 0 : v.id;
644
643
  }, [o, l]);
645
- se(() => {
644
+ ne(() => {
646
645
  if (l || !S || o.some((b) => b.id === r)) return;
647
646
  const U = new URLSearchParams({ page: S });
648
647
  Ds(U, s), !l && o && g(!1);
@@ -655,7 +654,7 @@ const Rs = () => {
655
654
  {
656
655
  asChild: !0,
657
656
  onClick: () => {
658
- T || h(), u(!0);
657
+ A || h(), u(!0);
659
658
  },
660
659
  children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(Da, { className: "h-4 w-4" }) }, "template-viewer")
661
660
  }
@@ -684,7 +683,7 @@ const Rs = () => {
684
683
  }
685
684
  ) })
686
685
  ] });
687
- }, Ii = V(() => import("./add-new-language-page-YlqcCdlK.js")), Li = () => {
686
+ }, Ii = V(() => import("./add-new-language-page-CfjQxseQ.js")), Li = () => {
688
687
  const e = le("topLeftCorner", null);
689
688
  return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Qr.createElement(e, {}) }) : null;
690
689
  }, Ni = ({
@@ -693,11 +692,11 @@ const Rs = () => {
693
692
  goToDefaultLang: n = !1
694
693
  }) => {
695
694
  const { fallbackLang: s, languages: r, selectedLang: a, setSelectedLang: i } = _e(), o = Te(a) ? s : a, [, l] = we(), { isLocked: d } = he(), { t: u } = Pe();
696
- se(() => {
695
+ ne(() => {
697
696
  const y = new URLSearchParams(window.location.search), w = y.get("lang");
698
697
  w && (r.includes(w) ? i(w) : (y.delete("lang"), l(y), i("")));
699
698
  }, [r, l, i]);
700
- const [, f] = ie(Dn), { data: g } = ce(), { data: h } = Be(), { data: p } = Me(), T = q(() => {
699
+ const [, f] = ie(Dn), { data: g } = ce(), { data: h } = Be(), { data: p } = Me(), A = q(() => {
701
700
  const y = As(
702
701
  Kt(H(h, "languages"), (w) => {
703
702
  const v = ae(p, { lang: w });
@@ -755,7 +754,7 @@ const Rs = () => {
755
754
  ) }),
756
755
  /* @__PURE__ */ m(Cn, { className: "space-y-1 border-border", children: [
757
756
  Kt(
758
- T.filter((y) => y.isLangPageAdded),
757
+ A.filter((y) => y.isLangPageAdded),
759
758
  (y) => /* @__PURE__ */ m(
760
759
  fe,
761
760
  {
@@ -775,7 +774,7 @@ const Rs = () => {
775
774
  y.value
776
775
  )
777
776
  ),
778
- e && !Te(T.filter((y) => !y.isLangPageAdded)) && /* @__PURE__ */ m(me, { children: [
777
+ e && !Te(A.filter((y) => !y.isLangPageAdded)) && /* @__PURE__ */ m(me, { children: [
779
778
  /* @__PURE__ */ c(ua, {}),
780
779
  /* @__PURE__ */ m(
781
780
  M,
@@ -827,7 +826,7 @@ function Gi() {
827
826
  /* @__PURE__ */ c(Ot, { className: "h-8 w-8 rounded-full" })
828
827
  ] }, t)) });
829
828
  }
830
- const Oi = Q.lazy(() => import("./page-revisions-content-CyLjyxNU.js"));
829
+ const Oi = Q.lazy(() => import("./page-revisions-content-Do3_ATby.js"));
831
830
  function Di() {
832
831
  const [e, t] = Q.useState(!1);
833
832
  return /* @__PURE__ */ c(vs, { children: /* @__PURE__ */ m(Jt, { delayDuration: 0, children: [
@@ -1066,7 +1065,7 @@ const cn = ({
1066
1065
  k.error("Failed to change slug");
1067
1066
  }
1068
1067
  });
1069
- }, Ui = V(() => import("./publish-pages-content-Bih1W9C4.js"));
1068
+ }, Ui = V(() => import("./publish-pages-content-CfIH4-uW.js"));
1070
1069
  function Mi({
1071
1070
  showModal: e = !1,
1072
1071
  onClose: t = () => console.log("Cancelled")
@@ -1156,8 +1155,8 @@ function Un({
1156
1155
  /* @__PURE__ */ c(Xt, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
1157
1156
  ] }) }) : e;
1158
1157
  }
1159
- const Hi = V(() => import("./unpublish-page-FZ8rbi7u.js")), qi = V(() => import("./translation-warning-modal-DalBhNQy.js")), $i = () => {
1160
- const { t: e } = Pe(), { selectedLang: t, fallbackLang: n } = _e(), s = le("getPreviewUrl", async (g) => g), [r, a] = K(""), { data: i } = ce(), { data: o } = Me(), { data: l } = Ce(), d = q(
1158
+ const Hi = V(() => import("./unpublish-page-my8VTao9.js")), qi = V(() => import("./translation-warning-modal-DalBhNQy.js")), $i = () => {
1159
+ const { t: e } = Pe(), { selectedLang: t, fallbackLang: n } = _e(), s = le("getPreviewUrl", async (g) => g), [r, a] = F(""), { data: i } = ce(), { data: o } = Me(), { data: l } = Ce(), d = q(
1161
1160
  () => {
1162
1161
  var g;
1163
1162
  return (g = o == null ? void 0 : o.find((h) => (h == null ? void 0 : h.lang) === t)) == null ? void 0 : g.slug;
@@ -1167,7 +1166,7 @@ const Hi = V(() => import("./unpublish-page-FZ8rbi7u.js")), qi = V(() => import(
1167
1166
  var h;
1168
1167
  return (h = ae(l, { key: g })) == null ? void 0 : h.hasSlug;
1169
1168
  }, [l]), f = t === n ? "" : t;
1170
- return se(() => {
1169
+ return ne(() => {
1171
1170
  (async () => {
1172
1171
  if (typeof s == "function") {
1173
1172
  const g = !u(i == null ? void 0 : i.pageType), h = await s(
@@ -1194,8 +1193,8 @@ const Hi = V(() => import("./unpublish-page-FZ8rbi7u.js")), qi = V(() => import(
1194
1193
  /* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
1195
1194
  ] });
1196
1195
  }, zi = () => {
1197
- const { t: e } = Pe(), [t, n] = K(!1), { isLocked: s } = he(), { savePageAsync: r, saveState: a } = ke();
1198
- se(() => {
1196
+ const { t: e } = Pe(), [t, n] = F(!1), { isLocked: s } = he(), { savePageAsync: r, saveState: a } = ke();
1197
+ ne(() => {
1199
1198
  const u = (f) => {
1200
1199
  a === "UNSAVED" && (f.preventDefault(), f.returnValue = !1);
1201
1200
  };
@@ -1233,7 +1232,7 @@ const Hi = V(() => import("./unpublish-page-FZ8rbi7u.js")), qi = V(() => import(
1233
1232
  d
1234
1233
  ] });
1235
1234
  }, ji = () => {
1236
- const { t: e } = Pe(), { selectedLang: t } = _e(), { data: n } = Ne(), { data: s } = Me(), [r, a] = K(!1), [i, o] = K(!1), [l, d] = K(null), { savePageAsync: u } = ke(), [f, g] = K(!1), { data: h } = ce(), { mutate: p, isPending: T } = Bs(), { needTranslations: S } = ke(), D = S(), { buttonText: y, buttonClassName: w, isPublished: v } = q(() => {
1235
+ const { t: e } = Pe(), { selectedLang: t } = _e(), { data: n } = Ne(), { data: s } = Me(), [r, a] = F(!1), [i, o] = F(!1), [l, d] = F(null), { savePageAsync: u } = ke(), [f, g] = F(!1), { data: h } = ce(), { mutate: p, isPending: A } = Bs(), { needTranslations: S } = ke(), D = S(), { buttonText: y, buttonClassName: w, isPublished: v } = q(() => {
1237
1236
  const P = h && (h == null ? void 0 : h.online);
1238
1237
  return {
1239
1238
  buttonClassName: P ? "hover:bg-green-600 bg-green-500" : "",
@@ -1261,7 +1260,7 @@ const Hi = V(() => import("./unpublish-page-FZ8rbi7u.js")), qi = V(() => import(
1261
1260
  {
1262
1261
  size: "sm",
1263
1262
  onClick: U,
1264
- disabled: T || !(h != null && h.id),
1263
+ disabled: A || !(h != null && h.id),
1265
1264
  className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${w}`,
1266
1265
  onMouseEnter: () => o(!0),
1267
1266
  onMouseLeave: () => o(!1),
@@ -1290,7 +1289,7 @@ const Hi = V(() => import("./unpublish-page-FZ8rbi7u.js")), qi = V(() => import(
1290
1289
  M,
1291
1290
  {
1292
1291
  size: "sm",
1293
- disabled: T || !(h != null && h.id),
1292
+ disabled: A || !(h != null && h.id),
1294
1293
  className: `rounded-l-none border-l border-white/50 px-2 text-white ${w}`,
1295
1294
  children: /* @__PURE__ */ c(En, { className: "h-4 w-4" })
1296
1295
  }
@@ -1299,7 +1298,7 @@ const Hi = V(() => import("./unpublish-page-FZ8rbi7u.js")), qi = V(() => import(
1299
1298
  /* @__PURE__ */ m(
1300
1299
  fe,
1301
1300
  {
1302
- disabled: T,
1301
+ disabled: A,
1303
1302
  className: "cursor-pointer text-xs",
1304
1303
  onClick: () => p({ ids: B }, { onSuccess: () => un("TOP_RIGHT") }),
1305
1304
  children: [
@@ -1311,7 +1310,7 @@ const Hi = V(() => import("./unpublish-page-FZ8rbi7u.js")), qi = V(() => import(
1311
1310
  !v && /* @__PURE__ */ m(
1312
1311
  fe,
1313
1312
  {
1314
- disabled: T,
1313
+ disabled: A,
1315
1314
  className: "cursor-pointer text-xs",
1316
1315
  onClick: () => p({ ids: [h == null ? void 0 : h.id] }, { onSuccess: () => un("TOP_RIGHT") }),
1317
1316
  children: [
@@ -1340,7 +1339,7 @@ const Hi = V(() => import("./unpublish-page-FZ8rbi7u.js")), qi = V(() => import(
1340
1339
  isOpen: f,
1341
1340
  onClose: Ae,
1342
1341
  onContinue: ye,
1343
- isPending: T
1342
+ isPending: A
1344
1343
  }
1345
1344
  ) })
1346
1345
  ] });
@@ -1452,11 +1451,11 @@ const Yi = ({
1452
1451
  ) })
1453
1452
  ] })
1454
1453
  ] });
1455
- }, Ji = V(() => import("./add-new-page-aYomeid4.js")), Zi = V(() => import("./delete-page-BF1k60U2.js")), Xi = V(() => import("./duplicate-page-u_6vUVo1.js")), eo = V(() => import("./mark-as-template-CJ1mlxYT.js")), to = V(() => import("./unmark-as-template-JRRUYTOY.js")), no = V(() => import("./unpublish-page-FZ8rbi7u.js")), so = () => {
1456
- const [e, t] = K(null), [n, s] = K(null), [r, a] = K(null), [i, o] = K(null), [l, d] = K(null), [u, f] = K(null), { data: g, isFetching: h } = Ne(), { selectedLang: p, fallbackLang: T } = _e(), { data: S } = Me(), D = S == null ? void 0 : S.find((b) => b.lang === p), { isLocked: y } = he(), w = !(g != null && g.slug), [, v] = ie(Dn);
1454
+ }, Ji = V(() => import("./add-new-page-DrqKQSBZ.js")), Zi = V(() => import("./delete-page-Dz7E_Gln.js")), Xi = V(() => import("./duplicate-page-LxJbVeQX.js")), eo = V(() => import("./mark-as-template-DHcvdwtH.js")), to = V(() => import("./unmark-as-template-CBksW8B6.js")), no = V(() => import("./unpublish-page-my8VTao9.js")), so = () => {
1455
+ const [e, t] = F(null), [n, s] = F(null), [r, a] = F(null), [i, o] = F(null), [l, d] = F(null), [u, f] = F(null), { data: g, isFetching: h } = Ne(), { selectedLang: p, fallbackLang: A } = _e(), { data: S } = Me(), D = S == null ? void 0 : S.find((b) => b.lang === p), { isLocked: y } = he(), w = !(g != null && g.slug), [, v] = ie(Dn);
1457
1456
  if (!g) return null;
1458
1457
  const U = (b) => {
1459
- p.length > 0 && p !== T ? v({
1458
+ p.length > 0 && p !== A ? v({
1460
1459
  edit: !0,
1461
1460
  id: b == null ? void 0 : b.id,
1462
1461
  primaryPage: b == null ? void 0 : b.primaryPage
@@ -1493,7 +1492,7 @@ const Yi = ({
1493
1492
  setDeletePage: (b) => t(b),
1494
1493
  setMarkAsTemplate: (b) => a(b),
1495
1494
  setUnmarkAsTemplate: (b) => o(b),
1496
- isLanguagePage: p.length > 0 && p !== T,
1495
+ isLanguagePage: p.length > 0 && p !== A,
1497
1496
  children: /* @__PURE__ */ c(M, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ c(Jn, { className: "h-4 w-4" }) })
1498
1497
  }
1499
1498
  )
@@ -1533,7 +1532,7 @@ const Yi = ({
1533
1532
  ), ro = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(Fs, { children: /* @__PURE__ */ m("div", { className: "flex min-w-[300px] max-w-[400px] flex-col items-center justify-center rounded-lg border bg-white p-4 shadow-lg", children: [
1534
1533
  /* @__PURE__ */ c("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
1535
1534
  /* @__PURE__ */ c("p", { className: "pt-2 text-center text-sm font-light text-gray-600", children: e ? "Please select a page from the list in the top header. This will enable you to edit the page." : "Please add a new page" })
1536
- ] }) }), ao = V(() => import("./dynamic-page-selector-DxBHmglP.js")), io = () => {
1535
+ ] }) }), ao = V(() => import("./dynamic-page-selector-6BmMIsBj.js")), io = () => {
1537
1536
  const { dynamicPage: e, allLangPages: t, isFetching: n } = ci(), s = t.length > 0;
1538
1537
  return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
1539
1538
  !e && /* @__PURE__ */ c(ro, { hasDynamicPage: s }),
@@ -1878,7 +1877,7 @@ const Yi = ({
1878
1877
  [n, t]
1879
1878
  )
1880
1879
  };
1881
- }, To = V(() => import("./ai-panel-content-C6cH9rrC.js").then((e) => e.b)), Vs = "chai-chat-panel", So = ({ className: e = "h-full w-full" }) => /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", version: "1.1", className: e, children: [
1880
+ }, To = V(() => import("./ai-panel-content-D0WeLOfT.js").then((e) => e.b)), Vs = "chai-chat-panel", So = ({ className: e = "h-full w-full" }) => /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", version: "1.1", className: e, children: [
1882
1881
  /* @__PURE__ */ c("title", { children: "ai" }),
1883
1882
  /* @__PURE__ */ c("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ c("g", { id: "icon", fill: "currentColor", transform: "translate(64.000000, 64.000000)", children: /* @__PURE__ */ c(
1884
1883
  "path",
@@ -1893,7 +1892,7 @@ const Yi = ({
1893
1892
  button: _o,
1894
1893
  panel: To,
1895
1894
  position: "top"
1896
- }, wo = V(() => import("./lang-panel-B8OD0GiA.js")), vo = ({ isActive: e, show: t }) => {
1895
+ }, wo = V(() => import("./lang-panel-Cq1HkfIL.js")), vo = ({ isActive: e, show: t }) => {
1897
1896
  const { data: n } = Be();
1898
1897
  return !Yt(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(ja, { className: "h-4 w-4" }) });
1899
1898
  }, Hs = "lang", bo = {
@@ -1904,7 +1903,7 @@ const Yi = ({
1904
1903
  button: vo,
1905
1904
  view: "modal",
1906
1905
  width: 400
1907
- }, Io = V(() => import("./seo-panel-BurZA566.js")), qs = "seo", Lo = ({ isActive: e, show: t }) => {
1906
+ }, Io = V(() => import("./seo-panel-DO9e9dzR.js")), qs = "seo", Lo = ({ isActive: e, show: t }) => {
1908
1907
  const { data: n } = ce(), s = Ri(n == null ? void 0 : n.pageType);
1909
1908
  return !Yt(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
1910
1909
  "svg",
@@ -2011,7 +2010,7 @@ function xe(e, t) {
2011
2010
  x = n, N = s;
2012
2011
  }
2013
2012
  }
2014
- function F(e, t) {
2013
+ function K(e, t) {
2015
2014
  t = t ? Object.assign({}, $t, t) : $t;
2016
2015
  const n = {
2017
2016
  value: e,
@@ -2046,9 +2045,9 @@ function Uo(e, t, n) {
2046
2045
  let s, r, a;
2047
2046
  s = !0, r = e, a = {};
2048
2047
  let i = null, o = dn, l = null, d = !1, u = "initialValue" in a, f = typeof s == "function" && W(s);
2049
- const g = /* @__PURE__ */ new Set(), [h, p] = (a.storage || F)(a.initialValue), [T, S] = F(void 0), [D, y] = F(void 0, {
2048
+ const g = /* @__PURE__ */ new Set(), [h, p] = (a.storage || K)(a.initialValue), [A, S] = K(void 0), [D, y] = K(void 0, {
2050
2049
  equals: !1
2051
- }), [w, v] = F(u ? "ready" : "unresolved");
2050
+ }), [w, v] = K(u ? "ready" : "unresolved");
2052
2051
  _.context && (l = _.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : _.load && _.has(l) && (o = _.load(l)));
2053
2052
  function U(P, I, j, $) {
2054
2053
  return i === P && (i = null, $ !== void 0 && (u = !0), (P === o || I === o) && a.onHydrated && queueMicrotask(() => a.onHydrated($, {
@@ -2063,7 +2062,7 @@ function Uo(e, t, n) {
2063
2062
  }, !1);
2064
2063
  }
2065
2064
  function ye() {
2066
- const P = Ko, I = h(), j = T();
2065
+ const P = Ko, I = h(), j = A();
2067
2066
  if (j !== void 0 && !i) throw j;
2068
2067
  return x && x.user, I;
2069
2068
  }
@@ -2100,7 +2099,7 @@ function Uo(e, t, n) {
2100
2099
  get: () => w()
2101
2100
  },
2102
2101
  error: {
2103
- get: () => T()
2102
+ get: () => A()
2104
2103
  },
2105
2104
  loading: {
2106
2105
  get() {
@@ -2111,7 +2110,7 @@ function Uo(e, t, n) {
2111
2110
  latest: {
2112
2111
  get() {
2113
2112
  if (!u) return ye();
2114
- const P = T();
2113
+ const P = A();
2115
2114
  if (P && !i) throw P;
2116
2115
  return h();
2117
2116
  }
@@ -2179,7 +2178,7 @@ function Bo(e) {
2179
2178
  return Ee(e, !1), x = N = null, s ? s.done : void 0;
2180
2179
  });
2181
2180
  }
2182
- var [Fo, iu] = /* @__PURE__ */ F(!1);
2181
+ var [Fo, iu] = /* @__PURE__ */ K(!1);
2183
2182
  function ou() {
2184
2183
  return [Fo, Bo];
2185
2184
  }
@@ -2389,7 +2388,7 @@ function Qo(e, t, n = {}) {
2389
2388
  return dt(() => Wt(a)), () => {
2390
2389
  let l = e() || [], d = l.length, u, f;
2391
2390
  return l[js], Z(() => {
2392
- let h, p, T, S, D, y, w, v, U;
2391
+ let h, p, A, S, D, y, w, v, U;
2393
2392
  if (d === 0)
2394
2393
  i !== 0 && (Wt(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [yn], r[0] = xe((b) => (a[0] = b, n.fallback())), i = 1);
2395
2394
  else if (i === 0) {
@@ -2397,23 +2396,23 @@ function Qo(e, t, n = {}) {
2397
2396
  s[f] = l[f], r[f] = xe(g);
2398
2397
  i = d;
2399
2398
  } else {
2400
- for (T = new Array(d), S = new Array(d), o && (D = new Array(d)), y = 0, w = Math.min(i, d); y < w && s[y] === l[y]; y++) ;
2399
+ for (A = new Array(d), S = new Array(d), o && (D = new Array(d)), y = 0, w = Math.min(i, d); y < w && s[y] === l[y]; y++) ;
2401
2400
  for (w = i - 1, v = d - 1; w >= y && v >= y && s[w] === l[v]; w--, v--)
2402
- T[v] = r[w], S[v] = a[w], o && (D[v] = o[w]);
2401
+ A[v] = r[w], S[v] = a[w], o && (D[v] = o[w]);
2403
2402
  for (h = /* @__PURE__ */ new Map(), p = new Array(v + 1), f = v; f >= y; f--)
2404
2403
  U = l[f], u = h.get(U), p[f] = u === void 0 ? -1 : u, h.set(U, f);
2405
2404
  for (u = y; u <= w; u++)
2406
- U = s[u], f = h.get(U), f !== void 0 && f !== -1 ? (T[f] = r[u], S[f] = a[u], o && (D[f] = o[u]), f = p[f], h.set(U, f)) : a[u]();
2405
+ U = s[u], f = h.get(U), f !== void 0 && f !== -1 ? (A[f] = r[u], S[f] = a[u], o && (D[f] = o[u]), f = p[f], h.set(U, f)) : a[u]();
2407
2406
  for (f = y; f < d; f++)
2408
- f in T ? (r[f] = T[f], a[f] = S[f], o && (o[f] = D[f], o[f](f))) : r[f] = xe(g);
2407
+ f in A ? (r[f] = A[f], a[f] = S[f], o && (o[f] = D[f], o[f](f))) : r[f] = xe(g);
2409
2408
  r = r.slice(0, i = d), s = l.slice(0);
2410
2409
  }
2411
2410
  return r;
2412
2411
  });
2413
2412
  function g(h) {
2414
2413
  if (a[f] = h, o) {
2415
- const [p, T] = F(f);
2416
- return o[f] = T, t(l[f], p);
2414
+ const [p, A] = K(f);
2415
+ return o[f] = A, t(l[f], p);
2417
2416
  }
2418
2417
  return t(l[f]);
2419
2418
  }
@@ -2434,7 +2433,7 @@ function zo(e, t, n = {}) {
2434
2433
  });
2435
2434
  function f(g) {
2436
2435
  a[l] = g;
2437
- const [h, p] = F(d[l]);
2436
+ const [h, p] = K(d[l]);
2438
2437
  return i[l] = p, t(h, l);
2439
2438
  }
2440
2439
  };
@@ -2571,7 +2570,7 @@ function ir(e) {
2571
2570
  const s = (r) => {
2572
2571
  const a = _.context;
2573
2572
  if (a) {
2574
- const [o, l] = F();
2573
+ const [o, l] = K();
2575
2574
  _.count || (_.count = 0), _.count++, (n || (n = e())).then((d) => {
2576
2575
  !_.done && lt(a), _.count--, l(() => d.default), lt();
2577
2576
  }), t = o;
@@ -3107,7 +3106,7 @@ function Au(e) {
3107
3106
  i && (ns().user = i = !1), a || (a = Zs(r, () => W(() => e.children)));
3108
3107
  const o = s();
3109
3108
  if (o instanceof HTMLHeadElement) {
3110
- const [l, d] = F(!1), u = () => d(!0);
3109
+ const [l, d] = K(!1), u = () => d(!0);
3111
3110
  xe((f) => Sn(o, () => l() ? f() : a(), null)), dt(u);
3112
3111
  } else {
3113
3112
  const l = ur(e.isSVG ? "g" : "div", e.isSVG), d = t && l.attachShadow ? l.attachShadow({
@@ -3539,8 +3538,8 @@ var Pr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
3539
3538
  rt(d, (h, p) => {
3540
3539
  if (p === "__proto__" || p === "constructor" || p === "prototype")
3541
3540
  throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
3542
- const T = Pr(h, t, n, s, [...r, p], [...a, e], i);
3543
- u[p] = T.transformedValue, Le(T.annotations) ? f[p] = T.annotations : gt(T.annotations) && rt(T.annotations, (S, D) => {
3541
+ const A = Pr(h, t, n, s, [...r, p], [...a, e], i);
3542
+ u[p] = A.transformedValue, Le(A.annotations) ? f[p] = A.annotations : gt(A.annotations) && rt(A.annotations, (S, D) => {
3544
3543
  f[gr(p) + "." + D] = S;
3545
3544
  });
3546
3545
  });
@@ -3680,7 +3679,7 @@ var Iu = (e, t = !1) => {
3680
3679
  status: ec,
3681
3680
  "last updated": br
3682
3681
  }, Cu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Gu = () => {
3683
- const [e, t] = F("dark");
3682
+ const [e, t] = K("dark");
3684
3683
  return Mo(() => {
3685
3684
  const n = window.matchMedia("(prefers-color-scheme: dark)");
3686
3685
  t(n.matches ? "dark" : "light");
@@ -3782,41 +3781,41 @@ var Iu = (e, t = !1) => {
3782
3781
  shadowDOMTarget: u,
3783
3782
  hideDisabledQueries: f
3784
3783
  } = e;
3785
- G(this, He, F(t)), G(this, yt, n), G(this, At, s), G(this, pt, r), G(this, Tt, d), G(this, qe, u), G(this, $e, F(a)), G(this, Qe, F(i)), G(this, ze, F(o)), G(this, je, F(l)), G(this, St, F(f));
3784
+ G(this, He, K(t)), G(this, yt, n), G(this, At, s), G(this, pt, r), G(this, Tt, d), G(this, qe, u), G(this, $e, K(a)), G(this, Qe, K(i)), G(this, ze, K(o)), G(this, je, K(l)), G(this, St, K(f));
3786
3785
  }
3787
3786
  setButtonPosition(e) {
3788
- A(this, $e)[1](e);
3787
+ T(this, $e)[1](e);
3789
3788
  }
3790
3789
  setPosition(e) {
3791
- A(this, Qe)[1](e);
3790
+ T(this, Qe)[1](e);
3792
3791
  }
3793
3792
  setInitialIsOpen(e) {
3794
- A(this, ze)[1](e);
3793
+ T(this, ze)[1](e);
3795
3794
  }
3796
3795
  setErrorTypes(e) {
3797
- A(this, je)[1](e);
3796
+ T(this, je)[1](e);
3798
3797
  }
3799
3798
  setClient(e) {
3800
- A(this, He)[1](e);
3799
+ T(this, He)[1](e);
3801
3800
  }
3802
3801
  mount(e) {
3803
- if (A(this, Oe))
3802
+ if (T(this, Oe))
3804
3803
  throw new Error("Devtools is already mounted");
3805
3804
  const t = lr(() => {
3806
- const n = this, [s] = A(this, $e), [r] = A(this, Qe), [a] = A(this, ze), [i] = A(this, je), [o] = A(this, St), [l] = A(this, He);
3805
+ const n = this, [s] = T(this, $e), [r] = T(this, Qe), [a] = T(this, ze), [i] = T(this, je), [o] = T(this, St), [l] = T(this, He);
3807
3806
  let d;
3808
- return A(this, We) ? d = A(this, We) : (d = ir(() => import("./NCMVHL6D-vUfYKc6i.js")), G(this, We, d)), Ir(A(this, Tt), A(this, qe)), rr(d, ar({
3807
+ return T(this, We) ? d = T(this, We) : (d = ir(() => import("./NCMVHL6D-Bhn1i9Td.js")), G(this, We, d)), Ir(T(this, Tt), T(this, qe)), rr(d, ar({
3809
3808
  get queryFlavor() {
3810
- return A(n, yt);
3809
+ return T(n, yt);
3811
3810
  },
3812
3811
  get version() {
3813
- return A(n, At);
3812
+ return T(n, At);
3814
3813
  },
3815
3814
  get onlineManager() {
3816
- return A(n, pt);
3815
+ return T(n, pt);
3817
3816
  },
3818
3817
  get shadowDOMTarget() {
3819
- return A(n, qe);
3818
+ return T(n, qe);
3820
3819
  }
3821
3820
  }, {
3822
3821
  get client() {
@@ -3843,9 +3842,9 @@ var Iu = (e, t = !1) => {
3843
3842
  }
3844
3843
  unmount() {
3845
3844
  var e;
3846
- if (!A(this, Oe))
3845
+ if (!T(this, Oe))
3847
3846
  throw new Error("Devtools is not mounted");
3848
- (e = A(this, _t)) == null || e.call(this), G(this, Oe, !1);
3847
+ (e = T(this, _t)) == null || e.call(this), G(this, Oe, !1);
3849
3848
  }
3850
3849
  }, He = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), At = new WeakMap(), Oe = new WeakMap(), Tt = new WeakMap(), qe = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), ze = new WeakMap(), je = new WeakMap(), St = new WeakMap(), We = new WeakMap(), _t = new WeakMap(), hs), Ye, Pt, wt, vt, De, bt, Je, Ze, Xe, et, tt, It, nt, st, Lt, gs, nc = (gs = class {
3851
3850
  constructor(e) {
@@ -3878,44 +3877,44 @@ var Iu = (e, t = !1) => {
3878
3877
  onClose: f,
3879
3878
  hideDisabledQueries: g
3880
3879
  } = e;
3881
- G(this, Ye, F(t)), G(this, wt, n), G(this, vt, s), G(this, Pt, r), G(this, bt, d), G(this, Je, u), G(this, Ze, F(a)), G(this, Xe, F(i)), G(this, et, F(o)), G(this, tt, F(l)), G(this, It, F(g)), G(this, nt, F(f));
3880
+ G(this, Ye, K(t)), G(this, wt, n), G(this, vt, s), G(this, Pt, r), G(this, bt, d), G(this, Je, u), G(this, Ze, K(a)), G(this, Xe, K(i)), G(this, et, K(o)), G(this, tt, K(l)), G(this, It, K(g)), G(this, nt, K(f));
3882
3881
  }
3883
3882
  setButtonPosition(e) {
3884
- A(this, Ze)[1](e);
3883
+ T(this, Ze)[1](e);
3885
3884
  }
3886
3885
  setPosition(e) {
3887
- A(this, Xe)[1](e);
3886
+ T(this, Xe)[1](e);
3888
3887
  }
3889
3888
  setInitialIsOpen(e) {
3890
- A(this, et)[1](e);
3889
+ T(this, et)[1](e);
3891
3890
  }
3892
3891
  setErrorTypes(e) {
3893
- A(this, tt)[1](e);
3892
+ T(this, tt)[1](e);
3894
3893
  }
3895
3894
  setClient(e) {
3896
- A(this, Ye)[1](e);
3895
+ T(this, Ye)[1](e);
3897
3896
  }
3898
3897
  setOnClose(e) {
3899
- A(this, nt)[1](() => e);
3898
+ T(this, nt)[1](() => e);
3900
3899
  }
3901
3900
  mount(e) {
3902
- if (A(this, De))
3901
+ if (T(this, De))
3903
3902
  throw new Error("Devtools is already mounted");
3904
3903
  const t = lr(() => {
3905
- const n = this, [s] = A(this, Ze), [r] = A(this, Xe), [a] = A(this, et), [i] = A(this, tt), [o] = A(this, It), [l] = A(this, Ye), [d] = A(this, nt);
3904
+ const n = this, [s] = T(this, Ze), [r] = T(this, Xe), [a] = T(this, et), [i] = T(this, tt), [o] = T(this, It), [l] = T(this, Ye), [d] = T(this, nt);
3906
3905
  let u;
3907
- return A(this, st) ? u = A(this, st) : (u = ir(() => import("./2AITGKQY-2rt9M99C.js")), G(this, st, u)), Ir(A(this, bt), A(this, Je)), rr(u, ar({
3906
+ return T(this, st) ? u = T(this, st) : (u = ir(() => import("./2AITGKQY-BS9f-jSI.js")), G(this, st, u)), Ir(T(this, bt), T(this, Je)), rr(u, ar({
3908
3907
  get queryFlavor() {
3909
- return A(n, wt);
3908
+ return T(n, wt);
3910
3909
  },
3911
3910
  get version() {
3912
- return A(n, vt);
3911
+ return T(n, vt);
3913
3912
  },
3914
3913
  get onlineManager() {
3915
- return A(n, Pt);
3914
+ return T(n, Pt);
3916
3915
  },
3917
3916
  get shadowDOMTarget() {
3918
- return A(n, Je);
3917
+ return T(n, Je);
3919
3918
  }
3920
3919
  }, {
3921
3920
  get client() {
@@ -3945,9 +3944,9 @@ var Iu = (e, t = !1) => {
3945
3944
  }
3946
3945
  unmount() {
3947
3946
  var e;
3948
- if (!A(this, De))
3947
+ if (!T(this, De))
3949
3948
  throw new Error("Devtools is not mounted");
3950
- (e = A(this, Lt)) == null || e.call(this), G(this, De, !1);
3949
+ (e = T(this, Lt)) == null || e.call(this), G(this, De, !1);
3951
3950
  }
3952
3951
  }, Ye = new WeakMap(), Pt = new WeakMap(), wt = new WeakMap(), vt = new WeakMap(), De = new WeakMap(), bt = new WeakMap(), Je = new WeakMap(), Ze = new WeakMap(), Xe = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), It = new WeakMap(), nt = new WeakMap(), st = new WeakMap(), Lt = new WeakMap(), gs);
3953
3952
  function sc(e) {
@@ -4090,7 +4089,7 @@ const ac = pe(""), ic = () => {
4090
4089
  },
4091
4090
  [e]
4092
4091
  );
4093
- }, dc = V(() => import("./page-lock-DUlNr3os.js")), fc = V(() => import("./no-language-page-dialog-Dj_z2_hF.js")), hc = V(() => import("./digital-asset-manager-C8udwDBW.js")), gc = V(() => import("./save-to-lib-BwpkJcT2.js")), mc = V(() => import("./theme-panel-footer-5mxFeEua.js")), Ec = V(() => import("./web-preview-CGBKG162.js"));
4092
+ }, dc = V(() => import("./page-lock-Kt_How1V.js")), fc = V(() => import("./no-language-page-dialog-CgeVcFEJ.js")), hc = V(() => import("./digital-asset-manager-D52Jj1Gh.js")), gc = V(() => import("./save-to-lib-DVUkBZb8.js")), mc = V(() => import("./theme-panel-footer-DMV_nX6m.js")), Ec = V(() => import("./web-preview-32tyIOuK.js"));
4094
4093
  ic();
4095
4094
  ri();
4096
4095
  sa(lo);
@@ -4101,10 +4100,10 @@ const pc = {
4101
4100
  role: "",
4102
4101
  permissions: null
4103
4102
  }, ds = (e) => {
4104
- const { data: t } = Eo(), n = kn(), { data: s = pc, isFetching: r } = po(), { data: a, isFetching: i } = Ce(), { data: o, isFetching: l } = oc(), { data: d, isFetching: u } = Be(), f = r || i || l || u, [g] = we(), h = g.get("page"), { data: p } = ce(), { data: T, isFetching: S } = ho(), { blocks: D } = fo(T), { data: y, isFetching: w } = go(), { pageStatus: v } = he(), U = co(), { onSave: b } = yo(), { mutateAsync: ye } = lc(), { getPartialBlocks: Ae, getPartialBlockBlocks: B } = Ao(), { mutateAsync: P } = ki(), { mutateAsync: I } = mo(), j = uc(), [$, ue] = K(!1), it = Ie([]), be = q(() => H(d, "theme", {}) || {}, [d]), ot = v === ee.EDITING, Ge = v === ee.CHECKING, Bn = S || Ge || w;
4103
+ const { data: t } = Eo(), n = kn(), { data: s = pc, isFetching: r } = po(), { data: a, isFetching: i } = Ce(), { data: o, isFetching: l } = oc(), { data: d, isFetching: u } = Be(), f = r || i || l || u, [g] = we(), h = g.get("page"), { data: p } = ce(), { data: A, isFetching: S } = ho(), { blocks: D } = fo(A), { data: y, isFetching: w } = go(), { pageStatus: v } = he(), U = co(), { onSave: b } = yo(), { mutateAsync: ye } = lc(), { getPartialBlocks: Ae, getPartialBlockBlocks: B } = Ao(), { mutateAsync: P } = ki(), { mutateAsync: I } = mo(), j = uc(), [$, ue] = F(!1), it = Ie([]), be = q(() => H(d, "theme", {}) || {}, [d]), ot = v === ee.EDITING, Ge = v === ee.CHECKING, Bn = S || Ge || w;
4105
4104
  it.current = D;
4106
4105
  const [Lr] = ie(ac);
4107
- se(() => {
4106
+ ne(() => {
4108
4107
  const re = () => {
4109
4108
  document.hidden ? ue(!0) : ue(!1);
4110
4109
  };
@@ -4175,8 +4174,8 @@ const pc = {
4175
4174
  }
4176
4175
  }
4177
4176
  }), Ou = (e) => {
4178
- const [, t] = Gn(), [n, s] = K(!1);
4179
- return se(() => (t(
4177
+ const [, t] = Gn(), [n, s] = F(!1);
4178
+ return ne(() => (t(
4180
4179
  In(e, [
4181
4180
  "apiUrl",
4182
4181
  "usersApiUrl",
@@ -4277,7 +4276,7 @@ const Du = () => {
4277
4276
  console.error("Failed to update metadata");
4278
4277
  }
4279
4278
  });
4280
- }, Sc = V(() => import("./digital-asset-manager-C8udwDBW.js")), ku = ({
4279
+ }, Sc = V(() => import("./digital-asset-manager-D52Jj1Gh.js")), ku = ({
4281
4280
  assetId: e,
4282
4281
  assetUrl: t,
4283
4282
  onChange: n,
@@ -4285,13 +4284,13 @@ const Du = () => {
4285
4284
  placeholder: r = "Select an image",
4286
4285
  disabled: a = !1
4287
4286
  }) => {
4288
- const { t: i } = Pe(), [o, l] = K(!1), d = () => {
4287
+ const { t: i } = Pe(), [o, l] = F(!1), d = () => {
4289
4288
  a || l(!0);
4290
4289
  }, u = () => {
4291
4290
  l(!1);
4292
4291
  }, f = (p) => {
4293
- const T = Array.isArray(p) ? p[0] : p;
4294
- T != null && T.url && n(In(T, ["url", "id"])), l(!1);
4292
+ const A = Array.isArray(p) ? p[0] : p;
4293
+ A != null && A.url && n(In(A, ["url", "id"])), l(!1);
4295
4294
  }, g = () => {
4296
4295
  n({ url: "", id: "" });
4297
4296
  }, h = (t == null ? void 0 : t.startsWith("{{")) && (t == null ? void 0 : t.endsWith("}}"));
@@ -4504,7 +4503,7 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
4504
4503
  n = n.replace(r[0], i);
4505
4504
  }
4506
4505
  return n;
4507
- }, Lc = V(() => import("./shared-json-ld-DHWdJvQd.js")), Uu = ({
4506
+ }, Lc = V(() => import("./shared-json-ld-DFwVZaJ7.js")), Uu = ({
4508
4507
  value: e,
4509
4508
  onChange: t,
4510
4509
  disabled: n = !1,
@@ -4517,8 +4516,8 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
4517
4516
  hasJsonLdForSelectedLang: d,
4518
4517
  copyJsonLDFromDefaultPage: u
4519
4518
  }) => {
4520
- const [f, g] = K("edit"), [h, p] = K(null), [T, S] = K(""), D = Ie(null), [y] = Gn(), w = i === "jsonLD" && H(y, "features.sharedJsonLD", !1), v = i === "jsonLD" && !d && !!u;
4521
- se(() => {
4519
+ const [f, g] = F("edit"), [h, p] = F(null), [A, S] = F(""), D = Ie(null), [y] = Gn(), w = i === "jsonLD" && H(y, "features.sharedJsonLD", !1), v = i === "jsonLD" && !d && !!u;
4520
+ ne(() => {
4522
4521
  e.trim() === "" && t("{}");
4523
4522
  }, [e, t]);
4524
4523
  const U = (B) => {
@@ -4553,7 +4552,7 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
4553
4552
  }
4554
4553
  }
4555
4554
  };
4556
- se(() => {
4555
+ ne(() => {
4557
4556
  const B = fs(e);
4558
4557
  if (B.isValid)
4559
4558
  if (p(null), B.parsed) {
@@ -4675,7 +4674,7 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
4675
4674
  ] })
4676
4675
  ] }),
4677
4676
  /* @__PURE__ */ m(on, { value: "preview", className: "mt-0", children: [
4678
- /* @__PURE__ */ c(Qn, { rows: a, value: T, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
4677
+ /* @__PURE__ */ c(Qn, { rows: a, value: A, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
4679
4678
  /* @__PURE__ */ c("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
4680
4679
  ] }),
4681
4680
  w && /* @__PURE__ */ c(on, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(Lc, {}) }) })
@@ -4701,9 +4700,9 @@ export {
4701
4700
  wu as $,
4702
4701
  E as A,
4703
4702
  Fs as B,
4704
- F as C,
4703
+ K as C,
4705
4704
  ol as D,
4706
- ne as E,
4705
+ se as E,
4707
4706
  Js as F,
4708
4707
  ar as G,
4709
4708
  Wo as H,