@sps-woodland/tabs 7.2.1 → 7.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs.js +3 -3
- package/lib/index.es.js +867 -1344
- package/lib/tab/Tab.css.d.ts +1 -1
- package/lib/tabs/Tabs.css.d.ts +1 -1
- package/package.json +21 -21
package/lib/index.es.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { useCollection as
|
|
4
|
-
import { Metadata as
|
|
5
|
-
import { code as
|
|
6
|
-
function
|
|
7
|
-
let [n,
|
|
8
|
-
|
|
9
|
-
let
|
|
10
|
-
let
|
|
11
|
-
r && (Object.is(
|
|
1
|
+
import * as C from "react";
|
|
2
|
+
import ne, { useState as F, useRef as P, useCallback as Y, useMemo as R, useEffect as z, useContext as ie, useLayoutEffect as ft } from "react";
|
|
3
|
+
import { useCollection as dt } from "@react-stately/collections";
|
|
4
|
+
import { Metadata as q, modChildren as pt, cl as Ve, Content as yt, useChildTestIdAttrBuilder as bt } from "@sps-woodland/core";
|
|
5
|
+
import { code as Pe } from "@spscommerce/utils";
|
|
6
|
+
function He(t, e, r) {
|
|
7
|
+
let [n, i] = F(t || e), l = P(t !== void 0), a = l.current, u = t !== void 0, f = P(n);
|
|
8
|
+
a !== u && console.warn(`WARN: A component changed from ${a ? "controlled" : "uncontrolled"} to ${u ? "controlled" : "uncontrolled"}.`), l.current = u;
|
|
9
|
+
let g = Y((h, ...T) => {
|
|
10
|
+
let v = (b, ...E) => {
|
|
11
|
+
r && (Object.is(f.current, b) || r(b, ...E)), u || (f.current = b);
|
|
12
12
|
};
|
|
13
|
-
typeof
|
|
14
|
-
let
|
|
15
|
-
return
|
|
16
|
-
})) : (
|
|
13
|
+
typeof h == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), i((E, ...M) => {
|
|
14
|
+
let x = h(u ? f.current : E, ...M);
|
|
15
|
+
return v(x, ...T), u ? E : x;
|
|
16
|
+
})) : (u || i(h), v(h, ...T));
|
|
17
17
|
}, [
|
|
18
|
-
|
|
18
|
+
u,
|
|
19
19
|
r
|
|
20
20
|
]);
|
|
21
|
-
return
|
|
21
|
+
return u ? f.current = t : t = n, [
|
|
22
22
|
t,
|
|
23
|
-
|
|
23
|
+
g
|
|
24
24
|
];
|
|
25
25
|
}
|
|
26
|
-
class
|
|
26
|
+
class I extends Set {
|
|
27
27
|
constructor(e, r, n) {
|
|
28
|
-
super(e), e instanceof
|
|
28
|
+
super(e), e instanceof I ? (this.anchorKey = r || e.anchorKey, this.currentKey = n || e.currentKey) : (this.anchorKey = r, this.currentKey = n);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function gt(t, e) {
|
|
32
32
|
if (t.size !== e.size)
|
|
33
33
|
return !1;
|
|
34
34
|
for (let r of t)
|
|
@@ -36,61 +36,52 @@ function Xt(t, e) {
|
|
|
36
36
|
return !1;
|
|
37
37
|
return !0;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
let { selectionMode: e = "none", disallowEmptySelection: r, allowDuplicateSelectionEvents: n, selectionBehavior:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(),
|
|
52
|
-
[
|
|
53
|
-
t.disabledKeys
|
|
54
|
-
]
|
|
55
|
-
), [M, K] = A(s);
|
|
56
|
-
s === "replace" && M === "toggle" && typeof g == "object" && g.size === 0 && K("replace");
|
|
57
|
-
let P = x(s);
|
|
58
|
-
return D(() => {
|
|
59
|
-
s !== P.current && (K(s), P.current = s);
|
|
39
|
+
function ht(t) {
|
|
40
|
+
let { selectionMode: e = "none", disallowEmptySelection: r, allowDuplicateSelectionEvents: n, selectionBehavior: i = "toggle", disabledBehavior: l = "all" } = t, a = P(!1), [, u] = F(!1), f = P(null), g = P(null), [, h] = F(null), T = R(() => we(t.selectedKeys), [
|
|
41
|
+
t.selectedKeys
|
|
42
|
+
]), v = R(() => we(t.defaultSelectedKeys, new I()), [
|
|
43
|
+
t.defaultSelectedKeys
|
|
44
|
+
]), [b, E] = He(T, v, t.onSelectionChange), M = R(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
|
45
|
+
t.disabledKeys
|
|
46
|
+
]), [x, S] = F(i);
|
|
47
|
+
i === "replace" && x === "toggle" && typeof b == "object" && b.size === 0 && S("replace");
|
|
48
|
+
let L = P(i);
|
|
49
|
+
return z(() => {
|
|
50
|
+
i !== L.current && (S(i), L.current = i);
|
|
60
51
|
}, [
|
|
61
|
-
|
|
52
|
+
i
|
|
62
53
|
]), {
|
|
63
54
|
selectionMode: e,
|
|
64
55
|
disallowEmptySelection: r,
|
|
65
|
-
selectionBehavior:
|
|
66
|
-
setSelectionBehavior:
|
|
56
|
+
selectionBehavior: x,
|
|
57
|
+
setSelectionBehavior: S,
|
|
67
58
|
get isFocused() {
|
|
68
|
-
return
|
|
59
|
+
return a.current;
|
|
69
60
|
},
|
|
70
61
|
setFocused(w) {
|
|
71
|
-
|
|
62
|
+
a.current = w, u(w);
|
|
72
63
|
},
|
|
73
64
|
get focusedKey() {
|
|
74
|
-
return
|
|
65
|
+
return f.current;
|
|
75
66
|
},
|
|
76
67
|
get childFocusStrategy() {
|
|
77
|
-
return
|
|
68
|
+
return g.current;
|
|
78
69
|
},
|
|
79
|
-
setFocusedKey(w,
|
|
80
|
-
|
|
70
|
+
setFocusedKey(w, s = "first") {
|
|
71
|
+
f.current = w, g.current = s, h(w);
|
|
81
72
|
},
|
|
82
|
-
selectedKeys:
|
|
73
|
+
selectedKeys: b,
|
|
83
74
|
setSelectedKeys(w) {
|
|
84
|
-
(n || !
|
|
75
|
+
(n || !gt(w, b)) && E(w);
|
|
85
76
|
},
|
|
86
|
-
disabledKeys:
|
|
77
|
+
disabledKeys: M,
|
|
87
78
|
disabledBehavior: l
|
|
88
79
|
};
|
|
89
80
|
}
|
|
90
|
-
function
|
|
91
|
-
return t ? t === "all" ? "all" : new
|
|
81
|
+
function we(t, e) {
|
|
82
|
+
return t ? t === "all" ? "all" : new I(t) : e;
|
|
92
83
|
}
|
|
93
|
-
class
|
|
84
|
+
class vt {
|
|
94
85
|
get selectionMode() {
|
|
95
86
|
return this.state.selectionMode;
|
|
96
87
|
}
|
|
@@ -116,7 +107,7 @@ class Jt {
|
|
|
116
107
|
return this.state.childFocusStrategy;
|
|
117
108
|
}
|
|
118
109
|
setFocusedKey(e, r) {
|
|
119
|
-
this.state.setFocusedKey(e, r);
|
|
110
|
+
(e == null || this.collection.getItem(e)) && this.state.setFocusedKey(e, r);
|
|
120
111
|
}
|
|
121
112
|
get selectedKeys() {
|
|
122
113
|
return this.state.selectedKeys === "all" ? new Set(this.getSelectAllKeys()) : this.state.selectedKeys;
|
|
@@ -138,9 +129,7 @@ class Jt {
|
|
|
138
129
|
if (this._isSelectAll != null)
|
|
139
130
|
return this._isSelectAll;
|
|
140
131
|
let e = this.getSelectAllKeys(), r = this.state.selectedKeys;
|
|
141
|
-
return this._isSelectAll = e.every(
|
|
142
|
-
(n) => r.has(n)
|
|
143
|
-
), this._isSelectAll;
|
|
132
|
+
return this._isSelectAll = e.every((n) => r.has(n)), this._isSelectAll;
|
|
144
133
|
}
|
|
145
134
|
get firstSelectedKey() {
|
|
146
135
|
let e = null;
|
|
@@ -174,30 +163,30 @@ class Jt {
|
|
|
174
163
|
e = this.getKey(e);
|
|
175
164
|
let r;
|
|
176
165
|
if (this.state.selectedKeys === "all")
|
|
177
|
-
r = new
|
|
166
|
+
r = new I([
|
|
178
167
|
e
|
|
179
168
|
], e, e);
|
|
180
169
|
else {
|
|
181
|
-
let n = this.state.selectedKeys,
|
|
182
|
-
r = new
|
|
183
|
-
for (let l of this.getKeyRange(
|
|
170
|
+
let n = this.state.selectedKeys, i = n.anchorKey || e;
|
|
171
|
+
r = new I(n, i, e);
|
|
172
|
+
for (let l of this.getKeyRange(i, n.currentKey || e))
|
|
184
173
|
r.delete(l);
|
|
185
|
-
for (let l of this.getKeyRange(e,
|
|
174
|
+
for (let l of this.getKeyRange(e, i))
|
|
186
175
|
this.canSelectItem(l) && r.add(l);
|
|
187
176
|
}
|
|
188
177
|
this.state.setSelectedKeys(r);
|
|
189
178
|
}
|
|
190
179
|
getKeyRange(e, r) {
|
|
191
|
-
let n = this.collection.getItem(e),
|
|
192
|
-
return n &&
|
|
180
|
+
let n = this.collection.getItem(e), i = this.collection.getItem(r);
|
|
181
|
+
return n && i ? n.index <= i.index ? this.getKeyRangeInternal(e, r) : this.getKeyRangeInternal(r, e) : [];
|
|
193
182
|
}
|
|
194
183
|
getKeyRangeInternal(e, r) {
|
|
195
|
-
let n = [],
|
|
196
|
-
for (;
|
|
197
|
-
let l = this.collection.getItem(
|
|
198
|
-
if ((l && l.type === "item" || l.type === "cell" && this.allowsCellSelection) && n.push(
|
|
184
|
+
let n = [], i = e;
|
|
185
|
+
for (; i; ) {
|
|
186
|
+
let l = this.collection.getItem(i);
|
|
187
|
+
if ((l && l.type === "item" || l.type === "cell" && this.allowsCellSelection) && n.push(i), i === r)
|
|
199
188
|
return n;
|
|
200
|
-
|
|
189
|
+
i = this.collection.getKeyAfter(i);
|
|
201
190
|
}
|
|
202
191
|
return [];
|
|
203
192
|
}
|
|
@@ -218,21 +207,21 @@ class Jt {
|
|
|
218
207
|
}
|
|
219
208
|
if (e = this.getKey(e), e == null)
|
|
220
209
|
return;
|
|
221
|
-
let r = new
|
|
210
|
+
let r = new I(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
|
|
222
211
|
r.has(e) ? r.delete(e) : this.canSelectItem(e) && (r.add(e), r.anchorKey = e, r.currentKey = e), !(this.disallowEmptySelection && r.size === 0) && this.state.setSelectedKeys(r);
|
|
223
212
|
}
|
|
224
213
|
replaceSelection(e) {
|
|
225
214
|
if (this.selectionMode === "none" || (e = this.getKey(e), e == null))
|
|
226
215
|
return;
|
|
227
|
-
let r = this.canSelectItem(e) ? new
|
|
216
|
+
let r = this.canSelectItem(e) ? new I([
|
|
228
217
|
e
|
|
229
|
-
], e, e) : new
|
|
218
|
+
], e, e) : new I();
|
|
230
219
|
this.state.setSelectedKeys(r);
|
|
231
220
|
}
|
|
232
221
|
setSelectedKeys(e) {
|
|
233
222
|
if (this.selectionMode === "none")
|
|
234
223
|
return;
|
|
235
|
-
let r = new
|
|
224
|
+
let r = new I();
|
|
236
225
|
for (let n of e)
|
|
237
226
|
if (n = this.getKey(n), n != null && (r.add(n), this.selectionMode === "single"))
|
|
238
227
|
break;
|
|
@@ -242,9 +231,9 @@ class Jt {
|
|
|
242
231
|
let e = [], r = (n) => {
|
|
243
232
|
for (; n; ) {
|
|
244
233
|
if (this.canSelectItem(n)) {
|
|
245
|
-
let
|
|
246
|
-
|
|
247
|
-
...
|
|
234
|
+
let i = this.collection.getItem(n);
|
|
235
|
+
i.type === "item" && e.push(n), i.hasChildNodes && (this.allowsCellSelection || i.type !== "item") && r([
|
|
236
|
+
...i.childNodes
|
|
248
237
|
][0].key);
|
|
249
238
|
}
|
|
250
239
|
n = this.collection.getKeyAfter(n);
|
|
@@ -256,7 +245,7 @@ class Jt {
|
|
|
256
245
|
this.selectionMode === "multiple" && this.state.setSelectedKeys("all");
|
|
257
246
|
}
|
|
258
247
|
clearSelection() {
|
|
259
|
-
!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new
|
|
248
|
+
!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new I());
|
|
260
249
|
}
|
|
261
250
|
toggleSelectAll() {
|
|
262
251
|
this.isSelectAll ? this.clearSelection() : this.selectAll();
|
|
@@ -289,13 +278,21 @@ class Jt {
|
|
|
289
278
|
}
|
|
290
279
|
constructor(e, r, n) {
|
|
291
280
|
this.collection = e, this.state = r;
|
|
292
|
-
var
|
|
293
|
-
this.allowsCellSelection = (
|
|
281
|
+
var i;
|
|
282
|
+
this.allowsCellSelection = (i = n == null ? void 0 : n.allowsCellSelection) !== null && i !== void 0 ? i : !1, this._isSelectAll = null;
|
|
294
283
|
}
|
|
295
284
|
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
285
|
+
function ee(t, e, r) {
|
|
286
|
+
return e in t ? Object.defineProperty(t, e, {
|
|
287
|
+
value: r,
|
|
288
|
+
enumerable: !0,
|
|
289
|
+
configurable: !0,
|
|
290
|
+
writable: !0
|
|
291
|
+
}) : t[e] = r, t;
|
|
292
|
+
}
|
|
293
|
+
let $t = Symbol.iterator;
|
|
294
|
+
class Ee {
|
|
295
|
+
*[$t]() {
|
|
299
296
|
yield* this.iterable;
|
|
300
297
|
}
|
|
301
298
|
get size() {
|
|
@@ -328,343 +325,193 @@ class _e {
|
|
|
328
325
|
return this.getItem(r[e]);
|
|
329
326
|
}
|
|
330
327
|
constructor(e) {
|
|
331
|
-
this
|
|
328
|
+
ee(this, "keyMap", /* @__PURE__ */ new Map()), this.iterable = e;
|
|
332
329
|
let r = (l) => {
|
|
333
330
|
if (this.keyMap.set(l.key, l), l.childNodes && l.type === "section")
|
|
334
|
-
for (let
|
|
335
|
-
r(
|
|
331
|
+
for (let a of l.childNodes)
|
|
332
|
+
r(a);
|
|
336
333
|
};
|
|
337
334
|
for (let l of e)
|
|
338
335
|
r(l);
|
|
339
|
-
let n,
|
|
340
|
-
for (let [l,
|
|
341
|
-
n ? (n.nextKey = l,
|
|
336
|
+
let n, i = 0;
|
|
337
|
+
for (let [l, a] of this.keyMap)
|
|
338
|
+
n ? (n.nextKey = l, a.prevKey = n.key) : (this.firstKey = l, a.prevKey = void 0), a.type === "item" && (a.index = i++), n = a, n.nextKey = void 0;
|
|
342
339
|
this.lastKey = n == null ? void 0 : n.key;
|
|
343
340
|
}
|
|
344
341
|
}
|
|
345
|
-
function
|
|
346
|
-
let { filter: e } = t, r =
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
suppressTextValueWarning: t.suppressTextValueWarning
|
|
354
|
-
}),
|
|
355
|
-
[
|
|
356
|
-
t.suppressTextValueWarning
|
|
357
|
-
]
|
|
358
|
-
), u = _t(t, s, l, [
|
|
342
|
+
function mt(t) {
|
|
343
|
+
let { filter: e } = t, r = ht(t), n = R(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
|
344
|
+
t.disabledKeys
|
|
345
|
+
]), i = (u) => e ? new Ee(e(u)) : new Ee(u), l = R(() => ({
|
|
346
|
+
suppressTextValueWarning: t.suppressTextValueWarning
|
|
347
|
+
}), [
|
|
348
|
+
t.suppressTextValueWarning
|
|
349
|
+
]), a = dt(t, i, l, [
|
|
359
350
|
e
|
|
360
351
|
]);
|
|
361
|
-
return
|
|
362
|
-
r.focusedKey != null && !
|
|
352
|
+
return z(() => {
|
|
353
|
+
r.focusedKey != null && !a.getItem(r.focusedKey) && r.setFocusedKey(null);
|
|
363
354
|
}, [
|
|
364
|
-
|
|
355
|
+
a,
|
|
365
356
|
r.focusedKey
|
|
366
357
|
]), {
|
|
367
|
-
collection:
|
|
358
|
+
collection: a,
|
|
368
359
|
disabledKeys: n,
|
|
369
|
-
selectionManager: new
|
|
360
|
+
selectionManager: new vt(a, r)
|
|
370
361
|
};
|
|
371
362
|
}
|
|
372
|
-
function
|
|
363
|
+
function Kt(t) {
|
|
373
364
|
var e;
|
|
374
|
-
let [r, n] =
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
r
|
|
380
|
-
]
|
|
381
|
-
), { collection: l, disabledKeys: u, selectionManager: d } = Qt({
|
|
365
|
+
let [r, n] = He(t.selectedKey, (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : null, t.onSelectionChange), i = R(() => r != null ? [
|
|
366
|
+
r
|
|
367
|
+
] : [], [
|
|
368
|
+
r
|
|
369
|
+
]), { collection: l, disabledKeys: a, selectionManager: u } = mt({
|
|
382
370
|
...t,
|
|
383
371
|
selectionMode: "single",
|
|
384
372
|
disallowEmptySelection: !0,
|
|
385
373
|
allowDuplicateSelectionEvents: !0,
|
|
386
|
-
selectedKeys:
|
|
387
|
-
onSelectionChange: (
|
|
388
|
-
let
|
|
389
|
-
|
|
374
|
+
selectedKeys: i,
|
|
375
|
+
onSelectionChange: (g) => {
|
|
376
|
+
let h = g.values().next().value;
|
|
377
|
+
h === r && t.onSelectionChange && t.onSelectionChange(h), n(h);
|
|
390
378
|
}
|
|
391
|
-
}),
|
|
379
|
+
}), f = r != null ? l.getItem(r) : null;
|
|
392
380
|
return {
|
|
393
381
|
collection: l,
|
|
394
|
-
disabledKeys:
|
|
395
|
-
selectionManager:
|
|
382
|
+
disabledKeys: a,
|
|
383
|
+
selectionManager: u,
|
|
396
384
|
selectedKey: r,
|
|
397
385
|
setSelectedKey: n,
|
|
398
|
-
selectedItem:
|
|
386
|
+
selectedItem: f
|
|
399
387
|
};
|
|
400
388
|
}
|
|
401
|
-
function
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
var r = arguments[e];
|
|
405
|
-
for (var n in r)
|
|
406
|
-
Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]);
|
|
407
|
-
}
|
|
408
|
-
return t;
|
|
409
|
-
}, U.apply(this, arguments);
|
|
410
|
-
}
|
|
411
|
-
function tr(t) {
|
|
412
|
-
let e = er(U({}, t, {
|
|
389
|
+
function Tt(t) {
|
|
390
|
+
let e = Kt({
|
|
391
|
+
...t,
|
|
413
392
|
suppressTextValueWarning: !0
|
|
414
|
-
}));
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
393
|
+
}), { selectionManager: r, collection: n, selectedKey: i } = e, l = P(i), a = i;
|
|
394
|
+
if (r.isEmpty || !n.getItem(a)) {
|
|
395
|
+
for (a = n.getFirstKey(); e.disabledKeys.has(a) && a !== n.getLastKey(); )
|
|
396
|
+
a = n.getKeyAfter(a);
|
|
397
|
+
e.disabledKeys.has(a) && a === n.getLastKey() && (a = n.getFirstKey()), r.setSelectedKeys([
|
|
398
|
+
a
|
|
399
|
+
]);
|
|
400
|
+
}
|
|
401
|
+
return (r.focusedKey == null || !r.isFocused && a !== l.current) && r.setFocusedKey(a), l.current = a, {
|
|
402
|
+
...e,
|
|
403
|
+
isDisabled: t.isDisabled || !1
|
|
404
|
+
};
|
|
419
405
|
}
|
|
420
|
-
const
|
|
406
|
+
const ge = {
|
|
421
407
|
prefix: String(Math.round(Math.random() * 1e10)),
|
|
422
408
|
current: 0
|
|
423
|
-
},
|
|
424
|
-
let
|
|
425
|
-
function
|
|
426
|
-
let e =
|
|
427
|
-
return e ===
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
t
|
|
431
|
-
]
|
|
432
|
-
);
|
|
409
|
+
}, Ge = /* @__PURE__ */ ne.createContext(ge);
|
|
410
|
+
let St = Boolean(typeof window < "u" && window.document && window.document.createElement);
|
|
411
|
+
function Pt(t) {
|
|
412
|
+
let e = ie(Ge);
|
|
413
|
+
return e === ge && !St && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."), R(() => t || `react-aria${e.prefix}-${++e.current}`, [
|
|
414
|
+
t
|
|
415
|
+
]);
|
|
433
416
|
}
|
|
434
|
-
function
|
|
435
|
-
let e =
|
|
436
|
-
return typeof window < "u" && e &&
|
|
417
|
+
function wt() {
|
|
418
|
+
let e = ie(Ge) !== ge, [r, n] = F(e);
|
|
419
|
+
return typeof window < "u" && e && ft(() => {
|
|
437
420
|
n(!1);
|
|
438
421
|
}, []), r;
|
|
439
422
|
}
|
|
440
|
-
|
|
441
|
-
"Arab",
|
|
442
|
-
"Syrc",
|
|
443
|
-
"Samr",
|
|
444
|
-
"Mand",
|
|
445
|
-
"Thaa",
|
|
446
|
-
"Mend",
|
|
447
|
-
"Nkoo",
|
|
448
|
-
"Adlm",
|
|
449
|
-
"Rohg",
|
|
450
|
-
"Hebr"
|
|
451
|
-
]), ar = /* @__PURE__ */ new Set([
|
|
452
|
-
"ae",
|
|
453
|
-
"ar",
|
|
454
|
-
"arc",
|
|
455
|
-
"bcc",
|
|
456
|
-
"bqi",
|
|
457
|
-
"ckb",
|
|
458
|
-
"dv",
|
|
459
|
-
"fa",
|
|
460
|
-
"glk",
|
|
461
|
-
"he",
|
|
462
|
-
"ku",
|
|
463
|
-
"mzn",
|
|
464
|
-
"nqo",
|
|
465
|
-
"pnb",
|
|
466
|
-
"ps",
|
|
467
|
-
"sd",
|
|
468
|
-
"ug",
|
|
469
|
-
"ur",
|
|
470
|
-
"yi"
|
|
471
|
-
]);
|
|
472
|
-
function or(t) {
|
|
473
|
-
if (Intl.Locale) {
|
|
474
|
-
let r = new Intl.Locale(t).maximize().script;
|
|
475
|
-
return sr.has(r);
|
|
476
|
-
}
|
|
477
|
-
let e = t.split("-")[0];
|
|
478
|
-
return ar.has(e);
|
|
479
|
-
}
|
|
480
|
-
function Tt() {
|
|
481
|
-
let t = typeof navigator < "u" && (navigator.language || navigator.userLanguage) || "en-US";
|
|
482
|
-
try {
|
|
483
|
-
Intl.DateTimeFormat.supportedLocalesOf([
|
|
484
|
-
t
|
|
485
|
-
]);
|
|
486
|
-
} catch {
|
|
487
|
-
t = "en-US";
|
|
488
|
-
}
|
|
489
|
-
return {
|
|
490
|
-
locale: t,
|
|
491
|
-
direction: or(t) ? "rtl" : "ltr"
|
|
492
|
-
};
|
|
493
|
-
}
|
|
494
|
-
let Ke = Tt(), re = /* @__PURE__ */ new Set();
|
|
495
|
-
function We() {
|
|
496
|
-
Ke = Tt();
|
|
497
|
-
for (let t of re)
|
|
498
|
-
t(Ke);
|
|
499
|
-
}
|
|
500
|
-
function lr() {
|
|
501
|
-
let t = ir(), [e, r] = A(Ke);
|
|
502
|
-
return D(() => (re.size === 0 && window.addEventListener("languagechange", We), re.add(r), () => {
|
|
503
|
-
re.delete(r), re.size === 0 && window.removeEventListener("languagechange", We);
|
|
504
|
-
}), []), t ? {
|
|
505
|
-
locale: "en-US",
|
|
506
|
-
direction: "ltr"
|
|
507
|
-
} : e;
|
|
508
|
-
}
|
|
509
|
-
const cr = /* @__PURE__ */ Q.createContext(null);
|
|
510
|
-
function Kt() {
|
|
511
|
-
let t = lr();
|
|
512
|
-
return se(cr) || t;
|
|
513
|
-
}
|
|
514
|
-
function Pt(t) {
|
|
423
|
+
function We(t) {
|
|
515
424
|
var e, r, n = "";
|
|
516
425
|
if (typeof t == "string" || typeof t == "number")
|
|
517
426
|
n += t;
|
|
518
427
|
else if (typeof t == "object")
|
|
519
428
|
if (Array.isArray(t))
|
|
520
429
|
for (e = 0; e < t.length; e++)
|
|
521
|
-
t[e] && (r =
|
|
430
|
+
t[e] && (r = We(t[e])) && (n && (n += " "), n += r);
|
|
522
431
|
else
|
|
523
432
|
for (e in t)
|
|
524
433
|
t[e] && (n && (n += " "), n += e);
|
|
525
434
|
return n;
|
|
526
435
|
}
|
|
527
|
-
function
|
|
436
|
+
function Et() {
|
|
528
437
|
for (var t, e, r = 0, n = ""; r < arguments.length; )
|
|
529
|
-
(t = arguments[r++]) && (e =
|
|
438
|
+
(t = arguments[r++]) && (e = We(t)) && (n && (n += " "), n += e);
|
|
530
439
|
return n;
|
|
531
440
|
}
|
|
532
|
-
const
|
|
441
|
+
const se = typeof window < "u" ? ne.useLayoutEffect : () => {
|
|
533
442
|
};
|
|
534
|
-
let
|
|
535
|
-
function
|
|
536
|
-
let [e, r] =
|
|
537
|
-
n.current =
|
|
443
|
+
let te = /* @__PURE__ */ new Map();
|
|
444
|
+
function _e(t) {
|
|
445
|
+
let [e, r] = F(t), n = P(null), i = Pt(e), l = Y((a) => {
|
|
446
|
+
n.current = a;
|
|
538
447
|
}, []);
|
|
539
|
-
return
|
|
540
|
-
let
|
|
448
|
+
return te.set(i, l), se(() => {
|
|
449
|
+
let a = i;
|
|
541
450
|
return () => {
|
|
542
|
-
|
|
451
|
+
te.delete(a);
|
|
543
452
|
};
|
|
544
453
|
}, [
|
|
545
|
-
|
|
546
|
-
]),
|
|
547
|
-
let
|
|
548
|
-
|
|
549
|
-
}),
|
|
550
|
-
}
|
|
551
|
-
function fr(t, e) {
|
|
552
|
-
if (t === e)
|
|
553
|
-
return t;
|
|
554
|
-
let r = ye.get(t);
|
|
555
|
-
if (r)
|
|
556
|
-
return r(e), e;
|
|
557
|
-
let n = ye.get(e);
|
|
558
|
-
return n ? (n(t), t) : e;
|
|
559
|
-
}
|
|
560
|
-
function dr(...t) {
|
|
561
|
-
return (...e) => {
|
|
562
|
-
for (let r of t)
|
|
563
|
-
typeof r == "function" && r(...e);
|
|
564
|
-
};
|
|
565
|
-
}
|
|
566
|
-
function wt(...t) {
|
|
567
|
-
let e = {
|
|
568
|
-
...t[0]
|
|
569
|
-
};
|
|
570
|
-
for (let r = 1; r < t.length; r++) {
|
|
571
|
-
let n = t[r];
|
|
572
|
-
for (let s in n) {
|
|
573
|
-
let l = e[s], u = n[s];
|
|
574
|
-
typeof l == "function" && typeof u == "function" && s[0] === "o" && s[1] === "n" && s.charCodeAt(2) >= 65 && s.charCodeAt(2) <= 90 ? e[s] = dr(l, u) : (s === "className" || s === "UNSAFE_className") && typeof l == "string" && typeof u == "string" ? e[s] = St(l, u) : s === "id" && l && u ? e.id = fr(l, u) : e[s] = u !== void 0 ? u : l;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
return e;
|
|
578
|
-
}
|
|
579
|
-
let te = /* @__PURE__ */ new Map(), je = /* @__PURE__ */ new Set();
|
|
580
|
-
function Ye() {
|
|
581
|
-
if (typeof window > "u")
|
|
582
|
-
return;
|
|
583
|
-
let t = (r) => {
|
|
584
|
-
let n = te.get(r.target);
|
|
585
|
-
n || (n = /* @__PURE__ */ new Set(), te.set(r.target, n), r.target.addEventListener("transitioncancel", e)), n.add(r.propertyName);
|
|
586
|
-
}, e = (r) => {
|
|
587
|
-
let n = te.get(r.target);
|
|
588
|
-
if (!!n && (n.delete(r.propertyName), n.size === 0 && (r.target.removeEventListener("transitioncancel", e), te.delete(r.target)), te.size === 0)) {
|
|
589
|
-
for (let s of je)
|
|
590
|
-
s();
|
|
591
|
-
je.clear();
|
|
592
|
-
}
|
|
593
|
-
};
|
|
594
|
-
document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", e);
|
|
454
|
+
i
|
|
455
|
+
]), z(() => {
|
|
456
|
+
let a = n.current;
|
|
457
|
+
a && (n.current = null, r(a));
|
|
458
|
+
}), i;
|
|
595
459
|
}
|
|
596
|
-
typeof document < "u" && (document.readyState !== "loading" ? Ye() : document.addEventListener("DOMContentLoaded", Ye));
|
|
597
460
|
function xt(t, e) {
|
|
598
|
-
let { id: r, "aria-label": n, "aria-labelledby": s } = t;
|
|
599
|
-
return r = Et(r), s && n ? s = [
|
|
600
|
-
.../* @__PURE__ */ new Set([
|
|
601
|
-
...s.trim().split(/\s+/),
|
|
602
|
-
r
|
|
603
|
-
])
|
|
604
|
-
].join(" ") : s && (s = s.trim().split(/\s+/).join(" ")), !n && !s && e && (n = e), {
|
|
605
|
-
id: r,
|
|
606
|
-
"aria-label": n,
|
|
607
|
-
"aria-labelledby": s
|
|
608
|
-
};
|
|
609
|
-
}
|
|
610
|
-
const Mt = typeof window < "u" ? Q.useLayoutEffect : () => {
|
|
611
|
-
};
|
|
612
|
-
let Xe = /* @__PURE__ */ new Map();
|
|
613
|
-
function pr(t, e) {
|
|
614
461
|
if (t === e)
|
|
615
462
|
return t;
|
|
616
|
-
let r =
|
|
463
|
+
let r = te.get(t);
|
|
617
464
|
if (r)
|
|
618
465
|
return r(e), e;
|
|
619
|
-
let n =
|
|
466
|
+
let n = te.get(e);
|
|
620
467
|
return n ? (n(t), t) : e;
|
|
621
468
|
}
|
|
622
|
-
function
|
|
469
|
+
function Lt(...t) {
|
|
623
470
|
return (...e) => {
|
|
624
471
|
for (let r of t)
|
|
625
472
|
typeof r == "function" && r(...e);
|
|
626
473
|
};
|
|
627
474
|
}
|
|
628
|
-
function
|
|
475
|
+
function U(...t) {
|
|
629
476
|
let e = {
|
|
630
477
|
...t[0]
|
|
631
478
|
};
|
|
632
479
|
for (let r = 1; r < t.length; r++) {
|
|
633
480
|
let n = t[r];
|
|
634
|
-
for (let
|
|
635
|
-
let l = e[
|
|
636
|
-
typeof l == "function" && typeof
|
|
481
|
+
for (let i in n) {
|
|
482
|
+
let l = e[i], a = n[i];
|
|
483
|
+
typeof l == "function" && typeof a == "function" && i[0] === "o" && i[1] === "n" && i.charCodeAt(2) >= 65 && i.charCodeAt(2) <= 90 ? e[i] = Lt(l, a) : (i === "className" || i === "UNSAFE_className") && typeof l == "string" && typeof a == "string" ? e[i] = Et(l, a) : i === "id" && l && a ? e.id = xt(l, a) : e[i] = a !== void 0 ? a : l;
|
|
637
484
|
}
|
|
638
485
|
}
|
|
639
486
|
return e;
|
|
640
487
|
}
|
|
641
|
-
function
|
|
642
|
-
if (
|
|
488
|
+
function N(t) {
|
|
489
|
+
if (Mt())
|
|
643
490
|
t.focus({
|
|
644
491
|
preventScroll: !0
|
|
645
492
|
});
|
|
646
493
|
else {
|
|
647
|
-
let e =
|
|
648
|
-
t.focus(),
|
|
494
|
+
let e = kt(t);
|
|
495
|
+
t.focus(), Dt(e);
|
|
649
496
|
}
|
|
650
497
|
}
|
|
651
|
-
let
|
|
652
|
-
function
|
|
653
|
-
if (
|
|
654
|
-
|
|
498
|
+
let J = null;
|
|
499
|
+
function Mt() {
|
|
500
|
+
if (J == null) {
|
|
501
|
+
J = !1;
|
|
655
502
|
try {
|
|
656
503
|
var t = document.createElement("div");
|
|
657
504
|
t.focus({
|
|
658
505
|
get preventScroll() {
|
|
659
|
-
return
|
|
506
|
+
return J = !0, !0;
|
|
660
507
|
}
|
|
661
508
|
});
|
|
662
509
|
} catch {
|
|
663
510
|
}
|
|
664
511
|
}
|
|
665
|
-
return
|
|
512
|
+
return J;
|
|
666
513
|
}
|
|
667
|
-
function
|
|
514
|
+
function kt(t) {
|
|
668
515
|
for (var e = t.parentNode, r = [], n = document.scrollingElement || document.documentElement; e instanceof HTMLElement && e !== n; )
|
|
669
516
|
(e.offsetHeight < e.scrollHeight || e.offsetWidth < e.scrollWidth) && r.push({
|
|
670
517
|
element: e,
|
|
@@ -677,56 +524,56 @@ function br(t) {
|
|
|
677
524
|
scrollLeft: n.scrollLeft
|
|
678
525
|
}), r;
|
|
679
526
|
}
|
|
680
|
-
function
|
|
527
|
+
function Dt(t) {
|
|
681
528
|
for (let { element: e, scrollTop: r, scrollLeft: n } of t)
|
|
682
529
|
e.scrollTop = r, e.scrollLeft = n;
|
|
683
530
|
}
|
|
684
|
-
let
|
|
685
|
-
function
|
|
531
|
+
let G = /* @__PURE__ */ new Map(), ue = /* @__PURE__ */ new Set();
|
|
532
|
+
function xe() {
|
|
686
533
|
if (typeof window > "u")
|
|
687
534
|
return;
|
|
688
535
|
let t = (r) => {
|
|
689
|
-
let n =
|
|
690
|
-
n || (n = /* @__PURE__ */ new Set(),
|
|
536
|
+
let n = G.get(r.target);
|
|
537
|
+
n || (n = /* @__PURE__ */ new Set(), G.set(r.target, n), r.target.addEventListener("transitioncancel", e)), n.add(r.propertyName);
|
|
691
538
|
}, e = (r) => {
|
|
692
|
-
let n =
|
|
693
|
-
if (!!n && (n.delete(r.propertyName), n.size === 0 && (r.target.removeEventListener("transitioncancel", e),
|
|
694
|
-
for (let
|
|
695
|
-
|
|
696
|
-
|
|
539
|
+
let n = G.get(r.target);
|
|
540
|
+
if (!!n && (n.delete(r.propertyName), n.size === 0 && (r.target.removeEventListener("transitioncancel", e), G.delete(r.target)), G.size === 0)) {
|
|
541
|
+
for (let i of ue)
|
|
542
|
+
i();
|
|
543
|
+
ue.clear();
|
|
697
544
|
}
|
|
698
545
|
};
|
|
699
546
|
document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", e);
|
|
700
547
|
}
|
|
701
|
-
typeof document < "u" && (document.readyState !== "loading" ?
|
|
702
|
-
function
|
|
548
|
+
typeof document < "u" && (document.readyState !== "loading" ? xe() : document.addEventListener("DOMContentLoaded", xe));
|
|
549
|
+
function je(t) {
|
|
703
550
|
requestAnimationFrame(() => {
|
|
704
|
-
|
|
551
|
+
G.size === 0 ? t() : ue.add(t);
|
|
705
552
|
});
|
|
706
553
|
}
|
|
707
|
-
function
|
|
708
|
-
let t =
|
|
709
|
-
let
|
|
710
|
-
t.current.delete(
|
|
711
|
-
} :
|
|
712
|
-
t.current.set(
|
|
554
|
+
function Ye() {
|
|
555
|
+
let t = P(/* @__PURE__ */ new Map()), e = Y((i, l, a, u) => {
|
|
556
|
+
let f = u != null && u.once ? (...g) => {
|
|
557
|
+
t.current.delete(a), a(...g);
|
|
558
|
+
} : a;
|
|
559
|
+
t.current.set(a, {
|
|
713
560
|
type: l,
|
|
714
|
-
eventTarget:
|
|
715
|
-
fn:
|
|
716
|
-
options:
|
|
717
|
-
}),
|
|
718
|
-
}, []), r =
|
|
719
|
-
var
|
|
720
|
-
let
|
|
721
|
-
|
|
722
|
-
}, []), n =
|
|
723
|
-
t.current.forEach((
|
|
724
|
-
r(
|
|
561
|
+
eventTarget: i,
|
|
562
|
+
fn: f,
|
|
563
|
+
options: u
|
|
564
|
+
}), i.addEventListener(l, a, u);
|
|
565
|
+
}, []), r = Y((i, l, a, u) => {
|
|
566
|
+
var f;
|
|
567
|
+
let g = ((f = t.current.get(a)) === null || f === void 0 ? void 0 : f.fn) || a;
|
|
568
|
+
i.removeEventListener(l, g, u), t.current.delete(a);
|
|
569
|
+
}, []), n = Y(() => {
|
|
570
|
+
t.current.forEach((i, l) => {
|
|
571
|
+
r(i.eventTarget, i.type, l, i.options);
|
|
725
572
|
});
|
|
726
573
|
}, [
|
|
727
574
|
r
|
|
728
575
|
]);
|
|
729
|
-
return
|
|
576
|
+
return z(() => n, [
|
|
730
577
|
n
|
|
731
578
|
]), {
|
|
732
579
|
addGlobalListener: e,
|
|
@@ -734,8 +581,21 @@ function De() {
|
|
|
734
581
|
removeAllGlobalListeners: n
|
|
735
582
|
};
|
|
736
583
|
}
|
|
737
|
-
function
|
|
738
|
-
|
|
584
|
+
function qe(t, e) {
|
|
585
|
+
let { id: r, "aria-label": n, "aria-labelledby": i } = t;
|
|
586
|
+
return r = _e(r), i && n ? i = [
|
|
587
|
+
.../* @__PURE__ */ new Set([
|
|
588
|
+
...i.trim().split(/\s+/),
|
|
589
|
+
r
|
|
590
|
+
])
|
|
591
|
+
].join(" ") : i && (i = i.trim().split(/\s+/).join(" ")), !n && !i && e && (n = e), {
|
|
592
|
+
id: r,
|
|
593
|
+
"aria-label": n,
|
|
594
|
+
"aria-labelledby": i
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
function It(t, e) {
|
|
598
|
+
se(() => {
|
|
739
599
|
if (t && t.ref && e)
|
|
740
600
|
return t.ref.current = e.current, () => {
|
|
741
601
|
t.ref.current = null;
|
|
@@ -745,27 +605,27 @@ function Lt(t, e) {
|
|
|
745
605
|
e
|
|
746
606
|
]);
|
|
747
607
|
}
|
|
748
|
-
let
|
|
749
|
-
const
|
|
750
|
-
function
|
|
751
|
-
let [e, r] =
|
|
752
|
-
return
|
|
608
|
+
let Ct = 0;
|
|
609
|
+
const ae = /* @__PURE__ */ new Map();
|
|
610
|
+
function Ft(t) {
|
|
611
|
+
let [e, r] = F(void 0);
|
|
612
|
+
return se(() => {
|
|
753
613
|
if (!t)
|
|
754
614
|
return;
|
|
755
|
-
let n =
|
|
615
|
+
let n = ae.get(t);
|
|
756
616
|
if (n)
|
|
757
617
|
r(n.element.id);
|
|
758
618
|
else {
|
|
759
|
-
let
|
|
760
|
-
r(
|
|
619
|
+
let i = `react-aria-description-${Ct++}`;
|
|
620
|
+
r(i);
|
|
761
621
|
let l = document.createElement("div");
|
|
762
|
-
l.id =
|
|
622
|
+
l.id = i, l.style.display = "none", l.textContent = t, document.body.appendChild(l), n = {
|
|
763
623
|
refCount: 0,
|
|
764
624
|
element: l
|
|
765
|
-
},
|
|
625
|
+
}, ae.set(t, n);
|
|
766
626
|
}
|
|
767
627
|
return n.refCount++, () => {
|
|
768
|
-
--n.refCount === 0 && (n.element.remove(),
|
|
628
|
+
--n.refCount === 0 && (n.element.remove(), ae.delete(t));
|
|
769
629
|
};
|
|
770
630
|
}, [
|
|
771
631
|
t
|
|
@@ -773,44 +633,42 @@ function $r(t) {
|
|
|
773
633
|
"aria-describedby": t ? e : void 0
|
|
774
634
|
};
|
|
775
635
|
}
|
|
776
|
-
function
|
|
636
|
+
function zt(t) {
|
|
777
637
|
var e;
|
|
778
|
-
return typeof window > "u" || window.navigator == null ? !1 : ((e = window.navigator.userAgentData) === null || e === void 0 ? void 0 : e.brands.some(
|
|
779
|
-
(r) => t.test(r.brand)
|
|
780
|
-
)) || t.test(window.navigator.userAgent);
|
|
638
|
+
return typeof window > "u" || window.navigator == null ? !1 : ((e = window.navigator.userAgentData) === null || e === void 0 ? void 0 : e.brands.some((r) => t.test(r.brand))) || t.test(window.navigator.userAgent);
|
|
781
639
|
}
|
|
782
|
-
function
|
|
640
|
+
function he(t) {
|
|
783
641
|
var e;
|
|
784
642
|
return typeof window < "u" && window.navigator != null ? t.test(((e = window.navigator.userAgentData) === null || e === void 0 ? void 0 : e.platform) || window.navigator.platform) : !1;
|
|
785
643
|
}
|
|
786
|
-
function
|
|
787
|
-
return
|
|
644
|
+
function le() {
|
|
645
|
+
return he(/^Mac/i);
|
|
788
646
|
}
|
|
789
|
-
function
|
|
790
|
-
return
|
|
647
|
+
function At() {
|
|
648
|
+
return he(/^iPhone/i);
|
|
791
649
|
}
|
|
792
|
-
function
|
|
793
|
-
return
|
|
650
|
+
function Ot() {
|
|
651
|
+
return he(/^iPad/i) || le() && navigator.maxTouchPoints > 1;
|
|
794
652
|
}
|
|
795
|
-
function
|
|
796
|
-
return
|
|
653
|
+
function ve() {
|
|
654
|
+
return At() || Ot();
|
|
797
655
|
}
|
|
798
|
-
function
|
|
799
|
-
return
|
|
656
|
+
function Rt() {
|
|
657
|
+
return le() || ve();
|
|
800
658
|
}
|
|
801
|
-
function
|
|
802
|
-
return
|
|
659
|
+
function Nt() {
|
|
660
|
+
return zt(/Android/i);
|
|
803
661
|
}
|
|
804
|
-
function
|
|
805
|
-
let
|
|
806
|
-
|
|
662
|
+
function Bt(t, e, r, n) {
|
|
663
|
+
let i = P(r);
|
|
664
|
+
i.current = r;
|
|
807
665
|
let l = r == null;
|
|
808
|
-
|
|
666
|
+
z(() => {
|
|
809
667
|
if (l)
|
|
810
668
|
return;
|
|
811
|
-
let
|
|
812
|
-
return
|
|
813
|
-
|
|
669
|
+
let a = t.current, u = (f) => i.current.call(this, f);
|
|
670
|
+
return a.addEventListener(e, u, n), () => {
|
|
671
|
+
a.removeEventListener(e, u, n);
|
|
814
672
|
};
|
|
815
673
|
}, [
|
|
816
674
|
t,
|
|
@@ -819,81 +677,81 @@ function Er(t, e, r, n) {
|
|
|
819
677
|
l
|
|
820
678
|
]);
|
|
821
679
|
}
|
|
822
|
-
function
|
|
823
|
-
let r =
|
|
824
|
-
r <=
|
|
680
|
+
function Le(t, e) {
|
|
681
|
+
let r = Me(t, e, "left"), n = Me(t, e, "top"), i = e.offsetWidth, l = e.offsetHeight, a = t.scrollLeft, u = t.scrollTop, f = a + t.offsetWidth, g = u + t.offsetHeight;
|
|
682
|
+
r <= a ? a = r : r + i > f && (a += r + i - f), n <= u ? u = n : n + l > g && (u += n + l - g), t.scrollLeft = a, t.scrollTop = u;
|
|
825
683
|
}
|
|
826
|
-
function
|
|
684
|
+
function Me(t, e, r) {
|
|
827
685
|
const n = r === "left" ? "offsetLeft" : "offsetTop";
|
|
828
|
-
let
|
|
829
|
-
for (; e.offsetParent && (
|
|
686
|
+
let i = 0;
|
|
687
|
+
for (; e.offsetParent && (i += e[n], e.offsetParent !== t); ) {
|
|
830
688
|
if (e.offsetParent.contains(t)) {
|
|
831
|
-
|
|
689
|
+
i -= t[n];
|
|
832
690
|
break;
|
|
833
691
|
}
|
|
834
692
|
e = e.offsetParent;
|
|
835
693
|
}
|
|
836
|
-
return
|
|
694
|
+
return i;
|
|
837
695
|
}
|
|
838
|
-
function
|
|
839
|
-
return t.mozInputSource === 0 && t.isTrusted ? !0 :
|
|
696
|
+
function fe(t) {
|
|
697
|
+
return t.mozInputSource === 0 && t.isTrusted ? !0 : Nt() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType;
|
|
840
698
|
}
|
|
841
|
-
function
|
|
699
|
+
function Ut(t) {
|
|
842
700
|
return t.width === 0 && t.height === 0 || t.width === 1 && t.height === 1 && t.pressure === 0 && t.detail === 0 && t.pointerType === "mouse";
|
|
843
701
|
}
|
|
844
|
-
let
|
|
845
|
-
function
|
|
846
|
-
|
|
702
|
+
let _ = "default", de = "", Q = /* @__PURE__ */ new WeakMap();
|
|
703
|
+
function ke(t) {
|
|
704
|
+
ve() ? (_ === "default" && (de = document.documentElement.style.webkitUserSelect, document.documentElement.style.webkitUserSelect = "none"), _ = "disabled") : (t instanceof HTMLElement || t instanceof SVGElement) && (Q.set(t, t.style.userSelect), t.style.userSelect = "none");
|
|
847
705
|
}
|
|
848
|
-
function
|
|
849
|
-
if (
|
|
850
|
-
if (
|
|
706
|
+
function Z(t) {
|
|
707
|
+
if (ve()) {
|
|
708
|
+
if (_ !== "disabled")
|
|
851
709
|
return;
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
710
|
+
_ = "restoring", setTimeout(() => {
|
|
711
|
+
je(() => {
|
|
712
|
+
_ === "restoring" && (document.documentElement.style.webkitUserSelect === "none" && (document.documentElement.style.webkitUserSelect = de || ""), de = "", _ = "default");
|
|
855
713
|
});
|
|
856
714
|
}, 300);
|
|
857
|
-
} else if ((t instanceof HTMLElement || t instanceof SVGElement) && t &&
|
|
858
|
-
let e =
|
|
859
|
-
t.style.userSelect === "none" && (t.style.userSelect = e), t.getAttribute("style") === "" && t.removeAttribute("style"),
|
|
715
|
+
} else if ((t instanceof HTMLElement || t instanceof SVGElement) && t && Q.has(t)) {
|
|
716
|
+
let e = Q.get(t);
|
|
717
|
+
t.style.userSelect === "none" && (t.style.userSelect = e), t.getAttribute("style") === "" && t.removeAttribute("style"), Q.delete(t);
|
|
860
718
|
}
|
|
861
719
|
}
|
|
862
|
-
const
|
|
863
|
-
|
|
864
|
-
function
|
|
865
|
-
let e =
|
|
720
|
+
const Xe = ne.createContext(null);
|
|
721
|
+
Xe.displayName = "PressResponderContext";
|
|
722
|
+
function Vt(t) {
|
|
723
|
+
let e = ie(Xe);
|
|
866
724
|
if (e) {
|
|
867
725
|
let { register: r, ...n } = e;
|
|
868
|
-
t =
|
|
726
|
+
t = U(n, t), r();
|
|
869
727
|
}
|
|
870
|
-
return
|
|
728
|
+
return It(e, t.ref), t;
|
|
871
729
|
}
|
|
872
|
-
function
|
|
730
|
+
function Je(t) {
|
|
873
731
|
let {
|
|
874
732
|
onPress: e,
|
|
875
733
|
onPressChange: r,
|
|
876
734
|
onPressStart: n,
|
|
877
|
-
onPressEnd:
|
|
735
|
+
onPressEnd: i,
|
|
878
736
|
onPressUp: l,
|
|
879
|
-
isDisabled:
|
|
880
|
-
isPressed:
|
|
881
|
-
preventFocusOnPress:
|
|
882
|
-
shouldCancelOnPointerExit:
|
|
883
|
-
allowTextSelectionOnPress:
|
|
884
|
-
ref:
|
|
885
|
-
...
|
|
886
|
-
} =
|
|
887
|
-
|
|
737
|
+
isDisabled: a,
|
|
738
|
+
isPressed: u,
|
|
739
|
+
preventFocusOnPress: f,
|
|
740
|
+
shouldCancelOnPointerExit: g,
|
|
741
|
+
allowTextSelectionOnPress: h,
|
|
742
|
+
ref: T,
|
|
743
|
+
...v
|
|
744
|
+
} = Vt(t), b = P(null);
|
|
745
|
+
b.current = {
|
|
888
746
|
onPress: e,
|
|
889
747
|
onPressChange: r,
|
|
890
748
|
onPressStart: n,
|
|
891
|
-
onPressEnd:
|
|
749
|
+
onPressEnd: i,
|
|
892
750
|
onPressUp: l,
|
|
893
|
-
isDisabled:
|
|
894
|
-
shouldCancelOnPointerExit:
|
|
751
|
+
isDisabled: a,
|
|
752
|
+
shouldCancelOnPointerExit: g
|
|
895
753
|
};
|
|
896
|
-
let [
|
|
754
|
+
let [E, M] = F(!1), x = P({
|
|
897
755
|
isPressed: !1,
|
|
898
756
|
ignoreEmulatedMouseEvents: !1,
|
|
899
757
|
ignoreClickAfterPress: !1,
|
|
@@ -902,180 +760,180 @@ function Ct(t) {
|
|
|
902
760
|
target: null,
|
|
903
761
|
isOverTarget: !1,
|
|
904
762
|
pointerType: null
|
|
905
|
-
}), { addGlobalListener:
|
|
906
|
-
let
|
|
907
|
-
let { onPressStart:
|
|
908
|
-
|
|
763
|
+
}), { addGlobalListener: S, removeAllGlobalListeners: L } = Ye(), w = R(() => {
|
|
764
|
+
let s = x.current, D = (c, p) => {
|
|
765
|
+
let { onPressStart: o, onPressChange: d, isDisabled: A } = b.current;
|
|
766
|
+
A || s.didFirePressStart || (o && o({
|
|
909
767
|
type: "pressstart",
|
|
910
|
-
pointerType:
|
|
911
|
-
target:
|
|
912
|
-
shiftKey:
|
|
913
|
-
metaKey:
|
|
914
|
-
ctrlKey:
|
|
915
|
-
altKey:
|
|
916
|
-
}),
|
|
917
|
-
}, $ = (
|
|
918
|
-
let { onPressEnd:
|
|
919
|
-
!
|
|
768
|
+
pointerType: p,
|
|
769
|
+
target: c.currentTarget,
|
|
770
|
+
shiftKey: c.shiftKey,
|
|
771
|
+
metaKey: c.metaKey,
|
|
772
|
+
ctrlKey: c.ctrlKey,
|
|
773
|
+
altKey: c.altKey
|
|
774
|
+
}), d && d(!0), s.didFirePressStart = !0, M(!0));
|
|
775
|
+
}, $ = (c, p, o = !0) => {
|
|
776
|
+
let { onPressEnd: d, onPressChange: A, onPress: Se, isDisabled: ut } = b.current;
|
|
777
|
+
!s.didFirePressStart || (s.ignoreClickAfterPress = !0, s.didFirePressStart = !1, d && d({
|
|
920
778
|
type: "pressend",
|
|
921
|
-
pointerType:
|
|
922
|
-
target:
|
|
923
|
-
shiftKey:
|
|
924
|
-
metaKey:
|
|
925
|
-
ctrlKey:
|
|
926
|
-
altKey:
|
|
927
|
-
}),
|
|
779
|
+
pointerType: p,
|
|
780
|
+
target: c.currentTarget,
|
|
781
|
+
shiftKey: c.shiftKey,
|
|
782
|
+
metaKey: c.metaKey,
|
|
783
|
+
ctrlKey: c.ctrlKey,
|
|
784
|
+
altKey: c.altKey
|
|
785
|
+
}), A && A(!1), M(!1), Se && o && !ut && Se({
|
|
928
786
|
type: "press",
|
|
929
|
-
pointerType:
|
|
930
|
-
target:
|
|
931
|
-
shiftKey:
|
|
932
|
-
metaKey:
|
|
933
|
-
ctrlKey:
|
|
934
|
-
altKey:
|
|
787
|
+
pointerType: p,
|
|
788
|
+
target: c.currentTarget,
|
|
789
|
+
shiftKey: c.shiftKey,
|
|
790
|
+
metaKey: c.metaKey,
|
|
791
|
+
ctrlKey: c.ctrlKey,
|
|
792
|
+
altKey: c.altKey
|
|
935
793
|
}));
|
|
936
|
-
}, y = (
|
|
937
|
-
let { onPressUp:
|
|
938
|
-
|
|
794
|
+
}, y = (c, p) => {
|
|
795
|
+
let { onPressUp: o, isDisabled: d } = b.current;
|
|
796
|
+
d || o && o({
|
|
939
797
|
type: "pressup",
|
|
940
|
-
pointerType:
|
|
941
|
-
target:
|
|
942
|
-
shiftKey:
|
|
943
|
-
metaKey:
|
|
944
|
-
ctrlKey:
|
|
945
|
-
altKey:
|
|
798
|
+
pointerType: p,
|
|
799
|
+
target: c.currentTarget,
|
|
800
|
+
shiftKey: c.shiftKey,
|
|
801
|
+
metaKey: c.metaKey,
|
|
802
|
+
ctrlKey: c.ctrlKey,
|
|
803
|
+
altKey: c.altKey
|
|
946
804
|
});
|
|
947
|
-
},
|
|
948
|
-
|
|
949
|
-
},
|
|
950
|
-
onKeyDown(
|
|
951
|
-
|
|
805
|
+
}, m = (c) => {
|
|
806
|
+
s.isPressed && (s.isOverTarget && $(O(s.target, c), s.pointerType, !1), s.isPressed = !1, s.isOverTarget = !1, s.activePointerId = null, s.pointerType = null, L(), h || Z(s.target));
|
|
807
|
+
}, K = {
|
|
808
|
+
onKeyDown(c) {
|
|
809
|
+
oe(c.nativeEvent, c.currentTarget) && c.currentTarget.contains(c.target) ? (Ie(c.target, c.key) && c.preventDefault(), c.stopPropagation(), !s.isPressed && !c.repeat && (s.target = c.currentTarget, s.isPressed = !0, D(c, "keyboard"), S(document, "keyup", k, !1))) : c.key === "Enter" && pe(c.currentTarget) && c.stopPropagation();
|
|
952
810
|
},
|
|
953
|
-
onKeyUp(
|
|
954
|
-
|
|
811
|
+
onKeyUp(c) {
|
|
812
|
+
oe(c.nativeEvent, c.currentTarget) && !c.repeat && c.currentTarget.contains(c.target) && y(O(s.target, c), "keyboard");
|
|
955
813
|
},
|
|
956
|
-
onClick(
|
|
957
|
-
|
|
814
|
+
onClick(c) {
|
|
815
|
+
c && !c.currentTarget.contains(c.target) || c && c.button === 0 && (c.stopPropagation(), a && c.preventDefault(), !s.ignoreClickAfterPress && !s.ignoreEmulatedMouseEvents && (s.pointerType === "virtual" || fe(c.nativeEvent)) && (!a && !f && N(c.currentTarget), D(c, "virtual"), y(c, "virtual"), $(c, "virtual")), s.ignoreEmulatedMouseEvents = !1, s.ignoreClickAfterPress = !1);
|
|
958
816
|
}
|
|
959
|
-
},
|
|
960
|
-
if (
|
|
961
|
-
|
|
962
|
-
let
|
|
963
|
-
$(
|
|
817
|
+
}, k = (c) => {
|
|
818
|
+
if (s.isPressed && oe(c, s.target)) {
|
|
819
|
+
Ie(c.target, c.key) && c.preventDefault(), c.stopPropagation(), s.isPressed = !1;
|
|
820
|
+
let p = c.target;
|
|
821
|
+
$(O(s.target, c), "keyboard", s.target.contains(p)), L(), s.target instanceof HTMLElement && s.target.contains(p) && (pe(s.target) || s.target.getAttribute("role") === "link") && s.target.click();
|
|
964
822
|
}
|
|
965
823
|
};
|
|
966
824
|
if (typeof PointerEvent < "u") {
|
|
967
|
-
|
|
968
|
-
if (!(
|
|
969
|
-
if (
|
|
970
|
-
|
|
825
|
+
K.onPointerDown = (d) => {
|
|
826
|
+
if (!(d.button !== 0 || !d.currentTarget.contains(d.target))) {
|
|
827
|
+
if (Ut(d.nativeEvent)) {
|
|
828
|
+
s.pointerType = "virtual";
|
|
971
829
|
return;
|
|
972
830
|
}
|
|
973
|
-
|
|
831
|
+
ce(d.currentTarget) && d.preventDefault(), s.pointerType = d.pointerType, d.stopPropagation(), s.isPressed || (s.isPressed = !0, s.isOverTarget = !0, s.activePointerId = d.pointerId, s.target = d.currentTarget, !a && !f && N(d.currentTarget), h || ke(s.target), D(d, s.pointerType), S(document, "pointermove", c, !1), S(document, "pointerup", p, !1), S(document, "pointercancel", o, !1));
|
|
974
832
|
}
|
|
975
|
-
},
|
|
976
|
-
!
|
|
977
|
-
},
|
|
978
|
-
!
|
|
833
|
+
}, K.onMouseDown = (d) => {
|
|
834
|
+
!d.currentTarget.contains(d.target) || d.button === 0 && (ce(d.currentTarget) && d.preventDefault(), d.stopPropagation());
|
|
835
|
+
}, K.onPointerUp = (d) => {
|
|
836
|
+
!d.currentTarget.contains(d.target) || s.pointerType === "virtual" || d.button === 0 && V(d, d.currentTarget) && y(d, s.pointerType || d.pointerType);
|
|
979
837
|
};
|
|
980
|
-
let
|
|
981
|
-
|
|
982
|
-
},
|
|
983
|
-
|
|
984
|
-
},
|
|
985
|
-
|
|
838
|
+
let c = (d) => {
|
|
839
|
+
d.pointerId === s.activePointerId && (V(d, s.target) ? s.isOverTarget || (s.isOverTarget = !0, D(O(s.target, d), s.pointerType)) : s.isOverTarget && (s.isOverTarget = !1, $(O(s.target, d), s.pointerType, !1), b.current.shouldCancelOnPointerExit && m(d)));
|
|
840
|
+
}, p = (d) => {
|
|
841
|
+
d.pointerId === s.activePointerId && s.isPressed && d.button === 0 && (V(d, s.target) ? $(O(s.target, d), s.pointerType) : s.isOverTarget && $(O(s.target, d), s.pointerType, !1), s.isPressed = !1, s.isOverTarget = !1, s.activePointerId = null, s.pointerType = null, L(), h || Z(s.target));
|
|
842
|
+
}, o = (d) => {
|
|
843
|
+
m(d);
|
|
986
844
|
};
|
|
987
|
-
|
|
988
|
-
!
|
|
845
|
+
K.onDragStart = (d) => {
|
|
846
|
+
!d.currentTarget.contains(d.target) || m(d);
|
|
989
847
|
};
|
|
990
848
|
} else {
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
},
|
|
994
|
-
!
|
|
995
|
-
},
|
|
996
|
-
!
|
|
997
|
-
},
|
|
998
|
-
!
|
|
849
|
+
K.onMouseDown = (o) => {
|
|
850
|
+
o.button !== 0 || !o.currentTarget.contains(o.target) || (ce(o.currentTarget) && o.preventDefault(), o.stopPropagation(), !s.ignoreEmulatedMouseEvents && (s.isPressed = !0, s.isOverTarget = !0, s.target = o.currentTarget, s.pointerType = fe(o.nativeEvent) ? "virtual" : "mouse", !a && !f && N(o.currentTarget), D(o, s.pointerType), S(document, "mouseup", c, !1)));
|
|
851
|
+
}, K.onMouseEnter = (o) => {
|
|
852
|
+
!o.currentTarget.contains(o.target) || (o.stopPropagation(), s.isPressed && !s.ignoreEmulatedMouseEvents && (s.isOverTarget = !0, D(o, s.pointerType)));
|
|
853
|
+
}, K.onMouseLeave = (o) => {
|
|
854
|
+
!o.currentTarget.contains(o.target) || (o.stopPropagation(), s.isPressed && !s.ignoreEmulatedMouseEvents && (s.isOverTarget = !1, $(o, s.pointerType, !1), b.current.shouldCancelOnPointerExit && m(o)));
|
|
855
|
+
}, K.onMouseUp = (o) => {
|
|
856
|
+
!o.currentTarget.contains(o.target) || !s.ignoreEmulatedMouseEvents && o.button === 0 && y(o, s.pointerType);
|
|
999
857
|
};
|
|
1000
|
-
let
|
|
1001
|
-
if (
|
|
1002
|
-
if (
|
|
1003
|
-
|
|
858
|
+
let c = (o) => {
|
|
859
|
+
if (o.button === 0) {
|
|
860
|
+
if (s.isPressed = !1, L(), s.ignoreEmulatedMouseEvents) {
|
|
861
|
+
s.ignoreEmulatedMouseEvents = !1;
|
|
1004
862
|
return;
|
|
1005
863
|
}
|
|
1006
|
-
|
|
864
|
+
V(o, s.target) ? $(O(s.target, o), s.pointerType) : s.isOverTarget && $(O(s.target, o), s.pointerType, !1), s.isOverTarget = !1;
|
|
1007
865
|
}
|
|
1008
866
|
};
|
|
1009
|
-
|
|
1010
|
-
if (!
|
|
867
|
+
K.onTouchStart = (o) => {
|
|
868
|
+
if (!o.currentTarget.contains(o.target))
|
|
1011
869
|
return;
|
|
1012
|
-
|
|
1013
|
-
let
|
|
1014
|
-
!
|
|
1015
|
-
},
|
|
1016
|
-
if (!
|
|
870
|
+
o.stopPropagation();
|
|
871
|
+
let d = Ht(o.nativeEvent);
|
|
872
|
+
!d || (s.activePointerId = d.identifier, s.ignoreEmulatedMouseEvents = !0, s.isOverTarget = !0, s.isPressed = !0, s.target = o.currentTarget, s.pointerType = "touch", !a && !f && N(o.currentTarget), h || ke(s.target), D(o, s.pointerType), S(window, "scroll", p, !0));
|
|
873
|
+
}, K.onTouchMove = (o) => {
|
|
874
|
+
if (!o.currentTarget.contains(o.target) || (o.stopPropagation(), !s.isPressed))
|
|
1017
875
|
return;
|
|
1018
|
-
let
|
|
1019
|
-
|
|
1020
|
-
},
|
|
1021
|
-
if (!
|
|
876
|
+
let d = De(o.nativeEvent, s.activePointerId);
|
|
877
|
+
d && V(d, o.currentTarget) ? s.isOverTarget || (s.isOverTarget = !0, D(o, s.pointerType)) : s.isOverTarget && (s.isOverTarget = !1, $(o, s.pointerType, !1), b.current.shouldCancelOnPointerExit && m(o));
|
|
878
|
+
}, K.onTouchEnd = (o) => {
|
|
879
|
+
if (!o.currentTarget.contains(o.target) || (o.stopPropagation(), !s.isPressed))
|
|
1022
880
|
return;
|
|
1023
|
-
let
|
|
1024
|
-
|
|
1025
|
-
},
|
|
1026
|
-
!
|
|
881
|
+
let d = De(o.nativeEvent, s.activePointerId);
|
|
882
|
+
d && V(d, o.currentTarget) ? (y(o, s.pointerType), $(o, s.pointerType)) : s.isOverTarget && $(o, s.pointerType, !1), s.isPressed = !1, s.activePointerId = null, s.isOverTarget = !1, s.ignoreEmulatedMouseEvents = !0, h || Z(s.target), L();
|
|
883
|
+
}, K.onTouchCancel = (o) => {
|
|
884
|
+
!o.currentTarget.contains(o.target) || (o.stopPropagation(), s.isPressed && m(o));
|
|
1027
885
|
};
|
|
1028
|
-
let
|
|
1029
|
-
|
|
1030
|
-
currentTarget:
|
|
886
|
+
let p = (o) => {
|
|
887
|
+
s.isPressed && o.target.contains(s.target) && m({
|
|
888
|
+
currentTarget: s.target,
|
|
1031
889
|
shiftKey: !1,
|
|
1032
890
|
ctrlKey: !1,
|
|
1033
891
|
metaKey: !1,
|
|
1034
892
|
altKey: !1
|
|
1035
893
|
});
|
|
1036
894
|
};
|
|
1037
|
-
|
|
1038
|
-
!
|
|
895
|
+
K.onDragStart = (o) => {
|
|
896
|
+
!o.currentTarget.contains(o.target) || m(o);
|
|
1039
897
|
};
|
|
1040
898
|
}
|
|
1041
|
-
return
|
|
899
|
+
return K;
|
|
1042
900
|
}, [
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
901
|
+
S,
|
|
902
|
+
a,
|
|
903
|
+
f,
|
|
904
|
+
L,
|
|
905
|
+
h
|
|
1048
906
|
]);
|
|
1049
|
-
return
|
|
1050
|
-
|
|
907
|
+
return z(() => () => {
|
|
908
|
+
h || Z(x.current.target);
|
|
1051
909
|
}, [
|
|
1052
|
-
|
|
910
|
+
h
|
|
1053
911
|
]), {
|
|
1054
|
-
isPressed:
|
|
1055
|
-
pressProps:
|
|
912
|
+
isPressed: u || E,
|
|
913
|
+
pressProps: U(v, w)
|
|
1056
914
|
};
|
|
1057
915
|
}
|
|
1058
|
-
function
|
|
916
|
+
function pe(t) {
|
|
1059
917
|
return t.tagName === "A" && t.hasAttribute("href");
|
|
1060
918
|
}
|
|
1061
|
-
function
|
|
1062
|
-
const { key: r, code: n } = t,
|
|
1063
|
-
return (r === "Enter" || r === " " || r === "Spacebar" || n === "Space") && !(
|
|
919
|
+
function oe(t, e) {
|
|
920
|
+
const { key: r, code: n } = t, i = e, l = i.getAttribute("role");
|
|
921
|
+
return (r === "Enter" || r === " " || r === "Spacebar" || n === "Space") && !(i instanceof HTMLInputElement && !Ze(i, r) || i instanceof HTMLTextAreaElement || i.isContentEditable) && (!pe(i) || l === "button" && r !== "Enter") && !(l === "link" && r !== "Enter");
|
|
1064
922
|
}
|
|
1065
|
-
function
|
|
923
|
+
function Ht(t) {
|
|
1066
924
|
const { targetTouches: e } = t;
|
|
1067
925
|
return e.length > 0 ? e[0] : null;
|
|
1068
926
|
}
|
|
1069
|
-
function
|
|
927
|
+
function De(t, e) {
|
|
1070
928
|
const r = t.changedTouches;
|
|
1071
929
|
for (let n = 0; n < r.length; n++) {
|
|
1072
|
-
const
|
|
1073
|
-
if (
|
|
1074
|
-
return
|
|
930
|
+
const i = r[n];
|
|
931
|
+
if (i.identifier === e)
|
|
932
|
+
return i;
|
|
1075
933
|
}
|
|
1076
934
|
return null;
|
|
1077
935
|
}
|
|
1078
|
-
function
|
|
936
|
+
function O(t, e) {
|
|
1079
937
|
return {
|
|
1080
938
|
currentTarget: t,
|
|
1081
939
|
shiftKey: e.shiftKey,
|
|
@@ -1084,7 +942,7 @@ function N(t, e) {
|
|
|
1084
942
|
altKey: e.altKey
|
|
1085
943
|
};
|
|
1086
944
|
}
|
|
1087
|
-
function
|
|
945
|
+
function Gt(t) {
|
|
1088
946
|
let e = t.width / 2 || t.radiusX || 0, r = t.height / 2 || t.radiusY || 0;
|
|
1089
947
|
return {
|
|
1090
948
|
top: t.clientY - r,
|
|
@@ -1093,20 +951,20 @@ function Lr(t) {
|
|
|
1093
951
|
left: t.clientX - e
|
|
1094
952
|
};
|
|
1095
953
|
}
|
|
1096
|
-
function
|
|
954
|
+
function Wt(t, e) {
|
|
1097
955
|
return !(t.left > e.right || e.left > t.right || t.top > e.bottom || e.top > t.bottom);
|
|
1098
956
|
}
|
|
1099
|
-
function
|
|
1100
|
-
let r = e.getBoundingClientRect(), n =
|
|
1101
|
-
return
|
|
957
|
+
function V(t, e) {
|
|
958
|
+
let r = e.getBoundingClientRect(), n = Gt(t);
|
|
959
|
+
return Wt(r, n);
|
|
1102
960
|
}
|
|
1103
|
-
function
|
|
961
|
+
function ce(t) {
|
|
1104
962
|
return !(t instanceof HTMLElement) || !t.draggable;
|
|
1105
963
|
}
|
|
1106
|
-
function
|
|
1107
|
-
return t instanceof HTMLInputElement ? !
|
|
964
|
+
function Ie(t, e) {
|
|
965
|
+
return t instanceof HTMLInputElement ? !Ze(t, e) : t instanceof HTMLButtonElement ? t.type !== "submit" : !0;
|
|
1108
966
|
}
|
|
1109
|
-
const
|
|
967
|
+
const _t = /* @__PURE__ */ new Set([
|
|
1110
968
|
"checkbox",
|
|
1111
969
|
"radio",
|
|
1112
970
|
"range",
|
|
@@ -1117,105 +975,114 @@ const Cr = /* @__PURE__ */ new Set([
|
|
|
1117
975
|
"submit",
|
|
1118
976
|
"reset"
|
|
1119
977
|
]);
|
|
1120
|
-
function
|
|
1121
|
-
return t.type === "checkbox" || t.type === "radio" ? e === " " :
|
|
978
|
+
function Ze(t, e) {
|
|
979
|
+
return t.type === "checkbox" || t.type === "radio" ? e === " " : _t.has(t.type);
|
|
1122
980
|
}
|
|
1123
|
-
let
|
|
1124
|
-
function
|
|
1125
|
-
for (let r of
|
|
981
|
+
let X = null, jt = /* @__PURE__ */ new Set(), Ce = !1, B = !1, ye = !1;
|
|
982
|
+
function $e(t, e) {
|
|
983
|
+
for (let r of jt)
|
|
1126
984
|
r(t, e);
|
|
1127
985
|
}
|
|
1128
|
-
function
|
|
1129
|
-
return !(t.metaKey || !
|
|
986
|
+
function Yt(t) {
|
|
987
|
+
return !(t.metaKey || !le() && t.altKey || t.ctrlKey || t.key === "Control" || t.key === "Shift" || t.key === "Meta");
|
|
1130
988
|
}
|
|
1131
|
-
function
|
|
1132
|
-
|
|
989
|
+
function Fe(t) {
|
|
990
|
+
B = !0, Yt(t) && (X = "keyboard", $e("keyboard", t));
|
|
1133
991
|
}
|
|
1134
|
-
function
|
|
1135
|
-
|
|
992
|
+
function H(t) {
|
|
993
|
+
X = "pointer", (t.type === "mousedown" || t.type === "pointerdown") && (B = !0, $e("pointer", t));
|
|
1136
994
|
}
|
|
1137
|
-
function
|
|
1138
|
-
|
|
995
|
+
function qt(t) {
|
|
996
|
+
fe(t) && (B = !0, X = "virtual");
|
|
1139
997
|
}
|
|
1140
|
-
function
|
|
1141
|
-
t.target === window || t.target === document || (!
|
|
998
|
+
function Xt(t) {
|
|
999
|
+
t.target === window || t.target === document || (!B && !ye && (X = "virtual", $e("virtual", t)), B = !1, ye = !1);
|
|
1142
1000
|
}
|
|
1143
|
-
function
|
|
1144
|
-
|
|
1001
|
+
function Jt() {
|
|
1002
|
+
B = !1, ye = !0;
|
|
1145
1003
|
}
|
|
1146
|
-
function
|
|
1147
|
-
if (typeof window > "u" ||
|
|
1004
|
+
function ze() {
|
|
1005
|
+
if (typeof window > "u" || Ce)
|
|
1148
1006
|
return;
|
|
1149
1007
|
let t = HTMLElement.prototype.focus;
|
|
1150
1008
|
HTMLElement.prototype.focus = function() {
|
|
1151
|
-
|
|
1152
|
-
}, document.addEventListener("keydown",
|
|
1153
|
-
}
|
|
1154
|
-
typeof document < "u" && (document.readyState !== "loading" ?
|
|
1155
|
-
function
|
|
1156
|
-
return
|
|
1157
|
-
}
|
|
1158
|
-
const
|
|
1159
|
-
function
|
|
1160
|
-
let { isDisabled: e, onLongPressStart: r, onLongPressEnd: n, onLongPress:
|
|
1161
|
-
const
|
|
1162
|
-
let { addGlobalListener:
|
|
1009
|
+
B = !0, t.apply(this, arguments);
|
|
1010
|
+
}, document.addEventListener("keydown", Fe, !0), document.addEventListener("keyup", Fe, !0), document.addEventListener("click", qt, !0), window.addEventListener("focus", Xt, !0), window.addEventListener("blur", Jt, !1), typeof PointerEvent < "u" ? (document.addEventListener("pointerdown", H, !0), document.addEventListener("pointermove", H, !0), document.addEventListener("pointerup", H, !0)) : (document.addEventListener("mousedown", H, !0), document.addEventListener("mousemove", H, !0), document.addEventListener("mouseup", H, !0)), Ce = !0;
|
|
1011
|
+
}
|
|
1012
|
+
typeof document < "u" && (document.readyState !== "loading" ? ze() : document.addEventListener("DOMContentLoaded", ze));
|
|
1013
|
+
function Zt() {
|
|
1014
|
+
return X;
|
|
1015
|
+
}
|
|
1016
|
+
const Qt = 500;
|
|
1017
|
+
function er(t) {
|
|
1018
|
+
let { isDisabled: e, onLongPressStart: r, onLongPressEnd: n, onLongPress: i, threshold: l = Qt, accessibilityDescription: a } = t;
|
|
1019
|
+
const u = P(null);
|
|
1020
|
+
let { addGlobalListener: f, removeGlobalListener: g } = Ye(), { pressProps: h } = Je({
|
|
1163
1021
|
isDisabled: e,
|
|
1164
|
-
onPressStart(
|
|
1165
|
-
if ((
|
|
1166
|
-
...
|
|
1022
|
+
onPressStart(v) {
|
|
1023
|
+
if ((v.pointerType === "mouse" || v.pointerType === "touch") && (r && r({
|
|
1024
|
+
...v,
|
|
1167
1025
|
type: "longpressstart"
|
|
1168
|
-
}),
|
|
1169
|
-
|
|
1026
|
+
}), u.current = setTimeout(() => {
|
|
1027
|
+
v.target.dispatchEvent(new PointerEvent("pointercancel", {
|
|
1170
1028
|
bubbles: !0
|
|
1171
|
-
})),
|
|
1172
|
-
...
|
|
1029
|
+
})), i && i({
|
|
1030
|
+
...v,
|
|
1173
1031
|
type: "longpress"
|
|
1174
|
-
}),
|
|
1175
|
-
}, l),
|
|
1176
|
-
let
|
|
1177
|
-
|
|
1032
|
+
}), u.current = null;
|
|
1033
|
+
}, l), v.pointerType === "touch")) {
|
|
1034
|
+
let b = (E) => {
|
|
1035
|
+
E.preventDefault();
|
|
1178
1036
|
};
|
|
1179
|
-
|
|
1037
|
+
f(v.target, "contextmenu", b, {
|
|
1180
1038
|
once: !0
|
|
1181
|
-
}),
|
|
1039
|
+
}), f(window, "pointerup", () => {
|
|
1182
1040
|
setTimeout(() => {
|
|
1183
|
-
|
|
1041
|
+
g(v.target, "contextmenu", b);
|
|
1184
1042
|
}, 30);
|
|
1185
1043
|
}, {
|
|
1186
1044
|
once: !0
|
|
1187
1045
|
});
|
|
1188
1046
|
}
|
|
1189
1047
|
},
|
|
1190
|
-
onPressEnd(
|
|
1191
|
-
|
|
1192
|
-
...
|
|
1048
|
+
onPressEnd(v) {
|
|
1049
|
+
u.current && clearTimeout(u.current), n && (v.pointerType === "mouse" || v.pointerType === "touch") && n({
|
|
1050
|
+
...v,
|
|
1193
1051
|
type: "longpressend"
|
|
1194
1052
|
});
|
|
1195
1053
|
}
|
|
1196
|
-
}),
|
|
1054
|
+
}), T = Ft(i && !e ? a : null);
|
|
1197
1055
|
return {
|
|
1198
|
-
longPressProps:
|
|
1056
|
+
longPressProps: U(h, T)
|
|
1199
1057
|
};
|
|
1200
1058
|
}
|
|
1201
|
-
function
|
|
1059
|
+
function Qe(t) {
|
|
1060
|
+
if (Zt() === "virtual") {
|
|
1061
|
+
let e = document.activeElement;
|
|
1062
|
+
je(() => {
|
|
1063
|
+
document.activeElement === e && document.contains(t) && N(t);
|
|
1064
|
+
});
|
|
1065
|
+
} else
|
|
1066
|
+
N(t);
|
|
1067
|
+
}
|
|
1068
|
+
function tr(t) {
|
|
1202
1069
|
if (!(t instanceof HTMLElement) && !(t instanceof SVGElement))
|
|
1203
1070
|
return !1;
|
|
1204
1071
|
let { display: e, visibility: r } = t.style, n = e !== "none" && r !== "hidden" && r !== "collapse";
|
|
1205
1072
|
if (n) {
|
|
1206
|
-
const { getComputedStyle:
|
|
1207
|
-
let { display: l, visibility:
|
|
1208
|
-
n = l !== "none" &&
|
|
1073
|
+
const { getComputedStyle: i } = t.ownerDocument.defaultView;
|
|
1074
|
+
let { display: l, visibility: a } = i(t);
|
|
1075
|
+
n = l !== "none" && a !== "hidden" && a !== "collapse";
|
|
1209
1076
|
}
|
|
1210
1077
|
return n;
|
|
1211
1078
|
}
|
|
1212
|
-
function
|
|
1079
|
+
function rr(t, e) {
|
|
1213
1080
|
return !t.hasAttribute("hidden") && (t.nodeName === "DETAILS" && e && e.nodeName !== "SUMMARY" ? t.hasAttribute("open") : !0);
|
|
1214
1081
|
}
|
|
1215
|
-
function
|
|
1216
|
-
return t.nodeName !== "#comment" &&
|
|
1082
|
+
function et(t, e) {
|
|
1083
|
+
return t.nodeName !== "#comment" && tr(t) && rr(t, e) && (!t.parentElement || et(t.parentElement, t));
|
|
1217
1084
|
}
|
|
1218
|
-
const
|
|
1085
|
+
const me = [
|
|
1219
1086
|
"input:not([disabled]):not([type=hidden])",
|
|
1220
1087
|
"select:not([disabled])",
|
|
1221
1088
|
"textarea:not([disabled])",
|
|
@@ -1229,24 +1096,22 @@ const Re = [
|
|
|
1229
1096
|
"audio[controls]",
|
|
1230
1097
|
"video[controls]",
|
|
1231
1098
|
"[contenteditable]"
|
|
1232
|
-
],
|
|
1233
|
-
|
|
1234
|
-
const
|
|
1235
|
-
function
|
|
1236
|
-
return e.some(
|
|
1237
|
-
(r) => r.contains(t)
|
|
1238
|
-
);
|
|
1099
|
+
], nr = me.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
|
1100
|
+
me.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
|
1101
|
+
const ir = me.join(':not([hidden]):not([tabindex="-1"]),');
|
|
1102
|
+
function tt(t, e) {
|
|
1103
|
+
return e.some((r) => r.contains(t));
|
|
1239
1104
|
}
|
|
1240
|
-
function
|
|
1241
|
-
let n = e != null && e.tabbable ?
|
|
1105
|
+
function rt(t, e, r) {
|
|
1106
|
+
let n = e != null && e.tabbable ? ir : nr, i = document.createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
|
|
1242
1107
|
acceptNode(l) {
|
|
1243
|
-
var
|
|
1244
|
-
return !(e == null || (
|
|
1108
|
+
var a;
|
|
1109
|
+
return !(e == null || (a = e.from) === null || a === void 0) && a.contains(l) ? NodeFilter.FILTER_REJECT : l.matches(n) && et(l) && (!r || tt(l, r)) && (!(e != null && e.accept) || e.accept(l)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
1245
1110
|
}
|
|
1246
1111
|
});
|
|
1247
|
-
return e != null && e.from && (
|
|
1112
|
+
return e != null && e.from && (i.currentNode = e.from), i;
|
|
1248
1113
|
}
|
|
1249
|
-
class
|
|
1114
|
+
class Ke {
|
|
1250
1115
|
get size() {
|
|
1251
1116
|
return this.fastMap.size;
|
|
1252
1117
|
}
|
|
@@ -1254,21 +1119,19 @@ class ze {
|
|
|
1254
1119
|
return this.fastMap.get(e);
|
|
1255
1120
|
}
|
|
1256
1121
|
addTreeNode(e, r, n) {
|
|
1257
|
-
let
|
|
1122
|
+
let i = this.fastMap.get(r != null ? r : null), l = new Ae({
|
|
1258
1123
|
scopeRef: e
|
|
1259
1124
|
});
|
|
1260
|
-
|
|
1125
|
+
i.addChild(l), l.parent = i, this.fastMap.set(e, l), n && (l.nodeToRestore = n);
|
|
1261
1126
|
}
|
|
1262
1127
|
removeTreeNode(e) {
|
|
1263
1128
|
if (e === null)
|
|
1264
1129
|
return;
|
|
1265
1130
|
let r = this.fastMap.get(e), n = r.parent;
|
|
1266
1131
|
for (let l of this.traverse())
|
|
1267
|
-
l !== r && r.nodeToRestore && l.nodeToRestore && r.scopeRef.current &&
|
|
1268
|
-
let
|
|
1269
|
-
n.removeChild(r),
|
|
1270
|
-
(l) => n.addChild(l)
|
|
1271
|
-
), this.fastMap.delete(r.scopeRef);
|
|
1132
|
+
l !== r && r.nodeToRestore && l.nodeToRestore && r.scopeRef.current && tt(l.nodeToRestore, r.scopeRef.current) && (l.nodeToRestore = r.nodeToRestore);
|
|
1133
|
+
let i = r.children;
|
|
1134
|
+
n.removeChild(r), i.length > 0 && i.forEach((l) => n.addChild(l)), this.fastMap.delete(r.scopeRef);
|
|
1272
1135
|
}
|
|
1273
1136
|
*traverse(e = this.root) {
|
|
1274
1137
|
if (e.scopeRef != null && (yield e), e.children.length > 0)
|
|
@@ -1276,18 +1139,18 @@ class ze {
|
|
|
1276
1139
|
yield* this.traverse(r);
|
|
1277
1140
|
}
|
|
1278
1141
|
clone() {
|
|
1279
|
-
let e = new
|
|
1142
|
+
let e = new Ke();
|
|
1280
1143
|
for (let r of this.traverse())
|
|
1281
1144
|
e.addTreeNode(r.scopeRef, r.parent.scopeRef, r.nodeToRestore);
|
|
1282
1145
|
return e;
|
|
1283
1146
|
}
|
|
1284
1147
|
constructor() {
|
|
1285
|
-
this
|
|
1148
|
+
ee(this, "fastMap", /* @__PURE__ */ new Map()), this.root = new Ae({
|
|
1286
1149
|
scopeRef: null
|
|
1287
1150
|
}), this.fastMap.set(null, this.root);
|
|
1288
1151
|
}
|
|
1289
1152
|
}
|
|
1290
|
-
class
|
|
1153
|
+
class Ae {
|
|
1291
1154
|
addChild(e) {
|
|
1292
1155
|
this.children.push(e), e.parent = this;
|
|
1293
1156
|
}
|
|
@@ -1295,139 +1158,104 @@ class st {
|
|
|
1295
1158
|
this.children.splice(this.children.indexOf(e), 1), e.parent = void 0;
|
|
1296
1159
|
}
|
|
1297
1160
|
constructor(e) {
|
|
1298
|
-
this
|
|
1161
|
+
ee(this, "children", []), ee(this, "contain", !1), this.scopeRef = e.scopeRef;
|
|
1299
1162
|
}
|
|
1300
1163
|
}
|
|
1301
|
-
new
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1164
|
+
new Ke();
|
|
1165
|
+
const sr = /* @__PURE__ */ new Set([
|
|
1166
|
+
"Arab",
|
|
1167
|
+
"Syrc",
|
|
1168
|
+
"Samr",
|
|
1169
|
+
"Mand",
|
|
1170
|
+
"Thaa",
|
|
1171
|
+
"Mend",
|
|
1172
|
+
"Nkoo",
|
|
1173
|
+
"Adlm",
|
|
1174
|
+
"Rohg",
|
|
1175
|
+
"Hebr"
|
|
1176
|
+
]), lr = /* @__PURE__ */ new Set([
|
|
1177
|
+
"ae",
|
|
1178
|
+
"ar",
|
|
1179
|
+
"arc",
|
|
1180
|
+
"bcc",
|
|
1181
|
+
"bqi",
|
|
1182
|
+
"ckb",
|
|
1183
|
+
"dv",
|
|
1184
|
+
"fa",
|
|
1185
|
+
"glk",
|
|
1186
|
+
"he",
|
|
1187
|
+
"ku",
|
|
1188
|
+
"mzn",
|
|
1189
|
+
"nqo",
|
|
1190
|
+
"pnb",
|
|
1191
|
+
"ps",
|
|
1192
|
+
"sd",
|
|
1193
|
+
"ug",
|
|
1194
|
+
"ur",
|
|
1195
|
+
"yi"
|
|
1196
|
+
]);
|
|
1197
|
+
function ar(t) {
|
|
1198
|
+
if (Intl.Locale) {
|
|
1199
|
+
let r = new Intl.Locale(t).maximize().script;
|
|
1200
|
+
return sr.has(r);
|
|
1319
1201
|
}
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
function Wr(t, e) {
|
|
1323
|
-
return !t.hasAttribute("hidden") && (t.nodeName === "DETAILS" && e && e.nodeName !== "SUMMARY" ? t.hasAttribute("open") : !0);
|
|
1324
|
-
}
|
|
1325
|
-
function At(t, e) {
|
|
1326
|
-
return t.nodeName !== "#comment" && _r(t) && Wr(t, e) && (!t.parentElement || At(t.parentElement, t));
|
|
1202
|
+
let e = t.split("-")[0];
|
|
1203
|
+
return lr.has(e);
|
|
1327
1204
|
}
|
|
1328
|
-
|
|
1329
|
-
"
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
"[contenteditable]"
|
|
1342
|
-
], jr = Ne.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
|
1343
|
-
Ne.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
|
1344
|
-
const Yr = Ne.join(':not([hidden]):not([tabindex="-1"]),');
|
|
1345
|
-
function Rt(t, e) {
|
|
1346
|
-
return e.some(
|
|
1347
|
-
(r) => r.contains(t)
|
|
1348
|
-
);
|
|
1205
|
+
function nt() {
|
|
1206
|
+
let t = typeof navigator < "u" && (navigator.language || navigator.userLanguage) || "en-US";
|
|
1207
|
+
try {
|
|
1208
|
+
Intl.DateTimeFormat.supportedLocalesOf([
|
|
1209
|
+
t
|
|
1210
|
+
]);
|
|
1211
|
+
} catch {
|
|
1212
|
+
t = "en-US";
|
|
1213
|
+
}
|
|
1214
|
+
return {
|
|
1215
|
+
locale: t,
|
|
1216
|
+
direction: ar(t) ? "rtl" : "ltr"
|
|
1217
|
+
};
|
|
1349
1218
|
}
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
}
|
|
1356
|
-
});
|
|
1357
|
-
return e != null && e.from && (s.currentNode = e.from), s;
|
|
1219
|
+
let be = nt(), j = /* @__PURE__ */ new Set();
|
|
1220
|
+
function Oe() {
|
|
1221
|
+
be = nt();
|
|
1222
|
+
for (let t of j)
|
|
1223
|
+
t(be);
|
|
1358
1224
|
}
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
let s = this.fastMap.get(r != null ? r : null), l = new at({
|
|
1368
|
-
scopeRef: e
|
|
1369
|
-
});
|
|
1370
|
-
s.addChild(l), l.parent = s, this.fastMap.set(e, l), n && (l.nodeToRestore = n);
|
|
1371
|
-
}
|
|
1372
|
-
removeTreeNode(e) {
|
|
1373
|
-
if (e === null)
|
|
1374
|
-
return;
|
|
1375
|
-
let r = this.fastMap.get(e), n = r.parent;
|
|
1376
|
-
for (let l of this.traverse())
|
|
1377
|
-
l !== r && r.nodeToRestore && l.nodeToRestore && r.scopeRef.current && Rt(l.nodeToRestore, r.scopeRef.current) && (l.nodeToRestore = r.nodeToRestore);
|
|
1378
|
-
let s = r.children;
|
|
1379
|
-
n.removeChild(r), s.length > 0 && s.forEach(
|
|
1380
|
-
(l) => n.addChild(l)
|
|
1381
|
-
), this.fastMap.delete(r.scopeRef);
|
|
1382
|
-
}
|
|
1383
|
-
*traverse(e = this.root) {
|
|
1384
|
-
if (e.scopeRef != null && (yield e), e.children.length > 0)
|
|
1385
|
-
for (let r of e.children)
|
|
1386
|
-
yield* this.traverse(r);
|
|
1387
|
-
}
|
|
1388
|
-
clone() {
|
|
1389
|
-
let e = new Be();
|
|
1390
|
-
for (let r of this.traverse())
|
|
1391
|
-
e.addTreeNode(r.scopeRef, r.parent.scopeRef, r.nodeToRestore);
|
|
1392
|
-
return e;
|
|
1393
|
-
}
|
|
1394
|
-
constructor() {
|
|
1395
|
-
this.fastMap = /* @__PURE__ */ new Map(), this.root = new at({
|
|
1396
|
-
scopeRef: null
|
|
1397
|
-
}), this.fastMap.set(null, this.root);
|
|
1398
|
-
}
|
|
1225
|
+
function or() {
|
|
1226
|
+
let t = wt(), [e, r] = F(be);
|
|
1227
|
+
return z(() => (j.size === 0 && window.addEventListener("languagechange", Oe), j.add(r), () => {
|
|
1228
|
+
j.delete(r), j.size === 0 && window.removeEventListener("languagechange", Oe);
|
|
1229
|
+
}), []), t ? {
|
|
1230
|
+
locale: "en-US",
|
|
1231
|
+
direction: "ltr"
|
|
1232
|
+
} : e;
|
|
1399
1233
|
}
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
removeChild(e) {
|
|
1405
|
-
this.children.splice(this.children.indexOf(e), 1), e.parent = void 0;
|
|
1406
|
-
}
|
|
1407
|
-
constructor(e) {
|
|
1408
|
-
this.children = [], this.contain = !1, this.scopeRef = e.scopeRef;
|
|
1409
|
-
}
|
|
1234
|
+
const cr = /* @__PURE__ */ ne.createContext(null);
|
|
1235
|
+
function it() {
|
|
1236
|
+
let t = or();
|
|
1237
|
+
return ie(cr) || t;
|
|
1410
1238
|
}
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
return Pr() ? t.altKey : t.ctrlKey;
|
|
1239
|
+
function st(t) {
|
|
1240
|
+
return Rt() ? t.altKey : t.ctrlKey;
|
|
1414
1241
|
}
|
|
1415
|
-
function
|
|
1416
|
-
return
|
|
1242
|
+
function W(t) {
|
|
1243
|
+
return le() ? t.metaKey : t.ctrlKey;
|
|
1417
1244
|
}
|
|
1418
|
-
|
|
1419
|
-
|
|
1245
|
+
const ur = 1e3;
|
|
1246
|
+
function fr(t) {
|
|
1247
|
+
let { keyboardDelegate: e, selectionManager: r, onTypeSelect: n } = t, i = P({
|
|
1420
1248
|
search: "",
|
|
1421
1249
|
timeout: null
|
|
1422
|
-
}).current, l = (
|
|
1423
|
-
let
|
|
1424
|
-
if (!
|
|
1250
|
+
}).current, l = (a) => {
|
|
1251
|
+
let u = dr(a.key);
|
|
1252
|
+
if (!u || a.ctrlKey || a.metaKey)
|
|
1425
1253
|
return;
|
|
1426
|
-
|
|
1427
|
-
let
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
},
|
|
1254
|
+
u === " " && i.search.trim().length > 0 && (a.preventDefault(), "continuePropagation" in a || a.stopPropagation()), i.search += u;
|
|
1255
|
+
let f = e.getKeyForSearch(i.search, r.focusedKey);
|
|
1256
|
+
f == null && (f = e.getKeyForSearch(i.search)), f != null && (r.setFocusedKey(f), n && n(f)), clearTimeout(i.timeout), i.timeout = setTimeout(() => {
|
|
1257
|
+
i.search = "";
|
|
1258
|
+
}, ur);
|
|
1431
1259
|
};
|
|
1432
1260
|
return {
|
|
1433
1261
|
typeSelectProps: {
|
|
@@ -1435,621 +1263,302 @@ function qr(t) {
|
|
|
1435
1263
|
}
|
|
1436
1264
|
};
|
|
1437
1265
|
}
|
|
1438
|
-
function
|
|
1266
|
+
function dr(t) {
|
|
1439
1267
|
return t.length === 1 || !/^[A-Z]/i.test(t) ? t : "";
|
|
1440
1268
|
}
|
|
1441
|
-
function
|
|
1442
|
-
let { selectionManager: e, keyboardDelegate: r, ref: n, autoFocus:
|
|
1269
|
+
function pr(t) {
|
|
1270
|
+
let { selectionManager: e, keyboardDelegate: r, ref: n, autoFocus: i = !1, shouldFocusWrap: l = !1, disallowEmptySelection: a = !1, disallowSelectAll: u = !1, selectOnFocus: f = e.selectionBehavior === "replace", disallowTypeAhead: g = !1, shouldUseVirtualFocus: h, allowsTabNavigation: T = !1, isVirtualized: v, scrollRef: b = n } = t, { direction: E } = it(), M = (y) => {
|
|
1443
1271
|
if (y.altKey && y.key === "Tab" && y.preventDefault(), !n.current.contains(y.target))
|
|
1444
1272
|
return;
|
|
1445
|
-
const
|
|
1446
|
-
|
|
1273
|
+
const m = (o, d) => {
|
|
1274
|
+
o != null && (e.setFocusedKey(o, d), y.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(o) : f && !st(y) && e.replaceSelection(o));
|
|
1447
1275
|
};
|
|
1448
1276
|
switch (y.key) {
|
|
1449
1277
|
case "ArrowDown":
|
|
1450
1278
|
if (r.getKeyBelow) {
|
|
1451
|
-
var
|
|
1279
|
+
var K, k;
|
|
1452
1280
|
y.preventDefault();
|
|
1453
|
-
let
|
|
1454
|
-
|
|
1281
|
+
let o = e.focusedKey != null ? r.getKeyBelow(e.focusedKey) : (K = r.getFirstKey) === null || K === void 0 ? void 0 : K.call(r);
|
|
1282
|
+
o == null && l && (o = (k = r.getFirstKey) === null || k === void 0 ? void 0 : k.call(r, e.focusedKey)), m(o);
|
|
1455
1283
|
}
|
|
1456
1284
|
break;
|
|
1457
1285
|
case "ArrowUp":
|
|
1458
1286
|
if (r.getKeyAbove) {
|
|
1459
|
-
var
|
|
1287
|
+
var c, p;
|
|
1460
1288
|
y.preventDefault();
|
|
1461
|
-
let
|
|
1462
|
-
|
|
1289
|
+
let o = e.focusedKey != null ? r.getKeyAbove(e.focusedKey) : (c = r.getLastKey) === null || c === void 0 ? void 0 : c.call(r);
|
|
1290
|
+
o == null && l && (o = (p = r.getLastKey) === null || p === void 0 ? void 0 : p.call(r, e.focusedKey)), m(o);
|
|
1463
1291
|
}
|
|
1464
1292
|
break;
|
|
1465
1293
|
case "ArrowLeft":
|
|
1466
1294
|
if (r.getKeyLeftOf) {
|
|
1467
1295
|
y.preventDefault();
|
|
1468
|
-
let
|
|
1469
|
-
|
|
1296
|
+
let o = r.getKeyLeftOf(e.focusedKey);
|
|
1297
|
+
m(o, E === "rtl" ? "first" : "last");
|
|
1470
1298
|
}
|
|
1471
1299
|
break;
|
|
1472
1300
|
case "ArrowRight":
|
|
1473
1301
|
if (r.getKeyRightOf) {
|
|
1474
1302
|
y.preventDefault();
|
|
1475
|
-
let
|
|
1476
|
-
|
|
1303
|
+
let o = r.getKeyRightOf(e.focusedKey);
|
|
1304
|
+
m(o, E === "rtl" ? "last" : "first");
|
|
1477
1305
|
}
|
|
1478
1306
|
break;
|
|
1479
1307
|
case "Home":
|
|
1480
1308
|
if (r.getFirstKey) {
|
|
1481
1309
|
y.preventDefault();
|
|
1482
|
-
let
|
|
1483
|
-
e.setFocusedKey(
|
|
1310
|
+
let o = r.getFirstKey(e.focusedKey, W(y));
|
|
1311
|
+
e.setFocusedKey(o), W(y) && y.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(o) : f && e.replaceSelection(o);
|
|
1484
1312
|
}
|
|
1485
1313
|
break;
|
|
1486
1314
|
case "End":
|
|
1487
1315
|
if (r.getLastKey) {
|
|
1488
1316
|
y.preventDefault();
|
|
1489
|
-
let
|
|
1490
|
-
e.setFocusedKey(
|
|
1317
|
+
let o = r.getLastKey(e.focusedKey, W(y));
|
|
1318
|
+
e.setFocusedKey(o), W(y) && y.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(o) : f && e.replaceSelection(o);
|
|
1491
1319
|
}
|
|
1492
1320
|
break;
|
|
1493
1321
|
case "PageDown":
|
|
1494
1322
|
if (r.getKeyPageBelow) {
|
|
1495
1323
|
y.preventDefault();
|
|
1496
|
-
let
|
|
1497
|
-
|
|
1324
|
+
let o = r.getKeyPageBelow(e.focusedKey);
|
|
1325
|
+
m(o);
|
|
1498
1326
|
}
|
|
1499
1327
|
break;
|
|
1500
1328
|
case "PageUp":
|
|
1501
1329
|
if (r.getKeyPageAbove) {
|
|
1502
1330
|
y.preventDefault();
|
|
1503
|
-
let
|
|
1504
|
-
|
|
1331
|
+
let o = r.getKeyPageAbove(e.focusedKey);
|
|
1332
|
+
m(o);
|
|
1505
1333
|
}
|
|
1506
1334
|
break;
|
|
1507
1335
|
case "a":
|
|
1508
|
-
|
|
1336
|
+
W(y) && e.selectionMode === "multiple" && u !== !0 && (y.preventDefault(), e.selectAll());
|
|
1509
1337
|
break;
|
|
1510
1338
|
case "Escape":
|
|
1511
|
-
y.preventDefault(),
|
|
1339
|
+
y.preventDefault(), a || e.clearSelection();
|
|
1512
1340
|
break;
|
|
1513
1341
|
case "Tab":
|
|
1514
|
-
if (!
|
|
1342
|
+
if (!T) {
|
|
1515
1343
|
if (y.shiftKey)
|
|
1516
1344
|
n.current.focus();
|
|
1517
1345
|
else {
|
|
1518
|
-
let
|
|
1346
|
+
let o = rt(n.current, {
|
|
1519
1347
|
tabbable: !0
|
|
1520
|
-
}),
|
|
1348
|
+
}), d, A;
|
|
1521
1349
|
do
|
|
1522
|
-
|
|
1523
|
-
while (
|
|
1524
|
-
|
|
1350
|
+
A = o.lastChild(), A && (d = A);
|
|
1351
|
+
while (A);
|
|
1352
|
+
d && !d.contains(document.activeElement) && N(d);
|
|
1525
1353
|
}
|
|
1526
1354
|
break;
|
|
1527
1355
|
}
|
|
1528
1356
|
}
|
|
1529
|
-
},
|
|
1357
|
+
}, x = P({
|
|
1530
1358
|
top: 0,
|
|
1531
1359
|
left: 0
|
|
1532
1360
|
});
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
top:
|
|
1536
|
-
left:
|
|
1361
|
+
Bt(b, "scroll", v ? null : () => {
|
|
1362
|
+
x.current = {
|
|
1363
|
+
top: b.current.scrollTop,
|
|
1364
|
+
left: b.current.scrollLeft
|
|
1537
1365
|
};
|
|
1538
1366
|
});
|
|
1539
|
-
let
|
|
1367
|
+
let S = (y) => {
|
|
1540
1368
|
if (e.isFocused) {
|
|
1541
1369
|
y.currentTarget.contains(y.target) || e.setFocused(!1);
|
|
1542
1370
|
return;
|
|
1543
1371
|
}
|
|
1544
1372
|
if (!!y.currentTarget.contains(y.target)) {
|
|
1545
1373
|
if (e.setFocused(!0), e.focusedKey == null) {
|
|
1546
|
-
let
|
|
1547
|
-
|
|
1548
|
-
},
|
|
1549
|
-
var
|
|
1550
|
-
|
|
1551
|
-
} else if (!
|
|
1552
|
-
|
|
1553
|
-
let
|
|
1554
|
-
|
|
1374
|
+
let k = (p) => {
|
|
1375
|
+
p != null && (e.setFocusedKey(p), f && e.replaceSelection(p));
|
|
1376
|
+
}, c = y.relatedTarget;
|
|
1377
|
+
var m, K;
|
|
1378
|
+
c && y.currentTarget.compareDocumentPosition(c) & Node.DOCUMENT_POSITION_FOLLOWING ? k((m = e.lastSelectedKey) !== null && m !== void 0 ? m : r.getLastKey()) : k((K = e.firstSelectedKey) !== null && K !== void 0 ? K : r.getFirstKey());
|
|
1379
|
+
} else if (!v) {
|
|
1380
|
+
b.current.scrollTop = x.current.top, b.current.scrollLeft = x.current.left;
|
|
1381
|
+
let k = b.current.querySelector(`[data-key="${e.focusedKey}"]`);
|
|
1382
|
+
k && (N(k), Le(b.current, k));
|
|
1555
1383
|
}
|
|
1556
1384
|
}
|
|
1557
|
-
},
|
|
1385
|
+
}, L = (y) => {
|
|
1558
1386
|
y.currentTarget.contains(y.relatedTarget) || e.setFocused(!1);
|
|
1559
1387
|
};
|
|
1560
|
-
const w =
|
|
1561
|
-
|
|
1388
|
+
const w = P(i);
|
|
1389
|
+
z(() => {
|
|
1562
1390
|
if (w.current) {
|
|
1563
1391
|
let y = null;
|
|
1564
|
-
|
|
1565
|
-
let
|
|
1566
|
-
|
|
1392
|
+
i === "first" && (y = r.getFirstKey()), i === "last" && (y = r.getLastKey());
|
|
1393
|
+
let m = e.selectedKeys;
|
|
1394
|
+
m.size && (y = m.values().next().value), e.setFocused(!0), e.setFocusedKey(y), y == null && !h && Qe(n.current);
|
|
1567
1395
|
}
|
|
1568
1396
|
w.current = !1;
|
|
1569
|
-
}, []),
|
|
1570
|
-
if (!
|
|
1571
|
-
let y =
|
|
1572
|
-
y &&
|
|
1397
|
+
}, []), z(() => {
|
|
1398
|
+
if (!v && e.focusedKey && (b == null ? void 0 : b.current)) {
|
|
1399
|
+
let y = b.current.querySelector(`[data-key="${e.focusedKey}"]`);
|
|
1400
|
+
y && Le(b.current, y);
|
|
1573
1401
|
}
|
|
1574
1402
|
}, [
|
|
1575
|
-
|
|
1576
|
-
|
|
1403
|
+
v,
|
|
1404
|
+
b,
|
|
1577
1405
|
e.focusedKey
|
|
1578
1406
|
]);
|
|
1579
|
-
let
|
|
1580
|
-
onKeyDown:
|
|
1581
|
-
onFocus:
|
|
1582
|
-
onBlur:
|
|
1407
|
+
let s = {
|
|
1408
|
+
onKeyDown: M,
|
|
1409
|
+
onFocus: S,
|
|
1410
|
+
onBlur: L,
|
|
1583
1411
|
onMouseDown(y) {
|
|
1584
|
-
|
|
1412
|
+
b.current === y.target && y.preventDefault();
|
|
1585
1413
|
}
|
|
1586
|
-
}, { typeSelectProps:
|
|
1414
|
+
}, { typeSelectProps: D } = fr({
|
|
1587
1415
|
keyboardDelegate: r,
|
|
1588
1416
|
selectionManager: e
|
|
1589
1417
|
});
|
|
1590
|
-
|
|
1418
|
+
g || (s = U(D, s));
|
|
1591
1419
|
let $;
|
|
1592
|
-
return
|
|
1420
|
+
return h || ($ = e.focusedKey == null ? 0 : -1), {
|
|
1593
1421
|
collectionProps: {
|
|
1594
|
-
...
|
|
1422
|
+
...s,
|
|
1595
1423
|
tabIndex: $
|
|
1596
1424
|
}
|
|
1597
1425
|
};
|
|
1598
1426
|
}
|
|
1599
|
-
function
|
|
1600
|
-
let { selectionManager: e, key: r, ref: n, shouldSelectOnPressUp:
|
|
1601
|
-
if (
|
|
1427
|
+
function yr(t) {
|
|
1428
|
+
let { selectionManager: e, key: r, ref: n, shouldSelectOnPressUp: i, isVirtualized: l, shouldUseVirtualFocus: a, focus: u, isDisabled: f, onAction: g, allowsDifferentPressOrigin: h } = t, T = (p) => {
|
|
1429
|
+
if (p.pointerType === "keyboard" && st(p))
|
|
1602
1430
|
e.toggleSelection(r);
|
|
1603
1431
|
else {
|
|
1604
1432
|
if (e.selectionMode === "none")
|
|
1605
1433
|
return;
|
|
1606
|
-
e.selectionMode === "single" ? e.isSelected(r) && !e.disallowEmptySelection ? e.toggleSelection(r) : e.replaceSelection(r) :
|
|
1434
|
+
e.selectionMode === "single" ? e.isSelected(r) && !e.disallowEmptySelection ? e.toggleSelection(r) : e.replaceSelection(r) : p && p.shiftKey ? e.extendSelection(r) : e.selectionBehavior === "toggle" || p && (W(p) || p.pointerType === "touch" || p.pointerType === "virtual") ? e.toggleSelection(r) : e.replaceSelection(r);
|
|
1607
1435
|
}
|
|
1608
1436
|
};
|
|
1609
|
-
|
|
1610
|
-
r === e.focusedKey && e.isFocused && !
|
|
1437
|
+
z(() => {
|
|
1438
|
+
r === e.focusedKey && e.isFocused && !a && document.activeElement !== n.current && (u ? u() : Qe(n.current));
|
|
1611
1439
|
}, [
|
|
1612
1440
|
n,
|
|
1613
1441
|
r,
|
|
1614
1442
|
e.focusedKey,
|
|
1615
1443
|
e.childFocusStrategy,
|
|
1616
1444
|
e.isFocused,
|
|
1617
|
-
|
|
1618
|
-
]);
|
|
1619
|
-
let
|
|
1620
|
-
|
|
1445
|
+
a
|
|
1446
|
+
]), f = f || e.isDisabled(r);
|
|
1447
|
+
let v = {};
|
|
1448
|
+
!a && !f ? v = {
|
|
1621
1449
|
tabIndex: r === e.focusedKey ? 0 : -1,
|
|
1622
|
-
onFocus(
|
|
1623
|
-
|
|
1450
|
+
onFocus(p) {
|
|
1451
|
+
p.target === n.current && e.setFocusedKey(r);
|
|
1624
1452
|
}
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
},
|
|
1632
|
-
|
|
1633
|
-
|
|
1453
|
+
} : f && (v.onMouseDown = (p) => {
|
|
1454
|
+
p.preventDefault();
|
|
1455
|
+
});
|
|
1456
|
+
let b = !f && e.canSelectItem(r), E = g && !f, M = E && (e.selectionBehavior === "replace" ? !b : e.isEmpty), x = E && b && e.selectionBehavior === "replace", S = M || x, L = P(null), w = S && b, s = P(!1), D = P(!1), $ = {};
|
|
1457
|
+
i ? ($.onPressStart = (p) => {
|
|
1458
|
+
L.current = p.pointerType, s.current = w, p.pointerType === "keyboard" && (!S || Ne()) && T(p);
|
|
1459
|
+
}, h ? ($.onPressUp = (p) => {
|
|
1460
|
+
p.pointerType !== "keyboard" && T(p);
|
|
1461
|
+
}, $.onPress = M ? () => g() : null) : $.onPress = (p) => {
|
|
1462
|
+
if (M || x && p.pointerType !== "mouse") {
|
|
1463
|
+
if (p.pointerType === "keyboard" && !Re())
|
|
1634
1464
|
return;
|
|
1635
|
-
|
|
1465
|
+
g();
|
|
1636
1466
|
} else
|
|
1637
|
-
|
|
1638
|
-
}) : ($.onPressStart = (
|
|
1639
|
-
|
|
1640
|
-
}, $.onPress = (
|
|
1641
|
-
(
|
|
1642
|
-
}), l || (
|
|
1643
|
-
let { pressProps: y, isPressed:
|
|
1644
|
-
|
|
1645
|
-
} : void 0, { longPressProps:
|
|
1467
|
+
p.pointerType !== "keyboard" && T(p);
|
|
1468
|
+
}) : ($.onPressStart = (p) => {
|
|
1469
|
+
L.current = p.pointerType, s.current = w, D.current = M, (p.pointerType === "mouse" && !M || p.pointerType === "keyboard" && (!g || Ne())) && T(p);
|
|
1470
|
+
}, $.onPress = (p) => {
|
|
1471
|
+
(p.pointerType === "touch" || p.pointerType === "pen" || p.pointerType === "virtual" || p.pointerType === "keyboard" && S && Re() || p.pointerType === "mouse" && D.current) && (S ? g() : T(p));
|
|
1472
|
+
}), l || (v["data-key"] = r), $.preventFocusOnPress = a;
|
|
1473
|
+
let { pressProps: y, isPressed: m } = Je($), K = x ? (p) => {
|
|
1474
|
+
L.current === "mouse" && (p.stopPropagation(), p.preventDefault(), g());
|
|
1475
|
+
} : void 0, { longPressProps: k } = er({
|
|
1646
1476
|
isDisabled: !w,
|
|
1647
|
-
onLongPress(
|
|
1648
|
-
|
|
1477
|
+
onLongPress(p) {
|
|
1478
|
+
p.pointerType === "touch" && (T(p), e.setSelectionBehavior("toggle"));
|
|
1649
1479
|
}
|
|
1650
1480
|
});
|
|
1651
1481
|
return {
|
|
1652
|
-
itemProps:
|
|
1653
|
-
onDoubleClick:
|
|
1654
|
-
|
|
1655
|
-
|
|
1482
|
+
itemProps: U(v, b || M ? y : {}, w ? k : {}, {
|
|
1483
|
+
onDoubleClick: K,
|
|
1484
|
+
onDragStartCapture: (p) => {
|
|
1485
|
+
L.current === "touch" && s.current && p.preventDefault();
|
|
1656
1486
|
}
|
|
1657
1487
|
}),
|
|
1658
|
-
isPressed:
|
|
1488
|
+
isPressed: m,
|
|
1659
1489
|
isSelected: e.isSelected(r),
|
|
1660
|
-
isDisabled:
|
|
1661
|
-
allowsSelection:
|
|
1662
|
-
hasAction:
|
|
1490
|
+
isDisabled: f,
|
|
1491
|
+
allowsSelection: b,
|
|
1492
|
+
hasAction: S
|
|
1663
1493
|
};
|
|
1664
1494
|
}
|
|
1665
|
-
function
|
|
1495
|
+
function Re() {
|
|
1666
1496
|
let t = window.event;
|
|
1667
1497
|
return (t == null ? void 0 : t.key) === "Enter";
|
|
1668
1498
|
}
|
|
1669
|
-
function
|
|
1499
|
+
function Ne() {
|
|
1670
1500
|
let t = window.event;
|
|
1671
1501
|
return (t == null ? void 0 : t.key) === " " || (t == null ? void 0 : t.code) === "Space";
|
|
1672
1502
|
}
|
|
1673
|
-
|
|
1674
|
-
function
|
|
1675
|
-
|
|
1676
|
-
}
|
|
1677
|
-
function fe(t) {
|
|
1678
|
-
if (oe()) {
|
|
1679
|
-
if (Z !== "disabled")
|
|
1680
|
-
return;
|
|
1681
|
-
Z = "restoring", setTimeout(() => {
|
|
1682
|
-
Ie(() => {
|
|
1683
|
-
Z === "restoring" && (document.documentElement.style.webkitUserSelect === "none" && (document.documentElement.style.webkitUserSelect = Me || ""), Me = "", Z = "default");
|
|
1684
|
-
});
|
|
1685
|
-
}, 300);
|
|
1686
|
-
} else if ((t instanceof HTMLElement || t instanceof SVGElement) && t && pe.has(t)) {
|
|
1687
|
-
let e = pe.get(t);
|
|
1688
|
-
t.style.userSelect === "none" && (t.style.userSelect = e), t.getAttribute("style") === "" && t.removeAttribute("style"), pe.delete(t);
|
|
1689
|
-
}
|
|
1690
|
-
}
|
|
1691
|
-
function Le(t) {
|
|
1692
|
-
return t.mozInputSource === 0 && t.isTrusted ? !0 : t.detail === 0 && !t.pointerType;
|
|
1693
|
-
}
|
|
1694
|
-
const Nt = Q.createContext(null);
|
|
1695
|
-
Nt.displayName = "PressResponderContext";
|
|
1696
|
-
function en(t) {
|
|
1697
|
-
let e = se(Nt);
|
|
1698
|
-
if (e) {
|
|
1699
|
-
let { register: r, ...n } = e;
|
|
1700
|
-
t = G(n, t), r();
|
|
1701
|
-
}
|
|
1702
|
-
return Lt(e, t.ref), t;
|
|
1703
|
-
}
|
|
1704
|
-
function tn(t) {
|
|
1705
|
-
let {
|
|
1706
|
-
onPress: e,
|
|
1707
|
-
onPressChange: r,
|
|
1708
|
-
onPressStart: n,
|
|
1709
|
-
onPressEnd: s,
|
|
1710
|
-
onPressUp: l,
|
|
1711
|
-
isDisabled: u,
|
|
1712
|
-
isPressed: d,
|
|
1713
|
-
preventFocusOnPress: p,
|
|
1714
|
-
shouldCancelOnPointerExit: h,
|
|
1715
|
-
allowTextSelectionOnPress: b,
|
|
1716
|
-
ref: S,
|
|
1717
|
-
...m
|
|
1718
|
-
} = en(t), g = x(null);
|
|
1719
|
-
g.current = {
|
|
1720
|
-
onPress: e,
|
|
1721
|
-
onPressChange: r,
|
|
1722
|
-
onPressStart: n,
|
|
1723
|
-
onPressEnd: s,
|
|
1724
|
-
onPressUp: l,
|
|
1725
|
-
isDisabled: u,
|
|
1726
|
-
shouldCancelOnPointerExit: h
|
|
1727
|
-
};
|
|
1728
|
-
let [L, k] = A(!1), M = x({
|
|
1729
|
-
isPressed: !1,
|
|
1730
|
-
ignoreEmulatedMouseEvents: !1,
|
|
1731
|
-
ignoreClickAfterPress: !1,
|
|
1732
|
-
didFirePressStart: !1,
|
|
1733
|
-
activePointerId: null,
|
|
1734
|
-
target: null,
|
|
1735
|
-
isOverTarget: !1,
|
|
1736
|
-
pointerType: null
|
|
1737
|
-
}), { addGlobalListener: K, removeAllGlobalListeners: P } = De(), w = z(() => {
|
|
1738
|
-
let i = M.current, E = (o, f) => {
|
|
1739
|
-
let { onPressStart: a, onPressChange: c, isDisabled: O } = g.current;
|
|
1740
|
-
O || i.didFirePressStart || (a && a({
|
|
1741
|
-
type: "pressstart",
|
|
1742
|
-
pointerType: f,
|
|
1743
|
-
target: o.currentTarget,
|
|
1744
|
-
shiftKey: o.shiftKey,
|
|
1745
|
-
metaKey: o.metaKey,
|
|
1746
|
-
ctrlKey: o.ctrlKey,
|
|
1747
|
-
altKey: o.altKey
|
|
1748
|
-
}), c && c(!0), i.didFirePressStart = !0, k(!0));
|
|
1749
|
-
}, $ = (o, f, a = !0) => {
|
|
1750
|
-
let { onPressEnd: c, onPressChange: O, onPress: ee, isDisabled: be } = g.current;
|
|
1751
|
-
!i.didFirePressStart || (i.ignoreClickAfterPress = !0, i.didFirePressStart = !1, c && c({
|
|
1752
|
-
type: "pressend",
|
|
1753
|
-
pointerType: f,
|
|
1754
|
-
target: o.currentTarget,
|
|
1755
|
-
shiftKey: o.shiftKey,
|
|
1756
|
-
metaKey: o.metaKey,
|
|
1757
|
-
ctrlKey: o.ctrlKey,
|
|
1758
|
-
altKey: o.altKey
|
|
1759
|
-
}), O && O(!1), k(!1), ee && a && !be && ee({
|
|
1760
|
-
type: "press",
|
|
1761
|
-
pointerType: f,
|
|
1762
|
-
target: o.currentTarget,
|
|
1763
|
-
shiftKey: o.shiftKey,
|
|
1764
|
-
metaKey: o.metaKey,
|
|
1765
|
-
ctrlKey: o.ctrlKey,
|
|
1766
|
-
altKey: o.altKey
|
|
1767
|
-
}));
|
|
1768
|
-
}, y = (o, f) => {
|
|
1769
|
-
let { onPressUp: a, isDisabled: c } = g.current;
|
|
1770
|
-
c || a && a({
|
|
1771
|
-
type: "pressup",
|
|
1772
|
-
pointerType: f,
|
|
1773
|
-
target: o.currentTarget,
|
|
1774
|
-
shiftKey: o.shiftKey,
|
|
1775
|
-
metaKey: o.metaKey,
|
|
1776
|
-
ctrlKey: o.ctrlKey,
|
|
1777
|
-
altKey: o.altKey
|
|
1778
|
-
});
|
|
1779
|
-
}, T = (o) => {
|
|
1780
|
-
i.isPressed && (i.isOverTarget && $(B(i.target, o), i.pointerType, !1), i.isPressed = !1, i.isOverTarget = !1, i.activePointerId = null, i.pointerType = null, P(), b || fe(i.target));
|
|
1781
|
-
}, v = {
|
|
1782
|
-
onKeyDown(o) {
|
|
1783
|
-
me(o.nativeEvent, o.currentTarget) && o.currentTarget.contains(o.target) ? (ft(o.target, o.key) && o.preventDefault(), o.stopPropagation(), !i.isPressed && !o.repeat && (i.target = o.currentTarget, i.isPressed = !0, E(o, "keyboard"), K(document, "keyup", C, !1))) : o.key === "Enter" && ke(o.currentTarget) && o.stopPropagation();
|
|
1784
|
-
},
|
|
1785
|
-
onKeyUp(o) {
|
|
1786
|
-
me(o.nativeEvent, o.currentTarget) && !o.repeat && o.currentTarget.contains(o.target) && y(B(i.target, o), "keyboard");
|
|
1787
|
-
},
|
|
1788
|
-
onClick(o) {
|
|
1789
|
-
o && !o.currentTarget.contains(o.target) || o && o.button === 0 && (o.stopPropagation(), u && o.preventDefault(), !i.ignoreClickAfterPress && !i.ignoreEmulatedMouseEvents && (i.pointerType === "virtual" || Le(o.nativeEvent)) && (!u && !p && I(o.currentTarget), E(o, "virtual"), y(o, "virtual"), $(o, "virtual")), i.ignoreEmulatedMouseEvents = !1, i.ignoreClickAfterPress = !1);
|
|
1790
|
-
}
|
|
1791
|
-
}, C = (o) => {
|
|
1792
|
-
if (i.isPressed && me(o, i.target)) {
|
|
1793
|
-
ft(o.target, o.key) && o.preventDefault(), o.stopPropagation(), i.isPressed = !1;
|
|
1794
|
-
let f = o.target;
|
|
1795
|
-
$(B(i.target, o), "keyboard", i.target.contains(f)), P(), i.target instanceof HTMLElement && i.target.contains(f) && (ke(i.target) || i.target.getAttribute("role") === "link") && i.target.click();
|
|
1796
|
-
}
|
|
1797
|
-
};
|
|
1798
|
-
if (typeof PointerEvent < "u") {
|
|
1799
|
-
v.onPointerDown = (c) => {
|
|
1800
|
-
if (!(c.button !== 0 || !c.currentTarget.contains(c.target))) {
|
|
1801
|
-
if (on(c.nativeEvent)) {
|
|
1802
|
-
i.pointerType = "virtual";
|
|
1803
|
-
return;
|
|
1804
|
-
}
|
|
1805
|
-
Te(c.currentTarget) && c.preventDefault(), i.pointerType = c.pointerType, c.stopPropagation(), i.isPressed || (i.isPressed = !0, i.isOverTarget = !0, i.activePointerId = c.pointerId, i.target = c.currentTarget, !u && !p && I(c.currentTarget), b || ct(i.target), E(c, i.pointerType), K(document, "pointermove", o, !1), K(document, "pointerup", f, !1), K(document, "pointercancel", a, !1));
|
|
1806
|
-
}
|
|
1807
|
-
}, v.onMouseDown = (c) => {
|
|
1808
|
-
!c.currentTarget.contains(c.target) || c.button === 0 && (Te(c.currentTarget) && c.preventDefault(), c.stopPropagation());
|
|
1809
|
-
}, v.onPointerUp = (c) => {
|
|
1810
|
-
!c.currentTarget.contains(c.target) || i.pointerType === "virtual" || c.button === 0 && j(c, c.currentTarget) && y(c, i.pointerType || c.pointerType);
|
|
1811
|
-
};
|
|
1812
|
-
let o = (c) => {
|
|
1813
|
-
c.pointerId === i.activePointerId && (j(c, i.target) ? i.isOverTarget || (i.isOverTarget = !0, E(B(i.target, c), i.pointerType)) : i.isOverTarget && (i.isOverTarget = !1, $(B(i.target, c), i.pointerType, !1), g.current.shouldCancelOnPointerExit && T(c)));
|
|
1814
|
-
}, f = (c) => {
|
|
1815
|
-
c.pointerId === i.activePointerId && i.isPressed && c.button === 0 && (j(c, i.target) ? $(B(i.target, c), i.pointerType) : i.isOverTarget && $(B(i.target, c), i.pointerType, !1), i.isPressed = !1, i.isOverTarget = !1, i.activePointerId = null, i.pointerType = null, P(), b || fe(i.target));
|
|
1816
|
-
}, a = (c) => {
|
|
1817
|
-
T(c);
|
|
1818
|
-
};
|
|
1819
|
-
v.onDragStart = (c) => {
|
|
1820
|
-
!c.currentTarget.contains(c.target) || T(c);
|
|
1821
|
-
};
|
|
1822
|
-
} else {
|
|
1823
|
-
v.onMouseDown = (a) => {
|
|
1824
|
-
a.button !== 0 || !a.currentTarget.contains(a.target) || (Te(a.currentTarget) && a.preventDefault(), a.stopPropagation(), !i.ignoreEmulatedMouseEvents && (i.isPressed = !0, i.isOverTarget = !0, i.target = a.currentTarget, i.pointerType = Le(a.nativeEvent) ? "virtual" : "mouse", !u && !p && I(a.currentTarget), E(a, i.pointerType), K(document, "mouseup", o, !1)));
|
|
1825
|
-
}, v.onMouseEnter = (a) => {
|
|
1826
|
-
!a.currentTarget.contains(a.target) || (a.stopPropagation(), i.isPressed && !i.ignoreEmulatedMouseEvents && (i.isOverTarget = !0, E(a, i.pointerType)));
|
|
1827
|
-
}, v.onMouseLeave = (a) => {
|
|
1828
|
-
!a.currentTarget.contains(a.target) || (a.stopPropagation(), i.isPressed && !i.ignoreEmulatedMouseEvents && (i.isOverTarget = !1, $(a, i.pointerType, !1), g.current.shouldCancelOnPointerExit && T(a)));
|
|
1829
|
-
}, v.onMouseUp = (a) => {
|
|
1830
|
-
!a.currentTarget.contains(a.target) || !i.ignoreEmulatedMouseEvents && a.button === 0 && y(a, i.pointerType);
|
|
1831
|
-
};
|
|
1832
|
-
let o = (a) => {
|
|
1833
|
-
if (a.button === 0) {
|
|
1834
|
-
if (i.isPressed = !1, P(), i.ignoreEmulatedMouseEvents) {
|
|
1835
|
-
i.ignoreEmulatedMouseEvents = !1;
|
|
1836
|
-
return;
|
|
1837
|
-
}
|
|
1838
|
-
j(a, i.target) ? $(B(i.target, a), i.pointerType) : i.isOverTarget && $(B(i.target, a), i.pointerType, !1), i.isOverTarget = !1;
|
|
1839
|
-
}
|
|
1840
|
-
};
|
|
1841
|
-
v.onTouchStart = (a) => {
|
|
1842
|
-
if (!a.currentTarget.contains(a.target))
|
|
1843
|
-
return;
|
|
1844
|
-
a.stopPropagation();
|
|
1845
|
-
let c = rn(a.nativeEvent);
|
|
1846
|
-
!c || (i.activePointerId = c.identifier, i.ignoreEmulatedMouseEvents = !0, i.isOverTarget = !0, i.isPressed = !0, i.target = a.currentTarget, i.pointerType = "touch", !u && !p && I(a.currentTarget), b || ct(i.target), E(a, i.pointerType), K(window, "scroll", f, !0));
|
|
1847
|
-
}, v.onTouchMove = (a) => {
|
|
1848
|
-
if (!a.currentTarget.contains(a.target) || (a.stopPropagation(), !i.isPressed))
|
|
1849
|
-
return;
|
|
1850
|
-
let c = ut(a.nativeEvent, i.activePointerId);
|
|
1851
|
-
c && j(c, a.currentTarget) ? i.isOverTarget || (i.isOverTarget = !0, E(a, i.pointerType)) : i.isOverTarget && (i.isOverTarget = !1, $(a, i.pointerType, !1), g.current.shouldCancelOnPointerExit && T(a));
|
|
1852
|
-
}, v.onTouchEnd = (a) => {
|
|
1853
|
-
if (!a.currentTarget.contains(a.target) || (a.stopPropagation(), !i.isPressed))
|
|
1854
|
-
return;
|
|
1855
|
-
let c = ut(a.nativeEvent, i.activePointerId);
|
|
1856
|
-
c && j(c, a.currentTarget) ? (y(a, i.pointerType), $(a, i.pointerType)) : i.isOverTarget && $(a, i.pointerType, !1), i.isPressed = !1, i.activePointerId = null, i.isOverTarget = !1, i.ignoreEmulatedMouseEvents = !0, b || fe(i.target), P();
|
|
1857
|
-
}, v.onTouchCancel = (a) => {
|
|
1858
|
-
!a.currentTarget.contains(a.target) || (a.stopPropagation(), i.isPressed && T(a));
|
|
1859
|
-
};
|
|
1860
|
-
let f = (a) => {
|
|
1861
|
-
i.isPressed && a.target.contains(i.target) && T({
|
|
1862
|
-
currentTarget: i.target,
|
|
1863
|
-
shiftKey: !1,
|
|
1864
|
-
ctrlKey: !1,
|
|
1865
|
-
metaKey: !1,
|
|
1866
|
-
altKey: !1
|
|
1867
|
-
});
|
|
1868
|
-
};
|
|
1869
|
-
v.onDragStart = (a) => {
|
|
1870
|
-
!a.currentTarget.contains(a.target) || T(a);
|
|
1871
|
-
};
|
|
1872
|
-
}
|
|
1873
|
-
return v;
|
|
1874
|
-
}, [
|
|
1875
|
-
K,
|
|
1876
|
-
u,
|
|
1877
|
-
p,
|
|
1878
|
-
P,
|
|
1879
|
-
b
|
|
1880
|
-
]);
|
|
1881
|
-
return D(() => () => {
|
|
1882
|
-
b || fe(M.current.target);
|
|
1883
|
-
}, [
|
|
1884
|
-
b
|
|
1885
|
-
]), {
|
|
1886
|
-
isPressed: d || L,
|
|
1887
|
-
pressProps: G(m, w)
|
|
1888
|
-
};
|
|
1889
|
-
}
|
|
1890
|
-
function ke(t) {
|
|
1891
|
-
return t.tagName === "A" && t.hasAttribute("href");
|
|
1892
|
-
}
|
|
1893
|
-
function me(t, e) {
|
|
1894
|
-
const { key: r, code: n } = t, s = e, l = s.getAttribute("role");
|
|
1895
|
-
return (r === "Enter" || r === " " || r === "Spacebar" || n === "Space") && !(s instanceof HTMLInputElement && !Bt(s, r) || s instanceof HTMLTextAreaElement || s.isContentEditable) && (!ke(s) || l === "button" && r !== "Enter") && !(l === "link" && r !== "Enter");
|
|
1896
|
-
}
|
|
1897
|
-
function rn(t) {
|
|
1898
|
-
const { targetTouches: e } = t;
|
|
1899
|
-
return e.length > 0 ? e[0] : null;
|
|
1503
|
+
const lt = /* @__PURE__ */ new WeakMap();
|
|
1504
|
+
function re(t, e, r) {
|
|
1505
|
+
return typeof e == "string" && (e = e.replace(/\s+/g, "")), `${lt.get(t)}-${r}-${e}`;
|
|
1900
1506
|
}
|
|
1901
|
-
function
|
|
1902
|
-
|
|
1903
|
-
for (let n = 0; n < r.length; n++) {
|
|
1904
|
-
const s = r[n];
|
|
1905
|
-
if (s.identifier === e)
|
|
1906
|
-
return s;
|
|
1907
|
-
}
|
|
1908
|
-
return null;
|
|
1909
|
-
}
|
|
1910
|
-
function B(t, e) {
|
|
1911
|
-
return {
|
|
1912
|
-
currentTarget: t,
|
|
1913
|
-
shiftKey: e.shiftKey,
|
|
1914
|
-
ctrlKey: e.ctrlKey,
|
|
1915
|
-
metaKey: e.metaKey,
|
|
1916
|
-
altKey: e.altKey
|
|
1917
|
-
};
|
|
1918
|
-
}
|
|
1919
|
-
function nn(t) {
|
|
1920
|
-
let e = t.width / 2 || t.radiusX || 0, r = t.height / 2 || t.radiusY || 0;
|
|
1921
|
-
return {
|
|
1922
|
-
top: t.clientY - r,
|
|
1923
|
-
right: t.clientX + e,
|
|
1924
|
-
bottom: t.clientY + r,
|
|
1925
|
-
left: t.clientX - e
|
|
1926
|
-
};
|
|
1927
|
-
}
|
|
1928
|
-
function sn(t, e) {
|
|
1929
|
-
return !(t.left > e.right || e.left > t.right || t.top > e.bottom || e.top > t.bottom);
|
|
1930
|
-
}
|
|
1931
|
-
function j(t, e) {
|
|
1932
|
-
let r = e.getBoundingClientRect(), n = nn(t);
|
|
1933
|
-
return sn(r, n);
|
|
1934
|
-
}
|
|
1935
|
-
function Te(t) {
|
|
1936
|
-
return !(t instanceof HTMLElement) || !t.draggable;
|
|
1937
|
-
}
|
|
1938
|
-
function ft(t, e) {
|
|
1939
|
-
return t instanceof HTMLInputElement ? !Bt(t, e) : t instanceof HTMLButtonElement ? t.type !== "submit" : !0;
|
|
1940
|
-
}
|
|
1941
|
-
const an = /* @__PURE__ */ new Set([
|
|
1942
|
-
"checkbox",
|
|
1943
|
-
"radio",
|
|
1944
|
-
"range",
|
|
1945
|
-
"color",
|
|
1946
|
-
"file",
|
|
1947
|
-
"image",
|
|
1948
|
-
"button",
|
|
1949
|
-
"submit",
|
|
1950
|
-
"reset"
|
|
1951
|
-
]);
|
|
1952
|
-
function Bt(t, e) {
|
|
1953
|
-
return t.type === "checkbox" || t.type === "radio" ? e === " " : an.has(t.type);
|
|
1954
|
-
}
|
|
1955
|
-
function on(t) {
|
|
1956
|
-
return t.width === 0 && t.height === 0 || t.width === 1 && t.height === 1 && t.pressure === 0 && t.detail === 0 && t.pointerType === "mouse";
|
|
1957
|
-
}
|
|
1958
|
-
let ln = /* @__PURE__ */ new Set(), dt = !1, H = !1, Ce = !1;
|
|
1959
|
-
function Ue(t, e) {
|
|
1960
|
-
for (let r of ln)
|
|
1961
|
-
r(t, e);
|
|
1962
|
-
}
|
|
1963
|
-
function cn(t) {
|
|
1964
|
-
return !(t.metaKey || !ae() && t.altKey || t.ctrlKey || t.key === "Control" || t.key === "Shift" || t.key === "Meta");
|
|
1965
|
-
}
|
|
1966
|
-
function pt(t) {
|
|
1967
|
-
H = !0, cn(t) && Ue("keyboard", t);
|
|
1968
|
-
}
|
|
1969
|
-
function Y(t) {
|
|
1970
|
-
(t.type === "mousedown" || t.type === "pointerdown") && (H = !0, Ue("pointer", t));
|
|
1971
|
-
}
|
|
1972
|
-
function un(t) {
|
|
1973
|
-
Le(t) && (H = !0);
|
|
1974
|
-
}
|
|
1975
|
-
function fn(t) {
|
|
1976
|
-
t.target === window || t.target === document || (!H && !Ce && Ue("virtual", t), H = !1, Ce = !1);
|
|
1977
|
-
}
|
|
1978
|
-
function dn() {
|
|
1979
|
-
H = !1, Ce = !0;
|
|
1980
|
-
}
|
|
1981
|
-
function yt() {
|
|
1982
|
-
if (typeof window > "u" || dt)
|
|
1983
|
-
return;
|
|
1984
|
-
let t = HTMLElement.prototype.focus;
|
|
1985
|
-
HTMLElement.prototype.focus = function() {
|
|
1986
|
-
H = !0, t.apply(this, arguments);
|
|
1987
|
-
}, document.addEventListener("keydown", pt, !0), document.addEventListener("keyup", pt, !0), document.addEventListener("click", un, !0), window.addEventListener("focus", fn, !0), window.addEventListener("blur", dn, !1), typeof PointerEvent < "u" ? (document.addEventListener("pointerdown", Y, !0), document.addEventListener("pointermove", Y, !0), document.addEventListener("pointerup", Y, !0)) : (document.addEventListener("mousedown", Y, !0), document.addEventListener("mousemove", Y, !0), document.addEventListener("mouseup", Y, !0)), dt = !0;
|
|
1988
|
-
}
|
|
1989
|
-
typeof document < "u" && (document.readyState !== "loading" ? yt() : document.addEventListener("DOMContentLoaded", yt));
|
|
1990
|
-
const Ut = /* @__PURE__ */ new WeakMap();
|
|
1991
|
-
function ge(t, e, r) {
|
|
1992
|
-
return typeof e == "string" && (e = e.replace(/\s+/g, "")), Ut.get(t) + "-" + r + "-" + e;
|
|
1993
|
-
}
|
|
1994
|
-
function pn(t, e, r) {
|
|
1995
|
-
let {
|
|
1996
|
-
key: n,
|
|
1997
|
-
isDisabled: s
|
|
1998
|
-
} = t, {
|
|
1999
|
-
selectionManager: l,
|
|
2000
|
-
selectedKey: u
|
|
2001
|
-
} = e, d = n === u, {
|
|
2002
|
-
itemProps: p
|
|
2003
|
-
} = Qr({
|
|
1507
|
+
function br(t, e, r) {
|
|
1508
|
+
let { key: n, isDisabled: i } = t, { selectionManager: l, selectedKey: a } = e, u = n === a, f = i || e.isDisabled || e.disabledKeys.has(n), { itemProps: g } = yr({
|
|
2004
1509
|
selectionManager: l,
|
|
2005
1510
|
key: n,
|
|
2006
|
-
ref: r
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
} = tn(U({}, p, {
|
|
2010
|
-
isDisabled: h
|
|
2011
|
-
})), S = ge(e, n, "tab"), m = ge(e, n, "tabpanel"), {
|
|
2012
|
-
tabIndex: g
|
|
2013
|
-
} = b;
|
|
1511
|
+
ref: r,
|
|
1512
|
+
isDisabled: f
|
|
1513
|
+
}), h = re(e, n, "tab"), T = re(e, n, "tabpanel"), { tabIndex: v } = g;
|
|
2014
1514
|
return {
|
|
2015
|
-
tabProps:
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
"aria-
|
|
2019
|
-
"aria-
|
|
2020
|
-
|
|
1515
|
+
tabProps: {
|
|
1516
|
+
...g,
|
|
1517
|
+
id: h,
|
|
1518
|
+
"aria-selected": u,
|
|
1519
|
+
"aria-disabled": f || void 0,
|
|
1520
|
+
"aria-controls": u ? T : void 0,
|
|
1521
|
+
tabIndex: f ? void 0 : v,
|
|
2021
1522
|
role: "tab"
|
|
2022
|
-
}
|
|
1523
|
+
},
|
|
1524
|
+
isSelected: u,
|
|
1525
|
+
isDisabled: f
|
|
2023
1526
|
};
|
|
2024
1527
|
}
|
|
2025
|
-
function
|
|
2026
|
-
let [n,
|
|
2027
|
-
|
|
1528
|
+
function gr(t, e, r) {
|
|
1529
|
+
let [n, i] = F(0);
|
|
1530
|
+
se(() => {
|
|
2028
1531
|
if (r != null && r.current) {
|
|
2029
|
-
let
|
|
2030
|
-
let
|
|
1532
|
+
let u = () => {
|
|
1533
|
+
let g = rt(r.current, {
|
|
2031
1534
|
tabbable: !0
|
|
2032
1535
|
});
|
|
2033
|
-
|
|
1536
|
+
i(g.nextNode() ? void 0 : 0);
|
|
2034
1537
|
};
|
|
2035
|
-
|
|
2036
|
-
let
|
|
2037
|
-
return
|
|
1538
|
+
u();
|
|
1539
|
+
let f = new MutationObserver(u);
|
|
1540
|
+
return f.observe(r.current, {
|
|
2038
1541
|
subtree: !0,
|
|
2039
1542
|
childList: !0,
|
|
2040
1543
|
attributes: !0,
|
|
2041
|
-
attributeFilter: [
|
|
1544
|
+
attributeFilter: [
|
|
1545
|
+
"tabIndex",
|
|
1546
|
+
"disabled"
|
|
1547
|
+
]
|
|
2042
1548
|
}), () => {
|
|
2043
|
-
|
|
1549
|
+
f.disconnect();
|
|
2044
1550
|
};
|
|
2045
1551
|
}
|
|
2046
|
-
}, [
|
|
2047
|
-
|
|
1552
|
+
}, [
|
|
1553
|
+
r
|
|
1554
|
+
]);
|
|
1555
|
+
const l = re(e, e == null ? void 0 : e.selectedKey, "tabpanel"), a = qe({
|
|
1556
|
+
...t,
|
|
2048
1557
|
id: l,
|
|
2049
|
-
"aria-labelledby":
|
|
2050
|
-
})
|
|
1558
|
+
"aria-labelledby": re(e, e == null ? void 0 : e.selectedKey, "tab")
|
|
1559
|
+
});
|
|
2051
1560
|
return {
|
|
2052
|
-
tabPanelProps:
|
|
1561
|
+
tabPanelProps: U(a, {
|
|
2053
1562
|
tabIndex: n,
|
|
2054
1563
|
role: "tabpanel",
|
|
2055
1564
|
"aria-describedby": t["aria-describedby"],
|
|
@@ -2057,10 +1566,7 @@ function yn(t, e, r) {
|
|
|
2057
1566
|
})
|
|
2058
1567
|
};
|
|
2059
1568
|
}
|
|
2060
|
-
class
|
|
2061
|
-
constructor(e, r, n, s) {
|
|
2062
|
-
s === void 0 && (s = /* @__PURE__ */ new Set()), this.collection = void 0, this.flipDirection = void 0, this.disabledKeys = void 0, this.orientation = void 0, this.collection = e, this.flipDirection = r === "rtl" && n === "horizontal", this.orientation = n, this.disabledKeys = s;
|
|
2063
|
-
}
|
|
1569
|
+
class hr {
|
|
2064
1570
|
getKeyLeftOf(e) {
|
|
2065
1571
|
return this.flipDirection ? this.getNextKey(e) : this.orientation === "horizontal" ? this.getPreviousKey(e) : null;
|
|
2066
1572
|
}
|
|
@@ -2093,40 +1599,39 @@ class gn {
|
|
|
2093
1599
|
while (this.disabledKeys.has(e));
|
|
2094
1600
|
return e;
|
|
2095
1601
|
}
|
|
1602
|
+
constructor(e, r, n, i = /* @__PURE__ */ new Set()) {
|
|
1603
|
+
this.collection = e, this.flipDirection = r === "rtl" && n === "horizontal", this.orientation = n, this.disabledKeys = i;
|
|
1604
|
+
}
|
|
2096
1605
|
}
|
|
2097
|
-
function
|
|
2098
|
-
let {
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
disabledKeys: d
|
|
2105
|
-
} = e, {
|
|
2106
|
-
direction: p
|
|
2107
|
-
} = Kt(), h = z(() => new gn(l, p, n, d), [l, d, n, p]), {
|
|
2108
|
-
collectionProps: b
|
|
2109
|
-
} = Zr({
|
|
1606
|
+
function vr(t, e, r) {
|
|
1607
|
+
let { orientation: n = "horizontal", keyboardActivation: i = "automatic" } = t, { collection: l, selectionManager: a, disabledKeys: u } = e, { direction: f } = it(), g = R(() => new hr(l, f, n, u), [
|
|
1608
|
+
l,
|
|
1609
|
+
u,
|
|
1610
|
+
n,
|
|
1611
|
+
f
|
|
1612
|
+
]), { collectionProps: h } = pr({
|
|
2110
1613
|
ref: r,
|
|
2111
|
-
selectionManager:
|
|
2112
|
-
keyboardDelegate:
|
|
2113
|
-
selectOnFocus:
|
|
1614
|
+
selectionManager: a,
|
|
1615
|
+
keyboardDelegate: g,
|
|
1616
|
+
selectOnFocus: i === "automatic",
|
|
2114
1617
|
disallowEmptySelection: !0,
|
|
2115
1618
|
scrollRef: r
|
|
2116
|
-
}),
|
|
2117
|
-
|
|
2118
|
-
let
|
|
2119
|
-
|
|
2120
|
-
|
|
1619
|
+
}), T = _e();
|
|
1620
|
+
lt.set(e, T);
|
|
1621
|
+
let v = qe({
|
|
1622
|
+
...t,
|
|
1623
|
+
id: T
|
|
1624
|
+
});
|
|
2121
1625
|
return {
|
|
2122
|
-
tabListProps:
|
|
1626
|
+
tabListProps: {
|
|
1627
|
+
...U(h, v),
|
|
2123
1628
|
role: "tablist",
|
|
2124
1629
|
"aria-orientation": n,
|
|
2125
1630
|
tabIndex: void 0
|
|
2126
|
-
}
|
|
1631
|
+
}
|
|
2127
1632
|
};
|
|
2128
1633
|
}
|
|
2129
|
-
function
|
|
1634
|
+
function $r(t, e, r) {
|
|
2130
1635
|
return e in t ? Object.defineProperty(t, e, {
|
|
2131
1636
|
value: r,
|
|
2132
1637
|
enumerable: !0,
|
|
@@ -2134,118 +1639,136 @@ function hn(t, e, r) {
|
|
|
2134
1639
|
writable: !0
|
|
2135
1640
|
}) : t[e] = r, t;
|
|
2136
1641
|
}
|
|
2137
|
-
function
|
|
1642
|
+
function Be(t, e) {
|
|
2138
1643
|
var r = Object.keys(t);
|
|
2139
1644
|
if (Object.getOwnPropertySymbols) {
|
|
2140
1645
|
var n = Object.getOwnPropertySymbols(t);
|
|
2141
|
-
e && (n = n.filter(function(
|
|
2142
|
-
return Object.getOwnPropertyDescriptor(t,
|
|
1646
|
+
e && (n = n.filter(function(i) {
|
|
1647
|
+
return Object.getOwnPropertyDescriptor(t, i).enumerable;
|
|
2143
1648
|
})), r.push.apply(r, n);
|
|
2144
1649
|
}
|
|
2145
1650
|
return r;
|
|
2146
1651
|
}
|
|
2147
|
-
function
|
|
1652
|
+
function Ue(t) {
|
|
2148
1653
|
for (var e = 1; e < arguments.length; e++) {
|
|
2149
1654
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
2150
|
-
e % 2 ?
|
|
2151
|
-
|
|
2152
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) :
|
|
1655
|
+
e % 2 ? Be(Object(r), !0).forEach(function(n) {
|
|
1656
|
+
$r(t, n, r[n]);
|
|
1657
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Be(Object(r)).forEach(function(n) {
|
|
2153
1658
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
2154
1659
|
});
|
|
2155
1660
|
}
|
|
2156
1661
|
return t;
|
|
2157
1662
|
}
|
|
2158
|
-
var
|
|
1663
|
+
var mr = (t, e, r) => {
|
|
2159
1664
|
for (var n of Object.keys(t)) {
|
|
2160
|
-
var
|
|
2161
|
-
if (t[n] !== ((
|
|
1665
|
+
var i;
|
|
1666
|
+
if (t[n] !== ((i = e[n]) !== null && i !== void 0 ? i : r[n]))
|
|
2162
1667
|
return !1;
|
|
2163
1668
|
}
|
|
2164
1669
|
return !0;
|
|
2165
|
-
},
|
|
2166
|
-
var r = t.defaultClassName, n =
|
|
2167
|
-
for (var
|
|
2168
|
-
var l,
|
|
2169
|
-
if (
|
|
2170
|
-
var
|
|
2171
|
-
typeof
|
|
2172
|
-
var
|
|
2173
|
-
|
|
1670
|
+
}, Te = (t) => (e) => {
|
|
1671
|
+
var r = t.defaultClassName, n = Ue(Ue({}, t.defaultVariants), e);
|
|
1672
|
+
for (var i in n) {
|
|
1673
|
+
var l, a = (l = n[i]) !== null && l !== void 0 ? l : t.defaultVariants[i];
|
|
1674
|
+
if (a != null) {
|
|
1675
|
+
var u = a;
|
|
1676
|
+
typeof u == "boolean" && (u = u === !0 ? "true" : "false");
|
|
1677
|
+
var f = t.variantClassNames[i][u];
|
|
1678
|
+
f && (r += " " + f);
|
|
2174
1679
|
}
|
|
2175
1680
|
}
|
|
2176
|
-
for (var [
|
|
2177
|
-
|
|
1681
|
+
for (var [g, h] of t.compoundVariants)
|
|
1682
|
+
mr(g, n, t.defaultVariants) && (r += " " + h);
|
|
2178
1683
|
return r;
|
|
2179
|
-
},
|
|
2180
|
-
function
|
|
1684
|
+
}, Kr = Te({ defaultClassName: "kz6kzz0", variantClassNames: { context: { container: "kz6kzz1", navigation: "kz6kzz2" }, active: { true: "kz6kzz3", false: "kz6kzz4" }, disabled: { true: "kz6kzz5", false: "kz6kzz6" } }, defaultVariants: {}, compoundVariants: [[{ context: "container", active: !0 }, "kz6kzz7"], [{ context: "container", active: !1 }, "kz6kzz8"], [{ context: "container", active: !1, disabled: !1 }, "kz6kzz9"], [{ context: "navigation", active: !0 }, "kz6kzza"], [{ context: "navigation", active: !1 }, "kz6kzzb"], [{ context: "navigation", active: !1, disabled: !1 }, "kz6kzzc"], [{ context: "navigation", active: !1, disabled: !0 }, "kz6kzzd"]] }), Tr = Te({ defaultClassName: "", variantClassNames: { active: { true: "kz6kzze", false: "kz6kzzf" }, disabled: { true: "kz6kzzg", false: "kz6kzzh" }, context: { navigation: "kz6kzzi", container: "kz6kzzj" } }, defaultVariants: {}, compoundVariants: [[{ context: "navigation", active: !0 }, "kz6kzzk"]] });
|
|
1685
|
+
function at({
|
|
2181
1686
|
context: t,
|
|
2182
1687
|
item: e,
|
|
2183
1688
|
state: r,
|
|
2184
1689
|
...n
|
|
2185
1690
|
}) {
|
|
2186
|
-
const { key:
|
|
2187
|
-
className:
|
|
1691
|
+
const { key: i } = e, l = C.useRef(null), { tabProps: a } = br({ key: i }, r, l), u = r.selectedKey === i, f = r.disabledKeys.has(i), g = pt(e.rendered, (h) => h.type.displayName === "SpsTag" || q.isWoodlandComponent(h.type) && q.get(h.type).name === "Tag" ? [{
|
|
1692
|
+
className: Ve(h.props.className, Tr({ active: u, disabled: f, context: t }))
|
|
2188
1693
|
}] : [{}]);
|
|
2189
|
-
return /* @__PURE__ */
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
1694
|
+
return /* @__PURE__ */ C.createElement(
|
|
1695
|
+
"div",
|
|
1696
|
+
{
|
|
1697
|
+
...a,
|
|
1698
|
+
ref: l,
|
|
1699
|
+
className: Kr({ active: u, disabled: f, context: t }),
|
|
1700
|
+
...n
|
|
1701
|
+
},
|
|
1702
|
+
g
|
|
1703
|
+
);
|
|
1704
|
+
}
|
|
1705
|
+
q.set(at, { name: "Tab" });
|
|
1706
|
+
function ot({
|
|
2198
1707
|
context: t,
|
|
2199
1708
|
"data-testid": e,
|
|
2200
1709
|
state: r,
|
|
2201
1710
|
...n
|
|
2202
1711
|
}) {
|
|
2203
|
-
const
|
|
2204
|
-
return /* @__PURE__ */
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
1712
|
+
const i = C.useRef(null), { tabPanelProps: l } = gr(n, r, i), a = t === "container" ? yt : "div";
|
|
1713
|
+
return /* @__PURE__ */ C.createElement(
|
|
1714
|
+
a,
|
|
1715
|
+
{
|
|
1716
|
+
...l,
|
|
1717
|
+
ref: i,
|
|
1718
|
+
"data-testid": e
|
|
1719
|
+
},
|
|
1720
|
+
r.selectedItem ? r.selectedItem.props.children : null
|
|
1721
|
+
);
|
|
1722
|
+
}
|
|
1723
|
+
q.set(ot, { name: "TabPanel" });
|
|
1724
|
+
var Sr = Te({ defaultClassName: "fy26er0", variantClassNames: { context: { container: "fy26er1", navigation: "fy26er2" } }, defaultVariants: {}, compoundVariants: [] });
|
|
1725
|
+
function ct({
|
|
2213
1726
|
className: t,
|
|
2214
1727
|
context: e = "navigation",
|
|
2215
1728
|
"data-testid": r,
|
|
2216
1729
|
...n
|
|
2217
1730
|
}) {
|
|
2218
|
-
const
|
|
2219
|
-
return /* @__PURE__ */
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
1731
|
+
const i = Tt(n), l = C.useRef(null), { tabListProps: a } = vr(n, i, l), u = bt({ "data-testid": r });
|
|
1732
|
+
return /* @__PURE__ */ C.createElement(C.Fragment, null, /* @__PURE__ */ C.createElement(
|
|
1733
|
+
"div",
|
|
1734
|
+
{
|
|
1735
|
+
...a,
|
|
1736
|
+
ref: l,
|
|
1737
|
+
className: Ve(Sr({ context: e }), t),
|
|
1738
|
+
"data-testid": r
|
|
1739
|
+
},
|
|
1740
|
+
[...i.collection].map((f) => /* @__PURE__ */ C.createElement(
|
|
1741
|
+
at,
|
|
1742
|
+
{
|
|
1743
|
+
key: f.key,
|
|
1744
|
+
item: f,
|
|
1745
|
+
state: i,
|
|
1746
|
+
context: e,
|
|
1747
|
+
...u(`tab-${String(f.key)}`)
|
|
1748
|
+
}
|
|
1749
|
+
))
|
|
1750
|
+
), /* @__PURE__ */ C.createElement(
|
|
1751
|
+
ot,
|
|
1752
|
+
{
|
|
1753
|
+
key: i.selectedItem ? i.selectedItem.key : null,
|
|
1754
|
+
state: i,
|
|
1755
|
+
context: e,
|
|
1756
|
+
...u("tab-panel")
|
|
1757
|
+
}
|
|
1758
|
+
));
|
|
1759
|
+
}
|
|
1760
|
+
q.set(ct, { name: "Tabs" });
|
|
1761
|
+
const Pr = {
|
|
1762
|
+
components: [ct],
|
|
2240
1763
|
examples: {
|
|
2241
1764
|
basic: {
|
|
2242
1765
|
label: "Basic Navigation Tabs",
|
|
2243
|
-
description:
|
|
1766
|
+
description: Pe`
|
|
2244
1767
|
<p>Navigation tabs</p>
|
|
2245
1768
|
`,
|
|
2246
1769
|
examples: {
|
|
2247
1770
|
basic: {
|
|
2248
|
-
react:
|
|
1771
|
+
react: Pe`
|
|
2249
1772
|
import { Item } from "@react-stately/collections";
|
|
2250
1773
|
import { Box, Icon } from "@sps-woodland/core";
|
|
2251
1774
|
import { Tabs } from "@sps-woodland/tabs";
|
|
@@ -2311,10 +1834,10 @@ const Kn = {
|
|
|
2311
1834
|
}
|
|
2312
1835
|
}
|
|
2313
1836
|
}
|
|
2314
|
-
},
|
|
2315
|
-
"Tabbed Navigation":
|
|
1837
|
+
}, Mr = {
|
|
1838
|
+
"Tabbed Navigation": Pr
|
|
2316
1839
|
};
|
|
2317
1840
|
export {
|
|
2318
|
-
|
|
2319
|
-
|
|
1841
|
+
Mr as MANIFEST,
|
|
1842
|
+
ct as Tabs
|
|
2320
1843
|
};
|