@tech_carthagos/page-builder 1.0.6 → 1.0.7

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.
@@ -1,7 +1,7 @@
1
- import { jsxs as O, jsx as l, Fragment as wt } from "react/jsx-runtime";
1
+ import { jsxs as O, jsx as l, Fragment as xt } from "react/jsx-runtime";
2
2
  import * as h from "react";
3
3
  import m, { useState as Ee, forwardRef as _r, isValidElement as We } from "react";
4
- import { c as W, P as ye, B as Ie, L as xt, F as Lr, k as Ce, C as Ae, a as St, H as Ct, T as Et, b as Tt, d as Nt, I as Rt, V as Pt, D as kt, S as It, u as oe, e as Le, f as te, g as ze, h as $, i as ie, j as zr, l as Te, m as Or, n as Br, o as Fr, p as Hr, q as Oe, r as Vr, s as Gr, M as jr, t as Yr, v as $r, w as Wr, x as Ur, y as Xr, z as Kr, N as qr, A as Jr, E as Zr, G as Qr, J as eo, K as to, O as ro, Q as Ue, R as Xe } from "./index-DgSXmqG8.js";
4
+ import { c as W, P as ye, B as Ie, L as St, F as Lr, k as Ce, C as Ae, a as Ct, H as Et, T as Tt, b as Nt, d as Rt, I as Pt, V as kt, D as It, S as At, u as oe, e as Le, f as te, g as ze, h as $, i as ie, j as zr, l as Te, m as Or, n as Br, o as Fr, p as Hr, q as Oe, r as Vr, s as Gr, M as jr, t as Yr, v as $r, w as Wr, x as Ur, y as Xr, z as Kr, N as qr, A as Jr, E as Zr, G as Qr, J as eo, K as to, O as ro, Q as Ue, R as Xe } from "./index-jbzHXFSB.js";
5
5
  import oo from "react-dom";
6
6
  /**
7
7
  * @license lucide-react v0.462.0 - ISC
@@ -9,7 +9,7 @@ import oo from "react-dom";
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
11
  */
12
- const At = W("Columns2", [
12
+ const Dt = W("Columns2", [
13
13
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
14
14
  ["path", { d: "M12 3v18", key: "108xh3" }]
15
15
  ]);
@@ -33,7 +33,7 @@ const no = W("GripVertical", [
33
33
  * This source code is licensed under the ISC license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
35
  */
36
- const Dt = W("Heading", [
36
+ const Mt = W("Heading", [
37
37
  ["path", { d: "M6 12h12", key: "8npq4p" }],
38
38
  ["path", { d: "M6 20V4", key: "1w1bmo" }],
39
39
  ["path", { d: "M18 20V4", key: "o2hl4u" }]
@@ -44,7 +44,7 @@ const Dt = W("Heading", [
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
46
  */
47
- const Mt = W("Image", [
47
+ const _t = W("Image", [
48
48
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
49
49
  ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
50
50
  ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
@@ -55,14 +55,14 @@ const Mt = W("Image", [
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
57
  */
58
- const _t = W("Minus", [["path", { d: "M5 12h14", key: "1ays0h" }]]);
58
+ const Lt = W("Minus", [["path", { d: "M5 12h14", key: "1ays0h" }]]);
59
59
  /**
60
60
  * @license lucide-react v0.462.0 - ISC
61
61
  *
62
62
  * This source code is licensed under the ISC license.
63
63
  * See the LICENSE file in the root directory of this source tree.
64
64
  */
65
- const Lt = W("MousePointer", [
65
+ const zt = W("MousePointer", [
66
66
  ["path", { d: "M12.586 12.586 19 19", key: "ea5xo7" }],
67
67
  [
68
68
  "path",
@@ -78,7 +78,7 @@ const Lt = W("MousePointer", [
78
78
  * This source code is licensed under the ISC license.
79
79
  * See the LICENSE file in the root directory of this source tree.
80
80
  */
81
- const zt = W("MoveVertical", [
81
+ const Ot = W("MoveVertical", [
82
82
  ["path", { d: "M12 2v20", key: "t6zp3m" }],
83
83
  ["path", { d: "m8 18 4 4 4-4", key: "bh5tu3" }],
84
84
  ["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }]
@@ -138,7 +138,7 @@ const lo = W("Trash2", [
138
138
  * This source code is licensed under the ISC license.
139
139
  * See the LICENSE file in the root directory of this source tree.
140
140
  */
141
- const Ot = W("Type", [
141
+ const Bt = W("Type", [
142
142
  ["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
143
143
  ["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
144
144
  ["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
@@ -177,8 +177,8 @@ const co = W("Video", [
177
177
  },
178
178
  {
179
179
  name: "Columns",
180
- icon: At,
181
- element: /* @__PURE__ */ O(Ce, { is: St, canvas: !0, children: [
180
+ icon: Dt,
181
+ element: /* @__PURE__ */ O(Ce, { is: Ct, canvas: !0, children: [
182
182
  /* @__PURE__ */ l(Ce, { is: Ae, canvas: !0 }),
183
183
  /* @__PURE__ */ l(Ce, { is: Ae, canvas: !0 })
184
184
  ] })
@@ -186,45 +186,45 @@ const co = W("Video", [
186
186
  ], r = [
187
187
  {
188
188
  name: "Heading",
189
- icon: Dt,
190
- element: /* @__PURE__ */ l(Ct, {})
189
+ icon: Mt,
190
+ element: /* @__PURE__ */ l(Et, {})
191
191
  },
192
192
  {
193
193
  name: "Text",
194
- icon: Ot,
195
- element: /* @__PURE__ */ l(Et, {})
194
+ icon: Bt,
195
+ element: /* @__PURE__ */ l(Tt, {})
196
196
  },
197
197
  {
198
198
  name: "Button",
199
- icon: Lt,
200
- element: /* @__PURE__ */ l(Tt, {})
199
+ icon: zt,
200
+ element: /* @__PURE__ */ l(Nt, {})
201
201
  },
202
202
  {
203
203
  name: "Link",
204
- icon: xt,
205
- element: /* @__PURE__ */ l(Nt, {})
204
+ icon: St,
205
+ element: /* @__PURE__ */ l(Rt, {})
206
206
  }
207
207
  ], o = [
208
208
  {
209
209
  name: "Image",
210
- icon: Mt,
211
- element: /* @__PURE__ */ l(Rt, {})
210
+ icon: _t,
211
+ element: /* @__PURE__ */ l(Pt, {})
212
212
  },
213
213
  {
214
214
  name: "Video",
215
215
  icon: Lr,
216
- element: /* @__PURE__ */ l(Pt, {})
216
+ element: /* @__PURE__ */ l(kt, {})
217
217
  }
218
218
  ], n = [
219
219
  {
220
220
  name: "Divider",
221
- icon: _t,
222
- element: /* @__PURE__ */ l(kt, {})
221
+ icon: Lt,
222
+ element: /* @__PURE__ */ l(It, {})
223
223
  },
224
224
  {
225
225
  name: "Spacer",
226
- icon: zt,
227
- element: /* @__PURE__ */ l(It, {})
226
+ icon: Ot,
227
+ element: /* @__PURE__ */ l(At, {})
228
228
  }
229
229
  ], s = (i, d) => /* @__PURE__ */ O("div", { className: "space-y-2", children: [
230
230
  /* @__PURE__ */ l("span", { className: "text-xs text-muted-foreground/70", children: i }),
@@ -262,7 +262,7 @@ function mo(e, [t, r]) {
262
262
  function ho(e, t) {
263
263
  return h.useReducer((r, o) => t[r][o] ?? r, e);
264
264
  }
265
- var et = "ScrollArea", [Bt] = Le(et), [po, K] = Bt(et), Ft = h.forwardRef(
265
+ var et = "ScrollArea", [Ft] = Le(et), [po, K] = Ft(et), Ht = h.forwardRef(
266
266
  (e, t) => {
267
267
  const {
268
268
  __scopeScrollArea: r,
@@ -312,11 +312,11 @@ var et = "ScrollArea", [Bt] = Le(et), [po, K] = Bt(et), Ft = h.forwardRef(
312
312
  );
313
313
  }
314
314
  );
315
- Ft.displayName = et;
316
- var Ht = "ScrollAreaViewport", Vt = h.forwardRef(
315
+ Ht.displayName = et;
316
+ var Vt = "ScrollAreaViewport", Gt = h.forwardRef(
317
317
  (e, t) => {
318
- const { __scopeScrollArea: r, children: o, nonce: n, ...s } = e, i = K(Ht, r), d = h.useRef(null), c = oe(t, d, i.onViewportChange);
319
- return /* @__PURE__ */ O(wt, { children: [
318
+ const { __scopeScrollArea: r, children: o, nonce: n, ...s } = e, i = K(Vt, r), d = h.useRef(null), c = oe(t, d, i.onViewportChange);
319
+ return /* @__PURE__ */ O(xt, { children: [
320
320
  /* @__PURE__ */ l(
321
321
  "style",
322
322
  {
@@ -354,13 +354,13 @@ var Ht = "ScrollAreaViewport", Vt = h.forwardRef(
354
354
  ] });
355
355
  }
356
356
  );
357
- Vt.displayName = Ht;
357
+ Gt.displayName = Vt;
358
358
  var re = "ScrollAreaScrollbar", tt = h.forwardRef(
359
359
  (e, t) => {
360
360
  const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = n, d = e.orientation === "horizontal";
361
361
  return h.useEffect(() => (d ? s(!0) : i(!0), () => {
362
362
  d ? s(!1) : i(!1);
363
- }), [d, s, i]), n.type === "hover" ? /* @__PURE__ */ l(go, { ...o, ref: t, forceMount: r }) : n.type === "scroll" ? /* @__PURE__ */ l(vo, { ...o, ref: t, forceMount: r }) : n.type === "auto" ? /* @__PURE__ */ l(Gt, { ...o, ref: t, forceMount: r }) : n.type === "always" ? /* @__PURE__ */ l(rt, { ...o, ref: t }) : null;
363
+ }), [d, s, i]), n.type === "hover" ? /* @__PURE__ */ l(go, { ...o, ref: t, forceMount: r }) : n.type === "scroll" ? /* @__PURE__ */ l(vo, { ...o, ref: t, forceMount: r }) : n.type === "auto" ? /* @__PURE__ */ l(jt, { ...o, ref: t, forceMount: r }) : n.type === "always" ? /* @__PURE__ */ l(rt, { ...o, ref: t }) : null;
364
364
  }
365
365
  );
366
366
  tt.displayName = re;
@@ -380,7 +380,7 @@ var go = h.forwardRef((e, t) => {
380
380
  };
381
381
  }
382
382
  }, [n.scrollArea, n.scrollHideDelay]), /* @__PURE__ */ l(ze, { present: r || s, children: /* @__PURE__ */ l(
383
- Gt,
383
+ jt,
384
384
  {
385
385
  "data-state": s ? "visible" : "hidden",
386
386
  ...o,
@@ -431,7 +431,7 @@ var go = h.forwardRef((e, t) => {
431
431
  onPointerLeave: $(e.onPointerLeave, () => c("POINTER_LEAVE"))
432
432
  }
433
433
  ) });
434
- }), Gt = h.forwardRef((e, t) => {
434
+ }), jt = h.forwardRef((e, t) => {
435
435
  const r = K(re, e.__scopeScrollArea), { forceMount: o, ...n } = e, [s, i] = h.useState(!1), d = e.orientation === "horizontal", c = Fe(() => {
436
436
  if (r.viewport) {
437
437
  const u = r.viewport.offsetWidth < r.viewport.scrollWidth, f = r.viewport.offsetHeight < r.viewport.scrollHeight;
@@ -451,7 +451,7 @@ var go = h.forwardRef((e, t) => {
451
451
  content: 0,
452
452
  viewport: 0,
453
453
  scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
454
- }), u = Ut(d.viewport, d.content), f = {
454
+ }), u = Xt(d.viewport, d.content), f = {
455
455
  ...o,
456
456
  sizes: d,
457
457
  onSizesChange: c,
@@ -470,7 +470,7 @@ var go = h.forwardRef((e, t) => {
470
470
  ref: t,
471
471
  onThumbPositionChange: () => {
472
472
  if (n.viewport && s.current) {
473
- const g = n.viewport.scrollLeft, a = pt(g, d, n.dir);
473
+ const g = n.viewport.scrollLeft, a = gt(g, d, n.dir);
474
474
  s.current.style.transform = `translate3d(${a}px, 0, 0)`;
475
475
  }
476
476
  },
@@ -488,7 +488,7 @@ var go = h.forwardRef((e, t) => {
488
488
  ref: t,
489
489
  onThumbPositionChange: () => {
490
490
  if (n.viewport && s.current) {
491
- const g = n.viewport.scrollTop, a = pt(g, d);
491
+ const g = n.viewport.scrollTop, a = gt(g, d);
492
492
  s.current.style.transform = `translate3d(0, ${a}px, 0)`;
493
493
  }
494
494
  },
@@ -505,7 +505,7 @@ var go = h.forwardRef((e, t) => {
505
505
  return h.useEffect(() => {
506
506
  c.current && d(getComputedStyle(c.current));
507
507
  }, [c]), /* @__PURE__ */ l(
508
- Yt,
508
+ $t,
509
509
  {
510
510
  "data-orientation": "horizontal",
511
511
  ...n,
@@ -523,7 +523,7 @@ var go = h.forwardRef((e, t) => {
523
523
  onWheelScroll: (f, p) => {
524
524
  if (s.viewport) {
525
525
  const g = s.viewport.scrollLeft + f.deltaX;
526
- e.onWheelScroll(g), Kt(g, p) && f.preventDefault();
526
+ e.onWheelScroll(g), qt(g, p) && f.preventDefault();
527
527
  }
528
528
  },
529
529
  onResize: () => {
@@ -544,7 +544,7 @@ var go = h.forwardRef((e, t) => {
544
544
  return h.useEffect(() => {
545
545
  c.current && d(getComputedStyle(c.current));
546
546
  }, [c]), /* @__PURE__ */ l(
547
- Yt,
547
+ $t,
548
548
  {
549
549
  "data-orientation": "vertical",
550
550
  ...n,
@@ -563,7 +563,7 @@ var go = h.forwardRef((e, t) => {
563
563
  onWheelScroll: (f, p) => {
564
564
  if (s.viewport) {
565
565
  const g = s.viewport.scrollTop + f.deltaY;
566
- e.onWheelScroll(g), Kt(g, p) && f.preventDefault();
566
+ e.onWheelScroll(g), qt(g, p) && f.preventDefault();
567
567
  }
568
568
  },
569
569
  onResize: () => {
@@ -579,7 +579,7 @@ var go = h.forwardRef((e, t) => {
579
579
  }
580
580
  }
581
581
  );
582
- }), [wo, jt] = Bt(re), Yt = h.forwardRef((e, t) => {
582
+ }), [wo, Yt] = Ft(re), $t = h.forwardRef((e, t) => {
583
583
  const {
584
584
  __scopeScrollArea: r,
585
585
  sizes: o,
@@ -633,14 +633,14 @@ var go = h.forwardRef((e, t) => {
633
633
  )
634
634
  }
635
635
  );
636
- }), De = "ScrollAreaThumb", $t = h.forwardRef(
636
+ }), De = "ScrollAreaThumb", Wt = h.forwardRef(
637
637
  (e, t) => {
638
- const { forceMount: r, ...o } = e, n = jt(De, e.__scopeScrollArea);
638
+ const { forceMount: r, ...o } = e, n = Yt(De, e.__scopeScrollArea);
639
639
  return /* @__PURE__ */ l(ze, { present: r || n.hasThumb, children: /* @__PURE__ */ l(xo, { ref: t, ...o }) });
640
640
  }
641
641
  ), xo = h.forwardRef(
642
642
  (e, t) => {
643
- const { __scopeScrollArea: r, style: o, ...n } = e, s = K(De, r), i = jt(De, r), { onThumbPositionChange: d } = i, c = oe(
643
+ const { __scopeScrollArea: r, style: o, ...n } = e, s = K(De, r), i = Yt(De, r), { onThumbPositionChange: d } = i, c = oe(
644
644
  t,
645
645
  (p) => i.onThumbChange(p)
646
646
  ), u = h.useRef(void 0), f = Fe(() => {
@@ -677,14 +677,14 @@ var go = h.forwardRef((e, t) => {
677
677
  );
678
678
  }
679
679
  );
680
- $t.displayName = De;
681
- var ot = "ScrollAreaCorner", Wt = h.forwardRef(
680
+ Wt.displayName = De;
681
+ var ot = "ScrollAreaCorner", Ut = h.forwardRef(
682
682
  (e, t) => {
683
683
  const r = K(ot, e.__scopeScrollArea), o = !!(r.scrollbarX && r.scrollbarY);
684
684
  return r.type !== "scroll" && o ? /* @__PURE__ */ l(So, { ...e, ref: t }) : null;
685
685
  }
686
686
  );
687
- Wt.displayName = ot;
687
+ Ut.displayName = ot;
688
688
  var So = h.forwardRef((e, t) => {
689
689
  const { __scopeScrollArea: r, ...o } = e, n = K(ot, r), [s, i] = h.useState(0), [d, c] = h.useState(0), u = !!(s && d);
690
690
  return be(n.scrollbarX, () => {
@@ -715,30 +715,30 @@ var So = h.forwardRef((e, t) => {
715
715
  function Me(e) {
716
716
  return e ? parseInt(e, 10) : 0;
717
717
  }
718
- function Ut(e, t) {
718
+ function Xt(e, t) {
719
719
  const r = e / t;
720
720
  return isNaN(r) ? 0 : r;
721
721
  }
722
722
  function Be(e) {
723
- const t = Ut(e.viewport, e.content), r = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = (e.scrollbar.size - r) * t;
723
+ const t = Xt(e.viewport, e.content), r = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = (e.scrollbar.size - r) * t;
724
724
  return Math.max(o, 18);
725
725
  }
726
726
  function Co(e, t, r, o = "ltr") {
727
727
  const n = Be(r), s = n / 2, i = t || s, d = n - i, c = r.scrollbar.paddingStart + i, u = r.scrollbar.size - r.scrollbar.paddingEnd - d, f = r.content - r.viewport, p = o === "ltr" ? [0, f] : [f * -1, 0];
728
- return Xt([c, u], p)(e);
728
+ return Kt([c, u], p)(e);
729
729
  }
730
- function pt(e, t, r = "ltr") {
730
+ function gt(e, t, r = "ltr") {
731
731
  const o = Be(t), n = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, s = t.scrollbar.size - n, i = t.content - t.viewport, d = s - o, c = r === "ltr" ? [0, i] : [i * -1, 0], u = mo(e, c);
732
- return Xt([0, i], [0, d])(u);
732
+ return Kt([0, i], [0, d])(u);
733
733
  }
734
- function Xt(e, t) {
734
+ function Kt(e, t) {
735
735
  return (r) => {
736
736
  if (e[0] === e[1] || t[0] === t[1]) return t[0];
737
737
  const o = (t[1] - t[0]) / (e[1] - e[0]);
738
738
  return t[0] + o * (r - e[0]);
739
739
  };
740
740
  }
741
- function Kt(e, t) {
741
+ function qt(e, t) {
742
742
  return e > 0 && e < t;
743
743
  }
744
744
  var Eo = (e, t = () => {
@@ -769,14 +769,14 @@ function be(e, t) {
769
769
  }
770
770
  }, [e, r]);
771
771
  }
772
- var qt = Ft, To = Vt, No = Wt;
773
- const nt = h.forwardRef(({ className: e, children: t, ...r }, o) => /* @__PURE__ */ O(qt, { ref: o, className: Te("relative overflow-hidden", e), ...r, children: [
772
+ var Jt = Ht, To = Gt, No = Ut;
773
+ const nt = h.forwardRef(({ className: e, children: t, ...r }, o) => /* @__PURE__ */ O(Jt, { ref: o, className: Te("relative overflow-hidden", e), ...r, children: [
774
774
  /* @__PURE__ */ l(To, { className: "h-full w-full rounded-[inherit]", children: t }),
775
- /* @__PURE__ */ l(Jt, {}),
775
+ /* @__PURE__ */ l(Zt, {}),
776
776
  /* @__PURE__ */ l(No, {})
777
777
  ] }));
778
- nt.displayName = qt.displayName;
779
- const Jt = h.forwardRef(({ className: e, orientation: t = "vertical", ...r }, o) => /* @__PURE__ */ l(
778
+ nt.displayName = Jt.displayName;
779
+ const Zt = h.forwardRef(({ className: e, orientation: t = "vertical", ...r }, o) => /* @__PURE__ */ l(
780
780
  tt,
781
781
  {
782
782
  ref: o,
@@ -788,10 +788,10 @@ const Jt = h.forwardRef(({ className: e, orientation: t = "vertical", ...r }, o)
788
788
  e
789
789
  ),
790
790
  ...r,
791
- children: /* @__PURE__ */ l($t, { className: "relative flex-1 rounded-full bg-border" })
791
+ children: /* @__PURE__ */ l(Wt, { className: "relative flex-1 rounded-full bg-border" })
792
792
  }
793
793
  ));
794
- Jt.displayName = tt.displayName;
794
+ Zt.displayName = tt.displayName;
795
795
  const Ro = () => {
796
796
  const { selected: e, actions: t } = ye((r) => {
797
797
  var s, i, d, c, u, f, p;
@@ -804,7 +804,7 @@ const Ro = () => {
804
804
  isDeletable: ((p = r.nodes[o]) == null ? void 0 : p.id) !== "ROOT"
805
805
  }), { selected: n };
806
806
  });
807
- return /* @__PURE__ */ l("div", { className: "h-full flex flex-col", children: e ? /* @__PURE__ */ O(wt, { children: [
807
+ return /* @__PURE__ */ l("div", { className: "h-full flex flex-col", children: e ? /* @__PURE__ */ O(xt, { children: [
808
808
  /* @__PURE__ */ O("div", { className: "flex items-center justify-between pb-3 border-b border-border mb-3", children: [
809
809
  /* @__PURE__ */ O("div", { children: [
810
810
  /* @__PURE__ */ l("span", { className: "text-xs text-muted-foreground", children: "Selected" }),
@@ -827,27 +827,27 @@ const Ro = () => {
827
827
  case "Container":
828
828
  return qe;
829
829
  case "Text":
830
- return Ot;
830
+ return Bt;
831
831
  case "Heading":
832
- return Dt;
832
+ return Mt;
833
833
  case "Button":
834
- return Lt;
834
+ return zt;
835
835
  case "Image":
836
- return Mt;
837
- case "Divider":
838
836
  return _t;
837
+ case "Divider":
838
+ return Lt;
839
839
  case "Spacer":
840
- return zt;
840
+ return Ot;
841
841
  case "Video":
842
842
  return co;
843
843
  case "Columns":
844
- return At;
844
+ return Dt;
845
845
  case "Link":
846
- return xt;
846
+ return St;
847
847
  default:
848
848
  return qe;
849
849
  }
850
- }, Zt = ({ nodeId: e, depth: t = 0, onDragStart: r, onDragOver: o, onDrop: n, draggedId: s }) => {
850
+ }, Qt = ({ nodeId: e, depth: t = 0, onDragStart: r, onDragOver: o, onDrop: n, draggedId: s }) => {
851
851
  const { node: i, actions: d, selectedNodeId: c, childNodes: u, parentId: f } = ye((S, de) => {
852
852
  var ue, w;
853
853
  const G = S.nodes[e], ne = ((ue = G == null ? void 0 : G.data) == null ? void 0 : ue.nodes) || [], V = S.events.selected ? Array.from(S.events.selected)[0] : null, q = (w = G == null ? void 0 : G.data) == null ? void 0 : w.parent;
@@ -897,7 +897,7 @@ const Ro = () => {
897
897
  }
898
898
  ),
899
899
  v && p && /* @__PURE__ */ l("div", { children: u.map((S) => /* @__PURE__ */ l(
900
- Zt,
900
+ Qt,
901
901
  {
902
902
  nodeId: S,
903
903
  depth: t + 1,
@@ -928,7 +928,7 @@ const Ro = () => {
928
928
  }, children: [
929
929
  /* @__PURE__ */ l("h3", { className: "text-sm font-medium text-muted-foreground", children: "Layers" }),
930
930
  /* @__PURE__ */ l("div", { className: "border border-border rounded-lg p-2 max-h-[250px] overflow-y-auto bg-background", children: n.includes("ROOT") && /* @__PURE__ */ l(
931
- Zt,
931
+ Qt,
932
932
  {
933
933
  nodeId: "ROOT",
934
934
  onDragStart: i,
@@ -940,7 +940,7 @@ const Ro = () => {
940
940
  ] });
941
941
  };
942
942
  // @__NO_SIDE_EFFECTS__
943
- function gt(e) {
943
+ function vt(e) {
944
944
  const t = /* @__PURE__ */ Io(e), r = h.forwardRef((o, n) => {
945
945
  const { children: s, ...i } = o, d = h.Children.toArray(s), c = d.find(Do);
946
946
  if (c) {
@@ -992,14 +992,14 @@ function Lo(e) {
992
992
  return /* @__PURE__ */ l(n, { scope: v, itemMap: x, collectionRef: C, children: E });
993
993
  };
994
994
  i.displayName = t;
995
- const d = e + "CollectionSlot", c = /* @__PURE__ */ gt(d), u = m.forwardRef(
995
+ const d = e + "CollectionSlot", c = /* @__PURE__ */ vt(d), u = m.forwardRef(
996
996
  (b, v) => {
997
997
  const { scope: E, children: C } = b, x = s(d, E), R = oe(v, x.collectionRef);
998
998
  return /* @__PURE__ */ l(c, { ref: R, children: C });
999
999
  }
1000
1000
  );
1001
1001
  u.displayName = d;
1002
- const f = e + "CollectionItemSlot", p = "data-radix-collection-item", g = /* @__PURE__ */ gt(f), a = m.forwardRef(
1002
+ const f = e + "CollectionItemSlot", p = "data-radix-collection-item", g = /* @__PURE__ */ vt(f), a = m.forwardRef(
1003
1003
  (b, v) => {
1004
1004
  const { scope: E, children: C, ...x } = b, R = m.useRef(null), B = oe(v, R), I = s(f, E);
1005
1005
  return m.useEffect(() => (I.itemMap.set(R, { ref: R, ...x }), () => void I.itemMap.delete(R))), /* @__PURE__ */ l(g, { [p]: "", ref: B, children: C });
@@ -1023,13 +1023,13 @@ function Lo(e) {
1023
1023
  o
1024
1024
  ];
1025
1025
  }
1026
- var Ke = "rovingFocusGroup.onEntryFocus", zo = { bubbles: !1, cancelable: !0 }, Ne = "RovingFocusGroup", [Je, Qt, Oo] = Lo(Ne), [Bo, er] = Le(
1026
+ var Ke = "rovingFocusGroup.onEntryFocus", zo = { bubbles: !1, cancelable: !0 }, Ne = "RovingFocusGroup", [Je, er, Oo] = Lo(Ne), [Bo, tr] = Le(
1027
1027
  Ne,
1028
1028
  [Oo]
1029
- ), [Fo, Ho] = Bo(Ne), tr = h.forwardRef(
1029
+ ), [Fo, Ho] = Bo(Ne), rr = h.forwardRef(
1030
1030
  (e, t) => /* @__PURE__ */ l(Je.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(Je.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(Vo, { ...e, ref: t }) }) })
1031
1031
  );
1032
- tr.displayName = Ne;
1032
+ rr.displayName = Ne;
1033
1033
  var Vo = h.forwardRef((e, t) => {
1034
1034
  const {
1035
1035
  __scopeRovingFocusGroup: r,
@@ -1047,7 +1047,7 @@ var Vo = h.forwardRef((e, t) => {
1047
1047
  defaultProp: d ?? null,
1048
1048
  onChange: c,
1049
1049
  caller: Ne
1050
- }), [E, C] = h.useState(!1), x = ie(u), R = Qt(r), B = h.useRef(!1), [I, F] = h.useState(0);
1050
+ }), [E, C] = h.useState(!1), x = ie(u), R = er(r), B = h.useRef(!1), [I, F] = h.useState(0);
1051
1051
  return h.useEffect(() => {
1052
1052
  const A = g.current;
1053
1053
  if (A)
@@ -1092,7 +1092,7 @@ var Vo = h.forwardRef((e, t) => {
1092
1092
  const H = R().filter((V) => V.focusable), S = H.find((V) => V.active), de = H.find((V) => V.id === b), ne = [S, de, ...H].filter(
1093
1093
  Boolean
1094
1094
  ).map((V) => V.ref.current);
1095
- nr(ne, f);
1095
+ ar(ne, f);
1096
1096
  }
1097
1097
  }
1098
1098
  B.current = !1;
@@ -1102,7 +1102,7 @@ var Vo = h.forwardRef((e, t) => {
1102
1102
  )
1103
1103
  }
1104
1104
  );
1105
- }), rr = "RovingFocusGroupItem", or = h.forwardRef(
1105
+ }), or = "RovingFocusGroupItem", nr = h.forwardRef(
1106
1106
  (e, t) => {
1107
1107
  const {
1108
1108
  __scopeRovingFocusGroup: r,
@@ -1111,7 +1111,7 @@ var Vo = h.forwardRef((e, t) => {
1111
1111
  tabStopId: s,
1112
1112
  children: i,
1113
1113
  ...d
1114
- } = e, c = Hr(), u = s || c, f = Ho(rr, r), p = f.currentTabStopId === u, g = Qt(r), { onFocusableItemAdd: a, onFocusableItemRemove: N, currentTabStopId: b } = f;
1114
+ } = e, c = Hr(), u = s || c, f = Ho(or, r), p = f.currentTabStopId === u, g = er(r), { onFocusableItemAdd: a, onFocusableItemRemove: N, currentTabStopId: b } = f;
1115
1115
  return h.useEffect(() => {
1116
1116
  if (o)
1117
1117
  return a(), () => N();
@@ -1150,7 +1150,7 @@ var Vo = h.forwardRef((e, t) => {
1150
1150
  const R = x.indexOf(v.currentTarget);
1151
1151
  x = f.loop ? $o(x, R + 1) : x.slice(R + 1);
1152
1152
  }
1153
- setTimeout(() => nr(x));
1153
+ setTimeout(() => ar(x));
1154
1154
  }
1155
1155
  }),
1156
1156
  children: typeof i == "function" ? i({ isCurrentTabStop: p, hasTabStop: b != null }) : i
@@ -1160,7 +1160,7 @@ var Vo = h.forwardRef((e, t) => {
1160
1160
  );
1161
1161
  }
1162
1162
  );
1163
- or.displayName = rr;
1163
+ nr.displayName = or;
1164
1164
  var Go = {
1165
1165
  ArrowLeft: "prev",
1166
1166
  ArrowUp: "prev",
@@ -1179,7 +1179,7 @@ function Yo(e, t, r) {
1179
1179
  if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
1180
1180
  return Go[o];
1181
1181
  }
1182
- function nr(e, t = !1) {
1182
+ function ar(e, t = !1) {
1183
1183
  const r = document.activeElement;
1184
1184
  for (const o of e)
1185
1185
  if (o === r || (o.focus({ preventScroll: t }), document.activeElement !== r)) return;
@@ -1187,12 +1187,12 @@ function nr(e, t = !1) {
1187
1187
  function $o(e, t) {
1188
1188
  return e.map((r, o) => e[(t + o) % e.length]);
1189
1189
  }
1190
- var Wo = tr, Uo = or, ar = "Toggle", at = h.forwardRef((e, t) => {
1190
+ var Wo = rr, Uo = nr, sr = "Toggle", at = h.forwardRef((e, t) => {
1191
1191
  const { pressed: r, defaultPressed: o, onPressedChange: n, ...s } = e, [i, d] = Oe({
1192
1192
  prop: r,
1193
1193
  onChange: n,
1194
1194
  defaultProp: o ?? !1,
1195
- caller: ar
1195
+ caller: sr
1196
1196
  });
1197
1197
  return /* @__PURE__ */ l(
1198
1198
  te.button,
@@ -1209,10 +1209,10 @@ var Wo = tr, Uo = or, ar = "Toggle", at = h.forwardRef((e, t) => {
1209
1209
  }
1210
1210
  );
1211
1211
  });
1212
- at.displayName = ar;
1213
- var sr = at, ce = "ToggleGroup", [lr] = Le(ce, [
1214
- er
1215
- ]), ir = er(), st = m.forwardRef((e, t) => {
1212
+ at.displayName = sr;
1213
+ var lr = at, ce = "ToggleGroup", [ir] = Le(ce, [
1214
+ tr
1215
+ ]), cr = tr(), st = m.forwardRef((e, t) => {
1216
1216
  const { type: r, ...o } = e;
1217
1217
  if (r === "single")
1218
1218
  return /* @__PURE__ */ l(Xo, { ...o, ref: t });
@@ -1221,7 +1221,7 @@ var sr = at, ce = "ToggleGroup", [lr] = Le(ce, [
1221
1221
  throw new Error(`Missing prop \`type\` expected on \`${ce}\``);
1222
1222
  });
1223
1223
  st.displayName = ce;
1224
- var [cr, dr] = lr(ce), Xo = m.forwardRef((e, t) => {
1224
+ var [dr, ur] = ir(ce), Xo = m.forwardRef((e, t) => {
1225
1225
  const {
1226
1226
  value: r,
1227
1227
  defaultValue: o,
@@ -1235,14 +1235,14 @@ var [cr, dr] = lr(ce), Xo = m.forwardRef((e, t) => {
1235
1235
  caller: ce
1236
1236
  });
1237
1237
  return /* @__PURE__ */ l(
1238
- cr,
1238
+ dr,
1239
1239
  {
1240
1240
  scope: e.__scopeToggleGroup,
1241
1241
  type: "single",
1242
1242
  value: m.useMemo(() => i ? [i] : [], [i]),
1243
1243
  onItemActivate: d,
1244
1244
  onItemDeactivate: m.useCallback(() => d(""), [d]),
1245
- children: /* @__PURE__ */ l(ur, { ...s, ref: t })
1245
+ children: /* @__PURE__ */ l(fr, { ...s, ref: t })
1246
1246
  }
1247
1247
  );
1248
1248
  }), Ko = m.forwardRef((e, t) => {
@@ -1265,19 +1265,19 @@ var [cr, dr] = lr(ce), Xo = m.forwardRef((e, t) => {
1265
1265
  [d]
1266
1266
  );
1267
1267
  return /* @__PURE__ */ l(
1268
- cr,
1268
+ dr,
1269
1269
  {
1270
1270
  scope: e.__scopeToggleGroup,
1271
1271
  type: "multiple",
1272
1272
  value: i,
1273
1273
  onItemActivate: c,
1274
1274
  onItemDeactivate: u,
1275
- children: /* @__PURE__ */ l(ur, { ...s, ref: t })
1275
+ children: /* @__PURE__ */ l(fr, { ...s, ref: t })
1276
1276
  }
1277
1277
  );
1278
1278
  });
1279
1279
  st.displayName = ce;
1280
- var [qo, Jo] = lr(ce), ur = m.forwardRef(
1280
+ var [qo, Jo] = ir(ce), fr = m.forwardRef(
1281
1281
  (e, t) => {
1282
1282
  const {
1283
1283
  __scopeToggleGroup: r,
@@ -1287,7 +1287,7 @@ var [qo, Jo] = lr(ce), ur = m.forwardRef(
1287
1287
  dir: i,
1288
1288
  loop: d = !0,
1289
1289
  ...c
1290
- } = e, u = ir(r), f = Qe(i), p = { role: "group", dir: f, ...c };
1290
+ } = e, u = cr(r), f = Qe(i), p = { role: "group", dir: f, ...c };
1291
1291
  return /* @__PURE__ */ l(qo, { scope: r, rovingFocus: n, disabled: o, children: n ? /* @__PURE__ */ l(
1292
1292
  Wo,
1293
1293
  {
@@ -1300,9 +1300,9 @@ var [qo, Jo] = lr(ce), ur = m.forwardRef(
1300
1300
  }
1301
1301
  ) : /* @__PURE__ */ l(te.div, { ...p, ref: t }) });
1302
1302
  }
1303
- ), _e = "ToggleGroupItem", fr = m.forwardRef(
1303
+ ), _e = "ToggleGroupItem", mr = m.forwardRef(
1304
1304
  (e, t) => {
1305
- const r = dr(_e, e.__scopeToggleGroup), o = Jo(_e, e.__scopeToggleGroup), n = ir(e.__scopeToggleGroup), s = r.value.includes(e.value), i = o.disabled || e.disabled, d = { ...e, pressed: s, disabled: i }, c = m.useRef(null);
1305
+ const r = ur(_e, e.__scopeToggleGroup), o = Jo(_e, e.__scopeToggleGroup), n = cr(e.__scopeToggleGroup), s = r.value.includes(e.value), i = o.disabled || e.disabled, d = { ...e, pressed: s, disabled: i }, c = m.useRef(null);
1306
1306
  return o.rovingFocus ? /* @__PURE__ */ l(
1307
1307
  Uo,
1308
1308
  {
@@ -1311,15 +1311,15 @@ var [qo, Jo] = lr(ce), ur = m.forwardRef(
1311
1311
  focusable: !i,
1312
1312
  active: s,
1313
1313
  ref: c,
1314
- children: /* @__PURE__ */ l(vt, { ...d, ref: t })
1314
+ children: /* @__PURE__ */ l(bt, { ...d, ref: t })
1315
1315
  }
1316
- ) : /* @__PURE__ */ l(vt, { ...d, ref: t });
1316
+ ) : /* @__PURE__ */ l(bt, { ...d, ref: t });
1317
1317
  }
1318
1318
  );
1319
- fr.displayName = _e;
1320
- var vt = m.forwardRef(
1319
+ mr.displayName = _e;
1320
+ var bt = m.forwardRef(
1321
1321
  (e, t) => {
1322
- const { __scopeToggleGroup: r, value: o, ...n } = e, s = dr(_e, r), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, d = s.type === "single" ? i : void 0;
1322
+ const { __scopeToggleGroup: r, value: o, ...n } = e, s = ur(_e, r), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, d = s.type === "single" ? i : void 0;
1323
1323
  return /* @__PURE__ */ l(
1324
1324
  at,
1325
1325
  {
@@ -1332,8 +1332,8 @@ var vt = m.forwardRef(
1332
1332
  }
1333
1333
  );
1334
1334
  }
1335
- ), mr = st, hr = fr;
1336
- const pr = Vr(
1335
+ ), hr = st, pr = mr;
1336
+ const gr = Vr(
1337
1337
  "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",
1338
1338
  {
1339
1339
  variants: {
@@ -1352,21 +1352,21 @@ const pr = Vr(
1352
1352
  size: "default"
1353
1353
  }
1354
1354
  }
1355
- ), Zo = h.forwardRef(({ className: e, variant: t, size: r, ...o }, n) => /* @__PURE__ */ l(sr, { ref: n, className: Te(pr({ variant: t, size: r, className: e })), ...o }));
1356
- Zo.displayName = sr.displayName;
1357
- const gr = h.createContext({
1355
+ ), Zo = h.forwardRef(({ className: e, variant: t, size: r, ...o }, n) => /* @__PURE__ */ l(lr, { ref: n, className: Te(gr({ variant: t, size: r, className: e })), ...o }));
1356
+ Zo.displayName = lr.displayName;
1357
+ const vr = h.createContext({
1358
1358
  size: "default",
1359
1359
  variant: "default"
1360
- }), vr = h.forwardRef(({ className: e, variant: t, size: r, children: o, ...n }, s) => /* @__PURE__ */ l(mr, { ref: s, className: Te("flex items-center justify-center gap-1", e), ...n, children: /* @__PURE__ */ l(gr.Provider, { value: { variant: t, size: r }, children: o }) }));
1361
- vr.displayName = mr.displayName;
1362
- const br = h.forwardRef(({ className: e, children: t, variant: r, size: o, ...n }, s) => {
1363
- const i = h.useContext(gr);
1360
+ }), br = h.forwardRef(({ className: e, variant: t, size: r, children: o, ...n }, s) => /* @__PURE__ */ l(hr, { ref: s, className: Te("flex items-center justify-center gap-1", e), ...n, children: /* @__PURE__ */ l(vr.Provider, { value: { variant: t, size: r }, children: o }) }));
1361
+ br.displayName = hr.displayName;
1362
+ const yr = h.forwardRef(({ className: e, children: t, variant: r, size: o, ...n }, s) => {
1363
+ const i = h.useContext(vr);
1364
1364
  return /* @__PURE__ */ l(
1365
- hr,
1365
+ pr,
1366
1366
  {
1367
1367
  ref: s,
1368
1368
  className: Te(
1369
- pr({
1369
+ gr({
1370
1370
  variant: i.variant || r,
1371
1371
  size: i.size || o
1372
1372
  }),
@@ -1377,7 +1377,7 @@ const br = h.forwardRef(({ className: e, children: t, variant: r, size: o, ...n
1377
1377
  }
1378
1378
  );
1379
1379
  });
1380
- br.displayName = hr.displayName;
1380
+ yr.displayName = pr.displayName;
1381
1381
  var Qo = (e) => {
1382
1382
  switch (e) {
1383
1383
  case "success":
@@ -1459,7 +1459,7 @@ gn(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-ico
1459
1459
  function ke(e) {
1460
1460
  return e.label !== void 0;
1461
1461
  }
1462
- var vn = 3, bn = "32px", yn = "16px", bt = 4e3, wn = 356, xn = 14, Sn = 20, Cn = 200;
1462
+ var vn = 3, bn = "32px", yn = "16px", yt = 4e3, wn = 356, xn = 14, Sn = 20, Cn = 200;
1463
1463
  function ee(...e) {
1464
1464
  return e.filter(Boolean).join(" ");
1465
1465
  }
@@ -1469,26 +1469,26 @@ function En(e) {
1469
1469
  }
1470
1470
  var Tn = (e) => {
1471
1471
  var t, r, o, n, s, i, d, c, u, f, p;
1472
- let { invert: g, toast: a, unstyled: N, interacting: b, setHeights: v, visibleToasts: E, heights: C, index: x, toasts: R, expanded: B, removeToast: I, defaultRichColors: F, closeButton: A, style: P, cancelButtonStyle: z, actionButtonStyle: H, className: S = "", descriptionClassName: de = "", duration: G, position: ne, gap: V, loadingIcon: q, expandByDefault: ue, classNames: w, icons: U, closeButtonAriaLabel: He = "Close toast", pauseWhenPageIsHidden: k } = e, [D, _] = m.useState(null), [j, he] = m.useState(null), [L, Ve] = m.useState(!1), [we, Re] = m.useState(!1), [xe, Ge] = m.useState(!1), [lt, xr] = m.useState(!1), [Sr, it] = m.useState(!1), [Cr, je] = m.useState(0), [Er, ct] = m.useState(0), Se = m.useRef(a.duration || G || bt), dt = m.useRef(null), fe = m.useRef(null), Tr = x === 0, Nr = x + 1 <= E, X = a.type, pe = a.dismissible !== !1, Rr = a.className || "", Pr = a.descriptionClassName || "", Pe = m.useMemo(() => C.findIndex((y) => y.toastId === a.id) || 0, [C, a.id]), kr = m.useMemo(() => {
1472
+ let { invert: g, toast: a, unstyled: N, interacting: b, setHeights: v, visibleToasts: E, heights: C, index: x, toasts: R, expanded: B, removeToast: I, defaultRichColors: F, closeButton: A, style: P, cancelButtonStyle: z, actionButtonStyle: H, className: S = "", descriptionClassName: de = "", duration: G, position: ne, gap: V, loadingIcon: q, expandByDefault: ue, classNames: w, icons: U, closeButtonAriaLabel: He = "Close toast", pauseWhenPageIsHidden: k } = e, [D, _] = m.useState(null), [j, he] = m.useState(null), [L, Ve] = m.useState(!1), [we, Re] = m.useState(!1), [xe, Ge] = m.useState(!1), [it, xr] = m.useState(!1), [Sr, ct] = m.useState(!1), [Cr, je] = m.useState(0), [Er, dt] = m.useState(0), Se = m.useRef(a.duration || G || yt), ut = m.useRef(null), fe = m.useRef(null), Tr = x === 0, Nr = x + 1 <= E, X = a.type, pe = a.dismissible !== !1, Rr = a.className || "", Pr = a.descriptionClassName || "", Pe = m.useMemo(() => C.findIndex((y) => y.toastId === a.id) || 0, [C, a.id]), kr = m.useMemo(() => {
1473
1473
  var y;
1474
1474
  return (y = a.closeButton) != null ? y : A;
1475
- }, [a.closeButton, A]), ut = m.useMemo(() => a.duration || G || bt, [a.duration, G]), Ye = m.useRef(0), ge = m.useRef(0), ft = m.useRef(0), ve = m.useRef(null), [Ir, Ar] = ne.split("-"), mt = m.useMemo(() => C.reduce((y, T, M) => M >= Pe ? y : y + T.height, 0), [C, Pe]), ht = ln(), Dr = a.invert || g, $e = X === "loading";
1476
- ge.current = m.useMemo(() => Pe * V + mt, [Pe, mt]), m.useEffect(() => {
1477
- Se.current = ut;
1478
- }, [ut]), m.useEffect(() => {
1475
+ }, [a.closeButton, A]), ft = m.useMemo(() => a.duration || G || yt, [a.duration, G]), Ye = m.useRef(0), ge = m.useRef(0), mt = m.useRef(0), ve = m.useRef(null), [Ir, Ar] = ne.split("-"), ht = m.useMemo(() => C.reduce((y, T, M) => M >= Pe ? y : y + T.height, 0), [C, Pe]), pt = ln(), Dr = a.invert || g, $e = X === "loading";
1476
+ ge.current = m.useMemo(() => Pe * V + ht, [Pe, ht]), m.useEffect(() => {
1477
+ Se.current = ft;
1478
+ }, [ft]), m.useEffect(() => {
1479
1479
  Ve(!0);
1480
1480
  }, []), m.useEffect(() => {
1481
1481
  let y = fe.current;
1482
1482
  if (y) {
1483
1483
  let T = y.getBoundingClientRect().height;
1484
- return ct(T), v((M) => [{ toastId: a.id, height: T, position: a.position }, ...M]), () => v((M) => M.filter((J) => J.toastId !== a.id));
1484
+ return dt(T), v((M) => [{ toastId: a.id, height: T, position: a.position }, ...M]), () => v((M) => M.filter((J) => J.toastId !== a.id));
1485
1485
  }
1486
1486
  }, [v, a.id]), m.useLayoutEffect(() => {
1487
1487
  if (!L) return;
1488
1488
  let y = fe.current, T = y.style.height;
1489
1489
  y.style.height = "auto";
1490
1490
  let M = y.getBoundingClientRect().height;
1491
- y.style.height = T, ct(M), v((J) => J.find((Z) => Z.toastId === a.id) ? J.map((Z) => Z.toastId === a.id ? { ...Z, height: M } : Z) : [{ toastId: a.id, height: M, position: a.position }, ...J]);
1491
+ y.style.height = T, dt(M), v((J) => J.find((Z) => Z.toastId === a.id) ? J.map((Z) => Z.toastId === a.id ? { ...Z, height: M } : Z) : [{ toastId: a.id, height: M, position: a.position }, ...J]);
1492
1492
  }, [L, a.title, a.description, v, a.id]);
1493
1493
  let ae = m.useCallback(() => {
1494
1494
  Re(!0), je(ge.current), v((y) => y.filter((T) => T.toastId !== a.id)), setTimeout(() => {
@@ -1498,34 +1498,34 @@ var Tn = (e) => {
1498
1498
  m.useEffect(() => {
1499
1499
  if (a.promise && X === "loading" || a.duration === 1 / 0 || a.type === "loading") return;
1500
1500
  let y;
1501
- return B || b || k && ht ? (() => {
1502
- if (ft.current < Ye.current) {
1501
+ return B || b || k && pt ? (() => {
1502
+ if (mt.current < Ye.current) {
1503
1503
  let T = (/* @__PURE__ */ new Date()).getTime() - Ye.current;
1504
1504
  Se.current = Se.current - T;
1505
1505
  }
1506
- ft.current = (/* @__PURE__ */ new Date()).getTime();
1506
+ mt.current = (/* @__PURE__ */ new Date()).getTime();
1507
1507
  })() : Se.current !== 1 / 0 && (Ye.current = (/* @__PURE__ */ new Date()).getTime(), y = setTimeout(() => {
1508
1508
  var T;
1509
1509
  (T = a.onAutoClose) == null || T.call(a, a), ae();
1510
1510
  }, Se.current)), () => clearTimeout(y);
1511
- }, [B, b, a, X, k, ht, ae]), m.useEffect(() => {
1511
+ }, [B, b, a, X, k, pt, ae]), m.useEffect(() => {
1512
1512
  a.delete && ae();
1513
1513
  }, [ae, a.delete]);
1514
1514
  function Mr() {
1515
1515
  var y, T, M;
1516
1516
  return U != null && U.loading ? m.createElement("div", { className: ee(w == null ? void 0 : w.loader, (y = a == null ? void 0 : a.classNames) == null ? void 0 : y.loader, "sonner-loader"), "data-visible": X === "loading" }, U.loading) : q ? m.createElement("div", { className: ee(w == null ? void 0 : w.loader, (T = a == null ? void 0 : a.classNames) == null ? void 0 : T.loader, "sonner-loader"), "data-visible": X === "loading" }, q) : m.createElement(tn, { className: ee(w == null ? void 0 : w.loader, (M = a == null ? void 0 : a.classNames) == null ? void 0 : M.loader), visible: X === "loading" });
1517
1517
  }
1518
- return m.createElement("li", { tabIndex: 0, ref: fe, className: ee(S, Rr, w == null ? void 0 : w.toast, (t = a == null ? void 0 : a.classNames) == null ? void 0 : t.toast, w == null ? void 0 : w.default, w == null ? void 0 : w[X], (r = a == null ? void 0 : a.classNames) == null ? void 0 : r[X]), "data-sonner-toast": "", "data-rich-colors": (o = a.richColors) != null ? o : F, "data-styled": !(a.jsx || a.unstyled || N), "data-mounted": L, "data-promise": !!a.promise, "data-swiped": Sr, "data-removed": we, "data-visible": Nr, "data-y-position": Ir, "data-x-position": Ar, "data-index": x, "data-front": Tr, "data-swiping": xe, "data-dismissible": pe, "data-type": X, "data-invert": Dr, "data-swipe-out": lt, "data-swipe-direction": j, "data-expanded": !!(B || ue && L), style: { "--index": x, "--toasts-before": x, "--z-index": R.length - x, "--offset": `${we ? Cr : ge.current}px`, "--initial-height": ue ? "auto" : `${Er}px`, ...P, ...a.style }, onDragEnd: () => {
1518
+ return m.createElement("li", { tabIndex: 0, ref: fe, className: ee(S, Rr, w == null ? void 0 : w.toast, (t = a == null ? void 0 : a.classNames) == null ? void 0 : t.toast, w == null ? void 0 : w.default, w == null ? void 0 : w[X], (r = a == null ? void 0 : a.classNames) == null ? void 0 : r[X]), "data-sonner-toast": "", "data-rich-colors": (o = a.richColors) != null ? o : F, "data-styled": !(a.jsx || a.unstyled || N), "data-mounted": L, "data-promise": !!a.promise, "data-swiped": Sr, "data-removed": we, "data-visible": Nr, "data-y-position": Ir, "data-x-position": Ar, "data-index": x, "data-front": Tr, "data-swiping": xe, "data-dismissible": pe, "data-type": X, "data-invert": Dr, "data-swipe-out": it, "data-swipe-direction": j, "data-expanded": !!(B || ue && L), style: { "--index": x, "--toasts-before": x, "--z-index": R.length - x, "--offset": `${we ? Cr : ge.current}px`, "--initial-height": ue ? "auto" : `${Er}px`, ...P, ...a.style }, onDragEnd: () => {
1519
1519
  Ge(!1), _(null), ve.current = null;
1520
1520
  }, onPointerDown: (y) => {
1521
- $e || !pe || (dt.current = /* @__PURE__ */ new Date(), je(ge.current), y.target.setPointerCapture(y.pointerId), y.target.tagName !== "BUTTON" && (Ge(!0), ve.current = { x: y.clientX, y: y.clientY }));
1521
+ $e || !pe || (ut.current = /* @__PURE__ */ new Date(), je(ge.current), y.target.setPointerCapture(y.pointerId), y.target.tagName !== "BUTTON" && (Ge(!0), ve.current = { x: y.clientX, y: y.clientY }));
1522
1522
  }, onPointerUp: () => {
1523
1523
  var y, T, M, J;
1524
- if (lt || !pe) return;
1524
+ if (it || !pe) return;
1525
1525
  ve.current = null;
1526
- let Z = Number(((y = fe.current) == null ? void 0 : y.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), se = Number(((T = fe.current) == null ? void 0 : T.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), me = (/* @__PURE__ */ new Date()).getTime() - ((M = dt.current) == null ? void 0 : M.getTime()), Q = D === "x" ? Z : se, le = Math.abs(Q) / me;
1526
+ let Z = Number(((y = fe.current) == null ? void 0 : y.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), se = Number(((T = fe.current) == null ? void 0 : T.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), me = (/* @__PURE__ */ new Date()).getTime() - ((M = ut.current) == null ? void 0 : M.getTime()), Q = D === "x" ? Z : se, le = Math.abs(Q) / me;
1527
1527
  if (Math.abs(Q) >= Sn || le > 0.11) {
1528
- je(ge.current), (J = a.onDismiss) == null || J.call(a, a), he(D === "x" ? Z > 0 ? "right" : "left" : se > 0 ? "down" : "up"), ae(), xr(!0), it(!1);
1528
+ je(ge.current), (J = a.onDismiss) == null || J.call(a, a), he(D === "x" ? Z > 0 ? "right" : "left" : se > 0 ? "down" : "up"), ae(), xr(!0), ct(!1);
1529
1529
  return;
1530
1530
  }
1531
1531
  Ge(!1), _(null);
@@ -1535,7 +1535,7 @@ var Tn = (e) => {
1535
1535
  let se = y.clientY - ve.current.y, me = y.clientX - ve.current.x, Q = (M = e.swipeDirections) != null ? M : En(ne);
1536
1536
  !D && (Math.abs(me) > 1 || Math.abs(se) > 1) && _(Math.abs(me) > Math.abs(se) ? "x" : "y");
1537
1537
  let le = { x: 0, y: 0 };
1538
- D === "y" ? (Q.includes("top") || Q.includes("bottom")) && (Q.includes("top") && se < 0 || Q.includes("bottom") && se > 0) && (le.y = se) : D === "x" && (Q.includes("left") || Q.includes("right")) && (Q.includes("left") && me < 0 || Q.includes("right") && me > 0) && (le.x = me), (Math.abs(le.x) > 0 || Math.abs(le.y) > 0) && it(!0), (J = fe.current) == null || J.style.setProperty("--swipe-amount-x", `${le.x}px`), (Z = fe.current) == null || Z.style.setProperty("--swipe-amount-y", `${le.y}px`);
1538
+ D === "y" ? (Q.includes("top") || Q.includes("bottom")) && (Q.includes("top") && se < 0 || Q.includes("bottom") && se > 0) && (le.y = se) : D === "x" && (Q.includes("left") || Q.includes("right")) && (Q.includes("left") && me < 0 || Q.includes("right") && me > 0) && (le.x = me), (Math.abs(le.x) > 0 || Math.abs(le.y) > 0) && ct(!0), (J = fe.current) == null || J.style.setProperty("--swipe-amount-x", `${le.x}px`), (Z = fe.current) == null || Z.style.setProperty("--swipe-amount-y", `${le.y}px`);
1539
1539
  } }, kr && !a.jsx ? m.createElement("button", { "aria-label": He, "data-disabled": $e, "data-close-button": !0, onClick: $e || !pe ? () => {
1540
1540
  } : () => {
1541
1541
  var y;
@@ -1548,7 +1548,7 @@ var Tn = (e) => {
1548
1548
  ke(a.action) && ((M = (T = a.action).onClick) == null || M.call(T, y), !y.defaultPrevented && ae());
1549
1549
  }, className: ee(w == null ? void 0 : w.actionButton, (p = a == null ? void 0 : a.classNames) == null ? void 0 : p.actionButton) }, a.action.label) : null));
1550
1550
  };
1551
- function yt() {
1551
+ function wt() {
1552
1552
  if (typeof window > "u" || typeof document > "u") return "ltr";
1553
1553
  let e = document.documentElement.getAttribute("dir");
1554
1554
  return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
@@ -1568,7 +1568,7 @@ function Nn(e, t) {
1568
1568
  }), r;
1569
1569
  }
1570
1570
  _r(function(e, t) {
1571
- let { invert: r, position: o = "bottom-right", hotkey: n = ["altKey", "KeyT"], expand: s, closeButton: i, className: d, offset: c, mobileOffset: u, theme: f = "light", richColors: p, duration: g, style: a, visibleToasts: N = vn, toastOptions: b, dir: v = yt(), gap: E = xn, loadingIcon: C, icons: x, containerAriaLabel: R = "Notifications", pauseWhenPageIsHidden: B } = e, [I, F] = m.useState([]), A = m.useMemo(() => Array.from(new Set([o].concat(I.filter((k) => k.position).map((k) => k.position)))), [I, o]), [P, z] = m.useState([]), [H, S] = m.useState(!1), [de, G] = m.useState(!1), [ne, V] = m.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), q = m.useRef(null), ue = n.join("+").replace(/Key/g, "").replace(/Digit/g, ""), w = m.useRef(null), U = m.useRef(!1), He = m.useCallback((k) => {
1571
+ let { invert: r, position: o = "bottom-right", hotkey: n = ["altKey", "KeyT"], expand: s, closeButton: i, className: d, offset: c, mobileOffset: u, theme: f = "light", richColors: p, duration: g, style: a, visibleToasts: N = vn, toastOptions: b, dir: v = wt(), gap: E = xn, loadingIcon: C, icons: x, containerAriaLabel: R = "Notifications", pauseWhenPageIsHidden: B } = e, [I, F] = m.useState([]), A = m.useMemo(() => Array.from(new Set([o].concat(I.filter((k) => k.position).map((k) => k.position)))), [I, o]), [P, z] = m.useState([]), [H, S] = m.useState(!1), [de, G] = m.useState(!1), [ne, V] = m.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), q = m.useRef(null), ue = n.join("+").replace(/Key/g, "").replace(/Digit/g, ""), w = m.useRef(null), U = m.useRef(!1), He = m.useCallback((k) => {
1572
1572
  F((D) => {
1573
1573
  var _;
1574
1574
  return (_ = D.find((j) => j.id === k.id)) != null && _.delete || Y.dismiss(k.id), D.filter(({ id: j }) => j !== k.id);
@@ -1622,7 +1622,7 @@ _r(function(e, t) {
1622
1622
  }, [q.current]), m.createElement("section", { ref: t, "aria-label": `${R} ${ue}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, A.map((k, D) => {
1623
1623
  var _;
1624
1624
  let [j, he] = k.split("-");
1625
- return I.length ? m.createElement("ol", { key: k, dir: v === "auto" ? yt() : v, tabIndex: -1, ref: q, className: d, "data-sonner-toaster": !0, "data-theme": ne, "data-y-position": j, "data-lifted": H && I.length > 1 && !s, "data-x-position": he, style: { "--front-toast-height": `${((_ = P[0]) == null ? void 0 : _.height) || 0}px`, "--width": `${wn}px`, "--gap": `${E}px`, ...a, ...Nn(c, u) }, onBlur: (L) => {
1625
+ return I.length ? m.createElement("ol", { key: k, dir: v === "auto" ? wt() : v, tabIndex: -1, ref: q, className: d, "data-sonner-toaster": !0, "data-theme": ne, "data-y-position": j, "data-lifted": H && I.length > 1 && !s, "data-x-position": he, style: { "--front-toast-height": `${((_ = P[0]) == null ? void 0 : _.height) || 0}px`, "--width": `${wn}px`, "--gap": `${E}px`, ...a, ...Nn(c, u) }, onBlur: (L) => {
1626
1626
  U.current && !L.currentTarget.contains(L.relatedTarget) && (U.current = !1, w.current && (w.current.focus({ preventScroll: !0 }), w.current = null));
1627
1627
  }, onFocus: (L) => {
1628
1628
  L.target instanceof HTMLElement && L.target.dataset.dismissible === "false" || U.current || (U.current = !0, w.current = L.relatedTarget);
@@ -1636,7 +1636,7 @@ _r(function(e, t) {
1636
1636
  })) : null;
1637
1637
  }));
1638
1638
  });
1639
- const yr = {
1639
+ const wr = {
1640
1640
  mobile: { width: 375, icon: $r, label: "Mobile (375px)" },
1641
1641
  tablet: { width: 768, icon: Yr, label: "Tablet (768px)" },
1642
1642
  small: { width: 1024, icon: jr, label: "Small Desktop (1024px)" },
@@ -1651,15 +1651,15 @@ const yr = {
1651
1651
  };
1652
1652
  return /* @__PURE__ */ O("div", { className: "flex items-center gap-4", children: [
1653
1653
  /* @__PURE__ */ l(Wr, { children: /* @__PURE__ */ l(
1654
- vr,
1654
+ br,
1655
1655
  {
1656
1656
  type: "single",
1657
1657
  value: t,
1658
1658
  onValueChange: (c) => c && r(c),
1659
1659
  className: "bg-muted rounded-md p-1",
1660
- children: Object.entries(yr).map(([c, { icon: u, label: f }]) => /* @__PURE__ */ O(Ur, { children: [
1660
+ children: Object.entries(wr).map(([c, { icon: u, label: f }]) => /* @__PURE__ */ O(Ur, { children: [
1661
1661
  /* @__PURE__ */ l(Xr, { asChild: !0, children: /* @__PURE__ */ l(
1662
- br,
1662
+ yr,
1663
1663
  {
1664
1664
  value: c,
1665
1665
  size: "sm",
@@ -1699,7 +1699,7 @@ const yr = {
1699
1699
  ] })
1700
1700
  ] })
1701
1701
  ] });
1702
- }, wr = ({ children: e, className: t }) => {
1702
+ }, lt = ({ children: e, className: t }) => {
1703
1703
  const {
1704
1704
  connectors: { connect: r, drag: o },
1705
1705
  selected: n
@@ -1717,7 +1717,7 @@ const yr = {
1717
1717
  }
1718
1718
  );
1719
1719
  };
1720
- wr.craft = {
1720
+ lt.craft = {
1721
1721
  props: {},
1722
1722
  displayName: "Body",
1723
1723
  isCanvas: !0,
@@ -1729,10 +1729,10 @@ wr.craft = {
1729
1729
  };
1730
1730
  const Pn = ({ htmlJson: e = "{}" }) => {
1731
1731
  const { actions: t } = ye();
1732
- return t.deserialize(e), /* @__PURE__ */ l(Zr, { children: /* @__PURE__ */ l(Ce, { id: "mainBody", is: wr, canvas: !0 }) });
1732
+ return t.deserialize(e), /* @__PURE__ */ l(Zr, { children: /* @__PURE__ */ l(Ce, { id: "mainBody", is: lt, canvas: !0 }) });
1733
1733
  }, Mn = ({ initialData: e, onSave: t, onStateChange: r }) => {
1734
1734
  var c;
1735
- const o = Qr(), [n, s] = Ee("desktop"), i = ((c = yr[n]) == null ? void 0 : c.width) || "100%", d = (u) => {
1735
+ const o = Qr(), [n, s] = Ee("desktop"), i = ((c = wr[n]) == null ? void 0 : c.width) || "100%", d = (u) => {
1736
1736
  if (r)
1737
1737
  try {
1738
1738
  const f = u.serialize();
@@ -1744,16 +1744,17 @@ const Pn = ({ htmlJson: e = "{}" }) => {
1744
1744
  eo,
1745
1745
  {
1746
1746
  resolver: {
1747
+ Body: lt,
1747
1748
  Container: Ae,
1748
- Text: Et,
1749
- ButtonComponent: Tt,
1750
- Heading: Ct,
1751
- Image: Rt,
1752
- Divider: kt,
1753
- Spacer: It,
1754
- Video: Pt,
1755
- Columns: St,
1756
- Link: Nt
1749
+ Text: Tt,
1750
+ ButtonComponent: Nt,
1751
+ Heading: Et,
1752
+ Image: Pt,
1753
+ Divider: It,
1754
+ Spacer: At,
1755
+ Video: kt,
1756
+ Columns: Ct,
1757
+ Link: Rt
1757
1758
  },
1758
1759
  enabled: !0,
1759
1760
  onNodesChange: (u) => d(u),