@pdf-viewer/react 1.9.0-beta.4 → 1.9.0-beta.6

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 (119) hide show
  1. package/dist/Checkbox.module-3edaacbb.js +7 -0
  2. package/dist/Combination-9a0a3e65.js +693 -0
  3. package/dist/Container.module-f8b5c306.js +6 -0
  4. package/dist/DropDown.module-a78567cb.js +11 -0
  5. package/dist/MenuItem.module-bc11d0d3.js +6 -0
  6. package/dist/MenuSeparator.module-89b2ff7f.js +6 -0
  7. package/dist/PropertyItem.module-db0150cc.js +8 -0
  8. package/dist/RPSplitter.module-13d612c4.js +7 -0
  9. package/dist/RPTheme.module-bd9038da.js +8 -0
  10. package/dist/RotateTool.module-03987eba.js +6 -0
  11. package/dist/SearchTool.module-016f3a8d.js +16 -0
  12. package/dist/ToolbarLayout.module-88476995.js +2464 -0
  13. package/dist/WrapperLayout.module-147bc943.js +6 -0
  14. package/dist/assets/ToolbarLayout.css +1 -0
  15. package/dist/components/RPConfig.js +673 -691
  16. package/dist/components/RPController.js +34 -34
  17. package/dist/components/RPDropFileZone.js +21 -23
  18. package/dist/components/RPPages.js +21 -18
  19. package/dist/components/RPProvider.js +19 -15
  20. package/dist/components/layout/Container.js +10 -11
  21. package/dist/components/layout/LayoutContainer.js +19 -16
  22. package/dist/components/layout/RPDefaultLayout.js +76 -14
  23. package/dist/components/layout/RPLayout.js +74 -24
  24. package/dist/components/layout/WrapperLayout.js +7 -8
  25. package/dist/components/layout/sidebar/RPSidebar.js +51 -12
  26. package/dist/components/layout/sidebar/RPSplitter.js +7 -9
  27. package/dist/components/layout/sidebar/Thumbnail.js +49 -2
  28. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  29. package/dist/components/layout/toolbar/DocumentDialog.js +307 -24
  30. package/dist/components/layout/toolbar/FileDownloadTool.js +23 -13
  31. package/dist/components/layout/toolbar/MenuItem.js +6 -7
  32. package/dist/components/layout/toolbar/MenuSeparator.js +4 -5
  33. package/dist/components/layout/toolbar/MostPageTool.js +50 -23
  34. package/dist/components/layout/toolbar/OtherTool.js +115 -22
  35. package/dist/components/layout/toolbar/Paginate.js +99 -17
  36. package/dist/components/layout/toolbar/PrintTool.js +43 -13
  37. package/dist/components/layout/toolbar/PropertyItem.js +5 -8
  38. package/dist/components/layout/toolbar/RPToolbar.js +28 -7
  39. package/dist/components/layout/toolbar/RPToolbarEnd.js +22 -7
  40. package/dist/components/layout/toolbar/RotateTool.js +20 -21
  41. package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
  42. package/dist/components/layout/toolbar/SearchCloseButton.js +19 -7
  43. package/dist/components/layout/toolbar/SearchResultNavigator.js +42 -8
  44. package/dist/components/layout/toolbar/SearchTool.js +198 -29
  45. package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
  46. package/dist/components/layout/toolbar/ThumbnailTool.js +3 -3
  47. package/dist/components/layout/toolbar/ToolbarCustom.js +48 -20
  48. package/dist/components/layout/toolbar/ToolbarDefault.js +82 -0
  49. package/dist/components/layout/toolbar/ToolbarLayout.js +10 -0
  50. package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
  51. package/dist/components/layout/toolbar/ZoomTool.js +140 -28
  52. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +3 -3
  53. package/dist/components/layout/toolbar/tools/InputPageTool.js +11 -11
  54. package/dist/components/layout/toolbar/tools/NextPageTool.js +21 -18
  55. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
  56. package/dist/components/layout/toolbar/tools/PrintTool.js +3 -3
  57. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
  58. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +10 -10
  59. package/dist/components/layout/toolbar/tools/defaults/{TopbarDefaultTools.js → RPHorizontalBar.js} +29 -20
  60. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +16 -0
  61. package/dist/components/page/AnnotationLayer.js +20 -17
  62. package/dist/components/page/CanvasLayer.js +20 -18
  63. package/dist/components/page/DualPage.js +1 -1
  64. package/dist/components/page/RPPage.js +20 -17
  65. package/dist/components/page/SinglePage.js +1 -1
  66. package/dist/components/page/TextHighlightLayer.js +20 -17
  67. package/dist/components/page/TextLayer.js +20 -17
  68. package/dist/components/ui/Checkbox.js +125 -239
  69. package/dist/components/ui/DropDown.js +13 -19
  70. package/dist/components/ui/LoadingIndicator.js +22 -5
  71. package/dist/components/ui/RPTooltip.js +133 -133
  72. package/dist/contexts/ElementPageContext.js +37 -37
  73. package/dist/contexts/FileInputContext.js +18 -20
  74. package/dist/contexts/PaginationContext.js +4 -4
  75. package/dist/contexts/PrintContext.js +1 -1
  76. package/dist/contexts/RenderQueueProvider.js +10 -0
  77. package/dist/contexts/SearchContext.js +3 -3
  78. package/dist/contexts/ThumbnailsContext.js +1 -1
  79. package/dist/contexts/ViewportContext.js +42 -35
  80. package/dist/index-2160dd99.js +307 -0
  81. package/dist/{index-5f66a29f.js → index-492f99d0.js} +491 -515
  82. package/dist/index-49b9a615.js +978 -0
  83. package/dist/main.js +76 -73
  84. package/dist/types/components/layout/RPDefaultLayout.d.ts +2 -1
  85. package/dist/types/components/layout/RPLayout.d.ts +2 -1
  86. package/dist/types/components/layout/sidebar/Thumbnail.d.ts +0 -1
  87. package/dist/types/components/layout/toolbar/RPToolbar.d.ts +2 -3
  88. package/dist/types/components/layout/toolbar/ToolbarCustom.d.ts +2 -2
  89. package/dist/types/components/layout/toolbar/ToolbarDefault.d.ts +4 -0
  90. package/dist/types/components/layout/toolbar/ToolbarLayout.d.ts +3 -0
  91. package/dist/types/components/layout/toolbar/tools/defaults/RPHorizontalBar.d.ts +3 -0
  92. package/dist/types/components/layout/toolbar/tools/defaults/RPVerticalBar.d.ts +3 -0
  93. package/dist/types/contexts/RenderQueueProvider.d.ts +16 -0
  94. package/dist/types/main.d.ts +3 -3
  95. package/dist/types/utils/Queue.d.ts +18 -0
  96. package/dist/types/utils/renderPage.d.ts +1 -6
  97. package/dist/types/utils/types.d.ts +22 -17
  98. package/dist/utils/Queue.js +47 -0
  99. package/dist/utils/hooks/useFileDownload.js +20 -17
  100. package/dist/utils/hooks/useLicense.js +1 -1
  101. package/dist/utils/hooks/usePageRotateContext.js +14 -14
  102. package/dist/utils/hooks/usePaginate.js +20 -17
  103. package/dist/utils/hooks/usePresentPage.js +20 -17
  104. package/dist/utils/hooks/usePrint.js +20 -17
  105. package/dist/utils/hooks/useScrollToPage.js +20 -17
  106. package/dist/utils/hooks/useSearch.js +20 -17
  107. package/dist/utils/hooks/useThumbnail.js +20 -18
  108. package/dist/utils/hooks/useVirtualReactWindow.js +20 -17
  109. package/package.json +1 -1
  110. package/dist/RPLayout-5892502c.js +0 -3494
  111. package/dist/SearchCloseButton-cbf182aa.js +0 -33
  112. package/dist/assets/RPLayout.css +0 -1
  113. package/dist/components/layout/toolbar/tools/defaults/LeftSidebarDefaultTools.js +0 -16
  114. package/dist/index-00f8683a.js +0 -1672
  115. package/dist/index-6b37f504.js +0 -332
  116. package/dist/types/components/layout/toolbar/tools/defaults/LeftSidebarDefaultTools.d.ts +0 -3
  117. package/dist/types/components/layout/toolbar/tools/defaults/TopbarDefaultTools.d.ts +0 -3
  118. /package/dist/assets/{RPDropFileZone.css → RPTheme.css} +0 -0
  119. /package/dist/assets/{SearchCloseButton.css → SearchTool.css} +0 -0
@@ -1,31 +1,22 @@
1
- import * as w from "react";
2
- import { useLayoutEffect as Ne } from "react";
3
- import { u as mt, P as it, a as vt, g as ke, h as Et, c as $e, d as We } from "./index-6b37f504.js";
4
- import { jsx as _ } from "react/jsx-runtime";
5
- import * as Be from "react-dom";
6
- function gt(t) {
7
- const e = w.useRef(t);
8
- return w.useEffect(() => {
9
- e.current = t;
10
- }), w.useMemo(() => (...n) => {
11
- var o;
12
- return (o = e.current) == null ? void 0 : o.call(e, ...n);
13
- }, []);
14
- }
15
- function _e(t, e = globalThis == null ? void 0 : globalThis.document) {
16
- const n = gt(t);
17
- w.useEffect(() => {
1
+ import * as y from "react";
2
+ import { useLayoutEffect as Te, useEffect as Me } from "react";
3
+ import { h as mt, u as gt, P as it, a as vt, j as ke, k as Et, c as Fe, f as Ne } from "./index-2160dd99.js";
4
+ import { jsx as H } from "react/jsx-runtime";
5
+ import * as $e from "react-dom";
6
+ function We(t, e = globalThis == null ? void 0 : globalThis.document) {
7
+ const n = mt(t);
8
+ y.useEffect(() => {
18
9
  const o = (r) => {
19
10
  r.key === "Escape" && n(r);
20
11
  };
21
12
  return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
22
13
  }, [n, e]);
23
14
  }
24
- var He = "DismissableLayer", Pt = "dismissableLayer.update", Ie = "dismissableLayer.pointerDownOutside", Ve = "dismissableLayer.focusOutside", Yt, ne = w.createContext({
15
+ var Be = "DismissableLayer", Pt = "dismissableLayer.update", He = "dismissableLayer.pointerDownOutside", _e = "dismissableLayer.focusOutside", Yt, te = y.createContext({
25
16
  layers: /* @__PURE__ */ new Set(),
26
17
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
27
18
  branches: /* @__PURE__ */ new Set()
28
- }), ze = w.forwardRef(
19
+ }), Ie = y.forwardRef(
29
20
  (t, e) => {
30
21
  const {
31
22
  disableOutsidePointerEvents: n = !1,
@@ -35,26 +26,26 @@ var He = "DismissableLayer", Pt = "dismissableLayer.update", Ie = "dismissableLa
35
26
  onInteractOutside: s,
36
27
  onDismiss: c,
37
28
  ...f
38
- } = t, a = w.useContext(ne), [l, u] = w.useState(null), p = (l == null ? void 0 : l.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, d] = w.useState({}), h = mt(e, (v) => u(v)), m = Array.from(a.layers), [y] = [...a.layersWithOutsidePointerEventsDisabled].slice(-1), g = m.indexOf(y), x = l ? m.indexOf(l) : -1, E = a.layersWithOutsidePointerEventsDisabled.size > 0, b = x >= g, A = Xe((v) => {
39
- const C = v.target, M = [...a.branches].some((O) => O.contains(C));
40
- !b || M || (r == null || r(v), s == null || s(v), v.defaultPrevented || c == null || c());
41
- }, p), R = Ue((v) => {
42
- const C = v.target;
43
- [...a.branches].some((O) => O.contains(C)) || (i == null || i(v), s == null || s(v), v.defaultPrevented || c == null || c());
29
+ } = t, l = y.useContext(te), [a, u] = y.useState(null), p = (a == null ? void 0 : a.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, d] = y.useState({}), h = gt(e, (x) => u(x)), m = Array.from(l.layers), [w] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), g = m.indexOf(w), v = a ? m.indexOf(a) : -1, E = l.layersWithOutsidePointerEventsDisabled.size > 0, b = v >= g, A = Ye((x) => {
30
+ const C = x.target, M = [...l.branches].some((O) => O.contains(C));
31
+ !b || M || (r == null || r(x), s == null || s(x), x.defaultPrevented || c == null || c());
32
+ }, p), P = je((x) => {
33
+ const C = x.target;
34
+ [...l.branches].some((O) => O.contains(C)) || (i == null || i(x), s == null || s(x), x.defaultPrevented || c == null || c());
44
35
  }, p);
45
- return _e((v) => {
46
- x === a.layers.size - 1 && (o == null || o(v), !v.defaultPrevented && c && (v.preventDefault(), c()));
47
- }, p), w.useEffect(() => {
48
- if (l)
49
- return n && (a.layersWithOutsidePointerEventsDisabled.size === 0 && (Yt = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), a.layersWithOutsidePointerEventsDisabled.add(l)), a.layers.add(l), jt(), () => {
50
- n && a.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = Yt);
36
+ return We((x) => {
37
+ v === l.layers.size - 1 && (o == null || o(x), !x.defaultPrevented && c && (x.preventDefault(), c()));
38
+ }, p), y.useEffect(() => {
39
+ if (a)
40
+ return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Yt = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(a)), l.layers.add(a), jt(), () => {
41
+ n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = Yt);
51
42
  };
52
- }, [l, p, n, a]), w.useEffect(() => () => {
53
- l && (a.layers.delete(l), a.layersWithOutsidePointerEventsDisabled.delete(l), jt());
54
- }, [l, a]), w.useEffect(() => {
55
- const v = () => d({});
56
- return document.addEventListener(Pt, v), () => document.removeEventListener(Pt, v);
57
- }, []), /* @__PURE__ */ _(
43
+ }, [a, p, n, l]), y.useEffect(() => () => {
44
+ a && (l.layers.delete(a), l.layersWithOutsidePointerEventsDisabled.delete(a), jt());
45
+ }, [a, l]), y.useEffect(() => {
46
+ const x = () => d({});
47
+ return document.addEventListener(Pt, x), () => document.removeEventListener(Pt, x);
48
+ }, []), /* @__PURE__ */ H(
58
49
  it.div,
59
50
  {
60
51
  ...f,
@@ -63,8 +54,8 @@ var He = "DismissableLayer", Pt = "dismissableLayer.update", Ie = "dismissableLa
63
54
  pointerEvents: E ? b ? "auto" : "none" : void 0,
64
55
  ...t.style
65
56
  },
66
- onFocusCapture: vt(t.onFocusCapture, R.onFocusCapture),
67
- onBlurCapture: vt(t.onBlurCapture, R.onBlurCapture),
57
+ onFocusCapture: vt(t.onFocusCapture, P.onFocusCapture),
58
+ onBlurCapture: vt(t.onBlurCapture, P.onBlurCapture),
68
59
  onPointerDownCapture: vt(
69
60
  t.onPointerDownCapture,
70
61
  A.onPointerDownCapture
@@ -73,33 +64,33 @@ var He = "DismissableLayer", Pt = "dismissableLayer.update", Ie = "dismissableLa
73
64
  );
74
65
  }
75
66
  );
76
- ze.displayName = He;
77
- var Ye = "DismissableLayerBranch", je = w.forwardRef((t, e) => {
78
- const n = w.useContext(ne), o = w.useRef(null), r = mt(e, o);
79
- return w.useEffect(() => {
67
+ Ie.displayName = Be;
68
+ var ze = "DismissableLayerBranch", Ve = y.forwardRef((t, e) => {
69
+ const n = y.useContext(te), o = y.useRef(null), r = gt(e, o);
70
+ return y.useEffect(() => {
80
71
  const i = o.current;
81
72
  if (i)
82
73
  return n.branches.add(i), () => {
83
74
  n.branches.delete(i);
84
75
  };
85
- }, [n.branches]), /* @__PURE__ */ _(it.div, { ...t, ref: r });
76
+ }, [n.branches]), /* @__PURE__ */ H(it.div, { ...t, ref: r });
86
77
  });
87
- je.displayName = Ye;
88
- function Xe(t, e = globalThis == null ? void 0 : globalThis.document) {
89
- const n = gt(t), o = w.useRef(!1), r = w.useRef(() => {
78
+ Ve.displayName = ze;
79
+ function Ye(t, e = globalThis == null ? void 0 : globalThis.document) {
80
+ const n = mt(t), o = y.useRef(!1), r = y.useRef(() => {
90
81
  });
91
- return w.useEffect(() => {
82
+ return y.useEffect(() => {
92
83
  const i = (c) => {
93
84
  if (c.target && !o.current) {
94
85
  let f = function() {
95
- oe(
96
- Ie,
86
+ ee(
87
+ He,
97
88
  n,
98
- a,
89
+ l,
99
90
  { discrete: !0 }
100
91
  );
101
92
  };
102
- const a = { originalEvent: c };
93
+ const l = { originalEvent: c };
103
94
  c.pointerType === "touch" ? (e.removeEventListener("click", r.current), r.current = f, e.addEventListener("click", r.current, { once: !0 })) : f();
104
95
  } else
105
96
  e.removeEventListener("click", r.current);
@@ -115,11 +106,11 @@ function Xe(t, e = globalThis == null ? void 0 : globalThis.document) {
115
106
  onPointerDownCapture: () => o.current = !0
116
107
  };
117
108
  }
118
- function Ue(t, e = globalThis == null ? void 0 : globalThis.document) {
119
- const n = gt(t), o = w.useRef(!1);
120
- return w.useEffect(() => {
109
+ function je(t, e = globalThis == null ? void 0 : globalThis.document) {
110
+ const n = mt(t), o = y.useRef(!1);
111
+ return y.useEffect(() => {
121
112
  const r = (i) => {
122
- i.target && !o.current && oe(Ve, n, { originalEvent: i }, {
113
+ i.target && !o.current && ee(_e, n, { originalEvent: i }, {
123
114
  discrete: !1
124
115
  });
125
116
  };
@@ -133,37 +124,37 @@ function jt() {
133
124
  const t = new CustomEvent(Pt);
134
125
  document.dispatchEvent(t);
135
126
  }
136
- function oe(t, e, n, { discrete: o }) {
127
+ function ee(t, e, n, { discrete: o }) {
137
128
  const r = n.originalEvent.target, i = new CustomEvent(t, { bubbles: !1, cancelable: !0, detail: n });
138
129
  e && r.addEventListener(t, e, { once: !0 }), o ? ke(r, i) : r.dispatchEvent(i);
139
130
  }
140
- var qe = w[" useId ".trim().toString()] || (() => {
141
- }), Ke = 0;
142
- function xo(t) {
143
- const [e, n] = w.useState(qe());
131
+ var Xe = y["useId".toString()] || (() => {
132
+ }), Ue = 0;
133
+ function oo(t) {
134
+ const [e, n] = y.useState(Xe());
144
135
  return Et(() => {
145
- t || n((o) => o ?? String(Ke++));
136
+ t || n((o) => o ?? String(Ue++));
146
137
  }, [t]), t || (e ? `radix-${e}` : "");
147
138
  }
148
- const Ze = ["top", "right", "bottom", "left"], K = Math.min, W = Math.max, ut = Math.round, lt = Math.floor, Y = (t) => ({
139
+ const qe = ["top", "right", "bottom", "left"], q = Math.min, $ = Math.max, ut = Math.round, at = Math.floor, V = (t) => ({
149
140
  x: t,
150
141
  y: t
151
- }), Ge = {
142
+ }), Ke = {
152
143
  left: "right",
153
144
  right: "left",
154
145
  bottom: "top",
155
146
  top: "bottom"
156
- }, Je = {
147
+ }, Ze = {
157
148
  start: "end",
158
149
  end: "start"
159
150
  };
160
151
  function Rt(t, e, n) {
161
- return W(t, K(e, n));
152
+ return $(t, q(e, n));
162
153
  }
163
- function U(t, e) {
154
+ function X(t, e) {
164
155
  return typeof t == "function" ? t(e) : t;
165
156
  }
166
- function q(t) {
157
+ function U(t) {
167
158
  return t.split("-")[0];
168
159
  }
169
160
  function tt(t) {
@@ -175,48 +166,47 @@ function St(t) {
175
166
  function Dt(t) {
176
167
  return t === "y" ? "height" : "width";
177
168
  }
178
- const Qe = /* @__PURE__ */ new Set(["top", "bottom"]);
179
- function z(t) {
180
- return Qe.has(q(t)) ? "y" : "x";
169
+ function K(t) {
170
+ return ["top", "bottom"].includes(U(t)) ? "y" : "x";
181
171
  }
182
172
  function Lt(t) {
183
- return St(z(t));
173
+ return St(K(t));
184
174
  }
185
- function tn(t, e, n) {
175
+ function Ge(t, e, n) {
186
176
  n === void 0 && (n = !1);
187
177
  const o = tt(t), r = Lt(t), i = Dt(r);
188
178
  let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
189
179
  return e.reference[i] > e.floating[i] && (s = dt(s)), [s, dt(s)];
190
180
  }
191
- function en(t) {
181
+ function Je(t) {
192
182
  const e = dt(t);
193
183
  return [Ct(t), e, Ct(e)];
194
184
  }
195
185
  function Ct(t) {
196
- return t.replace(/start|end/g, (e) => Je[e]);
186
+ return t.replace(/start|end/g, (e) => Ze[e]);
197
187
  }
198
- const Xt = ["left", "right"], Ut = ["right", "left"], nn = ["top", "bottom"], on = ["bottom", "top"];
199
- function rn(t, e, n) {
188
+ function Qe(t, e, n) {
189
+ const o = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
200
190
  switch (t) {
201
191
  case "top":
202
192
  case "bottom":
203
- return n ? e ? Ut : Xt : e ? Xt : Ut;
193
+ return n ? e ? r : o : e ? o : r;
204
194
  case "left":
205
195
  case "right":
206
- return e ? nn : on;
196
+ return e ? i : s;
207
197
  default:
208
198
  return [];
209
199
  }
210
200
  }
211
- function sn(t, e, n, o) {
201
+ function tn(t, e, n, o) {
212
202
  const r = tt(t);
213
- let i = rn(q(t), n === "start", o);
203
+ let i = Qe(U(t), n === "start", o);
214
204
  return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(Ct)))), i;
215
205
  }
216
206
  function dt(t) {
217
- return t.replace(/left|right|bottom|top/g, (e) => Ge[e]);
207
+ return t.replace(/left|right|bottom|top/g, (e) => Ke[e]);
218
208
  }
219
- function cn(t) {
209
+ function en(t) {
220
210
  return {
221
211
  top: 0,
222
212
  right: 0,
@@ -225,8 +215,8 @@ function cn(t) {
225
215
  ...t
226
216
  };
227
217
  }
228
- function re(t) {
229
- return typeof t != "number" ? cn(t) : {
218
+ function ne(t) {
219
+ return typeof t != "number" ? en(t) : {
230
220
  top: t,
231
221
  right: t,
232
222
  bottom: t,
@@ -251,23 +241,23 @@ function pt(t) {
251
241
  y: n
252
242
  };
253
243
  }
254
- function qt(t, e, n) {
244
+ function Xt(t, e, n) {
255
245
  let {
256
246
  reference: o,
257
247
  floating: r
258
248
  } = t;
259
- const i = z(e), s = Lt(e), c = Dt(s), f = q(e), a = i === "y", l = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, p = o[c] / 2 - r[c] / 2;
249
+ const i = K(e), s = Lt(e), c = Dt(s), f = U(e), l = i === "y", a = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, p = o[c] / 2 - r[c] / 2;
260
250
  let d;
261
251
  switch (f) {
262
252
  case "top":
263
253
  d = {
264
- x: l,
254
+ x: a,
265
255
  y: o.y - r.height
266
256
  };
267
257
  break;
268
258
  case "bottom":
269
259
  d = {
270
- x: l,
260
+ x: a,
271
261
  y: o.y + o.height
272
262
  };
273
263
  break;
@@ -291,69 +281,69 @@ function qt(t, e, n) {
291
281
  }
292
282
  switch (tt(e)) {
293
283
  case "start":
294
- d[s] -= p * (n && a ? -1 : 1);
284
+ d[s] -= p * (n && l ? -1 : 1);
295
285
  break;
296
286
  case "end":
297
- d[s] += p * (n && a ? -1 : 1);
287
+ d[s] += p * (n && l ? -1 : 1);
298
288
  break;
299
289
  }
300
290
  return d;
301
291
  }
302
- const an = async (t, e, n) => {
292
+ const nn = async (t, e, n) => {
303
293
  const {
304
294
  placement: o = "bottom",
305
295
  strategy: r = "absolute",
306
296
  middleware: i = [],
307
297
  platform: s
308
298
  } = n, c = i.filter(Boolean), f = await (s.isRTL == null ? void 0 : s.isRTL(e));
309
- let a = await s.getElementRects({
299
+ let l = await s.getElementRects({
310
300
  reference: t,
311
301
  floating: e,
312
302
  strategy: r
313
303
  }), {
314
- x: l,
304
+ x: a,
315
305
  y: u
316
- } = qt(a, o, f), p = o, d = {}, h = 0;
306
+ } = Xt(l, o, f), p = o, d = {}, h = 0;
317
307
  for (let m = 0; m < c.length; m++) {
318
308
  const {
319
- name: y,
309
+ name: w,
320
310
  fn: g
321
311
  } = c[m], {
322
- x,
312
+ x: v,
323
313
  y: E,
324
314
  data: b,
325
315
  reset: A
326
316
  } = await g({
327
- x: l,
317
+ x: a,
328
318
  y: u,
329
319
  initialPlacement: o,
330
320
  placement: p,
331
321
  strategy: r,
332
322
  middlewareData: d,
333
- rects: a,
323
+ rects: l,
334
324
  platform: s,
335
325
  elements: {
336
326
  reference: t,
337
327
  floating: e
338
328
  }
339
329
  });
340
- l = x ?? l, u = E ?? u, d = {
330
+ a = v ?? a, u = E ?? u, d = {
341
331
  ...d,
342
- [y]: {
343
- ...d[y],
332
+ [w]: {
333
+ ...d[w],
344
334
  ...b
345
335
  }
346
- }, A && h <= 50 && (h++, typeof A == "object" && (A.placement && (p = A.placement), A.rects && (a = A.rects === !0 ? await s.getElementRects({
336
+ }, A && h <= 50 && (h++, typeof A == "object" && (A.placement && (p = A.placement), A.rects && (l = A.rects === !0 ? await s.getElementRects({
347
337
  reference: t,
348
338
  floating: e,
349
339
  strategy: r
350
340
  }) : A.rects), {
351
- x: l,
341
+ x: a,
352
342
  y: u
353
- } = qt(a, p, f)), m = -1);
343
+ } = Xt(l, p, f)), m = -1);
354
344
  }
355
345
  return {
356
- x: l,
346
+ x: a,
357
347
  y: u,
358
348
  placement: p,
359
349
  strategy: r,
@@ -371,17 +361,17 @@ async function ot(t, e) {
371
361
  elements: c,
372
362
  strategy: f
373
363
  } = t, {
374
- boundary: a = "clippingAncestors",
375
- rootBoundary: l = "viewport",
364
+ boundary: l = "clippingAncestors",
365
+ rootBoundary: a = "viewport",
376
366
  elementContext: u = "floating",
377
367
  altBoundary: p = !1,
378
368
  padding: d = 0
379
- } = U(e, t), h = re(d), y = c[p ? u === "floating" ? "reference" : "floating" : u], g = pt(await i.getClippingRect({
380
- element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
381
- boundary: a,
382
- rootBoundary: l,
369
+ } = X(e, t), h = ne(d), w = c[p ? u === "floating" ? "reference" : "floating" : u], g = pt(await i.getClippingRect({
370
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(w))) == null || n ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
371
+ boundary: l,
372
+ rootBoundary: a,
383
373
  strategy: f
384
- })), x = u === "floating" ? {
374
+ })), v = u === "floating" ? {
385
375
  x: o,
386
376
  y: r,
387
377
  width: s.floating.width,
@@ -394,10 +384,10 @@ async function ot(t, e) {
394
384
  y: 1
395
385
  }, A = pt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
396
386
  elements: c,
397
- rect: x,
387
+ rect: v,
398
388
  offsetParent: E,
399
389
  strategy: f
400
- }) : x);
390
+ }) : v);
401
391
  return {
402
392
  top: (g.top - A.top + h.top) / b.y,
403
393
  bottom: (A.bottom - g.bottom + h.bottom) / b.y,
@@ -405,7 +395,7 @@ async function ot(t, e) {
405
395
  right: (A.right - g.right + h.right) / b.x
406
396
  };
407
397
  }
408
- const ln = (t) => ({
398
+ const on = (t) => ({
409
399
  name: "arrow",
410
400
  options: t,
411
401
  async fn(e) {
@@ -418,23 +408,23 @@ const ln = (t) => ({
418
408
  elements: c,
419
409
  middlewareData: f
420
410
  } = e, {
421
- element: a,
422
- padding: l = 0
423
- } = U(t, e) || {};
424
- if (a == null)
411
+ element: l,
412
+ padding: a = 0
413
+ } = X(t, e) || {};
414
+ if (l == null)
425
415
  return {};
426
- const u = re(l), p = {
416
+ const u = ne(a), p = {
427
417
  x: n,
428
418
  y: o
429
- }, d = Lt(r), h = Dt(d), m = await s.getDimensions(a), y = d === "y", g = y ? "top" : "left", x = y ? "bottom" : "right", E = y ? "clientHeight" : "clientWidth", b = i.reference[h] + i.reference[d] - p[d] - i.floating[h], A = p[d] - i.reference[d], R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
430
- let v = R ? R[E] : 0;
431
- (!v || !await (s.isElement == null ? void 0 : s.isElement(R))) && (v = c.floating[E] || i.floating[h]);
432
- const C = b / 2 - A / 2, M = v / 2 - m[h] / 2 - 1, O = K(u[g], M), N = K(u[x], M), k = O, D = v - m[h] - N, S = v / 2 - m[h] / 2 + C, $ = Rt(k, S, D), L = !f.arrow && tt(r) != null && S !== $ && i.reference[h] / 2 - (S < k ? O : N) - m[h] / 2 < 0, T = L ? S < k ? S - k : S - D : 0;
419
+ }, d = Lt(r), h = Dt(d), m = await s.getDimensions(l), w = d === "y", g = w ? "top" : "left", v = w ? "bottom" : "right", E = w ? "clientHeight" : "clientWidth", b = i.reference[h] + i.reference[d] - p[d] - i.floating[h], A = p[d] - i.reference[d], P = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
420
+ let x = P ? P[E] : 0;
421
+ (!x || !await (s.isElement == null ? void 0 : s.isElement(P))) && (x = c.floating[E] || i.floating[h]);
422
+ const C = b / 2 - A / 2, M = x / 2 - m[h] / 2 - 1, O = q(u[g], M), F = q(u[v], M), N = O, D = x - m[h] - F, S = x / 2 - m[h] / 2 + C, B = Rt(N, S, D), L = !f.arrow && tt(r) != null && S !== B && i.reference[h] / 2 - (S < N ? O : F) - m[h] / 2 < 0, T = L ? S < N ? S - N : S - D : 0;
433
423
  return {
434
424
  [d]: p[d] + T,
435
425
  data: {
436
- [d]: $,
437
- centerOffset: S - $ - T,
426
+ [d]: B,
427
+ centerOffset: S - B - T,
438
428
  ...L && {
439
429
  alignmentOffset: T
440
430
  }
@@ -442,7 +432,7 @@ const ln = (t) => ({
442
432
  reset: L
443
433
  };
444
434
  }
445
- }), fn = function(t) {
435
+ }), rn = function(t) {
446
436
  return t === void 0 && (t = {}), {
447
437
  name: "flip",
448
438
  options: t,
@@ -454,58 +444,56 @@ const ln = (t) => ({
454
444
  rects: s,
455
445
  initialPlacement: c,
456
446
  platform: f,
457
- elements: a
447
+ elements: l
458
448
  } = e, {
459
- mainAxis: l = !0,
449
+ mainAxis: a = !0,
460
450
  crossAxis: u = !0,
461
451
  fallbackPlacements: p,
462
452
  fallbackStrategy: d = "bestFit",
463
453
  fallbackAxisSideDirection: h = "none",
464
454
  flipAlignment: m = !0,
465
- ...y
466
- } = U(t, e);
455
+ ...w
456
+ } = X(t, e);
467
457
  if ((n = i.arrow) != null && n.alignmentOffset)
468
458
  return {};
469
- const g = q(r), x = z(c), E = q(c) === c, b = await (f.isRTL == null ? void 0 : f.isRTL(a.floating)), A = p || (E || !m ? [dt(c)] : en(c)), R = h !== "none";
470
- !p && R && A.push(...sn(c, m, h, b));
471
- const v = [c, ...A], C = await ot(e, y), M = [];
459
+ const g = U(r), v = K(c), E = U(c) === c, b = await (f.isRTL == null ? void 0 : f.isRTL(l.floating)), A = p || (E || !m ? [dt(c)] : Je(c)), P = h !== "none";
460
+ !p && P && A.push(...tn(c, m, h, b));
461
+ const x = [c, ...A], C = await ot(e, w), M = [];
472
462
  let O = ((o = i.flip) == null ? void 0 : o.overflows) || [];
473
- if (l && M.push(C[g]), u) {
474
- const S = tn(r, s, b);
463
+ if (a && M.push(C[g]), u) {
464
+ const S = Ge(r, s, b);
475
465
  M.push(C[S[0]], C[S[1]]);
476
466
  }
477
467
  if (O = [...O, {
478
468
  placement: r,
479
469
  overflows: M
480
470
  }], !M.every((S) => S <= 0)) {
481
- var N, k;
482
- const S = (((N = i.flip) == null ? void 0 : N.index) || 0) + 1, $ = v[S];
483
- if ($ && (!(u === "alignment" ? x !== z($) : !1) || // We leave the current main axis only if every placement on that axis
484
- // overflows the main axis.
485
- O.every((P) => z(P.placement) === x ? P.overflows[0] > 0 : !0)))
471
+ var F, N;
472
+ const S = (((F = i.flip) == null ? void 0 : F.index) || 0) + 1, B = x[S];
473
+ if (B)
486
474
  return {
487
475
  data: {
488
476
  index: S,
489
477
  overflows: O
490
478
  },
491
479
  reset: {
492
- placement: $
480
+ placement: B
493
481
  }
494
482
  };
495
- let L = (k = O.filter((T) => T.overflows[0] <= 0).sort((T, P) => T.overflows[1] - P.overflows[1])[0]) == null ? void 0 : k.placement;
483
+ let L = (N = O.filter((T) => T.overflows[0] <= 0).sort((T, R) => T.overflows[1] - R.overflows[1])[0]) == null ? void 0 : N.placement;
496
484
  if (!L)
497
485
  switch (d) {
498
486
  case "bestFit": {
499
487
  var D;
500
- const T = (D = O.filter((P) => {
501
- if (R) {
502
- const F = z(P.placement);
503
- return F === x || // Create a bias to the `y` side axis due to horizontal
488
+ const T = (D = O.filter((R) => {
489
+ if (P) {
490
+ const k = K(R.placement);
491
+ return k === v || // Create a bias to the `y` side axis due to horizontal
504
492
  // reading directions favoring greater width.
505
- F === "y";
493
+ k === "y";
506
494
  }
507
495
  return !0;
508
- }).map((P) => [P.placement, P.overflows.filter((F) => F > 0).reduce((F, V) => F + V, 0)]).sort((P, F) => P[1] - F[1])[0]) == null ? void 0 : D[0];
496
+ }).map((R) => [R.placement, R.overflows.filter((k) => k > 0).reduce((k, z) => k + z, 0)]).sort((R, k) => R[1] - k[1])[0]) == null ? void 0 : D[0];
509
497
  T && (L = T);
510
498
  break;
511
499
  }
@@ -524,7 +512,7 @@ const ln = (t) => ({
524
512
  }
525
513
  };
526
514
  };
527
- function Kt(t, e) {
515
+ function Ut(t, e) {
528
516
  return {
529
517
  top: t.top - e.height,
530
518
  right: t.right - e.width,
@@ -532,10 +520,10 @@ function Kt(t, e) {
532
520
  left: t.left - e.width
533
521
  };
534
522
  }
535
- function Zt(t) {
536
- return Ze.some((e) => t[e] >= 0);
523
+ function qt(t) {
524
+ return qe.some((e) => t[e] >= 0);
537
525
  }
538
- const un = function(t) {
526
+ const sn = function(t) {
539
527
  return t === void 0 && (t = {}), {
540
528
  name: "hide",
541
529
  options: t,
@@ -545,17 +533,17 @@ const un = function(t) {
545
533
  } = e, {
546
534
  strategy: o = "referenceHidden",
547
535
  ...r
548
- } = U(t, e);
536
+ } = X(t, e);
549
537
  switch (o) {
550
538
  case "referenceHidden": {
551
539
  const i = await ot(e, {
552
540
  ...r,
553
541
  elementContext: "reference"
554
- }), s = Kt(i, n.reference);
542
+ }), s = Ut(i, n.reference);
555
543
  return {
556
544
  data: {
557
545
  referenceHiddenOffsets: s,
558
- referenceHidden: Zt(s)
546
+ referenceHidden: qt(s)
559
547
  }
560
548
  };
561
549
  }
@@ -563,11 +551,11 @@ const un = function(t) {
563
551
  const i = await ot(e, {
564
552
  ...r,
565
553
  altBoundary: !0
566
- }), s = Kt(i, n.floating);
554
+ }), s = Ut(i, n.floating);
567
555
  return {
568
556
  data: {
569
557
  escapedOffsets: s,
570
- escaped: Zt(s)
558
+ escaped: qt(s)
571
559
  }
572
560
  };
573
561
  }
@@ -576,13 +564,13 @@ const un = function(t) {
576
564
  }
577
565
  }
578
566
  };
579
- }, ie = /* @__PURE__ */ new Set(["left", "top"]);
580
- async function dn(t, e) {
567
+ };
568
+ async function cn(t, e) {
581
569
  const {
582
570
  placement: n,
583
571
  platform: o,
584
572
  elements: r
585
- } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = q(n), c = tt(n), f = z(n) === "y", a = ie.has(s) ? -1 : 1, l = i && f ? -1 : 1, u = U(e, t);
573
+ } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = U(n), c = tt(n), f = K(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, a = i && f ? -1 : 1, u = X(e, t);
586
574
  let {
587
575
  mainAxis: p,
588
576
  crossAxis: d,
@@ -597,14 +585,14 @@ async function dn(t, e) {
597
585
  alignmentAxis: u.alignmentAxis
598
586
  };
599
587
  return c && typeof h == "number" && (d = c === "end" ? h * -1 : h), f ? {
600
- x: d * l,
601
- y: p * a
588
+ x: d * a,
589
+ y: p * l
602
590
  } : {
603
- x: p * a,
604
- y: d * l
591
+ x: p * l,
592
+ y: d * a
605
593
  };
606
594
  }
607
- const pn = function(t) {
595
+ const ln = function(t) {
608
596
  return t === void 0 && (t = 0), {
609
597
  name: "offset",
610
598
  options: t,
@@ -615,7 +603,7 @@ const pn = function(t) {
615
603
  y: i,
616
604
  placement: s,
617
605
  middlewareData: c
618
- } = e, f = await dn(e, t);
606
+ } = e, f = await cn(e, t);
619
607
  return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
620
608
  x: r + f.x,
621
609
  y: i + f.y,
@@ -626,7 +614,7 @@ const pn = function(t) {
626
614
  };
627
615
  }
628
616
  };
629
- }, hn = function(t) {
617
+ }, an = function(t) {
630
618
  return t === void 0 && (t = {}), {
631
619
  name: "shift",
632
620
  options: t,
@@ -639,30 +627,30 @@ const pn = function(t) {
639
627
  mainAxis: i = !0,
640
628
  crossAxis: s = !1,
641
629
  limiter: c = {
642
- fn: (y) => {
630
+ fn: (w) => {
643
631
  let {
644
632
  x: g,
645
- y: x
646
- } = y;
633
+ y: v
634
+ } = w;
647
635
  return {
648
636
  x: g,
649
- y: x
637
+ y: v
650
638
  };
651
639
  }
652
640
  },
653
641
  ...f
654
- } = U(t, e), a = {
642
+ } = X(t, e), l = {
655
643
  x: n,
656
644
  y: o
657
- }, l = await ot(e, f), u = z(q(r)), p = St(u);
658
- let d = a[p], h = a[u];
645
+ }, a = await ot(e, f), u = K(U(r)), p = St(u);
646
+ let d = l[p], h = l[u];
659
647
  if (i) {
660
- const y = p === "y" ? "top" : "left", g = p === "y" ? "bottom" : "right", x = d + l[y], E = d - l[g];
661
- d = Rt(x, d, E);
648
+ const w = p === "y" ? "top" : "left", g = p === "y" ? "bottom" : "right", v = d + a[w], E = d - a[g];
649
+ d = Rt(v, d, E);
662
650
  }
663
651
  if (s) {
664
- const y = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", x = h + l[y], E = h - l[g];
665
- h = Rt(x, h, E);
652
+ const w = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", v = h + a[w], E = h - a[g];
653
+ h = Rt(v, h, E);
666
654
  }
667
655
  const m = c.fn({
668
656
  ...e,
@@ -682,7 +670,7 @@ const pn = function(t) {
682
670
  };
683
671
  }
684
672
  };
685
- }, mn = function(t) {
673
+ }, fn = function(t) {
686
674
  return t === void 0 && (t = {}), {
687
675
  options: t,
688
676
  fn(e) {
@@ -695,13 +683,13 @@ const pn = function(t) {
695
683
  } = e, {
696
684
  offset: c = 0,
697
685
  mainAxis: f = !0,
698
- crossAxis: a = !0
699
- } = U(t, e), l = {
686
+ crossAxis: l = !0
687
+ } = X(t, e), a = {
700
688
  x: n,
701
689
  y: o
702
- }, u = z(r), p = St(u);
703
- let d = l[p], h = l[u];
704
- const m = U(c, e), y = typeof m == "number" ? {
690
+ }, u = K(r), p = St(u);
691
+ let d = a[p], h = a[u];
692
+ const m = X(c, e), w = typeof m == "number" ? {
705
693
  mainAxis: m,
706
694
  crossAxis: 0
707
695
  } : {
@@ -710,13 +698,13 @@ const pn = function(t) {
710
698
  ...m
711
699
  };
712
700
  if (f) {
713
- const E = p === "y" ? "height" : "width", b = i.reference[p] - i.floating[E] + y.mainAxis, A = i.reference[p] + i.reference[E] - y.mainAxis;
701
+ const E = p === "y" ? "height" : "width", b = i.reference[p] - i.floating[E] + w.mainAxis, A = i.reference[p] + i.reference[E] - w.mainAxis;
714
702
  d < b ? d = b : d > A && (d = A);
715
703
  }
716
- if (a) {
717
- var g, x;
718
- const E = p === "y" ? "width" : "height", b = ie.has(q(r)), A = i.reference[u] - i.floating[E] + (b && ((g = s.offset) == null ? void 0 : g[u]) || 0) + (b ? 0 : y.crossAxis), R = i.reference[u] + i.reference[E] + (b ? 0 : ((x = s.offset) == null ? void 0 : x[u]) || 0) - (b ? y.crossAxis : 0);
719
- h < A ? h = A : h > R && (h = R);
704
+ if (l) {
705
+ var g, v;
706
+ const E = p === "y" ? "width" : "height", b = ["top", "left"].includes(U(r)), A = i.reference[u] - i.floating[E] + (b && ((g = s.offset) == null ? void 0 : g[u]) || 0) + (b ? 0 : w.crossAxis), P = i.reference[u] + i.reference[E] + (b ? 0 : ((v = s.offset) == null ? void 0 : v[u]) || 0) - (b ? w.crossAxis : 0);
707
+ h < A ? h = A : h > P && (h = P);
720
708
  }
721
709
  return {
722
710
  [p]: d,
@@ -724,7 +712,7 @@ const pn = function(t) {
724
712
  };
725
713
  }
726
714
  };
727
- }, gn = function(t) {
715
+ }, un = function(t) {
728
716
  return t === void 0 && (t = {}), {
729
717
  name: "size",
730
718
  options: t,
@@ -738,23 +726,23 @@ const pn = function(t) {
738
726
  } = e, {
739
727
  apply: f = () => {
740
728
  },
741
- ...a
742
- } = U(t, e), l = await ot(e, a), u = q(r), p = tt(r), d = z(r) === "y", {
729
+ ...l
730
+ } = X(t, e), a = await ot(e, l), u = U(r), p = tt(r), d = K(r) === "y", {
743
731
  width: h,
744
732
  height: m
745
733
  } = i.floating;
746
- let y, g;
747
- u === "top" || u === "bottom" ? (y = u, g = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (g = u, y = p === "end" ? "top" : "bottom");
748
- const x = m - l.top - l.bottom, E = h - l.left - l.right, b = K(m - l[y], x), A = K(h - l[g], E), R = !e.middlewareData.shift;
749
- let v = b, C = A;
750
- if ((n = e.middlewareData.shift) != null && n.enabled.x && (C = E), (o = e.middlewareData.shift) != null && o.enabled.y && (v = x), R && !p) {
751
- const O = W(l.left, 0), N = W(l.right, 0), k = W(l.top, 0), D = W(l.bottom, 0);
752
- d ? C = h - 2 * (O !== 0 || N !== 0 ? O + N : W(l.left, l.right)) : v = m - 2 * (k !== 0 || D !== 0 ? k + D : W(l.top, l.bottom));
734
+ let w, g;
735
+ u === "top" || u === "bottom" ? (w = u, g = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (g = u, w = p === "end" ? "top" : "bottom");
736
+ const v = m - a.top - a.bottom, E = h - a.left - a.right, b = q(m - a[w], v), A = q(h - a[g], E), P = !e.middlewareData.shift;
737
+ let x = b, C = A;
738
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (C = E), (o = e.middlewareData.shift) != null && o.enabled.y && (x = v), P && !p) {
739
+ const O = $(a.left, 0), F = $(a.right, 0), N = $(a.top, 0), D = $(a.bottom, 0);
740
+ d ? C = h - 2 * (O !== 0 || F !== 0 ? O + F : $(a.left, a.right)) : x = m - 2 * (N !== 0 || D !== 0 ? N + D : $(a.top, a.bottom));
753
741
  }
754
742
  await f({
755
743
  ...e,
756
744
  availableWidth: C,
757
- availableHeight: v
745
+ availableHeight: x
758
746
  });
759
747
  const M = await s.getDimensions(c.floating);
760
748
  return h !== M.width || m !== M.height ? {
@@ -769,29 +757,28 @@ function wt() {
769
757
  return typeof window < "u";
770
758
  }
771
759
  function et(t) {
772
- return se(t) ? (t.nodeName || "").toLowerCase() : "#document";
760
+ return oe(t) ? (t.nodeName || "").toLowerCase() : "#document";
773
761
  }
774
- function B(t) {
762
+ function W(t) {
775
763
  var e;
776
764
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
777
765
  }
778
- function X(t) {
766
+ function j(t) {
779
767
  var e;
780
- return (e = (se(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
768
+ return (e = (oe(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
781
769
  }
782
- function se(t) {
783
- return wt() ? t instanceof Node || t instanceof B(t).Node : !1;
770
+ function oe(t) {
771
+ return wt() ? t instanceof Node || t instanceof W(t).Node : !1;
784
772
  }
785
- function H(t) {
786
- return wt() ? t instanceof Element || t instanceof B(t).Element : !1;
773
+ function _(t) {
774
+ return wt() ? t instanceof Element || t instanceof W(t).Element : !1;
787
775
  }
788
- function j(t) {
789
- return wt() ? t instanceof HTMLElement || t instanceof B(t).HTMLElement : !1;
776
+ function Y(t) {
777
+ return wt() ? t instanceof HTMLElement || t instanceof W(t).HTMLElement : !1;
790
778
  }
791
- function Gt(t) {
792
- return !wt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof B(t).ShadowRoot;
779
+ function Kt(t) {
780
+ return !wt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof W(t).ShadowRoot;
793
781
  }
794
- const wn = /* @__PURE__ */ new Set(["inline", "contents"]);
795
782
  function st(t) {
796
783
  const {
797
784
  overflow: e,
@@ -799,15 +786,13 @@ function st(t) {
799
786
  overflowY: o,
800
787
  display: r
801
788
  } = I(t);
802
- return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !wn.has(r);
789
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(r);
803
790
  }
804
- const yn = /* @__PURE__ */ new Set(["table", "td", "th"]);
805
- function xn(t) {
806
- return yn.has(et(t));
791
+ function dn(t) {
792
+ return ["table", "td", "th"].includes(et(t));
807
793
  }
808
- const vn = [":popover-open", ":modal"];
809
794
  function yt(t) {
810
- return vn.some((e) => {
795
+ return [":popover-open", ":modal"].some((e) => {
811
796
  try {
812
797
  return t.matches(e);
813
798
  } catch {
@@ -815,14 +800,13 @@ function yt(t) {
815
800
  }
816
801
  });
817
802
  }
818
- const bn = ["transform", "translate", "scale", "rotate", "perspective"], An = ["transform", "translate", "scale", "rotate", "perspective", "filter"], En = ["paint", "layout", "strict", "content"];
819
803
  function Tt(t) {
820
- const e = Mt(), n = H(t) ? I(t) : t;
821
- return bn.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || An.some((o) => (n.willChange || "").includes(o)) || En.some((o) => (n.contain || "").includes(o));
804
+ const e = Mt(), n = _(t) ? I(t) : t;
805
+ return ["transform", "translate", "scale", "rotate", "perspective"].some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
822
806
  }
823
- function Pn(t) {
807
+ function pn(t) {
824
808
  let e = Z(t);
825
- for (; j(e) && !Q(e); ) {
809
+ for (; Y(e) && !Q(e); ) {
826
810
  if (Tt(e))
827
811
  return e;
828
812
  if (yt(e))
@@ -834,15 +818,14 @@ function Pn(t) {
834
818
  function Mt() {
835
819
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
836
820
  }
837
- const Rn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
838
821
  function Q(t) {
839
- return Rn.has(et(t));
822
+ return ["html", "body", "#document"].includes(et(t));
840
823
  }
841
824
  function I(t) {
842
- return B(t).getComputedStyle(t);
825
+ return W(t).getComputedStyle(t);
843
826
  }
844
827
  function xt(t) {
845
- return H(t) ? {
828
+ return _(t) ? {
846
829
  scrollLeft: t.scrollLeft,
847
830
  scrollTop: t.scrollTop
848
831
  } : {
@@ -857,19 +840,19 @@ function Z(t) {
857
840
  // Step into the shadow DOM of the parent of a slotted node.
858
841
  t.assignedSlot || // DOM Element detected.
859
842
  t.parentNode || // ShadowRoot detected.
860
- Gt(t) && t.host || // Fallback.
861
- X(t)
843
+ Kt(t) && t.host || // Fallback.
844
+ j(t)
862
845
  );
863
- return Gt(e) ? e.host : e;
846
+ return Kt(e) ? e.host : e;
864
847
  }
865
- function ce(t) {
848
+ function re(t) {
866
849
  const e = Z(t);
867
- return Q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : j(e) && st(e) ? e : ce(e);
850
+ return Q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : Y(e) && st(e) ? e : re(e);
868
851
  }
869
852
  function rt(t, e, n) {
870
853
  var o;
871
854
  e === void 0 && (e = []), n === void 0 && (n = !0);
872
- const r = ce(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = B(r);
855
+ const r = re(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = W(r);
873
856
  if (i) {
874
857
  const c = Ot(s);
875
858
  return e.concat(s, s.visualViewport || [], st(r) ? r : [], c && n ? rt(c) : []);
@@ -879,130 +862,130 @@ function rt(t, e, n) {
879
862
  function Ot(t) {
880
863
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
881
864
  }
882
- function ae(t) {
865
+ function ie(t) {
883
866
  const e = I(t);
884
867
  let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
885
- const r = j(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = ut(n) !== i || ut(o) !== s;
868
+ const r = Y(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = ut(n) !== i || ut(o) !== s;
886
869
  return c && (n = i, o = s), {
887
870
  width: n,
888
871
  height: o,
889
872
  $: c
890
873
  };
891
874
  }
892
- function Ft(t) {
893
- return H(t) ? t : t.contextElement;
875
+ function kt(t) {
876
+ return _(t) ? t : t.contextElement;
894
877
  }
895
878
  function J(t) {
896
- const e = Ft(t);
897
- if (!j(e))
898
- return Y(1);
879
+ const e = kt(t);
880
+ if (!Y(e))
881
+ return V(1);
899
882
  const n = e.getBoundingClientRect(), {
900
883
  width: o,
901
884
  height: r,
902
885
  $: i
903
- } = ae(e);
886
+ } = ie(e);
904
887
  let s = (i ? ut(n.width) : n.width) / o, c = (i ? ut(n.height) : n.height) / r;
905
888
  return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
906
889
  x: s,
907
890
  y: c
908
891
  };
909
892
  }
910
- const Cn = /* @__PURE__ */ Y(0);
911
- function le(t) {
912
- const e = B(t);
913
- return !Mt() || !e.visualViewport ? Cn : {
893
+ const hn = /* @__PURE__ */ V(0);
894
+ function se(t) {
895
+ const e = W(t);
896
+ return !Mt() || !e.visualViewport ? hn : {
914
897
  x: e.visualViewport.offsetLeft,
915
898
  y: e.visualViewport.offsetTop
916
899
  };
917
900
  }
918
- function On(t, e, n) {
919
- return e === void 0 && (e = !1), !n || e && n !== B(t) ? !1 : e;
901
+ function mn(t, e, n) {
902
+ return e === void 0 && (e = !1), !n || e && n !== W(t) ? !1 : e;
920
903
  }
921
904
  function G(t, e, n, o) {
922
905
  e === void 0 && (e = !1), n === void 0 && (n = !1);
923
- const r = t.getBoundingClientRect(), i = Ft(t);
924
- let s = Y(1);
925
- e && (o ? H(o) && (s = J(o)) : s = J(t));
926
- const c = On(i, n, o) ? le(i) : Y(0);
927
- let f = (r.left + c.x) / s.x, a = (r.top + c.y) / s.y, l = r.width / s.x, u = r.height / s.y;
906
+ const r = t.getBoundingClientRect(), i = kt(t);
907
+ let s = V(1);
908
+ e && (o ? _(o) && (s = J(o)) : s = J(t));
909
+ const c = mn(i, n, o) ? se(i) : V(0);
910
+ let f = (r.left + c.x) / s.x, l = (r.top + c.y) / s.y, a = r.width / s.x, u = r.height / s.y;
928
911
  if (i) {
929
- const p = B(i), d = o && H(o) ? B(o) : o;
912
+ const p = W(i), d = o && _(o) ? W(o) : o;
930
913
  let h = p, m = Ot(h);
931
914
  for (; m && o && d !== h; ) {
932
- const y = J(m), g = m.getBoundingClientRect(), x = I(m), E = g.left + (m.clientLeft + parseFloat(x.paddingLeft)) * y.x, b = g.top + (m.clientTop + parseFloat(x.paddingTop)) * y.y;
933
- f *= y.x, a *= y.y, l *= y.x, u *= y.y, f += E, a += b, h = B(m), m = Ot(h);
915
+ const w = J(m), g = m.getBoundingClientRect(), v = I(m), E = g.left + (m.clientLeft + parseFloat(v.paddingLeft)) * w.x, b = g.top + (m.clientTop + parseFloat(v.paddingTop)) * w.y;
916
+ f *= w.x, l *= w.y, a *= w.x, u *= w.y, f += E, l += b, h = W(m), m = Ot(h);
934
917
  }
935
918
  }
936
919
  return pt({
937
- width: l,
920
+ width: a,
938
921
  height: u,
939
922
  x: f,
940
- y: a
923
+ y: l
941
924
  });
942
925
  }
943
- function Nt(t, e) {
926
+ function Ft(t, e) {
944
927
  const n = xt(t).scrollLeft;
945
- return e ? e.left + n : G(X(t)).left + n;
928
+ return e ? e.left + n : G(j(t)).left + n;
946
929
  }
947
- function fe(t, e, n) {
930
+ function ce(t, e, n) {
948
931
  n === void 0 && (n = !1);
949
932
  const o = t.getBoundingClientRect(), r = o.left + e.scrollLeft - (n ? 0 : (
950
933
  // RTL <body> scrollbar.
951
- Nt(t, o)
934
+ Ft(t, o)
952
935
  )), i = o.top + e.scrollTop;
953
936
  return {
954
937
  x: r,
955
938
  y: i
956
939
  };
957
940
  }
958
- function Sn(t) {
941
+ function gn(t) {
959
942
  let {
960
943
  elements: e,
961
944
  rect: n,
962
945
  offsetParent: o,
963
946
  strategy: r
964
947
  } = t;
965
- const i = r === "fixed", s = X(o), c = e ? yt(e.floating) : !1;
948
+ const i = r === "fixed", s = j(o), c = e ? yt(e.floating) : !1;
966
949
  if (o === s || c && i)
967
950
  return n;
968
951
  let f = {
969
952
  scrollLeft: 0,
970
953
  scrollTop: 0
971
- }, a = Y(1);
972
- const l = Y(0), u = j(o);
973
- if ((u || !u && !i) && ((et(o) !== "body" || st(s)) && (f = xt(o)), j(o))) {
954
+ }, l = V(1);
955
+ const a = V(0), u = Y(o);
956
+ if ((u || !u && !i) && ((et(o) !== "body" || st(s)) && (f = xt(o)), Y(o))) {
974
957
  const d = G(o);
975
- a = J(o), l.x = d.x + o.clientLeft, l.y = d.y + o.clientTop;
958
+ l = J(o), a.x = d.x + o.clientLeft, a.y = d.y + o.clientTop;
976
959
  }
977
- const p = s && !u && !i ? fe(s, f, !0) : Y(0);
960
+ const p = s && !u && !i ? ce(s, f, !0) : V(0);
978
961
  return {
979
- width: n.width * a.x,
980
- height: n.height * a.y,
981
- x: n.x * a.x - f.scrollLeft * a.x + l.x + p.x,
982
- y: n.y * a.y - f.scrollTop * a.y + l.y + p.y
962
+ width: n.width * l.x,
963
+ height: n.height * l.y,
964
+ x: n.x * l.x - f.scrollLeft * l.x + a.x + p.x,
965
+ y: n.y * l.y - f.scrollTop * l.y + a.y + p.y
983
966
  };
984
967
  }
985
- function Dn(t) {
968
+ function wn(t) {
986
969
  return Array.from(t.getClientRects());
987
970
  }
988
- function Ln(t) {
989
- const e = X(t), n = xt(t), o = t.ownerDocument.body, r = W(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = W(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
990
- let s = -n.scrollLeft + Nt(t);
971
+ function yn(t) {
972
+ const e = j(t), n = xt(t), o = t.ownerDocument.body, r = $(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = $(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
973
+ let s = -n.scrollLeft + Ft(t);
991
974
  const c = -n.scrollTop;
992
- return I(o).direction === "rtl" && (s += W(e.clientWidth, o.clientWidth) - r), {
975
+ return I(o).direction === "rtl" && (s += $(e.clientWidth, o.clientWidth) - r), {
993
976
  width: r,
994
977
  height: i,
995
978
  x: s,
996
979
  y: c
997
980
  };
998
981
  }
999
- function Tn(t, e) {
1000
- const n = B(t), o = X(t), r = n.visualViewport;
982
+ function xn(t, e) {
983
+ const n = W(t), o = j(t), r = n.visualViewport;
1001
984
  let i = o.clientWidth, s = o.clientHeight, c = 0, f = 0;
1002
985
  if (r) {
1003
986
  i = r.width, s = r.height;
1004
- const a = Mt();
1005
- (!a || a && e === "fixed") && (c = r.offsetLeft, f = r.offsetTop);
987
+ const l = Mt();
988
+ (!l || l && e === "fixed") && (c = r.offsetLeft, f = r.offsetTop);
1006
989
  }
1007
990
  return {
1008
991
  width: i,
@@ -1011,26 +994,25 @@ function Tn(t, e) {
1011
994
  y: f
1012
995
  };
1013
996
  }
1014
- const Mn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
1015
- function Fn(t, e) {
1016
- const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = j(t) ? J(t) : Y(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, f = r * i.x, a = o * i.y;
997
+ function vn(t, e) {
998
+ const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = Y(t) ? J(t) : V(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, f = r * i.x, l = o * i.y;
1017
999
  return {
1018
1000
  width: s,
1019
1001
  height: c,
1020
1002
  x: f,
1021
- y: a
1003
+ y: l
1022
1004
  };
1023
1005
  }
1024
- function Jt(t, e, n) {
1006
+ function Zt(t, e, n) {
1025
1007
  let o;
1026
1008
  if (e === "viewport")
1027
- o = Tn(t, n);
1009
+ o = xn(t, n);
1028
1010
  else if (e === "document")
1029
- o = Ln(X(t));
1030
- else if (H(e))
1031
- o = Fn(e, n);
1011
+ o = yn(j(t));
1012
+ else if (_(e))
1013
+ o = vn(e, n);
1032
1014
  else {
1033
- const r = le(t);
1015
+ const r = se(t);
1034
1016
  o = {
1035
1017
  x: e.x - r.x,
1036
1018
  y: e.y - r.y,
@@ -1040,34 +1022,34 @@ function Jt(t, e, n) {
1040
1022
  }
1041
1023
  return pt(o);
1042
1024
  }
1043
- function ue(t, e) {
1025
+ function le(t, e) {
1044
1026
  const n = Z(t);
1045
- return n === e || !H(n) || Q(n) ? !1 : I(n).position === "fixed" || ue(n, e);
1027
+ return n === e || !_(n) || Q(n) ? !1 : I(n).position === "fixed" || le(n, e);
1046
1028
  }
1047
- function Nn(t, e) {
1029
+ function bn(t, e) {
1048
1030
  const n = e.get(t);
1049
1031
  if (n)
1050
1032
  return n;
1051
- let o = rt(t, [], !1).filter((c) => H(c) && et(c) !== "body"), r = null;
1033
+ let o = rt(t, [], !1).filter((c) => _(c) && et(c) !== "body"), r = null;
1052
1034
  const i = I(t).position === "fixed";
1053
1035
  let s = i ? Z(t) : t;
1054
- for (; H(s) && !Q(s); ) {
1036
+ for (; _(s) && !Q(s); ) {
1055
1037
  const c = I(s), f = Tt(s);
1056
- !f && c.position === "fixed" && (r = null), (i ? !f && !r : !f && c.position === "static" && !!r && Mn.has(r.position) || st(s) && !f && ue(t, s)) ? o = o.filter((l) => l !== s) : r = c, s = Z(s);
1038
+ !f && c.position === "fixed" && (r = null), (i ? !f && !r : !f && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || st(s) && !f && le(t, s)) ? o = o.filter((a) => a !== s) : r = c, s = Z(s);
1057
1039
  }
1058
1040
  return e.set(t, o), o;
1059
1041
  }
1060
- function kn(t) {
1042
+ function An(t) {
1061
1043
  let {
1062
1044
  element: e,
1063
1045
  boundary: n,
1064
1046
  rootBoundary: o,
1065
1047
  strategy: r
1066
1048
  } = t;
1067
- const s = [...n === "clippingAncestors" ? yt(e) ? [] : Nn(e, this._c) : [].concat(n), o], c = s[0], f = s.reduce((a, l) => {
1068
- const u = Jt(e, l, r);
1069
- return a.top = W(u.top, a.top), a.right = K(u.right, a.right), a.bottom = K(u.bottom, a.bottom), a.left = W(u.left, a.left), a;
1070
- }, Jt(e, c, r));
1049
+ const s = [...n === "clippingAncestors" ? yt(e) ? [] : bn(e, this._c) : [].concat(n), o], c = s[0], f = s.reduce((l, a) => {
1050
+ const u = Zt(e, a, r);
1051
+ return l.top = $(u.top, l.top), l.right = q(u.right, l.right), l.bottom = q(u.bottom, l.bottom), l.left = $(u.left, l.left), l;
1052
+ }, Zt(e, c, r));
1071
1053
  return {
1072
1054
  width: f.right - f.left,
1073
1055
  height: f.bottom - f.top,
@@ -1075,37 +1057,33 @@ function kn(t) {
1075
1057
  y: f.top
1076
1058
  };
1077
1059
  }
1078
- function $n(t) {
1060
+ function En(t) {
1079
1061
  const {
1080
1062
  width: e,
1081
1063
  height: n
1082
- } = ae(t);
1064
+ } = ie(t);
1083
1065
  return {
1084
1066
  width: e,
1085
1067
  height: n
1086
1068
  };
1087
1069
  }
1088
- function Wn(t, e, n) {
1089
- const o = j(e), r = X(e), i = n === "fixed", s = G(t, !0, i, e);
1070
+ function Pn(t, e, n) {
1071
+ const o = Y(e), r = j(e), i = n === "fixed", s = G(t, !0, i, e);
1090
1072
  let c = {
1091
1073
  scrollLeft: 0,
1092
1074
  scrollTop: 0
1093
1075
  };
1094
- const f = Y(0);
1095
- function a() {
1096
- f.x = Nt(r);
1097
- }
1076
+ const f = V(0);
1098
1077
  if (o || !o && !i)
1099
1078
  if ((et(e) !== "body" || st(r)) && (c = xt(e)), o) {
1100
- const d = G(e, !0, i, e);
1101
- f.x = d.x + e.clientLeft, f.y = d.y + e.clientTop;
1079
+ const p = G(e, !0, i, e);
1080
+ f.x = p.x + e.clientLeft, f.y = p.y + e.clientTop;
1102
1081
  } else
1103
- r && a();
1104
- i && !o && r && a();
1105
- const l = r && !o && !i ? fe(r, c) : Y(0), u = s.left + c.scrollLeft - f.x - l.x, p = s.top + c.scrollTop - f.y - l.y;
1082
+ r && (f.x = Ft(r));
1083
+ const l = r && !o && !i ? ce(r, c) : V(0), a = s.left + c.scrollLeft - f.x - l.x, u = s.top + c.scrollTop - f.y - l.y;
1106
1084
  return {
1107
- x: u,
1108
- y: p,
1085
+ x: a,
1086
+ y: u,
1109
1087
  width: s.width,
1110
1088
  height: s.height
1111
1089
  };
@@ -1113,36 +1091,36 @@ function Wn(t, e, n) {
1113
1091
  function bt(t) {
1114
1092
  return I(t).position === "static";
1115
1093
  }
1116
- function Qt(t, e) {
1117
- if (!j(t) || I(t).position === "fixed")
1094
+ function Gt(t, e) {
1095
+ if (!Y(t) || I(t).position === "fixed")
1118
1096
  return null;
1119
1097
  if (e)
1120
1098
  return e(t);
1121
1099
  let n = t.offsetParent;
1122
- return X(t) === n && (n = n.ownerDocument.body), n;
1100
+ return j(t) === n && (n = n.ownerDocument.body), n;
1123
1101
  }
1124
- function de(t, e) {
1125
- const n = B(t);
1102
+ function ae(t, e) {
1103
+ const n = W(t);
1126
1104
  if (yt(t))
1127
1105
  return n;
1128
- if (!j(t)) {
1106
+ if (!Y(t)) {
1129
1107
  let r = Z(t);
1130
1108
  for (; r && !Q(r); ) {
1131
- if (H(r) && !bt(r))
1109
+ if (_(r) && !bt(r))
1132
1110
  return r;
1133
1111
  r = Z(r);
1134
1112
  }
1135
1113
  return n;
1136
1114
  }
1137
- let o = Qt(t, e);
1138
- for (; o && xn(o) && bt(o); )
1139
- o = Qt(o, e);
1140
- return o && Q(o) && bt(o) && !Tt(o) ? n : o || Pn(t) || n;
1115
+ let o = Gt(t, e);
1116
+ for (; o && dn(o) && bt(o); )
1117
+ o = Gt(o, e);
1118
+ return o && Q(o) && bt(o) && !Tt(o) ? n : o || pn(t) || n;
1141
1119
  }
1142
- const Bn = async function(t) {
1143
- const e = this.getOffsetParent || de, n = this.getDimensions, o = await n(t.floating);
1120
+ const Rn = async function(t) {
1121
+ const e = this.getOffsetParent || ae, n = this.getDimensions, o = await n(t.floating);
1144
1122
  return {
1145
- reference: Wn(t.reference, await e(t.floating), t.strategy),
1123
+ reference: Pn(t.reference, await e(t.floating), t.strategy),
1146
1124
  floating: {
1147
1125
  x: 0,
1148
1126
  y: 0,
@@ -1151,56 +1129,56 @@ const Bn = async function(t) {
1151
1129
  }
1152
1130
  };
1153
1131
  };
1154
- function _n(t) {
1132
+ function Cn(t) {
1155
1133
  return I(t).direction === "rtl";
1156
1134
  }
1157
- const Hn = {
1158
- convertOffsetParentRelativeRectToViewportRelativeRect: Sn,
1159
- getDocumentElement: X,
1160
- getClippingRect: kn,
1161
- getOffsetParent: de,
1162
- getElementRects: Bn,
1163
- getClientRects: Dn,
1164
- getDimensions: $n,
1135
+ const On = {
1136
+ convertOffsetParentRelativeRectToViewportRelativeRect: gn,
1137
+ getDocumentElement: j,
1138
+ getClippingRect: An,
1139
+ getOffsetParent: ae,
1140
+ getElementRects: Rn,
1141
+ getClientRects: wn,
1142
+ getDimensions: En,
1165
1143
  getScale: J,
1166
- isElement: H,
1167
- isRTL: _n
1144
+ isElement: _,
1145
+ isRTL: Cn
1168
1146
  };
1169
- function pe(t, e) {
1147
+ function fe(t, e) {
1170
1148
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1171
1149
  }
1172
- function In(t, e) {
1150
+ function Sn(t, e) {
1173
1151
  let n = null, o;
1174
- const r = X(t);
1152
+ const r = j(t);
1175
1153
  function i() {
1176
1154
  var c;
1177
1155
  clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
1178
1156
  }
1179
1157
  function s(c, f) {
1180
1158
  c === void 0 && (c = !1), f === void 0 && (f = 1), i();
1181
- const a = t.getBoundingClientRect(), {
1182
- left: l,
1159
+ const l = t.getBoundingClientRect(), {
1160
+ left: a,
1183
1161
  top: u,
1184
1162
  width: p,
1185
1163
  height: d
1186
- } = a;
1164
+ } = l;
1187
1165
  if (c || e(), !p || !d)
1188
1166
  return;
1189
- const h = lt(u), m = lt(r.clientWidth - (l + p)), y = lt(r.clientHeight - (u + d)), g = lt(l), E = {
1190
- rootMargin: -h + "px " + -m + "px " + -y + "px " + -g + "px",
1191
- threshold: W(0, K(1, f)) || 1
1167
+ const h = at(u), m = at(r.clientWidth - (a + p)), w = at(r.clientHeight - (u + d)), g = at(a), E = {
1168
+ rootMargin: -h + "px " + -m + "px " + -w + "px " + -g + "px",
1169
+ threshold: $(0, q(1, f)) || 1
1192
1170
  };
1193
1171
  let b = !0;
1194
- function A(R) {
1195
- const v = R[0].intersectionRatio;
1196
- if (v !== f) {
1172
+ function A(P) {
1173
+ const x = P[0].intersectionRatio;
1174
+ if (x !== f) {
1197
1175
  if (!b)
1198
1176
  return s();
1199
- v ? s(!1, v) : o = setTimeout(() => {
1177
+ x ? s(!1, x) : o = setTimeout(() => {
1200
1178
  s(!1, 1e-7);
1201
1179
  }, 1e3);
1202
1180
  }
1203
- v === 1 && !pe(a, t.getBoundingClientRect()) && s(), b = !1;
1181
+ x === 1 && !fe(l, t.getBoundingClientRect()) && s(), b = !1;
1204
1182
  }
1205
1183
  try {
1206
1184
  n = new IntersectionObserver(A, {
@@ -1215,7 +1193,7 @@ function In(t, e) {
1215
1193
  }
1216
1194
  return s(!0), i;
1217
1195
  }
1218
- function Vn(t, e, n, o) {
1196
+ function Dn(t, e, n, o) {
1219
1197
  o === void 0 && (o = {});
1220
1198
  const {
1221
1199
  ancestorScroll: r = !0,
@@ -1223,49 +1201,48 @@ function Vn(t, e, n, o) {
1223
1201
  elementResize: s = typeof ResizeObserver == "function",
1224
1202
  layoutShift: c = typeof IntersectionObserver == "function",
1225
1203
  animationFrame: f = !1
1226
- } = o, a = Ft(t), l = r || i ? [...a ? rt(a) : [], ...rt(e)] : [];
1227
- l.forEach((g) => {
1204
+ } = o, l = kt(t), a = r || i ? [...l ? rt(l) : [], ...rt(e)] : [];
1205
+ a.forEach((g) => {
1228
1206
  r && g.addEventListener("scroll", n, {
1229
1207
  passive: !0
1230
1208
  }), i && g.addEventListener("resize", n);
1231
1209
  });
1232
- const u = a && c ? In(a, n) : null;
1210
+ const u = l && c ? Sn(l, n) : null;
1233
1211
  let p = -1, d = null;
1234
1212
  s && (d = new ResizeObserver((g) => {
1235
- let [x] = g;
1236
- x && x.target === a && d && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1213
+ let [v] = g;
1214
+ v && v.target === l && d && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1237
1215
  var E;
1238
1216
  (E = d) == null || E.observe(e);
1239
1217
  })), n();
1240
- }), a && !f && d.observe(a), d.observe(e));
1218
+ }), l && !f && d.observe(l), d.observe(e));
1241
1219
  let h, m = f ? G(t) : null;
1242
- f && y();
1243
- function y() {
1220
+ f && w();
1221
+ function w() {
1244
1222
  const g = G(t);
1245
- m && !pe(m, g) && n(), m = g, h = requestAnimationFrame(y);
1223
+ m && !fe(m, g) && n(), m = g, h = requestAnimationFrame(w);
1246
1224
  }
1247
1225
  return n(), () => {
1248
1226
  var g;
1249
- l.forEach((x) => {
1250
- r && x.removeEventListener("scroll", n), i && x.removeEventListener("resize", n);
1227
+ a.forEach((v) => {
1228
+ r && v.removeEventListener("scroll", n), i && v.removeEventListener("resize", n);
1251
1229
  }), u == null || u(), (g = d) == null || g.disconnect(), d = null, f && cancelAnimationFrame(h);
1252
1230
  };
1253
1231
  }
1254
- const zn = pn, Yn = hn, jn = fn, Xn = gn, Un = un, te = ln, qn = mn, Kn = (t, e, n) => {
1232
+ const Ln = ln, Tn = an, Mn = rn, kn = un, Fn = sn, Jt = on, Nn = fn, $n = (t, e, n) => {
1255
1233
  const o = /* @__PURE__ */ new Map(), r = {
1256
- platform: Hn,
1234
+ platform: On,
1257
1235
  ...n
1258
1236
  }, i = {
1259
1237
  ...r.platform,
1260
1238
  _c: o
1261
1239
  };
1262
- return an(t, e, {
1240
+ return nn(t, e, {
1263
1241
  ...r,
1264
1242
  platform: i
1265
1243
  });
1266
1244
  };
1267
- var Zn = typeof document < "u", Gn = function() {
1268
- }, ft = Zn ? Ne : Gn;
1245
+ var ft = typeof document < "u" ? Te : Me;
1269
1246
  function ht(t, e) {
1270
1247
  if (t === e)
1271
1248
  return !0;
@@ -1297,20 +1274,20 @@ function ht(t, e) {
1297
1274
  }
1298
1275
  return t !== t && e !== e;
1299
1276
  }
1300
- function he(t) {
1277
+ function ue(t) {
1301
1278
  return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
1302
1279
  }
1303
- function ee(t, e) {
1304
- const n = he(t);
1280
+ function Qt(t, e) {
1281
+ const n = ue(t);
1305
1282
  return Math.round(e * n) / n;
1306
1283
  }
1307
1284
  function At(t) {
1308
- const e = w.useRef(t);
1285
+ const e = y.useRef(t);
1309
1286
  return ft(() => {
1310
1287
  e.current = t;
1311
1288
  }), e;
1312
1289
  }
1313
- function Jn(t) {
1290
+ function Wn(t) {
1314
1291
  t === void 0 && (t = {});
1315
1292
  const {
1316
1293
  placement: e = "bottom",
@@ -1323,96 +1300,96 @@ function Jn(t) {
1323
1300
  } = {},
1324
1301
  transform: c = !0,
1325
1302
  whileElementsMounted: f,
1326
- open: a
1327
- } = t, [l, u] = w.useState({
1303
+ open: l
1304
+ } = t, [a, u] = y.useState({
1328
1305
  x: 0,
1329
1306
  y: 0,
1330
1307
  strategy: n,
1331
1308
  placement: e,
1332
1309
  middlewareData: {},
1333
1310
  isPositioned: !1
1334
- }), [p, d] = w.useState(o);
1311
+ }), [p, d] = y.useState(o);
1335
1312
  ht(p, o) || d(o);
1336
- const [h, m] = w.useState(null), [y, g] = w.useState(null), x = w.useCallback((P) => {
1337
- P !== R.current && (R.current = P, m(P));
1338
- }, []), E = w.useCallback((P) => {
1339
- P !== v.current && (v.current = P, g(P));
1340
- }, []), b = i || h, A = s || y, R = w.useRef(null), v = w.useRef(null), C = w.useRef(l), M = f != null, O = At(f), N = At(r), k = At(a), D = w.useCallback(() => {
1341
- if (!R.current || !v.current)
1313
+ const [h, m] = y.useState(null), [w, g] = y.useState(null), v = y.useCallback((R) => {
1314
+ R !== P.current && (P.current = R, m(R));
1315
+ }, []), E = y.useCallback((R) => {
1316
+ R !== x.current && (x.current = R, g(R));
1317
+ }, []), b = i || h, A = s || w, P = y.useRef(null), x = y.useRef(null), C = y.useRef(a), M = f != null, O = At(f), F = At(r), N = At(l), D = y.useCallback(() => {
1318
+ if (!P.current || !x.current)
1342
1319
  return;
1343
- const P = {
1320
+ const R = {
1344
1321
  placement: e,
1345
1322
  strategy: n,
1346
1323
  middleware: p
1347
1324
  };
1348
- N.current && (P.platform = N.current), Kn(R.current, v.current, P).then((F) => {
1349
- const V = {
1350
- ...F,
1325
+ F.current && (R.platform = F.current), $n(P.current, x.current, R).then((k) => {
1326
+ const z = {
1327
+ ...k,
1351
1328
  // The floating element's position may be recomputed while it's closed
1352
1329
  // but still mounted (such as when transitioning out). To ensure
1353
1330
  // `isPositioned` will be `false` initially on the next open, avoid
1354
1331
  // setting it to `true` when `open === false` (must be specified).
1355
- isPositioned: k.current !== !1
1332
+ isPositioned: N.current !== !1
1356
1333
  };
1357
- S.current && !ht(C.current, V) && (C.current = V, Be.flushSync(() => {
1358
- u(V);
1334
+ S.current && !ht(C.current, z) && (C.current = z, $e.flushSync(() => {
1335
+ u(z);
1359
1336
  }));
1360
1337
  });
1361
- }, [p, e, n, N, k]);
1338
+ }, [p, e, n, F, N]);
1362
1339
  ft(() => {
1363
- a === !1 && C.current.isPositioned && (C.current.isPositioned = !1, u((P) => ({
1364
- ...P,
1340
+ l === !1 && C.current.isPositioned && (C.current.isPositioned = !1, u((R) => ({
1341
+ ...R,
1365
1342
  isPositioned: !1
1366
1343
  })));
1367
- }, [a]);
1368
- const S = w.useRef(!1);
1344
+ }, [l]);
1345
+ const S = y.useRef(!1);
1369
1346
  ft(() => (S.current = !0, () => {
1370
1347
  S.current = !1;
1371
1348
  }), []), ft(() => {
1372
- if (b && (R.current = b), A && (v.current = A), b && A) {
1349
+ if (b && (P.current = b), A && (x.current = A), b && A) {
1373
1350
  if (O.current)
1374
1351
  return O.current(b, A, D);
1375
1352
  D();
1376
1353
  }
1377
1354
  }, [b, A, D, O, M]);
1378
- const $ = w.useMemo(() => ({
1379
- reference: R,
1380
- floating: v,
1381
- setReference: x,
1355
+ const B = y.useMemo(() => ({
1356
+ reference: P,
1357
+ floating: x,
1358
+ setReference: v,
1382
1359
  setFloating: E
1383
- }), [x, E]), L = w.useMemo(() => ({
1360
+ }), [v, E]), L = y.useMemo(() => ({
1384
1361
  reference: b,
1385
1362
  floating: A
1386
- }), [b, A]), T = w.useMemo(() => {
1387
- const P = {
1363
+ }), [b, A]), T = y.useMemo(() => {
1364
+ const R = {
1388
1365
  position: n,
1389
1366
  left: 0,
1390
1367
  top: 0
1391
1368
  };
1392
1369
  if (!L.floating)
1393
- return P;
1394
- const F = ee(L.floating, l.x), V = ee(L.floating, l.y);
1370
+ return R;
1371
+ const k = Qt(L.floating, a.x), z = Qt(L.floating, a.y);
1395
1372
  return c ? {
1396
- ...P,
1397
- transform: "translate(" + F + "px, " + V + "px)",
1398
- ...he(L.floating) >= 1.5 && {
1373
+ ...R,
1374
+ transform: "translate(" + k + "px, " + z + "px)",
1375
+ ...ue(L.floating) >= 1.5 && {
1399
1376
  willChange: "transform"
1400
1377
  }
1401
1378
  } : {
1402
1379
  position: n,
1403
- left: F,
1404
- top: V
1380
+ left: k,
1381
+ top: z
1405
1382
  };
1406
- }, [n, c, L.floating, l.x, l.y]);
1407
- return w.useMemo(() => ({
1408
- ...l,
1383
+ }, [n, c, L.floating, a.x, a.y]);
1384
+ return y.useMemo(() => ({
1385
+ ...a,
1409
1386
  update: D,
1410
- refs: $,
1387
+ refs: B,
1411
1388
  elements: L,
1412
1389
  floatingStyles: T
1413
- }), [l, D, $, L, T]);
1390
+ }), [a, D, B, L, T]);
1414
1391
  }
1415
- const Qn = (t) => {
1392
+ const Bn = (t) => {
1416
1393
  function e(n) {
1417
1394
  return {}.hasOwnProperty.call(n, "current");
1418
1395
  }
@@ -1424,40 +1401,40 @@ const Qn = (t) => {
1424
1401
  element: o,
1425
1402
  padding: r
1426
1403
  } = typeof t == "function" ? t(n) : t;
1427
- return o && e(o) ? o.current != null ? te({
1404
+ return o && e(o) ? o.current != null ? Jt({
1428
1405
  element: o.current,
1429
1406
  padding: r
1430
- }).fn(n) : {} : o ? te({
1407
+ }).fn(n) : {} : o ? Jt({
1431
1408
  element: o,
1432
1409
  padding: r
1433
1410
  }).fn(n) : {};
1434
1411
  }
1435
1412
  };
1436
- }, to = (t, e) => ({
1437
- ...zn(t),
1413
+ }, Hn = (t, e) => ({
1414
+ ...Ln(t),
1438
1415
  options: [t, e]
1439
- }), eo = (t, e) => ({
1440
- ...Yn(t),
1416
+ }), _n = (t, e) => ({
1417
+ ...Tn(t),
1441
1418
  options: [t, e]
1442
- }), no = (t, e) => ({
1443
- ...qn(t),
1419
+ }), In = (t, e) => ({
1420
+ ...Nn(t),
1444
1421
  options: [t, e]
1445
- }), oo = (t, e) => ({
1446
- ...jn(t),
1422
+ }), zn = (t, e) => ({
1423
+ ...Mn(t),
1447
1424
  options: [t, e]
1448
- }), ro = (t, e) => ({
1449
- ...Xn(t),
1425
+ }), Vn = (t, e) => ({
1426
+ ...kn(t),
1450
1427
  options: [t, e]
1451
- }), io = (t, e) => ({
1452
- ...Un(t),
1428
+ }), Yn = (t, e) => ({
1429
+ ...Fn(t),
1453
1430
  options: [t, e]
1454
- }), so = (t, e) => ({
1455
- ...Qn(t),
1431
+ }), jn = (t, e) => ({
1432
+ ...Bn(t),
1456
1433
  options: [t, e]
1457
1434
  });
1458
- var co = "Arrow", me = w.forwardRef((t, e) => {
1435
+ var Xn = "Arrow", de = y.forwardRef((t, e) => {
1459
1436
  const { children: n, width: o = 10, height: r = 5, ...i } = t;
1460
- return /* @__PURE__ */ _(
1437
+ return /* @__PURE__ */ H(
1461
1438
  it.svg,
1462
1439
  {
1463
1440
  ...i,
@@ -1466,28 +1443,28 @@ var co = "Arrow", me = w.forwardRef((t, e) => {
1466
1443
  height: r,
1467
1444
  viewBox: "0 0 30 10",
1468
1445
  preserveAspectRatio: "none",
1469
- children: t.asChild ? n : /* @__PURE__ */ _("polygon", { points: "0,0 30,0 15,10" })
1446
+ children: t.asChild ? n : /* @__PURE__ */ H("polygon", { points: "0,0 30,0 15,10" })
1470
1447
  }
1471
1448
  );
1472
1449
  });
1473
- me.displayName = co;
1474
- var ao = me, kt = "Popper", [ge, vo] = $e(kt), [lo, we] = ge(kt), ye = (t) => {
1475
- const { __scopePopper: e, children: n } = t, [o, r] = w.useState(null);
1476
- return /* @__PURE__ */ _(lo, { scope: e, anchor: o, onAnchorChange: r, children: n });
1450
+ de.displayName = Xn;
1451
+ var Un = de, Nt = "Popper", [pe, ro] = Fe(Nt), [qn, he] = pe(Nt), me = (t) => {
1452
+ const { __scopePopper: e, children: n } = t, [o, r] = y.useState(null);
1453
+ return /* @__PURE__ */ H(qn, { scope: e, anchor: o, onAnchorChange: r, children: n });
1477
1454
  };
1478
- ye.displayName = kt;
1479
- var xe = "PopperAnchor", ve = w.forwardRef(
1455
+ me.displayName = Nt;
1456
+ var ge = "PopperAnchor", we = y.forwardRef(
1480
1457
  (t, e) => {
1481
- const { __scopePopper: n, virtualRef: o, ...r } = t, i = we(xe, n), s = w.useRef(null), c = mt(e, s);
1482
- return w.useEffect(() => {
1458
+ const { __scopePopper: n, virtualRef: o, ...r } = t, i = he(ge, n), s = y.useRef(null), c = gt(e, s);
1459
+ return y.useEffect(() => {
1483
1460
  i.onAnchorChange((o == null ? void 0 : o.current) || s.current);
1484
- }), o ? null : /* @__PURE__ */ _(it.div, { ...r, ref: c });
1461
+ }), o ? null : /* @__PURE__ */ H(it.div, { ...r, ref: c });
1485
1462
  }
1486
1463
  );
1487
- ve.displayName = xe;
1488
- var $t = "PopperContent", [fo, uo] = ge($t), be = w.forwardRef(
1464
+ we.displayName = ge;
1465
+ var $t = "PopperContent", [Kn, Zn] = pe($t), ye = y.forwardRef(
1489
1466
  (t, e) => {
1490
- var Wt, Bt, _t, Ht, It, Vt;
1467
+ var Wt, Bt, Ht, _t, It, zt;
1491
1468
  const {
1492
1469
  __scopePopper: n,
1493
1470
  side: o = "bottom",
@@ -1496,93 +1473,93 @@ var $t = "PopperContent", [fo, uo] = ge($t), be = w.forwardRef(
1496
1473
  alignOffset: s = 0,
1497
1474
  arrowPadding: c = 0,
1498
1475
  avoidCollisions: f = !0,
1499
- collisionBoundary: a = [],
1500
- collisionPadding: l = 0,
1476
+ collisionBoundary: l = [],
1477
+ collisionPadding: a = 0,
1501
1478
  sticky: u = "partial",
1502
1479
  hideWhenDetached: p = !1,
1503
1480
  updatePositionStrategy: d = "optimized",
1504
1481
  onPlaced: h,
1505
1482
  ...m
1506
- } = t, y = we($t, n), [g, x] = w.useState(null), E = mt(e, (nt) => x(nt)), [b, A] = w.useState(null), R = We(b), v = (R == null ? void 0 : R.width) ?? 0, C = (R == null ? void 0 : R.height) ?? 0, M = o + (i !== "center" ? "-" + i : ""), O = typeof l == "number" ? l : { top: 0, right: 0, bottom: 0, left: 0, ...l }, N = Array.isArray(a) ? a : [a], k = N.length > 0, D = {
1483
+ } = t, w = he($t, n), [g, v] = y.useState(null), E = gt(e, (nt) => v(nt)), [b, A] = y.useState(null), P = Ne(b), x = (P == null ? void 0 : P.width) ?? 0, C = (P == null ? void 0 : P.height) ?? 0, M = o + (i !== "center" ? "-" + i : ""), O = typeof a == "number" ? a : { top: 0, right: 0, bottom: 0, left: 0, ...a }, F = Array.isArray(l) ? l : [l], N = F.length > 0, D = {
1507
1484
  padding: O,
1508
- boundary: N.filter(ho),
1485
+ boundary: F.filter(Jn),
1509
1486
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
1510
- altBoundary: k
1511
- }, { refs: S, floatingStyles: $, placement: L, isPositioned: T, middlewareData: P } = Jn({
1487
+ altBoundary: N
1488
+ }, { refs: S, floatingStyles: B, placement: L, isPositioned: T, middlewareData: R } = Wn({
1512
1489
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
1513
1490
  strategy: "fixed",
1514
1491
  placement: M,
1515
- whileElementsMounted: (...nt) => Vn(...nt, {
1492
+ whileElementsMounted: (...nt) => Dn(...nt, {
1516
1493
  animationFrame: d === "always"
1517
1494
  }),
1518
1495
  elements: {
1519
- reference: y.anchor
1496
+ reference: w.anchor
1520
1497
  },
1521
1498
  middleware: [
1522
- to({ mainAxis: r + C, alignmentAxis: s }),
1523
- f && eo({
1499
+ Hn({ mainAxis: r + C, alignmentAxis: s }),
1500
+ f && _n({
1524
1501
  mainAxis: !0,
1525
1502
  crossAxis: !1,
1526
- limiter: u === "partial" ? no() : void 0,
1503
+ limiter: u === "partial" ? In() : void 0,
1527
1504
  ...D
1528
1505
  }),
1529
- f && oo({ ...D }),
1530
- ro({
1506
+ f && zn({ ...D }),
1507
+ Vn({
1531
1508
  ...D,
1532
- apply: ({ elements: nt, rects: zt, availableWidth: Le, availableHeight: Te }) => {
1533
- const { width: Me, height: Fe } = zt.reference, at = nt.floating.style;
1534
- at.setProperty("--radix-popper-available-width", `${Le}px`), at.setProperty("--radix-popper-available-height", `${Te}px`), at.setProperty("--radix-popper-anchor-width", `${Me}px`), at.setProperty("--radix-popper-anchor-height", `${Fe}px`);
1509
+ apply: ({ elements: nt, rects: Vt, availableWidth: Oe, availableHeight: Se }) => {
1510
+ const { width: De, height: Le } = Vt.reference, lt = nt.floating.style;
1511
+ lt.setProperty("--radix-popper-available-width", `${Oe}px`), lt.setProperty("--radix-popper-available-height", `${Se}px`), lt.setProperty("--radix-popper-anchor-width", `${De}px`), lt.setProperty("--radix-popper-anchor-height", `${Le}px`);
1535
1512
  }
1536
1513
  }),
1537
- b && so({ element: b, padding: c }),
1538
- mo({ arrowWidth: v, arrowHeight: C }),
1539
- p && io({ strategy: "referenceHidden", ...D })
1514
+ b && jn({ element: b, padding: c }),
1515
+ Qn({ arrowWidth: x, arrowHeight: C }),
1516
+ p && Yn({ strategy: "referenceHidden", ...D })
1540
1517
  ]
1541
- }), [F, V] = Pe(L), ct = gt(h);
1518
+ }), [k, z] = be(L), ct = mt(h);
1542
1519
  Et(() => {
1543
1520
  T && (ct == null || ct());
1544
1521
  }, [T, ct]);
1545
- const Re = (Wt = P.arrow) == null ? void 0 : Wt.x, Ce = (Bt = P.arrow) == null ? void 0 : Bt.y, Oe = ((_t = P.arrow) == null ? void 0 : _t.centerOffset) !== 0, [Se, De] = w.useState();
1522
+ const Ae = (Wt = R.arrow) == null ? void 0 : Wt.x, Ee = (Bt = R.arrow) == null ? void 0 : Bt.y, Pe = ((Ht = R.arrow) == null ? void 0 : Ht.centerOffset) !== 0, [Re, Ce] = y.useState();
1546
1523
  return Et(() => {
1547
- g && De(window.getComputedStyle(g).zIndex);
1548
- }, [g]), /* @__PURE__ */ _(
1524
+ g && Ce(window.getComputedStyle(g).zIndex);
1525
+ }, [g]), /* @__PURE__ */ H(
1549
1526
  "div",
1550
1527
  {
1551
1528
  ref: S.setFloating,
1552
1529
  "data-radix-popper-content-wrapper": "",
1553
1530
  style: {
1554
- ...$,
1555
- transform: T ? $.transform : "translate(0, -200%)",
1531
+ ...B,
1532
+ transform: T ? B.transform : "translate(0, -200%)",
1556
1533
  // keep off the page when measuring
1557
1534
  minWidth: "max-content",
1558
- zIndex: Se,
1535
+ zIndex: Re,
1559
1536
  "--radix-popper-transform-origin": [
1560
- (Ht = P.transformOrigin) == null ? void 0 : Ht.x,
1561
- (It = P.transformOrigin) == null ? void 0 : It.y
1537
+ (_t = R.transformOrigin) == null ? void 0 : _t.x,
1538
+ (It = R.transformOrigin) == null ? void 0 : It.y
1562
1539
  ].join(" "),
1563
1540
  // hide the content if using the hide middleware and should be hidden
1564
1541
  // set visibility to hidden and disable pointer events so the UI behaves
1565
1542
  // as if the PopperContent isn't there at all
1566
- ...((Vt = P.hide) == null ? void 0 : Vt.referenceHidden) && {
1543
+ ...((zt = R.hide) == null ? void 0 : zt.referenceHidden) && {
1567
1544
  visibility: "hidden",
1568
1545
  pointerEvents: "none"
1569
1546
  }
1570
1547
  },
1571
1548
  dir: t.dir,
1572
- children: /* @__PURE__ */ _(
1573
- fo,
1549
+ children: /* @__PURE__ */ H(
1550
+ Kn,
1574
1551
  {
1575
1552
  scope: n,
1576
- placedSide: F,
1553
+ placedSide: k,
1577
1554
  onArrowChange: A,
1578
- arrowX: Re,
1579
- arrowY: Ce,
1580
- shouldHideArrow: Oe,
1581
- children: /* @__PURE__ */ _(
1555
+ arrowX: Ae,
1556
+ arrowY: Ee,
1557
+ shouldHideArrow: Pe,
1558
+ children: /* @__PURE__ */ H(
1582
1559
  it.div,
1583
1560
  {
1584
- "data-side": F,
1585
- "data-align": V,
1561
+ "data-side": k,
1562
+ "data-align": z,
1586
1563
  ...m,
1587
1564
  ref: E,
1588
1565
  style: {
@@ -1599,19 +1576,19 @@ var $t = "PopperContent", [fo, uo] = ge($t), be = w.forwardRef(
1599
1576
  );
1600
1577
  }
1601
1578
  );
1602
- be.displayName = $t;
1603
- var Ae = "PopperArrow", po = {
1579
+ ye.displayName = $t;
1580
+ var xe = "PopperArrow", Gn = {
1604
1581
  top: "bottom",
1605
1582
  right: "left",
1606
1583
  bottom: "top",
1607
1584
  left: "right"
1608
- }, Ee = w.forwardRef(function(e, n) {
1609
- const { __scopePopper: o, ...r } = e, i = uo(Ae, o), s = po[i.placedSide];
1585
+ }, ve = y.forwardRef(function(e, n) {
1586
+ const { __scopePopper: o, ...r } = e, i = Zn(xe, o), s = Gn[i.placedSide];
1610
1587
  return (
1611
1588
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
1612
1589
  // doesn't report size as we'd expect on SVG elements.
1613
1590
  // it reports their bounding box which is effectively the largest path inside the SVG.
1614
- /* @__PURE__ */ _(
1591
+ /* @__PURE__ */ H(
1615
1592
  "span",
1616
1593
  {
1617
1594
  ref: i.onArrowChange,
@@ -1634,8 +1611,8 @@ var Ae = "PopperArrow", po = {
1634
1611
  }[i.placedSide],
1635
1612
  visibility: i.shouldHideArrow ? "hidden" : void 0
1636
1613
  },
1637
- children: /* @__PURE__ */ _(
1638
- ao,
1614
+ children: /* @__PURE__ */ H(
1615
+ Un,
1639
1616
  {
1640
1617
  ...r,
1641
1618
  ref: n,
@@ -1650,32 +1627,31 @@ var Ae = "PopperArrow", po = {
1650
1627
  )
1651
1628
  );
1652
1629
  });
1653
- Ee.displayName = Ae;
1654
- function ho(t) {
1630
+ ve.displayName = xe;
1631
+ function Jn(t) {
1655
1632
  return t !== null;
1656
1633
  }
1657
- var mo = (t) => ({
1634
+ var Qn = (t) => ({
1658
1635
  name: "transformOrigin",
1659
1636
  options: t,
1660
1637
  fn(e) {
1661
- var y, g, x;
1662
- const { placement: n, rects: o, middlewareData: r } = e, s = ((y = r.arrow) == null ? void 0 : y.centerOffset) !== 0, c = s ? 0 : t.arrowWidth, f = s ? 0 : t.arrowHeight, [a, l] = Pe(n), u = { start: "0%", center: "50%", end: "100%" }[l], p = (((g = r.arrow) == null ? void 0 : g.x) ?? 0) + c / 2, d = (((x = r.arrow) == null ? void 0 : x.y) ?? 0) + f / 2;
1638
+ var w, g, v;
1639
+ const { placement: n, rects: o, middlewareData: r } = e, s = ((w = r.arrow) == null ? void 0 : w.centerOffset) !== 0, c = s ? 0 : t.arrowWidth, f = s ? 0 : t.arrowHeight, [l, a] = be(n), u = { start: "0%", center: "50%", end: "100%" }[a], p = (((g = r.arrow) == null ? void 0 : g.x) ?? 0) + c / 2, d = (((v = r.arrow) == null ? void 0 : v.y) ?? 0) + f / 2;
1663
1640
  let h = "", m = "";
1664
- return a === "bottom" ? (h = s ? u : `${p}px`, m = `${-f}px`) : a === "top" ? (h = s ? u : `${p}px`, m = `${o.floating.height + f}px`) : a === "right" ? (h = `${-f}px`, m = s ? u : `${d}px`) : a === "left" && (h = `${o.floating.width + f}px`, m = s ? u : `${d}px`), { data: { x: h, y: m } };
1641
+ return l === "bottom" ? (h = s ? u : `${p}px`, m = `${-f}px`) : l === "top" ? (h = s ? u : `${p}px`, m = `${o.floating.height + f}px`) : l === "right" ? (h = `${-f}px`, m = s ? u : `${d}px`) : l === "left" && (h = `${o.floating.width + f}px`, m = s ? u : `${d}px`), { data: { x: h, y: m } };
1665
1642
  }
1666
1643
  });
1667
- function Pe(t) {
1644
+ function be(t) {
1668
1645
  const [e, n = "center"] = t.split("-");
1669
1646
  return [e, n];
1670
1647
  }
1671
- var bo = ye, Ao = ve, Eo = be, Po = Ee;
1648
+ var io = me, so = we, co = ye, lo = ve;
1672
1649
  export {
1673
- Ao as A,
1674
- Eo as C,
1675
- ze as D,
1676
- bo as R,
1677
- Po as a,
1678
- gt as b,
1679
- vo as c,
1680
- xo as u
1650
+ so as A,
1651
+ co as C,
1652
+ Ie as D,
1653
+ io as R,
1654
+ lo as a,
1655
+ ro as c,
1656
+ oo as u
1681
1657
  };