@chaibuilder/pages 0.1.12 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{B4MFY5CR-CcpRg1Cw.js → B4MFY5CR-B3BX-4Z5.js} +1 -1
- package/dist/{B4MFY5CR-CdU8UnB1.cjs → B4MFY5CR-BORsrcGw.cjs} +1 -1
- package/dist/{ChaiBuilderPages-C1PAObEw.js → ChaiBuilderPages-Blnid_U8.js} +446 -446
- package/dist/{ChaiBuilderPages-CKHiUGGt.cjs → ChaiBuilderPages-CaShr_yk.cjs} +2 -2
- package/dist/{HO4MOOFI-WZTzdpUu.js → HO4MOOFI-BYkfnhhc.js} +2 -2
- package/dist/{HO4MOOFI-AByDJVwi.cjs → HO4MOOFI-Csb2PXFS.cjs} +1 -1
- package/dist/{HUY7CZI3-DUJQUW1-.js → HUY7CZI3-DOIW2MPF.js} +2 -2
- package/dist/{HUY7CZI3-BOWRdFPo.cjs → HUY7CZI3-vNTBR-fr.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
|
@@ -4,18 +4,18 @@ var Ss = (e) => {
|
|
|
4
4
|
var bs = (e, t, n) => t.has(e) || Ss("Cannot " + n);
|
|
5
5
|
var O = (e, t, n) => (bs(e, t, "read from private field"), n ? n.call(e) : t.get(e)), J = (e, t, n) => t.has(e) ? Ss("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Y = (e, t, n, s) => (bs(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
6
6
|
import { jsx as a, jsxs as c, Fragment as me } from "react/jsx-runtime";
|
|
7
|
-
import { useLibraryBlocks as Ea,
|
|
8
|
-
import { loadWebBlocks as
|
|
9
|
-
import { useQueryClient as Ae, onlineManager as qs, useQuery as xe, useMutation as De, QueryClient as
|
|
7
|
+
import { useLibraryBlocks as Ea, getBlocksFromHTML as Sa, PERMISSIONS as ba, usePermissions as An, useLanguages as ot, useBlocksStore as Hs, useTranslation as wa, useTheme as Na, mergeClasses as Aa, useSavePage as Vs, useRightPanel as xa, ChaiBuilderEditor as Ta } from "@chaibuilder/sdk";
|
|
8
|
+
import { loadWebBlocks as Ca } from "@chaibuilder/sdk/web-blocks";
|
|
9
|
+
import { useQueryClient as Ae, onlineManager as qs, useQuery as xe, useMutation as De, QueryClient as Pa, QueryClientProvider as _a } from "@tanstack/react-query";
|
|
10
10
|
import * as le from "react";
|
|
11
11
|
import $s, { useCallback as ke, useMemo as ue, useState as M, useEffect as Pe, useRef as pn } from "react";
|
|
12
|
-
import { get as
|
|
13
|
-
import { AlertCircle as
|
|
12
|
+
import { get as ne, isEmpty as ce, find as ge, filter as ve, includes as Gt, has as Ks, pick as js, keys as Ia, pickBy as La, endsWith as zs, isArray as ka, startCase as es, reverse as Da, sortBy as Ga, startsWith as Lt, isEqual as ts, map as Le, toLower as _t, trim as Ua, each as Oa, cloneDeep as Ws, compact as Qs, concat as Ys, orderBy as sn, first as Ra, uniq as Ma, debounce as Ba, isString as ws } from "lodash-es";
|
|
13
|
+
import { AlertCircle as Fa, StarIcon as Ha, MoreHorizontal as ns, PencilIcon as Va, Power as Xs, TrashIcon as qa, LockIcon as Zs, UserIcon as $a, AlertTriangleIcon as Ka, SquareLibrary as Js, DatabaseIcon as ja, ChevronLeft as za, ChevronRight as Wa, Search as Qa, File as xn, Plus as er, StarsIcon as Ya, Globe as Xa, Pencil as Za, Trash as ss, Logs as Ja, Loader as tr, Languages as nr, ChevronDown as sr, Star as ei, History as Ns, ArrowUpRight as ti, Clock as ni, Undo2 as rr, CloudOff as si, Edit as ri, Save as ar, GlobeIcon as ai, Eye as ii, Palette as li, CheckCircle as oi, Send as As, Rocket as xs, Settings as ci, ExternalLink as ui, Loader2 as di } from "lucide-react";
|
|
14
14
|
import { atom as rs, useAtom as as } from "jotai";
|
|
15
15
|
import { toast as ie } from "sonner";
|
|
16
|
-
import { useRegisteredChaiBlocks as
|
|
17
|
-
import { Dialog as $e, DialogContent as Ke, DialogHeader as je, DialogTitle as ze, DialogDescription as Ze, Alert as ir, Label as
|
|
18
|
-
import { format as Tn, formatDistanceToNow as
|
|
16
|
+
import { useRegisteredChaiBlocks as hi, getDefaultBlockProps as fi } from "@chaibuilder/runtime";
|
|
17
|
+
import { Dialog as $e, DialogContent as Ke, DialogHeader as je, DialogTitle as ze, DialogDescription as Ze, Alert as ir, Label as re, Input as be, DialogFooter as tt, Button as H, DropdownMenu as Xt, DropdownMenuTrigger as Zt, DropdownMenuContent as Jt, DropdownMenuItem as Ce, Card as lr, CardHeader as or, CardTitle as cr, CardContent as ur, CardFooter as dr, AlertDialog as mi, AlertDialogTrigger as gi, AlertDialogContent as pi, AlertDialogHeader as yi, AlertDialogTitle as vi, AlertDialogDescription as Ei, AlertDialogFooter as Si, AlertDialogCancel as bi, AlertDialogAction as wi, Tabs as Ni, TabsList as Ai, TabsTrigger as Ts, Select as Mn, SelectTrigger as Bn, SelectValue as Fn, SelectContent as Hn, SelectItem as Vn, Popover as xi, Tooltip as is, TooltipTrigger as ls, PopoverTrigger as Ti, TooltipContent as os, PopoverContent as Ci, Command as Pi, CommandInput as _i, CommandList as Ii, CommandEmpty as Li, CommandGroup as ki, CommandItem as Cs, AlertDescription as Di, Accordion as Gi, AccordionItem as rn, AccordionTrigger as an, AccordionContent as ln, Textarea as on, Badge as Ps, Sheet as hr, SheetContent as fr, SheetHeader as mr, SheetTitle as gr, Separator as Ui, TooltipProvider as pr, SheetTrigger as Oi, ScrollArea as Ri, Skeleton as cn, DropdownMenuSeparator as Mi } from "@chaibuilder/sdk/ui";
|
|
18
|
+
import { format as Tn, formatDistanceToNow as Bi } from "date-fns";
|
|
19
19
|
var R = {
|
|
20
20
|
context: void 0,
|
|
21
21
|
registry: void 0,
|
|
@@ -35,14 +35,14 @@ function _s(e) {
|
|
|
35
35
|
function It(e) {
|
|
36
36
|
R.context = e;
|
|
37
37
|
}
|
|
38
|
-
var
|
|
39
|
-
equals:
|
|
38
|
+
var Fi = (e, t) => e === t, yn = Symbol("solid-proxy"), yr = typeof Proxy == "function", vr = Symbol("solid-track"), vn = {
|
|
39
|
+
equals: Fi
|
|
40
40
|
}, Er = xr, Je = 1, En = 2, Sr = {
|
|
41
41
|
owned: null,
|
|
42
42
|
cleanups: null,
|
|
43
43
|
context: null,
|
|
44
44
|
owner: null
|
|
45
|
-
}, Dn = {}, Q = null, Gn = null,
|
|
45
|
+
}, Dn = {}, Q = null, Gn = null, Hi = null, ee = null, we = null, Xe = null, Cn = 0;
|
|
46
46
|
function it(e, t) {
|
|
47
47
|
const n = ee, s = Q, r = e.length === 0, i = t === void 0 ? s : t, l = r ? Sr : {
|
|
48
48
|
owned: null,
|
|
@@ -67,7 +67,7 @@ function fe(e, t) {
|
|
|
67
67
|
}, s = (r) => (typeof r == "function" && (r = r(n.value)), Ar(n, r));
|
|
68
68
|
return [Nr.bind(n), s];
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Vi(e, t, n) {
|
|
71
71
|
const s = Pn(e, t, !0, Je);
|
|
72
72
|
Pt(s);
|
|
73
73
|
}
|
|
@@ -76,7 +76,7 @@ function lt(e, t, n) {
|
|
|
76
76
|
Pt(s);
|
|
77
77
|
}
|
|
78
78
|
function br(e, t, n) {
|
|
79
|
-
Er =
|
|
79
|
+
Er = Zi;
|
|
80
80
|
const s = Pn(e, t, !1, Je);
|
|
81
81
|
(!n || !n.render) && (s.user = !0), Xe ? Xe.push(s) : Pt(s);
|
|
82
82
|
}
|
|
@@ -85,10 +85,10 @@ function _e(e, t, n) {
|
|
|
85
85
|
const s = Pn(e, t, !0, 0);
|
|
86
86
|
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, Pt(s), Nr.bind(s);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function qi(e) {
|
|
89
89
|
return e && typeof e == "object" && "then" in e;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function $i(e, t, n) {
|
|
92
92
|
let s, r, i;
|
|
93
93
|
arguments.length === 1 ? (s = !0, r = e, i = {}) : (s = e, r = t, i = {});
|
|
94
94
|
let l = null, o = Dn, u = null, d = !1, f = "initialValue" in i, m = typeof s == "function" && _e(s);
|
|
@@ -112,7 +112,7 @@ function Vi(e, t, n) {
|
|
|
112
112
|
}, !1);
|
|
113
113
|
}
|
|
114
114
|
function T() {
|
|
115
|
-
const N =
|
|
115
|
+
const N = Qi, k = v(), V = w();
|
|
116
116
|
if (V !== void 0 && !l)
|
|
117
117
|
throw V;
|
|
118
118
|
return ee && ee.user, k;
|
|
@@ -132,7 +132,7 @@ function Vi(e, t, n) {
|
|
|
132
132
|
refetching: N
|
|
133
133
|
})
|
|
134
134
|
);
|
|
135
|
-
return
|
|
135
|
+
return qi(V) ? (l = V, "value" in V ? (V.status === "success" ? C(l, V.value, void 0, k) : C(l, void 0, qn(V.value), k), V) : (d = !0, queueMicrotask(() => d = !1), Ve(() => {
|
|
136
136
|
E(f ? "refreshing" : "pending"), A();
|
|
137
137
|
}, !1), V.then(
|
|
138
138
|
(W) => C(V, W, void 0, k),
|
|
@@ -162,7 +162,7 @@ function Vi(e, t, n) {
|
|
|
162
162
|
return v();
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
}), m ?
|
|
165
|
+
}), m ? Vi(() => L(!1)) : L(!1), [
|
|
166
166
|
T,
|
|
167
167
|
{
|
|
168
168
|
refetch: L,
|
|
@@ -170,7 +170,7 @@ function Vi(e, t, n) {
|
|
|
170
170
|
}
|
|
171
171
|
];
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function Uc(e) {
|
|
174
174
|
return Ve(e, !1);
|
|
175
175
|
}
|
|
176
176
|
function Ee(e) {
|
|
@@ -184,7 +184,7 @@ function Ee(e) {
|
|
|
184
184
|
ee = t;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function Oc(e, t, n) {
|
|
188
188
|
const s = Array.isArray(e);
|
|
189
189
|
let r, i = n && n.defer;
|
|
190
190
|
return (l) => {
|
|
@@ -201,7 +201,7 @@ function Gc(e, t, n) {
|
|
|
201
201
|
return r = o, u;
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function Ki(e) {
|
|
205
205
|
br(() => Ee(e));
|
|
206
206
|
}
|
|
207
207
|
function Ut(e) {
|
|
@@ -210,7 +210,7 @@ function Ut(e) {
|
|
|
210
210
|
function Is() {
|
|
211
211
|
return Q;
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function ji(e, t) {
|
|
214
214
|
const n = Q, s = ee;
|
|
215
215
|
Q = e, ee = null;
|
|
216
216
|
try {
|
|
@@ -221,7 +221,7 @@ function $i(e, t) {
|
|
|
221
221
|
Q = n, ee = s;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function zi(e) {
|
|
225
225
|
const t = ee, n = Q;
|
|
226
226
|
return Promise.resolve().then(() => {
|
|
227
227
|
ee = t, Q = n;
|
|
@@ -229,19 +229,19 @@ function Ki(e) {
|
|
|
229
229
|
return Ve(e, !1), ee = Q = null, s ? s.done : void 0;
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
|
-
var [
|
|
233
|
-
function
|
|
234
|
-
return [
|
|
232
|
+
var [Wi, Rc] = /* @__PURE__ */ fe(!1);
|
|
233
|
+
function Mc() {
|
|
234
|
+
return [Wi, zi];
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function Bc(e, t) {
|
|
237
237
|
const n = Symbol("context");
|
|
238
238
|
return {
|
|
239
239
|
id: n,
|
|
240
|
-
Provider:
|
|
240
|
+
Provider: Ji(n),
|
|
241
241
|
defaultValue: e
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function Fc(e) {
|
|
245
245
|
let t;
|
|
246
246
|
return Q && Q.context && (t = Q.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
247
247
|
}
|
|
@@ -252,7 +252,7 @@ function wr(e) {
|
|
|
252
252
|
return Array.isArray(s) ? s : s != null ? [s] : [];
|
|
253
253
|
}, n;
|
|
254
254
|
}
|
|
255
|
-
var
|
|
255
|
+
var Qi;
|
|
256
256
|
function Nr() {
|
|
257
257
|
if (this.sources && this.state)
|
|
258
258
|
if (this.state === Je)
|
|
@@ -283,13 +283,13 @@ function Pt(e) {
|
|
|
283
283
|
return;
|
|
284
284
|
Ot(e);
|
|
285
285
|
const t = Cn;
|
|
286
|
-
|
|
286
|
+
Yi(
|
|
287
287
|
e,
|
|
288
288
|
e.value,
|
|
289
289
|
t
|
|
290
290
|
);
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function Yi(e, t, n) {
|
|
293
293
|
let s;
|
|
294
294
|
const r = Q, i = ee;
|
|
295
295
|
ee = Q = e;
|
|
@@ -343,12 +343,12 @@ function Ve(e, t) {
|
|
|
343
343
|
t || (we = []), Xe ? n = !0 : Xe = [], Cn++;
|
|
344
344
|
try {
|
|
345
345
|
const s = e();
|
|
346
|
-
return
|
|
346
|
+
return Xi(n), s;
|
|
347
347
|
} catch (s) {
|
|
348
348
|
n || (Xe = null), we = null, cs(s);
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function Xi(e) {
|
|
352
352
|
if (we && (xr(we), we = null), e)
|
|
353
353
|
return;
|
|
354
354
|
const t = Xe;
|
|
@@ -358,7 +358,7 @@ function xr(e) {
|
|
|
358
358
|
for (let t = 0; t < e.length; t++)
|
|
359
359
|
Sn(e[t]);
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function Zi(e) {
|
|
362
362
|
let t, n = 0;
|
|
363
363
|
for (t = 0; t < e.length; t++) {
|
|
364
364
|
const s = e[t];
|
|
@@ -438,7 +438,7 @@ function $n(e) {
|
|
|
438
438
|
}
|
|
439
439
|
return e;
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function Ji(e, t) {
|
|
442
442
|
return function(s) {
|
|
443
443
|
let r;
|
|
444
444
|
return lt(
|
|
@@ -455,7 +455,7 @@ function wn(e) {
|
|
|
455
455
|
for (let t = 0; t < e.length; t++)
|
|
456
456
|
e[t]();
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function el(e, t, n = {}) {
|
|
459
459
|
let s = [], r = [], i = [], l = 0, o = t.length > 1 ? [] : null;
|
|
460
460
|
return Ut(() => wn(i)), () => {
|
|
461
461
|
let u = e() || [], d = u.length, f, m;
|
|
@@ -491,7 +491,7 @@ function Zi(e, t, n = {}) {
|
|
|
491
491
|
}
|
|
492
492
|
};
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function tl(e, t, n = {}) {
|
|
495
495
|
let s = [], r = [], i = [], l = [], o = 0, u;
|
|
496
496
|
return Ut(() => wn(i)), () => {
|
|
497
497
|
const d = e() || [], f = d.length;
|
|
@@ -544,7 +544,7 @@ var jn = {
|
|
|
544
544
|
function Un(e) {
|
|
545
545
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
546
546
|
}
|
|
547
|
-
function
|
|
547
|
+
function nl() {
|
|
548
548
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
549
549
|
const n = this[e]();
|
|
550
550
|
if (n !== void 0)
|
|
@@ -597,7 +597,7 @@ function Pr(...e) {
|
|
|
597
597
|
s[f] = m.get ? {
|
|
598
598
|
enumerable: !0,
|
|
599
599
|
configurable: !0,
|
|
600
|
-
get:
|
|
600
|
+
get: nl.bind(n[f] = [m.get.bind(o)])
|
|
601
601
|
} : m.value !== void 0 ? m : void 0;
|
|
602
602
|
else {
|
|
603
603
|
const b = n[f];
|
|
@@ -612,7 +612,7 @@ function Pr(...e) {
|
|
|
612
612
|
}
|
|
613
613
|
return r;
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function sl(e, ...t) {
|
|
616
616
|
if (yr && yn in e) {
|
|
617
617
|
const r = new Set(t.length > 1 ? t.flat() : t[0]), i = t.map((l) => new Proxy(
|
|
618
618
|
{
|
|
@@ -665,7 +665,7 @@ function _r(e) {
|
|
|
665
665
|
!R.done && It(i), R.count--, u(() => d.default), It();
|
|
666
666
|
}), t = o;
|
|
667
667
|
} else if (!t) {
|
|
668
|
-
const [o] =
|
|
668
|
+
const [o] = $i(() => (n || (n = e())).then((u) => u.default));
|
|
669
669
|
t = o;
|
|
670
670
|
}
|
|
671
671
|
let l;
|
|
@@ -682,24 +682,24 @@ function _r(e) {
|
|
|
682
682
|
};
|
|
683
683
|
return s.preload = () => n || ((n = e()).then((r) => t = () => r.default), n), s;
|
|
684
684
|
}
|
|
685
|
-
var
|
|
686
|
-
function
|
|
687
|
-
return R.context ? R.getNextContextId() : `cl-${
|
|
685
|
+
var rl = 0;
|
|
686
|
+
function Hc() {
|
|
687
|
+
return R.context ? R.getNextContextId() : `cl-${rl++}`;
|
|
688
688
|
}
|
|
689
689
|
var Ir = (e) => `Stale read from <${e}>.`;
|
|
690
|
-
function
|
|
690
|
+
function Vc(e) {
|
|
691
691
|
const t = "fallback" in e && {
|
|
692
692
|
fallback: () => e.fallback
|
|
693
693
|
};
|
|
694
|
-
return _e(
|
|
694
|
+
return _e(el(() => e.each, e.children, t || void 0));
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function qc(e) {
|
|
697
697
|
const t = "fallback" in e && {
|
|
698
698
|
fallback: () => e.fallback
|
|
699
699
|
};
|
|
700
|
-
return _e(
|
|
700
|
+
return _e(tl(() => e.each, e.children, t || void 0));
|
|
701
701
|
}
|
|
702
|
-
function
|
|
702
|
+
function $c(e) {
|
|
703
703
|
const t = e.keyed, n = _e(() => e.when, void 0, {
|
|
704
704
|
equals: (s, r) => t ? s === r : !s == !r
|
|
705
705
|
});
|
|
@@ -724,7 +724,7 @@ function Vc(e) {
|
|
|
724
724
|
void 0
|
|
725
725
|
);
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function Kc(e) {
|
|
728
728
|
let t = !1;
|
|
729
729
|
const n = (i, l) => (t ? i[1] === l[1] : !i[1] == !l[1]) && i[2] === l[2], s = wr(() => e.children), r = _e(
|
|
730
730
|
() => {
|
|
@@ -762,10 +762,10 @@ function qc(e) {
|
|
|
762
762
|
void 0
|
|
763
763
|
);
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function jc(e) {
|
|
766
766
|
return e;
|
|
767
767
|
}
|
|
768
|
-
var
|
|
768
|
+
var al = [
|
|
769
769
|
"allowfullscreen",
|
|
770
770
|
"async",
|
|
771
771
|
"autofocus",
|
|
@@ -791,7 +791,7 @@ var sl = [
|
|
|
791
791
|
"reversed",
|
|
792
792
|
"seamless",
|
|
793
793
|
"selected"
|
|
794
|
-
],
|
|
794
|
+
], il = /* @__PURE__ */ new Set([
|
|
795
795
|
"className",
|
|
796
796
|
"value",
|
|
797
797
|
"readOnly",
|
|
@@ -799,16 +799,16 @@ var sl = [
|
|
|
799
799
|
"isMap",
|
|
800
800
|
"noModule",
|
|
801
801
|
"playsInline",
|
|
802
|
-
...
|
|
803
|
-
]),
|
|
802
|
+
...al
|
|
803
|
+
]), ll = /* @__PURE__ */ new Set([
|
|
804
804
|
"innerHTML",
|
|
805
805
|
"textContent",
|
|
806
806
|
"innerText",
|
|
807
807
|
"children"
|
|
808
|
-
]),
|
|
808
|
+
]), ol = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
809
809
|
className: "class",
|
|
810
810
|
htmlFor: "for"
|
|
811
|
-
}),
|
|
811
|
+
}), cl = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
812
812
|
class: "className",
|
|
813
813
|
formnovalidate: {
|
|
814
814
|
$: "formNoValidate",
|
|
@@ -833,11 +833,11 @@ var sl = [
|
|
|
833
833
|
TEXTAREA: 1
|
|
834
834
|
}
|
|
835
835
|
});
|
|
836
|
-
function
|
|
837
|
-
const n =
|
|
836
|
+
function ul(e, t) {
|
|
837
|
+
const n = cl[e];
|
|
838
838
|
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
839
839
|
}
|
|
840
|
-
var
|
|
840
|
+
var dl = /* @__PURE__ */ new Set([
|
|
841
841
|
"beforeinput",
|
|
842
842
|
"click",
|
|
843
843
|
"dblclick",
|
|
@@ -860,7 +860,7 @@ var cl = /* @__PURE__ */ new Set([
|
|
|
860
860
|
"touchend",
|
|
861
861
|
"touchmove",
|
|
862
862
|
"touchstart"
|
|
863
|
-
]),
|
|
863
|
+
]), hl = /* @__PURE__ */ new Set([
|
|
864
864
|
"altGlyph",
|
|
865
865
|
"altGlyphDef",
|
|
866
866
|
"altGlyphItem",
|
|
@@ -938,11 +938,11 @@ var cl = /* @__PURE__ */ new Set([
|
|
|
938
938
|
"use",
|
|
939
939
|
"view",
|
|
940
940
|
"vkern"
|
|
941
|
-
]),
|
|
941
|
+
]), fl = {
|
|
942
942
|
xlink: "http://www.w3.org/1999/xlink",
|
|
943
943
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
944
944
|
};
|
|
945
|
-
function
|
|
945
|
+
function ml(e, t, n) {
|
|
946
946
|
let s = n.length, r = t.length, i = s, l = 0, o = 0, u = t[r - 1].nextSibling, d = null;
|
|
947
947
|
for (; l < r || o < i; ) {
|
|
948
948
|
if (t[l] === n[o]) {
|
|
@@ -996,7 +996,7 @@ function Lr(e, t, n, s = {}) {
|
|
|
996
996
|
r(), t.textContent = "";
|
|
997
997
|
};
|
|
998
998
|
}
|
|
999
|
-
function
|
|
999
|
+
function zc(e, t, n) {
|
|
1000
1000
|
let s;
|
|
1001
1001
|
const r = () => {
|
|
1002
1002
|
const l = document.createElement("template");
|
|
@@ -1004,14 +1004,14 @@ function Kc(e, t, n) {
|
|
|
1004
1004
|
}, i = () => (s || (s = r())).cloneNode(!0);
|
|
1005
1005
|
return i.cloneNode = i, i;
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function gl(e, t = window.document) {
|
|
1008
1008
|
const n = t[kt] || (t[kt] = /* @__PURE__ */ new Set());
|
|
1009
1009
|
for (let s = 0, r = e.length; s < r; s++) {
|
|
1010
1010
|
const i = e[s];
|
|
1011
1011
|
n.has(i) || (n.add(i), t.addEventListener(i, kr));
|
|
1012
1012
|
}
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1014
|
+
function Wc(e = window.document) {
|
|
1015
1015
|
if (e[kt]) {
|
|
1016
1016
|
for (let t of e[kt].keys())
|
|
1017
1017
|
e.removeEventListener(t, kr);
|
|
@@ -1021,16 +1021,16 @@ function jc(e = window.document) {
|
|
|
1021
1021
|
function zn(e, t, n) {
|
|
1022
1022
|
ct(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
1023
1023
|
}
|
|
1024
|
-
function
|
|
1024
|
+
function pl(e, t, n, s) {
|
|
1025
1025
|
ct(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1027
|
+
function yl(e, t, n) {
|
|
1028
1028
|
ct(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1030
|
+
function vl(e, t) {
|
|
1031
1031
|
ct(e) || (t == null ? e.removeAttribute("class") : e.className = t);
|
|
1032
1032
|
}
|
|
1033
|
-
function
|
|
1033
|
+
function El(e, t, n, s) {
|
|
1034
1034
|
if (s)
|
|
1035
1035
|
Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
1036
1036
|
else if (Array.isArray(n)) {
|
|
@@ -1039,7 +1039,7 @@ function yl(e, t, n, s) {
|
|
|
1039
1039
|
} else
|
|
1040
1040
|
e.addEventListener(t, n, typeof n != "function" && n);
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1042
|
+
function Sl(e, t, n = {}) {
|
|
1043
1043
|
const s = Object.keys(t || {}), r = Object.keys(n);
|
|
1044
1044
|
let i, l;
|
|
1045
1045
|
for (i = 0, l = r.length; i < l; i++) {
|
|
@@ -1052,7 +1052,7 @@ function vl(e, t, n = {}) {
|
|
|
1052
1052
|
}
|
|
1053
1053
|
return n;
|
|
1054
1054
|
}
|
|
1055
|
-
function
|
|
1055
|
+
function bl(e, t, n) {
|
|
1056
1056
|
if (!t)
|
|
1057
1057
|
return n ? zn(e, "style") : t;
|
|
1058
1058
|
const s = e.style;
|
|
@@ -1066,13 +1066,13 @@ function El(e, t, n) {
|
|
|
1066
1066
|
r = t[i], r !== n[i] && (s.setProperty(i, r), n[i] = r);
|
|
1067
1067
|
return n;
|
|
1068
1068
|
}
|
|
1069
|
-
function
|
|
1069
|
+
function wl(e, t = {}, n, s) {
|
|
1070
1070
|
const r = {};
|
|
1071
1071
|
return s || lt(
|
|
1072
1072
|
() => r.children = Rt(e, t.children, r.children)
|
|
1073
|
-
), lt(() => typeof t.ref == "function" &&
|
|
1073
|
+
), lt(() => typeof t.ref == "function" && Nl(t.ref, e)), lt(() => Al(e, t, n, !0, r, !0)), r;
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1075
|
+
function Nl(e, t, n) {
|
|
1076
1076
|
return Ee(() => e(t, n));
|
|
1077
1077
|
}
|
|
1078
1078
|
function Wn(e, t, n, s) {
|
|
@@ -1080,7 +1080,7 @@ function Wn(e, t, n, s) {
|
|
|
1080
1080
|
return Rt(e, t, s, n);
|
|
1081
1081
|
lt((r) => Rt(e, t(), r, n), s);
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1083
|
+
function Al(e, t, n, s, r = {}, i = !1) {
|
|
1084
1084
|
t || (t = {});
|
|
1085
1085
|
for (const l in r)
|
|
1086
1086
|
if (!(l in t)) {
|
|
@@ -1095,14 +1095,14 @@ function wl(e, t, n, s, r = {}, i = !1) {
|
|
|
1095
1095
|
r[l] = ks(e, l, o, r[l], n, i, t);
|
|
1096
1096
|
}
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function xl(e) {
|
|
1099
1099
|
let t, n;
|
|
1100
|
-
return !ct() || !(t = R.registry.get(n =
|
|
1100
|
+
return !ct() || !(t = R.registry.get(n = Cl())) ? e() : (R.completed && R.completed.add(t), R.registry.delete(n), t);
|
|
1101
1101
|
}
|
|
1102
1102
|
function ct(e) {
|
|
1103
1103
|
return !!R.context && !R.done && (!e || e.isConnected);
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function Tl(e) {
|
|
1106
1106
|
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
1107
1107
|
}
|
|
1108
1108
|
function Ls(e, t, n) {
|
|
@@ -1113,9 +1113,9 @@ function Ls(e, t, n) {
|
|
|
1113
1113
|
function ks(e, t, n, s, r, i, l) {
|
|
1114
1114
|
let o, u, d, f, m;
|
|
1115
1115
|
if (t === "style")
|
|
1116
|
-
return
|
|
1116
|
+
return bl(e, n, s);
|
|
1117
1117
|
if (t === "classList")
|
|
1118
|
-
return
|
|
1118
|
+
return Sl(e, n, s);
|
|
1119
1119
|
if (n === s)
|
|
1120
1120
|
return s;
|
|
1121
1121
|
if (t === "ref")
|
|
@@ -1127,25 +1127,25 @@ function ks(e, t, n, s, r, i, l) {
|
|
|
1127
1127
|
const b = t.slice(10);
|
|
1128
1128
|
s && e.removeEventListener(b, s, !0), n && e.addEventListener(b, n, !0);
|
|
1129
1129
|
} else if (t.slice(0, 2) === "on") {
|
|
1130
|
-
const b = t.slice(2).toLowerCase(), v =
|
|
1130
|
+
const b = t.slice(2).toLowerCase(), v = dl.has(b);
|
|
1131
1131
|
if (!v && s) {
|
|
1132
1132
|
const y = Array.isArray(s) ? s[0] : s;
|
|
1133
1133
|
e.removeEventListener(b, y);
|
|
1134
1134
|
}
|
|
1135
|
-
(v || n) && (
|
|
1135
|
+
(v || n) && (El(e, b, n, v), v && gl([b]));
|
|
1136
1136
|
} else if (t.slice(0, 5) === "attr:")
|
|
1137
1137
|
zn(e, t.slice(5), n);
|
|
1138
1138
|
else if (t.slice(0, 5) === "bool:")
|
|
1139
|
-
|
|
1140
|
-
else if ((m = t.slice(0, 5) === "prop:") || (d =
|
|
1139
|
+
yl(e, t.slice(5), n);
|
|
1140
|
+
else if ((m = t.slice(0, 5) === "prop:") || (d = ll.has(t)) || !r && ((f = ul(t, e.tagName)) || (u = il.has(t))) || (o = e.nodeName.includes("-") || "is" in l)) {
|
|
1141
1141
|
if (m)
|
|
1142
1142
|
t = t.slice(5), u = !0;
|
|
1143
1143
|
else if (ct(e))
|
|
1144
1144
|
return n;
|
|
1145
|
-
t === "class" || t === "className" ?
|
|
1145
|
+
t === "class" || t === "className" ? vl(e, n) : o && !u && !d ? e[Tl(t)] = n : e[f || t] = n;
|
|
1146
1146
|
} else {
|
|
1147
|
-
const b = r && t.indexOf(":") > -1 &&
|
|
1148
|
-
b ?
|
|
1147
|
+
const b = r && t.indexOf(":") > -1 && fl[t.split(":")[0]];
|
|
1148
|
+
b ? pl(e, b, t, n) : zn(e, ol[t] || t, n);
|
|
1149
1149
|
}
|
|
1150
1150
|
return n;
|
|
1151
1151
|
}
|
|
@@ -1244,7 +1244,7 @@ function Rt(e, t, n, s, r) {
|
|
|
1244
1244
|
if (u.length === 0) {
|
|
1245
1245
|
if (n = ut(e, n, s), o)
|
|
1246
1246
|
return n;
|
|
1247
|
-
} else d ? n.length === 0 ? Ds(e, u, s) :
|
|
1247
|
+
} else d ? n.length === 0 ? Ds(e, u, s) : ml(e, n, u) : (n && ut(e), Ds(e, u));
|
|
1248
1248
|
n = u;
|
|
1249
1249
|
} else if (t.nodeType) {
|
|
1250
1250
|
if (i && t.parentNode)
|
|
@@ -1308,19 +1308,19 @@ function ut(e, t, n, s) {
|
|
|
1308
1308
|
e.insertBefore(r, n);
|
|
1309
1309
|
return [r];
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function Cl() {
|
|
1312
1312
|
return R.getNextContextId();
|
|
1313
1313
|
}
|
|
1314
|
-
var
|
|
1314
|
+
var Pl = "http://www.w3.org/2000/svg";
|
|
1315
1315
|
function Dr(e, t = !1) {
|
|
1316
|
-
return t ? document.createElementNS(
|
|
1316
|
+
return t ? document.createElementNS(Pl, e) : document.createElement(e);
|
|
1317
1317
|
}
|
|
1318
|
-
function
|
|
1318
|
+
function Qc(e) {
|
|
1319
1319
|
const { useShadow: t } = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = Is();
|
|
1320
1320
|
let i, l = !!R.context;
|
|
1321
1321
|
return br(
|
|
1322
1322
|
() => {
|
|
1323
|
-
l && (Is().user = l = !1), i || (i =
|
|
1323
|
+
l && (Is().user = l = !1), i || (i = ji(r, () => _e(() => e.children)));
|
|
1324
1324
|
const o = s();
|
|
1325
1325
|
if (o instanceof HTMLHeadElement) {
|
|
1326
1326
|
const [u, d] = fe(!1), f = () => d(!0);
|
|
@@ -1343,20 +1343,20 @@ function zc(e) {
|
|
|
1343
1343
|
}
|
|
1344
1344
|
), n;
|
|
1345
1345
|
}
|
|
1346
|
-
function
|
|
1347
|
-
const [t, n] =
|
|
1346
|
+
function Yc(e) {
|
|
1347
|
+
const [t, n] = sl(e, ["component"]), s = _e(() => t.component);
|
|
1348
1348
|
return _e(() => {
|
|
1349
1349
|
const r = s();
|
|
1350
1350
|
switch (typeof r) {
|
|
1351
1351
|
case "function":
|
|
1352
1352
|
return Ee(() => r(n));
|
|
1353
1353
|
case "string":
|
|
1354
|
-
const i =
|
|
1355
|
-
return
|
|
1354
|
+
const i = hl.has(r), l = R.context ? xl() : Dr(r, i);
|
|
1355
|
+
return wl(l, n, i), l;
|
|
1356
1356
|
}
|
|
1357
1357
|
});
|
|
1358
1358
|
}
|
|
1359
|
-
var
|
|
1359
|
+
var _l = class {
|
|
1360
1360
|
constructor() {
|
|
1361
1361
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
1362
1362
|
}
|
|
@@ -1374,7 +1374,7 @@ var Cl = class {
|
|
|
1374
1374
|
}
|
|
1375
1375
|
}, Gr = class {
|
|
1376
1376
|
constructor(e) {
|
|
1377
|
-
this.generateIdentifier = e, this.kv = new
|
|
1377
|
+
this.generateIdentifier = e, this.kv = new _l();
|
|
1378
1378
|
}
|
|
1379
1379
|
register(e, t) {
|
|
1380
1380
|
this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
|
|
@@ -1388,7 +1388,7 @@ var Cl = class {
|
|
|
1388
1388
|
getValue(e) {
|
|
1389
1389
|
return this.kv.getByKey(e);
|
|
1390
1390
|
}
|
|
1391
|
-
},
|
|
1391
|
+
}, Il = class extends Gr {
|
|
1392
1392
|
constructor() {
|
|
1393
1393
|
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
1394
1394
|
}
|
|
@@ -1399,7 +1399,7 @@ var Cl = class {
|
|
|
1399
1399
|
return this.classToAllowedProps.get(e);
|
|
1400
1400
|
}
|
|
1401
1401
|
};
|
|
1402
|
-
function
|
|
1402
|
+
function Ll(e) {
|
|
1403
1403
|
if ("values" in Object)
|
|
1404
1404
|
return Object.values(e);
|
|
1405
1405
|
const t = [];
|
|
@@ -1407,8 +1407,8 @@ function _l(e) {
|
|
|
1407
1407
|
e.hasOwnProperty(n) && t.push(e[n]);
|
|
1408
1408
|
return t;
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1411
|
-
const n =
|
|
1410
|
+
function kl(e, t) {
|
|
1411
|
+
const n = Ll(e);
|
|
1412
1412
|
if ("find" in n)
|
|
1413
1413
|
return n.find(t);
|
|
1414
1414
|
const s = n;
|
|
@@ -1431,7 +1431,7 @@ function Gs(e, t) {
|
|
|
1431
1431
|
return s;
|
|
1432
1432
|
}
|
|
1433
1433
|
}
|
|
1434
|
-
var
|
|
1434
|
+
var Dl = class {
|
|
1435
1435
|
constructor() {
|
|
1436
1436
|
this.transfomers = {};
|
|
1437
1437
|
}
|
|
@@ -1439,12 +1439,12 @@ var Ll = class {
|
|
|
1439
1439
|
this.transfomers[e.name] = e;
|
|
1440
1440
|
}
|
|
1441
1441
|
findApplicable(e) {
|
|
1442
|
-
return
|
|
1442
|
+
return kl(this.transfomers, (t) => t.isApplicable(e));
|
|
1443
1443
|
}
|
|
1444
1444
|
findByName(e) {
|
|
1445
1445
|
return this.transfomers[e];
|
|
1446
1446
|
}
|
|
1447
|
-
},
|
|
1447
|
+
}, Gl = (e) => Object.prototype.toString.call(e).slice(8, -1), Ur = (e) => typeof e > "u", Ul = (e) => e === null, Mt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Yn = (e) => Mt(e) && Object.keys(e).length === 0, et = (e) => Array.isArray(e), Ol = (e) => typeof e == "string", Rl = (e) => typeof e == "number" && !isNaN(e), Ml = (e) => typeof e == "boolean", Bl = (e) => e instanceof RegExp, Bt = (e) => e instanceof Map, Ft = (e) => e instanceof Set, Or = (e) => Gl(e) === "Symbol", Fl = (e) => e instanceof Date && !isNaN(e.valueOf()), Hl = (e) => e instanceof Error, Us = (e) => typeof e == "number" && isNaN(e), Vl = (e) => Ml(e) || Ul(e) || Ur(e) || Rl(e) || Ol(e) || Or(e), ql = (e) => typeof e == "bigint", $l = (e) => e === 1 / 0 || e === -1 / 0, Kl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), jl = (e) => e instanceof URL, Rr = (e) => e.replace(/\./g, "\\."), On = (e) => e.map(String).map(Rr).join("."), Dt = (e) => {
|
|
1448
1448
|
const t = [];
|
|
1449
1449
|
let n = "";
|
|
1450
1450
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -1473,9 +1473,9 @@ function He(e, t, n, s) {
|
|
|
1473
1473
|
var Mr = [
|
|
1474
1474
|
He(Ur, "undefined", () => null, () => {
|
|
1475
1475
|
}),
|
|
1476
|
-
He(
|
|
1477
|
-
He(
|
|
1478
|
-
He(
|
|
1476
|
+
He(ql, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
1477
|
+
He(Fl, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
1478
|
+
He(Hl, "Error", (e, t) => {
|
|
1479
1479
|
const n = {
|
|
1480
1480
|
name: e.name,
|
|
1481
1481
|
message: e.message
|
|
@@ -1489,7 +1489,7 @@ var Mr = [
|
|
|
1489
1489
|
n[s] = e[s];
|
|
1490
1490
|
}), n;
|
|
1491
1491
|
}),
|
|
1492
|
-
He(
|
|
1492
|
+
He(Bl, "regexp", (e) => "" + e, (e) => {
|
|
1493
1493
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
1494
1494
|
return new RegExp(t, n);
|
|
1495
1495
|
}),
|
|
@@ -1502,9 +1502,9 @@ var Mr = [
|
|
|
1502
1502
|
(e) => new Set(e)
|
|
1503
1503
|
),
|
|
1504
1504
|
He(Bt, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
1505
|
-
He((e) => Us(e) ||
|
|
1505
|
+
He((e) => Us(e) || $l(e), "number", (e) => Us(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
1506
1506
|
He((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
1507
|
-
He(
|
|
1507
|
+
He(jl, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
1508
1508
|
];
|
|
1509
1509
|
function _n(e, t, n, s) {
|
|
1510
1510
|
return {
|
|
@@ -1519,7 +1519,7 @@ var Br = _n((e, t) => Or(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
1519
1519
|
if (!s)
|
|
1520
1520
|
throw new Error("Trying to deserialize unknown symbol");
|
|
1521
1521
|
return s;
|
|
1522
|
-
}),
|
|
1522
|
+
}), zl = [
|
|
1523
1523
|
Int8Array,
|
|
1524
1524
|
Uint8Array,
|
|
1525
1525
|
Int16Array,
|
|
@@ -1529,8 +1529,8 @@ var Br = _n((e, t) => Or(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
1529
1529
|
Float32Array,
|
|
1530
1530
|
Float64Array,
|
|
1531
1531
|
Uint8ClampedArray
|
|
1532
|
-
].reduce((e, t) => (e[t.name] = t, e), {}), Fr = _n(
|
|
1533
|
-
const n =
|
|
1532
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), Fr = _n(Kl, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
1533
|
+
const n = zl[t[1]];
|
|
1534
1534
|
if (!n)
|
|
1535
1535
|
throw new Error("Trying to deserialize unknown typed array");
|
|
1536
1536
|
return new n(e);
|
|
@@ -1556,8 +1556,8 @@ var Vr = _n(Hr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
1556
1556
|
if (!s)
|
|
1557
1557
|
throw new Error("Trying to deserialize unknown custom value");
|
|
1558
1558
|
return s.deserialize(e);
|
|
1559
|
-
}),
|
|
1560
|
-
const n = Gs(
|
|
1559
|
+
}), Wl = [Vr, Br, qr, Fr], Os = (e, t) => {
|
|
1560
|
+
const n = Gs(Wl, (r) => r.isApplicable(e, t));
|
|
1561
1561
|
if (n)
|
|
1562
1562
|
return {
|
|
1563
1563
|
value: n.transform(e, t),
|
|
@@ -1573,7 +1573,7 @@ var Vr = _n(Hr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
1573
1573
|
Mr.forEach((e) => {
|
|
1574
1574
|
$r[e.annotation] = e;
|
|
1575
1575
|
});
|
|
1576
|
-
var
|
|
1576
|
+
var Ql = (e, t, n) => {
|
|
1577
1577
|
if (et(t))
|
|
1578
1578
|
switch (t[0]) {
|
|
1579
1579
|
case "symbol":
|
|
@@ -1607,7 +1607,7 @@ function Kr(e) {
|
|
|
1607
1607
|
if (gn(e, "constructor"))
|
|
1608
1608
|
throw new Error("constructor is not allowed as a property");
|
|
1609
1609
|
}
|
|
1610
|
-
var
|
|
1610
|
+
var Yl = (e, t) => {
|
|
1611
1611
|
Kr(t);
|
|
1612
1612
|
for (let n = 0; n < t.length; n++) {
|
|
1613
1613
|
const s = t[n];
|
|
@@ -1688,14 +1688,14 @@ function Zn(e, t, n = []) {
|
|
|
1688
1688
|
Zn(i, t, [...n, ...Dt(l)]);
|
|
1689
1689
|
}), t(s, n);
|
|
1690
1690
|
}
|
|
1691
|
-
function
|
|
1691
|
+
function Xl(e, t, n) {
|
|
1692
1692
|
return Zn(t, (s, r) => {
|
|
1693
|
-
e = Xn(e, r, (i) =>
|
|
1693
|
+
e = Xn(e, r, (i) => Ql(i, s, n));
|
|
1694
1694
|
}), e;
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1696
|
+
function Zl(e, t) {
|
|
1697
1697
|
function n(s, r) {
|
|
1698
|
-
const i =
|
|
1698
|
+
const i = Yl(e, Dt(r));
|
|
1699
1699
|
s.map(Dt).forEach((l) => {
|
|
1700
1700
|
e = Xn(e, l, () => i);
|
|
1701
1701
|
});
|
|
@@ -1709,12 +1709,12 @@ function Yl(e, t) {
|
|
|
1709
1709
|
Ct(t, n);
|
|
1710
1710
|
return e;
|
|
1711
1711
|
}
|
|
1712
|
-
var
|
|
1713
|
-
function
|
|
1712
|
+
var Jl = (e, t) => Mt(e) || et(e) || Bt(e) || Ft(e) || Hr(e, t);
|
|
1713
|
+
function eo(e, t, n) {
|
|
1714
1714
|
const s = n.get(e);
|
|
1715
1715
|
s ? s.push(t) : n.set(e, [t]);
|
|
1716
1716
|
}
|
|
1717
|
-
function
|
|
1717
|
+
function to(e, t) {
|
|
1718
1718
|
const n = {};
|
|
1719
1719
|
let s;
|
|
1720
1720
|
return e.forEach((r) => {
|
|
@@ -1726,16 +1726,16 @@ function Jl(e, t) {
|
|
|
1726
1726
|
}), s ? Yn(n) ? [s] : [s, n] : Yn(n) ? void 0 : n;
|
|
1727
1727
|
}
|
|
1728
1728
|
var jr = (e, t, n, s, r = [], i = [], l = /* @__PURE__ */ new Map()) => {
|
|
1729
|
-
const o =
|
|
1729
|
+
const o = Vl(e);
|
|
1730
1730
|
if (!o) {
|
|
1731
|
-
|
|
1731
|
+
eo(e, r, t);
|
|
1732
1732
|
const v = l.get(e);
|
|
1733
1733
|
if (v)
|
|
1734
1734
|
return s ? {
|
|
1735
1735
|
transformedValue: null
|
|
1736
1736
|
} : v;
|
|
1737
1737
|
}
|
|
1738
|
-
if (!
|
|
1738
|
+
if (!Jl(e, n)) {
|
|
1739
1739
|
const v = Os(e, n), y = v ? {
|
|
1740
1740
|
transformedValue: v.value,
|
|
1741
1741
|
annotations: [v.type]
|
|
@@ -1772,13 +1772,13 @@ function zr(e) {
|
|
|
1772
1772
|
function Rs(e) {
|
|
1773
1773
|
return zr(e) === "Array";
|
|
1774
1774
|
}
|
|
1775
|
-
function
|
|
1775
|
+
function no(e) {
|
|
1776
1776
|
if (zr(e) !== "Object")
|
|
1777
1777
|
return !1;
|
|
1778
1778
|
const t = Object.getPrototypeOf(e);
|
|
1779
1779
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
1780
1780
|
}
|
|
1781
|
-
function
|
|
1781
|
+
function so(e, t, n, s, r) {
|
|
1782
1782
|
const i = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
|
|
1783
1783
|
i === "enumerable" && (e[t] = n), r && i === "nonenumerable" && Object.defineProperty(e, t, {
|
|
1784
1784
|
value: n,
|
|
@@ -1790,14 +1790,14 @@ function to(e, t, n, s, r) {
|
|
|
1790
1790
|
function Jn(e, t = {}) {
|
|
1791
1791
|
if (Rs(e))
|
|
1792
1792
|
return e.map((r) => Jn(r, t));
|
|
1793
|
-
if (!
|
|
1793
|
+
if (!no(e))
|
|
1794
1794
|
return e;
|
|
1795
1795
|
const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
1796
1796
|
return [...n, ...s].reduce((r, i) => {
|
|
1797
1797
|
if (Rs(t.props) && !t.props.includes(i))
|
|
1798
1798
|
return r;
|
|
1799
1799
|
const l = e[i], o = Jn(l, t);
|
|
1800
|
-
return
|
|
1800
|
+
return so(r, i, o, e, t.nonenumerable), r;
|
|
1801
1801
|
}, {});
|
|
1802
1802
|
}
|
|
1803
1803
|
var te = class {
|
|
@@ -1805,7 +1805,7 @@ var te = class {
|
|
|
1805
1805
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
1806
1806
|
*/
|
|
1807
1807
|
constructor({ dedupe: e = !1 } = {}) {
|
|
1808
|
-
this.classRegistry = new
|
|
1808
|
+
this.classRegistry = new Il(), this.symbolRegistry = new Gr((t) => t.description ?? ""), this.customTransformerRegistry = new Dl(), this.allowedErrorProps = [], this.dedupe = e;
|
|
1809
1809
|
}
|
|
1810
1810
|
serialize(e) {
|
|
1811
1811
|
const t = /* @__PURE__ */ new Map(), n = jr(e, t, this, this.dedupe), s = {
|
|
@@ -1815,7 +1815,7 @@ var te = class {
|
|
|
1815
1815
|
...s.meta,
|
|
1816
1816
|
values: n.annotations
|
|
1817
1817
|
});
|
|
1818
|
-
const r =
|
|
1818
|
+
const r = to(t, this.dedupe);
|
|
1819
1819
|
return r && (s.meta = {
|
|
1820
1820
|
...s.meta,
|
|
1821
1821
|
referentialEqualities: r
|
|
@@ -1824,7 +1824,7 @@ var te = class {
|
|
|
1824
1824
|
deserialize(e) {
|
|
1825
1825
|
const { json: t, meta: n } = e;
|
|
1826
1826
|
let s = Jn(t);
|
|
1827
|
-
return n != null && n.values && (s =
|
|
1827
|
+
return n != null && n.values && (s = Xl(s, n.values, this)), n != null && n.referentialEqualities && (s = Zl(s, n.referentialEqualities)), s;
|
|
1828
1828
|
}
|
|
1829
1829
|
stringify(e) {
|
|
1830
1830
|
return JSON.stringify(this.serialize(e));
|
|
@@ -1857,44 +1857,44 @@ te.registerClass = te.defaultInstance.registerClass.bind(te.defaultInstance);
|
|
|
1857
1857
|
te.registerSymbol = te.defaultInstance.registerSymbol.bind(te.defaultInstance);
|
|
1858
1858
|
te.registerCustom = te.defaultInstance.registerCustom.bind(te.defaultInstance);
|
|
1859
1859
|
te.allowErrorProps = te.defaultInstance.allowErrorProps.bind(te.defaultInstance);
|
|
1860
|
-
var
|
|
1861
|
-
function
|
|
1860
|
+
var ro = te.serialize, Xc = te.stringify;
|
|
1861
|
+
function Zc(e) {
|
|
1862
1862
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
1863
1863
|
}
|
|
1864
|
-
function
|
|
1864
|
+
function Jc(e, t) {
|
|
1865
1865
|
return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
1866
1866
|
}
|
|
1867
|
-
function
|
|
1867
|
+
function eu({
|
|
1868
1868
|
queryState: e,
|
|
1869
1869
|
observerCount: t,
|
|
1870
1870
|
isStale: n
|
|
1871
1871
|
}) {
|
|
1872
1872
|
return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
|
|
1873
1873
|
}
|
|
1874
|
-
function
|
|
1874
|
+
function tu({
|
|
1875
1875
|
status: e,
|
|
1876
1876
|
isPaused: t
|
|
1877
1877
|
}) {
|
|
1878
1878
|
return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
|
|
1879
1879
|
}
|
|
1880
|
-
function
|
|
1880
|
+
function nu(e) {
|
|
1881
1881
|
return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
|
|
1882
1882
|
}
|
|
1883
|
-
var
|
|
1883
|
+
var su = (e, t = !1) => {
|
|
1884
1884
|
const {
|
|
1885
1885
|
json: n
|
|
1886
|
-
} =
|
|
1886
|
+
} = ro(e);
|
|
1887
1887
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
1888
|
-
}, dn = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3,
|
|
1889
|
-
status:
|
|
1890
|
-
"query hash":
|
|
1888
|
+
}, dn = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, ao = (e, t) => e.queryHash.localeCompare(t.queryHash), Wr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, io = (e, t) => dn(e) === dn(t) ? Wr(e, t) : dn(e) > dn(t) ? 1 : -1, ru = {
|
|
1889
|
+
status: io,
|
|
1890
|
+
"query hash": ao,
|
|
1891
1891
|
"last updated": Wr
|
|
1892
|
-
}, hn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Qr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1,
|
|
1893
|
-
status:
|
|
1892
|
+
}, hn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Qr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, lo = (e, t) => hn(e) === hn(t) ? Qr(e, t) : hn(e) > hn(t) ? 1 : -1, au = {
|
|
1893
|
+
status: lo,
|
|
1894
1894
|
"last updated": Qr
|
|
1895
|
-
},
|
|
1895
|
+
}, iu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), lu = () => {
|
|
1896
1896
|
const [e, t] = fe("dark");
|
|
1897
|
-
return
|
|
1897
|
+
return Ki(() => {
|
|
1898
1898
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1899
1899
|
t(n.matches ? "dark" : "light");
|
|
1900
1900
|
const s = (r) => {
|
|
@@ -1967,7 +1967,7 @@ var tu = (e, t = !1) => {
|
|
|
1967
1967
|
return;
|
|
1968
1968
|
const s = document.createElement("style"), r = document.createTextNode("");
|
|
1969
1969
|
s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
|
|
1970
|
-
}, ht, Ht, Vt, qt, rt, $t, ft, mt, gt, pt, yt, vt, Kt, Bs,
|
|
1970
|
+
}, ht, Ht, Vt, qt, rt, $t, ft, mt, gt, pt, yt, vt, Kt, Bs, oo = (Bs = class {
|
|
1971
1971
|
constructor(e) {
|
|
1972
1972
|
J(this, ht);
|
|
1973
1973
|
J(this, Ht);
|
|
@@ -2017,7 +2017,7 @@ var tu = (e, t = !1) => {
|
|
|
2017
2017
|
const t = Lr(() => {
|
|
2018
2018
|
const n = this, [s] = O(this, mt), [r] = O(this, gt), [i] = O(this, pt), [l] = O(this, yt), [o] = O(this, ht);
|
|
2019
2019
|
let u;
|
|
2020
|
-
return O(this, vt) ? u = O(this, vt) : (u = _r(() => import("./HO4MOOFI-
|
|
2020
|
+
return O(this, vt) ? u = O(this, vt) : (u = _r(() => import("./HO4MOOFI-BYkfnhhc.js")), Y(this, vt, u)), Yr(O(this, $t), O(this, ft)), Cr(u, Pr({
|
|
2021
2021
|
get queryFlavor() {
|
|
2022
2022
|
return O(n, Vt);
|
|
2023
2023
|
},
|
|
@@ -2056,7 +2056,7 @@ var tu = (e, t = !1) => {
|
|
|
2056
2056
|
throw new Error("Devtools is not mounted");
|
|
2057
2057
|
(e = O(this, Kt)) == null || e.call(this), Y(this, rt, !1);
|
|
2058
2058
|
}
|
|
2059
|
-
}, ht = new WeakMap(), Ht = new WeakMap(), Vt = new WeakMap(), qt = new WeakMap(), rt = new WeakMap(), $t = new WeakMap(), ft = new WeakMap(), mt = new WeakMap(), gt = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), vt = new WeakMap(), Kt = new WeakMap(), Bs), Et, jt, zt, Wt, at, Qt, St, bt, wt, Nt, At, xt, Tt, Yt, Fs,
|
|
2059
|
+
}, ht = new WeakMap(), Ht = new WeakMap(), Vt = new WeakMap(), qt = new WeakMap(), rt = new WeakMap(), $t = new WeakMap(), ft = new WeakMap(), mt = new WeakMap(), gt = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), vt = new WeakMap(), Kt = new WeakMap(), Bs), Et, jt, zt, Wt, at, Qt, St, bt, wt, Nt, At, xt, Tt, Yt, Fs, co = (Fs = class {
|
|
2060
2060
|
constructor(e) {
|
|
2061
2061
|
J(this, Et);
|
|
2062
2062
|
J(this, jt);
|
|
@@ -2111,7 +2111,7 @@ var tu = (e, t = !1) => {
|
|
|
2111
2111
|
const t = Lr(() => {
|
|
2112
2112
|
const n = this, [s] = O(this, bt), [r] = O(this, wt), [i] = O(this, Nt), [l] = O(this, At), [o] = O(this, Et), [u] = O(this, xt);
|
|
2113
2113
|
let d;
|
|
2114
|
-
return O(this, Tt) ? d = O(this, Tt) : (d = _r(() => import("./HUY7CZI3-
|
|
2114
|
+
return O(this, Tt) ? d = O(this, Tt) : (d = _r(() => import("./HUY7CZI3-DOIW2MPF.js")), Y(this, Tt, d)), Yr(O(this, Qt), O(this, St)), Cr(d, Pr({
|
|
2115
2115
|
get queryFlavor() {
|
|
2116
2116
|
return O(n, zt);
|
|
2117
2117
|
},
|
|
@@ -2154,7 +2154,7 @@ var tu = (e, t = !1) => {
|
|
|
2154
2154
|
(e = O(this, Yt)) == null || e.call(this), Y(this, at, !1);
|
|
2155
2155
|
}
|
|
2156
2156
|
}, Et = new WeakMap(), jt = new WeakMap(), zt = new WeakMap(), Wt = new WeakMap(), at = new WeakMap(), Qt = new WeakMap(), St = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), Nt = new WeakMap(), At = new WeakMap(), xt = new WeakMap(), Tt = new WeakMap(), Yt = new WeakMap(), Fs);
|
|
2157
|
-
function
|
|
2157
|
+
function uo(e) {
|
|
2158
2158
|
const t = Ae(e.client), n = le.useRef(null), {
|
|
2159
2159
|
buttonPosition: s,
|
|
2160
2160
|
position: r,
|
|
@@ -2163,7 +2163,7 @@ function oo(e) {
|
|
|
2163
2163
|
styleNonce: o,
|
|
2164
2164
|
shadowDOMTarget: u
|
|
2165
2165
|
} = e, [d] = le.useState(
|
|
2166
|
-
new
|
|
2166
|
+
new oo({
|
|
2167
2167
|
client: t,
|
|
2168
2168
|
queryFlavor: "React Query",
|
|
2169
2169
|
version: "5",
|
|
@@ -2190,9 +2190,9 @@ function oo(e) {
|
|
|
2190
2190
|
d.unmount();
|
|
2191
2191
|
}), [d]), /* @__PURE__ */ a("div", { className: "tsqd-parent-container", ref: n });
|
|
2192
2192
|
}
|
|
2193
|
-
function
|
|
2193
|
+
function ho(e) {
|
|
2194
2194
|
const t = Ae(e.client), n = le.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: i } = e, [l] = le.useState(
|
|
2195
|
-
new
|
|
2195
|
+
new co({
|
|
2196
2196
|
client: t,
|
|
2197
2197
|
queryFlavor: "React Query",
|
|
2198
2198
|
version: "5",
|
|
@@ -2224,9 +2224,9 @@ function co(e) {
|
|
|
2224
2224
|
}
|
|
2225
2225
|
);
|
|
2226
2226
|
}
|
|
2227
|
-
var
|
|
2227
|
+
var fo = process.env.NODE_ENV !== "development" ? function() {
|
|
2228
2228
|
return null;
|
|
2229
|
-
} :
|
|
2229
|
+
} : uo;
|
|
2230
2230
|
process.env.NODE_ENV;
|
|
2231
2231
|
const _ = {
|
|
2232
2232
|
ASK_AI: "ASK_AI",
|
|
@@ -2298,7 +2298,7 @@ const X = () => {
|
|
|
2298
2298
|
async (s, r, i = {}) => {
|
|
2299
2299
|
if (n)
|
|
2300
2300
|
try {
|
|
2301
|
-
const l =
|
|
2301
|
+
const l = ne(r, "action", "").toLowerCase(), o = await Xr(
|
|
2302
2302
|
s + (l ? `?action=${l}` : ""),
|
|
2303
2303
|
r,
|
|
2304
2304
|
{
|
|
@@ -2346,7 +2346,7 @@ const X = () => {
|
|
|
2346
2346
|
});
|
|
2347
2347
|
}
|
|
2348
2348
|
});
|
|
2349
|
-
},
|
|
2349
|
+
}, mo = () => {
|
|
2350
2350
|
const e = Z(), t = Ae(), n = X();
|
|
2351
2351
|
return De({
|
|
2352
2352
|
mutationFn: async (s) => n(e, { action: _.UPDATE_WEBSITE_DATA, data: s }),
|
|
@@ -2361,7 +2361,7 @@ const X = () => {
|
|
|
2361
2361
|
});
|
|
2362
2362
|
}
|
|
2363
2363
|
});
|
|
2364
|
-
},
|
|
2364
|
+
}, go = (e) => {
|
|
2365
2365
|
const t = Z(), n = X(), { resetLibrary: s } = Ea(e);
|
|
2366
2366
|
return De({
|
|
2367
2367
|
mutationFn: async (r) => n(t, { action: _.UPSERT_LIBRARY_ITEM, data: r }),
|
|
@@ -2388,15 +2388,15 @@ function Ge() {
|
|
|
2388
2388
|
};
|
|
2389
2389
|
}, []), [e, t];
|
|
2390
2390
|
}
|
|
2391
|
-
const
|
|
2391
|
+
const po = rs({}), ea = () => as(po), yo = () => {
|
|
2392
2392
|
const [e] = Ge(), t = e.get("page"), n = pn(""), { mutate: s } = Zr();
|
|
2393
2393
|
Pe(() => {
|
|
2394
2394
|
!ce(n.current) && t !== n.current && s({ id: n.current }), n.current = t;
|
|
2395
2395
|
}, [t, s, n]);
|
|
2396
2396
|
}, qe = (e, t) => {
|
|
2397
2397
|
const [n] = ea();
|
|
2398
|
-
return
|
|
2399
|
-
}, Z = () => qe("apiUrl", "/chai/api"),
|
|
2398
|
+
return ne(n, e, t);
|
|
2399
|
+
}, Z = () => qe("apiUrl", "/chai/api"), vo = () => {
|
|
2400
2400
|
const e = Z(), { aiContext: t } = us(), n = X();
|
|
2401
2401
|
return ke(
|
|
2402
2402
|
async (s, r, i, l) => n(e, {
|
|
@@ -2412,39 +2412,39 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
2412
2412
|
staleTime: 1e3 * 60 * 5,
|
|
2413
2413
|
queryFn: async () => e(t, { action: _.GET_WEBSITE_PAGES }) || []
|
|
2414
2414
|
});
|
|
2415
|
-
},
|
|
2415
|
+
}, Eo = rs({ lastSaved: void 0 }), ds = () => as(Eo), Oe = () => {
|
|
2416
2416
|
const [e] = Ge(), t = e.get("page"), { data: n, isFetching: s } = In();
|
|
2417
2417
|
return { data: ue(
|
|
2418
2418
|
() => ge(n, { id: t }) || {},
|
|
2419
2419
|
[n, t]
|
|
2420
2420
|
), isFetching: s };
|
|
2421
|
-
},
|
|
2421
|
+
}, So = (e, t) => t.map((n) => {
|
|
2422
2422
|
if (Ks(e, n._type)) {
|
|
2423
|
-
const s =
|
|
2423
|
+
const s = fi(n._type);
|
|
2424
2424
|
return {
|
|
2425
2425
|
...s,
|
|
2426
2426
|
...js(n, [
|
|
2427
|
-
...
|
|
2427
|
+
...Ia(s),
|
|
2428
2428
|
"_type",
|
|
2429
2429
|
"_id",
|
|
2430
2430
|
"_name",
|
|
2431
2431
|
"_parent",
|
|
2432
2432
|
"_bindings"
|
|
2433
2433
|
]),
|
|
2434
|
-
...
|
|
2434
|
+
...La(n, (r, i) => zs(i, "_attrs")),
|
|
2435
2435
|
...n
|
|
2436
2436
|
};
|
|
2437
2437
|
}
|
|
2438
2438
|
return n;
|
|
2439
|
-
}),
|
|
2440
|
-
const t =
|
|
2439
|
+
}), bo = (e) => {
|
|
2440
|
+
const t = hi();
|
|
2441
2441
|
return ue(() => {
|
|
2442
2442
|
if (!e || ce(e)) return { blocks: [] };
|
|
2443
2443
|
const n = ve(
|
|
2444
2444
|
e,
|
|
2445
2445
|
(s) => !Gt(s == null ? void 0 : s._type, "@chai/")
|
|
2446
2446
|
);
|
|
2447
|
-
return { blocks:
|
|
2447
|
+
return { blocks: So(t, n) };
|
|
2448
2448
|
}, [e, t]);
|
|
2449
2449
|
}, en = (e) => {
|
|
2450
2450
|
const t = Z(), n = X();
|
|
@@ -2456,8 +2456,8 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
2456
2456
|
}),
|
|
2457
2457
|
enabled: !!e && e !== "EXPIRED"
|
|
2458
2458
|
});
|
|
2459
|
-
},
|
|
2460
|
-
const [e] = Ge(), t = e.get("page"), n = qe("user"), [s, r] = as(
|
|
2459
|
+
}, wo = rs(void 0), tn = () => {
|
|
2460
|
+
const [e] = Ge(), t = e.get("page"), n = qe("user"), [s, r] = as(wo);
|
|
2461
2461
|
return ue(() => ({
|
|
2462
2462
|
isLocked: t && (n == null ? void 0 : n.id) !== s,
|
|
2463
2463
|
currentEditor: s,
|
|
@@ -2477,7 +2477,7 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
2477
2477
|
});
|
|
2478
2478
|
r(o.currentEditor);
|
|
2479
2479
|
const u = o.blocks ?? [], d = ge(u, { _type: "@chai/ai-context" });
|
|
2480
|
-
return s(
|
|
2480
|
+
return s(ne(d, "_value", "") || ""), i((f) => ({ ...f, lastSaved: o.lastSaved })), u;
|
|
2481
2481
|
},
|
|
2482
2482
|
enabled: !!t
|
|
2483
2483
|
});
|
|
@@ -2502,7 +2502,7 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
2502
2502
|
initialData: [],
|
|
2503
2503
|
queryFn: async () => t(e, { action: _.GET_PAGE_TYPES })
|
|
2504
2504
|
});
|
|
2505
|
-
},
|
|
2505
|
+
}, No = () => {
|
|
2506
2506
|
const e = Z(), t = X();
|
|
2507
2507
|
return De({
|
|
2508
2508
|
mutationFn: async ({ pageType: n, query: s }) => {
|
|
@@ -2519,7 +2519,7 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
2519
2519
|
}
|
|
2520
2520
|
}
|
|
2521
2521
|
});
|
|
2522
|
-
},
|
|
2522
|
+
}, Ao = () => {
|
|
2523
2523
|
const e = Z(), t = X();
|
|
2524
2524
|
return xe({
|
|
2525
2525
|
queryKey: ["uiLibraries"],
|
|
@@ -2542,14 +2542,14 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
2542
2542
|
data: { draft: !0 }
|
|
2543
2543
|
})
|
|
2544
2544
|
});
|
|
2545
|
-
},
|
|
2545
|
+
}, xo = () => {
|
|
2546
2546
|
const e = Z(), t = X(), { setCurrentEditor: n } = tn(), [, s] = ds();
|
|
2547
2547
|
return { getUILibraryBlock: async (o, u) => {
|
|
2548
2548
|
const d = await t(e, {
|
|
2549
2549
|
action: "GET_LIBRARY_ITEM",
|
|
2550
2550
|
data: { id: u.id }
|
|
2551
|
-
});
|
|
2552
|
-
return
|
|
2551
|
+
}), f = ne(d, "html", ""), m = ne(d, "blocks", []);
|
|
2552
|
+
return ka(m) ? m : Sa(f);
|
|
2553
2553
|
}, getUILibraryBlocks: async (o) => {
|
|
2554
2554
|
try {
|
|
2555
2555
|
return (await t(e, {
|
|
@@ -2580,7 +2580,7 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
2580
2580
|
return console.error(d), new Error("Failed to save blocks");
|
|
2581
2581
|
}
|
|
2582
2582
|
} };
|
|
2583
|
-
},
|
|
2583
|
+
}, To = () => {
|
|
2584
2584
|
const { data: e } = In(), t = Z(), n = X();
|
|
2585
2585
|
return {
|
|
2586
2586
|
getPartialBlocks: ke(async () => {
|
|
@@ -2842,7 +2842,7 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
2842
2842
|
za: "Zhuang, Chuang",
|
|
2843
2843
|
zu: "Zulu"
|
|
2844
2844
|
}, oe = {
|
|
2845
|
-
...
|
|
2845
|
+
...ba,
|
|
2846
2846
|
//pages
|
|
2847
2847
|
ADD_PAGE: "add_page",
|
|
2848
2848
|
EDIT_PAGE: "edit_page",
|
|
@@ -2876,7 +2876,7 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
2876
2876
|
ADD_MEDIA: "add_media",
|
|
2877
2877
|
EDIT_MEDIA: "edit_media",
|
|
2878
2878
|
DELETE_MEDIA: "delete_media"
|
|
2879
|
-
},
|
|
2879
|
+
}, Co = {
|
|
2880
2880
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
2881
2881
|
}, sa = () => {
|
|
2882
2882
|
const e = Z(), t = Ae(), n = X(), { data: s } = Ie();
|
|
@@ -2894,7 +2894,7 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
2894
2894
|
ie.error(
|
|
2895
2895
|
`Failed to add new ${l != null && l.hasSlug ? "page" : l.name}.`,
|
|
2896
2896
|
{
|
|
2897
|
-
description:
|
|
2897
|
+
description: ne(Co, r.message, r.message)
|
|
2898
2898
|
}
|
|
2899
2899
|
);
|
|
2900
2900
|
}
|
|
@@ -2923,7 +2923,7 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
2923
2923
|
);
|
|
2924
2924
|
}
|
|
2925
2925
|
});
|
|
2926
|
-
},
|
|
2926
|
+
}, Po = () => {
|
|
2927
2927
|
const e = Z(), t = Ae(), n = X(), { data: s } = Ie();
|
|
2928
2928
|
return De({
|
|
2929
2929
|
mutationFn: async (r) => n(e, {
|
|
@@ -2953,7 +2953,7 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
2953
2953
|
);
|
|
2954
2954
|
}
|
|
2955
2955
|
});
|
|
2956
|
-
},
|
|
2956
|
+
}, _o = () => {
|
|
2957
2957
|
const e = Z(), t = Ae(), n = X(), { data: s } = Ie();
|
|
2958
2958
|
return De({
|
|
2959
2959
|
mutationFn: async (r) => n(e, {
|
|
@@ -2997,7 +2997,7 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
2997
2997
|
ie.error("Failed to publish pages.");
|
|
2998
2998
|
}
|
|
2999
2999
|
});
|
|
3000
|
-
},
|
|
3000
|
+
}, Io = () => {
|
|
3001
3001
|
const e = Z(), t = X(), n = Ae();
|
|
3002
3002
|
return De({
|
|
3003
3003
|
mutationFn: async ({ id: s, slug: r }) => t(e, {
|
|
@@ -3026,15 +3026,15 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
3026
3026
|
action: _.GET_LANGUAGE_PAGES,
|
|
3027
3027
|
data: { id: n }
|
|
3028
3028
|
});
|
|
3029
|
-
return
|
|
3029
|
+
return Da(Ga(r, "primaryPage"));
|
|
3030
3030
|
},
|
|
3031
3031
|
enabled: !!n
|
|
3032
3032
|
});
|
|
3033
|
-
},
|
|
3033
|
+
}, Lo = ({
|
|
3034
3034
|
page: e,
|
|
3035
3035
|
onClose: t
|
|
3036
3036
|
}) => {
|
|
3037
|
-
const [n, s] = M(e.slug || ""), { mutate: r, isPending: i } =
|
|
3037
|
+
const [n, s] = M(e.slug || ""), { mutate: r, isPending: i } = Io(), { data: l } = Ie(), o = ge(l, { key: e == null ? void 0 : e.pageType }), u = (f) => {
|
|
3038
3038
|
if (f.preventDefault(), !(e != null && e.primaryPage) && Object.keys(Be).some((v) => n === `/${v}` || Lt(n, `/${v}/`))) {
|
|
3039
3039
|
ie.error("Error", {
|
|
3040
3040
|
description: "Slugs cannot start with a language code for primary page"
|
|
@@ -3047,7 +3047,7 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
3047
3047
|
/* @__PURE__ */ c(je, { children: [
|
|
3048
3048
|
/* @__PURE__ */ a(ze, { children: "Change Slug" }),
|
|
3049
3049
|
/* @__PURE__ */ a(Ze, { className: "text-xs", children: /* @__PURE__ */ c(ir, { variant: "destructive", className: "mt-2", children: [
|
|
3050
|
-
/* @__PURE__ */ a(
|
|
3050
|
+
/* @__PURE__ */ a(Fa, { className: "h-4 w-4" }),
|
|
3051
3051
|
"Changing the slug may have impact on your SEO. Please proceed with caution."
|
|
3052
3052
|
] }) })
|
|
3053
3053
|
] }),
|
|
@@ -3070,7 +3070,7 @@ const mo = rs({}), ea = () => as(mo), go = () => {
|
|
|
3070
3070
|
] })
|
|
3071
3071
|
] }),
|
|
3072
3072
|
/* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
3073
|
-
/* @__PURE__ */ c(
|
|
3073
|
+
/* @__PURE__ */ c(re, { htmlFor: "slug", className: "text-right", children: [
|
|
3074
3074
|
"Slug",
|
|
3075
3075
|
" ",
|
|
3076
3076
|
/* @__PURE__ */ c("small", { className: "font-light text-gray-500", children: [
|
|
@@ -3111,7 +3111,7 @@ function ra({
|
|
|
3111
3111
|
page: e,
|
|
3112
3112
|
onClose: t
|
|
3113
3113
|
}) {
|
|
3114
|
-
const [, n] = Ge(), { mutate: s, isPending: r } =
|
|
3114
|
+
const [, n] = Ge(), { mutate: s, isPending: r } = Po(), { data: i } = Ie(), l = () => {
|
|
3115
3115
|
s(e, {
|
|
3116
3116
|
onSuccess: () => {
|
|
3117
3117
|
e != null && e.primaryPage || (window.history.replaceState(null, "", "/"), n(new URLSearchParams({})), window.dispatchEvent(new PopStateEvent("popstate"))), t();
|
|
@@ -3133,7 +3133,7 @@ function ra({
|
|
|
3133
3133
|
e.lang && /* @__PURE__ */ c("div", { className: "py-2 text-sm", children: [
|
|
3134
3134
|
"Language:",
|
|
3135
3135
|
" ",
|
|
3136
|
-
/* @__PURE__ */ a("span", { className: "font-medium text-gray-500", children:
|
|
3136
|
+
/* @__PURE__ */ a("span", { className: "font-medium text-gray-500", children: ne(Be, e.lang, e.lang) })
|
|
3137
3137
|
] })
|
|
3138
3138
|
] })
|
|
3139
3139
|
] }),
|
|
@@ -3163,7 +3163,7 @@ const Ue = ({
|
|
|
3163
3163
|
page: e,
|
|
3164
3164
|
onClose: t
|
|
3165
3165
|
}) => {
|
|
3166
|
-
const { mutate: n, isPending: s } =
|
|
3166
|
+
const { mutate: n, isPending: s } = _o(), r = async () => {
|
|
3167
3167
|
n(e, { onSuccess: t });
|
|
3168
3168
|
};
|
|
3169
3169
|
return /* @__PURE__ */ a($e, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ c(Ke, { children: [
|
|
@@ -3218,7 +3218,7 @@ const Ue = ({
|
|
|
3218
3218
|
/* @__PURE__ */ c("form", { onSubmit: A, children: [
|
|
3219
3219
|
/* @__PURE__ */ c("div", { className: "grid gap-4 py-4", children: [
|
|
3220
3220
|
/* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
3221
|
-
/* @__PURE__ */ a(
|
|
3221
|
+
/* @__PURE__ */ a(re, { htmlFor: "lang", className: "text-right", children: F.LANGUAGE }),
|
|
3222
3222
|
/* @__PURE__ */ c(
|
|
3223
3223
|
"select",
|
|
3224
3224
|
{
|
|
@@ -3230,14 +3230,14 @@ const Ue = ({
|
|
|
3230
3230
|
},
|
|
3231
3231
|
className: "flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 col-span-3",
|
|
3232
3232
|
children: [
|
|
3233
|
-
/* @__PURE__ */ a("option", { value: "", disabled: !0, selected: !0, children: e.edit ?
|
|
3234
|
-
Le(n, (x) => /* @__PURE__ */ a("option", { value: x, children:
|
|
3233
|
+
/* @__PURE__ */ a("option", { value: "", disabled: !0, selected: !0, children: e.edit ? ne(Be, e.lang, e.lang) : ce(n) ? F.ALL_AVAILABLE_LANGUAGE_PAGE : F.CHOOSE_LANGUAGE }),
|
|
3234
|
+
Le(n, (x) => /* @__PURE__ */ a("option", { value: x, children: ne(Be, x, x) }, x))
|
|
3235
3235
|
]
|
|
3236
3236
|
}
|
|
3237
3237
|
)
|
|
3238
3238
|
] }),
|
|
3239
3239
|
/* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
3240
|
-
/* @__PURE__ */ a(
|
|
3240
|
+
/* @__PURE__ */ a(re, { htmlFor: "slug", className: "text-right", children: F.PAGE_NAME }),
|
|
3241
3241
|
/* @__PURE__ */ a(
|
|
3242
3242
|
be,
|
|
3243
3243
|
{
|
|
@@ -3251,7 +3251,7 @@ const Ue = ({
|
|
|
3251
3251
|
)
|
|
3252
3252
|
] }),
|
|
3253
3253
|
!S && /* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
3254
|
-
/* @__PURE__ */ c(
|
|
3254
|
+
/* @__PURE__ */ c(re, { htmlFor: "slug", className: "text-right", children: [
|
|
3255
3255
|
F.SLUG,
|
|
3256
3256
|
" ",
|
|
3257
3257
|
/* @__PURE__ */ a("small", { className: "font-light", children: F.SLUG_SHOULD_START_WITH })
|
|
@@ -3263,7 +3263,7 @@ const Ue = ({
|
|
|
3263
3263
|
value: d,
|
|
3264
3264
|
onChange: (x) => {
|
|
3265
3265
|
const E = x.target.value;
|
|
3266
|
-
Lt(E, `/${o}`) && f(_t(
|
|
3266
|
+
Lt(E, `/${o}`) && f(_t(Ua(E)));
|
|
3267
3267
|
},
|
|
3268
3268
|
className: "col-span-3",
|
|
3269
3269
|
required: !0,
|
|
@@ -3285,10 +3285,10 @@ const Ue = ({
|
|
|
3285
3285
|
) })
|
|
3286
3286
|
] })
|
|
3287
3287
|
] }) });
|
|
3288
|
-
},
|
|
3288
|
+
}, ko = () => {
|
|
3289
3289
|
const [e, t] = M(null), { selectedLang: n, fallbackLang: s, setSelectedLang: r } = ot(), { data: i, isFetching: l } = nn(), { data: o } = Oe(), [u, d] = M(null), [f, m] = M(null), [b, v] = M(null), { data: y } = Ln(), w = ve(
|
|
3290
|
-
|
|
3291
|
-
(S) => !ge(i, { lang: S }) && S !==
|
|
3290
|
+
ne(y, "languages") || ["en"],
|
|
3291
|
+
(S) => !ge(i, { lang: S }) && S !== ne(y, "fallbackLang")
|
|
3292
3292
|
);
|
|
3293
3293
|
return /* @__PURE__ */ c("div", { className: "space-y-4 pt-2", children: [
|
|
3294
3294
|
/* @__PURE__ */ a("ul", { className: "space-y-2 mt-4", children: l ? /* @__PURE__ */ c("div", { className: "w-full space-y-3 py-4", children: [
|
|
@@ -3316,7 +3316,7 @@ const Ue = ({
|
|
|
3316
3316
|
className: `w-2.5 h-2.5 rounded-full ${S.online ? "bg-green-300" : "bg-gray-300"}`
|
|
3317
3317
|
}
|
|
3318
3318
|
),
|
|
3319
|
-
|
|
3319
|
+
ne(Be, x ? s : I, I)
|
|
3320
3320
|
]
|
|
3321
3321
|
}
|
|
3322
3322
|
),
|
|
@@ -3336,7 +3336,7 @@ const Ue = ({
|
|
|
3336
3336
|
] })
|
|
3337
3337
|
] }),
|
|
3338
3338
|
x ? /* @__PURE__ */ c("div", { className: "flex items-center text-[11px] text-orange-500 gap-x-1", children: [
|
|
3339
|
-
/* @__PURE__ */ a(
|
|
3339
|
+
/* @__PURE__ */ a(Ha, { fill: "orange", className: "w-3 h-3" }),
|
|
3340
3340
|
/* @__PURE__ */ a("b", { children: " Primary" })
|
|
3341
3341
|
] }) : /* @__PURE__ */ a("div", { className: "flex items-center gap-x-3", children: /* @__PURE__ */ a(
|
|
3342
3342
|
Ue,
|
|
@@ -3376,7 +3376,7 @@ const Ue = ({
|
|
|
3376
3376
|
C.stopPropagation(), t({ ...S, edit: !0 });
|
|
3377
3377
|
},
|
|
3378
3378
|
children: [
|
|
3379
|
-
/* @__PURE__ */ a(
|
|
3379
|
+
/* @__PURE__ */ a(Va, { className: "size-3" }),
|
|
3380
3380
|
F.EDIT
|
|
3381
3381
|
]
|
|
3382
3382
|
}
|
|
@@ -3414,7 +3414,7 @@ const Ue = ({
|
|
|
3414
3414
|
C.stopPropagation(), d(S);
|
|
3415
3415
|
},
|
|
3416
3416
|
children: [
|
|
3417
|
-
/* @__PURE__ */ a(
|
|
3417
|
+
/* @__PURE__ */ a(qa, { className: "size-3" }),
|
|
3418
3418
|
F.DELETE
|
|
3419
3419
|
]
|
|
3420
3420
|
}
|
|
@@ -3467,7 +3467,7 @@ const Ue = ({
|
|
|
3467
3467
|
}
|
|
3468
3468
|
),
|
|
3469
3469
|
b && /* @__PURE__ */ a(
|
|
3470
|
-
|
|
3470
|
+
Lo,
|
|
3471
3471
|
{
|
|
3472
3472
|
page: b,
|
|
3473
3473
|
onClose: () => v(null)
|
|
@@ -3477,14 +3477,14 @@ const Ue = ({
|
|
|
3477
3477
|
}, ia = (e) => {
|
|
3478
3478
|
const { fallbackLang: t } = ot(), { data: n } = Ln(), { data: s, isFetching: r } = nn(), i = ue(() => {
|
|
3479
3479
|
const l = { [t]: !0 };
|
|
3480
|
-
return
|
|
3480
|
+
return Oa(ne(n, "languages"), (o) => {
|
|
3481
3481
|
const u = ge(s, { lang: o });
|
|
3482
3482
|
l[o] = !!u;
|
|
3483
3483
|
}), l;
|
|
3484
3484
|
}, [t, s, n]);
|
|
3485
3485
|
return r || ce(e) || e && i[e];
|
|
3486
3486
|
};
|
|
3487
|
-
function
|
|
3487
|
+
function Do({
|
|
3488
3488
|
avatar: e,
|
|
3489
3489
|
name: t,
|
|
3490
3490
|
email: n,
|
|
@@ -3506,7 +3506,7 @@ function Lo({
|
|
|
3506
3506
|
alt: t,
|
|
3507
3507
|
className: "w-12 h-12 border border-gray-300 rounded-full"
|
|
3508
3508
|
}
|
|
3509
|
-
) : /* @__PURE__ */ a(
|
|
3509
|
+
) : /* @__PURE__ */ a($a, { className: "w-12 h-12 p-2 border border-gray-300 rounded-full" }),
|
|
3510
3510
|
/* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
3511
3511
|
/* @__PURE__ */ a("h3", { className: "font-semibold", children: t }),
|
|
3512
3512
|
n && /* @__PURE__ */ a("p", { className: "text-sm text-muted-foreground", children: n })
|
|
@@ -3522,17 +3522,17 @@ function Lo({
|
|
|
3522
3522
|
variant: "destructive",
|
|
3523
3523
|
children: "Refresh"
|
|
3524
3524
|
}
|
|
3525
|
-
) }) : /* @__PURE__ */ c(
|
|
3526
|
-
/* @__PURE__ */ a(
|
|
3525
|
+
) }) : /* @__PURE__ */ c(mi, { open: i, onOpenChange: l, children: [
|
|
3526
|
+
/* @__PURE__ */ a(gi, { asChild: !0, children: /* @__PURE__ */ c("span", { className: "flex flex-col items-center", children: [
|
|
3527
3527
|
/* @__PURE__ */ a(H, { className: "w-full", variant: "destructive", children: "Take Over" }),
|
|
3528
3528
|
/* @__PURE__ */ a("p", { className: "mt-2 text-xs text-muted-foreground", children: "If you need to edit, you can take over the lock, but be aware that the other user might lose unsaved changes." })
|
|
3529
3529
|
] }) }),
|
|
3530
|
-
/* @__PURE__ */ c(
|
|
3531
|
-
/* @__PURE__ */ c(
|
|
3532
|
-
/* @__PURE__ */ a(
|
|
3533
|
-
/* @__PURE__ */ c(
|
|
3530
|
+
/* @__PURE__ */ c(pi, { className: "z-[99]", children: [
|
|
3531
|
+
/* @__PURE__ */ c(yi, { children: [
|
|
3532
|
+
/* @__PURE__ */ a(vi, { children: "Are you sure you want to take over?" }),
|
|
3533
|
+
/* @__PURE__ */ c(Ei, { children: [
|
|
3534
3534
|
/* @__PURE__ */ c("p", { className: "flex items-center space-x-2 text-yellow-500", children: [
|
|
3535
|
-
/* @__PURE__ */ a(
|
|
3535
|
+
/* @__PURE__ */ a(Ka, { className: "w-5 h-5" }),
|
|
3536
3536
|
/* @__PURE__ */ a("span", { children: "This action might cause the other user to lose unsaved changes." })
|
|
3537
3537
|
] }),
|
|
3538
3538
|
/* @__PURE__ */ c("p", { className: "mt-2", children: [
|
|
@@ -3542,9 +3542,9 @@ function Lo({
|
|
|
3542
3542
|
] })
|
|
3543
3543
|
] })
|
|
3544
3544
|
] }),
|
|
3545
|
-
/* @__PURE__ */ c(
|
|
3546
|
-
/* @__PURE__ */ a(
|
|
3547
|
-
/* @__PURE__ */ a(
|
|
3545
|
+
/* @__PURE__ */ c(Si, { children: [
|
|
3546
|
+
/* @__PURE__ */ a(bi, { children: "Cancel" }),
|
|
3547
|
+
/* @__PURE__ */ a(wi, { onClick: () => {
|
|
3548
3548
|
l(!1), s();
|
|
3549
3549
|
}, children: "Yes, Take Over" })
|
|
3550
3550
|
] })
|
|
@@ -3552,8 +3552,8 @@ function Lo({
|
|
|
3552
3552
|
] }) })
|
|
3553
3553
|
] }) });
|
|
3554
3554
|
}
|
|
3555
|
-
const
|
|
3556
|
-
const { isLocked: e, currentEditor: t } = tn(), { data: n } = en(t), s = qe("pageLockComponent",
|
|
3555
|
+
const Go = () => {
|
|
3556
|
+
const { isLocked: e, currentEditor: t } = tn(), { data: n } = en(t), s = qe("pageLockComponent", Do), [r] = Ge(), i = r.get("page"), { mutate: l } = Zr(), { isFetching: o } = ta(), u = ke(() => {
|
|
3557
3557
|
l({ id: i });
|
|
3558
3558
|
}, [i, l]);
|
|
3559
3559
|
return !e || o ? /* @__PURE__ */ a("div", { className: "" }) : /* @__PURE__ */ a(
|
|
@@ -3565,7 +3565,7 @@ const ko = () => {
|
|
|
3565
3565
|
onTakeOver: u
|
|
3566
3566
|
}
|
|
3567
3567
|
);
|
|
3568
|
-
},
|
|
3568
|
+
}, Uo = () => {
|
|
3569
3569
|
const [e, t] = Ge(), n = e.get("lang"), s = ia(n), { setSelectedLang: r } = ot(), i = () => {
|
|
3570
3570
|
const o = new URLSearchParams(window.location.search);
|
|
3571
3571
|
o.delete("lang");
|
|
@@ -3573,7 +3573,7 @@ const ko = () => {
|
|
|
3573
3573
|
window.history.pushState({}, "", d), t(o), r(""), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
3574
3574
|
};
|
|
3575
3575
|
if (s) return null;
|
|
3576
|
-
const l =
|
|
3576
|
+
const l = ne(Be, n);
|
|
3577
3577
|
return /* @__PURE__ */ a("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ c(lr, { className: "w-full max-w-md mx-auto", children: [
|
|
3578
3578
|
/* @__PURE__ */ a(or, { className: "space-y-1", children: /* @__PURE__ */ c(cr, { className: "flex items-center gap-2 text-2xl", children: [
|
|
3579
3579
|
/* @__PURE__ */ a(Zs, { className: "w-6 h-6 text-yellow-500" }),
|
|
@@ -3598,14 +3598,14 @@ const ko = () => {
|
|
|
3598
3598
|
}
|
|
3599
3599
|
) })
|
|
3600
3600
|
] }) });
|
|
3601
|
-
},
|
|
3601
|
+
}, Oo = () => {
|
|
3602
3602
|
const e = Z(), t = X();
|
|
3603
3603
|
return xe({
|
|
3604
3604
|
queryKey: [_.GET_LIBRARIES],
|
|
3605
3605
|
initialData: [],
|
|
3606
3606
|
queryFn: async () => t(e, { action: _.GET_LIBRARIES })
|
|
3607
3607
|
});
|
|
3608
|
-
},
|
|
3608
|
+
}, Ro = (e) => {
|
|
3609
3609
|
const t = Z(), n = X();
|
|
3610
3610
|
return xe({
|
|
3611
3611
|
queryKey: [_.GET_LIBRARY_ITEMS, e],
|
|
@@ -3631,7 +3631,7 @@ const ko = () => {
|
|
|
3631
3631
|
}) => {
|
|
3632
3632
|
const r = !!t, [i, l] = M("CREATE"), [o, u] = M(""), [d, f] = M(
|
|
3633
3633
|
r ? (t == null ? void 0 : t.name) + " template" : ""
|
|
3634
|
-
), [m, b] = M(""), [v, y] = M(""), [w] = Hs(), S =
|
|
3634
|
+
), [m, b] = M(""), [v, y] = M(""), [w] = Hs(), S = go({ id: o }), { data: I, isLoading: A } = Oo(), { data: x, isLoading: E } = Ro(o), C = A || E || S.isPending;
|
|
3635
3635
|
Pe(() => {
|
|
3636
3636
|
I.length > 0 && u(I[0].id);
|
|
3637
3637
|
}, [I]);
|
|
@@ -3664,12 +3664,12 @@ const ko = () => {
|
|
|
3664
3664
|
className: `py-4 text-slate-500 space-y-1 text-xs ${C ? "opacity-75 pointer-events-none" : ""}`,
|
|
3665
3665
|
children: [
|
|
3666
3666
|
/* @__PURE__ */ a(
|
|
3667
|
-
|
|
3667
|
+
Ni,
|
|
3668
3668
|
{
|
|
3669
3669
|
value: i,
|
|
3670
3670
|
onValueChange: l,
|
|
3671
3671
|
className: "w-full",
|
|
3672
|
-
children: /* @__PURE__ */ c(
|
|
3672
|
+
children: /* @__PURE__ */ c(Ai, { className: "w-full", children: [
|
|
3673
3673
|
/* @__PURE__ */ c(Ts, { value: "CREATE", className: "w-full", children: [
|
|
3674
3674
|
"Create new ",
|
|
3675
3675
|
r ? "template" : ""
|
|
@@ -3682,7 +3682,7 @@ const ko = () => {
|
|
|
3682
3682
|
}
|
|
3683
3683
|
),
|
|
3684
3684
|
/* @__PURE__ */ a("br", {}),
|
|
3685
|
-
/* @__PURE__ */ a(
|
|
3685
|
+
/* @__PURE__ */ a(re, { className: "text-xs", children: "Choose Library" }),
|
|
3686
3686
|
/* @__PURE__ */ c(
|
|
3687
3687
|
Mn,
|
|
3688
3688
|
{
|
|
@@ -3703,7 +3703,7 @@ const ko = () => {
|
|
|
3703
3703
|
}
|
|
3704
3704
|
),
|
|
3705
3705
|
/* @__PURE__ */ a("br", {}),
|
|
3706
|
-
/* @__PURE__ */ a(
|
|
3706
|
+
/* @__PURE__ */ a(re, { className: "text-xs", children: "Group" }),
|
|
3707
3707
|
/* @__PURE__ */ a(
|
|
3708
3708
|
be,
|
|
3709
3709
|
{
|
|
@@ -3718,7 +3718,7 @@ const ko = () => {
|
|
|
3718
3718
|
),
|
|
3719
3719
|
/* @__PURE__ */ a("br", {}),
|
|
3720
3720
|
i === "CREATE" ? /* @__PURE__ */ c(me, { children: [
|
|
3721
|
-
/* @__PURE__ */ c(
|
|
3721
|
+
/* @__PURE__ */ c(re, { className: "text-xs", children: [
|
|
3722
3722
|
r ? "Template" : "Block",
|
|
3723
3723
|
" name"
|
|
3724
3724
|
] }),
|
|
@@ -3735,7 +3735,7 @@ const ko = () => {
|
|
|
3735
3735
|
}
|
|
3736
3736
|
)
|
|
3737
3737
|
] }) : /* @__PURE__ */ c(me, { children: [
|
|
3738
|
-
/* @__PURE__ */ c(
|
|
3738
|
+
/* @__PURE__ */ c(re, { className: "text-xs", children: [
|
|
3739
3739
|
"Choose ",
|
|
3740
3740
|
r ? "template" : "block",
|
|
3741
3741
|
" to update"
|
|
@@ -3832,7 +3832,7 @@ const ko = () => {
|
|
|
3832
3832
|
}
|
|
3833
3833
|
)
|
|
3834
3834
|
] });
|
|
3835
|
-
},
|
|
3835
|
+
}, Mo = () => {
|
|
3836
3836
|
const { selectedLang: e } = ot(), { data: t, isFetching: n } = nn();
|
|
3837
3837
|
return { data: ue(() => ge(t, { lang: e || "" }) || {}, [t, e]), isFetching: n };
|
|
3838
3838
|
};
|
|
@@ -3862,9 +3862,9 @@ function Ye({
|
|
|
3862
3862
|
value: w,
|
|
3863
3863
|
type: f(w)
|
|
3864
3864
|
})).filter((y) => n === "value" ? y.type === "value" || y.type === "object" : n === "array" ? y.type === "array" || y.type === "object" : n === "object" ? y.type === "object" : !0), [u, n]);
|
|
3865
|
-
return /* @__PURE__ */ c(
|
|
3865
|
+
return /* @__PURE__ */ c(xi, { open: r, onOpenChange: i, children: [
|
|
3866
3866
|
/* @__PURE__ */ c(is, { children: [
|
|
3867
|
-
/* @__PURE__ */ a(ls, { asChild: !0, children: /* @__PURE__ */ a(
|
|
3867
|
+
/* @__PURE__ */ a(ls, { asChild: !0, children: /* @__PURE__ */ a(Ti, { asChild: !0, children: /* @__PURE__ */ a(
|
|
3868
3868
|
H,
|
|
3869
3869
|
{
|
|
3870
3870
|
size: "sm",
|
|
@@ -3873,23 +3873,23 @@ function Ye({
|
|
|
3873
3873
|
role: "combobox",
|
|
3874
3874
|
"aria-expanded": r,
|
|
3875
3875
|
disabled: s,
|
|
3876
|
-
children: /* @__PURE__ */ a(
|
|
3876
|
+
children: /* @__PURE__ */ a(ja, { className: "h-3 w-3" })
|
|
3877
3877
|
}
|
|
3878
3878
|
) }) }),
|
|
3879
3879
|
/* @__PURE__ */ a(os, { children: "Add field" })
|
|
3880
3880
|
] }),
|
|
3881
|
-
/* @__PURE__ */ a(
|
|
3882
|
-
/* @__PURE__ */ a(
|
|
3883
|
-
/* @__PURE__ */ c(
|
|
3884
|
-
/* @__PURE__ */ a(
|
|
3885
|
-
/* @__PURE__ */ c(
|
|
3881
|
+
/* @__PURE__ */ a(Ci, { className: "w-[200px] p-0", children: /* @__PURE__ */ c(Pi, { children: [
|
|
3882
|
+
/* @__PURE__ */ a(_i, { className: "border-none", placeholder: "Search..." }),
|
|
3883
|
+
/* @__PURE__ */ c(Ii, { children: [
|
|
3884
|
+
/* @__PURE__ */ a(Li, { children: "No option found." }),
|
|
3885
|
+
/* @__PURE__ */ c(ki, { children: [
|
|
3886
3886
|
l.length > 0 && /* @__PURE__ */ c(
|
|
3887
3887
|
Cs,
|
|
3888
3888
|
{
|
|
3889
3889
|
onSelect: b,
|
|
3890
3890
|
className: "flex items-center text-sm",
|
|
3891
3891
|
children: [
|
|
3892
|
-
/* @__PURE__ */ a(
|
|
3892
|
+
/* @__PURE__ */ a(za, { className: "w-4 h-4 mr-2" }),
|
|
3893
3893
|
"Back"
|
|
3894
3894
|
]
|
|
3895
3895
|
}
|
|
@@ -3914,7 +3914,7 @@ function Ye({
|
|
|
3914
3914
|
children: "Select"
|
|
3915
3915
|
}
|
|
3916
3916
|
),
|
|
3917
|
-
(y.type === "object" || y.type === "array") && /* @__PURE__ */ a("div", { className: "p-1 rounded hover:bg-muted cursor-pointer", children: /* @__PURE__ */ a(
|
|
3917
|
+
(y.type === "object" || y.type === "array") && /* @__PURE__ */ a("div", { className: "p-1 rounded hover:bg-muted cursor-pointer", children: /* @__PURE__ */ a(Wa, { className: "w-4 h-4 opacity-50" }) })
|
|
3918
3918
|
] })
|
|
3919
3919
|
]
|
|
3920
3920
|
},
|
|
@@ -3925,7 +3925,7 @@ function Ye({
|
|
|
3925
3925
|
] }) })
|
|
3926
3926
|
] });
|
|
3927
3927
|
}
|
|
3928
|
-
const
|
|
3928
|
+
const Bo = (e, t) => {
|
|
3929
3929
|
const n = e.selectionStart || 0, s = e.selectionEnd || 0, r = e.value, i = r.substring(0, n), l = r.substring(s);
|
|
3930
3930
|
let o = !1;
|
|
3931
3931
|
if (n > 0 && i.length > 0) {
|
|
@@ -3944,10 +3944,10 @@ const Ro = (e, t) => {
|
|
|
3944
3944
|
newCursorPos: v
|
|
3945
3945
|
};
|
|
3946
3946
|
}, ca = () => {
|
|
3947
|
-
const { t: e } =
|
|
3947
|
+
const { t: e } = wa(), { selectedLang: t, fallbackLang: n, languages: s } = ot(), { data: r } = Oe(), { data: i } = na({
|
|
3948
3948
|
lang: t || n,
|
|
3949
3949
|
pageType: r == null ? void 0 : r.pageType
|
|
3950
|
-
}), { data: l, isFetching: o } =
|
|
3950
|
+
}), { data: l, isFetching: o } = Mo(), u = l == null ? void 0 : l.seo, d = pn(
|
|
3951
3951
|
null
|
|
3952
3952
|
), [f, m] = M({
|
|
3953
3953
|
title: "",
|
|
@@ -3996,7 +3996,7 @@ const Ro = (e, t) => {
|
|
|
3996
3996
|
}, B = (L, N) => {
|
|
3997
3997
|
const k = document.getElementById(N);
|
|
3998
3998
|
if (k) {
|
|
3999
|
-
const { value: V, newCursorPos: W } =
|
|
3999
|
+
const { value: V, newCursorPos: W } = Bo(
|
|
4000
4000
|
k,
|
|
4001
4001
|
L
|
|
4002
4002
|
);
|
|
@@ -4034,7 +4034,7 @@ const Ro = (e, t) => {
|
|
|
4034
4034
|
m(N), b.current.updated = N;
|
|
4035
4035
|
};
|
|
4036
4036
|
return /* @__PURE__ */ c("div", { className: "relative pb-40", children: [
|
|
4037
|
-
!A && /* @__PURE__ */ a("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ a(ir, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ a(
|
|
4037
|
+
!A && /* @__PURE__ */ a("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ a(ir, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ a(Di, { children: e(
|
|
4038
4038
|
"You don't have permission to edit SEO settings. Contact your administrator for access."
|
|
4039
4039
|
) }) }) }),
|
|
4040
4040
|
/* @__PURE__ */ c("div", { className: "p-2 text-xs text-left bg-gray-100 rounded-md", children: [
|
|
@@ -4044,17 +4044,17 @@ const Ro = (e, t) => {
|
|
|
4044
4044
|
" ",
|
|
4045
4045
|
s.length > 0 && /* @__PURE__ */ c("span", { className: "font-semibold text-blue-500", children: [
|
|
4046
4046
|
"(",
|
|
4047
|
-
|
|
4047
|
+
ne(Be, v, v),
|
|
4048
4048
|
")"
|
|
4049
4049
|
] })
|
|
4050
4050
|
] }),
|
|
4051
|
-
/* @__PURE__ */ a("form", { className: "space-y-8", children: /* @__PURE__ */ c(
|
|
4051
|
+
/* @__PURE__ */ a("form", { className: "space-y-8", children: /* @__PURE__ */ c(Gi, { type: "multiple", defaultValue: ["page"], children: [
|
|
4052
4052
|
/* @__PURE__ */ c(rn, { value: "page", children: [
|
|
4053
4053
|
/* @__PURE__ */ a(an, { className: "font-semibold text-slate-700", children: e("SEO") }),
|
|
4054
4054
|
/* @__PURE__ */ a(ln, { className: "pt-2", children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
|
|
4055
4055
|
/* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
4056
4056
|
/* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
|
|
4057
|
-
/* @__PURE__ */ a(
|
|
4057
|
+
/* @__PURE__ */ a(re, { className: "text-xs", htmlFor: "title", children: e("SEO Title") }),
|
|
4058
4058
|
A && /* @__PURE__ */ a(
|
|
4059
4059
|
Ye,
|
|
4060
4060
|
{
|
|
@@ -4080,7 +4080,7 @@ const Ro = (e, t) => {
|
|
|
4080
4080
|
] }),
|
|
4081
4081
|
/* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
4082
4082
|
/* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
|
|
4083
|
-
/* @__PURE__ */ a(
|
|
4083
|
+
/* @__PURE__ */ a(re, { className: "text-xs", htmlFor: "description", children: e("SEO Description") }),
|
|
4084
4084
|
A && /* @__PURE__ */ a(
|
|
4085
4085
|
Ye,
|
|
4086
4086
|
{
|
|
@@ -4105,7 +4105,7 @@ const Ro = (e, t) => {
|
|
|
4105
4105
|
] }),
|
|
4106
4106
|
/* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
4107
4107
|
/* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
|
|
4108
|
-
/* @__PURE__ */ a(
|
|
4108
|
+
/* @__PURE__ */ a(re, { className: "text-xs", htmlFor: "title", children: e("Canonical URL") }),
|
|
4109
4109
|
A && /* @__PURE__ */ a(
|
|
4110
4110
|
Ye,
|
|
4111
4111
|
{
|
|
@@ -4143,7 +4143,7 @@ const Ro = (e, t) => {
|
|
|
4143
4143
|
className: "w-4 h-4"
|
|
4144
4144
|
}
|
|
4145
4145
|
),
|
|
4146
|
-
/* @__PURE__ */ a(
|
|
4146
|
+
/* @__PURE__ */ a(re, { className: "pb-1 text-xs", htmlFor: "noIndex", children: e("No Index") })
|
|
4147
4147
|
] }),
|
|
4148
4148
|
/* @__PURE__ */ a("p", { className: "mt-0 text-[10px] font-light text-gray-400 leading-4", children: e(
|
|
4149
4149
|
"Check this if you don't want search engines to index this page."
|
|
@@ -4163,7 +4163,7 @@ const Ro = (e, t) => {
|
|
|
4163
4163
|
className: "w-4 h-4"
|
|
4164
4164
|
}
|
|
4165
4165
|
),
|
|
4166
|
-
/* @__PURE__ */ a(
|
|
4166
|
+
/* @__PURE__ */ a(re, { className: "pb-1 text-xs", htmlFor: "noIndex", children: e("No Follow") })
|
|
4167
4167
|
] }),
|
|
4168
4168
|
/* @__PURE__ */ a("p", { className: "text-[10px] font-light text-gray-400 leading-4", children: e(
|
|
4169
4169
|
"Check this if you don't want search engines to follow links on this page."
|
|
@@ -4187,7 +4187,7 @@ const Ro = (e, t) => {
|
|
|
4187
4187
|
) }),
|
|
4188
4188
|
/* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
4189
4189
|
/* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
|
|
4190
|
-
/* @__PURE__ */ a(
|
|
4190
|
+
/* @__PURE__ */ a(re, { className: "text-xs", htmlFor: "ogTitle", children: e("OG Title") }),
|
|
4191
4191
|
A && /* @__PURE__ */ a(
|
|
4192
4192
|
Ye,
|
|
4193
4193
|
{
|
|
@@ -4213,7 +4213,7 @@ const Ro = (e, t) => {
|
|
|
4213
4213
|
] }),
|
|
4214
4214
|
/* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
4215
4215
|
/* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
|
|
4216
|
-
/* @__PURE__ */ a(
|
|
4216
|
+
/* @__PURE__ */ a(re, { className: "text-xs", htmlFor: "ogDescription", children: e("OG Description") }),
|
|
4217
4217
|
A && /* @__PURE__ */ a(
|
|
4218
4218
|
Ye,
|
|
4219
4219
|
{
|
|
@@ -4239,7 +4239,7 @@ const Ro = (e, t) => {
|
|
|
4239
4239
|
] }),
|
|
4240
4240
|
/* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
4241
4241
|
/* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
|
|
4242
|
-
/* @__PURE__ */ a(
|
|
4242
|
+
/* @__PURE__ */ a(re, { className: "text-xs", htmlFor: "ogImage", children: e("OG Image URL") }),
|
|
4243
4243
|
A && /* @__PURE__ */ a(
|
|
4244
4244
|
Ye,
|
|
4245
4245
|
{
|
|
@@ -4281,7 +4281,7 @@ const Ro = (e, t) => {
|
|
|
4281
4281
|
) }),
|
|
4282
4282
|
/* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
4283
4283
|
/* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
|
|
4284
|
-
/* @__PURE__ */ a(
|
|
4284
|
+
/* @__PURE__ */ a(re, { className: "text-xs", htmlFor: "searchTitle", children: e("Search Title") }),
|
|
4285
4285
|
A && /* @__PURE__ */ a(
|
|
4286
4286
|
Ye,
|
|
4287
4287
|
{
|
|
@@ -4307,7 +4307,7 @@ const Ro = (e, t) => {
|
|
|
4307
4307
|
] }),
|
|
4308
4308
|
/* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
4309
4309
|
/* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
|
|
4310
|
-
/* @__PURE__ */ a(
|
|
4310
|
+
/* @__PURE__ */ a(re, { className: "text-xs", htmlFor: "searchDescription", children: e("Search Description") }),
|
|
4311
4311
|
A && /* @__PURE__ */ a(
|
|
4312
4312
|
Ye,
|
|
4313
4313
|
{
|
|
@@ -4337,7 +4337,7 @@ const Ro = (e, t) => {
|
|
|
4337
4337
|
/* @__PURE__ */ a(an, { className: "font-bold text-slate-700", children: e("JSON-LD") }),
|
|
4338
4338
|
/* @__PURE__ */ a(ln, { children: /* @__PURE__ */ a("div", { className: "space-y-4", children: /* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
4339
4339
|
/* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
|
|
4340
|
-
/* @__PURE__ */ a(
|
|
4340
|
+
/* @__PURE__ */ a(re, { className: "text-xs", htmlFor: "jsonLD", children: e("JSON-LD") }),
|
|
4341
4341
|
A && /* @__PURE__ */ a(
|
|
4342
4342
|
Ye,
|
|
4343
4343
|
{
|
|
@@ -4434,13 +4434,13 @@ var gs = {};
|
|
|
4434
4434
|
q.init = function(G) {
|
|
4435
4435
|
var j = G.transferControlToOffscreen();
|
|
4436
4436
|
q.postMessage({ canvas: j }, [j]);
|
|
4437
|
-
}, q.fire = function(G, j,
|
|
4437
|
+
}, q.fire = function(G, j, se) {
|
|
4438
4438
|
if (h)
|
|
4439
4439
|
return $(G, null), h;
|
|
4440
4440
|
var de = Math.random().toString(36).slice(2);
|
|
4441
4441
|
return h = d(function(ae) {
|
|
4442
4442
|
function he(ye) {
|
|
4443
|
-
ye.data.callback === de && (delete P[de], q.removeEventListener("message", he), h = null, f.clear(),
|
|
4443
|
+
ye.data.callback === de && (delete P[de], q.removeEventListener("message", he), h = null, f.clear(), se(), ae());
|
|
4444
4444
|
}
|
|
4445
4445
|
q.addEventListener("message", he), $(G, de), P[de] = he.bind(null, { data: { callback: de } });
|
|
4446
4446
|
}), h;
|
|
@@ -4603,11 +4603,11 @@ var gs = {};
|
|
|
4603
4603
|
Math.PI / 10 * h.wobble
|
|
4604
4604
|
));
|
|
4605
4605
|
else if (h.shape.type === "bitmap") {
|
|
4606
|
-
var G = Math.PI / 10 * h.wobble, j = Math.abs($ - U) * 0.1,
|
|
4606
|
+
var G = Math.PI / 10 * h.wobble, j = Math.abs($ - U) * 0.1, se = Math.abs(K - q) * 0.1, de = h.shape.bitmap.width * h.scalar, ae = h.shape.bitmap.height * h.scalar, he = new DOMMatrix([
|
|
4607
4607
|
Math.cos(G) * j,
|
|
4608
4608
|
Math.sin(G) * j,
|
|
4609
|
-
-Math.sin(G) *
|
|
4610
|
-
Math.cos(G) *
|
|
4609
|
+
-Math.sin(G) * se,
|
|
4610
|
+
Math.cos(G) * se,
|
|
4611
4611
|
h.x,
|
|
4612
4612
|
h.y
|
|
4613
4613
|
]);
|
|
@@ -4629,7 +4629,7 @@ var gs = {};
|
|
|
4629
4629
|
return g.closePath(), g.fill(), h.tick < h.totalTicks;
|
|
4630
4630
|
}
|
|
4631
4631
|
function We(g, h, P, U, q) {
|
|
4632
|
-
var $ = h.slice(), K = g.getContext("2d"), G, j,
|
|
4632
|
+
var $ = h.slice(), K = g.getContext("2d"), G, j, se = d(function(de) {
|
|
4633
4633
|
function ae() {
|
|
4634
4634
|
G = j = null, K.clearRect(0, 0, U.width, U.height), f.clear(), q(), de();
|
|
4635
4635
|
}
|
|
@@ -4642,17 +4642,17 @@ var gs = {};
|
|
|
4642
4642
|
});
|
|
4643
4643
|
return {
|
|
4644
4644
|
addFettis: function(de) {
|
|
4645
|
-
return $ = $.concat(de),
|
|
4645
|
+
return $ = $.concat(de), se;
|
|
4646
4646
|
},
|
|
4647
4647
|
canvas: g,
|
|
4648
|
-
promise:
|
|
4648
|
+
promise: se,
|
|
4649
4649
|
reset: function() {
|
|
4650
4650
|
G && m.cancel(G), j && j();
|
|
4651
4651
|
}
|
|
4652
4652
|
};
|
|
4653
4653
|
}
|
|
4654
4654
|
function pe(g, h) {
|
|
4655
|
-
var P = !g, U = !!S(h || {}, "resize"), q = !1, $ = S(h, "disableForReducedMotion", Boolean), K = i && !!S(h || {}, "useWorker"), G = K ? b() : null, j = P ? T : L,
|
|
4655
|
+
var P = !g, U = !!S(h || {}, "resize"), q = !1, $ = S(h, "disableForReducedMotion", Boolean), K = i && !!S(h || {}, "useWorker"), G = K ? b() : null, j = P ? T : L, se = g && G ? !!g.__confetti_initialized : !1, de = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion)").matches, ae;
|
|
4656
4656
|
function he(z, Te, Re) {
|
|
4657
4657
|
for (var Me = S(z, "particleCount", I), Qe = S(z, "angle", Number), st = S(z, "spread", Number), Fe = S(z, "startVelocity", Number), da = S(z, "decay", Number), ha = S(z, "gravity", Number), fa = S(z, "drift", Number), ps = S(z, "colors", E), ma = S(z, "ticks", Number), ys = S(z, "shapes"), ga = S(z, "scalar"), pa = !!S(z, "flat"), vs = B(z), Es = Me, kn = [], ya = g.width * vs.x, va = g.height * vs.y; Es--; )
|
|
4658
4658
|
kn.push(
|
|
@@ -4680,12 +4680,12 @@ var gs = {};
|
|
|
4680
4680
|
return d(function(Fe) {
|
|
4681
4681
|
Fe();
|
|
4682
4682
|
});
|
|
4683
|
-
P && ae ? g = ae.canvas : P && !g && (g = N(Re), document.body.appendChild(g)), U && !
|
|
4683
|
+
P && ae ? g = ae.canvas : P && !g && (g = N(Re), document.body.appendChild(g)), U && !se && j(g);
|
|
4684
4684
|
var Me = {
|
|
4685
4685
|
width: g.width,
|
|
4686
4686
|
height: g.height
|
|
4687
4687
|
};
|
|
4688
|
-
G && !
|
|
4688
|
+
G && !se && G.init(g), se = !0, G && (g.__confetti_initialized = !0);
|
|
4689
4689
|
function Qe() {
|
|
4690
4690
|
if (G) {
|
|
4691
4691
|
var Fe = {
|
|
@@ -4705,7 +4705,7 @@ var gs = {};
|
|
|
4705
4705
|
Me.width = Me.height = null;
|
|
4706
4706
|
}
|
|
4707
4707
|
function st() {
|
|
4708
|
-
ae = null, U && (q = !1, t.removeEventListener("resize", Qe)), P && g && (document.body.contains(g) && document.body.removeChild(g), g = null,
|
|
4708
|
+
ae = null, U && (q = !1, t.removeEventListener("resize", Qe)), P && g && (document.body.contains(g) && document.body.removeChild(g), g = null, se = !1);
|
|
4709
4709
|
}
|
|
4710
4710
|
return U && !q && (q = !0, t.addEventListener("resize", Qe, !1)), G ? G.fire(z, Me, st) : he(z, Me, st);
|
|
4711
4711
|
}
|
|
@@ -4720,15 +4720,15 @@ var gs = {};
|
|
|
4720
4720
|
function Se(g, h, P, U, q, $, K) {
|
|
4721
4721
|
var G = new Path2D(g), j = new Path2D();
|
|
4722
4722
|
j.addPath(G, new DOMMatrix(h));
|
|
4723
|
-
var
|
|
4724
|
-
return
|
|
4723
|
+
var se = new Path2D();
|
|
4724
|
+
return se.addPath(j, new DOMMatrix([
|
|
4725
4725
|
Math.cos(K) * q,
|
|
4726
4726
|
Math.sin(K) * q,
|
|
4727
4727
|
-Math.sin(K) * $,
|
|
4728
4728
|
Math.cos(K) * $,
|
|
4729
4729
|
P,
|
|
4730
4730
|
U
|
|
4731
|
-
])),
|
|
4731
|
+
])), se;
|
|
4732
4732
|
}
|
|
4733
4733
|
function Ne(g) {
|
|
4734
4734
|
if (!l)
|
|
@@ -4737,10 +4737,10 @@ var gs = {};
|
|
|
4737
4737
|
typeof g == "string" ? h = g : (h = g.path, P = g.matrix);
|
|
4738
4738
|
var U = new Path2D(h), q = document.createElement("canvas"), $ = q.getContext("2d");
|
|
4739
4739
|
if (!P) {
|
|
4740
|
-
for (var K = 1e3, G = K, j = K,
|
|
4740
|
+
for (var K = 1e3, G = K, j = K, se = 0, de = 0, ae, he, ye = 0; ye < K; ye += 2)
|
|
4741
4741
|
for (var z = 0; z < K; z += 2)
|
|
4742
|
-
$.isPointInPath(U, ye, z, "nonzero") && (G = Math.min(G, ye), j = Math.min(j, z),
|
|
4743
|
-
ae =
|
|
4742
|
+
$.isPointInPath(U, ye, z, "nonzero") && (G = Math.min(G, ye), j = Math.min(j, z), se = Math.max(se, ye), de = Math.max(de, z));
|
|
4743
|
+
ae = se - G, he = de - j;
|
|
4744
4744
|
var Te = 10, Re = Math.min(Te / ae, Te / he);
|
|
4745
4745
|
P = [
|
|
4746
4746
|
Re,
|
|
@@ -4762,7 +4762,7 @@ var gs = {};
|
|
|
4762
4762
|
typeof g == "string" ? h = g : (h = g.text, P = "scalar" in g ? g.scalar : P, q = "fontFamily" in g ? g.fontFamily : q, U = "color" in g ? g.color : U);
|
|
4763
4763
|
var $ = 10 * P, K = "" + $ + "px " + q, G = new OffscreenCanvas($, $), j = G.getContext("2d");
|
|
4764
4764
|
j.font = K;
|
|
4765
|
-
var
|
|
4765
|
+
var se = j.measureText(h), de = Math.ceil(se.actualBoundingBoxRight + se.actualBoundingBoxLeft), ae = Math.ceil(se.actualBoundingBoxAscent + se.actualBoundingBoxDescent), he = 2, ye = se.actualBoundingBoxLeft + he, z = se.actualBoundingBoxAscent + he;
|
|
4766
4766
|
de += he + he, ae += he + he, G = new OffscreenCanvas(de, ae), j = G.getContext("2d"), j.font = K, j.fillStyle = U, j.fillText(h, ye, z);
|
|
4767
4767
|
var Te = 1 / P;
|
|
4768
4768
|
return {
|
|
@@ -4780,14 +4780,14 @@ var gs = {};
|
|
|
4780
4780
|
})(/* @__PURE__ */ function() {
|
|
4781
4781
|
return typeof window < "u" ? window : typeof self < "u" ? self : this || {};
|
|
4782
4782
|
}(), gs, !1);
|
|
4783
|
-
const
|
|
4783
|
+
const Fo = gs.exports;
|
|
4784
4784
|
gs.exports.create;
|
|
4785
|
-
const
|
|
4785
|
+
const Ho = {
|
|
4786
4786
|
particleCount: 350,
|
|
4787
4787
|
spread: 120,
|
|
4788
4788
|
origin: { y: 0.6 },
|
|
4789
4789
|
angle: 90
|
|
4790
|
-
},
|
|
4790
|
+
}, Vo = {
|
|
4791
4791
|
TOP_RIGHT: {
|
|
4792
4792
|
angle: 225,
|
|
4793
4793
|
origin: { x: 0.9, y: 0 }
|
|
@@ -4797,12 +4797,12 @@ const Bo = {
|
|
|
4797
4797
|
origin: { x: 0.9, y: 0.9 }
|
|
4798
4798
|
}
|
|
4799
4799
|
}, Nn = (e) => {
|
|
4800
|
-
let t =
|
|
4800
|
+
let t = Vo[e];
|
|
4801
4801
|
t || (t = {});
|
|
4802
|
-
const n = { ...
|
|
4803
|
-
|
|
4804
|
-
},
|
|
4805
|
-
const [e] =
|
|
4802
|
+
const n = { ...Ho, ...t };
|
|
4803
|
+
Fo(n);
|
|
4804
|
+
}, qo = () => {
|
|
4805
|
+
const [e] = Na(), { mutate: t, isPending: n } = fs(), { mutateAsync: s, isPending: r } = Jr();
|
|
4806
4806
|
return /* @__PURE__ */ c("div", { className: "bg-white py-3 flex items-center justify-center gap-x-3 border-t", children: [
|
|
4807
4807
|
/* @__PURE__ */ a(
|
|
4808
4808
|
H,
|
|
@@ -4836,7 +4836,7 @@ const Bo = {
|
|
|
4836
4836
|
)
|
|
4837
4837
|
] });
|
|
4838
4838
|
};
|
|
4839
|
-
function
|
|
4839
|
+
function $o({
|
|
4840
4840
|
addEditPage: e,
|
|
4841
4841
|
additionalPageTypes: t = [],
|
|
4842
4842
|
close: n
|
|
@@ -4977,7 +4977,7 @@ function Vo({
|
|
|
4977
4977
|
};
|
|
4978
4978
|
return v != null && v.hasSlug ? (console.log(r), /* @__PURE__ */ c("form", { onSubmit: W, className: "w-full max-w-md mx-auto space-y-4", children: [
|
|
4979
4979
|
/* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
|
|
4980
|
-
/* @__PURE__ */ a(
|
|
4980
|
+
/* @__PURE__ */ a(re, { htmlFor: "pageType", className: "text-sm", children: "Page Type" }),
|
|
4981
4981
|
/* @__PURE__ */ c(
|
|
4982
4982
|
"select",
|
|
4983
4983
|
{
|
|
@@ -4994,7 +4994,7 @@ function Vo({
|
|
|
4994
4994
|
)
|
|
4995
4995
|
] }),
|
|
4996
4996
|
/* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
|
|
4997
|
-
/* @__PURE__ */ a(
|
|
4997
|
+
/* @__PURE__ */ a(re, { htmlFor: "parentPage", className: "text-sm", children: "Parent" }),
|
|
4998
4998
|
/* @__PURE__ */ c(
|
|
4999
4999
|
"select",
|
|
5000
5000
|
{
|
|
@@ -5019,7 +5019,7 @@ function Vo({
|
|
|
5019
5019
|
)
|
|
5020
5020
|
] }),
|
|
5021
5021
|
/* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
|
|
5022
|
-
/* @__PURE__ */ a(
|
|
5022
|
+
/* @__PURE__ */ a(re, { htmlFor: "name", className: "text-sm", children: "Name" }),
|
|
5023
5023
|
/* @__PURE__ */ a(
|
|
5024
5024
|
be,
|
|
5025
5025
|
{
|
|
@@ -5043,7 +5043,7 @@ function Vo({
|
|
|
5043
5043
|
className: "rounded border-gray-300"
|
|
5044
5044
|
}
|
|
5045
5045
|
),
|
|
5046
|
-
/* @__PURE__ */ a(
|
|
5046
|
+
/* @__PURE__ */ a(re, { htmlFor: "useDynamicSlug", className: "text-sm", children: "Use Dynamic Slug" })
|
|
5047
5047
|
] }),
|
|
5048
5048
|
C && /* @__PURE__ */ c("div", { className: "text-sm text-gray-500", children: [
|
|
5049
5049
|
"Pages will use pattern: ",
|
|
@@ -5051,7 +5051,7 @@ function Vo({
|
|
|
5051
5051
|
] })
|
|
5052
5052
|
] }),
|
|
5053
5053
|
(!(L != null && L.dynamicSegments) || !C) && /* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
|
|
5054
|
-
/* @__PURE__ */ c(
|
|
5054
|
+
/* @__PURE__ */ c(re, { htmlFor: "slug", className: "text-sm", children: [
|
|
5055
5055
|
"Slug",
|
|
5056
5056
|
w && w !== "none" && /* @__PURE__ */ c("span", { className: "ml-2 text-sm text-gray-500", children: [
|
|
5057
5057
|
"Parent:",
|
|
@@ -5078,7 +5078,7 @@ function Vo({
|
|
|
5078
5078
|
className: "w-full max-w-md mx-auto space-y-4",
|
|
5079
5079
|
children: [
|
|
5080
5080
|
/* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
|
|
5081
|
-
/* @__PURE__ */ a(
|
|
5081
|
+
/* @__PURE__ */ a(re, { htmlFor: "pageType", className: "text-sm", children: "Page Type" }),
|
|
5082
5082
|
/* @__PURE__ */ c(
|
|
5083
5083
|
"select",
|
|
5084
5084
|
{
|
|
@@ -5096,7 +5096,7 @@ function Vo({
|
|
|
5096
5096
|
/* @__PURE__ */ a("p", { className: "text-sm text-gray-500", children: (We = t.find((p) => p.key === m)) == null ? void 0 : We.helpText })
|
|
5097
5097
|
] }),
|
|
5098
5098
|
/* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
|
|
5099
|
-
/* @__PURE__ */ a(
|
|
5099
|
+
/* @__PURE__ */ a(re, { htmlFor: "name", className: "text-sm", children: "Name" }),
|
|
5100
5100
|
/* @__PURE__ */ a(
|
|
5101
5101
|
be,
|
|
5102
5102
|
{
|
|
@@ -5113,7 +5113,7 @@ function Vo({
|
|
|
5113
5113
|
}
|
|
5114
5114
|
);
|
|
5115
5115
|
}
|
|
5116
|
-
const
|
|
5116
|
+
const Ko = ({
|
|
5117
5117
|
addEditPage: e,
|
|
5118
5118
|
setAddEditPage: t
|
|
5119
5119
|
}) => {
|
|
@@ -5127,7 +5127,7 @@ const qo = ({
|
|
|
5127
5127
|
/* @__PURE__ */ a(Ze, { children: s ? "Update your page name" : "Enter details to create a new page" })
|
|
5128
5128
|
] }),
|
|
5129
5129
|
/* @__PURE__ */ a(
|
|
5130
|
-
|
|
5130
|
+
$o,
|
|
5131
5131
|
{
|
|
5132
5132
|
addEditPage: e,
|
|
5133
5133
|
close: () => t(void 0),
|
|
@@ -5148,21 +5148,21 @@ const qo = ({
|
|
|
5148
5148
|
const { data: u } = Ie(), { hasPermission: d } = An(), f = ue(
|
|
5149
5149
|
() => ge(u, { key: t.pageType }),
|
|
5150
5150
|
[u, t.pageType]
|
|
5151
|
-
), m =
|
|
5151
|
+
), m = ne(t, "slug").replace(e, "") || "/", b = !d(oe.EDIT_PAGE) && !d(oe.DELETE_PAGE) && !d(oe.UNPUBLISH_PAGE);
|
|
5152
5152
|
return /* @__PURE__ */ c(
|
|
5153
5153
|
"div",
|
|
5154
5154
|
{
|
|
5155
|
-
onClick: () => s(
|
|
5155
|
+
onClick: () => s(ne(t, "id")),
|
|
5156
5156
|
className: `rounded flex p-1.5 items-center justify-between leading-none duration-300 cursor-pointer px-3 py-1.5 ${n ? "bg-gray-200" : "hover:bg-gray-100"}`,
|
|
5157
5157
|
children: [
|
|
5158
5158
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-x-2", children: [
|
|
5159
|
-
t.dynamic ? /* @__PURE__ */ a("div", { className: "w-4 h-4 text-slate-500 stroke-[1]", children: /* @__PURE__ */ a(
|
|
5159
|
+
t.dynamic ? /* @__PURE__ */ a("div", { className: "w-4 h-4 text-slate-500 stroke-[1]", children: /* @__PURE__ */ a(Ya, { className: "w-4 h-4 text-yellow-400" }) }) : f != null && f.icon ? /* @__PURE__ */ a(
|
|
5160
5160
|
"div",
|
|
5161
5161
|
{
|
|
5162
5162
|
className: "w-4 h-4 text-slate-500 stroke-[1]",
|
|
5163
5163
|
dangerouslySetInnerHTML: { __html: f.icon }
|
|
5164
5164
|
}
|
|
5165
|
-
) : f != null && f.hasSlug ? /* @__PURE__ */ a(xn, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ a(
|
|
5165
|
+
) : f != null && f.hasSlug ? /* @__PURE__ */ a(xn, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ a(Xa, { className: "w-4 h-4 text-slate-500 stroke-[1]" }),
|
|
5166
5166
|
/* @__PURE__ */ a(
|
|
5167
5167
|
"div",
|
|
5168
5168
|
{
|
|
@@ -5203,7 +5203,7 @@ const qo = ({
|
|
|
5203
5203
|
});
|
|
5204
5204
|
},
|
|
5205
5205
|
children: [
|
|
5206
|
-
/* @__PURE__ */ a(
|
|
5206
|
+
/* @__PURE__ */ a(Za, { className: "size-3" }),
|
|
5207
5207
|
"Edit"
|
|
5208
5208
|
]
|
|
5209
5209
|
}
|
|
@@ -5252,7 +5252,7 @@ const qo = ({
|
|
|
5252
5252
|
]
|
|
5253
5253
|
}
|
|
5254
5254
|
);
|
|
5255
|
-
},
|
|
5255
|
+
}, jo = ({ close: e }) => {
|
|
5256
5256
|
const [, t] = M([]), [n, s] = M(""), [r, i] = M(null), [l, o] = M(null), [u, d] = M(null), { data: f, isFetching: m } = In(), [b, v] = M(""), { hasPermission: y } = An(), [w, S] = M(null), [I, A] = Ge(), x = I.get("page"), { data: E } = Ie(), C = ke(
|
|
5257
5257
|
(N) => {
|
|
5258
5258
|
var k;
|
|
@@ -5311,7 +5311,7 @@ const qo = ({
|
|
|
5311
5311
|
/* @__PURE__ */ c("div", { className: "flex flex-col h-full space-y-6", children: [
|
|
5312
5312
|
/* @__PURE__ */ c("div", { className: "relative flex item-center gap-x-4", children: [
|
|
5313
5313
|
/* @__PURE__ */ a(
|
|
5314
|
-
|
|
5314
|
+
Qa,
|
|
5315
5315
|
{
|
|
5316
5316
|
strokeWidth: 2.5,
|
|
5317
5317
|
className: "absolute left-3 top-2.5 h-4 w-4 text-gray-400"
|
|
@@ -5336,7 +5336,7 @@ const qo = ({
|
|
|
5336
5336
|
),
|
|
5337
5337
|
/* @__PURE__ */ a(Hn, { align: "end", children: Le(
|
|
5338
5338
|
Ys([{ key: "all", name: "All" }], E),
|
|
5339
|
-
(N) => /* @__PURE__ */ a(Vn, { value:
|
|
5339
|
+
(N) => /* @__PURE__ */ a(Vn, { value: ne(N, "key"), children: ne(N, "name") })
|
|
5340
5340
|
) })
|
|
5341
5341
|
] })
|
|
5342
5342
|
] }),
|
|
@@ -5375,8 +5375,8 @@ const qo = ({
|
|
|
5375
5375
|
setSaveAsTemp: S
|
|
5376
5376
|
}
|
|
5377
5377
|
),
|
|
5378
|
-
/* @__PURE__ */ a("div", { className: "pt-2 pl-6 bg-white", children: Le(
|
|
5379
|
-
const V = x ===
|
|
5378
|
+
/* @__PURE__ */ a("div", { className: "pt-2 pl-6 bg-white", children: Le(ne(N, "children", []), (k) => {
|
|
5379
|
+
const V = x === ne(k, "id");
|
|
5380
5380
|
return /* @__PURE__ */ a(
|
|
5381
5381
|
Rn,
|
|
5382
5382
|
{
|
|
@@ -5412,7 +5412,7 @@ const qo = ({
|
|
|
5412
5412
|
}
|
|
5413
5413
|
),
|
|
5414
5414
|
u && /* @__PURE__ */ a(
|
|
5415
|
-
|
|
5415
|
+
Ko,
|
|
5416
5416
|
{
|
|
5417
5417
|
editPage: T,
|
|
5418
5418
|
addEditPage: u,
|
|
@@ -5429,10 +5429,10 @@ const qo = ({
|
|
|
5429
5429
|
),
|
|
5430
5430
|
w && /* @__PURE__ */ a(oa, { page: w, onClose: () => S(null) })
|
|
5431
5431
|
] });
|
|
5432
|
-
},
|
|
5432
|
+
}, zo = () => {
|
|
5433
5433
|
const e = qe("logo", null);
|
|
5434
5434
|
return e ? /* @__PURE__ */ a("div", { className: "w-full max-h-9 overflow-hidden pr-2", children: $s.createElement(e, {}) }) : null;
|
|
5435
|
-
},
|
|
5435
|
+
}, Wo = () => {
|
|
5436
5436
|
const [e] = Ge(), t = e.get("page"), { data: n, isFetching: s } = Oe(), [r, i] = M(!1), l = !!t && !ce(n), o = !t || !s && ce(n) || r;
|
|
5437
5437
|
return /* @__PURE__ */ c(me, { children: [
|
|
5438
5438
|
/* @__PURE__ */ c(
|
|
@@ -5442,10 +5442,10 @@ const qo = ({
|
|
|
5442
5442
|
className: "flex items-center w-full space-x-2 py-1",
|
|
5443
5443
|
onClick: () => i(!0),
|
|
5444
5444
|
children: [
|
|
5445
|
-
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
|
|
5445
|
+
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(Ja, { className: "h-4 w-4" }) }),
|
|
5446
5446
|
/* @__PURE__ */ c("span", { className: "truncate leading-tight flex items-center max-w-[200px]", children: [
|
|
5447
5447
|
/* @__PURE__ */ a("span", { className: "text-slate-600 pr-1 font-light", children: "Editing:" }),
|
|
5448
|
-
s ? /* @__PURE__ */ a(tr, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) : es(
|
|
5448
|
+
s ? /* @__PURE__ */ a(tr, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) : es(ne(n, "name")) ?? ""
|
|
5449
5449
|
] })
|
|
5450
5450
|
]
|
|
5451
5451
|
},
|
|
@@ -5469,14 +5469,14 @@ const qo = ({
|
|
|
5469
5469
|
/* @__PURE__ */ a("span", { className: "text-xs text-muted-foreground", children: "Manage your site structure" })
|
|
5470
5470
|
] })
|
|
5471
5471
|
] }) }),
|
|
5472
|
-
/* @__PURE__ */ a("div", { className: "h-[calc(100vh-100px)] overflow-y-auto", children: /* @__PURE__ */ a(
|
|
5472
|
+
/* @__PURE__ */ a("div", { className: "h-[calc(100vh-100px)] overflow-y-auto", children: /* @__PURE__ */ a(jo, { close: () => i(!1) }) })
|
|
5473
5473
|
]
|
|
5474
5474
|
}
|
|
5475
5475
|
)
|
|
5476
5476
|
}
|
|
5477
5477
|
)
|
|
5478
5478
|
] });
|
|
5479
|
-
},
|
|
5479
|
+
}, Qo = () => {
|
|
5480
5480
|
const { fallbackLang: e, languages: t, selectedLang: n, setSelectedLang: s } = ot(), r = ce(n) ? e : n, [, i] = Ge();
|
|
5481
5481
|
Pe(() => {
|
|
5482
5482
|
const y = new URLSearchParams(window.location.search), w = y.get("lang");
|
|
@@ -5484,11 +5484,11 @@ const qo = ({
|
|
|
5484
5484
|
}, [t, i, s]);
|
|
5485
5485
|
const [l, o] = M(null), { data: u } = Oe(), { data: d } = Ln(), { data: f, isFetching: m } = nn(), b = ue(() => {
|
|
5486
5486
|
const y = Qs(
|
|
5487
|
-
Le(
|
|
5487
|
+
Le(ne(d, "languages"), (w) => {
|
|
5488
5488
|
const S = ge(f, { lang: w });
|
|
5489
5489
|
return {
|
|
5490
5490
|
key: w,
|
|
5491
|
-
value:
|
|
5491
|
+
value: ne(Be, w, w),
|
|
5492
5492
|
isLangPageAdded: !!S
|
|
5493
5493
|
};
|
|
5494
5494
|
})
|
|
@@ -5496,7 +5496,7 @@ const qo = ({
|
|
|
5496
5496
|
return [
|
|
5497
5497
|
{
|
|
5498
5498
|
key: e,
|
|
5499
|
-
value:
|
|
5499
|
+
value: ne(Be, e),
|
|
5500
5500
|
isLangPageAdded: !0
|
|
5501
5501
|
},
|
|
5502
5502
|
...y
|
|
@@ -5512,7 +5512,7 @@ const qo = ({
|
|
|
5512
5512
|
/* @__PURE__ */ c(Xt, { children: [
|
|
5513
5513
|
/* @__PURE__ */ a(Zt, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ c(H, { variant: "ghost", size: "sm", className: "gap-2", children: [
|
|
5514
5514
|
/* @__PURE__ */ a(nr, { className: "w-4 h-4" }),
|
|
5515
|
-
|
|
5515
|
+
ne(Be, r, r),
|
|
5516
5516
|
/* @__PURE__ */ a(sr, { className: "w-4 h-4" })
|
|
5517
5517
|
] }) }),
|
|
5518
5518
|
/* @__PURE__ */ c(Jt, { className: "border-border space-y-1", children: [
|
|
@@ -5521,7 +5521,7 @@ const qo = ({
|
|
|
5521
5521
|
(y) => /* @__PURE__ */ c(
|
|
5522
5522
|
Ce,
|
|
5523
5523
|
{
|
|
5524
|
-
className:
|
|
5524
|
+
className: Aa(
|
|
5525
5525
|
"flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
|
|
5526
5526
|
y.key === r && "!bg-gray-200 text-gray-700"
|
|
5527
5527
|
),
|
|
@@ -5533,7 +5533,7 @@ const qo = ({
|
|
|
5533
5533
|
{
|
|
5534
5534
|
className: "text-[9px] flex items-center gap-x-1 text-orange-500 leading-none",
|
|
5535
5535
|
children: [
|
|
5536
|
-
/* @__PURE__ */ a(
|
|
5536
|
+
/* @__PURE__ */ a(ei, { fill: "orange", className: "w-2 h-2" }),
|
|
5537
5537
|
"Primary"
|
|
5538
5538
|
]
|
|
5539
5539
|
}
|
|
@@ -5544,7 +5544,7 @@ const qo = ({
|
|
|
5544
5544
|
)
|
|
5545
5545
|
),
|
|
5546
5546
|
!ce(b.filter((y) => !y.isLangPageAdded)) && /* @__PURE__ */ c(me, { children: [
|
|
5547
|
-
/* @__PURE__ */ a(
|
|
5547
|
+
/* @__PURE__ */ a(Ui, {}),
|
|
5548
5548
|
/* @__PURE__ */ c(
|
|
5549
5549
|
H,
|
|
5550
5550
|
{
|
|
@@ -5579,11 +5579,11 @@ const qo = ({
|
|
|
5579
5579
|
)
|
|
5580
5580
|
] });
|
|
5581
5581
|
};
|
|
5582
|
-
function
|
|
5582
|
+
function Yo() {
|
|
5583
5583
|
return /* @__PURE__ */ c("div", { className: "flex relative z-10 items-center justify-end gap-1", children: [
|
|
5584
|
-
/* @__PURE__ */ a(
|
|
5585
|
-
/* @__PURE__ */ a(
|
|
5586
|
-
/* @__PURE__ */ a(
|
|
5584
|
+
/* @__PURE__ */ a(zo, {}),
|
|
5585
|
+
/* @__PURE__ */ a(Wo, {}),
|
|
5586
|
+
/* @__PURE__ */ a(Qo, {})
|
|
5587
5587
|
] });
|
|
5588
5588
|
}
|
|
5589
5589
|
function ua({
|
|
@@ -5595,7 +5595,7 @@ function ua({
|
|
|
5595
5595
|
/* @__PURE__ */ a(os, { side: "bottom", sideOffset: 10, children: /* @__PURE__ */ a("p", { children: t }) })
|
|
5596
5596
|
] }) });
|
|
5597
5597
|
}
|
|
5598
|
-
function
|
|
5598
|
+
function Xo(e) {
|
|
5599
5599
|
const t = Z(), n = X();
|
|
5600
5600
|
return xe({
|
|
5601
5601
|
queryKey: ["revisions", e],
|
|
@@ -5608,7 +5608,7 @@ function Qo(e) {
|
|
|
5608
5608
|
staleTime: 0
|
|
5609
5609
|
});
|
|
5610
5610
|
}
|
|
5611
|
-
const
|
|
5611
|
+
const Zo = () => {
|
|
5612
5612
|
const e = Z(), t = X(), n = Ae();
|
|
5613
5613
|
return De({
|
|
5614
5614
|
mutationFn: async (s) => await t(e, {
|
|
@@ -5619,7 +5619,7 @@ const Yo = () => {
|
|
|
5619
5619
|
n.invalidateQueries({ queryKey: ["revisions"] });
|
|
5620
5620
|
}
|
|
5621
5621
|
});
|
|
5622
|
-
},
|
|
5622
|
+
}, Jo = () => {
|
|
5623
5623
|
const e = Z(), t = X(), n = Ae();
|
|
5624
5624
|
return De({
|
|
5625
5625
|
mutationFn: async ({
|
|
@@ -5634,20 +5634,20 @@ const Yo = () => {
|
|
|
5634
5634
|
}
|
|
5635
5635
|
});
|
|
5636
5636
|
};
|
|
5637
|
-
function
|
|
5637
|
+
function ec() {
|
|
5638
5638
|
const { data: e } = Oe(), { saveState: t } = Vs(), [n] = ds();
|
|
5639
5639
|
return e ? /* @__PURE__ */ a("div", { className: "flex items-start gap-3 rounded-md border p-2 hover:bg-accent/50 bg-primary/5 mb-4", children: /* @__PURE__ */ c("div", { className: "flex-1 space-y-1", children: [
|
|
5640
5640
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ a("p", { className: "text-sm flex items-center gap-1 font-medium leading-none", children: /* @__PURE__ */ a("span", { className: "font-bold", children: "Currently editing" }) }) }),
|
|
5641
5641
|
/* @__PURE__ */ a("div", { className: "flex items-center text-xs text-muted-foreground", children: !ce(n.lastSaved) && /* @__PURE__ */ c("span", { children: [
|
|
5642
5642
|
"Last updated",
|
|
5643
5643
|
" ",
|
|
5644
|
-
|
|
5644
|
+
Bi(new Date(n.lastSaved), {
|
|
5645
5645
|
addSuffix: !0
|
|
5646
5646
|
})
|
|
5647
5647
|
] }) }),
|
|
5648
5648
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-2 pt-0.5", children: [
|
|
5649
5649
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-1 rounded-full bg-amber-500/10 px-1.5 py-0.5 text-xs text-amber-600", children: [
|
|
5650
|
-
/* @__PURE__ */ a(
|
|
5650
|
+
/* @__PURE__ */ a(ri, { className: "h-3 w-3" }),
|
|
5651
5651
|
/* @__PURE__ */ a("span", { children: "Draft" })
|
|
5652
5652
|
] }),
|
|
5653
5653
|
t === "UNSAVED" ? /* @__PURE__ */ c("div", { className: "flex items-center gap-1 rounded-full bg-red-500/10 px-1.5 py-0.5 text-xs text-red-600", children: [
|
|
@@ -5657,13 +5657,13 @@ function Zo() {
|
|
|
5657
5657
|
] })
|
|
5658
5658
|
] }) }) : null;
|
|
5659
5659
|
}
|
|
5660
|
-
function
|
|
5660
|
+
function tc() {
|
|
5661
5661
|
const [e, t] = le.useState(!1), [n, s] = le.useState(null), [r, i] = le.useState(!1), [l, o] = le.useState(!1), { data: u } = Oe(), {
|
|
5662
5662
|
data: d,
|
|
5663
5663
|
isFetching: f,
|
|
5664
5664
|
error: m,
|
|
5665
5665
|
refetch: b
|
|
5666
|
-
} =
|
|
5666
|
+
} = Xo(u == null ? void 0 : u.id), { mutate: v, isPending: y } = Zo(), { mutate: w, isPending: S } = Jo(), I = Ae(), A = (B) => {
|
|
5667
5667
|
n && w(
|
|
5668
5668
|
{ revisionId: n.uid, discardCurrent: B },
|
|
5669
5669
|
{
|
|
@@ -5688,7 +5688,7 @@ function Jo() {
|
|
|
5688
5688
|
}, [e, b]), /* @__PURE__ */ c(me, { children: [
|
|
5689
5689
|
/* @__PURE__ */ a(pr, { children: /* @__PURE__ */ c(is, { children: [
|
|
5690
5690
|
/* @__PURE__ */ c(hr, { open: e, onOpenChange: t, children: [
|
|
5691
|
-
/* @__PURE__ */ a(
|
|
5691
|
+
/* @__PURE__ */ a(Oi, { asChild: !0, children: /* @__PURE__ */ a(ls, { asChild: !0, children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
|
|
5692
5692
|
/* @__PURE__ */ c(H, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
|
|
5693
5693
|
/* @__PURE__ */ a(Ns, { className: "h-4 w-4" }),
|
|
5694
5694
|
/* @__PURE__ */ a("span", { className: "sr-only", children: "View revision history" })
|
|
@@ -5710,10 +5710,10 @@ function Jo() {
|
|
|
5710
5710
|
)
|
|
5711
5711
|
] })
|
|
5712
5712
|
] }),
|
|
5713
|
-
/* @__PURE__ */ a(
|
|
5714
|
-
/* @__PURE__ */ a(
|
|
5713
|
+
/* @__PURE__ */ a(Ri, { className: "h-[calc(100vh-6rem)] pr-2", children: f ? /* @__PURE__ */ a(nc, {}) : m ? /* @__PURE__ */ a("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "Failed to load revisions. Please try again." }) : /* @__PURE__ */ c("div", { className: "mt-2 space-y-2", children: [
|
|
5714
|
+
/* @__PURE__ */ a(ec, {}),
|
|
5715
5715
|
d == null ? void 0 : d.map((B) => /* @__PURE__ */ a(
|
|
5716
|
-
|
|
5716
|
+
sc,
|
|
5717
5717
|
{
|
|
5718
5718
|
revision: B,
|
|
5719
5719
|
isLatest: B.uid === "current",
|
|
@@ -5728,7 +5728,7 @@ function Jo() {
|
|
|
5728
5728
|
/* @__PURE__ */ a(os, { side: "bottom", children: /* @__PURE__ */ a("p", { children: "Revision history" }) })
|
|
5729
5729
|
] }) }),
|
|
5730
5730
|
/* @__PURE__ */ a(
|
|
5731
|
-
|
|
5731
|
+
ac,
|
|
5732
5732
|
{
|
|
5733
5733
|
open: r,
|
|
5734
5734
|
onOpenChange: i,
|
|
@@ -5738,7 +5738,7 @@ function Jo() {
|
|
|
5738
5738
|
}
|
|
5739
5739
|
),
|
|
5740
5740
|
/* @__PURE__ */ a(
|
|
5741
|
-
|
|
5741
|
+
ic,
|
|
5742
5742
|
{
|
|
5743
5743
|
open: l,
|
|
5744
5744
|
onOpenChange: o,
|
|
@@ -5749,7 +5749,7 @@ function Jo() {
|
|
|
5749
5749
|
)
|
|
5750
5750
|
] });
|
|
5751
5751
|
}
|
|
5752
|
-
function
|
|
5752
|
+
function nc() {
|
|
5753
5753
|
return /* @__PURE__ */ a("div", { className: "space-y-2 mt-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ c("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
|
|
5754
5754
|
/* @__PURE__ */ c("div", { className: "flex-1 space-y-1", children: [
|
|
5755
5755
|
/* @__PURE__ */ a(cn, { className: "h-4 w-3/4" }),
|
|
@@ -5759,7 +5759,7 @@ function ec() {
|
|
|
5759
5759
|
/* @__PURE__ */ a(cn, { className: "h-8 w-8 rounded-full" })
|
|
5760
5760
|
] }, t)) });
|
|
5761
5761
|
}
|
|
5762
|
-
function
|
|
5762
|
+
function sc({
|
|
5763
5763
|
revision: e,
|
|
5764
5764
|
isLatest: t,
|
|
5765
5765
|
onRestore: n,
|
|
@@ -5782,10 +5782,10 @@ function tc({
|
|
|
5782
5782
|
] }) }),
|
|
5783
5783
|
/* @__PURE__ */ a("div", { className: "flex items-center text-xs text-muted-foreground", children: /* @__PURE__ */ a("span", { children: Tn(e.createdAt, "MMM d, h:mm a") }) }),
|
|
5784
5784
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2 pt-0.5", children: e.type === "published" ? /* @__PURE__ */ c("div", { className: "flex items-center gap-1 rounded-full bg-green-500/10 px-1.5 py-0.5 text-xs text-green-600", children: [
|
|
5785
|
-
/* @__PURE__ */ a(
|
|
5785
|
+
/* @__PURE__ */ a(ti, { className: "h-3 w-3" }),
|
|
5786
5786
|
/* @__PURE__ */ a("span", { children: "Published" })
|
|
5787
5787
|
] }) : /* @__PURE__ */ c("div", { className: "flex items-center gap-1 rounded-full bg-amber-500/10 px-1.5 py-0.5 text-xs text-amber-600", children: [
|
|
5788
|
-
/* @__PURE__ */ a(
|
|
5788
|
+
/* @__PURE__ */ a(ni, { className: "h-3 w-3" }),
|
|
5789
5789
|
/* @__PURE__ */ a("span", { children: "Draft" })
|
|
5790
5790
|
] }) })
|
|
5791
5791
|
] }),
|
|
@@ -5797,7 +5797,7 @@ function tc({
|
|
|
5797
5797
|
oe.DELETE_REVISION
|
|
5798
5798
|
],
|
|
5799
5799
|
children: /* @__PURE__ */ a(
|
|
5800
|
-
|
|
5800
|
+
rc,
|
|
5801
5801
|
{
|
|
5802
5802
|
revision: e,
|
|
5803
5803
|
onRestore: n,
|
|
@@ -5808,7 +5808,7 @@ function tc({
|
|
|
5808
5808
|
)
|
|
5809
5809
|
] });
|
|
5810
5810
|
}
|
|
5811
|
-
function
|
|
5811
|
+
function rc({
|
|
5812
5812
|
revision: e,
|
|
5813
5813
|
onRestore: t,
|
|
5814
5814
|
onDelete: n
|
|
@@ -5824,7 +5824,7 @@ function nc({
|
|
|
5824
5824
|
/* @__PURE__ */ a("span", { children: "Restore this version" })
|
|
5825
5825
|
] }) }),
|
|
5826
5826
|
/* @__PURE__ */ a(Ue, { permission: oe.DELETE_REVISION, children: e.uid !== "current" && /* @__PURE__ */ c(me, { children: [
|
|
5827
|
-
/* @__PURE__ */ a(
|
|
5827
|
+
/* @__PURE__ */ a(Mi, {}),
|
|
5828
5828
|
/* @__PURE__ */ c(
|
|
5829
5829
|
Ce,
|
|
5830
5830
|
{
|
|
@@ -5840,7 +5840,7 @@ function nc({
|
|
|
5840
5840
|
] })
|
|
5841
5841
|
] });
|
|
5842
5842
|
}
|
|
5843
|
-
function
|
|
5843
|
+
function ac({
|
|
5844
5844
|
open: e,
|
|
5845
5845
|
onOpenChange: t,
|
|
5846
5846
|
revision: n,
|
|
@@ -5882,7 +5882,7 @@ function sc({
|
|
|
5882
5882
|
/* @__PURE__ */ a("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
|
|
5883
5883
|
"Saving as draft..."
|
|
5884
5884
|
] }) : /* @__PURE__ */ c(me, { children: [
|
|
5885
|
-
/* @__PURE__ */ a(
|
|
5885
|
+
/* @__PURE__ */ a(si, { className: "mr-2 h-4 w-4" }),
|
|
5886
5886
|
"Save as draft"
|
|
5887
5887
|
] })
|
|
5888
5888
|
}
|
|
@@ -5908,7 +5908,7 @@ function sc({
|
|
|
5908
5908
|
}
|
|
5909
5909
|
) : null;
|
|
5910
5910
|
}
|
|
5911
|
-
function
|
|
5911
|
+
function ic({
|
|
5912
5912
|
open: e,
|
|
5913
5913
|
onOpenChange: t,
|
|
5914
5914
|
revision: n,
|
|
@@ -5970,21 +5970,21 @@ function rc({
|
|
|
5970
5970
|
}
|
|
5971
5971
|
) : null;
|
|
5972
5972
|
}
|
|
5973
|
-
const
|
|
5973
|
+
const lc = () => {
|
|
5974
5974
|
const e = Z(), t = X();
|
|
5975
5975
|
return xe({
|
|
5976
5976
|
queryKey: [_.GET_CHANGES],
|
|
5977
5977
|
queryFn: async () => t(e, { action: _.GET_CHANGES })
|
|
5978
5978
|
});
|
|
5979
|
-
},
|
|
5979
|
+
}, oc = ({ currentEditor: e }) => {
|
|
5980
5980
|
const { data: t } = en(e);
|
|
5981
5981
|
return t == null ? void 0 : t.name;
|
|
5982
5982
|
};
|
|
5983
|
-
function
|
|
5983
|
+
function cc({
|
|
5984
5984
|
showModal: e = !1,
|
|
5985
5985
|
onClose: t = () => console.log("Cancelled")
|
|
5986
5986
|
}) {
|
|
5987
|
-
const [n, s] = M([]), { data: r, isFetching: i } =
|
|
5987
|
+
const [n, s] = M([]), { data: r, isFetching: i } = lc(), { data: l } = Ie(), o = ke(
|
|
5988
5988
|
(E) => {
|
|
5989
5989
|
var C;
|
|
5990
5990
|
return (C = ge(l, { key: E })) == null ? void 0 : C.hasSlug;
|
|
@@ -6017,7 +6017,7 @@ function lc({
|
|
|
6017
6017
|
s(y ? [] : Le(r, "id"));
|
|
6018
6018
|
}, I = () => {
|
|
6019
6019
|
b(
|
|
6020
|
-
{ ids:
|
|
6020
|
+
{ ids: Ma(n) },
|
|
6021
6021
|
{
|
|
6022
6022
|
onSuccess: () => {
|
|
6023
6023
|
t(), Nn("CENTER_CENTER");
|
|
@@ -6113,7 +6113,7 @@ function lc({
|
|
|
6113
6113
|
}
|
|
6114
6114
|
),
|
|
6115
6115
|
" ",
|
|
6116
|
-
o(E.pageType) ? /* @__PURE__ */ a(xn, { className: "w-4 h-4" }) : /* @__PURE__ */ a(
|
|
6116
|
+
o(E.pageType) ? /* @__PURE__ */ a(xn, { className: "w-4 h-4" }) : /* @__PURE__ */ a(ai, { className: "w-4 h-4" }),
|
|
6117
6117
|
E.name,
|
|
6118
6118
|
E.slug && /* @__PURE__ */ c("span", { className: "text-xs text-gray-500", children: [
|
|
6119
6119
|
"(",
|
|
@@ -6125,7 +6125,7 @@ function lc({
|
|
|
6125
6125
|
"-",
|
|
6126
6126
|
" ",
|
|
6127
6127
|
/* @__PURE__ */ a(
|
|
6128
|
-
|
|
6128
|
+
oc,
|
|
6129
6129
|
{
|
|
6130
6130
|
currentEditor: E.currentEditor
|
|
6131
6131
|
}
|
|
@@ -6138,7 +6138,7 @@ function lc({
|
|
|
6138
6138
|
),
|
|
6139
6139
|
/* @__PURE__ */ a("td", { className: "px-2", children: E.lang }),
|
|
6140
6140
|
/* @__PURE__ */ a("td", { className: "px-2", children: A(E == null ? void 0 : E.pageType) }),
|
|
6141
|
-
/* @__PURE__ */ a("td", { className: "px-4 text-right", children:
|
|
6141
|
+
/* @__PURE__ */ a("td", { className: "px-4 text-right", children: Ra(E.changes) || "" })
|
|
6142
6142
|
]
|
|
6143
6143
|
},
|
|
6144
6144
|
E == null ? void 0 : E.id
|
|
@@ -6158,7 +6158,7 @@ function lc({
|
|
|
6158
6158
|
] })
|
|
6159
6159
|
] }) });
|
|
6160
6160
|
}
|
|
6161
|
-
const
|
|
6161
|
+
const uc = () => {
|
|
6162
6162
|
const e = X(), t = Z();
|
|
6163
6163
|
return xe({
|
|
6164
6164
|
queryKey: [_.GET_WEBSITE_DATA],
|
|
@@ -6169,8 +6169,8 @@ const oc = () => {
|
|
|
6169
6169
|
})
|
|
6170
6170
|
});
|
|
6171
6171
|
};
|
|
6172
|
-
function
|
|
6173
|
-
const { data: t, isFetching: n } =
|
|
6172
|
+
function dc({ onClose: e }) {
|
|
6173
|
+
const { data: t, isFetching: n } = uc(), { mutateAsync: s, isPending: r } = mo(), i = qe("settingComponent", null), l = Ba(async (o) => (await s({ data: o }), !0), 300);
|
|
6174
6174
|
return i ? /* @__PURE__ */ a($e, { open: !0, onOpenChange: e, children: /* @__PURE__ */ c(Ke, { className: "w-full", children: [
|
|
6175
6175
|
/* @__PURE__ */ a(je, { children: /* @__PURE__ */ a(ze, { children: "Website Settings" }) }),
|
|
6176
6176
|
n ? /* @__PURE__ */ c("div", { className: "w-full space-y-3 py-4", children: [
|
|
@@ -6189,7 +6189,7 @@ function cc({ onClose: e }) {
|
|
|
6189
6189
|
}) })
|
|
6190
6190
|
] }) }) : null;
|
|
6191
6191
|
}
|
|
6192
|
-
const
|
|
6192
|
+
const hc = () => {
|
|
6193
6193
|
const { selectedLang: e } = ot(), t = qe("getPreviewUrl", async (f) => f), [n, s] = M(""), { data: r, isFetching: i } = Oe(), { data: l } = nn(), { data: o } = Ie(), u = ue(
|
|
6194
6194
|
() => {
|
|
6195
6195
|
var f;
|
|
@@ -6212,12 +6212,12 @@ const uc = () => {
|
|
|
6212
6212
|
s("");
|
|
6213
6213
|
})();
|
|
6214
6214
|
}, [t, u]), !n || !d(r == null ? void 0 : r.pageType) || i ? null : /* @__PURE__ */ a(me, { children: /* @__PURE__ */ a("a", { href: n, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c(H, { variant: "ghost", size: "sm", className: "gap-2", children: [
|
|
6215
|
-
/* @__PURE__ */ a(
|
|
6215
|
+
/* @__PURE__ */ a(ii, { className: "w-4 h-4" }),
|
|
6216
6216
|
" ",
|
|
6217
6217
|
F.PREVIEW
|
|
6218
6218
|
] }) }) });
|
|
6219
|
-
},
|
|
6220
|
-
const [e, t] =
|
|
6219
|
+
}, fc = () => {
|
|
6220
|
+
const [e, t] = xa();
|
|
6221
6221
|
return /* @__PURE__ */ c(me, { children: [
|
|
6222
6222
|
/* @__PURE__ */ a(ua, { content: F.THEME, children: /* @__PURE__ */ a(
|
|
6223
6223
|
H,
|
|
@@ -6226,12 +6226,12 @@ const uc = () => {
|
|
|
6226
6226
|
size: "icon",
|
|
6227
6227
|
className: "gap-2",
|
|
6228
6228
|
onClick: () => t(e === "theme" ? "block" : "theme"),
|
|
6229
|
-
children: /* @__PURE__ */ a(
|
|
6229
|
+
children: /* @__PURE__ */ a(li, { className: "w-4 h-4" })
|
|
6230
6230
|
}
|
|
6231
6231
|
) }),
|
|
6232
6232
|
/* @__PURE__ */ a("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
|
|
6233
6233
|
] });
|
|
6234
|
-
},
|
|
6234
|
+
}, mc = () => {
|
|
6235
6235
|
const [e, t] = M(!1), { isLocked: n } = tn(), { savePage: s, saveState: r } = Vs();
|
|
6236
6236
|
Pe(() => {
|
|
6237
6237
|
const f = (m) => {
|
|
@@ -6267,7 +6267,7 @@ const uc = () => {
|
|
|
6267
6267
|
case "SAVED":
|
|
6268
6268
|
return {
|
|
6269
6269
|
tooltipContent: F.SAVED,
|
|
6270
|
-
buttonIcon: /* @__PURE__ */ a(
|
|
6270
|
+
buttonIcon: /* @__PURE__ */ a(oi, { className: "w-4 h-4" }),
|
|
6271
6271
|
buttonClass: "text-green-500 flex items-center gap-x-1 leading-tight"
|
|
6272
6272
|
};
|
|
6273
6273
|
}
|
|
@@ -6286,7 +6286,7 @@ const uc = () => {
|
|
|
6286
6286
|
]
|
|
6287
6287
|
}
|
|
6288
6288
|
);
|
|
6289
|
-
},
|
|
6289
|
+
}, gc = () => {
|
|
6290
6290
|
const [e, t] = M(!1), [n, s] = M(!1), [r, i] = M(null), { data: l } = Oe(), { mutate: o, isPending: u } = fs(), [d] = Hs(), { buttonText: f, buttonClassName: m, isPublished: b } = ue(() => {
|
|
6291
6291
|
const y = l && (l == null ? void 0 : l.online);
|
|
6292
6292
|
return {
|
|
@@ -6383,7 +6383,7 @@ const uc = () => {
|
|
|
6383
6383
|
] })
|
|
6384
6384
|
] })
|
|
6385
6385
|
] }),
|
|
6386
|
-
/* @__PURE__ */ a(
|
|
6386
|
+
/* @__PURE__ */ a(cc, { showModal: e, onClose: () => t(!1) }),
|
|
6387
6387
|
r && /* @__PURE__ */ a(
|
|
6388
6388
|
ms,
|
|
6389
6389
|
{
|
|
@@ -6392,7 +6392,7 @@ const uc = () => {
|
|
|
6392
6392
|
}
|
|
6393
6393
|
)
|
|
6394
6394
|
] });
|
|
6395
|
-
},
|
|
6395
|
+
}, pc = () => {
|
|
6396
6396
|
const e = qe("settingComponent", null), [t, n] = M(!1);
|
|
6397
6397
|
return e ? /* @__PURE__ */ c(me, { children: [
|
|
6398
6398
|
/* @__PURE__ */ a(ua, { content: F.WEBSITEDATA, children: /* @__PURE__ */ a(
|
|
@@ -6402,13 +6402,13 @@ const uc = () => {
|
|
|
6402
6402
|
size: "icon",
|
|
6403
6403
|
className: "gap-2",
|
|
6404
6404
|
onClick: () => n(!0),
|
|
6405
|
-
children: /* @__PURE__ */ a(
|
|
6405
|
+
children: /* @__PURE__ */ a(ci, { className: "w-4 h-4" })
|
|
6406
6406
|
}
|
|
6407
6407
|
) }),
|
|
6408
|
-
t && /* @__PURE__ */ a(
|
|
6408
|
+
t && /* @__PURE__ */ a(dc, { onClose: () => n(!1) }),
|
|
6409
6409
|
/* @__PURE__ */ a("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
|
|
6410
6410
|
] }) : null;
|
|
6411
|
-
},
|
|
6411
|
+
}, yc = () => {
|
|
6412
6412
|
const { data: e } = Oe(), t = e && (e == null ? void 0 : e.online), { data: n } = Ie();
|
|
6413
6413
|
return ke(
|
|
6414
6414
|
(r) => {
|
|
@@ -6425,25 +6425,25 @@ const uc = () => {
|
|
|
6425
6425
|
size: "sm",
|
|
6426
6426
|
className: "flex items-center gap-1",
|
|
6427
6427
|
children: [
|
|
6428
|
-
/* @__PURE__ */ a(
|
|
6428
|
+
/* @__PURE__ */ a(ui, { className: "w-4 h-4" }),
|
|
6429
6429
|
/* @__PURE__ */ a("span", { className: "hidden sm:inline", children: F.OPEN })
|
|
6430
6430
|
]
|
|
6431
6431
|
}
|
|
6432
6432
|
) : null;
|
|
6433
6433
|
};
|
|
6434
|
-
function
|
|
6434
|
+
function vc() {
|
|
6435
6435
|
const { isLocked: e } = tn(), [t] = Ge(), n = t.get("lang"), s = ia(n);
|
|
6436
6436
|
return e || !s ? null : /* @__PURE__ */ c("div", { className: "flex items-center justify-end gap-1", children: [
|
|
6437
|
-
/* @__PURE__ */ a(
|
|
6438
|
-
/* @__PURE__ */ a(Ue, { permission: oe.EDIT_THEME, children: /* @__PURE__ */ a(
|
|
6439
|
-
/* @__PURE__ */ a(Ue, { permission: oe.EDIT_SETTINGS, children: /* @__PURE__ */ a(
|
|
6440
|
-
/* @__PURE__ */ a(
|
|
6441
|
-
/* @__PURE__ */ a(Ue, { permission: oe.SAVE_PAGE, children: /* @__PURE__ */ a(
|
|
6442
|
-
/* @__PURE__ */ a(Ue, { permission: oe.PUBLISH_PAGE, children: /* @__PURE__ */ a(
|
|
6443
|
-
/* @__PURE__ */ a(
|
|
6437
|
+
/* @__PURE__ */ a(tc, {}),
|
|
6438
|
+
/* @__PURE__ */ a(Ue, { permission: oe.EDIT_THEME, children: /* @__PURE__ */ a(fc, {}) }),
|
|
6439
|
+
/* @__PURE__ */ a(Ue, { permission: oe.EDIT_SETTINGS, children: /* @__PURE__ */ a(pc, {}) }),
|
|
6440
|
+
/* @__PURE__ */ a(hc, {}),
|
|
6441
|
+
/* @__PURE__ */ a(Ue, { permission: oe.SAVE_PAGE, children: /* @__PURE__ */ a(mc, {}) }),
|
|
6442
|
+
/* @__PURE__ */ a(Ue, { permission: oe.PUBLISH_PAGE, children: /* @__PURE__ */ a(gc, {}) }),
|
|
6443
|
+
/* @__PURE__ */ a(yc, {})
|
|
6444
6444
|
] });
|
|
6445
6445
|
}
|
|
6446
|
-
const
|
|
6446
|
+
const Ec = () => {
|
|
6447
6447
|
const e = Z(), t = X(), n = qe("user"), s = n == null ? void 0 : n.id;
|
|
6448
6448
|
return xe({
|
|
6449
6449
|
queryKey: ["permissions", s],
|
|
@@ -6454,16 +6454,16 @@ const yc = () => {
|
|
|
6454
6454
|
enabled: !!s
|
|
6455
6455
|
});
|
|
6456
6456
|
};
|
|
6457
|
-
|
|
6458
|
-
const
|
|
6459
|
-
const t = pn([]), [n] = Ge(), s = n.get("page"), r = n.get("lang"), { data: i } = Oe(), { data: l = null } =
|
|
6457
|
+
Ca();
|
|
6458
|
+
const Sc = (e) => {
|
|
6459
|
+
const t = pn([]), [n] = Ge(), s = n.get("page"), r = n.get("lang"), { data: i } = Oe(), { data: l = null } = Ec(), { data: o } = Ao(), { data: u, isFetching: d } = ta(), { blocks: f } = bo(u), { data: m } = Ln(), { data: b } = Ie(), { mutateAsync: v } = Jr(), y = vo(), { getUILibraryBlock: w, getUILibraryBlocks: S, onSave: I } = xo(), { getPartialBlocks: A, getPartialBlockBlocks: x } = To(), { aiContext: E, setAiContext: C } = us(), { mutateAsync: B } = No(), [T, L] = M(!1), N = ue(
|
|
6460
6460
|
() => (m == null ? void 0 : m.fallbackLang) || "en",
|
|
6461
6461
|
[m]
|
|
6462
6462
|
), { data: k } = na({
|
|
6463
6463
|
pageType: i == null ? void 0 : i.pageType,
|
|
6464
6464
|
lang: r || N
|
|
6465
6465
|
});
|
|
6466
|
-
|
|
6466
|
+
yo(), Pe(() => {
|
|
6467
6467
|
const D = () => {
|
|
6468
6468
|
document.hidden ? L(!0) : L(!1);
|
|
6469
6469
|
};
|
|
@@ -6476,7 +6476,7 @@ const vc = (e) => {
|
|
|
6476
6476
|
async (D, Se) => await B({ pageType: D, query: Se }),
|
|
6477
6477
|
[B]
|
|
6478
6478
|
), pe = ue(
|
|
6479
|
-
() =>
|
|
6479
|
+
() => ne(m, "theme", {}) || {},
|
|
6480
6480
|
[m]
|
|
6481
6481
|
), p = ue(
|
|
6482
6482
|
() => b == null ? void 0 : b.find(
|
|
@@ -6485,9 +6485,9 @@ const vc = (e) => {
|
|
|
6485
6485
|
[b, i == null ? void 0 : i.pageType]
|
|
6486
6486
|
);
|
|
6487
6487
|
return /* @__PURE__ */ c(me, { children: [
|
|
6488
|
-
d && /* @__PURE__ */ a("div", { className: "absolute inset-0 z-50 flex items-center justify-center w-screen h-screen bg-white/30", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-center bg-white rounded-full size-10", children: /* @__PURE__ */ a(
|
|
6488
|
+
d && /* @__PURE__ */ a("div", { className: "absolute inset-0 z-50 flex items-center justify-center w-screen h-screen bg-white/30", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-center bg-white rounded-full size-10", children: /* @__PURE__ */ a(di, { className: "size-5 animate-spin" }) }) }),
|
|
6489
6489
|
/* @__PURE__ */ a(
|
|
6490
|
-
|
|
6490
|
+
Ta,
|
|
6491
6491
|
{
|
|
6492
6492
|
pageExternalData: k,
|
|
6493
6493
|
themePresets: e.themePresets ?? [],
|
|
@@ -6532,8 +6532,8 @@ const vc = (e) => {
|
|
|
6532
6532
|
return await I({ page: s, blocks: nt }), t.current = nt, ts(Se, pe) || await v({ settings: { theme: Se } }), !0;
|
|
6533
6533
|
},
|
|
6534
6534
|
topBarComponents: {
|
|
6535
|
-
left: [
|
|
6536
|
-
right: [
|
|
6535
|
+
left: [Yo],
|
|
6536
|
+
right: [vc]
|
|
6537
6537
|
},
|
|
6538
6538
|
sideBarComponents: {
|
|
6539
6539
|
top: [
|
|
@@ -6560,32 +6560,32 @@ const vc = (e) => {
|
|
|
6560
6560
|
...ce(m == null ? void 0 : m.languages) ? [] : [
|
|
6561
6561
|
{
|
|
6562
6562
|
label: `Language ${p != null && p.hasSlug ? "" : "page"}`,
|
|
6563
|
-
component:
|
|
6563
|
+
component: ko,
|
|
6564
6564
|
icon: /* @__PURE__ */ a(nr, { className: "w-5 h-5 stroke-[2]" })
|
|
6565
6565
|
}
|
|
6566
6566
|
]
|
|
6567
6567
|
],
|
|
6568
6568
|
bottom: [
|
|
6569
6569
|
...e != null && e.sidebarBottomComponents ? [...e.sidebarBottomComponents] : [],
|
|
6570
|
-
|
|
6571
|
-
|
|
6570
|
+
Go,
|
|
6571
|
+
Uo
|
|
6572
6572
|
// TODO: Check why the component is not showing. This is working as of now.
|
|
6573
6573
|
]
|
|
6574
6574
|
},
|
|
6575
|
-
themePanelComponent:
|
|
6575
|
+
themePanelComponent: qo,
|
|
6576
6576
|
blockMoreOptions: [oa],
|
|
6577
6577
|
...V
|
|
6578
6578
|
}
|
|
6579
6579
|
)
|
|
6580
6580
|
] });
|
|
6581
|
-
},
|
|
6581
|
+
}, bc = new Pa({
|
|
6582
6582
|
defaultOptions: {
|
|
6583
6583
|
queries: {
|
|
6584
6584
|
refetchOnWindowFocus: !1,
|
|
6585
6585
|
refetchOnReconnect: !1
|
|
6586
6586
|
}
|
|
6587
6587
|
}
|
|
6588
|
-
}),
|
|
6588
|
+
}), ou = (e) => {
|
|
6589
6589
|
const [, t] = ea(), [n, s] = M(!1);
|
|
6590
6590
|
return Pe(() => (t(
|
|
6591
6591
|
js(e, [
|
|
@@ -6601,61 +6601,61 @@ const vc = (e) => {
|
|
|
6601
6601
|
s(!0);
|
|
6602
6602
|
}, 200), () => {
|
|
6603
6603
|
s(!1), t({});
|
|
6604
|
-
}), [e, t]), n ? /* @__PURE__ */ c(
|
|
6605
|
-
/* @__PURE__ */ a(
|
|
6606
|
-
/* @__PURE__ */ a(
|
|
6604
|
+
}), [e, t]), n ? /* @__PURE__ */ c(_a, { client: bc, children: [
|
|
6605
|
+
/* @__PURE__ */ a(Sc, { ...e }),
|
|
6606
|
+
/* @__PURE__ */ a(fo, {})
|
|
6607
6607
|
] }) : /* @__PURE__ */ a("div", {});
|
|
6608
6608
|
};
|
|
6609
6609
|
export {
|
|
6610
6610
|
vr as $,
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6611
|
+
su as A,
|
|
6612
|
+
Uc as B,
|
|
6613
|
+
Wc as C,
|
|
6614
|
+
Yc as D,
|
|
6615
6615
|
Ee as E,
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6616
|
+
Vc as F,
|
|
6617
|
+
Vi as G,
|
|
6618
|
+
ro as H,
|
|
6619
|
+
qc as I,
|
|
6620
6620
|
fn as J,
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6621
|
+
iu as K,
|
|
6622
|
+
Jc as L,
|
|
6623
|
+
Zc as M,
|
|
6624
6624
|
it as N,
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6625
|
+
El as O,
|
|
6626
|
+
Qc as P,
|
|
6627
|
+
Xc as Q,
|
|
6628
|
+
jc as R,
|
|
6629
|
+
$c as S,
|
|
6630
|
+
Kc as T,
|
|
6631
6631
|
mn as U,
|
|
6632
|
-
|
|
6633
|
-
|
|
6632
|
+
Mc as V,
|
|
6633
|
+
ou as W,
|
|
6634
6634
|
Ue as X,
|
|
6635
6635
|
Cr as a,
|
|
6636
6636
|
fe as b,
|
|
6637
6637
|
_e as c,
|
|
6638
|
-
|
|
6638
|
+
gl as d,
|
|
6639
6639
|
br as e,
|
|
6640
6640
|
Pr as f,
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6641
|
+
lu as g,
|
|
6642
|
+
sl as h,
|
|
6643
|
+
Bc as i,
|
|
6644
6644
|
lt as j,
|
|
6645
6645
|
zn as k,
|
|
6646
|
-
|
|
6647
|
-
|
|
6646
|
+
Hc as l,
|
|
6647
|
+
au as m,
|
|
6648
6648
|
Ut as n,
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6649
|
+
Oc as o,
|
|
6650
|
+
Ki as p,
|
|
6651
|
+
Nl as q,
|
|
6652
6652
|
Wn as r,
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6653
|
+
ru as s,
|
|
6654
|
+
zc as t,
|
|
6655
|
+
Fc as u,
|
|
6656
|
+
vl as v,
|
|
6657
|
+
eu as w,
|
|
6658
|
+
tu as x,
|
|
6659
|
+
wl as y,
|
|
6660
|
+
nu as z
|
|
6661
6661
|
};
|