@sps-woodland/tabs 7.17.12 → 7.19.0
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.es.js → index.js} +699 -699
- package/lib/index.umd.cjs +64 -0
- package/lib/style.css +1 -1
- package/package.json +12 -12
- package/sps-woodland-tabs-7.19.0.tgz +0 -0
- package/vite.config.js +13 -4
- package/lib/index.cjs.js +0 -64
- package/sps-woodland-tabs-7.17.11.tgz +0 -0
@@ -1,41 +1,41 @@
|
|
1
|
-
import * as
|
2
|
-
import
|
3
|
-
import { compareNodeOrder as Ke, getFirstItem as
|
4
|
-
import { flushSync as
|
5
|
-
import { Metadata as
|
6
|
-
import { code as
|
7
|
-
function
|
8
|
-
let [n, i] =
|
9
|
-
|
10
|
-
let
|
11
|
-
|
1
|
+
import * as F from "react";
|
2
|
+
import N, { useState as O, useRef as E, useEffect as A, useCallback as G, useMemo as H, useContext as ie, createContext as Ft } from "react";
|
3
|
+
import { compareNodeOrder as Ke, getFirstItem as zt, getChildNodes as Ot, useCollection as Nt } from "@react-stately/collections";
|
4
|
+
import { flushSync as Bt } from "react-dom";
|
5
|
+
import { Metadata as se, modChildren as Rt, cl as dt, Content as Ut, useChildTestIdAttrBuilder as Wt } from "@sps-woodland/core";
|
6
|
+
import { code as Re } from "@spscommerce/utils";
|
7
|
+
function ut(t, e, r) {
|
8
|
+
let [n, i] = O(t || e), s = E(t !== void 0), o = t !== void 0;
|
9
|
+
A(() => {
|
10
|
+
let y = s.current;
|
11
|
+
y !== o && console.warn(`WARN: A component changed from ${y ? "controlled" : "uncontrolled"} to ${o ? "controlled" : "uncontrolled"}.`), s.current = o;
|
12
12
|
}, [
|
13
|
-
|
13
|
+
o
|
14
14
|
]);
|
15
|
-
let
|
16
|
-
let
|
17
|
-
r && (Object.is(
|
15
|
+
let d = o ? t : n, f = G((y, ...h) => {
|
16
|
+
let w = (v, ...g) => {
|
17
|
+
r && (Object.is(d, v) || r(v, ...g)), o || (d = v);
|
18
18
|
};
|
19
|
-
typeof
|
20
|
-
let
|
21
|
-
return T
|
22
|
-
})) : (
|
19
|
+
typeof y == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), i((g, ...k) => {
|
20
|
+
let T = y(o ? d : g, ...k);
|
21
|
+
return w(T, ...h), o ? g : T;
|
22
|
+
})) : (o || i(y), w(y, ...h));
|
23
23
|
}, [
|
24
|
-
|
25
|
-
|
24
|
+
o,
|
25
|
+
d,
|
26
26
|
r
|
27
27
|
]);
|
28
28
|
return [
|
29
|
-
|
29
|
+
d,
|
30
30
|
f
|
31
31
|
];
|
32
32
|
}
|
33
|
-
class
|
33
|
+
class D extends Set {
|
34
34
|
constructor(e, r, n) {
|
35
|
-
super(e), e instanceof
|
35
|
+
super(e), e instanceof D ? (this.anchorKey = r || e.anchorKey, this.currentKey = n || e.currentKey) : (this.anchorKey = r, this.currentKey = n);
|
36
36
|
}
|
37
37
|
}
|
38
|
-
function
|
38
|
+
function Ht(t, e) {
|
39
39
|
if (t.size !== e.size)
|
40
40
|
return !1;
|
41
41
|
for (let r of t)
|
@@ -43,52 +43,52 @@ function Vt(t, e) {
|
|
43
43
|
return !1;
|
44
44
|
return !0;
|
45
45
|
}
|
46
|
-
function
|
47
|
-
let { selectionMode: e = "none", disallowEmptySelection: r, allowDuplicateSelectionEvents: n, selectionBehavior: i = "toggle", disabledBehavior:
|
46
|
+
function Vt(t) {
|
47
|
+
let { selectionMode: e = "none", disallowEmptySelection: r, allowDuplicateSelectionEvents: n, selectionBehavior: i = "toggle", disabledBehavior: s = "all" } = t, o = E(!1), [, d] = O(!1), f = E(null), y = E(null), [, h] = O(null), w = H(() => Ue(t.selectedKeys), [
|
48
48
|
t.selectedKeys
|
49
|
-
]),
|
49
|
+
]), v = H(() => Ue(t.defaultSelectedKeys, new D()), [
|
50
50
|
t.defaultSelectedKeys
|
51
|
-
]), [
|
51
|
+
]), [g, k] = ut(w, v, t.onSelectionChange), T = H(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
52
52
|
t.disabledKeys
|
53
|
-
]), [K,
|
54
|
-
i === "replace" && K === "toggle" && typeof
|
55
|
-
let
|
56
|
-
return
|
57
|
-
i !==
|
53
|
+
]), [K, M] = O(i);
|
54
|
+
i === "replace" && K === "toggle" && typeof g == "object" && g.size === 0 && M("replace");
|
55
|
+
let x = E(i);
|
56
|
+
return A(() => {
|
57
|
+
i !== x.current && (M(i), x.current = i);
|
58
58
|
}, [
|
59
59
|
i
|
60
60
|
]), {
|
61
61
|
selectionMode: e,
|
62
62
|
disallowEmptySelection: r,
|
63
63
|
selectionBehavior: K,
|
64
|
-
setSelectionBehavior:
|
64
|
+
setSelectionBehavior: M,
|
65
65
|
get isFocused() {
|
66
|
-
return
|
66
|
+
return o.current;
|
67
67
|
},
|
68
68
|
setFocused(P) {
|
69
|
-
|
69
|
+
o.current = P, d(P);
|
70
70
|
},
|
71
71
|
get focusedKey() {
|
72
72
|
return f.current;
|
73
73
|
},
|
74
74
|
get childFocusStrategy() {
|
75
|
-
return
|
75
|
+
return y.current;
|
76
76
|
},
|
77
|
-
setFocusedKey(P,
|
78
|
-
f.current = P,
|
77
|
+
setFocusedKey(P, L = "first") {
|
78
|
+
f.current = P, y.current = L, h(P);
|
79
79
|
},
|
80
|
-
selectedKeys:
|
80
|
+
selectedKeys: g,
|
81
81
|
setSelectedKeys(P) {
|
82
|
-
(n || !
|
82
|
+
(n || !Ht(P, g)) && k(P);
|
83
83
|
},
|
84
|
-
disabledKeys:
|
85
|
-
disabledBehavior:
|
84
|
+
disabledKeys: T,
|
85
|
+
disabledBehavior: s
|
86
86
|
};
|
87
87
|
}
|
88
|
-
function
|
89
|
-
return t ? t === "all" ? "all" : new
|
88
|
+
function Ue(t, e) {
|
89
|
+
return t ? t === "all" ? "all" : new D(t) : e;
|
90
90
|
}
|
91
|
-
class
|
91
|
+
class jt {
|
92
92
|
get selectionMode() {
|
93
93
|
return this.state.selectionMode;
|
94
94
|
}
|
@@ -170,16 +170,16 @@ class Gt {
|
|
170
170
|
e = this.getKey(e);
|
171
171
|
let r;
|
172
172
|
if (this.state.selectedKeys === "all")
|
173
|
-
r = new
|
173
|
+
r = new D([
|
174
174
|
e
|
175
175
|
], e, e);
|
176
176
|
else {
|
177
177
|
let n = this.state.selectedKeys, i = n.anchorKey || e;
|
178
|
-
r = new
|
179
|
-
for (let
|
180
|
-
r.delete(
|
181
|
-
for (let
|
182
|
-
this.canSelectItem(
|
178
|
+
r = new D(n, i, e);
|
179
|
+
for (let s of this.getKeyRange(i, n.currentKey || e))
|
180
|
+
r.delete(s);
|
181
|
+
for (let s of this.getKeyRange(e, i))
|
182
|
+
this.canSelectItem(s) && r.add(s);
|
183
183
|
}
|
184
184
|
this.state.setSelectedKeys(r);
|
185
185
|
}
|
@@ -190,8 +190,8 @@ class Gt {
|
|
190
190
|
getKeyRangeInternal(e, r) {
|
191
191
|
let n = [], i = e;
|
192
192
|
for (; i; ) {
|
193
|
-
let
|
194
|
-
if ((
|
193
|
+
let s = this.collection.getItem(i);
|
194
|
+
if ((s && s.type === "item" || s.type === "cell" && this.allowsCellSelection) && n.push(i), i === r)
|
195
195
|
return n;
|
196
196
|
i = this.collection.getKeyAfter(i);
|
197
197
|
}
|
@@ -214,21 +214,21 @@ class Gt {
|
|
214
214
|
}
|
215
215
|
if (e = this.getKey(e), e == null)
|
216
216
|
return;
|
217
|
-
let r = new
|
217
|
+
let r = new D(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
|
218
218
|
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);
|
219
219
|
}
|
220
220
|
replaceSelection(e) {
|
221
221
|
if (this.selectionMode === "none" || (e = this.getKey(e), e == null))
|
222
222
|
return;
|
223
|
-
let r = this.canSelectItem(e) ? new
|
223
|
+
let r = this.canSelectItem(e) ? new D([
|
224
224
|
e
|
225
|
-
], e, e) : new
|
225
|
+
], e, e) : new D();
|
226
226
|
this.state.setSelectedKeys(r);
|
227
227
|
}
|
228
228
|
setSelectedKeys(e) {
|
229
229
|
if (this.selectionMode === "none")
|
230
230
|
return;
|
231
|
-
let r = new
|
231
|
+
let r = new D();
|
232
232
|
for (let n of e)
|
233
233
|
if (n = this.getKey(n), n != null && (r.add(n), this.selectionMode === "single"))
|
234
234
|
break;
|
@@ -239,7 +239,7 @@ class Gt {
|
|
239
239
|
for (; n; ) {
|
240
240
|
if (this.canSelectItem(n)) {
|
241
241
|
let i = this.collection.getItem(n);
|
242
|
-
i.type === "item" && e.push(n), i.hasChildNodes && (this.allowsCellSelection || i.type !== "item") && r(Ot(
|
242
|
+
i.type === "item" && e.push(n), i.hasChildNodes && (this.allowsCellSelection || i.type !== "item") && r(zt(Ot(i, this.collection)).key);
|
243
243
|
}
|
244
244
|
n = this.collection.getKeyAfter(n);
|
245
245
|
}
|
@@ -250,7 +250,7 @@ class Gt {
|
|
250
250
|
!this.isSelectAll && this.selectionMode === "multiple" && this.state.setSelectedKeys("all");
|
251
251
|
}
|
252
252
|
clearSelection() {
|
253
|
-
!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new
|
253
|
+
!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new D());
|
254
254
|
}
|
255
255
|
toggleSelectAll() {
|
256
256
|
this.isSelectAll ? this.clearSelection() : this.selectAll();
|
@@ -291,7 +291,7 @@ class Gt {
|
|
291
291
|
this.allowsCellSelection = (i = n == null ? void 0 : n.allowsCellSelection) !== null && i !== void 0 ? i : !1, this._isSelectAll = null;
|
292
292
|
}
|
293
293
|
}
|
294
|
-
class
|
294
|
+
class We {
|
295
295
|
*[Symbol.iterator]() {
|
296
296
|
yield* this.iterable;
|
297
297
|
}
|
@@ -330,113 +330,113 @@ class He {
|
|
330
330
|
}
|
331
331
|
constructor(e) {
|
332
332
|
this.keyMap = /* @__PURE__ */ new Map(), this.iterable = e;
|
333
|
-
let r = (
|
334
|
-
if (this.keyMap.set(
|
335
|
-
for (let
|
336
|
-
r(
|
333
|
+
let r = (s) => {
|
334
|
+
if (this.keyMap.set(s.key, s), s.childNodes && s.type === "section")
|
335
|
+
for (let o of s.childNodes)
|
336
|
+
r(o);
|
337
337
|
};
|
338
|
-
for (let
|
339
|
-
r(
|
338
|
+
for (let s of e)
|
339
|
+
r(s);
|
340
340
|
let n, i = 0;
|
341
|
-
for (let [
|
342
|
-
n ? (n.nextKey =
|
341
|
+
for (let [s, o] of this.keyMap)
|
342
|
+
n ? (n.nextKey = s, o.prevKey = n.key) : (this.firstKey = s, o.prevKey = void 0), o.type === "item" && (o.index = i++), n = o, n.nextKey = void 0;
|
343
343
|
this.lastKey = n == null ? void 0 : n.key;
|
344
344
|
}
|
345
345
|
}
|
346
|
-
function
|
347
|
-
let { filter: e } = t, r =
|
346
|
+
function Gt(t) {
|
347
|
+
let { filter: e } = t, r = Vt(t), n = H(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
348
348
|
t.disabledKeys
|
349
|
-
]), i =
|
349
|
+
]), i = G((y) => e ? new We(e(y)) : new We(y), [
|
350
350
|
e
|
351
|
-
]),
|
351
|
+
]), s = H(() => ({
|
352
352
|
suppressTextValueWarning: t.suppressTextValueWarning
|
353
353
|
}), [
|
354
354
|
t.suppressTextValueWarning
|
355
|
-
]),
|
356
|
-
|
355
|
+
]), o = Nt(t, i, s), d = H(() => new jt(o, r), [
|
356
|
+
o,
|
357
357
|
r
|
358
358
|
]);
|
359
|
-
const f =
|
360
|
-
return
|
361
|
-
if (r.focusedKey != null && !
|
362
|
-
const
|
359
|
+
const f = E(null);
|
360
|
+
return A(() => {
|
361
|
+
if (r.focusedKey != null && !o.getItem(r.focusedKey)) {
|
362
|
+
const y = f.current.getItem(r.focusedKey), h = [
|
363
363
|
...f.current.getKeys()
|
364
|
-
].map((
|
365
|
-
const K = f.current.getItem(
|
364
|
+
].map((T) => {
|
365
|
+
const K = f.current.getItem(T);
|
366
366
|
return K.type === "item" ? K : null;
|
367
|
-
}).filter((
|
368
|
-
...
|
369
|
-
].map((
|
370
|
-
const K =
|
367
|
+
}).filter((T) => T !== null), w = [
|
368
|
+
...o.getKeys()
|
369
|
+
].map((T) => {
|
370
|
+
const K = o.getItem(T);
|
371
371
|
return K.type === "item" ? K : null;
|
372
|
-
}).filter((
|
373
|
-
let
|
374
|
-
for (;
|
375
|
-
if (!
|
376
|
-
|
372
|
+
}).filter((T) => T !== null), v = h.length - w.length;
|
373
|
+
let g = Math.min(v > 1 ? Math.max(y.index - v + 1, 0) : y.index, w.length - 1), k;
|
374
|
+
for (; g >= 0; ) {
|
375
|
+
if (!d.isDisabled(w[g].key)) {
|
376
|
+
k = w[g];
|
377
377
|
break;
|
378
378
|
}
|
379
|
-
|
379
|
+
g < w.length - 1 ? g++ : (g > y.index && (g = y.index), g--);
|
380
380
|
}
|
381
|
-
r.setFocusedKey(
|
381
|
+
r.setFocusedKey(k ? k.key : null);
|
382
382
|
}
|
383
|
-
f.current =
|
383
|
+
f.current = o;
|
384
384
|
}, [
|
385
|
-
|
386
|
-
|
385
|
+
o,
|
386
|
+
d,
|
387
387
|
r,
|
388
388
|
r.focusedKey
|
389
389
|
]), {
|
390
|
-
collection:
|
390
|
+
collection: o,
|
391
391
|
disabledKeys: n,
|
392
|
-
selectionManager:
|
392
|
+
selectionManager: d
|
393
393
|
};
|
394
394
|
}
|
395
|
-
function
|
395
|
+
function Xt(t) {
|
396
396
|
var e;
|
397
|
-
let [r, n] =
|
397
|
+
let [r, n] = ut(t.selectedKey, (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : null, t.onSelectionChange), i = H(() => r != null ? [
|
398
398
|
r
|
399
399
|
] : [], [
|
400
400
|
r
|
401
|
-
]), { collection:
|
401
|
+
]), { collection: s, disabledKeys: o, selectionManager: d } = Gt({
|
402
402
|
...t,
|
403
403
|
selectionMode: "single",
|
404
404
|
disallowEmptySelection: !0,
|
405
405
|
allowDuplicateSelectionEvents: !0,
|
406
406
|
selectedKeys: i,
|
407
|
-
onSelectionChange: (
|
408
|
-
var
|
409
|
-
let
|
410
|
-
|
407
|
+
onSelectionChange: (y) => {
|
408
|
+
var h;
|
409
|
+
let w = (h = y.values().next().value) !== null && h !== void 0 ? h : null;
|
410
|
+
w === r && t.onSelectionChange && t.onSelectionChange(w), n(w);
|
411
411
|
}
|
412
|
-
}), f = r != null ?
|
412
|
+
}), f = r != null ? s.getItem(r) : null;
|
413
413
|
return {
|
414
|
-
collection:
|
415
|
-
disabledKeys:
|
416
|
-
selectionManager:
|
414
|
+
collection: s,
|
415
|
+
disabledKeys: o,
|
416
|
+
selectionManager: d,
|
417
417
|
selectedKey: r,
|
418
418
|
setSelectedKey: n,
|
419
419
|
selectedItem: f
|
420
420
|
};
|
421
421
|
}
|
422
|
-
function
|
422
|
+
function qt(t) {
|
423
423
|
var e;
|
424
|
-
let r =
|
424
|
+
let r = Xt({
|
425
425
|
...t,
|
426
426
|
suppressTextValueWarning: !0,
|
427
|
-
defaultSelectedKey: (e = t.defaultSelectedKey) !== null && e !== void 0 ? e :
|
428
|
-
}), { selectionManager: n, collection: i, selectedKey:
|
429
|
-
return
|
430
|
-
let
|
431
|
-
(n.isEmpty || !i.getItem(
|
432
|
-
|
433
|
-
])), (
|
427
|
+
defaultSelectedKey: (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : He(t.collection, t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set())
|
428
|
+
}), { selectionManager: n, collection: i, selectedKey: s } = r, o = E(s);
|
429
|
+
return A(() => {
|
430
|
+
let d = s;
|
431
|
+
(n.isEmpty || !i.getItem(d)) && (d = He(i, r.disabledKeys), d != null && n.setSelectedKeys([
|
432
|
+
d
|
433
|
+
])), (d != null && n.focusedKey == null || !n.isFocused && d !== o.current) && n.setFocusedKey(d), o.current = d;
|
434
434
|
}), {
|
435
435
|
...r,
|
436
436
|
isDisabled: t.isDisabled || !1
|
437
437
|
};
|
438
438
|
}
|
439
|
-
function
|
439
|
+
function He(t, e) {
|
440
440
|
let r = null;
|
441
441
|
if (t) {
|
442
442
|
for (r = t.getFirstKey(); e.has(r) && r !== t.getLastKey(); )
|
@@ -445,38 +445,38 @@ function Ve(t, e) {
|
|
445
445
|
}
|
446
446
|
return r;
|
447
447
|
}
|
448
|
-
const
|
448
|
+
const be = {
|
449
449
|
prefix: String(Math.round(Math.random() * 1e10)),
|
450
450
|
current: 0
|
451
|
-
}, ft = /* @__PURE__ */
|
452
|
-
let
|
453
|
-
function
|
454
|
-
let e = ie(ft), r =
|
451
|
+
}, ft = /* @__PURE__ */ N.createContext(be), Yt = /* @__PURE__ */ N.createContext(!1);
|
452
|
+
let Jt = Boolean(typeof window < "u" && window.document && window.document.createElement), Se = /* @__PURE__ */ new WeakMap();
|
453
|
+
function Zt(t = !1) {
|
454
|
+
let e = ie(ft), r = E(null);
|
455
455
|
if (r.current === null && !t) {
|
456
456
|
var n, i;
|
457
|
-
let
|
458
|
-
if (
|
459
|
-
let
|
460
|
-
|
457
|
+
let s = (i = N.__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;
|
458
|
+
if (s) {
|
459
|
+
let o = Se.get(s);
|
460
|
+
o == null ? Se.set(s, {
|
461
461
|
id: e.current,
|
462
|
-
state:
|
463
|
-
}) :
|
462
|
+
state: s.memoizedState
|
463
|
+
}) : s.memoizedState !== o.state && (e.current = o.id, Se.delete(s));
|
464
464
|
}
|
465
465
|
r.current = ++e.current;
|
466
466
|
}
|
467
467
|
return r.current;
|
468
468
|
}
|
469
|
-
function
|
469
|
+
function Qt(t) {
|
470
470
|
let e = ie(ft);
|
471
|
-
e ===
|
472
|
-
let r =
|
471
|
+
e === be && !Jt && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
472
|
+
let r = Zt(!!t), n = e === be && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${e.prefix}`;
|
473
473
|
return t || `${n}-${r}`;
|
474
474
|
}
|
475
475
|
function er(t) {
|
476
|
-
let e =
|
476
|
+
let e = N.useId(), [r] = O(pt()), n = r || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${be.prefix}`;
|
477
477
|
return t || `${n}-${e}`;
|
478
478
|
}
|
479
|
-
const tr = typeof
|
479
|
+
const tr = typeof N.useId == "function" ? er : Qt;
|
480
480
|
function rr() {
|
481
481
|
return !1;
|
482
482
|
}
|
@@ -488,9 +488,9 @@ function ir(t) {
|
|
488
488
|
};
|
489
489
|
}
|
490
490
|
function pt() {
|
491
|
-
return typeof
|
491
|
+
return typeof N.useSyncExternalStore == "function" ? N.useSyncExternalStore(ir, rr, nr) : ie(Yt);
|
492
492
|
}
|
493
|
-
function
|
493
|
+
function bt(t) {
|
494
494
|
var e, r, n = "";
|
495
495
|
if (typeof t == "string" || typeof t == "number")
|
496
496
|
n += t;
|
@@ -498,7 +498,7 @@ function yt(t) {
|
|
498
498
|
if (Array.isArray(t)) {
|
499
499
|
var i = t.length;
|
500
500
|
for (e = 0; e < i; e++)
|
501
|
-
t[e] && (r =
|
501
|
+
t[e] && (r = bt(t[e])) && (n && (n += " "), n += r);
|
502
502
|
} else
|
503
503
|
for (r in t)
|
504
504
|
t[r] && (n && (n += " "), n += r);
|
@@ -506,46 +506,46 @@ function yt(t) {
|
|
506
506
|
}
|
507
507
|
function lr() {
|
508
508
|
for (var t, e, r = 0, n = "", i = arguments.length; r < i; r++)
|
509
|
-
(t = arguments[r]) && (e =
|
509
|
+
(t = arguments[r]) && (e = bt(t)) && (n && (n += " "), n += e);
|
510
510
|
return n;
|
511
511
|
}
|
512
|
-
const
|
512
|
+
const oe = typeof document < "u" ? N.useLayoutEffect : () => {
|
513
513
|
};
|
514
514
|
function ee(t) {
|
515
|
-
const e =
|
516
|
-
return
|
515
|
+
const e = E(null);
|
516
|
+
return oe(() => {
|
517
517
|
e.current = t;
|
518
518
|
}, [
|
519
519
|
t
|
520
|
-
]),
|
520
|
+
]), G((...r) => {
|
521
521
|
const n = e.current;
|
522
522
|
return n(...r);
|
523
523
|
}, []);
|
524
524
|
}
|
525
|
-
let
|
526
|
-
function
|
527
|
-
let [e, r] =
|
528
|
-
n.current =
|
525
|
+
let sr = Boolean(typeof window < "u" && window.document && window.document.createElement), ye = /* @__PURE__ */ new Map();
|
526
|
+
function yt(t) {
|
527
|
+
let [e, r] = O(t), n = E(null), i = tr(e), s = G((o) => {
|
528
|
+
n.current = o;
|
529
529
|
}, []);
|
530
|
-
return
|
531
|
-
let
|
530
|
+
return sr && ye.set(i, s), oe(() => {
|
531
|
+
let o = i;
|
532
532
|
return () => {
|
533
|
-
|
533
|
+
ye.delete(o);
|
534
534
|
};
|
535
535
|
}, [
|
536
536
|
i
|
537
|
-
]),
|
538
|
-
let
|
539
|
-
|
537
|
+
]), A(() => {
|
538
|
+
let o = n.current;
|
539
|
+
o && (n.current = null, r(o));
|
540
540
|
}), i;
|
541
541
|
}
|
542
|
-
function
|
542
|
+
function or(t, e) {
|
543
543
|
if (t === e)
|
544
544
|
return t;
|
545
|
-
let r =
|
545
|
+
let r = ye.get(t);
|
546
546
|
if (r)
|
547
547
|
return r(e), e;
|
548
|
-
let n =
|
548
|
+
let n = ye.get(e);
|
549
549
|
return n ? (n(t), t) : e;
|
550
550
|
}
|
551
551
|
function ar(...t) {
|
@@ -554,31 +554,31 @@ function ar(...t) {
|
|
554
554
|
typeof r == "function" && r(...e);
|
555
555
|
};
|
556
556
|
}
|
557
|
-
const
|
557
|
+
const z = (t) => {
|
558
558
|
var e;
|
559
559
|
return (e = t == null ? void 0 : t.ownerDocument) !== null && e !== void 0 ? e : document;
|
560
|
-
},
|
561
|
-
function
|
560
|
+
}, he = (t) => t && "window" in t && t.window === t ? t : z(t).defaultView || window;
|
561
|
+
function V(...t) {
|
562
562
|
let e = {
|
563
563
|
...t[0]
|
564
564
|
};
|
565
565
|
for (let r = 1; r < t.length; r++) {
|
566
566
|
let n = t[r];
|
567
567
|
for (let i in n) {
|
568
|
-
let
|
569
|
-
typeof
|
568
|
+
let s = e[i], o = n[i];
|
569
|
+
typeof s == "function" && typeof o == "function" && i[0] === "o" && i[1] === "n" && i.charCodeAt(2) >= 65 && i.charCodeAt(2) <= 90 ? e[i] = ar(s, o) : (i === "className" || i === "UNSAFE_className") && typeof s == "string" && typeof o == "string" ? e[i] = lr(s, o) : i === "id" && s && o ? e.id = or(s, o) : e[i] = o !== void 0 ? o : s;
|
570
570
|
}
|
571
571
|
}
|
572
572
|
return e;
|
573
573
|
}
|
574
574
|
const cr = /* @__PURE__ */ new Set([
|
575
575
|
"id"
|
576
|
-
]),
|
576
|
+
]), dr = /* @__PURE__ */ new Set([
|
577
577
|
"aria-label",
|
578
578
|
"aria-labelledby",
|
579
579
|
"aria-describedby",
|
580
580
|
"aria-details"
|
581
|
-
]),
|
581
|
+
]), ur = /* @__PURE__ */ new Set([
|
582
582
|
"href",
|
583
583
|
"target",
|
584
584
|
"rel",
|
@@ -587,23 +587,23 @@ const cr = /* @__PURE__ */ new Set([
|
|
587
587
|
"referrerPolicy"
|
588
588
|
]), fr = /^(data-.*)$/;
|
589
589
|
function pr(t, e = {}) {
|
590
|
-
let { labelable: r, isLink: n, propNames: i } = e,
|
591
|
-
for (const
|
592
|
-
Object.prototype.hasOwnProperty.call(t,
|
593
|
-
return
|
590
|
+
let { labelable: r, isLink: n, propNames: i } = e, s = {};
|
591
|
+
for (const o in t)
|
592
|
+
Object.prototype.hasOwnProperty.call(t, o) && (cr.has(o) || r && dr.has(o) || n && ur.has(o) || (i == null ? void 0 : i.has(o)) || fr.test(o)) && (s[o] = t[o]);
|
593
|
+
return s;
|
594
594
|
}
|
595
|
-
function
|
596
|
-
if (
|
595
|
+
function W(t) {
|
596
|
+
if (br())
|
597
597
|
t.focus({
|
598
598
|
preventScroll: !0
|
599
599
|
});
|
600
600
|
else {
|
601
|
-
let e =
|
602
|
-
t.focus(),
|
601
|
+
let e = yr(t);
|
602
|
+
t.focus(), hr(e);
|
603
603
|
}
|
604
604
|
}
|
605
605
|
let ce = null;
|
606
|
-
function
|
606
|
+
function br() {
|
607
607
|
if (ce == null) {
|
608
608
|
ce = !1;
|
609
609
|
try {
|
@@ -618,7 +618,7 @@ function yr() {
|
|
618
618
|
}
|
619
619
|
return ce;
|
620
620
|
}
|
621
|
-
function
|
621
|
+
function yr(t) {
|
622
622
|
for (var e = t.parentNode, r = [], n = document.scrollingElement || document.documentElement; e instanceof HTMLElement && e !== n; )
|
623
623
|
(e.offsetHeight < e.scrollHeight || e.offsetWidth < e.scrollWidth) && r.push({
|
624
624
|
element: e,
|
@@ -631,74 +631,74 @@ function br(t) {
|
|
631
631
|
scrollLeft: n.scrollLeft
|
632
632
|
}), r;
|
633
633
|
}
|
634
|
-
function
|
634
|
+
function hr(t) {
|
635
635
|
for (let { element: e, scrollTop: r, scrollLeft: n } of t)
|
636
636
|
e.scrollTop = r, e.scrollLeft = n;
|
637
637
|
}
|
638
|
-
function
|
638
|
+
function ve(t) {
|
639
639
|
var e;
|
640
640
|
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);
|
641
641
|
}
|
642
|
-
function
|
642
|
+
function Ae(t) {
|
643
643
|
var e;
|
644
644
|
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;
|
645
645
|
}
|
646
|
-
function
|
647
|
-
return
|
646
|
+
function X() {
|
647
|
+
return Ae(/^Mac/i);
|
648
648
|
}
|
649
|
-
function
|
650
|
-
return
|
649
|
+
function gr() {
|
650
|
+
return Ae(/^iPhone/i);
|
651
651
|
}
|
652
|
-
function
|
653
|
-
return
|
652
|
+
function ht() {
|
653
|
+
return Ae(/^iPad/i) || X() && navigator.maxTouchPoints > 1;
|
654
654
|
}
|
655
|
-
function
|
656
|
-
return
|
655
|
+
function De() {
|
656
|
+
return gr() || ht();
|
657
657
|
}
|
658
|
-
function
|
659
|
-
return
|
658
|
+
function vr() {
|
659
|
+
return X() || De();
|
660
660
|
}
|
661
661
|
function $r() {
|
662
|
-
return
|
662
|
+
return ve(/AppleWebKit/i) && !mr();
|
663
663
|
}
|
664
664
|
function mr() {
|
665
|
-
return
|
665
|
+
return ve(/Chrome/i);
|
666
666
|
}
|
667
|
-
function
|
668
|
-
return
|
667
|
+
function gt() {
|
668
|
+
return ve(/Android/i);
|
669
669
|
}
|
670
670
|
function Kr() {
|
671
|
-
return
|
671
|
+
return ve(/Firefox/i);
|
672
672
|
}
|
673
|
-
const Sr = /* @__PURE__ */
|
673
|
+
const Sr = /* @__PURE__ */ Ft({
|
674
674
|
isNative: !0,
|
675
|
-
open:
|
675
|
+
open: Tr
|
676
676
|
});
|
677
|
-
function
|
677
|
+
function vt() {
|
678
678
|
return ie(Sr);
|
679
679
|
}
|
680
|
-
function
|
680
|
+
function q(t, e, r = !0) {
|
681
681
|
var n, i;
|
682
|
-
let { metaKey:
|
683
|
-
Kr() && ((i = window.event) === null || i === void 0 || (n = i.type) === null || n === void 0 ? void 0 : n.startsWith("key")) && t.target === "_blank" && (
|
684
|
-
let
|
682
|
+
let { metaKey: s, ctrlKey: o, altKey: d, shiftKey: f } = e;
|
683
|
+
Kr() && ((i = window.event) === null || i === void 0 || (n = i.type) === null || n === void 0 ? void 0 : n.startsWith("key")) && t.target === "_blank" && (X() ? s = !0 : o = !0);
|
684
|
+
let y = $r() && X() && !ht() ? new KeyboardEvent("keydown", {
|
685
685
|
keyIdentifier: "Enter",
|
686
|
-
metaKey:
|
687
|
-
ctrlKey:
|
688
|
-
altKey:
|
686
|
+
metaKey: s,
|
687
|
+
ctrlKey: o,
|
688
|
+
altKey: d,
|
689
689
|
shiftKey: f
|
690
690
|
}) : new MouseEvent("click", {
|
691
|
-
metaKey:
|
692
|
-
ctrlKey:
|
693
|
-
altKey:
|
691
|
+
metaKey: s,
|
692
|
+
ctrlKey: o,
|
693
|
+
altKey: d,
|
694
694
|
shiftKey: f,
|
695
695
|
bubbles: !0,
|
696
696
|
cancelable: !0
|
697
697
|
});
|
698
|
-
|
698
|
+
q.isOpening = r, W(t), t.dispatchEvent(y), q.isOpening = !1;
|
699
699
|
}
|
700
|
-
|
701
|
-
function
|
700
|
+
q.isOpening = !1;
|
701
|
+
function wr(t, e) {
|
702
702
|
if (t instanceof HTMLAnchorElement)
|
703
703
|
e(t);
|
704
704
|
else if (t.hasAttribute("data-href")) {
|
@@ -706,11 +706,11 @@ function Tr(t, e) {
|
|
706
706
|
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);
|
707
707
|
}
|
708
708
|
}
|
709
|
-
function
|
710
|
-
|
709
|
+
function Tr(t, e) {
|
710
|
+
wr(t, (r) => q(r, e));
|
711
711
|
}
|
712
|
-
let te = /* @__PURE__ */ new Map(),
|
713
|
-
function
|
712
|
+
let te = /* @__PURE__ */ new Map(), _e = /* @__PURE__ */ new Set();
|
713
|
+
function Ve() {
|
714
714
|
if (typeof window > "u")
|
715
715
|
return;
|
716
716
|
let t = (r) => {
|
@@ -719,42 +719,42 @@ function je() {
|
|
719
719
|
}, e = (r) => {
|
720
720
|
let n = te.get(r.target);
|
721
721
|
if (!!n && (n.delete(r.propertyName), n.size === 0 && (r.target.removeEventListener("transitioncancel", e), te.delete(r.target)), te.size === 0)) {
|
722
|
-
for (let i of
|
722
|
+
for (let i of _e)
|
723
723
|
i();
|
724
|
-
|
724
|
+
_e.clear();
|
725
725
|
}
|
726
726
|
};
|
727
727
|
document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", e);
|
728
728
|
}
|
729
|
-
typeof document < "u" && (document.readyState !== "loading" ?
|
729
|
+
typeof document < "u" && (document.readyState !== "loading" ? Ve() : document.addEventListener("DOMContentLoaded", Ve));
|
730
730
|
function $t(t) {
|
731
731
|
requestAnimationFrame(() => {
|
732
|
-
te.size === 0 ? t() :
|
732
|
+
te.size === 0 ? t() : _e.add(t);
|
733
733
|
});
|
734
734
|
}
|
735
735
|
function mt() {
|
736
|
-
let t =
|
737
|
-
let f =
|
738
|
-
t.current.delete(
|
739
|
-
} :
|
740
|
-
t.current.set(
|
741
|
-
type:
|
736
|
+
let t = E(/* @__PURE__ */ new Map()), e = G((i, s, o, d) => {
|
737
|
+
let f = d != null && d.once ? (...y) => {
|
738
|
+
t.current.delete(o), o(...y);
|
739
|
+
} : o;
|
740
|
+
t.current.set(o, {
|
741
|
+
type: s,
|
742
742
|
eventTarget: i,
|
743
743
|
fn: f,
|
744
|
-
options:
|
745
|
-
}), i.addEventListener(
|
746
|
-
}, []), r =
|
744
|
+
options: d
|
745
|
+
}), i.addEventListener(s, o, d);
|
746
|
+
}, []), r = G((i, s, o, d) => {
|
747
747
|
var f;
|
748
|
-
let
|
749
|
-
i.removeEventListener(
|
750
|
-
}, []), n =
|
751
|
-
t.current.forEach((i,
|
752
|
-
r(i.eventTarget, i.type,
|
748
|
+
let y = ((f = t.current.get(o)) === null || f === void 0 ? void 0 : f.fn) || o;
|
749
|
+
i.removeEventListener(s, y, d), t.current.delete(o);
|
750
|
+
}, []), n = G(() => {
|
751
|
+
t.current.forEach((i, s) => {
|
752
|
+
r(i.eventTarget, i.type, s, i.options);
|
753
753
|
});
|
754
754
|
}, [
|
755
755
|
r
|
756
756
|
]);
|
757
|
-
return
|
757
|
+
return A(() => n, [
|
758
758
|
n
|
759
759
|
]), {
|
760
760
|
addGlobalListener: e,
|
@@ -764,7 +764,7 @@ function mt() {
|
|
764
764
|
}
|
765
765
|
function Kt(t, e) {
|
766
766
|
let { id: r, "aria-label": n, "aria-labelledby": i } = t;
|
767
|
-
return r =
|
767
|
+
return r = yt(r), i && n ? i = [
|
768
768
|
.../* @__PURE__ */ new Set([
|
769
769
|
r,
|
770
770
|
...i.trim().split(/\s+/)
|
@@ -776,43 +776,43 @@ function Kt(t, e) {
|
|
776
776
|
};
|
777
777
|
}
|
778
778
|
function Pr(t, e) {
|
779
|
-
|
779
|
+
oe(() => {
|
780
780
|
if (t && t.ref && e)
|
781
781
|
return t.ref.current = e.current, () => {
|
782
782
|
t.ref.current = null;
|
783
783
|
};
|
784
784
|
});
|
785
785
|
}
|
786
|
-
function
|
787
|
-
for (
|
786
|
+
function je(t, e) {
|
787
|
+
for (Ge(t, e) && (t = t.parentElement); t && !Ge(t, e); )
|
788
788
|
t = t.parentElement;
|
789
789
|
return t || document.scrollingElement || document.documentElement;
|
790
790
|
}
|
791
|
-
function
|
791
|
+
function Ge(t, e) {
|
792
792
|
let r = window.getComputedStyle(t), n = /(auto|scroll)/.test(r.overflow + r.overflowX + r.overflowY);
|
793
793
|
return n && e && (n = t.scrollHeight !== t.clientHeight || t.scrollWidth !== t.clientWidth), n;
|
794
794
|
}
|
795
|
-
let
|
796
|
-
const
|
797
|
-
function
|
798
|
-
let [e, r] =
|
799
|
-
return
|
795
|
+
let _r = 0;
|
796
|
+
const we = /* @__PURE__ */ new Map();
|
797
|
+
function xr(t) {
|
798
|
+
let [e, r] = O(void 0);
|
799
|
+
return oe(() => {
|
800
800
|
if (!t)
|
801
801
|
return;
|
802
|
-
let n =
|
802
|
+
let n = we.get(t);
|
803
803
|
if (n)
|
804
804
|
r(n.element.id);
|
805
805
|
else {
|
806
|
-
let i = `react-aria-description-${
|
806
|
+
let i = `react-aria-description-${_r++}`;
|
807
807
|
r(i);
|
808
|
-
let
|
809
|
-
|
808
|
+
let s = document.createElement("div");
|
809
|
+
s.id = i, s.style.display = "none", s.textContent = t, document.body.appendChild(s), n = {
|
810
810
|
refCount: 0,
|
811
|
-
element:
|
812
|
-
},
|
811
|
+
element: s
|
812
|
+
}, we.set(t, n);
|
813
813
|
}
|
814
814
|
return n.refCount++, () => {
|
815
|
-
--n.refCount === 0 && (n.element.remove(),
|
815
|
+
--n.refCount === 0 && (n.element.remove(), we.delete(t));
|
816
816
|
};
|
817
817
|
}, [
|
818
818
|
t
|
@@ -820,28 +820,28 @@ function Er(t) {
|
|
820
820
|
"aria-describedby": t ? e : void 0
|
821
821
|
};
|
822
822
|
}
|
823
|
-
function
|
824
|
-
let i = ee(r),
|
825
|
-
|
826
|
-
if (
|
823
|
+
function Er(t, e, r, n) {
|
824
|
+
let i = ee(r), s = r == null;
|
825
|
+
A(() => {
|
826
|
+
if (s)
|
827
827
|
return;
|
828
|
-
let
|
829
|
-
return
|
830
|
-
|
828
|
+
let o = t.current;
|
829
|
+
return o.addEventListener(e, i, n), () => {
|
830
|
+
o.removeEventListener(e, i, n);
|
831
831
|
};
|
832
832
|
}, [
|
833
833
|
t,
|
834
834
|
e,
|
835
835
|
n,
|
836
|
-
|
836
|
+
s,
|
837
837
|
i
|
838
838
|
]);
|
839
839
|
}
|
840
840
|
function St(t, e) {
|
841
|
-
let r =
|
842
|
-
r <=
|
841
|
+
let r = Xe(t, e, "left"), n = Xe(t, e, "top"), i = e.offsetWidth, s = e.offsetHeight, o = t.scrollLeft, d = t.scrollTop, { borderTopWidth: f, borderLeftWidth: y } = getComputedStyle(t), h = t.scrollLeft + parseInt(y, 10), w = t.scrollTop + parseInt(f, 10), v = h + t.clientWidth, g = w + t.clientHeight;
|
842
|
+
r <= o ? o = r - parseInt(y, 10) : r + i > v && (o += r + i - v), n <= w ? d = n - parseInt(f, 10) : n + s > g && (d += n + s - g), t.scrollLeft = o, t.scrollTop = d;
|
843
843
|
}
|
844
|
-
function
|
844
|
+
function Xe(t, e, r) {
|
845
845
|
const n = r === "left" ? "offsetLeft" : "offsetTop";
|
846
846
|
let i = 0;
|
847
847
|
for (; e.offsetParent && (i += e[n], e.offsetParent !== t); ) {
|
@@ -853,58 +853,58 @@ function qe(t, e, r) {
|
|
853
853
|
}
|
854
854
|
return i;
|
855
855
|
}
|
856
|
-
function
|
856
|
+
function qe(t, e) {
|
857
857
|
if (document.contains(t)) {
|
858
|
-
let
|
859
|
-
if (window.getComputedStyle(
|
860
|
-
let f =
|
861
|
-
for (; t && f && t !==
|
862
|
-
St(f, t), t = f, f =
|
858
|
+
let o = document.scrollingElement || document.documentElement;
|
859
|
+
if (window.getComputedStyle(o).overflow === "hidden") {
|
860
|
+
let f = je(t);
|
861
|
+
for (; t && f && t !== o && f !== o; )
|
862
|
+
St(f, t), t = f, f = je(t);
|
863
863
|
} else {
|
864
864
|
var r;
|
865
|
-
let { left: f, top:
|
865
|
+
let { left: f, top: y } = t.getBoundingClientRect();
|
866
866
|
t == null || (r = t.scrollIntoView) === null || r === void 0 || r.call(t, {
|
867
867
|
block: "nearest"
|
868
868
|
});
|
869
|
-
let { left:
|
870
|
-
if (Math.abs(f -
|
871
|
-
var n, i,
|
869
|
+
let { left: h, top: w } = t.getBoundingClientRect();
|
870
|
+
if (Math.abs(f - h) > 1 || Math.abs(y - w) > 1) {
|
871
|
+
var n, i, s;
|
872
872
|
e == null || (i = e.containingElement) === null || i === void 0 || (n = i.scrollIntoView) === null || n === void 0 || n.call(i, {
|
873
873
|
block: "center",
|
874
874
|
inline: "center"
|
875
|
-
}), (
|
875
|
+
}), (s = t.scrollIntoView) === null || s === void 0 || s.call(t, {
|
876
876
|
block: "nearest"
|
877
877
|
});
|
878
878
|
}
|
879
879
|
}
|
880
880
|
}
|
881
881
|
}
|
882
|
-
function
|
883
|
-
return t.mozInputSource === 0 && t.isTrusted ? !0 :
|
882
|
+
function xe(t) {
|
883
|
+
return t.mozInputSource === 0 && t.isTrusted ? !0 : gt() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType;
|
884
884
|
}
|
885
|
-
function
|
886
|
-
return !
|
885
|
+
function kr(t) {
|
886
|
+
return !gt() && t.width === 0 && t.height === 0 || t.width === 1 && t.height === 1 && t.pressure === 0 && t.detail === 0 && t.pointerType === "mouse";
|
887
887
|
}
|
888
|
-
function
|
888
|
+
function Mr(t, e) {
|
889
889
|
return e.get ? e.get.call(t) : e.value;
|
890
890
|
}
|
891
|
-
function
|
891
|
+
function wt(t, e, r) {
|
892
892
|
if (!e.has(t))
|
893
893
|
throw new TypeError("attempted to " + r + " private field on non-instance");
|
894
894
|
return e.get(t);
|
895
895
|
}
|
896
|
-
function
|
897
|
-
var r =
|
898
|
-
return
|
896
|
+
function Lr(t, e) {
|
897
|
+
var r = wt(t, e, "get");
|
898
|
+
return Mr(t, r);
|
899
899
|
}
|
900
|
-
function
|
900
|
+
function Ir(t, e) {
|
901
901
|
if (e.has(t))
|
902
902
|
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
903
903
|
}
|
904
|
-
function
|
905
|
-
|
904
|
+
function Cr(t, e, r) {
|
905
|
+
Ir(t, e), e.set(t, r);
|
906
906
|
}
|
907
|
-
function
|
907
|
+
function Ar(t, e, r) {
|
908
908
|
if (e.set)
|
909
909
|
e.set.call(t, r);
|
910
910
|
else {
|
@@ -913,30 +913,30 @@ function Dr(t, e, r) {
|
|
913
913
|
e.value = r;
|
914
914
|
}
|
915
915
|
}
|
916
|
-
function
|
917
|
-
var n =
|
918
|
-
return
|
916
|
+
function Ye(t, e, r) {
|
917
|
+
var n = wt(t, e, "set");
|
918
|
+
return Ar(t, n, r), r;
|
919
919
|
}
|
920
|
-
let ne = "default",
|
921
|
-
function
|
922
|
-
if (
|
920
|
+
let ne = "default", Ee = "", pe = /* @__PURE__ */ new WeakMap();
|
921
|
+
function Je(t) {
|
922
|
+
if (De()) {
|
923
923
|
if (ne === "default") {
|
924
|
-
const e =
|
925
|
-
|
924
|
+
const e = z(t);
|
925
|
+
Ee = e.documentElement.style.webkitUserSelect, e.documentElement.style.webkitUserSelect = "none";
|
926
926
|
}
|
927
927
|
ne = "disabled";
|
928
928
|
} else
|
929
929
|
(t instanceof HTMLElement || t instanceof SVGElement) && (pe.set(t, t.style.userSelect), t.style.userSelect = "none");
|
930
930
|
}
|
931
|
-
function
|
932
|
-
if (
|
931
|
+
function de(t) {
|
932
|
+
if (De()) {
|
933
933
|
if (ne !== "disabled")
|
934
934
|
return;
|
935
935
|
ne = "restoring", setTimeout(() => {
|
936
936
|
$t(() => {
|
937
937
|
if (ne === "restoring") {
|
938
|
-
const e =
|
939
|
-
e.documentElement.style.webkitUserSelect === "none" && (e.documentElement.style.webkitUserSelect =
|
938
|
+
const e = z(t);
|
939
|
+
e.documentElement.style.webkitUserSelect === "none" && (e.documentElement.style.webkitUserSelect = Ee || ""), Ee = "", ne = "default";
|
940
940
|
}
|
941
941
|
});
|
942
942
|
}, 300);
|
@@ -945,50 +945,50 @@ function ue(t) {
|
|
945
945
|
t.style.userSelect === "none" && (t.style.userSelect = e), t.getAttribute("style") === "" && t.removeAttribute("style"), pe.delete(t);
|
946
946
|
}
|
947
947
|
}
|
948
|
-
const
|
948
|
+
const Tt = N.createContext({
|
949
949
|
register: () => {
|
950
950
|
}
|
951
951
|
});
|
952
|
-
|
953
|
-
function
|
954
|
-
let e = ie(
|
952
|
+
Tt.displayName = "PressResponderContext";
|
953
|
+
function Dr(t) {
|
954
|
+
let e = ie(Tt);
|
955
955
|
if (e) {
|
956
956
|
let { register: r, ...n } = e;
|
957
|
-
t =
|
957
|
+
t = V(n, t), r();
|
958
958
|
}
|
959
959
|
return Pr(e, t.ref), t;
|
960
960
|
}
|
961
|
-
var
|
961
|
+
var ue = /* @__PURE__ */ new WeakMap();
|
962
962
|
class fe {
|
963
963
|
continuePropagation() {
|
964
|
-
|
964
|
+
Ye(this, ue, !1);
|
965
965
|
}
|
966
966
|
get shouldStopPropagation() {
|
967
|
-
return
|
967
|
+
return Lr(this, ue);
|
968
968
|
}
|
969
969
|
constructor(e, r, n) {
|
970
|
-
|
970
|
+
Cr(this, ue, {
|
971
971
|
writable: !0,
|
972
972
|
value: void 0
|
973
|
-
}),
|
973
|
+
}), Ye(this, ue, !0), 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;
|
974
974
|
}
|
975
975
|
}
|
976
|
-
const
|
976
|
+
const Ze = Symbol("linkClicked");
|
977
977
|
function Pt(t) {
|
978
978
|
let {
|
979
979
|
onPress: e,
|
980
980
|
onPressChange: r,
|
981
981
|
onPressStart: n,
|
982
982
|
onPressEnd: i,
|
983
|
-
onPressUp:
|
984
|
-
isDisabled:
|
985
|
-
isPressed:
|
983
|
+
onPressUp: s,
|
984
|
+
isDisabled: o,
|
985
|
+
isPressed: d,
|
986
986
|
preventFocusOnPress: f,
|
987
|
-
shouldCancelOnPointerExit:
|
988
|
-
allowTextSelectionOnPress:
|
989
|
-
ref:
|
990
|
-
...
|
991
|
-
} =
|
987
|
+
shouldCancelOnPointerExit: y,
|
988
|
+
allowTextSelectionOnPress: h,
|
989
|
+
ref: w,
|
990
|
+
...v
|
991
|
+
} = Dr(t), [g, k] = O(!1), T = E({
|
992
992
|
isPressed: !1,
|
993
993
|
ignoreEmulatedMouseEvents: !1,
|
994
994
|
ignoreClickAfterPress: !1,
|
@@ -998,18 +998,18 @@ function Pt(t) {
|
|
998
998
|
target: null,
|
999
999
|
isOverTarget: !1,
|
1000
1000
|
pointerType: null
|
1001
|
-
}), { addGlobalListener: K, removeAllGlobalListeners:
|
1002
|
-
let p =
|
1003
|
-
if (
|
1001
|
+
}), { addGlobalListener: K, removeAllGlobalListeners: M } = mt(), x = ee((l, $) => {
|
1002
|
+
let p = T.current;
|
1003
|
+
if (o || p.didFirePressStart)
|
1004
1004
|
return !1;
|
1005
1005
|
let c = !0;
|
1006
1006
|
if (p.isTriggeringEvent = !0, n) {
|
1007
1007
|
let S = new fe("pressstart", $, l);
|
1008
1008
|
n(S), c = S.shouldStopPropagation;
|
1009
1009
|
}
|
1010
|
-
return r && r(!0), p.isTriggeringEvent = !1, p.didFirePressStart = !0,
|
1010
|
+
return r && r(!0), p.isTriggeringEvent = !1, p.didFirePressStart = !0, k(!0), c;
|
1011
1011
|
}), P = ee((l, $, p = !0) => {
|
1012
|
-
let c =
|
1012
|
+
let c = T.current;
|
1013
1013
|
if (!c.didFirePressStart)
|
1014
1014
|
return !1;
|
1015
1015
|
c.ignoreClickAfterPress = !0, c.didFirePressStart = !1, c.isTriggeringEvent = !0;
|
@@ -1018,91 +1018,91 @@ function Pt(t) {
|
|
1018
1018
|
let a = new fe("pressend", $, l);
|
1019
1019
|
i(a), S = a.shouldStopPropagation;
|
1020
1020
|
}
|
1021
|
-
if (r && r(!1),
|
1021
|
+
if (r && r(!1), k(!1), e && p && !o) {
|
1022
1022
|
let a = new fe("press", $, l);
|
1023
1023
|
e(a), S && (S = a.shouldStopPropagation);
|
1024
1024
|
}
|
1025
1025
|
return c.isTriggeringEvent = !1, S;
|
1026
|
-
}),
|
1027
|
-
let p =
|
1028
|
-
if (
|
1026
|
+
}), L = ee((l, $) => {
|
1027
|
+
let p = T.current;
|
1028
|
+
if (o)
|
1029
1029
|
return !1;
|
1030
|
-
if (
|
1030
|
+
if (s) {
|
1031
1031
|
p.isTriggeringEvent = !0;
|
1032
1032
|
let c = new fe("pressup", $, l);
|
1033
|
-
return
|
1033
|
+
return s(c), p.isTriggeringEvent = !1, c.shouldStopPropagation;
|
1034
1034
|
}
|
1035
1035
|
return !0;
|
1036
|
+
}), I = ee((l) => {
|
1037
|
+
let $ = T.current;
|
1038
|
+
$.isPressed && $.target && ($.isOverTarget && $.pointerType != null && P(U($.target, l), $.pointerType, !1), $.isPressed = !1, $.isOverTarget = !1, $.activePointerId = null, $.pointerType = null, M(), h || de($.target));
|
1036
1039
|
}), C = ee((l) => {
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
b && C(l);
|
1041
|
-
}), R = V(() => {
|
1042
|
-
let l = w.current, $ = {
|
1040
|
+
y && I(l);
|
1041
|
+
}), B = H(() => {
|
1042
|
+
let l = T.current, $ = {
|
1043
1043
|
onKeyDown(c) {
|
1044
|
-
if (
|
1044
|
+
if (Te(c.nativeEvent, c.currentTarget) && c.currentTarget.contains(c.target)) {
|
1045
1045
|
var S;
|
1046
1046
|
et(c.target, c.key) && c.preventDefault();
|
1047
1047
|
let a = !0;
|
1048
|
-
!l.isPressed && !c.repeat && (l.target = c.currentTarget, l.isPressed = !0, a =
|
1048
|
+
!l.isPressed && !c.repeat && (l.target = c.currentTarget, l.isPressed = !0, a = x(c, "keyboard"), K(z(c.currentTarget), "keyup", p, !1)), a && c.stopPropagation(), c.metaKey && X() && ((S = l.metaKeyEvents) === null || S === void 0 || S.set(c.key, c.nativeEvent));
|
1049
1049
|
} else
|
1050
1050
|
c.key === "Meta" && (l.metaKeyEvents = /* @__PURE__ */ new Map());
|
1051
1051
|
},
|
1052
1052
|
onKeyUp(c) {
|
1053
|
-
|
1053
|
+
Te(c.nativeEvent, c.currentTarget) && !c.repeat && c.currentTarget.contains(c.target) && l.target && L(U(l.target, c), "keyboard");
|
1054
1054
|
},
|
1055
1055
|
onClick(c) {
|
1056
|
-
if (!(c && !c.currentTarget.contains(c.target)) && c && c.button === 0 && !l.isTriggeringEvent && !
|
1056
|
+
if (!(c && !c.currentTarget.contains(c.target)) && c && c.button === 0 && !l.isTriggeringEvent && !q.isOpening) {
|
1057
1057
|
let S = !0;
|
1058
|
-
if (
|
1059
|
-
!
|
1060
|
-
let a =
|
1061
|
-
S = a &&
|
1058
|
+
if (o && c.preventDefault(), !l.ignoreClickAfterPress && !l.ignoreEmulatedMouseEvents && !l.isPressed && (l.pointerType === "virtual" || xe(c.nativeEvent))) {
|
1059
|
+
!o && !f && W(c.currentTarget);
|
1060
|
+
let a = x(c, "virtual"), u = L(c, "virtual"), _ = P(c, "virtual");
|
1061
|
+
S = a && u && _;
|
1062
1062
|
}
|
1063
1063
|
l.ignoreEmulatedMouseEvents = !1, l.ignoreClickAfterPress = !1, S && c.stopPropagation();
|
1064
1064
|
}
|
1065
1065
|
}
|
1066
1066
|
}, p = (c) => {
|
1067
1067
|
var S;
|
1068
|
-
if (l.isPressed && l.target &&
|
1068
|
+
if (l.isPressed && l.target && Te(c, l.target)) {
|
1069
1069
|
var a;
|
1070
1070
|
et(c.target, c.key) && c.preventDefault();
|
1071
|
-
let
|
1072
|
-
|
1071
|
+
let _ = c.target, R = P(U(l.target, c), "keyboard", l.target.contains(_));
|
1072
|
+
M(), R && c.stopPropagation(), c.key !== "Enter" && Fe(l.target) && l.target.contains(_) && !c[Ze] && (c[Ze] = !0, q(l.target, c, !1)), l.isPressed = !1, (a = l.metaKeyEvents) === null || a === void 0 || a.delete(c.key);
|
1073
1073
|
} else if (c.key === "Meta" && ((S = l.metaKeyEvents) === null || S === void 0 ? void 0 : S.size)) {
|
1074
|
-
var
|
1075
|
-
let
|
1074
|
+
var u;
|
1075
|
+
let _ = l.metaKeyEvents;
|
1076
1076
|
l.metaKeyEvents = void 0;
|
1077
|
-
for (let
|
1078
|
-
(
|
1077
|
+
for (let R of _.values())
|
1078
|
+
(u = l.target) === null || u === void 0 || u.dispatchEvent(new KeyboardEvent("keyup", R));
|
1079
1079
|
}
|
1080
1080
|
};
|
1081
1081
|
if (typeof PointerEvent < "u") {
|
1082
|
-
$.onPointerDown = (
|
1083
|
-
if (
|
1082
|
+
$.onPointerDown = (u) => {
|
1083
|
+
if (u.button !== 0 || !u.currentTarget.contains(u.target))
|
1084
1084
|
return;
|
1085
|
-
if (
|
1085
|
+
if (kr(u.nativeEvent)) {
|
1086
1086
|
l.pointerType = "virtual";
|
1087
1087
|
return;
|
1088
1088
|
}
|
1089
|
-
Pe(
|
1090
|
-
let
|
1091
|
-
l.isPressed || (l.isPressed = !0, l.isOverTarget = !0, l.activePointerId =
|
1092
|
-
}, $.onMouseDown = (
|
1093
|
-
!
|
1094
|
-
}, $.onPointerUp = (
|
1095
|
-
!
|
1089
|
+
Pe(u.currentTarget) && u.preventDefault(), l.pointerType = u.pointerType;
|
1090
|
+
let _ = !0;
|
1091
|
+
l.isPressed || (l.isPressed = !0, l.isOverTarget = !0, l.activePointerId = u.pointerId, l.target = u.currentTarget, !o && !f && W(u.currentTarget), h || Je(l.target), _ = x(u, l.pointerType), K(z(u.currentTarget), "pointermove", c, !1), K(z(u.currentTarget), "pointerup", S, !1), K(z(u.currentTarget), "pointercancel", a, !1)), _ && u.stopPropagation();
|
1092
|
+
}, $.onMouseDown = (u) => {
|
1093
|
+
!u.currentTarget.contains(u.target) || u.button === 0 && (Pe(u.currentTarget) && u.preventDefault(), u.stopPropagation());
|
1094
|
+
}, $.onPointerUp = (u) => {
|
1095
|
+
!u.currentTarget.contains(u.target) || l.pointerType === "virtual" || u.button === 0 && Z(u, u.currentTarget) && L(u, l.pointerType || u.pointerType);
|
1096
1096
|
};
|
1097
|
-
let c = (
|
1098
|
-
|
1099
|
-
}, S = (
|
1100
|
-
|
1101
|
-
}, a = (
|
1102
|
-
|
1097
|
+
let c = (u) => {
|
1098
|
+
u.pointerId === l.activePointerId && (l.target && Z(u, l.target) ? !l.isOverTarget && l.pointerType != null && (l.isOverTarget = !0, x(U(l.target, u), l.pointerType)) : l.target && l.isOverTarget && l.pointerType != null && (l.isOverTarget = !1, P(U(l.target, u), l.pointerType, !1), C(u)));
|
1099
|
+
}, S = (u) => {
|
1100
|
+
u.pointerId === l.activePointerId && l.isPressed && u.button === 0 && l.target && (Z(u, l.target) && l.pointerType != null ? P(U(l.target, u), l.pointerType) : l.isOverTarget && l.pointerType != null && P(U(l.target, u), l.pointerType, !1), l.isPressed = !1, l.isOverTarget = !1, l.activePointerId = null, l.pointerType = null, M(), h || de(l.target));
|
1101
|
+
}, a = (u) => {
|
1102
|
+
I(u);
|
1103
1103
|
};
|
1104
|
-
$.onDragStart = (
|
1105
|
-
!
|
1104
|
+
$.onDragStart = (u) => {
|
1105
|
+
!u.currentTarget.contains(u.target) || I(u);
|
1106
1106
|
};
|
1107
1107
|
} else {
|
1108
1108
|
$.onMouseDown = (a) => {
|
@@ -1112,36 +1112,36 @@ function Pt(t) {
|
|
1112
1112
|
a.stopPropagation();
|
1113
1113
|
return;
|
1114
1114
|
}
|
1115
|
-
l.isPressed = !0, l.isOverTarget = !0, l.target = a.currentTarget, l.pointerType =
|
1115
|
+
l.isPressed = !0, l.isOverTarget = !0, l.target = a.currentTarget, l.pointerType = xe(a.nativeEvent) ? "virtual" : "mouse", !o && !f && W(a.currentTarget), x(a, l.pointerType) && a.stopPropagation(), K(z(a.currentTarget), "mouseup", c, !1);
|
1116
1116
|
}, $.onMouseEnter = (a) => {
|
1117
1117
|
if (!a.currentTarget.contains(a.target))
|
1118
1118
|
return;
|
1119
|
-
let
|
1120
|
-
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !0,
|
1119
|
+
let u = !0;
|
1120
|
+
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !0, u = x(a, l.pointerType)), u && a.stopPropagation();
|
1121
1121
|
}, $.onMouseLeave = (a) => {
|
1122
1122
|
if (!a.currentTarget.contains(a.target))
|
1123
1123
|
return;
|
1124
|
-
let
|
1125
|
-
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !1,
|
1124
|
+
let u = !0;
|
1125
|
+
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !1, u = P(a, l.pointerType, !1), C(a)), u && a.stopPropagation();
|
1126
1126
|
}, $.onMouseUp = (a) => {
|
1127
|
-
!a.currentTarget.contains(a.target) || !l.ignoreEmulatedMouseEvents && a.button === 0 &&
|
1127
|
+
!a.currentTarget.contains(a.target) || !l.ignoreEmulatedMouseEvents && a.button === 0 && L(a, l.pointerType || "mouse");
|
1128
1128
|
};
|
1129
1129
|
let c = (a) => {
|
1130
1130
|
if (a.button === 0) {
|
1131
|
-
if (l.isPressed = !1,
|
1131
|
+
if (l.isPressed = !1, M(), l.ignoreEmulatedMouseEvents) {
|
1132
1132
|
l.ignoreEmulatedMouseEvents = !1;
|
1133
1133
|
return;
|
1134
1134
|
}
|
1135
|
-
l.target &&
|
1135
|
+
l.target && Z(a, l.target) && l.pointerType != null ? P(U(l.target, a), l.pointerType) : l.target && l.isOverTarget && l.pointerType != null && P(U(l.target, a), l.pointerType, !1), l.isOverTarget = !1;
|
1136
1136
|
}
|
1137
1137
|
};
|
1138
1138
|
$.onTouchStart = (a) => {
|
1139
1139
|
if (!a.currentTarget.contains(a.target))
|
1140
1140
|
return;
|
1141
|
-
let
|
1142
|
-
if (!
|
1141
|
+
let u = Fr(a.nativeEvent);
|
1142
|
+
if (!u)
|
1143
1143
|
return;
|
1144
|
-
l.activePointerId =
|
1144
|
+
l.activePointerId = u.identifier, l.ignoreEmulatedMouseEvents = !0, l.isOverTarget = !0, l.isPressed = !0, l.target = a.currentTarget, l.pointerType = "touch", !o && !f && W(a.currentTarget), h || Je(l.target), x(a, l.pointerType) && a.stopPropagation(), K(he(a.currentTarget), "scroll", S, !0);
|
1145
1145
|
}, $.onTouchMove = (a) => {
|
1146
1146
|
if (!a.currentTarget.contains(a.target))
|
1147
1147
|
return;
|
@@ -1149,8 +1149,8 @@ function Pt(t) {
|
|
1149
1149
|
a.stopPropagation();
|
1150
1150
|
return;
|
1151
1151
|
}
|
1152
|
-
let
|
1153
|
-
|
1152
|
+
let u = Qe(a.nativeEvent, l.activePointerId), _ = !0;
|
1153
|
+
u && Z(u, a.currentTarget) ? !l.isOverTarget && l.pointerType != null && (l.isOverTarget = !0, _ = x(a, l.pointerType)) : l.isOverTarget && l.pointerType != null && (l.isOverTarget = !1, _ = P(a, l.pointerType, !1), C(a)), _ && a.stopPropagation();
|
1154
1154
|
}, $.onTouchEnd = (a) => {
|
1155
1155
|
if (!a.currentTarget.contains(a.target))
|
1156
1156
|
return;
|
@@ -1158,13 +1158,13 @@ function Pt(t) {
|
|
1158
1158
|
a.stopPropagation();
|
1159
1159
|
return;
|
1160
1160
|
}
|
1161
|
-
let
|
1162
|
-
|
1161
|
+
let u = Qe(a.nativeEvent, l.activePointerId), _ = !0;
|
1162
|
+
u && Z(u, a.currentTarget) && l.pointerType != null ? (L(a, l.pointerType), _ = P(a, l.pointerType)) : l.isOverTarget && l.pointerType != null && (_ = P(a, l.pointerType, !1)), _ && a.stopPropagation(), l.isPressed = !1, l.activePointerId = null, l.isOverTarget = !1, l.ignoreEmulatedMouseEvents = !0, l.target && !h && de(l.target), M();
|
1163
1163
|
}, $.onTouchCancel = (a) => {
|
1164
|
-
!a.currentTarget.contains(a.target) || (a.stopPropagation(), l.isPressed &&
|
1164
|
+
!a.currentTarget.contains(a.target) || (a.stopPropagation(), l.isPressed && I(a));
|
1165
1165
|
};
|
1166
1166
|
let S = (a) => {
|
1167
|
-
l.isPressed && a.target.contains(l.target) &&
|
1167
|
+
l.isPressed && a.target.contains(l.target) && I({
|
1168
1168
|
currentTarget: l.target,
|
1169
1169
|
shiftKey: !1,
|
1170
1170
|
ctrlKey: !1,
|
@@ -1173,44 +1173,44 @@ function Pt(t) {
|
|
1173
1173
|
});
|
1174
1174
|
};
|
1175
1175
|
$.onDragStart = (a) => {
|
1176
|
-
!a.currentTarget.contains(a.target) ||
|
1176
|
+
!a.currentTarget.contains(a.target) || I(a);
|
1177
1177
|
};
|
1178
1178
|
}
|
1179
1179
|
return $;
|
1180
1180
|
}, [
|
1181
1181
|
K,
|
1182
|
-
|
1182
|
+
o,
|
1183
1183
|
f,
|
1184
|
-
|
1185
|
-
|
1184
|
+
M,
|
1185
|
+
h,
|
1186
|
+
I,
|
1186
1187
|
C,
|
1187
|
-
A,
|
1188
1188
|
P,
|
1189
|
-
|
1190
|
-
|
1189
|
+
x,
|
1190
|
+
L
|
1191
1191
|
]);
|
1192
|
-
return
|
1192
|
+
return A(() => () => {
|
1193
1193
|
var l;
|
1194
|
-
|
1194
|
+
h || de((l = T.current.target) !== null && l !== void 0 ? l : void 0);
|
1195
1195
|
}, [
|
1196
|
-
|
1196
|
+
h
|
1197
1197
|
]), {
|
1198
|
-
isPressed:
|
1199
|
-
pressProps:
|
1198
|
+
isPressed: d || g,
|
1199
|
+
pressProps: V(v, B)
|
1200
1200
|
};
|
1201
1201
|
}
|
1202
|
-
function
|
1202
|
+
function Fe(t) {
|
1203
1203
|
return t.tagName === "A" && t.hasAttribute("href");
|
1204
1204
|
}
|
1205
|
-
function
|
1206
|
-
const { key: r, code: n } = t, i = e,
|
1207
|
-
return (r === "Enter" || r === " " || r === "Spacebar" || n === "Space") && !(i instanceof
|
1205
|
+
function Te(t, e) {
|
1206
|
+
const { key: r, code: n } = t, i = e, s = i.getAttribute("role");
|
1207
|
+
return (r === "Enter" || r === " " || r === "Spacebar" || n === "Space") && !(i instanceof he(i).HTMLInputElement && !_t(i, r) || i instanceof he(i).HTMLTextAreaElement || i.isContentEditable) && !((s === "link" || !s && Fe(i)) && r !== "Enter");
|
1208
1208
|
}
|
1209
|
-
function
|
1209
|
+
function Fr(t) {
|
1210
1210
|
const { targetTouches: e } = t;
|
1211
1211
|
return e.length > 0 ? e[0] : null;
|
1212
1212
|
}
|
1213
|
-
function
|
1213
|
+
function Qe(t, e) {
|
1214
1214
|
const r = t.changedTouches;
|
1215
1215
|
for (let n = 0; n < r.length; n++) {
|
1216
1216
|
const i = r[n];
|
@@ -1219,7 +1219,7 @@ function _e(t, e) {
|
|
1219
1219
|
}
|
1220
1220
|
return null;
|
1221
1221
|
}
|
1222
|
-
function
|
1222
|
+
function U(t, e) {
|
1223
1223
|
return {
|
1224
1224
|
currentTarget: t,
|
1225
1225
|
shiftKey: e.shiftKey,
|
@@ -1228,7 +1228,7 @@ function W(t, e) {
|
|
1228
1228
|
altKey: e.altKey
|
1229
1229
|
};
|
1230
1230
|
}
|
1231
|
-
function
|
1231
|
+
function zr(t) {
|
1232
1232
|
let e = 0, r = 0;
|
1233
1233
|
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), {
|
1234
1234
|
top: t.clientY - r,
|
@@ -1237,20 +1237,20 @@ function Or(t) {
|
|
1237
1237
|
left: t.clientX - e
|
1238
1238
|
};
|
1239
1239
|
}
|
1240
|
-
function
|
1240
|
+
function Or(t, e) {
|
1241
1241
|
return !(t.left > e.right || e.left > t.right || t.top > e.bottom || e.top > t.bottom);
|
1242
1242
|
}
|
1243
|
-
function
|
1244
|
-
let r = e.getBoundingClientRect(), n =
|
1245
|
-
return
|
1243
|
+
function Z(t, e) {
|
1244
|
+
let r = e.getBoundingClientRect(), n = zr(t);
|
1245
|
+
return Or(r, n);
|
1246
1246
|
}
|
1247
1247
|
function Pe(t) {
|
1248
1248
|
return !(t instanceof HTMLElement) || !t.hasAttribute("draggable");
|
1249
1249
|
}
|
1250
1250
|
function et(t, e) {
|
1251
|
-
return t instanceof HTMLInputElement ? !
|
1251
|
+
return t instanceof HTMLInputElement ? !_t(t, e) : t instanceof HTMLButtonElement ? t.type !== "submit" && t.type !== "reset" : !Fe(t);
|
1252
1252
|
}
|
1253
|
-
const
|
1253
|
+
const Nr = /* @__PURE__ */ new Set([
|
1254
1254
|
"checkbox",
|
1255
1255
|
"radio",
|
1256
1256
|
"range",
|
@@ -1261,116 +1261,116 @@ const Br = /* @__PURE__ */ new Set([
|
|
1261
1261
|
"submit",
|
1262
1262
|
"reset"
|
1263
1263
|
]);
|
1264
|
-
function
|
1265
|
-
return t.type === "checkbox" || t.type === "radio" ? e === " " :
|
1264
|
+
function _t(t, e) {
|
1265
|
+
return t.type === "checkbox" || t.type === "radio" ? e === " " : Nr.has(t.type);
|
1266
1266
|
}
|
1267
|
-
let ae = null,
|
1268
|
-
function
|
1269
|
-
for (let r of
|
1267
|
+
let ae = null, Br = /* @__PURE__ */ new Set(), tt = !1, Y = !1, ke = !1;
|
1268
|
+
function ze(t, e) {
|
1269
|
+
for (let r of Br)
|
1270
1270
|
r(t, e);
|
1271
1271
|
}
|
1272
|
-
function
|
1273
|
-
return !(t.metaKey || !
|
1272
|
+
function Rr(t) {
|
1273
|
+
return !(t.metaKey || !X() && t.altKey || t.ctrlKey || t.key === "Control" || t.key === "Shift" || t.key === "Meta");
|
1274
1274
|
}
|
1275
1275
|
function rt(t) {
|
1276
|
-
|
1276
|
+
Y = !0, Rr(t) && (ae = "keyboard", ze("keyboard", t));
|
1277
1277
|
}
|
1278
|
-
function
|
1279
|
-
ae = "pointer", (t.type === "mousedown" || t.type === "pointerdown") && (
|
1278
|
+
function Q(t) {
|
1279
|
+
ae = "pointer", (t.type === "mousedown" || t.type === "pointerdown") && (Y = !0, ze("pointer", t));
|
1280
1280
|
}
|
1281
|
-
function
|
1282
|
-
|
1281
|
+
function Ur(t) {
|
1282
|
+
xe(t) && (Y = !0, ae = "virtual");
|
1283
1283
|
}
|
1284
|
-
function
|
1285
|
-
t.target === window || t.target === document || (!
|
1284
|
+
function Wr(t) {
|
1285
|
+
t.target === window || t.target === document || (!Y && !ke && (ae = "virtual", ze("virtual", t)), Y = !1, ke = !1);
|
1286
1286
|
}
|
1287
|
-
function
|
1288
|
-
|
1287
|
+
function Hr() {
|
1288
|
+
Y = !1, ke = !0;
|
1289
1289
|
}
|
1290
1290
|
function nt() {
|
1291
1291
|
if (typeof window > "u" || tt)
|
1292
1292
|
return;
|
1293
1293
|
let t = HTMLElement.prototype.focus;
|
1294
1294
|
HTMLElement.prototype.focus = function() {
|
1295
|
-
|
1296
|
-
}, document.addEventListener("keydown", rt, !0), document.addEventListener("keyup", rt, !0), document.addEventListener("click",
|
1295
|
+
Y = !0, t.apply(this, arguments);
|
1296
|
+
}, document.addEventListener("keydown", rt, !0), document.addEventListener("keyup", rt, !0), document.addEventListener("click", Ur, !0), window.addEventListener("focus", Wr, !0), window.addEventListener("blur", Hr, !1), typeof PointerEvent < "u" ? (document.addEventListener("pointerdown", Q, !0), document.addEventListener("pointermove", Q, !0), document.addEventListener("pointerup", Q, !0)) : (document.addEventListener("mousedown", Q, !0), document.addEventListener("mousemove", Q, !0), document.addEventListener("mouseup", Q, !0)), tt = !0;
|
1297
1297
|
}
|
1298
1298
|
typeof document < "u" && (document.readyState !== "loading" ? nt() : document.addEventListener("DOMContentLoaded", nt));
|
1299
|
-
function
|
1299
|
+
function Me() {
|
1300
1300
|
return ae;
|
1301
1301
|
}
|
1302
|
-
const
|
1303
|
-
function
|
1304
|
-
let { isDisabled: e, onLongPressStart: r, onLongPressEnd: n, onLongPress: i, threshold:
|
1305
|
-
const
|
1306
|
-
let { addGlobalListener: f, removeGlobalListener:
|
1302
|
+
const Vr = 500;
|
1303
|
+
function jr(t) {
|
1304
|
+
let { isDisabled: e, onLongPressStart: r, onLongPressEnd: n, onLongPress: i, threshold: s = Vr, accessibilityDescription: o } = t;
|
1305
|
+
const d = E();
|
1306
|
+
let { addGlobalListener: f, removeGlobalListener: y } = mt(), { pressProps: h } = Pt({
|
1307
1307
|
isDisabled: e,
|
1308
|
-
onPressStart(
|
1309
|
-
if (
|
1310
|
-
...
|
1308
|
+
onPressStart(v) {
|
1309
|
+
if (v.continuePropagation(), (v.pointerType === "mouse" || v.pointerType === "touch") && (r && r({
|
1310
|
+
...v,
|
1311
1311
|
type: "longpressstart"
|
1312
|
-
}),
|
1313
|
-
|
1312
|
+
}), d.current = setTimeout(() => {
|
1313
|
+
v.target.dispatchEvent(new PointerEvent("pointercancel", {
|
1314
1314
|
bubbles: !0
|
1315
1315
|
})), i && i({
|
1316
|
-
...
|
1316
|
+
...v,
|
1317
1317
|
type: "longpress"
|
1318
|
-
}),
|
1319
|
-
},
|
1320
|
-
let
|
1321
|
-
|
1318
|
+
}), d.current = void 0;
|
1319
|
+
}, s), v.pointerType === "touch")) {
|
1320
|
+
let g = (k) => {
|
1321
|
+
k.preventDefault();
|
1322
1322
|
};
|
1323
|
-
f(
|
1323
|
+
f(v.target, "contextmenu", g, {
|
1324
1324
|
once: !0
|
1325
1325
|
}), f(window, "pointerup", () => {
|
1326
1326
|
setTimeout(() => {
|
1327
|
-
|
1327
|
+
y(v.target, "contextmenu", g);
|
1328
1328
|
}, 30);
|
1329
1329
|
}, {
|
1330
1330
|
once: !0
|
1331
1331
|
});
|
1332
1332
|
}
|
1333
1333
|
},
|
1334
|
-
onPressEnd(
|
1335
|
-
|
1336
|
-
...
|
1334
|
+
onPressEnd(v) {
|
1335
|
+
d.current && clearTimeout(d.current), n && (v.pointerType === "mouse" || v.pointerType === "touch") && n({
|
1336
|
+
...v,
|
1337
1337
|
type: "longpressend"
|
1338
1338
|
});
|
1339
1339
|
}
|
1340
|
-
}),
|
1340
|
+
}), w = xr(i && !e ? o : void 0);
|
1341
1341
|
return {
|
1342
|
-
longPressProps:
|
1342
|
+
longPressProps: V(h, w)
|
1343
1343
|
};
|
1344
1344
|
}
|
1345
|
-
function
|
1346
|
-
const e =
|
1347
|
-
if (
|
1345
|
+
function Le(t) {
|
1346
|
+
const e = z(t);
|
1347
|
+
if (Me() === "virtual") {
|
1348
1348
|
let r = e.activeElement;
|
1349
1349
|
$t(() => {
|
1350
|
-
e.activeElement === r && t.isConnected &&
|
1350
|
+
e.activeElement === r && t.isConnected && W(t);
|
1351
1351
|
});
|
1352
1352
|
} else
|
1353
|
-
|
1353
|
+
W(t);
|
1354
1354
|
}
|
1355
|
-
function
|
1356
|
-
const e =
|
1355
|
+
function Gr(t) {
|
1356
|
+
const e = he(t);
|
1357
1357
|
if (!(t instanceof e.HTMLElement) && !(t instanceof e.SVGElement))
|
1358
1358
|
return !1;
|
1359
1359
|
let { display: r, visibility: n } = t.style, i = r !== "none" && n !== "hidden" && n !== "collapse";
|
1360
1360
|
if (i) {
|
1361
|
-
const { getComputedStyle:
|
1362
|
-
let { display:
|
1363
|
-
i =
|
1361
|
+
const { getComputedStyle: s } = t.ownerDocument.defaultView;
|
1362
|
+
let { display: o, visibility: d } = s(t);
|
1363
|
+
i = o !== "none" && d !== "hidden" && d !== "collapse";
|
1364
1364
|
}
|
1365
1365
|
return i;
|
1366
1366
|
}
|
1367
|
-
function
|
1367
|
+
function Xr(t, e) {
|
1368
1368
|
return !t.hasAttribute("hidden") && (t.nodeName === "DETAILS" && e && e.nodeName !== "SUMMARY" ? t.hasAttribute("open") : !0);
|
1369
1369
|
}
|
1370
|
-
function
|
1371
|
-
return t.nodeName !== "#comment" &&
|
1370
|
+
function xt(t, e) {
|
1371
|
+
return t.nodeName !== "#comment" && Gr(t) && Xr(t, e) && (!t.parentElement || xt(t.parentElement, t));
|
1372
1372
|
}
|
1373
|
-
const
|
1373
|
+
const Oe = [
|
1374
1374
|
"input:not([disabled]):not([type=hidden])",
|
1375
1375
|
"select:not([disabled])",
|
1376
1376
|
"textarea:not([disabled])",
|
@@ -1384,22 +1384,22 @@ const Ne = [
|
|
1384
1384
|
"audio[controls]",
|
1385
1385
|
"video[controls]",
|
1386
1386
|
"[contenteditable]"
|
1387
|
-
],
|
1388
|
-
|
1389
|
-
const
|
1390
|
-
function
|
1387
|
+
], qr = Oe.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
1388
|
+
Oe.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
1389
|
+
const Yr = Oe.join(':not([hidden]):not([tabindex="-1"]),');
|
1390
|
+
function Et(t, e) {
|
1391
1391
|
return !t || !e ? !1 : e.some((r) => r.contains(t));
|
1392
1392
|
}
|
1393
|
-
function
|
1394
|
-
let n = e != null && e.tabbable ?
|
1395
|
-
acceptNode(
|
1396
|
-
var
|
1397
|
-
return !(e == null || (
|
1393
|
+
function kt(t, e, r) {
|
1394
|
+
let n = e != null && e.tabbable ? Yr : qr, i = z(t).createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
|
1395
|
+
acceptNode(s) {
|
1396
|
+
var o;
|
1397
|
+
return !(e == null || (o = e.from) === null || o === void 0) && o.contains(s) ? NodeFilter.FILTER_REJECT : s.matches(n) && xt(s) && (!r || Et(s, r)) && (!(e != null && e.accept) || e.accept(s)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
1398
1398
|
}
|
1399
1399
|
});
|
1400
1400
|
return e != null && e.from && (i.currentNode = e.from), i;
|
1401
1401
|
}
|
1402
|
-
class
|
1402
|
+
class Ne {
|
1403
1403
|
get size() {
|
1404
1404
|
return this.fastMap.size;
|
1405
1405
|
}
|
@@ -1410,10 +1410,10 @@ class Be {
|
|
1410
1410
|
let i = this.fastMap.get(r != null ? r : null);
|
1411
1411
|
if (!i)
|
1412
1412
|
return;
|
1413
|
-
let
|
1413
|
+
let s = new it({
|
1414
1414
|
scopeRef: e
|
1415
1415
|
});
|
1416
|
-
i.addChild(
|
1416
|
+
i.addChild(s), s.parent = i, this.fastMap.set(e, s), n && (s.nodeToRestore = n);
|
1417
1417
|
}
|
1418
1418
|
addNode(e) {
|
1419
1419
|
this.fastMap.set(e.scopeRef, e);
|
@@ -1425,10 +1425,10 @@ class Be {
|
|
1425
1425
|
if (!r)
|
1426
1426
|
return;
|
1427
1427
|
let n = r.parent;
|
1428
|
-
for (let
|
1429
|
-
|
1428
|
+
for (let s of this.traverse())
|
1429
|
+
s !== r && r.nodeToRestore && s.nodeToRestore && r.scopeRef && r.scopeRef.current && Et(s.nodeToRestore, r.scopeRef.current) && (s.nodeToRestore = r.nodeToRestore);
|
1430
1430
|
let i = r.children;
|
1431
|
-
n && (n.removeChild(r), i.size > 0 && i.forEach((
|
1431
|
+
n && (n.removeChild(r), i.size > 0 && i.forEach((s) => n && n.addChild(s))), this.fastMap.delete(r.scopeRef);
|
1432
1432
|
}
|
1433
1433
|
*traverse(e = this.root) {
|
1434
1434
|
if (e.scopeRef != null && (yield e), e.children.size > 0)
|
@@ -1437,7 +1437,7 @@ class Be {
|
|
1437
1437
|
}
|
1438
1438
|
clone() {
|
1439
1439
|
var e;
|
1440
|
-
let r = new
|
1440
|
+
let r = new Ne();
|
1441
1441
|
var n;
|
1442
1442
|
for (let i of this.traverse())
|
1443
1443
|
r.addTreeNode(i.scopeRef, (n = (e = i.parent) === null || e === void 0 ? void 0 : e.scopeRef) !== null && n !== void 0 ? n : null, i.nodeToRestore);
|
@@ -1460,22 +1460,22 @@ class it {
|
|
1460
1460
|
this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = e.scopeRef;
|
1461
1461
|
}
|
1462
1462
|
}
|
1463
|
-
new
|
1464
|
-
function
|
1465
|
-
let r = e == null ? void 0 : e.isDisabled, [n, i] =
|
1466
|
-
return
|
1463
|
+
new Ne();
|
1464
|
+
function Jr(t, e) {
|
1465
|
+
let r = e == null ? void 0 : e.isDisabled, [n, i] = O(!1);
|
1466
|
+
return oe(() => {
|
1467
1467
|
if ((t == null ? void 0 : t.current) && !r) {
|
1468
|
-
let
|
1468
|
+
let s = () => {
|
1469
1469
|
if (t.current) {
|
1470
|
-
let
|
1470
|
+
let d = kt(t.current, {
|
1471
1471
|
tabbable: !0
|
1472
1472
|
});
|
1473
|
-
i(!!
|
1473
|
+
i(!!d.nextNode());
|
1474
1474
|
}
|
1475
1475
|
};
|
1476
|
-
|
1477
|
-
let
|
1478
|
-
return
|
1476
|
+
s();
|
1477
|
+
let o = new MutationObserver(s);
|
1478
|
+
return o.observe(t.current, {
|
1479
1479
|
subtree: !0,
|
1480
1480
|
childList: !0,
|
1481
1481
|
attributes: !0,
|
@@ -1484,12 +1484,12 @@ function Zr(t, e) {
|
|
1484
1484
|
"disabled"
|
1485
1485
|
]
|
1486
1486
|
}), () => {
|
1487
|
-
|
1487
|
+
o.disconnect();
|
1488
1488
|
};
|
1489
1489
|
}
|
1490
1490
|
}), r ? !1 : n;
|
1491
1491
|
}
|
1492
|
-
const
|
1492
|
+
const Zr = /* @__PURE__ */ new Set([
|
1493
1493
|
"Arab",
|
1494
1494
|
"Syrc",
|
1495
1495
|
"Samr",
|
@@ -1500,7 +1500,7 @@ const Qr = /* @__PURE__ */ new Set([
|
|
1500
1500
|
"Adlm",
|
1501
1501
|
"Rohg",
|
1502
1502
|
"Hebr"
|
1503
|
-
]),
|
1503
|
+
]), Qr = /* @__PURE__ */ new Set([
|
1504
1504
|
"ae",
|
1505
1505
|
"ar",
|
1506
1506
|
"arc",
|
@@ -1527,13 +1527,13 @@ function en(t) {
|
|
1527
1527
|
if (n)
|
1528
1528
|
return n.direction === "rtl";
|
1529
1529
|
if (r.script)
|
1530
|
-
return
|
1530
|
+
return Zr.has(r.script);
|
1531
1531
|
}
|
1532
1532
|
let e = t.split("-")[0];
|
1533
|
-
return
|
1533
|
+
return Qr.has(e);
|
1534
1534
|
}
|
1535
1535
|
const tn = Symbol.for("react-aria.i18n.locale");
|
1536
|
-
function
|
1536
|
+
function Mt() {
|
1537
1537
|
let t = typeof window < "u" && window[tn] || typeof navigator < "u" && (navigator.language || navigator.userLanguage) || "en-US";
|
1538
1538
|
try {
|
1539
1539
|
Intl.DateTimeFormat.supportedLocalesOf([
|
@@ -1547,42 +1547,42 @@ function Lt() {
|
|
1547
1547
|
direction: en(t) ? "rtl" : "ltr"
|
1548
1548
|
};
|
1549
1549
|
}
|
1550
|
-
let
|
1550
|
+
let Ie = Mt(), le = /* @__PURE__ */ new Set();
|
1551
1551
|
function lt() {
|
1552
|
-
|
1552
|
+
Ie = Mt();
|
1553
1553
|
for (let t of le)
|
1554
|
-
t(
|
1554
|
+
t(Ie);
|
1555
1555
|
}
|
1556
1556
|
function rn() {
|
1557
|
-
let t = pt(), [e, r] =
|
1558
|
-
return
|
1557
|
+
let t = pt(), [e, r] = O(Ie);
|
1558
|
+
return A(() => (le.size === 0 && window.addEventListener("languagechange", lt), le.add(r), () => {
|
1559
1559
|
le.delete(r), le.size === 0 && window.removeEventListener("languagechange", lt);
|
1560
1560
|
}), []), t ? {
|
1561
1561
|
locale: "en-US",
|
1562
1562
|
direction: "ltr"
|
1563
1563
|
} : e;
|
1564
1564
|
}
|
1565
|
-
const nn = /* @__PURE__ */
|
1566
|
-
function
|
1565
|
+
const nn = /* @__PURE__ */ N.createContext(null);
|
1566
|
+
function Lt() {
|
1567
1567
|
let t = rn();
|
1568
1568
|
return ie(nn) || t;
|
1569
1569
|
}
|
1570
|
-
function
|
1571
|
-
return
|
1570
|
+
function Ce(t) {
|
1571
|
+
return vr() ? t.altKey : t.ctrlKey;
|
1572
1572
|
}
|
1573
1573
|
function re(t) {
|
1574
|
-
return
|
1574
|
+
return X() ? t.metaKey : t.ctrlKey;
|
1575
1575
|
}
|
1576
1576
|
const ln = 1e3;
|
1577
|
-
function
|
1578
|
-
let { keyboardDelegate: e, selectionManager: r, onTypeSelect: n } = t, i =
|
1577
|
+
function sn(t) {
|
1578
|
+
let { keyboardDelegate: e, selectionManager: r, onTypeSelect: n } = t, i = E({
|
1579
1579
|
search: "",
|
1580
1580
|
timeout: null
|
1581
|
-
}).current,
|
1582
|
-
let
|
1583
|
-
if (!
|
1581
|
+
}).current, s = (o) => {
|
1582
|
+
let d = on(o.key);
|
1583
|
+
if (!d || o.ctrlKey || o.metaKey || !o.currentTarget.contains(o.target))
|
1584
1584
|
return;
|
1585
|
-
|
1585
|
+
d === " " && i.search.trim().length > 0 && (o.preventDefault(), "continuePropagation" in o || o.stopPropagation()), i.search += d;
|
1586
1586
|
let f = e.getKeyForSearch(i.search, r.focusedKey);
|
1587
1587
|
f == null && (f = e.getKeyForSearch(i.search)), f != null && (r.setFocusedKey(f), n && n(f)), clearTimeout(i.timeout), i.timeout = setTimeout(() => {
|
1588
1588
|
i.search = "";
|
@@ -1590,30 +1590,30 @@ function on(t) {
|
|
1590
1590
|
};
|
1591
1591
|
return {
|
1592
1592
|
typeSelectProps: {
|
1593
|
-
onKeyDownCapture: e.getKeyForSearch ?
|
1593
|
+
onKeyDownCapture: e.getKeyForSearch ? s : null
|
1594
1594
|
}
|
1595
1595
|
};
|
1596
1596
|
}
|
1597
|
-
function
|
1597
|
+
function on(t) {
|
1598
1598
|
return t.length === 1 || !/^[A-Z]/i.test(t) ? t : "";
|
1599
1599
|
}
|
1600
1600
|
function an(t) {
|
1601
|
-
let { selectionManager: e, keyboardDelegate: r, ref: n, autoFocus: i = !1, shouldFocusWrap:
|
1601
|
+
let { selectionManager: e, keyboardDelegate: r, ref: n, autoFocus: i = !1, shouldFocusWrap: s = !1, disallowEmptySelection: o = !1, disallowSelectAll: d = !1, selectOnFocus: f = e.selectionBehavior === "replace", disallowTypeAhead: y = !1, shouldUseVirtualFocus: h, allowsTabNavigation: w = !1, isVirtualized: v, scrollRef: g = n, linkBehavior: k = "action" } = t, { direction: T } = Lt(), K = vt(), M = (p) => {
|
1602
1602
|
if (p.altKey && p.key === "Tab" && p.preventDefault(), !n.current.contains(p.target))
|
1603
1603
|
return;
|
1604
|
-
const c = (m,
|
1604
|
+
const c = (m, j) => {
|
1605
1605
|
if (m != null) {
|
1606
|
-
if (e.isLink(m) &&
|
1607
|
-
|
1608
|
-
e.setFocusedKey(m,
|
1606
|
+
if (e.isLink(m) && k === "selection" && f && !Ce(p)) {
|
1607
|
+
Bt(() => {
|
1608
|
+
e.setFocusedKey(m, j);
|
1609
1609
|
});
|
1610
|
-
let
|
1611
|
-
K.open(
|
1610
|
+
let J = g.current.querySelector(`[data-key="${CSS.escape(m.toString())}"]`);
|
1611
|
+
K.open(J, p);
|
1612
1612
|
return;
|
1613
1613
|
}
|
1614
|
-
if (e.setFocusedKey(m,
|
1614
|
+
if (e.setFocusedKey(m, j), e.isLink(m) && k === "override")
|
1615
1615
|
return;
|
1616
|
-
p.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(m) : f && !
|
1616
|
+
p.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(m) : f && !Ce(p) && e.replaceSelection(m);
|
1617
1617
|
}
|
1618
1618
|
};
|
1619
1619
|
switch (p.key) {
|
@@ -1622,23 +1622,23 @@ function an(t) {
|
|
1622
1622
|
var S, a;
|
1623
1623
|
p.preventDefault();
|
1624
1624
|
let m = e.focusedKey != null ? r.getKeyBelow(e.focusedKey) : (S = r.getFirstKey) === null || S === void 0 ? void 0 : S.call(r);
|
1625
|
-
m == null &&
|
1625
|
+
m == null && s && (m = (a = r.getFirstKey) === null || a === void 0 ? void 0 : a.call(r, e.focusedKey)), c(m);
|
1626
1626
|
}
|
1627
1627
|
break;
|
1628
1628
|
case "ArrowUp":
|
1629
1629
|
if (r.getKeyAbove) {
|
1630
|
-
var
|
1630
|
+
var u, _;
|
1631
1631
|
p.preventDefault();
|
1632
|
-
let m = e.focusedKey != null ? r.getKeyAbove(e.focusedKey) : (
|
1633
|
-
m == null &&
|
1632
|
+
let m = e.focusedKey != null ? r.getKeyAbove(e.focusedKey) : (u = r.getLastKey) === null || u === void 0 ? void 0 : u.call(r);
|
1633
|
+
m == null && s && (m = (_ = r.getLastKey) === null || _ === void 0 ? void 0 : _.call(r, e.focusedKey)), c(m);
|
1634
1634
|
}
|
1635
1635
|
break;
|
1636
1636
|
case "ArrowLeft":
|
1637
1637
|
if (r.getKeyLeftOf) {
|
1638
|
-
var
|
1638
|
+
var R, b;
|
1639
1639
|
p.preventDefault();
|
1640
1640
|
let m = r.getKeyLeftOf(e.focusedKey);
|
1641
|
-
m == null &&
|
1641
|
+
m == null && s && (m = T === "rtl" ? (R = r.getFirstKey) === null || R === void 0 ? void 0 : R.call(r, e.focusedKey) : (b = r.getLastKey) === null || b === void 0 ? void 0 : b.call(r, e.focusedKey)), c(m, T === "rtl" ? "first" : "last");
|
1642
1642
|
}
|
1643
1643
|
break;
|
1644
1644
|
case "ArrowRight":
|
@@ -1646,7 +1646,7 @@ function an(t) {
|
|
1646
1646
|
var $e, me;
|
1647
1647
|
p.preventDefault();
|
1648
1648
|
let m = r.getKeyRightOf(e.focusedKey);
|
1649
|
-
m == null &&
|
1649
|
+
m == null && s && (m = T === "rtl" ? ($e = r.getLastKey) === null || $e === void 0 ? void 0 : $e.call(r, e.focusedKey) : (me = r.getFirstKey) === null || me === void 0 ? void 0 : me.call(r, e.focusedKey)), c(m, T === "rtl" ? "last" : "first");
|
1650
1650
|
}
|
1651
1651
|
break;
|
1652
1652
|
case "Home":
|
@@ -1678,35 +1678,35 @@ function an(t) {
|
|
1678
1678
|
}
|
1679
1679
|
break;
|
1680
1680
|
case "a":
|
1681
|
-
re(p) && e.selectionMode === "multiple" &&
|
1681
|
+
re(p) && e.selectionMode === "multiple" && d !== !0 && (p.preventDefault(), e.selectAll());
|
1682
1682
|
break;
|
1683
1683
|
case "Escape":
|
1684
|
-
p.preventDefault(),
|
1684
|
+
p.preventDefault(), o || e.clearSelection();
|
1685
1685
|
break;
|
1686
1686
|
case "Tab":
|
1687
|
-
if (!
|
1687
|
+
if (!w) {
|
1688
1688
|
if (p.shiftKey)
|
1689
1689
|
n.current.focus();
|
1690
1690
|
else {
|
1691
|
-
let m =
|
1691
|
+
let m = kt(n.current, {
|
1692
1692
|
tabbable: !0
|
1693
|
-
}),
|
1693
|
+
}), j, J;
|
1694
1694
|
do
|
1695
|
-
|
1696
|
-
while (
|
1697
|
-
|
1695
|
+
J = m.lastChild(), J && (j = J);
|
1696
|
+
while (J);
|
1697
|
+
j && !j.contains(document.activeElement) && W(j);
|
1698
1698
|
}
|
1699
1699
|
break;
|
1700
1700
|
}
|
1701
1701
|
}
|
1702
|
-
},
|
1702
|
+
}, x = E({
|
1703
1703
|
top: 0,
|
1704
1704
|
left: 0
|
1705
1705
|
});
|
1706
|
-
|
1707
|
-
|
1708
|
-
top:
|
1709
|
-
left:
|
1706
|
+
Er(g, "scroll", v ? null : () => {
|
1707
|
+
x.current = {
|
1708
|
+
top: g.current.scrollTop,
|
1709
|
+
left: g.current.scrollLeft
|
1710
1710
|
};
|
1711
1711
|
});
|
1712
1712
|
let P = (p) => {
|
@@ -1716,26 +1716,26 @@ function an(t) {
|
|
1716
1716
|
}
|
1717
1717
|
if (!!p.currentTarget.contains(p.target)) {
|
1718
1718
|
if (e.setFocused(!0), e.focusedKey == null) {
|
1719
|
-
let a = (
|
1720
|
-
|
1721
|
-
},
|
1719
|
+
let a = (_) => {
|
1720
|
+
_ != null && (e.setFocusedKey(_), f && e.replaceSelection(_));
|
1721
|
+
}, u = p.relatedTarget;
|
1722
1722
|
var c, S;
|
1723
|
-
|
1723
|
+
u && p.currentTarget.compareDocumentPosition(u) & Node.DOCUMENT_POSITION_FOLLOWING ? a((c = e.lastSelectedKey) !== null && c !== void 0 ? c : r.getLastKey()) : a((S = e.firstSelectedKey) !== null && S !== void 0 ? S : r.getFirstKey());
|
1724
1724
|
} else
|
1725
|
-
|
1726
|
-
if (!
|
1727
|
-
let a =
|
1728
|
-
a && (a.contains(document.activeElement) ||
|
1725
|
+
v || (g.current.scrollTop = x.current.top, g.current.scrollLeft = x.current.left);
|
1726
|
+
if (!v && e.focusedKey != null) {
|
1727
|
+
let a = g.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);
|
1728
|
+
a && (a.contains(document.activeElement) || W(a), Me() === "keyboard" && qe(a, {
|
1729
1729
|
containingElement: n.current
|
1730
1730
|
}));
|
1731
1731
|
}
|
1732
1732
|
}
|
1733
|
-
},
|
1733
|
+
}, L = (p) => {
|
1734
1734
|
p.currentTarget.contains(p.relatedTarget) || e.setFocused(!1);
|
1735
1735
|
};
|
1736
|
-
const
|
1737
|
-
|
1738
|
-
if (
|
1736
|
+
const I = E(i);
|
1737
|
+
A(() => {
|
1738
|
+
if (I.current) {
|
1739
1739
|
let p = null;
|
1740
1740
|
i === "first" && (p = r.getFirstKey()), i === "last" && (p = r.getLastKey());
|
1741
1741
|
let c = e.selectedKeys;
|
@@ -1746,176 +1746,176 @@ function an(t) {
|
|
1746
1746
|
break;
|
1747
1747
|
}
|
1748
1748
|
}
|
1749
|
-
e.setFocused(!0), e.setFocusedKey(p), p == null && !
|
1749
|
+
e.setFocused(!0), e.setFocusedKey(p), p == null && !h && Le(n.current);
|
1750
1750
|
}
|
1751
1751
|
}, []);
|
1752
|
-
let
|
1753
|
-
|
1754
|
-
let p =
|
1755
|
-
if (e.isFocused && e.focusedKey != null && (
|
1756
|
-
let c =
|
1757
|
-
c && (p === "keyboard" ||
|
1752
|
+
let C = E(e.focusedKey);
|
1753
|
+
A(() => {
|
1754
|
+
let p = Me();
|
1755
|
+
if (e.isFocused && e.focusedKey != null && (g == null ? void 0 : g.current)) {
|
1756
|
+
let c = g.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);
|
1757
|
+
c && (p === "keyboard" || I.current) && (v || St(g.current, c), qe(c, {
|
1758
1758
|
containingElement: n.current
|
1759
1759
|
}));
|
1760
1760
|
}
|
1761
|
-
e.isFocused && e.focusedKey == null &&
|
1761
|
+
e.isFocused && e.focusedKey == null && C.current != null && Le(n.current), C.current = e.focusedKey, I.current = !1;
|
1762
1762
|
}, [
|
1763
|
-
h,
|
1764
1763
|
v,
|
1764
|
+
g,
|
1765
1765
|
e.focusedKey,
|
1766
1766
|
e.isFocused,
|
1767
1767
|
n
|
1768
1768
|
]);
|
1769
|
-
let
|
1770
|
-
onKeyDown:
|
1769
|
+
let B = {
|
1770
|
+
onKeyDown: M,
|
1771
1771
|
onFocus: P,
|
1772
|
-
onBlur:
|
1772
|
+
onBlur: L,
|
1773
1773
|
onMouseDown(p) {
|
1774
|
-
|
1774
|
+
g.current === p.target && p.preventDefault();
|
1775
1775
|
}
|
1776
|
-
}, { typeSelectProps: l } =
|
1776
|
+
}, { typeSelectProps: l } = sn({
|
1777
1777
|
keyboardDelegate: r,
|
1778
1778
|
selectionManager: e
|
1779
1779
|
});
|
1780
|
-
|
1780
|
+
y || (B = V(l, B));
|
1781
1781
|
let $;
|
1782
|
-
return
|
1782
|
+
return h || ($ = e.focusedKey == null ? 0 : -1), {
|
1783
1783
|
collectionProps: {
|
1784
|
-
...
|
1784
|
+
...B,
|
1785
1785
|
tabIndex: $
|
1786
1786
|
}
|
1787
1787
|
};
|
1788
1788
|
}
|
1789
1789
|
function cn(t) {
|
1790
|
-
let { selectionManager: e, key: r, ref: n, shouldSelectOnPressUp: i, shouldUseVirtualFocus:
|
1791
|
-
if (
|
1790
|
+
let { selectionManager: e, key: r, ref: n, shouldSelectOnPressUp: i, shouldUseVirtualFocus: s, focus: o, isDisabled: d, onAction: f, allowsDifferentPressOrigin: y, linkBehavior: h = "action" } = t, w = vt(), v = (b) => {
|
1791
|
+
if (b.pointerType === "keyboard" && Ce(b))
|
1792
1792
|
e.toggleSelection(r);
|
1793
1793
|
else {
|
1794
1794
|
if (e.selectionMode === "none")
|
1795
1795
|
return;
|
1796
1796
|
if (e.isLink(r)) {
|
1797
|
-
if (
|
1798
|
-
|
1797
|
+
if (h === "selection") {
|
1798
|
+
w.open(n.current, b), e.setSelectedKeys(e.selectedKeys);
|
1799
1799
|
return;
|
1800
|
-
} else if (
|
1800
|
+
} else if (h === "override" || h === "none")
|
1801
1801
|
return;
|
1802
1802
|
}
|
1803
|
-
e.selectionMode === "single" ? e.isSelected(r) && !e.disallowEmptySelection ? e.toggleSelection(r) : e.replaceSelection(r) :
|
1803
|
+
e.selectionMode === "single" ? e.isSelected(r) && !e.disallowEmptySelection ? e.toggleSelection(r) : e.replaceSelection(r) : b && b.shiftKey ? e.extendSelection(r) : e.selectionBehavior === "toggle" || b && (re(b) || b.pointerType === "touch" || b.pointerType === "virtual") ? e.toggleSelection(r) : e.replaceSelection(r);
|
1804
1804
|
}
|
1805
1805
|
};
|
1806
|
-
|
1807
|
-
r === e.focusedKey && e.isFocused && !
|
1806
|
+
A(() => {
|
1807
|
+
r === e.focusedKey && e.isFocused && !s && (o ? o() : document.activeElement !== n.current && Le(n.current));
|
1808
1808
|
}, [
|
1809
1809
|
n,
|
1810
1810
|
r,
|
1811
1811
|
e.focusedKey,
|
1812
1812
|
e.childFocusStrategy,
|
1813
1813
|
e.isFocused,
|
1814
|
-
|
1815
|
-
]),
|
1816
|
-
let
|
1817
|
-
!
|
1814
|
+
s
|
1815
|
+
]), d = d || e.isDisabled(r);
|
1816
|
+
let g = {};
|
1817
|
+
!s && !d ? g = {
|
1818
1818
|
tabIndex: r === e.focusedKey ? 0 : -1,
|
1819
|
-
onFocus(
|
1820
|
-
|
1819
|
+
onFocus(b) {
|
1820
|
+
b.target === n.current && e.setFocusedKey(r);
|
1821
1821
|
}
|
1822
|
-
} :
|
1823
|
-
|
1822
|
+
} : d && (g.onMouseDown = (b) => {
|
1823
|
+
b.preventDefault();
|
1824
1824
|
});
|
1825
|
-
let
|
1826
|
-
f && f(),
|
1825
|
+
let k = e.isLink(r) && h === "override", T = e.isLink(r) && h !== "selection" && h !== "none", K = !d && e.canSelectItem(r) && !k, M = (f || T) && !d, x = M && (e.selectionBehavior === "replace" ? !K : !K || e.isEmpty), P = M && K && e.selectionBehavior === "replace", L = x || P, I = E(null), C = L && K, B = E(!1), l = E(!1), $ = (b) => {
|
1826
|
+
f && f(), T && w.open(n.current, b);
|
1827
1827
|
}, p = {};
|
1828
|
-
i ? (p.onPressStart = (
|
1829
|
-
|
1830
|
-
},
|
1831
|
-
|
1832
|
-
}, p.onPress =
|
1833
|
-
if (
|
1834
|
-
if (
|
1828
|
+
i ? (p.onPressStart = (b) => {
|
1829
|
+
I.current = b.pointerType, B.current = C, b.pointerType === "keyboard" && (!L || ot()) && v(b);
|
1830
|
+
}, y ? (p.onPressUp = x ? null : (b) => {
|
1831
|
+
b.pointerType !== "keyboard" && K && v(b);
|
1832
|
+
}, p.onPress = x ? $ : null) : p.onPress = (b) => {
|
1833
|
+
if (x || P && b.pointerType !== "mouse") {
|
1834
|
+
if (b.pointerType === "keyboard" && !st())
|
1835
1835
|
return;
|
1836
|
-
$(
|
1836
|
+
$(b);
|
1837
1837
|
} else
|
1838
|
-
|
1839
|
-
}) : (p.onPressStart = (
|
1840
|
-
|
1841
|
-
}, p.onPress = (
|
1842
|
-
(
|
1843
|
-
}),
|
1844
|
-
let { pressProps: c, isPressed: S } = Pt(p), a = P ? (
|
1845
|
-
|
1846
|
-
} : void 0, { longPressProps:
|
1847
|
-
isDisabled: !
|
1848
|
-
onLongPress(
|
1849
|
-
|
1838
|
+
b.pointerType !== "keyboard" && K && v(b);
|
1839
|
+
}) : (p.onPressStart = (b) => {
|
1840
|
+
I.current = b.pointerType, B.current = C, l.current = x, K && (b.pointerType === "mouse" && !x || b.pointerType === "keyboard" && (!M || ot())) && v(b);
|
1841
|
+
}, p.onPress = (b) => {
|
1842
|
+
(b.pointerType === "touch" || b.pointerType === "pen" || b.pointerType === "virtual" || b.pointerType === "keyboard" && L && st() || b.pointerType === "mouse" && l.current) && (L ? $(b) : K && v(b));
|
1843
|
+
}), g["data-key"] = r, p.preventFocusOnPress = s;
|
1844
|
+
let { pressProps: c, isPressed: S } = Pt(p), a = P ? (b) => {
|
1845
|
+
I.current === "mouse" && (b.stopPropagation(), b.preventDefault(), $(b));
|
1846
|
+
} : void 0, { longPressProps: u } = jr({
|
1847
|
+
isDisabled: !C,
|
1848
|
+
onLongPress(b) {
|
1849
|
+
b.pointerType === "touch" && (v(b), e.setSelectionBehavior("toggle"));
|
1850
1850
|
}
|
1851
|
-
}),
|
1852
|
-
|
1853
|
-
},
|
1854
|
-
|
1851
|
+
}), _ = (b) => {
|
1852
|
+
I.current === "touch" && B.current && b.preventDefault();
|
1853
|
+
}, R = e.isLink(r) ? (b) => {
|
1854
|
+
q.isOpening || b.preventDefault();
|
1855
1855
|
} : void 0;
|
1856
1856
|
return {
|
1857
|
-
itemProps:
|
1857
|
+
itemProps: V(g, K || x ? c : {}, C ? u : {}, {
|
1858
1858
|
onDoubleClick: a,
|
1859
|
-
onDragStartCapture:
|
1860
|
-
onClick:
|
1859
|
+
onDragStartCapture: _,
|
1860
|
+
onClick: R
|
1861
1861
|
}),
|
1862
1862
|
isPressed: S,
|
1863
1863
|
isSelected: e.isSelected(r),
|
1864
1864
|
isFocused: e.isFocused && e.focusedKey === r,
|
1865
|
-
isDisabled:
|
1865
|
+
isDisabled: d,
|
1866
1866
|
allowsSelection: K,
|
1867
|
-
hasAction:
|
1867
|
+
hasAction: L
|
1868
1868
|
};
|
1869
1869
|
}
|
1870
|
-
function
|
1870
|
+
function st() {
|
1871
1871
|
let t = window.event;
|
1872
1872
|
return (t == null ? void 0 : t.key) === "Enter";
|
1873
1873
|
}
|
1874
|
-
function
|
1874
|
+
function ot() {
|
1875
1875
|
let t = window.event;
|
1876
1876
|
return (t == null ? void 0 : t.key) === " " || (t == null ? void 0 : t.code) === "Space";
|
1877
1877
|
}
|
1878
|
-
const
|
1879
|
-
function
|
1880
|
-
return typeof e == "string" && (e = e.replace(/\s+/g, "")), `${
|
1878
|
+
const It = /* @__PURE__ */ new WeakMap();
|
1879
|
+
function ge(t, e, r) {
|
1880
|
+
return typeof e == "string" && (e = e.replace(/\s+/g, "")), `${It.get(t)}-${r}-${e}`;
|
1881
1881
|
}
|
1882
|
-
function
|
1882
|
+
function dn(t, e, r) {
|
1883
1883
|
var n;
|
1884
|
-
let { key: i, isDisabled:
|
1885
|
-
selectionManager:
|
1884
|
+
let { key: i, isDisabled: s, shouldSelectOnPressUp: o } = t, { selectionManager: d, selectedKey: f } = e, y = i === f, h = s || e.isDisabled || e.disabledKeys.has(i), { itemProps: w, isPressed: v } = cn({
|
1885
|
+
selectionManager: d,
|
1886
1886
|
key: i,
|
1887
1887
|
ref: r,
|
1888
|
-
isDisabled:
|
1889
|
-
shouldSelectOnPressUp:
|
1888
|
+
isDisabled: h,
|
1889
|
+
shouldSelectOnPressUp: o,
|
1890
1890
|
linkBehavior: "selection"
|
1891
|
-
}),
|
1891
|
+
}), g = ge(e, i, "tab"), k = ge(e, i, "tabpanel"), { tabIndex: T } = w, K = e.collection.getItem(i), M = pr(K == null ? void 0 : K.props, {
|
1892
1892
|
isLink: !!(!(K == null || (n = K.props) === null || n === void 0) && n.href),
|
1893
1893
|
labelable: !0
|
1894
1894
|
});
|
1895
|
-
return delete
|
1896
|
-
tabProps:
|
1897
|
-
id:
|
1898
|
-
"aria-selected":
|
1899
|
-
"aria-disabled":
|
1900
|
-
"aria-controls":
|
1901
|
-
tabIndex:
|
1895
|
+
return delete M.id, {
|
1896
|
+
tabProps: V(M, w, {
|
1897
|
+
id: g,
|
1898
|
+
"aria-selected": y,
|
1899
|
+
"aria-disabled": h || void 0,
|
1900
|
+
"aria-controls": y ? k : void 0,
|
1901
|
+
tabIndex: h ? void 0 : T,
|
1902
1902
|
role: "tab"
|
1903
1903
|
}),
|
1904
|
-
isSelected:
|
1905
|
-
isDisabled:
|
1906
|
-
isPressed:
|
1904
|
+
isSelected: y,
|
1905
|
+
isDisabled: h,
|
1906
|
+
isPressed: v
|
1907
1907
|
};
|
1908
1908
|
}
|
1909
|
-
function
|
1910
|
-
let n =
|
1909
|
+
function un(t, e, r) {
|
1910
|
+
let n = Jr(r) ? void 0 : 0;
|
1911
1911
|
var i;
|
1912
|
-
const
|
1912
|
+
const s = ge(e, (i = t.id) !== null && i !== void 0 ? i : e == null ? void 0 : e.selectedKey, "tabpanel"), o = Kt({
|
1913
1913
|
...t,
|
1914
|
-
id:
|
1915
|
-
"aria-labelledby":
|
1914
|
+
id: s,
|
1915
|
+
"aria-labelledby": ge(e, e == null ? void 0 : e.selectedKey, "tab")
|
1916
1916
|
});
|
1917
1917
|
return {
|
1918
|
-
tabPanelProps:
|
1918
|
+
tabPanelProps: V(o, {
|
1919
1919
|
tabIndex: n,
|
1920
1920
|
role: "tabpanel",
|
1921
1921
|
"aria-describedby": t["aria-describedby"],
|
@@ -1961,35 +1961,35 @@ class fn {
|
|
1961
1961
|
}
|
1962
1962
|
}
|
1963
1963
|
function pn(t, e, r) {
|
1964
|
-
let { orientation: n = "horizontal", keyboardActivation: i = "automatic" } = t, { collection:
|
1965
|
-
|
1966
|
-
|
1964
|
+
let { orientation: n = "horizontal", keyboardActivation: i = "automatic" } = t, { collection: s, selectionManager: o, disabledKeys: d } = e, { direction: f } = Lt(), y = H(() => new fn(s, f, n, d), [
|
1965
|
+
s,
|
1966
|
+
d,
|
1967
1967
|
n,
|
1968
1968
|
f
|
1969
|
-
]), { collectionProps:
|
1969
|
+
]), { collectionProps: h } = an({
|
1970
1970
|
ref: r,
|
1971
|
-
selectionManager:
|
1972
|
-
keyboardDelegate:
|
1971
|
+
selectionManager: o,
|
1972
|
+
keyboardDelegate: y,
|
1973
1973
|
selectOnFocus: i === "automatic",
|
1974
1974
|
disallowEmptySelection: !0,
|
1975
1975
|
scrollRef: r,
|
1976
1976
|
linkBehavior: "selection"
|
1977
|
-
}),
|
1978
|
-
|
1979
|
-
let
|
1977
|
+
}), w = yt();
|
1978
|
+
It.set(e, w);
|
1979
|
+
let v = Kt({
|
1980
1980
|
...t,
|
1981
|
-
id:
|
1981
|
+
id: w
|
1982
1982
|
});
|
1983
1983
|
return {
|
1984
1984
|
tabListProps: {
|
1985
|
-
...
|
1985
|
+
...V(h, v),
|
1986
1986
|
role: "tablist",
|
1987
1987
|
"aria-orientation": n,
|
1988
1988
|
tabIndex: void 0
|
1989
1989
|
}
|
1990
1990
|
};
|
1991
1991
|
}
|
1992
|
-
function
|
1992
|
+
function bn(t, e, r) {
|
1993
1993
|
return e in t ? Object.defineProperty(t, e, {
|
1994
1994
|
value: r,
|
1995
1995
|
enumerable: !0,
|
@@ -2011,122 +2011,122 @@ function ct(t) {
|
|
2011
2011
|
for (var e = 1; e < arguments.length; e++) {
|
2012
2012
|
var r = arguments[e] != null ? arguments[e] : {};
|
2013
2013
|
e % 2 ? at(Object(r), !0).forEach(function(n) {
|
2014
|
-
|
2014
|
+
bn(t, n, r[n]);
|
2015
2015
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : at(Object(r)).forEach(function(n) {
|
2016
2016
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
2017
2017
|
});
|
2018
2018
|
}
|
2019
2019
|
return t;
|
2020
2020
|
}
|
2021
|
-
var
|
2021
|
+
var yn = (t, e, r) => {
|
2022
2022
|
for (var n of Object.keys(t)) {
|
2023
2023
|
var i;
|
2024
2024
|
if (t[n] !== ((i = e[n]) !== null && i !== void 0 ? i : r[n]))
|
2025
2025
|
return !1;
|
2026
2026
|
}
|
2027
2027
|
return !0;
|
2028
|
-
},
|
2028
|
+
}, Be = (t) => (e) => {
|
2029
2029
|
var r = t.defaultClassName, n = ct(ct({}, t.defaultVariants), e);
|
2030
2030
|
for (var i in n) {
|
2031
|
-
var
|
2032
|
-
if (
|
2033
|
-
var
|
2034
|
-
typeof
|
2035
|
-
var f = t.variantClassNames[i][
|
2031
|
+
var s, o = (s = n[i]) !== null && s !== void 0 ? s : t.defaultVariants[i];
|
2032
|
+
if (o != null) {
|
2033
|
+
var d = o;
|
2034
|
+
typeof d == "boolean" && (d = d === !0 ? "true" : "false");
|
2035
|
+
var f = t.variantClassNames[i][d];
|
2036
2036
|
f && (r += " " + f);
|
2037
2037
|
}
|
2038
2038
|
}
|
2039
|
-
for (var [
|
2040
|
-
|
2039
|
+
for (var [y, h] of t.compoundVariants)
|
2040
|
+
yn(y, n, t.defaultVariants) && (r += " " + h);
|
2041
2041
|
return r;
|
2042
|
-
},
|
2043
|
-
function
|
2042
|
+
}, hn = Be({ defaultClassName: "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz1", navigation: "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz2" }, active: { true: "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz3", false: "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz4" }, disabled: { true: "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz5", false: "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz6" } }, defaultVariants: {}, compoundVariants: [[{ context: "container", active: !0 }, "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz7"], [{ context: "container", active: !1 }, "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz8"], [{ context: "container", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz9"], [{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzza"], [{ context: "navigation", active: !1 }, "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzb"], [{ context: "navigation", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzc"], [{ context: "navigation", active: !1, disabled: !0 }, "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzd"]] }), gn = Be({ defaultClassName: "", variantClassNames: { active: { true: "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzze", false: "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzf" }, disabled: { true: "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzg", false: "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzh" }, context: { navigation: "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzi", container: "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzj" } }, defaultVariants: {}, compoundVariants: [[{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzk"]] });
|
2043
|
+
function Ct({
|
2044
2044
|
context: t,
|
2045
2045
|
item: e,
|
2046
2046
|
state: r,
|
2047
2047
|
...n
|
2048
2048
|
}) {
|
2049
|
-
const { key: i } = e,
|
2050
|
-
className:
|
2049
|
+
const { key: i } = e, s = F.useRef(null), { tabProps: o } = dn({ key: i }, r, s), d = r.selectedKey === i, f = r.disabledKeys.has(i), y = Rt(e.rendered, (h) => h.type.displayName === "SpsTag" || se.isWoodlandComponent(h.type) && se.get(h.type).name === "Tag" ? [{
|
2050
|
+
className: dt(h.props.className, gn({ active: d, disabled: f, context: t }))
|
2051
2051
|
}] : [{}]);
|
2052
|
-
return /* @__PURE__ */
|
2052
|
+
return /* @__PURE__ */ F.createElement(
|
2053
2053
|
"div",
|
2054
2054
|
{
|
2055
|
-
...
|
2056
|
-
ref:
|
2057
|
-
className:
|
2055
|
+
...o,
|
2056
|
+
ref: s,
|
2057
|
+
className: hn({ active: d, disabled: f, context: t }),
|
2058
2058
|
...n
|
2059
2059
|
},
|
2060
|
-
|
2060
|
+
y
|
2061
2061
|
);
|
2062
2062
|
}
|
2063
|
-
|
2064
|
-
function
|
2063
|
+
se.set(Ct, { name: "Tab" });
|
2064
|
+
function At({
|
2065
2065
|
context: t,
|
2066
2066
|
"data-testid": e,
|
2067
2067
|
state: r,
|
2068
2068
|
...n
|
2069
2069
|
}) {
|
2070
|
-
const i =
|
2071
|
-
return /* @__PURE__ */
|
2072
|
-
|
2070
|
+
const i = F.useRef(null), { tabPanelProps: s } = un(n, r, i), o = t === "container" ? Ut : "div";
|
2071
|
+
return /* @__PURE__ */ F.createElement(
|
2072
|
+
o,
|
2073
2073
|
{
|
2074
|
-
...
|
2074
|
+
...s,
|
2075
2075
|
ref: i,
|
2076
2076
|
"data-testid": e
|
2077
2077
|
},
|
2078
2078
|
r.selectedItem ? r.selectedItem.props.children : null
|
2079
2079
|
);
|
2080
2080
|
}
|
2081
|
-
|
2082
|
-
var
|
2083
|
-
function
|
2081
|
+
se.set(At, { name: "TabPanel" });
|
2082
|
+
var vn = Be({ defaultClassName: "pkg_sps-woodland_tabs__version_7_19_0__hash_fy26er0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_7_19_0__hash_fy26er1", navigation: "pkg_sps-woodland_tabs__version_7_19_0__hash_fy26er2" } }, defaultVariants: {}, compoundVariants: [] });
|
2083
|
+
function Dt({
|
2084
2084
|
className: t,
|
2085
2085
|
context: e = "navigation",
|
2086
2086
|
"data-testid": r,
|
2087
2087
|
...n
|
2088
2088
|
}) {
|
2089
|
-
const i =
|
2090
|
-
return /* @__PURE__ */
|
2089
|
+
const i = qt(n), s = F.useRef(null), { tabListProps: o } = pn(n, i, s), d = Wt({ "data-testid": r });
|
2090
|
+
return /* @__PURE__ */ F.createElement(F.Fragment, null, /* @__PURE__ */ F.createElement(
|
2091
2091
|
"div",
|
2092
2092
|
{
|
2093
|
-
...
|
2094
|
-
ref:
|
2095
|
-
className:
|
2093
|
+
...o,
|
2094
|
+
ref: s,
|
2095
|
+
className: dt(vn({ context: e }), t),
|
2096
2096
|
"data-testid": r
|
2097
2097
|
},
|
2098
|
-
[...i.collection].map((f) => /* @__PURE__ */
|
2099
|
-
|
2098
|
+
[...i.collection].map((f) => /* @__PURE__ */ F.createElement(
|
2099
|
+
Ct,
|
2100
2100
|
{
|
2101
2101
|
key: f.key,
|
2102
2102
|
item: f,
|
2103
2103
|
state: i,
|
2104
2104
|
context: e,
|
2105
|
-
...
|
2105
|
+
...d(`tab-${String(f.key)}`)
|
2106
2106
|
}
|
2107
2107
|
))
|
2108
|
-
), /* @__PURE__ */
|
2109
|
-
|
2108
|
+
), /* @__PURE__ */ F.createElement(
|
2109
|
+
At,
|
2110
2110
|
{
|
2111
2111
|
key: i.selectedItem ? i.selectedItem.key : null,
|
2112
2112
|
state: i,
|
2113
2113
|
context: e,
|
2114
|
-
...
|
2114
|
+
...d("tab-panel")
|
2115
2115
|
}
|
2116
2116
|
));
|
2117
2117
|
}
|
2118
|
-
|
2118
|
+
se.set(Dt, { name: "Tabs" });
|
2119
2119
|
const $n = {
|
2120
|
-
components: [
|
2120
|
+
components: [Dt],
|
2121
2121
|
examples: {
|
2122
2122
|
basic: {
|
2123
2123
|
label: "Basic Navigation Tabs",
|
2124
|
-
description:
|
2124
|
+
description: Re`
|
2125
2125
|
<p>Navigation tabs</p>
|
2126
2126
|
`,
|
2127
2127
|
examples: {
|
2128
2128
|
basic: {
|
2129
|
-
react:
|
2129
|
+
react: Re`
|
2130
2130
|
import { Item } from "@react-stately/collections";
|
2131
2131
|
import { Box, Icon } from "@sps-woodland/core";
|
2132
2132
|
import { Tabs } from "@sps-woodland/tabs";
|
@@ -2197,5 +2197,5 @@ const $n = {
|
|
2197
2197
|
};
|
2198
2198
|
export {
|
2199
2199
|
Pn as MANIFEST,
|
2200
|
-
|
2200
|
+
Dt as Tabs
|
2201
2201
|
};
|