@purpurds/modal 4.5.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/modal.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs as j, jsx as _ } from "react/jsx-runtime";
2
2
  import * as m from "react";
3
- import { useCallback as Q, createContext as xe, useMemo as me, createElement as g, useContext as tt, useLayoutEffect as Tt, useRef as O, useEffect as A, useState as G, forwardRef as C, Children as M, isValidElement as q, cloneElement as re, Fragment as Ie, useReducer as Dt } from "react";
3
+ import { useCallback as Q, createContext as Ce, useMemo as me, createElement as g, useContext as tt, useLayoutEffect as Tt, useRef as O, useEffect as A, useState as V, forwardRef as S, Children as M, isValidElement as q, cloneElement as ae, Fragment as Ie, useReducer as Dt } from "react";
4
4
  import It, { flushSync as nt } from "react-dom";
5
5
  function P() {
6
6
  return P = Object.assign ? Object.assign.bind() : function(e) {
@@ -32,7 +32,7 @@ function J(...e) {
32
32
  function Mt(e, n = []) {
33
33
  let t = [];
34
34
  function o(r, i) {
35
- const u = /* @__PURE__ */ xe(i), s = t.length;
35
+ const u = /* @__PURE__ */ Ce(i), s = t.length;
36
36
  t = [
37
37
  ...t,
38
38
  i
@@ -60,7 +60,7 @@ function Mt(e, n = []) {
60
60
  ];
61
61
  }
62
62
  const a = () => {
63
- const r = t.map((i) => /* @__PURE__ */ xe(i));
63
+ const r = t.map((i) => /* @__PURE__ */ Ce(i));
64
64
  return function(u) {
65
65
  const s = (u == null ? void 0 : u[e]) || r;
66
66
  return me(
@@ -127,7 +127,7 @@ function be(e) {
127
127
  e
128
128
  ]), e || (n ? `radix-${n}` : "");
129
129
  }
130
- function K(e) {
130
+ function G(e) {
131
131
  const n = O(e);
132
132
  return A(() => {
133
133
  n.current = e;
@@ -144,7 +144,7 @@ function jt({ prop: e, defaultProp: n, onChange: t = () => {
144
144
  const [o, a] = Bt({
145
145
  defaultProp: n,
146
146
  onChange: t
147
- }), r = e !== void 0, i = r ? e : o, u = K(t), s = Q((d) => {
147
+ }), r = e !== void 0, i = r ? e : o, u = G(t), s = Q((d) => {
148
148
  if (r) {
149
149
  const l = typeof d == "function" ? d(e) : d;
150
150
  l !== e && u(l);
@@ -162,7 +162,7 @@ function jt({ prop: e, defaultProp: n, onChange: t = () => {
162
162
  ];
163
163
  }
164
164
  function Bt({ defaultProp: e, onChange: n }) {
165
- const t = G(e), [o] = t, a = O(o), r = K(n);
165
+ const t = V(e), [o] = t, a = O(o), r = G(n);
166
166
  return A(() => {
167
167
  a.current !== o && (r(o), a.current = o);
168
168
  }, [
@@ -171,32 +171,32 @@ function Bt({ defaultProp: e, onChange: n }) {
171
171
  r
172
172
  ]), t;
173
173
  }
174
- const Re = /* @__PURE__ */ C((e, n) => {
175
- const { children: t, ...o } = e, a = M.toArray(t), r = a.find(Wt);
174
+ const Re = /* @__PURE__ */ S((e, n) => {
175
+ const { children: t, ...o } = e, a = M.toArray(t), r = a.find(Ut);
176
176
  if (r) {
177
177
  const i = r.props.children, u = a.map((s) => s === r ? M.count(i) > 1 ? M.only(null) : /* @__PURE__ */ q(i) ? i.props.children : null : s);
178
178
  return /* @__PURE__ */ g(Pe, P({}, o, {
179
179
  ref: n
180
- }), /* @__PURE__ */ q(i) ? /* @__PURE__ */ re(i, void 0, u) : null);
180
+ }), /* @__PURE__ */ q(i) ? /* @__PURE__ */ ae(i, void 0, u) : null);
181
181
  }
182
182
  return /* @__PURE__ */ g(Pe, P({}, o, {
183
183
  ref: n
184
184
  }), t);
185
185
  });
186
186
  Re.displayName = "Slot";
187
- const Pe = /* @__PURE__ */ C((e, n) => {
187
+ const Pe = /* @__PURE__ */ S((e, n) => {
188
188
  const { children: t, ...o } = e;
189
- return /* @__PURE__ */ q(t) ? /* @__PURE__ */ re(t, {
190
- ...Ut(o, t.props),
189
+ return /* @__PURE__ */ q(t) ? /* @__PURE__ */ ae(t, {
190
+ ...Wt(o, t.props),
191
191
  ref: n ? rt(n, t.ref) : t.ref
192
192
  }) : M.count(t) > 1 ? M.only(null) : null;
193
193
  });
194
194
  Pe.displayName = "SlotClone";
195
195
  const qt = ({ children: e }) => /* @__PURE__ */ g(Ie, null, e);
196
- function Wt(e) {
196
+ function Ut(e) {
197
197
  return /* @__PURE__ */ q(e) && e.type === qt;
198
198
  }
199
- function Ut(e, n) {
199
+ function Wt(e, n) {
200
200
  const t = {
201
201
  ...n
202
202
  };
@@ -217,7 +217,7 @@ function Ut(e, n) {
217
217
  ...t
218
218
  };
219
219
  }
220
- const Ht = [
220
+ const zt = [
221
221
  "a",
222
222
  "button",
223
223
  "div",
@@ -234,8 +234,8 @@ const Ht = [
234
234
  "span",
235
235
  "svg",
236
236
  "ul"
237
- ], W = Ht.reduce((e, n) => {
238
- const t = /* @__PURE__ */ C((o, a) => {
237
+ ], U = zt.reduce((e, n) => {
238
+ const t = /* @__PURE__ */ S((o, a) => {
239
239
  const { asChild: r, ...i } = o, u = r ? Re : n;
240
240
  return A(() => {
241
241
  window[Symbol.for("radix-ui")] = !0;
@@ -248,13 +248,13 @@ const Ht = [
248
248
  [n]: t
249
249
  };
250
250
  }, {});
251
- function Vt(e, n) {
251
+ function Ht(e, n) {
252
252
  e && nt(
253
253
  () => e.dispatchEvent(n)
254
254
  );
255
255
  }
256
- function Gt(e, n = globalThis == null ? void 0 : globalThis.document) {
257
- const t = K(e);
256
+ function Vt(e, n = globalThis == null ? void 0 : globalThis.document) {
257
+ const t = G(e);
258
258
  A(() => {
259
259
  const o = (a) => {
260
260
  a.key === "Escape" && t(a);
@@ -265,26 +265,26 @@ function Gt(e, n = globalThis == null ? void 0 : globalThis.document) {
265
265
  n
266
266
  ]);
267
267
  }
268
- const Ne = "dismissableLayer.update", Kt = "dismissableLayer.pointerDownOutside", zt = "dismissableLayer.focusOutside";
268
+ const Ne = "dismissableLayer.update", Gt = "dismissableLayer.pointerDownOutside", Kt = "dismissableLayer.focusOutside";
269
269
  let Fe;
270
- const Xt = /* @__PURE__ */ xe({
270
+ const Xt = /* @__PURE__ */ Ce({
271
271
  layers: /* @__PURE__ */ new Set(),
272
272
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
273
273
  branches: /* @__PURE__ */ new Set()
274
- }), Yt = /* @__PURE__ */ C((e, n) => {
274
+ }), Yt = /* @__PURE__ */ S((e, n) => {
275
275
  var t;
276
- const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: r, onFocusOutside: i, onInteractOutside: u, onDismiss: s, ...d } = e, p = tt(Xt), [l, h] = G(null), f = (t = l == null ? void 0 : l.ownerDocument) !== null && t !== void 0 ? t : globalThis == null ? void 0 : globalThis.document, [, E] = G({}), c = J(
276
+ const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: r, onFocusOutside: i, onInteractOutside: u, onDismiss: s, ...d } = e, p = tt(Xt), [l, h] = V(null), f = (t = l == null ? void 0 : l.ownerDocument) !== null && t !== void 0 ? t : globalThis == null ? void 0 : globalThis.document, [, E] = V({}), c = J(
277
277
  n,
278
278
  (w) => h(w)
279
279
  ), v = Array.from(p.layers), [b] = [
280
280
  ...p.layersWithOutsidePointerEventsDisabled
281
- ].slice(-1), x = v.indexOf(b), y = l ? v.indexOf(l) : -1, $ = p.layersWithOutsidePointerEventsDisabled.size > 0, S = y >= x, U = Zt((w) => {
282
- const I = w.target, oe = [
281
+ ].slice(-1), C = v.indexOf(b), y = l ? v.indexOf(l) : -1, $ = p.layersWithOutsidePointerEventsDisabled.size > 0, x = y >= C, W = Zt((w) => {
282
+ const I = w.target, ie = [
283
283
  ...p.branches
284
284
  ].some(
285
285
  (R) => R.contains(I)
286
286
  );
287
- !S || oe || (r == null || r(w), u == null || u(w), w.defaultPrevented || s == null || s());
287
+ !x || ie || (r == null || r(w), u == null || u(w), w.defaultPrevented || s == null || s());
288
288
  }, f), T = Qt((w) => {
289
289
  const I = w.target;
290
290
  [
@@ -293,7 +293,7 @@ const Xt = /* @__PURE__ */ xe({
293
293
  (R) => R.contains(I)
294
294
  ) || (i == null || i(w), u == null || u(w), w.defaultPrevented || s == null || s());
295
295
  }, f);
296
- return Gt((w) => {
296
+ return Vt((w) => {
297
297
  y === p.layers.size - 1 && (a == null || a(w), !w.defaultPrevented && s && (w.preventDefault(), s()));
298
298
  }, f), A(() => {
299
299
  if (l)
@@ -313,25 +313,25 @@ const Xt = /* @__PURE__ */ xe({
313
313
  ]), A(() => {
314
314
  const w = () => E({});
315
315
  return document.addEventListener(Ne, w), () => document.removeEventListener(Ne, w);
316
- }, []), /* @__PURE__ */ g(W.div, P({}, d, {
316
+ }, []), /* @__PURE__ */ g(U.div, P({}, d, {
317
317
  ref: c,
318
318
  style: {
319
- pointerEvents: $ ? S ? "auto" : "none" : void 0,
319
+ pointerEvents: $ ? x ? "auto" : "none" : void 0,
320
320
  ...e.style
321
321
  },
322
322
  onFocusCapture: B(e.onFocusCapture, T.onFocusCapture),
323
323
  onBlurCapture: B(e.onBlurCapture, T.onBlurCapture),
324
- onPointerDownCapture: B(e.onPointerDownCapture, U.onPointerDownCapture)
324
+ onPointerDownCapture: B(e.onPointerDownCapture, W.onPointerDownCapture)
325
325
  }));
326
326
  });
327
327
  function Zt(e, n = globalThis == null ? void 0 : globalThis.document) {
328
- const t = K(e), o = O(!1), a = O(() => {
328
+ const t = G(e), o = O(!1), a = O(() => {
329
329
  });
330
330
  return A(() => {
331
331
  const r = (u) => {
332
332
  if (u.target && !o.current) {
333
333
  let d = function() {
334
- ot(Kt, t, s, {
334
+ ot(Gt, t, s, {
335
335
  discrete: !0
336
336
  });
337
337
  };
@@ -359,10 +359,10 @@ function Zt(e, n = globalThis == null ? void 0 : globalThis.document) {
359
359
  };
360
360
  }
361
361
  function Qt(e, n = globalThis == null ? void 0 : globalThis.document) {
362
- const t = K(e), o = O(!1);
362
+ const t = G(e), o = O(!1);
363
363
  return A(() => {
364
364
  const a = (r) => {
365
- r.target && !o.current && ot(zt, t, {
365
+ r.target && !o.current && ot(Kt, t, {
366
366
  originalEvent: r
367
367
  }, {
368
368
  discrete: !1
@@ -389,13 +389,13 @@ function ot(e, n, t, { discrete: o }) {
389
389
  });
390
390
  n && a.addEventListener(e, n, {
391
391
  once: !0
392
- }), o ? Vt(a, r) : a.dispatchEvent(r);
392
+ }), o ? Ht(a, r) : a.dispatchEvent(r);
393
393
  }
394
394
  const ye = "focusScope.autoFocusOnMount", $e = "focusScope.autoFocusOnUnmount", Be = {
395
395
  bubbles: !1,
396
396
  cancelable: !0
397
- }, Jt = /* @__PURE__ */ C((e, n) => {
398
- const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: r, ...i } = e, [u, s] = G(null), d = K(a), p = K(r), l = O(null), h = J(
397
+ }, Jt = /* @__PURE__ */ S((e, n) => {
398
+ const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: r, ...i } = e, [u, s] = V(null), d = G(a), p = G(r), l = O(null), h = J(
399
399
  n,
400
400
  (c) => s(c)
401
401
  ), f = O({
@@ -425,16 +425,16 @@ const ye = "focusScope.autoFocusOnMount", $e = "focusScope.autoFocusOnUnmount",
425
425
  }));
426
426
  }, b = function(y) {
427
427
  if (document.activeElement === document.body)
428
- for (const S of y)
429
- S.removedNodes.length > 0 && F(u);
428
+ for (const x of y)
429
+ x.removedNodes.length > 0 && F(u);
430
430
  };
431
431
  document.addEventListener("focusin", c), document.addEventListener("focusout", v);
432
- const x = new MutationObserver(b);
433
- return u && x.observe(u, {
432
+ const C = new MutationObserver(b);
433
+ return u && C.observe(u, {
434
434
  childList: !0,
435
435
  subtree: !0
436
436
  }), () => {
437
- document.removeEventListener("focusin", c), document.removeEventListener("focusout", v), x.disconnect();
437
+ document.removeEventListener("focusin", c), document.removeEventListener("focusout", v), C.disconnect();
438
438
  };
439
439
  }
440
440
  }, [
@@ -443,7 +443,7 @@ const ye = "focusScope.autoFocusOnMount", $e = "focusScope.autoFocusOnUnmount",
443
443
  f.paused
444
444
  ]), A(() => {
445
445
  if (u) {
446
- We.add(f);
446
+ Ue.add(f);
447
447
  const c = document.activeElement;
448
448
  if (!u.contains(c)) {
449
449
  const b = new CustomEvent(ye, Be);
@@ -456,7 +456,7 @@ const ye = "focusScope.autoFocusOnMount", $e = "focusScope.autoFocusOnUnmount",
456
456
  const b = new CustomEvent($e, Be);
457
457
  u.addEventListener($e, p), u.dispatchEvent(b), b.defaultPrevented || F(c ?? document.body, {
458
458
  select: !0
459
- }), u.removeEventListener($e, p), We.remove(f);
459
+ }), u.removeEventListener($e, p), Ue.remove(f);
460
460
  }, 0);
461
461
  };
462
462
  }
@@ -471,19 +471,19 @@ const ye = "focusScope.autoFocusOnMount", $e = "focusScope.autoFocusOnUnmount",
471
471
  return;
472
472
  const v = c.key === "Tab" && !c.altKey && !c.ctrlKey && !c.metaKey, b = document.activeElement;
473
473
  if (v && b) {
474
- const x = c.currentTarget, [y, $] = tn(x);
474
+ const C = c.currentTarget, [y, $] = tn(C);
475
475
  y && $ ? !c.shiftKey && b === $ ? (c.preventDefault(), t && F(y, {
476
476
  select: !0
477
477
  })) : c.shiftKey && b === y && (c.preventDefault(), t && F($, {
478
478
  select: !0
479
- })) : b === x && c.preventDefault();
479
+ })) : b === C && c.preventDefault();
480
480
  }
481
481
  }, [
482
482
  t,
483
483
  o,
484
484
  f.paused
485
485
  ]);
486
- return /* @__PURE__ */ g(W.div, P({
486
+ return /* @__PURE__ */ g(U.div, P({
487
487
  tabIndex: -1
488
488
  }, i, {
489
489
  ref: h,
@@ -546,21 +546,21 @@ function F(e, { select: n = !1 } = {}) {
546
546
  }), e !== t && rn(e) && n && e.select();
547
547
  }
548
548
  }
549
- const We = on();
549
+ const Ue = on();
550
550
  function on() {
551
551
  let e = [];
552
552
  return {
553
553
  add(n) {
554
554
  const t = e[0];
555
- n !== t && (t == null || t.pause()), e = Ue(e, n), e.unshift(n);
555
+ n !== t && (t == null || t.pause()), e = We(e, n), e.unshift(n);
556
556
  },
557
557
  remove(n) {
558
558
  var t;
559
- e = Ue(e, n), (t = e[0]) === null || t === void 0 || t.resume();
559
+ e = We(e, n), (t = e[0]) === null || t === void 0 || t.resume();
560
560
  }
561
561
  };
562
562
  }
563
- function Ue(e, n) {
563
+ function We(e, n) {
564
564
  const t = [
565
565
  ...e
566
566
  ], o = t.indexOf(n);
@@ -571,10 +571,10 @@ function an(e) {
571
571
  (n) => n.tagName !== "A"
572
572
  );
573
573
  }
574
- const un = /* @__PURE__ */ C((e, n) => {
574
+ const un = /* @__PURE__ */ S((e, n) => {
575
575
  var t;
576
576
  const { container: o = globalThis == null || (t = globalThis.document) === null || t === void 0 ? void 0 : t.body, ...a } = e;
577
- return o ? /* @__PURE__ */ It.createPortal(/* @__PURE__ */ g(W.div, P({}, a, {
577
+ return o ? /* @__PURE__ */ It.createPortal(/* @__PURE__ */ g(U.div, P({}, a, {
578
578
  ref: n
579
579
  })), o) : null;
580
580
  });
@@ -588,13 +588,13 @@ const ge = (e) => {
588
588
  const { present: n, children: t } = e, o = sn(n), a = typeof t == "function" ? t({
589
589
  present: o.isPresent
590
590
  }) : M.only(t), r = J(o.ref, a.ref);
591
- return typeof t == "function" || o.isPresent ? /* @__PURE__ */ re(a, {
591
+ return typeof t == "function" || o.isPresent ? /* @__PURE__ */ ae(a, {
592
592
  ref: r
593
593
  }) : null;
594
594
  };
595
595
  ge.displayName = "Presence";
596
596
  function sn(e) {
597
- const [n, t] = G(), o = O({}), a = O(e), r = O("none"), i = e ? "mounted" : "unmounted", [u, s] = cn(i, {
597
+ const [n, t] = V(), o = O({}), a = O(e), r = O("none"), i = e ? "mounted" : "unmounted", [u, s] = cn(i, {
598
598
  mounted: {
599
599
  UNMOUNT: "unmounted",
600
600
  ANIMATION_OUT: "unmountSuspended"
@@ -608,14 +608,14 @@ function sn(e) {
608
608
  }
609
609
  });
610
610
  return A(() => {
611
- const d = ae(o.current);
611
+ const d = ue(o.current);
612
612
  r.current = u === "mounted" ? d : "none";
613
613
  }, [
614
614
  u
615
615
  ]), Oe(() => {
616
616
  const d = o.current, p = a.current;
617
617
  if (p !== e) {
618
- const h = r.current, f = ae(d);
618
+ const h = r.current, f = ue(d);
619
619
  e ? s("MOUNT") : f === "none" || (d == null ? void 0 : d.display) === "none" ? s("UNMOUNT") : s(p && h !== f ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
620
620
  }
621
621
  }, [
@@ -624,12 +624,12 @@ function sn(e) {
624
624
  ]), Oe(() => {
625
625
  if (n) {
626
626
  const d = (l) => {
627
- const f = ae(o.current).includes(l.animationName);
627
+ const f = ue(o.current).includes(l.animationName);
628
628
  l.target === n && f && nt(
629
629
  () => s("ANIMATION_END")
630
630
  );
631
631
  }, p = (l) => {
632
- l.target === n && (r.current = ae(o.current));
632
+ l.target === n && (r.current = ue(o.current));
633
633
  };
634
634
  return n.addEventListener("animationstart", p), n.addEventListener("animationcancel", d), n.addEventListener("animationend", d), () => {
635
635
  n.removeEventListener("animationstart", p), n.removeEventListener("animationcancel", d), n.removeEventListener("animationend", d);
@@ -649,7 +649,7 @@ function sn(e) {
649
649
  }, [])
650
650
  };
651
651
  }
652
- function ae(e) {
652
+ function ue(e) {
653
653
  return (e == null ? void 0 : e.animationName) || "none";
654
654
  }
655
655
  let Ee = 0;
@@ -657,14 +657,14 @@ function ln() {
657
657
  A(() => {
658
658
  var e, n;
659
659
  const t = document.querySelectorAll("[data-radix-focus-guard]");
660
- return document.body.insertAdjacentElement("afterbegin", (e = t[0]) !== null && e !== void 0 ? e : He()), document.body.insertAdjacentElement("beforeend", (n = t[1]) !== null && n !== void 0 ? n : He()), Ee++, () => {
660
+ return document.body.insertAdjacentElement("afterbegin", (e = t[0]) !== null && e !== void 0 ? e : ze()), document.body.insertAdjacentElement("beforeend", (n = t[1]) !== null && n !== void 0 ? n : ze()), Ee++, () => {
661
661
  Ee === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(
662
662
  (o) => o.remove()
663
663
  ), Ee--;
664
664
  };
665
665
  }, []);
666
666
  }
667
- function He() {
667
+ function ze() {
668
668
  const e = document.createElement("span");
669
669
  return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
670
670
  }
@@ -698,7 +698,7 @@ function vn(e, n) {
698
698
  return typeof e == "function" ? e(n) : e && (e.current = n), e;
699
699
  }
700
700
  function hn(e, n) {
701
- var t = G(function() {
701
+ var t = V(function() {
702
702
  return {
703
703
  // value
704
704
  value: e,
@@ -807,12 +807,12 @@ var ct = bn(), we = function() {
807
807
  onScrollCapture: we,
808
808
  onWheelCapture: we,
809
809
  onTouchMoveCapture: we
810
- }), a = o[0], r = o[1], i = e.forwardProps, u = e.children, s = e.className, d = e.removeScrollBar, p = e.enabled, l = e.shards, h = e.sideCar, f = e.noIsolation, E = e.inert, c = e.allowPinchZoom, v = e.as, b = v === void 0 ? "div" : v, x = it(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), y = h, $ = mn([t, n]), S = k(k({}, x), a);
810
+ }), a = o[0], r = o[1], i = e.forwardProps, u = e.children, s = e.className, d = e.removeScrollBar, p = e.enabled, l = e.shards, h = e.sideCar, f = e.noIsolation, E = e.inert, c = e.allowPinchZoom, v = e.as, b = v === void 0 ? "div" : v, C = it(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), y = h, $ = mn([t, n]), x = k(k({}, C), a);
811
811
  return m.createElement(
812
812
  m.Fragment,
813
813
  null,
814
814
  p && m.createElement(y, { sideCar: ct, removeScrollBar: d, shards: l, noIsolation: f, inert: E, setCallbacks: r, allowPinchZoom: !!c, lockRef: t }),
815
- i ? m.cloneElement(m.Children.only(u), k(k({}, S), { ref: $ })) : m.createElement(b, k({}, S, { className: s, ref: $ }), u)
815
+ i ? m.cloneElement(m.Children.only(u), k(k({}, x), { ref: $ })) : m.createElement(b, k({}, x, { className: s, ref: $ }), u)
816
816
  );
817
817
  });
818
818
  _e.defaultProps = {
@@ -839,22 +839,22 @@ function En() {
839
839
  function wn(e, n) {
840
840
  e.styleSheet ? e.styleSheet.cssText = n : e.appendChild(document.createTextNode(n));
841
841
  }
842
- function Sn(e) {
842
+ function xn(e) {
843
843
  var n = document.head || document.getElementsByTagName("head")[0];
844
844
  n.appendChild(e);
845
845
  }
846
- var Cn = function() {
846
+ var Sn = function() {
847
847
  var e = 0, n = null;
848
848
  return {
849
849
  add: function(t) {
850
- e == 0 && (n = En()) && (wn(n, t), Sn(n)), e++;
850
+ e == 0 && (n = En()) && (wn(n, t), xn(n)), e++;
851
851
  },
852
852
  remove: function() {
853
853
  e--, !e && n && (n.parentNode && n.parentNode.removeChild(n), n = null);
854
854
  }
855
855
  };
856
- }, xn = function() {
857
- var e = Cn();
856
+ }, Cn = function() {
857
+ var e = Sn();
858
858
  return function(n, t) {
859
859
  m.useEffect(function() {
860
860
  return e.add(n), function() {
@@ -863,7 +863,7 @@ var Cn = function() {
863
863
  }, [n && t]);
864
864
  };
865
865
  }, st = function() {
866
- var e = xn(), n = function(t) {
866
+ var e = Cn(), n = function(t) {
867
867
  var o = t.styles, a = t.dynamic;
868
868
  return e(o, a), null;
869
869
  };
@@ -873,11 +873,11 @@ var Cn = function() {
873
873
  top: 0,
874
874
  right: 0,
875
875
  gap: 0
876
- }, Se = function(e) {
876
+ }, xe = function(e) {
877
877
  return parseInt(e || "", 10) || 0;
878
878
  }, Pn = function(e) {
879
879
  var n = window.getComputedStyle(document.body), t = n[e === "padding" ? "paddingLeft" : "marginLeft"], o = n[e === "padding" ? "paddingTop" : "marginTop"], a = n[e === "padding" ? "paddingRight" : "marginRight"];
880
- return [Se(t), Se(o), Se(a)];
880
+ return [xe(t), xe(o), xe(a)];
881
881
  }, Nn = function(e) {
882
882
  if (e === void 0 && (e = "margin"), typeof window > "u")
883
883
  return On;
@@ -940,16 +940,16 @@ var Cn = function() {
940
940
  }, Ae = !1;
941
941
  if (typeof window < "u")
942
942
  try {
943
- var ie = Object.defineProperty({}, "passive", {
943
+ var ce = Object.defineProperty({}, "passive", {
944
944
  get: function() {
945
945
  return Ae = !0, !0;
946
946
  }
947
947
  });
948
- window.addEventListener("test", ie, ie), window.removeEventListener("test", ie, ie);
948
+ window.addEventListener("test", ce, ce), window.removeEventListener("test", ce, ce);
949
949
  } catch {
950
950
  Ae = !1;
951
951
  }
952
- var z = Ae ? { passive: !1 } : !1, In = function(e) {
952
+ var K = Ae ? { passive: !1 } : !1, In = function(e) {
953
953
  return e.tagName === "TEXTAREA";
954
954
  }, lt = function(e, n) {
955
955
  var t = window.getComputedStyle(e);
@@ -962,7 +962,7 @@ var z = Ae ? { passive: !1 } : !1, In = function(e) {
962
962
  return lt(e, "overflowY");
963
963
  }, Mn = function(e) {
964
964
  return lt(e, "overflowX");
965
- }, Ve = function(e, n) {
965
+ }, He = function(e, n) {
966
966
  var t = n;
967
967
  do {
968
968
  typeof ShadowRoot < "u" && t instanceof ShadowRoot && (t = t.host);
@@ -1006,11 +1006,11 @@ var z = Ae ? { passive: !1 } : !1, In = function(e) {
1006
1006
  s && (n.contains(u) || n === u)
1007
1007
  );
1008
1008
  return (p && (l === 0 || !a) || !p && (h === 0 || !a)) && (d = !0), d;
1009
- }, ue = function(e) {
1009
+ }, se = function(e) {
1010
1010
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
1011
- }, Ge = function(e) {
1011
+ }, Ve = function(e) {
1012
1012
  return [e.deltaX, e.deltaY];
1013
- }, Ke = function(e) {
1013
+ }, Ge = function(e) {
1014
1014
  return e && "current" in e ? e.current : e;
1015
1015
  }, Bn = function(e, n) {
1016
1016
  return e[0] === n[0] && e[1] === n[1];
@@ -1019,9 +1019,9 @@ var z = Ae ? { passive: !1 } : !1, In = function(e) {
1019
1019
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
1020
1020
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
1021
1021
  `);
1022
- }, Wn = 0, X = [];
1023
- function Un(e) {
1024
- var n = m.useRef([]), t = m.useRef([0, 0]), o = m.useRef(), a = m.useState(Wn++)[0], r = m.useState(function() {
1022
+ }, Un = 0, X = [];
1023
+ function Wn(e) {
1024
+ var n = m.useRef([]), t = m.useRef([0, 0]), o = m.useRef(), a = m.useState(Un++)[0], r = m.useState(function() {
1025
1025
  return st();
1026
1026
  })[0], i = m.useRef(e);
1027
1027
  m.useEffect(function() {
@@ -1029,7 +1029,7 @@ function Un(e) {
1029
1029
  }, [e]), m.useEffect(function() {
1030
1030
  if (e.inert) {
1031
1031
  document.body.classList.add("block-interactivity-".concat(a));
1032
- var c = dn([e.lockRef.current], (e.shards || []).map(Ke), !0).filter(Boolean);
1032
+ var c = dn([e.lockRef.current], (e.shards || []).map(Ge), !0).filter(Boolean);
1033
1033
  return c.forEach(function(v) {
1034
1034
  return v.classList.add("allow-interactivity-".concat(a));
1035
1035
  }), function() {
@@ -1042,58 +1042,58 @@ function Un(e) {
1042
1042
  var u = m.useCallback(function(c, v) {
1043
1043
  if ("touches" in c && c.touches.length === 2)
1044
1044
  return !i.current.allowPinchZoom;
1045
- var b = ue(c), x = t.current, y = "deltaX" in c ? c.deltaX : x[0] - b[0], $ = "deltaY" in c ? c.deltaY : x[1] - b[1], S, U = c.target, T = Math.abs(y) > Math.abs($) ? "h" : "v";
1046
- if ("touches" in c && T === "h" && U.type === "range")
1045
+ var b = se(c), C = t.current, y = "deltaX" in c ? c.deltaX : C[0] - b[0], $ = "deltaY" in c ? c.deltaY : C[1] - b[1], x, W = c.target, T = Math.abs(y) > Math.abs($) ? "h" : "v";
1046
+ if ("touches" in c && T === "h" && W.type === "range")
1047
1047
  return !1;
1048
- var w = Ve(T, U);
1048
+ var w = He(T, W);
1049
1049
  if (!w)
1050
1050
  return !0;
1051
- if (w ? S = T : (S = T === "v" ? "h" : "v", w = Ve(T, U)), !w)
1051
+ if (w ? x = T : (x = T === "v" ? "h" : "v", w = He(T, W)), !w)
1052
1052
  return !1;
1053
- if (!o.current && "changedTouches" in c && (y || $) && (o.current = S), !S)
1053
+ if (!o.current && "changedTouches" in c && (y || $) && (o.current = x), !x)
1054
1054
  return !0;
1055
- var I = o.current || S;
1055
+ var I = o.current || x;
1056
1056
  return jn(I, v, c, I === "h" ? y : $, !0);
1057
1057
  }, []), s = m.useCallback(function(c) {
1058
1058
  var v = c;
1059
1059
  if (!(!X.length || X[X.length - 1] !== r)) {
1060
- var b = "deltaY" in v ? Ge(v) : ue(v), x = n.current.filter(function(S) {
1061
- return S.name === v.type && S.target === v.target && Bn(S.delta, b);
1060
+ var b = "deltaY" in v ? Ve(v) : se(v), C = n.current.filter(function(x) {
1061
+ return x.name === v.type && x.target === v.target && Bn(x.delta, b);
1062
1062
  })[0];
1063
- if (x && x.should) {
1063
+ if (C && C.should) {
1064
1064
  v.cancelable && v.preventDefault();
1065
1065
  return;
1066
1066
  }
1067
- if (!x) {
1068
- var y = (i.current.shards || []).map(Ke).filter(Boolean).filter(function(S) {
1069
- return S.contains(v.target);
1067
+ if (!C) {
1068
+ var y = (i.current.shards || []).map(Ge).filter(Boolean).filter(function(x) {
1069
+ return x.contains(v.target);
1070
1070
  }), $ = y.length > 0 ? u(v, y[0]) : !i.current.noIsolation;
1071
1071
  $ && v.cancelable && v.preventDefault();
1072
1072
  }
1073
1073
  }
1074
- }, []), d = m.useCallback(function(c, v, b, x) {
1075
- var y = { name: c, delta: v, target: b, should: x };
1074
+ }, []), d = m.useCallback(function(c, v, b, C) {
1075
+ var y = { name: c, delta: v, target: b, should: C };
1076
1076
  n.current.push(y), setTimeout(function() {
1077
1077
  n.current = n.current.filter(function($) {
1078
1078
  return $ !== y;
1079
1079
  });
1080
1080
  }, 1);
1081
1081
  }, []), p = m.useCallback(function(c) {
1082
- t.current = ue(c), o.current = void 0;
1082
+ t.current = se(c), o.current = void 0;
1083
1083
  }, []), l = m.useCallback(function(c) {
1084
- d(c.type, Ge(c), c.target, u(c, e.lockRef.current));
1084
+ d(c.type, Ve(c), c.target, u(c, e.lockRef.current));
1085
1085
  }, []), h = m.useCallback(function(c) {
1086
- d(c.type, ue(c), c.target, u(c, e.lockRef.current));
1086
+ d(c.type, se(c), c.target, u(c, e.lockRef.current));
1087
1087
  }, []);
1088
1088
  m.useEffect(function() {
1089
1089
  return X.push(r), e.setCallbacks({
1090
1090
  onScrollCapture: l,
1091
1091
  onWheelCapture: l,
1092
1092
  onTouchMoveCapture: h
1093
- }), document.addEventListener("wheel", s, z), document.addEventListener("touchmove", s, z), document.addEventListener("touchstart", p, z), function() {
1093
+ }), document.addEventListener("wheel", s, K), document.addEventListener("touchmove", s, K), document.addEventListener("touchstart", p, K), function() {
1094
1094
  X = X.filter(function(c) {
1095
1095
  return c !== r;
1096
- }), document.removeEventListener("wheel", s, z), document.removeEventListener("touchmove", s, z), document.removeEventListener("touchstart", p, z);
1096
+ }), document.removeEventListener("wheel", s, K), document.removeEventListener("touchmove", s, K), document.removeEventListener("touchstart", p, K);
1097
1097
  };
1098
1098
  }, []);
1099
1099
  var f = e.removeScrollBar, E = e.inert;
@@ -1104,19 +1104,19 @@ function Un(e) {
1104
1104
  f ? m.createElement(Dn, { gapMode: "margin" }) : null
1105
1105
  );
1106
1106
  }
1107
- const Hn = yn(ct, Un);
1107
+ const zn = yn(ct, Wn);
1108
1108
  var ft = m.forwardRef(function(e, n) {
1109
- return m.createElement(_e, k({}, e, { ref: n, sideCar: Hn }));
1109
+ return m.createElement(_e, k({}, e, { ref: n, sideCar: zn }));
1110
1110
  });
1111
1111
  ft.classNames = _e.classNames;
1112
- var Vn = function(e) {
1112
+ var Hn = function(e) {
1113
1113
  if (typeof document > "u")
1114
1114
  return null;
1115
1115
  var n = Array.isArray(e) ? e[0] : e;
1116
1116
  return n.ownerDocument.body;
1117
- }, Y = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), se = {}, Ce = 0, vt = function(e) {
1117
+ }, Y = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), de = {}, Se = 0, vt = function(e) {
1118
1118
  return e && (e.host || vt(e.parentNode));
1119
- }, Gn = function(e, n) {
1119
+ }, Vn = function(e, n) {
1120
1120
  return n.map(function(t) {
1121
1121
  if (e.contains(t))
1122
1122
  return t;
@@ -1125,10 +1125,10 @@ var Vn = function(e) {
1125
1125
  }).filter(function(t) {
1126
1126
  return !!t;
1127
1127
  });
1128
- }, Kn = function(e, n, t, o) {
1129
- var a = Gn(n, Array.isArray(e) ? e : [e]);
1130
- se[t] || (se[t] = /* @__PURE__ */ new WeakMap());
1131
- var r = se[t], i = [], u = /* @__PURE__ */ new Set(), s = new Set(a), d = function(l) {
1128
+ }, Gn = function(e, n, t, o) {
1129
+ var a = Vn(n, Array.isArray(e) ? e : [e]);
1130
+ de[t] || (de[t] = /* @__PURE__ */ new WeakMap());
1131
+ var r = de[t], i = [], u = /* @__PURE__ */ new Set(), s = new Set(a), d = function(l) {
1132
1132
  !l || u.has(l) || (u.add(l), d(l.parentNode));
1133
1133
  };
1134
1134
  a.forEach(d);
@@ -1138,24 +1138,24 @@ var Vn = function(e) {
1138
1138
  p(h);
1139
1139
  else {
1140
1140
  var f = h.getAttribute(o), E = f !== null && f !== "false", c = (Y.get(h) || 0) + 1, v = (r.get(h) || 0) + 1;
1141
- Y.set(h, c), r.set(h, v), i.push(h), c === 1 && E && ce.set(h, !0), v === 1 && h.setAttribute(t, "true"), E || h.setAttribute(o, "true");
1141
+ Y.set(h, c), r.set(h, v), i.push(h), c === 1 && E && le.set(h, !0), v === 1 && h.setAttribute(t, "true"), E || h.setAttribute(o, "true");
1142
1142
  }
1143
1143
  });
1144
1144
  };
1145
- return p(n), u.clear(), Ce++, function() {
1145
+ return p(n), u.clear(), Se++, function() {
1146
1146
  i.forEach(function(l) {
1147
1147
  var h = Y.get(l) - 1, f = r.get(l) - 1;
1148
- Y.set(l, h), r.set(l, f), h || (ce.has(l) || l.removeAttribute(o), ce.delete(l)), f || l.removeAttribute(t);
1149
- }), Ce--, Ce || (Y = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), se = {});
1148
+ Y.set(l, h), r.set(l, f), h || (le.has(l) || l.removeAttribute(o), le.delete(l)), f || l.removeAttribute(t);
1149
+ }), Se--, Se || (Y = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), de = {});
1150
1150
  };
1151
- }, zn = function(e, n, t) {
1151
+ }, Kn = function(e, n, t) {
1152
1152
  t === void 0 && (t = "data-aria-hidden");
1153
- var o = Array.from(Array.isArray(e) ? e : [e]), a = Vn(e);
1154
- return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), Kn(o, a, t, "aria-hidden")) : function() {
1153
+ var o = Array.from(Array.isArray(e) ? e : [e]), a = Hn(e);
1154
+ return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), Gn(o, a, t, "aria-hidden")) : function() {
1155
1155
  return null;
1156
1156
  };
1157
1157
  };
1158
- const ht = "Dialog", [mt, yo] = Mt(ht), [Xn, L] = mt(ht), Yn = (e) => {
1158
+ const ht = "Dialog", [mt, bo] = Mt(ht), [Xn, L] = mt(ht), Yn = (e) => {
1159
1159
  const { __scopeDialog: n, children: t, open: o, defaultOpen: a, onOpenChange: r, modal: i = !0 } = e, u = O(null), s = O(null), [d = !1, p] = jt({
1160
1160
  prop: o,
1161
1161
  defaultProp: a,
@@ -1180,9 +1180,9 @@ const ht = "Dialog", [mt, yo] = Mt(ht), [Xn, L] = mt(ht), Yn = (e) => {
1180
1180
  ),
1181
1181
  modal: i
1182
1182
  }, t);
1183
- }, Zn = "DialogTrigger", Qn = /* @__PURE__ */ C((e, n) => {
1183
+ }, Zn = "DialogTrigger", Qn = /* @__PURE__ */ S((e, n) => {
1184
1184
  const { __scopeDialog: t, ...o } = e, a = L(Zn, t), r = J(n, a.triggerRef);
1185
- return /* @__PURE__ */ g(W.button, P({
1185
+ return /* @__PURE__ */ g(U.button, P({
1186
1186
  type: "button",
1187
1187
  "aria-haspopup": "dialog",
1188
1188
  "aria-expanded": a.open,
@@ -1208,14 +1208,14 @@ const ht = "Dialog", [mt, yo] = Mt(ht), [Xn, L] = mt(ht), Yn = (e) => {
1208
1208
  container: a
1209
1209
  }, i))
1210
1210
  ));
1211
- }, Te = "DialogOverlay", tr = /* @__PURE__ */ C((e, n) => {
1211
+ }, Te = "DialogOverlay", tr = /* @__PURE__ */ S((e, n) => {
1212
1212
  const t = _t(Te, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = L(Te, e.__scopeDialog);
1213
1213
  return r.modal ? /* @__PURE__ */ g(ge, {
1214
1214
  present: o || r.open
1215
1215
  }, /* @__PURE__ */ g(nr, P({}, a, {
1216
1216
  ref: n
1217
1217
  }))) : null;
1218
- }), nr = /* @__PURE__ */ C((e, n) => {
1218
+ }), nr = /* @__PURE__ */ S((e, n) => {
1219
1219
  const { __scopeDialog: t, ...o } = e, a = L(Te, t);
1220
1220
  return (
1221
1221
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
@@ -1226,7 +1226,7 @@ const ht = "Dialog", [mt, yo] = Mt(ht), [Xn, L] = mt(ht), Yn = (e) => {
1226
1226
  shards: [
1227
1227
  a.contentRef
1228
1228
  ]
1229
- }, /* @__PURE__ */ g(W.div, P({
1229
+ }, /* @__PURE__ */ g(U.div, P({
1230
1230
  "data-state": Me(a.open)
1231
1231
  }, o, {
1232
1232
  ref: n,
@@ -1236,8 +1236,8 @@ const ht = "Dialog", [mt, yo] = Mt(ht), [Xn, L] = mt(ht), Yn = (e) => {
1236
1236
  }
1237
1237
  })))
1238
1238
  );
1239
- }), ne = "DialogContent", rr = /* @__PURE__ */ C((e, n) => {
1240
- const t = _t(ne, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = L(ne, e.__scopeDialog);
1239
+ }), oe = "DialogContent", rr = /* @__PURE__ */ S((e, n) => {
1240
+ const t = _t(oe, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = L(oe, e.__scopeDialog);
1241
1241
  return /* @__PURE__ */ g(ge, {
1242
1242
  present: o || r.open
1243
1243
  }, r.modal ? /* @__PURE__ */ g(or, P({}, a, {
@@ -1245,12 +1245,12 @@ const ht = "Dialog", [mt, yo] = Mt(ht), [Xn, L] = mt(ht), Yn = (e) => {
1245
1245
  })) : /* @__PURE__ */ g(ar, P({}, a, {
1246
1246
  ref: n
1247
1247
  })));
1248
- }), or = /* @__PURE__ */ C((e, n) => {
1249
- const t = L(ne, e.__scopeDialog), o = O(null), a = J(n, t.contentRef, o);
1248
+ }), or = /* @__PURE__ */ S((e, n) => {
1249
+ const t = L(oe, e.__scopeDialog), o = O(null), a = J(n, t.contentRef, o);
1250
1250
  return A(() => {
1251
1251
  const r = o.current;
1252
1252
  if (r)
1253
- return zn(r);
1253
+ return Kn(r);
1254
1254
  }, []), /* @__PURE__ */ g(bt, P({}, e, {
1255
1255
  ref: a,
1256
1256
  trapFocus: t.open,
@@ -1268,8 +1268,8 @@ const ht = "Dialog", [mt, yo] = Mt(ht), [Xn, L] = mt(ht), Yn = (e) => {
1268
1268
  (r) => r.preventDefault()
1269
1269
  )
1270
1270
  }));
1271
- }), ar = /* @__PURE__ */ C((e, n) => {
1272
- const t = L(ne, e.__scopeDialog), o = O(!1), a = O(!1);
1271
+ }), ar = /* @__PURE__ */ S((e, n) => {
1272
+ const t = L(oe, e.__scopeDialog), o = O(!1), a = O(!1);
1273
1273
  return /* @__PURE__ */ g(bt, P({}, e, {
1274
1274
  ref: n,
1275
1275
  trapFocus: !1,
@@ -1289,8 +1289,8 @@ const ht = "Dialog", [mt, yo] = Mt(ht), [Xn, L] = mt(ht), Yn = (e) => {
1289
1289
  ((u = t.triggerRef.current) === null || u === void 0 ? void 0 : u.contains(s)) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && a.current && r.preventDefault();
1290
1290
  }
1291
1291
  }));
1292
- }), bt = /* @__PURE__ */ C((e, n) => {
1293
- const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...i } = e, u = L(ne, t), s = O(null), d = J(n, s);
1292
+ }), bt = /* @__PURE__ */ S((e, n) => {
1293
+ const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...i } = e, u = L(oe, t), s = O(null), d = J(n, s);
1294
1294
  return ln(), /* @__PURE__ */ g(Ie, null, /* @__PURE__ */ g(Jt, {
1295
1295
  asChild: !0,
1296
1296
  loop: !0,
@@ -1307,23 +1307,23 @@ const ht = "Dialog", [mt, yo] = Mt(ht), [Xn, L] = mt(ht), Yn = (e) => {
1307
1307
  ref: d,
1308
1308
  onDismiss: () => u.onOpenChange(!1)
1309
1309
  }))), !1);
1310
- }), ir = "DialogTitle", ur = /* @__PURE__ */ C((e, n) => {
1310
+ }), ir = "DialogTitle", ur = /* @__PURE__ */ S((e, n) => {
1311
1311
  const { __scopeDialog: t, ...o } = e, a = L(ir, t);
1312
- return /* @__PURE__ */ g(W.h2, P({
1312
+ return /* @__PURE__ */ g(U.h2, P({
1313
1313
  id: a.titleId
1314
1314
  }, o, {
1315
1315
  ref: n
1316
1316
  }));
1317
- }), cr = "DialogDescription", sr = /* @__PURE__ */ C((e, n) => {
1317
+ }), cr = "DialogDescription", sr = /* @__PURE__ */ S((e, n) => {
1318
1318
  const { __scopeDialog: t, ...o } = e, a = L(cr, t);
1319
- return /* @__PURE__ */ g(W.p, P({
1319
+ return /* @__PURE__ */ g(U.p, P({
1320
1320
  id: a.descriptionId
1321
1321
  }, o, {
1322
1322
  ref: n
1323
1323
  }));
1324
- }), lr = "DialogClose", dr = /* @__PURE__ */ C((e, n) => {
1324
+ }), lr = "DialogClose", dr = /* @__PURE__ */ S((e, n) => {
1325
1325
  const { __scopeDialog: t, ...o } = e, a = L(lr, t);
1326
- return /* @__PURE__ */ g(W.button, P({
1326
+ return /* @__PURE__ */ g(U.button, P({
1327
1327
  type: "button"
1328
1328
  }, o, {
1329
1329
  ref: n,
@@ -1336,7 +1336,7 @@ const ht = "Dialog", [mt, yo] = Mt(ht), [Xn, L] = mt(ht), Yn = (e) => {
1336
1336
  function Me(e) {
1337
1337
  return e ? "open" : "closed";
1338
1338
  }
1339
- const pr = Yn, fr = Qn, vr = er, hr = tr, mr = rr, gr = ur, ze = sr, _r = dr, Xe = {
1339
+ const pr = Yn, fr = Qn, vr = er, hr = tr, mr = rr, gr = ur, Ke = sr, _r = dr, Xe = {
1340
1340
  SM: "sm",
1341
1341
  MD: "md",
1342
1342
  LG: "lg"
@@ -1381,48 +1381,43 @@ var yt = { exports: {} };
1381
1381
  })();
1382
1382
  })(yt);
1383
1383
  var yr = yt.exports;
1384
- const Ye = /* @__PURE__ */ br(yr), $r = "_rotate_7s2g1_1", Er = "_dash_7s2g1_1", le = {
1385
- "purpur-spinner": "_purpur-spinner_7s2g1_1",
1384
+ const Ye = /* @__PURE__ */ br(yr), $r = "_rotate_1xozj_1", Er = "_dash_1xozj_1", ee = {
1385
+ "purpur-spinner": "_purpur-spinner_1xozj_1",
1386
1386
  rotate: $r,
1387
- "purpur-spinner--xxs": "_purpur-spinner--xxs_7s2g1_4",
1388
- "purpur-spinner--xs": "_purpur-spinner--xs_7s2g1_8",
1389
- "purpur-spinner--sm": "_purpur-spinner--sm_7s2g1_12",
1390
- "purpur-spinner--md": "_purpur-spinner--md_7s2g1_16",
1391
- "purpur-spinner--lg": "_purpur-spinner--lg_7s2g1_20",
1392
- "purpur-spinner__circle": "_purpur-spinner__circle_7s2g1_24",
1387
+ "purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
1388
+ "purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
1389
+ "purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
1390
+ "purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
1391
+ "purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
1392
+ "purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
1393
1393
  dash: Er,
1394
- "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_7s2g1_33",
1395
- "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_7s2g1_36",
1396
- "purpur-spinner__circle--negative-disabled": "_purpur-spinner__circle--negative-disabled_7s2g1_39"
1397
- }, de = "purpur-spinner", wr = {
1398
- PRIMARY: "primary",
1399
- DISABLED: "disabled",
1400
- NEGATIVE: "negative",
1401
- NEGATIVE_DISABLED: "negative-disabled"
1402
- }, Sr = {
1394
+ "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
1395
+ "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
1396
+ }, te = "purpur-spinner", wr = {
1403
1397
  XXS: "xxs",
1404
1398
  XS: "xs",
1405
1399
  SM: "sm",
1406
1400
  MD: "md",
1407
1401
  LG: "lg"
1408
- }, Cr = ({
1402
+ }, xr = ({
1409
1403
  ["data-testid"]: e,
1410
- size: n = Sr.SM,
1411
- variant: t = wr.PRIMARY,
1412
- ...o
1404
+ disabled: n = !1,
1405
+ negative: t = !1,
1406
+ size: o = wr.SM,
1407
+ ...a
1413
1408
  }) => /* @__PURE__ */ _(
1414
1409
  "div",
1415
1410
  {
1416
- className: Ye([le[de], le[`${de}--${n}`]]),
1411
+ className: Ye([ee[te], ee[`${te}--${o}`]]),
1417
1412
  "data-testid": e,
1418
- ...o,
1413
+ ...a,
1419
1414
  children: /* @__PURE__ */ _("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ _(
1420
1415
  "circle",
1421
1416
  {
1422
- className: Ye(
1423
- le[`${de}__circle`],
1424
- le[`${de}__circle--${t}`]
1425
- ),
1417
+ className: Ye(ee[`${te}__circle`], {
1418
+ [ee[`${te}__circle--disabled`]]: n,
1419
+ [ee[`${te}__circle--negative`]]: t
1420
+ }),
1426
1421
  cx: "25",
1427
1422
  cy: "25",
1428
1423
  r: "20"
@@ -1430,7 +1425,7 @@ const Ye = /* @__PURE__ */ br(yr), $r = "_rotate_7s2g1_1", Er = "_dash_7s2g1_1",
1430
1425
  ) })
1431
1426
  }
1432
1427
  );
1433
- function xr(e) {
1428
+ function Sr(e) {
1434
1429
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1435
1430
  }
1436
1431
  var $t = { exports: {} };
@@ -1469,8 +1464,8 @@ var $t = { exports: {} };
1469
1464
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1470
1465
  })();
1471
1466
  })($t);
1472
- var Or = $t.exports;
1473
- const Pr = /* @__PURE__ */ xr(Or), H = {
1467
+ var Cr = $t.exports;
1468
+ const Or = /* @__PURE__ */ Sr(Cr), z = {
1474
1469
  "purpur-button": "_purpur-button_u2yv5_1",
1475
1470
  "purpur-button--sm": "_purpur-button--sm_u2yv5_33",
1476
1471
  "purpur-button--icon-only": "_purpur-button--icon-only_u2yv5_36",
@@ -1491,7 +1486,7 @@ const Pr = /* @__PURE__ */ xr(Or), H = {
1491
1486
  "purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_u2yv5_160",
1492
1487
  "purpur-button--text-negative": "_purpur-button--text-negative_u2yv5_175",
1493
1488
  "purpur-button--text": "_purpur-button--text_u2yv5_175"
1494
- }, V = "purpur-button", Nr = ({
1489
+ }, H = "purpur-button", Pr = ({
1495
1490
  children: e,
1496
1491
  className: n,
1497
1492
  ["data-testid"]: t,
@@ -1499,50 +1494,51 @@ const Pr = /* @__PURE__ */ xr(Or), H = {
1499
1494
  fullWidth: a = !1,
1500
1495
  iconOnly: r,
1501
1496
  loading: i = !1,
1502
- onClick: u,
1503
- size: s = Xe.MD,
1504
- variant: d,
1505
- type: p = "button",
1506
- ...l
1507
- }, h) => {
1508
- if (r && d === "destructive")
1497
+ negative: u = !1,
1498
+ onClick: s,
1499
+ size: d = Xe.MD,
1500
+ variant: p,
1501
+ type: l = "button",
1502
+ ...h
1503
+ }, f) => {
1504
+ if (r && p === "destructive")
1509
1505
  return null;
1510
- const f = Pr(
1506
+ const E = Or(
1511
1507
  [
1512
- H[V],
1513
- H[`${V}--${d}`],
1514
- H[`${V}--${s}`]
1508
+ z[H],
1509
+ z[`${H}--${u ? `${p}-negative` : p}`],
1510
+ z[`${H}--${d}`]
1515
1511
  ],
1516
1512
  {
1517
- [H[`${V}--icon-only`]]: r,
1518
- [H[`${V}--negative`]]: d.endsWith("negative"),
1519
- [H[`${V}--full-width`]]: a,
1520
- [H[`${V}--disabled`]]: o || i
1513
+ [z[`${H}--icon-only`]]: r,
1514
+ [z[`${H}--negative`]]: u,
1515
+ [z[`${H}--full-width`]]: a,
1516
+ [z[`${H}--disabled`]]: o || i
1521
1517
  },
1522
1518
  n
1523
- ), E = (v) => {
1524
- o || i ? v.preventDefault() : u && u(v);
1525
- }, c = () => d.endsWith("negative") ? "negative-disabled" : "disabled";
1519
+ ), c = (v) => {
1520
+ o || i ? v.preventDefault() : s && s(v);
1521
+ };
1526
1522
  return /* @__PURE__ */ j(
1527
1523
  "button",
1528
1524
  {
1529
- className: f,
1525
+ className: E,
1530
1526
  "data-testid": t,
1531
- type: p,
1532
- ref: h,
1533
- "aria-disabled": l["aria-disabled"] || o || i,
1534
- onClick: E,
1535
- ...l,
1527
+ type: l,
1528
+ ref: f,
1529
+ "aria-disabled": h["aria-disabled"] || o || i,
1530
+ onClick: c,
1531
+ ...h,
1536
1532
  children: [
1537
- i && /* @__PURE__ */ _(Cr, { size: s === Xe.LG ? "xs" : "xxs", variant: c() }),
1533
+ i && /* @__PURE__ */ _(xr, { size: d === Xe.LG ? "xs" : "xxs", negative: u, disabled: o }),
1538
1534
  " ",
1539
1535
  e
1540
1536
  ]
1541
1537
  }
1542
1538
  );
1543
- }, Le = C(Nr);
1539
+ }, Le = S(Pr);
1544
1540
  Le.displayName = "Button";
1545
- function Ar(e) {
1541
+ function Nr(e) {
1546
1542
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1547
1543
  }
1548
1544
  var Et = { exports: {} };
@@ -1581,8 +1577,8 @@ var Et = { exports: {} };
1581
1577
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1582
1578
  })();
1583
1579
  })(Et);
1584
- var Tr = Et.exports;
1585
- const Dr = /* @__PURE__ */ Ar(Tr), pe = {
1580
+ var Ar = Et.exports;
1581
+ const Tr = /* @__PURE__ */ Nr(Ar), pe = {
1586
1582
  "purpur-heading": "_purpur-heading_k9fhq_1",
1587
1583
  "purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
1588
1584
  "purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
@@ -1598,7 +1594,7 @@ const Dr = /* @__PURE__ */ Ar(Tr), pe = {
1598
1594
  "purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
1599
1595
  "purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
1600
1596
  "purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
1601
- }, Ir = {
1597
+ }, Dr = {
1602
1598
  TITLE100: "title-100",
1603
1599
  TITLE200: "title-200",
1604
1600
  TITLE300: "title-300",
@@ -1607,17 +1603,17 @@ const Dr = /* @__PURE__ */ Ar(Tr), pe = {
1607
1603
  TITLE600: "title-600",
1608
1604
  TITLE700: "title-700",
1609
1605
  SUBSECTION100: "subsection-100"
1610
- }, fe = "purpur-heading", Rr = ({
1606
+ }, fe = "purpur-heading", Ir = ({
1611
1607
  ["data-testid"]: e,
1612
1608
  children: n,
1613
1609
  className: t = "",
1614
1610
  enableHyphenation: o = !1,
1615
1611
  negative: a = !1,
1616
1612
  tag: r,
1617
- variant: i = Ir.TITLE100,
1613
+ variant: i = Dr.TITLE100,
1618
1614
  ...u
1619
1615
  }) => {
1620
- const s = r, d = Dr([
1616
+ const s = r, d = Tr([
1621
1617
  t,
1622
1618
  pe[fe],
1623
1619
  pe[`${fe}--${i}`],
@@ -1628,7 +1624,7 @@ const Dr = /* @__PURE__ */ Ar(Tr), pe = {
1628
1624
  ]);
1629
1625
  return /* @__PURE__ */ _(s, { ...u, className: d, "data-testid": e, children: n });
1630
1626
  };
1631
- function Mr(e) {
1627
+ function Rr(e) {
1632
1628
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1633
1629
  }
1634
1630
  var wt = { exports: {} };
@@ -1667,8 +1663,8 @@ var wt = { exports: {} };
1667
1663
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1668
1664
  })();
1669
1665
  })(wt);
1670
- var Lr = wt.exports;
1671
- const kr = /* @__PURE__ */ Mr(Lr), Fr = {
1666
+ var Mr = wt.exports;
1667
+ const Lr = /* @__PURE__ */ Rr(Mr), kr = {
1672
1668
  "purpur-icon": "_purpur-icon_8u1lq_1",
1673
1669
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
1674
1670
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -1676,39 +1672,39 @@ const kr = /* @__PURE__ */ Mr(Lr), Fr = {
1676
1672
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
1677
1673
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
1678
1674
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
1679
- }, jr = {
1675
+ }, Fr = {
1680
1676
  name: "close",
1681
1677
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',
1682
1678
  keywords: ["close"],
1683
1679
  category: "utility"
1684
- }, St = (e) => /* @__PURE__ */ _(
1685
- Vr,
1680
+ }, xt = (e) => /* @__PURE__ */ _(
1681
+ zr,
1686
1682
  {
1687
1683
  ...e,
1688
- svg: jr
1684
+ svg: Fr
1689
1685
  }
1690
1686
  );
1691
- St.displayName = "IconClose";
1692
- const Br = kr.bind(Fr), Ze = "purpur-icon", qr = "md", Wr = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Ur = ({ content: e = "", title: n } = {}) => {
1687
+ xt.displayName = "IconClose";
1688
+ const jr = Lr.bind(kr), Ze = "purpur-icon", Br = "md", qr = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Ur = ({ content: e = "", title: n } = {}) => {
1693
1689
  const t = [
1694
1690
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
1695
1691
  { name: "fill", value: "currentColor" },
1696
1692
  { name: "viewBox", value: "0 0 24 24" },
1697
1693
  n ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
1698
1694
  ], o = n ? `<title>${n}</title>` : "";
1699
- return `<svg ${Wr(t)}>${o}${e}</svg>`;
1700
- }, Hr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Vr = ({
1695
+ return `<svg ${qr(t)}>${o}${e}</svg>`;
1696
+ }, Wr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), zr = ({
1701
1697
  ["data-testid"]: e,
1702
1698
  svg: n,
1703
1699
  allyTitle: t,
1704
1700
  className: o = "",
1705
- size: a = qr,
1701
+ size: a = Br,
1706
1702
  ...r
1707
1703
  }) => {
1708
1704
  const i = Ur({
1709
- content: Hr(n.svg),
1705
+ content: Wr(n.svg),
1710
1706
  title: t
1711
- }), u = Br(o, Ze, `${Ze}--${a}`);
1707
+ }), u = jr(o, Ze, `${Ze}--${a}`);
1712
1708
  return /* @__PURE__ */ _(
1713
1709
  "span",
1714
1710
  {
@@ -1720,10 +1716,10 @@ const Br = kr.bind(Fr), Ze = "purpur-icon", qr = "md", Wr = (e) => e.filter((n)
1720
1716
  }
1721
1717
  );
1722
1718
  };
1723
- function Gr(e) {
1719
+ function Hr(e) {
1724
1720
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1725
1721
  }
1726
- var Ct = { exports: {} };
1722
+ var St = { exports: {} };
1727
1723
  /*!
1728
1724
  Copyright (c) 2018 Jed Watson.
1729
1725
  Licensed under the MIT License (MIT), see
@@ -1758,9 +1754,9 @@ var Ct = { exports: {} };
1758
1754
  }
1759
1755
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1760
1756
  })();
1761
- })(Ct);
1762
- var Kr = Ct.exports;
1763
- const zr = /* @__PURE__ */ Gr(Kr), ee = {
1757
+ })(St);
1758
+ var Vr = St.exports;
1759
+ const Gr = /* @__PURE__ */ Hr(Vr), ne = {
1764
1760
  "purpur-paragraph": "_purpur-paragraph_1rh57_1",
1765
1761
  "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
1766
1762
  "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
@@ -1775,7 +1771,7 @@ const zr = /* @__PURE__ */ Gr(Kr), ee = {
1775
1771
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
1776
1772
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
1777
1773
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
1778
- }, Xr = {
1774
+ }, Kr = {
1779
1775
  PARAGRAPH100: "paragraph-100",
1780
1776
  PARAGRAPH100MEDIUM: "paragraph-100-medium",
1781
1777
  PARAGRAPH100BOLD: "paragraph-100-bold",
@@ -1786,28 +1782,28 @@ const zr = /* @__PURE__ */ Gr(Kr), ee = {
1786
1782
  ADDITIONAL100MEDIUM: "additional-100-medium",
1787
1783
  OVERLINE100: "overline-100",
1788
1784
  OVERLINE200: "overline-200"
1789
- }, te = "purpur-paragraph", Yr = ({
1785
+ }, re = "purpur-paragraph", Xr = ({
1790
1786
  ["data-testid"]: e,
1791
1787
  children: n,
1792
1788
  className: t = "",
1793
1789
  disabled: o,
1794
1790
  enableHyphenation: a = !1,
1795
1791
  negative: r = !1,
1796
- variant: i = Xr.PARAGRAPH100,
1792
+ variant: i = Kr.PARAGRAPH100,
1797
1793
  ...u
1798
1794
  }) => {
1799
- const s = zr([
1795
+ const s = Gr([
1800
1796
  t,
1801
- ee[te],
1802
- ee[`${te}--${i}`],
1797
+ ne[re],
1798
+ ne[`${re}--${i}`],
1803
1799
  {
1804
- [ee[`${te}--hyphens`]]: a,
1805
- [ee[`${te}--disabled`]]: o,
1806
- [ee[`${te}--negative`]]: r
1800
+ [ne[`${re}--hyphens`]]: a,
1801
+ [ne[`${re}--disabled`]]: o,
1802
+ [ne[`${re}--negative`]]: r
1807
1803
  }
1808
1804
  ]);
1809
1805
  return /* @__PURE__ */ _("p", { ...u, className: s, "data-testid": e, children: n });
1810
- }, Zr = "600px";
1806
+ }, Yr = "600px";
1811
1807
  function Z() {
1812
1808
  return Z = Object.assign ? Object.assign.bind() : function(e) {
1813
1809
  for (var n = 1; n < arguments.length; n++) {
@@ -1818,40 +1814,40 @@ function Z() {
1818
1814
  return e;
1819
1815
  }, Z.apply(this, arguments);
1820
1816
  }
1821
- function Qr(e, n) {
1817
+ function Zr(e, n) {
1822
1818
  typeof e == "function" ? e(n) : e != null && (e.current = n);
1823
1819
  }
1824
- function Jr(...e) {
1820
+ function Qr(...e) {
1825
1821
  return (n) => e.forEach(
1826
- (t) => Qr(t, n)
1822
+ (t) => Zr(t, n)
1827
1823
  );
1828
1824
  }
1829
- const xt = /* @__PURE__ */ C((e, n) => {
1830
- const { children: t, ...o } = e, a = M.toArray(t), r = a.find(to);
1825
+ const Ct = /* @__PURE__ */ S((e, n) => {
1826
+ const { children: t, ...o } = e, a = M.toArray(t), r = a.find(eo);
1831
1827
  if (r) {
1832
1828
  const i = r.props.children, u = a.map((s) => s === r ? M.count(i) > 1 ? M.only(null) : /* @__PURE__ */ q(i) ? i.props.children : null : s);
1833
1829
  return /* @__PURE__ */ g(De, Z({}, o, {
1834
1830
  ref: n
1835
- }), /* @__PURE__ */ q(i) ? /* @__PURE__ */ re(i, void 0, u) : null);
1831
+ }), /* @__PURE__ */ q(i) ? /* @__PURE__ */ ae(i, void 0, u) : null);
1836
1832
  }
1837
1833
  return /* @__PURE__ */ g(De, Z({}, o, {
1838
1834
  ref: n
1839
1835
  }), t);
1840
1836
  });
1841
- xt.displayName = "Slot";
1842
- const De = /* @__PURE__ */ C((e, n) => {
1837
+ Ct.displayName = "Slot";
1838
+ const De = /* @__PURE__ */ S((e, n) => {
1843
1839
  const { children: t, ...o } = e;
1844
- return /* @__PURE__ */ q(t) ? /* @__PURE__ */ re(t, {
1845
- ...no(o, t.props),
1846
- ref: n ? Jr(n, t.ref) : t.ref
1840
+ return /* @__PURE__ */ q(t) ? /* @__PURE__ */ ae(t, {
1841
+ ...to(o, t.props),
1842
+ ref: n ? Qr(n, t.ref) : t.ref
1847
1843
  }) : M.count(t) > 1 ? M.only(null) : null;
1848
1844
  });
1849
1845
  De.displayName = "SlotClone";
1850
- const eo = ({ children: e }) => /* @__PURE__ */ g(Ie, null, e);
1851
- function to(e) {
1852
- return /* @__PURE__ */ q(e) && e.type === eo;
1846
+ const Jr = ({ children: e }) => /* @__PURE__ */ g(Ie, null, e);
1847
+ function eo(e) {
1848
+ return /* @__PURE__ */ q(e) && e.type === Jr;
1853
1849
  }
1854
- function no(e, n) {
1850
+ function to(e, n) {
1855
1851
  const t = {
1856
1852
  ...n
1857
1853
  };
@@ -1872,7 +1868,7 @@ function no(e, n) {
1872
1868
  ...t
1873
1869
  };
1874
1870
  }
1875
- const ro = [
1871
+ const no = [
1876
1872
  "a",
1877
1873
  "button",
1878
1874
  "div",
@@ -1889,9 +1885,9 @@ const ro = [
1889
1885
  "span",
1890
1886
  "svg",
1891
1887
  "ul"
1892
- ], oo = ro.reduce((e, n) => {
1893
- const t = /* @__PURE__ */ C((o, a) => {
1894
- const { asChild: r, ...i } = o, u = r ? xt : n;
1888
+ ], ro = no.reduce((e, n) => {
1889
+ const t = /* @__PURE__ */ S((o, a) => {
1890
+ const { asChild: r, ...i } = o, u = r ? Ct : n;
1895
1891
  return A(() => {
1896
1892
  window[Symbol.for("radix-ui")] = !0;
1897
1893
  }, []), /* @__PURE__ */ g(u, Z({}, i, {
@@ -1902,7 +1898,7 @@ const ro = [
1902
1898
  ...e,
1903
1899
  [n]: t
1904
1900
  };
1905
- }, {}), ao = /* @__PURE__ */ C((e, n) => /* @__PURE__ */ g(oo.span, Z({}, e, {
1901
+ }, {}), oo = /* @__PURE__ */ S((e, n) => /* @__PURE__ */ g(ro.span, Z({}, e, {
1906
1902
  ref: n,
1907
1903
  style: {
1908
1904
  // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
@@ -1918,13 +1914,13 @@ const ro = [
1918
1914
  wordWrap: "normal",
1919
1915
  ...e.style
1920
1916
  }
1921
- }))), io = ao, uo = ({
1917
+ }))), ao = oo, io = ({
1922
1918
  asChild: e,
1923
1919
  children: n,
1924
1920
  className: t = "",
1925
1921
  ["data-testid"]: o
1926
- }) => /* @__PURE__ */ _(io, { asChild: e, "data-testid": o, className: t, children: n });
1927
- function co(e) {
1922
+ }) => /* @__PURE__ */ _(ao, { asChild: e, "data-testid": o, className: t, children: n });
1923
+ function uo(e) {
1928
1924
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1929
1925
  }
1930
1926
  var Ot = { exports: {} };
@@ -1963,10 +1959,10 @@ var Ot = { exports: {} };
1963
1959
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1964
1960
  })();
1965
1961
  })(Ot);
1966
- var so = Ot.exports;
1967
- const lo = /* @__PURE__ */ co(so), po = "_fadeIn_1qmv6_1", fo = {
1962
+ var co = Ot.exports;
1963
+ const so = /* @__PURE__ */ uo(co), lo = "_fadeIn_1qmv6_1", po = {
1968
1964
  "purpur-modal-content": "_purpur-modal-content_1qmv6_1",
1969
- fadeIn: po,
1965
+ fadeIn: lo,
1970
1966
  "purpur-modal-content__overlay": "_purpur-modal-content__overlay_1qmv6_30",
1971
1967
  "purpur-modal-content__close-button": "_purpur-modal-content__close-button_1qmv6_37",
1972
1968
  "purpur-modal-content__wrapper": "_purpur-modal-content__wrapper_1qmv6_48",
@@ -1984,7 +1980,7 @@ const lo = /* @__PURE__ */ co(so), po = "_fadeIn_1qmv6_1", fo = {
1984
1980
  "purpur-modal-content__actions": "_purpur-modal-content__actions_1qmv6_132",
1985
1981
  "purpur-modal-content__actions-separator": "_purpur-modal-content__actions-separator_1qmv6_186",
1986
1982
  "purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-footer_1qmv6_196"
1987
- }, Qe = (e) => e.showCloseButton === !0, D = lo.bind(fo), N = "purpur-modal-content", vo = C(
1983
+ }, Qe = (e) => e.showCloseButton === !0, D = so.bind(po), N = "purpur-modal-content", fo = S(
1988
1984
  ({
1989
1985
  ["data-testid"]: e,
1990
1986
  actions: n,
@@ -1999,7 +1995,7 @@ const lo = /* @__PURE__ */ co(so), po = "_fadeIn_1qmv6_1", fo = {
1999
1995
  title: p,
2000
1996
  ...l
2001
1997
  }, h) => {
2002
- const { closeButtonAllyLabel: f, showCloseButton: E, ...c } = l, [v, b] = G(!1), x = O(null), y = O(null), $ = O(null), S = O(null), U = D([
1998
+ const { closeButtonAllyLabel: f, showCloseButton: E, ...c } = l, [v, b] = V(!1), C = O(null), y = O(null), $ = O(null), x = O(null), W = D([
2003
1999
  N,
2004
2000
  { [`${N}--with-image`]: !!u },
2005
2001
  { [`${N}--overflow`]: v },
@@ -2008,14 +2004,14 @@ const lo = /* @__PURE__ */ co(so), po = "_fadeIn_1qmv6_1", fo = {
2008
2004
  ]), T = (R) => e ? `${e} ${R}` : void 0, w = (R) => {
2009
2005
  r && R.preventDefault();
2010
2006
  }, I = Q(() => {
2011
- if (!x.current || !y.current || !$.current || !S.current)
2007
+ if (!C.current || !y.current || !$.current || !x.current)
2012
2008
  return;
2013
- const R = window.innerWidth < parseInt(Zr), Pt = window.getComputedStyle(
2014
- R ? x.current : $.current,
2009
+ const R = window.innerWidth < parseInt(Yr), Pt = window.getComputedStyle(
2010
+ R ? C.current : $.current,
2015
2011
  null
2016
- ), Nt = parseFloat(Pt.getPropertyValue("height")), At = R ? y.current.offsetHeight : S.current.offsetHeight;
2012
+ ), Nt = parseFloat(Pt.getPropertyValue("height")), At = R ? y.current.offsetHeight : x.current.offsetHeight;
2017
2013
  b(Nt < At);
2018
- }, []), oe = (R) => {
2014
+ }, []), ie = (R) => {
2019
2015
  r && !E && R.preventDefault();
2020
2016
  };
2021
2017
  return A(() => (window.addEventListener("resize", I), () => {
@@ -2026,15 +2022,15 @@ const lo = /* @__PURE__ */ co(so), po = "_fadeIn_1qmv6_1", fo = {
2026
2022
  mr,
2027
2023
  {
2028
2024
  ...c,
2029
- className: U,
2025
+ className: W,
2030
2026
  "data-testid": e,
2031
2027
  ref: h,
2032
2028
  ...!a && { "aria-describedby": void 0 },
2033
2029
  onPointerDownOutside: w,
2034
2030
  onOpenAutoFocus: I,
2035
- onEscapeKeyDown: oe,
2031
+ onEscapeKeyDown: ie,
2036
2032
  children: [
2037
- /* @__PURE__ */ j("div", { ref: x, className: D(`${N}__wrapper`), children: [
2033
+ /* @__PURE__ */ j("div", { ref: C, className: D(`${N}__wrapper`), children: [
2038
2034
  Qe(l) && f && u && /* @__PURE__ */ _(
2039
2035
  Je,
2040
2036
  {
@@ -2058,7 +2054,7 @@ const lo = /* @__PURE__ */ co(so), po = "_fadeIn_1qmv6_1", fo = {
2058
2054
  asChild: !0,
2059
2055
  className: D(`${N}__title`),
2060
2056
  "data-testid": T("title"),
2061
- children: /* @__PURE__ */ _(Rr, { tag: "h2", variant: "title-200", children: p })
2057
+ children: /* @__PURE__ */ _(Ir, { tag: "h2", variant: "title-200", children: p })
2062
2058
  }
2063
2059
  )
2064
2060
  ] }),
@@ -2070,15 +2066,15 @@ const lo = /* @__PURE__ */ co(so), po = "_fadeIn_1qmv6_1", fo = {
2070
2066
  children: u
2071
2067
  }
2072
2068
  ),
2073
- /* @__PURE__ */ _("div", { ref: $, className: D(`${N}__body`), children: /* @__PURE__ */ j("div", { ref: S, className: D(`${N}__body-inner`), children: [
2074
- a && i && /* @__PURE__ */ _(uo, { asChild: !0, children: /* @__PURE__ */ _(ze, { "data-testid": T("description"), children: a }) }),
2069
+ /* @__PURE__ */ _("div", { ref: $, className: D(`${N}__body`), children: /* @__PURE__ */ j("div", { ref: x, className: D(`${N}__body-inner`), children: [
2070
+ a && i && /* @__PURE__ */ _(io, { asChild: !0, children: /* @__PURE__ */ _(Ke, { "data-testid": T("description"), children: a }) }),
2075
2071
  a && !i && /* @__PURE__ */ _(
2076
- ze,
2072
+ Ke,
2077
2073
  {
2078
2074
  asChild: !0,
2079
2075
  className: D(`${N}__description`),
2080
2076
  "data-testid": T("description"),
2081
- children: /* @__PURE__ */ _(Yr, { variant: "paragraph-100", children: a })
2077
+ children: /* @__PURE__ */ _(Xr, { variant: "paragraph-100", children: a })
2082
2078
  }
2083
2079
  ),
2084
2080
  /* @__PURE__ */ _("div", { children: t }),
@@ -2105,15 +2101,15 @@ const lo = /* @__PURE__ */ co(so), po = "_fadeIn_1qmv6_1", fo = {
2105
2101
  "aria-label": e,
2106
2102
  className: D(`${N}__close-button`),
2107
2103
  "data-testid": t,
2108
- children: /* @__PURE__ */ _(St, {})
2104
+ children: /* @__PURE__ */ _(xt, {})
2109
2105
  }
2110
- ) }), ho = 3, et = ({
2106
+ ) }), vo = 3, et = ({
2111
2107
  actions: e,
2112
2108
  primaryActionVariant: n
2113
2109
  }) => {
2114
2110
  const t = [n, "secondary", "text"];
2115
2111
  return e && e.length > 0 ? /* @__PURE__ */ j("div", { className: D(`${N}__actions`), children: [
2116
- /* @__PURE__ */ _("div", { className: D(`${N}__actions-buttons`), "data-testid": "modal actions", children: e.slice(0, ho).map(({ label: o, onClick: a }, r) => /* @__PURE__ */ _(
2112
+ /* @__PURE__ */ _("div", { className: D(`${N}__actions-buttons`), "data-testid": "modal actions", children: e.slice(0, vo).map(({ label: o, onClick: a }, r) => /* @__PURE__ */ _(
2117
2113
  Le,
2118
2114
  {
2119
2115
  "data-testid": "modal actions button",
@@ -2126,7 +2122,7 @@ const lo = /* @__PURE__ */ co(so), po = "_fadeIn_1qmv6_1", fo = {
2126
2122
  )) }),
2127
2123
  /* @__PURE__ */ _("span", { className: D(`${N}__actions-separator`) })
2128
2124
  ] }) : null;
2129
- }, mo = C(
2125
+ }, ho = S(
2130
2126
  ({ ["data-testid"]: e, children: n, className: t, ...o }, a) => /* @__PURE__ */ _(
2131
2127
  fr,
2132
2128
  {
@@ -2144,8 +2140,8 @@ const lo = /* @__PURE__ */ co(so), po = "_fadeIn_1qmv6_1", fo = {
2144
2140
  open: t,
2145
2141
  onOpenChange: o
2146
2142
  }) => /* @__PURE__ */ _(pr, { open: t, onOpenChange: o, "data-testid": e, children: n });
2147
- ke.Trigger = mo;
2148
- ke.Content = vo;
2143
+ ke.Trigger = ho;
2144
+ ke.Content = fo;
2149
2145
  ke.displayName = "Modal";
2150
2146
  export {
2151
2147
  ke as Modal