@sps-woodland/tabs 7.2.1 → 7.2.2

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