@chaibuilder/sdk 1.1.2 → 1.1.4
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/{AddBlocks-P3qHuE5J.cjs → AddBlocks-Wsoku0Sm.cjs} +1 -1
- package/dist/{AddBlocks-imyQSCbI.js → AddBlocks-rteGefHR.js} +20 -20
- package/dist/{BrandingOptions-tSNtQ1Kv.js → BrandingOptions-4l1Yo42i.js} +1 -1
- package/dist/{BrandingOptions-_2XBEPab.cjs → BrandingOptions-CqVvc-GC.cjs} +1 -1
- package/dist/CanvasArea-_WcM6PCy.js +1426 -0
- package/dist/CanvasArea-jzvQJnbQ.cjs +59 -0
- package/dist/{CurrentPage-hHwsHam-.cjs → CurrentPage-8AWFWOJ8.cjs} +1 -1
- package/dist/{CurrentPage-uRwS0DQC.js → CurrentPage-tnHIOkX2.js} +5 -5
- package/dist/{Layers-eXMT1ncm.js → Layers-6PHQWIbV.js} +15 -15
- package/dist/{Layers--5nyqOjK.cjs → Layers-jsOPQbVU.cjs} +1 -1
- package/dist/{MarkAsGlobalBlock-aqik3ouc.js → MarkAsGlobalBlock-9pfqCgrO.js} +1 -1
- package/dist/{MarkAsGlobalBlock-p_wvHkQZ.cjs → MarkAsGlobalBlock-bXkERbl2.cjs} +1 -1
- package/dist/{PagesPanel-WZgw7xVs.cjs → PagesPanel-Zvy5ZKPf.cjs} +1 -1
- package/dist/{PagesPanel-xRUnAMIb.js → PagesPanel-cmJ1UiP0.js} +3 -3
- package/dist/{ProjectPanel-FC03TiyG.cjs → ProjectPanel-4BsxvZu-.cjs} +1 -1
- package/dist/{ProjectPanel-8l4Bi3Kh.js → ProjectPanel-VxbDdgA2.js} +5 -5
- package/dist/Settings-AJet4HbF.cjs +1 -0
- package/dist/{Settings-4v3M1bRS.js → Settings-zzs6KaRd.js} +294 -303
- package/dist/{SidePanels-0xaw3Td6.js → SidePanels-UGgpWdPF.js} +9 -9
- package/dist/{SidePanels-5e5q3c7J.cjs → SidePanels-_8tt1l6S.cjs} +1 -1
- package/dist/{Topbar-ZjAs5fDc.cjs → Topbar-geYx1fCH.cjs} +1 -1
- package/dist/{Topbar-Jc74a6oE.js → Topbar-zw_KlpKs.js} +5 -5
- package/dist/{UnsplashImages-nXceZLmd.cjs → UnsplashImages-C4_dg08Y.cjs} +1 -1
- package/dist/{UnsplashImages-_PxEYx5c.js → UnsplashImages-yk5eowZf.js} +4 -4
- package/dist/{UploadImages-tcQb5NZu.cjs → UploadImages-hLrNjSXF.cjs} +1 -1
- package/dist/{UploadImages-zzSgKmP9.js → UploadImages-ioTAmtvl.js} +10 -10
- package/dist/{add-page-modal-K5isTZOT.js → add-page-modal-31-dJjna.js} +3 -3
- package/dist/{add-page-modal-JRSQ_N56.cjs → add-page-modal-Gsa-gnsn.cjs} +1 -1
- package/dist/{confirm-alert-2JxcNf3T.js → confirm-alert-c7sRVjK8.js} +1 -1
- package/dist/{confirm-alert-mzlwOW9w.cjs → confirm-alert-zqK8LIx8.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +0 -25
- package/dist/core.js +51 -55
- package/dist/{delete-page-modal-x81Ed4jF.js → delete-page-modal-5xqoPPl3.js} +2 -2
- package/dist/{delete-page-modal-c8nB2y7w.cjs → delete-page-modal-jEsSWzKN.cjs} +1 -1
- package/dist/{form-TQ7vwDYO.js → form-5tYo3gKa.js} +1 -1
- package/dist/{form-bSW-Pkw9.cjs → form-hHv26OT7.cjs} +1 -1
- package/dist/{index-HjvZqhVh.js → index-K_TiChPs.js} +4 -4
- package/dist/index-LLhN-70p.cjs +1 -0
- package/dist/{index-ORFlyrBx.js → index-pJPfM9Bm.js} +874 -878
- package/dist/{index-7NRFGya_.cjs → index-rdttRR05.cjs} +2 -2
- package/dist/{page-viewer-huD5B1om.cjs → page-viewer-DJqp04Tr.cjs} +1 -1
- package/dist/{page-viewer-fFaDQOOI.js → page-viewer-Oku6zrcm.js} +3 -3
- package/dist/{project-general-setting-rH_1r38b.js → project-general-setting-hrJZUYnV.js} +3 -3
- package/dist/{project-general-setting-rNNI-K6l.cjs → project-general-setting-rVhljgfP.cjs} +1 -1
- package/dist/{project-seo-setting-cERASO9j.cjs → project-seo-setting-Xg6cVYXo.cjs} +1 -1
- package/dist/{project-seo-setting-k0HlefUD.js → project-seo-setting-fwyxNcY-.js} +2 -2
- package/dist/{single-page-detail-CrgTQFUX.js → single-page-detail-1UCpERBU.js} +4 -4
- package/dist/{single-page-detail-52_cuxNe.cjs → single-page-detail-ilh1I9gv.cjs} +1 -1
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +41 -41
- package/dist/{useAddBlockByDrop-UA_Iw_4l.js → useAddBlockByDrop-UJ6QE7aE.js} +1 -1
- package/dist/{useAddBlockByDrop-DPV32UHP.cjs → useAddBlockByDrop-jJ_MnZ5y.cjs} +1 -1
- package/package.json +1 -1
- package/dist/CanvasArea-UtFK5IS6.cjs +0 -58
- package/dist/CanvasArea-dkwSFbQA.js +0 -1412
- package/dist/Settings-kcmKFymH.cjs +0 -1
- package/dist/index-zkc4SQCu.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-NV737rRe.js";
|
|
2
|
-
import * as
|
|
3
|
-
import et, { createContext as Os, useContext as zs, useRef as
|
|
2
|
+
import * as m from "react";
|
|
3
|
+
import et, { createContext as Os, useContext as zs, useRef as Br, createElement as Rr, useReducer as Vs, useEffect as je, useDebugValue as $s, useCallback as A, useMemo as Fs, useState as De, Suspense as vt } from "react";
|
|
4
4
|
import * as zt from "@radix-ui/react-toggle";
|
|
5
5
|
import { cva as be } from "class-variance-authority";
|
|
6
6
|
import { g as le, a as Pe, b as Gs, c } from "./utils-PPBbw5bk.js";
|
|
@@ -8,28 +8,28 @@ import * as He from "@radix-ui/react-switch";
|
|
|
8
8
|
import { Slot as Ws } from "@radix-ui/react-slot";
|
|
9
9
|
import * as pe from "@radix-ui/react-accordion";
|
|
10
10
|
import { ChevronDownIcon as Us, Cross2Icon as tt, ChevronRightIcon as st, CheckIcon as Ee, DotFilledIcon as ot, CaretSortIcon as Hs, MagnifyingGlassIcon as qs } from "@radix-ui/react-icons";
|
|
11
|
-
import * as
|
|
12
|
-
import * as
|
|
13
|
-
import * as
|
|
11
|
+
import * as $ from "@radix-ui/react-alert-dialog";
|
|
12
|
+
import * as B from "@radix-ui/react-dialog";
|
|
13
|
+
import * as Vt from "@radix-ui/react-label";
|
|
14
14
|
import * as me from "@radix-ui/react-scroll-area";
|
|
15
15
|
import * as xe from "@radix-ui/react-tabs";
|
|
16
16
|
import * as we from "@radix-ui/react-tooltip";
|
|
17
17
|
import * as Se from "@radix-ui/react-popover";
|
|
18
|
-
import * as
|
|
18
|
+
import * as C from "@radix-ui/react-menubar";
|
|
19
19
|
import * as Le from "@radix-ui/react-hover-card";
|
|
20
20
|
import * as O from "@radix-ui/react-select";
|
|
21
|
-
import * as
|
|
22
|
-
import * as
|
|
21
|
+
import * as P from "@radix-ui/react-dropdown-menu";
|
|
22
|
+
import * as $t from "@radix-ui/react-separator";
|
|
23
23
|
import * as H from "@radix-ui/react-toast";
|
|
24
24
|
import { Command as W } from "cmdk";
|
|
25
|
-
import * as
|
|
25
|
+
import * as T from "@radix-ui/react-context-menu";
|
|
26
26
|
import Ks, { IconPickerItem as Js } from "react-icons-picker";
|
|
27
27
|
import Ys from "react-dom";
|
|
28
|
-
import { flatten as Y, filter as
|
|
28
|
+
import { flatten as Y, filter as I, omit as at, isEmpty as oe, isString as Qs, find as te, map as V, each as ce, get as E, set as fe, has as nt, includes as G, isUndefined as zr, without as Ft, forIn as Gt, findIndex as Be, last as Xs, first as se, startsWith as Wt, isNull as qe, pick as wt, sortBy as Nt, isObject as Zs } from "lodash";
|
|
29
29
|
import eo from "react-quill";
|
|
30
|
-
import { atom as y, useAtom as
|
|
30
|
+
import { atom as y, useAtom as R, useAtomValue as L, useSetAtom as de } from "jotai";
|
|
31
31
|
import Ut from "flat-to-nested";
|
|
32
|
-
import to, { excludeAction as so, ActionCreators as
|
|
32
|
+
import to, { excludeAction as so, ActionCreators as Ve } from "redux-undo";
|
|
33
33
|
import { a as ge, I as Ht, S as Ke, B as Je } from "./MODIFIERS-MLfpKQY1.js";
|
|
34
34
|
import { useChaiBlocks as oo } from "@chaibuilder/runtime";
|
|
35
35
|
import { useThrottledCallback as ao } from "@react-hookz/web";
|
|
@@ -45,7 +45,7 @@ function Z(e, t) {
|
|
|
45
45
|
typeof i == "function" ? i(n(o)) : i
|
|
46
46
|
)), t && (o.write = t), o;
|
|
47
47
|
}
|
|
48
|
-
const
|
|
48
|
+
const $e = (e) => "init" in e, Fe = (e) => !!e.write, Me = /* @__PURE__ */ new WeakMap(), ro = (e, t) => {
|
|
49
49
|
Me.set(e, t), e.catch(() => {
|
|
50
50
|
}).finally(() => Me.delete(e));
|
|
51
51
|
}, kt = (e, t) => {
|
|
@@ -53,9 +53,9 @@ const Ve = (e) => "init" in e, Fe = (e) => !!e.write, Me = /* @__PURE__ */ new W
|
|
|
53
53
|
s && (Me.delete(e), s(t));
|
|
54
54
|
}, St = (e, t) => {
|
|
55
55
|
e.status = "fulfilled", e.value = t;
|
|
56
|
-
},
|
|
56
|
+
}, jt = (e, t) => {
|
|
57
57
|
e.status = "rejected", e.reason = t;
|
|
58
|
-
}, io = (e) => typeof (e == null ? void 0 : e.then) == "function", Ne = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v),
|
|
58
|
+
}, io = (e) => typeof (e == null ? void 0 : e.then) == "function", Ne = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v), At = (e, t) => "e" in e && "e" in t && Object.is(e.e, t.e), ye = (e) => "v" in e && e.v instanceof Promise, lo = (e, t) => "v" in e && "v" in t && e.v.orig && e.v.orig === t.v.orig, Re = (e) => {
|
|
59
59
|
if ("e" in e)
|
|
60
60
|
throw e.e;
|
|
61
61
|
return e.v;
|
|
@@ -63,117 +63,117 @@ const Ve = (e) => "init" in e, Fe = (e) => !!e.write, Me = /* @__PURE__ */ new W
|
|
|
63
63
|
const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new Map();
|
|
64
64
|
let o, n, r;
|
|
65
65
|
(z ? "production" : void 0) !== "production" && (o = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set());
|
|
66
|
-
const i = (d) => e.get(d), u = (d,
|
|
67
|
-
(z ? "production" : void 0) !== "production" && Object.freeze(
|
|
66
|
+
const i = (d) => e.get(d), u = (d, f) => {
|
|
67
|
+
(z ? "production" : void 0) !== "production" && Object.freeze(f);
|
|
68
68
|
const h = e.get(d);
|
|
69
|
-
if (e.set(d,
|
|
70
|
-
const
|
|
71
|
-
kt(h.v,
|
|
69
|
+
if (e.set(d, f), s.has(d) || s.set(d, h), h && ye(h)) {
|
|
70
|
+
const g = "v" in f ? f.v instanceof Promise ? f.v : Promise.resolve(f.v) : Promise.reject(f.e);
|
|
71
|
+
kt(h.v, g);
|
|
72
72
|
}
|
|
73
|
-
},
|
|
74
|
-
const
|
|
73
|
+
}, p = (d, f, h) => {
|
|
74
|
+
const g = /* @__PURE__ */ new Map();
|
|
75
75
|
let v = !1;
|
|
76
76
|
h.forEach((x, N) => {
|
|
77
|
-
!x && N === d && (x =
|
|
78
|
-
}), (v ||
|
|
79
|
-
}, l = (d,
|
|
80
|
-
const
|
|
81
|
-
d: (
|
|
82
|
-
v:
|
|
77
|
+
!x && N === d && (x = f), x ? (g.set(N, x), f.d.get(N) !== x && (v = !0)) : (z ? "production" : void 0) !== "production" && console.warn("[Bug] atom state not found");
|
|
78
|
+
}), (v || f.d.size !== g.size) && (f.d = g);
|
|
79
|
+
}, l = (d, f, h) => {
|
|
80
|
+
const g = i(d), v = {
|
|
81
|
+
d: (g == null ? void 0 : g.d) || /* @__PURE__ */ new Map(),
|
|
82
|
+
v: f
|
|
83
83
|
};
|
|
84
|
-
if (h &&
|
|
85
|
-
return
|
|
86
|
-
if (
|
|
87
|
-
if (
|
|
88
|
-
return
|
|
89
|
-
v.v =
|
|
84
|
+
if (h && p(d, v, h), g && Ne(g, v) && g.d === v.d)
|
|
85
|
+
return g;
|
|
86
|
+
if (g && ye(g) && ye(v) && lo(g, v)) {
|
|
87
|
+
if (g.d === v.d)
|
|
88
|
+
return g;
|
|
89
|
+
v.v = g.v;
|
|
90
90
|
}
|
|
91
91
|
return u(d, v), v;
|
|
92
|
-
},
|
|
93
|
-
if (io(
|
|
92
|
+
}, b = (d, f, h, g) => {
|
|
93
|
+
if (io(f)) {
|
|
94
94
|
let v;
|
|
95
|
-
const x = new Promise((N,
|
|
95
|
+
const x = new Promise((N, M) => {
|
|
96
96
|
let S = !1;
|
|
97
|
-
|
|
98
|
-
(
|
|
97
|
+
f.then(
|
|
98
|
+
(_) => {
|
|
99
99
|
if (!S) {
|
|
100
100
|
S = !0;
|
|
101
|
-
const
|
|
101
|
+
const j = i(d), X = l(
|
|
102
102
|
d,
|
|
103
103
|
x,
|
|
104
104
|
h
|
|
105
105
|
);
|
|
106
|
-
St(x,
|
|
106
|
+
St(x, _), N(_), (j == null ? void 0 : j.d) !== X.d && U(d, X, j == null ? void 0 : j.d);
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
|
-
(
|
|
109
|
+
(_) => {
|
|
110
110
|
if (!S) {
|
|
111
111
|
S = !0;
|
|
112
|
-
const
|
|
112
|
+
const j = i(d), X = l(
|
|
113
113
|
d,
|
|
114
114
|
x,
|
|
115
115
|
h
|
|
116
116
|
);
|
|
117
|
-
|
|
117
|
+
jt(x, _), M(_), (j == null ? void 0 : j.d) !== X.d && U(d, X, j == null ? void 0 : j.d);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
), v = (
|
|
121
|
-
S || (S = !0,
|
|
122
|
-
(
|
|
123
|
-
(
|
|
124
|
-
), N(
|
|
120
|
+
), v = (_) => {
|
|
121
|
+
S || (S = !0, _.then(
|
|
122
|
+
(j) => St(x, j),
|
|
123
|
+
(j) => jt(x, j)
|
|
124
|
+
), N(_));
|
|
125
125
|
};
|
|
126
126
|
});
|
|
127
|
-
return x.orig =
|
|
128
|
-
N && v(N),
|
|
127
|
+
return x.orig = f, x.status = "pending", ro(x, (N) => {
|
|
128
|
+
N && v(N), g == null || g();
|
|
129
129
|
}), l(d, x, h);
|
|
130
130
|
}
|
|
131
|
-
return l(d,
|
|
132
|
-
}, w = (d,
|
|
133
|
-
const
|
|
134
|
-
d: (
|
|
135
|
-
e:
|
|
131
|
+
return l(d, f, h);
|
|
132
|
+
}, w = (d, f, h) => {
|
|
133
|
+
const g = i(d), v = {
|
|
134
|
+
d: (g == null ? void 0 : g.d) || /* @__PURE__ */ new Map(),
|
|
135
|
+
e: f
|
|
136
136
|
};
|
|
137
|
-
return h &&
|
|
137
|
+
return h && p(d, v, h), g && At(g, v) && g.d === v.d ? g : (u(d, v), v);
|
|
138
138
|
}, k = (d) => {
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
|
|
142
|
-
}), Array.from(
|
|
143
|
-
const
|
|
144
|
-
return S === d ||
|
|
145
|
-
|
|
139
|
+
const f = i(d);
|
|
140
|
+
if (f && (f.d.forEach((S, _) => {
|
|
141
|
+
_ !== d && !t.has(_) && k(_);
|
|
142
|
+
}), Array.from(f.d).every(([S, _]) => {
|
|
143
|
+
const j = i(S);
|
|
144
|
+
return S === d || j === _ || // TODO This is a hack, we should find a better solution.
|
|
145
|
+
j && !ye(j) && Ne(j, _);
|
|
146
146
|
})))
|
|
147
|
-
return
|
|
147
|
+
return f;
|
|
148
148
|
const h = /* @__PURE__ */ new Map();
|
|
149
|
-
let
|
|
149
|
+
let g = !0;
|
|
150
150
|
const v = (S) => {
|
|
151
151
|
if (S === d) {
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
154
|
-
return h.set(S,
|
|
155
|
-
if (
|
|
152
|
+
const j = i(S);
|
|
153
|
+
if (j)
|
|
154
|
+
return h.set(S, j), Re(j);
|
|
155
|
+
if ($e(S))
|
|
156
156
|
return h.set(S, void 0), S.init;
|
|
157
157
|
throw new Error("no atom init");
|
|
158
158
|
}
|
|
159
|
-
const
|
|
160
|
-
return h.set(S,
|
|
159
|
+
const _ = k(S);
|
|
160
|
+
return h.set(S, _), Re(_);
|
|
161
161
|
};
|
|
162
162
|
let x, N;
|
|
163
|
-
const
|
|
163
|
+
const M = {
|
|
164
164
|
get signal() {
|
|
165
165
|
return x || (x = new AbortController()), x.signal;
|
|
166
166
|
},
|
|
167
167
|
get setSelf() {
|
|
168
168
|
return (z ? "production" : void 0) !== "production" && !Fe(d) && console.warn("setSelf function cannot be used with read-only atom"), !N && Fe(d) && (N = (...S) => {
|
|
169
|
-
if ((z ? "production" : void 0) !== "production" &&
|
|
169
|
+
if ((z ? "production" : void 0) !== "production" && g && console.warn("setSelf function cannot be called in sync"), !g)
|
|
170
170
|
return ee(d, ...S);
|
|
171
171
|
}), N;
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
174
|
try {
|
|
175
|
-
const S = d.read(v,
|
|
176
|
-
return
|
|
175
|
+
const S = d.read(v, M);
|
|
176
|
+
return b(
|
|
177
177
|
d,
|
|
178
178
|
S,
|
|
179
179
|
h,
|
|
@@ -182,138 +182,138 @@ const Ve = (e) => "init" in e, Fe = (e) => !!e.write, Me = /* @__PURE__ */ new W
|
|
|
182
182
|
} catch (S) {
|
|
183
183
|
return w(d, S, h);
|
|
184
184
|
} finally {
|
|
185
|
-
|
|
185
|
+
g = !1;
|
|
186
186
|
}
|
|
187
|
-
},
|
|
188
|
-
let
|
|
189
|
-
return
|
|
190
|
-
}, K = (d,
|
|
191
|
-
const
|
|
192
|
-
|
|
187
|
+
}, D = (d) => Re(k(d)), F = (d) => {
|
|
188
|
+
let f = t.get(d);
|
|
189
|
+
return f || (f = J(d)), f;
|
|
190
|
+
}, K = (d, f) => !f.l.size && (!f.t.size || f.t.size === 1 && f.t.has(d)), ae = (d) => {
|
|
191
|
+
const f = t.get(d);
|
|
192
|
+
f && K(d, f) && ue(d);
|
|
193
193
|
}, he = (d) => {
|
|
194
|
-
const
|
|
194
|
+
const f = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new WeakMap(), g = (x) => {
|
|
195
195
|
const N = t.get(x);
|
|
196
|
-
N == null || N.t.forEach((
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
(
|
|
200
|
-
), h.set(
|
|
196
|
+
N == null || N.t.forEach((M) => {
|
|
197
|
+
M !== x && (f.set(
|
|
198
|
+
M,
|
|
199
|
+
(f.get(M) || /* @__PURE__ */ new Set()).add(x)
|
|
200
|
+
), h.set(M, (h.get(M) || 0) + 1), g(M));
|
|
201
201
|
});
|
|
202
202
|
};
|
|
203
|
-
|
|
203
|
+
g(d);
|
|
204
204
|
const v = (x) => {
|
|
205
205
|
const N = t.get(x);
|
|
206
|
-
N == null || N.t.forEach((
|
|
206
|
+
N == null || N.t.forEach((M) => {
|
|
207
207
|
var S;
|
|
208
|
-
if (
|
|
209
|
-
let
|
|
210
|
-
if (
|
|
211
|
-
let
|
|
212
|
-
if (
|
|
213
|
-
const X = i(
|
|
214
|
-
|
|
208
|
+
if (M !== x) {
|
|
209
|
+
let _ = h.get(M);
|
|
210
|
+
if (_ && h.set(M, --_), !_) {
|
|
211
|
+
let j = !!((S = f.get(M)) != null && S.size);
|
|
212
|
+
if (j) {
|
|
213
|
+
const X = i(M), Ls = k(M);
|
|
214
|
+
j = !X || !Ne(X, Ls);
|
|
215
215
|
}
|
|
216
|
-
|
|
216
|
+
j || f.forEach((X) => X.delete(M));
|
|
217
217
|
}
|
|
218
|
-
v(
|
|
218
|
+
v(M);
|
|
219
219
|
}
|
|
220
220
|
});
|
|
221
221
|
};
|
|
222
222
|
v(d);
|
|
223
|
-
}, ne = (d, ...
|
|
223
|
+
}, ne = (d, ...f) => {
|
|
224
224
|
let h = !0;
|
|
225
|
-
const
|
|
225
|
+
const g = (N) => Re(k(N)), v = (N, ...M) => {
|
|
226
226
|
let S;
|
|
227
227
|
if (N === d) {
|
|
228
|
-
if (
|
|
228
|
+
if (!$e(N))
|
|
229
229
|
throw new Error("atom not writable");
|
|
230
|
-
const
|
|
231
|
-
(!
|
|
230
|
+
const _ = i(N), j = b(N, M[0]);
|
|
231
|
+
(!_ || !Ne(_, j)) && he(N);
|
|
232
232
|
} else
|
|
233
|
-
S = ne(N, ...
|
|
233
|
+
S = ne(N, ...M);
|
|
234
234
|
if (!h) {
|
|
235
|
-
const
|
|
235
|
+
const _ = re();
|
|
236
236
|
(z ? "production" : void 0) !== "production" && n.forEach(
|
|
237
|
-
(
|
|
237
|
+
(j) => j({ type: "async-write", flushed: _ })
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
240
|
return S;
|
|
241
|
-
}, x = d.write(
|
|
241
|
+
}, x = d.write(g, v, ...f);
|
|
242
242
|
return h = !1, x;
|
|
243
|
-
}, ee = (d, ...
|
|
244
|
-
const h = ne(d, ...
|
|
243
|
+
}, ee = (d, ...f) => {
|
|
244
|
+
const h = ne(d, ...f), g = re();
|
|
245
245
|
return (z ? "production" : void 0) !== "production" && n.forEach(
|
|
246
|
-
(v) => v({ type: "write", flushed:
|
|
246
|
+
(v) => v({ type: "write", flushed: g })
|
|
247
247
|
), h;
|
|
248
|
-
}, J = (d,
|
|
248
|
+
}, J = (d, f) => {
|
|
249
249
|
const h = {
|
|
250
|
-
t: new Set(
|
|
250
|
+
t: new Set(f && [f]),
|
|
251
251
|
l: /* @__PURE__ */ new Set()
|
|
252
252
|
};
|
|
253
|
-
if (t.set(d, h), (z ? "production" : void 0) !== "production" && r.add(d), k(d).d.forEach((
|
|
253
|
+
if (t.set(d, h), (z ? "production" : void 0) !== "production" && r.add(d), k(d).d.forEach((g, v) => {
|
|
254
254
|
const x = t.get(v);
|
|
255
255
|
x ? x.t.add(d) : v !== d && J(v, d);
|
|
256
256
|
}), k(d), Fe(d) && d.onMount) {
|
|
257
|
-
const
|
|
258
|
-
|
|
257
|
+
const g = d.onMount((...v) => ee(d, ...v));
|
|
258
|
+
g && (h.u = g);
|
|
259
259
|
}
|
|
260
260
|
return h;
|
|
261
261
|
}, ue = (d) => {
|
|
262
|
-
var
|
|
263
|
-
const h = (
|
|
262
|
+
var f;
|
|
263
|
+
const h = (f = t.get(d)) == null ? void 0 : f.u;
|
|
264
264
|
h && h(), t.delete(d), (z ? "production" : void 0) !== "production" && r.delete(d);
|
|
265
|
-
const
|
|
266
|
-
|
|
265
|
+
const g = i(d);
|
|
266
|
+
g ? (ye(g) && kt(g.v), g.d.forEach((v, x) => {
|
|
267
267
|
if (x !== d) {
|
|
268
268
|
const N = t.get(x);
|
|
269
269
|
N && (N.t.delete(d), K(x, N) && ue(x));
|
|
270
270
|
}
|
|
271
271
|
})) : (z ? "production" : void 0) !== "production" && console.warn("[Bug] could not find atom state to unmount", d);
|
|
272
|
-
}, U = (d,
|
|
273
|
-
const
|
|
272
|
+
}, U = (d, f, h) => {
|
|
273
|
+
const g = new Set(f.d.keys());
|
|
274
274
|
h == null || h.forEach((v, x) => {
|
|
275
|
-
if (
|
|
276
|
-
|
|
275
|
+
if (g.has(x)) {
|
|
276
|
+
g.delete(x);
|
|
277
277
|
return;
|
|
278
278
|
}
|
|
279
279
|
const N = t.get(x);
|
|
280
280
|
N && (N.t.delete(d), K(x, N) && ue(x));
|
|
281
|
-
}),
|
|
281
|
+
}), g.forEach((v) => {
|
|
282
282
|
const x = t.get(v);
|
|
283
283
|
x ? x.t.add(d) : t.has(d) && J(v, d);
|
|
284
284
|
});
|
|
285
285
|
}, re = () => {
|
|
286
286
|
let d;
|
|
287
287
|
for ((z ? "production" : void 0) !== "production" && (d = /* @__PURE__ */ new Set()); s.size; ) {
|
|
288
|
-
const
|
|
289
|
-
s.clear(),
|
|
288
|
+
const f = Array.from(s);
|
|
289
|
+
s.clear(), f.forEach(([h, g]) => {
|
|
290
290
|
const v = i(h);
|
|
291
291
|
if (v) {
|
|
292
|
-
v.d !== (
|
|
292
|
+
v.d !== (g == null ? void 0 : g.d) && U(h, v, g == null ? void 0 : g.d);
|
|
293
293
|
const x = t.get(h);
|
|
294
294
|
x && !// TODO This seems pretty hacky. Hope to fix it.
|
|
295
295
|
// Maybe we could `mountDependencies` in `setAtomState`?
|
|
296
|
-
(
|
|
296
|
+
(g && !ye(g) && (Ne(g, v) || At(g, v))) && (x.l.forEach((N) => N()), (z ? "production" : void 0) !== "production" && d.add(h));
|
|
297
297
|
} else
|
|
298
298
|
(z ? "production" : void 0) !== "production" && console.warn("[Bug] no atom state to flush");
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
301
|
if ((z ? "production" : void 0) !== "production")
|
|
302
|
-
return o.forEach((
|
|
303
|
-
}, ie = (d,
|
|
304
|
-
const h = F(d),
|
|
305
|
-
return v.add(
|
|
306
|
-
(x) => x({ type: "sub", flushed:
|
|
302
|
+
return o.forEach((f) => f("state")), d;
|
|
303
|
+
}, ie = (d, f) => {
|
|
304
|
+
const h = F(d), g = re(), v = h.l;
|
|
305
|
+
return v.add(f), (z ? "production" : void 0) !== "production" && (o.forEach((x) => x("sub")), n.forEach(
|
|
306
|
+
(x) => x({ type: "sub", flushed: g })
|
|
307
307
|
)), () => {
|
|
308
|
-
v.delete(
|
|
308
|
+
v.delete(f), ae(d), (z ? "production" : void 0) !== "production" && (o.forEach((x) => x("unsub")), n.forEach((x) => x({ type: "unsub" })));
|
|
309
309
|
};
|
|
310
310
|
};
|
|
311
311
|
return (z ? "production" : void 0) !== "production" ? {
|
|
312
|
-
get:
|
|
312
|
+
get: D,
|
|
313
313
|
set: ee,
|
|
314
314
|
sub: ie,
|
|
315
315
|
// store dev methods (these are tentative and subject to change without notice)
|
|
316
|
-
dev_subscribe_store: (d,
|
|
316
|
+
dev_subscribe_store: (d, f) => f !== 2 ? (console.warn(
|
|
317
317
|
"The current StoreListener revision is 2. The older ones are deprecated."
|
|
318
318
|
), o.add(d), () => {
|
|
319
319
|
o.delete(d);
|
|
@@ -324,15 +324,15 @@ const Ve = (e) => "init" in e, Fe = (e) => !!e.write, Me = /* @__PURE__ */ new W
|
|
|
324
324
|
dev_get_atom_state: (d) => e.get(d),
|
|
325
325
|
dev_get_mounted: (d) => t.get(d),
|
|
326
326
|
dev_restore_atoms: (d) => {
|
|
327
|
-
for (const [h,
|
|
328
|
-
|
|
329
|
-
const
|
|
327
|
+
for (const [h, g] of d)
|
|
328
|
+
$e(h) && (b(h, g), he(h));
|
|
329
|
+
const f = re();
|
|
330
330
|
n.forEach(
|
|
331
|
-
(h) => h({ type: "restore", flushed:
|
|
331
|
+
(h) => h({ type: "restore", flushed: f })
|
|
332
332
|
);
|
|
333
333
|
}
|
|
334
334
|
} : {
|
|
335
|
-
get:
|
|
335
|
+
get: D,
|
|
336
336
|
set: ee,
|
|
337
337
|
sub: ie
|
|
338
338
|
};
|
|
@@ -359,31 +359,31 @@ const fo = (e) => typeof (e == null ? void 0 : e.then) == "function", go = et.us
|
|
|
359
359
|
), e);
|
|
360
360
|
});
|
|
361
361
|
function bo(e, t) {
|
|
362
|
-
const s = qt(t), [[o, n, r], i] =
|
|
362
|
+
const s = qt(t), [[o, n, r], i] = Vs(
|
|
363
363
|
(l) => {
|
|
364
|
-
const
|
|
365
|
-
return Object.is(l[0],
|
|
364
|
+
const b = s.get(e);
|
|
365
|
+
return Object.is(l[0], b) && l[1] === s && l[2] === e ? l : [b, s, e];
|
|
366
366
|
},
|
|
367
367
|
void 0,
|
|
368
368
|
() => [s.get(e), s, e]
|
|
369
369
|
);
|
|
370
370
|
let u = o;
|
|
371
371
|
(n !== s || r !== e) && (i(), u = s.get(e));
|
|
372
|
-
const
|
|
373
|
-
return
|
|
372
|
+
const p = t == null ? void 0 : t.delay;
|
|
373
|
+
return je(() => {
|
|
374
374
|
const l = s.sub(e, () => {
|
|
375
|
-
if (typeof
|
|
376
|
-
setTimeout(i,
|
|
375
|
+
if (typeof p == "number") {
|
|
376
|
+
setTimeout(i, p);
|
|
377
377
|
return;
|
|
378
378
|
}
|
|
379
379
|
i();
|
|
380
380
|
});
|
|
381
381
|
return i(), l;
|
|
382
|
-
}, [s, e,
|
|
382
|
+
}, [s, e, p]), $s(u), fo(u) ? go(u) : u;
|
|
383
383
|
}
|
|
384
384
|
function xo(e, t) {
|
|
385
385
|
const s = qt(t);
|
|
386
|
-
return
|
|
386
|
+
return A(
|
|
387
387
|
(...n) => {
|
|
388
388
|
if ((mo ? "production" : void 0) !== "production" && !("write" in e))
|
|
389
389
|
throw new Error("not writable atom");
|
|
@@ -392,7 +392,7 @@ function xo(e, t) {
|
|
|
392
392
|
[s, e]
|
|
393
393
|
);
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function Kr(e, t) {
|
|
396
396
|
return [
|
|
397
397
|
bo(e, t),
|
|
398
398
|
// We do wrong type assertion here, which results in throwing an error.
|
|
@@ -416,16 +416,16 @@ function ko(e, t) {
|
|
|
416
416
|
return vo(
|
|
417
417
|
() => {
|
|
418
418
|
const s = /* @__PURE__ */ new WeakMap(), o = (i, u) => {
|
|
419
|
-
let
|
|
420
|
-
if (
|
|
421
|
-
return
|
|
422
|
-
const l = u && s.get(u),
|
|
423
|
-
return i.forEach((k,
|
|
424
|
-
const F = t ? t(k) :
|
|
425
|
-
w[
|
|
419
|
+
let p = s.get(i);
|
|
420
|
+
if (p)
|
|
421
|
+
return p;
|
|
422
|
+
const l = u && s.get(u), b = [], w = [];
|
|
423
|
+
return i.forEach((k, D) => {
|
|
424
|
+
const F = t ? t(k) : D;
|
|
425
|
+
w[D] = F;
|
|
426
426
|
const K = l && l.atomList[l.keyList.indexOf(F)];
|
|
427
427
|
if (K) {
|
|
428
|
-
|
|
428
|
+
b[D] = K;
|
|
429
429
|
return;
|
|
430
430
|
}
|
|
431
431
|
const ae = (ne) => {
|
|
@@ -448,53 +448,53 @@ function ko(e, t) {
|
|
|
448
448
|
...U.slice(ie + 1)
|
|
449
449
|
]);
|
|
450
450
|
};
|
|
451
|
-
|
|
452
|
-
}), l && l.keyList.length === w.length && l.keyList.every((k,
|
|
451
|
+
b[D] = _t(e) ? Z(ae, he) : Z(ae);
|
|
452
|
+
}), l && l.keyList.length === w.length && l.keyList.every((k, D) => k === w[D]) ? p = l : p = { arr: i, atomList: b, keyList: w }, s.set(i, p), p;
|
|
453
453
|
}, n = Z((i) => {
|
|
454
|
-
const u = i(n),
|
|
455
|
-
return o(
|
|
454
|
+
const u = i(n), p = i(e);
|
|
455
|
+
return o(p, u == null ? void 0 : u.arr);
|
|
456
456
|
});
|
|
457
457
|
(rt ? "production" : void 0) !== "production" && (n.debugPrivate = !0), n.init = void 0;
|
|
458
458
|
const r = _t(e) ? Z(
|
|
459
459
|
(i) => i(n).atomList,
|
|
460
|
-
(i, u,
|
|
461
|
-
switch (
|
|
460
|
+
(i, u, p) => {
|
|
461
|
+
switch (p.type) {
|
|
462
462
|
case "remove": {
|
|
463
|
-
const l = i(r).indexOf(
|
|
463
|
+
const l = i(r).indexOf(p.atom);
|
|
464
464
|
if (l >= 0) {
|
|
465
|
-
const
|
|
465
|
+
const b = i(e);
|
|
466
466
|
u(e, [
|
|
467
|
-
...
|
|
468
|
-
...
|
|
467
|
+
...b.slice(0, l),
|
|
468
|
+
...b.slice(l + 1)
|
|
469
469
|
]);
|
|
470
470
|
}
|
|
471
471
|
break;
|
|
472
472
|
}
|
|
473
473
|
case "insert": {
|
|
474
|
-
const l =
|
|
474
|
+
const l = p.before ? i(r).indexOf(p.before) : i(r).length;
|
|
475
475
|
if (l >= 0) {
|
|
476
|
-
const
|
|
476
|
+
const b = i(e);
|
|
477
477
|
u(e, [
|
|
478
|
-
...
|
|
479
|
-
|
|
480
|
-
...
|
|
478
|
+
...b.slice(0, l),
|
|
479
|
+
p.value,
|
|
480
|
+
...b.slice(l)
|
|
481
481
|
]);
|
|
482
482
|
}
|
|
483
483
|
break;
|
|
484
484
|
}
|
|
485
485
|
case "move": {
|
|
486
|
-
const l = i(r).indexOf(
|
|
487
|
-
if (l >= 0 &&
|
|
486
|
+
const l = i(r).indexOf(p.atom), b = p.before ? i(r).indexOf(p.before) : i(r).length;
|
|
487
|
+
if (l >= 0 && b >= 0) {
|
|
488
488
|
const w = i(e);
|
|
489
|
-
l <
|
|
489
|
+
l < b ? u(e, [
|
|
490
490
|
...w.slice(0, l),
|
|
491
|
-
...w.slice(l + 1,
|
|
491
|
+
...w.slice(l + 1, b),
|
|
492
492
|
w[l],
|
|
493
|
-
...w.slice(
|
|
493
|
+
...w.slice(b)
|
|
494
494
|
]) : u(e, [
|
|
495
|
-
...w.slice(0,
|
|
495
|
+
...w.slice(0, b),
|
|
496
496
|
w[l],
|
|
497
|
-
...w.slice(
|
|
497
|
+
...w.slice(b, l),
|
|
498
498
|
...w.slice(l + 1)
|
|
499
499
|
]);
|
|
500
500
|
}
|
|
@@ -509,7 +509,7 @@ function ko(e, t) {
|
|
|
509
509
|
t || wo
|
|
510
510
|
);
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function Jr(e) {
|
|
513
513
|
const t = Symbol(), s = Z(t);
|
|
514
514
|
(rt ? "production" : void 0) !== "production" && (s.debugPrivate = !0);
|
|
515
515
|
const o = Z(
|
|
@@ -530,23 +530,23 @@ function Xr(e) {
|
|
|
530
530
|
return o;
|
|
531
531
|
}
|
|
532
532
|
const So = (e) => typeof (e == null ? void 0 : e.then) == "function";
|
|
533
|
-
function
|
|
533
|
+
function jo(e) {
|
|
534
534
|
let t, s;
|
|
535
535
|
const o = {
|
|
536
536
|
getItem: (n, r) => {
|
|
537
537
|
var i, u;
|
|
538
|
-
const
|
|
539
|
-
if (
|
|
538
|
+
const p = (b) => {
|
|
539
|
+
if (b = b || "", t !== b) {
|
|
540
540
|
try {
|
|
541
|
-
s = JSON.parse(
|
|
541
|
+
s = JSON.parse(b);
|
|
542
542
|
} catch {
|
|
543
543
|
return r;
|
|
544
544
|
}
|
|
545
|
-
t =
|
|
545
|
+
t = b;
|
|
546
546
|
}
|
|
547
547
|
return s;
|
|
548
548
|
}, l = (u = (i = e()) == null ? void 0 : i.getItem(n)) != null ? u : null;
|
|
549
|
-
return So(l) ? l.then(
|
|
549
|
+
return So(l) ? l.then(p) : p(l);
|
|
550
550
|
},
|
|
551
551
|
setItem: (n, r) => {
|
|
552
552
|
var i;
|
|
@@ -561,11 +561,11 @@ function Ao(e) {
|
|
|
561
561
|
if (!(e() instanceof window.Storage))
|
|
562
562
|
return () => {
|
|
563
563
|
};
|
|
564
|
-
const u = (
|
|
565
|
-
if (
|
|
564
|
+
const u = (p) => {
|
|
565
|
+
if (p.storageArea === e() && p.key === n) {
|
|
566
566
|
let l;
|
|
567
567
|
try {
|
|
568
|
-
l = JSON.parse(
|
|
568
|
+
l = JSON.parse(p.newValue || "");
|
|
569
569
|
} catch {
|
|
570
570
|
l = i;
|
|
571
571
|
}
|
|
@@ -577,22 +577,22 @@ function Ao(e) {
|
|
|
577
577
|
};
|
|
578
578
|
}), o;
|
|
579
579
|
}
|
|
580
|
-
const
|
|
580
|
+
const Ao = jo(
|
|
581
581
|
() => typeof window < "u" ? window.localStorage : void 0
|
|
582
582
|
);
|
|
583
|
-
function
|
|
583
|
+
function Ae(e, t, s = Ao, o) {
|
|
584
584
|
const n = o == null ? void 0 : o.unstable_getOnInit, r = Z(
|
|
585
585
|
n ? s.getItem(e, t) : t
|
|
586
586
|
);
|
|
587
587
|
return (rt ? "production" : void 0) !== "production" && (r.debugPrivate = !0), r.onMount = (u) => {
|
|
588
588
|
n || u(s.getItem(e, t));
|
|
589
|
-
let
|
|
590
|
-
return s.subscribe && (
|
|
589
|
+
let p;
|
|
590
|
+
return s.subscribe && (p = s.subscribe(e, u, t)), p;
|
|
591
591
|
}, Z(
|
|
592
592
|
(u) => u(r),
|
|
593
|
-
(u,
|
|
594
|
-
const
|
|
595
|
-
return
|
|
593
|
+
(u, p, l) => {
|
|
594
|
+
const b = typeof l == "function" ? l(u(r)) : l;
|
|
595
|
+
return b === Kt ? (p(r, t), s.removeItem(e)) : b instanceof Promise ? b.then((w) => (p(r, w), s.setItem(e, w))) : (p(r, b), s.setItem(e, b));
|
|
596
596
|
}
|
|
597
597
|
);
|
|
598
598
|
}
|
|
@@ -600,7 +600,7 @@ const it = y(null);
|
|
|
600
600
|
it.debugLabel = "chaiBuilderPropsAtom";
|
|
601
601
|
const Co = y({});
|
|
602
602
|
Co.debugLabel = "chaiExternalDataAtom";
|
|
603
|
-
const
|
|
603
|
+
const Yr = () => !1, _o = (e) => {
|
|
604
604
|
const t = e.replace(ge, "").split(",");
|
|
605
605
|
return { baseClasses: t[0], classes: t[1] };
|
|
606
606
|
};
|
|
@@ -614,12 +614,12 @@ const Bo = new Ut({ children: "blockNodes" }), Jt = (e, t = null) => Y(
|
|
|
614
614
|
})
|
|
615
615
|
);
|
|
616
616
|
function Yt(e, t, s) {
|
|
617
|
-
const o =
|
|
617
|
+
const o = I(e, (r) => r._parent === t), n = [];
|
|
618
618
|
for (let r = 0; r < o.length; r++) {
|
|
619
619
|
const i = Qt(o[r]);
|
|
620
620
|
if (Object.keys(i).length > 0 && Object.keys(i).forEach((u) => {
|
|
621
621
|
o[r][u] = `slot:${le()}`;
|
|
622
|
-
}),
|
|
622
|
+
}), I(e, { _parent: o[r]._id }).length > 0) {
|
|
623
623
|
const u = le();
|
|
624
624
|
n.push({ ...o[r], oldId: o[r]._id, _id: u, _parent: s }), n.push(Y(Yt(e, o[r]._id, u)));
|
|
625
625
|
} else
|
|
@@ -645,13 +645,13 @@ const Qt = (e) => {
|
|
|
645
645
|
let o = te(e, { _id: t });
|
|
646
646
|
o = { ...o, oldId: o._id, _id: le() }, s && (o = { ...o, _parent: s });
|
|
647
647
|
const n = [o];
|
|
648
|
-
|
|
648
|
+
I(e, { _parent: t }).length > 0 && n.push(Y(Yt(e, t, o._id)));
|
|
649
649
|
const r = Y(n);
|
|
650
|
-
return
|
|
651
|
-
const u = i,
|
|
652
|
-
return Object.keys(
|
|
653
|
-
const
|
|
654
|
-
u[l] = `slot:${
|
|
650
|
+
return V(r, (i) => {
|
|
651
|
+
const u = i, p = Qt(u);
|
|
652
|
+
return Object.keys(p).length > 0 && Object.keys(p).forEach((l) => {
|
|
653
|
+
const b = te(r, { oldId: p[l].replace("slot:", "") });
|
|
654
|
+
u[l] = `slot:${b._id}`;
|
|
655
655
|
}), at(u, ["global", "oldId"]);
|
|
656
656
|
});
|
|
657
657
|
};
|
|
@@ -711,14 +711,14 @@ const Zt = y([]);
|
|
|
711
711
|
Zt.debugLabel = "buildingBlocksAtom";
|
|
712
712
|
const es = y((e) => {
|
|
713
713
|
const t = e(Zt);
|
|
714
|
-
return
|
|
714
|
+
return I(t, (s) => nt(s, "blockId"));
|
|
715
715
|
});
|
|
716
716
|
es.debugLabel = "globalBlocksAtom";
|
|
717
717
|
const q = () => {
|
|
718
|
-
const [, e] =
|
|
718
|
+
const [, e] = R(Oe);
|
|
719
719
|
return e;
|
|
720
|
-
},
|
|
721
|
-
const e = q(), t = L(Xt), s =
|
|
720
|
+
}, Qr = () => {
|
|
721
|
+
const e = q(), t = L(Xt), s = A(
|
|
722
722
|
(o) => {
|
|
723
723
|
const n = Jt(o);
|
|
724
724
|
e({ type: "set_page_blocks", payload: n });
|
|
@@ -726,9 +726,9 @@ const q = () => {
|
|
|
726
726
|
[e]
|
|
727
727
|
);
|
|
728
728
|
return [t, s];
|
|
729
|
-
},
|
|
729
|
+
}, Xr = () => {
|
|
730
730
|
const e = q();
|
|
731
|
-
return [
|
|
731
|
+
return [A(
|
|
732
732
|
(s) => {
|
|
733
733
|
e({ type: "set_page_blocks", payload: s });
|
|
734
734
|
},
|
|
@@ -747,19 +747,19 @@ const q = () => {
|
|
|
747
747
|
"Table",
|
|
748
748
|
"Row",
|
|
749
749
|
"TableCell"
|
|
750
|
-
].includes(e),
|
|
750
|
+
].includes(e), Zr = (e) => !["Slot"].includes(e), ei = (e) => !["Slot"].includes(e);
|
|
751
751
|
function Eo(e, t) {
|
|
752
752
|
return e === "Slot" || t === "List" && e !== "ListItem" || t === "Row" && e !== "Column" ? !1 : Ye(t);
|
|
753
753
|
}
|
|
754
|
-
const
|
|
755
|
-
const o =
|
|
756
|
-
return o === "Slot" ||
|
|
754
|
+
const ti = (e, { dragSource: t, dropTarget: s }) => {
|
|
755
|
+
const o = E(t, "data._type", ""), n = E(s, "data._type", "");
|
|
756
|
+
return o === "Slot" || E(t, "id") && E(t, "id") === E(s, "id") ? !1 : oe(n) ? !0 : Eo(o, n);
|
|
757
757
|
}, ct = y([]);
|
|
758
758
|
ct.debugLabel = "selectedBlockIdsAtom";
|
|
759
759
|
const dt = y((e) => {
|
|
760
760
|
const t = e(Q), s = e(ct);
|
|
761
|
-
return
|
|
762
|
-
|
|
761
|
+
return V(
|
|
762
|
+
I(t, ({ _id: o }) => G(s, o)),
|
|
763
763
|
(o) => ({ ...o })
|
|
764
764
|
);
|
|
765
765
|
});
|
|
@@ -768,13 +768,13 @@ const ut = y((e) => {
|
|
|
768
768
|
const t = e(dt);
|
|
769
769
|
return t.length === 0 ? null : t.length === 1 ? t[0] : {
|
|
770
770
|
type: "Multiple",
|
|
771
|
-
id:
|
|
771
|
+
id: V(t, "id")
|
|
772
772
|
};
|
|
773
773
|
});
|
|
774
774
|
ut.debugLabel = "selectedBlockAtom";
|
|
775
|
-
const Lo = (e) =>
|
|
776
|
-
const t = e(dt), s =
|
|
777
|
-
return
|
|
775
|
+
const Lo = (e) => E(e, "parent", null), Oo = y((e) => {
|
|
776
|
+
const t = e(dt), s = V(t, Lo);
|
|
777
|
+
return I(e(Q), (o) => G(s, o._id));
|
|
778
778
|
});
|
|
779
779
|
Oo.debugLabel = "selectedBlocksParentsAtom";
|
|
780
780
|
const ts = y(() => !1);
|
|
@@ -783,99 +783,99 @@ const ss = y(() => !1);
|
|
|
783
783
|
ss.debugLabel = "selectedBlockGridChildAtom";
|
|
784
784
|
const mt = y("");
|
|
785
785
|
mt.debugLabel = "styleStateAtom";
|
|
786
|
-
const os =
|
|
786
|
+
const os = Ae("styleBreakpoint", "xs");
|
|
787
787
|
os.debugLabel = "styleBreakpointAtom";
|
|
788
|
-
const
|
|
788
|
+
const si = () => ({
|
|
789
789
|
flexChild: L(ts),
|
|
790
790
|
gridChild: L(ss)
|
|
791
|
-
}),
|
|
791
|
+
}), oi = () => L(ut);
|
|
792
792
|
const Ce = () => {
|
|
793
|
-
const [e, t] =
|
|
793
|
+
const [e, t] = R(ct), s = A(
|
|
794
794
|
(o) => {
|
|
795
795
|
t((n) => G(n, o) ? Ft(n, o) : [...n, o]);
|
|
796
796
|
},
|
|
797
797
|
[t]
|
|
798
798
|
);
|
|
799
799
|
return [e, t, s];
|
|
800
|
-
}, Bt = (e
|
|
800
|
+
}, Bt = (e) => {
|
|
801
801
|
switch (e.type) {
|
|
802
802
|
case "singular":
|
|
803
803
|
return e.uiSchema;
|
|
804
804
|
case "model":
|
|
805
|
-
const { properties:
|
|
806
|
-
return Object.keys(
|
|
807
|
-
const
|
|
808
|
-
if (G(["slot", "styles"],
|
|
805
|
+
const { properties: t } = e, s = {};
|
|
806
|
+
return Object.keys(t).forEach((r) => {
|
|
807
|
+
const i = t[r];
|
|
808
|
+
if (G(["slot", "styles"], i.type))
|
|
809
809
|
return;
|
|
810
|
-
const
|
|
811
|
-
|
|
812
|
-
}),
|
|
810
|
+
const u = r;
|
|
811
|
+
s[u] = Bt(i);
|
|
812
|
+
}), s;
|
|
813
813
|
case "list":
|
|
814
|
-
const { itemProperties:
|
|
814
|
+
const { itemProperties: o } = e, n = {
|
|
815
815
|
items: {}
|
|
816
816
|
};
|
|
817
|
-
return Object.keys(
|
|
818
|
-
const
|
|
819
|
-
if (G(["slot", "styles"],
|
|
817
|
+
return Object.keys(o).forEach((r) => {
|
|
818
|
+
const i = o[r];
|
|
819
|
+
if (G(["slot", "styles"], i.type))
|
|
820
820
|
return;
|
|
821
|
-
const
|
|
822
|
-
|
|
823
|
-
}),
|
|
821
|
+
const u = r;
|
|
822
|
+
n.items[u] = Bt(i);
|
|
823
|
+
}), n;
|
|
824
824
|
default:
|
|
825
825
|
return {};
|
|
826
826
|
}
|
|
827
|
-
}, Rt = (e
|
|
827
|
+
}, Rt = (e) => {
|
|
828
828
|
switch (e.type) {
|
|
829
829
|
case "singular":
|
|
830
830
|
return e.schema;
|
|
831
831
|
case "model":
|
|
832
|
-
const { properties:
|
|
833
|
-
title:
|
|
832
|
+
const { properties: t, title: s } = e, o = {
|
|
833
|
+
title: s,
|
|
834
834
|
type: "object",
|
|
835
835
|
properties: {}
|
|
836
836
|
};
|
|
837
|
-
return Object.keys(
|
|
838
|
-
const
|
|
839
|
-
if (G(["slot", "styles"],
|
|
837
|
+
return Object.keys(t).forEach((u) => {
|
|
838
|
+
const p = t[u];
|
|
839
|
+
if (G(["slot", "styles"], p.type))
|
|
840
840
|
return;
|
|
841
|
-
const
|
|
842
|
-
|
|
843
|
-
}),
|
|
841
|
+
const l = u;
|
|
842
|
+
o.properties[l] = Rt(p);
|
|
843
|
+
}), o;
|
|
844
844
|
case "list":
|
|
845
|
-
const { itemProperties:
|
|
846
|
-
title:
|
|
845
|
+
const { itemProperties: n, title: r } = e, i = {
|
|
846
|
+
title: r,
|
|
847
847
|
type: "array",
|
|
848
848
|
items: {
|
|
849
849
|
type: "object",
|
|
850
850
|
properties: {}
|
|
851
851
|
}
|
|
852
852
|
};
|
|
853
|
-
return Object.keys(
|
|
854
|
-
const
|
|
855
|
-
if (G(["slot", "styles"],
|
|
853
|
+
return Object.keys(n).forEach((u) => {
|
|
854
|
+
const p = n[u];
|
|
855
|
+
if (G(["slot", "styles"], p.type))
|
|
856
856
|
return;
|
|
857
|
-
const
|
|
858
|
-
|
|
859
|
-
}),
|
|
857
|
+
const l = u;
|
|
858
|
+
i.items.properties[l] = Rt(p), fe(i.items, "title", E(p, "itemTitle", `${r} item`));
|
|
859
|
+
}), i;
|
|
860
860
|
default:
|
|
861
861
|
return {};
|
|
862
862
|
}
|
|
863
863
|
}, as = (e) => {
|
|
864
864
|
const t = {};
|
|
865
865
|
return Object.keys(e).forEach((s) => {
|
|
866
|
-
t[s] =
|
|
866
|
+
t[s] = Vo(e[s]);
|
|
867
867
|
}), t;
|
|
868
868
|
}, zo = (e) => {
|
|
869
869
|
if (oe(e.default))
|
|
870
870
|
return [];
|
|
871
871
|
const { itemProperties: t } = e;
|
|
872
|
-
return
|
|
872
|
+
return V(e.default, (s) => {
|
|
873
873
|
const o = { ...s };
|
|
874
874
|
return Gt(s, (n, r) => {
|
|
875
|
-
nt(t, r) &&
|
|
875
|
+
nt(t, r) && E(t[r], "i18n", !1) && (o[r] = Ht);
|
|
876
876
|
}), o;
|
|
877
877
|
});
|
|
878
|
-
},
|
|
878
|
+
}, Vo = (e) => {
|
|
879
879
|
switch (e.type) {
|
|
880
880
|
case "styles":
|
|
881
881
|
return e.default;
|
|
@@ -883,7 +883,7 @@ const Ce = () => {
|
|
|
883
883
|
return `${Ke}${le()}`;
|
|
884
884
|
case "singular":
|
|
885
885
|
const { i18n: t, schema: s } = e;
|
|
886
|
-
return t ? Ht :
|
|
886
|
+
return t ? Ht : E(s, "default", "");
|
|
887
887
|
case "model":
|
|
888
888
|
return as(e.properties);
|
|
889
889
|
case "list":
|
|
@@ -892,10 +892,10 @@ const Ce = () => {
|
|
|
892
892
|
return "";
|
|
893
893
|
}
|
|
894
894
|
};
|
|
895
|
-
const
|
|
895
|
+
const $o = () => L(Q);
|
|
896
896
|
function Pt(e, t, s, o, n) {
|
|
897
897
|
if (s !== null) {
|
|
898
|
-
const
|
|
898
|
+
const p = Be(e, { _parent: t }), l = (p === -1 ? 0 : p) + s;
|
|
899
899
|
return e.splice(l, 0, ...o), e;
|
|
900
900
|
}
|
|
901
901
|
if (!n) {
|
|
@@ -903,46 +903,46 @@ function Pt(e, t, s, o, n) {
|
|
|
903
903
|
return e.splice(l, 0, ...o), e;
|
|
904
904
|
}
|
|
905
905
|
let r = Be(e, { _id: t });
|
|
906
|
-
const i =
|
|
906
|
+
const i = I(e, { _parent: t });
|
|
907
907
|
oe(i) || (r = Be(e, { _id: Xs(i)._id }));
|
|
908
908
|
const u = r + 1;
|
|
909
909
|
return e.splice(u, 0, ...o), e;
|
|
910
910
|
}
|
|
911
|
-
const
|
|
912
|
-
const e = q(), t =
|
|
911
|
+
const ai = () => {
|
|
912
|
+
const e = q(), t = $o(), [, s] = Ce(), o = A(
|
|
913
913
|
(r, i, u) => {
|
|
914
|
-
var
|
|
914
|
+
var b;
|
|
915
915
|
for (let w = 0; w < r.length; w++) {
|
|
916
916
|
const { _id: k } = r[w];
|
|
917
917
|
r[w]._id = le();
|
|
918
|
-
const
|
|
919
|
-
for (let F = 0; F <
|
|
920
|
-
|
|
918
|
+
const D = I(r, { _parent: k });
|
|
919
|
+
for (let F = 0; F < D.length; F++)
|
|
920
|
+
D[F]._parent = r[w]._id;
|
|
921
921
|
}
|
|
922
|
-
let
|
|
923
|
-
i && (
|
|
924
|
-
const l =
|
|
925
|
-
return !l &&
|
|
922
|
+
let p;
|
|
923
|
+
i && (p = te(t, { _id: i }), r[0]._parent = i);
|
|
924
|
+
const l = p ? Ye(p._type) : !0;
|
|
925
|
+
return !l && p && (r[0]._parent = p._parent), e({
|
|
926
926
|
type: "set_blocks",
|
|
927
927
|
payload: Pt(t, i || null, u || null, r, l)
|
|
928
|
-
}), s([(
|
|
928
|
+
}), s([(b = se(r)) == null ? void 0 : b._id]), se(r);
|
|
929
929
|
},
|
|
930
930
|
[t, e, s]
|
|
931
931
|
);
|
|
932
|
-
return { addCoreBlock:
|
|
932
|
+
return { addCoreBlock: A(
|
|
933
933
|
(r, i, u) => {
|
|
934
934
|
if (nt(r, "blocks")) {
|
|
935
935
|
const K = r.blocks;
|
|
936
936
|
return o(K, i, u);
|
|
937
937
|
}
|
|
938
|
-
const
|
|
938
|
+
const p = le(), l = as(r.props), b = [];
|
|
939
939
|
Gt(l, (K, ae) => {
|
|
940
940
|
if (Wt(K, Ke)) {
|
|
941
941
|
const he = K.replace(Ke, "");
|
|
942
|
-
|
|
942
|
+
b.push({
|
|
943
943
|
_id: he,
|
|
944
944
|
_type: "Slot",
|
|
945
|
-
_parent:
|
|
945
|
+
_parent: p,
|
|
946
946
|
_name: r.props[ae].name,
|
|
947
947
|
_styles: r.props[ae].styles,
|
|
948
948
|
_emptyStyles: r.props[ae].emptyStyles
|
|
@@ -951,17 +951,17 @@ const ii = () => {
|
|
|
951
951
|
});
|
|
952
952
|
const w = {
|
|
953
953
|
_type: r.type,
|
|
954
|
-
_id:
|
|
954
|
+
_id: p,
|
|
955
955
|
...l
|
|
956
956
|
};
|
|
957
957
|
let k;
|
|
958
958
|
i && (k = te(t, { _id: i }), w._parent = i);
|
|
959
|
-
const
|
|
960
|
-
!
|
|
961
|
-
const F = [w, ...
|
|
959
|
+
const D = k ? Ye(k._type) : !0;
|
|
960
|
+
!D && k && (w._parent = k._parent);
|
|
961
|
+
const F = [w, ...b];
|
|
962
962
|
return e({
|
|
963
963
|
type: "set_blocks",
|
|
964
|
-
payload: Pt(t, i || null, u || null, F,
|
|
964
|
+
payload: Pt(t, i || null, u || null, F, D)
|
|
965
965
|
}), s([w._id]), w;
|
|
966
966
|
},
|
|
967
967
|
[o, t, e, s]
|
|
@@ -997,48 +997,48 @@ function Fo(e, t) {
|
|
|
997
997
|
const Mt = [];
|
|
998
998
|
function Go(e = "", t = "", s = []) {
|
|
999
999
|
e = e.trim().replace(/ +/g, "");
|
|
1000
|
-
let o =
|
|
1001
|
-
|
|
1000
|
+
let o = I(
|
|
1001
|
+
V(e.split(" "), Pe),
|
|
1002
1002
|
(l) => !qe(l)
|
|
1003
|
-
), n =
|
|
1004
|
-
n =
|
|
1003
|
+
), n = I(V(t.split(" "), Pe), (l) => !qe(l));
|
|
1004
|
+
n = I(
|
|
1005
1005
|
n,
|
|
1006
1006
|
(l) => !G(Mt, l.property)
|
|
1007
1007
|
);
|
|
1008
1008
|
const r = [], i = [];
|
|
1009
1009
|
ce(s, (l) => {
|
|
1010
|
-
const
|
|
1011
|
-
if (w && (o =
|
|
1010
|
+
const b = Pe(l), w = te(o, wt(b, ["dark", "mq", "mod", "property"]));
|
|
1011
|
+
if (w && (o = I(
|
|
1012
1012
|
o,
|
|
1013
1013
|
(k) => k.fullCls !== (w == null ? void 0 : w.fullCls)
|
|
1014
|
-
)), r.push(
|
|
1015
|
-
const k = te(n, wt(
|
|
1016
|
-
w && (n =
|
|
1014
|
+
)), r.push(b), b.mq === "xs" && !b.dark && b.mod === "" && (n = I(n, (k) => k.property !== b.property)), Fo(o, b) === "baseClasses" && !G(Mt, b.property)) {
|
|
1015
|
+
const k = te(n, wt(b, ["property"]));
|
|
1016
|
+
w && (n = I(
|
|
1017
1017
|
n,
|
|
1018
|
-
(
|
|
1018
|
+
(D) => D.fullCls !== (k == null ? void 0 : k.fullCls)
|
|
1019
1019
|
)), i.push({
|
|
1020
|
-
...
|
|
1021
|
-
fullCls:
|
|
1020
|
+
...b,
|
|
1021
|
+
fullCls: b.cls,
|
|
1022
1022
|
mq: "xs"
|
|
1023
1023
|
});
|
|
1024
1024
|
}
|
|
1025
1025
|
});
|
|
1026
|
-
const u =
|
|
1026
|
+
const u = V(
|
|
1027
1027
|
Nt([...o, ...r], (l) => Tt[l.mq]),
|
|
1028
1028
|
"fullCls"
|
|
1029
1029
|
).join(" ");
|
|
1030
|
-
return `${
|
|
1030
|
+
return `${V(
|
|
1031
1031
|
Nt([...n, ...i], (l) => Tt[l.mq]),
|
|
1032
1032
|
"fullCls"
|
|
1033
1033
|
).join(" ").trim()},${u.trim()}`.trim().replace(/ +/g, "");
|
|
1034
1034
|
}
|
|
1035
1035
|
const _e = y([]);
|
|
1036
1036
|
_e.debugLabel = "selectedStylingBlocksAtom";
|
|
1037
|
-
const ns = () =>
|
|
1037
|
+
const ns = () => R(_e), Wo = (e) => {
|
|
1038
1038
|
const t = e.replace(ge, "").split(",");
|
|
1039
1039
|
return { baseClasses: t[0], classes: t[1] };
|
|
1040
1040
|
}, Uo = y(null, (e, t, { blockIds: s, newClasses: o, dispatch: n }) => {
|
|
1041
|
-
const r =
|
|
1041
|
+
const r = I(
|
|
1042
1042
|
e(lt),
|
|
1043
1043
|
(u) => (
|
|
1044
1044
|
// @ts-ignore
|
|
@@ -1046,18 +1046,18 @@ const ns = () => C(_e), Wo = (e) => {
|
|
|
1046
1046
|
)
|
|
1047
1047
|
), i = se(e(_e));
|
|
1048
1048
|
ce(r, (u) => {
|
|
1049
|
-
const
|
|
1049
|
+
const p = e(u), l = E(p, i.prop, `${ge},`), { baseClasses: b, classes: w } = Wo(l);
|
|
1050
1050
|
n({
|
|
1051
1051
|
type: "update_props_realtime",
|
|
1052
1052
|
payload: {
|
|
1053
|
-
ids: [
|
|
1054
|
-
props: { [i.prop]: `${ge}${Go(w,
|
|
1053
|
+
ids: [p._id],
|
|
1054
|
+
props: { [i.prop]: `${ge}${Go(w, b, o)}` }
|
|
1055
1055
|
}
|
|
1056
1056
|
});
|
|
1057
1057
|
});
|
|
1058
|
-
}),
|
|
1058
|
+
}), ni = () => {
|
|
1059
1059
|
const e = q(), t = de(Uo);
|
|
1060
|
-
return
|
|
1060
|
+
return A(
|
|
1061
1061
|
(s, o, n) => {
|
|
1062
1062
|
t({ blockIds: s, newClasses: o, dispatch: e }), n && setTimeout(() => e({ type: "create_snapshot" }), 500);
|
|
1063
1063
|
},
|
|
@@ -1067,13 +1067,13 @@ const ns = () => C(_e), Wo = (e) => {
|
|
|
1067
1067
|
}, Ho = () => {
|
|
1068
1068
|
const e = oo(), t = L(es), s = () => {
|
|
1069
1069
|
Dt();
|
|
1070
|
-
}, o =
|
|
1070
|
+
}, o = A(() => Dt(), []);
|
|
1071
1071
|
return [e, t, s, o];
|
|
1072
1072
|
}, qo = y(!1), Ko = () => {
|
|
1073
|
-
const [e, t] =
|
|
1073
|
+
const [e, t] = R(qo);
|
|
1074
1074
|
return [e, t];
|
|
1075
1075
|
}, Jo = y(Je), Yo = () => {
|
|
1076
|
-
const [e, t] =
|
|
1076
|
+
const [e, t] = R(Jo);
|
|
1077
1077
|
return [
|
|
1078
1078
|
Zs(e) ? { ...Je, ...e } : Je,
|
|
1079
1079
|
t
|
|
@@ -1098,20 +1098,20 @@ function ft(e, t = !1) {
|
|
|
1098
1098
|
o.global && !t ? e[s] = {
|
|
1099
1099
|
type: "GlobalBlock",
|
|
1100
1100
|
blockId: o.blockId,
|
|
1101
|
-
_parent:
|
|
1101
|
+
_parent: E(o, "parent", null),
|
|
1102
1102
|
_id: o._id
|
|
1103
1103
|
} : o.children && o.children.length && ft(o.children);
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
1106
|
function is(e) {
|
|
1107
|
-
let t = [], s =
|
|
1108
|
-
return s.length > 0 && (s =
|
|
1107
|
+
let t = [], s = I(e, { type: "GlobalBlock" });
|
|
1108
|
+
return s.length > 0 && (s = V(s, ls), ce(s, (o) => {
|
|
1109
1109
|
t = [...t, ...ea(o)];
|
|
1110
1110
|
})), t;
|
|
1111
1111
|
}
|
|
1112
1112
|
function ea(e) {
|
|
1113
1113
|
let t = [];
|
|
1114
|
-
const s =
|
|
1114
|
+
const s = E(se(e), "parent", null);
|
|
1115
1115
|
fe(se(e), "parent", null);
|
|
1116
1116
|
const o = [rs.convert(cs(e))];
|
|
1117
1117
|
ft(o, !0);
|
|
@@ -1122,8 +1122,8 @@ function ls(e) {
|
|
|
1122
1122
|
const t = te(Qe, { _id: e._id });
|
|
1123
1123
|
if (!t)
|
|
1124
1124
|
return [];
|
|
1125
|
-
const s = [t], o =
|
|
1126
|
-
return o.length ? Y([...s, ...Y(
|
|
1125
|
+
const s = [t], o = I(Qe, { _parent: e._id });
|
|
1126
|
+
return o.length ? Y([...s, ...Y(V(o, ls))]) : Y(s);
|
|
1127
1127
|
}
|
|
1128
1128
|
const cs = (e) => JSON.parse(JSON.stringify(e));
|
|
1129
1129
|
let Qe = [];
|
|
@@ -1136,8 +1136,8 @@ function ta(e) {
|
|
|
1136
1136
|
}
|
|
1137
1137
|
const ds = () => {
|
|
1138
1138
|
const [e] = Yo(), { currentPage: t } = Xo(), s = L(Q);
|
|
1139
|
-
return
|
|
1140
|
-
const o =
|
|
1139
|
+
return A(() => {
|
|
1140
|
+
const o = V(
|
|
1141
1141
|
s,
|
|
1142
1142
|
(i) => at(i, ["expanded", "order", "title", "siblings", "tempClasses"])
|
|
1143
1143
|
), [n = [], r = []] = ta(o);
|
|
@@ -1149,7 +1149,7 @@ const ds = () => {
|
|
|
1149
1149
|
}, [e, t, s]);
|
|
1150
1150
|
}, ve = (e, t = void 0) => {
|
|
1151
1151
|
const s = L(it);
|
|
1152
|
-
return
|
|
1152
|
+
return E(s, e, t);
|
|
1153
1153
|
}, us = y(!1);
|
|
1154
1154
|
us.debugLabel = "readOnlyModeAtom";
|
|
1155
1155
|
const sa = y(!1);
|
|
@@ -1177,22 +1177,24 @@ ze.debugLabel = "historyStatesAtom";
|
|
|
1177
1177
|
const ma = y("");
|
|
1178
1178
|
ma.debugLabel = "inlineEditingActiveAtom";
|
|
1179
1179
|
const pa = y(!1);
|
|
1180
|
-
pa.debugLabel = "
|
|
1180
|
+
pa.debugLabel = "draggingFlagAtom";
|
|
1181
|
+
const fa = y("");
|
|
1182
|
+
fa.debugLabel = "draggedBlockIdAtom";
|
|
1181
1183
|
const ms = y([]);
|
|
1182
1184
|
ms.debugLabel = "dataProvidersAtom";
|
|
1183
|
-
const
|
|
1185
|
+
const ga = () => R(ms), gt = y("SAVED");
|
|
1184
1186
|
gt.debugLabel = "pageSyncStateAtom";
|
|
1185
|
-
const
|
|
1186
|
-
const [e, t] =
|
|
1187
|
+
const ri = () => {
|
|
1188
|
+
const [e, t] = R(gt), s = ve("onSaveBlocks", async () => {
|
|
1187
1189
|
}), o = ve("onSavePage", async () => {
|
|
1188
1190
|
}), n = ve("onSyncStatusChange", () => {
|
|
1189
|
-
}), r = ds(), i = de(ze), { undoCount: u, redoCount:
|
|
1191
|
+
}), r = ds(), i = de(ze), { undoCount: u, redoCount: p } = bt(), [l] = ga();
|
|
1190
1192
|
return { savePage: ao(
|
|
1191
1193
|
async () => {
|
|
1192
1194
|
t("SAVING"), n("SAVING");
|
|
1193
1195
|
const w = r();
|
|
1194
1196
|
return await o({ blocks: w.blocks, providers: l }), setTimeout(() => {
|
|
1195
|
-
i({ undoCount: u, redoCount:
|
|
1197
|
+
i({ undoCount: u, redoCount: p }), t("SAVED"), n("SAVED");
|
|
1196
1198
|
}, 100), !0;
|
|
1197
1199
|
},
|
|
1198
1200
|
[r, t, n, s],
|
|
@@ -1200,124 +1202,124 @@ const ci = () => {
|
|
|
1200
1202
|
// save only every 5 seconds
|
|
1201
1203
|
), syncState: e, setSyncState: t };
|
|
1202
1204
|
}, bt = () => {
|
|
1203
|
-
const e = L(Oe), [{ undoCount: t, redoCount: s }] =
|
|
1204
|
-
}),
|
|
1205
|
+
const e = L(Oe), [{ undoCount: t, redoCount: s }] = R(ze), o = q(), [n] = Ko(), [, r] = Ce(), [, i] = ns(), [u, p] = R(gt), l = ve("onSyncStatusChange", () => {
|
|
1206
|
+
}), b = A(() => {
|
|
1205
1207
|
o({ type: "create_snapshot" });
|
|
1206
1208
|
}, [o]);
|
|
1207
|
-
return
|
|
1208
|
-
(u === "SAVED" && t !== (e == null ? void 0 : e.past.length) || s !== (e == null ? void 0 : e.future.length)) && (
|
|
1209
|
-
}, [e == null ? void 0 : e.past.length, e == null ? void 0 : e.future.length, t, s, l,
|
|
1209
|
+
return je(() => {
|
|
1210
|
+
(u === "SAVED" && t !== (e == null ? void 0 : e.past.length) || s !== (e == null ? void 0 : e.future.length)) && (p("UNSAVED"), l("UNSAVED"));
|
|
1211
|
+
}, [e == null ? void 0 : e.past.length, e == null ? void 0 : e.future.length, t, s, l, p, u]), {
|
|
1210
1212
|
undoCount: e == null ? void 0 : e.past.length,
|
|
1211
1213
|
redoCount: e == null ? void 0 : e.future.length,
|
|
1212
|
-
undo:
|
|
1213
|
-
n || (o(
|
|
1214
|
+
undo: A(() => {
|
|
1215
|
+
n || (o(Ve.undo()), setTimeout(() => {
|
|
1214
1216
|
i([]), r([]);
|
|
1215
1217
|
}, 200));
|
|
1216
1218
|
}, [o, n, r, i]),
|
|
1217
|
-
redo:
|
|
1218
|
-
n || (o(
|
|
1219
|
+
redo: A(() => {
|
|
1220
|
+
n || (o(Ve.redo()), setTimeout(() => {
|
|
1219
1221
|
i([]), r([]);
|
|
1220
1222
|
}, 200));
|
|
1221
1223
|
}, [n, o, i, r]),
|
|
1222
1224
|
clear: () => {
|
|
1223
|
-
o(
|
|
1225
|
+
o(Ve.clearHistory());
|
|
1224
1226
|
},
|
|
1225
|
-
createSnapshot:
|
|
1227
|
+
createSnapshot: b
|
|
1226
1228
|
};
|
|
1227
|
-
},
|
|
1229
|
+
}, ba = () => R(os), ps = Ae("canvasWidth", 800), fs = y((e) => {
|
|
1228
1230
|
const t = e(ps);
|
|
1229
1231
|
return Gs(t).toLowerCase();
|
|
1230
|
-
}),
|
|
1231
|
-
const [e, t] =
|
|
1232
|
-
return
|
|
1232
|
+
}), ii = () => {
|
|
1233
|
+
const [e, t] = R(ps), s = L(fs), [o, n] = ba();
|
|
1234
|
+
return je(() => {
|
|
1233
1235
|
o !== "xs" && n(s);
|
|
1234
1236
|
}, [s, o, n]), [e, s, t];
|
|
1235
|
-
},
|
|
1236
|
-
const [e, t] =
|
|
1237
|
+
}, xa = Ae("canvasZoom", 100), li = () => R(xa), gs = y([]), ha = () => {
|
|
1238
|
+
const [e, t] = R(gs), s = de(xt), o = A(
|
|
1237
1239
|
(n) => {
|
|
1238
1240
|
t(n), s([]);
|
|
1239
1241
|
},
|
|
1240
1242
|
[t, s]
|
|
1241
1243
|
);
|
|
1242
1244
|
return [e, o];
|
|
1243
|
-
}, xt = y([]),
|
|
1244
|
-
const [e, t] =
|
|
1245
|
+
}, xt = y([]), ci = () => {
|
|
1246
|
+
const [e, t] = R(xt), s = de(gs), o = A(
|
|
1245
1247
|
(n) => {
|
|
1246
1248
|
t(n), s([]);
|
|
1247
1249
|
},
|
|
1248
1250
|
[t, s]
|
|
1249
1251
|
);
|
|
1250
1252
|
return [e, o];
|
|
1251
|
-
}, bs =
|
|
1252
|
-
const [e, t] =
|
|
1253
|
+
}, bs = Ae("darkMode", !1), di = () => {
|
|
1254
|
+
const [e, t] = R(bs);
|
|
1253
1255
|
return [e, t];
|
|
1254
|
-
},
|
|
1255
|
-
const [e, t] =
|
|
1256
|
+
}, ya = y(!1), ui = () => {
|
|
1257
|
+
const [e, t] = R(ya);
|
|
1256
1258
|
return [e, t];
|
|
1257
|
-
},
|
|
1259
|
+
}, va = () => {
|
|
1258
1260
|
const e = q(), t = L(Q), [, s] = Ce();
|
|
1259
|
-
return
|
|
1261
|
+
return A(
|
|
1260
1262
|
(o, n = null) => {
|
|
1261
1263
|
const r = [];
|
|
1262
1264
|
ce(o, (i) => {
|
|
1263
|
-
const
|
|
1264
|
-
r.push(
|
|
1265
|
+
const p = Po(t, i, n === i ? null : n);
|
|
1266
|
+
r.push(E(p, "0._id", "")), e({ type: "add_duplicate_blocks", payload: p });
|
|
1265
1267
|
}), s(r), e({ type: "create_snapshot" });
|
|
1266
1268
|
},
|
|
1267
1269
|
[t, s, e]
|
|
1268
1270
|
);
|
|
1269
|
-
},
|
|
1270
|
-
const [e, t] =
|
|
1271
|
+
}, wa = y([]), mi = () => {
|
|
1272
|
+
const [e, t] = R(wa), s = A(
|
|
1271
1273
|
(o) => {
|
|
1272
1274
|
t((n) => G(n, o) ? Ft(n, o) : [...n, o]);
|
|
1273
1275
|
},
|
|
1274
1276
|
[t]
|
|
1275
1277
|
);
|
|
1276
1278
|
return [e, t, s];
|
|
1277
|
-
},
|
|
1279
|
+
}, Na = y(""), ka = () => R(Na), pi = () => {
|
|
1278
1280
|
const e = L(Q), t = q(), s = ds(), [, , o] = Ho();
|
|
1279
|
-
return
|
|
1281
|
+
return A(
|
|
1280
1282
|
async (n, r) => {
|
|
1281
|
-
const i = le(16), u =
|
|
1283
|
+
const i = le(16), u = V(e, (p) => (p._id === n && (p._globalBlockId = i, p._name = r), p));
|
|
1282
1284
|
t({ type: "set_page_blocks", payload: u }), o();
|
|
1283
1285
|
},
|
|
1284
1286
|
[e, t, s, o]
|
|
1285
1287
|
);
|
|
1286
|
-
},
|
|
1288
|
+
}, fi = () => ({}), Sa = () => {
|
|
1287
1289
|
const e = L(Q), t = q();
|
|
1288
|
-
return
|
|
1290
|
+
return A(
|
|
1289
1291
|
(s, o) => {
|
|
1290
|
-
const n =
|
|
1292
|
+
const n = V(e, (r) => (G(s, E(r, "_id")) && fe(r, "_parent", o), r));
|
|
1291
1293
|
t({ type: "set_blocks", payload: n });
|
|
1292
1294
|
},
|
|
1293
1295
|
[e, t]
|
|
1294
1296
|
);
|
|
1295
|
-
},
|
|
1296
|
-
const e = L(xt), [t, s] =
|
|
1297
|
+
}, gi = () => {
|
|
1298
|
+
const e = L(xt), [t, s] = ha(), o = va(), n = Sa();
|
|
1297
1299
|
return {
|
|
1298
1300
|
canPaste: Fs(
|
|
1299
1301
|
() => t.length > 0 || e.length > 0,
|
|
1300
1302
|
[e, t]
|
|
1301
1303
|
),
|
|
1302
|
-
pasteBlocks:
|
|
1304
|
+
pasteBlocks: A(
|
|
1303
1305
|
(i) => {
|
|
1304
1306
|
oe(e) ? n(t, i) : o(e, i), s(() => []);
|
|
1305
1307
|
},
|
|
1306
1308
|
[t, e, o, n, s]
|
|
1307
1309
|
)
|
|
1308
1310
|
};
|
|
1309
|
-
},
|
|
1310
|
-
const e = L(
|
|
1311
|
-
}, []), s =
|
|
1312
|
-
}, []), o =
|
|
1311
|
+
}, ja = y(""), bi = () => {
|
|
1312
|
+
const e = L(ja), t = A(() => {
|
|
1313
|
+
}, []), s = A(() => {
|
|
1314
|
+
}, []), o = A(() => {
|
|
1313
1315
|
}, []);
|
|
1314
1316
|
return { currentProject: e, createProject: o, deleteProject: t, updateProject: s };
|
|
1315
1317
|
}, xs = (e, t) => {
|
|
1316
|
-
const s = [], o =
|
|
1318
|
+
const s = [], o = I(e, (n) => G(t, n._id) || G(t, n._parent) ? (s.push(n._id), !1) : !0);
|
|
1317
1319
|
return oe(s) ? o : xs(o, s);
|
|
1318
|
-
},
|
|
1320
|
+
}, xi = () => {
|
|
1319
1321
|
const e = q(), t = L(Q), [s, o] = Ce();
|
|
1320
|
-
return
|
|
1322
|
+
return A(
|
|
1321
1323
|
(n) => {
|
|
1322
1324
|
var u;
|
|
1323
1325
|
const r = ((u = te(t, { _id: n[0] })) == null ? void 0 : u._parent) || null, i = xs(t, n);
|
|
@@ -1326,7 +1328,7 @@ const ci = () => {
|
|
|
1326
1328
|
[t, o, e, s]
|
|
1327
1329
|
);
|
|
1328
1330
|
}, Aa = y(null, (e, t, { blockIds: s, fullClasses: o, dispatch: n }) => {
|
|
1329
|
-
const r = se(e(_e)), i =
|
|
1331
|
+
const r = se(e(_e)), i = I(
|
|
1330
1332
|
e(lt),
|
|
1331
1333
|
(u) => (
|
|
1332
1334
|
// @ts-ignore
|
|
@@ -1334,29 +1336,29 @@ const ci = () => {
|
|
|
1334
1336
|
)
|
|
1335
1337
|
);
|
|
1336
1338
|
ce(i, (u) => {
|
|
1337
|
-
const
|
|
1338
|
-
let { classes:
|
|
1339
|
+
const p = e(u), l = o;
|
|
1340
|
+
let { classes: b, baseClasses: w } = _o(E(p, r.prop, "styles:,"));
|
|
1339
1341
|
ce(l, (k) => {
|
|
1340
|
-
const
|
|
1341
|
-
|
|
1342
|
+
const D = new RegExp(`(^| )${k.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
|
|
1343
|
+
b = b.replace(D, " ").replace(/ +/g, " ").trim();
|
|
1342
1344
|
const F = se(k.split(":"));
|
|
1343
1345
|
G(["2xl", "xl", "lg", "md", "sm"], F) && l.push(k.split(":").pop().trim());
|
|
1344
1346
|
}), ce(l, (k) => {
|
|
1345
|
-
const
|
|
1346
|
-
w = w.replace(
|
|
1347
|
+
const D = new RegExp(`(^| )${k.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
|
|
1348
|
+
w = w.replace(D, " ").replace(/ +/g, " ").trim();
|
|
1347
1349
|
}), n({
|
|
1348
1350
|
type: "update_props_realtime",
|
|
1349
1351
|
payload: {
|
|
1350
|
-
ids: [
|
|
1352
|
+
ids: [p._id],
|
|
1351
1353
|
props: {
|
|
1352
|
-
[r.prop]: `${ge}${w},${
|
|
1354
|
+
[r.prop]: `${ge}${w},${b}`
|
|
1353
1355
|
}
|
|
1354
1356
|
}
|
|
1355
1357
|
});
|
|
1356
1358
|
});
|
|
1357
|
-
}),
|
|
1359
|
+
}), hi = () => {
|
|
1358
1360
|
const e = q(), t = de(Aa);
|
|
1359
|
-
return
|
|
1361
|
+
return A(
|
|
1360
1362
|
(s, o) => {
|
|
1361
1363
|
t({ blockIds: s, fullClasses: o, dispatch: e }), setTimeout(() => e({ type: "create_snapshot" }));
|
|
1362
1364
|
},
|
|
@@ -1364,15 +1366,15 @@ const ci = () => {
|
|
|
1364
1366
|
);
|
|
1365
1367
|
}, hs = y((e) => {
|
|
1366
1368
|
const t = se(e(_e)), s = e(ut);
|
|
1367
|
-
if (!t || t.blockId !==
|
|
1369
|
+
if (!t || t.blockId !== E(s, "_id", null))
|
|
1368
1370
|
return [];
|
|
1369
|
-
const n =
|
|
1370
|
-
return
|
|
1371
|
-
}),
|
|
1372
|
-
const t = e(fs), s = e(mt), o = e(bs), n =
|
|
1373
|
-
let r =
|
|
1374
|
-
return Wt(s, "_") || (r =
|
|
1375
|
-
}),
|
|
1371
|
+
const n = E(s, t.prop, `${ge},`).replace(ge, "").split(",").join(" ");
|
|
1372
|
+
return I(V(n.trim().split(" "), Pe), (r) => !qe(r));
|
|
1373
|
+
}), yi = () => L(hs), Et = { xs: 0, sm: 1, md: 2, lg: 3, xl: 4, "2xl": 5 }, Ca = y((e) => {
|
|
1374
|
+
const t = e(fs), s = e(mt), o = e(bs), n = _a(t);
|
|
1375
|
+
let r = I(e(hs), { mod: s });
|
|
1376
|
+
return Wt(s, "_") || (r = I(r, (i) => n.includes(i.mq))), r = r.sort((i, u) => Et[i.mq] - Et[u.mq]), o || (r = I(r, { dark: !1 })), r;
|
|
1377
|
+
}), _a = (e) => {
|
|
1376
1378
|
let t = [];
|
|
1377
1379
|
switch (e) {
|
|
1378
1380
|
case "xs":
|
|
@@ -1398,22 +1400,22 @@ const ci = () => {
|
|
|
1398
1400
|
break;
|
|
1399
1401
|
}
|
|
1400
1402
|
return t;
|
|
1401
|
-
},
|
|
1403
|
+
}, vi = () => L(Ca), wi = () => R(mt), ys = y(null, (e, t, { blockIds: s, props: o, dispatch: n }) => {
|
|
1402
1404
|
n({
|
|
1403
1405
|
type: "update_props_realtime",
|
|
1404
1406
|
payload: { ids: s, props: o }
|
|
1405
1407
|
});
|
|
1406
|
-
}),
|
|
1408
|
+
}), Ni = () => {
|
|
1407
1409
|
const { createSnapshot: e } = bt(), t = q(), s = de(ys);
|
|
1408
|
-
return
|
|
1410
|
+
return A(
|
|
1409
1411
|
(o, n) => {
|
|
1410
1412
|
s({ blockIds: o, props: n, dispatch: t }), e();
|
|
1411
1413
|
},
|
|
1412
1414
|
[e, t, s]
|
|
1413
1415
|
);
|
|
1414
|
-
},
|
|
1416
|
+
}, ki = () => {
|
|
1415
1417
|
const e = q(), t = de(ys);
|
|
1416
|
-
return
|
|
1418
|
+
return A(
|
|
1417
1419
|
(s, o) => {
|
|
1418
1420
|
t({ blockIds: s, props: o, dispatch: e });
|
|
1419
1421
|
},
|
|
@@ -1424,15 +1426,15 @@ const ci = () => {
|
|
|
1424
1426
|
props: {},
|
|
1425
1427
|
modalProps: {},
|
|
1426
1428
|
backdropClose: !0
|
|
1427
|
-
},
|
|
1428
|
-
const [e, t] =
|
|
1429
|
+
}, Ba = y(vs), Si = () => {
|
|
1430
|
+
const [e, t] = R(Ba), s = A(
|
|
1429
1431
|
(n, r = {}, i = {}) => {
|
|
1430
1432
|
t({ name: n, props: r, modalProps: i });
|
|
1431
1433
|
},
|
|
1432
1434
|
[t]
|
|
1433
|
-
), o =
|
|
1435
|
+
), o = A(
|
|
1434
1436
|
(...n) => {
|
|
1435
|
-
|
|
1437
|
+
E(e, "props.onClose", () => {
|
|
1436
1438
|
})(...n), t(vs);
|
|
1437
1439
|
},
|
|
1438
1440
|
[t, e]
|
|
@@ -1442,34 +1444,31 @@ const ci = () => {
|
|
|
1442
1444
|
openModal: s,
|
|
1443
1445
|
closeModal: o
|
|
1444
1446
|
};
|
|
1445
|
-
},
|
|
1446
|
-
const [e, t] =
|
|
1447
|
+
}, ji = () => L(us), Ra = y(""), Pa = y(null), Ai = () => R(Ra), Ci = () => R(Pa), Ta = Ae("selectedBreakpoints", ["XS", "MD", "XL"]), _i = () => {
|
|
1448
|
+
const [e, t] = R(Ta);
|
|
1447
1449
|
return [e, t];
|
|
1448
|
-
},
|
|
1449
|
-
const e = de(ze), { clear: t } = bt(), [, s] = Ce(), [, o] =
|
|
1450
|
+
}, Bi = () => {
|
|
1451
|
+
const e = de(ze), { clear: t } = bt(), [, s] = Ce(), [, o] = ka(), [, n] = ns();
|
|
1450
1452
|
return () => {
|
|
1451
1453
|
s([]), n([]), o(""), t(), e({ undoCount: 0, redoCount: 0 });
|
|
1452
1454
|
};
|
|
1453
|
-
},
|
|
1454
|
-
const [e, t] =
|
|
1455
|
+
}, Ia = y({ en: {} }), Ri = () => {
|
|
1456
|
+
const [e, t] = R(Ia), s = A(
|
|
1455
1457
|
(o, n, r) => {
|
|
1456
1458
|
fe(e, `${o}.${n}`, r), t(e);
|
|
1457
1459
|
},
|
|
1458
1460
|
[e, t]
|
|
1459
1461
|
);
|
|
1460
1462
|
return [e, s];
|
|
1461
|
-
},
|
|
1462
|
-
const [s] =
|
|
1463
|
-
return
|
|
1464
|
-
},
|
|
1465
|
-
const [e, t] = De(!1), [s, o] =
|
|
1466
|
-
return
|
|
1463
|
+
}, Pi = (e, t) => {
|
|
1464
|
+
const [s] = R(it);
|
|
1465
|
+
return E(s, e, t);
|
|
1466
|
+
}, Ma = y([]), Ti = () => {
|
|
1467
|
+
const [e, t] = De(!1), [s, o] = R(Ma), n = ve("getUILibraryBlocks", () => []);
|
|
1468
|
+
return je(() => {
|
|
1467
1469
|
(async () => s.length > 0 || (t(!0), o(await n()), t(!1)))();
|
|
1468
1470
|
}, []), { data: s, isLoading: e };
|
|
1469
|
-
},
|
|
1470
|
-
const [s] = La(), o = `${e}${s ? `-${s}` : ""}`;
|
|
1471
|
-
return { content: P(t, o, P(t, e, "")), propKey: e };
|
|
1472
|
-
}, Oa = be(
|
|
1471
|
+
}, Da = be(
|
|
1473
1472
|
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
1474
1473
|
{
|
|
1475
1474
|
variants: {
|
|
@@ -1488,9 +1487,9 @@ const ci = () => {
|
|
|
1488
1487
|
size: "default"
|
|
1489
1488
|
}
|
|
1490
1489
|
}
|
|
1491
|
-
),
|
|
1492
|
-
|
|
1493
|
-
const
|
|
1490
|
+
), Ea = m.forwardRef(({ className: e, variant: t, size: s, ...o }, n) => /* @__PURE__ */ a.jsx(zt.Root, { ref: n, className: c(Da({ variant: t, size: s, className: e })), ...o }));
|
|
1491
|
+
Ea.displayName = zt.Root.displayName;
|
|
1492
|
+
const La = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1494
1493
|
He.Root,
|
|
1495
1494
|
{
|
|
1496
1495
|
className: c(
|
|
@@ -1509,7 +1508,7 @@ const $a = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1509
1508
|
)
|
|
1510
1509
|
}
|
|
1511
1510
|
));
|
|
1512
|
-
|
|
1511
|
+
La.displayName = He.Root.displayName;
|
|
1513
1512
|
const ht = be(
|
|
1514
1513
|
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
1515
1514
|
{
|
|
@@ -1534,16 +1533,16 @@ const ht = be(
|
|
|
1534
1533
|
size: "default"
|
|
1535
1534
|
}
|
|
1536
1535
|
}
|
|
1537
|
-
),
|
|
1536
|
+
), Oa = m.forwardRef(
|
|
1538
1537
|
({ className: e, variant: t, size: s, asChild: o = !1, ...n }, r) => {
|
|
1539
1538
|
const i = o ? Ws : "button";
|
|
1540
1539
|
return /* @__PURE__ */ a.jsx(i, { className: c(ht({ variant: t, size: s, className: e })), ref: r, ...n });
|
|
1541
1540
|
}
|
|
1542
1541
|
);
|
|
1543
|
-
|
|
1544
|
-
const
|
|
1545
|
-
|
|
1546
|
-
const
|
|
1542
|
+
Oa.displayName = "Button";
|
|
1543
|
+
const Ii = pe.Root, za = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(pe.Item, { ref: s, className: c("border-b", e), ...t }));
|
|
1544
|
+
za.displayName = "AccordionItem";
|
|
1545
|
+
const Va = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsx(pe.Header, { className: "flex", children: /* @__PURE__ */ a.jsxs(
|
|
1547
1546
|
pe.Trigger,
|
|
1548
1547
|
{
|
|
1549
1548
|
ref: o,
|
|
@@ -1558,8 +1557,8 @@ const Ga = p.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1558
1557
|
]
|
|
1559
1558
|
}
|
|
1560
1559
|
) }));
|
|
1561
|
-
|
|
1562
|
-
const
|
|
1560
|
+
Va.displayName = pe.Trigger.displayName;
|
|
1561
|
+
const $a = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1563
1562
|
pe.Content,
|
|
1564
1563
|
{
|
|
1565
1564
|
ref: o,
|
|
@@ -1571,8 +1570,8 @@ const Wa = p.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1571
1570
|
children: /* @__PURE__ */ a.jsx("div", { className: "pb-4 pt-0", children: t })
|
|
1572
1571
|
}
|
|
1573
1572
|
));
|
|
1574
|
-
|
|
1575
|
-
const
|
|
1573
|
+
$a.displayName = pe.Content.displayName;
|
|
1574
|
+
const Fa = be(
|
|
1576
1575
|
"relative w-full rounded-lg border px-4 py-3 text-sm [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
1577
1576
|
{
|
|
1578
1577
|
variants: {
|
|
@@ -1585,17 +1584,17 @@ const Ua = be(
|
|
|
1585
1584
|
variant: "default"
|
|
1586
1585
|
}
|
|
1587
1586
|
}
|
|
1588
|
-
),
|
|
1589
|
-
|
|
1590
|
-
const
|
|
1587
|
+
), Ga = m.forwardRef(({ className: e, variant: t, ...s }, o) => /* @__PURE__ */ a.jsx("div", { ref: o, role: "alert", className: c(Fa({ variant: t }), e), ...s }));
|
|
1588
|
+
Ga.displayName = "Alert";
|
|
1589
|
+
const Wa = m.forwardRef(
|
|
1591
1590
|
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("h5", { ref: s, className: c("mb-1 font-medium leading-none tracking-tight", e), ...t })
|
|
1592
1591
|
);
|
|
1593
|
-
|
|
1594
|
-
const
|
|
1592
|
+
Wa.displayName = "AlertTitle";
|
|
1593
|
+
const Ua = m.forwardRef(
|
|
1595
1594
|
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: c("text-sm [&_p]:leading-relaxed", e), ...t })
|
|
1596
1595
|
);
|
|
1597
|
-
|
|
1598
|
-
const
|
|
1596
|
+
Ua.displayName = "AlertDescription";
|
|
1597
|
+
const Ha = be(
|
|
1599
1598
|
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
1600
1599
|
{
|
|
1601
1600
|
variants: {
|
|
@@ -1610,10 +1609,10 @@ const Ja = be(
|
|
|
1610
1609
|
variant: "default"
|
|
1611
1610
|
}
|
|
1612
1611
|
}
|
|
1613
|
-
),
|
|
1614
|
-
ws.displayName =
|
|
1615
|
-
const Ns =
|
|
1616
|
-
|
|
1612
|
+
), Mi = ({ className: e, variant: t, ...s }) => /* @__PURE__ */ a.jsx("div", { className: c(Ha({ variant: t }), e), ...s }), Di = $.Root, Ei = $.Trigger, ws = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx($.Portal, { className: c(e), ...t });
|
|
1613
|
+
ws.displayName = $.Portal.displayName;
|
|
1614
|
+
const Ns = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1615
|
+
$.Overlay,
|
|
1617
1616
|
{
|
|
1618
1617
|
className: c(
|
|
1619
1618
|
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
@@ -1623,11 +1622,11 @@ const Ns = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1623
1622
|
ref: s
|
|
1624
1623
|
}
|
|
1625
1624
|
));
|
|
1626
|
-
Ns.displayName =
|
|
1627
|
-
const
|
|
1625
|
+
Ns.displayName = $.Overlay.displayName;
|
|
1626
|
+
const qa = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs(ws, { children: [
|
|
1628
1627
|
/* @__PURE__ */ a.jsx(Ns, {}),
|
|
1629
1628
|
/* @__PURE__ */ a.jsx(
|
|
1630
|
-
|
|
1629
|
+
$.Content,
|
|
1631
1630
|
{
|
|
1632
1631
|
ref: s,
|
|
1633
1632
|
className: c(
|
|
@@ -1638,30 +1637,30 @@ const Ya = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs(ws
|
|
|
1638
1637
|
}
|
|
1639
1638
|
)
|
|
1640
1639
|
] }));
|
|
1641
|
-
|
|
1642
|
-
const
|
|
1643
|
-
|
|
1644
|
-
const
|
|
1645
|
-
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1648
|
-
const
|
|
1649
|
-
|
|
1650
|
-
const
|
|
1651
|
-
|
|
1652
|
-
const
|
|
1653
|
-
|
|
1640
|
+
qa.displayName = $.Content.displayName;
|
|
1641
|
+
const Ka = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: c("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
|
|
1642
|
+
Ka.displayName = "AlertDialogHeader";
|
|
1643
|
+
const Ja = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: c("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
1644
|
+
Ja.displayName = "AlertDialogFooter";
|
|
1645
|
+
const Ya = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx($.Title, { ref: s, className: c("text-lg font-semibold", e), ...t }));
|
|
1646
|
+
Ya.displayName = $.Title.displayName;
|
|
1647
|
+
const Qa = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx($.Description, { ref: s, className: c("text-sm text-muted-foreground", e), ...t }));
|
|
1648
|
+
Qa.displayName = $.Description.displayName;
|
|
1649
|
+
const Xa = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx($.Action, { ref: s, className: c(ht(), e), ...t }));
|
|
1650
|
+
Xa.displayName = $.Action.displayName;
|
|
1651
|
+
const Za = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1652
|
+
$.Cancel,
|
|
1654
1653
|
{
|
|
1655
1654
|
ref: s,
|
|
1656
1655
|
className: c(ht({ variant: "outline" }), "mt-2 sm:mt-0", e),
|
|
1657
1656
|
...t
|
|
1658
1657
|
}
|
|
1659
1658
|
));
|
|
1660
|
-
|
|
1661
|
-
const ks =
|
|
1662
|
-
Ss.displayName =
|
|
1663
|
-
const
|
|
1664
|
-
|
|
1659
|
+
Za.displayName = $.Cancel.displayName;
|
|
1660
|
+
const ks = B.Root, en = B.Trigger, Ss = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(B.Portal, { className: c(e), ...t });
|
|
1661
|
+
Ss.displayName = B.Portal.displayName;
|
|
1662
|
+
const js = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1663
|
+
B.Overlay,
|
|
1665
1664
|
{
|
|
1666
1665
|
ref: s,
|
|
1667
1666
|
className: c(
|
|
@@ -1671,11 +1670,11 @@ const As = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1671
1670
|
...t
|
|
1672
1671
|
}
|
|
1673
1672
|
));
|
|
1674
|
-
|
|
1675
|
-
const yt =
|
|
1676
|
-
/* @__PURE__ */ a.jsx(
|
|
1673
|
+
js.displayName = B.Overlay.displayName;
|
|
1674
|
+
const yt = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(Ss, { children: [
|
|
1675
|
+
/* @__PURE__ */ a.jsx(js, {}),
|
|
1677
1676
|
/* @__PURE__ */ a.jsxs(
|
|
1678
|
-
|
|
1677
|
+
B.Content,
|
|
1679
1678
|
{
|
|
1680
1679
|
ref: o,
|
|
1681
1680
|
className: c(
|
|
@@ -1685,7 +1684,7 @@ const yt = p.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1685
1684
|
...s,
|
|
1686
1685
|
children: [
|
|
1687
1686
|
t,
|
|
1688
|
-
/* @__PURE__ */ a.jsxs(
|
|
1687
|
+
/* @__PURE__ */ a.jsxs(B.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
1689
1688
|
/* @__PURE__ */ a.jsx(tt, { className: "h-4 w-4" }),
|
|
1690
1689
|
/* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
|
|
1691
1690
|
] })
|
|
@@ -1693,45 +1692,45 @@ const yt = p.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1693
1692
|
}
|
|
1694
1693
|
)
|
|
1695
1694
|
] }));
|
|
1696
|
-
yt.displayName =
|
|
1697
|
-
const
|
|
1698
|
-
|
|
1699
|
-
const
|
|
1700
|
-
|
|
1701
|
-
const
|
|
1702
|
-
|
|
1695
|
+
yt.displayName = B.Content.displayName;
|
|
1696
|
+
const tn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: c("flex flex-col space-y-1.5 text-center sm:text-left", e), ...t });
|
|
1697
|
+
tn.displayName = "DialogHeader";
|
|
1698
|
+
const sn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: c("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
1699
|
+
sn.displayName = "DialogFooter";
|
|
1700
|
+
const on = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1701
|
+
B.Title,
|
|
1703
1702
|
{
|
|
1704
1703
|
ref: s,
|
|
1705
1704
|
className: c("text-lg font-semibold leading-none tracking-tight", e),
|
|
1706
1705
|
...t
|
|
1707
1706
|
}
|
|
1708
1707
|
));
|
|
1709
|
-
|
|
1710
|
-
const
|
|
1711
|
-
|
|
1712
|
-
const
|
|
1713
|
-
|
|
1714
|
-
const
|
|
1708
|
+
on.displayName = B.Title.displayName;
|
|
1709
|
+
const an = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(B.Description, { ref: s, className: c("text-sm text-muted-foreground", e), ...t }));
|
|
1710
|
+
an.displayName = B.Description.displayName;
|
|
1711
|
+
const nn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: c("rounded-xl border bg-card text-card-foreground shadow", e), ...t }));
|
|
1712
|
+
nn.displayName = "Card";
|
|
1713
|
+
const rn = m.forwardRef(
|
|
1715
1714
|
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: c("flex flex-col space-y-1.5 p-6", e), ...t })
|
|
1716
1715
|
);
|
|
1717
|
-
|
|
1718
|
-
const
|
|
1716
|
+
rn.displayName = "CardHeader";
|
|
1717
|
+
const ln = m.forwardRef(
|
|
1719
1718
|
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("h3", { ref: s, className: c("font-semibold leading-none tracking-tight", e), ...t })
|
|
1720
1719
|
);
|
|
1721
|
-
|
|
1722
|
-
const
|
|
1720
|
+
ln.displayName = "CardTitle";
|
|
1721
|
+
const cn = m.forwardRef(
|
|
1723
1722
|
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("p", { ref: s, className: c("text-sm text-muted-foreground", e), ...t })
|
|
1724
1723
|
);
|
|
1725
|
-
|
|
1726
|
-
const
|
|
1724
|
+
cn.displayName = "CardDescription";
|
|
1725
|
+
const dn = m.forwardRef(
|
|
1727
1726
|
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: c("p-6 pt-0", e), ...t })
|
|
1728
1727
|
);
|
|
1729
|
-
|
|
1730
|
-
const
|
|
1728
|
+
dn.displayName = "CardContent";
|
|
1729
|
+
const un = m.forwardRef(
|
|
1731
1730
|
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: c(" flex items-center p-6 pt-0", e), ...t })
|
|
1732
1731
|
);
|
|
1733
|
-
|
|
1734
|
-
const
|
|
1732
|
+
un.displayName = "CardFooter";
|
|
1733
|
+
const mn = m.forwardRef(({ className: e, type: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1735
1734
|
"input",
|
|
1736
1735
|
{
|
|
1737
1736
|
type: t,
|
|
@@ -1743,10 +1742,10 @@ const gn = p.forwardRef(({ className: e, type: t, ...s }, o) => /* @__PURE__ */
|
|
|
1743
1742
|
...s
|
|
1744
1743
|
}
|
|
1745
1744
|
));
|
|
1746
|
-
|
|
1747
|
-
const
|
|
1748
|
-
|
|
1749
|
-
const
|
|
1745
|
+
mn.displayName = "Input";
|
|
1746
|
+
const pn = be("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"), fn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Vt.Root, { ref: s, className: c(pn(), e), ...t }));
|
|
1747
|
+
fn.displayName = Vt.Root.displayName;
|
|
1748
|
+
const gn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1750
1749
|
"textarea",
|
|
1751
1750
|
{
|
|
1752
1751
|
className: c(
|
|
@@ -1757,14 +1756,14 @@ const hn = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1757
1756
|
...t
|
|
1758
1757
|
}
|
|
1759
1758
|
));
|
|
1760
|
-
|
|
1761
|
-
const
|
|
1759
|
+
gn.displayName = "Textarea";
|
|
1760
|
+
const bn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(me.Root, { ref: o, className: c("relative overflow-hidden", e), ...s, children: [
|
|
1762
1761
|
/* @__PURE__ */ a.jsx(me.Viewport, { className: "h-full w-full rounded-[inherit]", children: t }),
|
|
1763
|
-
/* @__PURE__ */ a.jsx(
|
|
1762
|
+
/* @__PURE__ */ a.jsx(As, {}),
|
|
1764
1763
|
/* @__PURE__ */ a.jsx(me.Corner, {})
|
|
1765
1764
|
] }));
|
|
1766
|
-
|
|
1767
|
-
const
|
|
1765
|
+
bn.displayName = me.Root.displayName;
|
|
1766
|
+
const As = m.forwardRef(({ className: e, orientation: t = "vertical", ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1768
1767
|
me.ScrollAreaScrollbar,
|
|
1769
1768
|
{
|
|
1770
1769
|
ref: o,
|
|
@@ -1779,8 +1778,8 @@ const js = p.forwardRef(({ className: e, orientation: t = "vertical", ...s }, o)
|
|
|
1779
1778
|
children: /* @__PURE__ */ a.jsx(me.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
1780
1779
|
}
|
|
1781
1780
|
));
|
|
1782
|
-
|
|
1783
|
-
const
|
|
1781
|
+
As.displayName = me.ScrollAreaScrollbar.displayName;
|
|
1782
|
+
const xn = xe.Root, Cs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1784
1783
|
xe.List,
|
|
1785
1784
|
{
|
|
1786
1785
|
ref: s,
|
|
@@ -1792,7 +1791,7 @@ const vn = xe.Root, Cs = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE_
|
|
|
1792
1791
|
}
|
|
1793
1792
|
));
|
|
1794
1793
|
Cs.displayName = xe.List.displayName;
|
|
1795
|
-
const Xe =
|
|
1794
|
+
const Xe = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1796
1795
|
xe.Trigger,
|
|
1797
1796
|
{
|
|
1798
1797
|
ref: s,
|
|
@@ -1804,7 +1803,7 @@ const Xe = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1804
1803
|
}
|
|
1805
1804
|
));
|
|
1806
1805
|
Xe.displayName = xe.Trigger.displayName;
|
|
1807
|
-
const Ze =
|
|
1806
|
+
const Ze = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1808
1807
|
xe.Content,
|
|
1809
1808
|
{
|
|
1810
1809
|
ref: s,
|
|
@@ -1816,7 +1815,7 @@ const Ze = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1816
1815
|
}
|
|
1817
1816
|
));
|
|
1818
1817
|
Ze.displayName = xe.Content.displayName;
|
|
1819
|
-
const
|
|
1818
|
+
const Li = we.Portal, Oi = we.Provider, zi = we.Root, Vi = we.Trigger, hn = m.forwardRef(({ className: e, sideOffset: t = 4, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1820
1819
|
we.Content,
|
|
1821
1820
|
{
|
|
1822
1821
|
ref: o,
|
|
@@ -1828,8 +1827,8 @@ const Gi = we.Portal, Wi = we.Provider, Ui = we.Root, Hi = we.Trigger, wn = p.fo
|
|
|
1828
1827
|
...s
|
|
1829
1828
|
}
|
|
1830
1829
|
));
|
|
1831
|
-
|
|
1832
|
-
const
|
|
1830
|
+
hn.displayName = we.Content.displayName;
|
|
1831
|
+
const $i = Se.Root, Fi = Se.Trigger, yn = m.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...o }, n) => /* @__PURE__ */ a.jsx(Se.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
1833
1832
|
Se.Content,
|
|
1834
1833
|
{
|
|
1835
1834
|
ref: n,
|
|
@@ -1842,18 +1841,18 @@ const qi = Se.Root, Ki = Se.Trigger, Nn = p.forwardRef(({ className: e, align: t
|
|
|
1842
1841
|
...o
|
|
1843
1842
|
}
|
|
1844
1843
|
) }));
|
|
1845
|
-
|
|
1846
|
-
const
|
|
1847
|
-
|
|
1844
|
+
yn.displayName = Se.Content.displayName;
|
|
1845
|
+
const Gi = C.Menu, Wi = C.Group, Ui = C.Portal, Hi = C.Sub, qi = C.RadioGroup, vn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1846
|
+
C.Root,
|
|
1848
1847
|
{
|
|
1849
1848
|
ref: s,
|
|
1850
1849
|
className: c("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm", e),
|
|
1851
1850
|
...t
|
|
1852
1851
|
}
|
|
1853
1852
|
));
|
|
1854
|
-
|
|
1855
|
-
const
|
|
1856
|
-
|
|
1853
|
+
vn.displayName = C.Root.displayName;
|
|
1854
|
+
const wn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1855
|
+
C.Trigger,
|
|
1857
1856
|
{
|
|
1858
1857
|
ref: s,
|
|
1859
1858
|
className: c(
|
|
@@ -1863,9 +1862,9 @@ const Sn = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1863
1862
|
...t
|
|
1864
1863
|
}
|
|
1865
1864
|
));
|
|
1866
|
-
|
|
1867
|
-
const
|
|
1868
|
-
|
|
1865
|
+
wn.displayName = C.Trigger.displayName;
|
|
1866
|
+
const Nn = m.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
1867
|
+
C.SubTrigger,
|
|
1869
1868
|
{
|
|
1870
1869
|
ref: n,
|
|
1871
1870
|
className: c(
|
|
@@ -1880,9 +1879,9 @@ const An = p.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /*
|
|
|
1880
1879
|
]
|
|
1881
1880
|
}
|
|
1882
1881
|
));
|
|
1883
|
-
|
|
1884
|
-
const
|
|
1885
|
-
|
|
1882
|
+
Nn.displayName = C.SubTrigger.displayName;
|
|
1883
|
+
const kn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1884
|
+
C.SubContent,
|
|
1886
1885
|
{
|
|
1887
1886
|
ref: s,
|
|
1888
1887
|
className: c(
|
|
@@ -1892,9 +1891,9 @@ const jn = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1892
1891
|
...t
|
|
1893
1892
|
}
|
|
1894
1893
|
));
|
|
1895
|
-
|
|
1896
|
-
const
|
|
1897
|
-
|
|
1894
|
+
kn.displayName = C.SubContent.displayName;
|
|
1895
|
+
const Sn = m.forwardRef(({ className: e, align: t = "start", alignOffset: s = -4, sideOffset: o = 8, ...n }, r) => /* @__PURE__ */ a.jsx(C.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
1896
|
+
C.Content,
|
|
1898
1897
|
{
|
|
1899
1898
|
ref: r,
|
|
1900
1899
|
align: t,
|
|
@@ -1907,9 +1906,9 @@ const Cn = p.forwardRef(({ className: e, align: t = "start", alignOffset: s = -4
|
|
|
1907
1906
|
...n
|
|
1908
1907
|
}
|
|
1909
1908
|
) }));
|
|
1910
|
-
|
|
1911
|
-
const
|
|
1912
|
-
|
|
1909
|
+
Sn.displayName = C.Content.displayName;
|
|
1910
|
+
const jn = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1911
|
+
C.Item,
|
|
1913
1912
|
{
|
|
1914
1913
|
ref: o,
|
|
1915
1914
|
className: c(
|
|
@@ -1920,9 +1919,9 @@ const _n = p.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */
|
|
|
1920
1919
|
...s
|
|
1921
1920
|
}
|
|
1922
1921
|
));
|
|
1923
|
-
|
|
1924
|
-
const
|
|
1925
|
-
|
|
1922
|
+
jn.displayName = C.Item.displayName;
|
|
1923
|
+
const An = m.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
1924
|
+
C.CheckboxItem,
|
|
1926
1925
|
{
|
|
1927
1926
|
ref: n,
|
|
1928
1927
|
className: c(
|
|
@@ -1932,14 +1931,14 @@ const Bn = p.forwardRef(({ className: e, children: t, checked: s, ...o }, n) =>
|
|
|
1932
1931
|
checked: s,
|
|
1933
1932
|
...o,
|
|
1934
1933
|
children: [
|
|
1935
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
1934
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(C.ItemIndicator, { children: /* @__PURE__ */ a.jsx(Ee, { className: "h-4 w-4" }) }) }),
|
|
1936
1935
|
t
|
|
1937
1936
|
]
|
|
1938
1937
|
}
|
|
1939
1938
|
));
|
|
1940
|
-
|
|
1941
|
-
const
|
|
1942
|
-
|
|
1939
|
+
An.displayName = C.CheckboxItem.displayName;
|
|
1940
|
+
const Cn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
1941
|
+
C.RadioItem,
|
|
1943
1942
|
{
|
|
1944
1943
|
ref: o,
|
|
1945
1944
|
className: c(
|
|
@@ -1948,26 +1947,26 @@ const Rn = p.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1948
1947
|
),
|
|
1949
1948
|
...s,
|
|
1950
1949
|
children: [
|
|
1951
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
1950
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(C.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ot, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1952
1951
|
t
|
|
1953
1952
|
]
|
|
1954
1953
|
}
|
|
1955
1954
|
));
|
|
1956
|
-
|
|
1957
|
-
const
|
|
1958
|
-
|
|
1955
|
+
Cn.displayName = C.RadioItem.displayName;
|
|
1956
|
+
const _n = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1957
|
+
C.Label,
|
|
1959
1958
|
{
|
|
1960
1959
|
ref: o,
|
|
1961
1960
|
className: c("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
|
|
1962
1961
|
...s
|
|
1963
1962
|
}
|
|
1964
1963
|
));
|
|
1965
|
-
|
|
1966
|
-
const
|
|
1967
|
-
|
|
1968
|
-
const
|
|
1969
|
-
|
|
1970
|
-
const
|
|
1964
|
+
_n.displayName = C.Label.displayName;
|
|
1965
|
+
const Bn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(C.Separator, { ref: s, className: c("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
1966
|
+
Bn.displayName = C.Separator.displayName;
|
|
1967
|
+
const Rn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: c("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
|
|
1968
|
+
Rn.displayname = "MenubarShortcut";
|
|
1969
|
+
const Ki = Le.Root, Ji = Le.Trigger, Pn = m.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...o }, n) => /* @__PURE__ */ a.jsx(
|
|
1971
1970
|
Le.Content,
|
|
1972
1971
|
{
|
|
1973
1972
|
ref: n,
|
|
@@ -1980,8 +1979,8 @@ const el = Le.Root, tl = Le.Trigger, Mn = p.forwardRef(({ className: e, align: t
|
|
|
1980
1979
|
...o
|
|
1981
1980
|
}
|
|
1982
1981
|
));
|
|
1983
|
-
|
|
1984
|
-
const
|
|
1982
|
+
Pn.displayName = Le.Content.displayName;
|
|
1983
|
+
const Yi = O.Root, Qi = O.Group, Xi = O.Value, Tn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
1985
1984
|
O.Trigger,
|
|
1986
1985
|
{
|
|
1987
1986
|
ref: o,
|
|
@@ -1996,8 +1995,8 @@ const sl = O.Root, ol = O.Group, al = O.Value, Dn = p.forwardRef(({ className: e
|
|
|
1996
1995
|
]
|
|
1997
1996
|
}
|
|
1998
1997
|
));
|
|
1999
|
-
|
|
2000
|
-
const
|
|
1998
|
+
Tn.displayName = O.Trigger.displayName;
|
|
1999
|
+
const In = m.forwardRef(({ className: e, children: t, position: s = "popper", ...o }, n) => /* @__PURE__ */ a.jsx(O.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
2001
2000
|
O.Content,
|
|
2002
2001
|
{
|
|
2003
2002
|
ref: n,
|
|
@@ -2020,10 +2019,10 @@ const En = p.forwardRef(({ className: e, children: t, position: s = "popper", ..
|
|
|
2020
2019
|
)
|
|
2021
2020
|
}
|
|
2022
2021
|
) }));
|
|
2023
|
-
|
|
2024
|
-
const
|
|
2025
|
-
|
|
2026
|
-
const
|
|
2022
|
+
In.displayName = O.Content.displayName;
|
|
2023
|
+
const Mn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(O.Label, { ref: s, className: c("px-2 py-1.5 text-sm font-semibold", e), ...t }));
|
|
2024
|
+
Mn.displayName = O.Label.displayName;
|
|
2025
|
+
const Dn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
2027
2026
|
O.Item,
|
|
2028
2027
|
{
|
|
2029
2028
|
ref: o,
|
|
@@ -2038,13 +2037,13 @@ const On = p.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
2038
2037
|
]
|
|
2039
2038
|
}
|
|
2040
2039
|
));
|
|
2041
|
-
|
|
2042
|
-
const
|
|
2043
|
-
|
|
2044
|
-
const
|
|
2045
|
-
_s.displayName =
|
|
2046
|
-
const Bs =
|
|
2047
|
-
|
|
2040
|
+
Dn.displayName = O.Item.displayName;
|
|
2041
|
+
const En = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(O.Separator, { ref: s, className: c("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
2042
|
+
En.displayName = O.Separator.displayName;
|
|
2043
|
+
const Zi = B.Root, el = B.Trigger, tl = B.Close, _s = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(B.Portal, { className: c(e), ...t });
|
|
2044
|
+
_s.displayName = B.Portal.displayName;
|
|
2045
|
+
const Bs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2046
|
+
B.Overlay,
|
|
2048
2047
|
{
|
|
2049
2048
|
className: c(
|
|
2050
2049
|
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
@@ -2054,8 +2053,8 @@ const Bs = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2054
2053
|
ref: s
|
|
2055
2054
|
}
|
|
2056
2055
|
));
|
|
2057
|
-
Bs.displayName =
|
|
2058
|
-
const
|
|
2056
|
+
Bs.displayName = B.Overlay.displayName;
|
|
2057
|
+
const Ln = be(
|
|
2059
2058
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
2060
2059
|
{
|
|
2061
2060
|
variants: {
|
|
@@ -2070,29 +2069,29 @@ const $n = be(
|
|
|
2070
2069
|
side: "right"
|
|
2071
2070
|
}
|
|
2072
2071
|
}
|
|
2073
|
-
),
|
|
2072
|
+
), On = m.forwardRef(
|
|
2074
2073
|
({ side: e = "right", className: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(_s, { children: [
|
|
2075
2074
|
/* @__PURE__ */ a.jsx(Bs, {}),
|
|
2076
|
-
/* @__PURE__ */ a.jsxs(
|
|
2075
|
+
/* @__PURE__ */ a.jsxs(B.Content, { ref: n, className: c(Ln({ side: e }), t), ...o, children: [
|
|
2077
2076
|
s,
|
|
2078
|
-
/* @__PURE__ */ a.jsxs(
|
|
2077
|
+
/* @__PURE__ */ a.jsxs(B.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
2079
2078
|
/* @__PURE__ */ a.jsx(tt, { className: "h-4 w-4" }),
|
|
2080
2079
|
/* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
|
|
2081
2080
|
] })
|
|
2082
2081
|
] })
|
|
2083
2082
|
] })
|
|
2084
2083
|
);
|
|
2085
|
-
|
|
2086
|
-
const
|
|
2087
|
-
|
|
2088
|
-
const
|
|
2089
|
-
|
|
2090
|
-
const
|
|
2091
|
-
|
|
2092
|
-
const
|
|
2093
|
-
|
|
2094
|
-
const
|
|
2095
|
-
|
|
2084
|
+
On.displayName = B.Content.displayName;
|
|
2085
|
+
const zn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: c("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
|
|
2086
|
+
zn.displayName = "SheetHeader";
|
|
2087
|
+
const Vn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: c("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
2088
|
+
Vn.displayName = "SheetFooter";
|
|
2089
|
+
const $n = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(B.Title, { ref: s, className: c("text-lg font-semibold text-foreground", e), ...t }));
|
|
2090
|
+
$n.displayName = B.Title.displayName;
|
|
2091
|
+
const Fn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(B.Description, { ref: s, className: c("text-sm text-muted-foreground", e), ...t }));
|
|
2092
|
+
Fn.displayName = B.Description.displayName;
|
|
2093
|
+
const sl = P.Root, ol = P.Trigger, al = P.Group, nl = P.Portal, rl = P.Sub, il = P.RadioGroup, Gn = m.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
2094
|
+
P.SubTrigger,
|
|
2096
2095
|
{
|
|
2097
2096
|
ref: n,
|
|
2098
2097
|
className: c(
|
|
@@ -2107,9 +2106,9 @@ const ll = T.Root, cl = T.Trigger, dl = T.Group, ul = T.Portal, ml = T.Sub, pl =
|
|
|
2107
2106
|
]
|
|
2108
2107
|
}
|
|
2109
2108
|
));
|
|
2110
|
-
|
|
2111
|
-
const
|
|
2112
|
-
|
|
2109
|
+
Gn.displayName = P.SubTrigger.displayName;
|
|
2110
|
+
const Wn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2111
|
+
P.SubContent,
|
|
2113
2112
|
{
|
|
2114
2113
|
ref: s,
|
|
2115
2114
|
className: c(
|
|
@@ -2119,9 +2118,9 @@ const qn = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2119
2118
|
...t
|
|
2120
2119
|
}
|
|
2121
2120
|
));
|
|
2122
|
-
|
|
2123
|
-
const
|
|
2124
|
-
|
|
2121
|
+
Wn.displayName = P.SubContent.displayName;
|
|
2122
|
+
const Un = m.forwardRef(({ className: e, sideOffset: t = 4, ...s }, o) => /* @__PURE__ */ a.jsx(P.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
2123
|
+
P.Content,
|
|
2125
2124
|
{
|
|
2126
2125
|
ref: o,
|
|
2127
2126
|
sideOffset: t,
|
|
@@ -2133,9 +2132,9 @@ const Kn = p.forwardRef(({ className: e, sideOffset: t = 4, ...s }, o) => /* @__
|
|
|
2133
2132
|
...s
|
|
2134
2133
|
}
|
|
2135
2134
|
) }));
|
|
2136
|
-
|
|
2137
|
-
const
|
|
2138
|
-
|
|
2135
|
+
Un.displayName = P.Content.displayName;
|
|
2136
|
+
const Hn = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2137
|
+
P.Item,
|
|
2139
2138
|
{
|
|
2140
2139
|
ref: o,
|
|
2141
2140
|
className: c(
|
|
@@ -2146,9 +2145,9 @@ const Jn = p.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */
|
|
|
2146
2145
|
...s
|
|
2147
2146
|
}
|
|
2148
2147
|
));
|
|
2149
|
-
|
|
2150
|
-
const
|
|
2151
|
-
|
|
2148
|
+
Hn.displayName = P.Item.displayName;
|
|
2149
|
+
const qn = m.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
2150
|
+
P.CheckboxItem,
|
|
2152
2151
|
{
|
|
2153
2152
|
ref: n,
|
|
2154
2153
|
className: c(
|
|
@@ -2158,14 +2157,14 @@ const Yn = p.forwardRef(({ className: e, children: t, checked: s, ...o }, n) =>
|
|
|
2158
2157
|
checked: s,
|
|
2159
2158
|
...o,
|
|
2160
2159
|
children: [
|
|
2161
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
2160
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(P.ItemIndicator, { children: /* @__PURE__ */ a.jsx(Ee, { className: "h-4 w-4" }) }) }),
|
|
2162
2161
|
t
|
|
2163
2162
|
]
|
|
2164
2163
|
}
|
|
2165
2164
|
));
|
|
2166
|
-
|
|
2167
|
-
const
|
|
2168
|
-
|
|
2165
|
+
qn.displayName = P.CheckboxItem.displayName;
|
|
2166
|
+
const Kn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
2167
|
+
P.RadioItem,
|
|
2169
2168
|
{
|
|
2170
2169
|
ref: o,
|
|
2171
2170
|
className: c(
|
|
@@ -2174,27 +2173,27 @@ const Qn = p.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
2174
2173
|
),
|
|
2175
2174
|
...s,
|
|
2176
2175
|
children: [
|
|
2177
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
2176
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(P.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ot, { className: "h-4 w-4 fill-current" }) }) }),
|
|
2178
2177
|
t
|
|
2179
2178
|
]
|
|
2180
2179
|
}
|
|
2181
2180
|
));
|
|
2182
|
-
|
|
2183
|
-
const
|
|
2184
|
-
|
|
2181
|
+
Kn.displayName = P.RadioItem.displayName;
|
|
2182
|
+
const Jn = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2183
|
+
P.Label,
|
|
2185
2184
|
{
|
|
2186
2185
|
ref: o,
|
|
2187
2186
|
className: c("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
|
|
2188
2187
|
...s
|
|
2189
2188
|
}
|
|
2190
2189
|
));
|
|
2191
|
-
|
|
2192
|
-
const
|
|
2193
|
-
|
|
2194
|
-
const
|
|
2195
|
-
|
|
2196
|
-
const
|
|
2197
|
-
|
|
2190
|
+
Jn.displayName = P.Label.displayName;
|
|
2191
|
+
const Yn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(P.Separator, { ref: s, className: c("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
2192
|
+
Yn.displayName = P.Separator.displayName;
|
|
2193
|
+
const Qn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: c("ml-auto text-xs tracking-widest opacity-60", e), ...t });
|
|
2194
|
+
Qn.displayName = "DropdownMenuShortcut";
|
|
2195
|
+
const Xn = m.forwardRef(({ className: e, orientation: t = "horizontal", decorative: s = !0, ...o }, n) => /* @__PURE__ */ a.jsx(
|
|
2196
|
+
$t.Root,
|
|
2198
2197
|
{
|
|
2199
2198
|
ref: n,
|
|
2200
2199
|
decorative: s,
|
|
@@ -2203,10 +2202,10 @@ const tr = p.forwardRef(({ className: e, orientation: t = "horizontal", decorati
|
|
|
2203
2202
|
...o
|
|
2204
2203
|
}
|
|
2205
2204
|
));
|
|
2206
|
-
|
|
2207
|
-
const
|
|
2205
|
+
Xn.displayName = $t.Root.displayName;
|
|
2206
|
+
const Zn = 1, er = 1e6;
|
|
2208
2207
|
let We = 0;
|
|
2209
|
-
function
|
|
2208
|
+
function tr() {
|
|
2210
2209
|
return We = (We + 1) % Number.MAX_VALUE, We.toString();
|
|
2211
2210
|
}
|
|
2212
2211
|
const Ue = /* @__PURE__ */ new Map(), Lt = (e) => {
|
|
@@ -2217,14 +2216,14 @@ const Ue = /* @__PURE__ */ new Map(), Lt = (e) => {
|
|
|
2217
2216
|
type: "REMOVE_TOAST",
|
|
2218
2217
|
toastId: e
|
|
2219
2218
|
});
|
|
2220
|
-
},
|
|
2219
|
+
}, er);
|
|
2221
2220
|
Ue.set(e, t);
|
|
2222
|
-
},
|
|
2221
|
+
}, sr = (e, t) => {
|
|
2223
2222
|
switch (t.type) {
|
|
2224
2223
|
case "ADD_TOAST":
|
|
2225
2224
|
return {
|
|
2226
2225
|
...e,
|
|
2227
|
-
toasts: [t.toast, ...e.toasts].slice(0,
|
|
2226
|
+
toasts: [t.toast, ...e.toasts].slice(0, Zn)
|
|
2228
2227
|
};
|
|
2229
2228
|
case "UPDATE_TOAST":
|
|
2230
2229
|
return {
|
|
@@ -2257,12 +2256,12 @@ const Ue = /* @__PURE__ */ new Map(), Lt = (e) => {
|
|
|
2257
2256
|
}, Te = [];
|
|
2258
2257
|
let Ie = { toasts: [] };
|
|
2259
2258
|
function ke(e) {
|
|
2260
|
-
Ie =
|
|
2259
|
+
Ie = sr(Ie, e), Te.forEach((t) => {
|
|
2261
2260
|
t(Ie);
|
|
2262
2261
|
});
|
|
2263
2262
|
}
|
|
2264
|
-
function
|
|
2265
|
-
const t =
|
|
2263
|
+
function or({ ...e }) {
|
|
2264
|
+
const t = tr(), s = (n) => ke({
|
|
2266
2265
|
type: "UPDATE_TOAST",
|
|
2267
2266
|
toast: { ...n, id: t }
|
|
2268
2267
|
}), o = () => ke({ type: "DISMISS_TOAST", toastId: t });
|
|
@@ -2282,18 +2281,18 @@ function rr({ ...e }) {
|
|
|
2282
2281
|
update: s
|
|
2283
2282
|
};
|
|
2284
2283
|
}
|
|
2285
|
-
function
|
|
2286
|
-
const [e, t] =
|
|
2287
|
-
return
|
|
2284
|
+
function ar() {
|
|
2285
|
+
const [e, t] = m.useState(Ie);
|
|
2286
|
+
return m.useEffect(() => (Te.push(t), () => {
|
|
2288
2287
|
const s = Te.indexOf(t);
|
|
2289
2288
|
s > -1 && Te.splice(s, 1);
|
|
2290
2289
|
}), [e]), {
|
|
2291
2290
|
...e,
|
|
2292
|
-
toast:
|
|
2291
|
+
toast: or,
|
|
2293
2292
|
dismiss: (s) => ke({ type: "DISMISS_TOAST", toastId: s })
|
|
2294
2293
|
};
|
|
2295
2294
|
}
|
|
2296
|
-
const
|
|
2295
|
+
const nr = H.Provider, Rs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2297
2296
|
H.Viewport,
|
|
2298
2297
|
{
|
|
2299
2298
|
ref: s,
|
|
@@ -2305,7 +2304,7 @@ const lr = H.Provider, Rs = p.forwardRef(({ className: e, ...t }, s) => /* @__PU
|
|
|
2305
2304
|
}
|
|
2306
2305
|
));
|
|
2307
2306
|
Rs.displayName = H.Viewport.displayName;
|
|
2308
|
-
const
|
|
2307
|
+
const rr = be(
|
|
2309
2308
|
"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
2310
2309
|
{
|
|
2311
2310
|
variants: {
|
|
@@ -2318,9 +2317,9 @@ const cr = be(
|
|
|
2318
2317
|
variant: "default"
|
|
2319
2318
|
}
|
|
2320
2319
|
}
|
|
2321
|
-
), Ps =
|
|
2320
|
+
), Ps = m.forwardRef(({ className: e, variant: t, ...s }, o) => /* @__PURE__ */ a.jsx(H.Root, { ref: o, className: c(rr({ variant: t }), e), ...s }));
|
|
2322
2321
|
Ps.displayName = H.Root.displayName;
|
|
2323
|
-
const
|
|
2322
|
+
const ir = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2324
2323
|
H.Action,
|
|
2325
2324
|
{
|
|
2326
2325
|
ref: s,
|
|
@@ -2331,8 +2330,8 @@ const dr = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2331
2330
|
...t
|
|
2332
2331
|
}
|
|
2333
2332
|
));
|
|
2334
|
-
|
|
2335
|
-
const Ts =
|
|
2333
|
+
ir.displayName = H.Action.displayName;
|
|
2334
|
+
const Ts = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2336
2335
|
H.Close,
|
|
2337
2336
|
{
|
|
2338
2337
|
ref: s,
|
|
@@ -2346,13 +2345,13 @@ const Ts = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2346
2345
|
}
|
|
2347
2346
|
));
|
|
2348
2347
|
Ts.displayName = H.Close.displayName;
|
|
2349
|
-
const Is =
|
|
2348
|
+
const Is = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(H.Title, { ref: s, className: c("text-sm font-semibold [&+div]:text-xs", e), ...t }));
|
|
2350
2349
|
Is.displayName = H.Title.displayName;
|
|
2351
|
-
const Ms =
|
|
2350
|
+
const Ms = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(H.Description, { ref: s, className: c("text-sm opacity-90", e), ...t }));
|
|
2352
2351
|
Ms.displayName = H.Description.displayName;
|
|
2353
|
-
function
|
|
2354
|
-
const { toasts: e } =
|
|
2355
|
-
return /* @__PURE__ */ a.jsxs(
|
|
2352
|
+
function ll() {
|
|
2353
|
+
const { toasts: e } = ar();
|
|
2354
|
+
return /* @__PURE__ */ a.jsxs(nr, { children: [
|
|
2356
2355
|
e.map(({ id: t, title: s, description: o, action: n, ...r }) => /* @__PURE__ */ a.jsxs(Ps, { ...r, children: [
|
|
2357
2356
|
/* @__PURE__ */ a.jsxs("div", { className: "grid gap-1", children: [
|
|
2358
2357
|
s && /* @__PURE__ */ a.jsx(Is, { children: s }),
|
|
@@ -2364,7 +2363,7 @@ function fl() {
|
|
|
2364
2363
|
/* @__PURE__ */ a.jsx(Rs, {})
|
|
2365
2364
|
] });
|
|
2366
2365
|
}
|
|
2367
|
-
const
|
|
2366
|
+
const cl = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: c("animate-pulse rounded-md bg-primary/10", e), ...t }), Ds = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2368
2367
|
W,
|
|
2369
2368
|
{
|
|
2370
2369
|
ref: s,
|
|
@@ -2376,7 +2375,7 @@ const gl = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className:
|
|
|
2376
2375
|
}
|
|
2377
2376
|
));
|
|
2378
2377
|
Ds.displayName = W.displayName;
|
|
2379
|
-
const
|
|
2378
|
+
const dl = ({ children: e, ...t }) => /* @__PURE__ */ a.jsx(ks, { ...t, children: /* @__PURE__ */ a.jsx(yt, { className: "overflow-hidden p-0", children: /* @__PURE__ */ a.jsx(Ds, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), lr = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
2380
2379
|
/* @__PURE__ */ a.jsx(qs, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
2381
2380
|
/* @__PURE__ */ a.jsx(
|
|
2382
2381
|
W.Input,
|
|
@@ -2390,8 +2389,8 @@ const bl = ({ children: e, ...t }) => /* @__PURE__ */ a.jsx(ks, { ...t, children
|
|
|
2390
2389
|
}
|
|
2391
2390
|
)
|
|
2392
2391
|
] }));
|
|
2393
|
-
|
|
2394
|
-
const
|
|
2392
|
+
lr.displayName = W.Input.displayName;
|
|
2393
|
+
const cr = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2395
2394
|
W.List,
|
|
2396
2395
|
{
|
|
2397
2396
|
ref: s,
|
|
@@ -2399,10 +2398,10 @@ const mr = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2399
2398
|
...t
|
|
2400
2399
|
}
|
|
2401
2400
|
));
|
|
2402
|
-
|
|
2403
|
-
const
|
|
2404
|
-
|
|
2405
|
-
const
|
|
2401
|
+
cr.displayName = W.List.displayName;
|
|
2402
|
+
const dr = m.forwardRef((e, t) => /* @__PURE__ */ a.jsx(W.Empty, { ref: t, className: "py-6 text-center text-sm", ...e }));
|
|
2403
|
+
dr.displayName = W.Empty.displayName;
|
|
2404
|
+
const ur = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2406
2405
|
W.Group,
|
|
2407
2406
|
{
|
|
2408
2407
|
ref: s,
|
|
@@ -2413,10 +2412,10 @@ const fr = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2413
2412
|
...t
|
|
2414
2413
|
}
|
|
2415
2414
|
));
|
|
2416
|
-
|
|
2417
|
-
const
|
|
2418
|
-
|
|
2419
|
-
const
|
|
2415
|
+
ur.displayName = W.Group.displayName;
|
|
2416
|
+
const mr = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(W.Separator, { ref: s, className: c("-mx-1 h-px bg-border", e), ...t }));
|
|
2417
|
+
mr.displayName = W.Separator.displayName;
|
|
2418
|
+
const pr = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2420
2419
|
W.Item,
|
|
2421
2420
|
{
|
|
2422
2421
|
ref: s,
|
|
@@ -2427,11 +2426,11 @@ const br = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2427
2426
|
...t
|
|
2428
2427
|
}
|
|
2429
2428
|
));
|
|
2430
|
-
|
|
2431
|
-
const
|
|
2432
|
-
|
|
2433
|
-
const
|
|
2434
|
-
|
|
2429
|
+
pr.displayName = W.Item.displayName;
|
|
2430
|
+
const fr = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: c("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
|
|
2431
|
+
fr.displayName = "CommandShortcut";
|
|
2432
|
+
const ul = T.Root, ml = T.Trigger, pl = T.Group, fl = T.Portal, gl = T.Sub, bl = T.RadioGroup, gr = m.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
2433
|
+
T.SubTrigger,
|
|
2435
2434
|
{
|
|
2436
2435
|
ref: n,
|
|
2437
2436
|
className: c(
|
|
@@ -2446,9 +2445,9 @@ const xl = I.Root, hl = I.Trigger, yl = I.Group, vl = I.Portal, wl = I.Sub, Nl =
|
|
|
2446
2445
|
]
|
|
2447
2446
|
}
|
|
2448
2447
|
));
|
|
2449
|
-
|
|
2450
|
-
const
|
|
2451
|
-
|
|
2448
|
+
gr.displayName = T.SubTrigger.displayName;
|
|
2449
|
+
const br = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2450
|
+
T.SubContent,
|
|
2452
2451
|
{
|
|
2453
2452
|
ref: s,
|
|
2454
2453
|
className: c(
|
|
@@ -2458,9 +2457,9 @@ const yr = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2458
2457
|
...t
|
|
2459
2458
|
}
|
|
2460
2459
|
));
|
|
2461
|
-
|
|
2462
|
-
const
|
|
2463
|
-
|
|
2460
|
+
br.displayName = T.SubContent.displayName;
|
|
2461
|
+
const xr = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(T.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
2462
|
+
T.Content,
|
|
2464
2463
|
{
|
|
2465
2464
|
ref: s,
|
|
2466
2465
|
className: c(
|
|
@@ -2470,9 +2469,9 @@ const vr = p.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(I.P
|
|
|
2470
2469
|
...t
|
|
2471
2470
|
}
|
|
2472
2471
|
) }));
|
|
2473
|
-
|
|
2474
|
-
const
|
|
2475
|
-
|
|
2472
|
+
xr.displayName = T.Content.displayName;
|
|
2473
|
+
const hr = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2474
|
+
T.Item,
|
|
2476
2475
|
{
|
|
2477
2476
|
ref: o,
|
|
2478
2477
|
className: c(
|
|
@@ -2483,9 +2482,9 @@ const wr = p.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */
|
|
|
2483
2482
|
...s
|
|
2484
2483
|
}
|
|
2485
2484
|
));
|
|
2486
|
-
|
|
2487
|
-
const
|
|
2488
|
-
|
|
2485
|
+
hr.displayName = T.Item.displayName;
|
|
2486
|
+
const yr = m.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
2487
|
+
T.CheckboxItem,
|
|
2489
2488
|
{
|
|
2490
2489
|
ref: n,
|
|
2491
2490
|
className: c(
|
|
@@ -2495,14 +2494,14 @@ const Nr = p.forwardRef(({ className: e, children: t, checked: s, ...o }, n) =>
|
|
|
2495
2494
|
checked: s,
|
|
2496
2495
|
...o,
|
|
2497
2496
|
children: [
|
|
2498
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
2497
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(T.ItemIndicator, { children: /* @__PURE__ */ a.jsx(Ee, { className: "h-4 w-4" }) }) }),
|
|
2499
2498
|
t
|
|
2500
2499
|
]
|
|
2501
2500
|
}
|
|
2502
2501
|
));
|
|
2503
|
-
|
|
2504
|
-
const
|
|
2505
|
-
|
|
2502
|
+
yr.displayName = T.CheckboxItem.displayName;
|
|
2503
|
+
const vr = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
2504
|
+
T.RadioItem,
|
|
2506
2505
|
{
|
|
2507
2506
|
ref: o,
|
|
2508
2507
|
className: c(
|
|
@@ -2511,26 +2510,26 @@ const kr = p.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
2511
2510
|
),
|
|
2512
2511
|
...s,
|
|
2513
2512
|
children: [
|
|
2514
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
2513
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(T.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ot, { className: "h-4 w-4 fill-current" }) }) }),
|
|
2515
2514
|
t
|
|
2516
2515
|
]
|
|
2517
2516
|
}
|
|
2518
2517
|
));
|
|
2519
|
-
|
|
2520
|
-
const
|
|
2521
|
-
|
|
2518
|
+
vr.displayName = T.RadioItem.displayName;
|
|
2519
|
+
const wr = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2520
|
+
T.Label,
|
|
2522
2521
|
{
|
|
2523
2522
|
ref: o,
|
|
2524
2523
|
className: c("px-2 py-1.5 text-sm font-semibold text-foreground", t && "pl-8", e),
|
|
2525
2524
|
...s
|
|
2526
2525
|
}
|
|
2527
2526
|
));
|
|
2528
|
-
|
|
2529
|
-
const
|
|
2530
|
-
|
|
2531
|
-
const
|
|
2532
|
-
|
|
2533
|
-
const
|
|
2527
|
+
wr.displayName = T.Label.displayName;
|
|
2528
|
+
const Nr = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(T.Separator, { ref: s, className: c("-mx-1 my-1 h-px bg-border", e), ...t }));
|
|
2529
|
+
Nr.displayName = T.Separator.displayName;
|
|
2530
|
+
const kr = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: c("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
|
|
2531
|
+
kr.displayName = "ContextMenuShortcut";
|
|
2532
|
+
const Sr = (e) => {
|
|
2534
2533
|
try {
|
|
2535
2534
|
const t = document.getElementById("icon-picker-field"), s = document.createElement("div");
|
|
2536
2535
|
Ys.render(/* @__PURE__ */ a.jsx(Js, { value: e }), s), t.appendChild(s), s.hidden = !0;
|
|
@@ -2541,10 +2540,10 @@ const Cr = (e) => {
|
|
|
2541
2540
|
} catch {
|
|
2542
2541
|
return "";
|
|
2543
2542
|
}
|
|
2544
|
-
},
|
|
2543
|
+
}, xl = ({ value: e, onChange: t, onBlur: s, id: o }) => {
|
|
2545
2544
|
const n = (r) => {
|
|
2546
2545
|
t("<svg />");
|
|
2547
|
-
const i =
|
|
2546
|
+
const i = Sr(r);
|
|
2548
2547
|
t(i), s(o, i);
|
|
2549
2548
|
};
|
|
2550
2549
|
return /* @__PURE__ */ a.jsxs("div", { className: "mt-1 flex h-20 items-center gap-x-2", id: "icon-picker-field", children: [
|
|
@@ -2593,7 +2592,7 @@ const Cr = (e) => {
|
|
|
2593
2592
|
}
|
|
2594
2593
|
)
|
|
2595
2594
|
] });
|
|
2596
|
-
},
|
|
2595
|
+
}, jr = et.lazy(() => import("./UnsplashImages-yk5eowZf.js")), Ar = et.lazy(() => import("./UploadImages-ioTAmtvl.js")), Es = ({
|
|
2597
2596
|
isModalView: e = !1,
|
|
2598
2597
|
onSelect: t = () => {
|
|
2599
2598
|
}
|
|
@@ -2601,15 +2600,15 @@ const Cr = (e) => {
|
|
|
2601
2600
|
const [s, o] = De("upload");
|
|
2602
2601
|
return /* @__PURE__ */ a.jsxs("div", { className: "flex h-full flex-col", children: [
|
|
2603
2602
|
/* @__PURE__ */ a.jsx("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: /* @__PURE__ */ a.jsx("h1", { className: "px-1 font-semibold", children: e ? "Select or upload images" : "Images" }) }),
|
|
2604
|
-
/* @__PURE__ */ a.jsxs(
|
|
2603
|
+
/* @__PURE__ */ a.jsxs(xn, { value: s, onValueChange: (n) => o(n), className: "flex h-full w-full flex-col py-2", children: [
|
|
2605
2604
|
/* @__PURE__ */ a.jsxs(Cs, { className: "w-full", children: [
|
|
2606
2605
|
/* @__PURE__ */ a.jsx(Xe, { value: "upload", className: "w-1/2", children: "Upload" }),
|
|
2607
2606
|
/* @__PURE__ */ a.jsx(Xe, { value: "unsplash", className: "w-1/2", children: "Unsplash" })
|
|
2608
2607
|
] }),
|
|
2609
|
-
s === "unsplash" ? /* @__PURE__ */ a.jsx(Ze, { value: "unsplash", className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ a.jsx(vt, { fallback: /* @__PURE__ */ a.jsx("div", { className: "h-64 w-full animate-pulse bg-gray-100" }), children: /* @__PURE__ */ a.jsx(
|
|
2608
|
+
s === "unsplash" ? /* @__PURE__ */ a.jsx(Ze, { value: "unsplash", className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ a.jsx(vt, { fallback: /* @__PURE__ */ a.jsx("div", { className: "h-64 w-full animate-pulse bg-gray-100" }), children: /* @__PURE__ */ a.jsx(jr, { isModalView: e, onSelect: t }) }) }) : /* @__PURE__ */ a.jsx(Ze, { value: "upload", className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ a.jsx(vt, { fallback: /* @__PURE__ */ a.jsx("div", { className: "h-64 w-full animate-pulse bg-gray-100" }), children: /* @__PURE__ */ a.jsx(Ar, { isModalView: e, onSelect: t }) }) })
|
|
2610
2609
|
] })
|
|
2611
2610
|
] });
|
|
2612
|
-
},
|
|
2611
|
+
}, hl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2613
2612
|
__proto__: null,
|
|
2614
2613
|
default: Es
|
|
2615
2614
|
}, Symbol.toStringTag, { value: "Module" })), Ot = ({ children: e, onSelect: t }) => {
|
|
@@ -2617,10 +2616,10 @@ const Cr = (e) => {
|
|
|
2617
2616
|
t.call(void 0, ...r), o(!1);
|
|
2618
2617
|
};
|
|
2619
2618
|
return /* @__PURE__ */ a.jsxs(ks, { open: s, onOpenChange: (r) => o(r), children: [
|
|
2620
|
-
/* @__PURE__ */ a.jsx(
|
|
2619
|
+
/* @__PURE__ */ a.jsx(en, { asChild: !0, children: e }),
|
|
2621
2620
|
/* @__PURE__ */ a.jsx(yt, { className: "flex h-3/4 max-w-5xl", children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ a.jsx(Es, { isModalView: !0, onSelect: n }) }) })
|
|
2622
2621
|
] });
|
|
2623
|
-
},
|
|
2622
|
+
}, yl = ({ value: e, onChange: t, id: s, onBlur: o }) => /* @__PURE__ */ a.jsxs("div", { className: "mt-1.5 flex items-center gap-x-3", children: [
|
|
2624
2623
|
e ? /* @__PURE__ */ a.jsx("img", { src: e, className: "h-20 w-20 overflow-hidden rounded-md border object-cover", alt: "" }) : /* @__PURE__ */ a.jsx(Ot, { onSelect: t, children: /* @__PURE__ */ a.jsx("div", { className: "h-20 w-20 cursor-pointer rounded-md border bg-[radial-gradient(#AAA,transparent_1px)] duration-300 [background-size:10px_10px] hover:border-gray-400" }) }),
|
|
2625
2624
|
/* @__PURE__ */ a.jsxs("div", { className: "flex w-3/5 flex-col", children: [
|
|
2626
2625
|
/* @__PURE__ */ a.jsx(Ot, { onSelect: t, children: /* @__PURE__ */ a.jsx("small", { className: "cursor-pointer rounded-full bg-gray-600 px-2 py-1 text-center text-xs text-white hover:bg-gray-500 dark:bg-gray-700", children: e || !oe(e) ? "Replace Image" : "Choose Image" }) }),
|
|
@@ -2637,7 +2636,7 @@ const Cr = (e) => {
|
|
|
2637
2636
|
}
|
|
2638
2637
|
)
|
|
2639
2638
|
] })
|
|
2640
|
-
] }),
|
|
2639
|
+
] }), vl = ({ id: e, placeholder: t, value: s, onChange: o, onBlur: n }) => {
|
|
2641
2640
|
const r = {
|
|
2642
2641
|
toolbar: [
|
|
2643
2642
|
["bold", "italic", "underline", "strike", "blockquote"],
|
|
@@ -2673,9 +2672,9 @@ const Cr = (e) => {
|
|
|
2673
2672
|
className: "mt-1 rounded-md"
|
|
2674
2673
|
}
|
|
2675
2674
|
);
|
|
2676
|
-
},
|
|
2677
|
-
const [o, n] = De([]), r = ve("getPages", () => []), { type: i = "page", href: u = "", target:
|
|
2678
|
-
return
|
|
2675
|
+
}, wl = ({ schema: e, formData: t, onChange: s }) => {
|
|
2676
|
+
const [o, n] = De([]), r = ve("getPages", () => []), { type: i = "page", href: u = "", target: p = "self" } = t;
|
|
2677
|
+
return je(() => {
|
|
2679
2678
|
(async () => {
|
|
2680
2679
|
const l = await r();
|
|
2681
2680
|
n(l || []);
|
|
@@ -2699,7 +2698,7 @@ const Cr = (e) => {
|
|
|
2699
2698
|
onChange: (l) => s({ ...t, href: l.target.value }),
|
|
2700
2699
|
children: [
|
|
2701
2700
|
/* @__PURE__ */ a.jsx("option", { value: "", children: "Choose page" }),
|
|
2702
|
-
|
|
2701
|
+
V(o, (l) => /* @__PURE__ */ a.jsx("option", { value: l.slug, children: l.name }, l.uuid))
|
|
2703
2702
|
]
|
|
2704
2703
|
}
|
|
2705
2704
|
) : /* @__PURE__ */ a.jsx(
|
|
@@ -2717,9 +2716,9 @@ const Cr = (e) => {
|
|
|
2717
2716
|
"input",
|
|
2718
2717
|
{
|
|
2719
2718
|
type: "checkbox",
|
|
2720
|
-
defaultChecked:
|
|
2719
|
+
defaultChecked: p === "_blank",
|
|
2721
2720
|
className: "cursor-pointer rounded-md border border-border",
|
|
2722
|
-
onChange: () => s({ ...t, target:
|
|
2721
|
+
onChange: () => s({ ...t, target: p === "_blank" ? "_self" : "_blank" })
|
|
2723
2722
|
}
|
|
2724
2723
|
),
|
|
2725
2724
|
/* @__PURE__ */ a.jsx("span", { className: "pt-1 text-xs", children: "Open in new tab" })
|
|
@@ -2728,224 +2727,221 @@ const Cr = (e) => {
|
|
|
2728
2727
|
] });
|
|
2729
2728
|
};
|
|
2730
2729
|
export {
|
|
2731
|
-
|
|
2730
|
+
pi as $,
|
|
2732
2731
|
ms as A,
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2732
|
+
Oa as B,
|
|
2733
|
+
ll as C,
|
|
2734
|
+
Di as D,
|
|
2735
|
+
Ei as E,
|
|
2736
|
+
qa as F,
|
|
2737
|
+
Ka as G,
|
|
2738
|
+
Ya as H,
|
|
2739
|
+
Qa as I,
|
|
2740
|
+
Ja as J,
|
|
2741
|
+
Za as K,
|
|
2742
|
+
Pi as L,
|
|
2743
|
+
ji as M,
|
|
2744
|
+
Si as N,
|
|
2745
|
+
ai as O,
|
|
2746
|
+
ni as P,
|
|
2748
2747
|
Ho as Q,
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2748
|
+
ii as R,
|
|
2749
|
+
cl as S,
|
|
2750
|
+
Oi as T,
|
|
2751
|
+
li as U,
|
|
2753
2752
|
Xo as V,
|
|
2754
|
-
|
|
2755
|
-
|
|
2753
|
+
di as W,
|
|
2754
|
+
ui as X,
|
|
2756
2755
|
ds as Y,
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2756
|
+
mi as Z,
|
|
2757
|
+
ka as _,
|
|
2758
|
+
Kr as a,
|
|
2759
|
+
la as a$,
|
|
2760
|
+
fi as a0,
|
|
2761
|
+
bi as a1,
|
|
2762
|
+
Ri as a2,
|
|
2763
|
+
hi as a3,
|
|
2764
|
+
vi as a4,
|
|
2765
|
+
yi as a5,
|
|
2766
|
+
oi as a6,
|
|
2767
|
+
ba as a7,
|
|
2768
|
+
Ti as a8,
|
|
2769
|
+
wi as a9,
|
|
2770
|
+
Ze as aA,
|
|
2771
|
+
Qi as aB,
|
|
2772
|
+
Mn as aC,
|
|
2773
|
+
zi as aD,
|
|
2774
|
+
Vi as aE,
|
|
2775
|
+
Ea as aF,
|
|
2776
|
+
hn as aG,
|
|
2777
|
+
Xn as aH,
|
|
2778
|
+
fn as aI,
|
|
2779
|
+
La as aJ,
|
|
2780
|
+
Ki as aK,
|
|
2781
|
+
Ji as aL,
|
|
2782
|
+
Pn as aM,
|
|
2783
|
+
sl as aN,
|
|
2784
|
+
ol as aO,
|
|
2785
|
+
Un as aP,
|
|
2786
|
+
Jn as aQ,
|
|
2787
|
+
Yn as aR,
|
|
2788
|
+
qn as aS,
|
|
2789
|
+
pa as aT,
|
|
2790
|
+
ma as aU,
|
|
2791
|
+
na as aV,
|
|
2792
|
+
fa as aW,
|
|
2793
|
+
Zr as aX,
|
|
2794
|
+
ei as aY,
|
|
2795
|
+
Ye as aZ,
|
|
2796
|
+
oa as a_,
|
|
2797
|
+
Qr as aa,
|
|
2798
|
+
Ni as ab,
|
|
2799
|
+
ki as ac,
|
|
2800
|
+
si as ad,
|
|
2801
|
+
$o as ae,
|
|
2802
|
+
Ai as af,
|
|
2803
|
+
ri as ag,
|
|
2804
|
+
Ci as ah,
|
|
2805
|
+
_i as ai,
|
|
2807
2806
|
ns as aj,
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2807
|
+
ks as ak,
|
|
2808
|
+
yt as al,
|
|
2809
|
+
tn as am,
|
|
2810
|
+
on as an,
|
|
2811
|
+
an as ao,
|
|
2812
|
+
Xa as ap,
|
|
2813
|
+
Yi as aq,
|
|
2814
|
+
Tn as ar,
|
|
2815
|
+
Xi as as,
|
|
2816
|
+
In as at,
|
|
2817
|
+
Dn as au,
|
|
2818
|
+
ca as av,
|
|
2819
|
+
Do as aw,
|
|
2820
|
+
xn as ax,
|
|
2821
|
+
Cs as ay,
|
|
2822
|
+
Xe as az,
|
|
2824
2823
|
Z as b,
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2824
|
+
En as b$,
|
|
2825
|
+
$i as b0,
|
|
2826
|
+
Fi as b1,
|
|
2827
|
+
yn as b2,
|
|
2828
|
+
Ds as b3,
|
|
2829
|
+
lr as b4,
|
|
2830
|
+
cr as b5,
|
|
2831
|
+
dr as b6,
|
|
2833
2832
|
ur as b7,
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2833
|
+
pr as b8,
|
|
2834
|
+
sn as b9,
|
|
2835
|
+
xr as bA,
|
|
2836
|
+
ul as bB,
|
|
2837
|
+
ml as bC,
|
|
2838
|
+
ti as bD,
|
|
2839
|
+
Da as bE,
|
|
2840
|
+
ht as bF,
|
|
2841
|
+
Ua as bG,
|
|
2842
|
+
Mi as bH,
|
|
2843
|
+
Ha as bI,
|
|
2844
|
+
ln as bJ,
|
|
2845
|
+
As as bK,
|
|
2846
|
+
vn as bL,
|
|
2847
|
+
Gi as bM,
|
|
2848
|
+
wn as bN,
|
|
2849
|
+
Sn as bO,
|
|
2850
|
+
jn as bP,
|
|
2851
|
+
Bn as bQ,
|
|
2852
|
+
_n as bR,
|
|
2853
|
+
An as bS,
|
|
2854
|
+
qi as bT,
|
|
2855
|
+
Cn as bU,
|
|
2856
|
+
Ui as bV,
|
|
2857
|
+
kn as bW,
|
|
2858
|
+
Nn as bX,
|
|
2859
|
+
Wi as bY,
|
|
2860
|
+
Hi as bZ,
|
|
2861
|
+
Rn as b_,
|
|
2862
|
+
en as ba,
|
|
2863
|
+
Rt as bb,
|
|
2864
|
+
Bt as bc,
|
|
2865
|
+
vl as bd,
|
|
2866
|
+
xl as be,
|
|
2867
|
+
yl as bf,
|
|
2868
|
+
wl as bg,
|
|
2869
|
+
Ii as bh,
|
|
2870
|
+
za as bi,
|
|
2871
|
+
Va as bj,
|
|
2872
|
+
$a as bk,
|
|
2873
|
+
mn as bl,
|
|
2874
|
+
Li as bm,
|
|
2875
|
+
sa as bn,
|
|
2876
|
+
bn as bo,
|
|
2877
|
+
da as bp,
|
|
2878
|
+
nn as bq,
|
|
2879
|
+
rn as br,
|
|
2880
|
+
cn as bs,
|
|
2881
|
+
dn as bt,
|
|
2882
|
+
gn as bu,
|
|
2883
|
+
un as bv,
|
|
2884
|
+
Ga as bw,
|
|
2885
|
+
Wa as bx,
|
|
2886
|
+
ua as by,
|
|
2887
|
+
hr as bz,
|
|
2889
2888
|
co as c,
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2889
|
+
Zi as c0,
|
|
2890
|
+
el as c1,
|
|
2891
|
+
tl as c2,
|
|
2892
|
+
On as c3,
|
|
2893
|
+
zn as c4,
|
|
2894
|
+
Vn as c5,
|
|
2895
|
+
$n as c6,
|
|
2897
2896
|
Fn as c7,
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
xr as co,
|
|
2917
|
-
gr as cp,
|
|
2897
|
+
Hn as c8,
|
|
2898
|
+
Kn as c9,
|
|
2899
|
+
Qn as ca,
|
|
2900
|
+
al as cb,
|
|
2901
|
+
nl as cc,
|
|
2902
|
+
rl as cd,
|
|
2903
|
+
Wn as ce,
|
|
2904
|
+
Gn as cf,
|
|
2905
|
+
il as cg,
|
|
2906
|
+
sr as ch,
|
|
2907
|
+
ar as ci,
|
|
2908
|
+
or as cj,
|
|
2909
|
+
dl as ck,
|
|
2910
|
+
fr as cl,
|
|
2911
|
+
mr as cm,
|
|
2912
|
+
yr as cn,
|
|
2913
|
+
vr as co,
|
|
2914
|
+
wr as cp,
|
|
2918
2915
|
Nr as cq,
|
|
2919
2916
|
kr as cr,
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
hr as cz,
|
|
2917
|
+
pl as cs,
|
|
2918
|
+
fl as ct,
|
|
2919
|
+
gl as cu,
|
|
2920
|
+
br as cv,
|
|
2921
|
+
gr as cw,
|
|
2922
|
+
bl as cx,
|
|
2923
|
+
hl as cy,
|
|
2928
2924
|
xo as d,
|
|
2929
2925
|
bo as e,
|
|
2930
|
-
|
|
2931
|
-
|
|
2926
|
+
Ae as f,
|
|
2927
|
+
Jr as g,
|
|
2932
2928
|
Ko as h,
|
|
2933
2929
|
ve as i,
|
|
2934
2930
|
Ce as j,
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2931
|
+
ci as k,
|
|
2932
|
+
xi as l,
|
|
2933
|
+
va as m,
|
|
2934
|
+
ha as n,
|
|
2935
|
+
gi as o,
|
|
2940
2936
|
bt as p,
|
|
2941
2937
|
Q as q,
|
|
2942
2938
|
Co as r,
|
|
2943
|
-
|
|
2939
|
+
ga as s,
|
|
2944
2940
|
gt as t,
|
|
2945
2941
|
qt as u,
|
|
2946
|
-
|
|
2947
|
-
|
|
2942
|
+
Yr as v,
|
|
2943
|
+
Xr as w,
|
|
2948
2944
|
Yo as x,
|
|
2949
|
-
|
|
2945
|
+
Bi as y,
|
|
2950
2946
|
it as z
|
|
2951
2947
|
};
|