@chaibuilder/pages 0.16.23 → 0.16.25
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/{2AITGKQY-BH_4lP5P.cjs → 2AITGKQY-Be359164.cjs} +1 -1
- package/dist/{2AITGKQY-BuWtti7-.js → 2AITGKQY-CoZaZMrf.js} +2 -2
- package/dist/{NCMVHL6D-DbC9VYfW.js → NCMVHL6D-C2p_bwgN.js} +2 -2
- package/dist/{NCMVHL6D-CfRPe-3L.cjs → NCMVHL6D-CmKLw38-.cjs} +1 -1
- package/dist/{ZDWCUMSJ-BxhCnC2U.cjs → ZDWCUMSJ-DDHOTUX8.cjs} +1 -1
- package/dist/{ZDWCUMSJ-CE0Md3aC.js → ZDWCUMSJ-DmZy2MGb.js} +1 -1
- package/dist/{active-in-another-tab-C4o8FQXv.js → active-in-another-tab-At1yEu4g.js} +1 -1
- package/dist/{active-in-another-tab-SSCyhy2-.cjs → active-in-another-tab-B1PAoWFL.cjs} +1 -1
- package/dist/{add-new-language-page-DUkVmwsT.cjs → add-new-language-page-B7fKZbYT.cjs} +1 -1
- package/dist/{add-new-language-page-BCu4Npk2.js → add-new-language-page-BfPVFqO4.js} +2 -2
- package/dist/{add-new-page-BDpRUueB.cjs → add-new-page-DBVt7xSO.cjs} +1 -1
- package/dist/{add-new-page-D1pc9kLA.js → add-new-page-GZdKxwCY.js} +1 -1
- package/dist/{ai-panel-content-Dg6P7vk7.js → ai-panel-content-CWw-2gPV.js} +2 -2
- package/dist/{ai-panel-content-Bq3BC1Dm.cjs → ai-panel-content-Cv67WLJd.cjs} +1 -1
- package/dist/{ai-panel-default-lang-BxYd_6VF.js → ai-panel-default-lang-B1WScOB4.js} +3 -3
- package/dist/{ai-panel-default-lang-C0X_Srso.cjs → ai-panel-default-lang-BBk6sSyh.cjs} +2 -2
- package/dist/{ai-panel-other-lang-BOu1wJ5J.cjs → ai-panel-other-lang-BrVV9nKv.cjs} +1 -1
- package/dist/{ai-panel-other-lang-CBAP_iX-.js → ai-panel-other-lang-DgNon2GH.js} +3 -3
- package/dist/{ai-prompt-input-CiZCB6jc.js → ai-prompt-input-B6KsNLgP.js} +2 -2
- package/dist/ai-prompt-input-DSmIbsS_.cjs +1 -0
- package/dist/{ai-translation-prompt-Cas13J-r.cjs → ai-translation-prompt-BYTviKVU.cjs} +1 -1
- package/dist/{ai-translation-prompt-D3XU5z3f.js → ai-translation-prompt-CfnXqyai.js} +1 -1
- package/dist/button-CMMN5Cp4.cjs +1 -0
- package/dist/button-CggatMM3.js +48 -0
- package/dist/{continue-editing-in-this-client-DbHzW_zt.cjs → continue-editing-in-this-client--Fzos10u.cjs} +1 -1
- package/dist/{continue-editing-in-this-client-DIpi2ZSi.js → continue-editing-in-this-client--RRixZUo.js} +1 -1
- package/dist/{delete-page-DPHNAOC6.cjs → delete-page-BOuq3v6x.cjs} +1 -1
- package/dist/{delete-page-CODOstkw.js → delete-page-CeJdK5hc.js} +1 -1
- package/dist/{digital-asset-manager-BllbsemN.cjs → digital-asset-manager-BUEa7fSG.cjs} +1 -1
- package/dist/{digital-asset-manager-BuYVjKfQ.js → digital-asset-manager-D6GbpYDo.js} +1 -1
- package/dist/{duplicate-page-DfH67AsW.js → duplicate-page-C7FjAbqP.js} +2 -2
- package/dist/{duplicate-page-Dc6_UBNZ.cjs → duplicate-page-Ch9Fn-Gu.cjs} +1 -1
- package/dist/{dynamic-page-selector-Dd8Orls1.cjs → dynamic-page-selector-CZNYCxbJ.cjs} +1 -1
- package/dist/{dynamic-page-selector-C2UK6qGj.js → dynamic-page-selector-C_-ihnB7.js} +1 -1
- package/dist/index-CJcS3b8n.cjs +5 -0
- package/dist/{index-B_T6ZeA4.js → index-CtRx3Y3K.js} +1130 -1115
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +7 -7
- package/dist/{json-diff-viewer-D8uyTokS.js → json-diff-viewer-DX4sQltt.js} +1 -1
- package/dist/{json-diff-viewer-1IHmR_Nt.cjs → json-diff-viewer-DluaC8tY.cjs} +1 -1
- package/dist/{lang-panel-D-Pbw2bR.cjs → lang-panel-DFe4DfU4.cjs} +1 -1
- package/dist/{lang-panel-d7376A7w.js → lang-panel-p7OYw-2c.js} +2 -2
- package/dist/{mark-as-template-DHFkkBvV.cjs → mark-as-template-Biqpp8uM.cjs} +1 -1
- package/dist/{mark-as-template-Bx-MAB5M.js → mark-as-template-CuPKgc5N.js} +1 -1
- package/dist/{no-language-page-content-if-qlxZz.js → no-language-page-content-B_zNVuVO.js} +1 -1
- package/dist/{no-language-page-content-DkK7mBnG.cjs → no-language-page-content-oy4ZcH34.cjs} +1 -1
- package/dist/{no-language-page-dialog-49fBehZo.cjs → no-language-page-dialog-CTRG81hU.cjs} +1 -1
- package/dist/{no-language-page-dialog-CCLWQP1E.js → no-language-page-dialog-Q2rvsEP6.js} +2 -2
- package/dist/{page-creator-DlJXKAhw.cjs → page-creator-CVrbjJa-.cjs} +1 -1
- package/dist/{page-creator-DRDoy3nM.js → page-creator-b6UTCFeu.js} +2 -2
- package/dist/{page-lock-DOnPhjGp.cjs → page-lock-DUwWdppB.cjs} +1 -1
- package/dist/{page-lock-pwxPivz-.js → page-lock-Dl5CmUgk.js} +2 -2
- package/dist/{page-locked-dialog-DKn93bBu.cjs → page-locked-dialog-DeUMR-pV.cjs} +1 -1
- package/dist/{page-locked-dialog-238NohyB.js → page-locked-dialog-MJ3kA-oQ.js} +1 -1
- package/dist/page-manager-new-C3XuiDiM.cjs +1 -0
- package/dist/page-manager-new-C8PGR_4a.js +394 -0
- package/dist/{page-manager-search-and-filter-4JatGyBT.cjs → page-manager-search-and-filter-BdfXZwwH.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-B86rQEO4.js → page-manager-search-and-filter-DIz68YHL.js} +1 -1
- package/dist/{page-revisions-content-V9S1rPUy.js → page-revisions-content-BvYTXKgT.js} +2 -2
- package/dist/{page-revisions-content-ChOACVs4.cjs → page-revisions-content-CwrPL9kp.cjs} +1 -1
- package/dist/pages.css +1 -1
- package/dist/{publish-pages-content-GKnG7R5W.js → publish-pages-content-9VBFj6LH.js} +2 -2
- package/dist/{publish-pages-content-CXKknMnI.cjs → publish-pages-content-DTPjR33T.cjs} +1 -1
- package/dist/{save-to-lib-BO3WEr-u.js → save-to-lib-Bkou78G6.js} +1 -1
- package/dist/{save-to-lib-BderZ0Qz.cjs → save-to-lib-ByoB0FW5.cjs} +1 -1
- package/dist/selected-block-display-Auur5nl7.cjs +16 -0
- package/dist/selected-block-display-D1L4e4Cb.js +355 -0
- package/dist/{seo-panel-DuC3gQQy.js → seo-panel-KjxjFcdp.js} +16 -16
- package/dist/{seo-panel-C2WY1dTf.cjs → seo-panel-Mjkh_Urn.cjs} +1 -1
- package/dist/server.d.ts +8 -0
- package/dist/{shared-json-ld-ChfktUpf.cjs → shared-json-ld-DYD7q8ST.cjs} +1 -1
- package/dist/{shared-json-ld-DMpCm3M4.js → shared-json-ld-S9OIaOTA.js} +1 -1
- package/dist/{slug-input-CrjrFrxP.cjs → slug-input-C0BtQs2w.cjs} +1 -1
- package/dist/{slug-input-CO6AGAQD.js → slug-input-CUTtvZQ9.js} +1 -1
- package/dist/{take-over-request-Du7grW5x.js → take-over-request-CXED2804.js} +1 -1
- package/dist/{take-over-request-mNydSSFX.cjs → take-over-request-Dh9HVZPO.cjs} +1 -1
- package/dist/{theme-panel-footer-CSC6DpWO.js → theme-panel-footer-CftO53LS.js} +1 -1
- package/dist/{theme-panel-footer-eZ1bbLzq.cjs → theme-panel-footer-tdNtbqZs.cjs} +1 -1
- package/dist/{unmark-as-template-dEb6wFT9.js → unmark-as-template-Dp6S9dY3.js} +1 -1
- package/dist/{unmark-as-template-DzU6-XK7.cjs → unmark-as-template-DyUqAa9Z.cjs} +1 -1
- package/dist/{unpublish-page-CxAB3-Cj.js → unpublish-page-c382vh74.js} +1 -1
- package/dist/{unpublish-page-DGd2Kktq.cjs → unpublish-page-ch791au1.cjs} +1 -1
- package/dist/{web-preview-yBF4EXzm.js → web-preview-DiOChE4E.js} +1 -1
- package/dist/{web-preview-B6G0vdiq.cjs → web-preview-cls5-Dlv.cjs} +1 -1
- package/package.json +3 -3
- package/dist/ai-prompt-input-bqLGbsQ2.cjs +0 -1
- package/dist/index--Lu_Q_nO.cjs +0 -5
- package/dist/page-manager-new-Ch0UNJM1.cjs +0 -1
- package/dist/page-manager-new-hEQwUorR.js +0 -354
- package/dist/selected-block-display-DAe0XQgw.js +0 -394
- package/dist/selected-block-display-yB5bvo9w.cjs +0 -16
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var
|
|
1
|
+
var $n = (e) => {
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var A = (e, t, n) => (
|
|
4
|
+
var Qn = (e, t, n) => t.has(e) || $n("Cannot " + n);
|
|
5
|
+
var A = (e, t, n) => (Qn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), D = (e, t, n) => t.has(e) ? $n("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), G = (e, t, n, s) => (Qn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
6
6
|
import { jsxs as m, Fragment as ge, jsx as c } from "react/jsx-runtime";
|
|
7
|
-
import { get as H, reverse as
|
|
7
|
+
import { get as H, reverse as Ur, sortBy as Mr, find as ie, noop as As, groupBy as Br, values as Ts, first as Ss, minBy as _s, keyBy as Fr, map as Kt, isEmpty as Se, compact as Ps, each as Kr, upperCase as zn, filter as ws, includes as Vr, has as Yt, pick as Ln, keys as Hr, pickBy as qr, endsWith as $r, isArray as Qr, startCase as zr, isFunction as Wr, cloneDeep as jr, isEqual as Wn } from "lodash-es";
|
|
8
8
|
import * as Q from "react";
|
|
9
|
-
import
|
|
10
|
-
import { atom as Ee, useAtom as
|
|
11
|
-
import { useQuery as
|
|
12
|
-
import { useLanguages as
|
|
13
|
-
import { Tooltip as Jt, TooltipTrigger as Zt, Button as M, TooltipContent as Xt, Sheet as
|
|
14
|
-
import { LogsIcon as
|
|
9
|
+
import Yr, { useMemo as q, useCallback as z, useState as K, useEffect as ne, useRef as Ie, lazy as V, Suspense as X, createContext as Jr, Component as Zr, createElement as jn } from "react";
|
|
10
|
+
import { atom as Ee, useAtom as oe } from "jotai";
|
|
11
|
+
import { useQuery as re, useMutation as Y, useQueryClient as J, onlineManager as vs, QueryClient as Xr, QueryClientProvider as ea } from "@tanstack/react-query";
|
|
12
|
+
import { useLanguages as Pe, useSavePage as ke, useTranslation as we, mergeClasses as Vt, usePermissions as bs, PERMISSIONS as ta, useRightPanel as na, useChaiFeatureFlag as sa, useIsPageLoaded as ra, registerChaiLibrary as aa, getBlocksFromHTML as ia, registerChaiSidebarPanel as Gt, registerChaiFeatureFlag as an, registerChaiTopBar as oa, registerChaiMediaManager as la, registerChaiSaveToLibrary as ca, ChaiBuilderEditor as ua } from "@chaibuilder/sdk";
|
|
13
|
+
import { Tooltip as Jt, TooltipTrigger as Zt, Button as M, TooltipContent as Xt, Sheet as Is, SheetContent as Ls, SheetHeader as da, SheetTitle as fa, SheetDescription as ha, DropdownMenu as Nn, DropdownMenuTrigger as Cn, DropdownMenuContent as Gn, DropdownMenuItem as de, Separator as ga, TooltipProvider as Ns, SheetTrigger as ma, Skeleton as Dt, Dialog as Cs, HoverCard as Ea, HoverCardTrigger as pa, HoverCardContent as ya, AlertDialog as Aa, AlertDialogTrigger as Ta, AlertDialogContent as Sa, AlertDialogHeader as _a, AlertDialogTitle as Pa, AlertDialogDescription as wa, AlertDialogFooter as va, AlertDialogCancel as ba, AlertDialogAction as Ia, Popover as La, PopoverTrigger as Na, DialogContent as Ca, DialogHeader as Ga, DialogTitle as Da, Tabs as Oa, TabsList as xa, TabsTrigger as on, TabsContent as ln, Textarea as Yn, Alert as Ra, AlertDescription as ka } from "@chaibuilder/sdk/ui";
|
|
14
|
+
import { LogsIcon as Ua, Folder as Ma, Languages as Jn, ChevronDown as pn, Star as Ba, Plus as Gs, History as Fa, Play as Ka, Palette as Va, CheckCircle as Ha, Loader as Ht, Save as qa, Send as Zn, Rocket as Xn, CopyPlusIcon as $a, Pencil as Qa, Power as za, Trash as Wa, SquareLibrary as es, Hash as ja, File as Ya, MoreHorizontal as ts, ExternalLink as Ja, LanguagesIcon as Za, User as Xa, X as ns, Trash2 as ei, ImageIcon as ss, Code as ti, Eye as ni, Share2 as si, FileCode2 as ri, AlertTriangle as ai } from "lucide-react";
|
|
15
15
|
import { toast as k } from "sonner";
|
|
16
|
-
import { useRegisteredChaiBlocks as
|
|
17
|
-
import { loadWebBlocks as
|
|
18
|
-
const
|
|
16
|
+
import { useRegisteredChaiBlocks as ii, getDefaultBlockProps as oi } from "@chaibuilder/runtime";
|
|
17
|
+
import { loadWebBlocks as li } from "@chaibuilder/sdk/web-blocks";
|
|
18
|
+
const Ot = {
|
|
19
19
|
ab: "Abkhazian",
|
|
20
20
|
aa: "Afar",
|
|
21
21
|
af: "Afrikaans",
|
|
@@ -267,10 +267,10 @@ const Dt = {
|
|
|
267
267
|
UPDATE_ASSET: "UPDATE_ASSET",
|
|
268
268
|
GET_ASSETS: "GET_ASSETS",
|
|
269
269
|
GET_ASSET: "GET_ASSET"
|
|
270
|
-
},
|
|
271
|
-
const [n] =
|
|
270
|
+
}, ci = Ee({}), Dn = () => oe(ci), le = (e, t) => {
|
|
271
|
+
const [n] = Dn();
|
|
272
272
|
return q(() => H(n, e, t), [n, e, t]);
|
|
273
|
-
},
|
|
273
|
+
}, N = () => le("apiUrl", "/chai/api"), Ds = () => le("usersApiUrl", "/chai/users"), zc = () => le("assetsApiUrl", "/chai/assets"), Os = () => le("websocket", null), xs = async (e, t, n = {}) => await fetch(e, {
|
|
274
274
|
method: "POST",
|
|
275
275
|
headers: {
|
|
276
276
|
"Content-Type": "application/json",
|
|
@@ -281,14 +281,14 @@ const Dt = {
|
|
|
281
281
|
if (import.meta.vitest) {
|
|
282
282
|
const { it: e, expect: t } = import.meta.vitest;
|
|
283
283
|
e("should fetch API", async () => {
|
|
284
|
-
const n = await
|
|
284
|
+
const n = await xs("/v1/api/chai", {
|
|
285
285
|
action: "test"
|
|
286
286
|
});
|
|
287
287
|
t(n).toBeDefined();
|
|
288
288
|
});
|
|
289
289
|
}
|
|
290
|
-
const
|
|
291
|
-
const e =
|
|
290
|
+
const Wc = () => {
|
|
291
|
+
const e = b(), t = N();
|
|
292
292
|
return z(
|
|
293
293
|
async ({
|
|
294
294
|
body: n,
|
|
@@ -298,13 +298,13 @@ const Vc = () => {
|
|
|
298
298
|
}) => e(r, n, s, a),
|
|
299
299
|
[e]
|
|
300
300
|
);
|
|
301
|
-
},
|
|
302
|
-
const e = le("onLogout"), t = le("getAccessToken"), n =
|
|
301
|
+
}, b = () => {
|
|
302
|
+
const e = le("onLogout"), t = le("getAccessToken"), n = N();
|
|
303
303
|
return z(
|
|
304
304
|
async (s = n, r, a = {}, i = !1) => {
|
|
305
305
|
const o = await t();
|
|
306
306
|
try {
|
|
307
|
-
const l = H(r, "action", "").toLowerCase(), d = await
|
|
307
|
+
const l = H(r, "action", "").toLowerCase(), d = await xs(s + (l ? `?action=${l}` : ""), r, {
|
|
308
308
|
...a,
|
|
309
309
|
Authorization: `Bearer ${o}`
|
|
310
310
|
});
|
|
@@ -329,7 +329,7 @@ const Vc = () => {
|
|
|
329
329
|
[e, t]
|
|
330
330
|
);
|
|
331
331
|
};
|
|
332
|
-
function
|
|
332
|
+
function ve() {
|
|
333
333
|
const [e, t] = K(
|
|
334
334
|
new URLSearchParams(window.location.search)
|
|
335
335
|
);
|
|
@@ -343,8 +343,8 @@ function we() {
|
|
|
343
343
|
}, []), [e, t];
|
|
344
344
|
}
|
|
345
345
|
const Me = (e) => {
|
|
346
|
-
const t =
|
|
347
|
-
return
|
|
346
|
+
const t = N(), [n] = ve(), s = e ?? n.get("page"), r = b();
|
|
347
|
+
return re({
|
|
348
348
|
queryKey: [E.GET_LANGUAGE_PAGES, s],
|
|
349
349
|
staleTime: 1 / 0,
|
|
350
350
|
gcTime: 0,
|
|
@@ -355,25 +355,25 @@ const Me = (e) => {
|
|
|
355
355
|
action: E.GET_LANGUAGE_PAGES,
|
|
356
356
|
data: { id: s }
|
|
357
357
|
});
|
|
358
|
-
return
|
|
358
|
+
return Ur(Mr(a, "primaryPage"));
|
|
359
359
|
},
|
|
360
360
|
enabled: !!s
|
|
361
361
|
});
|
|
362
|
-
},
|
|
362
|
+
}, ui = Ee(
|
|
363
363
|
null
|
|
364
|
-
),
|
|
365
|
-
const [e] =
|
|
364
|
+
), Rs = () => oe(ui), On = () => {
|
|
365
|
+
const [e] = Rs();
|
|
366
366
|
return (e == null ? void 0 : e.slug) || "";
|
|
367
367
|
};
|
|
368
|
-
function
|
|
368
|
+
function di(e, t) {
|
|
369
369
|
const [n, s] = K(e);
|
|
370
370
|
return ne(() => {
|
|
371
371
|
const r = setTimeout(() => s(e), t);
|
|
372
372
|
return () => clearTimeout(r);
|
|
373
373
|
}, [e, t]), n;
|
|
374
374
|
}
|
|
375
|
-
const
|
|
376
|
-
const { selectedLang: n, fallbackLang: s } =
|
|
375
|
+
const fi = ({ query: e, uuid: t }) => {
|
|
376
|
+
const { selectedLang: n, fallbackLang: s } = Pe(), { data: r } = ce(), a = r == null ? void 0 : r.pageType, i = N(), o = b(), { data: l, isFetching: d } = re({
|
|
377
377
|
queryKey: [E.GET_DYNAMIC_PAGES, e, a, t],
|
|
378
378
|
staleTime: 60 * 60 * 1e3,
|
|
379
379
|
placeholderData: [],
|
|
@@ -384,13 +384,13 @@ const li = ({ query: e, uuid: t }) => {
|
|
|
384
384
|
enabled: !!a
|
|
385
385
|
}), u = q(() => n === "" ? l.filter((f) => f.lang === "" || f.lang === s) : l.filter((f) => f.lang === n), [n, s, l]);
|
|
386
386
|
return { allLangPages: l, data: u, isFetching: d };
|
|
387
|
-
},
|
|
388
|
-
const { selectedLang: e, fallbackLang: t } =
|
|
387
|
+
}, hi = () => {
|
|
388
|
+
const { selectedLang: e, fallbackLang: t } = Pe(), [n, s] = Rs(), [r, a] = K(""), i = di(r, 500), { allLangPages: o, data: l, isFetching: d } = fi({ query: i }), u = z((h) => s(h), [s]), f = z((h) => a(h), [a]), g = z(() => {
|
|
389
389
|
if (!n) return;
|
|
390
|
-
const h = !(n != null && n.primaryPage), p = e.length === 0, T = h ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage,
|
|
390
|
+
const h = !(n != null && n.primaryPage), p = e.length === 0, T = h ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, O = o.filter(
|
|
391
391
|
(y) => (y == null ? void 0 : y.primaryPage) === T || y.id === T
|
|
392
392
|
).find((y) => p ? y.lang === e || y.lang === t : y.lang === e);
|
|
393
|
-
s(
|
|
393
|
+
s(O || n);
|
|
394
394
|
}, [n, e, o, s, t]);
|
|
395
395
|
return {
|
|
396
396
|
isFetching: d,
|
|
@@ -403,25 +403,26 @@ const li = ({ query: e, uuid: t }) => {
|
|
|
403
403
|
updateSearchQuery: f,
|
|
404
404
|
onChangeLanguage: g
|
|
405
405
|
};
|
|
406
|
-
},
|
|
407
|
-
const [e] =
|
|
408
|
-
return { data: q(() => ({ ...
|
|
406
|
+
}, gi = Ee({ lastSaved: void 0 }), ks = () => oe(gi), ce = () => {
|
|
407
|
+
const [e] = ve(), t = e.get("page"), { data: n, isFetching: s } = Me();
|
|
408
|
+
return { data: q(() => ({ ...ie(n, { id: t }) || {} }), [n, t]), isFetching: s };
|
|
409
409
|
}, Ne = () => {
|
|
410
|
-
const [e] =
|
|
411
|
-
return { data: q(() =>
|
|
412
|
-
},
|
|
413
|
-
const { data: e } = Ne(), t = On(), n = le("getLiveUrl",
|
|
410
|
+
const [e] = ve(), t = e.get("lang") ?? "", { data: n, isFetching: s } = Me();
|
|
411
|
+
return { data: q(() => ie(n, { lang: t }) || {}, [n, t]), isFetching: s };
|
|
412
|
+
}, mi = Ee({}), Ei = () => oe(mi), pi = () => {
|
|
413
|
+
const { data: e } = Ne(), t = On(), n = le("getLiveUrl", As), s = e == null ? void 0 : e.slug, r = n(s || "/");
|
|
414
414
|
return t ? r + t : r;
|
|
415
415
|
}, Be = () => {
|
|
416
|
-
const e =
|
|
417
|
-
return
|
|
416
|
+
const e = N(), t = b();
|
|
417
|
+
return re({
|
|
418
418
|
queryKey: [E.GET_WEBSITE_DRAFT_SETTINGS],
|
|
419
419
|
staleTime: 5 * 60 * 1e3,
|
|
420
420
|
placeholderData: {
|
|
421
421
|
languages: [],
|
|
422
422
|
theme: { fontFamily: "", borderRadius: "", colors: {} },
|
|
423
423
|
appKey: "",
|
|
424
|
-
fallbackLang: ""
|
|
424
|
+
fallbackLang: "",
|
|
425
|
+
designTokens: {}
|
|
425
426
|
},
|
|
426
427
|
queryFn: async () => t(e, {
|
|
427
428
|
action: E.GET_WEBSITE_DRAFT_SETTINGS,
|
|
@@ -429,11 +430,11 @@ const li = ({ query: e, uuid: t }) => {
|
|
|
429
430
|
})
|
|
430
431
|
});
|
|
431
432
|
};
|
|
432
|
-
function
|
|
433
|
+
function Us(e, t, n = !1) {
|
|
433
434
|
const s = e.toString() ? `?${e.toString()}` : "/";
|
|
434
435
|
n ? window.history.replaceState(null, "", s) : window.history.pushState({}, "", s), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
435
436
|
}
|
|
436
|
-
const
|
|
437
|
+
const xn = Ee(null), Rn = () => {
|
|
437
438
|
const e = le("currentUser"), t = le("onLogout");
|
|
438
439
|
return {
|
|
439
440
|
isLoggedIn: !!e,
|
|
@@ -456,7 +457,7 @@ const Dn = Ee(null), xn = () => {
|
|
|
456
457
|
FORCE_TAKE_OVER_REQUEST: "FORCE_TAKE_OVER_REQUEST",
|
|
457
458
|
CONTINUE_EDITING_IN_THIS_CLIENT: "CONTINUE_EDITING_IN_THIS_CLIENT",
|
|
458
459
|
CONTINUE_EDITING_IN_THIS_TAB_REQUEST: "CONTINUE_EDITING_IN_THIS_TAB_REQUEST"
|
|
459
|
-
},
|
|
460
|
+
}, yi = ["sync", "join", "leave"], Ai = [
|
|
460
461
|
se.FORCE_TAKE_OVER,
|
|
461
462
|
se.TAKE_OVER_REQUEST,
|
|
462
463
|
se.TAKE_OVER_APPROVED,
|
|
@@ -464,52 +465,52 @@ const Dn = Ee(null), xn = () => {
|
|
|
464
465
|
se.FORCE_TAKE_OVER_REQUEST,
|
|
465
466
|
se.CONTINUE_EDITING_IN_THIS_CLIENT,
|
|
466
467
|
se.CONTINUE_EDITING_IN_THIS_TAB_REQUEST
|
|
467
|
-
],
|
|
468
|
-
const t = {}, n =
|
|
468
|
+
], Ti = Ee({}), Ms = Ee(null), Si = Ee(te.CHECKING), _i = Ee({}), Pi = (e) => {
|
|
469
|
+
const t = {}, n = Br(Ts(e).map(Ss).filter(Boolean), "pageId");
|
|
469
470
|
return Object.entries(n).forEach(
|
|
470
|
-
([s, r]) => t[s] =
|
|
471
|
+
([s, r]) => t[s] = _s(r, "onlineAt")
|
|
471
472
|
), t;
|
|
472
|
-
},
|
|
473
|
-
const t =
|
|
473
|
+
}, wi = (e) => {
|
|
474
|
+
const t = _s(Ts(e).map(Ss).filter(Boolean), "onlineAt"), n = t == null ? void 0 : t.onlineAt;
|
|
474
475
|
return n ? n - 100 : +/* @__PURE__ */ new Date() - 1e3 * 60 * 60 * 4;
|
|
475
476
|
}, en = () => {
|
|
476
|
-
const { user: e } =
|
|
477
|
+
const { user: e } = Rn();
|
|
477
478
|
return e == null ? void 0 : e.id;
|
|
478
|
-
},
|
|
479
|
+
}, vi = () => {
|
|
479
480
|
const { data: e } = Be();
|
|
480
481
|
return `WEBSITE:${e == null ? void 0 : e.appKey}`;
|
|
481
|
-
},
|
|
482
|
+
}, Lt = () => {
|
|
482
483
|
const { data: e } = ce();
|
|
483
484
|
return e == null ? void 0 : e.id;
|
|
484
485
|
}, Ue = crypto.randomUUID();
|
|
485
|
-
let
|
|
486
|
-
const
|
|
487
|
-
const [e, t] =
|
|
486
|
+
let cn = null;
|
|
487
|
+
const Bs = () => {
|
|
488
|
+
const [e, t] = oe(Ti);
|
|
488
489
|
return { pageToUser: e, setPageToUser: t };
|
|
489
490
|
}, pe = () => {
|
|
490
|
-
const [e, t] =
|
|
491
|
+
const [e, t] = oe(Si), n = [te.LOCKED, te.ACTIVE_IN_ANOTHER_TAB].includes(e), s = [te.EDITING].includes(e);
|
|
491
492
|
return { pageStatus: e, setPageStatus: t, isLocked: n, isEditing: s };
|
|
492
|
-
},
|
|
493
|
-
const [e, t] =
|
|
493
|
+
}, Fs = () => {
|
|
494
|
+
const [e, t] = oe(_i);
|
|
494
495
|
return { pageLockMeta: e, setPageLockMeta: t };
|
|
495
|
-
},
|
|
496
|
-
const e =
|
|
496
|
+
}, bi = () => {
|
|
497
|
+
const e = Lt(), { pageToUser: t } = Bs();
|
|
497
498
|
return q(() => t[e], [t, e]);
|
|
498
|
-
},
|
|
499
|
-
const e =
|
|
499
|
+
}, kn = () => {
|
|
500
|
+
const e = Os(), { setPageStatus: t } = pe(), [n] = oe(Ms);
|
|
500
501
|
return ne(() => {
|
|
501
|
-
if (clearTimeout(
|
|
502
|
-
return
|
|
502
|
+
if (clearTimeout(cn), !e)
|
|
503
|
+
return cn = setTimeout(() => {
|
|
503
504
|
e || t(te.EDITING);
|
|
504
|
-
}, 500), () => clearTimeout(
|
|
505
|
+
}, 500), () => clearTimeout(cn);
|
|
505
506
|
}, [e, t]), n;
|
|
506
|
-
},
|
|
507
|
-
const e =
|
|
507
|
+
}, Ii = () => {
|
|
508
|
+
const e = Lt(), t = en(), n = kn(), { setPageToUser: s } = Bs(), { setPageStatus: r, pageStatus: a } = pe(), i = Ie(e);
|
|
508
509
|
return i.current = e, z(
|
|
509
510
|
(o) => {
|
|
510
511
|
const l = o || n;
|
|
511
512
|
if (!l) return [];
|
|
512
|
-
const d = l == null ? void 0 : l.presenceState(), u =
|
|
513
|
+
const d = l == null ? void 0 : l.presenceState(), u = Pi(d);
|
|
513
514
|
s(u);
|
|
514
515
|
const f = u[i.current];
|
|
515
516
|
if (!f)
|
|
@@ -524,8 +525,8 @@ const Rs = () => {
|
|
|
524
525
|
},
|
|
525
526
|
[n, s, r, t, a]
|
|
526
527
|
);
|
|
527
|
-
},
|
|
528
|
-
const e = en(), t =
|
|
528
|
+
}, Li = () => {
|
|
529
|
+
const e = en(), t = Lt(), n = kn(), s = bi(), { setPageLockMeta: r } = Fs(), a = Ie(t);
|
|
529
530
|
return a.current = t, z(
|
|
530
531
|
async (i, o) => {
|
|
531
532
|
if (!n) return;
|
|
@@ -534,8 +535,8 @@ const Rs = () => {
|
|
|
534
535
|
},
|
|
535
536
|
[n, e, s, r]
|
|
536
537
|
);
|
|
537
|
-
},
|
|
538
|
-
const e = en(), t =
|
|
538
|
+
}, Ni = () => {
|
|
539
|
+
const e = en(), t = Lt(), n = kn(), { setPageStatus: s } = pe(), { setPageLockMeta: r } = Fs(), a = Li(), i = Ie(t), { savePageAsync: o } = ke();
|
|
539
540
|
return i.current = t, z(
|
|
540
541
|
(l) => async ({ payload: d }) => {
|
|
541
542
|
const u = d || {};
|
|
@@ -556,7 +557,7 @@ const Rs = () => {
|
|
|
556
557
|
break;
|
|
557
558
|
}
|
|
558
559
|
case se.CONTINUE_EDITING_IN_THIS_CLIENT: {
|
|
559
|
-
const f =
|
|
560
|
+
const f = wi(n == null ? void 0 : n.presenceState());
|
|
560
561
|
s(te.CHECKING), await (n == null ? void 0 : n.track({ onlineAt: f, pageId: i.current, userId: e, clientId: Ue }));
|
|
561
562
|
break;
|
|
562
563
|
}
|
|
@@ -568,8 +569,8 @@ const Rs = () => {
|
|
|
568
569
|
},
|
|
569
570
|
[a, r, s, n, e, o]
|
|
570
571
|
);
|
|
571
|
-
},
|
|
572
|
-
const e =
|
|
572
|
+
}, jc = () => {
|
|
573
|
+
const e = Os(), t = en(), n = Lt(), s = vi(), [r, a] = oe(Ms), i = Ni(), o = Ii(), l = Ie(i), d = Ie(o);
|
|
573
574
|
ne(() => {
|
|
574
575
|
l.current = i, d.current = o;
|
|
575
576
|
}, [i, o]), ne(() => {
|
|
@@ -584,11 +585,11 @@ const Rs = () => {
|
|
|
584
585
|
const u = e.channel(s, {
|
|
585
586
|
config: { presence: { key: Ue } }
|
|
586
587
|
});
|
|
587
|
-
return
|
|
588
|
+
return Ai.forEach((f) => {
|
|
588
589
|
u.on("broadcast", { event: f }, (g) => {
|
|
589
590
|
l.current(f)(g);
|
|
590
591
|
});
|
|
591
|
-
}),
|
|
592
|
+
}), yi.forEach((f) => {
|
|
592
593
|
u.on("presence", { event: f }, () => {
|
|
593
594
|
d.current(u);
|
|
594
595
|
});
|
|
@@ -605,48 +606,48 @@ const Rs = () => {
|
|
|
605
606
|
}), () => {
|
|
606
607
|
r && n && r.untrack();
|
|
607
608
|
}), [r, n, t]);
|
|
608
|
-
},
|
|
609
|
+
}, Un = () => {
|
|
609
610
|
const { data: e } = Be();
|
|
610
611
|
return q(
|
|
611
612
|
() => (e == null ? void 0 : e.fallbackLang) || "en",
|
|
612
613
|
[e]
|
|
613
614
|
);
|
|
614
|
-
},
|
|
615
|
-
const e =
|
|
616
|
-
return
|
|
615
|
+
}, Ks = () => {
|
|
616
|
+
const e = b(), t = N();
|
|
617
|
+
return re({
|
|
617
618
|
queryKey: [E.GET_WEBSITE_PAGES],
|
|
618
619
|
staleTime: 1e3 * 60 * 5,
|
|
619
620
|
queryFn: async () => e(t, { action: E.GET_WEBSITE_PAGES }) || [],
|
|
620
621
|
placeholderData: (n) => n || []
|
|
621
622
|
});
|
|
622
|
-
},
|
|
623
|
-
const t =
|
|
624
|
-
return
|
|
623
|
+
}, Yc = (e) => {
|
|
624
|
+
const t = b(), n = N(), s = Un();
|
|
625
|
+
return re({
|
|
625
626
|
queryKey: [E.GET_WEBSITE_PAGES, e, s],
|
|
626
627
|
staleTime: 1e3 * 60 * 5,
|
|
627
628
|
enabled: !!e,
|
|
628
629
|
queryFn: async () => {
|
|
629
630
|
if (s === e) return {};
|
|
630
631
|
const r = await t(n, { action: E.GET_WEBSITE_PAGES, data: { lang: e } }) || [];
|
|
631
|
-
return
|
|
632
|
+
return Fr(
|
|
632
633
|
Kt(r, (a) => ({ ...a, lang: e })),
|
|
633
634
|
"primaryPage"
|
|
634
635
|
);
|
|
635
636
|
},
|
|
636
637
|
placeholderData: (r) => r || {}
|
|
637
638
|
});
|
|
638
|
-
},
|
|
639
|
-
const { t } =
|
|
639
|
+
}, Ci = V(() => import("./page-manager-new-C8PGR_4a.js")), Vs = ({ children: e }) => {
|
|
640
|
+
const { t } = we(), [n, s] = ve(), r = n.get("page"), { data: a, isFetching: i } = ce(), { data: o, isFetching: l } = Ks(), [d, u] = K(!1), [f, g] = K(!0), { savePage: h } = ke(), p = !!r && !Se(a), { isLocked: T } = pe(), S = q(() => {
|
|
640
641
|
if (!o || l) return !1;
|
|
641
642
|
const v = o.find((U) => U.slug === "/");
|
|
642
643
|
return v == null ? void 0 : v.id;
|
|
643
644
|
}, [o, l]);
|
|
644
645
|
ne(() => {
|
|
645
|
-
if (l || !S || o.some((
|
|
646
|
+
if (l || !S || o.some((I) => I.id === r)) return;
|
|
646
647
|
const U = new URLSearchParams({ page: S });
|
|
647
|
-
|
|
648
|
+
Us(U, s), !l && o && g(!1);
|
|
648
649
|
}, [r, l, o, S, s]);
|
|
649
|
-
const
|
|
650
|
+
const O = !f && !r, y = !f && !i && Se(a), w = d || O || y;
|
|
650
651
|
return /* @__PURE__ */ m(ge, { children: [
|
|
651
652
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ c("div", { className: "relative", children: /* @__PURE__ */ m(Jt, { children: [
|
|
652
653
|
/* @__PURE__ */ c(
|
|
@@ -656,53 +657,53 @@ const Rs = () => {
|
|
|
656
657
|
onClick: () => {
|
|
657
658
|
T || h(), u(!0);
|
|
658
659
|
},
|
|
659
|
-
children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(
|
|
660
|
+
children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(Ua, { className: "h-4 w-4" }) }, "template-viewer")
|
|
660
661
|
}
|
|
661
662
|
),
|
|
662
663
|
/* @__PURE__ */ c(Xt, { side: "right", children: /* @__PURE__ */ c("p", { children: t("Open pages manager") }) })
|
|
663
664
|
] }) }) }),
|
|
664
|
-
/* @__PURE__ */ c(
|
|
665
|
-
|
|
665
|
+
/* @__PURE__ */ c(Is, { open: w, onOpenChange: (v) => !v && p && u(!1), children: /* @__PURE__ */ m(
|
|
666
|
+
Ls,
|
|
666
667
|
{
|
|
667
668
|
side: "left",
|
|
668
669
|
"aria-describedby": "pages-manager-description",
|
|
669
670
|
className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${p ? "" : "sheet-hide-close-btn"}`,
|
|
670
671
|
children: [
|
|
671
|
-
/* @__PURE__ */ m(
|
|
672
|
-
/* @__PURE__ */ m(
|
|
673
|
-
/* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(
|
|
672
|
+
/* @__PURE__ */ m(da, { className: "mb-3 px-4 pt-4", children: [
|
|
673
|
+
/* @__PURE__ */ m(fa, { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
674
|
+
/* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(Ma, { className: "h-4 w-4" }) }),
|
|
674
675
|
/* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
675
676
|
/* @__PURE__ */ c("span", { className: "text-sm font-semibold", children: t("Pages") }),
|
|
676
677
|
/* @__PURE__ */ c("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: t("Manage your site structure") })
|
|
677
678
|
] })
|
|
678
679
|
] }),
|
|
679
|
-
/* @__PURE__ */ c(
|
|
680
|
+
/* @__PURE__ */ c(ha, { className: "sr-only", children: t("Manage your site structure") })
|
|
680
681
|
] }),
|
|
681
|
-
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: w && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
682
|
+
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: w && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(Ci, { close: () => u(!1) }) }) })
|
|
682
683
|
]
|
|
683
684
|
}
|
|
684
685
|
) })
|
|
685
686
|
] });
|
|
686
|
-
},
|
|
687
|
+
}, Gi = V(() => import("./add-new-language-page-BfPVFqO4.js")), Di = () => {
|
|
687
688
|
const e = le("topLeftCorner", null);
|
|
688
|
-
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children:
|
|
689
|
-
},
|
|
689
|
+
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Yr.createElement(e, {}) }) : null;
|
|
690
|
+
}, Oi = ({
|
|
690
691
|
showAdd: e = !0,
|
|
691
692
|
variant: t = "ghost",
|
|
692
693
|
goToDefaultLang: n = !1
|
|
693
694
|
}) => {
|
|
694
|
-
const { fallbackLang: s, languages: r, selectedLang: a, setSelectedLang: i } =
|
|
695
|
+
const { fallbackLang: s, languages: r, selectedLang: a, setSelectedLang: i } = Pe(), o = Se(a) ? s : a, [, l] = ve(), { isLocked: d } = pe(), { t: u } = we();
|
|
695
696
|
ne(() => {
|
|
696
697
|
const y = new URLSearchParams(window.location.search), w = y.get("lang");
|
|
697
698
|
w && (r.includes(w) ? i(w) : (y.delete("lang"), l(y), i("")));
|
|
698
699
|
}, [r, l, i]);
|
|
699
|
-
const [, f] =
|
|
700
|
-
const y =
|
|
700
|
+
const [, f] = oe(xn), { data: g } = ce(), { data: h } = Be(), { data: p } = Me(), T = q(() => {
|
|
701
|
+
const y = Ps(
|
|
701
702
|
Kt(H(h, "languages"), (w) => {
|
|
702
|
-
const v =
|
|
703
|
+
const v = ie(p, { lang: w });
|
|
703
704
|
return {
|
|
704
705
|
key: w,
|
|
705
|
-
value: H(
|
|
706
|
+
value: H(Ot, w, w),
|
|
706
707
|
isLangPageAdded: !!v
|
|
707
708
|
};
|
|
708
709
|
})
|
|
@@ -710,7 +711,7 @@ const Rs = () => {
|
|
|
710
711
|
return [
|
|
711
712
|
{
|
|
712
713
|
key: s,
|
|
713
|
-
value: H(
|
|
714
|
+
value: H(Ot, s),
|
|
714
715
|
isLangPageAdded: !0
|
|
715
716
|
},
|
|
716
717
|
...y
|
|
@@ -721,24 +722,24 @@ const Rs = () => {
|
|
|
721
722
|
detail: {
|
|
722
723
|
fromLang: o,
|
|
723
724
|
toLang: y,
|
|
724
|
-
switchHandler: () =>
|
|
725
|
+
switchHandler: () => O(y)
|
|
725
726
|
}
|
|
726
727
|
});
|
|
727
728
|
window.dispatchEvent(v);
|
|
728
729
|
return;
|
|
729
730
|
}
|
|
730
|
-
|
|
731
|
-
},
|
|
731
|
+
O(y);
|
|
732
|
+
}, O = (y) => {
|
|
732
733
|
i(y);
|
|
733
734
|
const w = new URLSearchParams(window.location.search);
|
|
734
|
-
y === s ? w.delete("lang") : w.set("lang", y),
|
|
735
|
+
y === s ? w.delete("lang") : w.set("lang", y), Us(w, l);
|
|
735
736
|
};
|
|
736
|
-
return
|
|
737
|
-
/* @__PURE__ */ c(
|
|
738
|
-
H(
|
|
739
|
-
/* @__PURE__ */ c(
|
|
740
|
-
] }) : n ? /* @__PURE__ */ c(M, { onClick: () =>
|
|
741
|
-
/* @__PURE__ */ c(
|
|
737
|
+
return Se(r) ? null : d ? /* @__PURE__ */ m(M, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
|
|
738
|
+
/* @__PURE__ */ c(Jn, { className: "h-4 w-4" }),
|
|
739
|
+
H(Ot, o, o),
|
|
740
|
+
/* @__PURE__ */ c(pn, { className: "h-4 w-4" })
|
|
741
|
+
] }) : n ? /* @__PURE__ */ c(M, { onClick: () => O(s), variant: "link", size: "sm", children: u("Switch to default language") }) : /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ m(Nn, { children: [
|
|
742
|
+
/* @__PURE__ */ c(Cn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
|
|
742
743
|
M,
|
|
743
744
|
{
|
|
744
745
|
disabled: !!d,
|
|
@@ -746,17 +747,17 @@ const Rs = () => {
|
|
|
746
747
|
size: "sm",
|
|
747
748
|
className: "ml-px h-max gap-2 py-1.5",
|
|
748
749
|
children: [
|
|
749
|
-
/* @__PURE__ */ c(
|
|
750
|
-
H(
|
|
751
|
-
/* @__PURE__ */ c(
|
|
750
|
+
/* @__PURE__ */ c(Jn, { className: "h-4 w-4" }),
|
|
751
|
+
H(Ot, o, o),
|
|
752
|
+
/* @__PURE__ */ c(pn, { className: "h-4 w-4" })
|
|
752
753
|
]
|
|
753
754
|
}
|
|
754
755
|
) }),
|
|
755
|
-
/* @__PURE__ */ m(
|
|
756
|
+
/* @__PURE__ */ m(Gn, { className: "space-y-1 border-border", children: [
|
|
756
757
|
Kt(
|
|
757
758
|
T.filter((y) => y.isLangPageAdded),
|
|
758
759
|
(y) => /* @__PURE__ */ m(
|
|
759
|
-
|
|
760
|
+
de,
|
|
760
761
|
{
|
|
761
762
|
className: Vt(
|
|
762
763
|
"flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
|
|
@@ -766,7 +767,7 @@ const Rs = () => {
|
|
|
766
767
|
children: [
|
|
767
768
|
/* @__PURE__ */ c("div", { className: "text-slate-600", children: y.value }),
|
|
768
769
|
y.key === s && /* @__PURE__ */ m("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
|
|
769
|
-
/* @__PURE__ */ c(
|
|
770
|
+
/* @__PURE__ */ c(Ba, { fill: "orange", className: "h-2 w-2" }),
|
|
770
771
|
"Primary"
|
|
771
772
|
] })
|
|
772
773
|
]
|
|
@@ -774,8 +775,8 @@ const Rs = () => {
|
|
|
774
775
|
y.value
|
|
775
776
|
)
|
|
776
777
|
),
|
|
777
|
-
e && !
|
|
778
|
-
/* @__PURE__ */ c(
|
|
778
|
+
e && !Se(T.filter((y) => !y.isLangPageAdded)) && /* @__PURE__ */ m(ge, { children: [
|
|
779
|
+
/* @__PURE__ */ c(ga, {}),
|
|
779
780
|
/* @__PURE__ */ m(
|
|
780
781
|
M,
|
|
781
782
|
{
|
|
@@ -789,7 +790,7 @@ const Rs = () => {
|
|
|
789
790
|
},
|
|
790
791
|
className: "text-xs font-normal duration-200 hover:bg-slate-300 hover:text-slate-800",
|
|
791
792
|
children: [
|
|
792
|
-
/* @__PURE__ */ c(
|
|
793
|
+
/* @__PURE__ */ c(Gs, { className: "mr-1 h-3 w-3" }),
|
|
793
794
|
" Add Langauge"
|
|
794
795
|
]
|
|
795
796
|
}
|
|
@@ -798,13 +799,13 @@ const Rs = () => {
|
|
|
798
799
|
] })
|
|
799
800
|
] }) });
|
|
800
801
|
};
|
|
801
|
-
function
|
|
802
|
-
const [e, t] =
|
|
802
|
+
function xi() {
|
|
803
|
+
const [e, t] = oe(xn);
|
|
803
804
|
return /* @__PURE__ */ m("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
|
|
804
|
-
/* @__PURE__ */ c(
|
|
805
|
-
/* @__PURE__ */ c(
|
|
805
|
+
/* @__PURE__ */ c(Di, {}),
|
|
806
|
+
/* @__PURE__ */ c(Vs, {}),
|
|
806
807
|
e && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
807
|
-
|
|
808
|
+
Gi,
|
|
808
809
|
{
|
|
809
810
|
isOpen: !0,
|
|
810
811
|
id: e == null ? void 0 : e.id,
|
|
@@ -816,56 +817,56 @@ function Ci() {
|
|
|
816
817
|
) })
|
|
817
818
|
] });
|
|
818
819
|
}
|
|
819
|
-
function
|
|
820
|
+
function Ri() {
|
|
820
821
|
return /* @__PURE__ */ c("div", { className: "mt-2 space-y-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ m("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
|
|
821
822
|
/* @__PURE__ */ m("div", { className: "flex-1 space-y-1", children: [
|
|
822
|
-
/* @__PURE__ */ c(
|
|
823
|
-
/* @__PURE__ */ c(
|
|
824
|
-
/* @__PURE__ */ c(
|
|
823
|
+
/* @__PURE__ */ c(Dt, { className: "h-4 w-3/4" }),
|
|
824
|
+
/* @__PURE__ */ c(Dt, { className: "h-3 w-1/2" }),
|
|
825
|
+
/* @__PURE__ */ c(Dt, { className: "mt-1 h-5 w-20" })
|
|
825
826
|
] }),
|
|
826
|
-
/* @__PURE__ */ c(
|
|
827
|
+
/* @__PURE__ */ c(Dt, { className: "h-8 w-8 rounded-full" })
|
|
827
828
|
] }, t)) });
|
|
828
829
|
}
|
|
829
|
-
const
|
|
830
|
-
function
|
|
830
|
+
const ki = Q.lazy(() => import("./page-revisions-content-BvYTXKgT.js"));
|
|
831
|
+
function Ui() {
|
|
831
832
|
const [e, t] = Q.useState(!1);
|
|
832
|
-
return /* @__PURE__ */ c(
|
|
833
|
-
/* @__PURE__ */ m(
|
|
834
|
-
/* @__PURE__ */ c(
|
|
833
|
+
return /* @__PURE__ */ c(Ns, { children: /* @__PURE__ */ m(Jt, { delayDuration: 0, children: [
|
|
834
|
+
/* @__PURE__ */ m(Is, { open: e, onOpenChange: t, children: [
|
|
835
|
+
/* @__PURE__ */ c(ma, { asChild: !0, children: /* @__PURE__ */ c(Zt, { asChild: !0, children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2", children: [
|
|
835
836
|
/* @__PURE__ */ m(M, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
|
|
836
|
-
/* @__PURE__ */ c(
|
|
837
|
+
/* @__PURE__ */ c(Fa, { className: "h-4 w-4" }),
|
|
837
838
|
/* @__PURE__ */ c("span", { className: "sr-only", children: "View revision history" })
|
|
838
839
|
] }),
|
|
839
840
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
840
841
|
] }) }) }),
|
|
841
|
-
/* @__PURE__ */ c(
|
|
842
|
+
/* @__PURE__ */ c(Ls, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(X, { fallback: /* @__PURE__ */ c(Ri, {}), children: /* @__PURE__ */ c(ki, { isOpen: e }) }) })
|
|
842
843
|
] }),
|
|
843
844
|
/* @__PURE__ */ c(Xt, { side: "bottom", children: /* @__PURE__ */ c("p", { children: "Revision history" }) })
|
|
844
845
|
] }) });
|
|
845
846
|
}
|
|
846
|
-
const
|
|
847
|
+
const un = ({
|
|
847
848
|
permission: e,
|
|
848
849
|
permissions: t,
|
|
849
850
|
children: n,
|
|
850
851
|
fallback: s = null
|
|
851
852
|
}) => {
|
|
852
|
-
const { hasPermission: r } =
|
|
853
|
+
const { hasPermission: r } = bs();
|
|
853
854
|
return e && !r(e) || t && !t.some((a) => r(a)) ? s : n;
|
|
854
|
-
},
|
|
855
|
+
}, Mi = {
|
|
855
856
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
856
857
|
}, Ce = () => {
|
|
857
|
-
const e =
|
|
858
|
-
return
|
|
858
|
+
const e = N(), t = b();
|
|
859
|
+
return re({
|
|
859
860
|
queryKey: [E.GET_PAGE_TYPES],
|
|
860
861
|
staleTime: 1 / 0,
|
|
861
862
|
placeholderData: [],
|
|
862
863
|
queryFn: async () => t(e, { action: E.GET_PAGE_TYPES })
|
|
863
864
|
});
|
|
864
|
-
},
|
|
865
|
+
}, Bi = (e) => {
|
|
865
866
|
const { data: t } = Ce();
|
|
866
867
|
return q(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
|
|
867
|
-
},
|
|
868
|
-
const e =
|
|
868
|
+
}, Fi = () => {
|
|
869
|
+
const e = N(), t = b();
|
|
869
870
|
return Y({
|
|
870
871
|
mutationFn: async ({ pageType: n, query: s }) => {
|
|
871
872
|
try {
|
|
@@ -881,8 +882,8 @@ const cn = ({
|
|
|
881
882
|
}
|
|
882
883
|
}
|
|
883
884
|
});
|
|
884
|
-
},
|
|
885
|
-
const e =
|
|
885
|
+
}, Jc = () => {
|
|
886
|
+
const e = N(), t = J(), n = b(), { data: s } = Ce();
|
|
886
887
|
return Y({
|
|
887
888
|
mutationFn: async (r) => await n(e, {
|
|
888
889
|
action: E.CREATE_PAGE,
|
|
@@ -897,18 +898,18 @@ const cn = ({
|
|
|
897
898
|
})) : t.invalidateQueries({
|
|
898
899
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
899
900
|
});
|
|
900
|
-
const i = a.template ? `Page created from "${a.template.name}" template` : a.hasSlug === !1 ? "New " + ((o =
|
|
901
|
+
const i = a.template ? `Page created from "${a.template.name}" template` : a.hasSlug === !1 ? "New " + ((o = ie(s, { key: a.pageType })) == null ? void 0 : o.name) + " added successfully" : "New page added successfully";
|
|
901
902
|
k.success(i);
|
|
902
903
|
},
|
|
903
904
|
onError: (r, a) => {
|
|
904
|
-
const i =
|
|
905
|
+
const i = ie(s, { key: a.pageType });
|
|
905
906
|
k.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
906
|
-
description: H(
|
|
907
|
+
description: H(Mi, r.message, r.message)
|
|
907
908
|
});
|
|
908
909
|
}
|
|
909
910
|
});
|
|
910
|
-
},
|
|
911
|
-
const e =
|
|
911
|
+
}, Zc = () => {
|
|
912
|
+
const e = N(), t = J(), n = b(), { data: s } = Ne(), { data: r } = Ce();
|
|
912
913
|
return Y({
|
|
913
914
|
mutationFn: async (a) => await n(e, {
|
|
914
915
|
action: E.UPDATE_PAGE,
|
|
@@ -926,14 +927,14 @@ const cn = ({
|
|
|
926
927
|
});
|
|
927
928
|
},
|
|
928
929
|
onError: (a, i) => {
|
|
929
|
-
const o =
|
|
930
|
+
const o = ie(r, { key: i.pageType });
|
|
930
931
|
k.error(`Failed to update ${o != null && o.hasSlug ? "page" : o.name}.`, {
|
|
931
932
|
description: a.message
|
|
932
933
|
});
|
|
933
934
|
}
|
|
934
935
|
});
|
|
935
|
-
},
|
|
936
|
-
const e =
|
|
936
|
+
}, Xc = () => {
|
|
937
|
+
const e = N(), t = J(), n = b(), { data: s } = Ce();
|
|
937
938
|
return Y({
|
|
938
939
|
mutationFn: async (r) => n(e, {
|
|
939
940
|
action: E.DELETE_PAGE,
|
|
@@ -955,14 +956,14 @@ const cn = ({
|
|
|
955
956
|
});
|
|
956
957
|
},
|
|
957
958
|
onError: (r, a) => {
|
|
958
|
-
const i =
|
|
959
|
+
const i = ie(s, { key: a.pageType });
|
|
959
960
|
k.error(`Failed to delete ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
960
961
|
description: r.message
|
|
961
962
|
});
|
|
962
963
|
}
|
|
963
964
|
});
|
|
964
|
-
},
|
|
965
|
-
const e =
|
|
965
|
+
}, eu = () => {
|
|
966
|
+
const e = N(), t = J(), n = b(), { data: s } = Ce();
|
|
966
967
|
return Y({
|
|
967
968
|
mutationFn: async (r) => n(e, {
|
|
968
969
|
action: E.TAKE_OFFLINE,
|
|
@@ -974,20 +975,20 @@ const cn = ({
|
|
|
974
975
|
}) : t.invalidateQueries({
|
|
975
976
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
976
977
|
});
|
|
977
|
-
const i =
|
|
978
|
+
const i = ie(s, { key: a.pageType });
|
|
978
979
|
k.success(
|
|
979
980
|
i != null && i.hasSlug ? "Page unpublished successfully." : "New " + i.name + " added successfully."
|
|
980
981
|
);
|
|
981
982
|
},
|
|
982
983
|
onError: (r, a) => {
|
|
983
|
-
const i =
|
|
984
|
+
const i = ie(s, { key: a.pageType });
|
|
984
985
|
k.error(`Failed to take offline ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
985
986
|
description: r.message
|
|
986
987
|
});
|
|
987
988
|
}
|
|
988
989
|
});
|
|
989
|
-
},
|
|
990
|
-
const e =
|
|
990
|
+
}, Hs = () => {
|
|
991
|
+
const e = N(), t = b(), n = J(), { data: s } = ce(), { savePageAsync: r } = ke();
|
|
991
992
|
return Y({
|
|
992
993
|
mutationFn: async ({ ids: a }) => (await r(), t(e, {
|
|
993
994
|
action: E.PUBLISH_CHANGES,
|
|
@@ -1006,8 +1007,8 @@ const cn = ({
|
|
|
1006
1007
|
console.log("##", a), k.error("Failed to publish pages.");
|
|
1007
1008
|
}
|
|
1008
1009
|
});
|
|
1009
|
-
},
|
|
1010
|
-
const e =
|
|
1010
|
+
}, tu = () => {
|
|
1011
|
+
const e = N(), t = b(), n = J();
|
|
1011
1012
|
return Y({
|
|
1012
1013
|
mutationFn: async (s) => {
|
|
1013
1014
|
var r;
|
|
@@ -1031,8 +1032,8 @@ const cn = ({
|
|
|
1031
1032
|
k.error("Failed to mark page as template.");
|
|
1032
1033
|
}
|
|
1033
1034
|
});
|
|
1034
|
-
},
|
|
1035
|
-
const e =
|
|
1035
|
+
}, nu = () => {
|
|
1036
|
+
const e = N(), t = b(), n = J();
|
|
1036
1037
|
return Y({
|
|
1037
1038
|
mutationFn: async (s) => t(e, {
|
|
1038
1039
|
action: E.UNMARK_AS_TEMPLATE,
|
|
@@ -1047,8 +1048,8 @@ const cn = ({
|
|
|
1047
1048
|
k.error("Failed to unmark page as template.");
|
|
1048
1049
|
}
|
|
1049
1050
|
});
|
|
1050
|
-
},
|
|
1051
|
-
const e =
|
|
1051
|
+
}, su = () => {
|
|
1052
|
+
const e = N(), t = b(), n = J();
|
|
1052
1053
|
return Y({
|
|
1053
1054
|
mutationFn: async ({ id: s, slug: r }) => t(e, {
|
|
1054
1055
|
action: E.CHANGE_SLUG,
|
|
@@ -1065,17 +1066,17 @@ const cn = ({
|
|
|
1065
1066
|
k.error("Failed to change slug");
|
|
1066
1067
|
}
|
|
1067
1068
|
});
|
|
1068
|
-
},
|
|
1069
|
-
function
|
|
1069
|
+
}, Ki = V(() => import("./publish-pages-content-9VBFj6LH.js"));
|
|
1070
|
+
function Vi({
|
|
1070
1071
|
showModal: e = !1,
|
|
1071
1072
|
onClose: t = () => console.log("Cancelled")
|
|
1072
1073
|
}) {
|
|
1073
|
-
const { mutate: n, isPending: s } =
|
|
1074
|
-
return /* @__PURE__ */ c(
|
|
1075
|
-
} : t, children: e && /* @__PURE__ */ c(X, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(
|
|
1074
|
+
const { mutate: n, isPending: s } = Hs();
|
|
1075
|
+
return /* @__PURE__ */ c(Cs, { open: e, onOpenChange: s ? () => {
|
|
1076
|
+
} : t, children: e && /* @__PURE__ */ c(X, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(Ki, { onClose: t, isPending: s, publishPage: n }) }) });
|
|
1076
1077
|
}
|
|
1077
|
-
const
|
|
1078
|
-
...
|
|
1078
|
+
const ue = {
|
|
1079
|
+
...ta,
|
|
1079
1080
|
//pages
|
|
1080
1081
|
ADD_PAGE: "add_page",
|
|
1081
1082
|
EDIT_PAGE: "edit_page",
|
|
@@ -1111,21 +1112,21 @@ const de = {
|
|
|
1111
1112
|
ADD_MEDIA: "add_media",
|
|
1112
1113
|
EDIT_MEDIA: "edit_media",
|
|
1113
1114
|
DELETE_MEDIA: "delete_media"
|
|
1114
|
-
},
|
|
1115
|
-
const { fallbackLang: t } =
|
|
1115
|
+
}, Hi = (e) => {
|
|
1116
|
+
const { fallbackLang: t } = Pe(), { data: n } = Be(), { data: s, isFetching: r } = Me(), a = q(() => {
|
|
1116
1117
|
const i = { [t]: !0 };
|
|
1117
|
-
return
|
|
1118
|
-
const l =
|
|
1118
|
+
return Kr(H(n, "languages"), (o) => {
|
|
1119
|
+
const l = ie(s, { lang: o });
|
|
1119
1120
|
i[o] = !!l;
|
|
1120
1121
|
}), i;
|
|
1121
1122
|
}, [t, s, n]);
|
|
1122
|
-
return r ||
|
|
1123
|
-
},
|
|
1123
|
+
return r || Se(e) || e && a[e];
|
|
1124
|
+
}, qi = {
|
|
1124
1125
|
particleCount: 350,
|
|
1125
1126
|
spread: 120,
|
|
1126
1127
|
origin: { y: 0.6 },
|
|
1127
1128
|
angle: 90
|
|
1128
|
-
},
|
|
1129
|
+
}, $i = {
|
|
1129
1130
|
TOP_RIGHT: {
|
|
1130
1131
|
angle: 225,
|
|
1131
1132
|
origin: { x: 0.9, y: 0 }
|
|
@@ -1134,29 +1135,29 @@ const de = {
|
|
|
1134
1135
|
angle: 100,
|
|
1135
1136
|
origin: { x: 0.9, y: 0.9 }
|
|
1136
1137
|
}
|
|
1137
|
-
},
|
|
1138
|
+
}, Qi = async () => {
|
|
1138
1139
|
const { default: e } = await import("./confetti.module-DCmCkDyV.js");
|
|
1139
1140
|
return e;
|
|
1140
|
-
},
|
|
1141
|
-
let t =
|
|
1141
|
+
}, dn = (e) => {
|
|
1142
|
+
let t = $i[e];
|
|
1142
1143
|
t || (t = {});
|
|
1143
|
-
const n = { ...
|
|
1144
|
-
|
|
1144
|
+
const n = { ...qi, ...t };
|
|
1145
|
+
Qi().then((s) => s(n));
|
|
1145
1146
|
};
|
|
1146
|
-
function
|
|
1147
|
+
function Mn({
|
|
1147
1148
|
children: e,
|
|
1148
1149
|
content: t,
|
|
1149
1150
|
side: n = "bottom",
|
|
1150
1151
|
delayDuration: s = 700,
|
|
1151
1152
|
showTooltip: r = !0
|
|
1152
1153
|
}) {
|
|
1153
|
-
return r ? /* @__PURE__ */ c(
|
|
1154
|
+
return r ? /* @__PURE__ */ c(Ns, { children: /* @__PURE__ */ m(Jt, { delayDuration: s, children: [
|
|
1154
1155
|
/* @__PURE__ */ c(Zt, { asChild: !0, children: e }),
|
|
1155
1156
|
/* @__PURE__ */ c(Xt, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
|
|
1156
1157
|
] }) }) : e;
|
|
1157
1158
|
}
|
|
1158
|
-
const
|
|
1159
|
-
const { t: e } =
|
|
1159
|
+
const zi = V(() => import("./unpublish-page-c382vh74.js")), Wi = V(() => import("./translation-warning-modal-DalBhNQy.js")), ji = () => {
|
|
1160
|
+
const { t: e } = we(), { selectedLang: t, fallbackLang: n } = Pe(), s = le("getPreviewUrl", async (g) => g), [r, a] = K(""), { data: i } = ce(), { data: o } = Me(), { data: l } = Ce(), d = q(
|
|
1160
1161
|
() => {
|
|
1161
1162
|
var g;
|
|
1162
1163
|
return (g = o == null ? void 0 : o.find((h) => (h == null ? void 0 : h.lang) === t)) == null ? void 0 : g.slug;
|
|
@@ -1164,7 +1165,7 @@ const Hi = V(() => import("./unpublish-page-CxAB3-Cj.js")), qi = V(() => import(
|
|
|
1164
1165
|
[t, o]
|
|
1165
1166
|
), u = z((g) => {
|
|
1166
1167
|
var h;
|
|
1167
|
-
return (h =
|
|
1168
|
+
return (h = ie(l, { key: g })) == null ? void 0 : h.hasSlug;
|
|
1168
1169
|
}, [l]), f = t === n ? "" : t;
|
|
1169
1170
|
return ne(() => {
|
|
1170
1171
|
(async () => {
|
|
@@ -1176,24 +1177,24 @@ const Hi = V(() => import("./unpublish-page-CxAB3-Cj.js")), qi = V(() => import(
|
|
|
1176
1177
|
} else
|
|
1177
1178
|
a("");
|
|
1178
1179
|
})();
|
|
1179
|
-
}, [s, d, i == null ? void 0 : i.pageType, u, i == null ? void 0 : i.id, f]), /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ c(
|
|
1180
|
-
},
|
|
1181
|
-
const { t: e } =
|
|
1180
|
+
}, [s, d, i == null ? void 0 : i.pageType, u, i == null ? void 0 : i.id, f]), /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ c(Mn, { content: e("Open preview in new tab"), delayDuration: 0, children: /* @__PURE__ */ c("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c(M, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ c(Ka, { className: "h-4 w-4" }) }) }) }) });
|
|
1181
|
+
}, Yi = () => {
|
|
1182
|
+
const { t: e } = we(), [t, n] = na();
|
|
1182
1183
|
return /* @__PURE__ */ m(ge, { children: [
|
|
1183
|
-
/* @__PURE__ */ c(
|
|
1184
|
+
/* @__PURE__ */ c(Mn, { content: e("Theme"), delayDuration: 0, children: /* @__PURE__ */ c(
|
|
1184
1185
|
M,
|
|
1185
1186
|
{
|
|
1186
1187
|
variant: t === "theme" ? "outline" : "ghost",
|
|
1187
1188
|
size: "icon",
|
|
1188
1189
|
className: "gap-2",
|
|
1189
1190
|
onClick: () => n(t === "theme" ? "block" : "theme"),
|
|
1190
|
-
children: /* @__PURE__ */ c(
|
|
1191
|
+
children: /* @__PURE__ */ c(Va, { className: "h-4 w-4" })
|
|
1191
1192
|
}
|
|
1192
1193
|
) }),
|
|
1193
1194
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1194
1195
|
] });
|
|
1195
|
-
},
|
|
1196
|
-
const { t: e } =
|
|
1196
|
+
}, Ji = () => {
|
|
1197
|
+
const { t: e } = we(), [t, n] = K(!1), { isLocked: s } = pe(), { savePageAsync: r, saveState: a } = ke();
|
|
1197
1198
|
ne(() => {
|
|
1198
1199
|
const u = (f) => {
|
|
1199
1200
|
a === "UNSAVED" && (f.preventDefault(), f.returnValue = !1);
|
|
@@ -1209,7 +1210,7 @@ const Hi = V(() => import("./unpublish-page-CxAB3-Cj.js")), qi = V(() => import(
|
|
|
1209
1210
|
case "UNSAVED":
|
|
1210
1211
|
return {
|
|
1211
1212
|
tooltipContent: e("Save draft"),
|
|
1212
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1213
|
+
buttonIcon: /* @__PURE__ */ c(qa, { className: "h-4 w-4" }),
|
|
1213
1214
|
buttonClass: "gap-x-1"
|
|
1214
1215
|
};
|
|
1215
1216
|
case "SAVING":
|
|
@@ -1221,7 +1222,7 @@ const Hi = V(() => import("./unpublish-page-CxAB3-Cj.js")), qi = V(() => import(
|
|
|
1221
1222
|
case "SAVED":
|
|
1222
1223
|
return {
|
|
1223
1224
|
tooltipContent: e("Saved"),
|
|
1224
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1225
|
+
buttonIcon: /* @__PURE__ */ c(Ha, { className: "h-4 w-4" }),
|
|
1225
1226
|
buttonClass: "text-green-500 gap-x-1"
|
|
1226
1227
|
};
|
|
1227
1228
|
}
|
|
@@ -1231,8 +1232,8 @@ const Hi = V(() => import("./unpublish-page-CxAB3-Cj.js")), qi = V(() => import(
|
|
|
1231
1232
|
" ",
|
|
1232
1233
|
d
|
|
1233
1234
|
] });
|
|
1234
|
-
},
|
|
1235
|
-
const { t: e } =
|
|
1235
|
+
}, Zi = () => {
|
|
1236
|
+
const { t: e } = we(), { selectedLang: t } = Pe(), { data: n } = Ne(), { data: s } = Me(), [r, a] = K(!1), [i, o] = K(!1), [l, d] = K(null), { savePageAsync: u } = ke(), [f, g] = K(!1), { data: h } = ce(), { mutate: p, isPending: T } = Hs(), { needTranslations: S } = ke(), O = S(), { buttonText: y, buttonClassName: w, isPublished: v } = q(() => {
|
|
1236
1237
|
const P = h && (h == null ? void 0 : h.online);
|
|
1237
1238
|
return {
|
|
1238
1239
|
buttonClassName: P ? "hover:bg-green-600 bg-green-500" : "",
|
|
@@ -1240,16 +1241,16 @@ const Hi = V(() => import("./unpublish-page-CxAB3-Cj.js")), qi = V(() => import(
|
|
|
1240
1241
|
buttonText: e(P ? "Published" : "Publish")
|
|
1241
1242
|
};
|
|
1242
1243
|
}, [h, e]), U = async () => {
|
|
1243
|
-
if (
|
|
1244
|
+
if (O) {
|
|
1244
1245
|
g(!0);
|
|
1245
1246
|
return;
|
|
1246
1247
|
}
|
|
1247
|
-
|
|
1248
|
-
},
|
|
1248
|
+
I();
|
|
1249
|
+
}, I = () => {
|
|
1249
1250
|
const P = [n == null ? void 0 : n.id, n == null ? void 0 : n.primaryPage];
|
|
1250
|
-
p({ ids:
|
|
1251
|
+
p({ ids: Ps(P) }, { onSuccess: () => dn("TOP_RIGHT") });
|
|
1251
1252
|
}, ye = () => {
|
|
1252
|
-
g(!1),
|
|
1253
|
+
g(!1), I();
|
|
1253
1254
|
}, Ae = async () => {
|
|
1254
1255
|
g(!1), await u();
|
|
1255
1256
|
}, B = q(() => Kt(s ?? [], "id"), [s]);
|
|
@@ -1269,38 +1270,38 @@ const Hi = V(() => import("./unpublish-page-CxAB3-Cj.js")), qi = V(() => import(
|
|
|
1269
1270
|
"span",
|
|
1270
1271
|
{
|
|
1271
1272
|
className: `flex items-center transition-transform duration-300 ease-in-out ${i ? "-translate-y-10" : ""}`,
|
|
1272
|
-
children: v ? /* @__PURE__ */ c(
|
|
1273
|
+
children: v ? /* @__PURE__ */ c(Zn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Xn, { className: "h-4 w-4" })
|
|
1273
1274
|
}
|
|
1274
1275
|
),
|
|
1275
1276
|
/* @__PURE__ */ c(
|
|
1276
1277
|
"span",
|
|
1277
1278
|
{
|
|
1278
1279
|
className: `absolute inset-0 left-3 flex items-center transition-transform duration-300 ease-in-out ${i ? "" : "translate-y-10"}`,
|
|
1279
|
-
children: v ? /* @__PURE__ */ c(
|
|
1280
|
+
children: v ? /* @__PURE__ */ c(Xn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Zn, { className: "h-4 w-4" })
|
|
1280
1281
|
}
|
|
1281
1282
|
),
|
|
1282
1283
|
/* @__PURE__ */ c("span", { children: y }),
|
|
1283
|
-
t ? `(${
|
|
1284
|
+
t ? `(${zn(t)})` : ""
|
|
1284
1285
|
]
|
|
1285
1286
|
}
|
|
1286
1287
|
),
|
|
1287
|
-
/* @__PURE__ */ m(
|
|
1288
|
-
/* @__PURE__ */ c(
|
|
1288
|
+
/* @__PURE__ */ m(Nn, { children: [
|
|
1289
|
+
/* @__PURE__ */ c(Cn, { asChild: !0, children: /* @__PURE__ */ c(
|
|
1289
1290
|
M,
|
|
1290
1291
|
{
|
|
1291
1292
|
size: "sm",
|
|
1292
1293
|
disabled: T || !(h != null && h.id),
|
|
1293
1294
|
className: `rounded-l-none border-l border-white/50 px-2 text-white ${w}`,
|
|
1294
|
-
children: /* @__PURE__ */ c(
|
|
1295
|
+
children: /* @__PURE__ */ c(pn, { className: "h-4 w-4" })
|
|
1295
1296
|
}
|
|
1296
1297
|
) }),
|
|
1297
|
-
/* @__PURE__ */ m(
|
|
1298
|
+
/* @__PURE__ */ m(Gn, { align: "end", className: "w-52", children: [
|
|
1298
1299
|
/* @__PURE__ */ m(
|
|
1299
|
-
|
|
1300
|
+
de,
|
|
1300
1301
|
{
|
|
1301
1302
|
disabled: T,
|
|
1302
1303
|
className: "cursor-pointer text-xs",
|
|
1303
|
-
onClick: () => p({ ids: B }, { onSuccess: () =>
|
|
1304
|
+
onClick: () => p({ ids: B }, { onSuccess: () => dn("TOP_RIGHT") }),
|
|
1304
1305
|
children: [
|
|
1305
1306
|
e("Publish"),
|
|
1306
1307
|
" with translation pages"
|
|
@@ -1308,33 +1309,33 @@ const Hi = V(() => import("./unpublish-page-CxAB3-Cj.js")), qi = V(() => import(
|
|
|
1308
1309
|
}
|
|
1309
1310
|
),
|
|
1310
1311
|
!v && /* @__PURE__ */ m(
|
|
1311
|
-
|
|
1312
|
+
de,
|
|
1312
1313
|
{
|
|
1313
1314
|
disabled: T,
|
|
1314
1315
|
className: "cursor-pointer text-xs",
|
|
1315
|
-
onClick: () => p({ ids: [h == null ? void 0 : h.id] }, { onSuccess: () =>
|
|
1316
|
+
onClick: () => p({ ids: [h == null ? void 0 : h.id] }, { onSuccess: () => dn("TOP_RIGHT") }),
|
|
1316
1317
|
children: [
|
|
1317
1318
|
e("Publish"),
|
|
1318
1319
|
" page"
|
|
1319
1320
|
]
|
|
1320
1321
|
}
|
|
1321
1322
|
),
|
|
1322
|
-
/* @__PURE__ */ m(
|
|
1323
|
+
/* @__PURE__ */ m(de, { onClick: () => a(!0), className: "cursor-pointer text-xs", children: [
|
|
1323
1324
|
e("Open"),
|
|
1324
1325
|
" publish menu"
|
|
1325
1326
|
] }),
|
|
1326
|
-
v && /* @__PURE__ */ m(
|
|
1327
|
+
v && /* @__PURE__ */ m(de, { onClick: () => d(n), className: "cursor-pointer text-xs", children: [
|
|
1327
1328
|
e("Unpublish"),
|
|
1328
1329
|
" page ",
|
|
1329
|
-
t ? `(${
|
|
1330
|
+
t ? `(${zn(t)})` : ""
|
|
1330
1331
|
] })
|
|
1331
1332
|
] })
|
|
1332
1333
|
] })
|
|
1333
1334
|
] }),
|
|
1334
|
-
/* @__PURE__ */ c(
|
|
1335
|
-
l && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1335
|
+
/* @__PURE__ */ c(Vi, { showModal: r, onClose: () => a(!1) }),
|
|
1336
|
+
l && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(zi, { page: l, onClose: () => d(null) }) }),
|
|
1336
1337
|
f && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1337
|
-
|
|
1338
|
+
Wi,
|
|
1338
1339
|
{
|
|
1339
1340
|
isOpen: f,
|
|
1340
1341
|
onClose: Ae,
|
|
@@ -1344,17 +1345,17 @@ const Hi = V(() => import("./unpublish-page-CxAB3-Cj.js")), qi = V(() => import(
|
|
|
1344
1345
|
) })
|
|
1345
1346
|
] });
|
|
1346
1347
|
};
|
|
1347
|
-
function
|
|
1348
|
-
const { isLocked: e } = pe(), [t] =
|
|
1348
|
+
function Xi() {
|
|
1349
|
+
const { isLocked: e } = pe(), [t] = ve(), n = t.get("lang"), s = Hi(n);
|
|
1349
1350
|
return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
|
|
1350
|
-
/* @__PURE__ */ c(
|
|
1351
|
-
/* @__PURE__ */ c(
|
|
1352
|
-
/* @__PURE__ */ c(
|
|
1353
|
-
/* @__PURE__ */ c(
|
|
1354
|
-
/* @__PURE__ */ c(
|
|
1351
|
+
/* @__PURE__ */ c(Ui, {}),
|
|
1352
|
+
/* @__PURE__ */ c(un, { permission: ue.EDIT_THEME, children: /* @__PURE__ */ c(Yi, {}) }),
|
|
1353
|
+
/* @__PURE__ */ c(ji, {}),
|
|
1354
|
+
/* @__PURE__ */ c(un, { permission: ue.SAVE_PAGE, children: /* @__PURE__ */ c(Ji, {}) }),
|
|
1355
|
+
/* @__PURE__ */ c(un, { permission: ue.PUBLISH_PAGE, children: /* @__PURE__ */ c(Zi, {}) })
|
|
1355
1356
|
] });
|
|
1356
1357
|
}
|
|
1357
|
-
const
|
|
1358
|
+
const eo = ({
|
|
1358
1359
|
page: e,
|
|
1359
1360
|
setDuplicatePage: t,
|
|
1360
1361
|
setAddEditPage: n,
|
|
@@ -1365,25 +1366,25 @@ const Yi = ({
|
|
|
1365
1366
|
children: o,
|
|
1366
1367
|
isLanguagePage: l
|
|
1367
1368
|
}) => {
|
|
1368
|
-
const { t: d } =
|
|
1369
|
-
return !u(
|
|
1370
|
-
/* @__PURE__ */ c(
|
|
1371
|
-
/* @__PURE__ */ m(
|
|
1372
|
-
u(
|
|
1373
|
-
|
|
1369
|
+
const { t: d } = we(), { hasPermission: u } = bs(), { data: f } = Ce(), g = q(() => ie(f, { key: e.pageType }), [f, e.pageType]), h = q(() => !!e.isTemplate, [e.isTemplate]), p = q(() => !!(g != null && g.hasSlug), [g == null ? void 0 : g.hasSlug]);
|
|
1370
|
+
return !u(ue.EDIT_PAGE) && !u(ue.DELETE_PAGE) && !u(ue.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ m(Nn, { children: [
|
|
1371
|
+
/* @__PURE__ */ c(Cn, { asChild: !0, onClick: (S) => S.stopPropagation(), children: o }),
|
|
1372
|
+
/* @__PURE__ */ m(Gn, { align: "center", className: "text-sm", children: [
|
|
1373
|
+
u(ue.ADD_PAGE) && !l && /* @__PURE__ */ m(
|
|
1374
|
+
de,
|
|
1374
1375
|
{
|
|
1375
1376
|
className: "flex cursor-pointer items-center gap-2",
|
|
1376
1377
|
onClick: (S) => {
|
|
1377
1378
|
S.stopPropagation(), t(e);
|
|
1378
1379
|
},
|
|
1379
1380
|
children: [
|
|
1380
|
-
/* @__PURE__ */ c(
|
|
1381
|
+
/* @__PURE__ */ c($a, { className: "size-3" }),
|
|
1381
1382
|
"Duplicate page"
|
|
1382
1383
|
]
|
|
1383
1384
|
}
|
|
1384
1385
|
),
|
|
1385
|
-
u(
|
|
1386
|
-
|
|
1386
|
+
u(ue.EDIT_PAGE) && /* @__PURE__ */ m(
|
|
1387
|
+
de,
|
|
1387
1388
|
{
|
|
1388
1389
|
className: "flex cursor-pointer items-center gap-2",
|
|
1389
1390
|
onClick: (S) => {
|
|
@@ -1393,84 +1394,84 @@ const Yi = ({
|
|
|
1393
1394
|
});
|
|
1394
1395
|
},
|
|
1395
1396
|
children: [
|
|
1396
|
-
/* @__PURE__ */ c(
|
|
1397
|
+
/* @__PURE__ */ c(Qa, { className: "size-3" }),
|
|
1397
1398
|
"Edit"
|
|
1398
1399
|
]
|
|
1399
1400
|
}
|
|
1400
1401
|
),
|
|
1401
|
-
(e == null ? void 0 : e.online) && u(
|
|
1402
|
-
|
|
1402
|
+
(e == null ? void 0 : e.online) && u(ue.UNPUBLISH_PAGE) && /* @__PURE__ */ m(
|
|
1403
|
+
de,
|
|
1403
1404
|
{
|
|
1404
1405
|
className: "flex cursor-pointer items-center gap-2",
|
|
1405
1406
|
onClick: (S) => {
|
|
1406
1407
|
S.stopPropagation(), s(e);
|
|
1407
1408
|
},
|
|
1408
1409
|
children: [
|
|
1409
|
-
/* @__PURE__ */ c(
|
|
1410
|
+
/* @__PURE__ */ c(za, { className: "size-3" }),
|
|
1410
1411
|
d("Unpublish")
|
|
1411
1412
|
]
|
|
1412
1413
|
}
|
|
1413
1414
|
),
|
|
1414
|
-
u(
|
|
1415
|
-
|
|
1415
|
+
u(ue.DELETE_PAGE) && /* @__PURE__ */ m(
|
|
1416
|
+
de,
|
|
1416
1417
|
{
|
|
1417
1418
|
className: "flex cursor-pointer items-center gap-2",
|
|
1418
1419
|
onClick: (S) => {
|
|
1419
1420
|
S.stopPropagation(), r(e);
|
|
1420
1421
|
},
|
|
1421
1422
|
children: [
|
|
1422
|
-
/* @__PURE__ */ c(
|
|
1423
|
+
/* @__PURE__ */ c(Wa, { className: "size-3" }),
|
|
1423
1424
|
d("Delete")
|
|
1424
1425
|
]
|
|
1425
1426
|
}
|
|
1426
1427
|
),
|
|
1427
|
-
u(
|
|
1428
|
-
|
|
1428
|
+
u(ue.MARK_AS_TEMPLATE) && p && !l && /* @__PURE__ */ c(ge, { children: h ? /* @__PURE__ */ m(
|
|
1429
|
+
de,
|
|
1429
1430
|
{
|
|
1430
1431
|
className: "flex cursor-pointer items-center gap-2",
|
|
1431
1432
|
onClick: (S) => {
|
|
1432
1433
|
S.stopPropagation(), i(e);
|
|
1433
1434
|
},
|
|
1434
1435
|
children: [
|
|
1435
|
-
/* @__PURE__ */ c(
|
|
1436
|
+
/* @__PURE__ */ c(es, { className: "size-3" }),
|
|
1436
1437
|
d("Unmark as template")
|
|
1437
1438
|
]
|
|
1438
1439
|
}
|
|
1439
1440
|
) : /* @__PURE__ */ m(
|
|
1440
|
-
|
|
1441
|
+
de,
|
|
1441
1442
|
{
|
|
1442
1443
|
className: "flex cursor-pointer items-center gap-2",
|
|
1443
1444
|
onClick: (S) => {
|
|
1444
1445
|
S.stopPropagation(), a(e);
|
|
1445
1446
|
},
|
|
1446
1447
|
children: [
|
|
1447
|
-
/* @__PURE__ */ c(
|
|
1448
|
+
/* @__PURE__ */ c(es, { className: "size-3" }),
|
|
1448
1449
|
d("Mark as template")
|
|
1449
1450
|
]
|
|
1450
1451
|
}
|
|
1451
1452
|
) })
|
|
1452
1453
|
] })
|
|
1453
1454
|
] });
|
|
1454
|
-
},
|
|
1455
|
-
const [e, t] = K(null), [n, s] = K(null), [r, a] = K(null), [i, o] = K(null), [l, d] = K(null), [u, f] = K(null), { data: g, isFetching: h } = Ne(), { selectedLang: p, fallbackLang: T } =
|
|
1455
|
+
}, to = V(() => import("./add-new-page-GZdKxwCY.js")), no = V(() => import("./delete-page-CeJdK5hc.js")), so = V(() => import("./duplicate-page-C7FjAbqP.js")), ro = V(() => import("./mark-as-template-CuPKgc5N.js")), ao = V(() => import("./unmark-as-template-Dp6S9dY3.js")), io = V(() => import("./unpublish-page-c382vh74.js")), oo = () => {
|
|
1456
|
+
const [e, t] = K(null), [n, s] = K(null), [r, a] = K(null), [i, o] = K(null), [l, d] = K(null), [u, f] = K(null), { data: g, isFetching: h } = Ne(), { selectedLang: p, fallbackLang: T } = Pe(), { data: S } = Me(), O = S == null ? void 0 : S.find((I) => I.lang === p), { isLocked: y } = pe(), w = !(g != null && g.slug), [, v] = oe(xn);
|
|
1456
1457
|
if (!g) return null;
|
|
1457
|
-
const U = (
|
|
1458
|
+
const U = (I) => {
|
|
1458
1459
|
p.length > 0 && p !== T ? v({
|
|
1459
1460
|
edit: !0,
|
|
1460
|
-
id:
|
|
1461
|
-
primaryPage:
|
|
1462
|
-
}) : f(
|
|
1461
|
+
id: I == null ? void 0 : I.id,
|
|
1462
|
+
primaryPage: I == null ? void 0 : I.primaryPage
|
|
1463
|
+
}) : f(I);
|
|
1463
1464
|
};
|
|
1464
1465
|
return /* @__PURE__ */ m(ge, { children: [
|
|
1465
1466
|
/* @__PURE__ */ m("div", { className: "flex items-center justify-between rounded px-[2px] transition-colors duration-200", children: [
|
|
1466
|
-
/* @__PURE__ */ c(
|
|
1467
|
+
/* @__PURE__ */ c(Vs, { children: /* @__PURE__ */ c(
|
|
1467
1468
|
M,
|
|
1468
1469
|
{
|
|
1469
1470
|
className: "flex h-7 max-w-[200px] cursor-pointer items-center truncate rounded px-1 text-xs font-medium",
|
|
1470
1471
|
variant: "ghost",
|
|
1471
1472
|
children: h ? /* @__PURE__ */ c(Ht, { className: "h-4 w-4 animate-spin text-slate-400" }) : /* @__PURE__ */ m("span", { className: "flex w-full cursor-pointer items-end overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-xs font-medium", children: [
|
|
1472
|
-
w ? /* @__PURE__ */ c(
|
|
1473
|
-
H(
|
|
1473
|
+
w ? /* @__PURE__ */ c(ja, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ c(Ya, { className: "mr-1 h-4 w-4" }),
|
|
1474
|
+
H(O || g, "name") ?? ""
|
|
1474
1475
|
] })
|
|
1475
1476
|
}
|
|
1476
1477
|
) }),
|
|
@@ -1480,25 +1481,25 @@ const Yi = ({
|
|
|
1480
1481
|
variant: "ghost",
|
|
1481
1482
|
size: "icon",
|
|
1482
1483
|
className: "h-7 w-7 cursor-not-allowed rounded opacity-50 hover:bg-transparent",
|
|
1483
|
-
children: /* @__PURE__ */ c(
|
|
1484
|
+
children: /* @__PURE__ */ c(ts, { className: "h-4 w-4" })
|
|
1484
1485
|
}
|
|
1485
1486
|
) : /* @__PURE__ */ c(
|
|
1486
|
-
|
|
1487
|
+
eo,
|
|
1487
1488
|
{
|
|
1488
1489
|
page: g,
|
|
1489
|
-
setDuplicatePage: (
|
|
1490
|
-
setAddEditPage: (
|
|
1491
|
-
setUnpublishPage: (
|
|
1492
|
-
setDeletePage: (
|
|
1493
|
-
setMarkAsTemplate: (
|
|
1494
|
-
setUnmarkAsTemplate: (
|
|
1490
|
+
setDuplicatePage: (I) => d(I),
|
|
1491
|
+
setAddEditPage: (I) => U(I),
|
|
1492
|
+
setUnpublishPage: (I) => s(I),
|
|
1493
|
+
setDeletePage: (I) => t(I),
|
|
1494
|
+
setMarkAsTemplate: (I) => a(I),
|
|
1495
|
+
setUnmarkAsTemplate: (I) => o(I),
|
|
1495
1496
|
isLanguagePage: p.length > 0 && p !== T,
|
|
1496
|
-
children: /* @__PURE__ */ c(M, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ c(
|
|
1497
|
+
children: /* @__PURE__ */ c(M, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ c(ts, { className: "h-4 w-4" }) })
|
|
1497
1498
|
}
|
|
1498
1499
|
)
|
|
1499
1500
|
] }),
|
|
1500
1501
|
u && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1501
|
-
|
|
1502
|
+
to,
|
|
1502
1503
|
{
|
|
1503
1504
|
closePanel: () => f(null),
|
|
1504
1505
|
editPage: () => {
|
|
@@ -1507,12 +1508,12 @@ const Yi = ({
|
|
|
1507
1508
|
setAddEditPage: f
|
|
1508
1509
|
}
|
|
1509
1510
|
) }),
|
|
1510
|
-
e && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1511
|
-
n && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1512
|
-
r && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1513
|
-
i && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1511
|
+
e && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(no, { page: e, onClose: () => t(null) }) }),
|
|
1512
|
+
n && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(io, { page: n, onClose: () => s(null) }) }),
|
|
1513
|
+
r && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(ro, { page: r, onClose: () => a(null) }) }),
|
|
1514
|
+
i && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(ao, { page: i, onClose: () => o(null) }) }),
|
|
1514
1515
|
l && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1515
|
-
|
|
1516
|
+
so,
|
|
1516
1517
|
{
|
|
1517
1518
|
page: l,
|
|
1518
1519
|
onClose: () => d(null),
|
|
@@ -1520,7 +1521,7 @@ const Yi = ({
|
|
|
1520
1521
|
}
|
|
1521
1522
|
) })
|
|
1522
1523
|
] });
|
|
1523
|
-
},
|
|
1524
|
+
}, qs = ({ children: e, className: t = "" }) => /* @__PURE__ */ c(
|
|
1524
1525
|
"div",
|
|
1525
1526
|
{
|
|
1526
1527
|
className: Vt(
|
|
@@ -1529,17 +1530,17 @@ const Yi = ({
|
|
|
1529
1530
|
),
|
|
1530
1531
|
children: e
|
|
1531
1532
|
}
|
|
1532
|
-
),
|
|
1533
|
+
), lo = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(qs, { children: /* @__PURE__ */ m("div", { className: "flex min-w-[300px] max-w-[400px] flex-col items-center justify-center rounded-lg border bg-white p-4 shadow-lg", children: [
|
|
1533
1534
|
/* @__PURE__ */ c("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
|
|
1534
1535
|
/* @__PURE__ */ c("p", { className: "pt-2 text-center text-sm font-light text-gray-600", children: e ? "Please select a page from the list in the top header. This will enable you to edit the page." : "Please add a new page" })
|
|
1535
|
-
] }) }),
|
|
1536
|
-
const { dynamicPage: e, allLangPages: t, isFetching: n } =
|
|
1536
|
+
] }) }), co = V(() => import("./dynamic-page-selector-C_-ihnB7.js")), uo = () => {
|
|
1537
|
+
const { dynamicPage: e, allLangPages: t, isFetching: n } = hi(), s = t.length > 0;
|
|
1537
1538
|
return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
1538
|
-
!e && /* @__PURE__ */ c(
|
|
1539
|
-
/* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1539
|
+
!e && /* @__PURE__ */ c(lo, { hasDynamicPage: s }),
|
|
1540
|
+
/* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(co, {}) })
|
|
1540
1541
|
] });
|
|
1541
|
-
},
|
|
1542
|
-
const { data: e, isFetching: t } = Ne(), { data: n, isFetching: s } = ce(), r = H(n, "dynamic", !1), a = On(), i =
|
|
1542
|
+
}, fo = () => {
|
|
1543
|
+
const { data: e, isFetching: t } = Ne(), { data: n, isFetching: s } = ce(), r = H(n, "dynamic", !1), a = On(), i = sa("dynamic-page-selector"), o = e == null ? void 0 : e.slug, l = !o, d = pi(), u = t || s, g = (l ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
|
|
1543
1544
|
return /* @__PURE__ */ m("div", { className: "relative flex items-center gap-x-1", children: [
|
|
1544
1545
|
/* @__PURE__ */ c(
|
|
1545
1546
|
"div",
|
|
@@ -1548,7 +1549,7 @@ const Yi = ({
|
|
|
1548
1549
|
"flex h-8 w-auto max-w-[600px] items-center rounded-md border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800",
|
|
1549
1550
|
u && "max-w-0 overflow-hidden opacity-0"
|
|
1550
1551
|
),
|
|
1551
|
-
children: /* @__PURE__ */ c(
|
|
1552
|
+
children: /* @__PURE__ */ c(oo, {})
|
|
1552
1553
|
}
|
|
1553
1554
|
),
|
|
1554
1555
|
/* @__PURE__ */ m(
|
|
@@ -1559,7 +1560,7 @@ const Yi = ({
|
|
|
1559
1560
|
u && "max-w-0 overflow-hidden opacity-0"
|
|
1560
1561
|
),
|
|
1561
1562
|
children: [
|
|
1562
|
-
/* @__PURE__ */ c(
|
|
1563
|
+
/* @__PURE__ */ c(Oi, {}),
|
|
1563
1564
|
/* @__PURE__ */ m("div", { className: "flex w-full items-center overflow-hidden", children: [
|
|
1564
1565
|
/* @__PURE__ */ c(
|
|
1565
1566
|
"div",
|
|
@@ -1571,19 +1572,19 @@ const Yi = ({
|
|
|
1571
1572
|
] }) : g
|
|
1572
1573
|
}
|
|
1573
1574
|
),
|
|
1574
|
-
!l && /* @__PURE__ */ c("a", { href: d, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c("div", { className: "ml-2 mr-px flex-shrink-0 rounded-sm p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300", children: /* @__PURE__ */ c(
|
|
1575
|
+
!l && /* @__PURE__ */ c("a", { href: d, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c("div", { className: "ml-2 mr-px flex-shrink-0 rounded-sm p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300", children: /* @__PURE__ */ c(Ja, { className: "h-4 w-4", strokeWidth: 1 }) }) })
|
|
1575
1576
|
] })
|
|
1576
1577
|
]
|
|
1577
1578
|
}
|
|
1578
1579
|
),
|
|
1579
|
-
r && i && /* @__PURE__ */ c(
|
|
1580
|
+
r && i && /* @__PURE__ */ c(uo, {})
|
|
1580
1581
|
] });
|
|
1581
|
-
},
|
|
1582
|
-
/* @__PURE__ */ c(
|
|
1583
|
-
/* @__PURE__ */ c(
|
|
1584
|
-
/* @__PURE__ */ c(
|
|
1585
|
-
] }),
|
|
1586
|
-
const e = J(), { data: t } =
|
|
1582
|
+
}, ho = () => /* @__PURE__ */ m("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
|
|
1583
|
+
/* @__PURE__ */ c(xi, {}),
|
|
1584
|
+
/* @__PURE__ */ c(fo, {}),
|
|
1585
|
+
/* @__PURE__ */ c(Xi, {})
|
|
1586
|
+
] }), $s = () => {
|
|
1587
|
+
const e = J(), { data: t } = re({
|
|
1587
1588
|
queryKey: [E.AI_CONTEXT],
|
|
1588
1589
|
initialData: "",
|
|
1589
1590
|
queryFn: () => "",
|
|
@@ -1595,8 +1596,8 @@ const Yi = ({
|
|
|
1595
1596
|
},
|
|
1596
1597
|
[e]
|
|
1597
1598
|
), aiContext: t };
|
|
1598
|
-
},
|
|
1599
|
-
const e =
|
|
1599
|
+
}, go = () => {
|
|
1600
|
+
const e = N(), { aiContext: t } = $s(), n = b();
|
|
1600
1601
|
return z(
|
|
1601
1602
|
async (s, r, a, i) => n(e, {
|
|
1602
1603
|
action: E.ASK_AI,
|
|
@@ -1604,37 +1605,37 @@ const Yi = ({
|
|
|
1604
1605
|
}),
|
|
1605
1606
|
[e, t, n]
|
|
1606
1607
|
);
|
|
1607
|
-
},
|
|
1608
|
+
}, mo = (e, t) => t.map((n) => {
|
|
1608
1609
|
if (Yt(e, n._type)) {
|
|
1609
|
-
const s =
|
|
1610
|
+
const s = oi(n._type);
|
|
1610
1611
|
return {
|
|
1611
1612
|
...s,
|
|
1612
|
-
...
|
|
1613
|
-
...
|
|
1613
|
+
...Ln(n, [
|
|
1614
|
+
...Hr(s),
|
|
1614
1615
|
"_type",
|
|
1615
1616
|
"_id",
|
|
1616
1617
|
"_name",
|
|
1617
1618
|
"_parent",
|
|
1618
1619
|
"_bindings"
|
|
1619
1620
|
]),
|
|
1620
|
-
...
|
|
1621
|
+
...qr(n, (r, a) => $r(a, "_attrs")),
|
|
1621
1622
|
...n
|
|
1622
1623
|
};
|
|
1623
1624
|
}
|
|
1624
1625
|
return n;
|
|
1625
|
-
}),
|
|
1626
|
-
const t =
|
|
1626
|
+
}), Eo = (e) => {
|
|
1627
|
+
const t = ii();
|
|
1627
1628
|
return q(() => {
|
|
1628
|
-
if (!e ||
|
|
1629
|
-
const n =
|
|
1629
|
+
if (!e || Se(e)) return { blocks: [] };
|
|
1630
|
+
const n = ws(
|
|
1630
1631
|
e,
|
|
1631
|
-
(s) => !
|
|
1632
|
+
(s) => !Vr(s == null ? void 0 : s._type, "@chai/")
|
|
1632
1633
|
);
|
|
1633
|
-
return { blocks:
|
|
1634
|
+
return { blocks: mo(t, n) };
|
|
1634
1635
|
}, [e, t]);
|
|
1635
|
-
},
|
|
1636
|
-
const [e] =
|
|
1637
|
-
return
|
|
1636
|
+
}, po = () => {
|
|
1637
|
+
const [e] = ve(), t = e.get("page"), n = N(), { setAiContext: s } = $s(), [, r] = ks(), [, a] = Ei(), [, i] = ra(), o = b();
|
|
1638
|
+
return re({
|
|
1638
1639
|
queryKey: [E.GET_DRAFT_PAGE, t],
|
|
1639
1640
|
staleTime: 1 / 0,
|
|
1640
1641
|
gcTime: 0,
|
|
@@ -1643,14 +1644,14 @@ const Yi = ({
|
|
|
1643
1644
|
const l = await o(n, {
|
|
1644
1645
|
action: E.GET_DRAFT_PAGE,
|
|
1645
1646
|
data: { id: t, draft: !0 }
|
|
1646
|
-
}), d = l.blocks ?? [], u =
|
|
1647
|
+
}), d = l.blocks ?? [], u = ie(d, { _type: "@chai/ai-context" });
|
|
1647
1648
|
return s(H(u, "_value", "") || ""), r((f) => ({ ...f, lastSaved: l.lastSaved })), a(H(l, "metadata", {})), setTimeout(() => i(!0), 500), d;
|
|
1648
1649
|
},
|
|
1649
1650
|
enabled: !!t
|
|
1650
1651
|
});
|
|
1651
|
-
},
|
|
1652
|
-
const { data: e } = ce(), { data: t } = Ne(), n =
|
|
1653
|
-
return
|
|
1652
|
+
}, yo = () => {
|
|
1653
|
+
const { data: e } = ce(), { data: t } = Ne(), n = N(), s = b(), r = Un(), a = On();
|
|
1654
|
+
return re({
|
|
1654
1655
|
queryKey: [E.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
|
|
1655
1656
|
staleTime: 1 / 0,
|
|
1656
1657
|
gcTime: 0,
|
|
@@ -1678,8 +1679,8 @@ const Yi = ({
|
|
|
1678
1679
|
}),
|
|
1679
1680
|
enabled: !!(e != null && e.pageType) && !!t.id
|
|
1680
1681
|
});
|
|
1681
|
-
},
|
|
1682
|
-
const e =
|
|
1682
|
+
}, Ao = () => {
|
|
1683
|
+
const e = N(), t = J(), n = b();
|
|
1683
1684
|
return Y({
|
|
1684
1685
|
mutationFn: async (s) => n(e, {
|
|
1685
1686
|
action: E.UPDATE_WEBSITE_SETTINGS,
|
|
@@ -1697,8 +1698,8 @@ const Yi = ({
|
|
|
1697
1698
|
});
|
|
1698
1699
|
}
|
|
1699
1700
|
});
|
|
1700
|
-
},
|
|
1701
|
-
const e =
|
|
1701
|
+
}, ru = () => {
|
|
1702
|
+
const e = N(), t = J(), n = b(), { selectedLang: s } = Pe();
|
|
1702
1703
|
return Y({
|
|
1703
1704
|
mutationFn: async (r) => n(e, { action: E.ADD_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1704
1705
|
onSuccess: () => {
|
|
@@ -1712,8 +1713,8 @@ const Yi = ({
|
|
|
1712
1713
|
});
|
|
1713
1714
|
}
|
|
1714
1715
|
});
|
|
1715
|
-
},
|
|
1716
|
-
const e =
|
|
1716
|
+
}, au = () => {
|
|
1717
|
+
const e = N(), t = J(), n = b(), { selectedLang: s } = Pe();
|
|
1717
1718
|
return Y({
|
|
1718
1719
|
mutationFn: async (r) => n(e, { action: E.UPDATE_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1719
1720
|
onSuccess: () => {
|
|
@@ -1727,8 +1728,8 @@ const Yi = ({
|
|
|
1727
1728
|
});
|
|
1728
1729
|
}
|
|
1729
1730
|
});
|
|
1730
|
-
},
|
|
1731
|
-
const e =
|
|
1731
|
+
}, iu = () => {
|
|
1732
|
+
const e = N(), t = J(), n = b();
|
|
1732
1733
|
return Y({
|
|
1733
1734
|
mutationFn: async (s) => n(e, { action: E.DELETE_GLOBAL_SCHEMA, data: { id: s } }),
|
|
1734
1735
|
onSuccess: () => {
|
|
@@ -1742,8 +1743,8 @@ const Yi = ({
|
|
|
1742
1743
|
});
|
|
1743
1744
|
}
|
|
1744
1745
|
});
|
|
1745
|
-
},
|
|
1746
|
-
const e =
|
|
1746
|
+
}, ou = () => {
|
|
1747
|
+
const e = N(), t = b();
|
|
1747
1748
|
return Y({
|
|
1748
1749
|
mutationFn: async (n) => t(e, { action: E.TOGGLE_PAGE_GLOBAL_SCHEMA, data: n }),
|
|
1749
1750
|
onError: (n) => {
|
|
@@ -1752,8 +1753,8 @@ const Yi = ({
|
|
|
1752
1753
|
});
|
|
1753
1754
|
}
|
|
1754
1755
|
});
|
|
1755
|
-
},
|
|
1756
|
-
const e =
|
|
1756
|
+
}, lu = () => {
|
|
1757
|
+
const e = N(), t = b();
|
|
1757
1758
|
return Y({
|
|
1758
1759
|
mutationFn: async (n) => t(e, { action: E.APPLY_SCHEMA_TO_ALL_PAGES, data: { schemaId: n } }),
|
|
1759
1760
|
onSuccess: (n) => {
|
|
@@ -1765,8 +1766,8 @@ const Yi = ({
|
|
|
1765
1766
|
});
|
|
1766
1767
|
}
|
|
1767
1768
|
});
|
|
1768
|
-
},
|
|
1769
|
-
const e =
|
|
1769
|
+
}, cu = () => {
|
|
1770
|
+
const e = N(), t = b();
|
|
1770
1771
|
return Y({
|
|
1771
1772
|
mutationFn: async (n) => t(e, { action: E.REMOVE_SCHEMA_FROM_ALL_PAGES, data: { schemaId: n } }),
|
|
1772
1773
|
onSuccess: (n) => {
|
|
@@ -1778,13 +1779,13 @@ const Yi = ({
|
|
|
1778
1779
|
});
|
|
1779
1780
|
}
|
|
1780
1781
|
});
|
|
1781
|
-
},
|
|
1782
|
+
}, rs = {
|
|
1782
1783
|
async getUILibraryBlock(e, t, n) {
|
|
1783
1784
|
const s = await t(n, {
|
|
1784
1785
|
action: "GET_LIBRARY_ITEM",
|
|
1785
1786
|
data: { id: e.id }
|
|
1786
1787
|
}), r = H(s, "html", ""), a = H(s, "blocks", []);
|
|
1787
|
-
return
|
|
1788
|
+
return Qr(a) ? a : ia(r);
|
|
1788
1789
|
},
|
|
1789
1790
|
async getUILibraryBlocks(e, t, n) {
|
|
1790
1791
|
try {
|
|
@@ -1798,9 +1799,9 @@ const Yi = ({
|
|
|
1798
1799
|
return console.error(s), [];
|
|
1799
1800
|
}
|
|
1800
1801
|
}
|
|
1801
|
-
},
|
|
1802
|
-
const e =
|
|
1803
|
-
return
|
|
1802
|
+
}, To = () => {
|
|
1803
|
+
const e = N(), t = b();
|
|
1804
|
+
return re({
|
|
1804
1805
|
queryKey: ["uiLibraries"],
|
|
1805
1806
|
staleTime: "static",
|
|
1806
1807
|
queryFn: async () => {
|
|
@@ -1808,18 +1809,18 @@ const Yi = ({
|
|
|
1808
1809
|
...r
|
|
1809
1810
|
}));
|
|
1810
1811
|
return s.forEach((r) => {
|
|
1811
|
-
|
|
1812
|
+
aa(r.id, {
|
|
1812
1813
|
name: r.isSiteLibrary ? r.name + " (Current Site) " : r.name,
|
|
1813
1814
|
description: r.description,
|
|
1814
|
-
getBlocksList: (a) =>
|
|
1815
|
-
getBlock: ({ block: a }) =>
|
|
1815
|
+
getBlocksList: (a) => rs.getUILibraryBlocks(a, t, e),
|
|
1816
|
+
getBlock: ({ block: a }) => rs.getUILibraryBlock(a, t, e)
|
|
1816
1817
|
});
|
|
1817
1818
|
}), s;
|
|
1818
1819
|
}
|
|
1819
1820
|
});
|
|
1820
|
-
},
|
|
1821
|
-
const e =
|
|
1822
|
-
return
|
|
1821
|
+
}, So = () => {
|
|
1822
|
+
const e = Ds(), t = b(), { user: n } = Rn(), s = n == null ? void 0 : n.id;
|
|
1823
|
+
return re({
|
|
1823
1824
|
queryKey: [E.GET_ROLE_AND_PERMISSIONS, s],
|
|
1824
1825
|
queryFn: () => t(e, {
|
|
1825
1826
|
action: E.GET_ROLE_AND_PERMISSIONS,
|
|
@@ -1828,8 +1829,8 @@ const Yi = ({
|
|
|
1828
1829
|
enabled: !!s,
|
|
1829
1830
|
staleTime: 1 / 0
|
|
1830
1831
|
});
|
|
1831
|
-
},
|
|
1832
|
-
const e =
|
|
1832
|
+
}, _o = () => {
|
|
1833
|
+
const e = N(), t = b(), [, n] = ks();
|
|
1833
1834
|
return { onSave: async ({
|
|
1834
1835
|
page: r,
|
|
1835
1836
|
blocks: a,
|
|
@@ -1848,15 +1849,15 @@ const Yi = ({
|
|
|
1848
1849
|
return console.error(o), new Error("Failed to save blocks");
|
|
1849
1850
|
}
|
|
1850
1851
|
} };
|
|
1851
|
-
},
|
|
1852
|
-
const { data: e } =
|
|
1852
|
+
}, Po = () => {
|
|
1853
|
+
const { data: e } = Ks(), t = N(), n = b();
|
|
1853
1854
|
return {
|
|
1854
1855
|
getPartialBlocks: z(async () => {
|
|
1855
1856
|
const s = {};
|
|
1856
1857
|
for (const r of e ?? [])
|
|
1857
|
-
|
|
1858
|
+
Se(r == null ? void 0 : r.slug) && (s[r.id] = {
|
|
1858
1859
|
type: r.pageType,
|
|
1859
|
-
name:
|
|
1860
|
+
name: zr(r.name ?? r.slug),
|
|
1860
1861
|
description: ""
|
|
1861
1862
|
});
|
|
1862
1863
|
return s;
|
|
@@ -1869,7 +1870,7 @@ const Yi = ({
|
|
|
1869
1870
|
action: "GET_DRAFT_PAGE",
|
|
1870
1871
|
data: { id: s, draft: !0, editor: !1 }
|
|
1871
1872
|
});
|
|
1872
|
-
return
|
|
1873
|
+
return ws(r.blocks, (a) => Yt(a, "_id"));
|
|
1873
1874
|
} catch (r) {
|
|
1874
1875
|
return console.error(r), [];
|
|
1875
1876
|
}
|
|
@@ -1877,7 +1878,7 @@ const Yi = ({
|
|
|
1877
1878
|
[n, t]
|
|
1878
1879
|
)
|
|
1879
1880
|
};
|
|
1880
|
-
},
|
|
1881
|
+
}, wo = V(() => import("./ai-panel-content-CWw-2gPV.js").then((e) => e.b)), Qs = "chai-chat-panel", vo = ({ className: e = "h-full w-full" }) => /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", version: "1.1", className: e, children: [
|
|
1881
1882
|
/* @__PURE__ */ c("title", { children: "ai" }),
|
|
1882
1883
|
/* @__PURE__ */ c("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ c("g", { id: "icon", fill: "currentColor", transform: "translate(64.000000, 64.000000)", children: /* @__PURE__ */ c(
|
|
1883
1884
|
"path",
|
|
@@ -1886,25 +1887,25 @@ const Yi = ({
|
|
|
1886
1887
|
id: "Combined-Shape"
|
|
1887
1888
|
}
|
|
1888
1889
|
) }) })
|
|
1889
|
-
] }),
|
|
1890
|
-
id:
|
|
1890
|
+
] }), bo = ({ isActive: e, show: t }) => /* @__PURE__ */ c(M, { size: "icon", className: "p-0 [&_svg]:size-6", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(vo, { className: e ? "h-5 w-5 text-white" : "h-5 w-5 text-primary" }) }), Io = {
|
|
1891
|
+
id: Qs,
|
|
1891
1892
|
label: "AI Assistant",
|
|
1892
|
-
button:
|
|
1893
|
-
panel:
|
|
1893
|
+
button: bo,
|
|
1894
|
+
panel: wo,
|
|
1894
1895
|
position: "top"
|
|
1895
|
-
},
|
|
1896
|
+
}, Lo = V(() => import("./lang-panel-p7OYw-2c.js")), No = ({ isActive: e, show: t }) => {
|
|
1896
1897
|
const { data: n } = Be();
|
|
1897
|
-
return !Yt(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(
|
|
1898
|
-
},
|
|
1899
|
-
id:
|
|
1898
|
+
return !Yt(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(Za, { className: "h-4 w-4" }) });
|
|
1899
|
+
}, zs = "lang", Co = {
|
|
1900
|
+
id: zs,
|
|
1900
1901
|
label: "Languages",
|
|
1901
1902
|
position: "top",
|
|
1902
|
-
panel:
|
|
1903
|
-
button:
|
|
1903
|
+
panel: Lo,
|
|
1904
|
+
button: No,
|
|
1904
1905
|
view: "modal",
|
|
1905
1906
|
width: 400
|
|
1906
|
-
},
|
|
1907
|
-
const { data: n } = ce(), s =
|
|
1907
|
+
}, Go = V(() => import("./seo-panel-KjxjFcdp.js")), Ws = "seo", Do = ({ isActive: e, show: t }) => {
|
|
1908
|
+
const { data: n } = ce(), s = Bi(n == null ? void 0 : n.pageType);
|
|
1908
1909
|
return !Yt(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
|
|
1909
1910
|
"svg",
|
|
1910
1911
|
{
|
|
@@ -1923,35 +1924,35 @@ const Yi = ({
|
|
|
1923
1924
|
]
|
|
1924
1925
|
}
|
|
1925
1926
|
) });
|
|
1926
|
-
},
|
|
1927
|
-
id:
|
|
1927
|
+
}, Oo = {
|
|
1928
|
+
id: Ws,
|
|
1928
1929
|
label: "SEO",
|
|
1929
|
-
panel:
|
|
1930
|
-
button:
|
|
1930
|
+
panel: Go,
|
|
1931
|
+
button: Do,
|
|
1931
1932
|
position: "top",
|
|
1932
1933
|
width: 600,
|
|
1933
1934
|
view: "modal"
|
|
1934
|
-
},
|
|
1935
|
-
const { t: e } =
|
|
1936
|
-
return t ? /* @__PURE__ */ m(
|
|
1937
|
-
/* @__PURE__ */ c(
|
|
1938
|
-
/* @__PURE__ */ m(
|
|
1935
|
+
}, js = "user-info", xo = () => {
|
|
1936
|
+
const { t: e } = we(), { user: t, logout: n } = Rn(), s = le("onLogout", As);
|
|
1937
|
+
return t ? /* @__PURE__ */ m(Ea, { children: [
|
|
1938
|
+
/* @__PURE__ */ c(pa, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ c(Xa, { className: "h-4 w-4" }) }) }),
|
|
1939
|
+
/* @__PURE__ */ m(ya, { className: "w-auto space-y-2 p-4", children: [
|
|
1939
1940
|
/* @__PURE__ */ c("div", { className: "text-sm font-medium", children: t.name ?? t.email }),
|
|
1940
1941
|
/* @__PURE__ */ c("div", { className: "text-xs text-muted-foreground", children: t.email }),
|
|
1941
|
-
/* @__PURE__ */ m(
|
|
1942
|
-
/* @__PURE__ */ c(
|
|
1943
|
-
/* @__PURE__ */ m(
|
|
1944
|
-
/* @__PURE__ */ m(
|
|
1945
|
-
/* @__PURE__ */ c(
|
|
1946
|
-
/* @__PURE__ */ c(
|
|
1942
|
+
/* @__PURE__ */ m(Aa, { children: [
|
|
1943
|
+
/* @__PURE__ */ c(Ta, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "outline", size: "sm", className: "w-full", children: e("Logout") }) }),
|
|
1944
|
+
/* @__PURE__ */ m(Sa, { children: [
|
|
1945
|
+
/* @__PURE__ */ m(_a, { children: [
|
|
1946
|
+
/* @__PURE__ */ c(Pa, { children: e("Are you sure you want to logout?") }),
|
|
1947
|
+
/* @__PURE__ */ c(wa, { children: e("You will be redirected to the login page.") })
|
|
1947
1948
|
] }),
|
|
1948
|
-
/* @__PURE__ */ m(
|
|
1949
|
-
/* @__PURE__ */ c(
|
|
1949
|
+
/* @__PURE__ */ m(va, { children: [
|
|
1950
|
+
/* @__PURE__ */ c(ba, { children: e("Cancel") }),
|
|
1950
1951
|
/* @__PURE__ */ c(
|
|
1951
|
-
|
|
1952
|
+
Ia,
|
|
1952
1953
|
{
|
|
1953
1954
|
onClick: () => {
|
|
1954
|
-
n(),
|
|
1955
|
+
n(), Wr(s) && s();
|
|
1955
1956
|
},
|
|
1956
1957
|
children: e("Logout")
|
|
1957
1958
|
}
|
|
@@ -1961,13 +1962,13 @@ const Yi = ({
|
|
|
1961
1962
|
] })
|
|
1962
1963
|
] })
|
|
1963
1964
|
] }) : null;
|
|
1964
|
-
},
|
|
1965
|
-
id:
|
|
1965
|
+
}, Ro = {
|
|
1966
|
+
id: js,
|
|
1966
1967
|
label: "User Info",
|
|
1967
|
-
button:
|
|
1968
|
+
button: xo,
|
|
1968
1969
|
position: "bottom"
|
|
1969
|
-
},
|
|
1970
|
-
Gt(
|
|
1970
|
+
}, ko = () => {
|
|
1971
|
+
Gt(Ws, Oo), Gt(zs, Co), Gt(js, Ro), (localStorage.getItem("chai-feature-flags") ?? "").includes("enable-ai-chat-panel") && Gt(Qs, Io);
|
|
1971
1972
|
};
|
|
1972
1973
|
var _ = {
|
|
1973
1974
|
context: void 0,
|
|
@@ -1975,39 +1976,39 @@ var _ = {
|
|
|
1975
1976
|
effects: void 0,
|
|
1976
1977
|
done: !1,
|
|
1977
1978
|
getContextId() {
|
|
1978
|
-
return
|
|
1979
|
+
return as(this.context.count);
|
|
1979
1980
|
},
|
|
1980
1981
|
getNextContextId() {
|
|
1981
|
-
return
|
|
1982
|
+
return as(this.context.count++);
|
|
1982
1983
|
}
|
|
1983
1984
|
};
|
|
1984
|
-
function
|
|
1985
|
+
function as(e) {
|
|
1985
1986
|
const t = String(e), n = t.length - 1;
|
|
1986
1987
|
return _.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
|
|
1987
1988
|
}
|
|
1988
|
-
function
|
|
1989
|
+
function ot(e) {
|
|
1989
1990
|
_.context = e;
|
|
1990
1991
|
}
|
|
1991
|
-
var
|
|
1992
|
-
equals:
|
|
1993
|
-
},
|
|
1992
|
+
var Ys = !1, Uo = (e, t) => e === t, qt = Symbol("solid-proxy"), Js = typeof Proxy == "function", Zs = Symbol("solid-track"), $t = {
|
|
1993
|
+
equals: Uo
|
|
1994
|
+
}, Xs = ir, be = 1, Qt = 2, er = {
|
|
1994
1995
|
owned: null,
|
|
1995
1996
|
cleanups: null,
|
|
1996
1997
|
context: null,
|
|
1997
1998
|
owner: null
|
|
1998
|
-
},
|
|
1999
|
+
}, fn = {}, C = null, hn = null, Mo = null, x = null, ee = null, _e = null, tn = 0;
|
|
1999
2000
|
function xe(e, t) {
|
|
2000
|
-
const n = x, s =
|
|
2001
|
+
const n = x, s = C, r = e.length === 0, a = t === void 0 ? s : t, i = r ? er : {
|
|
2001
2002
|
owned: null,
|
|
2002
2003
|
cleanups: null,
|
|
2003
2004
|
context: a ? a.context : null,
|
|
2004
2005
|
owner: a
|
|
2005
|
-
}, o = r ? e : () => e(() => Z(() =>
|
|
2006
|
-
|
|
2006
|
+
}, o = r ? e : () => e(() => Z(() => dt(i)));
|
|
2007
|
+
C = i, x = null;
|
|
2007
2008
|
try {
|
|
2008
2009
|
return me(o, !0);
|
|
2009
2010
|
} finally {
|
|
2010
|
-
x = n,
|
|
2011
|
+
x = n, C = s;
|
|
2011
2012
|
}
|
|
2012
2013
|
}
|
|
2013
2014
|
function F(e, t) {
|
|
@@ -2017,82 +2018,82 @@ function F(e, t) {
|
|
|
2017
2018
|
observers: null,
|
|
2018
2019
|
observerSlots: null,
|
|
2019
2020
|
comparator: t.equals || void 0
|
|
2020
|
-
}, s = (r) => (typeof r == "function" && (r = r(n.value)),
|
|
2021
|
-
return [
|
|
2021
|
+
}, s = (r) => (typeof r == "function" && (r = r(n.value)), ar(n, r));
|
|
2022
|
+
return [rr.bind(n), s];
|
|
2022
2023
|
}
|
|
2023
|
-
function
|
|
2024
|
-
const s = nn(e, t, !0,
|
|
2025
|
-
|
|
2024
|
+
function Bo(e, t, n) {
|
|
2025
|
+
const s = nn(e, t, !0, be);
|
|
2026
|
+
it(s);
|
|
2026
2027
|
}
|
|
2027
2028
|
function Re(e, t, n) {
|
|
2028
|
-
const s = nn(e, t, !1,
|
|
2029
|
-
|
|
2029
|
+
const s = nn(e, t, !1, be);
|
|
2030
|
+
it(s);
|
|
2030
2031
|
}
|
|
2031
|
-
function
|
|
2032
|
-
|
|
2033
|
-
const s = nn(e, t, !1,
|
|
2034
|
-
(!n || !n.render) && (s.user = !0),
|
|
2032
|
+
function tr(e, t, n) {
|
|
2033
|
+
Xs = Wo;
|
|
2034
|
+
const s = nn(e, t, !1, be);
|
|
2035
|
+
(!n || !n.render) && (s.user = !0), _e ? _e.push(s) : it(s);
|
|
2035
2036
|
}
|
|
2036
|
-
function
|
|
2037
|
+
function j(e, t, n) {
|
|
2037
2038
|
n = n ? Object.assign({}, $t, n) : $t;
|
|
2038
2039
|
const s = nn(e, t, !0, 0);
|
|
2039
|
-
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0,
|
|
2040
|
+
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, it(s), rr.bind(s);
|
|
2040
2041
|
}
|
|
2041
|
-
function
|
|
2042
|
+
function Fo(e) {
|
|
2042
2043
|
return e && typeof e == "object" && "then" in e;
|
|
2043
2044
|
}
|
|
2044
|
-
function
|
|
2045
|
+
function Ko(e, t, n) {
|
|
2045
2046
|
let s, r, a;
|
|
2046
2047
|
s = !0, r = e, a = {};
|
|
2047
|
-
let i = null, o =
|
|
2048
|
-
const g = /* @__PURE__ */ new Set(), [h, p] = (a.storage || F)(a.initialValue), [T, S] = F(void 0), [
|
|
2048
|
+
let i = null, o = fn, l = null, d = !1, u = "initialValue" in a, f = typeof s == "function" && j(s);
|
|
2049
|
+
const g = /* @__PURE__ */ new Set(), [h, p] = (a.storage || F)(a.initialValue), [T, S] = F(void 0), [O, y] = F(void 0, {
|
|
2049
2050
|
equals: !1
|
|
2050
2051
|
}), [w, v] = F(u ? "ready" : "unresolved");
|
|
2051
2052
|
_.context && (l = _.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : _.load && _.has(l) && (o = _.load(l)));
|
|
2052
|
-
function U(P,
|
|
2053
|
-
return i === P && (i = null, $ !== void 0 && (u = !0), (P === o ||
|
|
2054
|
-
value:
|
|
2055
|
-
})), o =
|
|
2053
|
+
function U(P, L, W, $) {
|
|
2054
|
+
return i === P && (i = null, $ !== void 0 && (u = !0), (P === o || L === o) && a.onHydrated && queueMicrotask(() => a.onHydrated($, {
|
|
2055
|
+
value: L
|
|
2056
|
+
})), o = fn, I(L, W)), L;
|
|
2056
2057
|
}
|
|
2057
|
-
function
|
|
2058
|
+
function I(P, L) {
|
|
2058
2059
|
me(() => {
|
|
2059
|
-
|
|
2060
|
-
for (const
|
|
2060
|
+
L === void 0 && p(() => P), v(L !== void 0 ? "errored" : u ? "ready" : "unresolved"), S(L);
|
|
2061
|
+
for (const W of g.keys()) W.decrement();
|
|
2061
2062
|
g.clear();
|
|
2062
2063
|
}, !1);
|
|
2063
2064
|
}
|
|
2064
2065
|
function ye() {
|
|
2065
|
-
const P =
|
|
2066
|
-
if (
|
|
2067
|
-
return x && x.user,
|
|
2066
|
+
const P = $o, L = h(), W = T();
|
|
2067
|
+
if (W !== void 0 && !i) throw W;
|
|
2068
|
+
return x && x.user, L;
|
|
2068
2069
|
}
|
|
2069
2070
|
function Ae(P = !0) {
|
|
2070
2071
|
if (P !== !1 && d) return;
|
|
2071
2072
|
d = !1;
|
|
2072
|
-
const
|
|
2073
|
-
if (
|
|
2073
|
+
const L = f ? f() : s;
|
|
2074
|
+
if (L == null || L === !1) {
|
|
2074
2075
|
U(i, Z(h));
|
|
2075
2076
|
return;
|
|
2076
2077
|
}
|
|
2077
|
-
let
|
|
2078
|
-
const $ = o !==
|
|
2078
|
+
let W;
|
|
2079
|
+
const $ = o !== fn ? o : Z(() => {
|
|
2079
2080
|
try {
|
|
2080
|
-
return r(
|
|
2081
|
+
return r(L, {
|
|
2081
2082
|
value: h(),
|
|
2082
2083
|
refetching: P
|
|
2083
2084
|
});
|
|
2084
|
-
} catch (
|
|
2085
|
-
|
|
2085
|
+
} catch (fe) {
|
|
2086
|
+
W = fe;
|
|
2086
2087
|
}
|
|
2087
2088
|
});
|
|
2088
|
-
if (
|
|
2089
|
-
U(i, void 0, Bt(
|
|
2089
|
+
if (W !== void 0) {
|
|
2090
|
+
U(i, void 0, Bt(W), L);
|
|
2090
2091
|
return;
|
|
2091
|
-
} else if (!
|
|
2092
|
-
return U(i, $, void 0,
|
|
2093
|
-
return i = $, "v" in $ ? ($.s === 1 ? U(i, $.v, void 0,
|
|
2092
|
+
} else if (!Fo($))
|
|
2093
|
+
return U(i, $, void 0, L), $;
|
|
2094
|
+
return i = $, "v" in $ ? ($.s === 1 ? U(i, $.v, void 0, L) : U(i, void 0, Bt($.v), L), $) : (d = !0, queueMicrotask(() => d = !1), me(() => {
|
|
2094
2095
|
v(u ? "refreshing" : "pending"), y();
|
|
2095
|
-
}, !1), $.then((
|
|
2096
|
+
}, !1), $.then((fe) => U($, fe, void 0, L), (fe) => U($, void 0, Bt(fe), L)));
|
|
2096
2097
|
}
|
|
2097
2098
|
Object.defineProperties(ye, {
|
|
2098
2099
|
state: {
|
|
@@ -2116,13 +2117,13 @@ function Uo(e, t, n) {
|
|
|
2116
2117
|
}
|
|
2117
2118
|
}
|
|
2118
2119
|
});
|
|
2119
|
-
let B =
|
|
2120
|
-
return f ?
|
|
2121
|
-
refetch: (P) =>
|
|
2120
|
+
let B = C;
|
|
2121
|
+
return f ? Bo(() => (B = C, Ae(!1))) : Ae(!1), [ye, {
|
|
2122
|
+
refetch: (P) => nr(B, () => Ae(P)),
|
|
2122
2123
|
mutate: p
|
|
2123
2124
|
}];
|
|
2124
2125
|
}
|
|
2125
|
-
function
|
|
2126
|
+
function uu(e) {
|
|
2126
2127
|
return me(e, !1);
|
|
2127
2128
|
}
|
|
2128
2129
|
function Z(e) {
|
|
@@ -2135,7 +2136,7 @@ function Z(e) {
|
|
|
2135
2136
|
x = t;
|
|
2136
2137
|
}
|
|
2137
2138
|
}
|
|
2138
|
-
function
|
|
2139
|
+
function du(e, t, n) {
|
|
2139
2140
|
const s = Array.isArray(e);
|
|
2140
2141
|
let r, a = n && n.defer;
|
|
2141
2142
|
return (i) => {
|
|
@@ -2150,64 +2151,64 @@ function au(e, t, n) {
|
|
|
2150
2151
|
return r = o, l;
|
|
2151
2152
|
};
|
|
2152
2153
|
}
|
|
2153
|
-
function
|
|
2154
|
-
|
|
2154
|
+
function Vo(e) {
|
|
2155
|
+
tr(() => Z(e));
|
|
2155
2156
|
}
|
|
2156
|
-
function
|
|
2157
|
-
return
|
|
2157
|
+
function ut(e) {
|
|
2158
|
+
return C === null || (C.cleanups === null ? C.cleanups = [e] : C.cleanups.push(e)), e;
|
|
2158
2159
|
}
|
|
2159
|
-
function
|
|
2160
|
-
return
|
|
2160
|
+
function is() {
|
|
2161
|
+
return C;
|
|
2161
2162
|
}
|
|
2162
|
-
function
|
|
2163
|
-
const n =
|
|
2164
|
-
|
|
2163
|
+
function nr(e, t) {
|
|
2164
|
+
const n = C, s = x;
|
|
2165
|
+
C = e, x = null;
|
|
2165
2166
|
try {
|
|
2166
2167
|
return me(t, !0);
|
|
2167
2168
|
} catch (r) {
|
|
2168
|
-
|
|
2169
|
+
Bn(r);
|
|
2169
2170
|
} finally {
|
|
2170
|
-
|
|
2171
|
+
C = n, x = s;
|
|
2171
2172
|
}
|
|
2172
2173
|
}
|
|
2173
|
-
function
|
|
2174
|
-
const t = x, n =
|
|
2174
|
+
function Ho(e) {
|
|
2175
|
+
const t = x, n = C;
|
|
2175
2176
|
return Promise.resolve().then(() => {
|
|
2176
|
-
x = t,
|
|
2177
|
+
x = t, C = n;
|
|
2177
2178
|
let s;
|
|
2178
|
-
return me(e, !1), x =
|
|
2179
|
+
return me(e, !1), x = C = null, s ? s.done : void 0;
|
|
2179
2180
|
});
|
|
2180
2181
|
}
|
|
2181
|
-
var [
|
|
2182
|
-
function
|
|
2183
|
-
return [
|
|
2182
|
+
var [qo, fu] = /* @__PURE__ */ F(!1);
|
|
2183
|
+
function hu() {
|
|
2184
|
+
return [qo, Ho];
|
|
2184
2185
|
}
|
|
2185
|
-
function
|
|
2186
|
+
function gu(e, t) {
|
|
2186
2187
|
const n = Symbol("context");
|
|
2187
2188
|
return {
|
|
2188
2189
|
id: n,
|
|
2189
|
-
Provider:
|
|
2190
|
+
Provider: jo(n),
|
|
2190
2191
|
defaultValue: e
|
|
2191
2192
|
};
|
|
2192
2193
|
}
|
|
2193
|
-
function
|
|
2194
|
+
function mu(e) {
|
|
2194
2195
|
let t;
|
|
2195
|
-
return
|
|
2196
|
+
return C && C.context && (t = C.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
2196
2197
|
}
|
|
2197
|
-
function
|
|
2198
|
-
const t =
|
|
2198
|
+
function sr(e) {
|
|
2199
|
+
const t = j(e), n = j(() => yn(t()));
|
|
2199
2200
|
return n.toArray = () => {
|
|
2200
2201
|
const s = n();
|
|
2201
2202
|
return Array.isArray(s) ? s : s != null ? [s] : [];
|
|
2202
2203
|
}, n;
|
|
2203
2204
|
}
|
|
2204
|
-
var
|
|
2205
|
-
function
|
|
2205
|
+
var $o;
|
|
2206
|
+
function rr() {
|
|
2206
2207
|
if (this.sources && this.state)
|
|
2207
|
-
if (this.state ===
|
|
2208
|
+
if (this.state === be) it(this);
|
|
2208
2209
|
else {
|
|
2209
2210
|
const e = ee;
|
|
2210
|
-
ee = null, me(() =>
|
|
2211
|
+
ee = null, me(() => Wt(this), !1), ee = e;
|
|
2211
2212
|
}
|
|
2212
2213
|
if (x) {
|
|
2213
2214
|
const e = this.observers ? this.observers.length : 0;
|
|
@@ -2215,37 +2216,37 @@ function er() {
|
|
|
2215
2216
|
}
|
|
2216
2217
|
return this.value;
|
|
2217
2218
|
}
|
|
2218
|
-
function
|
|
2219
|
+
function ar(e, t, n) {
|
|
2219
2220
|
let s = e.value;
|
|
2220
2221
|
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && me(() => {
|
|
2221
2222
|
for (let r = 0; r < e.observers.length; r += 1) {
|
|
2222
|
-
const a = e.observers[r], i =
|
|
2223
|
-
i &&
|
|
2223
|
+
const a = e.observers[r], i = hn && hn.running;
|
|
2224
|
+
i && hn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ee.push(a) : _e.push(a), a.observers && or(a)), i || (a.state = be);
|
|
2224
2225
|
}
|
|
2225
2226
|
if (ee.length > 1e6)
|
|
2226
2227
|
throw ee = [], new Error();
|
|
2227
2228
|
}, !1)), t;
|
|
2228
2229
|
}
|
|
2229
|
-
function
|
|
2230
|
+
function it(e) {
|
|
2230
2231
|
if (!e.fn) return;
|
|
2231
|
-
|
|
2232
|
+
dt(e);
|
|
2232
2233
|
const t = tn;
|
|
2233
|
-
|
|
2234
|
+
Qo(e, e.value, t);
|
|
2234
2235
|
}
|
|
2235
|
-
function
|
|
2236
|
+
function Qo(e, t, n) {
|
|
2236
2237
|
let s;
|
|
2237
|
-
const r =
|
|
2238
|
-
x =
|
|
2238
|
+
const r = C, a = x;
|
|
2239
|
+
x = C = e;
|
|
2239
2240
|
try {
|
|
2240
2241
|
s = e.fn(t);
|
|
2241
2242
|
} catch (i) {
|
|
2242
|
-
return e.pure && (e.state =
|
|
2243
|
+
return e.pure && (e.state = be, e.owned && e.owned.forEach(dt), e.owned = null), e.updatedAt = n + 1, Bn(i);
|
|
2243
2244
|
} finally {
|
|
2244
|
-
x = a,
|
|
2245
|
+
x = a, C = r;
|
|
2245
2246
|
}
|
|
2246
|
-
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ?
|
|
2247
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? ar(e, s) : e.value = s, e.updatedAt = n);
|
|
2247
2248
|
}
|
|
2248
|
-
function nn(e, t, n, s =
|
|
2249
|
+
function nn(e, t, n, s = be, r) {
|
|
2249
2250
|
const a = {
|
|
2250
2251
|
fn: e,
|
|
2251
2252
|
state: s,
|
|
@@ -2255,47 +2256,47 @@ function nn(e, t, n, s = ve, r) {
|
|
|
2255
2256
|
sourceSlots: null,
|
|
2256
2257
|
cleanups: null,
|
|
2257
2258
|
value: t,
|
|
2258
|
-
owner:
|
|
2259
|
-
context:
|
|
2259
|
+
owner: C,
|
|
2260
|
+
context: C ? C.context : null,
|
|
2260
2261
|
pure: n
|
|
2261
2262
|
};
|
|
2262
|
-
return
|
|
2263
|
+
return C === null || C !== er && (C.owned ? C.owned.push(a) : C.owned = [a]), a;
|
|
2263
2264
|
}
|
|
2264
2265
|
function zt(e) {
|
|
2265
2266
|
if (e.state === 0) return;
|
|
2266
|
-
if (e.state === Qt) return
|
|
2267
|
+
if (e.state === Qt) return Wt(e);
|
|
2267
2268
|
if (e.suspense && Z(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
2268
2269
|
const t = [e];
|
|
2269
2270
|
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < tn); )
|
|
2270
2271
|
e.state && t.push(e);
|
|
2271
2272
|
for (let n = t.length - 1; n >= 0; n--)
|
|
2272
|
-
if (e = t[n], e.state ===
|
|
2273
|
-
|
|
2273
|
+
if (e = t[n], e.state === be)
|
|
2274
|
+
it(e);
|
|
2274
2275
|
else if (e.state === Qt) {
|
|
2275
2276
|
const s = ee;
|
|
2276
|
-
ee = null, me(() =>
|
|
2277
|
+
ee = null, me(() => Wt(e, t[0]), !1), ee = s;
|
|
2277
2278
|
}
|
|
2278
2279
|
}
|
|
2279
2280
|
function me(e, t) {
|
|
2280
2281
|
if (ee) return e();
|
|
2281
2282
|
let n = !1;
|
|
2282
|
-
t || (ee = []),
|
|
2283
|
+
t || (ee = []), _e ? n = !0 : _e = [], tn++;
|
|
2283
2284
|
try {
|
|
2284
2285
|
const s = e();
|
|
2285
|
-
return
|
|
2286
|
+
return zo(n), s;
|
|
2286
2287
|
} catch (s) {
|
|
2287
|
-
n || (
|
|
2288
|
+
n || (_e = null), ee = null, Bn(s);
|
|
2288
2289
|
}
|
|
2289
2290
|
}
|
|
2290
|
-
function
|
|
2291
|
-
if (ee && (
|
|
2292
|
-
const t =
|
|
2293
|
-
|
|
2291
|
+
function zo(e) {
|
|
2292
|
+
if (ee && (ir(ee), ee = null), e) return;
|
|
2293
|
+
const t = _e;
|
|
2294
|
+
_e = null, t.length && me(() => Xs(t), !1);
|
|
2294
2295
|
}
|
|
2295
|
-
function
|
|
2296
|
+
function ir(e) {
|
|
2296
2297
|
for (let t = 0; t < e.length; t++) zt(e[t]);
|
|
2297
2298
|
}
|
|
2298
|
-
function
|
|
2299
|
+
function Wo(e) {
|
|
2299
2300
|
let t, n = 0;
|
|
2300
2301
|
for (t = 0; t < e.length; t++) {
|
|
2301
2302
|
const s = e[t];
|
|
@@ -2306,27 +2307,27 @@ function qo(e) {
|
|
|
2306
2307
|
_.effects || (_.effects = []), _.effects.push(...e.slice(0, n));
|
|
2307
2308
|
return;
|
|
2308
2309
|
}
|
|
2309
|
-
|
|
2310
|
+
ot();
|
|
2310
2311
|
}
|
|
2311
2312
|
for (_.effects && (_.done || !_.count) && (e = [..._.effects, ...e], n += _.effects.length, delete _.effects), t = 0; t < n; t++) zt(e[t]);
|
|
2312
2313
|
}
|
|
2313
|
-
function
|
|
2314
|
+
function Wt(e, t) {
|
|
2314
2315
|
e.state = 0;
|
|
2315
2316
|
for (let n = 0; n < e.sources.length; n += 1) {
|
|
2316
2317
|
const s = e.sources[n];
|
|
2317
2318
|
if (s.sources) {
|
|
2318
2319
|
const r = s.state;
|
|
2319
|
-
r ===
|
|
2320
|
+
r === be ? s !== t && (!s.updatedAt || s.updatedAt < tn) && zt(s) : r === Qt && Wt(s, t);
|
|
2320
2321
|
}
|
|
2321
2322
|
}
|
|
2322
2323
|
}
|
|
2323
|
-
function
|
|
2324
|
+
function or(e) {
|
|
2324
2325
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
2325
2326
|
const n = e.observers[t];
|
|
2326
|
-
n.state || (n.state = Qt, n.pure ? ee.push(n) :
|
|
2327
|
+
n.state || (n.state = Qt, n.pure ? ee.push(n) : _e.push(n), n.observers && or(n));
|
|
2327
2328
|
}
|
|
2328
2329
|
}
|
|
2329
|
-
function
|
|
2330
|
+
function dt(e) {
|
|
2330
2331
|
let t;
|
|
2331
2332
|
if (e.sources)
|
|
2332
2333
|
for (; e.sources.length; ) {
|
|
@@ -2337,11 +2338,11 @@ function ft(e) {
|
|
|
2337
2338
|
}
|
|
2338
2339
|
}
|
|
2339
2340
|
if (e.tOwned) {
|
|
2340
|
-
for (t = e.tOwned.length - 1; t >= 0; t--)
|
|
2341
|
+
for (t = e.tOwned.length - 1; t >= 0; t--) dt(e.tOwned[t]);
|
|
2341
2342
|
delete e.tOwned;
|
|
2342
2343
|
}
|
|
2343
2344
|
if (e.owned) {
|
|
2344
|
-
for (t = e.owned.length - 1; t >= 0; t--)
|
|
2345
|
+
for (t = e.owned.length - 1; t >= 0; t--) dt(e.owned[t]);
|
|
2345
2346
|
e.owned = null;
|
|
2346
2347
|
}
|
|
2347
2348
|
if (e.cleanups) {
|
|
@@ -2355,56 +2356,56 @@ function Bt(e) {
|
|
|
2355
2356
|
cause: e
|
|
2356
2357
|
});
|
|
2357
2358
|
}
|
|
2358
|
-
function
|
|
2359
|
+
function Bn(e, t = C) {
|
|
2359
2360
|
throw Bt(e);
|
|
2360
2361
|
}
|
|
2361
|
-
function
|
|
2362
|
-
if (typeof e == "function" && !e.length) return
|
|
2362
|
+
function yn(e) {
|
|
2363
|
+
if (typeof e == "function" && !e.length) return yn(e());
|
|
2363
2364
|
if (Array.isArray(e)) {
|
|
2364
2365
|
const t = [];
|
|
2365
2366
|
for (let n = 0; n < e.length; n++) {
|
|
2366
|
-
const s =
|
|
2367
|
+
const s = yn(e[n]);
|
|
2367
2368
|
Array.isArray(s) ? t.push.apply(t, s) : t.push(s);
|
|
2368
2369
|
}
|
|
2369
2370
|
return t;
|
|
2370
2371
|
}
|
|
2371
2372
|
return e;
|
|
2372
2373
|
}
|
|
2373
|
-
function
|
|
2374
|
+
function jo(e, t) {
|
|
2374
2375
|
return function(s) {
|
|
2375
2376
|
let r;
|
|
2376
|
-
return Re(() => r = Z(() => (
|
|
2377
|
-
...
|
|
2377
|
+
return Re(() => r = Z(() => (C.context = {
|
|
2378
|
+
...C.context,
|
|
2378
2379
|
[e]: s.value
|
|
2379
|
-
},
|
|
2380
|
+
}, sr(() => s.children))), void 0), r;
|
|
2380
2381
|
};
|
|
2381
2382
|
}
|
|
2382
|
-
var
|
|
2383
|
-
function
|
|
2383
|
+
var An = Symbol("fallback");
|
|
2384
|
+
function jt(e) {
|
|
2384
2385
|
for (let t = 0; t < e.length; t++) e[t]();
|
|
2385
2386
|
}
|
|
2386
|
-
function
|
|
2387
|
+
function Yo(e, t, n = {}) {
|
|
2387
2388
|
let s = [], r = [], a = [], i = 0, o = t.length > 1 ? [] : null;
|
|
2388
|
-
return
|
|
2389
|
+
return ut(() => jt(a)), () => {
|
|
2389
2390
|
let l = e() || [], d = l.length, u, f;
|
|
2390
|
-
return l[
|
|
2391
|
-
let h, p, T, S,
|
|
2391
|
+
return l[Zs], Z(() => {
|
|
2392
|
+
let h, p, T, S, O, y, w, v, U;
|
|
2392
2393
|
if (d === 0)
|
|
2393
|
-
i !== 0 && (
|
|
2394
|
+
i !== 0 && (jt(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [An], r[0] = xe((I) => (a[0] = I, n.fallback())), i = 1);
|
|
2394
2395
|
else if (i === 0) {
|
|
2395
2396
|
for (r = new Array(d), f = 0; f < d; f++)
|
|
2396
2397
|
s[f] = l[f], r[f] = xe(g);
|
|
2397
2398
|
i = d;
|
|
2398
2399
|
} else {
|
|
2399
|
-
for (T = new Array(d), S = new Array(d), o && (
|
|
2400
|
+
for (T = new Array(d), S = new Array(d), o && (O = new Array(d)), y = 0, w = Math.min(i, d); y < w && s[y] === l[y]; y++) ;
|
|
2400
2401
|
for (w = i - 1, v = d - 1; w >= y && v >= y && s[w] === l[v]; w--, v--)
|
|
2401
|
-
T[v] = r[w], S[v] = a[w], o && (
|
|
2402
|
+
T[v] = r[w], S[v] = a[w], o && (O[v] = o[w]);
|
|
2402
2403
|
for (h = /* @__PURE__ */ new Map(), p = new Array(v + 1), f = v; f >= y; f--)
|
|
2403
2404
|
U = l[f], u = h.get(U), p[f] = u === void 0 ? -1 : u, h.set(U, f);
|
|
2404
2405
|
for (u = y; u <= w; u++)
|
|
2405
|
-
U = s[u], f = h.get(U), f !== void 0 && f !== -1 ? (T[f] = r[u], S[f] = a[u], o && (
|
|
2406
|
+
U = s[u], f = h.get(U), f !== void 0 && f !== -1 ? (T[f] = r[u], S[f] = a[u], o && (O[f] = o[u]), f = p[f], h.set(U, f)) : a[u]();
|
|
2406
2407
|
for (f = y; f < d; f++)
|
|
2407
|
-
f in T ? (r[f] = T[f], a[f] = S[f], o && (o[f] =
|
|
2408
|
+
f in T ? (r[f] = T[f], a[f] = S[f], o && (o[f] = O[f], o[f](f))) : r[f] = xe(g);
|
|
2408
2409
|
r = r.slice(0, i = d), s = l.slice(0);
|
|
2409
2410
|
}
|
|
2410
2411
|
return r;
|
|
@@ -2418,14 +2419,14 @@ function Qo(e, t, n = {}) {
|
|
|
2418
2419
|
}
|
|
2419
2420
|
};
|
|
2420
2421
|
}
|
|
2421
|
-
function
|
|
2422
|
+
function Jo(e, t, n = {}) {
|
|
2422
2423
|
let s = [], r = [], a = [], i = [], o = 0, l;
|
|
2423
|
-
return
|
|
2424
|
+
return ut(() => jt(a)), () => {
|
|
2424
2425
|
const d = e() || [], u = d.length;
|
|
2425
|
-
return d[
|
|
2426
|
+
return d[Zs], Z(() => {
|
|
2426
2427
|
if (u === 0)
|
|
2427
|
-
return o !== 0 && (
|
|
2428
|
-
for (s[0] ===
|
|
2428
|
+
return o !== 0 && (jt(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [An], r[0] = xe((g) => (a[0] = g, n.fallback())), o = 1), r;
|
|
2429
|
+
for (s[0] === An && (a[0](), a = [], s = [], r = [], o = 0), l = 0; l < u; l++)
|
|
2429
2430
|
l < s.length && s[l] !== d[l] ? i[l](() => d[l]) : l >= s.length && (r[l] = xe(f));
|
|
2430
2431
|
for (; l < s.length; l++)
|
|
2431
2432
|
a[l]();
|
|
@@ -2438,13 +2439,13 @@ function zo(e, t, n = {}) {
|
|
|
2438
2439
|
}
|
|
2439
2440
|
};
|
|
2440
2441
|
}
|
|
2441
|
-
function
|
|
2442
|
+
function lr(e, t) {
|
|
2442
2443
|
return Z(() => e(t || {}));
|
|
2443
2444
|
}
|
|
2444
2445
|
function xt() {
|
|
2445
2446
|
return !0;
|
|
2446
2447
|
}
|
|
2447
|
-
var
|
|
2448
|
+
var Tn = {
|
|
2448
2449
|
get(e, t, n) {
|
|
2449
2450
|
return t === qt ? n : e.get(t);
|
|
2450
2451
|
},
|
|
@@ -2468,40 +2469,40 @@ var An = {
|
|
|
2468
2469
|
return e.keys();
|
|
2469
2470
|
}
|
|
2470
2471
|
};
|
|
2471
|
-
function
|
|
2472
|
+
function gn(e) {
|
|
2472
2473
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
2473
2474
|
}
|
|
2474
|
-
function
|
|
2475
|
+
function Zo() {
|
|
2475
2476
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
2476
2477
|
const n = this[e]();
|
|
2477
2478
|
if (n !== void 0) return n;
|
|
2478
2479
|
}
|
|
2479
2480
|
}
|
|
2480
|
-
function
|
|
2481
|
+
function cr(...e) {
|
|
2481
2482
|
let t = !1;
|
|
2482
2483
|
for (let i = 0; i < e.length; i++) {
|
|
2483
2484
|
const o = e[i];
|
|
2484
|
-
t = t || !!o && qt in o, e[i] = typeof o == "function" ? (t = !0,
|
|
2485
|
+
t = t || !!o && qt in o, e[i] = typeof o == "function" ? (t = !0, j(o)) : o;
|
|
2485
2486
|
}
|
|
2486
|
-
if (
|
|
2487
|
+
if (Js && t)
|
|
2487
2488
|
return new Proxy({
|
|
2488
2489
|
get(i) {
|
|
2489
2490
|
for (let o = e.length - 1; o >= 0; o--) {
|
|
2490
|
-
const l =
|
|
2491
|
+
const l = gn(e[o])[i];
|
|
2491
2492
|
if (l !== void 0) return l;
|
|
2492
2493
|
}
|
|
2493
2494
|
},
|
|
2494
2495
|
has(i) {
|
|
2495
2496
|
for (let o = e.length - 1; o >= 0; o--)
|
|
2496
|
-
if (i in
|
|
2497
|
+
if (i in gn(e[o])) return !0;
|
|
2497
2498
|
return !1;
|
|
2498
2499
|
},
|
|
2499
2500
|
keys() {
|
|
2500
2501
|
const i = [];
|
|
2501
|
-
for (let o = 0; o < e.length; o++) i.push(...Object.keys(
|
|
2502
|
+
for (let o = 0; o < e.length; o++) i.push(...Object.keys(gn(e[o])));
|
|
2502
2503
|
return [...new Set(i)];
|
|
2503
2504
|
}
|
|
2504
|
-
},
|
|
2505
|
+
}, Tn);
|
|
2505
2506
|
const n = {}, s = /* @__PURE__ */ Object.create(null);
|
|
2506
2507
|
for (let i = e.length - 1; i >= 0; i--) {
|
|
2507
2508
|
const o = e[i];
|
|
@@ -2515,7 +2516,7 @@ function ar(...e) {
|
|
|
2515
2516
|
s[u] = f.get ? {
|
|
2516
2517
|
enumerable: !0,
|
|
2517
2518
|
configurable: !0,
|
|
2518
|
-
get:
|
|
2519
|
+
get: Zo.bind(n[u] = [f.get.bind(o)])
|
|
2519
2520
|
} : f.value !== void 0 ? f : void 0;
|
|
2520
2521
|
else {
|
|
2521
2522
|
const g = n[u];
|
|
@@ -2530,8 +2531,8 @@ function ar(...e) {
|
|
|
2530
2531
|
}
|
|
2531
2532
|
return r;
|
|
2532
2533
|
}
|
|
2533
|
-
function
|
|
2534
|
-
if (
|
|
2534
|
+
function Xo(e, ...t) {
|
|
2535
|
+
if (Js && qt in e) {
|
|
2535
2536
|
const r = new Set(t.length > 1 ? t.flat() : t[0]), a = t.map((i) => new Proxy({
|
|
2536
2537
|
get(o) {
|
|
2537
2538
|
return i.includes(o) ? e[o] : void 0;
|
|
@@ -2542,7 +2543,7 @@ function Wo(e, ...t) {
|
|
|
2542
2543
|
keys() {
|
|
2543
2544
|
return i.filter((o) => o in e);
|
|
2544
2545
|
}
|
|
2545
|
-
},
|
|
2546
|
+
}, Tn));
|
|
2546
2547
|
return a.push(new Proxy({
|
|
2547
2548
|
get(i) {
|
|
2548
2549
|
return r.has(i) ? void 0 : e[i];
|
|
@@ -2553,7 +2554,7 @@ function Wo(e, ...t) {
|
|
|
2553
2554
|
keys() {
|
|
2554
2555
|
return Object.keys(e).filter((i) => !r.has(i));
|
|
2555
2556
|
}
|
|
2556
|
-
},
|
|
2557
|
+
}, Tn)), a;
|
|
2557
2558
|
}
|
|
2558
2559
|
const n = {}, s = t.map(() => ({}));
|
|
2559
2560
|
for (const r of Object.getOwnPropertyNames(e)) {
|
|
@@ -2565,94 +2566,94 @@ function Wo(e, ...t) {
|
|
|
2565
2566
|
}
|
|
2566
2567
|
return [...s, n];
|
|
2567
2568
|
}
|
|
2568
|
-
function
|
|
2569
|
+
function ur(e) {
|
|
2569
2570
|
let t, n;
|
|
2570
2571
|
const s = (r) => {
|
|
2571
2572
|
const a = _.context;
|
|
2572
2573
|
if (a) {
|
|
2573
2574
|
const [o, l] = F();
|
|
2574
2575
|
_.count || (_.count = 0), _.count++, (n || (n = e())).then((d) => {
|
|
2575
|
-
!_.done &&
|
|
2576
|
+
!_.done && ot(a), _.count--, l(() => d.default), ot();
|
|
2576
2577
|
}), t = o;
|
|
2577
2578
|
} else if (!t) {
|
|
2578
|
-
const [o] =
|
|
2579
|
+
const [o] = Ko(() => (n || (n = e())).then((l) => l.default));
|
|
2579
2580
|
t = o;
|
|
2580
2581
|
}
|
|
2581
2582
|
let i;
|
|
2582
|
-
return
|
|
2583
|
+
return j(() => (i = t()) ? Z(() => {
|
|
2583
2584
|
if (!a || _.done) return i(r);
|
|
2584
2585
|
const o = _.context;
|
|
2585
|
-
|
|
2586
|
+
ot(a);
|
|
2586
2587
|
const l = i(r);
|
|
2587
|
-
return
|
|
2588
|
+
return ot(o), l;
|
|
2588
2589
|
}) : "");
|
|
2589
2590
|
};
|
|
2590
2591
|
return s.preload = () => n || ((n = e()).then((r) => t = () => r.default), n), s;
|
|
2591
2592
|
}
|
|
2592
|
-
var
|
|
2593
|
-
function
|
|
2594
|
-
return _.context ? _.getNextContextId() : `cl-${
|
|
2593
|
+
var el = 0;
|
|
2594
|
+
function Eu() {
|
|
2595
|
+
return _.context ? _.getNextContextId() : `cl-${el++}`;
|
|
2595
2596
|
}
|
|
2596
|
-
var
|
|
2597
|
-
function
|
|
2597
|
+
var dr = (e) => `Stale read from <${e}>.`;
|
|
2598
|
+
function pu(e) {
|
|
2598
2599
|
const t = "fallback" in e && {
|
|
2599
2600
|
fallback: () => e.fallback
|
|
2600
2601
|
};
|
|
2601
|
-
return
|
|
2602
|
+
return j(Yo(() => e.each, e.children, t || void 0));
|
|
2602
2603
|
}
|
|
2603
|
-
function
|
|
2604
|
+
function yu(e) {
|
|
2604
2605
|
const t = "fallback" in e && {
|
|
2605
2606
|
fallback: () => e.fallback
|
|
2606
2607
|
};
|
|
2607
|
-
return
|
|
2608
|
+
return j(Jo(() => e.each, e.children, t || void 0));
|
|
2608
2609
|
}
|
|
2609
|
-
function
|
|
2610
|
-
const t = e.keyed, n =
|
|
2610
|
+
function Au(e) {
|
|
2611
|
+
const t = e.keyed, n = j(() => e.when, void 0, void 0), s = t ? n : j(n, void 0, {
|
|
2611
2612
|
equals: (r, a) => !r == !a
|
|
2612
2613
|
});
|
|
2613
|
-
return
|
|
2614
|
+
return j(() => {
|
|
2614
2615
|
const r = s();
|
|
2615
2616
|
if (r) {
|
|
2616
2617
|
const a = e.children;
|
|
2617
2618
|
return typeof a == "function" && a.length > 0 ? Z(() => a(t ? r : () => {
|
|
2618
|
-
if (!Z(s)) throw
|
|
2619
|
+
if (!Z(s)) throw dr("Show");
|
|
2619
2620
|
return n();
|
|
2620
2621
|
})) : a;
|
|
2621
2622
|
}
|
|
2622
2623
|
return e.fallback;
|
|
2623
2624
|
}, void 0, void 0);
|
|
2624
2625
|
}
|
|
2625
|
-
function
|
|
2626
|
-
const t =
|
|
2626
|
+
function Tu(e) {
|
|
2627
|
+
const t = sr(() => e.children), n = j(() => {
|
|
2627
2628
|
const s = t(), r = Array.isArray(s) ? s : [s];
|
|
2628
2629
|
let a = () => {
|
|
2629
2630
|
};
|
|
2630
2631
|
for (let i = 0; i < r.length; i++) {
|
|
2631
|
-
const o = i, l = r[i], d = a, u =
|
|
2632
|
+
const o = i, l = r[i], d = a, u = j(() => d() ? void 0 : l.when, void 0, void 0), f = l.keyed ? u : j(u, void 0, {
|
|
2632
2633
|
equals: (g, h) => !g == !h
|
|
2633
2634
|
});
|
|
2634
2635
|
a = () => d() || (f() ? [o, u, l] : void 0);
|
|
2635
2636
|
}
|
|
2636
2637
|
return a;
|
|
2637
2638
|
});
|
|
2638
|
-
return
|
|
2639
|
+
return j(() => {
|
|
2639
2640
|
const s = n()();
|
|
2640
2641
|
if (!s) return e.fallback;
|
|
2641
2642
|
const [r, a, i] = s, o = i.children;
|
|
2642
2643
|
return typeof o == "function" && o.length > 0 ? Z(() => o(i.keyed ? a() : () => {
|
|
2643
2644
|
var d;
|
|
2644
|
-
if (((d = Z(n)()) == null ? void 0 : d[0]) !== r) throw
|
|
2645
|
+
if (((d = Z(n)()) == null ? void 0 : d[0]) !== r) throw dr("Match");
|
|
2645
2646
|
return a();
|
|
2646
2647
|
})) : o;
|
|
2647
2648
|
}, void 0, void 0);
|
|
2648
2649
|
}
|
|
2649
|
-
function
|
|
2650
|
+
function Su(e) {
|
|
2650
2651
|
return e;
|
|
2651
2652
|
}
|
|
2652
|
-
var
|
|
2653
|
+
var tl = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], nl = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...tl]), sl = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), rl = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2653
2654
|
className: "class",
|
|
2654
2655
|
htmlFor: "for"
|
|
2655
|
-
}),
|
|
2656
|
+
}), al = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2656
2657
|
class: "className",
|
|
2657
2658
|
novalidate: {
|
|
2658
2659
|
$: "noValidate",
|
|
@@ -2681,11 +2682,11 @@ var Jo = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
|
|
|
2681
2682
|
TEXTAREA: 1
|
|
2682
2683
|
}
|
|
2683
2684
|
});
|
|
2684
|
-
function
|
|
2685
|
-
const n =
|
|
2685
|
+
function il(e, t) {
|
|
2686
|
+
const n = al[e];
|
|
2686
2687
|
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
2687
2688
|
}
|
|
2688
|
-
var
|
|
2689
|
+
var ol = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]), ll = /* @__PURE__ */ new Set([
|
|
2689
2690
|
"altGlyph",
|
|
2690
2691
|
"altGlyphDef",
|
|
2691
2692
|
"altGlyphItem",
|
|
@@ -2763,11 +2764,11 @@ var sl = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
|
|
|
2763
2764
|
"use",
|
|
2764
2765
|
"view",
|
|
2765
2766
|
"vkern"
|
|
2766
|
-
]),
|
|
2767
|
+
]), cl = {
|
|
2767
2768
|
xlink: "http://www.w3.org/1999/xlink",
|
|
2768
2769
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
2769
|
-
},
|
|
2770
|
-
function
|
|
2770
|
+
}, _u = (e) => j(() => e());
|
|
2771
|
+
function ul(e, t, n) {
|
|
2771
2772
|
let s = n.length, r = t.length, a = s, i = 0, o = 0, l = t[r - 1].nextSibling, d = null;
|
|
2772
2773
|
for (; i < r || o < a; ) {
|
|
2773
2774
|
if (t[i] === n[o]) {
|
|
@@ -2806,16 +2807,16 @@ function il(e, t, n) {
|
|
|
2806
2807
|
}
|
|
2807
2808
|
}
|
|
2808
2809
|
}
|
|
2809
|
-
var
|
|
2810
|
-
function
|
|
2810
|
+
var lt = "_$DX_DELEGATE";
|
|
2811
|
+
function fr(e, t, n, s = {}) {
|
|
2811
2812
|
let r;
|
|
2812
2813
|
return xe((a) => {
|
|
2813
|
-
r = a, t === document ? e() :
|
|
2814
|
+
r = a, t === document ? e() : _n(t, e(), t.firstChild ? null : void 0, n);
|
|
2814
2815
|
}, s.owner), () => {
|
|
2815
2816
|
r(), t.textContent = "";
|
|
2816
2817
|
};
|
|
2817
2818
|
}
|
|
2818
|
-
function
|
|
2819
|
+
function Pu(e, t, n, s) {
|
|
2819
2820
|
let r;
|
|
2820
2821
|
const a = () => {
|
|
2821
2822
|
const o = document.createElement("template");
|
|
@@ -2823,32 +2824,32 @@ function pu(e, t, n, s) {
|
|
|
2823
2824
|
}, i = () => (r || (r = a())).cloneNode(!0);
|
|
2824
2825
|
return i.cloneNode = i, i;
|
|
2825
2826
|
}
|
|
2826
|
-
function
|
|
2827
|
-
const n = t[
|
|
2827
|
+
function dl(e, t = window.document) {
|
|
2828
|
+
const n = t[lt] || (t[lt] = /* @__PURE__ */ new Set());
|
|
2828
2829
|
for (let s = 0, r = e.length; s < r; s++) {
|
|
2829
2830
|
const a = e[s];
|
|
2830
|
-
n.has(a) || (n.add(a), t.addEventListener(a,
|
|
2831
|
+
n.has(a) || (n.add(a), t.addEventListener(a, hr));
|
|
2831
2832
|
}
|
|
2832
2833
|
}
|
|
2833
|
-
function
|
|
2834
|
-
if (e[
|
|
2835
|
-
for (let t of e[
|
|
2836
|
-
delete e[
|
|
2834
|
+
function wu(e = window.document) {
|
|
2835
|
+
if (e[lt]) {
|
|
2836
|
+
for (let t of e[lt].keys()) e.removeEventListener(t, hr);
|
|
2837
|
+
delete e[lt];
|
|
2837
2838
|
}
|
|
2838
2839
|
}
|
|
2839
|
-
function
|
|
2840
|
+
function Sn(e, t, n) {
|
|
2840
2841
|
Fe(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
2841
2842
|
}
|
|
2842
|
-
function
|
|
2843
|
+
function fl(e, t, n, s) {
|
|
2843
2844
|
Fe(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
|
|
2844
2845
|
}
|
|
2845
|
-
function
|
|
2846
|
+
function hl(e, t, n) {
|
|
2846
2847
|
Fe(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
|
|
2847
2848
|
}
|
|
2848
|
-
function
|
|
2849
|
+
function gl(e, t) {
|
|
2849
2850
|
Fe(e) || (t == null ? e.removeAttribute("class") : e.className = t);
|
|
2850
2851
|
}
|
|
2851
|
-
function
|
|
2852
|
+
function ml(e, t, n, s) {
|
|
2852
2853
|
if (s)
|
|
2853
2854
|
Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
2854
2855
|
else if (Array.isArray(n)) {
|
|
@@ -2856,21 +2857,21 @@ function dl(e, t, n, s) {
|
|
|
2856
2857
|
e.addEventListener(t, n[0] = (a) => r.call(e, n[1], a));
|
|
2857
2858
|
} else e.addEventListener(t, n, typeof n != "function" && n);
|
|
2858
2859
|
}
|
|
2859
|
-
function
|
|
2860
|
+
function El(e, t, n = {}) {
|
|
2860
2861
|
const s = Object.keys(t || {}), r = Object.keys(n);
|
|
2861
2862
|
let a, i;
|
|
2862
2863
|
for (a = 0, i = r.length; a < i; a++) {
|
|
2863
2864
|
const o = r[a];
|
|
2864
|
-
!o || o === "undefined" || t[o] || (
|
|
2865
|
+
!o || o === "undefined" || t[o] || (os(e, o, !1), delete n[o]);
|
|
2865
2866
|
}
|
|
2866
2867
|
for (a = 0, i = s.length; a < i; a++) {
|
|
2867
2868
|
const o = s[a], l = !!t[o];
|
|
2868
|
-
!o || o === "undefined" || n[o] === l || !l || (
|
|
2869
|
+
!o || o === "undefined" || n[o] === l || !l || (os(e, o, !0), n[o] = l);
|
|
2869
2870
|
}
|
|
2870
2871
|
return n;
|
|
2871
2872
|
}
|
|
2872
|
-
function
|
|
2873
|
-
if (!t) return n ?
|
|
2873
|
+
function pl(e, t, n) {
|
|
2874
|
+
if (!t) return n ? Sn(e, "style") : t;
|
|
2874
2875
|
const s = e.style;
|
|
2875
2876
|
if (typeof t == "string") return s.cssText = t;
|
|
2876
2877
|
typeof n == "string" && (s.cssText = n = void 0), n || (n = {}), t || (t = {});
|
|
@@ -2881,49 +2882,49 @@ function hl(e, t, n) {
|
|
|
2881
2882
|
r = t[a], r !== n[a] && (s.setProperty(a, r), n[a] = r);
|
|
2882
2883
|
return n;
|
|
2883
2884
|
}
|
|
2884
|
-
function
|
|
2885
|
+
function yl(e, t = {}, n, s) {
|
|
2885
2886
|
const r = {};
|
|
2886
|
-
return s || Re(() => r.children =
|
|
2887
|
+
return s || Re(() => r.children = ft(e, t.children, r.children)), Re(() => typeof t.ref == "function" && Al(t.ref, e)), Re(() => Tl(e, t, n, !0, r, !0)), r;
|
|
2887
2888
|
}
|
|
2888
|
-
function
|
|
2889
|
+
function Al(e, t, n) {
|
|
2889
2890
|
return Z(() => e(t, n));
|
|
2890
2891
|
}
|
|
2891
|
-
function
|
|
2892
|
-
if (n !== void 0 && !s && (s = []), typeof t != "function") return
|
|
2893
|
-
Re((r) =>
|
|
2892
|
+
function _n(e, t, n, s) {
|
|
2893
|
+
if (n !== void 0 && !s && (s = []), typeof t != "function") return ft(e, t, s, n);
|
|
2894
|
+
Re((r) => ft(e, t(), r, n), s);
|
|
2894
2895
|
}
|
|
2895
|
-
function
|
|
2896
|
+
function Tl(e, t, n, s, r = {}, a = !1) {
|
|
2896
2897
|
t || (t = {});
|
|
2897
2898
|
for (const i in r)
|
|
2898
2899
|
if (!(i in t)) {
|
|
2899
2900
|
if (i === "children") continue;
|
|
2900
|
-
r[i] =
|
|
2901
|
+
r[i] = ls(e, i, null, r[i], n, a, t);
|
|
2901
2902
|
}
|
|
2902
2903
|
for (const i in t) {
|
|
2903
2904
|
if (i === "children")
|
|
2904
2905
|
continue;
|
|
2905
2906
|
const o = t[i];
|
|
2906
|
-
r[i] =
|
|
2907
|
+
r[i] = ls(e, i, o, r[i], n, a, t);
|
|
2907
2908
|
}
|
|
2908
2909
|
}
|
|
2909
|
-
function
|
|
2910
|
+
function Sl(e) {
|
|
2910
2911
|
let t, n;
|
|
2911
|
-
return !Fe() || !(t = _.registry.get(n =
|
|
2912
|
+
return !Fe() || !(t = _.registry.get(n = Pl())) ? e() : (_.completed && _.completed.add(t), _.registry.delete(n), t);
|
|
2912
2913
|
}
|
|
2913
2914
|
function Fe(e) {
|
|
2914
2915
|
return !!_.context && !_.done && (!e || e.isConnected);
|
|
2915
2916
|
}
|
|
2916
|
-
function
|
|
2917
|
+
function _l(e) {
|
|
2917
2918
|
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
2918
2919
|
}
|
|
2919
|
-
function
|
|
2920
|
+
function os(e, t, n) {
|
|
2920
2921
|
const s = t.trim().split(/\s+/);
|
|
2921
2922
|
for (let r = 0, a = s.length; r < a; r++) e.classList.toggle(s[r], n);
|
|
2922
2923
|
}
|
|
2923
|
-
function
|
|
2924
|
+
function ls(e, t, n, s, r, a, i) {
|
|
2924
2925
|
let o, l, d, u, f;
|
|
2925
|
-
if (t === "style") return
|
|
2926
|
-
if (t === "classList") return
|
|
2926
|
+
if (t === "style") return pl(e, n, s);
|
|
2927
|
+
if (t === "classList") return El(e, n, s);
|
|
2927
2928
|
if (n === s) return s;
|
|
2928
2929
|
if (t === "ref")
|
|
2929
2930
|
a || n(e);
|
|
@@ -2934,28 +2935,28 @@ function rs(e, t, n, s, r, a, i) {
|
|
|
2934
2935
|
const g = t.slice(10);
|
|
2935
2936
|
s && e.removeEventListener(g, s, !0), n && e.addEventListener(g, n, !0);
|
|
2936
2937
|
} else if (t.slice(0, 2) === "on") {
|
|
2937
|
-
const g = t.slice(2).toLowerCase(), h =
|
|
2938
|
+
const g = t.slice(2).toLowerCase(), h = ol.has(g);
|
|
2938
2939
|
if (!h && s) {
|
|
2939
2940
|
const p = Array.isArray(s) ? s[0] : s;
|
|
2940
2941
|
e.removeEventListener(g, p);
|
|
2941
2942
|
}
|
|
2942
|
-
(h || n) && (
|
|
2943
|
+
(h || n) && (ml(e, g, n, h), h && dl([g]));
|
|
2943
2944
|
} else if (t.slice(0, 5) === "attr:")
|
|
2944
|
-
|
|
2945
|
+
Sn(e, t.slice(5), n);
|
|
2945
2946
|
else if (t.slice(0, 5) === "bool:")
|
|
2946
|
-
|
|
2947
|
-
else if ((f = t.slice(0, 5) === "prop:") || (d =
|
|
2947
|
+
hl(e, t.slice(5), n);
|
|
2948
|
+
else if ((f = t.slice(0, 5) === "prop:") || (d = sl.has(t)) || !r && ((u = il(t, e.tagName)) || (l = nl.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
|
|
2948
2949
|
if (f)
|
|
2949
2950
|
t = t.slice(5), l = !0;
|
|
2950
2951
|
else if (Fe(e)) return n;
|
|
2951
|
-
t === "class" || t === "className" ?
|
|
2952
|
+
t === "class" || t === "className" ? gl(e, n) : o && !l && !d ? e[_l(t)] = n : e[u || t] = n;
|
|
2952
2953
|
} else {
|
|
2953
|
-
const g = r && t.indexOf(":") > -1 &&
|
|
2954
|
-
g ?
|
|
2954
|
+
const g = r && t.indexOf(":") > -1 && cl[t.split(":")[0]];
|
|
2955
|
+
g ? fl(e, g, t, n) : Sn(e, rl[t] || t, n);
|
|
2955
2956
|
}
|
|
2956
2957
|
return n;
|
|
2957
2958
|
}
|
|
2958
|
-
function
|
|
2959
|
+
function hr(e) {
|
|
2959
2960
|
if (_.registry && _.events && _.events.find(([l, d]) => d === e))
|
|
2960
2961
|
return;
|
|
2961
2962
|
let t = e.target;
|
|
@@ -2991,7 +2992,7 @@ function cr(e) {
|
|
|
2991
2992
|
} else o();
|
|
2992
2993
|
a(s);
|
|
2993
2994
|
}
|
|
2994
|
-
function
|
|
2995
|
+
function ft(e, t, n, s, r) {
|
|
2995
2996
|
const a = Fe(e);
|
|
2996
2997
|
if (a) {
|
|
2997
2998
|
!n && (n = [...e.childNodes]);
|
|
@@ -3010,23 +3011,23 @@ function ht(e, t, n, s, r) {
|
|
|
3010
3011
|
return n;
|
|
3011
3012
|
if (o) {
|
|
3012
3013
|
let l = n[0];
|
|
3013
|
-
l && l.nodeType === 3 ? l.data !== t && (l.data = t) : l = document.createTextNode(t), n =
|
|
3014
|
+
l && l.nodeType === 3 ? l.data !== t && (l.data = t) : l = document.createTextNode(t), n = Ve(e, n, s, l);
|
|
3014
3015
|
} else
|
|
3015
3016
|
n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
|
|
3016
3017
|
} else if (t == null || i === "boolean") {
|
|
3017
3018
|
if (a) return n;
|
|
3018
|
-
n =
|
|
3019
|
+
n = Ve(e, n, s);
|
|
3019
3020
|
} else {
|
|
3020
3021
|
if (i === "function")
|
|
3021
3022
|
return Re(() => {
|
|
3022
3023
|
let l = t();
|
|
3023
3024
|
for (; typeof l == "function"; ) l = l();
|
|
3024
|
-
n =
|
|
3025
|
+
n = ft(e, l, n, s);
|
|
3025
3026
|
}), () => n;
|
|
3026
3027
|
if (Array.isArray(t)) {
|
|
3027
3028
|
const l = [], d = n && Array.isArray(n);
|
|
3028
|
-
if (
|
|
3029
|
-
return Re(() => n =
|
|
3029
|
+
if (Pn(l, t, n, r))
|
|
3030
|
+
return Re(() => n = ft(e, l, n, s, !0)), () => n;
|
|
3030
3031
|
if (a) {
|
|
3031
3032
|
if (!l.length) return n;
|
|
3032
3033
|
if (s === void 0) return n = [...e.childNodes];
|
|
@@ -3037,32 +3038,32 @@ function ht(e, t, n, s, r) {
|
|
|
3037
3038
|
return n = f;
|
|
3038
3039
|
}
|
|
3039
3040
|
if (l.length === 0) {
|
|
3040
|
-
if (n =
|
|
3041
|
-
} else d ? n.length === 0 ?
|
|
3041
|
+
if (n = Ve(e, n, s), o) return n;
|
|
3042
|
+
} else d ? n.length === 0 ? cs(e, l, s) : ul(e, n, l) : (n && Ve(e), cs(e, l));
|
|
3042
3043
|
n = l;
|
|
3043
3044
|
} else if (t.nodeType) {
|
|
3044
3045
|
if (a && t.parentNode) return n = o ? [t] : t;
|
|
3045
3046
|
if (Array.isArray(n)) {
|
|
3046
|
-
if (o) return n =
|
|
3047
|
-
|
|
3047
|
+
if (o) return n = Ve(e, n, s, t);
|
|
3048
|
+
Ve(e, n, null, t);
|
|
3048
3049
|
} else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
3049
3050
|
n = t;
|
|
3050
3051
|
}
|
|
3051
3052
|
}
|
|
3052
3053
|
return n;
|
|
3053
3054
|
}
|
|
3054
|
-
function
|
|
3055
|
+
function Pn(e, t, n, s) {
|
|
3055
3056
|
let r = !1;
|
|
3056
3057
|
for (let a = 0, i = t.length; a < i; a++) {
|
|
3057
3058
|
let o = t[a], l = n && n[e.length], d;
|
|
3058
3059
|
if (!(o == null || o === !0 || o === !1)) if ((d = typeof o) == "object" && o.nodeType)
|
|
3059
3060
|
e.push(o);
|
|
3060
3061
|
else if (Array.isArray(o))
|
|
3061
|
-
r =
|
|
3062
|
+
r = Pn(e, o, l) || r;
|
|
3062
3063
|
else if (d === "function")
|
|
3063
3064
|
if (s) {
|
|
3064
3065
|
for (; typeof o == "function"; ) o = o();
|
|
3065
|
-
r =
|
|
3066
|
+
r = Pn(e, Array.isArray(o) ? o : [o], Array.isArray(l) ? l : [l]) || r;
|
|
3066
3067
|
} else
|
|
3067
3068
|
e.push(o), r = !0;
|
|
3068
3069
|
else {
|
|
@@ -3072,10 +3073,10 @@ function _n(e, t, n, s) {
|
|
|
3072
3073
|
}
|
|
3073
3074
|
return r;
|
|
3074
3075
|
}
|
|
3075
|
-
function
|
|
3076
|
+
function cs(e, t, n = null) {
|
|
3076
3077
|
for (let s = 0, r = t.length; s < r; s++) e.insertBefore(t[s], n);
|
|
3077
3078
|
}
|
|
3078
|
-
function
|
|
3079
|
+
function Ve(e, t, n, s) {
|
|
3079
3080
|
if (n === void 0) return e.textContent = "";
|
|
3080
3081
|
const r = s || document.createTextNode("");
|
|
3081
3082
|
if (t.length) {
|
|
@@ -3090,26 +3091,26 @@ function Ke(e, t, n, s) {
|
|
|
3090
3091
|
} else e.insertBefore(r, n);
|
|
3091
3092
|
return [r];
|
|
3092
3093
|
}
|
|
3093
|
-
function
|
|
3094
|
+
function Pl() {
|
|
3094
3095
|
return _.getNextContextId();
|
|
3095
3096
|
}
|
|
3096
|
-
var
|
|
3097
|
-
function
|
|
3098
|
-
return t ? document.createElementNS(
|
|
3097
|
+
var wl = "http://www.w3.org/2000/svg";
|
|
3098
|
+
function gr(e, t = !1) {
|
|
3099
|
+
return t ? document.createElementNS(wl, e) : document.createElement(e);
|
|
3099
3100
|
}
|
|
3100
|
-
function
|
|
3101
|
+
function vu(e) {
|
|
3101
3102
|
const {
|
|
3102
3103
|
useShadow: t
|
|
3103
|
-
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, r =
|
|
3104
|
+
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = is();
|
|
3104
3105
|
let a, i = !!_.context;
|
|
3105
|
-
return
|
|
3106
|
-
i && (
|
|
3106
|
+
return tr(() => {
|
|
3107
|
+
i && (is().user = i = !1), a || (a = nr(r, () => j(() => e.children)));
|
|
3107
3108
|
const o = s();
|
|
3108
3109
|
if (o instanceof HTMLHeadElement) {
|
|
3109
3110
|
const [l, d] = F(!1), u = () => d(!0);
|
|
3110
|
-
xe((f) =>
|
|
3111
|
+
xe((f) => _n(o, () => l() ? f() : a(), null)), ut(u);
|
|
3111
3112
|
} else {
|
|
3112
|
-
const l =
|
|
3113
|
+
const l = gr(e.isSVG ? "g" : "div", e.isSVG), d = t && l.attachShadow ? l.attachShadow({
|
|
3113
3114
|
mode: "open"
|
|
3114
3115
|
}) : l;
|
|
3115
3116
|
Object.defineProperty(l, "_$host", {
|
|
@@ -3117,30 +3118,30 @@ function Au(e) {
|
|
|
3117
3118
|
return n.parentNode;
|
|
3118
3119
|
},
|
|
3119
3120
|
configurable: !0
|
|
3120
|
-
}),
|
|
3121
|
+
}), _n(d, a), o.appendChild(l), e.ref && e.ref(l), ut(() => o.removeChild(l));
|
|
3121
3122
|
}
|
|
3122
3123
|
}, void 0, {
|
|
3123
3124
|
render: !i
|
|
3124
3125
|
}), n;
|
|
3125
3126
|
}
|
|
3126
|
-
function
|
|
3127
|
-
const n =
|
|
3128
|
-
return
|
|
3127
|
+
function vl(e, t) {
|
|
3128
|
+
const n = j(e);
|
|
3129
|
+
return j(() => {
|
|
3129
3130
|
const s = n();
|
|
3130
3131
|
switch (typeof s) {
|
|
3131
3132
|
case "function":
|
|
3132
3133
|
return Z(() => s(t));
|
|
3133
3134
|
case "string":
|
|
3134
|
-
const r =
|
|
3135
|
-
return
|
|
3135
|
+
const r = ll.has(s), a = _.context ? Sl() : gr(s, r);
|
|
3136
|
+
return yl(a, t, r), a;
|
|
3136
3137
|
}
|
|
3137
3138
|
});
|
|
3138
3139
|
}
|
|
3139
|
-
function
|
|
3140
|
-
const [, t] =
|
|
3141
|
-
return
|
|
3140
|
+
function bu(e) {
|
|
3141
|
+
const [, t] = Xo(e, ["component"]);
|
|
3142
|
+
return vl(() => e.component, t);
|
|
3142
3143
|
}
|
|
3143
|
-
var
|
|
3144
|
+
var bl = class {
|
|
3144
3145
|
constructor() {
|
|
3145
3146
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
3146
3147
|
}
|
|
@@ -3156,9 +3157,9 @@ var _l = class {
|
|
|
3156
3157
|
clear() {
|
|
3157
3158
|
this.keyToValue.clear(), this.valueToKey.clear();
|
|
3158
3159
|
}
|
|
3159
|
-
},
|
|
3160
|
+
}, mr = class {
|
|
3160
3161
|
constructor(e) {
|
|
3161
|
-
this.generateIdentifier = e, this.kv = new
|
|
3162
|
+
this.generateIdentifier = e, this.kv = new bl();
|
|
3162
3163
|
}
|
|
3163
3164
|
register(e, t) {
|
|
3164
3165
|
this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
|
|
@@ -3172,7 +3173,7 @@ var _l = class {
|
|
|
3172
3173
|
getValue(e) {
|
|
3173
3174
|
return this.kv.getByKey(e);
|
|
3174
3175
|
}
|
|
3175
|
-
},
|
|
3176
|
+
}, Il = class extends mr {
|
|
3176
3177
|
constructor() {
|
|
3177
3178
|
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
3178
3179
|
}
|
|
@@ -3183,7 +3184,7 @@ var _l = class {
|
|
|
3183
3184
|
return this.classToAllowedProps.get(e);
|
|
3184
3185
|
}
|
|
3185
3186
|
};
|
|
3186
|
-
function
|
|
3187
|
+
function Ll(e) {
|
|
3187
3188
|
if ("values" in Object)
|
|
3188
3189
|
return Object.values(e);
|
|
3189
3190
|
const t = [];
|
|
@@ -3191,8 +3192,8 @@ function wl(e) {
|
|
|
3191
3192
|
e.hasOwnProperty(n) && t.push(e[n]);
|
|
3192
3193
|
return t;
|
|
3193
3194
|
}
|
|
3194
|
-
function
|
|
3195
|
-
const n =
|
|
3195
|
+
function Nl(e, t) {
|
|
3196
|
+
const n = Ll(e);
|
|
3196
3197
|
if ("find" in n)
|
|
3197
3198
|
return n.find(t);
|
|
3198
3199
|
const s = n;
|
|
@@ -3202,20 +3203,20 @@ function vl(e, t) {
|
|
|
3202
3203
|
return a;
|
|
3203
3204
|
}
|
|
3204
3205
|
}
|
|
3205
|
-
function
|
|
3206
|
+
function at(e, t) {
|
|
3206
3207
|
Object.entries(e).forEach(([n, s]) => t(s, n));
|
|
3207
3208
|
}
|
|
3208
3209
|
function Ft(e, t) {
|
|
3209
3210
|
return e.indexOf(t) !== -1;
|
|
3210
3211
|
}
|
|
3211
|
-
function
|
|
3212
|
+
function us(e, t) {
|
|
3212
3213
|
for (let n = 0; n < e.length; n++) {
|
|
3213
3214
|
const s = e[n];
|
|
3214
3215
|
if (t(s))
|
|
3215
3216
|
return s;
|
|
3216
3217
|
}
|
|
3217
3218
|
}
|
|
3218
|
-
var
|
|
3219
|
+
var Cl = class {
|
|
3219
3220
|
constructor() {
|
|
3220
3221
|
this.transfomers = {};
|
|
3221
3222
|
}
|
|
@@ -3223,12 +3224,12 @@ var bl = class {
|
|
|
3223
3224
|
this.transfomers[e.name] = e;
|
|
3224
3225
|
}
|
|
3225
3226
|
findApplicable(e) {
|
|
3226
|
-
return
|
|
3227
|
+
return Nl(this.transfomers, (t) => t.isApplicable(e));
|
|
3227
3228
|
}
|
|
3228
3229
|
findByName(e) {
|
|
3229
3230
|
return this.transfomers[e];
|
|
3230
3231
|
}
|
|
3231
|
-
},
|
|
3232
|
+
}, Gl = (e) => Object.prototype.toString.call(e).slice(8, -1), Er = (e) => typeof e > "u", Dl = (e) => e === null, ht = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, wn = (e) => ht(e) && Object.keys(e).length === 0, Le = (e) => Array.isArray(e), Ol = (e) => typeof e == "string", xl = (e) => typeof e == "number" && !isNaN(e), Rl = (e) => typeof e == "boolean", kl = (e) => e instanceof RegExp, gt = (e) => e instanceof Map, mt = (e) => e instanceof Set, pr = (e) => Gl(e) === "Symbol", Ul = (e) => e instanceof Date && !isNaN(e.valueOf()), Ml = (e) => e instanceof Error, ds = (e) => typeof e == "number" && isNaN(e), Bl = (e) => Rl(e) || Dl(e) || Er(e) || xl(e) || Ol(e) || pr(e), Fl = (e) => typeof e == "bigint", Kl = (e) => e === 1 / 0 || e === -1 / 0, Vl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Hl = (e) => e instanceof URL, yr = (e) => e.replace(/\./g, "\\."), mn = (e) => e.map(String).map(yr).join("."), ct = (e) => {
|
|
3232
3233
|
const t = [];
|
|
3233
3234
|
let n = "";
|
|
3234
3235
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -3254,12 +3255,12 @@ function he(e, t, n, s) {
|
|
|
3254
3255
|
untransform: s
|
|
3255
3256
|
};
|
|
3256
3257
|
}
|
|
3257
|
-
var
|
|
3258
|
-
he(
|
|
3258
|
+
var Ar = [
|
|
3259
|
+
he(Er, "undefined", () => null, () => {
|
|
3259
3260
|
}),
|
|
3260
|
-
he(
|
|
3261
|
-
he(
|
|
3262
|
-
he(
|
|
3261
|
+
he(Fl, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
3262
|
+
he(Ul, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
3263
|
+
he(Ml, "Error", (e, t) => {
|
|
3263
3264
|
const n = {
|
|
3264
3265
|
name: e.name,
|
|
3265
3266
|
message: e.message
|
|
@@ -3273,22 +3274,22 @@ var mr = [
|
|
|
3273
3274
|
n[s] = e[s];
|
|
3274
3275
|
}), n;
|
|
3275
3276
|
}),
|
|
3276
|
-
he(
|
|
3277
|
+
he(kl, "regexp", (e) => "" + e, (e) => {
|
|
3277
3278
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
3278
3279
|
return new RegExp(t, n);
|
|
3279
3280
|
}),
|
|
3280
3281
|
he(
|
|
3281
|
-
|
|
3282
|
+
mt,
|
|
3282
3283
|
"set",
|
|
3283
3284
|
// (sets only exist in es6+)
|
|
3284
3285
|
// eslint-disable-next-line es5/no-es6-methods
|
|
3285
3286
|
(e) => [...e.values()],
|
|
3286
3287
|
(e) => new Set(e)
|
|
3287
3288
|
),
|
|
3288
|
-
he(
|
|
3289
|
-
he((e) =>
|
|
3289
|
+
he(gt, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
3290
|
+
he((e) => ds(e) || Kl(e), "number", (e) => ds(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
3290
3291
|
he((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
3291
|
-
he(
|
|
3292
|
+
he(Hl, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
3292
3293
|
];
|
|
3293
3294
|
function sn(e, t, n, s) {
|
|
3294
3295
|
return {
|
|
@@ -3298,12 +3299,12 @@ function sn(e, t, n, s) {
|
|
|
3298
3299
|
untransform: s
|
|
3299
3300
|
};
|
|
3300
3301
|
}
|
|
3301
|
-
var
|
|
3302
|
+
var Tr = sn((e, t) => pr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
|
|
3302
3303
|
const s = n.symbolRegistry.getValue(t[1]);
|
|
3303
3304
|
if (!s)
|
|
3304
3305
|
throw new Error("Trying to deserialize unknown symbol");
|
|
3305
3306
|
return s;
|
|
3306
|
-
}),
|
|
3307
|
+
}), ql = [
|
|
3307
3308
|
Int8Array,
|
|
3308
3309
|
Uint8Array,
|
|
3309
3310
|
Int16Array,
|
|
@@ -3313,16 +3314,16 @@ var Er = sn((e, t) => hr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
3313
3314
|
Float32Array,
|
|
3314
3315
|
Float64Array,
|
|
3315
3316
|
Uint8ClampedArray
|
|
3316
|
-
].reduce((e, t) => (e[t.name] = t, e), {}),
|
|
3317
|
-
const n =
|
|
3317
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), Sr = sn(Vl, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
3318
|
+
const n = ql[t[1]];
|
|
3318
3319
|
if (!n)
|
|
3319
3320
|
throw new Error("Trying to deserialize unknown typed array");
|
|
3320
3321
|
return new n(e);
|
|
3321
3322
|
});
|
|
3322
|
-
function
|
|
3323
|
+
function _r(e, t) {
|
|
3323
3324
|
return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
|
|
3324
3325
|
}
|
|
3325
|
-
var
|
|
3326
|
+
var Pr = sn(_r, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
|
|
3326
3327
|
const n = t.classRegistry.getAllowedProps(e.constructor);
|
|
3327
3328
|
if (!n)
|
|
3328
3329
|
return { ...e };
|
|
@@ -3335,49 +3336,49 @@ var Ar = sn(yr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
3335
3336
|
if (!s)
|
|
3336
3337
|
throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
|
|
3337
3338
|
return Object.assign(Object.create(s.prototype), e);
|
|
3338
|
-
}),
|
|
3339
|
+
}), wr = sn((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) => {
|
|
3339
3340
|
const s = n.customTransformerRegistry.findByName(t[1]);
|
|
3340
3341
|
if (!s)
|
|
3341
3342
|
throw new Error("Trying to deserialize unknown custom value");
|
|
3342
3343
|
return s.deserialize(e);
|
|
3343
|
-
}),
|
|
3344
|
-
const n =
|
|
3344
|
+
}), $l = [Pr, Tr, wr, Sr], fs = (e, t) => {
|
|
3345
|
+
const n = us($l, (r) => r.isApplicable(e, t));
|
|
3345
3346
|
if (n)
|
|
3346
3347
|
return {
|
|
3347
3348
|
value: n.transform(e, t),
|
|
3348
3349
|
type: n.annotation(e, t)
|
|
3349
3350
|
};
|
|
3350
|
-
const s =
|
|
3351
|
+
const s = us(Ar, (r) => r.isApplicable(e, t));
|
|
3351
3352
|
if (s)
|
|
3352
3353
|
return {
|
|
3353
3354
|
value: s.transform(e, t),
|
|
3354
3355
|
type: s.annotation
|
|
3355
3356
|
};
|
|
3356
|
-
},
|
|
3357
|
-
|
|
3358
|
-
|
|
3357
|
+
}, vr = {};
|
|
3358
|
+
Ar.forEach((e) => {
|
|
3359
|
+
vr[e.annotation] = e;
|
|
3359
3360
|
});
|
|
3360
|
-
var
|
|
3361
|
+
var Ql = (e, t, n) => {
|
|
3361
3362
|
if (Le(t))
|
|
3362
3363
|
switch (t[0]) {
|
|
3363
3364
|
case "symbol":
|
|
3364
|
-
return
|
|
3365
|
+
return Tr.untransform(e, t, n);
|
|
3365
3366
|
case "class":
|
|
3366
|
-
return
|
|
3367
|
+
return Pr.untransform(e, t, n);
|
|
3367
3368
|
case "custom":
|
|
3368
|
-
return
|
|
3369
|
+
return wr.untransform(e, t, n);
|
|
3369
3370
|
case "typed-array":
|
|
3370
|
-
return
|
|
3371
|
+
return Sr.untransform(e, t, n);
|
|
3371
3372
|
default:
|
|
3372
3373
|
throw new Error("Unknown transformation: " + t);
|
|
3373
3374
|
}
|
|
3374
3375
|
else {
|
|
3375
|
-
const s =
|
|
3376
|
+
const s = vr[t];
|
|
3376
3377
|
if (!s)
|
|
3377
3378
|
throw new Error("Unknown transformation: " + t);
|
|
3378
3379
|
return s.untransform(e, n);
|
|
3379
3380
|
}
|
|
3380
|
-
},
|
|
3381
|
+
}, He = (e, t) => {
|
|
3381
3382
|
if (t > e.size)
|
|
3382
3383
|
throw new Error("index out of bounds");
|
|
3383
3384
|
const n = e.keys();
|
|
@@ -3385,7 +3386,7 @@ var Vl = (e, t, n) => {
|
|
|
3385
3386
|
n.next(), t--;
|
|
3386
3387
|
return n.next().value;
|
|
3387
3388
|
};
|
|
3388
|
-
function
|
|
3389
|
+
function br(e) {
|
|
3389
3390
|
if (Ft(e, "__proto__"))
|
|
3390
3391
|
throw new Error("__proto__ is not allowed as a property");
|
|
3391
3392
|
if (Ft(e, "prototype"))
|
|
@@ -3393,14 +3394,14 @@ function _r(e) {
|
|
|
3393
3394
|
if (Ft(e, "constructor"))
|
|
3394
3395
|
throw new Error("constructor is not allowed as a property");
|
|
3395
3396
|
}
|
|
3396
|
-
var
|
|
3397
|
-
|
|
3397
|
+
var zl = (e, t) => {
|
|
3398
|
+
br(t);
|
|
3398
3399
|
for (let n = 0; n < t.length; n++) {
|
|
3399
3400
|
const s = t[n];
|
|
3400
|
-
if (
|
|
3401
|
-
e =
|
|
3402
|
-
else if (
|
|
3403
|
-
const r = +s, a = +t[++n] == 0 ? "key" : "value", i =
|
|
3401
|
+
if (mt(e))
|
|
3402
|
+
e = He(e, +s);
|
|
3403
|
+
else if (gt(e)) {
|
|
3404
|
+
const r = +s, a = +t[++n] == 0 ? "key" : "value", i = He(e, r);
|
|
3404
3405
|
switch (a) {
|
|
3405
3406
|
case "key":
|
|
3406
3407
|
e = i;
|
|
@@ -3413,8 +3414,8 @@ var Hl = (e, t) => {
|
|
|
3413
3414
|
e = e[s];
|
|
3414
3415
|
}
|
|
3415
3416
|
return e;
|
|
3416
|
-
},
|
|
3417
|
-
if (
|
|
3417
|
+
}, vn = (e, t, n) => {
|
|
3418
|
+
if (br(t), t.length === 0)
|
|
3418
3419
|
return n(e);
|
|
3419
3420
|
let s = e;
|
|
3420
3421
|
for (let a = 0; a < t.length - 1; a++) {
|
|
@@ -3422,15 +3423,15 @@ var Hl = (e, t) => {
|
|
|
3422
3423
|
if (Le(s)) {
|
|
3423
3424
|
const o = +i;
|
|
3424
3425
|
s = s[o];
|
|
3425
|
-
} else if (
|
|
3426
|
+
} else if (ht(s))
|
|
3426
3427
|
s = s[i];
|
|
3427
|
-
else if (
|
|
3428
|
+
else if (mt(s)) {
|
|
3428
3429
|
const o = +i;
|
|
3429
|
-
s =
|
|
3430
|
-
} else if (
|
|
3430
|
+
s = He(s, o);
|
|
3431
|
+
} else if (gt(s)) {
|
|
3431
3432
|
if (a === t.length - 2)
|
|
3432
3433
|
break;
|
|
3433
|
-
const l = +i, d = +t[++a] == 0 ? "key" : "value", u =
|
|
3434
|
+
const l = +i, d = +t[++a] == 0 ? "key" : "value", u = He(s, l);
|
|
3434
3435
|
switch (d) {
|
|
3435
3436
|
case "key":
|
|
3436
3437
|
s = u;
|
|
@@ -3442,12 +3443,12 @@ var Hl = (e, t) => {
|
|
|
3442
3443
|
}
|
|
3443
3444
|
}
|
|
3444
3445
|
const r = t[t.length - 1];
|
|
3445
|
-
if (Le(s) ? s[+r] = n(s[+r]) :
|
|
3446
|
-
const a =
|
|
3446
|
+
if (Le(s) ? s[+r] = n(s[+r]) : ht(s) && (s[r] = n(s[r])), mt(s)) {
|
|
3447
|
+
const a = He(s, +r), i = n(a);
|
|
3447
3448
|
a !== i && (s.delete(a), s.add(i));
|
|
3448
3449
|
}
|
|
3449
|
-
if (
|
|
3450
|
-
const a = +t[t.length - 2], i =
|
|
3450
|
+
if (gt(s)) {
|
|
3451
|
+
const a = +t[t.length - 2], i = He(s, a);
|
|
3451
3452
|
switch (+r == 0 ? "key" : "value") {
|
|
3452
3453
|
case "key": {
|
|
3453
3454
|
const l = n(i);
|
|
@@ -3462,45 +3463,45 @@ var Hl = (e, t) => {
|
|
|
3462
3463
|
}
|
|
3463
3464
|
return e;
|
|
3464
3465
|
};
|
|
3465
|
-
function
|
|
3466
|
+
function bn(e, t, n = []) {
|
|
3466
3467
|
if (!e)
|
|
3467
3468
|
return;
|
|
3468
3469
|
if (!Le(e)) {
|
|
3469
|
-
|
|
3470
|
+
at(e, (a, i) => bn(a, t, [...n, ...ct(i)]));
|
|
3470
3471
|
return;
|
|
3471
3472
|
}
|
|
3472
3473
|
const [s, r] = e;
|
|
3473
|
-
r &&
|
|
3474
|
-
|
|
3474
|
+
r && at(r, (a, i) => {
|
|
3475
|
+
bn(a, t, [...n, ...ct(i)]);
|
|
3475
3476
|
}), t(s, n);
|
|
3476
3477
|
}
|
|
3477
|
-
function
|
|
3478
|
-
return
|
|
3479
|
-
e =
|
|
3478
|
+
function Wl(e, t, n) {
|
|
3479
|
+
return bn(t, (s, r) => {
|
|
3480
|
+
e = vn(e, r, (a) => Ql(a, s, n));
|
|
3480
3481
|
}), e;
|
|
3481
3482
|
}
|
|
3482
|
-
function
|
|
3483
|
+
function jl(e, t) {
|
|
3483
3484
|
function n(s, r) {
|
|
3484
|
-
const a =
|
|
3485
|
-
s.map(
|
|
3486
|
-
e =
|
|
3485
|
+
const a = zl(e, ct(r));
|
|
3486
|
+
s.map(ct).forEach((i) => {
|
|
3487
|
+
e = vn(e, i, () => a);
|
|
3487
3488
|
});
|
|
3488
3489
|
}
|
|
3489
3490
|
if (Le(t)) {
|
|
3490
3491
|
const [s, r] = t;
|
|
3491
3492
|
s.forEach((a) => {
|
|
3492
|
-
e =
|
|
3493
|
-
}), r &&
|
|
3493
|
+
e = vn(e, ct(a), () => e);
|
|
3494
|
+
}), r && at(r, n);
|
|
3494
3495
|
} else
|
|
3495
|
-
|
|
3496
|
+
at(t, n);
|
|
3496
3497
|
return e;
|
|
3497
3498
|
}
|
|
3498
|
-
var
|
|
3499
|
-
function
|
|
3499
|
+
var Yl = (e, t) => ht(e) || Le(e) || gt(e) || mt(e) || _r(e, t);
|
|
3500
|
+
function Jl(e, t, n) {
|
|
3500
3501
|
const s = n.get(e);
|
|
3501
3502
|
s ? s.push(t) : n.set(e, [t]);
|
|
3502
3503
|
}
|
|
3503
|
-
function
|
|
3504
|
+
function Zl(e, t) {
|
|
3504
3505
|
const n = {};
|
|
3505
3506
|
let s;
|
|
3506
3507
|
return e.forEach((r) => {
|
|
@@ -3508,21 +3509,21 @@ function jl(e, t) {
|
|
|
3508
3509
|
return;
|
|
3509
3510
|
t || (r = r.map((o) => o.map(String)).sort((o, l) => o.length - l.length));
|
|
3510
3511
|
const [a, ...i] = r;
|
|
3511
|
-
a.length === 0 ? s = i.map(
|
|
3512
|
-
}), s ?
|
|
3512
|
+
a.length === 0 ? s = i.map(mn) : n[mn(a)] = i.map(mn);
|
|
3513
|
+
}), s ? wn(n) ? [s] : [s, n] : wn(n) ? void 0 : n;
|
|
3513
3514
|
}
|
|
3514
|
-
var
|
|
3515
|
-
const o =
|
|
3515
|
+
var Ir = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
3516
|
+
const o = Bl(e);
|
|
3516
3517
|
if (!o) {
|
|
3517
|
-
|
|
3518
|
+
Jl(e, r, t);
|
|
3518
3519
|
const h = i.get(e);
|
|
3519
3520
|
if (h)
|
|
3520
3521
|
return s ? {
|
|
3521
3522
|
transformedValue: null
|
|
3522
3523
|
} : h;
|
|
3523
3524
|
}
|
|
3524
|
-
if (!
|
|
3525
|
-
const h =
|
|
3525
|
+
if (!Yl(e, n)) {
|
|
3526
|
+
const h = fs(e, n), p = h ? {
|
|
3526
3527
|
transformedValue: h.value,
|
|
3527
3528
|
annotations: [h.type]
|
|
3528
3529
|
} : {
|
|
@@ -3534,16 +3535,16 @@ var Pr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3534
3535
|
return {
|
|
3535
3536
|
transformedValue: null
|
|
3536
3537
|
};
|
|
3537
|
-
const l =
|
|
3538
|
-
|
|
3538
|
+
const l = fs(e, n), d = (l == null ? void 0 : l.value) ?? e, u = Le(d) ? [] : {}, f = {};
|
|
3539
|
+
at(d, (h, p) => {
|
|
3539
3540
|
if (p === "__proto__" || p === "constructor" || p === "prototype")
|
|
3540
3541
|
throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3541
|
-
const T =
|
|
3542
|
-
u[p] = T.transformedValue, Le(T.annotations) ? f[p] = T.annotations :
|
|
3543
|
-
f[
|
|
3542
|
+
const T = Ir(h, t, n, s, [...r, p], [...a, e], i);
|
|
3543
|
+
u[p] = T.transformedValue, Le(T.annotations) ? f[p] = T.annotations : ht(T.annotations) && at(T.annotations, (S, O) => {
|
|
3544
|
+
f[yr(p) + "." + O] = S;
|
|
3544
3545
|
});
|
|
3545
3546
|
});
|
|
3546
|
-
const g =
|
|
3547
|
+
const g = wn(f) ? {
|
|
3547
3548
|
transformedValue: u,
|
|
3548
3549
|
annotations: l ? [l.type] : void 0
|
|
3549
3550
|
} : {
|
|
@@ -3552,19 +3553,19 @@ var Pr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3552
3553
|
};
|
|
3553
3554
|
return o || i.set(e, g), g;
|
|
3554
3555
|
};
|
|
3555
|
-
function
|
|
3556
|
+
function Lr(e) {
|
|
3556
3557
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
3557
3558
|
}
|
|
3558
|
-
function
|
|
3559
|
-
return
|
|
3559
|
+
function hs(e) {
|
|
3560
|
+
return Lr(e) === "Array";
|
|
3560
3561
|
}
|
|
3561
|
-
function
|
|
3562
|
-
if (
|
|
3562
|
+
function Xl(e) {
|
|
3563
|
+
if (Lr(e) !== "Object")
|
|
3563
3564
|
return !1;
|
|
3564
3565
|
const t = Object.getPrototypeOf(e);
|
|
3565
3566
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
3566
3567
|
}
|
|
3567
|
-
function
|
|
3568
|
+
function ec(e, t, n, s, r) {
|
|
3568
3569
|
const a = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
|
|
3569
3570
|
a === "enumerable" && (e[t] = n), r && a === "nonenumerable" && Object.defineProperty(e, t, {
|
|
3570
3571
|
value: n,
|
|
@@ -3573,17 +3574,17 @@ function Yl(e, t, n, s, r) {
|
|
|
3573
3574
|
configurable: !0
|
|
3574
3575
|
});
|
|
3575
3576
|
}
|
|
3576
|
-
function
|
|
3577
|
-
if (
|
|
3578
|
-
return e.map((r) =>
|
|
3579
|
-
if (!
|
|
3577
|
+
function In(e, t = {}) {
|
|
3578
|
+
if (hs(e))
|
|
3579
|
+
return e.map((r) => In(r, t));
|
|
3580
|
+
if (!Xl(e))
|
|
3580
3581
|
return e;
|
|
3581
3582
|
const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
3582
3583
|
return [...n, ...s].reduce((r, a) => {
|
|
3583
|
-
if (
|
|
3584
|
+
if (hs(t.props) && !t.props.includes(a))
|
|
3584
3585
|
return r;
|
|
3585
|
-
const i = e[a], o =
|
|
3586
|
-
return
|
|
3586
|
+
const i = e[a], o = In(i, t);
|
|
3587
|
+
return ec(r, a, o, e, t.nonenumerable), r;
|
|
3587
3588
|
}, {});
|
|
3588
3589
|
}
|
|
3589
3590
|
var R = class {
|
|
@@ -3591,17 +3592,17 @@ var R = class {
|
|
|
3591
3592
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
3592
3593
|
*/
|
|
3593
3594
|
constructor({ dedupe: e = !1 } = {}) {
|
|
3594
|
-
this.classRegistry = new
|
|
3595
|
+
this.classRegistry = new Il(), this.symbolRegistry = new mr((t) => t.description ?? ""), this.customTransformerRegistry = new Cl(), this.allowedErrorProps = [], this.dedupe = e;
|
|
3595
3596
|
}
|
|
3596
3597
|
serialize(e) {
|
|
3597
|
-
const t = /* @__PURE__ */ new Map(), n =
|
|
3598
|
+
const t = /* @__PURE__ */ new Map(), n = Ir(e, t, this, this.dedupe), s = {
|
|
3598
3599
|
json: n.transformedValue
|
|
3599
3600
|
};
|
|
3600
3601
|
n.annotations && (s.meta = {
|
|
3601
3602
|
...s.meta,
|
|
3602
3603
|
values: n.annotations
|
|
3603
3604
|
});
|
|
3604
|
-
const r =
|
|
3605
|
+
const r = Zl(t, this.dedupe);
|
|
3605
3606
|
return r && (s.meta = {
|
|
3606
3607
|
...s.meta,
|
|
3607
3608
|
referentialEqualities: r
|
|
@@ -3609,8 +3610,8 @@ var R = class {
|
|
|
3609
3610
|
}
|
|
3610
3611
|
deserialize(e) {
|
|
3611
3612
|
const { json: t, meta: n } = e;
|
|
3612
|
-
let s =
|
|
3613
|
-
return n != null && n.values && (s =
|
|
3613
|
+
let s = In(t);
|
|
3614
|
+
return n != null && n.values && (s = Wl(s, n.values, this)), n != null && n.referentialEqualities && (s = jl(s, n.referentialEqualities)), s;
|
|
3614
3615
|
}
|
|
3615
3616
|
stringify(e) {
|
|
3616
3617
|
return JSON.stringify(this.serialize(e));
|
|
@@ -3643,50 +3644,50 @@ R.registerClass = R.defaultInstance.registerClass.bind(R.defaultInstance);
|
|
|
3643
3644
|
R.registerSymbol = R.defaultInstance.registerSymbol.bind(R.defaultInstance);
|
|
3644
3645
|
R.registerCustom = R.defaultInstance.registerCustom.bind(R.defaultInstance);
|
|
3645
3646
|
R.allowErrorProps = R.defaultInstance.allowErrorProps.bind(R.defaultInstance);
|
|
3646
|
-
var
|
|
3647
|
-
function
|
|
3647
|
+
var tc = R.serialize, Iu = R.stringify;
|
|
3648
|
+
function Lu(e) {
|
|
3648
3649
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
3649
3650
|
}
|
|
3650
|
-
function
|
|
3651
|
+
function Nu(e, t) {
|
|
3651
3652
|
return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
3652
3653
|
}
|
|
3653
|
-
function
|
|
3654
|
+
function Cu({
|
|
3654
3655
|
queryState: e,
|
|
3655
3656
|
observerCount: t,
|
|
3656
3657
|
isStale: n
|
|
3657
3658
|
}) {
|
|
3658
3659
|
return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
|
|
3659
3660
|
}
|
|
3660
|
-
function
|
|
3661
|
+
function Gu({
|
|
3661
3662
|
status: e,
|
|
3662
3663
|
isPaused: t
|
|
3663
3664
|
}) {
|
|
3664
3665
|
return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
|
|
3665
3666
|
}
|
|
3666
|
-
function
|
|
3667
|
+
function Du(e) {
|
|
3667
3668
|
return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
|
|
3668
3669
|
}
|
|
3669
|
-
var
|
|
3670
|
+
var Ou = (e, t = !1) => {
|
|
3670
3671
|
const {
|
|
3671
3672
|
json: n
|
|
3672
|
-
} =
|
|
3673
|
+
} = tc(e);
|
|
3673
3674
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
3674
|
-
}, Rt = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3,
|
|
3675
|
-
status:
|
|
3676
|
-
"query hash":
|
|
3677
|
-
"last updated":
|
|
3678
|
-
}, kt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3,
|
|
3679
|
-
status:
|
|
3680
|
-
"last updated":
|
|
3681
|
-
},
|
|
3675
|
+
}, Rt = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, nc = (e, t) => e.queryHash.localeCompare(t.queryHash), Nr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, sc = (e, t) => Rt(e) === Rt(t) ? Nr(e, t) : Rt(e) > Rt(t) ? 1 : -1, xu = {
|
|
3676
|
+
status: sc,
|
|
3677
|
+
"query hash": nc,
|
|
3678
|
+
"last updated": Nr
|
|
3679
|
+
}, kt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Cr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, rc = (e, t) => kt(e) === kt(t) ? Cr(e, t) : kt(e) > kt(t) ? 1 : -1, Ru = {
|
|
3680
|
+
status: rc,
|
|
3681
|
+
"last updated": Cr
|
|
3682
|
+
}, ku = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Uu = () => {
|
|
3682
3683
|
const [e, t] = F("dark");
|
|
3683
|
-
return
|
|
3684
|
+
return Vo(() => {
|
|
3684
3685
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3685
3686
|
t(n.matches ? "dark" : "light");
|
|
3686
3687
|
const s = (r) => {
|
|
3687
3688
|
t(r.matches ? "dark" : "light");
|
|
3688
3689
|
};
|
|
3689
|
-
n.addEventListener("change", s),
|
|
3690
|
+
n.addEventListener("change", s), ut(() => n.removeEventListener("change", s));
|
|
3690
3691
|
}), e;
|
|
3691
3692
|
}, Ut = (e, t, n) => {
|
|
3692
3693
|
if (t.length === 0)
|
|
@@ -3748,26 +3749,26 @@ var Iu = (e, t = !1) => {
|
|
|
3748
3749
|
return n[s] = Mt(n[s], r), n;
|
|
3749
3750
|
}
|
|
3750
3751
|
return e;
|
|
3751
|
-
},
|
|
3752
|
+
}, Gr = (e, t) => {
|
|
3752
3753
|
if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
|
|
3753
3754
|
const s = document.createElement("style"), r = document.createTextNode("");
|
|
3754
3755
|
s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
|
|
3755
|
-
},
|
|
3756
|
+
}, qe, Et, pt, yt, De, At, $e, Qe, ze, We, je, Tt, Ye, St, ps, ac = (ps = class {
|
|
3756
3757
|
constructor(e) {
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3758
|
+
D(this, qe);
|
|
3759
|
+
D(this, Et);
|
|
3760
|
+
D(this, pt);
|
|
3761
|
+
D(this, yt);
|
|
3762
|
+
D(this, De, !1);
|
|
3763
|
+
D(this, At);
|
|
3764
|
+
D(this, $e);
|
|
3765
|
+
D(this, Qe);
|
|
3766
|
+
D(this, ze);
|
|
3767
|
+
D(this, We);
|
|
3768
|
+
D(this, je);
|
|
3769
|
+
D(this, Tt);
|
|
3770
|
+
D(this, Ye);
|
|
3771
|
+
D(this, St);
|
|
3771
3772
|
const {
|
|
3772
3773
|
client: t,
|
|
3773
3774
|
queryFlavor: n,
|
|
@@ -3781,41 +3782,41 @@ var Iu = (e, t = !1) => {
|
|
|
3781
3782
|
shadowDOMTarget: u,
|
|
3782
3783
|
hideDisabledQueries: f
|
|
3783
3784
|
} = e;
|
|
3784
|
-
G(this,
|
|
3785
|
+
G(this, qe, F(t)), G(this, pt, n), G(this, yt, s), G(this, Et, r), G(this, At, d), G(this, $e, u), G(this, Qe, F(a)), G(this, ze, F(i)), G(this, We, F(o)), G(this, je, F(l)), G(this, Tt, F(f));
|
|
3785
3786
|
}
|
|
3786
3787
|
setButtonPosition(e) {
|
|
3787
|
-
A(this,
|
|
3788
|
+
A(this, Qe)[1](e);
|
|
3788
3789
|
}
|
|
3789
3790
|
setPosition(e) {
|
|
3790
|
-
A(this,
|
|
3791
|
+
A(this, ze)[1](e);
|
|
3791
3792
|
}
|
|
3792
3793
|
setInitialIsOpen(e) {
|
|
3793
|
-
A(this,
|
|
3794
|
+
A(this, We)[1](e);
|
|
3794
3795
|
}
|
|
3795
3796
|
setErrorTypes(e) {
|
|
3796
3797
|
A(this, je)[1](e);
|
|
3797
3798
|
}
|
|
3798
3799
|
setClient(e) {
|
|
3799
|
-
A(this,
|
|
3800
|
+
A(this, qe)[1](e);
|
|
3800
3801
|
}
|
|
3801
3802
|
mount(e) {
|
|
3802
|
-
if (A(this,
|
|
3803
|
+
if (A(this, De))
|
|
3803
3804
|
throw new Error("Devtools is already mounted");
|
|
3804
|
-
const t =
|
|
3805
|
-
const n = this, [s] = A(this,
|
|
3805
|
+
const t = fr(() => {
|
|
3806
|
+
const n = this, [s] = A(this, Qe), [r] = A(this, ze), [a] = A(this, We), [i] = A(this, je), [o] = A(this, Tt), [l] = A(this, qe);
|
|
3806
3807
|
let d;
|
|
3807
|
-
return A(this,
|
|
3808
|
+
return A(this, Ye) ? d = A(this, Ye) : (d = ur(() => import("./NCMVHL6D-C2p_bwgN.js")), G(this, Ye, d)), Gr(A(this, At), A(this, $e)), lr(d, cr({
|
|
3808
3809
|
get queryFlavor() {
|
|
3809
|
-
return A(n,
|
|
3810
|
+
return A(n, pt);
|
|
3810
3811
|
},
|
|
3811
3812
|
get version() {
|
|
3812
|
-
return A(n,
|
|
3813
|
+
return A(n, yt);
|
|
3813
3814
|
},
|
|
3814
3815
|
get onlineManager() {
|
|
3815
|
-
return A(n,
|
|
3816
|
+
return A(n, Et);
|
|
3816
3817
|
},
|
|
3817
3818
|
get shadowDOMTarget() {
|
|
3818
|
-
return A(n,
|
|
3819
|
+
return A(n, $e);
|
|
3819
3820
|
}
|
|
3820
3821
|
}, {
|
|
3821
3822
|
get client() {
|
|
@@ -3838,31 +3839,31 @@ var Iu = (e, t = !1) => {
|
|
|
3838
3839
|
}
|
|
3839
3840
|
}));
|
|
3840
3841
|
}, e);
|
|
3841
|
-
G(this,
|
|
3842
|
+
G(this, De, !0), G(this, St, t);
|
|
3842
3843
|
}
|
|
3843
3844
|
unmount() {
|
|
3844
3845
|
var e;
|
|
3845
|
-
if (!A(this,
|
|
3846
|
+
if (!A(this, De))
|
|
3846
3847
|
throw new Error("Devtools is not mounted");
|
|
3847
|
-
(e = A(this,
|
|
3848
|
+
(e = A(this, St)) == null || e.call(this), G(this, De, !1);
|
|
3848
3849
|
}
|
|
3849
|
-
},
|
|
3850
|
+
}, qe = new WeakMap(), Et = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), De = new WeakMap(), At = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), ze = new WeakMap(), We = new WeakMap(), je = new WeakMap(), Tt = new WeakMap(), Ye = new WeakMap(), St = new WeakMap(), ps), Je, _t, Pt, wt, Oe, vt, Ze, Xe, et, tt, nt, bt, st, rt, It, ys, ic = (ys = class {
|
|
3850
3851
|
constructor(e) {
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3852
|
+
D(this, Je);
|
|
3853
|
+
D(this, _t);
|
|
3854
|
+
D(this, Pt);
|
|
3855
|
+
D(this, wt);
|
|
3856
|
+
D(this, Oe, !1);
|
|
3857
|
+
D(this, vt);
|
|
3858
|
+
D(this, Ze);
|
|
3859
|
+
D(this, Xe);
|
|
3860
|
+
D(this, et);
|
|
3861
|
+
D(this, tt);
|
|
3862
|
+
D(this, nt);
|
|
3863
|
+
D(this, bt);
|
|
3864
|
+
D(this, st);
|
|
3865
|
+
D(this, rt);
|
|
3866
|
+
D(this, It);
|
|
3866
3867
|
const {
|
|
3867
3868
|
client: t,
|
|
3868
3869
|
queryFlavor: n,
|
|
@@ -3877,44 +3878,44 @@ var Iu = (e, t = !1) => {
|
|
|
3877
3878
|
onClose: f,
|
|
3878
3879
|
hideDisabledQueries: g
|
|
3879
3880
|
} = e;
|
|
3880
|
-
G(this,
|
|
3881
|
+
G(this, Je, F(t)), G(this, Pt, n), G(this, wt, s), G(this, _t, r), G(this, vt, d), G(this, Ze, u), G(this, Xe, F(a)), G(this, et, F(i)), G(this, tt, F(o)), G(this, nt, F(l)), G(this, bt, F(g)), G(this, st, F(f));
|
|
3881
3882
|
}
|
|
3882
3883
|
setButtonPosition(e) {
|
|
3883
|
-
A(this,
|
|
3884
|
+
A(this, Xe)[1](e);
|
|
3884
3885
|
}
|
|
3885
3886
|
setPosition(e) {
|
|
3886
|
-
A(this,
|
|
3887
|
+
A(this, et)[1](e);
|
|
3887
3888
|
}
|
|
3888
3889
|
setInitialIsOpen(e) {
|
|
3889
|
-
A(this,
|
|
3890
|
+
A(this, tt)[1](e);
|
|
3890
3891
|
}
|
|
3891
3892
|
setErrorTypes(e) {
|
|
3892
|
-
A(this,
|
|
3893
|
+
A(this, nt)[1](e);
|
|
3893
3894
|
}
|
|
3894
3895
|
setClient(e) {
|
|
3895
|
-
A(this,
|
|
3896
|
+
A(this, Je)[1](e);
|
|
3896
3897
|
}
|
|
3897
3898
|
setOnClose(e) {
|
|
3898
|
-
A(this,
|
|
3899
|
+
A(this, st)[1](() => e);
|
|
3899
3900
|
}
|
|
3900
3901
|
mount(e) {
|
|
3901
|
-
if (A(this,
|
|
3902
|
+
if (A(this, Oe))
|
|
3902
3903
|
throw new Error("Devtools is already mounted");
|
|
3903
|
-
const t =
|
|
3904
|
-
const n = this, [s] = A(this,
|
|
3904
|
+
const t = fr(() => {
|
|
3905
|
+
const n = this, [s] = A(this, Xe), [r] = A(this, et), [a] = A(this, tt), [i] = A(this, nt), [o] = A(this, bt), [l] = A(this, Je), [d] = A(this, st);
|
|
3905
3906
|
let u;
|
|
3906
|
-
return A(this,
|
|
3907
|
+
return A(this, rt) ? u = A(this, rt) : (u = ur(() => import("./2AITGKQY-CoZaZMrf.js")), G(this, rt, u)), Gr(A(this, vt), A(this, Ze)), lr(u, cr({
|
|
3907
3908
|
get queryFlavor() {
|
|
3908
|
-
return A(n,
|
|
3909
|
+
return A(n, Pt);
|
|
3909
3910
|
},
|
|
3910
3911
|
get version() {
|
|
3911
|
-
return A(n,
|
|
3912
|
+
return A(n, wt);
|
|
3912
3913
|
},
|
|
3913
3914
|
get onlineManager() {
|
|
3914
|
-
return A(n,
|
|
3915
|
+
return A(n, _t);
|
|
3915
3916
|
},
|
|
3916
3917
|
get shadowDOMTarget() {
|
|
3917
|
-
return A(n,
|
|
3918
|
+
return A(n, Ze);
|
|
3918
3919
|
}
|
|
3919
3920
|
}, {
|
|
3920
3921
|
get client() {
|
|
@@ -3940,16 +3941,16 @@ var Iu = (e, t = !1) => {
|
|
|
3940
3941
|
}
|
|
3941
3942
|
}));
|
|
3942
3943
|
}, e);
|
|
3943
|
-
G(this,
|
|
3944
|
+
G(this, Oe, !0), G(this, It, t);
|
|
3944
3945
|
}
|
|
3945
3946
|
unmount() {
|
|
3946
3947
|
var e;
|
|
3947
|
-
if (!A(this,
|
|
3948
|
+
if (!A(this, Oe))
|
|
3948
3949
|
throw new Error("Devtools is not mounted");
|
|
3949
|
-
(e = A(this,
|
|
3950
|
+
(e = A(this, It)) == null || e.call(this), G(this, Oe, !1);
|
|
3950
3951
|
}
|
|
3951
|
-
},
|
|
3952
|
-
function
|
|
3952
|
+
}, Je = new WeakMap(), _t = new WeakMap(), Pt = new WeakMap(), wt = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(), Ze = new WeakMap(), Xe = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), nt = new WeakMap(), bt = new WeakMap(), st = new WeakMap(), rt = new WeakMap(), It = new WeakMap(), ys);
|
|
3953
|
+
function oc(e) {
|
|
3953
3954
|
const t = J(e.client), n = Q.useRef(null), {
|
|
3954
3955
|
buttonPosition: s,
|
|
3955
3956
|
position: r,
|
|
@@ -3959,11 +3960,11 @@ function sc(e) {
|
|
|
3959
3960
|
shadowDOMTarget: l,
|
|
3960
3961
|
hideDisabledQueries: d
|
|
3961
3962
|
} = e, [u] = Q.useState(
|
|
3962
|
-
new
|
|
3963
|
+
new ac({
|
|
3963
3964
|
client: t,
|
|
3964
3965
|
queryFlavor: "React Query",
|
|
3965
3966
|
version: "5",
|
|
3966
|
-
onlineManager:
|
|
3967
|
+
onlineManager: vs,
|
|
3967
3968
|
buttonPosition: s,
|
|
3968
3969
|
position: r,
|
|
3969
3970
|
initialIsOpen: a,
|
|
@@ -3987,13 +3988,13 @@ function sc(e) {
|
|
|
3987
3988
|
u.unmount();
|
|
3988
3989
|
}), [u]), /* @__PURE__ */ c("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
|
|
3989
3990
|
}
|
|
3990
|
-
function
|
|
3991
|
+
function lc(e) {
|
|
3991
3992
|
const t = J(e.client), n = Q.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: a, hideDisabledQueries: i } = e, [o] = Q.useState(
|
|
3992
|
-
new
|
|
3993
|
+
new ic({
|
|
3993
3994
|
client: t,
|
|
3994
3995
|
queryFlavor: "React Query",
|
|
3995
3996
|
version: "5",
|
|
3996
|
-
onlineManager:
|
|
3997
|
+
onlineManager: vs,
|
|
3997
3998
|
buttonPosition: "bottom-left",
|
|
3998
3999
|
position: "bottom",
|
|
3999
4000
|
initialIsOpen: !0,
|
|
@@ -4022,27 +4023,27 @@ function rc(e) {
|
|
|
4022
4023
|
}
|
|
4023
4024
|
);
|
|
4024
4025
|
}
|
|
4025
|
-
var
|
|
4026
|
+
var gs = process.env.NODE_ENV !== "development" ? function() {
|
|
4026
4027
|
return null;
|
|
4027
|
-
} :
|
|
4028
|
+
} : oc;
|
|
4028
4029
|
process.env.NODE_ENV;
|
|
4029
|
-
const
|
|
4030
|
-
|
|
4030
|
+
const cc = Ee(""), uc = () => {
|
|
4031
|
+
an("dynamic-page-selector", {
|
|
4031
4032
|
description: "Dynamic page selector"
|
|
4032
|
-
}),
|
|
4033
|
+
}), an("enable-add-page-dropdown", {
|
|
4033
4034
|
description: "Enable add page dropdown"
|
|
4034
|
-
}),
|
|
4035
|
+
}), an("enable-ai-chat-panel", {
|
|
4035
4036
|
description: "Enable AI chat panel"
|
|
4036
4037
|
});
|
|
4037
|
-
},
|
|
4038
|
-
const e =
|
|
4039
|
-
return
|
|
4038
|
+
}, dc = () => {
|
|
4039
|
+
const e = N(), t = b();
|
|
4040
|
+
return re({
|
|
4040
4041
|
queryKey: [E.GET_COLLECTIONS],
|
|
4041
4042
|
staleTime: 1 / 0,
|
|
4042
4043
|
queryFn: async () => t(e, { action: E.GET_COLLECTIONS })
|
|
4043
4044
|
});
|
|
4044
|
-
},
|
|
4045
|
-
const { data: e } = ce(), { data: t } = Ne(), { data: n } = Be(), s =
|
|
4045
|
+
}, fc = () => {
|
|
4046
|
+
const { data: e } = ce(), { data: t } = Ne(), { data: n } = Be(), s = N(), r = b(), a = q(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]), i = Ie(/* @__PURE__ */ new Map());
|
|
4046
4047
|
return Y({
|
|
4047
4048
|
mutationFn: async ({ block: o }) => {
|
|
4048
4049
|
const l = o._id, d = (t == null ? void 0 : t.lang) || a, u = `${l}:${d}`;
|
|
@@ -4072,8 +4073,8 @@ const ac = Ee(""), ic = () => {
|
|
|
4072
4073
|
}), f;
|
|
4073
4074
|
}
|
|
4074
4075
|
});
|
|
4075
|
-
},
|
|
4076
|
-
const [, e] =
|
|
4076
|
+
}, hc = () => {
|
|
4077
|
+
const [, e] = ve();
|
|
4077
4078
|
return z(
|
|
4078
4079
|
(t, n) => {
|
|
4079
4080
|
const r = new URLSearchParams(window.location.search).get("lang"), a = new URLSearchParams({ page: t });
|
|
@@ -4081,55 +4082,66 @@ const ac = Ee(""), ic = () => {
|
|
|
4081
4082
|
},
|
|
4082
4083
|
[e]
|
|
4083
4084
|
);
|
|
4084
|
-
},
|
|
4085
|
-
const e =
|
|
4085
|
+
}, gc = () => {
|
|
4086
|
+
const e = hc();
|
|
4086
4087
|
return z(
|
|
4087
4088
|
({ pageId: t }) => {
|
|
4088
4089
|
e(t);
|
|
4089
4090
|
},
|
|
4090
4091
|
[e]
|
|
4091
4092
|
);
|
|
4092
|
-
},
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4093
|
+
}, mc = {
|
|
4094
|
+
SITE_WIDE_USAGE: "SITE_WIDE_USAGE"
|
|
4095
|
+
}, Ec = (e) => {
|
|
4096
|
+
const t = b(), n = N();
|
|
4097
|
+
return re({
|
|
4098
|
+
queryKey: [mc.SITE_WIDE_USAGE],
|
|
4099
|
+
queryFn: async () => e ? t(n, { action: "GET_SITE_WIDE_USAGE" }) : {},
|
|
4100
|
+
retry: !1
|
|
4101
|
+
});
|
|
4102
|
+
}, pc = V(() => import("./page-lock-Dl5CmUgk.js")), yc = V(() => import("./no-language-page-dialog-Q2rvsEP6.js")), Ac = V(() => import("./digital-asset-manager-D6GbpYDo.js")), Tc = V(() => import("./save-to-lib-Bkou78G6.js")), Sc = V(() => import("./theme-panel-footer-CftO53LS.js")), _c = V(() => import("./web-preview-DiOChE4E.js"));
|
|
4103
|
+
uc();
|
|
4104
|
+
li();
|
|
4105
|
+
oa(ho);
|
|
4106
|
+
ko();
|
|
4107
|
+
la(Ac);
|
|
4108
|
+
ca(Tc);
|
|
4109
|
+
const Pc = {
|
|
4100
4110
|
role: "",
|
|
4101
4111
|
permissions: null
|
|
4102
|
-
},
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4112
|
+
}, ms = (e) => {
|
|
4113
|
+
var Vn;
|
|
4114
|
+
const { data: t } = To(), n = Un(), { data: s = Pc, isFetching: r } = So(), { data: a, isFetching: i } = Ce(), { data: o, isFetching: l } = dc(), { data: d, isFetching: u } = Be(), f = r || i || l || u, [g] = ve(), h = g.get("page"), { data: p } = ce(), { data: T, isFetching: S } = po(), { blocks: O } = Eo(T), { data: y, isFetching: w } = yo(), { pageStatus: v } = pe(), U = go(), { onSave: I } = _o(), { mutateAsync: ye } = fc(), { getPartialBlocks: Ae, getPartialBlockBlocks: B } = Po(), { mutateAsync: P } = Fi(), { mutateAsync: L } = Ao(), { data: W } = Ec(((Vn = e.flags) == null ? void 0 : Vn.designTokens) ?? !1), $ = gc(), [fe, Nt] = K(!1), Te = Ie([]), Ke = q(() => H(d, "theme", {}) || {}, [d]), Ge = v === te.EDITING, Dr = v === te.CHECKING, Fn = S || Dr || w;
|
|
4115
|
+
Te.current = O;
|
|
4116
|
+
const [Or] = oe(cc);
|
|
4106
4117
|
ne(() => {
|
|
4107
|
-
const
|
|
4108
|
-
document.hidden ?
|
|
4118
|
+
const ae = () => {
|
|
4119
|
+
document.hidden ? Nt(!0) : Nt(!1);
|
|
4109
4120
|
};
|
|
4110
|
-
return window.addEventListener("visibilitychange",
|
|
4121
|
+
return window.addEventListener("visibilitychange", ae), () => window.removeEventListener("visibilitychange", ae);
|
|
4111
4122
|
}, []);
|
|
4112
|
-
const
|
|
4113
|
-
const
|
|
4114
|
-
return s && (
|
|
4115
|
-
}, [s]),
|
|
4116
|
-
async (
|
|
4123
|
+
const xr = q(() => {
|
|
4124
|
+
const ae = {};
|
|
4125
|
+
return s && (ae.permissions = H(s, "permissions", null), ae.role = H(s, "role", "user")), ae;
|
|
4126
|
+
}, [s]), Kn = q(() => t == null ? void 0 : t.some((ae) => ae.isSiteLibrary), [t]), Rr = z(
|
|
4127
|
+
async (ae, Ct) => await P({ pageType: ae, query: Ct }),
|
|
4117
4128
|
[P]
|
|
4118
4129
|
);
|
|
4119
4130
|
return /* @__PURE__ */ m(ge, { children: [
|
|
4120
|
-
|
|
4121
|
-
|
|
4131
|
+
Fn && /* @__PURE__ */ c(qs, { className: f ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ c(Ht, { className: `animate-spin text-primary ${f ? "h-6 w-6" : "h-5 w-5"}` }) }),
|
|
4132
|
+
Or && /* @__PURE__ */ c(
|
|
4122
4133
|
X,
|
|
4123
4134
|
{
|
|
4124
4135
|
fallback: /* @__PURE__ */ c("div", { className: "absolute inset-0 z-[999999] flex min-h-screen w-screen items-center justify-center bg-gray-100", children: /* @__PURE__ */ c(Ht, { className: "h-6 w-6 animate-spin text-primary" }) }),
|
|
4125
|
-
children: /* @__PURE__ */ c(
|
|
4136
|
+
children: /* @__PURE__ */ c(_c, {})
|
|
4126
4137
|
}
|
|
4127
4138
|
),
|
|
4128
4139
|
/* @__PURE__ */ c(
|
|
4129
|
-
|
|
4140
|
+
ua,
|
|
4130
4141
|
{
|
|
4131
|
-
|
|
4132
|
-
|
|
4142
|
+
siteWideUsage: W ?? {},
|
|
4143
|
+
flags: e.flags ? { ...e.flags, librarySite: Kn } : { librarySite: Kn },
|
|
4144
|
+
gotoPage: $,
|
|
4133
4145
|
collections: o ?? [],
|
|
4134
4146
|
getBlockAsyncProps: ye,
|
|
4135
4147
|
pageExternalData: y,
|
|
@@ -4139,33 +4151,36 @@ const pc = {
|
|
|
4139
4151
|
fallbackLang: n,
|
|
4140
4152
|
languages: (d == null ? void 0 : d.languages) || [],
|
|
4141
4153
|
brandingOptions: (d == null ? void 0 : d.theme) || {},
|
|
4154
|
+
designTokens: (d == null ? void 0 : d.designTokens) || {},
|
|
4142
4155
|
translations: e.translations || {},
|
|
4143
4156
|
locale: e.locale || "en",
|
|
4144
4157
|
htmlDir: e.htmlDir || "ltr",
|
|
4145
|
-
autoSave:
|
|
4146
|
-
|
|
4158
|
+
autoSave: !fe && Ge && (e.autoSave ?? !0),
|
|
4159
|
+
autoSaveActionsCount: e.autoSaveActionsCount ?? 10,
|
|
4147
4160
|
onError: e.onError || console.error,
|
|
4148
4161
|
getPartialBlockBlocks: B,
|
|
4149
4162
|
getPartialBlocks: Ae,
|
|
4150
|
-
blocks: S ? [] :
|
|
4151
|
-
theme:
|
|
4163
|
+
blocks: S ? [] : O,
|
|
4164
|
+
theme: jr(Ke),
|
|
4152
4165
|
pageTypes: a,
|
|
4153
|
-
searchPageTypeItems:
|
|
4166
|
+
searchPageTypeItems: Rr,
|
|
4154
4167
|
askAiCallBack: U,
|
|
4155
|
-
onSave: async ({ blocks:
|
|
4168
|
+
onSave: async ({ blocks: ae, theme: Ct, needTranslations: kr, designTokens: Hn }) => {
|
|
4156
4169
|
if (!h) return !0;
|
|
4157
|
-
|
|
4158
|
-
const
|
|
4159
|
-
|
|
4170
|
+
Te.current = ae;
|
|
4171
|
+
const qn = [...ae];
|
|
4172
|
+
await I({ page: h, blocks: qn, needTranslations: kr }), Te.current = qn;
|
|
4173
|
+
const rn = {};
|
|
4174
|
+
return Wn(Ct, Ke) || (rn.theme = Ct), Wn(Hn, d == null ? void 0 : d.designTokens) || (rn.designTokens = Hn), await L({ settings: rn }), !0;
|
|
4160
4175
|
},
|
|
4161
|
-
themePanelComponent:
|
|
4162
|
-
...
|
|
4163
|
-
children: /* @__PURE__ */ c(
|
|
4176
|
+
themePanelComponent: Sc,
|
|
4177
|
+
...xr,
|
|
4178
|
+
children: /* @__PURE__ */ c(pc, { isFetchingPageData: Fn })
|
|
4164
4179
|
}
|
|
4165
4180
|
),
|
|
4166
|
-
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
|
|
4181
|
+
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(yc, {}) })
|
|
4167
4182
|
] });
|
|
4168
|
-
},
|
|
4183
|
+
}, wc = new Xr({
|
|
4169
4184
|
defaultOptions: {
|
|
4170
4185
|
queries: {
|
|
4171
4186
|
refetchOnWindowFocus: !1,
|
|
@@ -4173,10 +4188,10 @@ const pc = {
|
|
|
4173
4188
|
refetchOnMount: !1
|
|
4174
4189
|
}
|
|
4175
4190
|
}
|
|
4176
|
-
}),
|
|
4177
|
-
const [, t] =
|
|
4191
|
+
}), Mu = (e) => {
|
|
4192
|
+
const [, t] = Dn(), [n, s] = K(!1);
|
|
4178
4193
|
return ne(() => (t(
|
|
4179
|
-
|
|
4194
|
+
Ln(e, [
|
|
4180
4195
|
"apiUrl",
|
|
4181
4196
|
"usersApiUrl",
|
|
4182
4197
|
"assetsApiUrl",
|
|
@@ -4195,18 +4210,18 @@ const pc = {
|
|
|
4195
4210
|
}, 200), () => {
|
|
4196
4211
|
s(!1), t({});
|
|
4197
4212
|
}), [e, t]), n ? H(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(ge, { children: [
|
|
4198
|
-
/* @__PURE__ */ c(
|
|
4199
|
-
/* @__PURE__ */ c(
|
|
4200
|
-
] }) : /* @__PURE__ */ m(
|
|
4201
|
-
/* @__PURE__ */ c(
|
|
4202
|
-
/* @__PURE__ */ c(
|
|
4213
|
+
/* @__PURE__ */ c(ms, { ...e }),
|
|
4214
|
+
/* @__PURE__ */ c(gs, {})
|
|
4215
|
+
] }) : /* @__PURE__ */ m(ea, { client: wc, children: [
|
|
4216
|
+
/* @__PURE__ */ c(ms, { ...e }),
|
|
4217
|
+
/* @__PURE__ */ c(gs, {})
|
|
4203
4218
|
] }) : /* @__PURE__ */ c("div", {});
|
|
4204
|
-
},
|
|
4205
|
-
function
|
|
4219
|
+
}, vc = Q.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
|
|
4220
|
+
function bc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
4206
4221
|
const [r, a] = Q.useState(!1);
|
|
4207
|
-
return /* @__PURE__ */ m(
|
|
4222
|
+
return /* @__PURE__ */ m(La, { open: r, onOpenChange: a, children: [
|
|
4208
4223
|
/* @__PURE__ */ m(Jt, { children: [
|
|
4209
|
-
/* @__PURE__ */ c(Zt, { asChild: !0, children: /* @__PURE__ */ c(
|
|
4224
|
+
/* @__PURE__ */ c(Zt, { asChild: !0, children: /* @__PURE__ */ c(Na, { asChild: !0, children: /* @__PURE__ */ c(
|
|
4210
4225
|
M,
|
|
4211
4226
|
{
|
|
4212
4227
|
size: "sm",
|
|
@@ -4230,7 +4245,7 @@ function Tc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4230
4245
|
/* @__PURE__ */ c(Xt, { children: "Add field" })
|
|
4231
4246
|
] }),
|
|
4232
4247
|
r && /* @__PURE__ */ c(Q.Suspense, { children: /* @__PURE__ */ c(
|
|
4233
|
-
|
|
4248
|
+
vc,
|
|
4234
4249
|
{
|
|
4235
4250
|
data: e,
|
|
4236
4251
|
onSelect: t,
|
|
@@ -4241,18 +4256,18 @@ function Tc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4241
4256
|
) })
|
|
4242
4257
|
] });
|
|
4243
4258
|
}
|
|
4244
|
-
const
|
|
4259
|
+
const Bu = () => {
|
|
4245
4260
|
const { savePageAsync: e } = ke(), t = J(), { isLocked: n } = pe();
|
|
4246
4261
|
return z(async () => {
|
|
4247
4262
|
n || await e(), t.invalidateQueries({ queryKey: [E.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [E.GET_BUILDER_PAGE_DATA] });
|
|
4248
4263
|
}, [e, t, n]);
|
|
4249
|
-
},
|
|
4264
|
+
}, Fu = () => {
|
|
4250
4265
|
const e = J();
|
|
4251
4266
|
return z(() => {
|
|
4252
4267
|
e.clear();
|
|
4253
4268
|
}, [e]);
|
|
4254
|
-
},
|
|
4255
|
-
const e =
|
|
4269
|
+
}, Ku = () => {
|
|
4270
|
+
const e = N(), t = b(), { data: n } = Ne(), s = J();
|
|
4256
4271
|
return Y({
|
|
4257
4272
|
mutationFn: async (r) => {
|
|
4258
4273
|
if (!(n != null && n.id))
|
|
@@ -4276,7 +4291,7 @@ const Du = () => {
|
|
|
4276
4291
|
console.error("Failed to update metadata");
|
|
4277
4292
|
}
|
|
4278
4293
|
});
|
|
4279
|
-
},
|
|
4294
|
+
}, Ic = V(() => import("./digital-asset-manager-D6GbpYDo.js")), Vu = ({
|
|
4280
4295
|
assetId: e,
|
|
4281
4296
|
assetUrl: t,
|
|
4282
4297
|
onChange: n,
|
|
@@ -4284,13 +4299,13 @@ const Du = () => {
|
|
|
4284
4299
|
placeholder: r = "Select an image",
|
|
4285
4300
|
disabled: a = !1
|
|
4286
4301
|
}) => {
|
|
4287
|
-
const { t: i } =
|
|
4302
|
+
const { t: i } = we(), [o, l] = K(!1), d = () => {
|
|
4288
4303
|
a || l(!0);
|
|
4289
4304
|
}, u = () => {
|
|
4290
4305
|
l(!1);
|
|
4291
4306
|
}, f = (p) => {
|
|
4292
4307
|
const T = Array.isArray(p) ? p[0] : p;
|
|
4293
|
-
T != null && T.url && n(
|
|
4308
|
+
T != null && T.url && n(Ln(T, ["url", "id"])), l(!1);
|
|
4294
4309
|
}, g = () => {
|
|
4295
4310
|
n({ url: "", id: "" });
|
|
4296
4311
|
}, h = (t == null ? void 0 : t.startsWith("{{")) && (t == null ? void 0 : t.endsWith("}}"));
|
|
@@ -4315,7 +4330,7 @@ const Du = () => {
|
|
|
4315
4330
|
className: "h-8 w-8 rounded-full bg-white text-red-500",
|
|
4316
4331
|
onClick: g,
|
|
4317
4332
|
disabled: a,
|
|
4318
|
-
children: h ? /* @__PURE__ */ c(
|
|
4333
|
+
children: h ? /* @__PURE__ */ c(ns, { className: "h-4 w-4" }) : /* @__PURE__ */ c(ei, { className: "h-4 w-4" })
|
|
4319
4334
|
}
|
|
4320
4335
|
),
|
|
4321
4336
|
!h && /* @__PURE__ */ c(
|
|
@@ -4327,7 +4342,7 @@ const Du = () => {
|
|
|
4327
4342
|
className: "h-8 w-8 rounded-full bg-white/80 hover:bg-white/90",
|
|
4328
4343
|
onClick: d,
|
|
4329
4344
|
disabled: a,
|
|
4330
|
-
children: /* @__PURE__ */ c(
|
|
4345
|
+
children: /* @__PURE__ */ c(ss, { className: "h-4 w-4" })
|
|
4331
4346
|
}
|
|
4332
4347
|
)
|
|
4333
4348
|
] })
|
|
@@ -4337,14 +4352,14 @@ const Du = () => {
|
|
|
4337
4352
|
className: `flex cursor-pointer items-center justify-center rounded-md border border-dashed p-6 ${a ? "cursor-not-allowed opacity-50" : "hover:border-gray-400"}`,
|
|
4338
4353
|
onClick: d,
|
|
4339
4354
|
children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center gap-2", children: [
|
|
4340
|
-
/* @__PURE__ */ c(
|
|
4355
|
+
/* @__PURE__ */ c(ss, { className: "h-10 w-10 text-gray-400" }),
|
|
4341
4356
|
/* @__PURE__ */ c("p", { className: "text-sm text-gray-500", children: r })
|
|
4342
4357
|
] })
|
|
4343
4358
|
}
|
|
4344
4359
|
),
|
|
4345
|
-
/* @__PURE__ */ c(
|
|
4346
|
-
/* @__PURE__ */ m(
|
|
4347
|
-
/* @__PURE__ */ c(
|
|
4360
|
+
/* @__PURE__ */ c(Cs, { open: o, onOpenChange: l, children: /* @__PURE__ */ m(Ca, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
|
|
4361
|
+
/* @__PURE__ */ m(Ga, { className: "hidden border-b px-4 py-2", children: [
|
|
4362
|
+
/* @__PURE__ */ c(Da, { children: i("Select Image") }),
|
|
4348
4363
|
/* @__PURE__ */ c(
|
|
4349
4364
|
M,
|
|
4350
4365
|
{
|
|
@@ -4353,12 +4368,12 @@ const Du = () => {
|
|
|
4353
4368
|
size: "icon",
|
|
4354
4369
|
className: "absolute right-4 top-2",
|
|
4355
4370
|
onClick: u,
|
|
4356
|
-
children: /* @__PURE__ */ c(
|
|
4371
|
+
children: /* @__PURE__ */ c(ns, { className: "h-4 w-4" })
|
|
4357
4372
|
}
|
|
4358
4373
|
)
|
|
4359
4374
|
] }),
|
|
4360
4375
|
/* @__PURE__ */ c("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
4361
|
-
|
|
4376
|
+
Ic,
|
|
4362
4377
|
{
|
|
4363
4378
|
close: u,
|
|
4364
4379
|
onSelect: f,
|
|
@@ -4368,13 +4383,13 @@ const Du = () => {
|
|
|
4368
4383
|
) }) })
|
|
4369
4384
|
] }) })
|
|
4370
4385
|
] });
|
|
4371
|
-
},
|
|
4386
|
+
}, Lc = Jr(null), En = {
|
|
4372
4387
|
didCatch: !1,
|
|
4373
4388
|
error: null
|
|
4374
4389
|
};
|
|
4375
|
-
class
|
|
4390
|
+
class Nc extends Zr {
|
|
4376
4391
|
constructor(t) {
|
|
4377
|
-
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
4392
|
+
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = En;
|
|
4378
4393
|
}
|
|
4379
4394
|
static getDerivedStateFromError(t) {
|
|
4380
4395
|
return {
|
|
@@ -4392,7 +4407,7 @@ class Pc extends jr {
|
|
|
4392
4407
|
(n = (s = this.props).onReset) === null || n === void 0 || n.call(s, {
|
|
4393
4408
|
args: a,
|
|
4394
4409
|
reason: "imperative-api"
|
|
4395
|
-
}), this.setState(
|
|
4410
|
+
}), this.setState(En);
|
|
4396
4411
|
}
|
|
4397
4412
|
}
|
|
4398
4413
|
componentDidCatch(t, n) {
|
|
@@ -4405,13 +4420,13 @@ class Pc extends jr {
|
|
|
4405
4420
|
} = this.state, {
|
|
4406
4421
|
resetKeys: r
|
|
4407
4422
|
} = this.props;
|
|
4408
|
-
if (s && n.error !== null &&
|
|
4423
|
+
if (s && n.error !== null && Cc(t.resetKeys, r)) {
|
|
4409
4424
|
var a, i;
|
|
4410
4425
|
(a = (i = this.props).onReset) === null || a === void 0 || a.call(i, {
|
|
4411
4426
|
next: r,
|
|
4412
4427
|
prev: t.resetKeys,
|
|
4413
4428
|
reason: "keys"
|
|
4414
|
-
}), this.setState(
|
|
4429
|
+
}), this.setState(En);
|
|
4415
4430
|
}
|
|
4416
4431
|
}
|
|
4417
4432
|
render() {
|
|
@@ -4433,13 +4448,13 @@ class Pc extends jr {
|
|
|
4433
4448
|
if (typeof n == "function")
|
|
4434
4449
|
o = n(l);
|
|
4435
4450
|
else if (s)
|
|
4436
|
-
o =
|
|
4451
|
+
o = jn(s, l);
|
|
4437
4452
|
else if (r !== void 0)
|
|
4438
4453
|
o = r;
|
|
4439
4454
|
else
|
|
4440
4455
|
throw i;
|
|
4441
4456
|
}
|
|
4442
|
-
return
|
|
4457
|
+
return jn(Lc.Provider, {
|
|
4443
4458
|
value: {
|
|
4444
4459
|
didCatch: a,
|
|
4445
4460
|
error: i,
|
|
@@ -4448,11 +4463,11 @@ class Pc extends jr {
|
|
|
4448
4463
|
}, o);
|
|
4449
4464
|
}
|
|
4450
4465
|
}
|
|
4451
|
-
function
|
|
4466
|
+
function Cc() {
|
|
4452
4467
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
4453
4468
|
return e.length !== t.length || e.some((n, s) => !Object.is(n, t[s]));
|
|
4454
4469
|
}
|
|
4455
|
-
const
|
|
4470
|
+
const Gc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Es = (e) => {
|
|
4456
4471
|
if (!e.trim())
|
|
4457
4472
|
return { isValid: !1, parsed: null, placeholders: [], error: { message: "JSON is empty" } };
|
|
4458
4473
|
try {
|
|
@@ -4487,13 +4502,13 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4487
4502
|
}
|
|
4488
4503
|
};
|
|
4489
4504
|
}
|
|
4490
|
-
},
|
|
4505
|
+
}, Dc = (e, t) => {
|
|
4491
4506
|
let s = JSON.stringify(e, null, 2);
|
|
4492
4507
|
return t.forEach(({ original: r }, a) => {
|
|
4493
|
-
const i = `"__placeholder_${a}__"`, o = new RegExp(
|
|
4508
|
+
const i = `"__placeholder_${a}__"`, o = new RegExp(Gc(i), "g");
|
|
4494
4509
|
s = s.replace(o, r);
|
|
4495
4510
|
}), s;
|
|
4496
|
-
},
|
|
4511
|
+
}, Oc = (e, t) => {
|
|
4497
4512
|
if (!e) return "";
|
|
4498
4513
|
let n = JSON.stringify(e, null, 2);
|
|
4499
4514
|
const s = /{{([^{}]+)}}/g;
|
|
@@ -4503,7 +4518,7 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4503
4518
|
n = n.replace(r[0], i);
|
|
4504
4519
|
}
|
|
4505
4520
|
return n;
|
|
4506
|
-
},
|
|
4521
|
+
}, xc = V(() => import("./shared-json-ld-S9OIaOTA.js")), Hu = ({
|
|
4507
4522
|
value: e,
|
|
4508
4523
|
onChange: t,
|
|
4509
4524
|
disabled: n = !1,
|
|
@@ -4516,7 +4531,7 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4516
4531
|
hasJsonLdForSelectedLang: d,
|
|
4517
4532
|
copyJsonLDFromDefaultPage: u
|
|
4518
4533
|
}) => {
|
|
4519
|
-
const [f, g] = K("edit"), [h, p] = K(null), [T, S] = K(""),
|
|
4534
|
+
const [f, g] = K("edit"), [h, p] = K(null), [T, S] = K(""), O = Ie(null), [y] = Dn(), w = i === "jsonLD" && H(y, "features.sharedJsonLD", !1), v = i === "jsonLD" && !d && !!u;
|
|
4520
4535
|
ne(() => {
|
|
4521
4536
|
e.trim() === "" && t("{}");
|
|
4522
4537
|
}, [e, t]);
|
|
@@ -4524,39 +4539,39 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4524
4539
|
if (s) return;
|
|
4525
4540
|
const P = B.target.value;
|
|
4526
4541
|
t(P);
|
|
4527
|
-
},
|
|
4542
|
+
}, I = (B) => {
|
|
4528
4543
|
if (B.key === "Tab") {
|
|
4529
4544
|
B.preventDefault();
|
|
4530
|
-
const P = B.currentTarget,
|
|
4531
|
-
if (
|
|
4532
|
-
const
|
|
4545
|
+
const P = B.currentTarget, L = P.selectionStart, W = P.selectionEnd;
|
|
4546
|
+
if (L !== W) {
|
|
4547
|
+
const fe = e.substring(L, W).split(`
|
|
4533
4548
|
`);
|
|
4534
4549
|
if (B.shiftKey) {
|
|
4535
|
-
const
|
|
4536
|
-
`),
|
|
4537
|
-
t(
|
|
4538
|
-
P.selectionStart =
|
|
4550
|
+
const Te = fe.map((Ge) => Ge.startsWith(" ") ? Ge.substring(2) : Ge).join(`
|
|
4551
|
+
`), Ke = e.substring(0, L) + Te + e.substring(W);
|
|
4552
|
+
t(Ke), setTimeout(() => {
|
|
4553
|
+
P.selectionStart = L, P.selectionEnd = L + Te.length;
|
|
4539
4554
|
}, 0);
|
|
4540
4555
|
} else {
|
|
4541
|
-
const
|
|
4542
|
-
`),
|
|
4543
|
-
t(
|
|
4544
|
-
P.selectionStart =
|
|
4556
|
+
const Te = fe.map((Ge) => ` ${Ge}`).join(`
|
|
4557
|
+
`), Ke = e.substring(0, L) + Te + e.substring(W);
|
|
4558
|
+
t(Ke), setTimeout(() => {
|
|
4559
|
+
P.selectionStart = L, P.selectionEnd = L + Te.length;
|
|
4545
4560
|
}, 0);
|
|
4546
4561
|
}
|
|
4547
4562
|
} else {
|
|
4548
|
-
const $ = e.substring(0,
|
|
4563
|
+
const $ = e.substring(0, L) + " " + e.substring(W);
|
|
4549
4564
|
t($), setTimeout(() => {
|
|
4550
|
-
P.selectionStart = P.selectionEnd =
|
|
4565
|
+
P.selectionStart = P.selectionEnd = L + 2;
|
|
4551
4566
|
}, 0);
|
|
4552
4567
|
}
|
|
4553
4568
|
}
|
|
4554
4569
|
};
|
|
4555
4570
|
ne(() => {
|
|
4556
|
-
const B =
|
|
4571
|
+
const B = Es(e);
|
|
4557
4572
|
if (B.isValid)
|
|
4558
4573
|
if (p(null), B.parsed) {
|
|
4559
|
-
const P =
|
|
4574
|
+
const P = Oc(B.parsed, o);
|
|
4560
4575
|
S(P);
|
|
4561
4576
|
} else
|
|
4562
4577
|
S("");
|
|
@@ -4564,48 +4579,48 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4564
4579
|
p(B.error), S("");
|
|
4565
4580
|
}, [e, o]);
|
|
4566
4581
|
const ye = () => {
|
|
4567
|
-
const B =
|
|
4582
|
+
const B = Es(e);
|
|
4568
4583
|
if (B.isValid && B.parsed) {
|
|
4569
|
-
const P =
|
|
4584
|
+
const P = Dc(B.parsed, B.placeholders);
|
|
4570
4585
|
t(P);
|
|
4571
4586
|
}
|
|
4572
4587
|
}, Ae = () => {
|
|
4573
|
-
h != null && h.position &&
|
|
4588
|
+
h != null && h.position && O.current && (O.current.focus(), O.current.setSelectionRange(h.position, h.position + 1));
|
|
4574
4589
|
};
|
|
4575
|
-
return /* @__PURE__ */ c(
|
|
4590
|
+
return /* @__PURE__ */ c(Nc, { fallback: /* @__PURE__ */ c("div", { children: "Some error" }), children: /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ m(Oa, { value: f, onValueChange: g, className: "w-full", children: [
|
|
4576
4591
|
/* @__PURE__ */ m("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
4577
|
-
/* @__PURE__ */ m(
|
|
4578
|
-
/* @__PURE__ */ m(
|
|
4579
|
-
/* @__PURE__ */ c(
|
|
4592
|
+
/* @__PURE__ */ m(xa, { className: "w-max", children: [
|
|
4593
|
+
/* @__PURE__ */ m(on, { value: "edit", className: "flex items-center gap-1", children: [
|
|
4594
|
+
/* @__PURE__ */ c(ti, { className: "h-4 w-4" }),
|
|
4580
4595
|
/* @__PURE__ */ c("span", { children: "Edit" })
|
|
4581
4596
|
] }),
|
|
4582
4597
|
/* @__PURE__ */ m(
|
|
4583
|
-
|
|
4598
|
+
on,
|
|
4584
4599
|
{
|
|
4585
4600
|
value: "preview",
|
|
4586
4601
|
className: "flex items-center gap-1",
|
|
4587
4602
|
disabled: !e.trim() || h !== null || v,
|
|
4588
4603
|
children: [
|
|
4589
|
-
/* @__PURE__ */ c(
|
|
4604
|
+
/* @__PURE__ */ c(ni, { className: "h-4 w-4" }),
|
|
4590
4605
|
/* @__PURE__ */ c("span", { children: "Preview" })
|
|
4591
4606
|
]
|
|
4592
4607
|
}
|
|
4593
4608
|
),
|
|
4594
4609
|
w && /* @__PURE__ */ m(
|
|
4595
|
-
|
|
4610
|
+
on,
|
|
4596
4611
|
{
|
|
4597
4612
|
value: "shared",
|
|
4598
4613
|
className: "flex items-center gap-1",
|
|
4599
4614
|
disabled: !e.trim() || h !== null,
|
|
4600
4615
|
children: [
|
|
4601
|
-
/* @__PURE__ */ c(
|
|
4616
|
+
/* @__PURE__ */ c(si, { className: "h-4 w-4" }),
|
|
4602
4617
|
/* @__PURE__ */ c("span", { children: "Shared" })
|
|
4603
4618
|
]
|
|
4604
4619
|
}
|
|
4605
4620
|
)
|
|
4606
4621
|
] }),
|
|
4607
4622
|
v ? null : f === "edit" && !s && /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ c(
|
|
4608
|
-
|
|
4623
|
+
bc,
|
|
4609
4624
|
{
|
|
4610
4625
|
dataType: "value",
|
|
4611
4626
|
data: o ?? {},
|
|
@@ -4613,8 +4628,8 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4613
4628
|
}
|
|
4614
4629
|
) })
|
|
4615
4630
|
] }),
|
|
4616
|
-
/* @__PURE__ */ m(
|
|
4617
|
-
!v && f === "edit" && /* @__PURE__ */ c(
|
|
4631
|
+
/* @__PURE__ */ m(ln, { value: "edit", className: "relative mt-0", children: [
|
|
4632
|
+
!v && f === "edit" && /* @__PURE__ */ c(Mn, { content: "Format JSON", side: "right", showTooltip: !n && !h, children: /* @__PURE__ */ c(
|
|
4618
4633
|
M,
|
|
4619
4634
|
{
|
|
4620
4635
|
type: "button",
|
|
@@ -4623,24 +4638,24 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4623
4638
|
onClick: ye,
|
|
4624
4639
|
className: "absolute right-1 top-1 h-6 w-6 p-1",
|
|
4625
4640
|
disabled: !e.trim() || n || h !== null,
|
|
4626
|
-
children: /* @__PURE__ */ c(
|
|
4641
|
+
children: /* @__PURE__ */ c(ri, {})
|
|
4627
4642
|
}
|
|
4628
4643
|
) }),
|
|
4629
4644
|
v ? /* @__PURE__ */ c("div", { className: "flex h-40 items-center justify-center rounded-md bg-black/20", children: /* @__PURE__ */ m("div", { className: "flex max-w-[400px] flex-col items-center gap-2 rounded-md bg-white p-4 shadow-lg", children: [
|
|
4630
4645
|
/* @__PURE__ */ c("div", { className: "max-w-xl text-center text-xs text-gray-500", children: "JSON-LD for is not added for selected language. JSON LD will be used from default language." }),
|
|
4631
4646
|
/* @__PURE__ */ m(M, { type: "button", variant: "default", size: "sm", onClick: u, children: [
|
|
4632
|
-
/* @__PURE__ */ c(
|
|
4647
|
+
/* @__PURE__ */ c(Gs, {}),
|
|
4633
4648
|
"Copy & Edit from default language"
|
|
4634
4649
|
] })
|
|
4635
4650
|
] }) }) : /* @__PURE__ */ c(
|
|
4636
|
-
|
|
4651
|
+
Yn,
|
|
4637
4652
|
{
|
|
4638
|
-
ref:
|
|
4653
|
+
ref: O,
|
|
4639
4654
|
id: i,
|
|
4640
4655
|
name: i,
|
|
4641
4656
|
className: `rounded-md border border-input text-xs ${h ? "border-red-500" : ""}`,
|
|
4642
4657
|
onChange: U,
|
|
4643
|
-
onKeyDown:
|
|
4658
|
+
onKeyDown: I,
|
|
4644
4659
|
value: e,
|
|
4645
4660
|
placeholder: r,
|
|
4646
4661
|
rows: a,
|
|
@@ -4648,9 +4663,9 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4648
4663
|
readOnly: s
|
|
4649
4664
|
}
|
|
4650
4665
|
),
|
|
4651
|
-
h && /* @__PURE__ */ m(
|
|
4652
|
-
/* @__PURE__ */ c(
|
|
4653
|
-
/* @__PURE__ */ m(
|
|
4666
|
+
h && /* @__PURE__ */ m(Ra, { variant: "destructive", className: "mt-2", children: [
|
|
4667
|
+
/* @__PURE__ */ c(ai, { className: "h-4 w-4" }),
|
|
4668
|
+
/* @__PURE__ */ m(ka, { className: "flex flex-col", children: [
|
|
4654
4669
|
/* @__PURE__ */ c("span", { className: "font-medium", children: "Invalid JSON" }),
|
|
4655
4670
|
/* @__PURE__ */ c("span", { className: "text-sm", children: h.message }),
|
|
4656
4671
|
h.line && h.column && /* @__PURE__ */ m("span", { className: "text-sm", children: [
|
|
@@ -4673,15 +4688,15 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4673
4688
|
] })
|
|
4674
4689
|
] })
|
|
4675
4690
|
] }),
|
|
4676
|
-
/* @__PURE__ */ m(
|
|
4677
|
-
/* @__PURE__ */ c(
|
|
4691
|
+
/* @__PURE__ */ m(ln, { value: "preview", className: "mt-0", children: [
|
|
4692
|
+
/* @__PURE__ */ c(Yn, { rows: a, value: T, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
|
|
4678
4693
|
/* @__PURE__ */ c("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
|
|
4679
4694
|
] }),
|
|
4680
|
-
w && /* @__PURE__ */ c(
|
|
4695
|
+
w && /* @__PURE__ */ c(ln, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(xc, {}) }) })
|
|
4681
4696
|
] }) }) });
|
|
4682
|
-
},
|
|
4683
|
-
const t =
|
|
4684
|
-
return
|
|
4697
|
+
}, qu = (e) => {
|
|
4698
|
+
const t = Ds(), n = b();
|
|
4699
|
+
return re({
|
|
4685
4700
|
queryKey: [E.GET_CHAI_USER, e],
|
|
4686
4701
|
queryFn: async () => {
|
|
4687
4702
|
const r = await n(t, {
|
|
@@ -4690,130 +4705,130 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4690
4705
|
});
|
|
4691
4706
|
return { ...r, name: r.name || r.email };
|
|
4692
4707
|
},
|
|
4693
|
-
enabled: !
|
|
4708
|
+
enabled: !Se(e),
|
|
4694
4709
|
staleTime: "static"
|
|
4695
4710
|
});
|
|
4696
4711
|
};
|
|
4697
4712
|
if (typeof window > "u")
|
|
4698
4713
|
throw new Error("@chaibuilder/pages is not available on the server");
|
|
4699
4714
|
export {
|
|
4700
|
-
|
|
4715
|
+
Cu as $,
|
|
4701
4716
|
E as A,
|
|
4702
|
-
|
|
4717
|
+
qs as B,
|
|
4703
4718
|
F as C,
|
|
4704
|
-
|
|
4719
|
+
dl as D,
|
|
4705
4720
|
se as E,
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4721
|
+
tr as F,
|
|
4722
|
+
cr as G,
|
|
4723
|
+
Xo as H,
|
|
4724
|
+
gu as I,
|
|
4725
|
+
mu as J,
|
|
4711
4726
|
Re as K,
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4727
|
+
Ot as L,
|
|
4728
|
+
Sn as M,
|
|
4729
|
+
Eu as N,
|
|
4730
|
+
du as O,
|
|
4716
4731
|
te as P,
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4732
|
+
_u as Q,
|
|
4733
|
+
vu as R,
|
|
4734
|
+
Au as S,
|
|
4735
|
+
Mn as T,
|
|
4736
|
+
ut as U,
|
|
4737
|
+
bu as V,
|
|
4738
|
+
Pu as W,
|
|
4739
|
+
Vo as X,
|
|
4740
|
+
Al as Y,
|
|
4741
|
+
_n as Z,
|
|
4742
|
+
gl as _,
|
|
4728
4743
|
pe as a,
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4744
|
+
Rn as a$,
|
|
4745
|
+
Gu as a0,
|
|
4746
|
+
yl as a1,
|
|
4747
|
+
Du as a2,
|
|
4748
|
+
Ou as a3,
|
|
4749
|
+
pu as a4,
|
|
4750
|
+
uu as a5,
|
|
4751
|
+
wu as a6,
|
|
4737
4752
|
Z as a7,
|
|
4738
|
-
|
|
4739
|
-
|
|
4753
|
+
Bo as a8,
|
|
4754
|
+
tc as a9,
|
|
4740
4755
|
en as aA,
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4756
|
+
Bs as aB,
|
|
4757
|
+
ru as aC,
|
|
4758
|
+
ou as aD,
|
|
4759
|
+
Hu as aE,
|
|
4760
|
+
Es as aF,
|
|
4761
|
+
au as aG,
|
|
4762
|
+
lu as aH,
|
|
4763
|
+
cu as aI,
|
|
4764
|
+
iu as aJ,
|
|
4765
|
+
yo as aK,
|
|
4766
|
+
Bi as aL,
|
|
4767
|
+
Dn as aM,
|
|
4768
|
+
Oi as aN,
|
|
4769
|
+
bc as aO,
|
|
4770
|
+
Vu as aP,
|
|
4771
|
+
zc as aQ,
|
|
4772
|
+
Nc as aR,
|
|
4773
|
+
eo as aS,
|
|
4774
|
+
Yc as aT,
|
|
4775
|
+
Us as aU,
|
|
4776
|
+
Mu as aV,
|
|
4762
4777
|
Ne as aW,
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4778
|
+
Fu as aX,
|
|
4779
|
+
gc as aY,
|
|
4780
|
+
Bu as aZ,
|
|
4781
|
+
Ku as a_,
|
|
4782
|
+
yu as aa,
|
|
4768
4783
|
Ut as ab,
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4784
|
+
ku as ac,
|
|
4785
|
+
Nu as ad,
|
|
4786
|
+
Lu as ae,
|
|
4787
|
+
Zs as af,
|
|
4773
4788
|
xe as ag,
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4789
|
+
ml as ah,
|
|
4790
|
+
Iu as ai,
|
|
4791
|
+
Su as aj,
|
|
4792
|
+
Tu as ak,
|
|
4778
4793
|
Mt as al,
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4794
|
+
hu as am,
|
|
4795
|
+
Li as an,
|
|
4796
|
+
qu as ao,
|
|
4797
|
+
bi as ap,
|
|
4798
|
+
N as aq,
|
|
4799
|
+
b as ar,
|
|
4800
|
+
hc as as,
|
|
4801
|
+
Wc as at,
|
|
4802
|
+
su as au,
|
|
4803
|
+
xn as av,
|
|
4789
4804
|
ce as aw,
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4805
|
+
un as ax,
|
|
4806
|
+
ue as ay,
|
|
4807
|
+
ks as az,
|
|
4808
|
+
Fs as b,
|
|
4809
|
+
So as b0,
|
|
4810
|
+
ve as c,
|
|
4811
|
+
Hi as d,
|
|
4812
|
+
Hs as e,
|
|
4813
|
+
Ao as f,
|
|
4814
|
+
Ks as g,
|
|
4815
|
+
Jc as h,
|
|
4816
|
+
Zc as i,
|
|
4802
4817
|
Be as j,
|
|
4803
|
-
|
|
4818
|
+
Un as k,
|
|
4804
4819
|
Me as l,
|
|
4805
4820
|
Ce as m,
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4821
|
+
hi as n,
|
|
4822
|
+
eu as o,
|
|
4823
|
+
cc as p,
|
|
4824
|
+
Xc as q,
|
|
4825
|
+
tu as r,
|
|
4826
|
+
nu as s,
|
|
4827
|
+
dn as t,
|
|
4828
|
+
jc as u,
|
|
4829
|
+
Uu as v,
|
|
4830
|
+
j as w,
|
|
4831
|
+
lr as x,
|
|
4832
|
+
xu as y,
|
|
4833
|
+
Ru as z
|
|
4819
4834
|
};
|