@sps-woodland/tabs 8.42.1 → 8.42.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,28 +1,28 @@
1
- import * as R from "react";
2
- import U, { useState as B, useRef as L, useEffect as O, useCallback as Z, useMemo as V, useContext as ce, createContext as Xt } from "react";
3
- import { compareNodeOrder as _e, getFirstItem as Yt, getChildNodes as qt, useCollection as Jt } from "@react-stately/collections";
4
- import { flushSync as Zt } from "react-dom";
5
- import { Metadata as fe, modChildren as Qt, cl as yt, Content as er, useChildTestIdAttrBuilder as tr } from "@sps-woodland/core";
6
- import { code as Je } from "@spscommerce/utils";
7
- class Ze {
1
+ import * as oe from "react";
2
+ import Y, { useState as te, useRef as k, useEffect as V, useReducer as Kn, useCallback as H, useMemo as ae, useContext as ye, createContext as kn } from "react";
3
+ import { compareNodeOrder as Ue, getFirstItem as xn, getChildNodes as _n, useCollection as Ln } from "@react-stately/collections";
4
+ import { flushSync as Ut } from "react-dom";
5
+ import { Metadata as Ke, modChildren as Nn, cl as Wt, Content as Mn, useChildTestIdAttrBuilder as Cn } from "@sps-woodland/core";
6
+ import { code as vt } from "@spscommerce/utils";
7
+ class bt {
8
8
  *[Symbol.iterator]() {
9
9
  yield* this.iterable;
10
10
  }
11
11
  get size() {
12
- return this.keyMap.size;
12
+ return this._size;
13
13
  }
14
14
  getKeys() {
15
15
  return this.keyMap.keys();
16
16
  }
17
17
  getKeyBefore(e) {
18
- let r = this.keyMap.get(e);
19
- var n;
20
- return r && (n = r.prevKey) !== null && n !== void 0 ? n : null;
18
+ let n = this.keyMap.get(e);
19
+ var r;
20
+ return n && (r = n.prevKey) !== null && r !== void 0 ? r : null;
21
21
  }
22
22
  getKeyAfter(e) {
23
- let r = this.keyMap.get(e);
24
- var n;
25
- return r && (n = r.nextKey) !== null && n !== void 0 ? n : null;
23
+ let n = this.keyMap.get(e);
24
+ var r;
25
+ return n && (r = n.nextKey) !== null && r !== void 0 ? r : null;
26
26
  }
27
27
  getFirstKey() {
28
28
  return this.firstKey;
@@ -31,115 +31,116 @@ class Ze {
31
31
  return this.lastKey;
32
32
  }
33
33
  getItem(e) {
34
- var r;
35
- return (r = this.keyMap.get(e)) !== null && r !== void 0 ? r : null;
34
+ var n;
35
+ return (n = this.keyMap.get(e)) !== null && n !== void 0 ? n : null;
36
36
  }
37
37
  at(e) {
38
- const r = [
38
+ const n = [
39
39
  ...this.getKeys()
40
40
  ];
41
- return this.getItem(r[e]);
41
+ return this.getItem(n[e]);
42
42
  }
43
43
  getChildren(e) {
44
- let r = this.keyMap.get(e);
45
- return r?.childNodes || [];
44
+ let n = this.keyMap.get(e);
45
+ return n?.childNodes || [];
46
46
  }
47
47
  constructor(e) {
48
48
  this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = e;
49
- let r = (o) => {
50
- if (this.keyMap.set(o.key, o), o.childNodes && o.type === "section") for (let a of o.childNodes) r(a);
49
+ let n = (c) => {
50
+ if (this.keyMap.set(c.key, c), c.childNodes && c.type === "section") for (let u of c.childNodes) n(u);
51
51
  };
52
- for (let o of e) r(o);
53
- let n = null, i = 0;
54
- for (let [o, a] of this.keyMap)
55
- n ? (n.nextKey = o, a.prevKey = n.key) : (this.firstKey = o, a.prevKey = void 0), a.type === "item" && (a.index = i++), n = a, n.nextKey = void 0;
52
+ for (let c of e) n(c);
53
+ let r = null, i = 0, l = 0;
54
+ for (let [c, u] of this.keyMap)
55
+ r ? (r.nextKey = c, u.prevKey = r.key) : (this.firstKey = c, u.prevKey = void 0), u.type === "item" && (u.index = i++), (u.type === "section" || u.type === "item") && l++, r = u, r.nextKey = void 0;
56
+ this._size = l;
56
57
  var s;
57
- this.lastKey = (s = n?.key) !== null && s !== void 0 ? s : null;
58
+ this.lastKey = (s = r?.key) !== null && s !== void 0 ? s : null;
58
59
  }
59
60
  }
60
- class N extends Set {
61
- constructor(e, r, n) {
62
- super(e), e instanceof N ? (this.anchorKey = r ?? e.anchorKey, this.currentKey = n ?? e.currentKey) : (this.anchorKey = r, this.currentKey = n);
61
+ class re extends Set {
62
+ constructor(e, n, r) {
63
+ super(e), e instanceof re ? (this.anchorKey = n ?? e.anchorKey, this.currentKey = r ?? e.currentKey) : (this.anchorKey = n ?? null, this.currentKey = r ?? null);
63
64
  }
64
65
  }
65
- function gt(t, e, r) {
66
- let [n, i] = B(t || e), s = L(t !== void 0), o = t !== void 0;
67
- O(() => {
68
- let h = s.current;
69
- h !== o && console.warn(`WARN: A component changed from ${h ? "controlled" : "uncontrolled"} to ${o ? "controlled" : "uncontrolled"}.`), s.current = o;
66
+ var We;
67
+ const Dn = typeof document < "u" ? (We = Y.useInsertionEffect) !== null && We !== void 0 ? We : Y.useLayoutEffect : () => {
68
+ };
69
+ function Ht(t, e, n) {
70
+ let [r, i] = te(t || e), l = k(r), s = k(t !== void 0), c = t !== void 0;
71
+ V(() => {
72
+ let b = s.current;
73
+ b !== c && process.env.NODE_ENV !== "production" && console.warn(`WARN: A component changed from ${b ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}.`), s.current = c;
70
74
  }, [
71
- o
75
+ c
72
76
  ]);
73
- let a = o ? t : n, p = Z((h, ...v) => {
74
- let w = ($, ...m) => {
75
- r && (Object.is(a, $) || r($, ...m)), o || (a = $);
76
- };
77
- typeof h == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), i((m, ...M) => {
78
- let k = h(o ? a : m, ...M);
79
- return w(k, ...v), o ? m : k;
80
- })) : (o || i(h), w(h, ...v));
77
+ let u = c ? t : r;
78
+ Dn(() => {
79
+ l.current = u;
80
+ });
81
+ let [, p] = Kn(() => ({}), {}), d = H((b, ...$) => {
82
+ let m = typeof b == "function" ? b(l.current) : b;
83
+ Object.is(l.current, m) || (l.current = m, i(m), p(), n?.(m, ...$));
81
84
  }, [
82
- o,
83
- a,
84
- r
85
+ n
85
86
  ]);
86
87
  return [
87
- a,
88
- p
88
+ u,
89
+ d
89
90
  ];
90
91
  }
91
- function rr(t, e) {
92
+ function In(t, e) {
92
93
  if (t.size !== e.size) return !1;
93
- for (let r of t)
94
- if (!e.has(r)) return !1;
94
+ for (let n of t)
95
+ if (!e.has(n)) return !1;
95
96
  return !0;
96
97
  }
97
- function nr(t) {
98
- let { selectionMode: e = "none", disallowEmptySelection: r, allowDuplicateSelectionEvents: n, selectionBehavior: i = "toggle", disabledBehavior: s = "all" } = t, o = L(!1), [, a] = B(!1), p = L(null), h = L(null), [, v] = B(null), w = V(() => Qe(t.selectedKeys), [
98
+ function Fn(t) {
99
+ let { selectionMode: e = "none", disallowEmptySelection: n = !1, allowDuplicateSelectionEvents: r, selectionBehavior: i = "toggle", disabledBehavior: l = "all" } = t, s = k(!1), [, c] = te(!1), u = k(null), p = k(null), [, d] = te(null), b = ae(() => ht(t.selectedKeys), [
99
100
  t.selectedKeys
100
- ]), $ = V(() => Qe(t.defaultSelectedKeys, new N()), [
101
+ ]), $ = ae(() => ht(t.defaultSelectedKeys, new re()), [
101
102
  t.defaultSelectedKeys
102
- ]), [m, M] = gt(w, $, t.onSelectionChange), k = V(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
103
+ ]), [m, x] = Ht(b, $, t.onSelectionChange), _ = ae(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
103
104
  t.disabledKeys
104
- ]), [P, E] = B(i);
105
- i === "replace" && P === "toggle" && typeof m == "object" && m.size === 0 && E("replace");
106
- let x = L(i);
107
- return O(() => {
108
- i !== x.current && (E(i), x.current = i);
105
+ ]), [D, K] = te(i);
106
+ i === "replace" && D === "toggle" && typeof m == "object" && m.size === 0 && K("replace");
107
+ let T = k(i);
108
+ return V(() => {
109
+ i !== T.current && (K(i), T.current = i);
109
110
  }, [
110
111
  i
111
112
  ]), {
112
113
  selectionMode: e,
113
- disallowEmptySelection: r,
114
- selectionBehavior: P,
115
- setSelectionBehavior: E,
114
+ disallowEmptySelection: n,
115
+ selectionBehavior: D,
116
+ setSelectionBehavior: K,
116
117
  get isFocused() {
117
- return o.current;
118
+ return s.current;
118
119
  },
119
- setFocused(K) {
120
- o.current = K, a(K);
120
+ setFocused(M) {
121
+ s.current = M, c(M);
121
122
  },
122
123
  get focusedKey() {
123
- return p.current;
124
+ return u.current;
124
125
  },
125
126
  get childFocusStrategy() {
126
- return h.current;
127
+ return p.current;
127
128
  },
128
- setFocusedKey(K, D = "first") {
129
- p.current = K, h.current = D, v(K);
129
+ setFocusedKey(M, I = "first") {
130
+ u.current = M, p.current = I, d(M);
130
131
  },
131
132
  selectedKeys: m,
132
- setSelectedKeys(K) {
133
- (n || !rr(K, m)) && M(K);
133
+ setSelectedKeys(M) {
134
+ (r || !In(M, m)) && x(M);
134
135
  },
135
- disabledKeys: k,
136
- disabledBehavior: s
136
+ disabledKeys: _,
137
+ disabledBehavior: l
137
138
  };
138
139
  }
139
- function Qe(t, e) {
140
- return t ? t === "all" ? "all" : new N(t) : e;
140
+ function ht(t, e) {
141
+ return t ? t === "all" ? "all" : new re(t) : e;
141
142
  }
142
- class ir {
143
+ class it {
143
144
  /**
144
145
  * The type of selection that is allowed in the collection.
145
146
  */
@@ -189,8 +190,8 @@ class ir {
189
190
  /**
190
191
  * Sets the focused key.
191
192
  */
192
- setFocusedKey(e, r) {
193
- (e == null || this.collection.getItem(e)) && this.state.setFocusedKey(e, r);
193
+ setFocusedKey(e, n) {
194
+ (e == null || this.collection.getItem(e)) && this.state.setFocusedKey(e, n);
194
195
  }
195
196
  /**
196
197
  * The currently selected keys in the collection.
@@ -209,7 +210,9 @@ class ir {
209
210
  * Returns whether a key is selected.
210
211
  */
211
212
  isSelected(e) {
212
- return this.state.selectionMode === "none" ? !1 : (e = this.getKey(e), this.state.selectedKeys === "all" ? this.canSelectItem(e) : this.state.selectedKeys.has(e));
213
+ if (this.state.selectionMode === "none") return !1;
214
+ let n = this.getKey(e);
215
+ return n == null ? !1 : this.state.selectedKeys === "all" ? this.canSelectItem(n) : this.state.selectedKeys.has(n);
213
216
  }
214
217
  /**
215
218
  * Whether the selection is empty.
@@ -224,24 +227,26 @@ class ir {
224
227
  if (this.isEmpty) return !1;
225
228
  if (this.state.selectedKeys === "all") return !0;
226
229
  if (this._isSelectAll != null) return this._isSelectAll;
227
- let e = this.getSelectAllKeys(), r = this.state.selectedKeys;
228
- return this._isSelectAll = e.every((n) => r.has(n)), this._isSelectAll;
230
+ let e = this.getSelectAllKeys(), n = this.state.selectedKeys;
231
+ return this._isSelectAll = e.every((r) => n.has(r)), this._isSelectAll;
229
232
  }
230
233
  get firstSelectedKey() {
231
234
  let e = null;
232
235
  for (let r of this.state.selectedKeys) {
233
- let n = this.collection.getItem(r);
234
- (!e || n && _e(this.collection, n, e) < 0) && (e = n);
236
+ let i = this.collection.getItem(r);
237
+ (!e || i && Ue(this.collection, i, e) < 0) && (e = i);
235
238
  }
236
- return e?.key;
239
+ var n;
240
+ return (n = e?.key) !== null && n !== void 0 ? n : null;
237
241
  }
238
242
  get lastSelectedKey() {
239
243
  let e = null;
240
244
  for (let r of this.state.selectedKeys) {
241
- let n = this.collection.getItem(r);
242
- (!e || n && _e(this.collection, n, e) > 0) && (e = n);
245
+ let i = this.collection.getItem(r);
246
+ (!e || i && Ue(this.collection, i, e) > 0) && (e = i);
243
247
  }
244
- return e?.key;
248
+ var n;
249
+ return (n = e?.key) !== null && n !== void 0 ? n : null;
245
250
  }
246
251
  get disabledKeys() {
247
252
  return this.state.disabledKeys;
@@ -258,42 +263,43 @@ class ir {
258
263
  this.replaceSelection(e);
259
264
  return;
260
265
  }
261
- e = this.getKey(e);
266
+ let n = this.getKey(e);
267
+ if (n == null) return;
262
268
  let r;
263
- if (this.state.selectedKeys === "all") r = new N([
264
- e
265
- ], e, e);
269
+ if (this.state.selectedKeys === "all") r = new re([
270
+ n
271
+ ], n, n);
266
272
  else {
267
273
  let s = this.state.selectedKeys;
268
- var n;
269
- let o = (n = s.anchorKey) !== null && n !== void 0 ? n : e;
270
- r = new N(s, o, e);
271
274
  var i;
272
- for (let a of this.getKeyRange(o, (i = s.currentKey) !== null && i !== void 0 ? i : e)) r.delete(a);
273
- for (let a of this.getKeyRange(e, o)) this.canSelectItem(a) && r.add(a);
275
+ let c = (i = s.anchorKey) !== null && i !== void 0 ? i : n;
276
+ r = new re(s, c, n);
277
+ var l;
278
+ for (let u of this.getKeyRange(c, (l = s.currentKey) !== null && l !== void 0 ? l : n)) r.delete(u);
279
+ for (let u of this.getKeyRange(n, c)) this.canSelectItem(u) && r.add(u);
274
280
  }
275
281
  this.state.setSelectedKeys(r);
276
282
  }
277
- getKeyRange(e, r) {
278
- let n = this.collection.getItem(e), i = this.collection.getItem(r);
279
- return n && i ? _e(this.collection, n, i) <= 0 ? this.getKeyRangeInternal(e, r) : this.getKeyRangeInternal(r, e) : [];
283
+ getKeyRange(e, n) {
284
+ let r = this.collection.getItem(e), i = this.collection.getItem(n);
285
+ return r && i ? Ue(this.collection, r, i) <= 0 ? this.getKeyRangeInternal(e, n) : this.getKeyRangeInternal(n, e) : [];
280
286
  }
281
- getKeyRangeInternal(e, r) {
282
- var n;
283
- if (!((n = this.layoutDelegate) === null || n === void 0) && n.getKeyRange) return this.layoutDelegate.getKeyRange(e, r);
284
- let i = [], s = e;
285
- for (; s != null; ) {
286
- let o = this.collection.getItem(s);
287
- if ((o && o.type === "item" || o.type === "cell" && this.allowsCellSelection) && i.push(s), s === r) return i;
288
- s = this.collection.getKeyAfter(s);
287
+ getKeyRangeInternal(e, n) {
288
+ var r;
289
+ if (!((r = this.layoutDelegate) === null || r === void 0) && r.getKeyRange) return this.layoutDelegate.getKeyRange(e, n);
290
+ let i = [], l = e;
291
+ for (; l != null; ) {
292
+ let s = this.collection.getItem(l);
293
+ if (s && (s.type === "item" || s.type === "cell" && this.allowsCellSelection) && i.push(l), l === n) return i;
294
+ l = this.collection.getKeyAfter(l);
289
295
  }
290
296
  return [];
291
297
  }
292
298
  getKey(e) {
293
- let r = this.collection.getItem(e);
294
- if (!r || r.type === "cell" && this.allowsCellSelection) return e;
295
- for (; r.type !== "item" && r.parentKey != null; ) r = this.collection.getItem(r.parentKey);
296
- return !r || r.type !== "item" ? null : r.key;
299
+ let n = this.collection.getItem(e);
300
+ if (!n || n.type === "cell" && this.allowsCellSelection) return e;
301
+ for (; n && n.type !== "item" && n.parentKey != null; ) n = this.collection.getItem(n.parentKey);
302
+ return !n || n.type !== "item" ? null : n.key;
297
303
  }
298
304
  /**
299
305
  * Toggles whether the given key is selected.
@@ -304,18 +310,21 @@ class ir {
304
310
  this.replaceSelection(e);
305
311
  return;
306
312
  }
307
- if (e = this.getKey(e), e == null) return;
308
- let r = new N(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
309
- r.has(e) ? r.delete(e) : this.canSelectItem(e) && (r.add(e), r.anchorKey = e, r.currentKey = e), !(this.disallowEmptySelection && r.size === 0) && this.state.setSelectedKeys(r);
313
+ let n = this.getKey(e);
314
+ if (n == null) return;
315
+ let r = new re(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
316
+ r.has(n) ? r.delete(n) : this.canSelectItem(n) && (r.add(n), r.anchorKey = n, r.currentKey = n), !(this.disallowEmptySelection && r.size === 0) && this.state.setSelectedKeys(r);
310
317
  }
311
318
  /**
312
319
  * Replaces the selection with only the given key.
313
320
  */
314
321
  replaceSelection(e) {
315
- if (this.selectionMode === "none" || (e = this.getKey(e), e == null)) return;
316
- let r = this.canSelectItem(e) ? new N([
317
- e
318
- ], e, e) : new N();
322
+ if (this.selectionMode === "none") return;
323
+ let n = this.getKey(e);
324
+ if (n == null) return;
325
+ let r = this.canSelectItem(n) ? new re([
326
+ n
327
+ ], n, n) : new re();
319
328
  this.state.setSelectedKeys(r);
320
329
  }
321
330
  /**
@@ -323,23 +332,28 @@ class ir {
323
332
  */
324
333
  setSelectedKeys(e) {
325
334
  if (this.selectionMode === "none") return;
326
- let r = new N();
327
- for (let n of e)
328
- if (n = this.getKey(n), n != null && (r.add(n), this.selectionMode === "single"))
335
+ let n = new re();
336
+ for (let r of e) {
337
+ let i = this.getKey(r);
338
+ if (i != null && (n.add(i), this.selectionMode === "single"))
329
339
  break;
330
- this.state.setSelectedKeys(r);
340
+ }
341
+ this.state.setSelectedKeys(n);
331
342
  }
332
343
  getSelectAllKeys() {
333
- let e = [], r = (n) => {
334
- for (; n != null; ) {
335
- if (this.canSelectItem(n)) {
336
- let i = this.collection.getItem(n);
337
- i.type === "item" && e.push(n), i.hasChildNodes && (this.allowsCellSelection || i.type !== "item") && r(Yt(qt(i, this.collection)).key);
344
+ let e = [], n = (r) => {
345
+ for (; r != null; ) {
346
+ if (this.canSelectItem(r)) {
347
+ var i;
348
+ let s = this.collection.getItem(r);
349
+ s?.type === "item" && e.push(r);
350
+ var l;
351
+ s?.hasChildNodes && (this.allowsCellSelection || s.type !== "item") && n((l = (i = xn(_n(s, this.collection))) === null || i === void 0 ? void 0 : i.key) !== null && l !== void 0 ? l : null);
338
352
  }
339
- n = this.collection.getKeyAfter(n);
353
+ r = this.collection.getKeyAfter(r);
340
354
  }
341
355
  };
342
- return r(this.collection.getFirstKey()), e;
356
+ return n(this.collection.getFirstKey()), e;
343
357
  }
344
358
  /**
345
359
  * Selects all items in the collection.
@@ -351,7 +365,7 @@ class ir {
351
365
  * Removes all keys from the selection.
352
366
  */
353
367
  clearSelection() {
354
- !this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new N());
368
+ !this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new re());
355
369
  }
356
370
  /**
357
371
  * Toggles between select all and an empty selection.
@@ -359,298 +373,489 @@ class ir {
359
373
  toggleSelectAll() {
360
374
  this.isSelectAll ? this.clearSelection() : this.selectAll();
361
375
  }
362
- select(e, r) {
363
- this.selectionMode !== "none" && (this.selectionMode === "single" ? this.isSelected(e) && !this.disallowEmptySelection ? this.toggleSelection(e) : this.replaceSelection(e) : this.selectionBehavior === "toggle" || r && (r.pointerType === "touch" || r.pointerType === "virtual") ? this.toggleSelection(e) : this.replaceSelection(e));
376
+ select(e, n) {
377
+ this.selectionMode !== "none" && (this.selectionMode === "single" ? this.isSelected(e) && !this.disallowEmptySelection ? this.toggleSelection(e) : this.replaceSelection(e) : this.selectionBehavior === "toggle" || n && (n.pointerType === "touch" || n.pointerType === "virtual") ? this.toggleSelection(e) : this.replaceSelection(e));
364
378
  }
365
379
  /**
366
380
  * Returns whether the current selection is equal to the given selection.
367
381
  */
368
382
  isSelectionEqual(e) {
369
383
  if (e === this.state.selectedKeys) return !0;
370
- let r = this.selectedKeys;
371
- if (e.size !== r.size) return !1;
372
- for (let n of e)
373
- if (!r.has(n)) return !1;
374
- for (let n of r)
375
- if (!e.has(n)) return !1;
384
+ let n = this.selectedKeys;
385
+ if (e.size !== n.size) return !1;
386
+ for (let r of e)
387
+ if (!n.has(r)) return !1;
388
+ for (let r of n)
389
+ if (!e.has(r)) return !1;
376
390
  return !0;
377
391
  }
378
392
  canSelectItem(e) {
379
- var r;
393
+ var n;
380
394
  if (this.state.selectionMode === "none" || this.state.disabledKeys.has(e)) return !1;
381
- let n = this.collection.getItem(e);
382
- return !(!n || !(n == null || (r = n.props) === null || r === void 0) && r.isDisabled || n.type === "cell" && !this.allowsCellSelection);
395
+ let r = this.collection.getItem(e);
396
+ return !(!r || !(r == null || (n = r.props) === null || n === void 0) && n.isDisabled || r.type === "cell" && !this.allowsCellSelection);
383
397
  }
384
398
  isDisabled(e) {
385
- var r, n;
386
- return this.state.disabledBehavior === "all" && (this.state.disabledKeys.has(e) || !!(!((n = this.collection.getItem(e)) === null || n === void 0 || (r = n.props) === null || r === void 0) && r.isDisabled));
399
+ var n, r;
400
+ return this.state.disabledBehavior === "all" && (this.state.disabledKeys.has(e) || !!(!((r = this.collection.getItem(e)) === null || r === void 0 || (n = r.props) === null || n === void 0) && n.isDisabled));
387
401
  }
388
402
  isLink(e) {
389
- var r, n;
390
- return !!(!((n = this.collection.getItem(e)) === null || n === void 0 || (r = n.props) === null || r === void 0) && r.href);
403
+ var n, r;
404
+ return !!(!((r = this.collection.getItem(e)) === null || r === void 0 || (n = r.props) === null || n === void 0) && n.href);
391
405
  }
392
406
  getItemProps(e) {
393
- var r;
394
- return (r = this.collection.getItem(e)) === null || r === void 0 ? void 0 : r.props;
407
+ var n;
408
+ return (n = this.collection.getItem(e)) === null || n === void 0 ? void 0 : n.props;
409
+ }
410
+ withCollection(e) {
411
+ return new it(e, this.state, {
412
+ allowsCellSelection: this.allowsCellSelection,
413
+ layoutDelegate: this.layoutDelegate || void 0
414
+ });
395
415
  }
396
- constructor(e, r, n) {
397
- this.collection = e, this.state = r;
416
+ constructor(e, n, r) {
417
+ this.collection = e, this.state = n;
398
418
  var i;
399
- this.allowsCellSelection = (i = n?.allowsCellSelection) !== null && i !== void 0 ? i : !1, this._isSelectAll = null, this.layoutDelegate = n?.layoutDelegate || null;
419
+ this.allowsCellSelection = (i = r?.allowsCellSelection) !== null && i !== void 0 ? i : !1, this._isSelectAll = null, this.layoutDelegate = r?.layoutDelegate || null;
400
420
  }
401
421
  }
402
- function lr(t) {
403
- let { filter: e, layoutDelegate: r } = t, n = nr(t), i = V(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
422
+ function An(t) {
423
+ let { filter: e, layoutDelegate: n } = t, r = Fn(t), i = ae(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
404
424
  t.disabledKeys
405
- ]), s = Z((v) => e ? new Ze(e(v)) : new Ze(v), [
425
+ ]), l = H((p) => e ? new bt(e(p)) : new bt(p), [
406
426
  e
407
- ]), o = V(() => ({
427
+ ]), s = ae(() => ({
408
428
  suppressTextValueWarning: t.suppressTextValueWarning
409
429
  }), [
410
430
  t.suppressTextValueWarning
411
- ]), a = Jt(t, s, o), p = V(() => new ir(a, n, {
412
- layoutDelegate: r
431
+ ]), c = Ln(t, l, s), u = ae(() => new it(c, r, {
432
+ layoutDelegate: n
413
433
  }), [
414
- a,
415
- n,
416
- r
434
+ c,
435
+ r,
436
+ n
417
437
  ]);
418
- const h = L(null);
419
- return O(() => {
420
- if (n.focusedKey != null && !a.getItem(n.focusedKey) && h.current) {
421
- const E = h.current.getItem(n.focusedKey), x = [
422
- ...h.current.getKeys()
423
- ].map((l) => {
424
- const y = h.current.getItem(l);
425
- return y?.type === "item" ? y : null;
426
- }).filter((l) => l !== null), K = [
427
- ...a.getKeys()
428
- ].map((l) => {
429
- const y = a.getItem(l);
430
- return y?.type === "item" ? y : null;
431
- }).filter((l) => l !== null);
432
- var v, w;
433
- const D = ((v = x?.length) !== null && v !== void 0 ? v : 0) - ((w = K?.length) !== null && w !== void 0 ? w : 0);
434
- var $, m, M;
435
- let _ = Math.min(D > 1 ? Math.max((($ = E?.index) !== null && $ !== void 0 ? $ : 0) - D + 1, 0) : (m = E?.index) !== null && m !== void 0 ? m : 0, ((M = K?.length) !== null && M !== void 0 ? M : 0) - 1), C = null, F = !1;
436
- for (; _ >= 0; ) {
437
- if (!p.isDisabled(K[_].key)) {
438
- C = K[_];
438
+ return On(c, u), {
439
+ collection: c,
440
+ disabledKeys: i,
441
+ selectionManager: u
442
+ };
443
+ }
444
+ function On(t, e) {
445
+ const n = k(null);
446
+ V(() => {
447
+ if (e.focusedKey != null && !t.getItem(e.focusedKey) && n.current) {
448
+ const d = n.current.getItem(e.focusedKey), b = [
449
+ ...n.current.getKeys()
450
+ ].map((K) => {
451
+ const T = n.current.getItem(K);
452
+ return T?.type === "item" ? T : null;
453
+ }).filter((K) => K !== null), $ = [
454
+ ...t.getKeys()
455
+ ].map((K) => {
456
+ const T = t.getItem(K);
457
+ return T?.type === "item" ? T : null;
458
+ }).filter((K) => K !== null);
459
+ var r, i;
460
+ const m = ((r = b?.length) !== null && r !== void 0 ? r : 0) - ((i = $?.length) !== null && i !== void 0 ? i : 0);
461
+ var l, s, c;
462
+ let x = Math.min(m > 1 ? Math.max(((l = d?.index) !== null && l !== void 0 ? l : 0) - m + 1, 0) : (s = d?.index) !== null && s !== void 0 ? s : 0, ((c = $?.length) !== null && c !== void 0 ? c : 0) - 1), _ = null, D = !1;
463
+ for (; x >= 0; ) {
464
+ if (!e.isDisabled($[x].key)) {
465
+ _ = $[x];
439
466
  break;
440
467
  }
441
- if (_ < K.length - 1 && !F) _++;
468
+ if (x < $.length - 1 && !D) x++;
442
469
  else {
443
- F = !0;
444
- var k, P;
445
- _ > ((k = E?.index) !== null && k !== void 0 ? k : 0) && (_ = (P = E?.index) !== null && P !== void 0 ? P : 0), _--;
470
+ D = !0;
471
+ var u, p;
472
+ x > ((u = d?.index) !== null && u !== void 0 ? u : 0) && (x = (p = d?.index) !== null && p !== void 0 ? p : 0), x--;
446
473
  }
447
474
  }
448
- n.setFocusedKey(C ? C.key : null);
475
+ e.setFocusedKey(_ ? _.key : null);
449
476
  }
450
- h.current = a;
477
+ n.current = t;
451
478
  }, [
452
- a,
453
- p,
454
- n,
455
- n.focusedKey
456
- ]), {
457
- collection: a,
458
- disabledKeys: i,
459
- selectionManager: p
460
- };
479
+ t,
480
+ e
481
+ ]);
461
482
  }
462
- function or(t) {
483
+ function Rn(t) {
463
484
  var e;
464
- let [r, n] = gt(t.selectedKey, (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : null, t.onSelectionChange), i = V(() => r != null ? [
465
- r
485
+ let [n, r] = Ht(t.selectedKey, (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : null, t.onSelectionChange), i = ae(() => n != null ? [
486
+ n
466
487
  ] : [], [
467
- r
468
- ]), { collection: s, disabledKeys: o, selectionManager: a } = lr({
488
+ n
489
+ ]), { collection: l, disabledKeys: s, selectionManager: c } = An({
469
490
  ...t,
470
491
  selectionMode: "single",
471
492
  disallowEmptySelection: !0,
472
493
  allowDuplicateSelectionEvents: !0,
473
494
  selectedKeys: i,
474
- onSelectionChange: (h) => {
475
- if (h === "all") return;
476
- var v;
477
- let w = (v = h.values().next().value) !== null && v !== void 0 ? v : null;
478
- w === r && t.onSelectionChange && t.onSelectionChange(w), n(w);
495
+ onSelectionChange: (p) => {
496
+ if (p === "all") return;
497
+ var d;
498
+ let b = (d = p.values().next().value) !== null && d !== void 0 ? d : null;
499
+ b === n && t.onSelectionChange && t.onSelectionChange(b), r(b);
479
500
  }
480
- }), p = r != null ? s.getItem(r) : null;
501
+ }), u = n != null ? l.getItem(n) : null;
481
502
  return {
482
- collection: s,
483
- disabledKeys: o,
484
- selectionManager: a,
485
- selectedKey: r,
486
- setSelectedKey: n,
487
- selectedItem: p
503
+ collection: l,
504
+ disabledKeys: s,
505
+ selectionManager: c,
506
+ selectedKey: n,
507
+ setSelectedKey: r,
508
+ selectedItem: u
488
509
  };
489
510
  }
490
- function sr(t) {
491
- var e;
492
- let r = or({
511
+ function zn(t) {
512
+ var e, n;
513
+ let r = Rn({
493
514
  ...t,
515
+ onSelectionChange: t.onSelectionChange ? (u) => {
516
+ var p;
517
+ u != null && ((p = t.onSelectionChange) === null || p === void 0 || p.call(t, u));
518
+ } : void 0,
494
519
  suppressTextValueWarning: !0,
495
- defaultSelectedKey: (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : et(t.collection, t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set())
496
- }), { selectionManager: n, collection: i, selectedKey: s } = r, o = L(s);
497
- return O(() => {
498
- let a = s;
499
- (n.isEmpty || !i.getItem(a)) && (a = et(i, r.disabledKeys), a != null && n.setSelectedKeys([
500
- a
501
- ])), (a != null && n.focusedKey == null || !n.isFocused && a !== o.current) && n.setFocusedKey(a), o.current = a;
520
+ defaultSelectedKey: (n = (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : yt(t.collection, t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set())) !== null && n !== void 0 ? n : void 0
521
+ }), { selectionManager: i, collection: l, selectedKey: s } = r, c = k(s);
522
+ return V(() => {
523
+ let u = s;
524
+ t.selectedKey == null && (i.isEmpty || u == null || !l.getItem(u)) && (u = yt(l, r.disabledKeys), u != null && i.setSelectedKeys([
525
+ u
526
+ ])), (u != null && i.focusedKey == null || !i.isFocused && u !== c.current) && i.setFocusedKey(u), c.current = u;
502
527
  }), {
503
528
  ...r,
504
529
  isDisabled: t.isDisabled || !1
505
530
  };
506
531
  }
507
- function et(t, e) {
508
- let r = null;
532
+ function yt(t, e) {
533
+ let n = null;
509
534
  if (t) {
510
- var n, i, s, o;
511
- for (r = t.getFirstKey(); (e.has(r) || !((i = t.getItem(r)) === null || i === void 0 || (n = i.props) === null || n === void 0) && n.isDisabled) && r !== t.getLastKey(); ) r = t.getKeyAfter(r);
512
- (e.has(r) || !((o = t.getItem(r)) === null || o === void 0 || (s = o.props) === null || s === void 0) && s.isDisabled) && r === t.getLastKey() && (r = t.getFirstKey());
535
+ var r, i, l, s;
536
+ for (n = t.getFirstKey(); n != null && (e.has(n) || !((i = t.getItem(n)) === null || i === void 0 || (r = i.props) === null || r === void 0) && r.isDisabled) && n !== t.getLastKey(); ) n = t.getKeyAfter(n);
537
+ n != null && (e.has(n) || !((s = t.getItem(n)) === null || s === void 0 || (l = s.props) === null || l === void 0) && l.isDisabled) && n === t.getLastKey() && (n = t.getFirstKey());
513
538
  }
514
- return r;
539
+ return n;
515
540
  }
516
- const $t = /* @__PURE__ */ new WeakMap();
517
- function me(t, e, r) {
518
- return t ? (typeof e == "string" && (e = e.replace(/\s+/g, "")), `${$t.get(t)}-${r}-${e}`) : "";
541
+ const Vt = /* @__PURE__ */ new WeakMap();
542
+ function Ce(t, e, n) {
543
+ if (!t)
544
+ return "";
545
+ typeof e == "string" && (e = e.replace(/\s+/g, ""));
546
+ let r = Vt.get(t);
547
+ return process.env.NODE_ENV !== "production" && !r && console.error("There is no tab id, please check if you have rendered the tab panel before the tab list."), `${r}-${n}-${e}`;
519
548
  }
520
- const pe = typeof document < "u" ? U.useLayoutEffect : () => {
521
- };
522
- function le(t) {
523
- const e = L(null);
524
- return pe(() => {
525
- e.current = t;
526
- }, [
527
- t
528
- ]), Z((...r) => {
529
- const n = e.current;
530
- return n?.(...r);
531
- }, []);
532
- }
533
- const Ke = {
549
+ const le = typeof document < "u" ? Y.useLayoutEffect : () => {
550
+ }, De = {
534
551
  prefix: String(Math.round(Math.random() * 1e10)),
535
552
  current: 0
536
- }, mt = /* @__PURE__ */ U.createContext(Ke), ar = /* @__PURE__ */ U.createContext(!1);
537
- let cr = !!(typeof window < "u" && window.document && window.document.createElement), Le = /* @__PURE__ */ new WeakMap();
538
- function ur(t = !1) {
539
- let e = ce(mt), r = L(null);
540
- if (r.current === null && !t) {
541
- var n, i;
542
- let s = (i = U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || i === void 0 || (n = i.ReactCurrentOwner) === null || n === void 0 ? void 0 : n.current;
543
- if (s) {
544
- let o = Le.get(s);
545
- o == null ? Le.set(s, {
553
+ }, jt = /* @__PURE__ */ Y.createContext(De), Bn = /* @__PURE__ */ Y.createContext(!1);
554
+ let Un = !!(typeof window < "u" && window.document && window.document.createElement), He = /* @__PURE__ */ new WeakMap();
555
+ function Wn(t = !1) {
556
+ let e = ye(jt), n = k(null);
557
+ if (n.current === null && !t) {
558
+ var r, i;
559
+ let l = (i = Y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || i === void 0 || (r = i.ReactCurrentOwner) === null || r === void 0 ? void 0 : r.current;
560
+ if (l) {
561
+ let s = He.get(l);
562
+ s == null ? He.set(l, {
546
563
  id: e.current,
547
- state: s.memoizedState
548
- }) : s.memoizedState !== o.state && (e.current = o.id, Le.delete(s));
564
+ state: l.memoizedState
565
+ }) : l.memoizedState !== s.state && (e.current = s.id, He.delete(l));
549
566
  }
550
- r.current = ++e.current;
567
+ n.current = ++e.current;
551
568
  }
552
- return r.current;
569
+ return n.current;
553
570
  }
554
- function dr(t) {
555
- let e = ce(mt);
556
- e === Ke && !cr && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
557
- let r = ur(!!t), n = e === Ke && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${e.prefix}`;
558
- return t || `${n}-${r}`;
571
+ function Hn(t) {
572
+ let e = ye(jt);
573
+ e === De && !Un && process.env.NODE_ENV !== "production" && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
574
+ let n = Wn(!!t), r = e === De && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${e.prefix}`;
575
+ return t || `${r}-${n}`;
559
576
  }
560
- function fr(t) {
561
- let e = U.useId(), [r] = B(Kt()), n = r || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${Ke.prefix}`;
562
- return t || `${n}-${e}`;
577
+ function Vn(t) {
578
+ let e = Y.useId(), [n] = te(Gt()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${De.prefix}`;
579
+ return t || `${r}-${e}`;
563
580
  }
564
- const pr = typeof U.useId == "function" ? fr : dr;
565
- function vr() {
581
+ const jn = typeof Y.useId == "function" ? Vn : Hn;
582
+ function Gn() {
566
583
  return !1;
567
584
  }
568
- function br() {
585
+ function Yn() {
569
586
  return !0;
570
587
  }
571
- function hr(t) {
588
+ function Xn(t) {
572
589
  return () => {
573
590
  };
574
591
  }
575
- function Kt() {
576
- return typeof U.useSyncExternalStore == "function" ? U.useSyncExternalStore(hr, vr, br) : ce(ar);
577
- }
578
- let yr = !!(typeof window < "u" && window.document && window.document.createElement), Y = /* @__PURE__ */ new Map();
579
- function St(t) {
580
- let [e, r] = B(t), n = L(null), i = pr(e), s = Z((o) => {
581
- n.current = o;
582
- }, []);
583
- return yr && (Y.has(i) && !Y.get(i).includes(s) ? Y.set(i, [
584
- ...Y.get(i),
585
- s
586
- ]) : Y.set(i, [
587
- s
588
- ])), pe(() => {
589
- let o = i;
592
+ function Gt() {
593
+ return typeof Y.useSyncExternalStore == "function" ? Y.useSyncExternalStore(Xn, Gn, Yn) : ye(Bn);
594
+ }
595
+ let qn = !!(typeof window < "u" && window.document && window.document.createElement), me = /* @__PURE__ */ new Map(), Te;
596
+ typeof FinalizationRegistry < "u" && (Te = new FinalizationRegistry((t) => {
597
+ me.delete(t);
598
+ }));
599
+ function Oe(t) {
600
+ let [e, n] = te(t), r = k(null), i = jn(e), l = k(null);
601
+ if (Te && Te.register(l, i), qn) {
602
+ const s = me.get(i);
603
+ s && !s.includes(r) ? s.push(r) : me.set(i, [
604
+ r
605
+ ]);
606
+ }
607
+ return le(() => {
608
+ let s = i;
590
609
  return () => {
591
- Y.delete(o);
610
+ Te && Te.unregister(l), me.delete(s);
592
611
  };
593
612
  }, [
594
613
  i
595
- ]), O(() => {
596
- let o = n.current;
597
- o && (n.current = null, r(o));
614
+ ]), V(() => {
615
+ let s = r.current;
616
+ return s && n(s), () => {
617
+ s && (r.current = null);
618
+ };
598
619
  }), i;
599
620
  }
600
- function gr(t, e) {
621
+ function Jn(t, e) {
601
622
  if (t === e) return t;
602
- let r = Y.get(t);
603
- if (r)
604
- return r.forEach((i) => i(e)), e;
605
- let n = Y.get(e);
606
- return n ? (n.forEach((i) => i(t)), t) : e;
623
+ let n = me.get(t);
624
+ if (n)
625
+ return n.forEach((i) => i.current = e), e;
626
+ let r = me.get(e);
627
+ return r ? (r.forEach((i) => i.current = t), t) : e;
607
628
  }
608
- function Tt(...t) {
629
+ function ot(...t) {
609
630
  return (...e) => {
610
- for (let r of t) typeof r == "function" && r(...e);
631
+ for (let n of t) typeof n == "function" && n(...e);
611
632
  };
612
633
  }
613
- const A = (t) => {
634
+ const R = (t) => {
614
635
  var e;
615
636
  return (e = t?.ownerDocument) !== null && e !== void 0 ? e : document;
616
- }, Q = (t) => t && "window" in t && t.window === t ? t : A(t).defaultView || window;
617
- function wt(t) {
618
- var e, r, n = "";
619
- if (typeof t == "string" || typeof t == "number") n += t;
637
+ }, ie = (t) => t && "window" in t && t.window === t ? t : R(t).defaultView || window;
638
+ function Zn(t) {
639
+ return t !== null && typeof t == "object" && "nodeType" in t && typeof t.nodeType == "number";
640
+ }
641
+ function Qn(t) {
642
+ return Zn(t) && t.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in t;
643
+ }
644
+ let er = !1;
645
+ function Re() {
646
+ return er;
647
+ }
648
+ function P(t, e) {
649
+ if (!Re()) return e && t ? t.contains(e) : !1;
650
+ if (!t || !e) return !1;
651
+ let n = e;
652
+ for (; n !== null; ) {
653
+ if (n === t) return !0;
654
+ n.tagName === "SLOT" && n.assignedSlot ? n = n.assignedSlot.parentNode : Qn(n) ? n = n.host : n = n.parentNode;
655
+ }
656
+ return !1;
657
+ }
658
+ const se = (t = document) => {
659
+ var e;
660
+ if (!Re()) return t.activeElement;
661
+ let n = t.activeElement;
662
+ for (; n && "shadowRoot" in n && (!((e = n.shadowRoot) === null || e === void 0) && e.activeElement); ) n = n.shadowRoot.activeElement;
663
+ return n;
664
+ };
665
+ function E(t) {
666
+ if (Re() && t.target instanceof Element && t.target.shadowRoot) {
667
+ var e, n;
668
+ if ("composedPath" in t) return (e = t.composedPath()[0]) !== null && e !== void 0 ? e : null;
669
+ if ("composedPath" in t.nativeEvent) return (n = t.nativeEvent.composedPath()[0]) !== null && n !== void 0 ? n : null;
670
+ }
671
+ return t.target;
672
+ }
673
+ function gt(t) {
674
+ if (!t) return !1;
675
+ let e = t.getRootNode(), n = ie(t);
676
+ if (!(e instanceof n.Document || e instanceof n.ShadowRoot)) return !1;
677
+ let r = e.activeElement;
678
+ return r != null && t.contains(r);
679
+ }
680
+ class tr {
681
+ get currentNode() {
682
+ return this._currentNode;
683
+ }
684
+ set currentNode(e) {
685
+ if (!P(this.root, e)) throw new Error("Cannot set currentNode to a node that is not contained by the root node.");
686
+ const n = [];
687
+ let r = e, i = e;
688
+ for (this._currentNode = e; r && r !== this.root; ) if (r.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
689
+ const s = r, c = this._doc.createTreeWalker(s, this.whatToShow, {
690
+ acceptNode: this._acceptNode
691
+ });
692
+ n.push(c), c.currentNode = i, this._currentSetFor.add(c), r = i = s.host;
693
+ } else r = r.parentNode;
694
+ const l = this._doc.createTreeWalker(this.root, this.whatToShow, {
695
+ acceptNode: this._acceptNode
696
+ });
697
+ n.push(l), l.currentNode = i, this._currentSetFor.add(l), this._walkerStack = n;
698
+ }
699
+ get doc() {
700
+ return this._doc;
701
+ }
702
+ firstChild() {
703
+ let e = this.currentNode, n = this.nextNode();
704
+ return P(e, n) ? (n && (this.currentNode = n), n) : (this.currentNode = e, null);
705
+ }
706
+ lastChild() {
707
+ let n = this._walkerStack[0].lastChild();
708
+ return n && (this.currentNode = n), n;
709
+ }
710
+ nextNode() {
711
+ const e = this._walkerStack[0].nextNode();
712
+ if (e) {
713
+ if (e.shadowRoot) {
714
+ var n;
715
+ let i;
716
+ if (typeof this.filter == "function" ? i = this.filter(e) : !((n = this.filter) === null || n === void 0) && n.acceptNode && (i = this.filter.acceptNode(e)), i === NodeFilter.FILTER_ACCEPT)
717
+ return this.currentNode = e, e;
718
+ let l = this.nextNode();
719
+ return l && (this.currentNode = l), l;
720
+ }
721
+ return e && (this.currentNode = e), e;
722
+ } else if (this._walkerStack.length > 1) {
723
+ this._walkerStack.shift();
724
+ let r = this.nextNode();
725
+ return r && (this.currentNode = r), r;
726
+ } else return null;
727
+ }
728
+ previousNode() {
729
+ const e = this._walkerStack[0];
730
+ if (e.currentNode === e.root) {
731
+ if (this._currentSetFor.has(e))
732
+ if (this._currentSetFor.delete(e), this._walkerStack.length > 1) {
733
+ this._walkerStack.shift();
734
+ let i = this.previousNode();
735
+ return i && (this.currentNode = i), i;
736
+ } else return null;
737
+ return null;
738
+ }
739
+ const n = e.previousNode();
740
+ if (n) {
741
+ if (n.shadowRoot) {
742
+ var r;
743
+ let l;
744
+ if (typeof this.filter == "function" ? l = this.filter(n) : !((r = this.filter) === null || r === void 0) && r.acceptNode && (l = this.filter.acceptNode(n)), l === NodeFilter.FILTER_ACCEPT)
745
+ return n && (this.currentNode = n), n;
746
+ let s = this.lastChild();
747
+ return s && (this.currentNode = s), s;
748
+ }
749
+ return n && (this.currentNode = n), n;
750
+ } else if (this._walkerStack.length > 1) {
751
+ this._walkerStack.shift();
752
+ let i = this.previousNode();
753
+ return i && (this.currentNode = i), i;
754
+ } else return null;
755
+ }
756
+ /**
757
+ * @deprecated
758
+ */
759
+ nextSibling() {
760
+ return null;
761
+ }
762
+ /**
763
+ * @deprecated
764
+ */
765
+ previousSibling() {
766
+ return null;
767
+ }
768
+ /**
769
+ * @deprecated
770
+ */
771
+ parentNode() {
772
+ return null;
773
+ }
774
+ constructor(e, n, r, i) {
775
+ this._walkerStack = [], this._currentSetFor = /* @__PURE__ */ new Set(), this._acceptNode = (s) => {
776
+ if (s.nodeType === Node.ELEMENT_NODE) {
777
+ const u = s.shadowRoot;
778
+ if (u) {
779
+ const p = this._doc.createTreeWalker(u, this.whatToShow, {
780
+ acceptNode: this._acceptNode
781
+ });
782
+ return this._walkerStack.unshift(p), NodeFilter.FILTER_ACCEPT;
783
+ } else {
784
+ var c;
785
+ if (typeof this.filter == "function") return this.filter(s);
786
+ if (!((c = this.filter) === null || c === void 0) && c.acceptNode) return this.filter.acceptNode(s);
787
+ if (this.filter === null) return NodeFilter.FILTER_ACCEPT;
788
+ }
789
+ }
790
+ return NodeFilter.FILTER_SKIP;
791
+ }, this._doc = e, this.root = n, this.filter = i ?? null, this.whatToShow = r ?? NodeFilter.SHOW_ALL, this._currentNode = n, this._walkerStack.unshift(e.createTreeWalker(n, r, this._acceptNode));
792
+ const l = n.shadowRoot;
793
+ if (l) {
794
+ const s = this._doc.createTreeWalker(l, this.whatToShow, {
795
+ acceptNode: this._acceptNode
796
+ });
797
+ this._walkerStack.unshift(s);
798
+ }
799
+ }
800
+ }
801
+ function nr(t, e, n, r) {
802
+ return Re() ? new tr(t, e, n, r) : t.createTreeWalker(e, n, r);
803
+ }
804
+ function rr(...t) {
805
+ return t.length === 1 && t[0] ? t[0] : (e) => {
806
+ let n = !1;
807
+ const r = t.map((i) => {
808
+ const l = $t(i, e);
809
+ return n || (n = typeof l == "function"), l;
810
+ });
811
+ if (n) return () => {
812
+ r.forEach((i, l) => {
813
+ typeof i == "function" ? i() : $t(t[l], null);
814
+ });
815
+ };
816
+ };
817
+ }
818
+ function $t(t, e) {
819
+ if (typeof t == "function") return t(e);
820
+ t != null && (t.current = e);
821
+ }
822
+ function Yt(t) {
823
+ var e, n, r = "";
824
+ if (typeof t == "string" || typeof t == "number") r += t;
620
825
  else if (typeof t == "object") if (Array.isArray(t)) {
621
826
  var i = t.length;
622
- for (e = 0; e < i; e++) t[e] && (r = wt(t[e])) && (n && (n += " "), n += r);
623
- } else for (r in t) t[r] && (n && (n += " "), n += r);
624
- return n;
827
+ for (e = 0; e < i; e++) t[e] && (n = Yt(t[e])) && (r && (r += " "), r += n);
828
+ } else for (n in t) t[n] && (r && (r += " "), r += n);
829
+ return r;
625
830
  }
626
- function $r() {
627
- for (var t, e, r = 0, n = "", i = arguments.length; r < i; r++) (t = arguments[r]) && (e = wt(t)) && (n && (n += " "), n += e);
628
- return n;
831
+ function ir() {
832
+ for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = Yt(t)) && (r && (r += " "), r += e);
833
+ return r;
629
834
  }
630
- function q(...t) {
835
+ function ne(...t) {
631
836
  let e = {
632
837
  ...t[0]
633
838
  };
634
- for (let r = 1; r < t.length; r++) {
635
- let n = t[r];
636
- for (let i in n) {
637
- let s = e[i], o = n[i];
638
- typeof s == "function" && typeof o == "function" && // This is a lot faster than a regex.
839
+ for (let n = 1; n < t.length; n++) {
840
+ let r = t[n];
841
+ for (let i in r) {
842
+ let l = e[i], s = r[i];
843
+ typeof l == "function" && typeof s == "function" && // This is a lot faster than a regex.
639
844
  i[0] === "o" && i[1] === "n" && i.charCodeAt(2) >= /* 'A' */
640
845
  65 && i.charCodeAt(2) <= /* 'Z' */
641
- 90 ? e[i] = Tt(s, o) : (i === "className" || i === "UNSAFE_className") && typeof s == "string" && typeof o == "string" ? e[i] = $r(s, o) : i === "id" && s && o ? e.id = gr(s, o) : e[i] = o !== void 0 ? o : s;
846
+ 90 ? e[i] = ot(l, s) : (i === "className" || i === "UNSAFE_className") && typeof l == "string" && typeof s == "string" ? e[i] = ir(l, s) : i === "id" && l && s ? e.id = Jn(l, s) : i === "ref" && l && s ? e.ref = rr(l, s) : e[i] = s !== void 0 ? s : l;
642
847
  }
643
848
  }
644
849
  return e;
645
850
  }
646
- const mr = /* @__PURE__ */ new Set([
851
+ const or = /* @__PURE__ */ new Set([
647
852
  "id"
648
- ]), Kr = /* @__PURE__ */ new Set([
853
+ ]), lr = /* @__PURE__ */ new Set([
649
854
  "aria-label",
650
855
  "aria-labelledby",
651
856
  "aria-describedby",
652
857
  "aria-details"
653
- ]), Sr = /* @__PURE__ */ new Set([
858
+ ]), sr = /* @__PURE__ */ new Set([
654
859
  "href",
655
860
  "hrefLang",
656
861
  "target",
@@ -658,130 +863,175 @@ const mr = /* @__PURE__ */ new Set([
658
863
  "download",
659
864
  "ping",
660
865
  "referrerPolicy"
661
- ]), Tr = /^(data-.*)$/;
662
- function wr(t, e = {}) {
663
- let { labelable: r, isLink: n, propNames: i } = e, s = {};
664
- for (const o in t) Object.prototype.hasOwnProperty.call(t, o) && (mr.has(o) || r && Kr.has(o) || n && Sr.has(o) || i?.has(o) || Tr.test(o)) && (s[o] = t[o]);
665
- return s;
666
- }
667
- function j(t) {
668
- if (Pr()) t.focus({
866
+ ]), ar = /* @__PURE__ */ new Set([
867
+ "dir",
868
+ "lang",
869
+ "hidden",
870
+ "inert",
871
+ "translate"
872
+ ]), mt = /* @__PURE__ */ new Set([
873
+ "onClick",
874
+ "onAuxClick",
875
+ "onContextMenu",
876
+ "onDoubleClick",
877
+ "onMouseDown",
878
+ "onMouseEnter",
879
+ "onMouseLeave",
880
+ "onMouseMove",
881
+ "onMouseOut",
882
+ "onMouseOver",
883
+ "onMouseUp",
884
+ "onTouchCancel",
885
+ "onTouchEnd",
886
+ "onTouchMove",
887
+ "onTouchStart",
888
+ "onPointerDown",
889
+ "onPointerMove",
890
+ "onPointerUp",
891
+ "onPointerCancel",
892
+ "onPointerEnter",
893
+ "onPointerLeave",
894
+ "onPointerOver",
895
+ "onPointerOut",
896
+ "onGotPointerCapture",
897
+ "onLostPointerCapture",
898
+ "onScroll",
899
+ "onWheel",
900
+ "onAnimationStart",
901
+ "onAnimationEnd",
902
+ "onAnimationIteration",
903
+ "onTransitionCancel",
904
+ "onTransitionEnd",
905
+ "onTransitionRun",
906
+ "onTransitionStart"
907
+ ]), cr = /^(data-.*)$/;
908
+ function ur(t, e = {}) {
909
+ let { labelable: n, isLink: r, global: i, events: l = i, propNames: s } = e, c = {};
910
+ for (const u in t) Object.prototype.hasOwnProperty.call(t, u) && (or.has(u) || n && lr.has(u) || r && sr.has(u) || i && ar.has(u) || l && (mt.has(u) || u.endsWith("Capture") && mt.has(u.slice(0, -7))) || s?.has(u) || cr.test(u)) && (c[u] = t[u]);
911
+ return c;
912
+ }
913
+ function ce(t) {
914
+ if (dr()) t.focus({
669
915
  preventScroll: !0
670
916
  });
671
917
  else {
672
- let e = Er(t);
673
- t.focus(), kr(e);
918
+ let e = fr(t);
919
+ t.focus(), pr(e);
674
920
  }
675
921
  }
676
- let be = null;
677
- function Pr() {
678
- if (be == null) {
679
- be = !1;
922
+ let xe = null;
923
+ function dr() {
924
+ if (xe == null) {
925
+ xe = !1;
680
926
  try {
681
927
  document.createElement("div").focus({
682
928
  get preventScroll() {
683
- return be = !0, !0;
929
+ return xe = !0, !0;
684
930
  }
685
931
  });
686
932
  } catch {
687
933
  }
688
934
  }
689
- return be;
935
+ return xe;
690
936
  }
691
- function Er(t) {
692
- let e = t.parentNode, r = [], n = document.scrollingElement || document.documentElement;
693
- for (; e instanceof HTMLElement && e !== n; )
694
- (e.offsetHeight < e.scrollHeight || e.offsetWidth < e.scrollWidth) && r.push({
937
+ function fr(t) {
938
+ let e = t.parentNode, n = [], r = document.scrollingElement || document.documentElement;
939
+ for (; e instanceof HTMLElement && e !== r; )
940
+ (e.offsetHeight < e.scrollHeight || e.offsetWidth < e.scrollWidth) && n.push({
695
941
  element: e,
696
942
  scrollTop: e.scrollTop,
697
943
  scrollLeft: e.scrollLeft
698
944
  }), e = e.parentNode;
699
- return n instanceof HTMLElement && r.push({
700
- element: n,
701
- scrollTop: n.scrollTop,
702
- scrollLeft: n.scrollLeft
703
- }), r;
945
+ return r instanceof HTMLElement && n.push({
946
+ element: r,
947
+ scrollTop: r.scrollTop,
948
+ scrollLeft: r.scrollLeft
949
+ }), n;
704
950
  }
705
- function kr(t) {
706
- for (let { element: e, scrollTop: r, scrollLeft: n } of t)
707
- e.scrollTop = r, e.scrollLeft = n;
951
+ function pr(t) {
952
+ for (let { element: e, scrollTop: n, scrollLeft: r } of t)
953
+ e.scrollTop = n, e.scrollLeft = r;
708
954
  }
709
- function Te(t) {
955
+ function ze(t) {
710
956
  var e;
711
- return typeof window > "u" || window.navigator == null ? !1 : ((e = window.navigator.userAgentData) === null || e === void 0 ? void 0 : e.brands.some((r) => t.test(r.brand))) || t.test(window.navigator.userAgent);
957
+ if (typeof window > "u" || window.navigator == null) return !1;
958
+ let n = (e = window.navigator.userAgentData) === null || e === void 0 ? void 0 : e.brands;
959
+ return Array.isArray(n) && n.some((r) => t.test(r.brand)) || t.test(window.navigator.userAgent);
712
960
  }
713
- function Ue(t) {
961
+ function lt(t) {
714
962
  var e;
715
963
  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;
716
964
  }
717
- function G(t) {
965
+ function de(t) {
966
+ if (process.env.NODE_ENV === "test") return t;
718
967
  let e = null;
719
968
  return () => (e == null && (e = t()), e);
720
969
  }
721
- const ee = G(function() {
722
- return Ue(/^Mac/i);
723
- }), xr = G(function() {
724
- return Ue(/^iPhone/i);
725
- }), Pt = G(function() {
726
- return Ue(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
727
- ee() && navigator.maxTouchPoints > 1;
728
- }), He = G(function() {
729
- return xr() || Pt();
730
- }), _r = G(function() {
731
- return ee() || He();
732
- }), Lr = G(function() {
733
- return Te(/AppleWebKit/i) && !Mr();
734
- }), Mr = G(function() {
735
- return Te(/Chrome/i);
736
- }), Et = G(function() {
737
- return Te(/Android/i);
738
- }), Dr = G(function() {
739
- return Te(/Firefox/i);
740
- }), Cr = /* @__PURE__ */ Xt({
970
+ const be = de(function() {
971
+ return lt(/^Mac/i);
972
+ }), vr = de(function() {
973
+ return lt(/^iPhone/i);
974
+ }), Xt = de(function() {
975
+ return lt(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
976
+ be() && navigator.maxTouchPoints > 1;
977
+ }), Be = de(function() {
978
+ return vr() || Xt();
979
+ }), br = de(function() {
980
+ return be() || Be();
981
+ }), hr = de(function() {
982
+ return ze(/AppleWebKit/i) && !qt();
983
+ }), qt = de(function() {
984
+ return ze(/Chrome/i);
985
+ }), Jt = de(function() {
986
+ return ze(/Android/i);
987
+ }), yr = de(function() {
988
+ return ze(/Firefox/i);
989
+ }), gr = /* @__PURE__ */ kn({
741
990
  isNative: !0,
742
- open: Ar,
991
+ open: mr,
743
992
  useHref: (t) => t
744
993
  });
745
- function We() {
746
- return ce(Cr);
747
- }
748
- function te(t, e, r = !0) {
749
- var n, i;
750
- let { metaKey: s, ctrlKey: o, altKey: a, shiftKey: p } = e;
751
- Dr() && (!((i = window.event) === null || i === void 0 || (n = i.type) === null || n === void 0) && n.startsWith("key")) && t.target === "_blank" && (ee() ? s = !0 : o = !0);
752
- let h = Lr() && ee() && !Pt() ? new KeyboardEvent("keydown", {
994
+ function st() {
995
+ return ye(gr);
996
+ }
997
+ function ue(t, e, n = !0) {
998
+ var r, i;
999
+ let { metaKey: l, ctrlKey: s, altKey: c, shiftKey: u } = e;
1000
+ yr() && (!((i = window.event) === null || i === void 0 || (r = i.type) === null || r === void 0) && r.startsWith("key")) && t.target === "_blank" && (be() ? l = !0 : s = !0);
1001
+ let p = hr() && be() && !Xt() && process.env.NODE_ENV !== "test" ? new KeyboardEvent("keydown", {
753
1002
  keyIdentifier: "Enter",
754
- metaKey: s,
755
- ctrlKey: o,
756
- altKey: a,
757
- shiftKey: p
1003
+ metaKey: l,
1004
+ ctrlKey: s,
1005
+ altKey: c,
1006
+ shiftKey: u
758
1007
  }) : new MouseEvent("click", {
759
- metaKey: s,
760
- ctrlKey: o,
761
- altKey: a,
762
- shiftKey: p,
1008
+ metaKey: l,
1009
+ ctrlKey: s,
1010
+ altKey: c,
1011
+ shiftKey: u,
1012
+ detail: 1,
763
1013
  bubbles: !0,
764
1014
  cancelable: !0
765
1015
  });
766
- te.isOpening = r, j(t), t.dispatchEvent(h), te.isOpening = !1;
1016
+ ue.isOpening = n, ce(t), t.dispatchEvent(p), ue.isOpening = !1;
767
1017
  }
768
- te.isOpening = !1;
769
- function Ir(t, e) {
1018
+ ue.isOpening = !1;
1019
+ function $r(t, e) {
770
1020
  if (t instanceof HTMLAnchorElement) e(t);
771
1021
  else if (t.hasAttribute("data-href")) {
772
- let r = document.createElement("a");
773
- r.href = t.getAttribute("data-href"), t.hasAttribute("data-target") && (r.target = t.getAttribute("data-target")), t.hasAttribute("data-rel") && (r.rel = t.getAttribute("data-rel")), t.hasAttribute("data-download") && (r.download = t.getAttribute("data-download")), t.hasAttribute("data-ping") && (r.ping = t.getAttribute("data-ping")), t.hasAttribute("data-referrer-policy") && (r.referrerPolicy = t.getAttribute("data-referrer-policy")), t.appendChild(r), e(r), t.removeChild(r);
1022
+ let n = document.createElement("a");
1023
+ n.href = t.getAttribute("data-href"), t.hasAttribute("data-target") && (n.target = t.getAttribute("data-target")), t.hasAttribute("data-rel") && (n.rel = t.getAttribute("data-rel")), t.hasAttribute("data-download") && (n.download = t.getAttribute("data-download")), t.hasAttribute("data-ping") && (n.ping = t.getAttribute("data-ping")), t.hasAttribute("data-referrer-policy") && (n.referrerPolicy = t.getAttribute("data-referrer-policy")), t.appendChild(n), e(n), t.removeChild(n);
774
1024
  }
775
1025
  }
776
- function Ar(t, e) {
777
- Ir(t, (r) => te(r, e));
1026
+ function mr(t, e) {
1027
+ $r(t, (n) => ue(n, e));
778
1028
  }
779
- function Fr(t) {
780
- let e = We();
781
- var r;
782
- const n = e.useHref((r = t?.href) !== null && r !== void 0 ? r : "");
1029
+ function wr(t) {
1030
+ let e = st();
1031
+ var n;
1032
+ const r = e.useHref((n = t?.href) !== null && n !== void 0 ? n : "");
783
1033
  return {
784
- href: t?.href ? n : void 0,
1034
+ href: t?.href ? r : void 0,
785
1035
  target: t?.target,
786
1036
  rel: t?.rel,
787
1037
  download: t?.download,
@@ -789,115 +1039,147 @@ function Fr(t) {
789
1039
  referrerPolicy: t?.referrerPolicy
790
1040
  };
791
1041
  }
792
- let oe = /* @__PURE__ */ new Map(), Ie = /* @__PURE__ */ new Set();
793
- function tt() {
1042
+ let pe = /* @__PURE__ */ new Map(), qe = /* @__PURE__ */ new Set();
1043
+ function wt() {
794
1044
  if (typeof window > "u") return;
795
- function t(n) {
796
- return "propertyName" in n;
797
- }
798
- let e = (n) => {
799
- if (!t(n) || !n.target) return;
800
- let i = oe.get(n.target);
801
- i || (i = /* @__PURE__ */ new Set(), oe.set(n.target, i), n.target.addEventListener("transitioncancel", r, {
1045
+ function t(r) {
1046
+ return "propertyName" in r;
1047
+ }
1048
+ let e = (r) => {
1049
+ let i = E(r);
1050
+ if (!t(r) || !i) return;
1051
+ let l = pe.get(i);
1052
+ l || (l = /* @__PURE__ */ new Set(), pe.set(i, l), i.addEventListener("transitioncancel", n, {
802
1053
  once: !0
803
- })), i.add(n.propertyName);
804
- }, r = (n) => {
805
- if (!t(n) || !n.target) return;
806
- let i = oe.get(n.target);
807
- if (i && (i.delete(n.propertyName), i.size === 0 && (n.target.removeEventListener("transitioncancel", r), oe.delete(n.target)), oe.size === 0)) {
808
- for (let s of Ie) s();
809
- Ie.clear();
1054
+ })), l.add(r.propertyName);
1055
+ }, n = (r) => {
1056
+ let i = E(r);
1057
+ if (!t(r) || !i) return;
1058
+ let l = pe.get(i);
1059
+ if (l && (l.delete(r.propertyName), l.size === 0 && (i.removeEventListener("transitioncancel", n), pe.delete(i)), pe.size === 0)) {
1060
+ for (let s of qe) s();
1061
+ qe.clear();
810
1062
  }
811
1063
  };
812
- document.body.addEventListener("transitionrun", e), document.body.addEventListener("transitionend", r);
1064
+ document.body.addEventListener("transitionrun", e), document.body.addEventListener("transitionend", n);
1065
+ }
1066
+ typeof document < "u" && (document.readyState !== "loading" ? wt() : document.addEventListener("DOMContentLoaded", wt));
1067
+ function Tr() {
1068
+ for (const [t] of pe)
1069
+ "isConnected" in t && !t.isConnected && pe.delete(t);
813
1070
  }
814
- typeof document < "u" && (document.readyState !== "loading" ? tt() : document.addEventListener("DOMContentLoaded", tt));
815
- function kt(t) {
1071
+ function Zt(t) {
816
1072
  requestAnimationFrame(() => {
817
- oe.size === 0 ? t() : Ie.add(t);
1073
+ Tr(), pe.size === 0 ? t() : qe.add(t);
818
1074
  });
819
1075
  }
820
- function xt() {
821
- let t = L(/* @__PURE__ */ new Map()), e = Z((i, s, o, a) => {
822
- let p = a?.once ? (...h) => {
823
- t.current.delete(o), o(...h);
824
- } : o;
825
- t.current.set(o, {
826
- type: s,
1076
+ function Qt() {
1077
+ let t = k(/* @__PURE__ */ new Map()), e = H((i, l, s, c) => {
1078
+ let u = c?.once ? (...p) => {
1079
+ t.current.delete(s), s(...p);
1080
+ } : s;
1081
+ t.current.set(s, {
1082
+ type: l,
827
1083
  eventTarget: i,
828
- fn: p,
829
- options: a
830
- }), i.addEventListener(s, o, a);
831
- }, []), r = Z((i, s, o, a) => {
832
- var p;
833
- let h = ((p = t.current.get(o)) === null || p === void 0 ? void 0 : p.fn) || o;
834
- i.removeEventListener(s, h, a), t.current.delete(o);
835
- }, []), n = Z(() => {
836
- t.current.forEach((i, s) => {
837
- r(i.eventTarget, i.type, s, i.options);
1084
+ fn: u,
1085
+ options: c
1086
+ }), i.addEventListener(l, u, c);
1087
+ }, []), n = H((i, l, s, c) => {
1088
+ var u;
1089
+ let p = ((u = t.current.get(s)) === null || u === void 0 ? void 0 : u.fn) || s;
1090
+ i.removeEventListener(l, p, c), t.current.delete(s);
1091
+ }, []), r = H(() => {
1092
+ t.current.forEach((i, l) => {
1093
+ n(i.eventTarget, i.type, l, i.options);
838
1094
  });
839
1095
  }, [
840
- r
841
- ]);
842
- return O(() => n, [
843
1096
  n
1097
+ ]);
1098
+ return V(() => r, [
1099
+ r
844
1100
  ]), {
845
1101
  addGlobalListener: e,
846
- removeGlobalListener: r,
847
- removeAllGlobalListeners: n
1102
+ removeGlobalListener: n,
1103
+ removeAllGlobalListeners: r
848
1104
  };
849
1105
  }
850
- function _t(t, e) {
851
- let { id: r, "aria-label": n, "aria-labelledby": i } = t;
852
- return r = St(r), i && n ? i = [
1106
+ function en(t, e) {
1107
+ let { id: n, "aria-label": r, "aria-labelledby": i } = t;
1108
+ return n = Oe(n), i && r ? i = [
853
1109
  .../* @__PURE__ */ new Set([
854
- r,
1110
+ n,
855
1111
  ...i.trim().split(/\s+/)
856
1112
  ])
857
- ].join(" ") : i && (i = i.trim().split(/\s+/).join(" ")), !n && !i && e && (n = e), {
858
- id: r,
859
- "aria-label": n,
1113
+ ].join(" ") : i && (i = i.trim().split(/\s+/).join(" ")), !r && !i && e && (r = e), {
1114
+ id: n,
1115
+ "aria-label": r,
860
1116
  "aria-labelledby": i
861
1117
  };
862
1118
  }
863
- function zr(t, e) {
864
- pe(() => {
1119
+ var Ve;
1120
+ const Sr = (Ve = Y.useInsertionEffect) !== null && Ve !== void 0 ? Ve : le;
1121
+ function Se(t) {
1122
+ const e = k(null);
1123
+ return Sr(() => {
1124
+ e.current = t;
1125
+ }, [
1126
+ t
1127
+ ]), H((...n) => {
1128
+ const r = e.current;
1129
+ return r?.(...n);
1130
+ }, []);
1131
+ }
1132
+ function Tt(t, e) {
1133
+ const n = k(!0), r = k(null);
1134
+ le(() => (n.current = !0, () => {
1135
+ n.current = !1;
1136
+ }), []), le(() => {
1137
+ n.current ? n.current = !1 : (!r.current || e.some((i, l) => !Object.is(i, r[l]))) && t(), r.current = e;
1138
+ }, e);
1139
+ }
1140
+ function tn(t, e) {
1141
+ le(() => {
865
1142
  if (t && t.ref && e)
866
1143
  return t.ref.current = e.current, () => {
867
1144
  t.ref && (t.ref.current = null);
868
1145
  };
869
1146
  });
870
1147
  }
871
- function Or(t, e) {
872
- let r = window.getComputedStyle(t), n = /(auto|scroll)/.test(r.overflow + r.overflowX + r.overflowY);
873
- return n && e && (n = t.scrollHeight !== t.clientHeight || t.scrollWidth !== t.clientWidth), n;
1148
+ function Er(t, e) {
1149
+ if (!t) return !1;
1150
+ let n = window.getComputedStyle(t), r = document.scrollingElement || document.documentElement, i = /(auto|scroll)/.test(n.overflow + n.overflowX + n.overflowY);
1151
+ return t === r && n.overflow !== "hidden" && (i = !0), i && e && (i = t.scrollHeight !== t.clientHeight || t.scrollWidth !== t.clientWidth), i;
874
1152
  }
875
- function Nr(t, e) {
876
- const r = [];
877
- for (; t && t !== document.documentElement; )
878
- Or(t, e) && r.push(t), t = t.parentElement;
879
- return r;
1153
+ function St(t, e) {
1154
+ let n = [], r = document.scrollingElement || document.documentElement;
1155
+ do
1156
+ Er(t, e) && n.push(t), t = t.parentElement;
1157
+ while (t && t !== r);
1158
+ return n;
1159
+ }
1160
+ function ge(t) {
1161
+ return be() ? t.metaKey : t.ctrlKey;
880
1162
  }
881
- let Rr = 0;
882
- const Me = /* @__PURE__ */ new Map();
883
- function Br(t) {
884
- let [e, r] = B();
885
- return pe(() => {
1163
+ let Pr = 0;
1164
+ const je = /* @__PURE__ */ new Map();
1165
+ function Kr(t) {
1166
+ let [e, n] = te();
1167
+ return le(() => {
886
1168
  if (!t) return;
887
- let n = Me.get(t);
888
- if (n)
889
- r(n.element.id);
1169
+ let r = je.get(t);
1170
+ if (r)
1171
+ n(r.element.id);
890
1172
  else {
891
- let i = `react-aria-description-${Rr++}`;
892
- r(i);
893
- let s = document.createElement("div");
894
- s.id = i, s.style.display = "none", s.textContent = t, document.body.appendChild(s), n = {
1173
+ let i = `react-aria-description-${Pr++}`;
1174
+ n(i);
1175
+ let l = document.createElement("div");
1176
+ l.id = i, l.style.display = "none", l.textContent = t, document.body.appendChild(l), r = {
895
1177
  refCount: 0,
896
- element: s
897
- }, Me.set(t, n);
1178
+ element: l
1179
+ }, je.set(t, r);
898
1180
  }
899
- return n.refCount++, () => {
900
- n && --n.refCount === 0 && (n.element.remove(), Me.delete(t));
1181
+ return r.refCount++, () => {
1182
+ r && --r.refCount === 0 && (r.element.remove(), je.delete(t));
901
1183
  };
902
1184
  }, [
903
1185
  t
@@ -905,481 +1187,693 @@ function Br(t) {
905
1187
  "aria-describedby": t ? e : void 0
906
1188
  };
907
1189
  }
908
- function rt(t, e, r, n) {
909
- let i = le(r), s = r == null;
910
- O(() => {
911
- if (s || !t.current) return;
912
- let o = t.current;
913
- return o.addEventListener(e, i, n), () => {
914
- o.removeEventListener(e, i, n);
1190
+ function _e(t, e, n, r) {
1191
+ let i = Se(n), l = n == null;
1192
+ V(() => {
1193
+ if (l || !t.current) return;
1194
+ let s = t.current;
1195
+ return s.addEventListener(e, i, r), () => {
1196
+ s.removeEventListener(e, i, r);
915
1197
  };
916
1198
  }, [
917
1199
  t,
918
1200
  e,
919
- n,
920
- s,
921
- i
1201
+ r,
1202
+ l
922
1203
  ]);
923
1204
  }
924
- function Lt(t, e) {
925
- let r = nt(t, e, "left"), n = nt(t, e, "top"), i = e.offsetWidth, s = e.offsetHeight, o = t.scrollLeft, a = t.scrollTop, { borderTopWidth: p, borderLeftWidth: h } = getComputedStyle(t), v = t.scrollLeft + parseInt(h, 10), w = t.scrollTop + parseInt(p, 10), $ = v + t.clientWidth, m = w + t.clientHeight;
926
- r <= o ? o = r - parseInt(h, 10) : r + i > $ && (o += r + i - $), n <= w ? a = n - parseInt(p, 10) : n + s > m && (a += n + s - m), t.scrollLeft = o, t.scrollTop = a;
927
- }
928
- function nt(t, e, r) {
929
- const n = r === "left" ? "offsetLeft" : "offsetTop";
930
- let i = 0;
931
- for (; e.offsetParent && (i += e[n], e.offsetParent !== t); ) {
932
- if (e.offsetParent.contains(t)) {
933
- i -= t[n];
934
- break;
935
- }
936
- e = e.offsetParent;
937
- }
938
- return i;
1205
+ function Je(t, e, n = {}) {
1206
+ let { block: r = "nearest", inline: i = "nearest" } = n;
1207
+ if (t === e) return;
1208
+ let l = t.scrollTop, s = t.scrollLeft, c = e.getBoundingClientRect(), u = t.getBoundingClientRect(), p = window.getComputedStyle(e), d = window.getComputedStyle(t), b = document.scrollingElement || document.documentElement, $ = t === b ? 0 : u.top, m = t === b ? t.clientHeight : u.bottom, x = t === b ? 0 : u.left, _ = t === b ? t.clientWidth : u.right, D = parseInt(p.scrollMarginTop, 10) || 0, K = parseInt(p.scrollMarginBottom, 10) || 0, T = parseInt(p.scrollMarginLeft, 10) || 0, M = parseInt(p.scrollMarginRight, 10) || 0, I = parseInt(d.scrollPaddingTop, 10) || 0, F = parseInt(d.scrollPaddingBottom, 10) || 0, J = parseInt(d.scrollPaddingLeft, 10) || 0, B = parseInt(d.scrollPaddingRight, 10) || 0, X = parseInt(d.borderTopWidth, 10) || 0, O = parseInt(d.borderBottomWidth, 10) || 0, j = parseInt(d.borderLeftWidth, 10) || 0, G = parseInt(d.borderRightWidth, 10) || 0, W = c.top - D, A = c.bottom + K, v = c.left - T, w = c.right + M, N = t === b ? 0 : j + G, L = t === b ? 0 : X + O, C = t.offsetWidth - t.clientWidth - N, z = t.offsetHeight - t.clientHeight - L, o = $ + X + I, f = m - O - F - z, a = x + j + J, h = _ - G - B;
1209
+ d.direction === "rtl" && !Be() ? a += C : h -= C;
1210
+ let g = W < o || A > f, S = v < a || w > h;
1211
+ if (g && r === "start") l += W - o;
1212
+ else if (g && r === "center") l += (W + A) / 2 - (o + f) / 2;
1213
+ else if (g && r === "end") l += A - f;
1214
+ else if (g && r === "nearest") {
1215
+ let U = W - o, q = A - f;
1216
+ l += Math.abs(U) <= Math.abs(q) ? U : q;
1217
+ }
1218
+ if (S && i === "start") s += v - a;
1219
+ else if (S && i === "center") s += (v + w) / 2 - (a + h) / 2;
1220
+ else if (S && i === "end") s += w - h;
1221
+ else if (S && i === "nearest") {
1222
+ let U = v - a, q = w - h;
1223
+ s += Math.abs(U) <= Math.abs(q) ? U : q;
1224
+ }
1225
+ if (process.env.NODE_ENV === "test") {
1226
+ t.scrollLeft = s, t.scrollTop = l;
1227
+ return;
1228
+ }
1229
+ t.scrollTo({
1230
+ left: s,
1231
+ top: l
1232
+ });
939
1233
  }
940
- function it(t, e) {
941
- if (document.contains(t)) {
942
- let o = document.scrollingElement || document.documentElement;
943
- if (window.getComputedStyle(o).overflow === "hidden") {
944
- let p = Nr(t);
945
- for (let h of p) Lt(h, t);
946
- } else {
1234
+ function Et(t, e = {}) {
1235
+ let { containingElement: n } = e;
1236
+ if (t && t.isConnected) {
1237
+ let s = document.scrollingElement || document.documentElement;
1238
+ if (!(window.getComputedStyle(s).overflow === "hidden") && !qt()) {
947
1239
  var r;
948
- let { left: p, top: h } = t.getBoundingClientRect();
1240
+ let { left: u, top: p } = t.getBoundingClientRect();
949
1241
  t == null || (r = t.scrollIntoView) === null || r === void 0 || r.call(t, {
950
1242
  block: "nearest"
951
1243
  });
952
- let { left: v, top: w } = t.getBoundingClientRect();
953
- if (Math.abs(p - v) > 1 || Math.abs(h - w) > 1) {
954
- var n, i, s;
955
- e == null || (i = e.containingElement) === null || i === void 0 || (n = i.scrollIntoView) === null || n === void 0 || n.call(i, {
1244
+ let { left: d, top: b } = t.getBoundingClientRect();
1245
+ if (Math.abs(u - d) > 1 || Math.abs(p - b) > 1) {
1246
+ var i, l;
1247
+ n == null || (i = n.scrollIntoView) === null || i === void 0 || i.call(n, {
956
1248
  block: "center",
957
1249
  inline: "center"
958
- }), (s = t.scrollIntoView) === null || s === void 0 || s.call(t, {
1250
+ }), (l = t.scrollIntoView) === null || l === void 0 || l.call(t, {
959
1251
  block: "nearest"
960
1252
  });
961
1253
  }
1254
+ } else {
1255
+ let { left: u, top: p } = t.getBoundingClientRect(), d = St(t, !0);
1256
+ for (let m of d) Je(m, t);
1257
+ let { left: b, top: $ } = t.getBoundingClientRect();
1258
+ if (Math.abs(u - b) > 1 || Math.abs(p - $) > 1) {
1259
+ d = n ? St(n, !0) : [];
1260
+ for (let m of d) Je(m, n, {
1261
+ block: "center",
1262
+ inline: "center"
1263
+ });
1264
+ }
962
1265
  }
963
1266
  }
964
1267
  }
965
- function Ae(t) {
966
- return t.mozInputSource === 0 && t.isTrusted ? !0 : Et() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType;
1268
+ function Ze(t) {
1269
+ return t.pointerType === "" && t.isTrusted ? !0 : Jt() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType;
967
1270
  }
968
- function Ur(t) {
969
- return !Et() && t.width === 0 && t.height === 0 || t.width === 1 && t.height === 1 && t.pressure === 0 && t.detail === 0 && t.pointerType === "mouse";
1271
+ function kr(t) {
1272
+ return !Jt() && t.width === 0 && t.height === 0 || t.width === 1 && t.height === 1 && t.pressure === 0 && t.detail === 0 && t.pointerType === "mouse";
970
1273
  }
971
- function Fe(t) {
972
- return _r() ? t.altKey : t.ctrlKey;
1274
+ const xr = "react-aria-clear-focus", _r = "react-aria-focus", Lr = typeof Element < "u" && "checkVisibility" in Element.prototype;
1275
+ function Nr(t) {
1276
+ const e = ie(t);
1277
+ if (!(t instanceof e.HTMLElement) && !(t instanceof e.SVGElement)) return !1;
1278
+ let { display: n, visibility: r } = t.style, i = n !== "none" && r !== "hidden" && r !== "collapse";
1279
+ if (i) {
1280
+ const { getComputedStyle: l } = t.ownerDocument.defaultView;
1281
+ let { display: s, visibility: c } = l(t);
1282
+ i = s !== "none" && c !== "hidden" && c !== "collapse";
1283
+ }
1284
+ return i;
973
1285
  }
974
- function se(t) {
975
- return ee() ? t.metaKey : t.ctrlKey;
1286
+ function Mr(t, e) {
1287
+ return !t.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
1288
+ !t.hasAttribute("data-react-aria-prevent-focus") && (t.nodeName === "DETAILS" && e && e.nodeName !== "SUMMARY" ? t.hasAttribute("open") : !0);
976
1289
  }
977
- const Hr = 1e3;
978
- function Wr(t) {
979
- let { keyboardDelegate: e, selectionManager: r, onTypeSelect: n } = t, i = L({
980
- search: "",
981
- timeout: null
982
- }).current, s = (o) => {
983
- let a = jr(o.key);
984
- if (!a || o.ctrlKey || o.metaKey || !o.currentTarget.contains(o.target)) return;
985
- a === " " && i.search.trim().length > 0 && (o.preventDefault(), "continuePropagation" in o || o.stopPropagation()), i.search += a;
986
- let p = e.getKeyForSearch(i.search, r.focusedKey);
987
- p == null && (p = e.getKeyForSearch(i.search)), p != null && (r.setFocusedKey(p), n && n(p)), clearTimeout(i.timeout), i.timeout = setTimeout(() => {
988
- i.search = "";
989
- }, Hr);
990
- };
991
- return {
992
- typeSelectProps: {
993
- // Using a capturing listener to catch the keydown event before
994
- // other hooks in order to handle the Spacebar event.
995
- onKeyDownCapture: e.getKeyForSearch ? s : null
996
- }
997
- };
1290
+ function at(t, e) {
1291
+ return Lr ? t.checkVisibility({
1292
+ visibilityProperty: !0
1293
+ }) && !t.closest("[data-react-aria-prevent-focus]") : t.nodeName !== "#comment" && Nr(t) && Mr(t, e) && (!t.parentElement || at(t.parentElement, t));
998
1294
  }
999
- function jr(t) {
1000
- return t.length === 1 || !/^[A-Z]/i.test(t) ? t : "";
1295
+ const ct = [
1296
+ "input:not([disabled]):not([type=hidden])",
1297
+ "select:not([disabled])",
1298
+ "textarea:not([disabled])",
1299
+ "button:not([disabled])",
1300
+ "a[href]",
1301
+ "area[href]",
1302
+ "summary",
1303
+ "iframe",
1304
+ "object",
1305
+ "embed",
1306
+ "audio[controls]",
1307
+ "video[controls]",
1308
+ '[contenteditable]:not([contenteditable^="false"])',
1309
+ "permission"
1310
+ ], Cr = ct.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
1311
+ ct.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
1312
+ const Dr = ct.join(':not([hidden]):not([tabindex="-1"]),');
1313
+ function nn(t) {
1314
+ return t.matches(Cr) && at(t) && !on(t);
1001
1315
  }
1002
- let ae = "default", ze = "", $e = /* @__PURE__ */ new WeakMap();
1003
- function lt(t) {
1004
- if (He()) {
1005
- if (ae === "default") {
1006
- const e = A(t);
1007
- ze = e.documentElement.style.webkitUserSelect, e.documentElement.style.webkitUserSelect = "none";
1316
+ function rn(t) {
1317
+ return t.matches(Dr) && at(t) && !on(t);
1318
+ }
1319
+ function on(t) {
1320
+ let e = t;
1321
+ for (; e != null; ) {
1322
+ if (e instanceof e.ownerDocument.defaultView.HTMLElement && e.inert) return !0;
1323
+ e = e.parentElement;
1324
+ }
1325
+ return !1;
1326
+ }
1327
+ function ln(t) {
1328
+ let e = t;
1329
+ return e.nativeEvent = t, e.isDefaultPrevented = () => e.defaultPrevented, e.isPropagationStopped = () => e.cancelBubble, e.persist = () => {
1330
+ }, e;
1331
+ }
1332
+ function Ir(t, e) {
1333
+ Object.defineProperty(t, "target", {
1334
+ value: e
1335
+ }), Object.defineProperty(t, "currentTarget", {
1336
+ value: e
1337
+ });
1338
+ }
1339
+ function Fr(t) {
1340
+ let e = k({
1341
+ isFocused: !1,
1342
+ observer: null
1343
+ });
1344
+ return le(() => {
1345
+ const n = e.current;
1346
+ return () => {
1347
+ n.observer && (n.observer.disconnect(), n.observer = null);
1348
+ };
1349
+ }, []), H((n) => {
1350
+ let r = E(n);
1351
+ if (r instanceof HTMLButtonElement || r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement || r instanceof HTMLSelectElement) {
1352
+ e.current.isFocused = !0;
1353
+ let i = r, l = (s) => {
1354
+ if (e.current.isFocused = !1, i.disabled) {
1355
+ let c = ln(s);
1356
+ t?.(c);
1357
+ }
1358
+ e.current.observer && (e.current.observer.disconnect(), e.current.observer = null);
1359
+ };
1360
+ i.addEventListener("focusout", l, {
1361
+ once: !0
1362
+ }), e.current.observer = new MutationObserver(() => {
1363
+ if (e.current.isFocused && i.disabled) {
1364
+ var s;
1365
+ (s = e.current.observer) === null || s === void 0 || s.disconnect();
1366
+ let c = i === se() ? null : se();
1367
+ i.dispatchEvent(new FocusEvent("blur", {
1368
+ relatedTarget: c
1369
+ })), i.dispatchEvent(new FocusEvent("focusout", {
1370
+ bubbles: !0,
1371
+ relatedTarget: c
1372
+ }));
1373
+ }
1374
+ }), e.current.observer.observe(i, {
1375
+ attributes: !0,
1376
+ attributeFilter: [
1377
+ "disabled"
1378
+ ]
1379
+ });
1380
+ }
1381
+ }, [
1382
+ t
1383
+ ]);
1384
+ }
1385
+ let Ie = !1;
1386
+ function Pt(t) {
1387
+ for (; t && !nn(t); ) t = t.parentElement;
1388
+ let e = ie(t), n = e.document.activeElement;
1389
+ if (!n || n === t) return;
1390
+ Ie = !0;
1391
+ let r = !1, i = (d) => {
1392
+ (E(d) === n || r) && d.stopImmediatePropagation();
1393
+ }, l = (d) => {
1394
+ (E(d) === n || r) && (d.stopImmediatePropagation(), !t && !r && (r = !0, ce(n), u()));
1395
+ }, s = (d) => {
1396
+ (E(d) === t || r) && d.stopImmediatePropagation();
1397
+ }, c = (d) => {
1398
+ (E(d) === t || r) && (d.stopImmediatePropagation(), r || (r = !0, ce(n), u()));
1399
+ };
1400
+ e.addEventListener("blur", i, !0), e.addEventListener("focusout", l, !0), e.addEventListener("focusin", c, !0), e.addEventListener("focus", s, !0);
1401
+ let u = () => {
1402
+ cancelAnimationFrame(p), e.removeEventListener("blur", i, !0), e.removeEventListener("focusout", l, !0), e.removeEventListener("focusin", c, !0), e.removeEventListener("focus", s, !0), Ie = !1, r = !1;
1403
+ }, p = requestAnimationFrame(u);
1404
+ return u;
1405
+ }
1406
+ let $e = "default", Qe = "", Me = /* @__PURE__ */ new WeakMap();
1407
+ function Kt(t) {
1408
+ if (Be()) {
1409
+ if ($e === "default") {
1410
+ const e = R(t);
1411
+ Qe = e.documentElement.style.webkitUserSelect, e.documentElement.style.webkitUserSelect = "none";
1008
1412
  }
1009
- ae = "disabled";
1010
- } else (t instanceof HTMLElement || t instanceof SVGElement) && ($e.set(t, t.style.userSelect), t.style.userSelect = "none");
1011
- }
1012
- function he(t) {
1013
- if (He()) {
1014
- if (ae !== "disabled") return;
1015
- ae = "restoring", setTimeout(() => {
1016
- kt(() => {
1017
- if (ae === "restoring") {
1018
- const e = A(t);
1019
- e.documentElement.style.webkitUserSelect === "none" && (e.documentElement.style.webkitUserSelect = ze || ""), ze = "", ae = "default";
1413
+ $e = "disabled";
1414
+ } else if (t instanceof HTMLElement || t instanceof SVGElement) {
1415
+ let e = "userSelect" in t.style ? "userSelect" : "webkitUserSelect";
1416
+ Me.set(t, t.style[e]), t.style[e] = "none";
1417
+ }
1418
+ }
1419
+ function Ge(t) {
1420
+ if (Be()) {
1421
+ if ($e !== "disabled") return;
1422
+ $e = "restoring", setTimeout(() => {
1423
+ Zt(() => {
1424
+ if ($e === "restoring") {
1425
+ const e = R(t);
1426
+ e.documentElement.style.webkitUserSelect === "none" && (e.documentElement.style.webkitUserSelect = Qe || ""), Qe = "", $e = "default";
1020
1427
  }
1021
1428
  });
1022
1429
  }, 300);
1023
- } else if ((t instanceof HTMLElement || t instanceof SVGElement) && t && $e.has(t)) {
1024
- let e = $e.get(t);
1025
- t.style.userSelect === "none" && (t.style.userSelect = e), t.getAttribute("style") === "" && t.removeAttribute("style"), $e.delete(t);
1430
+ } else if ((t instanceof HTMLElement || t instanceof SVGElement) && t && Me.has(t)) {
1431
+ let e = Me.get(t), n = "userSelect" in t.style ? "userSelect" : "webkitUserSelect";
1432
+ t.style[n] === "none" && (t.style[n] = e), t.getAttribute("style") === "" && t.removeAttribute("style"), Me.delete(t);
1026
1433
  }
1027
1434
  }
1028
- const Mt = U.createContext({
1435
+ const sn = Y.createContext({
1029
1436
  register: () => {
1030
1437
  }
1031
1438
  });
1032
- Mt.displayName = "PressResponderContext";
1033
- function Vr(t, e) {
1439
+ sn.displayName = "PressResponderContext";
1440
+ function Ar(t, e) {
1034
1441
  return e.get ? e.get.call(t) : e.value;
1035
1442
  }
1036
- function Dt(t, e, r) {
1037
- if (!e.has(t)) throw new TypeError("attempted to " + r + " private field on non-instance");
1443
+ function an(t, e, n) {
1444
+ if (!e.has(t)) throw new TypeError("attempted to " + n + " private field on non-instance");
1038
1445
  return e.get(t);
1039
1446
  }
1040
- function Gr(t, e) {
1041
- var r = Dt(t, e, "get");
1042
- return Vr(t, r);
1447
+ function Or(t, e) {
1448
+ var n = an(t, e, "get");
1449
+ return Ar(t, n);
1043
1450
  }
1044
- function Xr(t, e) {
1451
+ function Rr(t, e) {
1045
1452
  if (e.has(t))
1046
1453
  throw new TypeError("Cannot initialize the same private elements twice on an object");
1047
1454
  }
1048
- function Yr(t, e, r) {
1049
- Xr(t, e), e.set(t, r);
1455
+ function zr(t, e, n) {
1456
+ Rr(t, e), e.set(t, n);
1050
1457
  }
1051
- function qr(t, e, r) {
1052
- if (e.set) e.set.call(t, r);
1458
+ function Br(t, e, n) {
1459
+ if (e.set) e.set.call(t, n);
1053
1460
  else {
1054
1461
  if (!e.writable)
1055
1462
  throw new TypeError("attempted to set read only private field");
1056
- e.value = r;
1463
+ e.value = n;
1057
1464
  }
1058
1465
  }
1059
- function ot(t, e, r) {
1060
- var n = Dt(t, e, "set");
1061
- return qr(t, n, r), r;
1466
+ function kt(t, e, n) {
1467
+ var r = an(t, e, "set");
1468
+ return Br(t, r, n), n;
1062
1469
  }
1063
- function Jr(t) {
1064
- let e = ce(Mt);
1470
+ function Ur(t) {
1471
+ let e = ye(sn);
1065
1472
  if (e) {
1066
- let { register: r, ...n } = e;
1067
- t = q(n, t), r();
1473
+ let { register: n, ref: r, ...i } = e;
1474
+ t = ne(i, t), n();
1068
1475
  }
1069
- return zr(e, t.ref), t;
1476
+ return tn(e, t.ref), t;
1070
1477
  }
1071
- var ye = /* @__PURE__ */ new WeakMap();
1072
- class ge {
1478
+ var Le = /* @__PURE__ */ new WeakMap();
1479
+ class Ne {
1073
1480
  continuePropagation() {
1074
- ot(this, ye, !1);
1481
+ kt(this, Le, !1);
1075
1482
  }
1076
1483
  get shouldStopPropagation() {
1077
- return Gr(this, ye);
1484
+ return Or(this, Le);
1078
1485
  }
1079
- constructor(e, r, n, i) {
1080
- Yr(this, ye, {
1486
+ constructor(e, n, r, i) {
1487
+ zr(this, Le, {
1081
1488
  writable: !0,
1082
1489
  value: void 0
1083
- }), ot(this, ye, !0);
1084
- var s;
1085
- let o = (s = i?.target) !== null && s !== void 0 ? s : n.currentTarget;
1086
- const a = o?.getBoundingClientRect();
1087
- let p, h = 0, v, w = null;
1088
- n.clientX != null && n.clientY != null && (v = n.clientX, w = n.clientY), a && (v != null && w != null ? (p = v - a.left, h = w - a.top) : (p = a.width / 2, h = a.height / 2)), this.type = e, this.pointerType = r, this.target = n.currentTarget, this.shiftKey = n.shiftKey, this.metaKey = n.metaKey, this.ctrlKey = n.ctrlKey, this.altKey = n.altKey, this.x = p, this.y = h;
1089
- }
1090
- }
1091
- const st = Symbol("linkClicked");
1092
- function Ct(t) {
1093
- let {
1094
- onPress: e,
1095
- onPressChange: r,
1096
- onPressStart: n,
1097
- onPressEnd: i,
1098
- onPressUp: s,
1099
- isDisabled: o,
1100
- isPressed: a,
1101
- preventFocusOnPress: p,
1102
- shouldCancelOnPointerExit: h,
1103
- allowTextSelectionOnPress: v,
1104
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1105
- ref: w,
1106
- ...$
1107
- } = Jr(t), [m, M] = B(!1), k = L({
1490
+ }), kt(this, Le, !0);
1491
+ var l;
1492
+ let s = (l = i?.target) !== null && l !== void 0 ? l : r.currentTarget;
1493
+ const c = s?.getBoundingClientRect();
1494
+ let u, p = 0, d, b = null;
1495
+ r.clientX != null && r.clientY != null && (d = r.clientX, b = r.clientY), c && (d != null && b != null ? (u = d - c.left, p = b - c.top) : (u = c.width / 2, p = c.height / 2)), this.type = e, this.pointerType = n, this.target = r.currentTarget, this.shiftKey = r.shiftKey, this.metaKey = r.metaKey, this.ctrlKey = r.ctrlKey, this.altKey = r.altKey, this.x = u, this.y = p, this.key = r.key;
1496
+ }
1497
+ }
1498
+ const xt = Symbol("linkClicked"), _t = "react-aria-pressable-style", Lt = "data-react-aria-pressable";
1499
+ function cn(t) {
1500
+ let { onPress: e, onPressChange: n, onPressStart: r, onPressEnd: i, onPressUp: l, onClick: s, isDisabled: c, isPressed: u, preventFocusOnPress: p, shouldCancelOnPointerExit: d, allowTextSelectionOnPress: b, ref: $, ...m } = Ur(t), [x, _] = te(!1), D = k({
1108
1501
  isPressed: !1,
1109
1502
  ignoreEmulatedMouseEvents: !1,
1110
- ignoreClickAfterPress: !1,
1111
1503
  didFirePressStart: !1,
1112
1504
  isTriggeringEvent: !1,
1113
1505
  activePointerId: null,
1114
1506
  target: null,
1115
1507
  isOverTarget: !1,
1116
- pointerType: null
1117
- }), { addGlobalListener: P, removeAllGlobalListeners: E } = xt(), x = le((l, y) => {
1118
- let f = k.current;
1119
- if (o || f.didFirePressStart) return !1;
1120
- let d = !0;
1121
- if (f.isTriggeringEvent = !0, n) {
1122
- let T = new ge("pressstart", y, l);
1123
- n(T), d = T.shouldStopPropagation;
1508
+ pointerType: null,
1509
+ disposables: []
1510
+ }), { addGlobalListener: K, removeAllGlobalListeners: T, removeGlobalListener: M } = Qt(), I = H((o, f) => {
1511
+ let a = D.current;
1512
+ if (c || a.didFirePressStart) return !1;
1513
+ let h = !0;
1514
+ if (a.isTriggeringEvent = !0, r) {
1515
+ let g = new Ne("pressstart", f, o);
1516
+ r(g), h = g.shouldStopPropagation;
1124
1517
  }
1125
- return r && r(!0), f.isTriggeringEvent = !1, f.didFirePressStart = !0, M(!0), d;
1126
- }), K = le((l, y, f = !0) => {
1127
- let d = k.current;
1128
- if (!d.didFirePressStart) return !1;
1129
- d.ignoreClickAfterPress = !0, d.didFirePressStart = !1, d.isTriggeringEvent = !0;
1130
- let T = !0;
1518
+ return n && n(!0), a.isTriggeringEvent = !1, a.didFirePressStart = !0, _(!0), h;
1519
+ }, [
1520
+ c,
1521
+ r,
1522
+ n
1523
+ ]), F = H((o, f, a = !0) => {
1524
+ let h = D.current;
1525
+ if (!h.didFirePressStart) return !1;
1526
+ h.didFirePressStart = !1, h.isTriggeringEvent = !0;
1527
+ let g = !0;
1131
1528
  if (i) {
1132
- let c = new ge("pressend", y, l);
1133
- i(c), T = c.shouldStopPropagation;
1529
+ let S = new Ne("pressend", f, o);
1530
+ i(S), g = S.shouldStopPropagation;
1134
1531
  }
1135
- if (r && r(!1), M(!1), e && f && !o) {
1136
- let c = new ge("press", y, l);
1137
- e(c), T && (T = c.shouldStopPropagation);
1532
+ if (n && n(!1), _(!1), e && a && !c) {
1533
+ let S = new Ne("press", f, o);
1534
+ e(S), g && (g = S.shouldStopPropagation);
1138
1535
  }
1139
- return d.isTriggeringEvent = !1, T;
1140
- }), D = le((l, y) => {
1141
- let f = k.current;
1142
- if (o) return !1;
1143
- if (s) {
1144
- f.isTriggeringEvent = !0;
1145
- let d = new ge("pressup", y, l);
1146
- return s(d), f.isTriggeringEvent = !1, d.shouldStopPropagation;
1536
+ return h.isTriggeringEvent = !1, g;
1537
+ }, [
1538
+ c,
1539
+ i,
1540
+ n,
1541
+ e
1542
+ ]), J = Se(F), B = H((o, f) => {
1543
+ let a = D.current;
1544
+ if (c) return !1;
1545
+ if (l) {
1546
+ a.isTriggeringEvent = !0;
1547
+ let h = new Ne("pressup", f, o);
1548
+ return l(h), a.isTriggeringEvent = !1, h.shouldStopPropagation;
1147
1549
  }
1148
1550
  return !0;
1149
- }), _ = le((l) => {
1150
- let y = k.current;
1151
- y.isPressed && y.target && (y.isOverTarget && y.pointerType != null && K(W(y.target, l), y.pointerType, !1), y.isPressed = !1, y.isOverTarget = !1, y.activePointerId = null, y.pointerType = null, E(), v || he(y.target));
1152
- }), C = le((l) => {
1153
- h && _(l);
1154
- }), F = V(() => {
1155
- let l = k.current, y = {
1156
- onKeyDown(d) {
1157
- if (De(d.nativeEvent, d.currentTarget) && d.currentTarget.contains(d.target)) {
1158
- var T;
1159
- ct(d.target, d.key) && d.preventDefault();
1160
- let c = !0;
1161
- if (!l.isPressed && !d.repeat) {
1162
- l.target = d.currentTarget, l.isPressed = !0, c = x(d, "keyboard");
1163
- let S = d.currentTarget, u = (I) => {
1164
- De(I, S) && !I.repeat && S.contains(I.target) && l.target && D(W(l.target, I), "keyboard");
1165
- };
1166
- P(A(d.currentTarget), "keyup", Tt(u, f), !0);
1167
- }
1168
- c && d.stopPropagation(), d.metaKey && ee() && ((T = l.metaKeyEvents) === null || T === void 0 || T.set(d.key, d.nativeEvent));
1169
- } else d.key === "Meta" && (l.metaKeyEvents = /* @__PURE__ */ new Map());
1170
- },
1171
- onClick(d) {
1172
- if (!(d && !d.currentTarget.contains(d.target)) && d && d.button === 0 && !l.isTriggeringEvent && !te.isOpening) {
1173
- let T = !0;
1174
- if (o && d.preventDefault(), !l.ignoreClickAfterPress && !l.ignoreEmulatedMouseEvents && !l.isPressed && (l.pointerType === "virtual" || Ae(d.nativeEvent))) {
1175
- !o && !p && j(d.currentTarget);
1176
- let c = x(d, "virtual"), S = D(d, "virtual"), u = K(d, "virtual");
1177
- T = c && S && u;
1178
- }
1179
- l.ignoreEmulatedMouseEvents = !1, l.ignoreClickAfterPress = !1, T && d.stopPropagation();
1180
- }
1181
- }
1182
- }, f = (d) => {
1183
- var T;
1184
- if (l.isPressed && l.target && De(d, l.target)) {
1185
- var c;
1186
- ct(d.target, d.key) && d.preventDefault();
1187
- let u = d.target;
1188
- K(W(l.target, d), "keyboard", l.target.contains(u)), E(), d.key !== "Enter" && je(l.target) && l.target.contains(u) && !d[st] && (d[st] = !0, te(l.target, d, !1)), l.isPressed = !1, (c = l.metaKeyEvents) === null || c === void 0 || c.delete(d.key);
1189
- } else if (d.key === "Meta" && (!((T = l.metaKeyEvents) === null || T === void 0) && T.size)) {
1190
- var S;
1191
- let u = l.metaKeyEvents;
1192
- l.metaKeyEvents = void 0;
1193
- for (let I of u.values()) (S = l.target) === null || S === void 0 || S.dispatchEvent(new KeyboardEvent("keyup", I));
1194
- }
1195
- };
1196
- if (typeof PointerEvent < "u") {
1197
- y.onPointerDown = (u) => {
1198
- if (u.button !== 0 || !u.currentTarget.contains(u.target)) return;
1199
- if (Ur(u.nativeEvent)) {
1200
- l.pointerType = "virtual";
1201
- return;
1551
+ }, [
1552
+ c,
1553
+ l
1554
+ ]), X = Se(B), O = H((o) => {
1555
+ let f = D.current;
1556
+ if (f.isPressed && f.target) {
1557
+ f.didFirePressStart && f.pointerType != null && F(ve(f.target, o), f.pointerType, !1), f.isPressed = !1, C(null), f.isOverTarget = !1, f.activePointerId = null, f.pointerType = null, T(), b || Ge(f.target);
1558
+ for (let a of f.disposables) a();
1559
+ f.disposables = [];
1560
+ }
1561
+ }, [
1562
+ b,
1563
+ T,
1564
+ F
1565
+ ]), j = Se(O), G = H((o) => {
1566
+ d && O(o);
1567
+ }, [
1568
+ d,
1569
+ O
1570
+ ]), W = H((o) => {
1571
+ c || s?.(o);
1572
+ }, [
1573
+ c,
1574
+ s
1575
+ ]), A = H((o, f) => {
1576
+ if (!c && s) {
1577
+ let a = new MouseEvent("click", o);
1578
+ Ir(a, f), s(ln(a));
1579
+ }
1580
+ }, [
1581
+ c,
1582
+ s
1583
+ ]), v = Se(A), [w, N] = te(!1);
1584
+ le(() => {
1585
+ let o = D.current;
1586
+ if (w) {
1587
+ let f = (S) => {
1588
+ var U;
1589
+ if (o.isPressed && o.target && Ye(S, o.target)) {
1590
+ var q;
1591
+ Ct(E(S), S.key) && S.preventDefault();
1592
+ let Z = E(S), Q = P(o.target, Z);
1593
+ J(ve(o.target, S), "keyboard", Q), Q && v(S, o.target), T(), S.key !== "Enter" && ut(o.target) && P(o.target, Z) && !S[xt] && (S[xt] = !0, ue(o.target, S, !1)), o.isPressed = !1, N(!1), (q = o.metaKeyEvents) === null || q === void 0 || q.delete(S.key);
1594
+ } else if (S.key === "Meta" && (!((U = o.metaKeyEvents) === null || U === void 0) && U.size)) {
1595
+ var y;
1596
+ let Z = o.metaKeyEvents;
1597
+ o.metaKeyEvents = void 0;
1598
+ for (let Q of Z.values()) (y = o.target) === null || y === void 0 || y.dispatchEvent(new KeyboardEvent("keyup", Q));
1202
1599
  }
1203
- Ce(u.currentTarget) && u.preventDefault(), l.pointerType = u.pointerType;
1204
- let I = !0;
1205
- l.isPressed || (l.isPressed = !0, l.isOverTarget = !0, l.activePointerId = u.pointerId, l.target = u.currentTarget, !o && !p && j(u.currentTarget), v || lt(l.target), I = x(u, l.pointerType), P(A(u.currentTarget), "pointermove", d, !1), P(A(u.currentTarget), "pointerup", T, !1), P(A(u.currentTarget), "pointercancel", S, !1)), I && u.stopPropagation();
1206
- }, y.onMouseDown = (u) => {
1207
- u.currentTarget.contains(u.target) && u.button === 0 && (Ce(u.currentTarget) && u.preventDefault(), u.stopPropagation());
1208
- }, y.onPointerUp = (u) => {
1209
- !u.currentTarget.contains(u.target) || l.pointerType === "virtual" || u.button === 0 && ie(u, u.currentTarget) && D(u, l.pointerType || u.pointerType);
1600
+ }, a = o.target, g = ot((S) => {
1601
+ a && Ye(S, a) && !S.repeat && P(a, E(S)) && o.target && X(ve(o.target, S), "keyboard");
1602
+ }, f);
1603
+ return K(R(o.target), "keyup", g, !0), () => {
1604
+ M(R(o.target), "keyup", g, !0);
1210
1605
  };
1211
- let d = (u) => {
1212
- u.pointerId === l.activePointerId && (l.target && ie(u, l.target) ? !l.isOverTarget && l.pointerType != null && (l.isOverTarget = !0, x(W(l.target, u), l.pointerType)) : l.target && l.isOverTarget && l.pointerType != null && (l.isOverTarget = !1, K(W(l.target, u), l.pointerType, !1), C(u)));
1213
- }, T = (u) => {
1214
- u.pointerId === l.activePointerId && l.isPressed && u.button === 0 && l.target && (ie(u, l.target) && l.pointerType != null ? K(W(l.target, u), l.pointerType) : l.isOverTarget && l.pointerType != null && K(W(l.target, u), l.pointerType, !1), l.isPressed = !1, l.isOverTarget = !1, l.activePointerId = null, l.pointerType = null, E(), v || he(l.target), "ontouchend" in l.target && u.pointerType !== "mouse" && P(l.target, "touchend", c, {
1215
- once: !0
1216
- }));
1217
- }, c = (u) => {
1218
- It(u.target) && u.preventDefault();
1219
- }, S = (u) => {
1220
- _(u);
1221
- };
1222
- y.onDragStart = (u) => {
1223
- u.currentTarget.contains(u.target) && _(u);
1224
- };
1225
- } else {
1226
- y.onMouseDown = (c) => {
1227
- if (c.button !== 0 || !c.currentTarget.contains(c.target)) return;
1228
- if (Ce(c.currentTarget) && c.preventDefault(), l.ignoreEmulatedMouseEvents) {
1229
- c.stopPropagation();
1230
- return;
1606
+ }
1607
+ }, [
1608
+ w,
1609
+ K,
1610
+ T,
1611
+ M
1612
+ ]);
1613
+ let [L, C] = te(null);
1614
+ le(() => {
1615
+ let o = D.current;
1616
+ if (L === "pointer") {
1617
+ let f = (h) => {
1618
+ if (h.pointerId === o.activePointerId && o.isPressed && h.button === 0 && o.target) {
1619
+ if (P(o.target, E(h)) && o.pointerType != null) {
1620
+ let g = !1, S = setTimeout(() => {
1621
+ o.isPressed && o.target instanceof HTMLElement && (g ? j(h) : (ce(o.target), o.target.click()));
1622
+ }, 80);
1623
+ h.currentTarget && K(h.currentTarget, "click", () => g = !0, !0), o.disposables.push(() => clearTimeout(S));
1624
+ } else j(h);
1625
+ o.isOverTarget = !1;
1231
1626
  }
1232
- l.isPressed = !0, l.isOverTarget = !0, l.target = c.currentTarget, l.pointerType = Ae(c.nativeEvent) ? "virtual" : "mouse", !o && !p && j(c.currentTarget), x(c, l.pointerType) && c.stopPropagation(), P(A(c.currentTarget), "mouseup", d, !1);
1233
- }, y.onMouseEnter = (c) => {
1234
- if (!c.currentTarget.contains(c.target)) return;
1235
- let S = !0;
1236
- l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !0, S = x(c, l.pointerType)), S && c.stopPropagation();
1237
- }, y.onMouseLeave = (c) => {
1238
- if (!c.currentTarget.contains(c.target)) return;
1239
- let S = !0;
1240
- l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !1, S = K(c, l.pointerType, !1), C(c)), S && c.stopPropagation();
1241
- }, y.onMouseUp = (c) => {
1242
- c.currentTarget.contains(c.target) && !l.ignoreEmulatedMouseEvents && c.button === 0 && D(c, l.pointerType || "mouse");
1627
+ }, a = (h) => {
1628
+ j(h);
1243
1629
  };
1244
- let d = (c) => {
1245
- if (c.button === 0) {
1246
- if (l.isPressed = !1, E(), l.ignoreEmulatedMouseEvents) {
1247
- l.ignoreEmulatedMouseEvents = !1;
1630
+ return K(R(o.target), "pointerup", f, !1), K(R(o.target), "pointercancel", a, !1), () => {
1631
+ M(R(o.target), "pointerup", f, !1), M(R(o.target), "pointercancel", a, !1);
1632
+ };
1633
+ } else if (L === "mouse" && process.env.NODE_ENV === "test") {
1634
+ let f = (a) => {
1635
+ if (a.button === 0) {
1636
+ if (o.ignoreEmulatedMouseEvents) {
1637
+ o.ignoreEmulatedMouseEvents = !1;
1248
1638
  return;
1249
1639
  }
1250
- l.target && ie(c, l.target) && l.pointerType != null ? K(W(l.target, c), l.pointerType) : l.target && l.isOverTarget && l.pointerType != null && K(W(l.target, c), l.pointerType, !1), l.isOverTarget = !1;
1640
+ o.target && P(o.target, a.target) && o.pointerType != null || j(a), o.isOverTarget = !1;
1251
1641
  }
1252
1642
  };
1253
- y.onTouchStart = (c) => {
1254
- if (!c.currentTarget.contains(c.target)) return;
1255
- let S = Zr(c.nativeEvent);
1256
- if (!S) return;
1257
- l.activePointerId = S.identifier, l.ignoreEmulatedMouseEvents = !0, l.isOverTarget = !0, l.isPressed = !0, l.target = c.currentTarget, l.pointerType = "touch", !o && !p && j(c.currentTarget), v || lt(l.target), x(X(l.target, c), l.pointerType) && c.stopPropagation(), P(Q(c.currentTarget), "scroll", T, !0);
1258
- }, y.onTouchMove = (c) => {
1259
- if (!c.currentTarget.contains(c.target)) return;
1260
- if (!l.isPressed) {
1261
- c.stopPropagation();
1262
- return;
1263
- }
1264
- let S = at(c.nativeEvent, l.activePointerId), u = !0;
1265
- S && ie(S, c.currentTarget) ? !l.isOverTarget && l.pointerType != null && (l.isOverTarget = !0, u = x(X(l.target, c), l.pointerType)) : l.isOverTarget && l.pointerType != null && (l.isOverTarget = !1, u = K(X(l.target, c), l.pointerType, !1), C(X(l.target, c))), u && c.stopPropagation();
1266
- }, y.onTouchEnd = (c) => {
1267
- if (!c.currentTarget.contains(c.target)) return;
1268
- if (!l.isPressed) {
1269
- c.stopPropagation();
1270
- return;
1271
- }
1272
- let S = at(c.nativeEvent, l.activePointerId), u = !0;
1273
- S && ie(S, c.currentTarget) && l.pointerType != null ? (D(X(l.target, c), l.pointerType), u = K(X(l.target, c), l.pointerType)) : l.isOverTarget && l.pointerType != null && (u = K(X(l.target, c), l.pointerType, !1)), u && c.stopPropagation(), l.isPressed = !1, l.activePointerId = null, l.isOverTarget = !1, l.ignoreEmulatedMouseEvents = !0, l.target && !v && he(l.target), E();
1274
- }, y.onTouchCancel = (c) => {
1275
- c.currentTarget.contains(c.target) && (c.stopPropagation(), l.isPressed && _(X(l.target, c)));
1643
+ return K(R(o.target), "mouseup", f, !1), () => {
1644
+ M(R(o.target), "mouseup", f, !1);
1276
1645
  };
1277
- let T = (c) => {
1278
- l.isPressed && c.target.contains(l.target) && _({
1279
- currentTarget: l.target,
1646
+ } else if (L === "touch" && process.env.NODE_ENV === "test") {
1647
+ let f = (a) => {
1648
+ o.isPressed && P(E(a), o.target) && j({
1649
+ currentTarget: o.target,
1280
1650
  shiftKey: !1,
1281
1651
  ctrlKey: !1,
1282
1652
  metaKey: !1,
1283
1653
  altKey: !1
1284
1654
  });
1285
1655
  };
1286
- y.onDragStart = (c) => {
1287
- c.currentTarget.contains(c.target) && _(c);
1656
+ return K(ie(o.target), "scroll", f, !0), () => {
1657
+ M(ie(o.target), "scroll", f, !0);
1288
1658
  };
1289
1659
  }
1290
- return y;
1291
1660
  }, [
1292
- P,
1293
- o,
1294
- p,
1295
- E,
1296
- v,
1297
- _,
1298
- C,
1661
+ L,
1299
1662
  K,
1300
- x,
1301
- D
1663
+ M
1302
1664
  ]);
1303
- return O(() => () => {
1304
- var l;
1305
- v || he((l = k.current.target) !== null && l !== void 0 ? l : void 0);
1665
+ let z = ae(() => {
1666
+ let o = D.current, f = {
1667
+ onKeyDown(a) {
1668
+ if (Ye(a.nativeEvent, a.currentTarget) && P(a.currentTarget, E(a))) {
1669
+ var h;
1670
+ Ct(E(a), a.key) && a.preventDefault();
1671
+ let g = !0;
1672
+ !o.isPressed && !a.repeat && (o.target = a.currentTarget, o.isPressed = !0, N(!0), o.pointerType = "keyboard", g = I(a, "keyboard")), g && a.stopPropagation(), a.metaKey && be() && ((h = o.metaKeyEvents) === null || h === void 0 || h.set(a.key, a.nativeEvent));
1673
+ } else a.key === "Meta" && (o.metaKeyEvents = /* @__PURE__ */ new Map());
1674
+ },
1675
+ onClick(a) {
1676
+ if (!(a && !P(a.currentTarget, E(a))) && a && a.button === 0 && !o.isTriggeringEvent && !ue.isOpening) {
1677
+ let h = !0;
1678
+ if (c && a.preventDefault(), !o.ignoreEmulatedMouseEvents && !o.isPressed && (o.pointerType === "virtual" || Ze(a.nativeEvent))) {
1679
+ let g = I(a, "virtual"), S = B(a, "virtual"), U = F(a, "virtual");
1680
+ W(a), h = g && S && U;
1681
+ } else if (o.isPressed && o.pointerType !== "keyboard") {
1682
+ let g = o.pointerType || a.nativeEvent.pointerType || "virtual", S = B(ve(a.currentTarget, a), g), U = F(ve(a.currentTarget, a), g, !0);
1683
+ h = S && U, o.isOverTarget = !1, W(a), O(a);
1684
+ }
1685
+ o.ignoreEmulatedMouseEvents = !1, h && a.stopPropagation();
1686
+ }
1687
+ }
1688
+ };
1689
+ return typeof PointerEvent < "u" ? (f.onPointerDown = (a) => {
1690
+ if (a.button !== 0 || !P(a.currentTarget, E(a))) return;
1691
+ if (kr(a.nativeEvent)) {
1692
+ o.pointerType = "virtual";
1693
+ return;
1694
+ }
1695
+ o.pointerType = a.pointerType;
1696
+ let h = !0;
1697
+ if (!o.isPressed) {
1698
+ o.isPressed = !0, C("pointer"), o.isOverTarget = !0, o.activePointerId = a.pointerId, o.target = a.currentTarget, b || Kt(o.target), h = I(a, o.pointerType);
1699
+ let g = E(a);
1700
+ "releasePointerCapture" in g && ("hasPointerCapture" in g ? g.hasPointerCapture(a.pointerId) && g.releasePointerCapture(a.pointerId) : g.releasePointerCapture(a.pointerId));
1701
+ }
1702
+ h && a.stopPropagation();
1703
+ }, f.onMouseDown = (a) => {
1704
+ if (P(a.currentTarget, E(a)) && a.button === 0) {
1705
+ if (p) {
1706
+ let h = Pt(a.target);
1707
+ h && o.disposables.push(h);
1708
+ }
1709
+ a.stopPropagation();
1710
+ }
1711
+ }, f.onPointerUp = (a) => {
1712
+ !P(a.currentTarget, E(a)) || o.pointerType === "virtual" || a.button === 0 && !o.isPressed && B(a, o.pointerType || a.pointerType);
1713
+ }, f.onPointerEnter = (a) => {
1714
+ a.pointerId === o.activePointerId && o.target && !o.isOverTarget && o.pointerType != null && (o.isOverTarget = !0, I(ve(o.target, a), o.pointerType));
1715
+ }, f.onPointerLeave = (a) => {
1716
+ a.pointerId === o.activePointerId && o.target && o.isOverTarget && o.pointerType != null && (o.isOverTarget = !1, F(ve(o.target, a), o.pointerType, !1), G(a));
1717
+ }, f.onDragStart = (a) => {
1718
+ P(a.currentTarget, E(a)) && O(a);
1719
+ }) : process.env.NODE_ENV === "test" && (f.onMouseDown = (a) => {
1720
+ if (a.button !== 0 || !P(a.currentTarget, E(a))) return;
1721
+ if (o.ignoreEmulatedMouseEvents) {
1722
+ a.stopPropagation();
1723
+ return;
1724
+ }
1725
+ if (o.isPressed = !0, C("mouse"), o.isOverTarget = !0, o.target = a.currentTarget, o.pointerType = Ze(a.nativeEvent) ? "virtual" : "mouse", Ut(() => I(a, o.pointerType)) && a.stopPropagation(), p) {
1726
+ let g = Pt(a.target);
1727
+ g && o.disposables.push(g);
1728
+ }
1729
+ }, f.onMouseEnter = (a) => {
1730
+ if (!P(a.currentTarget, E(a))) return;
1731
+ let h = !0;
1732
+ o.isPressed && !o.ignoreEmulatedMouseEvents && o.pointerType != null && (o.isOverTarget = !0, h = I(a, o.pointerType)), h && a.stopPropagation();
1733
+ }, f.onMouseLeave = (a) => {
1734
+ if (!P(a.currentTarget, E(a))) return;
1735
+ let h = !0;
1736
+ o.isPressed && !o.ignoreEmulatedMouseEvents && o.pointerType != null && (o.isOverTarget = !1, h = F(a, o.pointerType, !1), G(a)), h && a.stopPropagation();
1737
+ }, f.onMouseUp = (a) => {
1738
+ P(a.currentTarget, E(a)) && !o.ignoreEmulatedMouseEvents && a.button === 0 && !o.isPressed && B(a, o.pointerType || "mouse");
1739
+ }, f.onTouchStart = (a) => {
1740
+ if (!P(a.currentTarget, E(a))) return;
1741
+ let h = Wr(a.nativeEvent);
1742
+ if (!h) return;
1743
+ o.activePointerId = h.identifier, o.ignoreEmulatedMouseEvents = !0, o.isOverTarget = !0, o.isPressed = !0, C("touch"), o.target = a.currentTarget, o.pointerType = "touch", b || Kt(o.target), I(fe(o.target, a), o.pointerType) && a.stopPropagation();
1744
+ }, f.onTouchMove = (a) => {
1745
+ if (!P(a.currentTarget, E(a))) return;
1746
+ if (!o.isPressed) {
1747
+ a.stopPropagation();
1748
+ return;
1749
+ }
1750
+ let h = Nt(a.nativeEvent, o.activePointerId), g = !0;
1751
+ h && Mt(h, a.currentTarget) ? !o.isOverTarget && o.pointerType != null && (o.isOverTarget = !0, g = I(fe(o.target, a), o.pointerType)) : o.isOverTarget && o.pointerType != null && (o.isOverTarget = !1, g = F(fe(o.target, a), o.pointerType, !1), G(fe(o.target, a))), g && a.stopPropagation();
1752
+ }, f.onTouchEnd = (a) => {
1753
+ if (!P(a.currentTarget, E(a))) return;
1754
+ if (!o.isPressed) {
1755
+ a.stopPropagation();
1756
+ return;
1757
+ }
1758
+ let h = Nt(a.nativeEvent, o.activePointerId), g = !0;
1759
+ h && Mt(h, a.currentTarget) && o.pointerType != null ? (B(fe(o.target, a), o.pointerType), g = F(fe(o.target, a), o.pointerType), A(a.nativeEvent, o.target)) : o.isOverTarget && o.pointerType != null && (g = F(fe(o.target, a), o.pointerType, !1)), g && a.stopPropagation(), o.isPressed = !1, C(null), o.activePointerId = null, o.isOverTarget = !1, o.ignoreEmulatedMouseEvents = !0, o.target && !b && Ge(o.target), T();
1760
+ }, f.onTouchCancel = (a) => {
1761
+ P(a.currentTarget, E(a)) && (a.stopPropagation(), o.isPressed && O(fe(o.target, a)));
1762
+ }, f.onDragStart = (a) => {
1763
+ P(a.currentTarget, E(a)) && O(a);
1764
+ }), f;
1306
1765
  }, [
1307
- v
1766
+ c,
1767
+ p,
1768
+ T,
1769
+ b,
1770
+ O,
1771
+ G,
1772
+ F,
1773
+ I,
1774
+ B,
1775
+ W,
1776
+ A
1777
+ ]);
1778
+ return V(() => {
1779
+ if (!$ || process.env.NODE_ENV === "test") return;
1780
+ const o = R($.current);
1781
+ if (!o || !o.head || o.getElementById(_t)) return;
1782
+ const f = o.createElement("style");
1783
+ f.id = _t, f.textContent = `
1784
+ @layer {
1785
+ [${Lt}] {
1786
+ touch-action: pan-x pan-y pinch-zoom;
1787
+ }
1788
+ }
1789
+ `.trim(), o.head.prepend(f);
1790
+ }, [
1791
+ $
1792
+ ]), V(() => {
1793
+ let o = D.current;
1794
+ return () => {
1795
+ var f;
1796
+ b || Ge((f = o.target) !== null && f !== void 0 ? f : void 0);
1797
+ for (let a of o.disposables) a();
1798
+ o.disposables = [];
1799
+ };
1800
+ }, [
1801
+ b
1308
1802
  ]), {
1309
- isPressed: a || m,
1310
- pressProps: q($, F)
1803
+ isPressed: u || x,
1804
+ pressProps: ne(m, z, {
1805
+ [Lt]: !0
1806
+ })
1311
1807
  };
1312
1808
  }
1313
- function je(t) {
1809
+ function ut(t) {
1314
1810
  return t.tagName === "A" && t.hasAttribute("href");
1315
1811
  }
1316
- function De(t, e) {
1317
- const { key: r, code: n } = t, i = e, s = i.getAttribute("role");
1318
- return (r === "Enter" || r === " " || r === "Spacebar" || n === "Space") && !(i instanceof Q(i).HTMLInputElement && !At(i, r) || i instanceof Q(i).HTMLTextAreaElement || i.isContentEditable) && // Links should only trigger with Enter key
1319
- !((s === "link" || !s && je(i)) && r !== "Enter");
1812
+ function Ye(t, e) {
1813
+ const { key: n, code: r } = t, i = e, l = i.getAttribute("role");
1814
+ return (n === "Enter" || n === " " || n === "Spacebar" || r === "Space") && !(i instanceof ie(i).HTMLInputElement && !un(i, n) || i instanceof ie(i).HTMLTextAreaElement || i.isContentEditable) && // Links should only trigger with Enter key
1815
+ !((l === "link" || !l && ut(i)) && n !== "Enter");
1320
1816
  }
1321
- function Zr(t) {
1817
+ function Wr(t) {
1322
1818
  const { targetTouches: e } = t;
1323
1819
  return e.length > 0 ? e[0] : null;
1324
1820
  }
1325
- function at(t, e) {
1326
- const r = t.changedTouches;
1327
- for (let n = 0; n < r.length; n++) {
1328
- const i = r[n];
1821
+ function Nt(t, e) {
1822
+ const n = t.changedTouches;
1823
+ for (let r = 0; r < n.length; r++) {
1824
+ const i = n[r];
1329
1825
  if (i.identifier === e) return i;
1330
1826
  }
1331
1827
  return null;
1332
1828
  }
1333
- function X(t, e) {
1334
- let r = 0, n = 0;
1335
- return e.targetTouches && e.targetTouches.length === 1 && (r = e.targetTouches[0].clientX, n = e.targetTouches[0].clientY), {
1829
+ function fe(t, e) {
1830
+ let n = 0, r = 0;
1831
+ return e.targetTouches && e.targetTouches.length === 1 && (n = e.targetTouches[0].clientX, r = e.targetTouches[0].clientY), {
1336
1832
  currentTarget: t,
1337
1833
  shiftKey: e.shiftKey,
1338
1834
  ctrlKey: e.ctrlKey,
1339
1835
  metaKey: e.metaKey,
1340
1836
  altKey: e.altKey,
1341
- clientX: r,
1342
- clientY: n
1837
+ clientX: n,
1838
+ clientY: r
1343
1839
  };
1344
1840
  }
1345
- function W(t, e) {
1346
- let r = e.clientX, n = e.clientY;
1841
+ function ve(t, e) {
1842
+ let n = e.clientX, r = e.clientY;
1347
1843
  return {
1348
1844
  currentTarget: t,
1349
1845
  shiftKey: e.shiftKey,
1350
1846
  ctrlKey: e.ctrlKey,
1351
1847
  metaKey: e.metaKey,
1352
1848
  altKey: e.altKey,
1353
- clientX: r,
1354
- clientY: n
1849
+ clientX: n,
1850
+ clientY: r,
1851
+ key: e.key
1355
1852
  };
1356
1853
  }
1357
- function Qr(t) {
1358
- let e = 0, r = 0;
1359
- return t.width !== void 0 ? e = t.width / 2 : t.radiusX !== void 0 && (e = t.radiusX), t.height !== void 0 ? r = t.height / 2 : t.radiusY !== void 0 && (r = t.radiusY), {
1360
- top: t.clientY - r,
1854
+ function Hr(t) {
1855
+ let e = 0, n = 0;
1856
+ return t.width !== void 0 ? e = t.width / 2 : t.radiusX !== void 0 && (e = t.radiusX), t.height !== void 0 ? n = t.height / 2 : t.radiusY !== void 0 && (n = t.radiusY), {
1857
+ top: t.clientY - n,
1361
1858
  right: t.clientX + e,
1362
- bottom: t.clientY + r,
1859
+ bottom: t.clientY + n,
1363
1860
  left: t.clientX - e
1364
1861
  };
1365
1862
  }
1366
- function en(t, e) {
1863
+ function Vr(t, e) {
1367
1864
  return !(t.left > e.right || e.left > t.right || t.top > e.bottom || e.top > t.bottom);
1368
1865
  }
1369
- function ie(t, e) {
1370
- let r = e.getBoundingClientRect(), n = Qr(t);
1371
- return en(r, n);
1866
+ function Mt(t, e) {
1867
+ let n = e.getBoundingClientRect(), r = Hr(t);
1868
+ return Vr(n, r);
1372
1869
  }
1373
- function Ce(t) {
1374
- return !(t instanceof HTMLElement) || !t.hasAttribute("draggable");
1375
- }
1376
- function It(t) {
1377
- return t instanceof HTMLInputElement ? !1 : t instanceof HTMLButtonElement ? t.type !== "submit" && t.type !== "reset" : !je(t);
1870
+ function jr(t) {
1871
+ return t instanceof HTMLInputElement ? !1 : t instanceof HTMLButtonElement ? t.type !== "submit" && t.type !== "reset" : !ut(t);
1378
1872
  }
1379
- function ct(t, e) {
1380
- return t instanceof HTMLInputElement ? !At(t, e) : It(t);
1873
+ function Ct(t, e) {
1874
+ return t instanceof HTMLInputElement ? !un(t, e) : jr(t);
1381
1875
  }
1382
- const tn = /* @__PURE__ */ new Set([
1876
+ const Gr = /* @__PURE__ */ new Set([
1383
1877
  "checkbox",
1384
1878
  "radio",
1385
1879
  "range",
@@ -1390,86 +1884,178 @@ const tn = /* @__PURE__ */ new Set([
1390
1884
  "submit",
1391
1885
  "reset"
1392
1886
  ]);
1393
- function At(t, e) {
1394
- return t.type === "checkbox" || t.type === "radio" ? e === " " : tn.has(t.type);
1887
+ function un(t, e) {
1888
+ return t.type === "checkbox" || t.type === "radio" ? e === " " : Gr.has(t.type);
1395
1889
  }
1396
- let ve = null, rn = /* @__PURE__ */ new Set(), de = /* @__PURE__ */ new Map(), re = !1, Oe = !1;
1397
- function Ve(t, e) {
1398
- for (let r of rn) r(t, e);
1890
+ let ke = null;
1891
+ const Yr = /* @__PURE__ */ new Set();
1892
+ let Pe = /* @__PURE__ */ new Map(), he = !1, et = !1;
1893
+ function dt(t, e) {
1894
+ for (let n of Yr) n(t, e);
1399
1895
  }
1400
- function nn(t) {
1401
- return !(t.metaKey || !ee() && t.altKey || t.ctrlKey || t.key === "Control" || t.key === "Shift" || t.key === "Meta");
1896
+ function Xr(t) {
1897
+ return !(t.metaKey || !be() && t.altKey || t.ctrlKey || t.key === "Control" || t.key === "Shift" || t.key === "Meta");
1402
1898
  }
1403
- function Se(t) {
1404
- re = !0, nn(t) && (ve = "keyboard", Ve("keyboard", t));
1899
+ function Fe(t) {
1900
+ he = !0, !ue.isOpening && Xr(t) && (ke = "keyboard", dt("keyboard", t));
1405
1901
  }
1406
- function z(t) {
1407
- ve = "pointer", (t.type === "mousedown" || t.type === "pointerdown") && (re = !0, Ve("pointer", t));
1902
+ function ee(t) {
1903
+ ke = "pointer", "pointerType" in t && t.pointerType, (t.type === "mousedown" || t.type === "pointerdown") && (he = !0, dt("pointer", t));
1408
1904
  }
1409
- function Ft(t) {
1410
- Ae(t) && (re = !0, ve = "virtual");
1905
+ function dn(t) {
1906
+ !ue.isOpening && Ze(t) && (he = !0, ke = "virtual");
1411
1907
  }
1412
- function zt(t) {
1413
- t.target === window || t.target === document || (!re && !Oe && (ve = "virtual", Ve("virtual", t)), re = !1, Oe = !1);
1908
+ function fn(t) {
1909
+ E(t) === window || E(t) === document || Ie || !t.isTrusted || (!he && !et && (ke = "virtual", dt("virtual", t)), he = !1, et = !1);
1414
1910
  }
1415
- function Ot() {
1416
- re = !1, Oe = !0;
1911
+ function pn() {
1912
+ Ie || (he = !1, et = !0);
1417
1913
  }
1418
- function ut(t) {
1419
- if (typeof window > "u" || de.get(Q(t))) return;
1420
- const e = Q(t), r = A(t);
1421
- let n = e.HTMLElement.prototype.focus;
1914
+ function Dt(t) {
1915
+ if (typeof window > "u" || typeof document > "u" || Pe.get(ie(t))) return;
1916
+ const e = ie(t), n = R(t);
1917
+ let r = e.HTMLElement.prototype.focus;
1422
1918
  e.HTMLElement.prototype.focus = function() {
1423
- re = !0, n.apply(this, arguments);
1424
- }, r.addEventListener("keydown", Se, !0), r.addEventListener("keyup", Se, !0), r.addEventListener("click", Ft, !0), e.addEventListener("focus", zt, !0), e.addEventListener("blur", Ot, !1), typeof PointerEvent < "u" ? (r.addEventListener("pointerdown", z, !0), r.addEventListener("pointermove", z, !0), r.addEventListener("pointerup", z, !0)) : (r.addEventListener("mousedown", z, !0), r.addEventListener("mousemove", z, !0), r.addEventListener("mouseup", z, !0)), e.addEventListener("beforeunload", () => {
1425
- Nt(t);
1919
+ he = !0, r.apply(this, arguments);
1920
+ }, n.addEventListener("keydown", Fe, !0), n.addEventListener("keyup", Fe, !0), n.addEventListener("click", dn, !0), e.addEventListener("focus", fn, !0), e.addEventListener("blur", pn, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", ee, !0), n.addEventListener("pointermove", ee, !0), n.addEventListener("pointerup", ee, !0)) : process.env.NODE_ENV === "test" && (n.addEventListener("mousedown", ee, !0), n.addEventListener("mousemove", ee, !0), n.addEventListener("mouseup", ee, !0)), e.addEventListener("beforeunload", () => {
1921
+ vn(t);
1426
1922
  }, {
1427
1923
  once: !0
1428
- }), de.set(e, {
1429
- focus: n
1924
+ }), Pe.set(e, {
1925
+ focus: r
1430
1926
  });
1431
1927
  }
1432
- const Nt = (t, e) => {
1433
- const r = Q(t), n = A(t);
1434
- e && n.removeEventListener("DOMContentLoaded", e), de.has(r) && (r.HTMLElement.prototype.focus = de.get(r).focus, n.removeEventListener("keydown", Se, !0), n.removeEventListener("keyup", Se, !0), n.removeEventListener("click", Ft, !0), r.removeEventListener("focus", zt, !0), r.removeEventListener("blur", Ot, !1), typeof PointerEvent < "u" ? (n.removeEventListener("pointerdown", z, !0), n.removeEventListener("pointermove", z, !0), n.removeEventListener("pointerup", z, !0)) : (n.removeEventListener("mousedown", z, !0), n.removeEventListener("mousemove", z, !0), n.removeEventListener("mouseup", z, !0)), de.delete(r));
1928
+ const vn = (t, e) => {
1929
+ const n = ie(t), r = R(t);
1930
+ e && r.removeEventListener("DOMContentLoaded", e), Pe.has(n) && (n.HTMLElement.prototype.focus = Pe.get(n).focus, r.removeEventListener("keydown", Fe, !0), r.removeEventListener("keyup", Fe, !0), r.removeEventListener("click", dn, !0), n.removeEventListener("focus", fn, !0), n.removeEventListener("blur", pn, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", ee, !0), r.removeEventListener("pointermove", ee, !0), r.removeEventListener("pointerup", ee, !0)) : process.env.NODE_ENV === "test" && (r.removeEventListener("mousedown", ee, !0), r.removeEventListener("mousemove", ee, !0), r.removeEventListener("mouseup", ee, !0)), Pe.delete(n));
1435
1931
  };
1436
- function ln(t) {
1437
- const e = A(t);
1438
- let r;
1439
- return e.readyState !== "loading" ? ut(t) : (r = () => {
1440
- ut(t);
1441
- }, e.addEventListener("DOMContentLoaded", r)), () => Nt(t, r);
1442
- }
1443
- typeof document < "u" && ln();
1444
- function Ne() {
1445
- return ve;
1446
- }
1447
- const on = 500;
1448
- function sn(t) {
1449
- let { isDisabled: e, onLongPressStart: r, onLongPressEnd: n, onLongPress: i, threshold: s = on, accessibilityDescription: o } = t;
1450
- const a = L(void 0);
1451
- let { addGlobalListener: p, removeGlobalListener: h } = xt(), { pressProps: v } = Ct({
1932
+ function qr(t) {
1933
+ const e = R(t);
1934
+ let n;
1935
+ return e.readyState !== "loading" ? Dt(t) : (n = () => {
1936
+ Dt(t);
1937
+ }, e.addEventListener("DOMContentLoaded", n)), () => vn(t, n);
1938
+ }
1939
+ typeof document < "u" && qr();
1940
+ function tt() {
1941
+ return ke;
1942
+ }
1943
+ function Ae(t) {
1944
+ if (!t.isConnected) return;
1945
+ const e = R(t);
1946
+ if (tt() === "virtual") {
1947
+ let n = se(e);
1948
+ Zt(() => {
1949
+ const r = se(e);
1950
+ (r === n || r === e.body) && t.isConnected && ce(t);
1951
+ });
1952
+ } else ce(t);
1953
+ }
1954
+ function Jr(t) {
1955
+ let { isDisabled: e, onFocus: n, onBlur: r, onFocusChange: i } = t;
1956
+ const l = H((u) => {
1957
+ if (E(u) === u.currentTarget)
1958
+ return r && r(u), i && i(!1), !0;
1959
+ }, [
1960
+ r,
1961
+ i
1962
+ ]), s = Fr(l), c = H((u) => {
1963
+ let p = E(u);
1964
+ const d = R(p), b = d ? se(d) : se();
1965
+ p === u.currentTarget && p === b && (n && n(u), i && i(!0), s(u));
1966
+ }, [
1967
+ i,
1968
+ n,
1969
+ s
1970
+ ]);
1971
+ return {
1972
+ focusProps: {
1973
+ onFocus: !e && (n || i || r) ? c : void 0,
1974
+ onBlur: !e && (r || i) ? l : void 0
1975
+ }
1976
+ };
1977
+ }
1978
+ function It(t) {
1979
+ if (!t) return;
1980
+ let e = !0;
1981
+ return (n) => {
1982
+ let r = {
1983
+ ...n,
1984
+ preventDefault() {
1985
+ n.preventDefault();
1986
+ },
1987
+ isDefaultPrevented() {
1988
+ return n.isDefaultPrevented();
1989
+ },
1990
+ stopPropagation() {
1991
+ e && process.env.NODE_ENV !== "production" ? console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.") : e = !0;
1992
+ },
1993
+ continuePropagation() {
1994
+ e = !1;
1995
+ },
1996
+ isPropagationStopped() {
1997
+ return e;
1998
+ }
1999
+ };
2000
+ t(r), e && n.stopPropagation();
2001
+ };
2002
+ }
2003
+ function Zr(t) {
2004
+ return {
2005
+ keyboardProps: t.isDisabled ? {} : {
2006
+ onKeyDown: It(t.onKeyDown),
2007
+ onKeyUp: It(t.onKeyUp)
2008
+ }
2009
+ };
2010
+ }
2011
+ let Qr = /* @__PURE__ */ Y.createContext(null);
2012
+ function ei(t) {
2013
+ let e = ye(Qr) || {};
2014
+ tn(e, t);
2015
+ let { ref: n, ...r } = e;
2016
+ return r;
2017
+ }
2018
+ function ti(t, e) {
2019
+ let { focusProps: n } = Jr(t), { keyboardProps: r } = Zr(t), i = ne(n, r), l = ei(e), s = t.isDisabled ? {} : l, c = k(t.autoFocus);
2020
+ V(() => {
2021
+ c.current && e.current && Ae(e.current), c.current = !1;
2022
+ }, [
2023
+ e
2024
+ ]);
2025
+ let u = t.excludeFromTabOrder ? -1 : 0;
2026
+ return t.isDisabled && (u = void 0), {
2027
+ focusableProps: ne({
2028
+ ...i,
2029
+ tabIndex: u
2030
+ }, s)
2031
+ };
2032
+ }
2033
+ const ni = 500;
2034
+ function ri(t) {
2035
+ let { isDisabled: e, onLongPressStart: n, onLongPressEnd: r, onLongPress: i, threshold: l = ni, accessibilityDescription: s } = t;
2036
+ const c = k(void 0);
2037
+ let { addGlobalListener: u, removeGlobalListener: p } = Qt(), { pressProps: d } = cn({
1452
2038
  isDisabled: e,
1453
2039
  onPressStart($) {
1454
- if ($.continuePropagation(), ($.pointerType === "mouse" || $.pointerType === "touch") && (r && r({
2040
+ if ($.continuePropagation(), ($.pointerType === "mouse" || $.pointerType === "touch") && (n && n({
1455
2041
  ...$,
1456
2042
  type: "longpressstart"
1457
- }), a.current = setTimeout(() => {
2043
+ }), c.current = setTimeout(() => {
1458
2044
  $.target.dispatchEvent(new PointerEvent("pointercancel", {
1459
2045
  bubbles: !0
1460
- })), i && i({
2046
+ })), R($.target).activeElement !== $.target && ce($.target), i && i({
1461
2047
  ...$,
1462
2048
  type: "longpress"
1463
- }), a.current = void 0;
1464
- }, s), $.pointerType === "touch")) {
1465
- let m = (M) => {
1466
- M.preventDefault();
2049
+ }), c.current = void 0;
2050
+ }, l), $.pointerType === "touch")) {
2051
+ let m = (x) => {
2052
+ x.preventDefault();
1467
2053
  };
1468
- p($.target, "contextmenu", m, {
2054
+ u($.target, "contextmenu", m, {
1469
2055
  once: !0
1470
- }), p(window, "pointerup", () => {
2056
+ }), u(window, "pointerup", () => {
1471
2057
  setTimeout(() => {
1472
- h($.target, "contextmenu", m);
2058
+ p($.target, "contextmenu", m);
1473
2059
  }, 30);
1474
2060
  }, {
1475
2061
  once: !0
@@ -1477,117 +2063,86 @@ function sn(t) {
1477
2063
  }
1478
2064
  },
1479
2065
  onPressEnd($) {
1480
- a.current && clearTimeout(a.current), n && ($.pointerType === "mouse" || $.pointerType === "touch") && n({
2066
+ c.current && clearTimeout(c.current), r && ($.pointerType === "mouse" || $.pointerType === "touch") && r({
1481
2067
  ...$,
1482
2068
  type: "longpressend"
1483
2069
  });
1484
2070
  }
1485
- }), w = Br(i && !e ? o : void 0);
2071
+ }), b = Kr(i && !e ? s : void 0);
1486
2072
  return {
1487
- longPressProps: q(v, w)
2073
+ longPressProps: ne(d, b)
1488
2074
  };
1489
2075
  }
1490
- function Re(t) {
1491
- const e = A(t);
1492
- if (Ne() === "virtual") {
1493
- let r = e.activeElement;
1494
- kt(() => {
1495
- e.activeElement === r && t.isConnected && j(t);
1496
- });
1497
- } else j(t);
2076
+ function ii(t) {
2077
+ if (!t.form)
2078
+ return Array.from(R(t).querySelectorAll(`input[type="radio"][name="${CSS.escape(t.name)}"]`)).filter((r) => !r.form);
2079
+ const e = t.form.elements.namedItem(t.name);
2080
+ let n = ie(t);
2081
+ return e instanceof n.RadioNodeList ? Array.from(e).filter((r) => r instanceof n.HTMLInputElement) : e instanceof n.HTMLInputElement ? [
2082
+ e
2083
+ ] : [];
1498
2084
  }
1499
- function an(t) {
1500
- const e = Q(t);
1501
- if (!(t instanceof e.HTMLElement) && !(t instanceof e.SVGElement)) return !1;
1502
- let { display: r, visibility: n } = t.style, i = r !== "none" && n !== "hidden" && n !== "collapse";
1503
- if (i) {
1504
- const { getComputedStyle: s } = t.ownerDocument.defaultView;
1505
- let { display: o, visibility: a } = s(t);
1506
- i = o !== "none" && a !== "hidden" && a !== "collapse";
1507
- }
1508
- return i;
2085
+ function oi(t) {
2086
+ if (t.checked) return !0;
2087
+ const e = ii(t);
2088
+ return e.length > 0 && !e.some((n) => n.checked);
1509
2089
  }
1510
- function cn(t, e) {
1511
- return !t.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
1512
- !t.hasAttribute("data-react-aria-prevent-focus") && (t.nodeName === "DETAILS" && e && e.nodeName !== "SUMMARY" ? t.hasAttribute("open") : !0);
1513
- }
1514
- function Rt(t, e) {
1515
- return t.nodeName !== "#comment" && an(t) && cn(t, e) && (!t.parentElement || Rt(t.parentElement, t));
2090
+ function bn(t, e) {
2091
+ return !t || !e ? !1 : e.some((n) => P(n, t));
1516
2092
  }
1517
- const Ge = [
1518
- "input:not([disabled]):not([type=hidden])",
1519
- "select:not([disabled])",
1520
- "textarea:not([disabled])",
1521
- "button:not([disabled])",
1522
- "a[href]",
1523
- "area[href]",
1524
- "summary",
1525
- "iframe",
1526
- "object",
1527
- "embed",
1528
- "audio[controls]",
1529
- "video[controls]",
1530
- "[contenteditable]"
1531
- ], un = Ge.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
1532
- Ge.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
1533
- const dn = Ge.join(':not([hidden]):not([tabindex="-1"]),');
1534
- function Bt(t, e) {
1535
- return !t || !e ? !1 : e.some((r) => r.contains(t));
1536
- }
1537
- function Ut(t, e, r) {
1538
- let n = e?.tabbable ? dn : un, i = A(t).createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
1539
- acceptNode(s) {
1540
- var o;
1541
- return !(e == null || (o = e.from) === null || o === void 0) && o.contains(s) ? NodeFilter.FILTER_REJECT : s.matches(n) && Rt(s) && (!r || Bt(s, r)) && (!e?.accept || e.accept(s)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
2093
+ function hn(t, e, n) {
2094
+ let r = e?.tabbable ? rn : nn, i = t?.nodeType === Node.ELEMENT_NODE ? t : null, l = R(i), s = nr(l, t || l, NodeFilter.SHOW_ELEMENT, {
2095
+ acceptNode(c) {
2096
+ return P(e?.from, c) || e?.tabbable && c.tagName === "INPUT" && c.getAttribute("type") === "radio" && (!oi(c) || s.currentNode.tagName === "INPUT" && s.currentNode.type === "radio" && s.currentNode.name === c.name) ? NodeFilter.FILTER_REJECT : r(c) && (!n || bn(c, n)) && (!e?.accept || e.accept(c)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1542
2097
  }
1543
2098
  });
1544
- return e?.from && (i.currentNode = e.from), i;
2099
+ return e?.from && (s.currentNode = e.from), s;
1545
2100
  }
1546
- class Xe {
2101
+ class ft {
1547
2102
  get size() {
1548
2103
  return this.fastMap.size;
1549
2104
  }
1550
2105
  getTreeNode(e) {
1551
2106
  return this.fastMap.get(e);
1552
2107
  }
1553
- addTreeNode(e, r, n) {
1554
- let i = this.fastMap.get(r ?? null);
2108
+ addTreeNode(e, n, r) {
2109
+ let i = this.fastMap.get(n ?? null);
1555
2110
  if (!i) return;
1556
- let s = new dt({
2111
+ let l = new Ft({
1557
2112
  scopeRef: e
1558
2113
  });
1559
- i.addChild(s), s.parent = i, this.fastMap.set(e, s), n && (s.nodeToRestore = n);
2114
+ i.addChild(l), l.parent = i, this.fastMap.set(e, l), r && (l.nodeToRestore = r);
1560
2115
  }
1561
2116
  addNode(e) {
1562
2117
  this.fastMap.set(e.scopeRef, e);
1563
2118
  }
1564
2119
  removeTreeNode(e) {
1565
2120
  if (e === null) return;
1566
- let r = this.fastMap.get(e);
1567
- if (!r) return;
1568
- let n = r.parent;
1569
- for (let s of this.traverse()) s !== r && r.nodeToRestore && s.nodeToRestore && r.scopeRef && r.scopeRef.current && Bt(s.nodeToRestore, r.scopeRef.current) && (s.nodeToRestore = r.nodeToRestore);
1570
- let i = r.children;
1571
- n && (n.removeChild(r), i.size > 0 && i.forEach((s) => n && n.addChild(s))), this.fastMap.delete(r.scopeRef);
2121
+ let n = this.fastMap.get(e);
2122
+ if (!n) return;
2123
+ let r = n.parent;
2124
+ for (let l of this.traverse()) l !== n && n.nodeToRestore && l.nodeToRestore && n.scopeRef && n.scopeRef.current && bn(l.nodeToRestore, n.scopeRef.current) && (l.nodeToRestore = n.nodeToRestore);
2125
+ let i = n.children;
2126
+ r && (r.removeChild(n), i.size > 0 && i.forEach((l) => r && r.addChild(l))), this.fastMap.delete(n.scopeRef);
1572
2127
  }
1573
2128
  // Pre Order Depth First
1574
2129
  *traverse(e = this.root) {
1575
- if (e.scopeRef != null && (yield e), e.children.size > 0) for (let r of e.children) yield* this.traverse(r);
2130
+ if (e.scopeRef != null && (yield e), e.children.size > 0) for (let n of e.children) yield* this.traverse(n);
1576
2131
  }
1577
2132
  clone() {
1578
2133
  var e;
1579
- let r = new Xe();
1580
- var n;
1581
- for (let i of this.traverse()) r.addTreeNode(i.scopeRef, (n = (e = i.parent) === null || e === void 0 ? void 0 : e.scopeRef) !== null && n !== void 0 ? n : null, i.nodeToRestore);
1582
- return r;
2134
+ let n = new ft();
2135
+ var r;
2136
+ for (let i of this.traverse()) n.addTreeNode(i.scopeRef, (r = (e = i.parent) === null || e === void 0 ? void 0 : e.scopeRef) !== null && r !== void 0 ? r : null, i.nodeToRestore);
2137
+ return n;
1583
2138
  }
1584
2139
  constructor() {
1585
- this.fastMap = /* @__PURE__ */ new Map(), this.root = new dt({
2140
+ this.fastMap = /* @__PURE__ */ new Map(), this.root = new Ft({
1586
2141
  scopeRef: null
1587
2142
  }), this.fastMap.set(null, this.root);
1588
2143
  }
1589
2144
  }
1590
- class dt {
2145
+ class Ft {
1591
2146
  addChild(e) {
1592
2147
  this.children.add(e), e.parent = this;
1593
2148
  }
@@ -1598,22 +2153,22 @@ class dt {
1598
2153
  this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = e.scopeRef;
1599
2154
  }
1600
2155
  }
1601
- new Xe();
1602
- function fn(t, e) {
1603
- let r = e?.isDisabled, [n, i] = B(!1);
1604
- return pe(() => {
1605
- if (t?.current && !r) {
1606
- let s = () => {
2156
+ new ft();
2157
+ function li(t, e) {
2158
+ let n = e?.isDisabled, [r, i] = te(!1);
2159
+ return le(() => {
2160
+ if (t?.current && !n) {
2161
+ let l = () => {
1607
2162
  if (t.current) {
1608
- let a = Ut(t.current, {
2163
+ let c = hn(t.current, {
1609
2164
  tabbable: !0
1610
2165
  });
1611
- i(!!a.nextNode());
2166
+ i(!!c.nextNode());
1612
2167
  }
1613
2168
  };
1614
- s();
1615
- let o = new MutationObserver(s);
1616
- return o.observe(t.current, {
2169
+ l();
2170
+ let s = new MutationObserver(l);
2171
+ return s.observe(t.current, {
1617
2172
  subtree: !0,
1618
2173
  childList: !0,
1619
2174
  attributes: !0,
@@ -1622,12 +2177,80 @@ function fn(t, e) {
1622
2177
  "disabled"
1623
2178
  ]
1624
2179
  }), () => {
1625
- o.disconnect();
2180
+ s.disconnect();
1626
2181
  };
1627
2182
  }
1628
- }), r ? !1 : n;
2183
+ }), n ? !1 : r;
2184
+ }
2185
+ function yn(t) {
2186
+ let e = ai(R(t));
2187
+ e !== t && (e && si(e, t), t && gn(t, e));
2188
+ }
2189
+ function si(t, e) {
2190
+ t.dispatchEvent(new FocusEvent("blur", {
2191
+ relatedTarget: e
2192
+ })), t.dispatchEvent(new FocusEvent("focusout", {
2193
+ bubbles: !0,
2194
+ relatedTarget: e
2195
+ }));
2196
+ }
2197
+ function gn(t, e) {
2198
+ t.dispatchEvent(new FocusEvent("focus", {
2199
+ relatedTarget: e
2200
+ })), t.dispatchEvent(new FocusEvent("focusin", {
2201
+ bubbles: !0,
2202
+ relatedTarget: e
2203
+ }));
2204
+ }
2205
+ function ai(t) {
2206
+ let e = se(t), n = e?.getAttribute("aria-activedescendant");
2207
+ return n && t.getElementById(n) || e;
2208
+ }
2209
+ function nt(t) {
2210
+ return br() ? t.altKey : t.ctrlKey;
2211
+ }
2212
+ function Xe(t, e) {
2213
+ var n, r;
2214
+ let i = `[data-key="${CSS.escape(String(e))}"]`, l = (n = t.current) === null || n === void 0 ? void 0 : n.dataset.collection;
2215
+ return l && (i = `[data-collection="${CSS.escape(l)}"]${i}`), (r = t.current) === null || r === void 0 ? void 0 : r.querySelector(i);
2216
+ }
2217
+ const $n = /* @__PURE__ */ new WeakMap();
2218
+ function ci(t) {
2219
+ let e = Oe();
2220
+ return $n.set(t, e), e;
2221
+ }
2222
+ function ui(t) {
2223
+ return $n.get(t);
1629
2224
  }
1630
- const pn = /* @__PURE__ */ new Set([
2225
+ const di = 1e3;
2226
+ function fi(t) {
2227
+ let { keyboardDelegate: e, selectionManager: n, onTypeSelect: r } = t, i = k({
2228
+ search: "",
2229
+ timeout: void 0
2230
+ }).current, l = (s) => {
2231
+ let c = pi(s.key);
2232
+ if (!(!c || s.ctrlKey || s.metaKey || !P(s.currentTarget, E(s)) || i.search.length === 0 && c === " ")) {
2233
+ if (c === " " && i.search.trim().length > 0 && (s.preventDefault(), "continuePropagation" in s || s.stopPropagation()), i.search += c, e.getKeyForSearch != null) {
2234
+ let u = e.getKeyForSearch(i.search, n.focusedKey);
2235
+ u == null && (u = e.getKeyForSearch(i.search)), u != null && (n.setFocusedKey(u), r && r(u));
2236
+ }
2237
+ clearTimeout(i.timeout), i.timeout = setTimeout(() => {
2238
+ i.search = "";
2239
+ }, di);
2240
+ }
2241
+ };
2242
+ return {
2243
+ typeSelectProps: {
2244
+ // Using a capturing listener to catch the keydown event before
2245
+ // other hooks in order to handle the Spacebar event.
2246
+ onKeyDownCapture: e.getKeyForSearch ? l : void 0
2247
+ }
2248
+ };
2249
+ }
2250
+ function pi(t) {
2251
+ return t.length === 1 || !/^[A-Z]/i.test(t) ? t : "";
2252
+ }
2253
+ const vi = /* @__PURE__ */ new Set([
1631
2254
  "Arab",
1632
2255
  "Syrc",
1633
2256
  "Samr",
@@ -1638,7 +2261,7 @@ const pn = /* @__PURE__ */ new Set([
1638
2261
  "Adlm",
1639
2262
  "Rohg",
1640
2263
  "Hebr"
1641
- ]), vn = /* @__PURE__ */ new Set([
2264
+ ]), bi = /* @__PURE__ */ new Set([
1642
2265
  "ae",
1643
2266
  "ar",
1644
2267
  "arc",
@@ -1659,18 +2282,18 @@ const pn = /* @__PURE__ */ new Set([
1659
2282
  "ur",
1660
2283
  "yi"
1661
2284
  ]);
1662
- function bn(t) {
2285
+ function hi(t) {
1663
2286
  if (Intl.Locale) {
1664
- let r = new Intl.Locale(t).maximize(), n = typeof r.getTextInfo == "function" ? r.getTextInfo() : r.textInfo;
1665
- if (n) return n.direction === "rtl";
1666
- if (r.script) return pn.has(r.script);
2287
+ let n = new Intl.Locale(t).maximize(), r = typeof n.getTextInfo == "function" ? n.getTextInfo() : n.textInfo;
2288
+ if (r) return r.direction === "rtl";
2289
+ if (n.script) return vi.has(n.script);
1667
2290
  }
1668
2291
  let e = t.split("-")[0];
1669
- return vn.has(e);
2292
+ return bi.has(e);
1670
2293
  }
1671
- const hn = Symbol.for("react-aria.i18n.locale");
1672
- function Ht() {
1673
- let t = typeof window < "u" && window[hn] || typeof navigator < "u" && (navigator.language || navigator.userLanguage) || "en-US";
2294
+ const mn = Symbol.for("react-aria.i18n.locale");
2295
+ function wn() {
2296
+ let t = typeof window < "u" && window[mn] || typeof navigator < "u" && (navigator.language || navigator.userLanguage) || "en-US";
1674
2297
  try {
1675
2298
  Intl.DateTimeFormat.supportedLocalesOf([
1676
2299
  t
@@ -1680,336 +2303,415 @@ function Ht() {
1680
2303
  }
1681
2304
  return {
1682
2305
  locale: t,
1683
- direction: bn(t) ? "rtl" : "ltr"
2306
+ direction: hi(t) ? "rtl" : "ltr"
1684
2307
  };
1685
2308
  }
1686
- let Be = Ht(), ue = /* @__PURE__ */ new Set();
1687
- function ft() {
1688
- Be = Ht();
1689
- for (let t of ue) t(Be);
2309
+ let rt = wn(), Ee = /* @__PURE__ */ new Set();
2310
+ function At() {
2311
+ rt = wn();
2312
+ for (let t of Ee) t(rt);
1690
2313
  }
1691
- function yn() {
1692
- let t = Kt(), [e, r] = B(Be);
1693
- return O(() => (ue.size === 0 && window.addEventListener("languagechange", ft), ue.add(r), () => {
1694
- ue.delete(r), ue.size === 0 && window.removeEventListener("languagechange", ft);
2314
+ function yi() {
2315
+ let t = Gt(), [e, n] = te(rt);
2316
+ return V(() => (Ee.size === 0 && window.addEventListener("languagechange", At), Ee.add(n), () => {
2317
+ Ee.delete(n), Ee.size === 0 && window.removeEventListener("languagechange", At);
1695
2318
  }), []), t ? {
1696
- locale: "en-US",
2319
+ locale: typeof window < "u" && window[mn] || "en-US",
1697
2320
  direction: "ltr"
1698
2321
  } : e;
1699
2322
  }
1700
- const gn = /* @__PURE__ */ U.createContext(null);
1701
- function Wt() {
1702
- let t = yn();
1703
- return ce(gn) || t;
1704
- }
1705
- function $n(t) {
1706
- let { selectionManager: e, keyboardDelegate: r, ref: n, autoFocus: i = !1, shouldFocusWrap: s = !1, disallowEmptySelection: o = !1, disallowSelectAll: a = !1, selectOnFocus: p = e.selectionBehavior === "replace", disallowTypeAhead: h = !1, shouldUseVirtualFocus: v, allowsTabNavigation: w = !1, isVirtualized: $, scrollRef: m = n, linkBehavior: M = "action" } = t, { direction: k } = Wt(), P = We(), E = (f) => {
1707
- if (f.altKey && f.key === "Tab" && f.preventDefault(), !n.current.contains(f.target)) return;
1708
- const d = (g, J) => {
1709
- if (g != null) {
1710
- if (e.isLink(g) && M === "selection" && p && !Fe(f)) {
1711
- Zt(() => {
1712
- e.setFocusedKey(g, J);
2323
+ const gi = /* @__PURE__ */ Y.createContext(null);
2324
+ function Tn() {
2325
+ let t = yi();
2326
+ return ye(gi) || t;
2327
+ }
2328
+ function $i(t) {
2329
+ let { selectionManager: e, keyboardDelegate: n, ref: r, autoFocus: i = !1, shouldFocusWrap: l = !1, disallowEmptySelection: s = !1, disallowSelectAll: c = !1, escapeKeyBehavior: u = "clearSelection", selectOnFocus: p = e.selectionBehavior === "replace", disallowTypeAhead: d = !1, shouldUseVirtualFocus: b, allowsTabNavigation: $ = !1, scrollRef: m = r, linkBehavior: x = "action" } = t, { direction: _ } = Tn(), D = st(), K = (v) => {
2330
+ if (v.altKey && v.key === "Tab" && v.preventDefault(), !r.current || !P(r.current, E(v))) return;
2331
+ const w = (y, Z) => {
2332
+ if (y != null) {
2333
+ if (e.isLink(y) && x === "selection" && p && !nt(v)) {
2334
+ Ut(() => {
2335
+ e.setFocusedKey(y, Z);
1713
2336
  });
1714
- let ne = m.current.querySelector(`[data-key="${CSS.escape(g.toString())}"]`), qe = e.getItemProps(g);
1715
- P.open(ne, f, qe.href, qe.routerOptions);
2337
+ let Q = Xe(r, y), we = e.getItemProps(y);
2338
+ Q && D.open(Q, v, we.href, we.routerOptions);
1716
2339
  return;
1717
2340
  }
1718
- if (e.setFocusedKey(g, J), e.isLink(g) && M === "override") return;
1719
- f.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(g) : p && !Fe(f) && e.replaceSelection(g);
2341
+ if (e.setFocusedKey(y, Z), e.isLink(y) && x === "override") return;
2342
+ v.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(y) : p && !nt(v) && e.replaceSelection(y);
1720
2343
  }
1721
2344
  };
1722
- switch (f.key) {
2345
+ switch (v.key) {
1723
2346
  case "ArrowDown":
1724
- if (r.getKeyBelow) {
1725
- var T, c, S;
1726
- let g = e.focusedKey != null ? (T = r.getKeyBelow) === null || T === void 0 ? void 0 : T.call(r, e.focusedKey) : (c = r.getFirstKey) === null || c === void 0 ? void 0 : c.call(r);
1727
- g == null && s && (g = (S = r.getFirstKey) === null || S === void 0 ? void 0 : S.call(r, e.focusedKey)), g != null && (f.preventDefault(), d(g));
2347
+ if (n.getKeyBelow) {
2348
+ var N, L, C;
2349
+ let y = e.focusedKey != null ? (N = n.getKeyBelow) === null || N === void 0 ? void 0 : N.call(n, e.focusedKey) : (L = n.getFirstKey) === null || L === void 0 ? void 0 : L.call(n);
2350
+ y == null && l && (y = (C = n.getFirstKey) === null || C === void 0 ? void 0 : C.call(n, e.focusedKey)), y != null && (v.preventDefault(), w(y));
1728
2351
  }
1729
2352
  break;
1730
2353
  case "ArrowUp":
1731
- if (r.getKeyAbove) {
1732
- var u, I, b;
1733
- let g = e.focusedKey != null ? (u = r.getKeyAbove) === null || u === void 0 ? void 0 : u.call(r, e.focusedKey) : (I = r.getLastKey) === null || I === void 0 ? void 0 : I.call(r);
1734
- g == null && s && (g = (b = r.getLastKey) === null || b === void 0 ? void 0 : b.call(r, e.focusedKey)), g != null && (f.preventDefault(), d(g));
2354
+ if (n.getKeyAbove) {
2355
+ var z, o, f;
2356
+ let y = e.focusedKey != null ? (z = n.getKeyAbove) === null || z === void 0 ? void 0 : z.call(n, e.focusedKey) : (o = n.getLastKey) === null || o === void 0 ? void 0 : o.call(n);
2357
+ y == null && l && (y = (f = n.getLastKey) === null || f === void 0 ? void 0 : f.call(n, e.focusedKey)), y != null && (v.preventDefault(), w(y));
1735
2358
  }
1736
2359
  break;
1737
2360
  case "ArrowLeft":
1738
- if (r.getKeyLeftOf) {
1739
- var H, we, Pe;
1740
- let g = (H = r.getKeyLeftOf) === null || H === void 0 ? void 0 : H.call(r, e.focusedKey);
1741
- g == null && s && (g = k === "rtl" ? (we = r.getFirstKey) === null || we === void 0 ? void 0 : we.call(r, e.focusedKey) : (Pe = r.getLastKey) === null || Pe === void 0 ? void 0 : Pe.call(r, e.focusedKey)), g != null && (f.preventDefault(), d(g, k === "rtl" ? "first" : "last"));
2361
+ if (n.getKeyLeftOf) {
2362
+ var a, h, g;
2363
+ let y = e.focusedKey != null ? (a = n.getKeyLeftOf) === null || a === void 0 ? void 0 : a.call(n, e.focusedKey) : null;
2364
+ y == null && l && (y = _ === "rtl" ? (h = n.getFirstKey) === null || h === void 0 ? void 0 : h.call(n, e.focusedKey) : (g = n.getLastKey) === null || g === void 0 ? void 0 : g.call(n, e.focusedKey)), y != null && (v.preventDefault(), w(y, _ === "rtl" ? "first" : "last"));
1742
2365
  }
1743
2366
  break;
1744
2367
  case "ArrowRight":
1745
- if (r.getKeyRightOf) {
1746
- var Ee, ke, xe;
1747
- let g = (Ee = r.getKeyRightOf) === null || Ee === void 0 ? void 0 : Ee.call(r, e.focusedKey);
1748
- g == null && s && (g = k === "rtl" ? (ke = r.getLastKey) === null || ke === void 0 ? void 0 : ke.call(r, e.focusedKey) : (xe = r.getFirstKey) === null || xe === void 0 ? void 0 : xe.call(r, e.focusedKey)), g != null && (f.preventDefault(), d(g, k === "rtl" ? "last" : "first"));
2368
+ if (n.getKeyRightOf) {
2369
+ var S, U, q;
2370
+ let y = e.focusedKey != null ? (S = n.getKeyRightOf) === null || S === void 0 ? void 0 : S.call(n, e.focusedKey) : null;
2371
+ y == null && l && (y = _ === "rtl" ? (U = n.getLastKey) === null || U === void 0 ? void 0 : U.call(n, e.focusedKey) : (q = n.getFirstKey) === null || q === void 0 ? void 0 : q.call(n, e.focusedKey)), y != null && (v.preventDefault(), w(y, _ === "rtl" ? "last" : "first"));
1749
2372
  }
1750
2373
  break;
1751
2374
  case "Home":
1752
- if (r.getFirstKey) {
1753
- f.preventDefault();
1754
- let g = r.getFirstKey(e.focusedKey, se(f));
1755
- e.setFocusedKey(g), se(f) && f.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(g) : p && e.replaceSelection(g);
2375
+ if (n.getFirstKey) {
2376
+ if (e.focusedKey === null && v.shiftKey) return;
2377
+ v.preventDefault();
2378
+ let y = n.getFirstKey(e.focusedKey, ge(v));
2379
+ e.setFocusedKey(y), y != null && (ge(v) && v.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(y) : p && e.replaceSelection(y));
1756
2380
  }
1757
2381
  break;
1758
2382
  case "End":
1759
- if (r.getLastKey) {
1760
- f.preventDefault();
1761
- let g = r.getLastKey(e.focusedKey, se(f));
1762
- e.setFocusedKey(g), se(f) && f.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(g) : p && e.replaceSelection(g);
2383
+ if (n.getLastKey) {
2384
+ if (e.focusedKey === null && v.shiftKey) return;
2385
+ v.preventDefault();
2386
+ let y = n.getLastKey(e.focusedKey, ge(v));
2387
+ e.setFocusedKey(y), y != null && (ge(v) && v.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(y) : p && e.replaceSelection(y));
1763
2388
  }
1764
2389
  break;
1765
2390
  case "PageDown":
1766
- if (r.getKeyPageBelow) {
1767
- let g = r.getKeyPageBelow(e.focusedKey);
1768
- g != null && (f.preventDefault(), d(g));
2391
+ if (n.getKeyPageBelow && e.focusedKey != null) {
2392
+ let y = n.getKeyPageBelow(e.focusedKey);
2393
+ y != null && (v.preventDefault(), w(y));
1769
2394
  }
1770
2395
  break;
1771
2396
  case "PageUp":
1772
- if (r.getKeyPageAbove) {
1773
- let g = r.getKeyPageAbove(e.focusedKey);
1774
- g != null && (f.preventDefault(), d(g));
2397
+ if (n.getKeyPageAbove && e.focusedKey != null) {
2398
+ let y = n.getKeyPageAbove(e.focusedKey);
2399
+ y != null && (v.preventDefault(), w(y));
1775
2400
  }
1776
2401
  break;
1777
2402
  case "a":
1778
- se(f) && e.selectionMode === "multiple" && a !== !0 && (f.preventDefault(), e.selectAll());
2403
+ ge(v) && e.selectionMode === "multiple" && c !== !0 && (v.preventDefault(), e.selectAll());
1779
2404
  break;
1780
2405
  case "Escape":
1781
- !o && e.selectedKeys.size !== 0 && (f.stopPropagation(), f.preventDefault(), e.clearSelection());
2406
+ u === "clearSelection" && !s && e.selectedKeys.size !== 0 && (v.stopPropagation(), v.preventDefault(), e.clearSelection());
1782
2407
  break;
1783
2408
  case "Tab":
1784
- if (!w) {
1785
- if (f.shiftKey) n.current.focus();
2409
+ if (!$) {
2410
+ if (v.shiftKey) r.current.focus();
1786
2411
  else {
1787
- let g = Ut(n.current, {
2412
+ let y = hn(r.current, {
1788
2413
  tabbable: !0
1789
- }), J, ne;
2414
+ }), Z, Q;
1790
2415
  do
1791
- ne = g.lastChild(), ne && (J = ne);
1792
- while (ne);
1793
- J && !J.contains(document.activeElement) && j(J);
2416
+ Q = y.lastChild(), Q && (Z = Q);
2417
+ while (Q);
2418
+ let we = se();
2419
+ Z && (!gt(Z) || we && !rn(we)) && ce(Z);
1794
2420
  }
1795
2421
  break;
1796
2422
  }
1797
2423
  }
1798
- }, x = L({
2424
+ }, T = k({
1799
2425
  top: 0,
1800
2426
  left: 0
1801
2427
  });
1802
- rt(m, "scroll", $ ? null : () => {
1803
- x.current = {
1804
- top: m.current.scrollTop,
1805
- left: m.current.scrollLeft
2428
+ _e(m, "scroll", () => {
2429
+ var v, w, N, L;
2430
+ T.current = {
2431
+ top: (N = (v = m.current) === null || v === void 0 ? void 0 : v.scrollTop) !== null && N !== void 0 ? N : 0,
2432
+ left: (L = (w = m.current) === null || w === void 0 ? void 0 : w.scrollLeft) !== null && L !== void 0 ? L : 0
1806
2433
  };
1807
2434
  });
1808
- let K = (f) => {
2435
+ let M = (v) => {
1809
2436
  if (e.isFocused) {
1810
- f.currentTarget.contains(f.target) || e.setFocused(!1);
2437
+ P(v.currentTarget, E(v)) || e.setFocused(!1);
1811
2438
  return;
1812
2439
  }
1813
- if (f.currentTarget.contains(f.target)) {
2440
+ if (P(v.currentTarget, E(v))) {
1814
2441
  if (e.setFocused(!0), e.focusedKey == null) {
1815
- let c = (u) => {
1816
- u != null && (e.setFocusedKey(u), p && e.replaceSelection(u));
1817
- }, S = f.relatedTarget;
1818
- var d, T;
1819
- S && f.currentTarget.compareDocumentPosition(S) & Node.DOCUMENT_POSITION_FOLLOWING ? c((d = e.lastSelectedKey) !== null && d !== void 0 ? d : r.getLastKey()) : c((T = e.firstSelectedKey) !== null && T !== void 0 ? T : r.getFirstKey());
1820
- } else $ || (m.current.scrollTop = x.current.top, m.current.scrollLeft = x.current.left);
1821
- if (e.focusedKey != null) {
1822
- let c = m.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);
1823
- c && (c.contains(document.activeElement) || j(c), Ne() === "keyboard" && it(c, {
1824
- containingElement: n.current
2442
+ var w, N;
2443
+ let z = (f) => {
2444
+ f != null && (e.setFocusedKey(f), p && !e.isSelected(f) && e.replaceSelection(f));
2445
+ }, o = v.relatedTarget;
2446
+ var L, C;
2447
+ o && v.currentTarget.compareDocumentPosition(o) & Node.DOCUMENT_POSITION_FOLLOWING ? z((L = e.lastSelectedKey) !== null && L !== void 0 ? L : (w = n.getLastKey) === null || w === void 0 ? void 0 : w.call(n)) : z((C = e.firstSelectedKey) !== null && C !== void 0 ? C : (N = n.getFirstKey) === null || N === void 0 ? void 0 : N.call(n));
2448
+ } else m.current && (m.current.scrollTop = T.current.top, m.current.scrollLeft = T.current.left);
2449
+ if (e.focusedKey != null && m.current) {
2450
+ let z = Xe(r, e.focusedKey);
2451
+ z instanceof HTMLElement && (!gt(z) && !b && ce(z), tt() === "keyboard" && Et(z, {
2452
+ containingElement: r.current
1825
2453
  }));
1826
2454
  }
1827
2455
  }
1828
- }, D = (f) => {
1829
- f.currentTarget.contains(f.relatedTarget) || e.setFocused(!1);
1830
- };
1831
- const _ = L(i);
1832
- O(() => {
1833
- if (_.current) {
1834
- let f = null;
1835
- i === "first" && (f = r.getFirstKey()), i === "last" && (f = r.getLastKey());
1836
- let d = e.selectedKeys;
1837
- if (d.size) {
1838
- for (let T of d) if (e.canSelectItem(T)) {
1839
- f = T;
2456
+ }, I = (v) => {
2457
+ P(v.currentTarget, v.relatedTarget) || e.setFocused(!1);
2458
+ }, F = k(!1);
2459
+ _e(r, _r, b ? (v) => {
2460
+ let { detail: w } = v;
2461
+ v.stopPropagation(), e.setFocused(!0), w?.focusStrategy === "first" && (F.current = !0);
2462
+ } : void 0), Tt(() => {
2463
+ if (F.current) {
2464
+ var v, w;
2465
+ let N = (w = (v = n.getFirstKey) === null || v === void 0 ? void 0 : v.call(n)) !== null && w !== void 0 ? w : null;
2466
+ if (N == null) {
2467
+ let L = se();
2468
+ yn(r.current), gn(L, null), e.collection.size > 0 && (F.current = !1);
2469
+ } else
2470
+ e.setFocusedKey(N), F.current = !1;
2471
+ }
2472
+ }, [
2473
+ e.collection
2474
+ ]), Tt(() => {
2475
+ e.collection.size > 0 && (F.current = !1);
2476
+ }, [
2477
+ e.focusedKey
2478
+ ]), _e(r, xr, b ? (v) => {
2479
+ var w;
2480
+ v.stopPropagation(), e.setFocused(!1), !((w = v.detail) === null || w === void 0) && w.clearFocusKey && e.setFocusedKey(null);
2481
+ } : void 0);
2482
+ const J = k(i), B = k(!1);
2483
+ V(() => {
2484
+ if (J.current) {
2485
+ var v, w;
2486
+ let C = null;
2487
+ var N;
2488
+ i === "first" && (C = (N = (v = n.getFirstKey) === null || v === void 0 ? void 0 : v.call(n)) !== null && N !== void 0 ? N : null);
2489
+ var L;
2490
+ i === "last" && (C = (L = (w = n.getLastKey) === null || w === void 0 ? void 0 : w.call(n)) !== null && L !== void 0 ? L : null);
2491
+ let z = e.selectedKeys;
2492
+ if (z.size) {
2493
+ for (let o of z) if (e.canSelectItem(o)) {
2494
+ C = o;
1840
2495
  break;
1841
2496
  }
1842
2497
  }
1843
- e.setFocused(!0), e.setFocusedKey(f), f == null && !v && Re(n.current);
2498
+ e.setFocused(!0), e.setFocusedKey(C), C == null && !b && r.current && Ae(r.current), e.collection.size > 0 && (J.current = !1, B.current = !0);
1844
2499
  }
1845
- }, []);
1846
- let C = L(e.focusedKey);
1847
- O(() => {
1848
- if (e.isFocused && e.focusedKey != null && (e.focusedKey !== C.current || _.current) && m?.current) {
1849
- let f = Ne(), d = n.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);
1850
- if (!d)
2500
+ });
2501
+ let X = k(e.focusedKey), O = k(null);
2502
+ V(() => {
2503
+ if (e.isFocused && e.focusedKey != null && (e.focusedKey !== X.current || B.current) && m.current && r.current) {
2504
+ let v = tt(), w = Xe(r, e.focusedKey);
2505
+ if (!(w instanceof HTMLElement))
1851
2506
  return;
1852
- (f === "keyboard" || _.current) && (Lt(m.current, d), f !== "virtual" && it(d, {
1853
- containingElement: n.current
2507
+ (v === "keyboard" || B.current) && (O.current && cancelAnimationFrame(O.current), O.current = requestAnimationFrame(() => {
2508
+ m.current && (Je(m.current, w), v !== "virtual" && Et(w, {
2509
+ containingElement: r.current
2510
+ }));
1854
2511
  }));
1855
2512
  }
1856
- !v && e.isFocused && e.focusedKey == null && C.current != null && Re(n.current), C.current = e.focusedKey, _.current = !1;
1857
- }), rt(n, "react-aria-focus-scope-restore", (f) => {
1858
- f.preventDefault(), e.setFocused(!0);
2513
+ !b && e.isFocused && e.focusedKey == null && X.current != null && r.current && Ae(r.current), X.current = e.focusedKey, B.current = !1;
2514
+ }), V(() => () => {
2515
+ O.current && cancelAnimationFrame(O.current);
2516
+ }, []), _e(r, "react-aria-focus-scope-restore", (v) => {
2517
+ v.preventDefault(), e.setFocused(!0);
1859
2518
  });
1860
- let F = {
1861
- onKeyDown: E,
1862
- onFocus: K,
1863
- onBlur: D,
1864
- onMouseDown(f) {
1865
- m.current === f.target && f.preventDefault();
2519
+ let j = {
2520
+ onKeyDown: K,
2521
+ onFocus: M,
2522
+ onBlur: I,
2523
+ onMouseDown(v) {
2524
+ m.current === E(v) && v.preventDefault();
1866
2525
  }
1867
- }, { typeSelectProps: l } = Wr({
1868
- keyboardDelegate: r,
2526
+ }, { typeSelectProps: G } = fi({
2527
+ keyboardDelegate: n,
1869
2528
  selectionManager: e
1870
2529
  });
1871
- h || (F = q(l, F));
1872
- let y;
1873
- return v || (y = e.focusedKey == null ? 0 : -1), {
1874
- collectionProps: {
1875
- ...F,
1876
- tabIndex: y
1877
- }
2530
+ d || (j = ne(G, j));
2531
+ let W;
2532
+ b || (W = e.focusedKey == null ? 0 : -1);
2533
+ let A = ci(e.collection);
2534
+ return {
2535
+ collectionProps: ne(j, {
2536
+ tabIndex: W,
2537
+ "data-collection": A
2538
+ })
1878
2539
  };
1879
2540
  }
1880
- function mn(t) {
1881
- let { selectionManager: e, key: r, ref: n, shouldSelectOnPressUp: i, shouldUseVirtualFocus: s, focus: o, isDisabled: a, onAction: p, allowsDifferentPressOrigin: h, linkBehavior: v = "action" } = t, w = We(), $ = (b) => {
1882
- if (b.pointerType === "keyboard" && Fe(b)) e.toggleSelection(r);
2541
+ function mi(t) {
2542
+ let { id: e, selectionManager: n, key: r, ref: i, shouldSelectOnPressUp: l, shouldUseVirtualFocus: s, focus: c, isDisabled: u, onAction: p, allowsDifferentPressOrigin: d, linkBehavior: b = "action" } = t, $ = st();
2543
+ e = Oe(e);
2544
+ let m = (o) => {
2545
+ if (o.pointerType === "keyboard" && nt(o)) n.toggleSelection(r);
1883
2546
  else {
1884
- if (e.selectionMode === "none") return;
1885
- if (e.isLink(r)) {
1886
- if (v === "selection") {
1887
- let H = e.getItemProps(r);
1888
- w.open(n.current, b, H.href, H.routerOptions), e.setSelectedKeys(e.selectedKeys);
2547
+ if (n.selectionMode === "none") return;
2548
+ if (n.isLink(r)) {
2549
+ if (b === "selection" && i.current) {
2550
+ let f = n.getItemProps(r);
2551
+ $.open(i.current, o, f.href, f.routerOptions), n.setSelectedKeys(n.selectedKeys);
1889
2552
  return;
1890
- } else if (v === "override" || v === "none") return;
2553
+ } else if (b === "override" || b === "none") return;
1891
2554
  }
1892
- e.selectionMode === "single" ? e.isSelected(r) && !e.disallowEmptySelection ? e.toggleSelection(r) : e.replaceSelection(r) : b && b.shiftKey ? e.extendSelection(r) : e.selectionBehavior === "toggle" || b && (se(b) || b.pointerType === "touch" || b.pointerType === "virtual") ? e.toggleSelection(r) : e.replaceSelection(r);
2555
+ n.selectionMode === "single" ? n.isSelected(r) && !n.disallowEmptySelection ? n.toggleSelection(r) : n.replaceSelection(r) : o && o.shiftKey ? n.extendSelection(r) : n.selectionBehavior === "toggle" || o && (ge(o) || o.pointerType === "touch" || o.pointerType === "virtual") ? n.toggleSelection(r) : n.replaceSelection(r);
1893
2556
  }
1894
2557
  };
1895
- O(() => {
1896
- r === e.focusedKey && e.isFocused && !s && (o ? o() : document.activeElement !== n.current && Re(n.current));
2558
+ V(() => {
2559
+ r === n.focusedKey && n.isFocused && (s ? yn(i.current) : c ? c() : se() !== i.current && i.current && Ae(i.current));
1897
2560
  }, [
1898
- n,
2561
+ i,
1899
2562
  r,
1900
- e.focusedKey,
1901
- e.childFocusStrategy,
1902
- e.isFocused,
2563
+ n.focusedKey,
2564
+ n.childFocusStrategy,
2565
+ n.isFocused,
1903
2566
  s
1904
- ]), a = a || e.isDisabled(r);
1905
- let m = {};
1906
- !s && !a ? m = {
1907
- tabIndex: r === e.focusedKey ? 0 : -1,
1908
- onFocus(b) {
1909
- b.target === n.current && e.setFocusedKey(r);
2567
+ ]), u = u || n.isDisabled(r);
2568
+ let x = {};
2569
+ !s && !u ? x = {
2570
+ tabIndex: r === n.focusedKey ? 0 : -1,
2571
+ onFocus(o) {
2572
+ E(o) === i.current && n.setFocusedKey(r);
1910
2573
  }
1911
- } : a && (m.onMouseDown = (b) => {
1912
- b.preventDefault();
1913
- });
1914
- let M = e.isLink(r) && v === "override", k = e.isLink(r) && v !== "selection" && v !== "none", P = !a && e.canSelectItem(r) && !M, E = (p || k) && !a, x = E && (e.selectionBehavior === "replace" ? !P : !P || e.isEmpty), K = E && P && e.selectionBehavior === "replace", D = x || K, _ = L(null), C = D && P, F = L(!1), l = L(!1), y = (b) => {
1915
- if (p && p(), k) {
1916
- let H = e.getItemProps(r);
1917
- w.open(n.current, b, H.href, H.routerOptions);
2574
+ } : u && (x.onMouseDown = (o) => {
2575
+ o.preventDefault();
2576
+ }), V(() => {
2577
+ u && n.focusedKey === r && n.setFocusedKey(null);
2578
+ }, [
2579
+ n,
2580
+ u,
2581
+ r
2582
+ ]);
2583
+ let _ = n.isLink(r) && b === "override", D = p && t.UNSTABLE_itemBehavior === "action", K = n.isLink(r) && b !== "selection" && b !== "none", T = !u && n.canSelectItem(r) && !_ && !D, M = (p || K) && !u, I = M && (n.selectionBehavior === "replace" ? !T : !T || n.isEmpty), F = M && T && n.selectionBehavior === "replace", J = I || F, B = k(null), X = J && T, O = k(!1), j = k(!1), G = n.getItemProps(r), W = (o) => {
2584
+ if (p) {
2585
+ var f;
2586
+ p(), (f = i.current) === null || f === void 0 || f.dispatchEvent(new CustomEvent("react-aria-item-action", {
2587
+ bubbles: !0
2588
+ }));
1918
2589
  }
1919
- }, f = {};
1920
- i ? (f.onPressStart = (b) => {
1921
- _.current = b.pointerType, F.current = C, b.pointerType === "keyboard" && (!D || vt()) && $(b);
1922
- }, h ? (f.onPressUp = x ? null : (b) => {
1923
- b.pointerType !== "keyboard" && P && $(b);
1924
- }, f.onPress = x ? y : null) : f.onPress = (b) => {
1925
- if (x || K && b.pointerType !== "mouse") {
1926
- if (b.pointerType === "keyboard" && !pt()) return;
1927
- y(b);
1928
- } else b.pointerType !== "keyboard" && P && $(b);
1929
- }) : (f.onPressStart = (b) => {
1930
- _.current = b.pointerType, F.current = C, l.current = x, P && (b.pointerType === "mouse" && !x || b.pointerType === "keyboard" && (!E || vt())) && $(b);
1931
- }, f.onPress = (b) => {
1932
- (b.pointerType === "touch" || b.pointerType === "pen" || b.pointerType === "virtual" || b.pointerType === "keyboard" && D && pt() || b.pointerType === "mouse" && l.current) && (D ? y(b) : P && $(b));
1933
- }), m["data-key"] = r, f.preventFocusOnPress = s;
1934
- let { pressProps: d, isPressed: T } = Ct(f), c = K ? (b) => {
1935
- _.current === "mouse" && (b.stopPropagation(), b.preventDefault(), y(b));
1936
- } : void 0, { longPressProps: S } = sn({
1937
- isDisabled: !C,
1938
- onLongPress(b) {
1939
- b.pointerType === "touch" && ($(b), e.setSelectionBehavior("toggle"));
2590
+ K && i.current && $.open(i.current, o, G.href, G.routerOptions);
2591
+ }, A = {
2592
+ ref: i
2593
+ };
2594
+ if (l ? (A.onPressStart = (o) => {
2595
+ B.current = o.pointerType, O.current = X, o.pointerType === "keyboard" && (!J || Rt(o.key)) && m(o);
2596
+ }, d ? (A.onPressUp = I ? void 0 : (o) => {
2597
+ o.pointerType === "mouse" && T && m(o);
2598
+ }, A.onPress = I ? W : (o) => {
2599
+ o.pointerType !== "keyboard" && o.pointerType !== "mouse" && T && m(o);
2600
+ }) : A.onPress = (o) => {
2601
+ if (I || F && o.pointerType !== "mouse") {
2602
+ if (o.pointerType === "keyboard" && !Ot(o.key)) return;
2603
+ W(o);
2604
+ } else o.pointerType !== "keyboard" && T && m(o);
2605
+ }) : (A.onPressStart = (o) => {
2606
+ B.current = o.pointerType, O.current = X, j.current = I, T && (o.pointerType === "mouse" && !I || o.pointerType === "keyboard" && (!M || Rt(o.key))) && m(o);
2607
+ }, A.onPress = (o) => {
2608
+ (o.pointerType === "touch" || o.pointerType === "pen" || o.pointerType === "virtual" || o.pointerType === "keyboard" && J && Ot(o.key) || o.pointerType === "mouse" && j.current) && (J ? W(o) : T && m(o));
2609
+ }), x["data-collection"] = ui(n.collection), x["data-key"] = r, A.preventFocusOnPress = s, s && (A = ne(A, {
2610
+ onPressStart(o) {
2611
+ o.pointerType !== "touch" && (n.setFocused(!0), n.setFocusedKey(r));
2612
+ },
2613
+ onPress(o) {
2614
+ o.pointerType === "touch" && (n.setFocused(!0), n.setFocusedKey(r));
2615
+ }
2616
+ })), G)
2617
+ for (let o of [
2618
+ "onPressStart",
2619
+ "onPressEnd",
2620
+ "onPressChange",
2621
+ "onPress",
2622
+ "onPressUp",
2623
+ "onClick"
2624
+ ]) G[o] && (A[o] = ot(A[o], G[o]));
2625
+ let { pressProps: v, isPressed: w } = cn(A), N = F ? (o) => {
2626
+ B.current === "mouse" && (o.stopPropagation(), o.preventDefault(), W(o));
2627
+ } : void 0, { longPressProps: L } = ri({
2628
+ isDisabled: !X,
2629
+ onLongPress(o) {
2630
+ o.pointerType === "touch" && (m(o), n.setSelectionBehavior("toggle"));
1940
2631
  }
1941
- }), u = (b) => {
1942
- _.current === "touch" && F.current && b.preventDefault();
1943
- }, I = e.isLink(r) ? (b) => {
1944
- te.isOpening || b.preventDefault();
2632
+ }), C = (o) => {
2633
+ B.current === "touch" && O.current && o.preventDefault();
2634
+ }, z = b !== "none" && n.isLink(r) ? (o) => {
2635
+ ue.isOpening || o.preventDefault();
1945
2636
  } : void 0;
1946
2637
  return {
1947
- itemProps: q(m, P || x ? d : {}, C ? S : {}, {
1948
- onDoubleClick: c,
1949
- onDragStartCapture: u,
1950
- onClick: I
1951
- }),
1952
- isPressed: T,
1953
- isSelected: e.isSelected(r),
1954
- isFocused: e.isFocused && e.focusedKey === r,
1955
- isDisabled: a,
1956
- allowsSelection: P,
1957
- hasAction: D
2638
+ itemProps: ne(
2639
+ x,
2640
+ T || I || s && !u ? v : {},
2641
+ X ? L : {},
2642
+ {
2643
+ onDoubleClick: N,
2644
+ onDragStartCapture: C,
2645
+ onClick: z,
2646
+ id: e
2647
+ },
2648
+ // Prevent DOM focus from moving on mouse down when using virtual focus
2649
+ s ? {
2650
+ onMouseDown: (o) => o.preventDefault()
2651
+ } : void 0
2652
+ ),
2653
+ isPressed: w,
2654
+ isSelected: n.isSelected(r),
2655
+ isFocused: n.isFocused && n.focusedKey === r,
2656
+ isDisabled: u,
2657
+ allowsSelection: T,
2658
+ hasAction: J
1958
2659
  };
1959
2660
  }
1960
- function pt() {
1961
- let t = window.event;
1962
- return t?.key === "Enter";
1963
- }
1964
- function vt() {
1965
- let t = window.event;
1966
- return t?.key === " " || t?.code === "Space";
1967
- }
1968
- function Kn(t, e, r) {
1969
- let { key: n, isDisabled: i, shouldSelectOnPressUp: s } = t, { selectionManager: o, selectedKey: a } = e, p = n === a, h = i || e.isDisabled || e.selectionManager.isDisabled(n), { itemProps: v, isPressed: w } = mn({
1970
- selectionManager: o,
1971
- key: n,
1972
- ref: r,
1973
- isDisabled: h,
1974
- shouldSelectOnPressUp: s,
2661
+ function Ot(t) {
2662
+ return t === "Enter";
2663
+ }
2664
+ function Rt(t) {
2665
+ return t === " ";
2666
+ }
2667
+ function wi(t, e, n) {
2668
+ let { key: r, isDisabled: i, shouldSelectOnPressUp: l } = t, { selectionManager: s, selectedKey: c } = e, u = r === c, p = i || e.isDisabled || e.selectionManager.isDisabled(r), { itemProps: d, isPressed: b } = mi({
2669
+ selectionManager: s,
2670
+ key: r,
2671
+ ref: n,
2672
+ isDisabled: p,
2673
+ shouldSelectOnPressUp: l,
1975
2674
  linkBehavior: "selection"
1976
- }), $ = me(e, n, "tab"), m = me(e, n, "tabpanel"), { tabIndex: M } = v, k = e.collection.getItem(n), P = wr(k?.props, {
2675
+ }), $ = Ce(e, r, "tab"), m = Ce(e, r, "tabpanel"), { tabIndex: x } = d, _ = e.collection.getItem(r), D = ur(_?.props, {
1977
2676
  labelable: !0
1978
2677
  });
1979
- delete P.id;
1980
- let E = Fr(k?.props);
2678
+ delete D.id;
2679
+ let K = wr(_?.props), { focusableProps: T } = ti({
2680
+ ..._?.props,
2681
+ isDisabled: p
2682
+ }, n);
1981
2683
  return {
1982
- tabProps: q(P, E, v, {
2684
+ tabProps: ne(D, T, K, d, {
1983
2685
  id: $,
1984
- "aria-selected": p,
1985
- "aria-disabled": h || void 0,
1986
- "aria-controls": p ? m : void 0,
1987
- tabIndex: h ? void 0 : M,
2686
+ "aria-selected": u,
2687
+ "aria-disabled": p || void 0,
2688
+ "aria-controls": u ? m : void 0,
2689
+ tabIndex: p ? void 0 : x,
1988
2690
  role: "tab"
1989
2691
  }),
1990
- isSelected: p,
1991
- isDisabled: h,
1992
- isPressed: w
2692
+ isSelected: u,
2693
+ isDisabled: p,
2694
+ isPressed: b
1993
2695
  };
1994
2696
  }
1995
- function Sn(t, e, r) {
1996
- let n = fn(r) ? void 0 : 0;
2697
+ function Ti(t, e, n) {
2698
+ let r = li(n) ? void 0 : 0;
1997
2699
  var i;
1998
- const s = me(e, (i = t.id) !== null && i !== void 0 ? i : e?.selectedKey, "tabpanel"), o = _t({
2700
+ const l = Ce(e, (i = t.id) !== null && i !== void 0 ? i : e?.selectedKey, "tabpanel"), s = en({
1999
2701
  ...t,
2000
- id: s,
2001
- "aria-labelledby": me(e, e?.selectedKey, "tab")
2702
+ id: l,
2703
+ "aria-labelledby": Ce(e, e?.selectedKey, "tab")
2002
2704
  });
2003
2705
  return {
2004
- tabPanelProps: q(o, {
2005
- tabIndex: n,
2706
+ tabPanelProps: ne(s, {
2707
+ tabIndex: r,
2006
2708
  role: "tabpanel",
2007
2709
  "aria-describedby": t["aria-describedby"],
2008
2710
  "aria-details": t["aria-details"]
2009
2711
  })
2010
2712
  };
2011
2713
  }
2012
- class Tn {
2714
+ class Si {
2013
2715
  getKeyLeftOf(e) {
2014
2716
  return this.flipDirection ? this.getNextKey(e) : this.getPreviousKey(e);
2015
2717
  }
@@ -2017,8 +2719,8 @@ class Tn {
2017
2719
  return this.flipDirection ? this.getPreviousKey(e) : this.getNextKey(e);
2018
2720
  }
2019
2721
  isDisabled(e) {
2020
- var r, n;
2021
- return this.disabledKeys.has(e) || !!(!((n = this.collection.getItem(e)) === null || n === void 0 || (r = n.props) === null || r === void 0) && r.isDisabled);
2722
+ var n, r;
2723
+ return this.disabledKeys.has(e) || !!(!((r = this.collection.getItem(e)) === null || r === void 0 || (n = r.props) === null || n === void 0) && n.isDisabled);
2022
2724
  }
2023
2725
  getFirstKey() {
2024
2726
  let e = this.collection.getFirstKey();
@@ -2035,191 +2737,199 @@ class Tn {
2035
2737
  return this.tabDirection ? null : this.getNextKey(e);
2036
2738
  }
2037
2739
  getNextKey(e) {
2740
+ let n = e;
2038
2741
  do
2039
- e = this.collection.getKeyAfter(e), e == null && (e = this.collection.getFirstKey());
2040
- while (this.isDisabled(e));
2041
- return e;
2742
+ n = this.collection.getKeyAfter(n), n == null && (n = this.collection.getFirstKey());
2743
+ while (n != null && this.isDisabled(n));
2744
+ return n;
2042
2745
  }
2043
2746
  getPreviousKey(e) {
2747
+ let n = e;
2044
2748
  do
2045
- e = this.collection.getKeyBefore(e), e == null && (e = this.collection.getLastKey());
2046
- while (this.isDisabled(e));
2047
- return e;
2749
+ n = this.collection.getKeyBefore(n), n == null && (n = this.collection.getLastKey());
2750
+ while (n != null && this.isDisabled(n));
2751
+ return n;
2048
2752
  }
2049
- constructor(e, r, n, i = /* @__PURE__ */ new Set()) {
2050
- this.collection = e, this.flipDirection = r === "rtl" && n === "horizontal", this.disabledKeys = i, this.tabDirection = n === "horizontal";
2753
+ constructor(e, n, r, i = /* @__PURE__ */ new Set()) {
2754
+ this.collection = e, this.flipDirection = n === "rtl" && r === "horizontal", this.disabledKeys = i, this.tabDirection = r === "horizontal";
2051
2755
  }
2052
2756
  }
2053
- function wn(t, e, r) {
2054
- let { orientation: n = "horizontal", keyboardActivation: i = "automatic" } = t, { collection: s, selectionManager: o, disabledKeys: a } = e, { direction: p } = Wt(), h = V(() => new Tn(s, p, n, a), [
2055
- s,
2056
- a,
2057
- n,
2058
- p
2059
- ]), { collectionProps: v } = $n({
2060
- ref: r,
2061
- selectionManager: o,
2062
- keyboardDelegate: h,
2757
+ function Ei(t, e, n) {
2758
+ let { orientation: r = "horizontal", keyboardActivation: i = "automatic" } = t, { collection: l, selectionManager: s, disabledKeys: c } = e, { direction: u } = Tn(), p = ae(() => new Si(l, u, r, c), [
2759
+ l,
2760
+ c,
2761
+ r,
2762
+ u
2763
+ ]), { collectionProps: d } = $i({
2764
+ ref: n,
2765
+ selectionManager: s,
2766
+ keyboardDelegate: p,
2063
2767
  selectOnFocus: i === "automatic",
2064
2768
  disallowEmptySelection: !0,
2065
- scrollRef: r,
2769
+ scrollRef: n,
2066
2770
  linkBehavior: "selection"
2067
- }), w = St();
2068
- $t.set(e, w);
2069
- let $ = _t({
2771
+ }), b = Oe();
2772
+ Vt.set(e, b);
2773
+ let $ = en({
2070
2774
  ...t,
2071
- id: w
2775
+ id: b
2072
2776
  });
2073
2777
  return {
2074
2778
  tabListProps: {
2075
- ...q(v, $),
2779
+ ...ne(d, $),
2076
2780
  role: "tablist",
2077
- "aria-orientation": n,
2781
+ "aria-orientation": r,
2078
2782
  tabIndex: void 0
2079
2783
  }
2080
2784
  };
2081
2785
  }
2082
- function Pn(t, e, r) {
2786
+ function Pi(t, e, n) {
2083
2787
  return e in t ? Object.defineProperty(t, e, {
2084
- value: r,
2788
+ value: n,
2085
2789
  enumerable: !0,
2086
2790
  configurable: !0,
2087
2791
  writable: !0
2088
- }) : t[e] = r, t;
2792
+ }) : t[e] = n, t;
2089
2793
  }
2090
- function bt(t, e) {
2091
- var r = Object.keys(t);
2794
+ function zt(t, e) {
2795
+ var n = Object.keys(t);
2092
2796
  if (Object.getOwnPropertySymbols) {
2093
- var n = Object.getOwnPropertySymbols(t);
2094
- e && (n = n.filter(function(i) {
2797
+ var r = Object.getOwnPropertySymbols(t);
2798
+ e && (r = r.filter(function(i) {
2095
2799
  return Object.getOwnPropertyDescriptor(t, i).enumerable;
2096
- })), r.push.apply(r, n);
2800
+ })), n.push.apply(n, r);
2097
2801
  }
2098
- return r;
2802
+ return n;
2099
2803
  }
2100
- function ht(t) {
2804
+ function Bt(t) {
2101
2805
  for (var e = 1; e < arguments.length; e++) {
2102
- var r = arguments[e] != null ? arguments[e] : {};
2103
- e % 2 ? bt(Object(r), !0).forEach(function(n) {
2104
- Pn(t, n, r[n]);
2105
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : bt(Object(r)).forEach(function(n) {
2106
- Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
2806
+ var n = arguments[e] != null ? arguments[e] : {};
2807
+ e % 2 ? zt(Object(n), !0).forEach(function(r) {
2808
+ Pi(t, r, n[r]);
2809
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : zt(Object(n)).forEach(function(r) {
2810
+ Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
2107
2811
  });
2108
2812
  }
2109
2813
  return t;
2110
2814
  }
2111
- var En = (t, e, r) => {
2112
- for (var n of Object.keys(t)) {
2815
+ var Ki = (t, e, n) => {
2816
+ for (var r of Object.keys(t)) {
2113
2817
  var i;
2114
- if (t[n] !== ((i = e[n]) !== null && i !== void 0 ? i : r[n]))
2818
+ if (t[r] !== ((i = e[r]) !== null && i !== void 0 ? i : n[r]))
2115
2819
  return !1;
2116
2820
  }
2117
2821
  return !0;
2118
- }, Ye = (t) => (e) => {
2119
- var r = t.defaultClassName, n = ht(ht({}, t.defaultVariants), e);
2120
- for (var i in n) {
2121
- var s, o = (s = n[i]) !== null && s !== void 0 ? s : t.defaultVariants[i];
2122
- if (o != null) {
2123
- var a = o;
2124
- typeof a == "boolean" && (a = a === !0 ? "true" : "false");
2125
- var p = (
2822
+ }, pt = (t) => (e) => {
2823
+ var n = t.defaultClassName, r = Bt(Bt({}, t.defaultVariants), e);
2824
+ for (var i in r) {
2825
+ var l, s = (l = r[i]) !== null && l !== void 0 ? l : t.defaultVariants[i];
2826
+ if (s != null) {
2827
+ var c = s;
2828
+ typeof c == "boolean" && (c = c === !0 ? "true" : "false");
2829
+ var u = (
2126
2830
  // @ts-expect-error
2127
- t.variantClassNames[i][a]
2831
+ t.variantClassNames[i][c]
2128
2832
  );
2129
- p && (r += " " + p);
2833
+ u && (n += " " + u);
2130
2834
  }
2131
2835
  }
2132
- for (var [h, v] of t.compoundVariants)
2133
- En(h, n, t.defaultVariants) && (r += " " + v);
2134
- return r;
2135
- }, kn = Ye({ defaultClassName: "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzz0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzz1", navigation: "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzz2" }, active: { true: "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzz3", false: "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzz4" }, disabled: { true: "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzz5", false: "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzz6" } }, defaultVariants: {}, compoundVariants: [[{ context: "container", active: !0 }, "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzz7"], [{ context: "container", active: !1 }, "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzz8"], [{ context: "container", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzz9"], [{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzza"], [{ context: "navigation", active: !1 }, "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzzb"], [{ context: "navigation", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzzc"], [{ context: "navigation", active: !1, disabled: !0 }, "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzzd"]] }), xn = Ye({ defaultClassName: "", variantClassNames: { active: { true: "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzze", false: "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzzf" }, disabled: { true: "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzzg", false: "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzzh" }, context: { navigation: "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzzi", container: "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzzj" } }, defaultVariants: {}, compoundVariants: [[{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_8_42_1__hash_kz6kzzk"]] });
2136
- function jt({
2836
+ for (var [p, d] of t.compoundVariants)
2837
+ Ki(p, r, t.defaultVariants) && (n += " " + d);
2838
+ return n;
2839
+ }, ki = pt({ defaultClassName: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz1", navigation: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz2" }, active: { true: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz3", false: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz4" }, disabled: { true: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz5", false: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz6" } }, defaultVariants: {}, compoundVariants: [[{ context: "container", active: !0 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz7"], [{ context: "container", active: !1 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz8"], [{ context: "container", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz9"], [{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzza"], [{ context: "navigation", active: !1 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzb"], [{ context: "navigation", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzc"], [{ context: "navigation", active: !1, disabled: !0 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzd"]] }), xi = pt({ defaultClassName: "", variantClassNames: { active: { true: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzze", false: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzf" }, disabled: { true: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzg", false: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzh" }, context: { navigation: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzi", container: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzj" } }, defaultVariants: {}, compoundVariants: [[{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzk"]] });
2840
+ function Sn({
2137
2841
  context: t,
2138
2842
  item: e,
2139
- state: r,
2140
- ...n
2843
+ state: n,
2844
+ ...r
2141
2845
  }) {
2142
- const { key: i } = e, s = R.useRef(null), { tabProps: o } = Kn({ key: i }, r, s), a = r.selectedKey === i, p = r.disabledKeys.has(i), h = Qt(e.rendered, (v) => v.type.displayName === "SpsTag" || fe.isWoodlandComponent(v.type) && fe.get(v.type).name === "Tag" ? [{
2143
- className: yt(v.props.className, xn({ active: a, disabled: p, context: t }))
2846
+ const { key: i } = e, l = oe.useRef(null), { tabProps: s } = wi({ key: i }, n, l), c = n.selectedKey === i, u = n.disabledKeys.has(i), p = Nn(e.rendered, (d) => d.type.displayName === "SpsTag" || Ke.isWoodlandComponent(d.type) && Ke.get(d.type).name === "Tag" ? [{
2847
+ className: Wt(d.props.className, xi({ active: c, disabled: u, context: t }))
2144
2848
  }] : [{}]);
2145
- return /* @__PURE__ */ R.createElement(
2849
+ return /* @__PURE__ */ oe.createElement(
2146
2850
  "div",
2147
2851
  {
2148
- ...o,
2149
- ref: s,
2150
- className: kn({ active: a, disabled: p, context: t }),
2151
- ...n
2852
+ ...s,
2853
+ ref: l,
2854
+ className: ki({ active: c, disabled: u, context: t }),
2855
+ ...r
2152
2856
  },
2153
- h
2857
+ p
2154
2858
  );
2155
2859
  }
2156
- fe.set(jt, { name: "Tab" });
2157
- function Vt({
2860
+ Ke.set(Sn, { name: "Tab" });
2861
+ function En({
2158
2862
  context: t,
2159
2863
  "data-testid": e,
2160
- state: r,
2161
- ...n
2864
+ state: n,
2865
+ ...r
2162
2866
  }) {
2163
- const i = R.useRef(null), { tabPanelProps: s } = Sn(n, r, i), o = t === "container" ? er : "div";
2164
- return /* @__PURE__ */ R.createElement(
2165
- o,
2867
+ const i = oe.useRef(null), { tabPanelProps: l } = Ti(r, n, i), s = t === "container" ? Mn : "div";
2868
+ return /* @__PURE__ */ oe.createElement(
2869
+ s,
2166
2870
  {
2167
- ...s,
2871
+ ...l,
2168
2872
  ref: i,
2169
2873
  "data-testid": e
2170
2874
  },
2171
- r.selectedItem ? r.selectedItem.props.children : null
2875
+ n.selectedItem ? n.selectedItem.props.children : null
2172
2876
  );
2173
2877
  }
2174
- fe.set(Vt, { name: "TabPanel" });
2175
- var _n = Ye({ defaultClassName: "pkg_sps-woodland_tabs__version_8_42_1__hash_fy26er0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_8_42_1__hash_fy26er1", navigation: "pkg_sps-woodland_tabs__version_8_42_1__hash_fy26er2" } }, defaultVariants: {}, compoundVariants: [] });
2176
- function Gt({
2878
+ Ke.set(En, { name: "TabPanel" });
2879
+ var _i = pt({ defaultClassName: "pkg_sps-woodland_tabs__version_8_42_3__hash_fy26er0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_8_42_3__hash_fy26er1", navigation: "pkg_sps-woodland_tabs__version_8_42_3__hash_fy26er2" } }, defaultVariants: {}, compoundVariants: [] });
2880
+ function Pn({
2177
2881
  className: t,
2178
2882
  context: e = "navigation",
2179
- "data-testid": r,
2180
- ...n
2883
+ "data-testid": n,
2884
+ selectedKey: r,
2885
+ defaultSelectedKey: i,
2886
+ ...l
2181
2887
  }) {
2182
- const i = sr(n), s = R.useRef(null), { tabListProps: o } = wn(n, i, s), a = tr({ "data-testid": r });
2183
- return /* @__PURE__ */ R.createElement(R.Fragment, null, /* @__PURE__ */ R.createElement(
2888
+ const s = {
2889
+ ...l,
2890
+ selectedKey: r ?? void 0,
2891
+ defaultSelectedKey: i ?? void 0
2892
+ }, c = zn(s), u = oe.useRef(null), { tabListProps: p } = Ei(s, c, u), d = Cn({ "data-testid": n });
2893
+ return /* @__PURE__ */ oe.createElement(oe.Fragment, null, /* @__PURE__ */ oe.createElement(
2184
2894
  "div",
2185
2895
  {
2186
- ...o,
2187
- ref: s,
2188
- className: yt(_n({ context: e }), t),
2189
- "data-testid": r
2896
+ ...p,
2897
+ ref: u,
2898
+ className: Wt(_i({ context: e }), t),
2899
+ "data-testid": n
2190
2900
  },
2191
- [...i.collection].map((p) => /* @__PURE__ */ R.createElement(
2192
- jt,
2901
+ [...c.collection].map((b) => /* @__PURE__ */ oe.createElement(
2902
+ Sn,
2193
2903
  {
2194
- key: p.key,
2195
- item: p,
2196
- state: i,
2904
+ key: b.key,
2905
+ item: b,
2906
+ state: c,
2197
2907
  context: e,
2198
- ...a(`tab-${String(p.key)}`)
2908
+ ...d(`tab-${String(b.key)}`)
2199
2909
  }
2200
2910
  ))
2201
- ), /* @__PURE__ */ R.createElement(
2202
- Vt,
2911
+ ), /* @__PURE__ */ oe.createElement(
2912
+ En,
2203
2913
  {
2204
- key: i.selectedItem ? i.selectedItem.key : null,
2205
- state: i,
2914
+ key: c.selectedItem ? c.selectedItem.key : null,
2915
+ state: c,
2206
2916
  context: e,
2207
- ...a("tab-panel")
2917
+ ...d("tab-panel")
2208
2918
  }
2209
2919
  ));
2210
2920
  }
2211
- fe.set(Gt, { name: "Tabs" });
2212
- const Ln = {
2213
- components: [Gt],
2921
+ Ke.set(Pn, { name: "Tabs" });
2922
+ const Li = {
2923
+ components: [Pn],
2214
2924
  examples: {
2215
2925
  basic: {
2216
2926
  label: "Basic Navigation Tabs",
2217
- description: Je`
2927
+ description: vt`
2218
2928
  <p>Navigation tabs</p>
2219
2929
  `,
2220
2930
  examples: {
2221
2931
  basic: {
2222
- react: Je`
2932
+ react: vt`
2223
2933
  import { Item } from "@react-stately/collections";
2224
2934
  import { Box, Icon } from "@sps-woodland/core";
2225
2935
  import { Tabs } from "@sps-woodland/tabs";
@@ -2285,10 +2995,10 @@ const Ln = {
2285
2995
  }
2286
2996
  }
2287
2997
  }
2288
- }, Fn = {
2289
- "Tabbed Navigation": Ln
2998
+ }, Fi = {
2999
+ "Tabbed Navigation": Li
2290
3000
  };
2291
3001
  export {
2292
- Fn as MANIFEST,
2293
- Gt as Tabs
3002
+ Fi as MANIFEST,
3003
+ Pn as Tabs
2294
3004
  };