@txnlab/use-wallet-ui-react 1.2.0 → 1.2.1

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/esm/index.js CHANGED
@@ -1,8 +1,8 @@
1
- var Ao = (e) => {
1
+ var To = (e) => {
2
2
  throw TypeError(e);
3
3
  };
4
- var cn = (e, t, r) => t.has(e) || Ao("Cannot " + r);
5
- var v = (e, t, r) => (cn(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Q = (e, t, r) => t.has(e) ? Ao("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), B = (e, t, r, n) => (cn(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r), J = (e, t, r) => (cn(e, t, "access private method"), r);
4
+ var cn = (e, t, r) => t.has(e) || To("Cannot " + r);
5
+ var v = (e, t, r) => (cn(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Q = (e, t, r) => t.has(e) ? To("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), B = (e, t, r, n) => (cn(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r), J = (e, t, r) => (cn(e, t, "access private method"), r);
6
6
  var Dr = (e, t, r, n) => ({
7
7
  set _(o) {
8
8
  B(e, t, o, r);
@@ -13,16 +13,16 @@ var Dr = (e, t, r, n) => ({
13
13
  });
14
14
  import { jsx as $, Fragment as et, jsxs as re } from "react/jsx-runtime";
15
15
  import * as q from "react";
16
- import K, { useState as ie, useEffect as pe, useContext as me, createContext as Oe, useMemo as he, useCallback as ne, useRef as ee, useLayoutEffect as Hs, forwardRef as Ra, isValidElement as to, cloneElement as Us, createElement as Ia, Fragment as Rr, useId as Gt, useSyncExternalStore as Na } from "react";
17
- import { F as ro, u as Ws, a as zs, b as Gs, c as $a, d as qs, e as Cn, f as Ma, g as Da, h as Vs, i as La, j as pr, k as ja, o as no, l as un, m as dn, n as Ba, r as Ha, s as Qs, p as _s, q as Ua, t as Ks } from "./chunks/floating-ui.react-Co7v2aHO.js";
16
+ import K, { useState as ie, useEffect as pe, useContext as me, createContext as Oe, useMemo as he, useCallback as ne, useRef as ee, useLayoutEffect as Hs, forwardRef as Ia, isValidElement as ro, cloneElement as Us, createElement as Na, Fragment as Rr, useId as Gt, useSyncExternalStore as $a } from "react";
17
+ import { F as no, u as Ws, a as zs, b as Gs, c as Ma, d as qs, e as An, f as Da, g as La, h as Vs, i as ja, j as pr, k as Ba, o as oo, l as un, m as dn, n as Ha, r as Ua, s as Qs, p as _s, q as Wa, t as Ks } from "./chunks/floating-ui.react-Co7v2aHO.js";
18
18
  import { useWallet as Ot, useNetwork as Ys } from "@txnlab/use-wallet-react";
19
- import * as An from "react-dom";
19
+ import * as Tn from "react-dom";
20
20
  import { flushSync as Kr, createPortal as Xs } from "react-dom";
21
- const Wa = () => {
21
+ const za = () => {
22
22
  typeof window > "u" || typeof document > "u" || (typeof window.requestAnimationFrame == "function" ? window.requestAnimationFrame(() => {
23
- To();
24
- }) : setTimeout(To, 0));
25
- }, To = () => {
23
+ Po();
24
+ }) : setTimeout(Po, 0));
25
+ }, Po = () => {
26
26
  try {
27
27
  if (document.getElementById("wallet-ui-fonts")) return;
28
28
  const t = document.createElement("style");
@@ -55,8 +55,8 @@ const Wa = () => {
55
55
  e
56
56
  );
57
57
  }
58
- }, za = () => {
59
- typeof window < "u" && Wa();
58
+ }, Ga = () => {
59
+ typeof window < "u" && za();
60
60
  };
61
61
  function Js(e) {
62
62
  var t, r, n = "";
@@ -67,42 +67,42 @@ function Js(e) {
67
67
  } else for (r in e) e[r] && (n && (n += " "), n += r);
68
68
  return n;
69
69
  }
70
- function Ga() {
70
+ function qa() {
71
71
  for (var e, t, r = 0, n = "", o = arguments.length; r < o; r++) (e = arguments[r]) && (t = Js(e)) && (n && (n += " "), n += t);
72
72
  return n;
73
73
  }
74
- const qa = (e, t) => {
74
+ const Va = (e, t) => {
75
75
  const r = new Array(e.length + t.length);
76
76
  for (let n = 0; n < e.length; n++)
77
77
  r[n] = e[n];
78
78
  for (let n = 0; n < t.length; n++)
79
79
  r[e.length + n] = t[n];
80
80
  return r;
81
- }, Va = (e, t) => ({
81
+ }, Qa = (e, t) => ({
82
82
  classGroupId: e,
83
83
  validator: t
84
84
  }), Zs = (e = /* @__PURE__ */ new Map(), t = null, r) => ({
85
85
  nextPart: e,
86
86
  validators: t,
87
87
  classGroupId: r
88
- }), Yr = "-", Po = [], Qa = "arbitrary..", _a = (e) => {
89
- const t = Ya(e), {
88
+ }), Yr = "-", Fo = [], _a = "arbitrary..", Ka = (e) => {
89
+ const t = Xa(e), {
90
90
  conflictingClassGroups: r,
91
91
  conflictingClassGroupModifiers: n
92
92
  } = e;
93
93
  return {
94
94
  getClassGroupId: (i) => {
95
95
  if (i.startsWith("[") && i.endsWith("]"))
96
- return Ka(i);
96
+ return Ya(i);
97
97
  const l = i.split(Yr), c = l[0] === "" && l.length > 1 ? 1 : 0;
98
98
  return ei(l, c, t);
99
99
  },
100
100
  getConflictingClassGroupIds: (i, l) => {
101
101
  if (l) {
102
102
  const c = n[i], d = r[i];
103
- return c ? d ? qa(d, c) : c : d || Po;
103
+ return c ? d ? Va(d, c) : c : d || Fo;
104
104
  }
105
- return r[i] || Po;
105
+ return r[i] || Fo;
106
106
  }
107
107
  };
108
108
  }, ei = (e, t, r) => {
@@ -122,52 +122,52 @@ const qa = (e, t) => {
122
122
  if (m.validator(l))
123
123
  return m.classGroupId;
124
124
  }
125
- }, Ka = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
125
+ }, Ya = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
126
126
  const t = e.slice(1, -1), r = t.indexOf(":"), n = t.slice(0, r);
127
- return n ? Qa + n : void 0;
128
- })(), Ya = (e) => {
127
+ return n ? _a + n : void 0;
128
+ })(), Xa = (e) => {
129
129
  const {
130
130
  theme: t,
131
131
  classGroups: r
132
132
  } = e;
133
- return Xa(r, t);
134
- }, Xa = (e, t) => {
133
+ return Ja(r, t);
134
+ }, Ja = (e, t) => {
135
135
  const r = Zs();
136
136
  for (const n in e) {
137
137
  const o = e[n];
138
- oo(o, r, n, t);
138
+ so(o, r, n, t);
139
139
  }
140
140
  return r;
141
- }, oo = (e, t, r, n) => {
141
+ }, so = (e, t, r, n) => {
142
142
  const o = e.length;
143
143
  for (let s = 0; s < o; s++) {
144
144
  const i = e[s];
145
- Ja(i, t, r, n);
145
+ Za(i, t, r, n);
146
146
  }
147
- }, Ja = (e, t, r, n) => {
147
+ }, Za = (e, t, r, n) => {
148
148
  if (typeof e == "string") {
149
- Za(e, t, r);
149
+ el(e, t, r);
150
150
  return;
151
151
  }
152
152
  if (typeof e == "function") {
153
- el(e, t, r, n);
153
+ tl(e, t, r, n);
154
154
  return;
155
155
  }
156
- tl(e, t, r, n);
157
- }, Za = (e, t, r) => {
156
+ rl(e, t, r, n);
157
+ }, el = (e, t, r) => {
158
158
  const n = e === "" ? t : ti(t, e);
159
159
  n.classGroupId = r;
160
- }, el = (e, t, r, n) => {
161
- if (rl(e)) {
162
- oo(e(n), t, r, n);
160
+ }, tl = (e, t, r, n) => {
161
+ if (nl(e)) {
162
+ so(e(n), t, r, n);
163
163
  return;
164
164
  }
165
- t.validators === null && (t.validators = []), t.validators.push(Va(r, e));
166
- }, tl = (e, t, r, n) => {
165
+ t.validators === null && (t.validators = []), t.validators.push(Qa(r, e));
166
+ }, rl = (e, t, r, n) => {
167
167
  const o = Object.entries(e), s = o.length;
168
168
  for (let i = 0; i < s; i++) {
169
169
  const [l, c] = o[i];
170
- oo(c, ti(t, l), r, n);
170
+ so(c, ti(t, l), r, n);
171
171
  }
172
172
  }, ti = (e, t) => {
173
173
  let r = e;
@@ -178,7 +178,7 @@ const qa = (e, t) => {
178
178
  l || (l = Zs(), r.nextPart.set(i, l)), r = l;
179
179
  }
180
180
  return r;
181
- }, rl = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, nl = (e) => {
181
+ }, nl = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, ol = (e) => {
182
182
  if (e < 1)
183
183
  return {
184
184
  get: () => {
@@ -202,13 +202,13 @@ const qa = (e, t) => {
202
202
  s in r ? r[s] = i : o(s, i);
203
203
  }
204
204
  };
205
- }, Tn = "!", Fo = ":", ol = [], Ro = (e, t, r, n, o) => ({
205
+ }, Pn = "!", Ro = ":", sl = [], Io = (e, t, r, n, o) => ({
206
206
  modifiers: e,
207
207
  hasImportantModifier: t,
208
208
  baseClassName: r,
209
209
  maybePostfixModifierPosition: n,
210
210
  isExternal: o
211
- }), sl = (e) => {
211
+ }), il = (e) => {
212
212
  const {
213
213
  prefix: t,
214
214
  experimentalParseClassName: r
@@ -220,7 +220,7 @@ const qa = (e, t) => {
220
220
  for (let k = 0; k < m; k++) {
221
221
  const P = o[k];
222
222
  if (i === 0 && l === 0) {
223
- if (P === Fo) {
223
+ if (P === Ro) {
224
224
  s.push(o.slice(c, k)), c = k + 1;
225
225
  continue;
226
226
  }
@@ -233,19 +233,19 @@ const qa = (e, t) => {
233
233
  }
234
234
  const g = s.length === 0 ? o : o.slice(c);
235
235
  let x = g, h = !1;
236
- g.endsWith(Tn) ? (x = g.slice(0, -1), h = !0) : (
236
+ g.endsWith(Pn) ? (x = g.slice(0, -1), h = !0) : (
237
237
  /**
238
238
  * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
239
239
  * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
240
240
  */
241
- g.startsWith(Tn) && (x = g.slice(1), h = !0)
241
+ g.startsWith(Pn) && (x = g.slice(1), h = !0)
242
242
  );
243
243
  const O = d && d > c ? d - c : void 0;
244
- return Ro(s, h, x, O);
244
+ return Io(s, h, x, O);
245
245
  };
246
246
  if (t) {
247
- const o = t + Fo, s = n;
248
- n = (i) => i.startsWith(o) ? s(i.slice(o.length)) : Ro(ol, !1, i, void 0, !0);
247
+ const o = t + Ro, s = n;
248
+ n = (i) => i.startsWith(o) ? s(i.slice(o.length)) : Io(sl, !1, i, void 0, !0);
249
249
  }
250
250
  if (r) {
251
251
  const o = n;
@@ -255,7 +255,7 @@ const qa = (e, t) => {
255
255
  });
256
256
  }
257
257
  return n;
258
- }, il = (e) => {
258
+ }, al = (e) => {
259
259
  const t = /* @__PURE__ */ new Map();
260
260
  return e.orderSensitiveModifiers.forEach((r, n) => {
261
261
  t.set(r, 1e6 + n);
@@ -268,26 +268,26 @@ const qa = (e, t) => {
268
268
  }
269
269
  return o.length > 0 && (o.sort(), n.push(...o)), n;
270
270
  };
271
- }, al = (e) => ({
272
- cache: nl(e.cacheSize),
273
- parseClassName: sl(e),
274
- sortModifiers: il(e),
275
- postfixLookupClassGroupIds: ll(e),
276
- ..._a(e)
277
- }), ll = (e) => {
271
+ }, ll = (e) => ({
272
+ cache: ol(e.cacheSize),
273
+ parseClassName: il(e),
274
+ sortModifiers: al(e),
275
+ postfixLookupClassGroupIds: cl(e),
276
+ ...Ka(e)
277
+ }), cl = (e) => {
278
278
  const t = /* @__PURE__ */ Object.create(null), r = e.postfixLookupClassGroups;
279
279
  if (r)
280
280
  for (let n = 0; n < r.length; n++)
281
281
  t[r[n]] = !0;
282
282
  return t;
283
- }, cl = /\s+/, ul = (e, t) => {
283
+ }, ul = /\s+/, dl = (e, t) => {
284
284
  const {
285
285
  parseClassName: r,
286
286
  getClassGroupId: n,
287
287
  getConflictingClassGroupIds: o,
288
288
  sortModifiers: s,
289
289
  postfixLookupClassGroupIds: i
290
- } = t, l = [], c = e.trim().split(cl);
290
+ } = t, l = [], c = e.trim().split(ul);
291
291
  let d = "";
292
292
  for (let m = c.length - 1; m >= 0; m -= 1) {
293
293
  const g = c[m], {
@@ -320,7 +320,7 @@ const qa = (e, t) => {
320
320
  }
321
321
  I = !1;
322
322
  }
323
- const N = h.length === 0 ? "" : h.length === 1 ? h[0] : s(h).join(":"), M = O ? N + Tn : N, j = M + E;
323
+ const N = h.length === 0 ? "" : h.length === 1 ? h[0] : s(h).join(":"), M = O ? N + Pn : N, j = M + E;
324
324
  if (l.indexOf(j) > -1)
325
325
  continue;
326
326
  l.push(j);
@@ -332,7 +332,7 @@ const qa = (e, t) => {
332
332
  d = g + (d.length > 0 ? " " + d : d);
333
333
  }
334
334
  return d;
335
- }, dl = (...e) => {
335
+ }, fl = (...e) => {
336
336
  let t = 0, r, n, o = "";
337
337
  for (; t < e.length; )
338
338
  (r = e[t++]) && (n = ri(r)) && (o && (o += " "), o += n);
@@ -344,34 +344,34 @@ const qa = (e, t) => {
344
344
  for (let n = 0; n < e.length; n++)
345
345
  e[n] && (t = ri(e[n])) && (r && (r += " "), r += t);
346
346
  return r;
347
- }, fl = (e, ...t) => {
347
+ }, hl = (e, ...t) => {
348
348
  let r, n, o, s;
349
349
  const i = (c) => {
350
350
  const d = t.reduce((m, g) => g(m), e());
351
- return r = al(d), n = r.cache.get, o = r.cache.set, s = l, l(c);
351
+ return r = ll(d), n = r.cache.get, o = r.cache.set, s = l, l(c);
352
352
  }, l = (c) => {
353
353
  const d = n(c);
354
354
  if (d)
355
355
  return d;
356
- const m = ul(c, r);
356
+ const m = dl(c, r);
357
357
  return o(c, m), m;
358
358
  };
359
- return s = i, (...c) => s(dl(...c));
360
- }, hl = [], ve = (e) => {
361
- const t = (r) => r[e] || hl;
359
+ return s = i, (...c) => s(fl(...c));
360
+ }, pl = [], ve = (e) => {
361
+ const t = (r) => r[e] || pl;
362
362
  return t.isThemeGetter = !0, t;
363
- }, ni = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, oi = /^\((?:(\w[\w-]*):)?(.+)\)$/i, pl = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, ml = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, gl = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, vl = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, bl = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, yl = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, dt = (e) => pl.test(e), Y = (e) => !!e && !Number.isNaN(Number(e)), _e = (e) => !!e && Number.isInteger(Number(e)), fn = (e) => e.endsWith("%") && Y(e.slice(0, -1)), ot = (e) => ml.test(e), si = () => !0, wl = (e) => (
363
+ }, ni = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, oi = /^\((?:(\w[\w-]*):)?(.+)\)$/i, ml = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, gl = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, vl = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, bl = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, yl = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, wl = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, dt = (e) => ml.test(e), Y = (e) => !!e && !Number.isNaN(Number(e)), _e = (e) => !!e && Number.isInteger(Number(e)), fn = (e) => e.endsWith("%") && Y(e.slice(0, -1)), ot = (e) => gl.test(e), si = () => !0, xl = (e) => (
364
364
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
365
365
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
366
366
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
367
- gl.test(e) && !vl.test(e)
368
- ), so = () => !1, xl = (e) => bl.test(e), El = (e) => yl.test(e), Sl = (e) => !W(e) && !z(e), Ol = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), kl = (e) => kt(e, li, so), W = (e) => ni.test(e), At = (e) => kt(e, ci, wl), Io = (e) => kt(e, Nl, Y), Cl = (e) => kt(e, di, si), Al = (e) => kt(e, ui, so), No = (e) => kt(e, ii, so), Tl = (e) => kt(e, ai, El), Lr = (e) => kt(e, fi, xl), z = (e) => oi.test(e), fr = (e) => qt(e, ci), Pl = (e) => qt(e, ui), $o = (e) => qt(e, ii), Fl = (e) => qt(e, li), Rl = (e) => qt(e, ai), jr = (e) => qt(e, fi, !0), Il = (e) => qt(e, di, !0), kt = (e, t, r) => {
367
+ vl.test(e) && !bl.test(e)
368
+ ), io = () => !1, El = (e) => yl.test(e), Sl = (e) => wl.test(e), Ol = (e) => !W(e) && !z(e), kl = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), Cl = (e) => kt(e, li, io), W = (e) => ni.test(e), At = (e) => kt(e, ci, xl), No = (e) => kt(e, $l, Y), Al = (e) => kt(e, di, si), Tl = (e) => kt(e, ui, io), $o = (e) => kt(e, ii, io), Pl = (e) => kt(e, ai, Sl), Lr = (e) => kt(e, fi, El), z = (e) => oi.test(e), fr = (e) => qt(e, ci), Fl = (e) => qt(e, ui), Mo = (e) => qt(e, ii), Rl = (e) => qt(e, li), Il = (e) => qt(e, ai), jr = (e) => qt(e, fi, !0), Nl = (e) => qt(e, di, !0), kt = (e, t, r) => {
369
369
  const n = ni.exec(e);
370
370
  return n ? n[1] ? t(n[1]) : r(n[2]) : !1;
371
371
  }, qt = (e, t, r = !1) => {
372
372
  const n = oi.exec(e);
373
373
  return n ? n[1] ? t(n[1]) : r : !1;
374
- }, ii = (e) => e === "position" || e === "percentage", ai = (e) => e === "image" || e === "url", li = (e) => e === "length" || e === "size" || e === "bg-size", ci = (e) => e === "length", Nl = (e) => e === "number", ui = (e) => e === "family-name", di = (e) => e === "number" || e === "weight", fi = (e) => e === "shadow", $l = () => {
374
+ }, ii = (e) => e === "position" || e === "percentage", ai = (e) => e === "image" || e === "url", li = (e) => e === "length" || e === "size" || e === "bg-size", ci = (e) => e === "length", $l = (e) => e === "number", ui = (e) => e === "family-name", di = (e) => e === "number" || e === "weight", fi = (e) => e === "shadow", Ml = () => {
375
375
  const e = ve("color"), t = ve("font"), r = ve("text"), n = ve("font-weight"), o = ve("tracking"), s = ve("leading"), i = ve("breakpoint"), l = ve("container"), c = ve("spacing"), d = ve("radius"), m = ve("shadow"), g = ve("inset-shadow"), x = ve("text-shadow"), h = ve("drop-shadow"), O = ve("blur"), k = ve("perspective"), P = ve("aspect"), I = ve("ease"), E = ve("animate"), N = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], M = () => [
376
376
  "center",
377
377
  "top",
@@ -392,11 +392,11 @@ const qa = (e, t) => {
392
392
  "left-bottom"
393
393
  ], j = () => [...M(), z, W], H = () => ["auto", "hidden", "clip", "visible", "scroll"], V = () => ["auto", "contain", "none"], a = () => [z, W, c], u = () => [dt, "full", "auto", ...a()], f = () => [_e, "none", "subgrid", z, W], w = () => ["auto", {
394
394
  span: ["full", _e, z, W]
395
- }, _e, z, W], b = () => [_e, "auto", z, W], S = () => ["auto", "min", "max", "fr", z, W], C = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], p = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], y = () => ["auto", ...a()], T = () => [dt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...a()], A = () => [dt, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...a()], F = () => [dt, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...a()], R = () => [e, z, W], U = () => [...M(), $o, No, {
395
+ }, _e, z, W], b = () => [_e, "auto", z, W], S = () => ["auto", "min", "max", "fr", z, W], C = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], p = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], y = () => ["auto", ...a()], T = () => [dt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...a()], A = () => [dt, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...a()], F = () => [dt, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...a()], R = () => [e, z, W], U = () => [...M(), Mo, $o, {
396
396
  position: [z, W]
397
397
  }], G = () => ["no-repeat", {
398
398
  repeat: ["", "x", "y", "space", "round"]
399
- }], X = () => ["auto", "cover", "contain", Fl, kl, {
399
+ }], X = () => ["auto", "cover", "contain", Rl, Cl, {
400
400
  size: [z, W]
401
401
  }], se = () => [fn, fr, At], L = () => [
402
402
  // Deprecated since Tailwind CSS v4.0.0
@@ -406,7 +406,7 @@ const qa = (e, t) => {
406
406
  d,
407
407
  z,
408
408
  W
409
- ], D = () => ["", Y, fr, At], te = () => ["solid", "dashed", "dotted", "double"], We = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], le = () => [Y, fn, $o, No], Vt = () => [
409
+ ], D = () => ["", Y, fr, At], te = () => ["solid", "dashed", "dotted", "double"], We = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], le = () => [Y, fn, Mo, $o], Vt = () => [
410
410
  // Deprecated since Tailwind CSS v4.0.0
411
411
  "",
412
412
  "none",
@@ -425,7 +425,7 @@ const qa = (e, t) => {
425
425
  container: [ot],
426
426
  "drop-shadow": [ot],
427
427
  ease: ["in", "out", "in-out"],
428
- font: [Sl],
428
+ font: [Ol],
429
429
  "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
430
430
  "inset-shadow": [ot],
431
431
  leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
@@ -465,7 +465,7 @@ const qa = (e, t) => {
465
465
  * Container Name
466
466
  * @see https://tailwindcss.com/docs/responsive-design#named-containers
467
467
  */
468
- "container-named": [Ol],
468
+ "container-named": [kl],
469
469
  /**
470
470
  * Columns
471
471
  * @see https://tailwindcss.com/docs/columns
@@ -1231,7 +1231,7 @@ const qa = (e, t) => {
1231
1231
  * @see https://tailwindcss.com/docs/font-weight
1232
1232
  */
1233
1233
  "font-weight": [{
1234
- font: [n, Il, Cl]
1234
+ font: [n, Nl, Al]
1235
1235
  }],
1236
1236
  /**
1237
1237
  * Font Stretch
@@ -1245,7 +1245,7 @@ const qa = (e, t) => {
1245
1245
  * @see https://tailwindcss.com/docs/font-family
1246
1246
  */
1247
1247
  "font-family": [{
1248
- font: [Pl, Al, t]
1248
+ font: [Fl, Tl, t]
1249
1249
  }],
1250
1250
  /**
1251
1251
  * Font Feature Settings
@@ -1296,7 +1296,7 @@ const qa = (e, t) => {
1296
1296
  * @see https://tailwindcss.com/docs/line-clamp
1297
1297
  */
1298
1298
  "line-clamp": [{
1299
- "line-clamp": [Y, "none", z, Io]
1299
+ "line-clamp": [Y, "none", z, No]
1300
1300
  }],
1301
1301
  /**
1302
1302
  * Line Height
@@ -1514,7 +1514,7 @@ const qa = (e, t) => {
1514
1514
  }, _e, z, W],
1515
1515
  radial: ["", z, W],
1516
1516
  conic: [_e, z, W]
1517
- }, Rl, Tl]
1517
+ }, Il, Pl]
1518
1518
  }],
1519
1519
  /**
1520
1520
  * Background Color
@@ -2979,7 +2979,7 @@ const qa = (e, t) => {
2979
2979
  * @see https://tailwindcss.com/docs/stroke-width
2980
2980
  */
2981
2981
  "stroke-w": [{
2982
- stroke: [Y, fr, At, Io]
2982
+ stroke: [Y, fr, At, No]
2983
2983
  }],
2984
2984
  /**
2985
2985
  * Stroke
@@ -3056,28 +3056,28 @@ const qa = (e, t) => {
3056
3056
  postfixLookupClassGroups: ["container-type"],
3057
3057
  orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
3058
3058
  };
3059
- }, Ml = /* @__PURE__ */ fl($l);
3059
+ }, Dl = /* @__PURE__ */ hl(Ml);
3060
3060
  function lr(...e) {
3061
- return Ml(Ga(e));
3061
+ return Dl(qa(e));
3062
3062
  }
3063
- const Dl = {
3063
+ const Ll = {
3064
3064
  sm: "py-1.5 px-3 text-sm rounded-lg",
3065
3065
  md: "py-2.5 px-4 text-base rounded-xl",
3066
3066
  lg: "py-3 px-5 text-lg rounded-xl"
3067
- }, io = K.forwardRef(({ className: e = "", children: t, style: r, size: n = "md", ...o }, s) => /* @__PURE__ */ $(
3067
+ }, ao = K.forwardRef(({ className: e = "", children: t, style: r, size: n = "md", ...o }, s) => /* @__PURE__ */ $(
3068
3068
  "button",
3069
3069
  {
3070
3070
  ref: s,
3071
3071
  "data-wallet-ui": !0,
3072
3072
  "data-wallet-button": !0,
3073
- className: lr("bg-[var(--wui-color-primary)] transition-colors hover:bg-[var(--wui-color-primary-hover)] text-[var(--wui-color-primary-text)] font-bold cursor-pointer disabled:opacity-50 wallet-custom-font", Dl[n], e),
3073
+ className: lr("bg-[var(--wui-color-primary)] transition-colors hover:bg-[var(--wui-color-primary-hover)] text-[var(--wui-color-primary-text)] font-bold cursor-pointer disabled:opacity-50 wallet-custom-font", Ll[n], e),
3074
3074
  style: r,
3075
3075
  ...o,
3076
3076
  type: "button",
3077
3077
  children: t || "Connect Wallet"
3078
3078
  }
3079
3079
  ));
3080
- io.displayName = "ConnectWalletButton";
3080
+ ao.displayName = "ConnectWalletButton";
3081
3081
  var Ir = class {
3082
3082
  constructor() {
3083
3083
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
@@ -3094,7 +3094,7 @@ var Ir = class {
3094
3094
  }
3095
3095
  onUnsubscribe() {
3096
3096
  }
3097
- }, Nt, pt, Kt, Fs, Ll = (Fs = class extends Ir {
3097
+ }, Nt, pt, Kt, Fs, jl = (Fs = class extends Ir {
3098
3098
  constructor() {
3099
3099
  super();
3100
3100
  Q(this, Nt);
@@ -3135,7 +3135,7 @@ var Ir = class {
3135
3135
  var t;
3136
3136
  return typeof v(this, Nt) == "boolean" ? v(this, Nt) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
3137
3137
  }
3138
- }, Nt = new WeakMap(), pt = new WeakMap(), Kt = new WeakMap(), Fs), ao = new Ll(), jl = {
3138
+ }, Nt = new WeakMap(), pt = new WeakMap(), Kt = new WeakMap(), Fs), lo = new jl(), Bl = {
3139
3139
  // We need the wrapper function syntax below instead of direct references to
3140
3140
  // global setTimeout etc.
3141
3141
  //
@@ -3150,7 +3150,7 @@ var Ir = class {
3150
3150
  clearTimeout: (e) => clearTimeout(e),
3151
3151
  setInterval: (e, t) => setInterval(e, t),
3152
3152
  clearInterval: (e) => clearInterval(e)
3153
- }, Ye, $t, Rs, Bl = (Rs = class {
3153
+ }, Ye, $t, Rs, Hl = (Rs = class {
3154
3154
  constructor() {
3155
3155
  // We cannot have TimeoutManager<T> as we must instantiate it with a concrete
3156
3156
  // type at app boot; and if we leave that type, then any new timer provider
@@ -3159,7 +3159,7 @@ var Ir = class {
3159
3159
  //
3160
3160
  // We settle for type safety for the TimeoutProvider type, and accept that
3161
3161
  // this class is unsafe internally to allow for extension.
3162
- Q(this, Ye, jl);
3162
+ Q(this, Ye, Bl);
3163
3163
  Q(this, $t, !1);
3164
3164
  }
3165
3165
  setTimeoutProvider(e) {
@@ -3180,17 +3180,17 @@ var Ir = class {
3180
3180
  clearInterval(e) {
3181
3181
  v(this, Ye).clearInterval(e);
3182
3182
  }
3183
- }, Ye = new WeakMap(), $t = new WeakMap(), Rs), Ft = new Bl();
3184
- function Hl(e) {
3183
+ }, Ye = new WeakMap(), $t = new WeakMap(), Rs), Ft = new Hl();
3184
+ function Ul(e) {
3185
3185
  setTimeout(e, 0);
3186
3186
  }
3187
- var Ul = typeof window > "u" || "Deno" in globalThis;
3187
+ var Wl = typeof window > "u" || "Deno" in globalThis;
3188
3188
  function Fe() {
3189
3189
  }
3190
- function Wl(e, t) {
3190
+ function zl(e, t) {
3191
3191
  return typeof e == "function" ? e(t) : e;
3192
3192
  }
3193
- function Pn(e) {
3193
+ function Fn(e) {
3194
3194
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
3195
3195
  }
3196
3196
  function hi(e, t) {
@@ -3202,7 +3202,7 @@ function Et(e, t) {
3202
3202
  function $e(e, t) {
3203
3203
  return typeof e == "function" ? e(t) : e;
3204
3204
  }
3205
- function Mo(e, t) {
3205
+ function Do(e, t) {
3206
3206
  const {
3207
3207
  type: r = "all",
3208
3208
  exact: n,
@@ -3213,7 +3213,7 @@ function Mo(e, t) {
3213
3213
  } = e;
3214
3214
  if (i) {
3215
3215
  if (n) {
3216
- if (t.queryHash !== lo(i, t.options))
3216
+ if (t.queryHash !== co(i, t.options))
3217
3217
  return !1;
3218
3218
  } else if (!Er(t.queryKey, i))
3219
3219
  return !1;
@@ -3225,7 +3225,7 @@ function Mo(e, t) {
3225
3225
  }
3226
3226
  return !(typeof l == "boolean" && t.isStale() !== l || o && o !== t.state.fetchStatus || s && !s(t));
3227
3227
  }
3228
- function Do(e, t) {
3228
+ function Lo(e, t) {
3229
3229
  const { exact: r, status: n, predicate: o, mutationKey: s } = e;
3230
3230
  if (s) {
3231
3231
  if (!t.options.mutationKey)
@@ -3238,43 +3238,43 @@ function Do(e, t) {
3238
3238
  }
3239
3239
  return !(n && t.state.status !== n || o && !o(t));
3240
3240
  }
3241
- function lo(e, t) {
3241
+ function co(e, t) {
3242
3242
  return ((t == null ? void 0 : t.queryKeyHashFn) || xr)(e);
3243
3243
  }
3244
3244
  function xr(e) {
3245
3245
  return JSON.stringify(
3246
3246
  e,
3247
- (t, r) => In(r) ? Object.keys(r).sort().reduce((n, o) => (n[o] = r[o], n), {}) : r
3247
+ (t, r) => Nn(r) ? Object.keys(r).sort().reduce((n, o) => (n[o] = r[o], n), {}) : r
3248
3248
  );
3249
3249
  }
3250
3250
  function Er(e, t) {
3251
3251
  return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((r) => Er(e[r], t[r])) : !1;
3252
3252
  }
3253
- var zl = Object.prototype.hasOwnProperty;
3254
- function Fn(e, t, r = 0) {
3253
+ var Gl = Object.prototype.hasOwnProperty;
3254
+ function Rn(e, t, r = 0) {
3255
3255
  if (e === t)
3256
3256
  return e;
3257
3257
  if (r > 500) return t;
3258
- const n = Lo(e) && Lo(t);
3259
- if (!n && !(In(e) && In(t))) return t;
3258
+ const n = jo(e) && jo(t);
3259
+ if (!n && !(Nn(e) && Nn(t))) return t;
3260
3260
  const s = (n ? e : Object.keys(e)).length, i = n ? t : Object.keys(t), l = i.length, c = n ? new Array(l) : {};
3261
3261
  let d = 0;
3262
3262
  for (let m = 0; m < l; m++) {
3263
3263
  const g = n ? m : i[m], x = e[g], h = t[g];
3264
3264
  if (x === h) {
3265
- c[g] = x, (n ? m < s : zl.call(e, g)) && d++;
3265
+ c[g] = x, (n ? m < s : Gl.call(e, g)) && d++;
3266
3266
  continue;
3267
3267
  }
3268
3268
  if (x === null || h === null || typeof x != "object" || typeof h != "object") {
3269
3269
  c[g] = h;
3270
3270
  continue;
3271
3271
  }
3272
- const O = Fn(x, h, r + 1);
3272
+ const O = Rn(x, h, r + 1);
3273
3273
  c[g] = O, O === x && d++;
3274
3274
  }
3275
3275
  return s === l && d === s ? e : c;
3276
3276
  }
3277
- function Rn(e, t) {
3277
+ function In(e, t) {
3278
3278
  if (!t || Object.keys(e).length !== Object.keys(t).length)
3279
3279
  return !1;
3280
3280
  for (const r in e)
@@ -3282,47 +3282,47 @@ function Rn(e, t) {
3282
3282
  return !1;
3283
3283
  return !0;
3284
3284
  }
3285
- function Lo(e) {
3285
+ function jo(e) {
3286
3286
  return Array.isArray(e) && e.length === Object.keys(e).length;
3287
3287
  }
3288
- function In(e) {
3289
- if (!jo(e))
3288
+ function Nn(e) {
3289
+ if (!Bo(e))
3290
3290
  return !1;
3291
3291
  const t = e.constructor;
3292
3292
  if (t === void 0)
3293
3293
  return !0;
3294
3294
  const r = t.prototype;
3295
- return !(!jo(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
3295
+ return !(!Bo(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
3296
3296
  }
3297
- function jo(e) {
3297
+ function Bo(e) {
3298
3298
  return Object.prototype.toString.call(e) === "[object Object]";
3299
3299
  }
3300
- function Gl(e) {
3300
+ function ql(e) {
3301
3301
  return new Promise((t) => {
3302
3302
  Ft.setTimeout(t, e);
3303
3303
  });
3304
3304
  }
3305
- function Nn(e, t, r) {
3305
+ function $n(e, t, r) {
3306
3306
  if (typeof r.structuralSharing == "function")
3307
3307
  return r.structuralSharing(e, t);
3308
3308
  if (r.structuralSharing !== !1) {
3309
3309
  if (process.env.NODE_ENV !== "production")
3310
3310
  try {
3311
- return Fn(e, t);
3311
+ return Rn(e, t);
3312
3312
  } catch (n) {
3313
3313
  throw console.error(
3314
3314
  `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`
3315
3315
  ), n;
3316
3316
  }
3317
- return Fn(e, t);
3317
+ return Rn(e, t);
3318
3318
  }
3319
3319
  return t;
3320
3320
  }
3321
- function ql(e, t, r = 0) {
3321
+ function Vl(e, t, r = 0) {
3322
3322
  const n = [...e, t];
3323
3323
  return r && n.length > r ? n.slice(1) : n;
3324
3324
  }
3325
- function Vl(e, t, r = 0) {
3325
+ function Ql(e, t, r = 0) {
3326
3326
  const n = [t, ...e];
3327
3327
  return r && n.length > r ? n.slice(0, -1) : n;
3328
3328
  }
@@ -3335,7 +3335,7 @@ function pi(e, t) {
3335
3335
  function mi(e, t) {
3336
3336
  return typeof e == "function" ? e(...t) : !!e;
3337
3337
  }
3338
- function Ql(e, t, r) {
3338
+ function _l(e, t, r) {
3339
3339
  let n = !1, o;
3340
3340
  return Object.defineProperty(e, "signal", {
3341
3341
  enumerable: !0,
@@ -3343,7 +3343,7 @@ function Ql(e, t, r) {
3343
3343
  }), e;
3344
3344
  }
3345
3345
  var Sr = /* @__PURE__ */ (() => {
3346
- let e = () => Ul;
3346
+ let e = () => Wl;
3347
3347
  return {
3348
3348
  /**
3349
3349
  * Returns whether the current runtime should be treated as a server environment.
@@ -3359,7 +3359,7 @@ var Sr = /* @__PURE__ */ (() => {
3359
3359
  }
3360
3360
  };
3361
3361
  })();
3362
- function $n() {
3362
+ function Mn() {
3363
3363
  let e, t;
3364
3364
  const r = new Promise((o, s) => {
3365
3365
  e = o, t = s;
@@ -3381,13 +3381,13 @@ function $n() {
3381
3381
  }), t(o);
3382
3382
  }, r;
3383
3383
  }
3384
- var _l = Hl;
3385
- function Kl() {
3384
+ var Kl = Ul;
3385
+ function Yl() {
3386
3386
  let e = [], t = 0, r = (l) => {
3387
3387
  l();
3388
3388
  }, n = (l) => {
3389
3389
  l();
3390
- }, o = _l;
3390
+ }, o = Kl;
3391
3391
  const s = (l) => {
3392
3392
  t ? e.push(l) : o(() => {
3393
3393
  r(l);
@@ -3441,7 +3441,7 @@ function Kl() {
3441
3441
  }
3442
3442
  };
3443
3443
  }
3444
- var we = Kl(), Yt, mt, Xt, Is, Yl = (Is = class extends Ir {
3444
+ var we = Yl(), Yt, mt, Xt, Is, Xl = (Is = class extends Ir {
3445
3445
  constructor() {
3446
3446
  super();
3447
3447
  Q(this, Yt, !0);
@@ -3475,31 +3475,31 @@ var we = Kl(), Yt, mt, Xt, Is, Yl = (Is = class extends Ir {
3475
3475
  isOnline() {
3476
3476
  return v(this, Yt);
3477
3477
  }
3478
- }, Yt = new WeakMap(), mt = new WeakMap(), Xt = new WeakMap(), Is), Jr = new Yl();
3479
- function Xl(e) {
3478
+ }, Yt = new WeakMap(), mt = new WeakMap(), Xt = new WeakMap(), Is), Jr = new Xl();
3479
+ function Jl(e) {
3480
3480
  return Math.min(1e3 * 2 ** e, 3e4);
3481
3481
  }
3482
3482
  function gi(e) {
3483
3483
  return (e ?? "online") === "online" ? Jr.isOnline() : !0;
3484
3484
  }
3485
- var Mn = class extends Error {
3485
+ var Dn = class extends Error {
3486
3486
  constructor(e) {
3487
3487
  super("CancelledError"), this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
3488
3488
  }
3489
3489
  };
3490
3490
  function vi(e) {
3491
3491
  let t = !1, r = 0, n;
3492
- const o = $n(), s = () => o.status !== "pending", i = (k) => {
3492
+ const o = Mn(), s = () => o.status !== "pending", i = (k) => {
3493
3493
  var P;
3494
3494
  if (!s()) {
3495
- const I = new Mn(k);
3495
+ const I = new Dn(k);
3496
3496
  x(I), (P = e.onCancel) == null || P.call(e, I);
3497
3497
  }
3498
3498
  }, l = () => {
3499
3499
  t = !0;
3500
3500
  }, c = () => {
3501
3501
  t = !1;
3502
- }, d = () => ao.isFocused() && (e.networkMode === "always" || Jr.isOnline()) && e.canRun(), m = () => gi(e.networkMode) && e.canRun(), g = (k) => {
3502
+ }, d = () => lo.isFocused() && (e.networkMode === "always" || Jr.isOnline()) && e.canRun(), m = () => gi(e.networkMode) && e.canRun(), g = (k) => {
3503
3503
  s() || (n == null || n(), o.resolve(k));
3504
3504
  }, x = (k) => {
3505
3505
  s() || (n == null || n(), o.reject(k));
@@ -3525,12 +3525,12 @@ function vi(e) {
3525
3525
  var H;
3526
3526
  if (s())
3527
3527
  return;
3528
- const E = e.retry ?? (Sr.isServer() ? 0 : 3), N = e.retryDelay ?? Xl, M = typeof N == "function" ? N(r, I) : N, j = E === !0 || typeof E == "number" && r < E || typeof E == "function" && E(r, I);
3528
+ const E = e.retry ?? (Sr.isServer() ? 0 : 3), N = e.retryDelay ?? Jl, M = typeof N == "function" ? N(r, I) : N, j = E === !0 || typeof E == "number" && r < E || typeof E == "function" && E(r, I);
3529
3529
  if (t || !j) {
3530
3530
  x(I);
3531
3531
  return;
3532
3532
  }
3533
- r++, (H = e.onFail) == null || H.call(e, r, I), Gl(M).then(() => d() ? void 0 : h()).then(() => {
3533
+ r++, (H = e.onFail) == null || H.call(e, r, I), ql(M).then(() => d() ? void 0 : h()).then(() => {
3534
3534
  t ? x(I) : O();
3535
3535
  });
3536
3536
  });
@@ -3554,7 +3554,7 @@ var Mt, Ns, bi = (Ns = class {
3554
3554
  this.clearGcTimeout();
3555
3555
  }
3556
3556
  scheduleGc() {
3557
- this.clearGcTimeout(), Pn(this.gcTime) && B(this, Mt, Ft.setTimeout(() => {
3557
+ this.clearGcTimeout(), Fn(this.gcTime) && B(this, Mt, Ft.setTimeout(() => {
3558
3558
  this.optionalRemove();
3559
3559
  }, this.gcTime));
3560
3560
  }
@@ -3568,7 +3568,7 @@ var Mt, Ns, bi = (Ns = class {
3568
3568
  v(this, Mt) !== void 0 && (Ft.clearTimeout(v(this, Mt)), B(this, Mt, void 0));
3569
3569
  }
3570
3570
  }, Mt = new WeakMap(), Ns);
3571
- function Jl(e) {
3571
+ function Zl(e) {
3572
3572
  return {
3573
3573
  onFetch: (t, r) => {
3574
3574
  var m, g, x, h, O;
@@ -3577,7 +3577,7 @@ function Jl(e) {
3577
3577
  const d = async () => {
3578
3578
  let k = !1;
3579
3579
  const P = (N) => {
3580
- Ql(
3580
+ _l(
3581
3581
  N,
3582
3582
  () => t.signal,
3583
3583
  () => k = !0
@@ -3596,14 +3596,14 @@ function Jl(e) {
3596
3596
  meta: t.options.meta
3597
3597
  };
3598
3598
  return P(w), w;
3599
- })(), a = await I(V), { maxPages: u } = t.options, f = j ? Vl : ql;
3599
+ })(), a = await I(V), { maxPages: u } = t.options, f = j ? Ql : Vl;
3600
3600
  return {
3601
3601
  pages: f(N.pages, a, u),
3602
3602
  pageParams: f(N.pageParams, M, u)
3603
3603
  };
3604
3604
  };
3605
3605
  if (o && s.length) {
3606
- const N = o === "backward", M = N ? Zl : Bo, j = {
3606
+ const N = o === "backward", M = N ? ec : Ho, j = {
3607
3607
  pages: s,
3608
3608
  pageParams: i
3609
3609
  }, H = M(n, j);
@@ -3611,7 +3611,7 @@ function Jl(e) {
3611
3611
  } else {
3612
3612
  const N = e ?? s.length;
3613
3613
  do {
3614
- const M = c === 0 ? i[0] ?? n.initialPageParam : Bo(n, l);
3614
+ const M = c === 0 ? i[0] ?? n.initialPageParam : Ho(n, l);
3615
3615
  if (c > 0 && M == null)
3616
3616
  break;
3617
3617
  l = await E(l, M), c++;
@@ -3636,7 +3636,7 @@ function Jl(e) {
3636
3636
  }
3637
3637
  };
3638
3638
  }
3639
- function Bo(e, { pages: t, pageParams: r }) {
3639
+ function Ho(e, { pages: t, pageParams: r }) {
3640
3640
  const n = t.length - 1;
3641
3641
  return t.length > 0 ? e.getNextPageParam(
3642
3642
  t[n],
@@ -3645,11 +3645,11 @@ function Bo(e, { pages: t, pageParams: r }) {
3645
3645
  r
3646
3646
  ) : void 0;
3647
3647
  }
3648
- function Zl(e, { pages: t, pageParams: r }) {
3648
+ function ec(e, { pages: t, pageParams: r }) {
3649
3649
  var n;
3650
3650
  return t.length > 0 ? (n = e.getPreviousPageParam) == null ? void 0 : n.call(e, t[0], t, r[0], r) : void 0;
3651
3651
  }
3652
- var Jt, Dt, Zt, He, Lt, be, Cr, jt, Ne, yi, it, $s, ec = ($s = class extends bi {
3652
+ var Jt, Dt, Zt, He, Lt, be, Cr, jt, Ne, yi, it, $s, tc = ($s = class extends bi {
3653
3653
  constructor(t) {
3654
3654
  super();
3655
3655
  Q(this, Ne);
@@ -3661,7 +3661,7 @@ var Jt, Dt, Zt, He, Lt, be, Cr, jt, Ne, yi, it, $s, ec = ($s = class extends bi
3661
3661
  Q(this, be);
3662
3662
  Q(this, Cr);
3663
3663
  Q(this, jt);
3664
- B(this, jt, !1), B(this, Cr, t.defaultOptions), this.setOptions(t.options), this.observers = [], B(this, Lt, t.client), B(this, He, v(this, Lt).getQueryCache()), this.queryKey = t.queryKey, this.queryHash = t.queryHash, B(this, Dt, Uo(this.options)), this.state = t.state ?? v(this, Dt), this.scheduleGc();
3664
+ B(this, jt, !1), B(this, Cr, t.defaultOptions), this.setOptions(t.options), this.observers = [], B(this, Lt, t.client), B(this, He, v(this, Lt).getQueryCache()), this.queryKey = t.queryKey, this.queryHash = t.queryHash, B(this, Dt, Wo(this.options)), this.state = t.state ?? v(this, Dt), this.scheduleGc();
3665
3665
  }
3666
3666
  get meta() {
3667
3667
  return this.options.meta;
@@ -3675,9 +3675,9 @@ var Jt, Dt, Zt, He, Lt, be, Cr, jt, Ne, yi, it, $s, ec = ($s = class extends bi
3675
3675
  }
3676
3676
  setOptions(t) {
3677
3677
  if (this.options = { ...v(this, Cr), ...t }, t != null && t._type && B(this, Jt, t._type), this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
3678
- const r = Uo(this.options);
3678
+ const r = Wo(this.options);
3679
3679
  r.data !== void 0 && (this.setState(
3680
- Ho(r.data, r.dataUpdatedAt)
3680
+ Uo(r.data, r.dataUpdatedAt)
3681
3681
  ), B(this, Dt, r));
3682
3682
  }
3683
3683
  }
@@ -3685,7 +3685,7 @@ var Jt, Dt, Zt, He, Lt, be, Cr, jt, Ne, yi, it, $s, ec = ($s = class extends bi
3685
3685
  !this.observers.length && this.state.fetchStatus === "idle" && v(this, He).remove(this);
3686
3686
  }
3687
3687
  setData(t, r) {
3688
- const n = Nn(this.state.data, t, this.options);
3688
+ const n = $n(this.state.data, t, this.options);
3689
3689
  return J(this, Ne, it).call(this, {
3690
3690
  data: n,
3691
3691
  type: "success",
@@ -3803,14 +3803,14 @@ var Jt, Dt, Zt, He, Lt, be, Cr, jt, Ne, yi, it, $s, ec = ($s = class extends bi
3803
3803
  fetchFn: s
3804
3804
  };
3805
3805
  return o(M), M;
3806
- })(), c = v(this, Jt) === "infinite" ? Jl(
3806
+ })(), c = v(this, Jt) === "infinite" ? Zl(
3807
3807
  this.options.pages
3808
3808
  ) : this.options.behavior;
3809
3809
  c == null || c.onFetch(l, this), B(this, Zt, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((m = l.fetchOptions) == null ? void 0 : m.meta)) && J(this, Ne, it).call(this, { type: "fetch", meta: (g = l.fetchOptions) == null ? void 0 : g.meta }), B(this, be, vi({
3810
3810
  initialPromise: r == null ? void 0 : r.initialPromise,
3811
3811
  fn: l.fetchFn,
3812
3812
  onCancel: (M) => {
3813
- M instanceof Mn && M.revert && this.setState({
3813
+ M instanceof Dn && M.revert && this.setState({
3814
3814
  ...v(this, Zt),
3815
3815
  fetchStatus: "idle"
3816
3816
  }), n.abort();
@@ -3842,7 +3842,7 @@ var Jt, Dt, Zt, He, Lt, be, Cr, jt, Ne, yi, it, $s, ec = ($s = class extends bi
3842
3842
  this
3843
3843
  ), M;
3844
3844
  } catch (M) {
3845
- if (M instanceof Mn) {
3845
+ if (M instanceof Dn) {
3846
3846
  if (M.silent)
3847
3847
  return v(this, be).promise;
3848
3848
  if (M.revert) {
@@ -3898,7 +3898,7 @@ var Jt, Dt, Zt, He, Lt, be, Cr, jt, Ne, yi, it, $s, ec = ($s = class extends bi
3898
3898
  case "success":
3899
3899
  const o = {
3900
3900
  ...n,
3901
- ...Ho(t.data, t.dataUpdatedAt),
3901
+ ...Uo(t.data, t.dataUpdatedAt),
3902
3902
  dataUpdateCount: n.dataUpdateCount + 1,
3903
3903
  ...!t.manual && {
3904
3904
  fetchStatus: "idle",
@@ -3951,7 +3951,7 @@ function wi(e, t) {
3951
3951
  }
3952
3952
  };
3953
3953
  }
3954
- function Ho(e, t) {
3954
+ function Uo(e, t) {
3955
3955
  return {
3956
3956
  data: e,
3957
3957
  dataUpdatedAt: t ?? Date.now(),
@@ -3960,7 +3960,7 @@ function Ho(e, t) {
3960
3960
  status: "success"
3961
3961
  };
3962
3962
  }
3963
- function Uo(e) {
3963
+ function Wo(e) {
3964
3964
  const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, r = t !== void 0, n = r ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
3965
3965
  return {
3966
3966
  data: t,
@@ -3977,7 +3977,7 @@ function Uo(e) {
3977
3977
  fetchStatus: "idle"
3978
3978
  };
3979
3979
  }
3980
- var Pe, Z, Ar, Ce, Bt, er, at, gt, Tr, tr, rr, Ht, Ut, vt, nr, oe, mr, Dn, Ln, jn, Bn, Hn, Un, Wn, xi, Ms, tc = (Ms = class extends Ir {
3980
+ var Pe, Z, Ar, Ce, Bt, er, at, gt, Tr, tr, rr, Ht, Ut, vt, nr, oe, mr, Ln, jn, Bn, Hn, Un, Wn, zn, xi, Ms, rc = (Ms = class extends Ir {
3981
3981
  constructor(t, r) {
3982
3982
  super();
3983
3983
  Q(this, oe);
@@ -3998,33 +3998,33 @@ var Pe, Z, Ar, Ce, Bt, er, at, gt, Tr, tr, rr, Ht, Ut, vt, nr, oe, mr, Dn, Ln, j
3998
3998
  Q(this, Ut);
3999
3999
  Q(this, vt);
4000
4000
  Q(this, nr, /* @__PURE__ */ new Set());
4001
- this.options = r, B(this, Pe, t), B(this, gt, null), B(this, at, $n()), this.bindMethods(), this.setOptions(r);
4001
+ this.options = r, B(this, Pe, t), B(this, gt, null), B(this, at, Mn()), this.bindMethods(), this.setOptions(r);
4002
4002
  }
4003
4003
  bindMethods() {
4004
4004
  this.refetch = this.refetch.bind(this);
4005
4005
  }
4006
4006
  onSubscribe() {
4007
- this.listeners.size === 1 && (v(this, Z).addObserver(this), Wo(v(this, Z), this.options) ? J(this, oe, mr).call(this) : this.updateResult(), J(this, oe, Bn).call(this));
4007
+ this.listeners.size === 1 && (v(this, Z).addObserver(this), zo(v(this, Z), this.options) ? J(this, oe, mr).call(this) : this.updateResult(), J(this, oe, Hn).call(this));
4008
4008
  }
4009
4009
  onUnsubscribe() {
4010
4010
  this.hasListeners() || this.destroy();
4011
4011
  }
4012
4012
  shouldFetchOnReconnect() {
4013
- return zn(
4013
+ return Gn(
4014
4014
  v(this, Z),
4015
4015
  this.options,
4016
4016
  this.options.refetchOnReconnect
4017
4017
  );
4018
4018
  }
4019
4019
  shouldFetchOnWindowFocus() {
4020
- return zn(
4020
+ return Gn(
4021
4021
  v(this, Z),
4022
4022
  this.options,
4023
4023
  this.options.refetchOnWindowFocus
4024
4024
  );
4025
4025
  }
4026
4026
  destroy() {
4027
- this.listeners = /* @__PURE__ */ new Set(), J(this, oe, Hn).call(this), J(this, oe, Un).call(this), v(this, Z).removeObserver(this);
4027
+ this.listeners = /* @__PURE__ */ new Set(), J(this, oe, Un).call(this), J(this, oe, Wn).call(this), v(this, Z).removeObserver(this);
4028
4028
  }
4029
4029
  setOptions(t) {
4030
4030
  const r = this.options, n = v(this, Z);
@@ -4032,24 +4032,24 @@ var Pe, Z, Ar, Ce, Bt, er, at, gt, Tr, tr, rr, Ht, Ut, vt, nr, oe, mr, Dn, Ln, j
4032
4032
  throw new Error(
4033
4033
  "Expected enabled to be a boolean or a callback that returns a boolean"
4034
4034
  );
4035
- J(this, oe, Wn).call(this), v(this, Z).setOptions(this.options), r._defaulted && !Rn(this.options, r) && v(this, Pe).getQueryCache().notify({
4035
+ J(this, oe, zn).call(this), v(this, Z).setOptions(this.options), r._defaulted && !In(this.options, r) && v(this, Pe).getQueryCache().notify({
4036
4036
  type: "observerOptionsUpdated",
4037
4037
  query: v(this, Z),
4038
4038
  observer: this
4039
4039
  });
4040
4040
  const o = this.hasListeners();
4041
- o && zo(
4041
+ o && Go(
4042
4042
  v(this, Z),
4043
4043
  n,
4044
4044
  this.options,
4045
4045
  r
4046
- ) && J(this, oe, mr).call(this), this.updateResult(), o && (v(this, Z) !== n || $e(this.options.enabled, v(this, Z)) !== $e(r.enabled, v(this, Z)) || Et(this.options.staleTime, v(this, Z)) !== Et(r.staleTime, v(this, Z))) && J(this, oe, Dn).call(this);
4047
- const s = J(this, oe, Ln).call(this);
4048
- o && (v(this, Z) !== n || $e(this.options.enabled, v(this, Z)) !== $e(r.enabled, v(this, Z)) || s !== v(this, vt)) && J(this, oe, jn).call(this, s);
4046
+ ) && J(this, oe, mr).call(this), this.updateResult(), o && (v(this, Z) !== n || $e(this.options.enabled, v(this, Z)) !== $e(r.enabled, v(this, Z)) || Et(this.options.staleTime, v(this, Z)) !== Et(r.staleTime, v(this, Z))) && J(this, oe, Ln).call(this);
4047
+ const s = J(this, oe, jn).call(this);
4048
+ o && (v(this, Z) !== n || $e(this.options.enabled, v(this, Z)) !== $e(r.enabled, v(this, Z)) || s !== v(this, vt)) && J(this, oe, Bn).call(this, s);
4049
4049
  }
4050
4050
  getOptimisticResult(t) {
4051
4051
  const r = v(this, Pe).getQueryCache().build(v(this, Pe), t), n = this.createResult(r, t);
4052
- return nc(this, n) && (B(this, Ce, n), B(this, er, this.options), B(this, Bt, v(this, Z).state)), n;
4052
+ return oc(this, n) && (B(this, Ce, n), B(this, er, this.options), B(this, Bt, v(this, Z).state)), n;
4053
4053
  }
4054
4054
  getCurrentResult() {
4055
4055
  return v(this, Ce);
@@ -4089,7 +4089,7 @@ var Pe, Z, Ar, Ce, Bt, er, at, gt, Tr, tr, rr, Ht, Ut, vt, nr, oe, mr, Dn, Ln, j
4089
4089
  const n = v(this, Z), o = this.options, s = v(this, Ce), i = v(this, Bt), l = v(this, er), d = t !== n ? t.state : v(this, Ar), { state: m } = t;
4090
4090
  let g = { ...m }, x = !1, h;
4091
4091
  if (r._optimisticResults) {
4092
- const f = this.hasListeners(), w = !f && Wo(t, r), b = f && zo(t, n, r, o);
4092
+ const f = this.hasListeners(), w = !f && zo(t, r), b = f && Go(t, n, r, o);
4093
4093
  (w || b) && (g = {
4094
4094
  ...g,
4095
4095
  ...wi(m.data, t.options)
@@ -4103,7 +4103,7 @@ var Pe, Z, Ar, Ce, Bt, er, at, gt, Tr, tr, rr, Ht, Ut, vt, nr, oe, mr, Dn, Ln, j
4103
4103
  s != null && s.isPlaceholderData && r.placeholderData === (l == null ? void 0 : l.placeholderData) ? (f = s.data, I = !0) : f = typeof r.placeholderData == "function" ? r.placeholderData(
4104
4104
  (u = v(this, rr)) == null ? void 0 : u.state.data,
4105
4105
  v(this, rr)
4106
- ) : r.placeholderData, f !== void 0 && (P = "success", h = Nn(
4106
+ ) : r.placeholderData, f !== void 0 && (P = "success", h = $n(
4107
4107
  s == null ? void 0 : s.data,
4108
4108
  f,
4109
4109
  r
@@ -4114,7 +4114,7 @@ var Pe, Z, Ar, Ce, Bt, er, at, gt, Tr, tr, rr, Ht, Ut, vt, nr, oe, mr, Dn, Ln, j
4114
4114
  h = v(this, tr);
4115
4115
  else
4116
4116
  try {
4117
- B(this, Tr, r.select), h = r.select(h), h = Nn(s == null ? void 0 : s.data, h, r), B(this, tr, h), B(this, gt, null);
4117
+ B(this, Tr, r.select), h = r.select(h), h = $n(s == null ? void 0 : s.data, h, r), B(this, tr, h), B(this, gt, null);
4118
4118
  } catch (f) {
4119
4119
  B(this, gt, f);
4120
4120
  }
@@ -4142,7 +4142,7 @@ var Pe, Z, Ar, Ce, Bt, er, at, gt, Tr, tr, rr, Ht, Ut, vt, nr, oe, mr, Dn, Ln, j
4142
4142
  isPaused: g.fetchStatus === "paused",
4143
4143
  isPlaceholderData: x,
4144
4144
  isRefetchError: M && H,
4145
- isStale: co(t, r),
4145
+ isStale: uo(t, r),
4146
4146
  refetch: this.refetch,
4147
4147
  promise: v(this, at),
4148
4148
  isEnabled: $e(r.enabled, t) !== !1
@@ -4151,7 +4151,7 @@ var Pe, Z, Ar, Ce, Bt, er, at, gt, Tr, tr, rr, Ht, Ut, vt, nr, oe, mr, Dn, Ln, j
4151
4151
  const f = a.data !== void 0, w = a.status === "error" && !f, b = (p) => {
4152
4152
  w ? p.reject(a.error) : f && p.resolve(a.data);
4153
4153
  }, S = () => {
4154
- const p = B(this, at, a.promise = $n());
4154
+ const p = B(this, at, a.promise = Mn());
4155
4155
  b(p);
4156
4156
  }, C = v(this, at);
4157
4157
  switch (C.status) {
@@ -4170,7 +4170,7 @@ var Pe, Z, Ar, Ce, Bt, er, at, gt, Tr, tr, rr, Ht, Ut, vt, nr, oe, mr, Dn, Ln, j
4170
4170
  }
4171
4171
  updateResult() {
4172
4172
  const t = v(this, Ce), r = this.createResult(v(this, Z), this.options);
4173
- if (B(this, Bt, v(this, Z).state), B(this, er, this.options), v(this, Bt).data !== void 0 && B(this, rr, v(this, Z)), Rn(r, t))
4173
+ if (B(this, Bt, v(this, Z).state), B(this, er, this.options), v(this, Bt).data !== void 0 && B(this, rr, v(this, Z)), In(r, t))
4174
4174
  return;
4175
4175
  B(this, Ce, r);
4176
4176
  const n = () => {
@@ -4190,40 +4190,40 @@ var Pe, Z, Ar, Ce, Bt, er, at, gt, Tr, tr, rr, Ht, Ut, vt, nr, oe, mr, Dn, Ln, j
4190
4190
  J(this, oe, xi).call(this, { listeners: n() });
4191
4191
  }
4192
4192
  onQueryUpdate() {
4193
- this.updateResult(), this.hasListeners() && J(this, oe, Bn).call(this);
4193
+ this.updateResult(), this.hasListeners() && J(this, oe, Hn).call(this);
4194
4194
  }
4195
4195
  }, Pe = new WeakMap(), Z = new WeakMap(), Ar = new WeakMap(), Ce = new WeakMap(), Bt = new WeakMap(), er = new WeakMap(), at = new WeakMap(), gt = new WeakMap(), Tr = new WeakMap(), tr = new WeakMap(), rr = new WeakMap(), Ht = new WeakMap(), Ut = new WeakMap(), vt = new WeakMap(), nr = new WeakMap(), oe = new WeakSet(), mr = function(t) {
4196
- J(this, oe, Wn).call(this);
4196
+ J(this, oe, zn).call(this);
4197
4197
  let r = v(this, Z).fetch(
4198
4198
  this.options,
4199
4199
  t
4200
4200
  );
4201
4201
  return t != null && t.throwOnError || (r = r.catch(Fe)), r;
4202
- }, Dn = function() {
4203
- J(this, oe, Hn).call(this);
4202
+ }, Ln = function() {
4203
+ J(this, oe, Un).call(this);
4204
4204
  const t = Et(
4205
4205
  this.options.staleTime,
4206
4206
  v(this, Z)
4207
4207
  );
4208
- if (Sr.isServer() || v(this, Ce).isStale || !Pn(t))
4208
+ if (Sr.isServer() || v(this, Ce).isStale || !Fn(t))
4209
4209
  return;
4210
4210
  const n = hi(v(this, Ce).dataUpdatedAt, t) + 1;
4211
4211
  B(this, Ht, Ft.setTimeout(() => {
4212
4212
  v(this, Ce).isStale || this.updateResult();
4213
4213
  }, n));
4214
- }, Ln = function() {
4214
+ }, jn = function() {
4215
4215
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(v(this, Z)) : this.options.refetchInterval) ?? !1;
4216
- }, jn = function(t) {
4217
- J(this, oe, Un).call(this), B(this, vt, t), !(Sr.isServer() || $e(this.options.enabled, v(this, Z)) === !1 || !Pn(v(this, vt)) || v(this, vt) === 0) && B(this, Ut, Ft.setInterval(() => {
4218
- (this.options.refetchIntervalInBackground || ao.isFocused()) && J(this, oe, mr).call(this);
4216
+ }, Bn = function(t) {
4217
+ J(this, oe, Wn).call(this), B(this, vt, t), !(Sr.isServer() || $e(this.options.enabled, v(this, Z)) === !1 || !Fn(v(this, vt)) || v(this, vt) === 0) && B(this, Ut, Ft.setInterval(() => {
4218
+ (this.options.refetchIntervalInBackground || lo.isFocused()) && J(this, oe, mr).call(this);
4219
4219
  }, v(this, vt)));
4220
- }, Bn = function() {
4221
- J(this, oe, Dn).call(this), J(this, oe, jn).call(this, J(this, oe, Ln).call(this));
4222
4220
  }, Hn = function() {
4223
- v(this, Ht) !== void 0 && (Ft.clearTimeout(v(this, Ht)), B(this, Ht, void 0));
4221
+ J(this, oe, Ln).call(this), J(this, oe, Bn).call(this, J(this, oe, jn).call(this));
4224
4222
  }, Un = function() {
4225
- v(this, Ut) !== void 0 && (Ft.clearInterval(v(this, Ut)), B(this, Ut, void 0));
4223
+ v(this, Ht) !== void 0 && (Ft.clearTimeout(v(this, Ht)), B(this, Ht, void 0));
4226
4224
  }, Wn = function() {
4225
+ v(this, Ut) !== void 0 && (Ft.clearInterval(v(this, Ut)), B(this, Ut, void 0));
4226
+ }, zn = function() {
4227
4227
  const t = v(this, Pe).getQueryCache().build(v(this, Pe), this.options);
4228
4228
  if (t === v(this, Z))
4229
4229
  return;
@@ -4239,29 +4239,29 @@ var Pe, Z, Ar, Ce, Bt, er, at, gt, Tr, tr, rr, Ht, Ut, vt, nr, oe, mr, Dn, Ln, j
4239
4239
  });
4240
4240
  });
4241
4241
  }, Ms);
4242
- function rc(e, t) {
4242
+ function nc(e, t) {
4243
4243
  return $e(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && $e(t.retryOnMount, e) === !1);
4244
4244
  }
4245
- function Wo(e, t) {
4246
- return rc(e, t) || e.state.data !== void 0 && zn(e, t, t.refetchOnMount);
4245
+ function zo(e, t) {
4246
+ return nc(e, t) || e.state.data !== void 0 && Gn(e, t, t.refetchOnMount);
4247
4247
  }
4248
- function zn(e, t, r) {
4248
+ function Gn(e, t, r) {
4249
4249
  if ($e(t.enabled, e) !== !1 && Et(t.staleTime, e) !== "static") {
4250
4250
  const n = typeof r == "function" ? r(e) : r;
4251
- return n === "always" || n !== !1 && co(e, t);
4251
+ return n === "always" || n !== !1 && uo(e, t);
4252
4252
  }
4253
4253
  return !1;
4254
4254
  }
4255
- function zo(e, t, r, n) {
4256
- return (e !== t || $e(n.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && co(e, r);
4255
+ function Go(e, t, r, n) {
4256
+ return (e !== t || $e(n.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && uo(e, r);
4257
4257
  }
4258
- function co(e, t) {
4258
+ function uo(e, t) {
4259
4259
  return $e(t.enabled, e) !== !1 && e.isStaleByTime(Et(t.staleTime, e));
4260
4260
  }
4261
- function nc(e, t) {
4262
- return !Rn(e.getCurrentResult(), t);
4261
+ function oc(e, t) {
4262
+ return !In(e.getCurrentResult(), t);
4263
4263
  }
4264
- var Pr, Xe, Ee, Wt, Je, ht, Ds, oc = (Ds = class extends bi {
4264
+ var Pr, Xe, Ee, Wt, Je, ht, Ds, sc = (Ds = class extends bi {
4265
4265
  constructor(t) {
4266
4266
  super();
4267
4267
  Q(this, Je);
@@ -4269,7 +4269,7 @@ var Pr, Xe, Ee, Wt, Je, ht, Ds, oc = (Ds = class extends bi {
4269
4269
  Q(this, Xe);
4270
4270
  Q(this, Ee);
4271
4271
  Q(this, Wt);
4272
- B(this, Pr, t.client), this.mutationId = t.mutationId, B(this, Ee, t.mutationCache), B(this, Xe, []), this.state = t.state || sc(), this.setOptions(t.options), this.scheduleGc();
4272
+ B(this, Pr, t.client), this.mutationId = t.mutationId, B(this, Ee, t.mutationCache), B(this, Xe, []), this.state = t.state || ic(), this.setOptions(t.options), this.scheduleGc();
4273
4273
  }
4274
4274
  setOptions(t) {
4275
4275
  this.options = t, this.updateGcTime(this.options.gcTime);
@@ -4492,7 +4492,7 @@ var Pr, Xe, Ee, Wt, Je, ht, Ds, oc = (Ds = class extends bi {
4492
4492
  });
4493
4493
  });
4494
4494
  }, Ds);
4495
- function sc() {
4495
+ function ic() {
4496
4496
  return {
4497
4497
  context: void 0,
4498
4498
  data: void 0,
@@ -4505,7 +4505,7 @@ function sc() {
4505
4505
  submittedAt: 0
4506
4506
  };
4507
4507
  }
4508
- var lt, Ge, Fr, Ls, ic = (Ls = class extends Ir {
4508
+ var lt, Ge, Fr, Ls, ac = (Ls = class extends Ir {
4509
4509
  constructor(t = {}) {
4510
4510
  super();
4511
4511
  Q(this, lt);
@@ -4514,7 +4514,7 @@ var lt, Ge, Fr, Ls, ic = (Ls = class extends Ir {
4514
4514
  this.config = t, B(this, lt, /* @__PURE__ */ new Set()), B(this, Ge, /* @__PURE__ */ new Map()), B(this, Fr, 0);
4515
4515
  }
4516
4516
  build(t, r, n) {
4517
- const o = new oc({
4517
+ const o = new sc({
4518
4518
  client: t,
4519
4519
  mutationCache: this,
4520
4520
  mutationId: ++Dr(this, Fr)._,
@@ -4578,11 +4578,11 @@ var lt, Ge, Fr, Ls, ic = (Ls = class extends Ir {
4578
4578
  find(t) {
4579
4579
  const r = { exact: !0, ...t };
4580
4580
  return this.getAll().find(
4581
- (n) => Do(r, n)
4581
+ (n) => Lo(r, n)
4582
4582
  );
4583
4583
  }
4584
4584
  findAll(t = {}) {
4585
- return this.getAll().filter((r) => Do(t, r));
4585
+ return this.getAll().filter((r) => Lo(t, r));
4586
4586
  }
4587
4587
  notify(t) {
4588
4588
  we.batch(() => {
@@ -4604,16 +4604,16 @@ function Br(e) {
4604
4604
  var t;
4605
4605
  return (t = e.options.scope) == null ? void 0 : t.id;
4606
4606
  }
4607
- var Ze, js, ac = (js = class extends Ir {
4607
+ var Ze, js, lc = (js = class extends Ir {
4608
4608
  constructor(t = {}) {
4609
4609
  super();
4610
4610
  Q(this, Ze);
4611
4611
  this.config = t, B(this, Ze, /* @__PURE__ */ new Map());
4612
4612
  }
4613
4613
  build(t, r, n) {
4614
- const o = r.queryKey, s = r.queryHash ?? lo(o, r);
4614
+ const o = r.queryKey, s = r.queryHash ?? co(o, r);
4615
4615
  let i = this.get(s);
4616
- return i || (i = new ec({
4616
+ return i || (i = new tc({
4617
4617
  client: t,
4618
4618
  queryKey: o,
4619
4619
  queryHash: s,
@@ -4648,12 +4648,12 @@ var Ze, js, ac = (js = class extends Ir {
4648
4648
  find(t) {
4649
4649
  const r = { exact: !0, ...t };
4650
4650
  return this.getAll().find(
4651
- (n) => Mo(r, n)
4651
+ (n) => Do(r, n)
4652
4652
  );
4653
4653
  }
4654
4654
  findAll(t = {}) {
4655
4655
  const r = this.getAll();
4656
- return Object.keys(t).length > 0 ? r.filter((n) => Mo(t, n)) : r;
4656
+ return Object.keys(t).length > 0 ? r.filter((n) => Do(t, n)) : r;
4657
4657
  }
4658
4658
  notify(t) {
4659
4659
  we.batch(() => {
@@ -4676,7 +4676,7 @@ var Ze, js, ac = (js = class extends Ir {
4676
4676
  });
4677
4677
  });
4678
4678
  }
4679
- }, Ze = new WeakMap(), js), de, bt, yt, or, sr, wt, ir, ar, Bs, lc = (Bs = class {
4679
+ }, Ze = new WeakMap(), js), de, bt, yt, or, sr, wt, ir, ar, Bs, cc = (Bs = class {
4680
4680
  constructor(e = {}) {
4681
4681
  Q(this, de);
4682
4682
  Q(this, bt);
@@ -4686,10 +4686,10 @@ var Ze, js, ac = (js = class extends Ir {
4686
4686
  Q(this, wt);
4687
4687
  Q(this, ir);
4688
4688
  Q(this, ar);
4689
- B(this, de, e.queryCache || new ac()), B(this, bt, e.mutationCache || new ic()), B(this, yt, e.defaultOptions || {}), B(this, or, /* @__PURE__ */ new Map()), B(this, sr, /* @__PURE__ */ new Map()), B(this, wt, 0);
4689
+ B(this, de, e.queryCache || new lc()), B(this, bt, e.mutationCache || new ac()), B(this, yt, e.defaultOptions || {}), B(this, or, /* @__PURE__ */ new Map()), B(this, sr, /* @__PURE__ */ new Map()), B(this, wt, 0);
4690
4690
  }
4691
4691
  mount() {
4692
- Dr(this, wt)._++, v(this, wt) === 1 && (B(this, ir, ao.subscribe(async (e) => {
4692
+ Dr(this, wt)._++, v(this, wt) === 1 && (B(this, ir, lo.subscribe(async (e) => {
4693
4693
  e && (await this.resumePausedMutations(), v(this, de).onFocus());
4694
4694
  })), B(this, ar, Jr.subscribe(async (e) => {
4695
4695
  e && (await this.resumePausedMutations(), v(this, de).onOnline());
@@ -4730,7 +4730,7 @@ var Ze, js, ac = (js = class extends Ir {
4730
4730
  setQueryData(e, t, r) {
4731
4731
  const n = this.defaultQueryOptions({ queryKey: e }), o = v(this, de).get(
4732
4732
  n.queryHash
4733
- ), s = o == null ? void 0 : o.state.data, i = Wl(t, s);
4733
+ ), s = o == null ? void 0 : o.state.data, i = zl(t, s);
4734
4734
  if (i !== void 0)
4735
4735
  return v(this, de).build(this, n).setData(i, { ...r, manual: !0 });
4736
4736
  }
@@ -4866,7 +4866,7 @@ var Ze, js, ac = (js = class extends Ir {
4866
4866
  ...e,
4867
4867
  _defaulted: !0
4868
4868
  };
4869
- return t.queryHash || (t.queryHash = lo(
4869
+ return t.queryHash || (t.queryHash = co(
4870
4870
  t.queryKey,
4871
4871
  t
4872
4872
  )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.queryFn === Xr && (t.enabled = !1), t;
@@ -4889,13 +4889,13 @@ var Ze, js, ac = (js = class extends Ir {
4889
4889
  if (!t)
4890
4890
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
4891
4891
  return t;
4892
- }, uo = ({
4892
+ }, fo = ({
4893
4893
  client: e,
4894
4894
  children: t
4895
4895
  }) => (q.useEffect(() => (e.mount(), () => {
4896
4896
  e.unmount();
4897
- }), [e]), /* @__PURE__ */ $(Ei.Provider, { value: e, children: t })), cc = q.createContext(!1), uc = () => q.useContext(cc);
4898
- function dc() {
4897
+ }), [e]), /* @__PURE__ */ $(Ei.Provider, { value: e, children: t })), uc = q.createContext(!1), dc = () => q.useContext(uc);
4898
+ function fc() {
4899
4899
  let e = !1;
4900
4900
  return {
4901
4901
  clearReset: () => {
@@ -4907,20 +4907,20 @@ function dc() {
4907
4907
  isReset: () => e
4908
4908
  };
4909
4909
  }
4910
- var fc = q.createContext(dc()), hc = () => q.useContext(fc), pc = (e, t, r) => {
4910
+ var hc = q.createContext(fc()), pc = () => q.useContext(hc), mc = (e, t, r) => {
4911
4911
  const n = r != null && r.state.error && typeof e.throwOnError == "function" ? mi(e.throwOnError, [r.state.error, r]) : e.throwOnError;
4912
4912
  (e.suspense || e.experimental_prefetchInRender || n) && (t.isReset() || (e.retryOnMount = !1));
4913
- }, mc = (e) => {
4913
+ }, gc = (e) => {
4914
4914
  q.useEffect(() => {
4915
4915
  e.clearReset();
4916
4916
  }, [e]);
4917
- }, gc = ({
4917
+ }, vc = ({
4918
4918
  result: e,
4919
4919
  errorResetBoundary: t,
4920
4920
  throwOnError: r,
4921
4921
  query: n,
4922
4922
  suspense: o
4923
- }) => e.isError && !t.isReset() && !e.isFetching && n && (o && e.data === void 0 || mi(r, [e.error, n])), vc = (e) => {
4923
+ }) => e.isError && !t.isReset() && !e.isFetching && n && (o && e.data === void 0 || mi(r, [e.error, n])), bc = (e) => {
4924
4924
  if (e.suspense) {
4925
4925
  const r = (o) => o === "static" ? o : Math.max(o ?? 1e3, 1e3), n = e.staleTime;
4926
4926
  e.staleTime = typeof n == "function" ? (...o) => r(n(...o)) : r(n), typeof e.gcTime == "number" && (e.gcTime = Math.max(
@@ -4928,16 +4928,16 @@ var fc = q.createContext(dc()), hc = () => q.useContext(fc), pc = (e, t, r) => {
4928
4928
  1e3
4929
4929
  ));
4930
4930
  }
4931
- }, bc = (e, t) => e.isLoading && e.isFetching && !t, yc = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, Go = (e, t, r) => t.fetchOptimistic(e).catch(() => {
4931
+ }, yc = (e, t) => e.isLoading && e.isFetching && !t, wc = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, qo = (e, t, r) => t.fetchOptimistic(e).catch(() => {
4932
4932
  r.clearReset();
4933
4933
  });
4934
- function wc(e, t, r) {
4934
+ function xc(e, t, r) {
4935
4935
  var x, h, O, k;
4936
4936
  if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e)))
4937
4937
  throw new Error(
4938
4938
  'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
4939
4939
  );
4940
- const n = uc(), o = hc(), s = Si(), i = s.defaultQueryOptions(e);
4940
+ const n = dc(), o = pc(), s = Si(), i = s.defaultQueryOptions(e);
4941
4941
  (h = (x = s.getDefaultOptions().queries) == null ? void 0 : x._experimental_beforeQuery) == null || h.call(
4942
4942
  x,
4943
4943
  i
@@ -4945,7 +4945,7 @@ function wc(e, t, r) {
4945
4945
  const l = s.getQueryCache().get(i.queryHash);
4946
4946
  process.env.NODE_ENV !== "production" && (i.queryFn || console.error(
4947
4947
  `[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
4948
- )), i._optimisticResults = n ? "isRestoring" : "optimistic", vc(i), pc(i, o, l), mc(o);
4948
+ )), i._optimisticResults = n ? "isRestoring" : "optimistic", bc(i), mc(i, o, l), gc(o);
4949
4949
  const c = !s.getQueryCache().get(i.queryHash), [d] = q.useState(
4950
4950
  () => new t(
4951
4951
  s,
@@ -4964,9 +4964,9 @@ function wc(e, t, r) {
4964
4964
  () => d.getCurrentResult()
4965
4965
  ), q.useEffect(() => {
4966
4966
  d.setOptions(i);
4967
- }, [i, d]), yc(i, m))
4968
- throw Go(i, d, o);
4969
- if (gc({
4967
+ }, [i, d]), wc(i, m))
4968
+ throw qo(i, d, o);
4969
+ if (vc({
4970
4970
  result: m,
4971
4971
  errorResetBoundary: o,
4972
4972
  throwOnError: i.throwOnError,
@@ -4978,10 +4978,10 @@ function wc(e, t, r) {
4978
4978
  O,
4979
4979
  i,
4980
4980
  m
4981
- ), i.experimental_prefetchInRender && !Sr.isServer() && bc(m, n)) {
4981
+ ), i.experimental_prefetchInRender && !Sr.isServer() && yc(m, n)) {
4982
4982
  const P = c ? (
4983
4983
  // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
4984
- Go(i, d, o)
4984
+ qo(i, d, o)
4985
4985
  ) : (
4986
4986
  // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
4987
4987
  l == null ? void 0 : l.promise
@@ -4992,10 +4992,10 @@ function wc(e, t, r) {
4992
4992
  }
4993
4993
  return i.notifyOnChangeProps ? m : d.trackResult(m);
4994
4994
  }
4995
- function fo(e, t) {
4996
- return wc(e, tc);
4995
+ function ho(e, t) {
4996
+ return xc(e, rc);
4997
4997
  }
4998
- function xc(e) {
4998
+ function Ec(e) {
4999
4999
  const [t, r] = ie(() => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
5000
5000
  return pe(() => {
5001
5001
  if (e !== "system")
@@ -5008,19 +5008,19 @@ function xc(e) {
5008
5008
  return n.addEventListener("change", o), () => n.removeEventListener("change", o);
5009
5009
  }, [e]), e === "system" ? t : e;
5010
5010
  }
5011
- const qo = [
5011
+ const Vo = [
5012
5012
  "after-balance",
5013
5013
  "after-accounts",
5014
5014
  "after-wallet-info",
5015
5015
  "before-actions",
5016
5016
  "actions"
5017
- ], Ec = {
5017
+ ], Sc = {
5018
5018
  "after-balance": [],
5019
5019
  "after-accounts": [],
5020
5020
  "after-wallet-info": [],
5021
5021
  "before-actions": [],
5022
5022
  actions: []
5023
- }, Sc = {
5023
+ }, Oc = {
5024
5024
  activeAddress: null,
5025
5025
  activeWallet: null,
5026
5026
  theme: "system",
@@ -5029,8 +5029,8 @@ const qo = [
5029
5029
  },
5030
5030
  closeDialog: () => {
5031
5031
  }
5032
- }, Oc = {
5033
- menuItemsBySlot: Ec,
5032
+ }, kc = {
5033
+ menuItemsBySlot: Sc,
5034
5034
  dialogs: [],
5035
5035
  openDialog: () => {
5036
5036
  },
@@ -5039,29 +5039,29 @@ const qo = [
5039
5039
  openDialogs: /* @__PURE__ */ new Set(),
5040
5040
  panels: [],
5041
5041
  plugins: [],
5042
- renderContext: Sc
5042
+ renderContext: Oc
5043
5043
  }, Oi = Oe(void 0);
5044
5044
  function rn() {
5045
5045
  const e = me(Oi);
5046
- return e || Oc;
5046
+ return e || kc;
5047
5047
  }
5048
- function kc({
5048
+ function Cc({
5049
5049
  plugins: e,
5050
5050
  ctx: t,
5051
5051
  children: r
5052
5052
  }) {
5053
5053
  return e.reduceRight((n, o) => o.Provider ? /* @__PURE__ */ $(o.Provider, { ctx: t, children: n }) : n, r);
5054
5054
  }
5055
- function Cc(e) {
5055
+ function Ac(e) {
5056
5056
  const t = ee(e), r = t.current.map((o) => o.id).join("\0"), n = e.map((o) => o.id).join("\0");
5057
5057
  return r !== n && (t.current = e), t.current;
5058
5058
  }
5059
- function Ac({
5059
+ function Tc({
5060
5060
  plugins: e,
5061
5061
  renderContext: t,
5062
5062
  children: r
5063
5063
  }) {
5064
- const n = Cc(e);
5064
+ const n = Ac(e);
5065
5065
  he(() => {
5066
5066
  if (process.env.NODE_ENV === "production") return;
5067
5067
  const h = /* @__PURE__ */ new Set(), O = /* @__PURE__ */ new Set(), k = /* @__PURE__ */ new Set(), P = /* @__PURE__ */ new Set();
@@ -5102,8 +5102,8 @@ function Ac({
5102
5102
  for (const O of n)
5103
5103
  if (O.menuItems)
5104
5104
  for (const k of O.menuItems)
5105
- qo.includes(k.slot) && h[k.slot].push(k);
5106
- for (const O of qo)
5105
+ Vo.includes(k.slot) && h[k.slot].push(k);
5106
+ for (const O of Vo)
5107
5107
  h[O].sort((k, P) => (k.order ?? 100) - (P.order ?? 100));
5108
5108
  return h;
5109
5109
  }, [n]), d = he(
@@ -5141,20 +5141,20 @@ function Ac({
5141
5141
  g
5142
5142
  ]
5143
5143
  );
5144
- return /* @__PURE__ */ $(Oi.Provider, { value: x, children: /* @__PURE__ */ $(kc, { plugins: n, ctx: g, children: r }) });
5144
+ return /* @__PURE__ */ $(Oi.Provider, { value: x, children: /* @__PURE__ */ $(Cc, { plugins: n, ctx: g, children: r }) });
5145
5145
  }
5146
- function Tc() {
5146
+ function Pc() {
5147
5147
  const { dialogs: e, openDialogs: t, closeDialog: r, renderContext: n } = rn(), { queryClient: o, theme: s } = Nr(), i = s === "system" ? void 0 : s;
5148
5148
  return /* @__PURE__ */ $(et, { children: e.map((l) => {
5149
5149
  const c = t.has(l.key);
5150
- return c ? /* @__PURE__ */ $(ro, { id: `wallet-plugin-${l.key}`, children: /* @__PURE__ */ $(uo, { client: o, children: /* @__PURE__ */ $("div", { "data-wallet-theme": !0, "data-wallet-ui": !0, "data-theme": i, children: l.render({
5150
+ return c ? /* @__PURE__ */ $(no, { id: `wallet-plugin-${l.key}`, children: /* @__PURE__ */ $(fo, { client: o, children: /* @__PURE__ */ $("div", { "data-wallet-theme": !0, "data-wallet-ui": !0, "data-theme": i, children: l.render({
5151
5151
  isOpen: c,
5152
5152
  onClose: () => r(l.key),
5153
5153
  ctx: n
5154
5154
  }) }) }) }, l.key) : null;
5155
5155
  }) });
5156
5156
  }
5157
- function Vo(e, t) {
5157
+ function hn(e, t) {
5158
5158
  try {
5159
5159
  const r = t();
5160
5160
  r && typeof r.catch == "function" && r.catch((n) => {
@@ -5170,24 +5170,31 @@ function Vo(e, t) {
5170
5170
  );
5171
5171
  }
5172
5172
  }
5173
- function Pc() {
5173
+ function Fc() {
5174
5174
  const { plugins: e, renderContext: t } = rn(), r = ee(null), n = ee(null);
5175
5175
  return pe(() => {
5176
5176
  var l, c, d, m;
5177
5177
  const o = r.current, s = n.current, i = ((l = t.activeWallet) == null ? void 0 : l.id) ?? null;
5178
5178
  if (!s && i)
5179
5179
  for (const g of e)
5180
- (c = g.lifecycle) != null && c.onConnect && Vo(g, () => g.lifecycle.onConnect(t));
5180
+ (c = g.lifecycle) != null && c.onConnect && hn(g, () => g.lifecycle.onConnect(t));
5181
5181
  if (s && !i)
5182
5182
  for (const g of e)
5183
- (d = g.lifecycle) != null && d.onDisconnect && Vo(g, () => g.lifecycle.onDisconnect());
5184
- if (i && o && t.activeAddress && o !== t.activeAddress)
5183
+ (d = g.lifecycle) != null && d.onDisconnect && hn(g, () => g.lifecycle.onDisconnect());
5184
+ if (i && o && t.activeAddress && o !== t.activeAddress) {
5185
5185
  for (const g of e)
5186
- (m = g.lifecycle) != null && m.onAccountChange && g.lifecycle.onAccountChange(t.activeAddress, o, t);
5186
+ if ((m = g.lifecycle) != null && m.onAccountChange) {
5187
+ const x = t.activeAddress, h = o;
5188
+ hn(
5189
+ g,
5190
+ () => g.lifecycle.onAccountChange(x, h, t)
5191
+ );
5192
+ }
5193
+ }
5187
5194
  r.current = t.activeAddress, n.current = i;
5188
5195
  }, [t, e]), null;
5189
5196
  }
5190
- const Qo = "wallet-ui-theme-styles", Fc = `
5197
+ const Qo = "wallet-ui-theme-styles", Rc = `
5191
5198
  --wui-color-primary: #2d2df1;
5192
5199
  --wui-color-primary-hover: #2929d9;
5193
5200
  --wui-color-primary-text: #ffffff;
@@ -5207,7 +5214,7 @@ const Qo = "wallet-ui-theme-styles", Fc = `
5207
5214
  --wui-color-danger-text: #b91c1c;
5208
5215
  --wui-color-avatar-bg: #e5e7eb;
5209
5216
  --wui-color-avatar-icon: #9ca3af;
5210
- `, hn = `
5217
+ `, pn = `
5211
5218
  --wui-color-primary: #bfbff9;
5212
5219
  --wui-color-primary-hover: #d4d4fa;
5213
5220
  --wui-color-primary-text: #001324;
@@ -5228,35 +5235,35 @@ const Qo = "wallet-ui-theme-styles", Fc = `
5228
5235
  --wui-color-avatar-bg: #192a39;
5229
5236
  --wui-color-avatar-icon: #6b7280;
5230
5237
  `;
5231
- function Rc() {
5238
+ function Ic() {
5232
5239
  if (document.getElementById(Qo))
5233
5240
  return;
5234
5241
  const e = document.createElement("style");
5235
5242
  e.id = Qo, e.textContent = `
5236
5243
  /* Light mode (default) */
5237
5244
  [data-wallet-theme] {
5238
- ${Fc}
5245
+ ${Rc}
5239
5246
  }
5240
5247
 
5241
5248
  /* Dark mode via data-theme attribute (explicit) */
5242
5249
  [data-wallet-theme][data-theme='dark'] {
5243
- ${hn}
5250
+ ${pn}
5244
5251
  }
5245
5252
 
5246
5253
  /* Dark mode via .dark class on ancestor (Tailwind convention) */
5247
5254
  .dark [data-wallet-theme]:not([data-theme='light']) {
5248
- ${hn}
5255
+ ${pn}
5249
5256
  }
5250
5257
 
5251
5258
  /* Dark mode via system preference (when theme="system" or no explicit theme) */
5252
5259
  @media (prefers-color-scheme: dark) {
5253
5260
  [data-wallet-theme]:not([data-theme='light']):not([data-theme='dark']) {
5254
- ${hn}
5261
+ ${pn}
5255
5262
  }
5256
5263
  }
5257
5264
  `, document.head.insertBefore(e, document.head.firstChild);
5258
5265
  }
5259
- const Ic = () => new lc({
5266
+ const Nc = () => new cc({
5260
5267
  defaultOptions: {
5261
5268
  queries: {
5262
5269
  staleTime: 300 * 1e3,
@@ -5272,7 +5279,7 @@ const Ic = () => new lc({
5272
5279
  }), ki = Oe(
5273
5280
  void 0
5274
5281
  );
5275
- function Nc({
5282
+ function $c({
5276
5283
  enabled: e,
5277
5284
  nfdView: t
5278
5285
  }) {
@@ -5348,7 +5355,7 @@ function Nc({
5348
5355
  e
5349
5356
  ]), null;
5350
5357
  }
5351
- function vh({
5358
+ function bh({
5352
5359
  children: e,
5353
5360
  queryClient: t,
5354
5361
  enablePrefetching: r = !0,
@@ -5357,11 +5364,11 @@ function vh({
5357
5364
  plugins: s = []
5358
5365
  }) {
5359
5366
  const i = he(
5360
- () => t || Ic(),
5367
+ () => t || Nc(),
5361
5368
  [t]
5362
- ), l = xc(o);
5369
+ ), l = Ec(o);
5363
5370
  pe(() => {
5364
- Rc();
5371
+ Ic();
5365
5372
  }, []);
5366
5373
  const c = he(
5367
5374
  () => ({
@@ -5372,17 +5379,17 @@ function vh({
5372
5379
  [i, o, l]
5373
5380
  ), d = o === "system" ? void 0 : o, m = /* @__PURE__ */ $(ki.Provider, { value: c, children: /* @__PURE__ */ re("div", { "data-wallet-theme": !0, "data-theme": d, children: [
5374
5381
  /* @__PURE__ */ $(
5375
- Nc,
5382
+ $c,
5376
5383
  {
5377
5384
  enabled: r,
5378
5385
  nfdView: n
5379
5386
  }
5380
5387
  ),
5381
- /* @__PURE__ */ $($c, { plugins: s, children: e })
5388
+ /* @__PURE__ */ $(Mc, { plugins: s, children: e })
5382
5389
  ] }) });
5383
- return t ? m : /* @__PURE__ */ $(uo, { client: i, children: m });
5390
+ return t ? m : /* @__PURE__ */ $(fo, { client: i, children: m });
5384
5391
  }
5385
- function $c({
5392
+ function Mc({
5386
5393
  plugins: e,
5387
5394
  children: t
5388
5395
  }) {
@@ -5399,9 +5406,9 @@ function $c({
5399
5406
  }),
5400
5407
  [r, n, o, s]
5401
5408
  );
5402
- return e.length === 0 ? /* @__PURE__ */ $(et, { children: t }) : /* @__PURE__ */ re(Ac, { plugins: e, renderContext: i, children: [
5409
+ return e.length === 0 ? /* @__PURE__ */ $(et, { children: t }) : /* @__PURE__ */ re(Tc, { plugins: e, renderContext: i, children: [
5410
+ /* @__PURE__ */ $(Fc, {}),
5403
5411
  /* @__PURE__ */ $(Pc, {}),
5404
- /* @__PURE__ */ $(Tc, {}),
5405
5412
  t
5406
5413
  ] });
5407
5414
  }
@@ -5411,7 +5418,7 @@ function Nr() {
5411
5418
  throw new Error("useWalletUI must be used within a WalletUIProvider");
5412
5419
  return e;
5413
5420
  }
5414
- function Mc({ wallets: e, handleWalletClick: t }) {
5421
+ function Dc({ wallets: e, handleWalletClick: t }) {
5415
5422
  return /* @__PURE__ */ re("ul", { className: "space-y-1.5", children: [
5416
5423
  e.map((r) => /* @__PURE__ */ $("li", { children: /* @__PURE__ */ re(
5417
5424
  "button",
@@ -5434,7 +5441,7 @@ function Mc({ wallets: e, handleWalletClick: t }) {
5434
5441
  e.length === 0 && /* @__PURE__ */ $("p", { className: "text-center text-[var(--wui-color-text-secondary)]", children: "No wallets found." })
5435
5442
  ] });
5436
5443
  }
5437
- function Dc({ children: e }) {
5444
+ function Lc({ children: e }) {
5438
5445
  const [t, r] = ie(!1), [n, o] = ie(null), { wallets: s, activeAddress: i } = Ot(), { theme: l } = Nr(), c = l === "system" ? void 0 : l, { refs: d, context: m } = Ws({
5439
5446
  open: t,
5440
5447
  onOpenChange: (a) => {
@@ -5444,11 +5451,11 @@ function Dc({ children: e }) {
5444
5451
  r(!1), o(null);
5445
5452
  }, 150)));
5446
5453
  }
5447
- }), g = zs(m), x = Gs(m, { outsidePressEvent: "mousedown" }), h = $a(m, { role: "dialog" }), { getReferenceProps: O, getFloatingProps: k } = qs([
5454
+ }), g = zs(m), x = Gs(m, { outsidePressEvent: "mousedown" }), h = Ma(m, { role: "dialog" }), { getReferenceProps: O, getFloatingProps: k } = qs([
5448
5455
  g,
5449
5456
  x,
5450
5457
  h
5451
- ]), P = Cn(), I = Cn(), E = async (a) => {
5458
+ ]), P = An(), I = An(), E = async (a) => {
5452
5459
  try {
5453
5460
  await a.connect(), m.onOpenChange(!1);
5454
5461
  } catch (u) {
@@ -5456,7 +5463,7 @@ function Dc({ children: e }) {
5456
5463
  }
5457
5464
  }, N = (a) => {
5458
5465
  i || m.onOpenChange(!0);
5459
- }, M = e || /* @__PURE__ */ $(io, {}), j = Ma([
5466
+ }, M = e || /* @__PURE__ */ $(ao, {}), j = Da([
5460
5467
  d.setReference,
5461
5468
  M.ref || null
5462
5469
  ]), H = {
@@ -5466,8 +5473,8 @@ function Dc({ children: e }) {
5466
5473
  }, V = K.cloneElement(M, H);
5467
5474
  return /* @__PURE__ */ re(et, { children: [
5468
5475
  V,
5469
- /* @__PURE__ */ $(ro, { id: "wallet-dialog-portal", children: t && /* @__PURE__ */ $("div", { "data-wallet-theme": !0, "data-wallet-ui": !0, "data-theme": c, children: /* @__PURE__ */ $(
5470
- Da,
5476
+ /* @__PURE__ */ $(no, { id: "wallet-dialog-portal", children: t && /* @__PURE__ */ $("div", { "data-wallet-theme": !0, "data-wallet-ui": !0, "data-theme": c, children: /* @__PURE__ */ $(
5477
+ La,
5471
5478
  {
5472
5479
  className: "grid place-items-center px-4 z-50 transition-opacity duration-150 ease-in-out bg-[var(--wui-color-overlay)] data-[state=starting]:opacity-0 data-[state=exiting]:opacity-0 data-[state=entered]:opacity-100",
5473
5480
  "data-state": n,
@@ -5523,7 +5530,7 @@ function Dc({ children: e }) {
5523
5530
  )
5524
5531
  ] }),
5525
5532
  /* @__PURE__ */ $("div", { className: "px-4 pb-3", children: /* @__PURE__ */ $(
5526
- Mc,
5533
+ Dc,
5527
5534
  {
5528
5535
  wallets: s,
5529
5536
  handleWalletClick: E
@@ -5549,7 +5556,7 @@ function Dc({ children: e }) {
5549
5556
  ) }) })
5550
5557
  ] });
5551
5558
  }
5552
- var Lc = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, pn = Math.ceil, je = Math.floor, Te = "[BigNumber Error] ", _o = Te + "Number primitive has more than 15 significant digits: ", ze = 1e14, _ = 14, Ko = 9007199254740991, mn = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], ft = 1e7, Ie = 1e9;
5559
+ var jc = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, mn = Math.ceil, je = Math.floor, Te = "[BigNumber Error] ", _o = Te + "Number primitive has more than 15 significant digits: ", ze = 1e14, _ = 14, Ko = 9007199254740991, gn = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], ft = 1e7, Ie = 1e9;
5553
5560
  function Ci(e) {
5554
5561
  var t, r, n, o = E.prototype = { constructor: E, toString: null, valueOf: null }, s = new E(1), i = 20, l = 4, c = -7, d = 21, m = -1e7, g = 1e7, x = !1, h = 1, O = 0, k = {
5555
5562
  prefix: "",
@@ -5578,7 +5585,7 @@ function Ci(e) {
5578
5585
  }
5579
5586
  T = String(a);
5580
5587
  } else {
5581
- if (!Lc.test(T = String(a))) return n(A, T, p);
5588
+ if (!jc.test(T = String(a))) return n(A, T, p);
5582
5589
  A.s = T.charCodeAt(0) == 45 ? (T = T.slice(1), -1) : 1;
5583
5590
  }
5584
5591
  (S = T.indexOf(".")) > -1 && (T = T.replace(".", "")), (C = T.search(/e/i)) > 0 ? (S < 0 && (S = C), S += +T.slice(C + 1), T = T.substring(0, C)) : S < 0 && (S = T.length);
@@ -5702,7 +5709,7 @@ function Ci(e) {
5702
5709
  };
5703
5710
  return function(f) {
5704
5711
  var w, b, S, C, p, y = 0, T = [], A = new E(s);
5705
- if (f == null ? f = i : ce(f, 0, Ie), C = pn(f / _), x)
5712
+ if (f == null ? f = i : ce(f, 0, Ie), C = mn(f / _), x)
5706
5713
  if (crypto.getRandomValues) {
5707
5714
  for (w = crypto.getRandomValues(new Uint32Array(C *= 2)); y < C; )
5708
5715
  p = w[y] * 131072 + (w[y + 1] >>> 11), p >= 9e15 ? (b = crypto.getRandomValues(new Uint32Array(2)), w[y] = b[0], w[y + 1] = b[1]) : (T.push(p % 1e14), y += 2);
@@ -5716,7 +5723,7 @@ function Ci(e) {
5716
5723
  if (!x)
5717
5724
  for (; y < C; )
5718
5725
  p = u(), p < 9e15 && (T[y++] = p % 1e14);
5719
- for (C = T[--y], f %= _, C && f && (p = mn[_ - f], T[y] = je(C / p) * p); T[y] === 0; T.pop(), y--) ;
5726
+ for (C = T[--y], f %= _, C && f && (p = gn[_ - f], T[y] = je(C / p) * p); T[y] === 0; T.pop(), y--) ;
5720
5727
  if (y < 0)
5721
5728
  T = [S = 0];
5722
5729
  else {
@@ -5866,13 +5873,13 @@ function Ci(e) {
5866
5873
  };
5867
5874
  })();
5868
5875
  function H(a, u, f, w) {
5869
- var b, S, C, p, y, T, A, F = a.c, R = mn;
5876
+ var b, S, C, p, y, T, A, F = a.c, R = gn;
5870
5877
  if (F) {
5871
5878
  e: {
5872
5879
  for (b = 1, p = F[0]; p >= 10; p /= 10, b++) ;
5873
5880
  if (S = u - b, S < 0)
5874
5881
  S += _, C = u, y = F[T = 0], A = je(y / R[b - C - 1] % 10);
5875
- else if (T = pn((S + 1) / _), T >= F.length)
5882
+ else if (T = mn((S + 1) / _), T >= F.length)
5876
5883
  if (w) {
5877
5884
  for (; F.length <= T; F.push(0)) ;
5878
5885
  y = A = 0, b = 1, S %= _, C = S - _ + 1;
@@ -5937,7 +5944,7 @@ function Ci(e) {
5937
5944
  } else {
5938
5945
  if (a.e > 9 && (F.e > 0 || F.e < -1 || (F.e == 0 ? F.c[0] > 1 || p && F.c[1] >= 24e7 : F.c[0] < 8e13 || p && F.c[0] <= 9999975e7)))
5939
5946
  return S = F.s < 0 && Hr(a) ? -0 : 0, F.e > -1 && (S = 1 / S), new E(y ? 1 / S : S);
5940
- O && (S = pn(O / _ + 2));
5947
+ O && (S = mn(O / _ + 2));
5941
5948
  }
5942
5949
  for (p ? (f = new E(0.5), y && (a.s = 1), T = Hr(a)) : (b = Math.abs(+V(a)), T = b % 2), A = new E(s); ; ) {
5943
5950
  if (T) {
@@ -6106,7 +6113,7 @@ function Ci(e) {
6106
6113
  if (a != null && (p = new E(a), !p.isInteger() && (p.c || p.s !== 1) || p.lt(s)))
6107
6114
  throw Error(Te + "Argument " + (p.isInteger() ? "out of range: " : "not an integer: ") + V(p));
6108
6115
  if (!G) return new E(U);
6109
- for (u = new E(s), T = f = new E(s), w = y = new E(s), R = De(G), S = u.e = R.length - U.e - 1, u.c[0] = mn[(C = S % _) < 0 ? _ + C : C], a = !a || p.comparedTo(u) > 0 ? S > 0 ? u : T : p, C = g, g = 1 / 0, p = new E(R), y.c[0] = 0; A = t(p, u, 0, 1), b = f.plus(A.times(w)), b.comparedTo(a) != 1; )
6116
+ for (u = new E(s), T = f = new E(s), w = y = new E(s), R = De(G), S = u.e = R.length - U.e - 1, u.c[0] = gn[(C = S % _) < 0 ? _ + C : C], a = !a || p.comparedTo(u) > 0 ? S > 0 ? u : T : p, C = g, g = 1 / 0, p = new E(R), y.c[0] = 0; A = t(p, u, 0, 1), b = f.plus(A.times(w)), b.comparedTo(a) != 1; )
6110
6117
  f = w, w = b, T = y.plus(A.times(b = T)), y = b, u = p.minus(A.times(b = u)), p = b;
6111
6118
  return b = t(a.minus(f), w, 0, 1), y = y.plus(b.times(T)), f = f.plus(b.times(w)), y.s = T.s = U.s, S = S * 2, F = t(T, w, S, l).minus(U).abs().comparedTo(
6112
6119
  t(y, f, S, l).minus(U).abs()
@@ -6167,13 +6174,13 @@ function st(e, t, r) {
6167
6174
  return e;
6168
6175
  }
6169
6176
  Ci();
6170
- const jc = 100000n, Bc = (e, t = {}) => {
6177
+ const Bc = 100000n, Hc = (e, t = {}) => {
6171
6178
  const {
6172
6179
  style: r = "decimal",
6173
6180
  compact: n = !1,
6174
6181
  fractionDigits: o,
6175
6182
  adaptiveDecimals: s = !1
6176
- } = t, i = typeof e == "string" ? Number(e) : e, l = typeof i == "bigint" ? i < 0n ? -i : i : Math.abs(i), c = n === "auto" ? l >= jc : n, d = typeof i == "bigint" ? Number(i) : i, m = s && d !== 0 && Math.abs(d) < Math.pow(10, -(o ?? 2)), g = new Intl.NumberFormat("en-US", {
6183
+ } = t, i = typeof e == "string" ? Number(e) : e, l = typeof i == "bigint" ? i < 0n ? -i : i : Math.abs(i), c = n === "auto" ? l >= Bc : n, d = typeof i == "bigint" ? Number(i) : i, m = s && d !== 0 && Math.abs(d) < Math.pow(10, -(o ?? 2)), g = new Intl.NumberFormat("en-US", {
6177
6184
  style: r,
6178
6185
  ...r === "currency" && { currency: "USD" },
6179
6186
  maximumFractionDigits: m ? 20 : o ?? 2,
@@ -6208,7 +6215,7 @@ function gr(e, t = 5, r = 5) {
6208
6215
  }
6209
6216
  function Ai(e = {}) {
6210
6217
  const { activeAddress: t } = Ot(), { activeNetwork: r } = Ys(), { enabled: n = !0, view: o = "thumbnail" } = e;
6211
- return fo({
6218
+ return ho({
6212
6219
  queryKey: ["nfd", t, r, o],
6213
6220
  queryFn: async ({ signal: s }) => {
6214
6221
  if (!t) return null;
@@ -6233,10 +6240,31 @@ function Ai(e = {}) {
6233
6240
  refetchOnWindowFocus: !0
6234
6241
  });
6235
6242
  }
6236
- const Xo = "https://ipfs.algonode.dev", Hc = async (e) => {
6237
- if (!e.startsWith("ipfs://"))
6243
+ const Uc = "https://ipfs.algonode.dev";
6244
+ function Xo(e) {
6245
+ const t = e.trim();
6246
+ if (t.startsWith("ipfs://")) {
6247
+ const r = t.slice(7);
6248
+ return r.length > 0 ? r : null;
6249
+ }
6250
+ try {
6251
+ const r = new URL(t);
6252
+ if (r.protocol !== "http:" && r.protocol !== "https:")
6253
+ return null;
6254
+ const n = "/ipfs/", o = r.pathname.indexOf(n);
6255
+ if (o === -1)
6256
+ return null;
6257
+ const s = r.pathname.slice(o + n.length);
6258
+ return s.length > 0 ? s : null;
6259
+ } catch {
6260
+ return null;
6261
+ }
6262
+ }
6263
+ const Ti = async (e) => {
6264
+ const t = Xo(e);
6265
+ if (!t)
6238
6266
  return e;
6239
- const t = e.replace("ipfs://", ""), r = `https://images.nf.domains/ipfs/${t}`, n = `${Xo}/ipfs/${t}`, o = (s) => s.startsWith("image/");
6267
+ const r = `https://images.nf.domains/ipfs/${t}`, n = `${Uc}/ipfs/${t}`, o = (s) => s.startsWith("image/");
6240
6268
  try {
6241
6269
  const s = await fetch(r, { method: "HEAD" });
6242
6270
  if (s.ok) {
@@ -6258,17 +6286,10 @@ const Xo = "https://ipfs.algonode.dev", Hc = async (e) => {
6258
6286
  if (i === "application/json")
6259
6287
  try {
6260
6288
  const d = (await (await fetch(n)).json()).image;
6261
- if (d) {
6262
- if (d.startsWith("ipfs://")) {
6263
- const m = d.replace("ipfs://", ""), g = `${Xo}/ipfs/${m}`, x = await fetch(g, {
6264
- method: "HEAD"
6265
- });
6266
- if (x.ok) {
6267
- const h = x.headers.get("content-type");
6268
- if (h && o(h))
6269
- return g;
6270
- }
6271
- } else if (d.startsWith("http"))
6289
+ if (typeof d == "string" && d.length > 0) {
6290
+ if (Xo(d))
6291
+ return await Ti(d);
6292
+ if (d.startsWith("http"))
6272
6293
  try {
6273
6294
  const m = await fetch(d, { method: "HEAD" });
6274
6295
  if (m.ok) {
@@ -6289,7 +6310,7 @@ const Xo = "https://ipfs.algonode.dev", Hc = async (e) => {
6289
6310
  }
6290
6311
  return n;
6291
6312
  };
6292
- function Ti({
6313
+ function Pi({
6293
6314
  nfd: e,
6294
6315
  alt: t,
6295
6316
  className: r,
@@ -6298,9 +6319,9 @@ function Ti({
6298
6319
  lightOnly: s = !1
6299
6320
  }) {
6300
6321
  var m, g, x, h;
6301
- const i = ((g = (m = e == null ? void 0 : e.properties) == null ? void 0 : m.userDefined) == null ? void 0 : g.avatar) || ((h = (x = e == null ? void 0 : e.properties) == null ? void 0 : x.verified) == null ? void 0 : h.avatar) || null, l = t || (e == null ? void 0 : e.name) || "NFD Avatar", { data: c, isLoading: d } = fo({
6322
+ const i = ((g = (m = e == null ? void 0 : e.properties) == null ? void 0 : m.userDefined) == null ? void 0 : g.avatar) || ((h = (x = e == null ? void 0 : e.properties) == null ? void 0 : x.verified) == null ? void 0 : h.avatar) || null, l = t || (e == null ? void 0 : e.name) || "NFD Avatar", { data: c, isLoading: d } = ho({
6302
6323
  queryKey: ["nfd-avatar", i],
6303
- queryFn: async () => i ? i.startsWith("https://") && !i.includes("/ipfs/") ? i : i.startsWith("ipfs://") || i.includes("/ipfs/") ? await Hc(i) : i : null,
6324
+ queryFn: async () => i ? i.startsWith("https://") && !i.includes("/ipfs/") ? i : i.startsWith("ipfs://") || i.includes("/ipfs/") ? await Ti(i) : i : null,
6304
6325
  enabled: !!i,
6305
6326
  staleTime: 3600 * 1e3,
6306
6327
  // 1 hour
@@ -6356,15 +6377,15 @@ function Ti({
6356
6377
  }
6357
6378
  );
6358
6379
  }
6359
- const Uc = {
6380
+ const Wc = {
6360
6381
  sm: "py-1.5 pl-2 md:pl-2.5 pr-2 text-sm rounded-lg",
6361
6382
  md: "py-2.5 pl-3 md:pl-3.5 pr-3 text-base rounded-xl",
6362
6383
  lg: "py-3 pl-3.5 md:pl-4 pr-3.5 text-lg rounded-xl"
6363
- }, Wc = {
6384
+ }, zc = {
6364
6385
  sm: 20,
6365
6386
  md: 24,
6366
6387
  lg: 28
6367
- }, zc = {
6388
+ }, Gc = {
6368
6389
  sm: "mr-1 md:mr-1.5 h-5 w-5",
6369
6390
  md: "mr-1 md:mr-2 h-6 w-6",
6370
6391
  lg: "mr-1.5 md:mr-2.5 h-7 w-7"
@@ -6372,7 +6393,7 @@ const Uc = {
6372
6393
  sm: { width: 14, height: 14 },
6373
6394
  md: { width: 18, height: 18 },
6374
6395
  lg: { width: 20, height: 20 }
6375
- }, ho = K.forwardRef(({ className: e = "", children: t, style: r, size: n = "md", ...o }, s) => {
6396
+ }, po = K.forwardRef(({ className: e = "", children: t, style: r, size: n = "md", ...o }, s) => {
6376
6397
  var m;
6377
6398
  const { activeAddress: i } = Ot(), l = Ai({ enabled: !!i }), c = ((m = l.data) == null ? void 0 : m.name) ?? null;
6378
6399
  return /* @__PURE__ */ $(
@@ -6381,18 +6402,18 @@ const Uc = {
6381
6402
  ref: s,
6382
6403
  "data-wallet-ui": !0,
6383
6404
  "data-wallet-button": !0,
6384
- className: lr("flex items-center bg-[var(--wui-color-primary)] transition-colors hover:bg-[var(--wui-color-primary-hover)] text-[var(--wui-color-primary-text)] cursor-pointer font-bold", Uc[n], e),
6405
+ className: lr("flex items-center bg-[var(--wui-color-primary)] transition-colors hover:bg-[var(--wui-color-primary-hover)] text-[var(--wui-color-primary-text)] cursor-pointer font-bold", Wc[n], e),
6385
6406
  style: r,
6386
6407
  disabled: !1,
6387
6408
  ...o,
6388
6409
  type: "button",
6389
6410
  children: t || /* @__PURE__ */ re("div", { className: "flex items-center", children: [
6390
- i && /* @__PURE__ */ $("div", { className: lr("overflow-hidden", zc[n]), children: /* @__PURE__ */ $(
6391
- Ti,
6411
+ i && /* @__PURE__ */ $("div", { className: lr("overflow-hidden", Gc[n]), children: /* @__PURE__ */ $(
6412
+ Pi,
6392
6413
  {
6393
6414
  nfd: l.data,
6394
6415
  alt: `${c || i} avatar`,
6395
- size: Wc[n],
6416
+ size: zc[n],
6396
6417
  lightOnly: !0
6397
6418
  }
6398
6419
  ) }),
@@ -6423,12 +6444,12 @@ const Uc = {
6423
6444
  }
6424
6445
  );
6425
6446
  });
6426
- ho.displayName = "ConnectedWalletButton";
6427
- const Pi = typeof document < "u" ? K.useLayoutEffect : () => {
6447
+ po.displayName = "ConnectedWalletButton";
6448
+ const Fi = typeof document < "u" ? K.useLayoutEffect : () => {
6428
6449
  };
6429
- function Gc(e) {
6450
+ function qc(e) {
6430
6451
  const t = ee(null);
6431
- return Pi(() => {
6452
+ return Fi(() => {
6432
6453
  t.current = e;
6433
6454
  }, [
6434
6455
  e
@@ -6441,41 +6462,41 @@ const Ct = (e) => {
6441
6462
  var t;
6442
6463
  return (t = e == null ? void 0 : e.ownerDocument) !== null && t !== void 0 ? t : document;
6443
6464
  }, Rt = (e) => e && "window" in e && e.window === e ? e : Ct(e).defaultView || window;
6444
- function qc(e) {
6465
+ function Vc(e) {
6445
6466
  return e !== null && typeof e == "object" && "nodeType" in e && typeof e.nodeType == "number";
6446
6467
  }
6447
- function Vc(e) {
6448
- return qc(e) && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in e;
6468
+ function Qc(e) {
6469
+ return Vc(e) && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in e;
6449
6470
  }
6450
- let Qc = !1;
6451
- function po() {
6452
- return Qc;
6471
+ let _c = !1;
6472
+ function mo() {
6473
+ return _c;
6453
6474
  }
6454
- function Fi(e, t) {
6455
- if (!po()) return t && e ? e.contains(t) : !1;
6475
+ function Ri(e, t) {
6476
+ if (!mo()) return t && e ? e.contains(t) : !1;
6456
6477
  if (!e || !t) return !1;
6457
6478
  let r = t;
6458
6479
  for (; r !== null; ) {
6459
6480
  if (r === e) return !0;
6460
- r.tagName === "SLOT" && r.assignedSlot ? r = r.assignedSlot.parentNode : Vc(r) ? r = r.host : r = r.parentNode;
6481
+ r.tagName === "SLOT" && r.assignedSlot ? r = r.assignedSlot.parentNode : Qc(r) ? r = r.host : r = r.parentNode;
6461
6482
  }
6462
6483
  return !1;
6463
6484
  }
6464
- const Gn = (e = document) => {
6485
+ const qn = (e = document) => {
6465
6486
  var t;
6466
- if (!po()) return e.activeElement;
6487
+ if (!mo()) return e.activeElement;
6467
6488
  let r = e.activeElement;
6468
6489
  for (; r && "shadowRoot" in r && (!((t = r.shadowRoot) === null || t === void 0) && t.activeElement); ) r = r.shadowRoot.activeElement;
6469
6490
  return r;
6470
6491
  };
6471
- function Ri(e) {
6472
- return po() && e.target.shadowRoot && e.composedPath ? e.composedPath()[0] : e.target;
6492
+ function Ii(e) {
6493
+ return mo() && e.target.shadowRoot && e.composedPath ? e.composedPath()[0] : e.target;
6473
6494
  }
6474
6495
  function nn(e) {
6475
6496
  var t;
6476
6497
  return typeof window > "u" || window.navigator == null ? !1 : ((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands.some((r) => e.test(r.brand))) || e.test(window.navigator.userAgent);
6477
6498
  }
6478
- function mo(e) {
6499
+ function go(e) {
6479
6500
  var t;
6480
6501
  return typeof window < "u" && window.navigator != null ? e.test(((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.platform) || window.navigator.platform) : !1;
6481
6502
  }
@@ -6484,31 +6505,31 @@ function ct(e) {
6484
6505
  let t = null;
6485
6506
  return () => (t == null && (t = e()), t);
6486
6507
  }
6487
- const go = ct(function() {
6488
- return mo(/^Mac/i);
6489
- }), _c = ct(function() {
6490
- return mo(/^iPhone/i);
6508
+ const vo = ct(function() {
6509
+ return go(/^Mac/i);
6491
6510
  }), Kc = ct(function() {
6492
- return mo(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
6493
- go() && navigator.maxTouchPoints > 1;
6511
+ return go(/^iPhone/i);
6494
6512
  }), Yc = ct(function() {
6495
- return _c() || Kc();
6513
+ return go(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
6514
+ vo() && navigator.maxTouchPoints > 1;
6515
+ }), Xc = ct(function() {
6516
+ return Kc() || Yc();
6496
6517
  });
6497
6518
  ct(function() {
6498
- return go() || Yc();
6519
+ return vo() || Xc();
6499
6520
  });
6500
6521
  ct(function() {
6501
- return nn(/AppleWebKit/i) && !Xc();
6522
+ return nn(/AppleWebKit/i) && !Jc();
6502
6523
  });
6503
- const Xc = ct(function() {
6524
+ const Jc = ct(function() {
6504
6525
  return nn(/Chrome/i);
6505
- }), Jc = ct(function() {
6526
+ }), Zc = ct(function() {
6506
6527
  return nn(/Android/i);
6507
6528
  });
6508
6529
  ct(function() {
6509
6530
  return nn(/Firefox/i);
6510
6531
  });
6511
- function Ii() {
6532
+ function Ni() {
6512
6533
  let e = ee(/* @__PURE__ */ new Map()), t = ne((o, s, i, l) => {
6513
6534
  let c = l != null && l.once ? (...d) => {
6514
6535
  e.current.delete(i), i(...d);
@@ -6538,33 +6559,33 @@ function Ii() {
6538
6559
  removeAllGlobalListeners: n
6539
6560
  };
6540
6561
  }
6541
- function Zc(e) {
6542
- return e.mozInputSource === 0 && e.isTrusted ? !0 : Jc() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
6562
+ function eu(e) {
6563
+ return e.mozInputSource === 0 && e.isTrusted ? !0 : Zc() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
6543
6564
  }
6544
- function Ni(e) {
6565
+ function $i(e) {
6545
6566
  let t = e;
6546
6567
  return t.nativeEvent = e, t.isDefaultPrevented = () => t.defaultPrevented, t.isPropagationStopped = () => t.cancelBubble, t.persist = () => {
6547
6568
  }, t;
6548
6569
  }
6549
- function eu(e, t) {
6570
+ function tu(e, t) {
6550
6571
  Object.defineProperty(e, "target", {
6551
6572
  value: t
6552
6573
  }), Object.defineProperty(e, "currentTarget", {
6553
6574
  value: t
6554
6575
  });
6555
6576
  }
6556
- function $i(e) {
6577
+ function Mi(e) {
6557
6578
  let t = ee({
6558
6579
  isFocused: !1,
6559
6580
  observer: null
6560
6581
  });
6561
- Pi(() => {
6582
+ Fi(() => {
6562
6583
  const n = t.current;
6563
6584
  return () => {
6564
6585
  n.observer && (n.observer.disconnect(), n.observer = null);
6565
6586
  };
6566
6587
  }, []);
6567
- let r = Gc((n) => {
6588
+ let r = qc((n) => {
6568
6589
  e == null || e(n);
6569
6590
  });
6570
6591
  return ne((n) => {
@@ -6572,7 +6593,7 @@ function $i(e) {
6572
6593
  t.current.isFocused = !0;
6573
6594
  let o = n.target, s = (i) => {
6574
6595
  if (t.current.isFocused = !1, o.disabled) {
6575
- let l = Ni(i);
6596
+ let l = $i(i);
6576
6597
  r(l);
6577
6598
  }
6578
6599
  t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
@@ -6602,62 +6623,62 @@ function $i(e) {
6602
6623
  r
6603
6624
  ]);
6604
6625
  }
6605
- let tu = !1, $r = null, qn = /* @__PURE__ */ new Set(), yr = /* @__PURE__ */ new Map(), zt = !1, Vn = !1;
6606
- const ru = {
6626
+ let ru = !1, $r = null, Vn = /* @__PURE__ */ new Set(), yr = /* @__PURE__ */ new Map(), zt = !1, Qn = !1;
6627
+ const nu = {
6607
6628
  Tab: !0,
6608
6629
  Escape: !0
6609
6630
  };
6610
- function vo(e, t) {
6611
- for (let r of qn) r(e, t);
6631
+ function bo(e, t) {
6632
+ for (let r of Vn) r(e, t);
6612
6633
  }
6613
- function nu(e) {
6614
- return !(e.metaKey || !go() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
6634
+ function ou(e) {
6635
+ return !(e.metaKey || !vo() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
6615
6636
  }
6616
6637
  function Zr(e) {
6617
- zt = !0, nu(e) && ($r = "keyboard", vo("keyboard", e));
6638
+ zt = !0, ou(e) && ($r = "keyboard", bo("keyboard", e));
6618
6639
  }
6619
6640
  function Ue(e) {
6620
- $r = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (zt = !0, vo("pointer", e));
6621
- }
6622
- function Mi(e) {
6623
- Zc(e) && (zt = !0, $r = "virtual");
6641
+ $r = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (zt = !0, bo("pointer", e));
6624
6642
  }
6625
6643
  function Di(e) {
6626
- e.target === window || e.target === document || tu || !e.isTrusted || (!zt && !Vn && ($r = "virtual", vo("virtual", e)), zt = !1, Vn = !1);
6644
+ eu(e) && (zt = !0, $r = "virtual");
6627
6645
  }
6628
- function Li() {
6629
- zt = !1, Vn = !0;
6646
+ function Li(e) {
6647
+ e.target === window || e.target === document || ru || !e.isTrusted || (!zt && !Qn && ($r = "virtual", bo("virtual", e)), zt = !1, Qn = !1);
6630
6648
  }
6631
- function Qn(e) {
6649
+ function ji() {
6650
+ zt = !1, Qn = !0;
6651
+ }
6652
+ function _n(e) {
6632
6653
  if (typeof window > "u" || typeof document > "u" || yr.get(Rt(e))) return;
6633
6654
  const t = Rt(e), r = Ct(e);
6634
6655
  let n = t.HTMLElement.prototype.focus;
6635
6656
  t.HTMLElement.prototype.focus = function() {
6636
6657
  zt = !0, n.apply(this, arguments);
6637
- }, r.addEventListener("keydown", Zr, !0), r.addEventListener("keyup", Zr, !0), r.addEventListener("click", Mi, !0), t.addEventListener("focus", Di, !0), t.addEventListener("blur", Li, !1), typeof PointerEvent < "u" ? (r.addEventListener("pointerdown", Ue, !0), r.addEventListener("pointermove", Ue, !0), r.addEventListener("pointerup", Ue, !0)) : process.env.NODE_ENV === "test" && (r.addEventListener("mousedown", Ue, !0), r.addEventListener("mousemove", Ue, !0), r.addEventListener("mouseup", Ue, !0)), t.addEventListener("beforeunload", () => {
6638
- ji(e);
6658
+ }, r.addEventListener("keydown", Zr, !0), r.addEventListener("keyup", Zr, !0), r.addEventListener("click", Di, !0), t.addEventListener("focus", Li, !0), t.addEventListener("blur", ji, !1), typeof PointerEvent < "u" ? (r.addEventListener("pointerdown", Ue, !0), r.addEventListener("pointermove", Ue, !0), r.addEventListener("pointerup", Ue, !0)) : process.env.NODE_ENV === "test" && (r.addEventListener("mousedown", Ue, !0), r.addEventListener("mousemove", Ue, !0), r.addEventListener("mouseup", Ue, !0)), t.addEventListener("beforeunload", () => {
6659
+ Bi(e);
6639
6660
  }, {
6640
6661
  once: !0
6641
6662
  }), yr.set(t, {
6642
6663
  focus: n
6643
6664
  });
6644
6665
  }
6645
- const ji = (e, t) => {
6666
+ const Bi = (e, t) => {
6646
6667
  const r = Rt(e), n = Ct(e);
6647
- t && n.removeEventListener("DOMContentLoaded", t), yr.has(r) && (r.HTMLElement.prototype.focus = yr.get(r).focus, n.removeEventListener("keydown", Zr, !0), n.removeEventListener("keyup", Zr, !0), n.removeEventListener("click", Mi, !0), r.removeEventListener("focus", Di, !0), r.removeEventListener("blur", Li, !1), typeof PointerEvent < "u" ? (n.removeEventListener("pointerdown", Ue, !0), n.removeEventListener("pointermove", Ue, !0), n.removeEventListener("pointerup", Ue, !0)) : process.env.NODE_ENV === "test" && (n.removeEventListener("mousedown", Ue, !0), n.removeEventListener("mousemove", Ue, !0), n.removeEventListener("mouseup", Ue, !0)), yr.delete(r));
6668
+ t && n.removeEventListener("DOMContentLoaded", t), yr.has(r) && (r.HTMLElement.prototype.focus = yr.get(r).focus, n.removeEventListener("keydown", Zr, !0), n.removeEventListener("keyup", Zr, !0), n.removeEventListener("click", Di, !0), r.removeEventListener("focus", Li, !0), r.removeEventListener("blur", ji, !1), typeof PointerEvent < "u" ? (n.removeEventListener("pointerdown", Ue, !0), n.removeEventListener("pointermove", Ue, !0), n.removeEventListener("pointerup", Ue, !0)) : process.env.NODE_ENV === "test" && (n.removeEventListener("mousedown", Ue, !0), n.removeEventListener("mousemove", Ue, !0), n.removeEventListener("mouseup", Ue, !0)), yr.delete(r));
6648
6669
  };
6649
- function ou(e) {
6670
+ function su(e) {
6650
6671
  const t = Ct(e);
6651
6672
  let r;
6652
- return t.readyState !== "loading" ? Qn(e) : (r = () => {
6653
- Qn(e);
6654
- }, t.addEventListener("DOMContentLoaded", r)), () => ji(e, r);
6673
+ return t.readyState !== "loading" ? _n(e) : (r = () => {
6674
+ _n(e);
6675
+ }, t.addEventListener("DOMContentLoaded", r)), () => Bi(e, r);
6655
6676
  }
6656
- typeof document < "u" && ou();
6657
- function Bi() {
6677
+ typeof document < "u" && su();
6678
+ function Hi() {
6658
6679
  return $r !== "pointer";
6659
6680
  }
6660
- const su = /* @__PURE__ */ new Set([
6681
+ const iu = /* @__PURE__ */ new Set([
6661
6682
  "checkbox",
6662
6683
  "radio",
6663
6684
  "range",
@@ -6668,22 +6689,22 @@ const su = /* @__PURE__ */ new Set([
6668
6689
  "submit",
6669
6690
  "reset"
6670
6691
  ]);
6671
- function iu(e, t, r) {
6692
+ function au(e, t, r) {
6672
6693
  let n = Ct(r == null ? void 0 : r.target);
6673
6694
  const o = typeof window < "u" ? Rt(r == null ? void 0 : r.target).HTMLInputElement : HTMLInputElement, s = typeof window < "u" ? Rt(r == null ? void 0 : r.target).HTMLTextAreaElement : HTMLTextAreaElement, i = typeof window < "u" ? Rt(r == null ? void 0 : r.target).HTMLElement : HTMLElement, l = typeof window < "u" ? Rt(r == null ? void 0 : r.target).KeyboardEvent : KeyboardEvent;
6674
- return e = e || n.activeElement instanceof o && !su.has(n.activeElement.type) || n.activeElement instanceof s || n.activeElement instanceof i && n.activeElement.isContentEditable, !(e && t === "keyboard" && r instanceof l && !ru[r.key]);
6695
+ return e = e || n.activeElement instanceof o && !iu.has(n.activeElement.type) || n.activeElement instanceof s || n.activeElement instanceof i && n.activeElement.isContentEditable, !(e && t === "keyboard" && r instanceof l && !nu[r.key]);
6675
6696
  }
6676
- function au(e, t, r) {
6677
- Qn(), pe(() => {
6697
+ function lu(e, t, r) {
6698
+ _n(), pe(() => {
6678
6699
  let n = (o, s) => {
6679
- iu(!!(r != null && r.isTextInput), o, s) && e(Bi());
6700
+ au(!!(r != null && r.isTextInput), o, s) && e(Hi());
6680
6701
  };
6681
- return qn.add(n), () => {
6682
- qn.delete(n);
6702
+ return Vn.add(n), () => {
6703
+ Vn.delete(n);
6683
6704
  };
6684
6705
  }, t);
6685
6706
  }
6686
- function lu(e) {
6707
+ function cu(e) {
6687
6708
  let { isDisabled: t, onFocus: r, onBlur: n, onFocusChange: o } = e;
6688
6709
  const s = ne((c) => {
6689
6710
  if (c.target === c.currentTarget)
@@ -6691,9 +6712,9 @@ function lu(e) {
6691
6712
  }, [
6692
6713
  n,
6693
6714
  o
6694
- ]), i = $i(s), l = ne((c) => {
6695
- const d = Ct(c.target), m = d ? Gn(d) : Gn();
6696
- c.target === c.currentTarget && m === Ri(c.nativeEvent) && (r && r(c), o && o(!0), i(c));
6715
+ ]), i = Mi(s), l = ne((c) => {
6716
+ const d = Ct(c.target), m = d ? qn(d) : qn();
6717
+ c.target === c.currentTarget && m === Ii(c.nativeEvent) && (r && r(c), o && o(!0), i(c));
6697
6718
  }, [
6698
6719
  o,
6699
6720
  r,
@@ -6706,29 +6727,29 @@ function lu(e) {
6706
6727
  }
6707
6728
  };
6708
6729
  }
6709
- function cu(e) {
6730
+ function uu(e) {
6710
6731
  let { isDisabled: t, onBlurWithin: r, onFocusWithin: n, onFocusWithinChange: o } = e, s = ee({
6711
6732
  isFocusWithin: !1
6712
- }), { addGlobalListener: i, removeAllGlobalListeners: l } = Ii(), c = ne((g) => {
6733
+ }), { addGlobalListener: i, removeAllGlobalListeners: l } = Ni(), c = ne((g) => {
6713
6734
  g.currentTarget.contains(g.target) && s.current.isFocusWithin && !g.currentTarget.contains(g.relatedTarget) && (s.current.isFocusWithin = !1, l(), r && r(g), o && o(!1));
6714
6735
  }, [
6715
6736
  r,
6716
6737
  o,
6717
6738
  s,
6718
6739
  l
6719
- ]), d = $i(c), m = ne((g) => {
6740
+ ]), d = Mi(c), m = ne((g) => {
6720
6741
  if (!g.currentTarget.contains(g.target)) return;
6721
- const x = Ct(g.target), h = Gn(x);
6722
- if (!s.current.isFocusWithin && h === Ri(g.nativeEvent)) {
6742
+ const x = Ct(g.target), h = qn(x);
6743
+ if (!s.current.isFocusWithin && h === Ii(g.nativeEvent)) {
6723
6744
  n && n(g), o && o(!0), s.current.isFocusWithin = !0, d(g);
6724
6745
  let O = g.currentTarget;
6725
6746
  i(x, "focus", (k) => {
6726
- if (s.current.isFocusWithin && !Fi(O, k.target)) {
6747
+ if (s.current.isFocusWithin && !Ri(O, k.target)) {
6727
6748
  let P = new x.defaultView.FocusEvent("blur", {
6728
6749
  relatedTarget: k.target
6729
6750
  });
6730
- eu(P, O);
6731
- let I = Ni(P);
6751
+ tu(P, O);
6752
+ let I = $i(P);
6732
6753
  c(I);
6733
6754
  }
6734
6755
  }, {
@@ -6755,36 +6776,36 @@ function cu(e) {
6755
6776
  }
6756
6777
  };
6757
6778
  }
6758
- let en = !1, gn = 0;
6759
- function _n() {
6779
+ let en = !1, vn = 0;
6780
+ function Kn() {
6760
6781
  en = !0, setTimeout(() => {
6761
6782
  en = !1;
6762
6783
  }, 50);
6763
6784
  }
6764
6785
  function Zo(e) {
6765
- e.pointerType === "touch" && _n();
6786
+ e.pointerType === "touch" && Kn();
6766
6787
  }
6767
- function uu() {
6788
+ function du() {
6768
6789
  if (!(typeof document > "u"))
6769
- return typeof PointerEvent < "u" ? document.addEventListener("pointerup", Zo) : process.env.NODE_ENV === "test" && document.addEventListener("touchend", _n), gn++, () => {
6770
- gn--, !(gn > 0) && (typeof PointerEvent < "u" ? document.removeEventListener("pointerup", Zo) : process.env.NODE_ENV === "test" && document.removeEventListener("touchend", _n));
6790
+ return typeof PointerEvent < "u" ? document.addEventListener("pointerup", Zo) : process.env.NODE_ENV === "test" && document.addEventListener("touchend", Kn), vn++, () => {
6791
+ vn--, !(vn > 0) && (typeof PointerEvent < "u" ? document.removeEventListener("pointerup", Zo) : process.env.NODE_ENV === "test" && document.removeEventListener("touchend", Kn));
6771
6792
  };
6772
6793
  }
6773
- function du(e) {
6794
+ function fu(e) {
6774
6795
  let { onHoverStart: t, onHoverChange: r, onHoverEnd: n, isDisabled: o } = e, [s, i] = ie(!1), l = ee({
6775
6796
  isHovered: !1,
6776
6797
  ignoreEmulatedMouseEvents: !1,
6777
6798
  pointerType: "",
6778
6799
  target: null
6779
6800
  }).current;
6780
- pe(uu, []);
6781
- let { addGlobalListener: c, removeAllGlobalListeners: d } = Ii(), { hoverProps: m, triggerHoverEnd: g } = he(() => {
6801
+ pe(du, []);
6802
+ let { addGlobalListener: c, removeAllGlobalListeners: d } = Ni(), { hoverProps: m, triggerHoverEnd: g } = he(() => {
6782
6803
  let x = (k, P) => {
6783
6804
  if (l.pointerType = P, o || P === "touch" || l.isHovered || !k.currentTarget.contains(k.target)) return;
6784
6805
  l.isHovered = !0;
6785
6806
  let I = k.currentTarget;
6786
6807
  l.target = I, c(Ct(k.target), "pointerover", (E) => {
6787
- l.isHovered && l.target && !Fi(l.target, E.target) && h(E, E.pointerType);
6808
+ l.isHovered && l.target && !Ri(l.target, E.target) && h(E, E.pointerType);
6788
6809
  }, {
6789
6810
  capture: !0
6790
6811
  }), t && t({
@@ -6834,24 +6855,24 @@ function du(e) {
6834
6855
  isHovered: s
6835
6856
  };
6836
6857
  }
6837
- function fu(e = {}) {
6858
+ function hu(e = {}) {
6838
6859
  let { autoFocus: t = !1, isTextInput: r, within: n } = e, o = ee({
6839
6860
  isFocused: !1,
6840
- isFocusVisible: t || Bi()
6861
+ isFocusVisible: t || Hi()
6841
6862
  }), [s, i] = ie(!1), [l, c] = ie(() => o.current.isFocused && o.current.isFocusVisible), d = ne(() => c(o.current.isFocused && o.current.isFocusVisible), []), m = ne((h) => {
6842
6863
  o.current.isFocused = h, i(h), d();
6843
6864
  }, [
6844
6865
  d
6845
6866
  ]);
6846
- au((h) => {
6867
+ lu((h) => {
6847
6868
  o.current.isFocusVisible = h, d();
6848
6869
  }, [], {
6849
6870
  isTextInput: r
6850
6871
  });
6851
- let { focusProps: g } = lu({
6872
+ let { focusProps: g } = cu({
6852
6873
  isDisabled: n,
6853
6874
  onFocusChange: m
6854
- }), { focusWithinProps: x } = cu({
6875
+ }), { focusWithinProps: x } = uu({
6855
6876
  isDisabled: !n,
6856
6877
  onFocusWithinChange: m
6857
6878
  });
@@ -6861,10 +6882,10 @@ function fu(e = {}) {
6861
6882
  focusProps: n ? x : g
6862
6883
  };
6863
6884
  }
6864
- var hu = Object.defineProperty, pu = (e, t, r) => t in e ? hu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, vn = (e, t, r) => (pu(e, typeof t != "symbol" ? t + "" : t, r), r);
6865
- let mu = class {
6885
+ var pu = Object.defineProperty, mu = (e, t, r) => t in e ? pu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, bn = (e, t, r) => (mu(e, typeof t != "symbol" ? t + "" : t, r), r);
6886
+ let gu = class {
6866
6887
  constructor() {
6867
- vn(this, "current", this.detect()), vn(this, "handoffState", "pending"), vn(this, "currentId", 0);
6888
+ bn(this, "current", this.detect()), bn(this, "handoffState", "pending"), bn(this, "currentId", 0);
6868
6889
  }
6869
6890
  set(t) {
6870
6891
  this.current !== t && (this.handoffState = "pending", this.currentId = 0, this.current = t);
@@ -6890,7 +6911,7 @@ let mu = class {
6890
6911
  get isHandoffComplete() {
6891
6912
  return this.handoffState === "complete";
6892
6913
  }
6893
- }, tt = new mu();
6914
+ }, tt = new gu();
6894
6915
  function on(e) {
6895
6916
  var t;
6896
6917
  return tt.isServer ? null : e == null ? document : (t = e == null ? void 0 : e.ownerDocument) != null ? t : document;
@@ -6899,14 +6920,14 @@ function tn(e) {
6899
6920
  var t, r;
6900
6921
  return tt.isServer ? null : e == null ? document : (r = (t = e == null ? void 0 : e.getRootNode) == null ? void 0 : t.call(e)) != null ? r : document;
6901
6922
  }
6902
- function Hi(e) {
6923
+ function Ui(e) {
6903
6924
  var t, r;
6904
6925
  return (r = (t = tn(e)) == null ? void 0 : t.activeElement) != null ? r : null;
6905
6926
  }
6906
- function gu(e) {
6907
- return Hi(e) === e;
6927
+ function vu(e) {
6928
+ return Ui(e) === e;
6908
6929
  }
6909
- function Ui(e) {
6930
+ function Wi(e) {
6910
6931
  typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
6911
6932
  throw t;
6912
6933
  }));
@@ -6924,7 +6945,7 @@ function Me() {
6924
6945
  return t.add(() => clearTimeout(n));
6925
6946
  }, microTask(...r) {
6926
6947
  let n = { current: !0 };
6927
- return Ui(() => {
6948
+ return Wi(() => {
6928
6949
  n.current && r[0]();
6929
6950
  }), t.add(() => {
6930
6951
  n.current = !1;
@@ -6964,14 +6985,14 @@ let ae = function(e) {
6964
6985
  let t = ur(e);
6965
6986
  return K.useCallback((...r) => t.current(...r), [t]);
6966
6987
  };
6967
- function vu(e) {
6988
+ function bu(e) {
6968
6989
  let t = e.width / 2, r = e.height / 2;
6969
6990
  return { top: e.clientY - r, right: e.clientX + t, bottom: e.clientY + r, left: e.clientX - t };
6970
6991
  }
6971
- function bu(e, t) {
6992
+ function yu(e, t) {
6972
6993
  return !(!e || !t || e.right < t.left || e.left > t.right || e.bottom < t.top || e.top > t.bottom);
6973
6994
  }
6974
- function yu({ disabled: e = !1 } = {}) {
6995
+ function wu({ disabled: e = !1 } = {}) {
6975
6996
  let t = ee(null), [r, n] = ie(!1), o = cr(), s = ae(() => {
6976
6997
  t.current = null, n(!1), o.dispose();
6977
6998
  }), i = ae((l) => {
@@ -6981,8 +7002,8 @@ function yu({ disabled: e = !1 } = {}) {
6981
7002
  let c = on(l.currentTarget);
6982
7003
  o.addEventListener(c, "pointerup", s, !1), o.addEventListener(c, "pointermove", (d) => {
6983
7004
  if (t.current) {
6984
- let m = vu(d);
6985
- n(bu(m, t.current.getBoundingClientRect()));
7005
+ let m = bu(d);
7006
+ n(yu(m, t.current.getBoundingClientRect()));
6986
7007
  }
6987
7008
  }, !1), o.addEventListener(c, "pointercancel", s, !1);
6988
7009
  }
@@ -6993,9 +7014,9 @@ function yu({ disabled: e = !1 } = {}) {
6993
7014
  function St(e) {
6994
7015
  return he(() => e, Object.values(e));
6995
7016
  }
6996
- let wu = Oe(void 0);
6997
- function bo() {
6998
- return me(wu);
7017
+ let xu = Oe(void 0);
7018
+ function yo() {
7019
+ return me(xu);
6999
7020
  }
7000
7021
  function es(...e) {
7001
7022
  return Array.from(new Set(e.flatMap((t) => typeof t == "string" ? t.split(" ") : []))).filter(Boolean).join(" ");
@@ -7008,14 +7029,14 @@ function rt(e, t, ...r) {
7008
7029
  let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((o) => `"${o}"`).join(", ")}.`);
7009
7030
  throw Error.captureStackTrace && Error.captureStackTrace(n, rt), n;
7010
7031
  }
7011
- var Kn = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Kn || {}), xu = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(xu || {});
7032
+ var Yn = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Yn || {}), Eu = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Eu || {});
7012
7033
  function qe() {
7013
- let e = Su();
7014
- return ne((t) => Eu({ mergeRefs: e, ...t }), [e]);
7034
+ let e = Ou();
7035
+ return ne((t) => Su({ mergeRefs: e, ...t }), [e]);
7015
7036
  }
7016
- function Eu({ ourProps: e, theirProps: t, slot: r, defaultTag: n, features: o, visible: s = !0, name: i, mergeRefs: l }) {
7017
- l = l ?? Ou;
7018
- let c = Wi(t, e);
7037
+ function Su({ ourProps: e, theirProps: t, slot: r, defaultTag: n, features: o, visible: s = !0, name: i, mergeRefs: l }) {
7038
+ l = l ?? ku;
7039
+ let c = zi(t, e);
7019
7040
  if (s) return Wr(c, r, n, i, l);
7020
7041
  let d = o ?? 0;
7021
7042
  if (d & 2) {
@@ -7033,8 +7054,8 @@ function Eu({ ourProps: e, theirProps: t, slot: r, defaultTag: n, features: o, v
7033
7054
  return Wr(c, r, n, i, l);
7034
7055
  }
7035
7056
  function Wr(e, t = {}, r, n, o) {
7036
- let { as: s = r, children: i, refName: l = "ref", ...c } = bn(e, ["unmount", "static"]), d = e.ref !== void 0 ? { [l]: e.ref } : {}, m = typeof i == "function" ? i(t) : i;
7037
- m = Gi(m), "className" in c && c.className && typeof c.className == "function" && (c.className = c.className(t)), c["aria-labelledby"] && c["aria-labelledby"] === c.id && (c["aria-labelledby"] = void 0);
7057
+ let { as: s = r, children: i, refName: l = "ref", ...c } = yn(e, ["unmount", "static"]), d = e.ref !== void 0 ? { [l]: e.ref } : {}, m = typeof i == "function" ? i(t) : i;
7058
+ m = qi(m), "className" in c && c.className && typeof c.className == "function" && (c.className = c.className(t)), c["aria-labelledby"] && c["aria-labelledby"] === c.id && (c["aria-labelledby"] = void 0);
7038
7059
  let g = {};
7039
7060
  if (t) {
7040
7061
  let x = !1, h = [];
@@ -7044,19 +7065,19 @@ function Wr(e, t = {}, r, n, o) {
7044
7065
  for (let O of h) g[`data-${O}`] = "";
7045
7066
  }
7046
7067
  }
7047
- if (Vr(s) && (Object.keys(Pt(c)).length > 0 || Object.keys(Pt(g)).length > 0)) if (!to(m) || Array.isArray(m) && m.length > 1 || Cu(m)) {
7068
+ if (Vr(s) && (Object.keys(Pt(c)).length > 0 || Object.keys(Pt(g)).length > 0)) if (!ro(m) || Array.isArray(m) && m.length > 1 || Au(m)) {
7048
7069
  if (Object.keys(Pt(c)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${n} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(Pt(c)).concat(Object.keys(Pt(g))).map((x) => ` - ${x}`).join(`
7049
7070
  `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((x) => ` - ${x}`).join(`
7050
7071
  `)].join(`
7051
7072
  `));
7052
7073
  } else {
7053
- let x = m.props, h = x == null ? void 0 : x.className, O = typeof h == "function" ? (...I) => es(h(...I), c.className) : es(h, c.className), k = O ? { className: O } : {}, P = Wi(m.props, Pt(bn(c, ["ref"])));
7074
+ let x = m.props, h = x == null ? void 0 : x.className, O = typeof h == "function" ? (...I) => es(h(...I), c.className) : es(h, c.className), k = O ? { className: O } : {}, P = zi(m.props, Pt(yn(c, ["ref"])));
7054
7075
  for (let I in g) I in P && delete g[I];
7055
- return Us(m, Object.assign({}, P, g, d, { ref: o(ku(m), d.ref) }, k));
7076
+ return Us(m, Object.assign({}, P, g, d, { ref: o(Cu(m), d.ref) }, k));
7056
7077
  }
7057
- return Ia(s, Object.assign({}, bn(c, ["ref"]), !Vr(s) && d, !Vr(s) && g), m);
7078
+ return Na(s, Object.assign({}, yn(c, ["ref"]), !Vr(s) && d, !Vr(s) && g), m);
7058
7079
  }
7059
- function Su() {
7080
+ function Ou() {
7060
7081
  let e = ee([]), t = ne((r) => {
7061
7082
  for (let n of e.current) n != null && (typeof n == "function" ? n(r) : n.current = r);
7062
7083
  }, []);
@@ -7064,12 +7085,12 @@ function Su() {
7064
7085
  if (!r.every((n) => n == null)) return e.current = r, t;
7065
7086
  };
7066
7087
  }
7067
- function Ou(...e) {
7088
+ function ku(...e) {
7068
7089
  return e.every((t) => t == null) ? void 0 : (t) => {
7069
7090
  for (let r of e) r != null && (typeof r == "function" ? r(t) : r.current = t);
7070
7091
  };
7071
7092
  }
7072
- function Wi(...e) {
7093
+ function zi(...e) {
7073
7094
  if (e.length === 0) return {};
7074
7095
  if (e.length === 1) return e[0];
7075
7096
  let t = {}, r = {};
@@ -7087,7 +7108,7 @@ function Wi(...e) {
7087
7108
  } });
7088
7109
  return t;
7089
7110
  }
7090
- function zi(...e) {
7111
+ function Gi(...e) {
7091
7112
  if (e.length === 0) return {};
7092
7113
  if (e.length === 1) return e[0];
7093
7114
  let t = {}, r = {};
@@ -7100,54 +7121,54 @@ function zi(...e) {
7100
7121
  }
7101
7122
  function Ve(e) {
7102
7123
  var t;
7103
- return Object.assign(Ra(e), { displayName: (t = e.displayName) != null ? t : e.name });
7124
+ return Object.assign(Ia(e), { displayName: (t = e.displayName) != null ? t : e.name });
7104
7125
  }
7105
7126
  function Pt(e) {
7106
7127
  let t = Object.assign({}, e);
7107
7128
  for (let r in t) t[r] === void 0 && delete t[r];
7108
7129
  return t;
7109
7130
  }
7110
- function bn(e, t = []) {
7131
+ function yn(e, t = []) {
7111
7132
  let r = Object.assign({}, e);
7112
7133
  for (let n of t) n in r && delete r[n];
7113
7134
  return r;
7114
7135
  }
7115
- function ku(e) {
7136
+ function Cu(e) {
7116
7137
  return K.version.split(".")[0] >= "19" ? e.props.ref : e.ref;
7117
7138
  }
7118
- function Gi(e) {
7139
+ function qi(e) {
7119
7140
  if (e != null && e.$$typeof === Symbol.for("react.lazy")) {
7120
7141
  let t = e._payload;
7121
- if (t != null && t.status === "fulfilled") return Gi(t.value);
7142
+ if (t != null && t.status === "fulfilled") return qi(t.value);
7122
7143
  }
7123
7144
  return e;
7124
7145
  }
7125
7146
  function Vr(e) {
7126
7147
  return e === Rr || e === Symbol.for("react.fragment");
7127
7148
  }
7128
- function Cu(e) {
7149
+ function Au(e) {
7129
7150
  return Vr(e.type);
7130
7151
  }
7131
- function Au(e, t, r) {
7152
+ function Tu(e, t, r) {
7132
7153
  let [n, o] = ie(r), s = e !== void 0, i = ee(s), l = ee(!1), c = ee(!1);
7133
7154
  return s && !i.current && !l.current ? (l.current = !0, i.current = s, console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")) : !s && i.current && !c.current && (c.current = !0, i.current = s, console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")), [s ? e : n, ae((d) => (s || Kr(() => o(d)), t == null ? void 0 : t(d)))];
7134
7155
  }
7135
- function Tu(e) {
7156
+ function Pu(e) {
7136
7157
  let [t] = ie(e);
7137
7158
  return t;
7138
7159
  }
7139
- function qi(e = {}, t = null, r = []) {
7140
- for (let [n, o] of Object.entries(e)) Qi(r, Vi(t, n), o);
7160
+ function Vi(e = {}, t = null, r = []) {
7161
+ for (let [n, o] of Object.entries(e)) _i(r, Qi(t, n), o);
7141
7162
  return r;
7142
7163
  }
7143
- function Vi(e, t) {
7164
+ function Qi(e, t) {
7144
7165
  return e ? e + "[" + t + "]" : t;
7145
7166
  }
7146
- function Qi(e, t, r) {
7147
- if (Array.isArray(r)) for (let [n, o] of r.entries()) Qi(e, Vi(t, n.toString()), o);
7148
- else r instanceof Date ? e.push([t, r.toISOString()]) : typeof r == "boolean" ? e.push([t, r ? "1" : "0"]) : typeof r == "string" ? e.push([t, r]) : typeof r == "number" ? e.push([t, `${r}`]) : r == null ? e.push([t, ""]) : Fu(r) && !to(r) && qi(r, t, e);
7167
+ function _i(e, t, r) {
7168
+ if (Array.isArray(r)) for (let [n, o] of r.entries()) _i(e, Qi(t, n.toString()), o);
7169
+ else r instanceof Date ? e.push([t, r.toISOString()]) : typeof r == "boolean" ? e.push([t, r ? "1" : "0"]) : typeof r == "string" ? e.push([t, r]) : typeof r == "number" ? e.push([t, `${r}`]) : r == null ? e.push([t, ""]) : Ru(r) && !ro(r) && Vi(r, t, e);
7149
7170
  }
7150
- function Pu(e) {
7171
+ function Fu(e) {
7151
7172
  var t, r;
7152
7173
  let n = (t = e == null ? void 0 : e.form) != null ? t : e.closest("form");
7153
7174
  if (n) {
@@ -7158,52 +7179,52 @@ function Pu(e) {
7158
7179
  (r = n.requestSubmit) == null || r.call(n);
7159
7180
  }
7160
7181
  }
7161
- function Fu(e) {
7182
+ function Ru(e) {
7162
7183
  if (Object.prototype.toString.call(e) !== "[object Object]") return !1;
7163
7184
  let t = Object.getPrototypeOf(e);
7164
7185
  return t === null || Object.getPrototypeOf(t) === null;
7165
7186
  }
7166
- let Ru = "span";
7167
- var yo = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(yo || {});
7168
- function Iu(e, t) {
7187
+ let Iu = "span";
7188
+ var wo = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(wo || {});
7189
+ function Nu(e, t) {
7169
7190
  var r;
7170
7191
  let { features: n = 1, ...o } = e, s = { ref: t, "aria-hidden": (n & 2) === 2 ? !0 : (r = o["aria-hidden"]) != null ? r : void 0, hidden: (n & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(n & 4) === 4 && (n & 2) !== 2 && { display: "none" } } };
7171
- return qe()({ ourProps: s, theirProps: o, slot: {}, defaultTag: Ru, name: "Hidden" });
7192
+ return qe()({ ourProps: s, theirProps: o, slot: {}, defaultTag: Iu, name: "Hidden" });
7172
7193
  }
7173
- let _i = Ve(Iu), Nu = Oe(null);
7174
- function $u({ children: e }) {
7175
- let t = me(Nu);
7194
+ let Ki = Ve(Nu), $u = Oe(null);
7195
+ function Mu({ children: e }) {
7196
+ let t = me($u);
7176
7197
  if (!t) return K.createElement(K.Fragment, null, e);
7177
7198
  let { target: r } = t;
7178
7199
  return r ? Xs(K.createElement(K.Fragment, null, e), r) : null;
7179
7200
  }
7180
- function Mu({ data: e, form: t, disabled: r, onReset: n, overrides: o }) {
7201
+ function Du({ data: e, form: t, disabled: r, onReset: n, overrides: o }) {
7181
7202
  let [s, i] = ie(null), l = cr();
7182
7203
  return pe(() => {
7183
7204
  if (n && s) return l.addEventListener(s, "reset", n);
7184
- }, [s, t, n]), K.createElement($u, null, K.createElement(Du, { setForm: i, formId: t }), qi(e).map(([c, d]) => K.createElement(_i, { features: yo.Hidden, ...Pt({ key: c, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: t, disabled: r, name: c, value: d, ...o }) })));
7205
+ }, [s, t, n]), K.createElement(Mu, null, K.createElement(Lu, { setForm: i, formId: t }), Vi(e).map(([c, d]) => K.createElement(Ki, { features: wo.Hidden, ...Pt({ key: c, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: t, disabled: r, name: c, value: d, ...o }) })));
7185
7206
  }
7186
- function Du({ setForm: e, formId: t }) {
7207
+ function Lu({ setForm: e, formId: t }) {
7187
7208
  return pe(() => {
7188
7209
  if (t) {
7189
7210
  let r = document.getElementById(t);
7190
7211
  r && e(r);
7191
7212
  }
7192
- }, [e, t]), t ? null : K.createElement(_i, { features: yo.Hidden, as: "input", type: "hidden", hidden: !0, readOnly: !0, ref: (r) => {
7213
+ }, [e, t]), t ? null : K.createElement(Ki, { features: wo.Hidden, as: "input", type: "hidden", hidden: !0, readOnly: !0, ref: (r) => {
7193
7214
  if (!r) return;
7194
7215
  let n = r.closest("form");
7195
7216
  n && e(n);
7196
7217
  } });
7197
7218
  }
7198
- let Lu = Oe(void 0);
7199
- function Ki() {
7200
- return me(Lu);
7219
+ let ju = Oe(void 0);
7220
+ function Yi() {
7221
+ return me(ju);
7201
7222
  }
7202
- function Yi(e) {
7223
+ function Xi(e) {
7203
7224
  return typeof e != "object" || e === null ? !1 : "nodeType" in e;
7204
7225
  }
7205
7226
  function sn(e) {
7206
- return Yi(e) && "tagName" in e;
7227
+ return Xi(e) && "tagName" in e;
7207
7228
  }
7208
7229
  function ut(e) {
7209
7230
  return sn(e) && "accessKey" in e;
@@ -7211,45 +7232,45 @@ function ut(e) {
7211
7232
  function Qt(e) {
7212
7233
  return sn(e) && "tabIndex" in e;
7213
7234
  }
7214
- function ju(e) {
7235
+ function Bu(e) {
7215
7236
  return sn(e) && "style" in e;
7216
7237
  }
7217
- function Bu(e) {
7238
+ function Hu(e) {
7218
7239
  return ut(e) && e.nodeName === "IFRAME";
7219
7240
  }
7220
- function Xi(e) {
7241
+ function Ji(e) {
7221
7242
  return ut(e) && e.nodeName === "INPUT";
7222
7243
  }
7223
7244
  function ts(e) {
7224
7245
  return ut(e) && e.nodeName === "LABEL";
7225
7246
  }
7226
- function Hu(e) {
7247
+ function Uu(e) {
7227
7248
  return ut(e) && e.nodeName === "FIELDSET";
7228
7249
  }
7229
- function Ji(e) {
7250
+ function Zi(e) {
7230
7251
  return ut(e) && e.nodeName === "LEGEND";
7231
7252
  }
7232
- function Uu(e) {
7253
+ function Wu(e) {
7233
7254
  return sn(e) ? e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]') : !1;
7234
7255
  }
7235
7256
  function rs(e) {
7236
7257
  let t = e.parentElement, r = null;
7237
- for (; t && !Hu(t); ) Ji(t) && (r = t), t = t.parentElement;
7258
+ for (; t && !Uu(t); ) Zi(t) && (r = t), t = t.parentElement;
7238
7259
  let n = (t == null ? void 0 : t.getAttribute("disabled")) === "";
7239
- return n && Wu(r) ? !1 : n;
7260
+ return n && zu(r) ? !1 : n;
7240
7261
  }
7241
- function Wu(e) {
7262
+ function zu(e) {
7242
7263
  if (!e) return !1;
7243
7264
  let t = e.previousElementSibling;
7244
7265
  for (; t !== null; ) {
7245
- if (Ji(t)) return !1;
7266
+ if (Zi(t)) return !1;
7246
7267
  t = t.previousElementSibling;
7247
7268
  }
7248
7269
  return !0;
7249
7270
  }
7250
- let Zi = Symbol();
7251
- function zu(e, t = !0) {
7252
- return Object.assign(e, { [Zi]: t });
7271
+ let ea = Symbol();
7272
+ function Gu(e, t = !0) {
7273
+ return Object.assign(e, { [ea]: t });
7253
7274
  }
7254
7275
  function nt(...e) {
7255
7276
  let t = ee(e);
@@ -7259,49 +7280,49 @@ function nt(...e) {
7259
7280
  let r = ae((n) => {
7260
7281
  for (let o of t.current) o != null && (typeof o == "function" ? o(n) : o.current = n);
7261
7282
  });
7262
- return e.every((n) => n == null || (n == null ? void 0 : n[Zi])) ? void 0 : r;
7283
+ return e.every((n) => n == null || (n == null ? void 0 : n[ea])) ? void 0 : r;
7263
7284
  }
7264
- let wo = Oe(null);
7265
- wo.displayName = "DescriptionContext";
7266
- function ea() {
7267
- let e = me(wo);
7285
+ let xo = Oe(null);
7286
+ xo.displayName = "DescriptionContext";
7287
+ function ta() {
7288
+ let e = me(xo);
7268
7289
  if (e === null) {
7269
7290
  let t = new Error("You used a <Description /> component, but it is not inside a relevant parent.");
7270
- throw Error.captureStackTrace && Error.captureStackTrace(t, ea), t;
7291
+ throw Error.captureStackTrace && Error.captureStackTrace(t, ta), t;
7271
7292
  }
7272
7293
  return e;
7273
7294
  }
7274
- function Gu() {
7295
+ function qu() {
7275
7296
  var e, t;
7276
- return (t = (e = me(wo)) == null ? void 0 : e.value) != null ? t : void 0;
7297
+ return (t = (e = me(xo)) == null ? void 0 : e.value) != null ? t : void 0;
7277
7298
  }
7278
- let qu = "p";
7279
- function Vu(e, t) {
7280
- let r = Gt(), n = bo(), { id: o = `headlessui-description-${r}`, ...s } = e, i = ea(), l = nt(t);
7299
+ let Vu = "p";
7300
+ function Qu(e, t) {
7301
+ let r = Gt(), n = yo(), { id: o = `headlessui-description-${r}`, ...s } = e, i = ta(), l = nt(t);
7281
7302
  Ae(() => i.register(o), [o, i.register]);
7282
7303
  let c = St({ ...i.slot, disabled: n || !1 }), d = { ref: l, ...i.props, id: o };
7283
- return qe()({ ourProps: d, theirProps: s, slot: c, defaultTag: qu, name: i.name || "Description" });
7304
+ return qe()({ ourProps: d, theirProps: s, slot: c, defaultTag: Vu, name: i.name || "Description" });
7284
7305
  }
7285
- let Qu = Ve(Vu);
7286
- Object.assign(Qu, {});
7306
+ let _u = Ve(Qu);
7307
+ Object.assign(_u, {});
7287
7308
  var ye = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(ye || {});
7288
7309
  let an = Oe(null);
7289
7310
  an.displayName = "LabelContext";
7290
- function ta() {
7311
+ function ra() {
7291
7312
  let e = me(an);
7292
7313
  if (e === null) {
7293
7314
  let t = new Error("You used a <Label /> component, but it is not inside a relevant parent.");
7294
- throw Error.captureStackTrace && Error.captureStackTrace(t, ta), t;
7315
+ throw Error.captureStackTrace && Error.captureStackTrace(t, ra), t;
7295
7316
  }
7296
7317
  return e;
7297
7318
  }
7298
- function ra(e) {
7319
+ function na(e) {
7299
7320
  var t, r, n;
7300
7321
  let o = (r = (t = me(an)) == null ? void 0 : t.value) != null ? r : void 0;
7301
7322
  return ((n = e == null ? void 0 : e.length) != null ? n : 0) > 0 ? [o, ...e].filter(Boolean).join(" ") : o;
7302
7323
  }
7303
- function _u({ inherit: e = !1 } = {}) {
7304
- let t = ra(), [r, n] = ie([]), o = e ? [t, ...r].filter(Boolean) : r;
7324
+ function Ku({ inherit: e = !1 } = {}) {
7325
+ let t = na(), [r, n] = ie([]), o = e ? [t, ...r].filter(Boolean) : r;
7305
7326
  return [o.length > 0 ? o.join(" ") : void 0, he(() => function(s) {
7306
7327
  let i = ae((c) => (n((d) => [...d, c]), () => n((d) => {
7307
7328
  let m = d.slice(), g = m.indexOf(c);
@@ -7310,31 +7331,31 @@ function _u({ inherit: e = !1 } = {}) {
7310
7331
  return K.createElement(an.Provider, { value: l }, s.children);
7311
7332
  }, [n])];
7312
7333
  }
7313
- let Ku = "label";
7314
- function Yu(e, t) {
7334
+ let Yu = "label";
7335
+ function Xu(e, t) {
7315
7336
  var r;
7316
- let n = Gt(), o = ta(), s = Ki(), i = bo(), { id: l = `headlessui-label-${n}`, htmlFor: c = s ?? ((r = o.props) == null ? void 0 : r.htmlFor), passive: d = !1, ...m } = e, g = nt(t);
7337
+ let n = Gt(), o = ra(), s = Yi(), i = yo(), { id: l = `headlessui-label-${n}`, htmlFor: c = s ?? ((r = o.props) == null ? void 0 : r.htmlFor), passive: d = !1, ...m } = e, g = nt(t);
7317
7338
  Ae(() => o.register(l), [l, o.register]);
7318
7339
  let x = ae((k) => {
7319
7340
  let P = k.currentTarget;
7320
- if (!(k.target !== k.currentTarget && Uu(k.target)) && (ts(P) && k.preventDefault(), o.props && "onClick" in o.props && typeof o.props.onClick == "function" && o.props.onClick(k), ts(P))) {
7341
+ if (!(k.target !== k.currentTarget && Wu(k.target)) && (ts(P) && k.preventDefault(), o.props && "onClick" in o.props && typeof o.props.onClick == "function" && o.props.onClick(k), ts(P))) {
7321
7342
  let I = document.getElementById(P.htmlFor);
7322
7343
  if (I) {
7323
7344
  let E = I.getAttribute("disabled");
7324
7345
  if (E === "true" || E === "") return;
7325
7346
  let N = I.getAttribute("aria-disabled");
7326
7347
  if (N === "true" || N === "") return;
7327
- (Xi(I) && (I.type === "file" || I.type === "radio" || I.type === "checkbox") || I.role === "radio" || I.role === "checkbox" || I.role === "switch") && I.click(), I.focus({ preventScroll: !0 });
7348
+ (Ji(I) && (I.type === "file" || I.type === "radio" || I.type === "checkbox") || I.role === "radio" || I.role === "checkbox" || I.role === "switch") && I.click(), I.focus({ preventScroll: !0 });
7328
7349
  }
7329
7350
  }
7330
7351
  }), h = St({ ...o.slot, disabled: i || !1 }), O = { ref: g, ...o.props, id: l, htmlFor: c, onClick: x };
7331
- return d && ("onClick" in O && (delete O.htmlFor, delete O.onClick), "onClick" in m && delete m.onClick), qe()({ ourProps: O, theirProps: m, slot: h, defaultTag: c ? Ku : "div", name: o.name || "Label" });
7352
+ return d && ("onClick" in O && (delete O.htmlFor, delete O.onClick), "onClick" in m && delete m.onClick), qe()({ ourProps: O, theirProps: m, slot: h, defaultTag: c ? Yu : "div", name: o.name || "Label" });
7332
7353
  }
7333
- let Xu = Ve(Yu), na = Object.assign(Xu, {});
7334
- function Ju(e, t) {
7354
+ let Ju = Ve(Xu), oa = Object.assign(Ju, {});
7355
+ function Zu(e, t) {
7335
7356
  return e !== null && t !== null && typeof e == "object" && typeof t == "object" && "id" in e && "id" in t ? e.id === t.id : e === t;
7336
7357
  }
7337
- function Zu(e = Ju) {
7358
+ function ed(e = Zu) {
7338
7359
  return ne((t, r) => {
7339
7360
  if (typeof e == "string") {
7340
7361
  let n = e;
@@ -7348,7 +7369,7 @@ function ns(e) {
7348
7369
  let { width: t, height: r } = e.getBoundingClientRect();
7349
7370
  return { width: t, height: r };
7350
7371
  }
7351
- function ed(e, t, r = !1) {
7372
+ function td(e, t, r = !1) {
7352
7373
  let [n, o] = ie(() => ns(t));
7353
7374
  return Ae(() => {
7354
7375
  if (!t || !e) return;
@@ -7363,16 +7384,16 @@ function ed(e, t, r = !1) {
7363
7384
  };
7364
7385
  }, [t, e]), r ? { width: `${n.width}px`, height: `${n.height}px` } : n;
7365
7386
  }
7366
- var oa = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(oa || {});
7367
- function td(e) {
7387
+ var sa = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(sa || {});
7388
+ function rd(e) {
7368
7389
  let t = ee(null), r = ae((o) => {
7369
- t.current = o.pointerType, !rs(o.currentTarget) && o.pointerType === "mouse" && o.button === oa.Left && (o.preventDefault(), e(o));
7390
+ t.current = o.pointerType, !rs(o.currentTarget) && o.pointerType === "mouse" && o.button === sa.Left && (o.preventDefault(), e(o));
7370
7391
  }), n = ae((o) => {
7371
7392
  t.current !== "mouse" && (rs(o.currentTarget) || e(o));
7372
7393
  });
7373
7394
  return { onPointerDown: r, onClick: n };
7374
7395
  }
7375
- let sa = class extends Map {
7396
+ let ia = class extends Map {
7376
7397
  constructor(t) {
7377
7398
  super(), this.factory = t;
7378
7399
  }
@@ -7381,15 +7402,15 @@ let sa = class extends Map {
7381
7402
  return r === void 0 && (r = this.factory(t), this.set(t, r)), r;
7382
7403
  }
7383
7404
  };
7384
- var rd = Object.defineProperty, nd = (e, t, r) => t in e ? rd(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, od = (e, t, r) => (nd(e, t + "", r), r), ia = (e, t, r) => {
7405
+ var nd = Object.defineProperty, od = (e, t, r) => t in e ? nd(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, sd = (e, t, r) => (od(e, t + "", r), r), aa = (e, t, r) => {
7385
7406
  if (!t.has(e)) throw TypeError("Cannot " + r);
7386
- }, Le = (e, t, r) => (ia(e, t, "read from private field"), r ? r.call(e) : t.get(e)), yn = (e, t, r) => {
7407
+ }, Le = (e, t, r) => (aa(e, t, "read from private field"), r ? r.call(e) : t.get(e)), wn = (e, t, r) => {
7387
7408
  if (t.has(e)) throw TypeError("Cannot add the same private member more than once");
7388
7409
  t instanceof WeakSet ? t.add(e) : t.set(e, r);
7389
- }, os = (e, t, r, n) => (ia(e, t, "write to private field"), t.set(e, r), r), Ke, vr, br;
7390
- let aa = class {
7410
+ }, os = (e, t, r, n) => (aa(e, t, "write to private field"), t.set(e, r), r), Ke, vr, br;
7411
+ let la = class {
7391
7412
  constructor(t) {
7392
- yn(this, Ke, {}), yn(this, vr, new sa(() => /* @__PURE__ */ new Set())), yn(this, br, /* @__PURE__ */ new Set()), od(this, "disposables", Me()), os(this, Ke, t), tt.isServer && this.disposables.microTask(() => {
7413
+ wn(this, Ke, {}), wn(this, vr, new ia(() => /* @__PURE__ */ new Set())), wn(this, br, /* @__PURE__ */ new Set()), sd(this, "disposables", Me()), os(this, Ke, t), tt.isServer && this.disposables.microTask(() => {
7393
7414
  this.dispose();
7394
7415
  });
7395
7416
  }
@@ -7419,17 +7440,17 @@ let aa = class {
7419
7440
  os(this, Ke, r);
7420
7441
  for (let n of Le(this, br)) {
7421
7442
  let o = n.selector(Le(this, Ke));
7422
- la(n.current, o) || (n.current = o, n.callback(o));
7443
+ ca(n.current, o) || (n.current = o, n.callback(o));
7423
7444
  }
7424
7445
  for (let n of Le(this, vr).get(t.type)) n(Le(this, Ke), t);
7425
7446
  }
7426
7447
  }
7427
7448
  };
7428
7449
  Ke = /* @__PURE__ */ new WeakMap(), vr = /* @__PURE__ */ new WeakMap(), br = /* @__PURE__ */ new WeakMap();
7429
- function la(e, t) {
7430
- return Object.is(e, t) ? !0 : typeof e != "object" || e === null || typeof t != "object" || t === null ? !1 : Array.isArray(e) && Array.isArray(t) ? e.length !== t.length ? !1 : wn(e[Symbol.iterator](), t[Symbol.iterator]()) : e instanceof Map && t instanceof Map || e instanceof Set && t instanceof Set ? e.size !== t.size ? !1 : wn(e.entries(), t.entries()) : ss(e) && ss(t) ? wn(Object.entries(e)[Symbol.iterator](), Object.entries(t)[Symbol.iterator]()) : !1;
7450
+ function ca(e, t) {
7451
+ return Object.is(e, t) ? !0 : typeof e != "object" || e === null || typeof t != "object" || t === null ? !1 : Array.isArray(e) && Array.isArray(t) ? e.length !== t.length ? !1 : xn(e[Symbol.iterator](), t[Symbol.iterator]()) : e instanceof Map && t instanceof Map || e instanceof Set && t instanceof Set ? e.size !== t.size ? !1 : xn(e.entries(), t.entries()) : ss(e) && ss(t) ? xn(Object.entries(e)[Symbol.iterator](), Object.entries(t)[Symbol.iterator]()) : !1;
7431
7452
  }
7432
- function wn(e, t) {
7453
+ function xn(e, t) {
7433
7454
  do {
7434
7455
  let r = e.next(), n = t.next();
7435
7456
  if (r.done && n.done) return !0;
@@ -7441,14 +7462,14 @@ function ss(e) {
7441
7462
  let t = Object.getPrototypeOf(e);
7442
7463
  return t === null || Object.getPrototypeOf(t) === null;
7443
7464
  }
7444
- function xn(e) {
7465
+ function En(e) {
7445
7466
  let [t, r] = e(), n = Me();
7446
7467
  return (...o) => {
7447
7468
  t(...o), n.dispose(), n.microTask(r);
7448
7469
  };
7449
7470
  }
7450
- var sd = Object.defineProperty, id = (e, t, r) => t in e ? sd(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, is = (e, t, r) => (id(e, typeof t != "symbol" ? t + "" : t, r), r), ca = ((e) => (e[e.Push = 0] = "Push", e[e.Pop = 1] = "Pop", e))(ca || {});
7451
- let ad = { 0(e, t) {
7471
+ var id = Object.defineProperty, ad = (e, t, r) => t in e ? id(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, is = (e, t, r) => (ad(e, typeof t != "symbol" ? t + "" : t, r), r), ua = ((e) => (e[e.Push = 0] = "Push", e[e.Pop = 1] = "Pop", e))(ua || {});
7472
+ let ld = { 0(e, t) {
7452
7473
  let r = t.id, n = e.stack, o = e.stack.indexOf(r);
7453
7474
  if (o !== -1) {
7454
7475
  let s = e.stack.slice();
@@ -7460,19 +7481,19 @@ let ad = { 0(e, t) {
7460
7481
  if (n === -1) return e;
7461
7482
  let o = e.stack.slice();
7462
7483
  return o.splice(n, 1), { ...e, stack: o };
7463
- } }, ld = class ua extends aa {
7484
+ } }, cd = class da extends la {
7464
7485
  constructor() {
7465
7486
  super(...arguments), is(this, "actions", { push: (t) => this.send({ type: 0, id: t }), pop: (t) => this.send({ type: 1, id: t }) }), is(this, "selectors", { isTop: (t, r) => t.stack[t.stack.length - 1] === r, inStack: (t, r) => t.stack.includes(r) });
7466
7487
  }
7467
7488
  static new() {
7468
- return new ua({ stack: [] });
7489
+ return new da({ stack: [] });
7469
7490
  }
7470
7491
  reduce(t, r) {
7471
- return rt(r.type, ad, t, r);
7492
+ return rt(r.type, ld, t, r);
7472
7493
  }
7473
7494
  };
7474
- const xo = new sa(() => ld.new());
7475
- var zr = { exports: {} }, En = {};
7495
+ const Eo = new ia(() => cd.new());
7496
+ var zr = { exports: {} }, Sn = {};
7476
7497
  /**
7477
7498
  * @license React
7478
7499
  * use-sync-external-store-with-selector.production.js
@@ -7483,15 +7504,15 @@ var zr = { exports: {} }, En = {};
7483
7504
  * LICENSE file in the root directory of this source tree.
7484
7505
  */
7485
7506
  var as;
7486
- function cd() {
7487
- if (as) return En;
7507
+ function ud() {
7508
+ if (as) return Sn;
7488
7509
  as = 1;
7489
7510
  var e = K;
7490
7511
  function t(c, d) {
7491
7512
  return c === d && (c !== 0 || 1 / c === 1 / d) || c !== c && d !== d;
7492
7513
  }
7493
7514
  var r = typeof Object.is == "function" ? Object.is : t, n = e.useSyncExternalStore, o = e.useRef, s = e.useEffect, i = e.useMemo, l = e.useDebugValue;
7494
- return En.useSyncExternalStoreWithSelector = function(c, d, m, g, x) {
7515
+ return Sn.useSyncExternalStoreWithSelector = function(c, d, m, g, x) {
7495
7516
  var h = o(null);
7496
7517
  if (h.current === null) {
7497
7518
  var O = { hasValue: !1, value: null };
@@ -7531,9 +7552,9 @@ function cd() {
7531
7552
  },
7532
7553
  [k]
7533
7554
  ), l(k), k;
7534
- }, En;
7555
+ }, Sn;
7535
7556
  }
7536
- var Sn = {};
7557
+ var On = {};
7537
7558
  /**
7538
7559
  * @license React
7539
7560
  * use-sync-external-store-with-selector.development.js
@@ -7544,14 +7565,14 @@ var Sn = {};
7544
7565
  * LICENSE file in the root directory of this source tree.
7545
7566
  */
7546
7567
  var ls;
7547
- function ud() {
7568
+ function dd() {
7548
7569
  return ls || (ls = 1, process.env.NODE_ENV !== "production" && (function() {
7549
7570
  function e(c, d) {
7550
7571
  return c === d && (c !== 0 || 1 / c === 1 / d) || c !== c && d !== d;
7551
7572
  }
7552
7573
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
7553
7574
  var t = K, r = typeof Object.is == "function" ? Object.is : e, n = t.useSyncExternalStore, o = t.useRef, s = t.useEffect, i = t.useMemo, l = t.useDebugValue;
7554
- Sn.useSyncExternalStoreWithSelector = function(c, d, m, g, x) {
7575
+ On.useSyncExternalStoreWithSelector = function(c, d, m, g, x) {
7555
7576
  var h = o(null);
7556
7577
  if (h.current === null) {
7557
7578
  var O = { hasValue: !1, value: null };
@@ -7593,40 +7614,40 @@ function ud() {
7593
7614
  [k]
7594
7615
  ), l(k), k;
7595
7616
  }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
7596
- })()), Sn;
7617
+ })()), On;
7597
7618
  }
7598
7619
  var cs;
7599
- function dd() {
7600
- return cs || (cs = 1, process.env.NODE_ENV === "production" ? zr.exports = /* @__PURE__ */ cd() : zr.exports = /* @__PURE__ */ ud()), zr.exports;
7620
+ function fd() {
7621
+ return cs || (cs = 1, process.env.NODE_ENV === "production" ? zr.exports = /* @__PURE__ */ ud() : zr.exports = /* @__PURE__ */ dd()), zr.exports;
7601
7622
  }
7602
- var fd = /* @__PURE__ */ dd();
7603
- function Re(e, t, r = la) {
7604
- return fd.useSyncExternalStoreWithSelector(ae((n) => e.subscribe(hd, n)), ae(() => e.state), ae(() => e.state), ae(t), r);
7623
+ var hd = /* @__PURE__ */ fd();
7624
+ function Re(e, t, r = ca) {
7625
+ return hd.useSyncExternalStoreWithSelector(ae((n) => e.subscribe(pd, n)), ae(() => e.state), ae(() => e.state), ae(t), r);
7605
7626
  }
7606
- function hd(e) {
7627
+ function pd(e) {
7607
7628
  return e;
7608
7629
  }
7609
- function da(e, t) {
7610
- let r = Gt(), n = xo.get(t), [o, s] = Re(n, ne((i) => [n.selectors.isTop(i, r), n.selectors.inStack(i, r)], [n, r]));
7630
+ function fa(e, t) {
7631
+ let r = Gt(), n = Eo.get(t), [o, s] = Re(n, ne((i) => [n.selectors.isTop(i, r), n.selectors.inStack(i, r)], [n, r]));
7611
7632
  return Ae(() => {
7612
7633
  if (e) return n.actions.push(r), () => n.actions.pop(r);
7613
7634
  }, [n, e, r]), e ? s ? o : !0 : !1;
7614
7635
  }
7615
- let Yn = /* @__PURE__ */ new Map(), wr = /* @__PURE__ */ new Map();
7636
+ let Xn = /* @__PURE__ */ new Map(), wr = /* @__PURE__ */ new Map();
7616
7637
  function us(e) {
7617
7638
  var t;
7618
7639
  let r = (t = wr.get(e)) != null ? t : 0;
7619
- return wr.set(e, r + 1), r !== 0 ? () => ds(e) : (Yn.set(e, { "aria-hidden": e.getAttribute("aria-hidden"), inert: e.inert }), e.setAttribute("aria-hidden", "true"), e.inert = !0, () => ds(e));
7640
+ return wr.set(e, r + 1), r !== 0 ? () => ds(e) : (Xn.set(e, { "aria-hidden": e.getAttribute("aria-hidden"), inert: e.inert }), e.setAttribute("aria-hidden", "true"), e.inert = !0, () => ds(e));
7620
7641
  }
7621
7642
  function ds(e) {
7622
7643
  var t;
7623
7644
  let r = (t = wr.get(e)) != null ? t : 1;
7624
7645
  if (r === 1 ? wr.delete(e) : wr.set(e, r - 1), r !== 1) return;
7625
- let n = Yn.get(e);
7626
- n && (n["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", n["aria-hidden"]), e.inert = n.inert, Yn.delete(e));
7646
+ let n = Xn.get(e);
7647
+ n && (n["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", n["aria-hidden"]), e.inert = n.inert, Xn.delete(e));
7627
7648
  }
7628
- function pd(e, { allowed: t, disallowed: r } = {}) {
7629
- let n = da(e, "inert-others");
7649
+ function md(e, { allowed: t, disallowed: r } = {}) {
7650
+ let n = fa(e, "inert-others");
7630
7651
  Ae(() => {
7631
7652
  var o, s;
7632
7653
  if (!n) return;
@@ -7646,7 +7667,7 @@ function pd(e, { allowed: t, disallowed: r } = {}) {
7646
7667
  return i.dispose;
7647
7668
  }, [n, t, r]);
7648
7669
  }
7649
- function md(e, t, r) {
7670
+ function gd(e, t, r) {
7650
7671
  let n = ur((o) => {
7651
7672
  let s = o.getBoundingClientRect();
7652
7673
  s.x === 0 && s.y === 0 && s.width === 0 && s.height === 0 && r();
@@ -7667,40 +7688,40 @@ function md(e, t, r) {
7667
7688
  return () => s.dispose();
7668
7689
  }, [t, n, e]);
7669
7690
  }
7670
- let Xn = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "details>summary", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(","), gd = ["[data-autofocus]"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
7671
- var Jn = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e[e.AutoFocus = 64] = "AutoFocus", e))(Jn || {}), vd = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(vd || {}), bd = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(bd || {});
7672
- function fa(e = document.body) {
7673
- return e == null ? [] : Array.from(e.querySelectorAll(Xn)).sort((t, r) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER)));
7691
+ let Jn = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "details>summary", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(","), vd = ["[data-autofocus]"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
7692
+ var Zn = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e[e.AutoFocus = 64] = "AutoFocus", e))(Zn || {}), bd = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(bd || {}), yd = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(yd || {});
7693
+ function ha(e = document.body) {
7694
+ return e == null ? [] : Array.from(e.querySelectorAll(Jn)).sort((t, r) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER)));
7674
7695
  }
7675
- function yd(e = document.body) {
7676
- return e == null ? [] : Array.from(e.querySelectorAll(gd)).sort((t, r) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER)));
7696
+ function wd(e = document.body) {
7697
+ return e == null ? [] : Array.from(e.querySelectorAll(vd)).sort((t, r) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER)));
7677
7698
  }
7678
- var Eo = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Eo || {});
7679
- function ha(e, t = 0) {
7699
+ var So = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(So || {});
7700
+ function pa(e, t = 0) {
7680
7701
  var r;
7681
7702
  return e === ((r = on(e)) == null ? void 0 : r.body) ? !1 : rt(t, { 0() {
7682
- return e.matches(Xn);
7703
+ return e.matches(Jn);
7683
7704
  }, 1() {
7684
7705
  let n = e;
7685
7706
  for (; n !== null; ) {
7686
- if (n.matches(Xn)) return !0;
7707
+ if (n.matches(Jn)) return !0;
7687
7708
  n = n.parentElement;
7688
7709
  }
7689
7710
  return !1;
7690
7711
  } });
7691
7712
  }
7692
- var wd = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(wd || {});
7713
+ var xd = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(xd || {});
7693
7714
  typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
7694
7715
  e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
7695
7716
  }, !0), document.addEventListener("click", (e) => {
7696
7717
  e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
7697
7718
  }, !0));
7698
- let xd = ["textarea", "input"].join(",");
7699
- function Ed(e) {
7719
+ let Ed = ["textarea", "input"].join(",");
7720
+ function Sd(e) {
7700
7721
  var t, r;
7701
- return (r = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, xd)) != null ? r : !1;
7722
+ return (r = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, Ed)) != null ? r : !1;
7702
7723
  }
7703
- function pa(e, t = (r) => r) {
7724
+ function ma(e, t = (r) => r) {
7704
7725
  return e.slice().sort((r, n) => {
7705
7726
  let o = t(r), s = t(n);
7706
7727
  if (o === null || s === null) return 0;
@@ -7708,11 +7729,11 @@ function pa(e, t = (r) => r) {
7708
7729
  return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
7709
7730
  });
7710
7731
  }
7711
- function Sd(e, t, r = e === null ? document.body : tn(e)) {
7712
- return Od(fa(r), t, { relativeTo: e });
7732
+ function Od(e, t, r = e === null ? document.body : tn(e)) {
7733
+ return kd(ha(r), t, { relativeTo: e });
7713
7734
  }
7714
- function Od(e, t, { sorted: r = !0, relativeTo: n = null, skipElements: o = [] } = {}) {
7715
- let s = Array.isArray(e) ? e.length > 0 ? tn(e[0]) : document : tn(e), i = Array.isArray(e) ? r ? pa(e) : e : t & 64 ? yd(e) : fa(e);
7735
+ function kd(e, t, { sorted: r = !0, relativeTo: n = null, skipElements: o = [] } = {}) {
7736
+ let s = Array.isArray(e) ? e.length > 0 ? tn(e[0]) : document : tn(e), i = Array.isArray(e) ? r ? ma(e) : e : t & 64 ? wd(e) : ha(e);
7716
7737
  o.length > 0 && i.length > 1 && (i = i.filter((h) => !o.some((O) => O != null && "current" in O ? (O == null ? void 0 : O.current) === h : O === h))), n = n ?? (s == null ? void 0 : s.activeElement);
7717
7738
  let l = (() => {
7718
7739
  if (t & 5) return 1;
@@ -7734,17 +7755,17 @@ function Od(e, t, { sorted: r = !0, relativeTo: n = null, skipElements: o = [] }
7734
7755
  if (h >= g) return 1;
7735
7756
  }
7736
7757
  x = i[h], x == null || x.focus(d), m += l;
7737
- } while (x !== Hi(x));
7738
- return t & 6 && Ed(x) && x.select(), 2;
7758
+ } while (x !== Ui(x));
7759
+ return t & 6 && Sd(x) && x.select(), 2;
7739
7760
  }
7740
- function ma() {
7761
+ function ga() {
7741
7762
  return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
7742
7763
  }
7743
- function kd() {
7764
+ function Cd() {
7744
7765
  return /Android/gi.test(window.navigator.userAgent);
7745
7766
  }
7746
7767
  function fs() {
7747
- return ma() || kd();
7768
+ return ga() || Cd();
7748
7769
  }
7749
7770
  function _t(e, t, r, n) {
7750
7771
  let o = ur(r);
@@ -7756,7 +7777,7 @@ function _t(e, t, r, n) {
7756
7777
  return document.addEventListener(t, s, n), () => document.removeEventListener(t, s, n);
7757
7778
  }, [e, t, n]);
7758
7779
  }
7759
- function Cd(e, t, r, n) {
7780
+ function Ad(e, t, r, n) {
7760
7781
  let o = ur(r);
7761
7782
  pe(() => {
7762
7783
  if (!e) return;
@@ -7767,7 +7788,7 @@ function Cd(e, t, r, n) {
7767
7788
  }, [e, t, n]);
7768
7789
  }
7769
7790
  const hs = 30;
7770
- function Ad(e, t, r) {
7791
+ function Td(e, t, r) {
7771
7792
  let n = ur(r), o = ne(function(l, c) {
7772
7793
  if (l.defaultPrevented) return;
7773
7794
  let d = c(l);
@@ -7776,7 +7797,7 @@ function Ad(e, t, r) {
7776
7797
  return typeof x == "function" ? g(x()) : Array.isArray(x) || x instanceof Set ? x : [x];
7777
7798
  })(t);
7778
7799
  for (let g of m) if (g !== null && (g.contains(d) || l.composed && l.composedPath().includes(g))) return;
7779
- return !ha(d, Eo.Loose) && d.tabIndex !== -1 && l.preventDefault(), n.current(l, d);
7800
+ return !pa(d, So.Loose) && d.tabIndex !== -1 && l.preventDefault(), n.current(l, d);
7780
7801
  }, [n, t]), s = ee(null);
7781
7802
  _t(e, "pointerdown", (l) => {
7782
7803
  var c, d;
@@ -7792,17 +7813,17 @@ function Ad(e, t, r) {
7792
7813
  }, !0), _t(e, "touchend", (l) => {
7793
7814
  let c = { x: l.changedTouches[0].clientX, y: l.changedTouches[0].clientY };
7794
7815
  if (!(Math.abs(c.x - i.current.x) >= hs || Math.abs(c.y - i.current.y) >= hs)) return o(l, () => Qt(l.target) ? l.target : null);
7795
- }, !0), Cd(e, "blur", (l) => o(l, () => Bu(window.document.activeElement) ? window.document.activeElement : null), !0);
7816
+ }, !0), Ad(e, "blur", (l) => o(l, () => Hu(window.document.activeElement) ? window.document.activeElement : null), !0);
7796
7817
  }
7797
- function Zn(...e) {
7818
+ function eo(...e) {
7798
7819
  return he(() => on(...e), [...e]);
7799
7820
  }
7800
- var Td = ((e) => (e[e.Ignore = 0] = "Ignore", e[e.Select = 1] = "Select", e[e.Close = 2] = "Close", e))(Td || {});
7801
- const Gr = { Ignore: { kind: 0 }, Select: (e) => ({ kind: 1, target: e }), Close: { kind: 2 } }, Pd = 200, ps = 5;
7802
- function Fd(e, { trigger: t, action: r, close: n, select: o }) {
7821
+ var Pd = ((e) => (e[e.Ignore = 0] = "Ignore", e[e.Select = 1] = "Select", e[e.Close = 2] = "Close", e))(Pd || {});
7822
+ const Gr = { Ignore: { kind: 0 }, Select: (e) => ({ kind: 1, target: e }), Close: { kind: 2 } }, Fd = 200, ps = 5;
7823
+ function Rd(e, { trigger: t, action: r, close: n, select: o }) {
7803
7824
  let s = ee(null), i = ee(null), l = ee(null);
7804
7825
  _t(e && t !== null, "pointerdown", (c) => {
7805
- Yi(c == null ? void 0 : c.target) && t != null && t.contains(c.target) && (i.current = c.x, l.current = c.y, s.current = c.timeStamp);
7826
+ Xi(c == null ? void 0 : c.target) && t != null && t.contains(c.target) && (i.current = c.x, l.current = c.y, s.current = c.timeStamp);
7806
7827
  }), _t(e && t !== null, "pointerup", (c) => {
7807
7828
  var d, m;
7808
7829
  let g = s.current;
@@ -7812,7 +7833,7 @@ function Fd(e, { trigger: t, action: r, close: n, select: o }) {
7812
7833
  case 0:
7813
7834
  return;
7814
7835
  case 1: {
7815
- c.timeStamp - g > Pd && (o(x.target), n());
7836
+ c.timeStamp - g > Fd && (o(x.target), n());
7816
7837
  break;
7817
7838
  }
7818
7839
  case 2: {
@@ -7822,7 +7843,7 @@ function Fd(e, { trigger: t, action: r, close: n, select: o }) {
7822
7843
  }
7823
7844
  }, { capture: !0 });
7824
7845
  }
7825
- function Rd(e, t) {
7846
+ function Id(e, t) {
7826
7847
  return he(() => {
7827
7848
  var r;
7828
7849
  if (e.type) return e.type;
@@ -7830,10 +7851,10 @@ function Rd(e, t) {
7830
7851
  if (typeof n == "string" && n.toLowerCase() === "button" || (t == null ? void 0 : t.tagName) === "BUTTON" && !t.hasAttribute("type")) return "button";
7831
7852
  }, [e.type, e.as, t]);
7832
7853
  }
7833
- function Id(e) {
7834
- return Na(e.subscribe, e.getSnapshot, e.getSnapshot);
7854
+ function Nd(e) {
7855
+ return $a(e.subscribe, e.getSnapshot, e.getSnapshot);
7835
7856
  }
7836
- function Nd(e, t) {
7857
+ function $d(e, t) {
7837
7858
  let r = e(), n = /* @__PURE__ */ new Set();
7838
7859
  return { getSnapshot() {
7839
7860
  return r;
@@ -7844,7 +7865,7 @@ function Nd(e, t) {
7844
7865
  i && (r = i, n.forEach((l) => l()));
7845
7866
  } };
7846
7867
  }
7847
- function $d() {
7868
+ function Md() {
7848
7869
  let e;
7849
7870
  return { before({ doc: t }) {
7850
7871
  var r;
@@ -7855,8 +7876,8 @@ function $d() {
7855
7876
  r.style(n, "paddingRight", `${s}px`);
7856
7877
  } };
7857
7878
  }
7858
- function Md() {
7859
- return ma() ? { before({ doc: e, d: t, meta: r }) {
7879
+ function Dd() {
7880
+ return ga() ? { before({ doc: e, d: t, meta: r }) {
7860
7881
  function n(o) {
7861
7882
  for (let s of r().containers) for (let i of s()) if (i.contains(o)) return !0;
7862
7883
  return !1;
@@ -7878,7 +7899,7 @@ function Md() {
7878
7899
  }
7879
7900
  }, !0), t.group((l) => {
7880
7901
  t.addEventListener(e, "touchstart", (c) => {
7881
- if (l.dispose(), Qt(c.target) && ju(c.target)) if (n(c.target)) {
7902
+ if (l.dispose(), Qt(c.target) && Bu(c.target)) if (n(c.target)) {
7882
7903
  let d = c.target;
7883
7904
  for (; d.parentElement && n(d.parentElement); ) d = d.parentElement;
7884
7905
  l.style(d, "overscrollBehavior", "contain");
@@ -7886,7 +7907,7 @@ function Md() {
7886
7907
  });
7887
7908
  }), t.addEventListener(e, "touchmove", (l) => {
7888
7909
  if (Qt(l.target)) {
7889
- if (Xi(l.target)) return;
7910
+ if (Ji(l.target)) return;
7890
7911
  if (n(l.target)) {
7891
7912
  let c = l.target;
7892
7913
  for (; c.parentElement && c.dataset.headlessuiPortal !== "" && !(c.scrollHeight > c.clientHeight || c.scrollWidth > c.clientWidth); ) c = c.parentElement;
@@ -7901,7 +7922,7 @@ function Md() {
7901
7922
  });
7902
7923
  } } : {};
7903
7924
  }
7904
- function Dd() {
7925
+ function Ld() {
7905
7926
  return { before({ doc: e, d: t }) {
7906
7927
  t.style(e.documentElement, "overflow", "hidden");
7907
7928
  } };
@@ -7911,7 +7932,7 @@ function ms(e) {
7911
7932
  for (let r of e) Object.assign(t, r(t));
7912
7933
  return t;
7913
7934
  }
7914
- let It = Nd(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
7935
+ let It = $d(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
7915
7936
  var r;
7916
7937
  let n = (r = this.get(e)) != null ? r : { doc: e, count: 0, d: Me(), meta: /* @__PURE__ */ new Set(), computedMeta: {} };
7917
7938
  return n.count++, n.meta.add(t), n.computedMeta = ms(n.meta), this.set(e, n), this;
@@ -7921,7 +7942,7 @@ let It = Nd(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
7921
7942
  }, SCROLL_PREVENT(e) {
7922
7943
  let t = { doc: e.doc, d: e.d, meta() {
7923
7944
  return e.computedMeta;
7924
- } }, r = [Md(), $d(), Dd()];
7945
+ } }, r = [Dd(), Md(), Ld()];
7925
7946
  r.forEach(({ before: n }) => n == null ? void 0 : n(t)), r.forEach(({ after: n }) => n == null ? void 0 : n(t));
7926
7947
  }, SCROLL_ALLOW({ d: e }) {
7927
7948
  e.dispose();
@@ -7936,15 +7957,15 @@ It.subscribe(() => {
7936
7957
  (o && !n || !o && n) && It.dispatch(r.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", r), r.count === 0 && It.dispatch("TEARDOWN", r);
7937
7958
  }
7938
7959
  });
7939
- function Ld(e, t, r = () => ({ containers: [] })) {
7940
- let n = Id(It), o = t ? n.get(t) : void 0, s = o ? o.count > 0 : !1;
7960
+ function jd(e, t, r = () => ({ containers: [] })) {
7961
+ let n = Nd(It), o = t ? n.get(t) : void 0, s = o ? o.count > 0 : !1;
7941
7962
  return Ae(() => {
7942
7963
  if (!(!t || !e)) return It.dispatch("PUSH", t, r), () => It.dispatch("POP", t, r);
7943
7964
  }, [e, t]), s;
7944
7965
  }
7945
- function jd(e, t, r = () => [document.body]) {
7946
- let n = da(e, "scroll-lock");
7947
- Ld(n, t, (o) => {
7966
+ function Bd(e, t, r = () => [document.body]) {
7967
+ let n = fa(e, "scroll-lock");
7968
+ jd(n, t, (o) => {
7948
7969
  var s;
7949
7970
  return { containers: [...(s = o.containers) != null ? s : [], r] };
7950
7971
  });
@@ -7952,7 +7973,7 @@ function jd(e, t, r = () => [document.body]) {
7952
7973
  function gs(e) {
7953
7974
  return [e.screenX, e.screenY];
7954
7975
  }
7955
- function Bd() {
7976
+ function Hd() {
7956
7977
  let e = ee([-1, -1]);
7957
7978
  return { wasMoved(t) {
7958
7979
  let r = gs(t);
@@ -7961,7 +7982,7 @@ function Bd() {
7961
7982
  e.current = gs(t);
7962
7983
  } };
7963
7984
  }
7964
- function Hd(e = 0) {
7985
+ function Ud(e = 0) {
7965
7986
  let [t, r] = ie(e), n = ne((c) => r(c), []), o = ne((c) => r((d) => d | c), []), s = ne((c) => (t & c) === c, [t]), i = ne((c) => r((d) => d & ~c), []), l = ne((c) => r((d) => d ^ c), []);
7966
7987
  return { flags: t, setFlag: n, addFlag: o, hasFlag: s, removeFlag: i, toggleFlag: l };
7967
7988
  }
@@ -7970,14 +7991,14 @@ typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((vs
7970
7991
  return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.", "Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.", "", "Example usage:", "```js", "import { mockAnimationsApi } from 'jsdom-testing-mocks'", "mockAnimationsApi()", "```"].join(`
7971
7992
  `)), [];
7972
7993
  });
7973
- var Ud = ((e) => (e[e.None = 0] = "None", e[e.Closed = 1] = "Closed", e[e.Enter = 2] = "Enter", e[e.Leave = 4] = "Leave", e))(Ud || {});
7974
- function Wd(e) {
7994
+ var Wd = ((e) => (e[e.None = 0] = "None", e[e.Closed = 1] = "Closed", e[e.Enter = 2] = "Enter", e[e.Leave = 4] = "Leave", e))(Wd || {});
7995
+ function zd(e) {
7975
7996
  let t = {};
7976
7997
  for (let r in e) e[r] === !0 && (t[`data-${r}`] = "");
7977
7998
  return t;
7978
7999
  }
7979
- function zd(e, t, r, n) {
7980
- let [o, s] = ie(r), { hasFlag: i, addFlag: l, removeFlag: c } = Hd(e && o ? 3 : 0), d = ee(!1), m = ee(!1), g = cr();
8000
+ function Gd(e, t, r, n) {
8001
+ let [o, s] = ie(r), { hasFlag: i, addFlag: l, removeFlag: c } = Ud(e && o ? 3 : 0), d = ee(!1), m = ee(!1), g = cr();
7981
8002
  return Ae(() => {
7982
8003
  var x;
7983
8004
  if (e) {
@@ -7985,26 +8006,26 @@ function zd(e, t, r, n) {
7985
8006
  r && l(3);
7986
8007
  return;
7987
8008
  }
7988
- return (x = void 0) == null || x.call(n, r), Gd(t, { inFlight: d, prepare() {
8009
+ return (x = void 0) == null || x.call(n, r), qd(t, { inFlight: d, prepare() {
7989
8010
  m.current ? m.current = !1 : m.current = d.current, d.current = !0, !m.current && (r ? (l(3), c(4)) : (l(4), c(2)));
7990
8011
  }, run() {
7991
8012
  m.current ? r ? (c(3), l(4)) : (c(4), l(3)) : r ? c(1) : l(1);
7992
8013
  }, done() {
7993
8014
  var h;
7994
- m.current && Qd(t) || (d.current = !1, c(7), r || s(!1), (h = void 0) == null || h.call(n, r));
8015
+ m.current && _d(t) || (d.current = !1, c(7), r || s(!1), (h = void 0) == null || h.call(n, r));
7995
8016
  } });
7996
8017
  }
7997
8018
  }, [e, r, t, g]), e ? [o, { closed: i(1), enter: i(2), leave: i(4), transition: i(2) || i(4) }] : [r, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
7998
8019
  }
7999
- function Gd(e, { prepare: t, run: r, done: n, inFlight: o }) {
8020
+ function qd(e, { prepare: t, run: r, done: n, inFlight: o }) {
8000
8021
  let s = Me();
8001
- return Vd(e, { prepare: t, inFlight: o }), s.nextFrame(() => {
8022
+ return Qd(e, { prepare: t, inFlight: o }), s.nextFrame(() => {
8002
8023
  r(), s.requestAnimationFrame(() => {
8003
- s.add(qd(e, n));
8024
+ s.add(Vd(e, n));
8004
8025
  });
8005
8026
  }), s.dispose;
8006
8027
  }
8007
- function qd(e, t) {
8028
+ function Vd(e, t) {
8008
8029
  var r, n;
8009
8030
  let o = Me();
8010
8031
  if (!e) return o.dispose;
@@ -8017,7 +8038,7 @@ function qd(e, t) {
8017
8038
  s || t();
8018
8039
  }), o.dispose);
8019
8040
  }
8020
- function Vd(e, { inFlight: t, prepare: r }) {
8041
+ function Qd(e, { inFlight: t, prepare: r }) {
8021
8042
  if (t != null && t.current) {
8022
8043
  r();
8023
8044
  return;
@@ -8025,11 +8046,11 @@ function Vd(e, { inFlight: t, prepare: r }) {
8025
8046
  let n = e.style.transition;
8026
8047
  e.style.transition = "none", r(), e.style.transition = n;
8027
8048
  }
8028
- function Qd(e) {
8049
+ function _d(e) {
8029
8050
  var t, r;
8030
8051
  return ((r = (t = e.getAnimations) == null ? void 0 : t.call(e)) != null ? r : []).some((n) => n instanceof CSSTransition && n.playState !== "finished");
8031
8052
  }
8032
- function _d() {
8053
+ function Kd() {
8033
8054
  const e = navigator.userAgentData;
8034
8055
  return e && Array.isArray(e.brands) ? e.brands.map((t) => {
8035
8056
  let {
@@ -8039,15 +8060,15 @@ function _d() {
8039
8060
  return r + "/" + n;
8040
8061
  }).join(" ") : navigator.userAgent;
8041
8062
  }
8042
- const ga = {
8063
+ const va = {
8043
8064
  ...q
8044
- }, Kd = ga.useInsertionEffect, Yd = Kd || ((e) => e());
8045
- function va(e) {
8065
+ }, Yd = va.useInsertionEffect, Xd = Yd || ((e) => e());
8066
+ function ba(e) {
8046
8067
  const t = q.useRef(() => {
8047
8068
  if (process.env.NODE_ENV !== "production")
8048
8069
  throw new Error("Cannot call an event handler while rendering.");
8049
8070
  });
8050
- return Yd(() => {
8071
+ return Xd(() => {
8051
8072
  t.current = e;
8052
8073
  }), q.useCallback(function() {
8053
8074
  for (var r = arguments.length, n = new Array(r), o = 0; o < r; o++)
@@ -8055,25 +8076,25 @@ function va(e) {
8055
8076
  return t.current == null ? void 0 : t.current(...n);
8056
8077
  }, []);
8057
8078
  }
8058
- var eo = typeof document < "u" ? Hs : pe;
8059
- let ys = !1, Xd = 0;
8079
+ var to = typeof document < "u" ? Hs : pe;
8080
+ let ys = !1, Jd = 0;
8060
8081
  const ws = () => (
8061
8082
  // Ensure the id is unique with multiple independent versions of Floating UI
8062
8083
  // on <React 18
8063
- "floating-ui-" + Math.random().toString(36).slice(2, 6) + Xd++
8084
+ "floating-ui-" + Math.random().toString(36).slice(2, 6) + Jd++
8064
8085
  );
8065
- function Jd() {
8086
+ function Zd() {
8066
8087
  const [e, t] = q.useState(() => ys ? ws() : void 0);
8067
- return eo(() => {
8088
+ return to(() => {
8068
8089
  e == null && t(ws());
8069
8090
  }, []), q.useEffect(() => {
8070
8091
  ys = !0;
8071
8092
  }, []), e;
8072
8093
  }
8073
- const Zd = ga.useId, ef = Zd || Jd;
8094
+ const ef = va.useId, tf = ef || Zd;
8074
8095
  let Or;
8075
8096
  process.env.NODE_ENV !== "production" && (Or = /* @__PURE__ */ new Set());
8076
- function tf() {
8097
+ function rf() {
8077
8098
  for (var e, t = arguments.length, r = new Array(t), n = 0; n < t; n++)
8078
8099
  r[n] = arguments[n];
8079
8100
  const o = "Floating UI: " + r.join(" ");
@@ -8082,7 +8103,7 @@ function tf() {
8082
8103
  (s = Or) == null || s.add(o), console.warn(o);
8083
8104
  }
8084
8105
  }
8085
- function rf() {
8106
+ function nf() {
8086
8107
  for (var e, t = arguments.length, r = new Array(t), n = 0; n < t; n++)
8087
8108
  r[n] = arguments[n];
8088
8109
  const o = "Floating UI: " + r.join(" ");
@@ -8091,7 +8112,7 @@ function rf() {
8091
8112
  (s = Or) == null || s.add(o), console.error(o);
8092
8113
  }
8093
8114
  }
8094
- function nf() {
8115
+ function of() {
8095
8116
  const e = /* @__PURE__ */ new Map();
8096
8117
  return {
8097
8118
  emit(t, r) {
@@ -8107,21 +8128,21 @@ function nf() {
8107
8128
  }
8108
8129
  };
8109
8130
  }
8110
- const of = /* @__PURE__ */ q.createContext(null), sf = /* @__PURE__ */ q.createContext(null), af = () => {
8131
+ const sf = /* @__PURE__ */ q.createContext(null), af = /* @__PURE__ */ q.createContext(null), lf = () => {
8111
8132
  var e;
8112
- return ((e = q.useContext(of)) == null ? void 0 : e.id) || null;
8113
- }, lf = () => q.useContext(sf), cf = "data-floating-ui-focusable";
8114
- function uf(e) {
8133
+ return ((e = q.useContext(sf)) == null ? void 0 : e.id) || null;
8134
+ }, cf = () => q.useContext(af), uf = "data-floating-ui-focusable";
8135
+ function df(e) {
8115
8136
  const {
8116
8137
  open: t = !1,
8117
8138
  onOpenChange: r,
8118
8139
  elements: n
8119
- } = e, o = ef(), s = q.useRef({}), [i] = q.useState(() => nf()), l = af() != null;
8140
+ } = e, o = tf(), s = q.useRef({}), [i] = q.useState(() => of()), l = lf() != null;
8120
8141
  if (process.env.NODE_ENV !== "production") {
8121
8142
  const h = n.reference;
8122
- h && !pr(h) && rf("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
8143
+ h && !pr(h) && nf("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
8123
8144
  }
8124
- const [c, d] = q.useState(n.reference), m = va((h, O, k) => {
8145
+ const [c, d] = q.useState(n.reference), m = ba((h, O, k) => {
8125
8146
  s.current.openEvent = h ? O : void 0, i.emit("openchange", {
8126
8147
  open: h,
8127
8148
  event: O,
@@ -8145,22 +8166,22 @@ function uf(e) {
8145
8166
  refs: g
8146
8167
  }), [t, m, x, i, o, g]);
8147
8168
  }
8148
- function df(e) {
8169
+ function ff(e) {
8149
8170
  e === void 0 && (e = {});
8150
8171
  const {
8151
8172
  nodeId: t
8152
- } = e, r = uf({
8173
+ } = e, r = df({
8153
8174
  ...e,
8154
8175
  elements: {
8155
8176
  reference: null,
8156
8177
  floating: null,
8157
8178
  ...e.elements
8158
8179
  }
8159
- }), n = e.rootContext || r, o = n.elements, [s, i] = q.useState(null), [l, c] = q.useState(null), m = (o == null ? void 0 : o.domReference) || s, g = q.useRef(null), x = lf();
8160
- eo(() => {
8180
+ }), n = e.rootContext || r, o = n.elements, [s, i] = q.useState(null), [l, c] = q.useState(null), m = (o == null ? void 0 : o.domReference) || s, g = q.useRef(null), x = cf();
8181
+ to(() => {
8161
8182
  m && (g.current = m);
8162
8183
  }, [m]);
8163
- const h = La({
8184
+ const h = ja({
8164
8185
  ...e,
8165
8186
  elements: {
8166
8187
  ...o,
@@ -8194,7 +8215,7 @@ function df(e) {
8194
8215
  elements: I,
8195
8216
  nodeId: t
8196
8217
  }), [h, P, I, t, n]);
8197
- return eo(() => {
8218
+ return to(() => {
8198
8219
  n.dataRef.current.floatingContext = E;
8199
8220
  const N = x == null ? void 0 : x.nodesRef.current.find((M) => M.id === t);
8200
8221
  N && (N.context = E);
@@ -8206,7 +8227,7 @@ function df(e) {
8206
8227
  }), [h, P, I, E]);
8207
8228
  }
8208
8229
  const xs = "active", Es = "selected";
8209
- function On(e, t, r) {
8230
+ function kn(e, t, r) {
8210
8231
  const n = /* @__PURE__ */ new Map(), o = r === "item";
8211
8232
  let s = e;
8212
8233
  if (o && e) {
@@ -8220,7 +8241,7 @@ function On(e, t, r) {
8220
8241
  return {
8221
8242
  ...r === "floating" && {
8222
8243
  tabIndex: -1,
8223
- [cf]: ""
8244
+ [uf]: ""
8224
8245
  },
8225
8246
  ...s,
8226
8247
  ...t.map((i) => {
@@ -8243,18 +8264,18 @@ function On(e, t, r) {
8243
8264
  }), i), {})
8244
8265
  };
8245
8266
  }
8246
- function ff(e) {
8267
+ function hf(e) {
8247
8268
  e === void 0 && (e = []);
8248
8269
  const t = e.map((l) => l == null ? void 0 : l.reference), r = e.map((l) => l == null ? void 0 : l.floating), n = e.map((l) => l == null ? void 0 : l.item), o = q.useCallback(
8249
- (l) => On(l, e, "reference"),
8270
+ (l) => kn(l, e, "reference"),
8250
8271
  // eslint-disable-next-line react-hooks/exhaustive-deps
8251
8272
  t
8252
8273
  ), s = q.useCallback(
8253
- (l) => On(l, e, "floating"),
8274
+ (l) => kn(l, e, "floating"),
8254
8275
  // eslint-disable-next-line react-hooks/exhaustive-deps
8255
8276
  r
8256
8277
  ), i = q.useCallback(
8257
- (l) => On(l, e, "item"),
8278
+ (l) => kn(l, e, "item"),
8258
8279
  // eslint-disable-next-line react-hooks/exhaustive-deps
8259
8280
  n
8260
8281
  );
@@ -8276,7 +8297,7 @@ function Ss(e, t) {
8276
8297
  }
8277
8298
  };
8278
8299
  }
8279
- const hf = (e) => ({
8300
+ const pf = (e) => ({
8280
8301
  name: "inner",
8281
8302
  options: e,
8282
8303
  async fn(t) {
@@ -8290,24 +8311,24 @@ const hf = (e) => ({
8290
8311
  referenceOverflowThreshold: c = 0,
8291
8312
  scrollRef: d,
8292
8313
  ...m
8293
- } = ja(e, t), {
8314
+ } = Ba(e, t), {
8294
8315
  rects: g,
8295
8316
  elements: {
8296
8317
  floating: x
8297
8318
  }
8298
8319
  } = t, h = r.current[i], O = (d == null ? void 0 : d.current) || x, k = x.clientTop || O.clientTop, P = x.clientTop !== 0, I = O.clientTop !== 0, E = x === O;
8299
- if (process.env.NODE_ENV !== "production" && (t.placement.startsWith("bottom") || tf('`placement` side must be "bottom" when using the `inner`', "middleware.")), !h)
8320
+ if (process.env.NODE_ENV !== "production" && (t.placement.startsWith("bottom") || rf('`placement` side must be "bottom" when using the `inner`', "middleware.")), !h)
8300
8321
  return {};
8301
8322
  const N = {
8302
8323
  ...t,
8303
- ...await no(-h.offsetTop - x.clientTop - g.reference.height / 2 - h.offsetHeight / 2 - s).fn(t)
8324
+ ...await oo(-h.offsetTop - x.clientTop - g.reference.height / 2 - h.offsetHeight / 2 - s).fn(t)
8304
8325
  }, M = await un(Ss(N, O.scrollHeight + k + x.clientTop), m), j = await un(N, {
8305
8326
  ...m,
8306
8327
  elementContext: "reference"
8307
- }), H = dn(0, M.top), V = N.y + H, f = (O.scrollHeight > O.clientHeight ? (w) => w : Ha)(dn(0, O.scrollHeight + (P && E || I ? k * 2 : 0) - H - dn(0, M.bottom)));
8328
+ }), H = dn(0, M.top), V = N.y + H, f = (O.scrollHeight > O.clientHeight ? (w) => w : Ua)(dn(0, O.scrollHeight + (P && E || I ? k * 2 : 0) - H - dn(0, M.bottom)));
8308
8329
  if (O.style.maxHeight = f + "px", O.scrollTop = H, o) {
8309
- const w = O.offsetHeight < h.offsetHeight * Ba(l, r.current.length) - 1 || j.top >= -c || j.bottom >= -c;
8310
- An.flushSync(() => o(w));
8330
+ const w = O.offsetHeight < h.offsetHeight * Ha(l, r.current.length) - 1 || j.top >= -c || j.bottom >= -c;
8331
+ Tn.flushSync(() => o(w));
8311
8332
  }
8312
8333
  return n && (n.current = await un(Ss({
8313
8334
  ...N,
@@ -8317,7 +8338,7 @@ const hf = (e) => ({
8317
8338
  };
8318
8339
  }
8319
8340
  });
8320
- function pf(e, t) {
8341
+ function mf(e, t) {
8321
8342
  const {
8322
8343
  open: r,
8323
8344
  elements: n
@@ -8326,16 +8347,16 @@ function pf(e, t) {
8326
8347
  overflowRef: s,
8327
8348
  scrollRef: i,
8328
8349
  onChange: l
8329
- } = t, c = va(l), d = q.useRef(!1), m = q.useRef(null), g = q.useRef(null);
8350
+ } = t, c = ba(l), d = q.useRef(!1), m = q.useRef(null), g = q.useRef(null);
8330
8351
  q.useEffect(() => {
8331
8352
  if (!o) return;
8332
8353
  function h(k) {
8333
8354
  if (k.ctrlKey || !O || s.current == null)
8334
8355
  return;
8335
8356
  const P = k.deltaY, I = s.current.top >= -0.5, E = s.current.bottom >= -0.5, N = O.scrollHeight - O.clientHeight, M = P < 0 ? -1 : 1, j = P < 0 ? "max" : "min";
8336
- O.scrollHeight <= O.clientHeight || (!I && P > 0 || !E && P < 0 ? (k.preventDefault(), An.flushSync(() => {
8357
+ O.scrollHeight <= O.clientHeight || (!I && P > 0 || !E && P < 0 ? (k.preventDefault(), Tn.flushSync(() => {
8337
8358
  c((H) => H + Math[j](P, N * M));
8338
- })) : /firefox/i.test(_d()) && (O.scrollTop += P));
8359
+ })) : /firefox/i.test(Kd()) && (O.scrollTop += P));
8339
8360
  }
8340
8361
  const O = (i == null ? void 0 : i.current) || n.floating;
8341
8362
  if (r && O)
@@ -8362,7 +8383,7 @@ function pf(e, t) {
8362
8383
  if (!(!s.current || !h || !d.current)) {
8363
8384
  if (m.current !== null) {
8364
8385
  const O = h.scrollTop - m.current;
8365
- (s.current.bottom < -0.5 && O < -1 || s.current.top < -0.5 && O > 1) && An.flushSync(() => c((k) => k + O));
8386
+ (s.current.bottom < -0.5 && O < -1 || s.current.top < -0.5 && O > 1) && Tn.flushSync(() => c((k) => k + O));
8366
8387
  }
8367
8388
  requestAnimationFrame(() => {
8368
8389
  m.current = h.scrollTop;
@@ -8378,24 +8399,24 @@ let dr = Oe({ styles: void 0, setReference: () => {
8378
8399
  }, setFloating: () => {
8379
8400
  }, getReferenceProps: () => ({}), getFloatingProps: () => ({}), slot: {} });
8380
8401
  dr.displayName = "FloatingContext";
8381
- let So = Oe(null);
8382
- So.displayName = "PlacementContext";
8383
- function mf(e) {
8402
+ let Oo = Oe(null);
8403
+ Oo.displayName = "PlacementContext";
8404
+ function gf(e) {
8384
8405
  return he(() => e ? typeof e == "string" ? { to: e } : e : null, [e]);
8385
8406
  }
8386
- function gf() {
8407
+ function vf() {
8387
8408
  return me(dr).setReference;
8388
8409
  }
8389
- function vf() {
8410
+ function bf() {
8390
8411
  return me(dr).getReferenceProps;
8391
8412
  }
8392
- function bf() {
8413
+ function yf() {
8393
8414
  let { getFloatingProps: e, slot: t } = me(dr);
8394
8415
  return ne((...r) => Object.assign({}, e(...r), { "data-anchor": t.anchor }), [e, t]);
8395
8416
  }
8396
- function yf(e = null) {
8417
+ function wf(e = null) {
8397
8418
  e === !1 && (e = null), typeof e == "string" && (e = { to: e });
8398
- let t = me(So), r = he(() => e, [JSON.stringify(e, (o, s) => {
8419
+ let t = me(Oo), r = he(() => e, [JSON.stringify(e, (o, s) => {
8399
8420
  var i;
8400
8421
  return (i = s == null ? void 0 : s.outerHTML) != null ? i : s;
8401
8422
  })]);
@@ -8406,14 +8427,14 @@ function yf(e = null) {
8406
8427
  return he(() => [n.setFloating, e ? n.styles : {}], [n.setFloating, e, n.styles]);
8407
8428
  }
8408
8429
  let Os = 4;
8409
- function wf({ children: e, enabled: t = !0 }) {
8430
+ function xf({ children: e, enabled: t = !0 }) {
8410
8431
  let [r, n] = ie(null), [o, s] = ie(0), i = ee(null), [l, c] = ie(null);
8411
- xf(l);
8412
- let d = t && r !== null && l !== null, { to: m = "bottom", gap: g = 0, offset: x = 0, padding: h = 0, inner: O } = Ef(r, l), [k, P = "center"] = m.split(" ");
8432
+ Ef(l);
8433
+ let d = t && r !== null && l !== null, { to: m = "bottom", gap: g = 0, offset: x = 0, padding: h = 0, inner: O } = Sf(r, l), [k, P = "center"] = m.split(" ");
8413
8434
  Ae(() => {
8414
8435
  d && s(0);
8415
8436
  }, [d]);
8416
- let { refs: I, floatingStyles: E, context: N } = df({ open: d, placement: k === "selection" ? P === "center" ? "bottom" : `bottom-${P}` : P === "center" ? `${k}` : `${k}-${P}`, strategy: "absolute", transform: !1, middleware: [no({ mainAxis: k === "selection" ? 0 : g, crossAxis: x }), Qs({ padding: h }), k !== "selection" && _s({ padding: h }), k === "selection" && O ? hf({ ...O, padding: h, overflowRef: i, offset: o, minItemsVisible: Os, referenceOverflowThreshold: h, onFallbackChange(w) {
8437
+ let { refs: I, floatingStyles: E, context: N } = ff({ open: d, placement: k === "selection" ? P === "center" ? "bottom" : `bottom-${P}` : P === "center" ? `${k}` : `${k}-${P}`, strategy: "absolute", transform: !1, middleware: [oo({ mainAxis: k === "selection" ? 0 : g, crossAxis: x }), Qs({ padding: h }), k !== "selection" && _s({ padding: h }), k === "selection" && O ? pf({ ...O, padding: h, overflowRef: i, offset: o, minItemsVisible: Os, referenceOverflowThreshold: h, onFallbackChange(w) {
8417
8438
  var b, S;
8418
8439
  if (!w) return;
8419
8440
  let C = N.elements.floating;
@@ -8431,16 +8452,16 @@ function wf({ children: e, enabled: t = !0 }) {
8431
8452
  let R = T * y - A + p;
8432
8453
  return F >= R ? F : R;
8433
8454
  });
8434
- } }) : null, Ua({ padding: h, apply({ availableWidth: w, availableHeight: b, elements: S }) {
8455
+ } }) : null, Wa({ padding: h, apply({ availableWidth: w, availableHeight: b, elements: S }) {
8435
8456
  Object.assign(S.floating.style, { overflow: "auto", maxWidth: `${w}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${b}px)` });
8436
8457
  } })].filter(Boolean), whileElementsMounted: Ks }), [M = k, j = P] = N.placement.split("-");
8437
8458
  k === "selection" && (M = "selection");
8438
- let H = he(() => ({ anchor: [M, j].filter(Boolean).join(" ") }), [M, j]), V = pf(N, { overflowRef: i, onChange: s }), { getReferenceProps: a, getFloatingProps: u } = ff([V]), f = ae((w) => {
8459
+ let H = he(() => ({ anchor: [M, j].filter(Boolean).join(" ") }), [M, j]), V = mf(N, { overflowRef: i, onChange: s }), { getReferenceProps: a, getFloatingProps: u } = hf([V]), f = ae((w) => {
8439
8460
  c(w), I.setFloating(w);
8440
8461
  });
8441
- return q.createElement(So.Provider, { value: n }, q.createElement(dr.Provider, { value: { setFloating: f, setReference: I.setReference, styles: E, getReferenceProps: a, getFloatingProps: u, slot: H } }, e));
8462
+ return q.createElement(Oo.Provider, { value: n }, q.createElement(dr.Provider, { value: { setFloating: f, setReference: I.setReference, styles: E, getReferenceProps: a, getFloatingProps: u, slot: H } }, e));
8442
8463
  }
8443
- function xf(e) {
8464
+ function Ef(e) {
8444
8465
  Ae(() => {
8445
8466
  if (!e) return;
8446
8467
  let t = new MutationObserver(() => {
@@ -8454,12 +8475,12 @@ function xf(e) {
8454
8475
  };
8455
8476
  }, [e]);
8456
8477
  }
8457
- function Ef(e, t) {
8478
+ function Sf(e, t) {
8458
8479
  var r, n, o;
8459
- let s = kn((r = e == null ? void 0 : e.gap) != null ? r : "var(--anchor-gap, 0)", t), i = kn((n = e == null ? void 0 : e.offset) != null ? n : "var(--anchor-offset, 0)", t), l = kn((o = e == null ? void 0 : e.padding) != null ? o : "var(--anchor-padding, 0)", t);
8480
+ let s = Cn((r = e == null ? void 0 : e.gap) != null ? r : "var(--anchor-gap, 0)", t), i = Cn((n = e == null ? void 0 : e.offset) != null ? n : "var(--anchor-offset, 0)", t), l = Cn((o = e == null ? void 0 : e.padding) != null ? o : "var(--anchor-padding, 0)", t);
8460
8481
  return { ...e, gap: s, offset: i, padding: l };
8461
8482
  }
8462
- function kn(e, t, r = void 0) {
8483
+ function Cn(e, t, r = void 0) {
8463
8484
  let n = cr(), o = ae((c, d) => {
8464
8485
  if (c == null) return [r, null];
8465
8486
  if (typeof c == "number") return [c, null];
@@ -8467,7 +8488,7 @@ function kn(e, t, r = void 0) {
8467
8488
  if (!d) return [r, null];
8468
8489
  let m = ks(c, d);
8469
8490
  return [m, (g) => {
8470
- let x = ba(c);
8491
+ let x = ya(c);
8471
8492
  {
8472
8493
  let h = x.map((O) => window.getComputedStyle(d).getPropertyValue(O));
8473
8494
  n.requestAnimationFrame(function O() {
@@ -8495,13 +8516,13 @@ function kn(e, t, r = void 0) {
8495
8516
  if (l(c), !!d) return d(l);
8496
8517
  }, [e, t]), i;
8497
8518
  }
8498
- function ba(e) {
8519
+ function ya(e) {
8499
8520
  let t = /var\((.*)\)/.exec(e);
8500
8521
  if (t) {
8501
8522
  let r = t[1].indexOf(",");
8502
8523
  if (r === -1) return [t[1]];
8503
8524
  let n = t[1].slice(0, r).trim(), o = t[1].slice(r + 1).trim();
8504
- return o ? [n, ...ba(o)] : [n];
8525
+ return o ? [n, ...ya(o)] : [n];
8505
8526
  }
8506
8527
  return [];
8507
8528
  }
@@ -8511,25 +8532,25 @@ function ks(e, t) {
8511
8532
  let n = parseFloat(window.getComputedStyle(r).marginTop) || 0;
8512
8533
  return t.removeChild(r), n;
8513
8534
  }
8514
- function Sf({ children: e, freeze: t }, r) {
8515
- let n = ya(t, e);
8516
- return to(n) ? Us(n, { ref: r }) : K.createElement(K.Fragment, null, n);
8535
+ function Of({ children: e, freeze: t }, r) {
8536
+ let n = wa(t, e);
8537
+ return ro(n) ? Us(n, { ref: r }) : K.createElement(K.Fragment, null, n);
8517
8538
  }
8518
- K.forwardRef(Sf);
8519
- function ya(e, t) {
8539
+ K.forwardRef(Of);
8540
+ function wa(e, t) {
8520
8541
  let [r, n] = ie(t);
8521
8542
  return !e && r !== t && n(t), e ? r : t;
8522
8543
  }
8523
- let Oo = Oe(null);
8524
- Oo.displayName = "OpenClosedContext";
8544
+ let ko = Oe(null);
8545
+ ko.displayName = "OpenClosedContext";
8525
8546
  var kr = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(kr || {});
8526
- function Of() {
8527
- return me(Oo);
8547
+ function kf() {
8548
+ return me(ko);
8528
8549
  }
8529
- function kf({ value: e, children: t }) {
8530
- return K.createElement(Oo.Provider, { value: e }, t);
8550
+ function Cf({ value: e, children: t }) {
8551
+ return K.createElement(ko.Provider, { value: e }, t);
8531
8552
  }
8532
- function Cf(e) {
8553
+ function Af(e) {
8533
8554
  throw new Error("Unexpected object: " + e);
8534
8555
  }
8535
8556
  var fe = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(fe || {});
@@ -8562,34 +8583,34 @@ function qr(e, t) {
8562
8583
  case 5:
8563
8584
  return null;
8564
8585
  default:
8565
- Cf(e);
8586
+ Af(e);
8566
8587
  }
8567
8588
  }
8568
- function wa(e) {
8589
+ function xa(e) {
8569
8590
  let t = ae(e), r = ee(!1);
8570
8591
  pe(() => (r.current = !1, () => {
8571
- r.current = !0, Ui(() => {
8592
+ r.current = !0, Wi(() => {
8572
8593
  r.current && t();
8573
8594
  });
8574
8595
  }), [t]);
8575
8596
  }
8576
- function Af() {
8597
+ function Tf() {
8577
8598
  let e = typeof document > "u";
8578
8599
  return "useSyncExternalStore" in q ? ((t) => t.useSyncExternalStore)(q)(() => () => {
8579
8600
  }, () => !1, () => !e) : !1;
8580
8601
  }
8581
- function Tf() {
8582
- let e = Af(), [t, r] = q.useState(tt.isHandoffComplete);
8602
+ function Pf() {
8603
+ let e = Tf(), [t, r] = q.useState(tt.isHandoffComplete);
8583
8604
  return t && tt.isHandoffComplete === !1 && r(!1), q.useEffect(() => {
8584
8605
  t !== !0 && r(!0);
8585
8606
  }, [t]), q.useEffect(() => tt.handoff(), []), e ? !1 : t;
8586
8607
  }
8587
- let Pf = Oe(!1);
8588
- function Ff() {
8589
- return me(Pf);
8608
+ let Ff = Oe(!1);
8609
+ function Rf() {
8610
+ return me(Ff);
8590
8611
  }
8591
- function Rf(e) {
8592
- let t = Ff(), r = me(Ea), [n, o] = ie(() => {
8612
+ function If(e) {
8613
+ let t = Rf(), r = me(Sa), [n, o] = ie(() => {
8593
8614
  var s;
8594
8615
  if (!t && r !== null) return (s = r.current) != null ? s : null;
8595
8616
  if (tt.isServer) return null;
@@ -8605,37 +8626,37 @@ function Rf(e) {
8605
8626
  t || r !== null && o(r.current);
8606
8627
  }, [r, o, t]), n;
8607
8628
  }
8608
- let xa = Rr, If = Ve(function(e, t) {
8609
- let { ownerDocument: r = null, ...n } = e, o = ee(null), s = nt(zu((h) => {
8629
+ let Ea = Rr, Nf = Ve(function(e, t) {
8630
+ let { ownerDocument: r = null, ...n } = e, o = ee(null), s = nt(Gu((h) => {
8610
8631
  o.current = h;
8611
- }), t), i = Zn(o.current), l = r ?? i, c = Rf(l), d = me(Df), m = cr(), g = Tf(), x = qe();
8612
- return wa(() => {
8632
+ }), t), i = eo(o.current), l = r ?? i, c = If(l), d = me(Lf), m = cr(), g = Pf(), x = qe();
8633
+ return xa(() => {
8613
8634
  var h;
8614
8635
  c && c.childNodes.length <= 0 && ((h = c.parentElement) == null || h.removeChild(c));
8615
8636
  }), !c || !g ? null : Xs(K.createElement("div", { "data-headlessui-portal": "", ref: (h) => {
8616
8637
  m.dispose(), d && h && m.add(d.register(h));
8617
- } }, x({ ourProps: { ref: s }, theirProps: n, slot: {}, defaultTag: xa, name: "Portal" })), c);
8638
+ } }, x({ ourProps: { ref: s }, theirProps: n, slot: {}, defaultTag: Ea, name: "Portal" })), c);
8618
8639
  });
8619
- function Nf(e, t) {
8640
+ function $f(e, t) {
8620
8641
  let r = nt(t), { enabled: n = !0, ownerDocument: o, ...s } = e, i = qe();
8621
- return n ? K.createElement(If, { ...s, ownerDocument: o, ref: r }) : i({ ourProps: { ref: r }, theirProps: s, slot: {}, defaultTag: xa, name: "Portal" });
8642
+ return n ? K.createElement(Nf, { ...s, ownerDocument: o, ref: r }) : i({ ourProps: { ref: r }, theirProps: s, slot: {}, defaultTag: Ea, name: "Portal" });
8622
8643
  }
8623
- let $f = Rr, Ea = Oe(null);
8624
- function Mf(e, t) {
8644
+ let Mf = Rr, Sa = Oe(null);
8645
+ function Df(e, t) {
8625
8646
  let { target: r, ...n } = e, o = { ref: nt(t) }, s = qe();
8626
- return K.createElement(Ea.Provider, { value: r }, s({ ourProps: o, theirProps: n, defaultTag: $f, name: "Popover.Group" }));
8647
+ return K.createElement(Sa.Provider, { value: r }, s({ ourProps: o, theirProps: n, defaultTag: Mf, name: "Popover.Group" }));
8627
8648
  }
8628
- let Df = Oe(null), Lf = Ve(Nf), jf = Ve(Mf), Bf = Object.assign(Lf, { Group: jf });
8649
+ let Lf = Oe(null), jf = Ve($f), Bf = Ve(Df), Hf = Object.assign(jf, { Group: Bf });
8629
8650
  const Qr = { Idle: { kind: "Idle" }, Tracked: (e) => ({ kind: "Tracked", position: e }), Moved: { kind: "Moved" } };
8630
- function Sa(e) {
8651
+ function Oa(e) {
8631
8652
  let t = e.getBoundingClientRect();
8632
8653
  return `${t.x},${t.y}`;
8633
8654
  }
8634
- function Hf(e, t, r) {
8655
+ function Uf(e, t, r) {
8635
8656
  let n = Me();
8636
8657
  if (t.kind === "Tracked") {
8637
8658
  let o = function() {
8638
- s !== Sa(e) && (n.dispose(), r());
8659
+ s !== Oa(e) && (n.dispose(), r());
8639
8660
  }, { position: s } = t, i = new ResizeObserver(o);
8640
8661
  i.observe(e), n.add(() => i.disconnect()), n.addEventListener(window, "scroll", o, { passive: !0 }), n.addEventListener(window, "resize", o);
8641
8662
  }
@@ -8651,7 +8672,7 @@ function As(e) {
8651
8672
  let i = s ? (r = o.innerText) != null ? r : "" : n;
8652
8673
  return Cs.test(i) && (i = i.replace(Cs, "")), i;
8653
8674
  }
8654
- function Uf(e) {
8675
+ function Wf(e) {
8655
8676
  let t = e.getAttribute("aria-label");
8656
8677
  if (typeof t == "string") return t.trim();
8657
8678
  let r = e.getAttribute("aria-labelledby");
@@ -8668,25 +8689,25 @@ function Uf(e) {
8668
8689
  }
8669
8690
  return As(e).trim();
8670
8691
  }
8671
- function Wf(e) {
8692
+ function zf(e) {
8672
8693
  let t = ee(""), r = ee("");
8673
8694
  return ae(() => {
8674
8695
  let n = e.current;
8675
8696
  if (!n) return "";
8676
8697
  let o = n.innerText;
8677
8698
  if (t.current === o) return r.current;
8678
- let s = Uf(n).trim().toLowerCase();
8699
+ let s = Wf(n).trim().toLowerCase();
8679
8700
  return t.current = o, r.current = s, s;
8680
8701
  });
8681
8702
  }
8682
- var zf = Object.defineProperty, Gf = (e, t, r) => t in e ? zf(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ts = (e, t, r) => (Gf(e, typeof t != "symbol" ? t + "" : t, r), r), Se = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Se || {}), xt = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(xt || {}), _r = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(_r || {}), Oa = ((e) => (e[e.OpenListbox = 0] = "OpenListbox", e[e.CloseListbox = 1] = "CloseListbox", e[e.GoToOption = 2] = "GoToOption", e[e.Search = 3] = "Search", e[e.ClearSearch = 4] = "ClearSearch", e[e.SelectOption = 5] = "SelectOption", e[e.RegisterOptions = 6] = "RegisterOptions", e[e.UnregisterOptions = 7] = "UnregisterOptions", e[e.SetButtonElement = 8] = "SetButtonElement", e[e.SetOptionsElement = 9] = "SetOptionsElement", e[e.SortOptions = 10] = "SortOptions", e[e.MarkButtonAsMoved = 11] = "MarkButtonAsMoved", e))(Oa || {});
8703
+ var Gf = Object.defineProperty, qf = (e, t, r) => t in e ? Gf(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ts = (e, t, r) => (qf(e, typeof t != "symbol" ? t + "" : t, r), r), Se = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Se || {}), xt = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(xt || {}), _r = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(_r || {}), ka = ((e) => (e[e.OpenListbox = 0] = "OpenListbox", e[e.CloseListbox = 1] = "CloseListbox", e[e.GoToOption = 2] = "GoToOption", e[e.Search = 3] = "Search", e[e.ClearSearch = 4] = "ClearSearch", e[e.SelectOption = 5] = "SelectOption", e[e.RegisterOptions = 6] = "RegisterOptions", e[e.UnregisterOptions = 7] = "UnregisterOptions", e[e.SetButtonElement = 8] = "SetButtonElement", e[e.SetOptionsElement = 9] = "SetOptionsElement", e[e.SortOptions = 10] = "SortOptions", e[e.MarkButtonAsMoved = 11] = "MarkButtonAsMoved", e))(ka || {});
8683
8704
  function Ps(e, t = (r) => r) {
8684
- let r = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, n = pa(t(e.options.slice()), (s) => s.dataRef.current.domRef.current), o = r ? n.indexOf(r) : null;
8705
+ let r = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, n = ma(t(e.options.slice()), (s) => s.dataRef.current.domRef.current), o = r ? n.indexOf(r) : null;
8685
8706
  return o === -1 && (o = null), { options: n, activeOptionIndex: o };
8686
8707
  }
8687
- let qf = { 1(e) {
8708
+ let Vf = { 1(e) {
8688
8709
  if (e.dataRef.current.disabled || e.listboxState === 1) return e;
8689
- let t = e.buttonElement ? Qr.Tracked(Sa(e.buttonElement)) : e.buttonPositionState;
8710
+ let t = e.buttonElement ? Qr.Tracked(Oa(e.buttonElement)) : e.buttonPositionState;
8690
8711
  return { ...e, activeOptionIndex: null, pendingFocus: { focus: fe.Nothing }, listboxState: 1, __demoMode: !1, buttonPositionState: t };
8691
8712
  }, 0(e, t) {
8692
8713
  if (e.dataRef.current.disabled || e.listboxState === 0) return e;
@@ -8751,7 +8772,7 @@ let qf = { 1(e) {
8751
8772
  }, 8: (e, t) => e.buttonElement === t.element ? e : { ...e, buttonElement: t.element }, 9: (e, t) => e.optionsElement === t.element ? e : { ...e, optionsElement: t.element }, 10: (e) => e.pendingShouldSort ? { ...e, ...Ps(e), pendingShouldSort: !1 } : e, 11(e) {
8752
8773
  return e.buttonPositionState.kind !== "Tracked" ? e : { ...e, buttonPositionState: Qr.Moved };
8753
8774
  } };
8754
- class ko extends aa {
8775
+ class Co extends la {
8755
8776
  constructor(t) {
8756
8777
  super(t), Ts(this, "actions", { onChange: (r) => {
8757
8778
  let { onChange: n, compare: o, mode: s, value: i } = this.state.dataRef.current;
@@ -8759,17 +8780,17 @@ class ko extends aa {
8759
8780
  let l = i.slice(), c = l.findIndex((d) => o(d, r));
8760
8781
  return c === -1 ? l.push(r) : l.splice(c, 1), n == null ? void 0 : n(l);
8761
8782
  } });
8762
- }, registerOption: xn(() => {
8783
+ }, registerOption: En(() => {
8763
8784
  let r = [], n = /* @__PURE__ */ new Set();
8764
8785
  return [(o, s) => {
8765
8786
  n.has(s) || (n.add(s), r.push({ id: o, dataRef: s }));
8766
8787
  }, () => (n.clear(), this.send({ type: 6, options: r.splice(0) }))];
8767
- }), unregisterOption: xn(() => {
8788
+ }), unregisterOption: En(() => {
8768
8789
  let r = [];
8769
8790
  return [(n) => r.push(n), () => {
8770
8791
  this.send({ type: 7, options: r.splice(0) });
8771
8792
  }];
8772
- }), goToOption: xn(() => {
8793
+ }), goToOption: En(() => {
8773
8794
  let r = null;
8774
8795
  return [(n, o) => {
8775
8796
  r = { type: 2, ...n, trigger: o };
@@ -8814,14 +8835,14 @@ class ko extends aa {
8814
8835
  });
8815
8836
  });
8816
8837
  {
8817
- let r = this.state.id, n = xo.get(null);
8818
- this.disposables.add(n.on(ca.Push, (o) => {
8838
+ let r = this.state.id, n = Eo.get(null);
8839
+ this.disposables.add(n.on(ua.Push, (o) => {
8819
8840
  !n.selectors.isTop(o, r) && this.state.listboxState === 0 && this.actions.closeListbox();
8820
8841
  })), this.on(0, () => n.actions.push(r)), this.on(1, () => n.actions.pop(r));
8821
8842
  }
8822
8843
  this.disposables.group((r) => {
8823
8844
  this.on(1, (n) => {
8824
- n.buttonElement && (r.dispose(), r.add(Hf(n.buttonElement, n.buttonPositionState, () => {
8845
+ n.buttonElement && (r.dispose(), r.add(Uf(n.buttonElement, n.buttonPositionState, () => {
8825
8846
  this.send({ type: 11 });
8826
8847
  })));
8827
8848
  });
@@ -8831,24 +8852,24 @@ class ko extends aa {
8831
8852
  });
8832
8853
  }
8833
8854
  static new({ id: t, __demoMode: r = !1 }) {
8834
- return new ko({ id: t, dataRef: { current: {} }, listboxState: r ? 0 : 1, options: [], searchQuery: "", activeOptionIndex: null, activationTrigger: 1, buttonElement: null, optionsElement: null, pendingShouldSort: !1, pendingFocus: { focus: fe.Nothing }, frozenValue: !1, __demoMode: r, buttonPositionState: Qr.Idle });
8855
+ return new Co({ id: t, dataRef: { current: {} }, listboxState: r ? 0 : 1, options: [], searchQuery: "", activeOptionIndex: null, activationTrigger: 1, buttonElement: null, optionsElement: null, pendingShouldSort: !1, pendingFocus: { focus: fe.Nothing }, frozenValue: !1, __demoMode: r, buttonPositionState: Qr.Idle });
8835
8856
  }
8836
8857
  reduce(t, r) {
8837
- return rt(r.type, qf, t, r);
8858
+ return rt(r.type, Vf, t, r);
8838
8859
  }
8839
8860
  }
8840
- const ka = Oe(null);
8841
- function Co(e) {
8842
- let t = me(ka);
8861
+ const Ca = Oe(null);
8862
+ function Ao(e) {
8863
+ let t = me(Ca);
8843
8864
  if (t === null) {
8844
8865
  let r = new Error(`<${e} /> is missing a parent <Listbox /> component.`);
8845
- throw Error.captureStackTrace && Error.captureStackTrace(r, Ca), r;
8866
+ throw Error.captureStackTrace && Error.captureStackTrace(r, Aa), r;
8846
8867
  }
8847
8868
  return t;
8848
8869
  }
8849
- function Ca({ id: e, __demoMode: t = !1 }) {
8850
- let r = he(() => ko.new({ id: e, __demoMode: t }), []);
8851
- return wa(() => r.dispose()), r;
8870
+ function Aa({ id: e, __demoMode: t = !1 }) {
8871
+ let r = he(() => Co.new({ id: e, __demoMode: t }), []);
8872
+ return xa(() => r.dispose()), r;
8852
8873
  }
8853
8874
  let ln = Oe(null);
8854
8875
  ln.displayName = "ListboxDataContext";
@@ -8860,27 +8881,27 @@ function Mr(e) {
8860
8881
  }
8861
8882
  return t;
8862
8883
  }
8863
- let Vf = Rr;
8864
- function Qf(e, t) {
8865
- let r = Gt(), n = bo(), { value: o, defaultValue: s, form: i, name: l, onChange: c, by: d, invalid: m = !1, disabled: g = n || !1, horizontal: x = !1, multiple: h = !1, __demoMode: O = !1, ...k } = e;
8884
+ let Qf = Rr;
8885
+ function _f(e, t) {
8886
+ let r = Gt(), n = yo(), { value: o, defaultValue: s, form: i, name: l, onChange: c, by: d, invalid: m = !1, disabled: g = n || !1, horizontal: x = !1, multiple: h = !1, __demoMode: O = !1, ...k } = e;
8866
8887
  const P = x ? "horizontal" : "vertical";
8867
- let I = nt(t), E = Tu(s), [N = h ? [] : void 0, M] = Au(o, c, E), j = Ca({ id: r, __demoMode: O }), H = ee({ static: !1, hold: !1 }), V = ee(/* @__PURE__ */ new Map()), a = Zu(d), u = ne((G) => rt(f.mode, { [xt.Multi]: () => N.some((X) => a(X, G)), [xt.Single]: () => a(N, G) }), [N]), f = St({ value: N, disabled: g, invalid: m, mode: h ? xt.Multi : xt.Single, orientation: P, onChange: M, compare: a, isSelected: u, optionsPropsRef: H, listRef: V });
8888
+ let I = nt(t), E = Pu(s), [N = h ? [] : void 0, M] = Tu(o, c, E), j = Aa({ id: r, __demoMode: O }), H = ee({ static: !1, hold: !1 }), V = ee(/* @__PURE__ */ new Map()), a = ed(d), u = ne((G) => rt(f.mode, { [xt.Multi]: () => N.some((X) => a(X, G)), [xt.Single]: () => a(N, G) }), [N]), f = St({ value: N, disabled: g, invalid: m, mode: h ? xt.Multi : xt.Single, orientation: P, onChange: M, compare: a, isSelected: u, optionsPropsRef: H, listRef: V });
8868
8889
  Ae(() => {
8869
8890
  j.state.dataRef.current = f;
8870
8891
  }, [f]);
8871
- let w = Re(j, (G) => G.listboxState), b = xo.get(null), S = Re(b, ne((G) => b.selectors.isTop(G, r), [b, r])), [C, p] = Re(j, (G) => [G.buttonElement, G.optionsElement]);
8872
- Ad(S, [C, p], (G, X) => {
8873
- j.send({ type: Oa.CloseListbox }), ha(X, Eo.Loose) || (G.preventDefault(), C == null || C.focus());
8892
+ let w = Re(j, (G) => G.listboxState), b = Eo.get(null), S = Re(b, ne((G) => b.selectors.isTop(G, r), [b, r])), [C, p] = Re(j, (G) => [G.buttonElement, G.optionsElement]);
8893
+ Td(S, [C, p], (G, X) => {
8894
+ j.send({ type: ka.CloseListbox }), pa(X, So.Loose) || (G.preventDefault(), C == null || C.focus());
8874
8895
  });
8875
- let y = St({ open: w === Se.Open, disabled: g, invalid: m, value: N }), [T, A] = _u({ inherit: !0 }), F = { ref: I }, R = ne(() => {
8896
+ let y = St({ open: w === Se.Open, disabled: g, invalid: m, value: N }), [T, A] = Ku({ inherit: !0 }), F = { ref: I }, R = ne(() => {
8876
8897
  if (E !== void 0) return M == null ? void 0 : M(E);
8877
8898
  }, [M, E]), U = qe();
8878
- return K.createElement(A, { value: T, props: { htmlFor: C == null ? void 0 : C.id }, slot: { open: w === Se.Open, disabled: g } }, K.createElement(wf, null, K.createElement(ka.Provider, { value: j }, K.createElement(ln.Provider, { value: f }, K.createElement(kf, { value: rt(w, { [Se.Open]: kr.Open, [Se.Closed]: kr.Closed }) }, l != null && N != null && K.createElement(Mu, { disabled: g, data: { [l]: N }, form: i, onReset: R }), U({ ourProps: F, theirProps: k, slot: y, defaultTag: Vf, name: "Listbox" }))))));
8899
+ return K.createElement(A, { value: T, props: { htmlFor: C == null ? void 0 : C.id }, slot: { open: w === Se.Open, disabled: g } }, K.createElement(xf, null, K.createElement(Ca.Provider, { value: j }, K.createElement(ln.Provider, { value: f }, K.createElement(Cf, { value: rt(w, { [Se.Open]: kr.Open, [Se.Closed]: kr.Closed }) }, l != null && N != null && K.createElement(Du, { disabled: g, data: { [l]: N }, form: i, onReset: R }), U({ ourProps: F, theirProps: k, slot: y, defaultTag: Qf, name: "Listbox" }))))));
8879
8900
  }
8880
- let _f = "button";
8881
- function Kf(e, t) {
8882
- let r = Gt(), n = Ki(), o = Mr("Listbox.Button"), s = Co("Listbox.Button"), { id: i = n || `headlessui-listbox-button-${r}`, disabled: l = o.disabled || !1, autoFocus: c = !1, ...d } = e, m = nt(t, gf(), s.actions.setButtonElement), g = vf(), [x, h, O] = Re(s, (p) => [p.listboxState, p.buttonElement, p.optionsElement]), k = x === Se.Open;
8883
- Fd(k, { trigger: h, action: ne((p) => {
8901
+ let Kf = "button";
8902
+ function Yf(e, t) {
8903
+ let r = Gt(), n = Yi(), o = Mr("Listbox.Button"), s = Ao("Listbox.Button"), { id: i = n || `headlessui-listbox-button-${r}`, disabled: l = o.disabled || !1, autoFocus: c = !1, ...d } = e, m = nt(t, vf(), s.actions.setButtonElement), g = bf(), [x, h, O] = Re(s, (p) => [p.listboxState, p.buttonElement, p.optionsElement]), k = x === Se.Open;
8904
+ Rd(k, { trigger: h, action: ne((p) => {
8884
8905
  if (h != null && h.contains(p.target)) return Gr.Ignore;
8885
8906
  let y = p.target.closest('[role="option"]:not([data-disabled])');
8886
8907
  return ut(y) ? Gr.Select(y) : O != null && O.contains(p.target) ? Gr.Ignore : Gr.Close;
@@ -8888,7 +8909,7 @@ function Kf(e, t) {
8888
8909
  let P = ae((p) => {
8889
8910
  switch (p.key) {
8890
8911
  case ye.Enter:
8891
- Pu(p.currentTarget);
8912
+ Fu(p.currentTarget);
8892
8913
  break;
8893
8914
  case ye.Space:
8894
8915
  case ye.ArrowDown:
@@ -8904,23 +8925,23 @@ function Kf(e, t) {
8904
8925
  p.preventDefault();
8905
8926
  break;
8906
8927
  }
8907
- }), E = td((p) => {
8928
+ }), E = rd((p) => {
8908
8929
  var y;
8909
8930
  s.state.listboxState === Se.Open ? (Kr(() => s.actions.closeListbox()), (y = s.state.buttonElement) == null || y.focus({ preventScroll: !0 })) : (p.preventDefault(), s.actions.openListbox({ focus: fe.Nothing }));
8910
- }), N = ae((p) => p.preventDefault()), M = ra([i]), j = Gu(), { isFocusVisible: H, focusProps: V } = fu({ autoFocus: c }), { isHovered: a, hoverProps: u } = du({ isDisabled: l }), { pressed: f, pressProps: w } = yu({ disabled: l }), b = St({ open: x === Se.Open, active: f || x === Se.Open, disabled: l, invalid: o.invalid, value: o.value, hover: a, focus: H, autofocus: c }), S = Re(s, (p) => p.listboxState === Se.Open), C = zi(g(), { ref: m, id: i, type: Rd(e, h), "aria-haspopup": "listbox", "aria-controls": O == null ? void 0 : O.id, "aria-expanded": S, "aria-labelledby": M, "aria-describedby": j, disabled: l || void 0, autoFocus: c, onKeyDown: P, onKeyUp: I, onKeyPress: N }, E, V, u, w);
8911
- return qe()({ ourProps: C, theirProps: d, slot: b, defaultTag: _f, name: "Listbox.Button" });
8931
+ }), N = ae((p) => p.preventDefault()), M = na([i]), j = qu(), { isFocusVisible: H, focusProps: V } = hu({ autoFocus: c }), { isHovered: a, hoverProps: u } = fu({ isDisabled: l }), { pressed: f, pressProps: w } = wu({ disabled: l }), b = St({ open: x === Se.Open, active: f || x === Se.Open, disabled: l, invalid: o.invalid, value: o.value, hover: a, focus: H, autofocus: c }), S = Re(s, (p) => p.listboxState === Se.Open), C = Gi(g(), { ref: m, id: i, type: Id(e, h), "aria-haspopup": "listbox", "aria-controls": O == null ? void 0 : O.id, "aria-expanded": S, "aria-labelledby": M, "aria-describedby": j, disabled: l || void 0, autoFocus: c, onKeyDown: P, onKeyUp: I, onKeyPress: N }, E, V, u, w);
8932
+ return qe()({ ourProps: C, theirProps: d, slot: b, defaultTag: Kf, name: "Listbox.Button" });
8912
8933
  }
8913
- let Aa = Oe(!1), Yf = "div", Xf = Kn.RenderStrategy | Kn.Static;
8914
- function Jf(e, t) {
8915
- let r = Gt(), { id: n = `headlessui-listbox-options-${r}`, anchor: o, portal: s = !1, modal: i = !0, transition: l = !1, ...c } = e, d = mf(o), [m, g] = ie(null);
8934
+ let Ta = Oe(!1), Xf = "div", Jf = Yn.RenderStrategy | Yn.Static;
8935
+ function Zf(e, t) {
8936
+ let r = Gt(), { id: n = `headlessui-listbox-options-${r}`, anchor: o, portal: s = !1, modal: i = !0, transition: l = !1, ...c } = e, d = gf(o), [m, g] = ie(null);
8916
8937
  d && (s = !0);
8917
- let x = Mr("Listbox.Options"), h = Co("Listbox.Options"), [O, k, P, I] = Re(h, (D) => [D.listboxState, D.buttonElement, D.optionsElement, D.__demoMode]), E = Zn(k), N = Zn(P), M = Of(), [j, H] = zd(l, m, M !== null ? (M & kr.Open) === kr.Open : O === Se.Open);
8918
- md(j, k, h.actions.closeListbox);
8938
+ let x = Mr("Listbox.Options"), h = Ao("Listbox.Options"), [O, k, P, I] = Re(h, (D) => [D.listboxState, D.buttonElement, D.optionsElement, D.__demoMode]), E = eo(k), N = eo(P), M = kf(), [j, H] = Gd(l, m, M !== null ? (M & kr.Open) === kr.Open : O === Se.Open);
8939
+ gd(j, k, h.actions.closeListbox);
8919
8940
  let V = I ? !1 : i && O === Se.Open;
8920
- jd(V, N);
8941
+ Bd(V, N);
8921
8942
  let a = I ? !1 : i && O === Se.Open;
8922
- pd(a, { allowed: ne(() => [k, P], [k, P]) });
8923
- let u = Re(h, h.selectors.didButtonMove) ? !1 : j, f = Re(h, h.selectors.hasFrozenValue) && !e.static, w = ya(f, x.value), b = ne((D) => x.compare(w, D), [x.compare, w]), S = Re(h, (D) => {
8943
+ md(a, { allowed: ne(() => [k, P], [k, P]) });
8944
+ let u = Re(h, h.selectors.didButtonMove) ? !1 : j, f = Re(h, h.selectors.hasFrozenValue) && !e.static, w = wa(f, x.value), b = ne((D) => x.compare(w, D), [x.compare, w]), S = Re(h, (D) => {
8924
8945
  var te;
8925
8946
  if (d == null || !((te = d == null ? void 0 : d.to) != null && te.includes("selection"))) return null;
8926
8947
  let We = D.options.findIndex((le) => b(le.dataRef.current.value));
@@ -8930,10 +8951,10 @@ function Jf(e, t) {
8930
8951
  if (S === null) return { ...d, inner: void 0 };
8931
8952
  let D = Array.from(x.listRef.current.values());
8932
8953
  return { ...d, inner: { listRef: { current: D }, index: S } };
8933
- })(), [p, y] = yf(C), T = bf(), A = nt(t, d ? p : null, h.actions.setOptionsElement, g), F = cr();
8954
+ })(), [p, y] = wf(C), T = yf(), A = nt(t, d ? p : null, h.actions.setOptionsElement, g), F = cr();
8934
8955
  pe(() => {
8935
8956
  let D = P;
8936
- D && O === Se.Open && (gu(D) || D == null || D.focus({ preventScroll: !0 }));
8957
+ D && O === Se.Open && (vu(D) || D == null || D.focus({ preventScroll: !0 }));
8937
8958
  }, [O, P]);
8938
8959
  let R = ae((D) => {
8939
8960
  var te;
@@ -8957,7 +8978,7 @@ function Jf(e, t) {
8957
8978
  D.preventDefault(), D.stopPropagation(), Kr(() => h.actions.closeListbox()), (te = h.state.buttonElement) == null || te.focus({ preventScroll: !0 });
8958
8979
  return;
8959
8980
  case ye.Tab:
8960
- D.preventDefault(), D.stopPropagation(), Kr(() => h.actions.closeListbox()), Sd(h.state.buttonElement, D.shiftKey ? Jn.Previous : Jn.Next);
8981
+ D.preventDefault(), D.stopPropagation(), Kr(() => h.actions.closeListbox()), Od(h.state.buttonElement, D.shiftKey ? Zn.Previous : Zn.Next);
8961
8982
  break;
8962
8983
  default:
8963
8984
  D.key.length === 1 && (h.actions.search(D.key), F.setTimeout(() => h.actions.clearSearch(), 350));
@@ -8966,12 +8987,12 @@ function Jf(e, t) {
8966
8987
  }), U = Re(h, (D) => {
8967
8988
  var te;
8968
8989
  return (te = D.buttonElement) == null ? void 0 : te.id;
8969
- }), G = St({ open: O === Se.Open }), X = zi(d ? T() : {}, { id: n, ref: A, "aria-activedescendant": Re(h, h.selectors.activeDescendantId), "aria-multiselectable": x.mode === xt.Multi ? !0 : void 0, "aria-labelledby": U, "aria-orientation": x.orientation, onKeyDown: R, role: "listbox", tabIndex: O === Se.Open ? 0 : void 0, style: { ...c.style, ...y, "--button-width": ed(j, k, !0).width }, ...Wd(H) }), se = qe(), L = he(() => x.mode === xt.Multi ? x : { ...x, isSelected: b }, [x, b]);
8970
- return K.createElement(Bf, { enabled: s ? e.static || j : !1, ownerDocument: E }, K.createElement(ln.Provider, { value: L }, se({ ourProps: X, theirProps: c, slot: G, defaultTag: Yf, features: Xf, visible: u, name: "Listbox.Options" })));
8990
+ }), G = St({ open: O === Se.Open }), X = Gi(d ? T() : {}, { id: n, ref: A, "aria-activedescendant": Re(h, h.selectors.activeDescendantId), "aria-multiselectable": x.mode === xt.Multi ? !0 : void 0, "aria-labelledby": U, "aria-orientation": x.orientation, onKeyDown: R, role: "listbox", tabIndex: O === Se.Open ? 0 : void 0, style: { ...c.style, ...y, "--button-width": td(j, k, !0).width }, ...zd(H) }), se = qe(), L = he(() => x.mode === xt.Multi ? x : { ...x, isSelected: b }, [x, b]);
8991
+ return K.createElement(Hf, { enabled: s ? e.static || j : !1, ownerDocument: E }, K.createElement(ln.Provider, { value: L }, se({ ourProps: X, theirProps: c, slot: G, defaultTag: Xf, features: Jf, visible: u, name: "Listbox.Options" })));
8971
8992
  }
8972
- let Zf = "div";
8973
- function eh(e, t) {
8974
- let r = Gt(), { id: n = `headlessui-listbox-option-${r}`, disabled: o = !1, value: s, ...i } = e, l = me(Aa) === !0, c = Mr("Listbox.Option"), d = Co("Listbox.Option"), m = Re(d, (f) => d.selectors.isActive(f, n)), g = c.isSelected(s), x = ee(null), h = Wf(x), O = ur({ disabled: o, value: s, domRef: x, get textValue() {
8993
+ let eh = "div";
8994
+ function th(e, t) {
8995
+ let r = Gt(), { id: n = `headlessui-listbox-option-${r}`, disabled: o = !1, value: s, ...i } = e, l = me(Ta) === !0, c = Mr("Listbox.Option"), d = Ao("Listbox.Option"), m = Re(d, (f) => d.selectors.isActive(f, n)), g = c.isSelected(s), x = ee(null), h = zf(x), O = ur({ disabled: o, value: s, domRef: x, get textValue() {
8975
8996
  return h();
8976
8997
  } }), k = nt(t, x, (f) => {
8977
8998
  f ? c.listRef.current.set(n, f) : c.listRef.current.delete(n);
@@ -8990,22 +9011,22 @@ function eh(e, t) {
8990
9011
  }), E = ae(() => {
8991
9012
  if (o) return d.actions.goToOption({ focus: fe.Nothing });
8992
9013
  d.actions.goToOption({ focus: fe.Specific, id: n });
8993
- }), N = Bd(), M = ae((f) => N.update(f)), j = ae((f) => {
9014
+ }), N = Hd(), M = ae((f) => N.update(f)), j = ae((f) => {
8994
9015
  N.wasMoved(f) && (o || m && d.state.activationTrigger === _r.Pointer || d.actions.goToOption({ focus: fe.Specific, id: n }, _r.Pointer));
8995
9016
  }), H = ae((f) => {
8996
9017
  N.wasMoved(f) && (o || m && d.state.activationTrigger === _r.Pointer && d.actions.goToOption({ focus: fe.Nothing }));
8997
9018
  }), V = St({ active: m, focus: m, selected: g, disabled: o, selectedOption: g && l }), a = l ? {} : { id: n, ref: k, role: "option", tabIndex: o === !0 ? void 0 : -1, "aria-disabled": o === !0 ? !0 : void 0, "aria-selected": g, disabled: void 0, onClick: I, onFocus: E, onPointerEnter: M, onMouseEnter: M, onPointerMove: j, onMouseMove: j, onPointerLeave: H, onMouseLeave: H }, u = qe();
8998
- return !g && l ? null : u({ ourProps: a, theirProps: i, slot: V, defaultTag: Zf, name: "Listbox.Option" });
9019
+ return !g && l ? null : u({ ourProps: a, theirProps: i, slot: V, defaultTag: eh, name: "Listbox.Option" });
8999
9020
  }
9000
- let th = Rr;
9001
- function rh(e, t) {
9021
+ let rh = Rr;
9022
+ function nh(e, t) {
9002
9023
  let { options: r, placeholder: n, ...o } = e, s = { ref: nt(t) }, i = Mr("ListboxSelectedOption"), l = St({}), c = i.value === void 0 || i.value === null || i.mode === xt.Multi && Array.isArray(i.value) && i.value.length === 0, d = qe();
9003
- return K.createElement(Aa.Provider, { value: !0 }, d({ ourProps: s, theirProps: { ...o, children: K.createElement(K.Fragment, null, n && c ? n : r) }, slot: l, defaultTag: th, name: "ListboxSelectedOption" }));
9024
+ return K.createElement(Ta.Provider, { value: !0 }, d({ ourProps: s, theirProps: { ...o, children: K.createElement(K.Fragment, null, n && c ? n : r) }, slot: l, defaultTag: rh, name: "ListboxSelectedOption" }));
9004
9025
  }
9005
- let nh = Ve(Qf), Ta = Ve(Kf), oh = na, Pa = Ve(Jf), Fa = Ve(eh), sh = Ve(rh), ih = Object.assign(nh, { Button: Ta, Label: oh, Options: Pa, Option: Fa, SelectedOption: sh });
9006
- function ah(e = {}) {
9026
+ let oh = Ve(_f), Pa = Ve(Yf), sh = oa, Fa = Ve(Zf), Ra = Ve(th), ih = Ve(nh), ah = Object.assign(oh, { Button: Pa, Label: sh, Options: Fa, Option: Ra, SelectedOption: ih });
9027
+ function lh(e = {}) {
9007
9028
  const { activeAddress: t, algodClient: r } = Ot(), { enabled: n = !0 } = e;
9008
- return fo({
9029
+ return ho({
9009
9030
  queryKey: ["account-info", t],
9010
9031
  queryFn: async () => {
9011
9032
  if (!t || !r) return null;
@@ -9026,7 +9047,7 @@ function hr({
9026
9047
  const { menuItemsBySlot: r } = rn(), n = r[e];
9027
9048
  return !n || n.length === 0 ? null : /* @__PURE__ */ $(et, { children: n.filter((o) => !o.enabled || o.enabled(t)).map((o) => /* @__PURE__ */ $(K.Fragment, { children: o.render(t) }, o.key)) });
9028
9049
  }
9029
- function lh({ className: e, scale: t = 0.85 }) {
9050
+ function ch({ className: e, scale: t = 0.85 }) {
9030
9051
  return /* @__PURE__ */ $(
9031
9052
  "svg",
9032
9053
  {
@@ -9043,12 +9064,12 @@ function lh({ className: e, scale: t = 0.85 }) {
9043
9064
  }
9044
9065
  );
9045
9066
  }
9046
- function ch({ children: e }) {
9067
+ function uh({ children: e }) {
9047
9068
  var se;
9048
9069
  const { activeAddress: t, activeWallet: r } = Ot(), { theme: n, resolvedTheme: o } = Nr(), { openDialog: s, closeDialog: i, panels: l } = rn(), [c, d] = ie(!1), [m, g] = ie(null), [x, h] = ie(!1), [O, k] = ie(() => {
9049
9070
  const L = localStorage.getItem("uwui:balance-preference");
9050
9071
  return L ? L === "available" : !1;
9051
- }), P = n === "system" ? void 0 : n, I = Ai({ enabled: !!t }), E = ((se = I.data) == null ? void 0 : se.name) ?? null, { data: N } = ah({ enabled: !!t }), M = K.useMemo(() => !N || N.amount === void 0 ? null : Number(N.amount) / 1e6, [N]), j = K.useMemo(() => {
9072
+ }), P = n === "system" ? void 0 : n, I = Ai({ enabled: !!t }), E = ((se = I.data) == null ? void 0 : se.name) ?? null, { data: N } = lh({ enabled: !!t }), M = K.useMemo(() => !N || N.amount === void 0 ? null : Number(N.amount) / 1e6, [N]), j = K.useMemo(() => {
9052
9073
  if (!N || N.amount === void 0 || N.minBalance === void 0)
9053
9074
  return null;
9054
9075
  const L = Number(N.amount) - Number(N.minBalance);
@@ -9059,12 +9080,12 @@ function ch({ children: e }) {
9059
9080
  d(L), L || g(null);
9060
9081
  },
9061
9082
  placement: "bottom-end",
9062
- middleware: [no(8), _s(), Qs()],
9083
+ middleware: [oo(8), _s(), Qs()],
9063
9084
  whileElementsMounted: Ks
9064
9085
  }), f = zs(u), w = Gs(u, { outsidePressEvent: "mousedown" }), { getReferenceProps: b, getFloatingProps: S } = qs([
9065
9086
  f,
9066
9087
  w
9067
- ]), C = Cn(), p = () => {
9088
+ ]), C = An(), p = () => {
9068
9089
  t && (navigator.clipboard.writeText(t), h(!0), setTimeout(() => h(!1), 2e3));
9069
9090
  }, y = async () => {
9070
9091
  if (r)
@@ -9105,13 +9126,13 @@ function ch({ children: e }) {
9105
9126
  ), R = K.useMemo(
9106
9127
  () => l.filter((L) => !L.enabled || L.enabled(F)),
9107
9128
  [l, F]
9108
- ), U = m ? l.find((L) => L.key === m) : null, G = e || /* @__PURE__ */ $(ho, {}), X = K.cloneElement(
9129
+ ), U = m ? l.find((L) => L.key === m) : null, G = e || /* @__PURE__ */ $(po, {}), X = K.cloneElement(
9109
9130
  G,
9110
9131
  b({ ref: V.setReference })
9111
9132
  );
9112
9133
  return /* @__PURE__ */ re(et, { children: [
9113
9134
  X,
9114
- c && /* @__PURE__ */ $(ro, { children: /* @__PURE__ */ $(Vs, { context: u, modal: !1, children: /* @__PURE__ */ $("div", { "data-wallet-theme": !0, "data-wallet-ui": !0, "data-theme": P, children: /* @__PURE__ */ $(
9135
+ c && /* @__PURE__ */ $(no, { children: /* @__PURE__ */ $(Vs, { context: u, modal: !1, children: /* @__PURE__ */ $("div", { "data-wallet-theme": !0, "data-wallet-ui": !0, "data-theme": P, children: /* @__PURE__ */ $(
9115
9136
  "div",
9116
9137
  {
9117
9138
  ref: V.setFloating,
@@ -9159,7 +9180,7 @@ function ch({ children: e }) {
9159
9180
  /* @__PURE__ */ re(et, { children: [
9160
9181
  /* @__PURE__ */ re("div", { className: "flex items-center gap-3 mb-4", children: [
9161
9182
  /* @__PURE__ */ $("div", { className: "h-12 w-12 overflow-hidden", children: /* @__PURE__ */ $(
9162
- Ti,
9183
+ Pi,
9163
9184
  {
9164
9185
  nfd: I.data,
9165
9186
  alt: `${E || t} avatar`,
@@ -9180,10 +9201,10 @@ function ch({ children: e }) {
9180
9201
  ] }),
9181
9202
  /* @__PURE__ */ $("div", { className: "mb-4 bg-[var(--wui-color-bg-secondary)] rounded-lg p-3", children: /* @__PURE__ */ re("div", { className: "flex justify-between items-center", children: [
9182
9203
  H !== null && /* @__PURE__ */ re("span", { className: "text-base font-medium text-[var(--wui-color-text)] flex items-center gap-1", children: [
9183
- Bc(H, {
9204
+ Hc(H, {
9184
9205
  fractionDigits: 4
9185
9206
  }),
9186
- /* @__PURE__ */ $(lh, {})
9207
+ /* @__PURE__ */ $(ch, {})
9187
9208
  ] }),
9188
9209
  /* @__PURE__ */ re(
9189
9210
  "button",
@@ -9218,14 +9239,14 @@ function ch({ children: e }) {
9218
9239
  ] }) }),
9219
9240
  /* @__PURE__ */ $(hr, { slot: "after-balance", ctx: F }),
9220
9241
  r && r.accounts && r.accounts.length > 1 && /* @__PURE__ */ $("div", { className: "mb-4", children: /* @__PURE__ */ re(
9221
- ih,
9242
+ ah,
9222
9243
  {
9223
9244
  value: t || "",
9224
9245
  onChange: T,
9225
9246
  children: [
9226
- /* @__PURE__ */ $(na, { className: "block text-sm font-medium text-[var(--wui-color-text-secondary)] mb-1", children: "Select Account" }),
9247
+ /* @__PURE__ */ $(oa, { className: "block text-sm font-medium text-[var(--wui-color-text-secondary)] mb-1", children: "Select Account" }),
9227
9248
  /* @__PURE__ */ re("div", { className: "relative mt-1", children: [
9228
- /* @__PURE__ */ re(Ta, { className: "grid w-full cursor-default grid-cols-1 rounded-lg border border-[var(--wui-color-border)] bg-[var(--wui-color-bg-secondary)] py-2 px-3 text-left text-[var(--wui-color-text)] shadow-sm focus:outline-none focus:ring-2 focus:ring-[var(--wui-color-primary)] focus:border-transparent text-sm", children: [
9249
+ /* @__PURE__ */ re(Pa, { className: "grid w-full cursor-default grid-cols-1 rounded-lg border border-[var(--wui-color-border)] bg-[var(--wui-color-bg-secondary)] py-2 px-3 text-left text-[var(--wui-color-text)] shadow-sm focus:outline-none focus:ring-2 focus:ring-[var(--wui-color-primary)] focus:border-transparent text-sm", children: [
9229
9250
  /* @__PURE__ */ $("span", { className: "col-start-1 row-start-1 truncate pr-8", children: t ? gr(t, 6, 4) : "Select account" }),
9230
9251
  /* @__PURE__ */ $("span", { className: "col-start-1 row-start-1 self-center justify-self-end", children: /* @__PURE__ */ $(
9231
9252
  "svg",
@@ -9251,12 +9272,12 @@ function ch({ children: e }) {
9251
9272
  ) })
9252
9273
  ] }),
9253
9274
  /* @__PURE__ */ $(
9254
- Pa,
9275
+ Fa,
9255
9276
  {
9256
9277
  transition: !0,
9257
9278
  className: "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-[var(--wui-color-bg-secondary)] py-1 shadow-lg ring-1 ring-black/5 focus:outline-none text-sm data-[closed]:data-[leave]:opacity-0 data-[leave]:transition data-[leave]:duration-100 data-[leave]:ease-in",
9258
9279
  children: r.accounts.map((L) => /* @__PURE__ */ re(
9259
- Fa,
9280
+ Ra,
9260
9281
  {
9261
9282
  value: L.address,
9262
9283
  className: "group relative cursor-default select-none py-2 pl-3 pr-9 text-[var(--wui-color-text)] data-[focus]:bg-[var(--wui-color-bg-hover)] data-[focus]:outline-none",
@@ -9420,28 +9441,28 @@ function ch({ children: e }) {
9420
9441
  ) }) }) })
9421
9442
  ] });
9422
9443
  }
9423
- function uh(e) {
9444
+ function dh(e) {
9424
9445
  const { queryClient: t } = Nr();
9425
- return /* @__PURE__ */ $(uo, { client: t, children: /* @__PURE__ */ $(ch, { ...e }) });
9446
+ return /* @__PURE__ */ $(fo, { client: t, children: /* @__PURE__ */ $(uh, { ...e }) });
9426
9447
  }
9427
- function xh({ size: e, className: t, style: r }) {
9448
+ function Eh({ size: e, className: t, style: r }) {
9428
9449
  const { activeAddress: n } = Ot();
9429
- return n ? /* @__PURE__ */ $(uh, { children: /* @__PURE__ */ $(ho, { size: e, className: t, style: r }) }) : /* @__PURE__ */ $(Dc, { children: /* @__PURE__ */ $(io, { size: e, className: t, style: r }) });
9450
+ return n ? /* @__PURE__ */ $(dh, { children: /* @__PURE__ */ $(po, { size: e, className: t, style: r }) }) : /* @__PURE__ */ $(Lc, { children: /* @__PURE__ */ $(ao, { size: e, className: t, style: r }) });
9430
9451
  }
9431
- za();
9452
+ Ga();
9432
9453
  export {
9433
- io as ConnectWalletButton,
9434
- Dc as ConnectWalletMenu,
9435
- ho as ConnectedWalletButton,
9436
- uh as ConnectedWalletMenu,
9437
- Ti as NfdAvatar,
9438
- xh as WalletButton,
9439
- Mc as WalletList,
9440
- vh as WalletUIProvider,
9441
- ah as useAccountInfo,
9454
+ ao as ConnectWalletButton,
9455
+ Lc as ConnectWalletMenu,
9456
+ po as ConnectedWalletButton,
9457
+ dh as ConnectedWalletMenu,
9458
+ Pi as NfdAvatar,
9459
+ Eh as WalletButton,
9460
+ Dc as WalletList,
9461
+ bh as WalletUIProvider,
9462
+ lh as useAccountInfo,
9442
9463
  Ai as useNfd,
9443
9464
  rn as usePlugins,
9444
- xc as useResolvedTheme,
9465
+ Ec as useResolvedTheme,
9445
9466
  Nr as useWalletUI
9446
9467
  };
9447
9468
  //# sourceMappingURL=index.js.map