@chaibuilder/pages 0.16.18 → 0.16.20
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-DbBNqqNQ.cjs → 2AITGKQY-BH_4lP5P.cjs} +1 -1
- package/dist/{2AITGKQY-jev6nZ--.js → 2AITGKQY-BuWtti7-.js} +2 -2
- package/dist/{NCMVHL6D-BjH1Tg1s.cjs → NCMVHL6D-CfRPe-3L.cjs} +1 -1
- package/dist/{NCMVHL6D-BtVmDJZQ.js → NCMVHL6D-DbC9VYfW.js} +2 -2
- package/dist/{ZDWCUMSJ-Nezb42Bx.cjs → ZDWCUMSJ-BxhCnC2U.cjs} +1 -1
- package/dist/{ZDWCUMSJ-S9dikjgz.js → ZDWCUMSJ-CE0Md3aC.js} +1 -1
- package/dist/{active-in-another-tab-nD0Ct2zR.js → active-in-another-tab-C4o8FQXv.js} +1 -1
- package/dist/{active-in-another-tab-B2jwquvi.cjs → active-in-another-tab-SSCyhy2-.cjs} +1 -1
- package/dist/{add-new-language-page-BJk1ZO-t.js → add-new-language-page-BCu4Npk2.js} +2 -2
- package/dist/{add-new-language-page-B2CGLeBl.cjs → add-new-language-page-DUkVmwsT.cjs} +1 -1
- package/dist/{add-new-page-Y4l1kKgu.cjs → add-new-page-BDpRUueB.cjs} +1 -1
- package/dist/{add-new-page-DNMc1_m8.js → add-new-page-D1pc9kLA.js} +1 -1
- package/dist/{ai-panel-content-B2R5ac1Q.cjs → ai-panel-content-Bq3BC1Dm.cjs} +1 -1
- package/dist/{ai-panel-content-BZDagIjt.js → ai-panel-content-Dg6P7vk7.js} +2 -2
- package/dist/{ai-panel-default-lang-DFVRw2XO.js → ai-panel-default-lang-BxYd_6VF.js} +3 -3
- package/dist/{ai-panel-default-lang-DpRzlKuh.cjs → ai-panel-default-lang-C0X_Srso.cjs} +2 -2
- package/dist/{ai-panel-other-lang-mjWK495u.cjs → ai-panel-other-lang-BOu1wJ5J.cjs} +1 -1
- package/dist/{ai-panel-other-lang-CGiXHbUA.js → ai-panel-other-lang-CBAP_iX-.js} +3 -3
- package/dist/{ai-prompt-input-B6dhDx3f.js → ai-prompt-input-CiZCB6jc.js} +2 -2
- package/dist/{ai-prompt-input-B3799aqQ.cjs → ai-prompt-input-bqLGbsQ2.cjs} +1 -1
- package/dist/{ai-translation-prompt-C3SvF46x.cjs → ai-translation-prompt-Cas13J-r.cjs} +1 -1
- package/dist/{ai-translation-prompt-D5ndfcqu.js → ai-translation-prompt-D3XU5z3f.js} +1 -1
- package/dist/{continue-editing-in-this-client-BtPTGxtF.js → continue-editing-in-this-client-DIpi2ZSi.js} +1 -1
- package/dist/{continue-editing-in-this-client-ClnIhAB4.cjs → continue-editing-in-this-client-DbHzW_zt.cjs} +1 -1
- package/dist/{delete-page-CgbNmdX3.js → delete-page-CODOstkw.js} +1 -1
- package/dist/{delete-page-BWQiX4Qy.cjs → delete-page-DPHNAOC6.cjs} +1 -1
- package/dist/{digital-asset-manager-CHPG0akQ.cjs → digital-asset-manager-BllbsemN.cjs} +1 -1
- package/dist/{digital-asset-manager-D2DU2Arz.js → digital-asset-manager-BuYVjKfQ.js} +1 -1
- package/dist/{duplicate-page-D9YHfSTB.cjs → duplicate-page-Dc6_UBNZ.cjs} +1 -1
- package/dist/{duplicate-page-nhaRQq48.js → duplicate-page-DfH67AsW.js} +2 -2
- package/dist/{dynamic-page-selector-BpAx2T1D.js → dynamic-page-selector-C2UK6qGj.js} +1 -1
- package/dist/{dynamic-page-selector-BhFVhQXO.cjs → dynamic-page-selector-Dd8Orls1.cjs} +1 -1
- package/dist/index--Lu_Q_nO.cjs +5 -0
- package/dist/{index-tOCLaJS0.js → index-B_T6ZeA4.js} +106 -106
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{json-diff-viewer-B7VUOCAk.cjs → json-diff-viewer-1IHmR_Nt.cjs} +1 -1
- package/dist/{json-diff-viewer-BHsCH0rV.js → json-diff-viewer-D8uyTokS.js} +1 -1
- package/dist/{lang-panel-CBDont1C.cjs → lang-panel-D-Pbw2bR.cjs} +1 -1
- package/dist/{lang-panel-Bf4bybUW.js → lang-panel-d7376A7w.js} +2 -2
- package/dist/{mark-as-template-mD5zJnTi.js → mark-as-template-Bx-MAB5M.js} +1 -1
- package/dist/{mark-as-template-ClVxTs7-.cjs → mark-as-template-DHFkkBvV.cjs} +1 -1
- package/dist/{no-language-page-content-BGqiBsuw.cjs → no-language-page-content-DkK7mBnG.cjs} +1 -1
- package/dist/{no-language-page-content-C91jYzRM.js → no-language-page-content-if-qlxZz.js} +1 -1
- package/dist/{no-language-page-dialog-DnN17tvI.cjs → no-language-page-dialog-49fBehZo.cjs} +1 -1
- package/dist/{no-language-page-dialog-CU_Y_GF8.js → no-language-page-dialog-CCLWQP1E.js} +2 -2
- package/dist/{page-creator-Dwn4aALC.js → page-creator-DRDoy3nM.js} +2 -2
- package/dist/{page-creator-BYEKqyKF.cjs → page-creator-DlJXKAhw.cjs} +1 -1
- package/dist/{page-lock-DAWrc3GC.cjs → page-lock-DOnPhjGp.cjs} +1 -1
- package/dist/{page-lock-DHoFXsEj.js → page-lock-pwxPivz-.js} +2 -2
- package/dist/{page-locked-dialog-QL8ZUQQd.js → page-locked-dialog-238NohyB.js} +1 -1
- package/dist/{page-locked-dialog-DMDIpR6r.cjs → page-locked-dialog-DKn93bBu.cjs} +1 -1
- package/dist/{page-manager-new-r1540okw.cjs → page-manager-new-Ch0UNJM1.cjs} +1 -1
- package/dist/{page-manager-new-1RGAp9KU.js → page-manager-new-hEQwUorR.js} +2 -2
- package/dist/{page-manager-search-and-filter-Dp1Z6uDu.cjs → page-manager-search-and-filter-4JatGyBT.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-B9kZBAGe.js → page-manager-search-and-filter-B86rQEO4.js} +1 -1
- package/dist/{page-revisions-content-qrkR9Stz.cjs → page-revisions-content-ChOACVs4.cjs} +1 -1
- package/dist/{page-revisions-content-BLLa8Sar.js → page-revisions-content-V9S1rPUy.js} +2 -2
- package/dist/{publish-pages-content-DquiwxG5.cjs → publish-pages-content-CXKknMnI.cjs} +1 -1
- package/dist/{publish-pages-content-CML_ott4.js → publish-pages-content-GKnG7R5W.js} +2 -2
- package/dist/{save-to-lib-DZOs6H7V.js → save-to-lib-BO3WEr-u.js} +1 -1
- package/dist/{save-to-lib-BBZn9sEZ.cjs → save-to-lib-BderZ0Qz.cjs} +1 -1
- package/dist/{selected-block-display-qF0wXDpP.js → selected-block-display-DAe0XQgw.js} +1 -1
- package/dist/{selected-block-display-DWpFg5KU.cjs → selected-block-display-yB5bvo9w.cjs} +1 -1
- package/dist/{seo-panel-CmqA8v6p.cjs → seo-panel-C2WY1dTf.cjs} +1 -1
- package/dist/{seo-panel-DcTu-rLl.js → seo-panel-DuC3gQQy.js} +1 -1
- package/dist/{shared-json-ld-DZ2eZ35l.cjs → shared-json-ld-ChfktUpf.cjs} +1 -1
- package/dist/{shared-json-ld-Bs_lzQ6G.js → shared-json-ld-DMpCm3M4.js} +1 -1
- package/dist/{slug-input-Df9ug5YA.js → slug-input-CO6AGAQD.js} +1 -1
- package/dist/{slug-input-BvRnz9Xf.cjs → slug-input-CrjrFrxP.cjs} +1 -1
- package/dist/{take-over-request-BBmLlOro.js → take-over-request-Du7grW5x.js} +1 -1
- package/dist/{take-over-request-eUnq0CcU.cjs → take-over-request-mNydSSFX.cjs} +1 -1
- package/dist/{theme-panel-footer-BO6xk08X.js → theme-panel-footer-CSC6DpWO.js} +1 -1
- package/dist/{theme-panel-footer-CzntKXBS.cjs → theme-panel-footer-eZ1bbLzq.cjs} +1 -1
- package/dist/{unmark-as-template-BHbGyEJS.cjs → unmark-as-template-DzU6-XK7.cjs} +1 -1
- package/dist/{unmark-as-template-CSpTbvOz.js → unmark-as-template-dEb6wFT9.js} +1 -1
- package/dist/{unpublish-page-DTVEQJoy.js → unpublish-page-CxAB3-Cj.js} +1 -1
- package/dist/{unpublish-page-kHxAVlJS.cjs → unpublish-page-DGd2Kktq.cjs} +1 -1
- package/dist/{web-preview-CW4XBgip.cjs → web-preview-B6G0vdiq.cjs} +1 -1
- package/dist/{web-preview-SaTB5Pss.js → web-preview-yBF4EXzm.js} +1 -1
- package/package.json +3 -3
- package/dist/index-Nz9M0K-w.cjs +0 -5
|
@@ -3,11 +3,11 @@ var Vn = (e) => {
|
|
|
3
3
|
};
|
|
4
4
|
var Hn = (e, t, n) => t.has(e) || Vn("Cannot " + n);
|
|
5
5
|
var A = (e, t, n) => (Hn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), O = (e, t, n) => t.has(e) ? Vn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), G = (e, t, n, s) => (Hn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
6
|
-
import { jsxs as m, Fragment as
|
|
6
|
+
import { jsxs as m, Fragment as ge, jsx as c } from "react/jsx-runtime";
|
|
7
7
|
import { get as H, reverse as Or, sortBy as Dr, find as ae, noop as ms, groupBy as xr, values as Es, first as ps, minBy as ys, keyBy as Rr, map as Kt, isEmpty as Te, compact as As, each as kr, upperCase as qn, filter as Ts, includes as Ur, has as Yt, pick as In, keys as Mr, pickBy as Br, endsWith as Fr, isArray as Kr, startCase as Vr, isFunction as Hr, cloneDeep as qr, isEqual as $r } from "lodash-es";
|
|
8
8
|
import * as Q from "react";
|
|
9
9
|
import Qr, { useMemo as q, useCallback as z, useState as K, useEffect as ne, useRef as Ie, lazy as V, Suspense as X, createContext as zr, Component as jr, createElement as $n } from "react";
|
|
10
|
-
import { atom as
|
|
10
|
+
import { atom as Ee, useAtom as ie } from "jotai";
|
|
11
11
|
import { useQuery as oe, useMutation as Y, useQueryClient as J, onlineManager as Ss, QueryClient as Wr, QueryClientProvider as Yr } from "@tanstack/react-query";
|
|
12
12
|
import { useLanguages as _e, useSavePage as ke, useTranslation as Pe, mergeClasses as Vt, usePermissions as _s, PERMISSIONS as Jr, useRightPanel as Zr, useChaiFeatureFlag as Xr, useIsPageLoaded as ea, registerChaiLibrary as ta, getBlocksFromHTML as na, registerChaiSidebarPanel as Gt, registerChaiFeatureFlag as rn, registerChaiTopBar as sa, registerChaiMediaManager as ra, registerChaiSaveToLibrary as aa, ChaiBuilderEditor as ia } from "@chaibuilder/sdk";
|
|
13
13
|
import { Tooltip as Jt, TooltipTrigger as Zt, Button as M, TooltipContent as Xt, Sheet as Ps, SheetContent as ws, SheetHeader as oa, SheetTitle as la, SheetDescription as ca, DropdownMenu as Ln, DropdownMenuTrigger as Nn, DropdownMenuContent as Cn, DropdownMenuItem as fe, Separator as ua, TooltipProvider as vs, SheetTrigger as da, Skeleton as Ot, Dialog as bs, HoverCard as fa, HoverCardTrigger as ha, HoverCardContent as ga, AlertDialog as ma, AlertDialogTrigger as Ea, AlertDialogContent as pa, AlertDialogHeader as ya, AlertDialogTitle as Aa, AlertDialogDescription as Ta, AlertDialogFooter as Sa, AlertDialogCancel as _a, AlertDialogAction as Pa, Popover as wa, PopoverTrigger as va, DialogContent as ba, DialogHeader as Ia, DialogTitle as La, Tabs as Na, TabsList as Ca, TabsTrigger as an, TabsContent as on, Textarea as Qn, Alert as Ga, AlertDescription as Oa } from "@chaibuilder/sdk/ui";
|
|
@@ -267,7 +267,7 @@ const Dt = {
|
|
|
267
267
|
UPDATE_ASSET: "UPDATE_ASSET",
|
|
268
268
|
GET_ASSETS: "GET_ASSETS",
|
|
269
269
|
GET_ASSET: "GET_ASSET"
|
|
270
|
-
}, ai =
|
|
270
|
+
}, ai = Ee({}), Gn = () => ie(ai), le = (e, t) => {
|
|
271
271
|
const [n] = Gn();
|
|
272
272
|
return q(() => H(n, e, t), [n, e, t]);
|
|
273
273
|
}, C = () => le("apiUrl", "/chai/api"), Ls = () => le("usersApiUrl", "/chai/users"), Kc = () => le("assetsApiUrl", "/chai/assets"), Ns = () => le("websocket", null), Cs = async (e, t, n = {}) => await fetch(e, {
|
|
@@ -359,7 +359,7 @@ const Me = (e) => {
|
|
|
359
359
|
},
|
|
360
360
|
enabled: !!s
|
|
361
361
|
});
|
|
362
|
-
}, ii =
|
|
362
|
+
}, ii = Ee(
|
|
363
363
|
null
|
|
364
364
|
), Gs = () => ie(ii), On = () => {
|
|
365
365
|
const [e] = Gs();
|
|
@@ -403,13 +403,13 @@ const li = ({ query: e, uuid: t }) => {
|
|
|
403
403
|
updateSearchQuery: f,
|
|
404
404
|
onChangeLanguage: g
|
|
405
405
|
};
|
|
406
|
-
}, ui =
|
|
406
|
+
}, ui = Ee({ lastSaved: void 0 }), Os = () => ie(ui), ce = () => {
|
|
407
407
|
const [e] = we(), t = e.get("page"), { data: n, isFetching: s } = Me();
|
|
408
408
|
return { data: q(() => ({ ...ae(n, { id: t }) || {} }), [n, t]), isFetching: s };
|
|
409
409
|
}, Ne = () => {
|
|
410
410
|
const [e] = we(), t = e.get("lang") ?? "", { data: n, isFetching: s } = Me();
|
|
411
411
|
return { data: q(() => ae(n, { lang: t }) || {}, [n, t]), isFetching: s };
|
|
412
|
-
}, di =
|
|
412
|
+
}, di = Ee({}), fi = () => ie(di), hi = () => {
|
|
413
413
|
const { data: e } = Ne(), t = On(), n = le("getLiveUrl", ms), s = e == null ? void 0 : e.slug, r = n(s || "/");
|
|
414
414
|
return t ? r + t : r;
|
|
415
415
|
}, Be = () => {
|
|
@@ -433,14 +433,14 @@ function Ds(e, t, n = !1) {
|
|
|
433
433
|
const s = e.toString() ? `?${e.toString()}` : "/";
|
|
434
434
|
n ? window.history.replaceState(null, "", s) : window.history.pushState({}, "", s), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
435
435
|
}
|
|
436
|
-
const Dn =
|
|
436
|
+
const Dn = Ee(null), xn = () => {
|
|
437
437
|
const e = le("currentUser"), t = le("onLogout");
|
|
438
438
|
return {
|
|
439
439
|
isLoggedIn: !!e,
|
|
440
440
|
user: e,
|
|
441
441
|
logout: t
|
|
442
442
|
};
|
|
443
|
-
},
|
|
443
|
+
}, te = {
|
|
444
444
|
LOCKED: "LOCKED",
|
|
445
445
|
EDITING: "EDITING",
|
|
446
446
|
CHECKING: "CHECKING",
|
|
@@ -464,7 +464,7 @@ const Dn = pe(null), xn = () => {
|
|
|
464
464
|
se.FORCE_TAKE_OVER_REQUEST,
|
|
465
465
|
se.CONTINUE_EDITING_IN_THIS_CLIENT,
|
|
466
466
|
se.CONTINUE_EDITING_IN_THIS_TAB_REQUEST
|
|
467
|
-
], Ei =
|
|
467
|
+
], Ei = Ee({}), xs = Ee(null), pi = Ee(te.CHECKING), yi = Ee({}), Ai = (e) => {
|
|
468
468
|
const t = {}, n = xr(Es(e).map(ps).filter(Boolean), "pageId");
|
|
469
469
|
return Object.entries(n).forEach(
|
|
470
470
|
([s, r]) => t[s] = ys(r, "onlineAt")
|
|
@@ -486,8 +486,8 @@ let ln = null;
|
|
|
486
486
|
const Rs = () => {
|
|
487
487
|
const [e, t] = ie(Ei);
|
|
488
488
|
return { pageToUser: e, setPageToUser: t };
|
|
489
|
-
},
|
|
490
|
-
const [e, t] = ie(pi), n = [
|
|
489
|
+
}, pe = () => {
|
|
490
|
+
const [e, t] = ie(pi), n = [te.LOCKED, te.ACTIVE_IN_ANOTHER_TAB].includes(e), s = [te.EDITING].includes(e);
|
|
491
491
|
return { pageStatus: e, setPageStatus: t, isLocked: n, isEditing: s };
|
|
492
492
|
}, ks = () => {
|
|
493
493
|
const [e, t] = ie(yi);
|
|
@@ -496,15 +496,15 @@ const Rs = () => {
|
|
|
496
496
|
const e = Nt(), { pageToUser: t } = Rs();
|
|
497
497
|
return q(() => t[e], [t, e]);
|
|
498
498
|
}, Rn = () => {
|
|
499
|
-
const e = Ns(), { setPageStatus: t } =
|
|
499
|
+
const e = Ns(), { setPageStatus: t } = pe(), [n] = ie(xs);
|
|
500
500
|
return ne(() => {
|
|
501
501
|
if (clearTimeout(ln), !e)
|
|
502
502
|
return ln = setTimeout(() => {
|
|
503
|
-
e || t(
|
|
503
|
+
e || t(te.EDITING);
|
|
504
504
|
}, 500), () => clearTimeout(ln);
|
|
505
505
|
}, [e, t]), n;
|
|
506
506
|
}, Pi = () => {
|
|
507
|
-
const e = Nt(), t = en(), n = Rn(), { setPageToUser: s } = Rs(), { setPageStatus: r, pageStatus: a } =
|
|
507
|
+
const e = Nt(), t = en(), n = Rn(), { setPageToUser: s } = Rs(), { setPageStatus: r, pageStatus: a } = pe(), i = Ie(e);
|
|
508
508
|
return i.current = e, z(
|
|
509
509
|
(o) => {
|
|
510
510
|
const l = o || n;
|
|
@@ -513,14 +513,14 @@ const Rs = () => {
|
|
|
513
513
|
s(u);
|
|
514
514
|
const f = u[i.current];
|
|
515
515
|
if (!f)
|
|
516
|
-
r(
|
|
516
|
+
r(te.CHECKING);
|
|
517
517
|
else if (!t)
|
|
518
|
-
r(
|
|
518
|
+
r(te.CHECKING);
|
|
519
519
|
else if (f.userId === t && f.clientId === Ue) {
|
|
520
|
-
if (a ===
|
|
520
|
+
if (a === te.TAKE_OVER_REQUESTED)
|
|
521
521
|
return;
|
|
522
|
-
r(
|
|
523
|
-
} else f.userId === t && f.clientId !== Ue ? r(
|
|
522
|
+
r(te.EDITING);
|
|
523
|
+
} else f.userId === t && f.clientId !== Ue ? r(te.ACTIVE_IN_ANOTHER_TAB) : r(te.LOCKED);
|
|
524
524
|
},
|
|
525
525
|
[n, s, r, t, a]
|
|
526
526
|
);
|
|
@@ -535,7 +535,7 @@ const Rs = () => {
|
|
|
535
535
|
[n, e, s, r]
|
|
536
536
|
);
|
|
537
537
|
}, vi = () => {
|
|
538
|
-
const e = en(), t = Nt(), n = Rn(), { setPageStatus: s } =
|
|
538
|
+
const e = en(), t = Nt(), n = Rn(), { setPageStatus: s } = pe(), { setPageLockMeta: r } = ks(), a = wi(), i = Ie(t), { savePageAsync: o } = ke();
|
|
539
539
|
return i.current = t, z(
|
|
540
540
|
(l) => async ({ payload: d }) => {
|
|
541
541
|
const u = d || {};
|
|
@@ -552,12 +552,12 @@ const Rs = () => {
|
|
|
552
552
|
break;
|
|
553
553
|
}
|
|
554
554
|
case se.TAKE_OVER_REQUEST: {
|
|
555
|
-
r({ requestingUserId: u == null ? void 0 : u.userId, requestingClientId: u == null ? void 0 : u.senderClientId }), s(
|
|
555
|
+
r({ requestingUserId: u == null ? void 0 : u.userId, requestingClientId: u == null ? void 0 : u.senderClientId }), s(te.TAKE_OVER_REQUESTED);
|
|
556
556
|
break;
|
|
557
557
|
}
|
|
558
558
|
case se.CONTINUE_EDITING_IN_THIS_CLIENT: {
|
|
559
559
|
const f = Ti(n == null ? void 0 : n.presenceState());
|
|
560
|
-
s(
|
|
560
|
+
s(te.CHECKING), await (n == null ? void 0 : n.track({ onlineAt: f, pageId: i.current, userId: e, clientId: Ue }));
|
|
561
561
|
break;
|
|
562
562
|
}
|
|
563
563
|
case se.TAKE_OVER_REJECTED: {
|
|
@@ -569,33 +569,33 @@ const Rs = () => {
|
|
|
569
569
|
[a, r, s, n, e, o]
|
|
570
570
|
);
|
|
571
571
|
}, Hc = () => {
|
|
572
|
-
const e = Ns(), t = en(), n = Nt(), s = Si(), [r, a] = ie(xs),
|
|
572
|
+
const e = Ns(), t = en(), n = Nt(), s = Si(), [r, a] = ie(xs), i = vi(), o = Pi(), l = Ie(i), d = Ie(o);
|
|
573
573
|
ne(() => {
|
|
574
|
-
|
|
575
|
-
}, [
|
|
576
|
-
const
|
|
574
|
+
l.current = i, d.current = o;
|
|
575
|
+
}, [i, o]), ne(() => {
|
|
576
|
+
const u = () => {
|
|
577
577
|
document.visibilityState === "visible" && r && r.subscribe();
|
|
578
578
|
};
|
|
579
|
-
return document.addEventListener("visibilitychange",
|
|
580
|
-
document.removeEventListener("visibilitychange",
|
|
579
|
+
return document.addEventListener("visibilitychange", u), () => {
|
|
580
|
+
document.removeEventListener("visibilitychange", u);
|
|
581
581
|
};
|
|
582
582
|
}, [r]), ne(() => {
|
|
583
583
|
if (!e || !t || !s || r && r.topic === s) return;
|
|
584
|
-
const
|
|
584
|
+
const u = e.channel(s, {
|
|
585
585
|
config: { presence: { key: Ue } }
|
|
586
586
|
});
|
|
587
|
-
return mi.forEach((
|
|
588
|
-
|
|
589
|
-
|
|
587
|
+
return mi.forEach((f) => {
|
|
588
|
+
u.on("broadcast", { event: f }, (g) => {
|
|
589
|
+
l.current(f)(g);
|
|
590
590
|
});
|
|
591
|
-
}), gi.forEach((
|
|
592
|
-
|
|
593
|
-
|
|
591
|
+
}), gi.forEach((f) => {
|
|
592
|
+
u.on("presence", { event: f }, () => {
|
|
593
|
+
d.current(u);
|
|
594
594
|
});
|
|
595
|
-
}),
|
|
596
|
-
|
|
595
|
+
}), u.subscribe(async (f) => {
|
|
596
|
+
f === "SUBSCRIBED" ? a(u) : (f === "CHANNEL_ERROR" || f === "TIMED_OUT") && console.log("Realtime connection failed", f);
|
|
597
597
|
}), () => {
|
|
598
|
-
|
|
598
|
+
u.unsubscribe();
|
|
599
599
|
};
|
|
600
600
|
}, [e, t, s, a]), ne(() => (r && n && t && r.track({
|
|
601
601
|
pageId: n,
|
|
@@ -635,8 +635,8 @@ const Rs = () => {
|
|
|
635
635
|
},
|
|
636
636
|
placeholderData: (r) => r || {}
|
|
637
637
|
});
|
|
638
|
-
}, bi = V(() => import("./page-manager-new-
|
|
639
|
-
const { t } = Pe(), [n, s] = we(), r = n.get("page"), { data: a, isFetching: i } = ce(), { data: o, isFetching: l } = Us(), [d, u] = K(!1), [f, g] = K(!0), { savePage: h } = ke(), p = !!r && !Te(a), { isLocked: T } =
|
|
638
|
+
}, bi = V(() => import("./page-manager-new-hEQwUorR.js")), Ms = ({ children: e }) => {
|
|
639
|
+
const { t } = Pe(), [n, s] = we(), r = n.get("page"), { data: a, isFetching: i } = ce(), { data: o, isFetching: l } = Us(), [d, u] = K(!1), [f, g] = K(!0), { savePage: h } = ke(), p = !!r && !Te(a), { isLocked: T } = pe(), S = q(() => {
|
|
640
640
|
if (!o || l) return !1;
|
|
641
641
|
const v = o.find((U) => U.slug === "/");
|
|
642
642
|
return v == null ? void 0 : v.id;
|
|
@@ -647,7 +647,7 @@ const Rs = () => {
|
|
|
647
647
|
Ds(U, s), !l && o && g(!1);
|
|
648
648
|
}, [r, l, o, S, s]);
|
|
649
649
|
const D = !f && !r, y = !f && !i && Te(a), w = d || D || y;
|
|
650
|
-
return /* @__PURE__ */ m(
|
|
650
|
+
return /* @__PURE__ */ m(ge, { children: [
|
|
651
651
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ c("div", { className: "relative", children: /* @__PURE__ */ m(Jt, { children: [
|
|
652
652
|
/* @__PURE__ */ c(
|
|
653
653
|
Zt,
|
|
@@ -683,7 +683,7 @@ const Rs = () => {
|
|
|
683
683
|
}
|
|
684
684
|
) })
|
|
685
685
|
] });
|
|
686
|
-
}, Ii = V(() => import("./add-new-language-page-
|
|
686
|
+
}, Ii = V(() => import("./add-new-language-page-BCu4Npk2.js")), Li = () => {
|
|
687
687
|
const e = le("topLeftCorner", null);
|
|
688
688
|
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Qr.createElement(e, {}) }) : null;
|
|
689
689
|
}, Ni = ({
|
|
@@ -691,7 +691,7 @@ const Rs = () => {
|
|
|
691
691
|
variant: t = "ghost",
|
|
692
692
|
goToDefaultLang: n = !1
|
|
693
693
|
}) => {
|
|
694
|
-
const { fallbackLang: s, languages: r, selectedLang: a, setSelectedLang: i } = _e(), o = Te(a) ? s : a, [, l] = we(), { isLocked: d } =
|
|
694
|
+
const { fallbackLang: s, languages: r, selectedLang: a, setSelectedLang: i } = _e(), o = Te(a) ? s : a, [, l] = we(), { isLocked: d } = pe(), { t: u } = Pe();
|
|
695
695
|
ne(() => {
|
|
696
696
|
const y = new URLSearchParams(window.location.search), w = y.get("lang");
|
|
697
697
|
w && (r.includes(w) ? i(w) : (y.delete("lang"), l(y), i("")));
|
|
@@ -737,7 +737,7 @@ const Rs = () => {
|
|
|
737
737
|
/* @__PURE__ */ c(zn, { className: "h-4 w-4" }),
|
|
738
738
|
H(Dt, o, o),
|
|
739
739
|
/* @__PURE__ */ c(En, { className: "h-4 w-4" })
|
|
740
|
-
] }) : n ? /* @__PURE__ */ c(M, { onClick: () => D(s), variant: "link", size: "sm", children: u("Switch to default language") }) : /* @__PURE__ */ c(
|
|
740
|
+
] }) : n ? /* @__PURE__ */ c(M, { onClick: () => D(s), variant: "link", size: "sm", children: u("Switch to default language") }) : /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ m(Ln, { children: [
|
|
741
741
|
/* @__PURE__ */ c(Nn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
|
|
742
742
|
M,
|
|
743
743
|
{
|
|
@@ -774,7 +774,7 @@ const Rs = () => {
|
|
|
774
774
|
y.value
|
|
775
775
|
)
|
|
776
776
|
),
|
|
777
|
-
e && !Te(T.filter((y) => !y.isLangPageAdded)) && /* @__PURE__ */ m(
|
|
777
|
+
e && !Te(T.filter((y) => !y.isLangPageAdded)) && /* @__PURE__ */ m(ge, { children: [
|
|
778
778
|
/* @__PURE__ */ c(ua, {}),
|
|
779
779
|
/* @__PURE__ */ m(
|
|
780
780
|
M,
|
|
@@ -826,7 +826,7 @@ function Gi() {
|
|
|
826
826
|
/* @__PURE__ */ c(Ot, { className: "h-8 w-8 rounded-full" })
|
|
827
827
|
] }, t)) });
|
|
828
828
|
}
|
|
829
|
-
const Oi = Q.lazy(() => import("./page-revisions-content-
|
|
829
|
+
const Oi = Q.lazy(() => import("./page-revisions-content-V9S1rPUy.js"));
|
|
830
830
|
function Di() {
|
|
831
831
|
const [e, t] = Q.useState(!1);
|
|
832
832
|
return /* @__PURE__ */ c(vs, { children: /* @__PURE__ */ m(Jt, { delayDuration: 0, children: [
|
|
@@ -1065,7 +1065,7 @@ const cn = ({
|
|
|
1065
1065
|
k.error("Failed to change slug");
|
|
1066
1066
|
}
|
|
1067
1067
|
});
|
|
1068
|
-
}, Ui = V(() => import("./publish-pages-content-
|
|
1068
|
+
}, Ui = V(() => import("./publish-pages-content-GKnG7R5W.js"));
|
|
1069
1069
|
function Mi({
|
|
1070
1070
|
showModal: e = !1,
|
|
1071
1071
|
onClose: t = () => console.log("Cancelled")
|
|
@@ -1155,7 +1155,7 @@ function Un({
|
|
|
1155
1155
|
/* @__PURE__ */ c(Xt, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
|
|
1156
1156
|
] }) }) : e;
|
|
1157
1157
|
}
|
|
1158
|
-
const Hi = V(() => import("./unpublish-page-
|
|
1158
|
+
const Hi = V(() => import("./unpublish-page-CxAB3-Cj.js")), qi = V(() => import("./translation-warning-modal-DalBhNQy.js")), $i = () => {
|
|
1159
1159
|
const { t: e } = Pe(), { selectedLang: t, fallbackLang: n } = _e(), s = le("getPreviewUrl", async (g) => g), [r, a] = K(""), { data: i } = ce(), { data: o } = Me(), { data: l } = Ce(), d = q(
|
|
1160
1160
|
() => {
|
|
1161
1161
|
var g;
|
|
@@ -1176,10 +1176,10 @@ const Hi = V(() => import("./unpublish-page-DTVEQJoy.js")), qi = V(() => import(
|
|
|
1176
1176
|
} else
|
|
1177
1177
|
a("");
|
|
1178
1178
|
})();
|
|
1179
|
-
}, [s, d, i == null ? void 0 : i.pageType, u, i == null ? void 0 : i.id, f]), /* @__PURE__ */ c(
|
|
1179
|
+
}, [s, d, i == null ? void 0 : i.pageType, u, i == null ? void 0 : i.id, f]), /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ c(Un, { 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(Ua, { className: "h-4 w-4" }) }) }) }) });
|
|
1180
1180
|
}, Qi = () => {
|
|
1181
1181
|
const { t: e } = Pe(), [t, n] = Zr();
|
|
1182
|
-
return /* @__PURE__ */ m(
|
|
1182
|
+
return /* @__PURE__ */ m(ge, { children: [
|
|
1183
1183
|
/* @__PURE__ */ c(Un, { content: e("Theme"), delayDuration: 0, children: /* @__PURE__ */ c(
|
|
1184
1184
|
M,
|
|
1185
1185
|
{
|
|
@@ -1193,7 +1193,7 @@ const Hi = V(() => import("./unpublish-page-DTVEQJoy.js")), qi = V(() => import(
|
|
|
1193
1193
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1194
1194
|
] });
|
|
1195
1195
|
}, zi = () => {
|
|
1196
|
-
const { t: e } = Pe(), [t, n] = K(!1), { isLocked: s } =
|
|
1196
|
+
const { t: e } = Pe(), [t, n] = K(!1), { isLocked: s } = pe(), { savePageAsync: r, saveState: a } = ke();
|
|
1197
1197
|
ne(() => {
|
|
1198
1198
|
const u = (f) => {
|
|
1199
1199
|
a === "UNSAVED" && (f.preventDefault(), f.returnValue = !1);
|
|
@@ -1253,7 +1253,7 @@ const Hi = V(() => import("./unpublish-page-DTVEQJoy.js")), qi = V(() => import(
|
|
|
1253
1253
|
}, Ae = async () => {
|
|
1254
1254
|
g(!1), await u();
|
|
1255
1255
|
}, B = q(() => Kt(s ?? [], "id"), [s]);
|
|
1256
|
-
return /* @__PURE__ */ m(
|
|
1256
|
+
return /* @__PURE__ */ m(ge, { children: [
|
|
1257
1257
|
/* @__PURE__ */ m("div", { className: "flex", children: [
|
|
1258
1258
|
/* @__PURE__ */ m(
|
|
1259
1259
|
M,
|
|
@@ -1345,7 +1345,7 @@ const Hi = V(() => import("./unpublish-page-DTVEQJoy.js")), qi = V(() => import(
|
|
|
1345
1345
|
] });
|
|
1346
1346
|
};
|
|
1347
1347
|
function Wi() {
|
|
1348
|
-
const { isLocked: e } =
|
|
1348
|
+
const { isLocked: e } = pe(), [t] = we(), n = t.get("lang"), s = Bi(n);
|
|
1349
1349
|
return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
|
|
1350
1350
|
/* @__PURE__ */ c(Di, {}),
|
|
1351
1351
|
/* @__PURE__ */ c(cn, { permission: de.EDIT_THEME, children: /* @__PURE__ */ c(Qi, {}) }),
|
|
@@ -1424,7 +1424,7 @@ const Yi = ({
|
|
|
1424
1424
|
]
|
|
1425
1425
|
}
|
|
1426
1426
|
),
|
|
1427
|
-
u(de.MARK_AS_TEMPLATE) && p && !l && /* @__PURE__ */ c(
|
|
1427
|
+
u(de.MARK_AS_TEMPLATE) && p && !l && /* @__PURE__ */ c(ge, { children: h ? /* @__PURE__ */ m(
|
|
1428
1428
|
fe,
|
|
1429
1429
|
{
|
|
1430
1430
|
className: "flex cursor-pointer items-center gap-2",
|
|
@@ -1451,8 +1451,8 @@ const Yi = ({
|
|
|
1451
1451
|
) })
|
|
1452
1452
|
] })
|
|
1453
1453
|
] });
|
|
1454
|
-
}, Ji = V(() => import("./add-new-page-
|
|
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 } = _e(), { data: S } = Me(), D = S == null ? void 0 : S.find((b) => b.lang === p), { isLocked: y } =
|
|
1454
|
+
}, Ji = V(() => import("./add-new-page-D1pc9kLA.js")), Zi = V(() => import("./delete-page-CODOstkw.js")), Xi = V(() => import("./duplicate-page-DfH67AsW.js")), eo = V(() => import("./mark-as-template-Bx-MAB5M.js")), to = V(() => import("./unmark-as-template-dEb6wFT9.js")), no = V(() => import("./unpublish-page-CxAB3-Cj.js")), so = () => {
|
|
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 } = _e(), { data: S } = Me(), D = S == null ? void 0 : S.find((b) => b.lang === p), { isLocked: y } = pe(), w = !(g != null && g.slug), [, v] = ie(Dn);
|
|
1456
1456
|
if (!g) return null;
|
|
1457
1457
|
const U = (b) => {
|
|
1458
1458
|
p.length > 0 && p !== T ? v({
|
|
@@ -1461,7 +1461,7 @@ const Yi = ({
|
|
|
1461
1461
|
primaryPage: b == null ? void 0 : b.primaryPage
|
|
1462
1462
|
}) : f(b);
|
|
1463
1463
|
};
|
|
1464
|
-
return /* @__PURE__ */ m(
|
|
1464
|
+
return /* @__PURE__ */ m(ge, { children: [
|
|
1465
1465
|
/* @__PURE__ */ m("div", { className: "flex items-center justify-between rounded px-[2px] transition-colors duration-200", children: [
|
|
1466
1466
|
/* @__PURE__ */ c(Ms, { children: /* @__PURE__ */ c(
|
|
1467
1467
|
M,
|
|
@@ -1532,7 +1532,7 @@ const Yi = ({
|
|
|
1532
1532
|
), ro = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(Fs, { children: /* @__PURE__ */ m("div", { className: "flex min-w-[300px] max-w-[400px] flex-col items-center justify-center rounded-lg border bg-white p-4 shadow-lg", children: [
|
|
1533
1533
|
/* @__PURE__ */ c("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
|
|
1534
1534
|
/* @__PURE__ */ c("p", { className: "pt-2 text-center text-sm font-light text-gray-600", children: e ? "Please select a page from the list in the top header. This will enable you to edit the page." : "Please add a new page" })
|
|
1535
|
-
] }) }), ao = V(() => import("./dynamic-page-selector-
|
|
1535
|
+
] }) }), ao = V(() => import("./dynamic-page-selector-C2UK6qGj.js")), io = () => {
|
|
1536
1536
|
const { dynamicPage: e, allLangPages: t, isFetching: n } = ci(), s = t.length > 0;
|
|
1537
1537
|
return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
1538
1538
|
!e && /* @__PURE__ */ c(ro, { hasDynamicPage: s }),
|
|
@@ -1877,7 +1877,7 @@ const Yi = ({
|
|
|
1877
1877
|
[n, t]
|
|
1878
1878
|
)
|
|
1879
1879
|
};
|
|
1880
|
-
}, To = V(() => import("./ai-panel-content-
|
|
1880
|
+
}, To = V(() => import("./ai-panel-content-Dg6P7vk7.js").then((e) => e.b)), Vs = "chai-chat-panel", So = ({ className: e = "h-full w-full" }) => /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", version: "1.1", className: e, children: [
|
|
1881
1881
|
/* @__PURE__ */ c("title", { children: "ai" }),
|
|
1882
1882
|
/* @__PURE__ */ c("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ c("g", { id: "icon", fill: "currentColor", transform: "translate(64.000000, 64.000000)", children: /* @__PURE__ */ c(
|
|
1883
1883
|
"path",
|
|
@@ -1892,7 +1892,7 @@ const Yi = ({
|
|
|
1892
1892
|
button: _o,
|
|
1893
1893
|
panel: To,
|
|
1894
1894
|
position: "top"
|
|
1895
|
-
}, wo = V(() => import("./lang-panel-
|
|
1895
|
+
}, wo = V(() => import("./lang-panel-d7376A7w.js")), vo = ({ isActive: e, show: t }) => {
|
|
1896
1896
|
const { data: n } = Be();
|
|
1897
1897
|
return !Yt(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(ja, { className: "h-4 w-4" }) });
|
|
1898
1898
|
}, Hs = "lang", bo = {
|
|
@@ -1903,7 +1903,7 @@ const Yi = ({
|
|
|
1903
1903
|
button: vo,
|
|
1904
1904
|
view: "modal",
|
|
1905
1905
|
width: 400
|
|
1906
|
-
}, Io = V(() => import("./seo-panel-
|
|
1906
|
+
}, Io = V(() => import("./seo-panel-DuC3gQQy.js")), qs = "seo", Lo = ({ isActive: e, show: t }) => {
|
|
1907
1907
|
const { data: n } = ce(), s = Ri(n == null ? void 0 : n.pageType);
|
|
1908
1908
|
return !Yt(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
|
|
1909
1909
|
"svg",
|
|
@@ -1995,7 +1995,7 @@ var Qs = !1, Do = (e, t) => e === t, qt = Symbol("solid-proxy"), zs = typeof Pro
|
|
|
1995
1995
|
cleanups: null,
|
|
1996
1996
|
context: null,
|
|
1997
1997
|
owner: null
|
|
1998
|
-
}, dn = {}, N = null, fn = null, xo = null, x = null,
|
|
1998
|
+
}, dn = {}, N = null, fn = null, xo = null, x = null, ee = null, Se = null, tn = 0;
|
|
1999
1999
|
function xe(e, t) {
|
|
2000
2000
|
const n = x, s = N, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Ys : {
|
|
2001
2001
|
owned: null,
|
|
@@ -2005,7 +2005,7 @@ function xe(e, t) {
|
|
|
2005
2005
|
}, o = r ? e : () => e(() => Z(() => ft(i)));
|
|
2006
2006
|
N = i, x = null;
|
|
2007
2007
|
try {
|
|
2008
|
-
return
|
|
2008
|
+
return me(o, !0);
|
|
2009
2009
|
} finally {
|
|
2010
2010
|
x = n, N = s;
|
|
2011
2011
|
}
|
|
@@ -2055,7 +2055,7 @@ function Uo(e, t, n) {
|
|
|
2055
2055
|
})), o = dn, b(I, j)), I;
|
|
2056
2056
|
}
|
|
2057
2057
|
function b(P, I) {
|
|
2058
|
-
|
|
2058
|
+
me(() => {
|
|
2059
2059
|
I === void 0 && p(() => P), v(I !== void 0 ? "errored" : u ? "ready" : "unresolved"), S(I);
|
|
2060
2060
|
for (const j of g.keys()) j.decrement();
|
|
2061
2061
|
g.clear();
|
|
@@ -2090,7 +2090,7 @@ function Uo(e, t, n) {
|
|
|
2090
2090
|
return;
|
|
2091
2091
|
} else if (!ko($))
|
|
2092
2092
|
return U(i, $, void 0, I), $;
|
|
2093
|
-
return i = $, "v" in $ ? ($.s === 1 ? U(i, $.v, void 0, I) : U(i, void 0, Bt($.v), I), $) : (d = !0, queueMicrotask(() => d = !1),
|
|
2093
|
+
return i = $, "v" in $ ? ($.s === 1 ? U(i, $.v, void 0, I) : U(i, void 0, Bt($.v), I), $) : (d = !0, queueMicrotask(() => d = !1), me(() => {
|
|
2094
2094
|
v(u ? "refreshing" : "pending"), y();
|
|
2095
2095
|
}, !1), $.then((ue) => U($, ue, void 0, I), (ue) => U($, void 0, Bt(ue), I)));
|
|
2096
2096
|
}
|
|
@@ -2123,7 +2123,7 @@ function Uo(e, t, n) {
|
|
|
2123
2123
|
}];
|
|
2124
2124
|
}
|
|
2125
2125
|
function ru(e) {
|
|
2126
|
-
return
|
|
2126
|
+
return me(e, !1);
|
|
2127
2127
|
}
|
|
2128
2128
|
function Z(e) {
|
|
2129
2129
|
if (x === null) return e();
|
|
@@ -2163,7 +2163,7 @@ function Zs(e, t) {
|
|
|
2163
2163
|
const n = N, s = x;
|
|
2164
2164
|
N = e, x = null;
|
|
2165
2165
|
try {
|
|
2166
|
-
return
|
|
2166
|
+
return me(t, !0);
|
|
2167
2167
|
} catch (r) {
|
|
2168
2168
|
Mn(r);
|
|
2169
2169
|
} finally {
|
|
@@ -2175,7 +2175,7 @@ function Bo(e) {
|
|
|
2175
2175
|
return Promise.resolve().then(() => {
|
|
2176
2176
|
x = t, N = n;
|
|
2177
2177
|
let s;
|
|
2178
|
-
return
|
|
2178
|
+
return me(e, !1), x = N = null, s ? s.done : void 0;
|
|
2179
2179
|
});
|
|
2180
2180
|
}
|
|
2181
2181
|
var [Fo, iu] = /* @__PURE__ */ F(!1);
|
|
@@ -2206,8 +2206,8 @@ function er() {
|
|
|
2206
2206
|
if (this.sources && this.state)
|
|
2207
2207
|
if (this.state === ve) at(this);
|
|
2208
2208
|
else {
|
|
2209
|
-
const e =
|
|
2210
|
-
|
|
2209
|
+
const e = ee;
|
|
2210
|
+
ee = null, me(() => jt(this), !1), ee = e;
|
|
2211
2211
|
}
|
|
2212
2212
|
if (x) {
|
|
2213
2213
|
const e = this.observers ? this.observers.length : 0;
|
|
@@ -2217,13 +2217,13 @@ function er() {
|
|
|
2217
2217
|
}
|
|
2218
2218
|
function tr(e, t, n) {
|
|
2219
2219
|
let s = e.value;
|
|
2220
|
-
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length &&
|
|
2220
|
+
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && me(() => {
|
|
2221
2221
|
for (let r = 0; r < e.observers.length; r += 1) {
|
|
2222
2222
|
const a = e.observers[r], i = fn && fn.running;
|
|
2223
|
-
i && fn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ?
|
|
2223
|
+
i && fn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ee.push(a) : Se.push(a), a.observers && sr(a)), i || (a.state = ve);
|
|
2224
2224
|
}
|
|
2225
|
-
if (
|
|
2226
|
-
throw
|
|
2225
|
+
if (ee.length > 1e6)
|
|
2226
|
+
throw ee = [], new Error();
|
|
2227
2227
|
}, !1)), t;
|
|
2228
2228
|
}
|
|
2229
2229
|
function at(e) {
|
|
@@ -2272,25 +2272,25 @@ function zt(e) {
|
|
|
2272
2272
|
if (e = t[n], e.state === ve)
|
|
2273
2273
|
at(e);
|
|
2274
2274
|
else if (e.state === Qt) {
|
|
2275
|
-
const s =
|
|
2276
|
-
|
|
2275
|
+
const s = ee;
|
|
2276
|
+
ee = null, me(() => jt(e, t[0]), !1), ee = s;
|
|
2277
2277
|
}
|
|
2278
2278
|
}
|
|
2279
|
-
function
|
|
2280
|
-
if (
|
|
2279
|
+
function me(e, t) {
|
|
2280
|
+
if (ee) return e();
|
|
2281
2281
|
let n = !1;
|
|
2282
|
-
t || (
|
|
2282
|
+
t || (ee = []), Se ? n = !0 : Se = [], tn++;
|
|
2283
2283
|
try {
|
|
2284
2284
|
const s = e();
|
|
2285
2285
|
return Ho(n), s;
|
|
2286
2286
|
} catch (s) {
|
|
2287
|
-
n || (Se = null),
|
|
2287
|
+
n || (Se = null), ee = null, Mn(s);
|
|
2288
2288
|
}
|
|
2289
2289
|
}
|
|
2290
2290
|
function Ho(e) {
|
|
2291
|
-
if (
|
|
2291
|
+
if (ee && (nr(ee), ee = null), e) return;
|
|
2292
2292
|
const t = Se;
|
|
2293
|
-
Se = null, t.length &&
|
|
2293
|
+
Se = null, t.length && me(() => Ws(t), !1);
|
|
2294
2294
|
}
|
|
2295
2295
|
function nr(e) {
|
|
2296
2296
|
for (let t = 0; t < e.length; t++) zt(e[t]);
|
|
@@ -2323,7 +2323,7 @@ function jt(e, t) {
|
|
|
2323
2323
|
function sr(e) {
|
|
2324
2324
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
2325
2325
|
const n = e.observers[t];
|
|
2326
|
-
n.state || (n.state = Qt, n.pure ?
|
|
2326
|
+
n.state || (n.state = Qt, n.pure ? ee.push(n) : Se.push(n), n.observers && sr(n));
|
|
2327
2327
|
}
|
|
2328
2328
|
}
|
|
2329
2329
|
function ft(e) {
|
|
@@ -3246,7 +3246,7 @@ var bl = class {
|
|
|
3246
3246
|
const s = n;
|
|
3247
3247
|
return t.push(s), t;
|
|
3248
3248
|
};
|
|
3249
|
-
function
|
|
3249
|
+
function he(e, t, n, s) {
|
|
3250
3250
|
return {
|
|
3251
3251
|
isApplicable: e,
|
|
3252
3252
|
annotation: t,
|
|
@@ -3255,11 +3255,11 @@ function ge(e, t, n, s) {
|
|
|
3255
3255
|
};
|
|
3256
3256
|
}
|
|
3257
3257
|
var mr = [
|
|
3258
|
-
|
|
3258
|
+
he(fr, "undefined", () => null, () => {
|
|
3259
3259
|
}),
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3260
|
+
he(kl, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
3261
|
+
he(Dl, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
3262
|
+
he(xl, "Error", (e, t) => {
|
|
3263
3263
|
const n = {
|
|
3264
3264
|
name: e.name,
|
|
3265
3265
|
message: e.message
|
|
@@ -3273,11 +3273,11 @@ var mr = [
|
|
|
3273
3273
|
n[s] = e[s];
|
|
3274
3274
|
}), n;
|
|
3275
3275
|
}),
|
|
3276
|
-
|
|
3276
|
+
he(Ol, "regexp", (e) => "" + e, (e) => {
|
|
3277
3277
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
3278
3278
|
return new RegExp(t, n);
|
|
3279
3279
|
}),
|
|
3280
|
-
|
|
3280
|
+
he(
|
|
3281
3281
|
Et,
|
|
3282
3282
|
"set",
|
|
3283
3283
|
// (sets only exist in es6+)
|
|
@@ -3285,10 +3285,10 @@ var mr = [
|
|
|
3285
3285
|
(e) => [...e.values()],
|
|
3286
3286
|
(e) => new Set(e)
|
|
3287
3287
|
),
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3288
|
+
he(mt, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
3289
|
+
he((e) => os(e) || Ul(e), "number", (e) => os(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
3290
|
+
he((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
3291
|
+
he(Bl, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
3292
3292
|
];
|
|
3293
3293
|
function sn(e, t, n, s) {
|
|
3294
3294
|
return {
|
|
@@ -3804,7 +3804,7 @@ var Iu = (e, t = !1) => {
|
|
|
3804
3804
|
const t = lr(() => {
|
|
3805
3805
|
const n = this, [s] = A(this, $e), [r] = A(this, Qe), [a] = A(this, ze), [i] = A(this, je), [o] = A(this, St), [l] = A(this, He);
|
|
3806
3806
|
let d;
|
|
3807
|
-
return A(this, We) ? d = A(this, We) : (d = ir(() => import("./NCMVHL6D-
|
|
3807
|
+
return A(this, We) ? d = A(this, We) : (d = ir(() => import("./NCMVHL6D-DbC9VYfW.js")), G(this, We, d)), Ir(A(this, Tt), A(this, qe)), rr(d, ar({
|
|
3808
3808
|
get queryFlavor() {
|
|
3809
3809
|
return A(n, yt);
|
|
3810
3810
|
},
|
|
@@ -3903,7 +3903,7 @@ var Iu = (e, t = !1) => {
|
|
|
3903
3903
|
const t = lr(() => {
|
|
3904
3904
|
const n = this, [s] = A(this, Ze), [r] = A(this, Xe), [a] = A(this, et), [i] = A(this, tt), [o] = A(this, It), [l] = A(this, Ye), [d] = A(this, nt);
|
|
3905
3905
|
let u;
|
|
3906
|
-
return A(this, st) ? u = A(this, st) : (u = ir(() => import("./2AITGKQY-
|
|
3906
|
+
return A(this, st) ? u = A(this, st) : (u = ir(() => import("./2AITGKQY-BuWtti7-.js")), G(this, st, u)), Ir(A(this, bt), A(this, Je)), rr(u, ar({
|
|
3907
3907
|
get queryFlavor() {
|
|
3908
3908
|
return A(n, wt);
|
|
3909
3909
|
},
|
|
@@ -4026,7 +4026,7 @@ var us = process.env.NODE_ENV !== "development" ? function() {
|
|
|
4026
4026
|
return null;
|
|
4027
4027
|
} : sc;
|
|
4028
4028
|
process.env.NODE_ENV;
|
|
4029
|
-
const ac =
|
|
4029
|
+
const ac = Ee(""), ic = () => {
|
|
4030
4030
|
rn("dynamic-page-selector", {
|
|
4031
4031
|
description: "Dynamic page selector"
|
|
4032
4032
|
}), rn("enable-add-page-dropdown", {
|
|
@@ -4089,7 +4089,7 @@ const ac = pe(""), ic = () => {
|
|
|
4089
4089
|
},
|
|
4090
4090
|
[e]
|
|
4091
4091
|
);
|
|
4092
|
-
}, dc = V(() => import("./page-lock-
|
|
4092
|
+
}, dc = V(() => import("./page-lock-pwxPivz-.js")), fc = V(() => import("./no-language-page-dialog-CCLWQP1E.js")), hc = V(() => import("./digital-asset-manager-BuYVjKfQ.js")), gc = V(() => import("./save-to-lib-BO3WEr-u.js")), mc = V(() => import("./theme-panel-footer-CSC6DpWO.js")), Ec = V(() => import("./web-preview-yBF4EXzm.js"));
|
|
4093
4093
|
ic();
|
|
4094
4094
|
ri();
|
|
4095
4095
|
sa(lo);
|
|
@@ -4100,7 +4100,7 @@ const pc = {
|
|
|
4100
4100
|
role: "",
|
|
4101
4101
|
permissions: null
|
|
4102
4102
|
}, ds = (e) => {
|
|
4103
|
-
const { data: t } = Eo(), n = kn(), { data: s = pc, isFetching: r } = po(), { data: a, isFetching: i } = Ce(), { data: o, isFetching: l } = oc(), { data: d, isFetching: u } = Be(), f = r || i || l || u, [g] = we(), h = g.get("page"), { data: p } = ce(), { data: T, isFetching: S } = ho(), { blocks: D } = fo(T), { data: y, isFetching: w } = go(), { pageStatus: v } =
|
|
4103
|
+
const { data: t } = Eo(), n = kn(), { data: s = pc, isFetching: r } = po(), { data: a, isFetching: i } = Ce(), { data: o, isFetching: l } = oc(), { data: d, isFetching: u } = Be(), f = r || i || l || u, [g] = we(), h = g.get("page"), { data: p } = ce(), { data: T, isFetching: S } = ho(), { blocks: D } = fo(T), { data: y, isFetching: w } = go(), { pageStatus: v } = pe(), U = co(), { onSave: b } = yo(), { mutateAsync: ye } = lc(), { getPartialBlocks: Ae, getPartialBlockBlocks: B } = Ao(), { mutateAsync: P } = ki(), { mutateAsync: I } = mo(), j = uc(), [$, ue] = K(!1), it = Ie([]), be = q(() => H(d, "theme", {}) || {}, [d]), ot = v === te.EDITING, Ge = v === te.CHECKING, Bn = S || Ge || w;
|
|
4104
4104
|
it.current = D;
|
|
4105
4105
|
const [Lr] = ie(ac);
|
|
4106
4106
|
ne(() => {
|
|
@@ -4116,7 +4116,7 @@ const pc = {
|
|
|
4116
4116
|
async (re, Ct) => await P({ pageType: re, query: Ct }),
|
|
4117
4117
|
[P]
|
|
4118
4118
|
);
|
|
4119
|
-
return /* @__PURE__ */ m(
|
|
4119
|
+
return /* @__PURE__ */ m(ge, { children: [
|
|
4120
4120
|
Bn && /* @__PURE__ */ c(Fs, { 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"}` }) }),
|
|
4121
4121
|
Lr && /* @__PURE__ */ c(
|
|
4122
4122
|
X,
|
|
@@ -4194,7 +4194,7 @@ const pc = {
|
|
|
4194
4194
|
s(!0);
|
|
4195
4195
|
}, 200), () => {
|
|
4196
4196
|
s(!1), t({});
|
|
4197
|
-
}), [e, t]), n ? H(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(
|
|
4197
|
+
}), [e, t]), n ? H(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(ge, { children: [
|
|
4198
4198
|
/* @__PURE__ */ c(ds, { ...e }),
|
|
4199
4199
|
/* @__PURE__ */ c(us, {})
|
|
4200
4200
|
] }) : /* @__PURE__ */ m(Yr, { client: yc, children: [
|
|
@@ -4242,7 +4242,7 @@ function Tc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4242
4242
|
] });
|
|
4243
4243
|
}
|
|
4244
4244
|
const Du = () => {
|
|
4245
|
-
const { savePageAsync: e } = ke(), t = J(), { isLocked: n } =
|
|
4245
|
+
const { savePageAsync: e } = ke(), t = J(), { isLocked: n } = pe();
|
|
4246
4246
|
return z(async () => {
|
|
4247
4247
|
n || await e(), t.invalidateQueries({ queryKey: [E.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [E.GET_BUILDER_PAGE_DATA] });
|
|
4248
4248
|
}, [e, t, n]);
|
|
@@ -4276,7 +4276,7 @@ const Du = () => {
|
|
|
4276
4276
|
console.error("Failed to update metadata");
|
|
4277
4277
|
}
|
|
4278
4278
|
});
|
|
4279
|
-
}, Sc = V(() => import("./digital-asset-manager-
|
|
4279
|
+
}, Sc = V(() => import("./digital-asset-manager-BuYVjKfQ.js")), ku = ({
|
|
4280
4280
|
assetId: e,
|
|
4281
4281
|
assetUrl: t,
|
|
4282
4282
|
onChange: n,
|
|
@@ -4503,7 +4503,7 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4503
4503
|
n = n.replace(r[0], i);
|
|
4504
4504
|
}
|
|
4505
4505
|
return n;
|
|
4506
|
-
}, Lc = V(() => import("./shared-json-ld-
|
|
4506
|
+
}, Lc = V(() => import("./shared-json-ld-DMpCm3M4.js")), Uu = ({
|
|
4507
4507
|
value: e,
|
|
4508
4508
|
onChange: t,
|
|
4509
4509
|
disabled: n = !1,
|
|
@@ -4713,7 +4713,7 @@ export {
|
|
|
4713
4713
|
Tn as M,
|
|
4714
4714
|
uu as N,
|
|
4715
4715
|
au as O,
|
|
4716
|
-
|
|
4716
|
+
te as P,
|
|
4717
4717
|
Eu as Q,
|
|
4718
4718
|
Au as R,
|
|
4719
4719
|
hu as S,
|
|
@@ -4725,7 +4725,7 @@ export {
|
|
|
4725
4725
|
ml as Y,
|
|
4726
4726
|
Sn as Z,
|
|
4727
4727
|
ul as _,
|
|
4728
|
-
|
|
4728
|
+
pe as a,
|
|
4729
4729
|
xn as a$,
|
|
4730
4730
|
vu as a0,
|
|
4731
4731
|
gl as a1,
|