@alixpartners/ui-components 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -97
- package/dist/assets/Dropdown.css +1 -1
- package/dist/assets/FilePicker.css +1 -1
- package/dist/assets/main.css +1 -1
- package/dist/components/Creatable/Creatable.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +31 -31
- package/dist/components/FilePicker/FilePicker.d.ts +1 -1
- package/dist/components/FilePicker/FilePicker.js +87 -86
- package/dist/components/NavBar/NavBar.js +1 -1
- package/dist/components/SplitButton/SplitButton.js +1 -1
- package/dist/components/TagsFields/TagsFields.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/{index-D34Qo5Qx.js → index-C-3_YVJ1.js} +473 -478
- package/dist/{index-DZ4Gof57.js → index-C4ffg1vf.js} +1 -1
- package/dist/{index-DgdVwltD.js → index-D_3jWVyV.js} +1 -1
- package/dist/web.config +8 -8
- package/package.json +87 -87
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { useLayoutEffect as
|
|
3
|
-
import * as
|
|
4
|
-
import { P as
|
|
1
|
+
import * as C from "react";
|
|
2
|
+
import { useLayoutEffect as Ee } from "react";
|
|
3
|
+
import * as Le from "react-dom";
|
|
4
|
+
import { P as Rt, d as Gt, b as De, i as _t } from "./index-DM51yNMI.js";
|
|
5
5
|
import { jsx as j } from "react/jsx-runtime";
|
|
6
|
-
import { a as
|
|
7
|
-
import { u as
|
|
8
|
-
const
|
|
6
|
+
import { a as Me } from "./index-7CBv-Jx6.js";
|
|
7
|
+
import { u as Te } from "./index-CxAtPSMM.js";
|
|
8
|
+
const $e = ["top", "right", "bottom", "left"], Z = Math.min, W = Math.max, ft = Math.round, lt = Math.floor, I = (t) => ({
|
|
9
9
|
x: t,
|
|
10
10
|
y: t
|
|
11
|
-
}),
|
|
11
|
+
}), ke = {
|
|
12
12
|
left: "right",
|
|
13
13
|
right: "left",
|
|
14
14
|
bottom: "top",
|
|
15
15
|
top: "bottom"
|
|
16
|
-
},
|
|
16
|
+
}, Fe = {
|
|
17
17
|
start: "end",
|
|
18
18
|
end: "start"
|
|
19
19
|
};
|
|
20
|
-
function
|
|
20
|
+
function vt(t, e, n) {
|
|
21
21
|
return W(t, Z(e, n));
|
|
22
22
|
}
|
|
23
23
|
function q(t, e) {
|
|
@@ -29,54 +29,54 @@ function U(t) {
|
|
|
29
29
|
function tt(t) {
|
|
30
30
|
return t.split("-")[1];
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Ct(t) {
|
|
33
33
|
return t === "x" ? "y" : "x";
|
|
34
34
|
}
|
|
35
35
|
function Ot(t) {
|
|
36
36
|
return t === "y" ? "height" : "width";
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const Ne = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
39
39
|
function z(t) {
|
|
40
|
-
return
|
|
40
|
+
return Ne.has(U(t)) ? "y" : "x";
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return
|
|
42
|
+
function Pt(t) {
|
|
43
|
+
return Ct(z(t));
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function We(t, e, n) {
|
|
46
46
|
n === void 0 && (n = !1);
|
|
47
|
-
const o = tt(t),
|
|
48
|
-
let s =
|
|
49
|
-
return e.reference[
|
|
47
|
+
const o = tt(t), i = Pt(t), r = Ot(i);
|
|
48
|
+
let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
49
|
+
return e.reference[r] > e.floating[r] && (s = ut(s)), [s, ut(s)];
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const e =
|
|
53
|
-
return [
|
|
51
|
+
function He(t) {
|
|
52
|
+
const e = ut(t);
|
|
53
|
+
return [bt(t), e, bt(e)];
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
return t.replace(/start|end/g, (e) =>
|
|
55
|
+
function bt(t) {
|
|
56
|
+
return t.replace(/start|end/g, (e) => Fe[e]);
|
|
57
57
|
}
|
|
58
|
-
const
|
|
59
|
-
function
|
|
58
|
+
const Bt = ["left", "right"], Vt = ["right", "left"], _e = ["top", "bottom"], Be = ["bottom", "top"];
|
|
59
|
+
function Ve(t, e, n) {
|
|
60
60
|
switch (t) {
|
|
61
61
|
case "top":
|
|
62
62
|
case "bottom":
|
|
63
|
-
return n ? e ?
|
|
63
|
+
return n ? e ? Vt : Bt : e ? Bt : Vt;
|
|
64
64
|
case "left":
|
|
65
65
|
case "right":
|
|
66
|
-
return e ?
|
|
66
|
+
return e ? _e : Be;
|
|
67
67
|
default:
|
|
68
68
|
return [];
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
const
|
|
73
|
-
let
|
|
74
|
-
return
|
|
71
|
+
function ze(t, e, n, o) {
|
|
72
|
+
const i = tt(t);
|
|
73
|
+
let r = Ve(U(t), n === "start", o);
|
|
74
|
+
return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(bt)))), r;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
76
|
+
function ut(t) {
|
|
77
|
+
return t.replace(/left|right|bottom|top/g, (e) => ke[e]);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Ie(t) {
|
|
80
80
|
return {
|
|
81
81
|
top: 0,
|
|
82
82
|
right: 0,
|
|
@@ -85,44 +85,44 @@ function ze(t) {
|
|
|
85
85
|
...t
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
return typeof t != "number" ?
|
|
88
|
+
function Jt(t) {
|
|
89
|
+
return typeof t != "number" ? Ie(t) : {
|
|
90
90
|
top: t,
|
|
91
91
|
right: t,
|
|
92
92
|
bottom: t,
|
|
93
93
|
left: t
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function dt(t) {
|
|
97
97
|
const {
|
|
98
98
|
x: e,
|
|
99
99
|
y: n,
|
|
100
100
|
width: o,
|
|
101
|
-
height:
|
|
101
|
+
height: i
|
|
102
102
|
} = t;
|
|
103
103
|
return {
|
|
104
104
|
width: o,
|
|
105
|
-
height:
|
|
105
|
+
height: i,
|
|
106
106
|
top: n,
|
|
107
107
|
left: e,
|
|
108
108
|
right: e + o,
|
|
109
|
-
bottom: n +
|
|
109
|
+
bottom: n + i,
|
|
110
110
|
x: e,
|
|
111
111
|
y: n
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function zt(t, e, n) {
|
|
115
115
|
let {
|
|
116
116
|
reference: o,
|
|
117
|
-
floating:
|
|
117
|
+
floating: i
|
|
118
118
|
} = t;
|
|
119
|
-
const
|
|
119
|
+
const r = z(e), s = Pt(e), c = Ot(s), l = U(e), a = r === "y", f = o.x + o.width / 2 - i.width / 2, u = o.y + o.height / 2 - i.height / 2, p = o[c] / 2 - i[c] / 2;
|
|
120
120
|
let d;
|
|
121
121
|
switch (l) {
|
|
122
122
|
case "top":
|
|
123
123
|
d = {
|
|
124
124
|
x: f,
|
|
125
|
-
y: o.y -
|
|
125
|
+
y: o.y - i.height
|
|
126
126
|
};
|
|
127
127
|
break;
|
|
128
128
|
case "bottom":
|
|
@@ -139,7 +139,7 @@ function Vt(t, e, n) {
|
|
|
139
139
|
break;
|
|
140
140
|
case "left":
|
|
141
141
|
d = {
|
|
142
|
-
x: o.x -
|
|
142
|
+
x: o.x - i.width,
|
|
143
143
|
y: u
|
|
144
144
|
};
|
|
145
145
|
break;
|
|
@@ -159,124 +159,121 @@ function Vt(t, e, n) {
|
|
|
159
159
|
}
|
|
160
160
|
return d;
|
|
161
161
|
}
|
|
162
|
-
async function Ie(t, e) {
|
|
163
|
-
var n;
|
|
164
|
-
e === void 0 && (e = {});
|
|
165
|
-
const {
|
|
166
|
-
x: o,
|
|
167
|
-
y: r,
|
|
168
|
-
platform: i,
|
|
169
|
-
rects: s,
|
|
170
|
-
elements: c,
|
|
171
|
-
strategy: l
|
|
172
|
-
} = t, {
|
|
173
|
-
boundary: a = "clippingAncestors",
|
|
174
|
-
rootBoundary: f = "viewport",
|
|
175
|
-
elementContext: u = "floating",
|
|
176
|
-
altBoundary: p = !1,
|
|
177
|
-
padding: d = 0
|
|
178
|
-
} = q(e, t), m = Gt(d), w = c[p ? u === "floating" ? "reference" : "floating" : u], g = ut(await i.getClippingRect({
|
|
179
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(w))) == null || n ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
180
|
-
boundary: a,
|
|
181
|
-
rootBoundary: f,
|
|
182
|
-
strategy: l
|
|
183
|
-
})), y = u === "floating" ? {
|
|
184
|
-
x: o,
|
|
185
|
-
y: r,
|
|
186
|
-
width: s.floating.width,
|
|
187
|
-
height: s.floating.height
|
|
188
|
-
} : s.reference, v = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), x = await (i.isElement == null ? void 0 : i.isElement(v)) ? await (i.getScale == null ? void 0 : i.getScale(v)) || {
|
|
189
|
-
x: 1,
|
|
190
|
-
y: 1
|
|
191
|
-
} : {
|
|
192
|
-
x: 1,
|
|
193
|
-
y: 1
|
|
194
|
-
}, R = ut(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
195
|
-
elements: c,
|
|
196
|
-
rect: y,
|
|
197
|
-
offsetParent: v,
|
|
198
|
-
strategy: l
|
|
199
|
-
}) : y);
|
|
200
|
-
return {
|
|
201
|
-
top: (g.top - R.top + m.top) / x.y,
|
|
202
|
-
bottom: (R.bottom - g.bottom + m.bottom) / x.y,
|
|
203
|
-
left: (g.left - R.left + m.left) / x.x,
|
|
204
|
-
right: (R.right - g.right + m.right) / x.x
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
162
|
const Xe = async (t, e, n) => {
|
|
208
163
|
const {
|
|
209
164
|
placement: o = "bottom",
|
|
210
|
-
strategy:
|
|
211
|
-
middleware:
|
|
165
|
+
strategy: i = "absolute",
|
|
166
|
+
middleware: r = [],
|
|
212
167
|
platform: s
|
|
213
|
-
} = n, c =
|
|
168
|
+
} = n, c = r.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(e));
|
|
214
169
|
let a = await s.getElementRects({
|
|
215
170
|
reference: t,
|
|
216
171
|
floating: e,
|
|
217
|
-
strategy:
|
|
172
|
+
strategy: i
|
|
218
173
|
}), {
|
|
219
174
|
x: f,
|
|
220
175
|
y: u
|
|
221
|
-
} =
|
|
222
|
-
for (let
|
|
223
|
-
var h;
|
|
176
|
+
} = zt(a, o, l), p = o, d = {}, m = 0;
|
|
177
|
+
for (let h = 0; h < c.length; h++) {
|
|
224
178
|
const {
|
|
225
|
-
name:
|
|
226
|
-
fn:
|
|
227
|
-
} = c[
|
|
228
|
-
x
|
|
229
|
-
y:
|
|
230
|
-
data:
|
|
231
|
-
reset:
|
|
232
|
-
} = await
|
|
179
|
+
name: w,
|
|
180
|
+
fn: g
|
|
181
|
+
} = c[h], {
|
|
182
|
+
x,
|
|
183
|
+
y: b,
|
|
184
|
+
data: y,
|
|
185
|
+
reset: v
|
|
186
|
+
} = await g({
|
|
233
187
|
x: f,
|
|
234
188
|
y: u,
|
|
235
189
|
initialPlacement: o,
|
|
236
190
|
placement: p,
|
|
237
|
-
strategy:
|
|
191
|
+
strategy: i,
|
|
238
192
|
middlewareData: d,
|
|
239
193
|
rects: a,
|
|
240
|
-
platform:
|
|
241
|
-
...s,
|
|
242
|
-
detectOverflow: (h = s.detectOverflow) != null ? h : Ie
|
|
243
|
-
},
|
|
194
|
+
platform: s,
|
|
244
195
|
elements: {
|
|
245
196
|
reference: t,
|
|
246
197
|
floating: e
|
|
247
198
|
}
|
|
248
199
|
});
|
|
249
|
-
f =
|
|
200
|
+
f = x ?? f, u = b ?? u, d = {
|
|
250
201
|
...d,
|
|
251
|
-
[
|
|
252
|
-
...d[
|
|
253
|
-
...
|
|
202
|
+
[w]: {
|
|
203
|
+
...d[w],
|
|
204
|
+
...y
|
|
254
205
|
}
|
|
255
|
-
},
|
|
206
|
+
}, v && m <= 50 && (m++, typeof v == "object" && (v.placement && (p = v.placement), v.rects && (a = v.rects === !0 ? await s.getElementRects({
|
|
256
207
|
reference: t,
|
|
257
208
|
floating: e,
|
|
258
|
-
strategy:
|
|
259
|
-
}) :
|
|
209
|
+
strategy: i
|
|
210
|
+
}) : v.rects), {
|
|
260
211
|
x: f,
|
|
261
212
|
y: u
|
|
262
|
-
} =
|
|
213
|
+
} = zt(a, p, l)), h = -1);
|
|
263
214
|
}
|
|
264
215
|
return {
|
|
265
216
|
x: f,
|
|
266
217
|
y: u,
|
|
267
218
|
placement: p,
|
|
268
|
-
strategy:
|
|
219
|
+
strategy: i,
|
|
269
220
|
middlewareData: d
|
|
270
221
|
};
|
|
271
|
-
}
|
|
222
|
+
};
|
|
223
|
+
async function ot(t, e) {
|
|
224
|
+
var n;
|
|
225
|
+
e === void 0 && (e = {});
|
|
226
|
+
const {
|
|
227
|
+
x: o,
|
|
228
|
+
y: i,
|
|
229
|
+
platform: r,
|
|
230
|
+
rects: s,
|
|
231
|
+
elements: c,
|
|
232
|
+
strategy: l
|
|
233
|
+
} = t, {
|
|
234
|
+
boundary: a = "clippingAncestors",
|
|
235
|
+
rootBoundary: f = "viewport",
|
|
236
|
+
elementContext: u = "floating",
|
|
237
|
+
altBoundary: p = !1,
|
|
238
|
+
padding: d = 0
|
|
239
|
+
} = q(e, t), m = Jt(d), w = c[p ? u === "floating" ? "reference" : "floating" : u], g = dt(await r.getClippingRect({
|
|
240
|
+
element: (n = await (r.isElement == null ? void 0 : r.isElement(w))) == null || n ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
|
|
241
|
+
boundary: a,
|
|
242
|
+
rootBoundary: f,
|
|
243
|
+
strategy: l
|
|
244
|
+
})), x = u === "floating" ? {
|
|
245
|
+
x: o,
|
|
246
|
+
y: i,
|
|
247
|
+
width: s.floating.width,
|
|
248
|
+
height: s.floating.height
|
|
249
|
+
} : s.reference, b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), y = await (r.isElement == null ? void 0 : r.isElement(b)) ? await (r.getScale == null ? void 0 : r.getScale(b)) || {
|
|
250
|
+
x: 1,
|
|
251
|
+
y: 1
|
|
252
|
+
} : {
|
|
253
|
+
x: 1,
|
|
254
|
+
y: 1
|
|
255
|
+
}, v = dt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
256
|
+
elements: c,
|
|
257
|
+
rect: x,
|
|
258
|
+
offsetParent: b,
|
|
259
|
+
strategy: l
|
|
260
|
+
}) : x);
|
|
261
|
+
return {
|
|
262
|
+
top: (g.top - v.top + m.top) / y.y,
|
|
263
|
+
bottom: (v.bottom - g.bottom + m.bottom) / y.y,
|
|
264
|
+
left: (g.left - v.left + m.left) / y.x,
|
|
265
|
+
right: (v.right - g.right + m.right) / y.x
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
const Ye = (t) => ({
|
|
272
269
|
name: "arrow",
|
|
273
270
|
options: t,
|
|
274
271
|
async fn(e) {
|
|
275
272
|
const {
|
|
276
273
|
x: n,
|
|
277
274
|
y: o,
|
|
278
|
-
placement:
|
|
279
|
-
rects:
|
|
275
|
+
placement: i,
|
|
276
|
+
rects: r,
|
|
280
277
|
platform: s,
|
|
281
278
|
elements: c,
|
|
282
279
|
middlewareData: l
|
|
@@ -286,13 +283,13 @@ const Xe = async (t, e, n) => {
|
|
|
286
283
|
} = q(t, e) || {};
|
|
287
284
|
if (a == null)
|
|
288
285
|
return {};
|
|
289
|
-
const u =
|
|
286
|
+
const u = Jt(f), p = {
|
|
290
287
|
x: n,
|
|
291
288
|
y: o
|
|
292
|
-
}, d =
|
|
293
|
-
let
|
|
294
|
-
(!
|
|
295
|
-
const M =
|
|
289
|
+
}, d = Pt(i), m = Ot(d), h = await s.getDimensions(a), w = d === "y", g = w ? "top" : "left", x = w ? "bottom" : "right", b = w ? "clientHeight" : "clientWidth", y = r.reference[m] + r.reference[d] - p[d] - r.floating[m], v = p[d] - r.reference[d], R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
|
|
290
|
+
let O = R ? R[b] : 0;
|
|
291
|
+
(!O || !await (s.isElement == null ? void 0 : s.isElement(R))) && (O = c.floating[b] || r.floating[m]);
|
|
292
|
+
const M = y / 2 - v / 2, F = O / 2 - h[m] / 2 - 1, D = Z(u[g], F), $ = Z(u[x], F), k = D, S = O - h[m] - $, P = O / 2 - h[m] / 2 + M, N = vt(k, P, S), E = !l.arrow && tt(i) != null && P !== N && r.reference[m] / 2 - (P < k ? D : $) - h[m] / 2 < 0, L = E ? P < k ? P - k : P - S : 0;
|
|
296
293
|
return {
|
|
297
294
|
[d]: p[d] + L,
|
|
298
295
|
data: {
|
|
@@ -312,8 +309,8 @@ const Xe = async (t, e, n) => {
|
|
|
312
309
|
async fn(e) {
|
|
313
310
|
var n, o;
|
|
314
311
|
const {
|
|
315
|
-
placement:
|
|
316
|
-
middlewareData:
|
|
312
|
+
placement: i,
|
|
313
|
+
middlewareData: r,
|
|
317
314
|
rects: s,
|
|
318
315
|
initialPlacement: c,
|
|
319
316
|
platform: l,
|
|
@@ -327,25 +324,25 @@ const Xe = async (t, e, n) => {
|
|
|
327
324
|
flipAlignment: h = !0,
|
|
328
325
|
...w
|
|
329
326
|
} = q(t, e);
|
|
330
|
-
if ((n =
|
|
327
|
+
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
331
328
|
return {};
|
|
332
|
-
const g = U(
|
|
333
|
-
!p &&
|
|
334
|
-
const
|
|
335
|
-
let D = ((o =
|
|
329
|
+
const g = U(i), x = z(c), b = U(c) === c, y = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), v = p || (b || !h ? [ut(c)] : He(c)), R = m !== "none";
|
|
330
|
+
!p && R && v.push(...ze(c, h, m, y));
|
|
331
|
+
const O = [c, ...v], M = await ot(e, w), F = [];
|
|
332
|
+
let D = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
336
333
|
if (f && F.push(M[g]), u) {
|
|
337
|
-
const P =
|
|
334
|
+
const P = We(i, s, y);
|
|
338
335
|
F.push(M[P[0]], M[P[1]]);
|
|
339
336
|
}
|
|
340
337
|
if (D = [...D, {
|
|
341
|
-
placement:
|
|
338
|
+
placement: i,
|
|
342
339
|
overflows: F
|
|
343
340
|
}], !F.every((P) => P <= 0)) {
|
|
344
341
|
var $, k;
|
|
345
|
-
const P = ((($ =
|
|
346
|
-
if (N && (!(u === "alignment" ?
|
|
342
|
+
const P = ((($ = r.flip) == null ? void 0 : $.index) || 0) + 1, N = O[P];
|
|
343
|
+
if (N && (!(u === "alignment" ? x !== z(N) : !1) || // We leave the current main axis only if every placement on that axis
|
|
347
344
|
// overflows the main axis.
|
|
348
|
-
D.every((A) => z(A.placement) ===
|
|
345
|
+
D.every((A) => z(A.placement) === x ? A.overflows[0] > 0 : !0)))
|
|
349
346
|
return {
|
|
350
347
|
data: {
|
|
351
348
|
index: P,
|
|
@@ -361,9 +358,9 @@ const Xe = async (t, e, n) => {
|
|
|
361
358
|
case "bestFit": {
|
|
362
359
|
var S;
|
|
363
360
|
const L = (S = D.filter((A) => {
|
|
364
|
-
if (
|
|
361
|
+
if (R) {
|
|
365
362
|
const T = z(A.placement);
|
|
366
|
-
return T ===
|
|
363
|
+
return T === x || // Create a bias to the `y` side axis due to horizontal
|
|
367
364
|
// reading directions favoring greater width.
|
|
368
365
|
T === "y";
|
|
369
366
|
}
|
|
@@ -376,7 +373,7 @@ const Xe = async (t, e, n) => {
|
|
|
376
373
|
E = c;
|
|
377
374
|
break;
|
|
378
375
|
}
|
|
379
|
-
if (
|
|
376
|
+
if (i !== E)
|
|
380
377
|
return {
|
|
381
378
|
reset: {
|
|
382
379
|
placement: E
|
|
@@ -387,7 +384,7 @@ const Xe = async (t, e, n) => {
|
|
|
387
384
|
}
|
|
388
385
|
};
|
|
389
386
|
};
|
|
390
|
-
function
|
|
387
|
+
function It(t, e) {
|
|
391
388
|
return {
|
|
392
389
|
top: t.top - e.height,
|
|
393
390
|
right: t.right - e.width,
|
|
@@ -395,8 +392,8 @@ function zt(t, e) {
|
|
|
395
392
|
left: t.left - e.width
|
|
396
393
|
};
|
|
397
394
|
}
|
|
398
|
-
function
|
|
399
|
-
return
|
|
395
|
+
function Xt(t) {
|
|
396
|
+
return $e.some((e) => t[e] >= 0);
|
|
400
397
|
}
|
|
401
398
|
const qe = function(t) {
|
|
402
399
|
return t === void 0 && (t = {}), {
|
|
@@ -404,34 +401,33 @@ const qe = function(t) {
|
|
|
404
401
|
options: t,
|
|
405
402
|
async fn(e) {
|
|
406
403
|
const {
|
|
407
|
-
rects: n
|
|
408
|
-
platform: o
|
|
404
|
+
rects: n
|
|
409
405
|
} = e, {
|
|
410
|
-
strategy:
|
|
406
|
+
strategy: o = "referenceHidden",
|
|
411
407
|
...i
|
|
412
408
|
} = q(t, e);
|
|
413
|
-
switch (
|
|
409
|
+
switch (o) {
|
|
414
410
|
case "referenceHidden": {
|
|
415
|
-
const
|
|
411
|
+
const r = await ot(e, {
|
|
416
412
|
...i,
|
|
417
413
|
elementContext: "reference"
|
|
418
|
-
}),
|
|
414
|
+
}), s = It(r, n.reference);
|
|
419
415
|
return {
|
|
420
416
|
data: {
|
|
421
|
-
referenceHiddenOffsets:
|
|
422
|
-
referenceHidden:
|
|
417
|
+
referenceHiddenOffsets: s,
|
|
418
|
+
referenceHidden: Xt(s)
|
|
423
419
|
}
|
|
424
420
|
};
|
|
425
421
|
}
|
|
426
422
|
case "escaped": {
|
|
427
|
-
const
|
|
423
|
+
const r = await ot(e, {
|
|
428
424
|
...i,
|
|
429
425
|
altBoundary: !0
|
|
430
|
-
}),
|
|
426
|
+
}), s = It(r, n.floating);
|
|
431
427
|
return {
|
|
432
428
|
data: {
|
|
433
|
-
escapedOffsets:
|
|
434
|
-
escaped:
|
|
429
|
+
escapedOffsets: s,
|
|
430
|
+
escaped: Xt(s)
|
|
435
431
|
}
|
|
436
432
|
};
|
|
437
433
|
}
|
|
@@ -440,13 +436,13 @@ const qe = function(t) {
|
|
|
440
436
|
}
|
|
441
437
|
}
|
|
442
438
|
};
|
|
443
|
-
},
|
|
439
|
+
}, Qt = /* @__PURE__ */ new Set(["left", "top"]);
|
|
444
440
|
async function Ue(t, e) {
|
|
445
441
|
const {
|
|
446
442
|
placement: n,
|
|
447
443
|
platform: o,
|
|
448
|
-
elements:
|
|
449
|
-
} = t,
|
|
444
|
+
elements: i
|
|
445
|
+
} = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = U(n), c = tt(n), l = z(n) === "y", a = Qt.has(s) ? -1 : 1, f = r && l ? -1 : 1, u = q(e, t);
|
|
450
446
|
let {
|
|
451
447
|
mainAxis: p,
|
|
452
448
|
crossAxis: d,
|
|
@@ -475,14 +471,14 @@ const Ze = function(t) {
|
|
|
475
471
|
async fn(e) {
|
|
476
472
|
var n, o;
|
|
477
473
|
const {
|
|
478
|
-
x:
|
|
479
|
-
y:
|
|
474
|
+
x: i,
|
|
475
|
+
y: r,
|
|
480
476
|
placement: s,
|
|
481
477
|
middlewareData: c
|
|
482
478
|
} = e, l = await Ue(e, t);
|
|
483
479
|
return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
484
|
-
x:
|
|
485
|
-
y:
|
|
480
|
+
x: i + l.x,
|
|
481
|
+
y: r + l.y,
|
|
486
482
|
data: {
|
|
487
483
|
...l,
|
|
488
484
|
placement: s
|
|
@@ -498,50 +494,49 @@ const Ze = function(t) {
|
|
|
498
494
|
const {
|
|
499
495
|
x: n,
|
|
500
496
|
y: o,
|
|
501
|
-
placement:
|
|
502
|
-
platform: i
|
|
497
|
+
placement: i
|
|
503
498
|
} = e, {
|
|
504
|
-
mainAxis:
|
|
505
|
-
crossAxis:
|
|
506
|
-
limiter:
|
|
507
|
-
fn: (
|
|
499
|
+
mainAxis: r = !0,
|
|
500
|
+
crossAxis: s = !1,
|
|
501
|
+
limiter: c = {
|
|
502
|
+
fn: (w) => {
|
|
508
503
|
let {
|
|
509
|
-
x:
|
|
510
|
-
y:
|
|
511
|
-
} =
|
|
504
|
+
x: g,
|
|
505
|
+
y: x
|
|
506
|
+
} = w;
|
|
512
507
|
return {
|
|
513
|
-
x:
|
|
514
|
-
y:
|
|
508
|
+
x: g,
|
|
509
|
+
y: x
|
|
515
510
|
};
|
|
516
511
|
}
|
|
517
512
|
},
|
|
518
|
-
...
|
|
519
|
-
} = q(t, e),
|
|
513
|
+
...l
|
|
514
|
+
} = q(t, e), a = {
|
|
520
515
|
x: n,
|
|
521
516
|
y: o
|
|
522
|
-
},
|
|
523
|
-
let
|
|
524
|
-
if (
|
|
525
|
-
const
|
|
526
|
-
|
|
517
|
+
}, f = await ot(e, l), u = z(U(i)), p = Ct(u);
|
|
518
|
+
let d = a[p], m = a[u];
|
|
519
|
+
if (r) {
|
|
520
|
+
const w = p === "y" ? "top" : "left", g = p === "y" ? "bottom" : "right", x = d + f[w], b = d - f[g];
|
|
521
|
+
d = vt(x, d, b);
|
|
527
522
|
}
|
|
528
|
-
if (
|
|
529
|
-
const
|
|
530
|
-
|
|
523
|
+
if (s) {
|
|
524
|
+
const w = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", x = m + f[w], b = m - f[g];
|
|
525
|
+
m = vt(x, m, b);
|
|
531
526
|
}
|
|
532
|
-
const
|
|
527
|
+
const h = c.fn({
|
|
533
528
|
...e,
|
|
534
|
-
[
|
|
535
|
-
[
|
|
529
|
+
[p]: d,
|
|
530
|
+
[u]: m
|
|
536
531
|
});
|
|
537
532
|
return {
|
|
538
|
-
...
|
|
533
|
+
...h,
|
|
539
534
|
data: {
|
|
540
|
-
x:
|
|
541
|
-
y:
|
|
535
|
+
x: h.x - n,
|
|
536
|
+
y: h.y - o,
|
|
542
537
|
enabled: {
|
|
543
|
-
[
|
|
544
|
-
[
|
|
538
|
+
[p]: r,
|
|
539
|
+
[u]: s
|
|
545
540
|
}
|
|
546
541
|
}
|
|
547
542
|
};
|
|
@@ -554,8 +549,8 @@ const Ze = function(t) {
|
|
|
554
549
|
const {
|
|
555
550
|
x: n,
|
|
556
551
|
y: o,
|
|
557
|
-
placement:
|
|
558
|
-
rects:
|
|
552
|
+
placement: i,
|
|
553
|
+
rects: r,
|
|
559
554
|
middlewareData: s
|
|
560
555
|
} = e, {
|
|
561
556
|
offset: c = 0,
|
|
@@ -564,7 +559,7 @@ const Ze = function(t) {
|
|
|
564
559
|
} = q(t, e), f = {
|
|
565
560
|
x: n,
|
|
566
561
|
y: o
|
|
567
|
-
}, u = z(
|
|
562
|
+
}, u = z(i), p = Ct(u);
|
|
568
563
|
let d = f[p], m = f[u];
|
|
569
564
|
const h = q(c, e), w = typeof h == "number" ? {
|
|
570
565
|
mainAxis: h,
|
|
@@ -575,13 +570,13 @@ const Ze = function(t) {
|
|
|
575
570
|
...h
|
|
576
571
|
};
|
|
577
572
|
if (l) {
|
|
578
|
-
const
|
|
579
|
-
d <
|
|
573
|
+
const b = p === "y" ? "height" : "width", y = r.reference[p] - r.floating[b] + w.mainAxis, v = r.reference[p] + r.reference[b] - w.mainAxis;
|
|
574
|
+
d < y ? d = y : d > v && (d = v);
|
|
580
575
|
}
|
|
581
576
|
if (a) {
|
|
582
|
-
var g,
|
|
583
|
-
const
|
|
584
|
-
m <
|
|
577
|
+
var g, x;
|
|
578
|
+
const b = p === "y" ? "width" : "height", y = Qt.has(U(i)), v = r.reference[u] - r.floating[b] + (y && ((g = s.offset) == null ? void 0 : g[u]) || 0) + (y ? 0 : w.crossAxis), R = r.reference[u] + r.reference[b] + (y ? 0 : ((x = s.offset) == null ? void 0 : x[u]) || 0) - (y ? w.crossAxis : 0);
|
|
579
|
+
m < v ? m = v : m > R && (m = R);
|
|
585
580
|
}
|
|
586
581
|
return {
|
|
587
582
|
[p]: d,
|
|
@@ -596,30 +591,30 @@ const Ze = function(t) {
|
|
|
596
591
|
async fn(e) {
|
|
597
592
|
var n, o;
|
|
598
593
|
const {
|
|
599
|
-
placement:
|
|
600
|
-
rects:
|
|
594
|
+
placement: i,
|
|
595
|
+
rects: r,
|
|
601
596
|
platform: s,
|
|
602
597
|
elements: c
|
|
603
598
|
} = e, {
|
|
604
599
|
apply: l = () => {
|
|
605
600
|
},
|
|
606
601
|
...a
|
|
607
|
-
} = q(t, e), f = await
|
|
602
|
+
} = q(t, e), f = await ot(e, a), u = U(i), p = tt(i), d = z(i) === "y", {
|
|
608
603
|
width: m,
|
|
609
604
|
height: h
|
|
610
|
-
} =
|
|
605
|
+
} = r.floating;
|
|
611
606
|
let w, g;
|
|
612
607
|
u === "top" || u === "bottom" ? (w = u, g = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (g = u, w = p === "end" ? "top" : "bottom");
|
|
613
|
-
const
|
|
614
|
-
let
|
|
615
|
-
if ((n = e.middlewareData.shift) != null && n.enabled.x && (M =
|
|
608
|
+
const x = h - f.top - f.bottom, b = m - f.left - f.right, y = Z(h - f[w], x), v = Z(m - f[g], b), R = !e.middlewareData.shift;
|
|
609
|
+
let O = y, M = v;
|
|
610
|
+
if ((n = e.middlewareData.shift) != null && n.enabled.x && (M = b), (o = e.middlewareData.shift) != null && o.enabled.y && (O = x), R && !p) {
|
|
616
611
|
const D = W(f.left, 0), $ = W(f.right, 0), k = W(f.top, 0), S = W(f.bottom, 0);
|
|
617
|
-
d ? M = m - 2 * (D !== 0 || $ !== 0 ? D + $ : W(f.left, f.right)) :
|
|
612
|
+
d ? M = m - 2 * (D !== 0 || $ !== 0 ? D + $ : W(f.left, f.right)) : O = h - 2 * (k !== 0 || S !== 0 ? k + S : W(f.top, f.bottom));
|
|
618
613
|
}
|
|
619
614
|
await l({
|
|
620
615
|
...e,
|
|
621
616
|
availableWidth: M,
|
|
622
|
-
availableHeight:
|
|
617
|
+
availableHeight: O
|
|
623
618
|
});
|
|
624
619
|
const F = await s.getDimensions(c.floating);
|
|
625
620
|
return m !== F.width || h !== F.height ? {
|
|
@@ -630,11 +625,11 @@ const Ze = function(t) {
|
|
|
630
625
|
}
|
|
631
626
|
};
|
|
632
627
|
};
|
|
633
|
-
function
|
|
628
|
+
function pt() {
|
|
634
629
|
return typeof window < "u";
|
|
635
630
|
}
|
|
636
631
|
function et(t) {
|
|
637
|
-
return
|
|
632
|
+
return te(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
638
633
|
}
|
|
639
634
|
function H(t) {
|
|
640
635
|
var e;
|
|
@@ -642,19 +637,19 @@ function H(t) {
|
|
|
642
637
|
}
|
|
643
638
|
function Y(t) {
|
|
644
639
|
var e;
|
|
645
|
-
return (e = (
|
|
640
|
+
return (e = (te(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
646
641
|
}
|
|
647
|
-
function
|
|
648
|
-
return
|
|
642
|
+
function te(t) {
|
|
643
|
+
return pt() ? t instanceof Node || t instanceof H(t).Node : !1;
|
|
649
644
|
}
|
|
650
645
|
function _(t) {
|
|
651
|
-
return
|
|
646
|
+
return pt() ? t instanceof Element || t instanceof H(t).Element : !1;
|
|
652
647
|
}
|
|
653
648
|
function X(t) {
|
|
654
|
-
return
|
|
649
|
+
return pt() ? t instanceof HTMLElement || t instanceof H(t).HTMLElement : !1;
|
|
655
650
|
}
|
|
656
|
-
function
|
|
657
|
-
return !
|
|
651
|
+
function Yt(t) {
|
|
652
|
+
return !pt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof H(t).ShadowRoot;
|
|
658
653
|
}
|
|
659
654
|
const Qe = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
660
655
|
function rt(t) {
|
|
@@ -662,16 +657,16 @@ function rt(t) {
|
|
|
662
657
|
overflow: e,
|
|
663
658
|
overflowX: n,
|
|
664
659
|
overflowY: o,
|
|
665
|
-
display:
|
|
660
|
+
display: i
|
|
666
661
|
} = B(t);
|
|
667
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !Qe.has(
|
|
662
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !Qe.has(i);
|
|
668
663
|
}
|
|
669
664
|
const tn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
670
665
|
function en(t) {
|
|
671
666
|
return tn.has(et(t));
|
|
672
667
|
}
|
|
673
668
|
const nn = [":popover-open", ":modal"];
|
|
674
|
-
function
|
|
669
|
+
function ht(t) {
|
|
675
670
|
return nn.some((e) => {
|
|
676
671
|
try {
|
|
677
672
|
return t.matches(e);
|
|
@@ -681,22 +676,22 @@ function pt(t) {
|
|
|
681
676
|
});
|
|
682
677
|
}
|
|
683
678
|
const on = ["transform", "translate", "scale", "rotate", "perspective"], rn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], sn = ["paint", "layout", "strict", "content"];
|
|
684
|
-
function
|
|
685
|
-
const e =
|
|
679
|
+
function St(t) {
|
|
680
|
+
const e = Et(), n = _(t) ? B(t) : t;
|
|
686
681
|
return on.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || rn.some((o) => (n.willChange || "").includes(o)) || sn.some((o) => (n.contain || "").includes(o));
|
|
687
682
|
}
|
|
688
683
|
function cn(t) {
|
|
689
684
|
let e = K(t);
|
|
690
685
|
for (; X(e) && !Q(e); ) {
|
|
691
|
-
if (
|
|
686
|
+
if (St(e))
|
|
692
687
|
return e;
|
|
693
|
-
if (
|
|
688
|
+
if (ht(e))
|
|
694
689
|
return null;
|
|
695
690
|
e = K(e);
|
|
696
691
|
}
|
|
697
692
|
return null;
|
|
698
693
|
}
|
|
699
|
-
function
|
|
694
|
+
function Et() {
|
|
700
695
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
701
696
|
}
|
|
702
697
|
const ln = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
@@ -706,7 +701,7 @@ function Q(t) {
|
|
|
706
701
|
function B(t) {
|
|
707
702
|
return H(t).getComputedStyle(t);
|
|
708
703
|
}
|
|
709
|
-
function
|
|
704
|
+
function gt(t) {
|
|
710
705
|
return _(t) ? {
|
|
711
706
|
scrollLeft: t.scrollLeft,
|
|
712
707
|
scrollTop: t.scrollTop
|
|
@@ -722,60 +717,60 @@ function K(t) {
|
|
|
722
717
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
723
718
|
t.assignedSlot || // DOM Element detected.
|
|
724
719
|
t.parentNode || // ShadowRoot detected.
|
|
725
|
-
|
|
720
|
+
Yt(t) && t.host || // Fallback.
|
|
726
721
|
Y(t)
|
|
727
722
|
);
|
|
728
|
-
return
|
|
723
|
+
return Yt(e) ? e.host : e;
|
|
729
724
|
}
|
|
730
|
-
function
|
|
725
|
+
function ee(t) {
|
|
731
726
|
const e = K(t);
|
|
732
|
-
return Q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : X(e) && rt(e) ? e :
|
|
727
|
+
return Q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : X(e) && rt(e) ? e : ee(e);
|
|
733
728
|
}
|
|
734
|
-
function
|
|
729
|
+
function it(t, e, n) {
|
|
735
730
|
var o;
|
|
736
731
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
737
|
-
const
|
|
738
|
-
if (
|
|
739
|
-
const c =
|
|
740
|
-
return e.concat(s, s.visualViewport || [], rt(
|
|
732
|
+
const i = ee(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = H(i);
|
|
733
|
+
if (r) {
|
|
734
|
+
const c = At(s);
|
|
735
|
+
return e.concat(s, s.visualViewport || [], rt(i) ? i : [], c && n ? it(c) : []);
|
|
741
736
|
}
|
|
742
|
-
return e.concat(
|
|
737
|
+
return e.concat(i, it(i, [], n));
|
|
743
738
|
}
|
|
744
|
-
function
|
|
739
|
+
function At(t) {
|
|
745
740
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
746
741
|
}
|
|
747
|
-
function
|
|
742
|
+
function ne(t) {
|
|
748
743
|
const e = B(t);
|
|
749
744
|
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
750
|
-
const
|
|
751
|
-
return c && (n =
|
|
745
|
+
const i = X(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, c = ft(n) !== r || ft(o) !== s;
|
|
746
|
+
return c && (n = r, o = s), {
|
|
752
747
|
width: n,
|
|
753
748
|
height: o,
|
|
754
749
|
$: c
|
|
755
750
|
};
|
|
756
751
|
}
|
|
757
|
-
function
|
|
752
|
+
function Lt(t) {
|
|
758
753
|
return _(t) ? t : t.contextElement;
|
|
759
754
|
}
|
|
760
755
|
function J(t) {
|
|
761
|
-
const e =
|
|
756
|
+
const e = Lt(t);
|
|
762
757
|
if (!X(e))
|
|
763
758
|
return I(1);
|
|
764
759
|
const n = e.getBoundingClientRect(), {
|
|
765
760
|
width: o,
|
|
766
|
-
height:
|
|
767
|
-
$:
|
|
768
|
-
} =
|
|
769
|
-
let s = (
|
|
761
|
+
height: i,
|
|
762
|
+
$: r
|
|
763
|
+
} = ne(e);
|
|
764
|
+
let s = (r ? ft(n.width) : n.width) / o, c = (r ? ft(n.height) : n.height) / i;
|
|
770
765
|
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
771
766
|
x: s,
|
|
772
767
|
y: c
|
|
773
768
|
};
|
|
774
769
|
}
|
|
775
770
|
const an = /* @__PURE__ */ I(0);
|
|
776
|
-
function
|
|
771
|
+
function oe(t) {
|
|
777
772
|
const e = H(t);
|
|
778
|
-
return !
|
|
773
|
+
return !Et() || !e.visualViewport ? an : {
|
|
779
774
|
x: e.visualViewport.offsetLeft,
|
|
780
775
|
y: e.visualViewport.offsetTop
|
|
781
776
|
};
|
|
@@ -785,35 +780,35 @@ function fn(t, e, n) {
|
|
|
785
780
|
}
|
|
786
781
|
function G(t, e, n, o) {
|
|
787
782
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
788
|
-
const
|
|
783
|
+
const i = t.getBoundingClientRect(), r = Lt(t);
|
|
789
784
|
let s = I(1);
|
|
790
785
|
e && (o ? _(o) && (s = J(o)) : s = J(t));
|
|
791
|
-
const c = fn(
|
|
792
|
-
let l = (
|
|
793
|
-
if (
|
|
794
|
-
const p = H(
|
|
795
|
-
let m = p, h =
|
|
786
|
+
const c = fn(r, n, o) ? oe(r) : I(0);
|
|
787
|
+
let l = (i.left + c.x) / s.x, a = (i.top + c.y) / s.y, f = i.width / s.x, u = i.height / s.y;
|
|
788
|
+
if (r) {
|
|
789
|
+
const p = H(r), d = o && _(o) ? H(o) : o;
|
|
790
|
+
let m = p, h = At(m);
|
|
796
791
|
for (; h && o && d !== m; ) {
|
|
797
|
-
const w = J(h), g = h.getBoundingClientRect(),
|
|
798
|
-
l *= w.x, a *= w.y, f *= w.x, u *= w.y, l +=
|
|
792
|
+
const w = J(h), g = h.getBoundingClientRect(), x = B(h), b = g.left + (h.clientLeft + parseFloat(x.paddingLeft)) * w.x, y = g.top + (h.clientTop + parseFloat(x.paddingTop)) * w.y;
|
|
793
|
+
l *= w.x, a *= w.y, f *= w.x, u *= w.y, l += b, a += y, m = H(h), h = At(m);
|
|
799
794
|
}
|
|
800
795
|
}
|
|
801
|
-
return
|
|
796
|
+
return dt({
|
|
802
797
|
width: f,
|
|
803
798
|
height: u,
|
|
804
799
|
x: l,
|
|
805
800
|
y: a
|
|
806
801
|
});
|
|
807
802
|
}
|
|
808
|
-
function
|
|
809
|
-
const n =
|
|
803
|
+
function wt(t, e) {
|
|
804
|
+
const n = gt(t).scrollLeft;
|
|
810
805
|
return e ? e.left + n : G(Y(t)).left + n;
|
|
811
806
|
}
|
|
812
|
-
function
|
|
813
|
-
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft -
|
|
807
|
+
function ie(t, e) {
|
|
808
|
+
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - wt(t, n), i = n.top + e.scrollTop;
|
|
814
809
|
return {
|
|
815
810
|
x: o,
|
|
816
|
-
y:
|
|
811
|
+
y: i
|
|
817
812
|
};
|
|
818
813
|
}
|
|
819
814
|
function un(t) {
|
|
@@ -821,21 +816,21 @@ function un(t) {
|
|
|
821
816
|
elements: e,
|
|
822
817
|
rect: n,
|
|
823
818
|
offsetParent: o,
|
|
824
|
-
strategy:
|
|
819
|
+
strategy: i
|
|
825
820
|
} = t;
|
|
826
|
-
const
|
|
827
|
-
if (o === s || c &&
|
|
821
|
+
const r = i === "fixed", s = Y(o), c = e ? ht(e.floating) : !1;
|
|
822
|
+
if (o === s || c && r)
|
|
828
823
|
return n;
|
|
829
824
|
let l = {
|
|
830
825
|
scrollLeft: 0,
|
|
831
826
|
scrollTop: 0
|
|
832
827
|
}, a = I(1);
|
|
833
828
|
const f = I(0), u = X(o);
|
|
834
|
-
if ((u || !u && !
|
|
829
|
+
if ((u || !u && !r) && ((et(o) !== "body" || rt(s)) && (l = gt(o)), X(o))) {
|
|
835
830
|
const d = G(o);
|
|
836
831
|
a = J(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
|
|
837
832
|
}
|
|
838
|
-
const p = s && !u && !
|
|
833
|
+
const p = s && !u && !r ? ie(s, l) : I(0);
|
|
839
834
|
return {
|
|
840
835
|
width: n.width * a.x,
|
|
841
836
|
height: n.height * a.y,
|
|
@@ -847,32 +842,32 @@ function dn(t) {
|
|
|
847
842
|
return Array.from(t.getClientRects());
|
|
848
843
|
}
|
|
849
844
|
function mn(t) {
|
|
850
|
-
const e = Y(t), n =
|
|
851
|
-
let s = -n.scrollLeft +
|
|
845
|
+
const e = Y(t), n = gt(t), o = t.ownerDocument.body, i = W(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = W(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
846
|
+
let s = -n.scrollLeft + wt(t);
|
|
852
847
|
const c = -n.scrollTop;
|
|
853
|
-
return B(o).direction === "rtl" && (s += W(e.clientWidth, o.clientWidth) -
|
|
854
|
-
width:
|
|
855
|
-
height:
|
|
848
|
+
return B(o).direction === "rtl" && (s += W(e.clientWidth, o.clientWidth) - i), {
|
|
849
|
+
width: i,
|
|
850
|
+
height: r,
|
|
856
851
|
x: s,
|
|
857
852
|
y: c
|
|
858
853
|
};
|
|
859
854
|
}
|
|
860
|
-
const
|
|
855
|
+
const jt = 25;
|
|
861
856
|
function pn(t, e) {
|
|
862
|
-
const n = H(t), o = Y(t),
|
|
863
|
-
let
|
|
864
|
-
if (
|
|
865
|
-
|
|
866
|
-
const f =
|
|
867
|
-
(!f || f && e === "fixed") && (c =
|
|
857
|
+
const n = H(t), o = Y(t), i = n.visualViewport;
|
|
858
|
+
let r = o.clientWidth, s = o.clientHeight, c = 0, l = 0;
|
|
859
|
+
if (i) {
|
|
860
|
+
r = i.width, s = i.height;
|
|
861
|
+
const f = Et();
|
|
862
|
+
(!f || f && e === "fixed") && (c = i.offsetLeft, l = i.offsetTop);
|
|
868
863
|
}
|
|
869
|
-
const a =
|
|
864
|
+
const a = wt(o);
|
|
870
865
|
if (a <= 0) {
|
|
871
866
|
const f = o.ownerDocument, u = f.body, p = getComputedStyle(u), d = f.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, m = Math.abs(o.clientWidth - u.clientWidth - d);
|
|
872
|
-
m <=
|
|
873
|
-
} else a <=
|
|
867
|
+
m <= jt && (r -= m);
|
|
868
|
+
} else a <= jt && (r += a);
|
|
874
869
|
return {
|
|
875
|
-
width:
|
|
870
|
+
width: r,
|
|
876
871
|
height: s,
|
|
877
872
|
x: c,
|
|
878
873
|
y: l
|
|
@@ -880,7 +875,7 @@ function pn(t, e) {
|
|
|
880
875
|
}
|
|
881
876
|
const hn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
882
877
|
function gn(t, e) {
|
|
883
|
-
const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop,
|
|
878
|
+
const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = X(t) ? J(t) : I(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, l = i * r.x, a = o * r.y;
|
|
884
879
|
return {
|
|
885
880
|
width: s,
|
|
886
881
|
height: c,
|
|
@@ -888,7 +883,7 @@ function gn(t, e) {
|
|
|
888
883
|
y: a
|
|
889
884
|
};
|
|
890
885
|
}
|
|
891
|
-
function
|
|
886
|
+
function qt(t, e, n) {
|
|
892
887
|
let o;
|
|
893
888
|
if (e === "viewport")
|
|
894
889
|
o = pn(t, n);
|
|
@@ -897,15 +892,15 @@ function jt(t, e, n) {
|
|
|
897
892
|
else if (_(e))
|
|
898
893
|
o = gn(e, n);
|
|
899
894
|
else {
|
|
900
|
-
const
|
|
895
|
+
const i = oe(t);
|
|
901
896
|
o = {
|
|
902
|
-
x: e.x -
|
|
903
|
-
y: e.y -
|
|
897
|
+
x: e.x - i.x,
|
|
898
|
+
y: e.y - i.y,
|
|
904
899
|
width: e.width,
|
|
905
900
|
height: e.height
|
|
906
901
|
};
|
|
907
902
|
}
|
|
908
|
-
return
|
|
903
|
+
return dt(o);
|
|
909
904
|
}
|
|
910
905
|
function re(t, e) {
|
|
911
906
|
const n = K(t);
|
|
@@ -915,12 +910,12 @@ function wn(t, e) {
|
|
|
915
910
|
const n = e.get(t);
|
|
916
911
|
if (n)
|
|
917
912
|
return n;
|
|
918
|
-
let o =
|
|
919
|
-
const
|
|
920
|
-
let s =
|
|
913
|
+
let o = it(t, [], !1).filter((c) => _(c) && et(c) !== "body"), i = null;
|
|
914
|
+
const r = B(t).position === "fixed";
|
|
915
|
+
let s = r ? K(t) : t;
|
|
921
916
|
for (; _(s) && !Q(s); ) {
|
|
922
|
-
const c = B(s), l =
|
|
923
|
-
!l && c.position === "fixed" && (
|
|
917
|
+
const c = B(s), l = St(s);
|
|
918
|
+
!l && c.position === "fixed" && (i = null), (r ? !l && !i : !l && c.position === "static" && !!i && hn.has(i.position) || rt(s) && !l && re(t, s)) ? o = o.filter((f) => f !== s) : i = c, s = K(s);
|
|
924
919
|
}
|
|
925
920
|
return e.set(t, o), o;
|
|
926
921
|
}
|
|
@@ -929,12 +924,12 @@ function xn(t) {
|
|
|
929
924
|
element: e,
|
|
930
925
|
boundary: n,
|
|
931
926
|
rootBoundary: o,
|
|
932
|
-
strategy:
|
|
927
|
+
strategy: i
|
|
933
928
|
} = t;
|
|
934
|
-
const s = [...n === "clippingAncestors" ?
|
|
935
|
-
const u =
|
|
929
|
+
const s = [...n === "clippingAncestors" ? ht(e) ? [] : wn(e, this._c) : [].concat(n), o], c = s[0], l = s.reduce((a, f) => {
|
|
930
|
+
const u = qt(e, f, i);
|
|
936
931
|
return a.top = W(u.top, a.top), a.right = Z(u.right, a.right), a.bottom = Z(u.bottom, a.bottom), a.left = W(u.left, a.left), a;
|
|
937
|
-
},
|
|
932
|
+
}, qt(e, c, i));
|
|
938
933
|
return {
|
|
939
934
|
width: l.right - l.left,
|
|
940
935
|
height: l.bottom - l.top,
|
|
@@ -946,29 +941,29 @@ function yn(t) {
|
|
|
946
941
|
const {
|
|
947
942
|
width: e,
|
|
948
943
|
height: n
|
|
949
|
-
} =
|
|
944
|
+
} = ne(t);
|
|
950
945
|
return {
|
|
951
946
|
width: e,
|
|
952
947
|
height: n
|
|
953
948
|
};
|
|
954
949
|
}
|
|
955
950
|
function vn(t, e, n) {
|
|
956
|
-
const o = X(e),
|
|
951
|
+
const o = X(e), i = Y(e), r = n === "fixed", s = G(t, !0, r, e);
|
|
957
952
|
let c = {
|
|
958
953
|
scrollLeft: 0,
|
|
959
954
|
scrollTop: 0
|
|
960
955
|
};
|
|
961
956
|
const l = I(0);
|
|
962
957
|
function a() {
|
|
963
|
-
l.x =
|
|
958
|
+
l.x = wt(i);
|
|
964
959
|
}
|
|
965
|
-
if (o || !o && !
|
|
966
|
-
if ((et(e) !== "body" || rt(
|
|
967
|
-
const d = G(e, !0,
|
|
960
|
+
if (o || !o && !r)
|
|
961
|
+
if ((et(e) !== "body" || rt(i)) && (c = gt(e)), o) {
|
|
962
|
+
const d = G(e, !0, r, e);
|
|
968
963
|
l.x = d.x + e.clientLeft, l.y = d.y + e.clientTop;
|
|
969
|
-
} else
|
|
970
|
-
|
|
971
|
-
const f =
|
|
964
|
+
} else i && a();
|
|
965
|
+
r && !o && i && a();
|
|
966
|
+
const f = i && !o && !r ? ie(i, c) : I(0), u = s.left + c.scrollLeft - l.x - f.x, p = s.top + c.scrollTop - l.y - f.y;
|
|
972
967
|
return {
|
|
973
968
|
x: u,
|
|
974
969
|
y: p,
|
|
@@ -976,10 +971,10 @@ function vn(t, e, n) {
|
|
|
976
971
|
height: s.height
|
|
977
972
|
};
|
|
978
973
|
}
|
|
979
|
-
function
|
|
974
|
+
function xt(t) {
|
|
980
975
|
return B(t).position === "static";
|
|
981
976
|
}
|
|
982
|
-
function
|
|
977
|
+
function Ut(t, e) {
|
|
983
978
|
if (!X(t) || B(t).position === "fixed")
|
|
984
979
|
return null;
|
|
985
980
|
if (e)
|
|
@@ -987,26 +982,26 @@ function qt(t, e) {
|
|
|
987
982
|
let n = t.offsetParent;
|
|
988
983
|
return Y(t) === n && (n = n.ownerDocument.body), n;
|
|
989
984
|
}
|
|
990
|
-
function
|
|
985
|
+
function se(t, e) {
|
|
991
986
|
const n = H(t);
|
|
992
|
-
if (
|
|
987
|
+
if (ht(t))
|
|
993
988
|
return n;
|
|
994
989
|
if (!X(t)) {
|
|
995
|
-
let
|
|
996
|
-
for (;
|
|
997
|
-
if (_(
|
|
998
|
-
return
|
|
999
|
-
|
|
990
|
+
let i = K(t);
|
|
991
|
+
for (; i && !Q(i); ) {
|
|
992
|
+
if (_(i) && !xt(i))
|
|
993
|
+
return i;
|
|
994
|
+
i = K(i);
|
|
1000
995
|
}
|
|
1001
996
|
return n;
|
|
1002
997
|
}
|
|
1003
|
-
let o =
|
|
1004
|
-
for (; o && en(o) &&
|
|
1005
|
-
o =
|
|
1006
|
-
return o && Q(o) &&
|
|
998
|
+
let o = Ut(t, e);
|
|
999
|
+
for (; o && en(o) && xt(o); )
|
|
1000
|
+
o = Ut(o, e);
|
|
1001
|
+
return o && Q(o) && xt(o) && !St(o) ? n : o || cn(t) || n;
|
|
1007
1002
|
}
|
|
1008
1003
|
const bn = async function(t) {
|
|
1009
|
-
const e = this.getOffsetParent ||
|
|
1004
|
+
const e = this.getOffsetParent || se, n = this.getDimensions, o = await n(t.floating);
|
|
1010
1005
|
return {
|
|
1011
1006
|
reference: vn(t.reference, await e(t.floating), t.strategy),
|
|
1012
1007
|
floating: {
|
|
@@ -1024,7 +1019,7 @@ const Rn = {
|
|
|
1024
1019
|
convertOffsetParentRelativeRectToViewportRelativeRect: un,
|
|
1025
1020
|
getDocumentElement: Y,
|
|
1026
1021
|
getClippingRect: xn,
|
|
1027
|
-
getOffsetParent:
|
|
1022
|
+
getOffsetParent: se,
|
|
1028
1023
|
getElementRects: bn,
|
|
1029
1024
|
getClientRects: dn,
|
|
1030
1025
|
getDimensions: yn,
|
|
@@ -1032,18 +1027,18 @@ const Rn = {
|
|
|
1032
1027
|
isElement: _,
|
|
1033
1028
|
isRTL: An
|
|
1034
1029
|
};
|
|
1035
|
-
function
|
|
1030
|
+
function ce(t, e) {
|
|
1036
1031
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1037
1032
|
}
|
|
1038
|
-
function
|
|
1033
|
+
function Cn(t, e) {
|
|
1039
1034
|
let n = null, o;
|
|
1040
|
-
const
|
|
1041
|
-
function
|
|
1035
|
+
const i = Y(t);
|
|
1036
|
+
function r() {
|
|
1042
1037
|
var c;
|
|
1043
1038
|
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
1044
1039
|
}
|
|
1045
1040
|
function s(c, l) {
|
|
1046
|
-
c === void 0 && (c = !1), l === void 0 && (l = 1),
|
|
1041
|
+
c === void 0 && (c = !1), l === void 0 && (l = 1), r();
|
|
1047
1042
|
const a = t.getBoundingClientRect(), {
|
|
1048
1043
|
left: f,
|
|
1049
1044
|
top: u,
|
|
@@ -1052,126 +1047,126 @@ function On(t, e) {
|
|
|
1052
1047
|
} = a;
|
|
1053
1048
|
if (c || e(), !p || !d)
|
|
1054
1049
|
return;
|
|
1055
|
-
const m =
|
|
1050
|
+
const m = lt(u), h = lt(i.clientWidth - (f + p)), w = lt(i.clientHeight - (u + d)), g = lt(f), b = {
|
|
1056
1051
|
rootMargin: -m + "px " + -h + "px " + -w + "px " + -g + "px",
|
|
1057
1052
|
threshold: W(0, Z(1, l)) || 1
|
|
1058
1053
|
};
|
|
1059
|
-
let
|
|
1060
|
-
function R
|
|
1061
|
-
const
|
|
1062
|
-
if (
|
|
1063
|
-
if (!
|
|
1054
|
+
let y = !0;
|
|
1055
|
+
function v(R) {
|
|
1056
|
+
const O = R[0].intersectionRatio;
|
|
1057
|
+
if (O !== l) {
|
|
1058
|
+
if (!y)
|
|
1064
1059
|
return s();
|
|
1065
|
-
|
|
1060
|
+
O ? s(!1, O) : o = setTimeout(() => {
|
|
1066
1061
|
s(!1, 1e-7);
|
|
1067
1062
|
}, 1e3);
|
|
1068
1063
|
}
|
|
1069
|
-
|
|
1064
|
+
O === 1 && !ce(a, t.getBoundingClientRect()) && s(), y = !1;
|
|
1070
1065
|
}
|
|
1071
1066
|
try {
|
|
1072
|
-
n = new IntersectionObserver(
|
|
1073
|
-
...
|
|
1067
|
+
n = new IntersectionObserver(v, {
|
|
1068
|
+
...b,
|
|
1074
1069
|
// Handle <iframe>s
|
|
1075
|
-
root:
|
|
1070
|
+
root: i.ownerDocument
|
|
1076
1071
|
});
|
|
1077
1072
|
} catch {
|
|
1078
|
-
n = new IntersectionObserver(
|
|
1073
|
+
n = new IntersectionObserver(v, b);
|
|
1079
1074
|
}
|
|
1080
1075
|
n.observe(t);
|
|
1081
1076
|
}
|
|
1082
|
-
return s(!0),
|
|
1077
|
+
return s(!0), r;
|
|
1083
1078
|
}
|
|
1084
|
-
function
|
|
1079
|
+
function On(t, e, n, o) {
|
|
1085
1080
|
o === void 0 && (o = {});
|
|
1086
1081
|
const {
|
|
1087
|
-
ancestorScroll:
|
|
1088
|
-
ancestorResize:
|
|
1082
|
+
ancestorScroll: i = !0,
|
|
1083
|
+
ancestorResize: r = !0,
|
|
1089
1084
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1090
1085
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1091
1086
|
animationFrame: l = !1
|
|
1092
|
-
} = o, a =
|
|
1087
|
+
} = o, a = Lt(t), f = i || r ? [...a ? it(a) : [], ...it(e)] : [];
|
|
1093
1088
|
f.forEach((g) => {
|
|
1094
|
-
|
|
1089
|
+
i && g.addEventListener("scroll", n, {
|
|
1095
1090
|
passive: !0
|
|
1096
|
-
}),
|
|
1091
|
+
}), r && g.addEventListener("resize", n);
|
|
1097
1092
|
});
|
|
1098
|
-
const u = a && c ?
|
|
1093
|
+
const u = a && c ? Cn(a, n) : null;
|
|
1099
1094
|
let p = -1, d = null;
|
|
1100
1095
|
s && (d = new ResizeObserver((g) => {
|
|
1101
|
-
let [
|
|
1102
|
-
|
|
1103
|
-
var
|
|
1104
|
-
(
|
|
1096
|
+
let [x] = g;
|
|
1097
|
+
x && x.target === a && d && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1098
|
+
var b;
|
|
1099
|
+
(b = d) == null || b.observe(e);
|
|
1105
1100
|
})), n();
|
|
1106
1101
|
}), a && !l && d.observe(a), d.observe(e));
|
|
1107
1102
|
let m, h = l ? G(t) : null;
|
|
1108
1103
|
l && w();
|
|
1109
1104
|
function w() {
|
|
1110
1105
|
const g = G(t);
|
|
1111
|
-
h && !
|
|
1106
|
+
h && !ce(h, g) && n(), h = g, m = requestAnimationFrame(w);
|
|
1112
1107
|
}
|
|
1113
1108
|
return n(), () => {
|
|
1114
1109
|
var g;
|
|
1115
|
-
f.forEach((
|
|
1116
|
-
|
|
1110
|
+
f.forEach((x) => {
|
|
1111
|
+
i && x.removeEventListener("scroll", n), r && x.removeEventListener("resize", n);
|
|
1117
1112
|
}), u == null || u(), (g = d) == null || g.disconnect(), d = null, l && cancelAnimationFrame(m);
|
|
1118
1113
|
};
|
|
1119
1114
|
}
|
|
1120
|
-
const Pn = Ze, Sn = Ke, En = je, Ln = Je, Dn = qe,
|
|
1121
|
-
const o = /* @__PURE__ */ new Map(),
|
|
1115
|
+
const Pn = Ze, Sn = Ke, En = je, Ln = Je, Dn = qe, Zt = Ye, Mn = Ge, Tn = (t, e, n) => {
|
|
1116
|
+
const o = /* @__PURE__ */ new Map(), i = {
|
|
1122
1117
|
platform: Rn,
|
|
1123
1118
|
...n
|
|
1124
|
-
},
|
|
1125
|
-
...
|
|
1119
|
+
}, r = {
|
|
1120
|
+
...i.platform,
|
|
1126
1121
|
_c: o
|
|
1127
1122
|
};
|
|
1128
1123
|
return Xe(t, e, {
|
|
1129
|
-
...
|
|
1130
|
-
platform:
|
|
1124
|
+
...i,
|
|
1125
|
+
platform: r
|
|
1131
1126
|
});
|
|
1132
1127
|
};
|
|
1133
1128
|
var $n = typeof document < "u", kn = function() {
|
|
1134
|
-
},
|
|
1135
|
-
function
|
|
1129
|
+
}, at = $n ? Ee : kn;
|
|
1130
|
+
function mt(t, e) {
|
|
1136
1131
|
if (t === e)
|
|
1137
1132
|
return !0;
|
|
1138
1133
|
if (typeof t != typeof e)
|
|
1139
1134
|
return !1;
|
|
1140
1135
|
if (typeof t == "function" && t.toString() === e.toString())
|
|
1141
1136
|
return !0;
|
|
1142
|
-
let n, o,
|
|
1137
|
+
let n, o, i;
|
|
1143
1138
|
if (t && e && typeof t == "object") {
|
|
1144
1139
|
if (Array.isArray(t)) {
|
|
1145
1140
|
if (n = t.length, n !== e.length) return !1;
|
|
1146
1141
|
for (o = n; o-- !== 0; )
|
|
1147
|
-
if (!
|
|
1142
|
+
if (!mt(t[o], e[o]))
|
|
1148
1143
|
return !1;
|
|
1149
1144
|
return !0;
|
|
1150
1145
|
}
|
|
1151
|
-
if (
|
|
1146
|
+
if (i = Object.keys(t), n = i.length, n !== Object.keys(e).length)
|
|
1152
1147
|
return !1;
|
|
1153
1148
|
for (o = n; o-- !== 0; )
|
|
1154
|
-
if (!{}.hasOwnProperty.call(e,
|
|
1149
|
+
if (!{}.hasOwnProperty.call(e, i[o]))
|
|
1155
1150
|
return !1;
|
|
1156
1151
|
for (o = n; o-- !== 0; ) {
|
|
1157
|
-
const
|
|
1158
|
-
if (!(
|
|
1152
|
+
const r = i[o];
|
|
1153
|
+
if (!(r === "_owner" && t.$$typeof) && !mt(t[r], e[r]))
|
|
1159
1154
|
return !1;
|
|
1160
1155
|
}
|
|
1161
1156
|
return !0;
|
|
1162
1157
|
}
|
|
1163
1158
|
return t !== t && e !== e;
|
|
1164
1159
|
}
|
|
1165
|
-
function
|
|
1160
|
+
function le(t) {
|
|
1166
1161
|
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1167
1162
|
}
|
|
1168
|
-
function
|
|
1169
|
-
const n =
|
|
1163
|
+
function Kt(t, e) {
|
|
1164
|
+
const n = le(t);
|
|
1170
1165
|
return Math.round(e * n) / n;
|
|
1171
1166
|
}
|
|
1172
|
-
function
|
|
1173
|
-
const e =
|
|
1174
|
-
return
|
|
1167
|
+
function yt(t) {
|
|
1168
|
+
const e = C.useRef(t);
|
|
1169
|
+
return at(() => {
|
|
1175
1170
|
e.current = t;
|
|
1176
1171
|
}), e;
|
|
1177
1172
|
}
|
|
@@ -1181,36 +1176,36 @@ function Fn(t) {
|
|
|
1181
1176
|
placement: e = "bottom",
|
|
1182
1177
|
strategy: n = "absolute",
|
|
1183
1178
|
middleware: o = [],
|
|
1184
|
-
platform:
|
|
1179
|
+
platform: i,
|
|
1185
1180
|
elements: {
|
|
1186
|
-
reference:
|
|
1181
|
+
reference: r,
|
|
1187
1182
|
floating: s
|
|
1188
1183
|
} = {},
|
|
1189
1184
|
transform: c = !0,
|
|
1190
1185
|
whileElementsMounted: l,
|
|
1191
1186
|
open: a
|
|
1192
|
-
} = t, [f, u] =
|
|
1187
|
+
} = t, [f, u] = C.useState({
|
|
1193
1188
|
x: 0,
|
|
1194
1189
|
y: 0,
|
|
1195
1190
|
strategy: n,
|
|
1196
1191
|
placement: e,
|
|
1197
1192
|
middlewareData: {},
|
|
1198
1193
|
isPositioned: !1
|
|
1199
|
-
}), [p, d] =
|
|
1200
|
-
|
|
1201
|
-
const [m, h] =
|
|
1202
|
-
A !==
|
|
1203
|
-
}, []),
|
|
1204
|
-
A !==
|
|
1205
|
-
}, []),
|
|
1206
|
-
if (!
|
|
1194
|
+
}), [p, d] = C.useState(o);
|
|
1195
|
+
mt(p, o) || d(o);
|
|
1196
|
+
const [m, h] = C.useState(null), [w, g] = C.useState(null), x = C.useCallback((A) => {
|
|
1197
|
+
A !== R.current && (R.current = A, h(A));
|
|
1198
|
+
}, []), b = C.useCallback((A) => {
|
|
1199
|
+
A !== O.current && (O.current = A, g(A));
|
|
1200
|
+
}, []), y = r || m, v = s || w, R = C.useRef(null), O = C.useRef(null), M = C.useRef(f), F = l != null, D = yt(l), $ = yt(i), k = yt(a), S = C.useCallback(() => {
|
|
1201
|
+
if (!R.current || !O.current)
|
|
1207
1202
|
return;
|
|
1208
1203
|
const A = {
|
|
1209
1204
|
placement: e,
|
|
1210
1205
|
strategy: n,
|
|
1211
1206
|
middleware: p
|
|
1212
1207
|
};
|
|
1213
|
-
$.current && (A.platform = $.current), Tn(
|
|
1208
|
+
$.current && (A.platform = $.current), Tn(R.current, O.current, A).then((T) => {
|
|
1214
1209
|
const V = {
|
|
1215
1210
|
...T,
|
|
1216
1211
|
// The floating element's position may be recomputed while it's closed
|
|
@@ -1219,36 +1214,36 @@ function Fn(t) {
|
|
|
1219
1214
|
// setting it to `true` when `open === false` (must be specified).
|
|
1220
1215
|
isPositioned: k.current !== !1
|
|
1221
1216
|
};
|
|
1222
|
-
P.current && !
|
|
1217
|
+
P.current && !mt(M.current, V) && (M.current = V, Le.flushSync(() => {
|
|
1223
1218
|
u(V);
|
|
1224
1219
|
}));
|
|
1225
1220
|
});
|
|
1226
1221
|
}, [p, e, n, $, k]);
|
|
1227
|
-
|
|
1222
|
+
at(() => {
|
|
1228
1223
|
a === !1 && M.current.isPositioned && (M.current.isPositioned = !1, u((A) => ({
|
|
1229
1224
|
...A,
|
|
1230
1225
|
isPositioned: !1
|
|
1231
1226
|
})));
|
|
1232
1227
|
}, [a]);
|
|
1233
|
-
const P =
|
|
1234
|
-
|
|
1228
|
+
const P = C.useRef(!1);
|
|
1229
|
+
at(() => (P.current = !0, () => {
|
|
1235
1230
|
P.current = !1;
|
|
1236
|
-
}), []),
|
|
1237
|
-
if (
|
|
1231
|
+
}), []), at(() => {
|
|
1232
|
+
if (y && (R.current = y), v && (O.current = v), y && v) {
|
|
1238
1233
|
if (D.current)
|
|
1239
|
-
return D.current(
|
|
1234
|
+
return D.current(y, v, S);
|
|
1240
1235
|
S();
|
|
1241
1236
|
}
|
|
1242
|
-
}, [
|
|
1243
|
-
const N =
|
|
1244
|
-
reference:
|
|
1245
|
-
floating:
|
|
1246
|
-
setReference:
|
|
1247
|
-
setFloating:
|
|
1248
|
-
}), [
|
|
1249
|
-
reference:
|
|
1250
|
-
floating:
|
|
1251
|
-
}), [
|
|
1237
|
+
}, [y, v, S, D, F]);
|
|
1238
|
+
const N = C.useMemo(() => ({
|
|
1239
|
+
reference: R,
|
|
1240
|
+
floating: O,
|
|
1241
|
+
setReference: x,
|
|
1242
|
+
setFloating: b
|
|
1243
|
+
}), [x, b]), E = C.useMemo(() => ({
|
|
1244
|
+
reference: y,
|
|
1245
|
+
floating: v
|
|
1246
|
+
}), [y, v]), L = C.useMemo(() => {
|
|
1252
1247
|
const A = {
|
|
1253
1248
|
position: n,
|
|
1254
1249
|
left: 0,
|
|
@@ -1256,11 +1251,11 @@ function Fn(t) {
|
|
|
1256
1251
|
};
|
|
1257
1252
|
if (!E.floating)
|
|
1258
1253
|
return A;
|
|
1259
|
-
const T =
|
|
1254
|
+
const T = Kt(E.floating, f.x), V = Kt(E.floating, f.y);
|
|
1260
1255
|
return c ? {
|
|
1261
1256
|
...A,
|
|
1262
1257
|
transform: "translate(" + T + "px, " + V + "px)",
|
|
1263
|
-
...
|
|
1258
|
+
...le(E.floating) >= 1.5 && {
|
|
1264
1259
|
willChange: "transform"
|
|
1265
1260
|
}
|
|
1266
1261
|
} : {
|
|
@@ -1269,7 +1264,7 @@ function Fn(t) {
|
|
|
1269
1264
|
top: V
|
|
1270
1265
|
};
|
|
1271
1266
|
}, [n, c, E.floating, f.x, f.y]);
|
|
1272
|
-
return
|
|
1267
|
+
return C.useMemo(() => ({
|
|
1273
1268
|
...f,
|
|
1274
1269
|
update: S,
|
|
1275
1270
|
refs: N,
|
|
@@ -1287,14 +1282,14 @@ const Nn = (t) => {
|
|
|
1287
1282
|
fn(n) {
|
|
1288
1283
|
const {
|
|
1289
1284
|
element: o,
|
|
1290
|
-
padding:
|
|
1285
|
+
padding: i
|
|
1291
1286
|
} = typeof t == "function" ? t(n) : t;
|
|
1292
|
-
return o && e(o) ? o.current != null ?
|
|
1287
|
+
return o && e(o) ? o.current != null ? Zt({
|
|
1293
1288
|
element: o.current,
|
|
1294
|
-
padding:
|
|
1295
|
-
}).fn(n) : {} : o ?
|
|
1289
|
+
padding: i
|
|
1290
|
+
}).fn(n) : {} : o ? Zt({
|
|
1296
1291
|
element: o,
|
|
1297
|
-
padding:
|
|
1292
|
+
padding: i
|
|
1298
1293
|
}).fn(n) : {};
|
|
1299
1294
|
}
|
|
1300
1295
|
};
|
|
@@ -1320,45 +1315,45 @@ const Nn = (t) => {
|
|
|
1320
1315
|
...Nn(t),
|
|
1321
1316
|
options: [t, e]
|
|
1322
1317
|
});
|
|
1323
|
-
var Xn = "Arrow",
|
|
1324
|
-
const { children: n, width: o = 10, height:
|
|
1318
|
+
var Xn = "Arrow", ae = C.forwardRef((t, e) => {
|
|
1319
|
+
const { children: n, width: o = 10, height: i = 5, ...r } = t;
|
|
1325
1320
|
return /* @__PURE__ */ j(
|
|
1326
|
-
|
|
1321
|
+
Rt.svg,
|
|
1327
1322
|
{
|
|
1328
|
-
...
|
|
1323
|
+
...r,
|
|
1329
1324
|
ref: e,
|
|
1330
1325
|
width: o,
|
|
1331
|
-
height:
|
|
1326
|
+
height: i,
|
|
1332
1327
|
viewBox: "0 0 30 10",
|
|
1333
1328
|
preserveAspectRatio: "none",
|
|
1334
1329
|
children: t.asChild ? n : /* @__PURE__ */ j("polygon", { points: "0,0 30,0 15,10" })
|
|
1335
1330
|
}
|
|
1336
1331
|
);
|
|
1337
1332
|
});
|
|
1338
|
-
|
|
1339
|
-
var Yn =
|
|
1340
|
-
const { __scopePopper: e, children: n } = t, [o,
|
|
1341
|
-
return /* @__PURE__ */ j(jn, { scope: e, anchor: o, onAnchorChange:
|
|
1333
|
+
ae.displayName = Xn;
|
|
1334
|
+
var Yn = ae, Dt = "Popper", [fe, oo] = De(Dt), [jn, ue] = fe(Dt), de = (t) => {
|
|
1335
|
+
const { __scopePopper: e, children: n } = t, [o, i] = C.useState(null);
|
|
1336
|
+
return /* @__PURE__ */ j(jn, { scope: e, anchor: o, onAnchorChange: i, children: n });
|
|
1342
1337
|
};
|
|
1343
|
-
|
|
1344
|
-
var
|
|
1338
|
+
de.displayName = Dt;
|
|
1339
|
+
var me = "PopperAnchor", pe = C.forwardRef(
|
|
1345
1340
|
(t, e) => {
|
|
1346
|
-
const { __scopePopper: n, virtualRef: o, ...
|
|
1347
|
-
return
|
|
1341
|
+
const { __scopePopper: n, virtualRef: o, ...i } = t, r = ue(me, n), s = C.useRef(null), c = Gt(e, s), l = C.useRef(null);
|
|
1342
|
+
return C.useEffect(() => {
|
|
1348
1343
|
const a = l.current;
|
|
1349
|
-
l.current = (o == null ? void 0 : o.current) || s.current, a !== l.current &&
|
|
1350
|
-
}), o ? null : /* @__PURE__ */ j(
|
|
1344
|
+
l.current = (o == null ? void 0 : o.current) || s.current, a !== l.current && r.onAnchorChange(l.current);
|
|
1345
|
+
}), o ? null : /* @__PURE__ */ j(Rt.div, { ...i, ref: c });
|
|
1351
1346
|
}
|
|
1352
1347
|
);
|
|
1353
|
-
|
|
1354
|
-
var
|
|
1348
|
+
pe.displayName = me;
|
|
1349
|
+
var Mt = "PopperContent", [qn, Un] = fe(Mt), he = C.forwardRef(
|
|
1355
1350
|
(t, e) => {
|
|
1356
|
-
var
|
|
1351
|
+
var Tt, $t, kt, Ft, Nt, Wt;
|
|
1357
1352
|
const {
|
|
1358
1353
|
__scopePopper: n,
|
|
1359
1354
|
side: o = "bottom",
|
|
1360
|
-
sideOffset:
|
|
1361
|
-
align:
|
|
1355
|
+
sideOffset: i = 0,
|
|
1356
|
+
align: r = "center",
|
|
1362
1357
|
alignOffset: s = 0,
|
|
1363
1358
|
arrowPadding: c = 0,
|
|
1364
1359
|
avoidCollisions: l = !0,
|
|
@@ -1369,7 +1364,7 @@ var Dt = "PopperContent", [qn, Un] = ae(Dt), pe = O.forwardRef(
|
|
|
1369
1364
|
updatePositionStrategy: d = "optimized",
|
|
1370
1365
|
onPlaced: m,
|
|
1371
1366
|
...h
|
|
1372
|
-
} = t, w =
|
|
1367
|
+
} = t, w = ue(Mt, n), [g, x] = C.useState(null), b = Gt(e, (nt) => x(nt)), [y, v] = C.useState(null), R = Te(y), O = (R == null ? void 0 : R.width) ?? 0, M = (R == null ? void 0 : R.height) ?? 0, F = o + (r !== "center" ? "-" + r : ""), D = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, $ = Array.isArray(a) ? a : [a], k = $.length > 0, S = {
|
|
1373
1368
|
padding: D,
|
|
1374
1369
|
boundary: $.filter(Kn),
|
|
1375
1370
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
@@ -1378,14 +1373,14 @@ var Dt = "PopperContent", [qn, Un] = ae(Dt), pe = O.forwardRef(
|
|
|
1378
1373
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
1379
1374
|
strategy: "fixed",
|
|
1380
1375
|
placement: F,
|
|
1381
|
-
whileElementsMounted: (...nt) =>
|
|
1376
|
+
whileElementsMounted: (...nt) => On(...nt, {
|
|
1382
1377
|
animationFrame: d === "always"
|
|
1383
1378
|
}),
|
|
1384
1379
|
elements: {
|
|
1385
1380
|
reference: w.anchor
|
|
1386
1381
|
},
|
|
1387
1382
|
middleware: [
|
|
1388
|
-
Wn({ mainAxis:
|
|
1383
|
+
Wn({ mainAxis: i + M, alignmentAxis: s }),
|
|
1389
1384
|
l && Hn({
|
|
1390
1385
|
mainAxis: !0,
|
|
1391
1386
|
crossAxis: !1,
|
|
@@ -1395,22 +1390,22 @@ var Dt = "PopperContent", [qn, Un] = ae(Dt), pe = O.forwardRef(
|
|
|
1395
1390
|
l && Bn({ ...S }),
|
|
1396
1391
|
Vn({
|
|
1397
1392
|
...S,
|
|
1398
|
-
apply: ({ elements: nt, rects:
|
|
1399
|
-
const { width:
|
|
1400
|
-
|
|
1393
|
+
apply: ({ elements: nt, rects: Ht, availableWidth: Ce, availableHeight: Oe }) => {
|
|
1394
|
+
const { width: Pe, height: Se } = Ht.reference, ct = nt.floating.style;
|
|
1395
|
+
ct.setProperty("--radix-popper-available-width", `${Ce}px`), ct.setProperty("--radix-popper-available-height", `${Oe}px`), ct.setProperty("--radix-popper-anchor-width", `${Pe}px`), ct.setProperty("--radix-popper-anchor-height", `${Se}px`);
|
|
1401
1396
|
}
|
|
1402
1397
|
}),
|
|
1403
|
-
|
|
1404
|
-
Gn({ arrowWidth:
|
|
1398
|
+
y && In({ element: y, padding: c }),
|
|
1399
|
+
Gn({ arrowWidth: O, arrowHeight: M }),
|
|
1405
1400
|
p && zn({ strategy: "referenceHidden", ...S })
|
|
1406
1401
|
]
|
|
1407
|
-
}), [T, V] =
|
|
1408
|
-
|
|
1409
|
-
L && (
|
|
1410
|
-
}, [L,
|
|
1411
|
-
const
|
|
1412
|
-
return
|
|
1413
|
-
g &&
|
|
1402
|
+
}), [T, V] = xe(E), st = Me(m);
|
|
1403
|
+
_t(() => {
|
|
1404
|
+
L && (st == null || st());
|
|
1405
|
+
}, [L, st]);
|
|
1406
|
+
const ye = (Tt = A.arrow) == null ? void 0 : Tt.x, ve = ($t = A.arrow) == null ? void 0 : $t.y, be = ((kt = A.arrow) == null ? void 0 : kt.centerOffset) !== 0, [Ae, Re] = C.useState();
|
|
1407
|
+
return _t(() => {
|
|
1408
|
+
g && Re(window.getComputedStyle(g).zIndex);
|
|
1414
1409
|
}, [g]), /* @__PURE__ */ j(
|
|
1415
1410
|
"div",
|
|
1416
1411
|
{
|
|
@@ -1421,15 +1416,15 @@ var Dt = "PopperContent", [qn, Un] = ae(Dt), pe = O.forwardRef(
|
|
|
1421
1416
|
transform: L ? N.transform : "translate(0, -200%)",
|
|
1422
1417
|
// keep off the page when measuring
|
|
1423
1418
|
minWidth: "max-content",
|
|
1424
|
-
zIndex:
|
|
1419
|
+
zIndex: Ae,
|
|
1425
1420
|
"--radix-popper-transform-origin": [
|
|
1426
|
-
(
|
|
1427
|
-
(
|
|
1421
|
+
(Ft = A.transformOrigin) == null ? void 0 : Ft.x,
|
|
1422
|
+
(Nt = A.transformOrigin) == null ? void 0 : Nt.y
|
|
1428
1423
|
].join(" "),
|
|
1429
1424
|
// hide the content if using the hide middleware and should be hidden
|
|
1430
1425
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
1431
1426
|
// as if the PopperContent isn't there at all
|
|
1432
|
-
...((
|
|
1427
|
+
...((Wt = A.hide) == null ? void 0 : Wt.referenceHidden) && {
|
|
1433
1428
|
visibility: "hidden",
|
|
1434
1429
|
pointerEvents: "none"
|
|
1435
1430
|
}
|
|
@@ -1440,17 +1435,17 @@ var Dt = "PopperContent", [qn, Un] = ae(Dt), pe = O.forwardRef(
|
|
|
1440
1435
|
{
|
|
1441
1436
|
scope: n,
|
|
1442
1437
|
placedSide: T,
|
|
1443
|
-
onArrowChange:
|
|
1444
|
-
arrowX:
|
|
1445
|
-
arrowY:
|
|
1446
|
-
shouldHideArrow:
|
|
1438
|
+
onArrowChange: v,
|
|
1439
|
+
arrowX: ye,
|
|
1440
|
+
arrowY: ve,
|
|
1441
|
+
shouldHideArrow: be,
|
|
1447
1442
|
children: /* @__PURE__ */ j(
|
|
1448
|
-
|
|
1443
|
+
Rt.div,
|
|
1449
1444
|
{
|
|
1450
1445
|
"data-side": T,
|
|
1451
1446
|
"data-align": V,
|
|
1452
1447
|
...h,
|
|
1453
|
-
ref:
|
|
1448
|
+
ref: b,
|
|
1454
1449
|
style: {
|
|
1455
1450
|
...h.style,
|
|
1456
1451
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
@@ -1465,14 +1460,14 @@ var Dt = "PopperContent", [qn, Un] = ae(Dt), pe = O.forwardRef(
|
|
|
1465
1460
|
);
|
|
1466
1461
|
}
|
|
1467
1462
|
);
|
|
1468
|
-
|
|
1469
|
-
var
|
|
1463
|
+
he.displayName = Mt;
|
|
1464
|
+
var ge = "PopperArrow", Zn = {
|
|
1470
1465
|
top: "bottom",
|
|
1471
1466
|
right: "left",
|
|
1472
1467
|
bottom: "top",
|
|
1473
1468
|
left: "right"
|
|
1474
|
-
},
|
|
1475
|
-
const { __scopePopper: o, ...
|
|
1469
|
+
}, we = C.forwardRef(function(e, n) {
|
|
1470
|
+
const { __scopePopper: o, ...i } = e, r = Un(ge, o), s = Zn[r.placedSide];
|
|
1476
1471
|
return (
|
|
1477
1472
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
1478
1473
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -1480,33 +1475,33 @@ var he = "PopperArrow", Zn = {
|
|
|
1480
1475
|
/* @__PURE__ */ j(
|
|
1481
1476
|
"span",
|
|
1482
1477
|
{
|
|
1483
|
-
ref:
|
|
1478
|
+
ref: r.onArrowChange,
|
|
1484
1479
|
style: {
|
|
1485
1480
|
position: "absolute",
|
|
1486
|
-
left:
|
|
1487
|
-
top:
|
|
1481
|
+
left: r.arrowX,
|
|
1482
|
+
top: r.arrowY,
|
|
1488
1483
|
[s]: 0,
|
|
1489
1484
|
transformOrigin: {
|
|
1490
1485
|
top: "",
|
|
1491
1486
|
right: "0 0",
|
|
1492
1487
|
bottom: "center 0",
|
|
1493
1488
|
left: "100% 0"
|
|
1494
|
-
}[
|
|
1489
|
+
}[r.placedSide],
|
|
1495
1490
|
transform: {
|
|
1496
1491
|
top: "translateY(100%)",
|
|
1497
1492
|
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
1498
1493
|
bottom: "rotate(180deg)",
|
|
1499
1494
|
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
1500
|
-
}[
|
|
1501
|
-
visibility:
|
|
1495
|
+
}[r.placedSide],
|
|
1496
|
+
visibility: r.shouldHideArrow ? "hidden" : void 0
|
|
1502
1497
|
},
|
|
1503
1498
|
children: /* @__PURE__ */ j(
|
|
1504
1499
|
Yn,
|
|
1505
1500
|
{
|
|
1506
|
-
...
|
|
1501
|
+
...i,
|
|
1507
1502
|
ref: n,
|
|
1508
1503
|
style: {
|
|
1509
|
-
...
|
|
1504
|
+
...i.style,
|
|
1510
1505
|
// ensures the element can be measured correctly (mostly for if SVG)
|
|
1511
1506
|
display: "block"
|
|
1512
1507
|
}
|
|
@@ -1516,7 +1511,7 @@ var he = "PopperArrow", Zn = {
|
|
|
1516
1511
|
)
|
|
1517
1512
|
);
|
|
1518
1513
|
});
|
|
1519
|
-
|
|
1514
|
+
we.displayName = ge;
|
|
1520
1515
|
function Kn(t) {
|
|
1521
1516
|
return t !== null;
|
|
1522
1517
|
}
|
|
@@ -1524,21 +1519,21 @@ var Gn = (t) => ({
|
|
|
1524
1519
|
name: "transformOrigin",
|
|
1525
1520
|
options: t,
|
|
1526
1521
|
fn(e) {
|
|
1527
|
-
var w, g,
|
|
1528
|
-
const { placement: n, rects: o, middlewareData:
|
|
1522
|
+
var w, g, x;
|
|
1523
|
+
const { placement: n, rects: o, middlewareData: i } = e, s = ((w = i.arrow) == null ? void 0 : w.centerOffset) !== 0, c = s ? 0 : t.arrowWidth, l = s ? 0 : t.arrowHeight, [a, f] = xe(n), u = { start: "0%", center: "50%", end: "100%" }[f], p = (((g = i.arrow) == null ? void 0 : g.x) ?? 0) + c / 2, d = (((x = i.arrow) == null ? void 0 : x.y) ?? 0) + l / 2;
|
|
1529
1524
|
let m = "", h = "";
|
|
1530
1525
|
return a === "bottom" ? (m = s ? u : `${p}px`, h = `${-l}px`) : a === "top" ? (m = s ? u : `${p}px`, h = `${o.floating.height + l}px`) : a === "right" ? (m = `${-l}px`, h = s ? u : `${d}px`) : a === "left" && (m = `${o.floating.width + l}px`, h = s ? u : `${d}px`), { data: { x: m, y: h } };
|
|
1531
1526
|
}
|
|
1532
1527
|
});
|
|
1533
|
-
function
|
|
1528
|
+
function xe(t) {
|
|
1534
1529
|
const [e, n = "center"] = t.split("-");
|
|
1535
1530
|
return [e, n];
|
|
1536
1531
|
}
|
|
1537
|
-
var
|
|
1532
|
+
var io = de, ro = pe, so = he, co = we;
|
|
1538
1533
|
export {
|
|
1539
|
-
|
|
1534
|
+
ro as A,
|
|
1540
1535
|
so as C,
|
|
1541
|
-
|
|
1536
|
+
io as R,
|
|
1542
1537
|
co as a,
|
|
1543
1538
|
oo as c
|
|
1544
1539
|
};
|