@chaibuilder/pages 0.14.0 → 0.14.2

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 (64) hide show
  1. package/dist/{2AITGKQY-BLi5HVHf.cjs → 2AITGKQY-DWDDkd18.cjs} +1 -1
  2. package/dist/{2AITGKQY-iyhQ7kgG.js → 2AITGKQY-DtQPkxBe.js} +2 -2
  3. package/dist/{NCMVHL6D-CKYg8-AM.cjs → NCMVHL6D-6CkVnw0a.cjs} +1 -1
  4. package/dist/{NCMVHL6D-PLvSyK5P.js → NCMVHL6D-CksZXXOw.js} +4 -4
  5. package/dist/{ZDWCUMSJ-CuLkdxY-.js → ZDWCUMSJ-BXQ01VPt.js} +1 -1
  6. package/dist/{ZDWCUMSJ-BJZ_Yi-4.cjs → ZDWCUMSJ-DoM-AA0C.cjs} +1 -1
  7. package/dist/{add-new-language-page--ah9yzN3.cjs → add-new-language-page-BA73lQnm.cjs} +1 -1
  8. package/dist/{add-new-language-page-WM_Ve2vH.js → add-new-language-page-D8iXtyLA.js} +2 -2
  9. package/dist/{add-new-page-Bs_NXM9x.js → add-new-page-DESlqvED.js} +1 -1
  10. package/dist/{add-new-page-CnUo6xzd.cjs → add-new-page-EOMgMSeq.cjs} +1 -1
  11. package/dist/{delete-page-D8xhYESu.js → delete-page-BP1Df8QL.js} +1 -1
  12. package/dist/{delete-page-Cf88UkqJ.cjs → delete-page-ZvnuEow6.cjs} +1 -1
  13. package/dist/{digital-asset-manager-BAFTqxsM.js → digital-asset-manager-Bb81T3mS.js} +146 -146
  14. package/dist/{digital-asset-manager-D_lcprwY.cjs → digital-asset-manager-BxWb1j_y.cjs} +1 -1
  15. package/dist/{duplicate-page-CqXTGmWt.js → duplicate-page-B1j0H7gP.js} +28 -28
  16. package/dist/{duplicate-page-BX1gOez-.cjs → duplicate-page-W5xbmPSC.cjs} +1 -1
  17. package/dist/{dynamic-page-selector-9JIQrcq5.cjs → dynamic-page-selector-BZKJmSx5.cjs} +1 -1
  18. package/dist/{dynamic-page-selector-0TiUnfUg.js → dynamic-page-selector-Crjyco6l.js} +1 -1
  19. package/dist/{index-D7kegQ3M.js → index-DFvsMFVH.js} +919 -912
  20. package/dist/index-Qnh8Lkr0.cjs +5 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +8 -8
  23. package/dist/{json-diff-viewer-C2GK_BDh.js → json-diff-viewer-BGGSLqtx.js} +6 -6
  24. package/dist/{json-diff-viewer-Be-PVOZN.cjs → json-diff-viewer-DRkE-x_z.cjs} +1 -1
  25. package/dist/{lang-panel-CePltxo2.cjs → lang-panel-9T8dIx2p.cjs} +1 -1
  26. package/dist/{lang-panel-CPFS1ssC.js → lang-panel-B3tr2uhr.js} +2 -2
  27. package/dist/{mark-as-template-DeB23sWR.cjs → mark-as-template-DPVPRgbi.cjs} +1 -1
  28. package/dist/{mark-as-template-jdwcgRIB.js → mark-as-template-L9cHzL84.js} +1 -1
  29. package/dist/{no-language-page-content-Dsm2H3pc.cjs → no-language-page-content-Cy_D-3jE.cjs} +1 -1
  30. package/dist/{no-language-page-content-DUM4KxWu.js → no-language-page-content-DP7gmy0s.js} +1 -1
  31. package/dist/{page-creator-BjuYmKfc.js → page-creator-Ctn5ixJE.js} +29 -29
  32. package/dist/{page-creator-DG0LwvL1.cjs → page-creator-DDaI1HYj.cjs} +1 -1
  33. package/dist/{page-lock-request-B9WPmFcd.cjs → page-lock-request-BKrxnEtQ.cjs} +1 -1
  34. package/dist/{page-lock-request-BceB1S-X.js → page-lock-request-CjJFJKL2.js} +3 -3
  35. package/dist/{page-locked-by-dialog-BEWfFLSc.js → page-locked-by-dialog-DmsSmAY2.js} +1 -1
  36. package/dist/{page-locked-by-dialog-2MULM3jh.cjs → page-locked-by-dialog-b25_rn2m.cjs} +1 -1
  37. package/dist/{page-manager-new-BONZN4c5.cjs → page-manager-new-DiZVY7Me.cjs} +1 -1
  38. package/dist/{page-manager-new-DV6A9WFv.js → page-manager-new-EsIg6iQn.js} +28 -28
  39. package/dist/{page-manager-search-and-filter-DIiowi9F.js → page-manager-search-and-filter-Bt4T_dnB.js} +2 -2
  40. package/dist/{page-manager-search-and-filter-3h4URMP_.cjs → page-manager-search-and-filter-CgY2qiXU.cjs} +1 -1
  41. package/dist/{page-revisions-content-BIxeZeND.js → page-revisions-content-CsT6aF2I.js} +7 -7
  42. package/dist/{page-revisions-content-CQbt25XX.cjs → page-revisions-content-DtI8CmtR.cjs} +1 -1
  43. package/dist/{publish-pages-content-im9dPOBM.cjs → publish-pages-content-DpC7RcTw.cjs} +1 -1
  44. package/dist/{publish-pages-content-CdKHrfys.js → publish-pages-content-KAuhOPv0.js} +45 -45
  45. package/dist/{save-to-lib-DOh-850u.cjs → save-to-lib-BGpWGHJo.cjs} +1 -1
  46. package/dist/{save-to-lib-DGII9CEP.js → save-to-lib-CeWaSQdB.js} +23 -23
  47. package/dist/{seo-panel-Bxo4f-a_.js → seo-panel-Dhhpe_7z.js} +1 -1
  48. package/dist/{seo-panel-2VdpoGSg.cjs → seo-panel-JDQ_7bOx.cjs} +1 -1
  49. package/dist/{shared-json-ld-C1OewNgp.cjs → shared-json-ld-BYbdMttx.cjs} +1 -1
  50. package/dist/{shared-json-ld-gbnBFljN.js → shared-json-ld-BliIbNv9.js} +1 -1
  51. package/dist/{slug-input-CfuQV97Z.cjs → slug-input-QxBMijHP.cjs} +1 -1
  52. package/dist/{slug-input-BmcGmc_i.js → slug-input-hJdU8DaF.js} +1 -1
  53. package/dist/{theme-panel-footer-FrY4U8zn.cjs → theme-panel-footer-BZnPvTkM.cjs} +1 -1
  54. package/dist/{theme-panel-footer-D3SwHqGR.js → theme-panel-footer-D2B7iYW2.js} +1 -1
  55. package/dist/{unmark-as-template-CihtTMOb.cjs → unmark-as-template-Byn2RRAp.cjs} +1 -1
  56. package/dist/{unmark-as-template-UwmCCn0u.js → unmark-as-template-Dcpkj7EZ.js} +1 -1
  57. package/dist/{unpublish-page-DzLtZcNw.cjs → unpublish-page-5Fi1wKXb.cjs} +1 -1
  58. package/dist/{unpublish-page-CNwIU6AS.js → unpublish-page-CPLlsfm4.js} +1 -1
  59. package/dist/{use-page-expand-manager-BCFQnVkT.js → use-page-expand-manager-DkyBiNpx.js} +9 -9
  60. package/dist/{use-page-expand-manager-B7JtHdg5.cjs → use-page-expand-manager-To-SsGy3.cjs} +1 -1
  61. package/dist/web-preview-CVvxe5Ll.cjs +1 -0
  62. package/dist/web-preview-YuuoRaZn.js +73 -0
  63. package/package.json +3 -3
  64. package/dist/index-LU0FTfeN.cjs +0 -5
@@ -1,23 +1,23 @@
1
- var Cr = Object.defineProperty;
1
+ var Lr = Object.defineProperty;
2
2
  var qn = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var Lr = (e, t, n) => t in e ? Cr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
- var ve = (e, t, n) => Lr(e, typeof t != "symbol" ? t + "" : t, n), Kn = (e, t, n) => t.has(e) || qn("Cannot " + n);
5
+ var kr = (e, t, n) => t in e ? Lr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
+ var ve = (e, t, n) => kr(e, typeof t != "symbol" ? t + "" : t, n), Kn = (e, t, n) => t.has(e) || qn("Cannot " + n);
7
7
  var _ = (e, t, n) => (Kn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), L = (e, t, n) => t.has(e) ? qn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), C = (e, t, n, s) => (Kn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
8
- import { jsx as c, jsxs as g, Fragment as he } from "react/jsx-runtime";
9
- import { get as K, has as Y, reverse as kr, sortBy as Dr, each as xr, find as ae, isEmpty as me, groupBy as Gr, minBy as Or, noop as As, keyBy as Rr, map as qt, compact as Ts, upperCase as Vn, filter as Ss, includes as Ur, pick as In, keys as Br, pickBy as Mr, endsWith as Fr, isArray as qr, startCase as Kr, isFunction as Vr, cloneDeep as Hr, isEqual as $r } from "lodash-es";
8
+ import { jsx as c, jsxs as m, Fragment as he } from "react/jsx-runtime";
9
+ import { get as H, has as Y, reverse as Dr, sortBy as xr, each as Gr, find as ae, isEmpty as me, groupBy as Or, minBy as Rr, noop as As, keyBy as Ur, map as Kt, compact as Ts, upperCase as Vn, filter as Ss, includes as Br, pick as In, keys as Mr, pickBy as Fr, endsWith as qr, isArray as Kr, startCase as Vr, isFunction as Hr, cloneDeep as $r, isEqual as Qr } from "lodash-es";
10
10
  import * as j from "react";
11
- import Qr, { useMemo as $, useCallback as q, useState as G, useEffect as re, useRef as ct, lazy as V, Suspense as H } from "react";
12
- import { atom as _e, useAtom as se } from "jotai";
13
- import { useMutation as ne, useQuery as ie, useQueryClient as ee, onlineManager as _s, QueryClient as jr, QueryClientProvider as zr } from "@tanstack/react-query";
14
- import { useLanguages as Re, useSavePage as Oe, mergeClasses as Kt, usePermissions as Ps, PERMISSIONS as Wr, useRightPanel as Yr, useChaiFeatureFlag as Jr, useIsPageLoaded as Xr, registerChaiLibrary as Zr, getBlocksFromHTML as ea, registerChaiSidebarPanel as rn, registerChaiFeatureFlag as Hn, registerChaiTopBar as ta, registerChaiMediaManager as na, registerChaiSaveToLibrary as sa, ChaiBuilderEditor as ra } from "@chaibuilder/sdk";
15
- import { toast as z } from "sonner";
16
- import { Tooltip as Wt, TooltipTrigger as Yt, Button as M, TooltipContent as Jt, Sheet as ws, SheetContent as vs, SheetHeader as aa, SheetTitle as ia, SheetDescription as oa, DropdownMenu as Nn, DropdownMenuTrigger as Cn, DropdownMenuContent as Ln, DropdownMenuItem as fe, Separator as la, TooltipProvider as bs, SheetTrigger as ca, Skeleton as kt, Dialog as Is, Card as ua, CardHeader as da, CardTitle as fa, CardDescription as ha, CardContent as ga, Label as $n, Input as Qn, CardFooter as ma, HoverCard as Ea, HoverCardTrigger as pa, HoverCardContent as ya, AlertDialog as Aa, AlertDialogTrigger as Ta, AlertDialogContent as Sa, AlertDialogHeader as _a, AlertDialogTitle as Pa, AlertDialogDescription as wa, AlertDialogFooter as va, AlertDialogCancel as ba, AlertDialogAction as Ia, Popover as Na, PopoverTrigger as Ca, DialogContent as La, DialogHeader as ka, DialogTitle as Da, Tabs as xa, TabsList as Ga, TabsTrigger as an, TabsContent as on, Textarea as jn, Alert as Oa, AlertDescription as Ra } from "@chaibuilder/sdk/ui";
17
- import { LogsIcon as Ua, Folder as Ba, Languages as zn, ChevronDown as mn, Star as Ma, Plus as Ns, History as Fa, Eye as kn, Palette as qa, CheckCircle as Ka, Loader as Xt, Save as Va, Send as Wn, Rocket as Yn, CopyPlusIcon as Ha, Pencil as $a, Power as Qa, Trash as ja, SquareLibrary as Jn, Globe as za, File as Wa, MoreHorizontal as Xn, ExternalLink as Ya, EyeOff as Ja, LanguagesIcon as Xa, User as Za, X as Zn, Trash2 as ei, ImageIcon as es, Code as ti, Share2 as ni, FileCode2 as si, AlertTriangle as ri } from "lucide-react";
18
- import { useRegisteredChaiBlocks as ai, getDefaultBlockProps as ii } from "@chaibuilder/runtime";
19
- import { z as Bt } from "zod";
20
- import { loadWebBlocks as oi } from "@chaibuilder/sdk/web-blocks";
11
+ import jr, { useMemo as $, useCallback as q, useState as G, useEffect as re, useRef as ct, lazy as K, Suspense as V } from "react";
12
+ import { atom as pe, useAtom as ne } from "jotai";
13
+ import { useMutation as se, useQuery as ie, useQueryClient as ee, onlineManager as _s, QueryClient as Wr, QueryClientProvider as zr } from "@tanstack/react-query";
14
+ import { useLanguages as Re, useSavePage as Oe, mergeClasses as Vt, usePermissions as Ps, PERMISSIONS as Yr, useRightPanel as Jr, useChaiFeatureFlag as Xr, useIsPageLoaded as Zr, registerChaiLibrary as ea, getBlocksFromHTML as ta, registerChaiSidebarPanel as rn, registerChaiFeatureFlag as Hn, registerChaiTopBar as na, registerChaiMediaManager as sa, registerChaiSaveToLibrary as ra, ChaiBuilderEditor as aa } from "@chaibuilder/sdk";
15
+ import { toast as W } from "sonner";
16
+ import { Tooltip as Yt, TooltipTrigger as Jt, Button as M, TooltipContent as Xt, Sheet as ws, SheetContent as vs, SheetHeader as ia, SheetTitle as oa, SheetDescription as la, DropdownMenu as Nn, DropdownMenuTrigger as Cn, DropdownMenuContent as Ln, DropdownMenuItem as fe, Separator as ca, TooltipProvider as bs, SheetTrigger as ua, Skeleton as Dt, Dialog as Is, Card as da, CardHeader as fa, CardTitle as ha, CardDescription as ga, CardContent as ma, Label as $n, Input as Qn, CardFooter as Ea, HoverCard as pa, HoverCardTrigger as ya, HoverCardContent as Aa, AlertDialog as Ta, AlertDialogTrigger as Sa, AlertDialogContent as _a, AlertDialogHeader as Pa, AlertDialogTitle as wa, AlertDialogDescription as va, AlertDialogFooter as ba, AlertDialogCancel as Ia, AlertDialogAction as Na, Popover as Ca, PopoverTrigger as La, DialogContent as ka, DialogHeader as Da, DialogTitle as xa, Tabs as Ga, TabsList as Oa, TabsTrigger as an, TabsContent as on, Textarea as jn, Alert as Ra, AlertDescription as Ua } from "@chaibuilder/sdk/ui";
17
+ import { LogsIcon as Ba, Folder as Ma, Languages as Wn, ChevronDown as mn, Star as Fa, Plus as Ns, History as qa, Play as Ka, Palette as Va, CheckCircle as Ha, Loader as ft, Save as $a, Send as zn, Rocket as Yn, CopyPlusIcon as Qa, Pencil as ja, Power as Wa, Trash as za, SquareLibrary as Jn, Globe as Ya, File as Ja, MoreHorizontal as Xn, ExternalLink as Xa, EyeOff as Za, Eye as Cs, LanguagesIcon as ei, User as ti, X as Zn, Trash2 as ni, ImageIcon as es, Code as si, Share2 as ri, FileCode2 as ai, AlertTriangle as ii } from "lucide-react";
18
+ import { useRegisteredChaiBlocks as oi, getDefaultBlockProps as li } from "@chaibuilder/runtime";
19
+ import { z as Mt } from "zod";
20
+ import { loadWebBlocks as ci } from "@chaibuilder/sdk/web-blocks";
21
21
  const y = {
22
22
  GENERATE_SEO_FIELD: "GENERATE_SEO_FIELD",
23
23
  UPDATE_PAGE_METADATA: "UPDATE_PAGE_METADATA",
@@ -75,32 +75,32 @@ const y = {
75
75
  UPDATE_ASSET: "UPDATE_ASSET",
76
76
  GET_ASSETS: "GET_ASSETS",
77
77
  GET_ASSET: "GET_ASSET"
78
- }, li = _e({}), Dn = () => se(li), pe = (e, t) => {
79
- const [n] = Dn();
80
- return $(() => K(n, e, t), [n, e, t]);
81
- }, B = () => pe("apiUrl", "/chai/api"), Zt = () => pe("usersApiUrl", "/chai/users"), $c = () => pe("assetsApiUrl", "/chai/assets"), ci = () => pe("supabaseInstance", null);
82
- let ui = 0;
78
+ }, ui = pe({}), kn = () => ne(ui), ye = (e, t) => {
79
+ const [n] = kn();
80
+ return $(() => H(n, e, t), [n, e, t]);
81
+ }, B = () => ye("apiUrl", "/chai/api"), Zt = () => ye("usersApiUrl", "/chai/users"), zc = () => ye("assetsApiUrl", "/chai/assets"), di = () => ye("supabaseInstance", null);
82
+ let fi = 0;
83
83
  function ts(e, t) {
84
- const n = `atom${++ui}`, s = {
84
+ const n = `atom${++fi}`, s = {
85
85
  toString() {
86
86
  return n;
87
87
  }
88
88
  };
89
- return typeof e == "function" ? s.read = e : (s.init = e, s.read = di, s.write = fi), t && (s.write = t), s;
89
+ return typeof e == "function" ? s.read = e : (s.init = e, s.read = hi, s.write = gi), t && (s.write = t), s;
90
90
  }
91
- function di(e) {
91
+ function hi(e) {
92
92
  return e(this);
93
93
  }
94
- function fi(e, t, n) {
94
+ function gi(e, t, n) {
95
95
  return t(
96
96
  this,
97
97
  typeof n == "function" ? n(e(this)) : n
98
98
  );
99
99
  }
100
- const hi = Symbol(
100
+ const mi = Symbol(
101
101
  ""
102
- ), Cs = (e) => typeof (e == null ? void 0 : e.then) == "function";
103
- function gi(e = () => {
102
+ ), Ls = (e) => typeof (e == null ? void 0 : e.then) == "function";
103
+ function Ei(e = () => {
104
104
  try {
105
105
  return window.localStorage;
106
106
  } catch {
@@ -122,8 +122,8 @@ function gi(e = () => {
122
122
  s = E;
123
123
  }
124
124
  return r;
125
- }, m = (d = (f = e()) == null ? void 0 : f.getItem(l)) != null ? d : null;
126
- return Cs(m) ? m.then(h) : h(m);
125
+ }, g = (d = (f = e()) == null ? void 0 : f.getItem(l)) != null ? d : null;
126
+ return Ls(g) ? g.then(h) : h(g);
127
127
  },
128
128
  setItem: (l, u) => {
129
129
  var f;
@@ -137,13 +137,13 @@ function gi(e = () => {
137
137
  return (u = e()) == null ? void 0 : u.removeItem(l);
138
138
  }
139
139
  }, i = (l) => (u, f, d) => l(u, (h) => {
140
- let m;
140
+ let g;
141
141
  try {
142
- m = JSON.parse(h || "");
142
+ g = JSON.parse(h || "");
143
143
  } catch {
144
- m = d;
144
+ g = d;
145
145
  }
146
- f(m);
146
+ f(g);
147
147
  });
148
148
  let o;
149
149
  try {
@@ -162,8 +162,8 @@ function gi(e = () => {
162
162
  };
163
163
  }), o && (a.subscribe = i(o)), a;
164
164
  }
165
- const mi = gi();
166
- function Ei(e, t, n = mi, s) {
165
+ const pi = Ei();
166
+ function yi(e, t, n = pi, s) {
167
167
  const r = ts(
168
168
  t
169
169
  );
@@ -175,15 +175,15 @@ function Ei(e, t, n = mi, s) {
175
175
  (i) => i(r),
176
176
  (i, o, l) => {
177
177
  const u = typeof l == "function" ? l(i(r)) : l;
178
- return u === hi ? (o(r, t), n.removeItem(e)) : Cs(u) ? u.then((f) => (o(r, f), n.setItem(e, f))) : (o(r, u), n.setItem(e, u));
178
+ return u === mi ? (o(r, t), n.removeItem(e)) : Ls(u) ? u.then((f) => (o(r, f), n.setItem(e, f))) : (o(r, u), n.setItem(e, u));
179
179
  }
180
180
  );
181
181
  }
182
182
  localStorage.removeItem("_chai_user");
183
183
  localStorage.removeItem("__chai__user");
184
- const Ls = "__logged_in_user", pi = Ei(Ls, null), ye = () => {
185
- const [e, t] = se(pi), n = q(() => {
186
- t(null), localStorage.removeItem(Ls);
184
+ const ks = "__logged_in_user", Ai = yi(ks, null), Ae = () => {
185
+ const [e, t] = ne(Ai), n = q(() => {
186
+ t(null), localStorage.removeItem(ks);
187
187
  }, [t]);
188
188
  return {
189
189
  isLoggedIn: !!e,
@@ -209,8 +209,8 @@ if (import.meta.vitest) {
209
209
  });
210
210
  }
211
211
  let qe = null;
212
- function yi() {
213
- const { user: e, setUser: t, logout: n } = ye(), s = Zt(), r = pe("getAccessToken", !1), a = async () => {
212
+ function Ti() {
213
+ const { user: e, setUser: t, logout: n } = Ae(), s = Zt(), r = ye("getAccessToken", !1), a = async () => {
214
214
  if (r === !1 && e && !(!Y(e, "expiresAt") || !Y(e, "accessToken") || !Y(e, "refreshToken")))
215
215
  try {
216
216
  const i = await en(s, {
@@ -232,7 +232,7 @@ function yi() {
232
232
  n(), window.location.reload();
233
233
  }
234
234
  };
235
- return ne({
235
+ return se({
236
236
  mutationFn: async () => {
237
237
  if (qe)
238
238
  return await qe;
@@ -247,20 +247,20 @@ function yi() {
247
247
  }
248
248
  });
249
249
  }
250
- function Ai() {
250
+ function Si() {
251
251
  return qe;
252
252
  }
253
- const ks = () => {
254
- const { user: e, setUser: t } = ye(), { mutateAsync: n } = yi(), s = 60, r = q(() => {
253
+ const Ds = () => {
254
+ const { user: e, setUser: t } = Ae(), { mutateAsync: n } = Ti(), s = 60, r = q(() => {
255
255
  if (!(e != null && e.expiresAt)) return !1;
256
256
  if (!e || !(e != null && e.refreshToken)) return !0;
257
257
  const o = Math.floor(Date.now() / 1e3);
258
258
  return e.expiresAt - o <= s;
259
- }, [e]), i = pe("getAccessToken", async () => {
259
+ }, [e]), i = ye("getAccessToken", async () => {
260
260
  if (!Y(e, "expiresAt") || !Y(e, "accessToken") || !Y(e, "refreshToken"))
261
261
  return (e == null ? void 0 : e.accessToken) || "";
262
262
  if (r()) {
263
- const o = Ai();
263
+ const o = Si();
264
264
  if (o) {
265
265
  const u = await o;
266
266
  return u && t(u), (u == null ? void 0 : u.accessToken) || "";
@@ -280,14 +280,14 @@ const ks = () => {
280
280
  }, [i])
281
281
  };
282
282
  }, R = () => {
283
- const { logout: e } = ye(), { getAccessToken: t } = ks();
283
+ const { logout: e } = Ae(), { getAccessToken: t } = Ds();
284
284
  return q(
285
285
  async (n, s, r = {}) => {
286
286
  const a = await t();
287
287
  if (!a)
288
288
  return console.error("No auth token found"), null;
289
289
  try {
290
- const i = K(s, "action", "").toLowerCase(), o = await en(n + (i ? `?action=${i}` : ""), s, {
290
+ const i = H(s, "action", "").toLowerCase(), o = await en(n + (i ? `?action=${i}` : ""), s, {
291
291
  ...r,
292
292
  Authorization: `Bearer ${a}`
293
293
  });
@@ -336,7 +336,7 @@ const Ue = (e) => {
336
336
  action: y.GET_LANGUAGE_PAGES,
337
337
  data: { id: s }
338
338
  });
339
- return kr(Dr(a, "primaryPage"));
339
+ return Dr(xr(a, "primaryPage"));
340
340
  },
341
341
  enabled: !!s
342
342
  });
@@ -356,17 +356,17 @@ const Ue = (e) => {
356
356
  data: { draft: !0 }
357
357
  })
358
358
  });
359
- }, Ds = (e) => {
359
+ }, xs = (e) => {
360
360
  const { fallbackLang: t } = Re(), { data: n } = Be(), { data: s, isFetching: r } = Ue(), a = $(() => {
361
361
  const i = { [t]: !0 };
362
- return xr(K(n, "languages"), (o) => {
362
+ return Gr(H(n, "languages"), (o) => {
363
363
  const l = ae(s, { lang: o });
364
364
  i[o] = !!l;
365
365
  }), i;
366
366
  }, [t, s, n]);
367
367
  return r || me(e) || e && a[e];
368
368
  };
369
- class Ti {
369
+ class _i {
370
370
  constructor(t, n, s, r) {
371
371
  ve(this, "channelId");
372
372
  ve(this, "supabase");
@@ -410,10 +410,10 @@ class Ti {
410
410
  return t.length > 0 ? t[0] : null;
411
411
  }
412
412
  getPageUserMapping() {
413
- const t = this.getOnlineUsers({}), n = Gr(t, "pageId"), s = {};
413
+ const t = this.getOnlineUsers({}), n = Or(t, "pageId"), s = {};
414
414
  return Object.keys(n).forEach((r) => {
415
415
  var i;
416
- const a = (i = Or(n[r], "onlineAt")) == null ? void 0 : i.userId;
416
+ const a = (i = Rr(n[r], "onlineAt")) == null ? void 0 : i.userId;
417
417
  a !== this.userId && (s[r] = a);
418
418
  }), s;
419
419
  }
@@ -473,20 +473,20 @@ class Ti {
473
473
  }
474
474
  }
475
475
  }
476
- const Si = _e(
476
+ const Pi = pe(
477
477
  null
478
- ), xs = () => se(Si), xn = () => {
479
- const [e] = xs();
478
+ ), Gs = () => ne(Pi), Dn = () => {
479
+ const [e] = Gs();
480
480
  return (e == null ? void 0 : e.slug) || "";
481
481
  };
482
- function _i(e, t) {
482
+ function wi(e, t) {
483
483
  const [n, s] = G(e);
484
484
  return re(() => {
485
485
  const r = setTimeout(() => s(e), t);
486
486
  return () => clearTimeout(r);
487
487
  }, [e, t]), n;
488
488
  }
489
- const Pi = ({ query: e, uuid: t }) => {
489
+ const vi = ({ query: e, uuid: t }) => {
490
490
  const { selectedLang: n, fallbackLang: s } = Re(), { data: r } = oe(), a = r == null ? void 0 : r.pageType, i = B(), o = R(), { data: l, isFetching: u } = ie({
491
491
  queryKey: [y.GET_DYNAMIC_PAGES, e, a, t],
492
492
  staleTime: 60 * 60 * 1e3,
@@ -498,10 +498,10 @@ const Pi = ({ query: e, uuid: t }) => {
498
498
  enabled: !!a
499
499
  }), f = $(() => n === "" ? l.filter((d) => d.lang === "" || d.lang === s) : l.filter((d) => d.lang === n), [n, s, l]);
500
500
  return { allLangPages: l, data: f, isFetching: u };
501
- }, wi = () => {
502
- const { selectedLang: e, fallbackLang: t } = Re(), [n, s] = xs(), [r, a] = G(""), i = _i(r, 500), { allLangPages: o, data: l, isFetching: u } = Pi({ query: i }), f = q((m) => s(m), [s]), d = q((m) => a(m), [a]), h = q(() => {
501
+ }, bi = () => {
502
+ const { selectedLang: e, fallbackLang: t } = Re(), [n, s] = Gs(), [r, a] = G(""), i = wi(r, 500), { allLangPages: o, data: l, isFetching: u } = vi({ query: i }), f = q((g) => s(g), [s]), d = q((g) => a(g), [a]), h = q(() => {
503
503
  if (!n) return;
504
- const m = !(n != null && n.primaryPage), E = e.length === 0, S = m ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, p = o.filter(
504
+ const g = !(n != null && n.primaryPage), E = e.length === 0, S = g ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, p = o.filter(
505
505
  (A) => (A == null ? void 0 : A.primaryPage) === S || A.id === S
506
506
  ).find((A) => E ? A.lang === e || A.lang === t : A.lang === e);
507
507
  s(p || n);
@@ -517,16 +517,16 @@ const Pi = ({ query: e, uuid: t }) => {
517
517
  updateSearchQuery: d,
518
518
  onChangeLanguage: h
519
519
  };
520
- }, vi = _e({ lastSaved: void 0 }), Gn = () => se(vi), oe = () => {
520
+ }, Ii = pe({ lastSaved: void 0 }), xn = () => ne(Ii), oe = () => {
521
521
  const [e] = le(), t = e.get("page"), { data: n, isFetching: s } = Ue();
522
522
  return { data: $(() => ({ ...ae(n, { id: t }) || {} }), [n, t]), isFetching: s };
523
523
  }, Ie = () => {
524
524
  const [e] = le(), t = e.get("lang") ?? "", { data: n, isFetching: s } = Ue();
525
525
  return { data: $(() => ae(n, { lang: t }) || {}, [n, t]), isFetching: s };
526
- }, bi = _e({}), Ii = () => se(bi), Ni = () => {
527
- const { data: e } = Ie(), t = xn(), n = pe("getLiveUrl", As), s = e == null ? void 0 : e.slug, r = n(s || "/");
526
+ }, Ni = pe({}), Ci = () => ne(Ni), Li = () => {
527
+ const { data: e } = Ie(), t = Dn(), n = ye("getLiveUrl", As), s = e == null ? void 0 : e.slug, r = n(s || "/");
528
528
  return t ? r + t : r;
529
- }, Ci = (e) => {
529
+ }, ki = (e) => {
530
530
  const t = Zt(), n = R();
531
531
  return ie({
532
532
  queryKey: [y.GET_CHAI_USER, e],
@@ -540,14 +540,14 @@ const Pi = ({ query: e, uuid: t }) => {
540
540
  enabled: !me(e),
541
541
  staleTime: "static"
542
542
  });
543
- }, Li = _e({
543
+ }, Di = pe({
544
544
  status: "checking",
545
545
  requestedBy: "",
546
546
  isTakeOverRequested: !1,
547
547
  requestingClientId: "",
548
548
  isActiveInOtherTab: !1
549
- }), ki = _e(""), Di = _e(null), On = _e({}), Qc = () => se(On), Ne = () => {
550
- const [e] = le(), t = e.get("page"), [n, s] = se(Li), [r, a] = se(Di), [i, o] = se(ki), [l] = se(On);
549
+ }), xi = pe(""), Gi = pe(null), Gn = pe({}), Yc = () => ne(Gn), Ne = () => {
550
+ const [e] = le(), t = e.get("page"), [n, s] = ne(Di), [r, a] = ne(Gi), [i, o] = ne(xi), [l] = ne(Gn);
551
551
  return {
552
552
  pageLock: n,
553
553
  pageToUser: l,
@@ -560,11 +560,11 @@ const Pi = ({ query: e, uuid: t }) => {
560
560
  currentEditor: l[t || ""],
561
561
  isLocked: t && n.status === "locked"
562
562
  };
563
- }, xi = () => {
564
- const e = ci(), { data: t } = oe(), { user: n } = ye(), s = t == null ? void 0 : t.id, { data: r } = Be(), { pageLock: a, setPageLock: i, setLockingStatus: o, realtimeInstance: l, setRealtimeInstance: u } = Ne(), [, f] = se(On), d = ct(!1), h = ct(a), m = ct(!1);
563
+ }, Oi = () => {
564
+ const e = di(), { data: t } = oe(), { user: n } = Ae(), s = t == null ? void 0 : t.id, { data: r } = Be(), { pageLock: a, setPageLock: i, setLockingStatus: o, realtimeInstance: l, setRealtimeInstance: u } = Ne(), [, f] = ne(Gn), d = ct(!1), h = ct(a), g = ct(!1);
565
565
  return re(() => {
566
- if (n != null && n.id && e && !l && (r != null && r.appKey) && !m.current) {
567
- m.current = !0;
566
+ if (n != null && n.id && e && !l && (r != null && r.appKey) && !g.current) {
567
+ g.current = !0;
568
568
  const E = async (T, p) => {
569
569
  var A, w;
570
570
  switch (T) {
@@ -625,7 +625,7 @@ const Pi = ({ query: e, uuid: t }) => {
625
625
  * - update state for editing page
626
626
  */
627
627
  case "TAKE_OVER_REQUEST_ACCEPTED":
628
- p != null && p.isTakingOverFromAnotherTab || (o("take_over_request_accepted"), z.success("Your Page Take Over Request Accepted", { position: "top-center" })), i({
628
+ p != null && p.isTakingOverFromAnotherTab || (o("take_over_request_accepted"), W.success("Your Page Take Over Request Accepted", { position: "top-center" })), i({
629
629
  ...h == null ? void 0 : h.current,
630
630
  status: "checking",
631
631
  requestedBy: "",
@@ -645,7 +645,7 @@ const Pi = ({ query: e, uuid: t }) => {
645
645
  });
646
646
  break;
647
647
  }
648
- }, S = new Ti(
648
+ }, S = new _i(
649
649
  e,
650
650
  r == null ? void 0 : r.appKey,
651
651
  n == null ? void 0 : n.id,
@@ -667,8 +667,8 @@ const Pi = ({ query: e, uuid: t }) => {
667
667
  }, o(""), i(h.current), l == null || l.leavePage());
668
668
  };
669
669
  }, [s, l]), a == null ? void 0 : a.status;
670
- }, Gi = () => {
671
- const { data: e } = oe(), { user: t } = ye(), n = e == null ? void 0 : e.id, { pageLock: s, setPageLock: r, realtimeInstance: a } = Ne(), { savePageAsync: i } = Oe(), o = q(() => {
670
+ }, Ri = () => {
671
+ const { data: e } = oe(), { user: t } = Ae(), n = e == null ? void 0 : e.id, { pageLock: s, setPageLock: r, realtimeInstance: a } = Ne(), { savePageAsync: i } = Oe(), o = q(() => {
672
672
  !a || !n || !(t != null && t.id) || (r({ ...s, isTakeOverRequested: !0 }), a == null || a.sendEvent("TAKE_OVER_REQUESTED"));
673
673
  }, [a, n, t == null ? void 0 : t.id, r, s]), l = q(async () => {
674
674
  !a || !n || !(t != null && t.id) || (await i(), a == null || a.sendEvent("TAKE_OVER_REQUEST_ACCEPTED", {
@@ -698,19 +698,19 @@ const Pi = ({ query: e, uuid: t }) => {
698
698
  rejectTakeOver: u,
699
699
  requestTakeOver: o
700
700
  };
701
- }, Oi = V(() => import("./no-language-page-content-DUM4KxWu.js")), Ri = V(() => import("./page-locked-by-dialog-BEWfFLSc.js")), ln = V(() => import("./page-lock-request-BceB1S-X.js")), Ui = ({ isFetchingPage: e }) => {
702
- const { pageLock: t, requestTakeOver: n } = Gi(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ne(), { data: o, isFetching: l } = Ci(s), [u] = le(), f = u.get("page"), [d] = Gn(), h = ee(), m = q(() => {
701
+ }, Ui = K(() => import("./no-language-page-content-DP7gmy0s.js")), Bi = K(() => import("./page-locked-by-dialog-DmsSmAY2.js")), ln = K(() => import("./page-lock-request-CjJFJKL2.js")), Mi = ({ isFetchingPage: e }) => {
702
+ const { pageLock: t, requestTakeOver: n } = Ri(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ne(), { data: o, isFetching: l } = ki(s), [u] = le(), f = u.get("page"), [d] = xn(), h = ee(), g = q(() => {
703
703
  n();
704
704
  }, [n]);
705
- return !f || e || !i || (t == null ? void 0 : t.status) === "checking" ? null : t != null && t.requestedBy ? /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
705
+ return !f || e || !i || (t == null ? void 0 : t.status) === "checking" ? null : t != null && t.requestedBy ? /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
706
706
  ln,
707
707
  {
708
- lockingStatus: t == null ? void 0 : t.requestedBy,
708
+ lockingStatus: "",
709
709
  onContinue: () => {
710
710
  n();
711
711
  }
712
712
  }
713
- ) }) : (t == null ? void 0 : t.status) !== "locked" ? r === "take_over_request_accepted" || r === "can_edit_now" ? /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
713
+ ) }) : (t == null ? void 0 : t.status) !== "locked" ? r === "take_over_request_accepted" || r === "can_edit_now" ? /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
714
714
  ln,
715
715
  {
716
716
  lockingStatus: r,
@@ -720,23 +720,23 @@ const Pi = ({ query: e, uuid: t }) => {
720
720
  }), a("");
721
721
  }
722
722
  }
723
- ) }) : null : t != null && t.isActiveInOtherTab ? /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(ln, { lockingStatus: "page_is_active_in_other_tab", onContinue: n }) }) : /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
724
- Ri,
723
+ ) }) : null : t != null && t.isActiveInOtherTab ? /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(ln, { lockingStatus: "page_is_active_in_other_tab", onContinue: n }) }) : /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
724
+ Bi,
725
725
  {
726
726
  ...o,
727
727
  isFetchingUserInfo: l,
728
728
  name: (o == null ? void 0 : o.name) || "Unknown User",
729
729
  email: (o == null ? void 0 : o.email) || "",
730
730
  lastSaved: (d == null ? void 0 : d.lastSaved) || "",
731
- onTakeOver: m,
731
+ onTakeOver: g,
732
732
  realtimePageLockEnabled: i,
733
733
  isRequestRejected: r === "take_over_request_rejected"
734
734
  }
735
735
  ) });
736
- }, Bi = () => {
736
+ }, Fi = () => {
737
737
  const [e] = le(), t = e.get("lang");
738
- return Ds(t) ? null : /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(Oi, {}) });
739
- }, Dt = {
738
+ return xs(t) ? null : /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Ui, {}) });
739
+ }, xt = {
740
740
  ab: "Abkhazian",
741
741
  aa: "Afar",
742
742
  af: "Afrikaans",
@@ -925,17 +925,17 @@ const Pi = ({ query: e, uuid: t }) => {
925
925
  za: "Zhuang, Chuang",
926
926
  zu: "Zulu"
927
927
  };
928
- function Gs(e, t, n = !1) {
928
+ function Os(e, t, n = !1) {
929
929
  const s = e.toString() ? `?${e.toString()}` : "/";
930
930
  n ? window.history.replaceState(null, "", s) : window.history.pushState({}, "", s), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
931
931
  }
932
- const Rn = _e(null), Un = () => {
932
+ const On = pe(null), Rn = () => {
933
933
  const { data: e } = Be();
934
934
  return $(
935
935
  () => (e == null ? void 0 : e.fallbackLang) || "en",
936
936
  [e]
937
937
  );
938
- }, Os = () => {
938
+ }, Rs = () => {
939
939
  const e = R(), t = B();
940
940
  return ie({
941
941
  queryKey: [y.GET_WEBSITE_PAGES],
@@ -943,8 +943,8 @@ const Rn = _e(null), Un = () => {
943
943
  queryFn: async () => e(t, { action: y.GET_WEBSITE_PAGES }) || [],
944
944
  placeholderData: (n) => n || []
945
945
  });
946
- }, jc = (e) => {
947
- const t = R(), n = B(), s = Un();
946
+ }, Jc = (e) => {
947
+ const t = R(), n = B(), s = Rn();
948
948
  return ie({
949
949
  queryKey: [y.GET_WEBSITE_PAGES, e, s],
950
950
  staleTime: 1e3 * 60 * 5,
@@ -952,15 +952,15 @@ const Rn = _e(null), Un = () => {
952
952
  queryFn: async () => {
953
953
  if (s === e) return {};
954
954
  const r = await t(n, { action: y.GET_WEBSITE_PAGES, data: { lang: e } }) || [];
955
- return Rr(
956
- qt(r, (a) => ({ ...a, lang: e })),
955
+ return Ur(
956
+ Kt(r, (a) => ({ ...a, lang: e })),
957
957
  "primaryPage"
958
958
  );
959
959
  },
960
960
  placeholderData: (r) => r || {}
961
961
  });
962
- }, Mi = V(() => import("./page-manager-new-DV6A9WFv.js")), Rs = ({ children: e }) => {
963
- const [t, n] = le(), s = t.get("page"), { data: r, isFetching: a } = oe(), { data: i, isFetching: o } = Os(), [l, u] = G(!1), [f, d] = G(!0), { savePage: h } = Oe(), m = !!s && !me(r), E = $(() => {
962
+ }, qi = K(() => import("./page-manager-new-EsIg6iQn.js")), Us = ({ children: e }) => {
963
+ const [t, n] = le(), s = t.get("page"), { data: r, isFetching: a } = oe(), { data: i, isFetching: o } = Rs(), [l, u] = G(!1), [f, d] = G(!0), { savePage: h } = Oe(), g = !!s && !me(r), E = $(() => {
964
964
  if (!i || o) return !1;
965
965
  const A = i.find((w) => w.slug === "/");
966
966
  return A == null ? void 0 : A.id;
@@ -968,49 +968,49 @@ const Rn = _e(null), Un = () => {
968
968
  re(() => {
969
969
  if (o || !E || i.some((D) => D.id === s)) return;
970
970
  const w = new URLSearchParams({ page: E });
971
- Gs(w, n), !o && i && d(!1);
971
+ Os(w, n), !o && i && d(!1);
972
972
  }, [s, o, i, E, n]);
973
973
  const S = !f && !s, T = !f && !a && me(r), p = l || S || T;
974
- return /* @__PURE__ */ g(he, { children: [
975
- /* @__PURE__ */ c("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ c("div", { className: "relative", children: /* @__PURE__ */ g(Wt, { children: [
974
+ return /* @__PURE__ */ m(he, { children: [
975
+ /* @__PURE__ */ c("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ c("div", { className: "relative", children: /* @__PURE__ */ m(Yt, { children: [
976
976
  /* @__PURE__ */ c(
977
- Yt,
977
+ Jt,
978
978
  {
979
979
  asChild: !0,
980
980
  onClick: () => {
981
981
  h(), u(!0);
982
982
  },
983
- children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(Ua, { className: "h-4 w-4" }) }, "template-viewer")
983
+ children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(Ba, { className: "h-4 w-4" }) }, "template-viewer")
984
984
  }
985
985
  ),
986
- /* @__PURE__ */ c(Jt, { side: "right", children: /* @__PURE__ */ c("p", { children: "Open pages manager" }) })
986
+ /* @__PURE__ */ c(Xt, { side: "right", children: /* @__PURE__ */ c("p", { children: "Open pages manager" }) })
987
987
  ] }) }) }),
988
- /* @__PURE__ */ c(ws, { open: p, onOpenChange: (A) => !A && m && u(!1), children: /* @__PURE__ */ g(
988
+ /* @__PURE__ */ c(ws, { open: p, onOpenChange: (A) => !A && g && u(!1), children: /* @__PURE__ */ m(
989
989
  vs,
990
990
  {
991
991
  side: "left",
992
992
  "aria-describedby": "pages-manager-description",
993
- className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${m ? "" : "sheet-hide-close-btn"}`,
993
+ className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${g ? "" : "sheet-hide-close-btn"}`,
994
994
  children: [
995
- /* @__PURE__ */ g(aa, { className: "mb-3 px-4 pt-4", children: [
996
- /* @__PURE__ */ g(ia, { className: "flex items-center gap-2 text-sm font-semibold", children: [
997
- /* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(Ba, { className: "h-4 w-4" }) }),
998
- /* @__PURE__ */ g("div", { className: "flex flex-col", children: [
995
+ /* @__PURE__ */ m(ia, { className: "mb-3 px-4 pt-4", children: [
996
+ /* @__PURE__ */ m(oa, { className: "flex items-center gap-2 text-sm font-semibold", children: [
997
+ /* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(Ma, { className: "h-4 w-4" }) }),
998
+ /* @__PURE__ */ m("div", { className: "flex flex-col", children: [
999
999
  /* @__PURE__ */ c("span", { className: "text-sm font-semibold", children: "Pages" }),
1000
1000
  /* @__PURE__ */ c("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: "Manage your site structure" })
1001
1001
  ] })
1002
1002
  ] }),
1003
- /* @__PURE__ */ c(oa, { className: "sr-only", children: "Manage your site structure" })
1003
+ /* @__PURE__ */ c(la, { className: "sr-only", children: "Manage your site structure" })
1004
1004
  ] }),
1005
- /* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: p && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(Mi, { close: () => u(!1) }) }) })
1005
+ /* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: p && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(qi, { close: () => u(!1) }) }) })
1006
1006
  ]
1007
1007
  }
1008
1008
  ) })
1009
1009
  ] });
1010
- }, Fi = V(() => import("./add-new-language-page-WM_Ve2vH.js")), qi = () => {
1011
- const e = pe("topLeftCorner", null);
1012
- return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Qr.createElement(e, {}) }) : null;
1013
- }, Ki = ({
1010
+ }, Ki = K(() => import("./add-new-language-page-D8iXtyLA.js")), Vi = () => {
1011
+ const e = ye("topLeftCorner", null);
1012
+ return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: jr.createElement(e, {}) }) : null;
1013
+ }, Hi = ({
1014
1014
  showAdd: e = !0,
1015
1015
  variant: t = "ghost"
1016
1016
  }) => {
@@ -1019,13 +1019,13 @@ const Rn = _e(null), Un = () => {
1019
1019
  const T = new URLSearchParams(window.location.search), p = T.get("lang");
1020
1020
  p && (s.includes(p) ? a(p) : (T.delete("lang"), o(T), a("")));
1021
1021
  }, [s, o, a]);
1022
- const [, u] = se(Rn), { data: f } = oe(), { data: d } = Be(), { data: h } = Ue(), m = $(() => {
1022
+ const [, u] = ne(On), { data: f } = oe(), { data: d } = Be(), { data: h } = Ue(), g = $(() => {
1023
1023
  const T = Ts(
1024
- qt(K(d, "languages"), (p) => {
1024
+ Kt(H(d, "languages"), (p) => {
1025
1025
  const A = ae(h, { lang: p });
1026
1026
  return {
1027
1027
  key: p,
1028
- value: K(Dt, p, p),
1028
+ value: H(xt, p, p),
1029
1029
  isLangPageAdded: !!A
1030
1030
  };
1031
1031
  })
@@ -1033,7 +1033,7 @@ const Rn = _e(null), Un = () => {
1033
1033
  return [
1034
1034
  {
1035
1035
  key: n,
1036
- value: K(Dt, n),
1036
+ value: H(xt, n),
1037
1037
  isLangPageAdded: !0
1038
1038
  },
1039
1039
  ...T
@@ -1054,14 +1054,14 @@ const Rn = _e(null), Un = () => {
1054
1054
  }, S = (T) => {
1055
1055
  a(T);
1056
1056
  const p = new URLSearchParams(window.location.search);
1057
- T === n ? p.delete("lang") : p.set("lang", T), Gs(p, o);
1057
+ T === n ? p.delete("lang") : p.set("lang", T), Os(p, o);
1058
1058
  };
1059
- return me(s) ? null : l ? /* @__PURE__ */ g(M, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
1060
- /* @__PURE__ */ c(zn, { className: "h-4 w-4" }),
1061
- K(Dt, i, i),
1059
+ return me(s) ? null : l ? /* @__PURE__ */ m(M, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
1060
+ /* @__PURE__ */ c(Wn, { className: "h-4 w-4" }),
1061
+ H(xt, i, i),
1062
1062
  /* @__PURE__ */ c(mn, { className: "h-4 w-4" })
1063
- ] }) : /* @__PURE__ */ c(he, { children: /* @__PURE__ */ g(Nn, { children: [
1064
- /* @__PURE__ */ c(Cn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ g(
1063
+ ] }) : /* @__PURE__ */ c(he, { children: /* @__PURE__ */ m(Nn, { children: [
1064
+ /* @__PURE__ */ c(Cn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
1065
1065
  M,
1066
1066
  {
1067
1067
  disabled: !!l,
@@ -1069,27 +1069,27 @@ const Rn = _e(null), Un = () => {
1069
1069
  size: "sm",
1070
1070
  className: "ml-px h-max gap-2 py-1.5",
1071
1071
  children: [
1072
- /* @__PURE__ */ c(zn, { className: "h-4 w-4" }),
1073
- K(Dt, i, i),
1072
+ /* @__PURE__ */ c(Wn, { className: "h-4 w-4" }),
1073
+ H(xt, i, i),
1074
1074
  /* @__PURE__ */ c(mn, { className: "h-4 w-4" })
1075
1075
  ]
1076
1076
  }
1077
1077
  ) }),
1078
- /* @__PURE__ */ g(Ln, { className: "space-y-1 border-border", children: [
1079
- qt(
1080
- m.filter((T) => T.isLangPageAdded),
1081
- (T) => /* @__PURE__ */ g(
1078
+ /* @__PURE__ */ m(Ln, { className: "space-y-1 border-border", children: [
1079
+ Kt(
1080
+ g.filter((T) => T.isLangPageAdded),
1081
+ (T) => /* @__PURE__ */ m(
1082
1082
  fe,
1083
1083
  {
1084
- className: Kt(
1084
+ className: Vt(
1085
1085
  "flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
1086
1086
  T.key === i && "!bg-gray-200 text-gray-700"
1087
1087
  ),
1088
1088
  onClick: () => E(T.key),
1089
1089
  children: [
1090
1090
  /* @__PURE__ */ c("div", { className: "text-slate-600", children: T.value }),
1091
- T.key === n && /* @__PURE__ */ g("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
1092
- /* @__PURE__ */ c(Ma, { fill: "orange", className: "h-2 w-2" }),
1091
+ T.key === n && /* @__PURE__ */ m("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
1092
+ /* @__PURE__ */ c(Fa, { fill: "orange", className: "h-2 w-2" }),
1093
1093
  "Primary"
1094
1094
  ] })
1095
1095
  ]
@@ -1097,9 +1097,9 @@ const Rn = _e(null), Un = () => {
1097
1097
  T.value
1098
1098
  )
1099
1099
  ),
1100
- e && !me(m.filter((T) => !T.isLangPageAdded)) && /* @__PURE__ */ g(he, { children: [
1101
- /* @__PURE__ */ c(la, {}),
1102
- /* @__PURE__ */ g(
1100
+ e && !me(g.filter((T) => !T.isLangPageAdded)) && /* @__PURE__ */ m(he, { children: [
1101
+ /* @__PURE__ */ c(ca, {}),
1102
+ /* @__PURE__ */ m(
1103
1103
  M,
1104
1104
  {
1105
1105
  size: "sm",
@@ -1121,13 +1121,13 @@ const Rn = _e(null), Un = () => {
1121
1121
  ] })
1122
1122
  ] }) });
1123
1123
  };
1124
- function Vi() {
1125
- const [e, t] = se(Rn);
1126
- return /* @__PURE__ */ g("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
1127
- /* @__PURE__ */ c(qi, {}),
1128
- /* @__PURE__ */ c(Rs, {}),
1129
- e && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
1130
- Fi,
1124
+ function $i() {
1125
+ const [e, t] = ne(On);
1126
+ return /* @__PURE__ */ m("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
1127
+ /* @__PURE__ */ c(Vi, {}),
1128
+ /* @__PURE__ */ c(Us, {}),
1129
+ e && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
1130
+ Ki,
1131
1131
  {
1132
1132
  isOpen: !0,
1133
1133
  id: e == null ? void 0 : e.id,
@@ -1139,31 +1139,31 @@ function Vi() {
1139
1139
  ) })
1140
1140
  ] });
1141
1141
  }
1142
- function Hi() {
1143
- return /* @__PURE__ */ c("div", { className: "mt-2 space-y-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ g("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
1144
- /* @__PURE__ */ g("div", { className: "flex-1 space-y-1", children: [
1145
- /* @__PURE__ */ c(kt, { className: "h-4 w-3/4" }),
1146
- /* @__PURE__ */ c(kt, { className: "h-3 w-1/2" }),
1147
- /* @__PURE__ */ c(kt, { className: "mt-1 h-5 w-20" })
1142
+ function Qi() {
1143
+ return /* @__PURE__ */ c("div", { className: "mt-2 space-y-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ m("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
1144
+ /* @__PURE__ */ m("div", { className: "flex-1 space-y-1", children: [
1145
+ /* @__PURE__ */ c(Dt, { className: "h-4 w-3/4" }),
1146
+ /* @__PURE__ */ c(Dt, { className: "h-3 w-1/2" }),
1147
+ /* @__PURE__ */ c(Dt, { className: "mt-1 h-5 w-20" })
1148
1148
  ] }),
1149
- /* @__PURE__ */ c(kt, { className: "h-8 w-8 rounded-full" })
1149
+ /* @__PURE__ */ c(Dt, { className: "h-8 w-8 rounded-full" })
1150
1150
  ] }, t)) });
1151
1151
  }
1152
- const $i = j.lazy(() => import("./page-revisions-content-BIxeZeND.js"));
1153
- function Qi() {
1152
+ const ji = j.lazy(() => import("./page-revisions-content-CsT6aF2I.js"));
1153
+ function Wi() {
1154
1154
  const [e, t] = j.useState(!1);
1155
- return /* @__PURE__ */ c(bs, { children: /* @__PURE__ */ g(Wt, { children: [
1156
- /* @__PURE__ */ g(ws, { open: e, onOpenChange: t, children: [
1157
- /* @__PURE__ */ c(ca, { asChild: !0, children: /* @__PURE__ */ c(Yt, { asChild: !0, children: /* @__PURE__ */ g("span", { className: "flex items-center gap-2", children: [
1158
- /* @__PURE__ */ g(M, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
1159
- /* @__PURE__ */ c(Fa, { className: "h-4 w-4" }),
1155
+ return /* @__PURE__ */ c(bs, { children: /* @__PURE__ */ m(Yt, { delayDuration: 0, children: [
1156
+ /* @__PURE__ */ m(ws, { open: e, onOpenChange: t, children: [
1157
+ /* @__PURE__ */ c(ua, { asChild: !0, children: /* @__PURE__ */ c(Jt, { asChild: !0, children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2", children: [
1158
+ /* @__PURE__ */ m(M, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
1159
+ /* @__PURE__ */ c(qa, { className: "h-4 w-4" }),
1160
1160
  /* @__PURE__ */ c("span", { className: "sr-only", children: "View revision history" })
1161
1161
  ] }),
1162
1162
  /* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
1163
1163
  ] }) }) }),
1164
- /* @__PURE__ */ c(vs, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(H, { fallback: /* @__PURE__ */ c(Hi, {}), children: /* @__PURE__ */ c($i, { isOpen: e }) }) })
1164
+ /* @__PURE__ */ c(vs, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(V, { fallback: /* @__PURE__ */ c(Qi, {}), children: /* @__PURE__ */ c(ji, { isOpen: e }) }) })
1165
1165
  ] }),
1166
- /* @__PURE__ */ c(Jt, { side: "bottom", children: /* @__PURE__ */ c("p", { children: "Revision history" }) })
1166
+ /* @__PURE__ */ c(Xt, { side: "bottom", children: /* @__PURE__ */ c("p", { children: "Revision history" }) })
1167
1167
  ] }) });
1168
1168
  }
1169
1169
  const cn = ({
@@ -1175,7 +1175,8 @@ const cn = ({
1175
1175
  const { hasPermission: r } = Ps();
1176
1176
  return e && !r(e) || t && !t.some((a) => r(a)) ? s : n;
1177
1177
  }, X = {
1178
- PREVIEW: "Preview",
1178
+ TOGGLE_PREVIEW: "Toggle Preview",
1179
+ OPEN_PREVIEW_IN_NEW_TAB: "Open preview in new tab",
1179
1180
  THEME: "Theme",
1180
1181
  SAVEDRAFT: "Save draft",
1181
1182
  SAVING: "Saving",
@@ -1223,7 +1224,7 @@ const cn = ({
1223
1224
  GLOBAL_BLOCK_PUBLISH_SUCCESS: "Global block published successfully.",
1224
1225
  PAGES_PUBLISH_SUCCESS: "Your changes have been published successfully.",
1225
1226
  SLUG_CHANGE_SUCCESS: "Slug changed successfully."
1226
- }, ji = {
1227
+ }, zi = {
1227
1228
  SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
1228
1229
  }, Ce = () => {
1229
1230
  const e = B(), t = R();
@@ -1233,12 +1234,12 @@ const cn = ({
1233
1234
  placeholderData: [],
1234
1235
  queryFn: async () => t(e, { action: y.GET_PAGE_TYPES })
1235
1236
  });
1236
- }, zi = (e) => {
1237
+ }, Yi = (e) => {
1237
1238
  const { data: t } = Ce();
1238
1239
  return $(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
1239
- }, Wi = () => {
1240
+ }, Ji = () => {
1240
1241
  const e = B(), t = R();
1241
- return ne({
1242
+ return se({
1242
1243
  mutationFn: async ({ pageType: n, query: s }) => {
1243
1244
  try {
1244
1245
  return t(e, {
@@ -1253,9 +1254,9 @@ const cn = ({
1253
1254
  }
1254
1255
  }
1255
1256
  });
1256
- }, zc = () => {
1257
+ }, Xc = () => {
1257
1258
  const e = B(), t = ee(), n = R(), { data: s } = Ce();
1258
- return ne({
1259
+ return se({
1259
1260
  mutationFn: async (r) => await n(e, {
1260
1261
  action: y.CREATE_PAGE,
1261
1262
  data: r
@@ -1270,18 +1271,18 @@ const cn = ({
1270
1271
  queryKey: [y.GET_WEBSITE_PAGES]
1271
1272
  });
1272
1273
  const i = a.template ? `Page created from "${a.template.name}" template` : a.hasSlug === !1 ? "New " + ((o = ae(s, { key: a.pageType })) == null ? void 0 : o.name) + " added successfully" : "New page added successfully";
1273
- z.success(i);
1274
+ W.success(i);
1274
1275
  },
1275
1276
  onError: (r, a) => {
1276
1277
  const i = ae(s, { key: a.pageType });
1277
- z.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
1278
- description: K(ji, r.message, r.message)
1278
+ W.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
1279
+ description: H(zi, r.message, r.message)
1279
1280
  });
1280
1281
  }
1281
1282
  });
1282
- }, Wc = () => {
1283
+ }, Zc = () => {
1283
1284
  const e = B(), t = ee(), n = R(), { data: s } = Ie(), { data: r } = Ce();
1284
- return ne({
1285
+ return se({
1285
1286
  mutationFn: async (a) => await n(e, {
1286
1287
  action: y.UPDATE_PAGE,
1287
1288
  data: a
@@ -1299,21 +1300,21 @@ const cn = ({
1299
1300
  },
1300
1301
  onError: (a, i) => {
1301
1302
  const o = ae(r, { key: i.pageType });
1302
- z.error(`Failed to update ${o != null && o.hasSlug ? "page" : o.name}.`, {
1303
+ W.error(`Failed to update ${o != null && o.hasSlug ? "page" : o.name}.`, {
1303
1304
  description: a.message
1304
1305
  });
1305
1306
  }
1306
1307
  });
1307
- }, Yc = () => {
1308
+ }, eu = () => {
1308
1309
  const e = B(), t = ee(), n = R(), { data: s } = Ce();
1309
- return ne({
1310
+ return se({
1310
1311
  mutationFn: async (r) => n(e, {
1311
1312
  action: y.DELETE_PAGE,
1312
1313
  data: { id: r == null ? void 0 : r.id }
1313
1314
  }),
1314
1315
  onSuccess: (r, a) => {
1315
1316
  if (r.code === "PAGE_LOCKED") {
1316
- z.error("Delete not allowed", {
1317
+ W.error("Delete not allowed", {
1317
1318
  description: "Page is currently being edited by another user."
1318
1319
  });
1319
1320
  return;
@@ -1328,14 +1329,14 @@ const cn = ({
1328
1329
  },
1329
1330
  onError: (r, a) => {
1330
1331
  const i = ae(s, { key: a.pageType });
1331
- z.error(`Failed to delete ${i != null && i.hasSlug ? "page" : i.name}.`, {
1332
+ W.error(`Failed to delete ${i != null && i.hasSlug ? "page" : i.name}.`, {
1332
1333
  description: r.message
1333
1334
  });
1334
1335
  }
1335
1336
  });
1336
- }, Jc = () => {
1337
+ }, tu = () => {
1337
1338
  const e = B(), t = ee(), n = R(), { data: s } = Ce();
1338
- return ne({
1339
+ return se({
1339
1340
  mutationFn: async (r) => n(e, {
1340
1341
  action: y.TAKE_OFFLINE,
1341
1342
  data: { id: r == null ? void 0 : r.id }
@@ -1347,20 +1348,20 @@ const cn = ({
1347
1348
  queryKey: [y.GET_WEBSITE_PAGES]
1348
1349
  });
1349
1350
  const i = ae(s, { key: a.pageType });
1350
- z.success(
1351
+ W.success(
1351
1352
  i != null && i.hasSlug ? X.PAGE_UNPUBLISH_SUCCESS : "New " + i.name + " added successfully."
1352
1353
  );
1353
1354
  },
1354
1355
  onError: (r, a) => {
1355
1356
  const i = ae(s, { key: a.pageType });
1356
- z.error(`Failed to take offline ${i != null && i.hasSlug ? "page" : i.name}.`, {
1357
+ W.error(`Failed to take offline ${i != null && i.hasSlug ? "page" : i.name}.`, {
1357
1358
  description: r.message
1358
1359
  });
1359
1360
  }
1360
1361
  });
1361
- }, Us = () => {
1362
+ }, Bs = () => {
1362
1363
  const e = B(), t = R(), n = ee(), { data: s } = oe(), { savePageAsync: r } = Oe();
1363
- return ne({
1364
+ return se({
1364
1365
  mutationFn: async ({ ids: a }) => (await r(), t(e, {
1365
1366
  action: y.PUBLISH_CHANGES,
1366
1367
  data: { ids: a }
@@ -1375,12 +1376,12 @@ const cn = ({
1375
1376
  });
1376
1377
  },
1377
1378
  onError: (a) => {
1378
- console.log("##", a), z.error("Failed to publish pages.");
1379
+ console.log("##", a), W.error("Failed to publish pages.");
1379
1380
  }
1380
1381
  });
1381
- }, Xc = () => {
1382
+ }, nu = () => {
1382
1383
  const e = B(), t = R(), n = ee();
1383
- return ne({
1384
+ return se({
1384
1385
  mutationFn: async (s) => {
1385
1386
  var r;
1386
1387
  return t(e, {
@@ -1397,15 +1398,15 @@ const cn = ({
1397
1398
  onSuccess: () => {
1398
1399
  n.invalidateQueries({
1399
1400
  queryKey: [y.GET_WEBSITE_PAGES]
1400
- }), z.success("Page marked as template successfully.");
1401
+ }), W.success("Page marked as template successfully.");
1401
1402
  },
1402
1403
  onError: () => {
1403
- z.error("Failed to mark page as template.");
1404
+ W.error("Failed to mark page as template.");
1404
1405
  }
1405
1406
  });
1406
- }, Zc = () => {
1407
+ }, su = () => {
1407
1408
  const e = B(), t = R(), n = ee();
1408
- return ne({
1409
+ return se({
1409
1410
  mutationFn: async (s) => t(e, {
1410
1411
  action: y.UNMARK_AS_TEMPLATE,
1411
1412
  data: { id: s == null ? void 0 : s.id }
@@ -1413,41 +1414,41 @@ const cn = ({
1413
1414
  onSuccess: () => {
1414
1415
  n.invalidateQueries({
1415
1416
  queryKey: [y.GET_WEBSITE_PAGES]
1416
- }), z.success("Page unmarked as template successfully.");
1417
+ }), W.success("Page unmarked as template successfully.");
1417
1418
  },
1418
1419
  onError: () => {
1419
- z.error("Failed to unmark page as template.");
1420
+ W.error("Failed to unmark page as template.");
1420
1421
  }
1421
1422
  });
1422
- }, eu = () => {
1423
+ }, ru = () => {
1423
1424
  const e = B(), t = R(), n = ee();
1424
- return ne({
1425
+ return se({
1425
1426
  mutationFn: async ({ id: s, slug: r }) => t(e, {
1426
1427
  action: y.CHANGE_SLUG,
1427
1428
  data: { id: s, slug: r }
1428
1429
  }),
1429
1430
  onSuccess: (s, { primaryPage: r }) => {
1430
- z.success(X.SLUG_CHANGE_SUCCESS), r ? n.invalidateQueries({
1431
+ W.success(X.SLUG_CHANGE_SUCCESS), r ? n.invalidateQueries({
1431
1432
  queryKey: [y.GET_LANGUAGE_PAGES, r]
1432
1433
  }) : n.invalidateQueries({
1433
1434
  queryKey: [y.GET_WEBSITE_PAGES]
1434
1435
  });
1435
1436
  },
1436
1437
  onError: () => {
1437
- z.error("Failed to change slug");
1438
+ W.error("Failed to change slug");
1438
1439
  }
1439
1440
  });
1440
- }, Yi = V(() => import("./publish-pages-content-CdKHrfys.js"));
1441
- function Ji({
1441
+ }, Xi = K(() => import("./publish-pages-content-KAuhOPv0.js"));
1442
+ function Zi({
1442
1443
  showModal: e = !1,
1443
1444
  onClose: t = () => console.log("Cancelled")
1444
1445
  }) {
1445
- const { mutate: n, isPending: s } = Us();
1446
+ const { mutate: n, isPending: s } = Bs();
1446
1447
  return /* @__PURE__ */ c(Is, { open: e, onOpenChange: s ? () => {
1447
- } : t, children: e && /* @__PURE__ */ c(H, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(Yi, { onClose: t, isPending: s, publishPage: n }) }) });
1448
+ } : t, children: e && /* @__PURE__ */ c(V, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(Xi, { onClose: t, isPending: s, publishPage: n }) }) });
1448
1449
  }
1449
1450
  const de = {
1450
- ...Wr,
1451
+ ...Yr,
1451
1452
  //pages
1452
1453
  ADD_PAGE: "add_page",
1453
1454
  EDIT_PAGE: "edit_page",
@@ -1483,12 +1484,12 @@ const de = {
1483
1484
  ADD_MEDIA: "add_media",
1484
1485
  EDIT_MEDIA: "edit_media",
1485
1486
  DELETE_MEDIA: "delete_media"
1486
- }, Xi = {
1487
+ }, eo = {
1487
1488
  particleCount: 350,
1488
1489
  spread: 120,
1489
1490
  origin: { y: 0.6 },
1490
1491
  angle: 90
1491
- }, Zi = {
1492
+ }, to = {
1492
1493
  TOP_RIGHT: {
1493
1494
  angle: 225,
1494
1495
  origin: { x: 0.9, y: 0 }
@@ -1497,29 +1498,29 @@ const de = {
1497
1498
  angle: 100,
1498
1499
  origin: { x: 0.9, y: 0.9 }
1499
1500
  }
1500
- }, eo = async () => {
1501
+ }, no = async () => {
1501
1502
  const { default: e } = await import("./confetti.module-DCmCkDyV.js");
1502
1503
  return e;
1503
1504
  }, un = (e) => {
1504
- let t = Zi[e];
1505
+ let t = to[e];
1505
1506
  t || (t = {});
1506
- const n = { ...Xi, ...t };
1507
- eo().then((s) => s(n));
1507
+ const n = { ...eo, ...t };
1508
+ no().then((s) => s(n));
1508
1509
  };
1509
- function Bs({
1510
+ function Un({
1510
1511
  children: e,
1511
1512
  content: t,
1512
1513
  side: n = "bottom",
1513
1514
  delayDuration: s = 700,
1514
1515
  showTooltip: r = !0
1515
1516
  }) {
1516
- return r ? /* @__PURE__ */ c(bs, { children: /* @__PURE__ */ g(Wt, { delayDuration: s, children: [
1517
- /* @__PURE__ */ c(Yt, { asChild: !0, children: e }),
1518
- /* @__PURE__ */ c(Jt, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
1517
+ return r ? /* @__PURE__ */ c(bs, { children: /* @__PURE__ */ m(Yt, { delayDuration: s, children: [
1518
+ /* @__PURE__ */ c(Jt, { asChild: !0, children: e }),
1519
+ /* @__PURE__ */ c(Xt, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
1519
1520
  ] }) }) : e;
1520
1521
  }
1521
- const to = V(() => import("./unpublish-page-CNwIU6AS.js")), no = V(() => import("./translation-warning-modal-DalBhNQy.js")), so = () => {
1522
- const { selectedLang: e, fallbackLang: t } = Re(), n = pe("getPreviewUrl", async (d) => d), [s, r] = G(""), { data: a } = oe(), { data: i } = Ue(), { data: o } = Ce(), l = $(
1522
+ const so = K(() => import("./unpublish-page-CPLlsfm4.js")), ro = K(() => import("./translation-warning-modal-DalBhNQy.js")), ao = () => {
1523
+ const { selectedLang: e, fallbackLang: t } = Re(), n = ye("getPreviewUrl", async (d) => d), [s, r] = G(""), { data: a } = oe(), { data: i } = Ue(), { data: o } = Ce(), l = $(
1523
1524
  () => {
1524
1525
  var d;
1525
1526
  return (d = i == null ? void 0 : i.find((h) => (h == null ? void 0 : h.lang) === e)) == null ? void 0 : d.slug;
@@ -1539,27 +1540,23 @@ const to = V(() => import("./unpublish-page-CNwIU6AS.js")), no = V(() => import(
1539
1540
  } else
1540
1541
  r("");
1541
1542
  })();
1542
- }, [n, l, a == null ? void 0 : a.pageType, u, a == null ? void 0 : a.id, f]), /* @__PURE__ */ c(he, { children: /* @__PURE__ */ c("a", { href: s, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ g(M, { variant: "ghost", size: "sm", className: "gap-2", children: [
1543
- /* @__PURE__ */ c(kn, { className: "h-4 w-4" }),
1544
- " ",
1545
- X.PREVIEW
1546
- ] }) }) });
1547
- }, ro = () => {
1548
- const [e, t] = Yr();
1549
- return /* @__PURE__ */ g(he, { children: [
1550
- /* @__PURE__ */ c(Bs, { content: X.THEME, children: /* @__PURE__ */ c(
1543
+ }, [n, l, a == null ? void 0 : a.pageType, u, a == null ? void 0 : a.id, f]), /* @__PURE__ */ c(he, { children: /* @__PURE__ */ c(Un, { content: X.OPEN_PREVIEW_IN_NEW_TAB, delayDuration: 0, children: /* @__PURE__ */ c("a", { href: s, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c(M, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ c(Ka, { className: "h-4 w-4" }) }) }) }) });
1544
+ }, io = () => {
1545
+ const [e, t] = Jr();
1546
+ return /* @__PURE__ */ m(he, { children: [
1547
+ /* @__PURE__ */ c(Un, { content: X.THEME, delayDuration: 0, children: /* @__PURE__ */ c(
1551
1548
  M,
1552
1549
  {
1553
1550
  variant: e === "theme" ? "outline" : "ghost",
1554
1551
  size: "icon",
1555
1552
  className: "gap-2",
1556
1553
  onClick: () => t(e === "theme" ? "block" : "theme"),
1557
- children: /* @__PURE__ */ c(qa, { className: "h-4 w-4" })
1554
+ children: /* @__PURE__ */ c(Va, { className: "h-4 w-4" })
1558
1555
  }
1559
1556
  ) }),
1560
1557
  /* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
1561
1558
  ] });
1562
- }, ao = () => {
1559
+ }, oo = () => {
1563
1560
  const [e, t] = G(!1), { isLocked: n } = Ne(), { savePageAsync: s, saveState: r } = Oe();
1564
1561
  re(() => {
1565
1562
  const u = (f) => {
@@ -1576,30 +1573,30 @@ const to = V(() => import("./unpublish-page-CNwIU6AS.js")), no = V(() => import(
1576
1573
  case "UNSAVED":
1577
1574
  return {
1578
1575
  tooltipContent: X.SAVEDRAFT,
1579
- buttonIcon: /* @__PURE__ */ c(Va, { className: "h-4 w-4" }),
1576
+ buttonIcon: /* @__PURE__ */ c($a, { className: "h-4 w-4" }),
1580
1577
  buttonClass: "gap-x-1"
1581
1578
  };
1582
1579
  case "SAVING":
1583
1580
  return {
1584
1581
  tooltipContent: X.SAVING,
1585
- buttonIcon: /* @__PURE__ */ c(Xt, { className: "h-4 w-4 animate-spin text-sky-700" }),
1582
+ buttonIcon: /* @__PURE__ */ c(ft, { className: "h-4 w-4 animate-spin text-sky-700" }),
1586
1583
  buttonClass: "gap-x-1"
1587
1584
  };
1588
1585
  case "SAVED":
1589
1586
  return {
1590
1587
  tooltipContent: X.SAVED,
1591
- buttonIcon: /* @__PURE__ */ c(Ka, { className: "h-4 w-4" }),
1588
+ buttonIcon: /* @__PURE__ */ c(Ha, { className: "h-4 w-4" }),
1592
1589
  buttonClass: "text-green-500 gap-x-1"
1593
1590
  };
1594
1591
  }
1595
1592
  }, [r]);
1596
- return n ? null : /* @__PURE__ */ g(M, { size: "sm", variant: "ghost", onClick: a, className: o, children: [
1593
+ return n ? null : /* @__PURE__ */ m(M, { size: "sm", variant: "ghost", onClick: a, className: `${o} w-24 max-w-24`, children: [
1597
1594
  i,
1598
1595
  " ",
1599
1596
  l
1600
1597
  ] });
1601
- }, io = () => {
1602
- const { selectedLang: e } = Re(), { data: t } = Ie(), { data: n } = Ue(), [s, r] = G(!1), [a, i] = G(!1), [o, l] = G(null), { savePageAsync: u } = Oe(), [f, d] = G(!1), { data: h } = oe(), { mutate: m, isPending: E } = Us(), { needTranslations: S } = Oe(), T = S(), { buttonText: p, buttonClassName: A, isPublished: w } = $(() => {
1598
+ }, lo = () => {
1599
+ const { selectedLang: e } = Re(), { data: t } = Ie(), { data: n } = Ue(), [s, r] = G(!1), [a, i] = G(!1), [o, l] = G(null), { savePageAsync: u } = Oe(), [f, d] = G(!1), { data: h } = oe(), { mutate: g, isPending: E } = Bs(), { needTranslations: S } = Oe(), T = S(), { buttonText: p, buttonClassName: A, isPublished: w } = $(() => {
1603
1600
  const k = h && (h == null ? void 0 : h.online);
1604
1601
  return {
1605
1602
  buttonClassName: k ? "hover:bg-green-600 bg-green-500" : "",
@@ -1614,15 +1611,15 @@ const to = V(() => import("./unpublish-page-CNwIU6AS.js")), no = V(() => import(
1614
1611
  U();
1615
1612
  }, U = () => {
1616
1613
  const k = [t == null ? void 0 : t.id, t == null ? void 0 : t.primaryPage];
1617
- m({ ids: Ts(k) }, { onSuccess: () => un("TOP_RIGHT") });
1614
+ g({ ids: Ts(k) }, { onSuccess: () => un("TOP_RIGHT") });
1618
1615
  }, b = () => {
1619
1616
  d(!1), U();
1620
- }, Ae = async () => {
1617
+ }, Te = async () => {
1621
1618
  d(!1), await u();
1622
- }, Te = $(() => qt(n ?? [], "id"), [n]);
1623
- return /* @__PURE__ */ g(he, { children: [
1624
- /* @__PURE__ */ g("div", { className: "flex", children: [
1625
- /* @__PURE__ */ g(
1619
+ }, Se = $(() => Kt(n ?? [], "id"), [n]);
1620
+ return /* @__PURE__ */ m(he, { children: [
1621
+ /* @__PURE__ */ m("div", { className: "flex", children: [
1622
+ /* @__PURE__ */ m(
1626
1623
  M,
1627
1624
  {
1628
1625
  size: "sm",
@@ -1636,14 +1633,14 @@ const to = V(() => import("./unpublish-page-CNwIU6AS.js")), no = V(() => import(
1636
1633
  "span",
1637
1634
  {
1638
1635
  className: `flex items-center transition-transform duration-300 ease-in-out ${a ? "-translate-y-10" : ""}`,
1639
- children: w ? /* @__PURE__ */ c(Wn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Yn, { className: "h-4 w-4" })
1636
+ children: w ? /* @__PURE__ */ c(zn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Yn, { className: "h-4 w-4" })
1640
1637
  }
1641
1638
  ),
1642
1639
  /* @__PURE__ */ c(
1643
1640
  "span",
1644
1641
  {
1645
1642
  className: `absolute inset-0 left-3 flex items-center transition-transform duration-300 ease-in-out ${a ? "" : "translate-y-10"}`,
1646
- children: w ? /* @__PURE__ */ c(Yn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Wn, { className: "h-4 w-4" })
1643
+ children: w ? /* @__PURE__ */ c(Yn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(zn, { className: "h-4 w-4" })
1647
1644
  }
1648
1645
  ),
1649
1646
  /* @__PURE__ */ c("span", { children: p }),
@@ -1651,7 +1648,7 @@ const to = V(() => import("./unpublish-page-CNwIU6AS.js")), no = V(() => import(
1651
1648
  ]
1652
1649
  }
1653
1650
  ),
1654
- /* @__PURE__ */ g(Nn, { children: [
1651
+ /* @__PURE__ */ m(Nn, { children: [
1655
1652
  /* @__PURE__ */ c(Cn, { asChild: !0, children: /* @__PURE__ */ c(
1656
1653
  M,
1657
1654
  {
@@ -1661,36 +1658,36 @@ const to = V(() => import("./unpublish-page-CNwIU6AS.js")), no = V(() => import(
1661
1658
  children: /* @__PURE__ */ c(mn, { className: "h-4 w-4" })
1662
1659
  }
1663
1660
  ) }),
1664
- /* @__PURE__ */ g(Ln, { align: "end", className: "w-52", children: [
1665
- /* @__PURE__ */ g(
1661
+ /* @__PURE__ */ m(Ln, { align: "end", className: "w-52", children: [
1662
+ /* @__PURE__ */ m(
1666
1663
  fe,
1667
1664
  {
1668
1665
  disabled: E,
1669
1666
  className: "cursor-pointer text-xs",
1670
- onClick: () => m({ ids: Te }, { onSuccess: () => un("TOP_RIGHT") }),
1667
+ onClick: () => g({ ids: Se }, { onSuccess: () => un("TOP_RIGHT") }),
1671
1668
  children: [
1672
1669
  X.PUBLISH,
1673
1670
  " with translation pages"
1674
1671
  ]
1675
1672
  }
1676
1673
  ),
1677
- !w && /* @__PURE__ */ g(
1674
+ !w && /* @__PURE__ */ m(
1678
1675
  fe,
1679
1676
  {
1680
1677
  disabled: E,
1681
1678
  className: "cursor-pointer text-xs",
1682
- onClick: () => m({ ids: [h == null ? void 0 : h.id] }, { onSuccess: () => un("TOP_RIGHT") }),
1679
+ onClick: () => g({ ids: [h == null ? void 0 : h.id] }, { onSuccess: () => un("TOP_RIGHT") }),
1683
1680
  children: [
1684
1681
  X.PUBLISH,
1685
1682
  " page"
1686
1683
  ]
1687
1684
  }
1688
1685
  ),
1689
- /* @__PURE__ */ g(fe, { onClick: () => r(!0), className: "cursor-pointer text-xs", children: [
1686
+ /* @__PURE__ */ m(fe, { onClick: () => r(!0), className: "cursor-pointer text-xs", children: [
1690
1687
  X.OPEN,
1691
1688
  " publish menu"
1692
1689
  ] }),
1693
- w && /* @__PURE__ */ g(fe, { onClick: () => l(t), className: "cursor-pointer text-xs", children: [
1690
+ w && /* @__PURE__ */ m(fe, { onClick: () => l(t), className: "cursor-pointer text-xs", children: [
1694
1691
  X.UNPUBLISH,
1695
1692
  " page ",
1696
1693
  e ? `(${Vn(e)})` : ""
@@ -1698,30 +1695,30 @@ const to = V(() => import("./unpublish-page-CNwIU6AS.js")), no = V(() => import(
1698
1695
  ] })
1699
1696
  ] })
1700
1697
  ] }),
1701
- /* @__PURE__ */ c(Ji, { showModal: s, onClose: () => r(!1) }),
1702
- o && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(to, { page: o, onClose: () => l(null) }) }),
1703
- f && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
1704
- no,
1698
+ /* @__PURE__ */ c(Zi, { showModal: s, onClose: () => r(!1) }),
1699
+ o && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(so, { page: o, onClose: () => l(null) }) }),
1700
+ f && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
1701
+ ro,
1705
1702
  {
1706
1703
  isOpen: f,
1707
- onClose: Ae,
1704
+ onClose: Te,
1708
1705
  onContinue: b,
1709
1706
  isPending: E
1710
1707
  }
1711
1708
  ) })
1712
1709
  ] });
1713
1710
  };
1714
- function oo() {
1715
- const { isLocked: e } = Ne(), [t] = le(), n = t.get("lang"), s = Ds(n);
1716
- return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ g("div", { className: "flex items-center justify-end gap-1", children: [
1717
- /* @__PURE__ */ c(Qi, {}),
1718
- /* @__PURE__ */ c(cn, { permission: de.EDIT_THEME, children: /* @__PURE__ */ c(ro, {}) }),
1719
- /* @__PURE__ */ c(so, {}),
1720
- /* @__PURE__ */ c(cn, { permission: de.SAVE_PAGE, children: /* @__PURE__ */ c(ao, {}) }),
1721
- /* @__PURE__ */ c(cn, { permission: de.PUBLISH_PAGE, children: /* @__PURE__ */ c(io, {}) })
1711
+ function co() {
1712
+ const { isLocked: e } = Ne(), [t] = le(), n = t.get("lang"), s = xs(n);
1713
+ return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
1714
+ /* @__PURE__ */ c(Wi, {}),
1715
+ /* @__PURE__ */ c(cn, { permission: de.EDIT_THEME, children: /* @__PURE__ */ c(io, {}) }),
1716
+ /* @__PURE__ */ c(ao, {}),
1717
+ /* @__PURE__ */ c(cn, { permission: de.SAVE_PAGE, children: /* @__PURE__ */ c(oo, {}) }),
1718
+ /* @__PURE__ */ c(cn, { permission: de.PUBLISH_PAGE, children: /* @__PURE__ */ c(lo, {}) })
1722
1719
  ] });
1723
1720
  }
1724
- const lo = ({
1721
+ const uo = ({
1725
1722
  page: e,
1726
1723
  setDuplicatePage: t,
1727
1724
  setAddEditPage: n,
@@ -1732,11 +1729,11 @@ const lo = ({
1732
1729
  children: o,
1733
1730
  isLanguagePage: l
1734
1731
  }) => {
1735
- const { hasPermission: u } = Ps(), { data: f } = Ce(), d = $(() => ae(f, { key: e.pageType }), [f, e.pageType]), h = $(() => !!e.isTemplate, [e.isTemplate]), m = $(() => !!(d != null && d.hasSlug), [d == null ? void 0 : d.hasSlug]);
1736
- return !u(de.EDIT_PAGE) && !u(de.DELETE_PAGE) && !u(de.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ g(Nn, { children: [
1732
+ const { hasPermission: u } = Ps(), { data: f } = Ce(), d = $(() => ae(f, { key: e.pageType }), [f, e.pageType]), h = $(() => !!e.isTemplate, [e.isTemplate]), g = $(() => !!(d != null && d.hasSlug), [d == null ? void 0 : d.hasSlug]);
1733
+ return !u(de.EDIT_PAGE) && !u(de.DELETE_PAGE) && !u(de.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ m(Nn, { children: [
1737
1734
  /* @__PURE__ */ c(Cn, { asChild: !0, onClick: (S) => S.stopPropagation(), children: o }),
1738
- /* @__PURE__ */ g(Ln, { align: "center", className: "text-sm", children: [
1739
- u(de.ADD_PAGE) && !l && /* @__PURE__ */ g(
1735
+ /* @__PURE__ */ m(Ln, { align: "center", className: "text-sm", children: [
1736
+ u(de.ADD_PAGE) && !l && /* @__PURE__ */ m(
1740
1737
  fe,
1741
1738
  {
1742
1739
  className: "flex cursor-pointer items-center gap-2",
@@ -1744,12 +1741,12 @@ const lo = ({
1744
1741
  S.stopPropagation(), t(e);
1745
1742
  },
1746
1743
  children: [
1747
- /* @__PURE__ */ c(Ha, { className: "size-3" }),
1744
+ /* @__PURE__ */ c(Qa, { className: "size-3" }),
1748
1745
  "Duplicate page"
1749
1746
  ]
1750
1747
  }
1751
1748
  ),
1752
- u(de.EDIT_PAGE) && /* @__PURE__ */ g(
1749
+ u(de.EDIT_PAGE) && /* @__PURE__ */ m(
1753
1750
  fe,
1754
1751
  {
1755
1752
  className: "flex cursor-pointer items-center gap-2",
@@ -1760,12 +1757,12 @@ const lo = ({
1760
1757
  });
1761
1758
  },
1762
1759
  children: [
1763
- /* @__PURE__ */ c($a, { className: "size-3" }),
1760
+ /* @__PURE__ */ c(ja, { className: "size-3" }),
1764
1761
  "Edit"
1765
1762
  ]
1766
1763
  }
1767
1764
  ),
1768
- (e == null ? void 0 : e.online) && u(de.UNPUBLISH_PAGE) && /* @__PURE__ */ g(
1765
+ (e == null ? void 0 : e.online) && u(de.UNPUBLISH_PAGE) && /* @__PURE__ */ m(
1769
1766
  fe,
1770
1767
  {
1771
1768
  className: "flex cursor-pointer items-center gap-2",
@@ -1773,12 +1770,12 @@ const lo = ({
1773
1770
  S.stopPropagation(), s(e);
1774
1771
  },
1775
1772
  children: [
1776
- /* @__PURE__ */ c(Qa, { className: "size-3" }),
1773
+ /* @__PURE__ */ c(Wa, { className: "size-3" }),
1777
1774
  X.UNPUBLISH
1778
1775
  ]
1779
1776
  }
1780
1777
  ),
1781
- u(de.DELETE_PAGE) && /* @__PURE__ */ g(
1778
+ u(de.DELETE_PAGE) && /* @__PURE__ */ m(
1782
1779
  fe,
1783
1780
  {
1784
1781
  className: "flex cursor-pointer items-center gap-2",
@@ -1786,12 +1783,12 @@ const lo = ({
1786
1783
  S.stopPropagation(), r(e);
1787
1784
  },
1788
1785
  children: [
1789
- /* @__PURE__ */ c(ja, { className: "size-3" }),
1786
+ /* @__PURE__ */ c(za, { className: "size-3" }),
1790
1787
  X.DELETE
1791
1788
  ]
1792
1789
  }
1793
1790
  ),
1794
- u(de.MARK_AS_TEMPLATE) && m && !l && /* @__PURE__ */ c(he, { children: h ? /* @__PURE__ */ g(
1791
+ u(de.MARK_AS_TEMPLATE) && g && !l && /* @__PURE__ */ c(he, { children: h ? /* @__PURE__ */ m(
1795
1792
  fe,
1796
1793
  {
1797
1794
  className: "flex cursor-pointer items-center gap-2",
@@ -1803,7 +1800,7 @@ const lo = ({
1803
1800
  X.UNMARK_AS_TEMPLATE
1804
1801
  ]
1805
1802
  }
1806
- ) : /* @__PURE__ */ g(
1803
+ ) : /* @__PURE__ */ m(
1807
1804
  fe,
1808
1805
  {
1809
1806
  className: "flex cursor-pointer items-center gap-2",
@@ -1818,8 +1815,8 @@ const lo = ({
1818
1815
  ) })
1819
1816
  ] })
1820
1817
  ] });
1821
- }, co = V(() => import("./add-new-page-Bs_NXM9x.js")), uo = V(() => import("./delete-page-D8xhYESu.js")), fo = V(() => import("./duplicate-page-CqXTGmWt.js")), ho = V(() => import("./mark-as-template-jdwcgRIB.js")), go = V(() => import("./unmark-as-template-UwmCCn0u.js")), mo = V(() => import("./unpublish-page-CNwIU6AS.js")), Eo = () => {
1822
- const [e, t] = G(null), [n, s] = G(null), [r, a] = G(null), [i, o] = G(null), [l, u] = G(null), [f, d] = G(null), { data: h, isFetching: m } = Ie(), { selectedLang: E, fallbackLang: S } = Re(), { data: T } = Ue(), p = T == null ? void 0 : T.find((b) => b.lang === E), { isLocked: A } = Ne(), w = !(h != null && h.slug), [, D] = se(Rn);
1818
+ }, fo = K(() => import("./add-new-page-DESlqvED.js")), ho = K(() => import("./delete-page-BP1Df8QL.js")), go = K(() => import("./duplicate-page-B1j0H7gP.js")), mo = K(() => import("./mark-as-template-L9cHzL84.js")), Eo = K(() => import("./unmark-as-template-Dcpkj7EZ.js")), po = K(() => import("./unpublish-page-CPLlsfm4.js")), yo = () => {
1819
+ const [e, t] = G(null), [n, s] = G(null), [r, a] = G(null), [i, o] = G(null), [l, u] = G(null), [f, d] = G(null), { data: h, isFetching: g } = Ie(), { selectedLang: E, fallbackLang: S } = Re(), { data: T } = Ue(), p = T == null ? void 0 : T.find((b) => b.lang === E), { isLocked: A } = Ne(), w = !(h != null && h.slug), [, D] = ne(On);
1823
1820
  if (!h) return null;
1824
1821
  const U = (b) => {
1825
1822
  E.length > 0 && E !== S ? D({
@@ -1828,16 +1825,16 @@ const lo = ({
1828
1825
  primaryPage: b == null ? void 0 : b.primaryPage
1829
1826
  }) : d(b);
1830
1827
  };
1831
- return /* @__PURE__ */ g(he, { children: [
1832
- /* @__PURE__ */ g("div", { className: "flex items-center justify-between rounded px-[2px] transition-colors duration-200", children: [
1833
- /* @__PURE__ */ c(Rs, { children: /* @__PURE__ */ c(
1828
+ return /* @__PURE__ */ m(he, { children: [
1829
+ /* @__PURE__ */ m("div", { className: "flex items-center justify-between rounded px-[2px] transition-colors duration-200", children: [
1830
+ /* @__PURE__ */ c(Us, { children: /* @__PURE__ */ c(
1834
1831
  M,
1835
1832
  {
1836
1833
  className: "flex h-7 max-w-[200px] cursor-pointer items-center truncate rounded px-1 text-xs font-medium",
1837
1834
  variant: "ghost",
1838
- children: m ? /* @__PURE__ */ c(Xt, { className: "h-4 w-4 animate-spin text-slate-400" }) : /* @__PURE__ */ g("span", { className: "flex w-full cursor-pointer items-end overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-xs font-medium", children: [
1839
- w ? /* @__PURE__ */ c(za, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ c(Wa, { className: "mr-1 h-4 w-4" }),
1840
- K(p || h, "name") ?? ""
1835
+ children: g ? /* @__PURE__ */ c(ft, { className: "h-4 w-4 animate-spin text-slate-400" }) : /* @__PURE__ */ m("span", { className: "flex w-full cursor-pointer items-end overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-xs font-medium", children: [
1836
+ w ? /* @__PURE__ */ c(Ya, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ c(Ja, { className: "mr-1 h-4 w-4" }),
1837
+ H(p || h, "name") ?? ""
1841
1838
  ] })
1842
1839
  }
1843
1840
  ) }),
@@ -1850,7 +1847,7 @@ const lo = ({
1850
1847
  children: /* @__PURE__ */ c(Xn, { className: "h-4 w-4" })
1851
1848
  }
1852
1849
  ) : /* @__PURE__ */ c(
1853
- lo,
1850
+ uo,
1854
1851
  {
1855
1852
  page: h,
1856
1853
  setDuplicatePage: (b) => u(b),
@@ -1864,8 +1861,8 @@ const lo = ({
1864
1861
  }
1865
1862
  )
1866
1863
  ] }),
1867
- f && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
1868
- co,
1864
+ f && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
1865
+ fo,
1869
1866
  {
1870
1867
  closePanel: () => d(null),
1871
1868
  editPage: () => {
@@ -1874,12 +1871,12 @@ const lo = ({
1874
1871
  setAddEditPage: d
1875
1872
  }
1876
1873
  ) }),
1877
- e && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(uo, { page: e, onClose: () => t(null) }) }),
1878
- n && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(mo, { page: n, onClose: () => s(null) }) }),
1879
- r && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(ho, { page: r, onClose: () => a(null) }) }),
1880
- i && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(go, { page: i, onClose: () => o(null) }) }),
1881
- l && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
1882
- fo,
1874
+ e && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(ho, { page: e, onClose: () => t(null) }) }),
1875
+ n && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(po, { page: n, onClose: () => s(null) }) }),
1876
+ r && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(mo, { page: r, onClose: () => a(null) }) }),
1877
+ i && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Eo, { page: i, onClose: () => o(null) }) }),
1878
+ l && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
1879
+ go,
1883
1880
  {
1884
1881
  page: l,
1885
1882
  onClose: () => u(null),
@@ -1890,65 +1887,65 @@ const lo = ({
1890
1887
  }, Ms = ({ children: e, className: t = "" }) => /* @__PURE__ */ c(
1891
1888
  "div",
1892
1889
  {
1893
- className: Kt(
1890
+ className: Vt(
1894
1891
  "fixed bottom-0 left-0 right-0 top-[50px] z-[20] flex w-screen flex-col items-center justify-center bg-black/40 transition-all",
1895
1892
  t
1896
1893
  ),
1897
1894
  children: e
1898
1895
  }
1899
- ), po = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(Ms, { children: /* @__PURE__ */ g("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: [
1896
+ ), Ao = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(Ms, { 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: [
1900
1897
  /* @__PURE__ */ c("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
1901
1898
  /* @__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" })
1902
- ] }) }), yo = V(() => import("./dynamic-page-selector-0TiUnfUg.js")), Ao = () => {
1903
- const { dynamicPage: e, allLangPages: t, isFetching: n } = wi(), s = t.length > 0;
1904
- return n ? null : /* @__PURE__ */ g("div", { className: "relative", children: [
1905
- !e && /* @__PURE__ */ c(po, { hasDynamicPage: s }),
1906
- /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(yo, {}) })
1899
+ ] }) }), To = K(() => import("./dynamic-page-selector-Crjyco6l.js")), So = () => {
1900
+ const { dynamicPage: e, allLangPages: t, isFetching: n } = bi(), s = t.length > 0;
1901
+ return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
1902
+ !e && /* @__PURE__ */ c(Ao, { hasDynamicPage: s }),
1903
+ /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(To, {}) })
1907
1904
  ] });
1908
- }, To = () => {
1909
- const { data: e, isFetching: t } = Ie(), { data: n, isFetching: s } = oe(), r = K(n, "dynamic", !1), a = xn(), i = Jr("dynamic-page-selector"), o = e == null ? void 0 : e.slug, l = !o, u = Ni(), f = t || s, h = (l ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
1910
- return /* @__PURE__ */ g("div", { className: "relative flex items-center gap-x-1", children: [
1905
+ }, _o = () => {
1906
+ const { data: e, isFetching: t } = Ie(), { data: n, isFetching: s } = oe(), r = H(n, "dynamic", !1), a = Dn(), i = Xr("dynamic-page-selector"), o = e == null ? void 0 : e.slug, l = !o, u = Li(), f = t || s, h = (l ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
1907
+ return /* @__PURE__ */ m("div", { className: "relative flex items-center gap-x-1", children: [
1911
1908
  /* @__PURE__ */ c(
1912
1909
  "div",
1913
1910
  {
1914
- className: Kt(
1911
+ className: Vt(
1915
1912
  "flex h-8 w-auto max-w-[600px] items-center rounded-md border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800",
1916
1913
  f && "max-w-0 overflow-hidden opacity-0"
1917
1914
  ),
1918
- children: /* @__PURE__ */ c(Eo, {})
1915
+ children: /* @__PURE__ */ c(yo, {})
1919
1916
  }
1920
1917
  ),
1921
- /* @__PURE__ */ g(
1918
+ /* @__PURE__ */ m(
1922
1919
  "div",
1923
1920
  {
1924
- className: Kt(
1921
+ className: Vt(
1925
1922
  "flex h-8 w-auto max-w-[600px] items-center rounded-md border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800" + (l ? " pr-2" : ""),
1926
1923
  f && "max-w-0 overflow-hidden opacity-0"
1927
1924
  ),
1928
1925
  children: [
1929
- /* @__PURE__ */ c(Ki, {}),
1930
- /* @__PURE__ */ g("div", { className: "flex w-full items-center overflow-hidden", children: [
1926
+ /* @__PURE__ */ c(Hi, {}),
1927
+ /* @__PURE__ */ m("div", { className: "flex w-full items-center overflow-hidden", children: [
1931
1928
  /* @__PURE__ */ c(
1932
1929
  "div",
1933
1930
  {
1934
1931
  className: `w-full max-w-[200px] overflow-hidden overflow-ellipsis whitespace-nowrap pl-1 text-xs ${l ? "italic text-gray-400" : "font-mono text-gray-500"}`,
1935
- children: h === "/" ? /* @__PURE__ */ g("span", { className: "text-gray-900", children: [
1932
+ children: h === "/" ? /* @__PURE__ */ m("span", { className: "text-gray-900", children: [
1936
1933
  "/",
1937
1934
  /* @__PURE__ */ c("span", { className: "text-[11px] font-light italic text-gray-400", children: "(Homepage)" })
1938
1935
  ] }) : h
1939
1936
  }
1940
1937
  ),
1941
- !l && /* @__PURE__ */ c("a", { href: u, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c("div", { className: "ml-2 mr-px flex-shrink-0 rounded-sm p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300", children: /* @__PURE__ */ c(Ya, { className: "h-4 w-4", strokeWidth: 1 }) }) })
1938
+ !l && /* @__PURE__ */ c("a", { href: u, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c("div", { className: "ml-2 mr-px flex-shrink-0 rounded-sm p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300", children: /* @__PURE__ */ c(Xa, { className: "h-4 w-4", strokeWidth: 1 }) }) })
1942
1939
  ] })
1943
1940
  ]
1944
1941
  }
1945
1942
  ),
1946
- r && i && /* @__PURE__ */ c(Ao, {})
1943
+ r && i && /* @__PURE__ */ c(So, {})
1947
1944
  ] });
1948
- }, So = () => /* @__PURE__ */ g("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
1949
- /* @__PURE__ */ c(Vi, {}),
1950
- /* @__PURE__ */ c(To, {}),
1951
- /* @__PURE__ */ c(oo, {})
1945
+ }, Po = () => /* @__PURE__ */ m("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
1946
+ /* @__PURE__ */ c($i, {}),
1947
+ /* @__PURE__ */ c(_o, {}),
1948
+ /* @__PURE__ */ c(co, {})
1952
1949
  ] }), Fs = () => {
1953
1950
  const e = ee(), { data: t } = ie({
1954
1951
  queryKey: [y.AI_CONTEXT],
@@ -1962,7 +1959,7 @@ const lo = ({
1962
1959
  },
1963
1960
  [e]
1964
1961
  ), aiContext: t };
1965
- }, _o = () => {
1962
+ }, wo = () => {
1966
1963
  const e = B(), { aiContext: t } = Fs(), n = R();
1967
1964
  return q(
1968
1965
  async (s, r, a, i) => n(e, {
@@ -1971,36 +1968,36 @@ const lo = ({
1971
1968
  }),
1972
1969
  [e, t, n]
1973
1970
  );
1974
- }, Po = (e, t) => t.map((n) => {
1971
+ }, vo = (e, t) => t.map((n) => {
1975
1972
  if (Y(e, n._type)) {
1976
- const s = ii(n._type);
1973
+ const s = li(n._type);
1977
1974
  return {
1978
1975
  ...s,
1979
1976
  ...In(n, [
1980
- ...Br(s),
1977
+ ...Mr(s),
1981
1978
  "_type",
1982
1979
  "_id",
1983
1980
  "_name",
1984
1981
  "_parent",
1985
1982
  "_bindings"
1986
1983
  ]),
1987
- ...Mr(n, (r, a) => Fr(a, "_attrs")),
1984
+ ...Fr(n, (r, a) => qr(a, "_attrs")),
1988
1985
  ...n
1989
1986
  };
1990
1987
  }
1991
1988
  return n;
1992
- }), wo = (e) => {
1993
- const t = ai();
1989
+ }), bo = (e) => {
1990
+ const t = oi();
1994
1991
  return $(() => {
1995
1992
  if (!e || me(e)) return { blocks: [] };
1996
1993
  const n = Ss(
1997
1994
  e,
1998
- (s) => !Ur(s == null ? void 0 : s._type, "@chai/")
1995
+ (s) => !Br(s == null ? void 0 : s._type, "@chai/")
1999
1996
  );
2000
- return { blocks: Po(t, n) };
1997
+ return { blocks: vo(t, n) };
2001
1998
  }, [e, t]);
2002
- }, vo = () => {
2003
- const [e] = le(), t = e.get("page"), n = B(), { setAiContext: s } = Fs(), [, r] = Gn(), [, a] = Ii(), [, i] = Xr(), o = R();
1999
+ }, Io = () => {
2000
+ const [e] = le(), t = e.get("page"), n = B(), { setAiContext: s } = Fs(), [, r] = xn(), [, a] = Ci(), [, i] = Zr(), o = R();
2004
2001
  return ie({
2005
2002
  queryKey: [y.GET_DRAFT_PAGE, t],
2006
2003
  staleTime: 1 / 0,
@@ -2011,12 +2008,12 @@ const lo = ({
2011
2008
  action: y.GET_DRAFT_PAGE,
2012
2009
  data: { id: t, draft: !0 }
2013
2010
  }), u = l.blocks ?? [], f = ae(u, { _type: "@chai/ai-context" });
2014
- return s(K(f, "_value", "") || ""), r((d) => ({ ...d, lastSaved: l.lastSaved })), a(K(l, "metadata", {})), setTimeout(() => i(!0), 500), u;
2011
+ return s(H(f, "_value", "") || ""), r((d) => ({ ...d, lastSaved: l.lastSaved })), a(H(l, "metadata", {})), setTimeout(() => i(!0), 500), u;
2015
2012
  },
2016
2013
  enabled: !!t
2017
2014
  });
2018
- }, bo = () => {
2019
- const { data: e } = oe(), { data: t } = Ie(), n = B(), s = R(), r = Un(), a = xn();
2015
+ }, No = () => {
2016
+ const { data: e } = oe(), { data: t } = Ie(), n = B(), s = R(), r = Rn(), a = Dn();
2020
2017
  return ie({
2021
2018
  queryKey: [y.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
2022
2019
  staleTime: 1 / 0,
@@ -2045,9 +2042,9 @@ const lo = ({
2045
2042
  }),
2046
2043
  enabled: !!(e != null && e.pageType) && !!t.id
2047
2044
  });
2048
- }, Io = () => {
2045
+ }, Co = () => {
2049
2046
  const e = B(), t = ee(), n = R();
2050
- return ne({
2047
+ return se({
2051
2048
  mutationFn: async (s) => n(e, {
2052
2049
  action: y.UPDATE_WEBSITE_SETTINGS,
2053
2050
  data: s
@@ -2056,25 +2053,25 @@ const lo = ({
2056
2053
  var a;
2057
2054
  t.invalidateQueries({
2058
2055
  queryKey: [y.GET_WEBSITE_DRAFT_SETTINGS]
2059
- }), (a = r == null ? void 0 : r.settings) != null && a.theme || z.success("Website settings updated successfully.");
2056
+ }), (a = r == null ? void 0 : r.settings) != null && a.theme || W.success("Website settings updated successfully.");
2060
2057
  },
2061
2058
  onError: (s) => {
2062
- z.error("Failed to update website settings", {
2059
+ W.error("Failed to update website settings", {
2063
2060
  description: s.message
2064
2061
  });
2065
2062
  }
2066
2063
  });
2067
- }, tu = () => {
2064
+ }, au = () => {
2068
2065
  const e = B(), t = ee(), n = R();
2069
- return ne({
2066
+ return se({
2070
2067
  mutationFn: async (s) => n(e, { action: y.UPDATE_APP_SHARED_JSONLD, data: JSON.stringify(s) }),
2071
2068
  onSuccess: () => {
2072
2069
  t.invalidateQueries({
2073
2070
  queryKey: [y.GET_APP_SHARED_JSONLD]
2074
- }), z.success("Shared JSON-LD updated successfully.");
2071
+ }), W.success("Shared JSON-LD updated successfully.");
2075
2072
  },
2076
2073
  onError: (s) => {
2077
- z.error("Failed to update shared JSON-LD", {
2074
+ W.error("Failed to update shared JSON-LD", {
2078
2075
  description: s.message
2079
2076
  });
2080
2077
  }
@@ -2084,8 +2081,8 @@ const lo = ({
2084
2081
  const s = await t(n, {
2085
2082
  action: "GET_LIBRARY_ITEM",
2086
2083
  data: { id: e.id }
2087
- }), r = K(s, "html", ""), a = K(s, "blocks", []);
2088
- return qr(a) ? a : ea(r);
2084
+ }), r = H(s, "html", ""), a = H(s, "blocks", []);
2085
+ return Kr(a) ? a : ta(r);
2089
2086
  },
2090
2087
  async getUILibraryBlocks(e, t, n) {
2091
2088
  try {
@@ -2099,7 +2096,7 @@ const lo = ({
2099
2096
  return console.error(s), [];
2100
2097
  }
2101
2098
  }
2102
- }, No = () => {
2099
+ }, Lo = () => {
2103
2100
  const e = B(), t = R();
2104
2101
  return ie({
2105
2102
  queryKey: ["uiLibraries"],
@@ -2109,7 +2106,7 @@ const lo = ({
2109
2106
  ...r
2110
2107
  }));
2111
2108
  return s.forEach((r) => {
2112
- Zr(r.id, {
2109
+ ea(r.id, {
2113
2110
  name: r.isSiteLibrary ? r.name + " (Current Site) " : r.name,
2114
2111
  description: r.description,
2115
2112
  getBlocksList: (a) => ns.getUILibraryBlocks(a, t, e),
@@ -2118,8 +2115,8 @@ const lo = ({
2118
2115
  }), s;
2119
2116
  }
2120
2117
  });
2121
- }, Co = () => {
2122
- const e = Zt(), t = R(), { user: n } = ye(), s = n == null ? void 0 : n.id;
2118
+ }, ko = () => {
2119
+ const e = Zt(), t = R(), { user: n } = Ae(), s = n == null ? void 0 : n.id;
2123
2120
  return ie({
2124
2121
  queryKey: [y.GET_ROLE_AND_PERMISSIONS, s],
2125
2122
  queryFn: () => t(e, {
@@ -2129,8 +2126,8 @@ const lo = ({
2129
2126
  enabled: !!s,
2130
2127
  staleTime: 1 / 0
2131
2128
  });
2132
- }, Lo = () => {
2133
- const e = B(), t = R(), [, n] = Gn();
2129
+ }, Do = () => {
2130
+ const e = B(), t = R(), [, n] = xn();
2134
2131
  return { onSave: async ({
2135
2132
  page: r,
2136
2133
  blocks: a,
@@ -2149,15 +2146,15 @@ const lo = ({
2149
2146
  return console.error(o), new Error("Failed to save blocks");
2150
2147
  }
2151
2148
  } };
2152
- }, ko = () => {
2153
- const { data: e } = Os(), t = B(), n = R();
2149
+ }, xo = () => {
2150
+ const { data: e } = Rs(), t = B(), n = R();
2154
2151
  return {
2155
2152
  getPartialBlocks: q(async () => {
2156
2153
  const s = {};
2157
2154
  for (const r of e ?? [])
2158
2155
  me(r == null ? void 0 : r.slug) && (s[r.id] = {
2159
2156
  type: r.pageType,
2160
- name: Kr(r.name ?? r.slug),
2157
+ name: Vr(r.name ?? r.slug),
2161
2158
  description: ""
2162
2159
  });
2163
2160
  return s;
@@ -2178,11 +2175,11 @@ const lo = ({
2178
2175
  [n, t]
2179
2176
  )
2180
2177
  };
2181
- }, ss = Bt.object({
2182
- email: Bt.string().email({ message: "Please enter a valid email address" }),
2183
- password: Bt.string().min(6, { message: "Password must be at least 6 characters" })
2184
- }), Do = () => {
2185
- const { setUser: e, logout: t } = ye(), n = Zt(), [s, r] = G(""), [a, i] = G(""), [o, l] = G({}), [u, f] = G(!1), [d, h] = G(""), m = ne({
2178
+ }, ss = Mt.object({
2179
+ email: Mt.string().email({ message: "Please enter a valid email address" }),
2180
+ password: Mt.string().min(6, { message: "Password must be at least 6 characters" })
2181
+ }), Go = () => {
2182
+ const { setUser: e, logout: t } = Ae(), n = Zt(), [s, r] = G(""), [a, i] = G(""), [o, l] = G({}), [u, f] = G(!1), [d, h] = G(""), g = se({
2186
2183
  mutationFn: async (T) => {
2187
2184
  h("");
2188
2185
  const p = await en(n, {
@@ -2214,9 +2211,9 @@ const lo = ({
2214
2211
  const p = { email: s, password: a };
2215
2212
  try {
2216
2213
  const A = ss.parse(p);
2217
- m.mutate(A);
2214
+ g.mutate(A);
2218
2215
  } catch (A) {
2219
- if (A instanceof Bt.ZodError) {
2216
+ if (A instanceof Mt.ZodError) {
2220
2217
  const w = A.issues.reduce((D, U) => {
2221
2218
  const b = U.path[0];
2222
2219
  return D[b] = U.message, D;
@@ -2225,13 +2222,13 @@ const lo = ({
2225
2222
  }
2226
2223
  }
2227
2224
  }, S = ss.safeParse({ email: s, password: a }).success;
2228
- return /* @__PURE__ */ c("div", { className: "flex min-h-screen items-center justify-center bg-slate-50", children: /* @__PURE__ */ g(ua, { className: "w-full max-w-md", children: [
2229
- /* @__PURE__ */ g(da, { children: [
2230
- /* @__PURE__ */ c(fa, { className: "text-2xl", children: "Sign in" }),
2231
- /* @__PURE__ */ c(ha, { children: "Enter your credentials to sign in to visual builder" })
2225
+ return /* @__PURE__ */ c("div", { className: "flex min-h-screen items-center justify-center bg-slate-50", children: /* @__PURE__ */ m(da, { className: "w-full max-w-md", children: [
2226
+ /* @__PURE__ */ m(fa, { children: [
2227
+ /* @__PURE__ */ c(ha, { className: "text-2xl", children: "Sign in" }),
2228
+ /* @__PURE__ */ c(ga, { children: "Enter your credentials to sign in to visual builder" })
2232
2229
  ] }),
2233
- /* @__PURE__ */ c(ga, { children: /* @__PURE__ */ g("form", { onSubmit: E, className: "space-y-4", children: [
2234
- /* @__PURE__ */ g("div", { className: "space-y-1", children: [
2230
+ /* @__PURE__ */ c(ma, { children: /* @__PURE__ */ m("form", { onSubmit: E, className: "space-y-4", children: [
2231
+ /* @__PURE__ */ m("div", { className: "space-y-1", children: [
2235
2232
  /* @__PURE__ */ c($n, { htmlFor: "email", children: "Email" }),
2236
2233
  /* @__PURE__ */ c(
2237
2234
  Qn,
@@ -2246,9 +2243,9 @@ const lo = ({
2246
2243
  ),
2247
2244
  o.email && /* @__PURE__ */ c("p", { className: "text-sm text-destructive", children: o.email })
2248
2245
  ] }),
2249
- /* @__PURE__ */ g("div", { className: "space-y-1", children: [
2246
+ /* @__PURE__ */ m("div", { className: "space-y-1", children: [
2250
2247
  /* @__PURE__ */ c($n, { htmlFor: "password", children: "Password" }),
2251
- /* @__PURE__ */ g("div", { className: "relative", children: [
2248
+ /* @__PURE__ */ m("div", { className: "relative", children: [
2252
2249
  /* @__PURE__ */ c(
2253
2250
  Qn,
2254
2251
  {
@@ -2266,30 +2263,30 @@ const lo = ({
2266
2263
  type: "button",
2267
2264
  className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",
2268
2265
  onClick: () => f(!u),
2269
- children: u ? /* @__PURE__ */ c(Ja, { className: "h-4 w-4" }) : /* @__PURE__ */ c(kn, { className: "h-4 w-4" })
2266
+ children: u ? /* @__PURE__ */ c(Za, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Cs, { className: "h-4 w-4" })
2270
2267
  }
2271
2268
  )
2272
2269
  ] }),
2273
2270
  o.password && /* @__PURE__ */ c("p", { className: "text-sm text-destructive", children: o.password })
2274
2271
  ] }),
2275
2272
  /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c("p", { className: "text-sm text-destructive", children: d }) }),
2276
- /* @__PURE__ */ c(M, { type: "submit", className: "w-full", disabled: !S || m.isPending, children: m.isPending ? /* @__PURE__ */ g(he, { children: [
2277
- /* @__PURE__ */ c(Xt, { className: "mr-2 h-4 w-4 animate-spin" }),
2273
+ /* @__PURE__ */ c(M, { type: "submit", className: "w-full", disabled: !S || g.isPending, children: g.isPending ? /* @__PURE__ */ m(he, { children: [
2274
+ /* @__PURE__ */ c(ft, { className: "mr-2 h-4 w-4 animate-spin" }),
2278
2275
  "Logging in..."
2279
2276
  ] }) : "Login" })
2280
2277
  ] }) }),
2281
- /* @__PURE__ */ g(ma, { className: "flex flex-col justify-center", children: [
2282
- /* @__PURE__ */ g("p", { className: "text-sm text-muted-foreground", children: [
2278
+ /* @__PURE__ */ m(Ea, { className: "flex flex-col justify-center", children: [
2279
+ /* @__PURE__ */ m("p", { className: "text-sm text-muted-foreground", children: [
2283
2280
  "Forgot your password?",
2284
2281
  " ",
2285
2282
  /* @__PURE__ */ c("a", { target: "_blank", href: "https://chaibuilder.com/forgot-password", className: "text-primary hover:underline", children: "Reset password" })
2286
2283
  ] }),
2287
2284
  /* @__PURE__ */ c("br", {}),
2288
2285
  /* @__PURE__ */ c("br", {}),
2289
- /* @__PURE__ */ g("div", { className: "flex items-center gap-2 border-t px-10 pt-2", children: [
2286
+ /* @__PURE__ */ m("div", { className: "flex items-center gap-2 border-t px-10 pt-2", children: [
2290
2287
  "Powered by",
2291
2288
  " ",
2292
- /* @__PURE__ */ g(
2289
+ /* @__PURE__ */ m(
2293
2290
  "a",
2294
2291
  {
2295
2292
  target: "_blank",
@@ -2312,26 +2309,26 @@ const lo = ({
2312
2309
  ] })
2313
2310
  ] }) });
2314
2311
  };
2315
- let En = Do;
2316
- const xo = () => $(() => En, [En]), nu = (e) => {
2312
+ let En = Go;
2313
+ const Oo = () => $(() => En, [En]), iu = (e) => {
2317
2314
  En = e;
2318
2315
  }, rs = () => {
2319
- const e = xo();
2320
- return /* @__PURE__ */ c(H, { fallback: /* @__PURE__ */ c("div", { children: "Loading..." }), children: /* @__PURE__ */ c(e, {}) });
2321
- }, Go = V(() => import("./lang-panel-CPFS1ssC.js")), Oo = ({ isActive: e, show: t }) => {
2316
+ const e = Oo();
2317
+ return /* @__PURE__ */ c(V, { fallback: /* @__PURE__ */ c("div", { children: "Loading..." }), children: /* @__PURE__ */ c(e, {}) });
2318
+ }, Ro = K(() => import("./lang-panel-B3tr2uhr.js")), Uo = ({ isActive: e, show: t }) => {
2322
2319
  const { data: n } = Be();
2323
- return !Y(n, "languages") || !K(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(Xa, { className: "h-4 w-4" }) });
2324
- }, qs = "lang", Ro = {
2320
+ return !Y(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(ei, { className: "h-4 w-4" }) });
2321
+ }, qs = "lang", Bo = {
2325
2322
  id: qs,
2326
2323
  label: "Languages",
2327
2324
  position: "top",
2328
- panel: Go,
2329
- button: Oo,
2325
+ panel: Ro,
2326
+ button: Uo,
2330
2327
  view: "modal",
2331
2328
  width: 400
2332
- }, Uo = V(() => import("./seo-panel-Bxo4f-a_.js")), Ks = "seo", Bo = ({ isActive: e, show: t }) => {
2333
- const { data: n } = oe(), s = zi(n == null ? void 0 : n.pageType);
2334
- return !Y(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ g(
2329
+ }, Mo = K(() => import("./seo-panel-Dhhpe_7z.js")), Ks = "seo", Fo = ({ isActive: e, show: t }) => {
2330
+ const { data: n } = oe(), s = Yi(n == null ? void 0 : n.pageType);
2331
+ return !Y(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
2335
2332
  "svg",
2336
2333
  {
2337
2334
  stroke: "currentColor",
@@ -2349,35 +2346,35 @@ const xo = () => $(() => En, [En]), nu = (e) => {
2349
2346
  ]
2350
2347
  }
2351
2348
  ) });
2352
- }, Mo = {
2349
+ }, qo = {
2353
2350
  id: Ks,
2354
2351
  label: "SEO",
2355
- panel: Uo,
2356
- button: Bo,
2352
+ panel: Mo,
2353
+ button: Fo,
2357
2354
  position: "top",
2358
2355
  width: 600,
2359
2356
  view: "modal"
2360
- }, Vs = "user-info", Fo = () => {
2361
- const { user: e, logout: t } = ye(), n = pe("onLogout", As);
2362
- return e ? /* @__PURE__ */ g(Ea, { children: [
2363
- /* @__PURE__ */ c(pa, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ c(Za, { className: "h-4 w-4" }) }) }),
2364
- /* @__PURE__ */ g(ya, { className: "w-auto space-y-2 p-4", children: [
2357
+ }, Vs = "user-info", Ko = () => {
2358
+ const { user: e, logout: t } = Ae(), n = ye("onLogout", As);
2359
+ return e ? /* @__PURE__ */ m(pa, { children: [
2360
+ /* @__PURE__ */ c(ya, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ c(ti, { className: "h-4 w-4" }) }) }),
2361
+ /* @__PURE__ */ m(Aa, { className: "w-auto space-y-2 p-4", children: [
2365
2362
  /* @__PURE__ */ c("div", { className: "text-sm font-medium", children: e.name ?? e.email }),
2366
2363
  /* @__PURE__ */ c("div", { className: "text-xs text-muted-foreground", children: e.email }),
2367
- /* @__PURE__ */ g(Aa, { children: [
2368
- /* @__PURE__ */ c(Ta, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "outline", size: "sm", className: "w-full", children: "Logout" }) }),
2369
- /* @__PURE__ */ g(Sa, { children: [
2370
- /* @__PURE__ */ g(_a, { children: [
2371
- /* @__PURE__ */ c(Pa, { children: "Are you sure you want to logout?" }),
2372
- /* @__PURE__ */ c(wa, { children: "You will be redirected to the login page." })
2364
+ /* @__PURE__ */ m(Ta, { children: [
2365
+ /* @__PURE__ */ c(Sa, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "outline", size: "sm", className: "w-full", children: "Logout" }) }),
2366
+ /* @__PURE__ */ m(_a, { children: [
2367
+ /* @__PURE__ */ m(Pa, { children: [
2368
+ /* @__PURE__ */ c(wa, { children: "Are you sure you want to logout?" }),
2369
+ /* @__PURE__ */ c(va, { children: "You will be redirected to the login page." })
2373
2370
  ] }),
2374
- /* @__PURE__ */ g(va, { children: [
2375
- /* @__PURE__ */ c(ba, { children: "Cancel" }),
2371
+ /* @__PURE__ */ m(ba, { children: [
2372
+ /* @__PURE__ */ c(Ia, { children: "Cancel" }),
2376
2373
  /* @__PURE__ */ c(
2377
- Ia,
2374
+ Na,
2378
2375
  {
2379
2376
  onClick: () => {
2380
- t(), Vr(n) && n();
2377
+ t(), Hr(n) && n();
2381
2378
  },
2382
2379
  children: "Logout"
2383
2380
  }
@@ -2387,13 +2384,13 @@ const xo = () => $(() => En, [En]), nu = (e) => {
2387
2384
  ] })
2388
2385
  ] })
2389
2386
  ] }) : null;
2390
- }, qo = {
2387
+ }, Vo = {
2391
2388
  id: Vs,
2392
2389
  label: "User Info",
2393
- button: Fo,
2390
+ button: Ko,
2394
2391
  position: "bottom"
2395
- }, Ko = () => {
2396
- rn(Ks, Mo), rn(qs, Ro), rn(Vs, qo);
2392
+ }, Ho = () => {
2393
+ rn(Ks, qo), rn(qs, Bo), rn(Vs, Vo);
2397
2394
  };
2398
2395
  var P = {
2399
2396
  context: void 0,
@@ -2414,21 +2411,21 @@ function as(e) {
2414
2411
  function lt(e) {
2415
2412
  P.context = e;
2416
2413
  }
2417
- var Hs = !1, Vo = (e, t) => e === t, Vt = Symbol("solid-proxy"), $s = typeof Proxy == "function", Qs = Symbol("solid-track"), Ht = {
2418
- equals: Vo
2419
- }, js = er, Pe = 1, $t = 2, zs = {
2414
+ var Hs = !1, $o = (e, t) => e === t, Ht = Symbol("solid-proxy"), $s = typeof Proxy == "function", Qs = Symbol("solid-track"), $t = {
2415
+ equals: $o
2416
+ }, js = er, Pe = 1, Qt = 2, Ws = {
2420
2417
  owned: null,
2421
2418
  cleanups: null,
2422
2419
  context: null,
2423
2420
  owner: null
2424
- }, dn = {}, N = null, fn = null, Ho = null, x = null, te = null, Se = null, tn = 0;
2421
+ }, dn = {}, N = null, fn = null, Qo = null, x = null, te = null, _e = null, tn = 0;
2425
2422
  function xe(e, t) {
2426
- const n = x, s = N, r = e.length === 0, a = t === void 0 ? s : t, i = r ? zs : {
2423
+ const n = x, s = N, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Ws : {
2427
2424
  owned: null,
2428
2425
  cleanups: null,
2429
2426
  context: a ? a.context : null,
2430
2427
  owner: a
2431
- }, o = r ? e : () => e(() => Z(() => ht(i)));
2428
+ }, o = r ? e : () => e(() => Z(() => gt(i)));
2432
2429
  N = i, x = null;
2433
2430
  try {
2434
2431
  return Ee(o, !0);
@@ -2437,7 +2434,7 @@ function xe(e, t) {
2437
2434
  }
2438
2435
  }
2439
2436
  function F(e, t) {
2440
- t = t ? Object.assign({}, Ht, t) : Ht;
2437
+ t = t ? Object.assign({}, $t, t) : $t;
2441
2438
  const n = {
2442
2439
  value: e,
2443
2440
  observers: null,
@@ -2446,7 +2443,7 @@ function F(e, t) {
2446
2443
  }, s = (r) => (typeof r == "function" && (r = r(n.value)), Zs(n, r));
2447
2444
  return [Xs.bind(n), s];
2448
2445
  }
2449
- function $o(e, t, n) {
2446
+ function jo(e, t, n) {
2450
2447
  const s = nn(e, t, !0, Pe);
2451
2448
  at(s);
2452
2449
  }
@@ -2454,73 +2451,73 @@ function Ge(e, t, n) {
2454
2451
  const s = nn(e, t, !1, Pe);
2455
2452
  at(s);
2456
2453
  }
2457
- function Ws(e, t, n) {
2458
- js = el;
2454
+ function zs(e, t, n) {
2455
+ js = nl;
2459
2456
  const s = nn(e, t, !1, Pe);
2460
- (!n || !n.render) && (s.user = !0), Se ? Se.push(s) : at(s);
2457
+ (!n || !n.render) && (s.user = !0), _e ? _e.push(s) : at(s);
2461
2458
  }
2462
2459
  function J(e, t, n) {
2463
- n = n ? Object.assign({}, Ht, n) : Ht;
2460
+ n = n ? Object.assign({}, $t, n) : $t;
2464
2461
  const s = nn(e, t, !0, 0);
2465
2462
  return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, at(s), Xs.bind(s);
2466
2463
  }
2467
- function Qo(e) {
2464
+ function Wo(e) {
2468
2465
  return e && typeof e == "object" && "then" in e;
2469
2466
  }
2470
- function jo(e, t, n) {
2467
+ function zo(e, t, n) {
2471
2468
  let s, r, a;
2472
2469
  s = !0, r = e, a = {};
2473
2470
  let i = null, o = dn, l = null, u = !1, f = "initialValue" in a, d = typeof s == "function" && J(s);
2474
- const h = /* @__PURE__ */ new Set(), [m, E] = (a.storage || F)(a.initialValue), [S, T] = F(void 0), [p, A] = F(void 0, {
2471
+ const h = /* @__PURE__ */ new Set(), [g, E] = (a.storage || F)(a.initialValue), [S, T] = F(void 0), [p, A] = F(void 0, {
2475
2472
  equals: !1
2476
2473
  }), [w, D] = F(f ? "ready" : "unresolved");
2477
2474
  P.context && (l = P.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : P.load && P.has(l) && (o = P.load(l)));
2478
- function U(v, I, W, Q) {
2475
+ function U(v, I, z, Q) {
2479
2476
  return i === v && (i = null, Q !== void 0 && (f = !0), (v === o || I === o) && a.onHydrated && queueMicrotask(() => a.onHydrated(Q, {
2480
2477
  value: I
2481
- })), o = dn, b(I, W)), I;
2478
+ })), o = dn, b(I, z)), I;
2482
2479
  }
2483
2480
  function b(v, I) {
2484
2481
  Ee(() => {
2485
2482
  I === void 0 && E(() => v), D(I !== void 0 ? "errored" : f ? "ready" : "unresolved"), T(I);
2486
- for (const W of h.keys()) W.decrement();
2483
+ for (const z of h.keys()) z.decrement();
2487
2484
  h.clear();
2488
2485
  }, !1);
2489
2486
  }
2490
- function Ae() {
2491
- const v = Jo, I = m(), W = S();
2492
- if (W !== void 0 && !i) throw W;
2487
+ function Te() {
2488
+ const v = Zo, I = g(), z = S();
2489
+ if (z !== void 0 && !i) throw z;
2493
2490
  return x && x.user, I;
2494
2491
  }
2495
- function Te(v = !0) {
2492
+ function Se(v = !0) {
2496
2493
  if (v !== !1 && u) return;
2497
2494
  u = !1;
2498
2495
  const I = d ? d() : s;
2499
2496
  if (I == null || I === !1) {
2500
- U(i, Z(m));
2497
+ U(i, Z(g));
2501
2498
  return;
2502
2499
  }
2503
- let W;
2500
+ let z;
2504
2501
  const Q = o !== dn ? o : Z(() => {
2505
2502
  try {
2506
2503
  return r(I, {
2507
- value: m(),
2504
+ value: g(),
2508
2505
  refetching: v
2509
2506
  });
2510
2507
  } catch (ce) {
2511
- W = ce;
2508
+ z = ce;
2512
2509
  }
2513
2510
  });
2514
- if (W !== void 0) {
2515
- U(i, void 0, Mt(W), I);
2511
+ if (z !== void 0) {
2512
+ U(i, void 0, Ft(z), I);
2516
2513
  return;
2517
- } else if (!Qo(Q))
2514
+ } else if (!Wo(Q))
2518
2515
  return U(i, Q, void 0, I), Q;
2519
- return i = Q, "v" in Q ? (Q.s === 1 ? U(i, Q.v, void 0, I) : U(i, void 0, Mt(Q.v), I), Q) : (u = !0, queueMicrotask(() => u = !1), Ee(() => {
2516
+ return i = Q, "v" in Q ? (Q.s === 1 ? U(i, Q.v, void 0, I) : U(i, void 0, Ft(Q.v), I), Q) : (u = !0, queueMicrotask(() => u = !1), Ee(() => {
2520
2517
  D(f ? "refreshing" : "pending"), A();
2521
- }, !1), Q.then((ce) => U(Q, ce, void 0, I), (ce) => U(Q, void 0, Mt(ce), I)));
2518
+ }, !1), Q.then((ce) => U(Q, ce, void 0, I), (ce) => U(Q, void 0, Ft(ce), I)));
2522
2519
  }
2523
- Object.defineProperties(Ae, {
2520
+ Object.defineProperties(Te, {
2524
2521
  state: {
2525
2522
  get: () => w()
2526
2523
  },
@@ -2535,20 +2532,20 @@ function jo(e, t, n) {
2535
2532
  },
2536
2533
  latest: {
2537
2534
  get() {
2538
- if (!f) return Ae();
2535
+ if (!f) return Te();
2539
2536
  const v = S();
2540
2537
  if (v && !i) throw v;
2541
- return m();
2538
+ return g();
2542
2539
  }
2543
2540
  }
2544
2541
  });
2545
2542
  let k = N;
2546
- return d ? $o(() => (k = N, Te(!1))) : Te(!1), [Ae, {
2547
- refetch: (v) => Ys(k, () => Te(v)),
2543
+ return d ? jo(() => (k = N, Se(!1))) : Se(!1), [Te, {
2544
+ refetch: (v) => Ys(k, () => Se(v)),
2548
2545
  mutate: E
2549
2546
  }];
2550
2547
  }
2551
- function su(e) {
2548
+ function ou(e) {
2552
2549
  return Ee(e, !1);
2553
2550
  }
2554
2551
  function Z(e) {
@@ -2561,7 +2558,7 @@ function Z(e) {
2561
2558
  x = t;
2562
2559
  }
2563
2560
  }
2564
- function ru(e, t, n) {
2561
+ function lu(e, t, n) {
2565
2562
  const s = Array.isArray(e);
2566
2563
  let r, a = n && n.defer;
2567
2564
  return (i) => {
@@ -2576,10 +2573,10 @@ function ru(e, t, n) {
2576
2573
  return r = o, l;
2577
2574
  };
2578
2575
  }
2579
- function zo(e) {
2580
- Ws(() => Z(e));
2576
+ function Yo(e) {
2577
+ zs(() => Z(e));
2581
2578
  }
2582
- function ft(e) {
2579
+ function ht(e) {
2583
2580
  return N === null || (N.cleanups === null ? N.cleanups = [e] : N.cleanups.push(e)), e;
2584
2581
  }
2585
2582
  function is() {
@@ -2596,7 +2593,7 @@ function Ys(e, t) {
2596
2593
  N = n, x = s;
2597
2594
  }
2598
2595
  }
2599
- function Wo(e) {
2596
+ function Jo(e) {
2600
2597
  const t = x, n = N;
2601
2598
  return Promise.resolve().then(() => {
2602
2599
  x = t, N = n;
@@ -2604,19 +2601,19 @@ function Wo(e) {
2604
2601
  return Ee(e, !1), x = N = null, s ? s.done : void 0;
2605
2602
  });
2606
2603
  }
2607
- var [Yo, au] = /* @__PURE__ */ F(!1);
2608
- function iu() {
2609
- return [Yo, Wo];
2604
+ var [Xo, cu] = /* @__PURE__ */ F(!1);
2605
+ function uu() {
2606
+ return [Xo, Jo];
2610
2607
  }
2611
- function ou(e, t) {
2608
+ function du(e, t) {
2612
2609
  const n = Symbol("context");
2613
2610
  return {
2614
2611
  id: n,
2615
- Provider: tl(n),
2612
+ Provider: sl(n),
2616
2613
  defaultValue: e
2617
2614
  };
2618
2615
  }
2619
- function lu(e) {
2616
+ function fu(e) {
2620
2617
  let t;
2621
2618
  return N && N.context && (t = N.context[e.id]) !== void 0 ? t : e.defaultValue;
2622
2619
  }
@@ -2627,13 +2624,13 @@ function Js(e) {
2627
2624
  return Array.isArray(s) ? s : s != null ? [s] : [];
2628
2625
  }, n;
2629
2626
  }
2630
- var Jo;
2627
+ var Zo;
2631
2628
  function Xs() {
2632
2629
  if (this.sources && this.state)
2633
2630
  if (this.state === Pe) at(this);
2634
2631
  else {
2635
2632
  const e = te;
2636
- te = null, Ee(() => jt(this), !1), te = e;
2633
+ te = null, Ee(() => Wt(this), !1), te = e;
2637
2634
  }
2638
2635
  if (x) {
2639
2636
  const e = this.observers ? this.observers.length : 0;
@@ -2646,7 +2643,7 @@ function Zs(e, t, n) {
2646
2643
  return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && Ee(() => {
2647
2644
  for (let r = 0; r < e.observers.length; r += 1) {
2648
2645
  const a = e.observers[r], i = fn && fn.running;
2649
- i && fn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? te.push(a) : Se.push(a), a.observers && tr(a)), i || (a.state = Pe);
2646
+ i && fn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? te.push(a) : _e.push(a), a.observers && tr(a)), i || (a.state = Pe);
2650
2647
  }
2651
2648
  if (te.length > 1e6)
2652
2649
  throw te = [], new Error();
@@ -2654,18 +2651,18 @@ function Zs(e, t, n) {
2654
2651
  }
2655
2652
  function at(e) {
2656
2653
  if (!e.fn) return;
2657
- ht(e);
2654
+ gt(e);
2658
2655
  const t = tn;
2659
- Xo(e, e.value, t);
2656
+ el(e, e.value, t);
2660
2657
  }
2661
- function Xo(e, t, n) {
2658
+ function el(e, t, n) {
2662
2659
  let s;
2663
2660
  const r = N, a = x;
2664
2661
  x = N = e;
2665
2662
  try {
2666
2663
  s = e.fn(t);
2667
2664
  } catch (i) {
2668
- return e.pure && (e.state = Pe, e.owned && e.owned.forEach(ht), e.owned = null), e.updatedAt = n + 1, Bn(i);
2665
+ return e.pure && (e.state = Pe, e.owned && e.owned.forEach(gt), e.owned = null), e.updatedAt = n + 1, Bn(i);
2669
2666
  } finally {
2670
2667
  x = a, N = r;
2671
2668
  }
@@ -2685,11 +2682,11 @@ function nn(e, t, n, s = Pe, r) {
2685
2682
  context: N ? N.context : null,
2686
2683
  pure: n
2687
2684
  };
2688
- return N === null || N !== zs && (N.owned ? N.owned.push(a) : N.owned = [a]), a;
2685
+ return N === null || N !== Ws && (N.owned ? N.owned.push(a) : N.owned = [a]), a;
2689
2686
  }
2690
- function Qt(e) {
2687
+ function jt(e) {
2691
2688
  if (e.state === 0) return;
2692
- if (e.state === $t) return jt(e);
2689
+ if (e.state === Qt) return Wt(e);
2693
2690
  if (e.suspense && Z(e.suspense.inFallback)) return e.suspense.effects.push(e);
2694
2691
  const t = [e];
2695
2692
  for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < tn); )
@@ -2697,35 +2694,35 @@ function Qt(e) {
2697
2694
  for (let n = t.length - 1; n >= 0; n--)
2698
2695
  if (e = t[n], e.state === Pe)
2699
2696
  at(e);
2700
- else if (e.state === $t) {
2697
+ else if (e.state === Qt) {
2701
2698
  const s = te;
2702
- te = null, Ee(() => jt(e, t[0]), !1), te = s;
2699
+ te = null, Ee(() => Wt(e, t[0]), !1), te = s;
2703
2700
  }
2704
2701
  }
2705
2702
  function Ee(e, t) {
2706
2703
  if (te) return e();
2707
2704
  let n = !1;
2708
- t || (te = []), Se ? n = !0 : Se = [], tn++;
2705
+ t || (te = []), _e ? n = !0 : _e = [], tn++;
2709
2706
  try {
2710
2707
  const s = e();
2711
- return Zo(n), s;
2708
+ return tl(n), s;
2712
2709
  } catch (s) {
2713
- n || (Se = null), te = null, Bn(s);
2710
+ n || (_e = null), te = null, Bn(s);
2714
2711
  }
2715
2712
  }
2716
- function Zo(e) {
2713
+ function tl(e) {
2717
2714
  if (te && (er(te), te = null), e) return;
2718
- const t = Se;
2719
- Se = null, t.length && Ee(() => js(t), !1);
2715
+ const t = _e;
2716
+ _e = null, t.length && Ee(() => js(t), !1);
2720
2717
  }
2721
2718
  function er(e) {
2722
- for (let t = 0; t < e.length; t++) Qt(e[t]);
2719
+ for (let t = 0; t < e.length; t++) jt(e[t]);
2723
2720
  }
2724
- function el(e) {
2721
+ function nl(e) {
2725
2722
  let t, n = 0;
2726
2723
  for (t = 0; t < e.length; t++) {
2727
2724
  const s = e[t];
2728
- s.user ? e[n++] = s : Qt(s);
2725
+ s.user ? e[n++] = s : jt(s);
2729
2726
  }
2730
2727
  if (P.context) {
2731
2728
  if (P.count) {
@@ -2734,25 +2731,25 @@ function el(e) {
2734
2731
  }
2735
2732
  lt();
2736
2733
  }
2737
- for (P.effects && (P.done || !P.count) && (e = [...P.effects, ...e], n += P.effects.length, delete P.effects), t = 0; t < n; t++) Qt(e[t]);
2734
+ for (P.effects && (P.done || !P.count) && (e = [...P.effects, ...e], n += P.effects.length, delete P.effects), t = 0; t < n; t++) jt(e[t]);
2738
2735
  }
2739
- function jt(e, t) {
2736
+ function Wt(e, t) {
2740
2737
  e.state = 0;
2741
2738
  for (let n = 0; n < e.sources.length; n += 1) {
2742
2739
  const s = e.sources[n];
2743
2740
  if (s.sources) {
2744
2741
  const r = s.state;
2745
- r === Pe ? s !== t && (!s.updatedAt || s.updatedAt < tn) && Qt(s) : r === $t && jt(s, t);
2742
+ r === Pe ? s !== t && (!s.updatedAt || s.updatedAt < tn) && jt(s) : r === Qt && Wt(s, t);
2746
2743
  }
2747
2744
  }
2748
2745
  }
2749
2746
  function tr(e) {
2750
2747
  for (let t = 0; t < e.observers.length; t += 1) {
2751
2748
  const n = e.observers[t];
2752
- n.state || (n.state = $t, n.pure ? te.push(n) : Se.push(n), n.observers && tr(n));
2749
+ n.state || (n.state = Qt, n.pure ? te.push(n) : _e.push(n), n.observers && tr(n));
2753
2750
  }
2754
2751
  }
2755
- function ht(e) {
2752
+ function gt(e) {
2756
2753
  let t;
2757
2754
  if (e.sources)
2758
2755
  for (; e.sources.length; ) {
@@ -2763,11 +2760,11 @@ function ht(e) {
2763
2760
  }
2764
2761
  }
2765
2762
  if (e.tOwned) {
2766
- for (t = e.tOwned.length - 1; t >= 0; t--) ht(e.tOwned[t]);
2763
+ for (t = e.tOwned.length - 1; t >= 0; t--) gt(e.tOwned[t]);
2767
2764
  delete e.tOwned;
2768
2765
  }
2769
2766
  if (e.owned) {
2770
- for (t = e.owned.length - 1; t >= 0; t--) ht(e.owned[t]);
2767
+ for (t = e.owned.length - 1; t >= 0; t--) gt(e.owned[t]);
2771
2768
  e.owned = null;
2772
2769
  }
2773
2770
  if (e.cleanups) {
@@ -2776,13 +2773,13 @@ function ht(e) {
2776
2773
  }
2777
2774
  e.state = 0;
2778
2775
  }
2779
- function Mt(e) {
2776
+ function Ft(e) {
2780
2777
  return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
2781
2778
  cause: e
2782
2779
  });
2783
2780
  }
2784
2781
  function Bn(e, t = N) {
2785
- throw Mt(e);
2782
+ throw Ft(e);
2786
2783
  }
2787
2784
  function pn(e) {
2788
2785
  if (typeof e == "function" && !e.length) return pn(e());
@@ -2796,7 +2793,7 @@ function pn(e) {
2796
2793
  }
2797
2794
  return e;
2798
2795
  }
2799
- function tl(e, t) {
2796
+ function sl(e, t) {
2800
2797
  return function(s) {
2801
2798
  let r;
2802
2799
  return Ge(() => r = Z(() => (N.context = {
@@ -2809,12 +2806,12 @@ var yn = Symbol("fallback");
2809
2806
  function zt(e) {
2810
2807
  for (let t = 0; t < e.length; t++) e[t]();
2811
2808
  }
2812
- function nl(e, t, n = {}) {
2809
+ function rl(e, t, n = {}) {
2813
2810
  let s = [], r = [], a = [], i = 0, o = t.length > 1 ? [] : null;
2814
- return ft(() => zt(a)), () => {
2811
+ return ht(() => zt(a)), () => {
2815
2812
  let l = e() || [], u = l.length, f, d;
2816
2813
  return l[Qs], Z(() => {
2817
- let m, E, S, T, p, A, w, D, U;
2814
+ let g, E, S, T, p, A, w, D, U;
2818
2815
  if (u === 0)
2819
2816
  i !== 0 && (zt(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [yn], r[0] = xe((b) => (a[0] = b, n.fallback())), i = 1);
2820
2817
  else if (i === 0) {
@@ -2825,18 +2822,18 @@ function nl(e, t, n = {}) {
2825
2822
  for (S = new Array(u), T = new Array(u), o && (p = new Array(u)), A = 0, w = Math.min(i, u); A < w && s[A] === l[A]; A++) ;
2826
2823
  for (w = i - 1, D = u - 1; w >= A && D >= A && s[w] === l[D]; w--, D--)
2827
2824
  S[D] = r[w], T[D] = a[w], o && (p[D] = o[w]);
2828
- for (m = /* @__PURE__ */ new Map(), E = new Array(D + 1), d = D; d >= A; d--)
2829
- U = l[d], f = m.get(U), E[d] = f === void 0 ? -1 : f, m.set(U, d);
2825
+ for (g = /* @__PURE__ */ new Map(), E = new Array(D + 1), d = D; d >= A; d--)
2826
+ U = l[d], f = g.get(U), E[d] = f === void 0 ? -1 : f, g.set(U, d);
2830
2827
  for (f = A; f <= w; f++)
2831
- U = s[f], d = m.get(U), d !== void 0 && d !== -1 ? (S[d] = r[f], T[d] = a[f], o && (p[d] = o[f]), d = E[d], m.set(U, d)) : a[f]();
2828
+ U = s[f], d = g.get(U), d !== void 0 && d !== -1 ? (S[d] = r[f], T[d] = a[f], o && (p[d] = o[f]), d = E[d], g.set(U, d)) : a[f]();
2832
2829
  for (d = A; d < u; d++)
2833
2830
  d in S ? (r[d] = S[d], a[d] = T[d], o && (o[d] = p[d], o[d](d))) : r[d] = xe(h);
2834
2831
  r = r.slice(0, i = u), s = l.slice(0);
2835
2832
  }
2836
2833
  return r;
2837
2834
  });
2838
- function h(m) {
2839
- if (a[d] = m, o) {
2835
+ function h(g) {
2836
+ if (a[d] = g, o) {
2840
2837
  const [E, S] = F(d);
2841
2838
  return o[d] = S, t(l[d], E);
2842
2839
  }
@@ -2844,9 +2841,9 @@ function nl(e, t, n = {}) {
2844
2841
  }
2845
2842
  };
2846
2843
  }
2847
- function sl(e, t, n = {}) {
2844
+ function al(e, t, n = {}) {
2848
2845
  let s = [], r = [], a = [], i = [], o = 0, l;
2849
- return ft(() => zt(a)), () => {
2846
+ return ht(() => zt(a)), () => {
2850
2847
  const u = e() || [], f = u.length;
2851
2848
  return u[Qs], Z(() => {
2852
2849
  if (f === 0)
@@ -2859,26 +2856,26 @@ function sl(e, t, n = {}) {
2859
2856
  });
2860
2857
  function d(h) {
2861
2858
  a[l] = h;
2862
- const [m, E] = F(u[l]);
2863
- return i[l] = E, t(m, l);
2859
+ const [g, E] = F(u[l]);
2860
+ return i[l] = E, t(g, l);
2864
2861
  }
2865
2862
  };
2866
2863
  }
2867
2864
  function nr(e, t) {
2868
2865
  return Z(() => e(t || {}));
2869
2866
  }
2870
- function xt() {
2867
+ function Gt() {
2871
2868
  return !0;
2872
2869
  }
2873
2870
  var An = {
2874
2871
  get(e, t, n) {
2875
- return t === Vt ? n : e.get(t);
2872
+ return t === Ht ? n : e.get(t);
2876
2873
  },
2877
2874
  has(e, t) {
2878
- return t === Vt ? !0 : e.has(t);
2875
+ return t === Ht ? !0 : e.has(t);
2879
2876
  },
2880
- set: xt,
2881
- deleteProperty: xt,
2877
+ set: Gt,
2878
+ deleteProperty: Gt,
2882
2879
  getOwnPropertyDescriptor(e, t) {
2883
2880
  return {
2884
2881
  configurable: !0,
@@ -2886,8 +2883,8 @@ var An = {
2886
2883
  get() {
2887
2884
  return e.get(t);
2888
2885
  },
2889
- set: xt,
2890
- deleteProperty: xt
2886
+ set: Gt,
2887
+ deleteProperty: Gt
2891
2888
  };
2892
2889
  },
2893
2890
  ownKeys(e) {
@@ -2897,7 +2894,7 @@ var An = {
2897
2894
  function hn(e) {
2898
2895
  return (e = typeof e == "function" ? e() : e) ? e : {};
2899
2896
  }
2900
- function rl() {
2897
+ function il() {
2901
2898
  for (let e = 0, t = this.length; e < t; ++e) {
2902
2899
  const n = this[e]();
2903
2900
  if (n !== void 0) return n;
@@ -2907,7 +2904,7 @@ function sr(...e) {
2907
2904
  let t = !1;
2908
2905
  for (let i = 0; i < e.length; i++) {
2909
2906
  const o = e[i];
2910
- t = t || !!o && Vt in o, e[i] = typeof o == "function" ? (t = !0, J(o)) : o;
2907
+ t = t || !!o && Ht in o, e[i] = typeof o == "function" ? (t = !0, J(o)) : o;
2911
2908
  }
2912
2909
  if ($s && t)
2913
2910
  return new Proxy({
@@ -2941,7 +2938,7 @@ function sr(...e) {
2941
2938
  s[f] = d.get ? {
2942
2939
  enumerable: !0,
2943
2940
  configurable: !0,
2944
- get: rl.bind(n[f] = [d.get.bind(o)])
2941
+ get: il.bind(n[f] = [d.get.bind(o)])
2945
2942
  } : d.value !== void 0 ? d : void 0;
2946
2943
  else {
2947
2944
  const h = n[f];
@@ -2956,8 +2953,8 @@ function sr(...e) {
2956
2953
  }
2957
2954
  return r;
2958
2955
  }
2959
- function al(e, ...t) {
2960
- if ($s && Vt in e) {
2956
+ function ol(e, ...t) {
2957
+ if ($s && Ht in e) {
2961
2958
  const r = new Set(t.length > 1 ? t.flat() : t[0]), a = t.map((i) => new Proxy({
2962
2959
  get(o) {
2963
2960
  return i.includes(o) ? e[o] : void 0;
@@ -3001,7 +2998,7 @@ function rr(e) {
3001
2998
  !P.done && lt(a), P.count--, l(() => u.default), lt();
3002
2999
  }), t = o;
3003
3000
  } else if (!t) {
3004
- const [o] = jo(() => (n || (n = e())).then((l) => l.default));
3001
+ const [o] = zo(() => (n || (n = e())).then((l) => l.default));
3005
3002
  t = o;
3006
3003
  }
3007
3004
  let i;
@@ -3015,24 +3012,24 @@ function rr(e) {
3015
3012
  };
3016
3013
  return s.preload = () => n || ((n = e()).then((r) => t = () => r.default), n), s;
3017
3014
  }
3018
- var il = 0;
3019
- function cu() {
3020
- return P.context ? P.getNextContextId() : `cl-${il++}`;
3015
+ var ll = 0;
3016
+ function hu() {
3017
+ return P.context ? P.getNextContextId() : `cl-${ll++}`;
3021
3018
  }
3022
3019
  var ar = (e) => `Stale read from <${e}>.`;
3023
- function uu(e) {
3020
+ function gu(e) {
3024
3021
  const t = "fallback" in e && {
3025
3022
  fallback: () => e.fallback
3026
3023
  };
3027
- return J(nl(() => e.each, e.children, t || void 0));
3024
+ return J(rl(() => e.each, e.children, t || void 0));
3028
3025
  }
3029
- function du(e) {
3026
+ function mu(e) {
3030
3027
  const t = "fallback" in e && {
3031
3028
  fallback: () => e.fallback
3032
3029
  };
3033
- return J(sl(() => e.each, e.children, t || void 0));
3030
+ return J(al(() => e.each, e.children, t || void 0));
3034
3031
  }
3035
- function fu(e) {
3032
+ function Eu(e) {
3036
3033
  const t = e.keyed, n = J(() => e.when, void 0, void 0), s = t ? n : J(n, void 0, {
3037
3034
  equals: (r, a) => !r == !a
3038
3035
  });
@@ -3048,14 +3045,14 @@ function fu(e) {
3048
3045
  return e.fallback;
3049
3046
  }, void 0, void 0);
3050
3047
  }
3051
- function hu(e) {
3048
+ function pu(e) {
3052
3049
  const t = Js(() => e.children), n = J(() => {
3053
3050
  const s = t(), r = Array.isArray(s) ? s : [s];
3054
3051
  let a = () => {
3055
3052
  };
3056
3053
  for (let i = 0; i < r.length; i++) {
3057
3054
  const o = i, l = r[i], u = a, f = J(() => u() ? void 0 : l.when, void 0, void 0), d = l.keyed ? f : J(f, void 0, {
3058
- equals: (h, m) => !h == !m
3055
+ equals: (h, g) => !h == !g
3059
3056
  });
3060
3057
  a = () => u() || (d() ? [o, f, l] : void 0);
3061
3058
  }
@@ -3072,13 +3069,13 @@ function hu(e) {
3072
3069
  })) : o;
3073
3070
  }, void 0, void 0);
3074
3071
  }
3075
- function gu(e) {
3072
+ function yu(e) {
3076
3073
  return e;
3077
3074
  }
3078
- var ol = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], ll = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...ol]), cl = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), ul = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
3075
+ var cl = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], ul = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...cl]), dl = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), fl = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
3079
3076
  className: "class",
3080
3077
  htmlFor: "for"
3081
- }), dl = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
3078
+ }), hl = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
3082
3079
  class: "className",
3083
3080
  novalidate: {
3084
3081
  $: "noValidate",
@@ -3107,11 +3104,11 @@ var ol = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
3107
3104
  TEXTAREA: 1
3108
3105
  }
3109
3106
  });
3110
- function fl(e, t) {
3111
- const n = dl[e];
3107
+ function gl(e, t) {
3108
+ const n = hl[e];
3112
3109
  return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
3113
3110
  }
3114
- var hl = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]), gl = /* @__PURE__ */ new Set([
3111
+ var ml = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]), El = /* @__PURE__ */ new Set([
3115
3112
  "altGlyph",
3116
3113
  "altGlyphDef",
3117
3114
  "altGlyphItem",
@@ -3189,11 +3186,11 @@ var hl = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
3189
3186
  "use",
3190
3187
  "view",
3191
3188
  "vkern"
3192
- ]), ml = {
3189
+ ]), pl = {
3193
3190
  xlink: "http://www.w3.org/1999/xlink",
3194
3191
  xml: "http://www.w3.org/XML/1998/namespace"
3195
- }, mu = (e) => J(() => e());
3196
- function El(e, t, n) {
3192
+ }, Au = (e) => J(() => e());
3193
+ function yl(e, t, n) {
3197
3194
  let s = n.length, r = t.length, a = s, i = 0, o = 0, l = t[r - 1].nextSibling, u = null;
3198
3195
  for (; i < r || o < a; ) {
3199
3196
  if (t[i] === n[o]) {
@@ -3220,8 +3217,8 @@ function El(e, t, n) {
3220
3217
  const f = u.get(t[i]);
3221
3218
  if (f != null)
3222
3219
  if (o < f && f < a) {
3223
- let d = i, h = 1, m;
3224
- for (; ++d < r && d < a && !((m = u.get(t[d])) == null || m !== f + h); )
3220
+ let d = i, h = 1, g;
3221
+ for (; ++d < r && d < a && !((g = u.get(t[d])) == null || g !== f + h); )
3225
3222
  h++;
3226
3223
  if (h > f - o) {
3227
3224
  const E = t[i];
@@ -3241,7 +3238,7 @@ function ir(e, t, n, s = {}) {
3241
3238
  r(), t.textContent = "";
3242
3239
  };
3243
3240
  }
3244
- function Eu(e, t, n, s) {
3241
+ function Tu(e, t, n, s) {
3245
3242
  let r;
3246
3243
  const a = () => {
3247
3244
  const o = document.createElement("template");
@@ -3249,14 +3246,14 @@ function Eu(e, t, n, s) {
3249
3246
  }, i = () => (r || (r = a())).cloneNode(!0);
3250
3247
  return i.cloneNode = i, i;
3251
3248
  }
3252
- function pl(e, t = window.document) {
3249
+ function Al(e, t = window.document) {
3253
3250
  const n = t[ut] || (t[ut] = /* @__PURE__ */ new Set());
3254
3251
  for (let s = 0, r = e.length; s < r; s++) {
3255
3252
  const a = e[s];
3256
3253
  n.has(a) || (n.add(a), t.addEventListener(a, or));
3257
3254
  }
3258
3255
  }
3259
- function pu(e = window.document) {
3256
+ function Su(e = window.document) {
3260
3257
  if (e[ut]) {
3261
3258
  for (let t of e[ut].keys()) e.removeEventListener(t, or);
3262
3259
  delete e[ut];
@@ -3265,16 +3262,16 @@ function pu(e = window.document) {
3265
3262
  function Tn(e, t, n) {
3266
3263
  Me(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
3267
3264
  }
3268
- function yl(e, t, n, s) {
3265
+ function Tl(e, t, n, s) {
3269
3266
  Me(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
3270
3267
  }
3271
- function Al(e, t, n) {
3268
+ function Sl(e, t, n) {
3272
3269
  Me(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
3273
3270
  }
3274
- function Tl(e, t) {
3271
+ function _l(e, t) {
3275
3272
  Me(e) || (t == null ? e.removeAttribute("class") : e.className = t);
3276
3273
  }
3277
- function Sl(e, t, n, s) {
3274
+ function Pl(e, t, n, s) {
3278
3275
  if (s)
3279
3276
  Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
3280
3277
  else if (Array.isArray(n)) {
@@ -3282,7 +3279,7 @@ function Sl(e, t, n, s) {
3282
3279
  e.addEventListener(t, n[0] = (a) => r.call(e, n[1], a));
3283
3280
  } else e.addEventListener(t, n, typeof n != "function" && n);
3284
3281
  }
3285
- function _l(e, t, n = {}) {
3282
+ function wl(e, t, n = {}) {
3286
3283
  const s = Object.keys(t || {}), r = Object.keys(n);
3287
3284
  let a, i;
3288
3285
  for (a = 0, i = r.length; a < i; a++) {
@@ -3295,7 +3292,7 @@ function _l(e, t, n = {}) {
3295
3292
  }
3296
3293
  return n;
3297
3294
  }
3298
- function Pl(e, t, n) {
3295
+ function vl(e, t, n) {
3299
3296
  if (!t) return n ? Tn(e, "style") : t;
3300
3297
  const s = e.style;
3301
3298
  if (typeof t == "string") return s.cssText = t;
@@ -3307,18 +3304,18 @@ function Pl(e, t, n) {
3307
3304
  r = t[a], r !== n[a] && (s.setProperty(a, r), n[a] = r);
3308
3305
  return n;
3309
3306
  }
3310
- function wl(e, t = {}, n, s) {
3307
+ function bl(e, t = {}, n, s) {
3311
3308
  const r = {};
3312
- return s || Ge(() => r.children = gt(e, t.children, r.children)), Ge(() => typeof t.ref == "function" && vl(t.ref, e)), Ge(() => bl(e, t, n, !0, r, !0)), r;
3309
+ return s || Ge(() => r.children = mt(e, t.children, r.children)), Ge(() => typeof t.ref == "function" && Il(t.ref, e)), Ge(() => Nl(e, t, n, !0, r, !0)), r;
3313
3310
  }
3314
- function vl(e, t, n) {
3311
+ function Il(e, t, n) {
3315
3312
  return Z(() => e(t, n));
3316
3313
  }
3317
3314
  function Sn(e, t, n, s) {
3318
- if (n !== void 0 && !s && (s = []), typeof t != "function") return gt(e, t, s, n);
3319
- Ge((r) => gt(e, t(), r, n), s);
3315
+ if (n !== void 0 && !s && (s = []), typeof t != "function") return mt(e, t, s, n);
3316
+ Ge((r) => mt(e, t(), r, n), s);
3320
3317
  }
3321
- function bl(e, t, n, s, r = {}, a = !1) {
3318
+ function Nl(e, t, n, s, r = {}, a = !1) {
3322
3319
  t || (t = {});
3323
3320
  for (const i in r)
3324
3321
  if (!(i in t)) {
@@ -3332,14 +3329,14 @@ function bl(e, t, n, s, r = {}, a = !1) {
3332
3329
  r[i] = ls(e, i, o, r[i], n, a, t);
3333
3330
  }
3334
3331
  }
3335
- function Il(e) {
3332
+ function Cl(e) {
3336
3333
  let t, n;
3337
- return !Me() || !(t = P.registry.get(n = Cl())) ? e() : (P.completed && P.completed.add(t), P.registry.delete(n), t);
3334
+ return !Me() || !(t = P.registry.get(n = kl())) ? e() : (P.completed && P.completed.add(t), P.registry.delete(n), t);
3338
3335
  }
3339
3336
  function Me(e) {
3340
3337
  return !!P.context && !P.done && (!e || e.isConnected);
3341
3338
  }
3342
- function Nl(e) {
3339
+ function Ll(e) {
3343
3340
  return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
3344
3341
  }
3345
3342
  function os(e, t, n) {
@@ -3348,8 +3345,8 @@ function os(e, t, n) {
3348
3345
  }
3349
3346
  function ls(e, t, n, s, r, a, i) {
3350
3347
  let o, l, u, f, d;
3351
- if (t === "style") return Pl(e, n, s);
3352
- if (t === "classList") return _l(e, n, s);
3348
+ if (t === "style") return vl(e, n, s);
3349
+ if (t === "classList") return wl(e, n, s);
3353
3350
  if (n === s) return s;
3354
3351
  if (t === "ref")
3355
3352
  a || n(e);
@@ -3360,24 +3357,24 @@ function ls(e, t, n, s, r, a, i) {
3360
3357
  const h = t.slice(10);
3361
3358
  s && e.removeEventListener(h, s, !0), n && e.addEventListener(h, n, !0);
3362
3359
  } else if (t.slice(0, 2) === "on") {
3363
- const h = t.slice(2).toLowerCase(), m = hl.has(h);
3364
- if (!m && s) {
3360
+ const h = t.slice(2).toLowerCase(), g = ml.has(h);
3361
+ if (!g && s) {
3365
3362
  const E = Array.isArray(s) ? s[0] : s;
3366
3363
  e.removeEventListener(h, E);
3367
3364
  }
3368
- (m || n) && (Sl(e, h, n, m), m && pl([h]));
3365
+ (g || n) && (Pl(e, h, n, g), g && Al([h]));
3369
3366
  } else if (t.slice(0, 5) === "attr:")
3370
3367
  Tn(e, t.slice(5), n);
3371
3368
  else if (t.slice(0, 5) === "bool:")
3372
- Al(e, t.slice(5), n);
3373
- else if ((d = t.slice(0, 5) === "prop:") || (u = cl.has(t)) || !r && ((f = fl(t, e.tagName)) || (l = ll.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
3369
+ Sl(e, t.slice(5), n);
3370
+ else if ((d = t.slice(0, 5) === "prop:") || (u = dl.has(t)) || !r && ((f = gl(t, e.tagName)) || (l = ul.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
3374
3371
  if (d)
3375
3372
  t = t.slice(5), l = !0;
3376
3373
  else if (Me(e)) return n;
3377
- t === "class" || t === "className" ? Tl(e, n) : o && !l && !u ? e[Nl(t)] = n : e[f || t] = n;
3374
+ t === "class" || t === "className" ? _l(e, n) : o && !l && !u ? e[Ll(t)] = n : e[f || t] = n;
3378
3375
  } else {
3379
- const h = r && t.indexOf(":") > -1 && ml[t.split(":")[0]];
3380
- h ? yl(e, h, t, n) : Tn(e, ul[t] || t, n);
3376
+ const h = r && t.indexOf(":") > -1 && pl[t.split(":")[0]];
3377
+ h ? Tl(e, h, t, n) : Tn(e, fl[t] || t, n);
3381
3378
  }
3382
3379
  return n;
3383
3380
  }
@@ -3417,7 +3414,7 @@ function or(e) {
3417
3414
  } else o();
3418
3415
  a(s);
3419
3416
  }
3420
- function gt(e, t, n, s, r) {
3417
+ function mt(e, t, n, s, r) {
3421
3418
  const a = Me(e);
3422
3419
  if (a) {
3423
3420
  !n && (n = [...e.childNodes]);
@@ -3447,12 +3444,12 @@ function gt(e, t, n, s, r) {
3447
3444
  return Ge(() => {
3448
3445
  let l = t();
3449
3446
  for (; typeof l == "function"; ) l = l();
3450
- n = gt(e, l, n, s);
3447
+ n = mt(e, l, n, s);
3451
3448
  }), () => n;
3452
3449
  if (Array.isArray(t)) {
3453
3450
  const l = [], u = n && Array.isArray(n);
3454
3451
  if (_n(l, t, n, r))
3455
- return Ge(() => n = gt(e, l, n, s, !0)), () => n;
3452
+ return Ge(() => n = mt(e, l, n, s, !0)), () => n;
3456
3453
  if (a) {
3457
3454
  if (!l.length) return n;
3458
3455
  if (s === void 0) return n = [...e.childNodes];
@@ -3464,7 +3461,7 @@ function gt(e, t, n, s, r) {
3464
3461
  }
3465
3462
  if (l.length === 0) {
3466
3463
  if (n = Fe(e, n, s), o) return n;
3467
- } else u ? n.length === 0 ? cs(e, l, s) : El(e, n, l) : (n && Fe(e), cs(e, l));
3464
+ } else u ? n.length === 0 ? cs(e, l, s) : yl(e, n, l) : (n && Fe(e), cs(e, l));
3468
3465
  n = l;
3469
3466
  } else if (t.nodeType) {
3470
3467
  if (a && t.parentNode) return n = o ? [t] : t;
@@ -3516,24 +3513,24 @@ function Fe(e, t, n, s) {
3516
3513
  } else e.insertBefore(r, n);
3517
3514
  return [r];
3518
3515
  }
3519
- function Cl() {
3516
+ function kl() {
3520
3517
  return P.getNextContextId();
3521
3518
  }
3522
- var Ll = "http://www.w3.org/2000/svg";
3519
+ var Dl = "http://www.w3.org/2000/svg";
3523
3520
  function lr(e, t = !1) {
3524
- return t ? document.createElementNS(Ll, e) : document.createElement(e);
3521
+ return t ? document.createElementNS(Dl, e) : document.createElement(e);
3525
3522
  }
3526
- function yu(e) {
3523
+ function _u(e) {
3527
3524
  const {
3528
3525
  useShadow: t
3529
3526
  } = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = is();
3530
3527
  let a, i = !!P.context;
3531
- return Ws(() => {
3528
+ return zs(() => {
3532
3529
  i && (is().user = i = !1), a || (a = Ys(r, () => J(() => e.children)));
3533
3530
  const o = s();
3534
3531
  if (o instanceof HTMLHeadElement) {
3535
3532
  const [l, u] = F(!1), f = () => u(!0);
3536
- xe((d) => Sn(o, () => l() ? d() : a(), null)), ft(f);
3533
+ xe((d) => Sn(o, () => l() ? d() : a(), null)), ht(f);
3537
3534
  } else {
3538
3535
  const l = lr(e.isSVG ? "g" : "div", e.isSVG), u = t && l.attachShadow ? l.attachShadow({
3539
3536
  mode: "open"
@@ -3543,13 +3540,13 @@ function yu(e) {
3543
3540
  return n.parentNode;
3544
3541
  },
3545
3542
  configurable: !0
3546
- }), Sn(u, a), o.appendChild(l), e.ref && e.ref(l), ft(() => o.removeChild(l));
3543
+ }), Sn(u, a), o.appendChild(l), e.ref && e.ref(l), ht(() => o.removeChild(l));
3547
3544
  }
3548
3545
  }, void 0, {
3549
3546
  render: !i
3550
3547
  }), n;
3551
3548
  }
3552
- function kl(e, t) {
3549
+ function xl(e, t) {
3553
3550
  const n = J(e);
3554
3551
  return J(() => {
3555
3552
  const s = n();
@@ -3557,16 +3554,16 @@ function kl(e, t) {
3557
3554
  case "function":
3558
3555
  return Z(() => s(t));
3559
3556
  case "string":
3560
- const r = gl.has(s), a = P.context ? Il() : lr(s, r);
3561
- return wl(a, t, r), a;
3557
+ const r = El.has(s), a = P.context ? Cl() : lr(s, r);
3558
+ return bl(a, t, r), a;
3562
3559
  }
3563
3560
  });
3564
3561
  }
3565
- function Au(e) {
3566
- const [, t] = al(e, ["component"]);
3567
- return kl(() => e.component, t);
3562
+ function Pu(e) {
3563
+ const [, t] = ol(e, ["component"]);
3564
+ return xl(() => e.component, t);
3568
3565
  }
3569
- var Dl = class {
3566
+ var Gl = class {
3570
3567
  constructor() {
3571
3568
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
3572
3569
  }
@@ -3584,7 +3581,7 @@ var Dl = class {
3584
3581
  }
3585
3582
  }, cr = class {
3586
3583
  constructor(e) {
3587
- this.generateIdentifier = e, this.kv = new Dl();
3584
+ this.generateIdentifier = e, this.kv = new Gl();
3588
3585
  }
3589
3586
  register(e, t) {
3590
3587
  this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
@@ -3598,7 +3595,7 @@ var Dl = class {
3598
3595
  getValue(e) {
3599
3596
  return this.kv.getByKey(e);
3600
3597
  }
3601
- }, xl = class extends cr {
3598
+ }, Ol = class extends cr {
3602
3599
  constructor() {
3603
3600
  super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
3604
3601
  }
@@ -3609,7 +3606,7 @@ var Dl = class {
3609
3606
  return this.classToAllowedProps.get(e);
3610
3607
  }
3611
3608
  };
3612
- function Gl(e) {
3609
+ function Rl(e) {
3613
3610
  if ("values" in Object)
3614
3611
  return Object.values(e);
3615
3612
  const t = [];
@@ -3617,8 +3614,8 @@ function Gl(e) {
3617
3614
  e.hasOwnProperty(n) && t.push(e[n]);
3618
3615
  return t;
3619
3616
  }
3620
- function Ol(e, t) {
3621
- const n = Gl(e);
3617
+ function Ul(e, t) {
3618
+ const n = Rl(e);
3622
3619
  if ("find" in n)
3623
3620
  return n.find(t);
3624
3621
  const s = n;
@@ -3631,7 +3628,7 @@ function Ol(e, t) {
3631
3628
  function rt(e, t) {
3632
3629
  Object.entries(e).forEach(([n, s]) => t(s, n));
3633
3630
  }
3634
- function Ft(e, t) {
3631
+ function qt(e, t) {
3635
3632
  return e.indexOf(t) !== -1;
3636
3633
  }
3637
3634
  function us(e, t) {
@@ -3641,7 +3638,7 @@ function us(e, t) {
3641
3638
  return s;
3642
3639
  }
3643
3640
  }
3644
- var Rl = class {
3641
+ var Bl = class {
3645
3642
  constructor() {
3646
3643
  this.transfomers = {};
3647
3644
  }
@@ -3649,12 +3646,12 @@ var Rl = class {
3649
3646
  this.transfomers[e.name] = e;
3650
3647
  }
3651
3648
  findApplicable(e) {
3652
- return Ol(this.transfomers, (t) => t.isApplicable(e));
3649
+ return Ul(this.transfomers, (t) => t.isApplicable(e));
3653
3650
  }
3654
3651
  findByName(e) {
3655
3652
  return this.transfomers[e];
3656
3653
  }
3657
- }, Ul = (e) => Object.prototype.toString.call(e).slice(8, -1), ur = (e) => typeof e > "u", Bl = (e) => e === null, mt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Pn = (e) => mt(e) && Object.keys(e).length === 0, be = (e) => Array.isArray(e), Ml = (e) => typeof e == "string", Fl = (e) => typeof e == "number" && !isNaN(e), ql = (e) => typeof e == "boolean", Kl = (e) => e instanceof RegExp, Et = (e) => e instanceof Map, pt = (e) => e instanceof Set, dr = (e) => Ul(e) === "Symbol", Vl = (e) => e instanceof Date && !isNaN(e.valueOf()), Hl = (e) => e instanceof Error, ds = (e) => typeof e == "number" && isNaN(e), $l = (e) => ql(e) || Bl(e) || ur(e) || Fl(e) || Ml(e) || dr(e), Ql = (e) => typeof e == "bigint", jl = (e) => e === 1 / 0 || e === -1 / 0, zl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Wl = (e) => e instanceof URL, fr = (e) => e.replace(/\./g, "\\."), gn = (e) => e.map(String).map(fr).join("."), dt = (e) => {
3654
+ }, Ml = (e) => Object.prototype.toString.call(e).slice(8, -1), ur = (e) => typeof e > "u", Fl = (e) => e === null, Et = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Pn = (e) => Et(e) && Object.keys(e).length === 0, be = (e) => Array.isArray(e), ql = (e) => typeof e == "string", Kl = (e) => typeof e == "number" && !isNaN(e), Vl = (e) => typeof e == "boolean", Hl = (e) => e instanceof RegExp, pt = (e) => e instanceof Map, yt = (e) => e instanceof Set, dr = (e) => Ml(e) === "Symbol", $l = (e) => e instanceof Date && !isNaN(e.valueOf()), Ql = (e) => e instanceof Error, ds = (e) => typeof e == "number" && isNaN(e), jl = (e) => Vl(e) || Fl(e) || ur(e) || Kl(e) || ql(e) || dr(e), Wl = (e) => typeof e == "bigint", zl = (e) => e === 1 / 0 || e === -1 / 0, Yl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Jl = (e) => e instanceof URL, fr = (e) => e.replace(/\./g, "\\."), gn = (e) => e.map(String).map(fr).join("."), dt = (e) => {
3658
3655
  const t = [];
3659
3656
  let n = "";
3660
3657
  for (let r = 0; r < e.length; r++) {
@@ -3683,9 +3680,9 @@ function ge(e, t, n, s) {
3683
3680
  var hr = [
3684
3681
  ge(ur, "undefined", () => null, () => {
3685
3682
  }),
3686
- ge(Ql, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
3687
- ge(Vl, "Date", (e) => e.toISOString(), (e) => new Date(e)),
3688
- ge(Hl, "Error", (e, t) => {
3683
+ ge(Wl, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
3684
+ ge($l, "Date", (e) => e.toISOString(), (e) => new Date(e)),
3685
+ ge(Ql, "Error", (e, t) => {
3689
3686
  const n = {
3690
3687
  name: e.name,
3691
3688
  message: e.message
@@ -3699,22 +3696,22 @@ var hr = [
3699
3696
  n[s] = e[s];
3700
3697
  }), n;
3701
3698
  }),
3702
- ge(Kl, "regexp", (e) => "" + e, (e) => {
3699
+ ge(Hl, "regexp", (e) => "" + e, (e) => {
3703
3700
  const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
3704
3701
  return new RegExp(t, n);
3705
3702
  }),
3706
3703
  ge(
3707
- pt,
3704
+ yt,
3708
3705
  "set",
3709
3706
  // (sets only exist in es6+)
3710
3707
  // eslint-disable-next-line es5/no-es6-methods
3711
3708
  (e) => [...e.values()],
3712
3709
  (e) => new Set(e)
3713
3710
  ),
3714
- ge(Et, "map", (e) => [...e.entries()], (e) => new Map(e)),
3715
- ge((e) => ds(e) || jl(e), "number", (e) => ds(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
3711
+ ge(pt, "map", (e) => [...e.entries()], (e) => new Map(e)),
3712
+ ge((e) => ds(e) || zl(e), "number", (e) => ds(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
3716
3713
  ge((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
3717
- ge(Wl, "URL", (e) => e.toString(), (e) => new URL(e))
3714
+ ge(Jl, "URL", (e) => e.toString(), (e) => new URL(e))
3718
3715
  ];
3719
3716
  function sn(e, t, n, s) {
3720
3717
  return {
@@ -3729,7 +3726,7 @@ var gr = sn((e, t) => dr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
3729
3726
  if (!s)
3730
3727
  throw new Error("Trying to deserialize unknown symbol");
3731
3728
  return s;
3732
- }), Yl = [
3729
+ }), Xl = [
3733
3730
  Int8Array,
3734
3731
  Uint8Array,
3735
3732
  Int16Array,
@@ -3739,8 +3736,8 @@ var gr = sn((e, t) => dr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
3739
3736
  Float32Array,
3740
3737
  Float64Array,
3741
3738
  Uint8ClampedArray
3742
- ].reduce((e, t) => (e[t.name] = t, e), {}), mr = sn(zl, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
3743
- const n = Yl[t[1]];
3739
+ ].reduce((e, t) => (e[t.name] = t, e), {}), mr = sn(Yl, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
3740
+ const n = Xl[t[1]];
3744
3741
  if (!n)
3745
3742
  throw new Error("Trying to deserialize unknown typed array");
3746
3743
  return new n(e);
@@ -3766,8 +3763,8 @@ var pr = sn(Er, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
3766
3763
  if (!s)
3767
3764
  throw new Error("Trying to deserialize unknown custom value");
3768
3765
  return s.deserialize(e);
3769
- }), Jl = [pr, gr, yr, mr], fs = (e, t) => {
3770
- const n = us(Jl, (r) => r.isApplicable(e, t));
3766
+ }), Zl = [pr, gr, yr, mr], fs = (e, t) => {
3767
+ const n = us(Zl, (r) => r.isApplicable(e, t));
3771
3768
  if (n)
3772
3769
  return {
3773
3770
  value: n.transform(e, t),
@@ -3783,7 +3780,7 @@ var pr = sn(Er, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
3783
3780
  hr.forEach((e) => {
3784
3781
  Ar[e.annotation] = e;
3785
3782
  });
3786
- var Xl = (e, t, n) => {
3783
+ var ec = (e, t, n) => {
3787
3784
  if (be(t))
3788
3785
  switch (t[0]) {
3789
3786
  case "symbol":
@@ -3812,20 +3809,20 @@ var Xl = (e, t, n) => {
3812
3809
  return n.next().value;
3813
3810
  };
3814
3811
  function Tr(e) {
3815
- if (Ft(e, "__proto__"))
3812
+ if (qt(e, "__proto__"))
3816
3813
  throw new Error("__proto__ is not allowed as a property");
3817
- if (Ft(e, "prototype"))
3814
+ if (qt(e, "prototype"))
3818
3815
  throw new Error("prototype is not allowed as a property");
3819
- if (Ft(e, "constructor"))
3816
+ if (qt(e, "constructor"))
3820
3817
  throw new Error("constructor is not allowed as a property");
3821
3818
  }
3822
- var Zl = (e, t) => {
3819
+ var tc = (e, t) => {
3823
3820
  Tr(t);
3824
3821
  for (let n = 0; n < t.length; n++) {
3825
3822
  const s = t[n];
3826
- if (pt(e))
3823
+ if (yt(e))
3827
3824
  e = Ke(e, +s);
3828
- else if (Et(e)) {
3825
+ else if (pt(e)) {
3829
3826
  const r = +s, a = +t[++n] == 0 ? "key" : "value", i = Ke(e, r);
3830
3827
  switch (a) {
3831
3828
  case "key":
@@ -3848,12 +3845,12 @@ var Zl = (e, t) => {
3848
3845
  if (be(s)) {
3849
3846
  const o = +i;
3850
3847
  s = s[o];
3851
- } else if (mt(s))
3848
+ } else if (Et(s))
3852
3849
  s = s[i];
3853
- else if (pt(s)) {
3850
+ else if (yt(s)) {
3854
3851
  const o = +i;
3855
3852
  s = Ke(s, o);
3856
- } else if (Et(s)) {
3853
+ } else if (pt(s)) {
3857
3854
  if (a === t.length - 2)
3858
3855
  break;
3859
3856
  const l = +i, u = +t[++a] == 0 ? "key" : "value", f = Ke(s, l);
@@ -3868,11 +3865,11 @@ var Zl = (e, t) => {
3868
3865
  }
3869
3866
  }
3870
3867
  const r = t[t.length - 1];
3871
- if (be(s) ? s[+r] = n(s[+r]) : mt(s) && (s[r] = n(s[r])), pt(s)) {
3868
+ if (be(s) ? s[+r] = n(s[+r]) : Et(s) && (s[r] = n(s[r])), yt(s)) {
3872
3869
  const a = Ke(s, +r), i = n(a);
3873
3870
  a !== i && (s.delete(a), s.add(i));
3874
3871
  }
3875
- if (Et(s)) {
3872
+ if (pt(s)) {
3876
3873
  const a = +t[t.length - 2], i = Ke(s, a);
3877
3874
  switch (+r == 0 ? "key" : "value") {
3878
3875
  case "key": {
@@ -3900,14 +3897,14 @@ function vn(e, t, n = []) {
3900
3897
  vn(a, t, [...n, ...dt(i)]);
3901
3898
  }), t(s, n);
3902
3899
  }
3903
- function ec(e, t, n) {
3900
+ function nc(e, t, n) {
3904
3901
  return vn(t, (s, r) => {
3905
- e = wn(e, r, (a) => Xl(a, s, n));
3902
+ e = wn(e, r, (a) => ec(a, s, n));
3906
3903
  }), e;
3907
3904
  }
3908
- function tc(e, t) {
3905
+ function sc(e, t) {
3909
3906
  function n(s, r) {
3910
- const a = Zl(e, dt(r));
3907
+ const a = tc(e, dt(r));
3911
3908
  s.map(dt).forEach((i) => {
3912
3909
  e = wn(e, i, () => a);
3913
3910
  });
@@ -3921,12 +3918,12 @@ function tc(e, t) {
3921
3918
  rt(t, n);
3922
3919
  return e;
3923
3920
  }
3924
- var nc = (e, t) => mt(e) || be(e) || Et(e) || pt(e) || Er(e, t);
3925
- function sc(e, t, n) {
3921
+ var rc = (e, t) => Et(e) || be(e) || pt(e) || yt(e) || Er(e, t);
3922
+ function ac(e, t, n) {
3926
3923
  const s = n.get(e);
3927
3924
  s ? s.push(t) : n.set(e, [t]);
3928
3925
  }
3929
- function rc(e, t) {
3926
+ function ic(e, t) {
3930
3927
  const n = {};
3931
3928
  let s;
3932
3929
  return e.forEach((r) => {
@@ -3938,34 +3935,34 @@ function rc(e, t) {
3938
3935
  }), s ? Pn(n) ? [s] : [s, n] : Pn(n) ? void 0 : n;
3939
3936
  }
3940
3937
  var Sr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
3941
- const o = $l(e);
3938
+ const o = jl(e);
3942
3939
  if (!o) {
3943
- sc(e, r, t);
3944
- const m = i.get(e);
3945
- if (m)
3940
+ ac(e, r, t);
3941
+ const g = i.get(e);
3942
+ if (g)
3946
3943
  return s ? {
3947
3944
  transformedValue: null
3948
- } : m;
3945
+ } : g;
3949
3946
  }
3950
- if (!nc(e, n)) {
3951
- const m = fs(e, n), E = m ? {
3952
- transformedValue: m.value,
3953
- annotations: [m.type]
3947
+ if (!rc(e, n)) {
3948
+ const g = fs(e, n), E = g ? {
3949
+ transformedValue: g.value,
3950
+ annotations: [g.type]
3954
3951
  } : {
3955
3952
  transformedValue: e
3956
3953
  };
3957
3954
  return o || i.set(e, E), E;
3958
3955
  }
3959
- if (Ft(a, e))
3956
+ if (qt(a, e))
3960
3957
  return {
3961
3958
  transformedValue: null
3962
3959
  };
3963
3960
  const l = fs(e, n), u = (l == null ? void 0 : l.value) ?? e, f = be(u) ? [] : {}, d = {};
3964
- rt(u, (m, E) => {
3961
+ rt(u, (g, E) => {
3965
3962
  if (E === "__proto__" || E === "constructor" || E === "prototype")
3966
3963
  throw new Error(`Detected property ${E}. This is a prototype pollution risk, please remove it from your object.`);
3967
- const S = Sr(m, t, n, s, [...r, E], [...a, e], i);
3968
- f[E] = S.transformedValue, be(S.annotations) ? d[E] = S.annotations : mt(S.annotations) && rt(S.annotations, (T, p) => {
3964
+ const S = Sr(g, t, n, s, [...r, E], [...a, e], i);
3965
+ f[E] = S.transformedValue, be(S.annotations) ? d[E] = S.annotations : Et(S.annotations) && rt(S.annotations, (T, p) => {
3969
3966
  d[fr(E) + "." + p] = T;
3970
3967
  });
3971
3968
  });
@@ -3984,13 +3981,13 @@ function _r(e) {
3984
3981
  function hs(e) {
3985
3982
  return _r(e) === "Array";
3986
3983
  }
3987
- function ac(e) {
3984
+ function oc(e) {
3988
3985
  if (_r(e) !== "Object")
3989
3986
  return !1;
3990
3987
  const t = Object.getPrototypeOf(e);
3991
3988
  return !!t && t.constructor === Object && t === Object.prototype;
3992
3989
  }
3993
- function ic(e, t, n, s, r) {
3990
+ function lc(e, t, n, s, r) {
3994
3991
  const a = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
3995
3992
  a === "enumerable" && (e[t] = n), r && a === "nonenumerable" && Object.defineProperty(e, t, {
3996
3993
  value: n,
@@ -4002,14 +3999,14 @@ function ic(e, t, n, s, r) {
4002
3999
  function bn(e, t = {}) {
4003
4000
  if (hs(e))
4004
4001
  return e.map((r) => bn(r, t));
4005
- if (!ac(e))
4002
+ if (!oc(e))
4006
4003
  return e;
4007
4004
  const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
4008
4005
  return [...n, ...s].reduce((r, a) => {
4009
4006
  if (hs(t.props) && !t.props.includes(a))
4010
4007
  return r;
4011
4008
  const i = e[a], o = bn(i, t);
4012
- return ic(r, a, o, e, t.nonenumerable), r;
4009
+ return lc(r, a, o, e, t.nonenumerable), r;
4013
4010
  }, {});
4014
4011
  }
4015
4012
  var O = class {
@@ -4017,7 +4014,7 @@ var O = class {
4017
4014
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
4018
4015
  */
4019
4016
  constructor({ dedupe: e = !1 } = {}) {
4020
- this.classRegistry = new xl(), this.symbolRegistry = new cr((t) => t.description ?? ""), this.customTransformerRegistry = new Rl(), this.allowedErrorProps = [], this.dedupe = e;
4017
+ this.classRegistry = new Ol(), this.symbolRegistry = new cr((t) => t.description ?? ""), this.customTransformerRegistry = new Bl(), this.allowedErrorProps = [], this.dedupe = e;
4021
4018
  }
4022
4019
  serialize(e) {
4023
4020
  const t = /* @__PURE__ */ new Map(), n = Sr(e, t, this, this.dedupe), s = {
@@ -4027,7 +4024,7 @@ var O = class {
4027
4024
  ...s.meta,
4028
4025
  values: n.annotations
4029
4026
  });
4030
- const r = rc(t, this.dedupe);
4027
+ const r = ic(t, this.dedupe);
4031
4028
  return r && (s.meta = {
4032
4029
  ...s.meta,
4033
4030
  referentialEqualities: r
@@ -4036,7 +4033,7 @@ var O = class {
4036
4033
  deserialize(e) {
4037
4034
  const { json: t, meta: n } = e;
4038
4035
  let s = bn(t);
4039
- return n != null && n.values && (s = ec(s, n.values, this)), n != null && n.referentialEqualities && (s = tc(s, n.referentialEqualities)), s;
4036
+ return n != null && n.values && (s = nc(s, n.values, this)), n != null && n.referentialEqualities && (s = sc(s, n.referentialEqualities)), s;
4040
4037
  }
4041
4038
  stringify(e) {
4042
4039
  return JSON.stringify(this.serialize(e));
@@ -4069,52 +4066,52 @@ O.registerClass = O.defaultInstance.registerClass.bind(O.defaultInstance);
4069
4066
  O.registerSymbol = O.defaultInstance.registerSymbol.bind(O.defaultInstance);
4070
4067
  O.registerCustom = O.defaultInstance.registerCustom.bind(O.defaultInstance);
4071
4068
  O.allowErrorProps = O.defaultInstance.allowErrorProps.bind(O.defaultInstance);
4072
- var oc = O.serialize, Tu = O.stringify;
4073
- function Su(e) {
4069
+ var cc = O.serialize, wu = O.stringify;
4070
+ function vu(e) {
4074
4071
  return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
4075
4072
  }
4076
- function _u(e, t) {
4073
+ function bu(e, t) {
4077
4074
  return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
4078
4075
  }
4079
- function Pu({
4076
+ function Iu({
4080
4077
  queryState: e,
4081
4078
  observerCount: t,
4082
4079
  isStale: n
4083
4080
  }) {
4084
4081
  return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
4085
4082
  }
4086
- function wu({
4083
+ function Nu({
4087
4084
  status: e,
4088
4085
  isPaused: t
4089
4086
  }) {
4090
4087
  return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
4091
4088
  }
4092
- function vu(e) {
4089
+ function Cu(e) {
4093
4090
  return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
4094
4091
  }
4095
- var bu = (e, t = !1) => {
4092
+ var Lu = (e, t = !1) => {
4096
4093
  const {
4097
4094
  json: n
4098
- } = oc(e);
4095
+ } = cc(e);
4099
4096
  return JSON.stringify(n, null, t ? 2 : void 0);
4100
- }, Gt = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, lc = (e, t) => e.queryHash.localeCompare(t.queryHash), Pr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, cc = (e, t) => Gt(e) === Gt(t) ? Pr(e, t) : Gt(e) > Gt(t) ? 1 : -1, Iu = {
4101
- status: cc,
4102
- "query hash": lc,
4097
+ }, Ot = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, uc = (e, t) => e.queryHash.localeCompare(t.queryHash), Pr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, dc = (e, t) => Ot(e) === Ot(t) ? Pr(e, t) : Ot(e) > Ot(t) ? 1 : -1, ku = {
4098
+ status: dc,
4099
+ "query hash": uc,
4103
4100
  "last updated": Pr
4104
- }, Ot = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, wr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, uc = (e, t) => Ot(e) === Ot(t) ? wr(e, t) : Ot(e) > Ot(t) ? 1 : -1, Nu = {
4105
- status: uc,
4101
+ }, Rt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, wr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, fc = (e, t) => Rt(e) === Rt(t) ? wr(e, t) : Rt(e) > Rt(t) ? 1 : -1, Du = {
4102
+ status: fc,
4106
4103
  "last updated": wr
4107
- }, Cu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Lu = () => {
4104
+ }, xu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Gu = () => {
4108
4105
  const [e, t] = F("dark");
4109
- return zo(() => {
4106
+ return Yo(() => {
4110
4107
  const n = window.matchMedia("(prefers-color-scheme: dark)");
4111
4108
  t(n.matches ? "dark" : "light");
4112
4109
  const s = (r) => {
4113
4110
  t(r.matches ? "dark" : "light");
4114
4111
  };
4115
- n.addEventListener("change", s), ft(() => n.removeEventListener("change", s));
4112
+ n.addEventListener("change", s), ht(() => n.removeEventListener("change", s));
4116
4113
  }), e;
4117
- }, Rt = (e, t, n) => {
4114
+ }, Ut = (e, t, n) => {
4118
4115
  if (t.length === 0)
4119
4116
  return n;
4120
4117
  if (e instanceof Map) {
@@ -4122,10 +4119,10 @@ var bu = (e, t = !1) => {
4122
4119
  if (t.length === 1)
4123
4120
  return s.set(t[0], n), s;
4124
4121
  const [r, ...a] = t;
4125
- return s.set(r, Rt(s.get(r), a, n)), s;
4122
+ return s.set(r, Ut(s.get(r), a, n)), s;
4126
4123
  }
4127
4124
  if (e instanceof Set) {
4128
- const s = Rt(Array.from(e), t, n);
4125
+ const s = Ut(Array.from(e), t, n);
4129
4126
  return new Set(s);
4130
4127
  }
4131
4128
  if (Array.isArray(e)) {
@@ -4133,7 +4130,7 @@ var bu = (e, t = !1) => {
4133
4130
  if (t.length === 1)
4134
4131
  return s[t[0]] = n, s;
4135
4132
  const [r, ...a] = t;
4136
- return s[r] = Rt(s[r], a, n), s;
4133
+ return s[r] = Ut(s[r], a, n), s;
4137
4134
  }
4138
4135
  if (e instanceof Object) {
4139
4136
  const s = {
@@ -4142,19 +4139,19 @@ var bu = (e, t = !1) => {
4142
4139
  if (t.length === 1)
4143
4140
  return s[t[0]] = n, s;
4144
4141
  const [r, ...a] = t;
4145
- return s[r] = Rt(s[r], a, n), s;
4142
+ return s[r] = Ut(s[r], a, n), s;
4146
4143
  }
4147
4144
  return e;
4148
- }, Ut = (e, t) => {
4145
+ }, Bt = (e, t) => {
4149
4146
  if (e instanceof Map) {
4150
4147
  const n = new Map(e);
4151
4148
  if (t.length === 1)
4152
4149
  return n.delete(t[0]), n;
4153
4150
  const [s, ...r] = t;
4154
- return n.set(s, Ut(n.get(s), r)), n;
4151
+ return n.set(s, Bt(n.get(s), r)), n;
4155
4152
  }
4156
4153
  if (e instanceof Set) {
4157
- const n = Ut(Array.from(e), t);
4154
+ const n = Bt(Array.from(e), t);
4158
4155
  return new Set(n);
4159
4156
  }
4160
4157
  if (Array.isArray(e)) {
@@ -4162,7 +4159,7 @@ var bu = (e, t = !1) => {
4162
4159
  if (t.length === 1)
4163
4160
  return n.filter((a, i) => i.toString() !== t[0]);
4164
4161
  const [s, ...r] = t;
4165
- return n[s] = Ut(n[s], r), n;
4162
+ return n[s] = Bt(n[s], r), n;
4166
4163
  }
4167
4164
  if (e instanceof Object) {
4168
4165
  const n = {
@@ -4171,29 +4168,29 @@ var bu = (e, t = !1) => {
4171
4168
  if (t.length === 1)
4172
4169
  return delete n[t[0]], n;
4173
4170
  const [s, ...r] = t;
4174
- return n[s] = Ut(n[s], r), n;
4171
+ return n[s] = Bt(n[s], r), n;
4175
4172
  }
4176
4173
  return e;
4177
4174
  }, vr = (e, t) => {
4178
4175
  if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
4179
4176
  const s = document.createElement("style"), r = document.createTextNode("");
4180
4177
  s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
4181
- }, Ve, yt, At, Tt, ke, St, He, $e, Qe, je, ze, _t, We, Pt, ps, dc = (ps = class {
4178
+ }, Ve, At, Tt, St, ke, _t, He, $e, Qe, je, We, Pt, ze, wt, ps, hc = (ps = class {
4182
4179
  constructor(e) {
4183
4180
  L(this, Ve);
4184
- L(this, yt);
4185
4181
  L(this, At);
4186
4182
  L(this, Tt);
4187
- L(this, ke, !1);
4188
4183
  L(this, St);
4184
+ L(this, ke, !1);
4185
+ L(this, _t);
4189
4186
  L(this, He);
4190
4187
  L(this, $e);
4191
4188
  L(this, Qe);
4192
4189
  L(this, je);
4193
- L(this, ze);
4194
- L(this, _t);
4195
4190
  L(this, We);
4196
4191
  L(this, Pt);
4192
+ L(this, ze);
4193
+ L(this, wt);
4197
4194
  const {
4198
4195
  client: t,
4199
4196
  queryFlavor: n,
@@ -4207,7 +4204,7 @@ var bu = (e, t = !1) => {
4207
4204
  shadowDOMTarget: f,
4208
4205
  hideDisabledQueries: d
4209
4206
  } = e;
4210
- C(this, Ve, F(t)), C(this, At, n), C(this, Tt, s), C(this, yt, r), C(this, St, u), C(this, He, f), C(this, $e, F(a)), C(this, Qe, F(i)), C(this, je, F(o)), C(this, ze, F(l)), C(this, _t, F(d));
4207
+ C(this, Ve, F(t)), C(this, Tt, n), C(this, St, s), C(this, At, r), C(this, _t, u), C(this, He, f), C(this, $e, F(a)), C(this, Qe, F(i)), C(this, je, F(o)), C(this, We, F(l)), C(this, Pt, F(d));
4211
4208
  }
4212
4209
  setButtonPosition(e) {
4213
4210
  _(this, $e)[1](e);
@@ -4219,7 +4216,7 @@ var bu = (e, t = !1) => {
4219
4216
  _(this, je)[1](e);
4220
4217
  }
4221
4218
  setErrorTypes(e) {
4222
- _(this, ze)[1](e);
4219
+ _(this, We)[1](e);
4223
4220
  }
4224
4221
  setClient(e) {
4225
4222
  _(this, Ve)[1](e);
@@ -4228,17 +4225,17 @@ var bu = (e, t = !1) => {
4228
4225
  if (_(this, ke))
4229
4226
  throw new Error("Devtools is already mounted");
4230
4227
  const t = ir(() => {
4231
- const n = this, [s] = _(this, $e), [r] = _(this, Qe), [a] = _(this, je), [i] = _(this, ze), [o] = _(this, _t), [l] = _(this, Ve);
4228
+ const n = this, [s] = _(this, $e), [r] = _(this, Qe), [a] = _(this, je), [i] = _(this, We), [o] = _(this, Pt), [l] = _(this, Ve);
4232
4229
  let u;
4233
- return _(this, We) ? u = _(this, We) : (u = rr(() => import("./NCMVHL6D-PLvSyK5P.js")), C(this, We, u)), vr(_(this, St), _(this, He)), nr(u, sr({
4230
+ return _(this, ze) ? u = _(this, ze) : (u = rr(() => import("./NCMVHL6D-CksZXXOw.js")), C(this, ze, u)), vr(_(this, _t), _(this, He)), nr(u, sr({
4234
4231
  get queryFlavor() {
4235
- return _(n, At);
4232
+ return _(n, Tt);
4236
4233
  },
4237
4234
  get version() {
4238
- return _(n, Tt);
4235
+ return _(n, St);
4239
4236
  },
4240
4237
  get onlineManager() {
4241
- return _(n, yt);
4238
+ return _(n, At);
4242
4239
  },
4243
4240
  get shadowDOMTarget() {
4244
4241
  return _(n, He);
@@ -4264,31 +4261,31 @@ var bu = (e, t = !1) => {
4264
4261
  }
4265
4262
  }));
4266
4263
  }, e);
4267
- C(this, ke, !0), C(this, Pt, t);
4264
+ C(this, ke, !0), C(this, wt, t);
4268
4265
  }
4269
4266
  unmount() {
4270
4267
  var e;
4271
4268
  if (!_(this, ke))
4272
4269
  throw new Error("Devtools is not mounted");
4273
- (e = _(this, Pt)) == null || e.call(this), C(this, ke, !1);
4270
+ (e = _(this, wt)) == null || e.call(this), C(this, ke, !1);
4274
4271
  }
4275
- }, Ve = new WeakMap(), yt = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), ke = new WeakMap(), St = new WeakMap(), He = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), je = new WeakMap(), ze = new WeakMap(), _t = new WeakMap(), We = new WeakMap(), Pt = new WeakMap(), ps), Ye, wt, vt, bt, De, It, Je, Xe, Ze, et, tt, Nt, nt, st, Ct, ys, fc = (ys = class {
4272
+ }, Ve = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), St = new WeakMap(), ke = new WeakMap(), _t = new WeakMap(), He = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), je = new WeakMap(), We = new WeakMap(), Pt = new WeakMap(), ze = new WeakMap(), wt = new WeakMap(), ps), Ye, vt, bt, It, De, Nt, Je, Xe, Ze, et, tt, Ct, nt, st, Lt, ys, gc = (ys = class {
4276
4273
  constructor(e) {
4277
4274
  L(this, Ye);
4278
- L(this, wt);
4279
4275
  L(this, vt);
4280
4276
  L(this, bt);
4281
- L(this, De, !1);
4282
4277
  L(this, It);
4278
+ L(this, De, !1);
4279
+ L(this, Nt);
4283
4280
  L(this, Je);
4284
4281
  L(this, Xe);
4285
4282
  L(this, Ze);
4286
4283
  L(this, et);
4287
4284
  L(this, tt);
4288
- L(this, Nt);
4285
+ L(this, Ct);
4289
4286
  L(this, nt);
4290
4287
  L(this, st);
4291
- L(this, Ct);
4288
+ L(this, Lt);
4292
4289
  const {
4293
4290
  client: t,
4294
4291
  queryFlavor: n,
@@ -4303,7 +4300,7 @@ var bu = (e, t = !1) => {
4303
4300
  onClose: d,
4304
4301
  hideDisabledQueries: h
4305
4302
  } = e;
4306
- C(this, Ye, F(t)), C(this, vt, n), C(this, bt, s), C(this, wt, r), C(this, It, u), C(this, Je, f), C(this, Xe, F(a)), C(this, Ze, F(i)), C(this, et, F(o)), C(this, tt, F(l)), C(this, Nt, F(h)), C(this, nt, F(d));
4303
+ C(this, Ye, F(t)), C(this, bt, n), C(this, It, s), C(this, vt, r), C(this, Nt, u), C(this, Je, f), C(this, Xe, F(a)), C(this, Ze, F(i)), C(this, et, F(o)), C(this, tt, F(l)), C(this, Ct, F(h)), C(this, nt, F(d));
4307
4304
  }
4308
4305
  setButtonPosition(e) {
4309
4306
  _(this, Xe)[1](e);
@@ -4327,17 +4324,17 @@ var bu = (e, t = !1) => {
4327
4324
  if (_(this, De))
4328
4325
  throw new Error("Devtools is already mounted");
4329
4326
  const t = ir(() => {
4330
- const n = this, [s] = _(this, Xe), [r] = _(this, Ze), [a] = _(this, et), [i] = _(this, tt), [o] = _(this, Nt), [l] = _(this, Ye), [u] = _(this, nt);
4327
+ const n = this, [s] = _(this, Xe), [r] = _(this, Ze), [a] = _(this, et), [i] = _(this, tt), [o] = _(this, Ct), [l] = _(this, Ye), [u] = _(this, nt);
4331
4328
  let f;
4332
- return _(this, st) ? f = _(this, st) : (f = rr(() => import("./2AITGKQY-iyhQ7kgG.js")), C(this, st, f)), vr(_(this, It), _(this, Je)), nr(f, sr({
4329
+ return _(this, st) ? f = _(this, st) : (f = rr(() => import("./2AITGKQY-DtQPkxBe.js")), C(this, st, f)), vr(_(this, Nt), _(this, Je)), nr(f, sr({
4333
4330
  get queryFlavor() {
4334
- return _(n, vt);
4331
+ return _(n, bt);
4335
4332
  },
4336
4333
  get version() {
4337
- return _(n, bt);
4334
+ return _(n, It);
4338
4335
  },
4339
4336
  get onlineManager() {
4340
- return _(n, wt);
4337
+ return _(n, vt);
4341
4338
  },
4342
4339
  get shadowDOMTarget() {
4343
4340
  return _(n, Je);
@@ -4366,16 +4363,16 @@ var bu = (e, t = !1) => {
4366
4363
  }
4367
4364
  }));
4368
4365
  }, e);
4369
- C(this, De, !0), C(this, Ct, t);
4366
+ C(this, De, !0), C(this, Lt, t);
4370
4367
  }
4371
4368
  unmount() {
4372
4369
  var e;
4373
4370
  if (!_(this, De))
4374
4371
  throw new Error("Devtools is not mounted");
4375
- (e = _(this, Ct)) == null || e.call(this), C(this, De, !1);
4372
+ (e = _(this, Lt)) == null || e.call(this), C(this, De, !1);
4376
4373
  }
4377
- }, Ye = new WeakMap(), wt = new WeakMap(), vt = new WeakMap(), bt = new WeakMap(), De = new WeakMap(), It = new WeakMap(), Je = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), Nt = new WeakMap(), nt = new WeakMap(), st = new WeakMap(), Ct = new WeakMap(), ys);
4378
- function hc(e) {
4374
+ }, Ye = new WeakMap(), vt = new WeakMap(), bt = new WeakMap(), It = new WeakMap(), De = new WeakMap(), Nt = new WeakMap(), Je = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), Ct = new WeakMap(), nt = new WeakMap(), st = new WeakMap(), Lt = new WeakMap(), ys);
4375
+ function mc(e) {
4379
4376
  const t = ee(e.client), n = j.useRef(null), {
4380
4377
  buttonPosition: s,
4381
4378
  position: r,
@@ -4385,7 +4382,7 @@ function hc(e) {
4385
4382
  shadowDOMTarget: l,
4386
4383
  hideDisabledQueries: u
4387
4384
  } = e, [f] = j.useState(
4388
- new dc({
4385
+ new hc({
4389
4386
  client: t,
4390
4387
  queryFlavor: "React Query",
4391
4388
  version: "5",
@@ -4413,9 +4410,9 @@ function hc(e) {
4413
4410
  f.unmount();
4414
4411
  }), [f]), /* @__PURE__ */ c("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
4415
4412
  }
4416
- function gc(e) {
4413
+ function Ec(e) {
4417
4414
  const t = ee(e.client), n = j.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: a, hideDisabledQueries: i } = e, [o] = j.useState(
4418
- new fc({
4415
+ new gc({
4419
4416
  client: t,
4420
4417
  queryFlavor: "React Query",
4421
4418
  version: "5",
@@ -4450,24 +4447,24 @@ function gc(e) {
4450
4447
  }
4451
4448
  var gs = process.env.NODE_ENV !== "development" ? function() {
4452
4449
  return null;
4453
- } : hc;
4450
+ } : mc;
4454
4451
  process.env.NODE_ENV;
4455
- const mc = () => {
4452
+ const pc = pe(""), yc = () => {
4456
4453
  Hn("dynamic-page-selector", {
4457
4454
  description: "Dynamic page selector"
4458
4455
  }), Hn("enable-add-page-dropdown", {
4459
4456
  description: "Enable add page dropdown"
4460
4457
  });
4461
- }, Ec = () => {
4458
+ }, Ac = () => {
4462
4459
  const e = B(), t = R();
4463
4460
  return ie({
4464
4461
  queryKey: [y.GET_COLLECTIONS],
4465
4462
  staleTime: 1 / 0,
4466
4463
  queryFn: async () => t(e, { action: y.GET_COLLECTIONS })
4467
4464
  });
4468
- }, pc = () => {
4465
+ }, Tc = () => {
4469
4466
  const { data: e } = oe(), { data: t } = Ie(), { data: n } = Be(), s = B(), r = R(), a = $(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]);
4470
- return ne({
4467
+ return se({
4471
4468
  mutationFn: async ({ block: i }) => r(s, {
4472
4469
  action: y.GET_BLOCK_ASYNC_PROPS,
4473
4470
  data: {
@@ -4489,7 +4486,7 @@ const mc = () => {
4489
4486
  }
4490
4487
  })
4491
4488
  });
4492
- }, yc = () => {
4489
+ }, Sc = () => {
4493
4490
  const [, e] = le();
4494
4491
  return q(
4495
4492
  (t, n) => {
@@ -4498,51 +4495,60 @@ const mc = () => {
4498
4495
  },
4499
4496
  [e]
4500
4497
  );
4501
- }, Ac = () => {
4502
- const e = yc();
4498
+ }, _c = () => {
4499
+ const e = Sc();
4503
4500
  return q(
4504
4501
  ({ pageId: t }) => {
4505
4502
  e(t);
4506
4503
  },
4507
4504
  [e]
4508
4505
  );
4509
- }, Tc = V(() => import("./digital-asset-manager-BAFTqxsM.js")), Sc = V(() => import("./save-to-lib-DGII9CEP.js")), _c = V(() => import("./theme-panel-footer-D3SwHqGR.js"));
4510
- mc();
4511
- oi();
4512
- ta(So);
4513
- Ko();
4514
- na(Tc);
4515
- sa(Sc);
4516
- const Pc = {
4506
+ }, Pc = K(() => import("./digital-asset-manager-Bb81T3mS.js")), wc = K(() => import("./save-to-lib-CeWaSQdB.js")), vc = K(() => import("./theme-panel-footer-D2B7iYW2.js")), bc = K(() => import("./web-preview-YuuoRaZn.js"));
4507
+ yc();
4508
+ ci();
4509
+ na(Po);
4510
+ Ho();
4511
+ sa(Pc);
4512
+ ra(wc);
4513
+ const Ic = {
4517
4514
  role: "",
4518
4515
  permissions: null
4519
4516
  }, ms = (e) => {
4520
- No(), xi();
4521
- const t = Un(), { data: n = Pc, isFetching: s } = Co(), { data: r, isFetching: a } = Ce(), { data: i, isFetching: o } = Ec(), { data: l, isFetching: u } = Be(), f = s || a || o || u, [d] = le(), h = d.get("page"), { data: m } = oe(), { data: E, isFetching: S } = vo(), { blocks: T } = wo(E), { lockingStatus: p, pageLock: A } = Ne(), { data: w, isFetching: D } = bo(), U = _o(), { onSave: b } = Lo(), { mutateAsync: Ae } = pc(), { getPartialBlocks: Te, getPartialBlockBlocks: k } = ko(), { mutateAsync: v } = Wi(), { mutateAsync: I } = Io(), W = Ac(), [Q, ce] = G(!1), it = ct([]), we = $(() => K(l, "theme", {}) || {}, [l]), ot = me(p) && (A == null ? void 0 : A.status) === "editing", Le = (A == null ? void 0 : A.status) === "checking", Mn = S || Le || D;
4522
- it.current = T, re(() => {
4517
+ Lo(), Oi();
4518
+ const t = Rn(), { data: n = Ic, isFetching: s } = ko(), { data: r, isFetching: a } = Ce(), { data: i, isFetching: o } = Ac(), { data: l, isFetching: u } = Be(), f = s || a || o || u, [d] = le(), h = d.get("page"), { data: g } = oe(), { data: E, isFetching: S } = Io(), { blocks: T } = bo(E), { lockingStatus: p, pageLock: A } = Ne(), { data: w, isFetching: D } = No(), U = wo(), { onSave: b } = Do(), { mutateAsync: Te } = Tc(), { getPartialBlocks: Se, getPartialBlockBlocks: k } = xo(), { mutateAsync: v } = Ji(), { mutateAsync: I } = Co(), z = _c(), [Q, ce] = G(!1), it = ct([]), we = $(() => H(l, "theme", {}) || {}, [l]), ot = me(p) && (A == null ? void 0 : A.status) === "editing", Le = (A == null ? void 0 : A.status) === "checking", Mn = S || Le || D;
4519
+ it.current = T;
4520
+ const [br] = ne(pc);
4521
+ re(() => {
4523
4522
  const ue = () => {
4524
4523
  document.hidden ? ce(!0) : ce(!1);
4525
4524
  };
4526
4525
  return window.addEventListener("visibilitychange", ue), () => window.removeEventListener("visibilitychange", ue);
4527
4526
  }, []);
4528
- const br = $(() => {
4527
+ const Ir = $(() => {
4529
4528
  const ue = {};
4530
- return n && (ue.permissions = K(n, "permissions", null), ue.role = K(n, "role", "user")), ue;
4531
- }, [n]), Ir = q(
4532
- async (ue, Lt) => await v({ pageType: ue, query: Lt }),
4529
+ return n && (ue.permissions = H(n, "permissions", null), ue.role = H(n, "role", "user")), ue;
4530
+ }, [n]), Nr = q(
4531
+ async (ue, kt) => await v({ pageType: ue, query: kt }),
4533
4532
  [v]
4534
4533
  );
4535
- return /* @__PURE__ */ g(he, { children: [
4536
- Mn && /* @__PURE__ */ c(Ms, { className: f ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ c(Xt, { className: `animate-spin text-primary ${f ? "h-6 w-6" : "h-5 w-5"}` }) }),
4534
+ return /* @__PURE__ */ m(he, { children: [
4535
+ Mn && /* @__PURE__ */ c(Ms, { className: f ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ c(ft, { className: `animate-spin text-primary ${f ? "h-6 w-6" : "h-5 w-5"}` }) }),
4536
+ br && /* @__PURE__ */ c(
4537
+ V,
4538
+ {
4539
+ fallback: /* @__PURE__ */ c("div", { className: "absolute inset-0 z-[999999] flex min-h-screen w-screen items-center justify-center bg-gray-100", children: /* @__PURE__ */ c(ft, { className: "h-6 w-6 animate-spin text-primary" }) }),
4540
+ children: /* @__PURE__ */ c(bc, {})
4541
+ }
4542
+ ),
4537
4543
  /* @__PURE__ */ c(
4538
- ra,
4544
+ aa,
4539
4545
  {
4540
- gotoPage: W,
4546
+ gotoPage: z,
4541
4547
  collections: i ?? [],
4542
- getBlockAsyncProps: Ae,
4548
+ getBlockAsyncProps: Te,
4543
4549
  pageExternalData: w,
4544
4550
  themePresets: e.themePresets ?? [],
4545
- pageId: m == null ? void 0 : m.id,
4551
+ pageId: g == null ? void 0 : g.id,
4546
4552
  loading: S,
4547
4553
  fallbackLang: t,
4548
4554
  languages: (l == null ? void 0 : l.languages) || [],
@@ -4554,36 +4560,36 @@ const Pc = {
4554
4560
  autoSaveInterval: e.autoSaveInterval ?? 15,
4555
4561
  onError: e.onError || console.error,
4556
4562
  getPartialBlockBlocks: k,
4557
- getPartialBlocks: Te,
4563
+ getPartialBlocks: Se,
4558
4564
  blocks: S ? [] : T,
4559
- theme: Hr(we),
4565
+ theme: $r(we),
4560
4566
  pageTypes: r,
4561
- searchPageTypeItems: Ir,
4567
+ searchPageTypeItems: Nr,
4562
4568
  askAiCallBack: U,
4563
- onSave: async ({ blocks: ue, theme: Lt, needTranslations: Nr }) => {
4569
+ onSave: async ({ blocks: ue, theme: kt, needTranslations: Cr }) => {
4564
4570
  if (!h) return !0;
4565
4571
  it.current = ue;
4566
4572
  const Fn = [...ue];
4567
- return await b({ page: h, blocks: Fn, needTranslations: Nr }), it.current = Fn, $r(Lt, we) || await I({ settings: { theme: Lt } }), !0;
4573
+ return await b({ page: h, blocks: Fn, needTranslations: Cr }), it.current = Fn, Qr(kt, we) || await I({ settings: { theme: kt } }), !0;
4568
4574
  },
4569
- themePanelComponent: _c,
4570
- ...br
4575
+ themePanelComponent: vc,
4576
+ ...Ir
4571
4577
  }
4572
4578
  ),
4573
- /* @__PURE__ */ g("div", { children: [
4574
- /* @__PURE__ */ c(Ui, { isFetchingPage: Mn }),
4575
- /* @__PURE__ */ c(Bi, {})
4579
+ /* @__PURE__ */ m("div", { children: [
4580
+ /* @__PURE__ */ c(Mi, { isFetchingPage: Mn }),
4581
+ /* @__PURE__ */ c(Fi, {})
4576
4582
  ] })
4577
4583
  ] });
4578
- }, wc = new jr({
4584
+ }, Nc = new Wr({
4579
4585
  defaultOptions: {
4580
4586
  queries: {
4581
4587
  refetchOnWindowFocus: !1,
4582
4588
  refetchOnReconnect: !1
4583
4589
  }
4584
4590
  }
4585
- }), ku = (e) => {
4586
- const { isLoggedIn: t } = ye(), [, n] = Dn(), [s, r] = G(!1);
4591
+ }), Ou = (e) => {
4592
+ const { isLoggedIn: t } = Ae(), [, n] = kn(), [s, r] = G(!1);
4587
4593
  return re(() => (n(
4588
4594
  In(e, [
4589
4595
  "apiUrl",
@@ -4601,19 +4607,19 @@ const Pc = {
4601
4607
  r(!0);
4602
4608
  }, 200), () => {
4603
4609
  r(!1), n({});
4604
- }), [e, n]), s ? K(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ g(he, { children: [
4610
+ }), [e, n]), s ? H(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(he, { children: [
4605
4611
  t ? /* @__PURE__ */ c(ms, { ...e }) : /* @__PURE__ */ c(rs, {}),
4606
4612
  /* @__PURE__ */ c(gs, {})
4607
- ] }) : /* @__PURE__ */ g(zr, { client: wc, children: [
4613
+ ] }) : /* @__PURE__ */ m(zr, { client: Nc, children: [
4608
4614
  t ? /* @__PURE__ */ c(ms, { ...e }) : /* @__PURE__ */ c(rs, {}),
4609
4615
  /* @__PURE__ */ c(gs, {})
4610
4616
  ] }) : /* @__PURE__ */ c("div", {});
4611
- }, vc = j.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
4612
- function bc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
4617
+ }, Cc = j.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
4618
+ function Lc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
4613
4619
  const [r, a] = j.useState(!1);
4614
- return /* @__PURE__ */ g(Na, { open: r, onOpenChange: a, children: [
4615
- /* @__PURE__ */ g(Wt, { children: [
4616
- /* @__PURE__ */ c(Yt, { asChild: !0, children: /* @__PURE__ */ c(Ca, { asChild: !0, children: /* @__PURE__ */ c(
4620
+ return /* @__PURE__ */ m(Ca, { open: r, onOpenChange: a, children: [
4621
+ /* @__PURE__ */ m(Yt, { children: [
4622
+ /* @__PURE__ */ c(Jt, { asChild: !0, children: /* @__PURE__ */ c(La, { asChild: !0, children: /* @__PURE__ */ c(
4617
4623
  M,
4618
4624
  {
4619
4625
  size: "sm",
@@ -4634,10 +4640,10 @@ function bc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
4634
4640
  ) })
4635
4641
  }
4636
4642
  ) }) }),
4637
- /* @__PURE__ */ c(Jt, { children: "Add field" })
4643
+ /* @__PURE__ */ c(Xt, { children: "Add field" })
4638
4644
  ] }),
4639
4645
  r && /* @__PURE__ */ c(j.Suspense, { children: /* @__PURE__ */ c(
4640
- vc,
4646
+ Cc,
4641
4647
  {
4642
4648
  data: e,
4643
4649
  onSelect: t,
@@ -4648,19 +4654,19 @@ function bc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
4648
4654
  ) })
4649
4655
  ] });
4650
4656
  }
4651
- const Du = () => {
4657
+ const Ru = () => {
4652
4658
  const { savePageAsync: e } = Oe(), t = ee();
4653
4659
  return q(async () => {
4654
4660
  await e(), t.invalidateQueries({ queryKey: [y.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [y.GET_BUILDER_PAGE_DATA] });
4655
4661
  }, [e, t]);
4656
- }, xu = () => {
4662
+ }, Uu = () => {
4657
4663
  const e = ee();
4658
4664
  return q(() => {
4659
4665
  e.clear();
4660
4666
  }, [e]);
4661
- }, Gu = () => {
4667
+ }, Bu = () => {
4662
4668
  const e = B(), t = R(), { data: n } = Ie(), s = ee();
4663
- return ne({
4669
+ return se({
4664
4670
  mutationFn: async (r) => {
4665
4671
  if (!(n != null && n.id))
4666
4672
  throw new Error("No active page found");
@@ -4683,7 +4689,7 @@ const Du = () => {
4683
4689
  console.error("Failed to update metadata");
4684
4690
  }
4685
4691
  });
4686
- }, Ic = V(() => import("./digital-asset-manager-BAFTqxsM.js")), Ou = ({
4692
+ }, kc = K(() => import("./digital-asset-manager-Bb81T3mS.js")), Mu = ({
4687
4693
  assetId: e,
4688
4694
  assetUrl: t,
4689
4695
  onChange: n,
@@ -4695,14 +4701,14 @@ const Du = () => {
4695
4701
  a || o(!0);
4696
4702
  }, u = () => {
4697
4703
  o(!1);
4698
- }, f = (m) => {
4699
- const E = Array.isArray(m) ? m[0] : m;
4704
+ }, f = (g) => {
4705
+ const E = Array.isArray(g) ? g[0] : g;
4700
4706
  E != null && E.url && n(In(E, ["url", "id"])), o(!1);
4701
4707
  }, d = () => {
4702
4708
  n({ url: "", id: "" });
4703
4709
  }, h = (t == null ? void 0 : t.startsWith("{{")) && (t == null ? void 0 : t.endsWith("}}"));
4704
- return /* @__PURE__ */ g("div", { className: `w-full ${s}`, children: [
4705
- t ? /* @__PURE__ */ g("div", { className: "relative overflow-hidden rounded-md border", children: [
4710
+ return /* @__PURE__ */ m("div", { className: `w-full ${s}`, children: [
4711
+ t ? /* @__PURE__ */ m("div", { className: "relative overflow-hidden rounded-md border", children: [
4706
4712
  h ? /* @__PURE__ */ c("div", { className: "flex h-12 items-center bg-gray-100 px-4", children: /* @__PURE__ */ c("p", { className: "text-xs text-gray-500", children: t }) }) : /* @__PURE__ */ c(
4707
4713
  "img",
4708
4714
  {
@@ -4712,7 +4718,7 @@ const Du = () => {
4712
4718
  className: "h-auto max-h-[100px] w-full bg-gray-100 object-contain"
4713
4719
  }
4714
4720
  ),
4715
- /* @__PURE__ */ g("div", { className: "absolute right-2 top-2 flex gap-2", children: [
4721
+ /* @__PURE__ */ m("div", { className: "absolute right-2 top-2 flex gap-2", children: [
4716
4722
  /* @__PURE__ */ c(
4717
4723
  M,
4718
4724
  {
@@ -4722,7 +4728,7 @@ const Du = () => {
4722
4728
  className: "h-8 w-8 rounded-full bg-white text-red-500",
4723
4729
  onClick: d,
4724
4730
  disabled: a,
4725
- children: h ? /* @__PURE__ */ c(Zn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(ei, { className: "h-4 w-4" })
4731
+ children: h ? /* @__PURE__ */ c(Zn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(ni, { className: "h-4 w-4" })
4726
4732
  }
4727
4733
  ),
4728
4734
  !h && /* @__PURE__ */ c(
@@ -4743,15 +4749,15 @@ const Du = () => {
4743
4749
  {
4744
4750
  className: `flex cursor-pointer items-center justify-center rounded-md border border-dashed p-6 ${a ? "cursor-not-allowed opacity-50" : "hover:border-gray-400"}`,
4745
4751
  onClick: l,
4746
- children: /* @__PURE__ */ g("div", { className: "flex flex-col items-center gap-2", children: [
4752
+ children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center gap-2", children: [
4747
4753
  /* @__PURE__ */ c(es, { className: "h-10 w-10 text-gray-400" }),
4748
4754
  /* @__PURE__ */ c("p", { className: "text-sm text-gray-500", children: r })
4749
4755
  ] })
4750
4756
  }
4751
4757
  ),
4752
- /* @__PURE__ */ c(Is, { open: i, onOpenChange: o, children: /* @__PURE__ */ g(La, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
4753
- /* @__PURE__ */ g(ka, { className: "hidden border-b px-4 py-2", children: [
4754
- /* @__PURE__ */ c(Da, { children: "Select Image" }),
4758
+ /* @__PURE__ */ c(Is, { open: i, onOpenChange: o, children: /* @__PURE__ */ m(ka, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
4759
+ /* @__PURE__ */ m(Da, { className: "hidden border-b px-4 py-2", children: [
4760
+ /* @__PURE__ */ c(xa, { children: "Select Image" }),
4755
4761
  /* @__PURE__ */ c(
4756
4762
  M,
4757
4763
  {
@@ -4764,8 +4770,8 @@ const Du = () => {
4764
4770
  }
4765
4771
  )
4766
4772
  ] }),
4767
- /* @__PURE__ */ c("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
4768
- Ic,
4773
+ /* @__PURE__ */ c("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
4774
+ kc,
4769
4775
  {
4770
4776
  close: u,
4771
4777
  onSelect: f,
@@ -4775,7 +4781,7 @@ const Du = () => {
4775
4781
  ) }) })
4776
4782
  ] }) })
4777
4783
  ] });
4778
- }, Nc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Es = (e) => {
4784
+ }, Dc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Es = (e) => {
4779
4785
  if (!e.trim())
4780
4786
  return { isValid: !1, parsed: null, placeholders: [], error: { message: "JSON is empty" } };
4781
4787
  try {
@@ -4810,23 +4816,23 @@ const Du = () => {
4810
4816
  }
4811
4817
  };
4812
4818
  }
4813
- }, Cc = (e, t) => {
4819
+ }, xc = (e, t) => {
4814
4820
  let s = JSON.stringify(e, null, 2);
4815
4821
  return t.forEach(({ original: r }, a) => {
4816
- const i = `"__placeholder_${a}__"`, o = new RegExp(Nc(i), "g");
4822
+ const i = `"__placeholder_${a}__"`, o = new RegExp(Dc(i), "g");
4817
4823
  s = s.replace(o, r);
4818
4824
  }), s;
4819
- }, Lc = (e, t) => {
4825
+ }, Gc = (e, t) => {
4820
4826
  if (!e) return "";
4821
4827
  let n = JSON.stringify(e, null, 2);
4822
4828
  const s = /{{([^{}]+)}}/g;
4823
4829
  let r;
4824
4830
  for (; (r = s.exec(n)) !== null; ) {
4825
- const a = r[1], i = K(t, a, null);
4831
+ const a = r[1], i = H(t, a, null);
4826
4832
  n = n.replace(r[0], i);
4827
4833
  }
4828
4834
  return n;
4829
- }, kc = V(() => import("./shared-json-ld-gbnBFljN.js")), Ru = ({
4835
+ }, Oc = K(() => import("./shared-json-ld-BliIbNv9.js")), Fu = ({
4830
4836
  value: e,
4831
4837
  onChange: t,
4832
4838
  disabled: n = !1,
@@ -4839,7 +4845,7 @@ const Du = () => {
4839
4845
  hasJsonLdForSelectedLang: u,
4840
4846
  copyJsonLDFromDefaultPage: f
4841
4847
  }) => {
4842
- const [d, h] = G("edit"), [m, E] = G(null), [S, T] = G(""), p = ct(null), [A] = Dn(), w = i === "jsonLD" && K(A, "features.sharedJsonLD", !1), D = i === "jsonLD" && !u && !!f;
4848
+ const [d, h] = G("edit"), [g, E] = G(null), [S, T] = G(""), p = ct(null), [A] = kn(), w = i === "jsonLD" && H(A, "features.sharedJsonLD", !1), D = i === "jsonLD" && !u && !!f;
4843
4849
  re(() => {
4844
4850
  e.trim() === "" && t("{}");
4845
4851
  }, [e, t]);
@@ -4850,25 +4856,25 @@ const Du = () => {
4850
4856
  }, b = (k) => {
4851
4857
  if (k.key === "Tab") {
4852
4858
  k.preventDefault();
4853
- const v = k.currentTarget, I = v.selectionStart, W = v.selectionEnd;
4854
- if (I !== W) {
4855
- const ce = e.substring(I, W).split(`
4859
+ const v = k.currentTarget, I = v.selectionStart, z = v.selectionEnd;
4860
+ if (I !== z) {
4861
+ const ce = e.substring(I, z).split(`
4856
4862
  `);
4857
4863
  if (k.shiftKey) {
4858
4864
  const we = ce.map((Le) => Le.startsWith(" ") ? Le.substring(2) : Le).join(`
4859
- `), ot = e.substring(0, I) + we + e.substring(W);
4865
+ `), ot = e.substring(0, I) + we + e.substring(z);
4860
4866
  t(ot), setTimeout(() => {
4861
4867
  v.selectionStart = I, v.selectionEnd = I + we.length;
4862
4868
  }, 0);
4863
4869
  } else {
4864
4870
  const we = ce.map((Le) => ` ${Le}`).join(`
4865
- `), ot = e.substring(0, I) + we + e.substring(W);
4871
+ `), ot = e.substring(0, I) + we + e.substring(z);
4866
4872
  t(ot), setTimeout(() => {
4867
4873
  v.selectionStart = I, v.selectionEnd = I + we.length;
4868
4874
  }, 0);
4869
4875
  }
4870
4876
  } else {
4871
- const Q = e.substring(0, I) + " " + e.substring(W);
4877
+ const Q = e.substring(0, I) + " " + e.substring(z);
4872
4878
  t(Q), setTimeout(() => {
4873
4879
  v.selectionStart = v.selectionEnd = I + 2;
4874
4880
  }, 0);
@@ -4879,56 +4885,56 @@ const Du = () => {
4879
4885
  const k = Es(e);
4880
4886
  if (k.isValid)
4881
4887
  if (E(null), k.parsed) {
4882
- const v = Lc(k.parsed, o);
4888
+ const v = Gc(k.parsed, o);
4883
4889
  T(v);
4884
4890
  } else
4885
4891
  T("");
4886
4892
  else
4887
4893
  E(k.error), T("");
4888
4894
  }, [e, o]);
4889
- const Ae = () => {
4895
+ const Te = () => {
4890
4896
  const k = Es(e);
4891
4897
  if (k.isValid && k.parsed) {
4892
- const v = Cc(k.parsed, k.placeholders);
4898
+ const v = xc(k.parsed, k.placeholders);
4893
4899
  t(v);
4894
4900
  }
4895
- }, Te = () => {
4896
- m != null && m.position && p.current && (p.current.focus(), p.current.setSelectionRange(m.position, m.position + 1));
4901
+ }, Se = () => {
4902
+ g != null && g.position && p.current && (p.current.focus(), p.current.setSelectionRange(g.position, g.position + 1));
4897
4903
  };
4898
- return /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ g(xa, { value: d, onValueChange: h, className: "w-full", children: [
4899
- /* @__PURE__ */ g("div", { className: "mb-2 flex items-center justify-between", children: [
4900
- /* @__PURE__ */ g(Ga, { className: "w-max", children: [
4901
- /* @__PURE__ */ g(an, { value: "edit", className: "flex items-center gap-1", children: [
4902
- /* @__PURE__ */ c(ti, { className: "h-4 w-4" }),
4904
+ return /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ m(Ga, { value: d, onValueChange: h, className: "w-full", children: [
4905
+ /* @__PURE__ */ m("div", { className: "mb-2 flex items-center justify-between", children: [
4906
+ /* @__PURE__ */ m(Oa, { className: "w-max", children: [
4907
+ /* @__PURE__ */ m(an, { value: "edit", className: "flex items-center gap-1", children: [
4908
+ /* @__PURE__ */ c(si, { className: "h-4 w-4" }),
4903
4909
  /* @__PURE__ */ c("span", { children: "Edit" })
4904
4910
  ] }),
4905
- /* @__PURE__ */ g(
4911
+ /* @__PURE__ */ m(
4906
4912
  an,
4907
4913
  {
4908
4914
  value: "preview",
4909
4915
  className: "flex items-center gap-1",
4910
- disabled: !e.trim() || m !== null || D,
4916
+ disabled: !e.trim() || g !== null || D,
4911
4917
  children: [
4912
- /* @__PURE__ */ c(kn, { className: "h-4 w-4" }),
4918
+ /* @__PURE__ */ c(Cs, { className: "h-4 w-4" }),
4913
4919
  /* @__PURE__ */ c("span", { children: "Preview" })
4914
4920
  ]
4915
4921
  }
4916
4922
  ),
4917
- w && /* @__PURE__ */ g(
4923
+ w && /* @__PURE__ */ m(
4918
4924
  an,
4919
4925
  {
4920
4926
  value: "shared",
4921
4927
  className: "flex items-center gap-1",
4922
- disabled: !e.trim() || m !== null,
4928
+ disabled: !e.trim() || g !== null,
4923
4929
  children: [
4924
- /* @__PURE__ */ c(ni, { className: "h-4 w-4" }),
4930
+ /* @__PURE__ */ c(ri, { className: "h-4 w-4" }),
4925
4931
  /* @__PURE__ */ c("span", { children: "Shared" })
4926
4932
  ]
4927
4933
  }
4928
4934
  )
4929
4935
  ] }),
4930
4936
  D ? null : d === "edit" && !s && /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ c(
4931
- bc,
4937
+ Lc,
4932
4938
  {
4933
4939
  dataType: "value",
4934
4940
  data: o ?? {},
@@ -4936,22 +4942,22 @@ const Du = () => {
4936
4942
  }
4937
4943
  ) })
4938
4944
  ] }),
4939
- /* @__PURE__ */ g(on, { value: "edit", className: "relative mt-0", children: [
4940
- !D && d === "edit" && /* @__PURE__ */ c(Bs, { content: "Format JSON", side: "right", showTooltip: !n && !m, children: /* @__PURE__ */ c(
4945
+ /* @__PURE__ */ m(on, { value: "edit", className: "relative mt-0", children: [
4946
+ !D && d === "edit" && /* @__PURE__ */ c(Un, { content: "Format JSON", side: "right", showTooltip: !n && !g, children: /* @__PURE__ */ c(
4941
4947
  M,
4942
4948
  {
4943
4949
  type: "button",
4944
4950
  variant: "outline",
4945
4951
  size: "icon",
4946
- onClick: Ae,
4952
+ onClick: Te,
4947
4953
  className: "absolute right-1 top-1 h-6 w-6 p-1",
4948
- disabled: !e.trim() || n || m !== null,
4949
- children: /* @__PURE__ */ c(si, {})
4954
+ disabled: !e.trim() || n || g !== null,
4955
+ children: /* @__PURE__ */ c(ai, {})
4950
4956
  }
4951
4957
  ) }),
4952
- D ? /* @__PURE__ */ c("div", { className: "flex h-40 items-center justify-center rounded-md bg-black/20", children: /* @__PURE__ */ g("div", { className: "flex max-w-[400px] flex-col items-center gap-2 rounded-md bg-white p-4 shadow-lg", children: [
4958
+ D ? /* @__PURE__ */ c("div", { className: "flex h-40 items-center justify-center rounded-md bg-black/20", children: /* @__PURE__ */ m("div", { className: "flex max-w-[400px] flex-col items-center gap-2 rounded-md bg-white p-4 shadow-lg", children: [
4953
4959
  /* @__PURE__ */ c("div", { className: "max-w-xl text-center text-xs text-gray-500", children: "JSON-LD for is not added for selected language. JSON LD will be used from default language." }),
4954
- /* @__PURE__ */ g(M, { type: "button", variant: "default", size: "sm", onClick: f, children: [
4960
+ /* @__PURE__ */ m(M, { type: "button", variant: "default", size: "sm", onClick: f, children: [
4955
4961
  /* @__PURE__ */ c(Ns, {}),
4956
4962
  "Copy & Edit from default language"
4957
4963
  ] })
@@ -4961,7 +4967,7 @@ const Du = () => {
4961
4967
  ref: p,
4962
4968
  id: i,
4963
4969
  name: i,
4964
- className: `rounded-md border border-input text-xs ${m ? "border-red-500" : ""}`,
4970
+ className: `rounded-md border border-input text-xs ${g ? "border-red-500" : ""}`,
4965
4971
  onChange: U,
4966
4972
  onKeyDown: b,
4967
4973
  value: e,
@@ -4971,16 +4977,16 @@ const Du = () => {
4971
4977
  readOnly: s
4972
4978
  }
4973
4979
  ),
4974
- m && /* @__PURE__ */ g(Oa, { variant: "destructive", className: "mt-2", children: [
4975
- /* @__PURE__ */ c(ri, { className: "h-4 w-4" }),
4976
- /* @__PURE__ */ g(Ra, { className: "flex flex-col", children: [
4980
+ g && /* @__PURE__ */ m(Ra, { variant: "destructive", className: "mt-2", children: [
4981
+ /* @__PURE__ */ c(ii, { className: "h-4 w-4" }),
4982
+ /* @__PURE__ */ m(Ua, { className: "flex flex-col", children: [
4977
4983
  /* @__PURE__ */ c("span", { className: "font-medium", children: "Invalid JSON" }),
4978
- /* @__PURE__ */ c("span", { className: "text-sm", children: m.message }),
4979
- m.line && m.column && /* @__PURE__ */ g("span", { className: "text-sm", children: [
4984
+ /* @__PURE__ */ c("span", { className: "text-sm", children: g.message }),
4985
+ g.line && g.column && /* @__PURE__ */ m("span", { className: "text-sm", children: [
4980
4986
  "Error at line ",
4981
- m.line,
4987
+ g.line,
4982
4988
  ", column ",
4983
- m.column
4989
+ g.column
4984
4990
  ] }),
4985
4991
  /* @__PURE__ */ c(
4986
4992
  M,
@@ -4989,21 +4995,21 @@ const Du = () => {
4989
4995
  variant: "link",
4990
4996
  size: "sm",
4991
4997
  className: "mt-1 h-auto self-start p-0 text-sm",
4992
- onClick: Te,
4998
+ onClick: Se,
4993
4999
  children: "Show position"
4994
5000
  }
4995
5001
  )
4996
5002
  ] })
4997
5003
  ] })
4998
5004
  ] }),
4999
- /* @__PURE__ */ g(on, { value: "preview", className: "mt-0", children: [
5005
+ /* @__PURE__ */ m(on, { value: "preview", className: "mt-0", children: [
5000
5006
  /* @__PURE__ */ c(jn, { rows: a, value: S, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
5001
5007
  /* @__PURE__ */ c("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
5002
5008
  ] }),
5003
- w && /* @__PURE__ */ c(on, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(kc, {}) }) })
5009
+ w && /* @__PURE__ */ c(on, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Oc, {}) }) })
5004
5010
  ] }) });
5005
- }, Uu = () => {
5006
- const { logout: e } = ye(), { getAccessToken: t } = ks();
5011
+ }, qu = () => {
5012
+ const { logout: e } = Ae(), { getAccessToken: t } = Ds();
5007
5013
  return q(
5008
5014
  async ({
5009
5015
  url: n,
@@ -5041,113 +5047,114 @@ const Du = () => {
5041
5047
  if (typeof window > "u")
5042
5048
  throw new Error("@chaibuilder/pages is not available on the server");
5043
5049
  export {
5044
- uu as $,
5050
+ Cu as $,
5045
5051
  y as A,
5046
5052
  Ms as B,
5047
5053
  X as C,
5048
- sr as D,
5049
- al as E,
5050
- ou as F,
5051
- lu as G,
5052
- Ge as H,
5053
- Tn as I,
5054
- cu as J,
5055
- ru as K,
5056
- Dt as L,
5057
- mu as M,
5058
- ft as N,
5059
- Au as O,
5060
- yu as P,
5061
- Eu as Q,
5062
- zo as R,
5063
- fu as S,
5064
- vl as T,
5065
- Sn as U,
5066
- Tl as V,
5067
- Pu as W,
5068
- wu as X,
5069
- wl as Y,
5070
- vu as Z,
5071
- bu as _,
5072
- Io as a,
5073
- su as a0,
5074
- pu as a1,
5075
- Z as a2,
5076
- $o as a3,
5077
- oc as a4,
5078
- du as a5,
5079
- Rt as a6,
5080
- Cu as a7,
5081
- _u as a8,
5082
- Su as a9,
5083
- Gs as aA,
5084
- bo as aB,
5085
- zi as aC,
5086
- Dn as aD,
5087
- Ki as aE,
5088
- bc as aF,
5089
- Ou as aG,
5090
- Ru as aH,
5091
- $c as aI,
5092
- ku as aJ,
5093
- Ie as aK,
5094
- xu as aL,
5095
- Ac as aM,
5096
- Du as aN,
5097
- nu as aO,
5098
- ye as aP,
5099
- Co as aQ,
5100
- Uu as aR,
5101
- Ti as aS,
5102
- Qs as aa,
5103
- xe as ab,
5104
- Sl as ac,
5105
- Tu as ad,
5106
- gu as ae,
5107
- hu as af,
5108
- Ut as ag,
5109
- iu as ah,
5110
- B as ai,
5111
- R as aj,
5112
- oe as ak,
5113
- Gu as al,
5114
- tu as am,
5115
- Es as an,
5116
- Ci as ao,
5117
- Gi as ap,
5118
- yc as aq,
5119
- eu as ar,
5120
- Rn as as,
5121
- cn as at,
5122
- de as au,
5123
- Gn as av,
5124
- Qc as aw,
5125
- Bs as ax,
5126
- lo as ay,
5127
- jc as az,
5128
- Os as b,
5129
- zc as c,
5130
- Wc as d,
5054
+ zs as D,
5055
+ sr as E,
5056
+ ol as F,
5057
+ du as G,
5058
+ fu as H,
5059
+ Ge as I,
5060
+ Tn as J,
5061
+ hu as K,
5062
+ xt as L,
5063
+ lu as M,
5064
+ Au as N,
5065
+ ht as O,
5066
+ _u as P,
5067
+ Pu as Q,
5068
+ Tu as R,
5069
+ Eu as S,
5070
+ Un as T,
5071
+ Yo as U,
5072
+ Il as V,
5073
+ Sn as W,
5074
+ _l as X,
5075
+ Iu as Y,
5076
+ Nu as Z,
5077
+ bl as _,
5078
+ Co as a,
5079
+ Lu as a0,
5080
+ gu as a1,
5081
+ ou as a2,
5082
+ Su as a3,
5083
+ Z as a4,
5084
+ jo as a5,
5085
+ cc as a6,
5086
+ mu as a7,
5087
+ Ut as a8,
5088
+ xu as a9,
5089
+ Jc as aA,
5090
+ Os as aB,
5091
+ No as aC,
5092
+ Yi as aD,
5093
+ kn as aE,
5094
+ Hi as aF,
5095
+ Lc as aG,
5096
+ Mu as aH,
5097
+ Fu as aI,
5098
+ zc as aJ,
5099
+ Ou as aK,
5100
+ Ie as aL,
5101
+ Uu as aM,
5102
+ _c as aN,
5103
+ Ru as aO,
5104
+ iu as aP,
5105
+ Ae as aQ,
5106
+ ko as aR,
5107
+ qu as aS,
5108
+ _i as aT,
5109
+ bu as aa,
5110
+ vu as ab,
5111
+ Qs as ac,
5112
+ xe as ad,
5113
+ Pl as ae,
5114
+ wu as af,
5115
+ yu as ag,
5116
+ pu as ah,
5117
+ Bt as ai,
5118
+ uu as aj,
5119
+ B as ak,
5120
+ R as al,
5121
+ oe as am,
5122
+ Bu as an,
5123
+ au as ao,
5124
+ Es as ap,
5125
+ ki as aq,
5126
+ Ri as ar,
5127
+ Sc as as,
5128
+ ru as at,
5129
+ On as au,
5130
+ cn as av,
5131
+ de as aw,
5132
+ xn as ax,
5133
+ Yc as ay,
5134
+ uo as az,
5135
+ Rs as b,
5136
+ Xc as c,
5137
+ Zc as d,
5131
5138
  Be as e,
5132
- Un as f,
5139
+ Rn as f,
5133
5140
  Ue as g,
5134
5141
  Ce as h,
5135
5142
  le as i,
5136
- Ds as j,
5137
- wi as k,
5138
- Jc as l,
5139
- Yc as m,
5140
- Xc as n,
5141
- Zc as o,
5142
- Ei as p,
5143
- Lu as q,
5144
- J as r,
5145
- nr as s,
5143
+ xs as j,
5144
+ bi as k,
5145
+ tu as l,
5146
+ eu as m,
5147
+ nu as n,
5148
+ su as o,
5149
+ pc as p,
5150
+ yi as q,
5151
+ Gu as r,
5152
+ J as s,
5146
5153
  un as t,
5147
- Us as u,
5148
- Iu as v,
5149
- Nu as w,
5150
- F as x,
5151
- pl as y,
5152
- Ws as z
5154
+ Bs as u,
5155
+ nr as v,
5156
+ ku as w,
5157
+ Du as x,
5158
+ F as y,
5159
+ Al as z
5153
5160
  };