@odynn/awayz-core 0.6.45 → 0.6.48
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/Combination-Bx3lWLOq.js +2291 -0
- package/dist/{TripsService-CUPnO2tz.js → TripsService-DywrB9bi.js} +1 -1
- package/dist/{_styles.flight-booking-BhlwjkAV.js → _styles.flight-booking-DEUJthTJ.js} +1 -1
- package/dist/assets/_styles4.css +1 -1
- package/dist/assets/_styles5.css +1 -0
- package/dist/assets/noRetryInstance.css +1 -1
- package/dist/{cashUtils-BDa0CVyi.js → cashUtils-sBirmFfL.js} +4 -4
- package/dist/components/Bookings/FlightBooking/FlightBooking.js +2 -2
- package/dist/components/Bookings/HotelBooking/HotelBooking.js +7 -7
- package/dist/components/CashValue/CashValue.js +77 -841
- package/dist/components/CashValue/CashValue.stories.js +2 -2
- package/dist/components/Menu/Menu.js +812 -1529
- package/dist/components/Tooltip/Tooltip.js +1502 -0
- package/dist/components/Wallet/Card/Card.js +3 -3
- package/dist/components/Wallet/Card/Card.stories.js +10 -9
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +79 -77
- package/dist/hooks/useBookingManagement/useBookingManagement.js +12 -11
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +4 -3
- package/dist/hooks/useFeatureFlags.js +1 -1
- package/dist/hooks/useSearchLimit.js +1 -1
- package/dist/hooks/useTripManagement/useTripManagement.js +7 -6
- package/dist/hooks/useTripManagement/useTripManagement.test.js +5 -4
- package/dist/hooks/useWallet/useWallet.js +6 -5
- package/dist/hooks/useWallet/useWallet.test.js +4 -3
- package/dist/{index-c5toY3Pm.js → index-Bt2pq2GP.js} +4 -4
- package/dist/lib/components/Tooltip/Tooltip.d.ts +8 -0
- package/dist/lib/services/account/AccountService.d.ts +2 -1
- package/dist/lib/services/bookings/BookingService.types.d.ts +1 -0
- package/dist/main.js +1 -1
- package/dist/{noRetryInstance-BMCc2uw4.js → noRetryInstance-Y6wcm2ZM.js} +32 -29
- package/dist/providers/AwayzProvider.js +8 -7
- package/dist/services/account/AccountService.js +2 -2
- package/dist/services/bookings/BookingService.js +3 -2
- package/dist/services/currency/CurrencyService.js +6 -5
- package/dist/services/features/featureService.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/instance.js +2 -2
- package/dist/services/instanceConfig.js +11 -10
- package/dist/services/noRetryInstance.js +1 -1
- package/dist/services/preferences/PreferencesService.js +1 -1
- package/dist/services/rewards/RewardsService.js +1 -1
- package/dist/services/trips/TripsService.js +2 -2
- package/dist/services/wallet/WalletService.js +1 -1
- package/package.json +2 -1
- package/dist/index-BC-KTkxU.js +0 -1571
|
@@ -0,0 +1,2291 @@
|
|
|
1
|
+
import * as m from "react";
|
|
2
|
+
import { useLayoutEffect as Ft, useEffect as It, useState as Wt } from "react";
|
|
3
|
+
import { jsx as se } from "react/jsx-runtime";
|
|
4
|
+
import { r as Bt } from "./index-Cv-wvFlM.js";
|
|
5
|
+
function Hr(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
6
|
+
return function(o) {
|
|
7
|
+
if (e == null || e(o), n === !1 || !o.defaultPrevented)
|
|
8
|
+
return t == null ? void 0 : t(o);
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function qe(e, t) {
|
|
12
|
+
if (typeof e == "function")
|
|
13
|
+
return e(t);
|
|
14
|
+
e != null && (e.current = t);
|
|
15
|
+
}
|
|
16
|
+
function mt(...e) {
|
|
17
|
+
return (t) => {
|
|
18
|
+
let n = !1;
|
|
19
|
+
const r = e.map((o) => {
|
|
20
|
+
const i = qe(o, t);
|
|
21
|
+
return !n && typeof i == "function" && (n = !0), i;
|
|
22
|
+
});
|
|
23
|
+
if (n)
|
|
24
|
+
return () => {
|
|
25
|
+
for (let o = 0; o < r.length; o++) {
|
|
26
|
+
const i = r[o];
|
|
27
|
+
typeof i == "function" ? i() : qe(e[o], null);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function ht(...e) {
|
|
33
|
+
return m.useCallback(mt(...e), e);
|
|
34
|
+
}
|
|
35
|
+
function Ur(e, t = []) {
|
|
36
|
+
let n = [];
|
|
37
|
+
function r(i, s) {
|
|
38
|
+
const c = m.createContext(s), u = n.length;
|
|
39
|
+
n = [...n, s];
|
|
40
|
+
const a = (l) => {
|
|
41
|
+
var y;
|
|
42
|
+
const { scope: v, children: h, ...g } = l, f = ((y = v == null ? void 0 : v[e]) == null ? void 0 : y[u]) || c, p = m.useMemo(() => g, Object.values(g));
|
|
43
|
+
return /* @__PURE__ */ se(f.Provider, { value: p, children: h });
|
|
44
|
+
};
|
|
45
|
+
a.displayName = i + "Provider";
|
|
46
|
+
function d(l, v) {
|
|
47
|
+
var f;
|
|
48
|
+
const h = ((f = v == null ? void 0 : v[e]) == null ? void 0 : f[u]) || c, g = m.useContext(h);
|
|
49
|
+
if (g) return g;
|
|
50
|
+
if (s !== void 0) return s;
|
|
51
|
+
throw new Error(`\`${l}\` must be used within \`${i}\``);
|
|
52
|
+
}
|
|
53
|
+
return [a, d];
|
|
54
|
+
}
|
|
55
|
+
const o = () => {
|
|
56
|
+
const i = n.map((s) => m.createContext(s));
|
|
57
|
+
return function(c) {
|
|
58
|
+
const u = (c == null ? void 0 : c[e]) || i;
|
|
59
|
+
return m.useMemo(
|
|
60
|
+
() => ({ [`__scope${e}`]: { ...c, [e]: u } }),
|
|
61
|
+
[c, u]
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
return o.scopeName = e, [r, _t(o, ...t)];
|
|
66
|
+
}
|
|
67
|
+
function _t(...e) {
|
|
68
|
+
const t = e[0];
|
|
69
|
+
if (e.length === 1) return t;
|
|
70
|
+
const n = () => {
|
|
71
|
+
const r = e.map((o) => ({
|
|
72
|
+
useScope: o(),
|
|
73
|
+
scopeName: o.scopeName
|
|
74
|
+
}));
|
|
75
|
+
return function(i) {
|
|
76
|
+
const s = r.reduce((c, { useScope: u, scopeName: a }) => {
|
|
77
|
+
const l = u(i)[`__scope${a}`];
|
|
78
|
+
return { ...c, ...l };
|
|
79
|
+
}, {});
|
|
80
|
+
return m.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
return n.scopeName = t.scopeName, n;
|
|
84
|
+
}
|
|
85
|
+
function We(e) {
|
|
86
|
+
const t = m.useRef(e);
|
|
87
|
+
return m.useEffect(() => {
|
|
88
|
+
t.current = e;
|
|
89
|
+
}), m.useMemo(() => (...n) => {
|
|
90
|
+
var r;
|
|
91
|
+
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
92
|
+
}, []);
|
|
93
|
+
}
|
|
94
|
+
function jr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
95
|
+
const n = We(e);
|
|
96
|
+
m.useEffect(() => {
|
|
97
|
+
const r = (o) => {
|
|
98
|
+
o.key === "Escape" && n(o);
|
|
99
|
+
};
|
|
100
|
+
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
101
|
+
}, [n, t]);
|
|
102
|
+
}
|
|
103
|
+
var ae = globalThis != null && globalThis.document ? m.useLayoutEffect : () => {
|
|
104
|
+
}, $t = m[" useId ".trim().toString()] || (() => {
|
|
105
|
+
}), Vt = 0;
|
|
106
|
+
function Kr(e) {
|
|
107
|
+
const [t, n] = m.useState($t());
|
|
108
|
+
return ae(() => {
|
|
109
|
+
n((r) => r ?? String(Vt++));
|
|
110
|
+
}, [e]), e || (t ? `radix-${t}` : "");
|
|
111
|
+
}
|
|
112
|
+
const zt = ["top", "right", "bottom", "left"], Z = Math.min, I = Math.max, xe = Math.round, de = Math.floor, H = (e) => ({
|
|
113
|
+
x: e,
|
|
114
|
+
y: e
|
|
115
|
+
}), Ht = {
|
|
116
|
+
left: "right",
|
|
117
|
+
right: "left",
|
|
118
|
+
bottom: "top",
|
|
119
|
+
top: "bottom"
|
|
120
|
+
}, Ut = {
|
|
121
|
+
start: "end",
|
|
122
|
+
end: "start"
|
|
123
|
+
};
|
|
124
|
+
function Be(e, t, n) {
|
|
125
|
+
return I(e, Z(t, n));
|
|
126
|
+
}
|
|
127
|
+
function Y(e, t) {
|
|
128
|
+
return typeof e == "function" ? e(t) : e;
|
|
129
|
+
}
|
|
130
|
+
function X(e) {
|
|
131
|
+
return e.split("-")[0];
|
|
132
|
+
}
|
|
133
|
+
function ie(e) {
|
|
134
|
+
return e.split("-")[1];
|
|
135
|
+
}
|
|
136
|
+
function ze(e) {
|
|
137
|
+
return e === "x" ? "y" : "x";
|
|
138
|
+
}
|
|
139
|
+
function He(e) {
|
|
140
|
+
return e === "y" ? "height" : "width";
|
|
141
|
+
}
|
|
142
|
+
function K(e) {
|
|
143
|
+
return ["top", "bottom"].includes(X(e)) ? "y" : "x";
|
|
144
|
+
}
|
|
145
|
+
function Ue(e) {
|
|
146
|
+
return ze(K(e));
|
|
147
|
+
}
|
|
148
|
+
function jt(e, t, n) {
|
|
149
|
+
n === void 0 && (n = !1);
|
|
150
|
+
const r = ie(e), o = Ue(e), i = He(o);
|
|
151
|
+
let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
152
|
+
return t.reference[i] > t.floating[i] && (s = Se(s)), [s, Se(s)];
|
|
153
|
+
}
|
|
154
|
+
function Kt(e) {
|
|
155
|
+
const t = Se(e);
|
|
156
|
+
return [_e(e), t, _e(t)];
|
|
157
|
+
}
|
|
158
|
+
function _e(e) {
|
|
159
|
+
return e.replace(/start|end/g, (t) => Ut[t]);
|
|
160
|
+
}
|
|
161
|
+
function Yt(e, t, n) {
|
|
162
|
+
const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
|
|
163
|
+
switch (e) {
|
|
164
|
+
case "top":
|
|
165
|
+
case "bottom":
|
|
166
|
+
return n ? t ? o : r : t ? r : o;
|
|
167
|
+
case "left":
|
|
168
|
+
case "right":
|
|
169
|
+
return t ? i : s;
|
|
170
|
+
default:
|
|
171
|
+
return [];
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function Xt(e, t, n, r) {
|
|
175
|
+
const o = ie(e);
|
|
176
|
+
let i = Yt(X(e), n === "start", r);
|
|
177
|
+
return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(_e)))), i;
|
|
178
|
+
}
|
|
179
|
+
function Se(e) {
|
|
180
|
+
return e.replace(/left|right|bottom|top/g, (t) => Ht[t]);
|
|
181
|
+
}
|
|
182
|
+
function qt(e) {
|
|
183
|
+
return {
|
|
184
|
+
top: 0,
|
|
185
|
+
right: 0,
|
|
186
|
+
bottom: 0,
|
|
187
|
+
left: 0,
|
|
188
|
+
...e
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
function vt(e) {
|
|
192
|
+
return typeof e != "number" ? qt(e) : {
|
|
193
|
+
top: e,
|
|
194
|
+
right: e,
|
|
195
|
+
bottom: e,
|
|
196
|
+
left: e
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
function Ee(e) {
|
|
200
|
+
const {
|
|
201
|
+
x: t,
|
|
202
|
+
y: n,
|
|
203
|
+
width: r,
|
|
204
|
+
height: o
|
|
205
|
+
} = e;
|
|
206
|
+
return {
|
|
207
|
+
width: r,
|
|
208
|
+
height: o,
|
|
209
|
+
top: n,
|
|
210
|
+
left: t,
|
|
211
|
+
right: t + r,
|
|
212
|
+
bottom: n + o,
|
|
213
|
+
x: t,
|
|
214
|
+
y: n
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
function Ze(e, t, n) {
|
|
218
|
+
let {
|
|
219
|
+
reference: r,
|
|
220
|
+
floating: o
|
|
221
|
+
} = e;
|
|
222
|
+
const i = K(t), s = Ue(t), c = He(s), u = X(t), a = i === "y", d = r.x + r.width / 2 - o.width / 2, l = r.y + r.height / 2 - o.height / 2, v = r[c] / 2 - o[c] / 2;
|
|
223
|
+
let h;
|
|
224
|
+
switch (u) {
|
|
225
|
+
case "top":
|
|
226
|
+
h = {
|
|
227
|
+
x: d,
|
|
228
|
+
y: r.y - o.height
|
|
229
|
+
};
|
|
230
|
+
break;
|
|
231
|
+
case "bottom":
|
|
232
|
+
h = {
|
|
233
|
+
x: d,
|
|
234
|
+
y: r.y + r.height
|
|
235
|
+
};
|
|
236
|
+
break;
|
|
237
|
+
case "right":
|
|
238
|
+
h = {
|
|
239
|
+
x: r.x + r.width,
|
|
240
|
+
y: l
|
|
241
|
+
};
|
|
242
|
+
break;
|
|
243
|
+
case "left":
|
|
244
|
+
h = {
|
|
245
|
+
x: r.x - o.width,
|
|
246
|
+
y: l
|
|
247
|
+
};
|
|
248
|
+
break;
|
|
249
|
+
default:
|
|
250
|
+
h = {
|
|
251
|
+
x: r.x,
|
|
252
|
+
y: r.y
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
switch (ie(t)) {
|
|
256
|
+
case "start":
|
|
257
|
+
h[s] -= v * (n && a ? -1 : 1);
|
|
258
|
+
break;
|
|
259
|
+
case "end":
|
|
260
|
+
h[s] += v * (n && a ? -1 : 1);
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
return h;
|
|
264
|
+
}
|
|
265
|
+
const Zt = async (e, t, n) => {
|
|
266
|
+
const {
|
|
267
|
+
placement: r = "bottom",
|
|
268
|
+
strategy: o = "absolute",
|
|
269
|
+
middleware: i = [],
|
|
270
|
+
platform: s
|
|
271
|
+
} = n, c = i.filter(Boolean), u = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
272
|
+
let a = await s.getElementRects({
|
|
273
|
+
reference: e,
|
|
274
|
+
floating: t,
|
|
275
|
+
strategy: o
|
|
276
|
+
}), {
|
|
277
|
+
x: d,
|
|
278
|
+
y: l
|
|
279
|
+
} = Ze(a, r, u), v = r, h = {}, g = 0;
|
|
280
|
+
for (let f = 0; f < c.length; f++) {
|
|
281
|
+
const {
|
|
282
|
+
name: p,
|
|
283
|
+
fn: y
|
|
284
|
+
} = c[f], {
|
|
285
|
+
x: w,
|
|
286
|
+
y: b,
|
|
287
|
+
data: x,
|
|
288
|
+
reset: S
|
|
289
|
+
} = await y({
|
|
290
|
+
x: d,
|
|
291
|
+
y: l,
|
|
292
|
+
initialPlacement: r,
|
|
293
|
+
placement: v,
|
|
294
|
+
strategy: o,
|
|
295
|
+
middlewareData: h,
|
|
296
|
+
rects: a,
|
|
297
|
+
platform: s,
|
|
298
|
+
elements: {
|
|
299
|
+
reference: e,
|
|
300
|
+
floating: t
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
d = w ?? d, l = b ?? l, h = {
|
|
304
|
+
...h,
|
|
305
|
+
[p]: {
|
|
306
|
+
...h[p],
|
|
307
|
+
...x
|
|
308
|
+
}
|
|
309
|
+
}, S && g <= 50 && (g++, typeof S == "object" && (S.placement && (v = S.placement), S.rects && (a = S.rects === !0 ? await s.getElementRects({
|
|
310
|
+
reference: e,
|
|
311
|
+
floating: t,
|
|
312
|
+
strategy: o
|
|
313
|
+
}) : S.rects), {
|
|
314
|
+
x: d,
|
|
315
|
+
y: l
|
|
316
|
+
} = Ze(a, v, u)), f = -1);
|
|
317
|
+
}
|
|
318
|
+
return {
|
|
319
|
+
x: d,
|
|
320
|
+
y: l,
|
|
321
|
+
placement: v,
|
|
322
|
+
strategy: o,
|
|
323
|
+
middlewareData: h
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
async function le(e, t) {
|
|
327
|
+
var n;
|
|
328
|
+
t === void 0 && (t = {});
|
|
329
|
+
const {
|
|
330
|
+
x: r,
|
|
331
|
+
y: o,
|
|
332
|
+
platform: i,
|
|
333
|
+
rects: s,
|
|
334
|
+
elements: c,
|
|
335
|
+
strategy: u
|
|
336
|
+
} = e, {
|
|
337
|
+
boundary: a = "clippingAncestors",
|
|
338
|
+
rootBoundary: d = "viewport",
|
|
339
|
+
elementContext: l = "floating",
|
|
340
|
+
altBoundary: v = !1,
|
|
341
|
+
padding: h = 0
|
|
342
|
+
} = Y(t, e), g = vt(h), p = c[v ? l === "floating" ? "reference" : "floating" : l], y = Ee(await i.getClippingRect({
|
|
343
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(p))) == null || n ? p : p.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
344
|
+
boundary: a,
|
|
345
|
+
rootBoundary: d,
|
|
346
|
+
strategy: u
|
|
347
|
+
})), w = l === "floating" ? {
|
|
348
|
+
x: r,
|
|
349
|
+
y: o,
|
|
350
|
+
width: s.floating.width,
|
|
351
|
+
height: s.floating.height
|
|
352
|
+
} : s.reference, b = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), x = await (i.isElement == null ? void 0 : i.isElement(b)) ? await (i.getScale == null ? void 0 : i.getScale(b)) || {
|
|
353
|
+
x: 1,
|
|
354
|
+
y: 1
|
|
355
|
+
} : {
|
|
356
|
+
x: 1,
|
|
357
|
+
y: 1
|
|
358
|
+
}, S = Ee(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
359
|
+
elements: c,
|
|
360
|
+
rect: w,
|
|
361
|
+
offsetParent: b,
|
|
362
|
+
strategy: u
|
|
363
|
+
}) : w);
|
|
364
|
+
return {
|
|
365
|
+
top: (y.top - S.top + g.top) / x.y,
|
|
366
|
+
bottom: (S.bottom - y.bottom + g.bottom) / x.y,
|
|
367
|
+
left: (y.left - S.left + g.left) / x.x,
|
|
368
|
+
right: (S.right - y.right + g.right) / x.x
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
const Gt = (e) => ({
|
|
372
|
+
name: "arrow",
|
|
373
|
+
options: e,
|
|
374
|
+
async fn(t) {
|
|
375
|
+
const {
|
|
376
|
+
x: n,
|
|
377
|
+
y: r,
|
|
378
|
+
placement: o,
|
|
379
|
+
rects: i,
|
|
380
|
+
platform: s,
|
|
381
|
+
elements: c,
|
|
382
|
+
middlewareData: u
|
|
383
|
+
} = t, {
|
|
384
|
+
element: a,
|
|
385
|
+
padding: d = 0
|
|
386
|
+
} = Y(e, t) || {};
|
|
387
|
+
if (a == null)
|
|
388
|
+
return {};
|
|
389
|
+
const l = vt(d), v = {
|
|
390
|
+
x: n,
|
|
391
|
+
y: r
|
|
392
|
+
}, h = Ue(o), g = He(h), f = await s.getDimensions(a), p = h === "y", y = p ? "top" : "left", w = p ? "bottom" : "right", b = p ? "clientHeight" : "clientWidth", x = i.reference[g] + i.reference[h] - v[h] - i.floating[g], S = v[h] - i.reference[h], C = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
|
|
393
|
+
let E = C ? C[b] : 0;
|
|
394
|
+
(!E || !await (s.isElement == null ? void 0 : s.isElement(C))) && (E = c.floating[b] || i.floating[g]);
|
|
395
|
+
const A = x / 2 - S / 2, P = E / 2 - f[g] / 2 - 1, O = Z(l[y], P), B = Z(l[w], P), F = O, L = E - f[g] - B, k = E / 2 - f[g] / 2 + A, D = Be(F, k, L), T = !u.arrow && ie(o) != null && k !== D && i.reference[g] / 2 - (k < F ? O : B) - f[g] / 2 < 0, _ = T ? k < F ? k - F : k - L : 0;
|
|
396
|
+
return {
|
|
397
|
+
[h]: v[h] + _,
|
|
398
|
+
data: {
|
|
399
|
+
[h]: D,
|
|
400
|
+
centerOffset: k - D - _,
|
|
401
|
+
...T && {
|
|
402
|
+
alignmentOffset: _
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
reset: T
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
}), Qt = function(e) {
|
|
409
|
+
return e === void 0 && (e = {}), {
|
|
410
|
+
name: "flip",
|
|
411
|
+
options: e,
|
|
412
|
+
async fn(t) {
|
|
413
|
+
var n, r;
|
|
414
|
+
const {
|
|
415
|
+
placement: o,
|
|
416
|
+
middlewareData: i,
|
|
417
|
+
rects: s,
|
|
418
|
+
initialPlacement: c,
|
|
419
|
+
platform: u,
|
|
420
|
+
elements: a
|
|
421
|
+
} = t, {
|
|
422
|
+
mainAxis: d = !0,
|
|
423
|
+
crossAxis: l = !0,
|
|
424
|
+
fallbackPlacements: v,
|
|
425
|
+
fallbackStrategy: h = "bestFit",
|
|
426
|
+
fallbackAxisSideDirection: g = "none",
|
|
427
|
+
flipAlignment: f = !0,
|
|
428
|
+
...p
|
|
429
|
+
} = Y(e, t);
|
|
430
|
+
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
431
|
+
return {};
|
|
432
|
+
const y = X(o), w = K(c), b = X(c) === c, x = await (u.isRTL == null ? void 0 : u.isRTL(a.floating)), S = v || (b || !f ? [Se(c)] : Kt(c)), C = g !== "none";
|
|
433
|
+
!v && C && S.push(...Xt(c, f, g, x));
|
|
434
|
+
const E = [c, ...S], A = await le(t, p), P = [];
|
|
435
|
+
let O = ((r = i.flip) == null ? void 0 : r.overflows) || [];
|
|
436
|
+
if (d && P.push(A[y]), l) {
|
|
437
|
+
const D = jt(o, s, x);
|
|
438
|
+
P.push(A[D[0]], A[D[1]]);
|
|
439
|
+
}
|
|
440
|
+
if (O = [...O, {
|
|
441
|
+
placement: o,
|
|
442
|
+
overflows: P
|
|
443
|
+
}], !P.every((D) => D <= 0)) {
|
|
444
|
+
var B, F;
|
|
445
|
+
const D = (((B = i.flip) == null ? void 0 : B.index) || 0) + 1, T = E[D];
|
|
446
|
+
if (T) {
|
|
447
|
+
var L;
|
|
448
|
+
const R = l === "alignment" ? w !== K(T) : !1, M = ((L = O[0]) == null ? void 0 : L.overflows[0]) > 0;
|
|
449
|
+
if (!R || M)
|
|
450
|
+
return {
|
|
451
|
+
data: {
|
|
452
|
+
index: D,
|
|
453
|
+
overflows: O
|
|
454
|
+
},
|
|
455
|
+
reset: {
|
|
456
|
+
placement: T
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
let _ = (F = O.filter((R) => R.overflows[0] <= 0).sort((R, M) => R.overflows[1] - M.overflows[1])[0]) == null ? void 0 : F.placement;
|
|
461
|
+
if (!_)
|
|
462
|
+
switch (h) {
|
|
463
|
+
case "bestFit": {
|
|
464
|
+
var k;
|
|
465
|
+
const R = (k = O.filter((M) => {
|
|
466
|
+
if (C) {
|
|
467
|
+
const N = K(M.placement);
|
|
468
|
+
return N === w || // Create a bias to the `y` side axis due to horizontal
|
|
469
|
+
// reading directions favoring greater width.
|
|
470
|
+
N === "y";
|
|
471
|
+
}
|
|
472
|
+
return !0;
|
|
473
|
+
}).map((M) => [M.placement, M.overflows.filter((N) => N > 0).reduce((N, Dt) => N + Dt, 0)]).sort((M, N) => M[1] - N[1])[0]) == null ? void 0 : k[0];
|
|
474
|
+
R && (_ = R);
|
|
475
|
+
break;
|
|
476
|
+
}
|
|
477
|
+
case "initialPlacement":
|
|
478
|
+
_ = c;
|
|
479
|
+
break;
|
|
480
|
+
}
|
|
481
|
+
if (o !== _)
|
|
482
|
+
return {
|
|
483
|
+
reset: {
|
|
484
|
+
placement: _
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
return {};
|
|
489
|
+
}
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
function Ge(e, t) {
|
|
493
|
+
return {
|
|
494
|
+
top: e.top - t.height,
|
|
495
|
+
right: e.right - t.width,
|
|
496
|
+
bottom: e.bottom - t.height,
|
|
497
|
+
left: e.left - t.width
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
function Qe(e) {
|
|
501
|
+
return zt.some((t) => e[t] >= 0);
|
|
502
|
+
}
|
|
503
|
+
const Jt = function(e) {
|
|
504
|
+
return e === void 0 && (e = {}), {
|
|
505
|
+
name: "hide",
|
|
506
|
+
options: e,
|
|
507
|
+
async fn(t) {
|
|
508
|
+
const {
|
|
509
|
+
rects: n
|
|
510
|
+
} = t, {
|
|
511
|
+
strategy: r = "referenceHidden",
|
|
512
|
+
...o
|
|
513
|
+
} = Y(e, t);
|
|
514
|
+
switch (r) {
|
|
515
|
+
case "referenceHidden": {
|
|
516
|
+
const i = await le(t, {
|
|
517
|
+
...o,
|
|
518
|
+
elementContext: "reference"
|
|
519
|
+
}), s = Ge(i, n.reference);
|
|
520
|
+
return {
|
|
521
|
+
data: {
|
|
522
|
+
referenceHiddenOffsets: s,
|
|
523
|
+
referenceHidden: Qe(s)
|
|
524
|
+
}
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
case "escaped": {
|
|
528
|
+
const i = await le(t, {
|
|
529
|
+
...o,
|
|
530
|
+
altBoundary: !0
|
|
531
|
+
}), s = Ge(i, n.floating);
|
|
532
|
+
return {
|
|
533
|
+
data: {
|
|
534
|
+
escapedOffsets: s,
|
|
535
|
+
escaped: Qe(s)
|
|
536
|
+
}
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
default:
|
|
540
|
+
return {};
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
async function en(e, t) {
|
|
546
|
+
const {
|
|
547
|
+
placement: n,
|
|
548
|
+
platform: r,
|
|
549
|
+
elements: o
|
|
550
|
+
} = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = X(n), c = ie(n), u = K(n) === "y", a = ["left", "top"].includes(s) ? -1 : 1, d = i && u ? -1 : 1, l = Y(t, e);
|
|
551
|
+
let {
|
|
552
|
+
mainAxis: v,
|
|
553
|
+
crossAxis: h,
|
|
554
|
+
alignmentAxis: g
|
|
555
|
+
} = typeof l == "number" ? {
|
|
556
|
+
mainAxis: l,
|
|
557
|
+
crossAxis: 0,
|
|
558
|
+
alignmentAxis: null
|
|
559
|
+
} : {
|
|
560
|
+
mainAxis: l.mainAxis || 0,
|
|
561
|
+
crossAxis: l.crossAxis || 0,
|
|
562
|
+
alignmentAxis: l.alignmentAxis
|
|
563
|
+
};
|
|
564
|
+
return c && typeof g == "number" && (h = c === "end" ? g * -1 : g), u ? {
|
|
565
|
+
x: h * d,
|
|
566
|
+
y: v * a
|
|
567
|
+
} : {
|
|
568
|
+
x: v * a,
|
|
569
|
+
y: h * d
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
const tn = function(e) {
|
|
573
|
+
return e === void 0 && (e = 0), {
|
|
574
|
+
name: "offset",
|
|
575
|
+
options: e,
|
|
576
|
+
async fn(t) {
|
|
577
|
+
var n, r;
|
|
578
|
+
const {
|
|
579
|
+
x: o,
|
|
580
|
+
y: i,
|
|
581
|
+
placement: s,
|
|
582
|
+
middlewareData: c
|
|
583
|
+
} = t, u = await en(t, e);
|
|
584
|
+
return s === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
|
|
585
|
+
x: o + u.x,
|
|
586
|
+
y: i + u.y,
|
|
587
|
+
data: {
|
|
588
|
+
...u,
|
|
589
|
+
placement: s
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
};
|
|
594
|
+
}, nn = function(e) {
|
|
595
|
+
return e === void 0 && (e = {}), {
|
|
596
|
+
name: "shift",
|
|
597
|
+
options: e,
|
|
598
|
+
async fn(t) {
|
|
599
|
+
const {
|
|
600
|
+
x: n,
|
|
601
|
+
y: r,
|
|
602
|
+
placement: o
|
|
603
|
+
} = t, {
|
|
604
|
+
mainAxis: i = !0,
|
|
605
|
+
crossAxis: s = !1,
|
|
606
|
+
limiter: c = {
|
|
607
|
+
fn: (p) => {
|
|
608
|
+
let {
|
|
609
|
+
x: y,
|
|
610
|
+
y: w
|
|
611
|
+
} = p;
|
|
612
|
+
return {
|
|
613
|
+
x: y,
|
|
614
|
+
y: w
|
|
615
|
+
};
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
...u
|
|
619
|
+
} = Y(e, t), a = {
|
|
620
|
+
x: n,
|
|
621
|
+
y: r
|
|
622
|
+
}, d = await le(t, u), l = K(X(o)), v = ze(l);
|
|
623
|
+
let h = a[v], g = a[l];
|
|
624
|
+
if (i) {
|
|
625
|
+
const p = v === "y" ? "top" : "left", y = v === "y" ? "bottom" : "right", w = h + d[p], b = h - d[y];
|
|
626
|
+
h = Be(w, h, b);
|
|
627
|
+
}
|
|
628
|
+
if (s) {
|
|
629
|
+
const p = l === "y" ? "top" : "left", y = l === "y" ? "bottom" : "right", w = g + d[p], b = g - d[y];
|
|
630
|
+
g = Be(w, g, b);
|
|
631
|
+
}
|
|
632
|
+
const f = c.fn({
|
|
633
|
+
...t,
|
|
634
|
+
[v]: h,
|
|
635
|
+
[l]: g
|
|
636
|
+
});
|
|
637
|
+
return {
|
|
638
|
+
...f,
|
|
639
|
+
data: {
|
|
640
|
+
x: f.x - n,
|
|
641
|
+
y: f.y - r,
|
|
642
|
+
enabled: {
|
|
643
|
+
[v]: i,
|
|
644
|
+
[l]: s
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
}, rn = function(e) {
|
|
651
|
+
return e === void 0 && (e = {}), {
|
|
652
|
+
options: e,
|
|
653
|
+
fn(t) {
|
|
654
|
+
const {
|
|
655
|
+
x: n,
|
|
656
|
+
y: r,
|
|
657
|
+
placement: o,
|
|
658
|
+
rects: i,
|
|
659
|
+
middlewareData: s
|
|
660
|
+
} = t, {
|
|
661
|
+
offset: c = 0,
|
|
662
|
+
mainAxis: u = !0,
|
|
663
|
+
crossAxis: a = !0
|
|
664
|
+
} = Y(e, t), d = {
|
|
665
|
+
x: n,
|
|
666
|
+
y: r
|
|
667
|
+
}, l = K(o), v = ze(l);
|
|
668
|
+
let h = d[v], g = d[l];
|
|
669
|
+
const f = Y(c, t), p = typeof f == "number" ? {
|
|
670
|
+
mainAxis: f,
|
|
671
|
+
crossAxis: 0
|
|
672
|
+
} : {
|
|
673
|
+
mainAxis: 0,
|
|
674
|
+
crossAxis: 0,
|
|
675
|
+
...f
|
|
676
|
+
};
|
|
677
|
+
if (u) {
|
|
678
|
+
const b = v === "y" ? "height" : "width", x = i.reference[v] - i.floating[b] + p.mainAxis, S = i.reference[v] + i.reference[b] - p.mainAxis;
|
|
679
|
+
h < x ? h = x : h > S && (h = S);
|
|
680
|
+
}
|
|
681
|
+
if (a) {
|
|
682
|
+
var y, w;
|
|
683
|
+
const b = v === "y" ? "width" : "height", x = ["top", "left"].includes(X(o)), S = i.reference[l] - i.floating[b] + (x && ((y = s.offset) == null ? void 0 : y[l]) || 0) + (x ? 0 : p.crossAxis), C = i.reference[l] + i.reference[b] + (x ? 0 : ((w = s.offset) == null ? void 0 : w[l]) || 0) - (x ? p.crossAxis : 0);
|
|
684
|
+
g < S ? g = S : g > C && (g = C);
|
|
685
|
+
}
|
|
686
|
+
return {
|
|
687
|
+
[v]: h,
|
|
688
|
+
[l]: g
|
|
689
|
+
};
|
|
690
|
+
}
|
|
691
|
+
};
|
|
692
|
+
}, on = function(e) {
|
|
693
|
+
return e === void 0 && (e = {}), {
|
|
694
|
+
name: "size",
|
|
695
|
+
options: e,
|
|
696
|
+
async fn(t) {
|
|
697
|
+
var n, r;
|
|
698
|
+
const {
|
|
699
|
+
placement: o,
|
|
700
|
+
rects: i,
|
|
701
|
+
platform: s,
|
|
702
|
+
elements: c
|
|
703
|
+
} = t, {
|
|
704
|
+
apply: u = () => {
|
|
705
|
+
},
|
|
706
|
+
...a
|
|
707
|
+
} = Y(e, t), d = await le(t, a), l = X(o), v = ie(o), h = K(o) === "y", {
|
|
708
|
+
width: g,
|
|
709
|
+
height: f
|
|
710
|
+
} = i.floating;
|
|
711
|
+
let p, y;
|
|
712
|
+
l === "top" || l === "bottom" ? (p = l, y = v === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (y = l, p = v === "end" ? "top" : "bottom");
|
|
713
|
+
const w = f - d.top - d.bottom, b = g - d.left - d.right, x = Z(f - d[p], w), S = Z(g - d[y], b), C = !t.middlewareData.shift;
|
|
714
|
+
let E = x, A = S;
|
|
715
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (A = b), (r = t.middlewareData.shift) != null && r.enabled.y && (E = w), C && !v) {
|
|
716
|
+
const O = I(d.left, 0), B = I(d.right, 0), F = I(d.top, 0), L = I(d.bottom, 0);
|
|
717
|
+
h ? A = g - 2 * (O !== 0 || B !== 0 ? O + B : I(d.left, d.right)) : E = f - 2 * (F !== 0 || L !== 0 ? F + L : I(d.top, d.bottom));
|
|
718
|
+
}
|
|
719
|
+
await u({
|
|
720
|
+
...t,
|
|
721
|
+
availableWidth: A,
|
|
722
|
+
availableHeight: E
|
|
723
|
+
});
|
|
724
|
+
const P = await s.getDimensions(c.floating);
|
|
725
|
+
return g !== P.width || f !== P.height ? {
|
|
726
|
+
reset: {
|
|
727
|
+
rects: !0
|
|
728
|
+
}
|
|
729
|
+
} : {};
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
};
|
|
733
|
+
function Re() {
|
|
734
|
+
return typeof window < "u";
|
|
735
|
+
}
|
|
736
|
+
function ce(e) {
|
|
737
|
+
return pt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
738
|
+
}
|
|
739
|
+
function W(e) {
|
|
740
|
+
var t;
|
|
741
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
742
|
+
}
|
|
743
|
+
function j(e) {
|
|
744
|
+
var t;
|
|
745
|
+
return (t = (pt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
746
|
+
}
|
|
747
|
+
function pt(e) {
|
|
748
|
+
return Re() ? e instanceof Node || e instanceof W(e).Node : !1;
|
|
749
|
+
}
|
|
750
|
+
function $(e) {
|
|
751
|
+
return Re() ? e instanceof Element || e instanceof W(e).Element : !1;
|
|
752
|
+
}
|
|
753
|
+
function U(e) {
|
|
754
|
+
return Re() ? e instanceof HTMLElement || e instanceof W(e).HTMLElement : !1;
|
|
755
|
+
}
|
|
756
|
+
function Je(e) {
|
|
757
|
+
return !Re() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof W(e).ShadowRoot;
|
|
758
|
+
}
|
|
759
|
+
function fe(e) {
|
|
760
|
+
const {
|
|
761
|
+
overflow: t,
|
|
762
|
+
overflowX: n,
|
|
763
|
+
overflowY: r,
|
|
764
|
+
display: o
|
|
765
|
+
} = V(e);
|
|
766
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
|
|
767
|
+
}
|
|
768
|
+
function cn(e) {
|
|
769
|
+
return ["table", "td", "th"].includes(ce(e));
|
|
770
|
+
}
|
|
771
|
+
function Ae(e) {
|
|
772
|
+
return [":popover-open", ":modal"].some((t) => {
|
|
773
|
+
try {
|
|
774
|
+
return e.matches(t);
|
|
775
|
+
} catch {
|
|
776
|
+
return !1;
|
|
777
|
+
}
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
function je(e) {
|
|
781
|
+
const t = Ke(), n = $(e) ? V(e) : e;
|
|
782
|
+
return ["transform", "translate", "scale", "rotate", "perspective"].some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
|
|
783
|
+
}
|
|
784
|
+
function sn(e) {
|
|
785
|
+
let t = G(e);
|
|
786
|
+
for (; U(t) && !oe(t); ) {
|
|
787
|
+
if (je(t))
|
|
788
|
+
return t;
|
|
789
|
+
if (Ae(t))
|
|
790
|
+
return null;
|
|
791
|
+
t = G(t);
|
|
792
|
+
}
|
|
793
|
+
return null;
|
|
794
|
+
}
|
|
795
|
+
function Ke() {
|
|
796
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
797
|
+
}
|
|
798
|
+
function oe(e) {
|
|
799
|
+
return ["html", "body", "#document"].includes(ce(e));
|
|
800
|
+
}
|
|
801
|
+
function V(e) {
|
|
802
|
+
return W(e).getComputedStyle(e);
|
|
803
|
+
}
|
|
804
|
+
function Oe(e) {
|
|
805
|
+
return $(e) ? {
|
|
806
|
+
scrollLeft: e.scrollLeft,
|
|
807
|
+
scrollTop: e.scrollTop
|
|
808
|
+
} : {
|
|
809
|
+
scrollLeft: e.scrollX,
|
|
810
|
+
scrollTop: e.scrollY
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
function G(e) {
|
|
814
|
+
if (ce(e) === "html")
|
|
815
|
+
return e;
|
|
816
|
+
const t = (
|
|
817
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
818
|
+
e.assignedSlot || // DOM Element detected.
|
|
819
|
+
e.parentNode || // ShadowRoot detected.
|
|
820
|
+
Je(e) && e.host || // Fallback.
|
|
821
|
+
j(e)
|
|
822
|
+
);
|
|
823
|
+
return Je(t) ? t.host : t;
|
|
824
|
+
}
|
|
825
|
+
function gt(e) {
|
|
826
|
+
const t = G(e);
|
|
827
|
+
return oe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && fe(t) ? t : gt(t);
|
|
828
|
+
}
|
|
829
|
+
function ue(e, t, n) {
|
|
830
|
+
var r;
|
|
831
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
832
|
+
const o = gt(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = W(o);
|
|
833
|
+
if (i) {
|
|
834
|
+
const c = $e(s);
|
|
835
|
+
return t.concat(s, s.visualViewport || [], fe(o) ? o : [], c && n ? ue(c) : []);
|
|
836
|
+
}
|
|
837
|
+
return t.concat(o, ue(o, [], n));
|
|
838
|
+
}
|
|
839
|
+
function $e(e) {
|
|
840
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
841
|
+
}
|
|
842
|
+
function yt(e) {
|
|
843
|
+
const t = V(e);
|
|
844
|
+
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
845
|
+
const o = U(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, c = xe(n) !== i || xe(r) !== s;
|
|
846
|
+
return c && (n = i, r = s), {
|
|
847
|
+
width: n,
|
|
848
|
+
height: r,
|
|
849
|
+
$: c
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
function Ye(e) {
|
|
853
|
+
return $(e) ? e : e.contextElement;
|
|
854
|
+
}
|
|
855
|
+
function ne(e) {
|
|
856
|
+
const t = Ye(e);
|
|
857
|
+
if (!U(t))
|
|
858
|
+
return H(1);
|
|
859
|
+
const n = t.getBoundingClientRect(), {
|
|
860
|
+
width: r,
|
|
861
|
+
height: o,
|
|
862
|
+
$: i
|
|
863
|
+
} = yt(t);
|
|
864
|
+
let s = (i ? xe(n.width) : n.width) / r, c = (i ? xe(n.height) : n.height) / o;
|
|
865
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
866
|
+
x: s,
|
|
867
|
+
y: c
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
const an = /* @__PURE__ */ H(0);
|
|
871
|
+
function wt(e) {
|
|
872
|
+
const t = W(e);
|
|
873
|
+
return !Ke() || !t.visualViewport ? an : {
|
|
874
|
+
x: t.visualViewport.offsetLeft,
|
|
875
|
+
y: t.visualViewport.offsetTop
|
|
876
|
+
};
|
|
877
|
+
}
|
|
878
|
+
function ln(e, t, n) {
|
|
879
|
+
return t === void 0 && (t = !1), !n || t && n !== W(e) ? !1 : t;
|
|
880
|
+
}
|
|
881
|
+
function Q(e, t, n, r) {
|
|
882
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
883
|
+
const o = e.getBoundingClientRect(), i = Ye(e);
|
|
884
|
+
let s = H(1);
|
|
885
|
+
t && (r ? $(r) && (s = ne(r)) : s = ne(e));
|
|
886
|
+
const c = ln(i, n, r) ? wt(i) : H(0);
|
|
887
|
+
let u = (o.left + c.x) / s.x, a = (o.top + c.y) / s.y, d = o.width / s.x, l = o.height / s.y;
|
|
888
|
+
if (i) {
|
|
889
|
+
const v = W(i), h = r && $(r) ? W(r) : r;
|
|
890
|
+
let g = v, f = $e(g);
|
|
891
|
+
for (; f && r && h !== g; ) {
|
|
892
|
+
const p = ne(f), y = f.getBoundingClientRect(), w = V(f), b = y.left + (f.clientLeft + parseFloat(w.paddingLeft)) * p.x, x = y.top + (f.clientTop + parseFloat(w.paddingTop)) * p.y;
|
|
893
|
+
u *= p.x, a *= p.y, d *= p.x, l *= p.y, u += b, a += x, g = W(f), f = $e(g);
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
return Ee({
|
|
897
|
+
width: d,
|
|
898
|
+
height: l,
|
|
899
|
+
x: u,
|
|
900
|
+
y: a
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
function Xe(e, t) {
|
|
904
|
+
const n = Oe(e).scrollLeft;
|
|
905
|
+
return t ? t.left + n : Q(j(e)).left + n;
|
|
906
|
+
}
|
|
907
|
+
function bt(e, t, n) {
|
|
908
|
+
n === void 0 && (n = !1);
|
|
909
|
+
const r = e.getBoundingClientRect(), o = r.left + t.scrollLeft - (n ? 0 : (
|
|
910
|
+
// RTL <body> scrollbar.
|
|
911
|
+
Xe(e, r)
|
|
912
|
+
)), i = r.top + t.scrollTop;
|
|
913
|
+
return {
|
|
914
|
+
x: o,
|
|
915
|
+
y: i
|
|
916
|
+
};
|
|
917
|
+
}
|
|
918
|
+
function un(e) {
|
|
919
|
+
let {
|
|
920
|
+
elements: t,
|
|
921
|
+
rect: n,
|
|
922
|
+
offsetParent: r,
|
|
923
|
+
strategy: o
|
|
924
|
+
} = e;
|
|
925
|
+
const i = o === "fixed", s = j(r), c = t ? Ae(t.floating) : !1;
|
|
926
|
+
if (r === s || c && i)
|
|
927
|
+
return n;
|
|
928
|
+
let u = {
|
|
929
|
+
scrollLeft: 0,
|
|
930
|
+
scrollTop: 0
|
|
931
|
+
}, a = H(1);
|
|
932
|
+
const d = H(0), l = U(r);
|
|
933
|
+
if ((l || !l && !i) && ((ce(r) !== "body" || fe(s)) && (u = Oe(r)), U(r))) {
|
|
934
|
+
const h = Q(r);
|
|
935
|
+
a = ne(r), d.x = h.x + r.clientLeft, d.y = h.y + r.clientTop;
|
|
936
|
+
}
|
|
937
|
+
const v = s && !l && !i ? bt(s, u, !0) : H(0);
|
|
938
|
+
return {
|
|
939
|
+
width: n.width * a.x,
|
|
940
|
+
height: n.height * a.y,
|
|
941
|
+
x: n.x * a.x - u.scrollLeft * a.x + d.x + v.x,
|
|
942
|
+
y: n.y * a.y - u.scrollTop * a.y + d.y + v.y
|
|
943
|
+
};
|
|
944
|
+
}
|
|
945
|
+
function fn(e) {
|
|
946
|
+
return Array.from(e.getClientRects());
|
|
947
|
+
}
|
|
948
|
+
function dn(e) {
|
|
949
|
+
const t = j(e), n = Oe(e), r = e.ownerDocument.body, o = I(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = I(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
950
|
+
let s = -n.scrollLeft + Xe(e);
|
|
951
|
+
const c = -n.scrollTop;
|
|
952
|
+
return V(r).direction === "rtl" && (s += I(t.clientWidth, r.clientWidth) - o), {
|
|
953
|
+
width: o,
|
|
954
|
+
height: i,
|
|
955
|
+
x: s,
|
|
956
|
+
y: c
|
|
957
|
+
};
|
|
958
|
+
}
|
|
959
|
+
function mn(e, t) {
|
|
960
|
+
const n = W(e), r = j(e), o = n.visualViewport;
|
|
961
|
+
let i = r.clientWidth, s = r.clientHeight, c = 0, u = 0;
|
|
962
|
+
if (o) {
|
|
963
|
+
i = o.width, s = o.height;
|
|
964
|
+
const a = Ke();
|
|
965
|
+
(!a || a && t === "fixed") && (c = o.offsetLeft, u = o.offsetTop);
|
|
966
|
+
}
|
|
967
|
+
return {
|
|
968
|
+
width: i,
|
|
969
|
+
height: s,
|
|
970
|
+
x: c,
|
|
971
|
+
y: u
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
function hn(e, t) {
|
|
975
|
+
const n = Q(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = U(e) ? ne(e) : H(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, u = o * i.x, a = r * i.y;
|
|
976
|
+
return {
|
|
977
|
+
width: s,
|
|
978
|
+
height: c,
|
|
979
|
+
x: u,
|
|
980
|
+
y: a
|
|
981
|
+
};
|
|
982
|
+
}
|
|
983
|
+
function et(e, t, n) {
|
|
984
|
+
let r;
|
|
985
|
+
if (t === "viewport")
|
|
986
|
+
r = mn(e, n);
|
|
987
|
+
else if (t === "document")
|
|
988
|
+
r = dn(j(e));
|
|
989
|
+
else if ($(t))
|
|
990
|
+
r = hn(t, n);
|
|
991
|
+
else {
|
|
992
|
+
const o = wt(e);
|
|
993
|
+
r = {
|
|
994
|
+
x: t.x - o.x,
|
|
995
|
+
y: t.y - o.y,
|
|
996
|
+
width: t.width,
|
|
997
|
+
height: t.height
|
|
998
|
+
};
|
|
999
|
+
}
|
|
1000
|
+
return Ee(r);
|
|
1001
|
+
}
|
|
1002
|
+
function xt(e, t) {
|
|
1003
|
+
const n = G(e);
|
|
1004
|
+
return n === t || !$(n) || oe(n) ? !1 : V(n).position === "fixed" || xt(n, t);
|
|
1005
|
+
}
|
|
1006
|
+
function vn(e, t) {
|
|
1007
|
+
const n = t.get(e);
|
|
1008
|
+
if (n)
|
|
1009
|
+
return n;
|
|
1010
|
+
let r = ue(e, [], !1).filter((c) => $(c) && ce(c) !== "body"), o = null;
|
|
1011
|
+
const i = V(e).position === "fixed";
|
|
1012
|
+
let s = i ? G(e) : e;
|
|
1013
|
+
for (; $(s) && !oe(s); ) {
|
|
1014
|
+
const c = V(s), u = je(s);
|
|
1015
|
+
!u && c.position === "fixed" && (o = null), (i ? !u && !o : !u && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || fe(s) && !u && xt(e, s)) ? r = r.filter((d) => d !== s) : o = c, s = G(s);
|
|
1016
|
+
}
|
|
1017
|
+
return t.set(e, r), r;
|
|
1018
|
+
}
|
|
1019
|
+
function pn(e) {
|
|
1020
|
+
let {
|
|
1021
|
+
element: t,
|
|
1022
|
+
boundary: n,
|
|
1023
|
+
rootBoundary: r,
|
|
1024
|
+
strategy: o
|
|
1025
|
+
} = e;
|
|
1026
|
+
const s = [...n === "clippingAncestors" ? Ae(t) ? [] : vn(t, this._c) : [].concat(n), r], c = s[0], u = s.reduce((a, d) => {
|
|
1027
|
+
const l = et(t, d, o);
|
|
1028
|
+
return a.top = I(l.top, a.top), a.right = Z(l.right, a.right), a.bottom = Z(l.bottom, a.bottom), a.left = I(l.left, a.left), a;
|
|
1029
|
+
}, et(t, c, o));
|
|
1030
|
+
return {
|
|
1031
|
+
width: u.right - u.left,
|
|
1032
|
+
height: u.bottom - u.top,
|
|
1033
|
+
x: u.left,
|
|
1034
|
+
y: u.top
|
|
1035
|
+
};
|
|
1036
|
+
}
|
|
1037
|
+
function gn(e) {
|
|
1038
|
+
const {
|
|
1039
|
+
width: t,
|
|
1040
|
+
height: n
|
|
1041
|
+
} = yt(e);
|
|
1042
|
+
return {
|
|
1043
|
+
width: t,
|
|
1044
|
+
height: n
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
function yn(e, t, n) {
|
|
1048
|
+
const r = U(t), o = j(t), i = n === "fixed", s = Q(e, !0, i, t);
|
|
1049
|
+
let c = {
|
|
1050
|
+
scrollLeft: 0,
|
|
1051
|
+
scrollTop: 0
|
|
1052
|
+
};
|
|
1053
|
+
const u = H(0);
|
|
1054
|
+
function a() {
|
|
1055
|
+
u.x = Xe(o);
|
|
1056
|
+
}
|
|
1057
|
+
if (r || !r && !i)
|
|
1058
|
+
if ((ce(t) !== "body" || fe(o)) && (c = Oe(t)), r) {
|
|
1059
|
+
const h = Q(t, !0, i, t);
|
|
1060
|
+
u.x = h.x + t.clientLeft, u.y = h.y + t.clientTop;
|
|
1061
|
+
} else o && a();
|
|
1062
|
+
i && !r && o && a();
|
|
1063
|
+
const d = o && !r && !i ? bt(o, c) : H(0), l = s.left + c.scrollLeft - u.x - d.x, v = s.top + c.scrollTop - u.y - d.y;
|
|
1064
|
+
return {
|
|
1065
|
+
x: l,
|
|
1066
|
+
y: v,
|
|
1067
|
+
width: s.width,
|
|
1068
|
+
height: s.height
|
|
1069
|
+
};
|
|
1070
|
+
}
|
|
1071
|
+
function Te(e) {
|
|
1072
|
+
return V(e).position === "static";
|
|
1073
|
+
}
|
|
1074
|
+
function tt(e, t) {
|
|
1075
|
+
if (!U(e) || V(e).position === "fixed")
|
|
1076
|
+
return null;
|
|
1077
|
+
if (t)
|
|
1078
|
+
return t(e);
|
|
1079
|
+
let n = e.offsetParent;
|
|
1080
|
+
return j(e) === n && (n = n.ownerDocument.body), n;
|
|
1081
|
+
}
|
|
1082
|
+
function St(e, t) {
|
|
1083
|
+
const n = W(e);
|
|
1084
|
+
if (Ae(e))
|
|
1085
|
+
return n;
|
|
1086
|
+
if (!U(e)) {
|
|
1087
|
+
let o = G(e);
|
|
1088
|
+
for (; o && !oe(o); ) {
|
|
1089
|
+
if ($(o) && !Te(o))
|
|
1090
|
+
return o;
|
|
1091
|
+
o = G(o);
|
|
1092
|
+
}
|
|
1093
|
+
return n;
|
|
1094
|
+
}
|
|
1095
|
+
let r = tt(e, t);
|
|
1096
|
+
for (; r && cn(r) && Te(r); )
|
|
1097
|
+
r = tt(r, t);
|
|
1098
|
+
return r && oe(r) && Te(r) && !je(r) ? n : r || sn(e) || n;
|
|
1099
|
+
}
|
|
1100
|
+
const wn = async function(e) {
|
|
1101
|
+
const t = this.getOffsetParent || St, n = this.getDimensions, r = await n(e.floating);
|
|
1102
|
+
return {
|
|
1103
|
+
reference: yn(e.reference, await t(e.floating), e.strategy),
|
|
1104
|
+
floating: {
|
|
1105
|
+
x: 0,
|
|
1106
|
+
y: 0,
|
|
1107
|
+
width: r.width,
|
|
1108
|
+
height: r.height
|
|
1109
|
+
}
|
|
1110
|
+
};
|
|
1111
|
+
};
|
|
1112
|
+
function bn(e) {
|
|
1113
|
+
return V(e).direction === "rtl";
|
|
1114
|
+
}
|
|
1115
|
+
const xn = {
|
|
1116
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: un,
|
|
1117
|
+
getDocumentElement: j,
|
|
1118
|
+
getClippingRect: pn,
|
|
1119
|
+
getOffsetParent: St,
|
|
1120
|
+
getElementRects: wn,
|
|
1121
|
+
getClientRects: fn,
|
|
1122
|
+
getDimensions: gn,
|
|
1123
|
+
getScale: ne,
|
|
1124
|
+
isElement: $,
|
|
1125
|
+
isRTL: bn
|
|
1126
|
+
};
|
|
1127
|
+
function Et(e, t) {
|
|
1128
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1129
|
+
}
|
|
1130
|
+
function Sn(e, t) {
|
|
1131
|
+
let n = null, r;
|
|
1132
|
+
const o = j(e);
|
|
1133
|
+
function i() {
|
|
1134
|
+
var c;
|
|
1135
|
+
clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
|
|
1136
|
+
}
|
|
1137
|
+
function s(c, u) {
|
|
1138
|
+
c === void 0 && (c = !1), u === void 0 && (u = 1), i();
|
|
1139
|
+
const a = e.getBoundingClientRect(), {
|
|
1140
|
+
left: d,
|
|
1141
|
+
top: l,
|
|
1142
|
+
width: v,
|
|
1143
|
+
height: h
|
|
1144
|
+
} = a;
|
|
1145
|
+
if (c || t(), !v || !h)
|
|
1146
|
+
return;
|
|
1147
|
+
const g = de(l), f = de(o.clientWidth - (d + v)), p = de(o.clientHeight - (l + h)), y = de(d), b = {
|
|
1148
|
+
rootMargin: -g + "px " + -f + "px " + -p + "px " + -y + "px",
|
|
1149
|
+
threshold: I(0, Z(1, u)) || 1
|
|
1150
|
+
};
|
|
1151
|
+
let x = !0;
|
|
1152
|
+
function S(C) {
|
|
1153
|
+
const E = C[0].intersectionRatio;
|
|
1154
|
+
if (E !== u) {
|
|
1155
|
+
if (!x)
|
|
1156
|
+
return s();
|
|
1157
|
+
E ? s(!1, E) : r = setTimeout(() => {
|
|
1158
|
+
s(!1, 1e-7);
|
|
1159
|
+
}, 1e3);
|
|
1160
|
+
}
|
|
1161
|
+
E === 1 && !Et(a, e.getBoundingClientRect()) && s(), x = !1;
|
|
1162
|
+
}
|
|
1163
|
+
try {
|
|
1164
|
+
n = new IntersectionObserver(S, {
|
|
1165
|
+
...b,
|
|
1166
|
+
// Handle <iframe>s
|
|
1167
|
+
root: o.ownerDocument
|
|
1168
|
+
});
|
|
1169
|
+
} catch {
|
|
1170
|
+
n = new IntersectionObserver(S, b);
|
|
1171
|
+
}
|
|
1172
|
+
n.observe(e);
|
|
1173
|
+
}
|
|
1174
|
+
return s(!0), i;
|
|
1175
|
+
}
|
|
1176
|
+
function Yr(e, t, n, r) {
|
|
1177
|
+
r === void 0 && (r = {});
|
|
1178
|
+
const {
|
|
1179
|
+
ancestorScroll: o = !0,
|
|
1180
|
+
ancestorResize: i = !0,
|
|
1181
|
+
elementResize: s = typeof ResizeObserver == "function",
|
|
1182
|
+
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1183
|
+
animationFrame: u = !1
|
|
1184
|
+
} = r, a = Ye(e), d = o || i ? [...a ? ue(a) : [], ...ue(t)] : [];
|
|
1185
|
+
d.forEach((y) => {
|
|
1186
|
+
o && y.addEventListener("scroll", n, {
|
|
1187
|
+
passive: !0
|
|
1188
|
+
}), i && y.addEventListener("resize", n);
|
|
1189
|
+
});
|
|
1190
|
+
const l = a && c ? Sn(a, n) : null;
|
|
1191
|
+
let v = -1, h = null;
|
|
1192
|
+
s && (h = new ResizeObserver((y) => {
|
|
1193
|
+
let [w] = y;
|
|
1194
|
+
w && w.target === a && h && (h.unobserve(t), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
|
|
1195
|
+
var b;
|
|
1196
|
+
(b = h) == null || b.observe(t);
|
|
1197
|
+
})), n();
|
|
1198
|
+
}), a && !u && h.observe(a), h.observe(t));
|
|
1199
|
+
let g, f = u ? Q(e) : null;
|
|
1200
|
+
u && p();
|
|
1201
|
+
function p() {
|
|
1202
|
+
const y = Q(e);
|
|
1203
|
+
f && !Et(f, y) && n(), f = y, g = requestAnimationFrame(p);
|
|
1204
|
+
}
|
|
1205
|
+
return n(), () => {
|
|
1206
|
+
var y;
|
|
1207
|
+
d.forEach((w) => {
|
|
1208
|
+
o && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
|
|
1209
|
+
}), l == null || l(), (y = h) == null || y.disconnect(), h = null, u && cancelAnimationFrame(g);
|
|
1210
|
+
};
|
|
1211
|
+
}
|
|
1212
|
+
const En = tn, Cn = nn, Rn = Qt, An = on, On = Jt, nt = Gt, Pn = rn, Tn = (e, t, n) => {
|
|
1213
|
+
const r = /* @__PURE__ */ new Map(), o = {
|
|
1214
|
+
platform: xn,
|
|
1215
|
+
...n
|
|
1216
|
+
}, i = {
|
|
1217
|
+
...o.platform,
|
|
1218
|
+
_c: r
|
|
1219
|
+
};
|
|
1220
|
+
return Zt(e, t, {
|
|
1221
|
+
...o,
|
|
1222
|
+
platform: i
|
|
1223
|
+
});
|
|
1224
|
+
};
|
|
1225
|
+
var ye = typeof document < "u" ? Ft : It;
|
|
1226
|
+
function Ce(e, t) {
|
|
1227
|
+
if (e === t)
|
|
1228
|
+
return !0;
|
|
1229
|
+
if (typeof e != typeof t)
|
|
1230
|
+
return !1;
|
|
1231
|
+
if (typeof e == "function" && e.toString() === t.toString())
|
|
1232
|
+
return !0;
|
|
1233
|
+
let n, r, o;
|
|
1234
|
+
if (e && t && typeof e == "object") {
|
|
1235
|
+
if (Array.isArray(e)) {
|
|
1236
|
+
if (n = e.length, n !== t.length) return !1;
|
|
1237
|
+
for (r = n; r-- !== 0; )
|
|
1238
|
+
if (!Ce(e[r], t[r]))
|
|
1239
|
+
return !1;
|
|
1240
|
+
return !0;
|
|
1241
|
+
}
|
|
1242
|
+
if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
|
|
1243
|
+
return !1;
|
|
1244
|
+
for (r = n; r-- !== 0; )
|
|
1245
|
+
if (!{}.hasOwnProperty.call(t, o[r]))
|
|
1246
|
+
return !1;
|
|
1247
|
+
for (r = n; r-- !== 0; ) {
|
|
1248
|
+
const i = o[r];
|
|
1249
|
+
if (!(i === "_owner" && e.$$typeof) && !Ce(e[i], t[i]))
|
|
1250
|
+
return !1;
|
|
1251
|
+
}
|
|
1252
|
+
return !0;
|
|
1253
|
+
}
|
|
1254
|
+
return e !== e && t !== t;
|
|
1255
|
+
}
|
|
1256
|
+
function Ct(e) {
|
|
1257
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1258
|
+
}
|
|
1259
|
+
function rt(e, t) {
|
|
1260
|
+
const n = Ct(e);
|
|
1261
|
+
return Math.round(t * n) / n;
|
|
1262
|
+
}
|
|
1263
|
+
function Me(e) {
|
|
1264
|
+
const t = m.useRef(e);
|
|
1265
|
+
return ye(() => {
|
|
1266
|
+
t.current = e;
|
|
1267
|
+
}), t;
|
|
1268
|
+
}
|
|
1269
|
+
function Xr(e) {
|
|
1270
|
+
e === void 0 && (e = {});
|
|
1271
|
+
const {
|
|
1272
|
+
placement: t = "bottom",
|
|
1273
|
+
strategy: n = "absolute",
|
|
1274
|
+
middleware: r = [],
|
|
1275
|
+
platform: o,
|
|
1276
|
+
elements: {
|
|
1277
|
+
reference: i,
|
|
1278
|
+
floating: s
|
|
1279
|
+
} = {},
|
|
1280
|
+
transform: c = !0,
|
|
1281
|
+
whileElementsMounted: u,
|
|
1282
|
+
open: a
|
|
1283
|
+
} = e, [d, l] = m.useState({
|
|
1284
|
+
x: 0,
|
|
1285
|
+
y: 0,
|
|
1286
|
+
strategy: n,
|
|
1287
|
+
placement: t,
|
|
1288
|
+
middlewareData: {},
|
|
1289
|
+
isPositioned: !1
|
|
1290
|
+
}), [v, h] = m.useState(r);
|
|
1291
|
+
Ce(v, r) || h(r);
|
|
1292
|
+
const [g, f] = m.useState(null), [p, y] = m.useState(null), w = m.useCallback((R) => {
|
|
1293
|
+
R !== C.current && (C.current = R, f(R));
|
|
1294
|
+
}, []), b = m.useCallback((R) => {
|
|
1295
|
+
R !== E.current && (E.current = R, y(R));
|
|
1296
|
+
}, []), x = i || g, S = s || p, C = m.useRef(null), E = m.useRef(null), A = m.useRef(d), P = u != null, O = Me(u), B = Me(o), F = Me(a), L = m.useCallback(() => {
|
|
1297
|
+
if (!C.current || !E.current)
|
|
1298
|
+
return;
|
|
1299
|
+
const R = {
|
|
1300
|
+
placement: t,
|
|
1301
|
+
strategy: n,
|
|
1302
|
+
middleware: v
|
|
1303
|
+
};
|
|
1304
|
+
B.current && (R.platform = B.current), Tn(C.current, E.current, R).then((M) => {
|
|
1305
|
+
const N = {
|
|
1306
|
+
...M,
|
|
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
|
+
k.current && !Ce(A.current, N) && (A.current = N, Bt.flushSync(() => {
|
|
1314
|
+
l(N);
|
|
1315
|
+
}));
|
|
1316
|
+
});
|
|
1317
|
+
}, [v, t, n, B, F]);
|
|
1318
|
+
ye(() => {
|
|
1319
|
+
a === !1 && A.current.isPositioned && (A.current.isPositioned = !1, l((R) => ({
|
|
1320
|
+
...R,
|
|
1321
|
+
isPositioned: !1
|
|
1322
|
+
})));
|
|
1323
|
+
}, [a]);
|
|
1324
|
+
const k = m.useRef(!1);
|
|
1325
|
+
ye(() => (k.current = !0, () => {
|
|
1326
|
+
k.current = !1;
|
|
1327
|
+
}), []), ye(() => {
|
|
1328
|
+
if (x && (C.current = x), S && (E.current = S), x && S) {
|
|
1329
|
+
if (O.current)
|
|
1330
|
+
return O.current(x, S, L);
|
|
1331
|
+
L();
|
|
1332
|
+
}
|
|
1333
|
+
}, [x, S, L, O, P]);
|
|
1334
|
+
const D = m.useMemo(() => ({
|
|
1335
|
+
reference: C,
|
|
1336
|
+
floating: E,
|
|
1337
|
+
setReference: w,
|
|
1338
|
+
setFloating: b
|
|
1339
|
+
}), [w, b]), T = m.useMemo(() => ({
|
|
1340
|
+
reference: x,
|
|
1341
|
+
floating: S
|
|
1342
|
+
}), [x, S]), _ = m.useMemo(() => {
|
|
1343
|
+
const R = {
|
|
1344
|
+
position: n,
|
|
1345
|
+
left: 0,
|
|
1346
|
+
top: 0
|
|
1347
|
+
};
|
|
1348
|
+
if (!T.floating)
|
|
1349
|
+
return R;
|
|
1350
|
+
const M = rt(T.floating, d.x), N = rt(T.floating, d.y);
|
|
1351
|
+
return c ? {
|
|
1352
|
+
...R,
|
|
1353
|
+
transform: "translate(" + M + "px, " + N + "px)",
|
|
1354
|
+
...Ct(T.floating) >= 1.5 && {
|
|
1355
|
+
willChange: "transform"
|
|
1356
|
+
}
|
|
1357
|
+
} : {
|
|
1358
|
+
position: n,
|
|
1359
|
+
left: M,
|
|
1360
|
+
top: N
|
|
1361
|
+
};
|
|
1362
|
+
}, [n, c, T.floating, d.x, d.y]);
|
|
1363
|
+
return m.useMemo(() => ({
|
|
1364
|
+
...d,
|
|
1365
|
+
update: L,
|
|
1366
|
+
refs: D,
|
|
1367
|
+
elements: T,
|
|
1368
|
+
floatingStyles: _
|
|
1369
|
+
}), [d, L, D, T, _]);
|
|
1370
|
+
}
|
|
1371
|
+
const Mn = (e) => {
|
|
1372
|
+
function t(n) {
|
|
1373
|
+
return {}.hasOwnProperty.call(n, "current");
|
|
1374
|
+
}
|
|
1375
|
+
return {
|
|
1376
|
+
name: "arrow",
|
|
1377
|
+
options: e,
|
|
1378
|
+
fn(n) {
|
|
1379
|
+
const {
|
|
1380
|
+
element: r,
|
|
1381
|
+
padding: o
|
|
1382
|
+
} = typeof e == "function" ? e(n) : e;
|
|
1383
|
+
return r && t(r) ? r.current != null ? nt({
|
|
1384
|
+
element: r.current,
|
|
1385
|
+
padding: o
|
|
1386
|
+
}).fn(n) : {} : r ? nt({
|
|
1387
|
+
element: r,
|
|
1388
|
+
padding: o
|
|
1389
|
+
}).fn(n) : {};
|
|
1390
|
+
}
|
|
1391
|
+
};
|
|
1392
|
+
}, qr = (e, t) => ({
|
|
1393
|
+
...En(e),
|
|
1394
|
+
options: [e, t]
|
|
1395
|
+
}), Zr = (e, t) => ({
|
|
1396
|
+
...Cn(e),
|
|
1397
|
+
options: [e, t]
|
|
1398
|
+
}), Gr = (e, t) => ({
|
|
1399
|
+
...Pn(e),
|
|
1400
|
+
options: [e, t]
|
|
1401
|
+
}), Qr = (e, t) => ({
|
|
1402
|
+
...Rn(e),
|
|
1403
|
+
options: [e, t]
|
|
1404
|
+
}), Jr = (e, t) => ({
|
|
1405
|
+
...An(e),
|
|
1406
|
+
options: [e, t]
|
|
1407
|
+
}), eo = (e, t) => ({
|
|
1408
|
+
...On(e),
|
|
1409
|
+
options: [e, t]
|
|
1410
|
+
}), to = (e, t) => ({
|
|
1411
|
+
...Mn(e),
|
|
1412
|
+
options: [e, t]
|
|
1413
|
+
});
|
|
1414
|
+
function no(e) {
|
|
1415
|
+
const [t, n] = m.useState(void 0);
|
|
1416
|
+
return ae(() => {
|
|
1417
|
+
if (e) {
|
|
1418
|
+
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
1419
|
+
const r = new ResizeObserver((o) => {
|
|
1420
|
+
if (!Array.isArray(o) || !o.length)
|
|
1421
|
+
return;
|
|
1422
|
+
const i = o[0];
|
|
1423
|
+
let s, c;
|
|
1424
|
+
if ("borderBoxSize" in i) {
|
|
1425
|
+
const u = i.borderBoxSize, a = Array.isArray(u) ? u[0] : u;
|
|
1426
|
+
s = a.inlineSize, c = a.blockSize;
|
|
1427
|
+
} else
|
|
1428
|
+
s = e.offsetWidth, c = e.offsetHeight;
|
|
1429
|
+
n({ width: s, height: c });
|
|
1430
|
+
});
|
|
1431
|
+
return r.observe(e, { box: "border-box" }), () => r.unobserve(e);
|
|
1432
|
+
} else
|
|
1433
|
+
n(void 0);
|
|
1434
|
+
}, [e]), t;
|
|
1435
|
+
}
|
|
1436
|
+
function Nn(e, t) {
|
|
1437
|
+
return m.useReducer((n, r) => t[n][r] ?? n, e);
|
|
1438
|
+
}
|
|
1439
|
+
var Ln = (e) => {
|
|
1440
|
+
const { present: t, children: n } = e, r = kn(t), o = typeof n == "function" ? n({ present: r.isPresent }) : m.Children.only(n), i = ht(r.ref, Dn(o));
|
|
1441
|
+
return typeof n == "function" || r.isPresent ? m.cloneElement(o, { ref: i }) : null;
|
|
1442
|
+
};
|
|
1443
|
+
Ln.displayName = "Presence";
|
|
1444
|
+
function kn(e) {
|
|
1445
|
+
const [t, n] = m.useState(), r = m.useRef(null), o = m.useRef(e), i = m.useRef("none"), s = e ? "mounted" : "unmounted", [c, u] = Nn(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 m.useEffect(() => {
|
|
1459
|
+
const a = me(r.current);
|
|
1460
|
+
i.current = c === "mounted" ? a : "none";
|
|
1461
|
+
}, [c]), ae(() => {
|
|
1462
|
+
const a = r.current, d = o.current;
|
|
1463
|
+
if (d !== e) {
|
|
1464
|
+
const v = i.current, h = me(a);
|
|
1465
|
+
e ? u("MOUNT") : h === "none" || (a == null ? void 0 : a.display) === "none" ? u("UNMOUNT") : u(d && v !== h ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
1466
|
+
}
|
|
1467
|
+
}, [e, u]), ae(() => {
|
|
1468
|
+
if (t) {
|
|
1469
|
+
let a;
|
|
1470
|
+
const d = t.ownerDocument.defaultView ?? window, l = (h) => {
|
|
1471
|
+
const f = me(r.current).includes(h.animationName);
|
|
1472
|
+
if (h.target === t && f && (u("ANIMATION_END"), !o.current)) {
|
|
1473
|
+
const p = t.style.animationFillMode;
|
|
1474
|
+
t.style.animationFillMode = "forwards", a = d.setTimeout(() => {
|
|
1475
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = p);
|
|
1476
|
+
});
|
|
1477
|
+
}
|
|
1478
|
+
}, v = (h) => {
|
|
1479
|
+
h.target === t && (i.current = me(r.current));
|
|
1480
|
+
};
|
|
1481
|
+
return t.addEventListener("animationstart", v), t.addEventListener("animationcancel", l), t.addEventListener("animationend", l), () => {
|
|
1482
|
+
d.clearTimeout(a), t.removeEventListener("animationstart", v), t.removeEventListener("animationcancel", l), t.removeEventListener("animationend", l);
|
|
1483
|
+
};
|
|
1484
|
+
} else
|
|
1485
|
+
u("ANIMATION_END");
|
|
1486
|
+
}, [t, u]), {
|
|
1487
|
+
isPresent: ["mounted", "unmountSuspended"].includes(c),
|
|
1488
|
+
ref: m.useCallback((a) => {
|
|
1489
|
+
r.current = a ? getComputedStyle(a) : null, n(a);
|
|
1490
|
+
}, [])
|
|
1491
|
+
};
|
|
1492
|
+
}
|
|
1493
|
+
function me(e) {
|
|
1494
|
+
return (e == null ? void 0 : e.animationName) || "none";
|
|
1495
|
+
}
|
|
1496
|
+
function Dn(e) {
|
|
1497
|
+
var r, o;
|
|
1498
|
+
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
1499
|
+
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
1500
|
+
}
|
|
1501
|
+
var Fn = m[" useInsertionEffect ".trim().toString()] || ae;
|
|
1502
|
+
function ro({
|
|
1503
|
+
prop: e,
|
|
1504
|
+
defaultProp: t,
|
|
1505
|
+
onChange: n = () => {
|
|
1506
|
+
},
|
|
1507
|
+
caller: r
|
|
1508
|
+
}) {
|
|
1509
|
+
const [o, i, s] = In({
|
|
1510
|
+
defaultProp: t,
|
|
1511
|
+
onChange: n
|
|
1512
|
+
}), c = e !== void 0, u = c ? e : o;
|
|
1513
|
+
{
|
|
1514
|
+
const d = m.useRef(e !== void 0);
|
|
1515
|
+
m.useEffect(() => {
|
|
1516
|
+
const l = d.current;
|
|
1517
|
+
l !== c && console.warn(
|
|
1518
|
+
`${r} is changing from ${l ? "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
|
+
), d.current = c;
|
|
1520
|
+
}, [c, r]);
|
|
1521
|
+
}
|
|
1522
|
+
const a = m.useCallback(
|
|
1523
|
+
(d) => {
|
|
1524
|
+
var l;
|
|
1525
|
+
if (c) {
|
|
1526
|
+
const v = Wn(d) ? d(e) : d;
|
|
1527
|
+
v !== e && ((l = s.current) == null || l.call(s, v));
|
|
1528
|
+
} else
|
|
1529
|
+
i(d);
|
|
1530
|
+
},
|
|
1531
|
+
[c, e, i, s]
|
|
1532
|
+
);
|
|
1533
|
+
return [u, a];
|
|
1534
|
+
}
|
|
1535
|
+
function In({
|
|
1536
|
+
defaultProp: e,
|
|
1537
|
+
onChange: t
|
|
1538
|
+
}) {
|
|
1539
|
+
const [n, r] = m.useState(e), o = m.useRef(n), i = m.useRef(t);
|
|
1540
|
+
return Fn(() => {
|
|
1541
|
+
i.current = t;
|
|
1542
|
+
}, [t]), m.useEffect(() => {
|
|
1543
|
+
var s;
|
|
1544
|
+
o.current !== n && ((s = i.current) == null || s.call(i, n), o.current = n);
|
|
1545
|
+
}, [n, o]), [n, r, i];
|
|
1546
|
+
}
|
|
1547
|
+
function Wn(e) {
|
|
1548
|
+
return typeof e == "function";
|
|
1549
|
+
}
|
|
1550
|
+
// @__NO_SIDE_EFFECTS__
|
|
1551
|
+
function Bn(e) {
|
|
1552
|
+
const t = /* @__PURE__ */ _n(e), n = m.forwardRef((r, o) => {
|
|
1553
|
+
const { children: i, ...s } = r, c = m.Children.toArray(i), u = c.find(Vn);
|
|
1554
|
+
if (u) {
|
|
1555
|
+
const a = u.props.children, d = c.map((l) => l === u ? m.Children.count(a) > 1 ? m.Children.only(null) : m.isValidElement(a) ? a.props.children : null : l);
|
|
1556
|
+
return /* @__PURE__ */ se(t, { ...s, ref: o, children: m.isValidElement(a) ? m.cloneElement(a, void 0, d) : null });
|
|
1557
|
+
}
|
|
1558
|
+
return /* @__PURE__ */ se(t, { ...s, ref: o, children: i });
|
|
1559
|
+
});
|
|
1560
|
+
return n.displayName = `${e}.Slot`, n;
|
|
1561
|
+
}
|
|
1562
|
+
// @__NO_SIDE_EFFECTS__
|
|
1563
|
+
function _n(e) {
|
|
1564
|
+
const t = m.forwardRef((n, r) => {
|
|
1565
|
+
const { children: o, ...i } = n;
|
|
1566
|
+
if (m.isValidElement(o)) {
|
|
1567
|
+
const s = Hn(o), c = zn(i, o.props);
|
|
1568
|
+
return o.type !== m.Fragment && (c.ref = r ? mt(r, s) : s), m.cloneElement(o, c);
|
|
1569
|
+
}
|
|
1570
|
+
return m.Children.count(o) > 1 ? m.Children.only(null) : null;
|
|
1571
|
+
});
|
|
1572
|
+
return t.displayName = `${e}.SlotClone`, t;
|
|
1573
|
+
}
|
|
1574
|
+
var $n = Symbol("radix.slottable");
|
|
1575
|
+
function Vn(e) {
|
|
1576
|
+
return m.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === $n;
|
|
1577
|
+
}
|
|
1578
|
+
function zn(e, t) {
|
|
1579
|
+
const n = { ...t };
|
|
1580
|
+
for (const r in t) {
|
|
1581
|
+
const o = e[r], i = t[r];
|
|
1582
|
+
/^on[A-Z]/.test(r) ? o && i ? n[r] = (...c) => {
|
|
1583
|
+
const u = i(...c);
|
|
1584
|
+
return o(...c), u;
|
|
1585
|
+
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...i } : r === "className" && (n[r] = [o, i].filter(Boolean).join(" "));
|
|
1586
|
+
}
|
|
1587
|
+
return { ...e, ...n };
|
|
1588
|
+
}
|
|
1589
|
+
function Hn(e) {
|
|
1590
|
+
var r, o;
|
|
1591
|
+
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
1592
|
+
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
1593
|
+
}
|
|
1594
|
+
var Un = [
|
|
1595
|
+
"a",
|
|
1596
|
+
"button",
|
|
1597
|
+
"div",
|
|
1598
|
+
"form",
|
|
1599
|
+
"h2",
|
|
1600
|
+
"h3",
|
|
1601
|
+
"img",
|
|
1602
|
+
"input",
|
|
1603
|
+
"label",
|
|
1604
|
+
"li",
|
|
1605
|
+
"nav",
|
|
1606
|
+
"ol",
|
|
1607
|
+
"p",
|
|
1608
|
+
"select",
|
|
1609
|
+
"span",
|
|
1610
|
+
"svg",
|
|
1611
|
+
"ul"
|
|
1612
|
+
], jn = Un.reduce((e, t) => {
|
|
1613
|
+
const n = /* @__PURE__ */ Bn(`Primitive.${t}`), r = m.forwardRef((o, i) => {
|
|
1614
|
+
const { asChild: s, ...c } = o, u = s ? n : t;
|
|
1615
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ se(u, { ...c, ref: i });
|
|
1616
|
+
});
|
|
1617
|
+
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
1618
|
+
}, {}), Ne = "focusScope.autoFocusOnMount", Le = "focusScope.autoFocusOnUnmount", ot = { bubbles: !1, cancelable: !0 }, Kn = "FocusScope", Yn = m.forwardRef((e, t) => {
|
|
1619
|
+
const {
|
|
1620
|
+
loop: n = !1,
|
|
1621
|
+
trapped: r = !1,
|
|
1622
|
+
onMountAutoFocus: o,
|
|
1623
|
+
onUnmountAutoFocus: i,
|
|
1624
|
+
...s
|
|
1625
|
+
} = e, [c, u] = m.useState(null), a = We(o), d = We(i), l = m.useRef(null), v = ht(t, (f) => u(f)), h = m.useRef({
|
|
1626
|
+
paused: !1,
|
|
1627
|
+
pause() {
|
|
1628
|
+
this.paused = !0;
|
|
1629
|
+
},
|
|
1630
|
+
resume() {
|
|
1631
|
+
this.paused = !1;
|
|
1632
|
+
}
|
|
1633
|
+
}).current;
|
|
1634
|
+
m.useEffect(() => {
|
|
1635
|
+
if (r) {
|
|
1636
|
+
let f = function(b) {
|
|
1637
|
+
if (h.paused || !c) return;
|
|
1638
|
+
const x = b.target;
|
|
1639
|
+
c.contains(x) ? l.current = x : q(l.current, { select: !0 });
|
|
1640
|
+
}, p = function(b) {
|
|
1641
|
+
if (h.paused || !c) return;
|
|
1642
|
+
const x = b.relatedTarget;
|
|
1643
|
+
x !== null && (c.contains(x) || q(l.current, { select: !0 }));
|
|
1644
|
+
}, y = function(b) {
|
|
1645
|
+
if (document.activeElement === document.body)
|
|
1646
|
+
for (const S of b)
|
|
1647
|
+
S.removedNodes.length > 0 && q(c);
|
|
1648
|
+
};
|
|
1649
|
+
document.addEventListener("focusin", f), document.addEventListener("focusout", p);
|
|
1650
|
+
const w = new MutationObserver(y);
|
|
1651
|
+
return c && w.observe(c, { childList: !0, subtree: !0 }), () => {
|
|
1652
|
+
document.removeEventListener("focusin", f), document.removeEventListener("focusout", p), w.disconnect();
|
|
1653
|
+
};
|
|
1654
|
+
}
|
|
1655
|
+
}, [r, c, h.paused]), m.useEffect(() => {
|
|
1656
|
+
if (c) {
|
|
1657
|
+
ct.add(h);
|
|
1658
|
+
const f = document.activeElement;
|
|
1659
|
+
if (!c.contains(f)) {
|
|
1660
|
+
const y = new CustomEvent(Ne, ot);
|
|
1661
|
+
c.addEventListener(Ne, a), c.dispatchEvent(y), y.defaultPrevented || (Xn(Jn(Rt(c)), { select: !0 }), document.activeElement === f && q(c));
|
|
1662
|
+
}
|
|
1663
|
+
return () => {
|
|
1664
|
+
c.removeEventListener(Ne, a), setTimeout(() => {
|
|
1665
|
+
const y = new CustomEvent(Le, ot);
|
|
1666
|
+
c.addEventListener(Le, d), c.dispatchEvent(y), y.defaultPrevented || q(f ?? document.body, { select: !0 }), c.removeEventListener(Le, d), ct.remove(h);
|
|
1667
|
+
}, 0);
|
|
1668
|
+
};
|
|
1669
|
+
}
|
|
1670
|
+
}, [c, a, d, h]);
|
|
1671
|
+
const g = m.useCallback(
|
|
1672
|
+
(f) => {
|
|
1673
|
+
if (!n && !r || h.paused) return;
|
|
1674
|
+
const p = f.key === "Tab" && !f.altKey && !f.ctrlKey && !f.metaKey, y = document.activeElement;
|
|
1675
|
+
if (p && y) {
|
|
1676
|
+
const w = f.currentTarget, [b, x] = qn(w);
|
|
1677
|
+
b && x ? !f.shiftKey && y === x ? (f.preventDefault(), n && q(b, { select: !0 })) : f.shiftKey && y === b && (f.preventDefault(), n && q(x, { select: !0 })) : y === w && f.preventDefault();
|
|
1678
|
+
}
|
|
1679
|
+
},
|
|
1680
|
+
[n, r, h.paused]
|
|
1681
|
+
);
|
|
1682
|
+
return /* @__PURE__ */ se(jn.div, { tabIndex: -1, ...s, ref: v, onKeyDown: g });
|
|
1683
|
+
});
|
|
1684
|
+
Yn.displayName = Kn;
|
|
1685
|
+
function Xn(e, { select: t = !1 } = {}) {
|
|
1686
|
+
const n = document.activeElement;
|
|
1687
|
+
for (const r of e)
|
|
1688
|
+
if (q(r, { select: t }), document.activeElement !== n) return;
|
|
1689
|
+
}
|
|
1690
|
+
function qn(e) {
|
|
1691
|
+
const t = Rt(e), n = it(t, e), r = it(t.reverse(), e);
|
|
1692
|
+
return [n, r];
|
|
1693
|
+
}
|
|
1694
|
+
function Rt(e) {
|
|
1695
|
+
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
1696
|
+
acceptNode: (r) => {
|
|
1697
|
+
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
1698
|
+
return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
1699
|
+
}
|
|
1700
|
+
});
|
|
1701
|
+
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
1702
|
+
return t;
|
|
1703
|
+
}
|
|
1704
|
+
function it(e, t) {
|
|
1705
|
+
for (const n of e)
|
|
1706
|
+
if (!Zn(n, { upTo: t })) return n;
|
|
1707
|
+
}
|
|
1708
|
+
function Zn(e, { upTo: t }) {
|
|
1709
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
1710
|
+
for (; e; ) {
|
|
1711
|
+
if (t !== void 0 && e === t) return !1;
|
|
1712
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
1713
|
+
e = e.parentElement;
|
|
1714
|
+
}
|
|
1715
|
+
return !1;
|
|
1716
|
+
}
|
|
1717
|
+
function Gn(e) {
|
|
1718
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
1719
|
+
}
|
|
1720
|
+
function q(e, { select: t = !1 } = {}) {
|
|
1721
|
+
if (e && e.focus) {
|
|
1722
|
+
const n = document.activeElement;
|
|
1723
|
+
e.focus({ preventScroll: !0 }), e !== n && Gn(e) && t && e.select();
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
var ct = Qn();
|
|
1727
|
+
function Qn() {
|
|
1728
|
+
let e = [];
|
|
1729
|
+
return {
|
|
1730
|
+
add(t) {
|
|
1731
|
+
const n = e[0];
|
|
1732
|
+
t !== n && (n == null || n.pause()), e = st(e, t), e.unshift(t);
|
|
1733
|
+
},
|
|
1734
|
+
remove(t) {
|
|
1735
|
+
var n;
|
|
1736
|
+
e = st(e, t), (n = e[0]) == null || n.resume();
|
|
1737
|
+
}
|
|
1738
|
+
};
|
|
1739
|
+
}
|
|
1740
|
+
function st(e, t) {
|
|
1741
|
+
const n = [...e], r = n.indexOf(t);
|
|
1742
|
+
return r !== -1 && n.splice(r, 1), n;
|
|
1743
|
+
}
|
|
1744
|
+
function Jn(e) {
|
|
1745
|
+
return e.filter((t) => t.tagName !== "A");
|
|
1746
|
+
}
|
|
1747
|
+
var er = function(e) {
|
|
1748
|
+
if (typeof document > "u")
|
|
1749
|
+
return null;
|
|
1750
|
+
var t = Array.isArray(e) ? e[0] : e;
|
|
1751
|
+
return t.ownerDocument.body;
|
|
1752
|
+
}, J = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), ve = {}, ke = 0, At = function(e) {
|
|
1753
|
+
return e && (e.host || At(e.parentNode));
|
|
1754
|
+
}, tr = function(e, t) {
|
|
1755
|
+
return t.map(function(n) {
|
|
1756
|
+
if (e.contains(n))
|
|
1757
|
+
return n;
|
|
1758
|
+
var r = At(n);
|
|
1759
|
+
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
1760
|
+
}).filter(function(n) {
|
|
1761
|
+
return !!n;
|
|
1762
|
+
});
|
|
1763
|
+
}, nr = function(e, t, n, r) {
|
|
1764
|
+
var o = tr(t, Array.isArray(e) ? e : [e]);
|
|
1765
|
+
ve[n] || (ve[n] = /* @__PURE__ */ new WeakMap());
|
|
1766
|
+
var i = ve[n], s = [], c = /* @__PURE__ */ new Set(), u = new Set(o), a = function(l) {
|
|
1767
|
+
!l || c.has(l) || (c.add(l), a(l.parentNode));
|
|
1768
|
+
};
|
|
1769
|
+
o.forEach(a);
|
|
1770
|
+
var d = function(l) {
|
|
1771
|
+
!l || u.has(l) || Array.prototype.forEach.call(l.children, function(v) {
|
|
1772
|
+
if (c.has(v))
|
|
1773
|
+
d(v);
|
|
1774
|
+
else
|
|
1775
|
+
try {
|
|
1776
|
+
var h = v.getAttribute(r), g = h !== null && h !== "false", f = (J.get(v) || 0) + 1, p = (i.get(v) || 0) + 1;
|
|
1777
|
+
J.set(v, f), i.set(v, p), s.push(v), f === 1 && g && he.set(v, !0), p === 1 && v.setAttribute(n, "true"), g || v.setAttribute(r, "true");
|
|
1778
|
+
} catch (y) {
|
|
1779
|
+
console.error("aria-hidden: cannot operate on ", v, y);
|
|
1780
|
+
}
|
|
1781
|
+
});
|
|
1782
|
+
};
|
|
1783
|
+
return d(t), c.clear(), ke++, function() {
|
|
1784
|
+
s.forEach(function(l) {
|
|
1785
|
+
var v = J.get(l) - 1, h = i.get(l) - 1;
|
|
1786
|
+
J.set(l, v), i.set(l, h), v || (he.has(l) || l.removeAttribute(r), he.delete(l)), h || l.removeAttribute(n);
|
|
1787
|
+
}), ke--, ke || (J = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), ve = {});
|
|
1788
|
+
};
|
|
1789
|
+
}, oo = function(e, t, n) {
|
|
1790
|
+
n === void 0 && (n = "data-aria-hidden");
|
|
1791
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), o = er(e);
|
|
1792
|
+
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), nr(r, o, n, "aria-hidden")) : function() {
|
|
1793
|
+
return null;
|
|
1794
|
+
};
|
|
1795
|
+
}, z = function() {
|
|
1796
|
+
return z = Object.assign || function(t) {
|
|
1797
|
+
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
1798
|
+
n = arguments[r];
|
|
1799
|
+
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
1800
|
+
}
|
|
1801
|
+
return t;
|
|
1802
|
+
}, z.apply(this, arguments);
|
|
1803
|
+
};
|
|
1804
|
+
function Ot(e, t) {
|
|
1805
|
+
var n = {};
|
|
1806
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
1807
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1808
|
+
for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
|
|
1809
|
+
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
1810
|
+
return n;
|
|
1811
|
+
}
|
|
1812
|
+
function rr(e, t, n) {
|
|
1813
|
+
if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
|
|
1814
|
+
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
1815
|
+
return e.concat(i || Array.prototype.slice.call(t));
|
|
1816
|
+
}
|
|
1817
|
+
var we = "right-scroll-bar-position", be = "width-before-scroll-bar", or = "with-scroll-bars-hidden", ir = "--removed-body-scroll-bar-size";
|
|
1818
|
+
function De(e, t) {
|
|
1819
|
+
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
1820
|
+
}
|
|
1821
|
+
function cr(e, t) {
|
|
1822
|
+
var n = Wt(function() {
|
|
1823
|
+
return {
|
|
1824
|
+
// value
|
|
1825
|
+
value: e,
|
|
1826
|
+
// last callback
|
|
1827
|
+
callback: t,
|
|
1828
|
+
// "memoized" public interface
|
|
1829
|
+
facade: {
|
|
1830
|
+
get current() {
|
|
1831
|
+
return n.value;
|
|
1832
|
+
},
|
|
1833
|
+
set current(r) {
|
|
1834
|
+
var o = n.value;
|
|
1835
|
+
o !== r && (n.value = r, n.callback(r, o));
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
};
|
|
1839
|
+
})[0];
|
|
1840
|
+
return n.callback = t, n.facade;
|
|
1841
|
+
}
|
|
1842
|
+
var sr = typeof window < "u" ? m.useLayoutEffect : m.useEffect, at = /* @__PURE__ */ new WeakMap();
|
|
1843
|
+
function ar(e, t) {
|
|
1844
|
+
var n = cr(null, function(r) {
|
|
1845
|
+
return e.forEach(function(o) {
|
|
1846
|
+
return De(o, r);
|
|
1847
|
+
});
|
|
1848
|
+
});
|
|
1849
|
+
return sr(function() {
|
|
1850
|
+
var r = at.get(n);
|
|
1851
|
+
if (r) {
|
|
1852
|
+
var o = new Set(r), i = new Set(e), s = n.current;
|
|
1853
|
+
o.forEach(function(c) {
|
|
1854
|
+
i.has(c) || De(c, null);
|
|
1855
|
+
}), i.forEach(function(c) {
|
|
1856
|
+
o.has(c) || De(c, s);
|
|
1857
|
+
});
|
|
1858
|
+
}
|
|
1859
|
+
at.set(n, e);
|
|
1860
|
+
}, [e]), n;
|
|
1861
|
+
}
|
|
1862
|
+
function lr(e) {
|
|
1863
|
+
return e;
|
|
1864
|
+
}
|
|
1865
|
+
function ur(e, t) {
|
|
1866
|
+
t === void 0 && (t = lr);
|
|
1867
|
+
var n = [], r = !1, o = {
|
|
1868
|
+
read: function() {
|
|
1869
|
+
if (r)
|
|
1870
|
+
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
1871
|
+
return n.length ? n[n.length - 1] : e;
|
|
1872
|
+
},
|
|
1873
|
+
useMedium: function(i) {
|
|
1874
|
+
var s = t(i, r);
|
|
1875
|
+
return n.push(s), function() {
|
|
1876
|
+
n = n.filter(function(c) {
|
|
1877
|
+
return c !== s;
|
|
1878
|
+
});
|
|
1879
|
+
};
|
|
1880
|
+
},
|
|
1881
|
+
assignSyncMedium: function(i) {
|
|
1882
|
+
for (r = !0; n.length; ) {
|
|
1883
|
+
var s = n;
|
|
1884
|
+
n = [], s.forEach(i);
|
|
1885
|
+
}
|
|
1886
|
+
n = {
|
|
1887
|
+
push: function(c) {
|
|
1888
|
+
return i(c);
|
|
1889
|
+
},
|
|
1890
|
+
filter: function() {
|
|
1891
|
+
return n;
|
|
1892
|
+
}
|
|
1893
|
+
};
|
|
1894
|
+
},
|
|
1895
|
+
assignMedium: function(i) {
|
|
1896
|
+
r = !0;
|
|
1897
|
+
var s = [];
|
|
1898
|
+
if (n.length) {
|
|
1899
|
+
var c = n;
|
|
1900
|
+
n = [], c.forEach(i), s = n;
|
|
1901
|
+
}
|
|
1902
|
+
var u = function() {
|
|
1903
|
+
var d = s;
|
|
1904
|
+
s = [], d.forEach(i);
|
|
1905
|
+
}, a = function() {
|
|
1906
|
+
return Promise.resolve().then(u);
|
|
1907
|
+
};
|
|
1908
|
+
a(), n = {
|
|
1909
|
+
push: function(d) {
|
|
1910
|
+
s.push(d), a();
|
|
1911
|
+
},
|
|
1912
|
+
filter: function(d) {
|
|
1913
|
+
return s = s.filter(d), n;
|
|
1914
|
+
}
|
|
1915
|
+
};
|
|
1916
|
+
}
|
|
1917
|
+
};
|
|
1918
|
+
return o;
|
|
1919
|
+
}
|
|
1920
|
+
function fr(e) {
|
|
1921
|
+
e === void 0 && (e = {});
|
|
1922
|
+
var t = ur(null);
|
|
1923
|
+
return t.options = z({ async: !0, ssr: !1 }, e), t;
|
|
1924
|
+
}
|
|
1925
|
+
var Pt = function(e) {
|
|
1926
|
+
var t = e.sideCar, n = Ot(e, ["sideCar"]);
|
|
1927
|
+
if (!t)
|
|
1928
|
+
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
1929
|
+
var r = t.read();
|
|
1930
|
+
if (!r)
|
|
1931
|
+
throw new Error("Sidecar medium not found");
|
|
1932
|
+
return m.createElement(r, z({}, n));
|
|
1933
|
+
};
|
|
1934
|
+
Pt.isSideCarExport = !0;
|
|
1935
|
+
function dr(e, t) {
|
|
1936
|
+
return e.useMedium(t), Pt;
|
|
1937
|
+
}
|
|
1938
|
+
var Tt = fr(), Fe = function() {
|
|
1939
|
+
}, Pe = m.forwardRef(function(e, t) {
|
|
1940
|
+
var n = m.useRef(null), r = m.useState({
|
|
1941
|
+
onScrollCapture: Fe,
|
|
1942
|
+
onWheelCapture: Fe,
|
|
1943
|
+
onTouchMoveCapture: Fe
|
|
1944
|
+
}), o = r[0], i = r[1], s = e.forwardProps, c = e.children, u = e.className, a = e.removeScrollBar, d = e.enabled, l = e.shards, v = e.sideCar, h = e.noRelative, g = e.noIsolation, f = e.inert, p = e.allowPinchZoom, y = e.as, w = y === void 0 ? "div" : y, b = e.gapMode, x = Ot(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = v, C = ar([n, t]), E = z(z({}, x), o);
|
|
1945
|
+
return m.createElement(
|
|
1946
|
+
m.Fragment,
|
|
1947
|
+
null,
|
|
1948
|
+
d && m.createElement(S, { sideCar: Tt, removeScrollBar: a, shards: l, noRelative: h, noIsolation: g, inert: f, setCallbacks: i, allowPinchZoom: !!p, lockRef: n, gapMode: b }),
|
|
1949
|
+
s ? m.cloneElement(m.Children.only(c), z(z({}, E), { ref: C })) : m.createElement(w, z({}, E, { className: u, ref: C }), c)
|
|
1950
|
+
);
|
|
1951
|
+
});
|
|
1952
|
+
Pe.defaultProps = {
|
|
1953
|
+
enabled: !0,
|
|
1954
|
+
removeScrollBar: !0,
|
|
1955
|
+
inert: !1
|
|
1956
|
+
};
|
|
1957
|
+
Pe.classNames = {
|
|
1958
|
+
fullWidth: be,
|
|
1959
|
+
zeroRight: we
|
|
1960
|
+
};
|
|
1961
|
+
var mr = function() {
|
|
1962
|
+
if (typeof __webpack_nonce__ < "u")
|
|
1963
|
+
return __webpack_nonce__;
|
|
1964
|
+
};
|
|
1965
|
+
function hr() {
|
|
1966
|
+
if (!document)
|
|
1967
|
+
return null;
|
|
1968
|
+
var e = document.createElement("style");
|
|
1969
|
+
e.type = "text/css";
|
|
1970
|
+
var t = mr();
|
|
1971
|
+
return t && e.setAttribute("nonce", t), e;
|
|
1972
|
+
}
|
|
1973
|
+
function vr(e, t) {
|
|
1974
|
+
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
1975
|
+
}
|
|
1976
|
+
function pr(e) {
|
|
1977
|
+
var t = document.head || document.getElementsByTagName("head")[0];
|
|
1978
|
+
t.appendChild(e);
|
|
1979
|
+
}
|
|
1980
|
+
var gr = function() {
|
|
1981
|
+
var e = 0, t = null;
|
|
1982
|
+
return {
|
|
1983
|
+
add: function(n) {
|
|
1984
|
+
e == 0 && (t = hr()) && (vr(t, n), pr(t)), e++;
|
|
1985
|
+
},
|
|
1986
|
+
remove: function() {
|
|
1987
|
+
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
1988
|
+
}
|
|
1989
|
+
};
|
|
1990
|
+
}, yr = function() {
|
|
1991
|
+
var e = gr();
|
|
1992
|
+
return function(t, n) {
|
|
1993
|
+
m.useEffect(function() {
|
|
1994
|
+
return e.add(t), function() {
|
|
1995
|
+
e.remove();
|
|
1996
|
+
};
|
|
1997
|
+
}, [t && n]);
|
|
1998
|
+
};
|
|
1999
|
+
}, Mt = function() {
|
|
2000
|
+
var e = yr(), t = function(n) {
|
|
2001
|
+
var r = n.styles, o = n.dynamic;
|
|
2002
|
+
return e(r, o), null;
|
|
2003
|
+
};
|
|
2004
|
+
return t;
|
|
2005
|
+
}, wr = {
|
|
2006
|
+
left: 0,
|
|
2007
|
+
top: 0,
|
|
2008
|
+
right: 0,
|
|
2009
|
+
gap: 0
|
|
2010
|
+
}, Ie = function(e) {
|
|
2011
|
+
return parseInt(e || "", 10) || 0;
|
|
2012
|
+
}, br = function(e) {
|
|
2013
|
+
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
2014
|
+
return [Ie(n), Ie(r), Ie(o)];
|
|
2015
|
+
}, xr = function(e) {
|
|
2016
|
+
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
2017
|
+
return wr;
|
|
2018
|
+
var t = br(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
2019
|
+
return {
|
|
2020
|
+
left: t[0],
|
|
2021
|
+
top: t[1],
|
|
2022
|
+
right: t[2],
|
|
2023
|
+
gap: Math.max(0, r - n + t[2] - t[0])
|
|
2024
|
+
};
|
|
2025
|
+
}, Sr = Mt(), re = "data-scroll-locked", Er = function(e, t, n, r) {
|
|
2026
|
+
var o = e.left, i = e.top, s = e.right, c = e.gap;
|
|
2027
|
+
return n === void 0 && (n = "margin"), `
|
|
2028
|
+
.`.concat(or, ` {
|
|
2029
|
+
overflow: hidden `).concat(r, `;
|
|
2030
|
+
padding-right: `).concat(c, "px ").concat(r, `;
|
|
2031
|
+
}
|
|
2032
|
+
body[`).concat(re, `] {
|
|
2033
|
+
overflow: hidden `).concat(r, `;
|
|
2034
|
+
overscroll-behavior: contain;
|
|
2035
|
+
`).concat([
|
|
2036
|
+
t && "position: relative ".concat(r, ";"),
|
|
2037
|
+
n === "margin" && `
|
|
2038
|
+
padding-left: `.concat(o, `px;
|
|
2039
|
+
padding-top: `).concat(i, `px;
|
|
2040
|
+
padding-right: `).concat(s, `px;
|
|
2041
|
+
margin-left:0;
|
|
2042
|
+
margin-top:0;
|
|
2043
|
+
margin-right: `).concat(c, "px ").concat(r, `;
|
|
2044
|
+
`),
|
|
2045
|
+
n === "padding" && "padding-right: ".concat(c, "px ").concat(r, ";")
|
|
2046
|
+
].filter(Boolean).join(""), `
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
.`).concat(we, ` {
|
|
2050
|
+
right: `).concat(c, "px ").concat(r, `;
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
.`).concat(be, ` {
|
|
2054
|
+
margin-right: `).concat(c, "px ").concat(r, `;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
.`).concat(we, " .").concat(we, ` {
|
|
2058
|
+
right: 0 `).concat(r, `;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
.`).concat(be, " .").concat(be, ` {
|
|
2062
|
+
margin-right: 0 `).concat(r, `;
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
body[`).concat(re, `] {
|
|
2066
|
+
`).concat(ir, ": ").concat(c, `px;
|
|
2067
|
+
}
|
|
2068
|
+
`);
|
|
2069
|
+
}, lt = function() {
|
|
2070
|
+
var e = parseInt(document.body.getAttribute(re) || "0", 10);
|
|
2071
|
+
return isFinite(e) ? e : 0;
|
|
2072
|
+
}, Cr = function() {
|
|
2073
|
+
m.useEffect(function() {
|
|
2074
|
+
return document.body.setAttribute(re, (lt() + 1).toString()), function() {
|
|
2075
|
+
var e = lt() - 1;
|
|
2076
|
+
e <= 0 ? document.body.removeAttribute(re) : document.body.setAttribute(re, e.toString());
|
|
2077
|
+
};
|
|
2078
|
+
}, []);
|
|
2079
|
+
}, Rr = function(e) {
|
|
2080
|
+
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
2081
|
+
Cr();
|
|
2082
|
+
var i = m.useMemo(function() {
|
|
2083
|
+
return xr(o);
|
|
2084
|
+
}, [o]);
|
|
2085
|
+
return m.createElement(Sr, { styles: Er(i, !t, o, n ? "" : "!important") });
|
|
2086
|
+
}, Ve = !1;
|
|
2087
|
+
if (typeof window < "u")
|
|
2088
|
+
try {
|
|
2089
|
+
var pe = Object.defineProperty({}, "passive", {
|
|
2090
|
+
get: function() {
|
|
2091
|
+
return Ve = !0, !0;
|
|
2092
|
+
}
|
|
2093
|
+
});
|
|
2094
|
+
window.addEventListener("test", pe, pe), window.removeEventListener("test", pe, pe);
|
|
2095
|
+
} catch {
|
|
2096
|
+
Ve = !1;
|
|
2097
|
+
}
|
|
2098
|
+
var ee = Ve ? { passive: !1 } : !1, Ar = function(e) {
|
|
2099
|
+
return e.tagName === "TEXTAREA";
|
|
2100
|
+
}, Nt = function(e, t) {
|
|
2101
|
+
if (!(e instanceof Element))
|
|
2102
|
+
return !1;
|
|
2103
|
+
var n = window.getComputedStyle(e);
|
|
2104
|
+
return (
|
|
2105
|
+
// not-not-scrollable
|
|
2106
|
+
n[t] !== "hidden" && // contains scroll inside self
|
|
2107
|
+
!(n.overflowY === n.overflowX && !Ar(e) && n[t] === "visible")
|
|
2108
|
+
);
|
|
2109
|
+
}, Or = function(e) {
|
|
2110
|
+
return Nt(e, "overflowY");
|
|
2111
|
+
}, Pr = function(e) {
|
|
2112
|
+
return Nt(e, "overflowX");
|
|
2113
|
+
}, ut = function(e, t) {
|
|
2114
|
+
var n = t.ownerDocument, r = t;
|
|
2115
|
+
do {
|
|
2116
|
+
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
2117
|
+
var o = Lt(e, r);
|
|
2118
|
+
if (o) {
|
|
2119
|
+
var i = kt(e, r), s = i[1], c = i[2];
|
|
2120
|
+
if (s > c)
|
|
2121
|
+
return !0;
|
|
2122
|
+
}
|
|
2123
|
+
r = r.parentNode;
|
|
2124
|
+
} while (r && r !== n.body);
|
|
2125
|
+
return !1;
|
|
2126
|
+
}, Tr = function(e) {
|
|
2127
|
+
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
2128
|
+
return [
|
|
2129
|
+
t,
|
|
2130
|
+
n,
|
|
2131
|
+
r
|
|
2132
|
+
];
|
|
2133
|
+
}, Mr = function(e) {
|
|
2134
|
+
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
2135
|
+
return [
|
|
2136
|
+
t,
|
|
2137
|
+
n,
|
|
2138
|
+
r
|
|
2139
|
+
];
|
|
2140
|
+
}, Lt = function(e, t) {
|
|
2141
|
+
return e === "v" ? Or(t) : Pr(t);
|
|
2142
|
+
}, kt = function(e, t) {
|
|
2143
|
+
return e === "v" ? Tr(t) : Mr(t);
|
|
2144
|
+
}, Nr = function(e, t) {
|
|
2145
|
+
return e === "h" && t === "rtl" ? -1 : 1;
|
|
2146
|
+
}, Lr = function(e, t, n, r, o) {
|
|
2147
|
+
var i = Nr(e, window.getComputedStyle(t).direction), s = i * r, c = n.target, u = t.contains(c), a = !1, d = s > 0, l = 0, v = 0;
|
|
2148
|
+
do {
|
|
2149
|
+
if (!c)
|
|
2150
|
+
break;
|
|
2151
|
+
var h = kt(e, c), g = h[0], f = h[1], p = h[2], y = f - p - i * g;
|
|
2152
|
+
(g || y) && Lt(e, c) && (l += y, v += g);
|
|
2153
|
+
var w = c.parentNode;
|
|
2154
|
+
c = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
|
|
2155
|
+
} while (
|
|
2156
|
+
// portaled content
|
|
2157
|
+
!u && c !== document.body || // self content
|
|
2158
|
+
u && (t.contains(c) || t === c)
|
|
2159
|
+
);
|
|
2160
|
+
return (d && Math.abs(l) < 1 || !d && Math.abs(v) < 1) && (a = !0), a;
|
|
2161
|
+
}, ge = function(e) {
|
|
2162
|
+
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
2163
|
+
}, ft = function(e) {
|
|
2164
|
+
return [e.deltaX, e.deltaY];
|
|
2165
|
+
}, dt = function(e) {
|
|
2166
|
+
return e && "current" in e ? e.current : e;
|
|
2167
|
+
}, kr = function(e, t) {
|
|
2168
|
+
return e[0] === t[0] && e[1] === t[1];
|
|
2169
|
+
}, Dr = function(e) {
|
|
2170
|
+
return `
|
|
2171
|
+
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
2172
|
+
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
2173
|
+
`);
|
|
2174
|
+
}, Fr = 0, te = [];
|
|
2175
|
+
function Ir(e) {
|
|
2176
|
+
var t = m.useRef([]), n = m.useRef([0, 0]), r = m.useRef(), o = m.useState(Fr++)[0], i = m.useState(Mt)[0], s = m.useRef(e);
|
|
2177
|
+
m.useEffect(function() {
|
|
2178
|
+
s.current = e;
|
|
2179
|
+
}, [e]), m.useEffect(function() {
|
|
2180
|
+
if (e.inert) {
|
|
2181
|
+
document.body.classList.add("block-interactivity-".concat(o));
|
|
2182
|
+
var f = rr([e.lockRef.current], (e.shards || []).map(dt), !0).filter(Boolean);
|
|
2183
|
+
return f.forEach(function(p) {
|
|
2184
|
+
return p.classList.add("allow-interactivity-".concat(o));
|
|
2185
|
+
}), function() {
|
|
2186
|
+
document.body.classList.remove("block-interactivity-".concat(o)), f.forEach(function(p) {
|
|
2187
|
+
return p.classList.remove("allow-interactivity-".concat(o));
|
|
2188
|
+
});
|
|
2189
|
+
};
|
|
2190
|
+
}
|
|
2191
|
+
}, [e.inert, e.lockRef.current, e.shards]);
|
|
2192
|
+
var c = m.useCallback(function(f, p) {
|
|
2193
|
+
if ("touches" in f && f.touches.length === 2 || f.type === "wheel" && f.ctrlKey)
|
|
2194
|
+
return !s.current.allowPinchZoom;
|
|
2195
|
+
var y = ge(f), w = n.current, b = "deltaX" in f ? f.deltaX : w[0] - y[0], x = "deltaY" in f ? f.deltaY : w[1] - y[1], S, C = f.target, E = Math.abs(b) > Math.abs(x) ? "h" : "v";
|
|
2196
|
+
if ("touches" in f && E === "h" && C.type === "range")
|
|
2197
|
+
return !1;
|
|
2198
|
+
var A = ut(E, C);
|
|
2199
|
+
if (!A)
|
|
2200
|
+
return !0;
|
|
2201
|
+
if (A ? S = E : (S = E === "v" ? "h" : "v", A = ut(E, C)), !A)
|
|
2202
|
+
return !1;
|
|
2203
|
+
if (!r.current && "changedTouches" in f && (b || x) && (r.current = S), !S)
|
|
2204
|
+
return !0;
|
|
2205
|
+
var P = r.current || S;
|
|
2206
|
+
return Lr(P, p, f, P === "h" ? b : x);
|
|
2207
|
+
}, []), u = m.useCallback(function(f) {
|
|
2208
|
+
var p = f;
|
|
2209
|
+
if (!(!te.length || te[te.length - 1] !== i)) {
|
|
2210
|
+
var y = "deltaY" in p ? ft(p) : ge(p), w = t.current.filter(function(S) {
|
|
2211
|
+
return S.name === p.type && (S.target === p.target || p.target === S.shadowParent) && kr(S.delta, y);
|
|
2212
|
+
})[0];
|
|
2213
|
+
if (w && w.should) {
|
|
2214
|
+
p.cancelable && p.preventDefault();
|
|
2215
|
+
return;
|
|
2216
|
+
}
|
|
2217
|
+
if (!w) {
|
|
2218
|
+
var b = (s.current.shards || []).map(dt).filter(Boolean).filter(function(S) {
|
|
2219
|
+
return S.contains(p.target);
|
|
2220
|
+
}), x = b.length > 0 ? c(p, b[0]) : !s.current.noIsolation;
|
|
2221
|
+
x && p.cancelable && p.preventDefault();
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
}, []), a = m.useCallback(function(f, p, y, w) {
|
|
2225
|
+
var b = { name: f, delta: p, target: y, should: w, shadowParent: Wr(y) };
|
|
2226
|
+
t.current.push(b), setTimeout(function() {
|
|
2227
|
+
t.current = t.current.filter(function(x) {
|
|
2228
|
+
return x !== b;
|
|
2229
|
+
});
|
|
2230
|
+
}, 1);
|
|
2231
|
+
}, []), d = m.useCallback(function(f) {
|
|
2232
|
+
n.current = ge(f), r.current = void 0;
|
|
2233
|
+
}, []), l = m.useCallback(function(f) {
|
|
2234
|
+
a(f.type, ft(f), f.target, c(f, e.lockRef.current));
|
|
2235
|
+
}, []), v = m.useCallback(function(f) {
|
|
2236
|
+
a(f.type, ge(f), f.target, c(f, e.lockRef.current));
|
|
2237
|
+
}, []);
|
|
2238
|
+
m.useEffect(function() {
|
|
2239
|
+
return te.push(i), e.setCallbacks({
|
|
2240
|
+
onScrollCapture: l,
|
|
2241
|
+
onWheelCapture: l,
|
|
2242
|
+
onTouchMoveCapture: v
|
|
2243
|
+
}), document.addEventListener("wheel", u, ee), document.addEventListener("touchmove", u, ee), document.addEventListener("touchstart", d, ee), function() {
|
|
2244
|
+
te = te.filter(function(f) {
|
|
2245
|
+
return f !== i;
|
|
2246
|
+
}), document.removeEventListener("wheel", u, ee), document.removeEventListener("touchmove", u, ee), document.removeEventListener("touchstart", d, ee);
|
|
2247
|
+
};
|
|
2248
|
+
}, []);
|
|
2249
|
+
var h = e.removeScrollBar, g = e.inert;
|
|
2250
|
+
return m.createElement(
|
|
2251
|
+
m.Fragment,
|
|
2252
|
+
null,
|
|
2253
|
+
g ? m.createElement(i, { styles: Dr(o) }) : null,
|
|
2254
|
+
h ? m.createElement(Rr, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
2255
|
+
);
|
|
2256
|
+
}
|
|
2257
|
+
function Wr(e) {
|
|
2258
|
+
for (var t = null; e !== null; )
|
|
2259
|
+
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
2260
|
+
return t;
|
|
2261
|
+
}
|
|
2262
|
+
const Br = dr(Tt, Ir);
|
|
2263
|
+
var _r = m.forwardRef(function(e, t) {
|
|
2264
|
+
return m.createElement(Pe, z({}, e, { ref: t, sideCar: Br }));
|
|
2265
|
+
});
|
|
2266
|
+
_r.classNames = Pe.classNames;
|
|
2267
|
+
export {
|
|
2268
|
+
Yn as F,
|
|
2269
|
+
Ln as P,
|
|
2270
|
+
_r as R,
|
|
2271
|
+
Ur as a,
|
|
2272
|
+
jr as b,
|
|
2273
|
+
mt as c,
|
|
2274
|
+
Hr as d,
|
|
2275
|
+
We as e,
|
|
2276
|
+
no as f,
|
|
2277
|
+
Xr as g,
|
|
2278
|
+
Qr as h,
|
|
2279
|
+
Jr as i,
|
|
2280
|
+
to as j,
|
|
2281
|
+
eo as k,
|
|
2282
|
+
Gr as l,
|
|
2283
|
+
Yr as m,
|
|
2284
|
+
ae as n,
|
|
2285
|
+
qr as o,
|
|
2286
|
+
Kr as p,
|
|
2287
|
+
ro as q,
|
|
2288
|
+
oo as r,
|
|
2289
|
+
Zr as s,
|
|
2290
|
+
ht as u
|
|
2291
|
+
};
|