@purpurds/tooltip 5.31.0 → 5.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,22 @@
1
- import { jsxs as Ye, jsx as z } from "react/jsx-runtime";
1
+ import { jsxs as Ge, jsx as z } from "react/jsx-runtime";
2
2
  import * as L from "react";
3
- import { forwardRef as I, useCallback as j, createContext as Ge, useMemo as we, createElement as w, useContext as Et, Fragment as wn, Children as ie, isValidElement as Me, cloneElement as tt, useEffect as S, useRef as k, useState as U, useLayoutEffect as Tt, useReducer as _n } from "react";
4
- import * as Pn from "react-dom";
5
- import An, { flushSync as St } from "react-dom";
6
- const On = {
3
+ import { forwardRef as I, useCallback as j, createContext as Ke, useMemo as _e, createElement as _, useContext as Rt, Fragment as An, Children as se, isValidElement as ke, cloneElement as rt, useEffect as S, useRef as k, useState as q, useLayoutEffect as St, useReducer as On } from "react";
4
+ import * as Cn from "react-dom";
5
+ import En, { flushSync as Dt } from "react-dom";
6
+ const Tn = {
7
7
  PRIMARY: "primary",
8
8
  SECONDARY: "secondary",
9
9
  EXPRESSIVE: "expressive"
10
- }, Cn = {
10
+ }, Rn = {
11
+ XS: "xs",
11
12
  SM: "sm",
12
13
  MD: "md",
13
14
  LG: "lg"
14
15
  };
15
- function En(e) {
16
+ function Sn(e) {
16
17
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
17
18
  }
18
- var Rt = { exports: {} };
19
+ var Nt = { exports: {} };
19
20
  /*!
20
21
  Copyright (c) 2018 Jed Watson.
21
22
  Licensed under the MIT License (MIT), see
@@ -50,44 +51,44 @@ var Rt = { exports: {} };
50
51
  }
51
52
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
52
53
  })();
53
- })(Rt);
54
- var Tn = Rt.exports;
55
- const ht = /* @__PURE__ */ En(Tn), Sn = "_rotate_1xozj_1", Rn = "_dash_1xozj_1", ye = {
54
+ })(Nt);
55
+ var Dn = Nt.exports;
56
+ const yt = /* @__PURE__ */ Sn(Dn), Nn = "_rotate_1xozj_1", Ln = "_dash_1xozj_1", xe = {
56
57
  "purpur-spinner": "_purpur-spinner_1xozj_1",
57
- rotate: Sn,
58
+ rotate: Nn,
58
59
  "purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
59
60
  "purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
60
61
  "purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
61
62
  "purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
62
63
  "purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
63
64
  "purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
64
- dash: Rn,
65
+ dash: Ln,
65
66
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
66
67
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
67
- }, xe = "purpur-spinner", Dn = {
68
+ }, we = "purpur-spinner", Mn = {
68
69
  XXS: "xxs",
69
70
  XS: "xs",
70
71
  SM: "sm",
71
72
  MD: "md",
72
73
  LG: "lg"
73
- }, Nn = ({
74
+ }, kn = ({
74
75
  ["data-testid"]: e,
75
76
  disabled: t = !1,
76
77
  negative: n = !1,
77
- size: o = Dn.SM,
78
+ size: o = Mn.SM,
78
79
  ...i
79
80
  }) => /* @__PURE__ */ z(
80
81
  "div",
81
82
  {
82
- className: ht([ye[xe], ye[`${xe}--${o}`]]),
83
+ className: yt([xe[we], xe[`${we}--${o}`]]),
83
84
  "data-testid": e,
84
85
  ...i,
85
86
  children: /* @__PURE__ */ z("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ z(
86
87
  "circle",
87
88
  {
88
- className: ht(ye[`${xe}__circle`], {
89
- [ye[`${xe}__circle--disabled`]]: t,
90
- [ye[`${xe}__circle--negative`]]: n
89
+ className: yt(xe[`${we}__circle`], {
90
+ [xe[`${we}__circle--disabled`]]: t,
91
+ [xe[`${we}__circle--negative`]]: n
91
92
  }),
92
93
  cx: "25",
93
94
  cy: "25",
@@ -96,10 +97,10 @@ const ht = /* @__PURE__ */ En(Tn), Sn = "_rotate_1xozj_1", Rn = "_dash_1xozj_1",
96
97
  ) })
97
98
  }
98
99
  );
99
- function Ln(e) {
100
+ function In(e) {
100
101
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
101
102
  }
102
- var Dt = { exports: {} };
103
+ var Lt = { exports: {} };
103
104
  /*!
104
105
  Copyright (c) 2018 Jed Watson.
105
106
  Licensed under the MIT License (MIT), see
@@ -134,35 +135,36 @@ var Dt = { exports: {} };
134
135
  }
135
136
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
136
137
  })();
137
- })(Dt);
138
- var Mn = Dt.exports;
139
- const kn = /* @__PURE__ */ Ln(Mn), In = {
140
- "purpur-button": "_purpur-button_1acxn_1",
141
- "purpur-button--sm": "_purpur-button--sm_1acxn_33",
142
- "purpur-button--icon-only": "_purpur-button--icon-only_1acxn_36",
143
- "purpur-button--md": "_purpur-button--md_1acxn_39",
144
- "purpur-button--lg": "_purpur-button--lg_1acxn_45",
145
- "purpur-button--full-width": "_purpur-button--full-width_1acxn_51",
146
- "purpur-button--primary": "_purpur-button--primary_1acxn_54",
147
- "purpur-button--disabled": "_purpur-button--disabled_1acxn_58",
148
- "purpur-button--primary-negative": "_purpur-button--primary-negative_1acxn_64",
149
- "purpur-button--secondary": "_purpur-button--secondary_1acxn_76",
150
- "purpur-button--secondary-negative": "_purpur-button--secondary-negative_1acxn_87",
151
- "purpur-button--expressive": "_purpur-button--expressive_1acxn_98",
152
- "purpur-button--expressive-negative": "_purpur-button--expressive-negative_1acxn_108",
153
- "purpur-button--negative": "_purpur-button--negative_1acxn_120",
154
- "purpur-button--destructive": "_purpur-button--destructive_1acxn_127",
155
- "purpur-button--destructive-negative": "_purpur-button--destructive-negative_1acxn_137",
156
- "purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_1acxn_147",
157
- "purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1acxn_160",
158
- "purpur-button--text-negative": "_purpur-button--text-negative_1acxn_175",
159
- "purpur-button--text": "_purpur-button--text_1acxn_175"
160
- }, Fn = {
161
- ...On,
138
+ })(Lt);
139
+ var Fn = Lt.exports;
140
+ const Hn = /* @__PURE__ */ In(Fn), Bn = {
141
+ "purpur-button": "_purpur-button_w455q_1",
142
+ "purpur-button--xs": "_purpur-button--xs_w455q_33",
143
+ "purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
144
+ "purpur-button--sm": "_purpur-button--sm_w455q_39",
145
+ "purpur-button--md": "_purpur-button--md_w455q_45",
146
+ "purpur-button--lg": "_purpur-button--lg_w455q_51",
147
+ "purpur-button--full-width": "_purpur-button--full-width_w455q_57",
148
+ "purpur-button--primary": "_purpur-button--primary_w455q_60",
149
+ "purpur-button--disabled": "_purpur-button--disabled_w455q_64",
150
+ "purpur-button--primary-negative": "_purpur-button--primary-negative_w455q_70",
151
+ "purpur-button--secondary": "_purpur-button--secondary_w455q_82",
152
+ "purpur-button--secondary-negative": "_purpur-button--secondary-negative_w455q_93",
153
+ "purpur-button--expressive": "_purpur-button--expressive_w455q_104",
154
+ "purpur-button--expressive-negative": "_purpur-button--expressive-negative_w455q_114",
155
+ "purpur-button--negative": "_purpur-button--negative_w455q_126",
156
+ "purpur-button--destructive": "_purpur-button--destructive_w455q_133",
157
+ "purpur-button--destructive-negative": "_purpur-button--destructive-negative_w455q_143",
158
+ "purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_w455q_153",
159
+ "purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_w455q_166",
160
+ "purpur-button--text-negative": "_purpur-button--text-negative_w455q_181",
161
+ "purpur-button--text": "_purpur-button--text_w455q_181"
162
+ }, zn = {
163
+ ...Tn,
162
164
  DESTRUCTIVE: "destructive",
163
165
  TERTIARY_PURPLE: "tertiary-purple",
164
166
  TEXT: "text"
165
- }, Hn = kn.bind(In), oe = "purpur-button", Bn = ({
167
+ }, jn = Hn.bind(Bn), ie = "purpur-button", Wn = ({
166
168
  children: e,
167
169
  className: t,
168
170
  ["data-testid"]: n,
@@ -174,50 +176,50 @@ const kn = /* @__PURE__ */ Ln(Mn), In = {
174
176
  onClick: c,
175
177
  size: l = "md",
176
178
  variant: u,
177
- type: d = "button",
179
+ type: f = "button",
178
180
  ...p
179
- }, f) => {
181
+ }, d) => {
180
182
  if (r && u === "destructive")
181
183
  return null;
182
- const h = Hn(
184
+ const h = jn(
183
185
  [
184
- oe,
185
- `${oe}--${a ? `${u}-negative` : u}`,
186
- `${oe}--${l}`
186
+ ie,
187
+ `${ie}--${a ? `${u}-negative` : u}`,
188
+ `${ie}--${l}`
187
189
  ],
188
190
  {
189
- [`${oe}--icon-only`]: r,
190
- [`${oe}--negative`]: a,
191
- [`${oe}--full-width`]: i,
192
- [`${oe}--disabled`]: o || s
191
+ [`${ie}--icon-only`]: r,
192
+ [`${ie}--negative`]: a,
193
+ [`${ie}--full-width`]: i,
194
+ [`${ie}--disabled`]: o || s
193
195
  },
194
196
  t
195
- ), m = (v) => {
196
- o || s ? v.preventDefault() : c && c(v);
197
+ ), m = (y) => {
198
+ o || s ? y.preventDefault() : c && c(y);
197
199
  }, g = !!p["aria-disabled"] || o || s;
198
- return /* @__PURE__ */ Ye(
200
+ return /* @__PURE__ */ Ge(
199
201
  "button",
200
202
  {
201
203
  className: h,
202
204
  "data-testid": n,
203
- type: d,
204
- ref: f,
205
+ type: f,
206
+ ref: d,
205
207
  "aria-disabled": g,
206
208
  onClick: m,
207
209
  ...p,
208
210
  children: [
209
- s && /* @__PURE__ */ z(Nn, { size: l === Cn.LG ? "xs" : "xxs", negative: a, disabled: g }),
211
+ s && /* @__PURE__ */ z(kn, { size: l === Rn.LG ? "xs" : "xxs", negative: a, disabled: g }),
210
212
  " ",
211
213
  e
212
214
  ]
213
215
  }
214
216
  );
215
- }, Nt = I(Bn);
216
- Nt.displayName = "Button";
217
- function zn(e) {
217
+ }, Mt = I(Wn);
218
+ Mt.displayName = "Button";
219
+ function qn(e) {
218
220
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
219
221
  }
220
- var Lt = { exports: {} };
222
+ var kt = { exports: {} };
221
223
  /*!
222
224
  Copyright (c) 2018 Jed Watson.
223
225
  Licensed under the MIT License (MIT), see
@@ -252,9 +254,9 @@ var Lt = { exports: {} };
252
254
  }
253
255
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
254
256
  })();
255
- })(Lt);
256
- var jn = Lt.exports;
257
- const Wn = /* @__PURE__ */ zn(jn), Un = {
257
+ })(kt);
258
+ var Un = kt.exports;
259
+ const Vn = /* @__PURE__ */ qn(Un), Yn = {
258
260
  "purpur-icon": "_purpur-icon_8u1lq_1",
259
261
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
260
262
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -262,39 +264,39 @@ const Wn = /* @__PURE__ */ zn(jn), Un = {
262
264
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
263
265
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
264
266
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
265
- }, Vn = {
267
+ }, Xn = {
266
268
  name: "info",
267
269
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11 8.18c0 .537.469.979 1.007.979.524 0 .993-.442.993-.98s-.469-.979-.993-.979c-.538 0-1.007.441-1.007.98Zm.152 1.958v6.897h1.696v-6.897h-1.696Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',
268
270
  keywords: ["info"],
269
271
  category: "status"
270
- }, Mt = (e) => /* @__PURE__ */ z(
271
- kt,
272
+ }, It = (e) => /* @__PURE__ */ z(
273
+ Ft,
272
274
  {
273
275
  ...e,
274
- svg: Vn
276
+ svg: Xn
275
277
  }
276
278
  );
277
- Mt.displayName = "IconInfo";
278
- const Xn = Wn.bind(Un), gt = "purpur-icon", Yn = "md", Gn = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), qn = ({ content: e = "", title: t } = {}) => {
279
+ It.displayName = "IconInfo";
280
+ const Gn = Vn.bind(Yn), bt = "purpur-icon", Kn = "md", Zn = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), Jn = ({ content: e = "", title: t } = {}) => {
279
281
  const n = [
280
282
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
281
283
  { name: "fill", value: "currentColor" },
282
284
  { name: "viewBox", value: "0 0 24 24" },
283
285
  t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
284
286
  ], o = t ? `<title>${t}</title>` : "";
285
- return `<svg ${Gn(n)}>${o}${e}</svg>`;
286
- }, Kn = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), kt = ({
287
+ return `<svg ${Zn(n)}>${o}${e}</svg>`;
288
+ }, Qn = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Ft = ({
287
289
  ["data-testid"]: e,
288
290
  svg: t,
289
291
  allyTitle: n,
290
292
  className: o,
291
- size: i = Yn,
293
+ size: i = Kn,
292
294
  ...r
293
295
  }) => {
294
- const s = qn({
295
- content: Kn(t.svg),
296
+ const s = Jn({
297
+ content: Qn(t.svg),
296
298
  title: n
297
- }), a = Xn(o, gt, `${gt}--${i}`);
299
+ }), a = Gn(o, bt, `${bt}--${i}`);
298
300
  return /* @__PURE__ */ z(
299
301
  "span",
300
302
  {
@@ -306,11 +308,11 @@ const Xn = Wn.bind(Un), gt = "purpur-icon", Yn = "md", Gn = (e) => e.filter((t)
306
308
  }
307
309
  );
308
310
  };
309
- kt.displayName = "Icon";
310
- function Zn(e) {
311
+ Ft.displayName = "Icon";
312
+ function er(e) {
311
313
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
312
314
  }
313
- var It = { exports: {} };
315
+ var Ht = { exports: {} };
314
316
  /*!
315
317
  Copyright (c) 2018 Jed Watson.
316
318
  Licensed under the MIT License (MIT), see
@@ -345,9 +347,9 @@ var It = { exports: {} };
345
347
  }
346
348
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
347
349
  })();
348
- })(It);
349
- var Jn = It.exports;
350
- const Qn = /* @__PURE__ */ Zn(Jn), be = {
350
+ })(Ht);
351
+ var tr = Ht.exports;
352
+ const nr = /* @__PURE__ */ er(tr), ve = {
351
353
  "purpur-paragraph": "_purpur-paragraph_1rh57_1",
352
354
  "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
353
355
  "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
@@ -362,7 +364,7 @@ const Qn = /* @__PURE__ */ Zn(Jn), be = {
362
364
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
363
365
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
364
366
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
365
- }, Ft = {
367
+ }, Bt = {
366
368
  PARAGRAPH100: "paragraph-100",
367
369
  PARAGRAPH100MEDIUM: "paragraph-100-medium",
368
370
  PARAGRAPH100BOLD: "paragraph-100-bold",
@@ -373,77 +375,77 @@ const Qn = /* @__PURE__ */ Zn(Jn), be = {
373
375
  ADDITIONAL100MEDIUM: "additional-100-medium",
374
376
  OVERLINE100: "overline-100",
375
377
  OVERLINE200: "overline-200"
376
- }, $e = "purpur-paragraph", Ht = ({
378
+ }, $e = "purpur-paragraph", zt = ({
377
379
  ["data-testid"]: e,
378
380
  children: t,
379
381
  className: n,
380
382
  disabled: o,
381
383
  enableHyphenation: i = !1,
382
384
  negative: r = !1,
383
- variant: s = Ft.PARAGRAPH100,
385
+ variant: s = Bt.PARAGRAPH100,
384
386
  ...a
385
387
  }) => {
386
- const c = Qn([
388
+ const c = nr([
387
389
  n,
388
- be[$e],
389
- be[`${$e}--${s}`],
390
+ ve[$e],
391
+ ve[`${$e}--${s}`],
390
392
  {
391
- [be[`${$e}--hyphens`]]: i,
392
- [be[`${$e}--disabled`]]: o,
393
- [be[`${$e}--negative`]]: r
393
+ [ve[`${$e}--hyphens`]]: i,
394
+ [ve[`${$e}--disabled`]]: o,
395
+ [ve[`${$e}--negative`]]: r
394
396
  }
395
397
  ]);
396
398
  return /* @__PURE__ */ z("p", { ...a, className: c, "data-testid": e, children: t });
397
399
  };
398
- Ht.displayName = "Paragraph";
399
- const er = "400ms";
400
- function R() {
401
- return R = Object.assign ? Object.assign.bind() : function(e) {
400
+ zt.displayName = "Paragraph";
401
+ const rr = "400ms";
402
+ function D() {
403
+ return D = Object.assign ? Object.assign.bind() : function(e) {
402
404
  for (var t = 1; t < arguments.length; t++) {
403
405
  var n = arguments[t];
404
406
  for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
405
407
  }
406
408
  return e;
407
- }, R.apply(null, arguments);
409
+ }, D.apply(null, arguments);
408
410
  }
409
- function Z(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
411
+ function Q(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
410
412
  return function(i) {
411
413
  if (e == null || e(i), n === !1 || !i.defaultPrevented) return t == null ? void 0 : t(i);
412
414
  };
413
415
  }
414
- function tr(e, t) {
416
+ function or(e, t) {
415
417
  typeof e == "function" ? e(t) : e != null && (e.current = t);
416
418
  }
417
- function Bt(...e) {
419
+ function jt(...e) {
418
420
  return (t) => e.forEach(
419
- (n) => tr(n, t)
421
+ (n) => or(n, t)
420
422
  );
421
423
  }
422
- function pe(...e) {
423
- return j(Bt(...e), e);
424
+ function he(...e) {
425
+ return j(jt(...e), e);
424
426
  }
425
- function zt(e, t = []) {
427
+ function Wt(e, t = []) {
426
428
  let n = [];
427
429
  function o(r, s) {
428
- const a = /* @__PURE__ */ Ge(s), c = n.length;
430
+ const a = /* @__PURE__ */ Ke(s), c = n.length;
429
431
  n = [
430
432
  ...n,
431
433
  s
432
434
  ];
433
- function l(d) {
434
- const { scope: p, children: f, ...h } = d, m = (p == null ? void 0 : p[e][c]) || a, g = we(
435
+ function l(f) {
436
+ const { scope: p, children: d, ...h } = f, m = (p == null ? void 0 : p[e][c]) || a, g = _e(
435
437
  () => h,
436
438
  Object.values(h)
437
439
  );
438
- return /* @__PURE__ */ w(m.Provider, {
440
+ return /* @__PURE__ */ _(m.Provider, {
439
441
  value: g
440
- }, f);
442
+ }, d);
441
443
  }
442
- function u(d, p) {
443
- const f = (p == null ? void 0 : p[e][c]) || a, h = Et(f);
444
+ function u(f, p) {
445
+ const d = (p == null ? void 0 : p[e][c]) || a, h = Rt(d);
444
446
  if (h) return h;
445
447
  if (s !== void 0) return s;
446
- throw new Error(`\`${d}\` must be used within \`${r}\``);
448
+ throw new Error(`\`${f}\` must be used within \`${r}\``);
447
449
  }
448
450
  return l.displayName = r + "Provider", [
449
451
  l,
@@ -451,10 +453,10 @@ function zt(e, t = []) {
451
453
  ];
452
454
  }
453
455
  const i = () => {
454
- const r = n.map((s) => /* @__PURE__ */ Ge(s));
456
+ const r = n.map((s) => /* @__PURE__ */ Ke(s));
455
457
  return function(a) {
456
458
  const c = (a == null ? void 0 : a[e]) || r;
457
- return we(
459
+ return _e(
458
460
  () => ({
459
461
  [`__scope${e}`]: {
460
462
  ...a,
@@ -470,10 +472,10 @@ function zt(e, t = []) {
470
472
  };
471
473
  return i.scopeName = e, [
472
474
  o,
473
- nr(i, ...t)
475
+ ir(i, ...t)
474
476
  ];
475
477
  }
476
- function nr(...e) {
478
+ function ir(...e) {
477
479
  const t = e[0];
478
480
  if (e.length === 1) return t;
479
481
  const n = () => {
@@ -485,13 +487,13 @@ function nr(...e) {
485
487
  );
486
488
  return function(r) {
487
489
  const s = o.reduce((a, { useScope: c, scopeName: l }) => {
488
- const d = c(r)[`__scope${l}`];
490
+ const f = c(r)[`__scope${l}`];
489
491
  return {
490
492
  ...a,
491
- ...d
493
+ ...f
492
494
  };
493
495
  }, {});
494
- return we(
496
+ return _e(
495
497
  () => ({
496
498
  [`__scope${t.scopeName}`]: s
497
499
  }),
@@ -503,32 +505,32 @@ function nr(...e) {
503
505
  };
504
506
  return n.scopeName = t.scopeName, n;
505
507
  }
506
- const jt = /* @__PURE__ */ I((e, t) => {
507
- const { children: n, ...o } = e, i = ie.toArray(n), r = i.find(rr);
508
+ const qt = /* @__PURE__ */ I((e, t) => {
509
+ const { children: n, ...o } = e, i = se.toArray(n), r = i.find(sr);
508
510
  if (r) {
509
- const s = r.props.children, a = i.map((c) => c === r ? ie.count(s) > 1 ? ie.only(null) : /* @__PURE__ */ Me(s) ? s.props.children : null : c);
510
- return /* @__PURE__ */ w(qe, R({}, o, {
511
+ const s = r.props.children, a = i.map((c) => c === r ? se.count(s) > 1 ? se.only(null) : /* @__PURE__ */ ke(s) ? s.props.children : null : c);
512
+ return /* @__PURE__ */ _(Ze, D({}, o, {
511
513
  ref: t
512
- }), /* @__PURE__ */ Me(s) ? /* @__PURE__ */ tt(s, void 0, a) : null);
514
+ }), /* @__PURE__ */ ke(s) ? /* @__PURE__ */ rt(s, void 0, a) : null);
513
515
  }
514
- return /* @__PURE__ */ w(qe, R({}, o, {
516
+ return /* @__PURE__ */ _(Ze, D({}, o, {
515
517
  ref: t
516
518
  }), n);
517
519
  });
518
- jt.displayName = "Slot";
519
- const qe = /* @__PURE__ */ I((e, t) => {
520
+ qt.displayName = "Slot";
521
+ const Ze = /* @__PURE__ */ I((e, t) => {
520
522
  const { children: n, ...o } = e;
521
- return /* @__PURE__ */ Me(n) ? /* @__PURE__ */ tt(n, {
522
- ...or(o, n.props),
523
- ref: t ? Bt(t, n.ref) : n.ref
524
- }) : ie.count(n) > 1 ? ie.only(null) : null;
523
+ return /* @__PURE__ */ ke(n) ? /* @__PURE__ */ rt(n, {
524
+ ...ar(o, n.props),
525
+ ref: t ? jt(t, n.ref) : n.ref
526
+ }) : se.count(n) > 1 ? se.only(null) : null;
525
527
  });
526
- qe.displayName = "SlotClone";
527
- const Wt = ({ children: e }) => /* @__PURE__ */ w(wn, null, e);
528
- function rr(e) {
529
- return /* @__PURE__ */ Me(e) && e.type === Wt;
528
+ Ze.displayName = "SlotClone";
529
+ const Ut = ({ children: e }) => /* @__PURE__ */ _(An, null, e);
530
+ function sr(e) {
531
+ return /* @__PURE__ */ ke(e) && e.type === Ut;
530
532
  }
531
- function or(e, t) {
533
+ function ar(e, t) {
532
534
  const n = {
533
535
  ...t
534
536
  };
@@ -549,7 +551,7 @@ function or(e, t) {
549
551
  ...n
550
552
  };
551
553
  }
552
- const ir = [
554
+ const cr = [
553
555
  "a",
554
556
  "button",
555
557
  "div",
@@ -566,12 +568,12 @@ const ir = [
566
568
  "span",
567
569
  "svg",
568
570
  "ul"
569
- ], ae = ir.reduce((e, t) => {
571
+ ], ce = cr.reduce((e, t) => {
570
572
  const n = /* @__PURE__ */ I((o, i) => {
571
- const { asChild: r, ...s } = o, a = r ? jt : t;
573
+ const { asChild: r, ...s } = o, a = r ? qt : t;
572
574
  return S(() => {
573
575
  window[Symbol.for("radix-ui")] = !0;
574
- }, []), /* @__PURE__ */ w(a, R({}, s, {
576
+ }, []), /* @__PURE__ */ _(a, D({}, s, {
575
577
  ref: i
576
578
  }));
577
579
  });
@@ -580,16 +582,16 @@ const ir = [
580
582
  [t]: n
581
583
  };
582
584
  }, {});
583
- function sr(e, t) {
584
- e && St(
585
+ function lr(e, t) {
586
+ e && Dt(
585
587
  () => e.dispatchEvent(t)
586
588
  );
587
589
  }
588
- function he(e) {
590
+ function ge(e) {
589
591
  const t = k(e);
590
592
  return S(() => {
591
593
  t.current = e;
592
- }), we(
594
+ }), _e(
593
595
  () => (...n) => {
594
596
  var o;
595
597
  return (o = t.current) === null || o === void 0 ? void 0 : o.call(t, ...n);
@@ -597,8 +599,8 @@ function he(e) {
597
599
  []
598
600
  );
599
601
  }
600
- function ar(e, t = globalThis == null ? void 0 : globalThis.document) {
601
- const n = he(e);
602
+ function ur(e, t = globalThis == null ? void 0 : globalThis.document) {
603
+ const n = ge(e);
602
604
  S(() => {
603
605
  const o = (i) => {
604
606
  i.key === "Escape" && n(i);
@@ -609,73 +611,73 @@ function ar(e, t = globalThis == null ? void 0 : globalThis.document) {
609
611
  t
610
612
  ]);
611
613
  }
612
- const Ke = "dismissableLayer.update", cr = "dismissableLayer.pointerDownOutside", lr = "dismissableLayer.focusOutside";
613
- let mt;
614
- const ur = /* @__PURE__ */ Ge({
614
+ const Je = "dismissableLayer.update", fr = "dismissableLayer.pointerDownOutside", dr = "dismissableLayer.focusOutside";
615
+ let xt;
616
+ const pr = /* @__PURE__ */ Ke({
615
617
  layers: /* @__PURE__ */ new Set(),
616
618
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
617
619
  branches: /* @__PURE__ */ new Set()
618
- }), dr = /* @__PURE__ */ I((e, t) => {
620
+ }), hr = /* @__PURE__ */ I((e, t) => {
619
621
  var n;
620
- const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: i, onPointerDownOutside: r, onFocusOutside: s, onInteractOutside: a, onDismiss: c, ...l } = e, u = Et(ur), [d, p] = U(null), f = (n = d == null ? void 0 : d.ownerDocument) !== null && n !== void 0 ? n : globalThis == null ? void 0 : globalThis.document, [, h] = U({}), m = pe(
622
+ const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: i, onPointerDownOutside: r, onFocusOutside: s, onInteractOutside: a, onDismiss: c, ...l } = e, u = Rt(pr), [f, p] = q(null), d = (n = f == null ? void 0 : f.ownerDocument) !== null && n !== void 0 ? n : globalThis == null ? void 0 : globalThis.document, [, h] = q({}), m = he(
621
623
  t,
622
- (_) => p(_)
623
- ), g = Array.from(u.layers), [v] = [
624
+ ($) => p($)
625
+ ), g = Array.from(u.layers), [y] = [
624
626
  ...u.layersWithOutsidePointerEventsDisabled
625
- ].slice(-1), y = g.indexOf(v), x = d ? g.indexOf(d) : -1, b = u.layersWithOutsidePointerEventsDisabled.size > 0, $ = x >= y, P = fr((_) => {
626
- const E = _.target, T = [
627
+ ].slice(-1), b = g.indexOf(y), x = f ? g.indexOf(f) : -1, w = u.layersWithOutsidePointerEventsDisabled.size > 0, v = x >= b, A = gr(($) => {
628
+ const E = $.target, T = [
627
629
  ...u.branches
628
630
  ].some(
629
- (D) => D.contains(E)
631
+ (N) => N.contains(E)
630
632
  );
631
- !$ || T || (r == null || r(_), a == null || a(_), _.defaultPrevented || c == null || c());
632
- }, f), O = pr((_) => {
633
- const E = _.target;
633
+ !v || T || (r == null || r($), a == null || a($), $.defaultPrevented || c == null || c());
634
+ }, d), P = mr(($) => {
635
+ const E = $.target;
634
636
  [
635
637
  ...u.branches
636
638
  ].some(
637
- (D) => D.contains(E)
638
- ) || (s == null || s(_), a == null || a(_), _.defaultPrevented || c == null || c());
639
- }, f);
640
- return ar((_) => {
641
- x === u.layers.size - 1 && (i == null || i(_), !_.defaultPrevented && c && (_.preventDefault(), c()));
642
- }, f), S(() => {
643
- if (d)
644
- return o && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (mt = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), vt(), () => {
645
- o && u.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = mt);
639
+ (N) => N.contains(E)
640
+ ) || (s == null || s($), a == null || a($), $.defaultPrevented || c == null || c());
641
+ }, d);
642
+ return ur(($) => {
643
+ x === u.layers.size - 1 && (i == null || i($), !$.defaultPrevented && c && ($.preventDefault(), c()));
644
+ }, d), S(() => {
645
+ if (f)
646
+ return o && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (xt = d.body.style.pointerEvents, d.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(f)), u.layers.add(f), wt(), () => {
647
+ o && u.layersWithOutsidePointerEventsDisabled.size === 1 && (d.body.style.pointerEvents = xt);
646
648
  };
647
649
  }, [
648
- d,
649
650
  f,
651
+ d,
650
652
  o,
651
653
  u
652
654
  ]), S(() => () => {
653
- d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), vt());
655
+ f && (u.layers.delete(f), u.layersWithOutsidePointerEventsDisabled.delete(f), wt());
654
656
  }, [
655
- d,
657
+ f,
656
658
  u
657
659
  ]), S(() => {
658
- const _ = () => h({});
659
- return document.addEventListener(Ke, _), () => document.removeEventListener(Ke, _);
660
- }, []), /* @__PURE__ */ w(ae.div, R({}, l, {
660
+ const $ = () => h({});
661
+ return document.addEventListener(Je, $), () => document.removeEventListener(Je, $);
662
+ }, []), /* @__PURE__ */ _(ce.div, D({}, l, {
661
663
  ref: m,
662
664
  style: {
663
- pointerEvents: b ? $ ? "auto" : "none" : void 0,
665
+ pointerEvents: w ? v ? "auto" : "none" : void 0,
664
666
  ...e.style
665
667
  },
666
- onFocusCapture: Z(e.onFocusCapture, O.onFocusCapture),
667
- onBlurCapture: Z(e.onBlurCapture, O.onBlurCapture),
668
- onPointerDownCapture: Z(e.onPointerDownCapture, P.onPointerDownCapture)
668
+ onFocusCapture: Q(e.onFocusCapture, P.onFocusCapture),
669
+ onBlurCapture: Q(e.onBlurCapture, P.onBlurCapture),
670
+ onPointerDownCapture: Q(e.onPointerDownCapture, A.onPointerDownCapture)
669
671
  }));
670
672
  });
671
- function fr(e, t = globalThis == null ? void 0 : globalThis.document) {
672
- const n = he(e), o = k(!1), i = k(() => {
673
+ function gr(e, t = globalThis == null ? void 0 : globalThis.document) {
674
+ const n = ge(e), o = k(!1), i = k(() => {
673
675
  });
674
676
  return S(() => {
675
677
  const r = (a) => {
676
678
  if (a.target && !o.current) {
677
679
  let l = function() {
678
- Ut(cr, n, c, {
680
+ Vt(fr, n, c, {
679
681
  discrete: !0
680
682
  });
681
683
  };
@@ -702,11 +704,11 @@ function fr(e, t = globalThis == null ? void 0 : globalThis.document) {
702
704
  onPointerDownCapture: () => o.current = !0
703
705
  };
704
706
  }
705
- function pr(e, t = globalThis == null ? void 0 : globalThis.document) {
706
- const n = he(e), o = k(!1);
707
+ function mr(e, t = globalThis == null ? void 0 : globalThis.document) {
708
+ const n = ge(e), o = k(!1);
707
709
  return S(() => {
708
710
  const i = (r) => {
709
- r.target && !o.current && Ut(lr, n, {
711
+ r.target && !o.current && Vt(dr, n, {
710
712
  originalEvent: r
711
713
  }, {
712
714
  discrete: !1
@@ -721,11 +723,11 @@ function pr(e, t = globalThis == null ? void 0 : globalThis.document) {
721
723
  onBlurCapture: () => o.current = !1
722
724
  };
723
725
  }
724
- function vt() {
725
- const e = new CustomEvent(Ke);
726
+ function wt() {
727
+ const e = new CustomEvent(Je);
726
728
  document.dispatchEvent(e);
727
729
  }
728
- function Ut(e, t, n, { discrete: o }) {
730
+ function Vt(e, t, n, { discrete: o }) {
729
731
  const i = n.originalEvent.target, r = new CustomEvent(e, {
730
732
  bubbles: !1,
731
733
  cancelable: !0,
@@ -733,72 +735,72 @@ function Ut(e, t, n, { discrete: o }) {
733
735
  });
734
736
  t && i.addEventListener(e, t, {
735
737
  once: !0
736
- }), o ? sr(i, r) : i.dispatchEvent(r);
738
+ }), o ? lr(i, r) : i.dispatchEvent(r);
737
739
  }
738
- const de = globalThis != null && globalThis.document ? Tt : () => {
739
- }, hr = L.useId || (() => {
740
+ const de = globalThis != null && globalThis.document ? St : () => {
741
+ }, yr = L.useId || (() => {
740
742
  });
741
- let gr = 0;
742
- function mr(e) {
743
- const [t, n] = L.useState(hr());
743
+ let br = 0;
744
+ function xr(e) {
745
+ const [t, n] = L.useState(yr());
744
746
  return de(() => {
745
747
  n(
746
- (o) => o ?? String(gr++)
748
+ (o) => o ?? String(br++)
747
749
  );
748
750
  }, [
749
751
  e
750
752
  ]), t ? `radix-${t}` : "";
751
753
  }
752
- const vr = ["top", "right", "bottom", "left"], q = Math.min, W = Math.max, ke = Math.round, De = Math.floor, te = (e) => ({
754
+ const wr = ["top", "right", "bottom", "left"], ne = Math.min, W = Math.max, Ie = Math.round, Ne = Math.floor, K = (e) => ({
753
755
  x: e,
754
756
  y: e
755
- }), yr = {
757
+ }), vr = {
756
758
  left: "right",
757
759
  right: "left",
758
760
  bottom: "top",
759
761
  top: "bottom"
760
- }, xr = {
762
+ }, $r = {
761
763
  start: "end",
762
764
  end: "start"
763
765
  };
764
- function Ze(e, t, n) {
765
- return W(e, q(t, n));
766
+ function Qe(e, t, n) {
767
+ return W(e, ne(t, n));
766
768
  }
767
- function J(e, t) {
769
+ function ee(e, t) {
768
770
  return typeof e == "function" ? e(t) : e;
769
771
  }
770
- function Q(e) {
772
+ function te(e) {
771
773
  return e.split("-")[0];
772
774
  }
773
- function ge(e) {
775
+ function me(e) {
774
776
  return e.split("-")[1];
775
777
  }
776
- function nt(e) {
778
+ function ot(e) {
777
779
  return e === "x" ? "y" : "x";
778
780
  }
779
- function rt(e) {
781
+ function it(e) {
780
782
  return e === "y" ? "height" : "width";
781
783
  }
782
- function ne(e) {
783
- return ["top", "bottom"].includes(Q(e)) ? "y" : "x";
784
+ function re(e) {
785
+ return ["top", "bottom"].includes(te(e)) ? "y" : "x";
784
786
  }
785
- function ot(e) {
786
- return nt(ne(e));
787
+ function st(e) {
788
+ return ot(re(e));
787
789
  }
788
- function br(e, t, n) {
790
+ function _r(e, t, n) {
789
791
  n === void 0 && (n = !1);
790
- const o = ge(e), i = ot(e), r = rt(i);
792
+ const o = me(e), i = st(e), r = it(i);
791
793
  let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
792
- return t.reference[r] > t.floating[r] && (s = Ie(s)), [s, Ie(s)];
794
+ return t.reference[r] > t.floating[r] && (s = Fe(s)), [s, Fe(s)];
793
795
  }
794
- function $r(e) {
795
- const t = Ie(e);
796
- return [Je(e), t, Je(t)];
796
+ function Pr(e) {
797
+ const t = Fe(e);
798
+ return [et(e), t, et(t)];
797
799
  }
798
- function Je(e) {
799
- return e.replace(/start|end/g, (t) => xr[t]);
800
+ function et(e) {
801
+ return e.replace(/start|end/g, (t) => $r[t]);
800
802
  }
801
- function wr(e, t, n) {
803
+ function Ar(e, t, n) {
802
804
  const o = ["left", "right"], i = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
803
805
  switch (e) {
804
806
  case "top":
@@ -811,15 +813,15 @@ function wr(e, t, n) {
811
813
  return [];
812
814
  }
813
815
  }
814
- function _r(e, t, n, o) {
815
- const i = ge(e);
816
- let r = wr(Q(e), n === "start", o);
817
- return i && (r = r.map((s) => s + "-" + i), t && (r = r.concat(r.map(Je)))), r;
816
+ function Or(e, t, n, o) {
817
+ const i = me(e);
818
+ let r = Ar(te(e), n === "start", o);
819
+ return i && (r = r.map((s) => s + "-" + i), t && (r = r.concat(r.map(et)))), r;
818
820
  }
819
- function Ie(e) {
820
- return e.replace(/left|right|bottom|top/g, (t) => yr[t]);
821
+ function Fe(e) {
822
+ return e.replace(/left|right|bottom|top/g, (t) => vr[t]);
821
823
  }
822
- function Pr(e) {
824
+ function Cr(e) {
823
825
  return {
824
826
  top: 0,
825
827
  right: 0,
@@ -828,15 +830,15 @@ function Pr(e) {
828
830
  ...e
829
831
  };
830
832
  }
831
- function Vt(e) {
832
- return typeof e != "number" ? Pr(e) : {
833
+ function Yt(e) {
834
+ return typeof e != "number" ? Cr(e) : {
833
835
  top: e,
834
836
  right: e,
835
837
  bottom: e,
836
838
  left: e
837
839
  };
838
840
  }
839
- function Fe(e) {
841
+ function He(e) {
840
842
  const {
841
843
  x: t,
842
844
  y: n,
@@ -854,55 +856,55 @@ function Fe(e) {
854
856
  y: n
855
857
  };
856
858
  }
857
- function yt(e, t, n) {
859
+ function vt(e, t, n) {
858
860
  let {
859
861
  reference: o,
860
862
  floating: i
861
863
  } = e;
862
- const r = ne(t), s = ot(t), a = rt(s), c = Q(t), l = r === "y", u = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, p = o[a] / 2 - i[a] / 2;
863
- let f;
864
+ const r = re(t), s = st(t), a = it(s), c = te(t), l = r === "y", u = o.x + o.width / 2 - i.width / 2, f = o.y + o.height / 2 - i.height / 2, p = o[a] / 2 - i[a] / 2;
865
+ let d;
864
866
  switch (c) {
865
867
  case "top":
866
- f = {
868
+ d = {
867
869
  x: u,
868
870
  y: o.y - i.height
869
871
  };
870
872
  break;
871
873
  case "bottom":
872
- f = {
874
+ d = {
873
875
  x: u,
874
876
  y: o.y + o.height
875
877
  };
876
878
  break;
877
879
  case "right":
878
- f = {
880
+ d = {
879
881
  x: o.x + o.width,
880
- y: d
882
+ y: f
881
883
  };
882
884
  break;
883
885
  case "left":
884
- f = {
886
+ d = {
885
887
  x: o.x - i.width,
886
- y: d
888
+ y: f
887
889
  };
888
890
  break;
889
891
  default:
890
- f = {
892
+ d = {
891
893
  x: o.x,
892
894
  y: o.y
893
895
  };
894
896
  }
895
- switch (ge(t)) {
897
+ switch (me(t)) {
896
898
  case "start":
897
- f[s] -= p * (n && l ? -1 : 1);
899
+ d[s] -= p * (n && l ? -1 : 1);
898
900
  break;
899
901
  case "end":
900
- f[s] += p * (n && l ? -1 : 1);
902
+ d[s] += p * (n && l ? -1 : 1);
901
903
  break;
902
904
  }
903
- return f;
905
+ return d;
904
906
  }
905
- const Ar = async (e, t, n) => {
907
+ const Er = async (e, t, n) => {
906
908
  const {
907
909
  placement: o = "bottom",
908
910
  strategy: i = "absolute",
@@ -915,24 +917,24 @@ const Ar = async (e, t, n) => {
915
917
  strategy: i
916
918
  }), {
917
919
  x: u,
918
- y: d
919
- } = yt(l, o, c), p = o, f = {}, h = 0;
920
+ y: f
921
+ } = vt(l, o, c), p = o, d = {}, h = 0;
920
922
  for (let m = 0; m < a.length; m++) {
921
923
  const {
922
924
  name: g,
923
- fn: v
925
+ fn: y
924
926
  } = a[m], {
925
- x: y,
927
+ x: b,
926
928
  y: x,
927
- data: b,
928
- reset: $
929
- } = await v({
929
+ data: w,
930
+ reset: v
931
+ } = await y({
930
932
  x: u,
931
- y: d,
933
+ y: f,
932
934
  initialPlacement: o,
933
935
  placement: p,
934
936
  strategy: i,
935
- middlewareData: f,
937
+ middlewareData: d,
936
938
  rects: l,
937
939
  platform: s,
938
940
  elements: {
@@ -940,30 +942,30 @@ const Ar = async (e, t, n) => {
940
942
  floating: t
941
943
  }
942
944
  });
943
- u = y ?? u, d = x ?? d, f = {
944
- ...f,
945
+ u = b ?? u, f = x ?? f, d = {
946
+ ...d,
945
947
  [g]: {
946
- ...f[g],
947
- ...b
948
+ ...d[g],
949
+ ...w
948
950
  }
949
- }, $ && h <= 50 && (h++, typeof $ == "object" && ($.placement && (p = $.placement), $.rects && (l = $.rects === !0 ? await s.getElementRects({
951
+ }, v && h <= 50 && (h++, typeof v == "object" && (v.placement && (p = v.placement), v.rects && (l = v.rects === !0 ? await s.getElementRects({
950
952
  reference: e,
951
953
  floating: t,
952
954
  strategy: i
953
- }) : $.rects), {
955
+ }) : v.rects), {
954
956
  x: u,
955
- y: d
956
- } = yt(l, p, c)), m = -1);
957
+ y: f
958
+ } = vt(l, p, c)), m = -1);
957
959
  }
958
960
  return {
959
961
  x: u,
960
- y: d,
962
+ y: f,
961
963
  placement: p,
962
964
  strategy: i,
963
- middlewareData: f
965
+ middlewareData: d
964
966
  };
965
967
  };
966
- async function _e(e, t) {
968
+ async function Pe(e, t) {
967
969
  var n;
968
970
  t === void 0 && (t = {});
969
971
  const {
@@ -976,39 +978,39 @@ async function _e(e, t) {
976
978
  } = e, {
977
979
  boundary: l = "clippingAncestors",
978
980
  rootBoundary: u = "viewport",
979
- elementContext: d = "floating",
981
+ elementContext: f = "floating",
980
982
  altBoundary: p = !1,
981
- padding: f = 0
982
- } = J(t, e), h = Vt(f), g = a[p ? d === "floating" ? "reference" : "floating" : d], v = Fe(await r.getClippingRect({
983
+ padding: d = 0
984
+ } = ee(t, e), h = Yt(d), g = a[p ? f === "floating" ? "reference" : "floating" : f], y = He(await r.getClippingRect({
983
985
  element: (n = await (r.isElement == null ? void 0 : r.isElement(g))) == null || n ? g : g.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
984
986
  boundary: l,
985
987
  rootBoundary: u,
986
988
  strategy: c
987
- })), y = d === "floating" ? {
989
+ })), b = f === "floating" ? {
988
990
  x: o,
989
991
  y: i,
990
992
  width: s.floating.width,
991
993
  height: s.floating.height
992
- } : s.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), b = await (r.isElement == null ? void 0 : r.isElement(x)) ? await (r.getScale == null ? void 0 : r.getScale(x)) || {
994
+ } : s.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), w = await (r.isElement == null ? void 0 : r.isElement(x)) ? await (r.getScale == null ? void 0 : r.getScale(x)) || {
993
995
  x: 1,
994
996
  y: 1
995
997
  } : {
996
998
  x: 1,
997
999
  y: 1
998
- }, $ = Fe(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
1000
+ }, v = He(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
999
1001
  elements: a,
1000
- rect: y,
1002
+ rect: b,
1001
1003
  offsetParent: x,
1002
1004
  strategy: c
1003
- }) : y);
1005
+ }) : b);
1004
1006
  return {
1005
- top: (v.top - $.top + h.top) / b.y,
1006
- bottom: ($.bottom - v.bottom + h.bottom) / b.y,
1007
- left: (v.left - $.left + h.left) / b.x,
1008
- right: ($.right - v.right + h.right) / b.x
1007
+ top: (y.top - v.top + h.top) / w.y,
1008
+ bottom: (v.bottom - y.bottom + h.bottom) / w.y,
1009
+ left: (y.left - v.left + h.left) / w.x,
1010
+ right: (v.right - y.right + h.right) / w.x
1009
1011
  };
1010
1012
  }
1011
- const Or = (e) => ({
1013
+ const Tr = (e) => ({
1012
1014
  name: "arrow",
1013
1015
  options: e,
1014
1016
  async fn(t) {
@@ -1023,29 +1025,29 @@ const Or = (e) => ({
1023
1025
  } = t, {
1024
1026
  element: l,
1025
1027
  padding: u = 0
1026
- } = J(e, t) || {};
1028
+ } = ee(e, t) || {};
1027
1029
  if (l == null)
1028
1030
  return {};
1029
- const d = Vt(u), p = {
1031
+ const f = Yt(u), p = {
1030
1032
  x: n,
1031
1033
  y: o
1032
- }, f = ot(i), h = rt(f), m = await s.getDimensions(l), g = f === "y", v = g ? "top" : "left", y = g ? "bottom" : "right", x = g ? "clientHeight" : "clientWidth", b = r.reference[h] + r.reference[f] - p[f] - r.floating[h], $ = p[f] - r.reference[f], P = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
1033
- let O = P ? P[x] : 0;
1034
- (!O || !await (s.isElement == null ? void 0 : s.isElement(P))) && (O = a.floating[x] || r.floating[h]);
1035
- const _ = b / 2 - $ / 2, E = O / 2 - m[h] / 2 - 1, T = q(d[v], E), D = q(d[y], E), M = T, X = O - m[h] - D, C = O / 2 - m[h] / 2 + _, F = Ze(M, C, X), H = !c.arrow && ge(i) != null && C !== F && r.reference[h] / 2 - (C < M ? T : D) - m[h] / 2 < 0, A = H ? C < M ? C - M : C - X : 0;
1034
+ }, d = st(i), h = it(d), m = await s.getDimensions(l), g = d === "y", y = g ? "top" : "left", b = g ? "bottom" : "right", x = g ? "clientHeight" : "clientWidth", w = r.reference[h] + r.reference[d] - p[d] - r.floating[h], v = p[d] - r.reference[d], A = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
1035
+ let P = A ? A[x] : 0;
1036
+ (!P || !await (s.isElement == null ? void 0 : s.isElement(A))) && (P = a.floating[x] || r.floating[h]);
1037
+ const $ = w / 2 - v / 2, E = P / 2 - m[h] / 2 - 1, T = ne(f[y], E), N = ne(f[b], E), M = T, F = P - m[h] - N, O = P / 2 - m[h] / 2 + $, V = Qe(M, O, F), R = !c.arrow && me(i) != null && O !== V && r.reference[h] / 2 - (O < M ? T : N) - m[h] / 2 < 0, B = R ? O < M ? O - M : O - F : 0;
1036
1038
  return {
1037
- [f]: p[f] + A,
1039
+ [d]: p[d] + B,
1038
1040
  data: {
1039
- [f]: F,
1040
- centerOffset: C - F - A,
1041
- ...H && {
1042
- alignmentOffset: A
1041
+ [d]: V,
1042
+ centerOffset: O - V - B,
1043
+ ...R && {
1044
+ alignmentOffset: B
1043
1045
  }
1044
1046
  },
1045
- reset: H
1047
+ reset: R
1046
1048
  };
1047
1049
  }
1048
- }), Cr = function(e) {
1050
+ }), Rr = function(e) {
1049
1051
  return e === void 0 && (e = {}), {
1050
1052
  name: "flip",
1051
1053
  options: e,
@@ -1060,64 +1062,64 @@ const Or = (e) => ({
1060
1062
  elements: l
1061
1063
  } = t, {
1062
1064
  mainAxis: u = !0,
1063
- crossAxis: d = !0,
1065
+ crossAxis: f = !0,
1064
1066
  fallbackPlacements: p,
1065
- fallbackStrategy: f = "bestFit",
1067
+ fallbackStrategy: d = "bestFit",
1066
1068
  fallbackAxisSideDirection: h = "none",
1067
1069
  flipAlignment: m = !0,
1068
1070
  ...g
1069
- } = J(e, t);
1071
+ } = ee(e, t);
1070
1072
  if ((n = r.arrow) != null && n.alignmentOffset)
1071
1073
  return {};
1072
- const v = Q(i), y = ne(a), x = Q(a) === a, b = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), $ = p || (x || !m ? [Ie(a)] : $r(a)), P = h !== "none";
1073
- !p && P && $.push(..._r(a, m, h, b));
1074
- const O = [a, ...$], _ = await _e(t, g), E = [];
1074
+ const y = te(i), b = re(a), x = te(a) === a, w = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), v = p || (x || !m ? [Fe(a)] : Pr(a)), A = h !== "none";
1075
+ !p && A && v.push(...Or(a, m, h, w));
1076
+ const P = [a, ...v], $ = await Pe(t, g), E = [];
1075
1077
  let T = ((o = r.flip) == null ? void 0 : o.overflows) || [];
1076
- if (u && E.push(_[v]), d) {
1077
- const C = br(i, s, b);
1078
- E.push(_[C[0]], _[C[1]]);
1078
+ if (u && E.push($[y]), f) {
1079
+ const O = _r(i, s, w);
1080
+ E.push($[O[0]], $[O[1]]);
1079
1081
  }
1080
1082
  if (T = [...T, {
1081
1083
  placement: i,
1082
1084
  overflows: E
1083
- }], !E.every((C) => C <= 0)) {
1084
- var D, M;
1085
- const C = (((D = r.flip) == null ? void 0 : D.index) || 0) + 1, F = O[C];
1086
- if (F)
1085
+ }], !E.every((O) => O <= 0)) {
1086
+ var N, M;
1087
+ const O = (((N = r.flip) == null ? void 0 : N.index) || 0) + 1, V = P[O];
1088
+ if (V)
1087
1089
  return {
1088
1090
  data: {
1089
- index: C,
1091
+ index: O,
1090
1092
  overflows: T
1091
1093
  },
1092
1094
  reset: {
1093
- placement: F
1095
+ placement: V
1094
1096
  }
1095
1097
  };
1096
- let H = (M = T.filter((A) => A.overflows[0] <= 0).sort((A, B) => A.overflows[1] - B.overflows[1])[0]) == null ? void 0 : M.placement;
1097
- if (!H)
1098
- switch (f) {
1098
+ let R = (M = T.filter((B) => B.overflows[0] <= 0).sort((B, C) => B.overflows[1] - C.overflows[1])[0]) == null ? void 0 : M.placement;
1099
+ if (!R)
1100
+ switch (d) {
1099
1101
  case "bestFit": {
1100
- var X;
1101
- const A = (X = T.filter((B) => {
1102
- if (P) {
1103
- const N = ne(B.placement);
1104
- return N === y || // Create a bias to the `y` side axis due to horizontal
1102
+ var F;
1103
+ const B = (F = T.filter((C) => {
1104
+ if (A) {
1105
+ const H = re(C.placement);
1106
+ return H === b || // Create a bias to the `y` side axis due to horizontal
1105
1107
  // reading directions favoring greater width.
1106
- N === "y";
1108
+ H === "y";
1107
1109
  }
1108
1110
  return !0;
1109
- }).map((B) => [B.placement, B.overflows.filter((N) => N > 0).reduce((N, Ue) => N + Ue, 0)]).sort((B, N) => B[1] - N[1])[0]) == null ? void 0 : X[0];
1110
- A && (H = A);
1111
+ }).map((C) => [C.placement, C.overflows.filter((H) => H > 0).reduce((H, G) => H + G, 0)]).sort((C, H) => C[1] - H[1])[0]) == null ? void 0 : F[0];
1112
+ B && (R = B);
1111
1113
  break;
1112
1114
  }
1113
1115
  case "initialPlacement":
1114
- H = a;
1116
+ R = a;
1115
1117
  break;
1116
1118
  }
1117
- if (i !== H)
1119
+ if (i !== R)
1118
1120
  return {
1119
1121
  reset: {
1120
- placement: H
1122
+ placement: R
1121
1123
  }
1122
1124
  };
1123
1125
  }
@@ -1125,7 +1127,7 @@ const Or = (e) => ({
1125
1127
  }
1126
1128
  };
1127
1129
  };
1128
- function xt(e, t) {
1130
+ function $t(e, t) {
1129
1131
  return {
1130
1132
  top: e.top - t.height,
1131
1133
  right: e.right - t.width,
@@ -1133,10 +1135,10 @@ function xt(e, t) {
1133
1135
  left: e.left - t.width
1134
1136
  };
1135
1137
  }
1136
- function bt(e) {
1137
- return vr.some((t) => e[t] >= 0);
1138
+ function _t(e) {
1139
+ return wr.some((t) => e[t] >= 0);
1138
1140
  }
1139
- const Er = function(e) {
1141
+ const Sr = function(e) {
1140
1142
  return e === void 0 && (e = {}), {
1141
1143
  name: "hide",
1142
1144
  options: e,
@@ -1146,29 +1148,29 @@ const Er = function(e) {
1146
1148
  } = t, {
1147
1149
  strategy: o = "referenceHidden",
1148
1150
  ...i
1149
- } = J(e, t);
1151
+ } = ee(e, t);
1150
1152
  switch (o) {
1151
1153
  case "referenceHidden": {
1152
- const r = await _e(t, {
1154
+ const r = await Pe(t, {
1153
1155
  ...i,
1154
1156
  elementContext: "reference"
1155
- }), s = xt(r, n.reference);
1157
+ }), s = $t(r, n.reference);
1156
1158
  return {
1157
1159
  data: {
1158
1160
  referenceHiddenOffsets: s,
1159
- referenceHidden: bt(s)
1161
+ referenceHidden: _t(s)
1160
1162
  }
1161
1163
  };
1162
1164
  }
1163
1165
  case "escaped": {
1164
- const r = await _e(t, {
1166
+ const r = await Pe(t, {
1165
1167
  ...i,
1166
1168
  altBoundary: !0
1167
- }), s = xt(r, n.floating);
1169
+ }), s = $t(r, n.floating);
1168
1170
  return {
1169
1171
  data: {
1170
1172
  escapedOffsets: s,
1171
- escaped: bt(s)
1173
+ escaped: _t(s)
1172
1174
  }
1173
1175
  };
1174
1176
  }
@@ -1178,35 +1180,34 @@ const Er = function(e) {
1178
1180
  }
1179
1181
  };
1180
1182
  };
1181
- async function Tr(e, t) {
1183
+ async function Dr(e, t) {
1182
1184
  const {
1183
1185
  placement: n,
1184
1186
  platform: o,
1185
1187
  elements: i
1186
- } = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = Q(n), a = ge(n), c = ne(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, u = r && c ? -1 : 1, d = J(t, e);
1188
+ } = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = te(n), a = me(n), c = re(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, u = r && c ? -1 : 1, f = ee(t, e);
1187
1189
  let {
1188
1190
  mainAxis: p,
1189
- crossAxis: f,
1191
+ crossAxis: d,
1190
1192
  alignmentAxis: h
1191
- } = typeof d == "number" ? {
1192
- mainAxis: d,
1193
+ } = typeof f == "number" ? {
1194
+ mainAxis: f,
1193
1195
  crossAxis: 0,
1194
1196
  alignmentAxis: null
1195
1197
  } : {
1196
- mainAxis: 0,
1197
- crossAxis: 0,
1198
- alignmentAxis: null,
1199
- ...d
1198
+ mainAxis: f.mainAxis || 0,
1199
+ crossAxis: f.crossAxis || 0,
1200
+ alignmentAxis: f.alignmentAxis
1200
1201
  };
1201
- return a && typeof h == "number" && (f = a === "end" ? h * -1 : h), c ? {
1202
- x: f * u,
1202
+ return a && typeof h == "number" && (d = a === "end" ? h * -1 : h), c ? {
1203
+ x: d * u,
1203
1204
  y: p * l
1204
1205
  } : {
1205
1206
  x: p * l,
1206
- y: f * u
1207
+ y: d * u
1207
1208
  };
1208
1209
  }
1209
- const Sr = function(e) {
1210
+ const Nr = function(e) {
1210
1211
  return e === void 0 && (e = 0), {
1211
1212
  name: "offset",
1212
1213
  options: e,
@@ -1217,7 +1218,7 @@ const Sr = function(e) {
1217
1218
  y: r,
1218
1219
  placement: s,
1219
1220
  middlewareData: a
1220
- } = t, c = await Tr(t, e);
1221
+ } = t, c = await Dr(t, e);
1221
1222
  return s === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
1222
1223
  x: i + c.x,
1223
1224
  y: r + c.y,
@@ -1228,7 +1229,7 @@ const Sr = function(e) {
1228
1229
  };
1229
1230
  }
1230
1231
  };
1231
- }, Rr = function(e) {
1232
+ }, Lr = function(e) {
1232
1233
  return e === void 0 && (e = {}), {
1233
1234
  name: "shift",
1234
1235
  options: e,
@@ -1243,44 +1244,48 @@ const Sr = function(e) {
1243
1244
  limiter: a = {
1244
1245
  fn: (g) => {
1245
1246
  let {
1246
- x: v,
1247
- y
1247
+ x: y,
1248
+ y: b
1248
1249
  } = g;
1249
1250
  return {
1250
- x: v,
1251
- y
1251
+ x: y,
1252
+ y: b
1252
1253
  };
1253
1254
  }
1254
1255
  },
1255
1256
  ...c
1256
- } = J(e, t), l = {
1257
+ } = ee(e, t), l = {
1257
1258
  x: n,
1258
1259
  y: o
1259
- }, u = await _e(t, c), d = ne(Q(i)), p = nt(d);
1260
- let f = l[p], h = l[d];
1260
+ }, u = await Pe(t, c), f = re(te(i)), p = ot(f);
1261
+ let d = l[p], h = l[f];
1261
1262
  if (r) {
1262
- const g = p === "y" ? "top" : "left", v = p === "y" ? "bottom" : "right", y = f + u[g], x = f - u[v];
1263
- f = Ze(y, f, x);
1263
+ const g = p === "y" ? "top" : "left", y = p === "y" ? "bottom" : "right", b = d + u[g], x = d - u[y];
1264
+ d = Qe(b, d, x);
1264
1265
  }
1265
1266
  if (s) {
1266
- const g = d === "y" ? "top" : "left", v = d === "y" ? "bottom" : "right", y = h + u[g], x = h - u[v];
1267
- h = Ze(y, h, x);
1267
+ const g = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", b = h + u[g], x = h - u[y];
1268
+ h = Qe(b, h, x);
1268
1269
  }
1269
1270
  const m = a.fn({
1270
1271
  ...t,
1271
- [p]: f,
1272
- [d]: h
1272
+ [p]: d,
1273
+ [f]: h
1273
1274
  });
1274
1275
  return {
1275
1276
  ...m,
1276
1277
  data: {
1277
1278
  x: m.x - n,
1278
- y: m.y - o
1279
+ y: m.y - o,
1280
+ enabled: {
1281
+ [p]: r,
1282
+ [f]: s
1283
+ }
1279
1284
  }
1280
1285
  };
1281
1286
  }
1282
1287
  };
1283
- }, Dr = function(e) {
1288
+ }, Mr = function(e) {
1284
1289
  return e === void 0 && (e = {}), {
1285
1290
  options: e,
1286
1291
  fn(t) {
@@ -1294,12 +1299,12 @@ const Sr = function(e) {
1294
1299
  offset: a = 0,
1295
1300
  mainAxis: c = !0,
1296
1301
  crossAxis: l = !0
1297
- } = J(e, t), u = {
1302
+ } = ee(e, t), u = {
1298
1303
  x: n,
1299
1304
  y: o
1300
- }, d = ne(i), p = nt(d);
1301
- let f = u[p], h = u[d];
1302
- const m = J(a, t), g = typeof m == "number" ? {
1305
+ }, f = re(i), p = ot(f);
1306
+ let d = u[p], h = u[f];
1307
+ const m = ee(a, t), g = typeof m == "number" ? {
1303
1308
  mainAxis: m,
1304
1309
  crossAxis: 0
1305
1310
  } : {
@@ -1308,53 +1313,54 @@ const Sr = function(e) {
1308
1313
  ...m
1309
1314
  };
1310
1315
  if (c) {
1311
- const x = p === "y" ? "height" : "width", b = r.reference[p] - r.floating[x] + g.mainAxis, $ = r.reference[p] + r.reference[x] - g.mainAxis;
1312
- f < b ? f = b : f > $ && (f = $);
1316
+ const x = p === "y" ? "height" : "width", w = r.reference[p] - r.floating[x] + g.mainAxis, v = r.reference[p] + r.reference[x] - g.mainAxis;
1317
+ d < w ? d = w : d > v && (d = v);
1313
1318
  }
1314
1319
  if (l) {
1315
- var v, y;
1316
- const x = p === "y" ? "width" : "height", b = ["top", "left"].includes(Q(i)), $ = r.reference[d] - r.floating[x] + (b && ((v = s.offset) == null ? void 0 : v[d]) || 0) + (b ? 0 : g.crossAxis), P = r.reference[d] + r.reference[x] + (b ? 0 : ((y = s.offset) == null ? void 0 : y[d]) || 0) - (b ? g.crossAxis : 0);
1317
- h < $ ? h = $ : h > P && (h = P);
1320
+ var y, b;
1321
+ const x = p === "y" ? "width" : "height", w = ["top", "left"].includes(te(i)), v = r.reference[f] - r.floating[x] + (w && ((y = s.offset) == null ? void 0 : y[f]) || 0) + (w ? 0 : g.crossAxis), A = r.reference[f] + r.reference[x] + (w ? 0 : ((b = s.offset) == null ? void 0 : b[f]) || 0) - (w ? g.crossAxis : 0);
1322
+ h < v ? h = v : h > A && (h = A);
1318
1323
  }
1319
1324
  return {
1320
- [p]: f,
1321
- [d]: h
1325
+ [p]: d,
1326
+ [f]: h
1322
1327
  };
1323
1328
  }
1324
1329
  };
1325
- }, Nr = function(e) {
1330
+ }, kr = function(e) {
1326
1331
  return e === void 0 && (e = {}), {
1327
1332
  name: "size",
1328
1333
  options: e,
1329
1334
  async fn(t) {
1335
+ var n, o;
1330
1336
  const {
1331
- placement: n,
1332
- rects: o,
1333
- platform: i,
1334
- elements: r
1337
+ placement: i,
1338
+ rects: r,
1339
+ platform: s,
1340
+ elements: a
1335
1341
  } = t, {
1336
- apply: s = () => {
1342
+ apply: c = () => {
1337
1343
  },
1338
- ...a
1339
- } = J(e, t), c = await _e(t, a), l = Q(n), u = ge(n), d = ne(n) === "y", {
1340
- width: p,
1341
- height: f
1342
- } = o.floating;
1343
- let h, m;
1344
- l === "top" || l === "bottom" ? (h = l, m = u === (await (i.isRTL == null ? void 0 : i.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (m = l, h = u === "end" ? "top" : "bottom");
1345
- const g = f - c.top - c.bottom, v = p - c.left - c.right, y = q(f - c[h], g), x = q(p - c[m], v), b = !t.middlewareData.shift;
1346
- let $ = y, P = x;
1347
- if (d ? P = u || b ? q(x, v) : v : $ = u || b ? q(y, g) : g, b && !u) {
1348
- const _ = W(c.left, 0), E = W(c.right, 0), T = W(c.top, 0), D = W(c.bottom, 0);
1349
- d ? P = p - 2 * (_ !== 0 || E !== 0 ? _ + E : W(c.left, c.right)) : $ = f - 2 * (T !== 0 || D !== 0 ? T + D : W(c.top, c.bottom));
1344
+ ...l
1345
+ } = ee(e, t), u = await Pe(t, l), f = te(i), p = me(i), d = re(i) === "y", {
1346
+ width: h,
1347
+ height: m
1348
+ } = r.floating;
1349
+ let g, y;
1350
+ f === "top" || f === "bottom" ? (g = f, y = p === (await (s.isRTL == null ? void 0 : s.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (y = f, g = p === "end" ? "top" : "bottom");
1351
+ const b = m - u.top - u.bottom, x = h - u.left - u.right, w = ne(m - u[g], b), v = ne(h - u[y], x), A = !t.middlewareData.shift;
1352
+ let P = w, $ = v;
1353
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && ($ = x), (o = t.middlewareData.shift) != null && o.enabled.y && (P = b), A && !p) {
1354
+ const T = W(u.left, 0), N = W(u.right, 0), M = W(u.top, 0), F = W(u.bottom, 0);
1355
+ d ? $ = h - 2 * (T !== 0 || N !== 0 ? T + N : W(u.left, u.right)) : P = m - 2 * (M !== 0 || F !== 0 ? M + F : W(u.top, u.bottom));
1350
1356
  }
1351
- await s({
1357
+ await c({
1352
1358
  ...t,
1353
- availableWidth: P,
1354
- availableHeight: $
1359
+ availableWidth: $,
1360
+ availableHeight: P
1355
1361
  });
1356
- const O = await i.getDimensions(r.floating);
1357
- return p !== O.width || f !== O.height ? {
1362
+ const E = await s.getDimensions(a.floating);
1363
+ return h !== E.width || m !== E.height ? {
1358
1364
  reset: {
1359
1365
  rects: !0
1360
1366
  }
@@ -1362,42 +1368,45 @@ const Sr = function(e) {
1362
1368
  }
1363
1369
  };
1364
1370
  };
1365
- function me(e) {
1371
+ function ze() {
1372
+ return typeof window < "u";
1373
+ }
1374
+ function ye(e) {
1366
1375
  return Xt(e) ? (e.nodeName || "").toLowerCase() : "#document";
1367
1376
  }
1368
- function V(e) {
1377
+ function U(e) {
1369
1378
  var t;
1370
1379
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
1371
1380
  }
1372
- function ee(e) {
1381
+ function J(e) {
1373
1382
  var t;
1374
1383
  return (t = (Xt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
1375
1384
  }
1376
1385
  function Xt(e) {
1377
- return e instanceof Node || e instanceof V(e).Node;
1386
+ return ze() ? e instanceof Node || e instanceof U(e).Node : !1;
1378
1387
  }
1379
1388
  function Y(e) {
1380
- return e instanceof Element || e instanceof V(e).Element;
1389
+ return ze() ? e instanceof Element || e instanceof U(e).Element : !1;
1381
1390
  }
1382
- function K(e) {
1383
- return e instanceof HTMLElement || e instanceof V(e).HTMLElement;
1391
+ function Z(e) {
1392
+ return ze() ? e instanceof HTMLElement || e instanceof U(e).HTMLElement : !1;
1384
1393
  }
1385
- function $t(e) {
1386
- return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof V(e).ShadowRoot;
1394
+ function Pt(e) {
1395
+ return !ze() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
1387
1396
  }
1388
- function Oe(e) {
1397
+ function Ce(e) {
1389
1398
  const {
1390
1399
  overflow: t,
1391
1400
  overflowX: n,
1392
1401
  overflowY: o,
1393
1402
  display: i
1394
- } = G(e);
1403
+ } = X(e);
1395
1404
  return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !["inline", "contents"].includes(i);
1396
1405
  }
1397
- function Lr(e) {
1398
- return ["table", "td", "th"].includes(me(e));
1406
+ function Ir(e) {
1407
+ return ["table", "td", "th"].includes(ye(e));
1399
1408
  }
1400
- function Be(e) {
1409
+ function je(e) {
1401
1410
  return [":popover-open", ":modal"].some((t) => {
1402
1411
  try {
1403
1412
  return e.matches(t);
@@ -1406,31 +1415,31 @@ function Be(e) {
1406
1415
  }
1407
1416
  });
1408
1417
  }
1409
- function it(e) {
1410
- const t = st(), n = Y(e) ? G(e) : e;
1411
- return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
1418
+ function at(e) {
1419
+ const t = ct(), n = Y(e) ? X(e) : e;
1420
+ return ["transform", "translate", "scale", "rotate", "perspective"].some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (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));
1412
1421
  }
1413
- function Mr(e) {
1414
- let t = re(e);
1415
- for (; K(t) && !fe(t); ) {
1416
- if (it(t))
1422
+ function Fr(e) {
1423
+ let t = oe(e);
1424
+ for (; Z(t) && !pe(t); ) {
1425
+ if (at(t))
1417
1426
  return t;
1418
- if (Be(t))
1427
+ if (je(t))
1419
1428
  return null;
1420
- t = re(t);
1429
+ t = oe(t);
1421
1430
  }
1422
1431
  return null;
1423
1432
  }
1424
- function st() {
1433
+ function ct() {
1425
1434
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
1426
1435
  }
1427
- function fe(e) {
1428
- return ["html", "body", "#document"].includes(me(e));
1436
+ function pe(e) {
1437
+ return ["html", "body", "#document"].includes(ye(e));
1429
1438
  }
1430
- function G(e) {
1431
- return V(e).getComputedStyle(e);
1439
+ function X(e) {
1440
+ return U(e).getComputedStyle(e);
1432
1441
  }
1433
- function ze(e) {
1442
+ function We(e) {
1434
1443
  return Y(e) ? {
1435
1444
  scrollLeft: e.scrollLeft,
1436
1445
  scrollTop: e.scrollTop
@@ -1439,145 +1448,158 @@ function ze(e) {
1439
1448
  scrollTop: e.scrollY
1440
1449
  };
1441
1450
  }
1442
- function re(e) {
1443
- if (me(e) === "html")
1451
+ function oe(e) {
1452
+ if (ye(e) === "html")
1444
1453
  return e;
1445
1454
  const t = (
1446
1455
  // Step into the shadow DOM of the parent of a slotted node.
1447
1456
  e.assignedSlot || // DOM Element detected.
1448
1457
  e.parentNode || // ShadowRoot detected.
1449
- $t(e) && e.host || // Fallback.
1450
- ee(e)
1458
+ Pt(e) && e.host || // Fallback.
1459
+ J(e)
1451
1460
  );
1452
- return $t(t) ? t.host : t;
1461
+ return Pt(t) ? t.host : t;
1453
1462
  }
1454
- function Yt(e) {
1455
- const t = re(e);
1456
- return fe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : K(t) && Oe(t) ? t : Yt(t);
1463
+ function Gt(e) {
1464
+ const t = oe(e);
1465
+ return pe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Z(t) && Ce(t) ? t : Gt(t);
1457
1466
  }
1458
- function Pe(e, t, n) {
1467
+ function Ae(e, t, n) {
1459
1468
  var o;
1460
1469
  t === void 0 && (t = []), n === void 0 && (n = !0);
1461
- const i = Yt(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), s = V(i);
1470
+ const i = Gt(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), s = U(i);
1462
1471
  if (r) {
1463
- const a = Qe(s);
1464
- return t.concat(s, s.visualViewport || [], Oe(i) ? i : [], a && n ? Pe(a) : []);
1472
+ const a = tt(s);
1473
+ return t.concat(s, s.visualViewport || [], Ce(i) ? i : [], a && n ? Ae(a) : []);
1465
1474
  }
1466
- return t.concat(i, Pe(i, [], n));
1475
+ return t.concat(i, Ae(i, [], n));
1467
1476
  }
1468
- function Qe(e) {
1477
+ function tt(e) {
1469
1478
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
1470
1479
  }
1471
- function Gt(e) {
1472
- const t = G(e);
1480
+ function Kt(e) {
1481
+ const t = X(e);
1473
1482
  let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
1474
- const i = K(e), r = i ? e.offsetWidth : n, s = i ? e.offsetHeight : o, a = ke(n) !== r || ke(o) !== s;
1483
+ const i = Z(e), r = i ? e.offsetWidth : n, s = i ? e.offsetHeight : o, a = Ie(n) !== r || Ie(o) !== s;
1475
1484
  return a && (n = r, o = s), {
1476
1485
  width: n,
1477
1486
  height: o,
1478
1487
  $: a
1479
1488
  };
1480
1489
  }
1481
- function at(e) {
1490
+ function lt(e) {
1482
1491
  return Y(e) ? e : e.contextElement;
1483
1492
  }
1484
- function ue(e) {
1485
- const t = at(e);
1486
- if (!K(t))
1487
- return te(1);
1493
+ function fe(e) {
1494
+ const t = lt(e);
1495
+ if (!Z(t))
1496
+ return K(1);
1488
1497
  const n = t.getBoundingClientRect(), {
1489
1498
  width: o,
1490
1499
  height: i,
1491
1500
  $: r
1492
- } = Gt(t);
1493
- let s = (r ? ke(n.width) : n.width) / o, a = (r ? ke(n.height) : n.height) / i;
1501
+ } = Kt(t);
1502
+ let s = (r ? Ie(n.width) : n.width) / o, a = (r ? Ie(n.height) : n.height) / i;
1494
1503
  return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
1495
1504
  x: s,
1496
1505
  y: a
1497
1506
  };
1498
1507
  }
1499
- const kr = /* @__PURE__ */ te(0);
1500
- function qt(e) {
1501
- const t = V(e);
1502
- return !st() || !t.visualViewport ? kr : {
1508
+ const Hr = /* @__PURE__ */ K(0);
1509
+ function Zt(e) {
1510
+ const t = U(e);
1511
+ return !ct() || !t.visualViewport ? Hr : {
1503
1512
  x: t.visualViewport.offsetLeft,
1504
1513
  y: t.visualViewport.offsetTop
1505
1514
  };
1506
1515
  }
1507
- function Ir(e, t, n) {
1508
- return t === void 0 && (t = !1), !n || t && n !== V(e) ? !1 : t;
1516
+ function Br(e, t, n) {
1517
+ return t === void 0 && (t = !1), !n || t && n !== U(e) ? !1 : t;
1509
1518
  }
1510
- function se(e, t, n, o) {
1519
+ function ae(e, t, n, o) {
1511
1520
  t === void 0 && (t = !1), n === void 0 && (n = !1);
1512
- const i = e.getBoundingClientRect(), r = at(e);
1513
- let s = te(1);
1514
- t && (o ? Y(o) && (s = ue(o)) : s = ue(e));
1515
- const a = Ir(r, n, o) ? qt(r) : te(0);
1516
- let c = (i.left + a.x) / s.x, l = (i.top + a.y) / s.y, u = i.width / s.x, d = i.height / s.y;
1521
+ const i = e.getBoundingClientRect(), r = lt(e);
1522
+ let s = K(1);
1523
+ t && (o ? Y(o) && (s = fe(o)) : s = fe(e));
1524
+ const a = Br(r, n, o) ? Zt(r) : K(0);
1525
+ let c = (i.left + a.x) / s.x, l = (i.top + a.y) / s.y, u = i.width / s.x, f = i.height / s.y;
1517
1526
  if (r) {
1518
- const p = V(r), f = o && Y(o) ? V(o) : o;
1519
- let h = p, m = Qe(h);
1520
- for (; m && o && f !== h; ) {
1521
- const g = ue(m), v = m.getBoundingClientRect(), y = G(m), x = v.left + (m.clientLeft + parseFloat(y.paddingLeft)) * g.x, b = v.top + (m.clientTop + parseFloat(y.paddingTop)) * g.y;
1522
- c *= g.x, l *= g.y, u *= g.x, d *= g.y, c += x, l += b, h = V(m), m = Qe(h);
1527
+ const p = U(r), d = o && Y(o) ? U(o) : o;
1528
+ let h = p, m = tt(h);
1529
+ for (; m && o && d !== h; ) {
1530
+ const g = fe(m), y = m.getBoundingClientRect(), b = X(m), x = y.left + (m.clientLeft + parseFloat(b.paddingLeft)) * g.x, w = y.top + (m.clientTop + parseFloat(b.paddingTop)) * g.y;
1531
+ c *= g.x, l *= g.y, u *= g.x, f *= g.y, c += x, l += w, h = U(m), m = tt(h);
1523
1532
  }
1524
1533
  }
1525
- return Fe({
1534
+ return He({
1526
1535
  width: u,
1527
- height: d,
1536
+ height: f,
1528
1537
  x: c,
1529
1538
  y: l
1530
1539
  });
1531
1540
  }
1532
- function Fr(e) {
1541
+ function ut(e, t) {
1542
+ const n = We(e).scrollLeft;
1543
+ return t ? t.left + n : ae(J(e)).left + n;
1544
+ }
1545
+ function Jt(e, t, n) {
1546
+ n === void 0 && (n = !1);
1547
+ const o = e.getBoundingClientRect(), i = o.left + t.scrollLeft - (n ? 0 : (
1548
+ // RTL <body> scrollbar.
1549
+ ut(e, o)
1550
+ )), r = o.top + t.scrollTop;
1551
+ return {
1552
+ x: i,
1553
+ y: r
1554
+ };
1555
+ }
1556
+ function zr(e) {
1533
1557
  let {
1534
1558
  elements: t,
1535
1559
  rect: n,
1536
1560
  offsetParent: o,
1537
1561
  strategy: i
1538
1562
  } = e;
1539
- const r = i === "fixed", s = ee(o), a = t ? Be(t.floating) : !1;
1563
+ const r = i === "fixed", s = J(o), a = t ? je(t.floating) : !1;
1540
1564
  if (o === s || a && r)
1541
1565
  return n;
1542
1566
  let c = {
1543
1567
  scrollLeft: 0,
1544
1568
  scrollTop: 0
1545
- }, l = te(1);
1546
- const u = te(0), d = K(o);
1547
- if ((d || !d && !r) && ((me(o) !== "body" || Oe(s)) && (c = ze(o)), K(o))) {
1548
- const p = se(o);
1549
- l = ue(o), u.x = p.x + o.clientLeft, u.y = p.y + o.clientTop;
1569
+ }, l = K(1);
1570
+ const u = K(0), f = Z(o);
1571
+ if ((f || !f && !r) && ((ye(o) !== "body" || Ce(s)) && (c = We(o)), Z(o))) {
1572
+ const d = ae(o);
1573
+ l = fe(o), u.x = d.x + o.clientLeft, u.y = d.y + o.clientTop;
1550
1574
  }
1575
+ const p = s && !f && !r ? Jt(s, c, !0) : K(0);
1551
1576
  return {
1552
1577
  width: n.width * l.x,
1553
1578
  height: n.height * l.y,
1554
- x: n.x * l.x - c.scrollLeft * l.x + u.x,
1555
- y: n.y * l.y - c.scrollTop * l.y + u.y
1579
+ x: n.x * l.x - c.scrollLeft * l.x + u.x + p.x,
1580
+ y: n.y * l.y - c.scrollTop * l.y + u.y + p.y
1556
1581
  };
1557
1582
  }
1558
- function Hr(e) {
1583
+ function jr(e) {
1559
1584
  return Array.from(e.getClientRects());
1560
1585
  }
1561
- function Kt(e) {
1562
- return se(ee(e)).left + ze(e).scrollLeft;
1563
- }
1564
- function Br(e) {
1565
- const t = ee(e), n = ze(e), o = e.ownerDocument.body, i = W(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = W(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
1566
- let s = -n.scrollLeft + Kt(e);
1586
+ function Wr(e) {
1587
+ const t = J(e), n = We(e), o = e.ownerDocument.body, i = W(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = W(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
1588
+ let s = -n.scrollLeft + ut(e);
1567
1589
  const a = -n.scrollTop;
1568
- return G(o).direction === "rtl" && (s += W(t.clientWidth, o.clientWidth) - i), {
1590
+ return X(o).direction === "rtl" && (s += W(t.clientWidth, o.clientWidth) - i), {
1569
1591
  width: i,
1570
1592
  height: r,
1571
1593
  x: s,
1572
1594
  y: a
1573
1595
  };
1574
1596
  }
1575
- function zr(e, t) {
1576
- const n = V(e), o = ee(e), i = n.visualViewport;
1597
+ function qr(e, t) {
1598
+ const n = U(e), o = J(e), i = n.visualViewport;
1577
1599
  let r = o.clientWidth, s = o.clientHeight, a = 0, c = 0;
1578
1600
  if (i) {
1579
1601
  r = i.width, s = i.height;
1580
- const l = st();
1602
+ const l = ct();
1581
1603
  (!l || l && t === "fixed") && (a = i.offsetLeft, c = i.offsetTop);
1582
1604
  }
1583
1605
  return {
@@ -1587,8 +1609,8 @@ function zr(e, t) {
1587
1609
  y: c
1588
1610
  };
1589
1611
  }
1590
- function jr(e, t) {
1591
- const n = se(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, r = K(e) ? ue(e) : te(1), s = e.clientWidth * r.x, a = e.clientHeight * r.y, c = i * r.x, l = o * r.y;
1612
+ function Ur(e, t) {
1613
+ const n = ae(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, r = Z(e) ? fe(e) : K(1), s = e.clientWidth * r.x, a = e.clientHeight * r.y, c = i * r.x, l = o * r.y;
1592
1614
  return {
1593
1615
  width: s,
1594
1616
  height: a,
@@ -1596,52 +1618,53 @@ function jr(e, t) {
1596
1618
  y: l
1597
1619
  };
1598
1620
  }
1599
- function wt(e, t, n) {
1621
+ function At(e, t, n) {
1600
1622
  let o;
1601
1623
  if (t === "viewport")
1602
- o = zr(e, n);
1624
+ o = qr(e, n);
1603
1625
  else if (t === "document")
1604
- o = Br(ee(e));
1626
+ o = Wr(J(e));
1605
1627
  else if (Y(t))
1606
- o = jr(t, n);
1628
+ o = Ur(t, n);
1607
1629
  else {
1608
- const i = qt(e);
1630
+ const i = Zt(e);
1609
1631
  o = {
1610
- ...t,
1611
1632
  x: t.x - i.x,
1612
- y: t.y - i.y
1633
+ y: t.y - i.y,
1634
+ width: t.width,
1635
+ height: t.height
1613
1636
  };
1614
1637
  }
1615
- return Fe(o);
1638
+ return He(o);
1616
1639
  }
1617
- function Zt(e, t) {
1618
- const n = re(e);
1619
- return n === t || !Y(n) || fe(n) ? !1 : G(n).position === "fixed" || Zt(n, t);
1640
+ function Qt(e, t) {
1641
+ const n = oe(e);
1642
+ return n === t || !Y(n) || pe(n) ? !1 : X(n).position === "fixed" || Qt(n, t);
1620
1643
  }
1621
- function Wr(e, t) {
1644
+ function Vr(e, t) {
1622
1645
  const n = t.get(e);
1623
1646
  if (n)
1624
1647
  return n;
1625
- let o = Pe(e, [], !1).filter((a) => Y(a) && me(a) !== "body"), i = null;
1626
- const r = G(e).position === "fixed";
1627
- let s = r ? re(e) : e;
1628
- for (; Y(s) && !fe(s); ) {
1629
- const a = G(s), c = it(s);
1630
- !c && a.position === "fixed" && (i = null), (r ? !c && !i : !c && a.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Oe(s) && !c && Zt(e, s)) ? o = o.filter((u) => u !== s) : i = a, s = re(s);
1648
+ let o = Ae(e, [], !1).filter((a) => Y(a) && ye(a) !== "body"), i = null;
1649
+ const r = X(e).position === "fixed";
1650
+ let s = r ? oe(e) : e;
1651
+ for (; Y(s) && !pe(s); ) {
1652
+ const a = X(s), c = at(s);
1653
+ !c && a.position === "fixed" && (i = null), (r ? !c && !i : !c && a.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Ce(s) && !c && Qt(e, s)) ? o = o.filter((u) => u !== s) : i = a, s = oe(s);
1631
1654
  }
1632
1655
  return t.set(e, o), o;
1633
1656
  }
1634
- function Ur(e) {
1657
+ function Yr(e) {
1635
1658
  let {
1636
1659
  element: t,
1637
1660
  boundary: n,
1638
1661
  rootBoundary: o,
1639
1662
  strategy: i
1640
1663
  } = e;
1641
- const s = [...n === "clippingAncestors" ? Be(t) ? [] : Wr(t, this._c) : [].concat(n), o], a = s[0], c = s.reduce((l, u) => {
1642
- const d = wt(t, u, i);
1643
- return l.top = W(d.top, l.top), l.right = q(d.right, l.right), l.bottom = q(d.bottom, l.bottom), l.left = W(d.left, l.left), l;
1644
- }, wt(t, a, i));
1664
+ const s = [...n === "clippingAncestors" ? je(t) ? [] : Vr(t, this._c) : [].concat(n), o], a = s[0], c = s.reduce((l, u) => {
1665
+ const f = At(t, u, i);
1666
+ return l.top = W(f.top, l.top), l.right = ne(f.right, l.right), l.bottom = ne(f.bottom, l.bottom), l.left = W(f.left, l.left), l;
1667
+ }, At(t, a, i));
1645
1668
  return {
1646
1669
  width: c.right - c.left,
1647
1670
  height: c.bottom - c.top,
@@ -1649,64 +1672,69 @@ function Ur(e) {
1649
1672
  y: c.top
1650
1673
  };
1651
1674
  }
1652
- function Vr(e) {
1675
+ function Xr(e) {
1653
1676
  const {
1654
1677
  width: t,
1655
1678
  height: n
1656
- } = Gt(e);
1679
+ } = Kt(e);
1657
1680
  return {
1658
1681
  width: t,
1659
1682
  height: n
1660
1683
  };
1661
1684
  }
1662
- function Xr(e, t, n) {
1663
- const o = K(t), i = ee(t), r = n === "fixed", s = se(e, !0, r, t);
1685
+ function Gr(e, t, n) {
1686
+ const o = Z(t), i = J(t), r = n === "fixed", s = ae(e, !0, r, t);
1664
1687
  let a = {
1665
1688
  scrollLeft: 0,
1666
1689
  scrollTop: 0
1667
1690
  };
1668
- const c = te(0);
1691
+ const c = K(0);
1669
1692
  if (o || !o && !r)
1670
- if ((me(t) !== "body" || Oe(i)) && (a = ze(t)), o) {
1671
- const d = se(t, !0, r, t);
1672
- c.x = d.x + t.clientLeft, c.y = d.y + t.clientTop;
1673
- } else i && (c.x = Kt(i));
1674
- const l = s.left + a.scrollLeft - c.x, u = s.top + a.scrollTop - c.y;
1693
+ if ((ye(t) !== "body" || Ce(i)) && (a = We(t)), o) {
1694
+ const p = ae(t, !0, r, t);
1695
+ c.x = p.x + t.clientLeft, c.y = p.y + t.clientTop;
1696
+ } else i && (c.x = ut(i));
1697
+ const l = i && !o && !r ? Jt(i, a) : K(0), u = s.left + a.scrollLeft - c.x - l.x, f = s.top + a.scrollTop - c.y - l.y;
1675
1698
  return {
1676
- x: l,
1677
- y: u,
1699
+ x: u,
1700
+ y: f,
1678
1701
  width: s.width,
1679
1702
  height: s.height
1680
1703
  };
1681
1704
  }
1682
1705
  function Ve(e) {
1683
- return G(e).position === "static";
1684
- }
1685
- function _t(e, t) {
1686
- return !K(e) || G(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
1706
+ return X(e).position === "static";
1687
1707
  }
1688
- function Jt(e, t) {
1689
- const n = V(e);
1690
- if (Be(e))
1708
+ function Ot(e, t) {
1709
+ if (!Z(e) || X(e).position === "fixed")
1710
+ return null;
1711
+ if (t)
1712
+ return t(e);
1713
+ let n = e.offsetParent;
1714
+ return J(e) === n && (n = n.ownerDocument.body), n;
1715
+ }
1716
+ function en(e, t) {
1717
+ const n = U(e);
1718
+ if (je(e))
1691
1719
  return n;
1692
- if (!K(e)) {
1693
- let i = re(e);
1694
- for (; i && !fe(i); ) {
1720
+ if (!Z(e)) {
1721
+ let i = oe(e);
1722
+ for (; i && !pe(i); ) {
1695
1723
  if (Y(i) && !Ve(i))
1696
1724
  return i;
1697
- i = re(i);
1725
+ i = oe(i);
1698
1726
  }
1699
1727
  return n;
1700
1728
  }
1701
- let o = _t(e, t);
1702
- for (; o && Lr(o) && Ve(o); )
1703
- o = _t(o, t);
1704
- return o && fe(o) && Ve(o) && !it(o) ? n : o || Mr(e) || n;
1729
+ let o = Ot(e, t);
1730
+ for (; o && Ir(o) && Ve(o); )
1731
+ o = Ot(o, t);
1732
+ return o && pe(o) && Ve(o) && !at(o) ? n : o || Fr(e) || n;
1705
1733
  }
1706
- const Yr = async function(e) {
1707
- const t = this.getOffsetParent || Jt, n = this.getDimensions, o = await n(e.floating);
1734
+ const Kr = async function(e) {
1735
+ const t = this.getOffsetParent || en, n = this.getDimensions, o = await n(e.floating);
1708
1736
  return {
1709
- reference: Xr(e.reference, await t(e.floating), e.strategy),
1737
+ reference: Gr(e.reference, await t(e.floating), e.strategy),
1710
1738
  floating: {
1711
1739
  x: 0,
1712
1740
  y: 0,
@@ -1715,68 +1743,71 @@ const Yr = async function(e) {
1715
1743
  }
1716
1744
  };
1717
1745
  };
1718
- function Gr(e) {
1719
- return G(e).direction === "rtl";
1720
- }
1721
- const qr = {
1722
- convertOffsetParentRelativeRectToViewportRelativeRect: Fr,
1723
- getDocumentElement: ee,
1724
- getClippingRect: Ur,
1725
- getOffsetParent: Jt,
1726
- getElementRects: Yr,
1727
- getClientRects: Hr,
1728
- getDimensions: Vr,
1729
- getScale: ue,
1746
+ function Zr(e) {
1747
+ return X(e).direction === "rtl";
1748
+ }
1749
+ const Jr = {
1750
+ convertOffsetParentRelativeRectToViewportRelativeRect: zr,
1751
+ getDocumentElement: J,
1752
+ getClippingRect: Yr,
1753
+ getOffsetParent: en,
1754
+ getElementRects: Kr,
1755
+ getClientRects: jr,
1756
+ getDimensions: Xr,
1757
+ getScale: fe,
1730
1758
  isElement: Y,
1731
- isRTL: Gr
1759
+ isRTL: Zr
1732
1760
  };
1733
- function Kr(e, t) {
1761
+ function tn(e, t) {
1762
+ return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1763
+ }
1764
+ function Qr(e, t) {
1734
1765
  let n = null, o;
1735
- const i = ee(e);
1766
+ const i = J(e);
1736
1767
  function r() {
1737
1768
  var a;
1738
1769
  clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
1739
1770
  }
1740
1771
  function s(a, c) {
1741
1772
  a === void 0 && (a = !1), c === void 0 && (c = 1), r();
1742
- const {
1743
- left: l,
1744
- top: u,
1745
- width: d,
1746
- height: p
1747
- } = e.getBoundingClientRect();
1748
- if (a || t(), !d || !p)
1773
+ const l = e.getBoundingClientRect(), {
1774
+ left: u,
1775
+ top: f,
1776
+ width: p,
1777
+ height: d
1778
+ } = l;
1779
+ if (a || t(), !p || !d)
1749
1780
  return;
1750
- const f = De(u), h = De(i.clientWidth - (l + d)), m = De(i.clientHeight - (u + p)), g = De(l), y = {
1751
- rootMargin: -f + "px " + -h + "px " + -m + "px " + -g + "px",
1752
- threshold: W(0, q(1, c)) || 1
1781
+ const h = Ne(f), m = Ne(i.clientWidth - (u + p)), g = Ne(i.clientHeight - (f + d)), y = Ne(u), x = {
1782
+ rootMargin: -h + "px " + -m + "px " + -g + "px " + -y + "px",
1783
+ threshold: W(0, ne(1, c)) || 1
1753
1784
  };
1754
- let x = !0;
1755
- function b($) {
1756
- const P = $[0].intersectionRatio;
1785
+ let w = !0;
1786
+ function v(A) {
1787
+ const P = A[0].intersectionRatio;
1757
1788
  if (P !== c) {
1758
- if (!x)
1789
+ if (!w)
1759
1790
  return s();
1760
1791
  P ? s(!1, P) : o = setTimeout(() => {
1761
1792
  s(!1, 1e-7);
1762
1793
  }, 1e3);
1763
1794
  }
1764
- x = !1;
1795
+ P === 1 && !tn(l, e.getBoundingClientRect()) && s(), w = !1;
1765
1796
  }
1766
1797
  try {
1767
- n = new IntersectionObserver(b, {
1768
- ...y,
1798
+ n = new IntersectionObserver(v, {
1799
+ ...x,
1769
1800
  // Handle <iframe>s
1770
1801
  root: i.ownerDocument
1771
1802
  });
1772
1803
  } catch {
1773
- n = new IntersectionObserver(b, y);
1804
+ n = new IntersectionObserver(v, x);
1774
1805
  }
1775
1806
  n.observe(e);
1776
1807
  }
1777
1808
  return s(!0), r;
1778
1809
  }
1779
- function Zr(e, t, n, o) {
1810
+ function eo(e, t, n, o) {
1780
1811
  o === void 0 && (o = {});
1781
1812
  const {
1782
1813
  ancestorScroll: i = !0,
@@ -1784,49 +1815,49 @@ function Zr(e, t, n, o) {
1784
1815
  elementResize: s = typeof ResizeObserver == "function",
1785
1816
  layoutShift: a = typeof IntersectionObserver == "function",
1786
1817
  animationFrame: c = !1
1787
- } = o, l = at(e), u = i || r ? [...l ? Pe(l) : [], ...Pe(t)] : [];
1788
- u.forEach((v) => {
1789
- i && v.addEventListener("scroll", n, {
1818
+ } = o, l = lt(e), u = i || r ? [...l ? Ae(l) : [], ...Ae(t)] : [];
1819
+ u.forEach((y) => {
1820
+ i && y.addEventListener("scroll", n, {
1790
1821
  passive: !0
1791
- }), r && v.addEventListener("resize", n);
1822
+ }), r && y.addEventListener("resize", n);
1792
1823
  });
1793
- const d = l && a ? Kr(l, n) : null;
1794
- let p = -1, f = null;
1795
- s && (f = new ResizeObserver((v) => {
1796
- let [y] = v;
1797
- y && y.target === l && f && (f.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1824
+ const f = l && a ? Qr(l, n) : null;
1825
+ let p = -1, d = null;
1826
+ s && (d = new ResizeObserver((y) => {
1827
+ let [b] = y;
1828
+ b && b.target === l && d && (d.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1798
1829
  var x;
1799
- (x = f) == null || x.observe(t);
1830
+ (x = d) == null || x.observe(t);
1800
1831
  })), n();
1801
- }), l && !c && f.observe(l), f.observe(t));
1802
- let h, m = c ? se(e) : null;
1832
+ }), l && !c && d.observe(l), d.observe(t));
1833
+ let h, m = c ? ae(e) : null;
1803
1834
  c && g();
1804
1835
  function g() {
1805
- const v = se(e);
1806
- m && (v.x !== m.x || v.y !== m.y || v.width !== m.width || v.height !== m.height) && n(), m = v, h = requestAnimationFrame(g);
1836
+ const y = ae(e);
1837
+ m && !tn(m, y) && n(), m = y, h = requestAnimationFrame(g);
1807
1838
  }
1808
1839
  return n(), () => {
1809
- var v;
1810
- u.forEach((y) => {
1811
- i && y.removeEventListener("scroll", n), r && y.removeEventListener("resize", n);
1812
- }), d == null || d(), (v = f) == null || v.disconnect(), f = null, c && cancelAnimationFrame(h);
1840
+ var y;
1841
+ u.forEach((b) => {
1842
+ i && b.removeEventListener("scroll", n), r && b.removeEventListener("resize", n);
1843
+ }), f == null || f(), (y = d) == null || y.disconnect(), d = null, c && cancelAnimationFrame(h);
1813
1844
  };
1814
1845
  }
1815
- const Jr = Sr, Qr = Rr, eo = Cr, to = Nr, no = Er, Pt = Or, ro = Dr, oo = (e, t, n) => {
1846
+ const to = Nr, no = Lr, ro = Rr, oo = kr, io = Sr, Ct = Tr, so = Mr, ao = (e, t, n) => {
1816
1847
  const o = /* @__PURE__ */ new Map(), i = {
1817
- platform: qr,
1848
+ platform: Jr,
1818
1849
  ...n
1819
1850
  }, r = {
1820
1851
  ...i.platform,
1821
1852
  _c: o
1822
1853
  };
1823
- return Ar(e, t, {
1854
+ return Er(e, t, {
1824
1855
  ...i,
1825
1856
  platform: r
1826
1857
  });
1827
1858
  };
1828
- var Le = typeof document < "u" ? Tt : S;
1829
- function He(e, t) {
1859
+ var Me = typeof document < "u" ? St : S;
1860
+ function Be(e, t) {
1830
1861
  if (e === t)
1831
1862
  return !0;
1832
1863
  if (typeof e != typeof t)
@@ -1838,7 +1869,7 @@ function He(e, t) {
1838
1869
  if (Array.isArray(e)) {
1839
1870
  if (n = e.length, n !== t.length) return !1;
1840
1871
  for (o = n; o-- !== 0; )
1841
- if (!He(e[o], t[o]))
1872
+ if (!Be(e[o], t[o]))
1842
1873
  return !1;
1843
1874
  return !0;
1844
1875
  }
@@ -1849,27 +1880,27 @@ function He(e, t) {
1849
1880
  return !1;
1850
1881
  for (o = n; o-- !== 0; ) {
1851
1882
  const r = i[o];
1852
- if (!(r === "_owner" && e.$$typeof) && !He(e[r], t[r]))
1883
+ if (!(r === "_owner" && e.$$typeof) && !Be(e[r], t[r]))
1853
1884
  return !1;
1854
1885
  }
1855
1886
  return !0;
1856
1887
  }
1857
1888
  return e !== e && t !== t;
1858
1889
  }
1859
- function Qt(e) {
1890
+ function nn(e) {
1860
1891
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1861
1892
  }
1862
- function At(e, t) {
1863
- const n = Qt(e);
1893
+ function Et(e, t) {
1894
+ const n = nn(e);
1864
1895
  return Math.round(t * n) / n;
1865
1896
  }
1866
- function Ot(e) {
1897
+ function Ye(e) {
1867
1898
  const t = L.useRef(e);
1868
- return Le(() => {
1899
+ return Me(() => {
1869
1900
  t.current = e;
1870
1901
  }), t;
1871
1902
  }
1872
- function io(e) {
1903
+ function co(e) {
1873
1904
  e === void 0 && (e = {});
1874
1905
  const {
1875
1906
  placement: t = "bottom",
@@ -1883,91 +1914,95 @@ function io(e) {
1883
1914
  transform: a = !0,
1884
1915
  whileElementsMounted: c,
1885
1916
  open: l
1886
- } = e, [u, d] = L.useState({
1917
+ } = e, [u, f] = L.useState({
1887
1918
  x: 0,
1888
1919
  y: 0,
1889
1920
  strategy: n,
1890
1921
  placement: t,
1891
1922
  middlewareData: {},
1892
1923
  isPositioned: !1
1893
- }), [p, f] = L.useState(o);
1894
- He(p, o) || f(o);
1895
- const [h, m] = L.useState(null), [g, v] = L.useState(null), y = L.useCallback((A) => {
1896
- A !== P.current && (P.current = A, m(A));
1897
- }, []), x = L.useCallback((A) => {
1898
- A !== O.current && (O.current = A, v(A));
1899
- }, []), b = r || h, $ = s || g, P = L.useRef(null), O = L.useRef(null), _ = L.useRef(u), E = c != null, T = Ot(c), D = Ot(i), M = L.useCallback(() => {
1900
- if (!P.current || !O.current)
1924
+ }), [p, d] = L.useState(o);
1925
+ Be(p, o) || d(o);
1926
+ const [h, m] = L.useState(null), [g, y] = L.useState(null), b = L.useCallback((C) => {
1927
+ C !== A.current && (A.current = C, m(C));
1928
+ }, []), x = L.useCallback((C) => {
1929
+ C !== P.current && (P.current = C, y(C));
1930
+ }, []), w = r || h, v = s || g, A = L.useRef(null), P = L.useRef(null), $ = L.useRef(u), E = c != null, T = Ye(c), N = Ye(i), M = Ye(l), F = L.useCallback(() => {
1931
+ if (!A.current || !P.current)
1901
1932
  return;
1902
- const A = {
1933
+ const C = {
1903
1934
  placement: t,
1904
1935
  strategy: n,
1905
1936
  middleware: p
1906
1937
  };
1907
- D.current && (A.platform = D.current), oo(P.current, O.current, A).then((B) => {
1908
- const N = {
1909
- ...B,
1910
- isPositioned: !0
1938
+ N.current && (C.platform = N.current), ao(A.current, P.current, C).then((H) => {
1939
+ const G = {
1940
+ ...H,
1941
+ // The floating element's position may be recomputed while it's closed
1942
+ // but still mounted (such as when transitioning out). To ensure
1943
+ // `isPositioned` will be `false` initially on the next open, avoid
1944
+ // setting it to `true` when `open === false` (must be specified).
1945
+ isPositioned: M.current !== !1
1911
1946
  };
1912
- X.current && !He(_.current, N) && (_.current = N, Pn.flushSync(() => {
1913
- d(N);
1947
+ O.current && !Be($.current, G) && ($.current = G, Cn.flushSync(() => {
1948
+ f(G);
1914
1949
  }));
1915
1950
  });
1916
- }, [p, t, n, D]);
1917
- Le(() => {
1918
- l === !1 && _.current.isPositioned && (_.current.isPositioned = !1, d((A) => ({
1919
- ...A,
1951
+ }, [p, t, n, N, M]);
1952
+ Me(() => {
1953
+ l === !1 && $.current.isPositioned && ($.current.isPositioned = !1, f((C) => ({
1954
+ ...C,
1920
1955
  isPositioned: !1
1921
1956
  })));
1922
1957
  }, [l]);
1923
- const X = L.useRef(!1);
1924
- Le(() => (X.current = !0, () => {
1925
- X.current = !1;
1926
- }), []), Le(() => {
1927
- if (b && (P.current = b), $ && (O.current = $), b && $) {
1958
+ const O = L.useRef(!1);
1959
+ Me(() => (O.current = !0, () => {
1960
+ O.current = !1;
1961
+ }), []), Me(() => {
1962
+ if (w && (A.current = w), v && (P.current = v), w && v) {
1928
1963
  if (T.current)
1929
- return T.current(b, $, M);
1930
- M();
1964
+ return T.current(w, v, F);
1965
+ F();
1931
1966
  }
1932
- }, [b, $, M, T, E]);
1933
- const C = L.useMemo(() => ({
1934
- reference: P,
1935
- floating: O,
1936
- setReference: y,
1967
+ }, [w, v, F, T, E]);
1968
+ const V = L.useMemo(() => ({
1969
+ reference: A,
1970
+ floating: P,
1971
+ setReference: b,
1937
1972
  setFloating: x
1938
- }), [y, x]), F = L.useMemo(() => ({
1939
- reference: b,
1940
- floating: $
1941
- }), [b, $]), H = L.useMemo(() => {
1942
- const A = {
1973
+ }), [b, x]), R = L.useMemo(() => ({
1974
+ reference: w,
1975
+ floating: v
1976
+ }), [w, v]), B = L.useMemo(() => {
1977
+ const C = {
1943
1978
  position: n,
1944
1979
  left: 0,
1945
1980
  top: 0
1946
1981
  };
1947
- if (!F.floating)
1948
- return A;
1949
- const B = At(F.floating, u.x), N = At(F.floating, u.y);
1982
+ if (!R.floating)
1983
+ return C;
1984
+ const H = Et(R.floating, u.x), G = Et(R.floating, u.y);
1950
1985
  return a ? {
1951
- ...A,
1952
- transform: "translate(" + B + "px, " + N + "px)",
1953
- ...Qt(F.floating) >= 1.5 && {
1986
+ ...C,
1987
+ transform: "translate(" + H + "px, " + G + "px)",
1988
+ ...nn(R.floating) >= 1.5 && {
1954
1989
  willChange: "transform"
1955
1990
  }
1956
1991
  } : {
1957
1992
  position: n,
1958
- left: B,
1959
- top: N
1993
+ left: H,
1994
+ top: G
1960
1995
  };
1961
- }, [n, a, F.floating, u.x, u.y]);
1996
+ }, [n, a, R.floating, u.x, u.y]);
1962
1997
  return L.useMemo(() => ({
1963
1998
  ...u,
1964
- update: M,
1965
- refs: C,
1966
- elements: F,
1967
- floatingStyles: H
1968
- }), [u, M, C, F, H]);
1999
+ update: F,
2000
+ refs: V,
2001
+ elements: R,
2002
+ floatingStyles: B
2003
+ }), [u, F, V, R, B]);
1969
2004
  }
1970
- const so = (e) => {
2005
+ const lo = (e) => {
1971
2006
  function t(n) {
1972
2007
  return {}.hasOwnProperty.call(n, "current");
1973
2008
  }
@@ -1979,50 +2014,50 @@ const so = (e) => {
1979
2014
  element: o,
1980
2015
  padding: i
1981
2016
  } = typeof e == "function" ? e(n) : e;
1982
- return o && t(o) ? o.current != null ? Pt({
2017
+ return o && t(o) ? o.current != null ? Ct({
1983
2018
  element: o.current,
1984
2019
  padding: i
1985
- }).fn(n) : {} : o ? Pt({
2020
+ }).fn(n) : {} : o ? Ct({
1986
2021
  element: o,
1987
2022
  padding: i
1988
2023
  }).fn(n) : {};
1989
2024
  }
1990
2025
  };
1991
- }, ao = (e, t) => ({
1992
- ...Jr(e),
1993
- options: [e, t]
1994
- }), co = (e, t) => ({
1995
- ...Qr(e),
1996
- options: [e, t]
1997
- }), lo = (e, t) => ({
1998
- ...ro(e),
1999
- options: [e, t]
2000
- }), uo = (e, t) => ({
2001
- ...eo(e),
2026
+ }, uo = (e, t) => ({
2027
+ ...to(e),
2002
2028
  options: [e, t]
2003
2029
  }), fo = (e, t) => ({
2004
- ...to(e),
2030
+ ...no(e),
2005
2031
  options: [e, t]
2006
2032
  }), po = (e, t) => ({
2007
- ...no(e),
2033
+ ...so(e),
2008
2034
  options: [e, t]
2009
2035
  }), ho = (e, t) => ({
2010
- ...so(e),
2036
+ ...ro(e),
2037
+ options: [e, t]
2038
+ }), go = (e, t) => ({
2039
+ ...oo(e),
2040
+ options: [e, t]
2041
+ }), mo = (e, t) => ({
2042
+ ...io(e),
2011
2043
  options: [e, t]
2012
- }), go = /* @__PURE__ */ I((e, t) => {
2044
+ }), yo = (e, t) => ({
2045
+ ...lo(e),
2046
+ options: [e, t]
2047
+ }), bo = /* @__PURE__ */ I((e, t) => {
2013
2048
  const { children: n, width: o = 10, height: i = 5, ...r } = e;
2014
- return /* @__PURE__ */ w(ae.svg, R({}, r, {
2049
+ return /* @__PURE__ */ _(ce.svg, D({}, r, {
2015
2050
  ref: t,
2016
2051
  width: o,
2017
2052
  height: i,
2018
2053
  viewBox: "0 0 30 10",
2019
2054
  preserveAspectRatio: "none"
2020
- }), e.asChild ? n : /* @__PURE__ */ w("polygon", {
2055
+ }), e.asChild ? n : /* @__PURE__ */ _("polygon", {
2021
2056
  points: "0,0 30,0 15,10"
2022
2057
  }));
2023
- }), mo = go;
2024
- function vo(e) {
2025
- const [t, n] = U(void 0);
2058
+ }), xo = bo;
2059
+ function wo(e) {
2060
+ const [t, n] = q(void 0);
2026
2061
  return de(() => {
2027
2062
  if (e) {
2028
2063
  n({
@@ -2052,142 +2087,142 @@ function vo(e) {
2052
2087
  e
2053
2088
  ]), t;
2054
2089
  }
2055
- const en = "Popper", [tn, nn] = zt(en), [yo, rn] = tn(en), xo = (e) => {
2056
- const { __scopePopper: t, children: n } = e, [o, i] = U(null);
2057
- return /* @__PURE__ */ w(yo, {
2090
+ const rn = "Popper", [on, sn] = Wt(rn), [vo, an] = on(rn), $o = (e) => {
2091
+ const { __scopePopper: t, children: n } = e, [o, i] = q(null);
2092
+ return /* @__PURE__ */ _(vo, {
2058
2093
  scope: t,
2059
2094
  anchor: o,
2060
2095
  onAnchorChange: i
2061
2096
  }, n);
2062
- }, bo = "PopperAnchor", $o = /* @__PURE__ */ I((e, t) => {
2063
- const { __scopePopper: n, virtualRef: o, ...i } = e, r = rn(bo, n), s = k(null), a = pe(t, s);
2097
+ }, _o = "PopperAnchor", Po = /* @__PURE__ */ I((e, t) => {
2098
+ const { __scopePopper: n, virtualRef: o, ...i } = e, r = an(_o, n), s = k(null), a = he(t, s);
2064
2099
  return S(() => {
2065
2100
  r.onAnchorChange((o == null ? void 0 : o.current) || s.current);
2066
- }), o ? null : /* @__PURE__ */ w(ae.div, R({}, i, {
2101
+ }), o ? null : /* @__PURE__ */ _(ce.div, D({}, i, {
2067
2102
  ref: a
2068
2103
  }));
2069
- }), on = "PopperContent", [wo, _o] = tn(on), Po = /* @__PURE__ */ I((e, t) => {
2104
+ }), cn = "PopperContent", [Ao, Oo] = on(cn), Co = /* @__PURE__ */ I((e, t) => {
2070
2105
  var n, o, i, r, s, a, c, l;
2071
- const { __scopePopper: u, side: d = "bottom", sideOffset: p = 0, align: f = "center", alignOffset: h = 0, arrowPadding: m = 0, avoidCollisions: g = !0, collisionBoundary: v = [], collisionPadding: y = 0, sticky: x = "partial", hideWhenDetached: b = !1, updatePositionStrategy: $ = "optimized", onPlaced: P, ...O } = e, _ = rn(on, u), [E, T] = U(null), D = pe(
2106
+ const { __scopePopper: u, side: f = "bottom", sideOffset: p = 0, align: d = "center", alignOffset: h = 0, arrowPadding: m = 0, avoidCollisions: g = !0, collisionBoundary: y = [], collisionPadding: b = 0, sticky: x = "partial", hideWhenDetached: w = !1, updatePositionStrategy: v = "optimized", onPlaced: A, ...P } = e, $ = an(cn, u), [E, T] = q(null), N = he(
2072
2107
  t,
2073
- (ve) => T(ve)
2074
- ), [M, X] = U(null), C = vo(M), F = (n = C == null ? void 0 : C.width) !== null && n !== void 0 ? n : 0, H = (o = C == null ? void 0 : C.height) !== null && o !== void 0 ? o : 0, A = d + (f !== "center" ? "-" + f : ""), B = typeof y == "number" ? y : {
2108
+ (be) => T(be)
2109
+ ), [M, F] = q(null), O = wo(M), V = (n = O == null ? void 0 : O.width) !== null && n !== void 0 ? n : 0, R = (o = O == null ? void 0 : O.height) !== null && o !== void 0 ? o : 0, B = f + (d !== "center" ? "-" + d : ""), C = typeof b == "number" ? b : {
2075
2110
  top: 0,
2076
2111
  right: 0,
2077
2112
  bottom: 0,
2078
2113
  left: 0,
2079
- ...y
2080
- }, N = Array.isArray(v) ? v : [
2081
- v
2082
- ], Ue = N.length > 0, Ee = {
2083
- padding: B,
2084
- boundary: N.filter(Eo),
2114
+ ...b
2115
+ }, H = Array.isArray(y) ? y : [
2116
+ y
2117
+ ], G = H.length > 0, Te = {
2118
+ padding: C,
2119
+ boundary: H.filter(So),
2085
2120
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
2086
- altBoundary: Ue
2087
- }, { refs: un, floatingStyles: dt, placement: dn, isPositioned: Te, middlewareData: ce } = io({
2121
+ altBoundary: G
2122
+ }, { refs: pn, floatingStyles: ht, placement: hn, isPositioned: Re, middlewareData: le } = co({
2088
2123
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
2089
2124
  strategy: "fixed",
2090
- placement: A,
2091
- whileElementsMounted: (...ve) => Zr(...ve, {
2092
- animationFrame: $ === "always"
2125
+ placement: B,
2126
+ whileElementsMounted: (...be) => eo(...be, {
2127
+ animationFrame: v === "always"
2093
2128
  }),
2094
2129
  elements: {
2095
- reference: _.anchor
2130
+ reference: $.anchor
2096
2131
  },
2097
2132
  middleware: [
2098
- ao({
2099
- mainAxis: p + H,
2133
+ uo({
2134
+ mainAxis: p + R,
2100
2135
  alignmentAxis: h
2101
2136
  }),
2102
- g && co({
2137
+ g && fo({
2103
2138
  mainAxis: !0,
2104
2139
  crossAxis: !1,
2105
- limiter: x === "partial" ? lo() : void 0,
2106
- ...Ee
2140
+ limiter: x === "partial" ? po() : void 0,
2141
+ ...Te
2107
2142
  }),
2108
- g && uo({
2109
- ...Ee
2143
+ g && ho({
2144
+ ...Te
2110
2145
  }),
2111
- fo({
2112
- ...Ee,
2113
- apply: ({ elements: ve, rects: pt, availableWidth: yn, availableHeight: xn }) => {
2114
- const { width: bn, height: $n } = pt.reference, Re = ve.floating.style;
2115
- Re.setProperty("--radix-popper-available-width", `${yn}px`), Re.setProperty("--radix-popper-available-height", `${xn}px`), Re.setProperty("--radix-popper-anchor-width", `${bn}px`), Re.setProperty("--radix-popper-anchor-height", `${$n}px`);
2146
+ go({
2147
+ ...Te,
2148
+ apply: ({ elements: be, rects: mt, availableWidth: vn, availableHeight: $n }) => {
2149
+ const { width: _n, height: Pn } = mt.reference, De = be.floating.style;
2150
+ De.setProperty("--radix-popper-available-width", `${vn}px`), De.setProperty("--radix-popper-available-height", `${$n}px`), De.setProperty("--radix-popper-anchor-width", `${_n}px`), De.setProperty("--radix-popper-anchor-height", `${Pn}px`);
2116
2151
  }
2117
2152
  }),
2118
- M && ho({
2153
+ M && yo({
2119
2154
  element: M,
2120
2155
  padding: m
2121
2156
  }),
2122
- To({
2123
- arrowWidth: F,
2124
- arrowHeight: H
2157
+ Do({
2158
+ arrowWidth: V,
2159
+ arrowHeight: R
2125
2160
  }),
2126
- b && po({
2161
+ w && mo({
2127
2162
  strategy: "referenceHidden",
2128
- ...Ee
2163
+ ...Te
2129
2164
  })
2130
2165
  ]
2131
- }), [ft, fn] = sn(dn), Se = he(P);
2166
+ }), [gt, gn] = ln(hn), Se = ge(A);
2132
2167
  de(() => {
2133
- Te && (Se == null || Se());
2168
+ Re && (Se == null || Se());
2134
2169
  }, [
2135
- Te,
2170
+ Re,
2136
2171
  Se
2137
2172
  ]);
2138
- const pn = (i = ce.arrow) === null || i === void 0 ? void 0 : i.x, hn = (r = ce.arrow) === null || r === void 0 ? void 0 : r.y, gn = ((s = ce.arrow) === null || s === void 0 ? void 0 : s.centerOffset) !== 0, [mn, vn] = U();
2173
+ const mn = (i = le.arrow) === null || i === void 0 ? void 0 : i.x, yn = (r = le.arrow) === null || r === void 0 ? void 0 : r.y, bn = ((s = le.arrow) === null || s === void 0 ? void 0 : s.centerOffset) !== 0, [xn, wn] = q();
2139
2174
  return de(() => {
2140
- E && vn(window.getComputedStyle(E).zIndex);
2175
+ E && wn(window.getComputedStyle(E).zIndex);
2141
2176
  }, [
2142
2177
  E
2143
- ]), /* @__PURE__ */ w("div", {
2144
- ref: un.setFloating,
2178
+ ]), /* @__PURE__ */ _("div", {
2179
+ ref: pn.setFloating,
2145
2180
  "data-radix-popper-content-wrapper": "",
2146
2181
  style: {
2147
- ...dt,
2148
- transform: Te ? dt.transform : "translate(0, -200%)",
2182
+ ...ht,
2183
+ transform: Re ? ht.transform : "translate(0, -200%)",
2149
2184
  // keep off the page when measuring
2150
2185
  minWidth: "max-content",
2151
- zIndex: mn,
2186
+ zIndex: xn,
2152
2187
  "--radix-popper-transform-origin": [
2153
- (a = ce.transformOrigin) === null || a === void 0 ? void 0 : a.x,
2154
- (c = ce.transformOrigin) === null || c === void 0 ? void 0 : c.y
2188
+ (a = le.transformOrigin) === null || a === void 0 ? void 0 : a.x,
2189
+ (c = le.transformOrigin) === null || c === void 0 ? void 0 : c.y
2155
2190
  ].join(" ")
2156
2191
  },
2157
2192
  dir: e.dir
2158
- }, /* @__PURE__ */ w(wo, {
2193
+ }, /* @__PURE__ */ _(Ao, {
2159
2194
  scope: u,
2160
- placedSide: ft,
2161
- onArrowChange: X,
2162
- arrowX: pn,
2163
- arrowY: hn,
2164
- shouldHideArrow: gn
2165
- }, /* @__PURE__ */ w(ae.div, R({
2166
- "data-side": ft,
2167
- "data-align": fn
2168
- }, O, {
2169
- ref: D,
2195
+ placedSide: gt,
2196
+ onArrowChange: F,
2197
+ arrowX: mn,
2198
+ arrowY: yn,
2199
+ shouldHideArrow: bn
2200
+ }, /* @__PURE__ */ _(ce.div, D({
2201
+ "data-side": gt,
2202
+ "data-align": gn
2203
+ }, P, {
2204
+ ref: N,
2170
2205
  style: {
2171
- ...O.style,
2206
+ ...P.style,
2172
2207
  // if the PopperContent hasn't been placed yet (not all measurements done)
2173
2208
  // we prevent animations so that users's animation don't kick in too early referring wrong sides
2174
- animation: Te ? void 0 : "none",
2209
+ animation: Re ? void 0 : "none",
2175
2210
  // hide the content if using the hide middleware and should be hidden
2176
- opacity: (l = ce.hide) !== null && l !== void 0 && l.referenceHidden ? 0 : void 0
2211
+ opacity: (l = le.hide) !== null && l !== void 0 && l.referenceHidden ? 0 : void 0
2177
2212
  }
2178
2213
  }))));
2179
- }), Ao = "PopperArrow", Oo = {
2214
+ }), Eo = "PopperArrow", To = {
2180
2215
  top: "bottom",
2181
2216
  right: "left",
2182
2217
  bottom: "top",
2183
2218
  left: "right"
2184
- }, Co = /* @__PURE__ */ I(function(t, n) {
2185
- const { __scopePopper: o, ...i } = t, r = _o(Ao, o), s = Oo[r.placedSide];
2219
+ }, Ro = /* @__PURE__ */ I(function(t, n) {
2220
+ const { __scopePopper: o, ...i } = t, r = Oo(Eo, o), s = To[r.placedSide];
2186
2221
  return (
2187
2222
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
2188
2223
  // doesn't report size as we'd expect on SVG elements.
2189
2224
  // it reports their bounding box which is effectively the largest path inside the SVG.
2190
- /* @__PURE__ */ w("span", {
2225
+ /* @__PURE__ */ _("span", {
2191
2226
  ref: r.onArrowChange,
2192
2227
  style: {
2193
2228
  position: "absolute",
@@ -2208,7 +2243,7 @@ const en = "Popper", [tn, nn] = zt(en), [yo, rn] = tn(en), xo = (e) => {
2208
2243
  }[r.placedSide],
2209
2244
  visibility: r.shouldHideArrow ? "hidden" : void 0
2210
2245
  }
2211
- }, /* @__PURE__ */ w(mo, R({}, i, {
2246
+ }, /* @__PURE__ */ _(xo, D({}, i, {
2212
2247
  ref: n,
2213
2248
  style: {
2214
2249
  ...i.style,
@@ -2218,59 +2253,59 @@ const en = "Popper", [tn, nn] = zt(en), [yo, rn] = tn(en), xo = (e) => {
2218
2253
  })))
2219
2254
  );
2220
2255
  });
2221
- function Eo(e) {
2256
+ function So(e) {
2222
2257
  return e !== null;
2223
2258
  }
2224
- const To = (e) => ({
2259
+ const Do = (e) => ({
2225
2260
  name: "transformOrigin",
2226
2261
  options: e,
2227
2262
  fn(t) {
2228
2263
  var n, o, i, r, s;
2229
- const { placement: a, rects: c, middlewareData: l } = t, d = ((n = l.arrow) === null || n === void 0 ? void 0 : n.centerOffset) !== 0, p = d ? 0 : e.arrowWidth, f = d ? 0 : e.arrowHeight, [h, m] = sn(a), g = {
2264
+ const { placement: a, rects: c, middlewareData: l } = t, f = ((n = l.arrow) === null || n === void 0 ? void 0 : n.centerOffset) !== 0, p = f ? 0 : e.arrowWidth, d = f ? 0 : e.arrowHeight, [h, m] = ln(a), g = {
2230
2265
  start: "0%",
2231
2266
  center: "50%",
2232
2267
  end: "100%"
2233
- }[m], v = ((o = (i = l.arrow) === null || i === void 0 ? void 0 : i.x) !== null && o !== void 0 ? o : 0) + p / 2, y = ((r = (s = l.arrow) === null || s === void 0 ? void 0 : s.y) !== null && r !== void 0 ? r : 0) + f / 2;
2234
- let x = "", b = "";
2235
- return h === "bottom" ? (x = d ? g : `${v}px`, b = `${-f}px`) : h === "top" ? (x = d ? g : `${v}px`, b = `${c.floating.height + f}px`) : h === "right" ? (x = `${-f}px`, b = d ? g : `${y}px`) : h === "left" && (x = `${c.floating.width + f}px`, b = d ? g : `${y}px`), {
2268
+ }[m], y = ((o = (i = l.arrow) === null || i === void 0 ? void 0 : i.x) !== null && o !== void 0 ? o : 0) + p / 2, b = ((r = (s = l.arrow) === null || s === void 0 ? void 0 : s.y) !== null && r !== void 0 ? r : 0) + d / 2;
2269
+ let x = "", w = "";
2270
+ return h === "bottom" ? (x = f ? g : `${y}px`, w = `${-d}px`) : h === "top" ? (x = f ? g : `${y}px`, w = `${c.floating.height + d}px`) : h === "right" ? (x = `${-d}px`, w = f ? g : `${b}px`) : h === "left" && (x = `${c.floating.width + d}px`, w = f ? g : `${b}px`), {
2236
2271
  data: {
2237
2272
  x,
2238
- y: b
2273
+ y: w
2239
2274
  }
2240
2275
  };
2241
2276
  }
2242
2277
  });
2243
- function sn(e) {
2278
+ function ln(e) {
2244
2279
  const [t, n = "center"] = e.split("-");
2245
2280
  return [
2246
2281
  t,
2247
2282
  n
2248
2283
  ];
2249
2284
  }
2250
- const So = xo, Ro = $o, Do = Po, No = Co, Lo = /* @__PURE__ */ I((e, t) => {
2285
+ const No = $o, Lo = Po, Mo = Co, ko = Ro, Io = /* @__PURE__ */ I((e, t) => {
2251
2286
  var n;
2252
2287
  const { container: o = globalThis == null || (n = globalThis.document) === null || n === void 0 ? void 0 : n.body, ...i } = e;
2253
- return o ? /* @__PURE__ */ An.createPortal(/* @__PURE__ */ w(ae.div, R({}, i, {
2288
+ return o ? /* @__PURE__ */ En.createPortal(/* @__PURE__ */ _(ce.div, D({}, i, {
2254
2289
  ref: t
2255
2290
  })), o) : null;
2256
2291
  });
2257
- function Mo(e, t) {
2258
- return _n((n, o) => {
2292
+ function Fo(e, t) {
2293
+ return On((n, o) => {
2259
2294
  const i = t[n][o];
2260
2295
  return i ?? n;
2261
2296
  }, e);
2262
2297
  }
2263
- const ct = (e) => {
2264
- const { present: t, children: n } = e, o = ko(t), i = typeof n == "function" ? n({
2298
+ const ft = (e) => {
2299
+ const { present: t, children: n } = e, o = Ho(t), i = typeof n == "function" ? n({
2265
2300
  present: o.isPresent
2266
- }) : ie.only(n), r = pe(o.ref, i.ref);
2267
- return typeof n == "function" || o.isPresent ? /* @__PURE__ */ tt(i, {
2301
+ }) : se.only(n), r = he(o.ref, i.ref);
2302
+ return typeof n == "function" || o.isPresent ? /* @__PURE__ */ rt(i, {
2268
2303
  ref: r
2269
2304
  }) : null;
2270
2305
  };
2271
- ct.displayName = "Presence";
2272
- function ko(e) {
2273
- const [t, n] = U(), o = k({}), i = k(e), r = k("none"), s = e ? "mounted" : "unmounted", [a, c] = Mo(s, {
2306
+ ft.displayName = "Presence";
2307
+ function Ho(e) {
2308
+ const [t, n] = q(), o = k({}), i = k(e), r = k("none"), s = e ? "mounted" : "unmounted", [a, c] = Fo(s, {
2274
2309
  mounted: {
2275
2310
  UNMOUNT: "unmounted",
2276
2311
  ANIMATION_OUT: "unmountSuspended"
@@ -2284,28 +2319,28 @@ function ko(e) {
2284
2319
  }
2285
2320
  });
2286
2321
  return S(() => {
2287
- const l = Ne(o.current);
2322
+ const l = Le(o.current);
2288
2323
  r.current = a === "mounted" ? l : "none";
2289
2324
  }, [
2290
2325
  a
2291
2326
  ]), de(() => {
2292
2327
  const l = o.current, u = i.current;
2293
2328
  if (u !== e) {
2294
- const p = r.current, f = Ne(l);
2295
- e ? c("MOUNT") : f === "none" || (l == null ? void 0 : l.display) === "none" ? c("UNMOUNT") : c(u && p !== f ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
2329
+ const p = r.current, d = Le(l);
2330
+ e ? c("MOUNT") : d === "none" || (l == null ? void 0 : l.display) === "none" ? c("UNMOUNT") : c(u && p !== d ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
2296
2331
  }
2297
2332
  }, [
2298
2333
  e,
2299
2334
  c
2300
2335
  ]), de(() => {
2301
2336
  if (t) {
2302
- const l = (d) => {
2303
- const f = Ne(o.current).includes(d.animationName);
2304
- d.target === t && f && St(
2337
+ const l = (f) => {
2338
+ const d = Le(o.current).includes(f.animationName);
2339
+ f.target === t && d && Dt(
2305
2340
  () => c("ANIMATION_END")
2306
2341
  );
2307
- }, u = (d) => {
2308
- d.target === t && (r.current = Ne(o.current));
2342
+ }, u = (f) => {
2343
+ f.target === t && (r.current = Le(o.current));
2309
2344
  };
2310
2345
  return t.addEventListener("animationstart", u), t.addEventListener("animationcancel", l), t.addEventListener("animationend", l), () => {
2311
2346
  t.removeEventListener("animationstart", u), t.removeEventListener("animationcancel", l), t.removeEventListener("animationend", l);
@@ -2325,18 +2360,18 @@ function ko(e) {
2325
2360
  }, [])
2326
2361
  };
2327
2362
  }
2328
- function Ne(e) {
2363
+ function Le(e) {
2329
2364
  return (e == null ? void 0 : e.animationName) || "none";
2330
2365
  }
2331
- function Io({ prop: e, defaultProp: t, onChange: n = () => {
2366
+ function Bo({ prop: e, defaultProp: t, onChange: n = () => {
2332
2367
  } }) {
2333
- const [o, i] = Fo({
2368
+ const [o, i] = zo({
2334
2369
  defaultProp: t,
2335
2370
  onChange: n
2336
- }), r = e !== void 0, s = r ? e : o, a = he(n), c = j((l) => {
2371
+ }), r = e !== void 0, s = r ? e : o, a = ge(n), c = j((l) => {
2337
2372
  if (r) {
2338
- const d = typeof l == "function" ? l(e) : l;
2339
- d !== e && a(d);
2373
+ const f = typeof l == "function" ? l(e) : l;
2374
+ f !== e && a(f);
2340
2375
  } else i(l);
2341
2376
  }, [
2342
2377
  r,
@@ -2349,8 +2384,8 @@ function Io({ prop: e, defaultProp: t, onChange: n = () => {
2349
2384
  c
2350
2385
  ];
2351
2386
  }
2352
- function Fo({ defaultProp: e, onChange: t }) {
2353
- const n = U(e), [o] = n, i = k(o), r = he(t);
2387
+ function zo({ defaultProp: e, onChange: t }) {
2388
+ const n = q(e), [o] = n, i = k(o), r = ge(t);
2354
2389
  return S(() => {
2355
2390
  i.current !== o && (r(o), i.current = o);
2356
2391
  }, [
@@ -2359,7 +2394,7 @@ function Fo({ defaultProp: e, onChange: t }) {
2359
2394
  r
2360
2395
  ]), n;
2361
2396
  }
2362
- const Ho = /* @__PURE__ */ I((e, t) => /* @__PURE__ */ w(ae.span, R({}, e, {
2397
+ const jo = /* @__PURE__ */ I((e, t) => /* @__PURE__ */ _(ce.span, D({}, e, {
2363
2398
  ref: t,
2364
2399
  style: {
2365
2400
  // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
@@ -2375,14 +2410,14 @@ const Ho = /* @__PURE__ */ I((e, t) => /* @__PURE__ */ w(ae.span, R({}, e, {
2375
2410
  wordWrap: "normal",
2376
2411
  ...e.style
2377
2412
  }
2378
- }))), Bo = Ho, [je, Ti] = zt("Tooltip", [
2379
- nn
2380
- ]), We = nn(), zo = "TooltipProvider", jo = 700, et = "tooltip.open", [Wo, lt] = je(zo), Uo = (e) => {
2381
- const { __scopeTooltip: t, delayDuration: n = jo, skipDelayDuration: o = 300, disableHoverableContent: i = !1, children: r } = e, [s, a] = U(!0), c = k(!1), l = k(0);
2413
+ }))), Wo = jo, [qe, Di] = Wt("Tooltip", [
2414
+ sn
2415
+ ]), Ue = sn(), qo = "TooltipProvider", Uo = 700, nt = "tooltip.open", [Vo, dt] = qe(qo), Yo = (e) => {
2416
+ const { __scopeTooltip: t, delayDuration: n = Uo, skipDelayDuration: o = 300, disableHoverableContent: i = !1, children: r } = e, [s, a] = q(!0), c = k(!1), l = k(0);
2382
2417
  return S(() => {
2383
2418
  const u = l.current;
2384
2419
  return () => window.clearTimeout(u);
2385
- }, []), /* @__PURE__ */ w(Wo, {
2420
+ }, []), /* @__PURE__ */ _(Vo, {
2386
2421
  scope: t,
2387
2422
  isOpenDelayed: s,
2388
2423
  delayDuration: n,
@@ -2403,136 +2438,136 @@ const Ho = /* @__PURE__ */ I((e, t) => /* @__PURE__ */ w(ae.span, R({}, e, {
2403
2438
  }, []),
2404
2439
  disableHoverableContent: i
2405
2440
  }, r);
2406
- }, ut = "Tooltip", [Vo, Ce] = je(ut), Xo = (e) => {
2407
- const { __scopeTooltip: t, children: n, open: o, defaultOpen: i = !1, onOpenChange: r, disableHoverableContent: s, delayDuration: a } = e, c = lt(ut, e.__scopeTooltip), l = We(t), [u, d] = U(null), p = mr(), f = k(0), h = s ?? c.disableHoverableContent, m = a ?? c.delayDuration, g = k(!1), [v = !1, y] = Io({
2441
+ }, pt = "Tooltip", [Xo, Ee] = qe(pt), Go = (e) => {
2442
+ const { __scopeTooltip: t, children: n, open: o, defaultOpen: i = !1, onOpenChange: r, disableHoverableContent: s, delayDuration: a } = e, c = dt(pt, e.__scopeTooltip), l = Ue(t), [u, f] = q(null), p = xr(), d = k(0), h = s ?? c.disableHoverableContent, m = a ?? c.delayDuration, g = k(!1), [y = !1, b] = Bo({
2408
2443
  prop: o,
2409
2444
  defaultProp: i,
2410
- onChange: (O) => {
2411
- O ? (c.onOpen(), document.dispatchEvent(new CustomEvent(et))) : c.onClose(), r == null || r(O);
2445
+ onChange: (P) => {
2446
+ P ? (c.onOpen(), document.dispatchEvent(new CustomEvent(nt))) : c.onClose(), r == null || r(P);
2412
2447
  }
2413
- }), x = we(() => v ? g.current ? "delayed-open" : "instant-open" : "closed", [
2414
- v
2415
- ]), b = j(() => {
2416
- window.clearTimeout(f.current), g.current = !1, y(!0);
2417
- }, [
2448
+ }), x = _e(() => y ? g.current ? "delayed-open" : "instant-open" : "closed", [
2418
2449
  y
2419
- ]), $ = j(() => {
2420
- window.clearTimeout(f.current), y(!1);
2450
+ ]), w = j(() => {
2451
+ window.clearTimeout(d.current), g.current = !1, b(!0);
2421
2452
  }, [
2422
- y
2423
- ]), P = j(() => {
2424
- window.clearTimeout(f.current), f.current = window.setTimeout(() => {
2425
- g.current = !0, y(!0);
2453
+ b
2454
+ ]), v = j(() => {
2455
+ window.clearTimeout(d.current), b(!1);
2456
+ }, [
2457
+ b
2458
+ ]), A = j(() => {
2459
+ window.clearTimeout(d.current), d.current = window.setTimeout(() => {
2460
+ g.current = !0, b(!0);
2426
2461
  }, m);
2427
2462
  }, [
2428
2463
  m,
2429
- y
2464
+ b
2430
2465
  ]);
2431
- return S(() => () => window.clearTimeout(f.current), []), /* @__PURE__ */ w(So, l, /* @__PURE__ */ w(Vo, {
2466
+ return S(() => () => window.clearTimeout(d.current), []), /* @__PURE__ */ _(No, l, /* @__PURE__ */ _(Xo, {
2432
2467
  scope: t,
2433
2468
  contentId: p,
2434
- open: v,
2469
+ open: y,
2435
2470
  stateAttribute: x,
2436
2471
  trigger: u,
2437
- onTriggerChange: d,
2472
+ onTriggerChange: f,
2438
2473
  onTriggerEnter: j(() => {
2439
- c.isOpenDelayed ? P() : b();
2474
+ c.isOpenDelayed ? A() : w();
2440
2475
  }, [
2441
2476
  c.isOpenDelayed,
2442
- P,
2443
- b
2477
+ A,
2478
+ w
2444
2479
  ]),
2445
2480
  onTriggerLeave: j(() => {
2446
- h ? $() : window.clearTimeout(f.current);
2481
+ h ? v() : window.clearTimeout(d.current);
2447
2482
  }, [
2448
- $,
2483
+ v,
2449
2484
  h
2450
2485
  ]),
2451
- onOpen: b,
2452
- onClose: $,
2486
+ onOpen: w,
2487
+ onClose: v,
2453
2488
  disableHoverableContent: h
2454
2489
  }, n));
2455
- }, Ct = "TooltipTrigger", Yo = /* @__PURE__ */ I((e, t) => {
2456
- const { __scopeTooltip: n, ...o } = e, i = Ce(Ct, n), r = lt(Ct, n), s = We(n), a = k(null), c = pe(t, a, i.onTriggerChange), l = k(!1), u = k(!1), d = j(
2490
+ }, Tt = "TooltipTrigger", Ko = /* @__PURE__ */ I((e, t) => {
2491
+ const { __scopeTooltip: n, ...o } = e, i = Ee(Tt, n), r = dt(Tt, n), s = Ue(n), a = k(null), c = he(t, a, i.onTriggerChange), l = k(!1), u = k(!1), f = j(
2457
2492
  () => l.current = !1,
2458
2493
  []
2459
2494
  );
2460
- return S(() => () => document.removeEventListener("pointerup", d), [
2461
- d
2462
- ]), /* @__PURE__ */ w(Ro, R({
2495
+ return S(() => () => document.removeEventListener("pointerup", f), [
2496
+ f
2497
+ ]), /* @__PURE__ */ _(Lo, D({
2463
2498
  asChild: !0
2464
- }, s), /* @__PURE__ */ w(ae.button, R({
2499
+ }, s), /* @__PURE__ */ _(ce.button, D({
2465
2500
  // We purposefully avoid adding `type=button` here because tooltip triggers are also
2466
2501
  // commonly anchors and the anchor `type` attribute signifies MIME type.
2467
2502
  "aria-describedby": i.open ? i.contentId : void 0,
2468
2503
  "data-state": i.stateAttribute
2469
2504
  }, o, {
2470
2505
  ref: c,
2471
- onPointerMove: Z(e.onPointerMove, (p) => {
2506
+ onPointerMove: Q(e.onPointerMove, (p) => {
2472
2507
  p.pointerType !== "touch" && !u.current && !r.isPointerInTransitRef.current && (i.onTriggerEnter(), u.current = !0);
2473
2508
  }),
2474
- onPointerLeave: Z(e.onPointerLeave, () => {
2509
+ onPointerLeave: Q(e.onPointerLeave, () => {
2475
2510
  i.onTriggerLeave(), u.current = !1;
2476
2511
  }),
2477
- onPointerDown: Z(e.onPointerDown, () => {
2478
- l.current = !0, document.addEventListener("pointerup", d, {
2512
+ onPointerDown: Q(e.onPointerDown, () => {
2513
+ l.current = !0, document.addEventListener("pointerup", f, {
2479
2514
  once: !0
2480
2515
  });
2481
2516
  }),
2482
- onFocus: Z(e.onFocus, () => {
2517
+ onFocus: Q(e.onFocus, () => {
2483
2518
  l.current || i.onOpen();
2484
2519
  }),
2485
- onBlur: Z(e.onBlur, i.onClose),
2486
- onClick: Z(e.onClick, i.onClose)
2520
+ onBlur: Q(e.onBlur, i.onClose),
2521
+ onClick: Q(e.onClick, i.onClose)
2487
2522
  })));
2488
- }), an = "TooltipPortal", [Go, qo] = je(an, {
2523
+ }), un = "TooltipPortal", [Zo, Jo] = qe(un, {
2489
2524
  forceMount: void 0
2490
- }), Ko = (e) => {
2491
- const { __scopeTooltip: t, forceMount: n, children: o, container: i } = e, r = Ce(an, t);
2492
- return /* @__PURE__ */ w(Go, {
2525
+ }), Qo = (e) => {
2526
+ const { __scopeTooltip: t, forceMount: n, children: o, container: i } = e, r = Ee(un, t);
2527
+ return /* @__PURE__ */ _(Zo, {
2493
2528
  scope: t,
2494
2529
  forceMount: n
2495
- }, /* @__PURE__ */ w(ct, {
2530
+ }, /* @__PURE__ */ _(ft, {
2496
2531
  present: n || r.open
2497
- }, /* @__PURE__ */ w(Lo, {
2532
+ }, /* @__PURE__ */ _(Io, {
2498
2533
  asChild: !0,
2499
2534
  container: i
2500
2535
  }, o)));
2501
- }, Ae = "TooltipContent", Zo = /* @__PURE__ */ I((e, t) => {
2502
- const n = qo(Ae, e.__scopeTooltip), { forceMount: o = n.forceMount, side: i = "top", ...r } = e, s = Ce(Ae, e.__scopeTooltip);
2503
- return /* @__PURE__ */ w(ct, {
2536
+ }, Oe = "TooltipContent", ei = /* @__PURE__ */ I((e, t) => {
2537
+ const n = Jo(Oe, e.__scopeTooltip), { forceMount: o = n.forceMount, side: i = "top", ...r } = e, s = Ee(Oe, e.__scopeTooltip);
2538
+ return /* @__PURE__ */ _(ft, {
2504
2539
  present: o || s.open
2505
- }, s.disableHoverableContent ? /* @__PURE__ */ w(cn, R({
2540
+ }, s.disableHoverableContent ? /* @__PURE__ */ _(fn, D({
2506
2541
  side: i
2507
2542
  }, r, {
2508
2543
  ref: t
2509
- })) : /* @__PURE__ */ w(Jo, R({
2544
+ })) : /* @__PURE__ */ _(ti, D({
2510
2545
  side: i
2511
2546
  }, r, {
2512
2547
  ref: t
2513
2548
  })));
2514
- }), Jo = /* @__PURE__ */ I((e, t) => {
2515
- const n = Ce(Ae, e.__scopeTooltip), o = lt(Ae, e.__scopeTooltip), i = k(null), r = pe(t, i), [s, a] = U(null), { trigger: c, onClose: l } = n, u = i.current, { onPointerInTransitChange: d } = o, p = j(() => {
2516
- a(null), d(!1);
2549
+ }), ti = /* @__PURE__ */ I((e, t) => {
2550
+ const n = Ee(Oe, e.__scopeTooltip), o = dt(Oe, e.__scopeTooltip), i = k(null), r = he(t, i), [s, a] = q(null), { trigger: c, onClose: l } = n, u = i.current, { onPointerInTransitChange: f } = o, p = j(() => {
2551
+ a(null), f(!1);
2517
2552
  }, [
2518
- d
2519
- ]), f = j((h, m) => {
2520
- const g = h.currentTarget, v = {
2553
+ f
2554
+ ]), d = j((h, m) => {
2555
+ const g = h.currentTarget, y = {
2521
2556
  x: h.clientX,
2522
2557
  y: h.clientY
2523
- }, y = ri(v, g.getBoundingClientRect()), x = oi(v, y), b = ii(m.getBoundingClientRect()), $ = ai([
2558
+ }, b = si(y, g.getBoundingClientRect()), x = ai(y, b), w = ci(m.getBoundingClientRect()), v = ui([
2524
2559
  ...x,
2525
- ...b
2560
+ ...w
2526
2561
  ]);
2527
- a($), d(!0);
2562
+ a(v), f(!0);
2528
2563
  }, [
2529
- d
2564
+ f
2530
2565
  ]);
2531
2566
  return S(() => () => p(), [
2532
2567
  p
2533
2568
  ]), S(() => {
2534
2569
  if (c && u) {
2535
- const h = (g) => f(g, u), m = (g) => f(g, c);
2570
+ const h = (g) => d(g, u), m = (g) => d(g, c);
2536
2571
  return c.addEventListener("pointerleave", h), u.addEventListener("pointerleave", m), () => {
2537
2572
  c.removeEventListener("pointerleave", h), u.removeEventListener("pointerleave", m);
2538
2573
  };
@@ -2540,16 +2575,16 @@ const Ho = /* @__PURE__ */ I((e, t) => /* @__PURE__ */ w(ae.span, R({}, e, {
2540
2575
  }, [
2541
2576
  c,
2542
2577
  u,
2543
- f,
2578
+ d,
2544
2579
  p
2545
2580
  ]), S(() => {
2546
2581
  if (s) {
2547
2582
  const h = (m) => {
2548
- const g = m.target, v = {
2583
+ const g = m.target, y = {
2549
2584
  x: m.clientX,
2550
2585
  y: m.clientY
2551
- }, y = (c == null ? void 0 : c.contains(g)) || (u == null ? void 0 : u.contains(g)), x = !si(v, s);
2552
- y ? p() : x && (p(), l());
2586
+ }, b = (c == null ? void 0 : c.contains(g)) || (u == null ? void 0 : u.contains(g)), x = !li(y, s);
2587
+ b ? p() : x && (p(), l());
2553
2588
  };
2554
2589
  return document.addEventListener("pointermove", h), () => document.removeEventListener("pointermove", h);
2555
2590
  }
@@ -2559,38 +2594,38 @@ const Ho = /* @__PURE__ */ I((e, t) => /* @__PURE__ */ w(ae.span, R({}, e, {
2559
2594
  s,
2560
2595
  l,
2561
2596
  p
2562
- ]), /* @__PURE__ */ w(cn, R({}, e, {
2597
+ ]), /* @__PURE__ */ _(fn, D({}, e, {
2563
2598
  ref: r
2564
2599
  }));
2565
- }), [Qo, ei] = je(ut, {
2600
+ }), [ni, ri] = qe(pt, {
2566
2601
  isInside: !1
2567
- }), cn = /* @__PURE__ */ I((e, t) => {
2568
- const { __scopeTooltip: n, children: o, "aria-label": i, onEscapeKeyDown: r, onPointerDownOutside: s, ...a } = e, c = Ce(Ae, n), l = We(n), { onClose: u } = c;
2569
- return S(() => (document.addEventListener(et, u), () => document.removeEventListener(et, u)), [
2602
+ }), fn = /* @__PURE__ */ I((e, t) => {
2603
+ const { __scopeTooltip: n, children: o, "aria-label": i, onEscapeKeyDown: r, onPointerDownOutside: s, ...a } = e, c = Ee(Oe, n), l = Ue(n), { onClose: u } = c;
2604
+ return S(() => (document.addEventListener(nt, u), () => document.removeEventListener(nt, u)), [
2570
2605
  u
2571
2606
  ]), S(() => {
2572
2607
  if (c.trigger) {
2573
- const d = (p) => {
2574
- const f = p.target;
2575
- f != null && f.contains(c.trigger) && u();
2608
+ const f = (p) => {
2609
+ const d = p.target;
2610
+ d != null && d.contains(c.trigger) && u();
2576
2611
  };
2577
- return window.addEventListener("scroll", d, {
2612
+ return window.addEventListener("scroll", f, {
2578
2613
  capture: !0
2579
- }), () => window.removeEventListener("scroll", d, {
2614
+ }), () => window.removeEventListener("scroll", f, {
2580
2615
  capture: !0
2581
2616
  });
2582
2617
  }
2583
2618
  }, [
2584
2619
  c.trigger,
2585
2620
  u
2586
- ]), /* @__PURE__ */ w(dr, {
2621
+ ]), /* @__PURE__ */ _(hr, {
2587
2622
  asChild: !0,
2588
2623
  disableOutsidePointerEvents: !1,
2589
2624
  onEscapeKeyDown: r,
2590
2625
  onPointerDownOutside: s,
2591
- onFocusOutside: (d) => d.preventDefault(),
2626
+ onFocusOutside: (f) => f.preventDefault(),
2592
2627
  onDismiss: u
2593
- }, /* @__PURE__ */ w(Do, R({
2628
+ }, /* @__PURE__ */ _(Mo, D({
2594
2629
  "data-state": c.stateAttribute
2595
2630
  }, l, a, {
2596
2631
  ref: t,
@@ -2602,20 +2637,20 @@ const Ho = /* @__PURE__ */ I((e, t) => /* @__PURE__ */ w(ae.span, R({}, e, {
2602
2637
  "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
2603
2638
  "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
2604
2639
  }
2605
- }), /* @__PURE__ */ w(Wt, null, o), /* @__PURE__ */ w(Qo, {
2640
+ }), /* @__PURE__ */ _(Ut, null, o), /* @__PURE__ */ _(ni, {
2606
2641
  scope: n,
2607
2642
  isInside: !0
2608
- }, /* @__PURE__ */ w(Bo, {
2643
+ }, /* @__PURE__ */ _(Wo, {
2609
2644
  id: c.contentId,
2610
2645
  role: "tooltip"
2611
2646
  }, i || o))));
2612
- }), ti = "TooltipArrow", ni = /* @__PURE__ */ I((e, t) => {
2613
- const { __scopeTooltip: n, ...o } = e, i = We(n);
2614
- return ei(ti, n).isInside ? null : /* @__PURE__ */ w(No, R({}, i, o, {
2647
+ }), oi = "TooltipArrow", ii = /* @__PURE__ */ I((e, t) => {
2648
+ const { __scopeTooltip: n, ...o } = e, i = Ue(n);
2649
+ return ri(oi, n).isInside ? null : /* @__PURE__ */ _(ko, D({}, i, o, {
2615
2650
  ref: t
2616
2651
  }));
2617
2652
  });
2618
- function ri(e, t) {
2653
+ function si(e, t) {
2619
2654
  const n = Math.abs(t.top - e.y), o = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), r = Math.abs(t.left - e.x);
2620
2655
  switch (Math.min(n, o, i, r)) {
2621
2656
  case r:
@@ -2630,7 +2665,7 @@ function ri(e, t) {
2630
2665
  throw new Error("unreachable");
2631
2666
  }
2632
2667
  }
2633
- function oi(e, t, n = 5) {
2668
+ function ai(e, t, n = 5) {
2634
2669
  const o = [];
2635
2670
  switch (t) {
2636
2671
  case "top":
@@ -2672,7 +2707,7 @@ function oi(e, t, n = 5) {
2672
2707
  }
2673
2708
  return o;
2674
2709
  }
2675
- function ii(e) {
2710
+ function ci(e) {
2676
2711
  const { top: t, right: n, bottom: o, left: i } = e;
2677
2712
  return [
2678
2713
  {
@@ -2693,7 +2728,7 @@ function ii(e) {
2693
2728
  }
2694
2729
  ];
2695
2730
  }
2696
- function si(e, t) {
2731
+ function li(e, t) {
2697
2732
  const { x: n, y: o } = e;
2698
2733
  let i = !1;
2699
2734
  for (let r = 0, s = t.length - 1; r < t.length; s = r++) {
@@ -2702,11 +2737,11 @@ function si(e, t) {
2702
2737
  }
2703
2738
  return i;
2704
2739
  }
2705
- function ai(e) {
2740
+ function ui(e) {
2706
2741
  const t = e.slice();
2707
- return t.sort((n, o) => n.x < o.x ? -1 : n.x > o.x ? 1 : n.y < o.y ? -1 : n.y > o.y ? 1 : 0), ci(t);
2742
+ return t.sort((n, o) => n.x < o.x ? -1 : n.x > o.x ? 1 : n.y < o.y ? -1 : n.y > o.y ? 1 : 0), fi(t);
2708
2743
  }
2709
- function ci(e) {
2744
+ function fi(e) {
2710
2745
  if (e.length <= 1) return e.slice();
2711
2746
  const t = [];
2712
2747
  for (let o = 0; o < e.length; o++) {
@@ -2731,11 +2766,11 @@ function ci(e) {
2731
2766
  }
2732
2767
  return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
2733
2768
  }
2734
- const li = Uo, ui = Xo, di = Yo, fi = Ko, pi = Zo, hi = ni;
2735
- function gi(e) {
2769
+ const di = Yo, pi = Go, hi = Ko, gi = Qo, mi = ei, yi = ii;
2770
+ function bi(e) {
2736
2771
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
2737
2772
  }
2738
- var ln = { exports: {} };
2773
+ var dn = { exports: {} };
2739
2774
  /*!
2740
2775
  Copyright (c) 2018 Jed Watson.
2741
2776
  Licensed under the MIT License (MIT), see
@@ -2770,29 +2805,29 @@ var ln = { exports: {} };
2770
2805
  }
2771
2806
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
2772
2807
  })();
2773
- })(ln);
2774
- var mi = ln.exports;
2775
- const vi = /* @__PURE__ */ gi(mi), yi = "_slideDownAndFade_fkagk_1", xi = "_slideLeftAndFade_fkagk_1", bi = "_slideUpAndFade_fkagk_1", $i = "_slideRightAndFade_fkagk_1", wi = {
2808
+ })(dn);
2809
+ var xi = dn.exports;
2810
+ const wi = /* @__PURE__ */ bi(xi), vi = "_slideDownAndFade_fkagk_1", $i = "_slideLeftAndFade_fkagk_1", _i = "_slideUpAndFade_fkagk_1", Pi = "_slideRightAndFade_fkagk_1", Ai = {
2776
2811
  "purpur-tooltip": "_purpur-tooltip_fkagk_1",
2777
2812
  "purpur-tooltip__content": "_purpur-tooltip__content_fkagk_4",
2778
2813
  "purpur-tooltip__content--primary": "_purpur-tooltip__content--primary_fkagk_14",
2779
2814
  "purpur-tooltip__content--primary-negative": "_purpur-tooltip__content--primary-negative_fkagk_17",
2780
- slideDownAndFade: yi,
2781
- slideLeftAndFade: xi,
2782
- slideUpAndFade: bi,
2783
- slideRightAndFade: $i,
2815
+ slideDownAndFade: vi,
2816
+ slideLeftAndFade: $i,
2817
+ slideUpAndFade: _i,
2818
+ slideRightAndFade: Pi,
2784
2819
  "purpur-tooltip__arrow--primary": "_purpur-tooltip__arrow--primary_fkagk_32",
2785
2820
  "purpur-tooltip__arrow--primary-negative": "_purpur-tooltip__arrow--primary-negative_fkagk_35"
2786
- }, Xe = vi.bind(wi), _i = {
2821
+ }, Xe = wi.bind(Ai), Oi = {
2787
2822
  TOP: "top",
2788
2823
  BOTTOM: "bottom",
2789
2824
  LEFT: "left",
2790
2825
  RIGHT: "right"
2791
- }, Pi = {
2826
+ }, Ci = {
2792
2827
  START: "start",
2793
2828
  CENTER: "center",
2794
2829
  END: "end"
2795
- }, le = "purpur-tooltip", Ai = I(
2830
+ }, ue = "purpur-tooltip", Ei = I(
2796
2831
  ({
2797
2832
  ["data-testid"]: e,
2798
2833
  buttonSize: t = "md",
@@ -2800,68 +2835,68 @@ const vi = /* @__PURE__ */ gi(mi), yi = "_slideDownAndFade_fkagk_1", xi = "_slid
2800
2835
  className: o,
2801
2836
  contentClassName: i,
2802
2837
  negative: r = !1,
2803
- position: s = _i.TOP,
2804
- align: a = Pi.CENTER,
2838
+ position: s = Oi.TOP,
2839
+ align: a = Ci.CENTER,
2805
2840
  triggerAriaLabel: c = "",
2806
2841
  triggerElement: l,
2807
2842
  ...u
2808
- }, d) => {
2809
- const [p, f] = U(!1), h = Xe([
2843
+ }, f) => {
2844
+ const [p, d] = q(!1), h = Xe([
2810
2845
  o,
2811
- le,
2812
- `${le}--primary${r ? "-negative" : ""}`
2846
+ ue,
2847
+ `${ue}--primary${r ? "-negative" : ""}`
2813
2848
  ]), m = /* @__PURE__ */ z(
2814
- Nt,
2849
+ Mt,
2815
2850
  {
2816
- ref: d,
2851
+ ref: f,
2817
2852
  "aria-label": c,
2818
- variant: Fn.TERTIARY_PURPLE,
2853
+ variant: zn.TERTIARY_PURPLE,
2819
2854
  negative: r,
2820
2855
  iconOnly: !0,
2821
2856
  "data-testid": `${e}-trigger-button`,
2822
2857
  size: t,
2823
- children: /* @__PURE__ */ z(Mt, { size: "md" })
2858
+ children: /* @__PURE__ */ z(It, { size: "md" })
2824
2859
  }
2825
2860
  );
2826
- return /* @__PURE__ */ z("div", { "data-testid": e, className: h, children: /* @__PURE__ */ z(li, { delayDuration: parseInt(er), children: /* @__PURE__ */ Ye(ui, { open: p, onOpenChange: f, ...u, children: [
2861
+ return /* @__PURE__ */ z("div", { "data-testid": e, className: h, children: /* @__PURE__ */ z(di, { delayDuration: parseInt(rr), children: /* @__PURE__ */ Ge(pi, { open: p, onOpenChange: d, ...u, children: [
2827
2862
  /* @__PURE__ */ z(
2828
- di,
2863
+ hi,
2829
2864
  {
2830
2865
  asChild: !0,
2831
2866
  onClick: (g) => {
2832
- g.preventDefault(), f(!0);
2867
+ g.preventDefault(), d(!0);
2833
2868
  },
2834
- children: ie.count(l) === 0 ? m : l
2869
+ children: se.count(l) === 0 ? m : l
2835
2870
  }
2836
2871
  ),
2837
- /* @__PURE__ */ z(fi, { children: /* @__PURE__ */ Ye(
2838
- pi,
2872
+ /* @__PURE__ */ z(gi, { children: /* @__PURE__ */ Ge(
2873
+ mi,
2839
2874
  {
2840
2875
  side: s,
2841
2876
  align: a,
2842
2877
  className: Xe([
2843
2878
  i,
2844
- `${le}__content`,
2845
- `${le}__content--primary${r ? "-negative" : ""}`
2879
+ `${ue}__content`,
2880
+ `${ue}__content--primary${r ? "-negative" : ""}`
2846
2881
  ]),
2847
2882
  sideOffset: -5,
2848
2883
  "data-testid": `${e}-content`,
2849
2884
  children: [
2850
2885
  typeof n == "string" ? /* @__PURE__ */ z(
2851
- Ht,
2886
+ zt,
2852
2887
  {
2853
- variant: Ft.PARAGRAPH100,
2888
+ variant: Bt.PARAGRAPH100,
2854
2889
  negative: !r,
2855
2890
  "data-testid": `${e}-paragraph`,
2856
2891
  children: n
2857
2892
  }
2858
2893
  ) : n,
2859
2894
  /* @__PURE__ */ z(
2860
- hi,
2895
+ yi,
2861
2896
  {
2862
2897
  className: Xe([
2863
- `${le}__arrow`,
2864
- `${le}__arrow--primary${r ? "-negative" : ""}`
2898
+ `${ue}__arrow`,
2899
+ `${ue}__arrow--primary${r ? "-negative" : ""}`
2865
2900
  ])
2866
2901
  }
2867
2902
  )
@@ -2871,10 +2906,10 @@ const vi = /* @__PURE__ */ gi(mi), yi = "_slideDownAndFade_fkagk_1", xi = "_slid
2871
2906
  ] }) }) });
2872
2907
  }
2873
2908
  );
2874
- Ai.displayName = "Tooltip";
2909
+ Ei.displayName = "Tooltip";
2875
2910
  export {
2876
- Pi as TOOLTIP_ALIGN,
2877
- _i as TOOLTIP_POSITION,
2878
- Ai as Tooltip
2911
+ Ci as TOOLTIP_ALIGN,
2912
+ Oi as TOOLTIP_POSITION,
2913
+ Ei as Tooltip
2879
2914
  };
2880
2915
  //# sourceMappingURL=tooltip.es.js.map