@chaibuilder/pages 0.4.3 → 0.4.5

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.
@@ -1,22 +1,22 @@
1
- var _s = (e) => {
1
+ var Is = (e) => {
2
2
  throw TypeError(e);
3
3
  };
4
- var Is = (e, t, n) => t.has(e) || _s("Cannot " + n);
5
- var U = (e, t, n) => (Is(e, t, "read from private field"), n ? n.call(e) : t.get(e)), se = (e, t, n) => t.has(e) ? _s("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), ee = (e, t, n, s) => (Is(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
4
+ var ks = (e, t, n) => t.has(e) || Is("Cannot " + n);
5
+ var R = (e, t, n) => (ks(e, t, "read from private field"), n ? n.call(e) : t.get(e)), se = (e, t, n) => t.has(e) ? Is("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), ee = (e, t, n, s) => (ks(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
6
6
  import { jsx as r, jsxs as u, Fragment as be } from "react/jsx-runtime";
7
- import { get as te, isEmpty as me, reverse as Ra, sortBy as Ua, each as Oa, find as fe, set as Ba, has as nn, startsWith as Ut, isEqual as rs, map as Fe, toLower as Dt, trim as Ma, filter as Te, startCase as It, groupBy as Fa, includes as Mt, compact as Qs, concat as Xs, endsWith as Zs, orderBy as mn, first as qa, uniq as Ha, debounce as Ka, pick as Js, keys as Va, pickBy as ja, isArray as $a, cloneDeep as za, isString as ks } from "lodash-es";
8
- import { useAtom as Ln, atom as as } from "jotai";
7
+ import { get as te, isEmpty as me, reverse as Ua, sortBy as Ra, each as Oa, find as fe, set as Ba, has as nn, startsWith as Rt, isEqual as as, map as Fe, toLower as Dt, trim as Ma, filter as Te, startCase as It, groupBy as Fa, compact as Nn, includes as Mt, concat as Xs, endsWith as Zs, orderBy as mn, first as qa, uniq as Ha, debounce as Ka, pick as Js, keys as Va, pickBy as ja, isArray as $a, cloneDeep as za, isString as Ls } from "lodash-es";
8
+ import { useAtom as Dn, atom as is } from "jotai";
9
9
  import * as ce from "react";
10
- import er, { useMemo as Y, useCallback as _e, useState as P, useEffect as we, useRef as ct } from "react";
11
- import { useQueryClient as Se, useQuery as Ne, useMutation as Ae, onlineManager as tr, QueryClient as Wa, QueryClientProvider as Ya } from "@tanstack/react-query";
10
+ import er, { useMemo as Y, useCallback as _e, useState as P, useEffect as we, useRef as ct, lazy as Wa } from "react";
11
+ import { useQueryClient as Se, useQuery as Ne, useMutation as Ae, onlineManager as tr, QueryClient as Ya, QueryClientProvider as Qa } from "@tanstack/react-query";
12
12
  import { toast as j } from "sonner";
13
- import { useLanguages as ut, useUpdateBlocksPropsRealtime as nr, PERMISSIONS as Qa, usePartailBlocksStore as Xa, usePermissions as sn, useLibraryBlocks as Za, useTheme as Ja, mergeClasses as ei, useSavePage as sr, useRightPanel as ti, useBlocksStore as ni, getBlocksFromHTML as si, useTranslation as ri, useSidebarActivePanel as ai, registerChaiSidebarPanel as $n, registerChaiTopBar as ii, registerChaiSaveToLibrary as li, registerChaiMediaManager as oi, ChaiBuilderEditor as ci } from "@chaibuilder/sdk";
14
- import { Card as is, CardHeader as ls, CardTitle as os, CardContent as cs, CardFooter as us, Button as _, AlertDialog as rr, AlertDialogTrigger as ar, AlertDialogContent as ir, AlertDialogHeader as lr, AlertDialogTitle as or, AlertDialogDescription as cr, AlertDialogFooter as ur, AlertDialogCancel as dr, AlertDialogAction as hr, Popover as mr, PopoverTrigger as fr, PopoverContent as gr, Input as ye, Label as X, Dialog as He, DialogContent as Ke, DialogHeader as Ve, DialogTitle as je, DialogDescription as Ye, Alert as pr, DialogFooter as et, DropdownMenu as rn, DropdownMenuTrigger as an, DropdownMenuContent as ln, DropdownMenuItem as De, Textarea as Gt, Select as ui, SelectTrigger as di, SelectValue as hi, SelectContent as mi, SelectItem as fi, Badge as Fn, Sheet as yr, SheetContent as vr, SheetHeader as Er, SheetTitle as br, Separator as gi, TooltipProvider as wr, Tooltip as ds, SheetTrigger as pi, TooltipTrigger as hs, ScrollArea as yi, TooltipContent as ms, Skeleton as fn, DropdownMenuSeparator as vi, CardDescription as Ei, Command as bi, CommandInput as wi, CommandList as Si, CommandEmpty as Ni, CommandGroup as Ai, CommandItem as Ls, AlertDescription as xi, Accordion as Ti, AccordionItem as gn, AccordionTrigger as pn, AccordionContent as yn, HoverCard as Ci, HoverCardTrigger as Pi, HoverCardContent as _i } from "@chaibuilder/sdk/ui";
15
- import { LockIcon as Sr, UserIcon as Ii, AlertTriangleIcon as ki, Trash2 as Nr, Plus as fs, ImageIcon as Ar, X as xr, AlertCircle as Tr, StarIcon as Li, MoreHorizontal as gs, PencilIcon as Di, Power as Cr, TrashIcon as Gi, Tag as Ri, File as on, Search as Ui, StarsIcon as Oi, Globe as Bi, Pencil as Mi, Trash as ps, SquareLibrary as Ds, Logs as Fi, Loader as Pr, Languages as qi, ChevronDown as _r, Star as Hi, History as Gs, ArrowUpRight as Ki, Clock as Vi, Undo2 as Ir, CloudOff as ji, Edit as $i, Save as kr, GlobeIcon as zi, Eye as Lr, Palette as Wi, CheckCircle as Yi, Send as Rs, Rocket as Us, Settings as Qi, ExternalLink as Xi, EyeOff as Zi, Loader2 as Dr, LanguagesIcon as Ji, DatabaseIcon as el, ChevronLeft as tl, ChevronRight as nl, User as sl } from "lucide-react";
16
- import { format as Dn, formatDistanceToNow as rl } from "date-fns";
17
- import { useRegisteredChaiBlocks as al, getDefaultBlockProps as il } from "@chaibuilder/runtime";
18
- import { z as Nn } from "zod";
19
- import { loadWebBlocks as ll } from "@chaibuilder/sdk/web-blocks";
13
+ import { useLanguages as ut, useUpdateBlocksPropsRealtime as nr, PERMISSIONS as Xa, usePartailBlocksStore as Za, usePermissions as sn, useLibraryBlocks as Ja, useTheme as ei, mergeClasses as ti, useSavePage as sr, useRightPanel as ni, useBlocksStore as si, getBlocksFromHTML as ri, useTranslation as ai, useSidebarActivePanel as ii, registerChaiSidebarPanel as zn, registerChaiTopBar as li, registerChaiMediaManager as oi, registerChaiSaveToLibrary as ci, ChaiBuilderEditor as ui } from "@chaibuilder/sdk";
14
+ import { Card as ls, CardHeader as os, CardTitle as cs, CardContent as us, CardFooter as ds, Button as _, AlertDialog as rr, AlertDialogTrigger as ar, AlertDialogContent as ir, AlertDialogHeader as lr, AlertDialogTitle as or, AlertDialogDescription as cr, AlertDialogFooter as ur, AlertDialogCancel as dr, AlertDialogAction as hr, Popover as mr, PopoverTrigger as fr, PopoverContent as gr, Input as ye, Label as X, Dialog as He, DialogContent as Ke, DialogHeader as Ve, DialogTitle as je, DialogDescription as Ye, Alert as pr, DialogFooter as et, DropdownMenu as rn, DropdownMenuTrigger as an, DropdownMenuContent as ln, DropdownMenuItem as De, Textarea as Gt, Select as di, SelectTrigger as hi, SelectValue as mi, SelectContent as fi, SelectItem as gi, Badge as qn, Sheet as yr, SheetContent as vr, SheetHeader as Er, SheetTitle as br, Separator as pi, TooltipProvider as wr, Tooltip as hs, SheetTrigger as yi, TooltipTrigger as ms, ScrollArea as vi, TooltipContent as fs, Skeleton as fn, DropdownMenuSeparator as Ei, CardDescription as bi, Command as wi, CommandInput as Si, CommandList as Ni, CommandEmpty as Ai, CommandGroup as xi, CommandItem as Ds, AlertDescription as Ti, Accordion as Ci, AccordionItem as gn, AccordionTrigger as pn, AccordionContent as yn, HoverCard as Pi, HoverCardTrigger as _i, HoverCardContent as Ii } from "@chaibuilder/sdk/ui";
15
+ import { LockIcon as Sr, UserIcon as ki, AlertTriangleIcon as Li, Trash2 as Nr, Plus as gs, ImageIcon as Ar, X as xr, AlertCircle as Tr, StarIcon as Di, MoreHorizontal as ps, PencilIcon as Gi, Power as Cr, TrashIcon as Ui, Tag as Ri, File as on, Search as Oi, StarsIcon as Bi, Globe as Mi, Pencil as Fi, Trash as ys, SquareLibrary as Gs, Logs as qi, Loader as Pr, Languages as Hi, ChevronDown as _r, Star as Ki, History as Us, ArrowUpRight as Vi, Clock as ji, Undo2 as Ir, CloudOff as $i, Edit as zi, Save as kr, GlobeIcon as Wi, Eye as Lr, Palette as Yi, CheckCircle as Qi, Send as Rs, Rocket as Os, Settings as Xi, ExternalLink as Zi, EyeOff as Ji, Loader2 as Dr, LanguagesIcon as el, DatabaseIcon as tl, ChevronLeft as nl, ChevronRight as sl, User as rl } from "lucide-react";
16
+ import { format as Gn, formatDistanceToNow as al } from "date-fns";
17
+ import { useRegisteredChaiBlocks as il, getDefaultBlockProps as ll } from "@chaibuilder/runtime";
18
+ import { z as An } from "zod";
19
+ import { loadWebBlocks as ol } from "@chaibuilder/sdk/web-blocks";
20
20
  const qe = {
21
21
  ab: "Abkhazian",
22
22
  aa: "Afar",
@@ -246,8 +246,13 @@ const qe = {
246
246
  DELETE_LIBRARY_ITEM: "DELETE_LIBRARY_ITEM",
247
247
  MARK_AS_TEMPLATE: "MARK_AS_TEMPLATE",
248
248
  UNMARK_AS_TEMPLATE: "UNMARK_AS_TEMPLATE",
249
- GET_TEMPLATES_BY_TYPE: "GET_TEMPLATES_BY_TYPE"
250
- }, ke = "chaibuilder", ys = async (e, t, n = {}) => await fetch(e, {
249
+ GET_TEMPLATES_BY_TYPE: "GET_TEMPLATES_BY_TYPE",
250
+ // DAM Actions
251
+ UPLOAD_ASSET: "UPLOAD_ASSET",
252
+ DELETE_ASSET: "DELETE_ASSET",
253
+ UPDATE_ASSET: "UPDATE_ASSET",
254
+ GET_ASSETS: "GET_ASSETS"
255
+ }, ke = "chaibuilder", vs = async (e, t, n = {}) => await fetch(e, {
251
256
  method: "POST",
252
257
  headers: {
253
258
  "Content-Type": "application/json",
@@ -258,34 +263,34 @@ const qe = {
258
263
  if (import.meta.vitest) {
259
264
  const { it: e, expect: t } = import.meta.vitest;
260
265
  e("should fetch API", async () => {
261
- const n = await ys("/v1/api/chai", {
266
+ const n = await vs("/v1/api/chai", {
262
267
  action: "test"
263
268
  });
264
269
  t(n).toBeDefined();
265
270
  });
266
271
  }
267
- let ol = 0;
268
- function Os(e, t) {
269
- const n = `atom${++ol}`, s = {
272
+ let cl = 0;
273
+ function Bs(e, t) {
274
+ const n = `atom${++cl}`, s = {
270
275
  toString() {
271
276
  return n;
272
277
  }
273
278
  };
274
- return typeof e == "function" ? s.read = e : (s.init = e, s.read = cl, s.write = ul), t && (s.write = t), s;
279
+ return typeof e == "function" ? s.read = e : (s.init = e, s.read = ul, s.write = dl), t && (s.write = t), s;
275
280
  }
276
- function cl(e) {
281
+ function ul(e) {
277
282
  return e(this);
278
283
  }
279
- function ul(e, t, n) {
284
+ function dl(e, t, n) {
280
285
  return t(
281
286
  this,
282
287
  typeof n == "function" ? n(e(this)) : n
283
288
  );
284
289
  }
285
- const dl = Symbol(
290
+ const hl = Symbol(
286
291
  ""
287
- ), hl = (e) => typeof (e == null ? void 0 : e.then) == "function";
288
- function ml(e = () => {
292
+ ), ml = (e) => typeof (e == null ? void 0 : e.then) == "function";
293
+ function fl(e = () => {
289
294
  try {
290
295
  return window.localStorage;
291
296
  } catch {
@@ -308,7 +313,7 @@ function ml(e = () => {
308
313
  }
309
314
  return a;
310
315
  }, y = (d = (g = e()) == null ? void 0 : g.getItem(c)) != null ? d : null;
311
- return hl(y) ? y.then(w) : w(y);
316
+ return ml(y) ? y.then(w) : w(y);
312
317
  },
313
318
  setItem: (c, h) => {
314
319
  var g;
@@ -347,25 +352,25 @@ function ml(e = () => {
347
352
  };
348
353
  }), o && (i.subscribe = l(o)), i;
349
354
  }
350
- const fl = ml();
351
- function gl(e, t, n = fl, s) {
352
- const a = Os(
355
+ const gl = fl();
356
+ function pl(e, t, n = gl, s) {
357
+ const a = Bs(
353
358
  t
354
359
  );
355
360
  return a.onMount = (l) => {
356
361
  l(n.getItem(e, t));
357
362
  let o;
358
363
  return n.subscribe && (o = n.subscribe(e, l, t)), o;
359
- }, Os(
364
+ }, Bs(
360
365
  (l) => l(a),
361
366
  (l, o, c) => {
362
367
  const h = typeof c == "function" ? c(l(a)) : c;
363
- return h === dl ? (o(a, t), n.removeItem(e)) : h instanceof Promise ? h.then((g) => (o(a, g), n.setItem(e, g))) : (o(a, h), n.setItem(e, h));
368
+ return h === hl ? (o(a, t), n.removeItem(e)) : h instanceof Promise ? h.then((g) => (o(a, g), n.setItem(e, g))) : (o(a, h), n.setItem(e, h));
364
369
  }
365
370
  );
366
371
  }
367
- const pl = gl("__chai_user", null), st = () => {
368
- const [e, t] = Ln(pl);
372
+ const yl = pl("__chai_user", null), st = () => {
373
+ const [e, t] = Dn(yl);
369
374
  return {
370
375
  isLoggedIn: !!e,
371
376
  user: e,
@@ -374,8 +379,8 @@ const pl = gl("__chai_user", null), st = () => {
374
379
  t(null);
375
380
  }
376
381
  };
377
- }, yl = () => {
378
- const { user: e, setUser: t, logout: n } = st(), s = Gn(), a = Se();
382
+ }, vl = () => {
383
+ const { user: e, setUser: t, logout: n } = st(), s = Un(), a = Se();
379
384
  return Ne({
380
385
  queryKey: ["refresh_token"],
381
386
  queryFn: async () => {
@@ -405,7 +410,7 @@ const pl = gl("__chai_user", null), st = () => {
405
410
  retry: !1,
406
411
  enabled: !1
407
412
  });
408
- }, Vu = () => {
413
+ }, ju = () => {
409
414
  const { user: e } = st(), t = dt("onSessionExpired"), n = Y(
410
415
  () => e == null ? void 0 : e.accessToken,
411
416
  [e == null ? void 0 : e.accessToken]
@@ -441,12 +446,12 @@ const pl = gl("__chai_user", null), st = () => {
441
446
  const { user: e } = st(), t = Y(
442
447
  () => e == null ? void 0 : e.accessToken,
443
448
  [e == null ? void 0 : e.accessToken]
444
- ), { refetch: n } = yl();
449
+ ), { refetch: n } = vl();
445
450
  return _e(
446
451
  async (s, a, i = {}) => {
447
452
  if (t)
448
453
  try {
449
- const l = te(a, "action", "").toLowerCase(), o = await ys(
454
+ const l = te(a, "action", "").toLowerCase(), o = await vs(
450
455
  s + (l ? `?action=${l}` : ""),
451
456
  a,
452
457
  {
@@ -473,7 +478,7 @@ const pl = gl("__chai_user", null), st = () => {
473
478
  });
474
479
  }
475
480
  });
476
- }, Rr = () => {
481
+ }, Ur = () => {
477
482
  const e = Q(), t = Se(), n = $();
478
483
  return Ae({
479
484
  mutationFn: async (s) => n(e, {
@@ -492,7 +497,7 @@ const pl = gl("__chai_user", null), st = () => {
492
497
  });
493
498
  }
494
499
  });
495
- }, vl = () => {
500
+ }, El = () => {
496
501
  const e = Q(), t = Se(), n = $();
497
502
  return Ae({
498
503
  mutationFn: async (s) => n(e, { action: I.UPDATE_WEBSITE_DATA, data: s }),
@@ -508,7 +513,7 @@ const pl = gl("__chai_user", null), st = () => {
508
513
  }
509
514
  });
510
515
  };
511
- function Re() {
516
+ function Ue() {
512
517
  const [e, t] = P(
513
518
  new URLSearchParams(window.location.search)
514
519
  );
@@ -521,16 +526,16 @@ function Re() {
521
526
  };
522
527
  }, []), [e, t];
523
528
  }
524
- const El = as({}), Ur = () => Ln(El), bl = () => {
525
- const [e] = Re(), t = e.get("page"), n = ct(""), { mutate: s } = Gr();
529
+ const bl = is({}), Rr = () => Dn(bl), wl = () => {
530
+ const [e] = Ue(), t = e.get("page"), n = ct(""), { mutate: s } = Gr();
526
531
  we(() => {
527
532
  !me(n.current) && t !== n.current && s({ id: n.current }), n.current = t;
528
533
  }, [t, s, n]);
529
534
  }, dt = (e, t) => {
530
- const [n] = Ur();
535
+ const [n] = Rr();
531
536
  return te(n, e, t);
532
- }, Q = () => dt("apiUrl", "/chai/api"), Gn = () => dt("usersApiUrl", "/chai/users"), cn = () => {
533
- const e = Q(), [t] = Re(), n = t.get("page"), s = $();
537
+ }, Q = () => dt("apiUrl", "/chai/api"), Un = () => dt("usersApiUrl", "/chai/users"), cn = () => {
538
+ const e = Q(), [t] = Ue(), n = t.get("page"), s = $();
534
539
  return Ne({
535
540
  queryKey: [ke, I.GET_LANGUAGE_PAGES, n],
536
541
  initialData: [],
@@ -540,7 +545,7 @@ const El = as({}), Ur = () => Ln(El), bl = () => {
540
545
  action: I.GET_LANGUAGE_PAGES,
541
546
  data: { id: n }
542
547
  });
543
- return Ra(Ua(a, "primaryPage"));
548
+ return Ua(Ra(a, "primaryPage"));
544
549
  },
545
550
  enabled: !!n
546
551
  });
@@ -567,7 +572,7 @@ const El = as({}), Ur = () => Ln(El), bl = () => {
567
572
  }), l;
568
573
  }, [t, s, n]);
569
574
  return a || me(e) || e && i[e];
570
- }, vs = () => {
575
+ }, Es = () => {
571
576
  const e = Se(), { data: t } = Ne({
572
577
  queryKey: ["chaibuilder", I.AI_CONTEXT],
573
578
  initialData: "",
@@ -586,14 +591,14 @@ const El = as({}), Ur = () => Ln(El), bl = () => {
586
591
  staleTime: 1e3 * 60 * 5,
587
592
  queryFn: async () => e(t, { action: I.GET_WEBSITE_PAGES }) || []
588
593
  });
589
- }, wl = as({ lastSaved: void 0 }), Es = () => Ln(wl), Ue = () => {
590
- const [e] = Re(), t = e.get("page"), { data: n, isFetching: s } = Rn();
594
+ }, Sl = is({ lastSaved: void 0 }), bs = () => Dn(Sl), Re = () => {
595
+ const [e] = Ue(), t = e.get("page"), { data: n, isFetching: s } = Rn();
591
596
  return { data: Y(
592
597
  () => fe(n, { id: t }) || {},
593
598
  [n, t]
594
599
  ), isFetching: s };
595
600
  }, dn = (e) => {
596
- const t = Gn(), n = $();
601
+ const t = Un(), n = $();
597
602
  return Ne({
598
603
  queryKey: [ke, "chaiUserInfo", e],
599
604
  queryFn: async () => await n(t, {
@@ -602,15 +607,15 @@ const El = as({}), Ur = () => Ln(El), bl = () => {
602
607
  }),
603
608
  enabled: !!e && e !== "EXPIRED"
604
609
  });
605
- }, Sl = as(void 0), hn = () => {
606
- const [e] = Re(), t = e.get("page"), { user: n } = st(), [s, a] = Ln(Sl);
610
+ }, Nl = is(void 0), hn = () => {
611
+ const [e] = Ue(), t = e.get("page"), { user: n } = st(), [s, a] = Dn(Nl);
607
612
  return Y(() => ({
608
613
  isLocked: t && (n == null ? void 0 : n.id) !== s,
609
614
  currentEditor: s,
610
615
  setCurrentEditor: (i) => a(i)
611
616
  }), [n == null ? void 0 : n.id, s, t, a]);
612
617
  }, Br = () => {
613
- const [e] = Re(), t = e.get("page"), n = Q(), { setAiContext: s } = vs(), { setCurrentEditor: a } = hn(), [, i] = Es(), l = $();
618
+ const [e] = Ue(), t = e.get("page"), n = Q(), { setAiContext: s } = Es(), { setCurrentEditor: a } = hn(), [, i] = bs(), l = $();
614
619
  return Ne({
615
620
  queryKey: [ke, I.GET_DRAFT_PAGE, t],
616
621
  staleTime: 1 / 0,
@@ -642,7 +647,7 @@ const El = as({}), Ur = () => Ln(El), bl = () => {
642
647
  enabled: !!e && !!t
643
648
  });
644
649
  };
645
- function Nl({
650
+ function Al({
646
651
  avatar: e,
647
652
  name: t,
648
653
  email: n,
@@ -650,12 +655,12 @@ function Nl({
650
655
  currentEditor: a
651
656
  }) {
652
657
  const [i, l] = P(!1);
653
- return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(is, { className: "w-full max-w-md mx-auto", children: [
654
- /* @__PURE__ */ r(ls, { className: "space-y-1", children: /* @__PURE__ */ u(os, { className: "flex items-center gap-2 text-2xl", children: [
658
+ return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(ls, { className: "w-full max-w-md mx-auto", children: [
659
+ /* @__PURE__ */ r(os, { className: "space-y-1", children: /* @__PURE__ */ u(cs, { className: "flex items-center gap-2 text-2xl", children: [
655
660
  /* @__PURE__ */ r(Sr, { className: "w-6 h-6 text-yellow-500" }),
656
661
  a === "EXPIRED" ? "Editing access timed out" : "Page locked for editing"
657
662
  ] }) }),
658
- /* @__PURE__ */ r(cs, { className: "grid gap-4", children: a === "EXPIRED" ? /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("p", { children: "Your editing access has been paused due to inactivity. Please refresh the page to continue" }) }) : /* @__PURE__ */ u("div", { children: [
663
+ /* @__PURE__ */ r(us, { className: "grid gap-4", children: a === "EXPIRED" ? /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("p", { children: "Your editing access has been paused due to inactivity. Please refresh the page to continue" }) }) : /* @__PURE__ */ u("div", { children: [
659
664
  /* @__PURE__ */ u("div", { className: "flex items-center space-x-4", children: [
660
665
  e ? /* @__PURE__ */ r(
661
666
  "img",
@@ -664,7 +669,7 @@ function Nl({
664
669
  alt: t,
665
670
  className: "w-12 h-12 border border-gray-300 rounded-full"
666
671
  }
667
- ) : /* @__PURE__ */ r(Ii, { className: "w-12 h-12 p-2 border border-gray-300 rounded-full" }),
672
+ ) : /* @__PURE__ */ r(ki, { className: "w-12 h-12 p-2 border border-gray-300 rounded-full" }),
668
673
  /* @__PURE__ */ u("div", { className: "space-y-1", children: [
669
674
  /* @__PURE__ */ r("h3", { className: "font-semibold", children: t }),
670
675
  n && /* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground", children: n })
@@ -672,7 +677,7 @@ function Nl({
672
677
  ] }),
673
678
  /* @__PURE__ */ r("div", { className: "text-sm mt-4", children: /* @__PURE__ */ r("p", { children: "This user is currently editing the page. You cannot make changes." }) })
674
679
  ] }) }),
675
- /* @__PURE__ */ r(us, { children: a === "EXPIRED" ? /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
680
+ /* @__PURE__ */ r(ds, { children: a === "EXPIRED" ? /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
676
681
  _,
677
682
  {
678
683
  className: "w-full",
@@ -690,7 +695,7 @@ function Nl({
690
695
  /* @__PURE__ */ r(or, { children: "Are you sure you want to take over?" }),
691
696
  /* @__PURE__ */ u(cr, { children: [
692
697
  /* @__PURE__ */ u("span", { className: "flex items-center space-x-2 text-yellow-500", children: [
693
- /* @__PURE__ */ r(ki, { className: "w-5 h-5" }),
698
+ /* @__PURE__ */ r(Li, { className: "w-5 h-5" }),
694
699
  /* @__PURE__ */ r("span", { children: "This action might cause the other user to lose unsaved changes." })
695
700
  ] }),
696
701
  /* @__PURE__ */ r("br", {}),
@@ -711,12 +716,12 @@ function Nl({
711
716
  ] }) })
712
717
  ] }) });
713
718
  }
714
- const Al = () => {
715
- const { isLocked: e, currentEditor: t } = hn(), { data: n } = dn(t), [s] = Re(), a = s.get("page"), { mutate: i } = Gr(), { isFetching: l } = Br(), o = _e(() => {
719
+ const xl = () => {
720
+ const { isLocked: e, currentEditor: t } = hn(), { data: n } = dn(t), [s] = Ue(), a = s.get("page"), { mutate: i } = Gr(), { isFetching: l } = Br(), o = _e(() => {
716
721
  i({ id: a });
717
722
  }, [a, i]);
718
723
  return !e || l ? /* @__PURE__ */ r("div", { className: "" }) : /* @__PURE__ */ r(
719
- Nl,
724
+ Al,
720
725
  {
721
726
  ...n,
722
727
  name: (n == null ? void 0 : n.name) || "Unknown User",
@@ -725,8 +730,8 @@ const Al = () => {
725
730
  onTakeOver: o
726
731
  }
727
732
  );
728
- }, xl = () => {
729
- const [e, t] = Re(), n = e.get("lang"), s = Or(n), { setSelectedLang: a } = ut(), i = () => {
733
+ }, Tl = () => {
734
+ const [e, t] = Ue(), n = e.get("lang"), s = Or(n), { setSelectedLang: a } = ut(), i = () => {
730
735
  const o = new URLSearchParams(window.location.search);
731
736
  o.delete("lang");
732
737
  const c = o.toString(), h = `${window.location.pathname}${c ? `?${c}` : ""}`;
@@ -734,21 +739,21 @@ const Al = () => {
734
739
  };
735
740
  if (s) return null;
736
741
  const l = te(qe, n);
737
- return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(is, { className: "w-full max-w-md mx-auto", children: [
738
- /* @__PURE__ */ r(ls, { className: "space-y-1", children: /* @__PURE__ */ u(os, { className: "flex items-center gap-2 text-2xl", children: [
742
+ return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(ls, { className: "w-full max-w-md mx-auto", children: [
743
+ /* @__PURE__ */ r(os, { className: "space-y-1", children: /* @__PURE__ */ u(cs, { className: "flex items-center gap-2 text-2xl", children: [
739
744
  /* @__PURE__ */ r(Sr, { className: "w-6 h-6 text-yellow-500" }),
740
745
  'Page missing for "',
741
746
  l,
742
747
  '" language.'
743
748
  ] }) }),
744
- /* @__PURE__ */ r(cs, { className: "grid gap-4", children: /* @__PURE__ */ u("div", { children: [
749
+ /* @__PURE__ */ r(us, { className: "grid gap-4", children: /* @__PURE__ */ u("div", { children: [
745
750
  'Page is not available in the "',
746
751
  l,
747
752
  '" language. Either create the page in the "',
748
753
  l,
749
754
  '" language or switch to the base language.'
750
755
  ] }) }),
751
- /* @__PURE__ */ r(us, { children: /* @__PURE__ */ r(
756
+ /* @__PURE__ */ r(ds, { children: /* @__PURE__ */ r(
752
757
  _,
753
758
  {
754
759
  onClick: i,
@@ -758,7 +763,7 @@ const Al = () => {
758
763
  }
759
764
  ) })
760
765
  ] }) });
761
- }, Tl = (e) => {
766
+ }, Cl = (e) => {
762
767
  const t = Q(), n = $();
763
768
  return Ae({
764
769
  mutationFn: async (s) => n(t, {
@@ -774,7 +779,7 @@ const Al = () => {
774
779
  });
775
780
  }
776
781
  });
777
- }, Cl = (e) => {
782
+ }, Pl = (e) => {
778
783
  const t = Q(), n = $();
779
784
  return Ne({
780
785
  queryKey: [ke, "uiBlockDetails", e],
@@ -795,7 +800,7 @@ const Al = () => {
795
800
  },
796
801
  retry: !1
797
802
  });
798
- }, Pl = (e) => {
803
+ }, _l = (e) => {
799
804
  const t = Q(), n = $();
800
805
  return Ae({
801
806
  mutationFn: async (s) => n(t, {
@@ -811,7 +816,7 @@ const Al = () => {
811
816
  });
812
817
  }
813
818
  });
814
- }, _l = ({
819
+ }, Il = ({
815
820
  blockId: e,
816
821
  libBlockId: t,
817
822
  isOpen: n,
@@ -819,7 +824,7 @@ const Al = () => {
819
824
  blockName: a,
820
825
  trigger: i
821
826
  }) => {
822
- const [l, o] = P(!1), c = nr(), h = Pl(() => {
827
+ const [l, o] = P(!1), c = nr(), h = _l(() => {
823
828
  c([e], { _libBlockId: void 0 }), j.success("Block deleted successfully"), o(!1), s();
824
829
  });
825
830
  return /* @__PURE__ */ u(mr, { open: n, onOpenChange: (w) => !w && s(), children: [
@@ -885,7 +890,7 @@ const Al = () => {
885
890
  }
886
891
  )
887
892
  ] });
888
- }, Il = ({
893
+ }, kl = ({
889
894
  blockId: e,
890
895
  libBlockId: t,
891
896
  blockName: n,
@@ -895,7 +900,7 @@ const Al = () => {
895
900
  }) => {
896
901
  const [l, o] = P(!1);
897
902
  return /* @__PURE__ */ r(
898
- _l,
903
+ Il,
899
904
  {
900
905
  blockId: e,
901
906
  libBlockId: t,
@@ -920,7 +925,7 @@ const Al = () => {
920
925
  )
921
926
  }
922
927
  );
923
- }, kl = () => {
928
+ }, Ll = () => {
924
929
  const e = Q(), t = $(), n = Se(), {
925
930
  data: s = [],
926
931
  isLoading: a,
@@ -962,8 +967,8 @@ const Al = () => {
962
967
  createGroup: l,
963
968
  isCreating: o
964
969
  };
965
- }, Ll = ({ value: e, onChange: t }) => {
966
- const [n, s] = P(!1), [a, i] = P(""), l = ct(null), { groups: o } = kl(), [c, h] = P([
970
+ }, Dl = ({ value: e, onChange: t }) => {
971
+ const [n, s] = P(!1), [a, i] = P(""), l = ct(null), { groups: o } = Ll(), [c, h] = P([
967
972
  { id: "hero", name: "Hero" },
968
973
  { id: "feature", name: "Feature" },
969
974
  { id: "footer", name: "Footer" },
@@ -1061,17 +1066,17 @@ const Al = () => {
1061
1066
  size: "icon",
1062
1067
  variant: "outline",
1063
1068
  onClick: () => s(!0),
1064
- children: /* @__PURE__ */ r(fs, { className: "h-4 w-4" })
1069
+ children: /* @__PURE__ */ r(gs, { className: "h-4 w-4" })
1065
1070
  }
1066
1071
  )
1067
1072
  ] });
1068
- }, Dl = 1 * 1024 * 1024, Gl = ({ value: e, onChange: t }) => {
1073
+ }, Gl = 1 * 1024 * 1024, Ul = ({ value: e, onChange: t }) => {
1069
1074
  const [n, s] = P(!1), a = ct(null), i = _e(
1070
1075
  (c) => {
1071
1076
  var g;
1072
1077
  const h = (g = c.target.files) == null ? void 0 : g[0];
1073
1078
  if (h) {
1074
- if (h.size > Dl) {
1079
+ if (h.size > Gl) {
1075
1080
  j.error("File too large", {
1076
1081
  description: `Maximum file size is 1mb. Selected file is ${(h.size / 1024 / 1024).toFixed(2)}MB.`
1077
1082
  }), a.current && (a.current.value = "");
@@ -1147,7 +1152,7 @@ const Al = () => {
1147
1152
  ) })
1148
1153
  ] });
1149
1154
  }, ue = {
1150
- ...Qa,
1155
+ ...Xa,
1151
1156
  //pages
1152
1157
  ADD_PAGE: "add_page",
1153
1158
  EDIT_PAGE: "edit_page",
@@ -1183,7 +1188,7 @@ const Al = () => {
1183
1188
  EDIT_MEDIA: "edit_media",
1184
1189
  DELETE_MEDIA: "delete_media"
1185
1190
  }, Rl = (e) => {
1186
- const { blocks: t, close: n, blockId: s } = e, { getPartailBlocks: a } = Xa(), i = t.find((N) => N._id === s), l = i == null ? void 0 : i._libBlockId, o = !!l, c = Y(() => t.some(
1191
+ const { blocks: t, close: n, blockId: s } = e, { getPartailBlocks: a } = Za(), i = t.find((N) => N._id === s), l = i == null ? void 0 : i._libBlockId, o = !!l, c = Y(() => t.some(
1187
1192
  (N) => N._type === "PartialBlock" || N._type === "GlobalBlock"
1188
1193
  ), [t]), h = Y(() => {
1189
1194
  let N = [];
@@ -1194,13 +1199,13 @@ const Al = () => {
1194
1199
  } else
1195
1200
  N.push(C);
1196
1201
  return N;
1197
- }, [t, a]), [g, d] = P(""), [w, y] = P(""), [p, S] = P(""), [v, x] = P(""), [G, E] = P({}), [b, T] = P(!1), [R, J] = P(o), [ie, k] = P(!1), { hasPermission: q } = sn(), A = q(ue.DELETE_LIBRARY_BLOCK), M = nr(), ne = () => {
1202
+ }, [t, a]), [g, d] = P(""), [w, y] = P(""), [p, S] = P(""), [v, x] = P(""), [G, E] = P({}), [b, T] = P(!1), [U, J] = P(o), [ie, k] = P(!1), { hasPermission: q } = sn(), A = q(ue.DELETE_LIBRARY_BLOCK), M = nr(), ne = () => {
1198
1203
  M([s], { _libBlockId: void 0 }), j.success("Block delinked from library"), n();
1199
1204
  }, {
1200
1205
  data: he,
1201
1206
  isLoading: z,
1202
1207
  isError: de
1203
- } = Cl(l);
1208
+ } = Pl(l);
1204
1209
  we(() => {
1205
1210
  de && o && (k(!0), J(!1));
1206
1211
  }, [de, o]), we(() => {
@@ -1212,7 +1217,7 @@ const Al = () => {
1212
1217
  const F = () => {
1213
1218
  const N = {};
1214
1219
  return g.trim() ? g.length < 2 && (N.name = "Name must be at least 2 characters") : N.name = "Name is required", w || (N.group = "Group is required"), E(N), Object.keys(N).length === 0 && !c;
1215
- }, { resetLibrary: Ee } = Za({ id: "" }), Qe = Tl(
1220
+ }, { resetLibrary: Ee } = Ja({ id: "" }), Qe = Cl(
1216
1221
  (N) => {
1217
1222
  o || M([s], { _libBlockId: N.id }), j.success(`Block ${o ? "updated" : "saved"} successfully`), Ee(N.library), n();
1218
1223
  }
@@ -1230,7 +1235,7 @@ const Al = () => {
1230
1235
  ...o ? { id: l } : {}
1231
1236
  });
1232
1237
  }, m = Qe.isPending;
1233
- return R || z ? /* @__PURE__ */ r("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ r("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" }) }) : ie ? /* @__PURE__ */ u("div", { className: "p-6 space-y-4", children: [
1238
+ return U || z ? /* @__PURE__ */ r("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ r("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" }) }) : ie ? /* @__PURE__ */ u("div", { className: "p-6 space-y-4", children: [
1234
1239
  /* @__PURE__ */ r("div", { className: "text-destructive font-medium", children: "Block Not Found" }),
1235
1240
  /* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground", children: "This block could not be found on the server. It may have been deleted." }),
1236
1241
  /* @__PURE__ */ u("div", { className: "flex justify-end gap-2 pt-4", children: [
@@ -1276,7 +1281,7 @@ const Al = () => {
1276
1281
  children: "Group"
1277
1282
  }
1278
1283
  ),
1279
- /* @__PURE__ */ r(Ll, { value: w, onChange: y }),
1284
+ /* @__PURE__ */ r(Dl, { value: w, onChange: y }),
1280
1285
  G.group && /* @__PURE__ */ r("p", { className: "text-xs text-destructive", children: G.group })
1281
1286
  ] }),
1282
1287
  /* @__PURE__ */ u("div", { className: "space-y-2", children: [
@@ -1294,12 +1299,12 @@ const Al = () => {
1294
1299
  ] }),
1295
1300
  /* @__PURE__ */ u("div", { className: "space-y-2", children: [
1296
1301
  /* @__PURE__ */ r(X, { htmlFor: "previewImage", children: "Preview Image (optional)" }),
1297
- /* @__PURE__ */ r(Gl, { value: v, onChange: x }),
1302
+ /* @__PURE__ */ r(Ul, { value: v, onChange: x }),
1298
1303
  /* @__PURE__ */ r("p", { className: "text-xs text-muted-foreground", children: "max 1mb" })
1299
1304
  ] }),
1300
1305
  /* @__PURE__ */ u("div", { className: "flex justify-end gap-2 pt-2", children: [
1301
1306
  o && A && /* @__PURE__ */ r(
1302
- Il,
1307
+ kl,
1303
1308
  {
1304
1309
  blockId: s,
1305
1310
  libBlockId: l,
@@ -1371,7 +1376,7 @@ const Al = () => {
1371
1376
  GLOBAL_BLOCK_PUBLISH_SUCCESS: "Global block published successfully.",
1372
1377
  PAGES_PUBLISH_SUCCESS: "Your changes have been published successfully.",
1373
1378
  SLUG_CHANGE_SUCCESS: "Slug changed successfully."
1374
- }, Ul = {
1379
+ }, Ol = {
1375
1380
  SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
1376
1381
  }, Ie = () => {
1377
1382
  const e = Q(), t = $();
@@ -1380,13 +1385,13 @@ const Al = () => {
1380
1385
  initialData: [],
1381
1386
  queryFn: async () => t(e, { action: I.GET_PAGE_TYPES })
1382
1387
  });
1383
- }, Ol = (e) => {
1388
+ }, Bl = (e) => {
1384
1389
  const { data: t } = Ie();
1385
1390
  return Y(
1386
1391
  () => t == null ? void 0 : t.find((n) => n.key === e),
1387
1392
  [t, e]
1388
1393
  );
1389
- }, Bl = () => {
1394
+ }, Ml = () => {
1390
1395
  const e = Q(), t = $();
1391
1396
  return Ae({
1392
1397
  mutationFn: async ({ pageType: n, query: s }) => {
@@ -1422,12 +1427,12 @@ const Al = () => {
1422
1427
  j.error(
1423
1428
  `Failed to add new ${l != null && l.hasSlug ? "page" : l.name}.`,
1424
1429
  {
1425
- description: te(Ul, a.message, a.message)
1430
+ description: te(Ol, a.message, a.message)
1426
1431
  }
1427
1432
  );
1428
1433
  }
1429
1434
  });
1430
- }, bs = () => {
1435
+ }, ws = () => {
1431
1436
  const e = Q(), t = Se(), n = $(), { data: s } = Ie();
1432
1437
  return Ae({
1433
1438
  mutationFn: async (a) => await n(e, {
@@ -1451,7 +1456,7 @@ const Al = () => {
1451
1456
  );
1452
1457
  }
1453
1458
  });
1454
- }, Ml = () => {
1459
+ }, Fl = () => {
1455
1460
  const e = Q(), t = Se(), n = $(), { data: s } = Ie();
1456
1461
  return Ae({
1457
1462
  mutationFn: async (a) => n(e, {
@@ -1481,7 +1486,7 @@ const Al = () => {
1481
1486
  );
1482
1487
  }
1483
1488
  });
1484
- }, Fl = () => {
1489
+ }, ql = () => {
1485
1490
  const e = Q(), t = Se(), n = $(), { data: s } = Ie();
1486
1491
  return Ae({
1487
1492
  mutationFn: async (a) => n(e, {
@@ -1509,8 +1514,8 @@ const Al = () => {
1509
1514
  );
1510
1515
  }
1511
1516
  });
1512
- }, ws = () => {
1513
- const e = Q(), t = $(), n = Se(), { data: s } = Ue();
1517
+ }, Ss = () => {
1518
+ const e = Q(), t = $(), n = Se(), { data: s } = Re();
1514
1519
  return Ae({
1515
1520
  mutationFn: async ({ ids: a }) => t(e, {
1516
1521
  action: I.PUBLISH_CHANGES,
@@ -1525,7 +1530,7 @@ const Al = () => {
1525
1530
  j.error("Failed to publish pages.");
1526
1531
  }
1527
1532
  });
1528
- }, ql = () => {
1533
+ }, Hl = () => {
1529
1534
  const e = Q(), t = $(), n = Se();
1530
1535
  return Ae({
1531
1536
  mutationFn: async (s) => {
@@ -1548,7 +1553,7 @@ const Al = () => {
1548
1553
  j.error("Failed to mark page as template.");
1549
1554
  }
1550
1555
  });
1551
- }, Hl = () => {
1556
+ }, Kl = () => {
1552
1557
  const e = Q(), t = $(), n = Se();
1553
1558
  return Ae({
1554
1559
  mutationFn: async (s) => t(e, {
@@ -1562,7 +1567,7 @@ const Al = () => {
1562
1567
  j.error("Failed to unmark page as template.");
1563
1568
  }
1564
1569
  });
1565
- }, Kl = () => {
1570
+ }, Vl = () => {
1566
1571
  const e = Q(), t = $(), n = Se();
1567
1572
  return Ae({
1568
1573
  mutationFn: async ({ id: s, slug: a }) => t(e, {
@@ -1581,7 +1586,7 @@ const Al = () => {
1581
1586
  }
1582
1587
  });
1583
1588
  };
1584
- var Ss = {};
1589
+ var Ns = {};
1585
1590
  (function e(t, n, s, a) {
1586
1591
  var i = !!(t.Worker && t.Blob && t.Promise && t.OffscreenCanvas && t.OffscreenCanvasRenderingContext2D && t.HTMLCanvasElement && t.HTMLCanvasElement.prototype.transferControlToOffscreen && t.URL && t.URL.createObjectURL), l = typeof Path2D == "function" && typeof DOMMatrix == "function", o = function() {
1587
1592
  if (!t.OffscreenCanvas)
@@ -1749,7 +1754,7 @@ var Ss = {};
1749
1754
  b: E(m.substring(4, 6))
1750
1755
  };
1751
1756
  }
1752
- function R(f) {
1757
+ function U(f) {
1753
1758
  var m = v(f, "origin", Object);
1754
1759
  return m.x = v(m, "x", Number), m.y = v(m, "y", Number), m;
1755
1760
  }
@@ -1859,16 +1864,16 @@ var Ss = {};
1859
1864
  function he(f, m) {
1860
1865
  var N = !f, C = !!v(m || {}, "resize"), D = !1, H = v(m, "disableForReducedMotion", Boolean), K = i && !!v(m || {}, "useWorker"), L = K ? w() : null, V = N ? J : ie, le = f && L ? !!f.__confetti_initialized : !1, ge = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion)").matches, oe;
1861
1866
  function pe(W, Le, Be) {
1862
- for (var Me = v(W, "particleCount", x), Xe = v(W, "angle", Number), rt = v(W, "spread", Number), $e = v(W, "startVelocity", Number), Ca = v(W, "decay", Number), Pa = v(W, "gravity", Number), _a = v(W, "drift", Number), xs = v(W, "colors", b), Ia = v(W, "ticks", Number), Ts = v(W, "shapes"), ka = v(W, "scalar"), La = !!v(W, "flat"), Cs = R(W), Ps = Me, Mn = [], Da = f.width * Cs.x, Ga = f.height * Cs.y; Ps--; )
1863
- Mn.push(
1867
+ for (var Me = v(W, "particleCount", x), Xe = v(W, "angle", Number), rt = v(W, "spread", Number), $e = v(W, "startVelocity", Number), Ca = v(W, "decay", Number), Pa = v(W, "gravity", Number), _a = v(W, "drift", Number), Ts = v(W, "colors", b), Ia = v(W, "ticks", Number), Cs = v(W, "shapes"), ka = v(W, "scalar"), La = !!v(W, "flat"), Ps = U(W), _s = Me, Fn = [], Da = f.width * Ps.x, Ga = f.height * Ps.y; _s--; )
1868
+ Fn.push(
1864
1869
  A({
1865
1870
  x: Da,
1866
1871
  y: Ga,
1867
1872
  angle: Xe,
1868
1873
  spread: rt,
1869
1874
  startVelocity: $e,
1870
- color: xs[Ps % xs.length],
1871
- shape: Ts[G(0, Ts.length)],
1875
+ color: Ts[_s % Ts.length],
1876
+ shape: Cs[G(0, Cs.length)],
1872
1877
  ticks: Ia,
1873
1878
  decay: Ca,
1874
1879
  gravity: Pa,
@@ -1877,7 +1882,7 @@ var Ss = {};
1877
1882
  flat: La
1878
1883
  })
1879
1884
  );
1880
- return oe ? oe.addFettis(Mn) : (oe = ne(f, Mn, V, Le, Be), oe.promise);
1885
+ return oe ? oe.addFettis(Fn) : (oe = ne(f, Fn, V, Le, Be), oe.promise);
1881
1886
  }
1882
1887
  function xe(W) {
1883
1888
  var Le = H || v(W, "disableForReducedMotion", Boolean), Be = v(W, "zIndex", Number);
@@ -1984,15 +1989,15 @@ var Ss = {};
1984
1989
  }, n.exports.create = he, n.exports.shapeFromPath = Ee, n.exports.shapeFromText = Qe;
1985
1990
  })(/* @__PURE__ */ function() {
1986
1991
  return typeof window < "u" ? window : typeof self < "u" ? self : this || {};
1987
- }(), Ss, !1);
1988
- const Vl = Ss.exports;
1989
- Ss.exports.create;
1990
- const jl = {
1992
+ }(), Ns, !1);
1993
+ const jl = Ns.exports;
1994
+ Ns.exports.create;
1995
+ const $l = {
1991
1996
  particleCount: 350,
1992
1997
  spread: 120,
1993
1998
  origin: { y: 0.6 },
1994
1999
  angle: 90
1995
- }, $l = {
2000
+ }, zl = {
1996
2001
  TOP_RIGHT: {
1997
2002
  angle: 225,
1998
2003
  origin: { x: 0.9, y: 0 }
@@ -2001,13 +2006,13 @@ const jl = {
2001
2006
  angle: 100,
2002
2007
  origin: { x: 0.9, y: 0.9 }
2003
2008
  }
2004
- }, xn = (e) => {
2005
- let t = $l[e];
2009
+ }, Tn = (e) => {
2010
+ let t = zl[e];
2006
2011
  t || (t = {});
2007
- const n = { ...jl, ...t };
2008
- Vl(n);
2009
- }, zl = () => {
2010
- const [e] = Ja(), { mutate: t, isPending: n } = ws(), { mutateAsync: s, isPending: a } = Rr();
2012
+ const n = { ...$l, ...t };
2013
+ jl(n);
2014
+ }, Wl = () => {
2015
+ const [e] = ei(), { mutate: t, isPending: n } = Ss(), { mutateAsync: s, isPending: a } = Ur();
2011
2016
  return /* @__PURE__ */ u("div", { className: "bg-white py-3 flex items-center justify-center gap-x-3 border-t", children: [
2012
2017
  /* @__PURE__ */ r(
2013
2018
  _,
@@ -2031,7 +2036,7 @@ const jl = {
2031
2036
  { ids: ["THEME"] },
2032
2037
  {
2033
2038
  onSuccess: () => {
2034
- xn("BOTTOM_RIGHT");
2039
+ Tn("BOTTOM_RIGHT");
2035
2040
  }
2036
2041
  }
2037
2042
  );
@@ -2040,12 +2045,12 @@ const jl = {
2040
2045
  }
2041
2046
  )
2042
2047
  ] });
2043
- }, Wl = ({
2048
+ }, Yl = ({
2044
2049
  page: e,
2045
2050
  onClose: t
2046
2051
  }) => {
2047
- const [n, s] = P(e.slug || ""), { mutate: a, isPending: i } = Kl(), { data: l } = Ie(), o = fe(l, { key: e == null ? void 0 : e.pageType }), c = (g) => {
2048
- if (g.preventDefault(), !(e != null && e.primaryPage) && Object.keys(qe).some((y) => n === `/${y}` || Ut(n, `/${y}/`))) {
2052
+ const [n, s] = P(e.slug || ""), { mutate: a, isPending: i } = Vl(), { data: l } = Ie(), o = fe(l, { key: e == null ? void 0 : e.pageType }), c = (g) => {
2053
+ if (g.preventDefault(), !(e != null && e.primaryPage) && Object.keys(qe).some((y) => n === `/${y}` || Rt(n, `/${y}/`))) {
2049
2054
  j.error("Error", {
2050
2055
  description: "Slugs cannot start with a language code for primary page"
2051
2056
  });
@@ -2095,7 +2100,7 @@ const jl = {
2095
2100
  value: n,
2096
2101
  onChange: (g) => {
2097
2102
  const d = g.target.value;
2098
- Ut(d, `/${h}`) && s(d);
2103
+ Rt(d, `/${h}`) && s(d);
2099
2104
  },
2100
2105
  className: "col-span-3",
2101
2106
  required: !0,
@@ -2110,7 +2115,7 @@ const jl = {
2110
2115
  _,
2111
2116
  {
2112
2117
  type: "submit",
2113
- disabled: i || !Ut(n, `/${h}`) || rs(e == null ? void 0 : e.slug, n),
2118
+ disabled: i || !Rt(n, `/${h}`) || as(e == null ? void 0 : e.slug, n),
2114
2119
  children: i ? "Changing..." : "Change Slug"
2115
2120
  }
2116
2121
  ) })
@@ -2121,7 +2126,7 @@ function qr({
2121
2126
  page: e,
2122
2127
  onClose: t
2123
2128
  }) {
2124
- const [, n] = Re(), { mutate: s, isPending: a } = Ml(), { data: i } = Ie(), l = () => {
2129
+ const [, n] = Ue(), { mutate: s, isPending: a } = Fl(), { data: i } = Ie(), l = () => {
2125
2130
  s(e, {
2126
2131
  onSuccess: () => {
2127
2132
  e != null && e.primaryPage || (window.history.replaceState(null, "", "/"), n(new URLSearchParams({})), window.dispatchEvent(new PopStateEvent("popstate"))), t();
@@ -2169,11 +2174,11 @@ const Oe = ({
2169
2174
  }) => {
2170
2175
  const { hasPermission: a } = sn();
2171
2176
  return e && !a(e) || t && !t.some((i) => a(i)) ? s : n;
2172
- }, Ns = ({
2177
+ }, As = ({
2173
2178
  page: e,
2174
2179
  onClose: t
2175
2180
  }) => {
2176
- const { mutate: n, isPending: s } = Fl(), a = async () => {
2181
+ const { mutate: n, isPending: s } = ql(), a = async () => {
2177
2182
  n(e, { onSuccess: t });
2178
2183
  };
2179
2184
  return /* @__PURE__ */ r(He, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
@@ -2204,7 +2209,7 @@ const Oe = ({
2204
2209
  onClose: t,
2205
2210
  languages: n
2206
2211
  }) => {
2207
- const { data: s } = Ue(), { data: a } = Ie(), [i, l] = P(e.name || ""), [o, c] = P(e.edit ? e.lang : ""), [h, g] = P(e.edit ? e.slug : ""), { mutate: d, isPending: w } = Fr(), { mutate: y, isPending: p } = bs(), S = Y(
2212
+ const { data: s } = Re(), { data: a } = Ie(), [i, l] = P(e.name || ""), [o, c] = P(e.edit ? e.lang : ""), [h, g] = P(e.edit ? e.slug : ""), { mutate: d, isPending: w } = Fr(), { mutate: y, isPending: p } = ws(), S = Y(
2208
2213
  () => a == null ? void 0 : a.find(
2209
2214
  (E) => E.key === e.pageType
2210
2215
  ),
@@ -2273,7 +2278,7 @@ const Oe = ({
2273
2278
  value: h,
2274
2279
  onChange: (E) => {
2275
2280
  const b = E.target.value;
2276
- Ut(b, `/${o}`) && g(Dt(Ma(b)));
2281
+ Rt(b, `/${o}`) && g(Dt(Ma(b)));
2277
2282
  },
2278
2283
  className: "col-span-3",
2279
2284
  required: !0,
@@ -2289,14 +2294,14 @@ const Oe = ({
2289
2294
  _,
2290
2295
  {
2291
2296
  type: "submit",
2292
- disabled: x || !i || !o || !v && !Ut(h, `/${o}`),
2297
+ disabled: x || !i || !o || !v && !Rt(h, `/${o}`),
2293
2298
  children: x ? e.edit ? B.UPDATING : B.ADDING : e.edit ? B.UPDATE : B.ADD_NEW_LANGUAGE
2294
2299
  }
2295
2300
  ) })
2296
2301
  ] })
2297
2302
  ] }) });
2298
- }, Yl = () => {
2299
- const [e, t] = P(null), { selectedLang: n, fallbackLang: s, setSelectedLang: a } = ut(), { data: i, isFetching: l } = cn(), { data: o } = Ue(), [c, h] = P(null), [g, d] = P(null), [w, y] = P(null), { data: p } = un(), S = Te(
2303
+ }, Ql = () => {
2304
+ const [e, t] = P(null), { selectedLang: n, fallbackLang: s, setSelectedLang: a } = ut(), { data: i, isFetching: l } = cn(), { data: o } = Re(), [c, h] = P(null), [g, d] = P(null), [w, y] = P(null), { data: p } = un(), S = Te(
2300
2305
  te(p, "languages") || ["en"],
2301
2306
  (v) => !fe(i, { lang: v }) && v !== te(p, "fallbackLang")
2302
2307
  );
@@ -2346,7 +2351,7 @@ const Oe = ({
2346
2351
  ] })
2347
2352
  ] }),
2348
2353
  E ? /* @__PURE__ */ u("div", { className: "flex items-center text-[11px] text-orange-500 gap-x-1", children: [
2349
- /* @__PURE__ */ r(Li, { fill: "orange", className: "w-3 h-3" }),
2354
+ /* @__PURE__ */ r(Di, { fill: "orange", className: "w-3 h-3" }),
2350
2355
  /* @__PURE__ */ r("b", { children: " Primary" })
2351
2356
  ] }) : /* @__PURE__ */ r("div", { className: "flex items-center gap-x-3", children: /* @__PURE__ */ r(
2352
2357
  Oe,
@@ -2368,7 +2373,7 @@ const Oe = ({
2368
2373
  variant: "ghost",
2369
2374
  size: "sm",
2370
2375
  className: "h-8 w-8 p-0",
2371
- children: /* @__PURE__ */ r(gs, { className: "h-4 w-4" })
2376
+ children: /* @__PURE__ */ r(ps, { className: "h-4 w-4" })
2372
2377
  }
2373
2378
  )
2374
2379
  }
@@ -2391,7 +2396,7 @@ const Oe = ({
2391
2396
  T.stopPropagation(), t({ ...v, edit: !0 });
2392
2397
  },
2393
2398
  children: [
2394
- /* @__PURE__ */ r(Di, { className: "size-3" }),
2399
+ /* @__PURE__ */ r(Gi, { className: "size-3" }),
2395
2400
  B.EDIT
2396
2401
  ]
2397
2402
  }
@@ -2429,7 +2434,7 @@ const Oe = ({
2429
2434
  T.stopPropagation(), h(v);
2430
2435
  },
2431
2436
  children: [
2432
- /* @__PURE__ */ r(Gi, { className: "size-3" }),
2437
+ /* @__PURE__ */ r(Ui, { className: "size-3" }),
2433
2438
  B.DELETE
2434
2439
  ]
2435
2440
  }
@@ -2477,14 +2482,14 @@ const Oe = ({
2477
2482
  ),
2478
2483
  c && /* @__PURE__ */ r(qr, { page: c, onClose: () => h(null) }),
2479
2484
  g && /* @__PURE__ */ r(
2480
- Ns,
2485
+ As,
2481
2486
  {
2482
2487
  page: g,
2483
2488
  onClose: () => d(null)
2484
2489
  }
2485
2490
  ),
2486
2491
  w && /* @__PURE__ */ r(
2487
- Wl,
2492
+ Yl,
2488
2493
  {
2489
2494
  page: w,
2490
2495
  onClose: () => y(null)
@@ -2492,7 +2497,7 @@ const Oe = ({
2492
2497
  )
2493
2498
  ] });
2494
2499
  };
2495
- function Ql({
2500
+ function Xl({
2496
2501
  pages: e,
2497
2502
  selectedParentId: t,
2498
2503
  onChange: n,
@@ -2531,7 +2536,7 @@ function Ql({
2531
2536
  )
2532
2537
  ] });
2533
2538
  }
2534
- const Xl = ({
2539
+ const Zl = ({
2535
2540
  templates: e,
2536
2541
  selectedTemplateId: t,
2537
2542
  onSelectTemplate: n,
@@ -2579,13 +2584,13 @@ const Xl = ({
2579
2584
  /* @__PURE__ */ r("div", { className: "p-2 text-xs text-gray-500 bg-gray-50 border-t", children: "Template preview" })
2580
2585
  ] })
2581
2586
  ] });
2582
- }, Zl = () => {
2587
+ }, Jl = () => {
2583
2588
  const e = Q(), t = $();
2584
2589
  return Ne({
2585
2590
  queryKey: [ke, I.GET_LIBRARIES],
2586
2591
  queryFn: async () => await t(e, { action: I.GET_LIBRARIES }) || []
2587
2592
  });
2588
- }, Jl = (e) => {
2593
+ }, eo = (e) => {
2589
2594
  const t = Q(), n = $();
2590
2595
  return Ne({
2591
2596
  queryKey: [ke, I.GET_TEMPLATES_BY_TYPE, e],
@@ -2598,8 +2603,8 @@ const Xl = ({
2598
2603
  return (e ? Te(s, { pageType: e }) : s) || [];
2599
2604
  }
2600
2605
  });
2601
- }, eo = (e) => {
2602
- const { data: t = [], isLoading: n } = Jl(e), { data: s = [], isLoading: a } = Zl(), i = Y(() => n || a ? [] : t.map((o) => {
2606
+ }, to = (e) => {
2607
+ const { data: t = [], isLoading: n } = eo(e), { data: s = [], isLoading: a } = Jl(), i = Y(() => n || a ? [] : t.map((o) => {
2603
2608
  const c = fe(s, { id: o.library });
2604
2609
  return {
2605
2610
  ...o,
@@ -2613,13 +2618,13 @@ const Xl = ({
2613
2618
  isLoading: n || a
2614
2619
  };
2615
2620
  };
2616
- function to({
2621
+ function no({
2617
2622
  addEditPage: e,
2618
2623
  additionalPageTypes: t = [],
2619
2624
  close: n
2620
2625
  }) {
2621
2626
  var Ee, Qe;
2622
- const s = !!(e != null && e.id), { data: a } = Rn(), { mutate: i, isPending: l } = Fr(), { mutate: o, isPending: c } = bs(), [h, g] = P(null), [d, w] = P(
2627
+ const s = !!(e != null && e.id), { data: a } = Rn(), { mutate: i, isPending: l } = Fr(), { mutate: o, isPending: c } = ws(), [h, g] = P(null), [d, w] = P(
2623
2628
  (e == null ? void 0 : e.pageType) ?? "page"
2624
2629
  ), [y, p] = P(
2625
2630
  t.find(
@@ -2629,18 +2634,18 @@ function to({
2629
2634
  (e == null ? void 0 : e.parent) ?? ""
2630
2635
  ), [x, G] = P((e == null ? void 0 : e.name) ?? ""), [E, b] = P(
2631
2636
  ((e == null ? void 0 : e.slug) ?? "").split("/").pop() || ""
2632
- ), [T, R] = P(
2637
+ ), [T, U] = P(
2633
2638
  (e == null ? void 0 : e.dynamic) ?? !1
2634
- ), [J, ie] = P(""), { data: k, isLoading: q } = eo(d), A = l || c, M = t.find(
2639
+ ), [J, ie] = P(""), { data: k, isLoading: q } = to(d), A = l || c, M = t.find(
2635
2640
  (f) => f.key === d
2636
2641
  ), ne = (f) => {
2637
- w(f), v(""), b(""), R(!1), ie(""), p(
2642
+ w(f), v(""), b(""), U(!1), ie(""), p(
2638
2643
  t.find(
2639
2644
  (m) => m.key === f
2640
2645
  )
2641
2646
  );
2642
2647
  }, he = (f) => {
2643
- R(f), f && b("");
2648
+ U(f), f && b("");
2644
2649
  }, z = (f) => {
2645
2650
  if (v(f), f && f !== "none") {
2646
2651
  const m = a == null ? void 0 : a.find(
@@ -2777,7 +2782,7 @@ function to({
2777
2782
  !s && (y == null ? void 0 : y.hasSlug) && k.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-1", children: [
2778
2783
  /* @__PURE__ */ r(X, { className: "text-sm mb-1 block", children: "Template" }),
2779
2784
  /* @__PURE__ */ r(
2780
- Xl,
2785
+ Zl,
2781
2786
  {
2782
2787
  templates: k,
2783
2788
  selectedTemplateId: J,
@@ -2787,7 +2792,7 @@ function to({
2787
2792
  )
2788
2793
  ] }),
2789
2794
  /* @__PURE__ */ r(
2790
- Ql,
2795
+ Xl,
2791
2796
  {
2792
2797
  pages: a,
2793
2798
  selectedParentId: S,
@@ -2889,7 +2894,7 @@ function to({
2889
2894
  }
2890
2895
  );
2891
2896
  }
2892
- const no = ({
2897
+ const so = ({
2893
2898
  addEditPage: e,
2894
2899
  setAddEditPage: t
2895
2900
  }) => {
@@ -2903,7 +2908,7 @@ const no = ({
2903
2908
  /* @__PURE__ */ r(Ye, { children: s ? "Update your page name" : "Enter details to create a new page" })
2904
2909
  ] }),
2905
2910
  /* @__PURE__ */ r(
2906
- to,
2911
+ no,
2907
2912
  {
2908
2913
  addEditPage: e,
2909
2914
  close: () => t(void 0),
@@ -2911,18 +2916,18 @@ const no = ({
2911
2916
  }
2912
2917
  )
2913
2918
  ] }) });
2914
- }, so = 1 * 1024 * 1024, ro = ({
2919
+ }, ro = 1 * 1024 * 1024, ao = ({
2915
2920
  page: e,
2916
2921
  onClose: t
2917
2922
  }) => {
2918
- const [n, s] = P(!1), [a, i] = P(""), [l, o] = P(""), [c, h] = P(!1), g = ct(null), d = ql(), { data: w } = Ie(), y = w == null ? void 0 : w.find(
2923
+ const [n, s] = P(!1), [a, i] = P(""), [l, o] = P(""), [c, h] = P(!1), g = ct(null), d = Hl(), { data: w } = Ie(), y = w == null ? void 0 : w.find(
2919
2924
  (E) => E.key === e.pageType
2920
2925
  ), p = (y == null ? void 0 : y.name) || It(e.pageType), S = _e(
2921
2926
  (E) => {
2922
2927
  var T;
2923
2928
  const b = (T = E.target.files) == null ? void 0 : T[0];
2924
2929
  if (b) {
2925
- if (b.size > so) {
2930
+ if (b.size > ro) {
2926
2931
  j.error("File too large", {
2927
2932
  description: `Maximum file size is 1MB. Selected file is ${(b.size / 1024).toFixed(2)}KB.`
2928
2933
  }), g.current && (g.current.value = "");
@@ -2930,13 +2935,13 @@ const no = ({
2930
2935
  }
2931
2936
  try {
2932
2937
  h(!0);
2933
- const R = new FileReader();
2934
- R.onloadend = () => {
2935
- o(R.result), h(!1);
2936
- }, R.readAsDataURL(b);
2937
- } catch (R) {
2938
- console.error("Error reading file:", R), h(!1), j.error("Failed to process image", {
2939
- description: R instanceof Error ? R.message : "Unknown error"
2938
+ const U = new FileReader();
2939
+ U.onloadend = () => {
2940
+ o(U.result), h(!1);
2941
+ }, U.readAsDataURL(b);
2942
+ } catch (U) {
2943
+ console.error("Error reading file:", U), h(!1), j.error("Failed to process image", {
2944
+ description: U instanceof Error ? U.message : "Unknown error"
2940
2945
  });
2941
2946
  }
2942
2947
  }
@@ -3076,11 +3081,11 @@ const no = ({
3076
3081
  }
3077
3082
  )
3078
3083
  ] }) });
3079
- }, ao = ({
3084
+ }, io = ({
3080
3085
  page: e,
3081
3086
  onClose: t
3082
3087
  }) => {
3083
- const [n, s] = P(!1), a = Hl();
3088
+ const [n, s] = P(!1), a = Kl();
3084
3089
  return /* @__PURE__ */ r(He, { open: !0, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
3085
3090
  /* @__PURE__ */ u(Ve, { children: [
3086
3091
  /* @__PURE__ */ r(je, { children: "Unmark as template" }),
@@ -3115,7 +3120,7 @@ const no = ({
3115
3120
  }
3116
3121
  )
3117
3122
  ] }) });
3118
- }, qn = ({
3123
+ }, Hn = ({
3119
3124
  parentSlug: e,
3120
3125
  page: t,
3121
3126
  active: n,
@@ -3129,7 +3134,7 @@ const no = ({
3129
3134
  const { data: h } = Ie(), { hasPermission: g } = sn(), d = Y(
3130
3135
  () => fe(h, { key: t.pageType }),
3131
3136
  [h, t.pageType]
3132
- ), w = te(t, "slug").replace(e, "") || "/", y = !g(ue.EDIT_PAGE) && !g(ue.DELETE_PAGE) && !g(ue.UNPUBLISH_PAGE), p = Y(() => !!t.isTemplate, [t.isTemplate]), S = Y(
3137
+ ), w = te(t, "slug", "").replace(e, "") || "/", y = !g(ue.EDIT_PAGE) && !g(ue.DELETE_PAGE) && !g(ue.UNPUBLISH_PAGE), p = Y(() => !!t.isTemplate, [t.isTemplate]), S = Y(
3133
3138
  () => !!(d != null && d.hasSlug),
3134
3139
  [d == null ? void 0 : d.hasSlug]
3135
3140
  );
@@ -3140,13 +3145,13 @@ const no = ({
3140
3145
  className: `rounded flex p-1.5 items-center justify-between leading-none duration-300 cursor-pointer px-3 py-1.5 ${n ? "bg-gray-200" : "hover:bg-gray-100"}`,
3141
3146
  children: [
3142
3147
  /* @__PURE__ */ u("div", { className: "flex items-center gap-x-2", children: [
3143
- t.dynamic ? /* @__PURE__ */ r("div", { className: "w-4 h-4 text-slate-500 stroke-[1]", children: /* @__PURE__ */ r(Oi, { className: "w-4 h-4 text-yellow-400" }) }) : d != null && d.icon ? /* @__PURE__ */ r(
3148
+ t.dynamic ? /* @__PURE__ */ r("div", { className: "w-4 h-4 text-slate-500 stroke-[1]", children: /* @__PURE__ */ r(Bi, { className: "w-4 h-4 text-yellow-400" }) }) : d != null && d.icon ? /* @__PURE__ */ r(
3144
3149
  "div",
3145
3150
  {
3146
3151
  className: "w-4 h-4 text-slate-500 stroke-[1]",
3147
3152
  dangerouslySetInnerHTML: { __html: d.icon }
3148
3153
  }
3149
- ) : d != null && d.hasSlug ? /* @__PURE__ */ r(on, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ r(Bi, { className: "w-4 h-4 text-slate-500 stroke-[1]" }),
3154
+ ) : d != null && d.hasSlug ? /* @__PURE__ */ r(on, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ r(Mi, { className: "w-4 h-4 text-slate-500 stroke-[1]" }),
3150
3155
  /* @__PURE__ */ r(
3151
3156
  "div",
3152
3157
  {
@@ -3155,7 +3160,7 @@ const no = ({
3155
3160
  ),
3156
3161
  /* @__PURE__ */ r("span", { className: "font-light leading-none truncate text-slate-800", children: It(t.name) ?? "" }),
3157
3162
  d != null && d.hasSlug ? /* @__PURE__ */ u(
3158
- Fn,
3163
+ qn,
3159
3164
  {
3160
3165
  variant: "outline",
3161
3166
  className: `ml-2 text-xs max-w-full leading-tight py-px font-normal rounded-full text-gray-400 border ${n ? "border-gray-300" : "border-gray-200"}`,
@@ -3165,7 +3170,7 @@ const no = ({
3165
3170
  ]
3166
3171
  }
3167
3172
  ) : /* @__PURE__ */ r(
3168
- Fn,
3173
+ qn,
3169
3174
  {
3170
3175
  variant: "outline",
3171
3176
  className: `ml-2 text-xs max-w-full leading-tight py-px font-normal rounded-full text-gray-400 border ${n ? "border-gray-300" : "border-gray-200"}`,
@@ -3173,7 +3178,7 @@ const no = ({
3173
3178
  }
3174
3179
  ),
3175
3180
  p && /* @__PURE__ */ r(
3176
- Fn,
3181
+ qn,
3177
3182
  {
3178
3183
  variant: "outline",
3179
3184
  className: "ml-2 text-xs py-0 font-normal text-blue-500 border border-blue-200 bg-blue-50",
@@ -3182,7 +3187,7 @@ const no = ({
3182
3187
  )
3183
3188
  ] }),
3184
3189
  /* @__PURE__ */ r("div", { className: "flex items-center space-x-4", children: !y && /* @__PURE__ */ u(rn, { children: [
3185
- /* @__PURE__ */ r(an, { asChild: !0, onClick: (v) => v.stopPropagation(), children: /* @__PURE__ */ r(gs, { className: "h-4 w-4 hover:stroke-[3]" }) }),
3190
+ /* @__PURE__ */ r(an, { asChild: !0, onClick: (v) => v.stopPropagation(), children: /* @__PURE__ */ r(ps, { className: "h-4 w-4 hover:stroke-[3]" }) }),
3186
3191
  /* @__PURE__ */ u(ln, { align: "end", className: "text-sm", children: [
3187
3192
  g(ue.EDIT_PAGE) && /* @__PURE__ */ u(
3188
3193
  De,
@@ -3195,7 +3200,7 @@ const no = ({
3195
3200
  });
3196
3201
  },
3197
3202
  children: [
3198
- /* @__PURE__ */ r(Mi, { className: "size-3" }),
3203
+ /* @__PURE__ */ r(Fi, { className: "size-3" }),
3199
3204
  "Edit"
3200
3205
  ]
3201
3206
  }
@@ -3221,7 +3226,7 @@ const no = ({
3221
3226
  v.stopPropagation(), i(t);
3222
3227
  },
3223
3228
  children: [
3224
- /* @__PURE__ */ r(ps, { className: "size-3" }),
3229
+ /* @__PURE__ */ r(ys, { className: "size-3" }),
3225
3230
  B.DELETE
3226
3231
  ]
3227
3232
  }
@@ -3234,7 +3239,7 @@ const no = ({
3234
3239
  v.stopPropagation(), c(t);
3235
3240
  },
3236
3241
  children: [
3237
- /* @__PURE__ */ r(Ds, { className: "size-3" }),
3242
+ /* @__PURE__ */ r(Gs, { className: "size-3" }),
3238
3243
  B.UNMARK_AS_TEMPLATE
3239
3244
  ]
3240
3245
  }
@@ -3246,7 +3251,7 @@ const no = ({
3246
3251
  v.stopPropagation(), o(t);
3247
3252
  },
3248
3253
  children: [
3249
- /* @__PURE__ */ r(Ds, { className: "size-3" }),
3254
+ /* @__PURE__ */ r(Gs, { className: "size-3" }),
3250
3255
  B.MARK_AS_TEMPLATE
3251
3256
  ]
3252
3257
  }
@@ -3256,19 +3261,19 @@ const no = ({
3256
3261
  ]
3257
3262
  }
3258
3263
  );
3259
- }, io = ({ close: e }) => {
3260
- const [, t] = P([]), [n, s] = P(""), [a, i] = P(null), [l, o] = P(null), [c, h] = P(null), [g, d] = P(null), [w, y] = P(null), { data: p, isFetching: S } = Rn(), [v, x] = P(""), { hasPermission: G } = sn(), [E, b] = Re(), T = E.get("page"), { data: R } = Ie(), J = _e(
3264
+ }, lo = ({ close: e }) => {
3265
+ const [, t] = P([]), [n, s] = P(""), [a, i] = P(null), [l, o] = P(null), [c, h] = P(null), [g, d] = P(null), [w, y] = P(null), { data: p, isFetching: S } = Rn(), [v, x] = P(""), { hasPermission: G } = sn(), [E, b] = Ue(), T = E.get("page"), { data: U } = Ie(), J = _e(
3261
3266
  (A) => {
3262
3267
  var M;
3263
- return (M = fe(R, { key: A })) == null ? void 0 : M.hasSlug;
3268
+ return (M = fe(U, { key: A })) == null ? void 0 : M.hasSlug;
3264
3269
  },
3265
- [R]
3270
+ [U]
3266
3271
  );
3267
3272
  we(() => {
3268
3273
  if (!me(v)) return;
3269
3274
  const A = sessionStorage.getItem("pageTypeFilter") || "all";
3270
- !me(R) && A && (fe(R, { key: A }) ? x(A) : x("all"));
3271
- }, [R, v]);
3275
+ !me(U) && A && (fe(U, { key: A }) ? x(A) : x("all"));
3276
+ }, [U, v]);
3272
3277
  const ie = (A) => {
3273
3278
  x(A), sessionStorage.setItem("pageTypeFilter", A);
3274
3279
  }, k = _e(
@@ -3285,9 +3290,11 @@ const no = ({
3285
3290
  }
3286
3291
  }, [p, T, S, b]);
3287
3292
  const q = Y(() => {
3288
- const A = Te(p, (F) => me(n) ? !0 : Mt(Dt(F == null ? void 0 : F.name), Dt(n)) || Mt(Dt(F == null ? void 0 : F.slug), Dt(n)));
3293
+ const A = Nn(
3294
+ Te(p, (F) => me(n) ? !0 : Mt(Dt(F == null ? void 0 : F.name), Dt(n)) || Mt(Dt(F == null ? void 0 : F.slug), Dt(n)))
3295
+ );
3289
3296
  if (v !== "all")
3290
- return Te(A, { pageType: v });
3297
+ return Nn(Te(A, { pageType: v }));
3291
3298
  const M = /* @__PURE__ */ new Map();
3292
3299
  A.forEach((F) => {
3293
3300
  M.set(F.id, { ...F, children: [] });
@@ -3309,13 +3316,13 @@ const no = ({
3309
3316
  he,
3310
3317
  (F) => J(F.pageType)
3311
3318
  ).sort((F, Ee) => F.name.localeCompare(Ee.name));
3312
- return Qs([...de, ...z, ...ne]);
3319
+ return Nn([...de, ...z, ...ne]);
3313
3320
  }, [p, J, n, v]);
3314
3321
  return /* @__PURE__ */ u("div", { className: "flex flex-col justify-between h-full", children: [
3315
3322
  /* @__PURE__ */ u("div", { className: "flex flex-col h-full space-y-6", children: [
3316
3323
  /* @__PURE__ */ u("div", { className: "relative flex item-center gap-x-4", children: [
3317
3324
  /* @__PURE__ */ r(
3318
- Ui,
3325
+ Oi,
3319
3326
  {
3320
3327
  strokeWidth: 2.5,
3321
3328
  className: "absolute left-3 top-2.5 h-4 w-4 text-gray-400"
@@ -3330,17 +3337,17 @@ const no = ({
3330
3337
  onChange: (A) => s(A.target.value)
3331
3338
  }
3332
3339
  ),
3333
- !me(v) && /* @__PURE__ */ u(ui, { value: v, onValueChange: ie, children: [
3340
+ !me(v) && /* @__PURE__ */ u(di, { value: v, onValueChange: ie, children: [
3334
3341
  /* @__PURE__ */ r(
3335
- di,
3342
+ hi,
3336
3343
  {
3337
3344
  className: `${v === "all" ? "bg-gray-50 hover:bg-gray-100" : "bg-gray-100 hover:bg-gray-50"} min-w-[120px] h-max p-0 py-1 pl-2 pr-1 top-1.5 -mt-px absolute text-gray-600 right-1.5 w-max text-xs whitespace-nowrap ring-0 focus:ring-0 shadow-none`,
3338
- children: /* @__PURE__ */ r(hi, { placeholder: "Select page type" })
3345
+ children: /* @__PURE__ */ r(mi, { placeholder: "Select page type" })
3339
3346
  }
3340
3347
  ),
3341
- /* @__PURE__ */ r(mi, { align: "end", children: Fe(
3342
- Xs([{ key: "all", name: "All" }], R),
3343
- (A) => /* @__PURE__ */ r(fi, { value: te(A, "key"), children: te(A, "name") })
3348
+ /* @__PURE__ */ r(fi, { align: "end", children: Fe(
3349
+ Xs([{ key: "all", name: "All" }], U),
3350
+ (A) => /* @__PURE__ */ r(gi, { value: te(A, "key"), children: te(A, "name") })
3344
3351
  ) })
3345
3352
  ] })
3346
3353
  ] }),
@@ -3355,7 +3362,7 @@ const no = ({
3355
3362
  "Empty List!",
3356
3363
  /* @__PURE__ */ r("span", { className: "font-light", children: "Add new page to start" })
3357
3364
  ] }) : /* @__PURE__ */ r("div", { className: "text-sm text-slate-700 space-y-2 h-[70vh] overflow-y-auto", children: Fe(q, (A) => me(A == null ? void 0 : A.children) ? /* @__PURE__ */ r(
3358
- qn,
3365
+ Hn,
3359
3366
  {
3360
3367
  changeActivePage: k,
3361
3368
  setUnpublishPage: o,
@@ -3369,7 +3376,7 @@ const no = ({
3369
3376
  A.id
3370
3377
  ) : /* @__PURE__ */ u("div", { className: "border-0", children: [
3371
3378
  /* @__PURE__ */ r(
3372
- qn,
3379
+ Hn,
3373
3380
  {
3374
3381
  changeActivePage: k,
3375
3382
  setUnpublishPage: o,
@@ -3384,7 +3391,7 @@ const no = ({
3384
3391
  /* @__PURE__ */ r("div", { className: "pt-2 pl-6 bg-white", children: Fe(te(A, "children", []), (M) => {
3385
3392
  const ne = T === te(M, "id");
3386
3393
  return /* @__PURE__ */ r(
3387
- qn,
3394
+ Hn,
3388
3395
  {
3389
3396
  parentSlug: A.slug,
3390
3397
  changeActivePage: k,
@@ -3413,13 +3420,13 @@ const no = ({
3413
3420
  });
3414
3421
  },
3415
3422
  children: [
3416
- /* @__PURE__ */ r(fs, { className: "w-4 h-4" }),
3423
+ /* @__PURE__ */ r(gs, { className: "w-4 h-4" }),
3417
3424
  " Add New"
3418
3425
  ]
3419
3426
  }
3420
3427
  ),
3421
3428
  c && /* @__PURE__ */ r(
3422
- no,
3429
+ so,
3423
3430
  {
3424
3431
  editPage: k,
3425
3432
  addEditPage: c,
@@ -3428,32 +3435,32 @@ const no = ({
3428
3435
  ),
3429
3436
  a && /* @__PURE__ */ r(qr, { page: a, onClose: () => i(null) }),
3430
3437
  l && /* @__PURE__ */ r(
3431
- Ns,
3438
+ As,
3432
3439
  {
3433
3440
  page: l,
3434
3441
  onClose: () => o(null)
3435
3442
  }
3436
3443
  ),
3437
3444
  g && /* @__PURE__ */ r(
3438
- ro,
3445
+ ao,
3439
3446
  {
3440
3447
  page: g,
3441
3448
  onClose: () => d(null)
3442
3449
  }
3443
3450
  ),
3444
3451
  w && /* @__PURE__ */ r(
3445
- ao,
3452
+ io,
3446
3453
  {
3447
3454
  page: w,
3448
3455
  onClose: () => y(null)
3449
3456
  }
3450
3457
  )
3451
3458
  ] });
3452
- }, lo = () => {
3459
+ }, oo = () => {
3453
3460
  const e = dt("logo", null);
3454
3461
  return e ? /* @__PURE__ */ r("div", { className: "w-full max-h-9 overflow-hidden pr-2", children: er.createElement(e, {}) }) : null;
3455
- }, oo = () => {
3456
- const [e] = Re(), t = e.get("page"), { data: n, isFetching: s } = Ue(), [a, i] = P(!1), l = !!t && !me(n), o = !t || !s && me(n) || a;
3462
+ }, co = () => {
3463
+ const [e] = Ue(), t = e.get("page"), { data: n, isFetching: s } = Re(), [a, i] = P(!1), l = !!t && !me(n), o = !t || !s && me(n) || a;
3457
3464
  return /* @__PURE__ */ u(be, { children: [
3458
3465
  /* @__PURE__ */ u(
3459
3466
  _,
@@ -3462,7 +3469,7 @@ const no = ({
3462
3469
  className: "flex items-center w-full space-x-2 py-1",
3463
3470
  onClick: () => i(!0),
3464
3471
  children: [
3465
- /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(Fi, { className: "h-4 w-4" }) }),
3472
+ /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(qi, { className: "h-4 w-4" }) }),
3466
3473
  /* @__PURE__ */ u("span", { className: "truncate leading-tight flex items-center max-w-[200px]", children: [
3467
3474
  /* @__PURE__ */ r("span", { className: "text-slate-600 pr-1 font-light", children: "Editing:" }),
3468
3475
  s ? /* @__PURE__ */ r(Pr, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) : It(te(n, "name")) ?? ""
@@ -3489,21 +3496,21 @@ const no = ({
3489
3496
  /* @__PURE__ */ r("span", { className: "text-xs text-muted-foreground", children: "Manage your site structure" })
3490
3497
  ] })
3491
3498
  ] }) }),
3492
- /* @__PURE__ */ r("div", { className: "h-[calc(100vh-100px)] overflow-y-auto", children: /* @__PURE__ */ r(io, { close: () => i(!1) }) })
3499
+ /* @__PURE__ */ r("div", { className: "h-[calc(100vh-100px)] overflow-y-auto", children: /* @__PURE__ */ r(lo, { close: () => i(!1) }) })
3493
3500
  ]
3494
3501
  }
3495
3502
  )
3496
3503
  }
3497
3504
  )
3498
3505
  ] });
3499
- }, co = () => {
3500
- const { fallbackLang: e, languages: t, selectedLang: n, setSelectedLang: s } = ut(), a = me(n) ? e : n, [, i] = Re();
3506
+ }, uo = () => {
3507
+ const { fallbackLang: e, languages: t, selectedLang: n, setSelectedLang: s } = ut(), a = me(n) ? e : n, [, i] = Ue();
3501
3508
  we(() => {
3502
3509
  const p = new URLSearchParams(window.location.search), S = p.get("lang");
3503
3510
  S && (t.includes(S) ? s(S) : (p.delete("lang"), i(p), s("")));
3504
3511
  }, [t, i, s]);
3505
- const [l, o] = P(null), { data: c } = Ue(), { data: h } = un(), { data: g, isFetching: d } = cn(), w = Y(() => {
3506
- const p = Qs(
3512
+ const [l, o] = P(null), { data: c } = Re(), { data: h } = un(), { data: g, isFetching: d } = cn(), w = Y(() => {
3513
+ const p = Nn(
3507
3514
  Fe(te(h, "languages"), (S) => {
3508
3515
  const v = fe(g, { lang: S });
3509
3516
  return {
@@ -3531,7 +3538,7 @@ const no = ({
3531
3538
  return me(t) || d ? null : /* @__PURE__ */ u(be, { children: [
3532
3539
  /* @__PURE__ */ u(rn, { children: [
3533
3540
  /* @__PURE__ */ r(an, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ u(_, { variant: "ghost", size: "sm", className: "gap-2", children: [
3534
- /* @__PURE__ */ r(qi, { className: "w-4 h-4" }),
3541
+ /* @__PURE__ */ r(Hi, { className: "w-4 h-4" }),
3535
3542
  te(qe, a, a),
3536
3543
  /* @__PURE__ */ r(_r, { className: "w-4 h-4" })
3537
3544
  ] }) }),
@@ -3541,7 +3548,7 @@ const no = ({
3541
3548
  (p) => /* @__PURE__ */ u(
3542
3549
  De,
3543
3550
  {
3544
- className: ei(
3551
+ className: ti(
3545
3552
  "flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
3546
3553
  p.key === a && "!bg-gray-200 text-gray-700"
3547
3554
  ),
@@ -3553,7 +3560,7 @@ const no = ({
3553
3560
  {
3554
3561
  className: "text-[9px] flex items-center gap-x-1 text-orange-500 leading-none",
3555
3562
  children: [
3556
- /* @__PURE__ */ r(Hi, { fill: "orange", className: "w-2 h-2" }),
3563
+ /* @__PURE__ */ r(Ki, { fill: "orange", className: "w-2 h-2" }),
3557
3564
  "Primary"
3558
3565
  ]
3559
3566
  }
@@ -3564,7 +3571,7 @@ const no = ({
3564
3571
  )
3565
3572
  ),
3566
3573
  !me(w.filter((p) => !p.isLangPageAdded)) && /* @__PURE__ */ u(be, { children: [
3567
- /* @__PURE__ */ r(gi, {}),
3574
+ /* @__PURE__ */ r(pi, {}),
3568
3575
  /* @__PURE__ */ u(
3569
3576
  _,
3570
3577
  {
@@ -3581,7 +3588,7 @@ const no = ({
3581
3588
  },
3582
3589
  className: "hover:bg-slate-300 duration-200 font-normal text-xs hover:text-slate-800",
3583
3590
  children: [
3584
- /* @__PURE__ */ r(fs, { className: "w-3 h-3 mr-1" }),
3591
+ /* @__PURE__ */ r(gs, { className: "w-3 h-3 mr-1" }),
3585
3592
  " Add Langauge"
3586
3593
  ]
3587
3594
  }
@@ -3599,14 +3606,14 @@ const no = ({
3599
3606
  )
3600
3607
  ] });
3601
3608
  };
3602
- function uo() {
3609
+ function ho() {
3603
3610
  return /* @__PURE__ */ u("div", { className: "flex relative z-10 items-center justify-end gap-1", children: [
3604
- /* @__PURE__ */ r(lo, {}),
3605
3611
  /* @__PURE__ */ r(oo, {}),
3606
- /* @__PURE__ */ r(co, {})
3612
+ /* @__PURE__ */ r(co, {}),
3613
+ /* @__PURE__ */ r(uo, {})
3607
3614
  ] });
3608
3615
  }
3609
- function ho(e) {
3616
+ function mo(e) {
3610
3617
  const t = Q(), n = $();
3611
3618
  return Ne({
3612
3619
  queryKey: [ke, "revisions", e],
@@ -3619,7 +3626,7 @@ function ho(e) {
3619
3626
  staleTime: 0
3620
3627
  });
3621
3628
  }
3622
- const mo = () => {
3629
+ const fo = () => {
3623
3630
  const e = Q(), t = $(), n = Se();
3624
3631
  return Ae({
3625
3632
  mutationFn: async (s) => await t(e, {
@@ -3630,7 +3637,7 @@ const mo = () => {
3630
3637
  n.invalidateQueries({ queryKey: ["revisions"] });
3631
3638
  }
3632
3639
  });
3633
- }, fo = () => {
3640
+ }, go = () => {
3634
3641
  const e = Q(), t = $(), n = Se();
3635
3642
  return Ae({
3636
3643
  mutationFn: async ({
@@ -3645,20 +3652,20 @@ const mo = () => {
3645
3652
  }
3646
3653
  });
3647
3654
  };
3648
- function go() {
3649
- const { data: e } = Ue(), { saveState: t } = sr(), [n] = Es();
3655
+ function po() {
3656
+ const { data: e } = Re(), { saveState: t } = sr(), [n] = bs();
3650
3657
  return e ? /* @__PURE__ */ r("div", { className: "flex items-start gap-3 rounded-md border p-2 hover:bg-accent/50 bg-primary/5 mb-4", children: /* @__PURE__ */ u("div", { className: "flex-1 space-y-1", children: [
3651
3658
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ r("p", { className: "text-sm flex items-center gap-1 font-medium leading-none", children: /* @__PURE__ */ r("span", { className: "font-bold", children: "Currently editing" }) }) }),
3652
3659
  /* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: !me(n.lastSaved) && /* @__PURE__ */ u("span", { children: [
3653
3660
  "Last updated",
3654
3661
  " ",
3655
- rl(new Date(n.lastSaved), {
3662
+ al(new Date(n.lastSaved), {
3656
3663
  addSuffix: !0
3657
3664
  })
3658
3665
  ] }) }),
3659
3666
  /* @__PURE__ */ u("div", { className: "flex items-center gap-2 pt-0.5", children: [
3660
3667
  /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-amber-500/10 px-1.5 py-0.5 text-xs text-amber-600", children: [
3661
- /* @__PURE__ */ r($i, { className: "h-3 w-3" }),
3668
+ /* @__PURE__ */ r(zi, { className: "h-3 w-3" }),
3662
3669
  /* @__PURE__ */ r("span", { children: "Draft" })
3663
3670
  ] }),
3664
3671
  t === "UNSAVED" ? /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-red-500/10 px-1.5 py-0.5 text-xs text-red-600", children: [
@@ -3668,25 +3675,25 @@ function go() {
3668
3675
  ] })
3669
3676
  ] }) }) : null;
3670
3677
  }
3671
- function po() {
3672
- const [e, t] = ce.useState(!1), [n, s] = ce.useState(null), [a, i] = ce.useState(!1), [l, o] = ce.useState(!1), { data: c } = Ue(), {
3678
+ function yo() {
3679
+ const [e, t] = ce.useState(!1), [n, s] = ce.useState(null), [a, i] = ce.useState(!1), [l, o] = ce.useState(!1), { data: c } = Re(), {
3673
3680
  data: h,
3674
3681
  isFetching: g,
3675
3682
  error: d,
3676
3683
  refetch: w
3677
- } = ho(c == null ? void 0 : c.id), { mutate: y, isPending: p } = mo(), { mutate: S, isPending: v } = fo(), x = Se(), G = (R) => {
3684
+ } = mo(c == null ? void 0 : c.id), { mutate: y, isPending: p } = fo(), { mutate: S, isPending: v } = go(), x = Se(), G = (U) => {
3678
3685
  n && S(
3679
- { revisionId: n.uid, discardCurrent: R },
3686
+ { revisionId: n.uid, discardCurrent: U },
3680
3687
  {
3681
3688
  onSuccess: () => {
3682
3689
  i(!1), s(null), x.invalidateQueries({ queryKey: [I.GET_DRAFT_PAGE] });
3683
3690
  }
3684
3691
  }
3685
3692
  );
3686
- }, E = (R) => {
3687
- s(R), i(!0);
3688
- }, b = (R) => {
3689
- s(R), o(!0);
3693
+ }, E = (U) => {
3694
+ s(U), i(!0);
3695
+ }, b = (U) => {
3696
+ s(U), o(!0);
3690
3697
  }, T = () => {
3691
3698
  n && y(n.uid, {
3692
3699
  onSuccess: () => {
@@ -3697,11 +3704,11 @@ function po() {
3697
3704
  return we(() => {
3698
3705
  e && w();
3699
3706
  }, [e, w]), /* @__PURE__ */ u(be, { children: [
3700
- /* @__PURE__ */ r(wr, { children: /* @__PURE__ */ u(ds, { children: [
3707
+ /* @__PURE__ */ r(wr, { children: /* @__PURE__ */ u(hs, { children: [
3701
3708
  /* @__PURE__ */ u(yr, { open: e, onOpenChange: t, children: [
3702
- /* @__PURE__ */ r(pi, { asChild: !0, children: /* @__PURE__ */ r(hs, { asChild: !0, children: /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
3709
+ /* @__PURE__ */ r(yi, { asChild: !0, children: /* @__PURE__ */ r(ms, { asChild: !0, children: /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
3703
3710
  /* @__PURE__ */ u(_, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
3704
- /* @__PURE__ */ r(Gs, { className: "h-4 w-4" }),
3711
+ /* @__PURE__ */ r(Us, { className: "h-4 w-4" }),
3705
3712
  /* @__PURE__ */ r("span", { className: "sr-only", children: "View revision history" })
3706
3713
  ] }),
3707
3714
  /* @__PURE__ */ r("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
@@ -3709,37 +3716,37 @@ function po() {
3709
3716
  /* @__PURE__ */ u(vr, { className: "sm:max-w-md p-4", children: [
3710
3717
  /* @__PURE__ */ u(Er, { className: "pb-2", children: [
3711
3718
  /* @__PURE__ */ u(br, { className: "flex items-center gap-2", children: [
3712
- /* @__PURE__ */ r(Gs, { className: "h-5 w-5" }),
3719
+ /* @__PURE__ */ r(Us, { className: "h-5 w-5" }),
3713
3720
  "Revision History"
3714
3721
  ] }),
3715
3722
  (c == null ? void 0 : c.createdAt) && /* @__PURE__ */ u("p", { className: "text-xs text-muted-foreground mt-1", children: [
3716
3723
  "Page created on",
3717
3724
  " ",
3718
- Dn(
3725
+ Gn(
3719
3726
  new Date(c.createdAt),
3720
3727
  "MMM d, yyyy 'at' h:mm a"
3721
3728
  )
3722
3729
  ] })
3723
3730
  ] }),
3724
- /* @__PURE__ */ r(yi, { className: "h-[calc(100vh-6rem)] pr-2", children: g ? /* @__PURE__ */ r(yo, {}) : d ? /* @__PURE__ */ r("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "Failed to load revisions. Please try again." }) : /* @__PURE__ */ u("div", { className: "mt-2 space-y-2", children: [
3725
- /* @__PURE__ */ r(go, {}),
3726
- h == null ? void 0 : h.map((R) => /* @__PURE__ */ r(
3727
- vo,
3731
+ /* @__PURE__ */ r(vi, { className: "h-[calc(100vh-6rem)] pr-2", children: g ? /* @__PURE__ */ r(vo, {}) : d ? /* @__PURE__ */ r("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "Failed to load revisions. Please try again." }) : /* @__PURE__ */ u("div", { className: "mt-2 space-y-2", children: [
3732
+ /* @__PURE__ */ r(po, {}),
3733
+ h == null ? void 0 : h.map((U) => /* @__PURE__ */ r(
3734
+ Eo,
3728
3735
  {
3729
- revision: R,
3730
- isLatest: R.uid === "current",
3731
- onRestore: () => E(R),
3732
- onDelete: () => b(R)
3736
+ revision: U,
3737
+ isLatest: U.uid === "current",
3738
+ onRestore: () => E(U),
3739
+ onDelete: () => b(U)
3733
3740
  },
3734
- R.uid
3741
+ U.uid
3735
3742
  ))
3736
3743
  ] }) })
3737
3744
  ] })
3738
3745
  ] }),
3739
- /* @__PURE__ */ r(ms, { side: "bottom", children: /* @__PURE__ */ r("p", { children: "Revision history" }) })
3746
+ /* @__PURE__ */ r(fs, { side: "bottom", children: /* @__PURE__ */ r("p", { children: "Revision history" }) })
3740
3747
  ] }) }),
3741
3748
  /* @__PURE__ */ r(
3742
- bo,
3749
+ wo,
3743
3750
  {
3744
3751
  open: a,
3745
3752
  onOpenChange: i,
@@ -3749,7 +3756,7 @@ function po() {
3749
3756
  }
3750
3757
  ),
3751
3758
  /* @__PURE__ */ r(
3752
- wo,
3759
+ So,
3753
3760
  {
3754
3761
  open: l,
3755
3762
  onOpenChange: o,
@@ -3760,7 +3767,7 @@ function po() {
3760
3767
  )
3761
3768
  ] });
3762
3769
  }
3763
- function yo() {
3770
+ function vo() {
3764
3771
  return /* @__PURE__ */ r("div", { className: "space-y-2 mt-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ u("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
3765
3772
  /* @__PURE__ */ u("div", { className: "flex-1 space-y-1", children: [
3766
3773
  /* @__PURE__ */ r(fn, { className: "h-4 w-3/4" }),
@@ -3770,7 +3777,7 @@ function yo() {
3770
3777
  /* @__PURE__ */ r(fn, { className: "h-8 w-8 rounded-full" })
3771
3778
  ] }, t)) });
3772
3779
  }
3773
- function vo({
3780
+ function Eo({
3774
3781
  revision: e,
3775
3782
  isLatest: t,
3776
3783
  onRestore: n,
@@ -3791,12 +3798,12 @@ function vo({
3791
3798
  "Live"
3792
3799
  ] })
3793
3800
  ] }) }),
3794
- /* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: /* @__PURE__ */ r("span", { children: Dn(e.createdAt, "MMM d, h:mm a") }) }),
3801
+ /* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: /* @__PURE__ */ r("span", { children: Gn(e.createdAt, "MMM d, h:mm a") }) }),
3795
3802
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2 pt-0.5", children: e.type === "published" ? /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-green-500/10 px-1.5 py-0.5 text-xs text-green-600", children: [
3796
- /* @__PURE__ */ r(Ki, { className: "h-3 w-3" }),
3803
+ /* @__PURE__ */ r(Vi, { className: "h-3 w-3" }),
3797
3804
  /* @__PURE__ */ r("span", { children: "Published" })
3798
3805
  ] }) : /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-amber-500/10 px-1.5 py-0.5 text-xs text-amber-600", children: [
3799
- /* @__PURE__ */ r(Vi, { className: "h-3 w-3" }),
3806
+ /* @__PURE__ */ r(ji, { className: "h-3 w-3" }),
3800
3807
  /* @__PURE__ */ r("span", { children: "Draft" })
3801
3808
  ] }) })
3802
3809
  ] }),
@@ -3808,7 +3815,7 @@ function vo({
3808
3815
  ue.DELETE_REVISION
3809
3816
  ],
3810
3817
  children: /* @__PURE__ */ r(
3811
- Eo,
3818
+ bo,
3812
3819
  {
3813
3820
  revision: e,
3814
3821
  onRestore: n,
@@ -3819,14 +3826,14 @@ function vo({
3819
3826
  )
3820
3827
  ] });
3821
3828
  }
3822
- function Eo({
3829
+ function bo({
3823
3830
  revision: e,
3824
3831
  onRestore: t,
3825
3832
  onDelete: n
3826
3833
  }) {
3827
3834
  return /* @__PURE__ */ u(rn, { children: [
3828
3835
  /* @__PURE__ */ r(an, { asChild: !0, children: /* @__PURE__ */ u(_, { variant: "ghost", size: "icon", className: "h-7 w-7 -mr-1", children: [
3829
- /* @__PURE__ */ r(gs, { className: "h-4 w-4" }),
3836
+ /* @__PURE__ */ r(ps, { className: "h-4 w-4" }),
3830
3837
  /* @__PURE__ */ r("span", { className: "sr-only", children: "More options" })
3831
3838
  ] }) }),
3832
3839
  /* @__PURE__ */ u(ln, { align: "end", className: "text-xs", children: [
@@ -3835,14 +3842,14 @@ function Eo({
3835
3842
  /* @__PURE__ */ r("span", { children: "Restore this version" })
3836
3843
  ] }) }),
3837
3844
  /* @__PURE__ */ r(Oe, { permission: ue.DELETE_REVISION, children: e.uid !== "current" && /* @__PURE__ */ u(be, { children: [
3838
- /* @__PURE__ */ r(vi, {}),
3845
+ /* @__PURE__ */ r(Ei, {}),
3839
3846
  /* @__PURE__ */ u(
3840
3847
  De,
3841
3848
  {
3842
3849
  onClick: n,
3843
3850
  className: "cursor-pointer text-destructive",
3844
3851
  children: [
3845
- /* @__PURE__ */ r(ps, { className: "mr-2 h-4 w-4" }),
3852
+ /* @__PURE__ */ r(ys, { className: "mr-2 h-4 w-4" }),
3846
3853
  /* @__PURE__ */ r("span", { children: "Delete this version" })
3847
3854
  ]
3848
3855
  }
@@ -3851,7 +3858,7 @@ function Eo({
3851
3858
  ] })
3852
3859
  ] });
3853
3860
  }
3854
- function bo({
3861
+ function wo({
3855
3862
  open: e,
3856
3863
  onOpenChange: t,
3857
3864
  revision: n,
@@ -3874,7 +3881,7 @@ function bo({
3874
3881
  n.uid.substring(0, 8),
3875
3882
  " ",
3876
3883
  "from ",
3877
- Dn(n.createdAt, "MMM d, yyyy 'at' h:mm a"),
3884
+ Gn(n.createdAt, "MMM d, yyyy 'at' h:mm a"),
3878
3885
  " by",
3879
3886
  " ",
3880
3887
  l
@@ -3893,7 +3900,7 @@ function bo({
3893
3900
  /* @__PURE__ */ r("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
3894
3901
  "Saving as draft..."
3895
3902
  ] }) : /* @__PURE__ */ u(be, { children: [
3896
- /* @__PURE__ */ r(ji, { className: "mr-2 h-4 w-4" }),
3903
+ /* @__PURE__ */ r($i, { className: "mr-2 h-4 w-4" }),
3897
3904
  "Save as draft"
3898
3905
  ] })
3899
3906
  }
@@ -3919,7 +3926,7 @@ function bo({
3919
3926
  }
3920
3927
  ) : null;
3921
3928
  }
3922
- function wo({
3929
+ function So({
3923
3930
  open: e,
3924
3931
  onOpenChange: t,
3925
3932
  revision: n,
@@ -3942,7 +3949,7 @@ function wo({
3942
3949
  n.uid.substring(0, 8),
3943
3950
  " from",
3944
3951
  " ",
3945
- Dn(n.createdAt, "MMM d, yyyy 'at' h:mm a"),
3952
+ Gn(n.createdAt, "MMM d, yyyy 'at' h:mm a"),
3946
3953
  " by",
3947
3954
  " ",
3948
3955
  l
@@ -3971,7 +3978,7 @@ function wo({
3971
3978
  /* @__PURE__ */ r("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
3972
3979
  "Deleting..."
3973
3980
  ] }) : /* @__PURE__ */ u(be, { children: [
3974
- /* @__PURE__ */ r(ps, { className: "mr-2 h-4 w-4" }),
3981
+ /* @__PURE__ */ r(ys, { className: "mr-2 h-4 w-4" }),
3975
3982
  "Delete Revision"
3976
3983
  ] })
3977
3984
  }
@@ -3981,21 +3988,21 @@ function wo({
3981
3988
  }
3982
3989
  ) : null;
3983
3990
  }
3984
- const So = () => {
3991
+ const No = () => {
3985
3992
  const e = Q(), t = $();
3986
3993
  return Ne({
3987
3994
  queryKey: [ke, I.GET_CHANGES],
3988
3995
  queryFn: async () => t(e, { action: I.GET_CHANGES })
3989
3996
  });
3990
- }, No = ({ currentEditor: e }) => {
3997
+ }, Ao = ({ currentEditor: e }) => {
3991
3998
  const { data: t } = dn(e);
3992
3999
  return t == null ? void 0 : t.name;
3993
4000
  };
3994
- function Ao({
4001
+ function xo({
3995
4002
  showModal: e = !1,
3996
4003
  onClose: t = () => console.log("Cancelled")
3997
4004
  }) {
3998
- const [n, s] = P([]), { data: a, isFetching: i } = So(), { data: l } = Ie(), o = _e(
4005
+ const [n, s] = P([]), { data: a, isFetching: i } = No(), { data: l } = Ie(), o = _e(
3999
4006
  (b) => {
4000
4007
  var T;
4001
4008
  return (T = fe(l, { key: b })) == null ? void 0 : T.hasSlug;
@@ -4015,14 +4022,14 @@ function Ao({
4015
4022
  ), d = Y(
4016
4023
  () => fe(a, { pageType: "theme", id: "THEME" }),
4017
4024
  [a]
4018
- ), { mutate: w, isPending: y } = ws();
4025
+ ), { mutate: w, isPending: y } = Ss();
4019
4026
  we(() => {
4020
4027
  const b = Fe(Te(a, { online: !0 }), "id");
4021
4028
  d && b.push(d == null ? void 0 : d.id), s(b);
4022
4029
  }, [a, d]);
4023
4030
  const p = n.length === (a == null ? void 0 : a.length), S = (b) => {
4024
4031
  s(
4025
- (T) => Mt(T, b) ? Te(T, (R) => R !== b) : Xs(T, b)
4032
+ (T) => Mt(T, b) ? Te(T, (U) => U !== b) : Xs(T, b)
4026
4033
  );
4027
4034
  }, v = () => {
4028
4035
  s(p ? [] : Fe(a, "id"));
@@ -4031,7 +4038,7 @@ function Ao({
4031
4038
  { ids: Ha(n) },
4032
4039
  {
4033
4040
  onSuccess: () => {
4034
- t(), xn("CENTER_CENTER");
4041
+ t(), Tn("CENTER_CENTER");
4035
4042
  }
4036
4043
  }
4037
4044
  );
@@ -4048,8 +4055,8 @@ function Ao({
4048
4055
  { label: "Offline", top: "pt-6" },
4049
4056
  ...mn(Te(h, { online: !1 }), "pageType"),
4050
4057
  ...mn(Te(g, { online: !1 }), "pageType")
4051
- ], R = d ? [{ label: "Theme", top: "pt-6" }, d] : [];
4052
- return [...b, ...R, ...T];
4058
+ ], U = d ? [{ label: "Theme", top: "pt-6" }, d] : [];
4059
+ return [...b, ...U, ...T];
4053
4060
  }, [h, g, d]);
4054
4061
  return /* @__PURE__ */ r(He, { open: e, onOpenChange: y ? () => {
4055
4062
  } : t, children: /* @__PURE__ */ u(Ke, { className: "max-w-4xl max-h-[80%] flex flex-col", children: [
@@ -4124,7 +4131,7 @@ function Ao({
4124
4131
  }
4125
4132
  ),
4126
4133
  " ",
4127
- o(b.pageType) ? /* @__PURE__ */ r(on, { className: "w-4 h-4" }) : /* @__PURE__ */ r(zi, { className: "w-4 h-4" }),
4134
+ o(b.pageType) ? /* @__PURE__ */ r(on, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Wi, { className: "w-4 h-4" }),
4128
4135
  b.name,
4129
4136
  b.slug && /* @__PURE__ */ u("span", { className: "text-xs text-gray-500", children: [
4130
4137
  "(",
@@ -4136,7 +4143,7 @@ function Ao({
4136
4143
  "-",
4137
4144
  " ",
4138
4145
  /* @__PURE__ */ r(
4139
- No,
4146
+ Ao,
4140
4147
  {
4141
4148
  currentEditor: b.currentEditor
4142
4149
  }
@@ -4169,7 +4176,7 @@ function Ao({
4169
4176
  ] })
4170
4177
  ] }) });
4171
4178
  }
4172
- const xo = () => {
4179
+ const To = () => {
4173
4180
  const e = $(), t = Q();
4174
4181
  return Ne({
4175
4182
  queryKey: [I.GET_WEBSITE_DATA],
@@ -4180,8 +4187,8 @@ const xo = () => {
4180
4187
  })
4181
4188
  });
4182
4189
  };
4183
- function To({ onClose: e }) {
4184
- const { data: t, isFetching: n } = xo(), { mutateAsync: s, isPending: a } = vl(), i = dt("settingComponent", null), l = Ka(async (o) => (await s({ data: o }), !0), 300);
4190
+ function Co({ onClose: e }) {
4191
+ const { data: t, isFetching: n } = To(), { mutateAsync: s, isPending: a } = El(), i = dt("settingComponent", null), l = Ka(async (o) => (await s({ data: o }), !0), 300);
4185
4192
  return i ? /* @__PURE__ */ r(He, { open: !0, onOpenChange: e, children: /* @__PURE__ */ u(Ke, { className: "w-full", children: [
4186
4193
  /* @__PURE__ */ r(Ve, { children: /* @__PURE__ */ r(je, { children: "Website Settings" }) }),
4187
4194
  n ? /* @__PURE__ */ u("div", { className: "w-full space-y-3 py-4", children: [
@@ -4204,13 +4211,13 @@ function Kr({
4204
4211
  children: e,
4205
4212
  content: t
4206
4213
  }) {
4207
- return /* @__PURE__ */ r(wr, { children: /* @__PURE__ */ u(ds, { children: [
4208
- /* @__PURE__ */ r(hs, { asChild: !0, children: e }),
4209
- /* @__PURE__ */ r(ms, { side: "bottom", sideOffset: 10, children: /* @__PURE__ */ r("p", { children: t }) })
4214
+ return /* @__PURE__ */ r(wr, { children: /* @__PURE__ */ u(hs, { children: [
4215
+ /* @__PURE__ */ r(ms, { asChild: !0, children: e }),
4216
+ /* @__PURE__ */ r(fs, { side: "bottom", sideOffset: 10, children: /* @__PURE__ */ r("p", { children: t }) })
4210
4217
  ] }) });
4211
4218
  }
4212
- const Co = () => {
4213
- const { selectedLang: e } = ut(), t = dt("getPreviewUrl", async (g) => g), [n, s] = P(""), { data: a, isFetching: i } = Ue(), { data: l } = cn(), { data: o } = Ie(), c = Y(
4219
+ const Po = () => {
4220
+ const { selectedLang: e } = ut(), t = dt("getPreviewUrl", async (g) => g), [n, s] = P(""), { data: a, isFetching: i } = Re(), { data: l } = cn(), { data: o } = Ie(), c = Y(
4214
4221
  () => {
4215
4222
  var g;
4216
4223
  return (g = l == null ? void 0 : l.find((d) => (d == null ? void 0 : d.lang) === e)) == null ? void 0 : g.slug;
@@ -4236,8 +4243,8 @@ const Co = () => {
4236
4243
  " ",
4237
4244
  B.PREVIEW
4238
4245
  ] }) }) });
4239
- }, Po = () => {
4240
- const [e, t] = ti();
4246
+ }, _o = () => {
4247
+ const [e, t] = ni();
4241
4248
  return /* @__PURE__ */ u(be, { children: [
4242
4249
  /* @__PURE__ */ r(Kr, { content: B.THEME, children: /* @__PURE__ */ r(
4243
4250
  _,
@@ -4246,12 +4253,12 @@ const Co = () => {
4246
4253
  size: "icon",
4247
4254
  className: "gap-2",
4248
4255
  onClick: () => t(e === "theme" ? "block" : "theme"),
4249
- children: /* @__PURE__ */ r(Wi, { className: "w-4 h-4" })
4256
+ children: /* @__PURE__ */ r(Yi, { className: "w-4 h-4" })
4250
4257
  }
4251
4258
  ) }),
4252
4259
  /* @__PURE__ */ r("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
4253
4260
  ] });
4254
- }, _o = () => {
4261
+ }, Io = () => {
4255
4262
  const [e, t] = P(!1), { isLocked: n } = hn(), { savePage: s, saveState: a } = sr();
4256
4263
  we(() => {
4257
4264
  const g = (d) => {
@@ -4287,7 +4294,7 @@ const Co = () => {
4287
4294
  case "SAVED":
4288
4295
  return {
4289
4296
  tooltipContent: B.SAVED,
4290
- buttonIcon: /* @__PURE__ */ r(Yi, { className: "w-4 h-4" }),
4297
+ buttonIcon: /* @__PURE__ */ r(Qi, { className: "w-4 h-4" }),
4291
4298
  buttonClass: "text-green-500 flex items-center gap-x-1 leading-tight"
4292
4299
  };
4293
4300
  }
@@ -4306,8 +4313,8 @@ const Co = () => {
4306
4313
  ]
4307
4314
  }
4308
4315
  );
4309
- }, Io = () => {
4310
- const [e, t] = P(!1), [n, s] = P(!1), [a, i] = P(null), { data: l } = Ue(), { mutate: o, isPending: c } = ws(), [h] = ni(), { buttonText: g, buttonClassName: d, isPublished: w } = Y(() => {
4316
+ }, ko = () => {
4317
+ const [e, t] = P(!1), [n, s] = P(!1), [a, i] = P(null), { data: l } = Re(), { mutate: o, isPending: c } = Ss(), [h] = si(), { buttonText: g, buttonClassName: d, isPublished: w } = Y(() => {
4311
4318
  const p = l && (l == null ? void 0 : l.online);
4312
4319
  return {
4313
4320
  buttonClassName: p ? "hover:bg-green-600 bg-green-500" : "",
@@ -4326,7 +4333,7 @@ const Co = () => {
4326
4333
  const p = ((v = (S = h == null ? void 0 : h.filter((x) => (x == null ? void 0 : x._type) === "GlobalBlock")) == null ? void 0 : S.map((x) => x == null ? void 0 : x.globalBlock)) == null ? void 0 : v.filter((x) => typeof x == "string")) || [];
4327
4334
  o(
4328
4335
  { ids: [l == null ? void 0 : l.id, ...p] },
4329
- { onSuccess: () => xn("TOP_RIGHT") }
4336
+ { onSuccess: () => Tn("TOP_RIGHT") }
4330
4337
  );
4331
4338
  },
4332
4339
  disabled: c || !(l != null && l.id),
@@ -4338,14 +4345,14 @@ const Co = () => {
4338
4345
  "span",
4339
4346
  {
4340
4347
  className: `flex items-center transition-transform duration-300 ease-in-out ${n ? "-translate-y-10" : ""}`,
4341
- children: w ? /* @__PURE__ */ r(Rs, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Us, { className: "w-4 h-4" })
4348
+ children: w ? /* @__PURE__ */ r(Rs, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Os, { className: "w-4 h-4" })
4342
4349
  }
4343
4350
  ),
4344
4351
  /* @__PURE__ */ r(
4345
4352
  "span",
4346
4353
  {
4347
4354
  className: `absolute inset-0 flex items-center left-3 transition-transform duration-300 ease-in-out ${n ? "" : "translate-y-10"}`,
4348
- children: w ? /* @__PURE__ */ r(Us, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Rs, { className: "w-4 h-4" })
4355
+ children: w ? /* @__PURE__ */ r(Os, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Rs, { className: "w-4 h-4" })
4349
4356
  }
4350
4357
  ),
4351
4358
  /* @__PURE__ */ r("span", { children: g })
@@ -4370,7 +4377,7 @@ const Co = () => {
4370
4377
  className: "text-xs cursor-pointer",
4371
4378
  onClick: () => o(
4372
4379
  { ids: [l == null ? void 0 : l.id] },
4373
- { onSuccess: () => xn("TOP_RIGHT") }
4380
+ { onSuccess: () => Tn("TOP_RIGHT") }
4374
4381
  ),
4375
4382
  children: [
4376
4383
  B.PUBLISH,
@@ -4403,16 +4410,16 @@ const Co = () => {
4403
4410
  ] })
4404
4411
  ] })
4405
4412
  ] }),
4406
- /* @__PURE__ */ r(Ao, { showModal: e, onClose: () => t(!1) }),
4413
+ /* @__PURE__ */ r(xo, { showModal: e, onClose: () => t(!1) }),
4407
4414
  a && /* @__PURE__ */ r(
4408
- Ns,
4415
+ As,
4409
4416
  {
4410
4417
  page: a,
4411
4418
  onClose: () => i(null)
4412
4419
  }
4413
4420
  )
4414
4421
  ] });
4415
- }, ko = () => {
4422
+ }, Lo = () => {
4416
4423
  const e = dt("settingComponent", null), [t, n] = P(!1);
4417
4424
  return e ? /* @__PURE__ */ u(be, { children: [
4418
4425
  /* @__PURE__ */ r(Kr, { content: B.WEBSITEDATA, children: /* @__PURE__ */ r(
@@ -4422,14 +4429,14 @@ const Co = () => {
4422
4429
  size: "icon",
4423
4430
  className: "gap-2",
4424
4431
  onClick: () => n(!0),
4425
- children: /* @__PURE__ */ r(Qi, { className: "w-4 h-4" })
4432
+ children: /* @__PURE__ */ r(Xi, { className: "w-4 h-4" })
4426
4433
  }
4427
4434
  ) }),
4428
- t && /* @__PURE__ */ r(To, { onClose: () => n(!1) }),
4435
+ t && /* @__PURE__ */ r(Co, { onClose: () => n(!1) }),
4429
4436
  /* @__PURE__ */ r("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
4430
4437
  ] }) : null;
4431
- }, Lo = () => {
4432
- const { data: e } = Ue(), t = e && (e == null ? void 0 : e.online), { data: n } = Ie();
4438
+ }, Do = () => {
4439
+ const { data: e } = Re(), t = e && (e == null ? void 0 : e.online), { data: n } = Ie();
4433
4440
  return _e(
4434
4441
  (a) => {
4435
4442
  var i;
@@ -4445,29 +4452,29 @@ const Co = () => {
4445
4452
  size: "sm",
4446
4453
  className: "flex items-center gap-1",
4447
4454
  children: [
4448
- /* @__PURE__ */ r(Xi, { className: "w-4 h-4" }),
4455
+ /* @__PURE__ */ r(Zi, { className: "w-4 h-4" }),
4449
4456
  /* @__PURE__ */ r("span", { className: "hidden sm:inline", children: B.OPEN })
4450
4457
  ]
4451
4458
  }
4452
4459
  ) : null;
4453
4460
  };
4454
- function Do() {
4455
- const { isLocked: e } = hn(), [t] = Re(), n = t.get("lang"), s = Or(n);
4461
+ function Go() {
4462
+ const { isLocked: e } = hn(), [t] = Ue(), n = t.get("lang"), s = Or(n);
4456
4463
  return e || !s ? null : /* @__PURE__ */ u("div", { className: "flex items-center justify-end gap-1", children: [
4457
- /* @__PURE__ */ r(po, {}),
4458
- /* @__PURE__ */ r(Oe, { permission: ue.EDIT_THEME, children: /* @__PURE__ */ r(Po, {}) }),
4459
- /* @__PURE__ */ r(Oe, { permission: ue.EDIT_SETTINGS, children: /* @__PURE__ */ r(ko, {}) }),
4460
- /* @__PURE__ */ r(Co, {}),
4461
- /* @__PURE__ */ r(Oe, { permission: ue.SAVE_PAGE, children: /* @__PURE__ */ r(_o, {}) }),
4462
- /* @__PURE__ */ r(Oe, { permission: ue.PUBLISH_PAGE, children: /* @__PURE__ */ r(Io, {}) }),
4463
- /* @__PURE__ */ r(Lo, {})
4464
+ /* @__PURE__ */ r(yo, {}),
4465
+ /* @__PURE__ */ r(Oe, { permission: ue.EDIT_THEME, children: /* @__PURE__ */ r(_o, {}) }),
4466
+ /* @__PURE__ */ r(Oe, { permission: ue.EDIT_SETTINGS, children: /* @__PURE__ */ r(Lo, {}) }),
4467
+ /* @__PURE__ */ r(Po, {}),
4468
+ /* @__PURE__ */ r(Oe, { permission: ue.SAVE_PAGE, children: /* @__PURE__ */ r(Io, {}) }),
4469
+ /* @__PURE__ */ r(Oe, { permission: ue.PUBLISH_PAGE, children: /* @__PURE__ */ r(ko, {}) }),
4470
+ /* @__PURE__ */ r(Do, {})
4464
4471
  ] });
4465
4472
  }
4466
- const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-center justify-between w-full", children: [
4467
- /* @__PURE__ */ r(uo, {}),
4468
- /* @__PURE__ */ r(Do, {})
4473
+ const Uo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-center justify-between w-full", children: [
4474
+ /* @__PURE__ */ r(ho, {}),
4475
+ /* @__PURE__ */ r(Go, {})
4469
4476
  ] }), Ro = () => {
4470
- const e = Q(), { aiContext: t } = vs(), n = $();
4477
+ const e = Q(), { aiContext: t } = Es(), n = $();
4471
4478
  return _e(
4472
4479
  async (s, a, i, l) => n(e, {
4473
4480
  action: I.ASK_AI,
@@ -4475,9 +4482,9 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4475
4482
  }),
4476
4483
  [e, t, n]
4477
4484
  );
4478
- }, Uo = (e, t) => t.map((n) => {
4485
+ }, Oo = (e, t) => t.map((n) => {
4479
4486
  if (nn(e, n._type)) {
4480
- const s = il(n._type);
4487
+ const s = ll(n._type);
4481
4488
  return {
4482
4489
  ...s,
4483
4490
  ...Js(n, [
@@ -4493,17 +4500,17 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4493
4500
  };
4494
4501
  }
4495
4502
  return n;
4496
- }), Oo = (e) => {
4497
- const t = al();
4503
+ }), Bo = (e) => {
4504
+ const t = il();
4498
4505
  return Y(() => {
4499
4506
  if (!e || me(e)) return { blocks: [] };
4500
4507
  const n = Te(
4501
4508
  e,
4502
4509
  (s) => !Mt(s == null ? void 0 : s._type, "@chai/")
4503
4510
  );
4504
- return { blocks: Uo(t, n) };
4511
+ return { blocks: Oo(t, n) };
4505
4512
  }, [e, t]);
4506
- }, Bo = () => {
4513
+ }, Mo = () => {
4507
4514
  const e = Q(), t = $();
4508
4515
  return Ne({
4509
4516
  queryKey: [ke, "uiLibraries"],
@@ -4512,8 +4519,8 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4512
4519
  ...s
4513
4520
  }))
4514
4521
  });
4515
- }, Mo = () => {
4516
- const e = Gn(), t = $(), { user: n } = st(), s = n == null ? void 0 : n.id;
4522
+ }, Fo = () => {
4523
+ const e = Un(), t = $(), { user: n } = st(), s = n == null ? void 0 : n.id;
4517
4524
  return Ne({
4518
4525
  queryKey: [ke, "permissions", s],
4519
4526
  queryFn: () => t(e, {
@@ -4522,14 +4529,14 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4522
4529
  }),
4523
4530
  enabled: !!s
4524
4531
  });
4525
- }, Fo = () => {
4526
- const e = Q(), t = $(), { setCurrentEditor: n } = hn(), [, s] = Es();
4532
+ }, qo = () => {
4533
+ const e = Q(), t = $(), { setCurrentEditor: n } = hn(), [, s] = bs();
4527
4534
  return { getUILibraryBlock: async (o, c) => {
4528
4535
  const h = await t(e, {
4529
4536
  action: "GET_LIBRARY_ITEM",
4530
4537
  data: { id: c.id }
4531
4538
  }), g = te(h, "html", ""), d = te(h, "blocks", []);
4532
- return $a(d) ? d : si(g);
4539
+ return $a(d) ? d : ri(g);
4533
4540
  }, getUILibraryBlocks: async (o) => {
4534
4541
  try {
4535
4542
  return (await t(e, {
@@ -4560,7 +4567,7 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4560
4567
  return console.error(h), new Error("Failed to save blocks");
4561
4568
  }
4562
4569
  } };
4563
- }, qo = () => {
4570
+ }, Ho = () => {
4564
4571
  const { data: e } = Rn(), t = Q(), n = $();
4565
4572
  return {
4566
4573
  getPartialBlocks: _e(async () => {
@@ -4589,16 +4596,16 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4589
4596
  [n, t]
4590
4597
  )
4591
4598
  };
4592
- }, Bs = Nn.object({
4593
- email: Nn.string().email({ message: "Please enter a valid email address" }),
4594
- password: Nn.string().min(6, { message: "Password must be at least 6 characters" })
4595
- }), Ho = ({
4599
+ }, Ms = An.object({
4600
+ email: An.string().email({ message: "Please enter a valid email address" }),
4601
+ password: An.string().min(6, { message: "Password must be at least 6 characters" })
4602
+ }), Ko = ({
4596
4603
  onLoginSuccess: e
4597
4604
  }) => {
4598
- const t = Gn(), [n, s] = P(""), [a, i] = P(""), [l, o] = P({}), [c, h] = P(!1), [g, d] = P(""), w = Ae({
4605
+ const t = Un(), [n, s] = P(""), [a, i] = P(""), [l, o] = P({}), [c, h] = P(!1), [g, d] = P(""), w = Ae({
4599
4606
  mutationFn: async (S) => {
4600
4607
  d("");
4601
- const v = await ys(t, {
4608
+ const v = await vs(t, {
4602
4609
  action: "LOGIN",
4603
4610
  data: S
4604
4611
  });
@@ -4622,10 +4629,10 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4622
4629
  S.preventDefault(), o({});
4623
4630
  const v = { email: n, password: a };
4624
4631
  try {
4625
- const x = Bs.parse(v);
4632
+ const x = Ms.parse(v);
4626
4633
  w.mutate(x);
4627
4634
  } catch (x) {
4628
- if (x instanceof Nn.ZodError) {
4635
+ if (x instanceof An.ZodError) {
4629
4636
  const G = x.errors.reduce((E, b) => {
4630
4637
  const T = b.path[0];
4631
4638
  return E[T] = b.message, E;
@@ -4633,13 +4640,13 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4633
4640
  o(G);
4634
4641
  }
4635
4642
  }
4636
- }, p = Bs.safeParse({ email: n, password: a }).success;
4637
- return /* @__PURE__ */ r("div", { className: "flex justify-center items-center min-h-screen bg-slate-50", children: /* @__PURE__ */ u(is, { className: "w-full max-w-md", children: [
4638
- /* @__PURE__ */ u(ls, { children: [
4639
- /* @__PURE__ */ r(os, { className: "text-2xl", children: "Sign in" }),
4640
- /* @__PURE__ */ r(Ei, { children: "Enter your credentials to sign in to visual builder" })
4643
+ }, p = Ms.safeParse({ email: n, password: a }).success;
4644
+ return /* @__PURE__ */ r("div", { className: "flex justify-center items-center min-h-screen bg-slate-50", children: /* @__PURE__ */ u(ls, { className: "w-full max-w-md", children: [
4645
+ /* @__PURE__ */ u(os, { children: [
4646
+ /* @__PURE__ */ r(cs, { className: "text-2xl", children: "Sign in" }),
4647
+ /* @__PURE__ */ r(bi, { children: "Enter your credentials to sign in to visual builder" })
4641
4648
  ] }),
4642
- /* @__PURE__ */ r(cs, { children: /* @__PURE__ */ u("form", { onSubmit: y, className: "space-y-4", children: [
4649
+ /* @__PURE__ */ r(us, { children: /* @__PURE__ */ u("form", { onSubmit: y, className: "space-y-4", children: [
4643
4650
  /* @__PURE__ */ u("div", { className: "space-y-1", children: [
4644
4651
  /* @__PURE__ */ r(X, { htmlFor: "email", children: "Email" }),
4645
4652
  /* @__PURE__ */ r(
@@ -4675,7 +4682,7 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4675
4682
  type: "button",
4676
4683
  className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",
4677
4684
  onClick: () => h(!c),
4678
- children: c ? /* @__PURE__ */ r(Zi, { className: "h-4 w-4" }) : /* @__PURE__ */ r(Lr, { className: "h-4 w-4" })
4685
+ children: c ? /* @__PURE__ */ r(Ji, { className: "h-4 w-4" }) : /* @__PURE__ */ r(Lr, { className: "h-4 w-4" })
4679
4686
  }
4680
4687
  )
4681
4688
  ] }),
@@ -4695,7 +4702,7 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4695
4702
  }
4696
4703
  )
4697
4704
  ] }) }),
4698
- /* @__PURE__ */ u(us, { className: "flex flex-col justify-center", children: [
4705
+ /* @__PURE__ */ u(ds, { className: "flex flex-col justify-center", children: [
4699
4706
  /* @__PURE__ */ u("p", { className: "text-sm text-muted-foreground", children: [
4700
4707
  "Forgot your password?",
4701
4708
  " ",
@@ -4736,28 +4743,28 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4736
4743
  ] })
4737
4744
  ] })
4738
4745
  ] }) });
4739
- }, Ko = () => {
4746
+ }, Vo = () => {
4740
4747
  const { setUser: e } = st();
4741
4748
  return /* @__PURE__ */ r(
4742
- Ho,
4749
+ Ko,
4743
4750
  {
4744
4751
  onLoginSuccess: (t) => {
4745
4752
  e(t);
4746
4753
  }
4747
4754
  }
4748
4755
  );
4749
- }, Vo = ({
4756
+ }, jo = ({
4750
4757
  isActive: e,
4751
4758
  show: t
4752
4759
  }) => {
4753
4760
  const { data: n } = un();
4754
- return !nn(n, "languages") || !te(n, "languages", []).length ? null : /* @__PURE__ */ r(_, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ r(Ji, { className: "w-4 h-4" }) });
4755
- }, Vr = "lang", jo = {
4761
+ return !nn(n, "languages") || !te(n, "languages", []).length ? null : /* @__PURE__ */ r(_, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ r(el, { className: "w-4 h-4" }) });
4762
+ }, Vr = "lang", $o = {
4756
4763
  id: Vr,
4757
4764
  label: "Languages",
4758
4765
  position: "top",
4759
- panel: Yl,
4760
- button: Vo,
4766
+ panel: Ql,
4767
+ button: jo,
4761
4768
  view: "modal",
4762
4769
  width: 400
4763
4770
  };
@@ -4788,8 +4795,8 @@ function Ze({
4788
4795
  type: g(S)
4789
4796
  })).filter((p) => n === "value" ? p.type === "value" || p.type === "object" : n === "array" ? p.type === "array" || p.type === "object" : n === "object" ? p.type === "object" : !0), [c, n]);
4790
4797
  return /* @__PURE__ */ u(mr, { open: a, onOpenChange: i, children: [
4791
- /* @__PURE__ */ u(ds, { children: [
4792
- /* @__PURE__ */ r(hs, { asChild: !0, children: /* @__PURE__ */ r(fr, { asChild: !0, children: /* @__PURE__ */ r(
4798
+ /* @__PURE__ */ u(hs, { children: [
4799
+ /* @__PURE__ */ r(ms, { asChild: !0, children: /* @__PURE__ */ r(fr, { asChild: !0, children: /* @__PURE__ */ r(
4793
4800
  _,
4794
4801
  {
4795
4802
  size: "sm",
@@ -4798,29 +4805,29 @@ function Ze({
4798
4805
  role: "combobox",
4799
4806
  "aria-expanded": a,
4800
4807
  disabled: s,
4801
- children: /* @__PURE__ */ r(el, { className: "h-3 w-3" })
4808
+ children: /* @__PURE__ */ r(tl, { className: "h-3 w-3" })
4802
4809
  }
4803
4810
  ) }) }),
4804
- /* @__PURE__ */ r(ms, { children: "Add field" })
4811
+ /* @__PURE__ */ r(fs, { children: "Add field" })
4805
4812
  ] }),
4806
- /* @__PURE__ */ r(gr, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ u(bi, { children: [
4807
- /* @__PURE__ */ r(wi, { className: "border-none", placeholder: "Search..." }),
4808
- /* @__PURE__ */ u(Si, { children: [
4809
- /* @__PURE__ */ r(Ni, { children: "No option found." }),
4810
- /* @__PURE__ */ u(Ai, { children: [
4813
+ /* @__PURE__ */ r(gr, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ u(wi, { children: [
4814
+ /* @__PURE__ */ r(Si, { className: "border-none", placeholder: "Search..." }),
4815
+ /* @__PURE__ */ u(Ni, { children: [
4816
+ /* @__PURE__ */ r(Ai, { children: "No option found." }),
4817
+ /* @__PURE__ */ u(xi, { children: [
4811
4818
  l.length > 0 && /* @__PURE__ */ u(
4812
- Ls,
4819
+ Ds,
4813
4820
  {
4814
4821
  onSelect: w,
4815
4822
  className: "flex items-center text-sm",
4816
4823
  children: [
4817
- /* @__PURE__ */ r(tl, { className: "w-4 h-4 mr-2" }),
4824
+ /* @__PURE__ */ r(nl, { className: "w-4 h-4 mr-2" }),
4818
4825
  "Back"
4819
4826
  ]
4820
4827
  }
4821
4828
  ),
4822
4829
  y.map((p) => /* @__PURE__ */ u(
4823
- Ls,
4830
+ Ds,
4824
4831
  {
4825
4832
  onSelect: () => d(p),
4826
4833
  className: "flex items-center justify-between",
@@ -4839,7 +4846,7 @@ function Ze({
4839
4846
  children: "Select"
4840
4847
  }
4841
4848
  ),
4842
- (p.type === "object" || p.type === "array") && /* @__PURE__ */ r("div", { className: "p-1 rounded hover:bg-muted cursor-pointer", children: /* @__PURE__ */ r(nl, { className: "w-4 h-4 opacity-50" }) })
4849
+ (p.type === "object" || p.type === "array") && /* @__PURE__ */ r("div", { className: "p-1 rounded hover:bg-muted cursor-pointer", children: /* @__PURE__ */ r(sl, { className: "w-4 h-4 opacity-50" }) })
4843
4850
  ] })
4844
4851
  ]
4845
4852
  },
@@ -4850,10 +4857,10 @@ function Ze({
4850
4857
  ] }) })
4851
4858
  ] });
4852
4859
  }
4853
- const $o = () => {
4860
+ const zo = () => {
4854
4861
  const { selectedLang: e } = ut(), { data: t, isFetching: n } = cn();
4855
4862
  return { data: Y(() => fe(t, { lang: e || "" }) || {}, [t, e]), isFetching: n };
4856
- }, zo = (e, t) => {
4863
+ }, Wo = (e, t) => {
4857
4864
  const n = e.selectionStart || 0, s = e.selectionEnd || 0, a = e.value, i = a.substring(0, n), l = a.substring(s);
4858
4865
  let o = !1;
4859
4866
  if (n > 0 && i.length > 0) {
@@ -4872,10 +4879,10 @@ const $o = () => {
4872
4879
  newCursorPos: y
4873
4880
  };
4874
4881
  }, jr = () => {
4875
- const { t: e } = ri(), { selectedLang: t, fallbackLang: n, languages: s } = ut(), [, a] = ai(), { data: i } = Ue(), { data: l } = Mr({
4882
+ const { t: e } = ai(), { selectedLang: t, fallbackLang: n, languages: s } = ut(), [, a] = ii(), { data: i } = Re(), { data: l } = Mr({
4876
4883
  lang: t || n,
4877
4884
  pageType: i == null ? void 0 : i.pageType
4878
- }), { data: o, isFetching: c } = $o(), h = o == null ? void 0 : o.seo, g = ct(
4885
+ }), { data: o, isFetching: c } = zo(), h = o == null ? void 0 : o.seo, g = ct(
4879
4886
  null
4880
4887
  ), [d, w] = P({
4881
4888
  title: "",
@@ -4890,7 +4897,7 @@ const $o = () => {
4890
4897
  searchDescription: "",
4891
4898
  jsonLD: "",
4892
4899
  ...h
4893
- }), y = ct({ initial: d, updated: d }), p = t.length ? t : n, { mutate: S, isPending: v } = bs(), x = v, { hasPermission: G } = sn(), E = G(ue.EDIT_SEO);
4900
+ }), y = ct({ initial: d, updated: d }), p = t.length ? t : n, { mutate: S, isPending: v } = ws(), x = v, { hasPermission: G } = sn(), E = G(ue.EDIT_SEO);
4894
4901
  we(() => {
4895
4902
  !c && h && w({
4896
4903
  title: "",
@@ -4922,7 +4929,7 @@ const $o = () => {
4922
4929
  ogTitle: d.title,
4923
4930
  ogDescription: d.description
4924
4931
  });
4925
- }, R = () => {
4932
+ }, U = () => {
4926
4933
  w({
4927
4934
  ...d,
4928
4935
  searchTitle: d.ogTitle,
@@ -4931,7 +4938,7 @@ const $o = () => {
4931
4938
  }, J = (k, q) => {
4932
4939
  const A = document.getElementById(q);
4933
4940
  if (A) {
4934
- const { value: M, newCursorPos: ne } = zo(
4941
+ const { value: M, newCursorPos: ne } = Wo(
4935
4942
  A,
4936
4943
  k
4937
4944
  );
@@ -4969,7 +4976,7 @@ const $o = () => {
4969
4976
  w(q), y.current.updated = q;
4970
4977
  };
4971
4978
  return /* @__PURE__ */ u("div", { className: "relative h-full flex flex-col", children: [
4972
- !E && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ r(pr, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ r(xi, { children: e(
4979
+ !E && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ r(pr, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ r(Ti, { children: e(
4973
4980
  "You don't have permission to edit SEO settings. Contact your administrator for access."
4974
4981
  ) }) }) }),
4975
4982
  /* @__PURE__ */ u("div", { className: "flex-grow overflow-y-auto no-scrollbar px-2", children: [
@@ -4984,7 +4991,7 @@ const $o = () => {
4984
4991
  ")"
4985
4992
  ] })
4986
4993
  ] }),
4987
- /* @__PURE__ */ r("form", { className: "space-y-8", children: /* @__PURE__ */ u(Ti, { type: "multiple", defaultValue: ["page"], children: [
4994
+ /* @__PURE__ */ r("form", { className: "space-y-8", children: /* @__PURE__ */ u(Ci, { type: "multiple", defaultValue: ["page"], children: [
4988
4995
  /* @__PURE__ */ u(gn, { value: "page", children: [
4989
4996
  /* @__PURE__ */ r(pn, { className: "font-semibold text-slate-700", children: e("SEO") }),
4990
4997
  /* @__PURE__ */ r(yn, { className: "pt-2", children: /* @__PURE__ */ u("div", { className: "space-y-4", children: [
@@ -5210,7 +5217,7 @@ const $o = () => {
5210
5217
  type: "button",
5211
5218
  variant: "outline",
5212
5219
  size: "sm",
5213
- onClick: R,
5220
+ onClick: U,
5214
5221
  disabled: !E,
5215
5222
  children: e("Copy from OG Settings")
5216
5223
  }
@@ -5306,18 +5313,18 @@ const $o = () => {
5306
5313
  size: "lg",
5307
5314
  variant: "default",
5308
5315
  onClick: b,
5309
- disabled: rs(y.current.initial, d) || x || !E,
5316
+ disabled: as(y.current.initial, d) || x || !E,
5310
5317
  children: e(v ? "Saving..." : "Save")
5311
5318
  }
5312
5319
  ) })
5313
5320
  ] });
5314
5321
  };
5315
5322
  jr.displayName = "SeoPanel";
5316
- const $r = "seo", Wo = ({
5323
+ const $r = "seo", Yo = ({
5317
5324
  isActive: e,
5318
5325
  show: t
5319
5326
  }) => {
5320
- const { data: n } = Ue(), s = Ol(n == null ? void 0 : n.pageType);
5327
+ const { data: n } = Re(), s = Bl(n == null ? void 0 : n.pageType);
5321
5328
  return !nn(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ r(
5322
5329
  _,
5323
5330
  {
@@ -5340,21 +5347,21 @@ const $r = "seo", Wo = ({
5340
5347
  )
5341
5348
  }
5342
5349
  );
5343
- }, Yo = {
5350
+ }, Qo = {
5344
5351
  id: $r,
5345
5352
  label: "SEO",
5346
5353
  panel: jr,
5347
- button: Wo,
5354
+ button: Yo,
5348
5355
  position: "top",
5349
5356
  view: "modal",
5350
5357
  width: 600
5351
- }, Qo = () => {
5352
- $n($r, Yo), $n(Vr, jo);
5353
- }, Xo = "user-info", Zo = () => {
5358
+ }, Xo = () => {
5359
+ zn($r, Qo), zn(Vr, $o);
5360
+ }, Zo = "user-info", Jo = () => {
5354
5361
  const { user: e, logout: t } = st();
5355
- return e ? /* @__PURE__ */ u(Ci, { children: [
5356
- /* @__PURE__ */ r(Pi, { asChild: !0, children: /* @__PURE__ */ r(_, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ r(sl, { className: "w-4 h-4" }) }) }),
5357
- /* @__PURE__ */ u(_i, { className: "w-auto p-4 space-y-2", children: [
5362
+ return e ? /* @__PURE__ */ u(Pi, { children: [
5363
+ /* @__PURE__ */ r(_i, { asChild: !0, children: /* @__PURE__ */ r(_, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ r(rl, { className: "w-4 h-4" }) }) }),
5364
+ /* @__PURE__ */ u(Ii, { className: "w-auto p-4 space-y-2", children: [
5358
5365
  /* @__PURE__ */ r("div", { className: "text-sm font-medium", children: e.name ?? e.email }),
5359
5366
  /* @__PURE__ */ r("div", { className: "text-xs text-muted-foreground", children: e.email }),
5360
5367
  /* @__PURE__ */ u(rr, { children: [
@@ -5372,39 +5379,39 @@ const $r = "seo", Wo = ({
5372
5379
  ] })
5373
5380
  ] })
5374
5381
  ] }) : null;
5375
- }, Jo = {
5376
- id: Xo,
5382
+ }, ec = {
5383
+ id: Zo,
5377
5384
  label: "User Info",
5378
- button: Zo,
5385
+ button: Jo,
5379
5386
  position: "bottom"
5380
- }, ec = (e) => (console.log(e), /* @__PURE__ */ r("h1", { children: "Hello" }));
5387
+ };
5381
5388
  var O = {
5382
5389
  context: void 0,
5383
5390
  registry: void 0,
5384
5391
  effects: void 0,
5385
5392
  done: !1,
5386
5393
  getContextId() {
5387
- return Ms(this.context.count);
5394
+ return Fs(this.context.count);
5388
5395
  },
5389
5396
  getNextContextId() {
5390
- return Ms(this.context.count++);
5397
+ return Fs(this.context.count++);
5391
5398
  }
5392
5399
  };
5393
- function Ms(e) {
5400
+ function Fs(e) {
5394
5401
  const t = String(e), n = t.length - 1;
5395
5402
  return O.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
5396
5403
  }
5397
- function Rt(e) {
5404
+ function Ut(e) {
5398
5405
  O.context = e;
5399
5406
  }
5400
- var tc = (e, t) => e === t, Tn = Symbol("solid-proxy"), zr = typeof Proxy == "function", Wr = Symbol("solid-track"), Cn = {
5407
+ var tc = (e, t) => e === t, Cn = Symbol("solid-proxy"), zr = typeof Proxy == "function", Wr = Symbol("solid-track"), Pn = {
5401
5408
  equals: tc
5402
- }, Yr = ta, tt = 1, Pn = 2, Qr = {
5409
+ }, Yr = ta, tt = 1, _n = 2, Qr = {
5403
5410
  owned: null,
5404
5411
  cleanups: null,
5405
5412
  context: null,
5406
5413
  owner: null
5407
- }, Hn = {}, Z = null, Kn = null, nc = null, re = null, Pe = null, Je = null, Un = 0;
5414
+ }, Kn = {}, Z = null, Vn = null, nc = null, re = null, Pe = null, Je = null, On = 0;
5408
5415
  function lt(e, t) {
5409
5416
  const n = re, s = Z, a = e.length === 0, i = t === void 0 ? s : t, l = a ? Qr : {
5410
5417
  owned: null,
@@ -5420,7 +5427,7 @@ function lt(e, t) {
5420
5427
  }
5421
5428
  }
5422
5429
  function ve(e, t) {
5423
- t = t ? Object.assign({}, Cn, t) : Cn;
5430
+ t = t ? Object.assign({}, Pn, t) : Pn;
5424
5431
  const n = {
5425
5432
  value: e,
5426
5433
  observers: null,
@@ -5430,21 +5437,21 @@ function ve(e, t) {
5430
5437
  return [Jr.bind(n), s];
5431
5438
  }
5432
5439
  function sc(e, t, n) {
5433
- const s = On(e, t, !0, tt);
5440
+ const s = Bn(e, t, !0, tt);
5434
5441
  Lt(s);
5435
5442
  }
5436
5443
  function ot(e, t, n) {
5437
- const s = On(e, t, !1, tt);
5444
+ const s = Bn(e, t, !1, tt);
5438
5445
  Lt(s);
5439
5446
  }
5440
5447
  function Xr(e, t, n) {
5441
5448
  Yr = mc;
5442
- const s = On(e, t, !1, tt);
5449
+ const s = Bn(e, t, !1, tt);
5443
5450
  (!n || !n.render) && (s.user = !0), Je ? Je.push(s) : Lt(s);
5444
5451
  }
5445
5452
  function Ge(e, t, n) {
5446
- n = n ? Object.assign({}, Cn, n) : Cn;
5447
- const s = On(e, t, !0, 0);
5453
+ n = n ? Object.assign({}, Pn, n) : Pn;
5454
+ const s = Bn(e, t, !0, 0);
5448
5455
  return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, Lt(s), Jr.bind(s);
5449
5456
  }
5450
5457
  function rc(e) {
@@ -5453,7 +5460,7 @@ function rc(e) {
5453
5460
  function ac(e, t, n) {
5454
5461
  let s, a, i;
5455
5462
  arguments.length === 1 ? (s = !0, a = e, i = {}) : (s = e, a = t, i = {});
5456
- let l = null, o = Hn, c = null, h = !1, g = "initialValue" in i, d = typeof s == "function" && Ge(s);
5463
+ let l = null, o = Kn, c = null, h = !1, g = "initialValue" in i, d = typeof s == "function" && Ge(s);
5457
5464
  const w = /* @__PURE__ */ new Set(), [y, p] = (i.storage || ve)(i.initialValue), [S, v] = ve(void 0), [x, G] = ve(void 0, {
5458
5465
  equals: !1
5459
5466
  }), [E, b] = ve(g ? "ready" : "unresolved");
@@ -5463,9 +5470,9 @@ function ac(e, t, n) {
5463
5470
  () => i.onHydrated(M, {
5464
5471
  value: q
5465
5472
  })
5466
- ), o = Hn, R(q, A)), q;
5473
+ ), o = Kn, U(q, A)), q;
5467
5474
  }
5468
- function R(k, q) {
5475
+ function U(k, q) {
5469
5476
  We(() => {
5470
5477
  q === void 0 && p(() => k), b(q !== void 0 ? "errored" : g ? "ready" : "unresolved"), v(q);
5471
5478
  for (const A of w.keys())
@@ -5488,17 +5495,17 @@ function ac(e, t, n) {
5488
5495
  T(l, Ce(y));
5489
5496
  return;
5490
5497
  }
5491
- const A = o !== Hn ? o : Ce(
5498
+ const A = o !== Kn ? o : Ce(
5492
5499
  () => a(q, {
5493
5500
  value: y(),
5494
5501
  refetching: k
5495
5502
  })
5496
5503
  );
5497
- return rc(A) ? (l = A, "value" in A ? (A.status === "success" ? T(l, A.value, void 0, q) : T(l, void 0, zn(A.value), q), A) : (h = !0, queueMicrotask(() => h = !1), We(() => {
5504
+ return rc(A) ? (l = A, "value" in A ? (A.status === "success" ? T(l, A.value, void 0, q) : T(l, void 0, Wn(A.value), q), A) : (h = !0, queueMicrotask(() => h = !1), We(() => {
5498
5505
  b(g ? "refreshing" : "pending"), G();
5499
5506
  }, !1), A.then(
5500
5507
  (M) => T(A, M, void 0, q),
5501
- (M) => T(A, void 0, zn(M), q)
5508
+ (M) => T(A, void 0, Wn(M), q)
5502
5509
  ))) : (T(l, A, void 0, q), A);
5503
5510
  }
5504
5511
  return Object.defineProperties(J, {
@@ -5532,7 +5539,7 @@ function ac(e, t, n) {
5532
5539
  }
5533
5540
  ];
5534
5541
  }
5535
- function ju(e) {
5542
+ function $u(e) {
5536
5543
  return We(e, !1);
5537
5544
  }
5538
5545
  function Ce(e) {
@@ -5546,7 +5553,7 @@ function Ce(e) {
5546
5553
  re = t;
5547
5554
  }
5548
5555
  }
5549
- function $u(e, t, n) {
5556
+ function zu(e, t, n) {
5550
5557
  const s = Array.isArray(e);
5551
5558
  let a, i = n && n.defer;
5552
5559
  return (l) => {
@@ -5569,7 +5576,7 @@ function ic(e) {
5569
5576
  function Ft(e) {
5570
5577
  return Z === null || (Z.cleanups === null ? Z.cleanups = [e] : Z.cleanups.push(e)), e;
5571
5578
  }
5572
- function Fs() {
5579
+ function qs() {
5573
5580
  return Z;
5574
5581
  }
5575
5582
  function lc(e, t) {
@@ -5578,7 +5585,7 @@ function lc(e, t) {
5578
5585
  try {
5579
5586
  return We(t, !0);
5580
5587
  } catch (a) {
5581
- As(a);
5588
+ xs(a);
5582
5589
  } finally {
5583
5590
  Z = n, re = s;
5584
5591
  }
@@ -5591,11 +5598,11 @@ function oc(e) {
5591
5598
  return We(e, !1), re = Z = null, s ? s.done : void 0;
5592
5599
  });
5593
5600
  }
5594
- var [cc, zu] = /* @__PURE__ */ ve(!1);
5595
- function Wu() {
5601
+ var [cc, Wu] = /* @__PURE__ */ ve(!1);
5602
+ function Yu() {
5596
5603
  return [cc, oc];
5597
5604
  }
5598
- function Yu(e, t) {
5605
+ function Qu(e, t) {
5599
5606
  const n = Symbol("context");
5600
5607
  return {
5601
5608
  id: n,
@@ -5603,12 +5610,12 @@ function Yu(e, t) {
5603
5610
  defaultValue: e
5604
5611
  };
5605
5612
  }
5606
- function Qu(e) {
5613
+ function Xu(e) {
5607
5614
  let t;
5608
5615
  return Z && Z.context && (t = Z.context[e.id]) !== void 0 ? t : e.defaultValue;
5609
5616
  }
5610
5617
  function Zr(e) {
5611
- const t = Ge(e), n = Ge(() => Wn(t()));
5618
+ const t = Ge(e), n = Ge(() => Yn(t()));
5612
5619
  return n.toArray = () => {
5613
5620
  const s = n();
5614
5621
  return Array.isArray(s) ? s : s != null ? [s] : [];
@@ -5621,7 +5628,7 @@ function Jr() {
5621
5628
  Lt(this);
5622
5629
  else {
5623
5630
  const e = Pe;
5624
- Pe = null, We(() => In(this), !1), Pe = e;
5631
+ Pe = null, We(() => kn(this), !1), Pe = e;
5625
5632
  }
5626
5633
  if (re) {
5627
5634
  const e = this.observers ? this.observers.length : 0;
@@ -5633,8 +5640,8 @@ function ea(e, t, n) {
5633
5640
  let s = e.value;
5634
5641
  return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && We(() => {
5635
5642
  for (let a = 0; a < e.observers.length; a += 1) {
5636
- const i = e.observers[a], l = Kn && Kn.running;
5637
- l && Kn.disposed.has(i), (l ? !i.tState : !i.state) && (i.pure ? Pe.push(i) : Je.push(i), i.observers && na(i)), l || (i.state = tt);
5643
+ const i = e.observers[a], l = Vn && Vn.running;
5644
+ l && Vn.disposed.has(i), (l ? !i.tState : !i.state) && (i.pure ? Pe.push(i) : Je.push(i), i.observers && na(i)), l || (i.state = tt);
5638
5645
  }
5639
5646
  if (Pe.length > 1e6)
5640
5647
  throw Pe = [], new Error();
@@ -5644,7 +5651,7 @@ function Lt(e) {
5644
5651
  if (!e.fn)
5645
5652
  return;
5646
5653
  qt(e);
5647
- const t = Un;
5654
+ const t = On;
5648
5655
  dc(
5649
5656
  e,
5650
5657
  e.value,
@@ -5658,13 +5665,13 @@ function dc(e, t, n) {
5658
5665
  try {
5659
5666
  s = e.fn(t);
5660
5667
  } catch (l) {
5661
- return e.pure && (e.state = tt, e.owned && e.owned.forEach(qt), e.owned = null), e.updatedAt = n + 1, As(l);
5668
+ return e.pure && (e.state = tt, e.owned && e.owned.forEach(qt), e.owned = null), e.updatedAt = n + 1, xs(l);
5662
5669
  } finally {
5663
5670
  re = i, Z = a;
5664
5671
  }
5665
5672
  (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? ea(e, s) : e.value = s, e.updatedAt = n);
5666
5673
  }
5667
- function On(e, t, n, s = tt, a) {
5674
+ function Bn(e, t, n, s = tt, a) {
5668
5675
  const i = {
5669
5676
  fn: e,
5670
5677
  state: s,
@@ -5680,34 +5687,34 @@ function On(e, t, n, s = tt, a) {
5680
5687
  };
5681
5688
  return Z === null || Z !== Qr && (Z.owned ? Z.owned.push(i) : Z.owned = [i]), i;
5682
5689
  }
5683
- function _n(e) {
5690
+ function In(e) {
5684
5691
  if (e.state === 0)
5685
5692
  return;
5686
- if (e.state === Pn)
5687
- return In(e);
5693
+ if (e.state === _n)
5694
+ return kn(e);
5688
5695
  if (e.suspense && Ce(e.suspense.inFallback))
5689
5696
  return e.suspense.effects.push(e);
5690
5697
  const t = [e];
5691
- for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < Un); )
5698
+ for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < On); )
5692
5699
  e.state && t.push(e);
5693
5700
  for (let n = t.length - 1; n >= 0; n--)
5694
5701
  if (e = t[n], e.state === tt)
5695
5702
  Lt(e);
5696
- else if (e.state === Pn) {
5703
+ else if (e.state === _n) {
5697
5704
  const s = Pe;
5698
- Pe = null, We(() => In(e, t[0]), !1), Pe = s;
5705
+ Pe = null, We(() => kn(e, t[0]), !1), Pe = s;
5699
5706
  }
5700
5707
  }
5701
5708
  function We(e, t) {
5702
5709
  if (Pe)
5703
5710
  return e();
5704
5711
  let n = !1;
5705
- t || (Pe = []), Je ? n = !0 : Je = [], Un++;
5712
+ t || (Pe = []), Je ? n = !0 : Je = [], On++;
5706
5713
  try {
5707
5714
  const s = e();
5708
5715
  return hc(n), s;
5709
5716
  } catch (s) {
5710
- n || (Je = null), Pe = null, As(s);
5717
+ n || (Je = null), Pe = null, xs(s);
5711
5718
  }
5712
5719
  }
5713
5720
  function hc(e) {
@@ -5718,38 +5725,38 @@ function hc(e) {
5718
5725
  }
5719
5726
  function ta(e) {
5720
5727
  for (let t = 0; t < e.length; t++)
5721
- _n(e[t]);
5728
+ In(e[t]);
5722
5729
  }
5723
5730
  function mc(e) {
5724
5731
  let t, n = 0;
5725
5732
  for (t = 0; t < e.length; t++) {
5726
5733
  const s = e[t];
5727
- s.user ? e[n++] = s : _n(s);
5734
+ s.user ? e[n++] = s : In(s);
5728
5735
  }
5729
5736
  if (O.context) {
5730
5737
  if (O.count) {
5731
5738
  O.effects || (O.effects = []), O.effects.push(...e.slice(0, n));
5732
5739
  return;
5733
5740
  }
5734
- Rt();
5741
+ Ut();
5735
5742
  }
5736
5743
  for (O.effects && (O.done || !O.count) && (e = [...O.effects, ...e], n += O.effects.length, delete O.effects), t = 0; t < n; t++)
5737
- _n(e[t]);
5744
+ In(e[t]);
5738
5745
  }
5739
- function In(e, t) {
5746
+ function kn(e, t) {
5740
5747
  e.state = 0;
5741
5748
  for (let n = 0; n < e.sources.length; n += 1) {
5742
5749
  const s = e.sources[n];
5743
5750
  if (s.sources) {
5744
5751
  const a = s.state;
5745
- a === tt ? s !== t && (!s.updatedAt || s.updatedAt < Un) && _n(s) : a === Pn && In(s, t);
5752
+ a === tt ? s !== t && (!s.updatedAt || s.updatedAt < On) && In(s) : a === _n && kn(s, t);
5746
5753
  }
5747
5754
  }
5748
5755
  }
5749
5756
  function na(e) {
5750
5757
  for (let t = 0; t < e.observers.length; t += 1) {
5751
5758
  const n = e.observers[t];
5752
- n.state || (n.state = Pn, n.pure ? Pe.push(n) : Je.push(n), n.observers && na(n));
5759
+ n.state || (n.state = _n, n.pure ? Pe.push(n) : Je.push(n), n.observers && na(n));
5753
5760
  }
5754
5761
  }
5755
5762
  function qt(e) {
@@ -5779,21 +5786,21 @@ function qt(e) {
5779
5786
  }
5780
5787
  e.state = 0;
5781
5788
  }
5782
- function zn(e) {
5789
+ function Wn(e) {
5783
5790
  return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
5784
5791
  cause: e
5785
5792
  });
5786
5793
  }
5787
- function As(e, t = Z) {
5788
- throw zn(e);
5794
+ function xs(e, t = Z) {
5795
+ throw Wn(e);
5789
5796
  }
5790
- function Wn(e) {
5797
+ function Yn(e) {
5791
5798
  if (typeof e == "function" && !e.length)
5792
- return Wn(e());
5799
+ return Yn(e());
5793
5800
  if (Array.isArray(e)) {
5794
5801
  const t = [];
5795
5802
  for (let n = 0; n < e.length; n++) {
5796
- const s = Wn(e[n]);
5803
+ const s = Yn(e[n]);
5797
5804
  Array.isArray(s) ? t.push.apply(t, s) : t.push(s);
5798
5805
  }
5799
5806
  return t;
@@ -5812,19 +5819,19 @@ function fc(e, t) {
5812
5819
  ), a;
5813
5820
  };
5814
5821
  }
5815
- var Yn = Symbol("fallback");
5816
- function kn(e) {
5822
+ var Qn = Symbol("fallback");
5823
+ function Ln(e) {
5817
5824
  for (let t = 0; t < e.length; t++)
5818
5825
  e[t]();
5819
5826
  }
5820
5827
  function gc(e, t, n = {}) {
5821
5828
  let s = [], a = [], i = [], l = 0, o = t.length > 1 ? [] : null;
5822
- return Ft(() => kn(i)), () => {
5829
+ return Ft(() => Ln(i)), () => {
5823
5830
  let c = e() || [], h = c.length, g, d;
5824
5831
  return c[Wr], Ce(() => {
5825
5832
  let y, p, S, v, x, G, E, b, T;
5826
5833
  if (h === 0)
5827
- l !== 0 && (kn(i), i = [], s = [], a = [], l = 0, o && (o = [])), n.fallback && (s = [Yn], a[0] = lt((R) => (i[0] = R, n.fallback())), l = 1);
5834
+ l !== 0 && (Ln(i), i = [], s = [], a = [], l = 0, o && (o = [])), n.fallback && (s = [Qn], a[0] = lt((U) => (i[0] = U, n.fallback())), l = 1);
5828
5835
  else if (l === 0) {
5829
5836
  for (a = new Array(h), d = 0; d < h; d++)
5830
5837
  s[d] = c[d], a[d] = lt(w);
@@ -5855,12 +5862,12 @@ function gc(e, t, n = {}) {
5855
5862
  }
5856
5863
  function pc(e, t, n = {}) {
5857
5864
  let s = [], a = [], i = [], l = [], o = 0, c;
5858
- return Ft(() => kn(i)), () => {
5865
+ return Ft(() => Ln(i)), () => {
5859
5866
  const h = e() || [], g = h.length;
5860
5867
  return h[Wr], Ce(() => {
5861
5868
  if (g === 0)
5862
- return o !== 0 && (kn(i), i = [], s = [], a = [], o = 0, l = []), n.fallback && (s = [Yn], a[0] = lt((w) => (i[0] = w, n.fallback())), o = 1), a;
5863
- for (s[0] === Yn && (i[0](), i = [], s = [], a = [], o = 0), c = 0; c < g; c++)
5869
+ return o !== 0 && (Ln(i), i = [], s = [], a = [], o = 0, l = []), n.fallback && (s = [Qn], a[0] = lt((w) => (i[0] = w, n.fallback())), o = 1), a;
5870
+ for (s[0] === Qn && (i[0](), i = [], s = [], a = [], o = 0), c = 0; c < g; c++)
5864
5871
  c < s.length && s[c] !== h[c] ? l[c](() => h[c]) : c >= s.length && (a[c] = lt(d));
5865
5872
  for (; c < s.length; c++)
5866
5873
  i[c]();
@@ -5879,12 +5886,12 @@ function sa(e, t) {
5879
5886
  function vn() {
5880
5887
  return !0;
5881
5888
  }
5882
- var Qn = {
5889
+ var Xn = {
5883
5890
  get(e, t, n) {
5884
- return t === Tn ? n : e.get(t);
5891
+ return t === Cn ? n : e.get(t);
5885
5892
  },
5886
5893
  has(e, t) {
5887
- return t === Tn ? !0 : e.has(t);
5894
+ return t === Cn ? !0 : e.has(t);
5888
5895
  },
5889
5896
  set: vn,
5890
5897
  deleteProperty: vn,
@@ -5903,7 +5910,7 @@ var Qn = {
5903
5910
  return e.keys();
5904
5911
  }
5905
5912
  };
5906
- function Vn(e) {
5913
+ function jn(e) {
5907
5914
  return (e = typeof e == "function" ? e() : e) ? e : {};
5908
5915
  }
5909
5916
  function yc() {
@@ -5917,32 +5924,32 @@ function ra(...e) {
5917
5924
  let t = !1;
5918
5925
  for (let l = 0; l < e.length; l++) {
5919
5926
  const o = e[l];
5920
- t = t || !!o && Tn in o, e[l] = typeof o == "function" ? (t = !0, Ge(o)) : o;
5927
+ t = t || !!o && Cn in o, e[l] = typeof o == "function" ? (t = !0, Ge(o)) : o;
5921
5928
  }
5922
5929
  if (zr && t)
5923
5930
  return new Proxy(
5924
5931
  {
5925
5932
  get(l) {
5926
5933
  for (let o = e.length - 1; o >= 0; o--) {
5927
- const c = Vn(e[o])[l];
5934
+ const c = jn(e[o])[l];
5928
5935
  if (c !== void 0)
5929
5936
  return c;
5930
5937
  }
5931
5938
  },
5932
5939
  has(l) {
5933
5940
  for (let o = e.length - 1; o >= 0; o--)
5934
- if (l in Vn(e[o]))
5941
+ if (l in jn(e[o]))
5935
5942
  return !0;
5936
5943
  return !1;
5937
5944
  },
5938
5945
  keys() {
5939
5946
  const l = [];
5940
5947
  for (let o = 0; o < e.length; o++)
5941
- l.push(...Object.keys(Vn(e[o])));
5948
+ l.push(...Object.keys(jn(e[o])));
5942
5949
  return [...new Set(l)];
5943
5950
  }
5944
5951
  },
5945
- Qn
5952
+ Xn
5946
5953
  );
5947
5954
  const n = {}, s = /* @__PURE__ */ Object.create(null);
5948
5955
  for (let l = e.length - 1; l >= 0; l--) {
@@ -5975,7 +5982,7 @@ function ra(...e) {
5975
5982
  return a;
5976
5983
  }
5977
5984
  function vc(e, ...t) {
5978
- if (zr && Tn in e) {
5985
+ if (zr && Cn in e) {
5979
5986
  const a = new Set(t.length > 1 ? t.flat() : t[0]), i = t.map((l) => new Proxy(
5980
5987
  {
5981
5988
  get(o) {
@@ -5988,7 +5995,7 @@ function vc(e, ...t) {
5988
5995
  return l.filter((o) => o in e);
5989
5996
  }
5990
5997
  },
5991
- Qn
5998
+ Xn
5992
5999
  ));
5993
6000
  return i.push(
5994
6001
  new Proxy(
@@ -6003,7 +6010,7 @@ function vc(e, ...t) {
6003
6010
  return Object.keys(e).filter((l) => !a.has(l));
6004
6011
  }
6005
6012
  },
6006
- Qn
6013
+ Xn
6007
6014
  )
6008
6015
  ), i;
6009
6016
  }
@@ -6024,7 +6031,7 @@ function aa(e) {
6024
6031
  if (i) {
6025
6032
  const [o, c] = ve();
6026
6033
  O.count || (O.count = 0), O.count++, (n || (n = e())).then((h) => {
6027
- !O.done && Rt(i), O.count--, c(() => h.default), Rt();
6034
+ !O.done && Ut(i), O.count--, c(() => h.default), Ut();
6028
6035
  }), t = o;
6029
6036
  } else if (!t) {
6030
6037
  const [o] = ac(() => (n || (n = e())).then((c) => c.default));
@@ -6036,32 +6043,32 @@ function aa(e) {
6036
6043
  if (!i || O.done)
6037
6044
  return l(a);
6038
6045
  const o = O.context;
6039
- Rt(i);
6046
+ Ut(i);
6040
6047
  const c = l(a);
6041
- return Rt(o), c;
6048
+ return Ut(o), c;
6042
6049
  }) : ""
6043
6050
  );
6044
6051
  };
6045
6052
  return s.preload = () => n || ((n = e()).then((a) => t = () => a.default), n), s;
6046
6053
  }
6047
6054
  var Ec = 0;
6048
- function Xu() {
6055
+ function Zu() {
6049
6056
  return O.context ? O.getNextContextId() : `cl-${Ec++}`;
6050
6057
  }
6051
6058
  var ia = (e) => `Stale read from <${e}>.`;
6052
- function Zu(e) {
6059
+ function Ju(e) {
6053
6060
  const t = "fallback" in e && {
6054
6061
  fallback: () => e.fallback
6055
6062
  };
6056
6063
  return Ge(gc(() => e.each, e.children, t || void 0));
6057
6064
  }
6058
- function Ju(e) {
6065
+ function ed(e) {
6059
6066
  const t = "fallback" in e && {
6060
6067
  fallback: () => e.fallback
6061
6068
  };
6062
6069
  return Ge(pc(() => e.each, e.children, t || void 0));
6063
6070
  }
6064
- function ed(e) {
6071
+ function td(e) {
6065
6072
  const t = e.keyed, n = Ge(() => e.when, void 0, {
6066
6073
  equals: (s, a) => t ? s === a : !s == !a
6067
6074
  });
@@ -6086,7 +6093,7 @@ function ed(e) {
6086
6093
  void 0
6087
6094
  );
6088
6095
  }
6089
- function td(e) {
6096
+ function nd(e) {
6090
6097
  let t = !1;
6091
6098
  const n = (i, l) => (t ? i[1] === l[1] : !i[1] == !l[1]) && i[2] === l[2], s = Zr(() => e.children), a = Ge(
6092
6099
  () => {
@@ -6124,7 +6131,7 @@ function td(e) {
6124
6131
  void 0
6125
6132
  );
6126
6133
  }
6127
- function nd(e) {
6134
+ function sd(e) {
6128
6135
  return e;
6129
6136
  }
6130
6137
  var bc = [
@@ -6353,12 +6360,12 @@ var Ot = "_$DX_DELEGATE";
6353
6360
  function la(e, t, n, s = {}) {
6354
6361
  let a;
6355
6362
  return lt((i) => {
6356
- a = i, t === document ? e() : Zn(t, e(), t.firstChild ? null : void 0, n);
6363
+ a = i, t === document ? e() : Jn(t, e(), t.firstChild ? null : void 0, n);
6357
6364
  }, s.owner), () => {
6358
6365
  a(), t.textContent = "";
6359
6366
  };
6360
6367
  }
6361
- function sd(e, t, n) {
6368
+ function rd(e, t, n) {
6362
6369
  let s;
6363
6370
  const a = () => {
6364
6371
  const l = document.createElement("template");
@@ -6373,14 +6380,14 @@ function Ic(e, t = window.document) {
6373
6380
  n.has(i) || (n.add(i), t.addEventListener(i, oa));
6374
6381
  }
6375
6382
  }
6376
- function rd(e = window.document) {
6383
+ function ad(e = window.document) {
6377
6384
  if (e[Ot]) {
6378
6385
  for (let t of e[Ot].keys())
6379
6386
  e.removeEventListener(t, oa);
6380
6387
  delete e[Ot];
6381
6388
  }
6382
6389
  }
6383
- function Xn(e, t, n) {
6390
+ function Zn(e, t, n) {
6384
6391
  ht(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
6385
6392
  }
6386
6393
  function kc(e, t, n, s) {
@@ -6401,22 +6408,22 @@ function Gc(e, t, n, s) {
6401
6408
  } else
6402
6409
  e.addEventListener(t, n, typeof n != "function" && n);
6403
6410
  }
6404
- function Rc(e, t, n = {}) {
6411
+ function Uc(e, t, n = {}) {
6405
6412
  const s = Object.keys(t || {}), a = Object.keys(n);
6406
6413
  let i, l;
6407
6414
  for (i = 0, l = a.length; i < l; i++) {
6408
6415
  const o = a[i];
6409
- !o || o === "undefined" || t[o] || (qs(e, o, !1), delete n[o]);
6416
+ !o || o === "undefined" || t[o] || (Hs(e, o, !1), delete n[o]);
6410
6417
  }
6411
6418
  for (i = 0, l = s.length; i < l; i++) {
6412
6419
  const o = s[i], c = !!t[o];
6413
- !o || o === "undefined" || n[o] === c || !c || (qs(e, o, !0), n[o] = c);
6420
+ !o || o === "undefined" || n[o] === c || !c || (Hs(e, o, !0), n[o] = c);
6414
6421
  }
6415
6422
  return n;
6416
6423
  }
6417
- function Uc(e, t, n) {
6424
+ function Rc(e, t, n) {
6418
6425
  if (!t)
6419
- return n ? Xn(e, "style") : t;
6426
+ return n ? Zn(e, "style") : t;
6420
6427
  const s = e.style;
6421
6428
  if (typeof t == "string")
6422
6429
  return s.cssText = t;
@@ -6437,7 +6444,7 @@ function Oc(e, t = {}, n, s) {
6437
6444
  function Bc(e, t, n) {
6438
6445
  return Ce(() => e(t, n));
6439
6446
  }
6440
- function Zn(e, t, n, s) {
6447
+ function Jn(e, t, n, s) {
6441
6448
  if (n !== void 0 && !s && (s = []), typeof t != "function")
6442
6449
  return Ht(e, t, s, n);
6443
6450
  ot((a) => Ht(e, t(), a, n), s);
@@ -6448,13 +6455,13 @@ function Mc(e, t, n, s, a = {}, i = !1) {
6448
6455
  if (!(l in t)) {
6449
6456
  if (l === "children")
6450
6457
  continue;
6451
- a[l] = Hs(e, l, null, a[l], n, i, t);
6458
+ a[l] = Ks(e, l, null, a[l], n, i, t);
6452
6459
  }
6453
6460
  for (const l in t) {
6454
6461
  if (l === "children")
6455
6462
  continue;
6456
6463
  const o = t[l];
6457
- a[l] = Hs(e, l, o, a[l], n, i, t);
6464
+ a[l] = Ks(e, l, o, a[l], n, i, t);
6458
6465
  }
6459
6466
  }
6460
6467
  function Fc(e) {
@@ -6467,17 +6474,17 @@ function ht(e) {
6467
6474
  function qc(e) {
6468
6475
  return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
6469
6476
  }
6470
- function qs(e, t, n) {
6477
+ function Hs(e, t, n) {
6471
6478
  const s = t.trim().split(/\s+/);
6472
6479
  for (let a = 0, i = s.length; a < i; a++)
6473
6480
  e.classList.toggle(s[a], n);
6474
6481
  }
6475
- function Hs(e, t, n, s, a, i, l) {
6482
+ function Ks(e, t, n, s, a, i, l) {
6476
6483
  let o, c, h, g, d;
6477
6484
  if (t === "style")
6478
- return Uc(e, n, s);
6479
- if (t === "classList")
6480
6485
  return Rc(e, n, s);
6486
+ if (t === "classList")
6487
+ return Uc(e, n, s);
6481
6488
  if (n === s)
6482
6489
  return s;
6483
6490
  if (t === "ref")
@@ -6496,7 +6503,7 @@ function Hs(e, t, n, s, a, i, l) {
6496
6503
  }
6497
6504
  (y || n) && (Gc(e, w, n, y), y && Ic([w]));
6498
6505
  } else if (t.slice(0, 5) === "attr:")
6499
- Xn(e, t.slice(5), n);
6506
+ Zn(e, t.slice(5), n);
6500
6507
  else if (t.slice(0, 5) === "bool:")
6501
6508
  Lc(e, t.slice(5), n);
6502
6509
  else if ((d = t.slice(0, 5) === "prop:") || (h = Sc.has(t)) || !a && ((g = xc(t, e.tagName)) || (c = wc.has(t))) || (o = e.nodeName.includes("-") || "is" in l)) {
@@ -6507,7 +6514,7 @@ function Hs(e, t, n, s, a, i, l) {
6507
6514
  t === "class" || t === "className" ? Dc(e, n) : o && !c && !h ? e[qc(t)] = n : e[g || t] = n;
6508
6515
  } else {
6509
6516
  const w = a && t.indexOf(":") > -1 && Pc[t.split(":")[0]];
6510
- w ? kc(e, w, t, n) : Xn(e, Nc[t] || t, n);
6517
+ w ? kc(e, w, t, n) : Zn(e, Nc[t] || t, n);
6511
6518
  }
6512
6519
  return n;
6513
6520
  }
@@ -6588,7 +6595,7 @@ function Ht(e, t, n, s, a) {
6588
6595
  }), () => n;
6589
6596
  if (Array.isArray(t)) {
6590
6597
  const c = [], h = n && Array.isArray(n);
6591
- if (Jn(c, t, n, a))
6598
+ if (es(c, t, n, a))
6592
6599
  return ot(() => n = Ht(e, c, n, s, !0)), () => n;
6593
6600
  if (i) {
6594
6601
  if (!c.length)
@@ -6606,7 +6613,7 @@ function Ht(e, t, n, s, a) {
6606
6613
  if (c.length === 0) {
6607
6614
  if (n = mt(e, n, s), o)
6608
6615
  return n;
6609
- } else h ? n.length === 0 ? Ks(e, c, s) : _c(e, n, c) : (n && mt(e), Ks(e, c));
6616
+ } else h ? n.length === 0 ? Vs(e, c, s) : _c(e, n, c) : (n && mt(e), Vs(e, c));
6610
6617
  n = c;
6611
6618
  } else if (t.nodeType) {
6612
6619
  if (i && t.parentNode)
@@ -6621,7 +6628,7 @@ function Ht(e, t, n, s, a) {
6621
6628
  }
6622
6629
  return n;
6623
6630
  }
6624
- function Jn(e, t, n, s) {
6631
+ function es(e, t, n, s) {
6625
6632
  let a = !1;
6626
6633
  for (let i = 0, l = t.length; i < l; i++) {
6627
6634
  let o = t[i], c = n && n[e.length], h;
@@ -6629,12 +6636,12 @@ function Jn(e, t, n, s) {
6629
6636
  if ((h = typeof o) == "object" && o.nodeType)
6630
6637
  e.push(o);
6631
6638
  else if (Array.isArray(o))
6632
- a = Jn(e, o, c) || a;
6639
+ a = es(e, o, c) || a;
6633
6640
  else if (h === "function")
6634
6641
  if (s) {
6635
6642
  for (; typeof o == "function"; )
6636
6643
  o = o();
6637
- a = Jn(
6644
+ a = es(
6638
6645
  e,
6639
6646
  Array.isArray(o) ? o : [o],
6640
6647
  Array.isArray(c) ? c : [c]
@@ -6648,7 +6655,7 @@ function Jn(e, t, n, s) {
6648
6655
  }
6649
6656
  return a;
6650
6657
  }
6651
- function Ks(e, t, n = null) {
6658
+ function Vs(e, t, n = null) {
6652
6659
  for (let s = 0, a = t.length; s < a; s++)
6653
6660
  e.insertBefore(t[s], n);
6654
6661
  }
@@ -6677,16 +6684,16 @@ var Kc = "http://www.w3.org/2000/svg";
6677
6684
  function ca(e, t = !1) {
6678
6685
  return t ? document.createElementNS(Kc, e) : document.createElement(e);
6679
6686
  }
6680
- function ad(e) {
6681
- const { useShadow: t } = e, n = document.createTextNode(""), s = () => e.mount || document.body, a = Fs();
6687
+ function id(e) {
6688
+ const { useShadow: t } = e, n = document.createTextNode(""), s = () => e.mount || document.body, a = qs();
6682
6689
  let i, l = !!O.context;
6683
6690
  return Xr(
6684
6691
  () => {
6685
- l && (Fs().user = l = !1), i || (i = lc(a, () => Ge(() => e.children)));
6692
+ l && (qs().user = l = !1), i || (i = lc(a, () => Ge(() => e.children)));
6686
6693
  const o = s();
6687
6694
  if (o instanceof HTMLHeadElement) {
6688
6695
  const [c, h] = ve(!1), g = () => h(!0);
6689
- lt((d) => Zn(o, () => c() ? d() : i(), null)), Ft(g);
6696
+ lt((d) => Jn(o, () => c() ? d() : i(), null)), Ft(g);
6690
6697
  } else {
6691
6698
  const c = ca(e.isSVG ? "g" : "div", e.isSVG), h = t && c.attachShadow ? c.attachShadow({
6692
6699
  mode: "open"
@@ -6696,7 +6703,7 @@ function ad(e) {
6696
6703
  return n.parentNode;
6697
6704
  },
6698
6705
  configurable: !0
6699
- }), Zn(h, i), o.appendChild(c), e.ref && e.ref(c), Ft(() => o.removeChild(c));
6706
+ }), Jn(h, i), o.appendChild(c), e.ref && e.ref(c), Ft(() => o.removeChild(c));
6700
6707
  }
6701
6708
  },
6702
6709
  void 0,
@@ -6705,7 +6712,7 @@ function ad(e) {
6705
6712
  }
6706
6713
  ), n;
6707
6714
  }
6708
- function id(e) {
6715
+ function ld(e) {
6709
6716
  const [t, n] = vc(e, ["component"]), s = Ge(() => t.component);
6710
6717
  return Ge(() => {
6711
6718
  const a = s();
@@ -6783,10 +6790,10 @@ function zc(e, t) {
6783
6790
  function kt(e, t) {
6784
6791
  Object.entries(e).forEach(([n, s]) => t(s, n));
6785
6792
  }
6786
- function An(e, t) {
6793
+ function xn(e, t) {
6787
6794
  return e.indexOf(t) !== -1;
6788
6795
  }
6789
- function Vs(e, t) {
6796
+ function js(e, t) {
6790
6797
  for (let n = 0; n < e.length; n++) {
6791
6798
  const s = e[n];
6792
6799
  if (t(s))
@@ -6806,7 +6813,7 @@ var Wc = class {
6806
6813
  findByName(e) {
6807
6814
  return this.transfomers[e];
6808
6815
  }
6809
- }, Yc = (e) => Object.prototype.toString.call(e).slice(8, -1), da = (e) => typeof e > "u", Qc = (e) => e === null, Kt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, es = (e) => Kt(e) && Object.keys(e).length === 0, nt = (e) => Array.isArray(e), Xc = (e) => typeof e == "string", Zc = (e) => typeof e == "number" && !isNaN(e), Jc = (e) => typeof e == "boolean", eu = (e) => e instanceof RegExp, Vt = (e) => e instanceof Map, jt = (e) => e instanceof Set, ha = (e) => Yc(e) === "Symbol", tu = (e) => e instanceof Date && !isNaN(e.valueOf()), nu = (e) => e instanceof Error, js = (e) => typeof e == "number" && isNaN(e), su = (e) => Jc(e) || Qc(e) || da(e) || Zc(e) || Xc(e) || ha(e), ru = (e) => typeof e == "bigint", au = (e) => e === 1 / 0 || e === -1 / 0, iu = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), lu = (e) => e instanceof URL, ma = (e) => e.replace(/\./g, "\\."), jn = (e) => e.map(String).map(ma).join("."), Bt = (e) => {
6816
+ }, Yc = (e) => Object.prototype.toString.call(e).slice(8, -1), da = (e) => typeof e > "u", Qc = (e) => e === null, Kt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, ts = (e) => Kt(e) && Object.keys(e).length === 0, nt = (e) => Array.isArray(e), Xc = (e) => typeof e == "string", Zc = (e) => typeof e == "number" && !isNaN(e), Jc = (e) => typeof e == "boolean", eu = (e) => e instanceof RegExp, Vt = (e) => e instanceof Map, jt = (e) => e instanceof Set, ha = (e) => Yc(e) === "Symbol", tu = (e) => e instanceof Date && !isNaN(e.valueOf()), nu = (e) => e instanceof Error, $s = (e) => typeof e == "number" && isNaN(e), su = (e) => Jc(e) || Qc(e) || da(e) || Zc(e) || Xc(e) || ha(e), ru = (e) => typeof e == "bigint", au = (e) => e === 1 / 0 || e === -1 / 0, iu = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), lu = (e) => e instanceof URL, ma = (e) => e.replace(/\./g, "\\."), $n = (e) => e.map(String).map(ma).join("."), Bt = (e) => {
6810
6817
  const t = [];
6811
6818
  let n = "";
6812
6819
  for (let a = 0; a < e.length; a++) {
@@ -6864,11 +6871,11 @@ var fa = [
6864
6871
  (e) => new Set(e)
6865
6872
  ),
6866
6873
  ze(Vt, "map", (e) => [...e.entries()], (e) => new Map(e)),
6867
- ze((e) => js(e) || au(e), "number", (e) => js(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
6874
+ ze((e) => $s(e) || au(e), "number", (e) => $s(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
6868
6875
  ze((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
6869
6876
  ze(lu, "URL", (e) => e.toString(), (e) => new URL(e))
6870
6877
  ];
6871
- function Bn(e, t, n, s) {
6878
+ function Mn(e, t, n, s) {
6872
6879
  return {
6873
6880
  isApplicable: e,
6874
6881
  annotation: t,
@@ -6876,7 +6883,7 @@ function Bn(e, t, n, s) {
6876
6883
  untransform: s
6877
6884
  };
6878
6885
  }
6879
- var ga = Bn((e, t) => ha(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
6886
+ var ga = Mn((e, t) => ha(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
6880
6887
  const s = n.symbolRegistry.getValue(t[1]);
6881
6888
  if (!s)
6882
6889
  throw new Error("Trying to deserialize unknown symbol");
@@ -6891,7 +6898,7 @@ var ga = Bn((e, t) => ha(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
6891
6898
  Float32Array,
6892
6899
  Float64Array,
6893
6900
  Uint8ClampedArray
6894
- ].reduce((e, t) => (e[t.name] = t, e), {}), pa = Bn(iu, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
6901
+ ].reduce((e, t) => (e[t.name] = t, e), {}), pa = Mn(iu, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
6895
6902
  const n = ou[t[1]];
6896
6903
  if (!n)
6897
6904
  throw new Error("Trying to deserialize unknown typed array");
@@ -6900,7 +6907,7 @@ var ga = Bn((e, t) => ha(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
6900
6907
  function ya(e, t) {
6901
6908
  return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
6902
6909
  }
6903
- var va = Bn(ya, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
6910
+ var va = Mn(ya, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
6904
6911
  const n = t.classRegistry.getAllowedProps(e.constructor);
6905
6912
  if (!n)
6906
6913
  return { ...e };
@@ -6913,19 +6920,19 @@ var va = Bn(ya, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
6913
6920
  if (!s)
6914
6921
  throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");
6915
6922
  return Object.assign(Object.create(s.prototype), e);
6916
- }), Ea = Bn((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
6923
+ }), Ea = Mn((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
6917
6924
  const s = n.customTransformerRegistry.findByName(t[1]);
6918
6925
  if (!s)
6919
6926
  throw new Error("Trying to deserialize unknown custom value");
6920
6927
  return s.deserialize(e);
6921
- }), cu = [va, ga, Ea, pa], $s = (e, t) => {
6922
- const n = Vs(cu, (a) => a.isApplicable(e, t));
6928
+ }), cu = [va, ga, Ea, pa], zs = (e, t) => {
6929
+ const n = js(cu, (a) => a.isApplicable(e, t));
6923
6930
  if (n)
6924
6931
  return {
6925
6932
  value: n.transform(e, t),
6926
6933
  type: n.annotation(e, t)
6927
6934
  };
6928
- const s = Vs(fa, (a) => a.isApplicable(e, t));
6935
+ const s = js(fa, (a) => a.isApplicable(e, t));
6929
6936
  if (s)
6930
6937
  return {
6931
6938
  value: s.transform(e, t),
@@ -6962,11 +6969,11 @@ var uu = (e, t, n) => {
6962
6969
  return n.next().value;
6963
6970
  };
6964
6971
  function wa(e) {
6965
- if (An(e, "__proto__"))
6972
+ if (xn(e, "__proto__"))
6966
6973
  throw new Error("__proto__ is not allowed as a property");
6967
- if (An(e, "prototype"))
6974
+ if (xn(e, "prototype"))
6968
6975
  throw new Error("prototype is not allowed as a property");
6969
- if (An(e, "constructor"))
6976
+ if (xn(e, "constructor"))
6970
6977
  throw new Error("constructor is not allowed as a property");
6971
6978
  }
6972
6979
  var du = (e, t) => {
@@ -6989,7 +6996,7 @@ var du = (e, t) => {
6989
6996
  e = e[s];
6990
6997
  }
6991
6998
  return e;
6992
- }, ts = (e, t, n) => {
6999
+ }, ns = (e, t, n) => {
6993
7000
  if (wa(t), t.length === 0)
6994
7001
  return n(e);
6995
7002
  let s = e;
@@ -7038,34 +7045,34 @@ var du = (e, t) => {
7038
7045
  }
7039
7046
  return e;
7040
7047
  };
7041
- function ns(e, t, n = []) {
7048
+ function ss(e, t, n = []) {
7042
7049
  if (!e)
7043
7050
  return;
7044
7051
  if (!nt(e)) {
7045
- kt(e, (i, l) => ns(i, t, [...n, ...Bt(l)]));
7052
+ kt(e, (i, l) => ss(i, t, [...n, ...Bt(l)]));
7046
7053
  return;
7047
7054
  }
7048
7055
  const [s, a] = e;
7049
7056
  a && kt(a, (i, l) => {
7050
- ns(i, t, [...n, ...Bt(l)]);
7057
+ ss(i, t, [...n, ...Bt(l)]);
7051
7058
  }), t(s, n);
7052
7059
  }
7053
7060
  function hu(e, t, n) {
7054
- return ns(t, (s, a) => {
7055
- e = ts(e, a, (i) => uu(i, s, n));
7061
+ return ss(t, (s, a) => {
7062
+ e = ns(e, a, (i) => uu(i, s, n));
7056
7063
  }), e;
7057
7064
  }
7058
7065
  function mu(e, t) {
7059
7066
  function n(s, a) {
7060
7067
  const i = du(e, Bt(a));
7061
7068
  s.map(Bt).forEach((l) => {
7062
- e = ts(e, l, () => i);
7069
+ e = ns(e, l, () => i);
7063
7070
  });
7064
7071
  }
7065
7072
  if (nt(t)) {
7066
7073
  const [s, a] = t;
7067
7074
  s.forEach((i) => {
7068
- e = ts(e, Bt(i), () => e);
7075
+ e = ns(e, Bt(i), () => e);
7069
7076
  }), a && kt(a, n);
7070
7077
  } else
7071
7078
  kt(t, n);
@@ -7084,8 +7091,8 @@ function pu(e, t) {
7084
7091
  return;
7085
7092
  t || (a = a.map((o) => o.map(String)).sort((o, c) => o.length - c.length));
7086
7093
  const [i, ...l] = a;
7087
- i.length === 0 ? s = l.map(jn) : n[jn(i)] = l.map(jn);
7088
- }), s ? es(n) ? [s] : [s, n] : es(n) ? void 0 : n;
7094
+ i.length === 0 ? s = l.map($n) : n[$n(i)] = l.map($n);
7095
+ }), s ? ts(n) ? [s] : [s, n] : ts(n) ? void 0 : n;
7089
7096
  }
7090
7097
  var Sa = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7091
7098
  const o = su(e);
@@ -7098,7 +7105,7 @@ var Sa = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7098
7105
  } : y;
7099
7106
  }
7100
7107
  if (!fu(e, n)) {
7101
- const y = $s(e, n), p = y ? {
7108
+ const y = zs(e, n), p = y ? {
7102
7109
  transformedValue: y.value,
7103
7110
  annotations: [y.type]
7104
7111
  } : {
@@ -7106,11 +7113,11 @@ var Sa = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7106
7113
  };
7107
7114
  return o || l.set(e, p), p;
7108
7115
  }
7109
- if (An(i, e))
7116
+ if (xn(i, e))
7110
7117
  return {
7111
7118
  transformedValue: null
7112
7119
  };
7113
- const c = $s(e, n), h = (c == null ? void 0 : c.value) ?? e, g = nt(h) ? [] : {}, d = {};
7120
+ const c = zs(e, n), h = (c == null ? void 0 : c.value) ?? e, g = nt(h) ? [] : {}, d = {};
7114
7121
  kt(h, (y, p) => {
7115
7122
  if (p === "__proto__" || p === "constructor" || p === "prototype")
7116
7123
  throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
@@ -7119,7 +7126,7 @@ var Sa = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7119
7126
  d[ma(p) + "." + x] = v;
7120
7127
  });
7121
7128
  });
7122
- const w = es(d) ? {
7129
+ const w = ts(d) ? {
7123
7130
  transformedValue: g,
7124
7131
  annotations: c ? [c.type] : void 0
7125
7132
  } : {
@@ -7131,7 +7138,7 @@ var Sa = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7131
7138
  function Na(e) {
7132
7139
  return Object.prototype.toString.call(e).slice(8, -1);
7133
7140
  }
7134
- function zs(e) {
7141
+ function Ws(e) {
7135
7142
  return Na(e) === "Array";
7136
7143
  }
7137
7144
  function yu(e) {
@@ -7149,16 +7156,16 @@ function vu(e, t, n, s, a) {
7149
7156
  configurable: !0
7150
7157
  });
7151
7158
  }
7152
- function ss(e, t = {}) {
7153
- if (zs(e))
7154
- return e.map((a) => ss(a, t));
7159
+ function rs(e, t = {}) {
7160
+ if (Ws(e))
7161
+ return e.map((a) => rs(a, t));
7155
7162
  if (!yu(e))
7156
7163
  return e;
7157
7164
  const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
7158
7165
  return [...n, ...s].reduce((a, i) => {
7159
- if (zs(t.props) && !t.props.includes(i))
7166
+ if (Ws(t.props) && !t.props.includes(i))
7160
7167
  return a;
7161
- const l = e[i], o = ss(l, t);
7168
+ const l = e[i], o = rs(l, t);
7162
7169
  return vu(a, i, o, e, t.nonenumerable), a;
7163
7170
  }, {});
7164
7171
  }
@@ -7185,7 +7192,7 @@ var ae = class {
7185
7192
  }
7186
7193
  deserialize(e) {
7187
7194
  const { json: t, meta: n } = e;
7188
- let s = ss(t);
7195
+ let s = rs(t);
7189
7196
  return n != null && n.values && (s = hu(s, n.values, this)), n != null && n.referentialEqualities && (s = mu(s, n.referentialEqualities)), s;
7190
7197
  }
7191
7198
  stringify(e) {
@@ -7219,42 +7226,42 @@ ae.registerClass = ae.defaultInstance.registerClass.bind(ae.defaultInstance);
7219
7226
  ae.registerSymbol = ae.defaultInstance.registerSymbol.bind(ae.defaultInstance);
7220
7227
  ae.registerCustom = ae.defaultInstance.registerCustom.bind(ae.defaultInstance);
7221
7228
  ae.allowErrorProps = ae.defaultInstance.allowErrorProps.bind(ae.defaultInstance);
7222
- var Eu = ae.serialize, ld = ae.stringify;
7223
- function od(e) {
7229
+ var Eu = ae.serialize, od = ae.stringify;
7230
+ function cd(e) {
7224
7231
  return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
7225
7232
  }
7226
- function cd(e, t) {
7233
+ function ud(e, t) {
7227
7234
  return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
7228
7235
  }
7229
- function ud({
7236
+ function dd({
7230
7237
  queryState: e,
7231
7238
  observerCount: t,
7232
7239
  isStale: n
7233
7240
  }) {
7234
7241
  return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
7235
7242
  }
7236
- function dd({
7243
+ function hd({
7237
7244
  status: e,
7238
7245
  isPaused: t
7239
7246
  }) {
7240
7247
  return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
7241
7248
  }
7242
- function hd(e) {
7249
+ function md(e) {
7243
7250
  return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
7244
7251
  }
7245
- var md = (e, t = !1) => {
7252
+ var fd = (e, t = !1) => {
7246
7253
  const {
7247
7254
  json: n
7248
7255
  } = Eu(e);
7249
7256
  return JSON.stringify(n, null, t ? 2 : void 0);
7250
- }, En = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, bu = (e, t) => e.queryHash.localeCompare(t.queryHash), Aa = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, wu = (e, t) => En(e) === En(t) ? Aa(e, t) : En(e) > En(t) ? 1 : -1, fd = {
7257
+ }, En = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, bu = (e, t) => e.queryHash.localeCompare(t.queryHash), Aa = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, wu = (e, t) => En(e) === En(t) ? Aa(e, t) : En(e) > En(t) ? 1 : -1, gd = {
7251
7258
  status: wu,
7252
7259
  "query hash": bu,
7253
7260
  "last updated": Aa
7254
- }, bn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, xa = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Su = (e, t) => bn(e) === bn(t) ? xa(e, t) : bn(e) > bn(t) ? 1 : -1, gd = {
7261
+ }, bn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, xa = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Su = (e, t) => bn(e) === bn(t) ? xa(e, t) : bn(e) > bn(t) ? 1 : -1, pd = {
7255
7262
  status: Su,
7256
7263
  "last updated": xa
7257
- }, pd = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), yd = () => {
7264
+ }, yd = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), vd = () => {
7258
7265
  const [e, t] = ve("dark");
7259
7266
  return ic(() => {
7260
7267
  const n = window.matchMedia("(prefers-color-scheme: dark)");
@@ -7329,7 +7336,7 @@ var md = (e, t = !1) => {
7329
7336
  return;
7330
7337
  const s = document.createElement("style"), a = document.createTextNode("");
7331
7338
  s.appendChild(a), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
7332
- }, gt, $t, zt, Wt, at, Yt, pt, yt, vt, Et, bt, wt, Qt, Ws, Nu = (Ws = class {
7339
+ }, gt, $t, zt, Wt, at, Yt, pt, yt, vt, Et, bt, wt, Qt, Ys, Nu = (Ys = class {
7333
7340
  constructor(e) {
7334
7341
  se(this, gt);
7335
7342
  se(this, $t);
@@ -7359,38 +7366,38 @@ var md = (e, t = !1) => {
7359
7366
  ee(this, gt, ve(t)), ee(this, zt, n), ee(this, Wt, s), ee(this, $t, a), ee(this, Yt, h), ee(this, pt, g), ee(this, yt, ve(i)), ee(this, vt, ve(l)), ee(this, Et, ve(o)), ee(this, bt, ve(c));
7360
7367
  }
7361
7368
  setButtonPosition(e) {
7362
- U(this, yt)[1](e);
7369
+ R(this, yt)[1](e);
7363
7370
  }
7364
7371
  setPosition(e) {
7365
- U(this, vt)[1](e);
7372
+ R(this, vt)[1](e);
7366
7373
  }
7367
7374
  setInitialIsOpen(e) {
7368
- U(this, Et)[1](e);
7375
+ R(this, Et)[1](e);
7369
7376
  }
7370
7377
  setErrorTypes(e) {
7371
- U(this, bt)[1](e);
7378
+ R(this, bt)[1](e);
7372
7379
  }
7373
7380
  setClient(e) {
7374
- U(this, gt)[1](e);
7381
+ R(this, gt)[1](e);
7375
7382
  }
7376
7383
  mount(e) {
7377
- if (U(this, at))
7384
+ if (R(this, at))
7378
7385
  throw new Error("Devtools is already mounted");
7379
7386
  const t = la(() => {
7380
- const n = this, [s] = U(this, yt), [a] = U(this, vt), [i] = U(this, Et), [l] = U(this, bt), [o] = U(this, gt);
7387
+ const n = this, [s] = R(this, yt), [a] = R(this, vt), [i] = R(this, Et), [l] = R(this, bt), [o] = R(this, gt);
7381
7388
  let c;
7382
- return U(this, wt) ? c = U(this, wt) : (c = aa(() => import("./HO4MOOFI-Ckm2pyGV.js")), ee(this, wt, c)), Ta(U(this, Yt), U(this, pt)), sa(c, ra({
7389
+ return R(this, wt) ? c = R(this, wt) : (c = aa(() => import("./HO4MOOFI-B0re9LoG.js")), ee(this, wt, c)), Ta(R(this, Yt), R(this, pt)), sa(c, ra({
7383
7390
  get queryFlavor() {
7384
- return U(n, zt);
7391
+ return R(n, zt);
7385
7392
  },
7386
7393
  get version() {
7387
- return U(n, Wt);
7394
+ return R(n, Wt);
7388
7395
  },
7389
7396
  get onlineManager() {
7390
- return U(n, $t);
7397
+ return R(n, $t);
7391
7398
  },
7392
7399
  get shadowDOMTarget() {
7393
- return U(n, pt);
7400
+ return R(n, pt);
7394
7401
  }
7395
7402
  }, {
7396
7403
  get client() {
@@ -7414,11 +7421,11 @@ var md = (e, t = !1) => {
7414
7421
  }
7415
7422
  unmount() {
7416
7423
  var e;
7417
- if (!U(this, at))
7424
+ if (!R(this, at))
7418
7425
  throw new Error("Devtools is not mounted");
7419
- (e = U(this, Qt)) == null || e.call(this), ee(this, at, !1);
7426
+ (e = R(this, Qt)) == null || e.call(this), ee(this, at, !1);
7420
7427
  }
7421
- }, gt = new WeakMap(), $t = new WeakMap(), zt = new WeakMap(), Wt = new WeakMap(), at = new WeakMap(), Yt = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), vt = new WeakMap(), Et = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), Qt = new WeakMap(), Ws), St, Xt, Zt, Jt, it, en, Nt, At, xt, Tt, Ct, Pt, _t, tn, Ys, Au = (Ys = class {
7428
+ }, gt = new WeakMap(), $t = new WeakMap(), zt = new WeakMap(), Wt = new WeakMap(), at = new WeakMap(), Yt = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), vt = new WeakMap(), Et = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), Qt = new WeakMap(), Ys), St, Xt, Zt, Jt, it, en, Nt, At, xt, Tt, Ct, Pt, _t, tn, Qs, Au = (Qs = class {
7422
7429
  constructor(e) {
7423
7430
  se(this, St);
7424
7431
  se(this, Xt);
@@ -7450,41 +7457,41 @@ var md = (e, t = !1) => {
7450
7457
  ee(this, St, ve(t)), ee(this, Zt, n), ee(this, Jt, s), ee(this, Xt, a), ee(this, en, h), ee(this, Nt, g), ee(this, At, ve(i)), ee(this, xt, ve(l)), ee(this, Tt, ve(o)), ee(this, Ct, ve(c)), ee(this, Pt, ve(d));
7451
7458
  }
7452
7459
  setButtonPosition(e) {
7453
- U(this, At)[1](e);
7460
+ R(this, At)[1](e);
7454
7461
  }
7455
7462
  setPosition(e) {
7456
- U(this, xt)[1](e);
7463
+ R(this, xt)[1](e);
7457
7464
  }
7458
7465
  setInitialIsOpen(e) {
7459
- U(this, Tt)[1](e);
7466
+ R(this, Tt)[1](e);
7460
7467
  }
7461
7468
  setErrorTypes(e) {
7462
- U(this, Ct)[1](e);
7469
+ R(this, Ct)[1](e);
7463
7470
  }
7464
7471
  setClient(e) {
7465
- U(this, St)[1](e);
7472
+ R(this, St)[1](e);
7466
7473
  }
7467
7474
  setOnClose(e) {
7468
- U(this, Pt)[1](() => e);
7475
+ R(this, Pt)[1](() => e);
7469
7476
  }
7470
7477
  mount(e) {
7471
- if (U(this, it))
7478
+ if (R(this, it))
7472
7479
  throw new Error("Devtools is already mounted");
7473
7480
  const t = la(() => {
7474
- const n = this, [s] = U(this, At), [a] = U(this, xt), [i] = U(this, Tt), [l] = U(this, Ct), [o] = U(this, St), [c] = U(this, Pt);
7481
+ const n = this, [s] = R(this, At), [a] = R(this, xt), [i] = R(this, Tt), [l] = R(this, Ct), [o] = R(this, St), [c] = R(this, Pt);
7475
7482
  let h;
7476
- return U(this, _t) ? h = U(this, _t) : (h = aa(() => import("./HUY7CZI3-BDpIMk8f.js")), ee(this, _t, h)), Ta(U(this, en), U(this, Nt)), sa(h, ra({
7483
+ return R(this, _t) ? h = R(this, _t) : (h = aa(() => import("./HUY7CZI3-Bhnn9mlN.js")), ee(this, _t, h)), Ta(R(this, en), R(this, Nt)), sa(h, ra({
7477
7484
  get queryFlavor() {
7478
- return U(n, Zt);
7485
+ return R(n, Zt);
7479
7486
  },
7480
7487
  get version() {
7481
- return U(n, Jt);
7488
+ return R(n, Jt);
7482
7489
  },
7483
7490
  get onlineManager() {
7484
- return U(n, Xt);
7491
+ return R(n, Xt);
7485
7492
  },
7486
7493
  get shadowDOMTarget() {
7487
- return U(n, Nt);
7494
+ return R(n, Nt);
7488
7495
  }
7489
7496
  }, {
7490
7497
  get client() {
@@ -7511,11 +7518,11 @@ var md = (e, t = !1) => {
7511
7518
  }
7512
7519
  unmount() {
7513
7520
  var e;
7514
- if (!U(this, it))
7521
+ if (!R(this, it))
7515
7522
  throw new Error("Devtools is not mounted");
7516
- (e = U(this, tn)) == null || e.call(this), ee(this, it, !1);
7523
+ (e = R(this, tn)) == null || e.call(this), ee(this, it, !1);
7517
7524
  }
7518
- }, St = new WeakMap(), Xt = new WeakMap(), Zt = new WeakMap(), Jt = new WeakMap(), it = new WeakMap(), en = new WeakMap(), Nt = new WeakMap(), At = new WeakMap(), xt = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Pt = new WeakMap(), _t = new WeakMap(), tn = new WeakMap(), Ys);
7525
+ }, St = new WeakMap(), Xt = new WeakMap(), Zt = new WeakMap(), Jt = new WeakMap(), it = new WeakMap(), en = new WeakMap(), Nt = new WeakMap(), At = new WeakMap(), xt = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Pt = new WeakMap(), _t = new WeakMap(), tn = new WeakMap(), Qs);
7519
7526
  function xu(e) {
7520
7527
  const t = Se(e.client), n = ce.useRef(null), {
7521
7528
  buttonPosition: s,
@@ -7590,26 +7597,29 @@ var Cu = process.env.NODE_ENV !== "development" ? function() {
7590
7597
  return null;
7591
7598
  } : xu;
7592
7599
  process.env.NODE_ENV;
7593
- ll();
7594
- Qo();
7595
- ii(Go);
7596
- li(Rl);
7597
- oi(ec);
7598
- $n("user-info", Jo);
7599
- const Pu = (e) => {
7600
- const t = ct([]), [n] = Re(), s = n.get("page"), a = n.get("lang"), { data: i } = Ue(), {
7600
+ const Pu = Wa(
7601
+ () => import("./digital-asset-manager-BZ6Gatq3.js")
7602
+ );
7603
+ ol();
7604
+ Xo();
7605
+ li(Uo);
7606
+ oi(Pu);
7607
+ ci(Rl);
7608
+ zn("user-info", ec);
7609
+ const _u = (e) => {
7610
+ const t = ct([]), [n] = Ue(), s = n.get("page"), a = n.get("lang"), { data: i } = Re(), {
7601
7611
  data: l = {
7602
7612
  role: "",
7603
7613
  permissions: null
7604
7614
  }
7605
- } = Mo(), { data: o } = Bo(), { data: c, isFetching: h } = Br(), { blocks: g } = Oo(c), { data: d } = un(), { data: w } = Ie(), { mutateAsync: y } = Rr(), p = Ro(), { getUILibraryBlock: S, getUILibraryBlocks: v, onSave: x } = Fo(), { getPartialBlocks: G, getPartialBlockBlocks: E } = qo(), { aiContext: b, setAiContext: T } = vs(), { mutateAsync: R } = Bl(), [J, ie] = P(!1), k = Y(
7615
+ } = Fo(), { data: o } = Mo(), { data: c, isFetching: h } = Br(), { blocks: g } = Bo(c), { data: d } = un(), { data: w } = Ie(), { mutateAsync: y } = Ur(), p = Ro(), { getUILibraryBlock: S, getUILibraryBlocks: v, onSave: x } = qo(), { getPartialBlocks: G, getPartialBlockBlocks: E } = Ho(), { aiContext: b, setAiContext: T } = Es(), { mutateAsync: U } = Ml(), [J, ie] = P(!1), k = Y(
7606
7616
  () => (d == null ? void 0 : d.fallbackLang) || "en",
7607
7617
  [d]
7608
7618
  ), { data: q } = Mr({
7609
7619
  pageType: i == null ? void 0 : i.pageType,
7610
7620
  lang: a || k
7611
7621
  });
7612
- bl(), we(() => {
7622
+ wl(), we(() => {
7613
7623
  const z = () => {
7614
7624
  document.hidden ? ie(!0) : ie(!1);
7615
7625
  };
@@ -7619,8 +7629,8 @@ const Pu = (e) => {
7619
7629
  const z = {};
7620
7630
  return l && (z.permissions = te(l, "permissions", null), z.role = te(l, "role", "user")), z;
7621
7631
  }, [l]), M = Y(() => o, [o]), ne = _e(
7622
- async (z, de) => await R({ pageType: z, query: de }),
7623
- [R]
7632
+ async (z, de) => await U({ pageType: z, query: de }),
7633
+ [U]
7624
7634
  ), he = Y(
7625
7635
  () => te(d, "theme", {}) || {},
7626
7636
  [d]
@@ -7628,7 +7638,7 @@ const Pu = (e) => {
7628
7638
  return /* @__PURE__ */ u(be, { children: [
7629
7639
  h && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-50 flex items-center justify-center w-screen h-screen bg-white/30", children: /* @__PURE__ */ r("div", { className: "flex items-center justify-center bg-white rounded-full size-10", children: /* @__PURE__ */ r(Dr, { className: "size-5 animate-spin" }) }) }),
7630
7640
  /* @__PURE__ */ r(
7631
- ci,
7641
+ ui,
7632
7642
  {
7633
7643
  pageExternalData: q,
7634
7644
  themePresets: e.themePresets ?? [],
@@ -7656,7 +7666,7 @@ const Pu = (e) => {
7656
7666
  if (!s) return !0;
7657
7667
  const de = t.current, F = {
7658
7668
  _type: "@chai/ai-context",
7659
- _value: ks(z) ? z : ""
7669
+ _value: Ls(z) ? z : ""
7660
7670
  }, Ee = [...de, F];
7661
7671
  return await x({ page: s, blocks: Ee }), T(z), !0;
7662
7672
  },
@@ -7667,28 +7677,28 @@ const Pu = (e) => {
7667
7677
  t.current = z;
7668
7678
  const F = {
7669
7679
  _type: "@chai/ai-context",
7670
- _value: ks(b) ? b : ""
7680
+ _value: Ls(b) ? b : ""
7671
7681
  }, Ee = [...z, F];
7672
- return await x({ page: s, blocks: Ee }), t.current = Ee, rs(de, he) || await y({ settings: { theme: de } }), !0;
7682
+ return await x({ page: s, blocks: Ee }), t.current = Ee, as(de, he) || await y({ settings: { theme: de } }), !0;
7673
7683
  },
7674
- themePanelComponent: zl,
7684
+ themePanelComponent: Wl,
7675
7685
  ...A
7676
7686
  }
7677
7687
  ),
7678
7688
  /* @__PURE__ */ u("div", { children: [
7679
- /* @__PURE__ */ r(Al, {}),
7680
- /* @__PURE__ */ r(xl, {})
7689
+ /* @__PURE__ */ r(xl, {}),
7690
+ /* @__PURE__ */ r(Tl, {})
7681
7691
  ] })
7682
7692
  ] });
7683
- }, _u = new Wa({
7693
+ }, Iu = new Ya({
7684
7694
  defaultOptions: {
7685
7695
  queries: {
7686
7696
  refetchOnWindowFocus: !1,
7687
7697
  refetchOnReconnect: !1
7688
7698
  }
7689
7699
  }
7690
- }), vd = (e) => {
7691
- const { isLoggedIn: t } = st(), [, n] = Ur(), [s, a] = P(!1);
7700
+ }), Ed = (e) => {
7701
+ const { isLoggedIn: t } = st(), [, n] = Rr(), [s, a] = P(!1);
7692
7702
  return we(() => (n(
7693
7703
  Js(e, [
7694
7704
  "apiUrl",
@@ -7704,73 +7714,75 @@ const Pu = (e) => {
7704
7714
  a(!0);
7705
7715
  }, 200), () => {
7706
7716
  a(!1), n({});
7707
- }), [e, n]), s ? /* @__PURE__ */ u(Ya, { client: _u, children: [
7708
- t ? /* @__PURE__ */ r(Pu, { ...e }) : /* @__PURE__ */ r(Ko, {}),
7717
+ }), [e, n]), s ? /* @__PURE__ */ u(Qa, { client: Iu, children: [
7718
+ t ? /* @__PURE__ */ r(_u, { ...e }) : /* @__PURE__ */ r(Vo, {}),
7709
7719
  /* @__PURE__ */ r(Cu, {})
7710
7720
  ] }) : /* @__PURE__ */ r("div", {});
7711
- }, Ed = (e) => {
7721
+ }, bd = (e) => {
7712
7722
  };
7713
7723
  if (typeof window > "u")
7714
7724
  throw new Error("@chaibuilder/pages is not available on the server");
7715
7725
  export {
7716
7726
  Wr as $,
7717
- md as A,
7718
- ju as B,
7719
- rd as C,
7720
- id as D,
7727
+ fd as A,
7728
+ $u as B,
7729
+ ad as C,
7730
+ ld as D,
7721
7731
  Ce as E,
7722
- Zu as F,
7732
+ Ju as F,
7723
7733
  sc as G,
7724
7734
  Eu as H,
7725
- Ju as I,
7735
+ ed as I,
7726
7736
  wn as J,
7727
- pd as K,
7728
- cd as L,
7729
- od as M,
7737
+ yd as K,
7738
+ ud as L,
7739
+ cd as M,
7730
7740
  lt as N,
7731
7741
  Gc as O,
7732
- ad as P,
7733
- ld as Q,
7734
- nd as R,
7735
- ed as S,
7736
- td as T,
7742
+ id as P,
7743
+ od as Q,
7744
+ sd as R,
7745
+ td as S,
7746
+ nd as T,
7737
7747
  Sn as U,
7738
- Wu as V,
7739
- vd as W,
7740
- Oe as X,
7741
- Ed as Y,
7742
- Ue as Z,
7743
- cn as _,
7748
+ Yu as V,
7749
+ Q as W,
7750
+ $ as X,
7751
+ I as Y,
7752
+ Ed as Z,
7753
+ Oe as _,
7744
7754
  sa as a,
7745
- Rn as a0,
7746
- un as a1,
7747
- Mo as a2,
7748
- $ as a3,
7749
- Vu as a4,
7750
- dn as a5,
7755
+ bd as a0,
7756
+ Re as a1,
7757
+ cn as a2,
7758
+ Rn as a3,
7759
+ un as a4,
7760
+ Fo as a5,
7761
+ ju as a6,
7762
+ dn as a7,
7751
7763
  ve as b,
7752
7764
  Ge as c,
7753
7765
  Ic as d,
7754
7766
  Xr as e,
7755
7767
  ra as f,
7756
- yd as g,
7768
+ vd as g,
7757
7769
  vc as h,
7758
- Yu as i,
7770
+ Qu as i,
7759
7771
  ot as j,
7760
- Xn as k,
7761
- Xu as l,
7762
- gd as m,
7772
+ Zn as k,
7773
+ Zu as l,
7774
+ pd as m,
7763
7775
  Ft as n,
7764
- $u as o,
7776
+ zu as o,
7765
7777
  ic as p,
7766
7778
  Bc as q,
7767
- Zn as r,
7768
- fd as s,
7769
- sd as t,
7770
- Qu as u,
7779
+ Jn as r,
7780
+ gd as s,
7781
+ rd as t,
7782
+ Xu as u,
7771
7783
  Dc as v,
7772
- ud as w,
7773
- dd as x,
7784
+ dd as w,
7785
+ hd as x,
7774
7786
  Oc as y,
7775
- hd as z
7787
+ md as z
7776
7788
  };