@purpurds/drawer 7.13.0 → 7.14.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/drawer.es.js CHANGED
@@ -1,37 +1,37 @@
1
- import { jsx as f, Fragment as B, jsxs as D } from "react/jsx-runtime";
1
+ import { jsx as f, Fragment as H, jsxs as D } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
- import Ie, { useState as Tt, createContext as Ot, forwardRef as j, useRef as Lt, useContext as $t, useEffect as Mt } from "react";
4
- import * as It from "react-dom";
3
+ import Ie, { useState as Ot, createContext as Lt, forwardRef as B, useRef as $t, useContext as Mt, useEffect as It } from "react";
4
+ import * as kt from "react-dom";
5
5
  import Wt from "react-dom";
6
- function x(e, r, { checkForDefaultPrevented: t = !0 } = {}) {
6
+ function R(e, r, { checkForDefaultPrevented: t = !0 } = {}) {
7
7
  return function(a) {
8
8
  if (e == null || e(a), t === !1 || !a.defaultPrevented)
9
9
  return r == null ? void 0 : r(a);
10
10
  };
11
11
  }
12
- function tr(e, r) {
12
+ function nr(e, r) {
13
13
  if (typeof e == "function")
14
14
  return e(r);
15
15
  e != null && (e.current = r);
16
16
  }
17
- function Dr(...e) {
17
+ function Tr(...e) {
18
18
  return (r) => {
19
19
  let t = !1;
20
20
  const o = e.map((a) => {
21
- const n = tr(a, r);
21
+ const n = nr(a, r);
22
22
  return !t && typeof n == "function" && (t = !0), n;
23
23
  });
24
24
  if (t)
25
25
  return () => {
26
26
  for (let a = 0; a < o.length; a++) {
27
27
  const n = o[a];
28
- typeof n == "function" ? n() : tr(e[a], null);
28
+ typeof n == "function" ? n() : nr(e[a], null);
29
29
  }
30
30
  };
31
31
  };
32
32
  }
33
33
  function L(...e) {
34
- return c.useCallback(Dr(...e), e);
34
+ return c.useCallback(Tr(...e), e);
35
35
  }
36
36
  function Ft(e, r) {
37
37
  const t = c.createContext(r), o = (n) => {
@@ -47,20 +47,20 @@ function Ft(e, r) {
47
47
  }
48
48
  return [o, a];
49
49
  }
50
- function Tr(e, r = []) {
50
+ function Or(e, r = []) {
51
51
  let t = [];
52
52
  function o(n, s) {
53
53
  const i = c.createContext(s), u = t.length;
54
54
  t = [...t, s];
55
55
  const l = (p) => {
56
56
  var _;
57
- const { scope: v, children: m, ...w } = p, h = ((_ = v == null ? void 0 : v[e]) == null ? void 0 : _[u]) || i, g = c.useMemo(() => w, Object.values(w));
58
- return /* @__PURE__ */ f(h.Provider, { value: g, children: m });
57
+ const { scope: h, children: m, ...w } = p, v = ((_ = h == null ? void 0 : h[e]) == null ? void 0 : _[u]) || i, g = c.useMemo(() => w, Object.values(w));
58
+ return /* @__PURE__ */ f(v.Provider, { value: g, children: m });
59
59
  };
60
60
  l.displayName = n + "Provider";
61
- function d(p, v) {
62
- var h;
63
- const m = ((h = v == null ? void 0 : v[e]) == null ? void 0 : h[u]) || i, w = c.useContext(m);
61
+ function d(p, h) {
62
+ var v;
63
+ const m = ((v = h == null ? void 0 : h[e]) == null ? void 0 : v[u]) || i, w = c.useContext(m);
64
64
  if (w) return w;
65
65
  if (s !== void 0) return s;
66
66
  throw new Error(`\`${p}\` must be used within \`${n}\``);
@@ -77,9 +77,9 @@ function Tr(e, r = []) {
77
77
  );
78
78
  };
79
79
  };
80
- return a.scopeName = e, [o, kt(a, ...r)];
80
+ return a.scopeName = e, [o, Ut(a, ...r)];
81
81
  }
82
- function kt(...e) {
82
+ function Ut(...e) {
83
83
  const r = e[0];
84
84
  if (e.length === 1) return r;
85
85
  const t = () => {
@@ -97,12 +97,12 @@ function kt(...e) {
97
97
  };
98
98
  return t.scopeName = r.scopeName, t;
99
99
  }
100
- var ce = globalThis != null && globalThis.document ? c.useLayoutEffect : () => {
101
- }, Ut = c.useId || (() => {
100
+ var se = globalThis != null && globalThis.document ? c.useLayoutEffect : () => {
101
+ }, qt = c.useId || (() => {
102
102
  }), Ht = 0;
103
103
  function Pe(e) {
104
- const [r, t] = c.useState(Ut());
105
- return ce(() => {
104
+ const [r, t] = c.useState(qt());
105
+ return se(() => {
106
106
  t((o) => o ?? String(Ht++));
107
107
  }, [e]), e || (r ? `radix-${r}` : "");
108
108
  }
@@ -142,25 +142,25 @@ function jt({
142
142
  a.current !== o && (n(o), a.current = o);
143
143
  }, [o, a, n]), t;
144
144
  }
145
- var Ve = c.forwardRef((e, r) => {
145
+ var ze = c.forwardRef((e, r) => {
146
146
  const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(Vt);
147
147
  if (n) {
148
148
  const s = n.props.children, i = a.map((u) => u === n ? c.Children.count(s) > 1 ? c.Children.only(null) : c.isValidElement(s) ? s.props.children : null : u);
149
- return /* @__PURE__ */ f(We, { ...o, ref: r, children: c.isValidElement(s) ? c.cloneElement(s, void 0, i) : null });
149
+ return /* @__PURE__ */ f(ke, { ...o, ref: r, children: c.isValidElement(s) ? c.cloneElement(s, void 0, i) : null });
150
150
  }
151
- return /* @__PURE__ */ f(We, { ...o, ref: r, children: t });
151
+ return /* @__PURE__ */ f(ke, { ...o, ref: r, children: t });
152
152
  });
153
- Ve.displayName = "Slot";
154
- var We = c.forwardRef((e, r) => {
153
+ ze.displayName = "Slot";
154
+ var ke = c.forwardRef((e, r) => {
155
155
  const { children: t, ...o } = e;
156
156
  if (c.isValidElement(t)) {
157
- const a = qt(t), n = Yt(o, t.props);
158
- return t.type !== c.Fragment && (n.ref = r ? Dr(r, a) : a), c.cloneElement(t, n);
157
+ const a = Xt(t), n = Yt(o, t.props);
158
+ return t.type !== c.Fragment && (n.ref = r ? Tr(r, a) : a), c.cloneElement(t, n);
159
159
  }
160
160
  return c.Children.count(t) > 1 ? c.Children.only(null) : null;
161
161
  });
162
- We.displayName = "SlotClone";
163
- var zt = ({ children: e }) => /* @__PURE__ */ f(B, { children: e });
162
+ ke.displayName = "SlotClone";
163
+ var zt = ({ children: e }) => /* @__PURE__ */ f(H, { children: e });
164
164
  function Vt(e) {
165
165
  return c.isValidElement(e) && e.type === zt;
166
166
  }
@@ -174,12 +174,12 @@ function Yt(e, r) {
174
174
  }
175
175
  return { ...e, ...t };
176
176
  }
177
- function qt(e) {
177
+ function Xt(e) {
178
178
  var o, a;
179
179
  let r = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, t = r && "isReactWarning" in r && r.isReactWarning;
180
180
  return t ? e.ref : (r = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
181
181
  }
182
- var Xt = [
182
+ var Gt = [
183
183
  "a",
184
184
  "button",
185
185
  "div",
@@ -196,17 +196,17 @@ var Xt = [
196
196
  "span",
197
197
  "svg",
198
198
  "ul"
199
- ], O = Xt.reduce((e, r) => {
199
+ ], O = Gt.reduce((e, r) => {
200
200
  const t = c.forwardRef((o, a) => {
201
- const { asChild: n, ...s } = o, i = n ? Ve : r;
201
+ const { asChild: n, ...s } = o, i = n ? ze : r;
202
202
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(i, { ...s, ref: a });
203
203
  });
204
204
  return t.displayName = `Primitive.${r}`, { ...e, [r]: t };
205
205
  }, {});
206
- function Gt(e, r) {
207
- e && It.flushSync(() => e.dispatchEvent(r));
206
+ function Kt(e, r) {
207
+ e && kt.flushSync(() => e.dispatchEvent(r));
208
208
  }
209
- function Kt(e, r = globalThis == null ? void 0 : globalThis.document) {
209
+ function Zt(e, r = globalThis == null ? void 0 : globalThis.document) {
210
210
  const t = T(e);
211
211
  c.useEffect(() => {
212
212
  const o = (a) => {
@@ -215,11 +215,11 @@ function Kt(e, r = globalThis == null ? void 0 : globalThis.document) {
215
215
  return r.addEventListener("keydown", o, { capture: !0 }), () => r.removeEventListener("keydown", o, { capture: !0 });
216
216
  }, [t, r]);
217
217
  }
218
- var Zt = "DismissableLayer", Fe = "dismissableLayer.update", Qt = "dismissableLayer.pointerDownOutside", Jt = "dismissableLayer.focusOutside", nr, Or = c.createContext({
218
+ var Qt = "DismissableLayer", We = "dismissableLayer.update", Jt = "dismissableLayer.pointerDownOutside", en = "dismissableLayer.focusOutside", or, Lr = c.createContext({
219
219
  layers: /* @__PURE__ */ new Set(),
220
220
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
221
221
  branches: /* @__PURE__ */ new Set()
222
- }), Lr = c.forwardRef(
222
+ }), $r = c.forwardRef(
223
223
  (e, r) => {
224
224
  const {
225
225
  disableOutsidePointerEvents: t = !1,
@@ -229,37 +229,37 @@ var Zt = "DismissableLayer", Fe = "dismissableLayer.update", Qt = "dismissableLa
229
229
  onInteractOutside: s,
230
230
  onDismiss: i,
231
231
  ...u
232
- } = e, l = c.useContext(Or), [d, p] = c.useState(null), v = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = c.useState({}), w = L(r, (S) => p(S)), h = Array.from(l.layers), [g] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), _ = h.indexOf(g), E = d ? h.indexOf(d) : -1, b = l.layersWithOutsidePointerEventsDisabled.size > 0, y = E >= _, C = tn((S) => {
233
- const R = S.target, P = [...l.branches].some((A) => A.contains(R));
234
- !y || P || (a == null || a(S), s == null || s(S), S.defaultPrevented || i == null || i());
235
- }, v), N = nn((S) => {
236
- const R = S.target;
237
- [...l.branches].some((A) => A.contains(R)) || (n == null || n(S), s == null || s(S), S.defaultPrevented || i == null || i());
238
- }, v);
239
- return Kt((S) => {
232
+ } = e, l = c.useContext(Lr), [d, p] = c.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = c.useState({}), w = L(r, (S) => p(S)), v = Array.from(l.layers), [g] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), _ = v.indexOf(g), E = d ? v.indexOf(d) : -1, y = l.layersWithOutsidePointerEventsDisabled.size > 0, b = E >= _, C = nn((S) => {
233
+ const N = S.target, P = [...l.branches].some((A) => A.contains(N));
234
+ !b || P || (a == null || a(S), s == null || s(S), S.defaultPrevented || i == null || i());
235
+ }, h), x = on((S) => {
236
+ const N = S.target;
237
+ [...l.branches].some((A) => A.contains(N)) || (n == null || n(S), s == null || s(S), S.defaultPrevented || i == null || i());
238
+ }, h);
239
+ return Zt((S) => {
240
240
  E === l.layers.size - 1 && (o == null || o(S), !S.defaultPrevented && i && (S.preventDefault(), i()));
241
- }, v), c.useEffect(() => {
241
+ }, h), c.useEffect(() => {
242
242
  if (d)
243
- return t && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (nr = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(d)), l.layers.add(d), or(), () => {
244
- t && l.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = nr);
243
+ return t && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (or = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(d)), l.layers.add(d), ar(), () => {
244
+ t && l.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = or);
245
245
  };
246
- }, [d, v, t, l]), c.useEffect(() => () => {
247
- d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d), or());
246
+ }, [d, h, t, l]), c.useEffect(() => () => {
247
+ d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d), ar());
248
248
  }, [d, l]), c.useEffect(() => {
249
249
  const S = () => m({});
250
- return document.addEventListener(Fe, S), () => document.removeEventListener(Fe, S);
250
+ return document.addEventListener(We, S), () => document.removeEventListener(We, S);
251
251
  }, []), /* @__PURE__ */ f(
252
252
  O.div,
253
253
  {
254
254
  ...u,
255
255
  ref: w,
256
256
  style: {
257
- pointerEvents: b ? y ? "auto" : "none" : void 0,
257
+ pointerEvents: y ? b ? "auto" : "none" : void 0,
258
258
  ...e.style
259
259
  },
260
- onFocusCapture: x(e.onFocusCapture, N.onFocusCapture),
261
- onBlurCapture: x(e.onBlurCapture, N.onBlurCapture),
262
- onPointerDownCapture: x(
260
+ onFocusCapture: R(e.onFocusCapture, x.onFocusCapture),
261
+ onBlurCapture: R(e.onBlurCapture, x.onBlurCapture),
262
+ onPointerDownCapture: R(
263
263
  e.onPointerDownCapture,
264
264
  C.onPointerDownCapture
265
265
  )
@@ -267,9 +267,9 @@ var Zt = "DismissableLayer", Fe = "dismissableLayer.update", Qt = "dismissableLa
267
267
  );
268
268
  }
269
269
  );
270
- Lr.displayName = Zt;
271
- var en = "DismissableLayerBranch", rn = c.forwardRef((e, r) => {
272
- const t = c.useContext(Or), o = c.useRef(null), a = L(r, o);
270
+ $r.displayName = Qt;
271
+ var rn = "DismissableLayerBranch", tn = c.forwardRef((e, r) => {
272
+ const t = c.useContext(Lr), o = c.useRef(null), a = L(r, o);
273
273
  return c.useEffect(() => {
274
274
  const n = o.current;
275
275
  if (n)
@@ -278,16 +278,16 @@ var en = "DismissableLayerBranch", rn = c.forwardRef((e, r) => {
278
278
  };
279
279
  }, [t.branches]), /* @__PURE__ */ f(O.div, { ...e, ref: a });
280
280
  });
281
- rn.displayName = en;
282
- function tn(e, r = globalThis == null ? void 0 : globalThis.document) {
281
+ tn.displayName = rn;
282
+ function nn(e, r = globalThis == null ? void 0 : globalThis.document) {
283
283
  const t = T(e), o = c.useRef(!1), a = c.useRef(() => {
284
284
  });
285
285
  return c.useEffect(() => {
286
286
  const n = (i) => {
287
287
  if (i.target && !o.current) {
288
288
  let u = function() {
289
- $r(
290
- Qt,
289
+ Mr(
290
+ Jt,
291
291
  t,
292
292
  l,
293
293
  { discrete: !0 }
@@ -309,11 +309,11 @@ function tn(e, r = globalThis == null ? void 0 : globalThis.document) {
309
309
  onPointerDownCapture: () => o.current = !0
310
310
  };
311
311
  }
312
- function nn(e, r = globalThis == null ? void 0 : globalThis.document) {
312
+ function on(e, r = globalThis == null ? void 0 : globalThis.document) {
313
313
  const t = T(e), o = c.useRef(!1);
314
314
  return c.useEffect(() => {
315
315
  const a = (n) => {
316
- n.target && !o.current && $r(Jt, t, { originalEvent: n }, {
316
+ n.target && !o.current && Mr(en, t, { originalEvent: n }, {
317
317
  discrete: !1
318
318
  });
319
319
  };
@@ -323,22 +323,22 @@ function nn(e, r = globalThis == null ? void 0 : globalThis.document) {
323
323
  onBlurCapture: () => o.current = !1
324
324
  };
325
325
  }
326
- function or() {
327
- const e = new CustomEvent(Fe);
326
+ function ar() {
327
+ const e = new CustomEvent(We);
328
328
  document.dispatchEvent(e);
329
329
  }
330
- function $r(e, r, t, { discrete: o }) {
330
+ function Mr(e, r, t, { discrete: o }) {
331
331
  const a = t.originalEvent.target, n = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: t });
332
- r && a.addEventListener(e, r, { once: !0 }), o ? Gt(a, n) : a.dispatchEvent(n);
332
+ r && a.addEventListener(e, r, { once: !0 }), o ? Kt(a, n) : a.dispatchEvent(n);
333
333
  }
334
- var Ne = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount", ar = { bubbles: !1, cancelable: !0 }, on = "FocusScope", Mr = c.forwardRef((e, r) => {
334
+ var xe = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount", ir = { bubbles: !1, cancelable: !0 }, an = "FocusScope", Ir = c.forwardRef((e, r) => {
335
335
  const {
336
336
  loop: t = !1,
337
337
  trapped: o = !1,
338
338
  onMountAutoFocus: a,
339
339
  onUnmountAutoFocus: n,
340
340
  ...s
341
- } = e, [i, u] = c.useState(null), l = T(a), d = T(n), p = c.useRef(null), v = L(r, (h) => u(h)), m = c.useRef({
341
+ } = e, [i, u] = c.useState(null), l = T(a), d = T(n), p = c.useRef(null), h = L(r, (v) => u(v)), m = c.useRef({
342
342
  paused: !1,
343
343
  pause() {
344
344
  this.paused = !0;
@@ -349,65 +349,65 @@ var Ne = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount", ar
349
349
  }).current;
350
350
  c.useEffect(() => {
351
351
  if (o) {
352
- let h = function(b) {
352
+ let v = function(y) {
353
353
  if (m.paused || !i) return;
354
- const y = b.target;
355
- i.contains(y) ? p.current = y : H(p.current, { select: !0 });
356
- }, g = function(b) {
354
+ const b = y.target;
355
+ i.contains(b) ? p.current = b : q(p.current, { select: !0 });
356
+ }, g = function(y) {
357
357
  if (m.paused || !i) return;
358
- const y = b.relatedTarget;
359
- y !== null && (i.contains(y) || H(p.current, { select: !0 }));
360
- }, _ = function(b) {
358
+ const b = y.relatedTarget;
359
+ b !== null && (i.contains(b) || q(p.current, { select: !0 }));
360
+ }, _ = function(y) {
361
361
  if (document.activeElement === document.body)
362
- for (const C of b)
363
- C.removedNodes.length > 0 && H(i);
362
+ for (const C of y)
363
+ C.removedNodes.length > 0 && q(i);
364
364
  };
365
- document.addEventListener("focusin", h), document.addEventListener("focusout", g);
365
+ document.addEventListener("focusin", v), document.addEventListener("focusout", g);
366
366
  const E = new MutationObserver(_);
367
367
  return i && E.observe(i, { childList: !0, subtree: !0 }), () => {
368
- document.removeEventListener("focusin", h), document.removeEventListener("focusout", g), E.disconnect();
368
+ document.removeEventListener("focusin", v), document.removeEventListener("focusout", g), E.disconnect();
369
369
  };
370
370
  }
371
371
  }, [o, i, m.paused]), c.useEffect(() => {
372
372
  if (i) {
373
- sr.add(m);
374
- const h = document.activeElement;
375
- if (!i.contains(h)) {
376
- const _ = new CustomEvent(Ne, ar);
377
- i.addEventListener(Ne, l), i.dispatchEvent(_), _.defaultPrevented || (an(dn(Ir(i)), { select: !0 }), document.activeElement === h && H(i));
373
+ cr.add(m);
374
+ const v = document.activeElement;
375
+ if (!i.contains(v)) {
376
+ const _ = new CustomEvent(xe, ir);
377
+ i.addEventListener(xe, l), i.dispatchEvent(_), _.defaultPrevented || (sn(fn(kr(i)), { select: !0 }), document.activeElement === v && q(i));
378
378
  }
379
379
  return () => {
380
- i.removeEventListener(Ne, l), setTimeout(() => {
381
- const _ = new CustomEvent(Ae, ar);
382
- i.addEventListener(Ae, d), i.dispatchEvent(_), _.defaultPrevented || H(h ?? document.body, { select: !0 }), i.removeEventListener(Ae, d), sr.remove(m);
380
+ i.removeEventListener(xe, l), setTimeout(() => {
381
+ const _ = new CustomEvent(Ae, ir);
382
+ i.addEventListener(Ae, d), i.dispatchEvent(_), _.defaultPrevented || q(v ?? document.body, { select: !0 }), i.removeEventListener(Ae, d), cr.remove(m);
383
383
  }, 0);
384
384
  };
385
385
  }
386
386
  }, [i, l, d, m]);
387
387
  const w = c.useCallback(
388
- (h) => {
388
+ (v) => {
389
389
  if (!t && !o || m.paused) return;
390
- const g = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, _ = document.activeElement;
390
+ const g = v.key === "Tab" && !v.altKey && !v.ctrlKey && !v.metaKey, _ = document.activeElement;
391
391
  if (g && _) {
392
- const E = h.currentTarget, [b, y] = sn(E);
393
- b && y ? !h.shiftKey && _ === y ? (h.preventDefault(), t && H(b, { select: !0 })) : h.shiftKey && _ === b && (h.preventDefault(), t && H(y, { select: !0 })) : _ === E && h.preventDefault();
392
+ const E = v.currentTarget, [y, b] = cn(E);
393
+ y && b ? !v.shiftKey && _ === b ? (v.preventDefault(), t && q(y, { select: !0 })) : v.shiftKey && _ === y && (v.preventDefault(), t && q(b, { select: !0 })) : _ === E && v.preventDefault();
394
394
  }
395
395
  },
396
396
  [t, o, m.paused]
397
397
  );
398
- return /* @__PURE__ */ f(O.div, { tabIndex: -1, ...s, ref: v, onKeyDown: w });
398
+ return /* @__PURE__ */ f(O.div, { tabIndex: -1, ...s, ref: h, onKeyDown: w });
399
399
  });
400
- Mr.displayName = on;
401
- function an(e, { select: r = !1 } = {}) {
400
+ Ir.displayName = an;
401
+ function sn(e, { select: r = !1 } = {}) {
402
402
  const t = document.activeElement;
403
403
  for (const o of e)
404
- if (H(o, { select: r }), document.activeElement !== t) return;
404
+ if (q(o, { select: r }), document.activeElement !== t) return;
405
405
  }
406
- function sn(e) {
407
- const r = Ir(e), t = ir(r, e), o = ir(r.reverse(), e);
406
+ function cn(e) {
407
+ const r = kr(e), t = sr(r, e), o = sr(r.reverse(), e);
408
408
  return [t, o];
409
409
  }
410
- function Ir(e) {
410
+ function kr(e) {
411
411
  const r = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
412
412
  acceptNode: (o) => {
413
413
  const a = o.tagName === "INPUT" && o.type === "hidden";
@@ -417,11 +417,11 @@ function Ir(e) {
417
417
  for (; t.nextNode(); ) r.push(t.currentNode);
418
418
  return r;
419
419
  }
420
- function ir(e, r) {
420
+ function sr(e, r) {
421
421
  for (const t of e)
422
- if (!cn(t, { upTo: r })) return t;
422
+ if (!ln(t, { upTo: r })) return t;
423
423
  }
424
- function cn(e, { upTo: r }) {
424
+ function ln(e, { upTo: r }) {
425
425
  if (getComputedStyle(e).visibility === "hidden") return !0;
426
426
  for (; e; ) {
427
427
  if (r !== void 0 && e === r) return !1;
@@ -430,54 +430,54 @@ function cn(e, { upTo: r }) {
430
430
  }
431
431
  return !1;
432
432
  }
433
- function ln(e) {
433
+ function un(e) {
434
434
  return e instanceof HTMLInputElement && "select" in e;
435
435
  }
436
- function H(e, { select: r = !1 } = {}) {
436
+ function q(e, { select: r = !1 } = {}) {
437
437
  if (e && e.focus) {
438
438
  const t = document.activeElement;
439
- e.focus({ preventScroll: !0 }), e !== t && ln(e) && r && e.select();
439
+ e.focus({ preventScroll: !0 }), e !== t && un(e) && r && e.select();
440
440
  }
441
441
  }
442
- var sr = un();
443
- function un() {
442
+ var cr = dn();
443
+ function dn() {
444
444
  let e = [];
445
445
  return {
446
446
  add(r) {
447
447
  const t = e[0];
448
- r !== t && (t == null || t.pause()), e = cr(e, r), e.unshift(r);
448
+ r !== t && (t == null || t.pause()), e = lr(e, r), e.unshift(r);
449
449
  },
450
450
  remove(r) {
451
451
  var t;
452
- e = cr(e, r), (t = e[0]) == null || t.resume();
452
+ e = lr(e, r), (t = e[0]) == null || t.resume();
453
453
  }
454
454
  };
455
455
  }
456
- function cr(e, r) {
456
+ function lr(e, r) {
457
457
  const t = [...e], o = t.indexOf(r);
458
458
  return o !== -1 && t.splice(o, 1), t;
459
459
  }
460
- function dn(e) {
460
+ function fn(e) {
461
461
  return e.filter((r) => r.tagName !== "A");
462
462
  }
463
- var fn = "Portal", Wr = c.forwardRef((e, r) => {
463
+ var pn = "Portal", Wr = c.forwardRef((e, r) => {
464
464
  var i;
465
465
  const { container: t, ...o } = e, [a, n] = c.useState(!1);
466
- ce(() => n(!0), []);
466
+ se(() => n(!0), []);
467
467
  const s = t || a && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
468
468
  return s ? Wt.createPortal(/* @__PURE__ */ f(O.div, { ...o, ref: r }), s) : null;
469
469
  });
470
- Wr.displayName = fn;
471
- function pn(e, r) {
470
+ Wr.displayName = pn;
471
+ function hn(e, r) {
472
472
  return c.useReducer((t, o) => r[t][o] ?? t, e);
473
473
  }
474
- var z = (e) => {
475
- const { present: r, children: t } = e, o = vn(r), a = typeof t == "function" ? t({ present: o.isPresent }) : c.Children.only(t), n = L(o.ref, hn(a));
474
+ var j = (e) => {
475
+ const { present: r, children: t } = e, o = vn(r), a = typeof t == "function" ? t({ present: o.isPresent }) : c.Children.only(t), n = L(o.ref, mn(a));
476
476
  return typeof t == "function" || o.isPresent ? c.cloneElement(a, { ref: n }) : null;
477
477
  };
478
- z.displayName = "Presence";
478
+ j.displayName = "Presence";
479
479
  function vn(e) {
480
- const [r, t] = c.useState(), o = c.useRef({}), a = c.useRef(e), n = c.useRef("none"), s = e ? "mounted" : "unmounted", [i, u] = pn(s, {
480
+ const [r, t] = c.useState(), o = c.useRef({}), a = c.useRef(e), n = c.useRef("none"), s = e ? "mounted" : "unmounted", [i, u] = hn(s, {
481
481
  mounted: {
482
482
  UNMOUNT: "unmounted",
483
483
  ANIMATION_OUT: "unmountSuspended"
@@ -493,28 +493,28 @@ function vn(e) {
493
493
  return c.useEffect(() => {
494
494
  const l = le(o.current);
495
495
  n.current = i === "mounted" ? l : "none";
496
- }, [i]), ce(() => {
496
+ }, [i]), se(() => {
497
497
  const l = o.current, d = a.current;
498
498
  if (d !== e) {
499
- const v = n.current, m = le(l);
500
- e ? u("MOUNT") : m === "none" || (l == null ? void 0 : l.display) === "none" ? u("UNMOUNT") : u(d && v !== m ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
499
+ const h = n.current, m = le(l);
500
+ e ? u("MOUNT") : m === "none" || (l == null ? void 0 : l.display) === "none" ? u("UNMOUNT") : u(d && h !== m ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
501
501
  }
502
- }, [e, u]), ce(() => {
502
+ }, [e, u]), se(() => {
503
503
  if (r) {
504
504
  let l;
505
505
  const d = r.ownerDocument.defaultView ?? window, p = (m) => {
506
- const h = le(o.current).includes(m.animationName);
507
- if (m.target === r && h && (u("ANIMATION_END"), !a.current)) {
506
+ const v = le(o.current).includes(m.animationName);
507
+ if (m.target === r && v && (u("ANIMATION_END"), !a.current)) {
508
508
  const g = r.style.animationFillMode;
509
509
  r.style.animationFillMode = "forwards", l = d.setTimeout(() => {
510
510
  r.style.animationFillMode === "forwards" && (r.style.animationFillMode = g);
511
511
  });
512
512
  }
513
- }, v = (m) => {
513
+ }, h = (m) => {
514
514
  m.target === r && (n.current = le(o.current));
515
515
  };
516
- return r.addEventListener("animationstart", v), r.addEventListener("animationcancel", p), r.addEventListener("animationend", p), () => {
517
- d.clearTimeout(l), r.removeEventListener("animationstart", v), r.removeEventListener("animationcancel", p), r.removeEventListener("animationend", p);
516
+ return r.addEventListener("animationstart", h), r.addEventListener("animationcancel", p), r.addEventListener("animationend", p), () => {
517
+ d.clearTimeout(l), r.removeEventListener("animationstart", h), r.removeEventListener("animationcancel", p), r.removeEventListener("animationend", p);
518
518
  };
519
519
  } else
520
520
  u("ANIMATION_END");
@@ -528,32 +528,32 @@ function vn(e) {
528
528
  function le(e) {
529
529
  return (e == null ? void 0 : e.animationName) || "none";
530
530
  }
531
- function hn(e) {
531
+ function mn(e) {
532
532
  var o, a;
533
533
  let r = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, t = r && "isReactWarning" in r && r.isReactWarning;
534
534
  return t ? e.ref : (r = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
535
535
  }
536
- var Re = 0;
537
- function mn() {
536
+ var Ne = 0;
537
+ function gn() {
538
538
  c.useEffect(() => {
539
539
  const e = document.querySelectorAll("[data-radix-focus-guard]");
540
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? lr()), document.body.insertAdjacentElement("beforeend", e[1] ?? lr()), Re++, () => {
541
- Re === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((r) => r.remove()), Re--;
540
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? ur()), document.body.insertAdjacentElement("beforeend", e[1] ?? ur()), Ne++, () => {
541
+ Ne === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((r) => r.remove()), Ne--;
542
542
  };
543
543
  }, []);
544
544
  }
545
- function lr() {
545
+ function ur() {
546
546
  const e = document.createElement("span");
547
547
  return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
548
548
  }
549
- var I = function() {
550
- return I = Object.assign || function(r) {
549
+ var k = function() {
550
+ return k = Object.assign || function(r) {
551
551
  for (var t, o = 1, a = arguments.length; o < a; o++) {
552
552
  t = arguments[o];
553
553
  for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (r[n] = t[n]);
554
554
  }
555
555
  return r;
556
- }, I.apply(this, arguments);
556
+ }, k.apply(this, arguments);
557
557
  };
558
558
  function Fr(e, r) {
559
559
  var t = {};
@@ -563,17 +563,17 @@ function Fr(e, r) {
563
563
  r.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
564
564
  return t;
565
565
  }
566
- function gn(e, r, t) {
566
+ function _n(e, r, t) {
567
567
  if (t || arguments.length === 2) for (var o = 0, a = r.length, n; o < a; o++)
568
568
  (n || !(o in r)) && (n || (n = Array.prototype.slice.call(r, 0, o)), n[o] = r[o]);
569
569
  return e.concat(n || Array.prototype.slice.call(r));
570
570
  }
571
- var ge = "right-scroll-bar-position", _e = "width-before-scroll-bar", _n = "with-scroll-bars-hidden", wn = "--removed-body-scroll-bar-size";
572
- function xe(e, r) {
571
+ var ge = "right-scroll-bar-position", _e = "width-before-scroll-bar", wn = "with-scroll-bars-hidden", bn = "--removed-body-scroll-bar-size";
572
+ function Re(e, r) {
573
573
  return typeof e == "function" ? e(r) : e && (e.current = r), e;
574
574
  }
575
- function bn(e, r) {
576
- var t = Tt(function() {
575
+ function yn(e, r) {
576
+ var t = Ot(function() {
577
577
  return {
578
578
  // value
579
579
  value: e,
@@ -593,31 +593,31 @@ function bn(e, r) {
593
593
  })[0];
594
594
  return t.callback = r, t.facade;
595
595
  }
596
- var yn = typeof window < "u" ? c.useLayoutEffect : c.useEffect, ur = /* @__PURE__ */ new WeakMap();
597
- function Sn(e, r) {
598
- var t = bn(null, function(o) {
596
+ var Sn = typeof window < "u" ? c.useLayoutEffect : c.useEffect, dr = /* @__PURE__ */ new WeakMap();
597
+ function En(e, r) {
598
+ var t = yn(null, function(o) {
599
599
  return e.forEach(function(a) {
600
- return xe(a, o);
600
+ return Re(a, o);
601
601
  });
602
602
  });
603
- return yn(function() {
604
- var o = ur.get(t);
603
+ return Sn(function() {
604
+ var o = dr.get(t);
605
605
  if (o) {
606
606
  var a = new Set(o), n = new Set(e), s = t.current;
607
607
  a.forEach(function(i) {
608
- n.has(i) || xe(i, null);
608
+ n.has(i) || Re(i, null);
609
609
  }), n.forEach(function(i) {
610
- a.has(i) || xe(i, s);
610
+ a.has(i) || Re(i, s);
611
611
  });
612
612
  }
613
- ur.set(t, e);
613
+ dr.set(t, e);
614
614
  }, [e]), t;
615
615
  }
616
- function En(e) {
616
+ function Cn(e) {
617
617
  return e;
618
618
  }
619
- function Cn(e, r) {
620
- r === void 0 && (r = En);
619
+ function Pn(e, r) {
620
+ r === void 0 && (r = Cn);
621
621
  var t = [], o = !1, a = {
622
622
  read: function() {
623
623
  if (o)
@@ -671,36 +671,36 @@ function Cn(e, r) {
671
671
  };
672
672
  return a;
673
673
  }
674
- function Pn(e) {
674
+ function xn(e) {
675
675
  e === void 0 && (e = {});
676
- var r = Cn(null);
677
- return r.options = I({ async: !0, ssr: !1 }, e), r;
676
+ var r = Pn(null);
677
+ return r.options = k({ async: !0, ssr: !1 }, e), r;
678
678
  }
679
- var kr = function(e) {
679
+ var Ur = function(e) {
680
680
  var r = e.sideCar, t = Fr(e, ["sideCar"]);
681
681
  if (!r)
682
682
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
683
683
  var o = r.read();
684
684
  if (!o)
685
685
  throw new Error("Sidecar medium not found");
686
- return c.createElement(o, I({}, t));
686
+ return c.createElement(o, k({}, t));
687
687
  };
688
- kr.isSideCarExport = !0;
689
- function Nn(e, r) {
690
- return e.useMedium(r), kr;
688
+ Ur.isSideCarExport = !0;
689
+ function An(e, r) {
690
+ return e.useMedium(r), Ur;
691
691
  }
692
- var Ur = Pn(), De = function() {
692
+ var qr = xn(), De = function() {
693
693
  }, Se = c.forwardRef(function(e, r) {
694
694
  var t = c.useRef(null), o = c.useState({
695
695
  onScrollCapture: De,
696
696
  onWheelCapture: De,
697
697
  onTouchMoveCapture: De
698
- }), a = o[0], n = o[1], s = e.forwardProps, i = e.children, u = e.className, l = e.removeScrollBar, d = e.enabled, p = e.shards, v = e.sideCar, m = e.noIsolation, w = e.inert, h = e.allowPinchZoom, g = e.as, _ = g === void 0 ? "div" : g, E = e.gapMode, b = Fr(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), y = v, C = Sn([t, r]), N = I(I({}, b), a);
698
+ }), a = o[0], n = o[1], s = e.forwardProps, i = e.children, u = e.className, l = e.removeScrollBar, d = e.enabled, p = e.shards, h = e.sideCar, m = e.noIsolation, w = e.inert, v = e.allowPinchZoom, g = e.as, _ = g === void 0 ? "div" : g, E = e.gapMode, y = Fr(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), b = h, C = En([t, r]), x = k(k({}, y), a);
699
699
  return c.createElement(
700
700
  c.Fragment,
701
701
  null,
702
- d && c.createElement(y, { sideCar: Ur, removeScrollBar: l, shards: p, noIsolation: m, inert: w, setCallbacks: n, allowPinchZoom: !!h, lockRef: t, gapMode: E }),
703
- s ? c.cloneElement(c.Children.only(i), I(I({}, N), { ref: C })) : c.createElement(_, I({}, N, { className: u, ref: C }), i)
702
+ d && c.createElement(b, { sideCar: qr, removeScrollBar: l, shards: p, noIsolation: m, inert: w, setCallbacks: n, allowPinchZoom: !!v, lockRef: t, gapMode: E }),
703
+ s ? c.cloneElement(c.Children.only(i), k(k({}, x), { ref: C })) : c.createElement(_, k({}, x, { className: u, ref: C }), i)
704
704
  );
705
705
  });
706
706
  Se.defaultProps = {
@@ -712,7 +712,7 @@ Se.classNames = {
712
712
  fullWidth: _e,
713
713
  zeroRight: ge
714
714
  };
715
- var An = function() {
715
+ var Nn = function() {
716
716
  if (typeof __webpack_nonce__ < "u")
717
717
  return __webpack_nonce__;
718
718
  };
@@ -721,28 +721,28 @@ function Rn() {
721
721
  return null;
722
722
  var e = document.createElement("style");
723
723
  e.type = "text/css";
724
- var r = An();
724
+ var r = Nn();
725
725
  return r && e.setAttribute("nonce", r), e;
726
726
  }
727
- function xn(e, r) {
727
+ function Dn(e, r) {
728
728
  e.styleSheet ? e.styleSheet.cssText = r : e.appendChild(document.createTextNode(r));
729
729
  }
730
- function Dn(e) {
730
+ function Tn(e) {
731
731
  var r = document.head || document.getElementsByTagName("head")[0];
732
732
  r.appendChild(e);
733
733
  }
734
- var Tn = function() {
734
+ var On = function() {
735
735
  var e = 0, r = null;
736
736
  return {
737
737
  add: function(t) {
738
- e == 0 && (r = Rn()) && (xn(r, t), Dn(r)), e++;
738
+ e == 0 && (r = Rn()) && (Dn(r, t), Tn(r)), e++;
739
739
  },
740
740
  remove: function() {
741
741
  e--, !e && r && (r.parentNode && r.parentNode.removeChild(r), r = null);
742
742
  }
743
743
  };
744
- }, On = function() {
745
- var e = Tn();
744
+ }, Ln = function() {
745
+ var e = On();
746
746
  return function(r, t) {
747
747
  c.useEffect(function() {
748
748
  return e.add(r), function() {
@@ -751,39 +751,39 @@ var Tn = function() {
751
751
  }, [r && t]);
752
752
  };
753
753
  }, Hr = function() {
754
- var e = On(), r = function(t) {
754
+ var e = Ln(), r = function(t) {
755
755
  var o = t.styles, a = t.dynamic;
756
756
  return e(o, a), null;
757
757
  };
758
758
  return r;
759
- }, Ln = {
759
+ }, $n = {
760
760
  left: 0,
761
761
  top: 0,
762
762
  right: 0,
763
763
  gap: 0
764
764
  }, Te = function(e) {
765
765
  return parseInt(e || "", 10) || 0;
766
- }, $n = function(e) {
766
+ }, Mn = function(e) {
767
767
  var r = window.getComputedStyle(document.body), t = r[e === "padding" ? "paddingLeft" : "marginLeft"], o = r[e === "padding" ? "paddingTop" : "marginTop"], a = r[e === "padding" ? "paddingRight" : "marginRight"];
768
768
  return [Te(t), Te(o), Te(a)];
769
- }, Mn = function(e) {
769
+ }, In = function(e) {
770
770
  if (e === void 0 && (e = "margin"), typeof window > "u")
771
- return Ln;
772
- var r = $n(e), t = document.documentElement.clientWidth, o = window.innerWidth;
771
+ return $n;
772
+ var r = Mn(e), t = document.documentElement.clientWidth, o = window.innerWidth;
773
773
  return {
774
774
  left: r[0],
775
775
  top: r[1],
776
776
  right: r[2],
777
777
  gap: Math.max(0, o - t + r[2] - r[0])
778
778
  };
779
- }, In = Hr(), re = "data-scroll-locked", Wn = function(e, r, t, o) {
779
+ }, kn = Hr(), te = "data-scroll-locked", Wn = function(e, r, t, o) {
780
780
  var a = e.left, n = e.top, s = e.right, i = e.gap;
781
781
  return t === void 0 && (t = "margin"), `
782
- .`.concat(_n, ` {
782
+ .`.concat(wn, ` {
783
783
  overflow: hidden `).concat(o, `;
784
784
  padding-right: `).concat(i, "px ").concat(o, `;
785
785
  }
786
- body[`).concat(re, `] {
786
+ body[`).concat(te, `] {
787
787
  overflow: hidden `).concat(o, `;
788
788
  overscroll-behavior: contain;
789
789
  `).concat([
@@ -816,40 +816,40 @@ var Tn = function() {
816
816
  margin-right: 0 `).concat(o, `;
817
817
  }
818
818
 
819
- body[`).concat(re, `] {
820
- `).concat(wn, ": ").concat(i, `px;
819
+ body[`).concat(te, `] {
820
+ `).concat(bn, ": ").concat(i, `px;
821
821
  }
822
822
  `);
823
- }, dr = function() {
824
- var e = parseInt(document.body.getAttribute(re) || "0", 10);
823
+ }, fr = function() {
824
+ var e = parseInt(document.body.getAttribute(te) || "0", 10);
825
825
  return isFinite(e) ? e : 0;
826
826
  }, Fn = function() {
827
827
  c.useEffect(function() {
828
- return document.body.setAttribute(re, (dr() + 1).toString()), function() {
829
- var e = dr() - 1;
830
- e <= 0 ? document.body.removeAttribute(re) : document.body.setAttribute(re, e.toString());
828
+ return document.body.setAttribute(te, (fr() + 1).toString()), function() {
829
+ var e = fr() - 1;
830
+ e <= 0 ? document.body.removeAttribute(te) : document.body.setAttribute(te, e.toString());
831
831
  };
832
832
  }, []);
833
- }, kn = function(e) {
833
+ }, Un = function(e) {
834
834
  var r = e.noRelative, t = e.noImportant, o = e.gapMode, a = o === void 0 ? "margin" : o;
835
835
  Fn();
836
836
  var n = c.useMemo(function() {
837
- return Mn(a);
837
+ return In(a);
838
838
  }, [a]);
839
- return c.createElement(In, { styles: Wn(n, !r, a, t ? "" : "!important") });
840
- }, ke = !1;
839
+ return c.createElement(kn, { styles: Wn(n, !r, a, t ? "" : "!important") });
840
+ }, Fe = !1;
841
841
  if (typeof window < "u")
842
842
  try {
843
843
  var ue = Object.defineProperty({}, "passive", {
844
844
  get: function() {
845
- return ke = !0, !0;
845
+ return Fe = !0, !0;
846
846
  }
847
847
  });
848
848
  window.addEventListener("test", ue, ue), window.removeEventListener("test", ue, ue);
849
849
  } catch {
850
- ke = !1;
850
+ Fe = !1;
851
851
  }
852
- var X = ke ? { passive: !1 } : !1, Un = function(e) {
852
+ var G = Fe ? { passive: !1 } : !1, qn = function(e) {
853
853
  return e.tagName === "TEXTAREA";
854
854
  }, Br = function(e, r) {
855
855
  if (!(e instanceof Element))
@@ -858,13 +858,13 @@ var X = ke ? { passive: !1 } : !1, Un = function(e) {
858
858
  return (
859
859
  // not-not-scrollable
860
860
  t[r] !== "hidden" && // contains scroll inside self
861
- !(t.overflowY === t.overflowX && !Un(e) && t[r] === "visible")
861
+ !(t.overflowY === t.overflowX && !qn(e) && t[r] === "visible")
862
862
  );
863
863
  }, Hn = function(e) {
864
864
  return Br(e, "overflowY");
865
865
  }, Bn = function(e) {
866
866
  return Br(e, "overflowX");
867
- }, fr = function(e, r) {
867
+ }, pr = function(e, r) {
868
868
  var t = r.ownerDocument, o = r;
869
869
  do {
870
870
  typeof ShadowRoot < "u" && o instanceof ShadowRoot && (o = o.host);
@@ -898,130 +898,130 @@ var X = ke ? { passive: !1 } : !1, Un = function(e) {
898
898
  }, Vn = function(e, r) {
899
899
  return e === "h" && r === "rtl" ? -1 : 1;
900
900
  }, Yn = function(e, r, t, o, a) {
901
- var n = Vn(e, window.getComputedStyle(r).direction), s = n * o, i = t.target, u = r.contains(i), l = !1, d = s > 0, p = 0, v = 0;
901
+ var n = Vn(e, window.getComputedStyle(r).direction), s = n * o, i = t.target, u = r.contains(i), l = !1, d = s > 0, p = 0, h = 0;
902
902
  do {
903
- var m = zr(e, i), w = m[0], h = m[1], g = m[2], _ = h - g - n * w;
904
- (w || _) && jr(e, i) && (p += _, v += w), i instanceof ShadowRoot ? i = i.host : i = i.parentNode;
903
+ var m = zr(e, i), w = m[0], v = m[1], g = m[2], _ = v - g - n * w;
904
+ (w || _) && jr(e, i) && (p += _, h += w), i instanceof ShadowRoot ? i = i.host : i = i.parentNode;
905
905
  } while (
906
906
  // portaled content
907
907
  !u && i !== document.body || // self content
908
908
  u && (r.contains(i) || r === i)
909
909
  );
910
- return (d && Math.abs(p) < 1 || !d && Math.abs(v) < 1) && (l = !0), l;
910
+ return (d && Math.abs(p) < 1 || !d && Math.abs(h) < 1) && (l = !0), l;
911
911
  }, de = function(e) {
912
912
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
913
- }, pr = function(e) {
913
+ }, hr = function(e) {
914
914
  return [e.deltaX, e.deltaY];
915
915
  }, vr = function(e) {
916
916
  return e && "current" in e ? e.current : e;
917
- }, qn = function(e, r) {
917
+ }, Xn = function(e, r) {
918
918
  return e[0] === r[0] && e[1] === r[1];
919
- }, Xn = function(e) {
919
+ }, Gn = function(e) {
920
920
  return `
921
921
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
922
922
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
923
923
  `);
924
- }, Gn = 0, G = [];
925
- function Kn(e) {
926
- var r = c.useRef([]), t = c.useRef([0, 0]), o = c.useRef(), a = c.useState(Gn++)[0], n = c.useState(Hr)[0], s = c.useRef(e);
924
+ }, Kn = 0, K = [];
925
+ function Zn(e) {
926
+ var r = c.useRef([]), t = c.useRef([0, 0]), o = c.useRef(), a = c.useState(Kn++)[0], n = c.useState(Hr)[0], s = c.useRef(e);
927
927
  c.useEffect(function() {
928
928
  s.current = e;
929
929
  }, [e]), c.useEffect(function() {
930
930
  if (e.inert) {
931
931
  document.body.classList.add("block-interactivity-".concat(a));
932
- var h = gn([e.lockRef.current], (e.shards || []).map(vr), !0).filter(Boolean);
933
- return h.forEach(function(g) {
932
+ var v = _n([e.lockRef.current], (e.shards || []).map(vr), !0).filter(Boolean);
933
+ return v.forEach(function(g) {
934
934
  return g.classList.add("allow-interactivity-".concat(a));
935
935
  }), function() {
936
- document.body.classList.remove("block-interactivity-".concat(a)), h.forEach(function(g) {
936
+ document.body.classList.remove("block-interactivity-".concat(a)), v.forEach(function(g) {
937
937
  return g.classList.remove("allow-interactivity-".concat(a));
938
938
  });
939
939
  };
940
940
  }
941
941
  }, [e.inert, e.lockRef.current, e.shards]);
942
- var i = c.useCallback(function(h, g) {
943
- if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
942
+ var i = c.useCallback(function(v, g) {
943
+ if ("touches" in v && v.touches.length === 2 || v.type === "wheel" && v.ctrlKey)
944
944
  return !s.current.allowPinchZoom;
945
- var _ = de(h), E = t.current, b = "deltaX" in h ? h.deltaX : E[0] - _[0], y = "deltaY" in h ? h.deltaY : E[1] - _[1], C, N = h.target, S = Math.abs(b) > Math.abs(y) ? "h" : "v";
946
- if ("touches" in h && S === "h" && N.type === "range")
945
+ var _ = de(v), E = t.current, y = "deltaX" in v ? v.deltaX : E[0] - _[0], b = "deltaY" in v ? v.deltaY : E[1] - _[1], C, x = v.target, S = Math.abs(y) > Math.abs(b) ? "h" : "v";
946
+ if ("touches" in v && S === "h" && x.type === "range")
947
947
  return !1;
948
- var R = fr(S, N);
949
- if (!R)
948
+ var N = pr(S, x);
949
+ if (!N)
950
950
  return !0;
951
- if (R ? C = S : (C = S === "v" ? "h" : "v", R = fr(S, N)), !R)
951
+ if (N ? C = S : (C = S === "v" ? "h" : "v", N = pr(S, x)), !N)
952
952
  return !1;
953
- if (!o.current && "changedTouches" in h && (b || y) && (o.current = C), !C)
953
+ if (!o.current && "changedTouches" in v && (y || b) && (o.current = C), !C)
954
954
  return !0;
955
955
  var P = o.current || C;
956
- return Yn(P, g, h, P === "h" ? b : y);
957
- }, []), u = c.useCallback(function(h) {
958
- var g = h;
959
- if (!(!G.length || G[G.length - 1] !== n)) {
960
- var _ = "deltaY" in g ? pr(g) : de(g), E = r.current.filter(function(C) {
961
- return C.name === g.type && (C.target === g.target || g.target === C.shadowParent) && qn(C.delta, _);
956
+ return Yn(P, g, v, P === "h" ? y : b);
957
+ }, []), u = c.useCallback(function(v) {
958
+ var g = v;
959
+ if (!(!K.length || K[K.length - 1] !== n)) {
960
+ var _ = "deltaY" in g ? hr(g) : de(g), E = r.current.filter(function(C) {
961
+ return C.name === g.type && (C.target === g.target || g.target === C.shadowParent) && Xn(C.delta, _);
962
962
  })[0];
963
963
  if (E && E.should) {
964
964
  g.cancelable && g.preventDefault();
965
965
  return;
966
966
  }
967
967
  if (!E) {
968
- var b = (s.current.shards || []).map(vr).filter(Boolean).filter(function(C) {
968
+ var y = (s.current.shards || []).map(vr).filter(Boolean).filter(function(C) {
969
969
  return C.contains(g.target);
970
- }), y = b.length > 0 ? i(g, b[0]) : !s.current.noIsolation;
971
- y && g.cancelable && g.preventDefault();
970
+ }), b = y.length > 0 ? i(g, y[0]) : !s.current.noIsolation;
971
+ b && g.cancelable && g.preventDefault();
972
972
  }
973
973
  }
974
- }, []), l = c.useCallback(function(h, g, _, E) {
975
- var b = { name: h, delta: g, target: _, should: E, shadowParent: Zn(_) };
976
- r.current.push(b), setTimeout(function() {
977
- r.current = r.current.filter(function(y) {
978
- return y !== b;
974
+ }, []), l = c.useCallback(function(v, g, _, E) {
975
+ var y = { name: v, delta: g, target: _, should: E, shadowParent: Qn(_) };
976
+ r.current.push(y), setTimeout(function() {
977
+ r.current = r.current.filter(function(b) {
978
+ return b !== y;
979
979
  });
980
980
  }, 1);
981
- }, []), d = c.useCallback(function(h) {
982
- t.current = de(h), o.current = void 0;
983
- }, []), p = c.useCallback(function(h) {
984
- l(h.type, pr(h), h.target, i(h, e.lockRef.current));
985
- }, []), v = c.useCallback(function(h) {
986
- l(h.type, de(h), h.target, i(h, e.lockRef.current));
981
+ }, []), d = c.useCallback(function(v) {
982
+ t.current = de(v), o.current = void 0;
983
+ }, []), p = c.useCallback(function(v) {
984
+ l(v.type, hr(v), v.target, i(v, e.lockRef.current));
985
+ }, []), h = c.useCallback(function(v) {
986
+ l(v.type, de(v), v.target, i(v, e.lockRef.current));
987
987
  }, []);
988
988
  c.useEffect(function() {
989
- return G.push(n), e.setCallbacks({
989
+ return K.push(n), e.setCallbacks({
990
990
  onScrollCapture: p,
991
991
  onWheelCapture: p,
992
- onTouchMoveCapture: v
993
- }), document.addEventListener("wheel", u, X), document.addEventListener("touchmove", u, X), document.addEventListener("touchstart", d, X), function() {
994
- G = G.filter(function(h) {
995
- return h !== n;
996
- }), document.removeEventListener("wheel", u, X), document.removeEventListener("touchmove", u, X), document.removeEventListener("touchstart", d, X);
992
+ onTouchMoveCapture: h
993
+ }), document.addEventListener("wheel", u, G), document.addEventListener("touchmove", u, G), document.addEventListener("touchstart", d, G), function() {
994
+ K = K.filter(function(v) {
995
+ return v !== n;
996
+ }), document.removeEventListener("wheel", u, G), document.removeEventListener("touchmove", u, G), document.removeEventListener("touchstart", d, G);
997
997
  };
998
998
  }, []);
999
999
  var m = e.removeScrollBar, w = e.inert;
1000
1000
  return c.createElement(
1001
1001
  c.Fragment,
1002
1002
  null,
1003
- w ? c.createElement(n, { styles: Xn(a) }) : null,
1004
- m ? c.createElement(kn, { gapMode: e.gapMode }) : null
1003
+ w ? c.createElement(n, { styles: Gn(a) }) : null,
1004
+ m ? c.createElement(Un, { gapMode: e.gapMode }) : null
1005
1005
  );
1006
1006
  }
1007
- function Zn(e) {
1007
+ function Qn(e) {
1008
1008
  for (var r = null; e !== null; )
1009
1009
  e instanceof ShadowRoot && (r = e.host, e = e.host), e = e.parentNode;
1010
1010
  return r;
1011
1011
  }
1012
- const Qn = Nn(Ur, Kn);
1012
+ const Jn = An(qr, Zn);
1013
1013
  var Vr = c.forwardRef(function(e, r) {
1014
- return c.createElement(Se, I({}, e, { ref: r, sideCar: Qn }));
1014
+ return c.createElement(Se, k({}, e, { ref: r, sideCar: Jn }));
1015
1015
  });
1016
1016
  Vr.classNames = Se.classNames;
1017
- var Jn = function(e) {
1017
+ var eo = function(e) {
1018
1018
  if (typeof document > "u")
1019
1019
  return null;
1020
1020
  var r = Array.isArray(e) ? e[0] : e;
1021
1021
  return r.ownerDocument.body;
1022
- }, K = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {}, Oe = 0, Yr = function(e) {
1022
+ }, Z = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {}, Oe = 0, Yr = function(e) {
1023
1023
  return e && (e.host || Yr(e.parentNode));
1024
- }, eo = function(e, r) {
1024
+ }, ro = function(e, r) {
1025
1025
  return r.map(function(t) {
1026
1026
  if (e.contains(t))
1027
1027
  return t;
@@ -1030,39 +1030,39 @@ var Jn = function(e) {
1030
1030
  }).filter(function(t) {
1031
1031
  return !!t;
1032
1032
  });
1033
- }, ro = function(e, r, t, o) {
1034
- var a = eo(r, Array.isArray(e) ? e : [e]);
1033
+ }, to = function(e, r, t, o) {
1034
+ var a = ro(r, Array.isArray(e) ? e : [e]);
1035
1035
  pe[t] || (pe[t] = /* @__PURE__ */ new WeakMap());
1036
1036
  var n = pe[t], s = [], i = /* @__PURE__ */ new Set(), u = new Set(a), l = function(p) {
1037
1037
  !p || i.has(p) || (i.add(p), l(p.parentNode));
1038
1038
  };
1039
1039
  a.forEach(l);
1040
1040
  var d = function(p) {
1041
- !p || u.has(p) || Array.prototype.forEach.call(p.children, function(v) {
1042
- if (i.has(v))
1043
- d(v);
1041
+ !p || u.has(p) || Array.prototype.forEach.call(p.children, function(h) {
1042
+ if (i.has(h))
1043
+ d(h);
1044
1044
  else
1045
1045
  try {
1046
- var m = v.getAttribute(o), w = m !== null && m !== "false", h = (K.get(v) || 0) + 1, g = (n.get(v) || 0) + 1;
1047
- K.set(v, h), n.set(v, g), s.push(v), h === 1 && w && fe.set(v, !0), g === 1 && v.setAttribute(t, "true"), w || v.setAttribute(o, "true");
1046
+ var m = h.getAttribute(o), w = m !== null && m !== "false", v = (Z.get(h) || 0) + 1, g = (n.get(h) || 0) + 1;
1047
+ Z.set(h, v), n.set(h, g), s.push(h), v === 1 && w && fe.set(h, !0), g === 1 && h.setAttribute(t, "true"), w || h.setAttribute(o, "true");
1048
1048
  } catch (_) {
1049
- console.error("aria-hidden: cannot operate on ", v, _);
1049
+ console.error("aria-hidden: cannot operate on ", h, _);
1050
1050
  }
1051
1051
  });
1052
1052
  };
1053
1053
  return d(r), i.clear(), Oe++, function() {
1054
1054
  s.forEach(function(p) {
1055
- var v = K.get(p) - 1, m = n.get(p) - 1;
1056
- K.set(p, v), n.set(p, m), v || (fe.has(p) || p.removeAttribute(o), fe.delete(p)), m || p.removeAttribute(t);
1057
- }), Oe--, Oe || (K = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {});
1055
+ var h = Z.get(p) - 1, m = n.get(p) - 1;
1056
+ Z.set(p, h), n.set(p, m), h || (fe.has(p) || p.removeAttribute(o), fe.delete(p)), m || p.removeAttribute(t);
1057
+ }), Oe--, Oe || (Z = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {});
1058
1058
  };
1059
- }, to = function(e, r, t) {
1059
+ }, no = function(e, r, t) {
1060
1060
  t === void 0 && (t = "data-aria-hidden");
1061
- var o = Array.from(Array.isArray(e) ? e : [e]), a = Jn(e);
1062
- return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), ro(o, a, t, "aria-hidden")) : function() {
1061
+ var o = Array.from(Array.isArray(e) ? e : [e]), a = eo(e);
1062
+ return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), to(o, a, t, "aria-hidden")) : function() {
1063
1063
  return null;
1064
1064
  };
1065
- }, Ye = "Dialog", [qr, Ga] = Tr(Ye), [no, M] = qr(Ye), Xr = (e) => {
1065
+ }, Ve = "Dialog", [Xr, Za] = Or(Ve), [oo, I] = Xr(Ve), Gr = (e) => {
1066
1066
  const {
1067
1067
  __scopeDialog: r,
1068
1068
  children: t,
@@ -1076,7 +1076,7 @@ var Jn = function(e) {
1076
1076
  onChange: n
1077
1077
  });
1078
1078
  return /* @__PURE__ */ f(
1079
- no,
1079
+ oo,
1080
1080
  {
1081
1081
  scope: r,
1082
1082
  triggerRef: i,
@@ -1092,10 +1092,10 @@ var Jn = function(e) {
1092
1092
  }
1093
1093
  );
1094
1094
  };
1095
- Xr.displayName = Ye;
1096
- var Gr = "DialogTrigger", Kr = c.forwardRef(
1095
+ Gr.displayName = Ve;
1096
+ var Kr = "DialogTrigger", Zr = c.forwardRef(
1097
1097
  (e, r) => {
1098
- const { __scopeDialog: t, ...o } = e, a = M(Gr, t), n = L(r, a.triggerRef);
1098
+ const { __scopeDialog: t, ...o } = e, a = I(Kr, t), n = L(r, a.triggerRef);
1099
1099
  return /* @__PURE__ */ f(
1100
1100
  O.button,
1101
1101
  {
@@ -1106,33 +1106,33 @@ var Gr = "DialogTrigger", Kr = c.forwardRef(
1106
1106
  "data-state": Ge(a.open),
1107
1107
  ...o,
1108
1108
  ref: n,
1109
- onClick: x(e.onClick, a.onOpenToggle)
1109
+ onClick: R(e.onClick, a.onOpenToggle)
1110
1110
  }
1111
1111
  );
1112
1112
  }
1113
1113
  );
1114
- Kr.displayName = Gr;
1115
- var qe = "DialogPortal", [oo, Zr] = qr(qe, {
1114
+ Zr.displayName = Kr;
1115
+ var Ye = "DialogPortal", [ao, Qr] = Xr(Ye, {
1116
1116
  forceMount: void 0
1117
- }), Qr = (e) => {
1118
- const { __scopeDialog: r, forceMount: t, children: o, container: a } = e, n = M(qe, r);
1119
- return /* @__PURE__ */ f(oo, { scope: r, forceMount: t, children: c.Children.map(o, (s) => /* @__PURE__ */ f(z, { present: t || n.open, children: /* @__PURE__ */ f(Wr, { asChild: !0, container: a, children: s }) })) });
1117
+ }), Jr = (e) => {
1118
+ const { __scopeDialog: r, forceMount: t, children: o, container: a } = e, n = I(Ye, r);
1119
+ return /* @__PURE__ */ f(ao, { scope: r, forceMount: t, children: c.Children.map(o, (s) => /* @__PURE__ */ f(j, { present: t || n.open, children: /* @__PURE__ */ f(Wr, { asChild: !0, container: a, children: s }) })) });
1120
1120
  };
1121
- Qr.displayName = qe;
1122
- var we = "DialogOverlay", Jr = c.forwardRef(
1121
+ Jr.displayName = Ye;
1122
+ var we = "DialogOverlay", et = c.forwardRef(
1123
1123
  (e, r) => {
1124
- const t = Zr(we, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = M(we, e.__scopeDialog);
1125
- return n.modal ? /* @__PURE__ */ f(z, { present: o || n.open, children: /* @__PURE__ */ f(ao, { ...a, ref: r }) }) : null;
1124
+ const t = Qr(we, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = I(we, e.__scopeDialog);
1125
+ return n.modal ? /* @__PURE__ */ f(j, { present: o || n.open, children: /* @__PURE__ */ f(io, { ...a, ref: r }) }) : null;
1126
1126
  }
1127
1127
  );
1128
- Jr.displayName = we;
1129
- var ao = c.forwardRef(
1128
+ et.displayName = we;
1129
+ var io = c.forwardRef(
1130
1130
  (e, r) => {
1131
- const { __scopeDialog: t, ...o } = e, a = M(we, t);
1131
+ const { __scopeDialog: t, ...o } = e, a = I(we, t);
1132
1132
  return (
1133
1133
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1134
1134
  // ie. when `Overlay` and `Content` are siblings
1135
- /* @__PURE__ */ f(Vr, { as: Ve, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ f(
1135
+ /* @__PURE__ */ f(Vr, { as: ze, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ f(
1136
1136
  O.div,
1137
1137
  {
1138
1138
  "data-state": Ge(a.open),
@@ -1143,46 +1143,46 @@ var ao = c.forwardRef(
1143
1143
  ) })
1144
1144
  );
1145
1145
  }
1146
- ), Y = "DialogContent", et = c.forwardRef(
1146
+ ), Y = "DialogContent", rt = c.forwardRef(
1147
1147
  (e, r) => {
1148
- const t = Zr(Y, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = M(Y, e.__scopeDialog);
1149
- return /* @__PURE__ */ f(z, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(io, { ...a, ref: r }) : /* @__PURE__ */ f(so, { ...a, ref: r }) });
1148
+ const t = Qr(Y, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = I(Y, e.__scopeDialog);
1149
+ return /* @__PURE__ */ f(j, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(so, { ...a, ref: r }) : /* @__PURE__ */ f(co, { ...a, ref: r }) });
1150
1150
  }
1151
1151
  );
1152
- et.displayName = Y;
1153
- var io = c.forwardRef(
1152
+ rt.displayName = Y;
1153
+ var so = c.forwardRef(
1154
1154
  (e, r) => {
1155
- const t = M(Y, e.__scopeDialog), o = c.useRef(null), a = L(r, t.contentRef, o);
1155
+ const t = I(Y, e.__scopeDialog), o = c.useRef(null), a = L(r, t.contentRef, o);
1156
1156
  return c.useEffect(() => {
1157
1157
  const n = o.current;
1158
- if (n) return to(n);
1158
+ if (n) return no(n);
1159
1159
  }, []), /* @__PURE__ */ f(
1160
- rt,
1160
+ tt,
1161
1161
  {
1162
1162
  ...e,
1163
1163
  ref: a,
1164
1164
  trapFocus: t.open,
1165
1165
  disableOutsidePointerEvents: !0,
1166
- onCloseAutoFocus: x(e.onCloseAutoFocus, (n) => {
1166
+ onCloseAutoFocus: R(e.onCloseAutoFocus, (n) => {
1167
1167
  var s;
1168
1168
  n.preventDefault(), (s = t.triggerRef.current) == null || s.focus();
1169
1169
  }),
1170
- onPointerDownOutside: x(e.onPointerDownOutside, (n) => {
1170
+ onPointerDownOutside: R(e.onPointerDownOutside, (n) => {
1171
1171
  const s = n.detail.originalEvent, i = s.button === 0 && s.ctrlKey === !0;
1172
1172
  (s.button === 2 || i) && n.preventDefault();
1173
1173
  }),
1174
- onFocusOutside: x(
1174
+ onFocusOutside: R(
1175
1175
  e.onFocusOutside,
1176
1176
  (n) => n.preventDefault()
1177
1177
  )
1178
1178
  }
1179
1179
  );
1180
1180
  }
1181
- ), so = c.forwardRef(
1181
+ ), co = c.forwardRef(
1182
1182
  (e, r) => {
1183
- const t = M(Y, e.__scopeDialog), o = c.useRef(!1), a = c.useRef(!1);
1183
+ const t = I(Y, e.__scopeDialog), o = c.useRef(!1), a = c.useRef(!1);
1184
1184
  return /* @__PURE__ */ f(
1185
- rt,
1185
+ tt,
1186
1186
  {
1187
1187
  ...e,
1188
1188
  ref: r,
@@ -1201,12 +1201,12 @@ var io = c.forwardRef(
1201
1201
  }
1202
1202
  );
1203
1203
  }
1204
- ), rt = c.forwardRef(
1204
+ ), tt = c.forwardRef(
1205
1205
  (e, r) => {
1206
- const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i = M(Y, t), u = c.useRef(null), l = L(r, u);
1207
- return mn(), /* @__PURE__ */ D(B, { children: [
1206
+ const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i = I(Y, t), u = c.useRef(null), l = L(r, u);
1207
+ return gn(), /* @__PURE__ */ D(H, { children: [
1208
1208
  /* @__PURE__ */ f(
1209
- Mr,
1209
+ Ir,
1210
1210
  {
1211
1211
  asChild: !0,
1212
1212
  loop: !0,
@@ -1214,7 +1214,7 @@ var io = c.forwardRef(
1214
1214
  onMountAutoFocus: a,
1215
1215
  onUnmountAutoFocus: n,
1216
1216
  children: /* @__PURE__ */ f(
1217
- Lr,
1217
+ $r,
1218
1218
  {
1219
1219
  role: "dialog",
1220
1220
  id: i.contentId,
@@ -1228,50 +1228,50 @@ var io = c.forwardRef(
1228
1228
  )
1229
1229
  }
1230
1230
  ),
1231
- /* @__PURE__ */ D(B, { children: [
1232
- /* @__PURE__ */ f(co, { titleId: i.titleId }),
1233
- /* @__PURE__ */ f(uo, { contentRef: u, descriptionId: i.descriptionId })
1231
+ /* @__PURE__ */ D(H, { children: [
1232
+ /* @__PURE__ */ f(lo, { titleId: i.titleId }),
1233
+ /* @__PURE__ */ f(fo, { contentRef: u, descriptionId: i.descriptionId })
1234
1234
  ] })
1235
1235
  ] });
1236
1236
  }
1237
- ), Xe = "DialogTitle", tt = c.forwardRef(
1237
+ ), Xe = "DialogTitle", nt = c.forwardRef(
1238
1238
  (e, r) => {
1239
- const { __scopeDialog: t, ...o } = e, a = M(Xe, t);
1239
+ const { __scopeDialog: t, ...o } = e, a = I(Xe, t);
1240
1240
  return /* @__PURE__ */ f(O.h2, { id: a.titleId, ...o, ref: r });
1241
1241
  }
1242
1242
  );
1243
- tt.displayName = Xe;
1244
- var nt = "DialogDescription", ot = c.forwardRef(
1243
+ nt.displayName = Xe;
1244
+ var ot = "DialogDescription", at = c.forwardRef(
1245
1245
  (e, r) => {
1246
- const { __scopeDialog: t, ...o } = e, a = M(nt, t);
1246
+ const { __scopeDialog: t, ...o } = e, a = I(ot, t);
1247
1247
  return /* @__PURE__ */ f(O.p, { id: a.descriptionId, ...o, ref: r });
1248
1248
  }
1249
1249
  );
1250
- ot.displayName = nt;
1251
- var at = "DialogClose", it = c.forwardRef(
1250
+ at.displayName = ot;
1251
+ var it = "DialogClose", st = c.forwardRef(
1252
1252
  (e, r) => {
1253
- const { __scopeDialog: t, ...o } = e, a = M(at, t);
1253
+ const { __scopeDialog: t, ...o } = e, a = I(it, t);
1254
1254
  return /* @__PURE__ */ f(
1255
1255
  O.button,
1256
1256
  {
1257
1257
  type: "button",
1258
1258
  ...o,
1259
1259
  ref: r,
1260
- onClick: x(e.onClick, () => a.onOpenChange(!1))
1260
+ onClick: R(e.onClick, () => a.onOpenChange(!1))
1261
1261
  }
1262
1262
  );
1263
1263
  }
1264
1264
  );
1265
- it.displayName = at;
1265
+ st.displayName = it;
1266
1266
  function Ge(e) {
1267
1267
  return e ? "open" : "closed";
1268
1268
  }
1269
- var st = "DialogTitleWarning", [Ka, ct] = Ft(st, {
1269
+ var ct = "DialogTitleWarning", [Qa, lt] = Ft(ct, {
1270
1270
  contentName: Y,
1271
1271
  titleName: Xe,
1272
1272
  docsSlug: "dialog"
1273
- }), co = ({ titleId: e }) => {
1274
- const r = ct(st), t = `\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
1273
+ }), lo = ({ titleId: e }) => {
1274
+ const r = lt(ct), t = `\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
1275
1275
 
1276
1276
  If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
1277
1277
 
@@ -1279,15 +1279,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${r.do
1279
1279
  return c.useEffect(() => {
1280
1280
  e && (document.getElementById(e) || console.error(t));
1281
1281
  }, [t, e]), null;
1282
- }, lo = "DialogDescriptionWarning", uo = ({ contentRef: e, descriptionId: r }) => {
1283
- const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ct(lo).contentName}}.`;
1282
+ }, uo = "DialogDescriptionWarning", fo = ({ contentRef: e, descriptionId: r }) => {
1283
+ const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lt(uo).contentName}}.`;
1284
1284
  return c.useEffect(() => {
1285
1285
  var n;
1286
1286
  const a = (n = e.current) == null ? void 0 : n.getAttribute("aria-describedby");
1287
1287
  r && a && (document.getElementById(r) || console.warn(o));
1288
1288
  }, [o, e, r]), null;
1289
- }, fo = Xr, po = Kr, vo = Qr, ho = Jr, mo = et, ve = tt, go = ot, _o = it;
1290
- function wo(e) {
1289
+ }, po = Gr, ho = Zr, vo = Jr, mo = et, go = rt, he = nt, _o = at, wo = st;
1290
+ function bo(e) {
1291
1291
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1292
1292
  }
1293
1293
  var Le = { exports: {} };
@@ -1296,9 +1296,9 @@ var Le = { exports: {} };
1296
1296
  Licensed under the MIT License (MIT), see
1297
1297
  http://jedwatson.github.io/classnames
1298
1298
  */
1299
- var hr;
1300
- function bo() {
1301
- return hr || (hr = 1, function(e) {
1299
+ var mr;
1300
+ function yo() {
1301
+ return mr || (mr = 1, function(e) {
1302
1302
  (function() {
1303
1303
  var r = {}.hasOwnProperty;
1304
1304
  function t() {
@@ -1329,24 +1329,27 @@ function bo() {
1329
1329
  })();
1330
1330
  }(Le)), Le.exports;
1331
1331
  }
1332
- var yo = bo();
1333
- const q = /* @__PURE__ */ wo(yo), lt = Ot(null), So = {}, Eo = "_drawerSmallScreenAnimation_5mlbf_1", Co = "_drawerLargeScreenAnimation_5mlbf_1", Po = "_slideDown_5mlbf_1", No = "_overlayAnimation_5mlbf_1", Ao = {
1334
- "purpur-drawer-content": "_purpur-drawer-content_5mlbf_1",
1335
- drawerSmallScreenAnimation: Eo,
1336
- "purpur-drawer-content--fit-to-content": "_purpur-drawer-content--fit-to-content_5mlbf_16",
1337
- drawerLargeScreenAnimation: Co,
1338
- "purpur-drawer-content__content-container": "_purpur-drawer-content__content-container_5mlbf_43",
1339
- "purpur-drawer-content__drawer-frame": "_purpur-drawer-content__drawer-frame_5mlbf_48",
1340
- slideDown: Po,
1341
- "purpur-drawer-content__description": "_purpur-drawer-content__description_5mlbf_58",
1342
- "purpur-drawer-overlay": "_purpur-drawer-overlay_5mlbf_69",
1332
+ var So = yo();
1333
+ const X = /* @__PURE__ */ bo(So), ut = Lt(null), Eo = {}, Co = "_drawerSmallScreenAnimation_khfax_1", Po = "_drawerLargeScreenAnimationRight_khfax_1", xo = "_drawerLargeScreenAnimationLeft_khfax_1", Ao = "_slideDown_khfax_1", No = "_overlayAnimation_khfax_1", Ro = {
1334
+ "purpur-drawer-content": "_purpur-drawer-content_khfax_1",
1335
+ drawerSmallScreenAnimation: Co,
1336
+ "purpur-drawer-content--left": "_purpur-drawer-content--left_khfax_15",
1337
+ "purpur-drawer-content--right": "_purpur-drawer-content--right_khfax_18",
1338
+ "purpur-drawer-content--fit-to-content": "_purpur-drawer-content--fit-to-content_khfax_21",
1339
+ drawerLargeScreenAnimationRight: Po,
1340
+ drawerLargeScreenAnimationLeft: xo,
1341
+ "purpur-drawer-content__content-container": "_purpur-drawer-content__content-container_khfax_51",
1342
+ "purpur-drawer-content__drawer-frame": "_purpur-drawer-content__drawer-frame_khfax_56",
1343
+ slideDown: Ao,
1344
+ "purpur-drawer-content__description": "_purpur-drawer-content__description_khfax_66",
1345
+ "purpur-drawer-overlay": "_purpur-drawer-overlay_khfax_77",
1343
1346
  overlayAnimation: No
1344
- }, Ro = {
1347
+ }, Do = {
1345
1348
  "purpur-drawer-container--header": "_purpur-drawer-container--header_1u45h_1",
1346
1349
  "purpur-drawer-container--body": "_purpur-drawer-container--body_1u45h_10",
1347
1350
  "purpur-drawer-container--sticky": "_purpur-drawer-container--sticky_1u45h_18",
1348
1351
  "purpur-drawer-container--footer": "_purpur-drawer-container--footer_1u45h_26"
1349
- }, xo = q.bind(Ro), $e = "purpur-drawer-container", ee = j(
1352
+ }, To = X.bind(Do), $e = "purpur-drawer-container", re = B(
1350
1353
  ({
1351
1354
  ["data-testid"]: e = "purpur-drawer-container",
1352
1355
  children: r,
@@ -1355,7 +1358,7 @@ const q = /* @__PURE__ */ wo(yo), lt = Ot(null), So = {}, Eo = "_drawerSmallScre
1355
1358
  stickyFooter: a,
1356
1359
  ...n
1357
1360
  }, s) => {
1358
- const i = xo([
1361
+ const i = To([
1359
1362
  t,
1360
1363
  $e,
1361
1364
  {
@@ -1368,38 +1371,40 @@ const q = /* @__PURE__ */ wo(yo), lt = Ot(null), So = {}, Eo = "_drawerSmallScre
1368
1371
  return /* @__PURE__ */ f("div", { className: i, "data-testid": e, ref: s, ...n, children: r });
1369
1372
  }
1370
1373
  );
1371
- ee.displayName = "DrawerContainer";
1372
- const Do = {
1373
- "purpur-drawer-frame": "_purpur-drawer-frame_1gdvv_1",
1374
- "purpur-drawer-frame--sticky-footer": "_purpur-drawer-frame--sticky-footer_1gdvv_17",
1375
- "purpur-drawer-frame__header": "_purpur-drawer-frame__header_1gdvv_20",
1376
- "purpur-drawer-frame__body": "_purpur-drawer-frame__body_1gdvv_23",
1377
- "purpur-drawer-frame--fit-to-content": "_purpur-drawer-frame--fit-to-content_1gdvv_27",
1378
- "purpur-drawer-frame__footer": "_purpur-drawer-frame__footer_1gdvv_36",
1379
- "purpur-drawer-frame__content-container": "_purpur-drawer-frame__content-container_1gdvv_39",
1380
- "purpur-drawer-frame__content-container--no-footer": "_purpur-drawer-frame__content-container--no-footer_1gdvv_44"
1381
- }, To = {
1374
+ re.displayName = "DrawerContainer";
1375
+ const Oo = {
1376
+ "purpur-drawer-frame": "_purpur-drawer-frame_1s8hq_1",
1377
+ "purpur-drawer-frame--left": "_purpur-drawer-frame--left_1s8hq_12",
1378
+ "purpur-drawer-frame--right": "_purpur-drawer-frame--right_1s8hq_16",
1379
+ "purpur-drawer-frame--sticky-footer": "_purpur-drawer-frame--sticky-footer_1s8hq_21",
1380
+ "purpur-drawer-frame__header": "_purpur-drawer-frame__header_1s8hq_24",
1381
+ "purpur-drawer-frame__body": "_purpur-drawer-frame__body_1s8hq_27",
1382
+ "purpur-drawer-frame--fit-to-content": "_purpur-drawer-frame--fit-to-content_1s8hq_31",
1383
+ "purpur-drawer-frame__footer": "_purpur-drawer-frame__footer_1s8hq_40",
1384
+ "purpur-drawer-frame__content-container": "_purpur-drawer-frame__content-container_1s8hq_43",
1385
+ "purpur-drawer-frame__content-container--no-footer": "_purpur-drawer-frame__content-container--no-footer_1s8hq_48"
1386
+ }, Lo = {
1382
1387
  "purpur-drawer-handle": "_purpur-drawer-handle_3n0ew_1"
1383
- }, Oo = (e, r, t, o, a, n) => ({
1388
+ }, $o = (e, r, t, o, a, n) => ({
1384
1389
  onPointerDown: (l) => {
1385
1390
  e.current = { y: l.clientY };
1386
1391
  },
1387
1392
  onPointerMove: (l) => {
1388
1393
  if (!e.current)
1389
1394
  return;
1390
- const d = l.clientY - e.current.y, p = !!r.current, v = Math.max(0, d), m = l.pointerType === "touch" ? 10 : 2, w = { y: v }, h = { originalEvent: l, delta: w };
1391
- p ? (r.current = w, o(h)) : mr(w, 0) ? (r.current = w, t(), l.target.setPointerCapture(l.pointerId)) : Math.abs(d) > m && (e.current = null);
1395
+ const d = l.clientY - e.current.y, p = !!r.current, h = Math.max(0, d), m = l.pointerType === "touch" ? 10 : 2, w = { y: h }, v = { originalEvent: l, delta: w };
1396
+ p ? (r.current = w, o(v)) : gr(w, 0) ? (r.current = w, t(), l.target.setPointerCapture(l.pointerId)) : Math.abs(d) > m && (e.current = null);
1392
1397
  },
1393
1398
  onPointerUp: (l) => {
1394
1399
  const d = r.current, p = l.target;
1395
1400
  if (p.hasPointerCapture(l.pointerId) && p.releasePointerCapture(l.pointerId), r.current = null, e.current = null, d) {
1396
- const v = l.currentTarget, m = { originalEvent: l, delta: d };
1397
- mr(d, 0) && d.y > 200 ? n(m) : a(), v.addEventListener("click", (w) => w.preventDefault(), {
1401
+ const h = l.currentTarget, m = { originalEvent: l, delta: d };
1402
+ gr(d, 0) && d.y > 200 ? n(m) : a(), h.addEventListener("click", (w) => w.preventDefault(), {
1398
1403
  once: !0
1399
1404
  });
1400
1405
  }
1401
1406
  }
1402
- }), mr = (e, r = 0) => Math.abs(e.y) > r, Lo = q.bind(To), $o = "purpur-drawer-handle", ut = j(
1407
+ }), gr = (e, r = 0) => Math.abs(e.y) > r, Mo = X.bind(Lo), Io = "purpur-drawer-handle", dt = B(
1403
1408
  ({
1404
1409
  ["data-testid"]: e = "purpur-drawer-handle",
1405
1410
  className: r,
@@ -1409,7 +1414,7 @@ const Do = {
1409
1414
  onSwipeEnd: n,
1410
1415
  ...s
1411
1416
  }, i) => {
1412
- const u = Lo([r, $o]), l = Ie.useRef(null), d = Ie.useRef(null), { onPointerDown: p, onPointerMove: v, onPointerUp: m } = Oo(
1417
+ const u = Mo([r, Io]), l = Ie.useRef(null), d = Ie.useRef(null), { onPointerDown: p, onPointerMove: h, onPointerUp: m } = $o(
1413
1418
  d,
1414
1419
  l,
1415
1420
  t,
@@ -1423,7 +1428,7 @@ const Do = {
1423
1428
  className: u,
1424
1429
  "data-testid": e,
1425
1430
  onPointerDown: p,
1426
- onPointerMove: v,
1431
+ onPointerMove: h,
1427
1432
  onPointerUp: m,
1428
1433
  ref: i,
1429
1434
  ...s
@@ -1431,22 +1436,22 @@ const Do = {
1431
1436
  );
1432
1437
  }
1433
1438
  );
1434
- ut.displayName = "DrawerHandle";
1435
- const Mo = {
1439
+ dt.displayName = "DrawerHandle";
1440
+ const ko = {
1436
1441
  LG: "lg"
1437
1442
  };
1438
- function Io(e) {
1443
+ function Wo(e) {
1439
1444
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1440
1445
  }
1441
- var gr = { exports: {} };
1446
+ var _r = { exports: {} };
1442
1447
  /*!
1443
1448
  Copyright (c) 2018 Jed Watson.
1444
1449
  Licensed under the MIT License (MIT), see
1445
1450
  http://jedwatson.github.io/classnames
1446
1451
  */
1447
- var _r;
1448
- function Wo() {
1449
- return _r || (_r = 1, function(e) {
1452
+ var wr;
1453
+ function Fo() {
1454
+ return wr || (wr = 1, function(e) {
1450
1455
  (function() {
1451
1456
  var r = {}.hasOwnProperty;
1452
1457
  function t() {
@@ -1475,32 +1480,32 @@ function Wo() {
1475
1480
  }
1476
1481
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1477
1482
  })();
1478
- }(gr)), gr.exports;
1483
+ }(_r)), _r.exports;
1479
1484
  }
1480
- var Fo = Wo();
1481
- const ko = /* @__PURE__ */ Io(Fo), Uo = "_rotate_12t9p_1", Ho = "_dash_12t9p_1", Bo = {
1485
+ var Uo = Fo();
1486
+ const qo = /* @__PURE__ */ Wo(Uo), Ho = "_rotate_12t9p_1", Bo = "_dash_12t9p_1", jo = {
1482
1487
  "purpur-spinner": "_purpur-spinner_12t9p_2",
1483
- rotate: Uo,
1488
+ rotate: Ho,
1484
1489
  "purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
1485
1490
  "purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
1486
1491
  "purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
1487
1492
  "purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
1488
1493
  "purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
1489
1494
  "purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
1490
- dash: Ho,
1495
+ dash: Bo,
1491
1496
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
1492
1497
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
1493
- }, wr = ko.bind(Bo), oe = "purpur-spinner", jo = {
1498
+ }, br = qo.bind(jo), oe = "purpur-spinner", zo = {
1494
1499
  SM: "sm"
1495
- }, zo = ({
1500
+ }, Vo = ({
1496
1501
  disabled: e = !1,
1497
1502
  negative: r = !1,
1498
- size: t = jo.SM,
1503
+ size: t = zo.SM,
1499
1504
  ...o
1500
- }) => /* @__PURE__ */ f("div", { className: wr(oe, `${oe}--${t}`), ...o, children: /* @__PURE__ */ f("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ f(
1505
+ }) => /* @__PURE__ */ f("div", { className: br(oe, `${oe}--${t}`), ...o, children: /* @__PURE__ */ f("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ f(
1501
1506
  "circle",
1502
1507
  {
1503
- className: wr(`${oe}__circle`, {
1508
+ className: br(`${oe}__circle`, {
1504
1509
  [`${oe}__circle--disabled`]: e,
1505
1510
  [`${oe}__circle--negative`]: r
1506
1511
  }),
@@ -1509,18 +1514,18 @@ const ko = /* @__PURE__ */ Io(Fo), Uo = "_rotate_12t9p_1", Ho = "_dash_12t9p_1",
1509
1514
  r: "20"
1510
1515
  }
1511
1516
  ) }) });
1512
- function Vo(e) {
1517
+ function Yo(e) {
1513
1518
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1514
1519
  }
1515
- var br = { exports: {} };
1520
+ var yr = { exports: {} };
1516
1521
  /*!
1517
1522
  Copyright (c) 2018 Jed Watson.
1518
1523
  Licensed under the MIT License (MIT), see
1519
1524
  http://jedwatson.github.io/classnames
1520
1525
  */
1521
- var yr;
1522
- function Yo() {
1523
- return yr || (yr = 1, function(e) {
1526
+ var Sr;
1527
+ function Xo() {
1528
+ return Sr || (Sr = 1, function(e) {
1524
1529
  (function() {
1525
1530
  var r = {}.hasOwnProperty;
1526
1531
  function t() {
@@ -1549,10 +1554,10 @@ function Yo() {
1549
1554
  }
1550
1555
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1551
1556
  })();
1552
- }(br)), br.exports;
1557
+ }(yr)), yr.exports;
1553
1558
  }
1554
- var qo = Yo();
1555
- const Xo = /* @__PURE__ */ Vo(qo), Go = {
1559
+ var Go = Xo();
1560
+ const Ko = /* @__PURE__ */ Yo(Go), Zo = {
1556
1561
  "purpur-button": "_purpur-button_w455q_1",
1557
1562
  "purpur-button--xs": "_purpur-button--xs_w455q_33",
1558
1563
  "purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
@@ -1577,7 +1582,7 @@ const Xo = /* @__PURE__ */ Vo(qo), Go = {
1577
1582
  }, Me = {
1578
1583
  TERTIARY_PURPLE: "tertiary-purple",
1579
1584
  TEXT: "text"
1580
- }, Ko = Xo.bind(Go), V = "purpur-button", Ue = j(
1585
+ }, Qo = Ko.bind(Zo), z = "purpur-button", Ue = B(
1581
1586
  ({
1582
1587
  children: e,
1583
1588
  className: r,
@@ -1591,41 +1596,41 @@ const Xo = /* @__PURE__ */ Vo(qo), Go = {
1591
1596
  variant: l,
1592
1597
  type: d = "button",
1593
1598
  ...p
1594
- }, v) => {
1599
+ }, h) => {
1595
1600
  if (a && l === "destructive")
1596
1601
  return null;
1597
- const m = Ko(
1602
+ const m = Qo(
1598
1603
  [
1599
- V,
1600
- `${V}--${s ? `${l}-negative` : l}`,
1601
- `${V}--${u}`
1604
+ z,
1605
+ `${z}--${s ? `${l}-negative` : l}`,
1606
+ `${z}--${u}`
1602
1607
  ],
1603
1608
  {
1604
- [`${V}--icon-only`]: a,
1605
- [`${V}--negative`]: s,
1606
- [`${V}--full-width`]: o,
1607
- [`${V}--disabled`]: t || n
1609
+ [`${z}--icon-only`]: a,
1610
+ [`${z}--negative`]: s,
1611
+ [`${z}--full-width`]: o,
1612
+ [`${z}--disabled`]: t || n
1608
1613
  },
1609
1614
  r
1610
1615
  ), w = (g) => {
1611
1616
  t || n ? g.preventDefault() : i && i(g);
1612
- }, h = !!p["aria-disabled"] || t || n;
1617
+ }, v = !!p["aria-disabled"] || t || n;
1613
1618
  return /* @__PURE__ */ D(
1614
1619
  "button",
1615
1620
  {
1616
1621
  className: m,
1617
1622
  type: d,
1618
- ref: v,
1619
- "aria-disabled": h,
1623
+ ref: h,
1624
+ "aria-disabled": v,
1620
1625
  onClick: w,
1621
1626
  ...p,
1622
1627
  children: [
1623
1628
  n && /* @__PURE__ */ f(
1624
- zo,
1629
+ Vo,
1625
1630
  {
1626
- size: u === Mo.LG ? "xs" : "xxs",
1631
+ size: u === ko.LG ? "xs" : "xxs",
1627
1632
  negative: s,
1628
- disabled: h
1633
+ disabled: v
1629
1634
  }
1630
1635
  ),
1631
1636
  " ",
@@ -1636,18 +1641,18 @@ const Xo = /* @__PURE__ */ Vo(qo), Go = {
1636
1641
  }
1637
1642
  );
1638
1643
  Ue.displayName = "Button";
1639
- function Zo(e) {
1644
+ function Jo(e) {
1640
1645
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1641
1646
  }
1642
- var Sr = { exports: {} };
1647
+ var Er = { exports: {} };
1643
1648
  /*!
1644
1649
  Copyright (c) 2018 Jed Watson.
1645
1650
  Licensed under the MIT License (MIT), see
1646
1651
  http://jedwatson.github.io/classnames
1647
1652
  */
1648
- var Er;
1649
- function Qo() {
1650
- return Er || (Er = 1, function(e) {
1653
+ var Cr;
1654
+ function ea() {
1655
+ return Cr || (Cr = 1, function(e) {
1651
1656
  (function() {
1652
1657
  var r = {}.hasOwnProperty;
1653
1658
  function t() {
@@ -1676,10 +1681,10 @@ function Qo() {
1676
1681
  }
1677
1682
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1678
1683
  })();
1679
- }(Sr)), Sr.exports;
1684
+ }(Er)), Er.exports;
1680
1685
  }
1681
- var Jo = Qo();
1682
- const ea = /* @__PURE__ */ Zo(Jo), he = {
1686
+ var ra = ea();
1687
+ const ta = /* @__PURE__ */ Jo(ra), ve = {
1683
1688
  "purpur-heading": "_purpur-heading_vo751_1",
1684
1689
  "purpur-heading--hyphens": "_purpur-heading--hyphens_vo751_8",
1685
1690
  "purpur-heading--negative": "_purpur-heading--negative_vo751_11",
@@ -1699,42 +1704,42 @@ const ea = /* @__PURE__ */ Zo(Jo), he = {
1699
1704
  "purpur-heading--display-50": "_purpur-heading--display-50_vo751_92",
1700
1705
  "purpur-heading--display-100": "_purpur-heading--display-100_vo751_98",
1701
1706
  "purpur-heading--display-200": "_purpur-heading--display-200_vo751_104"
1702
- }, He = {
1707
+ }, qe = {
1703
1708
  TITLE100: "title-100",
1704
1709
  TITLE200: "title-200"
1705
- }, me = "purpur-heading", Be = ({
1710
+ }, me = "purpur-heading", He = ({
1706
1711
  children: e,
1707
1712
  className: r = "",
1708
1713
  enableHyphenation: t = !1,
1709
1714
  negative: o = !1,
1710
1715
  tag: a,
1711
- variant: n = He.TITLE100,
1716
+ variant: n = qe.TITLE100,
1712
1717
  ...s
1713
1718
  }) => {
1714
- const i = a, u = ea([
1719
+ const i = a, u = ta([
1715
1720
  r,
1716
- he[me],
1717
- he[`${me}--${n}`],
1721
+ ve[me],
1722
+ ve[`${me}--${n}`],
1718
1723
  {
1719
- [he[`${me}--hyphens`]]: t,
1720
- [he[`${me}--negative`]]: o
1724
+ [ve[`${me}--hyphens`]]: t,
1725
+ [ve[`${me}--negative`]]: o
1721
1726
  }
1722
1727
  ]);
1723
1728
  return /* @__PURE__ */ f(i, { className: u, ...s, children: e });
1724
1729
  };
1725
- Be.displayName = "Heading";
1726
- function ra(e) {
1730
+ He.displayName = "Heading";
1731
+ function na(e) {
1727
1732
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1728
1733
  }
1729
- var Cr = { exports: {} };
1734
+ var Pr = { exports: {} };
1730
1735
  /*!
1731
1736
  Copyright (c) 2018 Jed Watson.
1732
1737
  Licensed under the MIT License (MIT), see
1733
1738
  http://jedwatson.github.io/classnames
1734
1739
  */
1735
- var Pr;
1736
- function ta() {
1737
- return Pr || (Pr = 1, function(e) {
1740
+ var xr;
1741
+ function oa() {
1742
+ return xr || (xr = 1, function(e) {
1738
1743
  (function() {
1739
1744
  var r = {}.hasOwnProperty;
1740
1745
  function t() {
@@ -1763,10 +1768,10 @@ function ta() {
1763
1768
  }
1764
1769
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1765
1770
  })();
1766
- }(Cr)), Cr.exports;
1771
+ }(Pr)), Pr.exports;
1767
1772
  }
1768
- var na = ta();
1769
- const oa = /* @__PURE__ */ ra(na), aa = {
1773
+ var aa = oa();
1774
+ const ia = /* @__PURE__ */ na(aa), sa = {
1770
1775
  "purpur-icon": "_purpur-icon_8u1lq_1",
1771
1776
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
1772
1777
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -1774,80 +1779,80 @@ const oa = /* @__PURE__ */ ra(na), aa = {
1774
1779
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
1775
1780
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
1776
1781
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
1777
- }, ia = oa.bind(aa), Nr = "purpur-icon", sa = "md", ca = (e) => e.filter((r) => Object.keys(r).length >= 1).map((r) => `${r.name}="${r.value}"`).join(" "), la = ({ content: e = "", title: r } = {}) => {
1782
+ }, ca = ia.bind(sa), Ar = "purpur-icon", la = "md", ua = (e) => e.filter((r) => Object.keys(r).length >= 1).map((r) => `${r.name}="${r.value}"`).join(" "), da = ({ content: e = "", title: r } = {}) => {
1778
1783
  const t = [
1779
1784
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
1780
1785
  { name: "fill", value: "currentColor" },
1781
1786
  { name: "viewBox", value: "0 0 24 24" },
1782
1787
  r ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
1783
1788
  ], o = r ? `<title>${r}</title>` : "";
1784
- return `<svg ${ca(t)}>${o}${e}</svg>`;
1785
- }, ua = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Ke = ({ svg: e, allyTitle: r, className: t, size: o = sa, ...a }) => {
1786
- const n = la({
1787
- content: ua(e.svg),
1789
+ return `<svg ${ua(t)}>${o}${e}</svg>`;
1790
+ }, fa = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Ke = ({ svg: e, allyTitle: r, className: t, size: o = la, ...a }) => {
1791
+ const n = da({
1792
+ content: fa(e.svg),
1788
1793
  title: r
1789
- }), s = ia(t, Nr, `${Nr}--${o}`);
1794
+ }), s = ca(t, Ar, `${Ar}--${o}`);
1790
1795
  return /* @__PURE__ */ f("span", { className: s, dangerouslySetInnerHTML: { __html: n }, ...a });
1791
1796
  };
1792
1797
  Ke.displayName = "Icon";
1793
- const da = {
1798
+ const pa = {
1794
1799
  name: "arrow-left",
1795
1800
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M3.1 12a.9.9 0 0 1 .264-.636l5.5-5.5a.9.9 0 0 1 1.272 1.272L6.173 11.1H20a.9.9 0 0 1 0 1.8H6.173l3.963 3.964a.9.9 0 1 1-1.272 1.272l-5.5-5.5A.9.9 0 0 1 3.1 12Z" clip-rule="evenodd"/></svg>',
1796
1801
  keywords: ["arrow-left"],
1797
1802
  category: "utility"
1798
- }, dt = (e) => /* @__PURE__ */ f(Ke, { ...e, svg: da });
1799
- dt.displayName = "IconArrowLeft";
1800
- const fa = {
1803
+ }, ft = (e) => /* @__PURE__ */ f(Ke, { ...e, svg: pa });
1804
+ ft.displayName = "IconArrowLeft";
1805
+ const ha = {
1801
1806
  name: "close",
1802
1807
  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>',
1803
1808
  keywords: ["close"],
1804
1809
  category: "utility"
1805
- }, ft = (e) => /* @__PURE__ */ f(Ke, { ...e, svg: fa });
1806
- ft.displayName = "IconClose";
1807
- function Ar(e, r) {
1810
+ }, pt = (e) => /* @__PURE__ */ f(Ke, { ...e, svg: ha });
1811
+ pt.displayName = "IconClose";
1812
+ function Nr(e, r) {
1808
1813
  if (typeof e == "function")
1809
1814
  return e(r);
1810
1815
  e != null && (e.current = r);
1811
1816
  }
1812
- function pa(...e) {
1817
+ function va(...e) {
1813
1818
  return (r) => {
1814
1819
  let t = !1;
1815
1820
  const o = e.map((a) => {
1816
- const n = Ar(a, r);
1821
+ const n = Nr(a, r);
1817
1822
  return !t && typeof n == "function" && (t = !0), n;
1818
1823
  });
1819
1824
  if (t)
1820
1825
  return () => {
1821
1826
  for (let a = 0; a < o.length; a++) {
1822
1827
  const n = o[a];
1823
- typeof n == "function" ? n() : Ar(e[a], null);
1828
+ typeof n == "function" ? n() : Nr(e[a], null);
1824
1829
  }
1825
1830
  };
1826
1831
  };
1827
1832
  }
1828
- var pt = c.forwardRef((e, r) => {
1829
- const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(ha);
1833
+ var ht = c.forwardRef((e, r) => {
1834
+ const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(ga);
1830
1835
  if (n) {
1831
1836
  const s = n.props.children, i = a.map((u) => u === n ? c.Children.count(s) > 1 ? c.Children.only(null) : c.isValidElement(s) ? s.props.children : null : u);
1832
- return /* @__PURE__ */ f(je, { ...o, ref: r, children: c.isValidElement(s) ? c.cloneElement(s, void 0, i) : null });
1837
+ return /* @__PURE__ */ f(Be, { ...o, ref: r, children: c.isValidElement(s) ? c.cloneElement(s, void 0, i) : null });
1833
1838
  }
1834
- return /* @__PURE__ */ f(je, { ...o, ref: r, children: t });
1839
+ return /* @__PURE__ */ f(Be, { ...o, ref: r, children: t });
1835
1840
  });
1836
- pt.displayName = "Slot";
1837
- var je = c.forwardRef((e, r) => {
1841
+ ht.displayName = "Slot";
1842
+ var Be = c.forwardRef((e, r) => {
1838
1843
  const { children: t, ...o } = e;
1839
1844
  if (c.isValidElement(t)) {
1840
- const a = ga(t), n = ma(o, t.props);
1841
- return t.type !== c.Fragment && (n.ref = r ? pa(r, a) : a), c.cloneElement(t, n);
1845
+ const a = wa(t), n = _a(o, t.props);
1846
+ return t.type !== c.Fragment && (n.ref = r ? va(r, a) : a), c.cloneElement(t, n);
1842
1847
  }
1843
1848
  return c.Children.count(t) > 1 ? c.Children.only(null) : null;
1844
1849
  });
1845
- je.displayName = "SlotClone";
1846
- var va = ({ children: e }) => /* @__PURE__ */ f(B, { children: e });
1847
- function ha(e) {
1848
- return c.isValidElement(e) && e.type === va;
1850
+ Be.displayName = "SlotClone";
1851
+ var ma = ({ children: e }) => /* @__PURE__ */ f(H, { children: e });
1852
+ function ga(e) {
1853
+ return c.isValidElement(e) && e.type === ma;
1849
1854
  }
1850
- function ma(e, r) {
1855
+ function _a(e, r) {
1851
1856
  const t = { ...r };
1852
1857
  for (const o in r) {
1853
1858
  const a = e[o], n = r[o];
@@ -1857,12 +1862,12 @@ function ma(e, r) {
1857
1862
  }
1858
1863
  return { ...e, ...t };
1859
1864
  }
1860
- function ga(e) {
1865
+ function wa(e) {
1861
1866
  var r, t;
1862
1867
  let o = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, a = o && "isReactWarning" in o && o.isReactWarning;
1863
1868
  return a ? e.ref : (o = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, a = o && "isReactWarning" in o && o.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
1864
1869
  }
1865
- var _a = [
1870
+ var ba = [
1866
1871
  "a",
1867
1872
  "button",
1868
1873
  "div",
@@ -1879,15 +1884,15 @@ var _a = [
1879
1884
  "span",
1880
1885
  "svg",
1881
1886
  "ul"
1882
- ], wa = _a.reduce((e, r) => {
1887
+ ], ya = ba.reduce((e, r) => {
1883
1888
  const t = c.forwardRef((o, a) => {
1884
- const { asChild: n, ...s } = o, i = n ? pt : r;
1889
+ const { asChild: n, ...s } = o, i = n ? ht : r;
1885
1890
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(i, { ...s, ref: a });
1886
1891
  });
1887
1892
  return t.displayName = `Primitive.${r}`, { ...e, [r]: t };
1888
- }, {}), ba = "VisuallyHidden", vt = c.forwardRef(
1893
+ }, {}), Sa = "VisuallyHidden", vt = c.forwardRef(
1889
1894
  (e, r) => /* @__PURE__ */ f(
1890
- wa.span,
1895
+ ya.span,
1891
1896
  {
1892
1897
  ...e,
1893
1898
  ref: r,
@@ -1908,16 +1913,16 @@ var _a = [
1908
1913
  }
1909
1914
  )
1910
1915
  );
1911
- vt.displayName = ba;
1912
- var ya = vt;
1913
- const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(ya, { asChild: e, ...t, children: r }), Sa = {
1916
+ vt.displayName = Sa;
1917
+ var Ea = vt;
1918
+ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(Ea, { asChild: e, ...t, children: r }), Ca = {
1914
1919
  "purpur-drawer-header__row": "_purpur-drawer-header__row_1yg5w_1",
1915
1920
  "purpur-drawer-header__row--with-back-button": "_purpur-drawer-header__row--with-back-button_1yg5w_6",
1916
1921
  "purpur-drawer-header__left": "_purpur-drawer-header__left_1yg5w_9",
1917
1922
  "purpur-drawer-header__right": "_purpur-drawer-header__right_1yg5w_12",
1918
1923
  "purpur-drawer-header__close-button": "_purpur-drawer-header__close-button_1yg5w_15",
1919
1924
  "purpur-drawer-header__back-button--only-icon": "_purpur-drawer-header__back-button--only-icon_1yg5w_18"
1920
- }, Z = q.bind(Sa), U = "purpur-drawer-header", ht = j(
1925
+ }, Q = X.bind(Ca), U = "purpur-drawer-header", mt = B(
1921
1926
  ({
1922
1927
  ["data-testid"]: e = "purpur-drawer-header",
1923
1928
  backButton: r,
@@ -1930,12 +1935,12 @@ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(ya, { asChil
1930
1935
  title: u,
1931
1936
  ...l
1932
1937
  }, d) => {
1933
- const p = Z([a, U]);
1938
+ const p = Q([a, U]);
1934
1939
  return /* @__PURE__ */ D("div", { className: p, "data-testid": e, ref: d, ...l, children: [
1935
1940
  /* @__PURE__ */ D(
1936
1941
  "div",
1937
1942
  {
1938
- className: Z([
1943
+ className: Q([
1939
1944
  `${U}__row`,
1940
1945
  {
1941
1946
  [`${U}__row--with-back-button`]: r && t && i
@@ -1943,11 +1948,11 @@ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(ya, { asChil
1943
1948
  ]),
1944
1949
  "data-testid": `${e}-row`,
1945
1950
  children: [
1946
- /* @__PURE__ */ f("div", { className: Z(`${U}__left`), children: r && t && i ? /* @__PURE__ */ D(
1951
+ /* @__PURE__ */ f("div", { className: Q(`${U}__left`), children: r && t && i ? /* @__PURE__ */ D(
1947
1952
  Ue,
1948
1953
  {
1949
1954
  "aria-label": o ? t : "",
1950
- className: Z([
1955
+ className: Q([
1951
1956
  `${U}__back-button`,
1952
1957
  {
1953
1958
  [`${U}__back-button--only-icon`]: o
@@ -1959,66 +1964,66 @@ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(ya, { asChil
1959
1964
  size: "sm",
1960
1965
  variant: o ? Me.TERTIARY_PURPLE : Me.TEXT,
1961
1966
  children: [
1962
- /* @__PURE__ */ f(dt, { size: "sm" }),
1967
+ /* @__PURE__ */ f(ft, { size: "sm" }),
1963
1968
  !o && t
1964
1969
  ]
1965
1970
  }
1966
- ) : s ? /* @__PURE__ */ D(B, { children: [
1971
+ ) : s ? /* @__PURE__ */ D(H, { children: [
1967
1972
  s,
1968
- /* @__PURE__ */ f(Rr, { asChild: !0, children: /* @__PURE__ */ f(ve, { children: u }) })
1969
- ] }) : /* @__PURE__ */ f(ve, { asChild: !0, children: /* @__PURE__ */ f(
1970
- Be,
1973
+ /* @__PURE__ */ f(Rr, { asChild: !0, children: /* @__PURE__ */ f(he, { children: u }) })
1974
+ ] }) : /* @__PURE__ */ f(he, { asChild: !0, children: /* @__PURE__ */ f(
1975
+ He,
1971
1976
  {
1972
1977
  "data-testid": `${e}-title`,
1973
1978
  tag: "h2",
1974
- variant: He.TITLE200,
1979
+ variant: qe.TITLE200,
1975
1980
  tabIndex: -1,
1976
1981
  children: u
1977
1982
  }
1978
1983
  ) }) }),
1979
- /* @__PURE__ */ f("div", { className: Z(`${U}__right`), children: /* @__PURE__ */ f(_o, { asChild: !0, children: /* @__PURE__ */ f(
1984
+ /* @__PURE__ */ f("div", { className: Q(`${U}__right`), children: /* @__PURE__ */ f(wo, { asChild: !0, children: /* @__PURE__ */ f(
1980
1985
  Ue,
1981
1986
  {
1982
1987
  "aria-label": n,
1983
- className: Z(`${U}__close-button`),
1988
+ className: Q(`${U}__close-button`),
1984
1989
  iconOnly: !0,
1985
1990
  size: "sm",
1986
1991
  variant: Me.TERTIARY_PURPLE,
1987
- children: /* @__PURE__ */ f(ft, { size: "sm" })
1992
+ children: /* @__PURE__ */ f(pt, { size: "sm" })
1988
1993
  }
1989
1994
  ) }) })
1990
1995
  ]
1991
1996
  }
1992
1997
  ),
1993
- r && t && i && (s ? /* @__PURE__ */ D(B, { children: [
1998
+ r && t && i && (s ? /* @__PURE__ */ D(H, { children: [
1994
1999
  s,
1995
- /* @__PURE__ */ f(Rr, { asChild: !0, children: /* @__PURE__ */ f(ve, { children: u }) })
1996
- ] }) : /* @__PURE__ */ f(ve, { asChild: !0, children: /* @__PURE__ */ f(
1997
- Be,
2000
+ /* @__PURE__ */ f(Rr, { asChild: !0, children: /* @__PURE__ */ f(he, { children: u }) })
2001
+ ] }) : /* @__PURE__ */ f(he, { asChild: !0, children: /* @__PURE__ */ f(
2002
+ He,
1998
2003
  {
1999
2004
  "data-testid": `${e}-title-with-back-button`,
2000
2005
  tag: "h2",
2001
2006
  tabIndex: -1,
2002
- variant: He.TITLE200,
2007
+ variant: qe.TITLE200,
2003
2008
  children: u
2004
2009
  }
2005
2010
  ) }))
2006
2011
  ] });
2007
2012
  }
2008
2013
  );
2009
- ht.displayName = "DrawerHeader";
2010
- var Ea = c.createContext(void 0);
2011
- function Ca(e) {
2012
- const r = c.useContext(Ea);
2014
+ mt.displayName = "DrawerHeader";
2015
+ var Pa = c.createContext(void 0);
2016
+ function xa(e) {
2017
+ const r = c.useContext(Pa);
2013
2018
  return e || r || "ltr";
2014
2019
  }
2015
- function Pa(e, [r, t]) {
2020
+ function Aa(e, [r, t]) {
2016
2021
  return Math.min(t, Math.max(r, e));
2017
2022
  }
2018
2023
  function Na(e, r) {
2019
2024
  return c.useReducer((t, o) => r[t][o] ?? t, e);
2020
2025
  }
2021
- var Ze = "ScrollArea", [mt, Za] = Tr(Ze), [Aa, $] = mt(Ze), gt = c.forwardRef(
2026
+ var Ze = "ScrollArea", [gt, Ja] = Or(Ze), [Ra, $] = gt(Ze), _t = c.forwardRef(
2022
2027
  (e, r) => {
2023
2028
  const {
2024
2029
  __scopeScrollArea: t,
@@ -2026,9 +2031,9 @@ var Ze = "ScrollArea", [mt, Za] = Tr(Ze), [Aa, $] = mt(Ze), gt = c.forwardRef(
2026
2031
  dir: a,
2027
2032
  scrollHideDelay: n = 600,
2028
2033
  ...s
2029
- } = e, [i, u] = c.useState(null), [l, d] = c.useState(null), [p, v] = c.useState(null), [m, w] = c.useState(null), [h, g] = c.useState(null), [_, E] = c.useState(0), [b, y] = c.useState(0), [C, N] = c.useState(!1), [S, R] = c.useState(!1), P = L(r, (k) => u(k)), A = Ca(a);
2034
+ } = e, [i, u] = c.useState(null), [l, d] = c.useState(null), [p, h] = c.useState(null), [m, w] = c.useState(null), [v, g] = c.useState(null), [_, E] = c.useState(0), [y, b] = c.useState(0), [C, x] = c.useState(!1), [S, N] = c.useState(!1), P = L(r, (F) => u(F)), A = xa(a);
2030
2035
  return /* @__PURE__ */ f(
2031
- Aa,
2036
+ Ra,
2032
2037
  {
2033
2038
  scope: t,
2034
2039
  type: o,
@@ -2038,17 +2043,17 @@ var Ze = "ScrollArea", [mt, Za] = Tr(Ze), [Aa, $] = mt(Ze), gt = c.forwardRef(
2038
2043
  viewport: l,
2039
2044
  onViewportChange: d,
2040
2045
  content: p,
2041
- onContentChange: v,
2046
+ onContentChange: h,
2042
2047
  scrollbarX: m,
2043
2048
  onScrollbarXChange: w,
2044
2049
  scrollbarXEnabled: C,
2045
- onScrollbarXEnabledChange: N,
2046
- scrollbarY: h,
2050
+ onScrollbarXEnabledChange: x,
2051
+ scrollbarY: v,
2047
2052
  onScrollbarYChange: g,
2048
2053
  scrollbarYEnabled: S,
2049
- onScrollbarYEnabledChange: R,
2054
+ onScrollbarYEnabledChange: N,
2050
2055
  onCornerWidthChange: E,
2051
- onCornerHeightChange: y,
2056
+ onCornerHeightChange: b,
2052
2057
  children: /* @__PURE__ */ f(
2053
2058
  O.div,
2054
2059
  {
@@ -2059,7 +2064,7 @@ var Ze = "ScrollArea", [mt, Za] = Tr(Ze), [Aa, $] = mt(Ze), gt = c.forwardRef(
2059
2064
  position: "relative",
2060
2065
  // Pass corner sizes as CSS vars to reduce re-renders of context consumers
2061
2066
  "--radix-scroll-area-corner-width": _ + "px",
2062
- "--radix-scroll-area-corner-height": b + "px",
2067
+ "--radix-scroll-area-corner-height": y + "px",
2063
2068
  ...e.style
2064
2069
  }
2065
2070
  }
@@ -2068,11 +2073,11 @@ var Ze = "ScrollArea", [mt, Za] = Tr(Ze), [Aa, $] = mt(Ze), gt = c.forwardRef(
2068
2073
  );
2069
2074
  }
2070
2075
  );
2071
- gt.displayName = Ze;
2072
- var _t = "ScrollAreaViewport", wt = c.forwardRef(
2076
+ _t.displayName = Ze;
2077
+ var wt = "ScrollAreaViewport", bt = c.forwardRef(
2073
2078
  (e, r) => {
2074
- const { __scopeScrollArea: t, children: o, nonce: a, ...n } = e, s = $(_t, t), i = c.useRef(null), u = L(r, i, s.onViewportChange);
2075
- return /* @__PURE__ */ D(B, { children: [
2079
+ const { __scopeScrollArea: t, children: o, nonce: a, ...n } = e, s = $(wt, t), i = c.useRef(null), u = L(r, i, s.onViewportChange);
2080
+ return /* @__PURE__ */ D(H, { children: [
2076
2081
  /* @__PURE__ */ f(
2077
2082
  "style",
2078
2083
  {
@@ -2110,17 +2115,17 @@ var _t = "ScrollAreaViewport", wt = c.forwardRef(
2110
2115
  ] });
2111
2116
  }
2112
2117
  );
2113
- wt.displayName = _t;
2114
- var W = "ScrollAreaScrollbar", bt = c.forwardRef(
2118
+ bt.displayName = wt;
2119
+ var W = "ScrollAreaScrollbar", yt = c.forwardRef(
2115
2120
  (e, r) => {
2116
2121
  const { forceMount: t, ...o } = e, a = $(W, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: s } = a, i = e.orientation === "horizontal";
2117
2122
  return c.useEffect(() => (i ? n(!0) : s(!0), () => {
2118
2123
  i ? n(!1) : s(!1);
2119
- }), [i, n, s]), a.type === "hover" ? /* @__PURE__ */ f(Ra, { ...o, ref: r, forceMount: t }) : a.type === "scroll" ? /* @__PURE__ */ f(xa, { ...o, ref: r, forceMount: t }) : a.type === "auto" ? /* @__PURE__ */ f(yt, { ...o, ref: r, forceMount: t }) : a.type === "always" ? /* @__PURE__ */ f(Qe, { ...o, ref: r }) : null;
2124
+ }), [i, n, s]), a.type === "hover" ? /* @__PURE__ */ f(Da, { ...o, ref: r, forceMount: t }) : a.type === "scroll" ? /* @__PURE__ */ f(Ta, { ...o, ref: r, forceMount: t }) : a.type === "auto" ? /* @__PURE__ */ f(St, { ...o, ref: r, forceMount: t }) : a.type === "always" ? /* @__PURE__ */ f(Qe, { ...o, ref: r }) : null;
2120
2125
  }
2121
2126
  );
2122
- bt.displayName = W;
2123
- var Ra = c.forwardRef((e, r) => {
2127
+ yt.displayName = W;
2128
+ var Da = c.forwardRef((e, r) => {
2124
2129
  const { forceMount: t, ...o } = e, a = $(W, e.__scopeScrollArea), [n, s] = c.useState(!1);
2125
2130
  return c.useEffect(() => {
2126
2131
  const i = a.scrollArea;
@@ -2135,15 +2140,15 @@ var Ra = c.forwardRef((e, r) => {
2135
2140
  window.clearTimeout(u), i.removeEventListener("pointerenter", l), i.removeEventListener("pointerleave", d);
2136
2141
  };
2137
2142
  }
2138
- }, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(z, { present: t || n, children: /* @__PURE__ */ f(
2139
- yt,
2143
+ }, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(j, { present: t || n, children: /* @__PURE__ */ f(
2144
+ St,
2140
2145
  {
2141
2146
  "data-state": n ? "visible" : "hidden",
2142
2147
  ...o,
2143
2148
  ref: r
2144
2149
  }
2145
2150
  ) });
2146
- }), xa = c.forwardRef((e, r) => {
2151
+ }), Ta = c.forwardRef((e, r) => {
2147
2152
  const { forceMount: t, ...o } = e, a = $(W, e.__scopeScrollArea), n = e.orientation === "horizontal", s = Ce(() => u("SCROLL_END"), 100), [i, u] = Na("hidden", {
2148
2153
  hidden: {
2149
2154
  SCROLL: "scrolling"
@@ -2171,30 +2176,30 @@ var Ra = c.forwardRef((e, r) => {
2171
2176
  const l = a.viewport, d = n ? "scrollLeft" : "scrollTop";
2172
2177
  if (l) {
2173
2178
  let p = l[d];
2174
- const v = () => {
2179
+ const h = () => {
2175
2180
  const m = l[d];
2176
2181
  p !== m && (u("SCROLL"), s()), p = m;
2177
2182
  };
2178
- return l.addEventListener("scroll", v), () => l.removeEventListener("scroll", v);
2183
+ return l.addEventListener("scroll", h), () => l.removeEventListener("scroll", h);
2179
2184
  }
2180
- }, [a.viewport, n, u, s]), /* @__PURE__ */ f(z, { present: t || i !== "hidden", children: /* @__PURE__ */ f(
2185
+ }, [a.viewport, n, u, s]), /* @__PURE__ */ f(j, { present: t || i !== "hidden", children: /* @__PURE__ */ f(
2181
2186
  Qe,
2182
2187
  {
2183
2188
  "data-state": i === "hidden" ? "hidden" : "visible",
2184
2189
  ...o,
2185
2190
  ref: r,
2186
- onPointerEnter: x(e.onPointerEnter, () => u("POINTER_ENTER")),
2187
- onPointerLeave: x(e.onPointerLeave, () => u("POINTER_LEAVE"))
2191
+ onPointerEnter: R(e.onPointerEnter, () => u("POINTER_ENTER")),
2192
+ onPointerLeave: R(e.onPointerLeave, () => u("POINTER_LEAVE"))
2188
2193
  }
2189
2194
  ) });
2190
- }), yt = c.forwardRef((e, r) => {
2195
+ }), St = c.forwardRef((e, r) => {
2191
2196
  const t = $(W, e.__scopeScrollArea), { forceMount: o, ...a } = e, [n, s] = c.useState(!1), i = e.orientation === "horizontal", u = Ce(() => {
2192
2197
  if (t.viewport) {
2193
2198
  const l = t.viewport.offsetWidth < t.viewport.scrollWidth, d = t.viewport.offsetHeight < t.viewport.scrollHeight;
2194
2199
  s(i ? l : d);
2195
2200
  }
2196
2201
  }, 10);
2197
- return te(t.viewport, u), te(t.content, u), /* @__PURE__ */ f(z, { present: o || n, children: /* @__PURE__ */ f(
2202
+ return ne(t.viewport, u), ne(t.content, u), /* @__PURE__ */ f(j, { present: o || n, children: /* @__PURE__ */ f(
2198
2203
  Qe,
2199
2204
  {
2200
2205
  "data-state": n ? "visible" : "hidden",
@@ -2207,61 +2212,61 @@ var Ra = c.forwardRef((e, r) => {
2207
2212
  content: 0,
2208
2213
  viewport: 0,
2209
2214
  scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
2210
- }), l = Pt(i.viewport, i.content), d = {
2215
+ }), l = xt(i.viewport, i.content), d = {
2211
2216
  ...o,
2212
2217
  sizes: i,
2213
2218
  onSizesChange: u,
2214
2219
  hasThumb: l > 0 && l < 1,
2215
- onThumbChange: (v) => n.current = v,
2220
+ onThumbChange: (h) => n.current = h,
2216
2221
  onThumbPointerUp: () => s.current = 0,
2217
- onThumbPointerDown: (v) => s.current = v
2222
+ onThumbPointerDown: (h) => s.current = h
2218
2223
  };
2219
- function p(v, m) {
2220
- return Ia(v, s.current, i, m);
2224
+ function p(h, m) {
2225
+ return Wa(h, s.current, i, m);
2221
2226
  }
2222
2227
  return t === "horizontal" ? /* @__PURE__ */ f(
2223
- Da,
2228
+ Oa,
2224
2229
  {
2225
2230
  ...d,
2226
2231
  ref: r,
2227
2232
  onThumbPositionChange: () => {
2228
2233
  if (a.viewport && n.current) {
2229
- const v = a.viewport.scrollLeft, m = xr(v, i, a.dir);
2234
+ const h = a.viewport.scrollLeft, m = Dr(h, i, a.dir);
2230
2235
  n.current.style.transform = `translate3d(${m}px, 0, 0)`;
2231
2236
  }
2232
2237
  },
2233
- onWheelScroll: (v) => {
2234
- a.viewport && (a.viewport.scrollLeft = v);
2238
+ onWheelScroll: (h) => {
2239
+ a.viewport && (a.viewport.scrollLeft = h);
2235
2240
  },
2236
- onDragScroll: (v) => {
2237
- a.viewport && (a.viewport.scrollLeft = p(v, a.dir));
2241
+ onDragScroll: (h) => {
2242
+ a.viewport && (a.viewport.scrollLeft = p(h, a.dir));
2238
2243
  }
2239
2244
  }
2240
2245
  ) : t === "vertical" ? /* @__PURE__ */ f(
2241
- Ta,
2246
+ La,
2242
2247
  {
2243
2248
  ...d,
2244
2249
  ref: r,
2245
2250
  onThumbPositionChange: () => {
2246
2251
  if (a.viewport && n.current) {
2247
- const v = a.viewport.scrollTop, m = xr(v, i);
2252
+ const h = a.viewport.scrollTop, m = Dr(h, i);
2248
2253
  n.current.style.transform = `translate3d(0, ${m}px, 0)`;
2249
2254
  }
2250
2255
  },
2251
- onWheelScroll: (v) => {
2252
- a.viewport && (a.viewport.scrollTop = v);
2256
+ onWheelScroll: (h) => {
2257
+ a.viewport && (a.viewport.scrollTop = h);
2253
2258
  },
2254
- onDragScroll: (v) => {
2255
- a.viewport && (a.viewport.scrollTop = p(v));
2259
+ onDragScroll: (h) => {
2260
+ a.viewport && (a.viewport.scrollTop = p(h));
2256
2261
  }
2257
2262
  }
2258
2263
  ) : null;
2259
- }), Da = c.forwardRef((e, r) => {
2264
+ }), Oa = c.forwardRef((e, r) => {
2260
2265
  const { sizes: t, onSizesChange: o, ...a } = e, n = $(W, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = L(r, u, n.onScrollbarXChange);
2261
2266
  return c.useEffect(() => {
2262
2267
  u.current && i(getComputedStyle(u.current));
2263
2268
  }, [u]), /* @__PURE__ */ f(
2264
- Et,
2269
+ Ct,
2265
2270
  {
2266
2271
  "data-orientation": "horizontal",
2267
2272
  ...a,
@@ -2278,8 +2283,8 @@ var Ra = c.forwardRef((e, r) => {
2278
2283
  onDragScroll: (d) => e.onDragScroll(d.x),
2279
2284
  onWheelScroll: (d, p) => {
2280
2285
  if (n.viewport) {
2281
- const v = n.viewport.scrollLeft + d.deltaX;
2282
- e.onWheelScroll(v), At(v, p) && d.preventDefault();
2286
+ const h = n.viewport.scrollLeft + d.deltaX;
2287
+ e.onWheelScroll(h), Nt(h, p) && d.preventDefault();
2283
2288
  }
2284
2289
  },
2285
2290
  onResize: () => {
@@ -2295,12 +2300,12 @@ var Ra = c.forwardRef((e, r) => {
2295
2300
  }
2296
2301
  }
2297
2302
  );
2298
- }), Ta = c.forwardRef((e, r) => {
2303
+ }), La = c.forwardRef((e, r) => {
2299
2304
  const { sizes: t, onSizesChange: o, ...a } = e, n = $(W, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = L(r, u, n.onScrollbarYChange);
2300
2305
  return c.useEffect(() => {
2301
2306
  u.current && i(getComputedStyle(u.current));
2302
2307
  }, [u]), /* @__PURE__ */ f(
2303
- Et,
2308
+ Ct,
2304
2309
  {
2305
2310
  "data-orientation": "vertical",
2306
2311
  ...a,
@@ -2318,8 +2323,8 @@ var Ra = c.forwardRef((e, r) => {
2318
2323
  onDragScroll: (d) => e.onDragScroll(d.y),
2319
2324
  onWheelScroll: (d, p) => {
2320
2325
  if (n.viewport) {
2321
- const v = n.viewport.scrollTop + d.deltaY;
2322
- e.onWheelScroll(v), At(v, p) && d.preventDefault();
2326
+ const h = n.viewport.scrollTop + d.deltaY;
2327
+ e.onWheelScroll(h), Nt(h, p) && d.preventDefault();
2323
2328
  }
2324
2329
  },
2325
2330
  onResize: () => {
@@ -2335,7 +2340,7 @@ var Ra = c.forwardRef((e, r) => {
2335
2340
  }
2336
2341
  }
2337
2342
  );
2338
- }), [Oa, St] = mt(W), Et = c.forwardRef((e, r) => {
2343
+ }), [$a, Et] = gt(W), Ct = c.forwardRef((e, r) => {
2339
2344
  const {
2340
2345
  __scopeScrollArea: t,
2341
2346
  sizes: o,
@@ -2347,41 +2352,41 @@ var Ra = c.forwardRef((e, r) => {
2347
2352
  onDragScroll: l,
2348
2353
  onWheelScroll: d,
2349
2354
  onResize: p,
2350
- ...v
2351
- } = e, m = $(W, t), [w, h] = c.useState(null), g = L(r, (P) => h(P)), _ = c.useRef(null), E = c.useRef(""), b = m.viewport, y = o.content - o.viewport, C = T(d), N = T(u), S = Ce(p, 10);
2352
- function R(P) {
2355
+ ...h
2356
+ } = e, m = $(W, t), [w, v] = c.useState(null), g = L(r, (P) => v(P)), _ = c.useRef(null), E = c.useRef(""), y = m.viewport, b = o.content - o.viewport, C = T(d), x = T(u), S = Ce(p, 10);
2357
+ function N(P) {
2353
2358
  if (_.current) {
2354
- const A = P.clientX - _.current.left, k = P.clientY - _.current.top;
2355
- l({ x: A, y: k });
2359
+ const A = P.clientX - _.current.left, F = P.clientY - _.current.top;
2360
+ l({ x: A, y: F });
2356
2361
  }
2357
2362
  }
2358
2363
  return c.useEffect(() => {
2359
2364
  const P = (A) => {
2360
- const k = A.target;
2361
- (w == null ? void 0 : w.contains(k)) && C(A, y);
2365
+ const F = A.target;
2366
+ (w == null ? void 0 : w.contains(F)) && C(A, b);
2362
2367
  };
2363
2368
  return document.addEventListener("wheel", P, { passive: !1 }), () => document.removeEventListener("wheel", P, { passive: !1 });
2364
- }, [b, w, y, C]), c.useEffect(N, [o, N]), te(w, S), te(m.content, S), /* @__PURE__ */ f(
2365
- Oa,
2369
+ }, [y, w, b, C]), c.useEffect(x, [o, x]), ne(w, S), ne(m.content, S), /* @__PURE__ */ f(
2370
+ $a,
2366
2371
  {
2367
2372
  scope: t,
2368
2373
  scrollbar: w,
2369
2374
  hasThumb: a,
2370
2375
  onThumbChange: T(n),
2371
2376
  onThumbPointerUp: T(s),
2372
- onThumbPositionChange: N,
2377
+ onThumbPositionChange: x,
2373
2378
  onThumbPointerDown: T(i),
2374
2379
  children: /* @__PURE__ */ f(
2375
2380
  O.div,
2376
2381
  {
2377
- ...v,
2382
+ ...h,
2378
2383
  ref: g,
2379
- style: { position: "absolute", ...v.style },
2380
- onPointerDown: x(e.onPointerDown, (P) => {
2381
- P.button === 0 && (P.target.setPointerCapture(P.pointerId), _.current = w.getBoundingClientRect(), E.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), R(P));
2384
+ style: { position: "absolute", ...h.style },
2385
+ onPointerDown: R(e.onPointerDown, (P) => {
2386
+ P.button === 0 && (P.target.setPointerCapture(P.pointerId), _.current = w.getBoundingClientRect(), E.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), N(P));
2382
2387
  }),
2383
- onPointerMove: x(e.onPointerMove, R),
2384
- onPointerUp: x(e.onPointerUp, (P) => {
2388
+ onPointerMove: R(e.onPointerMove, N),
2389
+ onPointerUp: R(e.onPointerUp, (P) => {
2385
2390
  const A = P.target;
2386
2391
  A.hasPointerCapture(P.pointerId) && A.releasePointerCapture(P.pointerId), document.body.style.webkitUserSelect = E.current, m.viewport && (m.viewport.style.scrollBehavior = ""), _.current = null;
2387
2392
  })
@@ -2389,14 +2394,14 @@ var Ra = c.forwardRef((e, r) => {
2389
2394
  )
2390
2395
  }
2391
2396
  );
2392
- }), be = "ScrollAreaThumb", Ct = c.forwardRef(
2397
+ }), be = "ScrollAreaThumb", Pt = c.forwardRef(
2393
2398
  (e, r) => {
2394
- const { forceMount: t, ...o } = e, a = St(be, e.__scopeScrollArea);
2395
- return /* @__PURE__ */ f(z, { present: t || a.hasThumb, children: /* @__PURE__ */ f(La, { ref: r, ...o }) });
2399
+ const { forceMount: t, ...o } = e, a = Et(be, e.__scopeScrollArea);
2400
+ return /* @__PURE__ */ f(j, { present: t || a.hasThumb, children: /* @__PURE__ */ f(Ma, { ref: r, ...o }) });
2396
2401
  }
2397
- ), La = c.forwardRef(
2402
+ ), Ma = c.forwardRef(
2398
2403
  (e, r) => {
2399
- const { __scopeScrollArea: t, style: o, ...a } = e, n = $(be, t), s = St(be, t), { onThumbPositionChange: i } = s, u = L(
2404
+ const { __scopeScrollArea: t, style: o, ...a } = e, n = $(be, t), s = Et(be, t), { onThumbPositionChange: i } = s, u = L(
2400
2405
  r,
2401
2406
  (p) => s.onThumbChange(p)
2402
2407
  ), l = c.useRef(void 0), d = Ce(() => {
@@ -2405,13 +2410,13 @@ var Ra = c.forwardRef((e, r) => {
2405
2410
  return c.useEffect(() => {
2406
2411
  const p = n.viewport;
2407
2412
  if (p) {
2408
- const v = () => {
2413
+ const h = () => {
2409
2414
  if (d(), !l.current) {
2410
- const m = Wa(p, i);
2415
+ const m = Fa(p, i);
2411
2416
  l.current = m, i();
2412
2417
  }
2413
2418
  };
2414
- return i(), p.addEventListener("scroll", v), () => p.removeEventListener("scroll", v);
2419
+ return i(), p.addEventListener("scroll", h), () => p.removeEventListener("scroll", h);
2415
2420
  }
2416
2421
  }, [n.viewport, d, i]), /* @__PURE__ */ f(
2417
2422
  O.div,
@@ -2424,30 +2429,30 @@ var Ra = c.forwardRef((e, r) => {
2424
2429
  height: "var(--radix-scroll-area-thumb-height)",
2425
2430
  ...o
2426
2431
  },
2427
- onPointerDownCapture: x(e.onPointerDownCapture, (p) => {
2428
- const m = p.target.getBoundingClientRect(), w = p.clientX - m.left, h = p.clientY - m.top;
2429
- s.onThumbPointerDown({ x: w, y: h });
2432
+ onPointerDownCapture: R(e.onPointerDownCapture, (p) => {
2433
+ const m = p.target.getBoundingClientRect(), w = p.clientX - m.left, v = p.clientY - m.top;
2434
+ s.onThumbPointerDown({ x: w, y: v });
2430
2435
  }),
2431
- onPointerUp: x(e.onPointerUp, s.onThumbPointerUp)
2436
+ onPointerUp: R(e.onPointerUp, s.onThumbPointerUp)
2432
2437
  }
2433
2438
  );
2434
2439
  }
2435
2440
  );
2436
- Ct.displayName = be;
2437
- var Je = "ScrollAreaCorner", $a = c.forwardRef(
2441
+ Pt.displayName = be;
2442
+ var Je = "ScrollAreaCorner", Ia = c.forwardRef(
2438
2443
  (e, r) => {
2439
2444
  const t = $(Je, e.__scopeScrollArea), o = !!(t.scrollbarX && t.scrollbarY);
2440
- return t.type !== "scroll" && o ? /* @__PURE__ */ f(Ma, { ...e, ref: r }) : null;
2445
+ return t.type !== "scroll" && o ? /* @__PURE__ */ f(ka, { ...e, ref: r }) : null;
2441
2446
  }
2442
2447
  );
2443
- $a.displayName = Je;
2444
- var Ma = c.forwardRef((e, r) => {
2448
+ Ia.displayName = Je;
2449
+ var ka = c.forwardRef((e, r) => {
2445
2450
  const { __scopeScrollArea: t, ...o } = e, a = $(Je, t), [n, s] = c.useState(0), [i, u] = c.useState(0), l = !!(n && i);
2446
- return te(a.scrollbarX, () => {
2451
+ return ne(a.scrollbarX, () => {
2447
2452
  var p;
2448
2453
  const d = ((p = a.scrollbarX) == null ? void 0 : p.offsetHeight) || 0;
2449
2454
  a.onCornerHeightChange(d), u(d);
2450
- }), te(a.scrollbarY, () => {
2455
+ }), ne(a.scrollbarY, () => {
2451
2456
  var p;
2452
2457
  const d = ((p = a.scrollbarY) == null ? void 0 : p.offsetWidth) || 0;
2453
2458
  a.onCornerWidthChange(d), s(d);
@@ -2471,33 +2476,33 @@ var Ma = c.forwardRef((e, r) => {
2471
2476
  function ye(e) {
2472
2477
  return e ? parseInt(e, 10) : 0;
2473
2478
  }
2474
- function Pt(e, r) {
2479
+ function xt(e, r) {
2475
2480
  const t = e / r;
2476
2481
  return isNaN(t) ? 0 : t;
2477
2482
  }
2478
2483
  function Ee(e) {
2479
- const r = Pt(e.viewport, e.content), t = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = (e.scrollbar.size - t) * r;
2484
+ const r = xt(e.viewport, e.content), t = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = (e.scrollbar.size - t) * r;
2480
2485
  return Math.max(o, 18);
2481
2486
  }
2482
- function Ia(e, r, t, o = "ltr") {
2487
+ function Wa(e, r, t, o = "ltr") {
2483
2488
  const a = Ee(t), n = a / 2, s = r || n, i = a - s, u = t.scrollbar.paddingStart + s, l = t.scrollbar.size - t.scrollbar.paddingEnd - i, d = t.content - t.viewport, p = o === "ltr" ? [0, d] : [d * -1, 0];
2484
- return Nt([u, l], p)(e);
2489
+ return At([u, l], p)(e);
2485
2490
  }
2486
- function xr(e, r, t = "ltr") {
2487
- const o = Ee(r), a = r.scrollbar.paddingStart + r.scrollbar.paddingEnd, n = r.scrollbar.size - a, s = r.content - r.viewport, i = n - o, u = t === "ltr" ? [0, s] : [s * -1, 0], l = Pa(e, u);
2488
- return Nt([0, s], [0, i])(l);
2491
+ function Dr(e, r, t = "ltr") {
2492
+ const o = Ee(r), a = r.scrollbar.paddingStart + r.scrollbar.paddingEnd, n = r.scrollbar.size - a, s = r.content - r.viewport, i = n - o, u = t === "ltr" ? [0, s] : [s * -1, 0], l = Aa(e, u);
2493
+ return At([0, s], [0, i])(l);
2489
2494
  }
2490
- function Nt(e, r) {
2495
+ function At(e, r) {
2491
2496
  return (t) => {
2492
2497
  if (e[0] === e[1] || r[0] === r[1]) return r[0];
2493
2498
  const o = (r[1] - r[0]) / (e[1] - e[0]);
2494
2499
  return r[0] + o * (t - e[0]);
2495
2500
  };
2496
2501
  }
2497
- function At(e, r) {
2502
+ function Nt(e, r) {
2498
2503
  return e > 0 && e < r;
2499
2504
  }
2500
- var Wa = (e, r = () => {
2505
+ var Fa = (e, r = () => {
2501
2506
  }) => {
2502
2507
  let t = { left: e.scrollLeft, top: e.scrollTop }, o = 0;
2503
2508
  return function a() {
@@ -2511,9 +2516,9 @@ function Ce(e, r) {
2511
2516
  window.clearTimeout(o.current), o.current = window.setTimeout(t, r);
2512
2517
  }, [t, r]);
2513
2518
  }
2514
- function te(e, r) {
2519
+ function ne(e, r) {
2515
2520
  const t = T(r);
2516
- ce(() => {
2521
+ se(() => {
2517
2522
  let o = 0;
2518
2523
  if (e) {
2519
2524
  const a = new ResizeObserver(() => {
@@ -2525,14 +2530,14 @@ function te(e, r) {
2525
2530
  }
2526
2531
  }, [e, t]);
2527
2532
  }
2528
- var Fa = gt, ka = wt, Ua = bt, Ha = Ct;
2529
- const Ba = {
2533
+ var Ua = _t, qa = bt, Ha = yt, Ba = Pt;
2534
+ const ja = {
2530
2535
  "purpur-drawer-scroll-area__root": "_purpur-drawer-scroll-area__root_1r0fa_1",
2531
2536
  "purpur-drawer-scroll-area__root--fit-to-content": "_purpur-drawer-scroll-area__root--fit-to-content_1r0fa_4",
2532
2537
  "purpur-drawer-scroll-area__viewport": "_purpur-drawer-scroll-area__viewport_1r0fa_10",
2533
2538
  "purpur-drawer-scroll-area__scrollbar": "_purpur-drawer-scroll-area__scrollbar_1r0fa_13",
2534
2539
  "purpur-drawer-scroll-area__thumb": "_purpur-drawer-scroll-area__thumb_1r0fa_24"
2535
- }, ae = q.bind(Ba), Q = "purpur-drawer-scroll-area", ze = j(
2540
+ }, ae = X.bind(ja), J = "purpur-drawer-scroll-area", je = B(
2536
2541
  ({
2537
2542
  ["data-testid"]: e = "purpur-drawer-scroll-area",
2538
2543
  children: r,
@@ -2540,21 +2545,21 @@ const Ba = {
2540
2545
  fitToContent: o = !1,
2541
2546
  ...a
2542
2547
  }, n) => {
2543
- const s = ae([t, Q]);
2548
+ const s = ae([t, J]);
2544
2549
  return /* @__PURE__ */ f("div", { className: s, "data-testid": e, ref: n, ...a, children: /* @__PURE__ */ D(
2545
- Fa,
2550
+ Ua,
2546
2551
  {
2547
- className: ae(`${Q}__root`, {
2548
- [`${Q}__root--fit-to-content`]: o
2552
+ className: ae(`${J}__root`, {
2553
+ [`${J}__root--fit-to-content`]: o
2549
2554
  }),
2550
2555
  children: [
2551
- /* @__PURE__ */ f(ka, { className: ae(`${Q}__viewport`), children: r }),
2556
+ /* @__PURE__ */ f(qa, { className: ae(`${J}__viewport`), children: r }),
2552
2557
  /* @__PURE__ */ f(
2553
- Ua,
2558
+ Ha,
2554
2559
  {
2555
- className: ae(`${Q}__scrollbar`),
2560
+ className: ae(`${J}__scrollbar`),
2556
2561
  orientation: "vertical",
2557
- children: /* @__PURE__ */ f(Ha, { className: ae(`${Q}__thumb`) })
2562
+ children: /* @__PURE__ */ f(Ba, { className: ae(`${J}__thumb`) })
2558
2563
  }
2559
2564
  )
2560
2565
  ]
@@ -2562,8 +2567,8 @@ const Ba = {
2562
2567
  ) });
2563
2568
  }
2564
2569
  );
2565
- ze.displayName = "DrawerScrollArea";
2566
- const J = q.bind(Do), F = "purpur-drawer-frame", Rt = j(
2570
+ je.displayName = "DrawerScrollArea";
2571
+ const ee = X.bind(Oo), M = "purpur-drawer-frame", Rt = B(
2567
2572
  ({
2568
2573
  ["data-testid"]: e = "purpur-drawer-frame",
2569
2574
  backButton: r,
@@ -2577,48 +2582,51 @@ const J = q.bind(Do), F = "purpur-drawer-frame", Rt = j(
2577
2582
  headerContent: l,
2578
2583
  onAnimationEnd: d,
2579
2584
  onBackButtonClick: p,
2580
- onSwipeStart: v,
2585
+ onSwipeStart: h,
2581
2586
  onSwipeMove: m,
2582
2587
  onSwipeCancel: w,
2583
- onSwipeEnd: h,
2588
+ onSwipeEnd: v,
2584
2589
  title: g,
2585
2590
  stickyFooter: _,
2586
- ...E
2591
+ position: E = "right",
2592
+ ...y
2587
2593
  }, b) => {
2588
- const y = J([
2594
+ const C = ee([
2589
2595
  n,
2590
- F,
2596
+ M,
2591
2597
  {
2592
- [`${F}--fit-to-content`]: i,
2593
- [`${F}--sticky-footer`]: _
2598
+ [`${M}--fit-to-content`]: i,
2599
+ [`${M}--sticky-footer`]: _,
2600
+ [`${M}--left`]: E === "left",
2601
+ [`${M}--right`]: E === "right"
2594
2602
  }
2595
2603
  ]);
2596
2604
  return /* @__PURE__ */ D(
2597
2605
  "div",
2598
2606
  {
2599
- className: y,
2607
+ className: C,
2600
2608
  "data-testid": e,
2601
2609
  ref: b,
2602
2610
  onAnimationEnd: d,
2603
- ...E,
2611
+ ...y,
2604
2612
  children: [
2605
2613
  /* @__PURE__ */ f(
2606
- ut,
2614
+ dt,
2607
2615
  {
2608
- onSwipeStart: v,
2616
+ onSwipeStart: h,
2609
2617
  onSwipeMove: m,
2610
2618
  onSwipeCancel: w,
2611
- onSwipeEnd: h
2619
+ onSwipeEnd: v
2612
2620
  }
2613
2621
  ),
2614
2622
  /* @__PURE__ */ f(
2615
- ee,
2623
+ re,
2616
2624
  {
2617
- className: J(`${F}__header`),
2625
+ className: ee(`${M}__header`),
2618
2626
  variant: "header",
2619
2627
  stickyFooter: _,
2620
2628
  children: /* @__PURE__ */ f(
2621
- ht,
2629
+ mt,
2622
2630
  {
2623
2631
  title: g,
2624
2632
  headerContent: l,
@@ -2631,20 +2639,20 @@ const J = q.bind(Do), F = "purpur-drawer-frame", Rt = j(
2631
2639
  )
2632
2640
  }
2633
2641
  ),
2634
- _ ? /* @__PURE__ */ D(B, { children: [
2642
+ _ ? /* @__PURE__ */ D(H, { children: [
2635
2643
  /* @__PURE__ */ f(
2636
- ze,
2644
+ je,
2637
2645
  {
2638
- className: J(`${F}__body`),
2646
+ className: ee(`${M}__body`),
2639
2647
  "data-testid": `${e}-sticky-footer-scroll-area`,
2640
2648
  fitToContent: i,
2641
- children: /* @__PURE__ */ f(ee, { stickyFooter: !0, children: a })
2649
+ children: /* @__PURE__ */ f(re, { stickyFooter: !0, children: a })
2642
2650
  }
2643
2651
  ),
2644
2652
  u && /* @__PURE__ */ f(
2645
- ee,
2653
+ re,
2646
2654
  {
2647
- className: J(`${F}__footer`),
2655
+ className: ee(`${M}__footer`),
2648
2656
  "data-testid": `${e}-sticky-footer`,
2649
2657
  variant: "footer",
2650
2658
  stickyFooter: _,
@@ -2652,22 +2660,22 @@ const J = q.bind(Do), F = "purpur-drawer-frame", Rt = j(
2652
2660
  }
2653
2661
  )
2654
2662
  ] }) : /* @__PURE__ */ f(
2655
- ze,
2663
+ je,
2656
2664
  {
2657
- className: J(`${F}__body`),
2665
+ className: ee(`${M}__body`),
2658
2666
  "data-testid": `${e}-scroll-area`,
2659
2667
  fitToContent: i,
2660
2668
  children: /* @__PURE__ */ D(
2661
2669
  "div",
2662
2670
  {
2663
- className: J([
2664
- `${F}__content-container`,
2665
- { [`${F}__content-container--no-footer`]: !u }
2671
+ className: ee([
2672
+ `${M}__content-container`,
2673
+ { [`${M}__content-container--no-footer`]: !u }
2666
2674
  ]),
2667
2675
  children: [
2668
- /* @__PURE__ */ f(ee, { stickyFooter: _, children: a }),
2676
+ /* @__PURE__ */ f(re, { stickyFooter: _, children: a }),
2669
2677
  u && /* @__PURE__ */ f(
2670
- ee,
2678
+ re,
2671
2679
  {
2672
2680
  "data-testid": `${e}-footer`,
2673
2681
  stickyFooter: _,
@@ -2686,7 +2694,7 @@ const J = q.bind(Do), F = "purpur-drawer-frame", Rt = j(
2686
2694
  }
2687
2695
  );
2688
2696
  Rt.displayName = "DrawerFrame";
2689
- const ja = (e, r) => ({
2697
+ const za = (e, r) => ({
2690
2698
  onAnimationEnd: (i) => {
2691
2699
  i.currentTarget.getAttribute("data-swipe") === "end" && r(!1);
2692
2700
  },
@@ -2708,7 +2716,7 @@ const ja = (e, r) => ({
2708
2716
  const { y: u } = i.delta;
2709
2717
  e.current.setAttribute("data-swipe", "end"), e.current.style.removeProperty("--purpur-drawer-swipe-move-y"), e.current.style.setProperty("--purpur-drawer-swipe-end-y", `${u}px`);
2710
2718
  }
2711
- }), ie = q.bind(Ao), se = "purpur-drawer-content", xt = j(
2719
+ }), ie = X.bind(Ro), V = "purpur-drawer-content", Dt = B(
2712
2720
  ({
2713
2721
  ["data-testid"]: e = "purpur-drawer-content",
2714
2722
  backButton: r = !1,
@@ -2722,43 +2730,46 @@ const ja = (e, r) => ({
2722
2730
  fitToContent: l = !1,
2723
2731
  footerContent: d,
2724
2732
  headerContent: p,
2725
- onBackButtonClick: v,
2733
+ onBackButtonClick: h,
2726
2734
  stickyFooter: m = !1,
2727
2735
  title: w,
2728
- zIndex: h,
2729
- ...g
2730
- }, _) => {
2731
- const E = ie([
2736
+ zIndex: v,
2737
+ position: g = "right",
2738
+ ..._
2739
+ }, E) => {
2740
+ const y = ie([
2732
2741
  s,
2733
- se,
2734
- { [`${se}--fit-to-content`]: l }
2735
- ]), b = Lt(null), y = $t(lt), { onAnimationEnd: C, onSwipeStart: N, onSwipeMove: S, onSwipeCancel: R, onSwipeEnd: P } = ja(b, y), A = (ne) => {
2736
- u && ne.preventDefault();
2737
- }, k = () => {
2738
- const ne = b.current;
2739
- if (ne) {
2740
- const rr = ne.querySelector("h2");
2741
- rr && setTimeout(() => {
2742
- rr.focus();
2742
+ V,
2743
+ { [`${V}--fit-to-content`]: l },
2744
+ { [`${V}--left`]: g === "left" },
2745
+ { [`${V}--right`]: g === "right" }
2746
+ ]), b = $t(null), C = Mt(ut), { onAnimationEnd: x, onSwipeStart: S, onSwipeMove: N, onSwipeCancel: P, onSwipeEnd: A } = za(b, C), F = (ce) => {
2747
+ u && ce.preventDefault();
2748
+ }, rr = () => {
2749
+ const ce = b.current;
2750
+ if (ce) {
2751
+ const tr = ce.querySelector("h2");
2752
+ tr && setTimeout(() => {
2753
+ tr.focus();
2743
2754
  });
2744
2755
  }
2745
2756
  };
2746
2757
  return /* @__PURE__ */ f(vo, { children: /* @__PURE__ */ f(
2747
- ho,
2758
+ mo,
2748
2759
  {
2749
2760
  className: ie("purpur-drawer-overlay"),
2750
- style: h ? { zIndex: h } : void 0,
2761
+ style: v ? { zIndex: v } : void 0,
2751
2762
  "data-testid": `${e}-overlay`,
2752
2763
  children: /* @__PURE__ */ f(
2753
- mo,
2764
+ go,
2754
2765
  {
2755
- onPointerDownOutside: A,
2756
- onOpenAutoFocus: k,
2757
- className: E,
2766
+ onPointerDownOutside: F,
2767
+ onOpenAutoFocus: rr,
2768
+ className: y,
2758
2769
  "data-testid": e,
2759
- ref: _,
2770
+ ref: E,
2760
2771
  ...!a && { "aria-describedby": void 0 },
2761
- ...g,
2772
+ ..._,
2762
2773
  children: /* @__PURE__ */ f(
2763
2774
  Rt,
2764
2775
  {
@@ -2766,24 +2777,25 @@ const ja = (e, r) => ({
2766
2777
  backButtonText: t,
2767
2778
  backButtonOnlyIcon: o,
2768
2779
  closeButtonAriaLabel: i,
2769
- className: ie(`${se}__drawer-frame`),
2780
+ className: ie(`${V}__drawer-frame`),
2770
2781
  fitToContent: l,
2771
2782
  footerContent: d,
2772
2783
  headerContent: p,
2773
2784
  ref: b,
2774
- onAnimationEnd: C,
2775
- onBackButtonClick: v,
2776
- onSwipeStart: N,
2777
- onSwipeMove: S,
2778
- onSwipeCancel: R,
2779
- onSwipeEnd: P,
2785
+ onAnimationEnd: x,
2786
+ onBackButtonClick: h,
2787
+ onSwipeStart: S,
2788
+ onSwipeMove: N,
2789
+ onSwipeCancel: P,
2790
+ onSwipeEnd: A,
2780
2791
  stickyFooter: m,
2781
2792
  title: w,
2782
- children: a ? /* @__PURE__ */ D("div", { className: ie(`${se}__content-container`), children: [
2793
+ position: g,
2794
+ children: a ? /* @__PURE__ */ D("div", { className: ie(`${V}__content-container`), children: [
2783
2795
  /* @__PURE__ */ f(
2784
- go,
2796
+ _o,
2785
2797
  {
2786
- className: ie(`${se}__description`),
2798
+ className: ie(`${V}__description`),
2787
2799
  "data-testid": `${e}-description`,
2788
2800
  children: a
2789
2801
  }
@@ -2798,12 +2810,12 @@ const ja = (e, r) => ({
2798
2810
  ) });
2799
2811
  }
2800
2812
  );
2801
- xt.displayName = "DrawerContent";
2802
- const Dt = j(
2803
- ({ ["data-testid"]: e = "purpur-drawer-trigger", children: r, ...t }, o) => /* @__PURE__ */ f(po, { asChild: !0, "data-testid": e, ref: o, ...t, children: r })
2813
+ Dt.displayName = "DrawerContent";
2814
+ const Tt = B(
2815
+ ({ ["data-testid"]: e = "purpur-drawer-trigger", children: r, ...t }, o) => /* @__PURE__ */ f(ho, { asChild: !0, "data-testid": e, ref: o, ...t, children: r })
2804
2816
  );
2805
- Dt.displayName = "DrawerTrigger";
2806
- const za = q.bind(So), Va = "purpur-drawer", er = ({
2817
+ Tt.displayName = "DrawerTrigger";
2818
+ const Va = X.bind(Eo), Ya = "purpur-drawer", er = ({
2807
2819
  ["data-testid"]: e = "purpur-drawer",
2808
2820
  children: r,
2809
2821
  className: t,
@@ -2811,15 +2823,15 @@ const za = q.bind(So), Va = "purpur-drawer", er = ({
2811
2823
  open: a = !1,
2812
2824
  ...n
2813
2825
  }) => {
2814
- const [s, i] = Ie.useState(a), u = za([t, Va]), l = (d) => {
2826
+ const [s, i] = Ie.useState(a), u = Va([t, Ya]), l = (d) => {
2815
2827
  i(d), o == null || o(d);
2816
2828
  };
2817
- return Mt(() => {
2829
+ return It(() => {
2818
2830
  i(a);
2819
- }, [a]), /* @__PURE__ */ f(lt.Provider, { value: l, children: /* @__PURE__ */ f("div", { className: u, "data-testid": e, ...n, children: /* @__PURE__ */ f(fo, { open: s, onOpenChange: l, children: r }) }) });
2831
+ }, [a]), /* @__PURE__ */ f(ut.Provider, { value: l, children: /* @__PURE__ */ f("div", { className: u, "data-testid": e, ...n, children: /* @__PURE__ */ f(po, { open: s, onOpenChange: l, children: r }) }) });
2820
2832
  };
2821
- er.Trigger = Dt;
2822
- er.Content = xt;
2833
+ er.Trigger = Tt;
2834
+ er.Content = Dt;
2823
2835
  er.displayName = "Drawer";
2824
2836
  export {
2825
2837
  er as Drawer