@odynn/awayz-core 0.3.11 → 0.3.13
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/dist/assets/_styles.css +1 -1
- package/dist/assets/_styles2.css +1 -1
- package/dist/assets/_styles3.css +1 -1
- package/dist/assets/_styles4.css +1 -1
- package/dist/assets/_styles5.css +1 -0
- package/dist/components/Bookings/FlightBooking/FlightBooking.js +2 -2
- package/dist/components/Bookings/HotelBooking/HotelBooking.js +2 -2
- package/dist/components/CashValue/CashValue.js +7 -5
- package/dist/components/CashValue/CashValue.stories.js +14 -13
- package/dist/components/Menu/Menu.js +11 -10
- package/dist/components/Wallet/Card/Card.js +35 -0
- package/dist/components/Wallet/Card/Card.stories.js +62 -0
- package/dist/components/index.js +6 -4
- package/dist/configs/endpoints.js +2 -2
- package/dist/hooks/useBookingManagement/useBookingManagement.js +57 -48
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +40 -39
- package/dist/hooks/useTripManagement/useTripManagement.js +4 -3
- package/dist/hooks/useTripManagement/useTripManagement.test.js +2 -1
- package/dist/hooks/useWallet/useWallet.js +52 -33
- package/dist/hooks/useWallet/useWallet.test.js +85 -15
- package/dist/hooks/useWallet/useWallet.types.js +1 -0
- package/dist/index-BC-KTkxU.js +1571 -0
- package/dist/index-CDh8vAM_.js +132 -0
- package/dist/lib/components/Wallet/Card/Card.d.ts +6 -0
- package/dist/lib/components/Wallet/Card/Card.stories.d.ts +14 -0
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/configs/endpoints.d.ts +2 -0
- package/dist/lib/hooks/useBookingManagement/mocks/HotelBooking200.json.d.ts +608 -67
- package/dist/lib/hooks/useBookingManagement/useBookingManagement.types.d.ts +8 -0
- package/dist/lib/hooks/useWallet/mocks/AllCardsResponse200.json.d.ts +177 -0
- package/dist/lib/hooks/useWallet/mocks/GetAllProgramsReponse200.json.d.ts +705 -0
- package/dist/lib/hooks/useWallet/mocks/UserCardsResponse200.json.d.ts +139 -0
- package/dist/lib/hooks/useWallet/useWallet.d.ts +2 -16
- package/dist/lib/hooks/useWallet/useWallet.types.d.ts +50 -0
- package/dist/lib/services/wallet/WalletService.d.ts +2 -0
- package/dist/lib/services/wallet/WalletService.types.d.ts +2 -5
- package/dist/main.js +20 -18
- package/dist/providers/AwayzProvider.js +4 -3
- package/dist/services/currency/CurrencyService.js +4 -3
- package/dist/services/wallet/WalletService.js +43 -63
- package/package.json +1 -1
- package/dist/index-COgXcb6p.js +0 -1696
- package/dist/lib/hooks/useWallet/mocks/CardsResponse.json.d.ts +0 -34
package/dist/index-COgXcb6p.js
DELETED
|
@@ -1,1696 +0,0 @@
|
|
|
1
|
-
import * as p from "react";
|
|
2
|
-
import G, { useLayoutEffect as ee, useEffect as ne } from "react";
|
|
3
|
-
import { jsx as oe } from "react/jsx-runtime";
|
|
4
|
-
import { r as ie } from "./index-Cv-wvFlM.js";
|
|
5
|
-
function wn(t, e, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
6
|
-
return function(i) {
|
|
7
|
-
if (t == null || t(i), n === !1 || !i.defaultPrevented)
|
|
8
|
-
return e == null ? void 0 : e(i);
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
function Tt(t, e) {
|
|
12
|
-
if (typeof t == "function")
|
|
13
|
-
return t(e);
|
|
14
|
-
t != null && (t.current = e);
|
|
15
|
-
}
|
|
16
|
-
function re(...t) {
|
|
17
|
-
return (e) => {
|
|
18
|
-
let n = !1;
|
|
19
|
-
const o = t.map((i) => {
|
|
20
|
-
const r = Tt(i, e);
|
|
21
|
-
return !n && typeof r == "function" && (n = !0), r;
|
|
22
|
-
});
|
|
23
|
-
if (n)
|
|
24
|
-
return () => {
|
|
25
|
-
for (let i = 0; i < o.length; i++) {
|
|
26
|
-
const r = o[i];
|
|
27
|
-
typeof r == "function" ? r() : Tt(t[i], null);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function se(...t) {
|
|
33
|
-
return p.useCallback(re(...t), t);
|
|
34
|
-
}
|
|
35
|
-
function yn(t, e = []) {
|
|
36
|
-
let n = [];
|
|
37
|
-
function o(r, s) {
|
|
38
|
-
const c = p.createContext(s), l = n.length;
|
|
39
|
-
n = [...n, s];
|
|
40
|
-
const f = (u) => {
|
|
41
|
-
var y;
|
|
42
|
-
const { scope: m, children: d, ...h } = u, g = ((y = m == null ? void 0 : m[t]) == null ? void 0 : y[l]) || c, w = p.useMemo(() => h, Object.values(h));
|
|
43
|
-
return /* @__PURE__ */ oe(g.Provider, { value: w, children: d });
|
|
44
|
-
};
|
|
45
|
-
f.displayName = r + "Provider";
|
|
46
|
-
function a(u, m) {
|
|
47
|
-
var g;
|
|
48
|
-
const d = ((g = m == null ? void 0 : m[t]) == null ? void 0 : g[l]) || c, h = p.useContext(d);
|
|
49
|
-
if (h) return h;
|
|
50
|
-
if (s !== void 0) return s;
|
|
51
|
-
throw new Error(`\`${u}\` must be used within \`${r}\``);
|
|
52
|
-
}
|
|
53
|
-
return [f, a];
|
|
54
|
-
}
|
|
55
|
-
const i = () => {
|
|
56
|
-
const r = n.map((s) => p.createContext(s));
|
|
57
|
-
return function(c) {
|
|
58
|
-
const l = (c == null ? void 0 : c[t]) || r;
|
|
59
|
-
return p.useMemo(
|
|
60
|
-
() => ({ [`__scope${t}`]: { ...c, [t]: l } }),
|
|
61
|
-
[c, l]
|
|
62
|
-
);
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
return i.scopeName = t, [o, ce(i, ...e)];
|
|
66
|
-
}
|
|
67
|
-
function ce(...t) {
|
|
68
|
-
const e = t[0];
|
|
69
|
-
if (t.length === 1) return e;
|
|
70
|
-
const n = () => {
|
|
71
|
-
const o = t.map((i) => ({
|
|
72
|
-
useScope: i(),
|
|
73
|
-
scopeName: i.scopeName
|
|
74
|
-
}));
|
|
75
|
-
return function(r) {
|
|
76
|
-
const s = o.reduce((c, { useScope: l, scopeName: f }) => {
|
|
77
|
-
const u = l(r)[`__scope${f}`];
|
|
78
|
-
return { ...c, ...u };
|
|
79
|
-
}, {});
|
|
80
|
-
return p.useMemo(() => ({ [`__scope${e.scopeName}`]: s }), [s]);
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
return n.scopeName = e.scopeName, n;
|
|
84
|
-
}
|
|
85
|
-
function le(t) {
|
|
86
|
-
const e = p.useRef(t);
|
|
87
|
-
return p.useEffect(() => {
|
|
88
|
-
e.current = t;
|
|
89
|
-
}), p.useMemo(() => (...n) => {
|
|
90
|
-
var o;
|
|
91
|
-
return (o = e.current) == null ? void 0 : o.call(e, ...n);
|
|
92
|
-
}, []);
|
|
93
|
-
}
|
|
94
|
-
function xn(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
95
|
-
const n = le(t);
|
|
96
|
-
p.useEffect(() => {
|
|
97
|
-
const o = (i) => {
|
|
98
|
-
i.key === "Escape" && n(i);
|
|
99
|
-
};
|
|
100
|
-
return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
|
|
101
|
-
}, [n, e]);
|
|
102
|
-
}
|
|
103
|
-
var nt = globalThis != null && globalThis.document ? p.useLayoutEffect : () => {
|
|
104
|
-
}, fe = p[" useId ".trim().toString()] || (() => {
|
|
105
|
-
}), ae = 0;
|
|
106
|
-
function vn(t) {
|
|
107
|
-
const [e, n] = p.useState(fe());
|
|
108
|
-
return nt(() => {
|
|
109
|
-
n((o) => o ?? String(ae++));
|
|
110
|
-
}, [t]), e ? `radix-${e}` : "";
|
|
111
|
-
}
|
|
112
|
-
const ue = ["top", "right", "bottom", "left"], K = Math.min, k = Math.max, ft = Math.round, st = Math.floor, I = (t) => ({
|
|
113
|
-
x: t,
|
|
114
|
-
y: t
|
|
115
|
-
}), de = {
|
|
116
|
-
left: "right",
|
|
117
|
-
right: "left",
|
|
118
|
-
bottom: "top",
|
|
119
|
-
top: "bottom"
|
|
120
|
-
}, me = {
|
|
121
|
-
start: "end",
|
|
122
|
-
end: "start"
|
|
123
|
-
};
|
|
124
|
-
function bt(t, e, n) {
|
|
125
|
-
return k(t, K(e, n));
|
|
126
|
-
}
|
|
127
|
-
function Y(t, e) {
|
|
128
|
-
return typeof t == "function" ? t(e) : t;
|
|
129
|
-
}
|
|
130
|
-
function q(t) {
|
|
131
|
-
return t.split("-")[0];
|
|
132
|
-
}
|
|
133
|
-
function tt(t) {
|
|
134
|
-
return t.split("-")[1];
|
|
135
|
-
}
|
|
136
|
-
function Rt(t) {
|
|
137
|
-
return t === "x" ? "y" : "x";
|
|
138
|
-
}
|
|
139
|
-
function St(t) {
|
|
140
|
-
return t === "y" ? "height" : "width";
|
|
141
|
-
}
|
|
142
|
-
function U(t) {
|
|
143
|
-
return ["top", "bottom"].includes(q(t)) ? "y" : "x";
|
|
144
|
-
}
|
|
145
|
-
function Ct(t) {
|
|
146
|
-
return Rt(U(t));
|
|
147
|
-
}
|
|
148
|
-
function he(t, e, n) {
|
|
149
|
-
n === void 0 && (n = !1);
|
|
150
|
-
const o = tt(t), i = Ct(t), r = St(i);
|
|
151
|
-
let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
152
|
-
return e.reference[r] > e.floating[r] && (s = at(s)), [s, at(s)];
|
|
153
|
-
}
|
|
154
|
-
function ge(t) {
|
|
155
|
-
const e = at(t);
|
|
156
|
-
return [Ot(t), e, Ot(e)];
|
|
157
|
-
}
|
|
158
|
-
function Ot(t) {
|
|
159
|
-
return t.replace(/start|end/g, (e) => me[e]);
|
|
160
|
-
}
|
|
161
|
-
function pe(t, e, n) {
|
|
162
|
-
const o = ["left", "right"], i = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
|
|
163
|
-
switch (t) {
|
|
164
|
-
case "top":
|
|
165
|
-
case "bottom":
|
|
166
|
-
return n ? e ? i : o : e ? o : i;
|
|
167
|
-
case "left":
|
|
168
|
-
case "right":
|
|
169
|
-
return e ? r : s;
|
|
170
|
-
default:
|
|
171
|
-
return [];
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
function we(t, e, n, o) {
|
|
175
|
-
const i = tt(t);
|
|
176
|
-
let r = pe(q(t), n === "start", o);
|
|
177
|
-
return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(Ot)))), r;
|
|
178
|
-
}
|
|
179
|
-
function at(t) {
|
|
180
|
-
return t.replace(/left|right|bottom|top/g, (e) => de[e]);
|
|
181
|
-
}
|
|
182
|
-
function ye(t) {
|
|
183
|
-
return {
|
|
184
|
-
top: 0,
|
|
185
|
-
right: 0,
|
|
186
|
-
bottom: 0,
|
|
187
|
-
left: 0,
|
|
188
|
-
...t
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
function It(t) {
|
|
192
|
-
return typeof t != "number" ? ye(t) : {
|
|
193
|
-
top: t,
|
|
194
|
-
right: t,
|
|
195
|
-
bottom: t,
|
|
196
|
-
left: t
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
function ut(t) {
|
|
200
|
-
const {
|
|
201
|
-
x: e,
|
|
202
|
-
y: n,
|
|
203
|
-
width: o,
|
|
204
|
-
height: i
|
|
205
|
-
} = t;
|
|
206
|
-
return {
|
|
207
|
-
width: o,
|
|
208
|
-
height: i,
|
|
209
|
-
top: n,
|
|
210
|
-
left: e,
|
|
211
|
-
right: e + o,
|
|
212
|
-
bottom: n + i,
|
|
213
|
-
x: e,
|
|
214
|
-
y: n
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
function Nt(t, e, n) {
|
|
218
|
-
let {
|
|
219
|
-
reference: o,
|
|
220
|
-
floating: i
|
|
221
|
-
} = t;
|
|
222
|
-
const r = U(e), s = Ct(e), c = St(s), l = q(e), f = r === "y", a = o.x + o.width / 2 - i.width / 2, u = o.y + o.height / 2 - i.height / 2, m = o[c] / 2 - i[c] / 2;
|
|
223
|
-
let d;
|
|
224
|
-
switch (l) {
|
|
225
|
-
case "top":
|
|
226
|
-
d = {
|
|
227
|
-
x: a,
|
|
228
|
-
y: o.y - i.height
|
|
229
|
-
};
|
|
230
|
-
break;
|
|
231
|
-
case "bottom":
|
|
232
|
-
d = {
|
|
233
|
-
x: a,
|
|
234
|
-
y: o.y + o.height
|
|
235
|
-
};
|
|
236
|
-
break;
|
|
237
|
-
case "right":
|
|
238
|
-
d = {
|
|
239
|
-
x: o.x + o.width,
|
|
240
|
-
y: u
|
|
241
|
-
};
|
|
242
|
-
break;
|
|
243
|
-
case "left":
|
|
244
|
-
d = {
|
|
245
|
-
x: o.x - i.width,
|
|
246
|
-
y: u
|
|
247
|
-
};
|
|
248
|
-
break;
|
|
249
|
-
default:
|
|
250
|
-
d = {
|
|
251
|
-
x: o.x,
|
|
252
|
-
y: o.y
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
switch (tt(e)) {
|
|
256
|
-
case "start":
|
|
257
|
-
d[s] -= m * (n && f ? -1 : 1);
|
|
258
|
-
break;
|
|
259
|
-
case "end":
|
|
260
|
-
d[s] += m * (n && f ? -1 : 1);
|
|
261
|
-
break;
|
|
262
|
-
}
|
|
263
|
-
return d;
|
|
264
|
-
}
|
|
265
|
-
const xe = async (t, e, n) => {
|
|
266
|
-
const {
|
|
267
|
-
placement: o = "bottom",
|
|
268
|
-
strategy: i = "absolute",
|
|
269
|
-
middleware: r = [],
|
|
270
|
-
platform: s
|
|
271
|
-
} = n, c = r.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(e));
|
|
272
|
-
let f = await s.getElementRects({
|
|
273
|
-
reference: t,
|
|
274
|
-
floating: e,
|
|
275
|
-
strategy: i
|
|
276
|
-
}), {
|
|
277
|
-
x: a,
|
|
278
|
-
y: u
|
|
279
|
-
} = Nt(f, o, l), m = o, d = {}, h = 0;
|
|
280
|
-
for (let g = 0; g < c.length; g++) {
|
|
281
|
-
const {
|
|
282
|
-
name: w,
|
|
283
|
-
fn: y
|
|
284
|
-
} = c[g], {
|
|
285
|
-
x: v,
|
|
286
|
-
y: b,
|
|
287
|
-
data: O,
|
|
288
|
-
reset: x
|
|
289
|
-
} = await y({
|
|
290
|
-
x: a,
|
|
291
|
-
y: u,
|
|
292
|
-
initialPlacement: o,
|
|
293
|
-
placement: m,
|
|
294
|
-
strategy: i,
|
|
295
|
-
middlewareData: d,
|
|
296
|
-
rects: f,
|
|
297
|
-
platform: s,
|
|
298
|
-
elements: {
|
|
299
|
-
reference: t,
|
|
300
|
-
floating: e
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
a = v ?? a, u = b ?? u, d = {
|
|
304
|
-
...d,
|
|
305
|
-
[w]: {
|
|
306
|
-
...d[w],
|
|
307
|
-
...O
|
|
308
|
-
}
|
|
309
|
-
}, x && h <= 50 && (h++, typeof x == "object" && (x.placement && (m = x.placement), x.rects && (f = x.rects === !0 ? await s.getElementRects({
|
|
310
|
-
reference: t,
|
|
311
|
-
floating: e,
|
|
312
|
-
strategy: i
|
|
313
|
-
}) : x.rects), {
|
|
314
|
-
x: a,
|
|
315
|
-
y: u
|
|
316
|
-
} = Nt(f, m, l)), g = -1);
|
|
317
|
-
}
|
|
318
|
-
return {
|
|
319
|
-
x: a,
|
|
320
|
-
y: u,
|
|
321
|
-
placement: m,
|
|
322
|
-
strategy: i,
|
|
323
|
-
middlewareData: d
|
|
324
|
-
};
|
|
325
|
-
};
|
|
326
|
-
async function ot(t, e) {
|
|
327
|
-
var n;
|
|
328
|
-
e === void 0 && (e = {});
|
|
329
|
-
const {
|
|
330
|
-
x: o,
|
|
331
|
-
y: i,
|
|
332
|
-
platform: r,
|
|
333
|
-
rects: s,
|
|
334
|
-
elements: c,
|
|
335
|
-
strategy: l
|
|
336
|
-
} = t, {
|
|
337
|
-
boundary: f = "clippingAncestors",
|
|
338
|
-
rootBoundary: a = "viewport",
|
|
339
|
-
elementContext: u = "floating",
|
|
340
|
-
altBoundary: m = !1,
|
|
341
|
-
padding: d = 0
|
|
342
|
-
} = Y(e, t), h = It(d), w = c[m ? u === "floating" ? "reference" : "floating" : u], y = ut(await r.getClippingRect({
|
|
343
|
-
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)),
|
|
344
|
-
boundary: f,
|
|
345
|
-
rootBoundary: a,
|
|
346
|
-
strategy: l
|
|
347
|
-
})), v = u === "floating" ? {
|
|
348
|
-
x: o,
|
|
349
|
-
y: i,
|
|
350
|
-
width: s.floating.width,
|
|
351
|
-
height: s.floating.height
|
|
352
|
-
} : s.reference, b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), O = await (r.isElement == null ? void 0 : r.isElement(b)) ? await (r.getScale == null ? void 0 : r.getScale(b)) || {
|
|
353
|
-
x: 1,
|
|
354
|
-
y: 1
|
|
355
|
-
} : {
|
|
356
|
-
x: 1,
|
|
357
|
-
y: 1
|
|
358
|
-
}, x = ut(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
359
|
-
elements: c,
|
|
360
|
-
rect: v,
|
|
361
|
-
offsetParent: b,
|
|
362
|
-
strategy: l
|
|
363
|
-
}) : v);
|
|
364
|
-
return {
|
|
365
|
-
top: (y.top - x.top + h.top) / O.y,
|
|
366
|
-
bottom: (x.bottom - y.bottom + h.bottom) / O.y,
|
|
367
|
-
left: (y.left - x.left + h.left) / O.x,
|
|
368
|
-
right: (x.right - y.right + h.right) / O.x
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
const ve = (t) => ({
|
|
372
|
-
name: "arrow",
|
|
373
|
-
options: t,
|
|
374
|
-
async fn(e) {
|
|
375
|
-
const {
|
|
376
|
-
x: n,
|
|
377
|
-
y: o,
|
|
378
|
-
placement: i,
|
|
379
|
-
rects: r,
|
|
380
|
-
platform: s,
|
|
381
|
-
elements: c,
|
|
382
|
-
middlewareData: l
|
|
383
|
-
} = e, {
|
|
384
|
-
element: f,
|
|
385
|
-
padding: a = 0
|
|
386
|
-
} = Y(t, e) || {};
|
|
387
|
-
if (f == null)
|
|
388
|
-
return {};
|
|
389
|
-
const u = It(a), m = {
|
|
390
|
-
x: n,
|
|
391
|
-
y: o
|
|
392
|
-
}, d = Ct(i), h = St(d), g = await s.getDimensions(f), w = d === "y", y = w ? "top" : "left", v = w ? "bottom" : "right", b = w ? "clientHeight" : "clientWidth", O = r.reference[h] + r.reference[d] - m[d] - r.floating[h], x = m[d] - r.reference[d], S = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(f));
|
|
393
|
-
let R = S ? S[b] : 0;
|
|
394
|
-
(!R || !await (s.isElement == null ? void 0 : s.isElement(S))) && (R = c.floating[b] || r.floating[h]);
|
|
395
|
-
const L = O / 2 - x / 2, _ = R / 2 - g[h] / 2 - 1, C = K(u[y], _), j = K(u[v], _), F = C, T = R - g[h] - j, N = R / 2 - g[h] / 2 + L, D = bt(F, N, T), P = !l.arrow && tt(i) != null && N !== D && r.reference[h] / 2 - (N < F ? C : j) - g[h] / 2 < 0, $ = P ? N < F ? N - F : N - T : 0;
|
|
396
|
-
return {
|
|
397
|
-
[d]: m[d] + $,
|
|
398
|
-
data: {
|
|
399
|
-
[d]: D,
|
|
400
|
-
centerOffset: N - D - $,
|
|
401
|
-
...P && {
|
|
402
|
-
alignmentOffset: $
|
|
403
|
-
}
|
|
404
|
-
},
|
|
405
|
-
reset: P
|
|
406
|
-
};
|
|
407
|
-
}
|
|
408
|
-
}), be = function(t) {
|
|
409
|
-
return t === void 0 && (t = {}), {
|
|
410
|
-
name: "flip",
|
|
411
|
-
options: t,
|
|
412
|
-
async fn(e) {
|
|
413
|
-
var n, o;
|
|
414
|
-
const {
|
|
415
|
-
placement: i,
|
|
416
|
-
middlewareData: r,
|
|
417
|
-
rects: s,
|
|
418
|
-
initialPlacement: c,
|
|
419
|
-
platform: l,
|
|
420
|
-
elements: f
|
|
421
|
-
} = e, {
|
|
422
|
-
mainAxis: a = !0,
|
|
423
|
-
crossAxis: u = !0,
|
|
424
|
-
fallbackPlacements: m,
|
|
425
|
-
fallbackStrategy: d = "bestFit",
|
|
426
|
-
fallbackAxisSideDirection: h = "none",
|
|
427
|
-
flipAlignment: g = !0,
|
|
428
|
-
...w
|
|
429
|
-
} = Y(t, e);
|
|
430
|
-
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
431
|
-
return {};
|
|
432
|
-
const y = q(i), v = U(c), b = q(c) === c, O = await (l.isRTL == null ? void 0 : l.isRTL(f.floating)), x = m || (b || !g ? [at(c)] : ge(c)), S = h !== "none";
|
|
433
|
-
!m && S && x.push(...we(c, g, h, O));
|
|
434
|
-
const R = [c, ...x], L = await ot(e, w), _ = [];
|
|
435
|
-
let C = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
436
|
-
if (a && _.push(L[y]), u) {
|
|
437
|
-
const D = he(i, s, O);
|
|
438
|
-
_.push(L[D[0]], L[D[1]]);
|
|
439
|
-
}
|
|
440
|
-
if (C = [...C, {
|
|
441
|
-
placement: i,
|
|
442
|
-
overflows: _
|
|
443
|
-
}], !_.every((D) => D <= 0)) {
|
|
444
|
-
var j, F;
|
|
445
|
-
const D = (((j = r.flip) == null ? void 0 : j.index) || 0) + 1, P = R[D];
|
|
446
|
-
if (P) {
|
|
447
|
-
var T;
|
|
448
|
-
const A = u === "alignment" ? v !== U(P) : !1, E = ((T = C[0]) == null ? void 0 : T.overflows[0]) > 0;
|
|
449
|
-
if (!A || E)
|
|
450
|
-
return {
|
|
451
|
-
data: {
|
|
452
|
-
index: D,
|
|
453
|
-
overflows: C
|
|
454
|
-
},
|
|
455
|
-
reset: {
|
|
456
|
-
placement: P
|
|
457
|
-
}
|
|
458
|
-
};
|
|
459
|
-
}
|
|
460
|
-
let $ = (F = C.filter((A) => A.overflows[0] <= 0).sort((A, E) => A.overflows[1] - E.overflows[1])[0]) == null ? void 0 : F.placement;
|
|
461
|
-
if (!$)
|
|
462
|
-
switch (d) {
|
|
463
|
-
case "bestFit": {
|
|
464
|
-
var N;
|
|
465
|
-
const A = (N = C.filter((E) => {
|
|
466
|
-
if (S) {
|
|
467
|
-
const M = U(E.placement);
|
|
468
|
-
return M === v || // Create a bias to the `y` side axis due to horizontal
|
|
469
|
-
// reading directions favoring greater width.
|
|
470
|
-
M === "y";
|
|
471
|
-
}
|
|
472
|
-
return !0;
|
|
473
|
-
}).map((E) => [E.placement, E.overflows.filter((M) => M > 0).reduce((M, te) => M + te, 0)]).sort((E, M) => E[1] - M[1])[0]) == null ? void 0 : N[0];
|
|
474
|
-
A && ($ = A);
|
|
475
|
-
break;
|
|
476
|
-
}
|
|
477
|
-
case "initialPlacement":
|
|
478
|
-
$ = c;
|
|
479
|
-
break;
|
|
480
|
-
}
|
|
481
|
-
if (i !== $)
|
|
482
|
-
return {
|
|
483
|
-
reset: {
|
|
484
|
-
placement: $
|
|
485
|
-
}
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
return {};
|
|
489
|
-
}
|
|
490
|
-
};
|
|
491
|
-
};
|
|
492
|
-
function Dt(t, e) {
|
|
493
|
-
return {
|
|
494
|
-
top: t.top - e.height,
|
|
495
|
-
right: t.right - e.width,
|
|
496
|
-
bottom: t.bottom - e.height,
|
|
497
|
-
left: t.left - e.width
|
|
498
|
-
};
|
|
499
|
-
}
|
|
500
|
-
function Ft(t) {
|
|
501
|
-
return ue.some((e) => t[e] >= 0);
|
|
502
|
-
}
|
|
503
|
-
const Oe = function(t) {
|
|
504
|
-
return t === void 0 && (t = {}), {
|
|
505
|
-
name: "hide",
|
|
506
|
-
options: t,
|
|
507
|
-
async fn(e) {
|
|
508
|
-
const {
|
|
509
|
-
rects: n
|
|
510
|
-
} = e, {
|
|
511
|
-
strategy: o = "referenceHidden",
|
|
512
|
-
...i
|
|
513
|
-
} = Y(t, e);
|
|
514
|
-
switch (o) {
|
|
515
|
-
case "referenceHidden": {
|
|
516
|
-
const r = await ot(e, {
|
|
517
|
-
...i,
|
|
518
|
-
elementContext: "reference"
|
|
519
|
-
}), s = Dt(r, n.reference);
|
|
520
|
-
return {
|
|
521
|
-
data: {
|
|
522
|
-
referenceHiddenOffsets: s,
|
|
523
|
-
referenceHidden: Ft(s)
|
|
524
|
-
}
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
case "escaped": {
|
|
528
|
-
const r = await ot(e, {
|
|
529
|
-
...i,
|
|
530
|
-
altBoundary: !0
|
|
531
|
-
}), s = Dt(r, n.floating);
|
|
532
|
-
return {
|
|
533
|
-
data: {
|
|
534
|
-
escapedOffsets: s,
|
|
535
|
-
escaped: Ft(s)
|
|
536
|
-
}
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
default:
|
|
540
|
-
return {};
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
};
|
|
544
|
-
};
|
|
545
|
-
async function Ae(t, e) {
|
|
546
|
-
const {
|
|
547
|
-
placement: n,
|
|
548
|
-
platform: o,
|
|
549
|
-
elements: i
|
|
550
|
-
} = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = q(n), c = tt(n), l = U(n) === "y", f = ["left", "top"].includes(s) ? -1 : 1, a = r && l ? -1 : 1, u = Y(e, t);
|
|
551
|
-
let {
|
|
552
|
-
mainAxis: m,
|
|
553
|
-
crossAxis: d,
|
|
554
|
-
alignmentAxis: h
|
|
555
|
-
} = typeof u == "number" ? {
|
|
556
|
-
mainAxis: u,
|
|
557
|
-
crossAxis: 0,
|
|
558
|
-
alignmentAxis: null
|
|
559
|
-
} : {
|
|
560
|
-
mainAxis: u.mainAxis || 0,
|
|
561
|
-
crossAxis: u.crossAxis || 0,
|
|
562
|
-
alignmentAxis: u.alignmentAxis
|
|
563
|
-
};
|
|
564
|
-
return c && typeof h == "number" && (d = c === "end" ? h * -1 : h), l ? {
|
|
565
|
-
x: d * a,
|
|
566
|
-
y: m * f
|
|
567
|
-
} : {
|
|
568
|
-
x: m * f,
|
|
569
|
-
y: d * a
|
|
570
|
-
};
|
|
571
|
-
}
|
|
572
|
-
const Re = function(t) {
|
|
573
|
-
return t === void 0 && (t = 0), {
|
|
574
|
-
name: "offset",
|
|
575
|
-
options: t,
|
|
576
|
-
async fn(e) {
|
|
577
|
-
var n, o;
|
|
578
|
-
const {
|
|
579
|
-
x: i,
|
|
580
|
-
y: r,
|
|
581
|
-
placement: s,
|
|
582
|
-
middlewareData: c
|
|
583
|
-
} = e, l = await Ae(e, t);
|
|
584
|
-
return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
585
|
-
x: i + l.x,
|
|
586
|
-
y: r + l.y,
|
|
587
|
-
data: {
|
|
588
|
-
...l,
|
|
589
|
-
placement: s
|
|
590
|
-
}
|
|
591
|
-
};
|
|
592
|
-
}
|
|
593
|
-
};
|
|
594
|
-
}, Se = function(t) {
|
|
595
|
-
return t === void 0 && (t = {}), {
|
|
596
|
-
name: "shift",
|
|
597
|
-
options: t,
|
|
598
|
-
async fn(e) {
|
|
599
|
-
const {
|
|
600
|
-
x: n,
|
|
601
|
-
y: o,
|
|
602
|
-
placement: i
|
|
603
|
-
} = e, {
|
|
604
|
-
mainAxis: r = !0,
|
|
605
|
-
crossAxis: s = !1,
|
|
606
|
-
limiter: c = {
|
|
607
|
-
fn: (w) => {
|
|
608
|
-
let {
|
|
609
|
-
x: y,
|
|
610
|
-
y: v
|
|
611
|
-
} = w;
|
|
612
|
-
return {
|
|
613
|
-
x: y,
|
|
614
|
-
y: v
|
|
615
|
-
};
|
|
616
|
-
}
|
|
617
|
-
},
|
|
618
|
-
...l
|
|
619
|
-
} = Y(t, e), f = {
|
|
620
|
-
x: n,
|
|
621
|
-
y: o
|
|
622
|
-
}, a = await ot(e, l), u = U(q(i)), m = Rt(u);
|
|
623
|
-
let d = f[m], h = f[u];
|
|
624
|
-
if (r) {
|
|
625
|
-
const w = m === "y" ? "top" : "left", y = m === "y" ? "bottom" : "right", v = d + a[w], b = d - a[y];
|
|
626
|
-
d = bt(v, d, b);
|
|
627
|
-
}
|
|
628
|
-
if (s) {
|
|
629
|
-
const w = u === "y" ? "top" : "left", y = u === "y" ? "bottom" : "right", v = h + a[w], b = h - a[y];
|
|
630
|
-
h = bt(v, h, b);
|
|
631
|
-
}
|
|
632
|
-
const g = c.fn({
|
|
633
|
-
...e,
|
|
634
|
-
[m]: d,
|
|
635
|
-
[u]: h
|
|
636
|
-
});
|
|
637
|
-
return {
|
|
638
|
-
...g,
|
|
639
|
-
data: {
|
|
640
|
-
x: g.x - n,
|
|
641
|
-
y: g.y - o,
|
|
642
|
-
enabled: {
|
|
643
|
-
[m]: r,
|
|
644
|
-
[u]: s
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
};
|
|
648
|
-
}
|
|
649
|
-
};
|
|
650
|
-
}, Ce = function(t) {
|
|
651
|
-
return t === void 0 && (t = {}), {
|
|
652
|
-
options: t,
|
|
653
|
-
fn(e) {
|
|
654
|
-
const {
|
|
655
|
-
x: n,
|
|
656
|
-
y: o,
|
|
657
|
-
placement: i,
|
|
658
|
-
rects: r,
|
|
659
|
-
middlewareData: s
|
|
660
|
-
} = e, {
|
|
661
|
-
offset: c = 0,
|
|
662
|
-
mainAxis: l = !0,
|
|
663
|
-
crossAxis: f = !0
|
|
664
|
-
} = Y(t, e), a = {
|
|
665
|
-
x: n,
|
|
666
|
-
y: o
|
|
667
|
-
}, u = U(i), m = Rt(u);
|
|
668
|
-
let d = a[m], h = a[u];
|
|
669
|
-
const g = Y(c, e), w = typeof g == "number" ? {
|
|
670
|
-
mainAxis: g,
|
|
671
|
-
crossAxis: 0
|
|
672
|
-
} : {
|
|
673
|
-
mainAxis: 0,
|
|
674
|
-
crossAxis: 0,
|
|
675
|
-
...g
|
|
676
|
-
};
|
|
677
|
-
if (l) {
|
|
678
|
-
const b = m === "y" ? "height" : "width", O = r.reference[m] - r.floating[b] + w.mainAxis, x = r.reference[m] + r.reference[b] - w.mainAxis;
|
|
679
|
-
d < O ? d = O : d > x && (d = x);
|
|
680
|
-
}
|
|
681
|
-
if (f) {
|
|
682
|
-
var y, v;
|
|
683
|
-
const b = m === "y" ? "width" : "height", O = ["top", "left"].includes(q(i)), x = r.reference[u] - r.floating[b] + (O && ((y = s.offset) == null ? void 0 : y[u]) || 0) + (O ? 0 : w.crossAxis), S = r.reference[u] + r.reference[b] + (O ? 0 : ((v = s.offset) == null ? void 0 : v[u]) || 0) - (O ? w.crossAxis : 0);
|
|
684
|
-
h < x ? h = x : h > S && (h = S);
|
|
685
|
-
}
|
|
686
|
-
return {
|
|
687
|
-
[m]: d,
|
|
688
|
-
[u]: h
|
|
689
|
-
};
|
|
690
|
-
}
|
|
691
|
-
};
|
|
692
|
-
}, Pe = function(t) {
|
|
693
|
-
return t === void 0 && (t = {}), {
|
|
694
|
-
name: "size",
|
|
695
|
-
options: t,
|
|
696
|
-
async fn(e) {
|
|
697
|
-
var n, o;
|
|
698
|
-
const {
|
|
699
|
-
placement: i,
|
|
700
|
-
rects: r,
|
|
701
|
-
platform: s,
|
|
702
|
-
elements: c
|
|
703
|
-
} = e, {
|
|
704
|
-
apply: l = () => {
|
|
705
|
-
},
|
|
706
|
-
...f
|
|
707
|
-
} = Y(t, e), a = await ot(e, f), u = q(i), m = tt(i), d = U(i) === "y", {
|
|
708
|
-
width: h,
|
|
709
|
-
height: g
|
|
710
|
-
} = r.floating;
|
|
711
|
-
let w, y;
|
|
712
|
-
u === "top" || u === "bottom" ? (w = u, y = m === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (y = u, w = m === "end" ? "top" : "bottom");
|
|
713
|
-
const v = g - a.top - a.bottom, b = h - a.left - a.right, O = K(g - a[w], v), x = K(h - a[y], b), S = !e.middlewareData.shift;
|
|
714
|
-
let R = O, L = x;
|
|
715
|
-
if ((n = e.middlewareData.shift) != null && n.enabled.x && (L = b), (o = e.middlewareData.shift) != null && o.enabled.y && (R = v), S && !m) {
|
|
716
|
-
const C = k(a.left, 0), j = k(a.right, 0), F = k(a.top, 0), T = k(a.bottom, 0);
|
|
717
|
-
d ? L = h - 2 * (C !== 0 || j !== 0 ? C + j : k(a.left, a.right)) : R = g - 2 * (F !== 0 || T !== 0 ? F + T : k(a.top, a.bottom));
|
|
718
|
-
}
|
|
719
|
-
await l({
|
|
720
|
-
...e,
|
|
721
|
-
availableWidth: L,
|
|
722
|
-
availableHeight: R
|
|
723
|
-
});
|
|
724
|
-
const _ = await s.getDimensions(c.floating);
|
|
725
|
-
return h !== _.width || g !== _.height ? {
|
|
726
|
-
reset: {
|
|
727
|
-
rects: !0
|
|
728
|
-
}
|
|
729
|
-
} : {};
|
|
730
|
-
}
|
|
731
|
-
};
|
|
732
|
-
};
|
|
733
|
-
function gt() {
|
|
734
|
-
return typeof window < "u";
|
|
735
|
-
}
|
|
736
|
-
function et(t) {
|
|
737
|
-
return Ht(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
738
|
-
}
|
|
739
|
-
function z(t) {
|
|
740
|
-
var e;
|
|
741
|
-
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
742
|
-
}
|
|
743
|
-
function V(t) {
|
|
744
|
-
var e;
|
|
745
|
-
return (e = (Ht(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
746
|
-
}
|
|
747
|
-
function Ht(t) {
|
|
748
|
-
return gt() ? t instanceof Node || t instanceof z(t).Node : !1;
|
|
749
|
-
}
|
|
750
|
-
function W(t) {
|
|
751
|
-
return gt() ? t instanceof Element || t instanceof z(t).Element : !1;
|
|
752
|
-
}
|
|
753
|
-
function H(t) {
|
|
754
|
-
return gt() ? t instanceof HTMLElement || t instanceof z(t).HTMLElement : !1;
|
|
755
|
-
}
|
|
756
|
-
function kt(t) {
|
|
757
|
-
return !gt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof z(t).ShadowRoot;
|
|
758
|
-
}
|
|
759
|
-
function rt(t) {
|
|
760
|
-
const {
|
|
761
|
-
overflow: e,
|
|
762
|
-
overflowX: n,
|
|
763
|
-
overflowY: o,
|
|
764
|
-
display: i
|
|
765
|
-
} = B(t);
|
|
766
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(i);
|
|
767
|
-
}
|
|
768
|
-
function Ee(t) {
|
|
769
|
-
return ["table", "td", "th"].includes(et(t));
|
|
770
|
-
}
|
|
771
|
-
function pt(t) {
|
|
772
|
-
return [":popover-open", ":modal"].some((e) => {
|
|
773
|
-
try {
|
|
774
|
-
return t.matches(e);
|
|
775
|
-
} catch {
|
|
776
|
-
return !1;
|
|
777
|
-
}
|
|
778
|
-
});
|
|
779
|
-
}
|
|
780
|
-
function Pt(t) {
|
|
781
|
-
const e = Et(), n = W(t) ? B(t) : t;
|
|
782
|
-
return ["transform", "translate", "scale", "rotate", "perspective"].some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
|
|
783
|
-
}
|
|
784
|
-
function Me(t) {
|
|
785
|
-
let e = X(t);
|
|
786
|
-
for (; H(e) && !Z(e); ) {
|
|
787
|
-
if (Pt(e))
|
|
788
|
-
return e;
|
|
789
|
-
if (pt(e))
|
|
790
|
-
return null;
|
|
791
|
-
e = X(e);
|
|
792
|
-
}
|
|
793
|
-
return null;
|
|
794
|
-
}
|
|
795
|
-
function Et() {
|
|
796
|
-
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
797
|
-
}
|
|
798
|
-
function Z(t) {
|
|
799
|
-
return ["html", "body", "#document"].includes(et(t));
|
|
800
|
-
}
|
|
801
|
-
function B(t) {
|
|
802
|
-
return z(t).getComputedStyle(t);
|
|
803
|
-
}
|
|
804
|
-
function wt(t) {
|
|
805
|
-
return W(t) ? {
|
|
806
|
-
scrollLeft: t.scrollLeft,
|
|
807
|
-
scrollTop: t.scrollTop
|
|
808
|
-
} : {
|
|
809
|
-
scrollLeft: t.scrollX,
|
|
810
|
-
scrollTop: t.scrollY
|
|
811
|
-
};
|
|
812
|
-
}
|
|
813
|
-
function X(t) {
|
|
814
|
-
if (et(t) === "html")
|
|
815
|
-
return t;
|
|
816
|
-
const e = (
|
|
817
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
818
|
-
t.assignedSlot || // DOM Element detected.
|
|
819
|
-
t.parentNode || // ShadowRoot detected.
|
|
820
|
-
kt(t) && t.host || // Fallback.
|
|
821
|
-
V(t)
|
|
822
|
-
);
|
|
823
|
-
return kt(e) ? e.host : e;
|
|
824
|
-
}
|
|
825
|
-
function Vt(t) {
|
|
826
|
-
const e = X(t);
|
|
827
|
-
return Z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : H(e) && rt(e) ? e : Vt(e);
|
|
828
|
-
}
|
|
829
|
-
function it(t, e, n) {
|
|
830
|
-
var o;
|
|
831
|
-
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
832
|
-
const i = Vt(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = z(i);
|
|
833
|
-
if (r) {
|
|
834
|
-
const c = At(s);
|
|
835
|
-
return e.concat(s, s.visualViewport || [], rt(i) ? i : [], c && n ? it(c) : []);
|
|
836
|
-
}
|
|
837
|
-
return e.concat(i, it(i, [], n));
|
|
838
|
-
}
|
|
839
|
-
function At(t) {
|
|
840
|
-
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
841
|
-
}
|
|
842
|
-
function Ut(t) {
|
|
843
|
-
const e = B(t);
|
|
844
|
-
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
845
|
-
const i = H(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, c = ft(n) !== r || ft(o) !== s;
|
|
846
|
-
return c && (n = r, o = s), {
|
|
847
|
-
width: n,
|
|
848
|
-
height: o,
|
|
849
|
-
$: c
|
|
850
|
-
};
|
|
851
|
-
}
|
|
852
|
-
function Mt(t) {
|
|
853
|
-
return W(t) ? t : t.contextElement;
|
|
854
|
-
}
|
|
855
|
-
function Q(t) {
|
|
856
|
-
const e = Mt(t);
|
|
857
|
-
if (!H(e))
|
|
858
|
-
return I(1);
|
|
859
|
-
const n = e.getBoundingClientRect(), {
|
|
860
|
-
width: o,
|
|
861
|
-
height: i,
|
|
862
|
-
$: r
|
|
863
|
-
} = Ut(e);
|
|
864
|
-
let s = (r ? ft(n.width) : n.width) / o, c = (r ? ft(n.height) : n.height) / i;
|
|
865
|
-
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
866
|
-
x: s,
|
|
867
|
-
y: c
|
|
868
|
-
};
|
|
869
|
-
}
|
|
870
|
-
const Le = /* @__PURE__ */ I(0);
|
|
871
|
-
function Yt(t) {
|
|
872
|
-
const e = z(t);
|
|
873
|
-
return !Et() || !e.visualViewport ? Le : {
|
|
874
|
-
x: e.visualViewport.offsetLeft,
|
|
875
|
-
y: e.visualViewport.offsetTop
|
|
876
|
-
};
|
|
877
|
-
}
|
|
878
|
-
function Te(t, e, n) {
|
|
879
|
-
return e === void 0 && (e = !1), !n || e && n !== z(t) ? !1 : e;
|
|
880
|
-
}
|
|
881
|
-
function J(t, e, n, o) {
|
|
882
|
-
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
883
|
-
const i = t.getBoundingClientRect(), r = Mt(t);
|
|
884
|
-
let s = I(1);
|
|
885
|
-
e && (o ? W(o) && (s = Q(o)) : s = Q(t));
|
|
886
|
-
const c = Te(r, n, o) ? Yt(r) : I(0);
|
|
887
|
-
let l = (i.left + c.x) / s.x, f = (i.top + c.y) / s.y, a = i.width / s.x, u = i.height / s.y;
|
|
888
|
-
if (r) {
|
|
889
|
-
const m = z(r), d = o && W(o) ? z(o) : o;
|
|
890
|
-
let h = m, g = At(h);
|
|
891
|
-
for (; g && o && d !== h; ) {
|
|
892
|
-
const w = Q(g), y = g.getBoundingClientRect(), v = B(g), b = y.left + (g.clientLeft + parseFloat(v.paddingLeft)) * w.x, O = y.top + (g.clientTop + parseFloat(v.paddingTop)) * w.y;
|
|
893
|
-
l *= w.x, f *= w.y, a *= w.x, u *= w.y, l += b, f += O, h = z(g), g = At(h);
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
return ut({
|
|
897
|
-
width: a,
|
|
898
|
-
height: u,
|
|
899
|
-
x: l,
|
|
900
|
-
y: f
|
|
901
|
-
});
|
|
902
|
-
}
|
|
903
|
-
function Lt(t, e) {
|
|
904
|
-
const n = wt(t).scrollLeft;
|
|
905
|
-
return e ? e.left + n : J(V(t)).left + n;
|
|
906
|
-
}
|
|
907
|
-
function qt(t, e, n) {
|
|
908
|
-
n === void 0 && (n = !1);
|
|
909
|
-
const o = t.getBoundingClientRect(), i = o.left + e.scrollLeft - (n ? 0 : (
|
|
910
|
-
// RTL <body> scrollbar.
|
|
911
|
-
Lt(t, o)
|
|
912
|
-
)), r = o.top + e.scrollTop;
|
|
913
|
-
return {
|
|
914
|
-
x: i,
|
|
915
|
-
y: r
|
|
916
|
-
};
|
|
917
|
-
}
|
|
918
|
-
function Ne(t) {
|
|
919
|
-
let {
|
|
920
|
-
elements: e,
|
|
921
|
-
rect: n,
|
|
922
|
-
offsetParent: o,
|
|
923
|
-
strategy: i
|
|
924
|
-
} = t;
|
|
925
|
-
const r = i === "fixed", s = V(o), c = e ? pt(e.floating) : !1;
|
|
926
|
-
if (o === s || c && r)
|
|
927
|
-
return n;
|
|
928
|
-
let l = {
|
|
929
|
-
scrollLeft: 0,
|
|
930
|
-
scrollTop: 0
|
|
931
|
-
}, f = I(1);
|
|
932
|
-
const a = I(0), u = H(o);
|
|
933
|
-
if ((u || !u && !r) && ((et(o) !== "body" || rt(s)) && (l = wt(o)), H(o))) {
|
|
934
|
-
const d = J(o);
|
|
935
|
-
f = Q(o), a.x = d.x + o.clientLeft, a.y = d.y + o.clientTop;
|
|
936
|
-
}
|
|
937
|
-
const m = s && !u && !r ? qt(s, l, !0) : I(0);
|
|
938
|
-
return {
|
|
939
|
-
width: n.width * f.x,
|
|
940
|
-
height: n.height * f.y,
|
|
941
|
-
x: n.x * f.x - l.scrollLeft * f.x + a.x + m.x,
|
|
942
|
-
y: n.y * f.y - l.scrollTop * f.y + a.y + m.y
|
|
943
|
-
};
|
|
944
|
-
}
|
|
945
|
-
function De(t) {
|
|
946
|
-
return Array.from(t.getClientRects());
|
|
947
|
-
}
|
|
948
|
-
function Fe(t) {
|
|
949
|
-
const e = V(t), n = wt(t), o = t.ownerDocument.body, i = k(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = k(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
950
|
-
let s = -n.scrollLeft + Lt(t);
|
|
951
|
-
const c = -n.scrollTop;
|
|
952
|
-
return B(o).direction === "rtl" && (s += k(e.clientWidth, o.clientWidth) - i), {
|
|
953
|
-
width: i,
|
|
954
|
-
height: r,
|
|
955
|
-
x: s,
|
|
956
|
-
y: c
|
|
957
|
-
};
|
|
958
|
-
}
|
|
959
|
-
function ke(t, e) {
|
|
960
|
-
const n = z(t), o = V(t), i = n.visualViewport;
|
|
961
|
-
let r = o.clientWidth, s = o.clientHeight, c = 0, l = 0;
|
|
962
|
-
if (i) {
|
|
963
|
-
r = i.width, s = i.height;
|
|
964
|
-
const f = Et();
|
|
965
|
-
(!f || f && e === "fixed") && (c = i.offsetLeft, l = i.offsetTop);
|
|
966
|
-
}
|
|
967
|
-
return {
|
|
968
|
-
width: r,
|
|
969
|
-
height: s,
|
|
970
|
-
x: c,
|
|
971
|
-
y: l
|
|
972
|
-
};
|
|
973
|
-
}
|
|
974
|
-
function ze(t, e) {
|
|
975
|
-
const n = J(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = H(t) ? Q(t) : I(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, l = i * r.x, f = o * r.y;
|
|
976
|
-
return {
|
|
977
|
-
width: s,
|
|
978
|
-
height: c,
|
|
979
|
-
x: l,
|
|
980
|
-
y: f
|
|
981
|
-
};
|
|
982
|
-
}
|
|
983
|
-
function zt(t, e, n) {
|
|
984
|
-
let o;
|
|
985
|
-
if (e === "viewport")
|
|
986
|
-
o = ke(t, n);
|
|
987
|
-
else if (e === "document")
|
|
988
|
-
o = Fe(V(t));
|
|
989
|
-
else if (W(e))
|
|
990
|
-
o = ze(e, n);
|
|
991
|
-
else {
|
|
992
|
-
const i = Yt(t);
|
|
993
|
-
o = {
|
|
994
|
-
x: e.x - i.x,
|
|
995
|
-
y: e.y - i.y,
|
|
996
|
-
width: e.width,
|
|
997
|
-
height: e.height
|
|
998
|
-
};
|
|
999
|
-
}
|
|
1000
|
-
return ut(o);
|
|
1001
|
-
}
|
|
1002
|
-
function Kt(t, e) {
|
|
1003
|
-
const n = X(t);
|
|
1004
|
-
return n === e || !W(n) || Z(n) ? !1 : B(n).position === "fixed" || Kt(n, e);
|
|
1005
|
-
}
|
|
1006
|
-
function _e(t, e) {
|
|
1007
|
-
const n = e.get(t);
|
|
1008
|
-
if (n)
|
|
1009
|
-
return n;
|
|
1010
|
-
let o = it(t, [], !1).filter((c) => W(c) && et(c) !== "body"), i = null;
|
|
1011
|
-
const r = B(t).position === "fixed";
|
|
1012
|
-
let s = r ? X(t) : t;
|
|
1013
|
-
for (; W(s) && !Z(s); ) {
|
|
1014
|
-
const c = B(s), l = Pt(s);
|
|
1015
|
-
!l && c.position === "fixed" && (i = null), (r ? !l && !i : !l && c.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || rt(s) && !l && Kt(t, s)) ? o = o.filter((a) => a !== s) : i = c, s = X(s);
|
|
1016
|
-
}
|
|
1017
|
-
return e.set(t, o), o;
|
|
1018
|
-
}
|
|
1019
|
-
function je(t) {
|
|
1020
|
-
let {
|
|
1021
|
-
element: e,
|
|
1022
|
-
boundary: n,
|
|
1023
|
-
rootBoundary: o,
|
|
1024
|
-
strategy: i
|
|
1025
|
-
} = t;
|
|
1026
|
-
const s = [...n === "clippingAncestors" ? pt(e) ? [] : _e(e, this._c) : [].concat(n), o], c = s[0], l = s.reduce((f, a) => {
|
|
1027
|
-
const u = zt(e, a, i);
|
|
1028
|
-
return f.top = k(u.top, f.top), f.right = K(u.right, f.right), f.bottom = K(u.bottom, f.bottom), f.left = k(u.left, f.left), f;
|
|
1029
|
-
}, zt(e, c, i));
|
|
1030
|
-
return {
|
|
1031
|
-
width: l.right - l.left,
|
|
1032
|
-
height: l.bottom - l.top,
|
|
1033
|
-
x: l.left,
|
|
1034
|
-
y: l.top
|
|
1035
|
-
};
|
|
1036
|
-
}
|
|
1037
|
-
function $e(t) {
|
|
1038
|
-
const {
|
|
1039
|
-
width: e,
|
|
1040
|
-
height: n
|
|
1041
|
-
} = Ut(t);
|
|
1042
|
-
return {
|
|
1043
|
-
width: e,
|
|
1044
|
-
height: n
|
|
1045
|
-
};
|
|
1046
|
-
}
|
|
1047
|
-
function We(t, e, n) {
|
|
1048
|
-
const o = H(e), i = V(e), r = n === "fixed", s = J(t, !0, r, e);
|
|
1049
|
-
let c = {
|
|
1050
|
-
scrollLeft: 0,
|
|
1051
|
-
scrollTop: 0
|
|
1052
|
-
};
|
|
1053
|
-
const l = I(0);
|
|
1054
|
-
function f() {
|
|
1055
|
-
l.x = Lt(i);
|
|
1056
|
-
}
|
|
1057
|
-
if (o || !o && !r)
|
|
1058
|
-
if ((et(e) !== "body" || rt(i)) && (c = wt(e)), o) {
|
|
1059
|
-
const d = J(e, !0, r, e);
|
|
1060
|
-
l.x = d.x + e.clientLeft, l.y = d.y + e.clientTop;
|
|
1061
|
-
} else i && f();
|
|
1062
|
-
r && !o && i && f();
|
|
1063
|
-
const a = i && !o && !r ? qt(i, c) : I(0), u = s.left + c.scrollLeft - l.x - a.x, m = s.top + c.scrollTop - l.y - a.y;
|
|
1064
|
-
return {
|
|
1065
|
-
x: u,
|
|
1066
|
-
y: m,
|
|
1067
|
-
width: s.width,
|
|
1068
|
-
height: s.height
|
|
1069
|
-
};
|
|
1070
|
-
}
|
|
1071
|
-
function xt(t) {
|
|
1072
|
-
return B(t).position === "static";
|
|
1073
|
-
}
|
|
1074
|
-
function _t(t, e) {
|
|
1075
|
-
if (!H(t) || B(t).position === "fixed")
|
|
1076
|
-
return null;
|
|
1077
|
-
if (e)
|
|
1078
|
-
return e(t);
|
|
1079
|
-
let n = t.offsetParent;
|
|
1080
|
-
return V(t) === n && (n = n.ownerDocument.body), n;
|
|
1081
|
-
}
|
|
1082
|
-
function Xt(t, e) {
|
|
1083
|
-
const n = z(t);
|
|
1084
|
-
if (pt(t))
|
|
1085
|
-
return n;
|
|
1086
|
-
if (!H(t)) {
|
|
1087
|
-
let i = X(t);
|
|
1088
|
-
for (; i && !Z(i); ) {
|
|
1089
|
-
if (W(i) && !xt(i))
|
|
1090
|
-
return i;
|
|
1091
|
-
i = X(i);
|
|
1092
|
-
}
|
|
1093
|
-
return n;
|
|
1094
|
-
}
|
|
1095
|
-
let o = _t(t, e);
|
|
1096
|
-
for (; o && Ee(o) && xt(o); )
|
|
1097
|
-
o = _t(o, e);
|
|
1098
|
-
return o && Z(o) && xt(o) && !Pt(o) ? n : o || Me(t) || n;
|
|
1099
|
-
}
|
|
1100
|
-
const Be = async function(t) {
|
|
1101
|
-
const e = this.getOffsetParent || Xt, n = this.getDimensions, o = await n(t.floating);
|
|
1102
|
-
return {
|
|
1103
|
-
reference: We(t.reference, await e(t.floating), t.strategy),
|
|
1104
|
-
floating: {
|
|
1105
|
-
x: 0,
|
|
1106
|
-
y: 0,
|
|
1107
|
-
width: o.width,
|
|
1108
|
-
height: o.height
|
|
1109
|
-
}
|
|
1110
|
-
};
|
|
1111
|
-
};
|
|
1112
|
-
function Ie(t) {
|
|
1113
|
-
return B(t).direction === "rtl";
|
|
1114
|
-
}
|
|
1115
|
-
const He = {
|
|
1116
|
-
convertOffsetParentRelativeRectToViewportRelativeRect: Ne,
|
|
1117
|
-
getDocumentElement: V,
|
|
1118
|
-
getClippingRect: je,
|
|
1119
|
-
getOffsetParent: Xt,
|
|
1120
|
-
getElementRects: Be,
|
|
1121
|
-
getClientRects: De,
|
|
1122
|
-
getDimensions: $e,
|
|
1123
|
-
getScale: Q,
|
|
1124
|
-
isElement: W,
|
|
1125
|
-
isRTL: Ie
|
|
1126
|
-
};
|
|
1127
|
-
function Gt(t, e) {
|
|
1128
|
-
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1129
|
-
}
|
|
1130
|
-
function Ve(t, e) {
|
|
1131
|
-
let n = null, o;
|
|
1132
|
-
const i = V(t);
|
|
1133
|
-
function r() {
|
|
1134
|
-
var c;
|
|
1135
|
-
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
1136
|
-
}
|
|
1137
|
-
function s(c, l) {
|
|
1138
|
-
c === void 0 && (c = !1), l === void 0 && (l = 1), r();
|
|
1139
|
-
const f = t.getBoundingClientRect(), {
|
|
1140
|
-
left: a,
|
|
1141
|
-
top: u,
|
|
1142
|
-
width: m,
|
|
1143
|
-
height: d
|
|
1144
|
-
} = f;
|
|
1145
|
-
if (c || e(), !m || !d)
|
|
1146
|
-
return;
|
|
1147
|
-
const h = st(u), g = st(i.clientWidth - (a + m)), w = st(i.clientHeight - (u + d)), y = st(a), b = {
|
|
1148
|
-
rootMargin: -h + "px " + -g + "px " + -w + "px " + -y + "px",
|
|
1149
|
-
threshold: k(0, K(1, l)) || 1
|
|
1150
|
-
};
|
|
1151
|
-
let O = !0;
|
|
1152
|
-
function x(S) {
|
|
1153
|
-
const R = S[0].intersectionRatio;
|
|
1154
|
-
if (R !== l) {
|
|
1155
|
-
if (!O)
|
|
1156
|
-
return s();
|
|
1157
|
-
R ? s(!1, R) : o = setTimeout(() => {
|
|
1158
|
-
s(!1, 1e-7);
|
|
1159
|
-
}, 1e3);
|
|
1160
|
-
}
|
|
1161
|
-
R === 1 && !Gt(f, t.getBoundingClientRect()) && s(), O = !1;
|
|
1162
|
-
}
|
|
1163
|
-
try {
|
|
1164
|
-
n = new IntersectionObserver(x, {
|
|
1165
|
-
...b,
|
|
1166
|
-
// Handle <iframe>s
|
|
1167
|
-
root: i.ownerDocument
|
|
1168
|
-
});
|
|
1169
|
-
} catch {
|
|
1170
|
-
n = new IntersectionObserver(x, b);
|
|
1171
|
-
}
|
|
1172
|
-
n.observe(t);
|
|
1173
|
-
}
|
|
1174
|
-
return s(!0), r;
|
|
1175
|
-
}
|
|
1176
|
-
function bn(t, e, n, o) {
|
|
1177
|
-
o === void 0 && (o = {});
|
|
1178
|
-
const {
|
|
1179
|
-
ancestorScroll: i = !0,
|
|
1180
|
-
ancestorResize: r = !0,
|
|
1181
|
-
elementResize: s = typeof ResizeObserver == "function",
|
|
1182
|
-
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1183
|
-
animationFrame: l = !1
|
|
1184
|
-
} = o, f = Mt(t), a = i || r ? [...f ? it(f) : [], ...it(e)] : [];
|
|
1185
|
-
a.forEach((y) => {
|
|
1186
|
-
i && y.addEventListener("scroll", n, {
|
|
1187
|
-
passive: !0
|
|
1188
|
-
}), r && y.addEventListener("resize", n);
|
|
1189
|
-
});
|
|
1190
|
-
const u = f && c ? Ve(f, n) : null;
|
|
1191
|
-
let m = -1, d = null;
|
|
1192
|
-
s && (d = new ResizeObserver((y) => {
|
|
1193
|
-
let [v] = y;
|
|
1194
|
-
v && v.target === f && d && (d.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1195
|
-
var b;
|
|
1196
|
-
(b = d) == null || b.observe(e);
|
|
1197
|
-
})), n();
|
|
1198
|
-
}), f && !l && d.observe(f), d.observe(e));
|
|
1199
|
-
let h, g = l ? J(t) : null;
|
|
1200
|
-
l && w();
|
|
1201
|
-
function w() {
|
|
1202
|
-
const y = J(t);
|
|
1203
|
-
g && !Gt(g, y) && n(), g = y, h = requestAnimationFrame(w);
|
|
1204
|
-
}
|
|
1205
|
-
return n(), () => {
|
|
1206
|
-
var y;
|
|
1207
|
-
a.forEach((v) => {
|
|
1208
|
-
i && v.removeEventListener("scroll", n), r && v.removeEventListener("resize", n);
|
|
1209
|
-
}), u == null || u(), (y = d) == null || y.disconnect(), d = null, l && cancelAnimationFrame(h);
|
|
1210
|
-
};
|
|
1211
|
-
}
|
|
1212
|
-
const Ue = Re, Ye = Se, qe = be, Ke = Pe, Xe = Oe, jt = ve, Ge = Ce, Je = (t, e, n) => {
|
|
1213
|
-
const o = /* @__PURE__ */ new Map(), i = {
|
|
1214
|
-
platform: He,
|
|
1215
|
-
...n
|
|
1216
|
-
}, r = {
|
|
1217
|
-
...i.platform,
|
|
1218
|
-
_c: o
|
|
1219
|
-
};
|
|
1220
|
-
return xe(t, e, {
|
|
1221
|
-
...i,
|
|
1222
|
-
platform: r
|
|
1223
|
-
});
|
|
1224
|
-
};
|
|
1225
|
-
var lt = typeof document < "u" ? ee : ne;
|
|
1226
|
-
function dt(t, e) {
|
|
1227
|
-
if (t === e)
|
|
1228
|
-
return !0;
|
|
1229
|
-
if (typeof t != typeof e)
|
|
1230
|
-
return !1;
|
|
1231
|
-
if (typeof t == "function" && t.toString() === e.toString())
|
|
1232
|
-
return !0;
|
|
1233
|
-
let n, o, i;
|
|
1234
|
-
if (t && e && typeof t == "object") {
|
|
1235
|
-
if (Array.isArray(t)) {
|
|
1236
|
-
if (n = t.length, n !== e.length) return !1;
|
|
1237
|
-
for (o = n; o-- !== 0; )
|
|
1238
|
-
if (!dt(t[o], e[o]))
|
|
1239
|
-
return !1;
|
|
1240
|
-
return !0;
|
|
1241
|
-
}
|
|
1242
|
-
if (i = Object.keys(t), n = i.length, n !== Object.keys(e).length)
|
|
1243
|
-
return !1;
|
|
1244
|
-
for (o = n; o-- !== 0; )
|
|
1245
|
-
if (!{}.hasOwnProperty.call(e, i[o]))
|
|
1246
|
-
return !1;
|
|
1247
|
-
for (o = n; o-- !== 0; ) {
|
|
1248
|
-
const r = i[o];
|
|
1249
|
-
if (!(r === "_owner" && t.$$typeof) && !dt(t[r], e[r]))
|
|
1250
|
-
return !1;
|
|
1251
|
-
}
|
|
1252
|
-
return !0;
|
|
1253
|
-
}
|
|
1254
|
-
return t !== t && e !== e;
|
|
1255
|
-
}
|
|
1256
|
-
function Jt(t) {
|
|
1257
|
-
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1258
|
-
}
|
|
1259
|
-
function $t(t, e) {
|
|
1260
|
-
const n = Jt(t);
|
|
1261
|
-
return Math.round(e * n) / n;
|
|
1262
|
-
}
|
|
1263
|
-
function vt(t) {
|
|
1264
|
-
const e = p.useRef(t);
|
|
1265
|
-
return lt(() => {
|
|
1266
|
-
e.current = t;
|
|
1267
|
-
}), e;
|
|
1268
|
-
}
|
|
1269
|
-
function On(t) {
|
|
1270
|
-
t === void 0 && (t = {});
|
|
1271
|
-
const {
|
|
1272
|
-
placement: e = "bottom",
|
|
1273
|
-
strategy: n = "absolute",
|
|
1274
|
-
middleware: o = [],
|
|
1275
|
-
platform: i,
|
|
1276
|
-
elements: {
|
|
1277
|
-
reference: r,
|
|
1278
|
-
floating: s
|
|
1279
|
-
} = {},
|
|
1280
|
-
transform: c = !0,
|
|
1281
|
-
whileElementsMounted: l,
|
|
1282
|
-
open: f
|
|
1283
|
-
} = t, [a, u] = p.useState({
|
|
1284
|
-
x: 0,
|
|
1285
|
-
y: 0,
|
|
1286
|
-
strategy: n,
|
|
1287
|
-
placement: e,
|
|
1288
|
-
middlewareData: {},
|
|
1289
|
-
isPositioned: !1
|
|
1290
|
-
}), [m, d] = p.useState(o);
|
|
1291
|
-
dt(m, o) || d(o);
|
|
1292
|
-
const [h, g] = p.useState(null), [w, y] = p.useState(null), v = p.useCallback((A) => {
|
|
1293
|
-
A !== S.current && (S.current = A, g(A));
|
|
1294
|
-
}, []), b = p.useCallback((A) => {
|
|
1295
|
-
A !== R.current && (R.current = A, y(A));
|
|
1296
|
-
}, []), O = r || h, x = s || w, S = p.useRef(null), R = p.useRef(null), L = p.useRef(a), _ = l != null, C = vt(l), j = vt(i), F = vt(f), T = p.useCallback(() => {
|
|
1297
|
-
if (!S.current || !R.current)
|
|
1298
|
-
return;
|
|
1299
|
-
const A = {
|
|
1300
|
-
placement: e,
|
|
1301
|
-
strategy: n,
|
|
1302
|
-
middleware: m
|
|
1303
|
-
};
|
|
1304
|
-
j.current && (A.platform = j.current), Je(S.current, R.current, A).then((E) => {
|
|
1305
|
-
const M = {
|
|
1306
|
-
...E,
|
|
1307
|
-
// The floating element's position may be recomputed while it's closed
|
|
1308
|
-
// but still mounted (such as when transitioning out). To ensure
|
|
1309
|
-
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1310
|
-
// setting it to `true` when `open === false` (must be specified).
|
|
1311
|
-
isPositioned: F.current !== !1
|
|
1312
|
-
};
|
|
1313
|
-
N.current && !dt(L.current, M) && (L.current = M, ie.flushSync(() => {
|
|
1314
|
-
u(M);
|
|
1315
|
-
}));
|
|
1316
|
-
});
|
|
1317
|
-
}, [m, e, n, j, F]);
|
|
1318
|
-
lt(() => {
|
|
1319
|
-
f === !1 && L.current.isPositioned && (L.current.isPositioned = !1, u((A) => ({
|
|
1320
|
-
...A,
|
|
1321
|
-
isPositioned: !1
|
|
1322
|
-
})));
|
|
1323
|
-
}, [f]);
|
|
1324
|
-
const N = p.useRef(!1);
|
|
1325
|
-
lt(() => (N.current = !0, () => {
|
|
1326
|
-
N.current = !1;
|
|
1327
|
-
}), []), lt(() => {
|
|
1328
|
-
if (O && (S.current = O), x && (R.current = x), O && x) {
|
|
1329
|
-
if (C.current)
|
|
1330
|
-
return C.current(O, x, T);
|
|
1331
|
-
T();
|
|
1332
|
-
}
|
|
1333
|
-
}, [O, x, T, C, _]);
|
|
1334
|
-
const D = p.useMemo(() => ({
|
|
1335
|
-
reference: S,
|
|
1336
|
-
floating: R,
|
|
1337
|
-
setReference: v,
|
|
1338
|
-
setFloating: b
|
|
1339
|
-
}), [v, b]), P = p.useMemo(() => ({
|
|
1340
|
-
reference: O,
|
|
1341
|
-
floating: x
|
|
1342
|
-
}), [O, x]), $ = p.useMemo(() => {
|
|
1343
|
-
const A = {
|
|
1344
|
-
position: n,
|
|
1345
|
-
left: 0,
|
|
1346
|
-
top: 0
|
|
1347
|
-
};
|
|
1348
|
-
if (!P.floating)
|
|
1349
|
-
return A;
|
|
1350
|
-
const E = $t(P.floating, a.x), M = $t(P.floating, a.y);
|
|
1351
|
-
return c ? {
|
|
1352
|
-
...A,
|
|
1353
|
-
transform: "translate(" + E + "px, " + M + "px)",
|
|
1354
|
-
...Jt(P.floating) >= 1.5 && {
|
|
1355
|
-
willChange: "transform"
|
|
1356
|
-
}
|
|
1357
|
-
} : {
|
|
1358
|
-
position: n,
|
|
1359
|
-
left: E,
|
|
1360
|
-
top: M
|
|
1361
|
-
};
|
|
1362
|
-
}, [n, c, P.floating, a.x, a.y]);
|
|
1363
|
-
return p.useMemo(() => ({
|
|
1364
|
-
...a,
|
|
1365
|
-
update: T,
|
|
1366
|
-
refs: D,
|
|
1367
|
-
elements: P,
|
|
1368
|
-
floatingStyles: $
|
|
1369
|
-
}), [a, T, D, P, $]);
|
|
1370
|
-
}
|
|
1371
|
-
const Qe = (t) => {
|
|
1372
|
-
function e(n) {
|
|
1373
|
-
return {}.hasOwnProperty.call(n, "current");
|
|
1374
|
-
}
|
|
1375
|
-
return {
|
|
1376
|
-
name: "arrow",
|
|
1377
|
-
options: t,
|
|
1378
|
-
fn(n) {
|
|
1379
|
-
const {
|
|
1380
|
-
element: o,
|
|
1381
|
-
padding: i
|
|
1382
|
-
} = typeof t == "function" ? t(n) : t;
|
|
1383
|
-
return o && e(o) ? o.current != null ? jt({
|
|
1384
|
-
element: o.current,
|
|
1385
|
-
padding: i
|
|
1386
|
-
}).fn(n) : {} : o ? jt({
|
|
1387
|
-
element: o,
|
|
1388
|
-
padding: i
|
|
1389
|
-
}).fn(n) : {};
|
|
1390
|
-
}
|
|
1391
|
-
};
|
|
1392
|
-
}, An = (t, e) => ({
|
|
1393
|
-
...Ue(t),
|
|
1394
|
-
options: [t, e]
|
|
1395
|
-
}), Rn = (t, e) => ({
|
|
1396
|
-
...Ye(t),
|
|
1397
|
-
options: [t, e]
|
|
1398
|
-
}), Sn = (t, e) => ({
|
|
1399
|
-
...Ge(t),
|
|
1400
|
-
options: [t, e]
|
|
1401
|
-
}), Cn = (t, e) => ({
|
|
1402
|
-
...qe(t),
|
|
1403
|
-
options: [t, e]
|
|
1404
|
-
}), Pn = (t, e) => ({
|
|
1405
|
-
...Ke(t),
|
|
1406
|
-
options: [t, e]
|
|
1407
|
-
}), En = (t, e) => ({
|
|
1408
|
-
...Xe(t),
|
|
1409
|
-
options: [t, e]
|
|
1410
|
-
}), Mn = (t, e) => ({
|
|
1411
|
-
...Qe(t),
|
|
1412
|
-
options: [t, e]
|
|
1413
|
-
});
|
|
1414
|
-
function Ln(t) {
|
|
1415
|
-
const [e, n] = p.useState(void 0);
|
|
1416
|
-
return nt(() => {
|
|
1417
|
-
if (t) {
|
|
1418
|
-
n({ width: t.offsetWidth, height: t.offsetHeight });
|
|
1419
|
-
const o = new ResizeObserver((i) => {
|
|
1420
|
-
if (!Array.isArray(i) || !i.length)
|
|
1421
|
-
return;
|
|
1422
|
-
const r = i[0];
|
|
1423
|
-
let s, c;
|
|
1424
|
-
if ("borderBoxSize" in r) {
|
|
1425
|
-
const l = r.borderBoxSize, f = Array.isArray(l) ? l[0] : l;
|
|
1426
|
-
s = f.inlineSize, c = f.blockSize;
|
|
1427
|
-
} else
|
|
1428
|
-
s = t.offsetWidth, c = t.offsetHeight;
|
|
1429
|
-
n({ width: s, height: c });
|
|
1430
|
-
});
|
|
1431
|
-
return o.observe(t, { box: "border-box" }), () => o.unobserve(t);
|
|
1432
|
-
} else
|
|
1433
|
-
n(void 0);
|
|
1434
|
-
}, [t]), e;
|
|
1435
|
-
}
|
|
1436
|
-
function Ze(t, e) {
|
|
1437
|
-
return p.useReducer((n, o) => e[n][o] ?? n, t);
|
|
1438
|
-
}
|
|
1439
|
-
var tn = (t) => {
|
|
1440
|
-
const { present: e, children: n } = t, o = en(e), i = typeof n == "function" ? n({ present: o.isPresent }) : p.Children.only(n), r = se(o.ref, nn(i));
|
|
1441
|
-
return typeof n == "function" || o.isPresent ? p.cloneElement(i, { ref: r }) : null;
|
|
1442
|
-
};
|
|
1443
|
-
tn.displayName = "Presence";
|
|
1444
|
-
function en(t) {
|
|
1445
|
-
const [e, n] = p.useState(), o = p.useRef(null), i = p.useRef(t), r = p.useRef("none"), s = t ? "mounted" : "unmounted", [c, l] = Ze(s, {
|
|
1446
|
-
mounted: {
|
|
1447
|
-
UNMOUNT: "unmounted",
|
|
1448
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
1449
|
-
},
|
|
1450
|
-
unmountSuspended: {
|
|
1451
|
-
MOUNT: "mounted",
|
|
1452
|
-
ANIMATION_END: "unmounted"
|
|
1453
|
-
},
|
|
1454
|
-
unmounted: {
|
|
1455
|
-
MOUNT: "mounted"
|
|
1456
|
-
}
|
|
1457
|
-
});
|
|
1458
|
-
return p.useEffect(() => {
|
|
1459
|
-
const f = ct(o.current);
|
|
1460
|
-
r.current = c === "mounted" ? f : "none";
|
|
1461
|
-
}, [c]), nt(() => {
|
|
1462
|
-
const f = o.current, a = i.current;
|
|
1463
|
-
if (a !== t) {
|
|
1464
|
-
const m = r.current, d = ct(f);
|
|
1465
|
-
t ? l("MOUNT") : d === "none" || (f == null ? void 0 : f.display) === "none" ? l("UNMOUNT") : l(a && m !== d ? "ANIMATION_OUT" : "UNMOUNT"), i.current = t;
|
|
1466
|
-
}
|
|
1467
|
-
}, [t, l]), nt(() => {
|
|
1468
|
-
if (e) {
|
|
1469
|
-
let f;
|
|
1470
|
-
const a = e.ownerDocument.defaultView ?? window, u = (d) => {
|
|
1471
|
-
const g = ct(o.current).includes(d.animationName);
|
|
1472
|
-
if (d.target === e && g && (l("ANIMATION_END"), !i.current)) {
|
|
1473
|
-
const w = e.style.animationFillMode;
|
|
1474
|
-
e.style.animationFillMode = "forwards", f = a.setTimeout(() => {
|
|
1475
|
-
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = w);
|
|
1476
|
-
});
|
|
1477
|
-
}
|
|
1478
|
-
}, m = (d) => {
|
|
1479
|
-
d.target === e && (r.current = ct(o.current));
|
|
1480
|
-
};
|
|
1481
|
-
return e.addEventListener("animationstart", m), e.addEventListener("animationcancel", u), e.addEventListener("animationend", u), () => {
|
|
1482
|
-
a.clearTimeout(f), e.removeEventListener("animationstart", m), e.removeEventListener("animationcancel", u), e.removeEventListener("animationend", u);
|
|
1483
|
-
};
|
|
1484
|
-
} else
|
|
1485
|
-
l("ANIMATION_END");
|
|
1486
|
-
}, [e, l]), {
|
|
1487
|
-
isPresent: ["mounted", "unmountSuspended"].includes(c),
|
|
1488
|
-
ref: p.useCallback((f) => {
|
|
1489
|
-
o.current = f ? getComputedStyle(f) : null, n(f);
|
|
1490
|
-
}, [])
|
|
1491
|
-
};
|
|
1492
|
-
}
|
|
1493
|
-
function ct(t) {
|
|
1494
|
-
return (t == null ? void 0 : t.animationName) || "none";
|
|
1495
|
-
}
|
|
1496
|
-
function nn(t) {
|
|
1497
|
-
var o, i;
|
|
1498
|
-
let e = (o = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : o.get, n = e && "isReactWarning" in e && e.isReactWarning;
|
|
1499
|
-
return n ? t.ref : (e = (i = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : i.get, n = e && "isReactWarning" in e && e.isReactWarning, n ? t.props.ref : t.props.ref || t.ref);
|
|
1500
|
-
}
|
|
1501
|
-
var on = p[" useInsertionEffect ".trim().toString()] || nt;
|
|
1502
|
-
function Tn({
|
|
1503
|
-
prop: t,
|
|
1504
|
-
defaultProp: e,
|
|
1505
|
-
onChange: n = () => {
|
|
1506
|
-
},
|
|
1507
|
-
caller: o
|
|
1508
|
-
}) {
|
|
1509
|
-
const [i, r, s] = rn({
|
|
1510
|
-
defaultProp: e,
|
|
1511
|
-
onChange: n
|
|
1512
|
-
}), c = t !== void 0, l = c ? t : i;
|
|
1513
|
-
{
|
|
1514
|
-
const a = p.useRef(t !== void 0);
|
|
1515
|
-
p.useEffect(() => {
|
|
1516
|
-
const u = a.current;
|
|
1517
|
-
u !== c && console.warn(
|
|
1518
|
-
`${o} is changing from ${u ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
1519
|
-
), a.current = c;
|
|
1520
|
-
}, [c, o]);
|
|
1521
|
-
}
|
|
1522
|
-
const f = p.useCallback(
|
|
1523
|
-
(a) => {
|
|
1524
|
-
var u;
|
|
1525
|
-
if (c) {
|
|
1526
|
-
const m = sn(a) ? a(t) : a;
|
|
1527
|
-
m !== t && ((u = s.current) == null || u.call(s, m));
|
|
1528
|
-
} else
|
|
1529
|
-
r(a);
|
|
1530
|
-
},
|
|
1531
|
-
[c, t, r, s]
|
|
1532
|
-
);
|
|
1533
|
-
return [l, f];
|
|
1534
|
-
}
|
|
1535
|
-
function rn({
|
|
1536
|
-
defaultProp: t,
|
|
1537
|
-
onChange: e
|
|
1538
|
-
}) {
|
|
1539
|
-
const [n, o] = p.useState(t), i = p.useRef(n), r = p.useRef(e);
|
|
1540
|
-
return on(() => {
|
|
1541
|
-
r.current = e;
|
|
1542
|
-
}, [e]), p.useEffect(() => {
|
|
1543
|
-
var s;
|
|
1544
|
-
i.current !== n && ((s = r.current) == null || s.call(r, n), i.current = n);
|
|
1545
|
-
}, [n, i]), [n, o, r];
|
|
1546
|
-
}
|
|
1547
|
-
function sn(t) {
|
|
1548
|
-
return typeof t == "function";
|
|
1549
|
-
}
|
|
1550
|
-
var Qt = {
|
|
1551
|
-
color: void 0,
|
|
1552
|
-
size: void 0,
|
|
1553
|
-
className: void 0,
|
|
1554
|
-
style: void 0,
|
|
1555
|
-
attr: void 0
|
|
1556
|
-
}, Wt = G.createContext && /* @__PURE__ */ G.createContext(Qt), cn = ["attr", "size", "title"];
|
|
1557
|
-
function ln(t, e) {
|
|
1558
|
-
if (t == null) return {};
|
|
1559
|
-
var n = fn(t, e), o, i;
|
|
1560
|
-
if (Object.getOwnPropertySymbols) {
|
|
1561
|
-
var r = Object.getOwnPropertySymbols(t);
|
|
1562
|
-
for (i = 0; i < r.length; i++)
|
|
1563
|
-
o = r[i], !(e.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(t, o) && (n[o] = t[o]);
|
|
1564
|
-
}
|
|
1565
|
-
return n;
|
|
1566
|
-
}
|
|
1567
|
-
function fn(t, e) {
|
|
1568
|
-
if (t == null) return {};
|
|
1569
|
-
var n = {};
|
|
1570
|
-
for (var o in t)
|
|
1571
|
-
if (Object.prototype.hasOwnProperty.call(t, o)) {
|
|
1572
|
-
if (e.indexOf(o) >= 0) continue;
|
|
1573
|
-
n[o] = t[o];
|
|
1574
|
-
}
|
|
1575
|
-
return n;
|
|
1576
|
-
}
|
|
1577
|
-
function mt() {
|
|
1578
|
-
return mt = Object.assign ? Object.assign.bind() : function(t) {
|
|
1579
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1580
|
-
var n = arguments[e];
|
|
1581
|
-
for (var o in n)
|
|
1582
|
-
Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
|
1583
|
-
}
|
|
1584
|
-
return t;
|
|
1585
|
-
}, mt.apply(this, arguments);
|
|
1586
|
-
}
|
|
1587
|
-
function Bt(t, e) {
|
|
1588
|
-
var n = Object.keys(t);
|
|
1589
|
-
if (Object.getOwnPropertySymbols) {
|
|
1590
|
-
var o = Object.getOwnPropertySymbols(t);
|
|
1591
|
-
e && (o = o.filter(function(i) {
|
|
1592
|
-
return Object.getOwnPropertyDescriptor(t, i).enumerable;
|
|
1593
|
-
})), n.push.apply(n, o);
|
|
1594
|
-
}
|
|
1595
|
-
return n;
|
|
1596
|
-
}
|
|
1597
|
-
function ht(t) {
|
|
1598
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1599
|
-
var n = arguments[e] != null ? arguments[e] : {};
|
|
1600
|
-
e % 2 ? Bt(Object(n), !0).forEach(function(o) {
|
|
1601
|
-
an(t, o, n[o]);
|
|
1602
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Bt(Object(n)).forEach(function(o) {
|
|
1603
|
-
Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(n, o));
|
|
1604
|
-
});
|
|
1605
|
-
}
|
|
1606
|
-
return t;
|
|
1607
|
-
}
|
|
1608
|
-
function an(t, e, n) {
|
|
1609
|
-
return e = un(e), e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
|
|
1610
|
-
}
|
|
1611
|
-
function un(t) {
|
|
1612
|
-
var e = dn(t, "string");
|
|
1613
|
-
return typeof e == "symbol" ? e : e + "";
|
|
1614
|
-
}
|
|
1615
|
-
function dn(t, e) {
|
|
1616
|
-
if (typeof t != "object" || !t) return t;
|
|
1617
|
-
var n = t[Symbol.toPrimitive];
|
|
1618
|
-
if (n !== void 0) {
|
|
1619
|
-
var o = n.call(t, e);
|
|
1620
|
-
if (typeof o != "object") return o;
|
|
1621
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1622
|
-
}
|
|
1623
|
-
return (e === "string" ? String : Number)(t);
|
|
1624
|
-
}
|
|
1625
|
-
function Zt(t) {
|
|
1626
|
-
return t && t.map((e, n) => /* @__PURE__ */ G.createElement(e.tag, ht({
|
|
1627
|
-
key: n
|
|
1628
|
-
}, e.attr), Zt(e.child)));
|
|
1629
|
-
}
|
|
1630
|
-
function yt(t) {
|
|
1631
|
-
return (e) => /* @__PURE__ */ G.createElement(mn, mt({
|
|
1632
|
-
attr: ht({}, t.attr)
|
|
1633
|
-
}, e), Zt(t.child));
|
|
1634
|
-
}
|
|
1635
|
-
function mn(t) {
|
|
1636
|
-
var e = (n) => {
|
|
1637
|
-
var {
|
|
1638
|
-
attr: o,
|
|
1639
|
-
size: i,
|
|
1640
|
-
title: r
|
|
1641
|
-
} = t, s = ln(t, cn), c = i || n.size || "1em", l;
|
|
1642
|
-
return n.className && (l = n.className), t.className && (l = (l ? l + " " : "") + t.className), /* @__PURE__ */ G.createElement("svg", mt({
|
|
1643
|
-
stroke: "currentColor",
|
|
1644
|
-
fill: "currentColor",
|
|
1645
|
-
strokeWidth: "0"
|
|
1646
|
-
}, n.attr, o, s, {
|
|
1647
|
-
className: l,
|
|
1648
|
-
style: ht(ht({
|
|
1649
|
-
color: t.color || n.color
|
|
1650
|
-
}, n.style), t.style),
|
|
1651
|
-
height: c,
|
|
1652
|
-
width: c,
|
|
1653
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
1654
|
-
}), r && /* @__PURE__ */ G.createElement("title", null, r), t.children);
|
|
1655
|
-
};
|
|
1656
|
-
return Wt !== void 0 ? /* @__PURE__ */ G.createElement(Wt.Consumer, null, (n) => e(n)) : e(Qt);
|
|
1657
|
-
}
|
|
1658
|
-
function Nn(t) {
|
|
1659
|
-
return yt({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z" }, child: [] }] })(t);
|
|
1660
|
-
}
|
|
1661
|
-
function Dn(t) {
|
|
1662
|
-
return yt({ attr: { viewBox: "0 0 192 512" }, child: [{ tag: "path", attr: { d: "M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z" }, child: [] }] })(t);
|
|
1663
|
-
}
|
|
1664
|
-
function Fn(t) {
|
|
1665
|
-
return yt({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M0 168v-16c0-13.255 10.745-24 24-24h360V80c0-21.367 25.899-32.042 40.971-16.971l80 80c9.372 9.373 9.372 24.569 0 33.941l-80 80C409.956 271.982 384 261.456 384 240v-48H24c-13.255 0-24-10.745-24-24zm488 152H128v-48c0-21.314-25.862-32.08-40.971-16.971l-80 80c-9.372 9.373-9.372 24.569 0 33.941l80 80C102.057 463.997 128 453.437 128 432v-48h360c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24z" }, child: [] }] })(t);
|
|
1666
|
-
}
|
|
1667
|
-
function kn(t) {
|
|
1668
|
-
return yt({ attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M480 192H365.71L260.61 8.06A16.014 16.014 0 0 0 246.71 0h-65.5c-10.63 0-18.3 10.17-15.38 20.39L214.86 192H112l-43.2-57.6c-3.02-4.03-7.77-6.4-12.8-6.4H16.01C5.6 128-2.04 137.78.49 147.88L32 256 .49 364.12C-2.04 374.22 5.6 384 16.01 384H56c5.04 0 9.78-2.37 12.8-6.4L112 320h102.86l-49.03 171.6c-2.92 10.22 4.75 20.4 15.38 20.4h65.5c5.74 0 11.04-3.08 13.89-8.06L365.71 320H480c35.35 0 96-28.65 96-64s-60.65-64-96-64z" }, child: [] }] })(t);
|
|
1669
|
-
}
|
|
1670
|
-
export {
|
|
1671
|
-
kn as F,
|
|
1672
|
-
yt as G,
|
|
1673
|
-
tn as P,
|
|
1674
|
-
xn as a,
|
|
1675
|
-
le as b,
|
|
1676
|
-
wn as c,
|
|
1677
|
-
yn as d,
|
|
1678
|
-
Ln as e,
|
|
1679
|
-
On as f,
|
|
1680
|
-
nt as g,
|
|
1681
|
-
Cn as h,
|
|
1682
|
-
Pn as i,
|
|
1683
|
-
Mn as j,
|
|
1684
|
-
En as k,
|
|
1685
|
-
Sn as l,
|
|
1686
|
-
bn as m,
|
|
1687
|
-
vn as n,
|
|
1688
|
-
An as o,
|
|
1689
|
-
Tn as p,
|
|
1690
|
-
Fn as q,
|
|
1691
|
-
re as r,
|
|
1692
|
-
Rn as s,
|
|
1693
|
-
Dn as t,
|
|
1694
|
-
se as u,
|
|
1695
|
-
Nn as v
|
|
1696
|
-
};
|