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