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