@chaibuilder/sdk 1.2.27 → 1.2.28
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-ksZjjn0k.js → AddBlocks-0sW6gkCO.js} +8 -7
- package/dist/AddBlocks-YJPdSqcY.cjs +1 -0
- package/dist/{BrandingOptions-T_kbQFQv.js → BrandingOptions--vgnQvD1.js} +11 -10
- package/dist/BrandingOptions-RDn_Nhcq.cjs +1 -0
- package/dist/CanvasArea-41QoxuLf.cjs +55 -0
- package/dist/CanvasArea-aii0PyU-.js +1179 -0
- package/dist/{Class-3k8xjeiM.js → Class-6Hz2KzYb.js} +1 -1
- package/dist/{Class-MmCxz2Ay.cjs → Class-Zc8hpE7f.cjs} +1 -1
- package/dist/{CurrentPage-0eeU1V_c.js → CurrentPage-06Iacwyp.js} +9 -8
- package/dist/CurrentPage-2W1pdAOG.cjs +1 -0
- package/dist/ListTree-DnA8gj-7.js +314 -0
- package/dist/ListTree-pdQ14QJC.cjs +1 -0
- package/dist/MODIFIERS-YPHRtwrM.cjs +1 -0
- package/dist/{MODIFIERS-WQdaNvb8.js → MODIFIERS-cBT31iqE.js} +7 -19
- package/dist/PagesPanel-PBFzPSNY.cjs +1 -0
- package/dist/{PagesPanel-rYN28QpN.js → PagesPanel-_1CDTUdE.js} +9 -8
- package/dist/ProjectPanel-755bbzEQ.cjs +1 -0
- package/dist/{ProjectPanel-ivFOhdcz.js → ProjectPanel-pUMeIiUW.js} +14 -13
- package/dist/STRINGS--j49GZJP.js +7 -0
- package/dist/STRINGS-gPz7CUOk.cjs +1 -0
- package/dist/Settings-G9Xtqr7n.cjs +1 -0
- package/dist/{Settings-XWmKzRl9.js → Settings-dnO-s6x0.js} +596 -559
- package/dist/SidePanels-Gq2LdVuY.cjs +1 -0
- package/dist/{SidePanels-ODktnGbC.js → SidePanels-VxSXXkt_.js} +62 -61
- package/dist/{Topbar-Yunooh00.js → Topbar-5zbOSGF6.js} +6 -5
- package/dist/Topbar-J2tb4SA1.cjs +1 -0
- package/dist/{UnsplashImages-QMl0bxix.js → UnsplashImages-4WAWgA4s.js} +20 -19
- package/dist/UnsplashImages-XwjKheek.cjs +1 -0
- package/dist/{UploadImages-Si-A26bc.js → UploadImages-PONIHtn6.js} +11 -10
- package/dist/UploadImages-y7LAQVrT.cjs +1 -0
- package/dist/{add-page-modal-U7AUUrI1.js → add-page-modal-4VrFvgEm.js} +25 -24
- package/dist/add-page-modal-jWcp0w-S.cjs +1 -0
- package/dist/confirm-alert-4OQlXZTJ.cjs +1 -0
- package/dist/{confirm-alert-kV5-c70T.js → confirm-alert-j7b88hsW.js} +6 -5
- package/dist/core.cjs +1 -1
- package/dist/core.js +47 -46
- package/dist/defaultTheme-7VqqhOcp.cjs +1 -0
- package/dist/{defaultTheme-gunU_Fe5.js → defaultTheme-D8B4-wHO.js} +1 -1
- package/dist/{delete-page-modal-UCBpdjLe.js → delete-page-modal--xHHdRAq.js} +9 -8
- package/dist/delete-page-modal-p6b0upz4.cjs +1 -0
- package/dist/email.cjs +1 -1
- package/dist/email.js +7 -6
- package/dist/{form-zmlTjM9j.js → form-_GJb9YcB.js} +1 -1
- package/dist/{form-Ap63cNec.cjs → form-jQj7E-hS.cjs} +1 -1
- package/dist/html-to-json-LJyJsnmZ.js +228 -0
- package/dist/html-to-json-vP1ESB_e.cjs +1 -0
- package/dist/{index-lOJfSheQ.js → index-0QJwevON.js} +2 -2
- package/dist/index-12HbDLon.cjs +1 -0
- package/dist/{index-f0AbmoYY.js → index-Eb5zyh2F.js} +4 -4
- package/dist/{index-Qk028f-N.cjs → index-KArv7pNz.cjs} +1 -1
- package/dist/{index-CFUoB97-.js → index-UHaqEdws.js} +993 -956
- package/dist/{index-l19JVVXI.cjs → index-mlMvwv2b.cjs} +2 -2
- package/dist/lib.cjs +3 -3
- package/dist/lib.js +17 -16
- package/dist/{page-viewer-jOwy--9A.js → page-viewer-00Xx4u8e.js} +10 -9
- package/dist/page-viewer-SZNm7b1n.cjs +1 -0
- package/dist/project-general-setting-C_pHNuZE.cjs +1 -0
- package/dist/{project-general-setting-3N8HZ2fe.js → project-general-setting-asDxlmhZ.js} +10 -9
- package/dist/{project-seo-setting-bSiNgO_1.js → project-seo-setting-DuAaDfDR.js} +7 -6
- package/dist/project-seo-setting-q2953ybQ.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +14 -13
- package/dist/{single-page-detail--AZlZ-pC.js → single-page-detail-UNxXvhl4.js} +17 -16
- package/dist/single-page-detail-oqj6zsLU.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +8 -7
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +134 -133
- package/dist/useCanvasSettings-MR0Glu1b.cjs +1 -0
- package/dist/useCanvasSettings-R6br4J9i.js +6 -0
- package/dist/web-blocks.cjs +33 -1
- package/dist/web-blocks.js +603 -429
- package/package.json +1 -1
- package/dist/AddBlocks-S-4jzdWv.cjs +0 -1
- package/dist/BrandingOptions-EMCT0Wa3.cjs +0 -1
- package/dist/CanvasArea-SDzbubar.cjs +0 -55
- package/dist/CanvasArea-rhOeubmu.js +0 -950
- package/dist/CurrentPage-aTjWjc3o.cjs +0 -1
- package/dist/ListTree-Muu4rAtp.js +0 -308
- package/dist/ListTree-SWsqdfcG.cjs +0 -1
- package/dist/MODIFIERS-9EwxLM8V.cjs +0 -1
- package/dist/PagesPanel-n3x-0ozR.cjs +0 -1
- package/dist/ProjectPanel-pBePMOta.cjs +0 -1
- package/dist/Settings-JRyJayf5.cjs +0 -1
- package/dist/SidePanels-BtUeo6M9.cjs +0 -1
- package/dist/Topbar-QMeD3hvq.cjs +0 -1
- package/dist/UnsplashImages-05JR8oIu.cjs +0 -1
- package/dist/UploadImages-OgSN1HVt.cjs +0 -1
- package/dist/add-page-modal-9pTKItY-.cjs +0 -1
- package/dist/confirm-alert-DhRc-Zcd.cjs +0 -1
- package/dist/defaultTheme-7Lk2zq60.cjs +0 -1
- package/dist/delete-page-modal-4s-6AIy4.cjs +0 -1
- package/dist/html-to-json-C_Eobs_d.cjs +0 -1
- package/dist/html-to-json-p__Fgqdg.js +0 -210
- package/dist/index-F4AQQ6qq.cjs +0 -1
- package/dist/page-viewer-YFrIG3L7.cjs +0 -1
- package/dist/project-general-setting-hK7I7FuN.cjs +0 -1
- package/dist/project-seo-setting-x-FK0pez.cjs +0 -1
- package/dist/single-page-detail-9abF2g2R.cjs +0 -1
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { stringify as b, parse as w } from "himalaya";
|
|
2
|
+
import { g as x, c as N } from "./Functions-7jnEwJyw.js";
|
|
3
|
+
import { isEmpty as m, includes as f, get as n, forEach as A, find as p, set as u, capitalize as C, flatMapDeep as L, filter as S, flatten as $ } from "lodash-es";
|
|
4
|
+
import { a as y } from "./STRINGS--j49GZJP.js";
|
|
5
|
+
const B = (t) => {
|
|
6
|
+
const e = /(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/, a = /(?:https?:\/\/)?(?:www\.)?(player)?.vimeo\.com/;
|
|
7
|
+
return e.test(t) || a.test(t);
|
|
8
|
+
}, R = (t) => {
|
|
9
|
+
if (m(t))
|
|
10
|
+
return t;
|
|
11
|
+
const e = /<video[^>]+src=['"]([^'">]+)['"]/, a = /<iframe[^>]+src=['"]([^'">]+)['"]/, s = t.match(e), l = t.match(a), c = s ? s[1] : l ? l[1] : null, r = /(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/, o = /(?:https?:\/\/)?(?:www\.)?player.vimeo\.com/;
|
|
12
|
+
return c && (r.test(c) || o.test(c)) ? c : t;
|
|
13
|
+
}, I = {
|
|
14
|
+
img: { alt: "alt", width: "width", height: "height", src: "image" },
|
|
15
|
+
video: {
|
|
16
|
+
src: "url",
|
|
17
|
+
autoplay: "controls.autoPlay",
|
|
18
|
+
muted: "controls.muted",
|
|
19
|
+
loop: "controls.loop",
|
|
20
|
+
controls: "controls.widgets"
|
|
21
|
+
},
|
|
22
|
+
a: {
|
|
23
|
+
href: "link.href",
|
|
24
|
+
target: "link.target",
|
|
25
|
+
type: ""
|
|
26
|
+
// @TODO: Detect here what to url, email, phone, elementId
|
|
27
|
+
},
|
|
28
|
+
input: {
|
|
29
|
+
placeholder: "placeholder",
|
|
30
|
+
required: "required",
|
|
31
|
+
type: "inputType",
|
|
32
|
+
name: "fieldName"
|
|
33
|
+
},
|
|
34
|
+
textarea: {
|
|
35
|
+
placeholder: "placeholder",
|
|
36
|
+
required: "required",
|
|
37
|
+
type: "inputType",
|
|
38
|
+
name: "fieldName"
|
|
39
|
+
},
|
|
40
|
+
select: {
|
|
41
|
+
placeholder: "placeholder",
|
|
42
|
+
required: "required",
|
|
43
|
+
multiple: "multiple",
|
|
44
|
+
name: "fieldName"
|
|
45
|
+
}
|
|
46
|
+
}, M = (t, e) => t.children.length === 1 && f(["Heading", "Paragraph", "Span", "ListItem", "Button", "Label", "TableCell", "Link"], e._type), _ = (t) => t.map((e) => e.type === "text" ? n(e, "content", "") : m(e.children) ? "" : _(e.children)).join(""), d = (t) => t === null ? !0 : t, v = (t) => {
|
|
47
|
+
if (t.tagName === "svg")
|
|
48
|
+
return {};
|
|
49
|
+
const e = {}, a = I[t.tagName] || {}, s = t.attributes;
|
|
50
|
+
return A(s, ({ key: l, value: c }) => {
|
|
51
|
+
if (a[l]) {
|
|
52
|
+
if (t.tagName === "img" && l === "src" && !c.startsWith("http")) {
|
|
53
|
+
const r = p(t.attributes, { key: "width" }), o = p(t.attributes, { key: "height" });
|
|
54
|
+
r && o ? c = `https://via.placeholder.com/${r == null ? void 0 : r.value}x${o == null ? void 0 : o.value}` : c = "https://via.placeholder.com/150x150";
|
|
55
|
+
}
|
|
56
|
+
u(e, a[l], d(c));
|
|
57
|
+
} else
|
|
58
|
+
f(["style", "class", "srcset"], l) || u(e, `styles_attrs.${l}`, d(c));
|
|
59
|
+
}), delete e.class, e;
|
|
60
|
+
}, H = (t, e = "styles") => {
|
|
61
|
+
if (!t.attributes)
|
|
62
|
+
return { [e]: `${y},` };
|
|
63
|
+
const a = p(t.attributes, { key: "class" });
|
|
64
|
+
if (a) {
|
|
65
|
+
const s = a.value;
|
|
66
|
+
return { [e]: `${y},${s}` };
|
|
67
|
+
}
|
|
68
|
+
return { [e]: `${y},` };
|
|
69
|
+
}, E = (t) => {
|
|
70
|
+
const e = {
|
|
71
|
+
"hs-collapse-toggle": "CollapseToggle",
|
|
72
|
+
"hs-collapse": "Collapse",
|
|
73
|
+
"hs-accordion-group": "AccordionGroup",
|
|
74
|
+
"hs-accordion": "Accordion",
|
|
75
|
+
"hs-accordion-toggle": "AccordionToggle",
|
|
76
|
+
"hs-accordion-content": "AccordionContent"
|
|
77
|
+
}, a = {
|
|
78
|
+
Accordion: "active",
|
|
79
|
+
CollapseToggle: "open"
|
|
80
|
+
}, s = p(t.attributes, { key: "class" });
|
|
81
|
+
if (s) {
|
|
82
|
+
const r = s.value.split(" ");
|
|
83
|
+
for (const o of r)
|
|
84
|
+
if (e[o]) {
|
|
85
|
+
const g = e[o], h = s.value.replace(o, "");
|
|
86
|
+
return t.attributes = t.attributes.map((i) => i.key === "class" ? { ...i, value: h } : i), a[g] && (t.attributes = t.attributes.map(
|
|
87
|
+
(i) => i.key === "class" ? { ...i, value: i.value.replace(a[g], "") } : i
|
|
88
|
+
)), g;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const l = {
|
|
92
|
+
"data-hs-overlay": "OverlayTrigger",
|
|
93
|
+
"data-hs-remove-element": "RemoveElementButton",
|
|
94
|
+
"data-hs-tab": "Tab",
|
|
95
|
+
"data-hs-theme-click-value": "DarkModeButton",
|
|
96
|
+
'role="tablist"': "TabList",
|
|
97
|
+
'role="tab"': "TabItem",
|
|
98
|
+
'role="tabpanel"': "TabPanel"
|
|
99
|
+
};
|
|
100
|
+
for (const r in l)
|
|
101
|
+
if (t.attributes.some((o) => o.key === r))
|
|
102
|
+
return l[r];
|
|
103
|
+
const c = p(t.attributes, { key: "role" });
|
|
104
|
+
if (c) {
|
|
105
|
+
const r = `role="${c.value}"`;
|
|
106
|
+
if (l[r])
|
|
107
|
+
return l[r];
|
|
108
|
+
}
|
|
109
|
+
}, P = (t) => {
|
|
110
|
+
const e = E(t);
|
|
111
|
+
if (e)
|
|
112
|
+
return { _type: e };
|
|
113
|
+
switch (t.tagName) {
|
|
114
|
+
case "img":
|
|
115
|
+
return { _type: "Image" };
|
|
116
|
+
case "input":
|
|
117
|
+
return { _type: "Input", showLabel: !1 };
|
|
118
|
+
case "hr":
|
|
119
|
+
return { _type: "Divider" };
|
|
120
|
+
case "br":
|
|
121
|
+
return { _type: "LineBreak" };
|
|
122
|
+
case "textarea":
|
|
123
|
+
return { _type: "TextArea", showLabel: !1 };
|
|
124
|
+
case "audio":
|
|
125
|
+
return { _type: "Audio" };
|
|
126
|
+
case "canvas":
|
|
127
|
+
return { _type: "Canvas" };
|
|
128
|
+
case "video":
|
|
129
|
+
case "iframe":
|
|
130
|
+
return { _type: "CustomHTML" };
|
|
131
|
+
case "svg":
|
|
132
|
+
return { _type: "Icon" };
|
|
133
|
+
case "select":
|
|
134
|
+
return { _type: "Select", options: [] };
|
|
135
|
+
case "option":
|
|
136
|
+
return { _type: "Option" };
|
|
137
|
+
case "ul":
|
|
138
|
+
case "ol":
|
|
139
|
+
case "dl":
|
|
140
|
+
return {
|
|
141
|
+
_type: "List",
|
|
142
|
+
tag: t.tagName,
|
|
143
|
+
_listType: t.tagName === "ol" ? "list-decimal" : "list-none"
|
|
144
|
+
};
|
|
145
|
+
case "li":
|
|
146
|
+
case "dt":
|
|
147
|
+
return { _type: "ListItem", tag: t.tagName };
|
|
148
|
+
case "span":
|
|
149
|
+
case "figcaption":
|
|
150
|
+
case "legend":
|
|
151
|
+
return { _type: "Span", tag: t.tagName };
|
|
152
|
+
case "p":
|
|
153
|
+
return { _type: "Paragraph", content: "" };
|
|
154
|
+
case "a":
|
|
155
|
+
return { _type: "Link" };
|
|
156
|
+
case "form":
|
|
157
|
+
return { _type: "Form" };
|
|
158
|
+
case "label":
|
|
159
|
+
return { _type: "Label" };
|
|
160
|
+
case "button":
|
|
161
|
+
return { _type: "Button" };
|
|
162
|
+
case "code":
|
|
163
|
+
return { _type: "Code" };
|
|
164
|
+
case "h1":
|
|
165
|
+
case "h2":
|
|
166
|
+
case "h3":
|
|
167
|
+
case "h4":
|
|
168
|
+
case "h5":
|
|
169
|
+
case "h6":
|
|
170
|
+
return { _type: "Heading", tag: t.tagName };
|
|
171
|
+
case "table":
|
|
172
|
+
return { _type: "Table" };
|
|
173
|
+
case "tr":
|
|
174
|
+
return { _type: "TableRow" };
|
|
175
|
+
case "td":
|
|
176
|
+
case "th":
|
|
177
|
+
return { _type: "TableCell", tag: t.tagName };
|
|
178
|
+
case "thead":
|
|
179
|
+
return { _type: "TableHead" };
|
|
180
|
+
case "tbody":
|
|
181
|
+
return { _type: "TableBody" };
|
|
182
|
+
case "tfoot":
|
|
183
|
+
return { _type: "TableFooter" };
|
|
184
|
+
default:
|
|
185
|
+
return {
|
|
186
|
+
_type: "Box",
|
|
187
|
+
tag: t.tagName,
|
|
188
|
+
_name: t.tagName === "div" ? "Box" : C(t.tagName)
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
}, T = (t, e = null) => L(t, (a) => {
|
|
192
|
+
var c;
|
|
193
|
+
if (a.type === "comment")
|
|
194
|
+
return [];
|
|
195
|
+
let s = { _id: x() };
|
|
196
|
+
if (e && (s._parent = e.block._id), a.type === "text")
|
|
197
|
+
return m(n(a, "content", "")) ? [] : e && M(e.node, e.block) ? (u(e, "block.content", n(a, "content", "")), []) : { ...s, _type: "Text", content: n(a, "content", "") };
|
|
198
|
+
if (s = {
|
|
199
|
+
...s,
|
|
200
|
+
...P(a),
|
|
201
|
+
...v(a),
|
|
202
|
+
...H(a)
|
|
203
|
+
}, s._type === "Input") {
|
|
204
|
+
const r = s.inputType || "text";
|
|
205
|
+
r === "checkbox" ? u(s, "_type", "Checkbox") : r === "radio" && u(s, "_type", "Radio");
|
|
206
|
+
} else if (a.tagName === "video" || a.tagName === "iframe") {
|
|
207
|
+
const r = b([a]);
|
|
208
|
+
return B(r) && (u(s, "_type", "Video"), u(s, "url", R(r)), u(s, "styles", `${y},absolute top-0 left-0 w-full h-full`), u(s, "controls", { autoPlay: !1, muted: !0, loop: !1, controls: !1 })), s.content = r, [s];
|
|
209
|
+
} else if (a.tagName === "svg") {
|
|
210
|
+
const r = p(a.attributes, { key: "height" }), o = p(a.attributes, { key: "width" }), g = n(r, "value") ? `[${n(r, "value")}px]` : "24px", h = n(o, "value") ? `[${n(o, "value")}px]` : "24px", i = n(p(a.attributes, { key: "class" }), "value", "w-full h-full");
|
|
211
|
+
return s.styles = `${y}, ${N(`w-${h} h-${g}`, i)}`.trim(), a.attributes = S(a.attributes, (k) => !f(["style", "width", "height", "class"], k.key)), s.icon = b([a]), [s];
|
|
212
|
+
} else if (a.tagName == "option" && e && ((c = e.block) == null ? void 0 : c._type) === "Select")
|
|
213
|
+
return e.block.options.push({
|
|
214
|
+
label: _(a.children),
|
|
215
|
+
...v(a)
|
|
216
|
+
}), [];
|
|
217
|
+
const l = T(a.children, { block: s, node: a });
|
|
218
|
+
return [s, ...l];
|
|
219
|
+
}), q = (t) => {
|
|
220
|
+
const e = t.match(/<body[^>]*>[\s\S]*?<\/body>/);
|
|
221
|
+
return (e && e.length > 0 ? e[0].replace(/<body/, "<div").replace(/<\/body>/, "</div>") : t).replace(/\s+/g, " ").replaceAll("> <", "><").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, "").trim();
|
|
222
|
+
}, V = (t) => {
|
|
223
|
+
const e = w(q(t));
|
|
224
|
+
return m(t) ? [] : $(T(e));
|
|
225
|
+
};
|
|
226
|
+
export {
|
|
227
|
+
V as g
|
|
228
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const y=require("himalaya"),m=require("./Functions-N3yhPYKY.cjs"),s=require("lodash-es"),p=require("./STRINGS-gPz7CUOk.cjs"),_=e=>{const t=/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/,a=/(?:https?:\/\/)?(?:www\.)?(player)?.vimeo\.com/;return t.test(e)||a.test(e)},T=e=>{if(s.isEmpty(e))return e;const t=/<video[^>]+src=['"]([^'">]+)['"]/,a=/<iframe[^>]+src=['"]([^'">]+)['"]/,r=e.match(t),l=e.match(a),i=r?r[1]:l?l[1]:null,c=/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/,o=/(?:https?:\/\/)?(?:www\.)?player.vimeo\.com/;return i&&(c.test(i)||o.test(i))?i:e},k={img:{alt:"alt",width:"width",height:"height",src:"image"},video:{src:"url",autoplay:"controls.autoPlay",muted:"controls.muted",loop:"controls.loop",controls:"controls.widgets"},a:{href:"link.href",target:"link.target",type:""},input:{placeholder:"placeholder",required:"required",type:"inputType",name:"fieldName"},textarea:{placeholder:"placeholder",required:"required",type:"inputType",name:"fieldName"},select:{placeholder:"placeholder",required:"required",multiple:"multiple",name:"fieldName"}},w=(e,t)=>e.children.length===1&&s.includes(["Heading","Paragraph","Span","ListItem","Button","Label","TableCell","Link"],t._type),b=e=>e.map(t=>t.type==="text"?s.get(t,"content",""):s.isEmpty(t.children)?"":b(t.children)).join(""),h=e=>e===null?!0:e,f=e=>{if(e.tagName==="svg")return{};const t={},a=k[e.tagName]||{},r=e.attributes;return s.forEach(r,({key:l,value:i})=>{if(a[l]){if(e.tagName==="img"&&l==="src"&&!i.startsWith("http")){const c=s.find(e.attributes,{key:"width"}),o=s.find(e.attributes,{key:"height"});c&&o?i=`https://via.placeholder.com/${c==null?void 0:c.value}x${o==null?void 0:o.value}`:i="https://via.placeholder.com/150x150"}s.set(t,a[l],h(i))}else s.includes(["style","class","srcset"],l)||s.set(t,`styles_attrs.${l}`,h(i))}),delete t.class,t},x=(e,t="styles")=>{if(!e.attributes)return{[t]:`${p.STYLES_KEY},`};const a=s.find(e.attributes,{key:"class"});if(a){const r=a.value;return{[t]:`${p.STYLES_KEY},${r}`}}return{[t]:`${p.STYLES_KEY},`}},S=e=>{const t={"hs-collapse-toggle":"CollapseToggle","hs-collapse":"Collapse","hs-accordion-group":"AccordionGroup","hs-accordion":"Accordion","hs-accordion-toggle":"AccordionToggle","hs-accordion-content":"AccordionContent"},a={Accordion:"active",CollapseToggle:"open"},r=s.find(e.attributes,{key:"class"});if(r){const c=r.value.split(" ");for(const o of c)if(t[o]){const u=t[o],g=r.value.replace(o,"");return e.attributes=e.attributes.map(n=>n.key==="class"?{...n,value:g}:n),a[u]&&(e.attributes=e.attributes.map(n=>n.key==="class"?{...n,value:n.value.replace(a[u],"")}:n)),u}}const l={"data-hs-overlay":"OverlayTrigger","data-hs-remove-element":"RemoveElementButton","data-hs-tab":"Tab","data-hs-theme-click-value":"DarkModeButton",'role="tablist"':"TabList",'role="tab"':"TabItem",'role="tabpanel"':"TabPanel"};for(const c in l)if(e.attributes.some(o=>o.key===c))return l[c];const i=s.find(e.attributes,{key:"role"});if(i){const c=`role="${i.value}"`;if(l[c])return l[c]}},N=e=>{const t=S(e);if(t)return{_type:t};switch(e.tagName){case"img":return{_type:"Image"};case"input":return{_type:"Input",showLabel:!1};case"hr":return{_type:"Divider"};case"br":return{_type:"LineBreak"};case"textarea":return{_type:"TextArea",showLabel:!1};case"audio":return{_type:"Audio"};case"canvas":return{_type:"Canvas"};case"video":case"iframe":return{_type:"CustomHTML"};case"svg":return{_type:"Icon"};case"select":return{_type:"Select",options:[]};case"option":return{_type:"Option"};case"ul":case"ol":case"dl":return{_type:"List",tag:e.tagName,_listType:e.tagName==="ol"?"list-decimal":"list-none"};case"li":case"dt":return{_type:"ListItem",tag:e.tagName};case"span":case"figcaption":case"legend":return{_type:"Span",tag:e.tagName};case"p":return{_type:"Paragraph",content:""};case"a":return{_type:"Link"};case"form":return{_type:"Form"};case"label":return{_type:"Label"};case"button":return{_type:"Button"};case"code":return{_type:"Code"};case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return{_type:"Heading",tag:e.tagName};case"table":return{_type:"Table"};case"tr":return{_type:"TableRow"};case"td":case"th":return{_type:"TableCell",tag:e.tagName};case"thead":return{_type:"TableHead"};case"tbody":return{_type:"TableBody"};case"tfoot":return{_type:"TableFooter"};default:return{_type:"Box",tag:e.tagName,_name:e.tagName==="div"?"Box":s.capitalize(e.tagName)}}},d=(e,t=null)=>s.flatMapDeep(e,a=>{var i;if(a.type==="comment")return[];let r={_id:m.generateUUID()};if(t&&(r._parent=t.block._id),a.type==="text")return s.isEmpty(s.get(a,"content",""))?[]:t&&w(t.node,t.block)?(s.set(t,"block.content",s.get(a,"content","")),[]):{...r,_type:"Text",content:s.get(a,"content","")};if(r={...r,...N(a),...f(a),...x(a)},r._type==="Input"){const c=r.inputType||"text";c==="checkbox"?s.set(r,"_type","Checkbox"):c==="radio"&&s.set(r,"_type","Radio")}else if(a.tagName==="video"||a.tagName==="iframe"){const c=y.stringify([a]);return _(c)&&(s.set(r,"_type","Video"),s.set(r,"url",T(c)),s.set(r,"styles",`${p.STYLES_KEY},absolute top-0 left-0 w-full h-full`),s.set(r,"controls",{autoPlay:!1,muted:!0,loop:!1,controls:!1})),r.content=c,[r]}else if(a.tagName==="svg"){const c=s.find(a.attributes,{key:"height"}),o=s.find(a.attributes,{key:"width"}),u=s.get(c,"value")?`[${s.get(c,"value")}px]`:"24px",g=s.get(o,"value")?`[${s.get(o,"value")}px]`:"24px",n=s.get(s.find(a.attributes,{key:"class"}),"value","w-full h-full");return r.styles=`${p.STYLES_KEY}, ${m.cn(`w-${g} h-${u}`,n)}`.trim(),a.attributes=s.filter(a.attributes,v=>!s.includes(["style","width","height","class"],v.key)),r.icon=y.stringify([a]),[r]}else if(a.tagName=="option"&&t&&((i=t.block)==null?void 0:i._type)==="Select")return t.block.options.push({label:b(a.children),...f(a)}),[];const l=d(a.children,{block:r,node:a});return[r,...l]}),L=e=>{const t=e.match(/<body[^>]*>[\s\S]*?<\/body>/);return(t&&t.length>0?t[0].replace(/<body/,"<div").replace(/<\/body>/,"</div>"):e).replace(/\s+/g," ").replaceAll("> <","><").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").trim()},E=e=>{const t=y.parse(L(e));return s.isEmpty(e)?[]:s.flatten(d(t))};exports.getBlocksFromHTML=E;
|
|
@@ -3,7 +3,7 @@ import { initReactI18next as wN, useTranslation as SN } from "react-i18next";
|
|
|
3
3
|
import { j as xe } from "./jsx-runtime-WbnYoNE9.js";
|
|
4
4
|
import * as I from "react";
|
|
5
5
|
import v, { useState as ge, useRef as de, useLayoutEffect as na, useEffect as Oe, useCallback as Ve, useDebugValue as Cve, useContext as Ar, forwardRef as Y, createContext as qr, useReducer as ON, useMemo as aa, cloneElement as Gt, Fragment as EN, Children as $a, createElement as qa, Component as E2, isValidElement as PN, memo as AN, Suspense as Wn, lazy as $c } from "react";
|
|
6
|
-
import { i as kf, j as Qr, k as P2, l as vr, m as Ht, n as _r, o as hn, p as A2, q as CN, h as Wa, B as IN, S as xN, r as C2, s as kN, t as NN, v as RN, w as TN, x as jN, y as MN, z as zN, C as DN, D as FN, T as VN, E as LN, F as BN, u as qN, G as WN, H as KN, I as ZN } from "./index-
|
|
6
|
+
import { i as kf, j as Qr, k as P2, l as vr, m as Ht, n as _r, o as hn, p as A2, q as CN, h as Wa, B as IN, S as xN, r as C2, s as kN, t as NN, v as RN, w as TN, x as jN, y as MN, z as zN, C as DN, D as FN, T as VN, E as LN, F as BN, u as qN, G as WN, H as KN, I as ZN } from "./index-UHaqEdws.js";
|
|
7
7
|
import { g as eu, c as Un } from "./_commonjsHelpers-UyOWmZb0.js";
|
|
8
8
|
import I2 from "clsx";
|
|
9
9
|
import { flushSync as UN, createPortal as GN } from "react-dom";
|
|
@@ -39416,7 +39416,7 @@ const uve = () => ru(jN), dve = () => aa(() => l6(), []), l0e = ({ children: e }
|
|
|
39416
39416
|
r((o) => (delete o[a.providerKey], o));
|
|
39417
39417
|
});
|
|
39418
39418
|
}), [n, t, r]), /* @__PURE__ */ xe.jsx(xe.Fragment, { children: e });
|
|
39419
|
-
}, fve = $c(() => import("./SidePanels-
|
|
39419
|
+
}, fve = $c(() => import("./SidePanels-VxSXXkt_.js")), pve = $c(() => import("./Topbar-5zbOSGF6.js")), gve = $c(() => import("./CanvasArea-aii0PyU-.js")), mve = $c(() => import("./Settings-dnO-s6x0.js")), vve = () => {
|
|
39420
39420
|
const { savePage: e } = zN(), r = Wa("autoSaveSupport", !0), t = Wa("autoSaveInterval", 60);
|
|
39421
39421
|
u6(() => {
|
|
39422
39422
|
r && e();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const k=require("react"),i=require("lodash-es"),ne=require("./Functions-N3yhPYKY.cjs"),pe=require("@chaibuilder/runtime"),p=require("jotai"),X=require("./STRINGS-gPz7CUOk.cjs"),cn=require("./_commonjsHelpers-wDK0ZLPo.cjs"),dn=require("@react-hookz/web"),Oe=require("./MODIFIERS-YPHRtwrM.cjs"),u=require("./Class-Zc8hpE7f.cjs");require("react-i18next");const r=require("./jsx-runtime-Z_BpKhVy.cjs"),un=require("@radix-ui/react-toggle"),ce=require("class-variance-authority"),mn=require("@radix-ui/react-switch"),pn=require("@radix-ui/react-slot"),fn=require("@radix-ui/react-accordion"),G=require("@radix-ui/react-icons"),xn=require("@radix-ui/react-alert-dialog"),gn=require("@radix-ui/react-dialog"),hn=require("@radix-ui/react-label"),bn=require("@radix-ui/react-scroll-area"),vn=require("@radix-ui/react-tabs"),yn=require("@radix-ui/react-tooltip"),jn=require("@radix-ui/react-popover"),wn=require("@radix-ui/react-menubar"),Rn=require("@radix-ui/react-hover-card"),kn=require("@radix-ui/react-select"),Sn=require("@radix-ui/react-dropdown-menu"),Nn=require("@radix-ui/react-separator"),Cn=require("@radix-ui/react-toast"),K=require("cmdk"),En=require("@radix-ui/react-context-menu"),wt=require("react-icons-picker"),An=require("react-dom"),Bn=require("react-quill");function U(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const f=U(k),Rt=U(un),Le=U(mn),le=U(fn),W=U(xn),P=U(gn),kt=U(hn),ae=U(bn),de=U(vn),fe=U(yn),be=U(jn),_=U(wn),Ce=U(Rn),F=U(kn),M=U(Sn),St=U(Nn),Q=U(Cn),D=U(En);var q={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let _n=0;function te(e,t){const s=`atom${++_n}`,o={toString:()=>s};return typeof e=="function"?o.read=e:(o.init=e,o.read=n=>n(o),o.write=(n,l,a)=>l(o,typeof a=="function"?a(n(o)):a)),t&&(o.write=t),o}const Te=e=>"init"in e,Pe=e=>!!e.write,ke=new WeakMap,Tn=(e,t)=>{ke.set(e,t),e.catch(()=>{}).finally(()=>ke.delete(e))},ct=(e,t)=>{const s=ke.get(e);s&&(ke.delete(e),s(t))},dt=(e,t)=>{e.status="fulfilled",e.value=t},ut=(e,t)=>{e.status="rejected",e.reason=t},Pn=e=>typeof(e==null?void 0:e.then)=="function",ge=(e,t)=>"v"in e&&"v"in t&&Object.is(e.v,t.v),mt=(e,t)=>"e"in e&&"e"in t&&Object.is(e.e,t.e),me=e=>"v"in e&&e.v instanceof Promise,In=(e,t)=>"v"in e&&"v"in t&&e.v.orig&&e.v.orig===t.v.orig,je=e=>{if("e"in e)throw e.e;return e.v},Nt=()=>{const e=new WeakMap,t=new WeakMap,s=new Map;let o,n,l;(q?"production":void 0)!=="production"&&(o=new Set,n=new Set,l=new Set);const a=m=>e.get(m),d=(m,h)=>{(q?"production":void 0)!=="production"&&Object.freeze(h);const y=e.get(m);if(e.set(m,h),s.has(m)||s.set(m,y),y&&me(y)){const b="v"in h?h.v instanceof Promise?h.v:Promise.resolve(h.v):Promise.reject(h.e);ct(y.v,b)}},g=(m,h,y)=>{const b=new Map;let w=!1;y.forEach((v,S)=>{!v&&S===m&&(v=h),v?(b.set(S,v),h.d.get(S)!==v&&(w=!0)):(q?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(w||h.d.size!==b.size)&&(h.d=b)},c=(m,h,y)=>{const b=a(m),w={d:(b==null?void 0:b.d)||new Map,v:h};if(y&&g(m,w,y),b&&ge(b,w)&&b.d===w.d)return b;if(b&&me(b)&&me(w)&&In(b,w)){if(b.d===w.d)return b;w.v=b.v}return d(m,w),w},x=(m,h,y,b)=>{if(Pn(h)){let w;const v=new Promise((S,L)=>{let E=!1;h.then(T=>{if(!E){E=!0;const A=a(m),ee=c(m,v,y);dt(v,T),S(T),(A==null?void 0:A.d)!==ee.d&&H(m,ee,A==null?void 0:A.d)}},T=>{if(!E){E=!0;const A=a(m),ee=c(m,v,y);ut(v,T),L(T),(A==null?void 0:A.d)!==ee.d&&H(m,ee,A==null?void 0:A.d)}}),w=T=>{E||(E=!0,T.then(A=>dt(v,A),A=>ut(v,A)),S(T))}});return v.orig=h,v.status="pending",Tn(v,S=>{S&&w(S),b==null||b()}),c(m,v,y)}return c(m,h,y)},R=(m,h,y)=>{const b=a(m),w={d:(b==null?void 0:b.d)||new Map,e:h};return y&&g(m,w,y),b&&mt(b,w)&&b.d===w.d?b:(d(m,w),w)},N=m=>{const h=a(m);if(h&&(h.d.forEach((E,T)=>{T!==m&&!t.has(T)&&N(T)}),Array.from(h.d).every(([E,T])=>{const A=a(E);return E===m||A===T||A&&!me(A)&&ge(A,T)})))return h;const y=new Map;let b=!0;const w=E=>{if(E===m){const A=a(E);if(A)return y.set(E,A),je(A);if(Te(E))return y.set(E,void 0),E.init;throw new Error("no atom init")}const T=N(E);return y.set(E,T),je(T)};let v,S;const L={get signal(){return v||(v=new AbortController),v.signal},get setSelf(){return(q?"production":void 0)!=="production"&&!Pe(m)&&console.warn("setSelf function cannot be used with read-only atom"),!S&&Pe(m)&&(S=(...E)=>{if((q?"production":void 0)!=="production"&&b&&console.warn("setSelf function cannot be called in sync"),!b)return $(m,...E)}),S}};try{const E=m.read(w,L);return x(m,E,y,()=>v==null?void 0:v.abort())}catch(E){return R(m,E,y)}finally{b=!1}},j=m=>je(N(m)),C=m=>{let h=t.get(m);return h||(h=z(m)),h},O=(m,h)=>!h.l.size&&(!h.t.size||h.t.size===1&&h.t.has(m)),V=m=>{const h=t.get(m);h&&O(m,h)&&J(m)},B=m=>{const h=new Map,y=new WeakMap,b=v=>{const S=t.get(v);S==null||S.t.forEach(L=>{L!==v&&(h.set(L,(h.get(L)||new Set).add(v)),y.set(L,(y.get(L)||0)+1),b(L))})};b(m);const w=v=>{const S=t.get(v);S==null||S.t.forEach(L=>{var E;if(L!==v){let T=y.get(L);if(T&&y.set(L,--T),!T){let A=!!((E=h.get(L))!=null&&E.size);if(A){const ee=a(L),ln=N(L);A=!ee||!ge(ee,ln)}A||h.forEach(ee=>ee.delete(L))}w(L)}})};w(m)},I=(m,...h)=>{let y=!0;const b=S=>je(N(S)),w=(S,...L)=>{let E;if(S===m){if(!Te(S))throw new Error("atom not writable");const T=a(S),A=x(S,L[0]);(!T||!ge(T,A))&&B(S)}else E=I(S,...L);if(!y){const T=Y();(q?"production":void 0)!=="production"&&n.forEach(A=>A({type:"async-write",flushed:T}))}return E},v=m.write(b,w,...h);return y=!1,v},$=(m,...h)=>{const y=I(m,...h),b=Y();return(q?"production":void 0)!=="production"&&n.forEach(w=>w({type:"write",flushed:b})),y},z=(m,h)=>{const y={t:new Set(h&&[h]),l:new Set};if(t.set(m,y),(q?"production":void 0)!=="production"&&l.add(m),N(m).d.forEach((b,w)=>{const v=t.get(w);v?v.t.add(m):w!==m&&z(w,m)}),N(m),Pe(m)&&m.onMount){const b=m.onMount((...w)=>$(m,...w));b&&(y.u=b)}return y},J=m=>{var h;const y=(h=t.get(m))==null?void 0:h.u;y&&y(),t.delete(m),(q?"production":void 0)!=="production"&&l.delete(m);const b=a(m);b?(me(b)&&ct(b.v),b.d.forEach((w,v)=>{if(v!==m){const S=t.get(v);S&&(S.t.delete(m),O(v,S)&&J(v))}})):(q?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",m)},H=(m,h,y)=>{const b=new Set(h.d.keys());y==null||y.forEach((w,v)=>{if(b.has(v)){b.delete(v);return}const S=t.get(v);S&&(S.t.delete(m),O(v,S)&&J(v))}),b.forEach(w=>{const v=t.get(w);v?v.t.add(m):t.has(m)&&z(w,m)})},Y=()=>{let m;for((q?"production":void 0)!=="production"&&(m=new Set);s.size;){const h=Array.from(s);s.clear(),h.forEach(([y,b])=>{const w=a(y);if(w){w.d!==(b==null?void 0:b.d)&&H(y,w,b==null?void 0:b.d);const v=t.get(y);v&&!(b&&!me(b)&&(ge(b,w)||mt(b,w)))&&(v.l.forEach(S=>S()),(q?"production":void 0)!=="production"&&m.add(y))}else(q?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush")})}if((q?"production":void 0)!=="production")return o.forEach(h=>h("state")),m},oe=(m,h)=>{const y=C(m),b=Y(),w=y.l;return w.add(h),(q?"production":void 0)!=="production"&&(o.forEach(v=>v("sub")),n.forEach(v=>v({type:"sub",flushed:b}))),()=>{w.delete(h),V(m),(q?"production":void 0)!=="production"&&(o.forEach(v=>v("unsub")),n.forEach(v=>v({type:"unsub"})))}};return(q?"production":void 0)!=="production"?{get:j,set:$,sub:oe,dev_subscribe_store:(m,h)=>h!==2?(console.warn("The current StoreListener revision is 2. The older ones are deprecated."),o.add(m),()=>{o.delete(m)}):(n.add(m),()=>{n.delete(m)}),dev_get_mounted_atoms:()=>l.values(),dev_get_atom_state:m=>e.get(m),dev_get_mounted:m=>t.get(m),dev_restore_atoms:m=>{for(const[y,b]of m)Te(y)&&(x(y,b),B(y));const h=Y();n.forEach(y=>y({type:"restore",flushed:h}))}}:{get:j,set:$,sub:oe}};let Ie;const Mn=()=>(Ie||(Ie=Nt()),Ie);var Dn={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const On=k.createContext(void 0),qe=e=>{const t=k.useContext(On);return(e==null?void 0:e.store)||t||Mn()};const Ln=e=>typeof(e==null?void 0:e.then)=="function",zn=k.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function Ct(e,t){const s=qe(t),[[o,n,l],a]=k.useReducer(c=>{const x=s.get(e);return Object.is(c[0],x)&&c[1]===s&&c[2]===e?c:[x,s,e]},void 0,()=>[s.get(e),s,e]);let d=o;(n!==s||l!==e)&&(a(),d=s.get(e));const g=t==null?void 0:t.delay;return k.useEffect(()=>{const c=s.sub(e,()=>{if(typeof g=="number"){setTimeout(a,g);return}a()});return a(),c},[s,e,g]),k.useDebugValue(d),Ln(d)?zn(d):d}function Et(e,t){const s=qe(t);return k.useCallback((...n)=>{if((Dn?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return s.set(e,...n)},[s,e])}function Vn(e,t){return[Ct(e,t),Et(e,t)]}var $e={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const At=Symbol();const pt=(e,t,s)=>(t.has(s)?t:t.set(s,e())).get(s),Fn=new WeakMap,Un=(e,t,s)=>{const o=pt(()=>new WeakMap,Fn,t);return pt(e,o,s)},qn={},ft=e=>!!e.write,$n=e=>typeof e=="function";function Gn(e,t){return Un(()=>{const s=new WeakMap,o=(a,d)=>{let g=s.get(a);if(g)return g;const c=d&&s.get(d),x=[],R=[];return a.forEach((N,j)=>{const C=t?t(N):j;R[j]=C;const O=c&&c.atomList[c.keyList.indexOf(C)];if(O){x[j]=O;return}const V=I=>{const $=I(n),z=I(e),H=o(z,$==null?void 0:$.arr).keyList.indexOf(C);if(H<0||H>=z.length){const Y=a[o(a).keyList.indexOf(C)];if(Y)return Y;throw new Error("splitAtom: index out of bounds for read")}return z[H]},B=(I,$,z)=>{const J=I(n),H=I(e),oe=o(H,J==null?void 0:J.arr).keyList.indexOf(C);if(oe<0||oe>=H.length)throw new Error("splitAtom: index out of bounds for write");const m=$n(z)?z(H[oe]):z;$(e,[...H.slice(0,oe),m,...H.slice(oe+1)])};x[j]=ft(e)?te(V,B):te(V)}),c&&c.keyList.length===R.length&&c.keyList.every((N,j)=>N===R[j])?g=c:g={arr:a,atomList:x,keyList:R},s.set(a,g),g},n=te(a=>{const d=a(n),g=a(e);return o(g,d==null?void 0:d.arr)});($e?"production":void 0)!=="production"&&(n.debugPrivate=!0),n.init=void 0;const l=ft(e)?te(a=>a(n).atomList,(a,d,g)=>{switch(g.type){case"remove":{const c=a(l).indexOf(g.atom);if(c>=0){const x=a(e);d(e,[...x.slice(0,c),...x.slice(c+1)])}break}case"insert":{const c=g.before?a(l).indexOf(g.before):a(l).length;if(c>=0){const x=a(e);d(e,[...x.slice(0,c),g.value,...x.slice(c)])}break}case"move":{const c=a(l).indexOf(g.atom),x=g.before?a(l).indexOf(g.before):a(l).length;if(c>=0&&x>=0){const R=a(e);c<x?d(e,[...R.slice(0,c),...R.slice(c+1,x),R[c],...R.slice(x)]):d(e,[...R.slice(0,x),R[c],...R.slice(x,c),...R.slice(c+1)])}break}}}):te(a=>a(n).atomList);return l},e,t||qn)}function Wn(e){const t=Symbol(),s=te(t);($e?"production":void 0)!=="production"&&(s.debugPrivate=!0);const o=te((n,l)=>{const a=n(s);return a!==t?a:e(n,l)},(n,l,a)=>{if(a===At)l(s,t);else if(typeof a=="function"){const d=n(o);l(s,a(d))}else l(s,a)});return o}const Hn=e=>typeof(e==null?void 0:e.then)=="function";function Yn(e){let t,s;const o={getItem:(n,l)=>{var a,d;const g=x=>{if(x=x||"",t!==x){try{s=JSON.parse(x)}catch{return l}t=x}return s},c=(d=(a=e())==null?void 0:a.getItem(n))!=null?d:null;return Hn(c)?c.then(g):g(c)},setItem:(n,l)=>{var a;return(a=e())==null?void 0:a.setItem(n,JSON.stringify(l))},removeItem:n=>{var l;return(l=e())==null?void 0:l.removeItem(n)}};return typeof window<"u"&&typeof window.addEventListener=="function"&&(o.subscribe=(n,l,a)=>{if(!(e()instanceof window.Storage))return()=>{};const d=g=>{if(g.storageArea===e()&&g.key===n){let c;try{c=JSON.parse(g.newValue||"")}catch{c=a}l(c)}};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}}),o}const Kn=Yn(()=>typeof window<"u"?window.localStorage:void 0);function xe(e,t,s=Kn,o){const n=o==null?void 0:o.unstable_getOnInit,l=te(n?s.getItem(e,t):t);return($e?"production":void 0)!=="production"&&(l.debugPrivate=!0),l.onMount=d=>{n||d(s.getItem(e,t));let g;return s.subscribe&&(g=s.subscribe(e,d,t)),g},te(d=>d(l),(d,g,c)=>{const x=typeof c=="function"?c(d(l)):c;return x===At?(g(l,t),s.removeItem(e)):x instanceof Promise?x.then(R=>(g(l,R),s.setItem(e,R))):(g(l,x),s.setItem(e,x))})}const Ge=p.atom(null);Ge.debugLabel="chaiBuilderPropsAtom";const Bt=p.atom({});Bt.debugLabel="chaiExternalDataAtom";const Jn=()=>!1,Qn=e=>{const t=e.replace(X.STYLES_KEY,"").split(",");return{baseClasses:t[0],classes:t[1]}},ze=i.memoize((e,t)=>{if(!e)return!0;const s=pe.getBlockComponent(e);return s&&i.has(s,"canAcceptBlock")?s.canAcceptBlock(t):!1}),Xn=i.memoize((e,t)=>{const s=pe.getBlockComponent(t);return s&&i.has(s,"canBeNested")?s.canBeNested(e):!0}),Zn=i.memoize(e=>{const t=pe.getBlockComponent(e);return t&&i.has(t,"canDuplicate")?t.canDuplicate():!0}),er=i.memoize(e=>{const t=pe.getBlockComponent(e);return t&&i.has(t,"canDelete")?t.canDelete():!0});function _t(e,t,s){const o=i.filter(e,l=>l._parent===t),n=[];for(let l=0;l<o.length;l++){const a=Pt(o[l]);if(Object.keys(a).length>0&&Object.keys(a).forEach(d=>{o[l][d]=`slot:${ne.generateUUID()}`}),i.filter(e,{_parent:o[l]._id}).length>0){const d=ne.generateUUID();n.push({...o[l],oldId:o[l]._id,_id:d,_parent:s}),n.push(i.flatten(_t(e,o[l]._id,d)))}else n.push({...o[l],oldId:o[l]._id,_id:ne.generateUUID(),_parent:s})}return i.flatten(n)}function Tt(e){const t={};e.forEach(o=>{t[o._id]={...o,children:[]}});const s=[];return e.forEach(o=>{if(o._parent){const n=t[o._parent];n&&n.children.push(t[o._id])}else s.push(t[o._id])}),s}const Pt=e=>{const t={};return Object.keys(e).forEach(s=>{i.isString(e[s])&&e[s].startsWith("slot")&&(t[s]=e[s].replace("slot:",""))}),t},tr=(e,t,s=null)=>{let o=i.find(e,{_id:t});o={...o,oldId:o._id,_id:ne.generateUUID()},s&&(o={...o,_parent:s});const n=[o];i.filter(e,{_parent:t}).length>0&&n.push(i.flatten(_t(e,t,o._id)));const l=i.flatten(n);return i.map(l,a=>{const d=a,g=Pt(d);return Object.keys(g).length>0&&Object.keys(g).forEach(c=>{const x=i.find(l,{oldId:g[c].replace("slot:","")});d[c]=`slot:${x._id}`}),i.omit(d,["global","oldId"])})};const Z=p.atom([]);Z.debugLabel="presentBlocksAtom";const It=p.atom(e=>{const t=e(Z);return Tt([...t])});It.debugLabel="treeDSBlocks";Z.debugLabel="presentBlocksAtom";const We=Gn(Z);We.debugLabel="pageBlocksAtomsAtom";const sr=p.atom("");sr.debugLabel="builderActivePageAtom";const or=p.atom(-1);or.debugLabel="destinationDropIndexAtom";const Mt=p.atom([]);Mt.debugLabel="buildingBlocksAtom";const nr=p.atom(e=>{const t=e(Mt);return i.filter(t,s=>i.has(s,"blockId"))});nr.debugLabel="globalBlocksAtom";const He=p.atom([]);He.debugLabel="selectedBlockIdsAtom";const Ye=p.atom(e=>{const t=e(Z),s=e(He);return i.map(i.filter(t,({_id:o})=>i.includes(s,o)),o=>({...o}))});Ye.debugLabel="selectedBlocksAtom";const Ee=p.atom(e=>{const t=e(Ye);if(t.length===0)return null;if(t.length===1)return t[0]});Ee.debugLabel="selectedBlockAtom";const rr=e=>i.get(e,"parent",null),ar=p.atom(e=>{const t=e(Ye),s=i.map(t,rr);return i.filter(e(Z),o=>i.includes(s,o._id))});ar.debugLabel="selectedBlocksParentsAtom";const Dt=p.atom(()=>!1);Dt.debugLabel="selectedBlockFlexChildAtom";const Ot=p.atom(()=>!1);Ot.debugLabel="selectedBlockGridChildAtom";const Ke=p.atom("");Ke.debugLabel="styleStateAtom";const Lt=xe("styleBreakpoint","xs");Lt.debugLabel="styleBreakpointAtom";const ir=()=>({flexChild:p.useAtomValue(Dt),gridChild:p.useAtomValue(Ot)}),lr=()=>p.useAtomValue(Ee),cr=p.atom(e=>{const t=e(Ee),s=e(Z);let o=t;const n=[t];do{const l=s.find(({_id:a})=>a===(o==null?void 0:o._parent));o=l,l&&n.push(l)}while(o!=null&&o._parent);return n}),zt=()=>p.useAtomValue(cr),dr=()=>{const e=zt();return k.useMemo(()=>{for(let t=0;t<e.length;t++){const s=pe.getBlockComponent(e[t]._type),o=i.cloneDeep(i.get(s,"blockState",{}));if(!i.isEmpty(o))return{settings:o,block:e[t]}}return{}},[e])},ur=()=>{const e=zt();return k.useMemo(()=>{let t={};for(let s=0;s<e.length;s++){const o=pe.getBlockComponent(e[s]._type),n=i.get(o,"customStylingStates",{});t={...t,...n}}return t},[e])},ve=()=>{const[e,t]=p.useAtom(He),s=k.useCallback(o=>{t(n=>i.includes(n,o)?i.without(n,o):[...n,o])},[t]);return[e,t,s]},Ve=e=>{switch(e.type){case"singular":return e.uiSchema;case"model":const{properties:t}=e,s={};return Object.keys(t).forEach(l=>{const a=t[l];if(i.includes(["slot","styles"],a.type))return;const d=l;s[d]=Ve(a)}),s;case"list":const{itemProperties:o}=e,n={items:{}};return Object.keys(o).forEach(l=>{const a=o[l];if(i.includes(["slot","styles"],a.type))return;const d=l;n.items[d]=Ve(a)}),n;default:return{}}},Fe=e=>{switch(e.type){case"singular":return e.schema;case"model":const{properties:t,title:s}=e,o={title:s,type:"object",properties:{}};return Object.keys(t).forEach(d=>{const g=t[d];if(i.includes(["slot","styles"],g.type))return;const c=d;o.properties[c]=Fe(g)}),o;case"list":const{itemProperties:n,title:l}=e,a={title:l,type:"array",items:{type:"object",properties:{}}};return Object.keys(n).forEach(d=>{const g=n[d];if(i.includes(["slot","styles"],g.type))return;const c=d;a.items.properties[c]=Fe(g),i.set(a.items,"title",i.get(g,"itemTitle",`${l} item`))}),a;default:return{}}},Vt=e=>{if(!e)return{};const t={};return Object.keys(e).forEach(s=>{t[s]=pr(e[s])}),t},mr=e=>{if(i.isEmpty(e.default))return[];const{itemProperties:t}=e;return i.map(e.default,s=>{const o={...s};return i.forIn(s,(n,l)=>{i.has(t,l)&&i.get(t[l],"i18n",!1)&&(o[l]=X.I18N_KEY)}),o})},pr=e=>{switch(e.type){case"styles":return e.default;case"slot":return`${X.SLOT_KEY}${ne.generateUUID()}`;case"singular":const{i18n:t,schema:s}=e;return t?X.I18N_KEY:i.get(s,"default","");case"model":return Vt(e.properties);case"list":return mr(e);default:return""}};var Je={exports:{}},vi=Je.exports;(function(e){(function(){"use strict";function t(o,n,l){return o.splice(n,!l||1+l-n+(!(l<0^n>=0)&&(l<0||-1)*o.length)),o.length}let s=function(){let o=[],n=-1,l=0,a=!1,d;function g(c,x){return!c||typeof c[x]!="function"?this:(a=!0,c[x](),a=!1,this)}return{add:function(c){return a?this:(o.splice(n+1,o.length-n),o.push(c),l&&o.length>l&&t(o,0,-(l+1)),n=o.length-1,d&&d(),this)},setCallback:function(c){d=c},undo:function(){let c=o[n];if(!c)return this;const x=c.groupId;for(;c.groupId===x&&(g(c,"undo"),n-=1,c=o[n],!(!c||!c.groupId)););return d&&d(),this},redo:function(){let c=o[n+1];if(!c)return this;const x=c.groupId;for(;c.groupId===x&&(g(c,"redo"),n+=1,c=o[n+1],!(!c||!c.groupId)););return d&&d(),this},clear:function(){let c=o.length;o=[],n=-1,d&&c>0&&d()},hasUndo:function(){return n!==-1},hasRedo:function(){return n<o.length-1},getCommands:function(c){return c?o.filter(x=>x.groupId===c):o},getIndex:function(){return n},setLimit:function(c){l=c}}};e.exports?e.exports=s:window.UndoManager=s})()})(Je);var fr=Je.exports;const xr=cn.getDefaultExportFromCjs(fr),gr=p.atom(Oe.BRANDING_OPTIONS_DEFAULTS),hr=p.atom(null),Qe=()=>{const[e,t]=p.useAtom(gr);return[i.isObject(e)?{...Oe.BRANDING_OPTIONS_DEFAULTS,...e}:Oe.BRANDING_OPTIONS_DEFAULTS,t]},br=()=>p.useAtom(hr),vr=p.atom(null),Ft=()=>({currentPage:p.useAtomValue(vr)});function yr(e){return Tt(e)}const Xe=(e,t)=>i.flatten(e.map(s=>{if(s=t?{...s,parent:t}:{...s},s.children){const o=[...s.children];return delete s.children,i.flatten([s,...Xe(o,s._id)])}return s}));function Ze(e,t=!1){for(let s=0;s<e.length;s++){const o=e[s];o.global&&!t?e[s]={type:"GlobalBlock",blockId:o.blockId,_parent:i.get(o,"parent",null),_id:o._id}:o.children&&o.children.length&&Ze(o.children)}}function Ut(e){let t=[],s=i.filter(e,{type:"GlobalBlock"});return s.length>0&&(s=i.map(s,qt),i.each(s,o=>{t=[...t,...jr(o)]})),t}function jr(e){let t=[];const s=i.get(i.first(e),"parent",null);i.set(i.first(e),"parent",null);const o=[flatToNestedInstance.convert($t(e))];Ze(o,!0);let n=Xe(o,e[0]._id);return n=i.set(n,"0.parent",s),t=[...t,n,...Ut(n)],t}function qt(e){const t=i.find(Ue,{_id:e._id});if(!t)return[];const s=[t],o=i.filter(Ue,{_parent:e._id});return o.length?i.flatten([...s,...i.flatten(i.map(o,qt))]):i.flatten(s)}const $t=e=>JSON.parse(JSON.stringify(e));let Ue=[];function wr(e){Ue=e;const t=yr($t(e));Ze(t);const s=Xe(t,null),o=Ut(s),n={};return i.each(o,l=>i.set(n,i.first(l).blockId,l)),[s,n]}const Gt=()=>{const[e]=Qe(),{currentPage:t}=Ft(),[s]=ue();return k.useCallback(()=>{const o=i.map(s,l=>i.omit(l,["expanded","order","title","siblings","tempClasses"])),[n=[]]=wr(o);return{currentPage:t,blocks:n}},[e,t,s])},ie=(e,t=void 0)=>{const s=p.useAtomValue(Ge);return i.get(s,e,t)},et=p.atom([]);et.debugLabel="dataProvidersAtom";const Wt=()=>p.useAtom(et),Ae=p.atom("SAVED");Ae.debugLabel="builderSaveStateAtom";const Rr=()=>{const[e,t]=p.useAtom(Ae),s=ie("onSavePage",async c=>{}),o=ie("onSave",async c=>{}),n=ie("onSaveStateChange",i.noop),l=Gt(),[a]=Wt(),[d]=Qe();return{savePage:dn.useThrottledCallback(async()=>{t("SAVING"),n("SAVING");const c=l();return await s({blocks:c.blocks,providers:a}),await o({blocks:c.blocks,providers:a,brandingOptions:d}),setTimeout(()=>{t("SAVED"),n("SAVED")},100),!0},[l,t,d,o,n],3e3),saveState:e,setSaveState:t}},se=new xr;se.setLimit(50);const tt=()=>{const[,e]=p.useAtom(Ae),t=ie("onSaveStateChange",i.noop);return k.useEffect(()=>(se.setCallback(()=>{e("UNSAVED"),t("UNSAVED")}),()=>{se.setCallback(i.noop)}),[]),{add:se.add,undo:se.undo,redo:se.redo,hasRedo:se.hasRedo,hasUndo:se.hasUndo,clear:se.clear}},st=(e,t)=>{const s=[],o=i.filter(e,n=>i.includes(t,n._id)||i.includes(t,n._parent)?(s.push(n._id),!1):!0);return i.isEmpty(s)?o:st(o,s)},kr=()=>{const[e]=ue(),[t,s]=ve(),{setNewBlocks:o}=re();return k.useCallback(n=>{var a;const l=((a=i.find(e,{_id:n[0]}))==null?void 0:a._parent)||null;o(st(e,n)),setTimeout(()=>s(l?[l]:[]),200)},[e,s,t])};function Sr(e,t,s,o){let n=e.filter(d=>!d._parent);s&&(n=e.filter(d=>d._parent===s));const l=o!==void 0?o:n.length;let a=e.length;for(let d=0,g=0;d<e.length;d++)if(e[d]._parent===s){if(g===l){a=d;break}g++}return!s&&o!==void 0&&o>=n.length&&(a=e.length),[...e.slice(0,a),...t,...e.slice(a)]}function xt(e){const t=[],s=new Map;e.forEach(n=>{s.set(n._id,n)});function o(n){const l=s.get(n);t.includes(l)||(t.push(l),e.forEach(a=>{a._parent===n&&o(a._id)}))}return e.forEach(n=>{n._parent||o(n._id)}),t}const Nr=(e,t,s,o)=>{if(i.isEmpty(t))return xt(e);function n(d,g){const c=d.filter(R=>R._parent===g);let x=[...c];return c.forEach(R=>{x=x.concat(n(d,R._id))}),x}const l=t.reduce((d,g)=>{const c=e.find(x=>x._id===g);if(c){const x=n(e,g);d.push(c,...x)}return d},[]);e=e.filter(d=>!l.includes(d)),l.forEach(d=>{t.includes(d._id)&&(d._parent=s)});let a;if(!s)a=o;else{const d=e.findIndex(g=>g._id===s);if(d===-1)a=o;else{a=d+1;let g=0;for(;g<o&&a<e.length;)e[a]._parent===s&&g++,a++}}return e.splice(a,0,...l),xt(e)},Cr=()=>{const[,e]=ue();return{setNewBlocks:t=>{e(t)},addBlocks:(t,s,o)=>{e(n=>Sr(n,t,s,o))},removeBlocks:t=>{e(s=>st(s,t))},moveBlocks:(t,s,o)=>{e(n=>Nr(n,t,s,o))},updateBlocksProps:t=>{e(s=>{const o=t.map(n=>n._id);return s.map(n=>{if(o.includes(n._id)){const l=i.find(t,{_id:n._id});return{...n,...i.omit(l,"_id")}}return n})})}}},ue=()=>p.useAtom(Z),re=()=>{const{add:e}=tt(),[t]=ue(),{setNewBlocks:s,addBlocks:o,removeBlocks:n,moveBlocks:l,updateBlocksProps:a}=Cr();return{moveBlocks:(j,C,O)=>{const V=i.map(j,I=>{const z=t.find(Y=>Y._id===I)._parent||null,H=t.filter(Y=>z?Y._parent===z:!Y._parent).map(Y=>Y._id).indexOf(I);return{_id:I,oldParent:z,oldPosition:H}}),B=V.find(({_id:I})=>I===j[0]);B&&B.oldParent===C&&B.oldPosition===O||(l(j,C,O),e({undo:()=>i.each(V,({_id:I,oldParent:$,oldPosition:z})=>{l([I],$,z)}),redo:()=>l(j,C,O)}))},addBlocks:(j,C,O)=>{o(j,C,O),e({undo:()=>n(i.map(j,"_id")),redo:()=>o(j,C,O)})},removeBlocks:j=>{var B;const C=(B=i.first(j))==null?void 0:B._parent,V=t.filter(I=>C?I._parent===C:!I._parent).indexOf(i.first(j));n(i.map(j,"_id")),e({undo:()=>o(j,C,V),redo:()=>n(i.map(j,"_id"))})},updateBlocks:(j,C,O)=>{let V=[];if(O)V=i.map(j,B=>({_id:B,...O}));else{const B=i.keys(C);V=i.map(j,I=>{const $=t.find(J=>J._id===I),z={_id:I};return i.each(B,J=>z[J]=$[J]),z})}a(i.map(j,B=>({_id:B,...C}))),e({undo:()=>a(V),redo:()=>a(i.map(j,B=>({_id:B,...C})))})},updateBlocksRuntime:(j,C)=>{a(i.map(j,O=>({_id:O,...C})))},setNewBlocks:j=>{s(j),e({undo:()=>s(t),redo:()=>s(j)})}}},Ht=ce.cva("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",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),Yt=f.forwardRef(({className:e,variant:t,size:s,...o},n)=>r.jsxRuntimeExports.jsx(Rt.Root,{ref:n,className:u.cn(Ht({variant:t,size:s,className:e})),...o}));Yt.displayName=Rt.Root.displayName;const Kt=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(Le.Root,{className:u.cn("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",e),...t,ref:s,children:r.jsxRuntimeExports.jsx(Le.Thumb,{className:u.cn("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")})}));Kt.displayName=Le.Root.displayName;const Be=ce.cva("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",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Jt=f.forwardRef(({className:e,variant:t,size:s,asChild:o=!1,...n},l)=>{const a=o?pn.Slot:"button";return r.jsxRuntimeExports.jsx(a,{className:u.cn(Be({variant:t,size:s,className:e})),ref:l,...n})});Jt.displayName="Button";const Er=le.Root,Qt=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(le.Item,{ref:s,className:u.cn("border-b",e),...t}));Qt.displayName="AccordionItem";const Xt=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsx(le.Header,{className:"flex",children:r.jsxRuntimeExports.jsxs(le.Trigger,{ref:o,className:u.cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...s,children:[t,r.jsxRuntimeExports.jsx(G.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));Xt.displayName=le.Trigger.displayName;const Zt=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsx(le.Content,{ref:o,className:u.cn("text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...s,children:r.jsxRuntimeExports.jsx("div",{className:"pb-4 pt-0",children:t})}));Zt.displayName=le.Content.displayName;const Ar=ce.cva("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",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),es=f.forwardRef(({className:e,variant:t,...s},o)=>r.jsxRuntimeExports.jsx("div",{ref:o,role:"alert",className:u.cn(Ar({variant:t}),e),...s}));es.displayName="Alert";const ts=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("h5",{ref:s,className:u.cn("mb-1 font-medium leading-none tracking-tight",e),...t}));ts.displayName="AlertTitle";const ss=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,className:u.cn("text-sm [&_p]:leading-relaxed",e),...t}));ss.displayName="AlertDescription";const os=ce.cva("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",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),Br=({className:e,variant:t,...s})=>r.jsxRuntimeExports.jsx("div",{className:u.cn(os({variant:t}),e),...s}),_r=W.Root,Tr=W.Trigger,ns=({className:e,...t})=>r.jsxRuntimeExports.jsx(W.Portal,{className:u.cn(e),...t});ns.displayName=W.Portal.displayName;const rs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(W.Overlay,{className:u.cn("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",e),...t,ref:s}));rs.displayName=W.Overlay.displayName;const as=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsxs(ns,{children:[r.jsxRuntimeExports.jsx(rs,{}),r.jsxRuntimeExports.jsx(W.Content,{ref:s,className:u.cn("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",e),...t})]}));as.displayName=W.Content.displayName;const is=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});is.displayName="AlertDialogHeader";const ls=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ls.displayName="AlertDialogFooter";const cs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(W.Title,{ref:s,className:u.cn("text-lg font-semibold",e),...t}));cs.displayName=W.Title.displayName;const ds=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(W.Description,{ref:s,className:u.cn("text-sm text-muted-foreground",e),...t}));ds.displayName=W.Description.displayName;const us=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(W.Action,{ref:s,className:u.cn(Be(),e),...t}));us.displayName=W.Action.displayName;const ms=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(W.Cancel,{ref:s,className:u.cn(Be({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));ms.displayName=W.Cancel.displayName;const ot=P.Root,ps=P.Trigger,fs=({className:e,...t})=>r.jsxRuntimeExports.jsx(P.Portal,{className:u.cn(e),...t});fs.displayName=P.Portal.displayName;const xs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(P.Overlay,{ref:s,className:u.cn("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",e),...t}));xs.displayName=P.Overlay.displayName;const _e=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(fs,{children:[r.jsxRuntimeExports.jsx(xs,{}),r.jsxRuntimeExports.jsxs(P.Content,{ref:o,className:u.cn("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",e),...s,children:[t,r.jsxRuntimeExports.jsxs(P.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:[r.jsxRuntimeExports.jsx(G.Cross2Icon,{className:"h-4 w-4"}),r.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));_e.displayName=P.Content.displayName;const gs=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});gs.displayName="DialogHeader";const hs=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});hs.displayName="DialogFooter";const bs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(P.Title,{ref:s,className:u.cn("text-lg font-semibold leading-none tracking-tight",e),...t}));bs.displayName=P.Title.displayName;const vs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(P.Description,{ref:s,className:u.cn("text-sm text-muted-foreground",e),...t}));vs.displayName=P.Description.displayName;const ys=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,className:u.cn("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ys.displayName="Card";const js=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,className:u.cn("flex flex-col space-y-1.5 p-6",e),...t}));js.displayName="CardHeader";const ws=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("h3",{ref:s,className:u.cn("font-semibold leading-none tracking-tight",e),...t}));ws.displayName="CardTitle";const Rs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("p",{ref:s,className:u.cn("text-sm text-muted-foreground",e),...t}));Rs.displayName="CardDescription";const ks=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,className:u.cn("p-6 pt-0",e),...t}));ks.displayName="CardContent";const Ss=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,className:u.cn(" flex items-center p-6 pt-0",e),...t}));Ss.displayName="CardFooter";const Ns=f.forwardRef(({className:e,type:t,...s},o)=>r.jsxRuntimeExports.jsx("input",{type:t,className:u.cn("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",e),ref:o,...s}));Ns.displayName="Input";const Pr=ce.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Cs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(kt.Root,{ref:s,className:u.cn(Pr(),e),...t}));Cs.displayName=kt.Root.displayName;const Es=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("textarea",{className:u.cn("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",e),ref:s,...t}));Es.displayName="Textarea";const As=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(ae.Root,{ref:o,className:u.cn("relative overflow-hidden",e),...s,children:[r.jsxRuntimeExports.jsx(ae.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),r.jsxRuntimeExports.jsx(nt,{}),r.jsxRuntimeExports.jsx(ae.Corner,{})]}));As.displayName=ae.Root.displayName;const nt=f.forwardRef(({className:e,orientation:t="vertical",...s},o)=>r.jsxRuntimeExports.jsx(ae.ScrollAreaScrollbar,{ref:o,orientation:t,className:u.cn("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 border-t border-t-transparent p-[1px]",e),...s,children:r.jsxRuntimeExports.jsx(ae.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));nt.displayName=ae.ScrollAreaScrollbar.displayName;const Bs=de.Root,rt=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(de.List,{ref:s,className:u.cn("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));rt.displayName=de.List.displayName;const Se=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(de.Trigger,{ref:s,className:u.cn("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",e),...t}));Se.displayName=de.Trigger.displayName;const Ne=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(de.Content,{ref:s,className:u.cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ne.displayName=de.Content.displayName;const Ir=fe.Portal,Mr=fe.Provider,Dr=fe.Root,Or=fe.Trigger,_s=f.forwardRef(({className:e,sideOffset:t=4,...s},o)=>r.jsxRuntimeExports.jsx(fe.Content,{ref:o,sideOffset:t,className:u.cn("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",e),...s}));_s.displayName=fe.Content.displayName;const Lr=be.Root,zr=be.Trigger,Ts=f.forwardRef(({className:e,align:t="center",sideOffset:s=4,...o},n)=>r.jsxRuntimeExports.jsx(be.Portal,{children:r.jsxRuntimeExports.jsx(be.Content,{ref:n,align:t,sideOffset:s,className:u.cn("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",e),...o})}));Ts.displayName=be.Content.displayName;const Vr=_.Menu,Fr=_.Group,Ur=_.Portal,qr=_.Sub,$r=_.RadioGroup,Ps=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(_.Root,{ref:s,className:u.cn("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",e),...t}));Ps.displayName=_.Root.displayName;const Is=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(_.Trigger,{ref:s,className:u.cn("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",e),...t}));Is.displayName=_.Trigger.displayName;const Ms=f.forwardRef(({className:e,inset:t,children:s,...o},n)=>r.jsxRuntimeExports.jsxs(_.SubTrigger,{ref:n,className:u.cn("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",t&&"pl-8",e),...o,children:[s,r.jsxRuntimeExports.jsx(G.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Ms.displayName=_.SubTrigger.displayName;const Ds=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(_.SubContent,{ref:s,className:u.cn("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",e),...t}));Ds.displayName=_.SubContent.displayName;const Os=f.forwardRef(({className:e,align:t="start",alignOffset:s=-4,sideOffset:o=8,...n},l)=>r.jsxRuntimeExports.jsx(_.Portal,{children:r.jsxRuntimeExports.jsx(_.Content,{ref:l,align:t,alignOffset:s,sideOffset:o,className:u.cn("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",e),...n})}));Os.displayName=_.Content.displayName;const Ls=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(_.Item,{ref:o,className:u.cn("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",t&&"pl-8",e),...s}));Ls.displayName=_.Item.displayName;const zs=f.forwardRef(({className:e,children:t,checked:s,...o},n)=>r.jsxRuntimeExports.jsxs(_.CheckboxItem,{ref:n,className:u.cn("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",e),checked:s,...o,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(_.ItemIndicator,{children:r.jsxRuntimeExports.jsx(G.CheckIcon,{className:"h-4 w-4"})})}),t]}));zs.displayName=_.CheckboxItem.displayName;const Vs=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(_.RadioItem,{ref:o,className:u.cn("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",e),...s,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(_.ItemIndicator,{children:r.jsxRuntimeExports.jsx(G.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Vs.displayName=_.RadioItem.displayName;const Fs=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(_.Label,{ref:o,className:u.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...s}));Fs.displayName=_.Label.displayName;const Us=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(_.Separator,{ref:s,className:u.cn("-mx-1 my-1 h-px bg-muted",e),...t}));Us.displayName=_.Separator.displayName;const qs=({className:e,...t})=>r.jsxRuntimeExports.jsx("span",{className:u.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});qs.displayname="MenubarShortcut";const Gr=Ce.Root,Wr=Ce.Trigger,$s=f.forwardRef(({className:e,align:t="center",sideOffset:s=4,...o},n)=>r.jsxRuntimeExports.jsx(Ce.Content,{ref:n,align:t,sideOffset:s,className:u.cn("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",e),...o}));$s.displayName=Ce.Content.displayName;const Hr=F.Root,Yr=F.Group,Kr=F.Value,Gs=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(F.Trigger,{ref:o,className:u.cn("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",e),...s,children:[t,r.jsxRuntimeExports.jsx(F.Icon,{asChild:!0,children:r.jsxRuntimeExports.jsx(G.CaretSortIcon,{className:"h-4 w-4 opacity-50"})})]}));Gs.displayName=F.Trigger.displayName;const Ws=f.forwardRef(({className:e,children:t,position:s="popper",...o},n)=>r.jsxRuntimeExports.jsx(F.Portal,{children:r.jsxRuntimeExports.jsx(F.Content,{ref:n,className:u.cn("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",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",e),position:s,...o,children:r.jsxRuntimeExports.jsx(F.Viewport,{className:u.cn("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));Ws.displayName=F.Content.displayName;const Hs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(F.Label,{ref:s,className:u.cn("px-2 py-1.5 text-sm font-semibold",e),...t}));Hs.displayName=F.Label.displayName;const Ys=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(F.Item,{ref:o,className:u.cn("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",e),...s,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(F.ItemIndicator,{children:r.jsxRuntimeExports.jsx(G.CheckIcon,{className:"h-4 w-4"})})}),r.jsxRuntimeExports.jsx(F.ItemText,{children:t})]}));Ys.displayName=F.Item.displayName;const Ks=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(F.Separator,{ref:s,className:u.cn("-mx-1 my-1 h-px bg-muted",e),...t}));Ks.displayName=F.Separator.displayName;const Jr=P.Root,Qr=P.Trigger,Xr=P.Close,Js=({className:e,...t})=>r.jsxRuntimeExports.jsx(P.Portal,{className:u.cn(e),...t});Js.displayName=P.Portal.displayName;const Qs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(P.Overlay,{className:u.cn("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",e),...t,ref:s}));Qs.displayName=P.Overlay.displayName;const Zr=ce.cva("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",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",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",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"}},defaultVariants:{side:"right"}}),Xs=f.forwardRef(({side:e="right",className:t,children:s,...o},n)=>r.jsxRuntimeExports.jsxs(Js,{children:[r.jsxRuntimeExports.jsx(Qs,{}),r.jsxRuntimeExports.jsxs(P.Content,{ref:n,className:u.cn(Zr({side:e}),t),...o,children:[s,r.jsxRuntimeExports.jsxs(P.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:[r.jsxRuntimeExports.jsx(G.Cross2Icon,{className:"h-4 w-4"}),r.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Xs.displayName=P.Content.displayName;const Zs=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});Zs.displayName="SheetHeader";const eo=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});eo.displayName="SheetFooter";const to=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(P.Title,{ref:s,className:u.cn("text-lg font-semibold text-foreground",e),...t}));to.displayName=P.Title.displayName;const so=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(P.Description,{ref:s,className:u.cn("text-sm text-muted-foreground",e),...t}));so.displayName=P.Description.displayName;const ea=M.Root,ta=M.Trigger,sa=M.Group,oa=M.Portal,na=M.Sub,ra=M.RadioGroup,oo=f.forwardRef(({className:e,inset:t,children:s,...o},n)=>r.jsxRuntimeExports.jsxs(M.SubTrigger,{ref:n,className:u.cn("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",t&&"pl-8",e),...o,children:[s,r.jsxRuntimeExports.jsx(G.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));oo.displayName=M.SubTrigger.displayName;const no=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(M.SubContent,{ref:s,className:u.cn("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",e),...t}));no.displayName=M.SubContent.displayName;const ro=f.forwardRef(({className:e,sideOffset:t=4,...s},o)=>r.jsxRuntimeExports.jsx(M.Portal,{children:r.jsxRuntimeExports.jsx(M.Content,{ref:o,sideOffset:t,className:u.cn("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",e),...s})}));ro.displayName=M.Content.displayName;const ao=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(M.Item,{ref:o,className:u.cn("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",t&&"pl-8",e),...s}));ao.displayName=M.Item.displayName;const io=f.forwardRef(({className:e,children:t,checked:s,...o},n)=>r.jsxRuntimeExports.jsxs(M.CheckboxItem,{ref:n,className:u.cn("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",e),checked:s,...o,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(M.ItemIndicator,{children:r.jsxRuntimeExports.jsx(G.CheckIcon,{className:"h-4 w-4"})})}),t]}));io.displayName=M.CheckboxItem.displayName;const lo=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(M.RadioItem,{ref:o,className:u.cn("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",e),...s,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(M.ItemIndicator,{children:r.jsxRuntimeExports.jsx(G.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));lo.displayName=M.RadioItem.displayName;const co=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(M.Label,{ref:o,className:u.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...s}));co.displayName=M.Label.displayName;const uo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(M.Separator,{ref:s,className:u.cn("-mx-1 my-1 h-px bg-muted",e),...t}));uo.displayName=M.Separator.displayName;const mo=({className:e,...t})=>r.jsxRuntimeExports.jsx("span",{className:u.cn("ml-auto text-xs tracking-widest opacity-60",e),...t});mo.displayName="DropdownMenuShortcut";const po=f.forwardRef(({className:e,orientation:t="horizontal",decorative:s=!0,...o},n)=>r.jsxRuntimeExports.jsx(St.Root,{ref:n,decorative:s,orientation:t,className:u.cn("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));po.displayName=St.Root.displayName;const aa=1,ia=1e6;let Me=0;function la(){return Me=(Me+1)%Number.MAX_VALUE,Me.toString()}const De=new Map,gt=e=>{if(De.has(e))return;const t=setTimeout(()=>{De.delete(e),he({type:"REMOVE_TOAST",toastId:e})},ia);De.set(e,t)},fo=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,aa)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case"DISMISS_TOAST":{const{toastId:s}=t;return s?gt(s):e.toasts.forEach(o=>{gt(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===s||s===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)}}},we=[];let Re={toasts:[]};function he(e){Re=fo(Re,e),we.forEach(t=>{t(Re)})}function xo({...e}){const t=la(),s=n=>he({type:"UPDATE_TOAST",toast:{...n,id:t}}),o=()=>he({type:"DISMISS_TOAST",toastId:t});return he({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||o()}}}),{id:t,dismiss:o,update:s}}function at(){const[e,t]=f.useState(Re);return f.useEffect(()=>(we.push(t),()=>{const s=we.indexOf(t);s>-1&&we.splice(s,1)}),[e]),{...e,toast:xo,dismiss:s=>he({type:"DISMISS_TOAST",toastId:s})}}const ca=Q.Provider,go=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(Q.Viewport,{ref:s,className:u.cn("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]",e),...t}));go.displayName=Q.Viewport.displayName;const da=ce.cva("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",{variants:{variant:{default:"border bg-background",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),ho=f.forwardRef(({className:e,variant:t,...s},o)=>r.jsxRuntimeExports.jsx(Q.Root,{ref:o,className:u.cn(da({variant:t}),e),...s}));ho.displayName=Q.Root.displayName;const ua=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(Q.Action,{ref:s,className:u.cn("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",e),...t}));ua.displayName=Q.Action.displayName;const bo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(Q.Close,{ref:s,className:u.cn("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",e),"toast-close":"",...t,children:r.jsxRuntimeExports.jsx(G.Cross2Icon,{className:"h-4 w-4"})}));bo.displayName=Q.Close.displayName;const vo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(Q.Title,{ref:s,className:u.cn("text-sm font-semibold [&+div]:text-xs",e),...t}));vo.displayName=Q.Title.displayName;const yo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(Q.Description,{ref:s,className:u.cn("text-sm opacity-90",e),...t}));yo.displayName=Q.Description.displayName;function ma(){const{toasts:e}=at();return r.jsxRuntimeExports.jsxs(ca,{children:[e.map(({id:t,title:s,description:o,action:n,...l})=>r.jsxRuntimeExports.jsxs(ho,{...l,children:[r.jsxRuntimeExports.jsxs("div",{className:"grid gap-1",children:[s&&r.jsxRuntimeExports.jsx(vo,{children:s}),o&&r.jsxRuntimeExports.jsx(yo,{children:o})]}),n,r.jsxRuntimeExports.jsx(bo,{})]},t)),r.jsxRuntimeExports.jsx(go,{})]})}const pa=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("animate-pulse rounded-md bg-primary/10",e),...t}),it=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(K.Command,{ref:s,className:u.cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));it.displayName=K.Command.displayName;const fa=({children:e,...t})=>r.jsxRuntimeExports.jsx(ot,{...t,children:r.jsxRuntimeExports.jsx(_e,{className:"overflow-hidden p-0",children:r.jsxRuntimeExports.jsx(it,{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})})}),jo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[r.jsxRuntimeExports.jsx(G.MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),r.jsxRuntimeExports.jsx(K.Command.Input,{ref:s,className:u.cn("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",e),...t})]}));jo.displayName=K.Command.Input.displayName;const wo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(K.Command.List,{ref:s,className:u.cn("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));wo.displayName=K.Command.List.displayName;const Ro=f.forwardRef((e,t)=>r.jsxRuntimeExports.jsx(K.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ro.displayName=K.Command.Empty.displayName;const ko=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(K.Command.Group,{ref:s,className:u.cn("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",e),...t}));ko.displayName=K.Command.Group.displayName;const So=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(K.Command.Separator,{ref:s,className:u.cn("-mx-1 h-px bg-border",e),...t}));So.displayName=K.Command.Separator.displayName;const No=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(K.Command.Item,{ref:s,className:u.cn("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",e),...t}));No.displayName=K.Command.Item.displayName;const Co=({className:e,...t})=>r.jsxRuntimeExports.jsx("span",{className:u.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Co.displayName="CommandShortcut";const xa=D.Root,ga=D.Trigger,ha=D.Group,ba=D.Portal,va=D.Sub,ya=D.RadioGroup,Eo=f.forwardRef(({className:e,inset:t,children:s,...o},n)=>r.jsxRuntimeExports.jsxs(D.SubTrigger,{ref:n,className:u.cn("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",t&&"pl-8",e),...o,children:[s,r.jsxRuntimeExports.jsx(G.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Eo.displayName=D.SubTrigger.displayName;const Ao=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(D.SubContent,{ref:s,className:u.cn("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",e),...t}));Ao.displayName=D.SubContent.displayName;const Bo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(D.Portal,{children:r.jsxRuntimeExports.jsx(D.Content,{ref:s,className:u.cn("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",e),...t})}));Bo.displayName=D.Content.displayName;const _o=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(D.Item,{ref:o,className:u.cn("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",t&&"pl-8",e),...s}));_o.displayName=D.Item.displayName;const To=f.forwardRef(({className:e,children:t,checked:s,...o},n)=>r.jsxRuntimeExports.jsxs(D.CheckboxItem,{ref:n,className:u.cn("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",e),checked:s,...o,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(D.ItemIndicator,{children:r.jsxRuntimeExports.jsx(G.CheckIcon,{className:"h-4 w-4"})})}),t]}));To.displayName=D.CheckboxItem.displayName;const Po=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(D.RadioItem,{ref:o,className:u.cn("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",e),...s,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(D.ItemIndicator,{children:r.jsxRuntimeExports.jsx(G.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Po.displayName=D.RadioItem.displayName;const Io=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(D.Label,{ref:o,className:u.cn("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...s}));Io.displayName=D.Label.displayName;const Mo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(D.Separator,{ref:s,className:u.cn("-mx-1 my-1 h-px bg-border",e),...t}));Mo.displayName=D.Separator.displayName;const Do=({className:e,...t})=>r.jsxRuntimeExports.jsx("span",{className:u.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Do.displayName="ContextMenuShortcut";const ja=e=>{try{const t=document.getElementById("icon-picker-field"),s=document.createElement("div");An.render(r.jsxRuntimeExports.jsx(wt.IconPickerItem,{value:e}),s),t.appendChild(s),s.hidden=!0;let o=s.innerHTML;setTimeout(()=>t.removeChild(s),100);const l=new DOMParser().parseFromString(o,"image/svg+xml"),a=l.querySelector("svg");return a&&(a.removeAttribute("width"),a.removeAttribute("height")),new XMLSerializer().serializeToString(l)}catch(t){return console.error(t),""}},wa=({value:e,onChange:t})=>{const s=o=>{t("<svg />");const n=ja(o);t(n)};return r.jsxRuntimeExports.jsxs("div",{className:"mt-1 flex h-20 items-center gap-x-2",id:"icon-picker-field",children:[r.jsxRuntimeExports.jsxs("div",{className:"group relative h-12 w-12",children:[r.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:e?e.replace("<svg",'<svg class="h-5 w-5"'):"<svg class='h-5 w-5' />"},className:"absolute left-1/2 top-1/2 z-0 -translate-x-1/2 -translate-y-1/2 transform cursor-pointer bg-white"}),r.jsxRuntimeExports.jsx(wt,{value:e?"BiSolidGrid":null,onChange:s,pickButtonStyle:{position:"relative",height:"48px",width:"48px",border:"1px solid #BBBBBB",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",backgroundColor:"transparent",zIndex:1},searchInputStyle:{backgroundColor:"transparent",width:"100%",border:"1px solid #BBBBBB",margin:"0px 10px",padding:"10px"}})]}),r.jsxRuntimeExports.jsx("textarea",{value:e,onChange:o=>t(o.target.value),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",placeholder:"Choose icon or enter svg"})]})},Ra=k.lazy(()=>Promise.resolve().then(()=>require("./UnsplashImages-XwjKheek.cjs"))),ka=k.lazy(()=>Promise.resolve().then(()=>require("./UploadImages-y7LAQVrT.cjs"))),Oo=({isModalView:e=!1,onSelect:t=()=>{}})=>{const[s,o]=k.useState("upload");return r.jsxRuntimeExports.jsxs("div",{className:"flex h-full flex-col",children:[r.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:r.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:e?"Select or upload images":"Images"})}),r.jsxRuntimeExports.jsxs(Bs,{value:s,onValueChange:n=>o(n),className:"flex h-full w-full flex-col py-2",children:[r.jsxRuntimeExports.jsxs(rt,{className:"w-full",children:[r.jsxRuntimeExports.jsx(Se,{value:"upload",className:"w-1/2",children:"Upload"}),r.jsxRuntimeExports.jsx(Se,{value:"unsplash",className:"w-1/2",children:"Unsplash"})]}),s==="unsplash"?r.jsxRuntimeExports.jsx(Ne,{value:"unsplash",className:"flex h-full flex-col overflow-hidden",children:r.jsxRuntimeExports.jsx(k.Suspense,{fallback:r.jsxRuntimeExports.jsx("div",{className:"h-64 w-full animate-pulse bg-gray-100"}),children:r.jsxRuntimeExports.jsx(Ra,{isModalView:e,onSelect:t})})}):r.jsxRuntimeExports.jsx(Ne,{value:"upload",className:"flex h-full flex-col overflow-hidden",children:r.jsxRuntimeExports.jsx(k.Suspense,{fallback:r.jsxRuntimeExports.jsx("div",{className:"h-64 w-full animate-pulse bg-gray-100"}),children:r.jsxRuntimeExports.jsx(ka,{isModalView:e,onSelect:t})})})]})]})},Sa=Object.freeze(Object.defineProperty({__proto__:null,default:Oo},Symbol.toStringTag,{value:"Module"})),ht=({children:e,onSelect:t})=>{const[s,o]=k.useState(!1),n=(...l)=>{t.call(void 0,...l),o(!1)};return r.jsxRuntimeExports.jsxs(ot,{open:s,onOpenChange:l=>o(l),children:[r.jsxRuntimeExports.jsx(ps,{asChild:!0,children:e}),r.jsxRuntimeExports.jsx(_e,{className:"flex h-3/4 max-w-5xl",children:r.jsxRuntimeExports.jsx("div",{className:"h-full w-full",children:r.jsxRuntimeExports.jsx(Oo,{isModalView:!0,onSelect:n})})})]})},Na=({value:e,onChange:t,id:s,onBlur:o})=>r.jsxRuntimeExports.jsxs("div",{className:"mt-1.5 flex items-center gap-x-3",children:[e?r.jsxRuntimeExports.jsx("img",{src:e,className:"h-20 w-20 overflow-hidden rounded-md border object-cover",alt:""}):r.jsxRuntimeExports.jsx(ht,{onSelect:t,children:r.jsxRuntimeExports.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"})}),r.jsxRuntimeExports.jsxs("div",{className:"flex w-3/5 flex-col",children:[r.jsxRuntimeExports.jsx(ht,{onSelect:t,children:r.jsxRuntimeExports.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||!i.isEmpty(e)?"Replace Image":"Choose Image"})}),r.jsxRuntimeExports.jsx("small",{className:"-pl-4 pt-2 text-center text-xs text-gray-600",children:"OR"}),r.jsxRuntimeExports.jsx("input",{type:"url",className:"text-xs",placeholder:"Enter image URL",value:e,onBlur:({target:{value:n}})=>o(s,n),onChange:n=>t(n.target.value)})]})]}),Ca=({id:e,placeholder:t,value:s,onChange:o,onBlur:n})=>{const l={toolbar:[["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]},{align:[]}],["link","clean"]]},a=["header","font","list","bold","italic","underline","strike","blockquote","color","background","align","link","image"];return typeof window>"u"?null:r.jsxRuntimeExports.jsx(Bn,{id:e,value:s,onBlur:d=>n(e,d),onChange:d=>o(d),modules:l,formats:a,placeholder:t,className:"mt-1 rounded-md"})},Ea=({schema:e,formData:t,onChange:s})=>{const[o,n]=k.useState([]),l=ie("getPages",()=>[]),{type:a="page",href:d="",target:g="self"}=t;return k.useEffect(()=>{(async()=>{const c=await l();n(c||[])})()},[]),r.jsxRuntimeExports.jsxs("div",{children:[r.jsxRuntimeExports.jsx("span",{className:"text-xs font-medium",children:(e==null?void 0:e.title)??"Link"}),r.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-y-1.5",children:[r.jsxRuntimeExports.jsx("select",{name:"type",value:a,onChange:c=>s({...t,type:c.target.value}),children:[{const:"page",title:"Open Page"},{const:"url",title:"Open URL"},{const:"email",title:"Compose Email"},{const:"telephone",title:"Call Phone"},{const:"scroll",title:"Scroll to element"}].map(c=>r.jsxRuntimeExports.jsx("option",{value:c.const,children:c.title},c.const))}),a==="page"?r.jsxRuntimeExports.jsxs("select",{name:"href",placeholder:"Choose Page",value:d,onChange:c=>s({...t,href:c.target.value}),children:[r.jsxRuntimeExports.jsx("option",{value:"",children:"Choose page"}),i.map(o,c=>r.jsxRuntimeExports.jsx("option",{value:c.slug,children:c.name},c.uuid))]}):r.jsxRuntimeExports.jsx("input",{name:"href",type:"text",value:d,onChange:c=>s({...t,href:c.target.value}),placeholder:a==="page"||a==="url"?"Enter URL":a==="scroll"?"#ElementID":"Enter detail"}),(a==="page"||a==="url")&&r.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-2",children:[r.jsxRuntimeExports.jsx("input",{type:"checkbox",defaultChecked:g==="_blank",className:"cursor-pointer rounded-md border border-border",onChange:()=>s({...t,target:g==="_blank"?"_self":"_blank"})}),r.jsxRuntimeExports.jsx("span",{className:"pt-1 text-xs",children:"Open in new tab"})]})]})]})},Aa=()=>{const[e]=ue(),[,t]=ve(),{addBlocks:s}=re(),{toast:o}=at(),n=k.useCallback((a,d,g)=>{var j;for(let C=0;C<a.length;C++){const{_id:O}=a[C];a[C]._id=ne.generateUUID();const V=i.filter(a,{_parent:O});for(let B=0;B<V.length;B++)V[B]._parent=a[C]._id}const c=i.first(a);let x,R;return d&&(x=i.find(e,{_id:d}),a[0]._parent=d,R=d),!(x?ze(x._type,c._type):!0)&&x&&(a[0]._parent=x._parent,R=x._parent),s(a,R,g),t([(j=i.first(a))==null?void 0:j._id]),i.first(a)},[e,t]);return{addCoreBlock:k.useCallback((a,d,g)=>{if(i.has(a,"blocks")){const B=a.blocks;return n(B,d,g)}const c=ne.generateUUID(),x=Vt(a.props),R=[];i.forIn(x,(B,I)=>{if(i.startsWith(B,X.SLOT_KEY)){const $=B.replace(X.SLOT_KEY,"");R.push({_id:$,_type:"Slot",_parent:c,_name:a.props[I].name,_styles:a.props[I].styles,_emptyStyles:a.props[I].emptyStyles})}});const N={_type:a.type,_id:c,...x};let j,C;if(d&&(j=i.find(e,{_id:d}),N._parent=d,C=d),!Xn(j==null?void 0:j._type,a.type)){o({variant:"destructive",title:"Error",description:`"${a.type}" cannot be added under "${j?j==null?void 0:j._type:"root"}"`}),t([]);return}!(j?ze(j._type,a.type):!0)&&j&&(N._parent=j._parent,C=j._parent);const V=[N,...R];return s(V,C,g),t([N._id]),N},[n,e,t]),addPredefinedBlock:n}},bt={xs:420,sm:620,md:768,lg:1024,xl:1280,"2xl":1536},vt=["xs","sm","md","lg","xl","2xl"];function Ba(e,t){if(t===null)return"baseClasses";const s=t.mq;if(s==="xs"||t.dark||t.mod!=="")return"classes";let o="baseClasses",n=vt.indexOf(s);for(;n>0;){const l=vt[n-1];if(i.find(e,{mq:l,property:t.property})){o="classes";break}n--}return o}const yt=[];function _a(e="",t="",s=[]){e=e.trim().replace(/ +/g,"");let o=i.filter(i.map(e.split(" "),u.constructClassObject),c=>!i.isNull(c)),n=i.filter(i.map(t.split(" "),u.constructClassObject),c=>!i.isNull(c));n=i.filter(n,c=>!i.includes(yt,c.property));const l=[],a=[];i.each(s,c=>{const x=u.constructClassObject(c),R=i.find(o,i.pick(x,["dark","mq","mod","property"]));if(R&&(o=i.filter(o,N=>N.fullCls!==(R==null?void 0:R.fullCls))),l.push(x),x.mq==="xs"&&!x.dark&&x.mod===""&&(n=i.filter(n,N=>N.property!==x.property)),Ba(o,x)==="baseClasses"&&!i.includes(yt,x.property)){const N=i.find(n,i.pick(x,["property"]));R&&(n=i.filter(n,j=>j.fullCls!==(N==null?void 0:N.fullCls))),a.push({...x,fullCls:x.cls,mq:"xs"})}});const d=i.map(i.sortBy([...o,...l],c=>bt[c.mq]),"fullCls").join(" ");return`${i.map(i.sortBy([...n,...a],c=>bt[c.mq]),"fullCls").join(" ").trim()},${d.trim()}`.trim().replace(/ +/g,"")}const ye=p.atom([]);ye.debugLabel="selectedStylingBlocksAtom";const Lo=()=>p.useAtom(ye),Ta=e=>{const t=e.replace(X.STYLES_KEY,"").split(",");return{baseClasses:t[0],classes:t[1]}},Pa=p.atom(null,(e,t,{blockIds:s,newClasses:o})=>{const n=i.filter(e(We),a=>s.includes(e(a)._id)),l=i.first(e(ye));return i.map(n,a=>{const d=e(a),g=i.get(d,l.prop,`${X.STYLES_KEY},`),{baseClasses:c,classes:x}=Ta(g);return{ids:[d._id],props:{[l.prop]:`${X.STYLES_KEY}${_a(x,c,o)}`}}})}),Ia=()=>{const e=p.useSetAtom(Pa),{updateBlocks:t,updateBlocksRuntime:s}=re();return k.useCallback((o,n,l=!1)=>{const a=e({blockIds:o,newClasses:n});if(!l){s(o,a[0].props);return}t(o,a[0].props)},[e])},zo=()=>p.useAtom(Lt),Vo=xe("canvasWidth",800),Fo=p.atom(e=>{const t=e(Vo);return ne.getBreakpointValue(t).toLowerCase()}),Ma=()=>{const[e,t]=p.useAtom(Vo),s=p.useAtomValue(Fo),[o,n]=zo();return k.useEffect(()=>{o!=="xs"&&n(s)},[s,o,n]),[e,s,t]},Da=xe("canvasZoom",100),Oa=()=>p.useAtom(Da),Uo=p.atom([]),qo=()=>{const[e,t]=p.useAtom(Uo),s=p.useSetAtom(lt),o=k.useCallback(n=>{t(n),s([])},[t,s]);return[e,o]},lt=p.atom([]),La=()=>{const[e,t]=p.useAtom(lt),s=p.useSetAtom(Uo),o=k.useCallback(n=>{t(n),s([])},[t,s]);return[e,o]},$o=xe("darkMode",!1),za=()=>{const[e,t]=p.useAtom($o);return[e,t]},Go=()=>{const[e]=ue(),[,t]=ve(),{addBlocks:s}=re();return k.useCallback((o,n=null)=>{const l=[];i.each(o,a=>{const d=e.find(N=>N._id===a);n||(n=d._parent);const x=i.filter(e,N=>i.isString(n)?N._parent===n:!d._parent).indexOf(d)+1,R=tr(e,a,n);s(R,n,x),l.push(i.get(R,"0._id",""))}),t(l)},[e,t])},Va=p.atom([]),Fa=()=>{const[e,t]=p.useAtom(Va),s=k.useCallback(o=>{t(n=>i.includes(n,o)?i.without(n,o):[...n,o])},[t]);return[e,t,s]},Ua=p.atom(""),Wo=()=>p.useAtom(Ua),qa=()=>{const e=p.useAtomValue(Z);return k.useCallback((t,s)=>{const o=i.map(e,n=>(i.includes(t,i.get(n,"_id"))&&i.set(n,"_parent",s),n));console.log("newBlocks",o)},[e])},$a=()=>{console.warn("usePasteBlocks is not implemented");const e=p.useAtomValue(lt),[t,s]=qo(),o=Go(),n=qa();return{canPaste:k.useMemo(()=>t.length>0||e.length>0,[e,t]),pasteBlocks:k.useCallback(a=>{i.isEmpty(e)?n(t,a):o(e,a),s(()=>[])},[t,e,o,n,s])}},Ga=p.atom(!1),Wa=()=>{const[e,t]=p.useAtom(Ga);return[e,t]},Ha=p.atom(null,(e,t,{blockIds:s,fullClasses:o})=>{const n=i.first(e(ye)),l=i.filter(e(We),a=>s.includes(e(a)._id));return i.map(l,a=>{const d=e(a),g=o;let{classes:c,baseClasses:x}=Qn(i.get(d,n.prop,"styles:,"));return i.each(g,R=>{const N=new RegExp(`(^| )${R.replace("[","\\[").replace("]","\\]")}($| )`,"g");c=c.replace(N," ").replace(/ +/g," ").trim();const j=i.first(R.split(":"));i.includes(["2xl","xl","lg","md","sm"],j)&&g.push(R.split(":").pop().trim())}),i.each(g,R=>{const N=new RegExp(`(^| )${R.replace("[","\\[").replace("]","\\]")}($| )`,"g");x=x.replace(N," ").replace(/ +/g," ").trim()}),{ids:[d._id],props:{[n.prop]:`${X.STYLES_KEY}${x},${c}`}}})}),Ya=()=>{const{updateBlocks:e}=re(),t=p.useSetAtom(Ha);return k.useCallback((s,o)=>{const n=t({blockIds:s,fullClasses:o});e(s,n[0].props)},[t])},Ho=p.atom(e=>{const t=i.first(e(ye)),s=e(Ee);if(!t||t.blockId!==i.get(s,"_id",null))return[];const n=i.get(s,t.prop,`${X.STYLES_KEY},`).replace(X.STYLES_KEY,"").split(",").join(" ");return i.filter(i.map(n.trim().split(" "),u.constructClassObject),l=>!i.isNull(l))}),Ka=()=>p.useAtomValue(Ho),jt={xs:0,sm:1,md:2,lg:3,xl:4,"2xl":5},Ja=p.atom(e=>{const t=e(Fo),s=e(Ke),o=e($o),n=Qa(t);let l=i.filter(e(Ho),{mod:s});return i.startsWith(s,"_")||(l=i.filter(l,a=>n.includes(a.mq))),l=l.sort((a,d)=>jt[a.mq]-jt[d.mq]),o||(l=i.filter(l,{dark:!1})),l}),Qa=e=>{let t=[];switch(e){case"xs":t=["xs"];break;case"sm":t=["xs","sm"];break;case"md":t=["xs","sm","md"];break;case"lg":t=["xs","sm","md","lg"];break;case"xl":t=["xs","sm","md","lg","xl"];break;case"2xl":t=["xs","sm","md","lg","xl","2xl"];break;default:t=["xs"];break}return t},Xa=()=>p.useAtomValue(Ja),Za=()=>p.useAtom(Ke),ei=()=>{const{updateBlocks:e}=re();return k.useCallback((t,s,o)=>{e(t,s,o)},[e])},ti=()=>{const{updateBlocksRuntime:e}=re();return k.useCallback((t,s)=>{e(t,s)},[e])},Yo={name:"",props:{},modalProps:{},backdropClose:!0},si=p.atom(Yo),oi=()=>{const[e,t]=p.useAtom(si),s=k.useCallback((n,l={},a={})=>{t({name:n,props:l,modalProps:a})},[t]),o=k.useCallback((...n)=>{i.get(e,"props.onClose",()=>{})(...n),t(Yo)},[t,e]);return{activeModal:e,openModal:s,closeModal:o}},ni=()=>(console.warn("useAllBlocks is deprecated, use useBlocksStore() instead"),p.useAtomValue(Z)),Ko=p.atom(!1);Ko.debugLabel="readOnlyModeAtom";const Jo=p.atom("online");Jo.debugLabel="networkModeAtom";const ri=p.atom(!1);ri.debugLabel="codeEditorOpenAtom";const Qo=p.atom(!1);Qo.debugLabel="editLayerNameAtom";const ai=p.atom("");ai.debugLabel="activeLanguageAtom";const ii=p.atom("");ii.debugLabel="primaryLanguageAtom";const Xo=p.atom(null);Xo.debugLabel="canvasIframeAtom";const Zo=p.atom("outline");Zo.debugLabel="activePanelAtom";const en=p.atom("");en.debugLabel="showPredefinedBlockCategoryAtom";const tn=p.atom({undoCount:0,redoCount:0});tn.debugLabel="historyStatesAtom";const sn=p.atom("");sn.debugLabel="inlineEditingActiveAtom";const on=p.atom(!1);on.debugLabel="draggingFlagAtom";const nn=p.atom("");nn.debugLabel="draggedBlockIdAtom";const rn=p.atom(null);rn.debugLabel="treeRefAtom";const an=p.atom({});an.debugLabel="canvasSettingsAtom";const li=()=>p.useAtomValue(Ko),ci=p.atom(""),di=p.atom(null),ui=()=>p.useAtom(ci),mi=()=>p.useAtom(di),pi=xe("selectedBreakpoints",["XS","MD","XL"]),fi=()=>{const[e,t]=p.useAtom(pi);return[e,t]},xi=()=>{const e=p.useSetAtom(tn),{clear:t}=tt(),[,s]=ve(),[,o]=Wo(),[,n]=Lo();return()=>{s([]),n([]),o(""),t(),e({undoCount:0,redoCount:0})}},gi=p.atom([]),hi=()=>{const[e,t]=k.useState(!1),[s,o]=p.useAtom(gi),n=ie("getUILibraryBlocks",()=>[]);return k.useEffect(()=>{(async()=>s.length>0||(t(!0),o(await n()),t(!1)))()},[]),{data:s,isLoading:e}},bi=()=>{const[e,t]=k.useState(null),s=k.useCallback(async o=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(o),t(o),!0}catch(n){return console.warn("Copy failed",n),t(null),!1}},[]);return[e,s]};exports.Accordion=Er;exports.AccordionContent=Zt;exports.AccordionItem=Qt;exports.AccordionTrigger=Xt;exports.Alert=es;exports.AlertDescription=ss;exports.AlertDialog=_r;exports.AlertDialogAction=us;exports.AlertDialogCancel=ms;exports.AlertDialogContent=as;exports.AlertDialogDescription=ds;exports.AlertDialogFooter=ls;exports.AlertDialogHeader=is;exports.AlertDialogTitle=cs;exports.AlertDialogTrigger=Tr;exports.AlertTitle=ts;exports.Badge=Br;exports.Button=Jt;exports.Card=ys;exports.CardContent=ks;exports.CardDescription=Rs;exports.CardFooter=Ss;exports.CardHeader=js;exports.CardTitle=ws;exports.Command=it;exports.CommandDialog=fa;exports.CommandEmpty=Ro;exports.CommandGroup=ko;exports.CommandInput=jo;exports.CommandItem=No;exports.CommandList=wo;exports.CommandSeparator=So;exports.CommandShortcut=Co;exports.ContextMenu=xa;exports.ContextMenuCheckboxItem=To;exports.ContextMenuContent=Bo;exports.ContextMenuGroup=ha;exports.ContextMenuItem=_o;exports.ContextMenuLabel=Io;exports.ContextMenuPortal=ba;exports.ContextMenuRadioGroup=ya;exports.ContextMenuRadioItem=Po;exports.ContextMenuSeparator=Mo;exports.ContextMenuShortcut=Do;exports.ContextMenuSub=va;exports.ContextMenuSubContent=Ao;exports.ContextMenuSubTrigger=Eo;exports.ContextMenuTrigger=ga;exports.Dialog=ot;exports.DialogContent=_e;exports.DialogDescription=vs;exports.DialogFooter=hs;exports.DialogHeader=gs;exports.DialogTitle=bs;exports.DialogTrigger=ps;exports.DropdownMenu=ea;exports.DropdownMenuCheckboxItem=io;exports.DropdownMenuContent=ro;exports.DropdownMenuGroup=sa;exports.DropdownMenuItem=ao;exports.DropdownMenuLabel=co;exports.DropdownMenuPortal=oa;exports.DropdownMenuRadioGroup=ra;exports.DropdownMenuRadioItem=lo;exports.DropdownMenuSeparator=uo;exports.DropdownMenuShortcut=mo;exports.DropdownMenuSub=na;exports.DropdownMenuSubContent=no;exports.DropdownMenuSubTrigger=oo;exports.DropdownMenuTrigger=ta;exports.HoverCard=Gr;exports.HoverCardContent=$s;exports.HoverCardTrigger=Wr;exports.IconPickerField=wa;exports.ImagePickerField=Na;exports.ImagesPanel=Sa;exports.Input=Ns;exports.Label=Cs;exports.LinkField=Ea;exports.Menubar=Ps;exports.MenubarCheckboxItem=zs;exports.MenubarContent=Os;exports.MenubarGroup=Fr;exports.MenubarItem=Ls;exports.MenubarLabel=Fs;exports.MenubarMenu=Vr;exports.MenubarPortal=Ur;exports.MenubarRadioGroup=$r;exports.MenubarRadioItem=Vs;exports.MenubarSeparator=Us;exports.MenubarShortcut=qs;exports.MenubarSub=qr;exports.MenubarSubContent=Ds;exports.MenubarSubTrigger=Ms;exports.MenubarTrigger=Is;exports.Popover=Lr;exports.PopoverContent=Ts;exports.PopoverTrigger=zr;exports.RichTextEditorField=Ca;exports.ScrollArea=As;exports.ScrollBar=nt;exports.Select=Hr;exports.SelectContent=Ws;exports.SelectGroup=Yr;exports.SelectItem=Ys;exports.SelectLabel=Hs;exports.SelectSeparator=Ks;exports.SelectTrigger=Gs;exports.SelectValue=Kr;exports.Separator=po;exports.Sheet=Jr;exports.SheetClose=Xr;exports.SheetContent=Xs;exports.SheetDescription=so;exports.SheetFooter=eo;exports.SheetHeader=Zs;exports.SheetTitle=to;exports.SheetTrigger=Qr;exports.Skeleton=pa;exports.Switch=Kt;exports.Tabs=Bs;exports.TabsContent=Ne;exports.TabsList=rt;exports.TabsTrigger=Se;exports.Textarea=Es;exports.Toaster=ma;exports.Toggle=Yt;exports.Tooltip=Dr;exports.TooltipContent=_s;exports.TooltipPortal=Ir;exports.TooltipProvider=Mr;exports.TooltipTrigger=Or;exports.activePanelAtom=Zo;exports.atom=te;exports.atomWithDefault=Wn;exports.atomWithStorage=xe;exports.badgeVariants=os;exports.builderSaveStateAtom=Ae;exports.buttonVariants=Be;exports.canAcceptChildBlock=ze;exports.canDeleteBlock=er;exports.canDuplicateBlock=Zn;exports.canvasIframeAtom=Xo;exports.canvasSettingsAtom=an;exports.chaiBuilderPropsAtom=Ge;exports.chaiExternalDataAtom=Bt;exports.createStore=Nt;exports.dataProvidersAtom=et;exports.draggedBlockIdAtom=nn;exports.draggingFlagAtom=on;exports.editLayerNameAtom=Qo;exports.getBlockJSONFromSchemas=Fe;exports.getBlockJSONFromUISchemas=Ve;exports.inlineEditingActiveAtom=sn;exports.isDevelopment=Jn;exports.networkModeAtom=Jo;exports.presentBlocksAtom=Z;exports.reducer=fo;exports.showPredefinedBlockCategoryAtom=en;exports.toast=xo;exports.toggleVariants=Ht;exports.treeDSBlocks=It;exports.treeRefAtom=rn;exports.useActiveModal=oi;exports.useActivePanel=ui;exports.useAddBlock=Aa;exports.useAddBlockParent=mi;exports.useAddClassesToBlocks=Ia;exports.useAllBlocks=ni;exports.useAtom=Vn;exports.useAtomValue=Ct;exports.useBlocksContainer=br;exports.useBlocksStore=ue;exports.useBlocksStoreUndoableActions=re;exports.useBrandingOptions=Qe;exports.useBuilderProp=ie;exports.useBuilderReset=xi;exports.useCanvasWidth=Ma;exports.useCanvasZoom=Oa;exports.useCopyBlockIds=La;exports.useCopyToClipboard=bi;exports.useCurrentPage=Ft;exports.useCutBlockIds=qo;exports.useDarkMode=za;exports.useDuplicateBlocks=Go;exports.useGetPageData=Gt;exports.useHiddenBlockIds=Fa;exports.useHighlightBlockId=Wo;exports.usePageDataProviders=Wt;exports.usePasteBlocks=$a;exports.usePreviewMode=Wa;exports.useReadOnlyMode=li;exports.useRemoveBlocks=kr;exports.useRemoveClassesFromBlocks=Ya;exports.useSavePage=Rr;exports.useSelectedBlock=lr;exports.useSelectedBlockAllClasses=Ka;exports.useSelectedBlockCanvasSetting=dr;exports.useSelectedBlockCurrentClasses=Xa;exports.useSelectedBlockCustomStylingStates=ur;exports.useSelectedBlockIds=ve;exports.useSelectedBlocksDisplayChild=ir;exports.useSelectedBreakpoints=fi;exports.useSelectedStylingBlocks=Lo;exports.useSetAtom=Et;exports.useStore=qe;exports.useStylingBreakpoint=zo;exports.useStylingState=Za;exports.useToast=at;exports.useUILibraryBlocks=hi;exports.useUndoManager=tt;exports.useUpdateBlocksProps=ei;exports.useUpdateBlocksPropsRealtime=ti;
|
|
@@ -18,13 +18,13 @@ var v2 = (a, t, h, v) => ({
|
|
|
18
18
|
import { j as i } from "./jsx-runtime-WbnYoNE9.js";
|
|
19
19
|
import * as b from "react";
|
|
20
20
|
import H0, { lazy as A2, useCallback as g2, useState as M2, Suspense as u0, useEffect as s0 } from "react";
|
|
21
|
-
import { C as p0 } from "./index-
|
|
21
|
+
import { C as p0 } from "./index-0QJwevON.js";
|
|
22
22
|
import { FileTextIcon as V0, GearIcon as f0, EyeClosedIcon as m0, EyeOpenIcon as L0 } from "@radix-ui/react-icons";
|
|
23
|
-
import { u as x0, B as Y2, A as w0, a as B0, b as C0, c as O0, d as A0, e as S0, f as y0, g as b0, h as P0 } from "./index-
|
|
23
|
+
import { u as x0, B as Y2, A as w0, a as B0, b as C0, c as O0, d as A0, e as S0, f as y0, g as b0, h as P0 } from "./index-UHaqEdws.js";
|
|
24
24
|
import { toast as h1, Toaster as F0 } from "sonner";
|
|
25
25
|
import { useTranslation as D0 } from "react-i18next";
|
|
26
26
|
import { sortBy as R0, filter as k0, has as T0, set as E0, capitalize as N0, get as b2, omit as I0, size as P2 } from "lodash-es";
|
|
27
|
-
import { g as W0 } from "./html-to-json-
|
|
27
|
+
import { g as W0 } from "./html-to-json-LJyJsnmZ.js";
|
|
28
28
|
import { Loader as U0, Loader2 as j0, LogOutIcon as Q0 } from "lucide-react";
|
|
29
29
|
import { G as X2 } from "./index-YpnaudSM.js";
|
|
30
30
|
var N1 = class {
|
|
@@ -2044,7 +2044,7 @@ const k4 = () => {
|
|
|
2044
2044
|
] })
|
|
2045
2045
|
] })
|
|
2046
2046
|
] });
|
|
2047
|
-
}, W4 = () => /* @__PURE__ */ i.jsx(I4, { children: /* @__PURE__ */ i.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ i.jsx(Q0, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), U4 = A2(() => import("./PagesPanel-
|
|
2047
|
+
}, W4 = () => /* @__PURE__ */ i.jsx(I4, { children: /* @__PURE__ */ i.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ i.jsx(Q0, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), U4 = A2(() => import("./PagesPanel-_1CDTUdE.js")), j4 = A2(() => import("./ProjectPanel-pUMeIiUW.js")), Q4 = A2(() => import("./CurrentPage-06Iacwyp.js")), K4 = () => /* @__PURE__ */ i.jsx("h2", { children: "Your Logo" }), G4 = () => {
|
|
2048
2048
|
const { mutate: a } = y4();
|
|
2049
2049
|
return P0("editable", !0) ? /* @__PURE__ */ i.jsx(Y2, { onClick: a, className: "bg-blue-600 text-white", children: "Publish" }) : null;
|
|
2050
2050
|
}, q4 = (a) => {
|