@tech_carthagos/page-builder 1.0.14 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/{CraftEditor-Grwj7M3H.js → CraftEditor-D2EBrpQi.js} +782 -858
  2. package/dist/CraftEditor-bE3h6p8p.cjs +72 -0
  3. package/dist/index-Bq79BZ9n.cjs +189 -0
  4. package/dist/{index-BU18TokA.js → index-C_JmCif3.js} +1793 -1810
  5. package/dist/index.cjs.js +1 -1
  6. package/dist/index.es.js +1 -1
  7. package/dist/styles.css +106 -1
  8. package/dist-types/components/ui/button.d.ts +12 -0
  9. package/dist-types/components/ui/button.d.ts.map +1 -0
  10. package/dist-types/components/ui/card.d.ts +9 -0
  11. package/dist-types/components/ui/card.d.ts.map +1 -0
  12. package/dist-types/components/ui/dialog.d.ts +20 -0
  13. package/dist-types/components/ui/dialog.d.ts.map +1 -0
  14. package/dist-types/components/ui/dropdown-menu.d.ts +28 -0
  15. package/dist-types/components/ui/dropdown-menu.d.ts.map +1 -0
  16. package/dist-types/components/ui/input.d.ts +4 -0
  17. package/dist-types/components/ui/input.d.ts.map +1 -0
  18. package/dist-types/components/ui/select.d.ts +14 -0
  19. package/dist-types/components/ui/select.d.ts.map +1 -0
  20. package/dist-types/editor/Toolbox.d.ts.map +1 -1
  21. package/dist-types/lib/utils.d.ts.map +1 -1
  22. package/dist-types/user/Container.d.ts +5 -2
  23. package/dist-types/user/Container.d.ts.map +1 -1
  24. package/dist-types/user/ContainerOld.d.ts +92 -1
  25. package/dist-types/user/ContainerOld.d.ts.map +1 -1
  26. package/dist-types/user/Div.d.ts +11 -4
  27. package/dist-types/user/Div.d.ts.map +1 -1
  28. package/dist-types/user/Wrapper.d.ts +5 -2
  29. package/dist-types/user/Wrapper.d.ts.map +1 -1
  30. package/package.json +9 -4
  31. package/dist/CraftEditor-xRtkY2_B.cjs +0 -72
  32. package/dist/index-CyIoH_7r.cjs +0 -189
@@ -1,15 +1,15 @@
1
- import { jsx as l, jsxs as B, Fragment as Et } from "react/jsx-runtime";
1
+ import { jsx as l, jsxs as F, Fragment as Ct } from "react/jsx-runtime";
2
2
  import * as p from "react";
3
- import m, { useState as Ne, forwardRef as Vo, isValidElement as Ue, useEffect as jo } from "react";
4
- import { c as Y, N as Je, a as Nt, C as Tt, P as xe, B as De, L as Rt, F as Go, k as ie, b as Ae, d as Pt, S as kt, W as et, H as It, T as Dt, e as At, f as Mt, I as _t, V as Lt, D as zt, g as $t, u as re, h as ze, i as te, j as $e, l as W, m as ce, n as Wo, o as Te, p as Yo, q as Uo, r as Xo, s as Ko, t as Oe, v as qo, w as Qo, M as Zo, x as Jo, y as er, z as tr, A as or, E as rr, G as nr, J as ar, K as sr, O as lr, Q as ir, R as cr, U as dr, X as Xe, Y as Ke } from "./index-BU18TokA.js";
5
- import ur from "react-dom";
3
+ import m, { useState as Ee, forwardRef as Br, isValidElement as Ye, useEffect as Fr } from "react";
4
+ import { c as Y, N as Qe, a as Et, d as Hr, C as Nt, b as Vr, P as ye, B as Ie, L as Tt, F as $r, k as Ae, W as Je, e as Rt, H as Pt, T as kt, f as It, g as At, I as Dt, V as Mt, D as _t, S as Lt, u as oe, h as Le, i as te, j as ze, l as W, m as ie, n as jr, o as Ne, p as Gr, q as Wr, r as Yr, s as Ur, t as Oe, v as Xr, w as Kr, M as qr, x as Zr, y as Qr, z as Jr, A as eo, E as to, G as ro, J as oo, K as no, O as ao, Q as so, R as lo, U as io, X as co, Y as uo, Z as Ue, _ as Xe } from "./index-C_JmCif3.js";
5
+ import fo from "react-dom";
6
6
  /**
7
7
  * @license lucide-react v0.462.0 - ISC
8
8
  *
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 Ot = Y("Columns2", [
12
+ const mo = Y("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
  ]);
@@ -19,7 +19,7 @@ const Ot = Y("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 fr = Y("GripVertical", [
22
+ const po = Y("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" }],
@@ -33,7 +33,7 @@ const fr = Y("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 Bt = Y("Heading", [
36
+ const zt = Y("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 Bt = Y("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 Ft = Y("Image", [
47
+ const Ot = Y("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 Ft = Y("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 Ht = Y("Minus", [["path", { d: "M5 12h14", key: "1ays0h" }]]);
58
+ const Bt = Y("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 Vt = Y("MousePointer", [
65
+ const Ft = Y("MousePointer", [
66
66
  ["path", { d: "M12.586 12.586 19 19", key: "ea5xo7" }],
67
67
  [
68
68
  "path",
@@ -78,7 +78,7 @@ const Vt = Y("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 jt = Y("MoveVertical", [
81
+ const Ht = Y("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" }]
@@ -89,7 +89,7 @@ const jt = Y("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 mr = Y("Redo2", [
92
+ const ho = Y("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
  ]);
@@ -99,7 +99,7 @@ const mr = Y("Redo2", [
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
101
  */
102
- const pr = Y("Save", [
102
+ const go = Y("Save", [
103
103
  [
104
104
  "path",
105
105
  {
@@ -116,7 +116,7 @@ const pr = Y("Save", [
116
116
  * This source code is licensed under the ISC license.
117
117
  * See the LICENSE file in the root directory of this source tree.
118
118
  */
119
- const ye = Y("Square", [
119
+ const Ce = Y("Square", [
120
120
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
121
121
  ]);
122
122
  /**
@@ -125,7 +125,7 @@ const ye = Y("Square", [
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
127
  */
128
- const hr = Y("Trash2", [
128
+ const vo = Y("Trash2", [
129
129
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
130
130
  ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
131
131
  ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
@@ -138,7 +138,7 @@ const hr = Y("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 Gt = Y("Type", [
141
+ const Vt = Y("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" }]
@@ -149,7 +149,7 @@ const Gt = Y("Type", [
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
151
  */
152
- const gr = Y("Undo2", [
152
+ const bo = Y("Undo2", [
153
153
  ["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
154
154
  ["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
155
155
  ]);
@@ -159,7 +159,7 @@ const gr = Y("Undo2", [
159
159
  * This source code is licensed under the ISC license.
160
160
  * See the LICENSE file in the root directory of this source tree.
161
161
  */
162
- const vr = Y("Video", [
162
+ const yo = Y("Video", [
163
163
  [
164
164
  "path",
165
165
  {
@@ -168,247 +168,171 @@ const vr = Y("Video", [
168
168
  }
169
169
  ],
170
170
  ["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2", key: "158x01" }]
171
- ]), tt = ({
172
- className: e,
173
- backgroundColor: t = "transparent",
174
- backgroundImage: o = "",
175
- backgroundSize: r = "cover",
176
- backgroundRepeat: n = "no-repeat",
177
- padding: s = { top: 16, right: 16, bottom: 16, left: 16 },
178
- margin: i = { top: 0, right: 0, bottom: 0, left: 0 },
179
- width: c = "auto",
180
- minHeight: d = 100,
181
- maxWidth: u = "none",
182
- display: f = "block",
183
- flexDirection: h = "column",
184
- justifyContent: g = "flex-start",
185
- alignItems: a = "stretch",
186
- gap: N = 0,
187
- borderRadius: v = 8,
188
- borderWidth: b = 1,
189
- borderColor: C = "transparent",
190
- borderStyle: S = "dashed",
191
- boxShadow: w = "none",
192
- children: T
193
- }) => {
171
+ ]), et = (e) => {
194
172
  const {
195
- connectors: { connect: z, drag: R },
196
- selected: k
197
- } = Je((M) => ({
198
- selected: M.events.selected
199
- })), D = typeof s == "object" ? `${s.top}px ${s.right}px ${s.bottom}px ${s.left}px` : `${s}px`, P = typeof i == "object" ? `${i.top}px ${i.right}px ${i.bottom}px ${i.left}px` : `${i}px`;
173
+ connectors: { connect: t, drag: r },
174
+ selected: o
175
+ } = Qe((n) => ({
176
+ selected: n.events.selected
177
+ }));
200
178
  return /* @__PURE__ */ l(
201
179
  "div",
202
180
  {
203
- style: {
204
- backgroundColor: t,
205
- backgroundImage: o ? `url(${o})` : "none",
206
- backgroundSize: r,
207
- backgroundRepeat: n,
208
- padding: D,
209
- margin: P,
210
- width: c === "auto" ? "100%" : c,
211
- minHeight: `${d}px`,
212
- maxWidth: u === "none" ? "none" : `${u}px`,
213
- display: f,
214
- flexDirection: f === "flex" ? h : void 0,
215
- justifyContent: f === "flex" ? g : void 0,
216
- alignItems: f === "flex" ? a : void 0,
217
- gap: f === "flex" ? `${N}px` : void 0,
218
- borderRadius: `${v}px`,
219
- borderWidth: `${b}px`,
220
- borderColor: C,
221
- borderStyle: S,
222
- boxShadow: w === "none" ? "none" : w
223
- },
224
- className: Nt(
225
- e,
226
- `${k ? "ring-2 ring-primary ring-offset-2" : ""}`
181
+ style: Hr(e),
182
+ className: Et(
183
+ e.className,
184
+ `${o ? "outline outline-blue-500" : ""}`
227
185
  ),
228
- ref: (M) => {
229
- M && z(R(M));
186
+ ref: (n) => {
187
+ n && t(r(n));
230
188
  },
231
- children: T
189
+ children: e.children
232
190
  }
233
191
  );
234
192
  };
235
- tt.craft = {
193
+ et.craft = {
236
194
  isCanvas: !0,
237
- props: {
238
- ClassName: "p-4",
239
- backgroundColor: "transparent",
240
- backgroundImage: "",
241
- backgroundSize: "cover",
242
- backgroundRepeat: "no-repeat",
243
- padding: { top: 16, right: 16, bottom: 16, left: 16 },
244
- margin: { top: 0, right: 0, bottom: 0, left: 0 },
245
- width: "auto",
246
- minHeight: 100,
247
- maxWidth: "none",
248
- display: "block",
249
- flexDirection: "column",
250
- justifyContent: "flex-start",
251
- alignItems: "stretch",
252
- gap: 0,
253
- borderRadius: 8,
254
- borderWidth: 1,
255
- borderColor: "transparent",
256
- borderStyle: "dashed",
257
- boxShadow: "none"
258
- },
259
- related: { settings: Tt }
195
+ props: Vr,
196
+ related: { settings: Nt }
260
197
  };
261
- const br = () => {
262
- const { connectors: e } = xe(), t = [
198
+ const wo = () => {
199
+ const { connectors: e } = ye(), t = [
263
200
  {
264
- name: "Div",
265
- icon: ye,
266
- element: /* @__PURE__ */ l(ie, { is: tt, canvas: !0 })
201
+ name: "Wrapper",
202
+ icon: Ce,
203
+ element: /* @__PURE__ */ l(Ae, { is: Je, canvas: !0 })
267
204
  },
268
205
  {
269
206
  name: "Container",
270
- icon: ye,
271
- element: /* @__PURE__ */ l(ie, { is: Ae, canvas: !0 })
272
- },
273
- {
274
- name: "Columns",
275
- icon: Ot,
276
- element: /* @__PURE__ */ B(ie, { is: Pt, canvas: !0, children: [
277
- /* @__PURE__ */ l(ie, { is: Ae, canvas: !0 }),
278
- /* @__PURE__ */ l(ie, { is: Ae, canvas: !0 })
279
- ] })
207
+ icon: Ce,
208
+ element: /* @__PURE__ */ l(Ae, { is: Rt, canvas: !0 })
280
209
  },
281
210
  {
282
- name: "Section",
283
- icon: ye,
284
- element: /* @__PURE__ */ l(ie, { is: kt, canvas: !0 })
285
- },
286
- {
287
- name: "Wrapper",
288
- icon: ye,
289
- element: /* @__PURE__ */ l(ie, { is: et, canvas: !0 })
211
+ name: "Div",
212
+ icon: Ce,
213
+ element: /* @__PURE__ */ l(Ae, { is: et, canvas: !0 })
290
214
  }
291
- ], o = [
215
+ ], r = [
292
216
  {
293
217
  name: "Heading",
294
- icon: Bt,
295
- element: /* @__PURE__ */ l(It, {})
218
+ icon: zt,
219
+ element: /* @__PURE__ */ l(Pt, {})
296
220
  },
297
221
  {
298
222
  name: "Text",
299
- icon: Gt,
300
- element: /* @__PURE__ */ l(Dt, {})
223
+ icon: Vt,
224
+ element: /* @__PURE__ */ l(kt, {})
301
225
  },
302
226
  {
303
227
  name: "Button",
304
- icon: Vt,
305
- element: /* @__PURE__ */ l(At, {})
228
+ icon: Ft,
229
+ element: /* @__PURE__ */ l(It, {})
306
230
  },
307
231
  {
308
232
  name: "Link",
309
- icon: Rt,
310
- element: /* @__PURE__ */ l(Mt, {})
233
+ icon: Tt,
234
+ element: /* @__PURE__ */ l(At, {})
311
235
  }
312
- ], r = [
236
+ ], o = [
313
237
  {
314
238
  name: "Image",
315
- icon: Ft,
316
- element: /* @__PURE__ */ l(_t, {})
239
+ icon: Ot,
240
+ element: /* @__PURE__ */ l(Dt, {})
317
241
  },
318
242
  {
319
243
  name: "Video",
320
- icon: Go,
321
- element: /* @__PURE__ */ l(Lt, {})
244
+ icon: $r,
245
+ element: /* @__PURE__ */ l(Mt, {})
322
246
  }
323
247
  ], n = [
324
248
  {
325
249
  name: "Divider",
326
- icon: Ht,
327
- element: /* @__PURE__ */ l(zt, {})
250
+ icon: Bt,
251
+ element: /* @__PURE__ */ l(_t, {})
328
252
  },
329
253
  {
330
254
  name: "Spacer",
331
- icon: jt,
332
- element: /* @__PURE__ */ l($t, {})
255
+ icon: Ht,
256
+ element: /* @__PURE__ */ l(Lt, {})
333
257
  }
334
- ], s = (i, c) => /* @__PURE__ */ B("div", { className: "space-y-2", children: [
258
+ ], s = (i, d) => /* @__PURE__ */ F("div", { className: "space-y-2", children: [
335
259
  /* @__PURE__ */ l("span", { className: "text-xs text-muted-foreground/70", children: i }),
336
- /* @__PURE__ */ l("div", { className: "grid grid-cols-2 gap-1.5", children: c.map((d) => /* @__PURE__ */ B(
337
- De,
260
+ /* @__PURE__ */ l("div", { className: "grid grid-cols-2 gap-1.5", children: d.map((c) => /* @__PURE__ */ F(
261
+ Ie,
338
262
  {
339
263
  variant: "outline",
340
264
  size: "sm",
341
265
  className: "flex flex-col items-center justify-center h-14 cursor-grab active:cursor-grabbing text-muted-foreground hover:text-foreground",
342
- ref: (u) => u && e.create(u, d.element),
266
+ ref: (u) => u && e.create(u, c.element),
343
267
  children: [
344
- /* @__PURE__ */ l(d.icon, { className: "h-4 w-4 mb-1" }),
345
- /* @__PURE__ */ l("span", { className: "text-[10px]", children: d.name })
268
+ /* @__PURE__ */ l(c.icon, { className: "h-4 w-4 mb-1" }),
269
+ /* @__PURE__ */ l("span", { className: "text-[10px]", children: c.name })
346
270
  ]
347
271
  },
348
- d.name
272
+ c.name
349
273
  )) })
350
274
  ] });
351
- return /* @__PURE__ */ B("div", { className: "space-y-4", children: [
275
+ return /* @__PURE__ */ F("div", { className: "space-y-4", children: [
352
276
  /* @__PURE__ */ l("h3", { className: "text-sm font-medium text-muted-foreground", children: "Components" }),
353
277
  s("Layout", t),
354
- s("Basic", o),
355
- s("Media", r),
278
+ s("Basic", r),
279
+ s("Media", o),
356
280
  s("Utility", n)
357
281
  ] });
358
282
  };
359
- var yr = p.createContext(void 0);
360
- function ot(e) {
361
- const t = p.useContext(yr);
283
+ var xo = p.createContext(void 0);
284
+ function tt(e) {
285
+ const t = p.useContext(xo);
362
286
  return e || t || "ltr";
363
287
  }
364
- function wr(e, [t, o]) {
365
- return Math.min(o, Math.max(t, e));
288
+ function So(e, [t, r]) {
289
+ return Math.min(r, Math.max(t, e));
366
290
  }
367
- function xr(e, t) {
368
- return p.useReducer((o, r) => t[o][r] ?? o, e);
291
+ function Co(e, t) {
292
+ return p.useReducer((r, o) => t[r][o] ?? r, e);
369
293
  }
370
- var rt = "ScrollArea", [Wt] = ze(rt), [Sr, K] = Wt(rt), Yt = p.forwardRef(
294
+ var rt = "ScrollArea", [$t] = Le(rt), [Eo, K] = $t(rt), jt = p.forwardRef(
371
295
  (e, t) => {
372
296
  const {
373
- __scopeScrollArea: o,
374
- type: r = "hover",
297
+ __scopeScrollArea: r,
298
+ type: o = "hover",
375
299
  dir: n,
376
300
  scrollHideDelay: s = 600,
377
301
  ...i
378
- } = e, [c, d] = p.useState(null), [u, f] = p.useState(null), [h, g] = p.useState(null), [a, N] = p.useState(null), [v, b] = p.useState(null), [C, S] = p.useState(0), [w, T] = p.useState(0), [z, R] = p.useState(!1), [k, D] = p.useState(!1), P = re(t, (F) => d(F)), M = ot(n);
302
+ } = e, [d, c] = p.useState(null), [u, f] = p.useState(null), [h, g] = p.useState(null), [a, N] = p.useState(null), [v, b] = p.useState(null), [E, C] = p.useState(0), [x, T] = p.useState(0), [O, R] = p.useState(!1), [A, D] = p.useState(!1), k = oe(t, (H) => c(H)), B = tt(n);
379
303
  return /* @__PURE__ */ l(
380
- Sr,
304
+ Eo,
381
305
  {
382
- scope: o,
383
- type: r,
384
- dir: M,
306
+ scope: r,
307
+ type: o,
308
+ dir: B,
385
309
  scrollHideDelay: s,
386
- scrollArea: c,
310
+ scrollArea: d,
387
311
  viewport: u,
388
312
  onViewportChange: f,
389
313
  content: h,
390
314
  onContentChange: g,
391
315
  scrollbarX: a,
392
316
  onScrollbarXChange: N,
393
- scrollbarXEnabled: z,
317
+ scrollbarXEnabled: O,
394
318
  onScrollbarXEnabledChange: R,
395
319
  scrollbarY: v,
396
320
  onScrollbarYChange: b,
397
- scrollbarYEnabled: k,
321
+ scrollbarYEnabled: A,
398
322
  onScrollbarYEnabledChange: D,
399
- onCornerWidthChange: S,
323
+ onCornerWidthChange: C,
400
324
  onCornerHeightChange: T,
401
325
  children: /* @__PURE__ */ l(
402
326
  te.div,
403
327
  {
404
- dir: M,
328
+ dir: B,
405
329
  ...i,
406
- ref: P,
330
+ ref: k,
407
331
  style: {
408
332
  position: "relative",
409
333
  // Pass corner sizes as CSS vars to reduce re-renders of context consumers
410
- "--radix-scroll-area-corner-width": C + "px",
411
- "--radix-scroll-area-corner-height": w + "px",
334
+ "--radix-scroll-area-corner-width": E + "px",
335
+ "--radix-scroll-area-corner-height": x + "px",
412
336
  ...e.style
413
337
  }
414
338
  }
@@ -417,11 +341,11 @@ var rt = "ScrollArea", [Wt] = ze(rt), [Sr, K] = Wt(rt), Yt = p.forwardRef(
417
341
  );
418
342
  }
419
343
  );
420
- Yt.displayName = rt;
421
- var Ut = "ScrollAreaViewport", Xt = p.forwardRef(
344
+ jt.displayName = rt;
345
+ var Gt = "ScrollAreaViewport", Wt = p.forwardRef(
422
346
  (e, t) => {
423
- const { __scopeScrollArea: o, children: r, nonce: n, ...s } = e, i = K(Ut, o), c = p.useRef(null), d = re(t, c, i.onViewportChange);
424
- return /* @__PURE__ */ B(Et, { children: [
347
+ const { __scopeScrollArea: r, children: o, nonce: n, ...s } = e, i = K(Gt, r), d = p.useRef(null), c = oe(t, d, i.onViewportChange);
348
+ return /* @__PURE__ */ F(Ct, { children: [
425
349
  /* @__PURE__ */ l(
426
350
  "style",
427
351
  {
@@ -436,7 +360,7 @@ var Ut = "ScrollAreaViewport", Xt = p.forwardRef(
436
360
  {
437
361
  "data-radix-scroll-area-viewport": "",
438
362
  ...s,
439
- ref: d,
363
+ ref: c,
440
364
  style: {
441
365
  /**
442
366
  * We don't support `visible` because the intention is to have at least one scrollbar
@@ -453,47 +377,47 @@ var Ut = "ScrollAreaViewport", Xt = p.forwardRef(
453
377
  overflowY: i.scrollbarYEnabled ? "scroll" : "hidden",
454
378
  ...e.style
455
379
  },
456
- children: /* @__PURE__ */ l("div", { ref: i.onContentChange, style: { minWidth: "100%", display: "table" }, children: r })
380
+ children: /* @__PURE__ */ l("div", { ref: i.onContentChange, style: { minWidth: "100%", display: "table" }, children: o })
457
381
  }
458
382
  )
459
383
  ] });
460
384
  }
461
385
  );
462
- Xt.displayName = Ut;
463
- var oe = "ScrollAreaScrollbar", nt = p.forwardRef(
386
+ Wt.displayName = Gt;
387
+ var re = "ScrollAreaScrollbar", ot = p.forwardRef(
464
388
  (e, t) => {
465
- const { forceMount: o, ...r } = e, n = K(oe, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = n, c = e.orientation === "horizontal";
466
- return p.useEffect(() => (c ? s(!0) : i(!0), () => {
467
- c ? s(!1) : i(!1);
468
- }), [c, s, i]), n.type === "hover" ? /* @__PURE__ */ l(Cr, { ...r, ref: t, forceMount: o }) : n.type === "scroll" ? /* @__PURE__ */ l(Er, { ...r, ref: t, forceMount: o }) : n.type === "auto" ? /* @__PURE__ */ l(Kt, { ...r, ref: t, forceMount: o }) : n.type === "always" ? /* @__PURE__ */ l(at, { ...r, ref: t }) : null;
389
+ const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = n, d = e.orientation === "horizontal";
390
+ return p.useEffect(() => (d ? s(!0) : i(!0), () => {
391
+ d ? s(!1) : i(!1);
392
+ }), [d, s, i]), n.type === "hover" ? /* @__PURE__ */ l(No, { ...o, ref: t, forceMount: r }) : n.type === "scroll" ? /* @__PURE__ */ l(To, { ...o, ref: t, forceMount: r }) : n.type === "auto" ? /* @__PURE__ */ l(Yt, { ...o, ref: t, forceMount: r }) : n.type === "always" ? /* @__PURE__ */ l(nt, { ...o, ref: t }) : null;
469
393
  }
470
394
  );
471
- nt.displayName = oe;
472
- var Cr = p.forwardRef((e, t) => {
473
- const { forceMount: o, ...r } = e, n = K(oe, e.__scopeScrollArea), [s, i] = p.useState(!1);
395
+ ot.displayName = re;
396
+ var No = p.forwardRef((e, t) => {
397
+ const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), [s, i] = p.useState(!1);
474
398
  return p.useEffect(() => {
475
- const c = n.scrollArea;
476
- let d = 0;
477
- if (c) {
399
+ const d = n.scrollArea;
400
+ let c = 0;
401
+ if (d) {
478
402
  const u = () => {
479
- window.clearTimeout(d), i(!0);
403
+ window.clearTimeout(c), i(!0);
480
404
  }, f = () => {
481
- d = window.setTimeout(() => i(!1), n.scrollHideDelay);
405
+ c = window.setTimeout(() => i(!1), n.scrollHideDelay);
482
406
  };
483
- return c.addEventListener("pointerenter", u), c.addEventListener("pointerleave", f), () => {
484
- window.clearTimeout(d), c.removeEventListener("pointerenter", u), c.removeEventListener("pointerleave", f);
407
+ return d.addEventListener("pointerenter", u), d.addEventListener("pointerleave", f), () => {
408
+ window.clearTimeout(c), d.removeEventListener("pointerenter", u), d.removeEventListener("pointerleave", f);
485
409
  };
486
410
  }
487
- }, [n.scrollArea, n.scrollHideDelay]), /* @__PURE__ */ l($e, { present: o || s, children: /* @__PURE__ */ l(
488
- Kt,
411
+ }, [n.scrollArea, n.scrollHideDelay]), /* @__PURE__ */ l(ze, { present: r || s, children: /* @__PURE__ */ l(
412
+ Yt,
489
413
  {
490
414
  "data-state": s ? "visible" : "hidden",
491
- ...r,
415
+ ...o,
492
416
  ref: t
493
417
  }
494
418
  ) });
495
- }), Er = p.forwardRef((e, t) => {
496
- const { forceMount: o, ...r } = e, n = K(oe, e.__scopeScrollArea), s = e.orientation === "horizontal", i = Fe(() => d("SCROLL_END"), 100), [c, d] = xr("hidden", {
419
+ }), To = p.forwardRef((e, t) => {
420
+ const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), s = e.orientation === "horizontal", i = Fe(() => c("SCROLL_END"), 100), [d, c] = Co("hidden", {
497
421
  hidden: {
498
422
  SCROLL: "scrolling"
499
423
  },
@@ -512,70 +436,70 @@ var Cr = p.forwardRef((e, t) => {
512
436
  }
513
437
  });
514
438
  return p.useEffect(() => {
515
- if (c === "idle") {
516
- const u = window.setTimeout(() => d("HIDE"), n.scrollHideDelay);
439
+ if (d === "idle") {
440
+ const u = window.setTimeout(() => c("HIDE"), n.scrollHideDelay);
517
441
  return () => window.clearTimeout(u);
518
442
  }
519
- }, [c, n.scrollHideDelay, d]), p.useEffect(() => {
443
+ }, [d, n.scrollHideDelay, c]), p.useEffect(() => {
520
444
  const u = n.viewport, f = s ? "scrollLeft" : "scrollTop";
521
445
  if (u) {
522
446
  let h = u[f];
523
447
  const g = () => {
524
448
  const a = u[f];
525
- h !== a && (d("SCROLL"), i()), h = a;
449
+ h !== a && (c("SCROLL"), i()), h = a;
526
450
  };
527
451
  return u.addEventListener("scroll", g), () => u.removeEventListener("scroll", g);
528
452
  }
529
- }, [n.viewport, s, d, i]), /* @__PURE__ */ l($e, { present: o || c !== "hidden", children: /* @__PURE__ */ l(
530
- at,
453
+ }, [n.viewport, s, c, i]), /* @__PURE__ */ l(ze, { present: r || d !== "hidden", children: /* @__PURE__ */ l(
454
+ nt,
531
455
  {
532
- "data-state": c === "hidden" ? "hidden" : "visible",
533
- ...r,
456
+ "data-state": d === "hidden" ? "hidden" : "visible",
457
+ ...o,
534
458
  ref: t,
535
- onPointerEnter: W(e.onPointerEnter, () => d("POINTER_ENTER")),
536
- onPointerLeave: W(e.onPointerLeave, () => d("POINTER_LEAVE"))
459
+ onPointerEnter: W(e.onPointerEnter, () => c("POINTER_ENTER")),
460
+ onPointerLeave: W(e.onPointerLeave, () => c("POINTER_LEAVE"))
537
461
  }
538
462
  ) });
539
- }), Kt = p.forwardRef((e, t) => {
540
- const o = K(oe, e.__scopeScrollArea), { forceMount: r, ...n } = e, [s, i] = p.useState(!1), c = e.orientation === "horizontal", d = Fe(() => {
541
- if (o.viewport) {
542
- const u = o.viewport.offsetWidth < o.viewport.scrollWidth, f = o.viewport.offsetHeight < o.viewport.scrollHeight;
543
- i(c ? u : f);
463
+ }), Yt = p.forwardRef((e, t) => {
464
+ const r = K(re, e.__scopeScrollArea), { forceMount: o, ...n } = e, [s, i] = p.useState(!1), d = e.orientation === "horizontal", c = Fe(() => {
465
+ if (r.viewport) {
466
+ const u = r.viewport.offsetWidth < r.viewport.scrollWidth, f = r.viewport.offsetHeight < r.viewport.scrollHeight;
467
+ i(d ? u : f);
544
468
  }
545
469
  }, 10);
546
- return we(o.viewport, d), we(o.content, d), /* @__PURE__ */ l($e, { present: r || s, children: /* @__PURE__ */ l(
547
- at,
470
+ return be(r.viewport, c), be(r.content, c), /* @__PURE__ */ l(ze, { present: o || s, children: /* @__PURE__ */ l(
471
+ nt,
548
472
  {
549
473
  "data-state": s ? "visible" : "hidden",
550
474
  ...n,
551
475
  ref: t
552
476
  }
553
477
  ) });
554
- }), at = p.forwardRef((e, t) => {
555
- const { orientation: o = "vertical", ...r } = e, n = K(oe, e.__scopeScrollArea), s = p.useRef(null), i = p.useRef(0), [c, d] = p.useState({
478
+ }), nt = p.forwardRef((e, t) => {
479
+ const { orientation: r = "vertical", ...o } = e, n = K(re, e.__scopeScrollArea), s = p.useRef(null), i = p.useRef(0), [d, c] = p.useState({
556
480
  content: 0,
557
481
  viewport: 0,
558
482
  scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
559
- }), u = eo(c.viewport, c.content), f = {
560
- ...r,
561
- sizes: c,
562
- onSizesChange: d,
483
+ }), u = Zt(d.viewport, d.content), f = {
484
+ ...o,
485
+ sizes: d,
486
+ onSizesChange: c,
563
487
  hasThumb: u > 0 && u < 1,
564
488
  onThumbChange: (g) => s.current = g,
565
489
  onThumbPointerUp: () => i.current = 0,
566
490
  onThumbPointerDown: (g) => i.current = g
567
491
  };
568
492
  function h(g, a) {
569
- return Ir(g, i.current, c, a);
493
+ return Do(g, i.current, d, a);
570
494
  }
571
- return o === "horizontal" ? /* @__PURE__ */ l(
572
- Nr,
495
+ return r === "horizontal" ? /* @__PURE__ */ l(
496
+ Ro,
573
497
  {
574
498
  ...f,
575
499
  ref: t,
576
500
  onThumbPositionChange: () => {
577
501
  if (n.viewport && s.current) {
578
- const g = n.viewport.scrollLeft, a = yt(g, c, n.dir);
502
+ const g = n.viewport.scrollLeft, a = bt(g, d, n.dir);
579
503
  s.current.style.transform = `translate3d(${a}px, 0, 0)`;
580
504
  }
581
505
  },
@@ -586,14 +510,14 @@ var Cr = p.forwardRef((e, t) => {
586
510
  n.viewport && (n.viewport.scrollLeft = h(g, n.dir));
587
511
  }
588
512
  }
589
- ) : o === "vertical" ? /* @__PURE__ */ l(
590
- Tr,
513
+ ) : r === "vertical" ? /* @__PURE__ */ l(
514
+ Po,
591
515
  {
592
516
  ...f,
593
517
  ref: t,
594
518
  onThumbPositionChange: () => {
595
519
  if (n.viewport && s.current) {
596
- const g = n.viewport.scrollTop, a = yt(g, c);
520
+ const g = n.viewport.scrollTop, a = bt(g, d);
597
521
  s.current.style.transform = `translate3d(0, ${a}px, 0)`;
598
522
  }
599
523
  },
@@ -605,22 +529,22 @@ var Cr = p.forwardRef((e, t) => {
605
529
  }
606
530
  }
607
531
  ) : null;
608
- }), Nr = p.forwardRef((e, t) => {
609
- const { sizes: o, onSizesChange: r, ...n } = e, s = K(oe, e.__scopeScrollArea), [i, c] = p.useState(), d = p.useRef(null), u = re(t, d, s.onScrollbarXChange);
532
+ }), Ro = p.forwardRef((e, t) => {
533
+ const { sizes: r, onSizesChange: o, ...n } = e, s = K(re, e.__scopeScrollArea), [i, d] = p.useState(), c = p.useRef(null), u = oe(t, c, s.onScrollbarXChange);
610
534
  return p.useEffect(() => {
611
- d.current && c(getComputedStyle(d.current));
612
- }, [d]), /* @__PURE__ */ l(
613
- Qt,
535
+ c.current && d(getComputedStyle(c.current));
536
+ }, [c]), /* @__PURE__ */ l(
537
+ Xt,
614
538
  {
615
539
  "data-orientation": "horizontal",
616
540
  ...n,
617
541
  ref: u,
618
- sizes: o,
542
+ sizes: r,
619
543
  style: {
620
544
  bottom: 0,
621
545
  left: s.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
622
546
  right: s.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
623
- "--radix-scroll-area-thumb-width": Be(o) + "px",
547
+ "--radix-scroll-area-thumb-width": Be(r) + "px",
624
548
  ...e.style
625
549
  },
626
550
  onThumbPointerDown: (f) => e.onThumbPointerDown(f.x),
@@ -628,39 +552,39 @@ var Cr = p.forwardRef((e, t) => {
628
552
  onWheelScroll: (f, h) => {
629
553
  if (s.viewport) {
630
554
  const g = s.viewport.scrollLeft + f.deltaX;
631
- e.onWheelScroll(g), oo(g, h) && f.preventDefault();
555
+ e.onWheelScroll(g), Jt(g, h) && f.preventDefault();
632
556
  }
633
557
  },
634
558
  onResize: () => {
635
- d.current && s.viewport && i && r({
559
+ c.current && s.viewport && i && o({
636
560
  content: s.viewport.scrollWidth,
637
561
  viewport: s.viewport.offsetWidth,
638
562
  scrollbar: {
639
- size: d.current.clientWidth,
640
- paddingStart: _e(i.paddingLeft),
641
- paddingEnd: _e(i.paddingRight)
563
+ size: c.current.clientWidth,
564
+ paddingStart: Me(i.paddingLeft),
565
+ paddingEnd: Me(i.paddingRight)
642
566
  }
643
567
  });
644
568
  }
645
569
  }
646
570
  );
647
- }), Tr = p.forwardRef((e, t) => {
648
- const { sizes: o, onSizesChange: r, ...n } = e, s = K(oe, e.__scopeScrollArea), [i, c] = p.useState(), d = p.useRef(null), u = re(t, d, s.onScrollbarYChange);
571
+ }), Po = p.forwardRef((e, t) => {
572
+ const { sizes: r, onSizesChange: o, ...n } = e, s = K(re, e.__scopeScrollArea), [i, d] = p.useState(), c = p.useRef(null), u = oe(t, c, s.onScrollbarYChange);
649
573
  return p.useEffect(() => {
650
- d.current && c(getComputedStyle(d.current));
651
- }, [d]), /* @__PURE__ */ l(
652
- Qt,
574
+ c.current && d(getComputedStyle(c.current));
575
+ }, [c]), /* @__PURE__ */ l(
576
+ Xt,
653
577
  {
654
578
  "data-orientation": "vertical",
655
579
  ...n,
656
580
  ref: u,
657
- sizes: o,
581
+ sizes: r,
658
582
  style: {
659
583
  top: 0,
660
584
  right: s.dir === "ltr" ? 0 : void 0,
661
585
  left: s.dir === "rtl" ? 0 : void 0,
662
586
  bottom: "var(--radix-scroll-area-corner-height)",
663
- "--radix-scroll-area-thumb-height": Be(o) + "px",
587
+ "--radix-scroll-area-thumb-height": Be(r) + "px",
664
588
  ...e.style
665
589
  },
666
590
  onThumbPointerDown: (f) => e.onThumbPointerDown(f.y),
@@ -668,84 +592,84 @@ var Cr = p.forwardRef((e, t) => {
668
592
  onWheelScroll: (f, h) => {
669
593
  if (s.viewport) {
670
594
  const g = s.viewport.scrollTop + f.deltaY;
671
- e.onWheelScroll(g), oo(g, h) && f.preventDefault();
595
+ e.onWheelScroll(g), Jt(g, h) && f.preventDefault();
672
596
  }
673
597
  },
674
598
  onResize: () => {
675
- d.current && s.viewport && i && r({
599
+ c.current && s.viewport && i && o({
676
600
  content: s.viewport.scrollHeight,
677
601
  viewport: s.viewport.offsetHeight,
678
602
  scrollbar: {
679
- size: d.current.clientHeight,
680
- paddingStart: _e(i.paddingTop),
681
- paddingEnd: _e(i.paddingBottom)
603
+ size: c.current.clientHeight,
604
+ paddingStart: Me(i.paddingTop),
605
+ paddingEnd: Me(i.paddingBottom)
682
606
  }
683
607
  });
684
608
  }
685
609
  }
686
610
  );
687
- }), [Rr, qt] = Wt(oe), Qt = p.forwardRef((e, t) => {
611
+ }), [ko, Ut] = $t(re), Xt = p.forwardRef((e, t) => {
688
612
  const {
689
- __scopeScrollArea: o,
690
- sizes: r,
613
+ __scopeScrollArea: r,
614
+ sizes: o,
691
615
  hasThumb: n,
692
616
  onThumbChange: s,
693
617
  onThumbPointerUp: i,
694
- onThumbPointerDown: c,
695
- onThumbPositionChange: d,
618
+ onThumbPointerDown: d,
619
+ onThumbPositionChange: c,
696
620
  onDragScroll: u,
697
621
  onWheelScroll: f,
698
622
  onResize: h,
699
623
  ...g
700
- } = e, a = K(oe, o), [N, v] = p.useState(null), b = re(t, (P) => v(P)), C = p.useRef(null), S = p.useRef(""), w = a.viewport, T = r.content - r.viewport, z = ce(f), R = ce(d), k = Fe(h, 10);
701
- function D(P) {
702
- if (C.current) {
703
- const M = P.clientX - C.current.left, F = P.clientY - C.current.top;
704
- u({ x: M, y: F });
624
+ } = e, a = K(re, r), [N, v] = p.useState(null), b = oe(t, (k) => v(k)), E = p.useRef(null), C = p.useRef(""), x = a.viewport, T = o.content - o.viewport, O = ie(f), R = ie(c), A = Fe(h, 10);
625
+ function D(k) {
626
+ if (E.current) {
627
+ const B = k.clientX - E.current.left, H = k.clientY - E.current.top;
628
+ u({ x: B, y: H });
705
629
  }
706
630
  }
707
631
  return p.useEffect(() => {
708
- const P = (M) => {
709
- const F = M.target;
710
- (N == null ? void 0 : N.contains(F)) && z(M, T);
632
+ const k = (B) => {
633
+ const H = B.target;
634
+ (N == null ? void 0 : N.contains(H)) && O(B, T);
711
635
  };
712
- return document.addEventListener("wheel", P, { passive: !1 }), () => document.removeEventListener("wheel", P, { passive: !1 });
713
- }, [w, N, T, z]), p.useEffect(R, [r, R]), we(N, k), we(a.content, k), /* @__PURE__ */ l(
714
- Rr,
636
+ return document.addEventListener("wheel", k, { passive: !1 }), () => document.removeEventListener("wheel", k, { passive: !1 });
637
+ }, [x, N, T, O]), p.useEffect(R, [o, R]), be(N, A), be(a.content, A), /* @__PURE__ */ l(
638
+ ko,
715
639
  {
716
- scope: o,
640
+ scope: r,
717
641
  scrollbar: N,
718
642
  hasThumb: n,
719
- onThumbChange: ce(s),
720
- onThumbPointerUp: ce(i),
643
+ onThumbChange: ie(s),
644
+ onThumbPointerUp: ie(i),
721
645
  onThumbPositionChange: R,
722
- onThumbPointerDown: ce(c),
646
+ onThumbPointerDown: ie(d),
723
647
  children: /* @__PURE__ */ l(
724
648
  te.div,
725
649
  {
726
650
  ...g,
727
651
  ref: b,
728
652
  style: { position: "absolute", ...g.style },
729
- onPointerDown: W(e.onPointerDown, (P) => {
730
- P.button === 0 && (P.target.setPointerCapture(P.pointerId), C.current = N.getBoundingClientRect(), S.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", a.viewport && (a.viewport.style.scrollBehavior = "auto"), D(P));
653
+ onPointerDown: W(e.onPointerDown, (k) => {
654
+ k.button === 0 && (k.target.setPointerCapture(k.pointerId), E.current = N.getBoundingClientRect(), C.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", a.viewport && (a.viewport.style.scrollBehavior = "auto"), D(k));
731
655
  }),
732
656
  onPointerMove: W(e.onPointerMove, D),
733
- onPointerUp: W(e.onPointerUp, (P) => {
734
- const M = P.target;
735
- M.hasPointerCapture(P.pointerId) && M.releasePointerCapture(P.pointerId), document.body.style.webkitUserSelect = S.current, a.viewport && (a.viewport.style.scrollBehavior = ""), C.current = null;
657
+ onPointerUp: W(e.onPointerUp, (k) => {
658
+ const B = k.target;
659
+ B.hasPointerCapture(k.pointerId) && B.releasePointerCapture(k.pointerId), document.body.style.webkitUserSelect = C.current, a.viewport && (a.viewport.style.scrollBehavior = ""), E.current = null;
736
660
  })
737
661
  }
738
662
  )
739
663
  }
740
664
  );
741
- }), Me = "ScrollAreaThumb", Zt = p.forwardRef(
665
+ }), De = "ScrollAreaThumb", Kt = p.forwardRef(
742
666
  (e, t) => {
743
- const { forceMount: o, ...r } = e, n = qt(Me, e.__scopeScrollArea);
744
- return /* @__PURE__ */ l($e, { present: o || n.hasThumb, children: /* @__PURE__ */ l(Pr, { ref: t, ...r }) });
667
+ const { forceMount: r, ...o } = e, n = Ut(De, e.__scopeScrollArea);
668
+ return /* @__PURE__ */ l(ze, { present: r || n.hasThumb, children: /* @__PURE__ */ l(Io, { ref: t, ...o }) });
745
669
  }
746
- ), Pr = p.forwardRef(
670
+ ), Io = p.forwardRef(
747
671
  (e, t) => {
748
- const { __scopeScrollArea: o, style: r, ...n } = e, s = K(Me, o), i = qt(Me, o), { onThumbPositionChange: c } = i, d = re(
672
+ const { __scopeScrollArea: r, style: o, ...n } = e, s = K(De, r), i = Ut(De, r), { onThumbPositionChange: d } = i, c = oe(
749
673
  t,
750
674
  (h) => i.onThumbChange(h)
751
675
  ), u = p.useRef(void 0), f = Fe(() => {
@@ -756,22 +680,22 @@ var Cr = p.forwardRef((e, t) => {
756
680
  if (h) {
757
681
  const g = () => {
758
682
  if (f(), !u.current) {
759
- const a = Dr(h, c);
760
- u.current = a, c();
683
+ const a = Mo(h, d);
684
+ u.current = a, d();
761
685
  }
762
686
  };
763
- return c(), h.addEventListener("scroll", g), () => h.removeEventListener("scroll", g);
687
+ return d(), h.addEventListener("scroll", g), () => h.removeEventListener("scroll", g);
764
688
  }
765
- }, [s.viewport, f, c]), /* @__PURE__ */ l(
689
+ }, [s.viewport, f, d]), /* @__PURE__ */ l(
766
690
  te.div,
767
691
  {
768
692
  "data-state": i.hasThumb ? "visible" : "hidden",
769
693
  ...n,
770
- ref: d,
694
+ ref: c,
771
695
  style: {
772
696
  width: "var(--radix-scroll-area-thumb-width)",
773
697
  height: "var(--radix-scroll-area-thumb-height)",
774
- ...r
698
+ ...o
775
699
  },
776
700
  onPointerDownCapture: W(e.onPointerDownCapture, (h) => {
777
701
  const a = h.target.getBoundingClientRect(), N = h.clientX - a.left, v = h.clientY - a.top;
@@ -782,32 +706,32 @@ var Cr = p.forwardRef((e, t) => {
782
706
  );
783
707
  }
784
708
  );
785
- Zt.displayName = Me;
786
- var st = "ScrollAreaCorner", Jt = p.forwardRef(
709
+ Kt.displayName = De;
710
+ var at = "ScrollAreaCorner", qt = p.forwardRef(
787
711
  (e, t) => {
788
- const o = K(st, e.__scopeScrollArea), r = !!(o.scrollbarX && o.scrollbarY);
789
- return o.type !== "scroll" && r ? /* @__PURE__ */ l(kr, { ...e, ref: t }) : null;
712
+ const r = K(at, e.__scopeScrollArea), o = !!(r.scrollbarX && r.scrollbarY);
713
+ return r.type !== "scroll" && o ? /* @__PURE__ */ l(Ao, { ...e, ref: t }) : null;
790
714
  }
791
715
  );
792
- Jt.displayName = st;
793
- var kr = p.forwardRef((e, t) => {
794
- const { __scopeScrollArea: o, ...r } = e, n = K(st, o), [s, i] = p.useState(0), [c, d] = p.useState(0), u = !!(s && c);
795
- return we(n.scrollbarX, () => {
716
+ qt.displayName = at;
717
+ var Ao = p.forwardRef((e, t) => {
718
+ const { __scopeScrollArea: r, ...o } = e, n = K(at, r), [s, i] = p.useState(0), [d, c] = p.useState(0), u = !!(s && d);
719
+ return be(n.scrollbarX, () => {
796
720
  var h;
797
721
  const f = ((h = n.scrollbarX) == null ? void 0 : h.offsetHeight) || 0;
798
- n.onCornerHeightChange(f), d(f);
799
- }), we(n.scrollbarY, () => {
722
+ n.onCornerHeightChange(f), c(f);
723
+ }), be(n.scrollbarY, () => {
800
724
  var h;
801
725
  const f = ((h = n.scrollbarY) == null ? void 0 : h.offsetWidth) || 0;
802
726
  n.onCornerWidthChange(f), i(f);
803
727
  }), u ? /* @__PURE__ */ l(
804
728
  te.div,
805
729
  {
806
- ...r,
730
+ ...o,
807
731
  ref: t,
808
732
  style: {
809
733
  width: s,
810
- height: c,
734
+ height: d,
811
735
  position: "absolute",
812
736
  right: n.dir === "ltr" ? 0 : void 0,
813
737
  left: n.dir === "rtl" ? 0 : void 0,
@@ -817,101 +741,101 @@ var kr = p.forwardRef((e, t) => {
817
741
  }
818
742
  ) : null;
819
743
  });
820
- function _e(e) {
744
+ function Me(e) {
821
745
  return e ? parseInt(e, 10) : 0;
822
746
  }
823
- function eo(e, t) {
824
- const o = e / t;
825
- return isNaN(o) ? 0 : o;
747
+ function Zt(e, t) {
748
+ const r = e / t;
749
+ return isNaN(r) ? 0 : r;
826
750
  }
827
751
  function Be(e) {
828
- const t = eo(e.viewport, e.content), o = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - o) * t;
829
- return Math.max(r, 18);
752
+ const t = Zt(e.viewport, e.content), r = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = (e.scrollbar.size - r) * t;
753
+ return Math.max(o, 18);
830
754
  }
831
- function Ir(e, t, o, r = "ltr") {
832
- const n = Be(o), s = n / 2, i = t || s, c = n - i, d = o.scrollbar.paddingStart + i, u = o.scrollbar.size - o.scrollbar.paddingEnd - c, f = o.content - o.viewport, h = r === "ltr" ? [0, f] : [f * -1, 0];
833
- return to([d, u], h)(e);
755
+ function Do(e, t, r, o = "ltr") {
756
+ 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, h = o === "ltr" ? [0, f] : [f * -1, 0];
757
+ return Qt([c, u], h)(e);
834
758
  }
835
- function yt(e, t, o = "ltr") {
836
- const r = Be(t), n = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, s = t.scrollbar.size - n, i = t.content - t.viewport, c = s - r, d = o === "ltr" ? [0, i] : [i * -1, 0], u = wr(e, d);
837
- return to([0, i], [0, c])(u);
759
+ function bt(e, t, r = "ltr") {
760
+ 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 = So(e, c);
761
+ return Qt([0, i], [0, d])(u);
838
762
  }
839
- function to(e, t) {
840
- return (o) => {
763
+ function Qt(e, t) {
764
+ return (r) => {
841
765
  if (e[0] === e[1] || t[0] === t[1]) return t[0];
842
- const r = (t[1] - t[0]) / (e[1] - e[0]);
843
- return t[0] + r * (o - e[0]);
766
+ const o = (t[1] - t[0]) / (e[1] - e[0]);
767
+ return t[0] + o * (r - e[0]);
844
768
  };
845
769
  }
846
- function oo(e, t) {
770
+ function Jt(e, t) {
847
771
  return e > 0 && e < t;
848
772
  }
849
- var Dr = (e, t = () => {
773
+ var Mo = (e, t = () => {
850
774
  }) => {
851
- let o = { left: e.scrollLeft, top: e.scrollTop }, r = 0;
775
+ let r = { left: e.scrollLeft, top: e.scrollTop }, o = 0;
852
776
  return function n() {
853
- const s = { left: e.scrollLeft, top: e.scrollTop }, i = o.left !== s.left, c = o.top !== s.top;
854
- (i || c) && t(), o = s, r = window.requestAnimationFrame(n);
855
- }(), () => window.cancelAnimationFrame(r);
777
+ const s = { left: e.scrollLeft, top: e.scrollTop }, i = r.left !== s.left, d = r.top !== s.top;
778
+ (i || d) && t(), r = s, o = window.requestAnimationFrame(n);
779
+ }(), () => window.cancelAnimationFrame(o);
856
780
  };
857
781
  function Fe(e, t) {
858
- const o = ce(e), r = p.useRef(0);
859
- return p.useEffect(() => () => window.clearTimeout(r.current), []), p.useCallback(() => {
860
- window.clearTimeout(r.current), r.current = window.setTimeout(o, t);
861
- }, [o, t]);
782
+ const r = ie(e), o = p.useRef(0);
783
+ return p.useEffect(() => () => window.clearTimeout(o.current), []), p.useCallback(() => {
784
+ window.clearTimeout(o.current), o.current = window.setTimeout(r, t);
785
+ }, [r, t]);
862
786
  }
863
- function we(e, t) {
864
- const o = ce(t);
865
- Wo(() => {
866
- let r = 0;
787
+ function be(e, t) {
788
+ const r = ie(t);
789
+ jr(() => {
790
+ let o = 0;
867
791
  if (e) {
868
792
  const n = new ResizeObserver(() => {
869
- cancelAnimationFrame(r), r = window.requestAnimationFrame(o);
793
+ cancelAnimationFrame(o), o = window.requestAnimationFrame(r);
870
794
  });
871
795
  return n.observe(e), () => {
872
- window.cancelAnimationFrame(r), n.unobserve(e);
796
+ window.cancelAnimationFrame(o), n.unobserve(e);
873
797
  };
874
798
  }
875
- }, [e, o]);
799
+ }, [e, r]);
876
800
  }
877
- var ro = Yt, Ar = Xt, Mr = Jt;
878
- const lt = p.forwardRef(({ className: e, children: t, ...o }, r) => /* @__PURE__ */ B(ro, { ref: r, className: Te("relative overflow-hidden", e), ...o, children: [
879
- /* @__PURE__ */ l(Ar, { className: "h-full w-full rounded-[inherit]", children: t }),
880
- /* @__PURE__ */ l(no, {}),
881
- /* @__PURE__ */ l(Mr, {})
801
+ var er = jt, _o = Wt, Lo = qt;
802
+ const st = p.forwardRef(({ className: e, children: t, ...r }, o) => /* @__PURE__ */ F(er, { ref: o, className: Ne("relative overflow-hidden", e), ...r, children: [
803
+ /* @__PURE__ */ l(_o, { className: "h-full w-full rounded-[inherit]", children: t }),
804
+ /* @__PURE__ */ l(tr, {}),
805
+ /* @__PURE__ */ l(Lo, {})
882
806
  ] }));
883
- lt.displayName = ro.displayName;
884
- const no = p.forwardRef(({ className: e, orientation: t = "vertical", ...o }, r) => /* @__PURE__ */ l(
885
- nt,
807
+ st.displayName = er.displayName;
808
+ const tr = p.forwardRef(({ className: e, orientation: t = "vertical", ...r }, o) => /* @__PURE__ */ l(
809
+ ot,
886
810
  {
887
- ref: r,
811
+ ref: o,
888
812
  orientation: t,
889
- className: Te(
813
+ className: Ne(
890
814
  "flex touch-none select-none transition-colors",
891
815
  t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
892
816
  t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
893
817
  e
894
818
  ),
895
- ...o,
896
- children: /* @__PURE__ */ l(Zt, { className: "relative flex-1 rounded-full bg-border" })
819
+ ...r,
820
+ children: /* @__PURE__ */ l(Kt, { className: "relative flex-1 rounded-full bg-border" })
897
821
  }
898
822
  ));
899
- no.displayName = nt.displayName;
900
- const _r = () => {
901
- const { selected: e, actions: t } = xe((o) => {
902
- var s, i, c, d, u, f, h;
903
- const r = o.events.selected ? Array.from(o.events.selected)[0] : null;
823
+ tr.displayName = ot.displayName;
824
+ const zo = () => {
825
+ const { selected: e, actions: t } = ye((r) => {
826
+ var s, i, d, c, u, f, h;
827
+ const o = r.events.selected ? Array.from(r.events.selected)[0] : null;
904
828
  let n;
905
- return r && (n = {
906
- id: r,
907
- name: ((i = (s = o.nodes[r]) == null ? void 0 : s.data) == null ? void 0 : i.displayName) || ((d = (c = o.nodes[r]) == null ? void 0 : c.data) == null ? void 0 : d.name),
908
- settings: (f = (u = o.nodes[r]) == null ? void 0 : u.related) == null ? void 0 : f.settings,
909
- isDeletable: ((h = o.nodes[r]) == null ? void 0 : h.id) !== "ROOT"
829
+ return o && (n = {
830
+ id: o,
831
+ 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),
832
+ settings: (f = (u = r.nodes[o]) == null ? void 0 : u.related) == null ? void 0 : f.settings,
833
+ isDeletable: ((h = r.nodes[o]) == null ? void 0 : h.id) !== "ROOT"
910
834
  }), { selected: n };
911
835
  });
912
- return /* @__PURE__ */ l("div", { className: "h-full flex flex-col", children: e ? /* @__PURE__ */ B(Et, { children: [
913
- /* @__PURE__ */ B("div", { className: "flex items-center justify-between pb-3 border-b border-border mb-3", children: [
914
- /* @__PURE__ */ B("div", { children: [
836
+ return /* @__PURE__ */ l("div", { className: "h-full flex flex-col", children: e ? /* @__PURE__ */ F(Ct, { children: [
837
+ /* @__PURE__ */ F("div", { className: "flex items-center justify-between pb-3 border-b border-border mb-3", children: [
838
+ /* @__PURE__ */ F("div", { children: [
915
839
  /* @__PURE__ */ l("span", { className: "text-xs text-muted-foreground", children: "Selected" }),
916
840
  /* @__PURE__ */ l("h3", { className: "text-sm font-semibold", children: e.name })
917
841
  ] }),
@@ -921,123 +845,123 @@ const _r = () => {
921
845
  onClick: () => t.delete(e.id),
922
846
  className: "p-1.5 rounded hover:bg-destructive/10 text-destructive transition-colors",
923
847
  title: "Delete element",
924
- children: /* @__PURE__ */ l(hr, { className: "h-4 w-4" })
848
+ children: /* @__PURE__ */ l(vo, { className: "h-4 w-4" })
925
849
  }
926
850
  )
927
851
  ] }),
928
- /* @__PURE__ */ l(lt, { className: "flex-1 -mr-4 pr-4", children: e.settings && m.createElement(e.settings) })
852
+ /* @__PURE__ */ l(st, { className: "flex-1 -mr-4 pr-4", children: e.settings && m.createElement(e.settings) })
929
853
  ] }) : /* @__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" }) }) });
930
- }, Lr = (e) => {
854
+ }, Oo = (e) => {
931
855
  switch (e) {
932
856
  case "Container":
933
- return ye;
857
+ return Ce;
934
858
  case "Text":
935
- return Gt;
859
+ return Vt;
936
860
  case "Heading":
937
- return Bt;
861
+ return zt;
938
862
  case "Button":
939
- return Vt;
940
- case "Image":
941
863
  return Ft;
864
+ case "Image":
865
+ return Ot;
942
866
  case "Divider":
943
- return Ht;
867
+ return Bt;
944
868
  case "Spacer":
945
- return jt;
869
+ return Ht;
946
870
  case "Video":
947
- return vr;
871
+ return yo;
948
872
  case "Columns":
949
- return Ot;
873
+ return mo;
950
874
  case "Link":
951
- return Rt;
875
+ return Tt;
952
876
  default:
953
- return ye;
877
+ return Ce;
954
878
  }
955
- }, ao = ({ nodeId: e, depth: t = 0, onDragStart: o, onDragOver: r, onDrop: n, draggedId: s }) => {
956
- const { node: i, actions: c, selectedNodeId: d, childNodes: u, parentId: f } = xe((E, ue) => {
957
- var fe, x;
958
- const V = E.nodes[e], ne = ((fe = V == null ? void 0 : V.data) == null ? void 0 : fe.nodes) || [], H = E.events.selected ? Array.from(E.events.selected)[0] : null, q = (x = V == null ? void 0 : V.data) == null ? void 0 : x.parent;
879
+ }, rr = ({ nodeId: e, depth: t = 0, onDragStart: r, onDragOver: o, onDrop: n, draggedId: s }) => {
880
+ const { node: i, actions: d, selectedNodeId: c, childNodes: u, parentId: f } = ye((S, de) => {
881
+ var ue, w;
882
+ const $ = S.nodes[e], ne = ((ue = $ == null ? void 0 : $.data) == null ? void 0 : ue.nodes) || [], V = S.events.selected ? Array.from(S.events.selected)[0] : null, q = (w = $ == null ? void 0 : $.data) == null ? void 0 : w.parent;
959
883
  return {
960
- node: V,
884
+ node: $,
961
885
  childNodes: ne,
962
- selectedNodeId: H,
886
+ selectedNodeId: V,
963
887
  parentId: q
964
888
  };
965
- }), [h, g] = Ne(!0), [a, N] = Ne(!1);
889
+ }), [h, g] = Ee(!0), [a, N] = Ee(!1);
966
890
  if (!i) return null;
967
- const v = i.data.displayName || i.data.name || "Unknown", b = u.length > 0, C = d === e, S = e === "ROOT", w = Lr(v), T = s === e, z = i.data.isCanvas, R = (E) => {
968
- E.stopPropagation(), S || c.selectNode(e);
969
- }, k = (E) => {
970
- E.stopPropagation(), g(!h);
971
- }, D = (E) => {
972
- if (S) {
973
- E.preventDefault();
891
+ const v = i.data.displayName || i.data.name || "Unknown", b = u.length > 0, E = c === e, C = e === "ROOT", x = Oo(v), T = s === e, O = i.data.isCanvas, R = (S) => {
892
+ S.stopPropagation(), C || d.selectNode(e);
893
+ }, A = (S) => {
894
+ S.stopPropagation(), g(!h);
895
+ }, D = (S) => {
896
+ if (C) {
897
+ S.preventDefault();
974
898
  return;
975
899
  }
976
- E.stopPropagation(), o(e, f);
977
- }, P = (E) => {
978
- E.preventDefault(), E.stopPropagation(), s && s !== e && z && N(!0);
979
- }, M = (E) => {
980
- E.stopPropagation(), N(!1);
981
- }, F = (E) => {
982
- E.preventDefault(), E.stopPropagation(), N(!1), s && s !== e && n(e);
900
+ S.stopPropagation(), r(e, f);
901
+ }, k = (S) => {
902
+ S.preventDefault(), S.stopPropagation(), s && s !== e && O && N(!0);
903
+ }, B = (S) => {
904
+ S.stopPropagation(), N(!1);
905
+ }, H = (S) => {
906
+ S.preventDefault(), S.stopPropagation(), N(!1), s && s !== e && n(e);
983
907
  };
984
- return /* @__PURE__ */ B("div", { className: "select-none", children: [
985
- /* @__PURE__ */ B(
908
+ return /* @__PURE__ */ F("div", { className: "select-none", children: [
909
+ /* @__PURE__ */ F(
986
910
  "div",
987
911
  {
988
- className: `flex items-center gap-1 py-1 px-1 rounded cursor-pointer text-sm transition-colors ${C ? "bg-primary/10 text-primary" : "hover:bg-secondary/50"} ${T ? "opacity-50" : ""} ${a ? "bg-primary/20 ring-1 ring-primary" : ""}`,
912
+ className: `flex items-center gap-1 py-1 px-1 rounded cursor-pointer text-sm transition-colors ${E ? "bg-primary/10 text-primary" : "hover:bg-secondary/50"} ${T ? "opacity-50" : ""} ${a ? "bg-primary/20 ring-1 ring-primary" : ""}`,
989
913
  style: { paddingLeft: `${t * 12 + 4}px` },
990
914
  onClick: R,
991
- draggable: !S,
915
+ draggable: !C,
992
916
  onDragStart: D,
993
- onDragOver: P,
994
- onDragLeave: M,
995
- onDrop: F,
917
+ onDragOver: k,
918
+ onDragLeave: B,
919
+ onDrop: H,
996
920
  children: [
997
- !S && /* @__PURE__ */ l(fr, { className: "h-3 w-3 text-muted-foreground/50 cursor-grab active:cursor-grabbing" }),
998
- b ? /* @__PURE__ */ l("button", { onClick: k, className: "p-0.5 hover:bg-secondary rounded", children: h ? /* @__PURE__ */ l(Yo, { className: "h-3 w-3" }) : /* @__PURE__ */ l(Uo, { className: "h-3 w-3" }) }) : /* @__PURE__ */ l("span", { className: "w-4" }),
999
- /* @__PURE__ */ l(w, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }),
1000
- /* @__PURE__ */ l("span", { className: `truncate ${S ? "font-medium" : ""}`, children: S ? "Root" : v })
921
+ !C && /* @__PURE__ */ l(po, { className: "h-3 w-3 text-muted-foreground/50 cursor-grab active:cursor-grabbing" }),
922
+ b ? /* @__PURE__ */ l("button", { onClick: A, className: "p-0.5 hover:bg-secondary rounded", children: h ? /* @__PURE__ */ l(Gr, { className: "h-3 w-3" }) : /* @__PURE__ */ l(Wr, { className: "h-3 w-3" }) }) : /* @__PURE__ */ l("span", { className: "w-4" }),
923
+ /* @__PURE__ */ l(x, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }),
924
+ /* @__PURE__ */ l("span", { className: `truncate ${C ? "font-medium" : ""}`, children: C ? "Root" : v })
1001
925
  ]
1002
926
  }
1003
927
  ),
1004
- b && h && /* @__PURE__ */ l("div", { children: u.map((E) => /* @__PURE__ */ l(
1005
- ao,
928
+ b && h && /* @__PURE__ */ l("div", { children: u.map((S) => /* @__PURE__ */ l(
929
+ rr,
1006
930
  {
1007
- nodeId: E,
931
+ nodeId: S,
1008
932
  depth: t + 1,
1009
- onDragStart: o,
1010
- onDragOver: r,
933
+ onDragStart: r,
934
+ onDragOver: o,
1011
935
  onDrop: n,
1012
936
  draggedId: s
1013
937
  },
1014
- E
938
+ S
1015
939
  )) })
1016
940
  ] });
1017
- }, zr = () => {
1018
- const [e, t] = Ne(null), [o, r] = Ne(null), { nodeIds: n, actions: s } = xe((u) => ({
941
+ }, Bo = () => {
942
+ const [e, t] = Ee(null), [r, o] = Ee(null), { nodeIds: n, actions: s } = ye((u) => ({
1019
943
  nodeIds: Object.keys(u.nodes)
1020
944
  })), i = (u, f) => {
1021
- t(u), r(f);
1022
- }, c = (u) => {
945
+ t(u), o(f);
946
+ }, d = (u) => {
1023
947
  if (e && u && e !== u)
1024
948
  try {
1025
949
  s.move(e, u, 0);
1026
950
  } catch (f) {
1027
951
  console.log("Cannot move node:", f);
1028
952
  }
1029
- t(null), r(null);
953
+ t(null), o(null);
1030
954
  };
1031
- return /* @__PURE__ */ B("div", { className: "space-y-2", onDragEnd: () => {
1032
- t(null), r(null);
955
+ return /* @__PURE__ */ F("div", { className: "space-y-2", onDragEnd: () => {
956
+ t(null), o(null);
1033
957
  }, children: [
1034
958
  /* @__PURE__ */ l("h3", { className: "text-sm font-medium text-muted-foreground", children: "Layers" }),
1035
959
  /* @__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(
1036
- ao,
960
+ rr,
1037
961
  {
1038
962
  nodeId: "ROOT",
1039
963
  onDragStart: i,
1040
- onDrop: c,
964
+ onDrop: d,
1041
965
  draggedId: e
1042
966
  }
1043
967
  ) }),
@@ -1045,123 +969,123 @@ const _r = () => {
1045
969
  ] });
1046
970
  };
1047
971
  // @__NO_SIDE_EFFECTS__
1048
- function wt(e) {
1049
- const t = /* @__PURE__ */ $r(e), o = p.forwardRef((r, n) => {
1050
- const { children: s, ...i } = r, c = p.Children.toArray(s), d = c.find(Br);
1051
- if (d) {
1052
- const u = d.props.children, f = c.map((h) => h === d ? p.Children.count(u) > 1 ? p.Children.only(null) : p.isValidElement(u) ? u.props.children : null : h);
972
+ function yt(e) {
973
+ const t = /* @__PURE__ */ Fo(e), r = p.forwardRef((o, n) => {
974
+ const { children: s, ...i } = o, d = p.Children.toArray(s), c = d.find(Vo);
975
+ if (c) {
976
+ const u = c.props.children, f = d.map((h) => h === c ? p.Children.count(u) > 1 ? p.Children.only(null) : p.isValidElement(u) ? u.props.children : null : h);
1053
977
  return /* @__PURE__ */ l(t, { ...i, ref: n, children: p.isValidElement(u) ? p.cloneElement(u, void 0, f) : null });
1054
978
  }
1055
979
  return /* @__PURE__ */ l(t, { ...i, ref: n, children: s });
1056
980
  });
1057
- return o.displayName = `${e}.Slot`, o;
981
+ return r.displayName = `${e}.Slot`, r;
1058
982
  }
1059
983
  // @__NO_SIDE_EFFECTS__
1060
- function $r(e) {
1061
- const t = p.forwardRef((o, r) => {
1062
- const { children: n, ...s } = o;
984
+ function Fo(e) {
985
+ const t = p.forwardRef((r, o) => {
986
+ const { children: n, ...s } = r;
1063
987
  if (p.isValidElement(n)) {
1064
- const i = Hr(n), c = Fr(s, n.props);
1065
- return n.type !== p.Fragment && (c.ref = r ? Xo(r, i) : i), p.cloneElement(n, c);
988
+ const i = jo(n), d = $o(s, n.props);
989
+ return n.type !== p.Fragment && (d.ref = o ? Yr(o, i) : i), p.cloneElement(n, d);
1066
990
  }
1067
991
  return p.Children.count(n) > 1 ? p.Children.only(null) : null;
1068
992
  });
1069
993
  return t.displayName = `${e}.SlotClone`, t;
1070
994
  }
1071
- var Or = Symbol("radix.slottable");
1072
- function Br(e) {
1073
- return p.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Or;
995
+ var Ho = Symbol("radix.slottable");
996
+ function Vo(e) {
997
+ return p.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Ho;
1074
998
  }
1075
- function Fr(e, t) {
1076
- const o = { ...t };
1077
- for (const r in t) {
1078
- const n = e[r], s = t[r];
1079
- /^on[A-Z]/.test(r) ? n && s ? o[r] = (...c) => {
1080
- const d = s(...c);
1081
- return n(...c), d;
1082
- } : n && (o[r] = n) : r === "style" ? o[r] = { ...n, ...s } : r === "className" && (o[r] = [n, s].filter(Boolean).join(" "));
999
+ function $o(e, t) {
1000
+ const r = { ...t };
1001
+ for (const o in t) {
1002
+ const n = e[o], s = t[o];
1003
+ /^on[A-Z]/.test(o) ? n && s ? r[o] = (...d) => {
1004
+ const c = s(...d);
1005
+ return n(...d), c;
1006
+ } : n && (r[o] = n) : o === "style" ? r[o] = { ...n, ...s } : o === "className" && (r[o] = [n, s].filter(Boolean).join(" "));
1083
1007
  }
1084
- return { ...e, ...o };
1008
+ return { ...e, ...r };
1085
1009
  }
1086
- function Hr(e) {
1087
- var r, n;
1088
- let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning;
1089
- return o ? e.ref : (t = (n = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
1010
+ function jo(e) {
1011
+ var o, n;
1012
+ let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
1013
+ return r ? e.ref : (t = (n = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : n.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
1090
1014
  }
1091
- function Vr(e) {
1092
- const t = e + "CollectionProvider", [o, r] = ze(t), [n, s] = o(
1015
+ function Go(e) {
1016
+ const t = e + "CollectionProvider", [r, o] = Le(t), [n, s] = r(
1093
1017
  t,
1094
1018
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
1095
1019
  ), i = (v) => {
1096
- const { scope: b, children: C } = v, S = m.useRef(null), w = m.useRef(/* @__PURE__ */ new Map()).current;
1097
- return /* @__PURE__ */ l(n, { scope: b, itemMap: w, collectionRef: S, children: C });
1020
+ const { scope: b, children: E } = v, C = m.useRef(null), x = m.useRef(/* @__PURE__ */ new Map()).current;
1021
+ return /* @__PURE__ */ l(n, { scope: b, itemMap: x, collectionRef: C, children: E });
1098
1022
  };
1099
1023
  i.displayName = t;
1100
- const c = e + "CollectionSlot", d = /* @__PURE__ */ wt(c), u = m.forwardRef(
1024
+ const d = e + "CollectionSlot", c = /* @__PURE__ */ yt(d), u = m.forwardRef(
1101
1025
  (v, b) => {
1102
- const { scope: C, children: S } = v, w = s(c, C), T = re(b, w.collectionRef);
1103
- return /* @__PURE__ */ l(d, { ref: T, children: S });
1026
+ const { scope: E, children: C } = v, x = s(d, E), T = oe(b, x.collectionRef);
1027
+ return /* @__PURE__ */ l(c, { ref: T, children: C });
1104
1028
  }
1105
1029
  );
1106
- u.displayName = c;
1107
- const f = e + "CollectionItemSlot", h = "data-radix-collection-item", g = /* @__PURE__ */ wt(f), a = m.forwardRef(
1030
+ u.displayName = d;
1031
+ const f = e + "CollectionItemSlot", h = "data-radix-collection-item", g = /* @__PURE__ */ yt(f), a = m.forwardRef(
1108
1032
  (v, b) => {
1109
- const { scope: C, children: S, ...w } = v, T = m.useRef(null), z = re(b, T), R = s(f, C);
1110
- return m.useEffect(() => (R.itemMap.set(T, { ref: T, ...w }), () => void R.itemMap.delete(T))), /* @__PURE__ */ l(g, { [h]: "", ref: z, children: S });
1033
+ const { scope: E, children: C, ...x } = v, T = m.useRef(null), O = oe(b, T), R = s(f, E);
1034
+ return m.useEffect(() => (R.itemMap.set(T, { ref: T, ...x }), () => void R.itemMap.delete(T))), /* @__PURE__ */ l(g, { [h]: "", ref: O, children: C });
1111
1035
  }
1112
1036
  );
1113
1037
  a.displayName = f;
1114
1038
  function N(v) {
1115
1039
  const b = s(e + "CollectionConsumer", v);
1116
1040
  return m.useCallback(() => {
1117
- const S = b.collectionRef.current;
1118
- if (!S) return [];
1119
- const w = Array.from(S.querySelectorAll(`[${h}]`));
1041
+ const C = b.collectionRef.current;
1042
+ if (!C) return [];
1043
+ const x = Array.from(C.querySelectorAll(`[${h}]`));
1120
1044
  return Array.from(b.itemMap.values()).sort(
1121
- (R, k) => w.indexOf(R.ref.current) - w.indexOf(k.ref.current)
1045
+ (R, A) => x.indexOf(R.ref.current) - x.indexOf(A.ref.current)
1122
1046
  );
1123
1047
  }, [b.collectionRef, b.itemMap]);
1124
1048
  }
1125
1049
  return [
1126
1050
  { Provider: i, Slot: u, ItemSlot: a },
1127
1051
  N,
1128
- r
1052
+ o
1129
1053
  ];
1130
1054
  }
1131
- var qe = "rovingFocusGroup.onEntryFocus", jr = { bubbles: !1, cancelable: !0 }, Re = "RovingFocusGroup", [Qe, so, Gr] = Vr(Re), [Wr, lo] = ze(
1132
- Re,
1133
- [Gr]
1134
- ), [Yr, Ur] = Wr(Re), io = p.forwardRef(
1135
- (e, t) => /* @__PURE__ */ l(Qe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(Qe.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(Xr, { ...e, ref: t }) }) })
1055
+ var Ke = "rovingFocusGroup.onEntryFocus", Wo = { bubbles: !1, cancelable: !0 }, Te = "RovingFocusGroup", [qe, or, Yo] = Go(Te), [Uo, nr] = Le(
1056
+ Te,
1057
+ [Yo]
1058
+ ), [Xo, Ko] = Uo(Te), ar = p.forwardRef(
1059
+ (e, t) => /* @__PURE__ */ l(qe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(qe.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(qo, { ...e, ref: t }) }) })
1136
1060
  );
1137
- io.displayName = Re;
1138
- var Xr = p.forwardRef((e, t) => {
1061
+ ar.displayName = Te;
1062
+ var qo = p.forwardRef((e, t) => {
1139
1063
  const {
1140
- __scopeRovingFocusGroup: o,
1141
- orientation: r,
1064
+ __scopeRovingFocusGroup: r,
1065
+ orientation: o,
1142
1066
  loop: n = !1,
1143
1067
  dir: s,
1144
1068
  currentTabStopId: i,
1145
- defaultCurrentTabStopId: c,
1146
- onCurrentTabStopIdChange: d,
1069
+ defaultCurrentTabStopId: d,
1070
+ onCurrentTabStopIdChange: c,
1147
1071
  onEntryFocus: u,
1148
1072
  preventScrollOnEntryFocus: f = !1,
1149
1073
  ...h
1150
- } = e, g = p.useRef(null), a = re(t, g), N = ot(s), [v, b] = Oe({
1074
+ } = e, g = p.useRef(null), a = oe(t, g), N = tt(s), [v, b] = Oe({
1151
1075
  prop: i,
1152
- defaultProp: c ?? null,
1153
- onChange: d,
1154
- caller: Re
1155
- }), [C, S] = p.useState(!1), w = ce(u), T = so(o), z = p.useRef(!1), [R, k] = p.useState(0);
1076
+ defaultProp: d ?? null,
1077
+ onChange: c,
1078
+ caller: Te
1079
+ }), [E, C] = p.useState(!1), x = ie(u), T = or(r), O = p.useRef(!1), [R, A] = p.useState(0);
1156
1080
  return p.useEffect(() => {
1157
1081
  const D = g.current;
1158
1082
  if (D)
1159
- return D.addEventListener(qe, w), () => D.removeEventListener(qe, w);
1160
- }, [w]), /* @__PURE__ */ l(
1161
- Yr,
1083
+ return D.addEventListener(Ke, x), () => D.removeEventListener(Ke, x);
1084
+ }, [x]), /* @__PURE__ */ l(
1085
+ Xo,
1162
1086
  {
1163
- scope: o,
1164
- orientation: r,
1087
+ scope: r,
1088
+ orientation: o,
1165
1089
  dir: N,
1166
1090
  loop: n,
1167
1091
  currentTabStopId: v,
@@ -1169,73 +1093,73 @@ var Xr = p.forwardRef((e, t) => {
1169
1093
  (D) => b(D),
1170
1094
  [b]
1171
1095
  ),
1172
- onItemShiftTab: p.useCallback(() => S(!0), []),
1096
+ onItemShiftTab: p.useCallback(() => C(!0), []),
1173
1097
  onFocusableItemAdd: p.useCallback(
1174
- () => k((D) => D + 1),
1098
+ () => A((D) => D + 1),
1175
1099
  []
1176
1100
  ),
1177
1101
  onFocusableItemRemove: p.useCallback(
1178
- () => k((D) => D - 1),
1102
+ () => A((D) => D - 1),
1179
1103
  []
1180
1104
  ),
1181
1105
  children: /* @__PURE__ */ l(
1182
1106
  te.div,
1183
1107
  {
1184
- tabIndex: C || R === 0 ? -1 : 0,
1185
- "data-orientation": r,
1108
+ tabIndex: E || R === 0 ? -1 : 0,
1109
+ "data-orientation": o,
1186
1110
  ...h,
1187
1111
  ref: a,
1188
1112
  style: { outline: "none", ...e.style },
1189
1113
  onMouseDown: W(e.onMouseDown, () => {
1190
- z.current = !0;
1114
+ O.current = !0;
1191
1115
  }),
1192
1116
  onFocus: W(e.onFocus, (D) => {
1193
- const P = !z.current;
1194
- if (D.target === D.currentTarget && P && !C) {
1195
- const M = new CustomEvent(qe, jr);
1196
- if (D.currentTarget.dispatchEvent(M), !M.defaultPrevented) {
1197
- const F = T().filter((H) => H.focusable), E = F.find((H) => H.active), ue = F.find((H) => H.id === v), ne = [E, ue, ...F].filter(
1117
+ const k = !O.current;
1118
+ if (D.target === D.currentTarget && k && !E) {
1119
+ const B = new CustomEvent(Ke, Wo);
1120
+ if (D.currentTarget.dispatchEvent(B), !B.defaultPrevented) {
1121
+ const H = T().filter((V) => V.focusable), S = H.find((V) => V.active), de = H.find((V) => V.id === v), ne = [S, de, ...H].filter(
1198
1122
  Boolean
1199
- ).map((H) => H.ref.current);
1200
- fo(ne, f);
1123
+ ).map((V) => V.ref.current);
1124
+ ir(ne, f);
1201
1125
  }
1202
1126
  }
1203
- z.current = !1;
1127
+ O.current = !1;
1204
1128
  }),
1205
- onBlur: W(e.onBlur, () => S(!1))
1129
+ onBlur: W(e.onBlur, () => C(!1))
1206
1130
  }
1207
1131
  )
1208
1132
  }
1209
1133
  );
1210
- }), co = "RovingFocusGroupItem", uo = p.forwardRef(
1134
+ }), sr = "RovingFocusGroupItem", lr = p.forwardRef(
1211
1135
  (e, t) => {
1212
1136
  const {
1213
- __scopeRovingFocusGroup: o,
1214
- focusable: r = !0,
1137
+ __scopeRovingFocusGroup: r,
1138
+ focusable: o = !0,
1215
1139
  active: n = !1,
1216
1140
  tabStopId: s,
1217
1141
  children: i,
1218
- ...c
1219
- } = e, d = Ko(), u = s || d, f = Ur(co, o), h = f.currentTabStopId === u, g = so(o), { onFocusableItemAdd: a, onFocusableItemRemove: N, currentTabStopId: v } = f;
1142
+ ...d
1143
+ } = e, c = Ur(), u = s || c, f = Ko(sr, r), h = f.currentTabStopId === u, g = or(r), { onFocusableItemAdd: a, onFocusableItemRemove: N, currentTabStopId: v } = f;
1220
1144
  return p.useEffect(() => {
1221
- if (r)
1145
+ if (o)
1222
1146
  return a(), () => N();
1223
- }, [r, a, N]), /* @__PURE__ */ l(
1224
- Qe.ItemSlot,
1147
+ }, [o, a, N]), /* @__PURE__ */ l(
1148
+ qe.ItemSlot,
1225
1149
  {
1226
- scope: o,
1150
+ scope: r,
1227
1151
  id: u,
1228
- focusable: r,
1152
+ focusable: o,
1229
1153
  active: n,
1230
1154
  children: /* @__PURE__ */ l(
1231
1155
  te.span,
1232
1156
  {
1233
1157
  tabIndex: h ? 0 : -1,
1234
1158
  "data-orientation": f.orientation,
1235
- ...c,
1159
+ ...d,
1236
1160
  ref: t,
1237
1161
  onMouseDown: W(e.onMouseDown, (b) => {
1238
- r ? f.onItemFocus(u) : b.preventDefault();
1162
+ o ? f.onItemFocus(u) : b.preventDefault();
1239
1163
  }),
1240
1164
  onFocus: W(e.onFocus, () => f.onItemFocus(u)),
1241
1165
  onKeyDown: W(e.onKeyDown, (b) => {
@@ -1244,18 +1168,18 @@ var Xr = p.forwardRef((e, t) => {
1244
1168
  return;
1245
1169
  }
1246
1170
  if (b.target !== b.currentTarget) return;
1247
- const C = Qr(b, f.orientation, f.dir);
1248
- if (C !== void 0) {
1171
+ const E = Jo(b, f.orientation, f.dir);
1172
+ if (E !== void 0) {
1249
1173
  if (b.metaKey || b.ctrlKey || b.altKey || b.shiftKey) return;
1250
1174
  b.preventDefault();
1251
- let w = g().filter((T) => T.focusable).map((T) => T.ref.current);
1252
- if (C === "last") w.reverse();
1253
- else if (C === "prev" || C === "next") {
1254
- C === "prev" && w.reverse();
1255
- const T = w.indexOf(b.currentTarget);
1256
- w = f.loop ? Zr(w, T + 1) : w.slice(T + 1);
1175
+ let x = g().filter((T) => T.focusable).map((T) => T.ref.current);
1176
+ if (E === "last") x.reverse();
1177
+ else if (E === "prev" || E === "next") {
1178
+ E === "prev" && x.reverse();
1179
+ const T = x.indexOf(b.currentTarget);
1180
+ x = f.loop ? en(x, T + 1) : x.slice(T + 1);
1257
1181
  }
1258
- setTimeout(() => fo(w));
1182
+ setTimeout(() => ir(x));
1259
1183
  }
1260
1184
  }),
1261
1185
  children: typeof i == "function" ? i({ isCurrentTabStop: h, hasTabStop: v != null }) : i
@@ -1265,8 +1189,8 @@ var Xr = p.forwardRef((e, t) => {
1265
1189
  );
1266
1190
  }
1267
1191
  );
1268
- uo.displayName = co;
1269
- var Kr = {
1192
+ lr.displayName = sr;
1193
+ var Zo = {
1270
1194
  ArrowLeft: "prev",
1271
1195
  ArrowUp: "prev",
1272
1196
  ArrowRight: "next",
@@ -1276,28 +1200,28 @@ var Kr = {
1276
1200
  PageDown: "last",
1277
1201
  End: "last"
1278
1202
  };
1279
- function qr(e, t) {
1203
+ function Qo(e, t) {
1280
1204
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
1281
1205
  }
1282
- function Qr(e, t, o) {
1283
- const r = qr(e.key, o);
1284
- if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
1285
- return Kr[r];
1206
+ function Jo(e, t, r) {
1207
+ const o = Qo(e.key, r);
1208
+ if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
1209
+ return Zo[o];
1286
1210
  }
1287
- function fo(e, t = !1) {
1288
- const o = document.activeElement;
1289
- for (const r of e)
1290
- if (r === o || (r.focus({ preventScroll: t }), document.activeElement !== o)) return;
1211
+ function ir(e, t = !1) {
1212
+ const r = document.activeElement;
1213
+ for (const o of e)
1214
+ if (o === r || (o.focus({ preventScroll: t }), document.activeElement !== r)) return;
1291
1215
  }
1292
- function Zr(e, t) {
1293
- return e.map((o, r) => e[(t + r) % e.length]);
1216
+ function en(e, t) {
1217
+ return e.map((r, o) => e[(t + o) % e.length]);
1294
1218
  }
1295
- var Jr = io, en = uo, mo = "Toggle", it = p.forwardRef((e, t) => {
1296
- const { pressed: o, defaultPressed: r, onPressedChange: n, ...s } = e, [i, c] = Oe({
1297
- prop: o,
1219
+ var tn = ar, rn = lr, cr = "Toggle", lt = p.forwardRef((e, t) => {
1220
+ const { pressed: r, defaultPressed: o, onPressedChange: n, ...s } = e, [i, d] = Oe({
1221
+ prop: r,
1298
1222
  onChange: n,
1299
- defaultProp: r ?? !1,
1300
- caller: mo
1223
+ defaultProp: o ?? !1,
1224
+ caller: cr
1301
1225
  });
1302
1226
  return /* @__PURE__ */ l(
1303
1227
  te.button,
@@ -1309,136 +1233,136 @@ var Jr = io, en = uo, mo = "Toggle", it = p.forwardRef((e, t) => {
1309
1233
  ...s,
1310
1234
  ref: t,
1311
1235
  onClick: W(e.onClick, () => {
1312
- e.disabled || c(!i);
1236
+ e.disabled || d(!i);
1313
1237
  })
1314
1238
  }
1315
1239
  );
1316
1240
  });
1317
- it.displayName = mo;
1318
- var po = it, de = "ToggleGroup", [ho] = ze(de, [
1319
- lo
1320
- ]), go = lo(), ct = m.forwardRef((e, t) => {
1321
- const { type: o, ...r } = e;
1322
- if (o === "single")
1323
- return /* @__PURE__ */ l(tn, { ...r, ref: t });
1324
- if (o === "multiple")
1325
- return /* @__PURE__ */ l(on, { ...r, ref: t });
1326
- throw new Error(`Missing prop \`type\` expected on \`${de}\``);
1241
+ lt.displayName = cr;
1242
+ var dr = lt, ce = "ToggleGroup", [ur] = Le(ce, [
1243
+ nr
1244
+ ]), fr = nr(), it = m.forwardRef((e, t) => {
1245
+ const { type: r, ...o } = e;
1246
+ if (r === "single")
1247
+ return /* @__PURE__ */ l(on, { ...o, ref: t });
1248
+ if (r === "multiple")
1249
+ return /* @__PURE__ */ l(nn, { ...o, ref: t });
1250
+ throw new Error(`Missing prop \`type\` expected on \`${ce}\``);
1327
1251
  });
1328
- ct.displayName = de;
1329
- var [vo, bo] = ho(de), tn = m.forwardRef((e, t) => {
1252
+ it.displayName = ce;
1253
+ var [mr, pr] = ur(ce), on = m.forwardRef((e, t) => {
1330
1254
  const {
1331
- value: o,
1332
- defaultValue: r,
1255
+ value: r,
1256
+ defaultValue: o,
1333
1257
  onValueChange: n = () => {
1334
1258
  },
1335
1259
  ...s
1336
- } = e, [i, c] = Oe({
1337
- prop: o,
1338
- defaultProp: r ?? "",
1260
+ } = e, [i, d] = Oe({
1261
+ prop: r,
1262
+ defaultProp: o ?? "",
1339
1263
  onChange: n,
1340
- caller: de
1264
+ caller: ce
1341
1265
  });
1342
1266
  return /* @__PURE__ */ l(
1343
- vo,
1267
+ mr,
1344
1268
  {
1345
1269
  scope: e.__scopeToggleGroup,
1346
1270
  type: "single",
1347
1271
  value: m.useMemo(() => i ? [i] : [], [i]),
1348
- onItemActivate: c,
1349
- onItemDeactivate: m.useCallback(() => c(""), [c]),
1350
- children: /* @__PURE__ */ l(yo, { ...s, ref: t })
1272
+ onItemActivate: d,
1273
+ onItemDeactivate: m.useCallback(() => d(""), [d]),
1274
+ children: /* @__PURE__ */ l(hr, { ...s, ref: t })
1351
1275
  }
1352
1276
  );
1353
- }), on = m.forwardRef((e, t) => {
1277
+ }), nn = m.forwardRef((e, t) => {
1354
1278
  const {
1355
- value: o,
1356
- defaultValue: r,
1279
+ value: r,
1280
+ defaultValue: o,
1357
1281
  onValueChange: n = () => {
1358
1282
  },
1359
1283
  ...s
1360
- } = e, [i, c] = Oe({
1361
- prop: o,
1362
- defaultProp: r ?? [],
1284
+ } = e, [i, d] = Oe({
1285
+ prop: r,
1286
+ defaultProp: o ?? [],
1363
1287
  onChange: n,
1364
- caller: de
1365
- }), d = m.useCallback(
1366
- (f) => c((h = []) => [...h, f]),
1367
- [c]
1288
+ caller: ce
1289
+ }), c = m.useCallback(
1290
+ (f) => d((h = []) => [...h, f]),
1291
+ [d]
1368
1292
  ), u = m.useCallback(
1369
- (f) => c((h = []) => h.filter((g) => g !== f)),
1370
- [c]
1293
+ (f) => d((h = []) => h.filter((g) => g !== f)),
1294
+ [d]
1371
1295
  );
1372
1296
  return /* @__PURE__ */ l(
1373
- vo,
1297
+ mr,
1374
1298
  {
1375
1299
  scope: e.__scopeToggleGroup,
1376
1300
  type: "multiple",
1377
1301
  value: i,
1378
- onItemActivate: d,
1302
+ onItemActivate: c,
1379
1303
  onItemDeactivate: u,
1380
- children: /* @__PURE__ */ l(yo, { ...s, ref: t })
1304
+ children: /* @__PURE__ */ l(hr, { ...s, ref: t })
1381
1305
  }
1382
1306
  );
1383
1307
  });
1384
- ct.displayName = de;
1385
- var [rn, nn] = ho(de), yo = m.forwardRef(
1308
+ it.displayName = ce;
1309
+ var [an, sn] = ur(ce), hr = m.forwardRef(
1386
1310
  (e, t) => {
1387
1311
  const {
1388
- __scopeToggleGroup: o,
1389
- disabled: r = !1,
1312
+ __scopeToggleGroup: r,
1313
+ disabled: o = !1,
1390
1314
  rovingFocus: n = !0,
1391
1315
  orientation: s,
1392
1316
  dir: i,
1393
- loop: c = !0,
1394
- ...d
1395
- } = e, u = go(o), f = ot(i), h = { role: "group", dir: f, ...d };
1396
- return /* @__PURE__ */ l(rn, { scope: o, rovingFocus: n, disabled: r, children: n ? /* @__PURE__ */ l(
1397
- Jr,
1317
+ loop: d = !0,
1318
+ ...c
1319
+ } = e, u = fr(r), f = tt(i), h = { role: "group", dir: f, ...c };
1320
+ return /* @__PURE__ */ l(an, { scope: r, rovingFocus: n, disabled: o, children: n ? /* @__PURE__ */ l(
1321
+ tn,
1398
1322
  {
1399
1323
  asChild: !0,
1400
1324
  ...u,
1401
1325
  orientation: s,
1402
1326
  dir: f,
1403
- loop: c,
1327
+ loop: d,
1404
1328
  children: /* @__PURE__ */ l(te.div, { ...h, ref: t })
1405
1329
  }
1406
1330
  ) : /* @__PURE__ */ l(te.div, { ...h, ref: t }) });
1407
1331
  }
1408
- ), Le = "ToggleGroupItem", wo = m.forwardRef(
1332
+ ), _e = "ToggleGroupItem", gr = m.forwardRef(
1409
1333
  (e, t) => {
1410
- const o = bo(Le, e.__scopeToggleGroup), r = nn(Le, e.__scopeToggleGroup), n = go(e.__scopeToggleGroup), s = o.value.includes(e.value), i = r.disabled || e.disabled, c = { ...e, pressed: s, disabled: i }, d = m.useRef(null);
1411
- return r.rovingFocus ? /* @__PURE__ */ l(
1412
- en,
1334
+ const r = pr(_e, e.__scopeToggleGroup), o = sn(_e, e.__scopeToggleGroup), n = fr(e.__scopeToggleGroup), s = r.value.includes(e.value), i = o.disabled || e.disabled, d = { ...e, pressed: s, disabled: i }, c = m.useRef(null);
1335
+ return o.rovingFocus ? /* @__PURE__ */ l(
1336
+ rn,
1413
1337
  {
1414
1338
  asChild: !0,
1415
1339
  ...n,
1416
1340
  focusable: !i,
1417
1341
  active: s,
1418
- ref: d,
1419
- children: /* @__PURE__ */ l(xt, { ...c, ref: t })
1342
+ ref: c,
1343
+ children: /* @__PURE__ */ l(wt, { ...d, ref: t })
1420
1344
  }
1421
- ) : /* @__PURE__ */ l(xt, { ...c, ref: t });
1345
+ ) : /* @__PURE__ */ l(wt, { ...d, ref: t });
1422
1346
  }
1423
1347
  );
1424
- wo.displayName = Le;
1425
- var xt = m.forwardRef(
1348
+ gr.displayName = _e;
1349
+ var wt = m.forwardRef(
1426
1350
  (e, t) => {
1427
- const { __scopeToggleGroup: o, value: r, ...n } = e, s = bo(Le, o), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, c = s.type === "single" ? i : void 0;
1351
+ const { __scopeToggleGroup: r, value: o, ...n } = e, s = pr(_e, r), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, d = s.type === "single" ? i : void 0;
1428
1352
  return /* @__PURE__ */ l(
1429
- it,
1353
+ lt,
1430
1354
  {
1431
- ...c,
1355
+ ...d,
1432
1356
  ...n,
1433
1357
  ref: t,
1434
- onPressedChange: (d) => {
1435
- d ? s.onItemActivate(r) : s.onItemDeactivate(r);
1358
+ onPressedChange: (c) => {
1359
+ c ? s.onItemActivate(o) : s.onItemDeactivate(o);
1436
1360
  }
1437
1361
  }
1438
1362
  );
1439
1363
  }
1440
- ), xo = ct, So = wo;
1441
- const Co = qo(
1364
+ ), vr = it, br = gr;
1365
+ const yr = Xr(
1442
1366
  "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",
1443
1367
  {
1444
1368
  variants: {
@@ -1457,23 +1381,23 @@ const Co = qo(
1457
1381
  size: "default"
1458
1382
  }
1459
1383
  }
1460
- ), an = p.forwardRef(({ className: e, variant: t, size: o, ...r }, n) => /* @__PURE__ */ l(po, { ref: n, className: Te(Co({ variant: t, size: o, className: e })), ...r }));
1461
- an.displayName = po.displayName;
1462
- const Eo = p.createContext({
1384
+ ), ln = p.forwardRef(({ className: e, variant: t, size: r, ...o }, n) => /* @__PURE__ */ l(dr, { ref: n, className: Ne(yr({ variant: t, size: r, className: e })), ...o }));
1385
+ ln.displayName = dr.displayName;
1386
+ const wr = p.createContext({
1463
1387
  size: "default",
1464
1388
  variant: "default"
1465
- }), No = p.forwardRef(({ className: e, variant: t, size: o, children: r, ...n }, s) => /* @__PURE__ */ l(xo, { ref: s, className: Te("flex items-center justify-center gap-1", e), ...n, children: /* @__PURE__ */ l(Eo.Provider, { value: { variant: t, size: o }, children: r }) }));
1466
- No.displayName = xo.displayName;
1467
- const To = p.forwardRef(({ className: e, children: t, variant: o, size: r, ...n }, s) => {
1468
- const i = p.useContext(Eo);
1389
+ }), xr = p.forwardRef(({ className: e, variant: t, size: r, children: o, ...n }, s) => /* @__PURE__ */ l(vr, { ref: s, className: Ne("flex items-center justify-center gap-1", e), ...n, children: /* @__PURE__ */ l(wr.Provider, { value: { variant: t, size: r }, children: o }) }));
1390
+ xr.displayName = vr.displayName;
1391
+ const Sr = p.forwardRef(({ className: e, children: t, variant: r, size: o, ...n }, s) => {
1392
+ const i = p.useContext(wr);
1469
1393
  return /* @__PURE__ */ l(
1470
- So,
1394
+ br,
1471
1395
  {
1472
1396
  ref: s,
1473
- className: Te(
1474
- Co({
1475
- variant: i.variant || o,
1476
- size: i.size || r
1397
+ className: Ne(
1398
+ yr({
1399
+ variant: i.variant || r,
1400
+ size: i.size || o
1477
1401
  }),
1478
1402
  e
1479
1403
  ),
@@ -1482,29 +1406,29 @@ const To = p.forwardRef(({ className: e, children: t, variant: o, size: r, ...n
1482
1406
  }
1483
1407
  );
1484
1408
  });
1485
- To.displayName = So.displayName;
1486
- var sn = (e) => {
1409
+ Sr.displayName = br.displayName;
1410
+ var cn = (e) => {
1487
1411
  switch (e) {
1488
1412
  case "success":
1489
- return dn;
1490
- case "info":
1491
1413
  return fn;
1414
+ case "info":
1415
+ return pn;
1492
1416
  case "warning":
1493
- return un;
1494
- case "error":
1495
1417
  return mn;
1418
+ case "error":
1419
+ return hn;
1496
1420
  default:
1497
1421
  return null;
1498
1422
  }
1499
- }, ln = Array(12).fill(0), cn = ({ visible: e, className: t }) => m.createElement("div", { className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "), "data-visible": e }, m.createElement("div", { className: "sonner-spinner" }, ln.map((o, r) => m.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${r}` })))), dn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" })), un = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })), fn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" })), mn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })), pn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, m.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), m.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })), hn = () => {
1423
+ }, dn = Array(12).fill(0), un = ({ visible: e, className: t }) => m.createElement("div", { className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "), "data-visible": e }, m.createElement("div", { className: "sonner-spinner" }, dn.map((r, o) => m.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${o}` })))), fn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" })), mn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })), pn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" })), hn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })), gn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, m.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), m.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })), vn = () => {
1500
1424
  let [e, t] = m.useState(document.hidden);
1501
1425
  return m.useEffect(() => {
1502
- let o = () => {
1426
+ let r = () => {
1503
1427
  t(document.hidden);
1504
1428
  };
1505
- return document.addEventListener("visibilitychange", o), () => window.removeEventListener("visibilitychange", o);
1429
+ return document.addEventListener("visibilitychange", r), () => window.removeEventListener("visibilitychange", r);
1506
1430
  }, []), e;
1507
- }, Ze = 1, gn = class {
1431
+ }, Ze = 1, bn = class {
1508
1432
  constructor() {
1509
1433
  this.subscribe = (e) => (this.subscribers.push(e), () => {
1510
1434
  let t = this.subscribers.indexOf(e);
@@ -1515,314 +1439,314 @@ var sn = (e) => {
1515
1439
  this.publish(e), this.toasts = [...this.toasts, e];
1516
1440
  }, this.create = (e) => {
1517
1441
  var t;
1518
- let { message: o, ...r } = 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((c) => c.id === n), i = e.dismissible === void 0 ? !0 : e.dismissible;
1519
- return this.dismissedToasts.has(n) && this.dismissedToasts.delete(n), s ? this.toasts = this.toasts.map((c) => c.id === n ? (this.publish({ ...c, ...e, id: n, title: o }), { ...c, ...e, id: n, dismissible: i, title: o }) : c) : this.addToast({ title: o, ...r, dismissible: i, id: n }), n;
1442
+ 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;
1443
+ 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;
1520
1444
  }, this.dismiss = (e) => (this.dismissedToasts.add(e), e || this.toasts.forEach((t) => {
1521
- this.subscribers.forEach((o) => o({ id: t.id, dismiss: !0 }));
1445
+ this.subscribers.forEach((r) => r({ id: t.id, dismiss: !0 }));
1522
1446
  }), 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) => {
1523
1447
  if (!t) return;
1524
- let o;
1525
- t.loading !== void 0 && (o = this.create({ ...t, promise: e, type: "loading", message: t.loading, description: typeof t.description != "function" ? t.description : void 0 }));
1526
- let r = e instanceof Promise ? e : e(), n = o !== void 0, s, i = r.then(async (d) => {
1527
- if (s = ["resolve", d], m.isValidElement(d)) n = !1, this.create({ id: o, type: "default", message: d });
1528
- else if (bn(d) && !d.ok) {
1448
+ let r;
1449
+ t.loading !== void 0 && (r = this.create({ ...t, promise: e, type: "loading", message: t.loading, description: typeof t.description != "function" ? t.description : void 0 }));
1450
+ let o = e instanceof Promise ? e : e(), n = r !== void 0, s, i = o.then(async (c) => {
1451
+ if (s = ["resolve", c], m.isValidElement(c)) n = !1, this.create({ id: r, type: "default", message: c });
1452
+ else if (wn(c) && !c.ok) {
1529
1453
  n = !1;
1530
- let u = typeof t.error == "function" ? await t.error(`HTTP error! status: ${d.status}`) : t.error, f = typeof t.description == "function" ? await t.description(`HTTP error! status: ${d.status}`) : t.description;
1531
- this.create({ id: o, type: "error", message: u, description: f });
1454
+ let u = typeof t.error == "function" ? await t.error(`HTTP error! status: ${c.status}`) : t.error, f = typeof t.description == "function" ? await t.description(`HTTP error! status: ${c.status}`) : t.description;
1455
+ this.create({ id: r, type: "error", message: u, description: f });
1532
1456
  } else if (t.success !== void 0) {
1533
1457
  n = !1;
1534
- let u = typeof t.success == "function" ? await t.success(d) : t.success, f = typeof t.description == "function" ? await t.description(d) : t.description;
1535
- this.create({ id: o, type: "success", message: u, description: f });
1458
+ let u = typeof t.success == "function" ? await t.success(c) : t.success, f = typeof t.description == "function" ? await t.description(c) : t.description;
1459
+ this.create({ id: r, type: "success", message: u, description: f });
1536
1460
  }
1537
- }).catch(async (d) => {
1538
- if (s = ["reject", d], t.error !== void 0) {
1461
+ }).catch(async (c) => {
1462
+ if (s = ["reject", c], t.error !== void 0) {
1539
1463
  n = !1;
1540
- let u = typeof t.error == "function" ? await t.error(d) : t.error, f = typeof t.description == "function" ? await t.description(d) : t.description;
1541
- this.create({ id: o, type: "error", message: u, description: f });
1464
+ let u = typeof t.error == "function" ? await t.error(c) : t.error, f = typeof t.description == "function" ? await t.description(c) : t.description;
1465
+ this.create({ id: r, type: "error", message: u, description: f });
1542
1466
  }
1543
1467
  }).finally(() => {
1544
- var d;
1545
- n && (this.dismiss(o), o = void 0), (d = t.finally) == null || d.call(t);
1546
- }), c = () => new Promise((d, u) => i.then(() => s[0] === "reject" ? u(s[1]) : d(s[1])).catch(u));
1547
- return typeof o != "string" && typeof o != "number" ? { unwrap: c } : Object.assign(o, { unwrap: c });
1468
+ var c;
1469
+ n && (this.dismiss(r), r = void 0), (c = t.finally) == null || c.call(t);
1470
+ }), d = () => new Promise((c, u) => i.then(() => s[0] === "reject" ? u(s[1]) : c(s[1])).catch(u));
1471
+ return typeof r != "string" && typeof r != "number" ? { unwrap: d } : Object.assign(r, { unwrap: d });
1548
1472
  }, this.custom = (e, t) => {
1549
- let o = (t == null ? void 0 : t.id) || Ze++;
1550
- return this.create({ jsx: e(o), id: o, ...t }), o;
1473
+ let r = (t == null ? void 0 : t.id) || Ze++;
1474
+ return this.create({ jsx: e(r), id: r, ...t }), r;
1551
1475
  }, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
1552
1476
  }
1553
- }, G = new gn(), vn = (e, t) => {
1554
- let o = (t == null ? void 0 : t.id) || Ze++;
1555
- return G.addToast({ title: e, ...t, id: o }), o;
1556
- }, bn = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", yn = vn, wn = () => G.toasts, xn = () => G.getActiveToasts(), Sn = Object.assign(yn, { success: G.success, info: G.info, warning: G.warning, error: G.error, custom: G.custom, message: G.message, promise: G.promise, dismiss: G.dismiss, loading: G.loading }, { getHistory: wn, getToasts: xn });
1557
- function Cn(e, { insertAt: t } = {}) {
1477
+ }, G = new bn(), yn = (e, t) => {
1478
+ let r = (t == null ? void 0 : t.id) || Ze++;
1479
+ return G.addToast({ title: e, ...t, id: r }), r;
1480
+ }, wn = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", xn = yn, Sn = () => G.toasts, Cn = () => G.getActiveToasts(), En = Object.assign(xn, { success: G.success, info: G.info, warning: G.warning, error: G.error, custom: G.custom, message: G.message, promise: G.promise, dismiss: G.dismiss, loading: G.loading }, { getHistory: Sn, getToasts: Cn });
1481
+ function Nn(e, { insertAt: t } = {}) {
1558
1482
  if (typeof document > "u") return;
1559
- let o = document.head || document.getElementsByTagName("head")[0], r = document.createElement("style");
1560
- r.type = "text/css", t === "top" && o.firstChild ? o.insertBefore(r, o.firstChild) : o.appendChild(r), r.styleSheet ? r.styleSheet.cssText = e : r.appendChild(document.createTextNode(e));
1483
+ let r = document.head || document.getElementsByTagName("head")[0], o = document.createElement("style");
1484
+ o.type = "text/css", t === "top" && r.firstChild ? r.insertBefore(o, r.firstChild) : r.appendChild(o), o.styleSheet ? o.styleSheet.cssText = e : o.appendChild(document.createTextNode(e));
1561
1485
  }
1562
- Cn(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
1486
+ Nn(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
1563
1487
  `);
1564
- function Ie(e) {
1488
+ function ke(e) {
1565
1489
  return e.label !== void 0;
1566
1490
  }
1567
- var En = 3, Nn = "32px", Tn = "16px", St = 4e3, Rn = 356, Pn = 14, kn = 20, In = 200;
1491
+ var Tn = 3, Rn = "32px", Pn = "16px", xt = 4e3, kn = 356, In = 14, An = 20, Dn = 200;
1568
1492
  function ee(...e) {
1569
1493
  return e.filter(Boolean).join(" ");
1570
1494
  }
1571
- function Dn(e) {
1572
- let [t, o] = e.split("-"), r = [];
1573
- return t && r.push(t), o && r.push(o), r;
1495
+ function Mn(e) {
1496
+ let [t, r] = e.split("-"), o = [];
1497
+ return t && o.push(t), r && o.push(r), o;
1574
1498
  }
1575
- var An = (e) => {
1576
- var t, o, r, n, s, i, c, d, u, f, h;
1577
- let { invert: g, toast: a, unstyled: N, interacting: v, setHeights: b, visibleToasts: C, heights: S, index: w, toasts: T, expanded: z, removeToast: R, defaultRichColors: k, closeButton: D, style: P, cancelButtonStyle: M, actionButtonStyle: F, className: E = "", descriptionClassName: ue = "", duration: V, position: ne, gap: H, loadingIcon: q, expandByDefault: fe, classNames: x, icons: U, closeButtonAriaLabel: He = "Close toast", pauseWhenPageIsHidden: A } = e, [_, $] = m.useState(null), [j, he] = m.useState(null), [O, Ve] = m.useState(!1), [Se, Pe] = m.useState(!1), [Ce, je] = m.useState(!1), [ut, ko] = m.useState(!1), [Io, ft] = m.useState(!1), [Do, Ge] = m.useState(0), [Ao, mt] = m.useState(0), Ee = m.useRef(a.duration || V || St), pt = m.useRef(null), me = m.useRef(null), Mo = w === 0, _o = w + 1 <= C, X = a.type, ge = a.dismissible !== !1, Lo = a.className || "", zo = a.descriptionClassName || "", ke = m.useMemo(() => S.findIndex((y) => y.toastId === a.id) || 0, [S, a.id]), $o = m.useMemo(() => {
1499
+ var _n = (e) => {
1500
+ var t, r, o, n, s, i, d, c, u, f, h;
1501
+ let { invert: g, toast: a, unstyled: N, interacting: v, setHeights: b, visibleToasts: E, heights: C, index: x, toasts: T, expanded: O, removeToast: R, defaultRichColors: A, closeButton: D, style: k, cancelButtonStyle: B, actionButtonStyle: H, className: S = "", descriptionClassName: de = "", duration: $, position: ne, gap: V, loadingIcon: q, expandByDefault: ue, classNames: w, icons: U, closeButtonAriaLabel: He = "Close toast", pauseWhenPageIsHidden: I } = e, [M, L] = m.useState(null), [j, pe] = m.useState(null), [z, Ve] = m.useState(!1), [we, Re] = m.useState(!1), [xe, $e] = m.useState(!1), [dt, Nr] = m.useState(!1), [Tr, ut] = m.useState(!1), [Rr, je] = m.useState(0), [Pr, ft] = m.useState(0), Se = m.useRef(a.duration || $ || xt), mt = m.useRef(null), fe = m.useRef(null), kr = x === 0, Ir = x + 1 <= E, X = a.type, he = a.dismissible !== !1, Ar = a.className || "", Dr = a.descriptionClassName || "", Pe = m.useMemo(() => C.findIndex((y) => y.toastId === a.id) || 0, [C, a.id]), Mr = m.useMemo(() => {
1578
1502
  var y;
1579
1503
  return (y = a.closeButton) != null ? y : D;
1580
- }, [a.closeButton, D]), ht = m.useMemo(() => a.duration || V || St, [a.duration, V]), We = m.useRef(0), ve = m.useRef(0), gt = m.useRef(0), be = m.useRef(null), [Oo, Bo] = ne.split("-"), vt = m.useMemo(() => S.reduce((y, I, L) => L >= ke ? y : y + I.height, 0), [S, ke]), bt = hn(), Fo = a.invert || g, Ye = X === "loading";
1581
- ve.current = m.useMemo(() => ke * H + vt, [ke, vt]), m.useEffect(() => {
1582
- Ee.current = ht;
1583
- }, [ht]), m.useEffect(() => {
1504
+ }, [a.closeButton, D]), pt = m.useMemo(() => a.duration || $ || xt, [a.duration, $]), Ge = m.useRef(0), ge = m.useRef(0), ht = m.useRef(0), ve = m.useRef(null), [_r, Lr] = ne.split("-"), gt = m.useMemo(() => C.reduce((y, P, _) => _ >= Pe ? y : y + P.height, 0), [C, Pe]), vt = vn(), zr = a.invert || g, We = X === "loading";
1505
+ ge.current = m.useMemo(() => Pe * V + gt, [Pe, gt]), m.useEffect(() => {
1506
+ Se.current = pt;
1507
+ }, [pt]), m.useEffect(() => {
1584
1508
  Ve(!0);
1585
1509
  }, []), m.useEffect(() => {
1586
- let y = me.current;
1510
+ let y = fe.current;
1587
1511
  if (y) {
1588
- let I = y.getBoundingClientRect().height;
1589
- return mt(I), b((L) => [{ toastId: a.id, height: I, position: a.position }, ...L]), () => b((L) => L.filter((Q) => Q.toastId !== a.id));
1512
+ let P = y.getBoundingClientRect().height;
1513
+ return ft(P), b((_) => [{ toastId: a.id, height: P, position: a.position }, ..._]), () => b((_) => _.filter((Z) => Z.toastId !== a.id));
1590
1514
  }
1591
1515
  }, [b, a.id]), m.useLayoutEffect(() => {
1592
- if (!O) return;
1593
- let y = me.current, I = y.style.height;
1516
+ if (!z) return;
1517
+ let y = fe.current, P = y.style.height;
1594
1518
  y.style.height = "auto";
1595
- let L = y.getBoundingClientRect().height;
1596
- y.style.height = I, mt(L), b((Q) => Q.find((Z) => Z.toastId === a.id) ? Q.map((Z) => Z.toastId === a.id ? { ...Z, height: L } : Z) : [{ toastId: a.id, height: L, position: a.position }, ...Q]);
1597
- }, [O, a.title, a.description, b, a.id]);
1519
+ let _ = y.getBoundingClientRect().height;
1520
+ y.style.height = P, ft(_), b((Z) => Z.find((Q) => Q.toastId === a.id) ? Z.map((Q) => Q.toastId === a.id ? { ...Q, height: _ } : Q) : [{ toastId: a.id, height: _, position: a.position }, ...Z]);
1521
+ }, [z, a.title, a.description, b, a.id]);
1598
1522
  let ae = m.useCallback(() => {
1599
- Pe(!0), Ge(ve.current), b((y) => y.filter((I) => I.toastId !== a.id)), setTimeout(() => {
1523
+ Re(!0), je(ge.current), b((y) => y.filter((P) => P.toastId !== a.id)), setTimeout(() => {
1600
1524
  R(a);
1601
- }, In);
1602
- }, [a, R, b, ve]);
1525
+ }, Dn);
1526
+ }, [a, R, b, ge]);
1603
1527
  m.useEffect(() => {
1604
1528
  if (a.promise && X === "loading" || a.duration === 1 / 0 || a.type === "loading") return;
1605
1529
  let y;
1606
- return z || v || A && bt ? (() => {
1607
- if (gt.current < We.current) {
1608
- let I = (/* @__PURE__ */ new Date()).getTime() - We.current;
1609
- Ee.current = Ee.current - I;
1530
+ return O || v || I && vt ? (() => {
1531
+ if (ht.current < Ge.current) {
1532
+ let P = (/* @__PURE__ */ new Date()).getTime() - Ge.current;
1533
+ Se.current = Se.current - P;
1610
1534
  }
1611
- gt.current = (/* @__PURE__ */ new Date()).getTime();
1612
- })() : Ee.current !== 1 / 0 && (We.current = (/* @__PURE__ */ new Date()).getTime(), y = setTimeout(() => {
1613
- var I;
1614
- (I = a.onAutoClose) == null || I.call(a, a), ae();
1615
- }, Ee.current)), () => clearTimeout(y);
1616
- }, [z, v, a, X, A, bt, ae]), m.useEffect(() => {
1535
+ ht.current = (/* @__PURE__ */ new Date()).getTime();
1536
+ })() : Se.current !== 1 / 0 && (Ge.current = (/* @__PURE__ */ new Date()).getTime(), y = setTimeout(() => {
1537
+ var P;
1538
+ (P = a.onAutoClose) == null || P.call(a, a), ae();
1539
+ }, Se.current)), () => clearTimeout(y);
1540
+ }, [O, v, a, X, I, vt, ae]), m.useEffect(() => {
1617
1541
  a.delete && ae();
1618
1542
  }, [ae, a.delete]);
1619
- function Ho() {
1620
- var y, I, L;
1621
- return U != null && U.loading ? m.createElement("div", { className: ee(x == null ? void 0 : x.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(x == null ? void 0 : x.loader, (I = a == null ? void 0 : a.classNames) == null ? void 0 : I.loader, "sonner-loader"), "data-visible": X === "loading" }, q) : m.createElement(cn, { className: ee(x == null ? void 0 : x.loader, (L = a == null ? void 0 : a.classNames) == null ? void 0 : L.loader), visible: X === "loading" });
1543
+ function Or() {
1544
+ var y, P, _;
1545
+ 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, (P = a == null ? void 0 : a.classNames) == null ? void 0 : P.loader, "sonner-loader"), "data-visible": X === "loading" }, q) : m.createElement(un, { className: ee(w == null ? void 0 : w.loader, (_ = a == null ? void 0 : a.classNames) == null ? void 0 : _.loader), visible: X === "loading" });
1622
1546
  }
1623
- return m.createElement("li", { tabIndex: 0, ref: me, className: ee(E, Lo, x == null ? void 0 : x.toast, (t = a == null ? void 0 : a.classNames) == null ? void 0 : t.toast, x == null ? void 0 : x.default, x == null ? void 0 : x[X], (o = a == null ? void 0 : a.classNames) == null ? void 0 : o[X]), "data-sonner-toast": "", "data-rich-colors": (r = a.richColors) != null ? r : k, "data-styled": !(a.jsx || a.unstyled || N), "data-mounted": O, "data-promise": !!a.promise, "data-swiped": Io, "data-removed": Se, "data-visible": _o, "data-y-position": Oo, "data-x-position": Bo, "data-index": w, "data-front": Mo, "data-swiping": Ce, "data-dismissible": ge, "data-type": X, "data-invert": Fo, "data-swipe-out": ut, "data-swipe-direction": j, "data-expanded": !!(z || fe && O), style: { "--index": w, "--toasts-before": w, "--z-index": T.length - w, "--offset": `${Se ? Do : ve.current}px`, "--initial-height": fe ? "auto" : `${Ao}px`, ...P, ...a.style }, onDragEnd: () => {
1624
- je(!1), $(null), be.current = null;
1547
+ return m.createElement("li", { tabIndex: 0, ref: fe, className: ee(S, Ar, 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 : A, "data-styled": !(a.jsx || a.unstyled || N), "data-mounted": z, "data-promise": !!a.promise, "data-swiped": Tr, "data-removed": we, "data-visible": Ir, "data-y-position": _r, "data-x-position": Lr, "data-index": x, "data-front": kr, "data-swiping": xe, "data-dismissible": he, "data-type": X, "data-invert": zr, "data-swipe-out": dt, "data-swipe-direction": j, "data-expanded": !!(O || ue && z), style: { "--index": x, "--toasts-before": x, "--z-index": T.length - x, "--offset": `${we ? Rr : ge.current}px`, "--initial-height": ue ? "auto" : `${Pr}px`, ...k, ...a.style }, onDragEnd: () => {
1548
+ $e(!1), L(null), ve.current = null;
1625
1549
  }, onPointerDown: (y) => {
1626
- Ye || !ge || (pt.current = /* @__PURE__ */ new Date(), Ge(ve.current), y.target.setPointerCapture(y.pointerId), y.target.tagName !== "BUTTON" && (je(!0), be.current = { x: y.clientX, y: y.clientY }));
1550
+ We || !he || (mt.current = /* @__PURE__ */ new Date(), je(ge.current), y.target.setPointerCapture(y.pointerId), y.target.tagName !== "BUTTON" && ($e(!0), ve.current = { x: y.clientX, y: y.clientY }));
1627
1551
  }, onPointerUp: () => {
1628
- var y, I, L, Q;
1629
- if (ut || !ge) return;
1630
- be.current = null;
1631
- let Z = Number(((y = me.current) == null ? void 0 : y.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), se = Number(((I = me.current) == null ? void 0 : I.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), pe = (/* @__PURE__ */ new Date()).getTime() - ((L = pt.current) == null ? void 0 : L.getTime()), J = _ === "x" ? Z : se, le = Math.abs(J) / pe;
1632
- if (Math.abs(J) >= kn || le > 0.11) {
1633
- Ge(ve.current), (Q = a.onDismiss) == null || Q.call(a, a), he(_ === "x" ? Z > 0 ? "right" : "left" : se > 0 ? "down" : "up"), ae(), ko(!0), ft(!1);
1552
+ var y, P, _, Z;
1553
+ if (dt || !he) return;
1554
+ ve.current = null;
1555
+ let Q = Number(((y = fe.current) == null ? void 0 : y.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), se = Number(((P = fe.current) == null ? void 0 : P.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), me = (/* @__PURE__ */ new Date()).getTime() - ((_ = mt.current) == null ? void 0 : _.getTime()), J = M === "x" ? Q : se, le = Math.abs(J) / me;
1556
+ if (Math.abs(J) >= An || le > 0.11) {
1557
+ je(ge.current), (Z = a.onDismiss) == null || Z.call(a, a), pe(M === "x" ? Q > 0 ? "right" : "left" : se > 0 ? "down" : "up"), ae(), Nr(!0), ut(!1);
1634
1558
  return;
1635
1559
  }
1636
- je(!1), $(null);
1560
+ $e(!1), L(null);
1637
1561
  }, onPointerMove: (y) => {
1638
- var I, L, Q, Z;
1639
- if (!be.current || !ge || ((I = window.getSelection()) == null ? void 0 : I.toString().length) > 0) return;
1640
- let se = y.clientY - be.current.y, pe = y.clientX - be.current.x, J = (L = e.swipeDirections) != null ? L : Dn(ne);
1641
- !_ && (Math.abs(pe) > 1 || Math.abs(se) > 1) && $(Math.abs(pe) > Math.abs(se) ? "x" : "y");
1562
+ var P, _, Z, Q;
1563
+ if (!ve.current || !he || ((P = window.getSelection()) == null ? void 0 : P.toString().length) > 0) return;
1564
+ let se = y.clientY - ve.current.y, me = y.clientX - ve.current.x, J = (_ = e.swipeDirections) != null ? _ : Mn(ne);
1565
+ !M && (Math.abs(me) > 1 || Math.abs(se) > 1) && L(Math.abs(me) > Math.abs(se) ? "x" : "y");
1642
1566
  let le = { x: 0, y: 0 };
1643
- _ === "y" ? (J.includes("top") || J.includes("bottom")) && (J.includes("top") && se < 0 || J.includes("bottom") && se > 0) && (le.y = se) : _ === "x" && (J.includes("left") || J.includes("right")) && (J.includes("left") && pe < 0 || J.includes("right") && pe > 0) && (le.x = pe), (Math.abs(le.x) > 0 || Math.abs(le.y) > 0) && ft(!0), (Q = me.current) == null || Q.style.setProperty("--swipe-amount-x", `${le.x}px`), (Z = me.current) == null || Z.style.setProperty("--swipe-amount-y", `${le.y}px`);
1644
- } }, $o && !a.jsx ? m.createElement("button", { "aria-label": He, "data-disabled": Ye, "data-close-button": !0, onClick: Ye || !ge ? () => {
1567
+ M === "y" ? (J.includes("top") || J.includes("bottom")) && (J.includes("top") && se < 0 || J.includes("bottom") && se > 0) && (le.y = se) : M === "x" && (J.includes("left") || J.includes("right")) && (J.includes("left") && me < 0 || J.includes("right") && me > 0) && (le.x = me), (Math.abs(le.x) > 0 || Math.abs(le.y) > 0) && ut(!0), (Z = fe.current) == null || Z.style.setProperty("--swipe-amount-x", `${le.x}px`), (Q = fe.current) == null || Q.style.setProperty("--swipe-amount-y", `${le.y}px`);
1568
+ } }, Mr && !a.jsx ? m.createElement("button", { "aria-label": He, "data-disabled": We, "data-close-button": !0, onClick: We || !he ? () => {
1645
1569
  } : () => {
1646
1570
  var y;
1647
1571
  ae(), (y = a.onDismiss) == null || y.call(a, a);
1648
- }, className: ee(x == null ? void 0 : x.closeButton, (n = a == null ? void 0 : a.classNames) == null ? void 0 : n.closeButton) }, (s = U == null ? void 0 : U.close) != null ? s : pn) : null, a.jsx || Ue(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(x == null ? void 0 : x.icon, (i = a == null ? void 0 : a.classNames) == null ? void 0 : i.icon) }, a.promise || a.type === "loading" && !a.icon ? a.icon || Ho() : null, a.type !== "loading" ? a.icon || (U == null ? void 0 : U[X]) || sn(X) : null) : null, m.createElement("div", { "data-content": "", className: ee(x == null ? void 0 : x.content, (c = a == null ? void 0 : a.classNames) == null ? void 0 : c.content) }, m.createElement("div", { "data-title": "", className: ee(x == null ? void 0 : x.title, (d = a == null ? void 0 : a.classNames) == null ? void 0 : d.title) }, typeof a.title == "function" ? a.title() : a.title), a.description ? m.createElement("div", { "data-description": "", className: ee(ue, zo, x == null ? void 0 : x.description, (u = a == null ? void 0 : a.classNames) == null ? void 0 : u.description) }, typeof a.description == "function" ? a.description() : a.description) : null), Ue(a.cancel) ? a.cancel : a.cancel && Ie(a.cancel) ? m.createElement("button", { "data-button": !0, "data-cancel": !0, style: a.cancelButtonStyle || M, onClick: (y) => {
1649
- var I, L;
1650
- Ie(a.cancel) && ge && ((L = (I = a.cancel).onClick) == null || L.call(I, y), ae());
1651
- }, className: ee(x == null ? void 0 : x.cancelButton, (f = a == null ? void 0 : a.classNames) == null ? void 0 : f.cancelButton) }, a.cancel.label) : null, Ue(a.action) ? a.action : a.action && Ie(a.action) ? m.createElement("button", { "data-button": !0, "data-action": !0, style: a.actionButtonStyle || F, onClick: (y) => {
1652
- var I, L;
1653
- Ie(a.action) && ((L = (I = a.action).onClick) == null || L.call(I, y), !y.defaultPrevented && ae());
1654
- }, className: ee(x == null ? void 0 : x.actionButton, (h = a == null ? void 0 : a.classNames) == null ? void 0 : h.actionButton) }, a.action.label) : null));
1572
+ }, 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 : gn) : null, a.jsx || Ye(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 || Or() : null, a.type !== "loading" ? a.icon || (U == null ? void 0 : U[X]) || cn(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, Dr, 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), Ye(a.cancel) ? a.cancel : a.cancel && ke(a.cancel) ? m.createElement("button", { "data-button": !0, "data-cancel": !0, style: a.cancelButtonStyle || B, onClick: (y) => {
1573
+ var P, _;
1574
+ ke(a.cancel) && he && ((_ = (P = a.cancel).onClick) == null || _.call(P, y), ae());
1575
+ }, className: ee(w == null ? void 0 : w.cancelButton, (f = a == null ? void 0 : a.classNames) == null ? void 0 : f.cancelButton) }, a.cancel.label) : null, Ye(a.action) ? a.action : a.action && ke(a.action) ? m.createElement("button", { "data-button": !0, "data-action": !0, style: a.actionButtonStyle || H, onClick: (y) => {
1576
+ var P, _;
1577
+ ke(a.action) && ((_ = (P = a.action).onClick) == null || _.call(P, y), !y.defaultPrevented && ae());
1578
+ }, className: ee(w == null ? void 0 : w.actionButton, (h = a == null ? void 0 : a.classNames) == null ? void 0 : h.actionButton) }, a.action.label) : null));
1655
1579
  };
1656
- function Ct() {
1580
+ function St() {
1657
1581
  if (typeof window > "u" || typeof document > "u") return "ltr";
1658
1582
  let e = document.documentElement.getAttribute("dir");
1659
1583
  return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
1660
1584
  }
1661
- function Mn(e, t) {
1662
- let o = {};
1663
- return [e, t].forEach((r, n) => {
1664
- let s = n === 1, i = s ? "--mobile-offset" : "--offset", c = s ? Tn : Nn;
1665
- function d(u) {
1585
+ function Ln(e, t) {
1586
+ let r = {};
1587
+ return [e, t].forEach((o, n) => {
1588
+ let s = n === 1, i = s ? "--mobile-offset" : "--offset", d = s ? Pn : Rn;
1589
+ function c(u) {
1666
1590
  ["top", "right", "bottom", "left"].forEach((f) => {
1667
- o[`${i}-${f}`] = typeof u == "number" ? `${u}px` : u;
1591
+ r[`${i}-${f}`] = typeof u == "number" ? `${u}px` : u;
1668
1592
  });
1669
1593
  }
1670
- typeof r == "number" || typeof r == "string" ? d(r) : typeof r == "object" ? ["top", "right", "bottom", "left"].forEach((u) => {
1671
- r[u] === void 0 ? o[`${i}-${u}`] = c : o[`${i}-${u}`] = typeof r[u] == "number" ? `${r[u]}px` : r[u];
1672
- }) : d(c);
1673
- }), o;
1594
+ typeof o == "number" || typeof o == "string" ? c(o) : typeof o == "object" ? ["top", "right", "bottom", "left"].forEach((u) => {
1595
+ o[u] === void 0 ? r[`${i}-${u}`] = d : r[`${i}-${u}`] = typeof o[u] == "number" ? `${o[u]}px` : o[u];
1596
+ }) : c(d);
1597
+ }), r;
1674
1598
  }
1675
- Vo(function(e, t) {
1676
- let { invert: o, position: r = "bottom-right", hotkey: n = ["altKey", "KeyT"], expand: s, closeButton: i, className: c, offset: d, mobileOffset: u, theme: f = "light", richColors: h, duration: g, style: a, visibleToasts: N = En, toastOptions: v, dir: b = Ct(), gap: C = Pn, loadingIcon: S, icons: w, containerAriaLabel: T = "Notifications", pauseWhenPageIsHidden: z } = e, [R, k] = m.useState([]), D = m.useMemo(() => Array.from(new Set([r].concat(R.filter((A) => A.position).map((A) => A.position)))), [R, r]), [P, M] = m.useState([]), [F, E] = m.useState(!1), [ue, V] = m.useState(!1), [ne, H] = m.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), q = m.useRef(null), fe = n.join("+").replace(/Key/g, "").replace(/Digit/g, ""), x = m.useRef(null), U = m.useRef(!1), He = m.useCallback((A) => {
1677
- k((_) => {
1678
- var $;
1679
- return ($ = _.find((j) => j.id === A.id)) != null && $.delete || G.dismiss(A.id), _.filter(({ id: j }) => j !== A.id);
1599
+ Br(function(e, t) {
1600
+ 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: h, duration: g, style: a, visibleToasts: N = Tn, toastOptions: v, dir: b = St(), gap: E = In, loadingIcon: C, icons: x, containerAriaLabel: T = "Notifications", pauseWhenPageIsHidden: O } = e, [R, A] = m.useState([]), D = m.useMemo(() => Array.from(new Set([o].concat(R.filter((I) => I.position).map((I) => I.position)))), [R, o]), [k, B] = m.useState([]), [H, S] = m.useState(!1), [de, $] = 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((I) => {
1601
+ A((M) => {
1602
+ var L;
1603
+ return (L = M.find((j) => j.id === I.id)) != null && L.delete || G.dismiss(I.id), M.filter(({ id: j }) => j !== I.id);
1680
1604
  });
1681
1605
  }, []);
1682
- return m.useEffect(() => G.subscribe((A) => {
1683
- if (A.dismiss) {
1684
- k((_) => _.map(($) => $.id === A.id ? { ...$, delete: !0 } : $));
1606
+ return m.useEffect(() => G.subscribe((I) => {
1607
+ if (I.dismiss) {
1608
+ A((M) => M.map((L) => L.id === I.id ? { ...L, delete: !0 } : L));
1685
1609
  return;
1686
1610
  }
1687
1611
  setTimeout(() => {
1688
- ur.flushSync(() => {
1689
- k((_) => {
1690
- let $ = _.findIndex((j) => j.id === A.id);
1691
- return $ !== -1 ? [..._.slice(0, $), { ..._[$], ...A }, ..._.slice($ + 1)] : [A, ..._];
1612
+ fo.flushSync(() => {
1613
+ A((M) => {
1614
+ let L = M.findIndex((j) => j.id === I.id);
1615
+ return L !== -1 ? [...M.slice(0, L), { ...M[L], ...I }, ...M.slice(L + 1)] : [I, ...M];
1692
1616
  });
1693
1617
  });
1694
1618
  });
1695
1619
  }), []), m.useEffect(() => {
1696
1620
  if (f !== "system") {
1697
- H(f);
1621
+ V(f);
1698
1622
  return;
1699
1623
  }
1700
- if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? H("dark") : H("light")), typeof window > "u") return;
1701
- let A = window.matchMedia("(prefers-color-scheme: dark)");
1624
+ if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? V("dark") : V("light")), typeof window > "u") return;
1625
+ let I = window.matchMedia("(prefers-color-scheme: dark)");
1702
1626
  try {
1703
- A.addEventListener("change", ({ matches: _ }) => {
1704
- H(_ ? "dark" : "light");
1627
+ I.addEventListener("change", ({ matches: M }) => {
1628
+ V(M ? "dark" : "light");
1705
1629
  });
1706
1630
  } catch {
1707
- A.addListener(({ matches: $ }) => {
1631
+ I.addListener(({ matches: L }) => {
1708
1632
  try {
1709
- H($ ? "dark" : "light");
1633
+ V(L ? "dark" : "light");
1710
1634
  } catch (j) {
1711
1635
  console.error(j);
1712
1636
  }
1713
1637
  });
1714
1638
  }
1715
1639
  }, [f]), m.useEffect(() => {
1716
- R.length <= 1 && E(!1);
1640
+ R.length <= 1 && S(!1);
1717
1641
  }, [R]), m.useEffect(() => {
1718
- let A = (_) => {
1719
- var $, j;
1720
- n.every((he) => _[he] || _.code === he) && (E(!0), ($ = q.current) == null || $.focus()), _.code === "Escape" && (document.activeElement === q.current || (j = q.current) != null && j.contains(document.activeElement)) && E(!1);
1642
+ let I = (M) => {
1643
+ var L, j;
1644
+ n.every((pe) => M[pe] || M.code === pe) && (S(!0), (L = q.current) == null || L.focus()), M.code === "Escape" && (document.activeElement === q.current || (j = q.current) != null && j.contains(document.activeElement)) && S(!1);
1721
1645
  };
1722
- return document.addEventListener("keydown", A), () => document.removeEventListener("keydown", A);
1646
+ return document.addEventListener("keydown", I), () => document.removeEventListener("keydown", I);
1723
1647
  }, [n]), m.useEffect(() => {
1724
1648
  if (q.current) return () => {
1725
- x.current && (x.current.focus({ preventScroll: !0 }), x.current = null, U.current = !1);
1649
+ w.current && (w.current.focus({ preventScroll: !0 }), w.current = null, U.current = !1);
1726
1650
  };
1727
- }, [q.current]), m.createElement("section", { ref: t, "aria-label": `${T} ${fe}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, D.map((A, _) => {
1728
- var $;
1729
- let [j, he] = A.split("-");
1730
- return R.length ? m.createElement("ol", { key: A, dir: b === "auto" ? Ct() : b, tabIndex: -1, ref: q, className: c, "data-sonner-toaster": !0, "data-theme": ne, "data-y-position": j, "data-lifted": F && R.length > 1 && !s, "data-x-position": he, style: { "--front-toast-height": `${(($ = P[0]) == null ? void 0 : $.height) || 0}px`, "--width": `${Rn}px`, "--gap": `${C}px`, ...a, ...Mn(d, u) }, onBlur: (O) => {
1731
- U.current && !O.currentTarget.contains(O.relatedTarget) && (U.current = !1, x.current && (x.current.focus({ preventScroll: !0 }), x.current = null));
1732
- }, onFocus: (O) => {
1733
- O.target instanceof HTMLElement && O.target.dataset.dismissible === "false" || U.current || (U.current = !0, x.current = O.relatedTarget);
1734
- }, onMouseEnter: () => E(!0), onMouseMove: () => E(!0), onMouseLeave: () => {
1735
- ue || E(!1);
1736
- }, onDragEnd: () => E(!1), onPointerDown: (O) => {
1737
- O.target instanceof HTMLElement && O.target.dataset.dismissible === "false" || V(!0);
1738
- }, onPointerUp: () => V(!1) }, R.filter((O) => !O.position && _ === 0 || O.position === A).map((O, Ve) => {
1739
- var Se, Pe;
1740
- return m.createElement(An, { key: O.id, icons: w, index: Ve, toast: O, defaultRichColors: h, duration: (Se = v == null ? void 0 : v.duration) != null ? Se : g, className: v == null ? void 0 : v.className, descriptionClassName: v == null ? void 0 : v.descriptionClassName, invert: o, visibleToasts: N, closeButton: (Pe = v == null ? void 0 : v.closeButton) != null ? Pe : i, interacting: ue, position: A, style: v == null ? void 0 : v.style, unstyled: v == null ? void 0 : v.unstyled, classNames: v == null ? void 0 : v.classNames, cancelButtonStyle: v == null ? void 0 : v.cancelButtonStyle, actionButtonStyle: v == null ? void 0 : v.actionButtonStyle, removeToast: He, toasts: R.filter((Ce) => Ce.position == O.position), heights: P.filter((Ce) => Ce.position == O.position), setHeights: M, expandByDefault: s, gap: C, loadingIcon: S, expanded: F, pauseWhenPageIsHidden: z, swipeDirections: e.swipeDirections });
1651
+ }, [q.current]), m.createElement("section", { ref: t, "aria-label": `${T} ${ue}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, D.map((I, M) => {
1652
+ var L;
1653
+ let [j, pe] = I.split("-");
1654
+ return R.length ? m.createElement("ol", { key: I, dir: b === "auto" ? St() : b, tabIndex: -1, ref: q, className: d, "data-sonner-toaster": !0, "data-theme": ne, "data-y-position": j, "data-lifted": H && R.length > 1 && !s, "data-x-position": pe, style: { "--front-toast-height": `${((L = k[0]) == null ? void 0 : L.height) || 0}px`, "--width": `${kn}px`, "--gap": `${E}px`, ...a, ...Ln(c, u) }, onBlur: (z) => {
1655
+ U.current && !z.currentTarget.contains(z.relatedTarget) && (U.current = !1, w.current && (w.current.focus({ preventScroll: !0 }), w.current = null));
1656
+ }, onFocus: (z) => {
1657
+ z.target instanceof HTMLElement && z.target.dataset.dismissible === "false" || U.current || (U.current = !0, w.current = z.relatedTarget);
1658
+ }, onMouseEnter: () => S(!0), onMouseMove: () => S(!0), onMouseLeave: () => {
1659
+ de || S(!1);
1660
+ }, onDragEnd: () => S(!1), onPointerDown: (z) => {
1661
+ z.target instanceof HTMLElement && z.target.dataset.dismissible === "false" || $(!0);
1662
+ }, onPointerUp: () => $(!1) }, R.filter((z) => !z.position && M === 0 || z.position === I).map((z, Ve) => {
1663
+ var we, Re;
1664
+ return m.createElement(_n, { key: z.id, icons: x, index: Ve, toast: z, defaultRichColors: h, duration: (we = v == null ? void 0 : v.duration) != null ? we : g, className: v == null ? void 0 : v.className, descriptionClassName: v == null ? void 0 : v.descriptionClassName, invert: r, visibleToasts: N, closeButton: (Re = v == null ? void 0 : v.closeButton) != null ? Re : i, interacting: de, position: I, style: v == null ? void 0 : v.style, unstyled: v == null ? void 0 : v.unstyled, classNames: v == null ? void 0 : v.classNames, cancelButtonStyle: v == null ? void 0 : v.cancelButtonStyle, actionButtonStyle: v == null ? void 0 : v.actionButtonStyle, removeToast: He, toasts: R.filter((xe) => xe.position == z.position), heights: k.filter((xe) => xe.position == z.position), setHeights: B, expandByDefault: s, gap: E, loadingIcon: C, expanded: H, pauseWhenPageIsHidden: O, swipeDirections: e.swipeDirections });
1741
1665
  })) : null;
1742
1666
  }));
1743
1667
  });
1744
- const Ro = {
1745
- mobile: { width: 375, icon: er, label: "Mobile (375px)" },
1746
- tablet: { width: 768, icon: Jo, label: "Tablet (768px)" },
1747
- small: { width: 1024, icon: Zo, label: "Small Desktop (1024px)" },
1748
- desktop: { width: "100%", icon: Qo, label: "Desktop (Full)" }
1749
- }, _n = ({ onSave: e, deviceSize: t, onDeviceSizeChange: o }) => {
1750
- const { actions: r, query: n, canUndo: s, canRedo: i } = xe((d, u) => ({
1668
+ const Cr = {
1669
+ mobile: { width: 375, icon: Qr, label: "Mobile (375px)" },
1670
+ tablet: { width: 768, icon: Zr, label: "Tablet (768px)" },
1671
+ small: { width: 1024, icon: qr, label: "Small Desktop (1024px)" },
1672
+ desktop: { width: "100%", icon: Kr, label: "Desktop (Full)" }
1673
+ }, zn = ({ onSave: e, deviceSize: t, onDeviceSizeChange: r }) => {
1674
+ const { actions: o, query: n, canUndo: s, canRedo: i } = ye((c, u) => ({
1751
1675
  canUndo: u.history.canUndo(),
1752
1676
  canRedo: u.history.canRedo()
1753
- })), c = () => {
1754
- const d = n.serialize();
1755
- e == null || e(d), Sn.success("Page saved successfully");
1677
+ })), d = () => {
1678
+ const c = n.serialize();
1679
+ e == null || e(c), En.success("Page saved successfully");
1756
1680
  };
1757
- return /* @__PURE__ */ B("div", { className: "flex items-center gap-4", children: [
1758
- /* @__PURE__ */ l(tr, { children: /* @__PURE__ */ l(
1759
- No,
1681
+ return /* @__PURE__ */ F("div", { className: "flex items-center gap-4", children: [
1682
+ /* @__PURE__ */ l(Jr, { children: /* @__PURE__ */ l(
1683
+ xr,
1760
1684
  {
1761
1685
  type: "single",
1762
1686
  value: t,
1763
- onValueChange: (d) => d && o(d),
1687
+ onValueChange: (c) => c && r(c),
1764
1688
  className: "bg-muted rounded-md p-1",
1765
- children: Object.entries(Ro).map(([d, { icon: u, label: f }]) => /* @__PURE__ */ B(or, { children: [
1766
- /* @__PURE__ */ l(rr, { asChild: !0, children: /* @__PURE__ */ l(
1767
- To,
1689
+ children: Object.entries(Cr).map(([c, { icon: u, label: f }]) => /* @__PURE__ */ F(eo, { children: [
1690
+ /* @__PURE__ */ l(to, { asChild: !0, children: /* @__PURE__ */ l(
1691
+ Sr,
1768
1692
  {
1769
- value: d,
1693
+ value: c,
1770
1694
  size: "sm",
1771
1695
  className: "data-[state=on]:bg-background data-[state=on]:shadow-sm",
1772
1696
  children: /* @__PURE__ */ l(u, { className: "h-4 w-4" })
1773
1697
  }
1774
1698
  ) }),
1775
- /* @__PURE__ */ l(nr, { side: "bottom", children: /* @__PURE__ */ l("p", { children: f }) })
1776
- ] }, d))
1699
+ /* @__PURE__ */ l(ro, { side: "bottom", children: /* @__PURE__ */ l("p", { children: f }) })
1700
+ ] }, c))
1777
1701
  }
1778
1702
  ) }),
1779
1703
  /* @__PURE__ */ l("div", { className: "h-6 w-px bg-border" }),
1780
- /* @__PURE__ */ B("div", { className: "flex items-center gap-2", children: [
1704
+ /* @__PURE__ */ F("div", { className: "flex items-center gap-2", children: [
1781
1705
  /* @__PURE__ */ l(
1782
- De,
1706
+ Ie,
1783
1707
  {
1784
1708
  variant: "outline",
1785
1709
  size: "sm",
1786
- onClick: () => r.history.undo(),
1710
+ onClick: () => o.history.undo(),
1787
1711
  disabled: !s,
1788
- children: /* @__PURE__ */ l(gr, { className: "h-4 w-4" })
1712
+ children: /* @__PURE__ */ l(bo, { className: "h-4 w-4" })
1789
1713
  }
1790
1714
  ),
1791
1715
  /* @__PURE__ */ l(
1792
- De,
1716
+ Ie,
1793
1717
  {
1794
1718
  variant: "outline",
1795
1719
  size: "sm",
1796
- onClick: () => r.history.redo(),
1720
+ onClick: () => o.history.redo(),
1797
1721
  disabled: !i,
1798
- children: /* @__PURE__ */ l(mr, { className: "h-4 w-4" })
1722
+ children: /* @__PURE__ */ l(ho, { className: "h-4 w-4" })
1799
1723
  }
1800
1724
  ),
1801
- /* @__PURE__ */ B(De, { size: "sm", onClick: c, children: [
1802
- /* @__PURE__ */ l(pr, { className: "h-4 w-4 mr-2" }),
1725
+ /* @__PURE__ */ F(Ie, { size: "sm", onClick: d, children: [
1726
+ /* @__PURE__ */ l(go, { className: "h-4 w-4 mr-2" }),
1803
1727
  "Save"
1804
1728
  ] })
1805
1729
  ] })
1806
1730
  ] });
1807
- }, dt = ({ children: e, className: t }) => {
1731
+ }, ct = ({ children: e, className: t }) => {
1808
1732
  const {
1809
- connectors: { connect: o, drag: r },
1733
+ connectors: { connect: r, drag: o },
1810
1734
  selected: n
1811
- } = Je((s) => ({
1735
+ } = Qe((s) => ({
1812
1736
  selected: s.events.selected
1813
1737
  }));
1814
1738
  return /* @__PURE__ */ l(
1815
1739
  "div",
1816
1740
  {
1817
1741
  ref: (s) => {
1818
- s && o(r(s));
1742
+ s && r(o(s));
1819
1743
  },
1820
- className: Nt("relative min-h-[100vh] bg-white", t || ""),
1744
+ className: Et("relative min-h-[100vh] bg-white", t || ""),
1821
1745
  children: e
1822
1746
  }
1823
1747
  );
1824
1748
  };
1825
- dt.craft = {
1749
+ ct.craft = {
1826
1750
  props: {},
1827
1751
  displayName: "Body",
1828
1752
  isCanvas: !0,
@@ -1832,21 +1756,21 @@ dt.craft = {
1832
1756
  )
1833
1757
  }
1834
1758
  };
1835
- const Ln = ({ htmlJson: e }) => {
1836
- const { actions: t } = xe();
1837
- return jo(() => {
1759
+ const On = ({ htmlJson: e }) => {
1760
+ const { actions: t } = ye();
1761
+ return Fr(() => {
1838
1762
  e && t.deserialize(e);
1839
- }, [e]), /* @__PURE__ */ l(ar, { children: /* @__PURE__ */ l(ie, { id: "mainBody", is: dt, canvas: !0 }) });
1840
- }, Po = ({
1763
+ }, [e]), /* @__PURE__ */ l(oo, { children: /* @__PURE__ */ l(Ae, { id: "mainBody", is: ct, canvas: !0 }) });
1764
+ }, Er = ({
1841
1765
  background: e = "transparent",
1842
1766
  padding: t = { top: 16, right: 16, bottom: 16, left: 16 },
1843
- margin: o = { top: 0, right: 0, bottom: 0, left: 0 },
1844
- width: r = "auto",
1767
+ margin: r = { top: 0, right: 0, bottom: 0, left: 0 },
1768
+ width: o = "auto",
1845
1769
  minHeight: n = 100,
1846
1770
  maxWidth: s = "none",
1847
1771
  display: i = "block",
1848
- flexDirection: c = "column",
1849
- justifyContent: d = "flex-start",
1772
+ flexDirection: d = "column",
1773
+ justifyContent: c = "flex-start",
1850
1774
  alignItems: u = "stretch",
1851
1775
  gap: f = 0,
1852
1776
  borderRadius: h = 8,
@@ -1857,11 +1781,11 @@ const Ln = ({ htmlJson: e }) => {
1857
1781
  children: b
1858
1782
  }) => {
1859
1783
  const {
1860
- connectors: { connect: C, drag: S },
1861
- isActive: w
1862
- } = Je((k) => ({
1863
- isActive: k.events.selected
1864
- })), T = typeof t == "object" ? `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px` : `${t}px`, z = typeof o == "object" ? `${o.top}px ${o.right}px ${o.bottom}px ${o.left}px` : `${o}px`, R = [
1784
+ connectors: { connect: E, drag: C },
1785
+ isActive: x
1786
+ } = Qe((A) => ({
1787
+ isActive: A.events.selected
1788
+ })), T = typeof t == "object" ? `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px` : `${t}px`, O = typeof r == "object" ? `${r.top}px ${r.right}px ${r.bottom}px ${r.left}px` : `${r}px`, R = [
1865
1789
  {
1866
1790
  url: "https://myracereel.com/privacy-data-privacy",
1867
1791
  name: "Privacy & Data Policy"
@@ -1874,18 +1798,18 @@ const Ln = ({ htmlJson: e }) => {
1874
1798
  { url: "https://myracereel.com/contact", name: "Contact Us" }
1875
1799
  ];
1876
1800
  return /* @__PURE__ */ l(
1877
- et,
1801
+ Je,
1878
1802
  {
1879
1803
  style: {
1880
1804
  backgroundColor: e,
1881
1805
  padding: T,
1882
- margin: z,
1883
- width: r === "auto" ? "100%" : r,
1806
+ margin: O,
1807
+ width: o === "auto" ? "100%" : o,
1884
1808
  minHeight: `${n}px`,
1885
1809
  maxWidth: s === "none" ? "none" : `${s}px`,
1886
1810
  display: i,
1887
- flexDirection: i === "flex" ? c : void 0,
1888
- justifyContent: i === "flex" ? d : void 0,
1811
+ flexDirection: i === "flex" ? d : void 0,
1812
+ justifyContent: i === "flex" ? c : void 0,
1889
1813
  alignItems: i === "flex" ? u : void 0,
1890
1814
  gap: i === "flex" ? `${f}px` : void 0,
1891
1815
  borderRadius: `${h}px`,
@@ -1895,24 +1819,24 @@ const Ln = ({ htmlJson: e }) => {
1895
1819
  boxShadow: v === "none" ? "none" : v
1896
1820
  },
1897
1821
  className: "bg-black",
1898
- ref: (k) => k && C(S(k)),
1899
- children: /* @__PURE__ */ l("div", { className: "flex justify-center w-full", children: /* @__PURE__ */ B("div", { className: "w-full flex flex-col py-10 gap-y-3.5 ", children: [
1822
+ ref: (A) => A && E(C(A)),
1823
+ children: /* @__PURE__ */ l("div", { className: "flex justify-center w-full", children: /* @__PURE__ */ F("div", { className: "w-full flex flex-col py-10 gap-y-3.5 ", children: [
1900
1824
  /* @__PURE__ */ l("div", { className: "flex w-full gap-x-1 justify-center items-center", children: /* @__PURE__ */ l("div", { className: "text-white text-sm", children: "Powered by MyRaceReel" }) }),
1901
- /* @__PURE__ */ l("div", { className: "flex @md:flex-row @max-md:flex-col md:flex-row justify-center items-center gap-x-6 gap-y-2 w-full flex-col", children: R.map((k) => /* @__PURE__ */ l(
1825
+ /* @__PURE__ */ l("div", { className: "flex @md:flex-row @max-md:flex-col md:flex-row justify-center items-center gap-x-6 gap-y-2 w-full flex-col", children: R.map((A) => /* @__PURE__ */ l(
1902
1826
  "a",
1903
1827
  {
1904
1828
  className: "text-white",
1905
- href: k.url,
1829
+ href: A.url,
1906
1830
  target: "_blank",
1907
- children: k.name
1831
+ children: A.name
1908
1832
  },
1909
- k.name
1833
+ A.name
1910
1834
  )) })
1911
1835
  ] }) })
1912
1836
  }
1913
1837
  );
1914
1838
  };
1915
- Po.craft = {
1839
+ Er.craft = {
1916
1840
  displayName: "Footer",
1917
1841
  props: {
1918
1842
  background: "transparent",
@@ -1932,46 +1856,46 @@ Po.craft = {
1932
1856
  borderStyle: "dashed",
1933
1857
  boxShadow: "none"
1934
1858
  },
1935
- related: { settings: Tt }
1859
+ related: { settings: Nt }
1936
1860
  };
1937
- const Fn = ({ initialData: e, onSave: t, onStateChange: o }) => {
1938
- var d;
1939
- const r = sr(), [n, s] = Ne("desktop"), i = ((d = Ro[n]) == null ? void 0 : d.width) || "100%", c = (u) => {
1940
- if (o)
1861
+ const $n = ({ initialData: e, onSave: t, onStateChange: r }) => {
1862
+ var c;
1863
+ const o = no(), [n, s] = Ee("desktop"), i = ((c = Cr[n]) == null ? void 0 : c.width) || "100%", d = (u) => {
1864
+ if (r)
1941
1865
  try {
1942
1866
  const f = u.serialize();
1943
- o(f);
1867
+ r(f);
1944
1868
  } catch {
1945
1869
  }
1946
1870
  };
1947
1871
  return /* @__PURE__ */ l(
1948
- lr,
1872
+ ao,
1949
1873
  {
1950
1874
  resolver: {
1951
- Body: dt,
1952
- Div: tt,
1953
- Wrapper: et,
1954
- Section: kt,
1955
- Container: Ae,
1956
- Text: Dt,
1957
- ButtonComponent: At,
1958
- Heading: It,
1959
- Image: _t,
1960
- Img: ir,
1961
- Divider: zt,
1962
- Spacer: $t,
1963
- Video: Lt,
1964
- Columns: Pt,
1965
- Link: Mt,
1966
- Footer: Po
1875
+ Body: ct,
1876
+ Div: et,
1877
+ Wrapper: Je,
1878
+ Section: io,
1879
+ Container: Rt,
1880
+ Text: kt,
1881
+ ButtonComponent: It,
1882
+ Heading: Pt,
1883
+ Image: Dt,
1884
+ Img: lo,
1885
+ Divider: _t,
1886
+ Spacer: Lt,
1887
+ Video: Mt,
1888
+ Columns: so,
1889
+ Link: At,
1890
+ Footer: Er
1967
1891
  },
1968
1892
  enabled: !0,
1969
- onNodesChange: (u) => c(u),
1970
- children: /* @__PURE__ */ l(cr, { value: n, children: /* @__PURE__ */ l(dr, { value: r, children: /* @__PURE__ */ B("div", { className: "flex flex-col h-full", children: [
1971
- /* @__PURE__ */ B("div", { className: "flex items-center justify-between pb-4 border-b border-border", children: [
1893
+ onNodesChange: (u) => d(u),
1894
+ children: /* @__PURE__ */ l(co, { value: n, children: /* @__PURE__ */ l(uo, { value: o, children: /* @__PURE__ */ F("div", { className: "flex flex-col h-full", children: [
1895
+ /* @__PURE__ */ F("div", { className: "flex items-center justify-between pb-4 border-b border-border", children: [
1972
1896
  /* @__PURE__ */ l("h2", { className: "text-lg font-semibold", children: "Page Builder" }),
1973
1897
  /* @__PURE__ */ l(
1974
- _n,
1898
+ zn,
1975
1899
  {
1976
1900
  onSave: t,
1977
1901
  deviceSize: n,
@@ -1979,12 +1903,12 @@ const Fn = ({ initialData: e, onSave: t, onStateChange: o }) => {
1979
1903
  }
1980
1904
  )
1981
1905
  ] }),
1982
- /* @__PURE__ */ B("div", { className: "flex gap-4 mt-4 flex-1 min-h-0", children: [
1983
- /* @__PURE__ */ l(Xe, { className: "w-56 shrink-0", children: /* @__PURE__ */ B(Ke, { className: "p-4 space-y-6", children: [
1984
- /* @__PURE__ */ l(br, {}),
1985
- /* @__PURE__ */ l(zr, {})
1906
+ /* @__PURE__ */ F("div", { className: "flex gap-4 mt-4 flex-1 min-h-0", children: [
1907
+ /* @__PURE__ */ l(Ue, { className: "w-56 shrink-0", children: /* @__PURE__ */ F(Xe, { className: "p-4 space-y-6", children: [
1908
+ /* @__PURE__ */ l(wo, {}),
1909
+ /* @__PURE__ */ l(Bo, {})
1986
1910
  ] }) }),
1987
- /* @__PURE__ */ l(Xe, { className: "flex-1 overflow-hidden bg-muted/30 flex flex-col", children: /* @__PURE__ */ l(Ke, { className: "p-4 flex-1 flex justify-center overflow-hidden", children: /* @__PURE__ */ l(lt, { className: "h-full w-full", children: /* @__PURE__ */ l("div", { className: "flex justify-center min-h-full", children: /* @__PURE__ */ l(
1911
+ /* @__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(st, { className: "h-full w-full", children: /* @__PURE__ */ l("div", { className: "flex justify-center min-h-full", children: /* @__PURE__ */ l(
1988
1912
  "div",
1989
1913
  {
1990
1914
  className: "bg-white rounded-lg min-h-full p-4 border border-dashed border-border transition-all duration-300 shadow-sm",
@@ -1992,15 +1916,15 @@ const Fn = ({ initialData: e, onSave: t, onStateChange: o }) => {
1992
1916
  width: typeof i == "number" ? `${i}px` : i,
1993
1917
  maxWidth: "100%"
1994
1918
  },
1995
- children: /* @__PURE__ */ l(Ln, { htmlJson: e })
1919
+ children: /* @__PURE__ */ l(On, { htmlJson: e })
1996
1920
  }
1997
1921
  ) }) }) }) }),
1998
- /* @__PURE__ */ l(Xe, { className: "w-72 shrink-0 flex flex-col", children: /* @__PURE__ */ l(Ke, { className: "p-4 flex-1 overflow-hidden", children: /* @__PURE__ */ l(_r, {}) }) })
1922
+ /* @__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(zo, {}) }) })
1999
1923
  ] })
2000
1924
  ] }) }) })
2001
1925
  }
2002
1926
  );
2003
1927
  };
2004
1928
  export {
2005
- Fn as default
1929
+ $n as default
2006
1930
  };