@box/box-ai-agent-selector 0.47.14 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,14 +13,14 @@ import Ei from "./hooks/useLocalStorageAIAgents.js";
13
13
  import Qe from "./messages.js";
14
14
  import { R as fn } from "../../chunks/types.js";
15
15
  import { ACTIONS as dr } from "./contexts/actions.js";
16
- import '../../styles/box-ai-agent-selector.css';var xi = Object.defineProperty, Pi = Object.defineProperties, Ii = Object.getOwnPropertyDescriptors, Wt = Object.getOwnPropertySymbols, Jr = Object.prototype.hasOwnProperty, Qr = Object.prototype.propertyIsEnumerable, pr = (e, t, r) => t in e ? xi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, _ = (e, t) => {
16
+ import '../../styles/box-ai-agent-selector.css';var xi = Object.defineProperty, Pi = Object.defineProperties, Ii = Object.getOwnPropertyDescriptors, Wt = Object.getOwnPropertySymbols, Jr = Object.prototype.hasOwnProperty, Qr = Object.prototype.propertyIsEnumerable, pr = (e, t, r) => t in e ? xi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, O = (e, t) => {
17
17
  for (var r in t || (t = {}))
18
18
  Jr.call(t, r) && pr(e, r, t[r]);
19
19
  if (Wt)
20
20
  for (var r of Wt(t))
21
21
  Qr.call(t, r) && pr(e, r, t[r]);
22
22
  return e;
23
- }, B = (e, t) => Pi(e, Ii(t)), J = (e, t) => {
23
+ }, $ = (e, t) => Pi(e, Ii(t)), J = (e, t) => {
24
24
  var r = {};
25
25
  for (var n in e)
26
26
  Jr.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
@@ -113,10 +113,10 @@ function Mi(e) {
113
113
  return !e || !Yr(e) ? !1 : "ref" in e.props || "ref" in e;
114
114
  }
115
115
  function ki(e) {
116
- return Mi(e) ? _({}, e.props).ref || e.ref : null;
116
+ return Mi(e) ? O({}, e.props).ref || e.ref : null;
117
117
  }
118
118
  function Vi(e, t) {
119
- const r = _({}, e);
119
+ const r = O({}, e);
120
120
  for (const n in t) {
121
121
  if (!Ne(t, n)) continue;
122
122
  if (n === "className") {
@@ -126,7 +126,7 @@ function Vi(e, t) {
126
126
  }
127
127
  if (n === "style") {
128
128
  const i = "style";
129
- r[i] = e[i] ? _(_({}, e[i]), t[i]) : t[i];
129
+ r[i] = e[i] ? O(O({}, e[i]), t[i]) : t[i];
130
130
  continue;
131
131
  }
132
132
  const o = t[n];
@@ -259,8 +259,8 @@ function so(e, t) {
259
259
  const r = e.map((o, i) => [i, o]);
260
260
  let n = !1;
261
261
  return r.sort(([o, i], [s, u]) => {
262
- const a = t(i), d = t(u);
263
- return a === d || !a || !d ? 0 : qi(a, d) ? (o > s && (n = !0), -1) : (o < s && (n = !0), 1);
262
+ const a = t(i), f = t(u);
263
+ return a === f || !a || !f ? 0 : qi(a, f) ? (o > s && (n = !0), -1) : (o < s && (n = !0), 1);
264
264
  }), n ? r.map(([o, i]) => i) : e;
265
265
  }
266
266
  function qi(e, t) {
@@ -345,7 +345,7 @@ function Ce(e, t, r, n = window) {
345
345
  s();
346
346
  };
347
347
  }
348
- var Vn = _({}, ce), gr = Vn.useId;
348
+ var Vn = O({}, ce), gr = Vn.useId;
349
349
  Vn.useDeferredValue;
350
350
  var hr = Vn.useInsertionEffect, ee = yt ? li : W;
351
351
  function Ji(e) {
@@ -416,8 +416,8 @@ function Zi(e, t, r) {
416
416
  const s = e && "current" in e ? e.current : e;
417
417
  if (!s) return;
418
418
  const u = () => {
419
- const d = s.getAttribute(t);
420
- i(d ?? n);
419
+ const f = s.getAttribute(t);
420
+ i(f ?? n);
421
421
  }, a = new MutationObserver(u);
422
422
  return a.observe(s, { attributeFilter: [t] }), u(), () => a.disconnect();
423
423
  }, [e, t, n]), o;
@@ -448,7 +448,7 @@ function le(e, t, r = []) {
448
448
  (o) => (e.wrapElement && (o = e.wrapElement(o)), t(o)),
449
449
  [...r, e.wrapElement]
450
450
  );
451
- return B(_({}, e), { wrapElement: n });
451
+ return $(O({}, e), { wrapElement: n });
452
452
  }
453
453
  function lo(e = !1, t) {
454
454
  const [r, n] = X(null);
@@ -456,7 +456,7 @@ function lo(e = !1, t) {
456
456
  }
457
457
  function fo(e, t, r) {
458
458
  const n = e.onLoadedMetadataCapture, o = He(() => Object.assign(() => {
459
- }, B(_({}, n), { [t]: r })), [n, t, r]);
459
+ }, $(O({}, n), { [t]: r })), [n, t, r]);
460
460
  return [n == null ? void 0 : n[t], { onLoadedMetadataCapture: o }];
461
461
  }
462
462
  function ts() {
@@ -476,7 +476,7 @@ function kt() {
476
476
  $n = !1;
477
477
  }
478
478
  function G(e) {
479
- const t = ce.forwardRef((r, n) => e(B(_({}, r), { ref: n })));
479
+ const t = ce.forwardRef((r, n) => e($(O({}, r), { ref: n })));
480
480
  return t.displayName = e.displayName || e.name, t;
481
481
  }
482
482
  function Bn(e, t) {
@@ -486,9 +486,9 @@ function Q(e, t) {
486
486
  const r = t, { wrapElement: n, render: o } = r, i = J(r, ["wrapElement", "render"]), s = de(t.ref, ki(o));
487
487
  let u;
488
488
  if (ce.isValidElement(o)) {
489
- const a = B(_({}, o.props), { ref: s });
489
+ const a = $(O({}, o.props), { ref: s });
490
490
  u = ce.cloneElement(o, Vi(i, a));
491
- } else o ? u = o(i) : u = /* @__PURE__ */ k(e, _({}, i));
491
+ } else o ? u = o(i) : u = /* @__PURE__ */ k(e, O({}, i));
492
492
  return n ? n(u) : u;
493
493
  }
494
494
  function Z(e) {
@@ -496,16 +496,16 @@ function Z(e) {
496
496
  return t.displayName = e.name, t;
497
497
  }
498
498
  function it(e = [], t = []) {
499
- const r = ce.createContext(void 0), n = ce.createContext(void 0), o = () => ce.useContext(r), i = (d = !1) => {
500
- const f = ce.useContext(n), c = o();
501
- return d ? f : f || c;
499
+ const r = ce.createContext(void 0), n = ce.createContext(void 0), o = () => ce.useContext(r), i = (f = !1) => {
500
+ const d = ce.useContext(n), c = o();
501
+ return f ? d : d || c;
502
502
  }, s = () => {
503
- const d = ce.useContext(n), f = o();
504
- if (!(d && d === f))
505
- return f;
506
- }, u = (d) => e.reduceRight(
507
- (f, c) => /* @__PURE__ */ k(c, B(_({}, d), { children: f })),
508
- /* @__PURE__ */ k(r.Provider, _({}, d))
503
+ const f = ce.useContext(n), d = o();
504
+ if (!(f && f === d))
505
+ return d;
506
+ }, u = (f) => e.reduceRight(
507
+ (d, c) => /* @__PURE__ */ k(c, $(O({}, f), { children: d })),
508
+ /* @__PURE__ */ k(r.Provider, O({}, f))
509
509
  );
510
510
  return {
511
511
  context: r,
@@ -514,9 +514,9 @@ function it(e = [], t = []) {
514
514
  useScopedContext: i,
515
515
  useProviderContext: s,
516
516
  ContextProvider: u,
517
- ScopedContextProvider: (d) => /* @__PURE__ */ k(u, B(_({}, d), { children: t.reduceRight(
518
- (f, c) => /* @__PURE__ */ k(c, B(_({}, d), { children: f })),
519
- /* @__PURE__ */ k(n.Provider, _({}, d))
517
+ ScopedContextProvider: (f) => /* @__PURE__ */ k(u, $(O({}, f), { children: t.reduceRight(
518
+ (d, c) => /* @__PURE__ */ k(c, $(O({}, f), { children: d })),
519
+ /* @__PURE__ */ k(n.Provider, O({}, f))
520
520
  ) }))
521
521
  };
522
522
  }
@@ -561,23 +561,23 @@ function St(e, t) {
561
561
  }
562
562
  function Ke(e, ...t) {
563
563
  let r = e, n = r, o = Symbol(), i = Kt;
564
- const s = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), p = (A) => (a.add(A), () => a.delete(A)), b = () => {
565
- const A = s.size, S = Symbol();
566
- s.add(S);
564
+ const s = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), p = (A) => (a.add(A), () => a.delete(A)), b = () => {
565
+ const A = s.size, w = Symbol();
566
+ s.add(w);
567
567
  const T = () => {
568
- s.delete(S), !s.size && i();
568
+ s.delete(w), !s.size && i();
569
569
  };
570
570
  if (A) return T;
571
- const N = Ni(r).map(
571
+ const F = Ni(r).map(
572
572
  (L) => Te(
573
573
  ...t.map((D) => {
574
- var h;
575
- const F = (h = D == null ? void 0 : D.getState) == null ? void 0 : h.call(D);
576
- if (F && Ne(F, L))
577
- return $e(D, [L], (R) => {
578
- C(
574
+ var y;
575
+ const R = (y = D == null ? void 0 : D.getState) == null ? void 0 : y.call(D);
576
+ if (R && Ne(R, L))
577
+ return $e(D, [L], (B) => {
578
+ I(
579
579
  L,
580
- R[L],
580
+ B[L],
581
581
  // @ts-expect-error - Not public API. This is just to prevent
582
582
  // infinite loops.
583
583
  !0
@@ -585,54 +585,54 @@ function Ke(e, ...t) {
585
585
  });
586
586
  })
587
587
  )
588
- ), M = [];
588
+ ), N = [];
589
589
  for (const L of a)
590
- M.push(L());
591
- const I = t.map(Un);
592
- return i = Te(...N, ...M, ...I), T;
593
- }, v = (A, S, T = d) => (T.add(S), l.set(S, A), () => {
594
- var N;
595
- (N = c.get(S)) == null || N(), c.delete(S), l.delete(S), T.delete(S);
596
- }), x = (A, S) => v(A, S), w = (A, S) => (c.set(S, S(r, r)), v(A, S)), P = (A, S) => (c.set(S, S(r, n)), v(A, S, f)), g = (A) => Ke(Fi(r, A), O), m = (A) => Ke(Ri(r, A), O), y = () => r, C = (A, S, T = !1) => {
597
- var N;
590
+ N.push(L());
591
+ const C = t.map(Un);
592
+ return i = Te(...F, ...N, ...C), T;
593
+ }, v = (A, w, T = f) => (T.add(w), l.set(w, A), () => {
594
+ var F;
595
+ (F = c.get(w)) == null || F(), c.delete(w), l.delete(w), T.delete(w);
596
+ }), E = (A, w) => v(A, w), x = (A, w) => (c.set(w, w(r, r)), v(A, w)), P = (A, w) => (c.set(w, w(r, n)), v(A, w, d)), g = (A) => Ke(Fi(r, A), _), m = (A) => Ke(Ri(r, A), _), S = () => r, I = (A, w, T = !1) => {
597
+ var F;
598
598
  if (!Ne(r, A)) return;
599
- const M = Di(S, r[A]);
600
- if (M === r[A]) return;
599
+ const N = Di(w, r[A]);
600
+ if (N === r[A]) return;
601
601
  if (!T)
602
- for (const h of t)
603
- (N = h == null ? void 0 : h.setState) == null || N.call(h, A, M);
604
- const I = r;
605
- r = ve(te({}, r), { [A]: M });
602
+ for (const y of t)
603
+ (F = y == null ? void 0 : y.setState) == null || F.call(y, A, N);
604
+ const C = r;
605
+ r = ve(te({}, r), { [A]: N });
606
606
  const L = Symbol();
607
607
  o = L, u.add(A);
608
- const D = (h, F, R) => {
609
- var E;
610
- const V = l.get(h), K = (H) => R ? R.has(H) : H === A;
611
- (!V || V.some(K)) && ((E = c.get(h)) == null || E(), c.set(h, h(r, F)));
608
+ const D = (y, R, B) => {
609
+ var h;
610
+ const M = l.get(y), K = (H) => B ? B.has(H) : H === A;
611
+ (!M || M.some(K)) && ((h = c.get(y)) == null || h(), c.set(y, y(r, R)));
612
612
  };
613
- for (const h of d)
614
- D(h, I);
613
+ for (const y of f)
614
+ D(y, C);
615
615
  queueMicrotask(() => {
616
616
  if (o !== L) return;
617
- const h = r;
618
- for (const F of f)
619
- D(F, n, u);
620
- n = h, u.clear();
617
+ const y = r;
618
+ for (const R of d)
619
+ D(R, n, u);
620
+ n = y, u.clear();
621
621
  });
622
- }, O = {
623
- getState: y,
624
- setState: C,
622
+ }, _ = {
623
+ getState: S,
624
+ setState: I,
625
625
  __unstableInternals: {
626
626
  setup: p,
627
627
  init: b,
628
- subscribe: x,
629
- sync: w,
628
+ subscribe: E,
629
+ sync: x,
630
630
  batch: P,
631
631
  pick: g,
632
632
  omit: m
633
633
  }
634
634
  };
635
- return O;
635
+ return _;
636
636
  }
637
637
  function Oe(e, ...t) {
638
638
  if (e)
@@ -719,12 +719,12 @@ function ys() {
719
719
  }
720
720
  var r = typeof Object.is == "function" ? Object.is : t, n = e.useState, o = e.useEffect, i = e.useLayoutEffect, s = e.useDebugValue;
721
721
  function u(c, l) {
722
- var p = l(), b = n({ inst: { value: p, getSnapshot: l } }), v = b[0].inst, x = b[1];
722
+ var p = l(), b = n({ inst: { value: p, getSnapshot: l } }), v = b[0].inst, E = b[1];
723
723
  return i(function() {
724
- v.value = p, v.getSnapshot = l, a(v) && x({ inst: v });
724
+ v.value = p, v.getSnapshot = l, a(v) && E({ inst: v });
725
725
  }, [c, p, l]), o(function() {
726
- return a(v) && x({ inst: v }), c(function() {
727
- a(v) && x({ inst: v });
726
+ return a(v) && E({ inst: v }), c(function() {
727
+ a(v) && E({ inst: v });
728
728
  });
729
729
  }, [c]), s(p), p;
730
730
  }
@@ -738,11 +738,11 @@ function ys() {
738
738
  return !0;
739
739
  }
740
740
  }
741
- function d(c, l) {
741
+ function f(c, l) {
742
742
  return l();
743
743
  }
744
- var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : u;
745
- return dn.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, dn;
744
+ var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : u;
745
+ return dn.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : d, dn;
746
746
  }
747
747
  var pn = {};
748
748
  /**
@@ -761,17 +761,17 @@ function Ss() {
761
761
  var e = Gr, t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
762
762
  function r(g) {
763
763
  {
764
- for (var m = arguments.length, y = new Array(m > 1 ? m - 1 : 0), C = 1; C < m; C++)
765
- y[C - 1] = arguments[C];
766
- n("error", g, y);
764
+ for (var m = arguments.length, S = new Array(m > 1 ? m - 1 : 0), I = 1; I < m; I++)
765
+ S[I - 1] = arguments[I];
766
+ n("error", g, S);
767
767
  }
768
768
  }
769
- function n(g, m, y) {
769
+ function n(g, m, S) {
770
770
  {
771
- var C = t.ReactDebugCurrentFrame, O = C.getStackAddendum();
772
- O !== "" && (m += "%s", y = y.concat([O]));
773
- var A = y.map(function(S) {
774
- return String(S);
771
+ var I = t.ReactDebugCurrentFrame, _ = I.getStackAddendum();
772
+ _ !== "" && (m += "%s", S = S.concat([_]));
773
+ var A = S.map(function(w) {
774
+ return String(w);
775
775
  });
776
776
  A.unshift("Warning: " + m), Function.prototype.apply.call(console[g], console, A);
777
777
  }
@@ -779,49 +779,49 @@ function Ss() {
779
779
  function o(g, m) {
780
780
  return g === m && (g !== 0 || 1 / g === 1 / m) || g !== g && m !== m;
781
781
  }
782
- var i = typeof Object.is == "function" ? Object.is : o, s = e.useState, u = e.useEffect, a = e.useLayoutEffect, d = e.useDebugValue, f = !1, c = !1;
783
- function l(g, m, y) {
784
- f || e.startTransition !== void 0 && (f = !0, r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
785
- var C = m();
782
+ var i = typeof Object.is == "function" ? Object.is : o, s = e.useState, u = e.useEffect, a = e.useLayoutEffect, f = e.useDebugValue, d = !1, c = !1;
783
+ function l(g, m, S) {
784
+ d || e.startTransition !== void 0 && (d = !0, r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
785
+ var I = m();
786
786
  if (!c) {
787
- var O = m();
788
- i(C, O) || (r("The result of getSnapshot should be cached to avoid an infinite loop"), c = !0);
787
+ var _ = m();
788
+ i(I, _) || (r("The result of getSnapshot should be cached to avoid an infinite loop"), c = !0);
789
789
  }
790
790
  var A = s({
791
791
  inst: {
792
- value: C,
792
+ value: I,
793
793
  getSnapshot: m
794
794
  }
795
- }), S = A[0].inst, T = A[1];
795
+ }), w = A[0].inst, T = A[1];
796
796
  return a(function() {
797
- S.value = C, S.getSnapshot = m, p(S) && T({
798
- inst: S
797
+ w.value = I, w.getSnapshot = m, p(w) && T({
798
+ inst: w
799
799
  });
800
- }, [g, C, m]), u(function() {
801
- p(S) && T({
802
- inst: S
800
+ }, [g, I, m]), u(function() {
801
+ p(w) && T({
802
+ inst: w
803
803
  });
804
- var N = function() {
805
- p(S) && T({
806
- inst: S
804
+ var F = function() {
805
+ p(w) && T({
806
+ inst: w
807
807
  });
808
808
  };
809
- return g(N);
810
- }, [g]), d(C), C;
809
+ return g(F);
810
+ }, [g]), f(I), I;
811
811
  }
812
812
  function p(g) {
813
- var m = g.getSnapshot, y = g.value;
813
+ var m = g.getSnapshot, S = g.value;
814
814
  try {
815
- var C = m();
816
- return !i(y, C);
815
+ var I = m();
816
+ return !i(S, I);
817
817
  } catch {
818
818
  return !0;
819
819
  }
820
820
  }
821
- function b(g, m, y) {
821
+ function b(g, m, S) {
822
822
  return m();
823
823
  }
824
- var v = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", x = !v, w = x ? b : l, P = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : w;
824
+ var v = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", E = !v, x = E ? b : l, P = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : x;
825
825
  pn.useSyncExternalStore = P, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
826
826
  }()), pn;
827
827
  }
@@ -853,26 +853,26 @@ function ho(e, t) {
853
853
  let s = !1;
854
854
  const u = r.current;
855
855
  for (const a in t) {
856
- const d = t[a];
857
- if (typeof d == "function") {
858
- const f = d(i);
859
- f !== u[a] && (u[a] = f, s = !0);
856
+ const f = t[a];
857
+ if (typeof f == "function") {
858
+ const d = f(i);
859
+ d !== u[a] && (u[a] = d, s = !0);
860
860
  }
861
- if (typeof d == "string") {
862
- if (!i || !Ne(i, d)) continue;
863
- const f = i[d];
864
- f !== u[a] && (u[a] = f, s = !0);
861
+ if (typeof f == "string") {
862
+ if (!i || !Ne(i, f)) continue;
863
+ const d = i[f];
864
+ d !== u[a] && (u[a] = d, s = !0);
865
865
  }
866
866
  }
867
- return s && (r.current = _({}, u)), r.current;
867
+ return s && (r.current = O({}, u)), r.current;
868
868
  };
869
869
  return vo(n, o, o);
870
870
  }
871
871
  function pe(e, t, r, n) {
872
872
  const o = Ne(t, r) ? t[r] : void 0, i = n ? t[n] : void 0, s = Qi({ value: o, setValue: i });
873
873
  ee(() => $e(e, [r], (u, a) => {
874
- const { value: d, setValue: f } = s.current;
875
- f && u[r] !== a[r] && u[r] !== d && f(u[r]);
874
+ const { value: f, setValue: d } = s.current;
875
+ d && u[r] !== a[r] && u[r] !== f && d(u[r]);
876
876
  }), [e, r]), ee(() => {
877
877
  if (o !== void 0)
878
878
  return e.setState(r, o), zt(e, [r], () => {
@@ -887,10 +887,10 @@ function Xn(e, t) {
887
887
  (u) => _e(r, u),
888
888
  [r]
889
889
  ), i = ce.useMemo(
890
- () => B(_({}, r), { useState: o }),
890
+ () => $(O({}, r), { useState: o }),
891
891
  [r, o]
892
892
  ), s = U(() => {
893
- n((u) => e(_(_({}, t), u.getState())));
893
+ n((u) => e(O(O({}, t), u.getState())));
894
894
  });
895
895
  return [i, s];
896
896
  }
@@ -922,7 +922,7 @@ function Is(e = {}) {
922
922
  }, s = Ps(e.store), u = Ke(
923
923
  { items: n, renderedItems: i.renderedItems },
924
924
  s
925
- ), a = Ke(i, e.store), d = (l) => {
925
+ ), a = Ke(i, e.store), f = (l) => {
926
926
  const p = so(l, (b) => b.element);
927
927
  u.setState("renderedItems", p), a.setState("renderedItems", p);
928
928
  };
@@ -931,7 +931,7 @@ function Is(e = {}) {
931
931
  })), Oe(u, () => zt(u, ["renderedItems"], (l) => {
932
932
  let p = !0, b = requestAnimationFrame(() => {
933
933
  const { renderedItems: P } = a.getState();
934
- l.renderedItems !== P && d(l.renderedItems);
934
+ l.renderedItems !== P && f(l.renderedItems);
935
935
  });
936
936
  if (typeof IntersectionObserver != "function")
937
937
  return () => cancelAnimationFrame(b);
@@ -940,36 +940,36 @@ function Is(e = {}) {
940
940
  p = !1;
941
941
  return;
942
942
  }
943
- cancelAnimationFrame(b), b = requestAnimationFrame(() => d(l.renderedItems));
944
- }, x = xs(l.renderedItems), w = new IntersectionObserver(v, { root: x });
943
+ cancelAnimationFrame(b), b = requestAnimationFrame(() => f(l.renderedItems));
944
+ }, E = xs(l.renderedItems), x = new IntersectionObserver(v, { root: E });
945
945
  for (const P of l.renderedItems)
946
- P.element && w.observe(P.element);
946
+ P.element && x.observe(P.element);
947
947
  return () => {
948
- cancelAnimationFrame(b), w.disconnect();
948
+ cancelAnimationFrame(b), x.disconnect();
949
949
  };
950
950
  }));
951
- const f = (l, p, b = !1) => {
951
+ const d = (l, p, b = !1) => {
952
952
  let v;
953
- return p((w) => {
954
- const P = w.findIndex(({ id: m }) => m === l.id), g = w.slice();
953
+ return p((x) => {
954
+ const P = x.findIndex(({ id: m }) => m === l.id), g = x.slice();
955
955
  if (P !== -1) {
956
- v = w[P];
956
+ v = x[P];
957
957
  const m = te(te({}, v), l);
958
958
  g[P] = m, o.set(l.id, m);
959
959
  } else
960
960
  g.push(l), o.set(l.id, l);
961
961
  return g;
962
962
  }), () => {
963
- p((w) => {
963
+ p((x) => {
964
964
  if (!v)
965
- return b && o.delete(l.id), w.filter(({ id: m }) => m !== l.id);
966
- const P = w.findIndex(({ id: m }) => m === l.id);
967
- if (P === -1) return w;
968
- const g = w.slice();
965
+ return b && o.delete(l.id), x.filter(({ id: m }) => m !== l.id);
966
+ const P = x.findIndex(({ id: m }) => m === l.id);
967
+ if (P === -1) return x;
968
+ const g = x.slice();
969
969
  return g[P] = v, o.set(l.id, v), g;
970
970
  });
971
971
  };
972
- }, c = (l) => f(
972
+ }, c = (l) => d(
973
973
  l,
974
974
  (p) => u.setState("items", p),
975
975
  !0
@@ -978,7 +978,7 @@ function Is(e = {}) {
978
978
  registerItem: c,
979
979
  renderItem: (l) => Te(
980
980
  c(l),
981
- f(
981
+ d(
982
982
  l,
983
983
  (p) => u.setState("renderedItems", p)
984
984
  )
@@ -1119,64 +1119,64 @@ function Rs(e = {}) {
1119
1119
  Oe(
1120
1120
  s,
1121
1121
  () => $e(s, ["renderedItems", "activeId"], (a) => {
1122
- s.setState("activeId", (d) => {
1123
- var f;
1124
- return d !== void 0 ? d : (f = ke(a.renderedItems)) == null ? void 0 : f.id;
1122
+ s.setState("activeId", (f) => {
1123
+ var d;
1124
+ return f !== void 0 ? f : (d = ke(a.renderedItems)) == null ? void 0 : d.id;
1125
1125
  });
1126
1126
  })
1127
1127
  );
1128
- const u = (a = "next", d = {}) => {
1129
- var f, c;
1128
+ const u = (a = "next", f = {}) => {
1129
+ var d, c;
1130
1130
  const l = s.getState(), {
1131
1131
  skip: p = 0,
1132
1132
  activeId: b = l.activeId,
1133
1133
  focusShift: v = l.focusShift,
1134
- focusLoop: x = l.focusLoop,
1135
- focusWrap: w = l.focusWrap,
1134
+ focusLoop: E = l.focusLoop,
1135
+ focusWrap: x = l.focusWrap,
1136
1136
  includesBaseElement: P = l.includesBaseElement,
1137
1137
  renderedItems: g = l.renderedItems,
1138
1138
  rtl: m = l.rtl
1139
- } = d, y = a === "up" || a === "down", C = a === "next" || a === "down", O = C ? m && !y : !m || y, A = v && !p;
1140
- let S = y ? yo(
1139
+ } = f, S = a === "up" || a === "down", I = a === "next" || a === "down", _ = I ? m && !S : !m || S, A = v && !p;
1140
+ let w = S ? yo(
1141
1141
  Ts(So(g), b, A)
1142
1142
  ) : g;
1143
- if (S = O ? Pn(S) : S, S = y ? Ls(S) : S, b == null)
1144
- return (f = ke(S)) == null ? void 0 : f.id;
1145
- const T = S.find((E) => E.id === b);
1143
+ if (w = _ ? Pn(w) : w, w = S ? Ls(w) : w, b == null)
1144
+ return (d = ke(w)) == null ? void 0 : d.id;
1145
+ const T = w.find((h) => h.id === b);
1146
1146
  if (!T)
1147
- return (c = ke(S)) == null ? void 0 : c.id;
1148
- const N = S.some((E) => E.rowId), M = S.indexOf(T), I = S.slice(M + 1), L = Er(I, T.rowId);
1147
+ return (c = ke(w)) == null ? void 0 : c.id;
1148
+ const F = w.some((h) => h.rowId), N = w.indexOf(T), C = w.slice(N + 1), L = Er(C, T.rowId);
1149
1149
  if (p) {
1150
- const E = _s(L, b), V = E.slice(p)[0] || // If we can't find an item, just return the last one.
1151
- E[E.length - 1];
1152
- return V == null ? void 0 : V.id;
1150
+ const h = _s(L, b), M = h.slice(p)[0] || // If we can't find an item, just return the last one.
1151
+ h[h.length - 1];
1152
+ return M == null ? void 0 : M.id;
1153
1153
  }
1154
- const D = x && (y ? x !== "horizontal" : x !== "vertical"), h = N && w && (y ? w !== "horizontal" : w !== "vertical"), F = C ? (!N || y) && D && P : y ? P : !1;
1154
+ const D = E && (S ? E !== "horizontal" : E !== "vertical"), y = F && x && (S ? x !== "horizontal" : x !== "vertical"), R = I ? (!F || S) && D && P : S ? P : !1;
1155
1155
  if (D) {
1156
- const E = h && !F ? S : Er(S, T.rowId), V = Ds(E, b, F), K = ke(V, b);
1156
+ const h = y && !R ? w : Er(w, T.rowId), M = Ds(h, b, R), K = ke(M, b);
1157
1157
  return K == null ? void 0 : K.id;
1158
1158
  }
1159
- if (h) {
1160
- const E = ke(
1159
+ if (y) {
1160
+ const h = ke(
1161
1161
  // We can use nextItems, which contains all the next items, including
1162
1162
  // items from other rows, to wrap between rows. However, if there is a
1163
1163
  // null item (the composite container), we'll only use the next items in
1164
1164
  // the row. So moving next from the last item will focus on the
1165
1165
  // composite container. On grid composites, horizontal navigation never
1166
1166
  // focuses on the composite container, only vertical.
1167
- F ? L : I,
1167
+ R ? L : C,
1168
1168
  b
1169
1169
  );
1170
- return F ? (E == null ? void 0 : E.id) || null : E == null ? void 0 : E.id;
1170
+ return R ? (h == null ? void 0 : h.id) || null : h == null ? void 0 : h.id;
1171
1171
  }
1172
- const R = ke(L, b);
1173
- return !R && F ? null : R == null ? void 0 : R.id;
1172
+ const B = ke(L, b);
1173
+ return !B && R ? null : B == null ? void 0 : B.id;
1174
1174
  };
1175
1175
  return ve(te(te({}, n), s), {
1176
1176
  setBaseElement: (a) => s.setState("baseElement", a),
1177
1177
  setActiveId: (a) => s.setState("activeId", a),
1178
1178
  move: (a) => {
1179
- a !== void 0 && (s.setState("activeId", a), s.setState("moves", (d) => d + 1));
1179
+ a !== void 0 && (s.setState("activeId", a), s.setState("moves", (f) => f + 1));
1180
1180
  },
1181
1181
  first: () => {
1182
1182
  var a;
@@ -1194,7 +1194,7 @@ function Rs(e = {}) {
1194
1194
  }
1195
1195
  function Fs(e) {
1196
1196
  const t = ot(e.id);
1197
- return _({ id: t }, e);
1197
+ return O({ id: t }, e);
1198
1198
  }
1199
1199
  function Ns(e, t, r) {
1200
1200
  return e = Cs(e, t, r), pe(e, r, "activeId", "setActiveId"), pe(e, r, "includesBaseElement"), pe(e, r, "virtualFocus"), pe(e, r, "orientation"), pe(e, r, "rtl"), pe(e, r, "focusLoop"), pe(e, r, "focusWrap"), pe(e, r, "focusShift"), e;
@@ -1289,12 +1289,12 @@ function Vs(e = {}) {
1289
1289
  popoverElement: z(i == null ? void 0 : i.popoverElement, null),
1290
1290
  arrowElement: z(i == null ? void 0 : i.arrowElement, null),
1291
1291
  rendered: Symbol("rendered")
1292
- }), d = Ke(a, s, o);
1293
- return ve(te(te({}, s), d), {
1294
- setAnchorElement: (f) => d.setState("anchorElement", f),
1295
- setPopoverElement: (f) => d.setState("popoverElement", f),
1296
- setArrowElement: (f) => d.setState("arrowElement", f),
1297
- render: () => d.setState("rendered", Symbol("rendered"))
1292
+ }), f = Ke(a, s, o);
1293
+ return ve(te(te({}, s), f), {
1294
+ setAnchorElement: (d) => f.setState("anchorElement", d),
1295
+ setPopoverElement: (d) => f.setState("popoverElement", d),
1296
+ setArrowElement: (d) => f.setState("arrowElement", d),
1297
+ render: () => f.setState("rendered", Symbol("rendered"))
1298
1298
  });
1299
1299
  }
1300
1300
  function $s(e, t, r) {
@@ -1351,7 +1351,7 @@ function Bs(e = {}) {
1351
1351
  i.placement,
1352
1352
  "bottom-start"
1353
1353
  )
1354
- })), a = new String(""), d = ve(te(te({}, s.getState()), u.getState()), {
1354
+ })), a = new String(""), f = ve(te(te({}, s.getState()), u.getState()), {
1355
1355
  value: z(
1356
1356
  n.value,
1357
1357
  i.value,
@@ -1366,51 +1366,51 @@ function Bs(e = {}) {
1366
1366
  labelElement: z(i.labelElement, null),
1367
1367
  selectElement: z(i.selectElement, null),
1368
1368
  listElement: z(i.listElement, null)
1369
- }), f = Ke(d, s, u, o);
1369
+ }), d = Ke(f, s, u, o);
1370
1370
  return Oe(
1371
- f,
1372
- () => $e(f, ["value", "items"], (c) => {
1371
+ d,
1372
+ () => $e(d, ["value", "items"], (c) => {
1373
1373
  if (c.value !== a || !c.items.length) return;
1374
1374
  const l = c.items.find(
1375
1375
  (p) => !p.disabled && p.value != null
1376
1376
  );
1377
- (l == null ? void 0 : l.value) != null && f.setState("value", l.value);
1377
+ (l == null ? void 0 : l.value) != null && d.setState("value", l.value);
1378
1378
  })
1379
1379
  ), Oe(
1380
- f,
1381
- () => $e(f, ["mounted"], (c) => {
1382
- c.mounted || f.setState("activeId", d.activeId);
1380
+ d,
1381
+ () => $e(d, ["mounted"], (c) => {
1382
+ c.mounted || d.setState("activeId", f.activeId);
1383
1383
  })
1384
1384
  ), Oe(
1385
- f,
1386
- () => $e(f, ["mounted", "items", "value"], (c) => {
1385
+ d,
1386
+ () => $e(d, ["mounted", "items", "value"], (c) => {
1387
1387
  if (r || c.mounted) return;
1388
1388
  const l = bo(c.value), p = l[l.length - 1];
1389
1389
  if (p == null) return;
1390
1390
  const b = c.items.find(
1391
1391
  (v) => !v.disabled && v.value === p
1392
1392
  );
1393
- b && f.setState("activeId", b.id);
1393
+ b && d.setState("activeId", b.id);
1394
1394
  })
1395
1395
  ), Oe(
1396
- f,
1397
- () => zt(f, ["setValueOnMove", "moves"], (c) => {
1398
- const { mounted: l, value: p, activeId: b } = f.getState();
1396
+ d,
1397
+ () => zt(d, ["setValueOnMove", "moves"], (c) => {
1398
+ const { mounted: l, value: p, activeId: b } = d.getState();
1399
1399
  if (!c.setValueOnMove && l || Array.isArray(p) || !c.moves || !b) return;
1400
1400
  const v = s.item(b);
1401
- !v || v.disabled || v.value == null || f.setState("value", v.value);
1401
+ !v || v.disabled || v.value == null || d.setState("value", v.value);
1402
1402
  })
1403
- ), ve(te(te(te({}, s), u), f), {
1403
+ ), ve(te(te(te({}, s), u), d), {
1404
1404
  combobox: r,
1405
- setValue: (c) => f.setState("value", c),
1406
- setLabelElement: (c) => f.setState("labelElement", c),
1407
- setSelectElement: (c) => f.setState("selectElement", c),
1408
- setListElement: (c) => f.setState("listElement", c)
1405
+ setValue: (c) => d.setState("value", c),
1406
+ setLabelElement: (c) => d.setState("labelElement", c),
1407
+ setSelectElement: (c) => d.setState("selectElement", c),
1408
+ setListElement: (c) => d.setState("listElement", c)
1409
1409
  });
1410
1410
  }
1411
1411
  function Ks(e) {
1412
1412
  const t = hs();
1413
- return e = B(_({}, e), {
1413
+ return e = $(O({}, e), {
1414
1414
  combobox: e.combobox !== void 0 ? e.combobox : t
1415
1415
  }), Fs(e);
1416
1416
  }
@@ -1620,95 +1620,95 @@ var on = Z(
1620
1620
  n && (Ce("mousedown", lu, !0), Ce("keydown", fu, !0));
1621
1621
  }, [n]), Ir && W(() => {
1622
1622
  if (!n) return;
1623
- const h = a.current;
1624
- if (!h || !Or(h)) return;
1625
- const F = su(h);
1626
- if (!F) return;
1627
- const R = () => queueMicrotask(() => h.focus());
1628
- for (const E of F)
1629
- E.addEventListener("mouseup", R);
1623
+ const y = a.current;
1624
+ if (!y || !Or(y)) return;
1625
+ const R = su(y);
1626
+ if (!R) return;
1627
+ const B = () => queueMicrotask(() => y.focus());
1628
+ for (const h of R)
1629
+ h.addEventListener("mouseup", B);
1630
1630
  return () => {
1631
- for (const E of F)
1632
- E.removeEventListener("mouseup", R);
1631
+ for (const h of R)
1632
+ h.removeEventListener("mouseup", B);
1633
1633
  };
1634
1634
  }, [n]);
1635
- const d = n && Xt(u), f = !!d && !o, [c, l] = X(!1);
1635
+ const f = n && Xt(u), d = !!f && !o, [c, l] = X(!1);
1636
1636
  W(() => {
1637
- n && f && c && l(!1);
1638
- }, [n, f, c]), W(() => {
1637
+ n && d && c && l(!1);
1638
+ }, [n, d, c]), W(() => {
1639
1639
  if (!n || !c) return;
1640
- const h = a.current;
1641
- if (!h || typeof IntersectionObserver > "u") return;
1642
- const F = new IntersectionObserver(() => {
1643
- De(h) || l(!1);
1640
+ const y = a.current;
1641
+ if (!y || typeof IntersectionObserver > "u") return;
1642
+ const R = new IntersectionObserver(() => {
1643
+ De(y) || l(!1);
1644
1644
  });
1645
- return F.observe(h), () => F.disconnect();
1645
+ return R.observe(y), () => R.disconnect();
1646
1646
  }, [n, c]);
1647
1647
  const p = vn(
1648
1648
  u.onKeyPressCapture,
1649
- d
1649
+ f
1650
1650
  ), b = vn(
1651
1651
  u.onMouseDownCapture,
1652
- d
1653
- ), v = vn(u.onClickCapture, d), x = u.onMouseDown, w = U((h) => {
1654
- if (x == null || x(h), h.defaultPrevented || !n) return;
1655
- const F = h.currentTarget;
1656
- if (!Ir || uo(h) || !Xe(F) && !Or(F)) return;
1657
- let R = !1;
1658
- const E = () => {
1659
- R = !0;
1660
- }, V = { capture: !0, once: !0 };
1661
- F.addEventListener("focusin", E, V);
1662
- const K = Js(F.parentElement);
1663
- Cr(K, !0), vt(F, "mouseup", () => {
1664
- F.removeEventListener("focusin", E, !0), Cr(K, !1), !R && Ao(F);
1652
+ f
1653
+ ), v = vn(u.onClickCapture, f), E = u.onMouseDown, x = U((y) => {
1654
+ if (E == null || E(y), y.defaultPrevented || !n) return;
1655
+ const R = y.currentTarget;
1656
+ if (!Ir || uo(y) || !Xe(R) && !Or(R)) return;
1657
+ let B = !1;
1658
+ const h = () => {
1659
+ B = !0;
1660
+ }, M = { capture: !0, once: !0 };
1661
+ R.addEventListener("focusin", h, M);
1662
+ const K = Js(R.parentElement);
1663
+ Cr(K, !0), vt(R, "mouseup", () => {
1664
+ R.removeEventListener("focusin", h, !0), Cr(K, !1), !B && Ao(R);
1665
1665
  });
1666
- }), P = (h, F) => {
1667
- if (F && (h.currentTarget = F), !n) return;
1668
- const R = h.currentTarget;
1669
- R && Ut(R) && (s == null || s(h), !h.defaultPrevented && (R.dataset.focusVisible = "true", l(!0)));
1670
- }, g = u.onKeyDownCapture, m = U((h) => {
1671
- if (g == null || g(h), h.defaultPrevented || !n || c || h.metaKey || h.altKey || h.ctrlKey || !me(h)) return;
1672
- const F = h.currentTarget;
1673
- vt(F, "focusout", () => P(h, F));
1674
- }), y = u.onFocusCapture, C = U((h) => {
1675
- if (y == null || y(h), h.defaultPrevented || !n) return;
1676
- if (!me(h)) {
1666
+ }), P = (y, R) => {
1667
+ if (R && (y.currentTarget = R), !n) return;
1668
+ const B = y.currentTarget;
1669
+ B && Ut(B) && (s == null || s(y), !y.defaultPrevented && (B.dataset.focusVisible = "true", l(!0)));
1670
+ }, g = u.onKeyDownCapture, m = U((y) => {
1671
+ if (g == null || g(y), y.defaultPrevented || !n || c || y.metaKey || y.altKey || y.ctrlKey || !me(y)) return;
1672
+ const R = y.currentTarget;
1673
+ vt(R, "focusout", () => P(y, R));
1674
+ }), S = u.onFocusCapture, I = U((y) => {
1675
+ if (S == null || S(y), y.defaultPrevented || !n) return;
1676
+ if (!me(y)) {
1677
1677
  l(!1);
1678
1678
  return;
1679
1679
  }
1680
- const F = h.currentTarget, R = () => P(h, F);
1681
- Zn || iu(h.target) ? vt(h.target, "focusout", R) : l(!1);
1682
- }), O = u.onBlur, A = U((h) => {
1683
- O == null || O(h), n && pt(h) && l(!1);
1684
- }), S = et(_o), T = U((h) => {
1685
- n && i && h && S && queueMicrotask(() => {
1686
- Ut(h) || De(h) && h.focus();
1680
+ const R = y.currentTarget, B = () => P(y, R);
1681
+ Zn || iu(y.target) ? vt(y.target, "focusout", B) : l(!1);
1682
+ }), _ = u.onBlur, A = U((y) => {
1683
+ _ == null || _(y), n && pt(y) && l(!1);
1684
+ }), w = et(_o), T = U((y) => {
1685
+ n && i && y && w && queueMicrotask(() => {
1686
+ Ut(y) || De(y) && y.focus();
1687
1687
  });
1688
- }), N = co(a), M = n && uu(N), I = n && au(N), L = u.style, D = He(() => f ? _({ pointerEvents: "none" }, L) : L, [f, L]);
1689
- return u = B(_({
1688
+ }), F = co(a), N = n && uu(F), C = n && au(F), L = u.style, D = He(() => d ? O({ pointerEvents: "none" }, L) : L, [d, L]);
1689
+ return u = $(O({
1690
1690
  "data-focus-visible": n && c || void 0,
1691
1691
  "data-autofocus": i || void 0,
1692
- "aria-disabled": d || void 0
1692
+ "aria-disabled": f || void 0
1693
1693
  }, u), {
1694
1694
  ref: de(a, T, u.ref),
1695
1695
  style: D,
1696
1696
  tabIndex: cu(
1697
1697
  n,
1698
- f,
1699
- M,
1700
- I,
1698
+ d,
1699
+ N,
1700
+ C,
1701
1701
  u.tabIndex
1702
1702
  ),
1703
- disabled: I && f ? !0 : void 0,
1703
+ disabled: C && d ? !0 : void 0,
1704
1704
  // TODO: Test Focusable contentEditable.
1705
- contentEditable: d ? void 0 : u.contentEditable,
1705
+ contentEditable: f ? void 0 : u.contentEditable,
1706
1706
  onKeyPressCapture: p,
1707
1707
  onClickCapture: v,
1708
1708
  onMouseDownCapture: b,
1709
- onMouseDown: w,
1709
+ onMouseDown: x,
1710
1710
  onKeyDownCapture: m,
1711
- onFocusCapture: C,
1711
+ onFocusCapture: I,
1712
1712
  onBlur: A
1713
1713
  }), rt(u);
1714
1714
  }
@@ -1730,40 +1730,40 @@ var pu = Symbol("command"), er = Z(
1730
1730
  W(() => {
1731
1731
  s.current && a(Xe(s.current));
1732
1732
  }, []);
1733
- const [d, f] = X(!1), c = Y(!1), l = Xt(i), [p, b] = fo(i, pu, !0), v = i.onKeyDown, x = U((g) => {
1733
+ const [f, d] = X(!1), c = Y(!1), l = Xt(i), [p, b] = fo(i, pu, !0), v = i.onKeyDown, E = U((g) => {
1734
1734
  v == null || v(g);
1735
1735
  const m = g.currentTarget;
1736
1736
  if (g.defaultPrevented || p || l || !me(g) || qe(m) || m.isContentEditable) return;
1737
- const y = n && g.key === "Enter", C = o && g.key === " ", O = g.key === "Enter" && !n, A = g.key === " " && !o;
1738
- if (O || A) {
1737
+ const S = n && g.key === "Enter", I = o && g.key === " ", _ = g.key === "Enter" && !n, A = g.key === " " && !o;
1738
+ if (_ || A) {
1739
1739
  g.preventDefault();
1740
1740
  return;
1741
1741
  }
1742
- if (y || C) {
1743
- const S = _r(g);
1744
- if (y) {
1745
- if (!S) {
1742
+ if (S || I) {
1743
+ const w = _r(g);
1744
+ if (S) {
1745
+ if (!w) {
1746
1746
  g.preventDefault();
1747
- const T = g, N = J(T, ["view"]), M = () => vr(m, N);
1748
- Ui() ? vt(m, "keyup", M) : queueMicrotask(M);
1747
+ const T = g, F = J(T, ["view"]), N = () => vr(m, F);
1748
+ Ui() ? vt(m, "keyup", N) : queueMicrotask(N);
1749
1749
  }
1750
- } else C && (c.current = !0, S || (g.preventDefault(), f(!0)));
1750
+ } else I && (c.current = !0, w || (g.preventDefault(), d(!0)));
1751
1751
  }
1752
- }), w = i.onKeyUp, P = U((g) => {
1753
- if (w == null || w(g), g.defaultPrevented || p || l || g.metaKey) return;
1752
+ }), x = i.onKeyUp, P = U((g) => {
1753
+ if (x == null || x(g), g.defaultPrevented || p || l || g.metaKey) return;
1754
1754
  const m = o && g.key === " ";
1755
1755
  if (c.current && m && (c.current = !1, !_r(g))) {
1756
- g.preventDefault(), f(!1);
1757
- const y = g.currentTarget, C = g, O = J(C, ["view"]);
1758
- queueMicrotask(() => vr(y, O));
1756
+ g.preventDefault(), d(!1);
1757
+ const S = g.currentTarget, I = g, _ = J(I, ["view"]);
1758
+ queueMicrotask(() => vr(S, _));
1759
1759
  }
1760
1760
  });
1761
- return i = B(_(_({
1762
- "data-active": d || void 0,
1761
+ return i = $(O(O({
1762
+ "data-active": f || void 0,
1763
1763
  type: u ? "button" : void 0
1764
1764
  }, b), i), {
1765
1765
  ref: de(s, i.ref),
1766
- onKeyDown: x,
1766
+ onKeyDown: E,
1767
1767
  onKeyUp: P
1768
1768
  }), i = on(i), i;
1769
1769
  }
@@ -1779,7 +1779,7 @@ var Lo = "button", Ro = Z(
1779
1779
  );
1780
1780
  return W(() => {
1781
1781
  r.current && i(Xe(r.current));
1782
- }, []), t = B(_({
1782
+ }, []), t = $(O({
1783
1783
  role: !o && n !== "a" ? "button" : void 0
1784
1784
  }, t), {
1785
1785
  ref: de(r, t.ref)
@@ -1798,20 +1798,20 @@ var mu = "button", vu = Symbol("disclosure"), Fo = Z(
1798
1798
  n,
1799
1799
  process.env.NODE_ENV !== "production" && "Disclosure must receive a `store` prop or be wrapped in a DisclosureProvider component."
1800
1800
  );
1801
- const u = Y(null), [a, d] = X(!1), f = n.useState("disclosureElement"), c = n.useState("open");
1801
+ const u = Y(null), [a, f] = X(!1), d = n.useState("disclosureElement"), c = n.useState("open");
1802
1802
  W(() => {
1803
- let P = f === u.current;
1804
- f != null && f.isConnected || (n == null || n.setDisclosureElement(u.current), P = !0), d(c && P);
1805
- }, [f, n, c]);
1806
- const l = i.onClick, p = fe(o), [b, v] = fo(i, vu, !0), x = U((P) => {
1803
+ let P = d === u.current;
1804
+ d != null && d.isConnected || (n == null || n.setDisclosureElement(u.current), P = !0), f(c && P);
1805
+ }, [d, n, c]);
1806
+ const l = i.onClick, p = fe(o), [b, v] = fo(i, vu, !0), E = U((P) => {
1807
1807
  l == null || l(P), !P.defaultPrevented && (b || p(P) && (n == null || n.setDisclosureElement(P.currentTarget), n == null || n.toggle()));
1808
- }), w = n.useState("contentElement");
1809
- return i = B(_(_({
1808
+ }), x = n.useState("contentElement");
1809
+ return i = $(O(O({
1810
1810
  "aria-expanded": a,
1811
- "aria-controls": w == null ? void 0 : w.id
1811
+ "aria-controls": x == null ? void 0 : x.id
1812
1812
  }, v), i), {
1813
1813
  ref: de(u, i.ref),
1814
- onClick: x
1814
+ onClick: E
1815
1815
  }), i = Ro(i), i;
1816
1816
  }
1817
1817
  );
@@ -1828,9 +1828,9 @@ var gu = "button", No = Z(
1828
1828
  process.env.NODE_ENV !== "production" && "DialogDisclosure must receive a `store` prop or be wrapped in a DialogProvider component."
1829
1829
  );
1830
1830
  const s = n.useState("contentElement");
1831
- return o = _({
1831
+ return o = O({
1832
1832
  "aria-haspopup": Nn(s, "dialog")
1833
- }, o), o = Fo(_({ store: n }, o)), o;
1833
+ }, o), o = Fo(O({ store: n }, o)), o;
1834
1834
  }
1835
1835
  );
1836
1836
  G(function(t) {
@@ -1841,7 +1841,7 @@ var hu = "div", Mo = Z(
1841
1841
  function(t) {
1842
1842
  var r = t, { store: n } = r, o = J(r, ["store"]);
1843
1843
  const i = Zt();
1844
- return n = n || i, o = B(_({}, o), {
1844
+ return n = n || i, o = $(O({}, o), {
1845
1845
  ref: de(n == null ? void 0 : n.setAnchorElement, o.ref)
1846
1846
  }), o;
1847
1847
  }
@@ -1864,9 +1864,9 @@ var bu = "button", ko = Z(function(t) {
1864
1864
  o,
1865
1865
  (a) => /* @__PURE__ */ k(en, { value: n, children: a }),
1866
1866
  [n]
1867
- ), o = B(_({}, o), {
1867
+ ), o = $(O({}, o), {
1868
1868
  onClick: u
1869
- }), o = Mo(_({ store: n }, o)), o = No(_({ store: n }, o)), o;
1869
+ }), o = Mo(O({ store: n }, o)), o = No(O({ store: n }, o)), o;
1870
1870
  });
1871
1871
  G(function(t) {
1872
1872
  const r = ko(t);
@@ -1884,7 +1884,7 @@ var yu = "span", Su = {
1884
1884
  n,
1885
1885
  process.env.NODE_ENV !== "production" && "PopoverDisclosureArrow must be wrapped in a PopoverDisclosure component."
1886
1886
  );
1887
- const a = n.useState((c) => o || c.placement).split("-")[0], d = Su[a], f = He(
1887
+ const a = n.useState((c) => o || c.placement).split("-")[0], f = Su[a], d = He(
1888
1888
  () => /* @__PURE__ */ k(
1889
1889
  "svg",
1890
1890
  {
@@ -1897,16 +1897,16 @@ var yu = "span", Su = {
1897
1897
  viewBox: "0 0 16 16",
1898
1898
  height: "1em",
1899
1899
  width: "1em",
1900
- children: /* @__PURE__ */ k("polyline", { points: d })
1900
+ children: /* @__PURE__ */ k("polyline", { points: f })
1901
1901
  }
1902
1902
  ),
1903
- [d]
1903
+ [f]
1904
1904
  );
1905
- return i = B(_({
1906
- children: f,
1905
+ return i = $(O({
1906
+ children: d,
1907
1907
  "aria-hidden": !0
1908
1908
  }, i), {
1909
- style: _({
1909
+ style: O({
1910
1910
  width: "1em",
1911
1911
  height: "1em",
1912
1912
  pointerEvents: "none"
@@ -1923,7 +1923,7 @@ var wu = "span", Eu = Z(
1923
1923
  function(t) {
1924
1924
  var r = t, { store: n } = r, o = J(r, ["store"]);
1925
1925
  const i = Co();
1926
- return n = n || i, o = Vo(_({ store: n }, o)), o;
1926
+ return n = n || i, o = Vo(O({ store: n }, o)), o;
1927
1927
  }
1928
1928
  ), xu = G(function(t) {
1929
1929
  const r = Eu(t);
@@ -2016,30 +2016,30 @@ var tr = Z(function(t) {
2016
2016
  n,
2017
2017
  process.env.NODE_ENV !== "production" && "CompositeTypeahead must be a Composite component"
2018
2018
  );
2019
- const u = i.onKeyDownCapture, a = Y(0), d = U((f) => {
2020
- if (u == null || u(f), f.defaultPrevented || !o || !n) return;
2021
- if (!Lu(f))
2019
+ const u = i.onKeyDownCapture, a = Y(0), f = U((d) => {
2020
+ if (u == null || u(d), d.defaultPrevented || !o || !n) return;
2021
+ if (!Lu(d))
2022
2022
  return gn();
2023
2023
  const { renderedItems: c, items: l, activeId: p, id: b } = n.getState();
2024
2024
  let v = Fu(
2025
2025
  l.length > c.length ? l : c
2026
2026
  );
2027
- const x = ne(f.currentTarget), w = `[data-offscreen-id="${b}"]`, P = x.querySelectorAll(w);
2028
- for (const y of P) {
2029
- const C = y.ariaDisabled === "true" || "disabled" in y && !!y.disabled;
2030
- v.push({ id: y.id, element: y, disabled: C });
2027
+ const E = ne(d.currentTarget), x = `[data-offscreen-id="${b}"]`, P = E.querySelectorAll(x);
2028
+ for (const S of P) {
2029
+ const I = S.ariaDisabled === "true" || "disabled" in S && !!S.disabled;
2030
+ v.push({ id: S.id, element: S, disabled: I });
2031
2031
  }
2032
- if (P.length && (v = so(v, (y) => y.element)), !Ru(f, v)) return gn();
2033
- f.preventDefault(), window.clearTimeout(a.current), a.current = window.setTimeout(() => {
2032
+ if (P.length && (v = so(v, (S) => S.element)), !Ru(d, v)) return gn();
2033
+ d.preventDefault(), window.clearTimeout(a.current), a.current = window.setTimeout(() => {
2034
2034
  Ve = "";
2035
2035
  }, 500);
2036
- const g = f.key.toLowerCase();
2036
+ const g = d.key.toLowerCase();
2037
2037
  Ve += g, v = Nu(v, g, p);
2038
- const m = v.find((y) => Ht(y, Ve));
2038
+ const m = v.find((S) => Ht(S, Ve));
2039
2039
  m ? n.move(m.id) : gn();
2040
2040
  });
2041
- return i = B(_({}, i), {
2042
- onKeyDownCapture: d
2041
+ return i = $(O({}, i), {
2042
+ onKeyDownCapture: f
2043
2043
  }), rt(i);
2044
2044
  });
2045
2045
  G(function(t) {
@@ -2072,8 +2072,8 @@ var Vu = Z(function(t) {
2072
2072
  required: s,
2073
2073
  showOnKeyDown: u = !0,
2074
2074
  moveOnKeyDown: a = !0,
2075
- toggleOnPress: d = !0,
2076
- toggleOnClick: f = d
2075
+ toggleOnPress: f = !0,
2076
+ toggleOnClick: d = f
2077
2077
  } = r, c = J(r, [
2078
2078
  "store",
2079
2079
  "name",
@@ -2089,41 +2089,41 @@ var Vu = Z(function(t) {
2089
2089
  n,
2090
2090
  process.env.NODE_ENV !== "production" && "Select must receive a `store` prop or be wrapped in a SelectProvider component."
2091
2091
  );
2092
- const p = c.onKeyDown, b = fe(u), v = fe(a), w = n.useState("placement").split("-")[0], P = n.useState("value"), g = Array.isArray(P), m = U((D) => {
2093
- var h;
2092
+ const p = c.onKeyDown, b = fe(u), v = fe(a), x = n.useState("placement").split("-")[0], P = n.useState("value"), g = Array.isArray(P), m = U((D) => {
2093
+ var y;
2094
2094
  if (p == null || p(D), D.defaultPrevented || !n) return;
2095
- const { orientation: F, items: R, activeId: E } = n.getState(), V = F !== "horizontal", K = F !== "vertical", H = !!((h = R.find((ue) => !ue.disabled && ue.value != null)) != null && h.rowId), oe = {
2096
- ArrowUp: (H || V) && Vt(n, n.up),
2095
+ const { orientation: R, items: B, activeId: h } = n.getState(), M = R !== "horizontal", K = R !== "vertical", H = !!((y = B.find((ue) => !ue.disabled && ue.value != null)) != null && y.rowId), oe = {
2096
+ ArrowUp: (H || M) && Vt(n, n.up),
2097
2097
  ArrowRight: (H || K) && Vt(n, n.next),
2098
- ArrowDown: (H || V) && Vt(n, n.down),
2098
+ ArrowDown: (H || M) && Vt(n, n.down),
2099
2099
  ArrowLeft: (H || K) && Vt(n, n.previous)
2100
2100
  }[D.key];
2101
2101
  oe && v(D) && (D.preventDefault(), n.move(oe()));
2102
- const re = w === "top" || w === "bottom";
2102
+ const re = x === "top" || x === "bottom";
2103
2103
  ({
2104
2104
  ArrowDown: re,
2105
2105
  ArrowUp: re,
2106
- ArrowLeft: w === "left",
2107
- ArrowRight: w === "right"
2108
- })[D.key] && b(D) && (D.preventDefault(), n.move(E), vt(D.currentTarget, "keyup", n.show));
2106
+ ArrowLeft: x === "left",
2107
+ ArrowRight: x === "right"
2108
+ })[D.key] && b(D) && (D.preventDefault(), n.move(h), vt(D.currentTarget, "keyup", n.show));
2109
2109
  });
2110
2110
  c = le(
2111
2111
  c,
2112
2112
  (D) => /* @__PURE__ */ k(Oo, { value: n, children: D }),
2113
2113
  [n]
2114
2114
  );
2115
- const [y, C] = X(!1), O = Y(!1);
2115
+ const [S, I] = X(!1), _ = Y(!1);
2116
2116
  W(() => {
2117
- const D = O.current;
2118
- O.current = !1, !D && C(!1);
2117
+ const D = _.current;
2118
+ _.current = !1, !D && I(!1);
2119
2119
  }, [P]);
2120
2120
  const A = n.useState((D) => {
2121
- var h;
2122
- return (h = D.labelElement) == null ? void 0 : h.id;
2123
- }), S = c["aria-label"], T = c["aria-labelledby"] || A, N = n.useState((D) => {
2121
+ var y;
2122
+ return (y = D.labelElement) == null ? void 0 : y.id;
2123
+ }), w = c["aria-label"], T = c["aria-labelledby"] || A, F = n.useState((D) => {
2124
2124
  if (o)
2125
2125
  return D.items;
2126
- }), M = He(() => [...new Set(N == null ? void 0 : N.map((D) => D.value).filter((D) => D != null))], [N]);
2126
+ }), N = He(() => [...new Set(F == null ? void 0 : F.map((D) => D.value).filter((D) => D != null))], [F]);
2127
2127
  c = le(
2128
2128
  c,
2129
2129
  (D) => o ? /* @__PURE__ */ Fe(mt, { children: [
@@ -2143,7 +2143,7 @@ var Vu = Z(function(t) {
2143
2143
  },
2144
2144
  tabIndex: -1,
2145
2145
  "aria-hidden": !0,
2146
- "aria-label": S,
2146
+ "aria-label": w,
2147
2147
  "aria-labelledby": T,
2148
2148
  name: o,
2149
2149
  form: i,
@@ -2151,17 +2151,17 @@ var Vu = Z(function(t) {
2151
2151
  value: P,
2152
2152
  multiple: g,
2153
2153
  onFocus: () => {
2154
- var h;
2155
- return (h = n == null ? void 0 : n.getState().selectElement) == null ? void 0 : h.focus();
2154
+ var y;
2155
+ return (y = n == null ? void 0 : n.getState().selectElement) == null ? void 0 : y.focus();
2156
2156
  },
2157
- onChange: (h) => {
2158
- O.current = !0, C(!0), n == null || n.setValue(
2159
- g ? ku(h.target) : h.target.value
2157
+ onChange: (y) => {
2158
+ _.current = !0, I(!0), n == null || n.setValue(
2159
+ g ? ku(y.target) : y.target.value
2160
2160
  );
2161
2161
  },
2162
2162
  children: [
2163
- bo(P).map((h) => h == null || M.includes(h) ? null : /* @__PURE__ */ k("option", { value: h, children: h }, h)),
2164
- M.map((h) => /* @__PURE__ */ k("option", { value: h, children: h }, h))
2163
+ bo(P).map((y) => y == null || N.includes(y) ? null : /* @__PURE__ */ k("option", { value: y, children: y }, y)),
2164
+ N.map((y) => /* @__PURE__ */ k("option", { value: y, children: y }, y))
2165
2165
  ]
2166
2166
  }
2167
2167
  ),
@@ -2169,32 +2169,32 @@ var Vu = Z(function(t) {
2169
2169
  ] }) : D,
2170
2170
  [
2171
2171
  n,
2172
- S,
2172
+ w,
2173
2173
  T,
2174
2174
  o,
2175
2175
  i,
2176
2176
  s,
2177
2177
  P,
2178
2178
  g,
2179
- M
2179
+ N
2180
2180
  ]
2181
2181
  );
2182
- const I = /* @__PURE__ */ Fe(mt, { children: [
2182
+ const C = /* @__PURE__ */ Fe(mt, { children: [
2183
2183
  P,
2184
2184
  /* @__PURE__ */ k(xu, {})
2185
2185
  ] }), L = n.useState("contentElement");
2186
- return c = B(_({
2186
+ return c = $(O({
2187
2187
  role: "combobox",
2188
2188
  "aria-autocomplete": "none",
2189
2189
  "aria-labelledby": A,
2190
2190
  "aria-haspopup": Nn(L, "listbox"),
2191
- "data-autofill": y || void 0,
2191
+ "data-autofill": S || void 0,
2192
2192
  "data-name": o,
2193
- children: I
2193
+ children: C
2194
2194
  }, c), {
2195
2195
  ref: de(n.setSelectElement, c.ref),
2196
2196
  onKeyDown: m
2197
- }), c = ko(_({ store: n, toggleOnClick: f }, c)), c = tr(_({ store: n }, c)), c;
2197
+ }), c = ko(O({ store: n, toggleOnClick: d }, c)), c = tr(O({ store: n }, c)), c;
2198
2198
  }), $u = G(function(t) {
2199
2199
  const r = Vu(t);
2200
2200
  return Q(Mu, r);
@@ -2238,21 +2238,21 @@ var Bo = Z(
2238
2238
  n,
2239
2239
  process.env.NODE_ENV !== "production" && "CompositeHover must be wrapped in a Composite component."
2240
2240
  );
2241
- const a = ts(), d = s.onMouseMove, f = fe(o), c = U((x) => {
2242
- if (d == null || d(x), !x.defaultPrevented && a() && f(x)) {
2243
- if (!Do(x.currentTarget)) {
2244
- const w = n == null ? void 0 : n.getState().baseElement;
2245
- w && !Ut(w) && w.focus();
2241
+ const a = ts(), f = s.onMouseMove, d = fe(o), c = U((E) => {
2242
+ if (f == null || f(E), !E.defaultPrevented && a() && d(E)) {
2243
+ if (!Do(E.currentTarget)) {
2244
+ const x = n == null ? void 0 : n.getState().baseElement;
2245
+ x && !Ut(x) && x.focus();
2246
2246
  }
2247
- n == null || n.setActiveId(x.currentTarget.id);
2247
+ n == null || n.setActiveId(E.currentTarget.id);
2248
2248
  }
2249
- }), l = s.onMouseLeave, p = fe(i), b = U((x) => {
2250
- var w;
2251
- l == null || l(x), !x.defaultPrevented && a() && (Hu(x) || Wu(x) || f(x) && p(x) && (n == null || n.setActiveId(null), (w = n == null ? void 0 : n.getState().baseElement) == null || w.focus()));
2252
- }), v = xe((x) => {
2253
- x && (x[Cn] = !0);
2249
+ }), l = s.onMouseLeave, p = fe(i), b = U((E) => {
2250
+ var x;
2251
+ l == null || l(E), !E.defaultPrevented && a() && (Hu(E) || Wu(E) || d(E) && p(E) && (n == null || n.setActiveId(null), (x = n == null ? void 0 : n.getState().baseElement) == null || x.focus()));
2252
+ }), v = xe((E) => {
2253
+ E && (E[Cn] = !0);
2254
2254
  }, []);
2255
- return s = B(_({}, s), {
2255
+ return s = $(O({}, s), {
2256
2256
  ref: de(v, s.ref),
2257
2257
  onMouseMove: c,
2258
2258
  onMouseLeave: b
@@ -2281,14 +2281,14 @@ var qu = "div", Ko = Z(
2281
2281
  ]);
2282
2282
  const a = os();
2283
2283
  n = n || a;
2284
- const d = ot(u.id), f = Y(s);
2284
+ const f = ot(u.id), d = Y(s);
2285
2285
  return W(() => {
2286
- const c = f.current;
2287
- if (!d || !c || !o) return;
2288
- const l = i({ id: d, element: c });
2286
+ const c = d.current;
2287
+ if (!f || !c || !o) return;
2288
+ const l = i({ id: f, element: c });
2289
2289
  return n == null ? void 0 : n.renderItem(l);
2290
- }, [d, o, i, n]), u = B(_({}, u), {
2291
- ref: de(f, u.ref)
2290
+ }, [f, o, i, n]), u = $(O({}, u), {
2291
+ ref: de(d, u.ref)
2292
2292
  }), rt(u);
2293
2293
  }
2294
2294
  );
@@ -2314,19 +2314,19 @@ function Ar(e, t, r, n = !1) {
2314
2314
  const { renderedItems: i } = t.getState(), s = io(e);
2315
2315
  if (!s) return;
2316
2316
  const u = ju(s, n);
2317
- let a, d;
2318
- for (let f = 0; f < i.length; f += 1) {
2317
+ let a, f;
2318
+ for (let d = 0; d < i.length; d += 1) {
2319
2319
  const c = a;
2320
- if (a = r(f), !a) break;
2320
+ if (a = r(d), !a) break;
2321
2321
  if (a === c) continue;
2322
2322
  const l = (o = Ge(t, a)) == null ? void 0 : o.element;
2323
2323
  if (!l) continue;
2324
2324
  const b = Gu(l, n) - u, v = Math.abs(b);
2325
2325
  if (n && b <= 0 || !n && b >= 0) {
2326
- d !== void 0 && d < v && (a = c);
2326
+ f !== void 0 && f < v && (a = c);
2327
2327
  break;
2328
2328
  }
2329
- d = v;
2329
+ f = v;
2330
2330
  }
2331
2331
  return a;
2332
2332
  }
@@ -2342,8 +2342,8 @@ var Ho = Z(
2342
2342
  moveOnKeyPress: s = !0,
2343
2343
  tabbable: u = !1,
2344
2344
  getItem: a,
2345
- "aria-setsize": d,
2346
- "aria-posinset": f
2345
+ "aria-setsize": f,
2346
+ "aria-posinset": d
2347
2347
  } = r, c = J(r, [
2348
2348
  "store",
2349
2349
  "rowId",
@@ -2356,127 +2356,127 @@ var Ho = Z(
2356
2356
  ]);
2357
2357
  const l = Kn();
2358
2358
  n = n || l;
2359
- const p = ot(c.id), b = Y(null), v = et(cs), w = Xt(c) && !c.accessibleWhenDisabled, {
2359
+ const p = ot(c.id), b = Y(null), v = et(cs), x = Xt(c) && !c.accessibleWhenDisabled, {
2360
2360
  rowId: P,
2361
2361
  baseElement: g,
2362
2362
  isActiveItem: m,
2363
- ariaSetSize: y,
2364
- ariaPosInSet: C,
2365
- isTabbable: O
2363
+ ariaSetSize: S,
2364
+ ariaPosInSet: I,
2365
+ isTabbable: _
2366
2366
  } = ho(n, {
2367
- rowId(E) {
2367
+ rowId(h) {
2368
2368
  if (o) return o;
2369
- if (E && v != null && v.baseElement && v.baseElement === E.baseElement)
2369
+ if (h && v != null && v.baseElement && v.baseElement === h.baseElement)
2370
2370
  return v.id;
2371
2371
  },
2372
- baseElement(E) {
2373
- return (E == null ? void 0 : E.baseElement) || void 0;
2372
+ baseElement(h) {
2373
+ return (h == null ? void 0 : h.baseElement) || void 0;
2374
2374
  },
2375
- isActiveItem(E) {
2376
- return !!E && E.activeId === p;
2375
+ isActiveItem(h) {
2376
+ return !!h && h.activeId === p;
2377
2377
  },
2378
- ariaSetSize(E) {
2379
- if (d != null) return d;
2380
- if (E && v != null && v.ariaSetSize && v.baseElement === E.baseElement)
2378
+ ariaSetSize(h) {
2379
+ if (f != null) return f;
2380
+ if (h && v != null && v.ariaSetSize && v.baseElement === h.baseElement)
2381
2381
  return v.ariaSetSize;
2382
2382
  },
2383
- ariaPosInSet(E) {
2384
- if (f != null) return f;
2385
- if (!E || !(v != null && v.ariaPosInSet) || v.baseElement !== E.baseElement) return;
2386
- const V = E.renderedItems.filter(
2383
+ ariaPosInSet(h) {
2384
+ if (d != null) return d;
2385
+ if (!h || !(v != null && v.ariaPosInSet) || v.baseElement !== h.baseElement) return;
2386
+ const M = h.renderedItems.filter(
2387
2387
  (K) => K.rowId === P
2388
2388
  );
2389
- return v.ariaPosInSet + V.findIndex((K) => K.id === p);
2389
+ return v.ariaPosInSet + M.findIndex((K) => K.id === p);
2390
2390
  },
2391
- isTabbable(E) {
2392
- if (!(E != null && E.renderedItems.length)) return !0;
2393
- if (E.virtualFocus) return !1;
2391
+ isTabbable(h) {
2392
+ if (!(h != null && h.renderedItems.length)) return !0;
2393
+ if (h.virtualFocus) return !1;
2394
2394
  if (u) return !0;
2395
- if (E.activeId === null) return !1;
2396
- const V = n == null ? void 0 : n.item(E.activeId);
2397
- return V != null && V.disabled || !(V != null && V.element) ? !0 : E.activeId === p;
2395
+ if (h.activeId === null) return !1;
2396
+ const M = n == null ? void 0 : n.item(h.activeId);
2397
+ return M != null && M.disabled || !(M != null && M.element) ? !0 : h.activeId === p;
2398
2398
  }
2399
2399
  }), A = xe(
2400
- (E) => {
2401
- var V;
2402
- const K = B(_({}, E), {
2403
- id: p || E.id,
2400
+ (h) => {
2401
+ var M;
2402
+ const K = $(O({}, h), {
2403
+ id: p || h.id,
2404
2404
  rowId: P,
2405
- disabled: !!w,
2406
- children: (V = E.element) == null ? void 0 : V.textContent
2405
+ disabled: !!x,
2406
+ children: (M = h.element) == null ? void 0 : M.textContent
2407
2407
  });
2408
2408
  return a ? a(K) : K;
2409
2409
  },
2410
- [p, P, w, a]
2411
- ), S = c.onFocus, T = Y(!1), N = U((E) => {
2412
- if (S == null || S(E), E.defaultPrevented || uo(E) || !p || !n || Yu(E, n)) return;
2413
- const { virtualFocus: V, baseElement: K } = n.getState();
2414
- if (n.setActiveId(p), En(E.currentTarget) && _u(E.currentTarget), !V || !me(E) || Uu(E.currentTarget) || !(K != null && K.isConnected)) return;
2415
- kn() && E.currentTarget.hasAttribute("data-autofocus") && E.currentTarget.scrollIntoView({
2410
+ [p, P, x, a]
2411
+ ), w = c.onFocus, T = Y(!1), F = U((h) => {
2412
+ if (w == null || w(h), h.defaultPrevented || uo(h) || !p || !n || Yu(h, n)) return;
2413
+ const { virtualFocus: M, baseElement: K } = n.getState();
2414
+ if (n.setActiveId(p), En(h.currentTarget) && _u(h.currentTarget), !M || !me(h) || Uu(h.currentTarget) || !(K != null && K.isConnected)) return;
2415
+ kn() && h.currentTarget.hasAttribute("data-autofocus") && h.currentTarget.scrollIntoView({
2416
2416
  block: "nearest",
2417
2417
  inline: "nearest"
2418
- }), T.current = !0, E.relatedTarget === K || xt(n, E.relatedTarget) ? Du(K) : K.focus();
2419
- }), M = c.onBlurCapture, I = U((E) => {
2420
- if (M == null || M(E), E.defaultPrevented) return;
2421
- const V = n == null ? void 0 : n.getState();
2422
- V != null && V.virtualFocus && T.current && (T.current = !1, E.preventDefault(), E.stopPropagation());
2423
- }), L = c.onKeyDown, D = fe(i), h = fe(s), F = U((E) => {
2424
- if (L == null || L(E), E.defaultPrevented || !me(E) || !n) return;
2425
- const { currentTarget: V } = E, K = n.getState(), H = n.item(p), ie = !!(H != null && H.rowId), oe = K.orientation !== "horizontal", re = K.orientation !== "vertical", be = () => !!(ie || re || !K.baseElement || !qe(K.baseElement)), ye = {
2418
+ }), T.current = !0, h.relatedTarget === K || xt(n, h.relatedTarget) ? Du(K) : K.focus();
2419
+ }), N = c.onBlurCapture, C = U((h) => {
2420
+ if (N == null || N(h), h.defaultPrevented) return;
2421
+ const M = n == null ? void 0 : n.getState();
2422
+ M != null && M.virtualFocus && T.current && (T.current = !1, h.preventDefault(), h.stopPropagation());
2423
+ }), L = c.onKeyDown, D = fe(i), y = fe(s), R = U((h) => {
2424
+ if (L == null || L(h), h.defaultPrevented || !me(h) || !n) return;
2425
+ const { currentTarget: M } = h, K = n.getState(), H = n.item(p), ie = !!(H != null && H.rowId), oe = K.orientation !== "horizontal", re = K.orientation !== "vertical", be = () => !!(ie || re || !K.baseElement || !qe(K.baseElement)), ye = {
2426
2426
  ArrowUp: (ie || oe) && n.up,
2427
2427
  ArrowRight: (ie || re) && n.next,
2428
2428
  ArrowDown: (ie || oe) && n.down,
2429
2429
  ArrowLeft: (ie || re) && n.previous,
2430
2430
  Home: () => {
2431
2431
  if (be())
2432
- return !ie || E.ctrlKey ? n == null ? void 0 : n.first() : n == null ? void 0 : n.previous(-1);
2432
+ return !ie || h.ctrlKey ? n == null ? void 0 : n.first() : n == null ? void 0 : n.previous(-1);
2433
2433
  },
2434
2434
  End: () => {
2435
2435
  if (be())
2436
- return !ie || E.ctrlKey ? n == null ? void 0 : n.last() : n == null ? void 0 : n.next(-1);
2436
+ return !ie || h.ctrlKey ? n == null ? void 0 : n.last() : n == null ? void 0 : n.next(-1);
2437
2437
  },
2438
- PageUp: () => Ar(V, n, n == null ? void 0 : n.up, !0),
2439
- PageDown: () => Ar(V, n, n == null ? void 0 : n.down)
2440
- }[E.key];
2438
+ PageUp: () => Ar(M, n, n == null ? void 0 : n.up, !0),
2439
+ PageDown: () => Ar(M, n, n == null ? void 0 : n.down)
2440
+ }[h.key];
2441
2441
  if (ye) {
2442
- if (En(V)) {
2443
- const ue = Hi(V), ut = re && E.key === "ArrowLeft", at = re && E.key === "ArrowRight", Me = oe && E.key === "ArrowUp", Ue = oe && E.key === "ArrowDown";
2442
+ if (En(M)) {
2443
+ const ue = Hi(M), ut = re && h.key === "ArrowLeft", at = re && h.key === "ArrowRight", Me = oe && h.key === "ArrowUp", Ue = oe && h.key === "ArrowDown";
2444
2444
  if (at || Ue) {
2445
- const { length: ct } = Ki(V);
2445
+ const { length: ct } = Ki(M);
2446
2446
  if (ue.end !== ct) return;
2447
2447
  } else if ((ut || Me) && ue.start !== 0) return;
2448
2448
  }
2449
2449
  const Ie = ye();
2450
- if (D(E) || Ie !== void 0) {
2451
- if (!h(E)) return;
2452
- E.preventDefault(), n.move(Ie);
2450
+ if (D(h) || Ie !== void 0) {
2451
+ if (!y(h)) return;
2452
+ h.preventDefault(), n.move(Ie);
2453
2453
  }
2454
2454
  }
2455
- }), R = He(
2455
+ }), B = He(
2456
2456
  () => ({ id: p, baseElement: g }),
2457
2457
  [p, g]
2458
2458
  );
2459
2459
  return c = le(
2460
2460
  c,
2461
- (E) => /* @__PURE__ */ k(as.Provider, { value: R, children: E }),
2462
- [R]
2463
- ), c = B(_({
2461
+ (h) => /* @__PURE__ */ k(as.Provider, { value: B, children: h }),
2462
+ [B]
2463
+ ), c = $(O({
2464
2464
  id: p,
2465
2465
  "data-active-item": m || void 0
2466
2466
  }, c), {
2467
2467
  ref: de(b, c.ref),
2468
- tabIndex: O ? c.tabIndex : -1,
2469
- onFocus: N,
2470
- onBlurCapture: I,
2471
- onKeyDown: F
2472
- }), c = er(c), c = Ko(B(_({
2468
+ tabIndex: _ ? c.tabIndex : -1,
2469
+ onFocus: F,
2470
+ onBlurCapture: C,
2471
+ onKeyDown: R
2472
+ }), c = er(c), c = Ko($(O({
2473
2473
  store: n
2474
2474
  }, c), {
2475
2475
  getItem: A,
2476
2476
  shouldRegisterItem: p ? c.shouldRegisterItem : !1
2477
- })), rt(B(_({}, c), {
2478
- "aria-setsize": y,
2479
- "aria-posinset": C
2477
+ })), rt($(O({}, c), {
2478
+ "aria-setsize": S,
2479
+ "aria-posinset": I
2480
2480
  }));
2481
2481
  }
2482
2482
  );
@@ -2500,8 +2500,8 @@ var Qu = Z(
2500
2500
  hideOnClick: s,
2501
2501
  setValueOnClick: u = o != null,
2502
2502
  preventScrollOnKeyDown: a = !0,
2503
- focusOnHover: d = !0
2504
- } = r, f = J(r, [
2503
+ focusOnHover: f = !0
2504
+ } = r, d = J(r, [
2505
2505
  "store",
2506
2506
  "value",
2507
2507
  "getItem",
@@ -2515,20 +2515,20 @@ var Qu = Z(
2515
2515
  n,
2516
2516
  process.env.NODE_ENV !== "production" && "SelectItem must be wrapped in a SelectList or SelectPopover component."
2517
2517
  );
2518
- const p = ot(f.id), b = Xt(f), { listElement: v, multiSelectable: x, selected: w, autoFocus: P } = ho(n, {
2518
+ const p = ot(d.id), b = Xt(d), { listElement: v, multiSelectable: E, selected: x, autoFocus: P } = ho(n, {
2519
2519
  listElement: "listElement",
2520
- multiSelectable(S) {
2521
- return Array.isArray(S.value);
2520
+ multiSelectable(w) {
2521
+ return Array.isArray(w.value);
2522
2522
  },
2523
- selected(S) {
2524
- return Ju(S.value, o);
2523
+ selected(w) {
2524
+ return Ju(w.value, o);
2525
2525
  },
2526
- autoFocus(S) {
2527
- return o == null || S.value == null || S.activeId !== p && (n != null && n.item(S.activeId)) ? !1 : Array.isArray(S.value) ? S.value[S.value.length - 1] === o : S.value === o;
2526
+ autoFocus(w) {
2527
+ return o == null || w.value == null || w.activeId !== p && (n != null && n.item(w.activeId)) ? !1 : Array.isArray(w.value) ? w.value[w.value.length - 1] === o : w.value === o;
2528
2528
  }
2529
2529
  }), g = xe(
2530
- (S) => {
2531
- const T = B(_({}, S), {
2530
+ (w) => {
2531
+ const T = $(O({}, w), {
2532
2532
  value: b ? void 0 : o,
2533
2533
  children: o
2534
2534
  });
@@ -2536,40 +2536,40 @@ var Qu = Z(
2536
2536
  },
2537
2537
  [b, o, i]
2538
2538
  );
2539
- s = s ?? (o != null && !x);
2540
- const m = f.onClick, y = fe(u), C = fe(s), O = U((S) => {
2541
- m == null || m(S), !S.defaultPrevented && (Yi(S) || Gi(S) || (y(S) && o != null && (n == null || n.setValue((T) => Array.isArray(T) ? T.includes(o) ? T.filter((N) => N !== o) : [...T, o] : o)), C(S) && (n == null || n.hide())));
2539
+ s = s ?? (o != null && !E);
2540
+ const m = d.onClick, S = fe(u), I = fe(s), _ = U((w) => {
2541
+ m == null || m(w), !w.defaultPrevented && (Yi(w) || Gi(w) || (S(w) && o != null && (n == null || n.setValue((T) => Array.isArray(T) ? T.includes(o) ? T.filter((F) => F !== o) : [...T, o] : o)), I(w) && (n == null || n.hide())));
2542
2542
  });
2543
- f = le(
2544
- f,
2545
- (S) => /* @__PURE__ */ k(Us.Provider, { value: w ?? !1, children: S }),
2546
- [w]
2547
- ), f = B(_({
2543
+ d = le(
2544
+ d,
2545
+ (w) => /* @__PURE__ */ k(Us.Provider, { value: x ?? !1, children: w }),
2546
+ [x]
2547
+ ), d = $(O({
2548
2548
  id: p,
2549
2549
  role: Wi(v),
2550
- "aria-selected": w,
2550
+ "aria-selected": x,
2551
2551
  children: o
2552
- }, f), {
2553
- autoFocus: (c = f.autoFocus) != null ? c : P,
2554
- onClick: O
2555
- }), f = Ho(_({
2552
+ }, d), {
2553
+ autoFocus: (c = d.autoFocus) != null ? c : P,
2554
+ onClick: _
2555
+ }), d = Ho(O({
2556
2556
  store: n,
2557
2557
  getItem: g,
2558
2558
  preventScrollOnKeyDown: a
2559
- }, f));
2560
- const A = fe(d);
2561
- return f = Bo(B(_({
2559
+ }, d));
2560
+ const A = fe(f);
2561
+ return d = Bo($(O({
2562
2562
  store: n
2563
- }, f), {
2563
+ }, d), {
2564
2564
  // We have to disable focusOnHover when the popup is closed, otherwise
2565
2565
  // the active item will change to null (the container) when the popup is
2566
2566
  // closed by clicking on an item.
2567
- focusOnHover(S) {
2568
- if (!A(S)) return !1;
2567
+ focusOnHover(w) {
2568
+ if (!A(w)) return !1;
2569
2569
  const T = n == null ? void 0 : n.getState();
2570
2570
  return !!(T != null && T.open);
2571
2571
  }
2572
- })), f;
2572
+ })), d;
2573
2573
  }
2574
2574
  ), Zu = Bn(
2575
2575
  G(function(t) {
@@ -2593,8 +2593,8 @@ function Tr(e, t, r) {
2593
2593
  if (t == null || t(n), n.defaultPrevented || n.isPropagationStopped() || !me(n) || ra(n) || na(n)) return;
2594
2594
  const i = e.getState(), s = (o = Ge(e, i.activeId)) == null ? void 0 : o.element;
2595
2595
  if (!s) return;
2596
- const u = n, a = J(u, ["view"]), d = r == null ? void 0 : r.current;
2597
- s !== d && s.focus(), Xi(s, n.type, a) || n.preventDefault(), n.currentTarget.contains(s) && n.stopPropagation();
2596
+ const u = n, a = J(u, ["view"]), f = r == null ? void 0 : r.current;
2597
+ s !== f && s.focus(), Xi(s, n.type, a) || n.preventDefault(), n.currentTarget.contains(s) && n.stopPropagation();
2598
2598
  });
2599
2599
  }
2600
2600
  function oa(e) {
@@ -2629,111 +2629,111 @@ var Wo = Z(
2629
2629
  n,
2630
2630
  process.env.NODE_ENV !== "production" && "Composite must receive a `store` prop or be wrapped in a CompositeProvider component."
2631
2631
  );
2632
- const d = Y(null), f = Y(null), c = ia(n), l = n.useState("moves"), [, p] = ao(
2632
+ const f = Y(null), d = Y(null), c = ia(n), l = n.useState("moves"), [, p] = ao(
2633
2633
  o ? n.setBaseElement : null
2634
2634
  );
2635
2635
  W(() => {
2636
- var I;
2636
+ var C;
2637
2637
  if (!n || !l || !o || !i) return;
2638
- const { activeId: L } = n.getState(), D = (I = Ge(n, L)) == null ? void 0 : I.element;
2638
+ const { activeId: L } = n.getState(), D = (C = Ge(n, L)) == null ? void 0 : C.element;
2639
2639
  D && tu(D);
2640
2640
  }, [n, l, o, i]), ee(() => {
2641
2641
  if (!n || !l || !o) return;
2642
- const { baseElement: I, activeId: L } = n.getState();
2643
- if (!(L === null) || !I) return;
2644
- const h = f.current;
2645
- f.current = null, h && dt(h, { relatedTarget: I }), Ut(I) || I.focus();
2642
+ const { baseElement: C, activeId: L } = n.getState();
2643
+ if (!(L === null) || !C) return;
2644
+ const y = d.current;
2645
+ d.current = null, y && dt(y, { relatedTarget: C }), Ut(C) || C.focus();
2646
2646
  }, [n, l, o]);
2647
2647
  const b = n.useState("activeId"), v = n.useState("virtualFocus");
2648
2648
  ee(() => {
2649
- var I;
2649
+ var C;
2650
2650
  if (!n || !o || !v) return;
2651
- const L = f.current;
2652
- if (f.current = null, !L) return;
2653
- const h = ((I = Ge(n, b)) == null ? void 0 : I.element) || We(L);
2654
- h !== L && dt(L, { relatedTarget: h });
2651
+ const L = d.current;
2652
+ if (d.current = null, !L) return;
2653
+ const y = ((C = Ge(n, b)) == null ? void 0 : C.element) || We(L);
2654
+ y !== L && dt(L, { relatedTarget: y });
2655
2655
  }, [n, b, v, o]);
2656
- const x = Tr(
2656
+ const E = Tr(
2657
2657
  n,
2658
2658
  u.onKeyDownCapture,
2659
- f
2660
- ), w = Tr(
2659
+ d
2660
+ ), x = Tr(
2661
2661
  n,
2662
2662
  u.onKeyUpCapture,
2663
- f
2664
- ), P = u.onFocusCapture, g = U((I) => {
2665
- if (P == null || P(I), I.defaultPrevented || !n) return;
2663
+ d
2664
+ ), P = u.onFocusCapture, g = U((C) => {
2665
+ if (P == null || P(C), C.defaultPrevented || !n) return;
2666
2666
  const { virtualFocus: L } = n.getState();
2667
2667
  if (!L) return;
2668
- const D = I.relatedTarget, h = Au(I.currentTarget);
2669
- me(I) && h && (I.stopPropagation(), f.current = D);
2670
- }), m = u.onFocus, y = U((I) => {
2671
- if (m == null || m(I), I.defaultPrevented || !o || !n) return;
2672
- const { relatedTarget: L } = I, { virtualFocus: D } = n.getState();
2673
- D ? me(I) && !xt(n, L) && queueMicrotask(c) : me(I) && n.setActiveId(null);
2674
- }), C = u.onBlurCapture, O = U((I) => {
2668
+ const D = C.relatedTarget, y = Au(C.currentTarget);
2669
+ me(C) && y && (C.stopPropagation(), d.current = D);
2670
+ }), m = u.onFocus, S = U((C) => {
2671
+ if (m == null || m(C), C.defaultPrevented || !o || !n) return;
2672
+ const { relatedTarget: L } = C, { virtualFocus: D } = n.getState();
2673
+ D ? me(C) && !xt(n, L) && queueMicrotask(c) : me(C) && n.setActiveId(null);
2674
+ }), I = u.onBlurCapture, _ = U((C) => {
2675
2675
  var L;
2676
- if (C == null || C(I), I.defaultPrevented || !n) return;
2677
- const { virtualFocus: D, activeId: h } = n.getState();
2676
+ if (I == null || I(C), C.defaultPrevented || !n) return;
2677
+ const { virtualFocus: D, activeId: y } = n.getState();
2678
2678
  if (!D) return;
2679
- const F = (L = Ge(n, h)) == null ? void 0 : L.element, R = I.relatedTarget, E = xt(n, R), V = f.current;
2680
- f.current = null, me(I) && E ? (R === F ? V && V !== R && dt(V, I) : F ? dt(F, I) : V && dt(V, I), I.stopPropagation()) : !xt(n, I.target) && F && dt(F, I);
2681
- }), A = u.onKeyDown, S = fe(s), T = U((I) => {
2679
+ const R = (L = Ge(n, y)) == null ? void 0 : L.element, B = C.relatedTarget, h = xt(n, B), M = d.current;
2680
+ d.current = null, me(C) && h ? (B === R ? M && M !== B && dt(M, C) : R ? dt(R, C) : M && dt(M, C), C.stopPropagation()) : !xt(n, C.target) && R && dt(R, C);
2681
+ }), A = u.onKeyDown, w = fe(s), T = U((C) => {
2682
2682
  var L;
2683
- if (A == null || A(I), I.defaultPrevented || !n || !me(I)) return;
2684
- const { orientation: D, renderedItems: h, activeId: F } = n.getState(), R = Ge(n, F);
2685
- if ((L = R == null ? void 0 : R.element) != null && L.isConnected) return;
2686
- const E = D !== "horizontal", V = D !== "vertical", K = ta(h);
2687
- if ((I.key === "ArrowLeft" || I.key === "ArrowRight" || I.key === "Home" || I.key === "End") && qe(I.currentTarget)) return;
2683
+ if (A == null || A(C), C.defaultPrevented || !n || !me(C)) return;
2684
+ const { orientation: D, renderedItems: y, activeId: R } = n.getState(), B = Ge(n, R);
2685
+ if ((L = B == null ? void 0 : B.element) != null && L.isConnected) return;
2686
+ const h = D !== "horizontal", M = D !== "vertical", K = ta(y);
2687
+ if ((C.key === "ArrowLeft" || C.key === "ArrowRight" || C.key === "Home" || C.key === "End") && qe(C.currentTarget)) return;
2688
2688
  const re = {
2689
- ArrowUp: (K || E) && (() => {
2689
+ ArrowUp: (K || h) && (() => {
2690
2690
  if (K) {
2691
- const be = oa(h);
2691
+ const be = oa(y);
2692
2692
  return be == null ? void 0 : be.id;
2693
2693
  }
2694
2694
  return n == null ? void 0 : n.last();
2695
2695
  }),
2696
- ArrowRight: (K || V) && n.first,
2697
- ArrowDown: (K || E) && n.first,
2698
- ArrowLeft: (K || V) && n.last,
2696
+ ArrowRight: (K || M) && n.first,
2697
+ ArrowDown: (K || h) && n.first,
2698
+ ArrowLeft: (K || M) && n.last,
2699
2699
  Home: n.first,
2700
2700
  End: n.last,
2701
2701
  PageUp: n.first,
2702
2702
  PageDown: n.last
2703
- }[I.key];
2703
+ }[C.key];
2704
2704
  if (re) {
2705
2705
  const be = re();
2706
2706
  if (be !== void 0) {
2707
- if (!S(I)) return;
2708
- I.preventDefault(), n.move(be);
2707
+ if (!w(C)) return;
2708
+ C.preventDefault(), n.move(be);
2709
2709
  }
2710
2710
  }
2711
2711
  });
2712
2712
  u = le(
2713
2713
  u,
2714
- (I) => /* @__PURE__ */ k(Hn, { value: n, children: I }),
2714
+ (C) => /* @__PURE__ */ k(Hn, { value: n, children: C }),
2715
2715
  [n]
2716
2716
  );
2717
- const N = n.useState((I) => {
2717
+ const F = n.useState((C) => {
2718
2718
  var L;
2719
- if (n && o && I.virtualFocus)
2720
- return (L = Ge(n, I.activeId)) == null ? void 0 : L.id;
2719
+ if (n && o && C.virtualFocus)
2720
+ return (L = Ge(n, C.activeId)) == null ? void 0 : L.id;
2721
2721
  });
2722
- u = B(_({
2723
- "aria-activedescendant": N
2722
+ u = $(O({
2723
+ "aria-activedescendant": F
2724
2724
  }, u), {
2725
- ref: de(d, p, u.ref),
2726
- onKeyDownCapture: x,
2727
- onKeyUpCapture: w,
2725
+ ref: de(f, p, u.ref),
2726
+ onKeyDownCapture: E,
2727
+ onKeyUpCapture: x,
2728
2728
  onFocusCapture: g,
2729
- onFocus: y,
2730
- onBlurCapture: O,
2729
+ onFocus: S,
2730
+ onBlurCapture: _,
2731
2731
  onKeyDown: T
2732
2732
  });
2733
- const M = n.useState(
2734
- (I) => o && (I.virtualFocus || I.activeId === null)
2733
+ const N = n.useState(
2734
+ (C) => o && (C.virtualFocus || C.activeId === null)
2735
2735
  );
2736
- return u = on(_({ focusable: M }, u)), u;
2736
+ return u = on(O({ focusable: N }, u)), u;
2737
2737
  }
2738
2738
  );
2739
2739
  G(function(t) {
@@ -2767,7 +2767,7 @@ var rr = Z(function(t) {
2767
2767
  n,
2768
2768
  process.env.NODE_ENV !== "production" && "DisclosureContent must receive a `store` prop or be wrapped in a DisclosureProvider component."
2769
2769
  );
2770
- const u = Y(null), a = ot(i.id), [d, f] = X(null), c = n.useState("open"), l = n.useState("mounted"), p = n.useState("animated"), b = n.useState("contentElement"), v = _e(n.disclosure, "contentElement");
2770
+ const u = Y(null), a = ot(i.id), [f, d] = X(null), c = n.useState("open"), l = n.useState("mounted"), p = n.useState("animated"), b = n.useState("contentElement"), v = _e(n.disclosure, "contentElement");
2771
2771
  ee(() => {
2772
2772
  u.current && (n == null || n.setContentElement(u.current));
2773
2773
  }, [n]), ee(() => {
@@ -2778,58 +2778,58 @@ var rr = Z(function(t) {
2778
2778
  }, [n]), ee(() => {
2779
2779
  if (p) {
2780
2780
  if (!(b != null && b.isConnected)) {
2781
- f(null);
2781
+ d(null);
2782
2782
  return;
2783
2783
  }
2784
2784
  return ua(() => {
2785
- f(c ? "enter" : l ? "leave" : null);
2785
+ d(c ? "enter" : l ? "leave" : null);
2786
2786
  });
2787
2787
  }
2788
2788
  }, [p, b, c, l]), ee(() => {
2789
- if (!n || !p || !d || !b) return;
2789
+ if (!n || !p || !f || !b) return;
2790
2790
  const g = () => n == null ? void 0 : n.setState("animating", !1), m = () => Xr(g);
2791
- if (d === "leave" && c || d === "enter" && !c) return;
2791
+ if (f === "leave" && c || f === "enter" && !c) return;
2792
2792
  if (typeof p == "number")
2793
2793
  return Lr(p, m);
2794
2794
  const {
2795
- transitionDuration: y,
2796
- animationDuration: C,
2797
- transitionDelay: O,
2795
+ transitionDuration: S,
2796
+ animationDuration: I,
2797
+ transitionDelay: _,
2798
2798
  animationDelay: A
2799
2799
  } = getComputedStyle(b), {
2800
- transitionDuration: S = "0",
2800
+ transitionDuration: w = "0",
2801
2801
  animationDuration: T = "0",
2802
- transitionDelay: N = "0",
2803
- animationDelay: M = "0"
2804
- } = v ? getComputedStyle(v) : {}, I = Rr(
2805
- O,
2802
+ transitionDelay: F = "0",
2803
+ animationDelay: N = "0"
2804
+ } = v ? getComputedStyle(v) : {}, C = Rr(
2805
+ _,
2806
2806
  A,
2807
- N,
2808
- M
2807
+ F,
2808
+ N
2809
2809
  ), L = Rr(
2810
- y,
2811
- C,
2812
2810
  S,
2811
+ I,
2812
+ w,
2813
2813
  T
2814
- ), D = I + L;
2814
+ ), D = C + L;
2815
2815
  if (!D) {
2816
- d === "enter" && n.setState("animated", !1), g();
2816
+ f === "enter" && n.setState("animated", !1), g();
2817
2817
  return;
2818
2818
  }
2819
- const h = 1e3 / 60, F = Math.max(D - h, 0);
2820
- return Lr(F, m);
2821
- }, [n, p, b, v, c, d]), i = le(
2819
+ const y = 1e3 / 60, R = Math.max(D - y, 0);
2820
+ return Lr(R, m);
2821
+ }, [n, p, b, v, c, f]), i = le(
2822
2822
  i,
2823
2823
  (g) => /* @__PURE__ */ k(zn, { value: n, children: g }),
2824
2824
  [n]
2825
2825
  );
2826
- const x = nr(l, i.hidden, o), w = i.style, P = He(() => x ? B(_({}, w), { display: "none" }) : w, [x, w]);
2827
- return i = B(_({
2826
+ const E = nr(l, i.hidden, o), x = i.style, P = He(() => E ? $(O({}, x), { display: "none" }) : x, [E, x]);
2827
+ return i = $(O({
2828
2828
  id: a,
2829
2829
  "data-open": c || void 0,
2830
- "data-enter": d === "enter" || void 0,
2831
- "data-leave": d === "leave" || void 0,
2832
- hidden: x
2830
+ "data-enter": f === "enter" || void 0,
2831
+ "data-leave": f === "leave" || void 0,
2832
+ hidden: E
2833
2833
  }, i), {
2834
2834
  ref: de(a ? n.setContentElement : null, u, i.ref),
2835
2835
  style: P
@@ -2848,7 +2848,7 @@ G(function(t) {
2848
2848
  return _e(
2849
2849
  s,
2850
2850
  (a) => !n || (a == null ? void 0 : a.mounted)
2851
- ) === !1 ? null : /* @__PURE__ */ k(aa, _({}, o));
2851
+ ) === !1 ? null : /* @__PURE__ */ k(aa, O({}, o));
2852
2852
  });
2853
2853
  var ca = "div", Fr = ge(null), qo = Z(
2854
2854
  function(t) {
@@ -2859,7 +2859,7 @@ var ca = "div", Fr = ge(null), qo = Z(
2859
2859
  focusOnMove: s = !0,
2860
2860
  composite: u,
2861
2861
  alwaysVisible: a
2862
- } = r, d = J(r, [
2862
+ } = r, f = J(r, [
2863
2863
  "store",
2864
2864
  "resetOnEscape",
2865
2865
  "hideOnEnter",
@@ -2867,53 +2867,53 @@ var ca = "div", Fr = ge(null), qo = Z(
2867
2867
  "composite",
2868
2868
  "alwaysVisible"
2869
2869
  ]);
2870
- const f = Co();
2871
- n = n || f, he(
2870
+ const d = Co();
2871
+ n = n || d, he(
2872
2872
  n,
2873
2873
  process.env.NODE_ENV !== "production" && "SelectList must receive a `store` prop or be wrapped in a SelectProvider component."
2874
2874
  );
2875
- const c = ot(d.id), l = n.useState("value"), p = Array.isArray(l), [b, v] = X(l), x = n.useState("mounted");
2875
+ const c = ot(f.id), l = n.useState("value"), p = Array.isArray(l), [b, v] = X(l), E = n.useState("mounted");
2876
2876
  W(() => {
2877
- x || v(l);
2878
- }, [x, l]), o = o && !p;
2879
- const w = d.onKeyDown, P = fe(o), g = fe(i), m = U((H) => {
2880
- w == null || w(H), !H.defaultPrevented && (H.key === "Escape" && P(H) && (n == null || n.setValue(b)), (H.key === " " || H.key === "Enter") && me(H) && g(H) && (H.preventDefault(), n == null || n.hide()));
2881
- }), y = et(xr), C = X(), [O, A] = y || C, S = He(
2882
- () => [O, A],
2883
- [O]
2884
- ), [T, N] = X(null), M = et(Fr);
2877
+ E || v(l);
2878
+ }, [E, l]), o = o && !p;
2879
+ const x = f.onKeyDown, P = fe(o), g = fe(i), m = U((H) => {
2880
+ x == null || x(H), !H.defaultPrevented && (H.key === "Escape" && P(H) && (n == null || n.setValue(b)), (H.key === " " || H.key === "Enter") && me(H) && g(H) && (H.preventDefault(), n == null || n.hide()));
2881
+ }), S = et(xr), I = X(), [_, A] = S || I, w = He(
2882
+ () => [_, A],
2883
+ [_]
2884
+ ), [T, F] = X(null), N = et(Fr);
2885
2885
  W(() => {
2886
- if (M)
2887
- return M(n), () => M(null);
2888
- }, [M, n]), d = le(
2889
- d,
2890
- (H) => /* @__PURE__ */ k(Oo, { value: n, children: /* @__PURE__ */ k(Fr.Provider, { value: N, children: /* @__PURE__ */ k(xr.Provider, { value: S, children: H }) }) }),
2891
- [n, S]
2886
+ if (N)
2887
+ return N(n), () => N(null);
2888
+ }, [N, n]), f = le(
2889
+ f,
2890
+ (H) => /* @__PURE__ */ k(Oo, { value: n, children: /* @__PURE__ */ k(Fr.Provider, { value: F, children: /* @__PURE__ */ k(xr.Provider, { value: w, children: H }) }) }),
2891
+ [n, w]
2892
2892
  );
2893
- const I = !!n.combobox;
2894
- u = u ?? (!I && T !== n);
2893
+ const C = !!n.combobox;
2894
+ u = u ?? (!C && T !== n);
2895
2895
  const [L, D] = ao(
2896
2896
  u ? n.setListElement : null
2897
- ), h = Zi(L, "role", d.role), R = (u || (h === "listbox" || h === "menu" || h === "tree" || h === "grid")) && p || void 0, E = nr(x, d.hidden, a), V = E ? B(_({}, d.style), { display: "none" }) : d.style;
2898
- u && (d = _({
2897
+ ), y = Zi(L, "role", f.role), B = (u || (y === "listbox" || y === "menu" || y === "tree" || y === "grid")) && p || void 0, h = nr(E, f.hidden, a), M = h ? $(O({}, f.style), { display: "none" }) : f.style;
2898
+ u && (f = O({
2899
2899
  role: "listbox",
2900
- "aria-multiselectable": R
2901
- }, d));
2900
+ "aria-multiselectable": B
2901
+ }, f));
2902
2902
  const K = n.useState(
2903
2903
  (H) => {
2904
2904
  var ie;
2905
- return O || ((ie = H.labelElement) == null ? void 0 : ie.id);
2905
+ return _ || ((ie = H.labelElement) == null ? void 0 : ie.id);
2906
2906
  }
2907
2907
  );
2908
- return d = B(_({
2908
+ return f = $(O({
2909
2909
  id: c,
2910
2910
  "aria-labelledby": K,
2911
- hidden: E
2912
- }, d), {
2913
- ref: de(D, d.ref),
2914
- style: V,
2911
+ hidden: h
2912
+ }, f), {
2913
+ ref: de(D, f.ref),
2914
+ style: M,
2915
2915
  onKeyDown: m
2916
- }), d = Wo(B(_({ store: n }, d), { composite: u })), d = tr(_({ store: n, typeahead: !I }, d)), d;
2916
+ }), f = Wo($(O({ store: n }, f), { composite: u })), f = tr(O({ store: n, typeahead: !C }, f)), f;
2917
2917
  }
2918
2918
  ), la = G(function(t) {
2919
2919
  const r = qo(t);
@@ -3109,14 +3109,14 @@ function ya({
3109
3109
  }) {
3110
3110
  const o = Y(null), i = Ms({ disclosure: e }), s = _e(e, "contentElement");
3111
3111
  W(() => {
3112
- const d = o.current, f = s;
3113
- d && f && (d.style.zIndex = getComputedStyle(f).zIndex);
3112
+ const f = o.current, d = s;
3113
+ f && d && (f.style.zIndex = getComputedStyle(d).zIndex);
3114
3114
  }, [s]), ee(() => {
3115
- const d = s == null ? void 0 : s.id;
3116
- if (!d) return;
3117
- const f = o.current;
3118
- if (f)
3119
- return Uo(f, d);
3115
+ const f = s == null ? void 0 : s.id;
3116
+ if (!f) return;
3117
+ const d = o.current;
3118
+ if (d)
3119
+ return Uo(d, f);
3120
3120
  }, [s]);
3121
3121
  const u = rr({
3122
3122
  ref: o,
@@ -3135,9 +3135,9 @@ function ya({
3135
3135
  });
3136
3136
  if (!t) return null;
3137
3137
  if (Yr(t))
3138
- return /* @__PURE__ */ k(Dn, B(_({}, u), { render: t }));
3138
+ return /* @__PURE__ */ k(Dn, $(O({}, u), { render: t }));
3139
3139
  const a = typeof t != "boolean" ? t : "div";
3140
- return /* @__PURE__ */ k(Dn, B(_({}, u), { render: /* @__PURE__ */ k(a, {}) }));
3140
+ return /* @__PURE__ */ k(Dn, $(O({}, u), { render: /* @__PURE__ */ k(a, {}) }));
3141
3141
  }
3142
3142
  function Sa(e, ...t) {
3143
3143
  if (!e) return !1;
@@ -3220,29 +3220,29 @@ function Ia(e, t, r) {
3220
3220
  });
3221
3221
  W(() => {
3222
3222
  if (!n() || !e) return;
3223
- const o = ne(e), i = ro(e), { documentElement: s, body: u } = o, a = s.style.getPropertyValue("--scrollbar-width"), d = a ? Number.parseInt(a) : i.innerWidth - s.clientWidth, f = () => fa(
3223
+ const o = ne(e), i = ro(e), { documentElement: s, body: u } = o, a = s.style.getPropertyValue("--scrollbar-width"), f = a ? Number.parseInt(a) : i.innerWidth - s.clientWidth, d = () => fa(
3224
3224
  s,
3225
3225
  "--scrollbar-width",
3226
- `${d}px`
3226
+ `${f}px`
3227
3227
  ), c = Pa(s), l = () => On(u, {
3228
3228
  overflow: "hidden",
3229
- [c]: `${d}px`
3229
+ [c]: `${f}px`
3230
3230
  }), p = () => {
3231
- var v, x;
3232
- const { scrollX: w, scrollY: P, visualViewport: g } = i, m = (v = g == null ? void 0 : g.offsetLeft) != null ? v : 0, y = (x = g == null ? void 0 : g.offsetTop) != null ? x : 0, C = On(u, {
3231
+ var v, E;
3232
+ const { scrollX: x, scrollY: P, visualViewport: g } = i, m = (v = g == null ? void 0 : g.offsetLeft) != null ? v : 0, S = (E = g == null ? void 0 : g.offsetTop) != null ? E : 0, I = On(u, {
3233
3233
  position: "fixed",
3234
3234
  overflow: "hidden",
3235
- top: `${-(P - Math.floor(y))}px`,
3236
- left: `${-(w - Math.floor(m))}px`,
3235
+ top: `${-(P - Math.floor(S))}px`,
3236
+ left: `${-(x - Math.floor(m))}px`,
3237
3237
  right: "0",
3238
- [c]: `${d}px`
3238
+ [c]: `${f}px`
3239
3239
  });
3240
3240
  return () => {
3241
- C(), process.env.NODE_ENV !== "test" && i.scrollTo({ left: w, top: P, behavior: "instant" });
3241
+ I(), process.env.NODE_ENV !== "test" && i.scrollTo({ left: x, top: P, behavior: "instant" });
3242
3242
  };
3243
3243
  }, b = Mn() && !ji();
3244
3244
  return Te(
3245
- f(),
3245
+ d(),
3246
3246
  b ? p() : l()
3247
3247
  );
3248
3248
  }, [n, e]);
@@ -3252,8 +3252,8 @@ function Ca(e) {
3252
3252
  const t = et(Mr), [r, n] = X([]), o = xe(
3253
3253
  (u) => {
3254
3254
  var a;
3255
- return n((d) => [...d, u]), Te((a = t.add) == null ? void 0 : a.call(t, u), () => {
3256
- n((d) => d.filter((f) => f !== u));
3255
+ return n((f) => [...f, u]), Te((a = t.add) == null ? void 0 : a.call(t, u), () => {
3256
+ n((f) => f.filter((d) => d !== u));
3257
3257
  });
3258
3258
  },
3259
3259
  [t]
@@ -3312,13 +3312,13 @@ function bn({
3312
3312
  if (!s || !o) return;
3313
3313
  const { contentElement: a } = e.getState();
3314
3314
  if (!a) return;
3315
- const d = () => {
3315
+ const f = () => {
3316
3316
  u.current = !0;
3317
3317
  };
3318
- return a.addEventListener("focusin", d, !0), () => a.removeEventListener("focusin", d, !0);
3319
- }, [e, s, o]), W(() => s ? Ce(t, (d) => {
3320
- const { contentElement: f, disclosureElement: c } = e.getState(), l = d.target;
3321
- !f || !l || !_a(l) || se(f, l) || Da(c, l) || l.hasAttribute("data-focus-trap") || Aa(d, f) || u.current && !sr(l, f.id) || ou(l) || i(d);
3318
+ return a.addEventListener("focusin", f, !0), () => a.removeEventListener("focusin", f, !0);
3319
+ }, [e, s, o]), W(() => s ? Ce(t, (f) => {
3320
+ const { contentElement: d, disclosureElement: c } = e.getState(), l = f.target;
3321
+ !d || !l || !_a(l) || se(d, l) || Da(c, l) || l.hasAttribute("data-focus-trap") || Aa(f, d) || u.current && !sr(l, d.id) || ou(l) || i(f);
3322
3322
  }, n) : void 0, [s, n]);
3323
3323
  }
3324
3324
  function yn(e, t) {
@@ -3326,19 +3326,19 @@ function yn(e, t) {
3326
3326
  }
3327
3327
  function Ta(e, t, r) {
3328
3328
  const n = _e(e, "open"), o = Oa(n), i = { store: e, domReady: r, capture: !0 };
3329
- bn(B(_({}, i), {
3329
+ bn($(O({}, i), {
3330
3330
  type: "click",
3331
3331
  listener: (s) => {
3332
3332
  const { contentElement: u } = e.getState(), a = o.current;
3333
3333
  a && oo(a) && sr(a, u == null ? void 0 : u.id) && yn(t, s) && e.hide();
3334
3334
  }
3335
- })), bn(B(_({}, i), {
3335
+ })), bn($(O({}, i), {
3336
3336
  type: "focusin",
3337
3337
  listener: (s) => {
3338
3338
  const { contentElement: u } = e.getState();
3339
3339
  u && s.target !== ne(u) && yn(t, s) && e.hide();
3340
3340
  }
3341
- })), bn(B(_({}, i), {
3341
+ })), bn($(O({}, i), {
3342
3342
  type: "contextmenu",
3343
3343
  listener: (s) => {
3344
3344
  yn(t, s) && e.hide();
@@ -3382,8 +3382,8 @@ function Fa({ level: e, children: t }) {
3382
3382
  }
3383
3383
  var Na = "span", Xo = Z(
3384
3384
  function(t) {
3385
- return t = B(_({}, t), {
3386
- style: _({
3385
+ return t = $(O({}, t), {
3386
+ style: O({
3387
3387
  border: 0,
3388
3388
  clip: "rect(0 0 0 0)",
3389
3389
  height: "1px",
@@ -3403,12 +3403,12 @@ G(function(t) {
3403
3403
  });
3404
3404
  var Ma = "span", ka = Z(
3405
3405
  function(t) {
3406
- return t = B(_({
3406
+ return t = $(O({
3407
3407
  "data-focus-trap": "",
3408
3408
  tabIndex: 0,
3409
3409
  "aria-hidden": !0
3410
3410
  }, t), {
3411
- style: _({
3411
+ style: O({
3412
3412
  // Prevents unintended scroll jumps.
3413
3413
  position: "fixed",
3414
3414
  top: 0,
@@ -3448,45 +3448,45 @@ var Jo = Z(function(t) {
3448
3448
  "portalRef",
3449
3449
  "portal"
3450
3450
  ]);
3451
- const d = Y(null), f = de(d, a.ref), c = et(kr), [l, p] = X(null), [b, v] = X(
3451
+ const f = Y(null), d = de(f, a.ref), c = et(kr), [l, p] = X(null), [b, v] = X(
3452
3452
  null
3453
- ), x = Y(null), w = Y(null), P = Y(null), g = Y(null);
3453
+ ), E = Y(null), x = Y(null), P = Y(null), g = Y(null);
3454
3454
  return ee(() => {
3455
- const m = d.current;
3455
+ const m = f.current;
3456
3456
  if (!m || !u) {
3457
3457
  p(null);
3458
3458
  return;
3459
3459
  }
3460
- const y = Ba(m, i);
3461
- if (!y) {
3460
+ const S = Ba(m, i);
3461
+ if (!S) {
3462
3462
  p(null);
3463
3463
  return;
3464
3464
  }
3465
- const C = y.isConnected;
3466
- if (C || (c || $a(m)).appendChild(y), y.id || (y.id = m.id ? `portal/${m.id}` : Ka()), p(y), wn(s, y), !C)
3465
+ const I = S.isConnected;
3466
+ if (I || (c || $a(m)).appendChild(S), S.id || (S.id = m.id ? `portal/${m.id}` : Ka()), p(S), wn(s, S), !I)
3467
3467
  return () => {
3468
- y.remove(), wn(s, null);
3468
+ S.remove(), wn(s, null);
3469
3469
  };
3470
3470
  }, [u, i, c, s]), ee(() => {
3471
3471
  if (!u || !n || !o) return;
3472
- const y = ne(o).createElement("span");
3473
- return y.style.position = "fixed", o.insertAdjacentElement("afterend", y), v(y), () => {
3474
- y.remove(), v(null);
3472
+ const S = ne(o).createElement("span");
3473
+ return S.style.position = "fixed", o.insertAdjacentElement("afterend", S), v(S), () => {
3474
+ S.remove(), v(null);
3475
3475
  };
3476
3476
  }, [u, n, o]), W(() => {
3477
3477
  if (!l || !n) return;
3478
3478
  let m = 0;
3479
- const y = (C) => {
3480
- if (!pt(C)) return;
3481
- const O = C.type === "focusin";
3482
- if (cancelAnimationFrame(m), O)
3479
+ const S = (I) => {
3480
+ if (!pt(I)) return;
3481
+ const _ = I.type === "focusin";
3482
+ if (cancelAnimationFrame(m), _)
3483
3483
  return eu(l);
3484
3484
  m = requestAnimationFrame(() => {
3485
3485
  Zs(l, !0);
3486
3486
  });
3487
3487
  };
3488
- return l.addEventListener("focusin", y, !0), l.addEventListener("focusout", y, !0), () => {
3489
- cancelAnimationFrame(m), l.removeEventListener("focusin", y, !0), l.removeEventListener("focusout", y, !0);
3488
+ return l.addEventListener("focusin", S, !0), l.addEventListener("focusout", S, !0), () => {
3489
+ cancelAnimationFrame(m), l.removeEventListener("focusin", S, !0), l.removeEventListener("focusout", S, !0);
3490
3490
  };
3491
3491
  }, [l, n]), a = le(
3492
3492
  a,
@@ -3499,7 +3499,7 @@ var Jo = Z(function(t) {
3499
3499
  return /* @__PURE__ */ k(
3500
3500
  "span",
3501
3501
  {
3502
- ref: f,
3502
+ ref: d,
3503
3503
  id: a.id,
3504
3504
  style: { position: "fixed" },
3505
3505
  hidden: !0
@@ -3509,11 +3509,11 @@ var Jo = Z(function(t) {
3509
3509
  n && l && /* @__PURE__ */ k(
3510
3510
  $t,
3511
3511
  {
3512
- ref: w,
3512
+ ref: x,
3513
3513
  "data-focus-trap": a.id,
3514
3514
  className: "__focus-trap-inner-before",
3515
- onFocus: (C) => {
3516
- pt(C, l) ? je(mn()) : je(x.current);
3515
+ onFocus: (I) => {
3516
+ pt(I, l) ? je(mn()) : je(E.current);
3517
3517
  }
3518
3518
  }
3519
3519
  ),
@@ -3524,21 +3524,21 @@ var Jo = Z(function(t) {
3524
3524
  ref: P,
3525
3525
  "data-focus-trap": a.id,
3526
3526
  className: "__focus-trap-inner-after",
3527
- onFocus: (C) => {
3528
- pt(C, l) ? je(Pr()) : je(g.current);
3527
+ onFocus: (I) => {
3528
+ pt(I, l) ? je(Pr()) : je(g.current);
3529
3529
  }
3530
3530
  }
3531
3531
  )
3532
3532
  ] }), l && (m = fr(m, l));
3533
- let y = /* @__PURE__ */ Fe(mt, { children: [
3533
+ let S = /* @__PURE__ */ Fe(mt, { children: [
3534
3534
  n && l && /* @__PURE__ */ k(
3535
3535
  $t,
3536
3536
  {
3537
- ref: x,
3537
+ ref: E,
3538
3538
  "data-focus-trap": a.id,
3539
3539
  className: "__focus-trap-outer-before",
3540
- onFocus: (C) => {
3541
- !(C.relatedTarget === g.current) && pt(C, l) ? je(w.current) : je(Pr());
3540
+ onFocus: (I) => {
3541
+ !(I.relatedTarget === g.current) && pt(I, l) ? je(x.current) : je(Pr());
3542
3542
  }
3543
3543
  }
3544
3544
  ),
@@ -3551,35 +3551,35 @@ var Jo = Z(function(t) {
3551
3551
  ref: g,
3552
3552
  "data-focus-trap": a.id,
3553
3553
  className: "__focus-trap-outer-after",
3554
- onFocus: (C) => {
3555
- if (pt(C, l))
3554
+ onFocus: (I) => {
3555
+ if (pt(I, l))
3556
3556
  je(P.current);
3557
3557
  else {
3558
- const O = mn();
3559
- if (O === w.current) {
3558
+ const _ = mn();
3559
+ if (_ === x.current) {
3560
3560
  requestAnimationFrame(() => {
3561
3561
  var A;
3562
3562
  return (A = mn()) == null ? void 0 : A.focus();
3563
3563
  });
3564
3564
  return;
3565
3565
  }
3566
- je(O);
3566
+ je(_);
3567
3567
  }
3568
3568
  }
3569
3569
  }
3570
3570
  )
3571
3571
  ] });
3572
- return b && n && (y = fr(
3573
- y,
3572
+ return b && n && (S = fr(
3573
+ S,
3574
3574
  b
3575
3575
  )), /* @__PURE__ */ Fe(mt, { children: [
3576
- y,
3576
+ S,
3577
3577
  m
3578
3578
  ] });
3579
3579
  },
3580
3580
  [l, c, u, a.id, n, b]
3581
- ), a = B(_({}, a), {
3582
- ref: f
3581
+ ), a = $(O({}, a), {
3582
+ ref: d
3583
3583
  }), a;
3584
3584
  });
3585
3585
  G(function(t) {
@@ -3604,15 +3604,15 @@ var Qo = Z(function(t) {
3604
3604
  focusable: s = !0,
3605
3605
  modal: u = !0,
3606
3606
  portal: a = !!u,
3607
- backdrop: d = !!u,
3608
- hideOnEscape: f = !0,
3607
+ backdrop: f = !!u,
3608
+ hideOnEscape: d = !0,
3609
3609
  hideOnInteractOutside: c = !0,
3610
3610
  getPersistentElements: l,
3611
3611
  preventBodyScroll: p = !!u,
3612
3612
  autoFocusOnShow: b = !0,
3613
3613
  autoFocusOnHide: v = !0,
3614
- initialFocus: x,
3615
- finalFocus: w,
3614
+ initialFocus: E,
3615
+ finalFocus: x,
3616
3616
  unmountOnHide: P,
3617
3617
  unstable_treeSnapshotKey: g
3618
3618
  } = r, m = J(r, [
@@ -3634,96 +3634,96 @@ var Qo = Z(function(t) {
3634
3634
  "unmountOnHide",
3635
3635
  "unstable_treeSnapshotKey"
3636
3636
  ]);
3637
- const y = Qt(), C = Y(null), O = ks({
3638
- store: n || y,
3637
+ const S = Qt(), I = Y(null), _ = ks({
3638
+ store: n || S,
3639
3639
  open: o,
3640
- setOpen($) {
3641
- if ($) return;
3642
- const q = C.current;
3640
+ setOpen(V) {
3641
+ if (V) return;
3642
+ const q = I.current;
3643
3643
  if (!q) return;
3644
3644
  const ae = new Event("close", { bubbles: !1, cancelable: !0 });
3645
- i && q.addEventListener("close", i, { once: !0 }), q.dispatchEvent(ae), ae.defaultPrevented && O.setOpen(!0);
3645
+ i && q.addEventListener("close", i, { once: !0 }), q.dispatchEvent(ae), ae.defaultPrevented && _.setOpen(!0);
3646
3646
  }
3647
- }), { portalRef: A, domReady: S } = lo(a, m.portalRef), T = m.preserveTabOrder, N = _e(
3648
- O,
3649
- ($) => T && !u && $.mounted
3650
- ), M = ot(m.id), I = _e(O, "open"), L = _e(O, "mounted"), D = _e(O, "contentElement"), h = nr(L, m.hidden, m.alwaysVisible);
3651
- Ia(D, M, p && !h), Ta(O, c, S);
3652
- const { wrapElement: F, nestedDialogs: R } = Ca(O);
3653
- m = le(m, F, [F]), ee(() => {
3654
- if (!I) return;
3655
- const $ = C.current, q = We($, !0);
3656
- q && q.tagName !== "BODY" && ($ && se($, q) || O.setDisclosureElement(q));
3657
- }, [O, I]), Vr && W(() => {
3647
+ }), { portalRef: A, domReady: w } = lo(a, m.portalRef), T = m.preserveTabOrder, F = _e(
3648
+ _,
3649
+ (V) => T && !u && V.mounted
3650
+ ), N = ot(m.id), C = _e(_, "open"), L = _e(_, "mounted"), D = _e(_, "contentElement"), y = nr(L, m.hidden, m.alwaysVisible);
3651
+ Ia(D, N, p && !y), Ta(_, c, w);
3652
+ const { wrapElement: R, nestedDialogs: B } = Ca(_);
3653
+ m = le(m, R, [R]), ee(() => {
3654
+ if (!C) return;
3655
+ const V = I.current, q = We(V, !0);
3656
+ q && q.tagName !== "BODY" && (V && se(V, q) || _.setDisclosureElement(q));
3657
+ }, [_, C]), Vr && W(() => {
3658
3658
  if (!L) return;
3659
- const { disclosureElement: $ } = O.getState();
3660
- if (!$ || !Xe($)) return;
3659
+ const { disclosureElement: V } = _.getState();
3660
+ if (!V || !Xe(V)) return;
3661
3661
  const q = () => {
3662
3662
  let ae = !1;
3663
3663
  const j = () => {
3664
3664
  ae = !0;
3665
3665
  }, Se = { capture: !0, once: !0 };
3666
- $.addEventListener("focusin", j, Se), vt($, "mouseup", () => {
3667
- $.removeEventListener("focusin", j, !0), !ae && Ao($);
3666
+ V.addEventListener("focusin", j, Se), vt(V, "mouseup", () => {
3667
+ V.removeEventListener("focusin", j, !0), !ae && Ao(V);
3668
3668
  });
3669
3669
  };
3670
- return $.addEventListener("mousedown", q), () => {
3671
- $.removeEventListener("mousedown", q);
3670
+ return V.addEventListener("mousedown", q), () => {
3671
+ V.removeEventListener("mousedown", q);
3672
3672
  };
3673
- }, [O, L]), W(() => {
3674
- if (!L || !S) return;
3675
- const $ = C.current;
3676
- if (!$) return;
3677
- const q = ro($), ae = q.visualViewport || q, j = () => {
3673
+ }, [_, L]), W(() => {
3674
+ if (!L || !w) return;
3675
+ const V = I.current;
3676
+ if (!V) return;
3677
+ const q = ro(V), ae = q.visualViewport || q, j = () => {
3678
3678
  var Se, Re;
3679
3679
  const Et = (Re = (Se = q.visualViewport) == null ? void 0 : Se.height) != null ? Re : q.innerHeight;
3680
- $.style.setProperty("--dialog-viewport-height", `${Et}px`);
3680
+ V.style.setProperty("--dialog-viewport-height", `${Et}px`);
3681
3681
  };
3682
3682
  return j(), ae.addEventListener("resize", j), () => {
3683
3683
  ae.removeEventListener("resize", j);
3684
3684
  };
3685
- }, [L, S]), W(() => {
3686
- if (!u || !L || !S) return;
3687
- const $ = C.current;
3688
- if (!(!$ || $.querySelector("[data-dialog-dismiss]")))
3689
- return La($, O.hide);
3690
- }, [O, u, L, S]), ee(() => {
3691
- if (!jo() || I || !L || !S) return;
3692
- const $ = C.current;
3693
- if ($)
3694
- return Go($);
3695
- }, [I, L, S]);
3696
- const E = I && S;
3685
+ }, [L, w]), W(() => {
3686
+ if (!u || !L || !w) return;
3687
+ const V = I.current;
3688
+ if (!(!V || V.querySelector("[data-dialog-dismiss]")))
3689
+ return La(V, _.hide);
3690
+ }, [_, u, L, w]), ee(() => {
3691
+ if (!jo() || C || !L || !w) return;
3692
+ const V = I.current;
3693
+ if (V)
3694
+ return Go(V);
3695
+ }, [C, L, w]);
3696
+ const h = C && w;
3697
3697
  ee(() => {
3698
- if (!M || !E) return;
3699
- const $ = C.current;
3700
- return va(M, [$]);
3701
- }, [M, E, g]);
3702
- const V = U(l);
3698
+ if (!N || !h) return;
3699
+ const V = I.current;
3700
+ return va(N, [V]);
3701
+ }, [N, h, g]);
3702
+ const M = U(l);
3703
3703
  ee(() => {
3704
- if (!M || !E) return;
3705
- const { disclosureElement: $ } = O.getState(), q = C.current, ae = V() || [], j = [
3704
+ if (!N || !h) return;
3705
+ const { disclosureElement: V } = _.getState(), q = I.current, ae = M() || [], j = [
3706
3706
  q,
3707
3707
  ...ae,
3708
- ...R.map((Se) => Se.getState().contentElement)
3708
+ ...B.map((Se) => Se.getState().contentElement)
3709
3709
  ];
3710
3710
  return u ? Te(
3711
- Nr(M, j),
3712
- Ea(M, j)
3713
- ) : Nr(M, [$, ...j]);
3711
+ Nr(N, j),
3712
+ Ea(N, j)
3713
+ ) : Nr(N, [V, ...j]);
3714
3714
  }, [
3715
+ N,
3716
+ _,
3717
+ h,
3715
3718
  M,
3716
- O,
3717
- E,
3718
- V,
3719
- R,
3719
+ B,
3720
3720
  u,
3721
3721
  g
3722
3722
  ]);
3723
3723
  const K = !!b, H = fe(b), [ie, oe] = X(!1);
3724
3724
  W(() => {
3725
- if (!I || !K || !S || !(D != null && D.isConnected)) return;
3726
- const $ = $r(x, !0) || // If no initial focus is specified, we try to focus the first element
3725
+ if (!C || !K || !w || !(D != null && D.isConnected)) return;
3726
+ const V = $r(E, !0) || // If no initial focus is specified, we try to focus the first element
3727
3727
  // with the autofocus attribute. If it's an Ariakit component, the
3728
3728
  // Focusable component will consume the autoFocus prop and add the
3729
3729
  // data-autofocus attribute to the element instead.
@@ -3733,31 +3733,31 @@ var Qo = Z(function(t) {
3733
3733
  // dialogs with preserveTabOrder set to true will not receive focus
3734
3734
  // properly because the elements aren't tabbable until the dialog receives
3735
3735
  // focus.
3736
- Gs(D, !0, a && N) || // Finally, we fallback to the dialog element itself.
3737
- D, q = De($);
3738
- H(q ? $ : null) && (oe(!0), queueMicrotask(() => {
3739
- $.focus(), Vr && $.scrollIntoView({ block: "nearest", inline: "nearest" });
3736
+ Gs(D, !0, a && F) || // Finally, we fallback to the dialog element itself.
3737
+ D, q = De(V);
3738
+ H(q ? V : null) && (oe(!0), queueMicrotask(() => {
3739
+ V.focus(), Vr && V.scrollIntoView({ block: "nearest", inline: "nearest" });
3740
3740
  }));
3741
3741
  }, [
3742
- I,
3742
+ C,
3743
3743
  K,
3744
- S,
3744
+ w,
3745
3745
  D,
3746
- x,
3746
+ E,
3747
3747
  a,
3748
- N,
3748
+ F,
3749
3749
  H
3750
3750
  ]);
3751
3751
  const re = !!v, be = fe(v), [ze, ye] = X(!1);
3752
3752
  W(() => {
3753
- if (I)
3753
+ if (C)
3754
3754
  return ye(!0), () => ye(!1);
3755
- }, [I]);
3755
+ }, [C]);
3756
3756
  const Ie = xe(
3757
- ($, q = !0) => {
3758
- const { disclosureElement: ae } = O.getState();
3759
- if (Wa($)) return;
3760
- let j = $r(w) || ae;
3757
+ (V, q = !0) => {
3758
+ const { disclosureElement: ae } = _.getState();
3759
+ if (Wa(V)) return;
3760
+ let j = $r(x) || ae;
3761
3761
  if (j != null && j.id) {
3762
3762
  const Re = ne(j), Et = `[aria-activedescendant="${j.id}"]`, Ft = Re.querySelector(Et);
3763
3763
  Ft && (j = Ft);
@@ -3771,76 +3771,76 @@ var Qo = Z(function(t) {
3771
3771
  }
3772
3772
  const Se = j && De(j);
3773
3773
  if (!Se && q) {
3774
- requestAnimationFrame(() => Ie($, !1));
3774
+ requestAnimationFrame(() => Ie(V, !1));
3775
3775
  return;
3776
3776
  }
3777
3777
  be(Se ? j : null) && Se && (j == null || j.focus());
3778
3778
  },
3779
- [O, w, be]
3779
+ [_, x, be]
3780
3780
  ), ue = Y(!1);
3781
3781
  ee(() => {
3782
- if (I || !ze || !re) return;
3783
- const $ = C.current;
3784
- ue.current = !0, Ie($);
3785
- }, [I, ze, S, re, Ie]), W(() => {
3782
+ if (C || !ze || !re) return;
3783
+ const V = I.current;
3784
+ ue.current = !0, Ie(V);
3785
+ }, [C, ze, w, re, Ie]), W(() => {
3786
3786
  if (!ze || !re) return;
3787
- const $ = C.current;
3787
+ const V = I.current;
3788
3788
  return () => {
3789
3789
  if (ue.current) {
3790
3790
  ue.current = !1;
3791
3791
  return;
3792
3792
  }
3793
- Ie($);
3793
+ Ie(V);
3794
3794
  };
3795
3795
  }, [ze, re, Ie]);
3796
- const ut = fe(f);
3797
- W(() => !S || !L ? void 0 : Ce("keydown", (q) => {
3796
+ const ut = fe(d);
3797
+ W(() => !w || !L ? void 0 : Ce("keydown", (q) => {
3798
3798
  if (q.key !== "Escape" || q.defaultPrevented) return;
3799
- const ae = C.current;
3799
+ const ae = I.current;
3800
3800
  if (!ae || sr(ae)) return;
3801
3801
  const j = q.target;
3802
3802
  if (!j) return;
3803
- const { disclosureElement: Se } = O.getState();
3804
- !!(j.tagName === "BODY" || se(ae, j) || !Se || se(Se, j)) && ut(q) && O.hide();
3805
- }, !0), [O, S, L, ut]), m = le(
3803
+ const { disclosureElement: Se } = _.getState();
3804
+ !!(j.tagName === "BODY" || se(ae, j) || !Se || se(Se, j)) && ut(q) && _.hide();
3805
+ }, !0), [_, w, L, ut]), m = le(
3806
3806
  m,
3807
- ($) => /* @__PURE__ */ k(Fa, { level: u ? 1 : void 0, children: $ }),
3807
+ (V) => /* @__PURE__ */ k(Fa, { level: u ? 1 : void 0, children: V }),
3808
3808
  [u]
3809
3809
  );
3810
3810
  const at = m.hidden, Me = m.alwaysVisible;
3811
3811
  m = le(
3812
3812
  m,
3813
- ($) => d ? /* @__PURE__ */ Fe(mt, { children: [
3813
+ (V) => f ? /* @__PURE__ */ Fe(mt, { children: [
3814
3814
  /* @__PURE__ */ k(
3815
3815
  ya,
3816
3816
  {
3817
- store: O,
3818
- backdrop: d,
3817
+ store: _,
3818
+ backdrop: f,
3819
3819
  hidden: at,
3820
3820
  alwaysVisible: Me
3821
3821
  }
3822
3822
  ),
3823
- $
3824
- ] }) : $,
3825
- [O, d, at, Me]
3823
+ V
3824
+ ] }) : V,
3825
+ [_, f, at, Me]
3826
3826
  );
3827
3827
  const [Ue, ct] = X(), [lt, ft] = X();
3828
3828
  return m = le(
3829
3829
  m,
3830
- ($) => /* @__PURE__ */ k(zn, { value: O, children: /* @__PURE__ */ k(ps.Provider, { value: ct, children: /* @__PURE__ */ k(ms.Provider, { value: ft, children: $ }) }) }),
3831
- [O]
3832
- ), m = B(_({
3833
- id: M,
3830
+ (V) => /* @__PURE__ */ k(zn, { value: _, children: /* @__PURE__ */ k(ps.Provider, { value: ct, children: /* @__PURE__ */ k(ms.Provider, { value: ft, children: V }) }) }),
3831
+ [_]
3832
+ ), m = $(O({
3833
+ id: N,
3834
3834
  "data-dialog": "",
3835
3835
  role: "dialog",
3836
3836
  tabIndex: s ? -1 : void 0,
3837
3837
  "aria-labelledby": Ue,
3838
3838
  "aria-describedby": lt
3839
3839
  }, m), {
3840
- ref: de(C, m.ref)
3841
- }), m = Yo(B(_({}, m), {
3840
+ ref: de(I, m.ref)
3841
+ }), m = Yo($(O({}, m), {
3842
3842
  autoFocusOnShow: ie
3843
- })), m = rr(_({ store: O }, m)), m = on(B(_({}, m), { focusable: s })), m = Jo(B(_({ portal: a }, m), { portalRef: A, preserveTabOrder: N })), m;
3843
+ })), m = rr(O({ store: _ }, m)), m = on($(O({}, m), { focusable: s })), m = Jo($(O({ portal: a }, m), { portalRef: A, preserveTabOrder: F })), m;
3844
3844
  });
3845
3845
  function ur(e, t = Qt) {
3846
3846
  return G(function(n) {
@@ -3848,7 +3848,7 @@ function ur(e, t = Qt) {
3848
3848
  return _e(
3849
3849
  i,
3850
3850
  (u) => !n.unmountOnHide || (u == null ? void 0 : u.mounted) || !!n.open
3851
- ) ? /* @__PURE__ */ k(e, _({}, n)) : null;
3851
+ ) ? /* @__PURE__ */ k(e, O({}, n)) : null;
3852
3852
  });
3853
3853
  }
3854
3854
  ur(
@@ -3872,7 +3872,7 @@ function st(e) {
3872
3872
  }
3873
3873
  function Br(e, t, r) {
3874
3874
  let { reference: n, floating: o } = e;
3875
- const i = n.x + n.width / 2 - o.width / 2, s = n.y + n.height / 2 - o.height / 2, u = st(t), a = ar(u), d = n[a] / 2 - o[a] / 2, f = u === "x";
3875
+ const i = n.x + n.width / 2 - o.width / 2, s = n.y + n.height / 2 - o.height / 2, u = st(t), a = ar(u), f = n[a] / 2 - o[a] / 2, d = u === "x";
3876
3876
  let c;
3877
3877
  switch (Be(t)) {
3878
3878
  case "top":
@@ -3892,21 +3892,21 @@ function Br(e, t, r) {
3892
3892
  }
3893
3893
  switch (wt(t)) {
3894
3894
  case "start":
3895
- c[u] -= d * (r && f ? -1 : 1);
3895
+ c[u] -= f * (r && d ? -1 : 1);
3896
3896
  break;
3897
3897
  case "end":
3898
- c[u] += d * (r && f ? -1 : 1);
3898
+ c[u] += f * (r && d ? -1 : 1);
3899
3899
  }
3900
3900
  return c;
3901
3901
  }
3902
3902
  const qa = async (e, t, r) => {
3903
3903
  const { placement: n = "bottom", strategy: o = "absolute", middleware: i = [], platform: s } = r, u = i.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(t));
3904
- let d = await s.getElementRects({ reference: e, floating: t, strategy: o }), { x: f, y: c } = Br(d, n, a), l = n, p = {}, b = 0;
3904
+ let f = await s.getElementRects({ reference: e, floating: t, strategy: o }), { x: d, y: c } = Br(f, n, a), l = n, p = {}, b = 0;
3905
3905
  for (let v = 0; v < u.length; v++) {
3906
- const { name: x, fn: w } = u[v], { x: P, y: g, data: m, reset: y } = await w({ x: f, y: c, initialPlacement: n, placement: l, strategy: o, middlewareData: p, rects: d, platform: s, elements: { reference: e, floating: t } });
3907
- f = P ?? f, c = g ?? c, p = { ...p, [x]: { ...p[x], ...m } }, y && b <= 50 && (b++, typeof y == "object" && (y.placement && (l = y.placement), y.rects && (d = y.rects === !0 ? await s.getElementRects({ reference: e, floating: t, strategy: o }) : y.rects), { x: f, y: c } = Br(d, l, a)), v = -1);
3906
+ const { name: E, fn: x } = u[v], { x: P, y: g, data: m, reset: S } = await x({ x: d, y: c, initialPlacement: n, placement: l, strategy: o, middlewareData: p, rects: f, platform: s, elements: { reference: e, floating: t } });
3907
+ d = P ?? d, c = g ?? c, p = { ...p, [E]: { ...p[E], ...m } }, S && b <= 50 && (b++, typeof S == "object" && (S.placement && (l = S.placement), S.rects && (f = S.rects === !0 ? await s.getElementRects({ reference: e, floating: t, strategy: o }) : S.rects), { x: d, y: c } = Br(f, l, a)), v = -1);
3908
3908
  }
3909
- return { x: f, y: c, placement: l, strategy: o, middlewareData: p };
3909
+ return { x: d, y: c, placement: l, strategy: o, middlewareData: p };
3910
3910
  };
3911
3911
  function Zo(e) {
3912
3912
  return typeof e != "number" ? function(t) {
@@ -3919,21 +3919,21 @@ function jt(e) {
3919
3919
  async function cr(e, t) {
3920
3920
  var r;
3921
3921
  t === void 0 && (t = {});
3922
- const { x: n, y: o, platform: i, rects: s, elements: u, strategy: a } = e, { boundary: d = "clippingAncestors", rootBoundary: f = "viewport", elementContext: c = "floating", altBoundary: l = !1, padding: p = 0 } = t, b = Zo(p), v = u[l ? c === "floating" ? "reference" : "floating" : c], x = jt(await i.getClippingRect({ element: (r = await (i.isElement == null ? void 0 : i.isElement(v))) == null || r ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(u.floating)), boundary: d, rootBoundary: f, strategy: a })), w = c === "floating" ? { ...s.floating, x: n, y: o } : s.reference, P = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u.floating)), g = await (i.isElement == null ? void 0 : i.isElement(P)) && await (i.getScale == null ? void 0 : i.getScale(P)) || { x: 1, y: 1 }, m = jt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({ rect: w, offsetParent: P, strategy: a }) : w);
3923
- return { top: (x.top - m.top + b.top) / g.y, bottom: (m.bottom - x.bottom + b.bottom) / g.y, left: (x.left - m.left + b.left) / g.x, right: (m.right - x.right + b.right) / g.x };
3922
+ const { x: n, y: o, platform: i, rects: s, elements: u, strategy: a } = e, { boundary: f = "clippingAncestors", rootBoundary: d = "viewport", elementContext: c = "floating", altBoundary: l = !1, padding: p = 0 } = t, b = Zo(p), v = u[l ? c === "floating" ? "reference" : "floating" : c], E = jt(await i.getClippingRect({ element: (r = await (i.isElement == null ? void 0 : i.isElement(v))) == null || r ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(u.floating)), boundary: f, rootBoundary: d, strategy: a })), x = c === "floating" ? { ...s.floating, x: n, y: o } : s.reference, P = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u.floating)), g = await (i.isElement == null ? void 0 : i.isElement(P)) && await (i.getScale == null ? void 0 : i.getScale(P)) || { x: 1, y: 1 }, m = jt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({ rect: x, offsetParent: P, strategy: a }) : x);
3923
+ return { top: (E.top - m.top + b.top) / g.y, bottom: (m.bottom - E.bottom + b.bottom) / g.y, left: (E.left - m.left + b.left) / g.x, right: (m.right - E.right + b.right) / g.x };
3924
3924
  }
3925
3925
  const An = Math.min, Ze = Math.max;
3926
3926
  function Tn(e, t, r) {
3927
3927
  return Ze(e, An(t, r));
3928
3928
  }
3929
3929
  const za = (e) => ({ name: "arrow", options: e, async fn(t) {
3930
- const { element: r, padding: n = 0 } = e, { x: o, y: i, placement: s, rects: u, platform: a, elements: d } = t;
3930
+ const { element: r, padding: n = 0 } = e, { x: o, y: i, placement: s, rects: u, platform: a, elements: f } = t;
3931
3931
  if (r == null) return {};
3932
- const f = Zo(n), c = { x: o, y: i }, l = st(s), p = ar(l), b = await a.getDimensions(r), v = l === "y", x = v ? "top" : "left", w = v ? "bottom" : "right", P = v ? "clientHeight" : "clientWidth", g = u.reference[p] + u.reference[l] - c[l] - u.floating[p], m = c[l] - u.reference[l], y = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(r));
3933
- let C = y ? y[P] : 0;
3934
- C && await (a.isElement == null ? void 0 : a.isElement(y)) || (C = d.floating[P] || u.floating[p]);
3935
- const O = g / 2 - m / 2, A = f[x], S = C - b[p] - f[w], T = C / 2 - b[p] / 2 + O, N = Tn(A, T, S), M = wt(s) != null && T != N && u.reference[p] / 2 - (T < A ? f[x] : f[w]) - b[p] / 2 < 0;
3936
- return { [l]: c[l] - (M ? T < A ? A - T : S - T : 0), data: { [l]: N, centerOffset: T - N } };
3932
+ const d = Zo(n), c = { x: o, y: i }, l = st(s), p = ar(l), b = await a.getDimensions(r), v = l === "y", E = v ? "top" : "left", x = v ? "bottom" : "right", P = v ? "clientHeight" : "clientWidth", g = u.reference[p] + u.reference[l] - c[l] - u.floating[p], m = c[l] - u.reference[l], S = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(r));
3933
+ let I = S ? S[P] : 0;
3934
+ I && await (a.isElement == null ? void 0 : a.isElement(S)) || (I = f.floating[P] || u.floating[p]);
3935
+ const _ = g / 2 - m / 2, A = d[E], w = I - b[p] - d[x], T = I / 2 - b[p] / 2 + _, F = Tn(A, T, w), N = wt(s) != null && T != F && u.reference[p] / 2 - (T < A ? d[E] : d[x]) - b[p] / 2 < 0;
3936
+ return { [l]: c[l] - (N ? T < A ? A - T : w - T : 0), data: { [l]: F, centerOffset: T - F } };
3937
3937
  } }), Ua = ["top", "right", "bottom", "left"];
3938
3938
  Ua.reduce((e, t) => e.concat(t, t + "-start", t + "-end"), []);
3939
3939
  const ja = { left: "right", right: "left", bottom: "top", top: "bottom" };
@@ -3953,58 +3953,58 @@ function Sn(e) {
3953
3953
  const Xa = function(e) {
3954
3954
  return e === void 0 && (e = {}), { name: "flip", options: e, async fn(t) {
3955
3955
  var r;
3956
- const { placement: n, middlewareData: o, rects: i, initialPlacement: s, platform: u, elements: a } = t, { mainAxis: d = !0, crossAxis: f = !0, fallbackPlacements: c, fallbackStrategy: l = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: b = !0, ...v } = e, x = Be(n), w = Be(s) === s, P = await (u.isRTL == null ? void 0 : u.isRTL(a.floating)), g = c || (w || !b ? [Gt(s)] : function(N) {
3957
- const M = Gt(N);
3958
- return [Sn(N), M, Sn(M)];
3956
+ const { placement: n, middlewareData: o, rects: i, initialPlacement: s, platform: u, elements: a } = t, { mainAxis: f = !0, crossAxis: d = !0, fallbackPlacements: c, fallbackStrategy: l = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: b = !0, ...v } = e, E = Be(n), x = Be(s) === s, P = await (u.isRTL == null ? void 0 : u.isRTL(a.floating)), g = c || (x || !b ? [Gt(s)] : function(F) {
3957
+ const N = Gt(F);
3958
+ return [Sn(F), N, Sn(N)];
3959
3959
  }(s));
3960
- c || p === "none" || g.push(...function(N, M, I, L) {
3961
- const D = wt(N);
3962
- let h = function(F, R, E) {
3963
- const V = ["left", "right"], K = ["right", "left"], H = ["top", "bottom"], ie = ["bottom", "top"];
3964
- switch (F) {
3960
+ c || p === "none" || g.push(...function(F, N, C, L) {
3961
+ const D = wt(F);
3962
+ let y = function(R, B, h) {
3963
+ const M = ["left", "right"], K = ["right", "left"], H = ["top", "bottom"], ie = ["bottom", "top"];
3964
+ switch (R) {
3965
3965
  case "top":
3966
3966
  case "bottom":
3967
- return E ? R ? K : V : R ? V : K;
3967
+ return h ? B ? K : M : B ? M : K;
3968
3968
  case "left":
3969
3969
  case "right":
3970
- return R ? H : ie;
3970
+ return B ? H : ie;
3971
3971
  default:
3972
3972
  return [];
3973
3973
  }
3974
- }(Be(N), I === "start", L);
3975
- return D && (h = h.map((F) => F + "-" + D), M && (h = h.concat(h.map(Sn)))), h;
3974
+ }(Be(F), C === "start", L);
3975
+ return D && (y = y.map((R) => R + "-" + D), N && (y = y.concat(y.map(Sn)))), y;
3976
3976
  }(s, b, p, P));
3977
- const m = [s, ...g], y = await cr(t, v), C = [];
3978
- let O = ((r = o.flip) == null ? void 0 : r.overflows) || [];
3979
- if (d && C.push(y[x]), f) {
3980
- const { main: N, cross: M } = Ga(n, i, P);
3981
- C.push(y[N], y[M]);
3977
+ const m = [s, ...g], S = await cr(t, v), I = [];
3978
+ let _ = ((r = o.flip) == null ? void 0 : r.overflows) || [];
3979
+ if (f && I.push(S[E]), d) {
3980
+ const { main: F, cross: N } = Ga(n, i, P);
3981
+ I.push(S[F], S[N]);
3982
3982
  }
3983
- if (O = [...O, { placement: n, overflows: C }], !C.every((N) => N <= 0)) {
3984
- var A, S;
3985
- const N = (((A = o.flip) == null ? void 0 : A.index) || 0) + 1, M = m[N];
3986
- if (M) return { data: { index: N, overflows: O }, reset: { placement: M } };
3987
- let I = (S = O.filter((L) => L.overflows[0] <= 0).sort((L, D) => L.overflows[1] - D.overflows[1])[0]) == null ? void 0 : S.placement;
3988
- if (!I) switch (l) {
3983
+ if (_ = [..._, { placement: n, overflows: I }], !I.every((F) => F <= 0)) {
3984
+ var A, w;
3985
+ const F = (((A = o.flip) == null ? void 0 : A.index) || 0) + 1, N = m[F];
3986
+ if (N) return { data: { index: F, overflows: _ }, reset: { placement: N } };
3987
+ let C = (w = _.filter((L) => L.overflows[0] <= 0).sort((L, D) => L.overflows[1] - D.overflows[1])[0]) == null ? void 0 : w.placement;
3988
+ if (!C) switch (l) {
3989
3989
  case "bestFit": {
3990
3990
  var T;
3991
- const L = (T = O.map((D) => [D.placement, D.overflows.filter((h) => h > 0).reduce((h, F) => h + F, 0)]).sort((D, h) => D[1] - h[1])[0]) == null ? void 0 : T[0];
3992
- L && (I = L);
3991
+ const L = (T = _.map((D) => [D.placement, D.overflows.filter((y) => y > 0).reduce((y, R) => y + R, 0)]).sort((D, y) => D[1] - y[1])[0]) == null ? void 0 : T[0];
3992
+ L && (C = L);
3993
3993
  break;
3994
3994
  }
3995
3995
  case "initialPlacement":
3996
- I = s;
3996
+ C = s;
3997
3997
  }
3998
- if (n !== I) return { reset: { placement: I } };
3998
+ if (n !== C) return { reset: { placement: C } };
3999
3999
  }
4000
4000
  return {};
4001
4001
  } };
4002
4002
  }, Ja = function(e) {
4003
4003
  return e === void 0 && (e = 0), { name: "offset", options: e, async fn(t) {
4004
4004
  const { x: r, y: n } = t, o = await async function(i, s) {
4005
- const { placement: u, platform: a, elements: d } = i, f = await (a.isRTL == null ? void 0 : a.isRTL(d.floating)), c = Be(u), l = wt(u), p = st(u) === "x", b = ["left", "top"].includes(c) ? -1 : 1, v = f && p ? -1 : 1, x = typeof s == "function" ? s(i) : s;
4006
- let { mainAxis: w, crossAxis: P, alignmentAxis: g } = typeof x == "number" ? { mainAxis: x, crossAxis: 0, alignmentAxis: null } : { mainAxis: 0, crossAxis: 0, alignmentAxis: null, ...x };
4007
- return l && typeof g == "number" && (P = l === "end" ? -1 * g : g), p ? { x: P * v, y: w * b } : { x: w * b, y: P * v };
4005
+ const { placement: u, platform: a, elements: f } = i, d = await (a.isRTL == null ? void 0 : a.isRTL(f.floating)), c = Be(u), l = wt(u), p = st(u) === "x", b = ["left", "top"].includes(c) ? -1 : 1, v = d && p ? -1 : 1, E = typeof s == "function" ? s(i) : s;
4006
+ let { mainAxis: x, crossAxis: P, alignmentAxis: g } = typeof E == "number" ? { mainAxis: E, crossAxis: 0, alignmentAxis: null } : { mainAxis: 0, crossAxis: 0, alignmentAxis: null, ...E };
4007
+ return l && typeof g == "number" && (P = l === "end" ? -1 * g : g), p ? { x: P * v, y: x * b } : { x: x * b, y: P * v };
4008
4008
  }(t, e);
4009
4009
  return { x: r + o.x, y: n + o.y, data: o };
4010
4010
  } };
@@ -4014,60 +4014,60 @@ function ei(e) {
4014
4014
  }
4015
4015
  const Qa = function(e) {
4016
4016
  return e === void 0 && (e = {}), { name: "shift", options: e, async fn(t) {
4017
- const { x: r, y: n, placement: o } = t, { mainAxis: i = !0, crossAxis: s = !1, limiter: u = { fn: (x) => {
4018
- let { x: w, y: P } = x;
4019
- return { x: w, y: P };
4020
- } }, ...a } = e, d = { x: r, y: n }, f = await cr(t, a), c = st(Be(o)), l = ei(c);
4021
- let p = d[c], b = d[l];
4017
+ const { x: r, y: n, placement: o } = t, { mainAxis: i = !0, crossAxis: s = !1, limiter: u = { fn: (E) => {
4018
+ let { x, y: P } = E;
4019
+ return { x, y: P };
4020
+ } }, ...a } = e, f = { x: r, y: n }, d = await cr(t, a), c = st(Be(o)), l = ei(c);
4021
+ let p = f[c], b = f[l];
4022
4022
  if (i) {
4023
- const x = c === "y" ? "bottom" : "right";
4024
- p = Tn(p + f[c === "y" ? "top" : "left"], p, p - f[x]);
4023
+ const E = c === "y" ? "bottom" : "right";
4024
+ p = Tn(p + d[c === "y" ? "top" : "left"], p, p - d[E]);
4025
4025
  }
4026
4026
  if (s) {
4027
- const x = l === "y" ? "bottom" : "right";
4028
- b = Tn(b + f[l === "y" ? "top" : "left"], b, b - f[x]);
4027
+ const E = l === "y" ? "bottom" : "right";
4028
+ b = Tn(b + d[l === "y" ? "top" : "left"], b, b - d[E]);
4029
4029
  }
4030
4030
  const v = u.fn({ ...t, [c]: p, [l]: b });
4031
4031
  return { ...v, data: { x: v.x - r, y: v.y - n } };
4032
4032
  } };
4033
4033
  }, Za = function(e) {
4034
4034
  return e === void 0 && (e = {}), { options: e, fn(t) {
4035
- const { x: r, y: n, placement: o, rects: i, middlewareData: s } = t, { offset: u = 0, mainAxis: a = !0, crossAxis: d = !0 } = e, f = { x: r, y: n }, c = st(o), l = ei(c);
4036
- let p = f[c], b = f[l];
4037
- const v = typeof u == "function" ? u(t) : u, x = typeof v == "number" ? { mainAxis: v, crossAxis: 0 } : { mainAxis: 0, crossAxis: 0, ...v };
4035
+ const { x: r, y: n, placement: o, rects: i, middlewareData: s } = t, { offset: u = 0, mainAxis: a = !0, crossAxis: f = !0 } = e, d = { x: r, y: n }, c = st(o), l = ei(c);
4036
+ let p = d[c], b = d[l];
4037
+ const v = typeof u == "function" ? u(t) : u, E = typeof v == "number" ? { mainAxis: v, crossAxis: 0 } : { mainAxis: 0, crossAxis: 0, ...v };
4038
4038
  if (a) {
4039
- const g = c === "y" ? "height" : "width", m = i.reference[c] - i.floating[g] + x.mainAxis, y = i.reference[c] + i.reference[g] - x.mainAxis;
4040
- p < m ? p = m : p > y && (p = y);
4039
+ const g = c === "y" ? "height" : "width", m = i.reference[c] - i.floating[g] + E.mainAxis, S = i.reference[c] + i.reference[g] - E.mainAxis;
4040
+ p < m ? p = m : p > S && (p = S);
4041
4041
  }
4042
- if (d) {
4043
- var w, P;
4044
- const g = c === "y" ? "width" : "height", m = ["top", "left"].includes(Be(o)), y = i.reference[l] - i.floating[g] + (m && ((w = s.offset) == null ? void 0 : w[l]) || 0) + (m ? 0 : x.crossAxis), C = i.reference[l] + i.reference[g] + (m ? 0 : ((P = s.offset) == null ? void 0 : P[l]) || 0) - (m ? x.crossAxis : 0);
4045
- b < y ? b = y : b > C && (b = C);
4042
+ if (f) {
4043
+ var x, P;
4044
+ const g = c === "y" ? "width" : "height", m = ["top", "left"].includes(Be(o)), S = i.reference[l] - i.floating[g] + (m && ((x = s.offset) == null ? void 0 : x[l]) || 0) + (m ? 0 : E.crossAxis), I = i.reference[l] + i.reference[g] + (m ? 0 : ((P = s.offset) == null ? void 0 : P[l]) || 0) - (m ? E.crossAxis : 0);
4045
+ b < S ? b = S : b > I && (b = I);
4046
4046
  }
4047
4047
  return { [c]: p, [l]: b };
4048
4048
  } };
4049
4049
  }, ec = function(e) {
4050
4050
  return e === void 0 && (e = {}), { name: "size", options: e, async fn(t) {
4051
4051
  const { placement: r, rects: n, platform: o, elements: i } = t, { apply: s = () => {
4052
- }, ...u } = e, a = await cr(t, u), d = Be(r), f = wt(r), c = st(r) === "x", { width: l, height: p } = n.floating;
4052
+ }, ...u } = e, a = await cr(t, u), f = Be(r), d = wt(r), c = st(r) === "x", { width: l, height: p } = n.floating;
4053
4053
  let b, v;
4054
- d === "top" || d === "bottom" ? (b = d, v = f === (await (o.isRTL == null ? void 0 : o.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (v = d, b = f === "end" ? "top" : "bottom");
4055
- const x = p - a[b], w = l - a[v], P = !t.middlewareData.shift;
4056
- let g = x, m = w;
4054
+ f === "top" || f === "bottom" ? (b = f, v = d === (await (o.isRTL == null ? void 0 : o.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (v = f, b = d === "end" ? "top" : "bottom");
4055
+ const E = p - a[b], x = l - a[v], P = !t.middlewareData.shift;
4056
+ let g = E, m = x;
4057
4057
  if (c) {
4058
- const C = l - a.left - a.right;
4059
- m = f || P ? An(w, C) : C;
4058
+ const I = l - a.left - a.right;
4059
+ m = d || P ? An(x, I) : I;
4060
4060
  } else {
4061
- const C = p - a.top - a.bottom;
4062
- g = f || P ? An(x, C) : C;
4061
+ const I = p - a.top - a.bottom;
4062
+ g = d || P ? An(E, I) : I;
4063
4063
  }
4064
- if (P && !f) {
4065
- const C = Ze(a.left, 0), O = Ze(a.right, 0), A = Ze(a.top, 0), S = Ze(a.bottom, 0);
4066
- c ? m = l - 2 * (C !== 0 || O !== 0 ? C + O : Ze(a.left, a.right)) : g = p - 2 * (A !== 0 || S !== 0 ? A + S : Ze(a.top, a.bottom));
4064
+ if (P && !d) {
4065
+ const I = Ze(a.left, 0), _ = Ze(a.right, 0), A = Ze(a.top, 0), w = Ze(a.bottom, 0);
4066
+ c ? m = l - 2 * (I !== 0 || _ !== 0 ? I + _ : Ze(a.left, a.right)) : g = p - 2 * (A !== 0 || w !== 0 ? A + w : Ze(a.top, a.bottom));
4067
4067
  }
4068
4068
  await s({ ...t, availableWidth: m, availableHeight: g });
4069
- const y = await o.getDimensions(i.floating);
4070
- return l !== y.width || p !== y.height ? { reset: { rects: !0 } } : {};
4069
+ const S = await o.getDimensions(i.floating);
4070
+ return l !== S.width || p !== S.height ? { reset: { rects: !0 } } : {};
4071
4071
  } };
4072
4072
  };
4073
4073
  function we(e) {
@@ -4142,14 +4142,14 @@ function nt(e, t, r, n) {
4142
4142
  const s = e.getBoundingClientRect(), u = oi(e);
4143
4143
  let a = ii;
4144
4144
  t && (n ? Ee(n) && (a = gt(n)) : a = gt(e));
4145
- const d = u ? we(u) : window, f = Rn() && r;
4146
- let c = (s.left + (f && ((o = d.visualViewport) == null ? void 0 : o.offsetLeft) || 0)) / a.x, l = (s.top + (f && ((i = d.visualViewport) == null ? void 0 : i.offsetTop) || 0)) / a.y, p = s.width / a.x, b = s.height / a.y;
4145
+ const f = u ? we(u) : window, d = Rn() && r;
4146
+ let c = (s.left + (d && ((o = f.visualViewport) == null ? void 0 : o.offsetLeft) || 0)) / a.x, l = (s.top + (d && ((i = f.visualViewport) == null ? void 0 : i.offsetTop) || 0)) / a.y, p = s.width / a.x, b = s.height / a.y;
4147
4147
  if (u) {
4148
- const v = we(u), x = n && Ee(n) ? we(n) : n;
4149
- let w = v.frameElement;
4150
- for (; w && n && x !== v; ) {
4151
- const P = gt(w), g = w.getBoundingClientRect(), m = getComputedStyle(w);
4152
- g.x += (w.clientLeft + parseFloat(m.paddingLeft)) * P.x, g.y += (w.clientTop + parseFloat(m.paddingTop)) * P.y, c *= P.x, l *= P.y, p *= P.x, b *= P.y, c += g.x, l += g.y, w = we(w).frameElement;
4148
+ const v = we(u), E = n && Ee(n) ? we(n) : n;
4149
+ let x = v.frameElement;
4150
+ for (; x && n && E !== v; ) {
4151
+ const P = gt(x), g = x.getBoundingClientRect(), m = getComputedStyle(x);
4152
+ g.x += (x.clientLeft + parseFloat(m.paddingLeft)) * P.x, g.y += (x.clientTop + parseFloat(m.paddingTop)) * P.y, c *= P.x, l *= P.y, p *= P.x, b *= P.y, c += g.x, l += g.y, x = we(x).frameElement;
4153
4153
  }
4154
4154
  }
4155
4155
  return jt({ width: p, height: b, x: c, y: l });
@@ -4181,24 +4181,24 @@ function It(e, t) {
4181
4181
  function Wr(e, t, r) {
4182
4182
  let n;
4183
4183
  if (t === "viewport") n = function(s, u) {
4184
- const a = we(s), d = Ye(s), f = a.visualViewport;
4185
- let c = d.clientWidth, l = d.clientHeight, p = 0, b = 0;
4186
- if (f) {
4187
- c = f.width, l = f.height;
4184
+ const a = we(s), f = Ye(s), d = a.visualViewport;
4185
+ let c = f.clientWidth, l = f.clientHeight, p = 0, b = 0;
4186
+ if (d) {
4187
+ c = d.width, l = d.height;
4188
4188
  const v = Rn();
4189
- (!v || v && u === "fixed") && (p = f.offsetLeft, b = f.offsetTop);
4189
+ (!v || v && u === "fixed") && (p = d.offsetLeft, b = d.offsetTop);
4190
4190
  }
4191
4191
  return { width: c, height: l, x: p, y: b };
4192
4192
  }(e, r);
4193
4193
  else if (t === "document") n = function(s) {
4194
- const u = Ye(s), a = un(s), d = s.ownerDocument.body, f = Pt(u.scrollWidth, u.clientWidth, d.scrollWidth, d.clientWidth), c = Pt(u.scrollHeight, u.clientHeight, d.scrollHeight, d.clientHeight);
4194
+ const u = Ye(s), a = un(s), f = s.ownerDocument.body, d = Pt(u.scrollWidth, u.clientWidth, f.scrollWidth, f.clientWidth), c = Pt(u.scrollHeight, u.clientHeight, f.scrollHeight, f.clientHeight);
4195
4195
  let l = -a.scrollLeft + si(s);
4196
4196
  const p = -a.scrollTop;
4197
- return Ae(d).direction === "rtl" && (l += Pt(u.clientWidth, d.clientWidth) - f), { width: f, height: c, x: l, y: p };
4197
+ return Ae(f).direction === "rtl" && (l += Pt(u.clientWidth, f.clientWidth) - d), { width: d, height: c, x: l, y: p };
4198
4198
  }(Ye(e));
4199
4199
  else if (Ee(t)) n = function(s, u) {
4200
- const a = nt(s, !0, u === "fixed"), d = a.top + s.clientTop, f = a.left + s.clientLeft, c = Le(s) ? gt(s) : { x: 1, y: 1 };
4201
- return { width: s.clientWidth * c.x, height: s.clientHeight * c.y, x: f * c.x, y: d * c.y };
4200
+ const a = nt(s, !0, u === "fixed"), f = a.top + s.clientTop, d = a.left + s.clientLeft, c = Le(s) ? gt(s) : { x: 1, y: 1 };
4201
+ return { width: s.clientWidth * c.x, height: s.clientHeight * c.y, x: d * c.x, y: f * c.y };
4202
4202
  }(t, r);
4203
4203
  else {
4204
4204
  const s = { ...t };
@@ -4244,20 +4244,20 @@ function nc(e, t, r) {
4244
4244
  }
4245
4245
  const rc = { getClippingRect: function(e) {
4246
4246
  let { element: t, boundary: r, rootBoundary: n, strategy: o } = e;
4247
- const i = r === "clippingAncestors" ? function(d, f) {
4248
- const c = f.get(d);
4247
+ const i = r === "clippingAncestors" ? function(f, d) {
4248
+ const c = d.get(f);
4249
4249
  if (c) return c;
4250
- let l = It(d).filter((x) => Ee(x) && Je(x) !== "body"), p = null;
4251
- const b = Ae(d).position === "fixed";
4252
- let v = b ? bt(d) : d;
4250
+ let l = It(f).filter((E) => Ee(E) && Je(E) !== "body"), p = null;
4251
+ const b = Ae(f).position === "fixed";
4252
+ let v = b ? bt(f) : f;
4253
4253
  for (; Ee(v) && !sn(v); ) {
4254
- const x = Ae(v), w = Ln(v);
4255
- w || x.position !== "fixed" || (p = null), (b ? !w && !p : !w && x.position === "static" && p && ["absolute", "fixed"].includes(p.position) || Ot(v) && !w && ai(d, v)) ? l = l.filter((P) => P !== v) : p = x, v = bt(v);
4254
+ const E = Ae(v), x = Ln(v);
4255
+ x || E.position !== "fixed" || (p = null), (b ? !x && !p : !x && E.position === "static" && p && ["absolute", "fixed"].includes(p.position) || Ot(v) && !x && ai(f, v)) ? l = l.filter((P) => P !== v) : p = E, v = bt(v);
4256
4256
  }
4257
- return f.set(d, l), l;
4258
- }(t, this._c) : [].concat(r), s = [...i, n], u = s[0], a = s.reduce((d, f) => {
4259
- const c = Wr(t, f, o);
4260
- return d.top = Pt(c.top, d.top), d.right = Hr(c.right, d.right), d.bottom = Hr(c.bottom, d.bottom), d.left = Pt(c.left, d.left), d;
4257
+ return d.set(f, l), l;
4258
+ }(t, this._c) : [].concat(r), s = [...i, n], u = s[0], a = s.reduce((f, d) => {
4259
+ const c = Wr(t, d, o);
4260
+ return f.top = Pt(c.top, f.top), f.right = Hr(c.right, f.right), f.bottom = Hr(c.bottom, f.bottom), f.left = Pt(c.left, f.left), f;
4261
4261
  }, Wr(t, u, o));
4262
4262
  return { width: a.right - a.left, height: a.bottom - a.top, x: a.left, y: a.top };
4263
4263
  }, convertOffsetParentRelativeRectToViewportRelativeRect: function(e) {
@@ -4267,8 +4267,8 @@ const rc = { getClippingRect: function(e) {
4267
4267
  let s = { scrollLeft: 0, scrollTop: 0 }, u = { x: 1, y: 1 };
4268
4268
  const a = { x: 0, y: 0 };
4269
4269
  if ((o || !o && n !== "fixed") && ((Je(r) !== "body" || Ot(i)) && (s = un(r)), Le(r))) {
4270
- const d = nt(r);
4271
- u = gt(r), a.x = d.x + r.clientLeft, a.y = d.y + r.clientTop;
4270
+ const f = nt(r);
4271
+ u = gt(r), a.x = f.x + r.clientLeft, a.y = f.y + r.clientTop;
4272
4272
  }
4273
4273
  return { width: t.width * u.x, height: t.height * u.y, x: t.x * u.x - s.scrollLeft * u.x + a.x, y: t.y * u.y - s.scrollTop * u.y + a.y };
4274
4274
  }, isElement: Ee, getDimensions: function(e) {
@@ -4285,19 +4285,19 @@ function oc(e, t, r, n) {
4285
4285
  const p = !Ee(l) && l.toString().includes("V");
4286
4286
  !o || u && !p || l.addEventListener("scroll", r, { passive: !0 }), i && l.addEventListener("resize", r);
4287
4287
  });
4288
- let d, f = null;
4289
- s && (f = new ResizeObserver(() => {
4288
+ let f, d = null;
4289
+ s && (d = new ResizeObserver(() => {
4290
4290
  r();
4291
- }), Ee(e) && !u && f.observe(e), Ee(e) || !e.contextElement || u || f.observe(e.contextElement), f.observe(t));
4291
+ }), Ee(e) && !u && d.observe(e), Ee(e) || !e.contextElement || u || d.observe(e.contextElement), d.observe(t));
4292
4292
  let c = u ? nt(e) : null;
4293
4293
  return u && function l() {
4294
4294
  const p = nt(e);
4295
- !c || p.x === c.x && p.y === c.y && p.width === c.width && p.height === c.height || r(), c = p, d = requestAnimationFrame(l);
4295
+ !c || p.x === c.x && p.y === c.y && p.width === c.width && p.height === c.height || r(), c = p, f = requestAnimationFrame(l);
4296
4296
  }(), r(), () => {
4297
4297
  var l;
4298
4298
  a.forEach((p) => {
4299
4299
  o && p.removeEventListener("scroll", r), i && p.removeEventListener("resize", r);
4300
- }), (l = f) == null || l.disconnect(), f = null, u && cancelAnimationFrame(d);
4300
+ }), (l = d) == null || l.disconnect(), d = null, u && cancelAnimationFrame(f);
4301
4301
  };
4302
4302
  }
4303
4303
  const ic = (e, t, r) => {
@@ -4318,7 +4318,7 @@ function Ur(e = 0, t = 0, r = 0, n = 0) {
4318
4318
  bottom: t + n,
4319
4319
  left: e
4320
4320
  };
4321
- return B(_({}, o), { toJSON: () => o });
4321
+ return $(O({}, o), { toJSON: () => o });
4322
4322
  }
4323
4323
  function uc(e) {
4324
4324
  if (!e) return Ur();
@@ -4406,19 +4406,19 @@ var ci = Z(
4406
4406
  preserveTabOrder: s = !0,
4407
4407
  autoFocusOnShow: u = !0,
4408
4408
  wrapperProps: a,
4409
- fixed: d = !1,
4410
- flip: f = !0,
4409
+ fixed: f = !1,
4410
+ flip: d = !0,
4411
4411
  shift: c = 0,
4412
4412
  slide: l = !0,
4413
4413
  overlap: p = !1,
4414
4414
  sameWidth: b = !1,
4415
4415
  fitViewport: v = !1,
4416
- gutter: x,
4417
- arrowPadding: w = 4,
4416
+ gutter: E,
4417
+ arrowPadding: x = 4,
4418
4418
  overflowPadding: P = 8,
4419
4419
  getAnchorRect: g,
4420
4420
  updatePosition: m
4421
- } = r, y = J(r, [
4421
+ } = r, S = J(r, [
4422
4422
  "store",
4423
4423
  "modal",
4424
4424
  "portal",
@@ -4438,49 +4438,49 @@ var ci = Z(
4438
4438
  "getAnchorRect",
4439
4439
  "updatePosition"
4440
4440
  ]);
4441
- const C = Zt();
4442
- n = n || C, he(
4441
+ const I = Zt();
4442
+ n = n || I, he(
4443
4443
  n,
4444
4444
  process.env.NODE_ENV !== "production" && "Popover must receive a `store` prop or be wrapped in a PopoverProvider component."
4445
4445
  );
4446
- const O = n.useState("arrowElement"), A = n.useState("anchorElement"), S = n.useState("disclosureElement"), T = n.useState("popoverElement"), N = n.useState("contentElement"), M = n.useState("placement"), I = n.useState("mounted"), L = n.useState("rendered"), D = Y(null), [h, F] = X(!1), { portalRef: R, domReady: E } = lo(i, y.portalRef), V = U(g), K = U(m), H = !!m;
4446
+ const _ = n.useState("arrowElement"), A = n.useState("anchorElement"), w = n.useState("disclosureElement"), T = n.useState("popoverElement"), F = n.useState("contentElement"), N = n.useState("placement"), C = n.useState("mounted"), L = n.useState("rendered"), D = Y(null), [y, R] = X(!1), { portalRef: B, domReady: h } = lo(i, S.portalRef), M = U(g), K = U(m), H = !!m;
4447
4447
  ee(() => {
4448
4448
  if (!(T != null && T.isConnected)) return;
4449
4449
  T.style.setProperty(
4450
4450
  "--popover-overflow-padding",
4451
4451
  `${P}px`
4452
4452
  );
4453
- const oe = ac(A, V), re = async () => {
4454
- if (!I) return;
4455
- O || (D.current = D.current || document.createElement("div"));
4456
- const ye = O || D.current, Ie = [
4457
- lc(ye, { gutter: x, shift: c }),
4458
- fc({ flip: f, overflowPadding: P }),
4453
+ const oe = ac(A, M), re = async () => {
4454
+ if (!C) return;
4455
+ _ || (D.current = D.current || document.createElement("div"));
4456
+ const ye = _ || D.current, Ie = [
4457
+ lc(ye, { gutter: E, shift: c }),
4458
+ fc({ flip: d, overflowPadding: P }),
4459
4459
  dc({ slide: l, shift: c, overlap: p, overflowPadding: P }),
4460
- mc(ye, { arrowPadding: w }),
4460
+ mc(ye, { arrowPadding: x }),
4461
4461
  pc({
4462
4462
  sameWidth: b,
4463
4463
  fitViewport: v,
4464
4464
  overflowPadding: P
4465
4465
  })
4466
4466
  ], ue = await ic(oe, T, {
4467
- placement: M,
4468
- strategy: d ? "fixed" : "absolute",
4467
+ placement: N,
4468
+ strategy: f ? "fixed" : "absolute",
4469
4469
  middleware: Ie
4470
4470
  });
4471
- n == null || n.setState("currentPlacement", ue.placement), F(!0);
4471
+ n == null || n.setState("currentPlacement", ue.placement), R(!0);
4472
4472
  const ut = jr(ue.x), at = jr(ue.y);
4473
4473
  if (Object.assign(T.style, {
4474
4474
  top: "0",
4475
4475
  left: "0",
4476
4476
  transform: `translate3d(${ut}px,${at}px,0)`
4477
4477
  }), ye && ue.middlewareData.arrow) {
4478
- const { x: Me, y: Ue } = ue.middlewareData.arrow, ct = ue.placement.split("-")[0], lt = ye.clientWidth / 2, ft = ye.clientHeight / 2, $ = Me != null ? Me + lt : -lt, q = Ue != null ? Ue + ft : -ft;
4478
+ const { x: Me, y: Ue } = ue.middlewareData.arrow, ct = ue.placement.split("-")[0], lt = ye.clientWidth / 2, ft = ye.clientHeight / 2, V = Me != null ? Me + lt : -lt, q = Ue != null ? Ue + ft : -ft;
4479
4479
  T.style.setProperty(
4480
4480
  "--popover-transform-origin",
4481
4481
  {
4482
- top: `${$}px calc(100% + ${ft}px)`,
4483
- bottom: `${$}px ${-ft}px`,
4482
+ top: `${V}px calc(100% + ${ft}px)`,
4483
+ bottom: `${V}px ${-ft}px`,
4484
4484
  left: `calc(100% + ${lt}px) ${q}px`,
4485
4485
  right: `${-lt}px ${q}px`
4486
4486
  }[ct]
@@ -4491,55 +4491,55 @@ var ci = Z(
4491
4491
  });
4492
4492
  }
4493
4493
  }, ze = oc(oe, T, async () => {
4494
- H ? (await K({ updatePosition: re }), F(!0)) : await re();
4494
+ H ? (await K({ updatePosition: re }), R(!0)) : await re();
4495
4495
  }, {
4496
4496
  // JSDOM doesn't support ResizeObserver
4497
4497
  elementResize: typeof ResizeObserver == "function"
4498
4498
  });
4499
4499
  return () => {
4500
- F(!1), ze();
4500
+ R(!1), ze();
4501
4501
  };
4502
4502
  }, [
4503
4503
  n,
4504
4504
  L,
4505
4505
  T,
4506
- O,
4506
+ _,
4507
4507
  A,
4508
4508
  T,
4509
- M,
4510
- I,
4511
- E,
4512
- d,
4509
+ N,
4510
+ C,
4511
+ h,
4513
4512
  f,
4513
+ d,
4514
4514
  c,
4515
4515
  l,
4516
4516
  p,
4517
4517
  b,
4518
4518
  v,
4519
+ E,
4519
4520
  x,
4520
- w,
4521
4521
  P,
4522
- V,
4522
+ M,
4523
4523
  H,
4524
4524
  K
4525
4525
  ]), ee(() => {
4526
- if (!I || !E || !(T != null && T.isConnected) || !(N != null && N.isConnected)) return;
4526
+ if (!C || !h || !(T != null && T.isConnected) || !(F != null && F.isConnected)) return;
4527
4527
  const oe = () => {
4528
- T.style.zIndex = getComputedStyle(N).zIndex;
4528
+ T.style.zIndex = getComputedStyle(F).zIndex;
4529
4529
  };
4530
4530
  oe();
4531
4531
  let re = requestAnimationFrame(() => {
4532
4532
  re = requestAnimationFrame(oe);
4533
4533
  });
4534
4534
  return () => cancelAnimationFrame(re);
4535
- }, [I, E, T, N]);
4536
- const ie = d ? "fixed" : "absolute";
4537
- return y = le(
4538
- y,
4535
+ }, [C, h, T, F]);
4536
+ const ie = f ? "fixed" : "absolute";
4537
+ return S = le(
4538
+ S,
4539
4539
  (oe) => /* @__PURE__ */ k(
4540
4540
  "div",
4541
- B(_({}, a), {
4542
- style: _({
4541
+ $(O({}, a), {
4542
+ style: O({
4543
4543
  // https://floating-ui.com/docs/computeposition#initial-layout
4544
4544
  position: ie,
4545
4545
  top: 0,
@@ -4551,30 +4551,30 @@ var ci = Z(
4551
4551
  })
4552
4552
  ),
4553
4553
  [n, ie, a]
4554
- ), y = le(
4555
- y,
4554
+ ), S = le(
4555
+ S,
4556
4556
  (oe) => /* @__PURE__ */ k(en, { value: n, children: oe }),
4557
4557
  [n]
4558
- ), y = B(_({
4558
+ ), S = $(O({
4559
4559
  // data-placing is not part of the public API. We're setting this here so
4560
4560
  // we can wait for the popover to be positioned before other components
4561
4561
  // move focus into it. For example, this attribute is observed by the
4562
4562
  // Combobox component with the autoSelect behavior.
4563
- "data-placing": !h || void 0
4564
- }, y), {
4565
- style: _({
4563
+ "data-placing": !y || void 0
4564
+ }, S), {
4565
+ style: O({
4566
4566
  position: "relative"
4567
- }, y.style)
4568
- }), y = Qo(B(_({
4567
+ }, S.style)
4568
+ }), S = Qo($(O({
4569
4569
  store: n,
4570
4570
  modal: o,
4571
4571
  portal: i,
4572
4572
  preserveTabOrder: s,
4573
- preserveTabOrderAnchor: S || A,
4574
- autoFocusOnShow: h && u
4575
- }, y), {
4576
- portalRef: R
4577
- })), y;
4573
+ preserveTabOrderAnchor: w || A,
4574
+ autoFocusOnShow: y && u
4575
+ }, S), {
4576
+ portalRef: B
4577
+ })), S;
4578
4578
  }
4579
4579
  );
4580
4580
  ur(
@@ -4588,7 +4588,7 @@ var vc = "div", gc = Z(
4588
4588
  function(t) {
4589
4589
  var r = t, { store: n, alwaysVisible: o } = r, i = J(r, ["store", "alwaysVisible"]);
4590
4590
  const s = Jn();
4591
- return n = n || s, i = qo(_({ store: n, alwaysVisible: o }, i)), i = ci(_({ store: n, alwaysVisible: o }, i)), i;
4591
+ return n = n || s, i = qo(O({ store: n, alwaysVisible: o }, i)), i = ci(O({ store: n, alwaysVisible: o }, i)), i;
4592
4592
  }
4593
4593
  ), hc = ur(
4594
4594
  G(function(t) {
@@ -4622,132 +4622,134 @@ function zc({
4622
4622
  onAgentsListOpen: s,
4623
4623
  selectedAgent: u,
4624
4624
  triggerChipClassName: a,
4625
+ useAgentLocalStorage: f = !1,
4626
+ // All non-Box AI Q&A experiences should pass in true
4625
4627
  variant: d = "modal"
4626
4628
  }) {
4627
- var F;
4629
+ var B;
4628
4630
  const {
4629
- formatMessage: f
4630
- } = bi(), [c, l] = X(!1), p = o === fn.ERROR, [b, v] = X(p), [x, w] = Ei(Si), P = wi(), g = o === fn.SUCCESS, m = o === fn.IN_PROGRESS, y = f(Qe.selectAgent), C = f(Qe.defaultAgent);
4631
- let O = "";
4632
- g ? O = (u == null ? void 0 : u.name) ?? y : p && (O = C);
4633
- const A = Y(null), {
4634
- Wrapper: S,
4635
- wrapperProps: T
4631
+ formatMessage: c
4632
+ } = bi(), [l, p] = X(!1), b = o === fn.ERROR, [v, E] = X(b), [x, P] = Ei(Si), g = wi(), m = o === fn.SUCCESS, S = o === fn.IN_PROGRESS, I = c(Qe.selectAgent), _ = c(Qe.defaultAgent);
4633
+ let A = "";
4634
+ m ? A = (u == null ? void 0 : u.name) ?? I : b && (A = _);
4635
+ const w = Y(null), {
4636
+ Wrapper: T,
4637
+ wrapperProps: F
4636
4638
  } = di({
4637
- ref: A,
4638
- textValue: O
4639
+ ref: w,
4640
+ textValue: A
4639
4641
  });
4640
4642
  W(() => {
4641
- c && n && n({
4643
+ l && n && n({
4642
4644
  ...an,
4643
4645
  action: cn,
4644
4646
  target: ln.OPEN_SELECTOR
4645
4647
  });
4646
- }, [c, n]), W(() => {
4647
- if (x) {
4648
- const R = e.find((E) => E.id === x);
4649
- R ? P({
4648
+ }, [l, n]), W(() => {
4649
+ if (f && x) {
4650
+ const h = e.find((M) => M.id === x);
4651
+ h ? g({
4650
4652
  type: dr.SET_SELECTED_AGENT,
4651
- id: R.id
4652
- }) : w(null);
4653
+ id: h.id
4654
+ }) : P(null);
4653
4655
  }
4654
4656
  }, [e]);
4655
- const N = xe((R) => {
4656
- l(!1), P({
4657
+ const N = xe((h) => {
4658
+ p(!1), g({
4657
4659
  type: dr.SET_SELECTED_AGENT,
4658
- id: R.id
4659
- }), w(R.id), n && n({
4660
+ id: h.id
4661
+ }), f && P(h.id), n && n({
4660
4662
  ...an,
4661
4663
  action: cn,
4662
4664
  target: ln.SELECT_AGENT
4663
4665
  });
4664
- }, [P, n, w]), M = xe(() => {
4665
- l(!1), r(), n && n({
4666
+ }, [g, n, P, f]), C = xe(() => {
4667
+ p(!1), r(), n && n({
4666
4668
  ...an,
4667
4669
  action: cn,
4668
4670
  target: ln.RETRY_LOADING_AGENTS
4669
4671
  });
4670
- }, [r, n]), I = xe((R) => v(p && p && !c && R ? R : !1), [p, c]), L = (R) => {
4671
- R && s && s(), l(R);
4672
- }, D = d === "sidebar" && Pe.sidebar, h = (R) => {
4673
- (R.key === "ArrowUp" || R.key === "ArrowDown" || R.key === "ArrowLeft" || R.key === "ArrowRight") && R.stopPropagation();
4672
+ }, [r, n]), L = xe((h) => E(b && b && !l && h ? h : !1), [b, l]), D = (h) => {
4673
+ h && s && s(), p(h);
4674
+ }, y = d === "sidebar" && Pe.sidebar, R = (h) => {
4675
+ (h.key === "ArrowUp" || h.key === "ArrowDown" || h.key === "ArrowLeft" || h.key === "ArrowRight") && h.stopPropagation();
4674
4676
  };
4675
4677
  return /* @__PURE__ */ k(Nt.Group, {
4676
- className: Mt(Pe.agentSelector, a, D),
4677
- name: y,
4678
- onKeyDown: h,
4678
+ className: Mt(Pe.agentSelector, a, y),
4679
+ name: I,
4680
+ onKeyDown: R,
4679
4681
  type: "multiple",
4680
4682
  children: /* @__PURE__ */ Fe(Bu, {
4681
- defaultValue: (F = e[0]) == null ? void 0 : F.id,
4682
- open: c,
4683
- setOpen: L,
4683
+ defaultValue: (B = e[0]) == null ? void 0 : B.id,
4684
+ open: l,
4685
+ setOpen: D,
4684
4686
  children: [/* @__PURE__ */ k(pi, {
4685
- content: f(Qe.errorTooltip),
4686
- onOpenChange: I,
4687
- open: b,
4687
+ content: c(Qe.errorTooltip),
4688
+ onOpenChange: L,
4689
+ open: v,
4688
4690
  side: "bottom",
4689
4691
  variant: "error",
4690
4692
  children: /* @__PURE__ */ k($u, {
4691
4693
  className: Pe.selectAgentButton,
4692
- disabled: i || m,
4694
+ disabled: i || S,
4693
4695
  render: /* @__PURE__ */ Fe(Nt.TriggerChip, {
4694
- "aria-label": O,
4696
+ "aria-label": A,
4695
4697
  className: Pe.triggerChip,
4696
4698
  "data-target-id": "FilterChip.TriggerChip-agentSelectorTrigger",
4697
4699
  value: "trigger-chip",
4698
4700
  children: [/* @__PURE__ */ k(mi, {
4699
4701
  className: Pe.agentStatus,
4700
4702
  colorIndex: 0,
4701
- text: f(Qe.agent)
4702
- }), m && /* @__PURE__ */ k(vi, {
4703
- "aria-label": f(Qe.loadingMessage),
4703
+ text: c(Qe.agent)
4704
+ }), S && /* @__PURE__ */ k(vi, {
4705
+ "aria-label": c(Qe.loadingMessage),
4704
4706
  className: Pe.agentLoader,
4705
4707
  variant: "default"
4706
- }), p && /* @__PURE__ */ k(hi, {
4708
+ }), b && /* @__PURE__ */ k(hi, {
4707
4709
  className: Pe.agentError,
4708
4710
  height: "1rem",
4709
4711
  role: "presentation",
4710
4712
  width: "1rem"
4711
- }), /* @__PURE__ */ k(S, {
4712
- ...T,
4713
+ }), /* @__PURE__ */ k(T, {
4714
+ ...F,
4713
4715
  children: /* @__PURE__ */ k(Nt.Label, {
4714
- ref: A,
4716
+ ref: w,
4715
4717
  className: Pe.agentLabel,
4716
- children: O
4718
+ children: A
4717
4719
  })
4718
- }), !m && /* @__PURE__ */ k("div", {
4720
+ }), !S && /* @__PURE__ */ k("div", {
4719
4721
  className: Pe.dropdownIndicator,
4720
4722
  children: /* @__PURE__ */ k(Nt.DropdownIndicator, {})
4721
4723
  })]
4722
4724
  })
4723
4725
  })
4724
4726
  }), /* @__PURE__ */ Fe(hc, {
4725
- "aria-label": f(Qe.agentList),
4726
- className: Mt(Pe.agentListContainer, D),
4727
+ "aria-label": c(Qe.agentList),
4728
+ className: Mt(Pe.agentListContainer, y),
4727
4729
  unmountOnHide: !0,
4728
- children: [g && /* @__PURE__ */ k(la, {
4730
+ children: [m && /* @__PURE__ */ k(la, {
4729
4731
  className: Mt(Pe.agentList, t),
4730
- children: e.map((R, E) => /* @__PURE__ */ k(Zu, {
4732
+ children: e.map((h, M) => /* @__PURE__ */ k(Zu, {
4731
4733
  clickOnEnter: !0,
4732
4734
  clickOnSpace: !0,
4733
4735
  focusable: !0,
4734
4736
  focusOnHover: !0,
4735
4737
  hideOnClick: !0,
4736
4738
  onClick: () => {
4737
- N(R);
4739
+ N(h);
4738
4740
  },
4739
4741
  setValueOnClick: !0,
4740
- value: R.id,
4742
+ value: h.id,
4741
4743
  children: /* @__PURE__ */ k(yi, {
4742
- agent: R
4744
+ agent: h
4743
4745
  })
4744
- }, R.id))
4745
- }), p && /* @__PURE__ */ k(gi, {
4746
- className: Mt(Pe.agentListRetryButton, D),
4747
- onClick: M,
4746
+ }, h.id))
4747
+ }), b && /* @__PURE__ */ k(gi, {
4748
+ className: Mt(Pe.agentListRetryButton, y),
4749
+ onClick: C,
4748
4750
  variant: "tertiary",
4749
4751
  "data-target-id": "Button-errorMessage",
4750
- children: f(Qe.errorMessage)
4752
+ children: c(Qe.errorMessage)
4751
4753
  })]
4752
4754
  })]
4753
4755
  })