@wrdagency/blockout 0.0.4 → 0.0.6
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/{2NBKRL7C-DnAMmXv4.js → 2NBKRL7C-raj2vrMY.js} +3 -3
- package/dist/{P7GR5CS5-BryEvRCz.js → P7GR5CS5-PkUYC6hd.js} +199 -180
- package/dist/{T7VMP3TM--1s529fr.js → T7VMP3TM-BeJUiw28.js} +683 -679
- package/dist/{UQQRIHDV-Bfi_RJby.js → UQQRIHDV-xtNCxi0H.js} +115 -115
- package/dist/{VIIRIBF3-XWA2y8Hu.js → VIIRIBF3-B3f0V2Nc.js} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/style.css +1 -0
- package/dist/assets/styles.css +1 -0
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/controls/base-control/index.d.ts +4 -2
- package/dist/components/controls/base-control/index.js +26 -22
- package/dist/components/controls/choice-control/choice.d.ts +8 -0
- package/dist/components/controls/choice-control/choice.js +54 -0
- package/dist/components/controls/choice-control/index.d.ts +9 -0
- package/dist/components/controls/choice-control/index.js +31 -0
- package/dist/components/controls/index.d.ts +1 -0
- package/dist/components/controls/index.js +12 -10
- package/dist/components/controls/number-control/index.js +1 -1
- package/dist/components/controls/ranked-choice-control/index.d.ts +1 -0
- package/dist/components/controls/ranked-choice-control/index.js +1 -0
- package/dist/components/controls/select-control/index.d.ts +2 -1
- package/dist/components/controls/select-control/index.js +1642 -374
- package/dist/components/controls/textarea-control/index.js +1 -1
- package/dist/components/controls/toggle-control/index.js +10 -9
- package/dist/components/data-table/header.js +9 -8
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +17 -13
- package/dist/components/menu/index.js +4 -4
- package/dist/components/menu/item.js +1 -1
- package/dist/components/menu/items/action.js +1 -1
- package/dist/components/menu/items/spacer.js +2 -2
- package/dist/components/menu/items/submenu.js +2 -2
- package/dist/components/menu/items/toggle.js +1 -1
- package/dist/components/progress/index.d.ts +7 -0
- package/dist/components/progress/index.js +28 -0
- package/dist/index.js +25 -17
- package/dist/{item-CPVd5mKo.js → item-Bcbx6pI-.js} +87 -87
- package/dist/primitives/index.d.ts +2 -0
- package/dist/primitives/index.js +6 -2
- package/dist/primitives/resizable/index.js +7 -6
- package/dist/primitives/visually-hidden/index.js +6 -0
- package/package.json +2 -1
- package/dist/components/visually-hidden/index.js +0 -5
- /package/dist/{components → primitives}/visually-hidden/index.d.ts +0 -0
- /package/dist/{components/controls/select-control → types}/options.d.ts +0 -0
- /package/dist/{components/controls/select-control → types}/options.js +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import
|
|
4
|
-
import { jsx as H, jsxs as
|
|
5
|
-
function
|
|
1
|
+
import { y as z, x as Te, D as De, z as ce, an as $n, n as G, M as Ut, r as Yt, j as _, c as Cr, P as Gt, C as Ar, o as Tr, a as Vn, b as ee, _ as se, ao as _r, i as Fe, ag as Rr, v as j, ap as Ue, Y as Xt, e as ue, a3 as Ne, u as rt, W as Jt, G as fe, h as W, s as Be, aq as Ir, f as K, d as Q, ar as Zt, as as Hn, t as Bn, K as Fr, at as vn, a4 as nt, E as Qt, I as de, Z as Lr, aj as Mr, w as Wn, au as Nr, av as kr, U as Rt, aw as Dt, A as zn, a1 as Vt, ax as $r, ay as Vr, a2 as Hr, a6 as Br, az as Ct, a5 as Wr, a7 as zr, O as jr, p as Kr, am as qr } from "./P7GR5CS5-PkUYC6hd.js";
|
|
2
|
+
import { t as en, c as it, f as $e, l as Ur, i as hn, d as re, s as xt, n as ke, q as Yr, k as Gr, r as Xr, v as It, e as jn, w as Jr, x as Zr, u as he, m as Kn, o as qn, y as Qr, g as Un, z as Ft, A as yn, B as eo, C as to, F as no, D as ro, E as oo, G as io, H as ot, I as so, J as ao, K as co } from "./UQQRIHDV-xtNCxi0H.js";
|
|
3
|
+
import Yn, { createContext as Je, useRef as Y, useEffect as U, useState as le, useCallback as st, useMemo as Gn, useContext as tn, isValidElement as uo } from "react";
|
|
4
|
+
import { jsx as H, jsxs as yt, Fragment as bt } from "react/jsx-runtime";
|
|
5
|
+
function lo(e) {
|
|
6
6
|
var t;
|
|
7
7
|
const r = e.find((s) => !!s.element), n = [...e].reverse().find((s) => !!s.element);
|
|
8
8
|
let o = (t = r == null ? void 0 : r.element) == null ? void 0 : t.parentElement;
|
|
@@ -13,33 +13,33 @@ function uo(e) {
|
|
|
13
13
|
}
|
|
14
14
|
return G(o).body;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function fo(e) {
|
|
17
17
|
return e == null ? void 0 : e.__unstablePrivateStore;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function mo(e = {}) {
|
|
20
20
|
var t;
|
|
21
|
-
|
|
22
|
-
const r = (t = e.store) == null ? void 0 : t.getState(), n =
|
|
21
|
+
en(e, e.store);
|
|
22
|
+
const r = (t = e.store) == null ? void 0 : t.getState(), n = z(
|
|
23
23
|
e.items,
|
|
24
24
|
r == null ? void 0 : r.items,
|
|
25
25
|
e.defaultItems,
|
|
26
26
|
[]
|
|
27
27
|
), o = new Map(n.map((i) => [i.id, i])), s = {
|
|
28
28
|
items: n,
|
|
29
|
-
renderedItems:
|
|
30
|
-
}, c =
|
|
29
|
+
renderedItems: z(r == null ? void 0 : r.renderedItems, [])
|
|
30
|
+
}, c = fo(e.store), l = it(
|
|
31
31
|
{ items: n, renderedItems: s.renderedItems },
|
|
32
32
|
c
|
|
33
33
|
), a = it(s, e.store), u = (i) => {
|
|
34
|
-
const d =
|
|
34
|
+
const d = $n(i, (p) => p.element);
|
|
35
35
|
l.setState("renderedItems", d), a.setState("renderedItems", d);
|
|
36
36
|
};
|
|
37
|
-
$e(a, () =>
|
|
37
|
+
$e(a, () => Ur(l)), $e(l, () => hn(l, ["items"], (i) => {
|
|
38
38
|
a.setState("items", i.items);
|
|
39
|
-
})), $e(l, () =>
|
|
39
|
+
})), $e(l, () => hn(l, ["renderedItems"], (i) => {
|
|
40
40
|
let d = !0, p = requestAnimationFrame(() => {
|
|
41
|
-
const { renderedItems:
|
|
42
|
-
i.renderedItems !==
|
|
41
|
+
const { renderedItems: w } = a.getState();
|
|
42
|
+
i.renderedItems !== w && u(i.renderedItems);
|
|
43
43
|
});
|
|
44
44
|
if (typeof IntersectionObserver != "function")
|
|
45
45
|
return () => cancelAnimationFrame(p);
|
|
@@ -49,32 +49,32 @@ function fo(e = {}) {
|
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
cancelAnimationFrame(p), p = requestAnimationFrame(() => u(i.renderedItems));
|
|
52
|
-
}, x =
|
|
53
|
-
for (const
|
|
54
|
-
|
|
52
|
+
}, x = lo(i.renderedItems), b = new IntersectionObserver(h, { root: x });
|
|
53
|
+
for (const w of i.renderedItems)
|
|
54
|
+
w.element && b.observe(w.element);
|
|
55
55
|
return () => {
|
|
56
|
-
cancelAnimationFrame(p),
|
|
56
|
+
cancelAnimationFrame(p), b.disconnect();
|
|
57
57
|
};
|
|
58
58
|
}));
|
|
59
59
|
const m = (i, d, p = !1) => {
|
|
60
60
|
let h;
|
|
61
|
-
return d((
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
64
|
-
h = w
|
|
61
|
+
return d((b) => {
|
|
62
|
+
const w = b.findIndex(({ id: g }) => g === i.id), E = b.slice();
|
|
63
|
+
if (w !== -1) {
|
|
64
|
+
h = b[w];
|
|
65
65
|
const g = ce(ce({}, h), i);
|
|
66
|
-
E[
|
|
66
|
+
E[w] = g, o.set(i.id, g);
|
|
67
67
|
} else
|
|
68
68
|
E.push(i), o.set(i.id, i);
|
|
69
69
|
return E;
|
|
70
70
|
}), () => {
|
|
71
|
-
d((
|
|
71
|
+
d((b) => {
|
|
72
72
|
if (!h)
|
|
73
|
-
return p && o.delete(i.id),
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
const E =
|
|
77
|
-
return E[
|
|
73
|
+
return p && o.delete(i.id), b.filter(({ id: g }) => g !== i.id);
|
|
74
|
+
const w = b.findIndex(({ id: g }) => g === i.id);
|
|
75
|
+
if (w === -1) return b;
|
|
76
|
+
const E = b.slice();
|
|
77
|
+
return E[w] = h, o.set(i.id, h), E;
|
|
78
78
|
});
|
|
79
79
|
};
|
|
80
80
|
}, f = (i) => m(
|
|
@@ -82,7 +82,7 @@ function fo(e = {}) {
|
|
|
82
82
|
(d) => l.setState("items", d),
|
|
83
83
|
!0
|
|
84
84
|
);
|
|
85
|
-
return
|
|
85
|
+
return Te(ce({}, a), {
|
|
86
86
|
registerItem: f,
|
|
87
87
|
renderItem: (i) => De(
|
|
88
88
|
f(i),
|
|
@@ -104,40 +104,40 @@ function fo(e = {}) {
|
|
|
104
104
|
__unstablePrivateStore: l
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
return
|
|
107
|
+
function po(e, t, r) {
|
|
108
|
+
return Ut(t, [r.store]), re(e, r, "items", "setItems"), e;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function Cs(e) {
|
|
111
111
|
return Array.isArray(e) ? e : typeof e < "u" ? [e] : [];
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function Xn(e) {
|
|
114
114
|
const t = [];
|
|
115
115
|
for (const r of e)
|
|
116
116
|
t.push(...r);
|
|
117
117
|
return t;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function Ht(e) {
|
|
120
120
|
return e.slice().reverse();
|
|
121
121
|
}
|
|
122
|
-
var
|
|
122
|
+
var go = { id: null };
|
|
123
123
|
function Se(e, t) {
|
|
124
124
|
return e.find((r) => t ? !r.disabled && r.id !== t : !r.disabled);
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function vo(e, t) {
|
|
127
127
|
return e.filter((r) => t ? !r.disabled && r.id !== t : !r.disabled);
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function bn(e, t) {
|
|
130
130
|
return e.filter((r) => r.rowId === t);
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function ho(e, t, r = !1) {
|
|
133
133
|
const n = e.findIndex((o) => o.id === t);
|
|
134
134
|
return [
|
|
135
135
|
...e.slice(n + 1),
|
|
136
|
-
...r ? [
|
|
136
|
+
...r ? [go] : [],
|
|
137
137
|
...e.slice(0, n)
|
|
138
138
|
];
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function Jn(e) {
|
|
141
141
|
const t = [];
|
|
142
142
|
for (const r of e) {
|
|
143
143
|
const n = t.find((o) => {
|
|
@@ -148,37 +148,37 @@ function Xn(e) {
|
|
|
148
148
|
}
|
|
149
149
|
return t;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function Zn(e) {
|
|
152
152
|
let t = 0;
|
|
153
153
|
for (const { length: r } of e)
|
|
154
154
|
r > t && (t = r);
|
|
155
155
|
return t;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function yo(e) {
|
|
158
158
|
return {
|
|
159
159
|
id: "__EMPTY_ITEM__",
|
|
160
160
|
disabled: !0,
|
|
161
161
|
rowId: e
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
const n =
|
|
164
|
+
function bo(e, t, r) {
|
|
165
|
+
const n = Zn(e);
|
|
166
166
|
for (const o of e)
|
|
167
167
|
for (let s = 0; s < n; s += 1) {
|
|
168
168
|
const c = o[s];
|
|
169
169
|
if (!c || r && c.disabled) {
|
|
170
170
|
const a = s === 0 && r ? Se(o) : o[s - 1];
|
|
171
|
-
o[s] = a && t !== a.id && r ? a :
|
|
171
|
+
o[s] = a && t !== a.id && r ? a : yo(a == null ? void 0 : a.rowId);
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
return e;
|
|
175
175
|
}
|
|
176
176
|
function wo(e) {
|
|
177
|
-
const t =
|
|
177
|
+
const t = Jn(e), r = Zn(t), n = [];
|
|
178
178
|
for (let o = 0; o < r; o += 1)
|
|
179
179
|
for (const s of t) {
|
|
180
180
|
const c = s[o];
|
|
181
|
-
c && n.push(
|
|
181
|
+
c && n.push(Te(ce({}, c), {
|
|
182
182
|
// If there's no rowId, it means that it's not a grid composite, but
|
|
183
183
|
// a single row instead. So, instead of verticalizing it, that is,
|
|
184
184
|
// assigning a different rowId based on the column index, we keep it
|
|
@@ -189,44 +189,44 @@ function wo(e) {
|
|
|
189
189
|
}
|
|
190
190
|
return n;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function As(e = {}) {
|
|
193
193
|
var t;
|
|
194
|
-
const r = (t = e.store) == null ? void 0 : t.getState(), n =
|
|
194
|
+
const r = (t = e.store) == null ? void 0 : t.getState(), n = mo(e), o = z(
|
|
195
195
|
e.activeId,
|
|
196
196
|
r == null ? void 0 : r.activeId,
|
|
197
197
|
e.defaultActiveId
|
|
198
|
-
), s =
|
|
199
|
-
id:
|
|
198
|
+
), s = Te(ce({}, n.getState()), {
|
|
199
|
+
id: z(
|
|
200
200
|
e.id,
|
|
201
201
|
r == null ? void 0 : r.id,
|
|
202
202
|
`id-${Math.random().toString(36).slice(2, 8)}`
|
|
203
203
|
),
|
|
204
204
|
activeId: o,
|
|
205
|
-
baseElement:
|
|
206
|
-
includesBaseElement:
|
|
205
|
+
baseElement: z(r == null ? void 0 : r.baseElement, null),
|
|
206
|
+
includesBaseElement: z(
|
|
207
207
|
e.includesBaseElement,
|
|
208
208
|
r == null ? void 0 : r.includesBaseElement,
|
|
209
209
|
o === null
|
|
210
210
|
),
|
|
211
|
-
moves:
|
|
212
|
-
orientation:
|
|
211
|
+
moves: z(r == null ? void 0 : r.moves, 0),
|
|
212
|
+
orientation: z(
|
|
213
213
|
e.orientation,
|
|
214
214
|
r == null ? void 0 : r.orientation,
|
|
215
215
|
"both"
|
|
216
216
|
),
|
|
217
|
-
rtl:
|
|
218
|
-
virtualFocus:
|
|
217
|
+
rtl: z(e.rtl, r == null ? void 0 : r.rtl, !1),
|
|
218
|
+
virtualFocus: z(
|
|
219
219
|
e.virtualFocus,
|
|
220
220
|
r == null ? void 0 : r.virtualFocus,
|
|
221
221
|
!1
|
|
222
222
|
),
|
|
223
|
-
focusLoop:
|
|
224
|
-
focusWrap:
|
|
225
|
-
focusShift:
|
|
223
|
+
focusLoop: z(e.focusLoop, r == null ? void 0 : r.focusLoop, !1),
|
|
224
|
+
focusWrap: z(e.focusWrap, r == null ? void 0 : r.focusWrap, !1),
|
|
225
|
+
focusShift: z(e.focusShift, r == null ? void 0 : r.focusShift, !1)
|
|
226
226
|
}), c = it(s, n, e.store);
|
|
227
227
|
$e(
|
|
228
228
|
c,
|
|
229
|
-
() =>
|
|
229
|
+
() => xt(c, ["renderedItems", "activeId"], (a) => {
|
|
230
230
|
c.setState("activeId", (u) => {
|
|
231
231
|
var m;
|
|
232
232
|
return u !== void 0 ? u : (m = Se(a.renderedItems)) == null ? void 0 : m.id;
|
|
@@ -240,32 +240,32 @@ function Ts(e = {}) {
|
|
|
240
240
|
activeId: p = i.activeId,
|
|
241
241
|
focusShift: h = i.focusShift,
|
|
242
242
|
focusLoop: x = i.focusLoop,
|
|
243
|
-
focusWrap:
|
|
244
|
-
includesBaseElement:
|
|
243
|
+
focusWrap: b = i.focusWrap,
|
|
244
|
+
includesBaseElement: w = i.includesBaseElement,
|
|
245
245
|
renderedItems: E = i.renderedItems,
|
|
246
246
|
rtl: g = i.rtl
|
|
247
247
|
} = u, v = a === "up" || a === "down", O = a === "next" || a === "down", S = O ? g && !v : !g || v, $ = h && !d;
|
|
248
|
-
let
|
|
249
|
-
|
|
248
|
+
let C = v ? Xn(
|
|
249
|
+
bo(Jn(E), p, $)
|
|
250
250
|
) : E;
|
|
251
|
-
if (
|
|
252
|
-
return (m = Se(
|
|
253
|
-
const R =
|
|
251
|
+
if (C = S ? Ht(C) : C, C = v ? wo(C) : C, p == null)
|
|
252
|
+
return (m = Se(C)) == null ? void 0 : m.id;
|
|
253
|
+
const R = C.find((T) => T.id === p);
|
|
254
254
|
if (!R)
|
|
255
|
-
return (f = Se(
|
|
256
|
-
const B =
|
|
255
|
+
return (f = Se(C)) == null ? void 0 : f.id;
|
|
256
|
+
const B = C.some((T) => T.rowId), L = C.indexOf(R), y = C.slice(L + 1), D = bn(y, R.rowId);
|
|
257
257
|
if (d) {
|
|
258
|
-
const
|
|
259
|
-
|
|
258
|
+
const T = vo(D, p), k = T.slice(d)[0] || // If we can't find an item, just return the last one.
|
|
259
|
+
T[T.length - 1];
|
|
260
260
|
return k == null ? void 0 : k.id;
|
|
261
261
|
}
|
|
262
|
-
const
|
|
263
|
-
if (
|
|
264
|
-
const
|
|
262
|
+
const A = x && (v ? x !== "horizontal" : x !== "vertical"), M = B && b && (v ? b !== "horizontal" : b !== "vertical"), I = O ? (!B || v) && A && w : v ? w : !1;
|
|
263
|
+
if (A) {
|
|
264
|
+
const T = M && !I ? C : bn(C, R.rowId), k = ho(T, p, I), q = Se(k, p);
|
|
265
265
|
return q == null ? void 0 : q.id;
|
|
266
266
|
}
|
|
267
267
|
if (M) {
|
|
268
|
-
const
|
|
268
|
+
const T = Se(
|
|
269
269
|
// We can use nextItems, which contains all the next items, including
|
|
270
270
|
// items from other rows, to wrap between rows. However, if there is a
|
|
271
271
|
// null item (the composite container), we'll only use the next items in
|
|
@@ -275,12 +275,12 @@ function Ts(e = {}) {
|
|
|
275
275
|
I ? D : y,
|
|
276
276
|
p
|
|
277
277
|
);
|
|
278
|
-
return I ? (
|
|
278
|
+
return I ? (T == null ? void 0 : T.id) || null : T == null ? void 0 : T.id;
|
|
279
279
|
}
|
|
280
280
|
const V = Se(D, p);
|
|
281
281
|
return !V && I ? null : V == null ? void 0 : V.id;
|
|
282
282
|
};
|
|
283
|
-
return
|
|
283
|
+
return Te(ce(ce({}, n), c), {
|
|
284
284
|
setBaseElement: (a) => c.setState("baseElement", a),
|
|
285
285
|
setActiveId: (a) => c.setState("activeId", a),
|
|
286
286
|
move: (a) => {
|
|
@@ -292,7 +292,7 @@ function Ts(e = {}) {
|
|
|
292
292
|
},
|
|
293
293
|
last: () => {
|
|
294
294
|
var a;
|
|
295
|
-
return (a = Se(
|
|
295
|
+
return (a = Se(Ht(c.getState().renderedItems))) == null ? void 0 : a.id;
|
|
296
296
|
},
|
|
297
297
|
next: (a) => (a !== void 0 && typeof a == "number" && (a = { skip: a }), l("next", a)),
|
|
298
298
|
previous: (a) => (a !== void 0 && typeof a == "number" && (a = { skip: a }), l("previous", a)),
|
|
@@ -300,31 +300,27 @@ function Ts(e = {}) {
|
|
|
300
300
|
up: (a) => (a !== void 0 && typeof a == "number" && (a = { skip: a }), l("up", a))
|
|
301
301
|
});
|
|
302
302
|
}
|
|
303
|
-
function
|
|
304
|
-
const t =
|
|
305
|
-
return
|
|
303
|
+
function Ts(e) {
|
|
304
|
+
const t = Yt(e.id);
|
|
305
|
+
return _({ id: t }, e);
|
|
306
306
|
}
|
|
307
|
-
function
|
|
308
|
-
return e =
|
|
307
|
+
function _s(e, t, r) {
|
|
308
|
+
return e = po(e, t, r), re(e, r, "activeId", "setActiveId"), re(e, r, "includesBaseElement"), re(e, r, "virtualFocus"), re(e, r, "orientation"), re(e, r, "rtl"), re(e, r, "focusLoop"), re(e, r, "focusWrap"), re(e, r, "focusShift"), e;
|
|
309
309
|
}
|
|
310
|
-
Je(
|
|
310
|
+
var Rs = Je(
|
|
311
311
|
void 0
|
|
312
|
-
)
|
|
313
|
-
|
|
314
|
-
[
|
|
315
|
-
|
|
316
|
-
), Rs = bo.useProviderContext;
|
|
317
|
-
Je(
|
|
312
|
+
), ct = Cr(
|
|
313
|
+
[Tr, Vn],
|
|
314
|
+
[Gt, Ar]
|
|
315
|
+
), Is = ct.useContext, Fs = ct.useScopedContext, Ls = ct.useProviderContext, Ms = ct.ContextProvider, Ns = ct.ScopedContextProvider, ks = Je(
|
|
318
316
|
void 0
|
|
319
|
-
);
|
|
320
|
-
Je(!1);
|
|
321
|
-
var xo = "div";
|
|
317
|
+
), $s = Je(!1), xo = "div";
|
|
322
318
|
function Eo(e) {
|
|
323
319
|
return e.some((t) => !!t.rowId);
|
|
324
320
|
}
|
|
325
321
|
function So(e) {
|
|
326
322
|
const t = e.target;
|
|
327
|
-
return t && !
|
|
323
|
+
return t && !Jt(t) ? !1 : e.key.length === 1 && !e.ctrlKey && !e.metaKey;
|
|
328
324
|
}
|
|
329
325
|
function Oo(e) {
|
|
330
326
|
return e.key === "Shift" || e.key === "Control" || e.key === "Alt" || e.key === "Meta";
|
|
@@ -336,12 +332,12 @@ function wn(e, t, r) {
|
|
|
336
332
|
const s = e.getState(), c = (o = ke(e, s.activeId)) == null ? void 0 : o.element;
|
|
337
333
|
if (!c) return;
|
|
338
334
|
const l = n, { view: a } = l, u = se(l, ["view"]), m = r == null ? void 0 : r.current;
|
|
339
|
-
c !== m && c.focus(),
|
|
335
|
+
c !== m && c.focus(), Ir(c, n.type, u) || n.preventDefault(), n.currentTarget.contains(c) && n.stopPropagation();
|
|
340
336
|
});
|
|
341
337
|
}
|
|
342
338
|
function Po(e) {
|
|
343
|
-
return
|
|
344
|
-
|
|
339
|
+
return Jr(
|
|
340
|
+
Xn(Ht(Zr(e)))
|
|
345
341
|
);
|
|
346
342
|
}
|
|
347
343
|
function Do(e) {
|
|
@@ -353,7 +349,7 @@ function Do(e) {
|
|
|
353
349
|
t && s && (r(!1), s.focus({ preventScroll: !0 }));
|
|
354
350
|
}, [o, t]), n;
|
|
355
351
|
}
|
|
356
|
-
var
|
|
352
|
+
var Co = ee(
|
|
357
353
|
function(t) {
|
|
358
354
|
var r = t, {
|
|
359
355
|
store: n,
|
|
@@ -371,64 +367,64 @@ var Ao = ee(
|
|
|
371
367
|
n,
|
|
372
368
|
process.env.NODE_ENV !== "production" && "Composite must receive a `store` prop or be wrapped in a CompositeProvider component."
|
|
373
369
|
);
|
|
374
|
-
const u = Y(null), m = Y(null), f = Do(n), i = n.useState("moves"), [, d] =
|
|
370
|
+
const u = Y(null), m = Y(null), f = Do(n), i = n.useState("moves"), [, d] = Rr(
|
|
375
371
|
o ? n.setBaseElement : null
|
|
376
372
|
);
|
|
377
373
|
U(() => {
|
|
378
374
|
var y;
|
|
379
375
|
if (!n || !i || !o || !s) return;
|
|
380
|
-
const { activeId: D } = n.getState(),
|
|
381
|
-
|
|
382
|
-
}, [n, i, o, s]),
|
|
376
|
+
const { activeId: D } = n.getState(), A = (y = ke(n, D)) == null ? void 0 : y.element;
|
|
377
|
+
A && Yr(A);
|
|
378
|
+
}, [n, i, o, s]), j(() => {
|
|
383
379
|
if (!n || !i || !o) return;
|
|
384
380
|
const { baseElement: y, activeId: D } = n.getState();
|
|
385
381
|
if (!(D === null) || !y) return;
|
|
386
382
|
const M = m.current;
|
|
387
|
-
m.current = null, M && Ue(M, { relatedTarget: y }),
|
|
383
|
+
m.current = null, M && Ue(M, { relatedTarget: y }), Gr(y) || y.focus();
|
|
388
384
|
}, [n, i, o]);
|
|
389
385
|
const p = n.useState("activeId"), h = n.useState("virtualFocus");
|
|
390
|
-
|
|
386
|
+
j(() => {
|
|
391
387
|
var y;
|
|
392
388
|
if (!n || !o || !h) return;
|
|
393
389
|
const D = m.current;
|
|
394
390
|
if (m.current = null, !D) return;
|
|
395
|
-
const M = ((y = ke(n, p)) == null ? void 0 : y.element) ||
|
|
391
|
+
const M = ((y = ke(n, p)) == null ? void 0 : y.element) || Xt(D);
|
|
396
392
|
M !== D && Ue(D, { relatedTarget: M });
|
|
397
393
|
}, [n, p, h, o]);
|
|
398
394
|
const x = wn(
|
|
399
395
|
n,
|
|
400
396
|
l.onKeyDownCapture,
|
|
401
397
|
m
|
|
402
|
-
),
|
|
398
|
+
), b = wn(
|
|
403
399
|
n,
|
|
404
400
|
l.onKeyUpCapture,
|
|
405
401
|
m
|
|
406
|
-
),
|
|
407
|
-
if (
|
|
402
|
+
), w = l.onFocusCapture, E = ue((y) => {
|
|
403
|
+
if (w == null || w(y), y.defaultPrevented || !n) return;
|
|
408
404
|
const { virtualFocus: D } = n.getState();
|
|
409
405
|
if (!D) return;
|
|
410
|
-
const
|
|
411
|
-
Ne(y) && M && (y.stopPropagation(), m.current =
|
|
406
|
+
const A = y.relatedTarget, M = Xr(y.currentTarget);
|
|
407
|
+
Ne(y) && M && (y.stopPropagation(), m.current = A);
|
|
412
408
|
}), g = l.onFocus, v = ue((y) => {
|
|
413
409
|
if (g == null || g(y), y.defaultPrevented || !o || !n) return;
|
|
414
|
-
const { relatedTarget: D } = y, { virtualFocus:
|
|
415
|
-
|
|
410
|
+
const { relatedTarget: D } = y, { virtualFocus: A } = n.getState();
|
|
411
|
+
A ? Ne(y) && !It(n, D) && queueMicrotask(f) : Ne(y) && n.setActiveId(null);
|
|
416
412
|
}), O = l.onBlurCapture, S = ue((y) => {
|
|
417
413
|
var D;
|
|
418
414
|
if (O == null || O(y), y.defaultPrevented || !n) return;
|
|
419
|
-
const { virtualFocus:
|
|
420
|
-
if (!
|
|
421
|
-
const I = (D = ke(n, M)) == null ? void 0 : D.element, V = y.relatedTarget,
|
|
422
|
-
m.current = null, Ne(y) &&
|
|
423
|
-
}), $ = l.onKeyDown,
|
|
415
|
+
const { virtualFocus: A, activeId: M } = n.getState();
|
|
416
|
+
if (!A) return;
|
|
417
|
+
const I = (D = ke(n, M)) == null ? void 0 : D.element, V = y.relatedTarget, T = It(n, V), k = m.current;
|
|
418
|
+
m.current = null, Ne(y) && T ? (V === I ? k && k !== V && Ue(k, y) : I ? Ue(I, y) : k && Ue(k, y), y.stopPropagation()) : !It(n, y.target) && I && Ue(I, y);
|
|
419
|
+
}), $ = l.onKeyDown, C = rt(c), R = ue((y) => {
|
|
424
420
|
var D;
|
|
425
421
|
if ($ == null || $(y), y.nativeEvent.isComposing || y.defaultPrevented || !n || !Ne(y)) return;
|
|
426
|
-
const { orientation:
|
|
422
|
+
const { orientation: A, renderedItems: M, activeId: I } = n.getState(), V = ke(n, I);
|
|
427
423
|
if ((D = V == null ? void 0 : V.element) != null && D.isConnected) return;
|
|
428
|
-
const
|
|
429
|
-
if ((y.key === "ArrowLeft" || y.key === "ArrowRight" || y.key === "Home" || y.key === "End") &&
|
|
424
|
+
const T = A !== "horizontal", k = A !== "vertical", q = Eo(M);
|
|
425
|
+
if ((y.key === "ArrowLeft" || y.key === "ArrowRight" || y.key === "Home" || y.key === "End") && Jt(y.currentTarget)) return;
|
|
430
426
|
const te = {
|
|
431
|
-
ArrowUp: (q ||
|
|
427
|
+
ArrowUp: (q || T) && (() => {
|
|
432
428
|
if (q) {
|
|
433
429
|
const xe = Po(M);
|
|
434
430
|
return xe == null ? void 0 : xe.id;
|
|
@@ -436,7 +432,7 @@ var Ao = ee(
|
|
|
436
432
|
return n == null ? void 0 : n.last();
|
|
437
433
|
}),
|
|
438
434
|
ArrowRight: (q || k) && n.first,
|
|
439
|
-
ArrowDown: (q ||
|
|
435
|
+
ArrowDown: (q || T) && n.first,
|
|
440
436
|
ArrowLeft: (q || k) && n.last,
|
|
441
437
|
Home: n.first,
|
|
442
438
|
End: n.last,
|
|
@@ -446,14 +442,14 @@ var Ao = ee(
|
|
|
446
442
|
if (te) {
|
|
447
443
|
const xe = te();
|
|
448
444
|
if (xe !== void 0) {
|
|
449
|
-
if (!
|
|
445
|
+
if (!C(y)) return;
|
|
450
446
|
y.preventDefault(), n.move(xe);
|
|
451
447
|
}
|
|
452
448
|
}
|
|
453
449
|
});
|
|
454
450
|
l = fe(
|
|
455
451
|
l,
|
|
456
|
-
(y) => /* @__PURE__ */ H(
|
|
452
|
+
(y) => /* @__PURE__ */ H(Vn, { value: n, children: y }),
|
|
457
453
|
[n]
|
|
458
454
|
);
|
|
459
455
|
const B = n.useState((y) => {
|
|
@@ -461,12 +457,12 @@ var Ao = ee(
|
|
|
461
457
|
if (n && o && y.virtualFocus)
|
|
462
458
|
return (D = ke(n, y.activeId)) == null ? void 0 : D.id;
|
|
463
459
|
});
|
|
464
|
-
l = W(
|
|
460
|
+
l = W(_({
|
|
465
461
|
"aria-activedescendant": B
|
|
466
462
|
}, l), {
|
|
467
463
|
ref: Be(u, d, l.ref),
|
|
468
464
|
onKeyDownCapture: x,
|
|
469
|
-
onKeyUpCapture:
|
|
465
|
+
onKeyUpCapture: b,
|
|
470
466
|
onFocusCapture: E,
|
|
471
467
|
onFocus: v,
|
|
472
468
|
onBlurCapture: S,
|
|
@@ -475,14 +471,14 @@ var Ao = ee(
|
|
|
475
471
|
const L = n.useState(
|
|
476
472
|
(y) => o && (y.virtualFocus || y.activeId === null)
|
|
477
473
|
);
|
|
478
|
-
return l = jn(
|
|
474
|
+
return l = jn(_({ focusable: L }, l)), l;
|
|
479
475
|
}
|
|
480
476
|
);
|
|
481
477
|
K(function(t) {
|
|
482
|
-
const r =
|
|
478
|
+
const r = Co(t);
|
|
483
479
|
return Q(xo, r);
|
|
484
480
|
});
|
|
485
|
-
var
|
|
481
|
+
var gt = { exports: {} }, J = {};
|
|
486
482
|
/**
|
|
487
483
|
* @license React
|
|
488
484
|
* react-dom.production.js
|
|
@@ -492,11 +488,11 @@ var pt = { exports: {} }, J = {};
|
|
|
492
488
|
* This source code is licensed under the MIT license found in the
|
|
493
489
|
* LICENSE file in the root directory of this source tree.
|
|
494
490
|
*/
|
|
495
|
-
var
|
|
496
|
-
function
|
|
497
|
-
if (
|
|
498
|
-
|
|
499
|
-
var e =
|
|
491
|
+
var xn;
|
|
492
|
+
function Ao() {
|
|
493
|
+
if (xn) return J;
|
|
494
|
+
xn = 1;
|
|
495
|
+
var e = Yn;
|
|
500
496
|
function t(a) {
|
|
501
497
|
var u = "https://react.dev/errors/" + a;
|
|
502
498
|
if (1 < arguments.length) {
|
|
@@ -635,9 +631,9 @@ var Z = {};
|
|
|
635
631
|
* This source code is licensed under the MIT license found in the
|
|
636
632
|
* LICENSE file in the root directory of this source tree.
|
|
637
633
|
*/
|
|
638
|
-
var
|
|
639
|
-
function
|
|
640
|
-
return
|
|
634
|
+
var En;
|
|
635
|
+
function To() {
|
|
636
|
+
return En || (En = 1, process.env.NODE_ENV !== "production" && function() {
|
|
641
637
|
function e() {
|
|
642
638
|
}
|
|
643
639
|
function t(f) {
|
|
@@ -684,7 +680,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
684
680
|
), f;
|
|
685
681
|
}
|
|
686
682
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
687
|
-
var l =
|
|
683
|
+
var l = Yn, a = {
|
|
688
684
|
d: {
|
|
689
685
|
f: e,
|
|
690
686
|
r: function() {
|
|
@@ -848,10 +844,10 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
848
844
|
}, Z.version = "19.1.0", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
849
845
|
}()), Z;
|
|
850
846
|
}
|
|
851
|
-
var
|
|
852
|
-
function
|
|
853
|
-
if (
|
|
854
|
-
|
|
847
|
+
var Sn;
|
|
848
|
+
function _o() {
|
|
849
|
+
if (Sn) return gt.exports;
|
|
850
|
+
Sn = 1;
|
|
855
851
|
function e() {
|
|
856
852
|
if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) {
|
|
857
853
|
if (process.env.NODE_ENV !== "production")
|
|
@@ -863,10 +859,10 @@ function Co() {
|
|
|
863
859
|
}
|
|
864
860
|
}
|
|
865
861
|
}
|
|
866
|
-
return process.env.NODE_ENV === "production" ? (e(),
|
|
862
|
+
return process.env.NODE_ENV === "production" ? (e(), gt.exports = Ao()) : gt.exports = To(), gt.exports;
|
|
867
863
|
}
|
|
868
|
-
var
|
|
869
|
-
function
|
|
864
|
+
var Et = _o(), Ro = "div";
|
|
865
|
+
function On(e, t) {
|
|
870
866
|
const r = setTimeout(t, e);
|
|
871
867
|
return () => clearTimeout(r);
|
|
872
868
|
}
|
|
@@ -876,31 +872,31 @@ function Io(e) {
|
|
|
876
872
|
});
|
|
877
873
|
return () => cancelAnimationFrame(t);
|
|
878
874
|
}
|
|
879
|
-
function
|
|
875
|
+
function Pn(...e) {
|
|
880
876
|
return e.join(", ").split(", ").reduce((t, r) => {
|
|
881
877
|
const n = r.endsWith("ms") ? 1 : 1e3, o = Number.parseFloat(r || "0s") * n;
|
|
882
878
|
return o > t ? o : t;
|
|
883
879
|
}, 0);
|
|
884
880
|
}
|
|
885
|
-
function
|
|
881
|
+
function Qn(e, t, r) {
|
|
886
882
|
return !r && t !== !1 && (!e || !!t);
|
|
887
883
|
}
|
|
888
|
-
var
|
|
884
|
+
var nn = ee(function(t) {
|
|
889
885
|
var r = t, { store: n, alwaysVisible: o } = r, s = se(r, ["store", "alwaysVisible"]);
|
|
890
|
-
const c =
|
|
886
|
+
const c = Zt();
|
|
891
887
|
n = n || c, Fe(
|
|
892
888
|
n,
|
|
893
889
|
process.env.NODE_ENV !== "production" && "DisclosureContent must receive a `store` prop or be wrapped in a DisclosureProvider component."
|
|
894
890
|
);
|
|
895
|
-
const l = Y(null), a =
|
|
896
|
-
|
|
891
|
+
const l = Y(null), a = Yt(s.id), [u, m] = le(null), f = n.useState("open"), i = n.useState("mounted"), d = n.useState("animated"), p = n.useState("contentElement"), h = he(n.disclosure, "contentElement");
|
|
892
|
+
j(() => {
|
|
897
893
|
l.current && (n == null || n.setContentElement(l.current));
|
|
898
|
-
}, [n]),
|
|
894
|
+
}, [n]), j(() => {
|
|
899
895
|
let E;
|
|
900
896
|
return n == null || n.setState("animated", (g) => (E = g, !0)), () => {
|
|
901
897
|
E !== void 0 && (n == null || n.setState("animated", E));
|
|
902
898
|
};
|
|
903
|
-
}, [n]),
|
|
899
|
+
}, [n]), j(() => {
|
|
904
900
|
if (d) {
|
|
905
901
|
if (!(p != null && p.isConnected)) {
|
|
906
902
|
m(null);
|
|
@@ -910,46 +906,46 @@ var tn = ee(function(t) {
|
|
|
910
906
|
m(f ? "enter" : i ? "leave" : null);
|
|
911
907
|
});
|
|
912
908
|
}
|
|
913
|
-
}, [d, p, f, i]),
|
|
909
|
+
}, [d, p, f, i]), j(() => {
|
|
914
910
|
if (!n || !d || !u || !p) return;
|
|
915
|
-
const E = () => n == null ? void 0 : n.setState("animating", !1), g = () =>
|
|
911
|
+
const E = () => n == null ? void 0 : n.setState("animating", !1), g = () => Et.flushSync(E);
|
|
916
912
|
if (u === "leave" && f || u === "enter" && !f) return;
|
|
917
913
|
if (typeof d == "number")
|
|
918
|
-
return
|
|
914
|
+
return On(d, g);
|
|
919
915
|
const {
|
|
920
916
|
transitionDuration: v,
|
|
921
917
|
animationDuration: O,
|
|
922
918
|
transitionDelay: S,
|
|
923
919
|
animationDelay: $
|
|
924
920
|
} = getComputedStyle(p), {
|
|
925
|
-
transitionDuration:
|
|
921
|
+
transitionDuration: C = "0",
|
|
926
922
|
animationDuration: R = "0",
|
|
927
923
|
transitionDelay: B = "0",
|
|
928
924
|
animationDelay: L = "0"
|
|
929
|
-
} = h ? getComputedStyle(h) : {}, y =
|
|
925
|
+
} = h ? getComputedStyle(h) : {}, y = Pn(
|
|
930
926
|
S,
|
|
931
927
|
$,
|
|
932
928
|
B,
|
|
933
929
|
L
|
|
934
|
-
), D =
|
|
930
|
+
), D = Pn(
|
|
935
931
|
v,
|
|
936
932
|
O,
|
|
937
|
-
|
|
933
|
+
C,
|
|
938
934
|
R
|
|
939
|
-
),
|
|
940
|
-
if (!
|
|
935
|
+
), A = y + D;
|
|
936
|
+
if (!A) {
|
|
941
937
|
u === "enter" && n.setState("animated", !1), E();
|
|
942
938
|
return;
|
|
943
939
|
}
|
|
944
|
-
const M = 1e3 / 60, I = Math.max(
|
|
945
|
-
return
|
|
940
|
+
const M = 1e3 / 60, I = Math.max(A - M, 0);
|
|
941
|
+
return On(I, g);
|
|
946
942
|
}, [n, d, p, h, f, u]), s = fe(
|
|
947
943
|
s,
|
|
948
|
-
(E) => /* @__PURE__ */ H(
|
|
944
|
+
(E) => /* @__PURE__ */ H(Hn, { value: n, children: E }),
|
|
949
945
|
[n]
|
|
950
946
|
);
|
|
951
|
-
const x =
|
|
952
|
-
return s = W(
|
|
947
|
+
const x = Qn(i, s.hidden, o), b = s.style, w = Gn(() => x ? W(_({}, b), { display: "none" }) : b, [x, b]);
|
|
948
|
+
return s = W(_({
|
|
953
949
|
id: a,
|
|
954
950
|
"data-open": f || void 0,
|
|
955
951
|
"data-enter": u === "enter" || void 0,
|
|
@@ -957,10 +953,10 @@ var tn = ee(function(t) {
|
|
|
957
953
|
hidden: x
|
|
958
954
|
}, s), {
|
|
959
955
|
ref: Be(a ? n.setContentElement : null, l, s.ref),
|
|
960
|
-
style:
|
|
961
|
-
}),
|
|
956
|
+
style: w
|
|
957
|
+
}), Bn(s);
|
|
962
958
|
}), Fo = K(function(t) {
|
|
963
|
-
const r =
|
|
959
|
+
const r = nn(t);
|
|
964
960
|
return Q(Ro, r);
|
|
965
961
|
});
|
|
966
962
|
K(function(t) {
|
|
@@ -969,47 +965,47 @@ K(function(t) {
|
|
|
969
965
|
} = r, o = se(r, [
|
|
970
966
|
"unmountOnHide"
|
|
971
967
|
]);
|
|
972
|
-
const s =
|
|
968
|
+
const s = Zt(), c = o.store || s;
|
|
973
969
|
return he(
|
|
974
970
|
c,
|
|
975
971
|
(a) => !n || (a == null ? void 0 : a.mounted)
|
|
976
|
-
) === !1 ? null : /* @__PURE__ */ H(Fo,
|
|
972
|
+
) === !1 ? null : /* @__PURE__ */ H(Fo, _({}, o));
|
|
977
973
|
});
|
|
978
|
-
function
|
|
979
|
-
const t =
|
|
974
|
+
function er(e = {}) {
|
|
975
|
+
const t = Kn(
|
|
980
976
|
e.store,
|
|
981
|
-
|
|
977
|
+
qn(e.disclosure, ["contentElement", "disclosureElement"])
|
|
982
978
|
);
|
|
983
|
-
|
|
984
|
-
const r = t == null ? void 0 : t.getState(), n =
|
|
979
|
+
en(e, t);
|
|
980
|
+
const r = t == null ? void 0 : t.getState(), n = z(
|
|
985
981
|
e.open,
|
|
986
982
|
r == null ? void 0 : r.open,
|
|
987
983
|
e.defaultOpen,
|
|
988
984
|
!1
|
|
989
|
-
), o =
|
|
985
|
+
), o = z(e.animated, r == null ? void 0 : r.animated, !1), s = {
|
|
990
986
|
open: n,
|
|
991
987
|
animated: o,
|
|
992
988
|
animating: !!o && n,
|
|
993
989
|
mounted: n,
|
|
994
|
-
contentElement:
|
|
995
|
-
disclosureElement:
|
|
990
|
+
contentElement: z(r == null ? void 0 : r.contentElement, null),
|
|
991
|
+
disclosureElement: z(r == null ? void 0 : r.disclosureElement, null)
|
|
996
992
|
}, c = it(s, t);
|
|
997
993
|
return $e(
|
|
998
994
|
c,
|
|
999
|
-
() =>
|
|
995
|
+
() => xt(c, ["animated", "animating"], (l) => {
|
|
1000
996
|
l.animated || c.setState("animating", !1);
|
|
1001
997
|
})
|
|
1002
998
|
), $e(
|
|
1003
999
|
c,
|
|
1004
|
-
() =>
|
|
1000
|
+
() => Qr(c, ["open"], () => {
|
|
1005
1001
|
c.getState().animated && c.setState("animating", !0);
|
|
1006
1002
|
})
|
|
1007
1003
|
), $e(
|
|
1008
1004
|
c,
|
|
1009
|
-
() =>
|
|
1005
|
+
() => xt(c, ["open", "animating"], (l) => {
|
|
1010
1006
|
c.setState("mounted", l.open || l.animating);
|
|
1011
1007
|
})
|
|
1012
|
-
),
|
|
1008
|
+
), Te(ce({}, c), {
|
|
1013
1009
|
disclosure: e.disclosure,
|
|
1014
1010
|
setOpen: (l) => c.setState("open", l),
|
|
1015
1011
|
show: () => c.setState("open", !0),
|
|
@@ -1020,32 +1016,32 @@ function Qn(e = {}) {
|
|
|
1020
1016
|
setDisclosureElement: (l) => c.setState("disclosureElement", l)
|
|
1021
1017
|
});
|
|
1022
1018
|
}
|
|
1023
|
-
function
|
|
1024
|
-
return
|
|
1019
|
+
function tr(e, t, r) {
|
|
1020
|
+
return Ut(t, [r.store, r.disclosure]), re(e, r, "open", "setOpen"), re(e, r, "mounted", "setMounted"), re(e, r, "animated"), Object.assign(e, { disclosure: r.disclosure });
|
|
1025
1021
|
}
|
|
1026
1022
|
function Lo(e = {}) {
|
|
1027
|
-
const [t, r] =
|
|
1028
|
-
return
|
|
1023
|
+
const [t, r] = Un(er, e);
|
|
1024
|
+
return tr(t, r, e);
|
|
1029
1025
|
}
|
|
1030
|
-
function
|
|
1031
|
-
return
|
|
1026
|
+
function nr(e = {}) {
|
|
1027
|
+
return er(e);
|
|
1032
1028
|
}
|
|
1033
|
-
function
|
|
1034
|
-
return
|
|
1029
|
+
function rr(e, t, r) {
|
|
1030
|
+
return tr(e, t, r);
|
|
1035
1031
|
}
|
|
1036
1032
|
function Mo(e = {}) {
|
|
1037
|
-
const [t, r] =
|
|
1038
|
-
return
|
|
1033
|
+
const [t, r] = Un(nr, e);
|
|
1034
|
+
return rr(t, r, e);
|
|
1039
1035
|
}
|
|
1040
|
-
function
|
|
1036
|
+
function Vs(e = {}) {
|
|
1041
1037
|
var t = e, {
|
|
1042
1038
|
popover: r
|
|
1043
|
-
} = t, n =
|
|
1039
|
+
} = t, n = Fr(t, [
|
|
1044
1040
|
"popover"
|
|
1045
1041
|
]);
|
|
1046
|
-
const o =
|
|
1042
|
+
const o = Kn(
|
|
1047
1043
|
n.store,
|
|
1048
|
-
|
|
1044
|
+
qn(r, [
|
|
1049
1045
|
"arrowElement",
|
|
1050
1046
|
"anchorElement",
|
|
1051
1047
|
"contentElement",
|
|
@@ -1053,33 +1049,33 @@ function Is(e = {}) {
|
|
|
1053
1049
|
"disclosureElement"
|
|
1054
1050
|
])
|
|
1055
1051
|
);
|
|
1056
|
-
|
|
1057
|
-
const s = o == null ? void 0 : o.getState(), c =
|
|
1052
|
+
en(n, o);
|
|
1053
|
+
const s = o == null ? void 0 : o.getState(), c = nr(Te(ce({}, n), { store: o })), l = z(
|
|
1058
1054
|
n.placement,
|
|
1059
1055
|
s == null ? void 0 : s.placement,
|
|
1060
1056
|
"bottom"
|
|
1061
|
-
), a =
|
|
1057
|
+
), a = Te(ce({}, c.getState()), {
|
|
1062
1058
|
placement: l,
|
|
1063
1059
|
currentPlacement: l,
|
|
1064
|
-
anchorElement:
|
|
1065
|
-
popoverElement:
|
|
1066
|
-
arrowElement:
|
|
1060
|
+
anchorElement: z(s == null ? void 0 : s.anchorElement, null),
|
|
1061
|
+
popoverElement: z(s == null ? void 0 : s.popoverElement, null),
|
|
1062
|
+
arrowElement: z(s == null ? void 0 : s.arrowElement, null),
|
|
1067
1063
|
rendered: Symbol("rendered")
|
|
1068
1064
|
}), u = it(a, c, o);
|
|
1069
|
-
return
|
|
1065
|
+
return Te(ce(ce({}, c), u), {
|
|
1070
1066
|
setAnchorElement: (m) => u.setState("anchorElement", m),
|
|
1071
1067
|
setPopoverElement: (m) => u.setState("popoverElement", m),
|
|
1072
1068
|
setArrowElement: (m) => u.setState("arrowElement", m),
|
|
1073
1069
|
render: () => u.setState("rendered", Symbol("rendered"))
|
|
1074
1070
|
});
|
|
1075
1071
|
}
|
|
1076
|
-
function
|
|
1077
|
-
return
|
|
1072
|
+
function Hs(e, t, r) {
|
|
1073
|
+
return Ut(t, [r.popover]), re(e, r, "placement"), rr(e, t, r);
|
|
1078
1074
|
}
|
|
1079
|
-
var
|
|
1075
|
+
var Dn = Je(null), No = "span", or = ee(
|
|
1080
1076
|
function(t) {
|
|
1081
|
-
return t = W(
|
|
1082
|
-
style:
|
|
1077
|
+
return t = W(_({}, t), {
|
|
1078
|
+
style: _({
|
|
1083
1079
|
border: 0,
|
|
1084
1080
|
clip: "rect(0 0 0 0)",
|
|
1085
1081
|
height: "1px",
|
|
@@ -1094,25 +1090,25 @@ var Pn = Je(null), No = "span", rr = ee(
|
|
|
1094
1090
|
}
|
|
1095
1091
|
);
|
|
1096
1092
|
K(function(t) {
|
|
1097
|
-
const r =
|
|
1093
|
+
const r = or(t);
|
|
1098
1094
|
return Q(No, r);
|
|
1099
1095
|
});
|
|
1100
1096
|
var ko = "span", $o = ee(
|
|
1101
1097
|
function(t) {
|
|
1102
|
-
return t = W(
|
|
1098
|
+
return t = W(_({
|
|
1103
1099
|
"data-focus-trap": "",
|
|
1104
1100
|
tabIndex: 0,
|
|
1105
1101
|
"aria-hidden": !0
|
|
1106
1102
|
}, t), {
|
|
1107
|
-
style:
|
|
1103
|
+
style: _({
|
|
1108
1104
|
// Prevents unintended scroll jumps.
|
|
1109
1105
|
position: "fixed",
|
|
1110
1106
|
top: 0,
|
|
1111
1107
|
left: 0
|
|
1112
1108
|
}, t.style)
|
|
1113
|
-
}), t =
|
|
1109
|
+
}), t = or(t), t;
|
|
1114
1110
|
}
|
|
1115
|
-
),
|
|
1111
|
+
), vt = K(function(t) {
|
|
1116
1112
|
const r = $o(t);
|
|
1117
1113
|
return Q(ko, r);
|
|
1118
1114
|
}), Vo = "div";
|
|
@@ -1125,12 +1121,12 @@ function Bo(e, t) {
|
|
|
1125
1121
|
function Wo(e = "id") {
|
|
1126
1122
|
return `${e ? `${e}-` : ""}${Math.random().toString(36).slice(2, 8)}`;
|
|
1127
1123
|
}
|
|
1128
|
-
function
|
|
1124
|
+
function Ae(e) {
|
|
1129
1125
|
queueMicrotask(() => {
|
|
1130
1126
|
e == null || e.focus();
|
|
1131
1127
|
});
|
|
1132
1128
|
}
|
|
1133
|
-
var
|
|
1129
|
+
var ir = ee(function(t) {
|
|
1134
1130
|
var r = t, {
|
|
1135
1131
|
preserveTabOrder: n,
|
|
1136
1132
|
preserveTabOrderAnchor: o,
|
|
@@ -1144,10 +1140,10 @@ var or = ee(function(t) {
|
|
|
1144
1140
|
"portalRef",
|
|
1145
1141
|
"portal"
|
|
1146
1142
|
]);
|
|
1147
|
-
const u = Y(null), m = Be(u, a.ref), f =
|
|
1143
|
+
const u = Y(null), m = Be(u, a.ref), f = tn(Dn), [i, d] = le(null), [p, h] = le(
|
|
1148
1144
|
null
|
|
1149
|
-
), x = Y(null),
|
|
1150
|
-
return
|
|
1145
|
+
), x = Y(null), b = Y(null), w = Y(null), E = Y(null);
|
|
1146
|
+
return j(() => {
|
|
1151
1147
|
const g = u.current;
|
|
1152
1148
|
if (!g || !l) {
|
|
1153
1149
|
d(null);
|
|
@@ -1159,11 +1155,11 @@ var or = ee(function(t) {
|
|
|
1159
1155
|
return;
|
|
1160
1156
|
}
|
|
1161
1157
|
const O = v.isConnected;
|
|
1162
|
-
if (O || (f || Ho(g)).appendChild(v), v.id || (v.id = g.id ? `portal/${g.id}` : Wo()), d(v),
|
|
1158
|
+
if (O || (f || Ho(g)).appendChild(v), v.id || (v.id = g.id ? `portal/${g.id}` : Wo()), d(v), vn(c, v), !O)
|
|
1163
1159
|
return () => {
|
|
1164
|
-
v.remove(),
|
|
1160
|
+
v.remove(), vn(c, null);
|
|
1165
1161
|
};
|
|
1166
|
-
}, [l, s, f, c]),
|
|
1162
|
+
}, [l, s, f, c]), j(() => {
|
|
1167
1163
|
if (!l || !n || !o) return;
|
|
1168
1164
|
const v = G(o).createElement("span");
|
|
1169
1165
|
return v.style.position = "fixed", o.insertAdjacentElement("afterend", v), h(v), () => {
|
|
@@ -1176,9 +1172,9 @@ var or = ee(function(t) {
|
|
|
1176
1172
|
if (!nt(O)) return;
|
|
1177
1173
|
const S = O.type === "focusin";
|
|
1178
1174
|
if (cancelAnimationFrame(g), S)
|
|
1179
|
-
return
|
|
1175
|
+
return eo(i);
|
|
1180
1176
|
g = requestAnimationFrame(() => {
|
|
1181
|
-
|
|
1177
|
+
to(i, !0);
|
|
1182
1178
|
});
|
|
1183
1179
|
};
|
|
1184
1180
|
return i.addEventListener("focusin", v, !0), i.addEventListener("focusout", v, !0), () => {
|
|
@@ -1190,7 +1186,7 @@ var or = ee(function(t) {
|
|
|
1190
1186
|
if (g = // While the portal node is not in the DOM, we need to pass the
|
|
1191
1187
|
// current context to the portal context, otherwise it's going to
|
|
1192
1188
|
// reset to the body element on nested portals.
|
|
1193
|
-
/* @__PURE__ */ H(
|
|
1189
|
+
/* @__PURE__ */ H(Dn.Provider, { value: i || f, children: g }), !l) return g;
|
|
1194
1190
|
if (!i)
|
|
1195
1191
|
return /* @__PURE__ */ H(
|
|
1196
1192
|
"span",
|
|
@@ -1201,40 +1197,40 @@ var or = ee(function(t) {
|
|
|
1201
1197
|
hidden: !0
|
|
1202
1198
|
}
|
|
1203
1199
|
);
|
|
1204
|
-
g = /* @__PURE__ */
|
|
1200
|
+
g = /* @__PURE__ */ yt(bt, { children: [
|
|
1205
1201
|
n && i && /* @__PURE__ */ H(
|
|
1206
|
-
|
|
1202
|
+
vt,
|
|
1207
1203
|
{
|
|
1208
|
-
ref:
|
|
1204
|
+
ref: b,
|
|
1209
1205
|
"data-focus-trap": a.id,
|
|
1210
1206
|
className: "__focus-trap-inner-before",
|
|
1211
1207
|
onFocus: (O) => {
|
|
1212
|
-
nt(O, i) ?
|
|
1208
|
+
nt(O, i) ? Ae(Ft()) : Ae(x.current);
|
|
1213
1209
|
}
|
|
1214
1210
|
}
|
|
1215
1211
|
),
|
|
1216
1212
|
g,
|
|
1217
1213
|
n && i && /* @__PURE__ */ H(
|
|
1218
|
-
|
|
1214
|
+
vt,
|
|
1219
1215
|
{
|
|
1220
|
-
ref:
|
|
1216
|
+
ref: w,
|
|
1221
1217
|
"data-focus-trap": a.id,
|
|
1222
1218
|
className: "__focus-trap-inner-after",
|
|
1223
1219
|
onFocus: (O) => {
|
|
1224
|
-
nt(O, i) ?
|
|
1220
|
+
nt(O, i) ? Ae(yn()) : Ae(E.current);
|
|
1225
1221
|
}
|
|
1226
1222
|
}
|
|
1227
1223
|
)
|
|
1228
|
-
] }), i && (g =
|
|
1229
|
-
let v = /* @__PURE__ */
|
|
1224
|
+
] }), i && (g = Et.createPortal(g, i));
|
|
1225
|
+
let v = /* @__PURE__ */ yt(bt, { children: [
|
|
1230
1226
|
n && i && /* @__PURE__ */ H(
|
|
1231
|
-
|
|
1227
|
+
vt,
|
|
1232
1228
|
{
|
|
1233
1229
|
ref: x,
|
|
1234
1230
|
"data-focus-trap": a.id,
|
|
1235
1231
|
className: "__focus-trap-outer-before",
|
|
1236
1232
|
onFocus: (O) => {
|
|
1237
|
-
!(O.relatedTarget === E.current) && nt(O, i) ?
|
|
1233
|
+
!(O.relatedTarget === E.current) && nt(O, i) ? Ae(b.current) : Ae(yn());
|
|
1238
1234
|
}
|
|
1239
1235
|
}
|
|
1240
1236
|
),
|
|
@@ -1242,65 +1238,65 @@ var or = ee(function(t) {
|
|
|
1242
1238
|
// add margin to the element when setting gap on a parent element.
|
|
1243
1239
|
/* @__PURE__ */ H("span", { "aria-owns": i == null ? void 0 : i.id, style: { position: "fixed" } }),
|
|
1244
1240
|
n && i && /* @__PURE__ */ H(
|
|
1245
|
-
|
|
1241
|
+
vt,
|
|
1246
1242
|
{
|
|
1247
1243
|
ref: E,
|
|
1248
1244
|
"data-focus-trap": a.id,
|
|
1249
1245
|
className: "__focus-trap-outer-after",
|
|
1250
1246
|
onFocus: (O) => {
|
|
1251
1247
|
if (nt(O, i))
|
|
1252
|
-
|
|
1248
|
+
Ae(w.current);
|
|
1253
1249
|
else {
|
|
1254
|
-
const S =
|
|
1255
|
-
if (S ===
|
|
1250
|
+
const S = Ft();
|
|
1251
|
+
if (S === b.current) {
|
|
1256
1252
|
requestAnimationFrame(() => {
|
|
1257
1253
|
var $;
|
|
1258
|
-
return ($ =
|
|
1254
|
+
return ($ = Ft()) == null ? void 0 : $.focus();
|
|
1259
1255
|
});
|
|
1260
1256
|
return;
|
|
1261
1257
|
}
|
|
1262
|
-
|
|
1258
|
+
Ae(S);
|
|
1263
1259
|
}
|
|
1264
1260
|
}
|
|
1265
1261
|
}
|
|
1266
1262
|
)
|
|
1267
1263
|
] });
|
|
1268
|
-
return p && n && (v =
|
|
1264
|
+
return p && n && (v = Et.createPortal(
|
|
1269
1265
|
v,
|
|
1270
1266
|
p
|
|
1271
|
-
)), /* @__PURE__ */
|
|
1267
|
+
)), /* @__PURE__ */ yt(bt, { children: [
|
|
1272
1268
|
v,
|
|
1273
1269
|
g
|
|
1274
1270
|
] });
|
|
1275
1271
|
},
|
|
1276
1272
|
[i, f, l, a.id, n, p]
|
|
1277
|
-
), a = W(
|
|
1273
|
+
), a = W(_({}, a), {
|
|
1278
1274
|
ref: m
|
|
1279
1275
|
}), a;
|
|
1280
1276
|
});
|
|
1281
1277
|
K(function(t) {
|
|
1282
|
-
const r =
|
|
1278
|
+
const r = ir(t);
|
|
1283
1279
|
return Q(Vo, r);
|
|
1284
1280
|
});
|
|
1285
|
-
var
|
|
1286
|
-
function
|
|
1287
|
-
const r =
|
|
1281
|
+
var Cn = Je(0);
|
|
1282
|
+
function zo({ level: e, children: t }) {
|
|
1283
|
+
const r = tn(Cn), n = Math.max(
|
|
1288
1284
|
Math.min(e || r + 1, 6),
|
|
1289
1285
|
1
|
|
1290
1286
|
);
|
|
1291
|
-
return /* @__PURE__ */ H(
|
|
1287
|
+
return /* @__PURE__ */ H(Cn.Provider, { value: n, children: t });
|
|
1292
1288
|
}
|
|
1293
|
-
var
|
|
1289
|
+
var jo = "div", sr = ee(function(t) {
|
|
1294
1290
|
var r = t, { autoFocusOnShow: n = !0 } = r, o = se(r, ["autoFocusOnShow"]);
|
|
1295
1291
|
return o = fe(
|
|
1296
1292
|
o,
|
|
1297
|
-
(s) => /* @__PURE__ */ H(
|
|
1293
|
+
(s) => /* @__PURE__ */ H(no.Provider, { value: n, children: s }),
|
|
1298
1294
|
[n]
|
|
1299
1295
|
), o;
|
|
1300
1296
|
});
|
|
1301
1297
|
K(function(t) {
|
|
1302
|
-
const r =
|
|
1303
|
-
return Q(
|
|
1298
|
+
const r = sr(t);
|
|
1299
|
+
return Q(jo, r);
|
|
1304
1300
|
});
|
|
1305
1301
|
function Ko(e, t) {
|
|
1306
1302
|
const n = G(e).createElement("button");
|
|
@@ -1325,15 +1321,15 @@ function qo(e) {
|
|
|
1325
1321
|
t.current = null;
|
|
1326
1322
|
return;
|
|
1327
1323
|
}
|
|
1328
|
-
return
|
|
1324
|
+
return Qt("mousedown", (n) => {
|
|
1329
1325
|
t.current = n.target;
|
|
1330
1326
|
}, !0);
|
|
1331
1327
|
}, [e]), t;
|
|
1332
1328
|
}
|
|
1333
|
-
var
|
|
1334
|
-
function
|
|
1335
|
-
|
|
1336
|
-
const n =
|
|
1329
|
+
var Lt = /* @__PURE__ */ new WeakMap();
|
|
1330
|
+
function ut(e, t, r) {
|
|
1331
|
+
Lt.has(e) || Lt.set(e, /* @__PURE__ */ new Map());
|
|
1332
|
+
const n = Lt.get(e), o = n.get(t);
|
|
1337
1333
|
if (!o)
|
|
1338
1334
|
return n.set(t, r()), () => {
|
|
1339
1335
|
var l;
|
|
@@ -1346,8 +1342,8 @@ function ct(e, t, r) {
|
|
|
1346
1342
|
n.get(t) === c && (s(), n.set(t, o));
|
|
1347
1343
|
};
|
|
1348
1344
|
}
|
|
1349
|
-
function
|
|
1350
|
-
return
|
|
1345
|
+
function rn(e, t, r) {
|
|
1346
|
+
return ut(e, t, () => {
|
|
1351
1347
|
const o = e.getAttribute(t);
|
|
1352
1348
|
return e.setAttribute(t, r), () => {
|
|
1353
1349
|
o == null ? e.removeAttribute(t) : e.setAttribute(t, o);
|
|
@@ -1355,15 +1351,15 @@ function nn(e, t, r) {
|
|
|
1355
1351
|
});
|
|
1356
1352
|
}
|
|
1357
1353
|
function Ve(e, t, r) {
|
|
1358
|
-
return
|
|
1354
|
+
return ut(e, t, () => {
|
|
1359
1355
|
const o = t in e, s = e[t];
|
|
1360
1356
|
return e[t] = r, () => {
|
|
1361
1357
|
o ? e[t] = s : delete e[t];
|
|
1362
1358
|
};
|
|
1363
1359
|
});
|
|
1364
1360
|
}
|
|
1365
|
-
function
|
|
1366
|
-
return e ?
|
|
1361
|
+
function Bt(e, t) {
|
|
1362
|
+
return e ? ut(e, "style", () => {
|
|
1367
1363
|
const n = e.style.cssText;
|
|
1368
1364
|
return Object.assign(e.style, t), () => {
|
|
1369
1365
|
e.style.cssText = n;
|
|
@@ -1372,7 +1368,7 @@ function Ht(e, t) {
|
|
|
1372
1368
|
};
|
|
1373
1369
|
}
|
|
1374
1370
|
function Uo(e, t, r) {
|
|
1375
|
-
return e ?
|
|
1371
|
+
return e ? ut(e, t, () => {
|
|
1376
1372
|
const o = e.style.getPropertyValue(t);
|
|
1377
1373
|
return e.style.setProperty(t, r), () => {
|
|
1378
1374
|
o ? e.style.setProperty(t, o) : e.style.removeProperty(t);
|
|
@@ -1381,11 +1377,11 @@ function Uo(e, t, r) {
|
|
|
1381
1377
|
};
|
|
1382
1378
|
}
|
|
1383
1379
|
var Yo = ["SCRIPT", "STYLE"];
|
|
1384
|
-
function
|
|
1380
|
+
function Wt(e) {
|
|
1385
1381
|
return `__ariakit-dialog-snapshot-${e}`;
|
|
1386
1382
|
}
|
|
1387
1383
|
function Go(e, t) {
|
|
1388
|
-
const r = G(t), n =
|
|
1384
|
+
const r = G(t), n = Wt(e);
|
|
1389
1385
|
if (!r.body[n]) return !0;
|
|
1390
1386
|
do {
|
|
1391
1387
|
if (t === r.body) return !1;
|
|
@@ -1399,7 +1395,7 @@ function Xo(e, t, r) {
|
|
|
1399
1395
|
(n) => n && de(t, n)
|
|
1400
1396
|
);
|
|
1401
1397
|
}
|
|
1402
|
-
function
|
|
1398
|
+
function on(e, t, r, n) {
|
|
1403
1399
|
for (let o of t) {
|
|
1404
1400
|
if (!(o != null && o.isConnected)) continue;
|
|
1405
1401
|
const s = t.some((a) => !a || a === o ? !1 : a.contains(o)), c = G(o), l = o;
|
|
@@ -1413,14 +1409,14 @@ function rn(e, t, r, n) {
|
|
|
1413
1409
|
}
|
|
1414
1410
|
function Jo(e, t) {
|
|
1415
1411
|
const { body: r } = G(t[0]), n = [];
|
|
1416
|
-
return
|
|
1417
|
-
n.push(Ve(s,
|
|
1418
|
-
}), De(Ve(r,
|
|
1412
|
+
return on(e, t, (s) => {
|
|
1413
|
+
n.push(Ve(s, Wt(e), !0));
|
|
1414
|
+
}), De(Ve(r, Wt(e), !0), () => {
|
|
1419
1415
|
for (const s of n)
|
|
1420
1416
|
s();
|
|
1421
1417
|
});
|
|
1422
1418
|
}
|
|
1423
|
-
function
|
|
1419
|
+
function ar(e, ...t) {
|
|
1424
1420
|
if (!e) return !1;
|
|
1425
1421
|
const r = e.getAttribute("data-backdrop");
|
|
1426
1422
|
return r == null ? !1 : r === "" || r === "true" || !t.length ? !0 : t.some((n) => r === n);
|
|
@@ -1434,13 +1430,13 @@ function Zo(e, t = "") {
|
|
|
1434
1430
|
Ve(e, Ge(t), !0)
|
|
1435
1431
|
);
|
|
1436
1432
|
}
|
|
1437
|
-
function
|
|
1433
|
+
function cr(e, t = "") {
|
|
1438
1434
|
return De(
|
|
1439
1435
|
Ve(e, Ge("", !0), !0),
|
|
1440
1436
|
Ve(e, Ge(t, !0), !0)
|
|
1441
1437
|
);
|
|
1442
1438
|
}
|
|
1443
|
-
function
|
|
1439
|
+
function sn(e, t) {
|
|
1444
1440
|
const r = Ge(t, !0);
|
|
1445
1441
|
if (e[r]) return !0;
|
|
1446
1442
|
const n = Ge(t);
|
|
@@ -1452,14 +1448,14 @@ function on(e, t) {
|
|
|
1452
1448
|
}
|
|
1453
1449
|
function An(e, t) {
|
|
1454
1450
|
const r = [], n = t.map((s) => s == null ? void 0 : s.id);
|
|
1455
|
-
return
|
|
1451
|
+
return on(
|
|
1456
1452
|
e,
|
|
1457
1453
|
t,
|
|
1458
1454
|
(s) => {
|
|
1459
|
-
|
|
1455
|
+
ar(s, ...n) || r.unshift(Zo(s, e));
|
|
1460
1456
|
},
|
|
1461
1457
|
(s, c) => {
|
|
1462
|
-
c.hasAttribute("data-dialog") && c.id !== e || r.unshift(
|
|
1458
|
+
c.hasAttribute("data-dialog") && c.id !== e || r.unshift(cr(s, e));
|
|
1463
1459
|
}
|
|
1464
1460
|
), () => {
|
|
1465
1461
|
for (const s of r)
|
|
@@ -1485,7 +1481,7 @@ function ti(e, t) {
|
|
|
1485
1481
|
const r = t.getBoundingClientRect();
|
|
1486
1482
|
return r.width === 0 || r.height === 0 ? !1 : r.top <= e.clientY && e.clientY <= r.top + r.height && r.left <= e.clientX && e.clientX <= r.left + r.width;
|
|
1487
1483
|
}
|
|
1488
|
-
function
|
|
1484
|
+
function Mt({
|
|
1489
1485
|
store: e,
|
|
1490
1486
|
type: t,
|
|
1491
1487
|
listener: r,
|
|
@@ -1493,7 +1489,7 @@ function Lt({
|
|
|
1493
1489
|
domReady: o
|
|
1494
1490
|
}) {
|
|
1495
1491
|
const s = ue(r), c = he(e, "open"), l = Y(!1);
|
|
1496
|
-
|
|
1492
|
+
j(() => {
|
|
1497
1493
|
if (!c || !o) return;
|
|
1498
1494
|
const { contentElement: a } = e.getState();
|
|
1499
1495
|
if (!a) return;
|
|
@@ -1501,38 +1497,38 @@ function Lt({
|
|
|
1501
1497
|
l.current = !0;
|
|
1502
1498
|
};
|
|
1503
1499
|
return a.addEventListener("focusin", u, !0), () => a.removeEventListener("focusin", u, !0);
|
|
1504
|
-
}, [e, c, o]), U(() => c ?
|
|
1500
|
+
}, [e, c, o]), U(() => c ? Qt(t, (u) => {
|
|
1505
1501
|
const { contentElement: m, disclosureElement: f } = e.getState(), i = u.target;
|
|
1506
|
-
!m || !i || !Qo(i) || de(m, i) || ei(f, i) || i.hasAttribute("data-focus-trap") || ti(u, m) || l.current && !
|
|
1502
|
+
!m || !i || !Qo(i) || de(m, i) || ei(f, i) || i.hasAttribute("data-focus-trap") || ti(u, m) || l.current && !sn(i, m.id) || ro(i) || s(u);
|
|
1507
1503
|
}, n) : void 0, [c, n]);
|
|
1508
1504
|
}
|
|
1509
|
-
function
|
|
1505
|
+
function Nt(e, t) {
|
|
1510
1506
|
return typeof e == "function" ? e(t) : !!e;
|
|
1511
1507
|
}
|
|
1512
1508
|
function ni(e, t, r) {
|
|
1513
1509
|
const n = he(e, "open"), o = qo(n), s = { store: e, domReady: r, capture: !0 };
|
|
1514
|
-
|
|
1510
|
+
Mt(W(_({}, s), {
|
|
1515
1511
|
type: "click",
|
|
1516
1512
|
listener: (c) => {
|
|
1517
1513
|
const { contentElement: l } = e.getState(), a = o.current;
|
|
1518
|
-
a &&
|
|
1514
|
+
a && Lr(a) && sn(a, l == null ? void 0 : l.id) && Nt(t, c) && e.hide();
|
|
1519
1515
|
}
|
|
1520
|
-
})),
|
|
1516
|
+
})), Mt(W(_({}, s), {
|
|
1521
1517
|
type: "focusin",
|
|
1522
1518
|
listener: (c) => {
|
|
1523
1519
|
const { contentElement: l } = e.getState();
|
|
1524
|
-
l && c.target !== G(l) &&
|
|
1520
|
+
l && c.target !== G(l) && Nt(t, c) && e.hide();
|
|
1525
1521
|
}
|
|
1526
|
-
})),
|
|
1522
|
+
})), Mt(W(_({}, s), {
|
|
1527
1523
|
type: "contextmenu",
|
|
1528
1524
|
listener: (c) => {
|
|
1529
|
-
|
|
1525
|
+
Nt(t, c) && e.hide();
|
|
1530
1526
|
}
|
|
1531
1527
|
}));
|
|
1532
1528
|
}
|
|
1533
1529
|
var Tn = Je({});
|
|
1534
1530
|
function ri(e) {
|
|
1535
|
-
const t =
|
|
1531
|
+
const t = tn(Tn), [r, n] = le([]), o = st(
|
|
1536
1532
|
(l) => {
|
|
1537
1533
|
var a;
|
|
1538
1534
|
return n((u) => [...u, l]), De((a = t.add) == null ? void 0 : a.call(t, l), () => {
|
|
@@ -1541,12 +1537,12 @@ function ri(e) {
|
|
|
1541
1537
|
},
|
|
1542
1538
|
[t]
|
|
1543
1539
|
);
|
|
1544
|
-
|
|
1540
|
+
j(() => xt(e, ["open", "contentElement"], (l) => {
|
|
1545
1541
|
var a;
|
|
1546
1542
|
if (l.open && l.contentElement)
|
|
1547
1543
|
return (a = t.add) == null ? void 0 : a.call(t, e);
|
|
1548
1544
|
}), [e, t]);
|
|
1549
|
-
const s =
|
|
1545
|
+
const s = Gn(() => ({ store: e, add: o }), [e, o]);
|
|
1550
1546
|
return { wrapElement: st(
|
|
1551
1547
|
(l) => /* @__PURE__ */ H(Tn.Provider, { value: s, children: l }),
|
|
1552
1548
|
[s]
|
|
@@ -1558,7 +1554,7 @@ function oi({
|
|
|
1558
1554
|
contentElement: r,
|
|
1559
1555
|
enabled: n
|
|
1560
1556
|
}) {
|
|
1561
|
-
const [o, s] =
|
|
1557
|
+
const [o, s] = Mr(), c = st(() => {
|
|
1562
1558
|
if (!n || !r) return !1;
|
|
1563
1559
|
const { body: l } = G(r), a = l.getAttribute(e);
|
|
1564
1560
|
return !a || a === t;
|
|
@@ -1568,7 +1564,7 @@ function oi({
|
|
|
1568
1564
|
const { body: l } = G(r);
|
|
1569
1565
|
if (c())
|
|
1570
1566
|
return l.setAttribute(e, t), () => l.removeAttribute(e);
|
|
1571
|
-
const a = new MutationObserver(() =>
|
|
1567
|
+
const a = new MutationObserver(() => Et.flushSync(s));
|
|
1572
1568
|
return a.observe(l, { attributeFilter: [e] }), () => a.disconnect();
|
|
1573
1569
|
}, [o, n, t, r, c, e]), c;
|
|
1574
1570
|
}
|
|
@@ -1585,27 +1581,27 @@ function si(e, t, r) {
|
|
|
1585
1581
|
});
|
|
1586
1582
|
U(() => {
|
|
1587
1583
|
if (!n() || !e) return;
|
|
1588
|
-
const o = G(e), s =
|
|
1584
|
+
const o = G(e), s = Wn(e), { documentElement: c, body: l } = o, a = c.style.getPropertyValue("--scrollbar-width"), u = a ? Number.parseInt(a) : s.innerWidth - c.clientWidth, m = () => Uo(
|
|
1589
1585
|
c,
|
|
1590
1586
|
"--scrollbar-width",
|
|
1591
1587
|
`${u}px`
|
|
1592
|
-
), f = ii(c), i = () =>
|
|
1588
|
+
), f = ii(c), i = () => Bt(l, {
|
|
1593
1589
|
overflow: "hidden",
|
|
1594
1590
|
[f]: `${u}px`
|
|
1595
1591
|
}), d = () => {
|
|
1596
1592
|
var h, x;
|
|
1597
|
-
const { scrollX:
|
|
1593
|
+
const { scrollX: b, scrollY: w, visualViewport: E } = s, g = (h = E == null ? void 0 : E.offsetLeft) != null ? h : 0, v = (x = E == null ? void 0 : E.offsetTop) != null ? x : 0, O = Bt(l, {
|
|
1598
1594
|
position: "fixed",
|
|
1599
1595
|
overflow: "hidden",
|
|
1600
|
-
top: `${-(
|
|
1601
|
-
left: `${-(
|
|
1596
|
+
top: `${-(w - Math.floor(v))}px`,
|
|
1597
|
+
left: `${-(b - Math.floor(g))}px`,
|
|
1602
1598
|
right: "0",
|
|
1603
1599
|
[f]: `${u}px`
|
|
1604
1600
|
});
|
|
1605
1601
|
return () => {
|
|
1606
|
-
O(), process.env.NODE_ENV !== "test" && s.scrollTo({ left:
|
|
1602
|
+
O(), process.env.NODE_ENV !== "test" && s.scrollTo({ left: b, top: w, behavior: "instant" });
|
|
1607
1603
|
};
|
|
1608
|
-
}, p =
|
|
1604
|
+
}, p = Nr() && !kr();
|
|
1609
1605
|
return De(
|
|
1610
1606
|
m(),
|
|
1611
1607
|
p ? d() : i()
|
|
@@ -1617,27 +1613,27 @@ function ai(e, ...t) {
|
|
|
1617
1613
|
const r = e.getAttribute("data-focus-trap");
|
|
1618
1614
|
return r == null ? !1 : t.length ? r === "" ? !1 : t.some((n) => r === n) : !0;
|
|
1619
1615
|
}
|
|
1620
|
-
function
|
|
1616
|
+
function ur() {
|
|
1621
1617
|
return "inert" in HTMLElement.prototype;
|
|
1622
1618
|
}
|
|
1623
1619
|
function ci(e) {
|
|
1624
|
-
return
|
|
1620
|
+
return rn(e, "aria-hidden", "true");
|
|
1625
1621
|
}
|
|
1626
|
-
function
|
|
1627
|
-
if (!("style" in e)) return
|
|
1628
|
-
if (
|
|
1622
|
+
function lr(e, t) {
|
|
1623
|
+
if (!("style" in e)) return Rt;
|
|
1624
|
+
if (ur())
|
|
1629
1625
|
return Ve(e, "inert", !0);
|
|
1630
|
-
const n =
|
|
1631
|
-
if (t != null && t.some((c) => c && de(c, o))) return
|
|
1632
|
-
const s =
|
|
1626
|
+
const n = oo(e, !0).map((o) => {
|
|
1627
|
+
if (t != null && t.some((c) => c && de(c, o))) return Rt;
|
|
1628
|
+
const s = ut(o, "focus", () => (o.focus = Rt, () => {
|
|
1633
1629
|
delete o.focus;
|
|
1634
1630
|
}));
|
|
1635
|
-
return De(
|
|
1631
|
+
return De(rn(o, "tabindex", "-1"), s);
|
|
1636
1632
|
});
|
|
1637
1633
|
return De(
|
|
1638
1634
|
...n,
|
|
1639
1635
|
ci(e),
|
|
1640
|
-
|
|
1636
|
+
Bt(e, {
|
|
1641
1637
|
pointerEvents: "none",
|
|
1642
1638
|
userSelect: "none",
|
|
1643
1639
|
cursor: "default"
|
|
@@ -1646,14 +1642,14 @@ function ur(e, t) {
|
|
|
1646
1642
|
}
|
|
1647
1643
|
function ui(e, t) {
|
|
1648
1644
|
const r = [], n = t.map((s) => s == null ? void 0 : s.id);
|
|
1649
|
-
return
|
|
1645
|
+
return on(
|
|
1650
1646
|
e,
|
|
1651
1647
|
t,
|
|
1652
1648
|
(s) => {
|
|
1653
|
-
|
|
1649
|
+
ar(s, ...n) || ai(s, ...n) || r.unshift(lr(s, t));
|
|
1654
1650
|
},
|
|
1655
1651
|
(s) => {
|
|
1656
|
-
s.hasAttribute("role") && (t.some((c) => c && de(c, s)) || r.unshift(
|
|
1652
|
+
s.hasAttribute("role") && (t.some((c) => c && de(c, s)) || r.unshift(rn(s, "role", "none")));
|
|
1657
1653
|
}
|
|
1658
1654
|
), () => {
|
|
1659
1655
|
for (const s of r)
|
|
@@ -1694,14 +1690,14 @@ ee(
|
|
|
1694
1690
|
return t;
|
|
1695
1691
|
}
|
|
1696
1692
|
);
|
|
1697
|
-
var
|
|
1693
|
+
var zt = K(
|
|
1698
1694
|
// @ts-expect-error
|
|
1699
1695
|
function(t) {
|
|
1700
1696
|
return Q(li, t);
|
|
1701
1697
|
}
|
|
1702
1698
|
);
|
|
1703
1699
|
Object.assign(
|
|
1704
|
-
|
|
1700
|
+
zt,
|
|
1705
1701
|
fi.reduce((e, t) => (e[t] = K(function(n) {
|
|
1706
1702
|
return Q(t, n);
|
|
1707
1703
|
}), e), {})
|
|
@@ -1716,14 +1712,14 @@ function di({
|
|
|
1716
1712
|
U(() => {
|
|
1717
1713
|
const u = o.current, m = c;
|
|
1718
1714
|
u && m && (u.style.zIndex = getComputedStyle(m).zIndex);
|
|
1719
|
-
}, [c]),
|
|
1715
|
+
}, [c]), j(() => {
|
|
1720
1716
|
const u = c == null ? void 0 : c.id;
|
|
1721
1717
|
if (!u) return;
|
|
1722
1718
|
const m = o.current;
|
|
1723
1719
|
if (m)
|
|
1724
|
-
return
|
|
1720
|
+
return cr(m, u);
|
|
1725
1721
|
}, [c]);
|
|
1726
|
-
const l =
|
|
1722
|
+
const l = nn({
|
|
1727
1723
|
ref: o,
|
|
1728
1724
|
store: s,
|
|
1729
1725
|
role: "presentation",
|
|
@@ -1739,22 +1735,22 @@ function di({
|
|
|
1739
1735
|
}
|
|
1740
1736
|
});
|
|
1741
1737
|
if (!t) return null;
|
|
1742
|
-
if (
|
|
1743
|
-
return /* @__PURE__ */ H(
|
|
1738
|
+
if (uo(t))
|
|
1739
|
+
return /* @__PURE__ */ H(zt, W(_({}, l), { render: t }));
|
|
1744
1740
|
const a = typeof t != "boolean" ? t : "div";
|
|
1745
|
-
return /* @__PURE__ */ H(
|
|
1741
|
+
return /* @__PURE__ */ H(zt, W(_({}, l), { render: /* @__PURE__ */ H(a, {}) }));
|
|
1746
1742
|
}
|
|
1747
|
-
var mi = "div", _n =
|
|
1743
|
+
var mi = "div", _n = Br();
|
|
1748
1744
|
function pi(e) {
|
|
1749
|
-
const t =
|
|
1745
|
+
const t = Xt();
|
|
1750
1746
|
return !t || e && de(e, t) ? !1 : !!ot(t);
|
|
1751
1747
|
}
|
|
1752
|
-
function
|
|
1748
|
+
function Rn(e, t = !1) {
|
|
1753
1749
|
if (!e) return null;
|
|
1754
1750
|
const r = "current" in e ? e.current : e;
|
|
1755
1751
|
return r ? t ? ot(r) ? r : null : r : null;
|
|
1756
1752
|
}
|
|
1757
|
-
var
|
|
1753
|
+
var fr = ee(function(t) {
|
|
1758
1754
|
var r = t, {
|
|
1759
1755
|
store: n,
|
|
1760
1756
|
open: o,
|
|
@@ -1770,8 +1766,8 @@ var lr = ee(function(t) {
|
|
|
1770
1766
|
autoFocusOnShow: p = !0,
|
|
1771
1767
|
autoFocusOnHide: h = !0,
|
|
1772
1768
|
initialFocus: x,
|
|
1773
|
-
finalFocus:
|
|
1774
|
-
unmountOnHide:
|
|
1769
|
+
finalFocus: b,
|
|
1770
|
+
unmountOnHide: w,
|
|
1775
1771
|
unstable_treeSnapshotKey: E
|
|
1776
1772
|
} = r, g = se(r, [
|
|
1777
1773
|
"store",
|
|
@@ -1792,7 +1788,7 @@ var lr = ee(function(t) {
|
|
|
1792
1788
|
"unmountOnHide",
|
|
1793
1789
|
"unstable_treeSnapshotKey"
|
|
1794
1790
|
]);
|
|
1795
|
-
const v =
|
|
1791
|
+
const v = Dt(), O = Y(null), S = Mo({
|
|
1796
1792
|
store: n || v,
|
|
1797
1793
|
open: o,
|
|
1798
1794
|
setOpen(P) {
|
|
@@ -1802,37 +1798,37 @@ var lr = ee(function(t) {
|
|
|
1802
1798
|
const X = new Event("close", { bubbles: !1, cancelable: !0 });
|
|
1803
1799
|
s && F.addEventListener("close", s, { once: !0 }), F.dispatchEvent(X), X.defaultPrevented && S.setOpen(!0);
|
|
1804
1800
|
}
|
|
1805
|
-
}), { portalRef: $, domReady:
|
|
1801
|
+
}), { portalRef: $, domReady: C } = zn(a, g.portalRef), R = g.preserveTabOrder, B = he(
|
|
1806
1802
|
S,
|
|
1807
1803
|
(P) => R && !l && P.mounted
|
|
1808
|
-
), L =
|
|
1809
|
-
si(
|
|
1804
|
+
), L = Yt(g.id), y = he(S, "open"), D = he(S, "mounted"), A = he(S, "contentElement"), M = Qn(D, g.hidden, g.alwaysVisible);
|
|
1805
|
+
si(A, L, d && !M), ni(S, f, C);
|
|
1810
1806
|
const { wrapElement: I, nestedDialogs: V } = ri(S);
|
|
1811
|
-
g = fe(g, I, [I]),
|
|
1807
|
+
g = fe(g, I, [I]), j(() => {
|
|
1812
1808
|
if (!y) return;
|
|
1813
|
-
const P = O.current, F =
|
|
1809
|
+
const P = O.current, F = Xt(P, !0);
|
|
1814
1810
|
F && F.tagName !== "BODY" && (P && de(P, F) || S.setDisclosureElement(F));
|
|
1815
1811
|
}, [S, y]), _n && U(() => {
|
|
1816
1812
|
if (!D) return;
|
|
1817
1813
|
const { disclosureElement: P } = S.getState();
|
|
1818
|
-
if (!P ||
|
|
1814
|
+
if (!P || !Vt(P)) return;
|
|
1819
1815
|
const F = () => {
|
|
1820
1816
|
let X = !1;
|
|
1821
1817
|
const N = () => {
|
|
1822
1818
|
X = !0;
|
|
1823
1819
|
}, ne = { capture: !0, once: !0 };
|
|
1824
|
-
P.addEventListener("focusin", N, ne),
|
|
1825
|
-
P.removeEventListener("focusin", N, !0), !X &&
|
|
1820
|
+
P.addEventListener("focusin", N, ne), Hr(P, "mouseup", () => {
|
|
1821
|
+
P.removeEventListener("focusin", N, !0), !X && so(P);
|
|
1826
1822
|
});
|
|
1827
1823
|
};
|
|
1828
1824
|
return P.addEventListener("mousedown", F), () => {
|
|
1829
1825
|
P.removeEventListener("mousedown", F);
|
|
1830
1826
|
};
|
|
1831
1827
|
}, [S, D]), U(() => {
|
|
1832
|
-
if (!D || !
|
|
1828
|
+
if (!D || !C) return;
|
|
1833
1829
|
const P = O.current;
|
|
1834
1830
|
if (!P) return;
|
|
1835
|
-
const F =
|
|
1831
|
+
const F = Wn(P), X = F.visualViewport || F, N = () => {
|
|
1836
1832
|
var ne, ve;
|
|
1837
1833
|
const tt = (ve = (ne = F.visualViewport) == null ? void 0 : ne.height) != null ? ve : F.innerHeight;
|
|
1838
1834
|
P.style.setProperty("--dialog-viewport-height", `${tt}px`);
|
|
@@ -1840,26 +1836,26 @@ var lr = ee(function(t) {
|
|
|
1840
1836
|
return N(), X.addEventListener("resize", N), () => {
|
|
1841
1837
|
X.removeEventListener("resize", N);
|
|
1842
1838
|
};
|
|
1843
|
-
}, [D,
|
|
1844
|
-
if (!l || !D || !
|
|
1839
|
+
}, [D, C]), U(() => {
|
|
1840
|
+
if (!l || !D || !C) return;
|
|
1845
1841
|
const P = O.current;
|
|
1846
1842
|
if (!(!P || P.querySelector("[data-dialog-dismiss]")))
|
|
1847
1843
|
return Ko(P, S.hide);
|
|
1848
|
-
}, [S, l, D,
|
|
1849
|
-
if (!
|
|
1844
|
+
}, [S, l, D, C]), j(() => {
|
|
1845
|
+
if (!ur() || y || !D || !C) return;
|
|
1850
1846
|
const P = O.current;
|
|
1851
1847
|
if (P)
|
|
1852
|
-
return
|
|
1853
|
-
}, [y, D,
|
|
1854
|
-
const
|
|
1855
|
-
|
|
1856
|
-
if (!L || !
|
|
1848
|
+
return lr(P);
|
|
1849
|
+
}, [y, D, C]);
|
|
1850
|
+
const T = y && C;
|
|
1851
|
+
j(() => {
|
|
1852
|
+
if (!L || !T) return;
|
|
1857
1853
|
const P = O.current;
|
|
1858
1854
|
return Jo(L, [P]);
|
|
1859
|
-
}, [L,
|
|
1855
|
+
}, [L, T, E]);
|
|
1860
1856
|
const k = ue(i);
|
|
1861
|
-
|
|
1862
|
-
if (!L || !
|
|
1857
|
+
j(() => {
|
|
1858
|
+
if (!L || !T) return;
|
|
1863
1859
|
const { disclosureElement: P } = S.getState(), F = O.current, X = k() || [], N = [
|
|
1864
1860
|
F,
|
|
1865
1861
|
...X,
|
|
@@ -1872,7 +1868,7 @@ var lr = ee(function(t) {
|
|
|
1872
1868
|
}, [
|
|
1873
1869
|
L,
|
|
1874
1870
|
S,
|
|
1875
|
-
|
|
1871
|
+
T,
|
|
1876
1872
|
k,
|
|
1877
1873
|
V,
|
|
1878
1874
|
l,
|
|
@@ -1880,33 +1876,33 @@ var lr = ee(function(t) {
|
|
|
1880
1876
|
]);
|
|
1881
1877
|
const q = !!p, We = rt(p), [et, ae] = le(!1);
|
|
1882
1878
|
U(() => {
|
|
1883
|
-
if (!y || !q || !
|
|
1884
|
-
const P =
|
|
1879
|
+
if (!y || !q || !C || !(A != null && A.isConnected)) return;
|
|
1880
|
+
const P = Rn(x, !0) || // If no initial focus is specified, we try to focus the first element
|
|
1885
1881
|
// with the autofocus attribute. If it's an Ariakit component, the
|
|
1886
1882
|
// Focusable component will consume the autoFocus prop and add the
|
|
1887
1883
|
// data-autofocus attribute to the element instead.
|
|
1888
|
-
|
|
1884
|
+
A.querySelector(
|
|
1889
1885
|
"[data-autofocus=true],[autofocus]"
|
|
1890
1886
|
) || // We have to fallback to the first focusable element otherwise portaled
|
|
1891
1887
|
// dialogs with preserveTabOrder set to true will not receive focus
|
|
1892
1888
|
// properly because the elements aren't tabbable until the dialog receives
|
|
1893
1889
|
// focus.
|
|
1894
|
-
|
|
1895
|
-
|
|
1890
|
+
io(A, !0, a && B) || // Finally, we fallback to the dialog element itself.
|
|
1891
|
+
A, F = ot(P);
|
|
1896
1892
|
We(F ? P : null) && (ae(!0), queueMicrotask(() => {
|
|
1897
1893
|
P.focus(), _n && F && P.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
1898
1894
|
}));
|
|
1899
1895
|
}, [
|
|
1900
1896
|
y,
|
|
1901
1897
|
q,
|
|
1898
|
+
C,
|
|
1902
1899
|
A,
|
|
1903
|
-
T,
|
|
1904
1900
|
x,
|
|
1905
1901
|
a,
|
|
1906
1902
|
B,
|
|
1907
1903
|
We
|
|
1908
1904
|
]);
|
|
1909
|
-
const te = !!h, xe = rt(h), [
|
|
1905
|
+
const te = !!h, xe = rt(h), [ze, Ee] = le(!1);
|
|
1910
1906
|
U(() => {
|
|
1911
1907
|
if (y)
|
|
1912
1908
|
return Ee(!0), () => Ee(!1);
|
|
@@ -1915,16 +1911,16 @@ var lr = ee(function(t) {
|
|
|
1915
1911
|
(P, F = !0) => {
|
|
1916
1912
|
const { disclosureElement: X } = S.getState();
|
|
1917
1913
|
if (pi(P)) return;
|
|
1918
|
-
let N =
|
|
1914
|
+
let N = Rn(b) || X;
|
|
1919
1915
|
if (N != null && N.id) {
|
|
1920
|
-
const ve = G(N), tt = `[aria-activedescendant="${N.id}"]`,
|
|
1921
|
-
|
|
1916
|
+
const ve = G(N), tt = `[aria-activedescendant="${N.id}"]`, pt = ve.querySelector(tt);
|
|
1917
|
+
pt && (N = pt);
|
|
1922
1918
|
}
|
|
1923
1919
|
if (N && !ot(N)) {
|
|
1924
1920
|
const ve = N.closest("[data-dialog]");
|
|
1925
1921
|
if (ve != null && ve.id) {
|
|
1926
|
-
const tt = G(ve),
|
|
1927
|
-
|
|
1922
|
+
const tt = G(ve), pt = `[aria-controls~="${ve.id}"]`, gn = tt.querySelector(pt);
|
|
1923
|
+
gn && (N = gn);
|
|
1928
1924
|
}
|
|
1929
1925
|
}
|
|
1930
1926
|
const ne = N && ot(N);
|
|
@@ -1934,14 +1930,14 @@ var lr = ee(function(t) {
|
|
|
1934
1930
|
}
|
|
1935
1931
|
xe(ne ? N : null) && ne && (N == null || N.focus({ preventScroll: !0 }));
|
|
1936
1932
|
},
|
|
1937
|
-
[S,
|
|
1933
|
+
[S, b, xe]
|
|
1938
1934
|
), ge = Y(!1);
|
|
1939
|
-
|
|
1940
|
-
if (y || !
|
|
1935
|
+
j(() => {
|
|
1936
|
+
if (y || !ze || !te) return;
|
|
1941
1937
|
const P = O.current;
|
|
1942
1938
|
ge.current = !0, Le(P);
|
|
1943
|
-
}, [y,
|
|
1944
|
-
if (!
|
|
1939
|
+
}, [y, ze, C, te, Le]), U(() => {
|
|
1940
|
+
if (!ze || !te) return;
|
|
1945
1941
|
const P = O.current;
|
|
1946
1942
|
return () => {
|
|
1947
1943
|
if (ge.current) {
|
|
@@ -1950,73 +1946,73 @@ var lr = ee(function(t) {
|
|
|
1950
1946
|
}
|
|
1951
1947
|
Le(P);
|
|
1952
1948
|
};
|
|
1953
|
-
}, [
|
|
1954
|
-
const
|
|
1955
|
-
U(() => !
|
|
1949
|
+
}, [ze, te, Le]);
|
|
1950
|
+
const ft = rt(m);
|
|
1951
|
+
U(() => !C || !D ? void 0 : Qt("keydown", (F) => {
|
|
1956
1952
|
if (F.key !== "Escape" || F.defaultPrevented) return;
|
|
1957
1953
|
const X = O.current;
|
|
1958
|
-
if (!X ||
|
|
1954
|
+
if (!X || sn(X)) return;
|
|
1959
1955
|
const N = F.target;
|
|
1960
1956
|
if (!N) return;
|
|
1961
1957
|
const { disclosureElement: ne } = S.getState();
|
|
1962
|
-
!!(N.tagName === "BODY" || de(X, N) || !ne || de(ne, N)) &&
|
|
1963
|
-
}, !0), [S,
|
|
1958
|
+
!!(N.tagName === "BODY" || de(X, N) || !ne || de(ne, N)) && ft(F) && S.hide();
|
|
1959
|
+
}, !0), [S, C, D, ft]), g = fe(
|
|
1964
1960
|
g,
|
|
1965
|
-
(P) => /* @__PURE__ */ H(
|
|
1961
|
+
(P) => /* @__PURE__ */ H(zo, { level: l ? 1 : void 0, children: P }),
|
|
1966
1962
|
[l]
|
|
1967
1963
|
);
|
|
1968
|
-
const
|
|
1964
|
+
const dt = g.hidden, Me = g.alwaysVisible;
|
|
1969
1965
|
g = fe(
|
|
1970
1966
|
g,
|
|
1971
|
-
(P) => u ? /* @__PURE__ */
|
|
1967
|
+
(P) => u ? /* @__PURE__ */ yt(bt, { children: [
|
|
1972
1968
|
/* @__PURE__ */ H(
|
|
1973
1969
|
di,
|
|
1974
1970
|
{
|
|
1975
1971
|
store: S,
|
|
1976
1972
|
backdrop: u,
|
|
1977
|
-
hidden:
|
|
1973
|
+
hidden: dt,
|
|
1978
1974
|
alwaysVisible: Me
|
|
1979
1975
|
}
|
|
1980
1976
|
),
|
|
1981
1977
|
P
|
|
1982
1978
|
] }) : P,
|
|
1983
|
-
[S, u,
|
|
1979
|
+
[S, u, dt, Me]
|
|
1984
1980
|
);
|
|
1985
|
-
const [
|
|
1981
|
+
const [je, mt] = le(), [Ke, qe] = le();
|
|
1986
1982
|
return g = fe(
|
|
1987
1983
|
g,
|
|
1988
|
-
(P) => /* @__PURE__ */ H(
|
|
1984
|
+
(P) => /* @__PURE__ */ H(Hn, { value: S, children: /* @__PURE__ */ H($r.Provider, { value: mt, children: /* @__PURE__ */ H(Vr.Provider, { value: qe, children: P }) }) }),
|
|
1989
1985
|
[S]
|
|
1990
|
-
), g = W(
|
|
1986
|
+
), g = W(_({
|
|
1991
1987
|
id: L,
|
|
1992
1988
|
"data-dialog": "",
|
|
1993
1989
|
role: "dialog",
|
|
1994
1990
|
tabIndex: c ? -1 : void 0,
|
|
1995
|
-
"aria-labelledby":
|
|
1991
|
+
"aria-labelledby": je,
|
|
1996
1992
|
"aria-describedby": Ke
|
|
1997
1993
|
}, g), {
|
|
1998
1994
|
ref: Be(O, g.ref)
|
|
1999
|
-
}), g =
|
|
1995
|
+
}), g = sr(W(_({}, g), {
|
|
2000
1996
|
autoFocusOnShow: et
|
|
2001
|
-
})), g =
|
|
1997
|
+
})), g = nn(_({ store: S }, g)), g = jn(W(_({}, g), { focusable: c })), g = ir(W(_({ portal: a }, g), { portalRef: $, preserveTabOrder: B })), g;
|
|
2002
1998
|
});
|
|
2003
|
-
function
|
|
1999
|
+
function dr(e, t = Dt) {
|
|
2004
2000
|
return K(function(n) {
|
|
2005
2001
|
const o = t(), s = n.store || o;
|
|
2006
2002
|
return he(
|
|
2007
2003
|
s,
|
|
2008
2004
|
(l) => !n.unmountOnHide || (l == null ? void 0 : l.mounted) || !!n.open
|
|
2009
|
-
) ? /* @__PURE__ */ H(e,
|
|
2005
|
+
) ? /* @__PURE__ */ H(e, _({}, n)) : null;
|
|
2010
2006
|
});
|
|
2011
2007
|
}
|
|
2012
|
-
|
|
2008
|
+
dr(
|
|
2013
2009
|
K(function(t) {
|
|
2014
|
-
const r =
|
|
2010
|
+
const r = fr(t);
|
|
2015
2011
|
return Q(mi, r);
|
|
2016
2012
|
}),
|
|
2017
|
-
|
|
2013
|
+
Dt
|
|
2018
2014
|
);
|
|
2019
|
-
const
|
|
2015
|
+
const _e = Math.min, oe = Math.max, St = Math.round, ht = Math.floor, ye = (e) => ({
|
|
2020
2016
|
x: e,
|
|
2021
2017
|
y: e
|
|
2022
2018
|
}), gi = {
|
|
@@ -2029,43 +2025,43 @@ const Ce = Math.min, oe = Math.max, Et = Math.round, vt = Math.floor, ye = (e) =
|
|
|
2029
2025
|
end: "start"
|
|
2030
2026
|
};
|
|
2031
2027
|
function jt(e, t, r) {
|
|
2032
|
-
return oe(e,
|
|
2028
|
+
return oe(e, _e(t, r));
|
|
2033
2029
|
}
|
|
2034
2030
|
function Re(e, t) {
|
|
2035
2031
|
return typeof e == "function" ? e(t) : e;
|
|
2036
2032
|
}
|
|
2037
|
-
function
|
|
2033
|
+
function Ce(e) {
|
|
2038
2034
|
return e.split("-")[0];
|
|
2039
2035
|
}
|
|
2040
2036
|
function Ze(e) {
|
|
2041
2037
|
return e.split("-")[1];
|
|
2042
2038
|
}
|
|
2043
|
-
function
|
|
2039
|
+
function an(e) {
|
|
2044
2040
|
return e === "x" ? "y" : "x";
|
|
2045
2041
|
}
|
|
2046
|
-
function
|
|
2042
|
+
function cn(e) {
|
|
2047
2043
|
return e === "y" ? "height" : "width";
|
|
2048
2044
|
}
|
|
2049
2045
|
function Pe(e) {
|
|
2050
|
-
return ["top", "bottom"].includes(
|
|
2046
|
+
return ["top", "bottom"].includes(Ce(e)) ? "y" : "x";
|
|
2051
2047
|
}
|
|
2052
|
-
function
|
|
2053
|
-
return
|
|
2048
|
+
function un(e) {
|
|
2049
|
+
return an(Pe(e));
|
|
2054
2050
|
}
|
|
2055
2051
|
function hi(e, t, r) {
|
|
2056
2052
|
r === void 0 && (r = !1);
|
|
2057
|
-
const n = Ze(e), o =
|
|
2053
|
+
const n = Ze(e), o = un(e), s = cn(o);
|
|
2058
2054
|
let c = o === "x" ? n === (r ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
2059
|
-
return t.reference[s] > t.floating[s] && (c =
|
|
2055
|
+
return t.reference[s] > t.floating[s] && (c = Ot(c)), [c, Ot(c)];
|
|
2060
2056
|
}
|
|
2061
2057
|
function yi(e) {
|
|
2062
|
-
const t =
|
|
2063
|
-
return [
|
|
2058
|
+
const t = Ot(e);
|
|
2059
|
+
return [Kt(e), t, Kt(t)];
|
|
2064
2060
|
}
|
|
2065
|
-
function
|
|
2061
|
+
function Kt(e) {
|
|
2066
2062
|
return e.replace(/start|end/g, (t) => vi[t]);
|
|
2067
2063
|
}
|
|
2068
|
-
function
|
|
2064
|
+
function bi(e, t, r) {
|
|
2069
2065
|
const n = ["left", "right"], o = ["right", "left"], s = ["top", "bottom"], c = ["bottom", "top"];
|
|
2070
2066
|
switch (e) {
|
|
2071
2067
|
case "top":
|
|
@@ -2078,12 +2074,12 @@ function wi(e, t, r) {
|
|
|
2078
2074
|
return [];
|
|
2079
2075
|
}
|
|
2080
2076
|
}
|
|
2081
|
-
function
|
|
2077
|
+
function wi(e, t, r, n) {
|
|
2082
2078
|
const o = Ze(e);
|
|
2083
|
-
let s =
|
|
2084
|
-
return o && (s = s.map((c) => c + "-" + o), t && (s = s.concat(s.map(
|
|
2079
|
+
let s = bi(Ce(e), r === "start", n);
|
|
2080
|
+
return o && (s = s.map((c) => c + "-" + o), t && (s = s.concat(s.map(Kt)))), s;
|
|
2085
2081
|
}
|
|
2086
|
-
function
|
|
2082
|
+
function Ot(e) {
|
|
2087
2083
|
return e.replace(/left|right|bottom|top/g, (t) => gi[t]);
|
|
2088
2084
|
}
|
|
2089
2085
|
function xi(e) {
|
|
@@ -2095,7 +2091,7 @@ function xi(e) {
|
|
|
2095
2091
|
...e
|
|
2096
2092
|
};
|
|
2097
2093
|
}
|
|
2098
|
-
function
|
|
2094
|
+
function mr(e) {
|
|
2099
2095
|
return typeof e != "number" ? xi(e) : {
|
|
2100
2096
|
top: e,
|
|
2101
2097
|
right: e,
|
|
@@ -2103,7 +2099,7 @@ function dr(e) {
|
|
|
2103
2099
|
left: e
|
|
2104
2100
|
};
|
|
2105
2101
|
}
|
|
2106
|
-
function
|
|
2102
|
+
function Pt(e) {
|
|
2107
2103
|
const {
|
|
2108
2104
|
x: t,
|
|
2109
2105
|
y: r,
|
|
@@ -2121,12 +2117,12 @@ function Ot(e) {
|
|
|
2121
2117
|
y: r
|
|
2122
2118
|
};
|
|
2123
2119
|
}
|
|
2124
|
-
function
|
|
2120
|
+
function In(e, t, r) {
|
|
2125
2121
|
let {
|
|
2126
2122
|
reference: n,
|
|
2127
2123
|
floating: o
|
|
2128
2124
|
} = e;
|
|
2129
|
-
const s = Pe(t), c =
|
|
2125
|
+
const s = Pe(t), c = un(t), l = cn(c), a = Ce(t), u = s === "y", m = n.x + n.width / 2 - o.width / 2, f = n.y + n.height / 2 - o.height / 2, i = n[l] / 2 - o[l] / 2;
|
|
2130
2126
|
let d;
|
|
2131
2127
|
switch (a) {
|
|
2132
2128
|
case "top":
|
|
@@ -2183,17 +2179,17 @@ const Ei = async (e, t, r) => {
|
|
|
2183
2179
|
}), {
|
|
2184
2180
|
x: m,
|
|
2185
2181
|
y: f
|
|
2186
|
-
} =
|
|
2182
|
+
} = In(u, n, a), i = n, d = {}, p = 0;
|
|
2187
2183
|
for (let h = 0; h < l.length; h++) {
|
|
2188
2184
|
const {
|
|
2189
2185
|
name: x,
|
|
2190
|
-
fn:
|
|
2186
|
+
fn: b
|
|
2191
2187
|
} = l[h], {
|
|
2192
|
-
x:
|
|
2188
|
+
x: w,
|
|
2193
2189
|
y: E,
|
|
2194
2190
|
data: g,
|
|
2195
2191
|
reset: v
|
|
2196
|
-
} = await
|
|
2192
|
+
} = await b({
|
|
2197
2193
|
x: m,
|
|
2198
2194
|
y: f,
|
|
2199
2195
|
initialPlacement: n,
|
|
@@ -2207,7 +2203,7 @@ const Ei = async (e, t, r) => {
|
|
|
2207
2203
|
floating: t
|
|
2208
2204
|
}
|
|
2209
2205
|
});
|
|
2210
|
-
m =
|
|
2206
|
+
m = w ?? m, f = E ?? f, d = {
|
|
2211
2207
|
...d,
|
|
2212
2208
|
[x]: {
|
|
2213
2209
|
...d[x],
|
|
@@ -2220,7 +2216,7 @@ const Ei = async (e, t, r) => {
|
|
|
2220
2216
|
}) : v.rects), {
|
|
2221
2217
|
x: m,
|
|
2222
2218
|
y: f
|
|
2223
|
-
} =
|
|
2219
|
+
} = In(u, i, a)), h = -1);
|
|
2224
2220
|
}
|
|
2225
2221
|
return {
|
|
2226
2222
|
x: m,
|
|
@@ -2230,7 +2226,7 @@ const Ei = async (e, t, r) => {
|
|
|
2230
2226
|
middlewareData: d
|
|
2231
2227
|
};
|
|
2232
2228
|
};
|
|
2233
|
-
async function
|
|
2229
|
+
async function ln(e, t) {
|
|
2234
2230
|
var r;
|
|
2235
2231
|
t === void 0 && (t = {});
|
|
2236
2232
|
const {
|
|
@@ -2246,12 +2242,12 @@ async function un(e, t) {
|
|
|
2246
2242
|
elementContext: f = "floating",
|
|
2247
2243
|
altBoundary: i = !1,
|
|
2248
2244
|
padding: d = 0
|
|
2249
|
-
} = Re(t, e), p =
|
|
2245
|
+
} = Re(t, e), p = mr(d), x = l[i ? f === "floating" ? "reference" : "floating" : f], b = Pt(await s.getClippingRect({
|
|
2250
2246
|
element: (r = await (s.isElement == null ? void 0 : s.isElement(x))) == null || r ? x : x.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
|
|
2251
2247
|
boundary: u,
|
|
2252
2248
|
rootBoundary: m,
|
|
2253
2249
|
strategy: a
|
|
2254
|
-
})),
|
|
2250
|
+
})), w = f === "floating" ? {
|
|
2255
2251
|
x: n,
|
|
2256
2252
|
y: o,
|
|
2257
2253
|
width: c.floating.width,
|
|
@@ -2262,17 +2258,17 @@ async function un(e, t) {
|
|
|
2262
2258
|
} : {
|
|
2263
2259
|
x: 1,
|
|
2264
2260
|
y: 1
|
|
2265
|
-
}, v =
|
|
2261
|
+
}, v = Pt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
2266
2262
|
elements: l,
|
|
2267
|
-
rect:
|
|
2263
|
+
rect: w,
|
|
2268
2264
|
offsetParent: E,
|
|
2269
2265
|
strategy: a
|
|
2270
|
-
}) :
|
|
2266
|
+
}) : w);
|
|
2271
2267
|
return {
|
|
2272
|
-
top: (
|
|
2273
|
-
bottom: (v.bottom -
|
|
2274
|
-
left: (
|
|
2275
|
-
right: (v.right -
|
|
2268
|
+
top: (b.top - v.top + p.top) / g.y,
|
|
2269
|
+
bottom: (v.bottom - b.bottom + p.bottom) / g.y,
|
|
2270
|
+
left: (b.left - v.left + p.left) / g.x,
|
|
2271
|
+
right: (v.right - b.right + p.right) / g.x
|
|
2276
2272
|
};
|
|
2277
2273
|
}
|
|
2278
2274
|
const Si = (e) => ({
|
|
@@ -2293,18 +2289,18 @@ const Si = (e) => ({
|
|
|
2293
2289
|
} = Re(e, t) || {};
|
|
2294
2290
|
if (u == null)
|
|
2295
2291
|
return {};
|
|
2296
|
-
const f =
|
|
2292
|
+
const f = mr(m), i = {
|
|
2297
2293
|
x: r,
|
|
2298
2294
|
y: n
|
|
2299
|
-
}, d =
|
|
2295
|
+
}, d = un(o), p = cn(d), h = await c.getDimensions(u), x = d === "y", b = x ? "top" : "left", w = x ? "bottom" : "right", E = x ? "clientHeight" : "clientWidth", g = s.reference[p] + s.reference[d] - i[d] - s.floating[p], v = i[d] - s.reference[d], O = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(u));
|
|
2300
2296
|
let S = O ? O[E] : 0;
|
|
2301
2297
|
(!S || !await (c.isElement == null ? void 0 : c.isElement(O))) && (S = l.floating[E] || s.floating[p]);
|
|
2302
|
-
const $ = g / 2 - v / 2,
|
|
2298
|
+
const $ = g / 2 - v / 2, C = S / 2 - h[p] / 2 - 1, R = _e(f[b], C), B = _e(f[w], C), L = R, y = S - h[p] - B, D = S / 2 - h[p] / 2 + $, A = jt(L, D, y), M = !a.arrow && Ze(o) != null && D !== A && s.reference[p] / 2 - (D < L ? R : B) - h[p] / 2 < 0, I = M ? D < L ? D - L : D - y : 0;
|
|
2303
2299
|
return {
|
|
2304
2300
|
[d]: i[d] + I,
|
|
2305
2301
|
data: {
|
|
2306
|
-
[d]:
|
|
2307
|
-
centerOffset: D -
|
|
2302
|
+
[d]: A,
|
|
2303
|
+
centerOffset: D - A - I,
|
|
2308
2304
|
...M && {
|
|
2309
2305
|
alignmentOffset: I
|
|
2310
2306
|
}
|
|
@@ -2336,27 +2332,27 @@ const Si = (e) => ({
|
|
|
2336
2332
|
} = Re(e, t);
|
|
2337
2333
|
if ((r = s.arrow) != null && r.alignmentOffset)
|
|
2338
2334
|
return {};
|
|
2339
|
-
const
|
|
2340
|
-
!i && O && v.push(...
|
|
2341
|
-
const S = [l, ...v], $ = await
|
|
2335
|
+
const b = Ce(o), w = Pe(l), E = Ce(l) === l, g = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), v = i || (E || !h ? [Ot(l)] : yi(l)), O = p !== "none";
|
|
2336
|
+
!i && O && v.push(...wi(l, h, p, g));
|
|
2337
|
+
const S = [l, ...v], $ = await ln(t, x), C = [];
|
|
2342
2338
|
let R = ((n = s.flip) == null ? void 0 : n.overflows) || [];
|
|
2343
|
-
if (m &&
|
|
2344
|
-
const
|
|
2345
|
-
|
|
2339
|
+
if (m && C.push($[b]), f) {
|
|
2340
|
+
const A = hi(o, c, g);
|
|
2341
|
+
C.push($[A[0]], $[A[1]]);
|
|
2346
2342
|
}
|
|
2347
2343
|
if (R = [...R, {
|
|
2348
2344
|
placement: o,
|
|
2349
|
-
overflows:
|
|
2350
|
-
}], !
|
|
2345
|
+
overflows: C
|
|
2346
|
+
}], !C.every((A) => A <= 0)) {
|
|
2351
2347
|
var B, L;
|
|
2352
|
-
const
|
|
2348
|
+
const A = (((B = s.flip) == null ? void 0 : B.index) || 0) + 1, M = S[A];
|
|
2353
2349
|
if (M) {
|
|
2354
2350
|
var y;
|
|
2355
|
-
const V = f === "alignment" ?
|
|
2356
|
-
if (!V ||
|
|
2351
|
+
const V = f === "alignment" ? w !== Pe(M) : !1, T = ((y = R[0]) == null ? void 0 : y.overflows[0]) > 0;
|
|
2352
|
+
if (!V || T)
|
|
2357
2353
|
return {
|
|
2358
2354
|
data: {
|
|
2359
|
-
index:
|
|
2355
|
+
index: A,
|
|
2360
2356
|
overflows: R
|
|
2361
2357
|
},
|
|
2362
2358
|
reset: {
|
|
@@ -2364,20 +2360,20 @@ const Si = (e) => ({
|
|
|
2364
2360
|
}
|
|
2365
2361
|
};
|
|
2366
2362
|
}
|
|
2367
|
-
let I = (L = R.filter((V) => V.overflows[0] <= 0).sort((V,
|
|
2363
|
+
let I = (L = R.filter((V) => V.overflows[0] <= 0).sort((V, T) => V.overflows[1] - T.overflows[1])[0]) == null ? void 0 : L.placement;
|
|
2368
2364
|
if (!I)
|
|
2369
2365
|
switch (d) {
|
|
2370
2366
|
case "bestFit": {
|
|
2371
2367
|
var D;
|
|
2372
|
-
const V = (D = R.filter((
|
|
2368
|
+
const V = (D = R.filter((T) => {
|
|
2373
2369
|
if (O) {
|
|
2374
|
-
const k = Pe(
|
|
2375
|
-
return k ===
|
|
2370
|
+
const k = Pe(T.placement);
|
|
2371
|
+
return k === w || // Create a bias to the `y` side axis due to horizontal
|
|
2376
2372
|
// reading directions favoring greater width.
|
|
2377
2373
|
k === "y";
|
|
2378
2374
|
}
|
|
2379
2375
|
return !0;
|
|
2380
|
-
}).map((
|
|
2376
|
+
}).map((T) => [T.placement, T.overflows.filter((k) => k > 0).reduce((k, q) => k + q, 0)]).sort((T, k) => T[1] - k[1])[0]) == null ? void 0 : D[0];
|
|
2381
2377
|
V && (I = V);
|
|
2382
2378
|
break;
|
|
2383
2379
|
}
|
|
@@ -2401,7 +2397,7 @@ async function Pi(e, t) {
|
|
|
2401
2397
|
placement: r,
|
|
2402
2398
|
platform: n,
|
|
2403
2399
|
elements: o
|
|
2404
|
-
} = e, s = await (n.isRTL == null ? void 0 : n.isRTL(o.floating)), c =
|
|
2400
|
+
} = e, s = await (n.isRTL == null ? void 0 : n.isRTL(o.floating)), c = Ce(r), l = Ze(r), a = Pe(r) === "y", u = ["left", "top"].includes(c) ? -1 : 1, m = s && a ? -1 : 1, f = Re(t, e);
|
|
2405
2401
|
let {
|
|
2406
2402
|
mainAxis: i,
|
|
2407
2403
|
crossAxis: d,
|
|
@@ -2445,7 +2441,7 @@ const Di = function(e) {
|
|
|
2445
2441
|
};
|
|
2446
2442
|
}
|
|
2447
2443
|
};
|
|
2448
|
-
},
|
|
2444
|
+
}, Ci = function(e) {
|
|
2449
2445
|
return e === void 0 && (e = {}), {
|
|
2450
2446
|
name: "shift",
|
|
2451
2447
|
options: e,
|
|
@@ -2460,12 +2456,12 @@ const Di = function(e) {
|
|
|
2460
2456
|
limiter: l = {
|
|
2461
2457
|
fn: (x) => {
|
|
2462
2458
|
let {
|
|
2463
|
-
x:
|
|
2464
|
-
y:
|
|
2459
|
+
x: b,
|
|
2460
|
+
y: w
|
|
2465
2461
|
} = x;
|
|
2466
2462
|
return {
|
|
2467
|
-
x:
|
|
2468
|
-
y:
|
|
2463
|
+
x: b,
|
|
2464
|
+
y: w
|
|
2469
2465
|
};
|
|
2470
2466
|
}
|
|
2471
2467
|
},
|
|
@@ -2473,15 +2469,15 @@ const Di = function(e) {
|
|
|
2473
2469
|
} = Re(e, t), u = {
|
|
2474
2470
|
x: r,
|
|
2475
2471
|
y: n
|
|
2476
|
-
}, m = await
|
|
2472
|
+
}, m = await ln(t, a), f = Pe(Ce(o)), i = an(f);
|
|
2477
2473
|
let d = u[i], p = u[f];
|
|
2478
2474
|
if (s) {
|
|
2479
|
-
const x = i === "y" ? "top" : "left",
|
|
2480
|
-
d = jt(
|
|
2475
|
+
const x = i === "y" ? "top" : "left", b = i === "y" ? "bottom" : "right", w = d + m[x], E = d - m[b];
|
|
2476
|
+
d = jt(w, d, E);
|
|
2481
2477
|
}
|
|
2482
2478
|
if (c) {
|
|
2483
|
-
const x = f === "y" ? "top" : "left",
|
|
2484
|
-
p = jt(
|
|
2479
|
+
const x = f === "y" ? "top" : "left", b = f === "y" ? "bottom" : "right", w = p + m[x], E = p - m[b];
|
|
2480
|
+
p = jt(w, p, E);
|
|
2485
2481
|
}
|
|
2486
2482
|
const h = l.fn({
|
|
2487
2483
|
...t,
|
|
@@ -2501,7 +2497,7 @@ const Di = function(e) {
|
|
|
2501
2497
|
};
|
|
2502
2498
|
}
|
|
2503
2499
|
};
|
|
2504
|
-
},
|
|
2500
|
+
}, Ai = function(e) {
|
|
2505
2501
|
return e === void 0 && (e = {}), {
|
|
2506
2502
|
options: e,
|
|
2507
2503
|
fn(t) {
|
|
@@ -2518,7 +2514,7 @@ const Di = function(e) {
|
|
|
2518
2514
|
} = Re(e, t), m = {
|
|
2519
2515
|
x: r,
|
|
2520
2516
|
y: n
|
|
2521
|
-
}, f = Pe(o), i =
|
|
2517
|
+
}, f = Pe(o), i = an(f);
|
|
2522
2518
|
let d = m[i], p = m[f];
|
|
2523
2519
|
const h = Re(l, t), x = typeof h == "number" ? {
|
|
2524
2520
|
mainAxis: h,
|
|
@@ -2533,8 +2529,8 @@ const Di = function(e) {
|
|
|
2533
2529
|
d < g ? d = g : d > v && (d = v);
|
|
2534
2530
|
}
|
|
2535
2531
|
if (u) {
|
|
2536
|
-
var
|
|
2537
|
-
const E = i === "y" ? "width" : "height", g = ["top", "left"].includes(
|
|
2532
|
+
var b, w;
|
|
2533
|
+
const E = i === "y" ? "width" : "height", g = ["top", "left"].includes(Ce(o)), v = s.reference[f] - s.floating[E] + (g && ((b = c.offset) == null ? void 0 : b[f]) || 0) + (g ? 0 : x.crossAxis), O = s.reference[f] + s.reference[E] + (g ? 0 : ((w = c.offset) == null ? void 0 : w[f]) || 0) - (g ? x.crossAxis : 0);
|
|
2538
2534
|
p < v ? p = v : p > O && (p = O);
|
|
2539
2535
|
}
|
|
2540
2536
|
return {
|
|
@@ -2543,7 +2539,7 @@ const Di = function(e) {
|
|
|
2543
2539
|
};
|
|
2544
2540
|
}
|
|
2545
2541
|
};
|
|
2546
|
-
},
|
|
2542
|
+
}, Ti = function(e) {
|
|
2547
2543
|
return e === void 0 && (e = {}), {
|
|
2548
2544
|
name: "size",
|
|
2549
2545
|
options: e,
|
|
@@ -2558,15 +2554,15 @@ const Di = function(e) {
|
|
|
2558
2554
|
apply: a = () => {
|
|
2559
2555
|
},
|
|
2560
2556
|
...u
|
|
2561
|
-
} = Re(e, t), m = await
|
|
2557
|
+
} = Re(e, t), m = await ln(t, u), f = Ce(o), i = Ze(o), d = Pe(o) === "y", {
|
|
2562
2558
|
width: p,
|
|
2563
2559
|
height: h
|
|
2564
2560
|
} = s.floating;
|
|
2565
|
-
let x,
|
|
2566
|
-
f === "top" || f === "bottom" ? (x = f,
|
|
2567
|
-
const
|
|
2561
|
+
let x, b;
|
|
2562
|
+
f === "top" || f === "bottom" ? (x = f, b = i === (await (c.isRTL == null ? void 0 : c.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (b = f, x = i === "end" ? "top" : "bottom");
|
|
2563
|
+
const w = h - m.top - m.bottom, E = p - m.left - m.right, g = _e(h - m[x], w), v = _e(p - m[b], E), O = !t.middlewareData.shift;
|
|
2568
2564
|
let S = g, $ = v;
|
|
2569
|
-
if ((r = t.middlewareData.shift) != null && r.enabled.x && ($ = E), (n = t.middlewareData.shift) != null && n.enabled.y && (S =
|
|
2565
|
+
if ((r = t.middlewareData.shift) != null && r.enabled.x && ($ = E), (n = t.middlewareData.shift) != null && n.enabled.y && (S = w), O && !i) {
|
|
2570
2566
|
const R = oe(m.left, 0), B = oe(m.right, 0), L = oe(m.top, 0), y = oe(m.bottom, 0);
|
|
2571
2567
|
d ? $ = p - 2 * (R !== 0 || B !== 0 ? R + B : oe(m.left, m.right)) : S = h - 2 * (L !== 0 || y !== 0 ? L + y : oe(m.top, m.bottom));
|
|
2572
2568
|
}
|
|
@@ -2575,8 +2571,8 @@ const Di = function(e) {
|
|
|
2575
2571
|
availableWidth: $,
|
|
2576
2572
|
availableHeight: S
|
|
2577
2573
|
});
|
|
2578
|
-
const
|
|
2579
|
-
return p !==
|
|
2574
|
+
const C = await c.getDimensions(l.floating);
|
|
2575
|
+
return p !== C.width || h !== C.height ? {
|
|
2580
2576
|
reset: {
|
|
2581
2577
|
rects: !0
|
|
2582
2578
|
}
|
|
@@ -2588,29 +2584,29 @@ function At() {
|
|
|
2588
2584
|
return typeof window < "u";
|
|
2589
2585
|
}
|
|
2590
2586
|
function Qe(e) {
|
|
2591
|
-
return
|
|
2587
|
+
return pr(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
2592
2588
|
}
|
|
2593
2589
|
function ie(e) {
|
|
2594
2590
|
var t;
|
|
2595
2591
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
2596
2592
|
}
|
|
2597
|
-
function
|
|
2593
|
+
function we(e) {
|
|
2598
2594
|
var t;
|
|
2599
|
-
return (t = (
|
|
2595
|
+
return (t = (pr(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
2600
2596
|
}
|
|
2601
|
-
function
|
|
2597
|
+
function pr(e) {
|
|
2602
2598
|
return At() ? e instanceof Node || e instanceof ie(e).Node : !1;
|
|
2603
2599
|
}
|
|
2604
2600
|
function me(e) {
|
|
2605
2601
|
return At() ? e instanceof Element || e instanceof ie(e).Element : !1;
|
|
2606
2602
|
}
|
|
2607
|
-
function
|
|
2603
|
+
function be(e) {
|
|
2608
2604
|
return At() ? e instanceof HTMLElement || e instanceof ie(e).HTMLElement : !1;
|
|
2609
2605
|
}
|
|
2610
|
-
function
|
|
2606
|
+
function Fn(e) {
|
|
2611
2607
|
return !At() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof ie(e).ShadowRoot;
|
|
2612
2608
|
}
|
|
2613
|
-
function
|
|
2609
|
+
function lt(e) {
|
|
2614
2610
|
const {
|
|
2615
2611
|
overflow: t,
|
|
2616
2612
|
overflowX: r,
|
|
@@ -2619,7 +2615,7 @@ function ut(e) {
|
|
|
2619
2615
|
} = pe(e);
|
|
2620
2616
|
return /auto|scroll|overlay|hidden|clip/.test(t + n + r) && !["inline", "contents"].includes(o);
|
|
2621
2617
|
}
|
|
2622
|
-
function
|
|
2618
|
+
function _i(e) {
|
|
2623
2619
|
return ["table", "td", "th"].includes(Qe(e));
|
|
2624
2620
|
}
|
|
2625
2621
|
function Tt(e) {
|
|
@@ -2631,14 +2627,14 @@ function Tt(e) {
|
|
|
2631
2627
|
}
|
|
2632
2628
|
});
|
|
2633
2629
|
}
|
|
2634
|
-
function
|
|
2635
|
-
const t =
|
|
2630
|
+
function fn(e) {
|
|
2631
|
+
const t = dn(), r = me(e) ? pe(e) : e;
|
|
2636
2632
|
return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => r[n] ? r[n] !== "none" : !1) || (r.containerType ? r.containerType !== "normal" : !1) || !t && (r.backdropFilter ? r.backdropFilter !== "none" : !1) || !t && (r.filter ? r.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (r.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (r.contain || "").includes(n));
|
|
2637
2633
|
}
|
|
2638
2634
|
function Ri(e) {
|
|
2639
2635
|
let t = Ie(e);
|
|
2640
|
-
for (;
|
|
2641
|
-
if (
|
|
2636
|
+
for (; be(t) && !Xe(t); ) {
|
|
2637
|
+
if (fn(t))
|
|
2642
2638
|
return t;
|
|
2643
2639
|
if (Tt(t))
|
|
2644
2640
|
return null;
|
|
@@ -2646,7 +2642,7 @@ function Ri(e) {
|
|
|
2646
2642
|
}
|
|
2647
2643
|
return null;
|
|
2648
2644
|
}
|
|
2649
|
-
function
|
|
2645
|
+
function dn() {
|
|
2650
2646
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
2651
2647
|
}
|
|
2652
2648
|
function Xe(e) {
|
|
@@ -2671,60 +2667,60 @@ function Ie(e) {
|
|
|
2671
2667
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
2672
2668
|
e.assignedSlot || // DOM Element detected.
|
|
2673
2669
|
e.parentNode || // ShadowRoot detected.
|
|
2674
|
-
|
|
2675
|
-
|
|
2670
|
+
Fn(e) && e.host || // Fallback.
|
|
2671
|
+
we(e)
|
|
2676
2672
|
);
|
|
2677
|
-
return
|
|
2673
|
+
return Fn(t) ? t.host : t;
|
|
2678
2674
|
}
|
|
2679
|
-
function
|
|
2675
|
+
function gr(e) {
|
|
2680
2676
|
const t = Ie(e);
|
|
2681
|
-
return Xe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body :
|
|
2677
|
+
return Xe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : be(t) && lt(t) ? t : gr(t);
|
|
2682
2678
|
}
|
|
2683
2679
|
function at(e, t, r) {
|
|
2684
2680
|
var n;
|
|
2685
2681
|
t === void 0 && (t = []), r === void 0 && (r = !0);
|
|
2686
|
-
const o =
|
|
2682
|
+
const o = gr(e), s = o === ((n = e.ownerDocument) == null ? void 0 : n.body), c = ie(o);
|
|
2687
2683
|
if (s) {
|
|
2688
|
-
const l =
|
|
2689
|
-
return t.concat(c, c.visualViewport || [],
|
|
2684
|
+
const l = qt(c);
|
|
2685
|
+
return t.concat(c, c.visualViewport || [], lt(o) ? o : [], l && r ? at(l) : []);
|
|
2690
2686
|
}
|
|
2691
2687
|
return t.concat(o, at(o, [], r));
|
|
2692
2688
|
}
|
|
2693
|
-
function
|
|
2689
|
+
function qt(e) {
|
|
2694
2690
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
2695
2691
|
}
|
|
2696
|
-
function
|
|
2692
|
+
function vr(e) {
|
|
2697
2693
|
const t = pe(e);
|
|
2698
2694
|
let r = parseFloat(t.width) || 0, n = parseFloat(t.height) || 0;
|
|
2699
|
-
const o =
|
|
2695
|
+
const o = be(e), s = o ? e.offsetWidth : r, c = o ? e.offsetHeight : n, l = St(r) !== s || St(n) !== c;
|
|
2700
2696
|
return l && (r = s, n = c), {
|
|
2701
2697
|
width: r,
|
|
2702
2698
|
height: n,
|
|
2703
2699
|
$: l
|
|
2704
2700
|
};
|
|
2705
2701
|
}
|
|
2706
|
-
function
|
|
2702
|
+
function mn(e) {
|
|
2707
2703
|
return me(e) ? e : e.contextElement;
|
|
2708
2704
|
}
|
|
2709
2705
|
function Ye(e) {
|
|
2710
|
-
const t =
|
|
2711
|
-
if (!
|
|
2706
|
+
const t = mn(e);
|
|
2707
|
+
if (!be(t))
|
|
2712
2708
|
return ye(1);
|
|
2713
2709
|
const r = t.getBoundingClientRect(), {
|
|
2714
2710
|
width: n,
|
|
2715
2711
|
height: o,
|
|
2716
2712
|
$: s
|
|
2717
|
-
} =
|
|
2718
|
-
let c = (s ?
|
|
2713
|
+
} = vr(t);
|
|
2714
|
+
let c = (s ? St(r.width) : r.width) / n, l = (s ? St(r.height) : r.height) / o;
|
|
2719
2715
|
return (!c || !Number.isFinite(c)) && (c = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
2720
2716
|
x: c,
|
|
2721
2717
|
y: l
|
|
2722
2718
|
};
|
|
2723
2719
|
}
|
|
2724
2720
|
const Ii = /* @__PURE__ */ ye(0);
|
|
2725
|
-
function
|
|
2721
|
+
function hr(e) {
|
|
2726
2722
|
const t = ie(e);
|
|
2727
|
-
return !
|
|
2723
|
+
return !dn() || !t.visualViewport ? Ii : {
|
|
2728
2724
|
x: t.visualViewport.offsetLeft,
|
|
2729
2725
|
y: t.visualViewport.offsetTop
|
|
2730
2726
|
};
|
|
@@ -2734,35 +2730,35 @@ function Fi(e, t, r) {
|
|
|
2734
2730
|
}
|
|
2735
2731
|
function He(e, t, r, n) {
|
|
2736
2732
|
t === void 0 && (t = !1), r === void 0 && (r = !1);
|
|
2737
|
-
const o = e.getBoundingClientRect(), s =
|
|
2733
|
+
const o = e.getBoundingClientRect(), s = mn(e);
|
|
2738
2734
|
let c = ye(1);
|
|
2739
2735
|
t && (n ? me(n) && (c = Ye(n)) : c = Ye(e));
|
|
2740
|
-
const l = Fi(s, r, n) ?
|
|
2736
|
+
const l = Fi(s, r, n) ? hr(s) : ye(0);
|
|
2741
2737
|
let a = (o.left + l.x) / c.x, u = (o.top + l.y) / c.y, m = o.width / c.x, f = o.height / c.y;
|
|
2742
2738
|
if (s) {
|
|
2743
2739
|
const i = ie(s), d = n && me(n) ? ie(n) : n;
|
|
2744
|
-
let p = i, h =
|
|
2740
|
+
let p = i, h = qt(p);
|
|
2745
2741
|
for (; h && n && d !== p; ) {
|
|
2746
|
-
const x = Ye(h),
|
|
2747
|
-
a *= x.x, u *= x.y, m *= x.x, f *= x.y, a += E, u += g, p = ie(h), h =
|
|
2742
|
+
const x = Ye(h), b = h.getBoundingClientRect(), w = pe(h), E = b.left + (h.clientLeft + parseFloat(w.paddingLeft)) * x.x, g = b.top + (h.clientTop + parseFloat(w.paddingTop)) * x.y;
|
|
2743
|
+
a *= x.x, u *= x.y, m *= x.x, f *= x.y, a += E, u += g, p = ie(h), h = qt(p);
|
|
2748
2744
|
}
|
|
2749
2745
|
}
|
|
2750
|
-
return
|
|
2746
|
+
return Pt({
|
|
2751
2747
|
width: m,
|
|
2752
2748
|
height: f,
|
|
2753
2749
|
x: a,
|
|
2754
2750
|
y: u
|
|
2755
2751
|
});
|
|
2756
2752
|
}
|
|
2757
|
-
function
|
|
2753
|
+
function pn(e, t) {
|
|
2758
2754
|
const r = _t(e).scrollLeft;
|
|
2759
|
-
return t ? t.left + r : He(
|
|
2755
|
+
return t ? t.left + r : He(we(e)).left + r;
|
|
2760
2756
|
}
|
|
2761
|
-
function
|
|
2757
|
+
function yr(e, t, r) {
|
|
2762
2758
|
r === void 0 && (r = !1);
|
|
2763
2759
|
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - (r ? 0 : (
|
|
2764
2760
|
// RTL <body> scrollbar.
|
|
2765
|
-
|
|
2761
|
+
pn(e, n)
|
|
2766
2762
|
)), s = n.top + t.scrollTop;
|
|
2767
2763
|
return {
|
|
2768
2764
|
x: o,
|
|
@@ -2776,19 +2772,19 @@ function Li(e) {
|
|
|
2776
2772
|
offsetParent: n,
|
|
2777
2773
|
strategy: o
|
|
2778
2774
|
} = e;
|
|
2779
|
-
const s = o === "fixed", c =
|
|
2775
|
+
const s = o === "fixed", c = we(n), l = t ? Tt(t.floating) : !1;
|
|
2780
2776
|
if (n === c || l && s)
|
|
2781
2777
|
return r;
|
|
2782
2778
|
let a = {
|
|
2783
2779
|
scrollLeft: 0,
|
|
2784
2780
|
scrollTop: 0
|
|
2785
2781
|
}, u = ye(1);
|
|
2786
|
-
const m = ye(0), f =
|
|
2787
|
-
if ((f || !f && !s) && ((Qe(n) !== "body" ||
|
|
2782
|
+
const m = ye(0), f = be(n);
|
|
2783
|
+
if ((f || !f && !s) && ((Qe(n) !== "body" || lt(c)) && (a = _t(n)), be(n))) {
|
|
2788
2784
|
const d = He(n);
|
|
2789
2785
|
u = Ye(n), m.x = d.x + n.clientLeft, m.y = d.y + n.clientTop;
|
|
2790
2786
|
}
|
|
2791
|
-
const i = c && !f && !s ?
|
|
2787
|
+
const i = c && !f && !s ? yr(c, a, !0) : ye(0);
|
|
2792
2788
|
return {
|
|
2793
2789
|
width: r.width * u.x,
|
|
2794
2790
|
height: r.height * u.y,
|
|
@@ -2800,8 +2796,8 @@ function Mi(e) {
|
|
|
2800
2796
|
return Array.from(e.getClientRects());
|
|
2801
2797
|
}
|
|
2802
2798
|
function Ni(e) {
|
|
2803
|
-
const t =
|
|
2804
|
-
let c = -r.scrollLeft +
|
|
2799
|
+
const t = we(e), r = _t(e), n = e.ownerDocument.body, o = oe(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), s = oe(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
|
|
2800
|
+
let c = -r.scrollLeft + pn(e);
|
|
2805
2801
|
const l = -r.scrollTop;
|
|
2806
2802
|
return pe(n).direction === "rtl" && (c += oe(t.clientWidth, n.clientWidth) - o), {
|
|
2807
2803
|
width: o,
|
|
@@ -2811,11 +2807,11 @@ function Ni(e) {
|
|
|
2811
2807
|
};
|
|
2812
2808
|
}
|
|
2813
2809
|
function ki(e, t) {
|
|
2814
|
-
const r = ie(e), n =
|
|
2810
|
+
const r = ie(e), n = we(e), o = r.visualViewport;
|
|
2815
2811
|
let s = n.clientWidth, c = n.clientHeight, l = 0, a = 0;
|
|
2816
2812
|
if (o) {
|
|
2817
2813
|
s = o.width, c = o.height;
|
|
2818
|
-
const u =
|
|
2814
|
+
const u = dn();
|
|
2819
2815
|
(!u || u && t === "fixed") && (l = o.offsetLeft, a = o.offsetTop);
|
|
2820
2816
|
}
|
|
2821
2817
|
return {
|
|
@@ -2826,7 +2822,7 @@ function ki(e, t) {
|
|
|
2826
2822
|
};
|
|
2827
2823
|
}
|
|
2828
2824
|
function $i(e, t) {
|
|
2829
|
-
const r = He(e, !0, t === "fixed"), n = r.top + e.clientTop, o = r.left + e.clientLeft, s =
|
|
2825
|
+
const r = He(e, !0, t === "fixed"), n = r.top + e.clientTop, o = r.left + e.clientLeft, s = be(e) ? Ye(e) : ye(1), c = e.clientWidth * s.x, l = e.clientHeight * s.y, a = o * s.x, u = n * s.y;
|
|
2830
2826
|
return {
|
|
2831
2827
|
width: c,
|
|
2832
2828
|
height: l,
|
|
@@ -2834,16 +2830,16 @@ function $i(e, t) {
|
|
|
2834
2830
|
y: u
|
|
2835
2831
|
};
|
|
2836
2832
|
}
|
|
2837
|
-
function
|
|
2833
|
+
function Ln(e, t, r) {
|
|
2838
2834
|
let n;
|
|
2839
2835
|
if (t === "viewport")
|
|
2840
2836
|
n = ki(e, r);
|
|
2841
2837
|
else if (t === "document")
|
|
2842
|
-
n = Ni(
|
|
2838
|
+
n = Ni(we(e));
|
|
2843
2839
|
else if (me(t))
|
|
2844
2840
|
n = $i(t, r);
|
|
2845
2841
|
else {
|
|
2846
|
-
const o =
|
|
2842
|
+
const o = hr(e);
|
|
2847
2843
|
n = {
|
|
2848
2844
|
x: t.x - o.x,
|
|
2849
2845
|
y: t.y - o.y,
|
|
@@ -2851,11 +2847,11 @@ function Fn(e, t, r) {
|
|
|
2851
2847
|
height: t.height
|
|
2852
2848
|
};
|
|
2853
2849
|
}
|
|
2854
|
-
return
|
|
2850
|
+
return Pt(n);
|
|
2855
2851
|
}
|
|
2856
|
-
function
|
|
2852
|
+
function br(e, t) {
|
|
2857
2853
|
const r = Ie(e);
|
|
2858
|
-
return r === t || !me(r) || Xe(r) ? !1 : pe(r).position === "fixed" ||
|
|
2854
|
+
return r === t || !me(r) || Xe(r) ? !1 : pe(r).position === "fixed" || br(r, t);
|
|
2859
2855
|
}
|
|
2860
2856
|
function Vi(e, t) {
|
|
2861
2857
|
const r = t.get(e);
|
|
@@ -2865,8 +2861,8 @@ function Vi(e, t) {
|
|
|
2865
2861
|
const s = pe(e).position === "fixed";
|
|
2866
2862
|
let c = s ? Ie(e) : e;
|
|
2867
2863
|
for (; me(c) && !Xe(c); ) {
|
|
2868
|
-
const l = pe(c), a =
|
|
2869
|
-
!a && l.position === "fixed" && (o = null), (s ? !a && !o : !a && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) ||
|
|
2864
|
+
const l = pe(c), a = fn(c);
|
|
2865
|
+
!a && l.position === "fixed" && (o = null), (s ? !a && !o : !a && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || lt(c) && !a && br(e, c)) ? n = n.filter((m) => m !== c) : o = l, c = Ie(c);
|
|
2870
2866
|
}
|
|
2871
2867
|
return t.set(e, n), n;
|
|
2872
2868
|
}
|
|
@@ -2878,9 +2874,9 @@ function Hi(e) {
|
|
|
2878
2874
|
strategy: o
|
|
2879
2875
|
} = e;
|
|
2880
2876
|
const c = [...r === "clippingAncestors" ? Tt(t) ? [] : Vi(t, this._c) : [].concat(r), n], l = c[0], a = c.reduce((u, m) => {
|
|
2881
|
-
const f =
|
|
2882
|
-
return u.top = oe(f.top, u.top), u.right =
|
|
2883
|
-
},
|
|
2877
|
+
const f = Ln(t, m, o);
|
|
2878
|
+
return u.top = oe(f.top, u.top), u.right = _e(f.right, u.right), u.bottom = _e(f.bottom, u.bottom), u.left = oe(f.left, u.left), u;
|
|
2879
|
+
}, Ln(t, l, o));
|
|
2884
2880
|
return {
|
|
2885
2881
|
width: a.right - a.left,
|
|
2886
2882
|
height: a.bottom - a.top,
|
|
@@ -2892,29 +2888,29 @@ function Bi(e) {
|
|
|
2892
2888
|
const {
|
|
2893
2889
|
width: t,
|
|
2894
2890
|
height: r
|
|
2895
|
-
} =
|
|
2891
|
+
} = vr(e);
|
|
2896
2892
|
return {
|
|
2897
2893
|
width: t,
|
|
2898
2894
|
height: r
|
|
2899
2895
|
};
|
|
2900
2896
|
}
|
|
2901
2897
|
function Wi(e, t, r) {
|
|
2902
|
-
const n =
|
|
2898
|
+
const n = be(t), o = we(t), s = r === "fixed", c = He(e, !0, s, t);
|
|
2903
2899
|
let l = {
|
|
2904
2900
|
scrollLeft: 0,
|
|
2905
2901
|
scrollTop: 0
|
|
2906
2902
|
};
|
|
2907
2903
|
const a = ye(0);
|
|
2908
2904
|
function u() {
|
|
2909
|
-
a.x =
|
|
2905
|
+
a.x = pn(o);
|
|
2910
2906
|
}
|
|
2911
2907
|
if (n || !n && !s)
|
|
2912
|
-
if ((Qe(t) !== "body" ||
|
|
2908
|
+
if ((Qe(t) !== "body" || lt(o)) && (l = _t(t)), n) {
|
|
2913
2909
|
const d = He(t, !0, s, t);
|
|
2914
2910
|
a.x = d.x + t.clientLeft, a.y = d.y + t.clientTop;
|
|
2915
2911
|
} else o && u();
|
|
2916
2912
|
s && !n && o && u();
|
|
2917
|
-
const m = o && !n && !s ?
|
|
2913
|
+
const m = o && !n && !s ? yr(o, l) : ye(0), f = c.left + l.scrollLeft - a.x - m.x, i = c.top + l.scrollTop - a.y - m.y;
|
|
2918
2914
|
return {
|
|
2919
2915
|
x: f,
|
|
2920
2916
|
y: i,
|
|
@@ -2922,36 +2918,36 @@ function Wi(e, t, r) {
|
|
|
2922
2918
|
height: c.height
|
|
2923
2919
|
};
|
|
2924
2920
|
}
|
|
2925
|
-
function
|
|
2921
|
+
function kt(e) {
|
|
2926
2922
|
return pe(e).position === "static";
|
|
2927
2923
|
}
|
|
2928
|
-
function
|
|
2929
|
-
if (!
|
|
2924
|
+
function Mn(e, t) {
|
|
2925
|
+
if (!be(e) || pe(e).position === "fixed")
|
|
2930
2926
|
return null;
|
|
2931
2927
|
if (t)
|
|
2932
2928
|
return t(e);
|
|
2933
2929
|
let r = e.offsetParent;
|
|
2934
|
-
return
|
|
2930
|
+
return we(e) === r && (r = r.ownerDocument.body), r;
|
|
2935
2931
|
}
|
|
2936
2932
|
function wr(e, t) {
|
|
2937
2933
|
const r = ie(e);
|
|
2938
2934
|
if (Tt(e))
|
|
2939
2935
|
return r;
|
|
2940
|
-
if (!
|
|
2936
|
+
if (!be(e)) {
|
|
2941
2937
|
let o = Ie(e);
|
|
2942
2938
|
for (; o && !Xe(o); ) {
|
|
2943
|
-
if (me(o) && !
|
|
2939
|
+
if (me(o) && !kt(o))
|
|
2944
2940
|
return o;
|
|
2945
2941
|
o = Ie(o);
|
|
2946
2942
|
}
|
|
2947
2943
|
return r;
|
|
2948
2944
|
}
|
|
2949
|
-
let n =
|
|
2950
|
-
for (; n &&
|
|
2951
|
-
n =
|
|
2952
|
-
return n && Xe(n) &&
|
|
2945
|
+
let n = Mn(e, t);
|
|
2946
|
+
for (; n && _i(n) && kt(n); )
|
|
2947
|
+
n = Mn(n, t);
|
|
2948
|
+
return n && Xe(n) && kt(n) && !fn(n) ? r : n || Ri(e) || r;
|
|
2953
2949
|
}
|
|
2954
|
-
const
|
|
2950
|
+
const zi = async function(e) {
|
|
2955
2951
|
const t = this.getOffsetParent || wr, r = this.getDimensions, n = await r(e.floating);
|
|
2956
2952
|
return {
|
|
2957
2953
|
reference: Wi(e.reference, await t(e.floating), e.strategy),
|
|
@@ -2963,27 +2959,27 @@ const ji = async function(e) {
|
|
|
2963
2959
|
}
|
|
2964
2960
|
};
|
|
2965
2961
|
};
|
|
2966
|
-
function
|
|
2962
|
+
function ji(e) {
|
|
2967
2963
|
return pe(e).direction === "rtl";
|
|
2968
2964
|
}
|
|
2969
2965
|
const Ki = {
|
|
2970
2966
|
convertOffsetParentRelativeRectToViewportRelativeRect: Li,
|
|
2971
|
-
getDocumentElement:
|
|
2967
|
+
getDocumentElement: we,
|
|
2972
2968
|
getClippingRect: Hi,
|
|
2973
2969
|
getOffsetParent: wr,
|
|
2974
|
-
getElementRects:
|
|
2970
|
+
getElementRects: zi,
|
|
2975
2971
|
getClientRects: Mi,
|
|
2976
2972
|
getDimensions: Bi,
|
|
2977
2973
|
getScale: Ye,
|
|
2978
2974
|
isElement: me,
|
|
2979
|
-
isRTL:
|
|
2975
|
+
isRTL: ji
|
|
2980
2976
|
};
|
|
2981
|
-
function
|
|
2977
|
+
function xr(e, t) {
|
|
2982
2978
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
2983
2979
|
}
|
|
2984
2980
|
function qi(e, t) {
|
|
2985
2981
|
let r = null, n;
|
|
2986
|
-
const o =
|
|
2982
|
+
const o = we(e);
|
|
2987
2983
|
function s() {
|
|
2988
2984
|
var l;
|
|
2989
2985
|
clearTimeout(n), (l = r) == null || l.disconnect(), r = null;
|
|
@@ -2998,9 +2994,9 @@ function qi(e, t) {
|
|
|
2998
2994
|
} = u;
|
|
2999
2995
|
if (l || t(), !i || !d)
|
|
3000
2996
|
return;
|
|
3001
|
-
const p =
|
|
3002
|
-
rootMargin: -p + "px " + -h + "px " + -x + "px " + -
|
|
3003
|
-
threshold: oe(0,
|
|
2997
|
+
const p = ht(f), h = ht(o.clientWidth - (m + i)), x = ht(o.clientHeight - (f + d)), b = ht(m), E = {
|
|
2998
|
+
rootMargin: -p + "px " + -h + "px " + -x + "px " + -b + "px",
|
|
2999
|
+
threshold: oe(0, _e(1, a)) || 1
|
|
3004
3000
|
};
|
|
3005
3001
|
let g = !0;
|
|
3006
3002
|
function v(O) {
|
|
@@ -3012,7 +3008,7 @@ function qi(e, t) {
|
|
|
3012
3008
|
c(!1, 1e-7);
|
|
3013
3009
|
}, 1e3);
|
|
3014
3010
|
}
|
|
3015
|
-
S === 1 && !
|
|
3011
|
+
S === 1 && !xr(u, e.getBoundingClientRect()) && c(), g = !1;
|
|
3016
3012
|
}
|
|
3017
3013
|
try {
|
|
3018
3014
|
r = new IntersectionObserver(v, {
|
|
@@ -3035,17 +3031,17 @@ function Ui(e, t, r, n) {
|
|
|
3035
3031
|
elementResize: c = typeof ResizeObserver == "function",
|
|
3036
3032
|
layoutShift: l = typeof IntersectionObserver == "function",
|
|
3037
3033
|
animationFrame: a = !1
|
|
3038
|
-
} = n, u =
|
|
3039
|
-
m.forEach((
|
|
3040
|
-
o &&
|
|
3034
|
+
} = n, u = mn(e), m = o || s ? [...u ? at(u) : [], ...at(t)] : [];
|
|
3035
|
+
m.forEach((b) => {
|
|
3036
|
+
o && b.addEventListener("scroll", r, {
|
|
3041
3037
|
passive: !0
|
|
3042
|
-
}), s &&
|
|
3038
|
+
}), s && b.addEventListener("resize", r);
|
|
3043
3039
|
});
|
|
3044
3040
|
const f = u && l ? qi(u, r) : null;
|
|
3045
3041
|
let i = -1, d = null;
|
|
3046
|
-
c && (d = new ResizeObserver((
|
|
3047
|
-
let [
|
|
3048
|
-
|
|
3042
|
+
c && (d = new ResizeObserver((b) => {
|
|
3043
|
+
let [w] = b;
|
|
3044
|
+
w && w.target === u && d && (d.unobserve(t), cancelAnimationFrame(i), i = requestAnimationFrame(() => {
|
|
3049
3045
|
var E;
|
|
3050
3046
|
(E = d) == null || E.observe(t);
|
|
3051
3047
|
})), r();
|
|
@@ -3053,17 +3049,17 @@ function Ui(e, t, r, n) {
|
|
|
3053
3049
|
let p, h = a ? He(e) : null;
|
|
3054
3050
|
a && x();
|
|
3055
3051
|
function x() {
|
|
3056
|
-
const
|
|
3057
|
-
h && !
|
|
3052
|
+
const b = He(e);
|
|
3053
|
+
h && !xr(h, b) && r(), h = b, p = requestAnimationFrame(x);
|
|
3058
3054
|
}
|
|
3059
3055
|
return r(), () => {
|
|
3060
|
-
var
|
|
3061
|
-
m.forEach((
|
|
3062
|
-
o &&
|
|
3063
|
-
}), f == null || f(), (
|
|
3056
|
+
var b;
|
|
3057
|
+
m.forEach((w) => {
|
|
3058
|
+
o && w.removeEventListener("scroll", r), s && w.removeEventListener("resize", r);
|
|
3059
|
+
}), f == null || f(), (b = d) == null || b.disconnect(), d = null, a && cancelAnimationFrame(p);
|
|
3064
3060
|
};
|
|
3065
3061
|
}
|
|
3066
|
-
const Yi = Di, Gi =
|
|
3062
|
+
const Yi = Di, Gi = Ci, Xi = Oi, Ji = Ti, Zi = Si, Qi = Ai, es = (e, t, r) => {
|
|
3067
3063
|
const n = /* @__PURE__ */ new Map(), o = {
|
|
3068
3064
|
platform: Ki,
|
|
3069
3065
|
...r
|
|
@@ -3077,7 +3073,7 @@ const Yi = Di, Gi = Ai, Xi = Oi, Ji = _i, Zi = Si, Qi = Ti, es = (e, t, r) => {
|
|
|
3077
3073
|
});
|
|
3078
3074
|
};
|
|
3079
3075
|
var ts = "div";
|
|
3080
|
-
function
|
|
3076
|
+
function Nn(e = 0, t = 0, r = 0, n = 0) {
|
|
3081
3077
|
if (typeof DOMRect == "function")
|
|
3082
3078
|
return new DOMRect(e, t, r, n);
|
|
3083
3079
|
const o = {
|
|
@@ -3090,12 +3086,12 @@ function Mn(e = 0, t = 0, r = 0, n = 0) {
|
|
|
3090
3086
|
bottom: t + n,
|
|
3091
3087
|
left: e
|
|
3092
3088
|
};
|
|
3093
|
-
return W(
|
|
3089
|
+
return W(_({}, o), { toJSON: () => o });
|
|
3094
3090
|
}
|
|
3095
3091
|
function ns(e) {
|
|
3096
|
-
if (!e) return
|
|
3092
|
+
if (!e) return Nn();
|
|
3097
3093
|
const { x: t, y: r, width: n, height: o } = e;
|
|
3098
|
-
return
|
|
3094
|
+
return Nn(t, r, n, o);
|
|
3099
3095
|
}
|
|
3100
3096
|
function rs(e, t) {
|
|
3101
3097
|
return {
|
|
@@ -3109,7 +3105,7 @@ function rs(e, t) {
|
|
|
3109
3105
|
function os(e) {
|
|
3110
3106
|
return /^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e);
|
|
3111
3107
|
}
|
|
3112
|
-
function
|
|
3108
|
+
function kn(e) {
|
|
3113
3109
|
const t = window.devicePixelRatio || 1;
|
|
3114
3110
|
return Math.round(e * t) / t;
|
|
3115
3111
|
}
|
|
@@ -3186,8 +3182,8 @@ var ls = ee(
|
|
|
3186
3182
|
sameWidth: p = !1,
|
|
3187
3183
|
fitViewport: h = !1,
|
|
3188
3184
|
gutter: x,
|
|
3189
|
-
arrowPadding:
|
|
3190
|
-
overflowPadding:
|
|
3185
|
+
arrowPadding: b = 4,
|
|
3186
|
+
overflowPadding: w = 8,
|
|
3191
3187
|
getAnchorRect: E,
|
|
3192
3188
|
updatePosition: g
|
|
3193
3189
|
} = r, v = se(r, [
|
|
@@ -3210,30 +3206,30 @@ var ls = ee(
|
|
|
3210
3206
|
"getAnchorRect",
|
|
3211
3207
|
"updatePosition"
|
|
3212
3208
|
]);
|
|
3213
|
-
const O =
|
|
3209
|
+
const O = Ct();
|
|
3214
3210
|
n = n || O, Fe(
|
|
3215
3211
|
n,
|
|
3216
3212
|
process.env.NODE_ENV !== "production" && "Popover must receive a `store` prop or be wrapped in a PopoverProvider component."
|
|
3217
3213
|
);
|
|
3218
|
-
const S = n.useState("arrowElement"), $ = n.useState("anchorElement"),
|
|
3219
|
-
|
|
3214
|
+
const S = n.useState("arrowElement"), $ = n.useState("anchorElement"), C = n.useState("disclosureElement"), R = n.useState("popoverElement"), B = n.useState("contentElement"), L = n.useState("placement"), y = n.useState("mounted"), D = n.useState("rendered"), A = Y(null), [M, I] = le(!1), { portalRef: V, domReady: T } = zn(s, v.portalRef), k = ue(E), q = ue(g), We = !!g;
|
|
3215
|
+
j(() => {
|
|
3220
3216
|
if (!(R != null && R.isConnected)) return;
|
|
3221
3217
|
R.style.setProperty(
|
|
3222
3218
|
"--popover-overflow-padding",
|
|
3223
|
-
`${
|
|
3219
|
+
`${w}px`
|
|
3224
3220
|
);
|
|
3225
3221
|
const ae = rs($, k), te = async () => {
|
|
3226
3222
|
if (!y) return;
|
|
3227
|
-
S || (
|
|
3228
|
-
const Ee = S ||
|
|
3223
|
+
S || (A.current = A.current || document.createElement("div"));
|
|
3224
|
+
const Ee = S || A.current, Le = [
|
|
3229
3225
|
is(Ee, { gutter: x, shift: f }),
|
|
3230
|
-
ss({ flip: m, overflowPadding:
|
|
3231
|
-
as({ slide: i, overlap: d, overflowPadding:
|
|
3232
|
-
us(Ee, { arrowPadding:
|
|
3226
|
+
ss({ flip: m, overflowPadding: w }),
|
|
3227
|
+
as({ slide: i, overlap: d, overflowPadding: w }),
|
|
3228
|
+
us(Ee, { arrowPadding: b }),
|
|
3233
3229
|
cs({
|
|
3234
3230
|
sameWidth: p,
|
|
3235
3231
|
fitViewport: h,
|
|
3236
|
-
overflowPadding:
|
|
3232
|
+
overflowPadding: w
|
|
3237
3233
|
})
|
|
3238
3234
|
], ge = await es(ae, R, {
|
|
3239
3235
|
placement: L,
|
|
@@ -3241,13 +3237,13 @@ var ls = ee(
|
|
|
3241
3237
|
middleware: Le
|
|
3242
3238
|
});
|
|
3243
3239
|
n == null || n.setState("currentPlacement", ge.placement), I(!0);
|
|
3244
|
-
const
|
|
3240
|
+
const ft = kn(ge.x), dt = kn(ge.y);
|
|
3245
3241
|
if (Object.assign(R.style, {
|
|
3246
3242
|
top: "0",
|
|
3247
3243
|
left: "0",
|
|
3248
|
-
transform: `translate3d(${
|
|
3244
|
+
transform: `translate3d(${ft}px,${dt}px,0)`
|
|
3249
3245
|
}), Ee && ge.middlewareData.arrow) {
|
|
3250
|
-
const { x: Me, y:
|
|
3246
|
+
const { x: Me, y: je } = ge.middlewareData.arrow, mt = ge.placement.split("-")[0], Ke = Ee.clientWidth / 2, qe = Ee.clientHeight / 2, P = Me != null ? Me + Ke : -Ke, F = je != null ? je + qe : -qe;
|
|
3251
3247
|
R.style.setProperty(
|
|
3252
3248
|
"--popover-transform-origin",
|
|
3253
3249
|
{
|
|
@@ -3255,21 +3251,21 @@ var ls = ee(
|
|
|
3255
3251
|
bottom: `${P}px ${-qe}px`,
|
|
3256
3252
|
left: `calc(100% + ${Ke}px) ${F}px`,
|
|
3257
3253
|
right: `${-Ke}px ${F}px`
|
|
3258
|
-
}[
|
|
3254
|
+
}[mt]
|
|
3259
3255
|
), Object.assign(Ee.style, {
|
|
3260
3256
|
left: Me != null ? `${Me}px` : "",
|
|
3261
|
-
top:
|
|
3262
|
-
[
|
|
3257
|
+
top: je != null ? `${je}px` : "",
|
|
3258
|
+
[mt]: "100%"
|
|
3263
3259
|
});
|
|
3264
3260
|
}
|
|
3265
|
-
},
|
|
3261
|
+
}, ze = Ui(ae, R, async () => {
|
|
3266
3262
|
We ? (await q({ updatePosition: te }), I(!0)) : await te();
|
|
3267
3263
|
}, {
|
|
3268
3264
|
// JSDOM doesn't support ResizeObserver
|
|
3269
3265
|
elementResize: typeof ResizeObserver == "function"
|
|
3270
3266
|
});
|
|
3271
3267
|
return () => {
|
|
3272
|
-
I(!1),
|
|
3268
|
+
I(!1), ze();
|
|
3273
3269
|
};
|
|
3274
3270
|
}, [
|
|
3275
3271
|
n,
|
|
@@ -3280,7 +3276,7 @@ var ls = ee(
|
|
|
3280
3276
|
R,
|
|
3281
3277
|
L,
|
|
3282
3278
|
y,
|
|
3283
|
-
|
|
3279
|
+
T,
|
|
3284
3280
|
u,
|
|
3285
3281
|
m,
|
|
3286
3282
|
f,
|
|
@@ -3289,13 +3285,13 @@ var ls = ee(
|
|
|
3289
3285
|
p,
|
|
3290
3286
|
h,
|
|
3291
3287
|
x,
|
|
3292
|
-
w,
|
|
3293
3288
|
b,
|
|
3289
|
+
w,
|
|
3294
3290
|
k,
|
|
3295
3291
|
We,
|
|
3296
3292
|
q
|
|
3297
|
-
]),
|
|
3298
|
-
if (!y || !
|
|
3293
|
+
]), j(() => {
|
|
3294
|
+
if (!y || !T || !(R != null && R.isConnected) || !(B != null && B.isConnected)) return;
|
|
3299
3295
|
const ae = () => {
|
|
3300
3296
|
R.style.zIndex = getComputedStyle(B).zIndex;
|
|
3301
3297
|
};
|
|
@@ -3304,14 +3300,14 @@ var ls = ee(
|
|
|
3304
3300
|
te = requestAnimationFrame(ae);
|
|
3305
3301
|
});
|
|
3306
3302
|
return () => cancelAnimationFrame(te);
|
|
3307
|
-
}, [y,
|
|
3303
|
+
}, [y, T, R, B]);
|
|
3308
3304
|
const et = u ? "fixed" : "absolute";
|
|
3309
3305
|
return v = fe(
|
|
3310
3306
|
v,
|
|
3311
3307
|
(ae) => /* @__PURE__ */ H(
|
|
3312
3308
|
"div",
|
|
3313
|
-
W(
|
|
3314
|
-
style:
|
|
3309
|
+
W(_({}, a), {
|
|
3310
|
+
style: _({
|
|
3315
3311
|
// https://floating-ui.com/docs/computeposition#initial-layout
|
|
3316
3312
|
position: et,
|
|
3317
3313
|
top: 0,
|
|
@@ -3325,118 +3321,118 @@ var ls = ee(
|
|
|
3325
3321
|
[n, et, a]
|
|
3326
3322
|
), v = fe(
|
|
3327
3323
|
v,
|
|
3328
|
-
(ae) => /* @__PURE__ */ H(
|
|
3324
|
+
(ae) => /* @__PURE__ */ H(Gt, { value: n, children: ae }),
|
|
3329
3325
|
[n]
|
|
3330
|
-
), v = W(
|
|
3326
|
+
), v = W(_({
|
|
3331
3327
|
// data-placing is not part of the public API. We're setting this here so
|
|
3332
3328
|
// we can wait for the popover to be positioned before other components
|
|
3333
3329
|
// move focus into it. For example, this attribute is observed by the
|
|
3334
3330
|
// Combobox component with the autoSelect behavior.
|
|
3335
3331
|
"data-placing": !M || void 0
|
|
3336
3332
|
}, v), {
|
|
3337
|
-
style:
|
|
3333
|
+
style: _({
|
|
3338
3334
|
position: "relative"
|
|
3339
3335
|
}, v.style)
|
|
3340
|
-
}), v =
|
|
3336
|
+
}), v = fr(W(_({
|
|
3341
3337
|
store: n,
|
|
3342
3338
|
modal: o,
|
|
3343
3339
|
portal: s,
|
|
3344
3340
|
preserveTabOrder: c,
|
|
3345
|
-
preserveTabOrderAnchor:
|
|
3341
|
+
preserveTabOrderAnchor: C || $,
|
|
3346
3342
|
autoFocusOnShow: M && l
|
|
3347
3343
|
}, v), {
|
|
3348
3344
|
portalRef: V
|
|
3349
3345
|
})), v;
|
|
3350
3346
|
}
|
|
3351
3347
|
);
|
|
3352
|
-
|
|
3348
|
+
dr(
|
|
3353
3349
|
K(function(t) {
|
|
3354
3350
|
const r = ls(t);
|
|
3355
3351
|
return Q(ts, r);
|
|
3356
3352
|
}),
|
|
3357
|
-
|
|
3353
|
+
Ct
|
|
3358
3354
|
);
|
|
3359
|
-
var fs = "div",
|
|
3355
|
+
var fs = "div", Er = ee(
|
|
3360
3356
|
function(t) {
|
|
3361
3357
|
var r = t, { store: n } = r, o = se(r, ["store"]);
|
|
3362
|
-
const s =
|
|
3363
|
-
return n = n || s, o = W(
|
|
3358
|
+
const s = Ct();
|
|
3359
|
+
return n = n || s, o = W(_({}, o), {
|
|
3364
3360
|
ref: Be(n == null ? void 0 : n.setAnchorElement, o.ref)
|
|
3365
3361
|
}), o;
|
|
3366
3362
|
}
|
|
3367
3363
|
);
|
|
3368
3364
|
K(function(t) {
|
|
3369
|
-
const r =
|
|
3365
|
+
const r = Er(t);
|
|
3370
3366
|
return Q(fs, r);
|
|
3371
3367
|
});
|
|
3372
|
-
var
|
|
3368
|
+
var Sr = "button", Or = ee(
|
|
3373
3369
|
function(t) {
|
|
3374
|
-
const r = Y(null), n =
|
|
3375
|
-
() => !!n &&
|
|
3370
|
+
const r = Y(null), n = Wr(r, Sr), [o, s] = le(
|
|
3371
|
+
() => !!n && Vt({ tagName: n, type: t.type })
|
|
3376
3372
|
);
|
|
3377
3373
|
return U(() => {
|
|
3378
|
-
r.current && s(
|
|
3379
|
-
}, []), t = W(
|
|
3374
|
+
r.current && s(Vt(r.current));
|
|
3375
|
+
}, []), t = W(_({
|
|
3380
3376
|
role: !o && n !== "a" ? "button" : void 0
|
|
3381
3377
|
}, t), {
|
|
3382
3378
|
ref: Be(r, t.ref)
|
|
3383
|
-
}), t =
|
|
3379
|
+
}), t = ao(t), t;
|
|
3384
3380
|
}
|
|
3385
3381
|
);
|
|
3386
3382
|
K(function(t) {
|
|
3387
|
-
const r =
|
|
3388
|
-
return Q(
|
|
3383
|
+
const r = Or(t);
|
|
3384
|
+
return Q(Sr, r);
|
|
3389
3385
|
});
|
|
3390
|
-
var ds = "button", ms = Symbol("disclosure"),
|
|
3386
|
+
var ds = "button", ms = Symbol("disclosure"), Pr = ee(
|
|
3391
3387
|
function(t) {
|
|
3392
3388
|
var r = t, { store: n, toggleOnClick: o = !0 } = r, s = se(r, ["store", "toggleOnClick"]);
|
|
3393
|
-
const c =
|
|
3389
|
+
const c = Zt();
|
|
3394
3390
|
n = n || c, Fe(
|
|
3395
3391
|
n,
|
|
3396
3392
|
process.env.NODE_ENV !== "production" && "Disclosure must receive a `store` prop or be wrapped in a DisclosureProvider component."
|
|
3397
3393
|
);
|
|
3398
3394
|
const l = Y(null), [a, u] = le(!1), m = n.useState("disclosureElement"), f = n.useState("open");
|
|
3399
3395
|
U(() => {
|
|
3400
|
-
let
|
|
3401
|
-
m != null && m.isConnected || (n == null || n.setDisclosureElement(l.current),
|
|
3396
|
+
let w = m === l.current;
|
|
3397
|
+
m != null && m.isConnected || (n == null || n.setDisclosureElement(l.current), w = !0), u(f && w);
|
|
3402
3398
|
}, [m, n, f]);
|
|
3403
|
-
const i = s.onClick, d = rt(o), [p, h] =
|
|
3404
|
-
i == null || i(
|
|
3405
|
-
}),
|
|
3406
|
-
return s = W(
|
|
3399
|
+
const i = s.onClick, d = rt(o), [p, h] = zr(s, ms, !0), x = ue((w) => {
|
|
3400
|
+
i == null || i(w), !w.defaultPrevented && (p || d(w) && (n == null || n.setDisclosureElement(w.currentTarget), n == null || n.toggle()));
|
|
3401
|
+
}), b = n.useState("contentElement");
|
|
3402
|
+
return s = W(_(_({
|
|
3407
3403
|
"aria-expanded": a,
|
|
3408
|
-
"aria-controls":
|
|
3404
|
+
"aria-controls": b == null ? void 0 : b.id
|
|
3409
3405
|
}, h), s), {
|
|
3410
3406
|
ref: Be(l, s.ref),
|
|
3411
3407
|
onClick: x
|
|
3412
|
-
}), s =
|
|
3408
|
+
}), s = Or(s), s;
|
|
3413
3409
|
}
|
|
3414
3410
|
);
|
|
3415
3411
|
K(function(t) {
|
|
3416
|
-
const r =
|
|
3412
|
+
const r = Pr(t);
|
|
3417
3413
|
return Q(ds, r);
|
|
3418
3414
|
});
|
|
3419
|
-
var ps = "button",
|
|
3415
|
+
var ps = "button", Dr = ee(
|
|
3420
3416
|
function(t) {
|
|
3421
3417
|
var r = t, { store: n } = r, o = se(r, ["store"]);
|
|
3422
|
-
const s =
|
|
3418
|
+
const s = Dt();
|
|
3423
3419
|
n = n || s, Fe(
|
|
3424
3420
|
n,
|
|
3425
3421
|
process.env.NODE_ENV !== "production" && "DialogDisclosure must receive a `store` prop or be wrapped in a DialogProvider component."
|
|
3426
3422
|
);
|
|
3427
3423
|
const c = n.useState("contentElement");
|
|
3428
|
-
return o =
|
|
3424
|
+
return o = _({
|
|
3429
3425
|
"aria-haspopup": jr(c, "dialog")
|
|
3430
|
-
}, o), o =
|
|
3426
|
+
}, o), o = Pr(_({ store: n }, o)), o;
|
|
3431
3427
|
}
|
|
3432
3428
|
);
|
|
3433
3429
|
K(function(t) {
|
|
3434
|
-
const r =
|
|
3430
|
+
const r = Dr(t);
|
|
3435
3431
|
return Q(ps, r);
|
|
3436
3432
|
});
|
|
3437
3433
|
var gs = "button", vs = ee(function(t) {
|
|
3438
3434
|
var r = t, { store: n } = r, o = se(r, ["store"]);
|
|
3439
|
-
const s =
|
|
3435
|
+
const s = Ct();
|
|
3440
3436
|
n = n || s, Fe(
|
|
3441
3437
|
n,
|
|
3442
3438
|
process.env.NODE_ENV !== "production" && "PopoverDisclosure must receive a `store` prop or be wrapped in a PopoverProvider component."
|
|
@@ -3446,30 +3442,30 @@ var gs = "button", vs = ee(function(t) {
|
|
|
3446
3442
|
});
|
|
3447
3443
|
return o = fe(
|
|
3448
3444
|
o,
|
|
3449
|
-
(a) => /* @__PURE__ */ H(
|
|
3445
|
+
(a) => /* @__PURE__ */ H(Gt, { value: n, children: a }),
|
|
3450
3446
|
[n]
|
|
3451
|
-
), o = W(
|
|
3447
|
+
), o = W(_({}, o), {
|
|
3452
3448
|
onClick: l
|
|
3453
|
-
}), o =
|
|
3449
|
+
}), o = Er(_({ store: n }, o)), o = Dr(_({ store: n }, o)), o;
|
|
3454
3450
|
});
|
|
3455
3451
|
K(function(t) {
|
|
3456
3452
|
const r = vs(t);
|
|
3457
3453
|
return Q(gs, r);
|
|
3458
3454
|
});
|
|
3459
3455
|
var hs = "div", Oe = "";
|
|
3460
|
-
function
|
|
3456
|
+
function $t() {
|
|
3461
3457
|
Oe = "";
|
|
3462
3458
|
}
|
|
3463
3459
|
function ys(e) {
|
|
3464
3460
|
const t = e.target;
|
|
3465
|
-
return t &&
|
|
3461
|
+
return t && Jt(t) ? !1 : e.key === " " && Oe.length ? !0 : e.key.length === 1 && !e.ctrlKey && !e.altKey && !e.metaKey && /^[\p{Letter}\p{Number}]$/u.test(e.key);
|
|
3466
3462
|
}
|
|
3467
|
-
function
|
|
3463
|
+
function bs(e, t) {
|
|
3468
3464
|
if (Ne(e)) return !0;
|
|
3469
3465
|
const r = e.target;
|
|
3470
3466
|
return r ? t.some((o) => o.element === r) : !1;
|
|
3471
3467
|
}
|
|
3472
|
-
function
|
|
3468
|
+
function ws(e) {
|
|
3473
3469
|
return e.filter((t) => !t.disabled);
|
|
3474
3470
|
}
|
|
3475
3471
|
function wt(e, t) {
|
|
@@ -3479,19 +3475,19 @@ function wt(e, t) {
|
|
|
3479
3475
|
// component that can be used with those as well, we also consider the value
|
|
3480
3476
|
// property as a fallback for the typeahead text content.
|
|
3481
3477
|
"value" in e && e.value;
|
|
3482
|
-
return n ?
|
|
3478
|
+
return n ? qr(n).trim().toLowerCase().startsWith(t.toLowerCase()) : !1;
|
|
3483
3479
|
}
|
|
3484
3480
|
function xs(e, t, r) {
|
|
3485
3481
|
if (!r) return e;
|
|
3486
3482
|
const n = e.find((o) => o.id === r);
|
|
3487
|
-
return !n || !wt(n, t) || Oe !== t && wt(n, Oe) ? e : (Oe = t,
|
|
3483
|
+
return !n || !wt(n, t) || Oe !== t && wt(n, Oe) ? e : (Oe = t, co(
|
|
3488
3484
|
e.filter((o) => wt(o, Oe)),
|
|
3489
3485
|
r
|
|
3490
3486
|
).filter((o) => o.id !== r));
|
|
3491
3487
|
}
|
|
3492
3488
|
var Es = ee(function(t) {
|
|
3493
3489
|
var r = t, { store: n, typeahead: o = !0 } = r, s = se(r, ["store", "typeahead"]);
|
|
3494
|
-
const c =
|
|
3490
|
+
const c = Kr();
|
|
3495
3491
|
n = n || c, Fe(
|
|
3496
3492
|
n,
|
|
3497
3493
|
process.env.NODE_ENV !== "production" && "CompositeTypeahead must be a Composite component"
|
|
@@ -3499,46 +3495,54 @@ var Es = ee(function(t) {
|
|
|
3499
3495
|
const l = s.onKeyDownCapture, a = Y(0), u = ue((m) => {
|
|
3500
3496
|
if (l == null || l(m), m.defaultPrevented || !o || !n) return;
|
|
3501
3497
|
if (!ys(m))
|
|
3502
|
-
return
|
|
3498
|
+
return $t();
|
|
3503
3499
|
const { renderedItems: f, items: i, activeId: d, id: p } = n.getState();
|
|
3504
|
-
let h =
|
|
3500
|
+
let h = ws(
|
|
3505
3501
|
i.length > f.length ? i : f
|
|
3506
3502
|
);
|
|
3507
|
-
const x = G(m.currentTarget),
|
|
3508
|
-
for (const v of
|
|
3503
|
+
const x = G(m.currentTarget), b = `[data-offscreen-id="${p}"]`, w = x.querySelectorAll(b);
|
|
3504
|
+
for (const v of w) {
|
|
3509
3505
|
const O = v.ariaDisabled === "true" || "disabled" in v && !!v.disabled;
|
|
3510
3506
|
h.push({ id: v.id, element: v, disabled: O });
|
|
3511
3507
|
}
|
|
3512
|
-
if (
|
|
3508
|
+
if (w.length && (h = $n(h, (v) => v.element)), !bs(m, h)) return $t();
|
|
3513
3509
|
m.preventDefault(), window.clearTimeout(a.current), a.current = window.setTimeout(() => {
|
|
3514
3510
|
Oe = "";
|
|
3515
3511
|
}, 500);
|
|
3516
3512
|
const E = m.key.toLowerCase();
|
|
3517
3513
|
Oe += E, h = xs(h, E, d);
|
|
3518
3514
|
const g = h.find((v) => wt(v, Oe));
|
|
3519
|
-
g ? n.move(g.id) :
|
|
3515
|
+
g ? n.move(g.id) : $t();
|
|
3520
3516
|
});
|
|
3521
|
-
return s = W(
|
|
3517
|
+
return s = W(_({}, s), {
|
|
3522
3518
|
onKeyDownCapture: u
|
|
3523
|
-
}),
|
|
3519
|
+
}), Bn(s);
|
|
3524
3520
|
});
|
|
3525
3521
|
K(function(t) {
|
|
3526
3522
|
const r = Es(t);
|
|
3527
3523
|
return Q(hs, r);
|
|
3528
3524
|
});
|
|
3529
3525
|
export {
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3526
|
+
Ms as C,
|
|
3527
|
+
zt as R,
|
|
3528
|
+
ls as a,
|
|
3529
|
+
dr as b,
|
|
3530
|
+
Vs as c,
|
|
3531
|
+
As as d,
|
|
3532
|
+
Ls as e,
|
|
3533
|
+
_s as f,
|
|
3534
|
+
Co as g,
|
|
3535
|
+
Es as h,
|
|
3536
|
+
Qn as i,
|
|
3537
|
+
vs as j,
|
|
3538
|
+
Ts as k,
|
|
3539
|
+
Er as l,
|
|
3540
|
+
Fs as m,
|
|
3541
|
+
Rs as n,
|
|
3542
|
+
ks as o,
|
|
3543
|
+
$s as p,
|
|
3544
|
+
Is as q,
|
|
3545
|
+
Ns as r,
|
|
3546
|
+
Cs as t,
|
|
3547
|
+
Hs as u
|
|
3544
3548
|
};
|