@tech_carthagos/page-builder 1.0.11 → 1.0.13

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.
Files changed (39) hide show
  1. package/dist/CraftEditor-B8VkDZHb.js +2256 -0
  2. package/dist/CraftEditor-DHRDnczs.cjs +72 -0
  3. package/dist/{index-g1Iz35Bb.js → index-DWRynqVc.js} +3213 -2760
  4. package/dist/index-GH-PwMSN.cjs +189 -0
  5. package/dist/index.cjs.js +1 -1
  6. package/dist/index.es.js +5 -5
  7. package/dist/styles.css +3 -0
  8. package/dist-types/Builder.d.ts +3 -0
  9. package/dist-types/Builder.d.ts.map +1 -0
  10. package/dist-types/CraftEditor.d.ts.map +1 -1
  11. package/dist-types/Editor.d.ts.map +1 -1
  12. package/dist-types/editor/Toolbox.d.ts.map +1 -1
  13. package/dist-types/examples/App.d.ts +3 -0
  14. package/dist-types/examples/App.d.ts.map +1 -0
  15. package/dist-types/examples/main.d.ts +2 -0
  16. package/dist-types/examples/main.d.ts.map +1 -0
  17. package/dist-types/lib/api.d.ts.map +1 -1
  18. package/dist-types/user/Columns.d.ts.map +1 -1
  19. package/dist-types/user/Container.d.ts +47 -71
  20. package/dist-types/user/Container.d.ts.map +1 -1
  21. package/dist-types/user/ContainerOld.d.ts +77 -0
  22. package/dist-types/user/ContainerOld.d.ts.map +1 -0
  23. package/dist-types/user/Div.d.ts +66 -8
  24. package/dist-types/user/Div.d.ts.map +1 -1
  25. package/dist-types/user/Footer.d.ts +72 -0
  26. package/dist-types/user/Footer.d.ts.map +1 -0
  27. package/dist-types/user/Img.d.ts +43 -15
  28. package/dist-types/user/Img.d.ts.map +1 -1
  29. package/dist-types/user/Section.d.ts +2 -2
  30. package/dist-types/user/Section.d.ts.map +1 -1
  31. package/dist-types/user/Text.d.ts +2 -1
  32. package/dist-types/user/Text.d.ts.map +1 -1
  33. package/dist-types/user/Video.d.ts.map +1 -1
  34. package/dist-types/user/Wrapper.d.ts +36 -6
  35. package/dist-types/user/Wrapper.d.ts.map +1 -1
  36. package/package.json +11 -4
  37. package/dist/CraftEditor--t4EDwwC.cjs +0 -72
  38. package/dist/CraftEditor-swRFkvql.js +0 -1800
  39. package/dist/index-CsqvGzT3.cjs +0 -189
@@ -0,0 +1,2256 @@
1
+ import { jsxs as M, jsx as n, Fragment as ot } from "react/jsx-runtime";
2
+ import * as m from "react";
3
+ import p, { useState as Te, forwardRef as Yo, isValidElement as Xe, useEffect as Uo } from "react";
4
+ import { c as Y, P as we, B as Ae, L as kt, F as Zo, k as me, C as Ee, a as It, S as Mt, W as rt, H as Dt, T as At, b as Vt, d as Lt, I as Ht, V as _t, D as Bt, e as zt, u as re, f as _e, g as te, h as Be, i as W, j as ie, l as Xo, m as Re, n as Ko, o as qo, p as Qo, q as Jo, r as ze, s as er, t as tr, M as or, v as rr, w as ar, x as nr, y as sr, z as lr, A as ir, N as Oe, E as Ot, G as cr, J as dr, K as Me, O as xt, Q as ur, R as Ke, U as Ct, X as St, Y as fr, Z as pr, _ as mr, $ as hr, a0 as gr, a1 as qe, a2 as Qe } from "./index-DWRynqVc.js";
5
+ import vr from "react-dom";
6
+ /**
7
+ * @license lucide-react v0.462.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */
12
+ const $t = Y("Columns2", [
13
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
14
+ ["path", { d: "M12 3v18", key: "108xh3" }]
15
+ ]);
16
+ /**
17
+ * @license lucide-react v0.462.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */
22
+ const br = Y("GripVertical", [
23
+ ["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
24
+ ["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
25
+ ["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
26
+ ["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
27
+ ["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
28
+ ["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
29
+ ]);
30
+ /**
31
+ * @license lucide-react v0.462.0 - ISC
32
+ *
33
+ * This source code is licensed under the ISC license.
34
+ * See the LICENSE file in the root directory of this source tree.
35
+ */
36
+ const Ft = Y("Heading", [
37
+ ["path", { d: "M6 12h12", key: "8npq4p" }],
38
+ ["path", { d: "M6 20V4", key: "1w1bmo" }],
39
+ ["path", { d: "M18 20V4", key: "o2hl4u" }]
40
+ ]);
41
+ /**
42
+ * @license lucide-react v0.462.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */
47
+ const jt = Y("Image", [
48
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
49
+ ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
50
+ ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
51
+ ]);
52
+ /**
53
+ * @license lucide-react v0.462.0 - ISC
54
+ *
55
+ * This source code is licensed under the ISC license.
56
+ * See the LICENSE file in the root directory of this source tree.
57
+ */
58
+ const Gt = Y("Minus", [["path", { d: "M5 12h14", key: "1ays0h" }]]);
59
+ /**
60
+ * @license lucide-react v0.462.0 - ISC
61
+ *
62
+ * This source code is licensed under the ISC license.
63
+ * See the LICENSE file in the root directory of this source tree.
64
+ */
65
+ const Wt = Y("MousePointer", [
66
+ ["path", { d: "M12.586 12.586 19 19", key: "ea5xo7" }],
67
+ [
68
+ "path",
69
+ {
70
+ d: "M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z",
71
+ key: "277e5u"
72
+ }
73
+ ]
74
+ ]);
75
+ /**
76
+ * @license lucide-react v0.462.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */
81
+ const Yt = Y("MoveVertical", [
82
+ ["path", { d: "M12 2v20", key: "t6zp3m" }],
83
+ ["path", { d: "m8 18 4 4 4-4", key: "bh5tu3" }],
84
+ ["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }]
85
+ ]);
86
+ /**
87
+ * @license lucide-react v0.462.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */
92
+ const yr = Y("Redo2", [
93
+ ["path", { d: "m15 14 5-5-5-5", key: "12vg1m" }],
94
+ ["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13", key: "6uklza" }]
95
+ ]);
96
+ /**
97
+ * @license lucide-react v0.462.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */
102
+ const wr = Y("Save", [
103
+ [
104
+ "path",
105
+ {
106
+ d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
107
+ key: "1c8476"
108
+ }
109
+ ],
110
+ ["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
111
+ ["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
112
+ ]);
113
+ /**
114
+ * @license lucide-react v0.462.0 - ISC
115
+ *
116
+ * This source code is licensed under the ISC license.
117
+ * See the LICENSE file in the root directory of this source tree.
118
+ */
119
+ const Ne = Y("Square", [
120
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
121
+ ]);
122
+ /**
123
+ * @license lucide-react v0.462.0 - ISC
124
+ *
125
+ * This source code is licensed under the ISC license.
126
+ * See the LICENSE file in the root directory of this source tree.
127
+ */
128
+ const xr = Y("Trash2", [
129
+ ["path", { d: "M3 6h18", key: "d0wm0j" }],
130
+ ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
131
+ ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
132
+ ["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
133
+ ["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
134
+ ]);
135
+ /**
136
+ * @license lucide-react v0.462.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */
141
+ const Ut = Y("Type", [
142
+ ["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
143
+ ["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
144
+ ["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
145
+ ]);
146
+ /**
147
+ * @license lucide-react v0.462.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */
152
+ const Cr = Y("Undo2", [
153
+ ["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
154
+ ["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
155
+ ]);
156
+ /**
157
+ * @license lucide-react v0.462.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */
162
+ const Sr = Y("Video", [
163
+ [
164
+ "path",
165
+ {
166
+ d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
167
+ key: "ftymec"
168
+ }
169
+ ],
170
+ ["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2", key: "158x01" }]
171
+ ]), Er = () => {
172
+ const { connectors: e } = we(), t = [
173
+ {
174
+ name: "Container",
175
+ icon: Ne,
176
+ element: /* @__PURE__ */ n(me, { is: Ee, canvas: !0 })
177
+ },
178
+ {
179
+ name: "Columns",
180
+ icon: $t,
181
+ element: /* @__PURE__ */ M(me, { is: It, canvas: !0, children: [
182
+ /* @__PURE__ */ n(me, { is: Ee, canvas: !0 }),
183
+ /* @__PURE__ */ n(me, { is: Ee, canvas: !0 })
184
+ ] })
185
+ },
186
+ {
187
+ name: "Section",
188
+ icon: Ne,
189
+ element: /* @__PURE__ */ n(me, { is: Mt, canvas: !0 })
190
+ },
191
+ {
192
+ name: "Wrapper",
193
+ icon: Ne,
194
+ element: /* @__PURE__ */ n(me, { is: rt, canvas: !0 })
195
+ }
196
+ ], o = [
197
+ {
198
+ name: "Heading",
199
+ icon: Ft,
200
+ element: /* @__PURE__ */ n(Dt, {})
201
+ },
202
+ {
203
+ name: "Text",
204
+ icon: Ut,
205
+ element: /* @__PURE__ */ n(At, {})
206
+ },
207
+ {
208
+ name: "Button",
209
+ icon: Wt,
210
+ element: /* @__PURE__ */ n(Vt, {})
211
+ },
212
+ {
213
+ name: "Link",
214
+ icon: kt,
215
+ element: /* @__PURE__ */ n(Lt, {})
216
+ }
217
+ ], a = [
218
+ {
219
+ name: "Image",
220
+ icon: jt,
221
+ element: /* @__PURE__ */ n(Ht, {})
222
+ },
223
+ {
224
+ name: "Video",
225
+ icon: Zo,
226
+ element: /* @__PURE__ */ n(_t, {})
227
+ }
228
+ ], r = [
229
+ {
230
+ name: "Divider",
231
+ icon: Gt,
232
+ element: /* @__PURE__ */ n(Bt, {})
233
+ },
234
+ {
235
+ name: "Spacer",
236
+ icon: Yt,
237
+ element: /* @__PURE__ */ n(zt, {})
238
+ }
239
+ ], s = (i, c) => /* @__PURE__ */ M("div", { className: "space-y-2", children: [
240
+ /* @__PURE__ */ n("span", { className: "text-xs text-muted-foreground/70", children: i }),
241
+ /* @__PURE__ */ n("div", { className: "grid grid-cols-2 gap-1.5", children: c.map((d) => /* @__PURE__ */ M(
242
+ Ae,
243
+ {
244
+ variant: "outline",
245
+ size: "sm",
246
+ className: "flex flex-col items-center justify-center h-14 cursor-grab active:cursor-grabbing text-muted-foreground hover:text-foreground",
247
+ ref: (u) => u && e.create(u, d.element),
248
+ children: [
249
+ /* @__PURE__ */ n(d.icon, { className: "h-4 w-4 mb-1" }),
250
+ /* @__PURE__ */ n("span", { className: "text-[10px]", children: d.name })
251
+ ]
252
+ },
253
+ d.name
254
+ )) })
255
+ ] });
256
+ return /* @__PURE__ */ M("div", { className: "space-y-4", children: [
257
+ /* @__PURE__ */ n("h3", { className: "text-sm font-medium text-muted-foreground", children: "Components" }),
258
+ s("Layout", t),
259
+ s("Basic", o),
260
+ s("Media", a),
261
+ s("Utility", r)
262
+ ] });
263
+ };
264
+ var Nr = m.createContext(void 0);
265
+ function at(e) {
266
+ const t = m.useContext(Nr);
267
+ return e || t || "ltr";
268
+ }
269
+ function Tr(e, [t, o]) {
270
+ return Math.min(o, Math.max(t, e));
271
+ }
272
+ function Rr(e, t) {
273
+ return m.useReducer((o, a) => t[o][a] ?? o, e);
274
+ }
275
+ var nt = "ScrollArea", [Zt] = _e(nt), [Pr, X] = Zt(nt), Xt = m.forwardRef(
276
+ (e, t) => {
277
+ const {
278
+ __scopeScrollArea: o,
279
+ type: a = "hover",
280
+ dir: r,
281
+ scrollHideDelay: s = 600,
282
+ ...i
283
+ } = e, [c, d] = m.useState(null), [u, f] = m.useState(null), [h, g] = m.useState(null), [l, N] = m.useState(null), [v, b] = m.useState(null), [S, C] = m.useState(0), [w, T] = m.useState(0), [_, R] = m.useState(!1), [k, D] = m.useState(!1), P = re(t, (O) => d(O)), V = at(r);
284
+ return /* @__PURE__ */ n(
285
+ Pr,
286
+ {
287
+ scope: o,
288
+ type: a,
289
+ dir: V,
290
+ scrollHideDelay: s,
291
+ scrollArea: c,
292
+ viewport: u,
293
+ onViewportChange: f,
294
+ content: h,
295
+ onContentChange: g,
296
+ scrollbarX: l,
297
+ onScrollbarXChange: N,
298
+ scrollbarXEnabled: _,
299
+ onScrollbarXEnabledChange: R,
300
+ scrollbarY: v,
301
+ onScrollbarYChange: b,
302
+ scrollbarYEnabled: k,
303
+ onScrollbarYEnabledChange: D,
304
+ onCornerWidthChange: C,
305
+ onCornerHeightChange: T,
306
+ children: /* @__PURE__ */ n(
307
+ te.div,
308
+ {
309
+ dir: V,
310
+ ...i,
311
+ ref: P,
312
+ style: {
313
+ position: "relative",
314
+ // Pass corner sizes as CSS vars to reduce re-renders of context consumers
315
+ "--radix-scroll-area-corner-width": S + "px",
316
+ "--radix-scroll-area-corner-height": w + "px",
317
+ ...e.style
318
+ }
319
+ }
320
+ )
321
+ }
322
+ );
323
+ }
324
+ );
325
+ Xt.displayName = nt;
326
+ var Kt = "ScrollAreaViewport", qt = m.forwardRef(
327
+ (e, t) => {
328
+ const { __scopeScrollArea: o, children: a, nonce: r, ...s } = e, i = X(Kt, o), c = m.useRef(null), d = re(t, c, i.onViewportChange);
329
+ return /* @__PURE__ */ M(ot, { children: [
330
+ /* @__PURE__ */ n(
331
+ "style",
332
+ {
333
+ dangerouslySetInnerHTML: {
334
+ __html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"
335
+ },
336
+ nonce: r
337
+ }
338
+ ),
339
+ /* @__PURE__ */ n(
340
+ te.div,
341
+ {
342
+ "data-radix-scroll-area-viewport": "",
343
+ ...s,
344
+ ref: d,
345
+ style: {
346
+ /**
347
+ * We don't support `visible` because the intention is to have at least one scrollbar
348
+ * if this component is used and `visible` will behave like `auto` in that case
349
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description
350
+ *
351
+ * We don't handle `auto` because the intention is for the native implementation
352
+ * to be hidden if using this component. We just want to ensure the node is scrollable
353
+ * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent
354
+ * the browser from having to work out whether to render native scrollbars or not,
355
+ * we tell it to with the intention of hiding them in CSS.
356
+ */
357
+ overflowX: i.scrollbarXEnabled ? "scroll" : "hidden",
358
+ overflowY: i.scrollbarYEnabled ? "scroll" : "hidden",
359
+ ...e.style
360
+ },
361
+ children: /* @__PURE__ */ n("div", { ref: i.onContentChange, style: { minWidth: "100%", display: "table" }, children: a })
362
+ }
363
+ )
364
+ ] });
365
+ }
366
+ );
367
+ qt.displayName = Kt;
368
+ var oe = "ScrollAreaScrollbar", st = m.forwardRef(
369
+ (e, t) => {
370
+ const { forceMount: o, ...a } = e, r = X(oe, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = r, c = e.orientation === "horizontal";
371
+ return m.useEffect(() => (c ? s(!0) : i(!0), () => {
372
+ c ? s(!1) : i(!1);
373
+ }), [c, s, i]), r.type === "hover" ? /* @__PURE__ */ n(kr, { ...a, ref: t, forceMount: o }) : r.type === "scroll" ? /* @__PURE__ */ n(Ir, { ...a, ref: t, forceMount: o }) : r.type === "auto" ? /* @__PURE__ */ n(Qt, { ...a, ref: t, forceMount: o }) : r.type === "always" ? /* @__PURE__ */ n(lt, { ...a, ref: t }) : null;
374
+ }
375
+ );
376
+ st.displayName = oe;
377
+ var kr = m.forwardRef((e, t) => {
378
+ const { forceMount: o, ...a } = e, r = X(oe, e.__scopeScrollArea), [s, i] = m.useState(!1);
379
+ return m.useEffect(() => {
380
+ const c = r.scrollArea;
381
+ let d = 0;
382
+ if (c) {
383
+ const u = () => {
384
+ window.clearTimeout(d), i(!0);
385
+ }, f = () => {
386
+ d = window.setTimeout(() => i(!1), r.scrollHideDelay);
387
+ };
388
+ return c.addEventListener("pointerenter", u), c.addEventListener("pointerleave", f), () => {
389
+ window.clearTimeout(d), c.removeEventListener("pointerenter", u), c.removeEventListener("pointerleave", f);
390
+ };
391
+ }
392
+ }, [r.scrollArea, r.scrollHideDelay]), /* @__PURE__ */ n(Be, { present: o || s, children: /* @__PURE__ */ n(
393
+ Qt,
394
+ {
395
+ "data-state": s ? "visible" : "hidden",
396
+ ...a,
397
+ ref: t
398
+ }
399
+ ) });
400
+ }), Ir = m.forwardRef((e, t) => {
401
+ const { forceMount: o, ...a } = e, r = X(oe, e.__scopeScrollArea), s = e.orientation === "horizontal", i = Fe(() => d("SCROLL_END"), 100), [c, d] = Rr("hidden", {
402
+ hidden: {
403
+ SCROLL: "scrolling"
404
+ },
405
+ scrolling: {
406
+ SCROLL_END: "idle",
407
+ POINTER_ENTER: "interacting"
408
+ },
409
+ interacting: {
410
+ SCROLL: "interacting",
411
+ POINTER_LEAVE: "idle"
412
+ },
413
+ idle: {
414
+ HIDE: "hidden",
415
+ SCROLL: "scrolling",
416
+ POINTER_ENTER: "interacting"
417
+ }
418
+ });
419
+ return m.useEffect(() => {
420
+ if (c === "idle") {
421
+ const u = window.setTimeout(() => d("HIDE"), r.scrollHideDelay);
422
+ return () => window.clearTimeout(u);
423
+ }
424
+ }, [c, r.scrollHideDelay, d]), m.useEffect(() => {
425
+ const u = r.viewport, f = s ? "scrollLeft" : "scrollTop";
426
+ if (u) {
427
+ let h = u[f];
428
+ const g = () => {
429
+ const l = u[f];
430
+ h !== l && (d("SCROLL"), i()), h = l;
431
+ };
432
+ return u.addEventListener("scroll", g), () => u.removeEventListener("scroll", g);
433
+ }
434
+ }, [r.viewport, s, d, i]), /* @__PURE__ */ n(Be, { present: o || c !== "hidden", children: /* @__PURE__ */ n(
435
+ lt,
436
+ {
437
+ "data-state": c === "hidden" ? "hidden" : "visible",
438
+ ...a,
439
+ ref: t,
440
+ onPointerEnter: W(e.onPointerEnter, () => d("POINTER_ENTER")),
441
+ onPointerLeave: W(e.onPointerLeave, () => d("POINTER_LEAVE"))
442
+ }
443
+ ) });
444
+ }), Qt = m.forwardRef((e, t) => {
445
+ const o = X(oe, e.__scopeScrollArea), { forceMount: a, ...r } = e, [s, i] = m.useState(!1), c = e.orientation === "horizontal", d = Fe(() => {
446
+ if (o.viewport) {
447
+ const u = o.viewport.offsetWidth < o.viewport.scrollWidth, f = o.viewport.offsetHeight < o.viewport.scrollHeight;
448
+ i(c ? u : f);
449
+ }
450
+ }, 10);
451
+ return ye(o.viewport, d), ye(o.content, d), /* @__PURE__ */ n(Be, { present: a || s, children: /* @__PURE__ */ n(
452
+ lt,
453
+ {
454
+ "data-state": s ? "visible" : "hidden",
455
+ ...r,
456
+ ref: t
457
+ }
458
+ ) });
459
+ }), lt = m.forwardRef((e, t) => {
460
+ const { orientation: o = "vertical", ...a } = e, r = X(oe, e.__scopeScrollArea), s = m.useRef(null), i = m.useRef(0), [c, d] = m.useState({
461
+ content: 0,
462
+ viewport: 0,
463
+ scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
464
+ }), u = ro(c.viewport, c.content), f = {
465
+ ...a,
466
+ sizes: c,
467
+ onSizesChange: d,
468
+ hasThumb: u > 0 && u < 1,
469
+ onThumbChange: (g) => s.current = g,
470
+ onThumbPointerUp: () => i.current = 0,
471
+ onThumbPointerDown: (g) => i.current = g
472
+ };
473
+ function h(g, l) {
474
+ return Hr(g, i.current, c, l);
475
+ }
476
+ return o === "horizontal" ? /* @__PURE__ */ n(
477
+ Mr,
478
+ {
479
+ ...f,
480
+ ref: t,
481
+ onThumbPositionChange: () => {
482
+ if (r.viewport && s.current) {
483
+ const g = r.viewport.scrollLeft, l = Et(g, c, r.dir);
484
+ s.current.style.transform = `translate3d(${l}px, 0, 0)`;
485
+ }
486
+ },
487
+ onWheelScroll: (g) => {
488
+ r.viewport && (r.viewport.scrollLeft = g);
489
+ },
490
+ onDragScroll: (g) => {
491
+ r.viewport && (r.viewport.scrollLeft = h(g, r.dir));
492
+ }
493
+ }
494
+ ) : o === "vertical" ? /* @__PURE__ */ n(
495
+ Dr,
496
+ {
497
+ ...f,
498
+ ref: t,
499
+ onThumbPositionChange: () => {
500
+ if (r.viewport && s.current) {
501
+ const g = r.viewport.scrollTop, l = Et(g, c);
502
+ s.current.style.transform = `translate3d(0, ${l}px, 0)`;
503
+ }
504
+ },
505
+ onWheelScroll: (g) => {
506
+ r.viewport && (r.viewport.scrollTop = g);
507
+ },
508
+ onDragScroll: (g) => {
509
+ r.viewport && (r.viewport.scrollTop = h(g));
510
+ }
511
+ }
512
+ ) : null;
513
+ }), Mr = m.forwardRef((e, t) => {
514
+ const { sizes: o, onSizesChange: a, ...r } = e, s = X(oe, e.__scopeScrollArea), [i, c] = m.useState(), d = m.useRef(null), u = re(t, d, s.onScrollbarXChange);
515
+ return m.useEffect(() => {
516
+ d.current && c(getComputedStyle(d.current));
517
+ }, [d]), /* @__PURE__ */ n(
518
+ eo,
519
+ {
520
+ "data-orientation": "horizontal",
521
+ ...r,
522
+ ref: u,
523
+ sizes: o,
524
+ style: {
525
+ bottom: 0,
526
+ left: s.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
527
+ right: s.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
528
+ "--radix-scroll-area-thumb-width": $e(o) + "px",
529
+ ...e.style
530
+ },
531
+ onThumbPointerDown: (f) => e.onThumbPointerDown(f.x),
532
+ onDragScroll: (f) => e.onDragScroll(f.x),
533
+ onWheelScroll: (f, h) => {
534
+ if (s.viewport) {
535
+ const g = s.viewport.scrollLeft + f.deltaX;
536
+ e.onWheelScroll(g), no(g, h) && f.preventDefault();
537
+ }
538
+ },
539
+ onResize: () => {
540
+ d.current && s.viewport && i && a({
541
+ content: s.viewport.scrollWidth,
542
+ viewport: s.viewport.offsetWidth,
543
+ scrollbar: {
544
+ size: d.current.clientWidth,
545
+ paddingStart: Le(i.paddingLeft),
546
+ paddingEnd: Le(i.paddingRight)
547
+ }
548
+ });
549
+ }
550
+ }
551
+ );
552
+ }), Dr = m.forwardRef((e, t) => {
553
+ const { sizes: o, onSizesChange: a, ...r } = e, s = X(oe, e.__scopeScrollArea), [i, c] = m.useState(), d = m.useRef(null), u = re(t, d, s.onScrollbarYChange);
554
+ return m.useEffect(() => {
555
+ d.current && c(getComputedStyle(d.current));
556
+ }, [d]), /* @__PURE__ */ n(
557
+ eo,
558
+ {
559
+ "data-orientation": "vertical",
560
+ ...r,
561
+ ref: u,
562
+ sizes: o,
563
+ style: {
564
+ top: 0,
565
+ right: s.dir === "ltr" ? 0 : void 0,
566
+ left: s.dir === "rtl" ? 0 : void 0,
567
+ bottom: "var(--radix-scroll-area-corner-height)",
568
+ "--radix-scroll-area-thumb-height": $e(o) + "px",
569
+ ...e.style
570
+ },
571
+ onThumbPointerDown: (f) => e.onThumbPointerDown(f.y),
572
+ onDragScroll: (f) => e.onDragScroll(f.y),
573
+ onWheelScroll: (f, h) => {
574
+ if (s.viewport) {
575
+ const g = s.viewport.scrollTop + f.deltaY;
576
+ e.onWheelScroll(g), no(g, h) && f.preventDefault();
577
+ }
578
+ },
579
+ onResize: () => {
580
+ d.current && s.viewport && i && a({
581
+ content: s.viewport.scrollHeight,
582
+ viewport: s.viewport.offsetHeight,
583
+ scrollbar: {
584
+ size: d.current.clientHeight,
585
+ paddingStart: Le(i.paddingTop),
586
+ paddingEnd: Le(i.paddingBottom)
587
+ }
588
+ });
589
+ }
590
+ }
591
+ );
592
+ }), [Ar, Jt] = Zt(oe), eo = m.forwardRef((e, t) => {
593
+ const {
594
+ __scopeScrollArea: o,
595
+ sizes: a,
596
+ hasThumb: r,
597
+ onThumbChange: s,
598
+ onThumbPointerUp: i,
599
+ onThumbPointerDown: c,
600
+ onThumbPositionChange: d,
601
+ onDragScroll: u,
602
+ onWheelScroll: f,
603
+ onResize: h,
604
+ ...g
605
+ } = e, l = X(oe, o), [N, v] = m.useState(null), b = re(t, (P) => v(P)), S = m.useRef(null), C = m.useRef(""), w = l.viewport, T = a.content - a.viewport, _ = ie(f), R = ie(d), k = Fe(h, 10);
606
+ function D(P) {
607
+ if (S.current) {
608
+ const V = P.clientX - S.current.left, O = P.clientY - S.current.top;
609
+ u({ x: V, y: O });
610
+ }
611
+ }
612
+ return m.useEffect(() => {
613
+ const P = (V) => {
614
+ const O = V.target;
615
+ (N == null ? void 0 : N.contains(O)) && _(V, T);
616
+ };
617
+ return document.addEventListener("wheel", P, { passive: !1 }), () => document.removeEventListener("wheel", P, { passive: !1 });
618
+ }, [w, N, T, _]), m.useEffect(R, [a, R]), ye(N, k), ye(l.content, k), /* @__PURE__ */ n(
619
+ Ar,
620
+ {
621
+ scope: o,
622
+ scrollbar: N,
623
+ hasThumb: r,
624
+ onThumbChange: ie(s),
625
+ onThumbPointerUp: ie(i),
626
+ onThumbPositionChange: R,
627
+ onThumbPointerDown: ie(c),
628
+ children: /* @__PURE__ */ n(
629
+ te.div,
630
+ {
631
+ ...g,
632
+ ref: b,
633
+ style: { position: "absolute", ...g.style },
634
+ onPointerDown: W(e.onPointerDown, (P) => {
635
+ P.button === 0 && (P.target.setPointerCapture(P.pointerId), S.current = N.getBoundingClientRect(), C.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", l.viewport && (l.viewport.style.scrollBehavior = "auto"), D(P));
636
+ }),
637
+ onPointerMove: W(e.onPointerMove, D),
638
+ onPointerUp: W(e.onPointerUp, (P) => {
639
+ const V = P.target;
640
+ V.hasPointerCapture(P.pointerId) && V.releasePointerCapture(P.pointerId), document.body.style.webkitUserSelect = C.current, l.viewport && (l.viewport.style.scrollBehavior = ""), S.current = null;
641
+ })
642
+ }
643
+ )
644
+ }
645
+ );
646
+ }), Ve = "ScrollAreaThumb", to = m.forwardRef(
647
+ (e, t) => {
648
+ const { forceMount: o, ...a } = e, r = Jt(Ve, e.__scopeScrollArea);
649
+ return /* @__PURE__ */ n(Be, { present: o || r.hasThumb, children: /* @__PURE__ */ n(Vr, { ref: t, ...a }) });
650
+ }
651
+ ), Vr = m.forwardRef(
652
+ (e, t) => {
653
+ const { __scopeScrollArea: o, style: a, ...r } = e, s = X(Ve, o), i = Jt(Ve, o), { onThumbPositionChange: c } = i, d = re(
654
+ t,
655
+ (h) => i.onThumbChange(h)
656
+ ), u = m.useRef(void 0), f = Fe(() => {
657
+ u.current && (u.current(), u.current = void 0);
658
+ }, 100);
659
+ return m.useEffect(() => {
660
+ const h = s.viewport;
661
+ if (h) {
662
+ const g = () => {
663
+ if (f(), !u.current) {
664
+ const l = _r(h, c);
665
+ u.current = l, c();
666
+ }
667
+ };
668
+ return c(), h.addEventListener("scroll", g), () => h.removeEventListener("scroll", g);
669
+ }
670
+ }, [s.viewport, f, c]), /* @__PURE__ */ n(
671
+ te.div,
672
+ {
673
+ "data-state": i.hasThumb ? "visible" : "hidden",
674
+ ...r,
675
+ ref: d,
676
+ style: {
677
+ width: "var(--radix-scroll-area-thumb-width)",
678
+ height: "var(--radix-scroll-area-thumb-height)",
679
+ ...a
680
+ },
681
+ onPointerDownCapture: W(e.onPointerDownCapture, (h) => {
682
+ const l = h.target.getBoundingClientRect(), N = h.clientX - l.left, v = h.clientY - l.top;
683
+ i.onThumbPointerDown({ x: N, y: v });
684
+ }),
685
+ onPointerUp: W(e.onPointerUp, i.onThumbPointerUp)
686
+ }
687
+ );
688
+ }
689
+ );
690
+ to.displayName = Ve;
691
+ var it = "ScrollAreaCorner", oo = m.forwardRef(
692
+ (e, t) => {
693
+ const o = X(it, e.__scopeScrollArea), a = !!(o.scrollbarX && o.scrollbarY);
694
+ return o.type !== "scroll" && a ? /* @__PURE__ */ n(Lr, { ...e, ref: t }) : null;
695
+ }
696
+ );
697
+ oo.displayName = it;
698
+ var Lr = m.forwardRef((e, t) => {
699
+ const { __scopeScrollArea: o, ...a } = e, r = X(it, o), [s, i] = m.useState(0), [c, d] = m.useState(0), u = !!(s && c);
700
+ return ye(r.scrollbarX, () => {
701
+ var h;
702
+ const f = ((h = r.scrollbarX) == null ? void 0 : h.offsetHeight) || 0;
703
+ r.onCornerHeightChange(f), d(f);
704
+ }), ye(r.scrollbarY, () => {
705
+ var h;
706
+ const f = ((h = r.scrollbarY) == null ? void 0 : h.offsetWidth) || 0;
707
+ r.onCornerWidthChange(f), i(f);
708
+ }), u ? /* @__PURE__ */ n(
709
+ te.div,
710
+ {
711
+ ...a,
712
+ ref: t,
713
+ style: {
714
+ width: s,
715
+ height: c,
716
+ position: "absolute",
717
+ right: r.dir === "ltr" ? 0 : void 0,
718
+ left: r.dir === "rtl" ? 0 : void 0,
719
+ bottom: 0,
720
+ ...e.style
721
+ }
722
+ }
723
+ ) : null;
724
+ });
725
+ function Le(e) {
726
+ return e ? parseInt(e, 10) : 0;
727
+ }
728
+ function ro(e, t) {
729
+ const o = e / t;
730
+ return isNaN(o) ? 0 : o;
731
+ }
732
+ function $e(e) {
733
+ const t = ro(e.viewport, e.content), o = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, a = (e.scrollbar.size - o) * t;
734
+ return Math.max(a, 18);
735
+ }
736
+ function Hr(e, t, o, a = "ltr") {
737
+ const r = $e(o), s = r / 2, i = t || s, c = r - i, d = o.scrollbar.paddingStart + i, u = o.scrollbar.size - o.scrollbar.paddingEnd - c, f = o.content - o.viewport, h = a === "ltr" ? [0, f] : [f * -1, 0];
738
+ return ao([d, u], h)(e);
739
+ }
740
+ function Et(e, t, o = "ltr") {
741
+ const a = $e(t), r = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, s = t.scrollbar.size - r, i = t.content - t.viewport, c = s - a, d = o === "ltr" ? [0, i] : [i * -1, 0], u = Tr(e, d);
742
+ return ao([0, i], [0, c])(u);
743
+ }
744
+ function ao(e, t) {
745
+ return (o) => {
746
+ if (e[0] === e[1] || t[0] === t[1]) return t[0];
747
+ const a = (t[1] - t[0]) / (e[1] - e[0]);
748
+ return t[0] + a * (o - e[0]);
749
+ };
750
+ }
751
+ function no(e, t) {
752
+ return e > 0 && e < t;
753
+ }
754
+ var _r = (e, t = () => {
755
+ }) => {
756
+ let o = { left: e.scrollLeft, top: e.scrollTop }, a = 0;
757
+ return function r() {
758
+ const s = { left: e.scrollLeft, top: e.scrollTop }, i = o.left !== s.left, c = o.top !== s.top;
759
+ (i || c) && t(), o = s, a = window.requestAnimationFrame(r);
760
+ }(), () => window.cancelAnimationFrame(a);
761
+ };
762
+ function Fe(e, t) {
763
+ const o = ie(e), a = m.useRef(0);
764
+ return m.useEffect(() => () => window.clearTimeout(a.current), []), m.useCallback(() => {
765
+ window.clearTimeout(a.current), a.current = window.setTimeout(o, t);
766
+ }, [o, t]);
767
+ }
768
+ function ye(e, t) {
769
+ const o = ie(t);
770
+ Xo(() => {
771
+ let a = 0;
772
+ if (e) {
773
+ const r = new ResizeObserver(() => {
774
+ cancelAnimationFrame(a), a = window.requestAnimationFrame(o);
775
+ });
776
+ return r.observe(e), () => {
777
+ window.cancelAnimationFrame(a), r.unobserve(e);
778
+ };
779
+ }
780
+ }, [e, o]);
781
+ }
782
+ var so = Xt, Br = qt, zr = oo;
783
+ const ct = m.forwardRef(({ className: e, children: t, ...o }, a) => /* @__PURE__ */ M(so, { ref: a, className: Re("relative overflow-hidden", e), ...o, children: [
784
+ /* @__PURE__ */ n(Br, { className: "h-full w-full rounded-[inherit]", children: t }),
785
+ /* @__PURE__ */ n(lo, {}),
786
+ /* @__PURE__ */ n(zr, {})
787
+ ] }));
788
+ ct.displayName = so.displayName;
789
+ const lo = m.forwardRef(({ className: e, orientation: t = "vertical", ...o }, a) => /* @__PURE__ */ n(
790
+ st,
791
+ {
792
+ ref: a,
793
+ orientation: t,
794
+ className: Re(
795
+ "flex touch-none select-none transition-colors",
796
+ t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
797
+ t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
798
+ e
799
+ ),
800
+ ...o,
801
+ children: /* @__PURE__ */ n(to, { className: "relative flex-1 rounded-full bg-border" })
802
+ }
803
+ ));
804
+ lo.displayName = st.displayName;
805
+ const Or = () => {
806
+ const { selected: e, actions: t } = we((o) => {
807
+ var s, i, c, d, u, f, h;
808
+ const a = o.events.selected ? Array.from(o.events.selected)[0] : null;
809
+ let r;
810
+ return a && (r = {
811
+ id: a,
812
+ name: ((i = (s = o.nodes[a]) == null ? void 0 : s.data) == null ? void 0 : i.displayName) || ((d = (c = o.nodes[a]) == null ? void 0 : c.data) == null ? void 0 : d.name),
813
+ settings: (f = (u = o.nodes[a]) == null ? void 0 : u.related) == null ? void 0 : f.settings,
814
+ isDeletable: ((h = o.nodes[a]) == null ? void 0 : h.id) !== "ROOT"
815
+ }), { selected: r };
816
+ });
817
+ return /* @__PURE__ */ n("div", { className: "h-full flex flex-col", children: e ? /* @__PURE__ */ M(ot, { children: [
818
+ /* @__PURE__ */ M("div", { className: "flex items-center justify-between pb-3 border-b border-border mb-3", children: [
819
+ /* @__PURE__ */ M("div", { children: [
820
+ /* @__PURE__ */ n("span", { className: "text-xs text-muted-foreground", children: "Selected" }),
821
+ /* @__PURE__ */ n("h3", { className: "text-sm font-semibold", children: e.name })
822
+ ] }),
823
+ e.isDeletable && /* @__PURE__ */ n(
824
+ "button",
825
+ {
826
+ onClick: () => t.delete(e.id),
827
+ className: "p-1.5 rounded hover:bg-destructive/10 text-destructive transition-colors",
828
+ title: "Delete element",
829
+ children: /* @__PURE__ */ n(xr, { className: "h-4 w-4" })
830
+ }
831
+ )
832
+ ] }),
833
+ /* @__PURE__ */ n(ct, { className: "flex-1 -mr-4 pr-4", children: e.settings && p.createElement(e.settings) })
834
+ ] }) : /* @__PURE__ */ n("div", { className: "text-center py-8", children: /* @__PURE__ */ n("p", { className: "text-sm text-muted-foreground", children: "Select an element to edit its properties" }) }) });
835
+ }, $r = (e) => {
836
+ switch (e) {
837
+ case "Container":
838
+ return Ne;
839
+ case "Text":
840
+ return Ut;
841
+ case "Heading":
842
+ return Ft;
843
+ case "Button":
844
+ return Wt;
845
+ case "Image":
846
+ return jt;
847
+ case "Divider":
848
+ return Gt;
849
+ case "Spacer":
850
+ return Yt;
851
+ case "Video":
852
+ return Sr;
853
+ case "Columns":
854
+ return $t;
855
+ case "Link":
856
+ return kt;
857
+ default:
858
+ return Ne;
859
+ }
860
+ }, io = ({ nodeId: e, depth: t = 0, onDragStart: o, onDragOver: a, onDrop: r, draggedId: s }) => {
861
+ const { node: i, actions: c, selectedNodeId: d, childNodes: u, parentId: f } = we((E, de) => {
862
+ var ue, x;
863
+ const F = E.nodes[e], ae = ((ue = F == null ? void 0 : F.data) == null ? void 0 : ue.nodes) || [], $ = E.events.selected ? Array.from(E.events.selected)[0] : null, K = (x = F == null ? void 0 : F.data) == null ? void 0 : x.parent;
864
+ return {
865
+ node: F,
866
+ childNodes: ae,
867
+ selectedNodeId: $,
868
+ parentId: K
869
+ };
870
+ }), [h, g] = Te(!0), [l, N] = Te(!1);
871
+ if (!i) return null;
872
+ const v = i.data.displayName || i.data.name || "Unknown", b = u.length > 0, S = d === e, C = e === "ROOT", w = $r(v), T = s === e, _ = i.data.isCanvas, R = (E) => {
873
+ E.stopPropagation(), C || c.selectNode(e);
874
+ }, k = (E) => {
875
+ E.stopPropagation(), g(!h);
876
+ }, D = (E) => {
877
+ if (C) {
878
+ E.preventDefault();
879
+ return;
880
+ }
881
+ E.stopPropagation(), o(e, f);
882
+ }, P = (E) => {
883
+ E.preventDefault(), E.stopPropagation(), s && s !== e && _ && N(!0);
884
+ }, V = (E) => {
885
+ E.stopPropagation(), N(!1);
886
+ }, O = (E) => {
887
+ E.preventDefault(), E.stopPropagation(), N(!1), s && s !== e && r(e);
888
+ };
889
+ return /* @__PURE__ */ M("div", { className: "select-none", children: [
890
+ /* @__PURE__ */ M(
891
+ "div",
892
+ {
893
+ className: `flex items-center gap-1 py-1 px-1 rounded cursor-pointer text-sm transition-colors ${S ? "bg-primary/10 text-primary" : "hover:bg-secondary/50"} ${T ? "opacity-50" : ""} ${l ? "bg-primary/20 ring-1 ring-primary" : ""}`,
894
+ style: { paddingLeft: `${t * 12 + 4}px` },
895
+ onClick: R,
896
+ draggable: !C,
897
+ onDragStart: D,
898
+ onDragOver: P,
899
+ onDragLeave: V,
900
+ onDrop: O,
901
+ children: [
902
+ !C && /* @__PURE__ */ n(br, { className: "h-3 w-3 text-muted-foreground/50 cursor-grab active:cursor-grabbing" }),
903
+ b ? /* @__PURE__ */ n("button", { onClick: k, className: "p-0.5 hover:bg-secondary rounded", children: h ? /* @__PURE__ */ n(Ko, { className: "h-3 w-3" }) : /* @__PURE__ */ n(qo, { className: "h-3 w-3" }) }) : /* @__PURE__ */ n("span", { className: "w-4" }),
904
+ /* @__PURE__ */ n(w, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }),
905
+ /* @__PURE__ */ n("span", { className: `truncate ${C ? "font-medium" : ""}`, children: C ? "Root" : v })
906
+ ]
907
+ }
908
+ ),
909
+ b && h && /* @__PURE__ */ n("div", { children: u.map((E) => /* @__PURE__ */ n(
910
+ io,
911
+ {
912
+ nodeId: E,
913
+ depth: t + 1,
914
+ onDragStart: o,
915
+ onDragOver: a,
916
+ onDrop: r,
917
+ draggedId: s
918
+ },
919
+ E
920
+ )) })
921
+ ] });
922
+ }, Fr = () => {
923
+ const [e, t] = Te(null), [o, a] = Te(null), { nodeIds: r, actions: s } = we((u) => ({
924
+ nodeIds: Object.keys(u.nodes)
925
+ })), i = (u, f) => {
926
+ t(u), a(f);
927
+ }, c = (u) => {
928
+ if (e && u && e !== u)
929
+ try {
930
+ s.move(e, u, 0);
931
+ } catch (f) {
932
+ console.log("Cannot move node:", f);
933
+ }
934
+ t(null), a(null);
935
+ };
936
+ return /* @__PURE__ */ M("div", { className: "space-y-2", onDragEnd: () => {
937
+ t(null), a(null);
938
+ }, children: [
939
+ /* @__PURE__ */ n("h3", { className: "text-sm font-medium text-muted-foreground", children: "Layers" }),
940
+ /* @__PURE__ */ n("div", { className: "border border-border rounded-lg p-2 max-h-[250px] overflow-y-auto bg-background", children: r.includes("ROOT") && /* @__PURE__ */ n(
941
+ io,
942
+ {
943
+ nodeId: "ROOT",
944
+ onDragStart: i,
945
+ onDrop: c,
946
+ draggedId: e
947
+ }
948
+ ) }),
949
+ /* @__PURE__ */ n("p", { className: "text-xs text-muted-foreground", children: "Drag to containers to reorder" })
950
+ ] });
951
+ };
952
+ // @__NO_SIDE_EFFECTS__
953
+ function Nt(e) {
954
+ const t = /* @__PURE__ */ jr(e), o = m.forwardRef((a, r) => {
955
+ const { children: s, ...i } = a, c = m.Children.toArray(s), d = c.find(Wr);
956
+ if (d) {
957
+ const u = d.props.children, f = c.map((h) => h === d ? m.Children.count(u) > 1 ? m.Children.only(null) : m.isValidElement(u) ? u.props.children : null : h);
958
+ return /* @__PURE__ */ n(t, { ...i, ref: r, children: m.isValidElement(u) ? m.cloneElement(u, void 0, f) : null });
959
+ }
960
+ return /* @__PURE__ */ n(t, { ...i, ref: r, children: s });
961
+ });
962
+ return o.displayName = `${e}.Slot`, o;
963
+ }
964
+ // @__NO_SIDE_EFFECTS__
965
+ function jr(e) {
966
+ const t = m.forwardRef((o, a) => {
967
+ const { children: r, ...s } = o;
968
+ if (m.isValidElement(r)) {
969
+ const i = Ur(r), c = Yr(s, r.props);
970
+ return r.type !== m.Fragment && (c.ref = a ? Qo(a, i) : i), m.cloneElement(r, c);
971
+ }
972
+ return m.Children.count(r) > 1 ? m.Children.only(null) : null;
973
+ });
974
+ return t.displayName = `${e}.SlotClone`, t;
975
+ }
976
+ var Gr = Symbol("radix.slottable");
977
+ function Wr(e) {
978
+ return m.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Gr;
979
+ }
980
+ function Yr(e, t) {
981
+ const o = { ...t };
982
+ for (const a in t) {
983
+ const r = e[a], s = t[a];
984
+ /^on[A-Z]/.test(a) ? r && s ? o[a] = (...c) => {
985
+ const d = s(...c);
986
+ return r(...c), d;
987
+ } : r && (o[a] = r) : a === "style" ? o[a] = { ...r, ...s } : a === "className" && (o[a] = [r, s].filter(Boolean).join(" "));
988
+ }
989
+ return { ...e, ...o };
990
+ }
991
+ function Ur(e) {
992
+ var a, r;
993
+ let t = (a = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : a.get, o = t && "isReactWarning" in t && t.isReactWarning;
994
+ return o ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
995
+ }
996
+ function Zr(e) {
997
+ const t = e + "CollectionProvider", [o, a] = _e(t), [r, s] = o(
998
+ t,
999
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
1000
+ ), i = (v) => {
1001
+ const { scope: b, children: S } = v, C = p.useRef(null), w = p.useRef(/* @__PURE__ */ new Map()).current;
1002
+ return /* @__PURE__ */ n(r, { scope: b, itemMap: w, collectionRef: C, children: S });
1003
+ };
1004
+ i.displayName = t;
1005
+ const c = e + "CollectionSlot", d = /* @__PURE__ */ Nt(c), u = p.forwardRef(
1006
+ (v, b) => {
1007
+ const { scope: S, children: C } = v, w = s(c, S), T = re(b, w.collectionRef);
1008
+ return /* @__PURE__ */ n(d, { ref: T, children: C });
1009
+ }
1010
+ );
1011
+ u.displayName = c;
1012
+ const f = e + "CollectionItemSlot", h = "data-radix-collection-item", g = /* @__PURE__ */ Nt(f), l = p.forwardRef(
1013
+ (v, b) => {
1014
+ const { scope: S, children: C, ...w } = v, T = p.useRef(null), _ = re(b, T), R = s(f, S);
1015
+ return p.useEffect(() => (R.itemMap.set(T, { ref: T, ...w }), () => void R.itemMap.delete(T))), /* @__PURE__ */ n(g, { [h]: "", ref: _, children: C });
1016
+ }
1017
+ );
1018
+ l.displayName = f;
1019
+ function N(v) {
1020
+ const b = s(e + "CollectionConsumer", v);
1021
+ return p.useCallback(() => {
1022
+ const C = b.collectionRef.current;
1023
+ if (!C) return [];
1024
+ const w = Array.from(C.querySelectorAll(`[${h}]`));
1025
+ return Array.from(b.itemMap.values()).sort(
1026
+ (R, k) => w.indexOf(R.ref.current) - w.indexOf(k.ref.current)
1027
+ );
1028
+ }, [b.collectionRef, b.itemMap]);
1029
+ }
1030
+ return [
1031
+ { Provider: i, Slot: u, ItemSlot: l },
1032
+ N,
1033
+ a
1034
+ ];
1035
+ }
1036
+ var Je = "rovingFocusGroup.onEntryFocus", Xr = { bubbles: !1, cancelable: !0 }, Pe = "RovingFocusGroup", [et, co, Kr] = Zr(Pe), [qr, uo] = _e(
1037
+ Pe,
1038
+ [Kr]
1039
+ ), [Qr, Jr] = qr(Pe), fo = m.forwardRef(
1040
+ (e, t) => /* @__PURE__ */ n(et.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ n(et.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ n(ea, { ...e, ref: t }) }) })
1041
+ );
1042
+ fo.displayName = Pe;
1043
+ var ea = m.forwardRef((e, t) => {
1044
+ const {
1045
+ __scopeRovingFocusGroup: o,
1046
+ orientation: a,
1047
+ loop: r = !1,
1048
+ dir: s,
1049
+ currentTabStopId: i,
1050
+ defaultCurrentTabStopId: c,
1051
+ onCurrentTabStopIdChange: d,
1052
+ onEntryFocus: u,
1053
+ preventScrollOnEntryFocus: f = !1,
1054
+ ...h
1055
+ } = e, g = m.useRef(null), l = re(t, g), N = at(s), [v, b] = ze({
1056
+ prop: i,
1057
+ defaultProp: c ?? null,
1058
+ onChange: d,
1059
+ caller: Pe
1060
+ }), [S, C] = m.useState(!1), w = ie(u), T = co(o), _ = m.useRef(!1), [R, k] = m.useState(0);
1061
+ return m.useEffect(() => {
1062
+ const D = g.current;
1063
+ if (D)
1064
+ return D.addEventListener(Je, w), () => D.removeEventListener(Je, w);
1065
+ }, [w]), /* @__PURE__ */ n(
1066
+ Qr,
1067
+ {
1068
+ scope: o,
1069
+ orientation: a,
1070
+ dir: N,
1071
+ loop: r,
1072
+ currentTabStopId: v,
1073
+ onItemFocus: m.useCallback(
1074
+ (D) => b(D),
1075
+ [b]
1076
+ ),
1077
+ onItemShiftTab: m.useCallback(() => C(!0), []),
1078
+ onFocusableItemAdd: m.useCallback(
1079
+ () => k((D) => D + 1),
1080
+ []
1081
+ ),
1082
+ onFocusableItemRemove: m.useCallback(
1083
+ () => k((D) => D - 1),
1084
+ []
1085
+ ),
1086
+ children: /* @__PURE__ */ n(
1087
+ te.div,
1088
+ {
1089
+ tabIndex: S || R === 0 ? -1 : 0,
1090
+ "data-orientation": a,
1091
+ ...h,
1092
+ ref: l,
1093
+ style: { outline: "none", ...e.style },
1094
+ onMouseDown: W(e.onMouseDown, () => {
1095
+ _.current = !0;
1096
+ }),
1097
+ onFocus: W(e.onFocus, (D) => {
1098
+ const P = !_.current;
1099
+ if (D.target === D.currentTarget && P && !S) {
1100
+ const V = new CustomEvent(Je, Xr);
1101
+ if (D.currentTarget.dispatchEvent(V), !V.defaultPrevented) {
1102
+ const O = T().filter(($) => $.focusable), E = O.find(($) => $.active), de = O.find(($) => $.id === v), ae = [E, de, ...O].filter(
1103
+ Boolean
1104
+ ).map(($) => $.ref.current);
1105
+ ho(ae, f);
1106
+ }
1107
+ }
1108
+ _.current = !1;
1109
+ }),
1110
+ onBlur: W(e.onBlur, () => C(!1))
1111
+ }
1112
+ )
1113
+ }
1114
+ );
1115
+ }), po = "RovingFocusGroupItem", mo = m.forwardRef(
1116
+ (e, t) => {
1117
+ const {
1118
+ __scopeRovingFocusGroup: o,
1119
+ focusable: a = !0,
1120
+ active: r = !1,
1121
+ tabStopId: s,
1122
+ children: i,
1123
+ ...c
1124
+ } = e, d = Jo(), u = s || d, f = Jr(po, o), h = f.currentTabStopId === u, g = co(o), { onFocusableItemAdd: l, onFocusableItemRemove: N, currentTabStopId: v } = f;
1125
+ return m.useEffect(() => {
1126
+ if (a)
1127
+ return l(), () => N();
1128
+ }, [a, l, N]), /* @__PURE__ */ n(
1129
+ et.ItemSlot,
1130
+ {
1131
+ scope: o,
1132
+ id: u,
1133
+ focusable: a,
1134
+ active: r,
1135
+ children: /* @__PURE__ */ n(
1136
+ te.span,
1137
+ {
1138
+ tabIndex: h ? 0 : -1,
1139
+ "data-orientation": f.orientation,
1140
+ ...c,
1141
+ ref: t,
1142
+ onMouseDown: W(e.onMouseDown, (b) => {
1143
+ a ? f.onItemFocus(u) : b.preventDefault();
1144
+ }),
1145
+ onFocus: W(e.onFocus, () => f.onItemFocus(u)),
1146
+ onKeyDown: W(e.onKeyDown, (b) => {
1147
+ if (b.key === "Tab" && b.shiftKey) {
1148
+ f.onItemShiftTab();
1149
+ return;
1150
+ }
1151
+ if (b.target !== b.currentTarget) return;
1152
+ const S = ra(b, f.orientation, f.dir);
1153
+ if (S !== void 0) {
1154
+ if (b.metaKey || b.ctrlKey || b.altKey || b.shiftKey) return;
1155
+ b.preventDefault();
1156
+ let w = g().filter((T) => T.focusable).map((T) => T.ref.current);
1157
+ if (S === "last") w.reverse();
1158
+ else if (S === "prev" || S === "next") {
1159
+ S === "prev" && w.reverse();
1160
+ const T = w.indexOf(b.currentTarget);
1161
+ w = f.loop ? aa(w, T + 1) : w.slice(T + 1);
1162
+ }
1163
+ setTimeout(() => ho(w));
1164
+ }
1165
+ }),
1166
+ children: typeof i == "function" ? i({ isCurrentTabStop: h, hasTabStop: v != null }) : i
1167
+ }
1168
+ )
1169
+ }
1170
+ );
1171
+ }
1172
+ );
1173
+ mo.displayName = po;
1174
+ var ta = {
1175
+ ArrowLeft: "prev",
1176
+ ArrowUp: "prev",
1177
+ ArrowRight: "next",
1178
+ ArrowDown: "next",
1179
+ PageUp: "first",
1180
+ Home: "first",
1181
+ PageDown: "last",
1182
+ End: "last"
1183
+ };
1184
+ function oa(e, t) {
1185
+ return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
1186
+ }
1187
+ function ra(e, t, o) {
1188
+ const a = oa(e.key, o);
1189
+ if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(a)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(a)))
1190
+ return ta[a];
1191
+ }
1192
+ function ho(e, t = !1) {
1193
+ const o = document.activeElement;
1194
+ for (const a of e)
1195
+ if (a === o || (a.focus({ preventScroll: t }), document.activeElement !== o)) return;
1196
+ }
1197
+ function aa(e, t) {
1198
+ return e.map((o, a) => e[(t + a) % e.length]);
1199
+ }
1200
+ var na = fo, sa = mo, go = "Toggle", dt = m.forwardRef((e, t) => {
1201
+ const { pressed: o, defaultPressed: a, onPressedChange: r, ...s } = e, [i, c] = ze({
1202
+ prop: o,
1203
+ onChange: r,
1204
+ defaultProp: a ?? !1,
1205
+ caller: go
1206
+ });
1207
+ return /* @__PURE__ */ n(
1208
+ te.button,
1209
+ {
1210
+ type: "button",
1211
+ "aria-pressed": i,
1212
+ "data-state": i ? "on" : "off",
1213
+ "data-disabled": e.disabled ? "" : void 0,
1214
+ ...s,
1215
+ ref: t,
1216
+ onClick: W(e.onClick, () => {
1217
+ e.disabled || c(!i);
1218
+ })
1219
+ }
1220
+ );
1221
+ });
1222
+ dt.displayName = go;
1223
+ var vo = dt, ce = "ToggleGroup", [bo] = _e(ce, [
1224
+ uo
1225
+ ]), yo = uo(), ut = p.forwardRef((e, t) => {
1226
+ const { type: o, ...a } = e;
1227
+ if (o === "single")
1228
+ return /* @__PURE__ */ n(la, { ...a, ref: t });
1229
+ if (o === "multiple")
1230
+ return /* @__PURE__ */ n(ia, { ...a, ref: t });
1231
+ throw new Error(`Missing prop \`type\` expected on \`${ce}\``);
1232
+ });
1233
+ ut.displayName = ce;
1234
+ var [wo, xo] = bo(ce), la = p.forwardRef((e, t) => {
1235
+ const {
1236
+ value: o,
1237
+ defaultValue: a,
1238
+ onValueChange: r = () => {
1239
+ },
1240
+ ...s
1241
+ } = e, [i, c] = ze({
1242
+ prop: o,
1243
+ defaultProp: a ?? "",
1244
+ onChange: r,
1245
+ caller: ce
1246
+ });
1247
+ return /* @__PURE__ */ n(
1248
+ wo,
1249
+ {
1250
+ scope: e.__scopeToggleGroup,
1251
+ type: "single",
1252
+ value: p.useMemo(() => i ? [i] : [], [i]),
1253
+ onItemActivate: c,
1254
+ onItemDeactivate: p.useCallback(() => c(""), [c]),
1255
+ children: /* @__PURE__ */ n(Co, { ...s, ref: t })
1256
+ }
1257
+ );
1258
+ }), ia = p.forwardRef((e, t) => {
1259
+ const {
1260
+ value: o,
1261
+ defaultValue: a,
1262
+ onValueChange: r = () => {
1263
+ },
1264
+ ...s
1265
+ } = e, [i, c] = ze({
1266
+ prop: o,
1267
+ defaultProp: a ?? [],
1268
+ onChange: r,
1269
+ caller: ce
1270
+ }), d = p.useCallback(
1271
+ (f) => c((h = []) => [...h, f]),
1272
+ [c]
1273
+ ), u = p.useCallback(
1274
+ (f) => c((h = []) => h.filter((g) => g !== f)),
1275
+ [c]
1276
+ );
1277
+ return /* @__PURE__ */ n(
1278
+ wo,
1279
+ {
1280
+ scope: e.__scopeToggleGroup,
1281
+ type: "multiple",
1282
+ value: i,
1283
+ onItemActivate: d,
1284
+ onItemDeactivate: u,
1285
+ children: /* @__PURE__ */ n(Co, { ...s, ref: t })
1286
+ }
1287
+ );
1288
+ });
1289
+ ut.displayName = ce;
1290
+ var [ca, da] = bo(ce), Co = p.forwardRef(
1291
+ (e, t) => {
1292
+ const {
1293
+ __scopeToggleGroup: o,
1294
+ disabled: a = !1,
1295
+ rovingFocus: r = !0,
1296
+ orientation: s,
1297
+ dir: i,
1298
+ loop: c = !0,
1299
+ ...d
1300
+ } = e, u = yo(o), f = at(i), h = { role: "group", dir: f, ...d };
1301
+ return /* @__PURE__ */ n(ca, { scope: o, rovingFocus: r, disabled: a, children: r ? /* @__PURE__ */ n(
1302
+ na,
1303
+ {
1304
+ asChild: !0,
1305
+ ...u,
1306
+ orientation: s,
1307
+ dir: f,
1308
+ loop: c,
1309
+ children: /* @__PURE__ */ n(te.div, { ...h, ref: t })
1310
+ }
1311
+ ) : /* @__PURE__ */ n(te.div, { ...h, ref: t }) });
1312
+ }
1313
+ ), He = "ToggleGroupItem", So = p.forwardRef(
1314
+ (e, t) => {
1315
+ const o = xo(He, e.__scopeToggleGroup), a = da(He, e.__scopeToggleGroup), r = yo(e.__scopeToggleGroup), s = o.value.includes(e.value), i = a.disabled || e.disabled, c = { ...e, pressed: s, disabled: i }, d = p.useRef(null);
1316
+ return a.rovingFocus ? /* @__PURE__ */ n(
1317
+ sa,
1318
+ {
1319
+ asChild: !0,
1320
+ ...r,
1321
+ focusable: !i,
1322
+ active: s,
1323
+ ref: d,
1324
+ children: /* @__PURE__ */ n(Tt, { ...c, ref: t })
1325
+ }
1326
+ ) : /* @__PURE__ */ n(Tt, { ...c, ref: t });
1327
+ }
1328
+ );
1329
+ So.displayName = He;
1330
+ var Tt = p.forwardRef(
1331
+ (e, t) => {
1332
+ const { __scopeToggleGroup: o, value: a, ...r } = e, s = xo(He, o), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, c = s.type === "single" ? i : void 0;
1333
+ return /* @__PURE__ */ n(
1334
+ dt,
1335
+ {
1336
+ ...c,
1337
+ ...r,
1338
+ ref: t,
1339
+ onPressedChange: (d) => {
1340
+ d ? s.onItemActivate(a) : s.onItemDeactivate(a);
1341
+ }
1342
+ }
1343
+ );
1344
+ }
1345
+ ), Eo = ut, No = So;
1346
+ const To = er(
1347
+ "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",
1348
+ {
1349
+ variants: {
1350
+ variant: {
1351
+ default: "bg-transparent",
1352
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
1353
+ },
1354
+ size: {
1355
+ default: "h-10 px-3",
1356
+ sm: "h-9 px-2.5",
1357
+ lg: "h-11 px-5"
1358
+ }
1359
+ },
1360
+ defaultVariants: {
1361
+ variant: "default",
1362
+ size: "default"
1363
+ }
1364
+ }
1365
+ ), ua = m.forwardRef(({ className: e, variant: t, size: o, ...a }, r) => /* @__PURE__ */ n(vo, { ref: r, className: Re(To({ variant: t, size: o, className: e })), ...a }));
1366
+ ua.displayName = vo.displayName;
1367
+ const Ro = m.createContext({
1368
+ size: "default",
1369
+ variant: "default"
1370
+ }), Po = m.forwardRef(({ className: e, variant: t, size: o, children: a, ...r }, s) => /* @__PURE__ */ n(Eo, { ref: s, className: Re("flex items-center justify-center gap-1", e), ...r, children: /* @__PURE__ */ n(Ro.Provider, { value: { variant: t, size: o }, children: a }) }));
1371
+ Po.displayName = Eo.displayName;
1372
+ const ko = m.forwardRef(({ className: e, children: t, variant: o, size: a, ...r }, s) => {
1373
+ const i = m.useContext(Ro);
1374
+ return /* @__PURE__ */ n(
1375
+ No,
1376
+ {
1377
+ ref: s,
1378
+ className: Re(
1379
+ To({
1380
+ variant: i.variant || o,
1381
+ size: i.size || a
1382
+ }),
1383
+ e
1384
+ ),
1385
+ ...r,
1386
+ children: t
1387
+ }
1388
+ );
1389
+ });
1390
+ ko.displayName = No.displayName;
1391
+ var fa = (e) => {
1392
+ switch (e) {
1393
+ case "success":
1394
+ return ha;
1395
+ case "info":
1396
+ return va;
1397
+ case "warning":
1398
+ return ga;
1399
+ case "error":
1400
+ return ba;
1401
+ default:
1402
+ return null;
1403
+ }
1404
+ }, pa = Array(12).fill(0), ma = ({ visible: e, className: t }) => p.createElement("div", { className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "), "data-visible": e }, p.createElement("div", { className: "sonner-spinner" }, pa.map((o, a) => p.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${a}` })))), ha = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" })), ga = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })), va = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" })), ba = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })), ya = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, p.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), p.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })), wa = () => {
1405
+ let [e, t] = p.useState(document.hidden);
1406
+ return p.useEffect(() => {
1407
+ let o = () => {
1408
+ t(document.hidden);
1409
+ };
1410
+ return document.addEventListener("visibilitychange", o), () => window.removeEventListener("visibilitychange", o);
1411
+ }, []), e;
1412
+ }, tt = 1, xa = class {
1413
+ constructor() {
1414
+ this.subscribe = (e) => (this.subscribers.push(e), () => {
1415
+ let t = this.subscribers.indexOf(e);
1416
+ this.subscribers.splice(t, 1);
1417
+ }), this.publish = (e) => {
1418
+ this.subscribers.forEach((t) => t(e));
1419
+ }, this.addToast = (e) => {
1420
+ this.publish(e), this.toasts = [...this.toasts, e];
1421
+ }, this.create = (e) => {
1422
+ var t;
1423
+ let { message: o, ...a } = e, r = typeof (e == null ? void 0 : e.id) == "number" || ((t = e.id) == null ? void 0 : t.length) > 0 ? e.id : tt++, s = this.toasts.find((c) => c.id === r), i = e.dismissible === void 0 ? !0 : e.dismissible;
1424
+ return this.dismissedToasts.has(r) && this.dismissedToasts.delete(r), s ? this.toasts = this.toasts.map((c) => c.id === r ? (this.publish({ ...c, ...e, id: r, title: o }), { ...c, ...e, id: r, dismissible: i, title: o }) : c) : this.addToast({ title: o, ...a, dismissible: i, id: r }), r;
1425
+ }, this.dismiss = (e) => (this.dismissedToasts.add(e), e || this.toasts.forEach((t) => {
1426
+ this.subscribers.forEach((o) => o({ id: t.id, dismiss: !0 }));
1427
+ }), this.subscribers.forEach((t) => t({ id: e, dismiss: !0 })), e), this.message = (e, t) => this.create({ ...t, message: e }), this.error = (e, t) => this.create({ ...t, message: e, type: "error" }), this.success = (e, t) => this.create({ ...t, type: "success", message: e }), this.info = (e, t) => this.create({ ...t, type: "info", message: e }), this.warning = (e, t) => this.create({ ...t, type: "warning", message: e }), this.loading = (e, t) => this.create({ ...t, type: "loading", message: e }), this.promise = (e, t) => {
1428
+ if (!t) return;
1429
+ let o;
1430
+ t.loading !== void 0 && (o = this.create({ ...t, promise: e, type: "loading", message: t.loading, description: typeof t.description != "function" ? t.description : void 0 }));
1431
+ let a = e instanceof Promise ? e : e(), r = o !== void 0, s, i = a.then(async (d) => {
1432
+ if (s = ["resolve", d], p.isValidElement(d)) r = !1, this.create({ id: o, type: "default", message: d });
1433
+ else if (Sa(d) && !d.ok) {
1434
+ r = !1;
1435
+ let u = typeof t.error == "function" ? await t.error(`HTTP error! status: ${d.status}`) : t.error, f = typeof t.description == "function" ? await t.description(`HTTP error! status: ${d.status}`) : t.description;
1436
+ this.create({ id: o, type: "error", message: u, description: f });
1437
+ } else if (t.success !== void 0) {
1438
+ r = !1;
1439
+ let u = typeof t.success == "function" ? await t.success(d) : t.success, f = typeof t.description == "function" ? await t.description(d) : t.description;
1440
+ this.create({ id: o, type: "success", message: u, description: f });
1441
+ }
1442
+ }).catch(async (d) => {
1443
+ if (s = ["reject", d], t.error !== void 0) {
1444
+ r = !1;
1445
+ let u = typeof t.error == "function" ? await t.error(d) : t.error, f = typeof t.description == "function" ? await t.description(d) : t.description;
1446
+ this.create({ id: o, type: "error", message: u, description: f });
1447
+ }
1448
+ }).finally(() => {
1449
+ var d;
1450
+ r && (this.dismiss(o), o = void 0), (d = t.finally) == null || d.call(t);
1451
+ }), c = () => new Promise((d, u) => i.then(() => s[0] === "reject" ? u(s[1]) : d(s[1])).catch(u));
1452
+ return typeof o != "string" && typeof o != "number" ? { unwrap: c } : Object.assign(o, { unwrap: c });
1453
+ }, this.custom = (e, t) => {
1454
+ let o = (t == null ? void 0 : t.id) || tt++;
1455
+ return this.create({ jsx: e(o), id: o, ...t }), o;
1456
+ }, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
1457
+ }
1458
+ }, G = new xa(), Ca = (e, t) => {
1459
+ let o = (t == null ? void 0 : t.id) || tt++;
1460
+ return G.addToast({ title: e, ...t, id: o }), o;
1461
+ }, Sa = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", Ea = Ca, Na = () => G.toasts, Ta = () => G.getActiveToasts(), Ra = Object.assign(Ea, { success: G.success, info: G.info, warning: G.warning, error: G.error, custom: G.custom, message: G.message, promise: G.promise, dismiss: G.dismiss, loading: G.loading }, { getHistory: Na, getToasts: Ta });
1462
+ function Pa(e, { insertAt: t } = {}) {
1463
+ if (typeof document > "u") return;
1464
+ let o = document.head || document.getElementsByTagName("head")[0], a = document.createElement("style");
1465
+ a.type = "text/css", t === "top" && o.firstChild ? o.insertBefore(a, o.firstChild) : o.appendChild(a), a.styleSheet ? a.styleSheet.cssText = e : a.appendChild(document.createTextNode(e));
1466
+ }
1467
+ Pa(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
1468
+ `);
1469
+ function De(e) {
1470
+ return e.label !== void 0;
1471
+ }
1472
+ var ka = 3, Ia = "32px", Ma = "16px", Rt = 4e3, Da = 356, Aa = 14, Va = 20, La = 200;
1473
+ function ee(...e) {
1474
+ return e.filter(Boolean).join(" ");
1475
+ }
1476
+ function Ha(e) {
1477
+ let [t, o] = e.split("-"), a = [];
1478
+ return t && a.push(t), o && a.push(o), a;
1479
+ }
1480
+ var _a = (e) => {
1481
+ var t, o, a, r, s, i, c, d, u, f, h;
1482
+ let { invert: g, toast: l, unstyled: N, interacting: v, setHeights: b, visibleToasts: S, heights: C, index: w, toasts: T, expanded: _, removeToast: R, defaultRichColors: k, closeButton: D, style: P, cancelButtonStyle: V, actionButtonStyle: O, className: E = "", descriptionClassName: de = "", duration: F, position: ae, gap: $, loadingIcon: K, expandByDefault: ue, classNames: x, icons: U, closeButtonAriaLabel: je = "Close toast", pauseWhenPageIsHidden: A } = e, [L, B] = p.useState(null), [j, he] = p.useState(null), [z, Ge] = p.useState(!1), [xe, ke] = p.useState(!1), [Ce, We] = p.useState(!1), [pt, Ao] = p.useState(!1), [Vo, mt] = p.useState(!1), [Lo, Ye] = p.useState(0), [Ho, ht] = p.useState(0), Se = p.useRef(l.duration || F || Rt), gt = p.useRef(null), fe = p.useRef(null), _o = w === 0, Bo = w + 1 <= S, Z = l.type, ge = l.dismissible !== !1, zo = l.className || "", Oo = l.descriptionClassName || "", Ie = p.useMemo(() => C.findIndex((y) => y.toastId === l.id) || 0, [C, l.id]), $o = p.useMemo(() => {
1483
+ var y;
1484
+ return (y = l.closeButton) != null ? y : D;
1485
+ }, [l.closeButton, D]), vt = p.useMemo(() => l.duration || F || Rt, [l.duration, F]), Ue = p.useRef(0), ve = p.useRef(0), bt = p.useRef(0), be = p.useRef(null), [Fo, jo] = ae.split("-"), yt = p.useMemo(() => C.reduce((y, I, H) => H >= Ie ? y : y + I.height, 0), [C, Ie]), wt = wa(), Go = l.invert || g, Ze = Z === "loading";
1486
+ ve.current = p.useMemo(() => Ie * $ + yt, [Ie, yt]), p.useEffect(() => {
1487
+ Se.current = vt;
1488
+ }, [vt]), p.useEffect(() => {
1489
+ Ge(!0);
1490
+ }, []), p.useEffect(() => {
1491
+ let y = fe.current;
1492
+ if (y) {
1493
+ let I = y.getBoundingClientRect().height;
1494
+ return ht(I), b((H) => [{ toastId: l.id, height: I, position: l.position }, ...H]), () => b((H) => H.filter((q) => q.toastId !== l.id));
1495
+ }
1496
+ }, [b, l.id]), p.useLayoutEffect(() => {
1497
+ if (!z) return;
1498
+ let y = fe.current, I = y.style.height;
1499
+ y.style.height = "auto";
1500
+ let H = y.getBoundingClientRect().height;
1501
+ y.style.height = I, ht(H), b((q) => q.find((Q) => Q.toastId === l.id) ? q.map((Q) => Q.toastId === l.id ? { ...Q, height: H } : Q) : [{ toastId: l.id, height: H, position: l.position }, ...q]);
1502
+ }, [z, l.title, l.description, b, l.id]);
1503
+ let ne = p.useCallback(() => {
1504
+ ke(!0), Ye(ve.current), b((y) => y.filter((I) => I.toastId !== l.id)), setTimeout(() => {
1505
+ R(l);
1506
+ }, La);
1507
+ }, [l, R, b, ve]);
1508
+ p.useEffect(() => {
1509
+ if (l.promise && Z === "loading" || l.duration === 1 / 0 || l.type === "loading") return;
1510
+ let y;
1511
+ return _ || v || A && wt ? (() => {
1512
+ if (bt.current < Ue.current) {
1513
+ let I = (/* @__PURE__ */ new Date()).getTime() - Ue.current;
1514
+ Se.current = Se.current - I;
1515
+ }
1516
+ bt.current = (/* @__PURE__ */ new Date()).getTime();
1517
+ })() : Se.current !== 1 / 0 && (Ue.current = (/* @__PURE__ */ new Date()).getTime(), y = setTimeout(() => {
1518
+ var I;
1519
+ (I = l.onAutoClose) == null || I.call(l, l), ne();
1520
+ }, Se.current)), () => clearTimeout(y);
1521
+ }, [_, v, l, Z, A, wt, ne]), p.useEffect(() => {
1522
+ l.delete && ne();
1523
+ }, [ne, l.delete]);
1524
+ function Wo() {
1525
+ var y, I, H;
1526
+ return U != null && U.loading ? p.createElement("div", { className: ee(x == null ? void 0 : x.loader, (y = l == null ? void 0 : l.classNames) == null ? void 0 : y.loader, "sonner-loader"), "data-visible": Z === "loading" }, U.loading) : K ? p.createElement("div", { className: ee(x == null ? void 0 : x.loader, (I = l == null ? void 0 : l.classNames) == null ? void 0 : I.loader, "sonner-loader"), "data-visible": Z === "loading" }, K) : p.createElement(ma, { className: ee(x == null ? void 0 : x.loader, (H = l == null ? void 0 : l.classNames) == null ? void 0 : H.loader), visible: Z === "loading" });
1527
+ }
1528
+ return p.createElement("li", { tabIndex: 0, ref: fe, className: ee(E, zo, x == null ? void 0 : x.toast, (t = l == null ? void 0 : l.classNames) == null ? void 0 : t.toast, x == null ? void 0 : x.default, x == null ? void 0 : x[Z], (o = l == null ? void 0 : l.classNames) == null ? void 0 : o[Z]), "data-sonner-toast": "", "data-rich-colors": (a = l.richColors) != null ? a : k, "data-styled": !(l.jsx || l.unstyled || N), "data-mounted": z, "data-promise": !!l.promise, "data-swiped": Vo, "data-removed": xe, "data-visible": Bo, "data-y-position": Fo, "data-x-position": jo, "data-index": w, "data-front": _o, "data-swiping": Ce, "data-dismissible": ge, "data-type": Z, "data-invert": Go, "data-swipe-out": pt, "data-swipe-direction": j, "data-expanded": !!(_ || ue && z), style: { "--index": w, "--toasts-before": w, "--z-index": T.length - w, "--offset": `${xe ? Lo : ve.current}px`, "--initial-height": ue ? "auto" : `${Ho}px`, ...P, ...l.style }, onDragEnd: () => {
1529
+ We(!1), B(null), be.current = null;
1530
+ }, onPointerDown: (y) => {
1531
+ Ze || !ge || (gt.current = /* @__PURE__ */ new Date(), Ye(ve.current), y.target.setPointerCapture(y.pointerId), y.target.tagName !== "BUTTON" && (We(!0), be.current = { x: y.clientX, y: y.clientY }));
1532
+ }, onPointerUp: () => {
1533
+ var y, I, H, q;
1534
+ if (pt || !ge) return;
1535
+ be.current = null;
1536
+ let Q = Number(((y = fe.current) == null ? void 0 : y.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), se = Number(((I = fe.current) == null ? void 0 : I.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), pe = (/* @__PURE__ */ new Date()).getTime() - ((H = gt.current) == null ? void 0 : H.getTime()), J = L === "x" ? Q : se, le = Math.abs(J) / pe;
1537
+ if (Math.abs(J) >= Va || le > 0.11) {
1538
+ Ye(ve.current), (q = l.onDismiss) == null || q.call(l, l), he(L === "x" ? Q > 0 ? "right" : "left" : se > 0 ? "down" : "up"), ne(), Ao(!0), mt(!1);
1539
+ return;
1540
+ }
1541
+ We(!1), B(null);
1542
+ }, onPointerMove: (y) => {
1543
+ var I, H, q, Q;
1544
+ if (!be.current || !ge || ((I = window.getSelection()) == null ? void 0 : I.toString().length) > 0) return;
1545
+ let se = y.clientY - be.current.y, pe = y.clientX - be.current.x, J = (H = e.swipeDirections) != null ? H : Ha(ae);
1546
+ !L && (Math.abs(pe) > 1 || Math.abs(se) > 1) && B(Math.abs(pe) > Math.abs(se) ? "x" : "y");
1547
+ let le = { x: 0, y: 0 };
1548
+ L === "y" ? (J.includes("top") || J.includes("bottom")) && (J.includes("top") && se < 0 || J.includes("bottom") && se > 0) && (le.y = se) : L === "x" && (J.includes("left") || J.includes("right")) && (J.includes("left") && pe < 0 || J.includes("right") && pe > 0) && (le.x = pe), (Math.abs(le.x) > 0 || Math.abs(le.y) > 0) && mt(!0), (q = fe.current) == null || q.style.setProperty("--swipe-amount-x", `${le.x}px`), (Q = fe.current) == null || Q.style.setProperty("--swipe-amount-y", `${le.y}px`);
1549
+ } }, $o && !l.jsx ? p.createElement("button", { "aria-label": je, "data-disabled": Ze, "data-close-button": !0, onClick: Ze || !ge ? () => {
1550
+ } : () => {
1551
+ var y;
1552
+ ne(), (y = l.onDismiss) == null || y.call(l, l);
1553
+ }, className: ee(x == null ? void 0 : x.closeButton, (r = l == null ? void 0 : l.classNames) == null ? void 0 : r.closeButton) }, (s = U == null ? void 0 : U.close) != null ? s : ya) : null, l.jsx || Xe(l.title) ? l.jsx ? l.jsx : typeof l.title == "function" ? l.title() : l.title : p.createElement(p.Fragment, null, Z || l.icon || l.promise ? p.createElement("div", { "data-icon": "", className: ee(x == null ? void 0 : x.icon, (i = l == null ? void 0 : l.classNames) == null ? void 0 : i.icon) }, l.promise || l.type === "loading" && !l.icon ? l.icon || Wo() : null, l.type !== "loading" ? l.icon || (U == null ? void 0 : U[Z]) || fa(Z) : null) : null, p.createElement("div", { "data-content": "", className: ee(x == null ? void 0 : x.content, (c = l == null ? void 0 : l.classNames) == null ? void 0 : c.content) }, p.createElement("div", { "data-title": "", className: ee(x == null ? void 0 : x.title, (d = l == null ? void 0 : l.classNames) == null ? void 0 : d.title) }, typeof l.title == "function" ? l.title() : l.title), l.description ? p.createElement("div", { "data-description": "", className: ee(de, Oo, x == null ? void 0 : x.description, (u = l == null ? void 0 : l.classNames) == null ? void 0 : u.description) }, typeof l.description == "function" ? l.description() : l.description) : null), Xe(l.cancel) ? l.cancel : l.cancel && De(l.cancel) ? p.createElement("button", { "data-button": !0, "data-cancel": !0, style: l.cancelButtonStyle || V, onClick: (y) => {
1554
+ var I, H;
1555
+ De(l.cancel) && ge && ((H = (I = l.cancel).onClick) == null || H.call(I, y), ne());
1556
+ }, className: ee(x == null ? void 0 : x.cancelButton, (f = l == null ? void 0 : l.classNames) == null ? void 0 : f.cancelButton) }, l.cancel.label) : null, Xe(l.action) ? l.action : l.action && De(l.action) ? p.createElement("button", { "data-button": !0, "data-action": !0, style: l.actionButtonStyle || O, onClick: (y) => {
1557
+ var I, H;
1558
+ De(l.action) && ((H = (I = l.action).onClick) == null || H.call(I, y), !y.defaultPrevented && ne());
1559
+ }, className: ee(x == null ? void 0 : x.actionButton, (h = l == null ? void 0 : l.classNames) == null ? void 0 : h.actionButton) }, l.action.label) : null));
1560
+ };
1561
+ function Pt() {
1562
+ if (typeof window > "u" || typeof document > "u") return "ltr";
1563
+ let e = document.documentElement.getAttribute("dir");
1564
+ return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
1565
+ }
1566
+ function Ba(e, t) {
1567
+ let o = {};
1568
+ return [e, t].forEach((a, r) => {
1569
+ let s = r === 1, i = s ? "--mobile-offset" : "--offset", c = s ? Ma : Ia;
1570
+ function d(u) {
1571
+ ["top", "right", "bottom", "left"].forEach((f) => {
1572
+ o[`${i}-${f}`] = typeof u == "number" ? `${u}px` : u;
1573
+ });
1574
+ }
1575
+ typeof a == "number" || typeof a == "string" ? d(a) : typeof a == "object" ? ["top", "right", "bottom", "left"].forEach((u) => {
1576
+ a[u] === void 0 ? o[`${i}-${u}`] = c : o[`${i}-${u}`] = typeof a[u] == "number" ? `${a[u]}px` : a[u];
1577
+ }) : d(c);
1578
+ }), o;
1579
+ }
1580
+ Yo(function(e, t) {
1581
+ let { invert: o, position: a = "bottom-right", hotkey: r = ["altKey", "KeyT"], expand: s, closeButton: i, className: c, offset: d, mobileOffset: u, theme: f = "light", richColors: h, duration: g, style: l, visibleToasts: N = ka, toastOptions: v, dir: b = Pt(), gap: S = Aa, loadingIcon: C, icons: w, containerAriaLabel: T = "Notifications", pauseWhenPageIsHidden: _ } = e, [R, k] = p.useState([]), D = p.useMemo(() => Array.from(new Set([a].concat(R.filter((A) => A.position).map((A) => A.position)))), [R, a]), [P, V] = p.useState([]), [O, E] = p.useState(!1), [de, F] = p.useState(!1), [ae, $] = p.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), K = p.useRef(null), ue = r.join("+").replace(/Key/g, "").replace(/Digit/g, ""), x = p.useRef(null), U = p.useRef(!1), je = p.useCallback((A) => {
1582
+ k((L) => {
1583
+ var B;
1584
+ return (B = L.find((j) => j.id === A.id)) != null && B.delete || G.dismiss(A.id), L.filter(({ id: j }) => j !== A.id);
1585
+ });
1586
+ }, []);
1587
+ return p.useEffect(() => G.subscribe((A) => {
1588
+ if (A.dismiss) {
1589
+ k((L) => L.map((B) => B.id === A.id ? { ...B, delete: !0 } : B));
1590
+ return;
1591
+ }
1592
+ setTimeout(() => {
1593
+ vr.flushSync(() => {
1594
+ k((L) => {
1595
+ let B = L.findIndex((j) => j.id === A.id);
1596
+ return B !== -1 ? [...L.slice(0, B), { ...L[B], ...A }, ...L.slice(B + 1)] : [A, ...L];
1597
+ });
1598
+ });
1599
+ });
1600
+ }), []), p.useEffect(() => {
1601
+ if (f !== "system") {
1602
+ $(f);
1603
+ return;
1604
+ }
1605
+ if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? $("dark") : $("light")), typeof window > "u") return;
1606
+ let A = window.matchMedia("(prefers-color-scheme: dark)");
1607
+ try {
1608
+ A.addEventListener("change", ({ matches: L }) => {
1609
+ $(L ? "dark" : "light");
1610
+ });
1611
+ } catch {
1612
+ A.addListener(({ matches: B }) => {
1613
+ try {
1614
+ $(B ? "dark" : "light");
1615
+ } catch (j) {
1616
+ console.error(j);
1617
+ }
1618
+ });
1619
+ }
1620
+ }, [f]), p.useEffect(() => {
1621
+ R.length <= 1 && E(!1);
1622
+ }, [R]), p.useEffect(() => {
1623
+ let A = (L) => {
1624
+ var B, j;
1625
+ r.every((he) => L[he] || L.code === he) && (E(!0), (B = K.current) == null || B.focus()), L.code === "Escape" && (document.activeElement === K.current || (j = K.current) != null && j.contains(document.activeElement)) && E(!1);
1626
+ };
1627
+ return document.addEventListener("keydown", A), () => document.removeEventListener("keydown", A);
1628
+ }, [r]), p.useEffect(() => {
1629
+ if (K.current) return () => {
1630
+ x.current && (x.current.focus({ preventScroll: !0 }), x.current = null, U.current = !1);
1631
+ };
1632
+ }, [K.current]), p.createElement("section", { ref: t, "aria-label": `${T} ${ue}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, D.map((A, L) => {
1633
+ var B;
1634
+ let [j, he] = A.split("-");
1635
+ return R.length ? p.createElement("ol", { key: A, dir: b === "auto" ? Pt() : b, tabIndex: -1, ref: K, className: c, "data-sonner-toaster": !0, "data-theme": ae, "data-y-position": j, "data-lifted": O && R.length > 1 && !s, "data-x-position": he, style: { "--front-toast-height": `${((B = P[0]) == null ? void 0 : B.height) || 0}px`, "--width": `${Da}px`, "--gap": `${S}px`, ...l, ...Ba(d, u) }, onBlur: (z) => {
1636
+ U.current && !z.currentTarget.contains(z.relatedTarget) && (U.current = !1, x.current && (x.current.focus({ preventScroll: !0 }), x.current = null));
1637
+ }, onFocus: (z) => {
1638
+ z.target instanceof HTMLElement && z.target.dataset.dismissible === "false" || U.current || (U.current = !0, x.current = z.relatedTarget);
1639
+ }, onMouseEnter: () => E(!0), onMouseMove: () => E(!0), onMouseLeave: () => {
1640
+ de || E(!1);
1641
+ }, onDragEnd: () => E(!1), onPointerDown: (z) => {
1642
+ z.target instanceof HTMLElement && z.target.dataset.dismissible === "false" || F(!0);
1643
+ }, onPointerUp: () => F(!1) }, R.filter((z) => !z.position && L === 0 || z.position === A).map((z, Ge) => {
1644
+ var xe, ke;
1645
+ return p.createElement(_a, { key: z.id, icons: w, index: Ge, toast: z, defaultRichColors: h, duration: (xe = v == null ? void 0 : v.duration) != null ? xe : g, className: v == null ? void 0 : v.className, descriptionClassName: v == null ? void 0 : v.descriptionClassName, invert: o, visibleToasts: N, closeButton: (ke = v == null ? void 0 : v.closeButton) != null ? ke : i, interacting: de, position: A, style: v == null ? void 0 : v.style, unstyled: v == null ? void 0 : v.unstyled, classNames: v == null ? void 0 : v.classNames, cancelButtonStyle: v == null ? void 0 : v.cancelButtonStyle, actionButtonStyle: v == null ? void 0 : v.actionButtonStyle, removeToast: je, toasts: R.filter((Ce) => Ce.position == z.position), heights: P.filter((Ce) => Ce.position == z.position), setHeights: V, expandByDefault: s, gap: S, loadingIcon: C, expanded: O, pauseWhenPageIsHidden: _, swipeDirections: e.swipeDirections });
1646
+ })) : null;
1647
+ }));
1648
+ });
1649
+ const Io = {
1650
+ mobile: { width: 375, icon: ar, label: "Mobile (375px)" },
1651
+ tablet: { width: 768, icon: rr, label: "Tablet (768px)" },
1652
+ small: { width: 1024, icon: or, label: "Small Desktop (1024px)" },
1653
+ desktop: { width: "100%", icon: tr, label: "Desktop (Full)" }
1654
+ }, za = ({ onSave: e, deviceSize: t, onDeviceSizeChange: o }) => {
1655
+ const { actions: a, query: r, canUndo: s, canRedo: i } = we((d, u) => ({
1656
+ canUndo: u.history.canUndo(),
1657
+ canRedo: u.history.canRedo()
1658
+ })), c = () => {
1659
+ const d = r.serialize();
1660
+ e == null || e(d), Ra.success("Page saved successfully");
1661
+ };
1662
+ return /* @__PURE__ */ M("div", { className: "flex items-center gap-4", children: [
1663
+ /* @__PURE__ */ n(nr, { children: /* @__PURE__ */ n(
1664
+ Po,
1665
+ {
1666
+ type: "single",
1667
+ value: t,
1668
+ onValueChange: (d) => d && o(d),
1669
+ className: "bg-muted rounded-md p-1",
1670
+ children: Object.entries(Io).map(([d, { icon: u, label: f }]) => /* @__PURE__ */ M(sr, { children: [
1671
+ /* @__PURE__ */ n(lr, { asChild: !0, children: /* @__PURE__ */ n(
1672
+ ko,
1673
+ {
1674
+ value: d,
1675
+ size: "sm",
1676
+ className: "data-[state=on]:bg-background data-[state=on]:shadow-sm",
1677
+ children: /* @__PURE__ */ n(u, { className: "h-4 w-4" })
1678
+ }
1679
+ ) }),
1680
+ /* @__PURE__ */ n(ir, { side: "bottom", children: /* @__PURE__ */ n("p", { children: f }) })
1681
+ ] }, d))
1682
+ }
1683
+ ) }),
1684
+ /* @__PURE__ */ n("div", { className: "h-6 w-px bg-border" }),
1685
+ /* @__PURE__ */ M("div", { className: "flex items-center gap-2", children: [
1686
+ /* @__PURE__ */ n(
1687
+ Ae,
1688
+ {
1689
+ variant: "outline",
1690
+ size: "sm",
1691
+ onClick: () => a.history.undo(),
1692
+ disabled: !s,
1693
+ children: /* @__PURE__ */ n(Cr, { className: "h-4 w-4" })
1694
+ }
1695
+ ),
1696
+ /* @__PURE__ */ n(
1697
+ Ae,
1698
+ {
1699
+ variant: "outline",
1700
+ size: "sm",
1701
+ onClick: () => a.history.redo(),
1702
+ disabled: !i,
1703
+ children: /* @__PURE__ */ n(yr, { className: "h-4 w-4" })
1704
+ }
1705
+ ),
1706
+ /* @__PURE__ */ M(Ae, { size: "sm", onClick: c, children: [
1707
+ /* @__PURE__ */ n(wr, { className: "h-4 w-4 mr-2" }),
1708
+ "Save"
1709
+ ] })
1710
+ ] })
1711
+ ] });
1712
+ }, ft = ({ children: e, className: t }) => {
1713
+ const {
1714
+ connectors: { connect: o, drag: a },
1715
+ selected: r
1716
+ } = Oe((s) => ({
1717
+ selected: s.events.selected
1718
+ }));
1719
+ return /* @__PURE__ */ n(
1720
+ "div",
1721
+ {
1722
+ ref: (s) => {
1723
+ s && o(a(s));
1724
+ },
1725
+ className: Ot("relative min-h-[100vh] bg-white", t || ""),
1726
+ children: e
1727
+ }
1728
+ );
1729
+ };
1730
+ ft.craft = {
1731
+ props: {},
1732
+ displayName: "Body",
1733
+ isCanvas: !0,
1734
+ rules: {
1735
+ canMoveIn: (e) => e.every(
1736
+ (t) => t.data.displayName !== "Body"
1737
+ )
1738
+ }
1739
+ };
1740
+ const Oa = ({ htmlJson: e }) => {
1741
+ const { actions: t } = we();
1742
+ return Uo(() => {
1743
+ e && t.deserialize(e);
1744
+ }, [e]), /* @__PURE__ */ n(cr, { children: /* @__PURE__ */ n(me, { id: "mainBody", is: ft, canvas: !0 }) });
1745
+ }, Mo = ({
1746
+ className: e,
1747
+ backgroundColor: t = "transparent",
1748
+ backgroundImage: o = "",
1749
+ backgroundSize: a = "cover",
1750
+ backgroundRepeat: r = "no-repeat",
1751
+ padding: s = { top: 16, right: 16, bottom: 16, left: 16 },
1752
+ margin: i = { top: 0, right: 0, bottom: 0, left: 0 },
1753
+ width: c = "auto",
1754
+ minHeight: d = 100,
1755
+ maxWidth: u = "none",
1756
+ display: f = "block",
1757
+ flexDirection: h = "column",
1758
+ justifyContent: g = "flex-start",
1759
+ alignItems: l = "stretch",
1760
+ gap: N = 0,
1761
+ borderRadius: v = 8,
1762
+ borderWidth: b = 1,
1763
+ borderColor: S = "transparent",
1764
+ borderStyle: C = "dashed",
1765
+ boxShadow: w = "none",
1766
+ children: T
1767
+ }) => {
1768
+ const {
1769
+ connectors: { connect: _, drag: R },
1770
+ selected: k
1771
+ } = Oe((V) => ({
1772
+ selected: V.events.selected
1773
+ })), D = typeof s == "object" ? `${s.top}px ${s.right}px ${s.bottom}px ${s.left}px` : `${s}px`, P = typeof i == "object" ? `${i.top}px ${i.right}px ${i.bottom}px ${i.left}px` : `${i}px`;
1774
+ return /* @__PURE__ */ n(
1775
+ "div",
1776
+ {
1777
+ style: {
1778
+ backgroundColor: t,
1779
+ backgroundImage: o ? `url(${o})` : "none",
1780
+ backgroundSize: a,
1781
+ backgroundRepeat: r,
1782
+ padding: D,
1783
+ margin: P,
1784
+ width: c === "auto" ? "100%" : c,
1785
+ minHeight: `${d}px`,
1786
+ maxWidth: u === "none" ? "none" : `${u}px`,
1787
+ display: f,
1788
+ flexDirection: f === "flex" ? h : void 0,
1789
+ justifyContent: f === "flex" ? g : void 0,
1790
+ alignItems: f === "flex" ? l : void 0,
1791
+ gap: f === "flex" ? `${N}px` : void 0,
1792
+ borderRadius: `${v}px`,
1793
+ borderWidth: `${b}px`,
1794
+ borderColor: S,
1795
+ borderStyle: C,
1796
+ boxShadow: w === "none" ? "none" : w
1797
+ },
1798
+ className: Ot(e, k ? "border border-blue-500" : ""),
1799
+ ref: (V) => {
1800
+ V && _(R(V));
1801
+ },
1802
+ children: T
1803
+ }
1804
+ );
1805
+ };
1806
+ Mo.craft = {
1807
+ isCanvas: !0,
1808
+ props: {
1809
+ ClassNames: "p-4",
1810
+ backgroundColor: "transparent",
1811
+ backgroundImage: "",
1812
+ backgroundSize: "cover",
1813
+ backgroundRepeat: "no-repeat",
1814
+ padding: { top: 16, right: 16, bottom: 16, left: 16 },
1815
+ margin: { top: 0, right: 0, bottom: 0, left: 0 },
1816
+ width: "auto",
1817
+ minHeight: 100,
1818
+ maxWidth: "none",
1819
+ display: "block",
1820
+ flexDirection: "column",
1821
+ justifyContent: "flex-start",
1822
+ alignItems: "stretch",
1823
+ gap: 0,
1824
+ borderRadius: 8,
1825
+ borderWidth: 1,
1826
+ borderColor: "transparent",
1827
+ borderStyle: "dashed",
1828
+ boxShadow: "none"
1829
+ },
1830
+ related: { settings: dr }
1831
+ };
1832
+ const $a = () => /* @__PURE__ */ M(
1833
+ "svg",
1834
+ {
1835
+ width: "150",
1836
+ height: "32",
1837
+ viewBox: "0 0 150 32",
1838
+ fill: "none",
1839
+ xmlns: "http://www.w3.org/2000/svg",
1840
+ children: [
1841
+ /* @__PURE__ */ n(
1842
+ "path",
1843
+ {
1844
+ d: "M0 17.0487C0.130379 19.0776 0.640458 21.0036 1.45704 22.7557V9.24658C0.640458 10.9987 0.130379 12.9246 0 14.9535V17.0487Z",
1845
+ fill: "white"
1846
+ }
1847
+ ),
1848
+ /* @__PURE__ */ n(
1849
+ "path",
1850
+ {
1851
+ d: "M5.90566 3.55387C5.48249 3.89468 5.07764 4.25837 4.69336 4.64036V6.33986C5.10508 6.55715 5.50766 6.76988 5.90566 6.97803V25.1967L4.69336 25.8692V27.3629C5.07764 27.7449 5.48249 28.1085 5.90566 28.4494C6.36999 28.8268 6.85719 29.179 7.3627 29.5015C7.75613 29.7531 8.1587 29.9865 8.575 30.2015V23.7191L7.3627 24.3916V7.75115C7.77671 7.97073 8.17928 8.18575 8.575 8.39847V1.80176C8.1587 2.01677 7.75613 2.25008 7.3627 2.50169C6.85719 2.8242 6.36999 3.17645 5.90566 3.55387Z",
1852
+ fill: "white"
1853
+ }
1854
+ ),
1855
+ /* @__PURE__ */ n(
1856
+ "path",
1857
+ {
1858
+ d: "M11.8415 0.529145C11.4321 0.636651 11.0295 0.762455 10.6338 0.90427V9.49326C11.0478 9.71514 11.4504 9.93243 11.8415 10.1429V21.9067L10.6338 22.5769V31.0973C11.0295 31.2391 11.4321 31.3649 11.8415 31.4724C12.3196 31.6005 12.8045 31.7057 13.2986 31.788C13.6989 31.8567 14.106 31.9093 14.5154 31.9459V20.4222L13.2986 21.097V10.9297C13.7194 11.1607 14.1243 11.3803 14.5154 11.5953V0.0556641C14.106 0.0922616 13.6989 0.144871 13.2986 0.213491C12.8045 0.295836 12.3196 0.401054 11.8415 0.529145Z",
1859
+ fill: "white"
1860
+ }
1861
+ ),
1862
+ /* @__PURE__ */ n(
1863
+ "path",
1864
+ {
1865
+ d: "M17.7688 0.0892066C17.3685 0.0434596 16.9636 0.0137241 16.5542 0V12.7199C16.9842 12.9601 17.3891 13.1866 17.7688 13.4039V18.6213L16.5542 19.2961V32C16.9636 31.9863 17.3685 31.9565 17.7688 31.9108C18.2606 31.8582 18.7455 31.7804 19.2235 31.6821C19.6353 31.5974 20.0401 31.4968 20.4381 31.3824V17.1414L19.2235 17.8162V14.2387C19.681 14.5086 20.0859 14.7511 20.4381 14.9661V0.617584C20.0401 0.503217 19.6353 0.402573 19.2235 0.317941C18.7455 0.219585 18.2606 0.141816 17.7688 0.0892066Z",
1866
+ fill: "white"
1867
+ }
1868
+ ),
1869
+ /* @__PURE__ */ n(
1870
+ "path",
1871
+ {
1872
+ d: "M22.4961 30.6299C23.9097 29.9986 25.2158 29.1683 26.3777 28.1733V3.82673C25.2158 2.83173 23.9097 2.00143 22.4961 1.37012V30.6299Z",
1873
+ fill: "white"
1874
+ }
1875
+ ),
1876
+ /* @__PURE__ */ n(
1877
+ "path",
1878
+ {
1879
+ d: "M28.4458 5.95459V26.0466C30.6622 23.2995 31.9889 19.8045 31.9889 16.0006C31.9889 12.1968 30.6622 8.70169 28.4458 5.95459Z",
1880
+ fill: "white"
1881
+ }
1882
+ ),
1883
+ /* @__PURE__ */ n(
1884
+ "path",
1885
+ {
1886
+ d: "M45.8017 16.0665C45.8017 15.131 45.5958 14.4585 45.1818 14.0445C44.7678 13.6305 44.2028 13.4246 43.4846 13.4246C42.8075 13.4246 42.2403 13.6579 41.7874 14.1268C41.3322 14.5934 41.1057 15.195 41.1057 15.9247V22.224H39.0723V11.8189H41.1057V13.3423C41.4717 12.7727 41.9315 12.3335 42.4873 12.0202C43.0431 11.7091 43.6127 11.5536 44.1937 11.5536C44.9668 11.5536 45.6461 11.7457 46.2363 12.1323C46.8264 12.5188 47.2564 13.0838 47.5264 13.8295C47.8649 13.0975 48.3498 12.5348 48.9788 12.1414C49.6078 11.748 50.2552 11.5513 50.9208 11.5513C51.9638 11.5513 52.8284 11.9012 53.5123 12.5989C54.1963 13.2965 54.5394 14.3098 54.5394 15.6365V22.2217H52.5265V16.0642C52.5265 15.1287 52.3207 14.4562 51.9066 14.0422C51.4926 13.6282 50.9276 13.4223 50.2094 13.4223C49.5324 13.4223 48.9628 13.6556 48.5031 14.1245C48.0433 14.5912 47.8123 15.1927 47.8123 15.9224V22.2217H45.7994V16.0642L45.8017 16.0665Z",
1887
+ fill: "white"
1888
+ }
1889
+ ),
1890
+ /* @__PURE__ */ n(
1891
+ "path",
1892
+ {
1893
+ d: "M55.2479 23.7876H56.65C57.1235 23.7876 57.4963 23.6961 57.7685 23.5131C58.0384 23.3301 58.2557 23.0144 58.4181 22.5684L58.6217 22.0194L54.6577 11.8179H56.7918L59.8203 19.9471L62.7664 11.8179H64.9417L60.8153 22.772C60.4356 23.815 59.9758 24.5538 59.4337 24.9861C58.8916 25.4207 58.1597 25.6357 57.2379 25.6357H55.2456V23.7853L55.2479 23.7876Z",
1894
+ fill: "white"
1895
+ }
1896
+ ),
1897
+ /* @__PURE__ */ n(
1898
+ "path",
1899
+ {
1900
+ d: "M70.5483 16.8981H67.6227V22.223H65.6099V8.68652H71.4632C72.3301 8.68652 73.0849 8.84893 73.73 9.17373C74.3727 9.49853 74.8714 9.956 75.2236 10.5461C75.5759 11.1363 75.752 11.8293 75.752 12.6299C75.752 13.4831 75.521 14.2082 75.0612 14.8052C74.6015 15.4022 73.9702 15.8208 73.1719 16.0655C73.8901 16.2142 74.4208 16.5207 74.7662 16.9804C75.1115 17.4402 75.338 18.1264 75.4478 19.0322L75.8138 22.223H73.8215L73.4761 19.2564C73.38 18.4306 73.1078 17.8313 72.6526 17.4585C72.1975 17.0857 71.4975 16.9004 70.5483 16.9004V16.8981ZM71.1773 10.4546H67.6205V15.13H71.1773C71.9756 15.13 72.6 14.931 73.0461 14.5307C73.4921 14.1304 73.7163 13.5654 73.7163 12.8335C73.7163 12.1015 73.4921 11.5068 73.0461 11.086C72.6 10.6651 71.9756 10.4569 71.1773 10.4569V10.4546Z",
1901
+ fill: "white"
1902
+ }
1903
+ ),
1904
+ /* @__PURE__ */ n(
1905
+ "path",
1906
+ {
1907
+ d: "M85.4621 15.392V22.2197H83.4286V20.4722C83.0626 21.0829 82.5709 21.5632 81.9556 21.9155C81.338 22.2677 80.6518 22.4439 79.8924 22.4439C79.2153 22.4439 78.6183 22.3112 78.1037 22.0482C77.589 21.7828 77.1819 21.4123 76.8845 20.9297C76.5871 20.4493 76.4385 19.9026 76.4385 19.2942C76.4385 18.4136 76.7038 17.7159 77.2322 17.2013C77.7606 16.6866 78.52 16.403 79.5081 16.3481L82.3124 16.1445C82.7195 16.1171 83.0055 16.0302 83.177 15.8792C83.3463 15.7305 83.4309 15.4995 83.4309 15.1884V15.1472C83.4309 14.5914 83.2067 14.1202 82.7607 13.7337C82.3147 13.3471 81.7657 13.155 81.1138 13.155C79.5973 13.155 78.7624 13.8046 78.6138 15.1061H76.5208C76.5894 14.0356 77.04 13.1778 77.8726 12.5351C78.7052 11.8923 79.7803 11.5698 81.0932 11.5698C81.9464 11.5698 82.7013 11.7322 83.36 12.057C84.0165 12.3818 84.5311 12.8324 84.904 13.4089C85.2768 13.9853 85.4621 14.6463 85.4621 15.3897V15.392ZM78.4902 19.2119C78.4902 19.6991 78.6755 20.0856 79.0483 20.3693C79.4212 20.6529 79.9244 20.797 80.5626 20.797C81.1047 20.797 81.5919 20.6712 82.0265 20.4219C82.4611 20.1703 82.8019 19.8294 83.0535 19.3948C83.3051 18.9602 83.4286 18.4662 83.4286 17.9104V17.565L80.2172 17.7685C79.0643 17.8509 78.4902 18.3312 78.4902 19.2119Z",
1908
+ fill: "white"
1909
+ }
1910
+ ),
1911
+ /* @__PURE__ */ n(
1912
+ "path",
1913
+ {
1914
+ d: "M86.3522 16.9783C86.3522 15.8804 86.5627 14.9266 86.9813 14.1123C87.4021 13.3003 87.9831 12.669 88.7288 12.2229C89.4745 11.7746 90.3482 11.5527 91.3501 11.5527C92.2582 11.5527 93.0633 11.7266 93.7679 12.072C94.4724 12.4174 95.0373 12.9046 95.4651 13.5359C95.8928 14.1649 96.1398 14.9151 96.2062 15.782H94.1338C94.1064 15.0089 93.8433 14.4096 93.3401 13.9842C92.8392 13.5565 92.1735 13.3437 91.3478 13.3437C90.4123 13.3437 89.6918 13.6617 89.184 14.2998C88.6762 14.938 88.4223 15.8324 88.4223 16.9829C88.4223 18.1334 88.6785 19.053 89.1954 19.6957C89.7101 20.3384 90.4283 20.661 91.3501 20.661C92.1621 20.661 92.8209 20.4642 93.3218 20.0708C93.8227 19.6774 94.0949 19.1216 94.1338 18.4033H96.2062C96.0849 19.6637 95.5817 20.6518 94.7011 21.37C93.8205 22.0883 92.7019 22.4474 91.3478 22.4474C90.3597 22.4474 89.4882 22.2209 88.7357 21.7657C87.9831 21.3129 87.3976 20.6747 86.9767 19.8558C86.5558 19.0369 86.3477 18.0785 86.3477 16.9806L86.3522 16.9783Z",
1915
+ fill: "white"
1916
+ }
1917
+ ),
1918
+ /* @__PURE__ */ n(
1919
+ "path",
1920
+ {
1921
+ d: "M96.8558 16.977C96.8558 15.8653 97.0594 14.9115 97.4665 14.1109C97.8737 13.3103 98.4455 12.695 99.1843 12.2604C99.9231 11.8259 100.799 11.6108 101.817 11.6108C102.835 11.6108 103.661 11.8373 104.418 12.2925C105.177 12.7477 105.77 13.3698 106.195 14.1612C106.621 14.9527 106.836 15.8584 106.836 16.874V17.503H98.9487C99.0974 19.6303 100.099 20.6939 101.957 20.6939C102.702 20.6939 103.297 20.5292 103.745 20.1953C104.191 19.8636 104.47 19.413 104.578 18.8434H106.712C106.266 21.2017 104.672 22.3797 101.936 22.3797C100.893 22.3797 99.9917 22.1601 99.2323 21.7186C98.4729 21.2795 97.8874 20.655 97.4734 19.8499C97.0594 19.0447 96.8535 18.0863 96.8535 16.9747L96.8558 16.977ZM101.835 13.196C100.154 13.196 99.2003 14.1384 98.9693 16.0208H104.681C104.612 15.1677 104.317 14.4837 103.796 13.9691C103.274 13.4544 102.62 13.196 101.835 13.196Z",
1922
+ fill: "white"
1923
+ }
1924
+ ),
1925
+ /* @__PURE__ */ n(
1926
+ "path",
1927
+ {
1928
+ d: "M112.664 16.8986H109.738V22.2235H107.725V8.68701H113.578C114.445 8.68701 115.2 8.84941 115.845 9.17422C116.488 9.49902 116.987 9.95649 117.339 10.5466C117.691 11.1368 117.867 11.8298 117.867 12.6304C117.867 13.4836 117.636 14.2087 117.176 14.8057C116.717 15.4027 116.085 15.8212 115.287 16.066C116.005 16.2147 116.536 16.5212 116.881 16.9809C117.227 17.4407 117.453 18.1269 117.563 19.0327L117.929 22.2235H115.937L115.591 19.2568C115.495 18.4311 115.223 17.8318 114.768 17.459C114.313 17.0862 113.613 16.9009 112.664 16.9009V16.8986ZM113.293 10.4551H109.736V15.1305H113.293C114.091 15.1305 114.715 14.9315 115.161 14.5312C115.607 14.1309 115.832 13.5659 115.832 12.834C115.832 12.102 115.607 11.5073 115.161 11.0864C114.715 10.6656 114.091 10.4574 113.293 10.4574V10.4551Z",
1929
+ fill: "white"
1930
+ }
1931
+ ),
1932
+ /* @__PURE__ */ n(
1933
+ "path",
1934
+ {
1935
+ d: "M118.35 16.977C118.35 15.8653 118.554 14.9115 118.961 14.1109C119.368 13.3103 119.94 12.695 120.678 12.2604C121.417 11.8259 122.293 11.6108 123.311 11.6108C124.329 11.6108 125.155 11.8373 125.912 12.2925C126.671 12.7477 127.264 13.3698 127.689 14.1612C128.115 14.9527 128.33 15.8584 128.33 16.874V17.503H120.443C120.592 19.6303 121.593 20.6939 123.451 20.6939C124.196 20.6939 124.791 20.5292 125.239 20.1953C125.685 19.8636 125.965 19.413 126.072 18.8434H128.206C127.76 21.2017 126.166 22.3797 123.43 22.3797C122.387 22.3797 121.486 22.1601 120.727 21.7186C119.967 21.2795 119.382 20.655 118.968 19.8499C118.554 19.0447 118.348 18.0863 118.348 16.9747L118.35 16.977ZM123.33 13.196C121.648 13.196 120.694 14.1384 120.463 16.0208H126.175C126.106 15.1677 125.811 14.4837 125.29 13.9691C124.768 13.4544 124.114 13.196 123.33 13.196Z",
1936
+ fill: "white"
1937
+ }
1938
+ ),
1939
+ /* @__PURE__ */ n(
1940
+ "path",
1941
+ {
1942
+ d: "M128.996 16.9774C128.996 15.8658 129.199 14.912 129.607 14.1114C130.014 13.3108 130.586 12.6955 131.324 12.2609C132.063 11.8263 132.939 11.6113 133.957 11.6113C134.975 11.6113 135.801 11.8378 136.558 12.293C137.317 12.7481 137.91 13.3703 138.335 14.1617C138.761 14.9531 138.976 15.8589 138.976 16.8745V17.5035H131.089C131.238 19.6308 132.239 20.6944 134.097 20.6944C134.842 20.6944 135.437 20.5297 135.885 20.1957C136.331 19.8641 136.611 19.4135 136.718 18.8439H138.852C138.406 21.2022 136.812 22.3802 134.076 22.3802C133.033 22.3802 132.132 22.1606 131.372 21.7191C130.613 21.2799 130.028 20.6555 129.614 19.8504C129.2 19.0452 128.994 18.0868 128.994 16.9752L128.996 16.9774ZM133.975 13.1965C132.294 13.1965 131.34 14.1388 131.109 16.0213H136.821C136.752 15.1682 136.457 14.4842 135.936 13.9696C135.414 13.4549 134.76 13.1965 133.975 13.1965Z",
1943
+ fill: "white"
1944
+ }
1945
+ ),
1946
+ /* @__PURE__ */ n("path", { d: "M139.844 7.6499H141.878V22.2226H139.844V7.6499Z", fill: "white" }),
1947
+ /* @__PURE__ */ n(
1948
+ "path",
1949
+ {
1950
+ d: "M146.299 4.79883V5.2014H145.464V7.65115H145.041V5.2014H144.21V4.79883H146.301H146.299Z",
1951
+ fill: "white"
1952
+ }
1953
+ ),
1954
+ /* @__PURE__ */ n(
1955
+ "path",
1956
+ {
1957
+ d: "M148.101 7.65115H147.708L146.864 5.39354V7.65115H146.44V4.79883H147.058L147.911 7.05644L148.742 4.79883H149.375V7.65115H148.952V5.39354L148.103 7.65115H148.101Z",
1958
+ fill: "white"
1959
+ }
1960
+ )
1961
+ ]
1962
+ }
1963
+ ), Do = ({
1964
+ background: e = "transparent",
1965
+ padding: t = { top: 16, right: 16, bottom: 16, left: 16 },
1966
+ margin: o = { top: 0, right: 0, bottom: 0, left: 0 },
1967
+ width: a = "auto",
1968
+ minHeight: r = 100,
1969
+ maxWidth: s = "none",
1970
+ display: i = "block",
1971
+ flexDirection: c = "column",
1972
+ justifyContent: d = "flex-start",
1973
+ alignItems: u = "stretch",
1974
+ gap: f = 0,
1975
+ borderRadius: h = 8,
1976
+ borderWidth: g = 1,
1977
+ borderColor: l = "transparent",
1978
+ borderStyle: N = "dashed",
1979
+ boxShadow: v = "none",
1980
+ children: b
1981
+ }) => {
1982
+ const {
1983
+ connectors: { connect: S, drag: C },
1984
+ isActive: w
1985
+ } = Oe((k) => ({
1986
+ isActive: k.events.selected
1987
+ })), T = typeof t == "object" ? `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px` : `${t}px`, _ = typeof o == "object" ? `${o.top}px ${o.right}px ${o.bottom}px ${o.left}px` : `${o}px`, R = [
1988
+ {
1989
+ url: "https://myracereel.com/privacy-data-privacy",
1990
+ name: "Privacy & Data Policy"
1991
+ },
1992
+ {
1993
+ url: "https://myracereel.com/terms-of-service",
1994
+ name: "Terms of Service"
1995
+ },
1996
+ { url: "https://myracereel.com/faq", name: "FAQ" },
1997
+ { url: "https://myracereel.com/contact", name: "Contact Us" }
1998
+ ];
1999
+ return /* @__PURE__ */ n(
2000
+ rt,
2001
+ {
2002
+ style: {
2003
+ backgroundColor: e,
2004
+ padding: T,
2005
+ margin: _,
2006
+ width: a === "auto" ? "100%" : a,
2007
+ minHeight: `${r}px`,
2008
+ maxWidth: s === "none" ? "none" : `${s}px`,
2009
+ display: i,
2010
+ flexDirection: i === "flex" ? c : void 0,
2011
+ justifyContent: i === "flex" ? d : void 0,
2012
+ alignItems: i === "flex" ? u : void 0,
2013
+ gap: i === "flex" ? `${f}px` : void 0,
2014
+ borderRadius: `${h}px`,
2015
+ borderWidth: `${g}px`,
2016
+ borderColor: l,
2017
+ borderStyle: N,
2018
+ boxShadow: v === "none" ? "none" : v
2019
+ },
2020
+ className: "bg-black",
2021
+ ref: (k) => k && S(C(k)),
2022
+ children: /* @__PURE__ */ n(Ee, { className: "flex justify-center w-full", children: /* @__PURE__ */ M("div", { className: "w-full flex flex-col py-10 gap-y-3.5 ", children: [
2023
+ /* @__PURE__ */ M("div", { className: "flex w-full gap-x-1 justify-center items-center", children: [
2024
+ /* @__PURE__ */ n("div", { className: "text-white text-sm", children: "Powered by" }),
2025
+ /* @__PURE__ */ n($a, {})
2026
+ ] }),
2027
+ /* @__PURE__ */ n("div", { className: "flex @md:flex-row @max-md:flex-col md:flex-row justify-center items-center gap-x-6 gap-y-2 w-full flex-col", children: R.map((k) => /* @__PURE__ */ n(
2028
+ "a",
2029
+ {
2030
+ className: "text-white",
2031
+ href: k.url,
2032
+ target: "_blank",
2033
+ children: k.name
2034
+ },
2035
+ k.name
2036
+ )) })
2037
+ ] }) })
2038
+ }
2039
+ );
2040
+ }, Fa = () => {
2041
+ const {
2042
+ actions: { setProp: e },
2043
+ props: t
2044
+ } = Oe((r) => ({
2045
+ props: r.data.props
2046
+ })), o = typeof t.padding == "object" ? t.padding : {
2047
+ top: t.padding || 16,
2048
+ right: t.padding || 16,
2049
+ bottom: t.padding || 16,
2050
+ left: t.padding || 16
2051
+ }, a = typeof t.margin == "object" ? t.margin : {
2052
+ top: t.margin || 0,
2053
+ right: t.margin || 0,
2054
+ bottom: t.margin || 0,
2055
+ left: t.margin || 0
2056
+ };
2057
+ return /* @__PURE__ */ M("div", { className: "space-y-3", children: [
2058
+ /* @__PURE__ */ M(Me, { title: "Layout", defaultOpen: !0, children: [
2059
+ /* @__PURE__ */ n(
2060
+ xt,
2061
+ {
2062
+ label: "Display",
2063
+ value: t.display || "block",
2064
+ options: [
2065
+ { value: "block", label: "Block" },
2066
+ { value: "flex", label: "Flex" }
2067
+ ],
2068
+ onChange: (r) => e((s) => s.display = r)
2069
+ }
2070
+ ),
2071
+ t.display === "flex" && /* @__PURE__ */ M(ot, { children: [
2072
+ /* @__PURE__ */ n(
2073
+ ur,
2074
+ {
2075
+ label: "Direction",
2076
+ value: t.flexDirection || "column",
2077
+ options: [
2078
+ { value: "row", label: "Row" },
2079
+ { value: "column", label: "Col" }
2080
+ ],
2081
+ onChange: (r) => e((s) => s.flexDirection = r)
2082
+ }
2083
+ ),
2084
+ /* @__PURE__ */ n(
2085
+ xt,
2086
+ {
2087
+ label: "Justify",
2088
+ value: t.justifyContent || "flex-start",
2089
+ options: [
2090
+ { value: "flex-start", label: "Start" },
2091
+ { value: "center", label: "Center" },
2092
+ { value: "flex-end", label: "End" },
2093
+ { value: "space-between", label: "Between" }
2094
+ ],
2095
+ onChange: (r) => e((s) => s.justifyContent = r)
2096
+ }
2097
+ ),
2098
+ /* @__PURE__ */ n(
2099
+ Ke,
2100
+ {
2101
+ label: "Gap",
2102
+ value: t.gap || 0,
2103
+ onChange: (r) => e((s) => s.gap = r),
2104
+ max: 64
2105
+ }
2106
+ )
2107
+ ] })
2108
+ ] }),
2109
+ /* @__PURE__ */ M(Me, { title: "Spacing", defaultOpen: !0, children: [
2110
+ /* @__PURE__ */ n(
2111
+ Ct,
2112
+ {
2113
+ label: "Padding",
2114
+ values: o,
2115
+ onChange: (r) => e((s) => s.padding = r)
2116
+ }
2117
+ ),
2118
+ /* @__PURE__ */ n(
2119
+ Ct,
2120
+ {
2121
+ label: "Margin",
2122
+ values: a,
2123
+ onChange: (r) => e((s) => s.margin = r)
2124
+ }
2125
+ )
2126
+ ] }),
2127
+ /* @__PURE__ */ n(Me, { title: "Background", defaultOpen: !1, children: /* @__PURE__ */ n(
2128
+ St,
2129
+ {
2130
+ label: "Color",
2131
+ value: t.background || "transparent",
2132
+ onChange: (r) => e((s) => s.background = r)
2133
+ }
2134
+ ) }),
2135
+ /* @__PURE__ */ M(Me, { title: "Border", defaultOpen: !1, children: [
2136
+ /* @__PURE__ */ n(
2137
+ Ke,
2138
+ {
2139
+ label: "Radius",
2140
+ value: t.borderRadius,
2141
+ onChange: (r) => e((s) => s.borderRadius = r),
2142
+ max: 50
2143
+ }
2144
+ ),
2145
+ /* @__PURE__ */ n(
2146
+ Ke,
2147
+ {
2148
+ label: "Width",
2149
+ value: t.borderWidth || 1,
2150
+ onChange: (r) => e((s) => s.borderWidth = r),
2151
+ max: 10
2152
+ }
2153
+ ),
2154
+ /* @__PURE__ */ n(
2155
+ St,
2156
+ {
2157
+ label: "Color",
2158
+ value: t.borderColor || "transparent",
2159
+ onChange: (r) => e((s) => s.borderColor = r)
2160
+ }
2161
+ )
2162
+ ] })
2163
+ ] });
2164
+ };
2165
+ Do.craft = {
2166
+ displayName: "Footer",
2167
+ props: {
2168
+ background: "transparent",
2169
+ padding: { top: 16, right: 16, bottom: 16, left: 16 },
2170
+ margin: { top: 0, right: 0, bottom: 0, left: 0 },
2171
+ width: "auto",
2172
+ minHeight: 100,
2173
+ maxWidth: "none",
2174
+ display: "block",
2175
+ flexDirection: "column",
2176
+ justifyContent: "flex-start",
2177
+ alignItems: "stretch",
2178
+ gap: 0,
2179
+ borderRadius: 8,
2180
+ borderWidth: 1,
2181
+ borderColor: "transparent",
2182
+ borderStyle: "dashed",
2183
+ boxShadow: "none"
2184
+ },
2185
+ related: { settings: Fa }
2186
+ };
2187
+ const Ua = ({ initialData: e, onSave: t, onStateChange: o }) => {
2188
+ var d;
2189
+ const a = fr(), [r, s] = Te("desktop"), i = ((d = Io[r]) == null ? void 0 : d.width) || "100%", c = (u) => {
2190
+ if (o)
2191
+ try {
2192
+ const f = u.serialize();
2193
+ o(f);
2194
+ } catch {
2195
+ }
2196
+ };
2197
+ return /* @__PURE__ */ n(
2198
+ pr,
2199
+ {
2200
+ resolver: {
2201
+ Body: ft,
2202
+ Div: Mo,
2203
+ Wrapper: rt,
2204
+ Section: Mt,
2205
+ Container: Ee,
2206
+ Text: At,
2207
+ ButtonComponent: Vt,
2208
+ Heading: Dt,
2209
+ Image: Ht,
2210
+ Img: mr,
2211
+ Divider: Bt,
2212
+ Spacer: zt,
2213
+ Video: _t,
2214
+ Columns: It,
2215
+ Link: Lt,
2216
+ Footer: Do
2217
+ },
2218
+ enabled: !0,
2219
+ onNodesChange: (u) => c(u),
2220
+ children: /* @__PURE__ */ n(hr, { value: r, children: /* @__PURE__ */ n(gr, { value: a, children: /* @__PURE__ */ M("div", { className: "flex flex-col h-full", children: [
2221
+ /* @__PURE__ */ M("div", { className: "flex items-center justify-between pb-4 border-b border-border", children: [
2222
+ /* @__PURE__ */ n("h2", { className: "text-lg font-semibold", children: "Page Builder" }),
2223
+ /* @__PURE__ */ n(
2224
+ za,
2225
+ {
2226
+ onSave: t,
2227
+ deviceSize: r,
2228
+ onDeviceSizeChange: s
2229
+ }
2230
+ )
2231
+ ] }),
2232
+ /* @__PURE__ */ M("div", { className: "flex gap-4 mt-4 flex-1 min-h-0", children: [
2233
+ /* @__PURE__ */ n(qe, { className: "w-56 shrink-0", children: /* @__PURE__ */ M(Qe, { className: "p-4 space-y-6", children: [
2234
+ /* @__PURE__ */ n(Er, {}),
2235
+ /* @__PURE__ */ n(Fr, {})
2236
+ ] }) }),
2237
+ /* @__PURE__ */ n(qe, { className: "flex-1 overflow-hidden bg-muted/30 flex flex-col", children: /* @__PURE__ */ n(Qe, { className: "p-4 flex-1 flex justify-center overflow-hidden", children: /* @__PURE__ */ n(ct, { className: "h-full w-full", children: /* @__PURE__ */ n("div", { className: "flex justify-center min-h-full", children: /* @__PURE__ */ n(
2238
+ "div",
2239
+ {
2240
+ className: "bg-white rounded-lg min-h-full p-4 border border-dashed border-border transition-all duration-300 shadow-sm",
2241
+ style: {
2242
+ width: typeof i == "number" ? `${i}px` : i,
2243
+ maxWidth: "100%"
2244
+ },
2245
+ children: /* @__PURE__ */ n(Oa, { htmlJson: e })
2246
+ }
2247
+ ) }) }) }) }),
2248
+ /* @__PURE__ */ n(qe, { className: "w-72 shrink-0 flex flex-col", children: /* @__PURE__ */ n(Qe, { className: "p-4 flex-1 overflow-hidden", children: /* @__PURE__ */ n(Or, {}) }) })
2249
+ ] })
2250
+ ] }) }) })
2251
+ }
2252
+ );
2253
+ };
2254
+ export {
2255
+ Ua as default
2256
+ };