@tech_carthagos/page-builder 1.0.8 → 1.0.10

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 xt } from "react/jsx-runtime";
1
+ import { jsxs as O, jsx as i, Fragment as wt } from "react/jsx-runtime";
2
2
  import * as h from "react";
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 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, W as oo, Q as no, R as ao, U as Ue, X as Xe } from "./index-C45bBHT3.js";
3
+ import m, { useState as Ee, forwardRef as Lr, isValidElement as We } from "react";
4
+ import { c as W, P as ye, B as Ie, L as xt, F as zr, 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 le, j as Or, l as Te, m as Br, n as Fr, o as Hr, p as Vr, q as Oe, r as Gr, s as jr, M as Yr, t as $r, v as Wr, w as Ur, x as Xr, y as Kr, z as qr, A as Zr, E as At, N as Jr, G as Qr, J as eo, K as to, O as ro, W as oo, Q as no, R as ao, U as Ue, X as Xe } from "./index-DGBwnfkc.js";
5
5
  import so from "react-dom";
6
6
  /**
7
7
  * @license lucide-react v0.462.0 - ISC
@@ -19,7 +19,7 @@ const Dt = W("Columns2", [
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
21
  */
22
- const lo = W("GripVertical", [
22
+ const io = W("GripVertical", [
23
23
  ["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
24
24
  ["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
25
25
  ["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
@@ -89,7 +89,7 @@ const Ot = W("MoveVertical", [
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
91
  */
92
- const io = W("Redo2", [
92
+ const lo = W("Redo2", [
93
93
  ["path", { d: "m15 14 5-5-5-5", key: "12vg1m" }],
94
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
95
  ]);
@@ -173,62 +173,62 @@ const mo = W("Video", [
173
173
  {
174
174
  name: "Container",
175
175
  icon: qe,
176
- element: /* @__PURE__ */ l(Ce, { is: Ae, canvas: !0 })
176
+ element: /* @__PURE__ */ i(Ce, { is: Ae, canvas: !0 })
177
177
  },
178
178
  {
179
179
  name: "Columns",
180
180
  icon: Dt,
181
- element: /* @__PURE__ */ O(Ce, { is: Ct, canvas: !0, children: [
182
- /* @__PURE__ */ l(Ce, { is: Ae, canvas: !0 }),
183
- /* @__PURE__ */ l(Ce, { is: Ae, canvas: !0 })
181
+ element: /* @__PURE__ */ O(Ce, { is: St, canvas: !0, children: [
182
+ /* @__PURE__ */ i(Ce, { is: Ae, canvas: !0 }),
183
+ /* @__PURE__ */ i(Ce, { is: Ae, canvas: !0 })
184
184
  ] })
185
185
  }
186
186
  ], r = [
187
187
  {
188
188
  name: "Heading",
189
189
  icon: Mt,
190
- element: /* @__PURE__ */ l(Et, {})
190
+ element: /* @__PURE__ */ i(Ct, {})
191
191
  },
192
192
  {
193
193
  name: "Text",
194
194
  icon: Bt,
195
- element: /* @__PURE__ */ l(Tt, {})
195
+ element: /* @__PURE__ */ i(Et, {})
196
196
  },
197
197
  {
198
198
  name: "Button",
199
199
  icon: zt,
200
- element: /* @__PURE__ */ l(Nt, {})
200
+ element: /* @__PURE__ */ i(Tt, {})
201
201
  },
202
202
  {
203
203
  name: "Link",
204
- icon: St,
205
- element: /* @__PURE__ */ l(Rt, {})
204
+ icon: xt,
205
+ element: /* @__PURE__ */ i(Nt, {})
206
206
  }
207
207
  ], o = [
208
208
  {
209
209
  name: "Image",
210
210
  icon: _t,
211
- element: /* @__PURE__ */ l(Pt, {})
211
+ element: /* @__PURE__ */ i(Rt, {})
212
212
  },
213
213
  {
214
214
  name: "Video",
215
- icon: Lr,
216
- element: /* @__PURE__ */ l(kt, {})
215
+ icon: zr,
216
+ element: /* @__PURE__ */ i(Pt, {})
217
217
  }
218
218
  ], n = [
219
219
  {
220
220
  name: "Divider",
221
221
  icon: Lt,
222
- element: /* @__PURE__ */ l(It, {})
222
+ element: /* @__PURE__ */ i(kt, {})
223
223
  },
224
224
  {
225
225
  name: "Spacer",
226
226
  icon: Ot,
227
- element: /* @__PURE__ */ l(At, {})
227
+ element: /* @__PURE__ */ i(It, {})
228
228
  }
229
- ], s = (i, d) => /* @__PURE__ */ O("div", { className: "space-y-2", children: [
230
- /* @__PURE__ */ l("span", { className: "text-xs text-muted-foreground/70", children: i }),
231
- /* @__PURE__ */ l("div", { className: "grid grid-cols-2 gap-1.5", children: d.map((c) => /* @__PURE__ */ O(
229
+ ], s = (l, d) => /* @__PURE__ */ O("div", { className: "space-y-2", children: [
230
+ /* @__PURE__ */ i("span", { className: "text-xs text-muted-foreground/70", children: l }),
231
+ /* @__PURE__ */ i("div", { className: "grid grid-cols-2 gap-1.5", children: d.map((c) => /* @__PURE__ */ O(
232
232
  Ie,
233
233
  {
234
234
  variant: "outline",
@@ -236,15 +236,15 @@ const mo = W("Video", [
236
236
  className: "flex flex-col items-center justify-center h-14 cursor-grab active:cursor-grabbing text-muted-foreground hover:text-foreground",
237
237
  ref: (u) => u && e.create(u, c.element),
238
238
  children: [
239
- /* @__PURE__ */ l(c.icon, { className: "h-4 w-4 mb-1" }),
240
- /* @__PURE__ */ l("span", { className: "text-[10px]", children: c.name })
239
+ /* @__PURE__ */ i(c.icon, { className: "h-4 w-4 mb-1" }),
240
+ /* @__PURE__ */ i("span", { className: "text-[10px]", children: c.name })
241
241
  ]
242
242
  },
243
243
  c.name
244
244
  )) })
245
245
  ] });
246
246
  return /* @__PURE__ */ O("div", { className: "space-y-4", children: [
247
- /* @__PURE__ */ l("h3", { className: "text-sm font-medium text-muted-foreground", children: "Components" }),
247
+ /* @__PURE__ */ i("h3", { className: "text-sm font-medium text-muted-foreground", children: "Components" }),
248
248
  s("Layout", t),
249
249
  s("Basic", r),
250
250
  s("Media", o),
@@ -269,9 +269,9 @@ var et = "ScrollArea", [Ft] = Le(et), [bo, K] = Ft(et), Ht = h.forwardRef(
269
269
  type: o = "hover",
270
270
  dir: n,
271
271
  scrollHideDelay: s = 600,
272
- ...i
272
+ ...l
273
273
  } = e, [d, c] = h.useState(null), [u, f] = h.useState(null), [p, g] = h.useState(null), [a, N] = h.useState(null), [b, v] = h.useState(null), [E, C] = h.useState(0), [x, R] = h.useState(0), [B, I] = h.useState(!1), [F, A] = h.useState(!1), P = oe(t, (H) => c(H)), z = Qe(n);
274
- return /* @__PURE__ */ l(
274
+ return /* @__PURE__ */ i(
275
275
  bo,
276
276
  {
277
277
  scope: r,
@@ -293,11 +293,11 @@ var et = "ScrollArea", [Ft] = Le(et), [bo, K] = Ft(et), Ht = h.forwardRef(
293
293
  onScrollbarYEnabledChange: A,
294
294
  onCornerWidthChange: C,
295
295
  onCornerHeightChange: R,
296
- children: /* @__PURE__ */ l(
296
+ children: /* @__PURE__ */ i(
297
297
  te.div,
298
298
  {
299
299
  dir: z,
300
- ...i,
300
+ ...l,
301
301
  ref: P,
302
302
  style: {
303
303
  position: "relative",
@@ -315,9 +315,9 @@ var et = "ScrollArea", [Ft] = Le(et), [bo, K] = Ft(et), Ht = h.forwardRef(
315
315
  Ht.displayName = et;
316
316
  var Vt = "ScrollAreaViewport", Gt = h.forwardRef(
317
317
  (e, t) => {
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
- /* @__PURE__ */ l(
318
+ const { __scopeScrollArea: r, children: o, nonce: n, ...s } = e, l = K(Vt, r), d = h.useRef(null), c = oe(t, d, l.onViewportChange);
319
+ return /* @__PURE__ */ O(wt, { children: [
320
+ /* @__PURE__ */ i(
321
321
  "style",
322
322
  {
323
323
  dangerouslySetInnerHTML: {
@@ -326,7 +326,7 @@ var Vt = "ScrollAreaViewport", Gt = h.forwardRef(
326
326
  nonce: n
327
327
  }
328
328
  ),
329
- /* @__PURE__ */ l(
329
+ /* @__PURE__ */ i(
330
330
  te.div,
331
331
  {
332
332
  "data-radix-scroll-area-viewport": "",
@@ -344,11 +344,11 @@ var Vt = "ScrollAreaViewport", Gt = h.forwardRef(
344
344
  * the browser from having to work out whether to render native scrollbars or not,
345
345
  * we tell it to with the intention of hiding them in CSS.
346
346
  */
347
- overflowX: i.scrollbarXEnabled ? "scroll" : "hidden",
348
- overflowY: i.scrollbarYEnabled ? "scroll" : "hidden",
347
+ overflowX: l.scrollbarXEnabled ? "scroll" : "hidden",
348
+ overflowY: l.scrollbarYEnabled ? "scroll" : "hidden",
349
349
  ...e.style
350
350
  },
351
- children: /* @__PURE__ */ l("div", { ref: i.onContentChange, style: { minWidth: "100%", display: "table" }, children: o })
351
+ children: /* @__PURE__ */ i("div", { ref: l.onContentChange, style: { minWidth: "100%", display: "table" }, children: o })
352
352
  }
353
353
  )
354
354
  ] });
@@ -357,29 +357,29 @@ var Vt = "ScrollAreaViewport", Gt = h.forwardRef(
357
357
  Gt.displayName = Vt;
358
358
  var re = "ScrollAreaScrollbar", tt = h.forwardRef(
359
359
  (e, t) => {
360
- const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = n, d = e.orientation === "horizontal";
361
- return h.useEffect(() => (d ? s(!0) : i(!0), () => {
362
- d ? s(!1) : i(!1);
363
- }), [d, s, i]), n.type === "hover" ? /* @__PURE__ */ l(yo, { ...o, ref: t, forceMount: r }) : n.type === "scroll" ? /* @__PURE__ */ l(wo, { ...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;
360
+ const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: l } = n, d = e.orientation === "horizontal";
361
+ return h.useEffect(() => (d ? s(!0) : l(!0), () => {
362
+ d ? s(!1) : l(!1);
363
+ }), [d, s, l]), n.type === "hover" ? /* @__PURE__ */ i(yo, { ...o, ref: t, forceMount: r }) : n.type === "scroll" ? /* @__PURE__ */ i(wo, { ...o, ref: t, forceMount: r }) : n.type === "auto" ? /* @__PURE__ */ i(jt, { ...o, ref: t, forceMount: r }) : n.type === "always" ? /* @__PURE__ */ i(rt, { ...o, ref: t }) : null;
364
364
  }
365
365
  );
366
366
  tt.displayName = re;
367
367
  var yo = h.forwardRef((e, t) => {
368
- const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), [s, i] = h.useState(!1);
368
+ const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), [s, l] = h.useState(!1);
369
369
  return h.useEffect(() => {
370
370
  const d = n.scrollArea;
371
371
  let c = 0;
372
372
  if (d) {
373
373
  const u = () => {
374
- window.clearTimeout(c), i(!0);
374
+ window.clearTimeout(c), l(!0);
375
375
  }, f = () => {
376
- c = window.setTimeout(() => i(!1), n.scrollHideDelay);
376
+ c = window.setTimeout(() => l(!1), n.scrollHideDelay);
377
377
  };
378
378
  return d.addEventListener("pointerenter", u), d.addEventListener("pointerleave", f), () => {
379
379
  window.clearTimeout(c), d.removeEventListener("pointerenter", u), d.removeEventListener("pointerleave", f);
380
380
  };
381
381
  }
382
- }, [n.scrollArea, n.scrollHideDelay]), /* @__PURE__ */ l(ze, { present: r || s, children: /* @__PURE__ */ l(
382
+ }, [n.scrollArea, n.scrollHideDelay]), /* @__PURE__ */ i(ze, { present: r || s, children: /* @__PURE__ */ i(
383
383
  jt,
384
384
  {
385
385
  "data-state": s ? "visible" : "hidden",
@@ -388,7 +388,7 @@ var yo = h.forwardRef((e, t) => {
388
388
  }
389
389
  ) });
390
390
  }), wo = h.forwardRef((e, t) => {
391
- const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), s = e.orientation === "horizontal", i = Fe(() => c("SCROLL_END"), 100), [d, c] = vo("hidden", {
391
+ const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), s = e.orientation === "horizontal", l = Fe(() => c("SCROLL_END"), 100), [d, c] = vo("hidden", {
392
392
  hidden: {
393
393
  SCROLL: "scrolling"
394
394
  },
@@ -417,11 +417,11 @@ var yo = h.forwardRef((e, t) => {
417
417
  let p = u[f];
418
418
  const g = () => {
419
419
  const a = u[f];
420
- p !== a && (c("SCROLL"), i()), p = a;
420
+ p !== a && (c("SCROLL"), l()), p = a;
421
421
  };
422
422
  return u.addEventListener("scroll", g), () => u.removeEventListener("scroll", g);
423
423
  }
424
- }, [n.viewport, s, c, i]), /* @__PURE__ */ l(ze, { present: r || d !== "hidden", children: /* @__PURE__ */ l(
424
+ }, [n.viewport, s, c, l]), /* @__PURE__ */ i(ze, { present: r || d !== "hidden", children: /* @__PURE__ */ i(
425
425
  rt,
426
426
  {
427
427
  "data-state": d === "hidden" ? "hidden" : "visible",
@@ -432,13 +432,13 @@ var yo = h.forwardRef((e, t) => {
432
432
  }
433
433
  ) });
434
434
  }), jt = h.forwardRef((e, t) => {
435
- const r = K(re, e.__scopeScrollArea), { forceMount: o, ...n } = e, [s, i] = h.useState(!1), d = e.orientation === "horizontal", c = Fe(() => {
435
+ const r = K(re, e.__scopeScrollArea), { forceMount: o, ...n } = e, [s, l] = 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;
438
- i(d ? u : f);
438
+ l(d ? u : f);
439
439
  }
440
440
  }, 10);
441
- return be(r.viewport, c), be(r.content, c), /* @__PURE__ */ l(ze, { present: o || s, children: /* @__PURE__ */ l(
441
+ return be(r.viewport, c), be(r.content, c), /* @__PURE__ */ i(ze, { present: o || s, children: /* @__PURE__ */ i(
442
442
  rt,
443
443
  {
444
444
  "data-state": s ? "visible" : "hidden",
@@ -447,7 +447,7 @@ var yo = h.forwardRef((e, t) => {
447
447
  }
448
448
  ) });
449
449
  }), rt = h.forwardRef((e, t) => {
450
- const { orientation: r = "vertical", ...o } = e, n = K(re, e.__scopeScrollArea), s = h.useRef(null), i = h.useRef(0), [d, c] = h.useState({
450
+ const { orientation: r = "vertical", ...o } = e, n = K(re, e.__scopeScrollArea), s = h.useRef(null), l = h.useRef(0), [d, c] = h.useState({
451
451
  content: 0,
452
452
  viewport: 0,
453
453
  scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
@@ -457,20 +457,20 @@ var yo = h.forwardRef((e, t) => {
457
457
  onSizesChange: c,
458
458
  hasThumb: u > 0 && u < 1,
459
459
  onThumbChange: (g) => s.current = g,
460
- onThumbPointerUp: () => i.current = 0,
461
- onThumbPointerDown: (g) => i.current = g
460
+ onThumbPointerUp: () => l.current = 0,
461
+ onThumbPointerDown: (g) => l.current = g
462
462
  };
463
463
  function p(g, a) {
464
- return No(g, i.current, d, a);
464
+ return No(g, l.current, d, a);
465
465
  }
466
- return r === "horizontal" ? /* @__PURE__ */ l(
466
+ return r === "horizontal" ? /* @__PURE__ */ i(
467
467
  xo,
468
468
  {
469
469
  ...f,
470
470
  ref: t,
471
471
  onThumbPositionChange: () => {
472
472
  if (n.viewport && s.current) {
473
- const g = n.viewport.scrollLeft, a = gt(g, d, n.dir);
473
+ const g = n.viewport.scrollLeft, a = pt(g, d, n.dir);
474
474
  s.current.style.transform = `translate3d(${a}px, 0, 0)`;
475
475
  }
476
476
  },
@@ -481,14 +481,14 @@ var yo = h.forwardRef((e, t) => {
481
481
  n.viewport && (n.viewport.scrollLeft = p(g, n.dir));
482
482
  }
483
483
  }
484
- ) : r === "vertical" ? /* @__PURE__ */ l(
484
+ ) : r === "vertical" ? /* @__PURE__ */ i(
485
485
  So,
486
486
  {
487
487
  ...f,
488
488
  ref: t,
489
489
  onThumbPositionChange: () => {
490
490
  if (n.viewport && s.current) {
491
- const g = n.viewport.scrollTop, a = gt(g, d);
491
+ const g = n.viewport.scrollTop, a = pt(g, d);
492
492
  s.current.style.transform = `translate3d(0, ${a}px, 0)`;
493
493
  }
494
494
  },
@@ -501,10 +501,10 @@ var yo = h.forwardRef((e, t) => {
501
501
  }
502
502
  ) : null;
503
503
  }), xo = h.forwardRef((e, t) => {
504
- const { sizes: r, onSizesChange: o, ...n } = e, s = K(re, e.__scopeScrollArea), [i, d] = h.useState(), c = h.useRef(null), u = oe(t, c, s.onScrollbarXChange);
504
+ const { sizes: r, onSizesChange: o, ...n } = e, s = K(re, e.__scopeScrollArea), [l, d] = h.useState(), c = h.useRef(null), u = oe(t, c, s.onScrollbarXChange);
505
505
  return h.useEffect(() => {
506
506
  c.current && d(getComputedStyle(c.current));
507
- }, [c]), /* @__PURE__ */ l(
507
+ }, [c]), /* @__PURE__ */ i(
508
508
  $t,
509
509
  {
510
510
  "data-orientation": "horizontal",
@@ -527,23 +527,23 @@ var yo = h.forwardRef((e, t) => {
527
527
  }
528
528
  },
529
529
  onResize: () => {
530
- c.current && s.viewport && i && o({
530
+ c.current && s.viewport && l && o({
531
531
  content: s.viewport.scrollWidth,
532
532
  viewport: s.viewport.offsetWidth,
533
533
  scrollbar: {
534
534
  size: c.current.clientWidth,
535
- paddingStart: Me(i.paddingLeft),
536
- paddingEnd: Me(i.paddingRight)
535
+ paddingStart: Me(l.paddingLeft),
536
+ paddingEnd: Me(l.paddingRight)
537
537
  }
538
538
  });
539
539
  }
540
540
  }
541
541
  );
542
542
  }), So = h.forwardRef((e, t) => {
543
- const { sizes: r, onSizesChange: o, ...n } = e, s = K(re, e.__scopeScrollArea), [i, d] = h.useState(), c = h.useRef(null), u = oe(t, c, s.onScrollbarYChange);
543
+ const { sizes: r, onSizesChange: o, ...n } = e, s = K(re, e.__scopeScrollArea), [l, d] = h.useState(), c = h.useRef(null), u = oe(t, c, s.onScrollbarYChange);
544
544
  return h.useEffect(() => {
545
545
  c.current && d(getComputedStyle(c.current));
546
- }, [c]), /* @__PURE__ */ l(
546
+ }, [c]), /* @__PURE__ */ i(
547
547
  $t,
548
548
  {
549
549
  "data-orientation": "vertical",
@@ -567,13 +567,13 @@ var yo = h.forwardRef((e, t) => {
567
567
  }
568
568
  },
569
569
  onResize: () => {
570
- c.current && s.viewport && i && o({
570
+ c.current && s.viewport && l && o({
571
571
  content: s.viewport.scrollHeight,
572
572
  viewport: s.viewport.offsetHeight,
573
573
  scrollbar: {
574
574
  size: c.current.clientHeight,
575
- paddingStart: Me(i.paddingTop),
576
- paddingEnd: Me(i.paddingBottom)
575
+ paddingStart: Me(l.paddingTop),
576
+ paddingEnd: Me(l.paddingBottom)
577
577
  }
578
578
  });
579
579
  }
@@ -585,14 +585,14 @@ var yo = h.forwardRef((e, t) => {
585
585
  sizes: o,
586
586
  hasThumb: n,
587
587
  onThumbChange: s,
588
- onThumbPointerUp: i,
588
+ onThumbPointerUp: l,
589
589
  onThumbPointerDown: d,
590
590
  onThumbPositionChange: c,
591
591
  onDragScroll: u,
592
592
  onWheelScroll: f,
593
593
  onResize: p,
594
594
  ...g
595
- } = e, a = K(re, r), [N, b] = h.useState(null), v = oe(t, (P) => b(P)), E = h.useRef(null), C = h.useRef(""), x = a.viewport, R = o.content - o.viewport, B = ie(f), I = ie(c), F = Fe(p, 10);
595
+ } = e, a = K(re, r), [N, b] = h.useState(null), v = oe(t, (P) => b(P)), E = h.useRef(null), C = h.useRef(""), x = a.viewport, R = o.content - o.viewport, B = le(f), I = le(c), F = Fe(p, 10);
596
596
  function A(P) {
597
597
  if (E.current) {
598
598
  const z = P.clientX - E.current.left, H = P.clientY - E.current.top;
@@ -605,17 +605,17 @@ var yo = h.forwardRef((e, t) => {
605
605
  (N == null ? void 0 : N.contains(H)) && B(z, R);
606
606
  };
607
607
  return document.addEventListener("wheel", P, { passive: !1 }), () => document.removeEventListener("wheel", P, { passive: !1 });
608
- }, [x, N, R, B]), h.useEffect(I, [o, I]), be(N, F), be(a.content, F), /* @__PURE__ */ l(
608
+ }, [x, N, R, B]), h.useEffect(I, [o, I]), be(N, F), be(a.content, F), /* @__PURE__ */ i(
609
609
  Co,
610
610
  {
611
611
  scope: r,
612
612
  scrollbar: N,
613
613
  hasThumb: n,
614
- onThumbChange: ie(s),
615
- onThumbPointerUp: ie(i),
614
+ onThumbChange: le(s),
615
+ onThumbPointerUp: le(l),
616
616
  onThumbPositionChange: I,
617
- onThumbPointerDown: ie(d),
618
- children: /* @__PURE__ */ l(
617
+ onThumbPointerDown: le(d),
618
+ children: /* @__PURE__ */ i(
619
619
  te.div,
620
620
  {
621
621
  ...g,
@@ -636,13 +636,13 @@ var yo = h.forwardRef((e, t) => {
636
636
  }), De = "ScrollAreaThumb", Wt = h.forwardRef(
637
637
  (e, t) => {
638
638
  const { forceMount: r, ...o } = e, n = Yt(De, e.__scopeScrollArea);
639
- return /* @__PURE__ */ l(ze, { present: r || n.hasThumb, children: /* @__PURE__ */ l(Eo, { ref: t, ...o }) });
639
+ return /* @__PURE__ */ i(ze, { present: r || n.hasThumb, children: /* @__PURE__ */ i(Eo, { ref: t, ...o }) });
640
640
  }
641
641
  ), Eo = h.forwardRef(
642
642
  (e, t) => {
643
- const { __scopeScrollArea: r, style: o, ...n } = e, s = K(De, r), i = Yt(De, r), { onThumbPositionChange: d } = i, c = oe(
643
+ const { __scopeScrollArea: r, style: o, ...n } = e, s = K(De, r), l = Yt(De, r), { onThumbPositionChange: d } = l, c = oe(
644
644
  t,
645
- (p) => i.onThumbChange(p)
645
+ (p) => l.onThumbChange(p)
646
646
  ), u = h.useRef(void 0), f = Fe(() => {
647
647
  u.current && (u.current(), u.current = void 0);
648
648
  }, 100);
@@ -657,10 +657,10 @@ var yo = h.forwardRef((e, t) => {
657
657
  };
658
658
  return d(), p.addEventListener("scroll", g), () => p.removeEventListener("scroll", g);
659
659
  }
660
- }, [s.viewport, f, d]), /* @__PURE__ */ l(
660
+ }, [s.viewport, f, d]), /* @__PURE__ */ i(
661
661
  te.div,
662
662
  {
663
- "data-state": i.hasThumb ? "visible" : "hidden",
663
+ "data-state": l.hasThumb ? "visible" : "hidden",
664
664
  ...n,
665
665
  ref: c,
666
666
  style: {
@@ -670,9 +670,9 @@ var yo = h.forwardRef((e, t) => {
670
670
  },
671
671
  onPointerDownCapture: $(e.onPointerDownCapture, (p) => {
672
672
  const a = p.target.getBoundingClientRect(), N = p.clientX - a.left, b = p.clientY - a.top;
673
- i.onThumbPointerDown({ x: N, y: b });
673
+ l.onThumbPointerDown({ x: N, y: b });
674
674
  }),
675
- onPointerUp: $(e.onPointerUp, i.onThumbPointerUp)
675
+ onPointerUp: $(e.onPointerUp, l.onThumbPointerUp)
676
676
  }
677
677
  );
678
678
  }
@@ -681,12 +681,12 @@ Wt.displayName = De;
681
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
- return r.type !== "scroll" && o ? /* @__PURE__ */ l(To, { ...e, ref: t }) : null;
684
+ return r.type !== "scroll" && o ? /* @__PURE__ */ i(To, { ...e, ref: t }) : null;
685
685
  }
686
686
  );
687
687
  Ut.displayName = ot;
688
688
  var To = h.forwardRef((e, t) => {
689
- const { __scopeScrollArea: r, ...o } = e, n = K(ot, r), [s, i] = h.useState(0), [d, c] = h.useState(0), u = !!(s && d);
689
+ const { __scopeScrollArea: r, ...o } = e, n = K(ot, r), [s, l] = h.useState(0), [d, c] = h.useState(0), u = !!(s && d);
690
690
  return be(n.scrollbarX, () => {
691
691
  var p;
692
692
  const f = ((p = n.scrollbarX) == null ? void 0 : p.offsetHeight) || 0;
@@ -694,8 +694,8 @@ var To = h.forwardRef((e, t) => {
694
694
  }), be(n.scrollbarY, () => {
695
695
  var p;
696
696
  const f = ((p = n.scrollbarY) == null ? void 0 : p.offsetWidth) || 0;
697
- n.onCornerWidthChange(f), i(f);
698
- }), u ? /* @__PURE__ */ l(
697
+ n.onCornerWidthChange(f), l(f);
698
+ }), u ? /* @__PURE__ */ i(
699
699
  te.div,
700
700
  {
701
701
  ...o,
@@ -724,12 +724,12 @@ function Be(e) {
724
724
  return Math.max(o, 18);
725
725
  }
726
726
  function No(e, t, r, o = "ltr") {
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];
727
+ const n = Be(r), s = n / 2, l = t || s, d = n - l, c = r.scrollbar.paddingStart + l, u = r.scrollbar.size - r.scrollbar.paddingEnd - d, f = r.content - r.viewport, p = o === "ltr" ? [0, f] : [f * -1, 0];
728
728
  return Kt([c, u], p)(e);
729
729
  }
730
- function gt(e, t, r = "ltr") {
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 = go(e, c);
732
- return Kt([0, i], [0, d])(u);
730
+ function pt(e, t, r = "ltr") {
731
+ const o = Be(t), n = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, s = t.scrollbar.size - n, l = t.content - t.viewport, d = s - o, c = r === "ltr" ? [0, l] : [l * -1, 0], u = go(e, c);
732
+ return Kt([0, l], [0, d])(u);
733
733
  }
734
734
  function Kt(e, t) {
735
735
  return (r) => {
@@ -745,19 +745,19 @@ var Ro = (e, t = () => {
745
745
  }) => {
746
746
  let r = { left: e.scrollLeft, top: e.scrollTop }, o = 0;
747
747
  return function n() {
748
- const s = { left: e.scrollLeft, top: e.scrollTop }, i = r.left !== s.left, d = r.top !== s.top;
749
- (i || d) && t(), r = s, o = window.requestAnimationFrame(n);
748
+ const s = { left: e.scrollLeft, top: e.scrollTop }, l = r.left !== s.left, d = r.top !== s.top;
749
+ (l || d) && t(), r = s, o = window.requestAnimationFrame(n);
750
750
  }(), () => window.cancelAnimationFrame(o);
751
751
  };
752
752
  function Fe(e, t) {
753
- const r = ie(e), o = h.useRef(0);
753
+ const r = le(e), o = h.useRef(0);
754
754
  return h.useEffect(() => () => window.clearTimeout(o.current), []), h.useCallback(() => {
755
755
  window.clearTimeout(o.current), o.current = window.setTimeout(r, t);
756
756
  }, [r, t]);
757
757
  }
758
758
  function be(e, t) {
759
- const r = ie(t);
760
- zr(() => {
759
+ const r = le(t);
760
+ Or(() => {
761
761
  let o = 0;
762
762
  if (e) {
763
763
  const n = new ResizeObserver(() => {
@@ -769,14 +769,14 @@ function be(e, t) {
769
769
  }
770
770
  }, [e, r]);
771
771
  }
772
- var Jt = Ht, Po = Gt, ko = 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
- /* @__PURE__ */ l(Po, { className: "h-full w-full rounded-[inherit]", children: t }),
775
- /* @__PURE__ */ l(Zt, {}),
776
- /* @__PURE__ */ l(ko, {})
772
+ var Zt = Ht, Po = Gt, ko = Ut;
773
+ const nt = h.forwardRef(({ className: e, children: t, ...r }, o) => /* @__PURE__ */ O(Zt, { ref: o, className: Te("relative overflow-hidden", e), ...r, children: [
774
+ /* @__PURE__ */ i(Po, { className: "h-full w-full rounded-[inherit]", children: t }),
775
+ /* @__PURE__ */ i(Jt, {}),
776
+ /* @__PURE__ */ i(ko, {})
777
777
  ] }));
778
- nt.displayName = Jt.displayName;
779
- const Zt = h.forwardRef(({ className: e, orientation: t = "vertical", ...r }, o) => /* @__PURE__ */ l(
778
+ nt.displayName = Zt.displayName;
779
+ const Jt = h.forwardRef(({ className: e, orientation: t = "vertical", ...r }, o) => /* @__PURE__ */ i(
780
780
  tt,
781
781
  {
782
782
  ref: o,
@@ -788,40 +788,40 @@ const Zt = h.forwardRef(({ className: e, orientation: t = "vertical", ...r }, o)
788
788
  e
789
789
  ),
790
790
  ...r,
791
- children: /* @__PURE__ */ l(Wt, { className: "relative flex-1 rounded-full bg-border" })
791
+ children: /* @__PURE__ */ i(Wt, { className: "relative flex-1 rounded-full bg-border" })
792
792
  }
793
793
  ));
794
- Zt.displayName = tt.displayName;
794
+ Jt.displayName = tt.displayName;
795
795
  const Io = () => {
796
796
  const { selected: e, actions: t } = ye((r) => {
797
- var s, i, d, c, u, f, p;
797
+ var s, l, d, c, u, f, p;
798
798
  const o = r.events.selected ? Array.from(r.events.selected)[0] : null;
799
799
  let n;
800
800
  return o && (n = {
801
801
  id: o,
802
- name: ((i = (s = r.nodes[o]) == null ? void 0 : s.data) == null ? void 0 : i.displayName) || ((c = (d = r.nodes[o]) == null ? void 0 : d.data) == null ? void 0 : c.name),
802
+ name: ((l = (s = r.nodes[o]) == null ? void 0 : s.data) == null ? void 0 : l.displayName) || ((c = (d = r.nodes[o]) == null ? void 0 : d.data) == null ? void 0 : c.name),
803
803
  settings: (f = (u = r.nodes[o]) == null ? void 0 : u.related) == null ? void 0 : f.settings,
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(xt, { children: [
807
+ return /* @__PURE__ */ i("div", { className: "h-full flex flex-col", children: e ? /* @__PURE__ */ O(wt, { 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
- /* @__PURE__ */ l("span", { className: "text-xs text-muted-foreground", children: "Selected" }),
811
- /* @__PURE__ */ l("h3", { className: "text-sm font-semibold", children: e.name })
810
+ /* @__PURE__ */ i("span", { className: "text-xs text-muted-foreground", children: "Selected" }),
811
+ /* @__PURE__ */ i("h3", { className: "text-sm font-semibold", children: e.name })
812
812
  ] }),
813
- e.isDeletable && /* @__PURE__ */ l(
813
+ e.isDeletable && /* @__PURE__ */ i(
814
814
  "button",
815
815
  {
816
816
  onClick: () => t.delete(e.id),
817
817
  className: "p-1.5 rounded hover:bg-destructive/10 text-destructive transition-colors",
818
818
  title: "Delete element",
819
- children: /* @__PURE__ */ l(uo, { className: "h-4 w-4" })
819
+ children: /* @__PURE__ */ i(uo, { className: "h-4 w-4" })
820
820
  }
821
821
  )
822
822
  ] }),
823
- /* @__PURE__ */ l(nt, { className: "flex-1 -mr-4 pr-4", children: e.settings && m.createElement(e.settings) })
824
- ] }) : /* @__PURE__ */ l("div", { className: "text-center py-8", children: /* @__PURE__ */ l("p", { className: "text-sm text-muted-foreground", children: "Select an element to edit its properties" }) }) });
823
+ /* @__PURE__ */ i(nt, { className: "flex-1 -mr-4 pr-4", children: e.settings && m.createElement(e.settings) })
824
+ ] }) : /* @__PURE__ */ i("div", { className: "text-center py-8", children: /* @__PURE__ */ i("p", { className: "text-sm text-muted-foreground", children: "Select an element to edit its properties" }) }) });
825
825
  }, Ao = (e) => {
826
826
  switch (e) {
827
827
  case "Container":
@@ -843,12 +843,12 @@ const Io = () => {
843
843
  case "Columns":
844
844
  return Dt;
845
845
  case "Link":
846
- return St;
846
+ return xt;
847
847
  default:
848
848
  return qe;
849
849
  }
850
850
  }, Qt = ({ nodeId: e, depth: t = 0, onDragStart: r, onDragOver: o, onDrop: n, draggedId: s }) => {
851
- const { node: i, actions: d, selectedNodeId: c, childNodes: u, parentId: f } = ye((S, de) => {
851
+ const { node: l, 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;
854
854
  return {
@@ -858,8 +858,8 @@ const Io = () => {
858
858
  parentId: q
859
859
  };
860
860
  }), [p, g] = Ee(!0), [a, N] = Ee(!1);
861
- if (!i) return null;
862
- const b = i.data.displayName || i.data.name || "Unknown", v = u.length > 0, E = c === e, C = e === "ROOT", x = Ao(b), R = s === e, B = i.data.isCanvas, I = (S) => {
861
+ if (!l) return null;
862
+ const b = l.data.displayName || l.data.name || "Unknown", v = u.length > 0, E = c === e, C = e === "ROOT", x = Ao(b), R = s === e, B = l.data.isCanvas, I = (S) => {
863
863
  S.stopPropagation(), C || d.selectNode(e);
864
864
  }, F = (S) => {
865
865
  S.stopPropagation(), g(!p);
@@ -889,14 +889,14 @@ const Io = () => {
889
889
  onDragLeave: z,
890
890
  onDrop: H,
891
891
  children: [
892
- !C && /* @__PURE__ */ l(lo, { className: "h-3 w-3 text-muted-foreground/50 cursor-grab active:cursor-grabbing" }),
893
- v ? /* @__PURE__ */ l("button", { onClick: F, className: "p-0.5 hover:bg-secondary rounded", children: p ? /* @__PURE__ */ l(Or, { className: "h-3 w-3" }) : /* @__PURE__ */ l(Br, { className: "h-3 w-3" }) }) : /* @__PURE__ */ l("span", { className: "w-4" }),
894
- /* @__PURE__ */ l(x, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }),
895
- /* @__PURE__ */ l("span", { className: `truncate ${C ? "font-medium" : ""}`, children: C ? "Root" : b })
892
+ !C && /* @__PURE__ */ i(io, { className: "h-3 w-3 text-muted-foreground/50 cursor-grab active:cursor-grabbing" }),
893
+ v ? /* @__PURE__ */ i("button", { onClick: F, className: "p-0.5 hover:bg-secondary rounded", children: p ? /* @__PURE__ */ i(Br, { className: "h-3 w-3" }) : /* @__PURE__ */ i(Fr, { className: "h-3 w-3" }) }) : /* @__PURE__ */ i("span", { className: "w-4" }),
894
+ /* @__PURE__ */ i(x, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }),
895
+ /* @__PURE__ */ i("span", { className: `truncate ${C ? "font-medium" : ""}`, children: C ? "Root" : b })
896
896
  ]
897
897
  }
898
898
  ),
899
- v && p && /* @__PURE__ */ l("div", { children: u.map((S) => /* @__PURE__ */ l(
899
+ v && p && /* @__PURE__ */ i("div", { children: u.map((S) => /* @__PURE__ */ i(
900
900
  Qt,
901
901
  {
902
902
  nodeId: S,
@@ -912,7 +912,7 @@ const Io = () => {
912
912
  }, Do = () => {
913
913
  const [e, t] = Ee(null), [r, o] = Ee(null), { nodeIds: n, actions: s } = ye((u) => ({
914
914
  nodeIds: Object.keys(u.nodes)
915
- })), i = (u, f) => {
915
+ })), l = (u, f) => {
916
916
  t(u), o(f);
917
917
  }, d = (u) => {
918
918
  if (e && u && e !== u)
@@ -926,28 +926,28 @@ const Io = () => {
926
926
  return /* @__PURE__ */ O("div", { className: "space-y-2", onDragEnd: () => {
927
927
  t(null), o(null);
928
928
  }, children: [
929
- /* @__PURE__ */ l("h3", { className: "text-sm font-medium text-muted-foreground", children: "Layers" }),
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(
929
+ /* @__PURE__ */ i("h3", { className: "text-sm font-medium text-muted-foreground", children: "Layers" }),
930
+ /* @__PURE__ */ i("div", { className: "border border-border rounded-lg p-2 max-h-[250px] overflow-y-auto bg-background", children: n.includes("ROOT") && /* @__PURE__ */ i(
931
931
  Qt,
932
932
  {
933
933
  nodeId: "ROOT",
934
- onDragStart: i,
934
+ onDragStart: l,
935
935
  onDrop: d,
936
936
  draggedId: e
937
937
  }
938
938
  ) }),
939
- /* @__PURE__ */ l("p", { className: "text-xs text-muted-foreground", children: "Drag to containers to reorder" })
939
+ /* @__PURE__ */ i("p", { className: "text-xs text-muted-foreground", children: "Drag to containers to reorder" })
940
940
  ] });
941
941
  };
942
942
  // @__NO_SIDE_EFFECTS__
943
- function vt(e) {
943
+ function gt(e) {
944
944
  const t = /* @__PURE__ */ Mo(e), r = h.forwardRef((o, n) => {
945
- const { children: s, ...i } = o, d = h.Children.toArray(s), c = d.find(Lo);
945
+ const { children: s, ...l } = o, d = h.Children.toArray(s), c = d.find(Lo);
946
946
  if (c) {
947
947
  const u = c.props.children, f = d.map((p) => p === c ? h.Children.count(u) > 1 ? h.Children.only(null) : h.isValidElement(u) ? u.props.children : null : p);
948
- return /* @__PURE__ */ l(t, { ...i, ref: n, children: h.isValidElement(u) ? h.cloneElement(u, void 0, f) : null });
948
+ return /* @__PURE__ */ i(t, { ...l, ref: n, children: h.isValidElement(u) ? h.cloneElement(u, void 0, f) : null });
949
949
  }
950
- return /* @__PURE__ */ l(t, { ...i, ref: n, children: s });
950
+ return /* @__PURE__ */ i(t, { ...l, ref: n, children: s });
951
951
  });
952
952
  return r.displayName = `${e}.Slot`, r;
953
953
  }
@@ -956,8 +956,8 @@ function Mo(e) {
956
956
  const t = h.forwardRef((r, o) => {
957
957
  const { children: n, ...s } = r;
958
958
  if (h.isValidElement(n)) {
959
- const i = Oo(n), d = zo(s, n.props);
960
- return n.type !== h.Fragment && (d.ref = o ? Fr(o, i) : i), h.cloneElement(n, d);
959
+ const l = Oo(n), d = zo(s, n.props);
960
+ return n.type !== h.Fragment && (d.ref = o ? Hr(o, l) : l), h.cloneElement(n, d);
961
961
  }
962
962
  return h.Children.count(n) > 1 ? h.Children.only(null) : null;
963
963
  });
@@ -987,22 +987,22 @@ function Bo(e) {
987
987
  const t = e + "CollectionProvider", [r, o] = Le(t), [n, s] = r(
988
988
  t,
989
989
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
990
- ), i = (b) => {
990
+ ), l = (b) => {
991
991
  const { scope: v, children: E } = b, C = m.useRef(null), x = m.useRef(/* @__PURE__ */ new Map()).current;
992
- return /* @__PURE__ */ l(n, { scope: v, itemMap: x, collectionRef: C, children: E });
992
+ return /* @__PURE__ */ i(n, { scope: v, itemMap: x, collectionRef: C, children: E });
993
993
  };
994
- i.displayName = t;
995
- const d = e + "CollectionSlot", c = /* @__PURE__ */ vt(d), u = m.forwardRef(
994
+ l.displayName = t;
995
+ const d = e + "CollectionSlot", c = /* @__PURE__ */ gt(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
- return /* @__PURE__ */ l(c, { ref: R, children: C });
998
+ return /* @__PURE__ */ i(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__ */ vt(f), a = m.forwardRef(
1002
+ const f = e + "CollectionItemSlot", p = "data-radix-collection-item", g = /* @__PURE__ */ gt(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
- return m.useEffect(() => (I.itemMap.set(R, { ref: R, ...x }), () => void I.itemMap.delete(R))), /* @__PURE__ */ l(g, { [p]: "", ref: B, children: C });
1005
+ return m.useEffect(() => (I.itemMap.set(R, { ref: R, ...x }), () => void I.itemMap.delete(R))), /* @__PURE__ */ i(g, { [p]: "", ref: B, children: C });
1006
1006
  }
1007
1007
  );
1008
1008
  a.displayName = f;
@@ -1018,16 +1018,16 @@ function Bo(e) {
1018
1018
  }, [v.collectionRef, v.itemMap]);
1019
1019
  }
1020
1020
  return [
1021
- { Provider: i, Slot: u, ItemSlot: a },
1021
+ { Provider: l, Slot: u, ItemSlot: a },
1022
1022
  N,
1023
1023
  o
1024
1024
  ];
1025
1025
  }
1026
- var Ke = "rovingFocusGroup.onEntryFocus", Fo = { bubbles: !1, cancelable: !0 }, Ne = "RovingFocusGroup", [Je, er, Ho] = Bo(Ne), [Vo, tr] = Le(
1026
+ var Ke = "rovingFocusGroup.onEntryFocus", Fo = { bubbles: !1, cancelable: !0 }, Ne = "RovingFocusGroup", [Ze, er, Ho] = Bo(Ne), [Vo, tr] = Le(
1027
1027
  Ne,
1028
1028
  [Ho]
1029
1029
  ), [Go, jo] = Vo(Ne), rr = h.forwardRef(
1030
- (e, t) => /* @__PURE__ */ l(Je.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(Je.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(Yo, { ...e, ref: t }) }) })
1030
+ (e, t) => /* @__PURE__ */ i(Ze.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ i(Ze.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ i(Yo, { ...e, ref: t }) }) })
1031
1031
  );
1032
1032
  rr.displayName = Ne;
1033
1033
  var Yo = h.forwardRef((e, t) => {
@@ -1036,23 +1036,23 @@ var Yo = h.forwardRef((e, t) => {
1036
1036
  orientation: o,
1037
1037
  loop: n = !1,
1038
1038
  dir: s,
1039
- currentTabStopId: i,
1039
+ currentTabStopId: l,
1040
1040
  defaultCurrentTabStopId: d,
1041
1041
  onCurrentTabStopIdChange: c,
1042
1042
  onEntryFocus: u,
1043
1043
  preventScrollOnEntryFocus: f = !1,
1044
1044
  ...p
1045
1045
  } = e, g = h.useRef(null), a = oe(t, g), N = Qe(s), [b, v] = Oe({
1046
- prop: i,
1046
+ prop: l,
1047
1047
  defaultProp: d ?? null,
1048
1048
  onChange: c,
1049
1049
  caller: Ne
1050
- }), [E, C] = h.useState(!1), x = ie(u), R = er(r), B = h.useRef(!1), [I, F] = h.useState(0);
1050
+ }), [E, C] = h.useState(!1), x = le(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)
1054
1054
  return A.addEventListener(Ke, x), () => A.removeEventListener(Ke, x);
1055
- }, [x]), /* @__PURE__ */ l(
1055
+ }, [x]), /* @__PURE__ */ i(
1056
1056
  Go,
1057
1057
  {
1058
1058
  scope: r,
@@ -1073,7 +1073,7 @@ var Yo = h.forwardRef((e, t) => {
1073
1073
  () => F((A) => A - 1),
1074
1074
  []
1075
1075
  ),
1076
- children: /* @__PURE__ */ l(
1076
+ children: /* @__PURE__ */ i(
1077
1077
  te.div,
1078
1078
  {
1079
1079
  tabIndex: E || I === 0 ? -1 : 0,
@@ -1109,20 +1109,20 @@ var Yo = h.forwardRef((e, t) => {
1109
1109
  focusable: o = !0,
1110
1110
  active: n = !1,
1111
1111
  tabStopId: s,
1112
- children: i,
1112
+ children: l,
1113
1113
  ...d
1114
- } = e, c = Hr(), u = s || c, f = jo(or, r), p = f.currentTabStopId === u, g = er(r), { onFocusableItemAdd: a, onFocusableItemRemove: N, currentTabStopId: b } = f;
1114
+ } = e, c = Vr(), u = s || c, f = jo(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();
1118
- }, [o, a, N]), /* @__PURE__ */ l(
1119
- Je.ItemSlot,
1118
+ }, [o, a, N]), /* @__PURE__ */ i(
1119
+ Ze.ItemSlot,
1120
1120
  {
1121
1121
  scope: r,
1122
1122
  id: u,
1123
1123
  focusable: o,
1124
1124
  active: n,
1125
- children: /* @__PURE__ */ l(
1125
+ children: /* @__PURE__ */ i(
1126
1126
  te.span,
1127
1127
  {
1128
1128
  tabIndex: p ? 0 : -1,
@@ -1153,7 +1153,7 @@ var Yo = h.forwardRef((e, t) => {
1153
1153
  setTimeout(() => ar(x));
1154
1154
  }
1155
1155
  }),
1156
- children: typeof i == "function" ? i({ isCurrentTabStop: p, hasTabStop: b != null }) : i
1156
+ children: typeof l == "function" ? l({ isCurrentTabStop: p, hasTabStop: b != null }) : l
1157
1157
  }
1158
1158
  )
1159
1159
  }
@@ -1188,71 +1188,71 @@ function Xo(e, t) {
1188
1188
  return e.map((r, o) => e[(t + o) % e.length]);
1189
1189
  }
1190
1190
  var Ko = rr, qo = nr, sr = "Toggle", at = h.forwardRef((e, t) => {
1191
- const { pressed: r, defaultPressed: o, onPressedChange: n, ...s } = e, [i, d] = Oe({
1191
+ const { pressed: r, defaultPressed: o, onPressedChange: n, ...s } = e, [l, d] = Oe({
1192
1192
  prop: r,
1193
1193
  onChange: n,
1194
1194
  defaultProp: o ?? !1,
1195
1195
  caller: sr
1196
1196
  });
1197
- return /* @__PURE__ */ l(
1197
+ return /* @__PURE__ */ i(
1198
1198
  te.button,
1199
1199
  {
1200
1200
  type: "button",
1201
- "aria-pressed": i,
1202
- "data-state": i ? "on" : "off",
1201
+ "aria-pressed": l,
1202
+ "data-state": l ? "on" : "off",
1203
1203
  "data-disabled": e.disabled ? "" : void 0,
1204
1204
  ...s,
1205
1205
  ref: t,
1206
1206
  onClick: $(e.onClick, () => {
1207
- e.disabled || d(!i);
1207
+ e.disabled || d(!l);
1208
1208
  })
1209
1209
  }
1210
1210
  );
1211
1211
  });
1212
1212
  at.displayName = sr;
1213
- var lr = at, ce = "ToggleGroup", [ir] = Le(ce, [
1213
+ var ir = at, ce = "ToggleGroup", [lr] = Le(ce, [
1214
1214
  tr
1215
1215
  ]), cr = tr(), st = m.forwardRef((e, t) => {
1216
1216
  const { type: r, ...o } = e;
1217
1217
  if (r === "single")
1218
- return /* @__PURE__ */ l(Jo, { ...o, ref: t });
1218
+ return /* @__PURE__ */ i(Zo, { ...o, ref: t });
1219
1219
  if (r === "multiple")
1220
- return /* @__PURE__ */ l(Zo, { ...o, ref: t });
1220
+ return /* @__PURE__ */ i(Jo, { ...o, ref: t });
1221
1221
  throw new Error(`Missing prop \`type\` expected on \`${ce}\``);
1222
1222
  });
1223
1223
  st.displayName = ce;
1224
- var [dr, ur] = ir(ce), Jo = m.forwardRef((e, t) => {
1224
+ var [dr, ur] = lr(ce), Zo = m.forwardRef((e, t) => {
1225
1225
  const {
1226
1226
  value: r,
1227
1227
  defaultValue: o,
1228
1228
  onValueChange: n = () => {
1229
1229
  },
1230
1230
  ...s
1231
- } = e, [i, d] = Oe({
1231
+ } = e, [l, d] = Oe({
1232
1232
  prop: r,
1233
1233
  defaultProp: o ?? "",
1234
1234
  onChange: n,
1235
1235
  caller: ce
1236
1236
  });
1237
- return /* @__PURE__ */ l(
1237
+ return /* @__PURE__ */ i(
1238
1238
  dr,
1239
1239
  {
1240
1240
  scope: e.__scopeToggleGroup,
1241
1241
  type: "single",
1242
- value: m.useMemo(() => i ? [i] : [], [i]),
1242
+ value: m.useMemo(() => l ? [l] : [], [l]),
1243
1243
  onItemActivate: d,
1244
1244
  onItemDeactivate: m.useCallback(() => d(""), [d]),
1245
- children: /* @__PURE__ */ l(fr, { ...s, ref: t })
1245
+ children: /* @__PURE__ */ i(fr, { ...s, ref: t })
1246
1246
  }
1247
1247
  );
1248
- }), Zo = m.forwardRef((e, t) => {
1248
+ }), Jo = m.forwardRef((e, t) => {
1249
1249
  const {
1250
1250
  value: r,
1251
1251
  defaultValue: o,
1252
1252
  onValueChange: n = () => {
1253
1253
  },
1254
1254
  ...s
1255
- } = e, [i, d] = Oe({
1255
+ } = e, [l, d] = Oe({
1256
1256
  prop: r,
1257
1257
  defaultProp: o ?? [],
1258
1258
  onChange: n,
@@ -1264,31 +1264,31 @@ var [dr, ur] = ir(ce), Jo = m.forwardRef((e, t) => {
1264
1264
  (f) => d((p = []) => p.filter((g) => g !== f)),
1265
1265
  [d]
1266
1266
  );
1267
- return /* @__PURE__ */ l(
1267
+ return /* @__PURE__ */ i(
1268
1268
  dr,
1269
1269
  {
1270
1270
  scope: e.__scopeToggleGroup,
1271
1271
  type: "multiple",
1272
- value: i,
1272
+ value: l,
1273
1273
  onItemActivate: c,
1274
1274
  onItemDeactivate: u,
1275
- children: /* @__PURE__ */ l(fr, { ...s, ref: t })
1275
+ children: /* @__PURE__ */ i(fr, { ...s, ref: t })
1276
1276
  }
1277
1277
  );
1278
1278
  });
1279
1279
  st.displayName = ce;
1280
- var [Qo, en] = ir(ce), fr = m.forwardRef(
1280
+ var [Qo, en] = lr(ce), fr = m.forwardRef(
1281
1281
  (e, t) => {
1282
1282
  const {
1283
1283
  __scopeToggleGroup: r,
1284
1284
  disabled: o = !1,
1285
1285
  rovingFocus: n = !0,
1286
1286
  orientation: s,
1287
- dir: i,
1287
+ dir: l,
1288
1288
  loop: d = !0,
1289
1289
  ...c
1290
- } = e, u = cr(r), f = Qe(i), p = { role: "group", dir: f, ...c };
1291
- return /* @__PURE__ */ l(Qo, { scope: r, rovingFocus: n, disabled: o, children: n ? /* @__PURE__ */ l(
1290
+ } = e, u = cr(r), f = Qe(l), p = { role: "group", dir: f, ...c };
1291
+ return /* @__PURE__ */ i(Qo, { scope: r, rovingFocus: n, disabled: o, children: n ? /* @__PURE__ */ i(
1292
1292
  Ko,
1293
1293
  {
1294
1294
  asChild: !0,
@@ -1296,31 +1296,31 @@ var [Qo, en] = ir(ce), fr = m.forwardRef(
1296
1296
  orientation: s,
1297
1297
  dir: f,
1298
1298
  loop: d,
1299
- children: /* @__PURE__ */ l(te.div, { ...p, ref: t })
1299
+ children: /* @__PURE__ */ i(te.div, { ...p, ref: t })
1300
1300
  }
1301
- ) : /* @__PURE__ */ l(te.div, { ...p, ref: t }) });
1301
+ ) : /* @__PURE__ */ i(te.div, { ...p, ref: t }) });
1302
1302
  }
1303
1303
  ), _e = "ToggleGroupItem", mr = m.forwardRef(
1304
1304
  (e, t) => {
1305
- const r = ur(_e, e.__scopeToggleGroup), o = en(_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
- return o.rovingFocus ? /* @__PURE__ */ l(
1305
+ const r = ur(_e, e.__scopeToggleGroup), o = en(_e, e.__scopeToggleGroup), n = cr(e.__scopeToggleGroup), s = r.value.includes(e.value), l = o.disabled || e.disabled, d = { ...e, pressed: s, disabled: l }, c = m.useRef(null);
1306
+ return o.rovingFocus ? /* @__PURE__ */ i(
1307
1307
  qo,
1308
1308
  {
1309
1309
  asChild: !0,
1310
1310
  ...n,
1311
- focusable: !i,
1311
+ focusable: !l,
1312
1312
  active: s,
1313
1313
  ref: c,
1314
- children: /* @__PURE__ */ l(bt, { ...d, ref: t })
1314
+ children: /* @__PURE__ */ i(vt, { ...d, ref: t })
1315
1315
  }
1316
- ) : /* @__PURE__ */ l(bt, { ...d, ref: t });
1316
+ ) : /* @__PURE__ */ i(vt, { ...d, ref: t });
1317
1317
  }
1318
1318
  );
1319
1319
  mr.displayName = _e;
1320
- var bt = m.forwardRef(
1320
+ var vt = m.forwardRef(
1321
1321
  (e, t) => {
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
- return /* @__PURE__ */ l(
1322
+ const { __scopeToggleGroup: r, value: o, ...n } = e, s = ur(_e, r), l = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, d = s.type === "single" ? l : void 0;
1323
+ return /* @__PURE__ */ i(
1324
1324
  at,
1325
1325
  {
1326
1326
  ...d,
@@ -1333,7 +1333,7 @@ var bt = m.forwardRef(
1333
1333
  );
1334
1334
  }
1335
1335
  ), hr = st, pr = mr;
1336
- const gr = Vr(
1336
+ const gr = Gr(
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,23 +1352,23 @@ const gr = Vr(
1352
1352
  size: "default"
1353
1353
  }
1354
1354
  }
1355
- ), tn = 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
- tn.displayName = lr.displayName;
1355
+ ), tn = h.forwardRef(({ className: e, variant: t, size: r, ...o }, n) => /* @__PURE__ */ i(ir, { ref: n, className: Te(gr({ variant: t, size: r, className: e })), ...o }));
1356
+ tn.displayName = ir.displayName;
1357
1357
  const vr = h.createContext({
1358
1358
  size: "default",
1359
1359
  variant: "default"
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 }) }));
1360
+ }), br = h.forwardRef(({ className: e, variant: t, size: r, children: o, ...n }, s) => /* @__PURE__ */ i(hr, { ref: s, className: Te("flex items-center justify-center gap-1", e), ...n, children: /* @__PURE__ */ i(vr.Provider, { value: { variant: t, size: r }, children: o }) }));
1361
1361
  br.displayName = hr.displayName;
1362
1362
  const yr = h.forwardRef(({ className: e, children: t, variant: r, size: o, ...n }, s) => {
1363
- const i = h.useContext(vr);
1364
- return /* @__PURE__ */ l(
1363
+ const l = h.useContext(vr);
1364
+ return /* @__PURE__ */ i(
1365
1365
  pr,
1366
1366
  {
1367
1367
  ref: s,
1368
1368
  className: Te(
1369
1369
  gr({
1370
- variant: i.variant || r,
1371
- size: i.size || o
1370
+ variant: l.variant || r,
1371
+ size: l.size || o
1372
1372
  }),
1373
1373
  e
1374
1374
  ),
@@ -1399,7 +1399,7 @@ var rn = (e) => {
1399
1399
  };
1400
1400
  return document.addEventListener("visibilitychange", r), () => window.removeEventListener("visibilitychange", r);
1401
1401
  }, []), e;
1402
- }, Ze = 1, fn = class {
1402
+ }, Je = 1, fn = class {
1403
1403
  constructor() {
1404
1404
  this.subscribe = (e) => (this.subscribers.push(e), () => {
1405
1405
  let t = this.subscribers.indexOf(e);
@@ -1410,15 +1410,15 @@ var rn = (e) => {
1410
1410
  this.publish(e), this.toasts = [...this.toasts, e];
1411
1411
  }, this.create = (e) => {
1412
1412
  var t;
1413
- let { message: r, ...o } = e, n = typeof (e == null ? void 0 : e.id) == "number" || ((t = e.id) == null ? void 0 : t.length) > 0 ? e.id : Ze++, s = this.toasts.find((d) => d.id === n), i = e.dismissible === void 0 ? !0 : e.dismissible;
1414
- return this.dismissedToasts.has(n) && this.dismissedToasts.delete(n), s ? this.toasts = this.toasts.map((d) => d.id === n ? (this.publish({ ...d, ...e, id: n, title: r }), { ...d, ...e, id: n, dismissible: i, title: r }) : d) : this.addToast({ title: r, ...o, dismissible: i, id: n }), n;
1413
+ let { message: r, ...o } = e, n = typeof (e == null ? void 0 : e.id) == "number" || ((t = e.id) == null ? void 0 : t.length) > 0 ? e.id : Je++, s = this.toasts.find((d) => d.id === n), l = e.dismissible === void 0 ? !0 : e.dismissible;
1414
+ return this.dismissedToasts.has(n) && this.dismissedToasts.delete(n), s ? this.toasts = this.toasts.map((d) => d.id === n ? (this.publish({ ...d, ...e, id: n, title: r }), { ...d, ...e, id: n, dismissible: l, title: r }) : d) : this.addToast({ title: r, ...o, dismissible: l, id: n }), n;
1415
1415
  }, this.dismiss = (e) => (this.dismissedToasts.add(e), e || this.toasts.forEach((t) => {
1416
1416
  this.subscribers.forEach((r) => r({ id: t.id, dismiss: !0 }));
1417
1417
  }), 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) => {
1418
1418
  if (!t) return;
1419
1419
  let r;
1420
1420
  t.loading !== void 0 && (r = this.create({ ...t, promise: e, type: "loading", message: t.loading, description: typeof t.description != "function" ? t.description : void 0 }));
1421
- let o = e instanceof Promise ? e : e(), n = r !== void 0, s, i = o.then(async (c) => {
1421
+ let o = e instanceof Promise ? e : e(), n = r !== void 0, s, l = o.then(async (c) => {
1422
1422
  if (s = ["resolve", c], m.isValidElement(c)) n = !1, this.create({ id: r, type: "default", message: c });
1423
1423
  else if (hn(c) && !c.ok) {
1424
1424
  n = !1;
@@ -1438,15 +1438,15 @@ var rn = (e) => {
1438
1438
  }).finally(() => {
1439
1439
  var c;
1440
1440
  n && (this.dismiss(r), r = void 0), (c = t.finally) == null || c.call(t);
1441
- }), d = () => new Promise((c, u) => i.then(() => s[0] === "reject" ? u(s[1]) : c(s[1])).catch(u));
1441
+ }), d = () => new Promise((c, u) => l.then(() => s[0] === "reject" ? u(s[1]) : c(s[1])).catch(u));
1442
1442
  return typeof r != "string" && typeof r != "number" ? { unwrap: d } : Object.assign(r, { unwrap: d });
1443
1443
  }, this.custom = (e, t) => {
1444
- let r = (t == null ? void 0 : t.id) || Ze++;
1444
+ let r = (t == null ? void 0 : t.id) || Je++;
1445
1445
  return this.create({ jsx: e(r), id: r, ...t }), r;
1446
1446
  }, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
1447
1447
  }
1448
1448
  }, Y = new fn(), mn = (e, t) => {
1449
- let r = (t == null ? void 0 : t.id) || Ze++;
1449
+ let r = (t == null ? void 0 : t.id) || Je++;
1450
1450
  return Y.addToast({ title: e, ...t, id: r }), r;
1451
1451
  }, hn = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", pn = mn, gn = () => Y.toasts, vn = () => Y.getActiveToasts(), bn = Object.assign(pn, { success: Y.success, info: Y.info, warning: Y.warning, error: Y.error, custom: Y.custom, message: Y.message, promise: Y.promise, dismiss: Y.dismiss, loading: Y.loading }, { getHistory: gn, getToasts: vn });
1452
1452
  function yn(e, { insertAt: t } = {}) {
@@ -1459,7 +1459,7 @@ yn(`: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 wn = 3, xn = "32px", Sn = "16px", yt = 4e3, Cn = 356, En = 14, Tn = 20, Nn = 200;
1462
+ var wn = 3, xn = "32px", Sn = "16px", bt = 4e3, Cn = 356, En = 14, Tn = 20, Nn = 200;
1463
1463
  function ee(...e) {
1464
1464
  return e.filter(Boolean).join(" ");
1465
1465
  }
@@ -1468,27 +1468,27 @@ function Rn(e) {
1468
1468
  return t && o.push(t), r && o.push(r), o;
1469
1469
  }
1470
1470
  var Pn = (e) => {
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), [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(() => {
1471
+ var t, r, o, n, s, l, 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), [it, Sr] = m.useState(!1), [Cr, lt] = m.useState(!1), [Er, je] = m.useState(0), [Tr, ct] = m.useState(0), Se = m.useRef(a.duration || G || bt), dt = m.useRef(null), fe = m.useRef(null), Nr = x === 0, Rr = x + 1 <= E, X = a.type, pe = a.dismissible !== !1, Pr = a.className || "", kr = a.descriptionClassName || "", Pe = m.useMemo(() => C.findIndex((y) => y.toastId === a.id) || 0, [C, a.id]), Ir = m.useMemo(() => {
1473
1473
  var y;
1474
1474
  return (y = a.closeButton) != null ? y : A;
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 = un(), 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(() => {
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), [Ar, Dr] = ne.split("-"), mt = m.useMemo(() => C.reduce((y, T, M) => M >= Pe ? y : y + T.height, 0), [C, Pe]), ht = un(), Mr = 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(() => {
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 dt(T), v((M) => [{ toastId: a.id, height: T, position: a.position }, ...M]), () => v((M) => M.filter((J) => J.toastId !== a.id));
1484
+ return ct(T), v((M) => [{ toastId: a.id, height: T, position: a.position }, ...M]), () => v((M) => M.filter((Z) => Z.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, 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]);
1491
+ y.style.height = T, ct(M), v((Z) => Z.find((J) => J.toastId === a.id) ? Z.map((J) => J.toastId === a.id ? { ...J, height: M } : J) : [{ toastId: a.id, height: M, position: a.position }, ...Z]);
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,49 +1498,49 @@ var Pn = (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 && pt ? (() => {
1502
- if (mt.current < Ye.current) {
1501
+ return B || b || k && ht ? (() => {
1502
+ if (ft.current < Ye.current) {
1503
1503
  let T = (/* @__PURE__ */ new Date()).getTime() - Ye.current;
1504
1504
  Se.current = Se.current - T;
1505
1505
  }
1506
- mt.current = (/* @__PURE__ */ new Date()).getTime();
1506
+ ft.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, pt, ae]), m.useEffect(() => {
1511
+ }, [B, b, a, X, k, ht, ae]), m.useEffect(() => {
1512
1512
  a.delete && ae();
1513
1513
  }, [ae, a.delete]);
1514
- function Mr() {
1514
+ function _r() {
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(nn, { 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": 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: () => {
1518
+ return m.createElement("li", { tabIndex: 0, ref: fe, className: ee(S, Pr, 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": Cr, "data-removed": we, "data-visible": Rr, "data-y-position": Ar, "data-x-position": Dr, "data-index": x, "data-front": Nr, "data-swiping": xe, "data-dismissible": pe, "data-type": X, "data-invert": Mr, "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 ? Er : ge.current}px`, "--initial-height": ue ? "auto" : `${Tr}px`, ...P, ...a.style }, onDragEnd: () => {
1519
1519
  Ge(!1), _(null), ve.current = null;
1520
1520
  }, onPointerDown: (y) => {
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 }));
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 }));
1522
1522
  }, onPointerUp: () => {
1523
- var y, T, M, J;
1523
+ var y, T, M, Z;
1524
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 = ut.current) == null ? void 0 : M.getTime()), Q = D === "x" ? Z : se, le = Math.abs(Q) / me;
1527
- if (Math.abs(Q) >= Tn || 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), ct(!1);
1526
+ let J = 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" ? J : se, ie = Math.abs(Q) / me;
1527
+ if (Math.abs(Q) >= Tn || ie > 0.11) {
1528
+ je(ge.current), (Z = a.onDismiss) == null || Z.call(a, a), he(D === "x" ? J > 0 ? "right" : "left" : se > 0 ? "down" : "up"), ae(), Sr(!0), lt(!1);
1529
1529
  return;
1530
1530
  }
1531
1531
  Ge(!1), _(null);
1532
1532
  }, onPointerMove: (y) => {
1533
- var T, M, J, Z;
1533
+ var T, M, Z, J;
1534
1534
  if (!ve.current || !pe || ((T = window.getSelection()) == null ? void 0 : T.toString().length) > 0) return;
1535
1535
  let se = y.clientY - ve.current.y, me = y.clientX - ve.current.x, Q = (M = e.swipeDirections) != null ? M : Rn(ne);
1536
1536
  !D && (Math.abs(me) > 1 || Math.abs(se) > 1) && _(Math.abs(me) > Math.abs(se) ? "x" : "y");
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) && 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
- } }, kr && !a.jsx ? m.createElement("button", { "aria-label": He, "data-disabled": $e, "data-close-button": !0, onClick: $e || !pe ? () => {
1537
+ let ie = { x: 0, y: 0 };
1538
+ D === "y" ? (Q.includes("top") || Q.includes("bottom")) && (Q.includes("top") && se < 0 || Q.includes("bottom") && se > 0) && (ie.y = se) : D === "x" && (Q.includes("left") || Q.includes("right")) && (Q.includes("left") && me < 0 || Q.includes("right") && me > 0) && (ie.x = me), (Math.abs(ie.x) > 0 || Math.abs(ie.y) > 0) && lt(!0), (Z = fe.current) == null || Z.style.setProperty("--swipe-amount-x", `${ie.x}px`), (J = fe.current) == null || J.style.setProperty("--swipe-amount-y", `${ie.y}px`);
1539
+ } }, Ir && !a.jsx ? m.createElement("button", { "aria-label": He, "data-disabled": $e, "data-close-button": !0, onClick: $e || !pe ? () => {
1540
1540
  } : () => {
1541
1541
  var y;
1542
1542
  ae(), (y = a.onDismiss) == null || y.call(a, a);
1543
- }, className: ee(w == null ? void 0 : w.closeButton, (n = a == null ? void 0 : a.classNames) == null ? void 0 : n.closeButton) }, (s = U == null ? void 0 : U.close) != null ? s : dn) : null, a.jsx || We(a.title) ? a.jsx ? a.jsx : typeof a.title == "function" ? a.title() : a.title : m.createElement(m.Fragment, null, X || a.icon || a.promise ? m.createElement("div", { "data-icon": "", className: ee(w == null ? void 0 : w.icon, (i = a == null ? void 0 : a.classNames) == null ? void 0 : i.icon) }, a.promise || a.type === "loading" && !a.icon ? a.icon || Mr() : null, a.type !== "loading" ? a.icon || (U == null ? void 0 : U[X]) || rn(X) : null) : null, m.createElement("div", { "data-content": "", className: ee(w == null ? void 0 : w.content, (d = a == null ? void 0 : a.classNames) == null ? void 0 : d.content) }, m.createElement("div", { "data-title": "", className: ee(w == null ? void 0 : w.title, (c = a == null ? void 0 : a.classNames) == null ? void 0 : c.title) }, typeof a.title == "function" ? a.title() : a.title), a.description ? m.createElement("div", { "data-description": "", className: ee(de, Pr, w == null ? void 0 : w.description, (u = a == null ? void 0 : a.classNames) == null ? void 0 : u.description) }, typeof a.description == "function" ? a.description() : a.description) : null), We(a.cancel) ? a.cancel : a.cancel && ke(a.cancel) ? m.createElement("button", { "data-button": !0, "data-cancel": !0, style: a.cancelButtonStyle || z, onClick: (y) => {
1543
+ }, className: ee(w == null ? void 0 : w.closeButton, (n = a == null ? void 0 : a.classNames) == null ? void 0 : n.closeButton) }, (s = U == null ? void 0 : U.close) != null ? s : dn) : null, a.jsx || We(a.title) ? a.jsx ? a.jsx : typeof a.title == "function" ? a.title() : a.title : m.createElement(m.Fragment, null, X || a.icon || a.promise ? m.createElement("div", { "data-icon": "", className: ee(w == null ? void 0 : w.icon, (l = a == null ? void 0 : a.classNames) == null ? void 0 : l.icon) }, a.promise || a.type === "loading" && !a.icon ? a.icon || _r() : null, a.type !== "loading" ? a.icon || (U == null ? void 0 : U[X]) || rn(X) : null) : null, m.createElement("div", { "data-content": "", className: ee(w == null ? void 0 : w.content, (d = a == null ? void 0 : a.classNames) == null ? void 0 : d.content) }, m.createElement("div", { "data-title": "", className: ee(w == null ? void 0 : w.title, (c = a == null ? void 0 : a.classNames) == null ? void 0 : c.title) }, typeof a.title == "function" ? a.title() : a.title), a.description ? m.createElement("div", { "data-description": "", className: ee(de, kr, w == null ? void 0 : w.description, (u = a == null ? void 0 : a.classNames) == null ? void 0 : u.description) }, typeof a.description == "function" ? a.description() : a.description) : null), We(a.cancel) ? a.cancel : a.cancel && ke(a.cancel) ? m.createElement("button", { "data-button": !0, "data-cancel": !0, style: a.cancelButtonStyle || z, onClick: (y) => {
1544
1544
  var T, M;
1545
1545
  ke(a.cancel) && pe && ((M = (T = a.cancel).onClick) == null || M.call(T, y), ae());
1546
1546
  }, className: ee(w == null ? void 0 : w.cancelButton, (f = a == null ? void 0 : a.classNames) == null ? void 0 : f.cancelButton) }, a.cancel.label) : null, We(a.action) ? a.action : a.action && ke(a.action) ? m.createElement("button", { "data-button": !0, "data-action": !0, style: a.actionButtonStyle || H, onClick: (y) => {
@@ -1548,7 +1548,7 @@ var Pn = (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 wt() {
1551
+ function yt() {
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;
@@ -1556,19 +1556,19 @@ function wt() {
1556
1556
  function kn(e, t) {
1557
1557
  let r = {};
1558
1558
  return [e, t].forEach((o, n) => {
1559
- let s = n === 1, i = s ? "--mobile-offset" : "--offset", d = s ? Sn : xn;
1559
+ let s = n === 1, l = s ? "--mobile-offset" : "--offset", d = s ? Sn : xn;
1560
1560
  function c(u) {
1561
1561
  ["top", "right", "bottom", "left"].forEach((f) => {
1562
- r[`${i}-${f}`] = typeof u == "number" ? `${u}px` : u;
1562
+ r[`${l}-${f}`] = typeof u == "number" ? `${u}px` : u;
1563
1563
  });
1564
1564
  }
1565
1565
  typeof o == "number" || typeof o == "string" ? c(o) : typeof o == "object" ? ["top", "right", "bottom", "left"].forEach((u) => {
1566
- o[u] === void 0 ? r[`${i}-${u}`] = d : r[`${i}-${u}`] = typeof o[u] == "number" ? `${o[u]}px` : o[u];
1566
+ o[u] === void 0 ? r[`${l}-${u}`] = d : r[`${l}-${u}`] = typeof o[u] == "number" ? `${o[u]}px` : o[u];
1567
1567
  }) : c(d);
1568
1568
  }), r;
1569
1569
  }
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 = wn, toastOptions: b, dir: v = wt(), gap: E = En, 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) => {
1570
+ Lr(function(e, t) {
1571
+ let { invert: r, position: o = "bottom-right", hotkey: n = ["altKey", "KeyT"], expand: s, closeButton: l, className: d, offset: c, mobileOffset: u, theme: f = "light", richColors: p, duration: g, style: a, visibleToasts: N = wn, toastOptions: b, dir: v = yt(), gap: E = En, 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" ? 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": `${Cn}px`, "--gap": `${E}px`, ...a, ...kn(c, u) }, onBlur: (L) => {
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": `${Cn}px`, "--gap": `${E}px`, ...a, ...kn(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);
@@ -1632,17 +1632,17 @@ _r(function(e, t) {
1632
1632
  L.target instanceof HTMLElement && L.target.dataset.dismissible === "false" || G(!0);
1633
1633
  }, onPointerUp: () => G(!1) }, I.filter((L) => !L.position && D === 0 || L.position === k).map((L, Ve) => {
1634
1634
  var we, Re;
1635
- return m.createElement(Pn, { key: L.id, icons: x, index: Ve, toast: L, defaultRichColors: p, duration: (we = b == null ? void 0 : b.duration) != null ? we : g, className: b == null ? void 0 : b.className, descriptionClassName: b == null ? void 0 : b.descriptionClassName, invert: r, visibleToasts: N, closeButton: (Re = b == null ? void 0 : b.closeButton) != null ? Re : i, interacting: de, position: k, style: b == null ? void 0 : b.style, unstyled: b == null ? void 0 : b.unstyled, classNames: b == null ? void 0 : b.classNames, cancelButtonStyle: b == null ? void 0 : b.cancelButtonStyle, actionButtonStyle: b == null ? void 0 : b.actionButtonStyle, removeToast: He, toasts: I.filter((xe) => xe.position == L.position), heights: P.filter((xe) => xe.position == L.position), setHeights: z, expandByDefault: s, gap: E, loadingIcon: C, expanded: H, pauseWhenPageIsHidden: B, swipeDirections: e.swipeDirections });
1635
+ return m.createElement(Pn, { key: L.id, icons: x, index: Ve, toast: L, defaultRichColors: p, duration: (we = b == null ? void 0 : b.duration) != null ? we : g, className: b == null ? void 0 : b.className, descriptionClassName: b == null ? void 0 : b.descriptionClassName, invert: r, visibleToasts: N, closeButton: (Re = b == null ? void 0 : b.closeButton) != null ? Re : l, interacting: de, position: k, style: b == null ? void 0 : b.style, unstyled: b == null ? void 0 : b.unstyled, classNames: b == null ? void 0 : b.classNames, cancelButtonStyle: b == null ? void 0 : b.cancelButtonStyle, actionButtonStyle: b == null ? void 0 : b.actionButtonStyle, removeToast: He, toasts: I.filter((xe) => xe.position == L.position), heights: P.filter((xe) => xe.position == L.position), setHeights: z, expandByDefault: s, gap: E, loadingIcon: C, expanded: H, pauseWhenPageIsHidden: B, swipeDirections: e.swipeDirections });
1636
1636
  })) : null;
1637
1637
  }));
1638
1638
  });
1639
1639
  const wr = {
1640
- mobile: { width: 375, icon: $r, label: "Mobile (375px)" },
1641
- tablet: { width: 768, icon: Yr, label: "Tablet (768px)" },
1642
- small: { width: 1024, icon: jr, label: "Small Desktop (1024px)" },
1643
- desktop: { width: "100%", icon: Gr, label: "Desktop (Full)" }
1640
+ mobile: { width: 375, icon: Wr, label: "Mobile (375px)" },
1641
+ tablet: { width: 768, icon: $r, label: "Tablet (768px)" },
1642
+ small: { width: 1024, icon: Yr, label: "Small Desktop (1024px)" },
1643
+ desktop: { width: "100%", icon: jr, label: "Desktop (Full)" }
1644
1644
  }, In = ({ onSave: e, deviceSize: t, onDeviceSizeChange: r }) => {
1645
- const { actions: o, query: n, canUndo: s, canRedo: i } = ye((c, u) => ({
1645
+ const { actions: o, query: n, canUndo: s, canRedo: l } = ye((c, u) => ({
1646
1646
  canUndo: u.history.canUndo(),
1647
1647
  canRedo: u.history.canRedo()
1648
1648
  })), d = () => {
@@ -1650,74 +1650,77 @@ const wr = {
1650
1650
  e == null || e(c), bn.success("Page saved successfully");
1651
1651
  };
1652
1652
  return /* @__PURE__ */ O("div", { className: "flex items-center gap-4", children: [
1653
- /* @__PURE__ */ l(Wr, { children: /* @__PURE__ */ l(
1653
+ /* @__PURE__ */ i(Ur, { children: /* @__PURE__ */ i(
1654
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(wr).map(([c, { icon: u, label: f }]) => /* @__PURE__ */ O(Ur, { children: [
1661
- /* @__PURE__ */ l(Xr, { asChild: !0, children: /* @__PURE__ */ l(
1660
+ children: Object.entries(wr).map(([c, { icon: u, label: f }]) => /* @__PURE__ */ O(Xr, { children: [
1661
+ /* @__PURE__ */ i(Kr, { asChild: !0, children: /* @__PURE__ */ i(
1662
1662
  yr,
1663
1663
  {
1664
1664
  value: c,
1665
1665
  size: "sm",
1666
1666
  className: "data-[state=on]:bg-background data-[state=on]:shadow-sm",
1667
- children: /* @__PURE__ */ l(u, { className: "h-4 w-4" })
1667
+ children: /* @__PURE__ */ i(u, { className: "h-4 w-4" })
1668
1668
  }
1669
1669
  ) }),
1670
- /* @__PURE__ */ l(Kr, { side: "bottom", children: /* @__PURE__ */ l("p", { children: f }) })
1670
+ /* @__PURE__ */ i(qr, { side: "bottom", children: /* @__PURE__ */ i("p", { children: f }) })
1671
1671
  ] }, c))
1672
1672
  }
1673
1673
  ) }),
1674
- /* @__PURE__ */ l("div", { className: "h-6 w-px bg-border" }),
1674
+ /* @__PURE__ */ i("div", { className: "h-6 w-px bg-border" }),
1675
1675
  /* @__PURE__ */ O("div", { className: "flex items-center gap-2", children: [
1676
- /* @__PURE__ */ l(
1676
+ /* @__PURE__ */ i(
1677
1677
  Ie,
1678
1678
  {
1679
1679
  variant: "outline",
1680
1680
  size: "sm",
1681
1681
  onClick: () => o.history.undo(),
1682
1682
  disabled: !s,
1683
- children: /* @__PURE__ */ l(fo, { className: "h-4 w-4" })
1683
+ children: /* @__PURE__ */ i(fo, { className: "h-4 w-4" })
1684
1684
  }
1685
1685
  ),
1686
- /* @__PURE__ */ l(
1686
+ /* @__PURE__ */ i(
1687
1687
  Ie,
1688
1688
  {
1689
1689
  variant: "outline",
1690
1690
  size: "sm",
1691
1691
  onClick: () => o.history.redo(),
1692
- disabled: !i,
1693
- children: /* @__PURE__ */ l(io, { className: "h-4 w-4" })
1692
+ disabled: !l,
1693
+ children: /* @__PURE__ */ i(lo, { className: "h-4 w-4" })
1694
1694
  }
1695
1695
  ),
1696
1696
  /* @__PURE__ */ O(Ie, { size: "sm", onClick: d, children: [
1697
- /* @__PURE__ */ l(co, { className: "h-4 w-4 mr-2" }),
1697
+ /* @__PURE__ */ i(co, { className: "h-4 w-4 mr-2" }),
1698
1698
  "Save"
1699
1699
  ] })
1700
1700
  ] })
1701
1701
  ] });
1702
- }, lt = ({ children: e, className: t }) => {
1702
+ }, An = ({ htmlJson: e }) => {
1703
+ const { actions: t } = ye();
1704
+ return e && t.deserialize(e), /* @__PURE__ */ i(Zr, { children: /* @__PURE__ */ i(Ce, { id: "mainBody", is: At, canvas: !0 }) });
1705
+ }, xr = ({ children: e, className: t }) => {
1703
1706
  const {
1704
1707
  connectors: { connect: r, drag: o },
1705
1708
  selected: n
1706
- } = qr((s) => ({
1709
+ } = Jr((s) => ({
1707
1710
  selected: s.events.selected
1708
1711
  }));
1709
- return /* @__PURE__ */ l(
1712
+ return /* @__PURE__ */ i(
1710
1713
  "div",
1711
1714
  {
1712
1715
  ref: (s) => {
1713
1716
  s && r(o(s));
1714
1717
  },
1715
- className: Jr("relative min-h-[100vh] bg-white", t || ""),
1718
+ className: Qr("relative min-h-[100vh] bg-white", t || ""),
1716
1719
  children: e
1717
1720
  }
1718
1721
  );
1719
1722
  };
1720
- lt.craft = {
1723
+ xr.craft = {
1721
1724
  props: {},
1722
1725
  displayName: "Body",
1723
1726
  isCanvas: !0,
@@ -1727,12 +1730,9 @@ lt.craft = {
1727
1730
  )
1728
1731
  }
1729
1732
  };
1730
- const An = ({ htmlJson: e = "{}" }) => {
1731
- const { actions: t } = ye();
1732
- return t.deserialize(e), /* @__PURE__ */ l(Zr, { children: /* @__PURE__ */ l(Ce, { id: "mainBody", is: lt, canvas: !0 }) });
1733
- }, zn = ({ initialData: e, onSave: t, onStateChange: r }) => {
1733
+ const zn = ({ initialData: e, onSave: t, onStateChange: r }) => {
1734
1734
  var c;
1735
- const o = Qr(), [n, s] = Ee("desktop"), i = ((c = wr[n]) == null ? void 0 : c.width) || "100%", d = (u) => {
1735
+ const o = eo(), [n, s] = Ee("desktop"), l = ((c = wr[n]) == null ? void 0 : c.width) || "100%", d = (u) => {
1736
1736
  if (r)
1737
1737
  try {
1738
1738
  const f = u.serialize();
@@ -1740,31 +1740,31 @@ const An = ({ htmlJson: e = "{}" }) => {
1740
1740
  } catch {
1741
1741
  }
1742
1742
  };
1743
- return /* @__PURE__ */ l(
1744
- eo,
1743
+ return /* @__PURE__ */ i(
1744
+ to,
1745
1745
  {
1746
1746
  resolver: {
1747
- Body: lt,
1747
+ Body: xr,
1748
1748
  Wrapper: oo,
1749
- Section: ro,
1749
+ Section: At,
1750
1750
  Container: Ae,
1751
- Text: Tt,
1752
- ButtonComponent: Nt,
1753
- Heading: Et,
1754
- Image: Pt,
1755
- Img: to,
1756
- Divider: It,
1757
- Spacer: At,
1758
- Video: kt,
1759
- Columns: Ct,
1760
- Link: Rt
1751
+ Text: Et,
1752
+ ButtonComponent: Tt,
1753
+ Heading: Ct,
1754
+ Image: Rt,
1755
+ Img: ro,
1756
+ Divider: kt,
1757
+ Spacer: It,
1758
+ Video: Pt,
1759
+ Columns: St,
1760
+ Link: Nt
1761
1761
  },
1762
1762
  enabled: !0,
1763
1763
  onNodesChange: (u) => d(u),
1764
- children: /* @__PURE__ */ l(no, { value: n, children: /* @__PURE__ */ l(ao, { value: o, children: /* @__PURE__ */ O("div", { className: "flex flex-col h-full", children: [
1764
+ children: /* @__PURE__ */ i(no, { value: n, children: /* @__PURE__ */ i(ao, { value: o, children: /* @__PURE__ */ O("div", { className: "flex flex-col h-full", children: [
1765
1765
  /* @__PURE__ */ O("div", { className: "flex items-center justify-between pb-4 border-b border-border", children: [
1766
- /* @__PURE__ */ l("h2", { className: "text-lg font-semibold", children: "Page Builder" }),
1767
- /* @__PURE__ */ l(
1766
+ /* @__PURE__ */ i("h2", { className: "text-lg font-semibold", children: "Page Builder" }),
1767
+ /* @__PURE__ */ i(
1768
1768
  In,
1769
1769
  {
1770
1770
  onSave: t,
@@ -1774,22 +1774,22 @@ const An = ({ htmlJson: e = "{}" }) => {
1774
1774
  )
1775
1775
  ] }),
1776
1776
  /* @__PURE__ */ O("div", { className: "flex gap-4 mt-4 flex-1 min-h-0", children: [
1777
- /* @__PURE__ */ l(Ue, { className: "w-56 shrink-0", children: /* @__PURE__ */ O(Xe, { className: "p-4 space-y-6", children: [
1778
- /* @__PURE__ */ l(ho, {}),
1779
- /* @__PURE__ */ l(Do, {})
1777
+ /* @__PURE__ */ i(Ue, { className: "w-56 shrink-0", children: /* @__PURE__ */ O(Xe, { className: "p-4 space-y-6", children: [
1778
+ /* @__PURE__ */ i(ho, {}),
1779
+ /* @__PURE__ */ i(Do, {})
1780
1780
  ] }) }),
1781
- /* @__PURE__ */ l(Ue, { className: "flex-1 overflow-hidden bg-muted/30 flex flex-col", children: /* @__PURE__ */ l(Xe, { className: "p-4 flex-1 flex justify-center overflow-hidden", children: /* @__PURE__ */ l(nt, { className: "h-full w-full", children: /* @__PURE__ */ l("div", { className: "flex justify-center min-h-full", children: /* @__PURE__ */ l(
1781
+ /* @__PURE__ */ i(Ue, { className: "flex-1 overflow-hidden bg-muted/30 flex flex-col", children: /* @__PURE__ */ i(Xe, { className: "p-4 flex-1 flex justify-center overflow-hidden", children: /* @__PURE__ */ i(nt, { className: "h-full w-full", children: /* @__PURE__ */ i("div", { className: "flex justify-center min-h-full", children: /* @__PURE__ */ i(
1782
1782
  "div",
1783
1783
  {
1784
1784
  className: "bg-white rounded-lg min-h-full p-4 border border-dashed border-border transition-all duration-300 shadow-sm",
1785
1785
  style: {
1786
- width: typeof i == "number" ? `${i}px` : i,
1786
+ width: typeof l == "number" ? `${l}px` : l,
1787
1787
  maxWidth: "100%"
1788
1788
  },
1789
- children: /* @__PURE__ */ l(An, { htmlJson: e })
1789
+ children: /* @__PURE__ */ i(An, { htmlJson: e })
1790
1790
  }
1791
1791
  ) }) }) }) }),
1792
- /* @__PURE__ */ l(Ue, { className: "w-72 shrink-0 flex flex-col", children: /* @__PURE__ */ l(Xe, { className: "p-4 flex-1 overflow-hidden", children: /* @__PURE__ */ l(Io, {}) }) })
1792
+ /* @__PURE__ */ i(Ue, { className: "w-72 shrink-0 flex flex-col", children: /* @__PURE__ */ i(Xe, { className: "p-4 flex-1 overflow-hidden", children: /* @__PURE__ */ i(Io, {}) }) })
1793
1793
  ] })
1794
1794
  ] }) }) })
1795
1795
  }