@chaibuilder/pages 0.15.5 → 0.15.6
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-D4uLyw6-.cjs → 2AITGKQY-BnzAO102.cjs} +1 -1
- package/dist/{2AITGKQY-DYwNjBFe.js → 2AITGKQY-tXLat8E2.js} +2 -2
- package/dist/{NCMVHL6D-DVB60g_2.js → NCMVHL6D-BwDANa-N.js} +2 -2
- package/dist/{NCMVHL6D-C-L7-X3f.cjs → NCMVHL6D-DooF4Fqf.cjs} +1 -1
- package/dist/{ZDWCUMSJ-Dp6ML_tn.js → ZDWCUMSJ-DWeYRRkj.js} +1 -1
- package/dist/{ZDWCUMSJ-BORULBXb.cjs → ZDWCUMSJ-DiH9kc7o.cjs} +1 -1
- package/dist/add-new-language-page-BCUrfgTy.cjs +1 -0
- package/dist/add-new-language-page-DZhjVBBf.js +401 -0
- package/dist/add-new-page-DWHANcUx.cjs +1 -0
- package/dist/add-new-page-DYuuentN.js +31 -0
- package/dist/delete-page-1dSWwUBg.js +40 -0
- package/dist/delete-page-m-Cuz7rG.cjs +1 -0
- package/dist/digital-asset-manager-BWZlrwFf.js +913 -0
- package/dist/digital-asset-manager-By_JTIbb.cjs +1 -0
- package/dist/duplicate-page-Dzs8ya8l.cjs +1 -0
- package/dist/duplicate-page-fUuBTAs7.js +133 -0
- package/dist/{dynamic-page-selector-Cz6zWaKo.cjs → dynamic-page-selector-CwhL4z6F.cjs} +1 -1
- package/dist/{dynamic-page-selector-8g1-84iW.js → dynamic-page-selector-X2qgdiNQ.js} +1 -1
- package/dist/image-editor-CeSSNbFY.js +108 -0
- package/dist/image-editor-CnDnY97s.cjs +1 -0
- package/dist/index-0cMGDekp.cjs +5 -0
- package/dist/{index-zaGKeGBW.js → index-Bk8tPO5R.js} +1168 -1219
- package/dist/index.cjs +1 -1
- package/dist/index.js +10 -10
- package/dist/{json-diff-viewer-c3ft4c4A.cjs → json-diff-viewer-Cfa9BjZ6.cjs} +1 -1
- package/dist/{json-diff-viewer-BF0qFBif.js → json-diff-viewer-Cm84g19X.js} +1 -1
- package/dist/lang-panel-CaSKOJ8G.js +225 -0
- package/dist/lang-panel-CkSfJqr8.cjs +1 -0
- package/dist/mark-as-template-Ci82hbOm.cjs +1 -0
- package/dist/mark-as-template-CwsW86Zv.js +153 -0
- package/dist/no-language-page-content-CPt4aPy9.cjs +1 -0
- package/dist/no-language-page-content-DDz81nqg.js +42 -0
- package/dist/{page-creator-CsZpQ7Gy.cjs → page-creator-Cd2LrG4u.cjs} +1 -1
- package/dist/{page-creator-Crc5BzeB.js → page-creator-Dr566_Yf.js} +2 -2
- package/dist/page-lock-request-Bw_Wye1t.cjs +1 -0
- package/dist/page-lock-request-ECxkQMdS.js +75 -0
- package/dist/page-locked-by-dialog-AbutJT_V.cjs +1 -0
- package/dist/page-locked-by-dialog-CnkVUpjt.js +68 -0
- package/dist/page-manager-new-DLMvOata.cjs +1 -0
- package/dist/page-manager-new-DkqNLZ5C.js +354 -0
- package/dist/page-manager-search-and-filter-B98nz9xS.js +201 -0
- package/dist/page-manager-search-and-filter-CfEfWFeo.cjs +1 -0
- package/dist/{page-revisions-content-PRgwV04S.js → page-revisions-content-CBQPYFZI.js} +18 -18
- package/dist/{page-revisions-content-dSFvGFEO.cjs → page-revisions-content-D12GEp8C.cjs} +1 -1
- package/dist/{publish-pages-content-C24iBibw.js → publish-pages-content-BF5yMo_L.js} +6 -6
- package/dist/{publish-pages-content-akIgltlm.cjs → publish-pages-content-LNCr9tKv.cjs} +1 -1
- package/dist/{save-to-lib-C3H1ZPb-.cjs → save-to-lib-C1B6tWEF.cjs} +1 -1
- package/dist/{save-to-lib-DSPvtFSd.js → save-to-lib-SpilaoOL.js} +1 -1
- package/dist/{seo-panel-Ce6aTIyt.cjs → seo-panel-DkgkJUT6.cjs} +1 -1
- package/dist/{seo-panel-rZ8s88c0.js → seo-panel-sbYoo746.js} +17 -17
- package/dist/{shared-json-ld-hCiviuBf.cjs → shared-json-ld-CEUgLAev.cjs} +1 -1
- package/dist/{shared-json-ld-DMYOwp6B.js → shared-json-ld-D_YyVPk3.js} +27 -27
- package/dist/{slug-input-BN8eQgxP.cjs → slug-input-Cqj9EBju.cjs} +1 -1
- package/dist/{slug-input-Dhzaobv6.js → slug-input-Df-BG6xl.js} +1 -1
- package/dist/theme-panel-footer-B6leVWSV.js +25 -0
- package/dist/theme-panel-footer-Ca1UF5DA.cjs +1 -0
- package/dist/unmark-as-template-BOE-nKOb.cjs +1 -0
- package/dist/unmark-as-template-Cho9B4RN.js +39 -0
- package/dist/unpublish-page-BcxxZ8pr.cjs +1 -0
- package/dist/unpublish-page-Dr4qbwUx.js +27 -0
- package/dist/{web-preview-BEyjKFDL.js → web-preview-Cq82TNaS.js} +1 -1
- package/dist/{web-preview-TTKtpSUi.cjs → web-preview-ued-fdxs.cjs} +1 -1
- package/package.json +3 -3
- package/dist/add-new-language-page-D4VPifNs.cjs +0 -1
- package/dist/add-new-language-page-DENCjC_f.js +0 -390
- package/dist/add-new-page-BuK6We-q.cjs +0 -1
- package/dist/add-new-page-CD-9ppdS.js +0 -30
- package/dist/delete-page-B-TP6nJ7.cjs +0 -1
- package/dist/delete-page-CatRlDfx.js +0 -38
- package/dist/digital-asset-manager-DL2nAqUC.cjs +0 -1
- package/dist/digital-asset-manager-KakxBkBC.js +0 -917
- package/dist/duplicate-page-D4Oiy71Q.cjs +0 -1
- package/dist/duplicate-page-DEmh0df0.js +0 -120
- package/dist/image-editor-D9MPdtxC.js +0 -107
- package/dist/image-editor-Da6lrqkL.cjs +0 -1
- package/dist/index-Blg1T7nL.cjs +0 -5
- package/dist/lang-panel-D1FKTNui.js +0 -218
- package/dist/lang-panel-ExS97Zgk.cjs +0 -1
- package/dist/mark-as-template-CcnkROAU.cjs +0 -1
- package/dist/mark-as-template-v-I05xcZ.js +0 -146
- package/dist/no-language-page-content-Bm5CcsUo.js +0 -35
- package/dist/no-language-page-content-Ddz2hnYs.cjs +0 -1
- package/dist/page-lock-request-Dx6OrOwM.cjs +0 -1
- package/dist/page-lock-request-WKfG7Sd3.js +0 -64
- package/dist/page-locked-by-dialog-BvdAXZPw.cjs +0 -1
- package/dist/page-locked-by-dialog-jy3lYV3l.js +0 -63
- package/dist/page-manager-new-CNHlSwfe.js +0 -354
- package/dist/page-manager-new-CUlpwqpH.cjs +0 -1
- package/dist/page-manager-search-and-filter-CuAn82Db.js +0 -197
- package/dist/page-manager-search-and-filter-eFsGtm5W.cjs +0 -1
- package/dist/theme-panel-footer-0GrdOHO_.cjs +0 -1
- package/dist/theme-panel-footer-BzEy5bsg.js +0 -25
- package/dist/unmark-as-template-DXEs6foh.cjs +0 -1
- package/dist/unmark-as-template-Dsiyocm9.js +0 -38
- package/dist/unpublish-page-c1mqQEa_.cjs +0 -1
- package/dist/unpublish-page-yGyz2jiw.js +0 -26
|
@@ -3,21 +3,21 @@ var Un = (e) => {
|
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
5
|
var Sr = (e, t, n) => t in e ? Tr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
import { jsx as c, jsxs as
|
|
9
|
-
import { get as
|
|
10
|
-
import * as
|
|
11
|
-
import Ur, { useMemo as j, useCallback as Q, useState as q, useEffect as
|
|
12
|
-
import { atom as
|
|
13
|
-
import { useQuery as
|
|
14
|
-
import { useLanguages as
|
|
6
|
+
var Pe = (e, t, n) => Sr(e, typeof t != "symbol" ? t + "" : t, n), Bn = (e, t, n) => t.has(e) || Un("Cannot " + n);
|
|
7
|
+
var S = (e, t, n) => (Bn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), D = (e, t, n) => t.has(e) ? Un("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), L = (e, t, n, s) => (Bn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
8
|
+
import { jsx as c, jsxs as m, Fragment as ge } from "react/jsx-runtime";
|
|
9
|
+
import { get as V, reverse as _r, sortBy as Pr, each as wr, find as se, isEmpty as he, groupBy as vr, minBy as br, noop as ds, keyBy as Ir, map as Bt, compact as fs, upperCase as Mn, filter as hs, includes as Cr, has as jt, pick as Pn, keys as Nr, pickBy as Lr, endsWith as kr, isArray as Or, startCase as Dr, isFunction as Gr, cloneDeep as xr, isEqual as Rr } from "lodash-es";
|
|
10
|
+
import * as z from "react";
|
|
11
|
+
import Ur, { useMemo as j, useCallback as Q, useState as q, useEffect as ne, useRef as it, lazy as K, Suspense as H, createContext as Br, Component as Mr, createElement as Fn } from "react";
|
|
12
|
+
import { atom as Ee, useAtom as te } from "jotai";
|
|
13
|
+
import { useQuery as ae, useQueryClient as W, useMutation as X, onlineManager as gs, QueryClient as Fr, QueryClientProvider as qr } from "@tanstack/react-query";
|
|
14
|
+
import { useLanguages as Te, useSavePage as Ge, useTranslation as ve, mergeClasses as Mt, usePermissions as ms, PERMISSIONS as Kr, useRightPanel as Vr, useChaiFeatureFlag as Hr, useIsPageLoaded as Qr, registerChaiLibrary as $r, getBlocksFromHTML as jr, registerChaiSidebarPanel as en, registerChaiFeatureFlag as qn, registerChaiTopBar as zr, registerChaiMediaManager as Wr, registerChaiSaveToLibrary as Yr, ChaiBuilderEditor as Jr } from "@chaibuilder/sdk";
|
|
15
15
|
import { toast as R } from "sonner";
|
|
16
|
-
import { Tooltip as
|
|
17
|
-
import { LogsIcon as wa, Folder as va, Languages as
|
|
18
|
-
import { useRegisteredChaiBlocks as ja, getDefaultBlockProps as
|
|
19
|
-
import { loadWebBlocks as
|
|
20
|
-
const
|
|
16
|
+
import { Tooltip as zt, TooltipTrigger as Wt, Button as M, TooltipContent as Yt, Sheet as Es, SheetContent as ps, SheetHeader as Xr, SheetTitle as Zr, SheetDescription as ea, DropdownMenu as wn, DropdownMenuTrigger as vn, DropdownMenuContent as bn, DropdownMenuItem as de, Separator as ta, TooltipProvider as ys, SheetTrigger as na, Skeleton as Nt, Dialog as As, HoverCard as sa, HoverCardTrigger as ra, HoverCardContent as aa, AlertDialog as ia, AlertDialogTrigger as oa, AlertDialogContent as la, AlertDialogHeader as ca, AlertDialogTitle as ua, AlertDialogDescription as da, AlertDialogFooter as fa, AlertDialogCancel as ha, AlertDialogAction as ga, Popover as ma, PopoverTrigger as Ea, DialogContent as pa, DialogHeader as ya, DialogTitle as Aa, Tabs as Ta, TabsList as Sa, TabsTrigger as tn, TabsContent as nn, Textarea as Kn, Alert as _a, AlertDescription as Pa } from "@chaibuilder/sdk/ui";
|
|
17
|
+
import { LogsIcon as wa, Folder as va, Languages as Vn, ChevronDown as fn, Star as ba, Plus as Ts, History as Ia, Play as Ca, Palette as Na, CheckCircle as La, Loader as Ft, Save as ka, Send as Hn, Rocket as Qn, CopyPlusIcon as Oa, Pencil as Da, Power as Ga, Trash as xa, SquareLibrary as $n, Hash as Ra, File as Ua, MoreHorizontal as jn, ExternalLink as Ba, LanguagesIcon as Ma, User as Fa, X as zn, Trash2 as qa, ImageIcon as Wn, Code as Ka, Eye as Va, Share2 as Ha, FileCode2 as Qa, AlertTriangle as $a } from "lucide-react";
|
|
18
|
+
import { useRegisteredChaiBlocks as ja, getDefaultBlockProps as za } from "@chaibuilder/runtime";
|
|
19
|
+
import { loadWebBlocks as Wa } from "@chaibuilder/sdk/web-blocks";
|
|
20
|
+
const E = {
|
|
21
21
|
GET_GLOBAL_JSONLD_ITEMS: "GET_GLOBAL_JSONLD_ITEMS",
|
|
22
22
|
GENERATE_SEO_FIELD: "GENERATE_SEO_FIELD",
|
|
23
23
|
UPDATE_PAGE_METADATA: "UPDATE_PAGE_METADATA",
|
|
@@ -81,10 +81,10 @@ const m = {
|
|
|
81
81
|
UPDATE_ASSET: "UPDATE_ASSET",
|
|
82
82
|
GET_ASSETS: "GET_ASSETS",
|
|
83
83
|
GET_ASSET: "GET_ASSET"
|
|
84
|
-
}, Ya =
|
|
84
|
+
}, Ya = Ee({}), In = () => te(Ya), re = (e, t) => {
|
|
85
85
|
const [n] = In();
|
|
86
|
-
return j(() =>
|
|
87
|
-
},
|
|
86
|
+
return j(() => V(n, e, t), [n, e, t]);
|
|
87
|
+
}, k = () => re("apiUrl", "/chai/api"), Ss = () => re("usersApiUrl", "/chai/users"), bc = () => re("assetsApiUrl", "/chai/assets"), Ja = () => re("websocket", null), _s = async (e, t, n = {}) => await fetch(e, {
|
|
88
88
|
method: "POST",
|
|
89
89
|
headers: {
|
|
90
90
|
"Content-Type": "application/json",
|
|
@@ -101,15 +101,15 @@ if (import.meta.vitest) {
|
|
|
101
101
|
t(n).toBeDefined();
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
const
|
|
105
|
-
const e =
|
|
104
|
+
const C = () => {
|
|
105
|
+
const e = re("onLogout"), t = re("getAccessToken");
|
|
106
106
|
return Q(
|
|
107
107
|
async (n, s, r = {}) => {
|
|
108
108
|
const a = await t();
|
|
109
109
|
if (!a)
|
|
110
110
|
return console.error("No auth token found"), null;
|
|
111
111
|
try {
|
|
112
|
-
const i =
|
|
112
|
+
const i = V(s, "action", "").toLowerCase(), o = await _s(n + (i ? `?action=${i}` : ""), s, {
|
|
113
113
|
...r,
|
|
114
114
|
Authorization: `Bearer ${a}`
|
|
115
115
|
});
|
|
@@ -132,11 +132,11 @@ const I = () => {
|
|
|
132
132
|
[e, t]
|
|
133
133
|
);
|
|
134
134
|
};
|
|
135
|
-
function
|
|
135
|
+
function oe() {
|
|
136
136
|
const [e, t] = q(
|
|
137
137
|
new URLSearchParams(window.location.search)
|
|
138
138
|
);
|
|
139
|
-
return
|
|
139
|
+
return ne(() => {
|
|
140
140
|
const n = () => {
|
|
141
141
|
t(new URLSearchParams(window.location.search));
|
|
142
142
|
};
|
|
@@ -146,16 +146,16 @@ function le() {
|
|
|
146
146
|
}, []), [e, t];
|
|
147
147
|
}
|
|
148
148
|
const xe = (e) => {
|
|
149
|
-
const t =
|
|
150
|
-
return
|
|
151
|
-
queryKey: [
|
|
149
|
+
const t = k(), [n] = oe(), s = e ?? n.get("page"), r = C();
|
|
150
|
+
return ae({
|
|
151
|
+
queryKey: [E.GET_LANGUAGE_PAGES, s],
|
|
152
152
|
staleTime: 1 / 0,
|
|
153
153
|
gcTime: 0,
|
|
154
154
|
placeholderData: [],
|
|
155
155
|
queryFn: async () => {
|
|
156
156
|
if (!s) return null;
|
|
157
157
|
const a = await r(t, {
|
|
158
|
-
action:
|
|
158
|
+
action: E.GET_LANGUAGE_PAGES,
|
|
159
159
|
data: { id: s }
|
|
160
160
|
});
|
|
161
161
|
return _r(Pr(a, "primaryPage"));
|
|
@@ -163,9 +163,9 @@ const xe = (e) => {
|
|
|
163
163
|
enabled: !!s
|
|
164
164
|
});
|
|
165
165
|
}, Re = () => {
|
|
166
|
-
const e =
|
|
167
|
-
return
|
|
168
|
-
queryKey: [
|
|
166
|
+
const e = k(), t = C();
|
|
167
|
+
return ae({
|
|
168
|
+
queryKey: [E.GET_WEBSITE_DRAFT_SETTINGS],
|
|
169
169
|
staleTime: 5 * 60 * 1e3,
|
|
170
170
|
placeholderData: {
|
|
171
171
|
languages: [],
|
|
@@ -174,31 +174,31 @@ const xe = (e) => {
|
|
|
174
174
|
fallbackLang: ""
|
|
175
175
|
},
|
|
176
176
|
queryFn: async () => t(e, {
|
|
177
|
-
action:
|
|
177
|
+
action: E.GET_WEBSITE_DRAFT_SETTINGS,
|
|
178
178
|
data: { draft: !0 }
|
|
179
179
|
})
|
|
180
180
|
});
|
|
181
181
|
}, Ps = (e) => {
|
|
182
|
-
const { fallbackLang: t } =
|
|
182
|
+
const { fallbackLang: t } = Te(), { data: n } = Re(), { data: s, isFetching: r } = xe(), a = j(() => {
|
|
183
183
|
const i = { [t]: !0 };
|
|
184
|
-
return wr(
|
|
185
|
-
const l =
|
|
184
|
+
return wr(V(n, "languages"), (o) => {
|
|
185
|
+
const l = se(s, { lang: o });
|
|
186
186
|
i[o] = !!l;
|
|
187
187
|
}), i;
|
|
188
188
|
}, [t, s, n]);
|
|
189
|
-
return r ||
|
|
189
|
+
return r || he(e) || e && a[e];
|
|
190
190
|
};
|
|
191
191
|
class Xa {
|
|
192
192
|
constructor(t, n, s, r) {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
var a, i, o, l,
|
|
201
|
-
this.userId = s, this.websocket = t, this.clientId = this.getClientId(), this.channelId = `WEBSITE:${n}`, this.callback = r, this.channel = this.websocket.channel(this.channelId, { config: { presence: { key: this.clientId } } }), (
|
|
193
|
+
Pe(this, "channelId");
|
|
194
|
+
Pe(this, "websocket");
|
|
195
|
+
Pe(this, "channel", null);
|
|
196
|
+
Pe(this, "userId", null);
|
|
197
|
+
Pe(this, "clientId", null);
|
|
198
|
+
Pe(this, "pageId", null);
|
|
199
|
+
Pe(this, "callback");
|
|
200
|
+
var a, i, o, l, f, d;
|
|
201
|
+
this.userId = s, this.websocket = t, this.clientId = this.getClientId(), this.channelId = `WEBSITE:${n}`, this.callback = r, this.channel = this.websocket.channel(this.channelId, { config: { presence: { key: this.clientId } } }), (d = (f = (l = (o = (i = (a = this.channel) == null ? void 0 : a.on("presence", { event: "sync" }, (u) => {
|
|
202
202
|
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", u);
|
|
203
203
|
})) == null ? void 0 : i.on("presence", { event: "leave" }, (u) => {
|
|
204
204
|
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", u);
|
|
@@ -208,11 +208,11 @@ class Xa {
|
|
|
208
208
|
"broadcast",
|
|
209
209
|
{ event: "TAKE_OVER_REQUESTED" },
|
|
210
210
|
({ payload: u }) => this.onReceiveEvent("TAKE_OVER_REQUESTED", u)
|
|
211
|
-
)) == null ? void 0 :
|
|
211
|
+
)) == null ? void 0 : f.on(
|
|
212
212
|
"broadcast",
|
|
213
213
|
{ event: "TAKE_OVER_REQUEST_ACCEPTED" },
|
|
214
214
|
({ payload: u }) => this.onReceiveEvent("TAKE_OVER_REQUEST_ACCEPTED", u)
|
|
215
|
-
)) == null ||
|
|
215
|
+
)) == null || d.on(
|
|
216
216
|
"broadcast",
|
|
217
217
|
{ event: "TAKE_OVER_REQUEST_REJECTED" },
|
|
218
218
|
({ payload: u }) => this.onReceiveEvent("TAKE_OVER_REQUEST_REJECTED", u)
|
|
@@ -295,88 +295,88 @@ class Xa {
|
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
const Za =
|
|
298
|
+
const Za = Ee(
|
|
299
299
|
null
|
|
300
|
-
), ws = () =>
|
|
300
|
+
), ws = () => te(Za), Cn = () => {
|
|
301
301
|
const [e] = ws();
|
|
302
302
|
return (e == null ? void 0 : e.slug) || "";
|
|
303
303
|
};
|
|
304
304
|
function ei(e, t) {
|
|
305
305
|
const [n, s] = q(e);
|
|
306
|
-
return
|
|
306
|
+
return ne(() => {
|
|
307
307
|
const r = setTimeout(() => s(e), t);
|
|
308
308
|
return () => clearTimeout(r);
|
|
309
309
|
}, [e, t]), n;
|
|
310
310
|
}
|
|
311
311
|
const ti = ({ query: e, uuid: t }) => {
|
|
312
|
-
const { selectedLang: n, fallbackLang: s } =
|
|
313
|
-
queryKey: [
|
|
312
|
+
const { selectedLang: n, fallbackLang: s } = Te(), { data: r } = ie(), a = r == null ? void 0 : r.pageType, i = k(), o = C(), { data: l, isFetching: f } = ae({
|
|
313
|
+
queryKey: [E.GET_DYNAMIC_PAGES, e, a, t],
|
|
314
314
|
staleTime: 60 * 60 * 1e3,
|
|
315
315
|
placeholderData: [],
|
|
316
316
|
queryFn: async () => await o(i, {
|
|
317
|
-
action:
|
|
317
|
+
action: E.GET_DYNAMIC_PAGES,
|
|
318
318
|
data: { query: e, pageType: a, uuid: t }
|
|
319
319
|
}) || [],
|
|
320
320
|
enabled: !!a
|
|
321
|
-
}),
|
|
322
|
-
return { allLangPages: l, data:
|
|
321
|
+
}), d = j(() => n === "" ? l.filter((u) => u.lang === "" || u.lang === s) : l.filter((u) => u.lang === n), [n, s, l]);
|
|
322
|
+
return { allLangPages: l, data: d, isFetching: f };
|
|
323
323
|
}, ni = () => {
|
|
324
|
-
const { selectedLang: e, fallbackLang: t } =
|
|
324
|
+
const { selectedLang: e, fallbackLang: t } = Te(), [n, s] = ws(), [r, a] = q(""), i = ei(r, 500), { allLangPages: o, data: l, isFetching: f } = ti({ query: i }), d = Q((g) => s(g), [s]), u = Q((g) => a(g), [a]), h = Q(() => {
|
|
325
325
|
if (!n) return;
|
|
326
|
-
const
|
|
327
|
-
(
|
|
328
|
-
).find((
|
|
329
|
-
s(
|
|
326
|
+
const g = !(n != null && n.primaryPage), A = e.length === 0, T = g ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, y = o.filter(
|
|
327
|
+
(_) => (_ == null ? void 0 : _.primaryPage) === T || _.id === T
|
|
328
|
+
).find((_) => A ? _.lang === e || _.lang === t : _.lang === e);
|
|
329
|
+
s(y || n);
|
|
330
330
|
}, [n, e, o, s, t]);
|
|
331
331
|
return {
|
|
332
|
-
isFetching:
|
|
332
|
+
isFetching: f,
|
|
333
333
|
dynamicPage: n,
|
|
334
334
|
searchQuery: r,
|
|
335
335
|
selectedLang: e,
|
|
336
336
|
dynamicPages: l,
|
|
337
337
|
allLangPages: o,
|
|
338
|
-
updateDynamicPage:
|
|
338
|
+
updateDynamicPage: d,
|
|
339
339
|
updateSearchQuery: u,
|
|
340
340
|
onChangeLanguage: h
|
|
341
341
|
};
|
|
342
|
-
}, si =
|
|
343
|
-
const [e] =
|
|
344
|
-
return { data: j(() => ({ ...
|
|
342
|
+
}, si = Ee({ lastSaved: void 0 }), Nn = () => te(si), ie = () => {
|
|
343
|
+
const [e] = oe(), t = e.get("page"), { data: n, isFetching: s } = xe();
|
|
344
|
+
return { data: j(() => ({ ...se(n, { id: t }) || {} }), [n, t]), isFetching: s };
|
|
345
345
|
}, be = () => {
|
|
346
|
-
const [e] =
|
|
347
|
-
return { data: j(() =>
|
|
348
|
-
}, ri =
|
|
349
|
-
const { data: e } = be(), t = Cn(), n =
|
|
346
|
+
const [e] = oe(), t = e.get("lang") ?? "", { data: n, isFetching: s } = xe();
|
|
347
|
+
return { data: j(() => se(n, { lang: t }) || {}, [n, t]), isFetching: s };
|
|
348
|
+
}, ri = Ee({}), ai = () => te(ri), ii = () => {
|
|
349
|
+
const { data: e } = be(), t = Cn(), n = re("getLiveUrl", ds), s = e == null ? void 0 : e.slug, r = n(s || "/");
|
|
350
350
|
return t ? r + t : r;
|
|
351
351
|
}, It = () => {
|
|
352
|
-
const e =
|
|
352
|
+
const e = re("currentUser"), t = re("onLogout");
|
|
353
353
|
return {
|
|
354
354
|
isLoggedIn: !!e,
|
|
355
355
|
user: e,
|
|
356
356
|
logout: t
|
|
357
357
|
};
|
|
358
358
|
}, oi = (e) => {
|
|
359
|
-
const t = Ss(), n =
|
|
360
|
-
return
|
|
361
|
-
queryKey: [
|
|
359
|
+
const t = Ss(), n = C();
|
|
360
|
+
return ae({
|
|
361
|
+
queryKey: [E.GET_CHAI_USER, e],
|
|
362
362
|
queryFn: async () => {
|
|
363
363
|
const r = await n(t, {
|
|
364
|
-
action:
|
|
364
|
+
action: E.GET_CHAI_USER,
|
|
365
365
|
data: { userId: e }
|
|
366
366
|
});
|
|
367
367
|
return { ...r, name: r.name || r.email };
|
|
368
368
|
},
|
|
369
|
-
enabled: !
|
|
369
|
+
enabled: !he(e),
|
|
370
370
|
staleTime: "static"
|
|
371
371
|
});
|
|
372
|
-
}, li =
|
|
372
|
+
}, li = Ee({
|
|
373
373
|
status: "checking",
|
|
374
374
|
requestedBy: "",
|
|
375
375
|
isTakeOverRequested: !1,
|
|
376
376
|
requestingClientId: "",
|
|
377
377
|
isActiveInOtherTab: !1
|
|
378
|
-
}), ci =
|
|
379
|
-
const [e] =
|
|
378
|
+
}), ci = Ee(""), ui = Ee(null), Ln = Ee({}), Ic = () => te(Ln), Ie = () => {
|
|
379
|
+
const [e] = oe(), t = e.get("page"), [n, s] = te(li), [r, a] = te(ui), [i, o] = te(ci), [l] = te(Ln);
|
|
380
380
|
return {
|
|
381
381
|
pageLock: n,
|
|
382
382
|
pageToUser: l,
|
|
@@ -390,20 +390,20 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
390
390
|
isLocked: t && n.status === "locked"
|
|
391
391
|
};
|
|
392
392
|
}, di = () => {
|
|
393
|
-
const e = Ja(), { data: t } =
|
|
394
|
-
return
|
|
395
|
-
if (n != null && n.id && e && !l && (r != null && r.appKey) && !
|
|
396
|
-
|
|
397
|
-
const A = async (
|
|
398
|
-
var
|
|
399
|
-
switch (
|
|
393
|
+
const e = Ja(), { data: t } = ie(), { user: n } = It(), s = t == null ? void 0 : t.id, { data: r } = Re(), { pageLock: a, setPageLock: i, setLockingStatus: o, realtimeInstance: l, setRealtimeInstance: f } = Ie(), [, d] = te(Ln), u = it(!1), h = it(a), g = it(!1);
|
|
394
|
+
return ne(() => {
|
|
395
|
+
if (n != null && n.id && e && !l && (r != null && r.appKey) && !g.current) {
|
|
396
|
+
g.current = !0;
|
|
397
|
+
const A = async (p, y) => {
|
|
398
|
+
var _, b;
|
|
399
|
+
switch (p) {
|
|
400
400
|
/**
|
|
401
401
|
* When user joins
|
|
402
402
|
* @payload : { pageToUser: { [pageId: string]: [userId: string] } }
|
|
403
403
|
* - Update page user mapping
|
|
404
404
|
*/
|
|
405
405
|
case "UPDATE_ONLINE_USERS":
|
|
406
|
-
|
|
406
|
+
d((y == null ? void 0 : y.pageToUser) || {});
|
|
407
407
|
break;
|
|
408
408
|
/**
|
|
409
409
|
* When page is locked
|
|
@@ -415,7 +415,7 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
415
415
|
...h == null ? void 0 : h.current,
|
|
416
416
|
requestedBy: "",
|
|
417
417
|
status: "locked",
|
|
418
|
-
isActiveInOtherTab:
|
|
418
|
+
isActiveInOtherTab: y == null ? void 0 : y.isActiveInOtherTab
|
|
419
419
|
});
|
|
420
420
|
break;
|
|
421
421
|
/**
|
|
@@ -424,12 +424,12 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
424
424
|
* - User will be owner of this page
|
|
425
425
|
*/
|
|
426
426
|
case "USER_JOINED":
|
|
427
|
-
if (((
|
|
428
|
-
((
|
|
427
|
+
if (((_ = h == null ? void 0 : h.current) == null ? void 0 : _.status) === "editing") return;
|
|
428
|
+
((b = h == null ? void 0 : h.current) == null ? void 0 : b.status) === "locked" && o("can_edit_now"), i({
|
|
429
429
|
...h == null ? void 0 : h.current,
|
|
430
430
|
requestedBy: "",
|
|
431
431
|
status: "editing",
|
|
432
|
-
isActiveInOtherTab:
|
|
432
|
+
isActiveInOtherTab: y == null ? void 0 : y.isActiveInOtherTab
|
|
433
433
|
});
|
|
434
434
|
break;
|
|
435
435
|
/**
|
|
@@ -443,8 +443,8 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
443
443
|
case "TAKE_OVER_REQUESTED":
|
|
444
444
|
i({
|
|
445
445
|
...h == null ? void 0 : h.current,
|
|
446
|
-
requestingClientId:
|
|
447
|
-
requestedBy:
|
|
446
|
+
requestingClientId: y == null ? void 0 : y.requestingClientId,
|
|
447
|
+
requestedBy: y != null && y.isRequestedFromAnotherTab ? "ANOTHER_TAB" : y == null ? void 0 : y.requestedBy
|
|
448
448
|
});
|
|
449
449
|
break;
|
|
450
450
|
/**
|
|
@@ -454,7 +454,7 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
454
454
|
* - update state for editing page
|
|
455
455
|
*/
|
|
456
456
|
case "TAKE_OVER_REQUEST_ACCEPTED":
|
|
457
|
-
|
|
457
|
+
y != null && y.isTakingOverFromAnotherTab || (o("take_over_request_accepted"), R.success("Your Page Take Over Request Accepted", { position: "top-center" })), i({
|
|
458
458
|
...h == null ? void 0 : h.current,
|
|
459
459
|
status: "editing",
|
|
460
460
|
requestedBy: "",
|
|
@@ -474,17 +474,17 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
474
474
|
});
|
|
475
475
|
break;
|
|
476
476
|
}
|
|
477
|
-
},
|
|
477
|
+
}, T = new Xa(
|
|
478
478
|
e,
|
|
479
479
|
r == null ? void 0 : r.appKey,
|
|
480
480
|
n == null ? void 0 : n.id,
|
|
481
481
|
A
|
|
482
482
|
);
|
|
483
|
-
|
|
483
|
+
f(T);
|
|
484
484
|
}
|
|
485
|
-
}, [
|
|
485
|
+
}, [f, e, r == null ? void 0 : r.appKey]), ne(() => {
|
|
486
486
|
h.current = a;
|
|
487
|
-
}, [a]),
|
|
487
|
+
}, [a]), ne(() => {
|
|
488
488
|
if (!(!l || !s || !(n != null && n.id) || u.current))
|
|
489
489
|
return u.current = !0, l == null || l.joinPage(s), () => {
|
|
490
490
|
l && u.current && (u.current = !1, h.current = {
|
|
@@ -497,7 +497,7 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
497
497
|
};
|
|
498
498
|
}, [s, l]), a == null ? void 0 : a.status;
|
|
499
499
|
}, fi = () => {
|
|
500
|
-
const { data: e } =
|
|
500
|
+
const { data: e } = ie(), { user: t } = It(), n = e == null ? void 0 : e.id, { pageLock: s, setPageLock: r, realtimeInstance: a } = Ie(), { savePageAsync: i } = Ge(), o = Q(() => {
|
|
501
501
|
!a || !n || !(t != null && t.id) || (r({ ...s, isTakeOverRequested: !0 }), a == null || a.sendEvent("TAKE_OVER_REQUESTED"));
|
|
502
502
|
}, [a, n, t == null ? void 0 : t.id, r, s]), l = Q(async () => {
|
|
503
503
|
!a || !n || !(t != null && t.id) || (await i(), a == null || a.sendEvent("TAKE_OVER_REQUEST_ACCEPTED", {
|
|
@@ -509,7 +509,7 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
509
509
|
isActiveInOtherTab: !1,
|
|
510
510
|
isTakeOverRequested: !1
|
|
511
511
|
}));
|
|
512
|
-
}, [n, a, t == null ? void 0 : t.id, r, i, s]),
|
|
512
|
+
}, [n, a, t == null ? void 0 : t.id, r, i, s]), f = Q(() => {
|
|
513
513
|
!a || !n || !(t != null && t.id) || (a == null || a.sendEvent("TAKE_OVER_REQUEST_REJECTED", {
|
|
514
514
|
requestingClientId: s == null ? void 0 : s.requestingClientId
|
|
515
515
|
}), r({
|
|
@@ -524,14 +524,14 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
524
524
|
return {
|
|
525
525
|
pageLock: s,
|
|
526
526
|
acceptTakeOver: l,
|
|
527
|
-
rejectTakeOver:
|
|
527
|
+
rejectTakeOver: f,
|
|
528
528
|
requestTakeOver: o
|
|
529
529
|
};
|
|
530
|
-
}, hi = K(() => import("./no-language-page-content-
|
|
531
|
-
const { pageLock: t, requestTakeOver: n } = fi(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ie(), { data: o, isFetching: l } = oi(s), [
|
|
530
|
+
}, hi = K(() => import("./no-language-page-content-DDz81nqg.js")), gi = K(() => import("./page-locked-by-dialog-CnkVUpjt.js")), sn = K(() => import("./page-lock-request-ECxkQMdS.js")), mi = ({ isFetchingPage: e }) => {
|
|
531
|
+
const { pageLock: t, requestTakeOver: n } = fi(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ie(), { data: o, isFetching: l } = oi(s), [f] = oe(), d = f.get("page"), [u] = Nn(), h = W(), g = Q(() => {
|
|
532
532
|
n();
|
|
533
533
|
}, [n]);
|
|
534
|
-
return !
|
|
534
|
+
return !d || e || !i || (t == null ? void 0 : t.status) === "checking" ? null : t != null && t.requestedBy ? /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
535
535
|
sn,
|
|
536
536
|
{
|
|
537
537
|
lockingStatus: "",
|
|
@@ -539,17 +539,17 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
539
539
|
n();
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
) }) : (t == null ? void 0 : t.status) !== "locked" ? r === "take_over_request_accepted" || r === "can_edit_now" ? /* @__PURE__ */ c(
|
|
542
|
+
) }) : (t == null ? void 0 : t.status) !== "locked" ? r === "take_over_request_accepted" || r === "can_edit_now" ? /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
543
543
|
sn,
|
|
544
544
|
{
|
|
545
545
|
lockingStatus: r,
|
|
546
546
|
onContinue: () => {
|
|
547
547
|
h.invalidateQueries({
|
|
548
|
-
queryKey: [
|
|
548
|
+
queryKey: [E.GET_DRAFT_PAGE]
|
|
549
549
|
}), a("");
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
|
-
) }) : null : t != null && t.isActiveInOtherTab ? /* @__PURE__ */ c(
|
|
552
|
+
) }) : null : t != null && t.isActiveInOtherTab ? /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(sn, { lockingStatus: "page_is_active_in_other_tab", onContinue: n }) }) : /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
553
553
|
gi,
|
|
554
554
|
{
|
|
555
555
|
...o,
|
|
@@ -557,14 +557,14 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
557
557
|
name: (o == null ? void 0 : o.name) || "Unknown User",
|
|
558
558
|
email: (o == null ? void 0 : o.email) || "",
|
|
559
559
|
lastSaved: (u == null ? void 0 : u.lastSaved) || "",
|
|
560
|
-
onTakeOver:
|
|
560
|
+
onTakeOver: g,
|
|
561
561
|
realtimePageLockEnabled: i,
|
|
562
562
|
isRequestRejected: r === "take_over_request_rejected"
|
|
563
563
|
}
|
|
564
564
|
) });
|
|
565
|
-
},
|
|
566
|
-
const [e] =
|
|
567
|
-
return Ps(t) ? null : /* @__PURE__ */ c(
|
|
565
|
+
}, Ei = () => {
|
|
566
|
+
const [e] = oe(), t = e.get("lang");
|
|
567
|
+
return Ps(t) ? null : /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(hi, {}) });
|
|
568
568
|
}, Lt = {
|
|
569
569
|
ab: "Abkhazian",
|
|
570
570
|
aa: "Afar",
|
|
@@ -758,29 +758,29 @@ function vs(e, t, n = !1) {
|
|
|
758
758
|
const s = e.toString() ? `?${e.toString()}` : "/";
|
|
759
759
|
n ? window.history.replaceState(null, "", s) : window.history.pushState({}, "", s), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
760
760
|
}
|
|
761
|
-
const
|
|
761
|
+
const kn = Ee(null), On = () => {
|
|
762
762
|
const { data: e } = Re();
|
|
763
763
|
return j(
|
|
764
764
|
() => (e == null ? void 0 : e.fallbackLang) || "en",
|
|
765
765
|
[e]
|
|
766
766
|
);
|
|
767
767
|
}, bs = () => {
|
|
768
|
-
const e =
|
|
769
|
-
return
|
|
770
|
-
queryKey: [
|
|
768
|
+
const e = C(), t = k();
|
|
769
|
+
return ae({
|
|
770
|
+
queryKey: [E.GET_WEBSITE_PAGES],
|
|
771
771
|
staleTime: 1e3 * 60 * 5,
|
|
772
|
-
queryFn: async () => e(t, { action:
|
|
772
|
+
queryFn: async () => e(t, { action: E.GET_WEBSITE_PAGES }) || [],
|
|
773
773
|
placeholderData: (n) => n || []
|
|
774
774
|
});
|
|
775
775
|
}, Cc = (e) => {
|
|
776
|
-
const t =
|
|
777
|
-
return
|
|
778
|
-
queryKey: [
|
|
776
|
+
const t = C(), n = k(), s = On();
|
|
777
|
+
return ae({
|
|
778
|
+
queryKey: [E.GET_WEBSITE_PAGES, e, s],
|
|
779
779
|
staleTime: 1e3 * 60 * 5,
|
|
780
780
|
enabled: !!e,
|
|
781
781
|
queryFn: async () => {
|
|
782
782
|
if (s === e) return {};
|
|
783
|
-
const r = await t(n, { action:
|
|
783
|
+
const r = await t(n, { action: E.GET_WEBSITE_PAGES, data: { lang: e } }) || [];
|
|
784
784
|
return Ir(
|
|
785
785
|
Bt(r, (a) => ({ ...a, lang: e })),
|
|
786
786
|
"primaryPage"
|
|
@@ -788,155 +788,155 @@ const Gn = pe(null), Dn = () => {
|
|
|
788
788
|
},
|
|
789
789
|
placeholderData: (r) => r || {}
|
|
790
790
|
});
|
|
791
|
-
}, pi = K(() => import("./page-manager-new-
|
|
792
|
-
const
|
|
793
|
-
if (!
|
|
794
|
-
const
|
|
795
|
-
return
|
|
796
|
-
}, [
|
|
797
|
-
|
|
798
|
-
if (
|
|
799
|
-
const
|
|
800
|
-
vs(
|
|
801
|
-
}, [
|
|
802
|
-
const
|
|
803
|
-
return /* @__PURE__ */
|
|
804
|
-
/* @__PURE__ */ c("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ c("div", { className: "relative", children: /* @__PURE__ */
|
|
791
|
+
}, pi = K(() => import("./page-manager-new-DkqNLZ5C.js")), Is = ({ children: e }) => {
|
|
792
|
+
const { t } = ve(), [n, s] = oe(), r = n.get("page"), { data: a, isFetching: i } = ie(), { data: o, isFetching: l } = bs(), [f, d] = q(!1), [u, h] = q(!0), { savePage: g } = Ge(), A = !!r && !he(a), T = j(() => {
|
|
793
|
+
if (!o || l) return !1;
|
|
794
|
+
const b = o.find((O) => O.slug === "/");
|
|
795
|
+
return b == null ? void 0 : b.id;
|
|
796
|
+
}, [o, l]);
|
|
797
|
+
ne(() => {
|
|
798
|
+
if (l || !T || o.some((B) => B.id === r)) return;
|
|
799
|
+
const O = new URLSearchParams({ page: T });
|
|
800
|
+
vs(O, s), !l && o && h(!1);
|
|
801
|
+
}, [r, l, o, T, s]);
|
|
802
|
+
const p = !u && !r, y = !u && !i && he(a), _ = f || p || y;
|
|
803
|
+
return /* @__PURE__ */ m(ge, { children: [
|
|
804
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ c("div", { className: "relative", children: /* @__PURE__ */ m(zt, { children: [
|
|
805
805
|
/* @__PURE__ */ c(
|
|
806
|
-
|
|
806
|
+
Wt,
|
|
807
807
|
{
|
|
808
808
|
asChild: !0,
|
|
809
809
|
onClick: () => {
|
|
810
|
-
|
|
810
|
+
g(), d(!0);
|
|
811
811
|
},
|
|
812
|
-
children: e || /* @__PURE__ */ c(
|
|
812
|
+
children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(wa, { className: "h-4 w-4" }) }, "template-viewer")
|
|
813
813
|
}
|
|
814
814
|
),
|
|
815
|
-
/* @__PURE__ */ c(Yt, { side: "right", children: /* @__PURE__ */ c("p", { children: "Open pages manager" }) })
|
|
815
|
+
/* @__PURE__ */ c(Yt, { side: "right", children: /* @__PURE__ */ c("p", { children: t("Open pages manager") }) })
|
|
816
816
|
] }) }) }),
|
|
817
|
-
/* @__PURE__ */ c(
|
|
817
|
+
/* @__PURE__ */ c(Es, { open: _, onOpenChange: (b) => !b && A && d(!1), children: /* @__PURE__ */ m(
|
|
818
818
|
ps,
|
|
819
819
|
{
|
|
820
820
|
side: "left",
|
|
821
821
|
"aria-describedby": "pages-manager-description",
|
|
822
|
-
className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${
|
|
822
|
+
className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${A ? "" : "sheet-hide-close-btn"}`,
|
|
823
823
|
children: [
|
|
824
|
-
/* @__PURE__ */
|
|
825
|
-
/* @__PURE__ */
|
|
824
|
+
/* @__PURE__ */ m(Xr, { className: "mb-3 px-4 pt-4", children: [
|
|
825
|
+
/* @__PURE__ */ m(Zr, { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
826
826
|
/* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(va, { className: "h-4 w-4" }) }),
|
|
827
|
-
/* @__PURE__ */
|
|
828
|
-
/* @__PURE__ */ c("span", { className: "text-sm font-semibold", children: "Pages" }),
|
|
829
|
-
/* @__PURE__ */ c("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: "Manage your site structure" })
|
|
827
|
+
/* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
828
|
+
/* @__PURE__ */ c("span", { className: "text-sm font-semibold", children: t("Pages") }),
|
|
829
|
+
/* @__PURE__ */ c("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: t("Manage your site structure") })
|
|
830
830
|
] })
|
|
831
831
|
] }),
|
|
832
|
-
/* @__PURE__ */ c(ea, { className: "sr-only", children: "Manage your site structure" })
|
|
832
|
+
/* @__PURE__ */ c(ea, { className: "sr-only", children: t("Manage your site structure") })
|
|
833
833
|
] }),
|
|
834
|
-
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children:
|
|
834
|
+
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: _ && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(pi, { close: () => d(!1) }) }) })
|
|
835
835
|
]
|
|
836
836
|
}
|
|
837
837
|
) })
|
|
838
838
|
] });
|
|
839
|
-
},
|
|
840
|
-
const e =
|
|
839
|
+
}, yi = K(() => import("./add-new-language-page-DZhjVBBf.js")), Ai = () => {
|
|
840
|
+
const e = re("topLeftCorner", null);
|
|
841
841
|
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Ur.createElement(e, {}) }) : null;
|
|
842
842
|
}, Ti = ({
|
|
843
843
|
showAdd: e = !0,
|
|
844
844
|
variant: t = "ghost"
|
|
845
845
|
}) => {
|
|
846
|
-
const { fallbackLang: n, languages: s, selectedLang: r, setSelectedLang: a } =
|
|
847
|
-
|
|
848
|
-
const
|
|
849
|
-
|
|
846
|
+
const { fallbackLang: n, languages: s, selectedLang: r, setSelectedLang: a } = Te(), i = he(r) ? n : r, [, o] = oe(), { isLocked: l } = Ie();
|
|
847
|
+
ne(() => {
|
|
848
|
+
const p = new URLSearchParams(window.location.search), y = p.get("lang");
|
|
849
|
+
y && (s.includes(y) ? a(y) : (p.delete("lang"), o(p), a("")));
|
|
850
850
|
}, [s, o, a]);
|
|
851
|
-
const [,
|
|
852
|
-
const
|
|
853
|
-
Bt(
|
|
854
|
-
const
|
|
851
|
+
const [, f] = te(kn), { data: d } = ie(), { data: u } = Re(), { data: h } = xe(), g = j(() => {
|
|
852
|
+
const p = fs(
|
|
853
|
+
Bt(V(u, "languages"), (y) => {
|
|
854
|
+
const _ = se(h, { lang: y });
|
|
855
855
|
return {
|
|
856
|
-
key:
|
|
857
|
-
value:
|
|
858
|
-
isLangPageAdded: !!
|
|
856
|
+
key: y,
|
|
857
|
+
value: V(Lt, y, y),
|
|
858
|
+
isLangPageAdded: !!_
|
|
859
859
|
};
|
|
860
860
|
})
|
|
861
861
|
).filter(Boolean);
|
|
862
862
|
return [
|
|
863
863
|
{
|
|
864
864
|
key: n,
|
|
865
|
-
value:
|
|
865
|
+
value: V(Lt, n),
|
|
866
866
|
isLangPageAdded: !0
|
|
867
867
|
},
|
|
868
|
-
...
|
|
868
|
+
...p
|
|
869
869
|
];
|
|
870
|
-
}, [n, h, u]), A = (
|
|
870
|
+
}, [n, h, u]), A = (p) => {
|
|
871
871
|
if (document.querySelector('[data-panel-id="seo"]')) {
|
|
872
|
-
const
|
|
872
|
+
const _ = new CustomEvent("seo-language-switch-check", {
|
|
873
873
|
detail: {
|
|
874
874
|
fromLang: i,
|
|
875
|
-
toLang:
|
|
876
|
-
switchHandler: () =>
|
|
875
|
+
toLang: p,
|
|
876
|
+
switchHandler: () => T(p)
|
|
877
877
|
}
|
|
878
878
|
});
|
|
879
|
-
window.dispatchEvent(
|
|
879
|
+
window.dispatchEvent(_);
|
|
880
880
|
return;
|
|
881
881
|
}
|
|
882
|
-
|
|
883
|
-
},
|
|
884
|
-
a(
|
|
885
|
-
const
|
|
886
|
-
|
|
882
|
+
T(p);
|
|
883
|
+
}, T = (p) => {
|
|
884
|
+
a(p);
|
|
885
|
+
const y = new URLSearchParams(window.location.search);
|
|
886
|
+
p === n ? y.delete("lang") : y.set("lang", p), vs(y, o);
|
|
887
887
|
};
|
|
888
|
-
return
|
|
889
|
-
/* @__PURE__ */ c(
|
|
890
|
-
|
|
888
|
+
return he(s) ? null : l ? /* @__PURE__ */ m(M, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
|
|
889
|
+
/* @__PURE__ */ c(Vn, { className: "h-4 w-4" }),
|
|
890
|
+
V(Lt, i, i),
|
|
891
891
|
/* @__PURE__ */ c(fn, { className: "h-4 w-4" })
|
|
892
|
-
] }) : /* @__PURE__ */ c(
|
|
893
|
-
/* @__PURE__ */ c(vn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */
|
|
894
|
-
|
|
892
|
+
] }) : /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ m(wn, { children: [
|
|
893
|
+
/* @__PURE__ */ c(vn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
|
|
894
|
+
M,
|
|
895
895
|
{
|
|
896
896
|
disabled: !!l,
|
|
897
897
|
variant: t,
|
|
898
898
|
size: "sm",
|
|
899
899
|
className: "ml-px h-max gap-2 py-1.5",
|
|
900
900
|
children: [
|
|
901
|
-
/* @__PURE__ */ c(
|
|
902
|
-
|
|
901
|
+
/* @__PURE__ */ c(Vn, { className: "h-4 w-4" }),
|
|
902
|
+
V(Lt, i, i),
|
|
903
903
|
/* @__PURE__ */ c(fn, { className: "h-4 w-4" })
|
|
904
904
|
]
|
|
905
905
|
}
|
|
906
906
|
) }),
|
|
907
|
-
/* @__PURE__ */
|
|
907
|
+
/* @__PURE__ */ m(bn, { className: "space-y-1 border-border", children: [
|
|
908
908
|
Bt(
|
|
909
|
-
|
|
910
|
-
(
|
|
911
|
-
|
|
909
|
+
g.filter((p) => p.isLangPageAdded),
|
|
910
|
+
(p) => /* @__PURE__ */ m(
|
|
911
|
+
de,
|
|
912
912
|
{
|
|
913
913
|
className: Mt(
|
|
914
914
|
"flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
|
|
915
|
-
|
|
915
|
+
p.key === i && "!bg-gray-200 text-gray-700"
|
|
916
916
|
),
|
|
917
|
-
onClick: () => A(
|
|
917
|
+
onClick: () => A(p.key),
|
|
918
918
|
children: [
|
|
919
|
-
/* @__PURE__ */ c("div", { className: "text-slate-600", children:
|
|
920
|
-
|
|
919
|
+
/* @__PURE__ */ c("div", { className: "text-slate-600", children: p.value }),
|
|
920
|
+
p.key === n && /* @__PURE__ */ m("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
|
|
921
921
|
/* @__PURE__ */ c(ba, { fill: "orange", className: "h-2 w-2" }),
|
|
922
922
|
"Primary"
|
|
923
923
|
] })
|
|
924
924
|
]
|
|
925
925
|
},
|
|
926
|
-
|
|
926
|
+
p.value
|
|
927
927
|
)
|
|
928
928
|
),
|
|
929
|
-
e && !
|
|
929
|
+
e && !he(g.filter((p) => !p.isLangPageAdded)) && /* @__PURE__ */ m(ge, { children: [
|
|
930
930
|
/* @__PURE__ */ c(ta, {}),
|
|
931
|
-
/* @__PURE__ */
|
|
932
|
-
|
|
931
|
+
/* @__PURE__ */ m(
|
|
932
|
+
M,
|
|
933
933
|
{
|
|
934
934
|
size: "sm",
|
|
935
935
|
variant: "ghost",
|
|
936
936
|
onClick: () => {
|
|
937
|
-
|
|
937
|
+
d && f({
|
|
938
938
|
edit: !1,
|
|
939
|
-
primaryPage:
|
|
939
|
+
primaryPage: d.id
|
|
940
940
|
});
|
|
941
941
|
},
|
|
942
942
|
className: "text-xs font-normal duration-200 hover:bg-slate-300 hover:text-slate-800",
|
|
@@ -951,12 +951,12 @@ const Gn = pe(null), Dn = () => {
|
|
|
951
951
|
] }) });
|
|
952
952
|
};
|
|
953
953
|
function Si() {
|
|
954
|
-
const [e, t] =
|
|
955
|
-
return /* @__PURE__ */
|
|
956
|
-
/* @__PURE__ */ c(
|
|
954
|
+
const [e, t] = te(kn);
|
|
955
|
+
return /* @__PURE__ */ m("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
|
|
956
|
+
/* @__PURE__ */ c(Ai, {}),
|
|
957
957
|
/* @__PURE__ */ c(Is, {}),
|
|
958
|
-
e && /* @__PURE__ */ c(
|
|
959
|
-
|
|
958
|
+
e && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
959
|
+
yi,
|
|
960
960
|
{
|
|
961
961
|
isOpen: !0,
|
|
962
962
|
id: e == null ? void 0 : e.id,
|
|
@@ -969,8 +969,8 @@ function Si() {
|
|
|
969
969
|
] });
|
|
970
970
|
}
|
|
971
971
|
function _i() {
|
|
972
|
-
return /* @__PURE__ */ c("div", { className: "mt-2 space-y-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */
|
|
973
|
-
/* @__PURE__ */
|
|
972
|
+
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: [
|
|
973
|
+
/* @__PURE__ */ m("div", { className: "flex-1 space-y-1", children: [
|
|
974
974
|
/* @__PURE__ */ c(Nt, { className: "h-4 w-3/4" }),
|
|
975
975
|
/* @__PURE__ */ c(Nt, { className: "h-3 w-1/2" }),
|
|
976
976
|
/* @__PURE__ */ c(Nt, { className: "mt-1 h-5 w-20" })
|
|
@@ -978,19 +978,19 @@ function _i() {
|
|
|
978
978
|
/* @__PURE__ */ c(Nt, { className: "h-8 w-8 rounded-full" })
|
|
979
979
|
] }, t)) });
|
|
980
980
|
}
|
|
981
|
-
const Pi =
|
|
981
|
+
const Pi = z.lazy(() => import("./page-revisions-content-CBQPYFZI.js"));
|
|
982
982
|
function wi() {
|
|
983
|
-
const [e, t] =
|
|
984
|
-
return /* @__PURE__ */ c(
|
|
985
|
-
/* @__PURE__ */
|
|
986
|
-
/* @__PURE__ */ c(na, { asChild: !0, children: /* @__PURE__ */ c(
|
|
987
|
-
/* @__PURE__ */
|
|
983
|
+
const [e, t] = z.useState(!1);
|
|
984
|
+
return /* @__PURE__ */ c(ys, { children: /* @__PURE__ */ m(zt, { delayDuration: 0, children: [
|
|
985
|
+
/* @__PURE__ */ m(Es, { open: e, onOpenChange: t, children: [
|
|
986
|
+
/* @__PURE__ */ c(na, { asChild: !0, children: /* @__PURE__ */ c(Wt, { asChild: !0, children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2", children: [
|
|
987
|
+
/* @__PURE__ */ m(M, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
|
|
988
988
|
/* @__PURE__ */ c(Ia, { className: "h-4 w-4" }),
|
|
989
989
|
/* @__PURE__ */ c("span", { className: "sr-only", children: "View revision history" })
|
|
990
990
|
] }),
|
|
991
991
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
992
992
|
] }) }) }),
|
|
993
|
-
/* @__PURE__ */ c(ps, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(
|
|
993
|
+
/* @__PURE__ */ c(ps, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(H, { fallback: /* @__PURE__ */ c(_i, {}), children: /* @__PURE__ */ c(Pi, { isOpen: e }) }) })
|
|
994
994
|
] }),
|
|
995
995
|
/* @__PURE__ */ c(Yt, { side: "bottom", children: /* @__PURE__ */ c("p", { children: "Revision history" }) })
|
|
996
996
|
] }) });
|
|
@@ -1001,78 +1001,28 @@ const rn = ({
|
|
|
1001
1001
|
children: n,
|
|
1002
1002
|
fallback: s = null
|
|
1003
1003
|
}) => {
|
|
1004
|
-
const { hasPermission: r } =
|
|
1004
|
+
const { hasPermission: r } = ms();
|
|
1005
1005
|
return e && !r(e) || t && !t.some((a) => r(a)) ? s : n;
|
|
1006
|
-
}, Z = {
|
|
1007
|
-
TOGGLE_PREVIEW: "Toggle Preview",
|
|
1008
|
-
OPEN_PREVIEW_IN_NEW_TAB: "Open preview in new tab",
|
|
1009
|
-
THEME: "Theme",
|
|
1010
|
-
SAVEDRAFT: "Save draft",
|
|
1011
|
-
SAVING: "Saving",
|
|
1012
|
-
SAVED: "Saved",
|
|
1013
|
-
PUBLISHED: "Published",
|
|
1014
|
-
PUBLISH: "Publish",
|
|
1015
|
-
UNPUBLISH: "Unpublish",
|
|
1016
|
-
WEBSITEDATA: "Website data",
|
|
1017
|
-
OPEN: "Open",
|
|
1018
|
-
EDIT_LANGUAGE: "Edit language",
|
|
1019
|
-
ADD_NEW_LANGUAGE: "Add new language page",
|
|
1020
|
-
ENTER_LANGUAGE_DETAILS: "Enter the details for the language",
|
|
1021
|
-
LANGUAGE: "Language",
|
|
1022
|
-
PAGE_NAME: "Page Name",
|
|
1023
|
-
SLUG: "Slug",
|
|
1024
|
-
UPDATE: "Update",
|
|
1025
|
-
UPDATING: "Updating...",
|
|
1026
|
-
ADDING: "Adding...",
|
|
1027
|
-
CHOOSE_LANGUAGE: "Choose language",
|
|
1028
|
-
ALL_AVAILABLE_LANGUAGE_PAGE: "All available language page is created.",
|
|
1029
|
-
TO_UPDATE_SLUG: "To update slug use 'Change slug' action",
|
|
1030
|
-
SLUG_SHOULD_START_WITH: " (Slug should start with /{lang})",
|
|
1031
|
-
CHOOSE_LANGUAGE_TO_ADD_SLUG: "Choose language to add slug",
|
|
1032
|
-
ENTER_PAGE_SLUG: "Enter page slug",
|
|
1033
|
-
ENTER_PAGE_NAME: "Enter page name",
|
|
1034
|
-
DELETE: "Delete",
|
|
1035
|
-
CHANGE_SLUG: "Change slug",
|
|
1036
|
-
PRIMARY: "Primary",
|
|
1037
|
-
SLUG_MUST_START_WITH: "Slug must start with /",
|
|
1038
|
-
EDIT: "Edit",
|
|
1039
|
-
UNPUBLISH_MSG: "Are you sure you want to unpublish",
|
|
1040
|
-
MARK_AS_TEMPLATE: "Mark as template",
|
|
1041
|
-
UNMARK_AS_TEMPLATE: "Unmark as template",
|
|
1042
|
-
// * TOAST SUCCESS
|
|
1043
|
-
PAGE_ADD_SUCCESS: "New page added successfully.",
|
|
1044
|
-
GLOBAL_BLOCK_ADD_SUCCESS: "New global block added successfully.",
|
|
1045
|
-
SEO_SETTINGS_UPDATE_SUCCESS: "SEO Settings updated successfully.",
|
|
1046
|
-
PAGE_UPDATE_SUCCESS: "Page updated successfully.",
|
|
1047
|
-
GLOBAL_BLOCK_UPDATE_SUCCESS: "Global block updated successfully.",
|
|
1048
|
-
PAGE_DELETE_SUCCESS: "Page deleted successfully.",
|
|
1049
|
-
GLOBAL_BLOCK_DELETE_SUCCESS: "Global block deleted successfully.",
|
|
1050
|
-
PAGE_UNPUBLISH_SUCCESS: "Page unpublished successfully.",
|
|
1051
|
-
GLOBAL_BLOCK_UNPUBLISH_SUCCESS: "Global block unpublished successfully.",
|
|
1052
|
-
PAGE_PUBLISH_SUCCESS: "Page published successfully.",
|
|
1053
|
-
GLOBAL_BLOCK_PUBLISH_SUCCESS: "Global block published successfully.",
|
|
1054
|
-
PAGES_PUBLISH_SUCCESS: "Your changes have been published successfully.",
|
|
1055
|
-
SLUG_CHANGE_SUCCESS: "Slug changed successfully."
|
|
1056
1006
|
}, vi = {
|
|
1057
1007
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
1058
1008
|
}, Ce = () => {
|
|
1059
|
-
const e =
|
|
1060
|
-
return
|
|
1061
|
-
queryKey: [
|
|
1009
|
+
const e = k(), t = C();
|
|
1010
|
+
return ae({
|
|
1011
|
+
queryKey: [E.GET_PAGE_TYPES],
|
|
1062
1012
|
staleTime: 1 / 0,
|
|
1063
1013
|
placeholderData: [],
|
|
1064
|
-
queryFn: async () => t(e, { action:
|
|
1014
|
+
queryFn: async () => t(e, { action: E.GET_PAGE_TYPES })
|
|
1065
1015
|
});
|
|
1066
1016
|
}, bi = (e) => {
|
|
1067
1017
|
const { data: t } = Ce();
|
|
1068
1018
|
return j(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
|
|
1069
1019
|
}, Ii = () => {
|
|
1070
|
-
const e =
|
|
1020
|
+
const e = k(), t = C();
|
|
1071
1021
|
return X({
|
|
1072
1022
|
mutationFn: async ({ pageType: n, query: s }) => {
|
|
1073
1023
|
try {
|
|
1074
1024
|
return t(e, {
|
|
1075
|
-
action:
|
|
1025
|
+
action: E.SEARCH_PAGES,
|
|
1076
1026
|
data: {
|
|
1077
1027
|
pageType: n,
|
|
1078
1028
|
query: Array.isArray(s) && s.length > 0 ? s[0] : s
|
|
@@ -1084,61 +1034,61 @@ const rn = ({
|
|
|
1084
1034
|
}
|
|
1085
1035
|
});
|
|
1086
1036
|
}, Nc = () => {
|
|
1087
|
-
const e =
|
|
1037
|
+
const e = k(), t = W(), n = C(), { data: s } = Ce();
|
|
1088
1038
|
return X({
|
|
1089
1039
|
mutationFn: async (r) => await n(e, {
|
|
1090
|
-
action:
|
|
1040
|
+
action: E.CREATE_PAGE,
|
|
1091
1041
|
data: r
|
|
1092
1042
|
}),
|
|
1093
1043
|
onSuccess: (r, a) => {
|
|
1094
1044
|
var o;
|
|
1095
1045
|
a && (a != null && a.primaryPage) ? (t.invalidateQueries({
|
|
1096
|
-
queryKey: [
|
|
1046
|
+
queryKey: [E.GET_LANGUAGE_PAGES, a == null ? void 0 : a.primaryPage]
|
|
1097
1047
|
}), t.invalidateQueries({
|
|
1098
|
-
queryKey: [
|
|
1048
|
+
queryKey: [E.GET_WEBSITE_PAGES, a == null ? void 0 : a.lang]
|
|
1099
1049
|
})) : t.invalidateQueries({
|
|
1100
|
-
queryKey: [
|
|
1050
|
+
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1101
1051
|
});
|
|
1102
|
-
const i = a.template ? `Page created from "${a.template.name}" template` : a.hasSlug === !1 ? "New " + ((o =
|
|
1052
|
+
const i = a.template ? `Page created from "${a.template.name}" template` : a.hasSlug === !1 ? "New " + ((o = se(s, { key: a.pageType })) == null ? void 0 : o.name) + " added successfully" : "New page added successfully";
|
|
1103
1053
|
R.success(i);
|
|
1104
1054
|
},
|
|
1105
1055
|
onError: (r, a) => {
|
|
1106
|
-
const i =
|
|
1056
|
+
const i = se(s, { key: a.pageType });
|
|
1107
1057
|
R.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1108
|
-
description:
|
|
1058
|
+
description: V(vi, r.message, r.message)
|
|
1109
1059
|
});
|
|
1110
1060
|
}
|
|
1111
1061
|
});
|
|
1112
1062
|
}, Lc = () => {
|
|
1113
|
-
const e =
|
|
1063
|
+
const e = k(), t = W(), n = C(), { data: s } = be(), { data: r } = Ce();
|
|
1114
1064
|
return X({
|
|
1115
1065
|
mutationFn: async (a) => await n(e, {
|
|
1116
|
-
action:
|
|
1066
|
+
action: E.UPDATE_PAGE,
|
|
1117
1067
|
data: a
|
|
1118
1068
|
}),
|
|
1119
1069
|
onSuccess: (a, i) => {
|
|
1120
1070
|
(s == null ? void 0 : s.id) === (i == null ? void 0 : i.id) && t.invalidateQueries({
|
|
1121
|
-
queryKey: [
|
|
1071
|
+
queryKey: [E.GET_LANGUAGE_PAGES]
|
|
1122
1072
|
}), i && (i != null && i.primaryPage || i != null && i.seo) ? (t.invalidateQueries({
|
|
1123
|
-
queryKey: [
|
|
1073
|
+
queryKey: [E.GET_LANGUAGE_PAGES, i == null ? void 0 : i.primaryPage]
|
|
1124
1074
|
}), t.invalidateQueries({
|
|
1125
|
-
queryKey: [
|
|
1075
|
+
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1126
1076
|
})) : t.invalidateQueries({
|
|
1127
|
-
queryKey: [
|
|
1077
|
+
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1128
1078
|
});
|
|
1129
1079
|
},
|
|
1130
1080
|
onError: (a, i) => {
|
|
1131
|
-
const o =
|
|
1081
|
+
const o = se(r, { key: i.pageType });
|
|
1132
1082
|
R.error(`Failed to update ${o != null && o.hasSlug ? "page" : o.name}.`, {
|
|
1133
1083
|
description: a.message
|
|
1134
1084
|
});
|
|
1135
1085
|
}
|
|
1136
1086
|
});
|
|
1137
|
-
},
|
|
1138
|
-
const e =
|
|
1087
|
+
}, kc = () => {
|
|
1088
|
+
const e = k(), t = W(), n = C(), { data: s } = Ce();
|
|
1139
1089
|
return X({
|
|
1140
1090
|
mutationFn: async (r) => n(e, {
|
|
1141
|
-
action:
|
|
1091
|
+
action: E.DELETE_PAGE,
|
|
1142
1092
|
data: { id: r == null ? void 0 : r.id }
|
|
1143
1093
|
}),
|
|
1144
1094
|
onSuccess: (r, a) => {
|
|
@@ -1149,72 +1099,72 @@ const rn = ({
|
|
|
1149
1099
|
return;
|
|
1150
1100
|
}
|
|
1151
1101
|
a && (a != null && a.primaryPage) ? (t.invalidateQueries({
|
|
1152
|
-
queryKey: [
|
|
1102
|
+
queryKey: [E.GET_LANGUAGE_PAGES, a == null ? void 0 : a.primaryPage]
|
|
1153
1103
|
}), t.invalidateQueries({
|
|
1154
|
-
queryKey: [
|
|
1104
|
+
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1155
1105
|
})) : t.invalidateQueries({
|
|
1156
|
-
queryKey: [
|
|
1106
|
+
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1157
1107
|
});
|
|
1158
1108
|
},
|
|
1159
1109
|
onError: (r, a) => {
|
|
1160
|
-
const i =
|
|
1110
|
+
const i = se(s, { key: a.pageType });
|
|
1161
1111
|
R.error(`Failed to delete ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1162
1112
|
description: r.message
|
|
1163
1113
|
});
|
|
1164
1114
|
}
|
|
1165
1115
|
});
|
|
1166
|
-
},
|
|
1167
|
-
const e =
|
|
1116
|
+
}, Oc = () => {
|
|
1117
|
+
const e = k(), t = W(), n = C(), { data: s } = Ce();
|
|
1168
1118
|
return X({
|
|
1169
1119
|
mutationFn: async (r) => n(e, {
|
|
1170
|
-
action:
|
|
1120
|
+
action: E.TAKE_OFFLINE,
|
|
1171
1121
|
data: { id: r == null ? void 0 : r.id }
|
|
1172
1122
|
}),
|
|
1173
1123
|
onSuccess: (r, a) => {
|
|
1174
1124
|
a && (a != null && a.primaryPage) ? t.invalidateQueries({
|
|
1175
|
-
queryKey: [
|
|
1125
|
+
queryKey: [E.GET_LANGUAGE_PAGES, a == null ? void 0 : a.primaryPage]
|
|
1176
1126
|
}) : t.invalidateQueries({
|
|
1177
|
-
queryKey: [
|
|
1127
|
+
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1178
1128
|
});
|
|
1179
|
-
const i =
|
|
1129
|
+
const i = se(s, { key: a.pageType });
|
|
1180
1130
|
R.success(
|
|
1181
|
-
i != null && i.hasSlug ?
|
|
1131
|
+
i != null && i.hasSlug ? "Page unpublished successfully." : "New " + i.name + " added successfully."
|
|
1182
1132
|
);
|
|
1183
1133
|
},
|
|
1184
1134
|
onError: (r, a) => {
|
|
1185
|
-
const i =
|
|
1135
|
+
const i = se(s, { key: a.pageType });
|
|
1186
1136
|
R.error(`Failed to take offline ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1187
1137
|
description: r.message
|
|
1188
1138
|
});
|
|
1189
1139
|
}
|
|
1190
1140
|
});
|
|
1191
1141
|
}, Cs = () => {
|
|
1192
|
-
const e =
|
|
1142
|
+
const e = k(), t = C(), n = W(), { data: s } = ie(), { savePageAsync: r } = Ge();
|
|
1193
1143
|
return X({
|
|
1194
1144
|
mutationFn: async ({ ids: a }) => (await r(), t(e, {
|
|
1195
|
-
action:
|
|
1145
|
+
action: E.PUBLISH_CHANGES,
|
|
1196
1146
|
data: { ids: a }
|
|
1197
1147
|
})),
|
|
1198
1148
|
onSuccess: () => {
|
|
1199
1149
|
n.invalidateQueries({
|
|
1200
|
-
queryKey: [
|
|
1150
|
+
queryKey: [E.GET_CHANGES]
|
|
1201
1151
|
}), n.invalidateQueries({
|
|
1202
|
-
queryKey: [
|
|
1152
|
+
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1203
1153
|
}), n.invalidateQueries({
|
|
1204
|
-
queryKey: [
|
|
1154
|
+
queryKey: [E.GET_LANGUAGE_PAGES, s == null ? void 0 : s.id]
|
|
1205
1155
|
});
|
|
1206
1156
|
},
|
|
1207
1157
|
onError: (a) => {
|
|
1208
1158
|
console.log("##", a), R.error("Failed to publish pages.");
|
|
1209
1159
|
}
|
|
1210
1160
|
});
|
|
1211
|
-
},
|
|
1212
|
-
const e =
|
|
1161
|
+
}, Dc = () => {
|
|
1162
|
+
const e = k(), t = C(), n = W();
|
|
1213
1163
|
return X({
|
|
1214
1164
|
mutationFn: async (s) => {
|
|
1215
1165
|
var r;
|
|
1216
1166
|
return t(e, {
|
|
1217
|
-
action:
|
|
1167
|
+
action: E.MARK_AS_TEMPLATE,
|
|
1218
1168
|
data: {
|
|
1219
1169
|
id: (r = s.page) == null ? void 0 : r.id,
|
|
1220
1170
|
name: s.name,
|
|
@@ -1226,23 +1176,23 @@ const rn = ({
|
|
|
1226
1176
|
},
|
|
1227
1177
|
onSuccess: () => {
|
|
1228
1178
|
n.invalidateQueries({
|
|
1229
|
-
queryKey: [
|
|
1179
|
+
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1230
1180
|
}), R.success("Page marked as template successfully.");
|
|
1231
1181
|
},
|
|
1232
1182
|
onError: () => {
|
|
1233
1183
|
R.error("Failed to mark page as template.");
|
|
1234
1184
|
}
|
|
1235
1185
|
});
|
|
1236
|
-
},
|
|
1237
|
-
const e =
|
|
1186
|
+
}, Gc = () => {
|
|
1187
|
+
const e = k(), t = C(), n = W();
|
|
1238
1188
|
return X({
|
|
1239
1189
|
mutationFn: async (s) => t(e, {
|
|
1240
|
-
action:
|
|
1190
|
+
action: E.UNMARK_AS_TEMPLATE,
|
|
1241
1191
|
data: { id: s == null ? void 0 : s.id }
|
|
1242
1192
|
}),
|
|
1243
1193
|
onSuccess: () => {
|
|
1244
1194
|
n.invalidateQueries({
|
|
1245
|
-
queryKey: [
|
|
1195
|
+
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1246
1196
|
}), R.success("Page unmarked as template successfully.");
|
|
1247
1197
|
},
|
|
1248
1198
|
onError: () => {
|
|
@@ -1250,33 +1200,33 @@ const rn = ({
|
|
|
1250
1200
|
}
|
|
1251
1201
|
});
|
|
1252
1202
|
}, xc = () => {
|
|
1253
|
-
const e =
|
|
1203
|
+
const e = k(), t = C(), n = W();
|
|
1254
1204
|
return X({
|
|
1255
1205
|
mutationFn: async ({ id: s, slug: r }) => t(e, {
|
|
1256
|
-
action:
|
|
1206
|
+
action: E.CHANGE_SLUG,
|
|
1257
1207
|
data: { id: s, slug: r }
|
|
1258
1208
|
}),
|
|
1259
1209
|
onSuccess: (s, { primaryPage: r }) => {
|
|
1260
|
-
R.success(
|
|
1261
|
-
queryKey: [
|
|
1210
|
+
R.success("Slug changed successfully."), r ? n.invalidateQueries({
|
|
1211
|
+
queryKey: [E.GET_LANGUAGE_PAGES, r]
|
|
1262
1212
|
}) : n.invalidateQueries({
|
|
1263
|
-
queryKey: [
|
|
1213
|
+
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1264
1214
|
});
|
|
1265
1215
|
},
|
|
1266
1216
|
onError: () => {
|
|
1267
1217
|
R.error("Failed to change slug");
|
|
1268
1218
|
}
|
|
1269
1219
|
});
|
|
1270
|
-
}, Ci = K(() => import("./publish-pages-content-
|
|
1220
|
+
}, Ci = K(() => import("./publish-pages-content-BF5yMo_L.js"));
|
|
1271
1221
|
function Ni({
|
|
1272
1222
|
showModal: e = !1,
|
|
1273
1223
|
onClose: t = () => console.log("Cancelled")
|
|
1274
1224
|
}) {
|
|
1275
1225
|
const { mutate: n, isPending: s } = Cs();
|
|
1276
|
-
return /* @__PURE__ */ c(
|
|
1277
|
-
} : t, children: e && /* @__PURE__ */ c(
|
|
1226
|
+
return /* @__PURE__ */ c(As, { open: e, onOpenChange: s ? () => {
|
|
1227
|
+
} : t, children: e && /* @__PURE__ */ c(H, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(Ci, { onClose: t, isPending: s, publishPage: n }) }) });
|
|
1278
1228
|
}
|
|
1279
|
-
const
|
|
1229
|
+
const ue = {
|
|
1280
1230
|
...Kr,
|
|
1281
1231
|
//pages
|
|
1282
1232
|
ADD_PAGE: "add_page",
|
|
@@ -1318,7 +1268,7 @@ const de = {
|
|
|
1318
1268
|
spread: 120,
|
|
1319
1269
|
origin: { y: 0.6 },
|
|
1320
1270
|
angle: 90
|
|
1321
|
-
},
|
|
1271
|
+
}, ki = {
|
|
1322
1272
|
TOP_RIGHT: {
|
|
1323
1273
|
angle: 225,
|
|
1324
1274
|
origin: { x: 0.9, y: 0 }
|
|
@@ -1327,224 +1277,224 @@ const de = {
|
|
|
1327
1277
|
angle: 100,
|
|
1328
1278
|
origin: { x: 0.9, y: 0.9 }
|
|
1329
1279
|
}
|
|
1330
|
-
},
|
|
1280
|
+
}, Oi = async () => {
|
|
1331
1281
|
const { default: e } = await import("./confetti.module-DCmCkDyV.js");
|
|
1332
1282
|
return e;
|
|
1333
1283
|
}, an = (e) => {
|
|
1334
|
-
let t =
|
|
1284
|
+
let t = ki[e];
|
|
1335
1285
|
t || (t = {});
|
|
1336
1286
|
const n = { ...Li, ...t };
|
|
1337
|
-
|
|
1287
|
+
Oi().then((s) => s(n));
|
|
1338
1288
|
};
|
|
1339
|
-
function
|
|
1289
|
+
function Dn({
|
|
1340
1290
|
children: e,
|
|
1341
1291
|
content: t,
|
|
1342
1292
|
side: n = "bottom",
|
|
1343
1293
|
delayDuration: s = 700,
|
|
1344
1294
|
showTooltip: r = !0
|
|
1345
1295
|
}) {
|
|
1346
|
-
return r ? /* @__PURE__ */ c(
|
|
1347
|
-
/* @__PURE__ */ c(
|
|
1296
|
+
return r ? /* @__PURE__ */ c(ys, { children: /* @__PURE__ */ m(zt, { delayDuration: s, children: [
|
|
1297
|
+
/* @__PURE__ */ c(Wt, { asChild: !0, children: e }),
|
|
1348
1298
|
/* @__PURE__ */ c(Yt, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
|
|
1349
1299
|
] }) }) : e;
|
|
1350
1300
|
}
|
|
1351
|
-
const
|
|
1352
|
-
const {
|
|
1301
|
+
const Di = K(() => import("./unpublish-page-Dr4qbwUx.js")), Gi = K(() => import("./translation-warning-modal-DalBhNQy.js")), xi = () => {
|
|
1302
|
+
const { t: e } = ve(), { selectedLang: t, fallbackLang: n } = Te(), s = re("getPreviewUrl", async (h) => h), [r, a] = q(""), { data: i } = ie(), { data: o } = xe(), { data: l } = Ce(), f = j(
|
|
1353
1303
|
() => {
|
|
1354
|
-
var
|
|
1355
|
-
return (
|
|
1304
|
+
var h;
|
|
1305
|
+
return (h = o == null ? void 0 : o.find((g) => (g == null ? void 0 : g.lang) === t)) == null ? void 0 : h.slug;
|
|
1356
1306
|
},
|
|
1357
|
-
[
|
|
1358
|
-
), d = Q((
|
|
1359
|
-
var
|
|
1360
|
-
return (
|
|
1361
|
-
}, [
|
|
1362
|
-
return
|
|
1307
|
+
[t, o]
|
|
1308
|
+
), d = Q((h) => {
|
|
1309
|
+
var g;
|
|
1310
|
+
return (g = se(l, { key: h })) == null ? void 0 : g.hasSlug;
|
|
1311
|
+
}, [l]), u = t === n ? "" : t;
|
|
1312
|
+
return ne(() => {
|
|
1363
1313
|
(async () => {
|
|
1364
|
-
if (typeof
|
|
1365
|
-
const
|
|
1366
|
-
|
|
1314
|
+
if (typeof s == "function") {
|
|
1315
|
+
const h = !d(i == null ? void 0 : i.pageType), g = await s(
|
|
1316
|
+
h ? `${u !== "" ? u + "/" : ""}${i == null ? void 0 : i.id}` : f || ""
|
|
1367
1317
|
);
|
|
1368
|
-
|
|
1318
|
+
a(g);
|
|
1369
1319
|
} else
|
|
1370
|
-
|
|
1320
|
+
a("");
|
|
1371
1321
|
})();
|
|
1372
|
-
}, [
|
|
1322
|
+
}, [s, f, i == null ? void 0 : i.pageType, d, i == null ? void 0 : i.id, u]), /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ c(Dn, { 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(Ca, { className: "h-4 w-4" }) }) }) }) });
|
|
1373
1323
|
}, Ri = () => {
|
|
1374
|
-
const
|
|
1375
|
-
return /* @__PURE__ */
|
|
1376
|
-
/* @__PURE__ */ c(
|
|
1377
|
-
|
|
1324
|
+
const { t: e } = ve(), [t, n] = Vr();
|
|
1325
|
+
return /* @__PURE__ */ m(ge, { children: [
|
|
1326
|
+
/* @__PURE__ */ c(Dn, { content: e("Theme"), delayDuration: 0, children: /* @__PURE__ */ c(
|
|
1327
|
+
M,
|
|
1378
1328
|
{
|
|
1379
|
-
variant:
|
|
1329
|
+
variant: t === "theme" ? "outline" : "ghost",
|
|
1380
1330
|
size: "icon",
|
|
1381
1331
|
className: "gap-2",
|
|
1382
|
-
onClick: () => t
|
|
1332
|
+
onClick: () => n(t === "theme" ? "block" : "theme"),
|
|
1383
1333
|
children: /* @__PURE__ */ c(Na, { className: "h-4 w-4" })
|
|
1384
1334
|
}
|
|
1385
1335
|
) }),
|
|
1386
1336
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1387
1337
|
] });
|
|
1388
1338
|
}, Ui = () => {
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1391
|
-
const d = (
|
|
1392
|
-
|
|
1339
|
+
const { t: e } = ve(), [t, n] = q(!1), { isLocked: s } = Ie(), { savePageAsync: r, saveState: a } = Ge();
|
|
1340
|
+
ne(() => {
|
|
1341
|
+
const d = (u) => {
|
|
1342
|
+
a === "UNSAVED" && (u.preventDefault(), u.returnValue = !1);
|
|
1393
1343
|
};
|
|
1394
|
-
return
|
|
1344
|
+
return a === "UNSAVED" && window.addEventListener("beforeunload", d), () => {
|
|
1395
1345
|
window.removeEventListener("beforeunload", d);
|
|
1396
1346
|
};
|
|
1397
|
-
}, [
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1400
|
-
}, [
|
|
1401
|
-
switch (
|
|
1347
|
+
}, [a]);
|
|
1348
|
+
const i = Q(async () => {
|
|
1349
|
+
t || (n(!0), await r(), n(!1));
|
|
1350
|
+
}, [r, t]), { buttonIcon: o, buttonClass: l, tooltipContent: f } = j(() => {
|
|
1351
|
+
switch (a) {
|
|
1402
1352
|
case "UNSAVED":
|
|
1403
1353
|
return {
|
|
1404
|
-
tooltipContent:
|
|
1405
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1354
|
+
tooltipContent: e("Save draft"),
|
|
1355
|
+
buttonIcon: /* @__PURE__ */ c(ka, { className: "h-4 w-4" }),
|
|
1406
1356
|
buttonClass: "gap-x-1"
|
|
1407
1357
|
};
|
|
1408
1358
|
case "SAVING":
|
|
1409
1359
|
return {
|
|
1410
|
-
tooltipContent:
|
|
1360
|
+
tooltipContent: e("Saving"),
|
|
1411
1361
|
buttonIcon: /* @__PURE__ */ c(Ft, { className: "h-4 w-4 animate-spin text-sky-700" }),
|
|
1412
1362
|
buttonClass: "gap-x-1"
|
|
1413
1363
|
};
|
|
1414
1364
|
case "SAVED":
|
|
1415
1365
|
return {
|
|
1416
|
-
tooltipContent:
|
|
1366
|
+
tooltipContent: e("Saved"),
|
|
1417
1367
|
buttonIcon: /* @__PURE__ */ c(La, { className: "h-4 w-4" }),
|
|
1418
1368
|
buttonClass: "text-green-500 gap-x-1"
|
|
1419
1369
|
};
|
|
1420
1370
|
}
|
|
1421
|
-
}, [
|
|
1422
|
-
return
|
|
1423
|
-
|
|
1371
|
+
}, [a, e]);
|
|
1372
|
+
return s ? null : /* @__PURE__ */ m(M, { size: "sm", variant: "ghost", onClick: i, className: `${l} w-24 max-w-24`, children: [
|
|
1373
|
+
o,
|
|
1424
1374
|
" ",
|
|
1425
|
-
|
|
1375
|
+
f
|
|
1426
1376
|
] });
|
|
1427
1377
|
}, Bi = () => {
|
|
1428
|
-
const {
|
|
1429
|
-
const
|
|
1378
|
+
const { t: e } = ve(), { selectedLang: t } = Te(), { data: n } = be(), { data: s } = xe(), [r, a] = q(!1), [i, o] = q(!1), [l, f] = q(null), { savePageAsync: d } = Ge(), [u, h] = q(!1), { data: g } = ie(), { mutate: A, isPending: T } = Cs(), { needTranslations: p } = Ge(), y = p(), { buttonText: _, buttonClassName: b, isPublished: O } = j(() => {
|
|
1379
|
+
const w = g && (g == null ? void 0 : g.online);
|
|
1430
1380
|
return {
|
|
1431
|
-
buttonClassName:
|
|
1432
|
-
isPublished:
|
|
1433
|
-
buttonText:
|
|
1381
|
+
buttonClassName: w ? "hover:bg-green-600 bg-green-500" : "",
|
|
1382
|
+
isPublished: w,
|
|
1383
|
+
buttonText: e(w ? "Published" : "Publish")
|
|
1434
1384
|
};
|
|
1435
|
-
}, [
|
|
1436
|
-
if (
|
|
1437
|
-
|
|
1385
|
+
}, [g, e]), B = async () => {
|
|
1386
|
+
if (y) {
|
|
1387
|
+
h(!0);
|
|
1438
1388
|
return;
|
|
1439
1389
|
}
|
|
1440
|
-
|
|
1441
|
-
},
|
|
1442
|
-
const
|
|
1443
|
-
|
|
1444
|
-
},
|
|
1445
|
-
|
|
1446
|
-
},
|
|
1447
|
-
|
|
1448
|
-
},
|
|
1449
|
-
return /* @__PURE__ */
|
|
1450
|
-
/* @__PURE__ */
|
|
1451
|
-
/* @__PURE__ */
|
|
1452
|
-
|
|
1390
|
+
N();
|
|
1391
|
+
}, N = () => {
|
|
1392
|
+
const w = [n == null ? void 0 : n.id, n == null ? void 0 : n.primaryPage];
|
|
1393
|
+
A({ ids: fs(w) }, { onSuccess: () => an("TOP_RIGHT") });
|
|
1394
|
+
}, pe = () => {
|
|
1395
|
+
h(!1), N();
|
|
1396
|
+
}, ye = async () => {
|
|
1397
|
+
h(!1), await d();
|
|
1398
|
+
}, U = j(() => Bt(s ?? [], "id"), [s]);
|
|
1399
|
+
return /* @__PURE__ */ m(ge, { children: [
|
|
1400
|
+
/* @__PURE__ */ m("div", { className: "flex", children: [
|
|
1401
|
+
/* @__PURE__ */ m(
|
|
1402
|
+
M,
|
|
1453
1403
|
{
|
|
1454
1404
|
size: "sm",
|
|
1455
|
-
onClick:
|
|
1456
|
-
disabled:
|
|
1457
|
-
className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${
|
|
1458
|
-
onMouseEnter: () =>
|
|
1459
|
-
onMouseLeave: () =>
|
|
1405
|
+
onClick: B,
|
|
1406
|
+
disabled: T || !(g != null && g.id),
|
|
1407
|
+
className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${b}`,
|
|
1408
|
+
onMouseEnter: () => o(!0),
|
|
1409
|
+
onMouseLeave: () => o(!1),
|
|
1460
1410
|
children: [
|
|
1461
1411
|
/* @__PURE__ */ c(
|
|
1462
1412
|
"span",
|
|
1463
1413
|
{
|
|
1464
|
-
className: `flex items-center transition-transform duration-300 ease-in-out ${
|
|
1465
|
-
children:
|
|
1414
|
+
className: `flex items-center transition-transform duration-300 ease-in-out ${i ? "-translate-y-10" : ""}`,
|
|
1415
|
+
children: O ? /* @__PURE__ */ c(Hn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Qn, { className: "h-4 w-4" })
|
|
1466
1416
|
}
|
|
1467
1417
|
),
|
|
1468
1418
|
/* @__PURE__ */ c(
|
|
1469
1419
|
"span",
|
|
1470
1420
|
{
|
|
1471
|
-
className: `absolute inset-0 left-3 flex items-center transition-transform duration-300 ease-in-out ${
|
|
1472
|
-
children:
|
|
1421
|
+
className: `absolute inset-0 left-3 flex items-center transition-transform duration-300 ease-in-out ${i ? "" : "translate-y-10"}`,
|
|
1422
|
+
children: O ? /* @__PURE__ */ c(Qn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Hn, { className: "h-4 w-4" })
|
|
1473
1423
|
}
|
|
1474
1424
|
),
|
|
1475
|
-
/* @__PURE__ */ c("span", { children:
|
|
1476
|
-
|
|
1425
|
+
/* @__PURE__ */ c("span", { children: _ }),
|
|
1426
|
+
t ? `(${Mn(t)})` : ""
|
|
1477
1427
|
]
|
|
1478
1428
|
}
|
|
1479
1429
|
),
|
|
1480
|
-
/* @__PURE__ */
|
|
1430
|
+
/* @__PURE__ */ m(wn, { children: [
|
|
1481
1431
|
/* @__PURE__ */ c(vn, { asChild: !0, children: /* @__PURE__ */ c(
|
|
1482
|
-
|
|
1432
|
+
M,
|
|
1483
1433
|
{
|
|
1484
1434
|
size: "sm",
|
|
1485
|
-
disabled:
|
|
1486
|
-
className: `rounded-l-none border-l border-white/50 px-2 text-white ${
|
|
1435
|
+
disabled: T || !(g != null && g.id),
|
|
1436
|
+
className: `rounded-l-none border-l border-white/50 px-2 text-white ${b}`,
|
|
1487
1437
|
children: /* @__PURE__ */ c(fn, { className: "h-4 w-4" })
|
|
1488
1438
|
}
|
|
1489
1439
|
) }),
|
|
1490
|
-
/* @__PURE__ */
|
|
1491
|
-
/* @__PURE__ */
|
|
1492
|
-
|
|
1440
|
+
/* @__PURE__ */ m(bn, { align: "end", className: "w-52", children: [
|
|
1441
|
+
/* @__PURE__ */ m(
|
|
1442
|
+
de,
|
|
1493
1443
|
{
|
|
1494
|
-
disabled:
|
|
1444
|
+
disabled: T,
|
|
1495
1445
|
className: "cursor-pointer text-xs",
|
|
1496
|
-
onClick: () =>
|
|
1446
|
+
onClick: () => A({ ids: U }, { onSuccess: () => an("TOP_RIGHT") }),
|
|
1497
1447
|
children: [
|
|
1498
|
-
|
|
1448
|
+
e("Publish"),
|
|
1499
1449
|
" with translation pages"
|
|
1500
1450
|
]
|
|
1501
1451
|
}
|
|
1502
1452
|
),
|
|
1503
|
-
!
|
|
1504
|
-
|
|
1453
|
+
!O && /* @__PURE__ */ m(
|
|
1454
|
+
de,
|
|
1505
1455
|
{
|
|
1506
|
-
disabled:
|
|
1456
|
+
disabled: T,
|
|
1507
1457
|
className: "cursor-pointer text-xs",
|
|
1508
|
-
onClick: () =>
|
|
1458
|
+
onClick: () => A({ ids: [g == null ? void 0 : g.id] }, { onSuccess: () => an("TOP_RIGHT") }),
|
|
1509
1459
|
children: [
|
|
1510
|
-
|
|
1460
|
+
e("Publish"),
|
|
1511
1461
|
" page"
|
|
1512
1462
|
]
|
|
1513
1463
|
}
|
|
1514
1464
|
),
|
|
1515
|
-
/* @__PURE__ */
|
|
1516
|
-
|
|
1465
|
+
/* @__PURE__ */ m(de, { onClick: () => a(!0), className: "cursor-pointer text-xs", children: [
|
|
1466
|
+
e("Open"),
|
|
1517
1467
|
" publish menu"
|
|
1518
1468
|
] }),
|
|
1519
|
-
|
|
1520
|
-
|
|
1469
|
+
O && /* @__PURE__ */ m(de, { onClick: () => f(n), className: "cursor-pointer text-xs", children: [
|
|
1470
|
+
e("Unpublish"),
|
|
1521
1471
|
" page ",
|
|
1522
|
-
|
|
1472
|
+
t ? `(${Mn(t)})` : ""
|
|
1523
1473
|
] })
|
|
1524
1474
|
] })
|
|
1525
1475
|
] })
|
|
1526
1476
|
] }),
|
|
1527
|
-
/* @__PURE__ */ c(Ni, { showModal:
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1477
|
+
/* @__PURE__ */ c(Ni, { showModal: r, onClose: () => a(!1) }),
|
|
1478
|
+
l && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(Di, { page: l, onClose: () => f(null) }) }),
|
|
1479
|
+
u && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1480
|
+
Gi,
|
|
1531
1481
|
{
|
|
1532
|
-
isOpen:
|
|
1533
|
-
onClose:
|
|
1534
|
-
onContinue:
|
|
1535
|
-
isPending:
|
|
1482
|
+
isOpen: u,
|
|
1483
|
+
onClose: ye,
|
|
1484
|
+
onContinue: pe,
|
|
1485
|
+
isPending: T
|
|
1536
1486
|
}
|
|
1537
1487
|
) })
|
|
1538
1488
|
] });
|
|
1539
1489
|
};
|
|
1540
1490
|
function Mi() {
|
|
1541
|
-
const { isLocked: e } = Ie(), [t] =
|
|
1542
|
-
return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */
|
|
1491
|
+
const { isLocked: e } = Ie(), [t] = oe(), n = t.get("lang"), s = Ps(n);
|
|
1492
|
+
return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
|
|
1543
1493
|
/* @__PURE__ */ c(wi, {}),
|
|
1544
|
-
/* @__PURE__ */ c(rn, { permission:
|
|
1494
|
+
/* @__PURE__ */ c(rn, { permission: ue.EDIT_THEME, children: /* @__PURE__ */ c(Ri, {}) }),
|
|
1545
1495
|
/* @__PURE__ */ c(xi, {}),
|
|
1546
|
-
/* @__PURE__ */ c(rn, { permission:
|
|
1547
|
-
/* @__PURE__ */ c(rn, { permission:
|
|
1496
|
+
/* @__PURE__ */ c(rn, { permission: ue.SAVE_PAGE, children: /* @__PURE__ */ c(Ui, {}) }),
|
|
1497
|
+
/* @__PURE__ */ c(rn, { permission: ue.PUBLISH_PAGE, children: /* @__PURE__ */ c(Bi, {}) })
|
|
1548
1498
|
] });
|
|
1549
1499
|
}
|
|
1550
1500
|
const Fi = ({
|
|
@@ -1558,117 +1508,117 @@ const Fi = ({
|
|
|
1558
1508
|
children: o,
|
|
1559
1509
|
isLanguagePage: l
|
|
1560
1510
|
}) => {
|
|
1561
|
-
const { hasPermission: d } =
|
|
1562
|
-
return !d(
|
|
1563
|
-
/* @__PURE__ */ c(vn, { asChild: !0, onClick: (
|
|
1564
|
-
/* @__PURE__ */
|
|
1565
|
-
d(
|
|
1566
|
-
|
|
1511
|
+
const { t: f } = ve(), { hasPermission: d } = ms(), { data: u } = Ce(), h = j(() => se(u, { key: e.pageType }), [u, e.pageType]), g = j(() => !!e.isTemplate, [e.isTemplate]), A = j(() => !!(h != null && h.hasSlug), [h == null ? void 0 : h.hasSlug]);
|
|
1512
|
+
return !d(ue.EDIT_PAGE) && !d(ue.DELETE_PAGE) && !d(ue.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ m(wn, { children: [
|
|
1513
|
+
/* @__PURE__ */ c(vn, { asChild: !0, onClick: (p) => p.stopPropagation(), children: o }),
|
|
1514
|
+
/* @__PURE__ */ m(bn, { align: "center", className: "text-sm", children: [
|
|
1515
|
+
d(ue.ADD_PAGE) && !l && /* @__PURE__ */ m(
|
|
1516
|
+
de,
|
|
1567
1517
|
{
|
|
1568
1518
|
className: "flex cursor-pointer items-center gap-2",
|
|
1569
|
-
onClick: (
|
|
1570
|
-
|
|
1519
|
+
onClick: (p) => {
|
|
1520
|
+
p.stopPropagation(), t(e);
|
|
1571
1521
|
},
|
|
1572
1522
|
children: [
|
|
1573
|
-
/* @__PURE__ */ c(
|
|
1523
|
+
/* @__PURE__ */ c(Oa, { className: "size-3" }),
|
|
1574
1524
|
"Duplicate page"
|
|
1575
1525
|
]
|
|
1576
1526
|
}
|
|
1577
1527
|
),
|
|
1578
|
-
d(
|
|
1579
|
-
|
|
1528
|
+
d(ue.EDIT_PAGE) && /* @__PURE__ */ m(
|
|
1529
|
+
de,
|
|
1580
1530
|
{
|
|
1581
1531
|
className: "flex cursor-pointer items-center gap-2",
|
|
1582
|
-
onClick: (
|
|
1583
|
-
|
|
1532
|
+
onClick: (p) => {
|
|
1533
|
+
p.stopPropagation(), n({
|
|
1584
1534
|
...e,
|
|
1585
|
-
global: !(
|
|
1535
|
+
global: !(h != null && h.hasSlug)
|
|
1586
1536
|
});
|
|
1587
1537
|
},
|
|
1588
1538
|
children: [
|
|
1589
|
-
/* @__PURE__ */ c(
|
|
1539
|
+
/* @__PURE__ */ c(Da, { className: "size-3" }),
|
|
1590
1540
|
"Edit"
|
|
1591
1541
|
]
|
|
1592
1542
|
}
|
|
1593
1543
|
),
|
|
1594
|
-
(e == null ? void 0 : e.online) && d(
|
|
1595
|
-
|
|
1544
|
+
(e == null ? void 0 : e.online) && d(ue.UNPUBLISH_PAGE) && /* @__PURE__ */ m(
|
|
1545
|
+
de,
|
|
1596
1546
|
{
|
|
1597
1547
|
className: "flex cursor-pointer items-center gap-2",
|
|
1598
|
-
onClick: (
|
|
1599
|
-
|
|
1548
|
+
onClick: (p) => {
|
|
1549
|
+
p.stopPropagation(), s(e);
|
|
1600
1550
|
},
|
|
1601
1551
|
children: [
|
|
1602
|
-
/* @__PURE__ */ c(
|
|
1603
|
-
|
|
1552
|
+
/* @__PURE__ */ c(Ga, { className: "size-3" }),
|
|
1553
|
+
f("Unpublish")
|
|
1604
1554
|
]
|
|
1605
1555
|
}
|
|
1606
1556
|
),
|
|
1607
|
-
d(
|
|
1608
|
-
|
|
1557
|
+
d(ue.DELETE_PAGE) && /* @__PURE__ */ m(
|
|
1558
|
+
de,
|
|
1609
1559
|
{
|
|
1610
1560
|
className: "flex cursor-pointer items-center gap-2",
|
|
1611
|
-
onClick: (
|
|
1612
|
-
|
|
1561
|
+
onClick: (p) => {
|
|
1562
|
+
p.stopPropagation(), r(e);
|
|
1613
1563
|
},
|
|
1614
1564
|
children: [
|
|
1615
1565
|
/* @__PURE__ */ c(xa, { className: "size-3" }),
|
|
1616
|
-
|
|
1566
|
+
f("Delete")
|
|
1617
1567
|
]
|
|
1618
1568
|
}
|
|
1619
1569
|
),
|
|
1620
|
-
d(
|
|
1621
|
-
|
|
1570
|
+
d(ue.MARK_AS_TEMPLATE) && A && !l && /* @__PURE__ */ c(ge, { children: g ? /* @__PURE__ */ m(
|
|
1571
|
+
de,
|
|
1622
1572
|
{
|
|
1623
1573
|
className: "flex cursor-pointer items-center gap-2",
|
|
1624
|
-
onClick: (
|
|
1625
|
-
|
|
1574
|
+
onClick: (p) => {
|
|
1575
|
+
p.stopPropagation(), i(e);
|
|
1626
1576
|
},
|
|
1627
1577
|
children: [
|
|
1628
1578
|
/* @__PURE__ */ c($n, { className: "size-3" }),
|
|
1629
|
-
|
|
1579
|
+
f("Unmark as template")
|
|
1630
1580
|
]
|
|
1631
1581
|
}
|
|
1632
|
-
) : /* @__PURE__ */
|
|
1633
|
-
|
|
1582
|
+
) : /* @__PURE__ */ m(
|
|
1583
|
+
de,
|
|
1634
1584
|
{
|
|
1635
1585
|
className: "flex cursor-pointer items-center gap-2",
|
|
1636
|
-
onClick: (
|
|
1637
|
-
|
|
1586
|
+
onClick: (p) => {
|
|
1587
|
+
p.stopPropagation(), a(e);
|
|
1638
1588
|
},
|
|
1639
1589
|
children: [
|
|
1640
1590
|
/* @__PURE__ */ c($n, { className: "size-3" }),
|
|
1641
|
-
|
|
1591
|
+
f("Mark as template")
|
|
1642
1592
|
]
|
|
1643
1593
|
}
|
|
1644
1594
|
) })
|
|
1645
1595
|
] })
|
|
1646
1596
|
] });
|
|
1647
|
-
}, qi = K(() => import("./add-new-page-
|
|
1648
|
-
const [e, t] = q(null), [n, s] = q(null), [r, a] = q(null), [i, o] = q(null), [l,
|
|
1597
|
+
}, qi = K(() => import("./add-new-page-DYuuentN.js")), Ki = K(() => import("./delete-page-1dSWwUBg.js")), Vi = K(() => import("./duplicate-page-fUuBTAs7.js")), Hi = K(() => import("./mark-as-template-CwsW86Zv.js")), Qi = K(() => import("./unmark-as-template-Cho9B4RN.js")), $i = K(() => import("./unpublish-page-Dr4qbwUx.js")), ji = () => {
|
|
1598
|
+
const [e, t] = q(null), [n, s] = q(null), [r, a] = q(null), [i, o] = q(null), [l, f] = q(null), [d, u] = q(null), { data: h, isFetching: g } = be(), { selectedLang: A, fallbackLang: T } = Te(), { data: p } = xe(), y = p == null ? void 0 : p.find((N) => N.lang === A), { isLocked: _ } = Ie(), b = !(h != null && h.slug), [, O] = te(kn);
|
|
1649
1599
|
if (!h) return null;
|
|
1650
|
-
const
|
|
1651
|
-
A.length > 0 && A !==
|
|
1600
|
+
const B = (N) => {
|
|
1601
|
+
A.length > 0 && A !== T ? O({
|
|
1652
1602
|
edit: !0,
|
|
1653
|
-
id:
|
|
1654
|
-
primaryPage:
|
|
1655
|
-
}) : u(
|
|
1603
|
+
id: N == null ? void 0 : N.id,
|
|
1604
|
+
primaryPage: N == null ? void 0 : N.primaryPage
|
|
1605
|
+
}) : u(N);
|
|
1656
1606
|
};
|
|
1657
|
-
return /* @__PURE__ */
|
|
1658
|
-
/* @__PURE__ */
|
|
1607
|
+
return /* @__PURE__ */ m(ge, { children: [
|
|
1608
|
+
/* @__PURE__ */ m("div", { className: "flex items-center justify-between rounded px-[2px] transition-colors duration-200", children: [
|
|
1659
1609
|
/* @__PURE__ */ c(Is, { children: /* @__PURE__ */ c(
|
|
1660
|
-
|
|
1610
|
+
M,
|
|
1661
1611
|
{
|
|
1662
1612
|
className: "flex h-7 max-w-[200px] cursor-pointer items-center truncate rounded px-1 text-xs font-medium",
|
|
1663
1613
|
variant: "ghost",
|
|
1664
|
-
children:
|
|
1665
|
-
|
|
1666
|
-
|
|
1614
|
+
children: g ? /* @__PURE__ */ c(Ft, { className: "h-4 w-4 animate-spin text-slate-400" }) : /* @__PURE__ */ m("span", { className: "flex w-full cursor-pointer items-end overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-xs font-medium", children: [
|
|
1615
|
+
b ? /* @__PURE__ */ c(Ra, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ c(Ua, { className: "mr-1 h-4 w-4" }),
|
|
1616
|
+
V(y || h, "name") ?? ""
|
|
1667
1617
|
] })
|
|
1668
1618
|
}
|
|
1669
1619
|
) }),
|
|
1670
|
-
|
|
1671
|
-
|
|
1620
|
+
_ ? /* @__PURE__ */ c(
|
|
1621
|
+
M,
|
|
1672
1622
|
{
|
|
1673
1623
|
variant: "ghost",
|
|
1674
1624
|
size: "icon",
|
|
@@ -1679,36 +1629,36 @@ const Fi = ({
|
|
|
1679
1629
|
Fi,
|
|
1680
1630
|
{
|
|
1681
1631
|
page: h,
|
|
1682
|
-
setDuplicatePage: (
|
|
1683
|
-
setAddEditPage: (
|
|
1684
|
-
setUnpublishPage: (
|
|
1685
|
-
setDeletePage: (
|
|
1686
|
-
setMarkAsTemplate: (
|
|
1687
|
-
setUnmarkAsTemplate: (
|
|
1688
|
-
isLanguagePage: A.length > 0 && A !==
|
|
1689
|
-
children: /* @__PURE__ */ c(
|
|
1632
|
+
setDuplicatePage: (N) => f(N),
|
|
1633
|
+
setAddEditPage: (N) => B(N),
|
|
1634
|
+
setUnpublishPage: (N) => s(N),
|
|
1635
|
+
setDeletePage: (N) => t(N),
|
|
1636
|
+
setMarkAsTemplate: (N) => a(N),
|
|
1637
|
+
setUnmarkAsTemplate: (N) => o(N),
|
|
1638
|
+
isLanguagePage: A.length > 0 && A !== T,
|
|
1639
|
+
children: /* @__PURE__ */ c(M, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ c(jn, { className: "h-4 w-4" }) })
|
|
1690
1640
|
}
|
|
1691
1641
|
)
|
|
1692
1642
|
] }),
|
|
1693
|
-
|
|
1643
|
+
d && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1694
1644
|
qi,
|
|
1695
1645
|
{
|
|
1696
1646
|
closePanel: () => u(null),
|
|
1697
1647
|
editPage: () => {
|
|
1698
1648
|
},
|
|
1699
|
-
addEditPage:
|
|
1649
|
+
addEditPage: d,
|
|
1700
1650
|
setAddEditPage: u
|
|
1701
1651
|
}
|
|
1702
1652
|
) }),
|
|
1703
|
-
e && /* @__PURE__ */ c(
|
|
1704
|
-
n && /* @__PURE__ */ c(
|
|
1705
|
-
r && /* @__PURE__ */ c(
|
|
1706
|
-
i && /* @__PURE__ */ c(
|
|
1707
|
-
l && /* @__PURE__ */ c(
|
|
1708
|
-
|
|
1653
|
+
e && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(Ki, { page: e, onClose: () => t(null) }) }),
|
|
1654
|
+
n && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c($i, { page: n, onClose: () => s(null) }) }),
|
|
1655
|
+
r && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(Hi, { page: r, onClose: () => a(null) }) }),
|
|
1656
|
+
i && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(Qi, { page: i, onClose: () => o(null) }) }),
|
|
1657
|
+
l && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1658
|
+
Vi,
|
|
1709
1659
|
{
|
|
1710
1660
|
page: l,
|
|
1711
|
-
onClose: () =>
|
|
1661
|
+
onClose: () => f(null),
|
|
1712
1662
|
closePanel: () => u(null)
|
|
1713
1663
|
}
|
|
1714
1664
|
) })
|
|
@@ -1722,84 +1672,84 @@ const Fi = ({
|
|
|
1722
1672
|
),
|
|
1723
1673
|
children: e
|
|
1724
1674
|
}
|
|
1725
|
-
),
|
|
1675
|
+
), zi = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(Ns, { 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: [
|
|
1726
1676
|
/* @__PURE__ */ c("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
|
|
1727
1677
|
/* @__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" })
|
|
1728
|
-
] }) }),
|
|
1678
|
+
] }) }), Wi = K(() => import("./dynamic-page-selector-X2qgdiNQ.js")), Yi = () => {
|
|
1729
1679
|
const { dynamicPage: e, allLangPages: t, isFetching: n } = ni(), s = t.length > 0;
|
|
1730
|
-
return n ? null : /* @__PURE__ */
|
|
1731
|
-
!e && /* @__PURE__ */ c(
|
|
1732
|
-
/* @__PURE__ */ c(
|
|
1680
|
+
return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
1681
|
+
!e && /* @__PURE__ */ c(zi, { hasDynamicPage: s }),
|
|
1682
|
+
/* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(Wi, {}) })
|
|
1733
1683
|
] });
|
|
1734
1684
|
}, Ji = () => {
|
|
1735
|
-
const { data: e, isFetching: t } = be(), { data: n, isFetching: s } =
|
|
1736
|
-
return /* @__PURE__ */
|
|
1685
|
+
const { data: e, isFetching: t } = be(), { data: n, isFetching: s } = ie(), r = V(n, "dynamic", !1), a = Cn(), i = Hr("dynamic-page-selector"), o = e == null ? void 0 : e.slug, l = !o, f = ii(), d = t || s, h = (l ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
|
|
1686
|
+
return /* @__PURE__ */ m("div", { className: "relative flex items-center gap-x-1", children: [
|
|
1737
1687
|
/* @__PURE__ */ c(
|
|
1738
1688
|
"div",
|
|
1739
1689
|
{
|
|
1740
1690
|
className: Mt(
|
|
1741
1691
|
"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",
|
|
1742
|
-
|
|
1692
|
+
d && "max-w-0 overflow-hidden opacity-0"
|
|
1743
1693
|
),
|
|
1744
1694
|
children: /* @__PURE__ */ c(ji, {})
|
|
1745
1695
|
}
|
|
1746
1696
|
),
|
|
1747
|
-
/* @__PURE__ */
|
|
1697
|
+
/* @__PURE__ */ m(
|
|
1748
1698
|
"div",
|
|
1749
1699
|
{
|
|
1750
1700
|
className: Mt(
|
|
1751
1701
|
"flex h-8 w-auto max-w-[600px] items-center rounded-md border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800" + (l ? " pr-2" : ""),
|
|
1752
|
-
|
|
1702
|
+
d && "max-w-0 overflow-hidden opacity-0"
|
|
1753
1703
|
),
|
|
1754
1704
|
children: [
|
|
1755
1705
|
/* @__PURE__ */ c(Ti, {}),
|
|
1756
|
-
/* @__PURE__ */
|
|
1706
|
+
/* @__PURE__ */ m("div", { className: "flex w-full items-center overflow-hidden", children: [
|
|
1757
1707
|
/* @__PURE__ */ c(
|
|
1758
1708
|
"div",
|
|
1759
1709
|
{
|
|
1760
1710
|
className: `w-full max-w-[200px] overflow-hidden overflow-ellipsis whitespace-nowrap pl-1 text-xs ${l ? "italic text-gray-400" : "font-mono text-gray-500"}`,
|
|
1761
|
-
children: h === "/" ? /* @__PURE__ */
|
|
1711
|
+
children: h === "/" ? /* @__PURE__ */ m("span", { className: "text-gray-900", children: [
|
|
1762
1712
|
"/",
|
|
1763
1713
|
/* @__PURE__ */ c("span", { className: "text-[11px] font-light italic text-gray-400", children: "(Homepage)" })
|
|
1764
1714
|
] }) : h
|
|
1765
1715
|
}
|
|
1766
1716
|
),
|
|
1767
|
-
!l && /* @__PURE__ */ c("a", { href:
|
|
1717
|
+
!l && /* @__PURE__ */ c("a", { href: f, 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(Ba, { className: "h-4 w-4", strokeWidth: 1 }) }) })
|
|
1768
1718
|
] })
|
|
1769
1719
|
]
|
|
1770
1720
|
}
|
|
1771
1721
|
),
|
|
1772
1722
|
r && i && /* @__PURE__ */ c(Yi, {})
|
|
1773
1723
|
] });
|
|
1774
|
-
}, Xi = () => /* @__PURE__ */
|
|
1724
|
+
}, Xi = () => /* @__PURE__ */ m("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
|
|
1775
1725
|
/* @__PURE__ */ c(Si, {}),
|
|
1776
1726
|
/* @__PURE__ */ c(Ji, {}),
|
|
1777
1727
|
/* @__PURE__ */ c(Mi, {})
|
|
1778
1728
|
] }), Ls = () => {
|
|
1779
|
-
const e =
|
|
1780
|
-
queryKey: [
|
|
1729
|
+
const e = W(), { data: t } = ae({
|
|
1730
|
+
queryKey: [E.AI_CONTEXT],
|
|
1781
1731
|
initialData: "",
|
|
1782
1732
|
queryFn: () => "",
|
|
1783
1733
|
staleTime: 0
|
|
1784
1734
|
});
|
|
1785
1735
|
return { setAiContext: Q(
|
|
1786
1736
|
(s) => {
|
|
1787
|
-
e.setQueryData([
|
|
1737
|
+
e.setQueryData([E.AI_CONTEXT], s);
|
|
1788
1738
|
},
|
|
1789
1739
|
[e]
|
|
1790
1740
|
), aiContext: t };
|
|
1791
1741
|
}, Zi = () => {
|
|
1792
|
-
const e =
|
|
1742
|
+
const e = k(), { aiContext: t } = Ls(), n = C();
|
|
1793
1743
|
return Q(
|
|
1794
1744
|
async (s, r, a, i) => n(e, {
|
|
1795
|
-
action:
|
|
1745
|
+
action: E.ASK_AI,
|
|
1796
1746
|
data: { type: s, prompt: r, blocks: a, context: t, lang: i }
|
|
1797
1747
|
}),
|
|
1798
1748
|
[e, t, n]
|
|
1799
1749
|
);
|
|
1800
1750
|
}, eo = (e, t) => t.map((n) => {
|
|
1801
1751
|
if (jt(e, n._type)) {
|
|
1802
|
-
const s =
|
|
1752
|
+
const s = za(n._type);
|
|
1803
1753
|
return {
|
|
1804
1754
|
...s,
|
|
1805
1755
|
...Pn(n, [
|
|
@@ -1810,7 +1760,7 @@ const Fi = ({
|
|
|
1810
1760
|
"_parent",
|
|
1811
1761
|
"_bindings"
|
|
1812
1762
|
]),
|
|
1813
|
-
...Lr(n, (r, a) =>
|
|
1763
|
+
...Lr(n, (r, a) => kr(a, "_attrs")),
|
|
1814
1764
|
...n
|
|
1815
1765
|
};
|
|
1816
1766
|
}
|
|
@@ -1818,7 +1768,7 @@ const Fi = ({
|
|
|
1818
1768
|
}), to = (e) => {
|
|
1819
1769
|
const t = ja();
|
|
1820
1770
|
return j(() => {
|
|
1821
|
-
if (!e ||
|
|
1771
|
+
if (!e || he(e)) return { blocks: [] };
|
|
1822
1772
|
const n = hs(
|
|
1823
1773
|
e,
|
|
1824
1774
|
(s) => !Cr(s == null ? void 0 : s._type, "@chai/")
|
|
@@ -1826,29 +1776,29 @@ const Fi = ({
|
|
|
1826
1776
|
return { blocks: eo(t, n) };
|
|
1827
1777
|
}, [e, t]);
|
|
1828
1778
|
}, no = () => {
|
|
1829
|
-
const [e] =
|
|
1830
|
-
return
|
|
1831
|
-
queryKey: [
|
|
1779
|
+
const [e] = oe(), t = e.get("page"), n = k(), { setAiContext: s } = Ls(), [, r] = Nn(), [, a] = ai(), [, i] = Qr(), o = C();
|
|
1780
|
+
return ae({
|
|
1781
|
+
queryKey: [E.GET_DRAFT_PAGE, t],
|
|
1832
1782
|
staleTime: 1 / 0,
|
|
1833
1783
|
gcTime: 0,
|
|
1834
1784
|
queryFn: async () => {
|
|
1835
1785
|
i(!1);
|
|
1836
1786
|
const l = await o(n, {
|
|
1837
|
-
action:
|
|
1787
|
+
action: E.GET_DRAFT_PAGE,
|
|
1838
1788
|
data: { id: t, draft: !0 }
|
|
1839
|
-
}),
|
|
1840
|
-
return s(
|
|
1789
|
+
}), f = l.blocks ?? [], d = se(f, { _type: "@chai/ai-context" });
|
|
1790
|
+
return s(V(d, "_value", "") || ""), r((u) => ({ ...u, lastSaved: l.lastSaved })), a(V(l, "metadata", {})), setTimeout(() => i(!0), 500), f;
|
|
1841
1791
|
},
|
|
1842
1792
|
enabled: !!t
|
|
1843
1793
|
});
|
|
1844
1794
|
}, so = () => {
|
|
1845
|
-
const { data: e } =
|
|
1846
|
-
return
|
|
1847
|
-
queryKey: [
|
|
1795
|
+
const { data: e } = ie(), { data: t } = be(), n = k(), s = C(), r = On(), a = Cn();
|
|
1796
|
+
return ae({
|
|
1797
|
+
queryKey: [E.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
|
|
1848
1798
|
staleTime: 1 / 0,
|
|
1849
1799
|
gcTime: 0,
|
|
1850
1800
|
queryFn: async () => s(n, {
|
|
1851
|
-
action:
|
|
1801
|
+
action: E.GET_BUILDER_PAGE_DATA,
|
|
1852
1802
|
data: {
|
|
1853
1803
|
pageType: e == null ? void 0 : e.pageType,
|
|
1854
1804
|
lang: (t == null ? void 0 : t.lang) || r,
|
|
@@ -1872,16 +1822,16 @@ const Fi = ({
|
|
|
1872
1822
|
enabled: !!(e != null && e.pageType) && !!t.id
|
|
1873
1823
|
});
|
|
1874
1824
|
}, ro = () => {
|
|
1875
|
-
const e =
|
|
1825
|
+
const e = k(), t = W(), n = C();
|
|
1876
1826
|
return X({
|
|
1877
1827
|
mutationFn: async (s) => n(e, {
|
|
1878
|
-
action:
|
|
1828
|
+
action: E.UPDATE_WEBSITE_SETTINGS,
|
|
1879
1829
|
data: s
|
|
1880
1830
|
}),
|
|
1881
1831
|
onSuccess: (s, r) => {
|
|
1882
1832
|
var a;
|
|
1883
1833
|
t.invalidateQueries({
|
|
1884
|
-
queryKey: [
|
|
1834
|
+
queryKey: [E.GET_WEBSITE_DRAFT_SETTINGS]
|
|
1885
1835
|
}), (a = r == null ? void 0 : r.settings) != null && a.theme || R.success("Website settings updated successfully.");
|
|
1886
1836
|
},
|
|
1887
1837
|
onError: (s) => {
|
|
@@ -1891,12 +1841,12 @@ const Fi = ({
|
|
|
1891
1841
|
}
|
|
1892
1842
|
});
|
|
1893
1843
|
}, Rc = () => {
|
|
1894
|
-
const e =
|
|
1844
|
+
const e = k(), t = W(), n = C(), { selectedLang: s } = Te();
|
|
1895
1845
|
return X({
|
|
1896
|
-
mutationFn: async (r) => n(e, { action:
|
|
1846
|
+
mutationFn: async (r) => n(e, { action: E.ADD_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1897
1847
|
onSuccess: () => {
|
|
1898
1848
|
t.invalidateQueries({
|
|
1899
|
-
queryKey: [
|
|
1849
|
+
queryKey: [E.GET_GLOBAL_JSONLD_ITEMS]
|
|
1900
1850
|
}), R.success("Schema added successfully.");
|
|
1901
1851
|
},
|
|
1902
1852
|
onError: (r) => {
|
|
@@ -1906,12 +1856,12 @@ const Fi = ({
|
|
|
1906
1856
|
}
|
|
1907
1857
|
});
|
|
1908
1858
|
}, Uc = () => {
|
|
1909
|
-
const e =
|
|
1859
|
+
const e = k(), t = W(), n = C(), { selectedLang: s } = Te();
|
|
1910
1860
|
return X({
|
|
1911
|
-
mutationFn: async (r) => n(e, { action:
|
|
1861
|
+
mutationFn: async (r) => n(e, { action: E.UPDATE_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1912
1862
|
onSuccess: () => {
|
|
1913
1863
|
t.invalidateQueries({
|
|
1914
|
-
queryKey: [
|
|
1864
|
+
queryKey: [E.GET_GLOBAL_JSONLD_ITEMS]
|
|
1915
1865
|
}), R.success("Schema updated successfully.");
|
|
1916
1866
|
},
|
|
1917
1867
|
onError: (r) => {
|
|
@@ -1921,12 +1871,12 @@ const Fi = ({
|
|
|
1921
1871
|
}
|
|
1922
1872
|
});
|
|
1923
1873
|
}, Bc = () => {
|
|
1924
|
-
const e =
|
|
1874
|
+
const e = k(), t = W(), n = C();
|
|
1925
1875
|
return X({
|
|
1926
|
-
mutationFn: async (s) => n(e, { action:
|
|
1876
|
+
mutationFn: async (s) => n(e, { action: E.DELETE_GLOBAL_SCHEMA, data: { id: s } }),
|
|
1927
1877
|
onSuccess: () => {
|
|
1928
1878
|
t.invalidateQueries({
|
|
1929
|
-
queryKey: [
|
|
1879
|
+
queryKey: [E.GET_GLOBAL_JSONLD_ITEMS]
|
|
1930
1880
|
}), R.success("Schema deleted successfully.");
|
|
1931
1881
|
},
|
|
1932
1882
|
onError: (s) => {
|
|
@@ -1936,9 +1886,9 @@ const Fi = ({
|
|
|
1936
1886
|
}
|
|
1937
1887
|
});
|
|
1938
1888
|
}, Mc = () => {
|
|
1939
|
-
const e =
|
|
1889
|
+
const e = k(), t = C();
|
|
1940
1890
|
return X({
|
|
1941
|
-
mutationFn: async (n) => t(e, { action:
|
|
1891
|
+
mutationFn: async (n) => t(e, { action: E.TOGGLE_PAGE_GLOBAL_SCHEMA, data: n }),
|
|
1942
1892
|
onError: (n) => {
|
|
1943
1893
|
R.error("Failed to toggle schema", {
|
|
1944
1894
|
description: n.message
|
|
@@ -1946,9 +1896,9 @@ const Fi = ({
|
|
|
1946
1896
|
}
|
|
1947
1897
|
});
|
|
1948
1898
|
}, Fc = () => {
|
|
1949
|
-
const e =
|
|
1899
|
+
const e = k(), t = C();
|
|
1950
1900
|
return X({
|
|
1951
|
-
mutationFn: async (n) => t(e, { action:
|
|
1901
|
+
mutationFn: async (n) => t(e, { action: E.APPLY_SCHEMA_TO_ALL_PAGES, data: { schemaId: n } }),
|
|
1952
1902
|
onSuccess: (n) => {
|
|
1953
1903
|
R.success(`Schema applied to ${n.count} page(s)`);
|
|
1954
1904
|
},
|
|
@@ -1959,9 +1909,9 @@ const Fi = ({
|
|
|
1959
1909
|
}
|
|
1960
1910
|
});
|
|
1961
1911
|
}, qc = () => {
|
|
1962
|
-
const e =
|
|
1912
|
+
const e = k(), t = C();
|
|
1963
1913
|
return X({
|
|
1964
|
-
mutationFn: async (n) => t(e, { action:
|
|
1914
|
+
mutationFn: async (n) => t(e, { action: E.REMOVE_SCHEMA_FROM_ALL_PAGES, data: { schemaId: n } }),
|
|
1965
1915
|
onSuccess: (n) => {
|
|
1966
1916
|
R.success(`Schema removed from ${n.count} page(s)`);
|
|
1967
1917
|
},
|
|
@@ -1976,8 +1926,8 @@ const Fi = ({
|
|
|
1976
1926
|
const s = await t(n, {
|
|
1977
1927
|
action: "GET_LIBRARY_ITEM",
|
|
1978
1928
|
data: { id: e.id }
|
|
1979
|
-
}), r =
|
|
1980
|
-
return
|
|
1929
|
+
}), r = V(s, "html", ""), a = V(s, "blocks", []);
|
|
1930
|
+
return Or(a) ? a : jr(r);
|
|
1981
1931
|
},
|
|
1982
1932
|
async getUILibraryBlocks(e, t, n) {
|
|
1983
1933
|
try {
|
|
@@ -1992,8 +1942,8 @@ const Fi = ({
|
|
|
1992
1942
|
}
|
|
1993
1943
|
}
|
|
1994
1944
|
}, ao = () => {
|
|
1995
|
-
const e =
|
|
1996
|
-
return
|
|
1945
|
+
const e = k(), t = C();
|
|
1946
|
+
return ae({
|
|
1997
1947
|
queryKey: ["uiLibraries"],
|
|
1998
1948
|
staleTime: "static",
|
|
1999
1949
|
queryFn: async () => {
|
|
@@ -2011,18 +1961,18 @@ const Fi = ({
|
|
|
2011
1961
|
}
|
|
2012
1962
|
});
|
|
2013
1963
|
}, io = () => {
|
|
2014
|
-
const e = Ss(), t =
|
|
2015
|
-
return
|
|
2016
|
-
queryKey: [
|
|
1964
|
+
const e = Ss(), t = C(), { user: n } = It(), s = n == null ? void 0 : n.id;
|
|
1965
|
+
return ae({
|
|
1966
|
+
queryKey: [E.GET_ROLE_AND_PERMISSIONS, s],
|
|
2017
1967
|
queryFn: () => t(e, {
|
|
2018
|
-
action:
|
|
1968
|
+
action: E.GET_ROLE_AND_PERMISSIONS,
|
|
2019
1969
|
data: { userId: s }
|
|
2020
1970
|
}),
|
|
2021
1971
|
enabled: !!s,
|
|
2022
1972
|
staleTime: 1 / 0
|
|
2023
1973
|
});
|
|
2024
1974
|
}, oo = () => {
|
|
2025
|
-
const e =
|
|
1975
|
+
const e = k(), t = C(), [, n] = Nn();
|
|
2026
1976
|
return { onSave: async ({
|
|
2027
1977
|
page: r,
|
|
2028
1978
|
blocks: a,
|
|
@@ -2042,14 +1992,14 @@ const Fi = ({
|
|
|
2042
1992
|
}
|
|
2043
1993
|
} };
|
|
2044
1994
|
}, lo = () => {
|
|
2045
|
-
const { data: e } = bs(), t =
|
|
1995
|
+
const { data: e } = bs(), t = k(), n = C();
|
|
2046
1996
|
return {
|
|
2047
1997
|
getPartialBlocks: Q(async () => {
|
|
2048
1998
|
const s = {};
|
|
2049
1999
|
for (const r of e ?? [])
|
|
2050
|
-
|
|
2000
|
+
he(r == null ? void 0 : r.slug) && (s[r.id] = {
|
|
2051
2001
|
type: r.pageType,
|
|
2052
|
-
name:
|
|
2002
|
+
name: Dr(r.name ?? r.slug),
|
|
2053
2003
|
description: ""
|
|
2054
2004
|
});
|
|
2055
2005
|
return s;
|
|
@@ -2070,20 +2020,20 @@ const Fi = ({
|
|
|
2070
2020
|
[n, t]
|
|
2071
2021
|
)
|
|
2072
2022
|
};
|
|
2073
|
-
}, co = K(() => import("./lang-panel-
|
|
2023
|
+
}, co = K(() => import("./lang-panel-CaSKOJ8G.js")), uo = ({ isActive: e, show: t }) => {
|
|
2074
2024
|
const { data: n } = Re();
|
|
2075
|
-
return !jt(n, "languages") || !
|
|
2076
|
-
},
|
|
2077
|
-
id:
|
|
2025
|
+
return !jt(n, "languages") || !V(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(Ma, { className: "h-4 w-4" }) });
|
|
2026
|
+
}, ks = "lang", fo = {
|
|
2027
|
+
id: ks,
|
|
2078
2028
|
label: "Languages",
|
|
2079
2029
|
position: "top",
|
|
2080
2030
|
panel: co,
|
|
2081
2031
|
button: uo,
|
|
2082
2032
|
view: "modal",
|
|
2083
2033
|
width: 400
|
|
2084
|
-
}, ho = K(() => import("./seo-panel-
|
|
2085
|
-
const { data: n } =
|
|
2086
|
-
return !jt(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(
|
|
2034
|
+
}, ho = K(() => import("./seo-panel-sbYoo746.js")), Os = "seo", go = ({ isActive: e, show: t }) => {
|
|
2035
|
+
const { data: n } = ie(), s = bi(n == null ? void 0 : n.pageType);
|
|
2036
|
+
return !jt(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
|
|
2087
2037
|
"svg",
|
|
2088
2038
|
{
|
|
2089
2039
|
stroke: "currentColor",
|
|
@@ -2101,37 +2051,37 @@ const Fi = ({
|
|
|
2101
2051
|
]
|
|
2102
2052
|
}
|
|
2103
2053
|
) });
|
|
2104
|
-
},
|
|
2105
|
-
id:
|
|
2054
|
+
}, mo = {
|
|
2055
|
+
id: Os,
|
|
2106
2056
|
label: "SEO",
|
|
2107
2057
|
panel: ho,
|
|
2108
2058
|
button: go,
|
|
2109
2059
|
position: "top",
|
|
2110
2060
|
width: 600,
|
|
2111
2061
|
view: "modal"
|
|
2112
|
-
},
|
|
2113
|
-
const {
|
|
2114
|
-
return
|
|
2115
|
-
/* @__PURE__ */ c(ra, { asChild: !0, children: /* @__PURE__ */ c(
|
|
2116
|
-
/* @__PURE__ */
|
|
2117
|
-
/* @__PURE__ */ c("div", { className: "text-sm font-medium", children:
|
|
2118
|
-
/* @__PURE__ */ c("div", { className: "text-xs text-muted-foreground", children:
|
|
2119
|
-
/* @__PURE__ */
|
|
2120
|
-
/* @__PURE__ */ c(oa, { asChild: !0, children: /* @__PURE__ */ c(
|
|
2121
|
-
/* @__PURE__ */
|
|
2122
|
-
/* @__PURE__ */
|
|
2123
|
-
/* @__PURE__ */ c(ua, { children: "Are you sure you want to logout?" }),
|
|
2124
|
-
/* @__PURE__ */ c(da, { children: "You will be redirected to the login page." })
|
|
2062
|
+
}, Ds = "user-info", Eo = () => {
|
|
2063
|
+
const { t: e } = ve(), { user: t, logout: n } = It(), s = re("onLogout", ds);
|
|
2064
|
+
return t ? /* @__PURE__ */ m(sa, { children: [
|
|
2065
|
+
/* @__PURE__ */ c(ra, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ c(Fa, { className: "h-4 w-4" }) }) }),
|
|
2066
|
+
/* @__PURE__ */ m(aa, { className: "w-auto space-y-2 p-4", children: [
|
|
2067
|
+
/* @__PURE__ */ c("div", { className: "text-sm font-medium", children: t.name ?? t.email }),
|
|
2068
|
+
/* @__PURE__ */ c("div", { className: "text-xs text-muted-foreground", children: t.email }),
|
|
2069
|
+
/* @__PURE__ */ m(ia, { children: [
|
|
2070
|
+
/* @__PURE__ */ c(oa, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "outline", size: "sm", className: "w-full", children: e("Logout") }) }),
|
|
2071
|
+
/* @__PURE__ */ m(la, { children: [
|
|
2072
|
+
/* @__PURE__ */ m(ca, { children: [
|
|
2073
|
+
/* @__PURE__ */ c(ua, { children: e("Are you sure you want to logout?") }),
|
|
2074
|
+
/* @__PURE__ */ c(da, { children: e("You will be redirected to the login page.") })
|
|
2125
2075
|
] }),
|
|
2126
|
-
/* @__PURE__ */
|
|
2127
|
-
/* @__PURE__ */ c(ha, { children: "Cancel" }),
|
|
2076
|
+
/* @__PURE__ */ m(fa, { children: [
|
|
2077
|
+
/* @__PURE__ */ c(ha, { children: e("Cancel") }),
|
|
2128
2078
|
/* @__PURE__ */ c(
|
|
2129
2079
|
ga,
|
|
2130
2080
|
{
|
|
2131
2081
|
onClick: () => {
|
|
2132
|
-
|
|
2082
|
+
n(), Gr(s) && s();
|
|
2133
2083
|
},
|
|
2134
|
-
children: "Logout"
|
|
2084
|
+
children: e("Logout")
|
|
2135
2085
|
}
|
|
2136
2086
|
)
|
|
2137
2087
|
] })
|
|
@@ -2140,12 +2090,12 @@ const Fi = ({
|
|
|
2140
2090
|
] })
|
|
2141
2091
|
] }) : null;
|
|
2142
2092
|
}, po = {
|
|
2143
|
-
id:
|
|
2093
|
+
id: Ds,
|
|
2144
2094
|
label: "User Info",
|
|
2145
|
-
button:
|
|
2095
|
+
button: Eo,
|
|
2146
2096
|
position: "bottom"
|
|
2147
|
-
},
|
|
2148
|
-
en(
|
|
2097
|
+
}, yo = () => {
|
|
2098
|
+
en(Os, mo), en(ks, fo), en(Ds, po);
|
|
2149
2099
|
};
|
|
2150
2100
|
var P = {
|
|
2151
2101
|
context: void 0,
|
|
@@ -2166,26 +2116,26 @@ function Jn(e) {
|
|
|
2166
2116
|
function at(e) {
|
|
2167
2117
|
P.context = e;
|
|
2168
2118
|
}
|
|
2169
|
-
var
|
|
2170
|
-
equals:
|
|
2171
|
-
}, Us =
|
|
2119
|
+
var Gs = !1, Ao = (e, t) => e === t, qt = Symbol("solid-proxy"), xs = typeof Proxy == "function", Rs = Symbol("solid-track"), Kt = {
|
|
2120
|
+
equals: Ao
|
|
2121
|
+
}, Us = Hs, Se = 1, Vt = 2, Bs = {
|
|
2172
2122
|
owned: null,
|
|
2173
2123
|
cleanups: null,
|
|
2174
2124
|
context: null,
|
|
2175
2125
|
owner: null
|
|
2176
|
-
}, on = {},
|
|
2177
|
-
function
|
|
2178
|
-
const n =
|
|
2126
|
+
}, on = {}, I = null, ln = null, To = null, G = null, ee = null, Ae = null, Jt = 0;
|
|
2127
|
+
function Oe(e, t) {
|
|
2128
|
+
const n = G, s = I, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Bs : {
|
|
2179
2129
|
owned: null,
|
|
2180
2130
|
cleanups: null,
|
|
2181
2131
|
context: a ? a.context : null,
|
|
2182
2132
|
owner: a
|
|
2183
|
-
}, o = r ? e : () => e(() =>
|
|
2184
|
-
|
|
2133
|
+
}, o = r ? e : () => e(() => Z(() => ut(i)));
|
|
2134
|
+
I = i, G = null;
|
|
2185
2135
|
try {
|
|
2186
2136
|
return me(o, !0);
|
|
2187
2137
|
} finally {
|
|
2188
|
-
|
|
2138
|
+
G = n, I = s;
|
|
2189
2139
|
}
|
|
2190
2140
|
}
|
|
2191
2141
|
function F(e, t) {
|
|
@@ -2195,21 +2145,21 @@ function F(e, t) {
|
|
|
2195
2145
|
observers: null,
|
|
2196
2146
|
observerSlots: null,
|
|
2197
2147
|
comparator: t.equals || void 0
|
|
2198
|
-
}, s = (r) => (typeof r == "function" && (r = r(n.value)),
|
|
2148
|
+
}, s = (r) => (typeof r == "function" && (r = r(n.value)), Vs(n, r));
|
|
2199
2149
|
return [Ks.bind(n), s];
|
|
2200
2150
|
}
|
|
2201
2151
|
function So(e, t, n) {
|
|
2202
|
-
const s = Xt(e, t, !0,
|
|
2152
|
+
const s = Xt(e, t, !0, Se);
|
|
2203
2153
|
nt(s);
|
|
2204
2154
|
}
|
|
2205
|
-
function
|
|
2206
|
-
const s = Xt(e, t, !1,
|
|
2155
|
+
function De(e, t, n) {
|
|
2156
|
+
const s = Xt(e, t, !1, Se);
|
|
2207
2157
|
nt(s);
|
|
2208
2158
|
}
|
|
2209
2159
|
function Ms(e, t, n) {
|
|
2210
2160
|
Us = Lo;
|
|
2211
|
-
const s = Xt(e, t, !1,
|
|
2212
|
-
(!n || !n.render) && (s.user = !0),
|
|
2161
|
+
const s = Xt(e, t, !1, Se);
|
|
2162
|
+
(!n || !n.render) && (s.user = !0), Ae ? Ae.push(s) : nt(s);
|
|
2213
2163
|
}
|
|
2214
2164
|
function J(e, t, n) {
|
|
2215
2165
|
n = n ? Object.assign({}, Kt, n) : Kt;
|
|
@@ -2222,141 +2172,141 @@ function _o(e) {
|
|
|
2222
2172
|
function Po(e, t, n) {
|
|
2223
2173
|
let s, r, a;
|
|
2224
2174
|
s = !0, r = e, a = {};
|
|
2225
|
-
let i = null, o = on, l = null,
|
|
2226
|
-
const h = /* @__PURE__ */ new Set(), [
|
|
2175
|
+
let i = null, o = on, l = null, f = !1, d = "initialValue" in a, u = typeof s == "function" && J(s);
|
|
2176
|
+
const h = /* @__PURE__ */ new Set(), [g, A] = (a.storage || F)(a.initialValue), [T, p] = F(void 0), [y, _] = F(void 0, {
|
|
2227
2177
|
equals: !1
|
|
2228
|
-
}), [
|
|
2178
|
+
}), [b, O] = F(d ? "ready" : "unresolved");
|
|
2229
2179
|
P.context && (l = P.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : P.load && P.has(l) && (o = P.load(l)));
|
|
2230
|
-
function
|
|
2231
|
-
return i === w && (i = null, $ !== void 0 && (
|
|
2180
|
+
function B(w, v, Y, $) {
|
|
2181
|
+
return i === w && (i = null, $ !== void 0 && (d = !0), (w === o || v === o) && a.onHydrated && queueMicrotask(() => a.onHydrated($, {
|
|
2232
2182
|
value: v
|
|
2233
|
-
})), o = on,
|
|
2183
|
+
})), o = on, N(v, Y)), v;
|
|
2234
2184
|
}
|
|
2235
|
-
function
|
|
2185
|
+
function N(w, v) {
|
|
2236
2186
|
me(() => {
|
|
2237
|
-
v === void 0 && A(() => w),
|
|
2187
|
+
v === void 0 && A(() => w), O(v !== void 0 ? "errored" : d ? "ready" : "unresolved"), p(v);
|
|
2238
2188
|
for (const Y of h.keys()) Y.decrement();
|
|
2239
2189
|
h.clear();
|
|
2240
2190
|
}, !1);
|
|
2241
2191
|
}
|
|
2242
|
-
function
|
|
2243
|
-
const w = Io, v =
|
|
2192
|
+
function pe() {
|
|
2193
|
+
const w = Io, v = g(), Y = T();
|
|
2244
2194
|
if (Y !== void 0 && !i) throw Y;
|
|
2245
|
-
return
|
|
2195
|
+
return G && G.user, v;
|
|
2246
2196
|
}
|
|
2247
2197
|
function ye(w = !0) {
|
|
2248
|
-
if (w !== !1 &&
|
|
2249
|
-
|
|
2198
|
+
if (w !== !1 && f) return;
|
|
2199
|
+
f = !1;
|
|
2250
2200
|
const v = u ? u() : s;
|
|
2251
2201
|
if (v == null || v === !1) {
|
|
2252
|
-
|
|
2202
|
+
B(i, Z(g));
|
|
2253
2203
|
return;
|
|
2254
2204
|
}
|
|
2255
2205
|
let Y;
|
|
2256
|
-
const $ = o !== on ? o :
|
|
2206
|
+
const $ = o !== on ? o : Z(() => {
|
|
2257
2207
|
try {
|
|
2258
2208
|
return r(v, {
|
|
2259
|
-
value:
|
|
2209
|
+
value: g(),
|
|
2260
2210
|
refetching: w
|
|
2261
2211
|
});
|
|
2262
|
-
} catch (
|
|
2263
|
-
Y =
|
|
2212
|
+
} catch (le) {
|
|
2213
|
+
Y = le;
|
|
2264
2214
|
}
|
|
2265
2215
|
});
|
|
2266
2216
|
if (Y !== void 0) {
|
|
2267
|
-
|
|
2217
|
+
B(i, void 0, Rt(Y), v);
|
|
2268
2218
|
return;
|
|
2269
2219
|
} else if (!_o($))
|
|
2270
|
-
return
|
|
2271
|
-
return i = $, "v" in $ ? ($.s === 1 ?
|
|
2272
|
-
|
|
2273
|
-
}, !1), $.then((
|
|
2220
|
+
return B(i, $, void 0, v), $;
|
|
2221
|
+
return i = $, "v" in $ ? ($.s === 1 ? B(i, $.v, void 0, v) : B(i, void 0, Rt($.v), v), $) : (f = !0, queueMicrotask(() => f = !1), me(() => {
|
|
2222
|
+
O(d ? "refreshing" : "pending"), _();
|
|
2223
|
+
}, !1), $.then((le) => B($, le, void 0, v), (le) => B($, void 0, Rt(le), v)));
|
|
2274
2224
|
}
|
|
2275
|
-
Object.defineProperties(
|
|
2225
|
+
Object.defineProperties(pe, {
|
|
2276
2226
|
state: {
|
|
2277
|
-
get: () =>
|
|
2227
|
+
get: () => b()
|
|
2278
2228
|
},
|
|
2279
2229
|
error: {
|
|
2280
|
-
get: () =>
|
|
2230
|
+
get: () => T()
|
|
2281
2231
|
},
|
|
2282
2232
|
loading: {
|
|
2283
2233
|
get() {
|
|
2284
|
-
const w =
|
|
2234
|
+
const w = b();
|
|
2285
2235
|
return w === "pending" || w === "refreshing";
|
|
2286
2236
|
}
|
|
2287
2237
|
},
|
|
2288
2238
|
latest: {
|
|
2289
2239
|
get() {
|
|
2290
|
-
if (!
|
|
2291
|
-
const w =
|
|
2240
|
+
if (!d) return pe();
|
|
2241
|
+
const w = T();
|
|
2292
2242
|
if (w && !i) throw w;
|
|
2293
|
-
return
|
|
2243
|
+
return g();
|
|
2294
2244
|
}
|
|
2295
2245
|
}
|
|
2296
2246
|
});
|
|
2297
|
-
let
|
|
2298
|
-
return u ? So(() => (
|
|
2299
|
-
refetch: (w) => Fs(
|
|
2247
|
+
let U = I;
|
|
2248
|
+
return u ? So(() => (U = I, ye(!1))) : ye(!1), [pe, {
|
|
2249
|
+
refetch: (w) => Fs(U, () => ye(w)),
|
|
2300
2250
|
mutate: A
|
|
2301
2251
|
}];
|
|
2302
2252
|
}
|
|
2303
2253
|
function Kc(e) {
|
|
2304
2254
|
return me(e, !1);
|
|
2305
2255
|
}
|
|
2306
|
-
function
|
|
2307
|
-
if (
|
|
2308
|
-
const t =
|
|
2309
|
-
|
|
2256
|
+
function Z(e) {
|
|
2257
|
+
if (G === null) return e();
|
|
2258
|
+
const t = G;
|
|
2259
|
+
G = null;
|
|
2310
2260
|
try {
|
|
2311
2261
|
return e();
|
|
2312
2262
|
} finally {
|
|
2313
|
-
|
|
2263
|
+
G = t;
|
|
2314
2264
|
}
|
|
2315
2265
|
}
|
|
2316
|
-
function
|
|
2266
|
+
function Vc(e, t, n) {
|
|
2317
2267
|
const s = Array.isArray(e);
|
|
2318
2268
|
let r, a = n && n.defer;
|
|
2319
2269
|
return (i) => {
|
|
2320
2270
|
let o;
|
|
2321
2271
|
if (s) {
|
|
2322
2272
|
o = Array(e.length);
|
|
2323
|
-
for (let
|
|
2273
|
+
for (let f = 0; f < e.length; f++) o[f] = e[f]();
|
|
2324
2274
|
} else o = e();
|
|
2325
2275
|
if (a)
|
|
2326
2276
|
return a = !1, i;
|
|
2327
|
-
const l =
|
|
2277
|
+
const l = Z(() => t(o, r, i));
|
|
2328
2278
|
return r = o, l;
|
|
2329
2279
|
};
|
|
2330
2280
|
}
|
|
2331
2281
|
function wo(e) {
|
|
2332
|
-
Ms(() =>
|
|
2282
|
+
Ms(() => Z(e));
|
|
2333
2283
|
}
|
|
2334
2284
|
function ct(e) {
|
|
2335
|
-
return
|
|
2285
|
+
return I === null || (I.cleanups === null ? I.cleanups = [e] : I.cleanups.push(e)), e;
|
|
2336
2286
|
}
|
|
2337
2287
|
function Xn() {
|
|
2338
|
-
return
|
|
2288
|
+
return I;
|
|
2339
2289
|
}
|
|
2340
2290
|
function Fs(e, t) {
|
|
2341
|
-
const n =
|
|
2342
|
-
|
|
2291
|
+
const n = I, s = G;
|
|
2292
|
+
I = e, G = null;
|
|
2343
2293
|
try {
|
|
2344
2294
|
return me(t, !0);
|
|
2345
2295
|
} catch (r) {
|
|
2346
|
-
|
|
2296
|
+
Gn(r);
|
|
2347
2297
|
} finally {
|
|
2348
|
-
|
|
2298
|
+
I = n, G = s;
|
|
2349
2299
|
}
|
|
2350
2300
|
}
|
|
2351
2301
|
function vo(e) {
|
|
2352
|
-
const t =
|
|
2302
|
+
const t = G, n = I;
|
|
2353
2303
|
return Promise.resolve().then(() => {
|
|
2354
|
-
|
|
2304
|
+
G = t, I = n;
|
|
2355
2305
|
let s;
|
|
2356
|
-
return me(e, !1),
|
|
2306
|
+
return me(e, !1), G = I = null, s ? s.done : void 0;
|
|
2357
2307
|
});
|
|
2358
2308
|
}
|
|
2359
|
-
var [bo,
|
|
2309
|
+
var [bo, Hc] = /* @__PURE__ */ F(!1);
|
|
2360
2310
|
function Qc() {
|
|
2361
2311
|
return [bo, vo];
|
|
2362
2312
|
}
|
|
@@ -2364,13 +2314,13 @@ function $c(e, t) {
|
|
|
2364
2314
|
const n = Symbol("context");
|
|
2365
2315
|
return {
|
|
2366
2316
|
id: n,
|
|
2367
|
-
Provider:
|
|
2317
|
+
Provider: ko(n),
|
|
2368
2318
|
defaultValue: e
|
|
2369
2319
|
};
|
|
2370
2320
|
}
|
|
2371
2321
|
function jc(e) {
|
|
2372
2322
|
let t;
|
|
2373
|
-
return
|
|
2323
|
+
return I && I.context && (t = I.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
2374
2324
|
}
|
|
2375
2325
|
function qs(e) {
|
|
2376
2326
|
const t = J(e), n = J(() => hn(t()));
|
|
@@ -2382,26 +2332,26 @@ function qs(e) {
|
|
|
2382
2332
|
var Io;
|
|
2383
2333
|
function Ks() {
|
|
2384
2334
|
if (this.sources && this.state)
|
|
2385
|
-
if (this.state ===
|
|
2335
|
+
if (this.state === Se) nt(this);
|
|
2386
2336
|
else {
|
|
2387
|
-
const e =
|
|
2388
|
-
|
|
2337
|
+
const e = ee;
|
|
2338
|
+
ee = null, me(() => Qt(this), !1), ee = e;
|
|
2389
2339
|
}
|
|
2390
|
-
if (
|
|
2340
|
+
if (G) {
|
|
2391
2341
|
const e = this.observers ? this.observers.length : 0;
|
|
2392
|
-
|
|
2342
|
+
G.sources ? (G.sources.push(this), G.sourceSlots.push(e)) : (G.sources = [this], G.sourceSlots = [e]), this.observers ? (this.observers.push(G), this.observerSlots.push(G.sources.length - 1)) : (this.observers = [G], this.observerSlots = [G.sources.length - 1]);
|
|
2393
2343
|
}
|
|
2394
2344
|
return this.value;
|
|
2395
2345
|
}
|
|
2396
|
-
function
|
|
2346
|
+
function Vs(e, t, n) {
|
|
2397
2347
|
let s = e.value;
|
|
2398
2348
|
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && me(() => {
|
|
2399
2349
|
for (let r = 0; r < e.observers.length; r += 1) {
|
|
2400
2350
|
const a = e.observers[r], i = ln && ln.running;
|
|
2401
|
-
i && ln.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ?
|
|
2351
|
+
i && ln.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ee.push(a) : Ae.push(a), a.observers && Qs(a)), i || (a.state = Se);
|
|
2402
2352
|
}
|
|
2403
|
-
if (
|
|
2404
|
-
throw
|
|
2353
|
+
if (ee.length > 1e6)
|
|
2354
|
+
throw ee = [], new Error();
|
|
2405
2355
|
}, !1)), t;
|
|
2406
2356
|
}
|
|
2407
2357
|
function nt(e) {
|
|
@@ -2412,18 +2362,18 @@ function nt(e) {
|
|
|
2412
2362
|
}
|
|
2413
2363
|
function Co(e, t, n) {
|
|
2414
2364
|
let s;
|
|
2415
|
-
const r =
|
|
2416
|
-
|
|
2365
|
+
const r = I, a = G;
|
|
2366
|
+
G = I = e;
|
|
2417
2367
|
try {
|
|
2418
2368
|
s = e.fn(t);
|
|
2419
2369
|
} catch (i) {
|
|
2420
|
-
return e.pure && (e.state =
|
|
2370
|
+
return e.pure && (e.state = Se, e.owned && e.owned.forEach(ut), e.owned = null), e.updatedAt = n + 1, Gn(i);
|
|
2421
2371
|
} finally {
|
|
2422
|
-
|
|
2372
|
+
G = a, I = r;
|
|
2423
2373
|
}
|
|
2424
|
-
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ?
|
|
2374
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Vs(e, s) : e.value = s, e.updatedAt = n);
|
|
2425
2375
|
}
|
|
2426
|
-
function Xt(e, t, n, s =
|
|
2376
|
+
function Xt(e, t, n, s = Se, r) {
|
|
2427
2377
|
const a = {
|
|
2428
2378
|
fn: e,
|
|
2429
2379
|
state: s,
|
|
@@ -2433,51 +2383,51 @@ function Xt(e, t, n, s = _e, r) {
|
|
|
2433
2383
|
sourceSlots: null,
|
|
2434
2384
|
cleanups: null,
|
|
2435
2385
|
value: t,
|
|
2436
|
-
owner:
|
|
2437
|
-
context:
|
|
2386
|
+
owner: I,
|
|
2387
|
+
context: I ? I.context : null,
|
|
2438
2388
|
pure: n
|
|
2439
2389
|
};
|
|
2440
|
-
return
|
|
2390
|
+
return I === null || I !== Bs && (I.owned ? I.owned.push(a) : I.owned = [a]), a;
|
|
2441
2391
|
}
|
|
2442
|
-
function
|
|
2392
|
+
function Ht(e) {
|
|
2443
2393
|
if (e.state === 0) return;
|
|
2444
|
-
if (e.state ===
|
|
2445
|
-
if (e.suspense &&
|
|
2394
|
+
if (e.state === Vt) return Qt(e);
|
|
2395
|
+
if (e.suspense && Z(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
2446
2396
|
const t = [e];
|
|
2447
2397
|
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < Jt); )
|
|
2448
2398
|
e.state && t.push(e);
|
|
2449
2399
|
for (let n = t.length - 1; n >= 0; n--)
|
|
2450
|
-
if (e = t[n], e.state ===
|
|
2400
|
+
if (e = t[n], e.state === Se)
|
|
2451
2401
|
nt(e);
|
|
2452
|
-
else if (e.state ===
|
|
2453
|
-
const s =
|
|
2454
|
-
|
|
2402
|
+
else if (e.state === Vt) {
|
|
2403
|
+
const s = ee;
|
|
2404
|
+
ee = null, me(() => Qt(e, t[0]), !1), ee = s;
|
|
2455
2405
|
}
|
|
2456
2406
|
}
|
|
2457
2407
|
function me(e, t) {
|
|
2458
|
-
if (
|
|
2408
|
+
if (ee) return e();
|
|
2459
2409
|
let n = !1;
|
|
2460
|
-
t || (
|
|
2410
|
+
t || (ee = []), Ae ? n = !0 : Ae = [], Jt++;
|
|
2461
2411
|
try {
|
|
2462
2412
|
const s = e();
|
|
2463
2413
|
return No(n), s;
|
|
2464
2414
|
} catch (s) {
|
|
2465
|
-
n || (
|
|
2415
|
+
n || (Ae = null), ee = null, Gn(s);
|
|
2466
2416
|
}
|
|
2467
2417
|
}
|
|
2468
2418
|
function No(e) {
|
|
2469
|
-
if (
|
|
2470
|
-
const t =
|
|
2471
|
-
|
|
2419
|
+
if (ee && (Hs(ee), ee = null), e) return;
|
|
2420
|
+
const t = Ae;
|
|
2421
|
+
Ae = null, t.length && me(() => Us(t), !1);
|
|
2472
2422
|
}
|
|
2473
|
-
function
|
|
2474
|
-
for (let t = 0; t < e.length; t++)
|
|
2423
|
+
function Hs(e) {
|
|
2424
|
+
for (let t = 0; t < e.length; t++) Ht(e[t]);
|
|
2475
2425
|
}
|
|
2476
2426
|
function Lo(e) {
|
|
2477
2427
|
let t, n = 0;
|
|
2478
2428
|
for (t = 0; t < e.length; t++) {
|
|
2479
2429
|
const s = e[t];
|
|
2480
|
-
s.user ? e[n++] = s :
|
|
2430
|
+
s.user ? e[n++] = s : Ht(s);
|
|
2481
2431
|
}
|
|
2482
2432
|
if (P.context) {
|
|
2483
2433
|
if (P.count) {
|
|
@@ -2486,7 +2436,7 @@ function Lo(e) {
|
|
|
2486
2436
|
}
|
|
2487
2437
|
at();
|
|
2488
2438
|
}
|
|
2489
|
-
for (P.effects && (P.done || !P.count) && (e = [...P.effects, ...e], n += P.effects.length, delete P.effects), t = 0; t < n; t++)
|
|
2439
|
+
for (P.effects && (P.done || !P.count) && (e = [...P.effects, ...e], n += P.effects.length, delete P.effects), t = 0; t < n; t++) Ht(e[t]);
|
|
2490
2440
|
}
|
|
2491
2441
|
function Qt(e, t) {
|
|
2492
2442
|
e.state = 0;
|
|
@@ -2494,14 +2444,14 @@ function Qt(e, t) {
|
|
|
2494
2444
|
const s = e.sources[n];
|
|
2495
2445
|
if (s.sources) {
|
|
2496
2446
|
const r = s.state;
|
|
2497
|
-
r ===
|
|
2447
|
+
r === Se ? s !== t && (!s.updatedAt || s.updatedAt < Jt) && Ht(s) : r === Vt && Qt(s, t);
|
|
2498
2448
|
}
|
|
2499
2449
|
}
|
|
2500
2450
|
}
|
|
2501
2451
|
function Qs(e) {
|
|
2502
2452
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
2503
2453
|
const n = e.observers[t];
|
|
2504
|
-
n.state || (n.state =
|
|
2454
|
+
n.state || (n.state = Vt, n.pure ? ee.push(n) : Ae.push(n), n.observers && Qs(n));
|
|
2505
2455
|
}
|
|
2506
2456
|
}
|
|
2507
2457
|
function ut(e) {
|
|
@@ -2533,7 +2483,7 @@ function Rt(e) {
|
|
|
2533
2483
|
cause: e
|
|
2534
2484
|
});
|
|
2535
2485
|
}
|
|
2536
|
-
function
|
|
2486
|
+
function Gn(e, t = I) {
|
|
2537
2487
|
throw Rt(e);
|
|
2538
2488
|
}
|
|
2539
2489
|
function hn(e) {
|
|
@@ -2548,11 +2498,11 @@ function hn(e) {
|
|
|
2548
2498
|
}
|
|
2549
2499
|
return e;
|
|
2550
2500
|
}
|
|
2551
|
-
function
|
|
2501
|
+
function ko(e, t) {
|
|
2552
2502
|
return function(s) {
|
|
2553
2503
|
let r;
|
|
2554
|
-
return
|
|
2555
|
-
...
|
|
2504
|
+
return De(() => r = Z(() => (I.context = {
|
|
2505
|
+
...I.context,
|
|
2556
2506
|
[e]: s.value
|
|
2557
2507
|
}, qs(() => s.children))), void 0), r;
|
|
2558
2508
|
};
|
|
@@ -2561,76 +2511,76 @@ var gn = Symbol("fallback");
|
|
|
2561
2511
|
function $t(e) {
|
|
2562
2512
|
for (let t = 0; t < e.length; t++) e[t]();
|
|
2563
2513
|
}
|
|
2564
|
-
function
|
|
2514
|
+
function Oo(e, t, n = {}) {
|
|
2565
2515
|
let s = [], r = [], a = [], i = 0, o = t.length > 1 ? [] : null;
|
|
2566
2516
|
return ct(() => $t(a)), () => {
|
|
2567
|
-
let l = e() || [],
|
|
2568
|
-
return l[Rs],
|
|
2569
|
-
let
|
|
2570
|
-
if (
|
|
2571
|
-
i !== 0 && ($t(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [gn], r[0] =
|
|
2517
|
+
let l = e() || [], f = l.length, d, u;
|
|
2518
|
+
return l[Rs], Z(() => {
|
|
2519
|
+
let g, A, T, p, y, _, b, O, B;
|
|
2520
|
+
if (f === 0)
|
|
2521
|
+
i !== 0 && ($t(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [gn], r[0] = Oe((N) => (a[0] = N, n.fallback())), i = 1);
|
|
2572
2522
|
else if (i === 0) {
|
|
2573
|
-
for (r = new Array(
|
|
2574
|
-
s[u] = l[u], r[u] =
|
|
2575
|
-
i =
|
|
2523
|
+
for (r = new Array(f), u = 0; u < f; u++)
|
|
2524
|
+
s[u] = l[u], r[u] = Oe(h);
|
|
2525
|
+
i = f;
|
|
2576
2526
|
} else {
|
|
2577
|
-
for (
|
|
2578
|
-
for (
|
|
2579
|
-
|
|
2580
|
-
for (
|
|
2581
|
-
|
|
2582
|
-
for (
|
|
2583
|
-
|
|
2584
|
-
for (u =
|
|
2585
|
-
u in
|
|
2586
|
-
r = r.slice(0, i =
|
|
2527
|
+
for (T = new Array(f), p = new Array(f), o && (y = new Array(f)), _ = 0, b = Math.min(i, f); _ < b && s[_] === l[_]; _++) ;
|
|
2528
|
+
for (b = i - 1, O = f - 1; b >= _ && O >= _ && s[b] === l[O]; b--, O--)
|
|
2529
|
+
T[O] = r[b], p[O] = a[b], o && (y[O] = o[b]);
|
|
2530
|
+
for (g = /* @__PURE__ */ new Map(), A = new Array(O + 1), u = O; u >= _; u--)
|
|
2531
|
+
B = l[u], d = g.get(B), A[u] = d === void 0 ? -1 : d, g.set(B, u);
|
|
2532
|
+
for (d = _; d <= b; d++)
|
|
2533
|
+
B = s[d], u = g.get(B), u !== void 0 && u !== -1 ? (T[u] = r[d], p[u] = a[d], o && (y[u] = o[d]), u = A[u], g.set(B, u)) : a[d]();
|
|
2534
|
+
for (u = _; u < f; u++)
|
|
2535
|
+
u in T ? (r[u] = T[u], a[u] = p[u], o && (o[u] = y[u], o[u](u))) : r[u] = Oe(h);
|
|
2536
|
+
r = r.slice(0, i = f), s = l.slice(0);
|
|
2587
2537
|
}
|
|
2588
2538
|
return r;
|
|
2589
2539
|
});
|
|
2590
|
-
function h(
|
|
2591
|
-
if (a[u] =
|
|
2592
|
-
const [A,
|
|
2593
|
-
return o[u] =
|
|
2540
|
+
function h(g) {
|
|
2541
|
+
if (a[u] = g, o) {
|
|
2542
|
+
const [A, T] = F(u);
|
|
2543
|
+
return o[u] = T, t(l[u], A);
|
|
2594
2544
|
}
|
|
2595
2545
|
return t(l[u]);
|
|
2596
2546
|
}
|
|
2597
2547
|
};
|
|
2598
2548
|
}
|
|
2599
|
-
function
|
|
2549
|
+
function Do(e, t, n = {}) {
|
|
2600
2550
|
let s = [], r = [], a = [], i = [], o = 0, l;
|
|
2601
2551
|
return ct(() => $t(a)), () => {
|
|
2602
|
-
const
|
|
2603
|
-
return
|
|
2604
|
-
if (
|
|
2605
|
-
return o !== 0 && ($t(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [gn], r[0] =
|
|
2606
|
-
for (s[0] === gn && (a[0](), a = [], s = [], r = [], o = 0), l = 0; l <
|
|
2607
|
-
l < s.length && s[l] !==
|
|
2552
|
+
const f = e() || [], d = f.length;
|
|
2553
|
+
return f[Rs], Z(() => {
|
|
2554
|
+
if (d === 0)
|
|
2555
|
+
return o !== 0 && ($t(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [gn], r[0] = Oe((h) => (a[0] = h, n.fallback())), o = 1), r;
|
|
2556
|
+
for (s[0] === gn && (a[0](), a = [], s = [], r = [], o = 0), l = 0; l < d; l++)
|
|
2557
|
+
l < s.length && s[l] !== f[l] ? i[l](() => f[l]) : l >= s.length && (r[l] = Oe(u));
|
|
2608
2558
|
for (; l < s.length; l++)
|
|
2609
2559
|
a[l]();
|
|
2610
|
-
return o = i.length = a.length =
|
|
2560
|
+
return o = i.length = a.length = d, s = f.slice(0), r = r.slice(0, o);
|
|
2611
2561
|
});
|
|
2612
2562
|
function u(h) {
|
|
2613
2563
|
a[l] = h;
|
|
2614
|
-
const [
|
|
2615
|
-
return i[l] = A, t(
|
|
2564
|
+
const [g, A] = F(f[l]);
|
|
2565
|
+
return i[l] = A, t(g, l);
|
|
2616
2566
|
}
|
|
2617
2567
|
};
|
|
2618
2568
|
}
|
|
2619
2569
|
function $s(e, t) {
|
|
2620
|
-
return
|
|
2570
|
+
return Z(() => e(t || {}));
|
|
2621
2571
|
}
|
|
2622
|
-
function
|
|
2572
|
+
function kt() {
|
|
2623
2573
|
return !0;
|
|
2624
2574
|
}
|
|
2625
|
-
var
|
|
2575
|
+
var mn = {
|
|
2626
2576
|
get(e, t, n) {
|
|
2627
2577
|
return t === qt ? n : e.get(t);
|
|
2628
2578
|
},
|
|
2629
2579
|
has(e, t) {
|
|
2630
2580
|
return t === qt ? !0 : e.has(t);
|
|
2631
2581
|
},
|
|
2632
|
-
set:
|
|
2633
|
-
deleteProperty:
|
|
2582
|
+
set: kt,
|
|
2583
|
+
deleteProperty: kt,
|
|
2634
2584
|
getOwnPropertyDescriptor(e, t) {
|
|
2635
2585
|
return {
|
|
2636
2586
|
configurable: !0,
|
|
@@ -2638,8 +2588,8 @@ var En = {
|
|
|
2638
2588
|
get() {
|
|
2639
2589
|
return e.get(t);
|
|
2640
2590
|
},
|
|
2641
|
-
set:
|
|
2642
|
-
deleteProperty:
|
|
2591
|
+
set: kt,
|
|
2592
|
+
deleteProperty: kt
|
|
2643
2593
|
};
|
|
2644
2594
|
},
|
|
2645
2595
|
ownKeys(e) {
|
|
@@ -2649,7 +2599,7 @@ var En = {
|
|
|
2649
2599
|
function cn(e) {
|
|
2650
2600
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
2651
2601
|
}
|
|
2652
|
-
function
|
|
2602
|
+
function Go() {
|
|
2653
2603
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
2654
2604
|
const n = this[e]();
|
|
2655
2605
|
if (n !== void 0) return n;
|
|
@@ -2679,24 +2629,24 @@ function js(...e) {
|
|
|
2679
2629
|
for (let o = 0; o < e.length; o++) i.push(...Object.keys(cn(e[o])));
|
|
2680
2630
|
return [...new Set(i)];
|
|
2681
2631
|
}
|
|
2682
|
-
},
|
|
2632
|
+
}, mn);
|
|
2683
2633
|
const n = {}, s = /* @__PURE__ */ Object.create(null);
|
|
2684
2634
|
for (let i = e.length - 1; i >= 0; i--) {
|
|
2685
2635
|
const o = e[i];
|
|
2686
2636
|
if (!o) continue;
|
|
2687
2637
|
const l = Object.getOwnPropertyNames(o);
|
|
2688
|
-
for (let
|
|
2689
|
-
const
|
|
2690
|
-
if (
|
|
2691
|
-
const u = Object.getOwnPropertyDescriptor(o,
|
|
2692
|
-
if (!s[
|
|
2693
|
-
s[
|
|
2638
|
+
for (let f = l.length - 1; f >= 0; f--) {
|
|
2639
|
+
const d = l[f];
|
|
2640
|
+
if (d === "__proto__" || d === "constructor") continue;
|
|
2641
|
+
const u = Object.getOwnPropertyDescriptor(o, d);
|
|
2642
|
+
if (!s[d])
|
|
2643
|
+
s[d] = u.get ? {
|
|
2694
2644
|
enumerable: !0,
|
|
2695
2645
|
configurable: !0,
|
|
2696
|
-
get:
|
|
2646
|
+
get: Go.bind(n[d] = [u.get.bind(o)])
|
|
2697
2647
|
} : u.value !== void 0 ? u : void 0;
|
|
2698
2648
|
else {
|
|
2699
|
-
const h = n[
|
|
2649
|
+
const h = n[d];
|
|
2700
2650
|
h && (u.get ? h.push(u.get.bind(o)) : u.value !== void 0 && h.push(() => u.value));
|
|
2701
2651
|
}
|
|
2702
2652
|
}
|
|
@@ -2720,7 +2670,7 @@ function xo(e, ...t) {
|
|
|
2720
2670
|
keys() {
|
|
2721
2671
|
return i.filter((o) => o in e);
|
|
2722
2672
|
}
|
|
2723
|
-
},
|
|
2673
|
+
}, mn));
|
|
2724
2674
|
return a.push(new Proxy({
|
|
2725
2675
|
get(i) {
|
|
2726
2676
|
return r.has(i) ? void 0 : e[i];
|
|
@@ -2731,33 +2681,33 @@ function xo(e, ...t) {
|
|
|
2731
2681
|
keys() {
|
|
2732
2682
|
return Object.keys(e).filter((i) => !r.has(i));
|
|
2733
2683
|
}
|
|
2734
|
-
},
|
|
2684
|
+
}, mn)), a;
|
|
2735
2685
|
}
|
|
2736
2686
|
const n = {}, s = t.map(() => ({}));
|
|
2737
2687
|
for (const r of Object.getOwnPropertyNames(e)) {
|
|
2738
2688
|
const a = Object.getOwnPropertyDescriptor(e, r), i = !a.get && !a.set && a.enumerable && a.writable && a.configurable;
|
|
2739
2689
|
let o = !1, l = 0;
|
|
2740
|
-
for (const
|
|
2741
|
-
|
|
2690
|
+
for (const f of t)
|
|
2691
|
+
f.includes(r) && (o = !0, i ? s[l][r] = a.value : Object.defineProperty(s[l], r, a)), ++l;
|
|
2742
2692
|
o || (i ? n[r] = a.value : Object.defineProperty(n, r, a));
|
|
2743
2693
|
}
|
|
2744
2694
|
return [...s, n];
|
|
2745
2695
|
}
|
|
2746
|
-
function
|
|
2696
|
+
function zs(e) {
|
|
2747
2697
|
let t, n;
|
|
2748
2698
|
const s = (r) => {
|
|
2749
2699
|
const a = P.context;
|
|
2750
2700
|
if (a) {
|
|
2751
2701
|
const [o, l] = F();
|
|
2752
|
-
P.count || (P.count = 0), P.count++, (n || (n = e())).then((
|
|
2753
|
-
!P.done && at(a), P.count--, l(() =>
|
|
2702
|
+
P.count || (P.count = 0), P.count++, (n || (n = e())).then((f) => {
|
|
2703
|
+
!P.done && at(a), P.count--, l(() => f.default), at();
|
|
2754
2704
|
}), t = o;
|
|
2755
2705
|
} else if (!t) {
|
|
2756
2706
|
const [o] = Po(() => (n || (n = e())).then((l) => l.default));
|
|
2757
2707
|
t = o;
|
|
2758
2708
|
}
|
|
2759
2709
|
let i;
|
|
2760
|
-
return J(() => (i = t()) ?
|
|
2710
|
+
return J(() => (i = t()) ? Z(() => {
|
|
2761
2711
|
if (!a || P.done) return i(r);
|
|
2762
2712
|
const o = P.context;
|
|
2763
2713
|
at(a);
|
|
@@ -2768,21 +2718,21 @@ function Ws(e) {
|
|
|
2768
2718
|
return s.preload = () => n || ((n = e()).then((r) => t = () => r.default), n), s;
|
|
2769
2719
|
}
|
|
2770
2720
|
var Ro = 0;
|
|
2771
|
-
function
|
|
2721
|
+
function zc() {
|
|
2772
2722
|
return P.context ? P.getNextContextId() : `cl-${Ro++}`;
|
|
2773
2723
|
}
|
|
2774
|
-
var
|
|
2775
|
-
function
|
|
2724
|
+
var Ws = (e) => `Stale read from <${e}>.`;
|
|
2725
|
+
function Wc(e) {
|
|
2776
2726
|
const t = "fallback" in e && {
|
|
2777
2727
|
fallback: () => e.fallback
|
|
2778
2728
|
};
|
|
2779
|
-
return J(
|
|
2729
|
+
return J(Oo(() => e.each, e.children, t || void 0));
|
|
2780
2730
|
}
|
|
2781
2731
|
function Yc(e) {
|
|
2782
2732
|
const t = "fallback" in e && {
|
|
2783
2733
|
fallback: () => e.fallback
|
|
2784
2734
|
};
|
|
2785
|
-
return J(
|
|
2735
|
+
return J(Do(() => e.each, e.children, t || void 0));
|
|
2786
2736
|
}
|
|
2787
2737
|
function Jc(e) {
|
|
2788
2738
|
const t = e.keyed, n = J(() => e.when, void 0, void 0), s = t ? n : J(n, void 0, {
|
|
@@ -2792,8 +2742,8 @@ function Jc(e) {
|
|
|
2792
2742
|
const r = s();
|
|
2793
2743
|
if (r) {
|
|
2794
2744
|
const a = e.children;
|
|
2795
|
-
return typeof a == "function" && a.length > 0 ?
|
|
2796
|
-
if (!
|
|
2745
|
+
return typeof a == "function" && a.length > 0 ? Z(() => a(t ? r : () => {
|
|
2746
|
+
if (!Z(s)) throw Ws("Show");
|
|
2797
2747
|
return n();
|
|
2798
2748
|
})) : a;
|
|
2799
2749
|
}
|
|
@@ -2806,10 +2756,10 @@ function Xc(e) {
|
|
|
2806
2756
|
let a = () => {
|
|
2807
2757
|
};
|
|
2808
2758
|
for (let i = 0; i < r.length; i++) {
|
|
2809
|
-
const o = i, l = r[i],
|
|
2810
|
-
equals: (h,
|
|
2759
|
+
const o = i, l = r[i], f = a, d = J(() => f() ? void 0 : l.when, void 0, void 0), u = l.keyed ? d : J(d, void 0, {
|
|
2760
|
+
equals: (h, g) => !h == !g
|
|
2811
2761
|
});
|
|
2812
|
-
a = () =>
|
|
2762
|
+
a = () => f() || (u() ? [o, d, l] : void 0);
|
|
2813
2763
|
}
|
|
2814
2764
|
return a;
|
|
2815
2765
|
});
|
|
@@ -2817,9 +2767,9 @@ function Xc(e) {
|
|
|
2817
2767
|
const s = n()();
|
|
2818
2768
|
if (!s) return e.fallback;
|
|
2819
2769
|
const [r, a, i] = s, o = i.children;
|
|
2820
|
-
return typeof o == "function" && o.length > 0 ?
|
|
2821
|
-
var
|
|
2822
|
-
if (((
|
|
2770
|
+
return typeof o == "function" && o.length > 0 ? Z(() => o(i.keyed ? a() : () => {
|
|
2771
|
+
var f;
|
|
2772
|
+
if (((f = Z(n)()) == null ? void 0 : f[0]) !== r) throw Ws("Match");
|
|
2823
2773
|
return a();
|
|
2824
2774
|
})) : o;
|
|
2825
2775
|
}, void 0, void 0);
|
|
@@ -2863,7 +2813,7 @@ function Ko(e, t) {
|
|
|
2863
2813
|
const n = qo[e];
|
|
2864
2814
|
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
2865
2815
|
}
|
|
2866
|
-
var
|
|
2816
|
+
var Vo = /* @__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"]), Ho = /* @__PURE__ */ new Set([
|
|
2867
2817
|
"altGlyph",
|
|
2868
2818
|
"altGlyphDef",
|
|
2869
2819
|
"altGlyphItem",
|
|
@@ -2946,7 +2896,7 @@ var Ho = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
|
|
|
2946
2896
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
2947
2897
|
}, eu = (e) => J(() => e());
|
|
2948
2898
|
function $o(e, t, n) {
|
|
2949
|
-
let s = n.length, r = t.length, a = s, i = 0, o = 0, l = t[r - 1].nextSibling,
|
|
2899
|
+
let s = n.length, r = t.length, a = s, i = 0, o = 0, l = t[r - 1].nextSibling, f = null;
|
|
2950
2900
|
for (; i < r || o < a; ) {
|
|
2951
2901
|
if (t[i] === n[o]) {
|
|
2952
2902
|
i++, o++;
|
|
@@ -2955,29 +2905,29 @@ function $o(e, t, n) {
|
|
|
2955
2905
|
for (; t[r - 1] === n[a - 1]; )
|
|
2956
2906
|
r--, a--;
|
|
2957
2907
|
if (r === i) {
|
|
2958
|
-
const
|
|
2959
|
-
for (; o < a; ) e.insertBefore(n[o++],
|
|
2908
|
+
const d = a < s ? o ? n[o - 1].nextSibling : n[a - o] : l;
|
|
2909
|
+
for (; o < a; ) e.insertBefore(n[o++], d);
|
|
2960
2910
|
} else if (a === o)
|
|
2961
2911
|
for (; i < r; )
|
|
2962
|
-
(!
|
|
2912
|
+
(!f || !f.has(t[i])) && t[i].remove(), i++;
|
|
2963
2913
|
else if (t[i] === n[a - 1] && n[o] === t[r - 1]) {
|
|
2964
|
-
const
|
|
2965
|
-
e.insertBefore(n[o++], t[i++].nextSibling), e.insertBefore(n[--a],
|
|
2914
|
+
const d = t[--r].nextSibling;
|
|
2915
|
+
e.insertBefore(n[o++], t[i++].nextSibling), e.insertBefore(n[--a], d), t[r] = n[a];
|
|
2966
2916
|
} else {
|
|
2967
|
-
if (!
|
|
2968
|
-
|
|
2917
|
+
if (!f) {
|
|
2918
|
+
f = /* @__PURE__ */ new Map();
|
|
2969
2919
|
let u = o;
|
|
2970
|
-
for (; u < a; )
|
|
2920
|
+
for (; u < a; ) f.set(n[u], u++);
|
|
2971
2921
|
}
|
|
2972
|
-
const
|
|
2973
|
-
if (
|
|
2974
|
-
if (o <
|
|
2975
|
-
let u = i, h = 1,
|
|
2976
|
-
for (; ++u < r && u < a && !((
|
|
2922
|
+
const d = f.get(t[i]);
|
|
2923
|
+
if (d != null)
|
|
2924
|
+
if (o < d && d < a) {
|
|
2925
|
+
let u = i, h = 1, g;
|
|
2926
|
+
for (; ++u < r && u < a && !((g = f.get(t[u])) == null || g !== d + h); )
|
|
2977
2927
|
h++;
|
|
2978
|
-
if (h >
|
|
2928
|
+
if (h > d - o) {
|
|
2979
2929
|
const A = t[i];
|
|
2980
|
-
for (; o <
|
|
2930
|
+
for (; o < d; ) e.insertBefore(n[o++], A);
|
|
2981
2931
|
} else e.replaceChild(n[o++], t[i++]);
|
|
2982
2932
|
} else i++;
|
|
2983
2933
|
else t[i++].remove();
|
|
@@ -2987,7 +2937,7 @@ function $o(e, t, n) {
|
|
|
2987
2937
|
var ot = "_$DX_DELEGATE";
|
|
2988
2938
|
function Ys(e, t, n, s = {}) {
|
|
2989
2939
|
let r;
|
|
2990
|
-
return
|
|
2940
|
+
return Oe((a) => {
|
|
2991
2941
|
r = a, t === document ? e() : pn(t, e(), t.firstChild ? null : void 0, n);
|
|
2992
2942
|
}, s.owner), () => {
|
|
2993
2943
|
r(), t.textContent = "";
|
|
@@ -3014,13 +2964,13 @@ function nu(e = window.document) {
|
|
|
3014
2964
|
delete e[ot];
|
|
3015
2965
|
}
|
|
3016
2966
|
}
|
|
3017
|
-
function
|
|
2967
|
+
function En(e, t, n) {
|
|
3018
2968
|
Ue(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
3019
2969
|
}
|
|
3020
|
-
function
|
|
2970
|
+
function zo(e, t, n, s) {
|
|
3021
2971
|
Ue(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
|
|
3022
2972
|
}
|
|
3023
|
-
function
|
|
2973
|
+
function Wo(e, t, n) {
|
|
3024
2974
|
Ue(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
|
|
3025
2975
|
}
|
|
3026
2976
|
function Yo(e, t) {
|
|
@@ -3048,7 +2998,7 @@ function Xo(e, t, n = {}) {
|
|
|
3048
2998
|
return n;
|
|
3049
2999
|
}
|
|
3050
3000
|
function Zo(e, t, n) {
|
|
3051
|
-
if (!t) return n ?
|
|
3001
|
+
if (!t) return n ? En(e, "style") : t;
|
|
3052
3002
|
const s = e.style;
|
|
3053
3003
|
if (typeof t == "string") return s.cssText = t;
|
|
3054
3004
|
typeof n == "string" && (s.cssText = n = void 0), n || (n = {}), t || (t = {});
|
|
@@ -3061,14 +3011,14 @@ function Zo(e, t, n) {
|
|
|
3061
3011
|
}
|
|
3062
3012
|
function el(e, t = {}, n, s) {
|
|
3063
3013
|
const r = {};
|
|
3064
|
-
return s ||
|
|
3014
|
+
return s || De(() => r.children = dt(e, t.children, r.children)), De(() => typeof t.ref == "function" && tl(t.ref, e)), De(() => nl(e, t, n, !0, r, !0)), r;
|
|
3065
3015
|
}
|
|
3066
3016
|
function tl(e, t, n) {
|
|
3067
|
-
return
|
|
3017
|
+
return Z(() => e(t, n));
|
|
3068
3018
|
}
|
|
3069
3019
|
function pn(e, t, n, s) {
|
|
3070
3020
|
if (n !== void 0 && !s && (s = []), typeof t != "function") return dt(e, t, s, n);
|
|
3071
|
-
|
|
3021
|
+
De((r) => dt(e, t(), r, n), s);
|
|
3072
3022
|
}
|
|
3073
3023
|
function nl(e, t, n, s, r = {}, a = !1) {
|
|
3074
3024
|
t || (t = {});
|
|
@@ -3099,7 +3049,7 @@ function Zn(e, t, n) {
|
|
|
3099
3049
|
for (let r = 0, a = s.length; r < a; r++) e.classList.toggle(s[r], n);
|
|
3100
3050
|
}
|
|
3101
3051
|
function es(e, t, n, s, r, a, i) {
|
|
3102
|
-
let o, l,
|
|
3052
|
+
let o, l, f, d, u;
|
|
3103
3053
|
if (t === "style") return Zo(e, n, s);
|
|
3104
3054
|
if (t === "classList") return Xo(e, n, s);
|
|
3105
3055
|
if (n === s) return s;
|
|
@@ -3112,29 +3062,29 @@ function es(e, t, n, s, r, a, i) {
|
|
|
3112
3062
|
const h = t.slice(10);
|
|
3113
3063
|
s && e.removeEventListener(h, s, !0), n && e.addEventListener(h, n, !0);
|
|
3114
3064
|
} else if (t.slice(0, 2) === "on") {
|
|
3115
|
-
const h = t.slice(2).toLowerCase(),
|
|
3116
|
-
if (!
|
|
3065
|
+
const h = t.slice(2).toLowerCase(), g = Vo.has(h);
|
|
3066
|
+
if (!g && s) {
|
|
3117
3067
|
const A = Array.isArray(s) ? s[0] : s;
|
|
3118
3068
|
e.removeEventListener(h, A);
|
|
3119
3069
|
}
|
|
3120
|
-
(
|
|
3070
|
+
(g || n) && (Jo(e, h, n, g), g && jo([h]));
|
|
3121
3071
|
} else if (t.slice(0, 5) === "attr:")
|
|
3122
|
-
|
|
3072
|
+
En(e, t.slice(5), n);
|
|
3123
3073
|
else if (t.slice(0, 5) === "bool:")
|
|
3124
|
-
|
|
3125
|
-
else if ((u = t.slice(0, 5) === "prop:") || (
|
|
3074
|
+
Wo(e, t.slice(5), n);
|
|
3075
|
+
else if ((u = t.slice(0, 5) === "prop:") || (f = Mo.has(t)) || !r && ((d = Ko(t, e.tagName)) || (l = Bo.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
|
|
3126
3076
|
if (u)
|
|
3127
3077
|
t = t.slice(5), l = !0;
|
|
3128
3078
|
else if (Ue(e)) return n;
|
|
3129
|
-
t === "class" || t === "className" ? Yo(e, n) : o && !l && !
|
|
3079
|
+
t === "class" || t === "className" ? Yo(e, n) : o && !l && !f ? e[rl(t)] = n : e[d || t] = n;
|
|
3130
3080
|
} else {
|
|
3131
3081
|
const h = r && t.indexOf(":") > -1 && Qo[t.split(":")[0]];
|
|
3132
|
-
h ?
|
|
3082
|
+
h ? zo(e, h, t, n) : En(e, Fo[t] || t, n);
|
|
3133
3083
|
}
|
|
3134
3084
|
return n;
|
|
3135
3085
|
}
|
|
3136
3086
|
function Js(e) {
|
|
3137
|
-
if (P.registry && P.events && P.events.find(([l,
|
|
3087
|
+
if (P.registry && P.events && P.events.find(([l, f]) => f === e))
|
|
3138
3088
|
return;
|
|
3139
3089
|
let t = e.target;
|
|
3140
3090
|
const n = `$$${e.type}`, s = e.target, r = e.currentTarget, a = (l) => Object.defineProperty(e, "target", {
|
|
@@ -3143,8 +3093,8 @@ function Js(e) {
|
|
|
3143
3093
|
}), i = () => {
|
|
3144
3094
|
const l = t[n];
|
|
3145
3095
|
if (l && !t.disabled) {
|
|
3146
|
-
const
|
|
3147
|
-
if (
|
|
3096
|
+
const f = t[`${n}Data`];
|
|
3097
|
+
if (f !== void 0 ? l.call(t, f, e) : l.call(t, e), e.cancelBubble) return;
|
|
3148
3098
|
}
|
|
3149
3099
|
return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && a(t.host), !0;
|
|
3150
3100
|
}, o = () => {
|
|
@@ -3158,7 +3108,7 @@ function Js(e) {
|
|
|
3158
3108
|
}), P.registry && !P.done && (P.done = _$HY.done = !0), e.composedPath) {
|
|
3159
3109
|
const l = e.composedPath();
|
|
3160
3110
|
a(l[0]);
|
|
3161
|
-
for (let
|
|
3111
|
+
for (let f = 0; f < l.length - 2 && (t = l[f], !!i()); f++) {
|
|
3162
3112
|
if (t._$host) {
|
|
3163
3113
|
t = t._$host, o();
|
|
3164
3114
|
break;
|
|
@@ -3174,9 +3124,9 @@ function dt(e, t, n, s, r) {
|
|
|
3174
3124
|
if (a) {
|
|
3175
3125
|
!n && (n = [...e.childNodes]);
|
|
3176
3126
|
let l = [];
|
|
3177
|
-
for (let
|
|
3178
|
-
const
|
|
3179
|
-
|
|
3127
|
+
for (let f = 0; f < n.length; f++) {
|
|
3128
|
+
const d = n[f];
|
|
3129
|
+
d.nodeType === 8 && d.data.slice(0, 2) === "!$" ? d.remove() : l.push(d);
|
|
3180
3130
|
}
|
|
3181
3131
|
n = l;
|
|
3182
3132
|
}
|
|
@@ -3196,27 +3146,27 @@ function dt(e, t, n, s, r) {
|
|
|
3196
3146
|
n = Be(e, n, s);
|
|
3197
3147
|
} else {
|
|
3198
3148
|
if (i === "function")
|
|
3199
|
-
return
|
|
3149
|
+
return De(() => {
|
|
3200
3150
|
let l = t();
|
|
3201
3151
|
for (; typeof l == "function"; ) l = l();
|
|
3202
3152
|
n = dt(e, l, n, s);
|
|
3203
3153
|
}), () => n;
|
|
3204
3154
|
if (Array.isArray(t)) {
|
|
3205
|
-
const l = [],
|
|
3206
|
-
if (
|
|
3207
|
-
return
|
|
3155
|
+
const l = [], f = n && Array.isArray(n);
|
|
3156
|
+
if (yn(l, t, n, r))
|
|
3157
|
+
return De(() => n = dt(e, l, n, s, !0)), () => n;
|
|
3208
3158
|
if (a) {
|
|
3209
3159
|
if (!l.length) return n;
|
|
3210
3160
|
if (s === void 0) return n = [...e.childNodes];
|
|
3211
|
-
let
|
|
3212
|
-
if (
|
|
3213
|
-
const u = [
|
|
3214
|
-
for (; (
|
|
3161
|
+
let d = l[0];
|
|
3162
|
+
if (d.parentNode !== e) return n;
|
|
3163
|
+
const u = [d];
|
|
3164
|
+
for (; (d = d.nextSibling) !== s; ) u.push(d);
|
|
3215
3165
|
return n = u;
|
|
3216
3166
|
}
|
|
3217
3167
|
if (l.length === 0) {
|
|
3218
3168
|
if (n = Be(e, n, s), o) return n;
|
|
3219
|
-
} else
|
|
3169
|
+
} else f ? n.length === 0 ? ts(e, l, s) : $o(e, n, l) : (n && Be(e), ts(e, l));
|
|
3220
3170
|
n = l;
|
|
3221
3171
|
} else if (t.nodeType) {
|
|
3222
3172
|
if (a && t.parentNode) return n = o ? [t] : t;
|
|
@@ -3229,23 +3179,23 @@ function dt(e, t, n, s, r) {
|
|
|
3229
3179
|
}
|
|
3230
3180
|
return n;
|
|
3231
3181
|
}
|
|
3232
|
-
function
|
|
3182
|
+
function yn(e, t, n, s) {
|
|
3233
3183
|
let r = !1;
|
|
3234
3184
|
for (let a = 0, i = t.length; a < i; a++) {
|
|
3235
|
-
let o = t[a], l = n && n[e.length],
|
|
3236
|
-
if (!(o == null || o === !0 || o === !1)) if ((
|
|
3185
|
+
let o = t[a], l = n && n[e.length], f;
|
|
3186
|
+
if (!(o == null || o === !0 || o === !1)) if ((f = typeof o) == "object" && o.nodeType)
|
|
3237
3187
|
e.push(o);
|
|
3238
3188
|
else if (Array.isArray(o))
|
|
3239
|
-
r =
|
|
3240
|
-
else if (
|
|
3189
|
+
r = yn(e, o, l) || r;
|
|
3190
|
+
else if (f === "function")
|
|
3241
3191
|
if (s) {
|
|
3242
3192
|
for (; typeof o == "function"; ) o = o();
|
|
3243
|
-
r =
|
|
3193
|
+
r = yn(e, Array.isArray(o) ? o : [o], Array.isArray(l) ? l : [l]) || r;
|
|
3244
3194
|
} else
|
|
3245
3195
|
e.push(o), r = !0;
|
|
3246
3196
|
else {
|
|
3247
|
-
const
|
|
3248
|
-
l && l.nodeType === 3 && l.data ===
|
|
3197
|
+
const d = String(o);
|
|
3198
|
+
l && l.nodeType === 3 && l.data === d ? e.push(l) : e.push(document.createTextNode(d));
|
|
3249
3199
|
}
|
|
3250
3200
|
}
|
|
3251
3201
|
return r;
|
|
@@ -3284,10 +3234,10 @@ function su(e) {
|
|
|
3284
3234
|
i && (Xn().user = i = !1), a || (a = Fs(r, () => J(() => e.children)));
|
|
3285
3235
|
const o = s();
|
|
3286
3236
|
if (o instanceof HTMLHeadElement) {
|
|
3287
|
-
const [l,
|
|
3288
|
-
|
|
3237
|
+
const [l, f] = F(!1), d = () => f(!0);
|
|
3238
|
+
Oe((u) => pn(o, () => l() ? u() : a(), null)), ct(d);
|
|
3289
3239
|
} else {
|
|
3290
|
-
const l = Xs(e.isSVG ? "g" : "div", e.isSVG),
|
|
3240
|
+
const l = Xs(e.isSVG ? "g" : "div", e.isSVG), f = t && l.attachShadow ? l.attachShadow({
|
|
3291
3241
|
mode: "open"
|
|
3292
3242
|
}) : l;
|
|
3293
3243
|
Object.defineProperty(l, "_$host", {
|
|
@@ -3295,7 +3245,7 @@ function su(e) {
|
|
|
3295
3245
|
return n.parentNode;
|
|
3296
3246
|
},
|
|
3297
3247
|
configurable: !0
|
|
3298
|
-
}), pn(
|
|
3248
|
+
}), pn(f, a), o.appendChild(l), e.ref && e.ref(l), ct(() => o.removeChild(l));
|
|
3299
3249
|
}
|
|
3300
3250
|
}, void 0, {
|
|
3301
3251
|
render: !i
|
|
@@ -3307,9 +3257,9 @@ function ol(e, t) {
|
|
|
3307
3257
|
const s = n();
|
|
3308
3258
|
switch (typeof s) {
|
|
3309
3259
|
case "function":
|
|
3310
|
-
return
|
|
3260
|
+
return Z(() => s(t));
|
|
3311
3261
|
case "string":
|
|
3312
|
-
const r =
|
|
3262
|
+
const r = Ho.has(s), a = P.context ? sl() : Xs(s, r);
|
|
3313
3263
|
return el(a, t, r), a;
|
|
3314
3264
|
}
|
|
3315
3265
|
});
|
|
@@ -3406,7 +3356,7 @@ var fl = class {
|
|
|
3406
3356
|
findByName(e) {
|
|
3407
3357
|
return this.transfomers[e];
|
|
3408
3358
|
}
|
|
3409
|
-
}, hl = (e) => Object.prototype.toString.call(e).slice(8, -1), er = (e) => typeof e > "u", gl = (e) => e === null, ft = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype,
|
|
3359
|
+
}, hl = (e) => Object.prototype.toString.call(e).slice(8, -1), er = (e) => typeof e > "u", gl = (e) => e === null, ft = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, An = (e) => ft(e) && Object.keys(e).length === 0, we = (e) => Array.isArray(e), ml = (e) => typeof e == "string", El = (e) => typeof e == "number" && !isNaN(e), pl = (e) => typeof e == "boolean", yl = (e) => e instanceof RegExp, ht = (e) => e instanceof Map, gt = (e) => e instanceof Set, tr = (e) => hl(e) === "Symbol", Al = (e) => e instanceof Date && !isNaN(e.valueOf()), Tl = (e) => e instanceof Error, ss = (e) => typeof e == "number" && isNaN(e), Sl = (e) => pl(e) || gl(e) || er(e) || El(e) || ml(e) || tr(e), _l = (e) => typeof e == "bigint", Pl = (e) => e === 1 / 0 || e === -1 / 0, wl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), vl = (e) => e instanceof URL, nr = (e) => e.replace(/\./g, "\\."), un = (e) => e.map(String).map(nr).join("."), lt = (e) => {
|
|
3410
3360
|
const t = [];
|
|
3411
3361
|
let n = "";
|
|
3412
3362
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -3424,7 +3374,7 @@ var fl = class {
|
|
|
3424
3374
|
const s = n;
|
|
3425
3375
|
return t.push(s), t;
|
|
3426
3376
|
};
|
|
3427
|
-
function
|
|
3377
|
+
function fe(e, t, n, s) {
|
|
3428
3378
|
return {
|
|
3429
3379
|
isApplicable: e,
|
|
3430
3380
|
annotation: t,
|
|
@@ -3433,11 +3383,11 @@ function he(e, t, n, s) {
|
|
|
3433
3383
|
};
|
|
3434
3384
|
}
|
|
3435
3385
|
var sr = [
|
|
3436
|
-
|
|
3386
|
+
fe(er, "undefined", () => null, () => {
|
|
3437
3387
|
}),
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3388
|
+
fe(_l, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
3389
|
+
fe(Al, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
3390
|
+
fe(Tl, "Error", (e, t) => {
|
|
3441
3391
|
const n = {
|
|
3442
3392
|
name: e.name,
|
|
3443
3393
|
message: e.message
|
|
@@ -3451,11 +3401,11 @@ var sr = [
|
|
|
3451
3401
|
n[s] = e[s];
|
|
3452
3402
|
}), n;
|
|
3453
3403
|
}),
|
|
3454
|
-
|
|
3404
|
+
fe(yl, "regexp", (e) => "" + e, (e) => {
|
|
3455
3405
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
3456
3406
|
return new RegExp(t, n);
|
|
3457
3407
|
}),
|
|
3458
|
-
|
|
3408
|
+
fe(
|
|
3459
3409
|
gt,
|
|
3460
3410
|
"set",
|
|
3461
3411
|
// (sets only exist in es6+)
|
|
@@ -3463,10 +3413,10 @@ var sr = [
|
|
|
3463
3413
|
(e) => [...e.values()],
|
|
3464
3414
|
(e) => new Set(e)
|
|
3465
3415
|
),
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3416
|
+
fe(ht, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
3417
|
+
fe((e) => ss(e) || Pl(e), "number", (e) => ss(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
3418
|
+
fe((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
3419
|
+
fe(vl, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
3470
3420
|
];
|
|
3471
3421
|
function Zt(e, t, n, s) {
|
|
3472
3422
|
return {
|
|
@@ -3536,7 +3486,7 @@ sr.forEach((e) => {
|
|
|
3536
3486
|
cr[e.annotation] = e;
|
|
3537
3487
|
});
|
|
3538
3488
|
var Cl = (e, t, n) => {
|
|
3539
|
-
if (
|
|
3489
|
+
if (we(t))
|
|
3540
3490
|
switch (t[0]) {
|
|
3541
3491
|
case "symbol":
|
|
3542
3492
|
return rr.untransform(e, t, n);
|
|
@@ -3597,7 +3547,7 @@ var Nl = (e, t) => {
|
|
|
3597
3547
|
let s = e;
|
|
3598
3548
|
for (let a = 0; a < t.length - 1; a++) {
|
|
3599
3549
|
const i = t[a];
|
|
3600
|
-
if (
|
|
3550
|
+
if (we(s)) {
|
|
3601
3551
|
const o = +i;
|
|
3602
3552
|
s = s[o];
|
|
3603
3553
|
} else if (ft(s))
|
|
@@ -3608,19 +3558,19 @@ var Nl = (e, t) => {
|
|
|
3608
3558
|
} else if (ht(s)) {
|
|
3609
3559
|
if (a === t.length - 2)
|
|
3610
3560
|
break;
|
|
3611
|
-
const l = +i,
|
|
3612
|
-
switch (
|
|
3561
|
+
const l = +i, f = +t[++a] == 0 ? "key" : "value", d = Me(s, l);
|
|
3562
|
+
switch (f) {
|
|
3613
3563
|
case "key":
|
|
3614
|
-
s =
|
|
3564
|
+
s = d;
|
|
3615
3565
|
break;
|
|
3616
3566
|
case "value":
|
|
3617
|
-
s = s.get(
|
|
3567
|
+
s = s.get(d);
|
|
3618
3568
|
break;
|
|
3619
3569
|
}
|
|
3620
3570
|
}
|
|
3621
3571
|
}
|
|
3622
3572
|
const r = t[t.length - 1];
|
|
3623
|
-
if (
|
|
3573
|
+
if (we(s) ? s[+r] = n(s[+r]) : ft(s) && (s[r] = n(s[r])), gt(s)) {
|
|
3624
3574
|
const a = Me(s, +r), i = n(a);
|
|
3625
3575
|
a !== i && (s.delete(a), s.add(i));
|
|
3626
3576
|
}
|
|
@@ -3643,7 +3593,7 @@ var Nl = (e, t) => {
|
|
|
3643
3593
|
function Sn(e, t, n = []) {
|
|
3644
3594
|
if (!e)
|
|
3645
3595
|
return;
|
|
3646
|
-
if (!
|
|
3596
|
+
if (!we(e)) {
|
|
3647
3597
|
tt(e, (a, i) => Sn(a, t, [...n, ...lt(i)]));
|
|
3648
3598
|
return;
|
|
3649
3599
|
}
|
|
@@ -3657,14 +3607,14 @@ function Ll(e, t, n) {
|
|
|
3657
3607
|
e = Tn(e, r, (a) => Cl(a, s, n));
|
|
3658
3608
|
}), e;
|
|
3659
3609
|
}
|
|
3660
|
-
function
|
|
3610
|
+
function kl(e, t) {
|
|
3661
3611
|
function n(s, r) {
|
|
3662
3612
|
const a = Nl(e, lt(r));
|
|
3663
3613
|
s.map(lt).forEach((i) => {
|
|
3664
3614
|
e = Tn(e, i, () => a);
|
|
3665
3615
|
});
|
|
3666
3616
|
}
|
|
3667
|
-
if (
|
|
3617
|
+
if (we(t)) {
|
|
3668
3618
|
const [s, r] = t;
|
|
3669
3619
|
s.forEach((a) => {
|
|
3670
3620
|
e = Tn(e, lt(a), () => e);
|
|
@@ -3673,12 +3623,12 @@ function Gl(e, t) {
|
|
|
3673
3623
|
tt(t, n);
|
|
3674
3624
|
return e;
|
|
3675
3625
|
}
|
|
3676
|
-
var
|
|
3677
|
-
function
|
|
3626
|
+
var Ol = (e, t) => ft(e) || we(e) || ht(e) || gt(e) || ir(e, t);
|
|
3627
|
+
function Dl(e, t, n) {
|
|
3678
3628
|
const s = n.get(e);
|
|
3679
3629
|
s ? s.push(t) : n.set(e, [t]);
|
|
3680
3630
|
}
|
|
3681
|
-
function
|
|
3631
|
+
function Gl(e, t) {
|
|
3682
3632
|
const n = {};
|
|
3683
3633
|
let s;
|
|
3684
3634
|
return e.forEach((r) => {
|
|
@@ -3687,22 +3637,22 @@ function kl(e, t) {
|
|
|
3687
3637
|
t || (r = r.map((o) => o.map(String)).sort((o, l) => o.length - l.length));
|
|
3688
3638
|
const [a, ...i] = r;
|
|
3689
3639
|
a.length === 0 ? s = i.map(un) : n[un(a)] = i.map(un);
|
|
3690
|
-
}), s ?
|
|
3640
|
+
}), s ? An(n) ? [s] : [s, n] : An(n) ? void 0 : n;
|
|
3691
3641
|
}
|
|
3692
3642
|
var dr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
3693
3643
|
const o = Sl(e);
|
|
3694
3644
|
if (!o) {
|
|
3695
|
-
|
|
3696
|
-
const
|
|
3697
|
-
if (
|
|
3645
|
+
Dl(e, r, t);
|
|
3646
|
+
const g = i.get(e);
|
|
3647
|
+
if (g)
|
|
3698
3648
|
return s ? {
|
|
3699
3649
|
transformedValue: null
|
|
3700
|
-
} :
|
|
3650
|
+
} : g;
|
|
3701
3651
|
}
|
|
3702
|
-
if (!
|
|
3703
|
-
const
|
|
3704
|
-
transformedValue:
|
|
3705
|
-
annotations: [
|
|
3652
|
+
if (!Ol(e, n)) {
|
|
3653
|
+
const g = rs(e, n), A = g ? {
|
|
3654
|
+
transformedValue: g.value,
|
|
3655
|
+
annotations: [g.type]
|
|
3706
3656
|
} : {
|
|
3707
3657
|
transformedValue: e
|
|
3708
3658
|
};
|
|
@@ -3712,20 +3662,20 @@ var dr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3712
3662
|
return {
|
|
3713
3663
|
transformedValue: null
|
|
3714
3664
|
};
|
|
3715
|
-
const l = rs(e, n),
|
|
3716
|
-
tt(
|
|
3665
|
+
const l = rs(e, n), f = (l == null ? void 0 : l.value) ?? e, d = we(f) ? [] : {}, u = {};
|
|
3666
|
+
tt(f, (g, A) => {
|
|
3717
3667
|
if (A === "__proto__" || A === "constructor" || A === "prototype")
|
|
3718
3668
|
throw new Error(`Detected property ${A}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3719
|
-
const
|
|
3720
|
-
|
|
3721
|
-
u[nr(A) + "." +
|
|
3669
|
+
const T = dr(g, t, n, s, [...r, A], [...a, e], i);
|
|
3670
|
+
d[A] = T.transformedValue, we(T.annotations) ? u[A] = T.annotations : ft(T.annotations) && tt(T.annotations, (p, y) => {
|
|
3671
|
+
u[nr(A) + "." + y] = p;
|
|
3722
3672
|
});
|
|
3723
3673
|
});
|
|
3724
|
-
const h =
|
|
3725
|
-
transformedValue:
|
|
3674
|
+
const h = An(u) ? {
|
|
3675
|
+
transformedValue: d,
|
|
3726
3676
|
annotations: l ? [l.type] : void 0
|
|
3727
3677
|
} : {
|
|
3728
|
-
transformedValue:
|
|
3678
|
+
transformedValue: d,
|
|
3729
3679
|
annotations: l ? [l.type, u] : u
|
|
3730
3680
|
};
|
|
3731
3681
|
return o || i.set(e, h), h;
|
|
@@ -3779,7 +3729,7 @@ var x = class {
|
|
|
3779
3729
|
...s.meta,
|
|
3780
3730
|
values: n.annotations
|
|
3781
3731
|
});
|
|
3782
|
-
const r =
|
|
3732
|
+
const r = Gl(t, this.dedupe);
|
|
3783
3733
|
return r && (s.meta = {
|
|
3784
3734
|
...s.meta,
|
|
3785
3735
|
referentialEqualities: r
|
|
@@ -3788,7 +3738,7 @@ var x = class {
|
|
|
3788
3738
|
deserialize(e) {
|
|
3789
3739
|
const { json: t, meta: n } = e;
|
|
3790
3740
|
let s = _n(t);
|
|
3791
|
-
return n != null && n.values && (s = Ll(s, n.values, this)), n != null && n.referentialEqualities && (s =
|
|
3741
|
+
return n != null && n.values && (s = Ll(s, n.values, this)), n != null && n.referentialEqualities && (s = kl(s, n.referentialEqualities)), s;
|
|
3792
3742
|
}
|
|
3793
3743
|
stringify(e) {
|
|
3794
3744
|
return JSON.stringify(this.serialize(e));
|
|
@@ -3849,14 +3799,14 @@ var du = (e, t = !1) => {
|
|
|
3849
3799
|
json: n
|
|
3850
3800
|
} = Ul(e);
|
|
3851
3801
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
3852
|
-
},
|
|
3802
|
+
}, Ot = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, Bl = (e, t) => e.queryHash.localeCompare(t.queryHash), hr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, Ml = (e, t) => Ot(e) === Ot(t) ? hr(e, t) : Ot(e) > Ot(t) ? 1 : -1, fu = {
|
|
3853
3803
|
status: Ml,
|
|
3854
3804
|
"query hash": Bl,
|
|
3855
3805
|
"last updated": hr
|
|
3856
|
-
},
|
|
3806
|
+
}, Dt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, gr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Fl = (e, t) => Dt(e) === Dt(t) ? gr(e, t) : Dt(e) > Dt(t) ? 1 : -1, hu = {
|
|
3857
3807
|
status: Fl,
|
|
3858
3808
|
"last updated": gr
|
|
3859
|
-
}, gu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize),
|
|
3809
|
+
}, gu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), mu = () => {
|
|
3860
3810
|
const [e, t] = F("dark");
|
|
3861
3811
|
return wo(() => {
|
|
3862
3812
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
@@ -3866,7 +3816,7 @@ var du = (e, t = !1) => {
|
|
|
3866
3816
|
};
|
|
3867
3817
|
n.addEventListener("change", s), ct(() => n.removeEventListener("change", s));
|
|
3868
3818
|
}), e;
|
|
3869
|
-
},
|
|
3819
|
+
}, Gt = (e, t, n) => {
|
|
3870
3820
|
if (t.length === 0)
|
|
3871
3821
|
return n;
|
|
3872
3822
|
if (e instanceof Map) {
|
|
@@ -3874,10 +3824,10 @@ var du = (e, t = !1) => {
|
|
|
3874
3824
|
if (t.length === 1)
|
|
3875
3825
|
return s.set(t[0], n), s;
|
|
3876
3826
|
const [r, ...a] = t;
|
|
3877
|
-
return s.set(r,
|
|
3827
|
+
return s.set(r, Gt(s.get(r), a, n)), s;
|
|
3878
3828
|
}
|
|
3879
3829
|
if (e instanceof Set) {
|
|
3880
|
-
const s =
|
|
3830
|
+
const s = Gt(Array.from(e), t, n);
|
|
3881
3831
|
return new Set(s);
|
|
3882
3832
|
}
|
|
3883
3833
|
if (Array.isArray(e)) {
|
|
@@ -3885,7 +3835,7 @@ var du = (e, t = !1) => {
|
|
|
3885
3835
|
if (t.length === 1)
|
|
3886
3836
|
return s[t[0]] = n, s;
|
|
3887
3837
|
const [r, ...a] = t;
|
|
3888
|
-
return s[r] =
|
|
3838
|
+
return s[r] = Gt(s[r], a, n), s;
|
|
3889
3839
|
}
|
|
3890
3840
|
if (e instanceof Object) {
|
|
3891
3841
|
const s = {
|
|
@@ -3894,7 +3844,7 @@ var du = (e, t = !1) => {
|
|
|
3894
3844
|
if (t.length === 1)
|
|
3895
3845
|
return s[t[0]] = n, s;
|
|
3896
3846
|
const [r, ...a] = t;
|
|
3897
|
-
return s[r] =
|
|
3847
|
+
return s[r] = Gt(s[r], a, n), s;
|
|
3898
3848
|
}
|
|
3899
3849
|
return e;
|
|
3900
3850
|
}, xt = (e, t) => {
|
|
@@ -3926,24 +3876,24 @@ var du = (e, t = !1) => {
|
|
|
3926
3876
|
return n[s] = xt(n[s], r), n;
|
|
3927
3877
|
}
|
|
3928
3878
|
return e;
|
|
3929
|
-
},
|
|
3879
|
+
}, mr = (e, t) => {
|
|
3930
3880
|
if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
|
|
3931
3881
|
const s = document.createElement("style"), r = document.createTextNode("");
|
|
3932
3882
|
s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
|
|
3933
|
-
}, Fe,
|
|
3883
|
+
}, Fe, mt, Et, pt, Le, yt, qe, Ke, Ve, He, Qe, At, $e, Tt, cs, ql = (cs = class {
|
|
3934
3884
|
constructor(e) {
|
|
3935
3885
|
D(this, Fe);
|
|
3936
|
-
D(this, Et);
|
|
3937
3886
|
D(this, mt);
|
|
3887
|
+
D(this, Et);
|
|
3938
3888
|
D(this, pt);
|
|
3939
3889
|
D(this, Le, !1);
|
|
3940
|
-
D(this,
|
|
3890
|
+
D(this, yt);
|
|
3941
3891
|
D(this, qe);
|
|
3942
3892
|
D(this, Ke);
|
|
3943
|
-
D(this, He);
|
|
3944
3893
|
D(this, Ve);
|
|
3894
|
+
D(this, He);
|
|
3945
3895
|
D(this, Qe);
|
|
3946
|
-
D(this,
|
|
3896
|
+
D(this, At);
|
|
3947
3897
|
D(this, $e);
|
|
3948
3898
|
D(this, Tt);
|
|
3949
3899
|
const {
|
|
@@ -3955,45 +3905,45 @@ var du = (e, t = !1) => {
|
|
|
3955
3905
|
position: i,
|
|
3956
3906
|
initialIsOpen: o,
|
|
3957
3907
|
errorTypes: l,
|
|
3958
|
-
styleNonce:
|
|
3959
|
-
shadowDOMTarget:
|
|
3908
|
+
styleNonce: f,
|
|
3909
|
+
shadowDOMTarget: d,
|
|
3960
3910
|
hideDisabledQueries: u
|
|
3961
3911
|
} = e;
|
|
3962
|
-
|
|
3912
|
+
L(this, Fe, F(t)), L(this, Et, n), L(this, pt, s), L(this, mt, r), L(this, yt, f), L(this, qe, d), L(this, Ke, F(a)), L(this, Ve, F(i)), L(this, He, F(o)), L(this, Qe, F(l)), L(this, At, F(u));
|
|
3963
3913
|
}
|
|
3964
3914
|
setButtonPosition(e) {
|
|
3965
|
-
|
|
3915
|
+
S(this, Ke)[1](e);
|
|
3966
3916
|
}
|
|
3967
3917
|
setPosition(e) {
|
|
3968
|
-
|
|
3918
|
+
S(this, Ve)[1](e);
|
|
3969
3919
|
}
|
|
3970
3920
|
setInitialIsOpen(e) {
|
|
3971
|
-
|
|
3921
|
+
S(this, He)[1](e);
|
|
3972
3922
|
}
|
|
3973
3923
|
setErrorTypes(e) {
|
|
3974
|
-
|
|
3924
|
+
S(this, Qe)[1](e);
|
|
3975
3925
|
}
|
|
3976
3926
|
setClient(e) {
|
|
3977
|
-
|
|
3927
|
+
S(this, Fe)[1](e);
|
|
3978
3928
|
}
|
|
3979
3929
|
mount(e) {
|
|
3980
|
-
if (
|
|
3930
|
+
if (S(this, Le))
|
|
3981
3931
|
throw new Error("Devtools is already mounted");
|
|
3982
3932
|
const t = Ys(() => {
|
|
3983
|
-
const n = this, [s] =
|
|
3984
|
-
let
|
|
3985
|
-
return
|
|
3933
|
+
const n = this, [s] = S(this, Ke), [r] = S(this, Ve), [a] = S(this, He), [i] = S(this, Qe), [o] = S(this, At), [l] = S(this, Fe);
|
|
3934
|
+
let f;
|
|
3935
|
+
return S(this, $e) ? f = S(this, $e) : (f = zs(() => import("./NCMVHL6D-BwDANa-N.js")), L(this, $e, f)), mr(S(this, yt), S(this, qe)), $s(f, js({
|
|
3986
3936
|
get queryFlavor() {
|
|
3987
|
-
return
|
|
3937
|
+
return S(n, Et);
|
|
3988
3938
|
},
|
|
3989
3939
|
get version() {
|
|
3990
|
-
return
|
|
3940
|
+
return S(n, pt);
|
|
3991
3941
|
},
|
|
3992
3942
|
get onlineManager() {
|
|
3993
|
-
return
|
|
3943
|
+
return S(n, mt);
|
|
3994
3944
|
},
|
|
3995
3945
|
get shadowDOMTarget() {
|
|
3996
|
-
return
|
|
3946
|
+
return S(n, qe);
|
|
3997
3947
|
}
|
|
3998
3948
|
}, {
|
|
3999
3949
|
get client() {
|
|
@@ -4016,24 +3966,24 @@ var du = (e, t = !1) => {
|
|
|
4016
3966
|
}
|
|
4017
3967
|
}));
|
|
4018
3968
|
}, e);
|
|
4019
|
-
|
|
3969
|
+
L(this, Le, !0), L(this, Tt, t);
|
|
4020
3970
|
}
|
|
4021
3971
|
unmount() {
|
|
4022
3972
|
var e;
|
|
4023
|
-
if (!
|
|
3973
|
+
if (!S(this, Le))
|
|
4024
3974
|
throw new Error("Devtools is not mounted");
|
|
4025
|
-
(e =
|
|
3975
|
+
(e = S(this, Tt)) == null || e.call(this), L(this, Le, !1);
|
|
4026
3976
|
}
|
|
4027
|
-
}, Fe = new WeakMap(),
|
|
3977
|
+
}, Fe = new WeakMap(), mt = new WeakMap(), Et = new WeakMap(), pt = new WeakMap(), Le = new WeakMap(), yt = new WeakMap(), qe = new WeakMap(), Ke = new WeakMap(), Ve = new WeakMap(), He = new WeakMap(), Qe = new WeakMap(), At = new WeakMap(), $e = new WeakMap(), Tt = new WeakMap(), cs), je, St, _t, Pt, ke, wt, ze, We, Ye, Je, Xe, vt, Ze, et, bt, us, Kl = (us = class {
|
|
4028
3978
|
constructor(e) {
|
|
4029
3979
|
D(this, je);
|
|
4030
3980
|
D(this, St);
|
|
4031
3981
|
D(this, _t);
|
|
4032
3982
|
D(this, Pt);
|
|
4033
|
-
D(this,
|
|
3983
|
+
D(this, ke, !1);
|
|
4034
3984
|
D(this, wt);
|
|
4035
|
-
D(this, We);
|
|
4036
3985
|
D(this, ze);
|
|
3986
|
+
D(this, We);
|
|
4037
3987
|
D(this, Ye);
|
|
4038
3988
|
D(this, Je);
|
|
4039
3989
|
D(this, Xe);
|
|
@@ -4050,49 +4000,49 @@ var du = (e, t = !1) => {
|
|
|
4050
4000
|
position: i,
|
|
4051
4001
|
initialIsOpen: o,
|
|
4052
4002
|
errorTypes: l,
|
|
4053
|
-
styleNonce:
|
|
4054
|
-
shadowDOMTarget:
|
|
4003
|
+
styleNonce: f,
|
|
4004
|
+
shadowDOMTarget: d,
|
|
4055
4005
|
onClose: u,
|
|
4056
4006
|
hideDisabledQueries: h
|
|
4057
4007
|
} = e;
|
|
4058
|
-
|
|
4008
|
+
L(this, je, F(t)), L(this, _t, n), L(this, Pt, s), L(this, St, r), L(this, wt, f), L(this, ze, d), L(this, We, F(a)), L(this, Ye, F(i)), L(this, Je, F(o)), L(this, Xe, F(l)), L(this, vt, F(h)), L(this, Ze, F(u));
|
|
4059
4009
|
}
|
|
4060
4010
|
setButtonPosition(e) {
|
|
4061
|
-
|
|
4011
|
+
S(this, We)[1](e);
|
|
4062
4012
|
}
|
|
4063
4013
|
setPosition(e) {
|
|
4064
|
-
|
|
4014
|
+
S(this, Ye)[1](e);
|
|
4065
4015
|
}
|
|
4066
4016
|
setInitialIsOpen(e) {
|
|
4067
|
-
|
|
4017
|
+
S(this, Je)[1](e);
|
|
4068
4018
|
}
|
|
4069
4019
|
setErrorTypes(e) {
|
|
4070
|
-
|
|
4020
|
+
S(this, Xe)[1](e);
|
|
4071
4021
|
}
|
|
4072
4022
|
setClient(e) {
|
|
4073
|
-
|
|
4023
|
+
S(this, je)[1](e);
|
|
4074
4024
|
}
|
|
4075
4025
|
setOnClose(e) {
|
|
4076
|
-
|
|
4026
|
+
S(this, Ze)[1](() => e);
|
|
4077
4027
|
}
|
|
4078
4028
|
mount(e) {
|
|
4079
|
-
if (
|
|
4029
|
+
if (S(this, ke))
|
|
4080
4030
|
throw new Error("Devtools is already mounted");
|
|
4081
4031
|
const t = Ys(() => {
|
|
4082
|
-
const n = this, [s] =
|
|
4083
|
-
let
|
|
4084
|
-
return
|
|
4032
|
+
const n = this, [s] = S(this, We), [r] = S(this, Ye), [a] = S(this, Je), [i] = S(this, Xe), [o] = S(this, vt), [l] = S(this, je), [f] = S(this, Ze);
|
|
4033
|
+
let d;
|
|
4034
|
+
return S(this, et) ? d = S(this, et) : (d = zs(() => import("./2AITGKQY-tXLat8E2.js")), L(this, et, d)), mr(S(this, wt), S(this, ze)), $s(d, js({
|
|
4085
4035
|
get queryFlavor() {
|
|
4086
|
-
return
|
|
4036
|
+
return S(n, _t);
|
|
4087
4037
|
},
|
|
4088
4038
|
get version() {
|
|
4089
|
-
return
|
|
4039
|
+
return S(n, Pt);
|
|
4090
4040
|
},
|
|
4091
4041
|
get onlineManager() {
|
|
4092
|
-
return
|
|
4042
|
+
return S(n, St);
|
|
4093
4043
|
},
|
|
4094
4044
|
get shadowDOMTarget() {
|
|
4095
|
-
return
|
|
4045
|
+
return S(n, ze);
|
|
4096
4046
|
}
|
|
4097
4047
|
}, {
|
|
4098
4048
|
get client() {
|
|
@@ -4114,29 +4064,29 @@ var du = (e, t = !1) => {
|
|
|
4114
4064
|
return o();
|
|
4115
4065
|
},
|
|
4116
4066
|
get onClose() {
|
|
4117
|
-
return
|
|
4067
|
+
return f();
|
|
4118
4068
|
}
|
|
4119
4069
|
}));
|
|
4120
4070
|
}, e);
|
|
4121
|
-
|
|
4071
|
+
L(this, ke, !0), L(this, bt, t);
|
|
4122
4072
|
}
|
|
4123
4073
|
unmount() {
|
|
4124
4074
|
var e;
|
|
4125
|
-
if (!
|
|
4075
|
+
if (!S(this, ke))
|
|
4126
4076
|
throw new Error("Devtools is not mounted");
|
|
4127
|
-
(e =
|
|
4077
|
+
(e = S(this, bt)) == null || e.call(this), L(this, ke, !1);
|
|
4128
4078
|
}
|
|
4129
|
-
}, je = new WeakMap(), St = new WeakMap(), _t = new WeakMap(), Pt = new WeakMap(),
|
|
4130
|
-
function
|
|
4131
|
-
const t =
|
|
4079
|
+
}, je = new WeakMap(), St = new WeakMap(), _t = new WeakMap(), Pt = new WeakMap(), ke = new WeakMap(), wt = new WeakMap(), ze = new WeakMap(), We = new WeakMap(), Ye = new WeakMap(), Je = new WeakMap(), Xe = new WeakMap(), vt = new WeakMap(), Ze = new WeakMap(), et = new WeakMap(), bt = new WeakMap(), us);
|
|
4080
|
+
function Vl(e) {
|
|
4081
|
+
const t = W(e.client), n = z.useRef(null), {
|
|
4132
4082
|
buttonPosition: s,
|
|
4133
4083
|
position: r,
|
|
4134
4084
|
initialIsOpen: a,
|
|
4135
4085
|
errorTypes: i,
|
|
4136
4086
|
styleNonce: o,
|
|
4137
4087
|
shadowDOMTarget: l,
|
|
4138
|
-
hideDisabledQueries:
|
|
4139
|
-
} = e, [
|
|
4088
|
+
hideDisabledQueries: f
|
|
4089
|
+
} = e, [d] = z.useState(
|
|
4140
4090
|
new ql({
|
|
4141
4091
|
client: t,
|
|
4142
4092
|
queryFlavor: "React Query",
|
|
@@ -4148,25 +4098,25 @@ function Hl(e) {
|
|
|
4148
4098
|
errorTypes: i,
|
|
4149
4099
|
styleNonce: o,
|
|
4150
4100
|
shadowDOMTarget: l,
|
|
4151
|
-
hideDisabledQueries:
|
|
4101
|
+
hideDisabledQueries: f
|
|
4152
4102
|
})
|
|
4153
4103
|
);
|
|
4154
|
-
return
|
|
4155
|
-
|
|
4156
|
-
}, [t,
|
|
4157
|
-
s &&
|
|
4158
|
-
}, [s,
|
|
4159
|
-
r &&
|
|
4160
|
-
}, [r,
|
|
4161
|
-
|
|
4162
|
-
}, [a,
|
|
4163
|
-
|
|
4164
|
-
}, [i,
|
|
4165
|
-
|
|
4166
|
-
}), [
|
|
4104
|
+
return z.useEffect(() => {
|
|
4105
|
+
d.setClient(t);
|
|
4106
|
+
}, [t, d]), z.useEffect(() => {
|
|
4107
|
+
s && d.setButtonPosition(s);
|
|
4108
|
+
}, [s, d]), z.useEffect(() => {
|
|
4109
|
+
r && d.setPosition(r);
|
|
4110
|
+
}, [r, d]), z.useEffect(() => {
|
|
4111
|
+
d.setInitialIsOpen(a || !1);
|
|
4112
|
+
}, [a, d]), z.useEffect(() => {
|
|
4113
|
+
d.setErrorTypes(i || []);
|
|
4114
|
+
}, [i, d]), z.useEffect(() => (n.current && d.mount(n.current), () => {
|
|
4115
|
+
d.unmount();
|
|
4116
|
+
}), [d]), /* @__PURE__ */ c("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
|
|
4167
4117
|
}
|
|
4168
|
-
function
|
|
4169
|
-
const t =
|
|
4118
|
+
function Hl(e) {
|
|
4119
|
+
const t = W(e.client), n = z.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: a, hideDisabledQueries: i } = e, [o] = z.useState(
|
|
4170
4120
|
new Kl({
|
|
4171
4121
|
client: t,
|
|
4172
4122
|
queryFlavor: "React Query",
|
|
@@ -4182,14 +4132,14 @@ function Vl(e) {
|
|
|
4182
4132
|
hideDisabledQueries: i
|
|
4183
4133
|
})
|
|
4184
4134
|
);
|
|
4185
|
-
return
|
|
4135
|
+
return z.useEffect(() => {
|
|
4186
4136
|
o.setClient(t);
|
|
4187
|
-
}, [t, o]),
|
|
4137
|
+
}, [t, o]), z.useEffect(() => {
|
|
4188
4138
|
o.setOnClose(e.onClose ?? (() => {
|
|
4189
4139
|
}));
|
|
4190
|
-
}, [e.onClose, o]),
|
|
4140
|
+
}, [e.onClose, o]), z.useEffect(() => {
|
|
4191
4141
|
o.setErrorTypes(s || []);
|
|
4192
|
-
}, [s, o]),
|
|
4142
|
+
}, [s, o]), z.useEffect(() => (n.current && o.mount(n.current), () => {
|
|
4193
4143
|
o.unmount();
|
|
4194
4144
|
}), [o]), /* @__PURE__ */ c(
|
|
4195
4145
|
"div",
|
|
@@ -4202,26 +4152,26 @@ function Vl(e) {
|
|
|
4202
4152
|
}
|
|
4203
4153
|
var is = process.env.NODE_ENV !== "development" ? function() {
|
|
4204
4154
|
return null;
|
|
4205
|
-
} :
|
|
4155
|
+
} : Vl;
|
|
4206
4156
|
process.env.NODE_ENV;
|
|
4207
|
-
const Ql =
|
|
4157
|
+
const Ql = Ee(""), $l = () => {
|
|
4208
4158
|
qn("dynamic-page-selector", {
|
|
4209
4159
|
description: "Dynamic page selector"
|
|
4210
4160
|
}), qn("enable-add-page-dropdown", {
|
|
4211
4161
|
description: "Enable add page dropdown"
|
|
4212
4162
|
});
|
|
4213
4163
|
}, jl = () => {
|
|
4214
|
-
const e =
|
|
4215
|
-
return
|
|
4216
|
-
queryKey: [
|
|
4164
|
+
const e = k(), t = C();
|
|
4165
|
+
return ae({
|
|
4166
|
+
queryKey: [E.GET_COLLECTIONS],
|
|
4217
4167
|
staleTime: 1 / 0,
|
|
4218
|
-
queryFn: async () => t(e, { action:
|
|
4168
|
+
queryFn: async () => t(e, { action: E.GET_COLLECTIONS })
|
|
4219
4169
|
});
|
|
4220
|
-
},
|
|
4221
|
-
const { data: e } =
|
|
4170
|
+
}, zl = () => {
|
|
4171
|
+
const { data: e } = ie(), { data: t } = be(), { data: n } = Re(), s = k(), r = C(), a = j(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]);
|
|
4222
4172
|
return X({
|
|
4223
4173
|
mutationFn: async ({ block: i }) => r(s, {
|
|
4224
|
-
action:
|
|
4174
|
+
action: E.GET_BLOCK_ASYNC_PROPS,
|
|
4225
4175
|
data: {
|
|
4226
4176
|
block: i,
|
|
4227
4177
|
lang: (t == null ? void 0 : t.lang) || a,
|
|
@@ -4241,8 +4191,8 @@ const Ql = pe(""), $l = () => {
|
|
|
4241
4191
|
}
|
|
4242
4192
|
})
|
|
4243
4193
|
});
|
|
4244
|
-
},
|
|
4245
|
-
const [, e] =
|
|
4194
|
+
}, Wl = () => {
|
|
4195
|
+
const [, e] = oe();
|
|
4246
4196
|
return Q(
|
|
4247
4197
|
(t, n) => {
|
|
4248
4198
|
const r = new URLSearchParams(window.location.search).get("lang"), a = new URLSearchParams({ page: t });
|
|
@@ -4251,45 +4201,45 @@ const Ql = pe(""), $l = () => {
|
|
|
4251
4201
|
[e]
|
|
4252
4202
|
);
|
|
4253
4203
|
}, Yl = () => {
|
|
4254
|
-
const e =
|
|
4204
|
+
const e = Wl();
|
|
4255
4205
|
return Q(
|
|
4256
4206
|
({ pageId: t }) => {
|
|
4257
4207
|
e(t);
|
|
4258
4208
|
},
|
|
4259
4209
|
[e]
|
|
4260
4210
|
);
|
|
4261
|
-
}, Jl = K(() => import("./digital-asset-manager-
|
|
4211
|
+
}, Jl = K(() => import("./digital-asset-manager-BWZlrwFf.js")), Xl = K(() => import("./save-to-lib-SpilaoOL.js")), Zl = K(() => import("./theme-panel-footer-B6leVWSV.js")), ec = K(() => import("./web-preview-Cq82TNaS.js"));
|
|
4262
4212
|
$l();
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4213
|
+
Wa();
|
|
4214
|
+
zr(Xi);
|
|
4215
|
+
yo();
|
|
4216
|
+
Wr(Jl);
|
|
4267
4217
|
Yr(Xl);
|
|
4268
4218
|
const tc = {
|
|
4269
4219
|
role: "",
|
|
4270
4220
|
permissions: null
|
|
4271
4221
|
}, os = (e) => {
|
|
4272
4222
|
ao(), di();
|
|
4273
|
-
const t =
|
|
4274
|
-
st.current =
|
|
4275
|
-
const [
|
|
4276
|
-
|
|
4277
|
-
const
|
|
4278
|
-
document.hidden ?
|
|
4223
|
+
const t = On(), { data: n = tc, isFetching: s } = io(), { data: r, isFetching: a } = Ce(), { data: i, isFetching: o } = jl(), { data: l, isFetching: f } = Re(), d = s || a || o || f, [u] = oe(), h = u.get("page"), { data: g } = ie(), { data: A, isFetching: T } = no(), { blocks: p } = to(A), { lockingStatus: y, pageLock: _ } = Ie(), { data: b, isFetching: O } = so(), B = Zi(), { onSave: N } = oo(), { mutateAsync: pe } = zl(), { getPartialBlocks: ye, getPartialBlockBlocks: U } = lo(), { mutateAsync: w } = Ii(), { mutateAsync: v } = ro(), Y = Yl(), [$, le] = q(!1), st = it([]), _e = j(() => V(l, "theme", {}) || {}, [l]), rt = he(y) && (_ == null ? void 0 : _.status) === "editing", Ne = (_ == null ? void 0 : _.status) === "checking", xn = T || Ne || O;
|
|
4224
|
+
st.current = p;
|
|
4225
|
+
const [Er] = te(Ql);
|
|
4226
|
+
ne(() => {
|
|
4227
|
+
const ce = () => {
|
|
4228
|
+
document.hidden ? le(!0) : le(!1);
|
|
4279
4229
|
};
|
|
4280
|
-
return window.addEventListener("visibilitychange",
|
|
4230
|
+
return window.addEventListener("visibilitychange", ce), () => window.removeEventListener("visibilitychange", ce);
|
|
4281
4231
|
}, []);
|
|
4282
4232
|
const pr = j(() => {
|
|
4283
|
-
const
|
|
4284
|
-
return n && (
|
|
4285
|
-
}, [n]),
|
|
4286
|
-
async (
|
|
4233
|
+
const ce = {};
|
|
4234
|
+
return n && (ce.permissions = V(n, "permissions", null), ce.role = V(n, "role", "user")), ce;
|
|
4235
|
+
}, [n]), yr = Q(
|
|
4236
|
+
async (ce, Ct) => await w({ pageType: ce, query: Ct }),
|
|
4287
4237
|
[w]
|
|
4288
4238
|
);
|
|
4289
|
-
return /* @__PURE__ */
|
|
4290
|
-
xn && /* @__PURE__ */ c(Ns, { className:
|
|
4291
|
-
|
|
4292
|
-
|
|
4239
|
+
return /* @__PURE__ */ m(ge, { children: [
|
|
4240
|
+
xn && /* @__PURE__ */ c(Ns, { className: d ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ c(Ft, { className: `animate-spin text-primary ${d ? "h-6 w-6" : "h-5 w-5"}` }) }),
|
|
4241
|
+
Er && /* @__PURE__ */ c(
|
|
4242
|
+
H,
|
|
4293
4243
|
{
|
|
4294
4244
|
fallback: /* @__PURE__ */ c("div", { className: "absolute inset-0 z-[999999] flex min-h-screen w-screen items-center justify-center bg-gray-100", children: /* @__PURE__ */ c(Ft, { className: "h-6 w-6 animate-spin text-primary" }) }),
|
|
4295
4245
|
children: /* @__PURE__ */ c(ec, {})
|
|
@@ -4300,11 +4250,11 @@ const tc = {
|
|
|
4300
4250
|
{
|
|
4301
4251
|
gotoPage: Y,
|
|
4302
4252
|
collections: i ?? [],
|
|
4303
|
-
getBlockAsyncProps:
|
|
4304
|
-
pageExternalData:
|
|
4253
|
+
getBlockAsyncProps: pe,
|
|
4254
|
+
pageExternalData: b,
|
|
4305
4255
|
themePresets: e.themePresets ?? [],
|
|
4306
|
-
pageId:
|
|
4307
|
-
loading:
|
|
4256
|
+
pageId: g == null ? void 0 : g.id,
|
|
4257
|
+
loading: T,
|
|
4308
4258
|
fallbackLang: t,
|
|
4309
4259
|
languages: (l == null ? void 0 : l.languages) || [],
|
|
4310
4260
|
brandingOptions: (l == null ? void 0 : l.theme) || {},
|
|
@@ -4314,26 +4264,26 @@ const tc = {
|
|
|
4314
4264
|
autoSave: !$ && rt && (e.autoSave ?? !0),
|
|
4315
4265
|
autoSaveInterval: e.autoSaveInterval ?? 15,
|
|
4316
4266
|
onError: e.onError || console.error,
|
|
4317
|
-
getPartialBlockBlocks:
|
|
4267
|
+
getPartialBlockBlocks: U,
|
|
4318
4268
|
getPartialBlocks: ye,
|
|
4319
|
-
blocks:
|
|
4320
|
-
theme: xr(
|
|
4269
|
+
blocks: T ? [] : p,
|
|
4270
|
+
theme: xr(_e),
|
|
4321
4271
|
pageTypes: r,
|
|
4322
|
-
searchPageTypeItems:
|
|
4323
|
-
askAiCallBack:
|
|
4324
|
-
onSave: async ({ blocks:
|
|
4272
|
+
searchPageTypeItems: yr,
|
|
4273
|
+
askAiCallBack: B,
|
|
4274
|
+
onSave: async ({ blocks: ce, theme: Ct, needTranslations: Ar }) => {
|
|
4325
4275
|
if (!h) return !0;
|
|
4326
|
-
st.current =
|
|
4327
|
-
const Rn = [...
|
|
4328
|
-
return await
|
|
4276
|
+
st.current = ce;
|
|
4277
|
+
const Rn = [...ce];
|
|
4278
|
+
return await N({ page: h, blocks: Rn, needTranslations: Ar }), st.current = Rn, Rr(Ct, _e) || await v({ settings: { theme: Ct } }), !0;
|
|
4329
4279
|
},
|
|
4330
4280
|
themePanelComponent: Zl,
|
|
4331
4281
|
...pr
|
|
4332
4282
|
}
|
|
4333
4283
|
),
|
|
4334
|
-
/* @__PURE__ */
|
|
4335
|
-
/* @__PURE__ */ c(
|
|
4336
|
-
/* @__PURE__ */ c(
|
|
4284
|
+
/* @__PURE__ */ m("div", { children: [
|
|
4285
|
+
/* @__PURE__ */ c(mi, { isFetchingPage: xn }),
|
|
4286
|
+
/* @__PURE__ */ c(Ei, {})
|
|
4337
4287
|
] })
|
|
4338
4288
|
] });
|
|
4339
4289
|
}, nc = new Fr({
|
|
@@ -4344,9 +4294,9 @@ const tc = {
|
|
|
4344
4294
|
refetchOnMount: !1
|
|
4345
4295
|
}
|
|
4346
4296
|
}
|
|
4347
|
-
}),
|
|
4297
|
+
}), Eu = (e) => {
|
|
4348
4298
|
const [, t] = In(), [n, s] = q(!1);
|
|
4349
|
-
return
|
|
4299
|
+
return ne(() => (t(
|
|
4350
4300
|
Pn(e, [
|
|
4351
4301
|
"apiUrl",
|
|
4352
4302
|
"usersApiUrl",
|
|
@@ -4365,20 +4315,20 @@ const tc = {
|
|
|
4365
4315
|
s(!0);
|
|
4366
4316
|
}, 200), () => {
|
|
4367
4317
|
s(!1), t({});
|
|
4368
|
-
}), [e, t]), n ?
|
|
4318
|
+
}), [e, t]), n ? V(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(ge, { children: [
|
|
4369
4319
|
/* @__PURE__ */ c(os, { ...e }),
|
|
4370
4320
|
/* @__PURE__ */ c(is, {})
|
|
4371
|
-
] }) : /* @__PURE__ */
|
|
4321
|
+
] }) : /* @__PURE__ */ m(qr, { client: nc, children: [
|
|
4372
4322
|
/* @__PURE__ */ c(os, { ...e }),
|
|
4373
4323
|
/* @__PURE__ */ c(is, {})
|
|
4374
4324
|
] }) : /* @__PURE__ */ c("div", {});
|
|
4375
|
-
}, sc =
|
|
4325
|
+
}, sc = z.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
|
|
4376
4326
|
function rc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
4377
|
-
const [r, a] =
|
|
4378
|
-
return /* @__PURE__ */
|
|
4379
|
-
/* @__PURE__ */
|
|
4380
|
-
/* @__PURE__ */ c(
|
|
4381
|
-
|
|
4327
|
+
const [r, a] = z.useState(!1);
|
|
4328
|
+
return /* @__PURE__ */ m(ma, { open: r, onOpenChange: a, children: [
|
|
4329
|
+
/* @__PURE__ */ m(zt, { children: [
|
|
4330
|
+
/* @__PURE__ */ c(Wt, { asChild: !0, children: /* @__PURE__ */ c(Ea, { asChild: !0, children: /* @__PURE__ */ c(
|
|
4331
|
+
M,
|
|
4382
4332
|
{
|
|
4383
4333
|
size: "sm",
|
|
4384
4334
|
variant: "outline",
|
|
@@ -4400,7 +4350,7 @@ function rc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4400
4350
|
) }) }),
|
|
4401
4351
|
/* @__PURE__ */ c(Yt, { children: "Add field" })
|
|
4402
4352
|
] }),
|
|
4403
|
-
r && /* @__PURE__ */ c(
|
|
4353
|
+
r && /* @__PURE__ */ c(z.Suspense, { children: /* @__PURE__ */ c(
|
|
4404
4354
|
sc,
|
|
4405
4355
|
{
|
|
4406
4356
|
data: e,
|
|
@@ -4413,23 +4363,23 @@ function rc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4413
4363
|
] });
|
|
4414
4364
|
}
|
|
4415
4365
|
const pu = () => {
|
|
4416
|
-
const { savePageAsync: e } =
|
|
4366
|
+
const { savePageAsync: e } = Ge(), t = W();
|
|
4417
4367
|
return Q(async () => {
|
|
4418
|
-
await e(), t.invalidateQueries({ queryKey: [
|
|
4368
|
+
await e(), t.invalidateQueries({ queryKey: [E.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [E.GET_BUILDER_PAGE_DATA] });
|
|
4419
4369
|
}, [e, t]);
|
|
4420
|
-
},
|
|
4421
|
-
const e =
|
|
4370
|
+
}, yu = () => {
|
|
4371
|
+
const e = W();
|
|
4422
4372
|
return Q(() => {
|
|
4423
4373
|
e.clear();
|
|
4424
4374
|
}, [e]);
|
|
4425
|
-
},
|
|
4426
|
-
const e =
|
|
4375
|
+
}, Au = () => {
|
|
4376
|
+
const e = k(), t = C(), { data: n } = be(), s = W();
|
|
4427
4377
|
return X({
|
|
4428
4378
|
mutationFn: async (r) => {
|
|
4429
4379
|
if (!(n != null && n.id))
|
|
4430
4380
|
throw new Error("No active page found");
|
|
4431
4381
|
return await t(`${e}`, {
|
|
4432
|
-
action:
|
|
4382
|
+
action: E.UPDATE_PAGE_METADATA,
|
|
4433
4383
|
data: {
|
|
4434
4384
|
id: n.id,
|
|
4435
4385
|
metadata: r
|
|
@@ -4438,16 +4388,16 @@ const pu = () => {
|
|
|
4438
4388
|
},
|
|
4439
4389
|
onSuccess: () => {
|
|
4440
4390
|
s.invalidateQueries({
|
|
4441
|
-
queryKey: [
|
|
4391
|
+
queryKey: [E.GET_BUILDER_PAGE_DATA]
|
|
4442
4392
|
}), s.invalidateQueries({
|
|
4443
|
-
queryKey: [
|
|
4393
|
+
queryKey: [E.GET_LANGUAGE_PAGES]
|
|
4444
4394
|
});
|
|
4445
4395
|
},
|
|
4446
4396
|
onError: () => {
|
|
4447
4397
|
console.error("Failed to update metadata");
|
|
4448
4398
|
}
|
|
4449
4399
|
});
|
|
4450
|
-
}, ac = K(() => import("./digital-asset-manager-
|
|
4400
|
+
}, ac = K(() => import("./digital-asset-manager-BWZlrwFf.js")), Tu = ({
|
|
4451
4401
|
assetId: e,
|
|
4452
4402
|
assetUrl: t,
|
|
4453
4403
|
onChange: n,
|
|
@@ -4455,50 +4405,50 @@ const pu = () => {
|
|
|
4455
4405
|
placeholder: r = "Select an image",
|
|
4456
4406
|
disabled: a = !1
|
|
4457
4407
|
}) => {
|
|
4458
|
-
const
|
|
4459
|
-
a ||
|
|
4408
|
+
const { t: i } = ve(), [o, l] = q(!1), f = () => {
|
|
4409
|
+
a || l(!0);
|
|
4460
4410
|
}, d = () => {
|
|
4461
|
-
|
|
4462
|
-
},
|
|
4463
|
-
const
|
|
4464
|
-
|
|
4465
|
-
},
|
|
4411
|
+
l(!1);
|
|
4412
|
+
}, u = (A) => {
|
|
4413
|
+
const T = Array.isArray(A) ? A[0] : A;
|
|
4414
|
+
T != null && T.url && n(Pn(T, ["url", "id"])), l(!1);
|
|
4415
|
+
}, h = () => {
|
|
4466
4416
|
n({ url: "", id: "" });
|
|
4467
|
-
},
|
|
4468
|
-
return /* @__PURE__ */
|
|
4469
|
-
t ? /* @__PURE__ */
|
|
4470
|
-
|
|
4417
|
+
}, g = (t == null ? void 0 : t.startsWith("{{")) && (t == null ? void 0 : t.endsWith("}}"));
|
|
4418
|
+
return /* @__PURE__ */ m("div", { className: `w-full ${s}`, children: [
|
|
4419
|
+
t ? /* @__PURE__ */ m("div", { className: "relative overflow-hidden rounded-md border", children: [
|
|
4420
|
+
g ? /* @__PURE__ */ c("div", { className: "flex h-12 items-center bg-gray-100 px-4", children: /* @__PURE__ */ c("p", { className: "text-xs text-gray-500", children: t }) }) : /* @__PURE__ */ c(
|
|
4471
4421
|
"img",
|
|
4472
4422
|
{
|
|
4473
|
-
onClick:
|
|
4423
|
+
onClick: f,
|
|
4474
4424
|
src: t,
|
|
4475
|
-
alt: "Selected image",
|
|
4425
|
+
alt: i("Selected image"),
|
|
4476
4426
|
className: "h-auto max-h-[100px] w-full bg-gray-100 object-contain"
|
|
4477
4427
|
}
|
|
4478
4428
|
),
|
|
4479
|
-
/* @__PURE__ */
|
|
4429
|
+
/* @__PURE__ */ m("div", { className: "absolute right-2 top-2 flex gap-2", children: [
|
|
4480
4430
|
/* @__PURE__ */ c(
|
|
4481
|
-
|
|
4431
|
+
M,
|
|
4482
4432
|
{
|
|
4483
4433
|
type: "button",
|
|
4484
4434
|
variant: "outline",
|
|
4485
4435
|
size: "icon",
|
|
4486
4436
|
className: "h-8 w-8 rounded-full bg-white text-red-500",
|
|
4487
|
-
onClick:
|
|
4437
|
+
onClick: h,
|
|
4488
4438
|
disabled: a,
|
|
4489
|
-
children:
|
|
4439
|
+
children: g ? /* @__PURE__ */ c(zn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(qa, { className: "h-4 w-4" })
|
|
4490
4440
|
}
|
|
4491
4441
|
),
|
|
4492
|
-
!
|
|
4493
|
-
|
|
4442
|
+
!g && /* @__PURE__ */ c(
|
|
4443
|
+
M,
|
|
4494
4444
|
{
|
|
4495
4445
|
type: "button",
|
|
4496
4446
|
variant: "outline",
|
|
4497
4447
|
size: "icon",
|
|
4498
4448
|
className: "h-8 w-8 rounded-full bg-white/80 hover:bg-white/90",
|
|
4499
|
-
onClick:
|
|
4449
|
+
onClick: f,
|
|
4500
4450
|
disabled: a,
|
|
4501
|
-
children: /* @__PURE__ */ c(
|
|
4451
|
+
children: /* @__PURE__ */ c(Wn, { className: "h-4 w-4" })
|
|
4502
4452
|
}
|
|
4503
4453
|
)
|
|
4504
4454
|
] })
|
|
@@ -4506,33 +4456,33 @@ const pu = () => {
|
|
|
4506
4456
|
"div",
|
|
4507
4457
|
{
|
|
4508
4458
|
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"}`,
|
|
4509
|
-
onClick:
|
|
4510
|
-
children: /* @__PURE__ */
|
|
4511
|
-
/* @__PURE__ */ c(
|
|
4459
|
+
onClick: f,
|
|
4460
|
+
children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center gap-2", children: [
|
|
4461
|
+
/* @__PURE__ */ c(Wn, { className: "h-10 w-10 text-gray-400" }),
|
|
4512
4462
|
/* @__PURE__ */ c("p", { className: "text-sm text-gray-500", children: r })
|
|
4513
4463
|
] })
|
|
4514
4464
|
}
|
|
4515
4465
|
),
|
|
4516
|
-
/* @__PURE__ */ c(
|
|
4517
|
-
/* @__PURE__ */
|
|
4518
|
-
/* @__PURE__ */ c(
|
|
4466
|
+
/* @__PURE__ */ c(As, { open: o, onOpenChange: l, children: /* @__PURE__ */ m(pa, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
|
|
4467
|
+
/* @__PURE__ */ m(ya, { className: "hidden border-b px-4 py-2", children: [
|
|
4468
|
+
/* @__PURE__ */ c(Aa, { children: i("Select Image") }),
|
|
4519
4469
|
/* @__PURE__ */ c(
|
|
4520
|
-
|
|
4470
|
+
M,
|
|
4521
4471
|
{
|
|
4522
4472
|
type: "button",
|
|
4523
4473
|
variant: "ghost",
|
|
4524
4474
|
size: "icon",
|
|
4525
4475
|
className: "absolute right-4 top-2",
|
|
4526
4476
|
onClick: d,
|
|
4527
|
-
children: /* @__PURE__ */ c(
|
|
4477
|
+
children: /* @__PURE__ */ c(zn, { className: "h-4 w-4" })
|
|
4528
4478
|
}
|
|
4529
4479
|
)
|
|
4530
4480
|
] }),
|
|
4531
|
-
/* @__PURE__ */ c("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ c(
|
|
4481
|
+
/* @__PURE__ */ c("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
4532
4482
|
ac,
|
|
4533
4483
|
{
|
|
4534
4484
|
close: d,
|
|
4535
|
-
onSelect:
|
|
4485
|
+
onSelect: u,
|
|
4536
4486
|
mode: "image",
|
|
4537
4487
|
assetId: e
|
|
4538
4488
|
}
|
|
@@ -4640,11 +4590,11 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4640
4590
|
return { isValid: !0, parsed: JSON.parse(s), error: null, placeholders: n };
|
|
4641
4591
|
} catch (a) {
|
|
4642
4592
|
const i = a, o = i.message.match(/position (\d+)/), l = o ? parseInt(o[1]) : void 0;
|
|
4643
|
-
let
|
|
4593
|
+
let f, d;
|
|
4644
4594
|
if (l !== void 0) {
|
|
4645
4595
|
const u = s.substring(0, l).split(`
|
|
4646
4596
|
`);
|
|
4647
|
-
|
|
4597
|
+
f = u.length, d = u[u.length - 1].length + 1;
|
|
4648
4598
|
}
|
|
4649
4599
|
return {
|
|
4650
4600
|
isValid: !1,
|
|
@@ -4652,8 +4602,8 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4652
4602
|
placeholders: n,
|
|
4653
4603
|
error: {
|
|
4654
4604
|
message: i.message,
|
|
4655
|
-
line:
|
|
4656
|
-
column:
|
|
4605
|
+
line: f,
|
|
4606
|
+
column: d,
|
|
4657
4607
|
position: l
|
|
4658
4608
|
}
|
|
4659
4609
|
};
|
|
@@ -4670,11 +4620,11 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4670
4620
|
const s = /{{([^{}]+)}}/g;
|
|
4671
4621
|
let r;
|
|
4672
4622
|
for (; (r = s.exec(n)) !== null; ) {
|
|
4673
|
-
const a = r[1], i =
|
|
4623
|
+
const a = r[1], i = V(t, a, null);
|
|
4674
4624
|
n = n.replace(r[0], i);
|
|
4675
4625
|
}
|
|
4676
4626
|
return n;
|
|
4677
|
-
}, fc = K(() => import("./shared-json-ld-
|
|
4627
|
+
}, fc = K(() => import("./shared-json-ld-D_YyVPk3.js")), Su = ({
|
|
4678
4628
|
value: e,
|
|
4679
4629
|
onChange: t,
|
|
4680
4630
|
disabled: n = !1,
|
|
@@ -4684,35 +4634,35 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4684
4634
|
id: i = "json-input",
|
|
4685
4635
|
pageData: o = {},
|
|
4686
4636
|
handleFieldInsert: l,
|
|
4687
|
-
hasJsonLdForSelectedLang:
|
|
4688
|
-
copyJsonLDFromDefaultPage:
|
|
4637
|
+
hasJsonLdForSelectedLang: f,
|
|
4638
|
+
copyJsonLDFromDefaultPage: d
|
|
4689
4639
|
}) => {
|
|
4690
|
-
const [u, h] = q("edit"), [
|
|
4691
|
-
|
|
4640
|
+
const [u, h] = q("edit"), [g, A] = q(null), [T, p] = q(""), y = it(null), [_] = In(), b = i === "jsonLD" && V(_, "features.sharedJsonLD", !1), O = i === "jsonLD" && !f && !!d;
|
|
4641
|
+
ne(() => {
|
|
4692
4642
|
e.trim() === "" && t("{}");
|
|
4693
4643
|
}, [e, t]);
|
|
4694
|
-
const
|
|
4644
|
+
const B = (U) => {
|
|
4695
4645
|
if (s) return;
|
|
4696
|
-
const w =
|
|
4646
|
+
const w = U.target.value;
|
|
4697
4647
|
t(w);
|
|
4698
|
-
},
|
|
4699
|
-
if (
|
|
4700
|
-
|
|
4701
|
-
const w =
|
|
4648
|
+
}, N = (U) => {
|
|
4649
|
+
if (U.key === "Tab") {
|
|
4650
|
+
U.preventDefault();
|
|
4651
|
+
const w = U.currentTarget, v = w.selectionStart, Y = w.selectionEnd;
|
|
4702
4652
|
if (v !== Y) {
|
|
4703
|
-
const
|
|
4653
|
+
const le = e.substring(v, Y).split(`
|
|
4704
4654
|
`);
|
|
4705
|
-
if (
|
|
4706
|
-
const
|
|
4707
|
-
`), rt = e.substring(0, v) +
|
|
4655
|
+
if (U.shiftKey) {
|
|
4656
|
+
const _e = le.map((Ne) => Ne.startsWith(" ") ? Ne.substring(2) : Ne).join(`
|
|
4657
|
+
`), rt = e.substring(0, v) + _e + e.substring(Y);
|
|
4708
4658
|
t(rt), setTimeout(() => {
|
|
4709
|
-
w.selectionStart = v, w.selectionEnd = v +
|
|
4659
|
+
w.selectionStart = v, w.selectionEnd = v + _e.length;
|
|
4710
4660
|
}, 0);
|
|
4711
4661
|
} else {
|
|
4712
|
-
const
|
|
4713
|
-
`), rt = e.substring(0, v) +
|
|
4662
|
+
const _e = le.map((Ne) => ` ${Ne}`).join(`
|
|
4663
|
+
`), rt = e.substring(0, v) + _e + e.substring(Y);
|
|
4714
4664
|
t(rt), setTimeout(() => {
|
|
4715
|
-
w.selectionStart = v, w.selectionEnd = v +
|
|
4665
|
+
w.selectionStart = v, w.selectionEnd = v + _e.length;
|
|
4716
4666
|
}, 0);
|
|
4717
4667
|
}
|
|
4718
4668
|
} else {
|
|
@@ -4723,95 +4673,95 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4723
4673
|
}
|
|
4724
4674
|
}
|
|
4725
4675
|
};
|
|
4726
|
-
|
|
4727
|
-
const
|
|
4728
|
-
if (
|
|
4729
|
-
if (A(null),
|
|
4730
|
-
const w = dc(
|
|
4731
|
-
|
|
4676
|
+
ne(() => {
|
|
4677
|
+
const U = ls(e);
|
|
4678
|
+
if (U.isValid)
|
|
4679
|
+
if (A(null), U.parsed) {
|
|
4680
|
+
const w = dc(U.parsed, o);
|
|
4681
|
+
p(w);
|
|
4732
4682
|
} else
|
|
4733
|
-
|
|
4683
|
+
p("");
|
|
4734
4684
|
else
|
|
4735
|
-
A(
|
|
4685
|
+
A(U.error), p("");
|
|
4736
4686
|
}, [e, o]);
|
|
4737
|
-
const
|
|
4738
|
-
const
|
|
4739
|
-
if (
|
|
4740
|
-
const w = uc(
|
|
4687
|
+
const pe = () => {
|
|
4688
|
+
const U = ls(e);
|
|
4689
|
+
if (U.isValid && U.parsed) {
|
|
4690
|
+
const w = uc(U.parsed, U.placeholders);
|
|
4741
4691
|
t(w);
|
|
4742
4692
|
}
|
|
4743
4693
|
}, ye = () => {
|
|
4744
|
-
|
|
4694
|
+
g != null && g.position && y.current && (y.current.focus(), y.current.setSelectionRange(g.position, g.position + 1));
|
|
4745
4695
|
};
|
|
4746
|
-
return /* @__PURE__ */ c(oc, { fallback: /* @__PURE__ */ c("div", { children: "Some error" }), children: /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */
|
|
4747
|
-
/* @__PURE__ */
|
|
4748
|
-
/* @__PURE__ */
|
|
4749
|
-
/* @__PURE__ */
|
|
4696
|
+
return /* @__PURE__ */ c(oc, { fallback: /* @__PURE__ */ c("div", { children: "Some error" }), children: /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ m(Ta, { value: u, onValueChange: h, className: "w-full", children: [
|
|
4697
|
+
/* @__PURE__ */ m("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
4698
|
+
/* @__PURE__ */ m(Sa, { className: "w-max", children: [
|
|
4699
|
+
/* @__PURE__ */ m(tn, { value: "edit", className: "flex items-center gap-1", children: [
|
|
4750
4700
|
/* @__PURE__ */ c(Ka, { className: "h-4 w-4" }),
|
|
4751
4701
|
/* @__PURE__ */ c("span", { children: "Edit" })
|
|
4752
4702
|
] }),
|
|
4753
|
-
/* @__PURE__ */
|
|
4703
|
+
/* @__PURE__ */ m(
|
|
4754
4704
|
tn,
|
|
4755
4705
|
{
|
|
4756
4706
|
value: "preview",
|
|
4757
4707
|
className: "flex items-center gap-1",
|
|
4758
|
-
disabled: !e.trim() ||
|
|
4708
|
+
disabled: !e.trim() || g !== null || O,
|
|
4759
4709
|
children: [
|
|
4760
|
-
/* @__PURE__ */ c(
|
|
4710
|
+
/* @__PURE__ */ c(Va, { className: "h-4 w-4" }),
|
|
4761
4711
|
/* @__PURE__ */ c("span", { children: "Preview" })
|
|
4762
4712
|
]
|
|
4763
4713
|
}
|
|
4764
4714
|
),
|
|
4765
|
-
|
|
4715
|
+
b && /* @__PURE__ */ m(
|
|
4766
4716
|
tn,
|
|
4767
4717
|
{
|
|
4768
4718
|
value: "shared",
|
|
4769
4719
|
className: "flex items-center gap-1",
|
|
4770
|
-
disabled: !e.trim() ||
|
|
4720
|
+
disabled: !e.trim() || g !== null,
|
|
4771
4721
|
children: [
|
|
4772
|
-
/* @__PURE__ */ c(
|
|
4722
|
+
/* @__PURE__ */ c(Ha, { className: "h-4 w-4" }),
|
|
4773
4723
|
/* @__PURE__ */ c("span", { children: "Shared" })
|
|
4774
4724
|
]
|
|
4775
4725
|
}
|
|
4776
4726
|
)
|
|
4777
4727
|
] }),
|
|
4778
|
-
|
|
4728
|
+
O ? null : u === "edit" && !s && /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ c(
|
|
4779
4729
|
rc,
|
|
4780
4730
|
{
|
|
4781
4731
|
dataType: "value",
|
|
4782
4732
|
data: o ?? {},
|
|
4783
|
-
onSelect: (
|
|
4733
|
+
onSelect: (U) => l && l(U, i)
|
|
4784
4734
|
}
|
|
4785
4735
|
) })
|
|
4786
4736
|
] }),
|
|
4787
|
-
/* @__PURE__ */
|
|
4788
|
-
!
|
|
4789
|
-
|
|
4737
|
+
/* @__PURE__ */ m(nn, { value: "edit", className: "relative mt-0", children: [
|
|
4738
|
+
!O && u === "edit" && /* @__PURE__ */ c(Dn, { content: "Format JSON", side: "right", showTooltip: !n && !g, children: /* @__PURE__ */ c(
|
|
4739
|
+
M,
|
|
4790
4740
|
{
|
|
4791
4741
|
type: "button",
|
|
4792
4742
|
variant: "outline",
|
|
4793
4743
|
size: "icon",
|
|
4794
|
-
onClick:
|
|
4744
|
+
onClick: pe,
|
|
4795
4745
|
className: "absolute right-1 top-1 h-6 w-6 p-1",
|
|
4796
|
-
disabled: !e.trim() || n ||
|
|
4746
|
+
disabled: !e.trim() || n || g !== null,
|
|
4797
4747
|
children: /* @__PURE__ */ c(Qa, {})
|
|
4798
4748
|
}
|
|
4799
4749
|
) }),
|
|
4800
|
-
|
|
4750
|
+
O ? /* @__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: [
|
|
4801
4751
|
/* @__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." }),
|
|
4802
|
-
/* @__PURE__ */
|
|
4752
|
+
/* @__PURE__ */ m(M, { type: "button", variant: "default", size: "sm", onClick: d, children: [
|
|
4803
4753
|
/* @__PURE__ */ c(Ts, {}),
|
|
4804
4754
|
"Copy & Edit from default language"
|
|
4805
4755
|
] })
|
|
4806
4756
|
] }) }) : /* @__PURE__ */ c(
|
|
4807
4757
|
Kn,
|
|
4808
4758
|
{
|
|
4809
|
-
ref:
|
|
4759
|
+
ref: y,
|
|
4810
4760
|
id: i,
|
|
4811
4761
|
name: i,
|
|
4812
|
-
className: `rounded-md border border-input text-xs ${
|
|
4813
|
-
onChange:
|
|
4814
|
-
onKeyDown:
|
|
4762
|
+
className: `rounded-md border border-input text-xs ${g ? "border-red-500" : ""}`,
|
|
4763
|
+
onChange: B,
|
|
4764
|
+
onKeyDown: N,
|
|
4815
4765
|
value: e,
|
|
4816
4766
|
placeholder: r,
|
|
4817
4767
|
rows: a,
|
|
@@ -4819,19 +4769,19 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4819
4769
|
readOnly: s
|
|
4820
4770
|
}
|
|
4821
4771
|
),
|
|
4822
|
-
|
|
4772
|
+
g && /* @__PURE__ */ m(_a, { variant: "destructive", className: "mt-2", children: [
|
|
4823
4773
|
/* @__PURE__ */ c($a, { className: "h-4 w-4" }),
|
|
4824
|
-
/* @__PURE__ */
|
|
4774
|
+
/* @__PURE__ */ m(Pa, { className: "flex flex-col", children: [
|
|
4825
4775
|
/* @__PURE__ */ c("span", { className: "font-medium", children: "Invalid JSON" }),
|
|
4826
|
-
/* @__PURE__ */ c("span", { className: "text-sm", children:
|
|
4827
|
-
|
|
4776
|
+
/* @__PURE__ */ c("span", { className: "text-sm", children: g.message }),
|
|
4777
|
+
g.line && g.column && /* @__PURE__ */ m("span", { className: "text-sm", children: [
|
|
4828
4778
|
"Error at line ",
|
|
4829
|
-
|
|
4779
|
+
g.line,
|
|
4830
4780
|
", column ",
|
|
4831
|
-
|
|
4781
|
+
g.column
|
|
4832
4782
|
] }),
|
|
4833
4783
|
/* @__PURE__ */ c(
|
|
4834
|
-
|
|
4784
|
+
M,
|
|
4835
4785
|
{
|
|
4836
4786
|
type: "button",
|
|
4837
4787
|
variant: "link",
|
|
@@ -4844,14 +4794,14 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4844
4794
|
] })
|
|
4845
4795
|
] })
|
|
4846
4796
|
] }),
|
|
4847
|
-
/* @__PURE__ */
|
|
4848
|
-
/* @__PURE__ */ c(Kn, { rows: a, value:
|
|
4797
|
+
/* @__PURE__ */ m(nn, { value: "preview", className: "mt-0", children: [
|
|
4798
|
+
/* @__PURE__ */ c(Kn, { rows: a, value: T, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
|
|
4849
4799
|
/* @__PURE__ */ c("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
|
|
4850
4800
|
] }),
|
|
4851
|
-
|
|
4801
|
+
b && /* @__PURE__ */ c(nn, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(fc, {}) }) })
|
|
4852
4802
|
] }) }) });
|
|
4853
4803
|
}, hc = () => {
|
|
4854
|
-
const e =
|
|
4804
|
+
const e = re("getAccessToken");
|
|
4855
4805
|
return {
|
|
4856
4806
|
getAccessToken: Q(async () => {
|
|
4857
4807
|
try {
|
|
@@ -4900,111 +4850,110 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4900
4850
|
if (typeof window > "u")
|
|
4901
4851
|
throw new Error("@chaibuilder/pages is not available on the server");
|
|
4902
4852
|
export {
|
|
4903
|
-
|
|
4904
|
-
|
|
4853
|
+
Wc as $,
|
|
4854
|
+
E as A,
|
|
4905
4855
|
Ns as B,
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4856
|
+
js as C,
|
|
4857
|
+
xo as D,
|
|
4858
|
+
$c as E,
|
|
4859
|
+
jc as F,
|
|
4860
|
+
De as G,
|
|
4861
|
+
En as H,
|
|
4862
|
+
zc as I,
|
|
4863
|
+
Vc as J,
|
|
4864
|
+
eu as K,
|
|
4915
4865
|
Lt as L,
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4866
|
+
ct as M,
|
|
4867
|
+
ru as N,
|
|
4868
|
+
tu as O,
|
|
4919
4869
|
su as P,
|
|
4920
|
-
|
|
4921
|
-
|
|
4870
|
+
wo as Q,
|
|
4871
|
+
tl as R,
|
|
4922
4872
|
Jc as S,
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4873
|
+
Dn as T,
|
|
4874
|
+
pn as U,
|
|
4875
|
+
Yo as V,
|
|
4876
|
+
lu as W,
|
|
4877
|
+
cu as X,
|
|
4878
|
+
el as Y,
|
|
4879
|
+
uu as Z,
|
|
4880
|
+
du as _,
|
|
4931
4881
|
ro as a,
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
Uc as az,
|
|
4882
|
+
Kc as a0,
|
|
4883
|
+
nu as a1,
|
|
4884
|
+
Z as a2,
|
|
4885
|
+
So as a3,
|
|
4886
|
+
Ul as a4,
|
|
4887
|
+
Yc as a5,
|
|
4888
|
+
Gt as a6,
|
|
4889
|
+
gu as a7,
|
|
4890
|
+
ou as a8,
|
|
4891
|
+
iu as a9,
|
|
4892
|
+
qc as aA,
|
|
4893
|
+
Bc as aB,
|
|
4894
|
+
Fi as aC,
|
|
4895
|
+
Cc as aD,
|
|
4896
|
+
vs as aE,
|
|
4897
|
+
so as aF,
|
|
4898
|
+
bi as aG,
|
|
4899
|
+
In as aH,
|
|
4900
|
+
Ti as aI,
|
|
4901
|
+
rc as aJ,
|
|
4902
|
+
Tu as aK,
|
|
4903
|
+
bc as aL,
|
|
4904
|
+
oc as aM,
|
|
4905
|
+
Eu as aN,
|
|
4906
|
+
be as aO,
|
|
4907
|
+
yu as aP,
|
|
4908
|
+
Yl as aQ,
|
|
4909
|
+
pu as aR,
|
|
4910
|
+
Au as aS,
|
|
4911
|
+
It as aT,
|
|
4912
|
+
io as aU,
|
|
4913
|
+
_u as aV,
|
|
4914
|
+
Xa as aW,
|
|
4915
|
+
Rs as aa,
|
|
4916
|
+
Oe as ab,
|
|
4917
|
+
Jo as ac,
|
|
4918
|
+
au as ad,
|
|
4919
|
+
Zc as ae,
|
|
4920
|
+
Xc as af,
|
|
4921
|
+
xt as ag,
|
|
4922
|
+
Qc as ah,
|
|
4923
|
+
oi as ai,
|
|
4924
|
+
fi as aj,
|
|
4925
|
+
k as ak,
|
|
4926
|
+
C as al,
|
|
4927
|
+
Wl as am,
|
|
4928
|
+
xc as an,
|
|
4929
|
+
kn as ao,
|
|
4930
|
+
ie as ap,
|
|
4931
|
+
rn as aq,
|
|
4932
|
+
ue as ar,
|
|
4933
|
+
Nn as as,
|
|
4934
|
+
Ic as at,
|
|
4935
|
+
Rc as au,
|
|
4936
|
+
Mc as av,
|
|
4937
|
+
Su as aw,
|
|
4938
|
+
ls as ax,
|
|
4939
|
+
Uc as ay,
|
|
4940
|
+
Fc as az,
|
|
4992
4941
|
bs as b,
|
|
4993
4942
|
Nc as c,
|
|
4994
4943
|
Lc as d,
|
|
4995
4944
|
Re as e,
|
|
4996
|
-
|
|
4945
|
+
On as f,
|
|
4997
4946
|
xe as g,
|
|
4998
4947
|
Ce as h,
|
|
4999
|
-
|
|
4948
|
+
oe as i,
|
|
5000
4949
|
Ps as j,
|
|
5001
4950
|
ni as k,
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
4951
|
+
Oc as l,
|
|
4952
|
+
kc as m,
|
|
4953
|
+
Dc as n,
|
|
4954
|
+
Gc as o,
|
|
5006
4955
|
Ql as p,
|
|
5007
|
-
|
|
4956
|
+
mu as q,
|
|
5008
4957
|
J as r,
|
|
5009
4958
|
$s as s,
|
|
5010
4959
|
an as t,
|