@chaibuilder/sdk 1.2.65 → 1.2.67
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-TVOOPK2w.cjs +1 -0
- package/dist/AddBlocks-mbuhydG3.js +123 -0
- package/dist/CanvasArea-KJMcis97.cjs +1 -0
- package/dist/CanvasArea-kg3Rgg9t.js +136 -0
- package/dist/CodeEditor-QP6l0mv4.cjs +1 -0
- package/dist/{CodeEditor-Qff4q7sx.js → CodeEditor-q5unEaUI.js} +60 -46
- package/dist/STRINGS--j49GZJP.js +7 -0
- package/dist/STRINGS-gPz7CUOk.cjs +1 -0
- package/dist/SettingsPanel-MWeQjDWs.cjs +1 -0
- package/dist/SettingsPanel-pomLrOxB.js +81 -0
- package/dist/SidePanels-9sbERNEv.cjs +1 -0
- package/dist/{SidePanels-ijaUKSek.js → SidePanels-YpRrvfiH.js} +87 -93
- package/dist/{Topbar-vHlnfxPs.js → Topbar-kVBx7pp4.js} +56 -61
- package/dist/Topbar-veJ2_blW.cjs +1 -0
- package/dist/{UILibrariesPanel-NVUMUPUj.js → UILibrariesPanel-ES8YzN9C.js} +92 -101
- package/dist/UILibrariesPanel-H8t36R6M.cjs +1 -0
- package/dist/UnsplashImages--MXx-DYM.cjs +1 -0
- package/dist/{UnsplashImages-UkHihhA5.js → UnsplashImages-sotLcz6r.js} +72 -57
- package/dist/{UploadImages-HtuJZJlo.js → UploadImages-I0QQ6vj1.js} +57 -44
- package/dist/UploadImages-xhxeYKkl.cjs +1 -0
- package/dist/badge-7BVT3zxN.cjs +1 -0
- package/dist/badge-pJqQSA13.js +23 -0
- package/dist/context-menu-_8TFbFEJ.cjs +1 -0
- package/dist/context-menu-sks9vdzC.js +906 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +45 -20
- package/dist/core.js +85 -87
- package/dist/iconBase-vJD0OXxU.cjs +1 -0
- package/dist/iconBase-zweRWSz0.js +323 -0
- package/dist/index-5hfuDpYs.cjs +223 -0
- package/dist/index-Zu-K_BX7.js +33933 -0
- package/dist/jsx-runtime-JYMCiFoE.cjs +27 -0
- package/dist/{jsx-runtime-WbnYoNE9.js → jsx-runtime-Sp0orL4X.js} +106 -109
- package/dist/plugin-P0tpo_XZ.cjs +1 -0
- package/dist/plugin-_F-KZp1i.cjs +1 -0
- package/dist/plugin-f5uJtdXY.js +43 -0
- package/dist/plugin-sJ3Hzvpv.js +57 -0
- package/dist/render.cjs +3 -1
- package/dist/render.d.ts +19 -52
- package/dist/render.js +136 -183
- package/dist/select-JW3OMYm-.js +75 -0
- package/dist/select-fXj5tdMX.cjs +1 -0
- package/dist/separator-hT24N-xp.cjs +1 -0
- package/dist/separator-sgwOa1FE.js +18 -0
- package/dist/style.css +1 -1
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.d.ts +41 -1
- package/dist/tailwind.js +16 -8
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +0 -10
- package/dist/ui.js +345 -163
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.d.ts +1 -1
- package/dist/web-blocks.js +489 -724
- package/package.json +15 -45
- package/dist/CanvasArea-fSdH_RiN.cjs +0 -1
- package/dist/CanvasArea-ut5yknzX.js +0 -168
- package/dist/CodeEditor-ypUx3RAV.cjs +0 -1
- package/dist/CurrentPage-jHSVy3hq.js +0 -120
- package/dist/CurrentPage-p_AM4lrF.cjs +0 -1
- package/dist/Functions-7jnEwJyw.js +0 -15
- package/dist/Functions-N3yhPYKY.cjs +0 -1
- package/dist/MODIFIERS-fd5XOmum.js +0 -60
- package/dist/MODIFIERS-mVmfEGgo.cjs +0 -1
- package/dist/PagesPanel-U3InJ9Db.js +0 -78
- package/dist/PagesPanel-wqDb4D-x.cjs +0 -1
- package/dist/ProjectPanel-XODJTO4J.js +0 -99
- package/dist/ProjectPanel-fWESzHr6.cjs +0 -1
- package/dist/SidePanels-lrMQqc0h.cjs +0 -1
- package/dist/Topbar-RrCDxd0i.cjs +0 -1
- package/dist/UILibrariesPanel-7btHgBD0.cjs +0 -1
- package/dist/UnsplashImages-6UjgojvF.cjs +0 -1
- package/dist/UploadImages-3h0cRsvr.cjs +0 -1
- package/dist/_commonjsHelpers-UyOWmZb0.js +0 -8
- package/dist/_commonjsHelpers-wDK0ZLPo.cjs +0 -1
- package/dist/add-page-modal-RwIj1FxH.cjs +0 -1
- package/dist/add-page-modal-TOfMfmPA.js +0 -115
- package/dist/confirm-alert-eIp2cAkc.js +0 -60
- package/dist/confirm-alert-v1lG8ex4.cjs +0 -1
- package/dist/controls-rRZhz0vu.cjs +0 -1
- package/dist/controls-yjgoZzB6.js +0 -199
- package/dist/delete-page-modal-4bxjpVBD.js +0 -97
- package/dist/delete-page-modal-qYDZmpgT.cjs +0 -1
- package/dist/email-blocks.cjs +0 -1
- package/dist/email-blocks.d.ts +0 -3
- package/dist/email-blocks.js +0 -294
- package/dist/email.cjs +0 -1
- package/dist/email.d.ts +0 -171
- package/dist/email.js +0 -90
- package/dist/empty-slot-Lsxjts7Q.js +0 -6
- package/dist/empty-slot-Sy930lX6.cjs +0 -1
- package/dist/form-4jTocVbZ.cjs +0 -1
- package/dist/form-NAzFjGs0.js +0 -125
- package/dist/functions--tdNWQDW.js +0 -30
- package/dist/functions-EVUeSwX1.cjs +0 -1
- package/dist/html-to-json-NqRjgFqp.cjs +0 -1
- package/dist/html-to-json-l_mw5y-e.js +0 -243
- package/dist/index--k2M8kzI.cjs +0 -1
- package/dist/index--mLLy7QQ.cjs +0 -1
- package/dist/index-5XyNUAjc.cjs +0 -290
- package/dist/index-C7mB4XFm.js +0 -3141
- package/dist/index-VBXQixVm.js +0 -117
- package/dist/index-YZhtVcj_.js +0 -2201
- package/dist/index-aeDphKpP.cjs +0 -1
- package/dist/index-lFgDm1oa.js +0 -83780
- package/dist/jsx-runtime-Z_BpKhVy.cjs +0 -27
- package/dist/lib.cjs +0 -3
- package/dist/lib.d.ts +0 -80
- package/dist/lib.js +0 -1350
- package/dist/page-viewer-4wrnWnK0.js +0 -124
- package/dist/page-viewer-ra0GLx1p.cjs +0 -1
- package/dist/project-general-setting-IwZUkYF3.js +0 -90
- package/dist/project-general-setting-lFjTUhHD.cjs +0 -1
- package/dist/project-seo-setting-e1fTqVsd.js +0 -83
- package/dist/project-seo-setting-o0V9acCV.cjs +0 -1
- package/dist/server.cjs +0 -1
- package/dist/server.d.ts +0 -299
- package/dist/server.js +0 -216
- package/dist/single-page-detail-ZNWFKqLW.js +0 -229
- package/dist/single-page-detail-g55Anu7R.cjs +0 -1
- package/dist/studio.cjs +0 -1
- package/dist/studio.d.ts +0 -176
- package/dist/studio.js +0 -67
- package/dist/utils-D_vtk3zK.cjs +0 -1
- package/dist/utils-VpVqnC9m.js +0 -1075
package/dist/index-C7mB4XFm.js
DELETED
|
@@ -1,3141 +0,0 @@
|
|
|
1
|
-
import { j as a } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import * as f from "react";
|
|
3
|
-
import nt, { createContext as Ls, useContext as Os, useRef as _r, createElement as Br, useReducer as zs, useEffect as Me, useDebugValue as Vs, useCallback as F, useMemo as Fs, useState as Ee, Suspense as Nt } from "react";
|
|
4
|
-
import * as Ft from "@radix-ui/react-toggle";
|
|
5
|
-
import { cva as be } from "class-variance-authority";
|
|
6
|
-
import { c as Pe, a as d } from "./utils-VpVqnC9m.js";
|
|
7
|
-
import * as Ke from "@radix-ui/react-switch";
|
|
8
|
-
import { Slot as Us } from "@radix-ui/react-slot";
|
|
9
|
-
import * as pe from "@radix-ui/react-accordion";
|
|
10
|
-
import { ChevronDownIcon as $s, Cross2Icon as at, ChevronRightIcon as rt, CheckIcon as De, DotFilledIcon as it, CaretSortIcon as Hs, MagnifyingGlassIcon as Ws } from "@radix-ui/react-icons";
|
|
11
|
-
import * as X from "@radix-ui/react-alert-dialog";
|
|
12
|
-
import * as T from "@radix-ui/react-dialog";
|
|
13
|
-
import * as Ut from "@radix-ui/react-label";
|
|
14
|
-
import * as fe from "@radix-ui/react-scroll-area";
|
|
15
|
-
import * as he from "@radix-ui/react-tabs";
|
|
16
|
-
import * as we from "@radix-ui/react-tooltip";
|
|
17
|
-
import * as Ce from "@radix-ui/react-popover";
|
|
18
|
-
import * as B from "@radix-ui/react-menubar";
|
|
19
|
-
import * as Le from "@radix-ui/react-hover-card";
|
|
20
|
-
import * as W from "@radix-ui/react-select";
|
|
21
|
-
import * as E from "@radix-ui/react-dropdown-menu";
|
|
22
|
-
import * as $t from "@radix-ui/react-separator";
|
|
23
|
-
import * as Q from "@radix-ui/react-toast";
|
|
24
|
-
import { Command as Z } from "cmdk";
|
|
25
|
-
import * as D from "@radix-ui/react-context-menu";
|
|
26
|
-
import Gs, { IconPickerItem as Ys } from "react-icons-picker";
|
|
27
|
-
import Xs from "react-dom";
|
|
28
|
-
import { flatten as de, filter as O, isString as lt, find as ae, map as M, omit as Oe, each as ue, get as q, set as ye, has as xe, memoize as ze, includes as J, cloneDeep as Or, isEmpty as Ve, without as Ht, forIn as Wt, isObject as Ks, first as ee, noop as qe, keys as Je, startsWith as Gt, isNull as Ze, pick as kt, sortBy as At, chunk as qs } from "lodash-es";
|
|
29
|
-
import Js from "react-quill";
|
|
30
|
-
import { g as me, a as Zs } from "./Functions-7jnEwJyw.js";
|
|
31
|
-
import { getBlockComponent as Fe } from "@chaibuilder/runtime";
|
|
32
|
-
import { atom as v, useAtomValue as te, useAtom as z, useSetAtom as je } from "jotai";
|
|
33
|
-
import { I as Qs, S as Qe, B as et, a as ge } from "./MODIFIERS-fd5XOmum.js";
|
|
34
|
-
import { g as eo } from "./_commonjsHelpers-UyOWmZb0.js";
|
|
35
|
-
import { useThrottledCallback as to } from "@react-hookz/web";
|
|
36
|
-
import so from "tree-model";
|
|
37
|
-
import "react-i18next";
|
|
38
|
-
var G = { VITE_OPENAI_API_KEY: "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", VITE_UNSPASH_ACCESS_KEY: "XgYBCm-XCHecRMsbfhw6oZWGkltco1U5TYMEd0LXZeA", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
39
|
-
let oo = 0;
|
|
40
|
-
function ce(e, t) {
|
|
41
|
-
const s = `atom${++oo}`, o = {
|
|
42
|
-
toString: () => s
|
|
43
|
-
};
|
|
44
|
-
return typeof e == "function" ? o.read = e : (o.init = e, o.read = (n) => n(o), o.write = (n, r, i) => r(
|
|
45
|
-
o,
|
|
46
|
-
typeof i == "function" ? i(n(o)) : i
|
|
47
|
-
)), t && (o.write = t), o;
|
|
48
|
-
}
|
|
49
|
-
const He = (e) => "init" in e, We = (e) => !!e.write, Ie = /* @__PURE__ */ new WeakMap(), no = (e, t) => {
|
|
50
|
-
Ie.set(e, t), e.catch(() => {
|
|
51
|
-
}).finally(() => Ie.delete(e));
|
|
52
|
-
}, St = (e, t) => {
|
|
53
|
-
const s = Ie.get(e);
|
|
54
|
-
s && (Ie.delete(e), s(t));
|
|
55
|
-
}, Ct = (e, t) => {
|
|
56
|
-
e.status = "fulfilled", e.value = t;
|
|
57
|
-
}, jt = (e, t) => {
|
|
58
|
-
e.status = "rejected", e.reason = t;
|
|
59
|
-
}, ao = (e) => typeof (e == null ? void 0 : e.then) == "function", Ae = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v), _t = (e, t) => "e" in e && "e" in t && Object.is(e.e, t.e), ve = (e) => "v" in e && e.v instanceof Promise, ro = (e, t) => "v" in e && "v" in t && e.v.orig && e.v.orig === t.v.orig, Be = (e) => {
|
|
60
|
-
if ("e" in e)
|
|
61
|
-
throw e.e;
|
|
62
|
-
return e.v;
|
|
63
|
-
}, io = () => {
|
|
64
|
-
const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new Map();
|
|
65
|
-
let o, n, r;
|
|
66
|
-
(G ? "production" : void 0) !== "production" && (o = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set());
|
|
67
|
-
const i = (u) => e.get(u), c = (u, g) => {
|
|
68
|
-
(G ? "production" : void 0) !== "production" && Object.freeze(g);
|
|
69
|
-
const x = e.get(u);
|
|
70
|
-
if (e.set(u, g), s.has(u) || s.set(u, x), x && ve(x)) {
|
|
71
|
-
const b = "v" in g ? g.v instanceof Promise ? g.v : Promise.resolve(g.v) : Promise.reject(g.e);
|
|
72
|
-
St(x.v, b);
|
|
73
|
-
}
|
|
74
|
-
}, m = (u, g, x) => {
|
|
75
|
-
const b = /* @__PURE__ */ new Map();
|
|
76
|
-
let y = !1;
|
|
77
|
-
x.forEach((h, A) => {
|
|
78
|
-
!h && A === u && (h = g), h ? (b.set(A, h), g.d.get(A) !== h && (y = !0)) : (G ? "production" : void 0) !== "production" && console.warn("[Bug] atom state not found");
|
|
79
|
-
}), (y || g.d.size !== b.size) && (g.d = b);
|
|
80
|
-
}, l = (u, g, x) => {
|
|
81
|
-
const b = i(u), y = {
|
|
82
|
-
d: (b == null ? void 0 : b.d) || /* @__PURE__ */ new Map(),
|
|
83
|
-
v: g
|
|
84
|
-
};
|
|
85
|
-
if (x && m(u, y, x), b && Ae(b, y) && b.d === y.d)
|
|
86
|
-
return b;
|
|
87
|
-
if (b && ve(b) && ve(y) && ro(b, y)) {
|
|
88
|
-
if (b.d === y.d)
|
|
89
|
-
return b;
|
|
90
|
-
y.v = b.v;
|
|
91
|
-
}
|
|
92
|
-
return c(u, y), y;
|
|
93
|
-
}, p = (u, g, x, b) => {
|
|
94
|
-
if (ao(g)) {
|
|
95
|
-
let y;
|
|
96
|
-
const h = new Promise((A, V) => {
|
|
97
|
-
let C = !1;
|
|
98
|
-
g.then(
|
|
99
|
-
(R) => {
|
|
100
|
-
if (!C) {
|
|
101
|
-
C = !0;
|
|
102
|
-
const j = i(u), oe = l(
|
|
103
|
-
u,
|
|
104
|
-
h,
|
|
105
|
-
x
|
|
106
|
-
);
|
|
107
|
-
Ct(h, R), A(R), (j == null ? void 0 : j.d) !== oe.d && H(u, oe, j == null ? void 0 : j.d);
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
(R) => {
|
|
111
|
-
if (!C) {
|
|
112
|
-
C = !0;
|
|
113
|
-
const j = i(u), oe = l(
|
|
114
|
-
u,
|
|
115
|
-
h,
|
|
116
|
-
x
|
|
117
|
-
);
|
|
118
|
-
jt(h, R), V(R), (j == null ? void 0 : j.d) !== oe.d && H(u, oe, j == null ? void 0 : j.d);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
), y = (R) => {
|
|
122
|
-
C || (C = !0, R.then(
|
|
123
|
-
(j) => Ct(h, j),
|
|
124
|
-
(j) => jt(h, j)
|
|
125
|
-
), A(R));
|
|
126
|
-
};
|
|
127
|
-
});
|
|
128
|
-
return h.orig = g, h.status = "pending", no(h, (A) => {
|
|
129
|
-
A && y(A), b == null || b();
|
|
130
|
-
}), l(u, h, x);
|
|
131
|
-
}
|
|
132
|
-
return l(u, g, x);
|
|
133
|
-
}, w = (u, g, x) => {
|
|
134
|
-
const b = i(u), y = {
|
|
135
|
-
d: (b == null ? void 0 : b.d) || /* @__PURE__ */ new Map(),
|
|
136
|
-
e: g
|
|
137
|
-
};
|
|
138
|
-
return x && m(u, y, x), b && _t(b, y) && b.d === y.d ? b : (c(u, y), y);
|
|
139
|
-
}, k = (u) => {
|
|
140
|
-
const g = i(u);
|
|
141
|
-
if (g && (g.d.forEach((C, R) => {
|
|
142
|
-
R !== u && !t.has(R) && k(R);
|
|
143
|
-
}), Array.from(g.d).every(([C, R]) => {
|
|
144
|
-
const j = i(C);
|
|
145
|
-
return C === u || j === R || // TODO This is a hack, we should find a better solution.
|
|
146
|
-
j && !ve(j) && Ae(j, R);
|
|
147
|
-
})))
|
|
148
|
-
return g;
|
|
149
|
-
const x = /* @__PURE__ */ new Map();
|
|
150
|
-
let b = !0;
|
|
151
|
-
const y = (C) => {
|
|
152
|
-
if (C === u) {
|
|
153
|
-
const j = i(C);
|
|
154
|
-
if (j)
|
|
155
|
-
return x.set(C, j), Be(j);
|
|
156
|
-
if (He(C))
|
|
157
|
-
return x.set(C, void 0), C.init;
|
|
158
|
-
throw new Error("no atom init");
|
|
159
|
-
}
|
|
160
|
-
const R = k(C);
|
|
161
|
-
return x.set(C, R), Be(R);
|
|
162
|
-
};
|
|
163
|
-
let h, A;
|
|
164
|
-
const V = {
|
|
165
|
-
get signal() {
|
|
166
|
-
return h || (h = new AbortController()), h.signal;
|
|
167
|
-
},
|
|
168
|
-
get setSelf() {
|
|
169
|
-
return (G ? "production" : void 0) !== "production" && !We(u) && console.warn("setSelf function cannot be used with read-only atom"), !A && We(u) && (A = (...C) => {
|
|
170
|
-
if ((G ? "production" : void 0) !== "production" && b && console.warn("setSelf function cannot be called in sync"), !b)
|
|
171
|
-
return I(u, ...C);
|
|
172
|
-
}), A;
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
try {
|
|
176
|
-
const C = u.read(y, V);
|
|
177
|
-
return p(
|
|
178
|
-
u,
|
|
179
|
-
C,
|
|
180
|
-
x,
|
|
181
|
-
() => h == null ? void 0 : h.abort()
|
|
182
|
-
);
|
|
183
|
-
} catch (C) {
|
|
184
|
-
return w(u, C, x);
|
|
185
|
-
} finally {
|
|
186
|
-
b = !1;
|
|
187
|
-
}
|
|
188
|
-
}, L = (u) => Be(k(u)), N = (u) => {
|
|
189
|
-
let g = t.get(u);
|
|
190
|
-
return g || (g = U(u)), g;
|
|
191
|
-
}, S = (u, g) => !g.l.size && (!g.t.size || g.t.size === 1 && g.t.has(u)), _ = (u) => {
|
|
192
|
-
const g = t.get(u);
|
|
193
|
-
g && S(u, g) && Y(u);
|
|
194
|
-
}, $ = (u) => {
|
|
195
|
-
const g = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new WeakMap(), b = (h) => {
|
|
196
|
-
const A = t.get(h);
|
|
197
|
-
A == null || A.t.forEach((V) => {
|
|
198
|
-
V !== h && (g.set(
|
|
199
|
-
V,
|
|
200
|
-
(g.get(V) || /* @__PURE__ */ new Set()).add(h)
|
|
201
|
-
), x.set(V, (x.get(V) || 0) + 1), b(V));
|
|
202
|
-
});
|
|
203
|
-
};
|
|
204
|
-
b(u);
|
|
205
|
-
const y = (h) => {
|
|
206
|
-
const A = t.get(h);
|
|
207
|
-
A == null || A.t.forEach((V) => {
|
|
208
|
-
var C;
|
|
209
|
-
if (V !== h) {
|
|
210
|
-
let R = x.get(V);
|
|
211
|
-
if (R && x.set(V, --R), !R) {
|
|
212
|
-
let j = !!((C = g.get(V)) != null && C.size);
|
|
213
|
-
if (j) {
|
|
214
|
-
const oe = i(V), Ds = k(V);
|
|
215
|
-
j = !oe || !Ae(oe, Ds);
|
|
216
|
-
}
|
|
217
|
-
j || g.forEach((oe) => oe.delete(V));
|
|
218
|
-
}
|
|
219
|
-
y(V);
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
};
|
|
223
|
-
y(u);
|
|
224
|
-
}, P = (u, ...g) => {
|
|
225
|
-
let x = !0;
|
|
226
|
-
const b = (A) => Be(k(A)), y = (A, ...V) => {
|
|
227
|
-
let C;
|
|
228
|
-
if (A === u) {
|
|
229
|
-
if (!He(A))
|
|
230
|
-
throw new Error("atom not writable");
|
|
231
|
-
const R = i(A), j = p(A, V[0]);
|
|
232
|
-
(!R || !Ae(R, j)) && $(A);
|
|
233
|
-
} else
|
|
234
|
-
C = P(A, ...V);
|
|
235
|
-
if (!x) {
|
|
236
|
-
const R = se();
|
|
237
|
-
(G ? "production" : void 0) !== "production" && n.forEach(
|
|
238
|
-
(j) => j({ type: "async-write", flushed: R })
|
|
239
|
-
);
|
|
240
|
-
}
|
|
241
|
-
return C;
|
|
242
|
-
}, h = u.write(b, y, ...g);
|
|
243
|
-
return x = !1, h;
|
|
244
|
-
}, I = (u, ...g) => {
|
|
245
|
-
const x = P(u, ...g), b = se();
|
|
246
|
-
return (G ? "production" : void 0) !== "production" && n.forEach(
|
|
247
|
-
(y) => y({ type: "write", flushed: b })
|
|
248
|
-
), x;
|
|
249
|
-
}, U = (u, g) => {
|
|
250
|
-
const x = {
|
|
251
|
-
t: new Set(g && [g]),
|
|
252
|
-
l: /* @__PURE__ */ new Set()
|
|
253
|
-
};
|
|
254
|
-
if (t.set(u, x), (G ? "production" : void 0) !== "production" && r.add(u), k(u).d.forEach((b, y) => {
|
|
255
|
-
const h = t.get(y);
|
|
256
|
-
h ? h.t.add(u) : y !== u && U(y, u);
|
|
257
|
-
}), k(u), We(u) && u.onMount) {
|
|
258
|
-
const b = u.onMount((...y) => I(u, ...y));
|
|
259
|
-
b && (x.u = b);
|
|
260
|
-
}
|
|
261
|
-
return x;
|
|
262
|
-
}, Y = (u) => {
|
|
263
|
-
var g;
|
|
264
|
-
const x = (g = t.get(u)) == null ? void 0 : g.u;
|
|
265
|
-
x && x(), t.delete(u), (G ? "production" : void 0) !== "production" && r.delete(u);
|
|
266
|
-
const b = i(u);
|
|
267
|
-
b ? (ve(b) && St(b.v), b.d.forEach((y, h) => {
|
|
268
|
-
if (h !== u) {
|
|
269
|
-
const A = t.get(h);
|
|
270
|
-
A && (A.t.delete(u), S(h, A) && Y(h));
|
|
271
|
-
}
|
|
272
|
-
})) : (G ? "production" : void 0) !== "production" && console.warn("[Bug] could not find atom state to unmount", u);
|
|
273
|
-
}, H = (u, g, x) => {
|
|
274
|
-
const b = new Set(g.d.keys());
|
|
275
|
-
x == null || x.forEach((y, h) => {
|
|
276
|
-
if (b.has(h)) {
|
|
277
|
-
b.delete(h);
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
const A = t.get(h);
|
|
281
|
-
A && (A.t.delete(u), S(h, A) && Y(h));
|
|
282
|
-
}), b.forEach((y) => {
|
|
283
|
-
const h = t.get(y);
|
|
284
|
-
h ? h.t.add(u) : t.has(u) && U(y, u);
|
|
285
|
-
});
|
|
286
|
-
}, se = () => {
|
|
287
|
-
let u;
|
|
288
|
-
for ((G ? "production" : void 0) !== "production" && (u = /* @__PURE__ */ new Set()); s.size; ) {
|
|
289
|
-
const g = Array.from(s);
|
|
290
|
-
s.clear(), g.forEach(([x, b]) => {
|
|
291
|
-
const y = i(x);
|
|
292
|
-
if (y) {
|
|
293
|
-
y.d !== (b == null ? void 0 : b.d) && H(x, y, b == null ? void 0 : b.d);
|
|
294
|
-
const h = t.get(x);
|
|
295
|
-
h && !// TODO This seems pretty hacky. Hope to fix it.
|
|
296
|
-
// Maybe we could `mountDependencies` in `setAtomState`?
|
|
297
|
-
(b && !ve(b) && (Ae(b, y) || _t(b, y))) && (h.l.forEach((A) => A()), (G ? "production" : void 0) !== "production" && u.add(x));
|
|
298
|
-
} else
|
|
299
|
-
(G ? "production" : void 0) !== "production" && console.warn("[Bug] no atom state to flush");
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
if ((G ? "production" : void 0) !== "production")
|
|
303
|
-
return o.forEach((g) => g("state")), u;
|
|
304
|
-
}, K = (u, g) => {
|
|
305
|
-
const x = N(u), b = se(), y = x.l;
|
|
306
|
-
return y.add(g), (G ? "production" : void 0) !== "production" && (o.forEach((h) => h("sub")), n.forEach(
|
|
307
|
-
(h) => h({ type: "sub", flushed: b })
|
|
308
|
-
)), () => {
|
|
309
|
-
y.delete(g), _(u), (G ? "production" : void 0) !== "production" && (o.forEach((h) => h("unsub")), n.forEach((h) => h({ type: "unsub" })));
|
|
310
|
-
};
|
|
311
|
-
};
|
|
312
|
-
return (G ? "production" : void 0) !== "production" ? {
|
|
313
|
-
get: L,
|
|
314
|
-
set: I,
|
|
315
|
-
sub: K,
|
|
316
|
-
// store dev methods (these are tentative and subject to change without notice)
|
|
317
|
-
dev_subscribe_store: (u, g) => g !== 2 ? (console.warn(
|
|
318
|
-
"The current StoreListener revision is 2. The older ones are deprecated."
|
|
319
|
-
), o.add(u), () => {
|
|
320
|
-
o.delete(u);
|
|
321
|
-
}) : (n.add(u), () => {
|
|
322
|
-
n.delete(u);
|
|
323
|
-
}),
|
|
324
|
-
dev_get_mounted_atoms: () => r.values(),
|
|
325
|
-
dev_get_atom_state: (u) => e.get(u),
|
|
326
|
-
dev_get_mounted: (u) => t.get(u),
|
|
327
|
-
dev_restore_atoms: (u) => {
|
|
328
|
-
for (const [x, b] of u)
|
|
329
|
-
He(x) && (p(x, b), $(x));
|
|
330
|
-
const g = se();
|
|
331
|
-
n.forEach(
|
|
332
|
-
(x) => x({ type: "restore", flushed: g })
|
|
333
|
-
);
|
|
334
|
-
}
|
|
335
|
-
} : {
|
|
336
|
-
get: L,
|
|
337
|
-
set: I,
|
|
338
|
-
sub: K
|
|
339
|
-
};
|
|
340
|
-
};
|
|
341
|
-
let Ge;
|
|
342
|
-
const lo = () => (Ge || (Ge = io()), Ge);
|
|
343
|
-
var ct = { VITE_OPENAI_API_KEY: "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", VITE_UNSPASH_ACCESS_KEY: "XgYBCm-XCHecRMsbfhw6oZWGkltco1U5TYMEd0LXZeA", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
344
|
-
const Yt = Symbol();
|
|
345
|
-
const Bt = (e, t, s) => (t.has(s) ? t : t.set(s, e())).get(s), co = /* @__PURE__ */ new WeakMap(), uo = (e, t, s) => {
|
|
346
|
-
const o = Bt(() => /* @__PURE__ */ new WeakMap(), co, t);
|
|
347
|
-
return Bt(e, o, s);
|
|
348
|
-
}, fo = {}, Pt = (e) => !!e.write, mo = (e) => typeof e == "function";
|
|
349
|
-
function po(e, t) {
|
|
350
|
-
return uo(
|
|
351
|
-
() => {
|
|
352
|
-
const s = /* @__PURE__ */ new WeakMap(), o = (i, c) => {
|
|
353
|
-
let m = s.get(i);
|
|
354
|
-
if (m)
|
|
355
|
-
return m;
|
|
356
|
-
const l = c && s.get(c), p = [], w = [];
|
|
357
|
-
return i.forEach((k, L) => {
|
|
358
|
-
const N = t ? t(k) : L;
|
|
359
|
-
w[L] = N;
|
|
360
|
-
const S = l && l.atomList[l.keyList.indexOf(N)];
|
|
361
|
-
if (S) {
|
|
362
|
-
p[L] = S;
|
|
363
|
-
return;
|
|
364
|
-
}
|
|
365
|
-
const _ = (P) => {
|
|
366
|
-
const I = P(n), U = P(e), H = o(U, I == null ? void 0 : I.arr).keyList.indexOf(N);
|
|
367
|
-
if (H < 0 || H >= U.length) {
|
|
368
|
-
const se = i[o(i).keyList.indexOf(N)];
|
|
369
|
-
if (se)
|
|
370
|
-
return se;
|
|
371
|
-
throw new Error("splitAtom: index out of bounds for read");
|
|
372
|
-
}
|
|
373
|
-
return U[H];
|
|
374
|
-
}, $ = (P, I, U) => {
|
|
375
|
-
const Y = P(n), H = P(e), K = o(H, Y == null ? void 0 : Y.arr).keyList.indexOf(N);
|
|
376
|
-
if (K < 0 || K >= H.length)
|
|
377
|
-
throw new Error("splitAtom: index out of bounds for write");
|
|
378
|
-
const u = mo(U) ? U(H[K]) : U;
|
|
379
|
-
I(e, [
|
|
380
|
-
...H.slice(0, K),
|
|
381
|
-
u,
|
|
382
|
-
...H.slice(K + 1)
|
|
383
|
-
]);
|
|
384
|
-
};
|
|
385
|
-
p[L] = Pt(e) ? ce(_, $) : ce(_);
|
|
386
|
-
}), l && l.keyList.length === w.length && l.keyList.every((k, L) => k === w[L]) ? m = l : m = { arr: i, atomList: p, keyList: w }, s.set(i, m), m;
|
|
387
|
-
}, n = ce((i) => {
|
|
388
|
-
const c = i(n), m = i(e);
|
|
389
|
-
return o(m, c == null ? void 0 : c.arr);
|
|
390
|
-
});
|
|
391
|
-
(ct ? "production" : void 0) !== "production" && (n.debugPrivate = !0), n.init = void 0;
|
|
392
|
-
const r = Pt(e) ? ce(
|
|
393
|
-
(i) => i(n).atomList,
|
|
394
|
-
(i, c, m) => {
|
|
395
|
-
switch (m.type) {
|
|
396
|
-
case "remove": {
|
|
397
|
-
const l = i(r).indexOf(m.atom);
|
|
398
|
-
if (l >= 0) {
|
|
399
|
-
const p = i(e);
|
|
400
|
-
c(e, [
|
|
401
|
-
...p.slice(0, l),
|
|
402
|
-
...p.slice(l + 1)
|
|
403
|
-
]);
|
|
404
|
-
}
|
|
405
|
-
break;
|
|
406
|
-
}
|
|
407
|
-
case "insert": {
|
|
408
|
-
const l = m.before ? i(r).indexOf(m.before) : i(r).length;
|
|
409
|
-
if (l >= 0) {
|
|
410
|
-
const p = i(e);
|
|
411
|
-
c(e, [
|
|
412
|
-
...p.slice(0, l),
|
|
413
|
-
m.value,
|
|
414
|
-
...p.slice(l)
|
|
415
|
-
]);
|
|
416
|
-
}
|
|
417
|
-
break;
|
|
418
|
-
}
|
|
419
|
-
case "move": {
|
|
420
|
-
const l = i(r).indexOf(m.atom), p = m.before ? i(r).indexOf(m.before) : i(r).length;
|
|
421
|
-
if (l >= 0 && p >= 0) {
|
|
422
|
-
const w = i(e);
|
|
423
|
-
l < p ? c(e, [
|
|
424
|
-
...w.slice(0, l),
|
|
425
|
-
...w.slice(l + 1, p),
|
|
426
|
-
w[l],
|
|
427
|
-
...w.slice(p)
|
|
428
|
-
]) : c(e, [
|
|
429
|
-
...w.slice(0, p),
|
|
430
|
-
w[l],
|
|
431
|
-
...w.slice(p, l),
|
|
432
|
-
...w.slice(l + 1)
|
|
433
|
-
]);
|
|
434
|
-
}
|
|
435
|
-
break;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
) : ce((i) => i(n).atomList);
|
|
440
|
-
return r;
|
|
441
|
-
},
|
|
442
|
-
e,
|
|
443
|
-
t || fo
|
|
444
|
-
);
|
|
445
|
-
}
|
|
446
|
-
function Xr(e) {
|
|
447
|
-
const t = Symbol(), s = ce(t);
|
|
448
|
-
(ct ? "production" : void 0) !== "production" && (s.debugPrivate = !0);
|
|
449
|
-
const o = ce(
|
|
450
|
-
(n, r) => {
|
|
451
|
-
const i = n(s);
|
|
452
|
-
return i !== t ? i : e(n, r);
|
|
453
|
-
},
|
|
454
|
-
(n, r, i) => {
|
|
455
|
-
if (i === Yt)
|
|
456
|
-
r(s, t);
|
|
457
|
-
else if (typeof i == "function") {
|
|
458
|
-
const c = n(o);
|
|
459
|
-
r(s, i(c));
|
|
460
|
-
} else
|
|
461
|
-
r(s, i);
|
|
462
|
-
}
|
|
463
|
-
);
|
|
464
|
-
return o;
|
|
465
|
-
}
|
|
466
|
-
const go = (e) => typeof (e == null ? void 0 : e.then) == "function";
|
|
467
|
-
function bo(e) {
|
|
468
|
-
let t, s;
|
|
469
|
-
const o = {
|
|
470
|
-
getItem: (n, r) => {
|
|
471
|
-
var i, c;
|
|
472
|
-
const m = (p) => {
|
|
473
|
-
if (p = p || "", t !== p) {
|
|
474
|
-
try {
|
|
475
|
-
s = JSON.parse(p);
|
|
476
|
-
} catch {
|
|
477
|
-
return r;
|
|
478
|
-
}
|
|
479
|
-
t = p;
|
|
480
|
-
}
|
|
481
|
-
return s;
|
|
482
|
-
}, l = (c = (i = e()) == null ? void 0 : i.getItem(n)) != null ? c : null;
|
|
483
|
-
return go(l) ? l.then(m) : m(l);
|
|
484
|
-
},
|
|
485
|
-
setItem: (n, r) => {
|
|
486
|
-
var i;
|
|
487
|
-
return (i = e()) == null ? void 0 : i.setItem(n, JSON.stringify(r));
|
|
488
|
-
},
|
|
489
|
-
removeItem: (n) => {
|
|
490
|
-
var r;
|
|
491
|
-
return (r = e()) == null ? void 0 : r.removeItem(n);
|
|
492
|
-
}
|
|
493
|
-
};
|
|
494
|
-
return typeof window < "u" && typeof window.addEventListener == "function" && (o.subscribe = (n, r, i) => {
|
|
495
|
-
if (!(e() instanceof window.Storage))
|
|
496
|
-
return () => {
|
|
497
|
-
};
|
|
498
|
-
const c = (m) => {
|
|
499
|
-
if (m.storageArea === e() && m.key === n) {
|
|
500
|
-
let l;
|
|
501
|
-
try {
|
|
502
|
-
l = JSON.parse(m.newValue || "");
|
|
503
|
-
} catch {
|
|
504
|
-
l = i;
|
|
505
|
-
}
|
|
506
|
-
r(l);
|
|
507
|
-
}
|
|
508
|
-
};
|
|
509
|
-
return window.addEventListener("storage", c), () => {
|
|
510
|
-
window.removeEventListener("storage", c);
|
|
511
|
-
};
|
|
512
|
-
}), o;
|
|
513
|
-
}
|
|
514
|
-
const ho = bo(
|
|
515
|
-
() => typeof window < "u" ? window.localStorage : void 0
|
|
516
|
-
);
|
|
517
|
-
function Ne(e, t, s = ho, o) {
|
|
518
|
-
const n = o == null ? void 0 : o.unstable_getOnInit, r = ce(
|
|
519
|
-
n ? s.getItem(e, t) : t
|
|
520
|
-
);
|
|
521
|
-
return (ct ? "production" : void 0) !== "production" && (r.debugPrivate = !0), r.onMount = (c) => {
|
|
522
|
-
n || c(s.getItem(e, t));
|
|
523
|
-
let m;
|
|
524
|
-
return s.subscribe && (m = s.subscribe(e, c, t)), m;
|
|
525
|
-
}, ce(
|
|
526
|
-
(c) => c(r),
|
|
527
|
-
(c, m, l) => {
|
|
528
|
-
const p = typeof l == "function" ? l(c(r)) : l;
|
|
529
|
-
return p === Yt ? (m(r, t), s.removeItem(e)) : p instanceof Promise ? p.then((w) => (m(r, w), s.setItem(e, w))) : (m(r, p), s.setItem(e, p));
|
|
530
|
-
}
|
|
531
|
-
);
|
|
532
|
-
}
|
|
533
|
-
var xo = { VITE_OPENAI_API_KEY: "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", VITE_UNSPASH_ACCESS_KEY: "XgYBCm-XCHecRMsbfhw6oZWGkltco1U5TYMEd0LXZeA", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
534
|
-
const vo = Ls(void 0), Xt = (e) => {
|
|
535
|
-
const t = Os(vo);
|
|
536
|
-
return (e == null ? void 0 : e.store) || t || lo();
|
|
537
|
-
};
|
|
538
|
-
const yo = (e) => typeof (e == null ? void 0 : e.then) == "function", wo = nt.use || ((e) => {
|
|
539
|
-
if (e.status === "pending")
|
|
540
|
-
throw e;
|
|
541
|
-
if (e.status === "fulfilled")
|
|
542
|
-
return e.value;
|
|
543
|
-
throw e.status === "rejected" ? e.reason : (e.status = "pending", e.then(
|
|
544
|
-
(t) => {
|
|
545
|
-
e.status = "fulfilled", e.value = t;
|
|
546
|
-
},
|
|
547
|
-
(t) => {
|
|
548
|
-
e.status = "rejected", e.reason = t;
|
|
549
|
-
}
|
|
550
|
-
), e);
|
|
551
|
-
});
|
|
552
|
-
function No(e, t) {
|
|
553
|
-
const s = Xt(t), [[o, n, r], i] = zs(
|
|
554
|
-
(l) => {
|
|
555
|
-
const p = s.get(e);
|
|
556
|
-
return Object.is(l[0], p) && l[1] === s && l[2] === e ? l : [p, s, e];
|
|
557
|
-
},
|
|
558
|
-
void 0,
|
|
559
|
-
() => [s.get(e), s, e]
|
|
560
|
-
);
|
|
561
|
-
let c = o;
|
|
562
|
-
(n !== s || r !== e) && (i(), c = s.get(e));
|
|
563
|
-
const m = t == null ? void 0 : t.delay;
|
|
564
|
-
return Me(() => {
|
|
565
|
-
const l = s.sub(e, () => {
|
|
566
|
-
if (typeof m == "number") {
|
|
567
|
-
setTimeout(i, m);
|
|
568
|
-
return;
|
|
569
|
-
}
|
|
570
|
-
i();
|
|
571
|
-
});
|
|
572
|
-
return i(), l;
|
|
573
|
-
}, [s, e, m]), Vs(c), yo(c) ? wo(c) : c;
|
|
574
|
-
}
|
|
575
|
-
function ko(e, t) {
|
|
576
|
-
const s = Xt(t);
|
|
577
|
-
return F(
|
|
578
|
-
(...n) => {
|
|
579
|
-
if ((xo ? "production" : void 0) !== "production" && !("write" in e))
|
|
580
|
-
throw new Error("not writable atom");
|
|
581
|
-
return s.set(e, ...n);
|
|
582
|
-
},
|
|
583
|
-
[s, e]
|
|
584
|
-
);
|
|
585
|
-
}
|
|
586
|
-
function Ao(e, t) {
|
|
587
|
-
return [
|
|
588
|
-
No(e, t),
|
|
589
|
-
// We do wrong type assertion here, which results in throwing an error.
|
|
590
|
-
ko(e, t)
|
|
591
|
-
];
|
|
592
|
-
}
|
|
593
|
-
function Kt(e, t, s) {
|
|
594
|
-
const o = O(e, (r) => r._parent === t), n = [];
|
|
595
|
-
for (let r = 0; r < o.length; r++) {
|
|
596
|
-
const i = Jt(o[r]);
|
|
597
|
-
if (Object.keys(i).length > 0 && Object.keys(i).forEach((c) => {
|
|
598
|
-
o[r][c] = `slot:${me()}`;
|
|
599
|
-
}), O(e, { _parent: o[r]._id }).length > 0) {
|
|
600
|
-
const c = me();
|
|
601
|
-
n.push({ ...o[r], oldId: o[r]._id, _id: c, _parent: s }), n.push(de(Kt(e, o[r]._id, c)));
|
|
602
|
-
} else
|
|
603
|
-
n.push({
|
|
604
|
-
...o[r],
|
|
605
|
-
oldId: o[r]._id,
|
|
606
|
-
_id: me(),
|
|
607
|
-
_parent: s
|
|
608
|
-
});
|
|
609
|
-
}
|
|
610
|
-
return de(n);
|
|
611
|
-
}
|
|
612
|
-
function qt(e) {
|
|
613
|
-
const t = {};
|
|
614
|
-
e.forEach((o) => {
|
|
615
|
-
t[o._id] = { ...o, children: [] };
|
|
616
|
-
});
|
|
617
|
-
const s = [];
|
|
618
|
-
return e.forEach((o) => {
|
|
619
|
-
if (o._parent) {
|
|
620
|
-
const n = t[o._parent];
|
|
621
|
-
n && n.children.push(t[o._id]);
|
|
622
|
-
} else
|
|
623
|
-
s.push(t[o._id]);
|
|
624
|
-
}), s;
|
|
625
|
-
}
|
|
626
|
-
const Jt = (e) => {
|
|
627
|
-
const t = {};
|
|
628
|
-
return Object.keys(e).forEach((s) => {
|
|
629
|
-
lt(e[s]) && e[s].startsWith("slot") && (t[s] = e[s].replace("slot:", ""));
|
|
630
|
-
}), t;
|
|
631
|
-
}, So = (e, t, s = null) => {
|
|
632
|
-
let o = ae(e, { _id: t });
|
|
633
|
-
o = { ...o, oldId: o._id, _id: me() }, s && (o = { ...o, _parent: s });
|
|
634
|
-
const n = [o];
|
|
635
|
-
O(e, { _parent: t }).length > 0 && n.push(de(Kt(e, t, o._id)));
|
|
636
|
-
const r = de(n);
|
|
637
|
-
return M(r, (i) => {
|
|
638
|
-
const c = i, m = Jt(c);
|
|
639
|
-
return Object.keys(m).length > 0 && Object.keys(m).forEach((l) => {
|
|
640
|
-
const p = ae(r, { oldId: m[l].replace("slot:", "") });
|
|
641
|
-
c[l] = `slot:${p._id}`;
|
|
642
|
-
}), Oe(c, ["global", "oldId"]);
|
|
643
|
-
});
|
|
644
|
-
};
|
|
645
|
-
const re = v([]);
|
|
646
|
-
re.debugLabel = "presentBlocksAtom";
|
|
647
|
-
const Co = v((e) => {
|
|
648
|
-
const t = e(re);
|
|
649
|
-
return qt([...t]);
|
|
650
|
-
});
|
|
651
|
-
Co.debugLabel = "treeDSBlocks";
|
|
652
|
-
re.debugLabel = "presentBlocksAtom";
|
|
653
|
-
const dt = po(re);
|
|
654
|
-
dt.debugLabel = "pageBlocksAtomsAtom";
|
|
655
|
-
const jo = v("");
|
|
656
|
-
jo.debugLabel = "builderActivePageAtom";
|
|
657
|
-
const _o = v(-1);
|
|
658
|
-
_o.debugLabel = "destinationDropIndexAtom";
|
|
659
|
-
const Zt = v([]);
|
|
660
|
-
Zt.debugLabel = "buildingBlocksAtom";
|
|
661
|
-
const Bo = v((e) => {
|
|
662
|
-
const t = e(Zt);
|
|
663
|
-
return O(t, (s) => xe(s, "blockId"));
|
|
664
|
-
});
|
|
665
|
-
Bo.debugLabel = "globalBlocksAtom";
|
|
666
|
-
const Rt = ze((e, t) => {
|
|
667
|
-
if (!e)
|
|
668
|
-
return !0;
|
|
669
|
-
const s = Fe(e);
|
|
670
|
-
return s && xe(s, "canAcceptBlock") ? s.canAcceptBlock(t) : !1;
|
|
671
|
-
}), Kr = ze((e, t) => {
|
|
672
|
-
const s = Fe(t);
|
|
673
|
-
return s && xe(s, "canBeNested") ? s.canBeNested(e) : !0;
|
|
674
|
-
}), qr = ze((e) => {
|
|
675
|
-
const t = Fe(e);
|
|
676
|
-
return t && xe(t, "canDuplicate") ? t.canDuplicate() : !0;
|
|
677
|
-
}), Jr = ze((e) => {
|
|
678
|
-
const t = Fe(e);
|
|
679
|
-
return t && xe(t, "canDelete") ? t.canDelete() : !0;
|
|
680
|
-
});
|
|
681
|
-
const ut = v([]);
|
|
682
|
-
ut.debugLabel = "selectedBlockIdsAtom";
|
|
683
|
-
const ft = v((e) => {
|
|
684
|
-
const t = e(re), s = e(ut);
|
|
685
|
-
return M(
|
|
686
|
-
O(t, ({ _id: o }) => J(s, o)),
|
|
687
|
-
(o) => ({ ...o })
|
|
688
|
-
);
|
|
689
|
-
});
|
|
690
|
-
ft.debugLabel = "selectedBlocksAtom";
|
|
691
|
-
const Ue = v((e) => {
|
|
692
|
-
const t = e(ft);
|
|
693
|
-
if (t.length === 0)
|
|
694
|
-
return null;
|
|
695
|
-
if (t.length === 1)
|
|
696
|
-
return t[0];
|
|
697
|
-
});
|
|
698
|
-
Ue.debugLabel = "selectedBlockAtom";
|
|
699
|
-
const Po = (e) => q(e, "_parent", null), Ro = v((e) => {
|
|
700
|
-
const t = e(ft), s = M(t, Po);
|
|
701
|
-
return O(e(re), (o) => J(s, o._id));
|
|
702
|
-
});
|
|
703
|
-
Ro.debugLabel = "selectedBlocksParentsAtom";
|
|
704
|
-
const Qt = v(() => !1);
|
|
705
|
-
Qt.debugLabel = "selectedBlockFlexChildAtom";
|
|
706
|
-
const es = v(() => !1);
|
|
707
|
-
es.debugLabel = "selectedBlockGridChildAtom";
|
|
708
|
-
const mt = v("");
|
|
709
|
-
mt.debugLabel = "styleStateAtom";
|
|
710
|
-
const ts = Ne("styleBreakpoint", "xs");
|
|
711
|
-
ts.debugLabel = "styleBreakpointAtom";
|
|
712
|
-
const Zr = () => ({
|
|
713
|
-
flexChild: te(Qt),
|
|
714
|
-
gridChild: te(es)
|
|
715
|
-
}), Qr = () => te(Ue), ei = v((e) => {
|
|
716
|
-
const t = e(Ue), s = e(re);
|
|
717
|
-
let o = t;
|
|
718
|
-
const n = [t];
|
|
719
|
-
do {
|
|
720
|
-
const r = s.find(({ _id: i }) => i === (o == null ? void 0 : o._parent));
|
|
721
|
-
o = r, r && n.push(r);
|
|
722
|
-
} while (o != null && o._parent);
|
|
723
|
-
return n;
|
|
724
|
-
});
|
|
725
|
-
const $e = () => {
|
|
726
|
-
const [e, t] = z(ut), s = F(
|
|
727
|
-
(o) => {
|
|
728
|
-
t((n) => J(n, o) ? Ht(n, o) : [...n, o]);
|
|
729
|
-
},
|
|
730
|
-
[t]
|
|
731
|
-
);
|
|
732
|
-
return [e, t, s];
|
|
733
|
-
}, Tt = (e) => {
|
|
734
|
-
switch (e.type) {
|
|
735
|
-
case "singular":
|
|
736
|
-
return e.uiSchema;
|
|
737
|
-
case "model":
|
|
738
|
-
const { properties: t } = e, s = {};
|
|
739
|
-
return Object.keys(t).forEach((r) => {
|
|
740
|
-
const i = t[r];
|
|
741
|
-
if (J(["slot", "styles"], i.type))
|
|
742
|
-
return;
|
|
743
|
-
const c = r;
|
|
744
|
-
s[c] = Tt(i);
|
|
745
|
-
}), s;
|
|
746
|
-
case "list":
|
|
747
|
-
const { itemProperties: o } = e, n = {
|
|
748
|
-
items: {}
|
|
749
|
-
};
|
|
750
|
-
return Object.keys(o).forEach((r) => {
|
|
751
|
-
const i = o[r];
|
|
752
|
-
if (J(["slot", "styles"], i.type))
|
|
753
|
-
return;
|
|
754
|
-
const c = r;
|
|
755
|
-
n.items[c] = Tt(i);
|
|
756
|
-
}), n;
|
|
757
|
-
default:
|
|
758
|
-
return {};
|
|
759
|
-
}
|
|
760
|
-
}, It = (e) => {
|
|
761
|
-
switch (e.type) {
|
|
762
|
-
case "singular":
|
|
763
|
-
return e.schema;
|
|
764
|
-
case "model":
|
|
765
|
-
const { properties: t, title: s } = e, o = {
|
|
766
|
-
title: s,
|
|
767
|
-
type: "object",
|
|
768
|
-
properties: {}
|
|
769
|
-
};
|
|
770
|
-
return Object.keys(t).forEach((c) => {
|
|
771
|
-
const m = t[c];
|
|
772
|
-
if (J(["slot", "styles"], m.type))
|
|
773
|
-
return;
|
|
774
|
-
const l = c;
|
|
775
|
-
o.properties[l] = It(m);
|
|
776
|
-
}), o;
|
|
777
|
-
case "list":
|
|
778
|
-
const { itemProperties: n, title: r } = e, i = {
|
|
779
|
-
title: r,
|
|
780
|
-
type: "array",
|
|
781
|
-
items: {
|
|
782
|
-
type: "object",
|
|
783
|
-
properties: {}
|
|
784
|
-
}
|
|
785
|
-
};
|
|
786
|
-
return Object.keys(n).forEach((c) => {
|
|
787
|
-
const m = n[c];
|
|
788
|
-
if (J(["slot", "styles"], m.type))
|
|
789
|
-
return;
|
|
790
|
-
const l = c;
|
|
791
|
-
i.items.properties[l] = It(m), ye(i.items, "title", q(m, "itemTitle", `${r} item`));
|
|
792
|
-
}), i;
|
|
793
|
-
default:
|
|
794
|
-
return {};
|
|
795
|
-
}
|
|
796
|
-
}, ss = (e) => {
|
|
797
|
-
if (!e)
|
|
798
|
-
return {};
|
|
799
|
-
const t = {};
|
|
800
|
-
return Object.keys(e).forEach((s) => {
|
|
801
|
-
t[s] = Io(e[s]);
|
|
802
|
-
}), t;
|
|
803
|
-
}, To = (e) => {
|
|
804
|
-
if (Ve(e.default))
|
|
805
|
-
return [];
|
|
806
|
-
const { itemProperties: t } = e;
|
|
807
|
-
return M(e.default, (s) => {
|
|
808
|
-
const o = { ...s };
|
|
809
|
-
return Wt(s, (n, r) => {
|
|
810
|
-
xe(t, r) && q(t[r], "i18n", !1) && (o[r] = Qs);
|
|
811
|
-
}), o;
|
|
812
|
-
});
|
|
813
|
-
}, Io = (e) => {
|
|
814
|
-
switch (e.type) {
|
|
815
|
-
case "styles":
|
|
816
|
-
return e.default;
|
|
817
|
-
case "slot":
|
|
818
|
-
return `${Qe}${me()}`;
|
|
819
|
-
case "singular":
|
|
820
|
-
const { schema: t } = e;
|
|
821
|
-
return q(t, "default", "");
|
|
822
|
-
case "model":
|
|
823
|
-
return ss(e.properties);
|
|
824
|
-
case "list":
|
|
825
|
-
return To(e);
|
|
826
|
-
default:
|
|
827
|
-
return "";
|
|
828
|
-
}
|
|
829
|
-
};
|
|
830
|
-
const ti = (e, t) => {
|
|
831
|
-
const s = {};
|
|
832
|
-
return ye(s, e, t), s;
|
|
833
|
-
};
|
|
834
|
-
var pt = { exports: {} }, si = pt.exports;
|
|
835
|
-
(function(e) {
|
|
836
|
-
(function() {
|
|
837
|
-
"use strict";
|
|
838
|
-
function t(o, n, r) {
|
|
839
|
-
return o.splice(
|
|
840
|
-
n,
|
|
841
|
-
!r || 1 + r - n + (!(r < 0 ^ n >= 0) && (r < 0 || -1) * o.length)
|
|
842
|
-
), o.length;
|
|
843
|
-
}
|
|
844
|
-
let s = function() {
|
|
845
|
-
let o = [], n = -1, r = 0, i = !1, c;
|
|
846
|
-
function m(l, p) {
|
|
847
|
-
return !l || typeof l[p] != "function" ? this : (i = !0, l[p](), i = !1, this);
|
|
848
|
-
}
|
|
849
|
-
return {
|
|
850
|
-
/**
|
|
851
|
-
* Adds a command to the queue.
|
|
852
|
-
* @property {object} command - Command
|
|
853
|
-
* @property {function} command.undo - Undo function
|
|
854
|
-
* @property {function} command.redo - Redo function
|
|
855
|
-
* @property {string} [command.groupId] - Optional group id
|
|
856
|
-
*/
|
|
857
|
-
add: function(l) {
|
|
858
|
-
return i ? this : (o.splice(n + 1, o.length - n), o.push(l), r && o.length > r && t(o, 0, -(r + 1)), n = o.length - 1, c && c(), this);
|
|
859
|
-
},
|
|
860
|
-
/**
|
|
861
|
-
* Pass a function to be called on undo and redo actions.
|
|
862
|
-
* @property {function} callbackFunc - Callback function
|
|
863
|
-
*/
|
|
864
|
-
setCallback: function(l) {
|
|
865
|
-
c = l;
|
|
866
|
-
},
|
|
867
|
-
/**
|
|
868
|
-
* Performs undo: call the undo function at the current index and decrease the index by 1.
|
|
869
|
-
*/
|
|
870
|
-
undo: function() {
|
|
871
|
-
let l = o[n];
|
|
872
|
-
if (!l)
|
|
873
|
-
return this;
|
|
874
|
-
const p = l.groupId;
|
|
875
|
-
for (; l.groupId === p && (m(l, "undo"), n -= 1, l = o[n], !(!l || !l.groupId)); )
|
|
876
|
-
;
|
|
877
|
-
return c && c(), this;
|
|
878
|
-
},
|
|
879
|
-
/**
|
|
880
|
-
* Performs redo: call the redo function at the next index and increase the index by 1.
|
|
881
|
-
*/
|
|
882
|
-
redo: function() {
|
|
883
|
-
let l = o[n + 1];
|
|
884
|
-
if (!l)
|
|
885
|
-
return this;
|
|
886
|
-
const p = l.groupId;
|
|
887
|
-
for (; l.groupId === p && (m(l, "redo"), n += 1, l = o[n + 1], !(!l || !l.groupId)); )
|
|
888
|
-
;
|
|
889
|
-
return c && c(), this;
|
|
890
|
-
},
|
|
891
|
-
/**
|
|
892
|
-
* Clears the memory, losing all stored states. Resets the index.
|
|
893
|
-
*/
|
|
894
|
-
clear: function() {
|
|
895
|
-
let l = o.length;
|
|
896
|
-
o = [], n = -1, c && l > 0 && c();
|
|
897
|
-
},
|
|
898
|
-
/**
|
|
899
|
-
* Tests if any undo actions exist.
|
|
900
|
-
* @returns {boolean}
|
|
901
|
-
*/
|
|
902
|
-
hasUndo: function() {
|
|
903
|
-
return n !== -1;
|
|
904
|
-
},
|
|
905
|
-
/**
|
|
906
|
-
* Tests if any redo actions exist.
|
|
907
|
-
* @returns {boolean}
|
|
908
|
-
*/
|
|
909
|
-
hasRedo: function() {
|
|
910
|
-
return n < o.length - 1;
|
|
911
|
-
},
|
|
912
|
-
/**
|
|
913
|
-
* Returns the list of queued commands.
|
|
914
|
-
* @param {string} [groupId] - Optionally filter commands by group ID
|
|
915
|
-
* @returns {array}
|
|
916
|
-
*/
|
|
917
|
-
getCommands: function(l) {
|
|
918
|
-
return l ? o.filter((p) => p.groupId === l) : o;
|
|
919
|
-
},
|
|
920
|
-
/**
|
|
921
|
-
* Returns the index of the actions list.
|
|
922
|
-
* @returns {number}
|
|
923
|
-
*/
|
|
924
|
-
getIndex: function() {
|
|
925
|
-
return n;
|
|
926
|
-
},
|
|
927
|
-
/**
|
|
928
|
-
* Sets the maximum number of undo steps. Default: 0 (unlimited).
|
|
929
|
-
* @property {number} max - Maximum number of undo steps
|
|
930
|
-
*/
|
|
931
|
-
setLimit: function(l) {
|
|
932
|
-
r = l;
|
|
933
|
-
}
|
|
934
|
-
};
|
|
935
|
-
};
|
|
936
|
-
e.exports ? e.exports = s : window.UndoManager = s;
|
|
937
|
-
})();
|
|
938
|
-
})(pt);
|
|
939
|
-
var Mo = pt.exports;
|
|
940
|
-
const Eo = /* @__PURE__ */ eo(Mo), Do = v(et), Lo = v(null), os = () => {
|
|
941
|
-
const [e, t] = z(Do);
|
|
942
|
-
return [
|
|
943
|
-
Ks(e) ? { ...et, ...e } : et,
|
|
944
|
-
t
|
|
945
|
-
];
|
|
946
|
-
}, oi = () => z(Lo), Oo = v(null), zo = () => ({ currentPage: te(Oo) });
|
|
947
|
-
function ns(e) {
|
|
948
|
-
return qt(e);
|
|
949
|
-
}
|
|
950
|
-
const gt = (e, t) => de(
|
|
951
|
-
e.map((s) => {
|
|
952
|
-
if (s = t ? { ...s, _parent: t } : { ...s }, s.children) {
|
|
953
|
-
const o = [...s.children];
|
|
954
|
-
return delete s.children, de([s, ...gt(o, s._id)]);
|
|
955
|
-
}
|
|
956
|
-
return s;
|
|
957
|
-
})
|
|
958
|
-
);
|
|
959
|
-
function bt(e, t = !1) {
|
|
960
|
-
for (let s = 0; s < e.length; s++) {
|
|
961
|
-
const o = e[s];
|
|
962
|
-
o.global && !t ? e[s] = {
|
|
963
|
-
type: "GlobalBlock",
|
|
964
|
-
blockId: o.blockId,
|
|
965
|
-
_parent: q(o, "_parent", null),
|
|
966
|
-
_id: o._id
|
|
967
|
-
} : o.children && o.children.length && bt(o.children);
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
function as(e) {
|
|
971
|
-
let t = [], s = O(e, { type: "GlobalBlock" });
|
|
972
|
-
return s.length > 0 && (s = M(s, rs), ue(s, (o) => {
|
|
973
|
-
t = [...t, ...Vo(o)];
|
|
974
|
-
})), t;
|
|
975
|
-
}
|
|
976
|
-
function Vo(e) {
|
|
977
|
-
let t = [];
|
|
978
|
-
const s = q(ee(e), "_parent", null);
|
|
979
|
-
ye(ee(e), "_parent", null);
|
|
980
|
-
const o = [flatToNestedInstance.convert(is(e))];
|
|
981
|
-
bt(o, !0);
|
|
982
|
-
let n = gt(o, e[0]._id);
|
|
983
|
-
return n = ye(n, "0._parent", s), t = [...t, n, ...as(n)], t;
|
|
984
|
-
}
|
|
985
|
-
function rs(e) {
|
|
986
|
-
const t = ae(tt, { _id: e._id });
|
|
987
|
-
if (!t)
|
|
988
|
-
return [];
|
|
989
|
-
const s = [t], o = O(tt, { _parent: e._id });
|
|
990
|
-
return o.length ? de([...s, ...de(M(o, rs))]) : de(s);
|
|
991
|
-
}
|
|
992
|
-
const is = (e) => JSON.parse(JSON.stringify(e));
|
|
993
|
-
let tt = [];
|
|
994
|
-
function Fo(e) {
|
|
995
|
-
tt = e;
|
|
996
|
-
const t = ns(is(e));
|
|
997
|
-
bt(t);
|
|
998
|
-
const s = gt(t, null), o = as(s), n = {};
|
|
999
|
-
return ue(o, (r) => ye(n, ee(r).blockId, r)), [s, n];
|
|
1000
|
-
}
|
|
1001
|
-
const Uo = () => {
|
|
1002
|
-
const [e] = os(), { currentPage: t } = zo(), [s] = ke();
|
|
1003
|
-
return F(() => {
|
|
1004
|
-
const o = M(
|
|
1005
|
-
s,
|
|
1006
|
-
(r) => Oe(r, ["expanded", "order", "title", "siblings", "tempClasses"])
|
|
1007
|
-
), [n = []] = Fo(o);
|
|
1008
|
-
return {
|
|
1009
|
-
currentPage: t,
|
|
1010
|
-
blocks: n
|
|
1011
|
-
};
|
|
1012
|
-
}, [e, t, s]);
|
|
1013
|
-
}, ls = v(null);
|
|
1014
|
-
ls.debugLabel = "chaiBuilderPropsAtom";
|
|
1015
|
-
const $o = v({});
|
|
1016
|
-
$o.debugLabel = "chaiExternalDataAtom";
|
|
1017
|
-
const ne = (e, t = void 0) => {
|
|
1018
|
-
const s = te(ls);
|
|
1019
|
-
return q(s, e, t);
|
|
1020
|
-
}, cs = v([]);
|
|
1021
|
-
cs.debugLabel = "dataProvidersAtom";
|
|
1022
|
-
const Ho = () => z(cs), ht = v("SAVED");
|
|
1023
|
-
ht.debugLabel = "builderSaveStateAtom";
|
|
1024
|
-
const ni = () => {
|
|
1025
|
-
const [e, t] = z(ht), s = ne("onSavePage", async (l) => {
|
|
1026
|
-
}), o = ne("onSave", async (l) => {
|
|
1027
|
-
}), n = ne("onSaveStateChange", qe), r = Uo(), [i] = Ho(), [c] = os();
|
|
1028
|
-
return { savePage: to(
|
|
1029
|
-
async () => {
|
|
1030
|
-
t("SAVING"), n("SAVING");
|
|
1031
|
-
const l = r();
|
|
1032
|
-
return await s({ blocks: l.blocks, providers: i }), await o({ blocks: l.blocks, providers: i, brandingOptions: c, themeConfiguration: c }), setTimeout(() => {
|
|
1033
|
-
t("SAVED"), n("SAVED");
|
|
1034
|
-
}, 100), !0;
|
|
1035
|
-
},
|
|
1036
|
-
[r, t, c, o, n],
|
|
1037
|
-
3e3
|
|
1038
|
-
// save only every 5 seconds
|
|
1039
|
-
), saveState: e, setSaveState: t };
|
|
1040
|
-
}, le = new Eo();
|
|
1041
|
-
le.setLimit(50);
|
|
1042
|
-
const ds = () => {
|
|
1043
|
-
const [, e] = z(ht), t = ne("onSaveStateChange", qe);
|
|
1044
|
-
return Me(() => (le.setCallback(() => {
|
|
1045
|
-
e("UNSAVED"), t("UNSAVED");
|
|
1046
|
-
}), () => {
|
|
1047
|
-
le.setCallback(qe);
|
|
1048
|
-
}), []), {
|
|
1049
|
-
add: le.add,
|
|
1050
|
-
undo: le.undo,
|
|
1051
|
-
redo: le.redo,
|
|
1052
|
-
hasRedo: le.hasRedo,
|
|
1053
|
-
hasUndo: le.hasUndo,
|
|
1054
|
-
clear: le.clear
|
|
1055
|
-
};
|
|
1056
|
-
}, xt = (e, t) => {
|
|
1057
|
-
const s = [], o = O(e, (n) => J(t, n._id) || J(t, n._parent) ? (s.push(n._id), !1) : !0);
|
|
1058
|
-
return Ve(s) ? o : xt(o, s);
|
|
1059
|
-
}, ai = () => {
|
|
1060
|
-
const [e] = ke(), [t, s] = $e(), { setNewBlocks: o } = ie();
|
|
1061
|
-
return F(
|
|
1062
|
-
(n) => {
|
|
1063
|
-
var i;
|
|
1064
|
-
const r = ((i = ae(e, { _id: n[0] })) == null ? void 0 : i._parent) || null;
|
|
1065
|
-
o(xt(e, n)), setTimeout(() => s(r ? [r] : []), 200);
|
|
1066
|
-
},
|
|
1067
|
-
[e, s, t]
|
|
1068
|
-
);
|
|
1069
|
-
};
|
|
1070
|
-
function Wo(e, t, s, o) {
|
|
1071
|
-
let n = e.filter((c) => !c._parent);
|
|
1072
|
-
s && (n = e.filter((c) => c._parent === s));
|
|
1073
|
-
const r = o !== void 0 ? o : n.length;
|
|
1074
|
-
let i = e.length;
|
|
1075
|
-
for (let c = 0, m = 0; c < e.length; c++)
|
|
1076
|
-
if (e[c]._parent === s) {
|
|
1077
|
-
if (m === r) {
|
|
1078
|
-
i = c;
|
|
1079
|
-
break;
|
|
1080
|
-
}
|
|
1081
|
-
m++;
|
|
1082
|
-
}
|
|
1083
|
-
return !s && o !== void 0 && o >= n.length && (i = e.length), [...e.slice(0, i), ...t, ...e.slice(i)];
|
|
1084
|
-
}
|
|
1085
|
-
function Go(e) {
|
|
1086
|
-
let t = [];
|
|
1087
|
-
return e.walk((s) => (delete s.model.children, t.push(s.model), !0)), t;
|
|
1088
|
-
}
|
|
1089
|
-
function Mt(e, t) {
|
|
1090
|
-
return e.first((s) => s.model._id === t) || null;
|
|
1091
|
-
}
|
|
1092
|
-
function Yo(e, t, s, o) {
|
|
1093
|
-
const n = Mt(e, t), r = Mt(e, s);
|
|
1094
|
-
if (n && r) {
|
|
1095
|
-
n.drop(), r.children || (r.model.children = []);
|
|
1096
|
-
try {
|
|
1097
|
-
r.addChildAtIndex(n, o);
|
|
1098
|
-
} catch (i) {
|
|
1099
|
-
return console.error("Error adding child to parent:", i), !1;
|
|
1100
|
-
}
|
|
1101
|
-
return !0;
|
|
1102
|
-
}
|
|
1103
|
-
return !1;
|
|
1104
|
-
}
|
|
1105
|
-
function Xo(e, t, s, o) {
|
|
1106
|
-
if (!t)
|
|
1107
|
-
return e;
|
|
1108
|
-
s = s || "root";
|
|
1109
|
-
const r = new so().parse({ _id: "root", children: ns(e) });
|
|
1110
|
-
if (Yo(r, t, s, o)) {
|
|
1111
|
-
const i = Go(r), c = i.find((m) => m._id === t);
|
|
1112
|
-
return c && (c._parent = s === "root" ? null : s), i.shift(), i;
|
|
1113
|
-
}
|
|
1114
|
-
return e;
|
|
1115
|
-
}
|
|
1116
|
-
const Ko = () => {
|
|
1117
|
-
const [, e] = ke();
|
|
1118
|
-
return {
|
|
1119
|
-
setNewBlocks: (t) => {
|
|
1120
|
-
e(t);
|
|
1121
|
-
},
|
|
1122
|
-
addBlocks: (t, s, o) => {
|
|
1123
|
-
e((n) => Wo(n, t, s, o));
|
|
1124
|
-
},
|
|
1125
|
-
removeBlocks: (t) => {
|
|
1126
|
-
e((s) => xt(s, t));
|
|
1127
|
-
},
|
|
1128
|
-
moveBlocks: (t, s, o) => {
|
|
1129
|
-
e((n) => {
|
|
1130
|
-
let r = n;
|
|
1131
|
-
for (let i = 0; i < t.length; i++)
|
|
1132
|
-
r = Xo(r, t[i], s, o);
|
|
1133
|
-
return r;
|
|
1134
|
-
});
|
|
1135
|
-
},
|
|
1136
|
-
updateBlocksProps: (t) => {
|
|
1137
|
-
e((s) => {
|
|
1138
|
-
const o = t.map((n) => n._id);
|
|
1139
|
-
return s.map((n) => {
|
|
1140
|
-
if (o.includes(n._id)) {
|
|
1141
|
-
const r = ae(t, { _id: n._id });
|
|
1142
|
-
return { ...n, ...Oe(r, "_id") };
|
|
1143
|
-
}
|
|
1144
|
-
return n;
|
|
1145
|
-
});
|
|
1146
|
-
});
|
|
1147
|
-
}
|
|
1148
|
-
};
|
|
1149
|
-
}, ke = () => z(re), ie = () => {
|
|
1150
|
-
const { add: e } = ds(), [t] = ke(), {
|
|
1151
|
-
setNewBlocks: s,
|
|
1152
|
-
addBlocks: o,
|
|
1153
|
-
removeBlocks: n,
|
|
1154
|
-
moveBlocks: r,
|
|
1155
|
-
updateBlocksProps: i
|
|
1156
|
-
} = Ko();
|
|
1157
|
-
return {
|
|
1158
|
-
moveBlocks: (N, S, _) => {
|
|
1159
|
-
const $ = M(N, (I) => {
|
|
1160
|
-
const Y = t.find((K) => K._id === I)._parent || null, se = t.filter((K) => Y ? K._parent === Y : !K._parent).map((K) => K._id).indexOf(I);
|
|
1161
|
-
return { _id: I, oldParent: Y, oldPosition: se };
|
|
1162
|
-
}), P = $.find(({ _id: I }) => I === N[0]);
|
|
1163
|
-
P && P.oldParent === S && P.oldPosition === _ || (r(N, S, _), e({
|
|
1164
|
-
undo: () => ue($, ({ _id: I, oldParent: U, oldPosition: Y }) => {
|
|
1165
|
-
r([I], U, Y);
|
|
1166
|
-
}),
|
|
1167
|
-
redo: () => r(N, S, _)
|
|
1168
|
-
}));
|
|
1169
|
-
},
|
|
1170
|
-
addBlocks: (N, S, _) => {
|
|
1171
|
-
o(N, S, _), e({
|
|
1172
|
-
undo: () => n(M(N, "_id")),
|
|
1173
|
-
redo: () => o(N, S, _)
|
|
1174
|
-
});
|
|
1175
|
-
},
|
|
1176
|
-
removeBlocks: (N) => {
|
|
1177
|
-
var P;
|
|
1178
|
-
const S = (P = ee(N)) == null ? void 0 : P._parent, $ = t.filter((I) => S ? I._parent === S : !I._parent).indexOf(ee(N));
|
|
1179
|
-
n(M(N, "_id")), e({
|
|
1180
|
-
undo: () => o(N, S, $),
|
|
1181
|
-
redo: () => n(M(N, "_id"))
|
|
1182
|
-
});
|
|
1183
|
-
},
|
|
1184
|
-
updateBlocks: (N, S, _) => {
|
|
1185
|
-
let $ = [];
|
|
1186
|
-
if (_)
|
|
1187
|
-
$ = M(N, (P) => ({ _id: P, ..._ }));
|
|
1188
|
-
else {
|
|
1189
|
-
const P = Je(S);
|
|
1190
|
-
$ = M(N, (I) => {
|
|
1191
|
-
const U = t.find((H) => H._id === I), Y = { _id: I };
|
|
1192
|
-
return ue(P, (H) => Y[H] = U[H]), Y;
|
|
1193
|
-
});
|
|
1194
|
-
}
|
|
1195
|
-
i(M(N, (P) => ({ _id: P, ...S }))), e({
|
|
1196
|
-
undo: () => i($),
|
|
1197
|
-
redo: () => i(M(N, (P) => ({ _id: P, ...S })))
|
|
1198
|
-
});
|
|
1199
|
-
},
|
|
1200
|
-
updateBlocksRuntime: (N, S) => {
|
|
1201
|
-
i(M(N, (_) => ({ _id: _, ...S })));
|
|
1202
|
-
},
|
|
1203
|
-
setNewBlocks: (N) => {
|
|
1204
|
-
s(N), e({
|
|
1205
|
-
undo: () => s(t),
|
|
1206
|
-
redo: () => s(N)
|
|
1207
|
-
});
|
|
1208
|
-
},
|
|
1209
|
-
updateMultipleBlocksProps: (N) => {
|
|
1210
|
-
let S = [];
|
|
1211
|
-
S = M(N, (_) => {
|
|
1212
|
-
const $ = Je(_), P = t.find((U) => U._id === _._id), I = {};
|
|
1213
|
-
return ue($, (U) => I[U] = P[U]), I;
|
|
1214
|
-
}), i(N), e({
|
|
1215
|
-
undo: () => i(S),
|
|
1216
|
-
redo: () => i(N)
|
|
1217
|
-
});
|
|
1218
|
-
}
|
|
1219
|
-
};
|
|
1220
|
-
}, ri = () => {
|
|
1221
|
-
const [e] = ke(), [, t] = $e(), { addBlocks: s } = ie(), o = F(
|
|
1222
|
-
(r, i, c) => {
|
|
1223
|
-
var k;
|
|
1224
|
-
for (let L = 0; L < r.length; L++) {
|
|
1225
|
-
const { _id: N } = r[L];
|
|
1226
|
-
r[L]._id = me();
|
|
1227
|
-
const S = O(r, { _parent: N });
|
|
1228
|
-
for (let _ = 0; _ < S.length; _++)
|
|
1229
|
-
S[_]._parent = r[L]._id;
|
|
1230
|
-
}
|
|
1231
|
-
const m = ee(r);
|
|
1232
|
-
let l, p;
|
|
1233
|
-
return i && (l = ae(e, { _id: i }), r[0]._parent = i, p = i), !(l ? Rt(l == null ? void 0 : l._type, m._type) : !0) && l && (r[0]._parent = l._parent, p = l._parent), s(r, p, c), t([(k = ee(r)) == null ? void 0 : k._id]), ee(r);
|
|
1234
|
-
},
|
|
1235
|
-
[e, t]
|
|
1236
|
-
);
|
|
1237
|
-
return { addCoreBlock: F(
|
|
1238
|
-
(r, i, c) => {
|
|
1239
|
-
if (xe(r, "blocks")) {
|
|
1240
|
-
const _ = r.blocks;
|
|
1241
|
-
return o(_, i, c);
|
|
1242
|
-
}
|
|
1243
|
-
const m = me(), l = ss(r.props), p = [];
|
|
1244
|
-
Wt(l, (_, $) => {
|
|
1245
|
-
if (Gt(_, Qe)) {
|
|
1246
|
-
const P = _.replace(Qe, "");
|
|
1247
|
-
p.push({
|
|
1248
|
-
_id: P,
|
|
1249
|
-
_type: "Slot",
|
|
1250
|
-
_parent: m,
|
|
1251
|
-
_name: r.props[$].name,
|
|
1252
|
-
_styles: r.props[$].styles,
|
|
1253
|
-
_emptyStyles: r.props[$].emptyStyles
|
|
1254
|
-
});
|
|
1255
|
-
}
|
|
1256
|
-
});
|
|
1257
|
-
const w = {
|
|
1258
|
-
_type: r.type,
|
|
1259
|
-
_id: m,
|
|
1260
|
-
...l
|
|
1261
|
-
};
|
|
1262
|
-
let k, L;
|
|
1263
|
-
i && (k = ae(e, { _id: i }), w._parent = i, L = i), !Rt(k == null ? void 0 : k._type, w._type) && k && (w._parent = k._parent, L = k._parent);
|
|
1264
|
-
const S = [w, ...p];
|
|
1265
|
-
return s(S, L, c), t([w._id]), w;
|
|
1266
|
-
},
|
|
1267
|
-
[o, e, t]
|
|
1268
|
-
), addPredefinedBlock: o };
|
|
1269
|
-
}, Et = {
|
|
1270
|
-
xs: 420,
|
|
1271
|
-
sm: 620,
|
|
1272
|
-
md: 768,
|
|
1273
|
-
lg: 1024,
|
|
1274
|
-
xl: 1280,
|
|
1275
|
-
"2xl": 1536
|
|
1276
|
-
}, Dt = ["xs", "sm", "md", "lg", "xl", "2xl"];
|
|
1277
|
-
function qo(e, t) {
|
|
1278
|
-
if (t === null)
|
|
1279
|
-
return "baseClasses";
|
|
1280
|
-
const s = t.mq;
|
|
1281
|
-
if (s === "xs" || t.dark || t.mod !== "")
|
|
1282
|
-
return "classes";
|
|
1283
|
-
let o = "baseClasses", n = Dt.indexOf(s);
|
|
1284
|
-
for (; n > 0; ) {
|
|
1285
|
-
const r = Dt[n - 1];
|
|
1286
|
-
if (ae(e, {
|
|
1287
|
-
mq: r,
|
|
1288
|
-
property: t.property
|
|
1289
|
-
})) {
|
|
1290
|
-
o = "classes";
|
|
1291
|
-
break;
|
|
1292
|
-
}
|
|
1293
|
-
n--;
|
|
1294
|
-
}
|
|
1295
|
-
return o;
|
|
1296
|
-
}
|
|
1297
|
-
const Lt = [];
|
|
1298
|
-
function Jo(e = "", t = "", s = []) {
|
|
1299
|
-
e = e.trim().replace(/ +/g, "");
|
|
1300
|
-
let o = O(
|
|
1301
|
-
M(e.split(" "), Pe),
|
|
1302
|
-
(l) => !Ze(l)
|
|
1303
|
-
), n = O(M(t.split(" "), Pe), (l) => !Ze(l));
|
|
1304
|
-
n = O(
|
|
1305
|
-
n,
|
|
1306
|
-
(l) => !J(Lt, l.property)
|
|
1307
|
-
);
|
|
1308
|
-
const r = [], i = [];
|
|
1309
|
-
ue(s, (l) => {
|
|
1310
|
-
const p = Pe(l), w = ae(o, kt(p, ["dark", "mq", "mod", "property"]));
|
|
1311
|
-
if (w && (o = O(
|
|
1312
|
-
o,
|
|
1313
|
-
(k) => k.fullCls !== (w == null ? void 0 : w.fullCls)
|
|
1314
|
-
)), r.push(p), p.mq === "xs" && !p.dark && p.mod === "" && (n = O(n, (k) => k.property !== p.property)), qo(o, p) === "baseClasses" && !J(Lt, p.property)) {
|
|
1315
|
-
const k = ae(n, kt(p, ["property"]));
|
|
1316
|
-
w && (n = O(
|
|
1317
|
-
n,
|
|
1318
|
-
(L) => L.fullCls !== (k == null ? void 0 : k.fullCls)
|
|
1319
|
-
)), i.push({
|
|
1320
|
-
...p,
|
|
1321
|
-
fullCls: p.cls,
|
|
1322
|
-
mq: "xs"
|
|
1323
|
-
});
|
|
1324
|
-
}
|
|
1325
|
-
});
|
|
1326
|
-
const c = M(
|
|
1327
|
-
At([...o, ...r], (l) => Et[l.mq]),
|
|
1328
|
-
"fullCls"
|
|
1329
|
-
).join(" ");
|
|
1330
|
-
return `${M(
|
|
1331
|
-
At([...n, ...i], (l) => Et[l.mq]),
|
|
1332
|
-
"fullCls"
|
|
1333
|
-
).join(" ").trim()},${c.trim()}`.trim().replace(/ +/g, "");
|
|
1334
|
-
}
|
|
1335
|
-
const _e = v([]);
|
|
1336
|
-
_e.debugLabel = "selectedStylingBlocksAtom";
|
|
1337
|
-
const Zo = () => z(_e), Qo = (e) => {
|
|
1338
|
-
const t = e.replace(ge, "").split(",");
|
|
1339
|
-
return { baseClasses: t[0], classes: t[1] };
|
|
1340
|
-
}, en = v(null, (e, t, { blockIds: s, newClasses: o }) => {
|
|
1341
|
-
const n = O(
|
|
1342
|
-
e(dt),
|
|
1343
|
-
(i) => (
|
|
1344
|
-
// @ts-ignore
|
|
1345
|
-
s.includes(e(i)._id)
|
|
1346
|
-
)
|
|
1347
|
-
), r = ee(e(_e));
|
|
1348
|
-
return M(n, (i) => {
|
|
1349
|
-
const c = e(i), m = q(c, r.prop, `${ge},`), { baseClasses: l, classes: p } = Qo(m);
|
|
1350
|
-
return {
|
|
1351
|
-
ids: [c._id],
|
|
1352
|
-
props: { [r.prop]: `${ge}${Jo(p, l, o)}` }
|
|
1353
|
-
};
|
|
1354
|
-
});
|
|
1355
|
-
}), ii = () => {
|
|
1356
|
-
const e = je(en), { updateBlocks: t, updateBlocksRuntime: s } = ie();
|
|
1357
|
-
return F(
|
|
1358
|
-
(o, n, r = !1) => {
|
|
1359
|
-
const i = e({ blockIds: o, newClasses: n });
|
|
1360
|
-
if (!r) {
|
|
1361
|
-
s(o, i[0].props);
|
|
1362
|
-
return;
|
|
1363
|
-
}
|
|
1364
|
-
t(o, i[0].props);
|
|
1365
|
-
},
|
|
1366
|
-
[e]
|
|
1367
|
-
);
|
|
1368
|
-
}, tn = () => z(ts), us = Ne("canvasWidth", 800), fs = v((e) => {
|
|
1369
|
-
const t = e(us);
|
|
1370
|
-
return Zs(t).toLowerCase();
|
|
1371
|
-
}), li = () => {
|
|
1372
|
-
const [e, t] = z(us), s = te(fs), [o, n] = tn();
|
|
1373
|
-
return Me(() => {
|
|
1374
|
-
o !== "xs" && n(s);
|
|
1375
|
-
}, [s, o, n]), [e, s, t];
|
|
1376
|
-
}, sn = Ne("canvasZoom", 100), ci = () => z(sn), ms = v([]), on = () => {
|
|
1377
|
-
const [e, t] = z(ms), s = je(vt), o = F(
|
|
1378
|
-
(n) => {
|
|
1379
|
-
t(n), s([]);
|
|
1380
|
-
},
|
|
1381
|
-
[t, s]
|
|
1382
|
-
);
|
|
1383
|
-
return [e, o];
|
|
1384
|
-
}, vt = v([]), di = () => {
|
|
1385
|
-
const [e, t] = z(vt), s = je(ms), o = F(
|
|
1386
|
-
(n) => {
|
|
1387
|
-
t(n), s([]);
|
|
1388
|
-
},
|
|
1389
|
-
[t, s]
|
|
1390
|
-
);
|
|
1391
|
-
return [e, o];
|
|
1392
|
-
}, ps = Ne("darkMode", !1), ui = () => {
|
|
1393
|
-
const [e, t] = z(ps);
|
|
1394
|
-
return [e, t];
|
|
1395
|
-
}, nn = () => {
|
|
1396
|
-
const [e] = ke(), [, t] = $e(), { addBlocks: s } = ie();
|
|
1397
|
-
return F(
|
|
1398
|
-
(o, n = null) => {
|
|
1399
|
-
const r = [];
|
|
1400
|
-
ue(o, (i) => {
|
|
1401
|
-
const c = e.find((k) => k._id === i);
|
|
1402
|
-
n || (n = c._parent);
|
|
1403
|
-
const p = O(
|
|
1404
|
-
e,
|
|
1405
|
-
(k) => lt(n) ? k._parent === n : !c._parent
|
|
1406
|
-
).indexOf(c) + 1, w = So(e, i, n);
|
|
1407
|
-
s(w, n, p), r.push(q(w, "0._id", ""));
|
|
1408
|
-
}), t(r);
|
|
1409
|
-
},
|
|
1410
|
-
[e, t]
|
|
1411
|
-
);
|
|
1412
|
-
}, an = v([]), fi = () => {
|
|
1413
|
-
const [e, t] = z(an), s = F(
|
|
1414
|
-
(o) => {
|
|
1415
|
-
t((n) => J(n, o) ? Ht(n, o) : [...n, o]);
|
|
1416
|
-
},
|
|
1417
|
-
[t]
|
|
1418
|
-
);
|
|
1419
|
-
return [e, t, s];
|
|
1420
|
-
}, rn = v(""), ln = () => z(rn), cn = () => {
|
|
1421
|
-
const e = te(re);
|
|
1422
|
-
return F(
|
|
1423
|
-
(t, s) => {
|
|
1424
|
-
const o = M(e, (n) => (J(t, q(n, "_id")) && ye(n, "_parent", s), n));
|
|
1425
|
-
console.log("newBlocks", o);
|
|
1426
|
-
},
|
|
1427
|
-
[e]
|
|
1428
|
-
);
|
|
1429
|
-
}, mi = () => {
|
|
1430
|
-
console.warn("usePasteBlocks is not implemented");
|
|
1431
|
-
const e = te(vt), [t, s] = on(), o = nn(), n = cn();
|
|
1432
|
-
return {
|
|
1433
|
-
canPaste: Fs(
|
|
1434
|
-
() => t.length > 0 || e.length > 0,
|
|
1435
|
-
[e, t]
|
|
1436
|
-
),
|
|
1437
|
-
pasteBlocks: F(
|
|
1438
|
-
(i) => {
|
|
1439
|
-
Ve(e) ? n(t, i) : o(e, i), s(() => []);
|
|
1440
|
-
},
|
|
1441
|
-
[t, e, o, n, s]
|
|
1442
|
-
)
|
|
1443
|
-
};
|
|
1444
|
-
}, dn = v(!1), pi = () => {
|
|
1445
|
-
const [e, t] = z(dn);
|
|
1446
|
-
return [e, t];
|
|
1447
|
-
}, gi = () => !1, un = (e) => {
|
|
1448
|
-
const t = e.replace(ge, "").split(",");
|
|
1449
|
-
return { baseClasses: t[0], classes: t[1] };
|
|
1450
|
-
}, fn = v(null, (e, t, { blockIds: s, fullClasses: o }) => {
|
|
1451
|
-
const n = ee(e(_e)), r = O(
|
|
1452
|
-
e(dt),
|
|
1453
|
-
(i) => (
|
|
1454
|
-
// @ts-ignore
|
|
1455
|
-
s.includes(e(i)._id)
|
|
1456
|
-
)
|
|
1457
|
-
);
|
|
1458
|
-
return M(r, (i) => {
|
|
1459
|
-
const c = e(i), m = o;
|
|
1460
|
-
let { classes: l, baseClasses: p } = un(q(c, n.prop, "styles:,"));
|
|
1461
|
-
return ue(m, (w) => {
|
|
1462
|
-
const k = w.replace(/[\[\]\/\\{}()*+?.^$|]/g, "\\$&"), L = new RegExp(`(^| )${k}($| )`, "g");
|
|
1463
|
-
l = l.replace(L, " ").replace(/ +/g, " ").trim();
|
|
1464
|
-
const N = ee(w.split(":"));
|
|
1465
|
-
J(["2xl", "xl", "lg", "md", "sm"], N) && m.push(w.split(":").pop().trim());
|
|
1466
|
-
}), ue(m, (w) => {
|
|
1467
|
-
const k = new RegExp(`(^| )${w.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
|
|
1468
|
-
p = p.replace(k, " ").replace(/ +/g, " ").trim();
|
|
1469
|
-
}), {
|
|
1470
|
-
ids: [c._id],
|
|
1471
|
-
props: {
|
|
1472
|
-
[n.prop]: `${ge}${p},${l}`
|
|
1473
|
-
}
|
|
1474
|
-
};
|
|
1475
|
-
});
|
|
1476
|
-
}), bi = () => {
|
|
1477
|
-
const { updateBlocks: e } = ie(), t = je(fn);
|
|
1478
|
-
return F(
|
|
1479
|
-
(s, o) => {
|
|
1480
|
-
const n = t({ blockIds: s, fullClasses: o });
|
|
1481
|
-
e(s, n[0].props);
|
|
1482
|
-
},
|
|
1483
|
-
[t]
|
|
1484
|
-
);
|
|
1485
|
-
}, gs = v((e) => {
|
|
1486
|
-
const t = ee(e(_e)), s = e(Ue);
|
|
1487
|
-
if (!t || t.blockId !== q(s, "_id", null))
|
|
1488
|
-
return [];
|
|
1489
|
-
const n = q(s, t.prop, `${ge},`).replace(ge, "").split(",").join(" ");
|
|
1490
|
-
return O(M(n.trim().split(" "), Pe), (r) => !Ze(r));
|
|
1491
|
-
}), hi = () => te(gs), Ot = { xs: 0, sm: 1, md: 2, lg: 3, xl: 4, "2xl": 5 }, mn = v((e) => {
|
|
1492
|
-
const t = e(fs), s = e(mt), o = e(ps), n = pn(t);
|
|
1493
|
-
let r = O(e(gs), { mod: s });
|
|
1494
|
-
return Gt(s, "_") || (r = O(r, (i) => n.includes(i.mq))), r = r.sort((i, c) => Ot[i.mq] - Ot[c.mq]), o || (r = O(r, { dark: !1 })), r;
|
|
1495
|
-
}), pn = (e) => {
|
|
1496
|
-
let t = [];
|
|
1497
|
-
switch (e) {
|
|
1498
|
-
case "xs":
|
|
1499
|
-
t = ["xs"];
|
|
1500
|
-
break;
|
|
1501
|
-
case "sm":
|
|
1502
|
-
t = ["xs", "sm"];
|
|
1503
|
-
break;
|
|
1504
|
-
case "md":
|
|
1505
|
-
t = ["xs", "sm", "md"];
|
|
1506
|
-
break;
|
|
1507
|
-
case "lg":
|
|
1508
|
-
t = ["xs", "sm", "md", "lg"];
|
|
1509
|
-
break;
|
|
1510
|
-
case "xl":
|
|
1511
|
-
t = ["xs", "sm", "md", "lg", "xl"];
|
|
1512
|
-
break;
|
|
1513
|
-
case "2xl":
|
|
1514
|
-
t = ["xs", "sm", "md", "lg", "xl", "2xl"];
|
|
1515
|
-
break;
|
|
1516
|
-
default:
|
|
1517
|
-
t = ["xs"];
|
|
1518
|
-
break;
|
|
1519
|
-
}
|
|
1520
|
-
return t;
|
|
1521
|
-
}, xi = () => te(mn), vi = () => z(mt), yi = () => {
|
|
1522
|
-
const { updateBlocks: e } = ie();
|
|
1523
|
-
return F(
|
|
1524
|
-
(t, s, o) => {
|
|
1525
|
-
e(t, s, o);
|
|
1526
|
-
},
|
|
1527
|
-
[e]
|
|
1528
|
-
);
|
|
1529
|
-
}, wi = () => {
|
|
1530
|
-
const { updateMultipleBlocksProps: e } = ie();
|
|
1531
|
-
return F(
|
|
1532
|
-
(t) => {
|
|
1533
|
-
e(t);
|
|
1534
|
-
},
|
|
1535
|
-
[e]
|
|
1536
|
-
);
|
|
1537
|
-
}, gn = () => {
|
|
1538
|
-
const { updateBlocksRuntime: e } = ie();
|
|
1539
|
-
return F(
|
|
1540
|
-
async (t, s, o = 30) => {
|
|
1541
|
-
const n = Je(Oe(s, ["_id"]));
|
|
1542
|
-
for (const r of n) {
|
|
1543
|
-
const i = s[r];
|
|
1544
|
-
if (lt(i)) {
|
|
1545
|
-
const c = qs(i.split(""), 12);
|
|
1546
|
-
let m = "";
|
|
1547
|
-
e([t], { [r]: "" });
|
|
1548
|
-
for (let l = 0; l < c.length; l++)
|
|
1549
|
-
m += c[l].join(""), e([t], { [r]: m }), await new Promise((p) => setTimeout(p, o));
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
},
|
|
1553
|
-
[e]
|
|
1554
|
-
);
|
|
1555
|
-
}, Ni = () => {
|
|
1556
|
-
const { updateMultipleBlocksProps: e } = ie(), t = gn();
|
|
1557
|
-
return F(
|
|
1558
|
-
async (s) => {
|
|
1559
|
-
for (const o of s)
|
|
1560
|
-
await t(o._id, o);
|
|
1561
|
-
e(s);
|
|
1562
|
-
},
|
|
1563
|
-
[e]
|
|
1564
|
-
);
|
|
1565
|
-
}, ki = () => {
|
|
1566
|
-
const { updateBlocksRuntime: e } = ie();
|
|
1567
|
-
return F(
|
|
1568
|
-
(t, s) => {
|
|
1569
|
-
e(t, s);
|
|
1570
|
-
},
|
|
1571
|
-
[e]
|
|
1572
|
-
);
|
|
1573
|
-
}, bs = {
|
|
1574
|
-
name: "",
|
|
1575
|
-
props: {},
|
|
1576
|
-
modalProps: {},
|
|
1577
|
-
backdropClose: !0
|
|
1578
|
-
}, bn = v(bs), Ai = () => {
|
|
1579
|
-
const [e, t] = z(bn), s = F(
|
|
1580
|
-
(n, r = {}, i = {}) => {
|
|
1581
|
-
t({ name: n, props: r, modalProps: i });
|
|
1582
|
-
},
|
|
1583
|
-
[t]
|
|
1584
|
-
), o = F(
|
|
1585
|
-
(...n) => {
|
|
1586
|
-
q(e, "props.onClose", () => {
|
|
1587
|
-
})(...n), t(bs);
|
|
1588
|
-
},
|
|
1589
|
-
[t, e]
|
|
1590
|
-
);
|
|
1591
|
-
return {
|
|
1592
|
-
activeModal: e,
|
|
1593
|
-
openModal: s,
|
|
1594
|
-
closeModal: o
|
|
1595
|
-
};
|
|
1596
|
-
}, Si = () => (console.warn("useAllBlocks is deprecated, use useBlocksStore() instead"), te(re)), hs = v(!1);
|
|
1597
|
-
hs.debugLabel = "readOnlyModeAtom";
|
|
1598
|
-
const hn = v("online");
|
|
1599
|
-
hn.debugLabel = "networkModeAtom";
|
|
1600
|
-
const xn = v(!1);
|
|
1601
|
-
xn.debugLabel = "editLayerNameAtom";
|
|
1602
|
-
const vn = v("");
|
|
1603
|
-
vn.debugLabel = "activeLanguageAtom";
|
|
1604
|
-
const yn = v("");
|
|
1605
|
-
yn.debugLabel = "primaryLanguageAtom";
|
|
1606
|
-
const wn = v(null);
|
|
1607
|
-
wn.debugLabel = "canvasIframeAtom";
|
|
1608
|
-
const Nn = v("outline");
|
|
1609
|
-
Nn.debugLabel = "activePanelAtom";
|
|
1610
|
-
const kn = v("");
|
|
1611
|
-
kn.debugLabel = "showPredefinedBlockCategoryAtom";
|
|
1612
|
-
const xs = v({ undoCount: 0, redoCount: 0 });
|
|
1613
|
-
xs.debugLabel = "historyStatesAtom";
|
|
1614
|
-
const An = v("");
|
|
1615
|
-
An.debugLabel = "inlineEditingActiveAtom";
|
|
1616
|
-
const Sn = v(!1);
|
|
1617
|
-
Sn.debugLabel = "draggingFlagAtom";
|
|
1618
|
-
const Cn = v(null);
|
|
1619
|
-
Cn.debugLabel = "treeRefAtom";
|
|
1620
|
-
const jn = v({});
|
|
1621
|
-
jn.debugLabel = "canvasSettingsAtom";
|
|
1622
|
-
const vs = v(!1);
|
|
1623
|
-
vs.debugLabel = "askAiActiveBlockAtom";
|
|
1624
|
-
const _n = v(!1);
|
|
1625
|
-
_n.debugLabel = "codeEditorOpenAtom";
|
|
1626
|
-
const Bn = Ne("codeEditorHeight", 500);
|
|
1627
|
-
Bn.debugLabel = "codeEditorHeightAtom";
|
|
1628
|
-
const Pn = v([]);
|
|
1629
|
-
Pn.debugLabel = "xShowBlocksAtom";
|
|
1630
|
-
const Ci = () => te(hs), Rn = v(""), Tn = v(null), ji = () => z(Rn), _i = () => z(Tn), In = Ne("selectedBreakpoints", ["XS", "MD", "XL"]), Bi = () => {
|
|
1631
|
-
const [e, t] = z(In);
|
|
1632
|
-
return [e, t];
|
|
1633
|
-
}, Pi = () => {
|
|
1634
|
-
const e = je(xs), { clear: t } = ds(), [, s] = $e(), [, o] = ln(), [, n] = Zo(), [, r] = Ao(vs);
|
|
1635
|
-
return () => {
|
|
1636
|
-
s([]), n([]), o(""), t(), r(!1), e({ undoCount: 0, redoCount: 0 });
|
|
1637
|
-
};
|
|
1638
|
-
}, Ri = () => ({ data: ne("uiLibraries", []), isLoading: !1 }), Ti = () => {
|
|
1639
|
-
const [e, t] = Ee(null), s = F(async (o) => {
|
|
1640
|
-
if (!(navigator != null && navigator.clipboard))
|
|
1641
|
-
return console.warn("Clipboard not supported"), !1;
|
|
1642
|
-
try {
|
|
1643
|
-
return await navigator.clipboard.writeText(o), t(o), !0;
|
|
1644
|
-
} catch (n) {
|
|
1645
|
-
return console.warn("Copy failed", n), t(null), !1;
|
|
1646
|
-
}
|
|
1647
|
-
}, []);
|
|
1648
|
-
return [e, s];
|
|
1649
|
-
}, Mn = v(null), Ii = () => z(Mn), En = be(
|
|
1650
|
-
"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",
|
|
1651
|
-
{
|
|
1652
|
-
variants: {
|
|
1653
|
-
variant: {
|
|
1654
|
-
default: "bg-transparent",
|
|
1655
|
-
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
1656
|
-
},
|
|
1657
|
-
size: {
|
|
1658
|
-
default: "h-10 px-3",
|
|
1659
|
-
sm: "h-9 px-2.5",
|
|
1660
|
-
lg: "h-11 px-5"
|
|
1661
|
-
}
|
|
1662
|
-
},
|
|
1663
|
-
defaultVariants: {
|
|
1664
|
-
variant: "default",
|
|
1665
|
-
size: "default"
|
|
1666
|
-
}
|
|
1667
|
-
}
|
|
1668
|
-
), Dn = f.forwardRef(({ className: e, variant: t, size: s, ...o }, n) => /* @__PURE__ */ a.jsx(Ft.Root, { ref: n, className: d(En({ variant: t, size: s, className: e })), ...o }));
|
|
1669
|
-
Dn.displayName = Ft.Root.displayName;
|
|
1670
|
-
const Ln = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1671
|
-
Ke.Root,
|
|
1672
|
-
{
|
|
1673
|
-
className: d(
|
|
1674
|
-
"peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=unchecked]:bg-slate-200 dark:focus-visible:ring-slate-800 dark:focus-visible:ring-offset-slate-950 dark:data-[state=checked]:bg-slate-50 dark:data-[state=unchecked]:bg-slate-800",
|
|
1675
|
-
e
|
|
1676
|
-
),
|
|
1677
|
-
...t,
|
|
1678
|
-
ref: s,
|
|
1679
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1680
|
-
Ke.Thumb,
|
|
1681
|
-
{
|
|
1682
|
-
className: d(
|
|
1683
|
-
"pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-slate-950"
|
|
1684
|
-
)
|
|
1685
|
-
}
|
|
1686
|
-
)
|
|
1687
|
-
}
|
|
1688
|
-
));
|
|
1689
|
-
Ln.displayName = Ke.Root.displayName;
|
|
1690
|
-
const yt = be(
|
|
1691
|
-
"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",
|
|
1692
|
-
{
|
|
1693
|
-
variants: {
|
|
1694
|
-
variant: {
|
|
1695
|
-
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
1696
|
-
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
1697
|
-
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
1698
|
-
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
1699
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
1700
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
1701
|
-
},
|
|
1702
|
-
size: {
|
|
1703
|
-
default: "h-9 px-4 py-2",
|
|
1704
|
-
sm: "h-8 rounded-md px-3 text-xs",
|
|
1705
|
-
lg: "h-10 rounded-md px-8",
|
|
1706
|
-
icon: "h-9 w-9"
|
|
1707
|
-
}
|
|
1708
|
-
},
|
|
1709
|
-
defaultVariants: {
|
|
1710
|
-
variant: "default",
|
|
1711
|
-
size: "default"
|
|
1712
|
-
}
|
|
1713
|
-
}
|
|
1714
|
-
), On = f.forwardRef(
|
|
1715
|
-
({ className: e, variant: t, size: s, asChild: o = !1, ...n }, r) => {
|
|
1716
|
-
const i = o ? Us : "button";
|
|
1717
|
-
return /* @__PURE__ */ a.jsx(i, { className: d(yt({ variant: t, size: s, className: e })), ref: r, ...n });
|
|
1718
|
-
}
|
|
1719
|
-
);
|
|
1720
|
-
On.displayName = "Button";
|
|
1721
|
-
const Mi = pe.Root, zn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(pe.Item, { ref: s, className: d("border-b", e), ...t }));
|
|
1722
|
-
zn.displayName = "AccordionItem";
|
|
1723
|
-
const Vn = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsx(pe.Header, { className: "flex", children: /* @__PURE__ */ a.jsxs(
|
|
1724
|
-
pe.Trigger,
|
|
1725
|
-
{
|
|
1726
|
-
ref: o,
|
|
1727
|
-
className: d(
|
|
1728
|
-
"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
1729
|
-
e
|
|
1730
|
-
),
|
|
1731
|
-
...s,
|
|
1732
|
-
children: [
|
|
1733
|
-
t,
|
|
1734
|
-
s.hideArrow ? null : /* @__PURE__ */ a.jsx($s, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
1735
|
-
]
|
|
1736
|
-
}
|
|
1737
|
-
) }));
|
|
1738
|
-
Vn.displayName = pe.Trigger.displayName;
|
|
1739
|
-
const Fn = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1740
|
-
pe.Content,
|
|
1741
|
-
{
|
|
1742
|
-
ref: o,
|
|
1743
|
-
className: d(
|
|
1744
|
-
"text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
1745
|
-
e
|
|
1746
|
-
),
|
|
1747
|
-
...s,
|
|
1748
|
-
children: /* @__PURE__ */ a.jsx("div", { className: "pb-4 pt-0", children: t })
|
|
1749
|
-
}
|
|
1750
|
-
));
|
|
1751
|
-
Fn.displayName = pe.Content.displayName;
|
|
1752
|
-
const Un = be(
|
|
1753
|
-
"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",
|
|
1754
|
-
{
|
|
1755
|
-
variants: {
|
|
1756
|
-
variant: {
|
|
1757
|
-
default: "bg-background text-foreground",
|
|
1758
|
-
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
1759
|
-
}
|
|
1760
|
-
},
|
|
1761
|
-
defaultVariants: {
|
|
1762
|
-
variant: "default"
|
|
1763
|
-
}
|
|
1764
|
-
}
|
|
1765
|
-
), $n = f.forwardRef(({ className: e, variant: t, ...s }, o) => /* @__PURE__ */ a.jsx("div", { ref: o, role: "alert", className: d(Un({ variant: t }), e), ...s }));
|
|
1766
|
-
$n.displayName = "Alert";
|
|
1767
|
-
const Hn = f.forwardRef(
|
|
1768
|
-
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("h5", { ref: s, className: d("mb-1 font-medium leading-none tracking-tight", e), ...t })
|
|
1769
|
-
);
|
|
1770
|
-
Hn.displayName = "AlertTitle";
|
|
1771
|
-
const Wn = f.forwardRef(
|
|
1772
|
-
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("text-sm [&_p]:leading-relaxed", e), ...t })
|
|
1773
|
-
);
|
|
1774
|
-
Wn.displayName = "AlertDescription";
|
|
1775
|
-
const Gn = be(
|
|
1776
|
-
"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",
|
|
1777
|
-
{
|
|
1778
|
-
variants: {
|
|
1779
|
-
variant: {
|
|
1780
|
-
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
1781
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
1782
|
-
destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
|
|
1783
|
-
outline: "text-foreground"
|
|
1784
|
-
}
|
|
1785
|
-
},
|
|
1786
|
-
defaultVariants: {
|
|
1787
|
-
variant: "default"
|
|
1788
|
-
}
|
|
1789
|
-
}
|
|
1790
|
-
), Ei = ({ className: e, variant: t, ...s }) => /* @__PURE__ */ a.jsx("div", { className: d(Gn({ variant: t }), e), ...s }), Di = X.Root, Li = X.Trigger, ys = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(X.Portal, { className: d(e), ...t });
|
|
1791
|
-
ys.displayName = X.Portal.displayName;
|
|
1792
|
-
const ws = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1793
|
-
X.Overlay,
|
|
1794
|
-
{
|
|
1795
|
-
className: d(
|
|
1796
|
-
"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",
|
|
1797
|
-
e
|
|
1798
|
-
),
|
|
1799
|
-
...t,
|
|
1800
|
-
ref: s
|
|
1801
|
-
}
|
|
1802
|
-
));
|
|
1803
|
-
ws.displayName = X.Overlay.displayName;
|
|
1804
|
-
const Yn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs(ys, { children: [
|
|
1805
|
-
/* @__PURE__ */ a.jsx(ws, {}),
|
|
1806
|
-
/* @__PURE__ */ a.jsx(
|
|
1807
|
-
X.Content,
|
|
1808
|
-
{
|
|
1809
|
-
ref: s,
|
|
1810
|
-
className: d(
|
|
1811
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",
|
|
1812
|
-
e
|
|
1813
|
-
),
|
|
1814
|
-
...t
|
|
1815
|
-
}
|
|
1816
|
-
)
|
|
1817
|
-
] }));
|
|
1818
|
-
Yn.displayName = X.Content.displayName;
|
|
1819
|
-
const Xn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
|
|
1820
|
-
Xn.displayName = "AlertDialogHeader";
|
|
1821
|
-
const Kn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
1822
|
-
Kn.displayName = "AlertDialogFooter";
|
|
1823
|
-
const qn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(X.Title, { ref: s, className: d("text-lg font-semibold", e), ...t }));
|
|
1824
|
-
qn.displayName = X.Title.displayName;
|
|
1825
|
-
const Jn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(X.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
|
|
1826
|
-
Jn.displayName = X.Description.displayName;
|
|
1827
|
-
const Zn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(X.Action, { ref: s, className: d(yt(), e), ...t }));
|
|
1828
|
-
Zn.displayName = X.Action.displayName;
|
|
1829
|
-
const Qn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1830
|
-
X.Cancel,
|
|
1831
|
-
{
|
|
1832
|
-
ref: s,
|
|
1833
|
-
className: d(yt({ variant: "outline" }), "mt-2 sm:mt-0", e),
|
|
1834
|
-
...t
|
|
1835
|
-
}
|
|
1836
|
-
));
|
|
1837
|
-
Qn.displayName = X.Cancel.displayName;
|
|
1838
|
-
const Ns = T.Root, ea = T.Trigger, ks = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(T.Portal, { className: d(e), ...t });
|
|
1839
|
-
ks.displayName = T.Portal.displayName;
|
|
1840
|
-
const As = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1841
|
-
T.Overlay,
|
|
1842
|
-
{
|
|
1843
|
-
ref: s,
|
|
1844
|
-
className: d(
|
|
1845
|
-
"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",
|
|
1846
|
-
e
|
|
1847
|
-
),
|
|
1848
|
-
...t
|
|
1849
|
-
}
|
|
1850
|
-
));
|
|
1851
|
-
As.displayName = T.Overlay.displayName;
|
|
1852
|
-
const wt = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(ks, { children: [
|
|
1853
|
-
/* @__PURE__ */ a.jsx(As, {}),
|
|
1854
|
-
/* @__PURE__ */ a.jsxs(
|
|
1855
|
-
T.Content,
|
|
1856
|
-
{
|
|
1857
|
-
ref: o,
|
|
1858
|
-
className: d(
|
|
1859
|
-
"fixed left-[50%] top-[50%] z-[999] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",
|
|
1860
|
-
e
|
|
1861
|
-
),
|
|
1862
|
-
...s,
|
|
1863
|
-
children: [
|
|
1864
|
-
t,
|
|
1865
|
-
/* @__PURE__ */ a.jsxs(T.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: [
|
|
1866
|
-
/* @__PURE__ */ a.jsx(at, { className: "h-4 w-4" }),
|
|
1867
|
-
/* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
|
|
1868
|
-
] })
|
|
1869
|
-
]
|
|
1870
|
-
}
|
|
1871
|
-
)
|
|
1872
|
-
] }));
|
|
1873
|
-
wt.displayName = T.Content.displayName;
|
|
1874
|
-
const ta = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-1.5 text-center sm:text-left", e), ...t });
|
|
1875
|
-
ta.displayName = "DialogHeader";
|
|
1876
|
-
const sa = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
1877
|
-
sa.displayName = "DialogFooter";
|
|
1878
|
-
const oa = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1879
|
-
T.Title,
|
|
1880
|
-
{
|
|
1881
|
-
ref: s,
|
|
1882
|
-
className: d("text-lg font-semibold leading-none tracking-tight", e),
|
|
1883
|
-
...t
|
|
1884
|
-
}
|
|
1885
|
-
));
|
|
1886
|
-
oa.displayName = T.Title.displayName;
|
|
1887
|
-
const na = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(T.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
|
|
1888
|
-
na.displayName = T.Description.displayName;
|
|
1889
|
-
const aa = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("rounded-xl border bg-card text-card-foreground shadow", e), ...t }));
|
|
1890
|
-
aa.displayName = "Card";
|
|
1891
|
-
const ra = f.forwardRef(
|
|
1892
|
-
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("flex flex-col space-y-1.5 p-6", e), ...t })
|
|
1893
|
-
);
|
|
1894
|
-
ra.displayName = "CardHeader";
|
|
1895
|
-
const ia = f.forwardRef(
|
|
1896
|
-
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("h3", { ref: s, className: d("font-semibold leading-none tracking-tight", e), ...t })
|
|
1897
|
-
);
|
|
1898
|
-
ia.displayName = "CardTitle";
|
|
1899
|
-
const la = f.forwardRef(
|
|
1900
|
-
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("p", { ref: s, className: d("text-sm text-muted-foreground", e), ...t })
|
|
1901
|
-
);
|
|
1902
|
-
la.displayName = "CardDescription";
|
|
1903
|
-
const ca = f.forwardRef(
|
|
1904
|
-
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("p-6 pt-0", e), ...t })
|
|
1905
|
-
);
|
|
1906
|
-
ca.displayName = "CardContent";
|
|
1907
|
-
const da = f.forwardRef(
|
|
1908
|
-
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d(" flex items-center p-6 pt-0", e), ...t })
|
|
1909
|
-
);
|
|
1910
|
-
da.displayName = "CardFooter";
|
|
1911
|
-
const ua = f.forwardRef(({ className: e, type: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1912
|
-
"input",
|
|
1913
|
-
{
|
|
1914
|
-
type: t,
|
|
1915
|
-
className: d(
|
|
1916
|
-
"flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
1917
|
-
e
|
|
1918
|
-
),
|
|
1919
|
-
ref: o,
|
|
1920
|
-
...s,
|
|
1921
|
-
autoCapitalize: "off",
|
|
1922
|
-
autoCorrect: "off",
|
|
1923
|
-
spellCheck: "false"
|
|
1924
|
-
}
|
|
1925
|
-
));
|
|
1926
|
-
ua.displayName = "Input";
|
|
1927
|
-
const fa = be("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"), ma = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Ut.Root, { ref: s, className: d(fa(), e), ...t }));
|
|
1928
|
-
ma.displayName = Ut.Root.displayName;
|
|
1929
|
-
const pa = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1930
|
-
"textarea",
|
|
1931
|
-
{
|
|
1932
|
-
className: d(
|
|
1933
|
-
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
1934
|
-
e
|
|
1935
|
-
),
|
|
1936
|
-
ref: s,
|
|
1937
|
-
...t,
|
|
1938
|
-
autoCapitalize: "off",
|
|
1939
|
-
autoCorrect: "off",
|
|
1940
|
-
spellCheck: "false"
|
|
1941
|
-
}
|
|
1942
|
-
));
|
|
1943
|
-
pa.displayName = "Textarea";
|
|
1944
|
-
const ga = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(fe.Root, { ref: o, className: d("relative overflow-hidden", e), ...s, children: [
|
|
1945
|
-
/* @__PURE__ */ a.jsx(fe.Viewport, { className: "h-full w-full rounded-[inherit]", children: t }),
|
|
1946
|
-
/* @__PURE__ */ a.jsx(Ss, {}),
|
|
1947
|
-
/* @__PURE__ */ a.jsx(fe.Corner, {})
|
|
1948
|
-
] }));
|
|
1949
|
-
ga.displayName = fe.Root.displayName;
|
|
1950
|
-
const Ss = f.forwardRef(({ className: e, orientation: t = "vertical", ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1951
|
-
fe.ScrollAreaScrollbar,
|
|
1952
|
-
{
|
|
1953
|
-
ref: o,
|
|
1954
|
-
orientation: t,
|
|
1955
|
-
className: d(
|
|
1956
|
-
"flex touch-none select-none transition-colors",
|
|
1957
|
-
t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
1958
|
-
t === "horizontal" && "h-2.5 border-t border-t-transparent p-[1px]",
|
|
1959
|
-
e
|
|
1960
|
-
),
|
|
1961
|
-
...s,
|
|
1962
|
-
children: /* @__PURE__ */ a.jsx(fe.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
1963
|
-
}
|
|
1964
|
-
));
|
|
1965
|
-
Ss.displayName = fe.ScrollAreaScrollbar.displayName;
|
|
1966
|
-
const ba = he.Root, Cs = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1967
|
-
he.List,
|
|
1968
|
-
{
|
|
1969
|
-
ref: s,
|
|
1970
|
-
className: d(
|
|
1971
|
-
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
1972
|
-
e
|
|
1973
|
-
),
|
|
1974
|
-
...t
|
|
1975
|
-
}
|
|
1976
|
-
));
|
|
1977
|
-
Cs.displayName = he.List.displayName;
|
|
1978
|
-
const st = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1979
|
-
he.Trigger,
|
|
1980
|
-
{
|
|
1981
|
-
ref: s,
|
|
1982
|
-
className: d(
|
|
1983
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all 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=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
1984
|
-
e
|
|
1985
|
-
),
|
|
1986
|
-
...t
|
|
1987
|
-
}
|
|
1988
|
-
));
|
|
1989
|
-
st.displayName = he.Trigger.displayName;
|
|
1990
|
-
const ot = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1991
|
-
he.Content,
|
|
1992
|
-
{
|
|
1993
|
-
ref: s,
|
|
1994
|
-
className: d(
|
|
1995
|
-
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
1996
|
-
e
|
|
1997
|
-
),
|
|
1998
|
-
...t
|
|
1999
|
-
}
|
|
2000
|
-
));
|
|
2001
|
-
ot.displayName = he.Content.displayName;
|
|
2002
|
-
const Oi = we.Portal, zi = we.Provider, Vi = we.Root, Fi = we.Trigger, ha = f.forwardRef(({ className: e, sideOffset: t = 4, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2003
|
-
we.Content,
|
|
2004
|
-
{
|
|
2005
|
-
ref: o,
|
|
2006
|
-
sideOffset: t,
|
|
2007
|
-
className: d(
|
|
2008
|
-
"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2009
|
-
e
|
|
2010
|
-
),
|
|
2011
|
-
...s
|
|
2012
|
-
}
|
|
2013
|
-
));
|
|
2014
|
-
ha.displayName = we.Content.displayName;
|
|
2015
|
-
const Ui = Ce.Root, $i = Ce.Trigger, xa = f.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...o }, n) => /* @__PURE__ */ a.jsx(Ce.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
2016
|
-
Ce.Content,
|
|
2017
|
-
{
|
|
2018
|
-
ref: n,
|
|
2019
|
-
align: t,
|
|
2020
|
-
sideOffset: s,
|
|
2021
|
-
className: d(
|
|
2022
|
-
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2023
|
-
e
|
|
2024
|
-
),
|
|
2025
|
-
...o
|
|
2026
|
-
}
|
|
2027
|
-
) }));
|
|
2028
|
-
xa.displayName = Ce.Content.displayName;
|
|
2029
|
-
const Hi = B.Menu, Wi = B.Group, Gi = B.Portal, Yi = B.Sub, Xi = B.RadioGroup, va = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2030
|
-
B.Root,
|
|
2031
|
-
{
|
|
2032
|
-
ref: s,
|
|
2033
|
-
className: d("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm", e),
|
|
2034
|
-
...t
|
|
2035
|
-
}
|
|
2036
|
-
));
|
|
2037
|
-
va.displayName = B.Root.displayName;
|
|
2038
|
-
const ya = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2039
|
-
B.Trigger,
|
|
2040
|
-
{
|
|
2041
|
-
ref: s,
|
|
2042
|
-
className: d(
|
|
2043
|
-
"flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
2044
|
-
e
|
|
2045
|
-
),
|
|
2046
|
-
...t
|
|
2047
|
-
}
|
|
2048
|
-
));
|
|
2049
|
-
ya.displayName = B.Trigger.displayName;
|
|
2050
|
-
const wa = f.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
2051
|
-
B.SubTrigger,
|
|
2052
|
-
{
|
|
2053
|
-
ref: n,
|
|
2054
|
-
className: d(
|
|
2055
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
2056
|
-
t && "pl-8",
|
|
2057
|
-
e
|
|
2058
|
-
),
|
|
2059
|
-
...o,
|
|
2060
|
-
children: [
|
|
2061
|
-
s,
|
|
2062
|
-
/* @__PURE__ */ a.jsx(rt, { className: "ml-auto h-4 w-4" })
|
|
2063
|
-
]
|
|
2064
|
-
}
|
|
2065
|
-
));
|
|
2066
|
-
wa.displayName = B.SubTrigger.displayName;
|
|
2067
|
-
const Na = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2068
|
-
B.SubContent,
|
|
2069
|
-
{
|
|
2070
|
-
ref: s,
|
|
2071
|
-
className: d(
|
|
2072
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2073
|
-
e
|
|
2074
|
-
),
|
|
2075
|
-
...t
|
|
2076
|
-
}
|
|
2077
|
-
));
|
|
2078
|
-
Na.displayName = B.SubContent.displayName;
|
|
2079
|
-
const ka = f.forwardRef(({ className: e, align: t = "start", alignOffset: s = -4, sideOffset: o = 8, ...n }, r) => /* @__PURE__ */ a.jsx(B.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
2080
|
-
B.Content,
|
|
2081
|
-
{
|
|
2082
|
-
ref: r,
|
|
2083
|
-
align: t,
|
|
2084
|
-
alignOffset: s,
|
|
2085
|
-
sideOffset: o,
|
|
2086
|
-
className: d(
|
|
2087
|
-
"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2088
|
-
e
|
|
2089
|
-
),
|
|
2090
|
-
...n
|
|
2091
|
-
}
|
|
2092
|
-
) }));
|
|
2093
|
-
ka.displayName = B.Content.displayName;
|
|
2094
|
-
const Aa = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2095
|
-
B.Item,
|
|
2096
|
-
{
|
|
2097
|
-
ref: o,
|
|
2098
|
-
className: d(
|
|
2099
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2100
|
-
t && "pl-8",
|
|
2101
|
-
e
|
|
2102
|
-
),
|
|
2103
|
-
...s
|
|
2104
|
-
}
|
|
2105
|
-
));
|
|
2106
|
-
Aa.displayName = B.Item.displayName;
|
|
2107
|
-
const Sa = f.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
2108
|
-
B.CheckboxItem,
|
|
2109
|
-
{
|
|
2110
|
-
ref: n,
|
|
2111
|
-
className: d(
|
|
2112
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2113
|
-
e
|
|
2114
|
-
),
|
|
2115
|
-
checked: s,
|
|
2116
|
-
...o,
|
|
2117
|
-
children: [
|
|
2118
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(B.ItemIndicator, { children: /* @__PURE__ */ a.jsx(De, { className: "h-4 w-4" }) }) }),
|
|
2119
|
-
t
|
|
2120
|
-
]
|
|
2121
|
-
}
|
|
2122
|
-
));
|
|
2123
|
-
Sa.displayName = B.CheckboxItem.displayName;
|
|
2124
|
-
const Ca = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
2125
|
-
B.RadioItem,
|
|
2126
|
-
{
|
|
2127
|
-
ref: o,
|
|
2128
|
-
className: d(
|
|
2129
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2130
|
-
e
|
|
2131
|
-
),
|
|
2132
|
-
...s,
|
|
2133
|
-
children: [
|
|
2134
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(B.ItemIndicator, { children: /* @__PURE__ */ a.jsx(it, { className: "h-4 w-4 fill-current" }) }) }),
|
|
2135
|
-
t
|
|
2136
|
-
]
|
|
2137
|
-
}
|
|
2138
|
-
));
|
|
2139
|
-
Ca.displayName = B.RadioItem.displayName;
|
|
2140
|
-
const ja = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2141
|
-
B.Label,
|
|
2142
|
-
{
|
|
2143
|
-
ref: o,
|
|
2144
|
-
className: d("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
|
|
2145
|
-
...s
|
|
2146
|
-
}
|
|
2147
|
-
));
|
|
2148
|
-
ja.displayName = B.Label.displayName;
|
|
2149
|
-
const _a = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(B.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
2150
|
-
_a.displayName = B.Separator.displayName;
|
|
2151
|
-
const Ba = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
|
|
2152
|
-
Ba.displayname = "MenubarShortcut";
|
|
2153
|
-
const Ki = Le.Root, qi = Le.Trigger, Pa = f.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...o }, n) => /* @__PURE__ */ a.jsx(
|
|
2154
|
-
Le.Content,
|
|
2155
|
-
{
|
|
2156
|
-
ref: n,
|
|
2157
|
-
align: t,
|
|
2158
|
-
sideOffset: s,
|
|
2159
|
-
className: d(
|
|
2160
|
-
"z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2161
|
-
e
|
|
2162
|
-
),
|
|
2163
|
-
...o
|
|
2164
|
-
}
|
|
2165
|
-
));
|
|
2166
|
-
Pa.displayName = Le.Content.displayName;
|
|
2167
|
-
const Ji = W.Root, Zi = W.Group, Qi = W.Value, Ra = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
2168
|
-
W.Trigger,
|
|
2169
|
-
{
|
|
2170
|
-
ref: o,
|
|
2171
|
-
className: d(
|
|
2172
|
-
"flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
2173
|
-
e
|
|
2174
|
-
),
|
|
2175
|
-
...s,
|
|
2176
|
-
children: [
|
|
2177
|
-
t,
|
|
2178
|
-
/* @__PURE__ */ a.jsx(W.Icon, { asChild: !0, children: /* @__PURE__ */ a.jsx(Hs, { className: "h-4 w-4 opacity-50" }) })
|
|
2179
|
-
]
|
|
2180
|
-
}
|
|
2181
|
-
));
|
|
2182
|
-
Ra.displayName = W.Trigger.displayName;
|
|
2183
|
-
const Ta = f.forwardRef(({ className: e, children: t, position: s = "popper", ...o }, n) => /* @__PURE__ */ a.jsx(W.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
2184
|
-
W.Content,
|
|
2185
|
-
{
|
|
2186
|
-
ref: n,
|
|
2187
|
-
className: d(
|
|
2188
|
-
"relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2189
|
-
s === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
2190
|
-
e
|
|
2191
|
-
),
|
|
2192
|
-
position: s,
|
|
2193
|
-
...o,
|
|
2194
|
-
children: /* @__PURE__ */ a.jsx(
|
|
2195
|
-
W.Viewport,
|
|
2196
|
-
{
|
|
2197
|
-
className: d(
|
|
2198
|
-
"p-1",
|
|
2199
|
-
s === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
2200
|
-
),
|
|
2201
|
-
children: t
|
|
2202
|
-
}
|
|
2203
|
-
)
|
|
2204
|
-
}
|
|
2205
|
-
) }));
|
|
2206
|
-
Ta.displayName = W.Content.displayName;
|
|
2207
|
-
const Ia = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(W.Label, { ref: s, className: d("px-2 py-1.5 text-sm font-semibold", e), ...t }));
|
|
2208
|
-
Ia.displayName = W.Label.displayName;
|
|
2209
|
-
const Ma = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
2210
|
-
W.Item,
|
|
2211
|
-
{
|
|
2212
|
-
ref: o,
|
|
2213
|
-
className: d(
|
|
2214
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2215
|
-
e
|
|
2216
|
-
),
|
|
2217
|
-
...s,
|
|
2218
|
-
children: [
|
|
2219
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(W.ItemIndicator, { children: /* @__PURE__ */ a.jsx(De, { className: "h-4 w-4" }) }) }),
|
|
2220
|
-
/* @__PURE__ */ a.jsx(W.ItemText, { children: t })
|
|
2221
|
-
]
|
|
2222
|
-
}
|
|
2223
|
-
));
|
|
2224
|
-
Ma.displayName = W.Item.displayName;
|
|
2225
|
-
const Ea = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(W.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
2226
|
-
Ea.displayName = W.Separator.displayName;
|
|
2227
|
-
const el = T.Root, tl = T.Trigger, sl = T.Close, js = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(T.Portal, { className: d(e), ...t });
|
|
2228
|
-
js.displayName = T.Portal.displayName;
|
|
2229
|
-
const _s = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2230
|
-
T.Overlay,
|
|
2231
|
-
{
|
|
2232
|
-
className: d(
|
|
2233
|
-
"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",
|
|
2234
|
-
e
|
|
2235
|
-
),
|
|
2236
|
-
...t,
|
|
2237
|
-
ref: s
|
|
2238
|
-
}
|
|
2239
|
-
));
|
|
2240
|
-
_s.displayName = T.Overlay.displayName;
|
|
2241
|
-
const Da = be(
|
|
2242
|
-
"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",
|
|
2243
|
-
{
|
|
2244
|
-
variants: {
|
|
2245
|
-
side: {
|
|
2246
|
-
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
2247
|
-
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
2248
|
-
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
2249
|
-
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
2250
|
-
}
|
|
2251
|
-
},
|
|
2252
|
-
defaultVariants: {
|
|
2253
|
-
side: "right"
|
|
2254
|
-
}
|
|
2255
|
-
}
|
|
2256
|
-
), La = f.forwardRef(
|
|
2257
|
-
({ side: e = "right", className: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(js, { children: [
|
|
2258
|
-
/* @__PURE__ */ a.jsx(_s, {}),
|
|
2259
|
-
/* @__PURE__ */ a.jsxs(T.Content, { ref: n, className: d(Da({ side: e }), t), ...o, children: [
|
|
2260
|
-
s,
|
|
2261
|
-
/* @__PURE__ */ a.jsxs(T.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: [
|
|
2262
|
-
/* @__PURE__ */ a.jsx(at, { className: "h-4 w-4" }),
|
|
2263
|
-
/* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
|
|
2264
|
-
] })
|
|
2265
|
-
] })
|
|
2266
|
-
] })
|
|
2267
|
-
);
|
|
2268
|
-
La.displayName = T.Content.displayName;
|
|
2269
|
-
const Oa = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
|
|
2270
|
-
Oa.displayName = "SheetHeader";
|
|
2271
|
-
const za = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
2272
|
-
za.displayName = "SheetFooter";
|
|
2273
|
-
const Va = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(T.Title, { ref: s, className: d("text-lg font-semibold text-foreground", e), ...t }));
|
|
2274
|
-
Va.displayName = T.Title.displayName;
|
|
2275
|
-
const Fa = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(T.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
|
|
2276
|
-
Fa.displayName = T.Description.displayName;
|
|
2277
|
-
const ol = E.Root, nl = E.Trigger, al = E.Group, rl = E.Portal, il = E.Sub, ll = E.RadioGroup, Ua = f.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
2278
|
-
E.SubTrigger,
|
|
2279
|
-
{
|
|
2280
|
-
ref: n,
|
|
2281
|
-
className: d(
|
|
2282
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
2283
|
-
t && "pl-8",
|
|
2284
|
-
e
|
|
2285
|
-
),
|
|
2286
|
-
...o,
|
|
2287
|
-
children: [
|
|
2288
|
-
s,
|
|
2289
|
-
/* @__PURE__ */ a.jsx(rt, { className: "ml-auto h-4 w-4" })
|
|
2290
|
-
]
|
|
2291
|
-
}
|
|
2292
|
-
));
|
|
2293
|
-
Ua.displayName = E.SubTrigger.displayName;
|
|
2294
|
-
const $a = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2295
|
-
E.SubContent,
|
|
2296
|
-
{
|
|
2297
|
-
ref: s,
|
|
2298
|
-
className: d(
|
|
2299
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2300
|
-
e
|
|
2301
|
-
),
|
|
2302
|
-
...t
|
|
2303
|
-
}
|
|
2304
|
-
));
|
|
2305
|
-
$a.displayName = E.SubContent.displayName;
|
|
2306
|
-
const Ha = f.forwardRef(({ className: e, sideOffset: t = 4, ...s }, o) => /* @__PURE__ */ a.jsx(E.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
2307
|
-
E.Content,
|
|
2308
|
-
{
|
|
2309
|
-
ref: o,
|
|
2310
|
-
sideOffset: t,
|
|
2311
|
-
className: d(
|
|
2312
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
2313
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2314
|
-
e
|
|
2315
|
-
),
|
|
2316
|
-
...s
|
|
2317
|
-
}
|
|
2318
|
-
) }));
|
|
2319
|
-
Ha.displayName = E.Content.displayName;
|
|
2320
|
-
const Wa = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2321
|
-
E.Item,
|
|
2322
|
-
{
|
|
2323
|
-
ref: o,
|
|
2324
|
-
className: d(
|
|
2325
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2326
|
-
t && "pl-8",
|
|
2327
|
-
e
|
|
2328
|
-
),
|
|
2329
|
-
...s
|
|
2330
|
-
}
|
|
2331
|
-
));
|
|
2332
|
-
Wa.displayName = E.Item.displayName;
|
|
2333
|
-
const Ga = f.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
2334
|
-
E.CheckboxItem,
|
|
2335
|
-
{
|
|
2336
|
-
ref: n,
|
|
2337
|
-
className: d(
|
|
2338
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2339
|
-
e
|
|
2340
|
-
),
|
|
2341
|
-
checked: s,
|
|
2342
|
-
...o,
|
|
2343
|
-
children: [
|
|
2344
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(E.ItemIndicator, { children: /* @__PURE__ */ a.jsx(De, { className: "h-4 w-4" }) }) }),
|
|
2345
|
-
t
|
|
2346
|
-
]
|
|
2347
|
-
}
|
|
2348
|
-
));
|
|
2349
|
-
Ga.displayName = E.CheckboxItem.displayName;
|
|
2350
|
-
const Ya = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
2351
|
-
E.RadioItem,
|
|
2352
|
-
{
|
|
2353
|
-
ref: o,
|
|
2354
|
-
className: d(
|
|
2355
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2356
|
-
e
|
|
2357
|
-
),
|
|
2358
|
-
...s,
|
|
2359
|
-
children: [
|
|
2360
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(E.ItemIndicator, { children: /* @__PURE__ */ a.jsx(it, { className: "h-4 w-4 fill-current" }) }) }),
|
|
2361
|
-
t
|
|
2362
|
-
]
|
|
2363
|
-
}
|
|
2364
|
-
));
|
|
2365
|
-
Ya.displayName = E.RadioItem.displayName;
|
|
2366
|
-
const Xa = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2367
|
-
E.Label,
|
|
2368
|
-
{
|
|
2369
|
-
ref: o,
|
|
2370
|
-
className: d("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
|
|
2371
|
-
...s
|
|
2372
|
-
}
|
|
2373
|
-
));
|
|
2374
|
-
Xa.displayName = E.Label.displayName;
|
|
2375
|
-
const Ka = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(E.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
2376
|
-
Ka.displayName = E.Separator.displayName;
|
|
2377
|
-
const qa = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest opacity-60", e), ...t });
|
|
2378
|
-
qa.displayName = "DropdownMenuShortcut";
|
|
2379
|
-
const Ja = f.forwardRef(({ className: e, orientation: t = "horizontal", decorative: s = !0, ...o }, n) => /* @__PURE__ */ a.jsx(
|
|
2380
|
-
$t.Root,
|
|
2381
|
-
{
|
|
2382
|
-
ref: n,
|
|
2383
|
-
decorative: s,
|
|
2384
|
-
orientation: t,
|
|
2385
|
-
className: d("shrink-0 bg-border", t === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", e),
|
|
2386
|
-
...o
|
|
2387
|
-
}
|
|
2388
|
-
));
|
|
2389
|
-
Ja.displayName = $t.Root.displayName;
|
|
2390
|
-
const Za = 1, Qa = 1e6;
|
|
2391
|
-
let Ye = 0;
|
|
2392
|
-
function er() {
|
|
2393
|
-
return Ye = (Ye + 1) % Number.MAX_VALUE, Ye.toString();
|
|
2394
|
-
}
|
|
2395
|
-
const Xe = /* @__PURE__ */ new Map(), zt = (e) => {
|
|
2396
|
-
if (Xe.has(e))
|
|
2397
|
-
return;
|
|
2398
|
-
const t = setTimeout(() => {
|
|
2399
|
-
Xe.delete(e), Se({
|
|
2400
|
-
type: "REMOVE_TOAST",
|
|
2401
|
-
toastId: e
|
|
2402
|
-
});
|
|
2403
|
-
}, Qa);
|
|
2404
|
-
Xe.set(e, t);
|
|
2405
|
-
}, tr = (e, t) => {
|
|
2406
|
-
switch (t.type) {
|
|
2407
|
-
case "ADD_TOAST":
|
|
2408
|
-
return {
|
|
2409
|
-
...e,
|
|
2410
|
-
toasts: [t.toast, ...e.toasts].slice(0, Za)
|
|
2411
|
-
};
|
|
2412
|
-
case "UPDATE_TOAST":
|
|
2413
|
-
return {
|
|
2414
|
-
...e,
|
|
2415
|
-
toasts: e.toasts.map((s) => s.id === t.toast.id ? { ...s, ...t.toast } : s)
|
|
2416
|
-
};
|
|
2417
|
-
case "DISMISS_TOAST": {
|
|
2418
|
-
const { toastId: s } = t;
|
|
2419
|
-
return s ? zt(s) : e.toasts.forEach((o) => {
|
|
2420
|
-
zt(o.id);
|
|
2421
|
-
}), {
|
|
2422
|
-
...e,
|
|
2423
|
-
toasts: e.toasts.map(
|
|
2424
|
-
(o) => o.id === s || s === void 0 ? {
|
|
2425
|
-
...o,
|
|
2426
|
-
open: !1
|
|
2427
|
-
} : o
|
|
2428
|
-
)
|
|
2429
|
-
};
|
|
2430
|
-
}
|
|
2431
|
-
case "REMOVE_TOAST":
|
|
2432
|
-
return t.toastId === void 0 ? {
|
|
2433
|
-
...e,
|
|
2434
|
-
toasts: []
|
|
2435
|
-
} : {
|
|
2436
|
-
...e,
|
|
2437
|
-
toasts: e.toasts.filter((s) => s.id !== t.toastId)
|
|
2438
|
-
};
|
|
2439
|
-
}
|
|
2440
|
-
}, Re = [];
|
|
2441
|
-
let Te = { toasts: [] };
|
|
2442
|
-
function Se(e) {
|
|
2443
|
-
Te = tr(Te, e), Re.forEach((t) => {
|
|
2444
|
-
t(Te);
|
|
2445
|
-
});
|
|
2446
|
-
}
|
|
2447
|
-
function sr({ ...e }) {
|
|
2448
|
-
const t = er(), s = (n) => Se({
|
|
2449
|
-
type: "UPDATE_TOAST",
|
|
2450
|
-
toast: { ...n, id: t }
|
|
2451
|
-
}), o = () => Se({ type: "DISMISS_TOAST", toastId: t });
|
|
2452
|
-
return Se({
|
|
2453
|
-
type: "ADD_TOAST",
|
|
2454
|
-
toast: {
|
|
2455
|
-
...e,
|
|
2456
|
-
id: t,
|
|
2457
|
-
open: !0,
|
|
2458
|
-
onOpenChange: (n) => {
|
|
2459
|
-
n || o();
|
|
2460
|
-
}
|
|
2461
|
-
}
|
|
2462
|
-
}), {
|
|
2463
|
-
id: t,
|
|
2464
|
-
dismiss: o,
|
|
2465
|
-
update: s
|
|
2466
|
-
};
|
|
2467
|
-
}
|
|
2468
|
-
function or() {
|
|
2469
|
-
const [e, t] = f.useState(Te);
|
|
2470
|
-
return f.useEffect(() => (Re.push(t), () => {
|
|
2471
|
-
const s = Re.indexOf(t);
|
|
2472
|
-
s > -1 && Re.splice(s, 1);
|
|
2473
|
-
}), [e]), {
|
|
2474
|
-
...e,
|
|
2475
|
-
toast: sr,
|
|
2476
|
-
dismiss: (s) => Se({ type: "DISMISS_TOAST", toastId: s })
|
|
2477
|
-
};
|
|
2478
|
-
}
|
|
2479
|
-
const nr = Q.Provider, Bs = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2480
|
-
Q.Viewport,
|
|
2481
|
-
{
|
|
2482
|
-
ref: s,
|
|
2483
|
-
className: d(
|
|
2484
|
-
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
|
|
2485
|
-
e
|
|
2486
|
-
),
|
|
2487
|
-
...t
|
|
2488
|
-
}
|
|
2489
|
-
));
|
|
2490
|
-
Bs.displayName = Q.Viewport.displayName;
|
|
2491
|
-
const ar = be(
|
|
2492
|
-
"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",
|
|
2493
|
-
{
|
|
2494
|
-
variants: {
|
|
2495
|
-
variant: {
|
|
2496
|
-
default: "border bg-background",
|
|
2497
|
-
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
|
|
2498
|
-
}
|
|
2499
|
-
},
|
|
2500
|
-
defaultVariants: {
|
|
2501
|
-
variant: "default"
|
|
2502
|
-
}
|
|
2503
|
-
}
|
|
2504
|
-
), Ps = f.forwardRef(({ className: e, variant: t, ...s }, o) => /* @__PURE__ */ a.jsx(Q.Root, { ref: o, className: d(ar({ variant: t }), e), ...s }));
|
|
2505
|
-
Ps.displayName = Q.Root.displayName;
|
|
2506
|
-
const rr = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2507
|
-
Q.Action,
|
|
2508
|
-
{
|
|
2509
|
-
ref: s,
|
|
2510
|
-
className: d(
|
|
2511
|
-
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
|
|
2512
|
-
e
|
|
2513
|
-
),
|
|
2514
|
-
...t
|
|
2515
|
-
}
|
|
2516
|
-
));
|
|
2517
|
-
rr.displayName = Q.Action.displayName;
|
|
2518
|
-
const Rs = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2519
|
-
Q.Close,
|
|
2520
|
-
{
|
|
2521
|
-
ref: s,
|
|
2522
|
-
className: d(
|
|
2523
|
-
"absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
|
|
2524
|
-
e
|
|
2525
|
-
),
|
|
2526
|
-
"toast-close": "",
|
|
2527
|
-
...t,
|
|
2528
|
-
children: /* @__PURE__ */ a.jsx(at, { className: "h-4 w-4" })
|
|
2529
|
-
}
|
|
2530
|
-
));
|
|
2531
|
-
Rs.displayName = Q.Close.displayName;
|
|
2532
|
-
const Ts = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Q.Title, { ref: s, className: d("text-sm font-semibold [&+div]:text-xs", e), ...t }));
|
|
2533
|
-
Ts.displayName = Q.Title.displayName;
|
|
2534
|
-
const Is = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Q.Description, { ref: s, className: d("text-sm opacity-90", e), ...t }));
|
|
2535
|
-
Is.displayName = Q.Description.displayName;
|
|
2536
|
-
function cl() {
|
|
2537
|
-
const { toasts: e } = or();
|
|
2538
|
-
return /* @__PURE__ */ a.jsxs(nr, { children: [
|
|
2539
|
-
e.map(({ id: t, title: s, description: o, action: n, ...r }) => /* @__PURE__ */ a.jsxs(Ps, { ...r, children: [
|
|
2540
|
-
/* @__PURE__ */ a.jsxs("div", { className: "grid gap-1", children: [
|
|
2541
|
-
s && /* @__PURE__ */ a.jsx(Ts, { children: s }),
|
|
2542
|
-
o && /* @__PURE__ */ a.jsx(Is, { children: o })
|
|
2543
|
-
] }),
|
|
2544
|
-
n,
|
|
2545
|
-
/* @__PURE__ */ a.jsx(Rs, {})
|
|
2546
|
-
] }, t)),
|
|
2547
|
-
/* @__PURE__ */ a.jsx(Bs, {})
|
|
2548
|
-
] });
|
|
2549
|
-
}
|
|
2550
|
-
const dl = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("animate-pulse rounded-md bg-primary/10", e), ...t }), Ms = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2551
|
-
Z,
|
|
2552
|
-
{
|
|
2553
|
-
ref: s,
|
|
2554
|
-
className: d(
|
|
2555
|
-
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
2556
|
-
e
|
|
2557
|
-
),
|
|
2558
|
-
...t
|
|
2559
|
-
}
|
|
2560
|
-
));
|
|
2561
|
-
Ms.displayName = Z.displayName;
|
|
2562
|
-
const ul = ({ children: e, ...t }) => /* @__PURE__ */ a.jsx(Ns, { ...t, children: /* @__PURE__ */ a.jsx(wt, { className: "overflow-hidden p-0", children: /* @__PURE__ */ a.jsx(Ms, { 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 }) }) }), ir = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
2563
|
-
/* @__PURE__ */ a.jsx(Ws, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
2564
|
-
/* @__PURE__ */ a.jsx(
|
|
2565
|
-
Z.Input,
|
|
2566
|
-
{
|
|
2567
|
-
ref: s,
|
|
2568
|
-
className: d(
|
|
2569
|
-
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
2570
|
-
e
|
|
2571
|
-
),
|
|
2572
|
-
...t
|
|
2573
|
-
}
|
|
2574
|
-
)
|
|
2575
|
-
] }));
|
|
2576
|
-
ir.displayName = Z.Input.displayName;
|
|
2577
|
-
const lr = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2578
|
-
Z.List,
|
|
2579
|
-
{
|
|
2580
|
-
ref: s,
|
|
2581
|
-
className: d("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
|
|
2582
|
-
...t
|
|
2583
|
-
}
|
|
2584
|
-
));
|
|
2585
|
-
lr.displayName = Z.List.displayName;
|
|
2586
|
-
const cr = f.forwardRef((e, t) => /* @__PURE__ */ a.jsx(Z.Empty, { ref: t, className: "py-6 text-center text-sm", ...e }));
|
|
2587
|
-
cr.displayName = Z.Empty.displayName;
|
|
2588
|
-
const dr = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2589
|
-
Z.Group,
|
|
2590
|
-
{
|
|
2591
|
-
ref: s,
|
|
2592
|
-
className: d(
|
|
2593
|
-
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
2594
|
-
e
|
|
2595
|
-
),
|
|
2596
|
-
...t
|
|
2597
|
-
}
|
|
2598
|
-
));
|
|
2599
|
-
dr.displayName = Z.Group.displayName;
|
|
2600
|
-
const ur = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Z.Separator, { ref: s, className: d("-mx-1 h-px bg-border", e), ...t }));
|
|
2601
|
-
ur.displayName = Z.Separator.displayName;
|
|
2602
|
-
const fr = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2603
|
-
Z.Item,
|
|
2604
|
-
{
|
|
2605
|
-
ref: s,
|
|
2606
|
-
className: d(
|
|
2607
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2608
|
-
e
|
|
2609
|
-
),
|
|
2610
|
-
...t
|
|
2611
|
-
}
|
|
2612
|
-
));
|
|
2613
|
-
fr.displayName = Z.Item.displayName;
|
|
2614
|
-
const mr = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
|
|
2615
|
-
mr.displayName = "CommandShortcut";
|
|
2616
|
-
const fl = D.Root, ml = D.Trigger, pl = D.Group, gl = D.Portal, bl = D.Sub, hl = D.RadioGroup, pr = f.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
2617
|
-
D.SubTrigger,
|
|
2618
|
-
{
|
|
2619
|
-
ref: n,
|
|
2620
|
-
className: d(
|
|
2621
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
2622
|
-
t && "pl-8",
|
|
2623
|
-
e
|
|
2624
|
-
),
|
|
2625
|
-
...o,
|
|
2626
|
-
children: [
|
|
2627
|
-
s,
|
|
2628
|
-
/* @__PURE__ */ a.jsx(rt, { className: "ml-auto h-4 w-4" })
|
|
2629
|
-
]
|
|
2630
|
-
}
|
|
2631
|
-
));
|
|
2632
|
-
pr.displayName = D.SubTrigger.displayName;
|
|
2633
|
-
const gr = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2634
|
-
D.SubContent,
|
|
2635
|
-
{
|
|
2636
|
-
ref: s,
|
|
2637
|
-
className: d(
|
|
2638
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2639
|
-
e
|
|
2640
|
-
),
|
|
2641
|
-
...t
|
|
2642
|
-
}
|
|
2643
|
-
));
|
|
2644
|
-
gr.displayName = D.SubContent.displayName;
|
|
2645
|
-
const br = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(D.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
2646
|
-
D.Content,
|
|
2647
|
-
{
|
|
2648
|
-
ref: s,
|
|
2649
|
-
className: d(
|
|
2650
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2651
|
-
e
|
|
2652
|
-
),
|
|
2653
|
-
...t
|
|
2654
|
-
}
|
|
2655
|
-
) }));
|
|
2656
|
-
br.displayName = D.Content.displayName;
|
|
2657
|
-
const hr = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2658
|
-
D.Item,
|
|
2659
|
-
{
|
|
2660
|
-
ref: o,
|
|
2661
|
-
className: d(
|
|
2662
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2663
|
-
t && "pl-8",
|
|
2664
|
-
e
|
|
2665
|
-
),
|
|
2666
|
-
...s
|
|
2667
|
-
}
|
|
2668
|
-
));
|
|
2669
|
-
hr.displayName = D.Item.displayName;
|
|
2670
|
-
const xr = f.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
2671
|
-
D.CheckboxItem,
|
|
2672
|
-
{
|
|
2673
|
-
ref: n,
|
|
2674
|
-
className: d(
|
|
2675
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2676
|
-
e
|
|
2677
|
-
),
|
|
2678
|
-
checked: s,
|
|
2679
|
-
...o,
|
|
2680
|
-
children: [
|
|
2681
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(D.ItemIndicator, { children: /* @__PURE__ */ a.jsx(De, { className: "h-4 w-4" }) }) }),
|
|
2682
|
-
t
|
|
2683
|
-
]
|
|
2684
|
-
}
|
|
2685
|
-
));
|
|
2686
|
-
xr.displayName = D.CheckboxItem.displayName;
|
|
2687
|
-
const vr = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
2688
|
-
D.RadioItem,
|
|
2689
|
-
{
|
|
2690
|
-
ref: o,
|
|
2691
|
-
className: d(
|
|
2692
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2693
|
-
e
|
|
2694
|
-
),
|
|
2695
|
-
...s,
|
|
2696
|
-
children: [
|
|
2697
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(D.ItemIndicator, { children: /* @__PURE__ */ a.jsx(it, { className: "h-4 w-4 fill-current" }) }) }),
|
|
2698
|
-
t
|
|
2699
|
-
]
|
|
2700
|
-
}
|
|
2701
|
-
));
|
|
2702
|
-
vr.displayName = D.RadioItem.displayName;
|
|
2703
|
-
const yr = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2704
|
-
D.Label,
|
|
2705
|
-
{
|
|
2706
|
-
ref: o,
|
|
2707
|
-
className: d("px-2 py-1.5 text-sm font-semibold text-foreground", t && "pl-8", e),
|
|
2708
|
-
...s
|
|
2709
|
-
}
|
|
2710
|
-
));
|
|
2711
|
-
yr.displayName = D.Label.displayName;
|
|
2712
|
-
const wr = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(D.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-border", e), ...t }));
|
|
2713
|
-
wr.displayName = D.Separator.displayName;
|
|
2714
|
-
const Nr = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
|
|
2715
|
-
Nr.displayName = "ContextMenuShortcut";
|
|
2716
|
-
const kr = (e) => {
|
|
2717
|
-
try {
|
|
2718
|
-
const t = document.getElementById("icon-picker-field"), s = document.createElement("div");
|
|
2719
|
-
Xs.render(/* @__PURE__ */ a.jsx(Ys, { value: e }), s), t.appendChild(s), s.hidden = !0;
|
|
2720
|
-
let o = s.innerHTML;
|
|
2721
|
-
setTimeout(() => t.removeChild(s), 100);
|
|
2722
|
-
const r = new DOMParser().parseFromString(o, "image/svg+xml"), i = r.querySelector("svg");
|
|
2723
|
-
return i && (i.removeAttribute("width"), i.removeAttribute("height")), new XMLSerializer().serializeToString(r);
|
|
2724
|
-
} catch (t) {
|
|
2725
|
-
return console.error(t), "";
|
|
2726
|
-
}
|
|
2727
|
-
}, xl = ({ value: e, onChange: t }) => {
|
|
2728
|
-
const s = (o) => {
|
|
2729
|
-
t("<svg />");
|
|
2730
|
-
const n = kr(o);
|
|
2731
|
-
t(n);
|
|
2732
|
-
};
|
|
2733
|
-
return /* @__PURE__ */ a.jsxs("div", { className: "mt-1 flex h-20 items-center gap-x-2", id: "icon-picker-field", children: [
|
|
2734
|
-
/* @__PURE__ */ a.jsxs("div", { className: "group relative h-12 w-12", children: [
|
|
2735
|
-
/* @__PURE__ */ a.jsx(
|
|
2736
|
-
"div",
|
|
2737
|
-
{
|
|
2738
|
-
dangerouslySetInnerHTML: {
|
|
2739
|
-
__html: e ? e.replace("<svg", '<svg class="h-5 w-5"') : "<svg class='h-5 w-5' />"
|
|
2740
|
-
},
|
|
2741
|
-
className: "absolute left-1/2 top-1/2 z-0 -translate-x-1/2 -translate-y-1/2 transform cursor-pointer bg-white"
|
|
2742
|
-
}
|
|
2743
|
-
),
|
|
2744
|
-
/* @__PURE__ */ a.jsx(
|
|
2745
|
-
Gs,
|
|
2746
|
-
{
|
|
2747
|
-
value: e ? "BiSolidGrid" : null,
|
|
2748
|
-
onChange: s,
|
|
2749
|
-
pickButtonStyle: {
|
|
2750
|
-
position: "relative",
|
|
2751
|
-
height: "48px",
|
|
2752
|
-
width: "48px",
|
|
2753
|
-
border: "1px solid #BBBBBB",
|
|
2754
|
-
display: "flex",
|
|
2755
|
-
alignItems: "center",
|
|
2756
|
-
justifyContent: "center",
|
|
2757
|
-
borderRadius: "6px",
|
|
2758
|
-
backgroundColor: "transparent",
|
|
2759
|
-
zIndex: 1
|
|
2760
|
-
},
|
|
2761
|
-
searchInputStyle: {
|
|
2762
|
-
backgroundColor: "transparent",
|
|
2763
|
-
width: "100%",
|
|
2764
|
-
border: "1px solid #BBBBBB",
|
|
2765
|
-
margin: "0px 10px",
|
|
2766
|
-
padding: "10px"
|
|
2767
|
-
}
|
|
2768
|
-
}
|
|
2769
|
-
)
|
|
2770
|
-
] }),
|
|
2771
|
-
/* @__PURE__ */ a.jsx(
|
|
2772
|
-
"textarea",
|
|
2773
|
-
{
|
|
2774
|
-
autoCapitalize: "off",
|
|
2775
|
-
autoCorrect: "off",
|
|
2776
|
-
spellCheck: "false",
|
|
2777
|
-
value: e,
|
|
2778
|
-
onChange: (o) => t(o.target.value),
|
|
2779
|
-
className: "h-full w-full rounded-sm border border-foreground/20 px-2 py-1 text-xs shadow-sm focus:border-gray-500/80 focus:outline-none focus:ring-0",
|
|
2780
|
-
placeholder: "Choose icon or enter svg"
|
|
2781
|
-
}
|
|
2782
|
-
)
|
|
2783
|
-
] });
|
|
2784
|
-
}, Ar = nt.lazy(() => import("./UnsplashImages-UkHihhA5.js")), Sr = nt.lazy(() => import("./UploadImages-HtuJZJlo.js")), Es = ({
|
|
2785
|
-
isModalView: e = !1,
|
|
2786
|
-
onSelect: t = () => {
|
|
2787
|
-
}
|
|
2788
|
-
}) => {
|
|
2789
|
-
const s = ne("uploadMediaCallback"), o = ne("unsplashAccessKey"), n = s === void 0, r = o === void 0, [i, c] = Ee(
|
|
2790
|
-
r ? "upload" : n ? "unsplash" : "upload"
|
|
2791
|
-
);
|
|
2792
|
-
return /* @__PURE__ */ a.jsxs("div", { className: "flex h-full flex-col", children: [
|
|
2793
|
-
/* @__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 && n ? "Unsplash images" : e ? "Select or upload images" : "Images" }) }),
|
|
2794
|
-
/* @__PURE__ */ a.jsxs(ba, { value: i, onValueChange: (m) => c(m), className: "flex h-full w-full flex-col py-2", children: [
|
|
2795
|
-
!(n || r) && /* @__PURE__ */ a.jsxs(Cs, { className: "w-full", children: [
|
|
2796
|
-
/* @__PURE__ */ a.jsx(st, { value: "upload", className: "w-full", children: "Upload" }),
|
|
2797
|
-
/* @__PURE__ */ a.jsx(st, { value: "unsplash", className: "w-full", children: "Unsplash" })
|
|
2798
|
-
] }),
|
|
2799
|
-
i === "unsplash" ? /* @__PURE__ */ a.jsx(ot, { value: "unsplash", className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ a.jsx(Nt, { fallback: /* @__PURE__ */ a.jsx("div", { className: "h-64 w-full animate-pulse bg-gray-100" }), children: /* @__PURE__ */ a.jsx(Ar, { isModalView: e, onSelect: t }) }) }) : /* @__PURE__ */ a.jsx(ot, { value: "upload", className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ a.jsx(Nt, { fallback: /* @__PURE__ */ a.jsx("div", { className: "h-64 w-full animate-pulse bg-gray-100" }), children: /* @__PURE__ */ a.jsx(Sr, { isModalView: e, onSelect: t }) }) })
|
|
2800
|
-
] })
|
|
2801
|
-
] });
|
|
2802
|
-
}, vl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2803
|
-
__proto__: null,
|
|
2804
|
-
default: Es
|
|
2805
|
-
}, Symbol.toStringTag, { value: "Module" })), Vt = ({ children: e, onSelect: t }) => {
|
|
2806
|
-
const [s, o] = Ee(!1), n = (...r) => {
|
|
2807
|
-
t.call(void 0, ...r), o(!1);
|
|
2808
|
-
};
|
|
2809
|
-
return /* @__PURE__ */ a.jsxs(Ns, { open: s, onOpenChange: (r) => o(r), children: [
|
|
2810
|
-
/* @__PURE__ */ a.jsx(ea, { asChild: !0, children: e }),
|
|
2811
|
-
/* @__PURE__ */ a.jsx(wt, { 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 }) }) })
|
|
2812
|
-
] });
|
|
2813
|
-
}, yl = ({ value: e, onChange: t, id: s, onBlur: o }) => {
|
|
2814
|
-
const n = ne("uploadMediaCallback"), r = ne("unsplashAccessKey"), i = n === void 0, c = r === void 0;
|
|
2815
|
-
return /* @__PURE__ */ a.jsxs("div", { className: "mt-1.5 flex items-center gap-x-3", children: [
|
|
2816
|
-
e ? /* @__PURE__ */ a.jsx("img", { src: e, className: "h-20 w-20 overflow-hidden rounded-md border object-cover", alt: "" }) : /* @__PURE__ */ a.jsx(Vt, { 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" }) }),
|
|
2817
|
-
/* @__PURE__ */ a.jsxs("div", { className: "flex w-3/5 flex-col", children: [
|
|
2818
|
-
!(i && c) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2819
|
-
/* @__PURE__ */ a.jsx(Vt, { 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 || !Ve(e) ? "Replace Image" : "Choose Image" }) }),
|
|
2820
|
-
/* @__PURE__ */ a.jsx("small", { className: "-pl-4 pt-2 text-center text-xs text-gray-600", children: "OR" })
|
|
2821
|
-
] }),
|
|
2822
|
-
/* @__PURE__ */ a.jsx(
|
|
2823
|
-
"input",
|
|
2824
|
-
{
|
|
2825
|
-
autoCapitalize: "off",
|
|
2826
|
-
autoCorrect: "off",
|
|
2827
|
-
spellCheck: "false",
|
|
2828
|
-
type: "url",
|
|
2829
|
-
className: "text-xs",
|
|
2830
|
-
placeholder: "Enter image URL",
|
|
2831
|
-
value: e,
|
|
2832
|
-
onBlur: ({ target: { value: m } }) => o(s, m),
|
|
2833
|
-
onChange: (m) => t(m.target.value)
|
|
2834
|
-
}
|
|
2835
|
-
)
|
|
2836
|
-
] })
|
|
2837
|
-
] });
|
|
2838
|
-
}, wl = ({ id: e, placeholder: t, value: s, onChange: o, onBlur: n }) => {
|
|
2839
|
-
const r = {
|
|
2840
|
-
toolbar: [
|
|
2841
|
-
["bold", "italic", "underline", "strike", "blockquote"],
|
|
2842
|
-
[{ list: "ordered" }, { list: "bullet" }],
|
|
2843
|
-
[{ color: [] }, { background: [] }, { align: [] }],
|
|
2844
|
-
["link", "clean"]
|
|
2845
|
-
]
|
|
2846
|
-
}, i = [
|
|
2847
|
-
"header",
|
|
2848
|
-
"font",
|
|
2849
|
-
"list",
|
|
2850
|
-
"bold",
|
|
2851
|
-
"italic",
|
|
2852
|
-
"underline",
|
|
2853
|
-
"strike",
|
|
2854
|
-
"blockquote",
|
|
2855
|
-
"color",
|
|
2856
|
-
"background",
|
|
2857
|
-
"align",
|
|
2858
|
-
"link",
|
|
2859
|
-
"image"
|
|
2860
|
-
];
|
|
2861
|
-
return typeof window > "u" ? null : /* @__PURE__ */ a.jsx(
|
|
2862
|
-
Js,
|
|
2863
|
-
{
|
|
2864
|
-
id: e,
|
|
2865
|
-
value: s,
|
|
2866
|
-
onBlur: (c) => n(e, c),
|
|
2867
|
-
onChange: (c) => o(c),
|
|
2868
|
-
modules: r,
|
|
2869
|
-
formats: i,
|
|
2870
|
-
placeholder: t,
|
|
2871
|
-
className: "mt-1 rounded-md"
|
|
2872
|
-
}
|
|
2873
|
-
);
|
|
2874
|
-
}, Nl = ({ schema: e, formData: t, onChange: s }) => {
|
|
2875
|
-
const [o, n] = Ee([]), r = ne("getPages", () => []), { type: i = "page", href: c = "", target: m = "self" } = t;
|
|
2876
|
-
return Me(() => {
|
|
2877
|
-
(async () => {
|
|
2878
|
-
const l = await r();
|
|
2879
|
-
n(l || []);
|
|
2880
|
-
})();
|
|
2881
|
-
}, []), /* @__PURE__ */ a.jsxs("div", { children: [
|
|
2882
|
-
/* @__PURE__ */ a.jsx("span", { className: "text-xs font-medium", children: (e == null ? void 0 : e.title) ?? "Link" }),
|
|
2883
|
-
/* @__PURE__ */ a.jsxs("div", { className: "flex flex-col gap-y-1.5", children: [
|
|
2884
|
-
/* @__PURE__ */ a.jsx("select", { name: "type", value: i, onChange: (l) => s({ ...t, type: l.target.value }), children: [
|
|
2885
|
-
{ const: "page", title: "Open Page" },
|
|
2886
|
-
{ const: "url", title: "Open URL" },
|
|
2887
|
-
{ const: "email", title: "Compose Email" },
|
|
2888
|
-
{ const: "telephone", title: "Call Phone" },
|
|
2889
|
-
{ const: "scroll", title: "Scroll to element" }
|
|
2890
|
-
].map((l) => /* @__PURE__ */ a.jsx("option", { value: l.const, children: l.title }, l.const)) }),
|
|
2891
|
-
i === "page" ? /* @__PURE__ */ a.jsxs("select", { name: "href", value: c, onChange: (l) => s({ ...t, href: l.target.value || "#" }), children: [
|
|
2892
|
-
/* @__PURE__ */ a.jsx("option", { value: "", children: "Choose page" }),
|
|
2893
|
-
M(o, (l) => /* @__PURE__ */ a.jsx("option", { value: l.slug, children: l.name }, l.uuid))
|
|
2894
|
-
] }) : /* @__PURE__ */ a.jsx(
|
|
2895
|
-
"input",
|
|
2896
|
-
{
|
|
2897
|
-
autoCapitalize: "off",
|
|
2898
|
-
autoCorrect: "off",
|
|
2899
|
-
spellCheck: "false",
|
|
2900
|
-
name: "href",
|
|
2901
|
-
type: "text",
|
|
2902
|
-
value: c,
|
|
2903
|
-
onChange: (l) => s({ ...t, href: l.target.value || "#" }),
|
|
2904
|
-
placeholder: i === "page" || i === "url" ? "Enter URL" : i === "scroll" ? "#ElementID" : "Enter detail"
|
|
2905
|
-
}
|
|
2906
|
-
),
|
|
2907
|
-
(i === "page" || i === "url") && /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
2908
|
-
/* @__PURE__ */ a.jsx(
|
|
2909
|
-
"input",
|
|
2910
|
-
{
|
|
2911
|
-
autoCapitalize: "off",
|
|
2912
|
-
autoCorrect: "off",
|
|
2913
|
-
spellCheck: "false",
|
|
2914
|
-
type: "checkbox",
|
|
2915
|
-
defaultChecked: m === "_blank",
|
|
2916
|
-
className: "cursor-pointer rounded-md border border-border",
|
|
2917
|
-
onChange: () => s({ ...t, target: m === "_blank" ? "_self" : "_blank" })
|
|
2918
|
-
}
|
|
2919
|
-
),
|
|
2920
|
-
/* @__PURE__ */ a.jsx("span", { className: "pt-1 text-xs", children: "Open in new tab" })
|
|
2921
|
-
] })
|
|
2922
|
-
] })
|
|
2923
|
-
] });
|
|
2924
|
-
};
|
|
2925
|
-
export {
|
|
2926
|
-
Pn as $,
|
|
2927
|
-
Di as A,
|
|
2928
|
-
On as B,
|
|
2929
|
-
hr as C,
|
|
2930
|
-
ie as D,
|
|
2931
|
-
Cn as E,
|
|
2932
|
-
ds as F,
|
|
2933
|
-
qi as G,
|
|
2934
|
-
Ki as H,
|
|
2935
|
-
Pa as I,
|
|
2936
|
-
li as J,
|
|
2937
|
-
Bi as K,
|
|
2938
|
-
ol as L,
|
|
2939
|
-
nl as M,
|
|
2940
|
-
Ha as N,
|
|
2941
|
-
Xa as O,
|
|
2942
|
-
Ka as P,
|
|
2943
|
-
Ga as Q,
|
|
2944
|
-
ci as R,
|
|
2945
|
-
Sn as S,
|
|
2946
|
-
Vi as T,
|
|
2947
|
-
ri as U,
|
|
2948
|
-
ln as V,
|
|
2949
|
-
An as W,
|
|
2950
|
-
os as X,
|
|
2951
|
-
ui as Y,
|
|
2952
|
-
$o as Z,
|
|
2953
|
-
jn as _,
|
|
2954
|
-
Li as a,
|
|
2955
|
-
Xt as a$,
|
|
2956
|
-
Ho as a0,
|
|
2957
|
-
hn as a1,
|
|
2958
|
-
pi as a2,
|
|
2959
|
-
dl as a3,
|
|
2960
|
-
Ui as a4,
|
|
2961
|
-
$i as a5,
|
|
2962
|
-
xa as a6,
|
|
2963
|
-
Ms as a7,
|
|
2964
|
-
ir as a8,
|
|
2965
|
-
lr as a9,
|
|
2966
|
-
wi as aA,
|
|
2967
|
-
pa as aB,
|
|
2968
|
-
ii as aC,
|
|
2969
|
-
bi as aD,
|
|
2970
|
-
or as aE,
|
|
2971
|
-
ua as aF,
|
|
2972
|
-
Oi as aG,
|
|
2973
|
-
xi as aH,
|
|
2974
|
-
vi as aI,
|
|
2975
|
-
ga as aJ,
|
|
2976
|
-
al as aK,
|
|
2977
|
-
Wa as aL,
|
|
2978
|
-
qa as aM,
|
|
2979
|
-
Zr as aN,
|
|
2980
|
-
Nn as aO,
|
|
2981
|
-
aa as aP,
|
|
2982
|
-
ra as aQ,
|
|
2983
|
-
la as aR,
|
|
2984
|
-
ca as aS,
|
|
2985
|
-
da as aT,
|
|
2986
|
-
$n as aU,
|
|
2987
|
-
Hn as aV,
|
|
2988
|
-
kn as aW,
|
|
2989
|
-
ba as aX,
|
|
2990
|
-
Cs as aY,
|
|
2991
|
-
st as aZ,
|
|
2992
|
-
oi as a_,
|
|
2993
|
-
cr as aa,
|
|
2994
|
-
dr as ab,
|
|
2995
|
-
fr as ac,
|
|
2996
|
-
ta as ad,
|
|
2997
|
-
oa as ae,
|
|
2998
|
-
na as af,
|
|
2999
|
-
sa as ag,
|
|
3000
|
-
Ns as ah,
|
|
3001
|
-
ea as ai,
|
|
3002
|
-
wt as aj,
|
|
3003
|
-
Ii as ak,
|
|
3004
|
-
It as al,
|
|
3005
|
-
Tt as am,
|
|
3006
|
-
wl as an,
|
|
3007
|
-
xl as ao,
|
|
3008
|
-
yl as ap,
|
|
3009
|
-
Nl as aq,
|
|
3010
|
-
Ln as ar,
|
|
3011
|
-
ma as as,
|
|
3012
|
-
ki as at,
|
|
3013
|
-
ti as au,
|
|
3014
|
-
Mi as av,
|
|
3015
|
-
zn as aw,
|
|
3016
|
-
Vn as ax,
|
|
3017
|
-
Fn as ay,
|
|
3018
|
-
Ni as az,
|
|
3019
|
-
Yn as b,
|
|
3020
|
-
Yi as b$,
|
|
3021
|
-
Ao as b0,
|
|
3022
|
-
io as b1,
|
|
3023
|
-
ce as b2,
|
|
3024
|
-
ko as b3,
|
|
3025
|
-
No as b4,
|
|
3026
|
-
Ne as b5,
|
|
3027
|
-
Xr as b6,
|
|
3028
|
-
re as b7,
|
|
3029
|
-
Zn as b8,
|
|
3030
|
-
ni as b9,
|
|
3031
|
-
Ma as bA,
|
|
3032
|
-
Ei as bB,
|
|
3033
|
-
ot as bC,
|
|
3034
|
-
Zi as bD,
|
|
3035
|
-
Ia as bE,
|
|
3036
|
-
Ja as bF,
|
|
3037
|
-
Dn as bG,
|
|
3038
|
-
En as bH,
|
|
3039
|
-
yt as bI,
|
|
3040
|
-
Wn as bJ,
|
|
3041
|
-
Gn as bK,
|
|
3042
|
-
ia as bL,
|
|
3043
|
-
Ss as bM,
|
|
3044
|
-
va as bN,
|
|
3045
|
-
Hi as bO,
|
|
3046
|
-
ya as bP,
|
|
3047
|
-
ka as bQ,
|
|
3048
|
-
Aa as bR,
|
|
3049
|
-
_a as bS,
|
|
3050
|
-
ja as bT,
|
|
3051
|
-
Sa as bU,
|
|
3052
|
-
Xi as bV,
|
|
3053
|
-
Ca as bW,
|
|
3054
|
-
Gi as bX,
|
|
3055
|
-
Na as bY,
|
|
3056
|
-
wa as bZ,
|
|
3057
|
-
Wi as b_,
|
|
3058
|
-
ht as ba,
|
|
3059
|
-
vs as bb,
|
|
3060
|
-
gi as bc,
|
|
3061
|
-
zi as bd,
|
|
3062
|
-
ls as be,
|
|
3063
|
-
cs as bf,
|
|
3064
|
-
cl as bg,
|
|
3065
|
-
Ci as bh,
|
|
3066
|
-
Ai as bi,
|
|
3067
|
-
di as bj,
|
|
3068
|
-
Ti as bk,
|
|
3069
|
-
zo as bl,
|
|
3070
|
-
on as bm,
|
|
3071
|
-
Uo as bn,
|
|
3072
|
-
fi as bo,
|
|
3073
|
-
mi as bp,
|
|
3074
|
-
hi as bq,
|
|
3075
|
-
tn as br,
|
|
3076
|
-
Ri as bs,
|
|
3077
|
-
Si as bt,
|
|
3078
|
-
ji as bu,
|
|
3079
|
-
_i as bv,
|
|
3080
|
-
Ji as bw,
|
|
3081
|
-
Ra as bx,
|
|
3082
|
-
Qi as by,
|
|
3083
|
-
Ta as bz,
|
|
3084
|
-
Xn as c,
|
|
3085
|
-
Ba as c0,
|
|
3086
|
-
Ea as c1,
|
|
3087
|
-
el as c2,
|
|
3088
|
-
tl as c3,
|
|
3089
|
-
sl as c4,
|
|
3090
|
-
La as c5,
|
|
3091
|
-
Oa as c6,
|
|
3092
|
-
za as c7,
|
|
3093
|
-
Va as c8,
|
|
3094
|
-
Fa as c9,
|
|
3095
|
-
Ya as ca,
|
|
3096
|
-
rl as cb,
|
|
3097
|
-
il as cc,
|
|
3098
|
-
$a as cd,
|
|
3099
|
-
Ua as ce,
|
|
3100
|
-
ll as cf,
|
|
3101
|
-
tr as cg,
|
|
3102
|
-
sr as ch,
|
|
3103
|
-
ul as ci,
|
|
3104
|
-
mr as cj,
|
|
3105
|
-
ur as ck,
|
|
3106
|
-
xr as cl,
|
|
3107
|
-
vr as cm,
|
|
3108
|
-
yr as cn,
|
|
3109
|
-
wr as co,
|
|
3110
|
-
Nr as cp,
|
|
3111
|
-
pl as cq,
|
|
3112
|
-
gl as cr,
|
|
3113
|
-
bl as cs,
|
|
3114
|
-
gr as ct,
|
|
3115
|
-
pr as cu,
|
|
3116
|
-
hl as cv,
|
|
3117
|
-
vl as cw,
|
|
3118
|
-
qn as d,
|
|
3119
|
-
Jn as e,
|
|
3120
|
-
Kn as f,
|
|
3121
|
-
Qn as g,
|
|
3122
|
-
ne as h,
|
|
3123
|
-
ke as i,
|
|
3124
|
-
$e as j,
|
|
3125
|
-
ai as k,
|
|
3126
|
-
Qr as l,
|
|
3127
|
-
Jr as m,
|
|
3128
|
-
nn as n,
|
|
3129
|
-
br as o,
|
|
3130
|
-
qr as p,
|
|
3131
|
-
fl as q,
|
|
3132
|
-
ml as r,
|
|
3133
|
-
wn as s,
|
|
3134
|
-
Rt as t,
|
|
3135
|
-
Pi as u,
|
|
3136
|
-
Fi as v,
|
|
3137
|
-
ha as w,
|
|
3138
|
-
Co as x,
|
|
3139
|
-
yi as y,
|
|
3140
|
-
Zo as z
|
|
3141
|
-
};
|