@purpur/library 9.0.0 → 9.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/CHANGELOG.json +12 -0
  2. package/CHANGELOG.md +8 -1
  3. package/dist/LICENSE.txt +5 -5
  4. package/dist/checkbox-Dk3bZkZ3.js.map +1 -1
  5. package/dist/checkbox-LYzMiXu7.mjs.map +1 -1
  6. package/dist/chip-group-CJVvfl_J.mjs.map +1 -1
  7. package/dist/chip-group-aj1fdnjC.js.map +1 -1
  8. package/dist/{date-picker-BRkh2YEH.mjs → date-picker-BRnwwZv1.mjs} +364 -354
  9. package/dist/date-picker-BRnwwZv1.mjs.map +1 -0
  10. package/dist/date-picker-DlJGggam.js +2 -0
  11. package/dist/date-picker-DlJGggam.js.map +1 -0
  12. package/dist/date-picker.cjs.js +1 -1
  13. package/dist/date-picker.es.js +1 -1
  14. package/dist/floating-ui.react-dom-0ol4sFzt.mjs +1363 -0
  15. package/dist/floating-ui.react-dom-0ol4sFzt.mjs.map +1 -0
  16. package/dist/floating-ui.react-dom-Cc_YSprQ.js +2 -0
  17. package/dist/floating-ui.react-dom-Cc_YSprQ.js.map +1 -0
  18. package/dist/index-2cFVyGXq.js.map +1 -1
  19. package/dist/index-B8Mazo6u.mjs.map +1 -1
  20. package/dist/index-BG6K_yAm.js.map +1 -1
  21. package/dist/index-BVmlsxuF.js.map +1 -1
  22. package/dist/index-BbtRr5Q6.js.map +1 -1
  23. package/dist/index-BtWPC8xc.js.map +1 -1
  24. package/dist/index-ByaXH_ih.mjs.map +1 -1
  25. package/dist/index-C1AXAWlO.mjs.map +1 -1
  26. package/dist/index-CCNZ9uWB.mjs.map +1 -1
  27. package/dist/index-CEQ35j8b.mjs.map +1 -1
  28. package/dist/index-CKCTy3ZL.mjs.map +1 -1
  29. package/dist/index-CLMd7NJE.mjs.map +1 -1
  30. package/dist/index-Cje7xxa1.js.map +1 -1
  31. package/dist/index-CleLBinl.js.map +1 -1
  32. package/dist/index-CoR7YA3H.js.map +1 -1
  33. package/dist/index-CxBG4Ssm.js.map +1 -1
  34. package/dist/index-DA01QPpC.js.map +1 -1
  35. package/dist/index-DCcK_d4W.mjs.map +1 -1
  36. package/dist/index-DDrLXRUs.mjs.map +1 -1
  37. package/dist/index-DLcqcWxM.mjs.map +1 -1
  38. package/dist/index-DOFLOnao.js.map +1 -1
  39. package/dist/index-DOfn3ixy.mjs.map +1 -1
  40. package/dist/index-DPxjTK4w.mjs.map +1 -1
  41. package/dist/index-DSf4qCR-.mjs.map +1 -1
  42. package/dist/index-DlMXYAr3.js.map +1 -1
  43. package/dist/index-HJvG7FXj.js.map +1 -1
  44. package/dist/index-Hk_HrrHM.js.map +1 -1
  45. package/dist/index-IpWiejWQ.mjs.map +1 -1
  46. package/dist/index-MiRhI3nq.mjs.map +1 -1
  47. package/dist/index-_XxjJPRD.js.map +1 -1
  48. package/dist/index-kcwFA4Dv.js.map +1 -1
  49. package/dist/index-tyLV0iiH.mjs.map +1 -1
  50. package/dist/label-7sJe5-pX.mjs.map +1 -1
  51. package/dist/label-yHK80hhV.js.map +1 -1
  52. package/dist/library.cjs.js +1 -1
  53. package/dist/library.es.js +5 -5
  54. package/dist/{popover-CYyCtoef.js → popover-B1BgSoQx.js} +2 -2
  55. package/dist/{popover-CYyCtoef.js.map → popover-B1BgSoQx.js.map} +1 -1
  56. package/dist/{popover-C6nZb3cQ.mjs → popover-DBMI9Jy1.mjs} +4 -4
  57. package/dist/{popover-C6nZb3cQ.mjs.map → popover-DBMI9Jy1.mjs.map} +1 -1
  58. package/dist/popover.cjs.js +1 -1
  59. package/dist/popover.es.js +1 -1
  60. package/dist/slider-CDOrFmK-.mjs.map +1 -1
  61. package/dist/slider-_R6JmPZl.js.map +1 -1
  62. package/dist/{stepper-DA0c9Utm.js → stepper-B248FwO-.js} +2 -2
  63. package/dist/{stepper-DA0c9Utm.js.map → stepper-B248FwO-.js.map} +1 -1
  64. package/dist/{stepper-D81jmbEf.mjs → stepper-BfIbJwZn.mjs} +2 -2
  65. package/dist/{stepper-D81jmbEf.mjs.map → stepper-BfIbJwZn.mjs.map} +1 -1
  66. package/dist/stepper.cjs.js +1 -1
  67. package/dist/stepper.es.js +1 -1
  68. package/dist/{table-Dd58bK_Q.js → table-BNeo_B1h.js} +2 -2
  69. package/dist/{table-Dd58bK_Q.js.map → table-BNeo_B1h.js.map} +1 -1
  70. package/dist/{table-CIrmGGb2.mjs → table-DvcpczWf.mjs} +2 -2
  71. package/dist/{table-CIrmGGb2.mjs.map → table-DvcpczWf.mjs.map} +1 -1
  72. package/dist/table.cjs.js +1 -1
  73. package/dist/table.es.js +1 -1
  74. package/dist/tabs-CfHd4UQ2.js.map +1 -1
  75. package/dist/tabs-CoXMAwMx.mjs.map +1 -1
  76. package/dist/toggle-C8IwTbX8.js.map +1 -1
  77. package/dist/toggle-Cezg5MUc.mjs.map +1 -1
  78. package/dist/{tooltip-870Nmk-v.js → tooltip-CLQLxoaf.js} +2 -2
  79. package/dist/{tooltip-870Nmk-v.js.map → tooltip-CLQLxoaf.js.map} +1 -1
  80. package/dist/{tooltip-Cqfj0lSz.mjs → tooltip-DXi7ikUT.mjs} +2 -2
  81. package/dist/{tooltip-Cqfj0lSz.mjs.map → tooltip-DXi7ikUT.mjs.map} +1 -1
  82. package/dist/tooltip.cjs.js +1 -1
  83. package/dist/tooltip.es.js +1 -1
  84. package/dist/visually-hidden-BYFkJEp1.mjs.map +1 -1
  85. package/dist/visually-hidden-C2CKovZx.js.map +1 -1
  86. package/package.json +68 -68
  87. package/dist/date-picker-BRkh2YEH.mjs.map +0 -1
  88. package/dist/date-picker-C2Wtf7XQ.js +0 -2
  89. package/dist/date-picker-C2Wtf7XQ.js.map +0 -1
  90. package/dist/floating-ui.react-dom-B_rB55Mr.mjs +0 -1340
  91. package/dist/floating-ui.react-dom-B_rB55Mr.mjs.map +0 -1
  92. package/dist/floating-ui.react-dom-z0lMBJ4R.js +0 -2
  93. package/dist/floating-ui.react-dom-z0lMBJ4R.js.map +0 -1
@@ -1,15 +1,15 @@
1
- import { jsxs as Ce, jsx as N, Fragment as $t } from "react/jsx-runtime";
1
+ import { jsxs as Ce, jsx as N, Fragment as Kt } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
- import { useLayoutEffect as yt, forwardRef as Bt, useState as Se, useRef as Kt, useEffect as Wt, useId as Ht } from "react";
4
- import { i as ne, a as qt, u as Ut, b as Z, g as Me, c as jt, d as Le, e as Gt, f as Yt, h as Zt, j as wt, k as zt, o as Xt, l as Jt } from "./floating-ui.react-dom-B_rB55Mr.mjs";
5
- import * as Qt from "react-dom";
3
+ import { useLayoutEffect as wt, forwardRef as Wt, useState as Se, useRef as Ht, useEffect as Ut, useId as qt } from "react";
4
+ import { i as ne, a as St, u as jt, b as Z, g as Me, c as Gt, d as Le, e as Yt, f as Zt, h as zt, j as xt, k as Xt, o as Jt, l as Qt } from "./floating-ui.react-dom-0ol4sFzt.mjs";
5
+ import * as en from "react-dom";
6
6
  import { C as Je } from "./calendar-DDie8jSH.mjs";
7
7
  import { D as Qe } from "./date-field-D_6iP2fC.mjs";
8
- import { D as Ve } from "./drawer-Boqmgh-i.mjs";
9
- import { b as en } from "./icon-DNHpBTHs-JfI8WyiR.mjs";
10
- import { c as tn } from "./bind-CU-R61T-.mjs";
11
- var nn = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"], Ie = /* @__PURE__ */ nn.join(","), St = typeof Element > "u", ge = St ? function() {
12
- } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Ae = !St && Element.prototype.getRootNode ? function(e) {
8
+ import { D as _e } from "./drawer-Boqmgh-i.mjs";
9
+ import { b as tn } from "./icon-DNHpBTHs-JfI8WyiR.mjs";
10
+ import { c as nn } from "./bind-CU-R61T-.mjs";
11
+ var rn = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"], Ie = /* @__PURE__ */ rn.join(","), Tt = typeof Element > "u", ge = Tt ? function() {
12
+ } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Ae = !Tt && Element.prototype.getRootNode ? function(e) {
13
13
  var t;
14
14
  return e == null || (t = e.getRootNode) === null || t === void 0 ? void 0 : t.call(e);
15
15
  } : function(e) {
@@ -21,10 +21,10 @@ var nn = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
21
21
  // lookup upward, in case it is not defined.
22
22
  (typeof t.closest == "function" ? t.closest("[inert]") : ke(t.parentNode));
23
23
  return s;
24
- }, rn = function(t) {
24
+ }, on = function(t) {
25
25
  var n, r = t == null || (n = t.getAttribute) === null || n === void 0 ? void 0 : n.call(t, "contenteditable");
26
26
  return r === "" || r === "true";
27
- }, xt = function(t, n, r) {
27
+ }, Ct = function(t, n, r) {
28
28
  if (ke(t))
29
29
  return [];
30
30
  var o = Array.prototype.slice.apply(t.querySelectorAll(Ie));
@@ -42,10 +42,10 @@ var nn = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
42
42
  } else {
43
43
  var v = ge.call(s, Ie);
44
44
  v && r.filter(s) && (n || !t.includes(s)) && o.push(s);
45
- var R = s.shadowRoot || // check for an undisclosed shadow
46
- typeof r.getShadowRoot == "function" && r.getShadowRoot(s), I = !ke(R, !1) && (!r.shadowRootFilter || r.shadowRootFilter(s));
47
- if (R && I) {
48
- var f = De(R === !0 ? s.children : R.children, !0, r);
45
+ var E = s.shadowRoot || // check for an undisclosed shadow
46
+ typeof r.getShadowRoot == "function" && r.getShadowRoot(s), I = !ke(E, !1) && (!r.shadowRootFilter || r.shadowRootFilter(s));
47
+ if (E && I) {
48
+ var f = De(E === !0 ? s.children : E.children, !0, r);
49
49
  r.flatten ? o.push.apply(o, f) : o.push({
50
50
  scopeParent: s,
51
51
  candidates: f
@@ -55,31 +55,31 @@ var nn = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
55
55
  }
56
56
  }
57
57
  return o;
58
- }, Tt = function(t) {
58
+ }, It = function(t) {
59
59
  return !isNaN(parseInt(t.getAttribute("tabindex"), 10));
60
- }, Ct = function(t) {
60
+ }, At = function(t) {
61
61
  if (!t)
62
62
  throw new Error("No node provided");
63
- return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || rn(t)) && !Tt(t) ? 0 : t.tabIndex;
64
- }, on = function(t, n) {
65
- var r = Ct(t);
66
- return r < 0 && n && !Tt(t) ? 0 : r;
63
+ return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || on(t)) && !It(t) ? 0 : t.tabIndex;
67
64
  }, sn = function(t, n) {
65
+ var r = At(t);
66
+ return r < 0 && n && !It(t) ? 0 : r;
67
+ }, an = function(t, n) {
68
68
  return t.tabIndex === n.tabIndex ? t.documentOrder - n.documentOrder : t.tabIndex - n.tabIndex;
69
- }, It = function(t) {
69
+ }, kt = function(t) {
70
70
  return t.tagName === "INPUT";
71
- }, an = function(t) {
72
- return It(t) && t.type === "hidden";
73
71
  }, un = function(t) {
72
+ return kt(t) && t.type === "hidden";
73
+ }, cn = function(t) {
74
74
  var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) {
75
75
  return r.tagName === "SUMMARY";
76
76
  });
77
77
  return n;
78
- }, cn = function(t, n) {
78
+ }, ln = function(t, n) {
79
79
  for (var r = 0; r < t.length; r++)
80
80
  if (t[r].checked && t[r].form === n)
81
81
  return t[r];
82
- }, ln = function(t) {
82
+ }, fn = function(t) {
83
83
  if (!t.name)
84
84
  return !0;
85
85
  var n = t.form || Ae(t), r = function(u) {
@@ -93,26 +93,26 @@ var nn = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
93
93
  } catch (s) {
94
94
  return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", s.message), !1;
95
95
  }
96
- var i = cn(o, t.form);
96
+ var i = ln(o, t.form);
97
97
  return !i || i === t;
98
- }, fn = function(t) {
99
- return It(t) && t.type === "radio";
100
98
  }, dn = function(t) {
101
- return fn(t) && !ln(t);
99
+ return kt(t) && t.type === "radio";
102
100
  }, vn = function(t) {
101
+ return dn(t) && !fn(t);
102
+ }, bn = function(t) {
103
103
  var n, r = t && Ae(t), o = (n = r) === null || n === void 0 ? void 0 : n.host, i = !1;
104
104
  if (r && r !== t) {
105
105
  var s, u, d;
106
106
  for (i = !!((s = o) !== null && s !== void 0 && (u = s.ownerDocument) !== null && u !== void 0 && u.contains(o) || t != null && (d = t.ownerDocument) !== null && d !== void 0 && d.contains(t)); !i && o; ) {
107
- var a, v, R;
108
- r = Ae(o), o = (a = r) === null || a === void 0 ? void 0 : a.host, i = !!((v = o) !== null && v !== void 0 && (R = v.ownerDocument) !== null && R !== void 0 && R.contains(o));
107
+ var a, v, E;
108
+ r = Ae(o), o = (a = r) === null || a === void 0 ? void 0 : a.host, i = !!((v = o) !== null && v !== void 0 && (E = v.ownerDocument) !== null && E !== void 0 && E.contains(o));
109
109
  }
110
110
  }
111
111
  return i;
112
112
  }, et = function(t) {
113
113
  var n = t.getBoundingClientRect(), r = n.width, o = n.height;
114
114
  return r === 0 && o === 0;
115
- }, bn = function(t, n) {
115
+ }, mn = function(t, n) {
116
116
  var r = n.displayCheck, o = n.getShadowRoot;
117
117
  if (r === "full-native" && "checkVisibility" in t) {
118
118
  var i = t.checkVisibility({
@@ -147,14 +147,14 @@ var nn = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
147
147
  }
148
148
  t = d;
149
149
  }
150
- if (vn(t))
150
+ if (bn(t))
151
151
  return !t.getClientRects().length;
152
152
  if (r !== "legacy-full")
153
153
  return !0;
154
154
  } else if (r === "non-zero-area")
155
155
  return et(t);
156
156
  return !1;
157
- }, mn = function(t) {
157
+ }, gn = function(t) {
158
158
  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))
159
159
  for (var n = t.parentElement; n; ) {
160
160
  if (n.tagName === "FIELDSET" && n.disabled) {
@@ -169,17 +169,17 @@ var nn = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
169
169
  }
170
170
  return !1;
171
171
  }, He = function(t, n) {
172
- return !(n.disabled || an(n) || bn(n, t) || // For a details element with a summary, the summary element gets the focus
173
- un(n) || mn(n));
174
- }, qe = function(t, n) {
175
- return !(dn(n) || Ct(n) < 0 || !He(t, n));
176
- }, gn = function(t) {
172
+ return !(n.disabled || un(n) || mn(n, t) || // For a details element with a summary, the summary element gets the focus
173
+ cn(n) || gn(n));
174
+ }, Ue = function(t, n) {
175
+ return !(vn(n) || At(n) < 0 || !He(t, n));
176
+ }, pn = function(t) {
177
177
  var n = parseInt(t.getAttribute("tabindex"), 10);
178
178
  return !!(isNaN(n) || n >= 0);
179
- }, At = function(t) {
179
+ }, Dt = function(t) {
180
180
  var n = [], r = [];
181
181
  return t.forEach(function(o, i) {
182
- var s = !!o.scopeParent, u = s ? o.scopeParent : o, d = on(u, s), a = s ? At(o.candidates) : u;
182
+ var s = !!o.scopeParent, u = s ? o.scopeParent : o, d = sn(u, s), a = s ? Dt(o.candidates) : u;
183
183
  d === 0 ? s ? n.push.apply(n, a) : n.push(u) : r.push({
184
184
  documentOrder: i,
185
185
  tabIndex: d,
@@ -187,36 +187,36 @@ var nn = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
187
187
  isScope: s,
188
188
  content: a
189
189
  });
190
- }), r.sort(sn).reduce(function(o, i) {
190
+ }), r.sort(an).reduce(function(o, i) {
191
191
  return i.isScope ? o.push.apply(o, i.content) : o.push(i.content), o;
192
192
  }, []).concat(n);
193
193
  }, Ne = function(t, n) {
194
194
  n = n || {};
195
195
  var r;
196
196
  return n.getShadowRoot ? r = De([t], n.includeContainer, {
197
- filter: qe.bind(null, n),
197
+ filter: Ue.bind(null, n),
198
198
  flatten: !1,
199
199
  getShadowRoot: n.getShadowRoot,
200
- shadowRootFilter: gn
201
- }) : r = xt(t, n.includeContainer, qe.bind(null, n)), At(r);
202
- }, pn = function(t, n) {
200
+ shadowRootFilter: pn
201
+ }) : r = Ct(t, n.includeContainer, Ue.bind(null, n)), Dt(r);
202
+ }, hn = function(t, n) {
203
203
  n = n || {};
204
204
  var r;
205
205
  return n.getShadowRoot ? r = De([t], n.includeContainer, {
206
206
  filter: He.bind(null, n),
207
207
  flatten: !0,
208
208
  getShadowRoot: n.getShadowRoot
209
- }) : r = xt(t, n.includeContainer, He.bind(null, n)), r;
210
- }, kt = function(t, n) {
209
+ }) : r = Ct(t, n.includeContainer, He.bind(null, n)), r;
210
+ }, Pt = function(t, n) {
211
211
  if (n = n || {}, !t)
212
212
  throw new Error("No node provided");
213
- return ge.call(t, Ie) === !1 ? !1 : qe(n, t);
213
+ return ge.call(t, Ie) === !1 ? !1 : Ue(n, t);
214
214
  };
215
- function hn() {
215
+ function Rn() {
216
216
  const e = navigator.userAgentData;
217
217
  return e != null && e.platform ? e.platform : navigator.platform;
218
218
  }
219
- function Dt() {
219
+ function Nt() {
220
220
  const e = navigator.userAgentData;
221
221
  return e && Array.isArray(e.brands) ? e.brands.map((t) => {
222
222
  let {
@@ -229,14 +229,14 @@ function Dt() {
229
229
  function En() {
230
230
  return /apple/i.test(navigator.vendor);
231
231
  }
232
- function Ue() {
232
+ function qe() {
233
233
  const e = /android/i;
234
- return e.test(hn()) || e.test(Dt());
234
+ return e.test(Rn()) || e.test(Nt());
235
235
  }
236
- function Rn() {
237
- return Dt().includes("jsdom/");
236
+ function yn() {
237
+ return Nt().includes("jsdom/");
238
238
  }
239
- const tt = "data-floating-ui-focusable", yn = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
239
+ const tt = "data-floating-ui-focusable", wn = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
240
240
  function ve(e) {
241
241
  let t = e.activeElement;
242
242
  for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) {
@@ -245,13 +245,13 @@ function ve(e) {
245
245
  }
246
246
  return t;
247
247
  }
248
- function q(e, t) {
248
+ function U(e, t) {
249
249
  if (!e || !t)
250
250
  return !1;
251
251
  const n = t.getRootNode == null ? void 0 : t.getRootNode();
252
252
  if (e.contains(t))
253
253
  return !0;
254
- if (n && qt(n)) {
254
+ if (n && St(n)) {
255
255
  let r = t;
256
256
  for (; r; ) {
257
257
  if (e === r)
@@ -264,7 +264,7 @@ function q(e, t) {
264
264
  function ue(e) {
265
265
  return "composedPath" in e ? e.composedPath()[0] : e.target;
266
266
  }
267
- function _e(e, t) {
267
+ function Ve(e, t) {
268
268
  if (t == null)
269
269
  return !1;
270
270
  if ("composedPath" in e)
@@ -272,17 +272,17 @@ function _e(e, t) {
272
272
  const n = e;
273
273
  return n.target != null && t.contains(n.target);
274
274
  }
275
- function wn(e) {
275
+ function Sn(e) {
276
276
  return e.matches("html,body");
277
277
  }
278
278
  function z(e) {
279
279
  return e?.ownerDocument || document;
280
280
  }
281
- function Pt(e) {
282
- return ne(e) && e.matches(yn);
281
+ function Ot(e) {
282
+ return ne(e) && e.matches(wn);
283
283
  }
284
284
  function nt(e) {
285
- return e ? e.getAttribute("role") === "combobox" && Pt(e) : !1;
285
+ return e ? e.getAttribute("role") === "combobox" && Ot(e) : !1;
286
286
  }
287
287
  function rt(e) {
288
288
  return e ? e.hasAttribute(tt) ? e : e.querySelector("[" + tt + "]") || e : null;
@@ -305,22 +305,22 @@ function ot(e, t) {
305
305
  function $e(e) {
306
306
  e.preventDefault(), e.stopPropagation();
307
307
  }
308
- function Sn(e) {
309
- return "nativeEvent" in e;
310
- }
311
308
  function xn(e) {
312
- return e.mozInputSource === 0 && e.isTrusted ? !0 : Ue() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
309
+ return "nativeEvent" in e;
313
310
  }
314
311
  function Tn(e) {
315
- return Rn() ? !1 : !Ue() && e.width === 0 && e.height === 0 || Ue() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height.
312
+ return e.mozInputSource === 0 && e.isTrusted ? !0 : qe() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
313
+ }
314
+ function Cn(e) {
315
+ return yn() ? !1 : !qe() && e.width === 0 && e.height === 0 || qe() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height.
316
316
  e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch";
317
317
  }
318
318
  function it(e, t) {
319
319
  return ["mouse", "pen"].includes(e);
320
320
  }
321
- var Cn = typeof document < "u", In = function() {
322
- }, G = Cn ? yt : In;
323
- const An = {
321
+ var In = typeof document < "u", An = function() {
322
+ }, G = In ? wt : An;
323
+ const kn = {
324
324
  ...c
325
325
  };
326
326
  function Be(e) {
@@ -329,13 +329,13 @@ function Be(e) {
329
329
  t.current = e;
330
330
  }), t;
331
331
  }
332
- const kn = An.useInsertionEffect, Dn = kn || ((e) => e());
332
+ const Dn = kn.useInsertionEffect, Pn = Dn || ((e) => e());
333
333
  function J(e) {
334
334
  const t = c.useRef(() => {
335
335
  if (process.env.NODE_ENV !== "production")
336
336
  throw new Error("Cannot call an event handler while rendering.");
337
337
  });
338
- return Dn(() => {
338
+ return Pn(() => {
339
339
  t.current = e;
340
340
  }), c.useCallback(function() {
341
341
  for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
@@ -343,7 +343,7 @@ function J(e) {
343
343
  return t.current == null ? void 0 : t.current(...r);
344
344
  }, []);
345
345
  }
346
- const Re = () => ({
346
+ const Ee = () => ({
347
347
  getShadowRoot: !0,
348
348
  displayCheck: (
349
349
  // JSDOM does not support the `tabbable` library. To solve this we can
@@ -352,24 +352,24 @@ const Re = () => ({
352
352
  typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
353
353
  )
354
354
  });
355
- function Nt(e, t) {
356
- const n = Ne(e, Re()), r = n.length;
355
+ function Ft(e, t) {
356
+ const n = Ne(e, Ee()), r = n.length;
357
357
  if (r === 0) return;
358
358
  const o = ve(z(e)), i = n.indexOf(o), s = i === -1 ? t === 1 ? 0 : r - 1 : i + t;
359
359
  return n[s];
360
360
  }
361
- function Ot(e) {
362
- return Nt(z(e).body, 1) || e;
361
+ function Mt(e) {
362
+ return Ft(z(e).body, 1) || e;
363
363
  }
364
- function Ft(e) {
365
- return Nt(z(e).body, -1) || e;
364
+ function Lt(e) {
365
+ return Ft(z(e).body, -1) || e;
366
366
  }
367
367
  function he(e, t) {
368
368
  const n = t || e.currentTarget, r = e.relatedTarget;
369
- return !r || !q(n, r);
369
+ return !r || !U(n, r);
370
370
  }
371
- function Pn(e) {
372
- Ne(e, Re()).forEach((n) => {
371
+ function Nn(e) {
372
+ Ne(e, Ee()).forEach((n) => {
373
373
  n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
374
374
  });
375
375
  }
@@ -379,16 +379,16 @@ function st(e) {
379
379
  delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
380
380
  });
381
381
  }
382
- const Nn = "data-floating-ui-focusable", at = "active", ut = "selected", On = {
382
+ const On = "data-floating-ui-focusable", at = "active", ut = "selected", Fn = {
383
383
  ...c
384
384
  };
385
- let ct = !1, Fn = 0;
385
+ let ct = !1, Mn = 0;
386
386
  const lt = () => (
387
387
  // Ensure the id is unique with multiple independent versions of Floating UI
388
388
  // on <React 18
389
- "floating-ui-" + Math.random().toString(36).slice(2, 6) + Fn++
389
+ "floating-ui-" + Math.random().toString(36).slice(2, 6) + Mn++
390
390
  );
391
- function Mn() {
391
+ function Ln() {
392
392
  const [e, t] = c.useState(() => ct ? lt() : void 0);
393
393
  return G(() => {
394
394
  e == null && t(lt());
@@ -396,7 +396,7 @@ function Mn() {
396
396
  ct = !0;
397
397
  }, []), e;
398
398
  }
399
- const Ln = On.useId, Mt = Ln || Mn;
399
+ const _n = Fn.useId, _t = _n || Ln;
400
400
  let je;
401
401
  process.env.NODE_ENV !== "production" && (je = /* @__PURE__ */ new Set());
402
402
  function Vn() {
@@ -408,7 +408,7 @@ function Vn() {
408
408
  (i = je) == null || i.add(o), console.error(o);
409
409
  }
410
410
  }
411
- function _n() {
411
+ function $n() {
412
412
  const e = /* @__PURE__ */ new Map();
413
413
  return {
414
414
  emit(t, n) {
@@ -424,14 +424,14 @@ function _n() {
424
424
  }
425
425
  };
426
426
  }
427
- const $n = /* @__PURE__ */ c.createContext(null), Bn = /* @__PURE__ */ c.createContext(null), Kn = () => {
427
+ const Bn = /* @__PURE__ */ c.createContext(null), Kn = /* @__PURE__ */ c.createContext(null), Wn = () => {
428
428
  var e;
429
- return ((e = c.useContext($n)) == null ? void 0 : e.id) || null;
430
- }, Ye = () => c.useContext(Bn);
431
- function Ee(e) {
429
+ return ((e = c.useContext(Bn)) == null ? void 0 : e.id) || null;
430
+ }, Ye = () => c.useContext(Kn);
431
+ function Re(e) {
432
432
  return "data-floating-ui-" + e;
433
433
  }
434
- function Wn(e) {
434
+ function Hn(e) {
435
435
  e.current !== -1 && (clearTimeout(e.current), e.current = -1);
436
436
  }
437
437
  let ft = 0;
@@ -448,7 +448,7 @@ function de(e, t) {
448
448
  });
449
449
  o ? i() : ft = requestAnimationFrame(i);
450
450
  }
451
- function Hn(e) {
451
+ function Un(e) {
452
452
  return e?.ownerDocument || document;
453
453
  }
454
454
  const me = {
@@ -460,42 +460,46 @@ function dt(e) {
460
460
  return e === "inert" ? me.inert : e === "aria-hidden" ? me["aria-hidden"] : me.none;
461
461
  }
462
462
  let xe = /* @__PURE__ */ new WeakSet(), Te = {}, Ke = 0;
463
- const qn = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, Lt = (e) => e && (e.host || Lt(e.parentNode)), Un = (e, t) => t.map((n) => {
463
+ const qn = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype;
464
+ function Vt(e) {
465
+ return e ? St(e) ? e.host : Vt(e.parentNode) : null;
466
+ }
467
+ const jn = (e, t) => t.map((n) => {
464
468
  if (e.contains(n))
465
469
  return n;
466
- const r = Lt(n);
470
+ const r = Vt(n);
467
471
  return e.contains(r) ? r : null;
468
472
  }).filter((n) => n != null);
469
- function jn(e, t, n, r) {
470
- const o = "data-floating-ui-inert", i = r ? "inert" : n ? "aria-hidden" : null, s = Un(t, e), u = /* @__PURE__ */ new Set(), d = new Set(s), a = [];
473
+ function Gn(e, t, n, r) {
474
+ const o = "data-floating-ui-inert", i = r ? "inert" : n ? "aria-hidden" : null, s = jn(t, e), u = /* @__PURE__ */ new Set(), d = new Set(s), a = [];
471
475
  Te[o] || (Te[o] = /* @__PURE__ */ new WeakMap());
472
476
  const v = Te[o];
473
- s.forEach(R), I(t), u.clear();
474
- function R(f) {
475
- !f || u.has(f) || (u.add(f), f.parentNode && R(f.parentNode));
477
+ s.forEach(E), I(t), u.clear();
478
+ function E(f) {
479
+ !f || u.has(f) || (u.add(f), f.parentNode && E(f.parentNode));
476
480
  }
477
481
  function I(f) {
478
- !f || d.has(f) || [].forEach.call(f.children, (p) => {
479
- if (wt(p) !== "script")
480
- if (u.has(p))
481
- I(p);
482
+ !f || d.has(f) || [].forEach.call(f.children, (h) => {
483
+ if (xt(h) !== "script")
484
+ if (u.has(h))
485
+ I(h);
482
486
  else {
483
- const l = i ? p.getAttribute(i) : null, w = l !== null && l !== "false", x = dt(i), b = (x.get(p) || 0) + 1, g = (v.get(p) || 0) + 1;
484
- x.set(p, b), v.set(p, g), a.push(p), b === 1 && w && xe.add(p), g === 1 && p.setAttribute(o, ""), !w && i && p.setAttribute(i, i === "inert" ? "" : "true");
487
+ const l = i ? h.getAttribute(i) : null, w = l !== null && l !== "false", x = dt(i), g = (x.get(h) || 0) + 1, p = (v.get(h) || 0) + 1;
488
+ x.set(h, g), v.set(h, p), a.push(h), g === 1 && w && xe.add(h), p === 1 && h.setAttribute(o, ""), !w && i && h.setAttribute(i, i === "inert" ? "" : "true");
485
489
  }
486
490
  });
487
491
  }
488
492
  return Ke++, () => {
489
493
  a.forEach((f) => {
490
- const p = dt(i), w = (p.get(f) || 0) - 1, x = (v.get(f) || 0) - 1;
491
- p.set(f, w), v.set(f, x), w || (!xe.has(f) && i && f.removeAttribute(i), xe.delete(f)), x || f.removeAttribute(o);
494
+ const h = dt(i), w = (h.get(f) || 0) - 1, x = (v.get(f) || 0) - 1;
495
+ h.set(f, w), v.set(f, x), w || (!xe.has(f) && i && f.removeAttribute(i), xe.delete(f)), x || f.removeAttribute(o);
492
496
  }), Ke--, Ke || (me.inert = /* @__PURE__ */ new WeakMap(), me["aria-hidden"] = /* @__PURE__ */ new WeakMap(), me.none = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakSet(), Te = {});
493
497
  };
494
498
  }
495
499
  function vt(e, t, n) {
496
500
  t === void 0 && (t = !1), n === void 0 && (n = !1);
497
- const r = Hn(e[0]).body;
498
- return jn(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))), r, t, n);
501
+ const r = Un(e[0]).body;
502
+ return Gn(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))), r, t, n);
499
503
  }
500
504
  const Ze = {
501
505
  border: 0,
@@ -520,25 +524,25 @@ const Ze = {
520
524
  // Role is only for VoiceOver
521
525
  role: r,
522
526
  "aria-hidden": r ? void 0 : !0,
523
- [Ee("focus-guard")]: "",
527
+ [Re("focus-guard")]: "",
524
528
  style: Ze
525
529
  };
526
530
  return /* @__PURE__ */ N("span", {
527
531
  ...t,
528
532
  ...i
529
533
  });
530
- }), Gn = {
534
+ }), Yn = {
531
535
  clipPath: "inset(50%)",
532
536
  position: "fixed",
533
537
  top: 0,
534
538
  left: 0
535
- }, Vt = /* @__PURE__ */ c.createContext(null), bt = /* @__PURE__ */ Ee("portal");
536
- function Yn(e) {
539
+ }, $t = /* @__PURE__ */ c.createContext(null), bt = /* @__PURE__ */ Re("portal");
540
+ function Zn(e) {
537
541
  e === void 0 && (e = {});
538
542
  const {
539
543
  id: t,
540
544
  root: n
541
- } = e, r = Mt(), o = _t(), [i, s] = c.useState(null), u = c.useRef(null);
545
+ } = e, r = _t(), o = Bt(), [i, s] = c.useState(null), u = c.useRef(null);
542
546
  return G(() => () => {
543
547
  i?.remove(), queueMicrotask(() => {
544
548
  u.current = null;
@@ -552,23 +556,23 @@ function Yn(e) {
552
556
  }, [t, r]), G(() => {
553
557
  if (n === null || !r || u.current) return;
554
558
  let d = n || o?.portalNode;
555
- d && !Zt(d) && (d = d.current), d = d || document.body;
559
+ d && !zt(d) && (d = d.current), d = d || document.body;
556
560
  let a = null;
557
561
  t && (a = document.createElement("div"), a.id = t, d.appendChild(a));
558
562
  const v = document.createElement("div");
559
563
  v.id = r, v.setAttribute(bt, ""), d = a || d, d.appendChild(v), u.current = v, s(v);
560
564
  }, [t, n, r, o]), i;
561
565
  }
562
- function Zn(e) {
566
+ function zn(e) {
563
567
  const {
564
568
  children: t,
565
569
  id: n,
566
570
  root: r,
567
571
  preserveTabOrder: o = !0
568
- } = e, i = Yn({
572
+ } = e, i = Zn({
569
573
  id: n,
570
574
  root: r
571
- }), [s, u] = c.useState(null), d = c.useRef(null), a = c.useRef(null), v = c.useRef(null), R = c.useRef(null), I = s?.modal, f = s?.open, p = (
575
+ }), [s, u] = c.useState(null), d = c.useRef(null), a = c.useRef(null), v = c.useRef(null), E = c.useRef(null), I = s?.modal, f = s?.open, h = (
572
576
  // The FocusManager and therefore floating element are currently open/
573
577
  // rendered.
574
578
  !!s && // Guards are only for non-modal focus management.
@@ -579,24 +583,24 @@ function Zn(e) {
579
583
  if (!i || !o || I)
580
584
  return;
581
585
  function l(w) {
582
- i && he(w) && (w.type === "focusin" ? st : Pn)(i);
586
+ i && he(w) && (w.type === "focusin" ? st : Nn)(i);
583
587
  }
584
588
  return i.addEventListener("focusin", l, !0), i.addEventListener("focusout", l, !0), () => {
585
589
  i.removeEventListener("focusin", l, !0), i.removeEventListener("focusout", l, !0);
586
590
  };
587
591
  }, [i, o, I]), c.useEffect(() => {
588
592
  i && (f || st(i));
589
- }, [f, i]), /* @__PURE__ */ Ce(Vt.Provider, {
593
+ }, [f, i]), /* @__PURE__ */ Ce($t.Provider, {
590
594
  value: c.useMemo(() => ({
591
595
  preserveTabOrder: o,
592
596
  beforeOutsideRef: d,
593
597
  afterOutsideRef: a,
594
598
  beforeInsideRef: v,
595
- afterInsideRef: R,
599
+ afterInsideRef: E,
596
600
  portalNode: i,
597
601
  setFocusManagerState: u
598
602
  }), [o, i]),
599
- children: [p && i && /* @__PURE__ */ N(Pe, {
603
+ children: [h && i && /* @__PURE__ */ N(Pe, {
600
604
  "data-type": "outside",
601
605
  ref: d,
602
606
  onFocus: (l) => {
@@ -604,29 +608,29 @@ function Zn(e) {
604
608
  var w;
605
609
  (w = v.current) == null || w.focus();
606
610
  } else {
607
- const x = s ? s.domReference : null, b = Ft(x);
608
- b?.focus();
611
+ const x = s ? s.domReference : null, g = Lt(x);
612
+ g?.focus();
609
613
  }
610
614
  }
611
- }), p && i && /* @__PURE__ */ N("span", {
615
+ }), h && i && /* @__PURE__ */ N("span", {
612
616
  "aria-owns": i.id,
613
- style: Gn
614
- }), i && /* @__PURE__ */ Qt.createPortal(t, i), p && i && /* @__PURE__ */ N(Pe, {
617
+ style: Yn
618
+ }), i && /* @__PURE__ */ en.createPortal(t, i), h && i && /* @__PURE__ */ N(Pe, {
615
619
  "data-type": "outside",
616
620
  ref: a,
617
621
  onFocus: (l) => {
618
622
  if (he(l, i)) {
619
623
  var w;
620
- (w = R.current) == null || w.focus();
624
+ (w = E.current) == null || w.focus();
621
625
  } else {
622
- const x = s ? s.domReference : null, b = Ot(x);
623
- b?.focus(), s?.closeOnFocusOut && s?.onOpenChange(!1, l.nativeEvent, "focus-out");
626
+ const x = s ? s.domReference : null, g = Mt(x);
627
+ g?.focus(), s?.closeOnFocusOut && s?.onOpenChange(!1, l.nativeEvent, "focus-out");
624
628
  }
625
629
  }
626
630
  })]
627
631
  });
628
632
  }
629
- const _t = () => c.useContext(Vt);
633
+ const Bt = () => c.useContext($t);
630
634
  function mt(e) {
631
635
  return c.useMemo(() => (t) => {
632
636
  e.forEach((n) => {
@@ -634,28 +638,33 @@ function mt(e) {
634
638
  });
635
639
  }, e);
636
640
  }
637
- const zn = 20;
641
+ const gt = 20;
638
642
  let ce = [];
639
643
  function ze() {
640
- ce = ce.filter((e) => e.isConnected);
644
+ ce = ce.filter((e) => {
645
+ var t;
646
+ return (t = e.deref()) == null ? void 0 : t.isConnected;
647
+ });
641
648
  }
642
649
  function Xn(e) {
643
- ze(), e && wt(e) !== "body" && (ce.push(e), ce.length > zn && (ce = ce.slice(-20)));
650
+ ze(), e && xt(e) !== "body" && (ce.push(new WeakRef(e)), ce.length > gt && (ce = ce.slice(-gt)));
644
651
  }
645
- function gt() {
646
- return ze(), ce[ce.length - 1];
652
+ function pt() {
653
+ ze();
654
+ const e = ce[ce.length - 1];
655
+ return e?.deref();
647
656
  }
648
657
  function Jn(e) {
649
- const t = Re();
650
- return kt(e, t) ? e : Ne(e, t)[0] || e;
658
+ const t = Ee();
659
+ return Pt(e, t) ? e : Ne(e, t)[0] || e;
651
660
  }
652
- function pt(e, t) {
661
+ function ht(e, t) {
653
662
  var n;
654
663
  if (!t.current.includes("floating") && !((n = e.getAttribute("role")) != null && n.includes("dialog")))
655
664
  return;
656
- const r = Re(), i = pn(e, r).filter((u) => {
665
+ const r = Ee(), i = hn(e, r).filter((u) => {
657
666
  const d = u.getAttribute("data-tabindex") || "";
658
- return kt(u, r) || u.hasAttribute("data-tabindex") && !d.startsWith("-");
667
+ return Pt(u, r) || u.hasAttribute("data-tabindex") && !d.startsWith("-");
659
668
  }), s = e.getAttribute("tabindex");
660
669
  t.current.includes("floating") || i.length === 0 ? s !== "0" && e.setAttribute("tabindex", "0") : (s !== "-1" || e.hasAttribute("data-tabindex") && e.getAttribute("data-tabindex") !== "-1") && (e.setAttribute("tabindex", "-1"), e.setAttribute("data-tabindex", "-1"));
661
670
  }
@@ -680,51 +689,51 @@ function er(e) {
680
689
  restoreFocus: d = !1,
681
690
  modal: a = !0,
682
691
  visuallyHiddenDismiss: v = !1,
683
- closeOnFocusOut: R = !0,
692
+ closeOnFocusOut: E = !0,
684
693
  outsideElementsInert: I = !1,
685
694
  getInsideElements: f = () => []
686
695
  } = e, {
687
- open: p,
696
+ open: h,
688
697
  onOpenChange: l,
689
698
  events: w,
690
699
  dataRef: x,
691
700
  elements: {
692
- domReference: b,
693
- floating: g
701
+ domReference: g,
702
+ floating: p
694
703
  }
695
704
  } = t, L = J(() => {
696
705
  var y;
697
706
  return (y = x.current.floatingContext) == null ? void 0 : y.nodeId;
698
- }), K = J(f), W = typeof s == "number" && s < 0, O = nt(b) && W, B = qn(), re = B ? i : !0, Q = !re || B && I, T = Be(o), pe = Be(s), oe = Be(u), h = Ye(), m = _t(), $ = c.useRef(null), V = c.useRef(null), E = c.useRef(!1), F = c.useRef(!1), _ = c.useRef(-1), Y = c.useRef(-1), fe = m != null, C = rt(g), X = J(function(y) {
699
- return y === void 0 && (y = C), y ? Ne(y, Re()) : [];
707
+ }), K = J(f), W = typeof s == "number" && s < 0, O = nt(g) && W, B = qn(), re = B ? i : !0, Q = !re || B && I, T = Be(o), pe = Be(s), oe = Be(u), m = Ye(), b = Bt(), $ = c.useRef(null), _ = c.useRef(null), R = c.useRef(!1), F = c.useRef(!1), V = c.useRef(-1), Y = c.useRef(-1), fe = b != null, C = rt(p), X = J(function(y) {
708
+ return y === void 0 && (y = C), y ? Ne(y, Ee()) : [];
700
709
  }), P = J((y) => {
701
710
  const A = X(y);
702
- return T.current.map((S) => b && S === "reference" ? b : C && S === "floating" ? C : A).filter(Boolean).flat();
711
+ return T.current.map((S) => g && S === "reference" ? g : C && S === "floating" ? C : A).filter(Boolean).flat();
703
712
  });
704
713
  c.useEffect(() => {
705
714
  if (r || !a) return;
706
715
  function y(S) {
707
716
  if (S.key === "Tab") {
708
- q(C, ve(z(C))) && X().length === 0 && !O && $e(S);
717
+ U(C, ve(z(C))) && X().length === 0 && !O && $e(S);
709
718
  const D = P(), M = ue(S);
710
- T.current[0] === "reference" && M === b && ($e(S), S.shiftKey ? de(D[D.length - 1]) : de(D[1])), T.current[1] === "floating" && M === C && S.shiftKey && ($e(S), de(D[0]));
719
+ T.current[0] === "reference" && M === g && ($e(S), S.shiftKey ? de(D[D.length - 1]) : de(D[1])), T.current[1] === "floating" && M === C && S.shiftKey && ($e(S), de(D[0]));
711
720
  }
712
721
  }
713
722
  const A = z(C);
714
723
  return A.addEventListener("keydown", y), () => {
715
724
  A.removeEventListener("keydown", y);
716
725
  };
717
- }, [r, b, C, a, T, O, X, P]), c.useEffect(() => {
718
- if (r || !g) return;
726
+ }, [r, g, C, a, T, O, X, P]), c.useEffect(() => {
727
+ if (r || !p) return;
719
728
  function y(A) {
720
729
  const S = ue(A), M = X().indexOf(S);
721
- M !== -1 && (_.current = M);
730
+ M !== -1 && (V.current = M);
722
731
  }
723
- return g.addEventListener("focusin", y), () => {
724
- g.removeEventListener("focusin", y);
732
+ return p.addEventListener("focusin", y), () => {
733
+ p.removeEventListener("focusin", y);
725
734
  };
726
- }, [r, g, X]), c.useEffect(() => {
727
- if (r || !R) return;
735
+ }, [r, p, X]), c.useEffect(() => {
736
+ if (r || !E) return;
728
737
  function y() {
729
738
  F.current = !0, setTimeout(() => {
730
739
  F.current = !1;
@@ -733,16 +742,16 @@ function er(e) {
733
742
  function A(M) {
734
743
  const k = M.relatedTarget, ee = M.currentTarget, j = ue(M);
735
744
  queueMicrotask(() => {
736
- const H = L(), le = !(q(b, k) || q(g, k) || q(k, g) || q(m?.portalNode, k) || k != null && k.hasAttribute(Ee("focus-guard")) || h && (be(h.nodesRef.current, H).find((se) => {
745
+ const H = L(), le = !(U(g, k) || U(p, k) || U(k, p) || U(b?.portalNode, k) || k != null && k.hasAttribute(Re("focus-guard")) || m && (be(m.nodesRef.current, H).find((se) => {
737
746
  var te, ae;
738
- return q((te = se.context) == null ? void 0 : te.elements.floating, k) || q((ae = se.context) == null ? void 0 : ae.elements.domReference, k);
739
- }) || ot(h.nodesRef.current, H).find((se) => {
747
+ return U((te = se.context) == null ? void 0 : te.elements.floating, k) || U((ae = se.context) == null ? void 0 : ae.elements.domReference, k);
748
+ }) || ot(m.nodesRef.current, H).find((se) => {
740
749
  var te, ae, Xe;
741
750
  return [(te = se.context) == null ? void 0 : te.elements.floating, rt((ae = se.context) == null ? void 0 : ae.elements.floating)].includes(k) || ((Xe = se.context) == null ? void 0 : Xe.elements.domReference) === k;
742
751
  })));
743
- if (ee === b && C && pt(C, T), d && ee !== b && !(j != null && j.isConnected) && ve(z(C)) === z(C).body) {
752
+ if (ee === g && C && ht(C, T), d && ee !== g && !(j != null && j.isConnected) && ve(z(C)) === z(C).body) {
744
753
  ne(C) && C.focus();
745
- const se = _.current, te = X(), ae = te[se] || te[te.length - 1] || C;
754
+ const se = V.current, te = X(), ae = te[se] || te[te.length - 1] || C;
746
755
  ne(ae) && ae.focus();
747
756
  }
748
757
  if (x.current.insideReactTree) {
@@ -750,41 +759,41 @@ function er(e) {
750
759
  return;
751
760
  }
752
761
  (O || !a) && k && le && !F.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
753
- k !== gt() && (E.current = !0, l(!1, M, "focus-out"));
762
+ k !== pt() && (R.current = !0, l(!1, M, "focus-out"));
754
763
  });
755
764
  }
756
- const S = !!(!h && m);
765
+ const S = !!(!m && b);
757
766
  function D() {
758
- Wn(Y), x.current.insideReactTree = !0, Y.current = window.setTimeout(() => {
767
+ Hn(Y), x.current.insideReactTree = !0, Y.current = window.setTimeout(() => {
759
768
  x.current.insideReactTree = !1;
760
769
  });
761
770
  }
762
- if (g && ne(b))
763
- return b.addEventListener("focusout", A), b.addEventListener("pointerdown", y), g.addEventListener("focusout", A), S && g.addEventListener("focusout", D, !0), () => {
764
- b.removeEventListener("focusout", A), b.removeEventListener("pointerdown", y), g.removeEventListener("focusout", A), S && g.removeEventListener("focusout", D, !0);
771
+ if (p && ne(g))
772
+ return g.addEventListener("focusout", A), g.addEventListener("pointerdown", y), p.addEventListener("focusout", A), S && p.addEventListener("focusout", D, !0), () => {
773
+ g.removeEventListener("focusout", A), g.removeEventListener("pointerdown", y), p.removeEventListener("focusout", A), S && p.removeEventListener("focusout", D, !0);
765
774
  };
766
- }, [r, b, g, C, a, h, m, l, R, d, X, O, L, T, x]);
767
- const U = c.useRef(null), ie = c.useRef(null), Oe = mt([U, m?.beforeInsideRef]), Fe = mt([ie, m?.afterInsideRef]);
775
+ }, [r, g, p, C, a, m, b, l, E, d, X, O, L, T, x]);
776
+ const q = c.useRef(null), ie = c.useRef(null), Oe = mt([q, b?.beforeInsideRef]), Fe = mt([ie, b?.afterInsideRef]);
768
777
  c.useEffect(() => {
769
778
  var y, A;
770
- if (r || !g) return;
771
- const S = Array.from((m == null || (y = m.portalNode) == null ? void 0 : y.querySelectorAll("[" + Ee("portal") + "]")) || []), M = (A = (h ? ot(h.nodesRef.current, L()) : []).find((j) => {
779
+ if (r || !p) return;
780
+ const S = Array.from((b == null || (y = b.portalNode) == null ? void 0 : y.querySelectorAll("[" + Re("portal") + "]")) || []), M = (A = (m ? ot(m.nodesRef.current, L()) : []).find((j) => {
772
781
  var H;
773
782
  return nt(((H = j.context) == null ? void 0 : H.elements.domReference) || null);
774
- })) == null || (A = A.context) == null ? void 0 : A.elements.domReference, k = [g, M, ...S, ...K(), $.current, V.current, U.current, ie.current, m?.beforeOutsideRef.current, m?.afterOutsideRef.current, T.current.includes("reference") || O ? b : null].filter((j) => j != null), ee = a || O ? vt(k, !Q, Q) : vt(k);
783
+ })) == null || (A = A.context) == null ? void 0 : A.elements.domReference, k = [p, M, ...S, ...K(), $.current, _.current, q.current, ie.current, b?.beforeOutsideRef.current, b?.afterOutsideRef.current, T.current.includes("reference") || O ? g : null].filter((j) => j != null), ee = a || O ? vt(k, !Q, Q) : vt(k);
775
784
  return () => {
776
785
  ee();
777
786
  };
778
- }, [r, b, g, a, T, m, O, re, Q, h, L, K]), G(() => {
787
+ }, [r, g, p, a, T, b, O, re, Q, m, L, K]), G(() => {
779
788
  if (r || !ne(C)) return;
780
789
  const y = z(C), A = ve(y);
781
790
  queueMicrotask(() => {
782
- const S = P(C), D = pe.current, M = (typeof D == "number" ? S[D] : D.current) || C, k = q(C, A);
783
- !W && !k && p && de(M, {
791
+ const S = P(C), D = pe.current, M = (typeof D == "number" ? S[D] : D.current) || C, k = U(C, A);
792
+ !W && !k && h && de(M, {
784
793
  preventScroll: M === C
785
794
  });
786
795
  });
787
- }, [r, p, C, W, P, pe]), G(() => {
796
+ }, [r, h, C, W, P, pe]), G(() => {
788
797
  if (r || !C) return;
789
798
  const y = z(C), A = ve(y);
790
799
  Xn(A);
@@ -794,40 +803,40 @@ function er(e) {
794
803
  event: j,
795
804
  nested: H
796
805
  } = k;
797
- if (["hover", "safe-polygon"].includes(ee) && j.type === "mouseleave" && (E.current = !0), ee === "outside-press")
806
+ if (["hover", "safe-polygon"].includes(ee) && j.type === "mouseleave" && (R.current = !0), ee === "outside-press")
798
807
  if (H)
799
- E.current = !1;
800
- else if (xn(j) || Tn(j))
801
- E.current = !1;
808
+ R.current = !1;
809
+ else if (Tn(j) || Cn(j))
810
+ R.current = !1;
802
811
  else {
803
812
  let le = !1;
804
813
  document.createElement("div").focus({
805
814
  get preventScroll() {
806
815
  return le = !0, !1;
807
816
  }
808
- }), le ? E.current = !1 : E.current = !0;
817
+ }), le ? R.current = !1 : R.current = !0;
809
818
  }
810
819
  }
811
820
  w.on("openchange", S);
812
821
  const D = y.createElement("span");
813
- D.setAttribute("tabindex", "-1"), D.setAttribute("aria-hidden", "true"), Object.assign(D.style, Ze), fe && b && b.insertAdjacentElement("afterend", D);
822
+ D.setAttribute("tabindex", "-1"), D.setAttribute("aria-hidden", "true"), Object.assign(D.style, Ze), fe && g && g.insertAdjacentElement("afterend", D);
814
823
  function M() {
815
824
  if (typeof oe.current == "boolean") {
816
- const k = b || gt();
825
+ const k = g || pt();
817
826
  return k && k.isConnected ? k : D;
818
827
  }
819
828
  return oe.current.current || D;
820
829
  }
821
830
  return () => {
822
831
  w.off("openchange", S);
823
- const k = ve(y), ee = q(g, k) || h && be(h.nodesRef.current, L(), !1).some((H) => {
832
+ const k = ve(y), ee = U(p, k) || m && be(m.nodesRef.current, L(), !1).some((H) => {
824
833
  var le;
825
- return q((le = H.context) == null ? void 0 : le.elements.floating, k);
834
+ return U((le = H.context) == null ? void 0 : le.elements.floating, k);
826
835
  }), j = M();
827
836
  queueMicrotask(() => {
828
837
  const H = Jn(j);
829
838
  // eslint-disable-next-line react-hooks/exhaustive-deps
830
- oe.current && !E.current && ne(H) && // If the focus moved somewhere else after mount, avoid returning focus
839
+ oe.current && !R.current && ne(H) && // If the focus moved somewhere else after mount, avoid returning focus
831
840
  // since it likely entered a different element which should be
832
841
  // respected: https://github.com/floating-ui/floating-ui/issues/2607
833
842
  (!(H !== k && k !== y.body) || ee) && H.focus({
@@ -835,33 +844,33 @@ function er(e) {
835
844
  }), D.remove();
836
845
  });
837
846
  };
838
- }, [r, g, C, oe, x, w, h, fe, b, L]), c.useEffect(() => (queueMicrotask(() => {
839
- E.current = !1;
847
+ }, [r, p, C, oe, x, w, m, fe, g, L]), c.useEffect(() => (queueMicrotask(() => {
848
+ R.current = !1;
840
849
  }), () => {
841
850
  queueMicrotask(ze);
842
851
  }), [r]), G(() => {
843
- if (!r && m)
844
- return m.setFocusManagerState({
852
+ if (!r && b)
853
+ return b.setFocusManagerState({
845
854
  modal: a,
846
- closeOnFocusOut: R,
847
- open: p,
855
+ closeOnFocusOut: E,
856
+ open: h,
848
857
  onOpenChange: l,
849
- domReference: b
858
+ domReference: g
850
859
  }), () => {
851
- m.setFocusManagerState(null);
860
+ b.setFocusManagerState(null);
852
861
  };
853
- }, [r, m, a, p, l, R, b]), G(() => {
854
- r || C && pt(C, T);
862
+ }, [r, b, a, h, l, E, g]), G(() => {
863
+ r || C && ht(C, T);
855
864
  }, [r, C, T]);
856
865
  function ye(y) {
857
866
  return r || !v || !a ? null : /* @__PURE__ */ N(Qn, {
858
- ref: y === "start" ? $ : V,
867
+ ref: y === "start" ? $ : _,
859
868
  onClick: (A) => l(!1, A.nativeEvent),
860
869
  children: typeof v == "string" ? v : "Dismiss"
861
870
  });
862
871
  }
863
872
  const we = !r && re && (a ? !O : !0) && (fe || a);
864
- return /* @__PURE__ */ Ce($t, {
873
+ return /* @__PURE__ */ Ce(Kt, {
865
874
  children: [we && /* @__PURE__ */ N(Pe, {
866
875
  "data-type": "inside",
867
876
  ref: Oe,
@@ -869,13 +878,13 @@ function er(e) {
869
878
  if (a) {
870
879
  const S = P();
871
880
  de(o[0] === "reference" ? S[0] : S[S.length - 1]);
872
- } else if (m != null && m.preserveTabOrder && m.portalNode)
873
- if (E.current = !1, he(y, m.portalNode)) {
874
- const S = Ot(b);
881
+ } else if (b != null && b.preserveTabOrder && b.portalNode)
882
+ if (R.current = !1, he(y, b.portalNode)) {
883
+ const S = Mt(g);
875
884
  S?.focus();
876
885
  } else {
877
886
  var A;
878
- (A = m.beforeOutsideRef.current) == null || A.focus();
887
+ (A = b.beforeOutsideRef.current) == null || A.focus();
879
888
  }
880
889
  }
881
890
  }), !O && ye("start"), n, ye("end"), we && /* @__PURE__ */ N(Pe, {
@@ -884,26 +893,26 @@ function er(e) {
884
893
  onFocus: (y) => {
885
894
  if (a)
886
895
  de(P()[0]);
887
- else if (m != null && m.preserveTabOrder && m.portalNode)
888
- if (R && (E.current = !0), he(y, m.portalNode)) {
889
- const S = Ft(b);
896
+ else if (b != null && b.preserveTabOrder && b.portalNode)
897
+ if (E && (R.current = !0), he(y, b.portalNode)) {
898
+ const S = Lt(g);
890
899
  S?.focus();
891
900
  } else {
892
901
  var A;
893
- (A = m.afterOutsideRef.current) == null || A.focus();
902
+ (A = b.afterOutsideRef.current) == null || A.focus();
894
903
  }
895
904
  }
896
905
  })]
897
906
  });
898
907
  }
899
- function ht(e) {
908
+ function Rt(e) {
900
909
  return ne(e.target) && e.target.tagName === "BUTTON";
901
910
  }
902
911
  function tr(e) {
903
912
  return ne(e.target) && e.target.tagName === "A";
904
913
  }
905
914
  function Et(e) {
906
- return Pt(e);
915
+ return Ot(e);
907
916
  }
908
917
  function nr(e, t) {
909
918
  t === void 0 && (t = {});
@@ -920,14 +929,14 @@ function nr(e, t) {
920
929
  toggle: d = !0,
921
930
  ignoreMouse: a = !1,
922
931
  keyboardHandlers: v = !0,
923
- stickIfOpen: R = !0
924
- } = t, I = c.useRef(), f = c.useRef(!1), p = c.useMemo(() => ({
932
+ stickIfOpen: E = !0
933
+ } = t, I = c.useRef(), f = c.useRef(!1), h = c.useMemo(() => ({
925
934
  onPointerDown(l) {
926
935
  I.current = l.pointerType;
927
936
  },
928
937
  onMouseDown(l) {
929
938
  const w = I.current;
930
- l.button === 0 && u !== "click" && (it(w) && a || (n && d && (!(o.current.openEvent && R) || o.current.openEvent.type === "mousedown") ? r(!1, l.nativeEvent, "click") : (l.preventDefault(), r(!0, l.nativeEvent, "click"))));
939
+ l.button === 0 && u !== "click" && (it(w) && a || (n && d && (!(o.current.openEvent && E) || o.current.openEvent.type === "mousedown") ? r(!1, l.nativeEvent, "click") : (l.preventDefault(), r(!0, l.nativeEvent, "click"))));
931
940
  },
932
941
  onClick(l) {
933
942
  const w = I.current;
@@ -935,18 +944,18 @@ function nr(e, t) {
935
944
  I.current = void 0;
936
945
  return;
937
946
  }
938
- it(w) && a || (n && d && (!(o.current.openEvent && R) || o.current.openEvent.type === "click") ? r(!1, l.nativeEvent, "click") : r(!0, l.nativeEvent, "click"));
947
+ it(w) && a || (n && d && (!(o.current.openEvent && E) || o.current.openEvent.type === "click") ? r(!1, l.nativeEvent, "click") : r(!0, l.nativeEvent, "click"));
939
948
  },
940
949
  onKeyDown(l) {
941
- I.current = void 0, !(l.defaultPrevented || !v || ht(l)) && (l.key === " " && !Et(i) && (l.preventDefault(), f.current = !0), !tr(l) && l.key === "Enter" && r(!(n && d), l.nativeEvent, "click"));
950
+ I.current = void 0, !(l.defaultPrevented || !v || Rt(l)) && (l.key === " " && !Et(i) && (l.preventDefault(), f.current = !0), !tr(l) && l.key === "Enter" && r(!(n && d), l.nativeEvent, "click"));
942
951
  },
943
952
  onKeyUp(l) {
944
- l.defaultPrevented || !v || ht(l) || Et(i) || l.key === " " && f.current && (f.current = !1, r(!(n && d), l.nativeEvent, "click"));
953
+ l.defaultPrevented || !v || Rt(l) || Et(i) || l.key === " " && f.current && (f.current = !1, r(!(n && d), l.nativeEvent, "click"));
945
954
  }
946
- }), [o, i, u, a, v, r, n, R, d]);
955
+ }), [o, i, u, a, v, r, n, E, d]);
947
956
  return c.useMemo(() => s ? {
948
- reference: p
949
- } : {}, [s, p]);
957
+ reference: h
958
+ } : {}, [s, h]);
950
959
  }
951
960
  const rr = {
952
961
  pointerdown: "onPointerDown",
@@ -956,7 +965,7 @@ const rr = {
956
965
  pointerdown: "onPointerDownCapture",
957
966
  mousedown: "onMouseDownCapture",
958
967
  click: "onClickCapture"
959
- }, Rt = (e) => {
968
+ }, yt = (e) => {
960
969
  var t, n;
961
970
  return {
962
971
  escapeKey: typeof e == "boolean" ? e : (t = e?.escapeKey) != null ? t : !1,
@@ -976,155 +985,156 @@ function ir(e, t) {
976
985
  outsidePress: d = !0,
977
986
  outsidePressEvent: a = "pointerdown",
978
987
  referencePress: v = !1,
979
- referencePressEvent: R = "pointerdown",
988
+ referencePressEvent: E = "pointerdown",
980
989
  ancestorScroll: I = !1,
981
990
  bubbles: f,
982
- capture: p
983
- } = t, l = Ye(), w = J(typeof d == "function" ? d : () => !1), x = typeof d == "function" ? w : d, b = c.useRef(!1), {
984
- escapeKey: g,
991
+ capture: h
992
+ } = t, l = Ye(), w = J(typeof d == "function" ? d : () => !1), x = typeof d == "function" ? w : d, g = c.useRef(!1), {
993
+ escapeKey: p,
985
994
  outsidePress: L
986
- } = Rt(f), {
995
+ } = yt(f), {
987
996
  escapeKey: K,
988
997
  outsidePress: W
989
- } = Rt(p), O = c.useRef(!1), B = J((h) => {
990
- var m;
991
- if (!n || !s || !u || h.key !== "Escape" || O.current)
998
+ } = yt(h), O = c.useRef(!1), B = J((m) => {
999
+ var b;
1000
+ if (!n || !s || !u || m.key !== "Escape" || O.current)
992
1001
  return;
993
- const $ = (m = i.current.floatingContext) == null ? void 0 : m.nodeId, V = l ? be(l.nodesRef.current, $) : [];
994
- if (!g && (h.stopPropagation(), V.length > 0)) {
995
- let E = !0;
996
- if (V.forEach((F) => {
997
- var _;
998
- if ((_ = F.context) != null && _.open && !F.context.dataRef.current.__escapeKeyBubbles) {
999
- E = !1;
1002
+ const $ = (b = i.current.floatingContext) == null ? void 0 : b.nodeId, _ = l ? be(l.nodesRef.current, $) : [];
1003
+ if (!p && (m.stopPropagation(), _.length > 0)) {
1004
+ let R = !0;
1005
+ if (_.forEach((F) => {
1006
+ var V;
1007
+ if ((V = F.context) != null && V.open && !F.context.dataRef.current.__escapeKeyBubbles) {
1008
+ R = !1;
1000
1009
  return;
1001
1010
  }
1002
- }), !E)
1011
+ }), !R)
1003
1012
  return;
1004
1013
  }
1005
- r(!1, Sn(h) ? h.nativeEvent : h, "escape-key");
1006
- }), re = J((h) => {
1007
- var m;
1014
+ r(!1, xn(m) ? m.nativeEvent : m, "escape-key");
1015
+ }), re = J((m) => {
1016
+ var b;
1008
1017
  const $ = () => {
1009
- var V;
1010
- B(h), (V = ue(h)) == null || V.removeEventListener("keydown", $);
1018
+ var _;
1019
+ B(m), (_ = ue(m)) == null || _.removeEventListener("keydown", $);
1011
1020
  };
1012
- (m = ue(h)) == null || m.addEventListener("keydown", $);
1013
- }), Q = J((h) => {
1014
- var m;
1021
+ (b = ue(m)) == null || b.addEventListener("keydown", $);
1022
+ }), Q = J((m) => {
1023
+ var b;
1015
1024
  const $ = i.current.insideReactTree;
1016
1025
  i.current.insideReactTree = !1;
1017
- const V = b.current;
1018
- if (b.current = !1, a === "click" && V || $ || typeof x == "function" && !x(h))
1026
+ const _ = g.current;
1027
+ if (g.current = !1, a === "click" && _ || $ || typeof x == "function" && !x(m))
1019
1028
  return;
1020
- const E = ue(h), F = "[" + Ee("inert") + "]", _ = z(o.floating).querySelectorAll(F);
1021
- let Y = Z(E) ? E : null;
1029
+ const R = ue(m), F = "[" + Re("inert") + "]", V = z(o.floating).querySelectorAll(F);
1030
+ let Y = Z(R) ? R : null;
1022
1031
  for (; Y && !Le(Y); ) {
1023
- const P = Gt(Y);
1032
+ const P = Yt(Y);
1024
1033
  if (Le(P) || !Z(P))
1025
1034
  break;
1026
1035
  Y = P;
1027
1036
  }
1028
- if (_.length && Z(E) && !wn(E) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
1029
- !q(E, o.floating) && // If the target root element contains none of the markers, then the
1037
+ if (V.length && Z(R) && !Sn(R) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
1038
+ !U(R, o.floating) && // If the target root element contains none of the markers, then the
1030
1039
  // element was injected after the floating element rendered.
1031
- Array.from(_).every((P) => !q(Y, P)))
1040
+ Array.from(V).every((P) => !U(Y, P)))
1032
1041
  return;
1033
- if (ne(E) && oe) {
1034
- const P = Le(E), U = Yt(E), ie = /auto|scroll/, Oe = P || ie.test(U.overflowX), Fe = P || ie.test(U.overflowY), ye = Oe && E.clientWidth > 0 && E.scrollWidth > E.clientWidth, we = Fe && E.clientHeight > 0 && E.scrollHeight > E.clientHeight, y = U.direction === "rtl", A = we && (y ? h.offsetX <= E.offsetWidth - E.clientWidth : h.offsetX > E.clientWidth), S = ye && h.offsetY > E.clientHeight;
1042
+ if (ne(R) && oe) {
1043
+ const P = Le(R), q = Zt(R), ie = /auto|scroll/, Oe = P || ie.test(q.overflowX), Fe = P || ie.test(q.overflowY), ye = Oe && R.clientWidth > 0 && R.scrollWidth > R.clientWidth, we = Fe && R.clientHeight > 0 && R.scrollHeight > R.clientHeight, y = q.direction === "rtl", A = we && (y ? m.offsetX <= R.offsetWidth - R.clientWidth : m.offsetX > R.clientWidth), S = ye && m.offsetY > R.clientHeight;
1035
1044
  if (A || S)
1036
1045
  return;
1037
1046
  }
1038
- const fe = (m = i.current.floatingContext) == null ? void 0 : m.nodeId, C = l && be(l.nodesRef.current, fe).some((P) => {
1039
- var U;
1040
- return _e(h, (U = P.context) == null ? void 0 : U.elements.floating);
1047
+ const fe = (b = i.current.floatingContext) == null ? void 0 : b.nodeId, C = l && be(l.nodesRef.current, fe).some((P) => {
1048
+ var q;
1049
+ return Ve(m, (q = P.context) == null ? void 0 : q.elements.floating);
1041
1050
  });
1042
- if (_e(h, o.floating) || _e(h, o.domReference) || C)
1051
+ if (Ve(m, o.floating) || Ve(m, o.domReference) || C)
1043
1052
  return;
1044
1053
  const X = l ? be(l.nodesRef.current, fe) : [];
1045
1054
  if (X.length > 0) {
1046
1055
  let P = !0;
1047
- if (X.forEach((U) => {
1056
+ if (X.forEach((q) => {
1048
1057
  var ie;
1049
- if ((ie = U.context) != null && ie.open && !U.context.dataRef.current.__outsidePressBubbles) {
1058
+ if ((ie = q.context) != null && ie.open && !q.context.dataRef.current.__outsidePressBubbles) {
1050
1059
  P = !1;
1051
1060
  return;
1052
1061
  }
1053
1062
  }), !P)
1054
1063
  return;
1055
1064
  }
1056
- r(!1, h, "outside-press");
1057
- }), T = J((h) => {
1058
- var m;
1065
+ r(!1, m, "outside-press");
1066
+ }), T = J((m) => {
1067
+ var b;
1059
1068
  const $ = () => {
1060
- var V;
1061
- Q(h), (V = ue(h)) == null || V.removeEventListener(a, $);
1069
+ var _;
1070
+ Q(m), (_ = ue(m)) == null || _.removeEventListener(a, $);
1062
1071
  };
1063
- (m = ue(h)) == null || m.addEventListener(a, $);
1072
+ (b = ue(m)) == null || b.addEventListener(a, $);
1064
1073
  });
1065
1074
  c.useEffect(() => {
1066
1075
  if (!n || !s)
1067
1076
  return;
1068
- i.current.__escapeKeyBubbles = g, i.current.__outsidePressBubbles = L;
1069
- let h = -1;
1070
- function m(_) {
1071
- r(!1, _, "ancestor-scroll");
1077
+ i.current.__escapeKeyBubbles = p, i.current.__outsidePressBubbles = L;
1078
+ let m = -1;
1079
+ function b(V) {
1080
+ r(!1, V, "ancestor-scroll");
1072
1081
  }
1073
1082
  function $() {
1074
- window.clearTimeout(h), O.current = !0;
1083
+ window.clearTimeout(m), O.current = !0;
1075
1084
  }
1076
- function V() {
1077
- h = window.setTimeout(
1085
+ function _() {
1086
+ m = window.setTimeout(
1078
1087
  () => {
1079
1088
  O.current = !1;
1080
1089
  },
1081
1090
  // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
1082
1091
  // Only apply to WebKit for the test to remain 0ms.
1083
- jt() ? 5 : 0
1092
+ Gt() ? 5 : 0
1084
1093
  );
1085
1094
  }
1086
- const E = z(o.floating);
1087
- u && (E.addEventListener("keydown", K ? re : B, K), E.addEventListener("compositionstart", $), E.addEventListener("compositionend", V)), x && E.addEventListener(a, W ? T : Q, W);
1095
+ const R = z(o.floating);
1096
+ u && (R.addEventListener("keydown", K ? re : B, K), R.addEventListener("compositionstart", $), R.addEventListener("compositionend", _)), x && R.addEventListener(a, W ? T : Q, W);
1088
1097
  let F = [];
1089
- return I && (Z(o.domReference) && (F = Me(o.domReference)), Z(o.floating) && (F = F.concat(Me(o.floating))), !Z(o.reference) && o.reference && o.reference.contextElement && (F = F.concat(Me(o.reference.contextElement)))), F = F.filter((_) => {
1098
+ return I && (Z(o.domReference) && (F = Me(o.domReference)), Z(o.floating) && (F = F.concat(Me(o.floating))), !Z(o.reference) && o.reference && o.reference.contextElement && (F = F.concat(Me(o.reference.contextElement)))), F = F.filter((V) => {
1090
1099
  var Y;
1091
- return _ !== ((Y = E.defaultView) == null ? void 0 : Y.visualViewport);
1092
- }), F.forEach((_) => {
1093
- _.addEventListener("scroll", m, {
1100
+ return V !== ((Y = R.defaultView) == null ? void 0 : Y.visualViewport);
1101
+ }), F.forEach((V) => {
1102
+ V.addEventListener("scroll", b, {
1094
1103
  passive: !0
1095
1104
  });
1096
1105
  }), () => {
1097
- u && (E.removeEventListener("keydown", K ? re : B, K), E.removeEventListener("compositionstart", $), E.removeEventListener("compositionend", V)), x && E.removeEventListener(a, W ? T : Q, W), F.forEach((_) => {
1098
- _.removeEventListener("scroll", m);
1099
- }), window.clearTimeout(h);
1106
+ u && (R.removeEventListener("keydown", K ? re : B, K), R.removeEventListener("compositionstart", $), R.removeEventListener("compositionend", _)), x && R.removeEventListener(a, W ? T : Q, W), F.forEach((V) => {
1107
+ V.removeEventListener("scroll", b);
1108
+ }), window.clearTimeout(m);
1100
1109
  };
1101
- }, [i, o, u, x, a, n, r, I, s, g, L, B, K, re, Q, W, T]), c.useEffect(() => {
1110
+ }, [i, o, u, x, a, n, r, I, s, p, L, B, K, re, Q, W, T]), c.useEffect(() => {
1102
1111
  i.current.insideReactTree = !1;
1103
1112
  }, [i, x, a]);
1104
1113
  const pe = c.useMemo(() => ({
1105
1114
  onKeyDown: B,
1106
1115
  ...v && {
1107
- [rr[R]]: (h) => {
1108
- r(!1, h.nativeEvent, "reference-press");
1116
+ [rr[E]]: (m) => {
1117
+ r(!1, m.nativeEvent, "reference-press");
1109
1118
  },
1110
- ...R !== "click" && {
1111
- onClick(h) {
1112
- r(!1, h.nativeEvent, "reference-press");
1119
+ ...E !== "click" && {
1120
+ onClick(m) {
1121
+ r(!1, m.nativeEvent, "reference-press");
1113
1122
  }
1114
1123
  }
1115
1124
  }
1116
- }), [B, r, v, R]), oe = c.useMemo(() => ({
1117
- onKeyDown: B,
1118
- onMouseDown() {
1119
- b.current = !0;
1120
- },
1121
- onMouseUp() {
1122
- b.current = !0;
1123
- },
1124
- [or[a]]: () => {
1125
- i.current.insideReactTree = !0;
1125
+ }), [B, r, v, E]), oe = c.useMemo(() => {
1126
+ function m(b) {
1127
+ b.button === 0 && (g.current = !0);
1126
1128
  }
1127
- }), [B, a, i]);
1129
+ return {
1130
+ onKeyDown: B,
1131
+ onMouseDown: m,
1132
+ onMouseUp: m,
1133
+ [or[a]]: () => {
1134
+ i.current.insideReactTree = !0;
1135
+ }
1136
+ };
1137
+ }, [B, a, i]);
1128
1138
  return c.useMemo(() => s ? {
1129
1139
  reference: pe,
1130
1140
  floating: oe
@@ -1135,19 +1145,19 @@ function sr(e) {
1135
1145
  open: t = !1,
1136
1146
  onOpenChange: n,
1137
1147
  elements: r
1138
- } = e, o = Mt(), i = c.useRef({}), [s] = c.useState(() => _n()), u = Kn() != null;
1148
+ } = e, o = _t(), i = c.useRef({}), [s] = c.useState(() => $n()), u = Wn() != null;
1139
1149
  if (process.env.NODE_ENV !== "production") {
1140
1150
  const f = r.reference;
1141
1151
  f && !Z(f) && Vn("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
1142
1152
  }
1143
- const [d, a] = c.useState(r.reference), v = J((f, p, l) => {
1144
- i.current.openEvent = f ? p : void 0, s.emit("openchange", {
1153
+ const [d, a] = c.useState(r.reference), v = J((f, h, l) => {
1154
+ i.current.openEvent = f ? h : void 0, s.emit("openchange", {
1145
1155
  open: f,
1146
- event: p,
1156
+ event: h,
1147
1157
  reason: l,
1148
1158
  nested: u
1149
- }), n?.(f, p, l);
1150
- }), R = c.useMemo(() => ({
1159
+ }), n?.(f, h, l);
1160
+ }), E = c.useMemo(() => ({
1151
1161
  setPositionReference: a
1152
1162
  }), []), I = c.useMemo(() => ({
1153
1163
  reference: d || r.reference || null,
@@ -1161,8 +1171,8 @@ function sr(e) {
1161
1171
  elements: I,
1162
1172
  events: s,
1163
1173
  floatingId: o,
1164
- refs: R
1165
- }), [t, v, I, s, o, R]);
1174
+ refs: E
1175
+ }), [t, v, I, s, o, E]);
1166
1176
  }
1167
1177
  function ar(e) {
1168
1178
  e === void 0 && (e = {});
@@ -1175,11 +1185,11 @@ function ar(e) {
1175
1185
  floating: null,
1176
1186
  ...e.elements
1177
1187
  }
1178
- }), r = e.rootContext || n, o = r.elements, [i, s] = c.useState(null), [u, d] = c.useState(null), v = o?.domReference || i, R = c.useRef(null), I = Ye();
1188
+ }), r = e.rootContext || n, o = r.elements, [i, s] = c.useState(null), [u, d] = c.useState(null), v = o?.domReference || i, E = c.useRef(null), I = Ye();
1179
1189
  G(() => {
1180
- v && (R.current = v);
1190
+ v && (E.current = v);
1181
1191
  }, [v]);
1182
- const f = Ut({
1192
+ const f = jt({
1183
1193
  ...e,
1184
1194
  elements: {
1185
1195
  ...o,
@@ -1187,27 +1197,27 @@ function ar(e) {
1187
1197
  reference: u
1188
1198
  }
1189
1199
  }
1190
- }), p = c.useCallback((g) => {
1191
- const L = Z(g) ? {
1192
- getBoundingClientRect: () => g.getBoundingClientRect(),
1193
- getClientRects: () => g.getClientRects(),
1194
- contextElement: g
1195
- } : g;
1200
+ }), h = c.useCallback((p) => {
1201
+ const L = Z(p) ? {
1202
+ getBoundingClientRect: () => p.getBoundingClientRect(),
1203
+ getClientRects: () => p.getClientRects(),
1204
+ contextElement: p
1205
+ } : p;
1196
1206
  d(L), f.refs.setReference(L);
1197
- }, [f.refs]), l = c.useCallback((g) => {
1198
- (Z(g) || g === null) && (R.current = g, s(g)), (Z(f.refs.reference.current) || f.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
1207
+ }, [f.refs]), l = c.useCallback((p) => {
1208
+ (Z(p) || p === null) && (E.current = p, s(p)), (Z(f.refs.reference.current) || f.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
1199
1209
  // `null` to support `positionReference` + an unstable `reference`
1200
1210
  // callback ref.
1201
- g !== null && !Z(g)) && f.refs.setReference(g);
1211
+ p !== null && !Z(p)) && f.refs.setReference(p);
1202
1212
  }, [f.refs]), w = c.useMemo(() => ({
1203
1213
  ...f.refs,
1204
1214
  setReference: l,
1205
- setPositionReference: p,
1206
- domReference: R
1207
- }), [f.refs, l, p]), x = c.useMemo(() => ({
1215
+ setPositionReference: h,
1216
+ domReference: E
1217
+ }), [f.refs, l, h]), x = c.useMemo(() => ({
1208
1218
  ...f.elements,
1209
1219
  domReference: v
1210
- }), [f.elements, v]), b = c.useMemo(() => ({
1220
+ }), [f.elements, v]), g = c.useMemo(() => ({
1211
1221
  ...f,
1212
1222
  ...r,
1213
1223
  refs: w,
@@ -1215,15 +1225,15 @@ function ar(e) {
1215
1225
  nodeId: t
1216
1226
  }), [f, w, x, t, r]);
1217
1227
  return G(() => {
1218
- r.dataRef.current.floatingContext = b;
1219
- const g = I?.nodesRef.current.find((L) => L.id === t);
1220
- g && (g.context = b);
1228
+ r.dataRef.current.floatingContext = g;
1229
+ const p = I?.nodesRef.current.find((L) => L.id === t);
1230
+ p && (p.context = g);
1221
1231
  }), c.useMemo(() => ({
1222
1232
  ...f,
1223
- context: b,
1233
+ context: g,
1224
1234
  refs: w,
1225
1235
  elements: x
1226
- }), [f, w, x, b]);
1236
+ }), [f, w, x, g]);
1227
1237
  }
1228
1238
  function We(e, t, n) {
1229
1239
  const r = /* @__PURE__ */ new Map(), o = n === "item";
@@ -1239,7 +1249,7 @@ function We(e, t, n) {
1239
1249
  return {
1240
1250
  ...n === "floating" && {
1241
1251
  tabIndex: -1,
1242
- [Nn]: ""
1252
+ [On]: ""
1243
1253
  },
1244
1254
  ...i,
1245
1255
  ...t.map((s) => {
@@ -1250,11 +1260,11 @@ function We(e, t, n) {
1250
1260
  if (!(o && [at, ut].includes(a)))
1251
1261
  if (a.indexOf("on") === 0) {
1252
1262
  if (r.has(a) || r.set(a, []), typeof v == "function") {
1253
- var R;
1254
- (R = r.get(a)) == null || R.push(v), s[a] = function() {
1255
- for (var I, f = arguments.length, p = new Array(f), l = 0; l < f; l++)
1256
- p[l] = arguments[l];
1257
- return (I = r.get(a)) == null ? void 0 : I.map((w) => w(...p)).find((w) => w !== void 0);
1263
+ var E;
1264
+ (E = r.get(a)) == null || E.push(v), s[a] = function() {
1265
+ for (var I, f = arguments.length, h = new Array(f), l = 0; l < f; l++)
1266
+ h[l] = arguments[l];
1267
+ return (I = r.get(a)) == null ? void 0 : I.map((w) => w(...h)).find((w) => w !== void 0);
1258
1268
  };
1259
1269
  }
1260
1270
  } else
@@ -1288,11 +1298,11 @@ const cr = {
1288
1298
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M8 1.6a.9.9 0 0 1 .9.9V7a.9.9 0 0 1-1.8 0V5.9H4a.1.1 0 0 0-.1.1v3.105A.91.91 0 0 1 4 9.1h16.1V6a.1.1 0 0 0-.1-.1h-3.1V7a.9.9 0 1 1-1.8 0V5.9h-3.6a.9.9 0 1 1 0-1.8h3.6V2.5a.9.9 0 1 1 1.8 0v1.6H20c1.05 0 1.9.85 1.9 1.9v14a1.9 1.9 0 0 1-1.9 1.9H4A1.9 1.9 0 0 1 2.1 20V6c0-1.05.85-1.9 1.9-1.9h3.1V2.5a.9.9 0 0 1 .9-.9Zm12.1 9.3H4a.917.917 0 0 1-.1-.005V20a.1.1 0 0 0 .1.1h16a.1.1 0 0 0 .1-.1v-9.1ZM5.6 13.5a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Zm5 0a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Zm5 0a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Zm-10 4a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Zm5 0a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Zm5 0a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Z" clip-rule="evenodd"/></svg>',
1289
1299
  keywords: ["calendar"],
1290
1300
  category: "other"
1291
- }, Ge = (e) => /* @__PURE__ */ N(en, { ...e, svg: cr });
1301
+ }, Ge = (e) => /* @__PURE__ */ N(tn, { ...e, svg: cr });
1292
1302
  Ge.displayName = "IconCalendar";
1293
1303
  const lr = {
1294
1304
  "date-picker-calendar-container": "_date-picker-calendar-container_17f84_1"
1295
- }, fr = tn.bind(lr), dr = Bt(
1305
+ }, fr = nn.bind(lr), dr = Wt(
1296
1306
  ({
1297
1307
  calendarProps: e,
1298
1308
  drawerContentProps: t,
@@ -1301,37 +1311,37 @@ const lr = {
1301
1311
  overlayZIndex: o,
1302
1312
  ...i
1303
1313
  }, s) => {
1304
- const [u, d] = Se(!1), [a, v] = Se(!1), [R, I] = Se(!1), f = Kt(null), { context: p, refs: l, floatingStyles: w } = ar({
1314
+ const [u, d] = Se(!1), [a, v] = Se(!1), [E, I] = Se(!1), f = Ht(null), { context: h, refs: l, floatingStyles: w } = ar({
1305
1315
  open: u,
1306
1316
  onOpenChange: (T) => {
1307
1317
  i.readOnly || d(T);
1308
1318
  },
1309
1319
  placement: "bottom-start",
1310
1320
  middleware: [
1311
- Xt({
1321
+ Jt({
1312
1322
  mainAxis: 10,
1313
1323
  crossAxis: -32
1314
1324
  // left padding + small icon
1315
1325
  }),
1316
- Jt()
1326
+ Qt()
1317
1327
  ],
1318
- whileElementsMounted: zt
1319
- }), x = nr(p), b = ir(p), { getFloatingProps: g, getReferenceProps: L } = ur([x, b]), [K, W] = Se(n);
1320
- Wt(() => {
1328
+ whileElementsMounted: Xt
1329
+ }), x = nr(h), g = ir(h), { getFloatingProps: p, getReferenceProps: L } = ur([x, g]), [K, W] = Se(n);
1330
+ Ut(() => {
1321
1331
  W(n);
1322
1332
  }, [n]);
1323
1333
  const O = (T) => {
1324
1334
  T ? (W(T), r?.(T), (u || a) && (d(!1), v(!1))) : (W(void 0), r?.(void 0));
1325
- }, B = Ht();
1326
- return yt(() => {
1335
+ }, B = qt();
1336
+ return wt(() => {
1327
1337
  const T = () => {
1328
1338
  I(window.innerWidth < 600);
1329
1339
  };
1330
1340
  return T(), window.addEventListener("resize", T), () => {
1331
1341
  window.removeEventListener("resize", T);
1332
1342
  };
1333
- }, []), R ? /* @__PURE__ */ Ce(Ve, { open: a, onOpenChange: v, children: [
1334
- /* @__PURE__ */ N(Ve.Trigger, { children: /* @__PURE__ */ N(
1343
+ }, []), E ? /* @__PURE__ */ Ce(_e, { open: a, onOpenChange: v, children: [
1344
+ /* @__PURE__ */ N(_e.Trigger, { children: /* @__PURE__ */ N(
1335
1345
  Qe,
1336
1346
  {
1337
1347
  ...i,
@@ -1343,7 +1353,7 @@ const lr = {
1343
1353
  }
1344
1354
  ) }),
1345
1355
  /* @__PURE__ */ N(
1346
- Ve.Content,
1356
+ _e.Content,
1347
1357
  {
1348
1358
  "data-testid": i["data-testid"] && `${i["data-testid"]}-calendar`,
1349
1359
  fitToContent: !0,
@@ -1374,14 +1384,14 @@ const lr = {
1374
1384
  "data-testid": i["data-testid"]
1375
1385
  }
1376
1386
  ),
1377
- u && !i.readOnly && /* @__PURE__ */ N(Zn, { children: /* @__PURE__ */ N(er, { context: p, initialFocus: f, children: /* @__PURE__ */ N(
1387
+ u && !i.readOnly && /* @__PURE__ */ N(zn, { children: /* @__PURE__ */ N(er, { context: h, initialFocus: f, children: /* @__PURE__ */ N(
1378
1388
  "div",
1379
1389
  {
1380
1390
  "data-testid": i["data-testid"] && `${i["data-testid"]}-calendar`,
1381
1391
  className: fr("date-picker-calendar-container"),
1382
1392
  ref: l.setFloating,
1383
1393
  style: { ...w, zIndex: o },
1384
- ...g(),
1394
+ ...p(),
1385
1395
  children: /* @__PURE__ */ N(
1386
1396
  Je,
1387
1397
  {
@@ -1402,4 +1412,4 @@ dr.displayName = "DatePicker";
1402
1412
  export {
1403
1413
  dr as D
1404
1414
  };
1405
- //# sourceMappingURL=date-picker-BRkh2YEH.mjs.map
1415
+ //# sourceMappingURL=date-picker-BRnwwZv1.mjs.map