@chaibuilder/pages 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{B4MFY5CR-KtEUBopS.cjs → B4MFY5CR-C_tIU-5i.cjs} +1 -1
- package/dist/{B4MFY5CR-CiovF75K.js → B4MFY5CR-OQMcHHbC.js} +1 -1
- package/dist/{HO4MOOFI-CuXikmPc.js → HO4MOOFI-B57lmoVb.js} +2 -2
- package/dist/{HO4MOOFI-DJNgUjg_.cjs → HO4MOOFI-BLD8poGG.cjs} +1 -1
- package/dist/{HUY7CZI3-Di-nGfZT.js → HUY7CZI3-BFWR5pdP.js} +2 -2
- package/dist/{HUY7CZI3-1KbTmr8N.cjs → HUY7CZI3-DDbL4XOO.cjs} +1 -1
- package/dist/{index-CbOxTkR_.cjs → index-CQJULAun.cjs} +3 -3
- package/dist/{index-BNA2NDaf.js → index-QjskSLMj.js} +222 -213
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -6,18 +6,18 @@ var Ol = (e, t, n) => t in e ? Rl(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
6
6
|
var Tt = (e, t, n) => Ol(e, typeof t != "symbol" ? t + "" : t, n), sr = (e, t, n) => t.has(e) || nr("Cannot " + n);
|
|
7
7
|
var te = (e, t, n) => (sr(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Ee = (e, t, n) => t.has(e) ? nr("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), xe = (e, t, n, a) => (sr(e, t, "write to private field"), a ? a.call(e, n) : t.set(e, n), n);
|
|
8
8
|
import { jsx as s, jsxs as c, Fragment as ie } from "react/jsx-runtime";
|
|
9
|
-
import { has as Le, get as j, isEmpty as Z, reverse as Gl, sortBy as Ul, each as Bl, find as ye, keyBy as Oa, map as qe, groupBy as Lr, minBy as Ml, set as kt, filter as pe, startsWith as
|
|
9
|
+
import { has as Le, get as j, isEmpty as Z, reverse as Gl, sortBy as Ul, each as Bl, find as ye, keyBy as Oa, map as qe, groupBy as Lr, minBy as Ml, set as kt, filter as pe, startsWith as Ts, startCase as zt, isObject as ar, pick as os, initial as Fl, includes as bt, uniq as pa, union as ql, flatMap as ya, compact as Bs, uniqBy as $l, mapValues as jl, toLower as Bt, endsWith as Dr, orderBy as vs, first as Rr, concat as zl, debounce as Vl, upperCase as rr, keys as Kl, pickBy as Wl, isArray as Hl, isEqual as Ga, values as Ql, noop as Yl, isFunction as Jl, merge as Xl, cloneDeep as Zl, isString as ir } from "lodash-es";
|
|
10
10
|
import * as ke from "react";
|
|
11
11
|
import Ms, { useCallback as ae, useMemo as Q, useState as E, useEffect as ce, useRef as tt, Suspense as Ua, lazy as eo } from "react";
|
|
12
|
-
import { useAtom as Be, atom as
|
|
12
|
+
import { useAtom as Be, atom as yt } from "jotai";
|
|
13
13
|
import { useMutation as Pe, useQueryClient as _e, useQuery as De, onlineManager as Or, QueryClient as to, QueryClientProvider as no } from "@tanstack/react-query";
|
|
14
14
|
import { toast as Y } from "sonner";
|
|
15
|
-
import { useLanguages as Me, useSavePage as Ht, useUpdateBlocksPropsRealtime as Gr, PERMISSIONS as so, usePartailBlocksStore as ao, usePermissions as An, useLibraryBlocks as ro, useTheme as io, useSidebarActivePanel as Fs, useChaiFeatureFlag as Lt, mergeClasses as Fn, useRightPanel as lo, registerChaiLibrary as oo, getBlocksFromHTML as co, useBuilderProp as uo, useTranslation as ho, registerChaiSidebarPanel as
|
|
16
|
-
import { Tooltip as Xe, TooltipTrigger as Ze, TooltipContent as et, Card as qs, CardHeader as $s, CardTitle as js, CardContent as zs, CardFooter as Vs, Button as S, Skeleton as Mt, AlertDialog as Ur, AlertDialogTrigger as Br, AlertDialogContent as Mr, AlertDialogHeader as Fr, AlertDialogTitle as qr, AlertDialogDescription as $r, AlertDialogFooter as jr, AlertDialogCancel as zr, AlertDialogAction as Vr, Popover as vn, PopoverTrigger as bn, PopoverContent as xn, Input as Ne, Label as he, Dialog as We, DialogContent as He, DialogHeader as Qe, DialogTitle as Ye, DialogDescription as at, Alert as Tn, DialogFooter as
|
|
15
|
+
import { useLanguages as Me, useSavePage as Ht, useUpdateBlocksPropsRealtime as Gr, PERMISSIONS as so, usePartailBlocksStore as ao, usePermissions as An, useLibraryBlocks as ro, useTheme as io, useSidebarActivePanel as Fs, useChaiFeatureFlag as Lt, mergeClasses as Fn, useRightPanel as lo, registerChaiLibrary as oo, getBlocksFromHTML as co, useBuilderProp as uo, useTranslation as ho, registerChaiSidebarPanel as bs, registerChaiFeatureFlag as Rn, registerChaiTopBar as mo, registerChaiMediaManager as fo, registerChaiSaveToLibrary as go, ChaiBuilderEditor as po } from "@chaibuilder/sdk";
|
|
16
|
+
import { Tooltip as Xe, TooltipTrigger as Ze, TooltipContent as et, Card as qs, CardHeader as $s, CardTitle as js, CardContent as zs, CardFooter as Vs, Button as S, Skeleton as Mt, AlertDialog as Ur, AlertDialogTrigger as Br, AlertDialogContent as Mr, AlertDialogHeader as Fr, AlertDialogTitle as qr, AlertDialogDescription as $r, AlertDialogFooter as jr, AlertDialogCancel as zr, AlertDialogAction as Vr, Popover as vn, PopoverTrigger as bn, PopoverContent as xn, Input as Ne, Label as he, Dialog as We, DialogContent as He, DialogHeader as Qe, DialogTitle as Ye, DialogDescription as at, Alert as Tn, DialogFooter as dt, CommandList as Kr, Command as qn, CommandEmpty as $n, CommandGroup as Ct, CommandItem as mt, Textarea as Nn, DropdownMenu as Cn, DropdownMenuTrigger as kn, DropdownMenuContent as Pn, DropdownMenuItem as Fe, Select as Wr, SelectTrigger as Hr, SelectValue as yo, SelectContent as Qr, SelectItem as tn, Badge as ca, TooltipProvider as Ft, Separator as vo, Sheet as Yr, SheetContent as Jr, SheetHeader as Xr, SheetTitle as Zr, SheetDescription as bo, SheetTrigger as xo, ScrollArea as No, DropdownMenuSeparator as wo, CardDescription as Eo, CommandInput as So, Tabs as ei, TabsList as ti, TabsTrigger as Ps, TabsContent as _s, AlertDescription as ni, HoverCard as Ao, HoverCardTrigger as To, HoverCardContent as Co, Switch as ko } from "@chaibuilder/sdk/ui";
|
|
17
17
|
import { formatDistanceToNow as si, format as Ks } from "date-fns";
|
|
18
|
-
import { LockIcon as ai, LockKeyhole as Po, UserIcon as _o, Info as Io, KeyIcon as Lo, AlertTriangleIcon as Do, Loader as xt, TableIcon as Ro, CheckCircle as ri, Target as Oo, Edit as jn, Check as
|
|
18
|
+
import { LockIcon as ai, LockKeyhole as Po, UserIcon as _o, Info as Io, KeyIcon as Lo, AlertTriangleIcon as Do, Loader as xt, TableIcon as Ro, CheckCircle as ri, Target as Oo, Edit as jn, Check as ft, X as wn, Trash2 as Ws, Plus as cs, ImageIcon as zn, AlertCircle as Hs, ChevronDown as Pt, Search as Nt, Tag as Go, File as Qt, CopyPlusIcon as Uo, Pencil as ii, Power as li, Trash as Ba, SquareLibrary as lr, ChevronsUpDown as oi, ChevronsDownUp as ci, ChevronRight as Ma, StarsIcon as di, Globe as Fa, MoreHorizontal as En, Star as ui, FilterXIcon as Bo, Filter as Mo, ListFilter as Fo, RefreshCw as qo, NotepadText as $o, Lock as hi, Languages as or, LogsIcon as jo, Folder as zo, History as Vo, Eye as Qs, ExternalLink as va, Undo2 as mi, CloudOff as Ko, Rocket as ba, Save as fi, GlobeIcon as Wo, Palette as Ho, Send as cr, Settings as gi, EyeOff as Qo, Loader2 as pi, StarIcon as Yo, PencilIcon as Jo, TrashIcon as Xo, LanguagesIcon as Zo, DatabaseIcon as ec, ChevronLeft as yi, Sparkle as tc, Code as nc, AlertTriangle as vi, User as sc, Copy as bi, Link as ac, Archive as rc, Film as ic, Upload as lc } from "lucide-react";
|
|
19
19
|
import { useRegisteredChaiBlocks as oc, getDefaultBlockProps as cc } from "@chaibuilder/runtime";
|
|
20
|
-
import { z as
|
|
20
|
+
import { z as Cs } from "zod";
|
|
21
21
|
import { useDropzone as dc } from "react-dropzone";
|
|
22
22
|
import { loadWebBlocks as uc } from "@chaibuilder/sdk/web-blocks";
|
|
23
23
|
const Ge = {
|
|
@@ -399,7 +399,7 @@ if (import.meta.vitest) {
|
|
|
399
399
|
}
|
|
400
400
|
let Zt = null;
|
|
401
401
|
function xc() {
|
|
402
|
-
const { user: e, setUser: t, logout: n } = lt(), a = Js(), r =
|
|
402
|
+
const { user: e, setUser: t, logout: n } = lt(), a = Js(), r = ut("getAccessToken", !1), i = async () => {
|
|
403
403
|
if (r === !1 && e && !(!Le(e, "expiresAt") || !Le(e, "accessToken") || !Le(e, "refreshToken")))
|
|
404
404
|
try {
|
|
405
405
|
const l = await Ys(a, {
|
|
@@ -440,7 +440,7 @@ function Nc() {
|
|
|
440
440
|
return Zt;
|
|
441
441
|
}
|
|
442
442
|
const wi = () => {
|
|
443
|
-
const { user: e, isSessionExpired: t } = lt(), { mutateAsync: n } = xc(), r =
|
|
443
|
+
const { user: e, isSessionExpired: t } = lt(), { mutateAsync: n } = xc(), r = ut("getAccessToken", async () => {
|
|
444
444
|
if (!(!Le(e, "expiresAt") || !Le(e, "accessToken") || !Le(e, "refreshToken"))) {
|
|
445
445
|
if (t) {
|
|
446
446
|
const i = Nc();
|
|
@@ -551,15 +551,15 @@ function je() {
|
|
|
551
551
|
};
|
|
552
552
|
}, []), [e, t];
|
|
553
553
|
}
|
|
554
|
-
const Ec =
|
|
554
|
+
const Ec = yt({}), Ai = () => Be(Ec), Sc = () => {
|
|
555
555
|
const [e] = je(), t = e.get("page"), n = tt(""), { mutate: a } = Ei();
|
|
556
556
|
ce(() => {
|
|
557
557
|
!Z(n.current) && t !== n.current && a({ id: n.current }), n.current = t;
|
|
558
558
|
}, [t, a, n]);
|
|
559
|
-
},
|
|
559
|
+
}, ut = (e, t) => {
|
|
560
560
|
const [n] = Ai();
|
|
561
561
|
return Q(() => j(n, e, t), [n, e, t]);
|
|
562
|
-
}, de = () =>
|
|
562
|
+
}, de = () => ut("apiUrl", "/chai/api"), Js = () => ut("usersApiUrl", "/chai/users"), ds = () => ut("assetsApiUrl", "/chai/assets"), Ac = () => ut("supabaseInstance", null), gt = (e) => {
|
|
563
563
|
const t = de(), [n] = je(), a = e ?? n.get("page"), r = ee();
|
|
564
564
|
return De({
|
|
565
565
|
queryKey: [R.GET_LANGUAGE_PAGES, a],
|
|
@@ -589,7 +589,7 @@ const Ec = pt({}), Ai = () => Be(Ec), Sc = () => {
|
|
|
589
589
|
})
|
|
590
590
|
});
|
|
591
591
|
}, Ti = (e) => {
|
|
592
|
-
const { fallbackLang: t } = Me(), { data: n } = wt(), { data: a, isFetching: r } =
|
|
592
|
+
const { fallbackLang: t } = Me(), { data: n } = wt(), { data: a, isFetching: r } = gt(), i = Q(() => {
|
|
593
593
|
const l = { [t]: !0 };
|
|
594
594
|
return Bl(j(n, "languages"), (o) => {
|
|
595
595
|
const d = ye(a, { lang: o });
|
|
@@ -610,7 +610,7 @@ const Ec = pt({}), Ai = () => Be(Ec), Sc = () => {
|
|
|
610
610
|
},
|
|
611
611
|
[e]
|
|
612
612
|
), aiContext: t };
|
|
613
|
-
}, Tc =
|
|
613
|
+
}, Tc = yt(
|
|
614
614
|
null
|
|
615
615
|
), Ci = () => Be(Tc), $a = () => {
|
|
616
616
|
const [e] = Ci();
|
|
@@ -683,13 +683,13 @@ const kc = ({ query: e, uuid: t }) => {
|
|
|
683
683
|
},
|
|
684
684
|
placeholderData: (r) => r || {}
|
|
685
685
|
});
|
|
686
|
-
}, _c =
|
|
686
|
+
}, _c = yt({ lastSaved: void 0 }), Xs = () => Be(_c), ze = () => {
|
|
687
687
|
const [e] = je(), t = e.get("page"), [n] = Pi(), { data: a, isFetching: r } = _n();
|
|
688
688
|
return { data: Q(() => ({ ...ye(a, { id: t }) || {}, metadata: n }), [a, t, n]), isFetching: r };
|
|
689
689
|
}, Rt = () => {
|
|
690
|
-
const [e] = je(), t = e.get("lang") ?? "", { data: n, isFetching: a } =
|
|
690
|
+
const [e] = je(), t = e.get("lang") ?? "", { data: n, isFetching: a } = gt();
|
|
691
691
|
return { data: Q(() => ye(n, { lang: t }) || {}, [n, t]), isFetching: a };
|
|
692
|
-
}, Ic =
|
|
692
|
+
}, Ic = yt({}), Pi = () => Be(Ic), _i = () => {
|
|
693
693
|
const { data: e } = Rt(), t = $a(), n = e == null ? void 0 : e.slug, a = n ? window.location.origin + (n.endsWith("/") ? n.slice(0, -1) : n) : window.location.origin;
|
|
694
694
|
return t ? a + t : a;
|
|
695
695
|
};
|
|
@@ -813,13 +813,13 @@ const Ot = (e) => {
|
|
|
813
813
|
},
|
|
814
814
|
enabled: !Z(e)
|
|
815
815
|
});
|
|
816
|
-
}, Dc =
|
|
816
|
+
}, Dc = yt(void 0), Rc = yt({
|
|
817
817
|
status: "checking",
|
|
818
818
|
requestedBy: "",
|
|
819
819
|
isTakeOverRequested: !1,
|
|
820
820
|
requestingClientId: "",
|
|
821
821
|
isActiveInOtherTab: !1
|
|
822
|
-
}), Oc =
|
|
822
|
+
}), Oc = yt(""), Gc = yt(null), ja = yt({}), Ii = () => Be(ja), Et = () => {
|
|
823
823
|
const [e] = je(), t = e.get("page"), { user: n } = lt(), [a, r] = Be(Dc), [i, l] = Be(Rc), [o, d] = Be(Gc), [u, h] = Be(Oc), [m] = Be(ja);
|
|
824
824
|
return Q(() => ({
|
|
825
825
|
pageLock: i,
|
|
@@ -1130,7 +1130,7 @@ function Fc({
|
|
|
1130
1130
|
] }) })
|
|
1131
1131
|
] }) });
|
|
1132
1132
|
}
|
|
1133
|
-
const
|
|
1133
|
+
const xs = ({
|
|
1134
1134
|
isChecking: e,
|
|
1135
1135
|
lockingStatus: t,
|
|
1136
1136
|
onContinue: n
|
|
@@ -1186,7 +1186,7 @@ const bs = ({
|
|
|
1186
1186
|
/* @__PURE__ */ s(jn, { className: "h-5 w-5" }),
|
|
1187
1187
|
" Continue to edit"
|
|
1188
1188
|
] }) : /* @__PURE__ */ c(ie, { children: [
|
|
1189
|
-
/* @__PURE__ */ s(
|
|
1189
|
+
/* @__PURE__ */ s(ft, { className: "h-5 w-5" }),
|
|
1190
1190
|
" Accept"
|
|
1191
1191
|
] })
|
|
1192
1192
|
}
|
|
@@ -1201,10 +1201,10 @@ const bs = ({
|
|
|
1201
1201
|
const { pageLock: e, requestTakeOver: t } = Li(), { isLocked: n, currentEditor: a, lockingStatus: r, setLockingStatus: i, realtimePageLockEnabled: l } = Et(), { data: o, isFetching: d } = Ot(a), [u] = je(), h = u.get("page"), { mutate: m } = Ei(), { isFetching: g } = Di(), [p] = Xs(), v = _e(), f = ae(() => {
|
|
1202
1202
|
l ? t() : m({ id: h });
|
|
1203
1203
|
}, [h, m, t, l]);
|
|
1204
|
-
return h ? l && (e == null ? void 0 : e.status) === "checking" ? /* @__PURE__ */ s(
|
|
1205
|
-
} }) : l && (e != null && e.requestedBy) ? /* @__PURE__ */ s(
|
|
1204
|
+
return h ? l && (e == null ? void 0 : e.status) === "checking" ? /* @__PURE__ */ s(xs, { isChecking: !0, lockingStatus: "", onContinue: () => {
|
|
1205
|
+
} }) : l && (e != null && e.requestedBy) ? /* @__PURE__ */ s(xs, { lockingStatus: "", onContinue: () => {
|
|
1206
1206
|
} }) : (l ? e.status !== "locked" : !n || g) ? r === "take_over_request_accepted" || r === "can_edit_now" ? /* @__PURE__ */ s(
|
|
1207
|
-
|
|
1207
|
+
xs,
|
|
1208
1208
|
{
|
|
1209
1209
|
lockingStatus: r,
|
|
1210
1210
|
onContinue: () => {
|
|
@@ -1213,7 +1213,7 @@ const bs = ({
|
|
|
1213
1213
|
}), i("");
|
|
1214
1214
|
}
|
|
1215
1215
|
}
|
|
1216
|
-
) : null : l && (e != null && e.isActiveInOtherTab) ? /* @__PURE__ */ s(
|
|
1216
|
+
) : null : l && (e != null && e.isActiveInOtherTab) ? /* @__PURE__ */ s(xs, { lockingStatus: "page_is_active_in_other_tab", onContinue: t }) : /* @__PURE__ */ s(
|
|
1217
1217
|
Fc,
|
|
1218
1218
|
{
|
|
1219
1219
|
...o,
|
|
@@ -1554,7 +1554,7 @@ const bs = ({
|
|
|
1554
1554
|
size: "icon",
|
|
1555
1555
|
variant: "outline",
|
|
1556
1556
|
onClick: () => a(!0),
|
|
1557
|
-
children: /* @__PURE__ */ s(
|
|
1557
|
+
children: /* @__PURE__ */ s(cs, { className: "h-4 w-4" })
|
|
1558
1558
|
}
|
|
1559
1559
|
)
|
|
1560
1560
|
] });
|
|
@@ -2356,16 +2356,16 @@ var Ka = {};
|
|
|
2356
2356
|
function X(w, y) {
|
|
2357
2357
|
var k = !w, U = !!x(y || {}, "resize"), T = !1, O = x(y, "disableForReducedMotion", Boolean), B = i && !!x(y || {}, "useWorker"), V = B ? g() : null, ne = k ? W : $, fe = w && V ? !!w.__confetti_initialized : !1, H = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion)").matches, re;
|
|
2358
2358
|
function ve(oe, Oe, Ke) {
|
|
2359
|
-
for (var G = x(oe, "particleCount", b), M = x(oe, "angle", Number), Te = x(oe, "spread", Number), st = x(oe, "startVelocity", Number), sa = x(oe, "decay", Number), aa = x(oe, "gravity", Number), ra = x(oe, "drift", Number),
|
|
2359
|
+
for (var G = x(oe, "particleCount", b), M = x(oe, "angle", Number), Te = x(oe, "spread", Number), st = x(oe, "startVelocity", Number), sa = x(oe, "decay", Number), aa = x(oe, "gravity", Number), ra = x(oe, "drift", Number), ms = x(oe, "colors", L), ia = x(oe, "ticks", Number), fs = x(oe, "shapes"), la = x(oe, "scalar"), oa = !!x(oe, "flat"), Dn = I(oe), Jt = G, At = [], gs = w.width * Dn.x, ps = w.height * Dn.y; Jt--; )
|
|
2360
2360
|
At.push(
|
|
2361
2361
|
F({
|
|
2362
|
-
x:
|
|
2363
|
-
y:
|
|
2362
|
+
x: gs,
|
|
2363
|
+
y: ps,
|
|
2364
2364
|
angle: M,
|
|
2365
2365
|
spread: Te,
|
|
2366
2366
|
startVelocity: st,
|
|
2367
|
-
color:
|
|
2368
|
-
shape:
|
|
2367
|
+
color: ms[Jt % ms.length],
|
|
2368
|
+
shape: fs[N(0, fs.length)],
|
|
2369
2369
|
ticks: ia,
|
|
2370
2370
|
decay: sa,
|
|
2371
2371
|
gravity: aa,
|
|
@@ -2520,7 +2520,7 @@ const ld = {
|
|
|
2520
2520
|
);
|
|
2521
2521
|
}, children: "Publish" })
|
|
2522
2522
|
] });
|
|
2523
|
-
},
|
|
2523
|
+
}, us = yt(null), dd = (e) => {
|
|
2524
2524
|
if (!e) return { base: e, extension: null };
|
|
2525
2525
|
const t = e.lastIndexOf(".");
|
|
2526
2526
|
if (t <= 0) return { base: e, extension: null };
|
|
@@ -2614,7 +2614,7 @@ const Ui = ({
|
|
|
2614
2614
|
disabled: e || !n.length,
|
|
2615
2615
|
onChange: (o) => {
|
|
2616
2616
|
const d = o.target.value;
|
|
2617
|
-
r(d), !e && (
|
|
2617
|
+
r(d), !e && (Ts(a, l == null ? void 0 : l.name) || a.length === 0) && i(`${l == null ? void 0 : l.name} - ${Ge[d]}`);
|
|
2618
2618
|
},
|
|
2619
2619
|
className: "col-span-3 flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
2620
2620
|
children: [
|
|
@@ -2700,7 +2700,7 @@ const Ui = ({
|
|
|
2700
2700
|
isPending: g
|
|
2701
2701
|
}) => {
|
|
2702
2702
|
const p = g || !t || !n || o.some((v) => (r ? v.id !== i : !0) && v.parent === (l == null ? void 0 : l.id) && v.lang === n) || !d && !(u && h) && (!m || !a);
|
|
2703
|
-
return /* @__PURE__ */ s(
|
|
2703
|
+
return /* @__PURE__ */ s(dt, { children: e ? /* @__PURE__ */ c(ie, { children: [
|
|
2704
2704
|
/* @__PURE__ */ s(S, { type: "submit", disabled: p && !l.dynamic, children: g ? /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
|
|
2705
2705
|
/* @__PURE__ */ s("span", { className: "loader mr-2" }),
|
|
2706
2706
|
r ? le.UPDATING : le.ADDING
|
|
@@ -2888,7 +2888,7 @@ const Ui = ({
|
|
|
2888
2888
|
edit: r = !1,
|
|
2889
2889
|
preselectedLang: i
|
|
2890
2890
|
}) => {
|
|
2891
|
-
const { data: l = [] } = _n(), o = Q(() => l.find((H) => H.id === a), [l, a]), [d, u] = E(""), [h, m] = E(""), [g, p] = E(""), [v, f] = E(!0), [x, b] = E(!0), { mutate: N, isPending: P } = Gi(), { mutate: L, isPending: C } = za(), I = P || C, { data: W, isFetching: $ } = wt(), J = Dt(), { data: _, isFetching: F } =
|
|
2891
|
+
const { data: l = [] } = _n(), o = Q(() => l.find((H) => H.id === a), [l, a]), [d, u] = E(""), [h, m] = E(""), [g, p] = E(""), [v, f] = E(!0), [x, b] = E(!0), { mutate: N, isPending: P } = Gi(), { mutate: L, isPending: C } = za(), I = P || C, { data: W, isFetching: $ } = wt(), J = Dt(), { data: _, isFetching: F } = gt(a), { data: K = [], isFetching: q } = gt(
|
|
2892
2892
|
o == null ? void 0 : o.parent
|
|
2893
2893
|
), { data: X = [], isFetching: D } = Ue(), { setSelectedLang: z } = Me(), [, me] = je(), [, Ie] = Fs(), ue = $ || F || q || D, w = Q(() => pe(W == null ? void 0 : W.languages, (H) => !ye(_, { lang: H })), [W, _]), y = Q(
|
|
2894
2894
|
() => X.find((H) => H.key === (o == null ? void 0 : o.pageType)),
|
|
@@ -3027,7 +3027,7 @@ function yd({
|
|
|
3027
3027
|
i && /* @__PURE__ */ s("div", { className: "text-red-500 text-xs mt-1", children: i })
|
|
3028
3028
|
] }) });
|
|
3029
3029
|
}
|
|
3030
|
-
const
|
|
3030
|
+
const Is = ({ children: e, onWheel: t, ...n }) => /* @__PURE__ */ s(Kr, { ...n, onWheel: (r) => {
|
|
3031
3031
|
try {
|
|
3032
3032
|
r.preventDefault();
|
|
3033
3033
|
const i = r.currentTarget;
|
|
@@ -3096,11 +3096,11 @@ function vd({
|
|
|
3096
3096
|
}
|
|
3097
3097
|
)
|
|
3098
3098
|
] }) }) }),
|
|
3099
|
-
/* @__PURE__ */ c(
|
|
3099
|
+
/* @__PURE__ */ c(Is, { className: "max-h-[300px] overflow-y-auto", children: [
|
|
3100
3100
|
/* @__PURE__ */ s($n, { children: "No pages found." }),
|
|
3101
3101
|
/* @__PURE__ */ c(Ct, { children: [
|
|
3102
3102
|
/* @__PURE__ */ c(
|
|
3103
|
-
|
|
3103
|
+
mt,
|
|
3104
3104
|
{
|
|
3105
3105
|
value: "none",
|
|
3106
3106
|
onSelect: () => {
|
|
@@ -3109,7 +3109,7 @@ function vd({
|
|
|
3109
3109
|
className: "flex cursor-pointer items-center justify-between",
|
|
3110
3110
|
children: [
|
|
3111
3111
|
/* @__PURE__ */ s("span", { children: "None" }),
|
|
3112
|
-
/* @__PURE__ */ s(
|
|
3112
|
+
/* @__PURE__ */ s(ft, { className: da("mr-2 h-4 w-4", t ? "opacity-0" : "opacity-100") })
|
|
3113
3113
|
]
|
|
3114
3114
|
}
|
|
3115
3115
|
),
|
|
@@ -3124,7 +3124,7 @@ function vd({
|
|
|
3124
3124
|
] })
|
|
3125
3125
|
] });
|
|
3126
3126
|
return /* @__PURE__ */ c(
|
|
3127
|
-
|
|
3127
|
+
mt,
|
|
3128
3128
|
{
|
|
3129
3129
|
value: b.id,
|
|
3130
3130
|
onSelect: () => {
|
|
@@ -3134,7 +3134,7 @@ function vd({
|
|
|
3134
3134
|
children: [
|
|
3135
3135
|
/* @__PURE__ */ s("span", { children: L }),
|
|
3136
3136
|
/* @__PURE__ */ s(
|
|
3137
|
-
|
|
3137
|
+
ft,
|
|
3138
3138
|
{
|
|
3139
3139
|
className: da(
|
|
3140
3140
|
"mr-2 h-4 w-4 shrink-0",
|
|
@@ -3225,10 +3225,10 @@ const bd = (...e) => e.filter(Boolean).join(" "), xd = ({
|
|
|
3225
3225
|
}
|
|
3226
3226
|
)
|
|
3227
3227
|
] }) }),
|
|
3228
|
-
/* @__PURE__ */ c(
|
|
3228
|
+
/* @__PURE__ */ c(Is, { className: "max-h-[300px] overflow-y-auto", children: [
|
|
3229
3229
|
/* @__PURE__ */ s($n, { children: "No templates found." }),
|
|
3230
3230
|
Object.entries(g).map(([f, x]) => /* @__PURE__ */ s(Ct, { heading: f, children: x.map((b) => /* @__PURE__ */ c(
|
|
3231
|
-
|
|
3231
|
+
mt,
|
|
3232
3232
|
{
|
|
3233
3233
|
value: b.id,
|
|
3234
3234
|
onSelect: () => {
|
|
@@ -3238,7 +3238,7 @@ const bd = (...e) => e.filter(Boolean).join(" "), xd = ({
|
|
|
3238
3238
|
children: [
|
|
3239
3239
|
zt(b.name),
|
|
3240
3240
|
/* @__PURE__ */ s(
|
|
3241
|
-
|
|
3241
|
+
ft,
|
|
3242
3242
|
{
|
|
3243
3243
|
className: bd(
|
|
3244
3244
|
"mr-2 h-4 w-4",
|
|
@@ -3368,7 +3368,7 @@ if (import.meta.vitest) {
|
|
|
3368
3368
|
}
|
|
3369
3369
|
const Gt = (...e) => e.filter(Boolean).join(" ");
|
|
3370
3370
|
function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel: a }) {
|
|
3371
|
-
var
|
|
3371
|
+
var gs, ps;
|
|
3372
3372
|
const r = Ha(), i = !!(e != null && e.id), { data: l } = _n(), { mutate: o, isPending: d } = Gi(), { mutate: u, isPending: h } = za(), [m, g] = E(null), [p, v] = E(!0), [f, x] = E((e == null ? void 0 : e.pageType) ?? "page"), { hasPermission: b } = An(), N = b(Ce.CHANGE_PAGE_TYPE), [P, L] = E(!1), [C, I] = E(""), { selectedLang: W, fallbackLang: $ } = Me(), J = W || $, [_, F] = E(""), [K, q] = E(!1), X = Q(() => {
|
|
3373
3373
|
const A = t.find((ge) => ge.key === f);
|
|
3374
3374
|
return (A == null ? void 0 : A.hasSlug) === !1;
|
|
@@ -3394,7 +3394,7 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3394
3394
|
k(y ? `${y}` : "");
|
|
3395
3395
|
}, ra = (A) => {
|
|
3396
3396
|
H(A);
|
|
3397
|
-
},
|
|
3397
|
+
}, ms = () => me.trim() ? ue && !Z(y) ? (g("Slug must be empty when using dynamic slug"), !1) : ue && !O ? (g("Dynamic slug is invalid"), !1) : !0 : (Y.error("Name is required"), !1), ia = () => {
|
|
3398
3398
|
const A = {
|
|
3399
3399
|
pageType: M == null ? void 0 : M.key,
|
|
3400
3400
|
name: me,
|
|
@@ -3413,11 +3413,11 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3413
3413
|
n(), r(ge.page.id, a);
|
|
3414
3414
|
}
|
|
3415
3415
|
});
|
|
3416
|
-
},
|
|
3416
|
+
}, fs = (A, ge) => {
|
|
3417
3417
|
if (!A.trim() && !ue)
|
|
3418
3418
|
return g("Child page slug is required"), !1;
|
|
3419
3419
|
const ot = _t(ge), Je = ur(ot, A);
|
|
3420
|
-
return Object.keys(Ge).some((
|
|
3420
|
+
return Object.keys(Ge).some((ys) => Je === `/${ys}` || (Je == null ? void 0 : Je.startsWith(`/${ys}/`))) ? (g("Slugs cannot start with a language code for primary page"), !1) : !0;
|
|
3421
3421
|
}, la = (A, ge) => {
|
|
3422
3422
|
const ot = _t(ge), Je = ur(ot, A), rt = {
|
|
3423
3423
|
pageType: f,
|
|
@@ -3432,20 +3432,21 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3432
3432
|
seo: {},
|
|
3433
3433
|
jsonLD: {}
|
|
3434
3434
|
};
|
|
3435
|
-
if (ue && (rt.dynamicSlugCustom = U), i)
|
|
3435
|
+
if (ue && (rt.dynamicSlugCustom = U), i) {
|
|
3436
|
+
const ct = os(rt, ["pageType", "parent", "name", "slug", "dynamic", "dynamicSlugCustom"]);
|
|
3436
3437
|
u(
|
|
3437
|
-
{ id: e == null ? void 0 : e.id, ...
|
|
3438
|
+
{ id: e == null ? void 0 : e.id, ...ct },
|
|
3438
3439
|
{
|
|
3439
3440
|
onSuccess: () => {
|
|
3440
3441
|
Y.success("Page updated successfully"), n();
|
|
3441
3442
|
}
|
|
3442
3443
|
}
|
|
3443
3444
|
);
|
|
3444
|
-
else {
|
|
3445
|
-
const
|
|
3446
|
-
|
|
3447
|
-
const { seo:
|
|
3448
|
-
kt(rt, "seo",
|
|
3445
|
+
} else {
|
|
3446
|
+
const ct = ye(t, { key: f });
|
|
3447
|
+
ct != null && ct.trackingDefault && (rt.tracking = ct.trackingDefault);
|
|
3448
|
+
const { seo: ys, jsonLD: Ll } = Vn(ct, J);
|
|
3449
|
+
kt(rt, "seo", ys), kt(rt, "jsonLD", Ll), o(rt, {
|
|
3449
3450
|
onSuccess: (Dl) => {
|
|
3450
3451
|
n(), r(Dl.page.id, a);
|
|
3451
3452
|
}
|
|
@@ -3475,20 +3476,20 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3475
3476
|
const { seo: ot, jsonLD: Je } = Vn(ge, J);
|
|
3476
3477
|
kt(A, "seo", ot), kt(A, "jsonLD", Je), o(A, {
|
|
3477
3478
|
onSuccess: (rt) => {
|
|
3478
|
-
var
|
|
3479
|
-
(
|
|
3479
|
+
var ct;
|
|
3480
|
+
(ct = rt == null ? void 0 : rt.page) != null && ct.id && r(rt.page.id, a), n();
|
|
3480
3481
|
}
|
|
3481
3482
|
});
|
|
3482
3483
|
}
|
|
3483
3484
|
}, Dn = (A) => {
|
|
3484
|
-
if (A.preventDefault(), g(null), !!
|
|
3485
|
+
if (A.preventDefault(), g(null), !!ms()) {
|
|
3485
3486
|
if (!(M != null && M.hasSlug)) {
|
|
3486
3487
|
ia();
|
|
3487
3488
|
return;
|
|
3488
3489
|
}
|
|
3489
3490
|
if (D && D !== "none") {
|
|
3490
3491
|
const ge = l == null ? void 0 : l.find((Je) => Je.id === D), ot = (ge == null ? void 0 : ge.slug) || "";
|
|
3491
|
-
if (!
|
|
3492
|
+
if (!fs(y, ot))
|
|
3492
3493
|
return;
|
|
3493
3494
|
la(y, ot);
|
|
3494
3495
|
} else
|
|
@@ -3534,10 +3535,10 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3534
3535
|
}
|
|
3535
3536
|
)
|
|
3536
3537
|
] }) }),
|
|
3537
|
-
/* @__PURE__ */ c(
|
|
3538
|
+
/* @__PURE__ */ c(Is, { className: "overflow-y-auto", children: [
|
|
3538
3539
|
/* @__PURE__ */ s($n, { children: "No page type found." }),
|
|
3539
3540
|
i ? X ? /* @__PURE__ */ s(Ct, { heading: "Partials", children: At.map((A) => /* @__PURE__ */ c(
|
|
3540
|
-
|
|
3541
|
+
mt,
|
|
3541
3542
|
{
|
|
3542
3543
|
value: A.key,
|
|
3543
3544
|
onSelect: () => Te(A.key),
|
|
@@ -3545,7 +3546,7 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3545
3546
|
children: [
|
|
3546
3547
|
A.name,
|
|
3547
3548
|
/* @__PURE__ */ s(
|
|
3548
|
-
|
|
3549
|
+
ft,
|
|
3549
3550
|
{
|
|
3550
3551
|
className: Gt("mr-2 h-4 w-4", f === A.key ? "opacity-100" : "opacity-0")
|
|
3551
3552
|
}
|
|
@@ -3554,7 +3555,7 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3554
3555
|
},
|
|
3555
3556
|
A.key
|
|
3556
3557
|
)) }) : /* @__PURE__ */ s(Ct, { heading: "Pages", children: Jt.map((A) => /* @__PURE__ */ c(
|
|
3557
|
-
|
|
3558
|
+
mt,
|
|
3558
3559
|
{
|
|
3559
3560
|
value: A.key,
|
|
3560
3561
|
onSelect: () => Te(A.key),
|
|
@@ -3562,7 +3563,7 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3562
3563
|
children: [
|
|
3563
3564
|
A.name,
|
|
3564
3565
|
/* @__PURE__ */ s(
|
|
3565
|
-
|
|
3566
|
+
ft,
|
|
3566
3567
|
{
|
|
3567
3568
|
className: Gt("mr-2 h-4 w-4", f === A.key ? "opacity-100" : "opacity-0")
|
|
3568
3569
|
}
|
|
@@ -3572,7 +3573,7 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3572
3573
|
A.key
|
|
3573
3574
|
)) }) : /* @__PURE__ */ c(ie, { children: [
|
|
3574
3575
|
Jt.length > 0 && /* @__PURE__ */ s(Ct, { heading: "Pages", children: Jt.map((A) => /* @__PURE__ */ c(
|
|
3575
|
-
|
|
3576
|
+
mt,
|
|
3576
3577
|
{
|
|
3577
3578
|
value: A.key,
|
|
3578
3579
|
onSelect: () => Te(A.key),
|
|
@@ -3580,7 +3581,7 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3580
3581
|
children: [
|
|
3581
3582
|
A.name,
|
|
3582
3583
|
/* @__PURE__ */ s(
|
|
3583
|
-
|
|
3584
|
+
ft,
|
|
3584
3585
|
{
|
|
3585
3586
|
className: Gt("mr-2 h-4 w-4", f === A.key ? "opacity-100" : "opacity-0")
|
|
3586
3587
|
}
|
|
@@ -3590,7 +3591,7 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3590
3591
|
A.key
|
|
3591
3592
|
)) }),
|
|
3592
3593
|
At.length > 0 && /* @__PURE__ */ s(Ct, { heading: "Partials", children: At.map((A) => /* @__PURE__ */ c(
|
|
3593
|
-
|
|
3594
|
+
mt,
|
|
3594
3595
|
{
|
|
3595
3596
|
value: A.key,
|
|
3596
3597
|
onSelect: () => Te(A.key),
|
|
@@ -3598,7 +3599,7 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3598
3599
|
children: [
|
|
3599
3600
|
A.name,
|
|
3600
3601
|
/* @__PURE__ */ s(
|
|
3601
|
-
|
|
3602
|
+
ft,
|
|
3602
3603
|
{
|
|
3603
3604
|
className: Gt("mr-2 h-4 w-4", f === A.key ? "opacity-100" : "opacity-0")
|
|
3604
3605
|
}
|
|
@@ -3644,7 +3645,15 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3644
3645
|
}
|
|
3645
3646
|
)
|
|
3646
3647
|
] }),
|
|
3647
|
-
/* @__PURE__ */ s(
|
|
3648
|
+
/* @__PURE__ */ s(
|
|
3649
|
+
vd,
|
|
3650
|
+
{
|
|
3651
|
+
pages: l,
|
|
3652
|
+
selectedParentId: D,
|
|
3653
|
+
onChange: aa,
|
|
3654
|
+
currentPage: e
|
|
3655
|
+
}
|
|
3656
|
+
),
|
|
3648
3657
|
/* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
|
|
3649
3658
|
/* @__PURE__ */ s(he, { htmlFor: "name", className: "text-sm", children: "Name" }),
|
|
3650
3659
|
/* @__PURE__ */ s(
|
|
@@ -3695,7 +3704,7 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3695
3704
|
k(A), i && A !== (((ge = e == null ? void 0 : e.slug) == null ? void 0 : ge.split("/").pop()) || "") ? ne(!!(Ke || G)) : ne(!1);
|
|
3696
3705
|
},
|
|
3697
3706
|
placeholder: D && D !== "none" ? "Enter page slug" : f === "page" ? "Leave empty for home page" : "Required - e.g. your-slug",
|
|
3698
|
-
parentSlug: D && D !== "none" ? (
|
|
3707
|
+
parentSlug: D && D !== "none" ? (ps = l == null ? void 0 : l.find((A) => A.id === D)) == null ? void 0 : ps.slug : void 0,
|
|
3699
3708
|
onValidationChange: v
|
|
3700
3709
|
}
|
|
3701
3710
|
),
|
|
@@ -3759,10 +3768,10 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3759
3768
|
}
|
|
3760
3769
|
)
|
|
3761
3770
|
] }) }),
|
|
3762
|
-
/* @__PURE__ */ c(
|
|
3771
|
+
/* @__PURE__ */ c(Is, { className: "max-h-[200px] overflow-y-auto", children: [
|
|
3763
3772
|
/* @__PURE__ */ s($n, { children: "No page type found." }),
|
|
3764
3773
|
/* @__PURE__ */ s(Ct, { heading: "Partials", children: At.map((A) => /* @__PURE__ */ c(
|
|
3765
|
-
|
|
3774
|
+
mt,
|
|
3766
3775
|
{
|
|
3767
3776
|
value: A.key,
|
|
3768
3777
|
onSelect: () => {
|
|
@@ -3771,7 +3780,7 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3771
3780
|
className: "flex cursor-pointer items-center justify-between",
|
|
3772
3781
|
children: [
|
|
3773
3782
|
A.name,
|
|
3774
|
-
/* @__PURE__ */ s(
|
|
3783
|
+
/* @__PURE__ */ s(ft, { className: Gt("mr-2 h-4 w-4", f === A.key ? "opacity-100" : "opacity-0") })
|
|
3775
3784
|
]
|
|
3776
3785
|
},
|
|
3777
3786
|
A.key
|
|
@@ -3796,7 +3805,7 @@ function Sd({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
|
|
|
3796
3805
|
/* @__PURE__ */ s(S, { variant: "default", size: "sm", onClick: st, children: "Confirm" })
|
|
3797
3806
|
] })
|
|
3798
3807
|
] }),
|
|
3799
|
-
/* @__PURE__ */ s("p", { className: "text-xs text-gray-500", children: (
|
|
3808
|
+
/* @__PURE__ */ s("p", { className: "text-xs text-gray-500", children: (gs = t.find((A) => A.key === f)) == null ? void 0 : gs.helpText })
|
|
3800
3809
|
] }),
|
|
3801
3810
|
/* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
|
|
3802
3811
|
/* @__PURE__ */ s(he, { htmlFor: "name", className: "text-sm", children: "Name" }),
|
|
@@ -3860,7 +3869,7 @@ function Zs({
|
|
|
3860
3869
|
] })
|
|
3861
3870
|
] })
|
|
3862
3871
|
] }),
|
|
3863
|
-
/* @__PURE__ */ c(
|
|
3872
|
+
/* @__PURE__ */ c(dt, { children: [
|
|
3864
3873
|
/* @__PURE__ */ s(S, { variant: "outline", onClick: t, children: "Cancel" }),
|
|
3865
3874
|
/* @__PURE__ */ s(
|
|
3866
3875
|
S,
|
|
@@ -4160,7 +4169,7 @@ const Ad = () => {
|
|
|
4160
4169
|
] })
|
|
4161
4170
|
] }),
|
|
4162
4171
|
/* @__PURE__ */ c(
|
|
4163
|
-
|
|
4172
|
+
dt,
|
|
4164
4173
|
{
|
|
4165
4174
|
className: n ? "opacity-75 pointer-events-none" : "",
|
|
4166
4175
|
children: [
|
|
@@ -4287,7 +4296,7 @@ const Ad = () => {
|
|
|
4287
4296
|
/* @__PURE__ */ s(at, { className: "py-4 text-slate-500 space-y-1 text-xs", children: "Are you sure you want to unmark this page as a template?" })
|
|
4288
4297
|
] }),
|
|
4289
4298
|
/* @__PURE__ */ c(
|
|
4290
|
-
|
|
4299
|
+
dt,
|
|
4291
4300
|
{
|
|
4292
4301
|
className: n ? "opacity-75 pointer-events-none" : "",
|
|
4293
4302
|
children: [
|
|
@@ -4315,7 +4324,7 @@ const Ad = () => {
|
|
|
4315
4324
|
}
|
|
4316
4325
|
)
|
|
4317
4326
|
] }) });
|
|
4318
|
-
},
|
|
4327
|
+
}, hs = ({
|
|
4319
4328
|
page: e,
|
|
4320
4329
|
onClose: t
|
|
4321
4330
|
}) => {
|
|
@@ -4332,7 +4341,7 @@ const Ad = () => {
|
|
|
4332
4341
|
"?"
|
|
4333
4342
|
] })
|
|
4334
4343
|
] }),
|
|
4335
|
-
/* @__PURE__ */ c(
|
|
4344
|
+
/* @__PURE__ */ c(dt, { children: [
|
|
4336
4345
|
/* @__PURE__ */ s(S, { variant: "outline", onClick: t, children: "Cancel" }),
|
|
4337
4346
|
/* @__PURE__ */ s(
|
|
4338
4347
|
S,
|
|
@@ -4422,7 +4431,7 @@ const Ad = () => {
|
|
|
4422
4431
|
expandAll: o,
|
|
4423
4432
|
collapseAll: d
|
|
4424
4433
|
};
|
|
4425
|
-
}, hr = (e, t) => !e || !Array.isArray(e) ? [] : Z(t) ? e :
|
|
4434
|
+
}, hr = (e, t) => !e || !Array.isArray(e) ? [] : Z(t) ? e : Bs(
|
|
4426
4435
|
pe(e, (n) => {
|
|
4427
4436
|
const a = Bt(t);
|
|
4428
4437
|
return bt(Bt((n == null ? void 0 : n.name) || ""), a) || bt(Bt((n == null ? void 0 : n.slug) || ""), a);
|
|
@@ -4467,7 +4476,7 @@ const Ad = () => {
|
|
|
4467
4476
|
})), $i = (e, t, n, a) => {
|
|
4468
4477
|
if (!e || !e.length) return [];
|
|
4469
4478
|
let r = e;
|
|
4470
|
-
if (n !== "all" && (r =
|
|
4479
|
+
if (n !== "all" && (r = Bs(pe(e, { pageType: n }))), Z(t))
|
|
4471
4480
|
r = hr(r, t);
|
|
4472
4481
|
else {
|
|
4473
4482
|
const h = hr(r, t), m = _d(e, h);
|
|
@@ -4727,7 +4736,7 @@ const Ad = () => {
|
|
|
4727
4736
|
});
|
|
4728
4737
|
},
|
|
4729
4738
|
children: [
|
|
4730
|
-
/* @__PURE__ */ s(
|
|
4739
|
+
/* @__PURE__ */ s(cs, { className: "h-4 w-4" }),
|
|
4731
4740
|
" Add New"
|
|
4732
4741
|
]
|
|
4733
4742
|
}
|
|
@@ -4742,7 +4751,7 @@ const Ad = () => {
|
|
|
4742
4751
|
}
|
|
4743
4752
|
),
|
|
4744
4753
|
d && /* @__PURE__ */ s(Zs, { page: d, onClose: () => u(null) }),
|
|
4745
|
-
m && /* @__PURE__ */ s(
|
|
4754
|
+
m && /* @__PURE__ */ s(hs, { page: m, onClose: () => g(null) }),
|
|
4746
4755
|
f && /* @__PURE__ */ s(Ja, { page: f, onClose: () => x(null) }),
|
|
4747
4756
|
b && /* @__PURE__ */ s(Za, { page: b, onClose: () => N(null) }),
|
|
4748
4757
|
n && /* @__PURE__ */ s(Ya, { page: n, onClose: () => a(null) })
|
|
@@ -4949,7 +4958,7 @@ const Ad = () => {
|
|
|
4949
4958
|
/* @__PURE__ */ s(Od, { search: t, setSearch: n }),
|
|
4950
4959
|
/* @__PURE__ */ s(Gd, { pages: e }),
|
|
4951
4960
|
/* @__PURE__ */ c(S, { variant: "default", onClick: r, className: "rounded px-3 font-normal", children: [
|
|
4952
|
-
/* @__PURE__ */ s(
|
|
4961
|
+
/* @__PURE__ */ s(cs, { strokeWidth: 2, className: "stroke-white stroke-[3]" }),
|
|
4953
4962
|
/* @__PURE__ */ s("span", { className: "font-normal text-white", children: "Add Page" })
|
|
4954
4963
|
] }),
|
|
4955
4964
|
!m && /* @__PURE__ */ s(mr, {})
|
|
@@ -5095,7 +5104,7 @@ const Bd = ({ page: e }) => {
|
|
|
5095
5104
|
},
|
|
5096
5105
|
className: "absolute left-1/2 top-1 flex -translate-x-1/2 items-center gap-x-1 rounded bg-blue-500 px-2 py-0.5 text-xs text-white opacity-0 duration-200 hover:bg-blue-700 group-hover:opacity-100",
|
|
5097
5106
|
children: [
|
|
5098
|
-
/* @__PURE__ */ s(
|
|
5107
|
+
/* @__PURE__ */ s(cs, { size: 12, className: "stroke-[3]" }),
|
|
5099
5108
|
" ",
|
|
5100
5109
|
/* @__PURE__ */ c("span", { className: "text-[10px]", children: [
|
|
5101
5110
|
"Add ",
|
|
@@ -5145,7 +5154,7 @@ const Bd = ({ page: e }) => {
|
|
|
5145
5154
|
)
|
|
5146
5155
|
] }, u.id)) });
|
|
5147
5156
|
}, $d = ({ close: e }) => {
|
|
5148
|
-
const { languages: t, setSelectedLang: n, selectedLang: a } = Me(), { data: r } = Ue(), { data: i, isFetching: l } = _n(), [o, d] = je(), { updateForSelectedPage: u, expandPagesOnSearch: h } = In(null), m = Dt(), g = o.get("page"), [p, v] = E(""), [f, x] = E(null), [b, N] = E(null), [P, L] = E(null), [C, I] = E(null), [W, $] = E(""), [J, _] = E(null), [F, K] = E(null), [q, X] = E(a || m), [D, z] = E(!1), [, me] = Be(
|
|
5157
|
+
const { languages: t, setSelectedLang: n, selectedLang: a } = Me(), { data: r } = Ue(), { data: i, isFetching: l } = _n(), [o, d] = je(), { updateForSelectedPage: u, expandPagesOnSearch: h } = In(null), m = Dt(), g = o.get("page"), [p, v] = E(""), [f, x] = E(null), [b, N] = E(null), [P, L] = E(null), [C, I] = E(null), [W, $] = E(""), [J, _] = E(null), [F, K] = E(null), [q, X] = E(a || m), [D, z] = E(!1), [, me] = Be(us), Ie = D && q !== m, { data: ue, isFetching: w } = Pc(q), y = ae(
|
|
5149
5158
|
(O) => {
|
|
5150
5159
|
var B;
|
|
5151
5160
|
return (B = ye(r, { key: O })) == null ? void 0 : B.hasSlug;
|
|
@@ -5256,13 +5265,13 @@ const Bd = ({ page: e }) => {
|
|
|
5256
5265
|
}
|
|
5257
5266
|
),
|
|
5258
5267
|
f && /* @__PURE__ */ s(Zs, { page: f, onClose: () => x(null) }),
|
|
5259
|
-
P && /* @__PURE__ */ s(
|
|
5268
|
+
P && /* @__PURE__ */ s(hs, { page: P, onClose: () => L(null) }),
|
|
5260
5269
|
C && /* @__PURE__ */ s(Ja, { page: C, onClose: () => I(null) }),
|
|
5261
5270
|
F && /* @__PURE__ */ s(Za, { page: F, onClose: () => K(null) }),
|
|
5262
5271
|
J && /* @__PURE__ */ s(Ya, { page: J, onClose: () => _(null) })
|
|
5263
5272
|
] });
|
|
5264
5273
|
}, jd = () => {
|
|
5265
|
-
const e =
|
|
5274
|
+
const e = ut("logo", null);
|
|
5266
5275
|
return e ? /* @__PURE__ */ s("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Ms.createElement(e, {}) }) : null;
|
|
5267
5276
|
}, zd = () => {
|
|
5268
5277
|
const [e] = je(), t = e.get("page"), { data: n, isFetching: a } = ze(), [r, i] = E(!1), { savePage: l } = Ht(), o = !!t && !Z(n), d = !t || !a && Z(n) || r, u = Lt("enable-old-page-manager");
|
|
@@ -5319,8 +5328,8 @@ const Bd = ({ page: e }) => {
|
|
|
5319
5328
|
const f = new URLSearchParams(window.location.search), x = f.get("lang");
|
|
5320
5329
|
x && (a.includes(x) ? i(x) : (f.delete("lang"), o(f), i("")));
|
|
5321
5330
|
}, [a, o, i]);
|
|
5322
|
-
const [, u] = Be(
|
|
5323
|
-
const f =
|
|
5331
|
+
const [, u] = Be(us), { data: h } = ze(), { data: m } = wt(), { data: g } = gt(), p = Q(() => {
|
|
5332
|
+
const f = Bs(
|
|
5324
5333
|
qe(j(m, "languages"), (x) => {
|
|
5325
5334
|
const b = ye(g, { lang: x });
|
|
5326
5335
|
return {
|
|
@@ -5401,7 +5410,7 @@ const Bd = ({ page: e }) => {
|
|
|
5401
5410
|
},
|
|
5402
5411
|
className: "text-xs font-normal duration-200 hover:bg-slate-300 hover:text-slate-800",
|
|
5403
5412
|
children: [
|
|
5404
|
-
/* @__PURE__ */ s(
|
|
5413
|
+
/* @__PURE__ */ s(cs, { className: "mr-1 h-3 w-3" }),
|
|
5405
5414
|
" Add Langauge"
|
|
5406
5415
|
]
|
|
5407
5416
|
}
|
|
@@ -5411,7 +5420,7 @@ const Bd = ({ page: e }) => {
|
|
|
5411
5420
|
] }) });
|
|
5412
5421
|
};
|
|
5413
5422
|
function Vd() {
|
|
5414
|
-
const [e, t] = Be(
|
|
5423
|
+
const [e, t] = Be(us);
|
|
5415
5424
|
return /* @__PURE__ */ c("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
|
|
5416
5425
|
/* @__PURE__ */ s(jd, {}),
|
|
5417
5426
|
/* @__PURE__ */ s(zd, {}),
|
|
@@ -5842,7 +5851,7 @@ function tu({
|
|
|
5842
5851
|
] })
|
|
5843
5852
|
] }),
|
|
5844
5853
|
/* @__PURE__ */ s("div", { className: "py-2", children: /* @__PURE__ */ s("p", { className: "text-sm text-muted-foreground", children: "How would you like to handle your current edits?" }) }),
|
|
5845
|
-
/* @__PURE__ */ c(
|
|
5854
|
+
/* @__PURE__ */ c(dt, { className: "flex flex-col gap-2 sm:flex-row", children: [
|
|
5846
5855
|
/* @__PURE__ */ s(S, { variant: "outline", className: "sm:flex-1", onClick: () => a(!1), disabled: r, children: r ? /* @__PURE__ */ c(ie, { children: [
|
|
5847
5856
|
/* @__PURE__ */ s("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
|
|
5848
5857
|
"Saving as draft..."
|
|
@@ -5891,7 +5900,7 @@ function nu({
|
|
|
5891
5900
|
] })
|
|
5892
5901
|
] }),
|
|
5893
5902
|
/* @__PURE__ */ s("div", { className: "py-2", children: /* @__PURE__ */ s("p", { className: "text-sm text-muted-foreground", children: "This action cannot be undone. Are you sure you want to proceed?" }) }),
|
|
5894
|
-
/* @__PURE__ */ c(
|
|
5903
|
+
/* @__PURE__ */ c(dt, { className: "flex flex-col gap-2 sm:flex-row", children: [
|
|
5895
5904
|
/* @__PURE__ */ s(S, { variant: "outline", className: "sm:flex-1", onClick: () => t(!1), disabled: r, children: "Cancel" }),
|
|
5896
5905
|
/* @__PURE__ */ s(S, { variant: "destructive", className: "sm:flex-1", onClick: a, disabled: r, children: r ? /* @__PURE__ */ c(ie, { children: [
|
|
5897
5906
|
/* @__PURE__ */ s("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
|
|
@@ -5995,12 +6004,12 @@ function ru({
|
|
|
5995
6004
|
}, J = Q(() => {
|
|
5996
6005
|
const _ = [
|
|
5997
6006
|
{ label: "Updated", top: "pt-2" },
|
|
5998
|
-
...
|
|
5999
|
-
...
|
|
6007
|
+
...vs(pe(x, { online: !0 }), "pageType"),
|
|
6008
|
+
...vs(pe(b, { online: !0 }), "pageType")
|
|
6000
6009
|
].filter((K) => K.pageType !== "theme"), F = [
|
|
6001
6010
|
{ label: "Offline", top: "pt-6" },
|
|
6002
|
-
...
|
|
6003
|
-
...
|
|
6011
|
+
...vs(pe(x, { online: !1 }), "pageType"),
|
|
6012
|
+
...vs(pe(b, { online: !1 }), "pageType")
|
|
6004
6013
|
];
|
|
6005
6014
|
return [..._, ...F];
|
|
6006
6015
|
}, [x, b]);
|
|
@@ -6060,7 +6069,7 @@ function ru({
|
|
|
6060
6069
|
)
|
|
6061
6070
|
) })
|
|
6062
6071
|
] }) }),
|
|
6063
|
-
/* @__PURE__ */ c(
|
|
6072
|
+
/* @__PURE__ */ c(dt, { className: "mt-10 flex items-center justify-center", children: [
|
|
6064
6073
|
a.length > 0 && /* @__PURE__ */ c("span", { className: "text-center text-sm text-muted-foreground", children: [
|
|
6065
6074
|
a.length,
|
|
6066
6075
|
" Page",
|
|
@@ -6084,7 +6093,7 @@ const iu = ({
|
|
|
6084
6093
|
/* @__PURE__ */ s(Ye, { children: r }),
|
|
6085
6094
|
/* @__PURE__ */ s(at, { children: i })
|
|
6086
6095
|
] }),
|
|
6087
|
-
/* @__PURE__ */ c(
|
|
6096
|
+
/* @__PURE__ */ c(dt, { className: "flex gap-2", children: [
|
|
6088
6097
|
/* @__PURE__ */ s(
|
|
6089
6098
|
S,
|
|
6090
6099
|
{
|
|
@@ -6119,7 +6128,7 @@ const iu = ({
|
|
|
6119
6128
|
});
|
|
6120
6129
|
};
|
|
6121
6130
|
function ou({ onClose: e }) {
|
|
6122
|
-
const { data: t, isFetching: n } = lu(), { mutateAsync: a, isPending: r } = wc(), i =
|
|
6131
|
+
const { data: t, isFetching: n } = lu(), { mutateAsync: a, isPending: r } = wc(), i = ut("settingComponent", null), l = Vl(async (o) => (await a({ data: o }), !0), 300);
|
|
6123
6132
|
return i ? /* @__PURE__ */ s(We, { open: !0, onOpenChange: e, children: /* @__PURE__ */ c(He, { className: "w-full", children: [
|
|
6124
6133
|
/* @__PURE__ */ s(Qe, { children: /* @__PURE__ */ s(Ye, { children: "Website Settings" }) }),
|
|
6125
6134
|
n ? /* @__PURE__ */ c("div", { className: "w-full space-y-3 py-4", children: [
|
|
@@ -6139,7 +6148,7 @@ function ou({ onClose: e }) {
|
|
|
6139
6148
|
] }) }) : null;
|
|
6140
6149
|
}
|
|
6141
6150
|
const cu = () => {
|
|
6142
|
-
const { selectedLang: e, fallbackLang: t } = Me(), n =
|
|
6151
|
+
const { selectedLang: e, fallbackLang: t } = Me(), n = ut("getPreviewUrl", async (m) => m), [a, r] = E(""), { data: i } = ze(), { data: l } = gt(), { data: o } = Ue(), d = Q(
|
|
6143
6152
|
() => {
|
|
6144
6153
|
var m;
|
|
6145
6154
|
return (m = l == null ? void 0 : l.find((g) => (g == null ? void 0 : g.lang) === e)) == null ? void 0 : m.slug;
|
|
@@ -6219,7 +6228,7 @@ const cu = () => {
|
|
|
6219
6228
|
d
|
|
6220
6229
|
] });
|
|
6221
6230
|
}, hu = () => {
|
|
6222
|
-
const { selectedLang: e } = Me(), { data: t } = Rt(), { data: n } =
|
|
6231
|
+
const { selectedLang: e } = Me(), { data: t } = Rt(), { data: n } = gt(), [a, r] = E(!1), [i, l] = E(!1), [o, d] = E(null), { savePageAsync: u } = Ht(), [h, m] = E(!1), { data: g } = ze(), { mutate: p, isPending: v } = Va(), { needTranslations: f } = Ht(), x = f(), { buttonText: b, buttonClassName: N, isPublished: P } = Q(() => {
|
|
6223
6232
|
const J = g && (g == null ? void 0 : g.online);
|
|
6224
6233
|
return {
|
|
6225
6234
|
buttonClassName: J ? "hover:bg-green-600 bg-green-500" : "",
|
|
@@ -6234,7 +6243,7 @@ const cu = () => {
|
|
|
6234
6243
|
C();
|
|
6235
6244
|
}, C = () => {
|
|
6236
6245
|
const J = [t == null ? void 0 : t.id, t == null ? void 0 : t.primaryPage];
|
|
6237
|
-
p({ ids:
|
|
6246
|
+
p({ ids: Bs(J) }, { onSuccess: () => Un("TOP_RIGHT") });
|
|
6238
6247
|
}, I = () => {
|
|
6239
6248
|
m(!1), C();
|
|
6240
6249
|
}, W = async () => {
|
|
@@ -6319,7 +6328,7 @@ const cu = () => {
|
|
|
6319
6328
|
] })
|
|
6320
6329
|
] }),
|
|
6321
6330
|
/* @__PURE__ */ s(ru, { showModal: a, onClose: () => r(!1) }),
|
|
6322
|
-
o && /* @__PURE__ */ s(
|
|
6331
|
+
o && /* @__PURE__ */ s(hs, { page: o, onClose: () => d(null) }),
|
|
6323
6332
|
/* @__PURE__ */ s(
|
|
6324
6333
|
iu,
|
|
6325
6334
|
{
|
|
@@ -6331,7 +6340,7 @@ const cu = () => {
|
|
|
6331
6340
|
)
|
|
6332
6341
|
] });
|
|
6333
6342
|
}, mu = () => {
|
|
6334
|
-
const e =
|
|
6343
|
+
const e = ut("settingComponent", null), [t, n] = E(!1);
|
|
6335
6344
|
return e ? /* @__PURE__ */ c(ie, { children: [
|
|
6336
6345
|
/* @__PURE__ */ s(Vt, { content: le.WEBSITEDATA, children: /* @__PURE__ */ s(S, { variant: "ghost", size: "icon", className: "gap-2", onClick: () => n(!0), children: /* @__PURE__ */ s(gi, { className: "h-4 w-4" }) }) }),
|
|
6337
6346
|
t && /* @__PURE__ */ s(ou, { onClose: () => n(!1) }),
|
|
@@ -6425,7 +6434,7 @@ const gu = ({
|
|
|
6425
6434
|
}
|
|
6426
6435
|
) });
|
|
6427
6436
|
}, vu = () => {
|
|
6428
|
-
const [e, t] = E(null), [n, a] = E(null), [r, i] = E(null), [l, o] = E(null), [d, u] = E(null), [h, m] = E(null), { data: g, isFetching: p } = Rt(), { selectedLang: v, fallbackLang: f } = Me(), { data: x } =
|
|
6437
|
+
const [e, t] = E(null), [n, a] = E(null), [r, i] = E(null), [l, o] = E(null), [d, u] = E(null), [h, m] = E(null), { data: g, isFetching: p } = Rt(), { selectedLang: v, fallbackLang: f } = Me(), { data: x } = gt(), b = x == null ? void 0 : x.find((I) => I.lang === v), { isLocked: N } = Et(), P = !(g != null && g.slug), [, L] = Be(us);
|
|
6429
6438
|
if (!g) return null;
|
|
6430
6439
|
const C = (I) => {
|
|
6431
6440
|
v.length > 0 && v !== f ? L({
|
|
@@ -6474,7 +6483,7 @@ const gu = ({
|
|
|
6474
6483
|
}
|
|
6475
6484
|
),
|
|
6476
6485
|
e && /* @__PURE__ */ s(Zs, { page: e, onClose: () => t(null) }),
|
|
6477
|
-
n && /* @__PURE__ */ s(
|
|
6486
|
+
n && /* @__PURE__ */ s(hs, { page: n, onClose: () => a(null) }),
|
|
6478
6487
|
r && /* @__PURE__ */ s(Ja, { page: r, onClose: () => i(null) }),
|
|
6479
6488
|
l && /* @__PURE__ */ s(Za, { page: l, onClose: () => o(null) }),
|
|
6480
6489
|
d && /* @__PURE__ */ s(Ya, { page: d, onClose: () => u(null) })
|
|
@@ -6549,7 +6558,7 @@ const gu = ({
|
|
|
6549
6558
|
const a = cc(n._type);
|
|
6550
6559
|
return {
|
|
6551
6560
|
...a,
|
|
6552
|
-
...
|
|
6561
|
+
...os(n, [
|
|
6553
6562
|
...Kl(a),
|
|
6554
6563
|
"_type",
|
|
6555
6564
|
"_id",
|
|
@@ -6670,9 +6679,9 @@ const gu = ({
|
|
|
6670
6679
|
[n, t]
|
|
6671
6680
|
)
|
|
6672
6681
|
};
|
|
6673
|
-
}, pr =
|
|
6674
|
-
email:
|
|
6675
|
-
password:
|
|
6682
|
+
}, pr = Cs.object({
|
|
6683
|
+
email: Cs.string().email({ message: "Please enter a valid email address" }),
|
|
6684
|
+
password: Cs.string().min(6, { message: "Password must be at least 6 characters" })
|
|
6676
6685
|
}), Pu = () => {
|
|
6677
6686
|
const { setUser: e, logout: t } = lt(), n = Js(), [a, r] = E(""), [i, l] = E(""), [o, d] = E({}), [u, h] = E(!1), [m, g] = E(""), p = Pe({
|
|
6678
6687
|
mutationFn: async (x) => {
|
|
@@ -6708,7 +6717,7 @@ const gu = ({
|
|
|
6708
6717
|
const N = pr.parse(b);
|
|
6709
6718
|
p.mutate(N);
|
|
6710
6719
|
} catch (N) {
|
|
6711
|
-
if (N instanceof
|
|
6720
|
+
if (N instanceof Cs.ZodError) {
|
|
6712
6721
|
const P = N.errors.reduce((L, C) => {
|
|
6713
6722
|
const I = C.path[0];
|
|
6714
6723
|
return L[I] = C.message, L;
|
|
@@ -6815,7 +6824,7 @@ const _u = () => Q(() => Na, [Na]), ff = (e) => {
|
|
|
6815
6824
|
onClose: t
|
|
6816
6825
|
}) => {
|
|
6817
6826
|
const [n, a] = E(e.slug || ""), { mutate: r, isPending: i } = rd(), { data: l } = Ue(), o = ye(l, { key: e == null ? void 0 : e.pageType }), d = (h) => {
|
|
6818
|
-
if (h.preventDefault(), !(e != null && e.primaryPage) && Object.keys(Ge).some((p) => n === `/${p}` ||
|
|
6827
|
+
if (h.preventDefault(), !(e != null && e.primaryPage) && Object.keys(Ge).some((p) => n === `/${p}` || Ts(n, `/${p}/`))) {
|
|
6819
6828
|
Y.error("Error", {
|
|
6820
6829
|
description: "Slugs cannot start with a language code for primary page"
|
|
6821
6830
|
});
|
|
@@ -6865,7 +6874,7 @@ const _u = () => Q(() => Na, [Na]), ff = (e) => {
|
|
|
6865
6874
|
value: n,
|
|
6866
6875
|
onChange: (h) => {
|
|
6867
6876
|
const m = h.target.value;
|
|
6868
|
-
|
|
6877
|
+
Ts(m, `/${u}`) && a(m);
|
|
6869
6878
|
},
|
|
6870
6879
|
className: "col-span-3",
|
|
6871
6880
|
required: !0,
|
|
@@ -6876,18 +6885,18 @@ const _u = () => Q(() => Na, [Na]), ff = (e) => {
|
|
|
6876
6885
|
)
|
|
6877
6886
|
] })
|
|
6878
6887
|
] }),
|
|
6879
|
-
/* @__PURE__ */ s(
|
|
6888
|
+
/* @__PURE__ */ s(dt, { children: /* @__PURE__ */ s(
|
|
6880
6889
|
S,
|
|
6881
6890
|
{
|
|
6882
6891
|
type: "submit",
|
|
6883
|
-
disabled: i || !
|
|
6892
|
+
disabled: i || !Ts(n, `/${u}`) || Ga(e == null ? void 0 : e.slug, n),
|
|
6884
6893
|
children: i ? "Changing..." : "Change Slug"
|
|
6885
6894
|
}
|
|
6886
6895
|
) })
|
|
6887
6896
|
] })
|
|
6888
6897
|
] }) });
|
|
6889
6898
|
}, Du = () => {
|
|
6890
|
-
const [, e] = Be(
|
|
6899
|
+
const [, e] = Be(us), { selectedLang: t, fallbackLang: n, setSelectedLang: a } = Me(), { data: r, isFetching: i } = gt(), { data: l } = ze(), { data: o } = Ue(), d = Q(() => {
|
|
6891
6900
|
const b = o == null ? void 0 : o.find((N) => N.key === (l == null ? void 0 : l.pageType));
|
|
6892
6901
|
return l != null && l.dynamic ? b == null ? void 0 : b.dynamicSlug : "";
|
|
6893
6902
|
}, [o, l == null ? void 0 : l.pageType, l == null ? void 0 : l.dynamic]), [u, h] = E(null), [m, g] = E(null), [p, v] = E(null), { data: f } = wt(), x = pe(
|
|
@@ -7012,7 +7021,7 @@ const _u = () => Q(() => Na, [Na]), ff = (e) => {
|
|
|
7012
7021
|
}
|
|
7013
7022
|
) }) }),
|
|
7014
7023
|
u && /* @__PURE__ */ s(Zs, { page: u, onClose: () => h(null) }),
|
|
7015
|
-
m && /* @__PURE__ */ s(
|
|
7024
|
+
m && /* @__PURE__ */ s(hs, { page: m, onClose: () => g(null) }),
|
|
7016
7025
|
p && /* @__PURE__ */ s(Lu, { page: p, onClose: () => v(null) })
|
|
7017
7026
|
] });
|
|
7018
7027
|
}, Ru = ({
|
|
@@ -7090,7 +7099,7 @@ function Ut({
|
|
|
7090
7099
|
/* @__PURE__ */ s($n, { children: "No option found." }),
|
|
7091
7100
|
/* @__PURE__ */ c(Ct, { children: [
|
|
7092
7101
|
l.length > 0 && /* @__PURE__ */ c(
|
|
7093
|
-
|
|
7102
|
+
mt,
|
|
7094
7103
|
{
|
|
7095
7104
|
onSelect: g,
|
|
7096
7105
|
className: "flex items-center text-sm",
|
|
@@ -7101,7 +7110,7 @@ function Ut({
|
|
|
7101
7110
|
}
|
|
7102
7111
|
),
|
|
7103
7112
|
p.map((v) => /* @__PURE__ */ c(
|
|
7104
|
-
|
|
7113
|
+
mt,
|
|
7105
7114
|
{
|
|
7106
7115
|
onSelect: () => m(v),
|
|
7107
7116
|
className: "flex items-center justify-between",
|
|
@@ -7134,7 +7143,7 @@ function Ut({
|
|
|
7134
7143
|
] });
|
|
7135
7144
|
}
|
|
7136
7145
|
const Gu = () => {
|
|
7137
|
-
const { selectedLang: e } = Me(), { data: t, isFetching: n } =
|
|
7146
|
+
const { selectedLang: e } = Me(), { data: t, isFetching: n } = gt();
|
|
7138
7147
|
return { data: Q(() => ye(t, { lang: e || "" }) || {}, [t, e]), isFetching: n };
|
|
7139
7148
|
}, Uu = () => {
|
|
7140
7149
|
var l;
|
|
@@ -7311,12 +7320,12 @@ const Gu = () => {
|
|
|
7311
7320
|
return /* @__PURE__ */ s("div", { className: "space-y-2", children: /* @__PURE__ */ c(ei, { value: u, onValueChange: h, className: "w-full", children: [
|
|
7312
7321
|
/* @__PURE__ */ c("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
7313
7322
|
/* @__PURE__ */ c(ti, { className: "grid w-[200px] grid-cols-2", children: [
|
|
7314
|
-
/* @__PURE__ */ c(
|
|
7323
|
+
/* @__PURE__ */ c(Ps, { value: "edit", className: "flex items-center gap-1", children: [
|
|
7315
7324
|
/* @__PURE__ */ s(nc, { className: "h-4 w-4" }),
|
|
7316
7325
|
/* @__PURE__ */ s("span", { children: "Edit" })
|
|
7317
7326
|
] }),
|
|
7318
7327
|
/* @__PURE__ */ c(
|
|
7319
|
-
|
|
7328
|
+
Ps,
|
|
7320
7329
|
{
|
|
7321
7330
|
value: "preview",
|
|
7322
7331
|
className: "flex items-center gap-1",
|
|
@@ -7350,7 +7359,7 @@ const Gu = () => {
|
|
|
7350
7359
|
)
|
|
7351
7360
|
] })
|
|
7352
7361
|
] }),
|
|
7353
|
-
/* @__PURE__ */ c(
|
|
7362
|
+
/* @__PURE__ */ c(_s, { value: "edit", className: "mt-0", children: [
|
|
7354
7363
|
/* @__PURE__ */ s(
|
|
7355
7364
|
Nn,
|
|
7356
7365
|
{
|
|
@@ -7392,7 +7401,7 @@ const Gu = () => {
|
|
|
7392
7401
|
] })
|
|
7393
7402
|
] })
|
|
7394
7403
|
] }),
|
|
7395
|
-
/* @__PURE__ */ c(
|
|
7404
|
+
/* @__PURE__ */ c(_s, { value: "preview", className: "mt-0", children: [
|
|
7396
7405
|
/* @__PURE__ */ s(Nn, { rows: i, value: p, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
|
|
7397
7406
|
/* @__PURE__ */ s("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
|
|
7398
7407
|
] })
|
|
@@ -7548,10 +7557,10 @@ const Gu = () => {
|
|
|
7548
7557
|
] }),
|
|
7549
7558
|
/* @__PURE__ */ s("form", { className: "space-y-8", children: /* @__PURE__ */ c(ei, { defaultValue: "seo", className: "w-full", children: [
|
|
7550
7559
|
/* @__PURE__ */ c(ti, { className: "mb-4 grid w-full grid-cols-2", children: [
|
|
7551
|
-
/* @__PURE__ */ s(
|
|
7552
|
-
/* @__PURE__ */ s(
|
|
7560
|
+
/* @__PURE__ */ s(Ps, { value: "seo", children: e("SEO Fields") }),
|
|
7561
|
+
/* @__PURE__ */ s(Ps, { value: "jsonld", children: e("JSON-LD") })
|
|
7553
7562
|
] }),
|
|
7554
|
-
/* @__PURE__ */ s(
|
|
7563
|
+
/* @__PURE__ */ s(_s, { value: "seo", children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
|
|
7555
7564
|
$ && /* @__PURE__ */ s("div", { className: "mb-4 flex justify-end", children: /* @__PURE__ */ s(
|
|
7556
7565
|
S,
|
|
7557
7566
|
{
|
|
@@ -7813,7 +7822,7 @@ const Gu = () => {
|
|
|
7813
7822
|
] })
|
|
7814
7823
|
] })
|
|
7815
7824
|
] }) }),
|
|
7816
|
-
/* @__PURE__ */ s(
|
|
7825
|
+
/* @__PURE__ */ s(_s, { value: "jsonld", children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
|
|
7817
7826
|
$ && /* @__PURE__ */ s("div", { className: "mb-4 flex justify-end", children: /* @__PURE__ */ s(
|
|
7818
7827
|
S,
|
|
7819
7828
|
{
|
|
@@ -7917,7 +7926,7 @@ const Yi = "seo", ju = ({ isActive: e, show: t }) => {
|
|
|
7917
7926
|
width: 800,
|
|
7918
7927
|
view: "modal"
|
|
7919
7928
|
}, Yu = "user-info", Ju = () => {
|
|
7920
|
-
const { user: e, logout: t } = lt(), n =
|
|
7929
|
+
const { user: e, logout: t } = lt(), n = ut("onLogout", Yl);
|
|
7921
7930
|
return e ? /* @__PURE__ */ c(Ao, { children: [
|
|
7922
7931
|
/* @__PURE__ */ s(To, { asChild: !0, children: /* @__PURE__ */ s(S, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ s(sc, { className: "h-4 w-4" }) }) }),
|
|
7923
7932
|
/* @__PURE__ */ c(Co, { className: "w-auto space-y-2 p-4", children: [
|
|
@@ -7952,7 +7961,7 @@ const Yi = "seo", ju = ({ isActive: e, show: t }) => {
|
|
|
7952
7961
|
button: Ju,
|
|
7953
7962
|
position: "bottom"
|
|
7954
7963
|
}, Zu = () => {
|
|
7955
|
-
|
|
7964
|
+
bs(Yi, zu), bs(Hi, Ou), bs("site-settings", Qu), bs("user-info", Xu);
|
|
7956
7965
|
};
|
|
7957
7966
|
var se = {
|
|
7958
7967
|
context: void 0,
|
|
@@ -7973,9 +7982,9 @@ function br(e) {
|
|
|
7973
7982
|
function Gn(e) {
|
|
7974
7983
|
se.context = e;
|
|
7975
7984
|
}
|
|
7976
|
-
var eh = (e, t) => e === t,
|
|
7985
|
+
var eh = (e, t) => e === t, Ls = Symbol("solid-proxy"), Ji = typeof Proxy == "function", Xi = Symbol("solid-track"), Ds = {
|
|
7977
7986
|
equals: eh
|
|
7978
|
-
}, Zi = rl, St = 1,
|
|
7987
|
+
}, Zi = rl, St = 1, Rs = 2, el = {
|
|
7979
7988
|
owned: null,
|
|
7980
7989
|
cleanups: null,
|
|
7981
7990
|
context: null,
|
|
@@ -7990,13 +7999,13 @@ function Kt(e, t) {
|
|
|
7990
7999
|
}, o = r ? e : () => e(() => $e(() => Wn(l)));
|
|
7991
8000
|
be = l, Se = null;
|
|
7992
8001
|
try {
|
|
7993
|
-
return
|
|
8002
|
+
return pt(o, !0);
|
|
7994
8003
|
} finally {
|
|
7995
8004
|
Se = n, be = a;
|
|
7996
8005
|
}
|
|
7997
8006
|
}
|
|
7998
8007
|
function Re(e, t) {
|
|
7999
|
-
t = t ? Object.assign({},
|
|
8008
|
+
t = t ? Object.assign({}, Ds, t) : Ds;
|
|
8000
8009
|
const n = {
|
|
8001
8010
|
value: e,
|
|
8002
8011
|
observers: null,
|
|
@@ -8019,7 +8028,7 @@ function tl(e, t, n) {
|
|
|
8019
8028
|
(!n || !n.render) && (a.user = !0), vt ? vt.push(a) : Ln(a);
|
|
8020
8029
|
}
|
|
8021
8030
|
function nt(e, t, n) {
|
|
8022
|
-
n = n ? Object.assign({},
|
|
8031
|
+
n = n ? Object.assign({}, Ds, n) : Ds;
|
|
8023
8032
|
const a = ta(e, t, !0, 0);
|
|
8024
8033
|
return a.observers = null, a.observerSlots = null, a.comparator = n.equals || void 0, Ln(a), sl.bind(a);
|
|
8025
8034
|
}
|
|
@@ -8042,7 +8051,7 @@ function ah(e, t, n) {
|
|
|
8042
8051
|
), o = ha, I(_, F)), _;
|
|
8043
8052
|
}
|
|
8044
8053
|
function I(J, _) {
|
|
8045
|
-
|
|
8054
|
+
pt(() => {
|
|
8046
8055
|
_ === void 0 && v(() => J), L(_ !== void 0 ? "errored" : h ? "ready" : "unresolved"), x(_);
|
|
8047
8056
|
for (const F of g.keys())
|
|
8048
8057
|
F.decrement();
|
|
@@ -8070,7 +8079,7 @@ function ah(e, t, n) {
|
|
|
8070
8079
|
refetching: J
|
|
8071
8080
|
})
|
|
8072
8081
|
);
|
|
8073
|
-
return sh(F) ? (l = F, "value" in F ? (F.status === "success" ? C(l, F.value, void 0, _) : C(l, void 0, Ea(F.value), _), F) : (u = !0, queueMicrotask(() => u = !1),
|
|
8082
|
+
return sh(F) ? (l = F, "value" in F ? (F.status === "success" ? C(l, F.value, void 0, _) : C(l, void 0, Ea(F.value), _), F) : (u = !0, queueMicrotask(() => u = !1), pt(() => {
|
|
8074
8083
|
L(h ? "refreshing" : "pending"), N();
|
|
8075
8084
|
}, !1), F.then(
|
|
8076
8085
|
(K) => C(F, K, void 0, _),
|
|
@@ -8109,7 +8118,7 @@ function ah(e, t, n) {
|
|
|
8109
8118
|
];
|
|
8110
8119
|
}
|
|
8111
8120
|
function gf(e) {
|
|
8112
|
-
return
|
|
8121
|
+
return pt(e, !1);
|
|
8113
8122
|
}
|
|
8114
8123
|
function $e(e) {
|
|
8115
8124
|
if (Se === null)
|
|
@@ -8152,7 +8161,7 @@ function ih(e, t) {
|
|
|
8152
8161
|
const n = be, a = Se;
|
|
8153
8162
|
be = e, Se = null;
|
|
8154
8163
|
try {
|
|
8155
|
-
return
|
|
8164
|
+
return pt(t, !0);
|
|
8156
8165
|
} catch (r) {
|
|
8157
8166
|
tr(r);
|
|
8158
8167
|
} finally {
|
|
@@ -8164,7 +8173,7 @@ function lh(e) {
|
|
|
8164
8173
|
return Promise.resolve().then(() => {
|
|
8165
8174
|
Se = t, be = n;
|
|
8166
8175
|
let a;
|
|
8167
|
-
return
|
|
8176
|
+
return pt(e, !1), Se = be = null, a ? a.done : void 0;
|
|
8168
8177
|
});
|
|
8169
8178
|
}
|
|
8170
8179
|
var [oh, yf] = /* @__PURE__ */ Re(!1);
|
|
@@ -8197,7 +8206,7 @@ function sl() {
|
|
|
8197
8206
|
Ln(this);
|
|
8198
8207
|
else {
|
|
8199
8208
|
const e = Ve;
|
|
8200
|
-
Ve = null,
|
|
8209
|
+
Ve = null, pt(() => Gs(this), !1), Ve = e;
|
|
8201
8210
|
}
|
|
8202
8211
|
if (Se) {
|
|
8203
8212
|
const e = this.observers ? this.observers.length : 0;
|
|
@@ -8207,7 +8216,7 @@ function sl() {
|
|
|
8207
8216
|
}
|
|
8208
8217
|
function al(e, t, n) {
|
|
8209
8218
|
let a = e.value;
|
|
8210
|
-
return (!e.comparator || !e.comparator(a, t)) && (e.value = t, e.observers && e.observers.length &&
|
|
8219
|
+
return (!e.comparator || !e.comparator(a, t)) && (e.value = t, e.observers && e.observers.length && pt(() => {
|
|
8211
8220
|
for (let r = 0; r < e.observers.length; r += 1) {
|
|
8212
8221
|
const i = e.observers[r], l = ma && ma.running;
|
|
8213
8222
|
l && ma.disposed.has(i), (l ? !i.tState : !i.state) && (i.pure ? Ve.push(i) : vt.push(i), i.observers && il(i)), l || (i.state = St);
|
|
@@ -8256,11 +8265,11 @@ function ta(e, t, n, a = St, r) {
|
|
|
8256
8265
|
};
|
|
8257
8266
|
return be === null || be !== el && (be.owned ? be.owned.push(i) : be.owned = [i]), i;
|
|
8258
8267
|
}
|
|
8259
|
-
function
|
|
8268
|
+
function Os(e) {
|
|
8260
8269
|
if (e.state === 0)
|
|
8261
8270
|
return;
|
|
8262
|
-
if (e.state ===
|
|
8263
|
-
return
|
|
8271
|
+
if (e.state === Rs)
|
|
8272
|
+
return Gs(e);
|
|
8264
8273
|
if (e.suspense && $e(e.suspense.inFallback))
|
|
8265
8274
|
return e.suspense.effects.push(e);
|
|
8266
8275
|
const t = [e];
|
|
@@ -8269,12 +8278,12 @@ function Rs(e) {
|
|
|
8269
8278
|
for (let n = t.length - 1; n >= 0; n--)
|
|
8270
8279
|
if (e = t[n], e.state === St)
|
|
8271
8280
|
Ln(e);
|
|
8272
|
-
else if (e.state ===
|
|
8281
|
+
else if (e.state === Rs) {
|
|
8273
8282
|
const a = Ve;
|
|
8274
|
-
Ve = null,
|
|
8283
|
+
Ve = null, pt(() => Gs(e, t[0]), !1), Ve = a;
|
|
8275
8284
|
}
|
|
8276
8285
|
}
|
|
8277
|
-
function
|
|
8286
|
+
function pt(e, t) {
|
|
8278
8287
|
if (Ve)
|
|
8279
8288
|
return e();
|
|
8280
8289
|
let n = !1;
|
|
@@ -8290,17 +8299,17 @@ function uh(e) {
|
|
|
8290
8299
|
if (Ve && (rl(Ve), Ve = null), e)
|
|
8291
8300
|
return;
|
|
8292
8301
|
const t = vt;
|
|
8293
|
-
vt = null, t.length &&
|
|
8302
|
+
vt = null, t.length && pt(() => Zi(t), !1);
|
|
8294
8303
|
}
|
|
8295
8304
|
function rl(e) {
|
|
8296
8305
|
for (let t = 0; t < e.length; t++)
|
|
8297
|
-
|
|
8306
|
+
Os(e[t]);
|
|
8298
8307
|
}
|
|
8299
8308
|
function hh(e) {
|
|
8300
8309
|
let t, n = 0;
|
|
8301
8310
|
for (t = 0; t < e.length; t++) {
|
|
8302
8311
|
const a = e[t];
|
|
8303
|
-
a.user ? e[n++] = a :
|
|
8312
|
+
a.user ? e[n++] = a : Os(a);
|
|
8304
8313
|
}
|
|
8305
8314
|
if (se.context) {
|
|
8306
8315
|
if (se.count) {
|
|
@@ -8310,22 +8319,22 @@ function hh(e) {
|
|
|
8310
8319
|
Gn();
|
|
8311
8320
|
}
|
|
8312
8321
|
for (se.effects && (se.done || !se.count) && (e = [...se.effects, ...e], n += se.effects.length, delete se.effects), t = 0; t < n; t++)
|
|
8313
|
-
|
|
8322
|
+
Os(e[t]);
|
|
8314
8323
|
}
|
|
8315
|
-
function
|
|
8324
|
+
function Gs(e, t) {
|
|
8316
8325
|
e.state = 0;
|
|
8317
8326
|
for (let n = 0; n < e.sources.length; n += 1) {
|
|
8318
8327
|
const a = e.sources[n];
|
|
8319
8328
|
if (a.sources) {
|
|
8320
8329
|
const r = a.state;
|
|
8321
|
-
r === St ? a !== t && (!a.updatedAt || a.updatedAt < ea) &&
|
|
8330
|
+
r === St ? a !== t && (!a.updatedAt || a.updatedAt < ea) && Os(a) : r === Rs && Gs(a, t);
|
|
8322
8331
|
}
|
|
8323
8332
|
}
|
|
8324
8333
|
}
|
|
8325
8334
|
function il(e) {
|
|
8326
8335
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
8327
8336
|
const n = e.observers[t];
|
|
8328
|
-
n.state || (n.state =
|
|
8337
|
+
n.state || (n.state = Rs, n.pure ? Ve.push(n) : vt.push(n), n.observers && il(n));
|
|
8329
8338
|
}
|
|
8330
8339
|
}
|
|
8331
8340
|
function Wn(e) {
|
|
@@ -8389,18 +8398,18 @@ function mh(e, t) {
|
|
|
8389
8398
|
};
|
|
8390
8399
|
}
|
|
8391
8400
|
var Aa = Symbol("fallback");
|
|
8392
|
-
function
|
|
8401
|
+
function Us(e) {
|
|
8393
8402
|
for (let t = 0; t < e.length; t++)
|
|
8394
8403
|
e[t]();
|
|
8395
8404
|
}
|
|
8396
8405
|
function fh(e, t, n = {}) {
|
|
8397
8406
|
let a = [], r = [], i = [], l = 0, o = t.length > 1 ? [] : null;
|
|
8398
|
-
return Kn(() =>
|
|
8407
|
+
return Kn(() => Us(i)), () => {
|
|
8399
8408
|
let d = e() || [], u = d.length, h, m;
|
|
8400
8409
|
return d[Xi], $e(() => {
|
|
8401
8410
|
let p, v, f, x, b, N, P, L, C;
|
|
8402
8411
|
if (u === 0)
|
|
8403
|
-
l !== 0 && (
|
|
8412
|
+
l !== 0 && (Us(i), i = [], a = [], r = [], l = 0, o && (o = [])), n.fallback && (a = [Aa], r[0] = Kt((I) => (i[0] = I, n.fallback())), l = 1);
|
|
8404
8413
|
else if (l === 0) {
|
|
8405
8414
|
for (r = new Array(u), m = 0; m < u; m++)
|
|
8406
8415
|
a[m] = d[m], r[m] = Kt(g);
|
|
@@ -8431,11 +8440,11 @@ function fh(e, t, n = {}) {
|
|
|
8431
8440
|
}
|
|
8432
8441
|
function gh(e, t, n = {}) {
|
|
8433
8442
|
let a = [], r = [], i = [], l = [], o = 0, d;
|
|
8434
|
-
return Kn(() =>
|
|
8443
|
+
return Kn(() => Us(i)), () => {
|
|
8435
8444
|
const u = e() || [], h = u.length;
|
|
8436
8445
|
return u[Xi], $e(() => {
|
|
8437
8446
|
if (h === 0)
|
|
8438
|
-
return o !== 0 && (
|
|
8447
|
+
return o !== 0 && (Us(i), i = [], a = [], r = [], o = 0, l = []), n.fallback && (a = [Aa], r[0] = Kt((g) => (i[0] = g, n.fallback())), o = 1), r;
|
|
8439
8448
|
for (a[0] === Aa && (i[0](), i = [], a = [], r = [], o = 0), d = 0; d < h; d++)
|
|
8440
8449
|
d < a.length && a[d] !== u[d] ? l[d](() => u[d]) : d >= a.length && (r[d] = Kt(m));
|
|
8441
8450
|
for (; d < a.length; d++)
|
|
@@ -8452,18 +8461,18 @@ function gh(e, t, n = {}) {
|
|
|
8452
8461
|
function ll(e, t) {
|
|
8453
8462
|
return $e(() => e(t || {}));
|
|
8454
8463
|
}
|
|
8455
|
-
function
|
|
8464
|
+
function Ns() {
|
|
8456
8465
|
return !0;
|
|
8457
8466
|
}
|
|
8458
8467
|
var Ta = {
|
|
8459
8468
|
get(e, t, n) {
|
|
8460
|
-
return t ===
|
|
8469
|
+
return t === Ls ? n : e.get(t);
|
|
8461
8470
|
},
|
|
8462
8471
|
has(e, t) {
|
|
8463
|
-
return t ===
|
|
8472
|
+
return t === Ls ? !0 : e.has(t);
|
|
8464
8473
|
},
|
|
8465
|
-
set:
|
|
8466
|
-
deleteProperty:
|
|
8474
|
+
set: Ns,
|
|
8475
|
+
deleteProperty: Ns,
|
|
8467
8476
|
getOwnPropertyDescriptor(e, t) {
|
|
8468
8477
|
return {
|
|
8469
8478
|
configurable: !0,
|
|
@@ -8471,8 +8480,8 @@ var Ta = {
|
|
|
8471
8480
|
get() {
|
|
8472
8481
|
return e.get(t);
|
|
8473
8482
|
},
|
|
8474
|
-
set:
|
|
8475
|
-
deleteProperty:
|
|
8483
|
+
set: Ns,
|
|
8484
|
+
deleteProperty: Ns
|
|
8476
8485
|
};
|
|
8477
8486
|
},
|
|
8478
8487
|
ownKeys(e) {
|
|
@@ -8493,7 +8502,7 @@ function ol(...e) {
|
|
|
8493
8502
|
let t = !1;
|
|
8494
8503
|
for (let l = 0; l < e.length; l++) {
|
|
8495
8504
|
const o = e[l];
|
|
8496
|
-
t = t || !!o &&
|
|
8505
|
+
t = t || !!o && Ls in o, e[l] = typeof o == "function" ? (t = !0, nt(o)) : o;
|
|
8497
8506
|
}
|
|
8498
8507
|
if (Ji && t)
|
|
8499
8508
|
return new Proxy(
|
|
@@ -8551,7 +8560,7 @@ function ol(...e) {
|
|
|
8551
8560
|
return r;
|
|
8552
8561
|
}
|
|
8553
8562
|
function yh(e, ...t) {
|
|
8554
|
-
if (Ji &&
|
|
8563
|
+
if (Ji && Ls in e) {
|
|
8555
8564
|
const r = new Set(t.length > 1 ? t.flat() : t[0]), i = t.map((l) => new Proxy(
|
|
8556
8565
|
{
|
|
8557
8566
|
get(o) {
|
|
@@ -9359,7 +9368,7 @@ function Kh(e, t) {
|
|
|
9359
9368
|
function Sn(e, t) {
|
|
9360
9369
|
Object.entries(e).forEach(([n, a]) => t(a, n));
|
|
9361
9370
|
}
|
|
9362
|
-
function
|
|
9371
|
+
function ks(e, t) {
|
|
9363
9372
|
return e.indexOf(t) !== -1;
|
|
9364
9373
|
}
|
|
9365
9374
|
function Sr(e, t) {
|
|
@@ -9400,7 +9409,7 @@ var Wh = class {
|
|
|
9400
9409
|
const a = n;
|
|
9401
9410
|
return t.push(a), t;
|
|
9402
9411
|
};
|
|
9403
|
-
function
|
|
9412
|
+
function ht(e, t, n, a) {
|
|
9404
9413
|
return {
|
|
9405
9414
|
isApplicable: e,
|
|
9406
9415
|
annotation: t,
|
|
@@ -9409,11 +9418,11 @@ function ut(e, t, n, a) {
|
|
|
9409
9418
|
};
|
|
9410
9419
|
}
|
|
9411
9420
|
var vl = [
|
|
9412
|
-
|
|
9421
|
+
ht(gl, "undefined", () => null, () => {
|
|
9413
9422
|
}),
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9423
|
+
ht(sm, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
9424
|
+
ht(em, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
9425
|
+
ht(tm, "Error", (e, t) => {
|
|
9417
9426
|
const n = {
|
|
9418
9427
|
name: e.name,
|
|
9419
9428
|
message: e.message
|
|
@@ -9427,11 +9436,11 @@ var vl = [
|
|
|
9427
9436
|
n[a] = e[a];
|
|
9428
9437
|
}), n;
|
|
9429
9438
|
}),
|
|
9430
|
-
|
|
9439
|
+
ht(Zh, "regexp", (e) => "" + e, (e) => {
|
|
9431
9440
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
9432
9441
|
return new RegExp(t, n);
|
|
9433
9442
|
}),
|
|
9434
|
-
|
|
9443
|
+
ht(
|
|
9435
9444
|
Jn,
|
|
9436
9445
|
"set",
|
|
9437
9446
|
// (sets only exist in es6+)
|
|
@@ -9439,10 +9448,10 @@ var vl = [
|
|
|
9439
9448
|
(e) => [...e.values()],
|
|
9440
9449
|
(e) => new Set(e)
|
|
9441
9450
|
),
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9451
|
+
ht(Yn, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
9452
|
+
ht((e) => Ar(e) || am(e), "number", (e) => Ar(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
9453
|
+
ht((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
9454
|
+
ht(im, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
9446
9455
|
];
|
|
9447
9456
|
function na(e, t, n, a) {
|
|
9448
9457
|
return {
|
|
@@ -9538,11 +9547,11 @@ var cm = (e, t, n) => {
|
|
|
9538
9547
|
return n.next().value;
|
|
9539
9548
|
};
|
|
9540
9549
|
function Al(e) {
|
|
9541
|
-
if (
|
|
9550
|
+
if (ks(e, "__proto__"))
|
|
9542
9551
|
throw new Error("__proto__ is not allowed as a property");
|
|
9543
|
-
if (
|
|
9552
|
+
if (ks(e, "prototype"))
|
|
9544
9553
|
throw new Error("prototype is not allowed as a property");
|
|
9545
|
-
if (
|
|
9554
|
+
if (ks(e, "constructor"))
|
|
9546
9555
|
throw new Error("constructor is not allowed as a property");
|
|
9547
9556
|
}
|
|
9548
9557
|
var dm = (e, t) => {
|
|
@@ -9682,7 +9691,7 @@ var Tl = (e, t, n, a, r = [], i = [], l = /* @__PURE__ */ new Map()) => {
|
|
|
9682
9691
|
};
|
|
9683
9692
|
return o || l.set(e, v), v;
|
|
9684
9693
|
}
|
|
9685
|
-
if (
|
|
9694
|
+
if (ks(i, e))
|
|
9686
9695
|
return {
|
|
9687
9696
|
transformedValue: null
|
|
9688
9697
|
};
|
|
@@ -9823,11 +9832,11 @@ var Uf = (e, t = !1) => {
|
|
|
9823
9832
|
json: n
|
|
9824
9833
|
} = vm(e);
|
|
9825
9834
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
9826
|
-
},
|
|
9835
|
+
}, ws = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, bm = (e, t) => e.queryHash.localeCompare(t.queryHash), kl = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, xm = (e, t) => ws(e) === ws(t) ? kl(e, t) : ws(e) > ws(t) ? 1 : -1, Bf = {
|
|
9827
9836
|
status: xm,
|
|
9828
9837
|
"query hash": bm,
|
|
9829
9838
|
"last updated": kl
|
|
9830
|
-
},
|
|
9839
|
+
}, Es = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Pl = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Nm = (e, t) => Es(e) === Es(t) ? Pl(e, t) : Es(e) > Es(t) ? 1 : -1, Mf = {
|
|
9831
9840
|
status: Nm,
|
|
9832
9841
|
"last updated": Pl
|
|
9833
9842
|
}, Ff = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), qf = () => {
|
|
@@ -9840,7 +9849,7 @@ var Uf = (e, t = !1) => {
|
|
|
9840
9849
|
};
|
|
9841
9850
|
n.addEventListener("change", a), Kn(() => n.removeEventListener("change", a));
|
|
9842
9851
|
}), e;
|
|
9843
|
-
},
|
|
9852
|
+
}, Ss = (e, t, n) => {
|
|
9844
9853
|
if (t.length === 0)
|
|
9845
9854
|
return n;
|
|
9846
9855
|
if (e instanceof Map) {
|
|
@@ -9848,10 +9857,10 @@ var Uf = (e, t = !1) => {
|
|
|
9848
9857
|
if (t.length === 1)
|
|
9849
9858
|
return a.set(t[0], n), a;
|
|
9850
9859
|
const [r, ...i] = t;
|
|
9851
|
-
return a.set(r,
|
|
9860
|
+
return a.set(r, Ss(a.get(r), i, n)), a;
|
|
9852
9861
|
}
|
|
9853
9862
|
if (e instanceof Set) {
|
|
9854
|
-
const a =
|
|
9863
|
+
const a = Ss(Array.from(e), t, n);
|
|
9855
9864
|
return new Set(a);
|
|
9856
9865
|
}
|
|
9857
9866
|
if (Array.isArray(e)) {
|
|
@@ -9859,7 +9868,7 @@ var Uf = (e, t = !1) => {
|
|
|
9859
9868
|
if (t.length === 1)
|
|
9860
9869
|
return a[t[0]] = n, a;
|
|
9861
9870
|
const [r, ...i] = t;
|
|
9862
|
-
return a[r] =
|
|
9871
|
+
return a[r] = Ss(a[r], i, n), a;
|
|
9863
9872
|
}
|
|
9864
9873
|
if (e instanceof Object) {
|
|
9865
9874
|
const a = {
|
|
@@ -9868,19 +9877,19 @@ var Uf = (e, t = !1) => {
|
|
|
9868
9877
|
if (t.length === 1)
|
|
9869
9878
|
return a[t[0]] = n, a;
|
|
9870
9879
|
const [r, ...i] = t;
|
|
9871
|
-
return a[r] =
|
|
9880
|
+
return a[r] = Ss(a[r], i, n), a;
|
|
9872
9881
|
}
|
|
9873
9882
|
return e;
|
|
9874
|
-
},
|
|
9883
|
+
}, As = (e, t) => {
|
|
9875
9884
|
if (e instanceof Map) {
|
|
9876
9885
|
const n = new Map(e);
|
|
9877
9886
|
if (t.length === 1)
|
|
9878
9887
|
return n.delete(t[0]), n;
|
|
9879
9888
|
const [a, ...r] = t;
|
|
9880
|
-
return n.set(a,
|
|
9889
|
+
return n.set(a, As(n.get(a), r)), n;
|
|
9881
9890
|
}
|
|
9882
9891
|
if (e instanceof Set) {
|
|
9883
|
-
const n =
|
|
9892
|
+
const n = As(Array.from(e), t);
|
|
9884
9893
|
return new Set(n);
|
|
9885
9894
|
}
|
|
9886
9895
|
if (Array.isArray(e)) {
|
|
@@ -9888,7 +9897,7 @@ var Uf = (e, t = !1) => {
|
|
|
9888
9897
|
if (t.length === 1)
|
|
9889
9898
|
return n.filter((i, l) => l.toString() !== t[0]);
|
|
9890
9899
|
const [a, ...r] = t;
|
|
9891
|
-
return n[a] =
|
|
9900
|
+
return n[a] = As(n[a], r), n;
|
|
9892
9901
|
}
|
|
9893
9902
|
if (e instanceof Object) {
|
|
9894
9903
|
const n = {
|
|
@@ -9897,7 +9906,7 @@ var Uf = (e, t = !1) => {
|
|
|
9897
9906
|
if (t.length === 1)
|
|
9898
9907
|
return delete n[t[0]], n;
|
|
9899
9908
|
const [a, ...r] = t;
|
|
9900
|
-
return n[a] =
|
|
9909
|
+
return n[a] = As(n[a], r), n;
|
|
9901
9910
|
}
|
|
9902
9911
|
return e;
|
|
9903
9912
|
}, _l = (e, t) => {
|
|
@@ -9955,7 +9964,7 @@ var Uf = (e, t = !1) => {
|
|
|
9955
9964
|
const t = ul(() => {
|
|
9956
9965
|
const n = this, [a] = te(this, an), [r] = te(this, rn), [i] = te(this, ln), [l] = te(this, on), [o] = te(this, nn);
|
|
9957
9966
|
let d;
|
|
9958
|
-
return te(this, cn) ? d = te(this, cn) : (d = cl(() => import("./HO4MOOFI-
|
|
9967
|
+
return te(this, cn) ? d = te(this, cn) : (d = cl(() => import("./HO4MOOFI-B57lmoVb.js")), xe(this, cn, d)), _l(te(this, ts), te(this, sn)), ll(d, ol({
|
|
9959
9968
|
get queryFlavor() {
|
|
9960
9969
|
return te(n, Zn);
|
|
9961
9970
|
},
|
|
@@ -10049,7 +10058,7 @@ var Uf = (e, t = !1) => {
|
|
|
10049
10058
|
const t = ul(() => {
|
|
10050
10059
|
const n = this, [a] = te(this, hn), [r] = te(this, mn), [i] = te(this, fn), [l] = te(this, gn), [o] = te(this, dn), [d] = te(this, pn);
|
|
10051
10060
|
let u;
|
|
10052
|
-
return te(this, yn) ? u = te(this, yn) : (u = cl(() => import("./HUY7CZI3-
|
|
10061
|
+
return te(this, yn) ? u = te(this, yn) : (u = cl(() => import("./HUY7CZI3-BFWR5pdP.js")), xe(this, yn, u)), _l(te(this, is), te(this, un)), ll(u, ol({
|
|
10053
10062
|
get queryFlavor() {
|
|
10054
10063
|
return te(n, as);
|
|
10055
10064
|
},
|
|
@@ -10218,7 +10227,7 @@ const Cm = () => {
|
|
|
10218
10227
|
[e]
|
|
10219
10228
|
);
|
|
10220
10229
|
}, Im = () => {
|
|
10221
|
-
const e =
|
|
10230
|
+
const e = ds(), t = _e(), n = ee();
|
|
10222
10231
|
return Pe({
|
|
10223
10232
|
mutationFn: async ({
|
|
10224
10233
|
file: a,
|
|
@@ -10241,7 +10250,7 @@ const Cm = () => {
|
|
|
10241
10250
|
}
|
|
10242
10251
|
});
|
|
10243
10252
|
}, Lm = () => {
|
|
10244
|
-
const e =
|
|
10253
|
+
const e = ds(), t = _e(), n = ee();
|
|
10245
10254
|
return Pe({
|
|
10246
10255
|
mutationFn: async (a) => n(e, {
|
|
10247
10256
|
action: R.DELETE_ASSET,
|
|
@@ -10259,7 +10268,7 @@ const Cm = () => {
|
|
|
10259
10268
|
}
|
|
10260
10269
|
});
|
|
10261
10270
|
}, Dm = () => {
|
|
10262
|
-
const e =
|
|
10271
|
+
const e = ds(), t = _e(), n = ee();
|
|
10263
10272
|
return Pe({
|
|
10264
10273
|
mutationFn: async (a) => n(e, {
|
|
10265
10274
|
action: R.UPDATE_ASSET,
|
|
@@ -10277,7 +10286,7 @@ const Cm = () => {
|
|
|
10277
10286
|
}
|
|
10278
10287
|
});
|
|
10279
10288
|
}, Rm = (e = {}) => {
|
|
10280
|
-
const t =
|
|
10289
|
+
const t = ds(), n = ee(), { search: a, page: r = 1, limit: i = 30 } = e;
|
|
10281
10290
|
return De({
|
|
10282
10291
|
queryKey: [R.GET_ASSETS, a, r, i],
|
|
10283
10292
|
queryFn: async () => {
|
|
@@ -10295,7 +10304,7 @@ const Cm = () => {
|
|
|
10295
10304
|
retry: 1
|
|
10296
10305
|
});
|
|
10297
10306
|
}, Om = (e) => {
|
|
10298
|
-
const t =
|
|
10307
|
+
const t = ds(), n = ee();
|
|
10299
10308
|
return De({
|
|
10300
10309
|
queryKey: [R.GET_ASSET, e],
|
|
10301
10310
|
queryFn: async () => e ? await n(t, {
|
|
@@ -10729,7 +10738,7 @@ function Il({
|
|
|
10729
10738
|
F([]);
|
|
10730
10739
|
}, []), re = (G) => {
|
|
10731
10740
|
(G == null ? void 0 : G.length) !== 0 && (t(
|
|
10732
|
-
|
|
10741
|
+
os(Rr(G || _), [
|
|
10733
10742
|
"id",
|
|
10734
10743
|
"url",
|
|
10735
10744
|
"width",
|
|
@@ -10957,7 +10966,7 @@ function Il({
|
|
|
10957
10966
|
] }) })
|
|
10958
10967
|
] }) }),
|
|
10959
10968
|
_.some((M) => M.id === G.id) && /* @__PURE__ */ s("div", { className: "absolute top-1 right-1 border border-white h-max rounded-full bg-blue-500 p-1", children: /* @__PURE__ */ s(
|
|
10960
|
-
|
|
10969
|
+
ft,
|
|
10961
10970
|
{
|
|
10962
10971
|
className: "w-3 h-3 text-white",
|
|
10963
10972
|
strokeWidth: 5
|
|
@@ -11075,7 +11084,7 @@ function Il({
|
|
|
11075
11084
|
'"? This action cannot be undone.'
|
|
11076
11085
|
] })
|
|
11077
11086
|
] }),
|
|
11078
|
-
/* @__PURE__ */ c(
|
|
11087
|
+
/* @__PURE__ */ c(dt, { className: "gap-2 sm:gap-0", children: [
|
|
11079
11088
|
/* @__PURE__ */ s(S, { variant: "outline", onClick: () => h(null), children: "Cancel" }),
|
|
11080
11089
|
/* @__PURE__ */ s(S, { variant: "destructive", onClick: we, children: "Delete" })
|
|
11081
11090
|
] })
|
|
@@ -11102,7 +11111,7 @@ const qm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11102
11111
|
}, h = (g) => {
|
|
11103
11112
|
const p = Array.isArray(g) ? g[0] : g;
|
|
11104
11113
|
p != null && p.url && n(
|
|
11105
|
-
|
|
11114
|
+
os(p, ["url", "id"])
|
|
11106
11115
|
), o(!1);
|
|
11107
11116
|
}, m = () => {
|
|
11108
11117
|
n({ url: "", id: "" });
|
|
@@ -11640,7 +11649,7 @@ const Ym = (e) => {
|
|
|
11640
11649
|
}), $f = (e) => {
|
|
11641
11650
|
const { isLoggedIn: t } = lt(), [, n] = Ai(), [a, r] = E(!1);
|
|
11642
11651
|
return ce(() => (n(
|
|
11643
|
-
|
|
11652
|
+
os(e, [
|
|
11644
11653
|
"apiUrl",
|
|
11645
11654
|
"usersApiUrl",
|
|
11646
11655
|
"assetsApiUrl",
|
|
@@ -11733,7 +11742,7 @@ export {
|
|
|
11733
11742
|
nh as G,
|
|
11734
11743
|
vm as H,
|
|
11735
11744
|
Ef as I,
|
|
11736
|
-
|
|
11745
|
+
Ss as J,
|
|
11737
11746
|
Ff as K,
|
|
11738
11747
|
Df as L,
|
|
11739
11748
|
Lf as M,
|
|
@@ -11744,7 +11753,7 @@ export {
|
|
|
11744
11753
|
Tf as R,
|
|
11745
11754
|
Sf as S,
|
|
11746
11755
|
Af as T,
|
|
11747
|
-
|
|
11756
|
+
As as U,
|
|
11748
11757
|
vf as V,
|
|
11749
11758
|
$f as W,
|
|
11750
11759
|
Ut as X,
|
|
@@ -11762,7 +11771,7 @@ export {
|
|
|
11762
11771
|
ff as a7,
|
|
11763
11772
|
ua as a8,
|
|
11764
11773
|
ze as a9,
|
|
11765
|
-
|
|
11774
|
+
gt as aa,
|
|
11766
11775
|
_n as ab,
|
|
11767
11776
|
wt as ac,
|
|
11768
11777
|
lt as ad,
|