@wf-financing/ui 4.7.1 → 4.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2561 +0,0 @@
1
- import { r as s, E as Ke, j as vn, L as pn, G as hn, H as mn, I as gn, J as En, $ as p, K as yn, a as wn, M as xn } from "./index-B6i2pWgP.mjs";
2
- function No({ children: e, features: t, strict: n = !1 }) {
3
- const [, r] = s.useState(!be(t)), o = s.useRef(void 0);
4
- if (!be(t)) {
5
- const { renderer: i, ...a } = t;
6
- o.current = i, Ke(a);
7
- }
8
- return s.useEffect(() => {
9
- be(t) && t().then(({ renderer: i, ...a }) => {
10
- Ke(a), o.current = i, r(!0);
11
- });
12
- }, []), vn.jsx(pn.Provider, { value: { renderer: o.current, strict: n }, children: e });
13
- }
14
- function be(e) {
15
- return typeof e == "function";
16
- }
17
- const Co = /* @__PURE__ */ hn(), To = {
18
- renderer: En,
19
- ...gn,
20
- ...mn
21
- };
22
- s.createContext(null);
23
- s.createContext(null);
24
- s.createContext(null);
25
- s.createContext(null);
26
- s.createContext(null);
27
- const Sn = s.createContext({});
28
- s.createContext(null);
29
- s.createContext(null);
30
- const y = typeof document < "u" ? p.useLayoutEffect : () => {
31
- };
32
- function Nn(e) {
33
- let [t, n] = s.useState(e), r = s.useRef(t), o = s.useRef(null), i = s.useRef(() => {
34
- if (!o.current) return;
35
- let l = o.current.next();
36
- if (l.done) {
37
- o.current = null;
38
- return;
39
- }
40
- r.current === l.value ? i.current() : n(l.value);
41
- });
42
- y(() => {
43
- r.current = t, o.current && i.current();
44
- });
45
- let a = s.useCallback((l) => {
46
- o.current = l(r.current), i.current();
47
- }, [
48
- i
49
- ]);
50
- return [
51
- t,
52
- a
53
- ];
54
- }
55
- const at = {
56
- prefix: String(Math.round(Math.random() * 1e10)),
57
- current: 0
58
- }, lt = /* @__PURE__ */ p.createContext(at), Cn = /* @__PURE__ */ p.createContext(!1);
59
- let $e = /* @__PURE__ */ new WeakMap();
60
- function Tn(e = !1) {
61
- let t = s.useContext(lt), n = s.useRef(null);
62
- if (n.current === null && !e) {
63
- var r, o;
64
- let i = (o = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || o === void 0 || (r = o.ReactCurrentOwner) === null || r === void 0 ? void 0 : r.current;
65
- if (i) {
66
- let a = $e.get(i);
67
- a == null ? $e.set(i, {
68
- id: t.current,
69
- state: i.memoizedState
70
- }) : i.memoizedState !== a.state && (t.current = a.id, $e.delete(i));
71
- }
72
- n.current = ++t.current;
73
- }
74
- return n.current;
75
- }
76
- function Ln(e) {
77
- let t = s.useContext(lt), n = Tn(!!e), r = `react-aria${t.prefix}`;
78
- return e || `${r}-${n}`;
79
- }
80
- function Rn(e) {
81
- let t = p.useId(), [n] = s.useState(X()), r = n ? "react-aria" : `react-aria${at.prefix}`;
82
- return e || `${r}-${t}`;
83
- }
84
- const kn = typeof p.useId == "function" ? Rn : Ln;
85
- function Fn() {
86
- return !1;
87
- }
88
- function Pn() {
89
- return !0;
90
- }
91
- function Mn(e) {
92
- return () => {
93
- };
94
- }
95
- function X() {
96
- return typeof p.useSyncExternalStore == "function" ? p.useSyncExternalStore(Mn, Fn, Pn) : s.useContext(Cn);
97
- }
98
- let Dn = !!(typeof window < "u" && window.document && window.document.createElement), _ = /* @__PURE__ */ new Map(), V;
99
- typeof FinalizationRegistry < "u" && (V = new FinalizationRegistry((e) => {
100
- _.delete(e);
101
- }));
102
- function le(e) {
103
- let [t, n] = s.useState(e), r = s.useRef(null), o = kn(t), i = s.useRef(null);
104
- if (V && V.register(i, o), Dn) {
105
- const a = _.get(o);
106
- a && !a.includes(r) ? a.push(r) : _.set(o, [
107
- r
108
- ]);
109
- }
110
- return y(() => {
111
- let a = o;
112
- return () => {
113
- V && V.unregister(i), _.delete(a);
114
- };
115
- }, [
116
- o
117
- ]), s.useEffect(() => {
118
- let a = r.current;
119
- return a && n(a), () => {
120
- a && (r.current = null);
121
- };
122
- }), o;
123
- }
124
- function On(e, t) {
125
- if (e === t) return e;
126
- let n = _.get(e);
127
- if (n)
128
- return n.forEach((o) => o.current = t), t;
129
- let r = _.get(t);
130
- return r ? (r.forEach((o) => o.current = e), e) : t;
131
- }
132
- function In(e = []) {
133
- let t = le(), [n, r] = Nn(t), o = s.useCallback(() => {
134
- r(function* () {
135
- yield t, yield document.getElementById(t) ? t : void 0;
136
- });
137
- }, [
138
- t,
139
- r
140
- ]);
141
- return y(o, [
142
- t,
143
- o,
144
- ...e
145
- ]), n;
146
- }
147
- function Fe(...e) {
148
- return (...t) => {
149
- for (let n of e) typeof n == "function" && n(...t);
150
- };
151
- }
152
- const w = (e) => {
153
- var t;
154
- return (t = e == null ? void 0 : e.ownerDocument) !== null && t !== void 0 ? t : document;
155
- }, J = (e) => e && "window" in e && e.window === e ? e : w(e).defaultView || window;
156
- function An(e) {
157
- return e !== null && typeof e == "object" && "nodeType" in e && typeof e.nodeType == "number";
158
- }
159
- function Wn(e) {
160
- return An(e) && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in e;
161
- }
162
- let Hn = !1;
163
- function ce() {
164
- return Hn;
165
- }
166
- function Ee(e, t) {
167
- if (!ce()) return t && e ? e.contains(t) : !1;
168
- if (!e || !t) return !1;
169
- let n = t;
170
- for (; n !== null; ) {
171
- if (n === e) return !0;
172
- n.tagName === "SLOT" && n.assignedSlot ? n = n.assignedSlot.parentNode : Wn(n) ? n = n.host : n = n.parentNode;
173
- }
174
- return !1;
175
- }
176
- const T = (e = document) => {
177
- var t;
178
- if (!ce()) return e.activeElement;
179
- let n = e.activeElement;
180
- for (; n && "shadowRoot" in n && (!((t = n.shadowRoot) === null || t === void 0) && t.activeElement); ) n = n.shadowRoot.activeElement;
181
- return n;
182
- };
183
- function O(e) {
184
- return ce() && e.target.shadowRoot && e.composedPath ? e.composedPath()[0] : e.target;
185
- }
186
- class _n {
187
- get currentNode() {
188
- return this._currentNode;
189
- }
190
- set currentNode(t) {
191
- if (!Ee(this.root, t)) throw new Error("Cannot set currentNode to a node that is not contained by the root node.");
192
- const n = [];
193
- let r = t, o = t;
194
- for (this._currentNode = t; r && r !== this.root; ) if (r.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
195
- const a = r, l = this._doc.createTreeWalker(a, this.whatToShow, {
196
- acceptNode: this._acceptNode
197
- });
198
- n.push(l), l.currentNode = o, this._currentSetFor.add(l), r = o = a.host;
199
- } else r = r.parentNode;
200
- const i = this._doc.createTreeWalker(this.root, this.whatToShow, {
201
- acceptNode: this._acceptNode
202
- });
203
- n.push(i), i.currentNode = o, this._currentSetFor.add(i), this._walkerStack = n;
204
- }
205
- get doc() {
206
- return this._doc;
207
- }
208
- firstChild() {
209
- let t = this.currentNode, n = this.nextNode();
210
- return Ee(t, n) ? (n && (this.currentNode = n), n) : (this.currentNode = t, null);
211
- }
212
- lastChild() {
213
- let n = this._walkerStack[0].lastChild();
214
- return n && (this.currentNode = n), n;
215
- }
216
- nextNode() {
217
- const t = this._walkerStack[0].nextNode();
218
- if (t) {
219
- if (t.shadowRoot) {
220
- var n;
221
- let o;
222
- if (typeof this.filter == "function" ? o = this.filter(t) : !((n = this.filter) === null || n === void 0) && n.acceptNode && (o = this.filter.acceptNode(t)), o === NodeFilter.FILTER_ACCEPT)
223
- return this.currentNode = t, t;
224
- let i = this.nextNode();
225
- return i && (this.currentNode = i), i;
226
- }
227
- return t && (this.currentNode = t), t;
228
- } else if (this._walkerStack.length > 1) {
229
- this._walkerStack.shift();
230
- let r = this.nextNode();
231
- return r && (this.currentNode = r), r;
232
- } else return null;
233
- }
234
- previousNode() {
235
- const t = this._walkerStack[0];
236
- if (t.currentNode === t.root) {
237
- if (this._currentSetFor.has(t))
238
- if (this._currentSetFor.delete(t), this._walkerStack.length > 1) {
239
- this._walkerStack.shift();
240
- let o = this.previousNode();
241
- return o && (this.currentNode = o), o;
242
- } else return null;
243
- return null;
244
- }
245
- const n = t.previousNode();
246
- if (n) {
247
- if (n.shadowRoot) {
248
- var r;
249
- let i;
250
- if (typeof this.filter == "function" ? i = this.filter(n) : !((r = this.filter) === null || r === void 0) && r.acceptNode && (i = this.filter.acceptNode(n)), i === NodeFilter.FILTER_ACCEPT)
251
- return n && (this.currentNode = n), n;
252
- let a = this.lastChild();
253
- return a && (this.currentNode = a), a;
254
- }
255
- return n && (this.currentNode = n), n;
256
- } else if (this._walkerStack.length > 1) {
257
- this._walkerStack.shift();
258
- let o = this.previousNode();
259
- return o && (this.currentNode = o), o;
260
- } else return null;
261
- }
262
- /**
263
- * @deprecated
264
- */
265
- nextSibling() {
266
- return null;
267
- }
268
- /**
269
- * @deprecated
270
- */
271
- previousSibling() {
272
- return null;
273
- }
274
- /**
275
- * @deprecated
276
- */
277
- parentNode() {
278
- return null;
279
- }
280
- constructor(t, n, r, o) {
281
- this._walkerStack = [], this._currentSetFor = /* @__PURE__ */ new Set(), this._acceptNode = (a) => {
282
- if (a.nodeType === Node.ELEMENT_NODE) {
283
- const c = a.shadowRoot;
284
- if (c) {
285
- const u = this._doc.createTreeWalker(c, this.whatToShow, {
286
- acceptNode: this._acceptNode
287
- });
288
- return this._walkerStack.unshift(u), NodeFilter.FILTER_ACCEPT;
289
- } else {
290
- var l;
291
- if (typeof this.filter == "function") return this.filter(a);
292
- if (!((l = this.filter) === null || l === void 0) && l.acceptNode) return this.filter.acceptNode(a);
293
- if (this.filter === null) return NodeFilter.FILTER_ACCEPT;
294
- }
295
- }
296
- return NodeFilter.FILTER_SKIP;
297
- }, this._doc = t, this.root = n, this.filter = o ?? null, this.whatToShow = r ?? NodeFilter.SHOW_ALL, this._currentNode = n, this._walkerStack.unshift(t.createTreeWalker(n, r, this._acceptNode));
298
- const i = n.shadowRoot;
299
- if (i) {
300
- const a = this._doc.createTreeWalker(i, this.whatToShow, {
301
- acceptNode: this._acceptNode
302
- });
303
- this._walkerStack.unshift(a);
304
- }
305
- }
306
- }
307
- function Kn(e, t, n, r) {
308
- return ce() ? new _n(e, t, n, r) : e.createTreeWalker(t, n, r);
309
- }
310
- function W(...e) {
311
- let t = {
312
- ...e[0]
313
- };
314
- for (let n = 1; n < e.length; n++) {
315
- let r = e[n];
316
- for (let o in r) {
317
- let i = t[o], a = r[o];
318
- typeof i == "function" && typeof a == "function" && // This is a lot faster than a regex.
319
- o[0] === "o" && o[1] === "n" && o.charCodeAt(2) >= /* 'A' */
320
- 65 && o.charCodeAt(2) <= /* 'Z' */
321
- 90 ? t[o] = Fe(i, a) : (o === "className" || o === "UNSAFE_className") && typeof i == "string" && typeof a == "string" ? t[o] = yn(i, a) : o === "id" && i && a ? t.id = On(i, a) : t[o] = a !== void 0 ? a : i;
322
- }
323
- }
324
- return t;
325
- }
326
- function ct(...e) {
327
- return e.length === 1 && e[0] ? e[0] : (t) => {
328
- let n = !1;
329
- const r = e.map((o) => {
330
- const i = ze(o, t);
331
- return n || (n = typeof i == "function"), i;
332
- });
333
- if (n) return () => {
334
- r.forEach((o, i) => {
335
- typeof o == "function" ? o() : ze(e[i], null);
336
- });
337
- };
338
- };
339
- }
340
- function ze(e, t) {
341
- if (typeof e == "function") return e(t);
342
- e != null && (e.current = t);
343
- }
344
- const zn = /* @__PURE__ */ new Set([
345
- "id"
346
- ]), Vn = /* @__PURE__ */ new Set([
347
- "aria-label",
348
- "aria-labelledby",
349
- "aria-describedby",
350
- "aria-details"
351
- ]), Bn = /* @__PURE__ */ new Set([
352
- "href",
353
- "hrefLang",
354
- "target",
355
- "rel",
356
- "download",
357
- "ping",
358
- "referrerPolicy"
359
- ]), jn = /* @__PURE__ */ new Set([
360
- "dir",
361
- "lang",
362
- "hidden",
363
- "inert",
364
- "translate"
365
- ]), Ve = /* @__PURE__ */ new Set([
366
- "onClick",
367
- "onAuxClick",
368
- "onContextMenu",
369
- "onDoubleClick",
370
- "onMouseDown",
371
- "onMouseEnter",
372
- "onMouseLeave",
373
- "onMouseMove",
374
- "onMouseOut",
375
- "onMouseOver",
376
- "onMouseUp",
377
- "onTouchCancel",
378
- "onTouchEnd",
379
- "onTouchMove",
380
- "onTouchStart",
381
- "onPointerDown",
382
- "onPointerMove",
383
- "onPointerUp",
384
- "onPointerCancel",
385
- "onPointerEnter",
386
- "onPointerLeave",
387
- "onPointerOver",
388
- "onPointerOut",
389
- "onGotPointerCapture",
390
- "onLostPointerCapture",
391
- "onScroll",
392
- "onWheel",
393
- "onAnimationStart",
394
- "onAnimationEnd",
395
- "onAnimationIteration",
396
- "onTransitionCancel",
397
- "onTransitionEnd",
398
- "onTransitionRun",
399
- "onTransitionStart"
400
- ]), Gn = /^(data-.*)$/;
401
- function se(e, t = {}) {
402
- let { labelable: n, isLink: r, global: o, events: i = o, propNames: a } = t, l = {};
403
- for (const c in e) Object.prototype.hasOwnProperty.call(e, c) && (zn.has(c) || n && Vn.has(c) || r && Bn.has(c) || o && jn.has(c) || i && (Ve.has(c) || c.endsWith("Capture") && Ve.has(c.slice(0, -7))) || a != null && a.has(c) || Gn.test(c)) && (l[c] = e[c]);
404
- return l;
405
- }
406
- function ye(e) {
407
- if (Un()) e.focus({
408
- preventScroll: !0
409
- });
410
- else {
411
- let t = qn(e);
412
- e.focus(), Jn(t);
413
- }
414
- }
415
- let ee = null;
416
- function Un() {
417
- if (ee == null) {
418
- ee = !1;
419
- try {
420
- document.createElement("div").focus({
421
- get preventScroll() {
422
- return ee = !0, !0;
423
- }
424
- });
425
- } catch {
426
- }
427
- }
428
- return ee;
429
- }
430
- function qn(e) {
431
- let t = e.parentNode, n = [], r = document.scrollingElement || document.documentElement;
432
- for (; t instanceof HTMLElement && t !== r; )
433
- (t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && n.push({
434
- element: t,
435
- scrollTop: t.scrollTop,
436
- scrollLeft: t.scrollLeft
437
- }), t = t.parentNode;
438
- return r instanceof HTMLElement && n.push({
439
- element: r,
440
- scrollTop: r.scrollTop,
441
- scrollLeft: r.scrollLeft
442
- }), n;
443
- }
444
- function Jn(e) {
445
- for (let { element: t, scrollTop: n, scrollLeft: r } of e)
446
- t.scrollTop = n, t.scrollLeft = r;
447
- }
448
- function ue(e) {
449
- var t;
450
- if (typeof window > "u" || window.navigator == null) return !1;
451
- let n = (t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands;
452
- return Array.isArray(n) && n.some((r) => e.test(r.brand)) || e.test(window.navigator.userAgent);
453
- }
454
- function Pe(e) {
455
- var t;
456
- return typeof window < "u" && window.navigator != null ? e.test(((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.platform) || window.navigator.platform) : !1;
457
- }
458
- function D(e) {
459
- let t = null;
460
- return () => (t == null && (t = e()), t);
461
- }
462
- const ne = D(function() {
463
- return Pe(/^Mac/i);
464
- }), Zn = D(function() {
465
- return Pe(/^iPhone/i);
466
- }), st = D(function() {
467
- return Pe(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
468
- ne() && navigator.maxTouchPoints > 1;
469
- }), Xn = D(function() {
470
- return Zn() || st();
471
- }), Qn = D(function() {
472
- return ue(/AppleWebKit/i) && !ut();
473
- }), ut = D(function() {
474
- return ue(/Chrome/i);
475
- }), dt = D(function() {
476
- return ue(/Android/i);
477
- }), Yn = D(function() {
478
- return ue(/Firefox/i);
479
- });
480
- function Z(e, t, n = !0) {
481
- var r, o;
482
- let { metaKey: i, ctrlKey: a, altKey: l, shiftKey: c } = t;
483
- Yn() && (!((o = window.event) === null || o === void 0 || (r = o.type) === null || r === void 0) && r.startsWith("key")) && e.target === "_blank" && (ne() ? i = !0 : a = !0);
484
- let u = Qn() && ne() && !st() ? new KeyboardEvent("keydown", {
485
- keyIdentifier: "Enter",
486
- metaKey: i,
487
- ctrlKey: a,
488
- altKey: l,
489
- shiftKey: c
490
- }) : new MouseEvent("click", {
491
- metaKey: i,
492
- ctrlKey: a,
493
- altKey: l,
494
- shiftKey: c,
495
- detail: 1,
496
- bubbles: !0,
497
- cancelable: !0
498
- });
499
- Z.isOpening = n, ye(e), e.dispatchEvent(u), Z.isOpening = !1;
500
- }
501
- Z.isOpening = !1;
502
- let F = /* @__PURE__ */ new Map(), we = /* @__PURE__ */ new Set();
503
- function Be() {
504
- if (typeof window > "u") return;
505
- function e(r) {
506
- return "propertyName" in r;
507
- }
508
- let t = (r) => {
509
- if (!e(r) || !r.target) return;
510
- let o = F.get(r.target);
511
- o || (o = /* @__PURE__ */ new Set(), F.set(r.target, o), r.target.addEventListener("transitioncancel", n, {
512
- once: !0
513
- })), o.add(r.propertyName);
514
- }, n = (r) => {
515
- if (!e(r) || !r.target) return;
516
- let o = F.get(r.target);
517
- if (o && (o.delete(r.propertyName), o.size === 0 && (r.target.removeEventListener("transitioncancel", n), F.delete(r.target)), F.size === 0)) {
518
- for (let i of we) i();
519
- we.clear();
520
- }
521
- };
522
- document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", n);
523
- }
524
- typeof document < "u" && (document.readyState !== "loading" ? Be() : document.addEventListener("DOMContentLoaded", Be));
525
- function er() {
526
- for (const [e] of F)
527
- "isConnected" in e && !e.isConnected && F.delete(e);
528
- }
529
- function tr(e) {
530
- requestAnimationFrame(() => {
531
- er(), F.size === 0 ? e() : we.add(e);
532
- });
533
- }
534
- function nr() {
535
- let e = s.useRef(/* @__PURE__ */ new Map()), t = s.useCallback((o, i, a, l) => {
536
- let c = l != null && l.once ? (...u) => {
537
- e.current.delete(a), a(...u);
538
- } : a;
539
- e.current.set(a, {
540
- type: i,
541
- eventTarget: o,
542
- fn: c,
543
- options: l
544
- }), o.addEventListener(i, c, l);
545
- }, []), n = s.useCallback((o, i, a, l) => {
546
- var c;
547
- let u = ((c = e.current.get(a)) === null || c === void 0 ? void 0 : c.fn) || a;
548
- o.removeEventListener(i, u, l), e.current.delete(a);
549
- }, []), r = s.useCallback(() => {
550
- e.current.forEach((o, i) => {
551
- n(o.eventTarget, o.type, i, o.options);
552
- });
553
- }, [
554
- n
555
- ]);
556
- return s.useEffect(() => r, [
557
- r
558
- ]), {
559
- addGlobalListener: t,
560
- removeGlobalListener: n,
561
- removeAllGlobalListeners: r
562
- };
563
- }
564
- function rr(e, t) {
565
- let { id: n, "aria-label": r, "aria-labelledby": o } = e;
566
- return n = le(n), o && r ? o = [
567
- .../* @__PURE__ */ new Set([
568
- n,
569
- ...o.trim().split(/\s+/)
570
- ])
571
- ].join(" ") : o && (o = o.trim().split(/\s+/).join(" ")), !r && !o && t && (r = t), {
572
- id: n,
573
- "aria-label": r,
574
- "aria-labelledby": o
575
- };
576
- }
577
- function de(e) {
578
- const t = s.useRef(null), n = s.useRef(void 0), r = s.useCallback((o) => {
579
- if (typeof e == "function") {
580
- const i = e, a = i(o);
581
- return () => {
582
- typeof a == "function" ? a() : i(null);
583
- };
584
- } else if (e)
585
- return e.current = o, () => {
586
- e.current = null;
587
- };
588
- }, [
589
- e
590
- ]);
591
- return s.useMemo(() => ({
592
- get current() {
593
- return t.current;
594
- },
595
- set current(o) {
596
- t.current = o, n.current && (n.current(), n.current = void 0), o != null && (n.current = r(o));
597
- }
598
- }), [
599
- r
600
- ]);
601
- }
602
- var ve;
603
- const or = (ve = p.useInsertionEffect) !== null && ve !== void 0 ? ve : y;
604
- function xe(e) {
605
- const t = s.useRef(null);
606
- return or(() => {
607
- t.current = e;
608
- }, [
609
- e
610
- ]), s.useCallback((...n) => {
611
- const r = t.current;
612
- return r == null ? void 0 : r(...n);
613
- }, []);
614
- }
615
- function ir() {
616
- return typeof window.ResizeObserver < "u";
617
- }
618
- function ar(e) {
619
- const { ref: t, box: n, onResize: r } = e;
620
- let o = xe(r);
621
- s.useEffect(() => {
622
- let i = t == null ? void 0 : t.current;
623
- if (i)
624
- if (ir()) {
625
- const a = new window.ResizeObserver((l) => {
626
- l.length && o();
627
- });
628
- return a.observe(i, {
629
- box: n
630
- }), () => {
631
- i && a.unobserve(i);
632
- };
633
- } else
634
- return window.addEventListener("resize", o, !1), () => {
635
- window.removeEventListener("resize", o, !1);
636
- };
637
- }, [
638
- t,
639
- n
640
- ]);
641
- }
642
- function lr(e, t) {
643
- y(() => {
644
- if (e && e.ref && t)
645
- return e.ref.current = t.current, () => {
646
- e.ref && (e.ref.current = null);
647
- };
648
- });
649
- }
650
- function re(e, t) {
651
- if (!e) return !1;
652
- let n = window.getComputedStyle(e), r = /(auto|scroll)/.test(n.overflow + n.overflowX + n.overflowY);
653
- return r && t && (r = e.scrollHeight !== e.clientHeight || e.scrollWidth !== e.clientWidth), r;
654
- }
655
- function ft(e, t) {
656
- let n = e;
657
- for (re(n, t) && (n = n.parentElement); n && !re(n, t); ) n = n.parentElement;
658
- return n || document.scrollingElement || document.documentElement;
659
- }
660
- const cr = /* @__PURE__ */ new Set([
661
- "checkbox",
662
- "radio",
663
- "range",
664
- "color",
665
- "file",
666
- "image",
667
- "button",
668
- "submit",
669
- "reset"
670
- ]);
671
- function G(e) {
672
- return e instanceof HTMLInputElement && !cr.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
673
- }
674
- let S = typeof document < "u" && window.visualViewport;
675
- function sr() {
676
- let e = X(), [t, n] = s.useState(() => e ? {
677
- width: 0,
678
- height: 0
679
- } : je());
680
- return s.useEffect(() => {
681
- let r = () => {
682
- S && S.scale > 1 || n((a) => {
683
- let l = je();
684
- return l.width === a.width && l.height === a.height ? a : l;
685
- });
686
- }, o, i = (a) => {
687
- S && S.scale > 1 || G(a.target) && (o = requestAnimationFrame(() => {
688
- (!document.activeElement || !G(document.activeElement)) && n((l) => {
689
- let c = {
690
- width: window.innerWidth,
691
- height: window.innerHeight
692
- };
693
- return c.width === l.width && c.height === l.height ? l : c;
694
- });
695
- }));
696
- };
697
- return window.addEventListener("blur", i, !0), S ? S.addEventListener("resize", r) : window.addEventListener("resize", r), () => {
698
- cancelAnimationFrame(o), window.removeEventListener("blur", i, !0), S ? S.removeEventListener("resize", r) : window.removeEventListener("resize", r);
699
- };
700
- }, []), t;
701
- }
702
- function je() {
703
- return {
704
- // Multiply by the visualViewport scale to get the "natural" size, unaffected by pinch zooming.
705
- width: S ? S.width * S.scale : window.innerWidth,
706
- height: S ? S.height * S.scale : window.innerHeight
707
- };
708
- }
709
- function ur(e) {
710
- return e.pointerType === "" && e.isTrusted ? !0 : dt() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
711
- }
712
- function bt(e, t = !0) {
713
- let [n, r] = s.useState(!0), o = n && t;
714
- return y(() => {
715
- if (o && e.current && "getAnimations" in e.current)
716
- for (let i of e.current.getAnimations()) i instanceof CSSTransition && i.cancel();
717
- }, [
718
- e,
719
- o
720
- ]), $t(e, o, s.useCallback(() => r(!1), [])), o;
721
- }
722
- function Ge(e, t) {
723
- let [n, r] = s.useState(t ? "open" : "closed");
724
- switch (n) {
725
- case "open":
726
- t || r("exiting");
727
- break;
728
- case "closed":
729
- case "exiting":
730
- t && r("open");
731
- break;
732
- }
733
- let o = n === "exiting";
734
- return $t(e, o, s.useCallback(() => {
735
- r((i) => i === "exiting" ? "closed" : i);
736
- }, [])), o;
737
- }
738
- function $t(e, t, n) {
739
- y(() => {
740
- if (t && e.current) {
741
- if (!("getAnimations" in e.current)) {
742
- n();
743
- return;
744
- }
745
- let r = e.current.getAnimations();
746
- if (r.length === 0) {
747
- n();
748
- return;
749
- }
750
- let o = !1;
751
- return Promise.all(r.map((i) => i.finished)).then(() => {
752
- o || wn.flushSync(() => {
753
- n();
754
- });
755
- }).catch(() => {
756
- }), () => {
757
- o = !0;
758
- };
759
- }
760
- }, [
761
- e,
762
- t,
763
- n
764
- ]);
765
- }
766
- const dr = typeof Element < "u" && "checkVisibility" in Element.prototype;
767
- function fr(e) {
768
- const t = J(e);
769
- if (!(e instanceof t.HTMLElement) && !(e instanceof t.SVGElement)) return !1;
770
- let { display: n, visibility: r } = e.style, o = n !== "none" && r !== "hidden" && r !== "collapse";
771
- if (o) {
772
- const { getComputedStyle: i } = e.ownerDocument.defaultView;
773
- let { display: a, visibility: l } = i(e);
774
- o = a !== "none" && l !== "hidden" && l !== "collapse";
775
- }
776
- return o;
777
- }
778
- function br(e, t) {
779
- return !e.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
780
- !e.hasAttribute("data-react-aria-prevent-focus") && (e.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0);
781
- }
782
- function Me(e, t) {
783
- return dr ? e.checkVisibility({
784
- visibilityProperty: !0
785
- }) && !e.closest("[data-react-aria-prevent-focus]") : e.nodeName !== "#comment" && fr(e) && br(e, t) && (!e.parentElement || Me(e.parentElement, e));
786
- }
787
- const De = [
788
- "input:not([disabled]):not([type=hidden])",
789
- "select:not([disabled])",
790
- "textarea:not([disabled])",
791
- "button:not([disabled])",
792
- "a[href]",
793
- "area[href]",
794
- "summary",
795
- "iframe",
796
- "object",
797
- "embed",
798
- "audio[controls]",
799
- "video[controls]",
800
- '[contenteditable]:not([contenteditable^="false"])',
801
- "permission"
802
- ], $r = De.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
803
- De.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
804
- const vr = De.join(':not([hidden]):not([tabindex="-1"]),');
805
- function pr(e) {
806
- return e.matches($r) && Me(e) && !vt(e);
807
- }
808
- function hr(e) {
809
- return e.matches(vr) && Me(e) && !vt(e);
810
- }
811
- function vt(e) {
812
- let t = e;
813
- for (; t != null; ) {
814
- if (t instanceof t.ownerDocument.defaultView.HTMLElement && t.inert) return !0;
815
- t = t.parentElement;
816
- }
817
- return !1;
818
- }
819
- var pe;
820
- const mr = typeof document < "u" ? (pe = p.useInsertionEffect) !== null && pe !== void 0 ? pe : p.useLayoutEffect : () => {
821
- };
822
- function gr(e, t, n) {
823
- let [r, o] = s.useState(e || t), i = s.useRef(r), a = s.useRef(e !== void 0), l = e !== void 0;
824
- s.useEffect(() => {
825
- a.current, a.current = l;
826
- }, [
827
- l
828
- ]);
829
- let c = l ? e : r;
830
- mr(() => {
831
- i.current = c;
832
- });
833
- let [, u] = s.useReducer(() => ({}), {}), f = s.useCallback((d, ...b) => {
834
- let v = typeof d == "function" ? d(i.current) : d;
835
- Object.is(i.current, v) || (i.current = v, o(v), u(), n == null || n(v, ...b));
836
- }, [
837
- n
838
- ]);
839
- return [
840
- c,
841
- f
842
- ];
843
- }
844
- const Se = Symbol("default");
845
- function Oe({ values: e, children: t }) {
846
- for (let [n, r] of e)
847
- t = /* @__PURE__ */ p.createElement(n.Provider, {
848
- value: r
849
- }, t);
850
- return t;
851
- }
852
- function Ie(e) {
853
- let { className: t, style: n, children: r, defaultClassName: o, defaultChildren: i, defaultStyle: a, values: l } = e;
854
- return s.useMemo(() => {
855
- let c, u, f;
856
- return typeof t == "function" ? c = t({
857
- ...l,
858
- defaultClassName: o
859
- }) : c = t, typeof n == "function" ? u = n({
860
- ...l,
861
- defaultStyle: a || {}
862
- }) : u = n, typeof r == "function" ? f = r({
863
- ...l,
864
- defaultChildren: i
865
- }) : r == null ? f = i : f = r, {
866
- className: c ?? o,
867
- style: u || a ? {
868
- ...a,
869
- ...u
870
- } : void 0,
871
- children: f ?? i,
872
- "data-rac": ""
873
- };
874
- }, [
875
- t,
876
- n,
877
- r,
878
- o,
879
- i,
880
- a,
881
- l
882
- ]);
883
- }
884
- function Er(e, t) {
885
- let n = s.useContext(e);
886
- if (t === null)
887
- return null;
888
- if (n && typeof n == "object" && "slots" in n && n.slots) {
889
- let r = t || Se;
890
- if (!n.slots[r]) {
891
- let o = new Intl.ListFormat().format(Object.keys(n.slots).map((a) => `"${a}"`)), i = t ? `Invalid slot "${t}".` : "A slot prop is required.";
892
- throw new Error(`${i} Valid slot names are ${o}.`);
893
- }
894
- return n.slots[r];
895
- }
896
- return n;
897
- }
898
- function pt(e, t, n) {
899
- let r = Er(n, e.slot) || {}, { ref: o, ...i } = r, a = de(s.useMemo(() => ct(t, o), [
900
- t,
901
- o
902
- ])), l = W(i, e);
903
- return "style" in i && i.style && "style" in e && e.style && (typeof i.style == "function" || typeof e.style == "function" ? l.style = (c) => {
904
- let u = typeof i.style == "function" ? i.style(c) : i.style, f = {
905
- ...c.defaultStyle,
906
- ...u
907
- }, d = typeof e.style == "function" ? e.style({
908
- ...c,
909
- defaultStyle: f
910
- }) : e.style;
911
- return {
912
- ...f,
913
- ...d
914
- };
915
- } : l.style = {
916
- ...i.style,
917
- ...e.style
918
- }), [
919
- l,
920
- a
921
- ];
922
- }
923
- const yr = /* @__PURE__ */ new WeakMap(), wr = /* @__PURE__ */ new Set([
924
- "Arab",
925
- "Syrc",
926
- "Samr",
927
- "Mand",
928
- "Thaa",
929
- "Mend",
930
- "Nkoo",
931
- "Adlm",
932
- "Rohg",
933
- "Hebr"
934
- ]), xr = /* @__PURE__ */ new Set([
935
- "ae",
936
- "ar",
937
- "arc",
938
- "bcc",
939
- "bqi",
940
- "ckb",
941
- "dv",
942
- "fa",
943
- "glk",
944
- "he",
945
- "ku",
946
- "mzn",
947
- "nqo",
948
- "pnb",
949
- "ps",
950
- "sd",
951
- "ug",
952
- "ur",
953
- "yi"
954
- ]);
955
- function Sr(e) {
956
- if (Intl.Locale) {
957
- let n = new Intl.Locale(e).maximize(), r = typeof n.getTextInfo == "function" ? n.getTextInfo() : n.textInfo;
958
- if (r) return r.direction === "rtl";
959
- if (n.script) return wr.has(n.script);
960
- }
961
- let t = e.split("-")[0];
962
- return xr.has(t);
963
- }
964
- const ht = Symbol.for("react-aria.i18n.locale");
965
- function mt() {
966
- let e = typeof window < "u" && window[ht] || typeof navigator < "u" && (navigator.language || navigator.userLanguage) || "en-US";
967
- try {
968
- Intl.DateTimeFormat.supportedLocalesOf([
969
- e
970
- ]);
971
- } catch {
972
- e = "en-US";
973
- }
974
- return {
975
- locale: e,
976
- direction: Sr(e) ? "rtl" : "ltr"
977
- };
978
- }
979
- let Ne = mt(), B = /* @__PURE__ */ new Set();
980
- function Ue() {
981
- Ne = mt();
982
- for (let e of B) e(Ne);
983
- }
984
- function Nr() {
985
- let e = X(), [t, n] = s.useState(Ne);
986
- return s.useEffect(() => (B.size === 0 && window.addEventListener("languagechange", Ue), B.add(n), () => {
987
- B.delete(n), B.size === 0 && window.removeEventListener("languagechange", Ue);
988
- }), []), e ? {
989
- locale: typeof window < "u" && window[ht] || "en-US",
990
- direction: "ltr"
991
- } : t;
992
- }
993
- const Cr = /* @__PURE__ */ p.createContext(null);
994
- function Tr() {
995
- let e = Nr();
996
- return s.useContext(Cr) || e;
997
- }
998
- const Lr = Symbol.for("react-aria.i18n.locale"), Rr = Symbol.for("react-aria.i18n.strings");
999
- let H;
1000
- class fe {
1001
- /** Returns a localized string for the given key and locale. */
1002
- getStringForLocale(t, n) {
1003
- let o = this.getStringsForLocale(n)[t];
1004
- if (!o) throw new Error(`Could not find intl message ${t} in ${n} locale`);
1005
- return o;
1006
- }
1007
- /** Returns all localized strings for the given locale. */
1008
- getStringsForLocale(t) {
1009
- let n = this.strings[t];
1010
- return n || (n = kr(t, this.strings, this.defaultLocale), this.strings[t] = n), n;
1011
- }
1012
- static getGlobalDictionaryForPackage(t) {
1013
- if (typeof window > "u") return null;
1014
- let n = window[Lr];
1015
- if (H === void 0) {
1016
- let o = window[Rr];
1017
- if (!o) return null;
1018
- H = {};
1019
- for (let i in o) H[i] = new fe({
1020
- [n]: o[i]
1021
- }, n);
1022
- }
1023
- let r = H == null ? void 0 : H[t];
1024
- if (!r) throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);
1025
- return r;
1026
- }
1027
- constructor(t, n = "en-US") {
1028
- this.strings = Object.fromEntries(Object.entries(t).filter(([, r]) => r)), this.defaultLocale = n;
1029
- }
1030
- }
1031
- function kr(e, t, n = "en-US") {
1032
- if (t[e]) return t[e];
1033
- let r = Fr(e);
1034
- if (t[r]) return t[r];
1035
- for (let o in t)
1036
- if (o.startsWith(r + "-")) return t[o];
1037
- return t[n];
1038
- }
1039
- function Fr(e) {
1040
- return Intl.Locale ? new Intl.Locale(e).language : e.split("-")[0];
1041
- }
1042
- const qe = /* @__PURE__ */ new Map(), Je = /* @__PURE__ */ new Map();
1043
- class Pr {
1044
- /** Formats a localized string for the given key with the provided variables. */
1045
- format(t, n) {
1046
- let r = this.strings.getStringForLocale(t, this.locale);
1047
- return typeof r == "function" ? r(n, this) : r;
1048
- }
1049
- plural(t, n, r = "cardinal") {
1050
- let o = n["=" + t];
1051
- if (o) return typeof o == "function" ? o() : o;
1052
- let i = this.locale + ":" + r, a = qe.get(i);
1053
- a || (a = new Intl.PluralRules(this.locale, {
1054
- type: r
1055
- }), qe.set(i, a));
1056
- let l = a.select(t);
1057
- return o = n[l] || n.other, typeof o == "function" ? o() : o;
1058
- }
1059
- number(t) {
1060
- let n = Je.get(this.locale);
1061
- return n || (n = new Intl.NumberFormat(this.locale), Je.set(this.locale, n)), n.format(t);
1062
- }
1063
- select(t, n) {
1064
- let r = t[n] || t.other;
1065
- return typeof r == "function" ? r() : r;
1066
- }
1067
- constructor(t, n) {
1068
- this.locale = t, this.strings = n;
1069
- }
1070
- }
1071
- const Ze = /* @__PURE__ */ new WeakMap();
1072
- function Mr(e) {
1073
- let t = Ze.get(e);
1074
- return t || (t = new fe(e), Ze.set(e, t)), t;
1075
- }
1076
- function Dr(e, t) {
1077
- return t && fe.getGlobalDictionaryForPackage(t) || Mr(e);
1078
- }
1079
- function Or(e, t) {
1080
- let { locale: n } = Tr(), r = Dr(e, t);
1081
- return s.useMemo(() => new Pr(n, r), [
1082
- n,
1083
- r
1084
- ]);
1085
- }
1086
- function gt(e) {
1087
- let t = e;
1088
- return t.nativeEvent = e, t.isDefaultPrevented = () => t.defaultPrevented, t.isPropagationStopped = () => t.cancelBubble, t.persist = () => {
1089
- }, t;
1090
- }
1091
- function Ir(e, t) {
1092
- Object.defineProperty(e, "target", {
1093
- value: t
1094
- }), Object.defineProperty(e, "currentTarget", {
1095
- value: t
1096
- });
1097
- }
1098
- function Ar(e) {
1099
- let t = s.useRef({
1100
- isFocused: !1,
1101
- observer: null
1102
- });
1103
- return y(() => {
1104
- const n = t.current;
1105
- return () => {
1106
- n.observer && (n.observer.disconnect(), n.observer = null);
1107
- };
1108
- }, []), s.useCallback((n) => {
1109
- if (n.target instanceof HTMLButtonElement || n.target instanceof HTMLInputElement || n.target instanceof HTMLTextAreaElement || n.target instanceof HTMLSelectElement) {
1110
- t.current.isFocused = !0;
1111
- let r = n.target, o = (i) => {
1112
- if (t.current.isFocused = !1, r.disabled) {
1113
- let a = gt(i);
1114
- e == null || e(a);
1115
- }
1116
- t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
1117
- };
1118
- r.addEventListener("focusout", o, {
1119
- once: !0
1120
- }), t.current.observer = new MutationObserver(() => {
1121
- if (t.current.isFocused && r.disabled) {
1122
- var i;
1123
- (i = t.current.observer) === null || i === void 0 || i.disconnect();
1124
- let a = r === document.activeElement ? null : document.activeElement;
1125
- r.dispatchEvent(new FocusEvent("blur", {
1126
- relatedTarget: a
1127
- })), r.dispatchEvent(new FocusEvent("focusout", {
1128
- bubbles: !0,
1129
- relatedTarget: a
1130
- }));
1131
- }
1132
- }), t.current.observer.observe(r, {
1133
- attributes: !0,
1134
- attributeFilter: [
1135
- "disabled"
1136
- ]
1137
- });
1138
- }
1139
- }, [
1140
- e
1141
- ]);
1142
- }
1143
- let Wr = !1;
1144
- const oe = p.createContext({
1145
- register: () => {
1146
- }
1147
- });
1148
- oe.displayName = "PressResponderContext";
1149
- let Q = null, Hr = /* @__PURE__ */ new Set(), U = /* @__PURE__ */ new Map(), A = !1, Ce = !1;
1150
- function Ae(e, t) {
1151
- for (let n of Hr) n(e, t);
1152
- }
1153
- function _r(e) {
1154
- return !(e.metaKey || !ne() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
1155
- }
1156
- function ie(e) {
1157
- A = !0, !Z.isOpening && _r(e) && (Q = "keyboard", Ae("keyboard", e));
1158
- }
1159
- function K(e) {
1160
- Q = "pointer", "pointerType" in e && e.pointerType, (e.type === "mousedown" || e.type === "pointerdown") && (A = !0, Ae("pointer", e));
1161
- }
1162
- function Et(e) {
1163
- !Z.isOpening && ur(e) && (A = !0, Q = "virtual");
1164
- }
1165
- function yt(e) {
1166
- e.target === window || e.target === document || Wr || !e.isTrusted || (!A && !Ce && (Q = "virtual", Ae("virtual", e)), A = !1, Ce = !1);
1167
- }
1168
- function wt() {
1169
- A = !1, Ce = !0;
1170
- }
1171
- function Xe(e) {
1172
- if (typeof window > "u" || typeof document > "u" || U.get(J(e))) return;
1173
- const t = J(e), n = w(e);
1174
- let r = t.HTMLElement.prototype.focus;
1175
- t.HTMLElement.prototype.focus = function() {
1176
- A = !0, r.apply(this, arguments);
1177
- }, n.addEventListener("keydown", ie, !0), n.addEventListener("keyup", ie, !0), n.addEventListener("click", Et, !0), t.addEventListener("focus", yt, !0), t.addEventListener("blur", wt, !1), typeof PointerEvent < "u" && (n.addEventListener("pointerdown", K, !0), n.addEventListener("pointermove", K, !0), n.addEventListener("pointerup", K, !0)), t.addEventListener("beforeunload", () => {
1178
- xt(e);
1179
- }, {
1180
- once: !0
1181
- }), U.set(t, {
1182
- focus: r
1183
- });
1184
- }
1185
- const xt = (e, t) => {
1186
- const n = J(e), r = w(e);
1187
- t && r.removeEventListener("DOMContentLoaded", t), U.has(n) && (n.HTMLElement.prototype.focus = U.get(n).focus, r.removeEventListener("keydown", ie, !0), r.removeEventListener("keyup", ie, !0), r.removeEventListener("click", Et, !0), n.removeEventListener("focus", yt, !0), n.removeEventListener("blur", wt, !1), typeof PointerEvent < "u" && (r.removeEventListener("pointerdown", K, !0), r.removeEventListener("pointermove", K, !0), r.removeEventListener("pointerup", K, !0)), U.delete(n));
1188
- };
1189
- function Kr(e) {
1190
- const t = w(e);
1191
- let n;
1192
- return t.readyState !== "loading" ? Xe(e) : (n = () => {
1193
- Xe(e);
1194
- }, t.addEventListener("DOMContentLoaded", n)), () => xt(e, n);
1195
- }
1196
- typeof document < "u" && Kr();
1197
- function St() {
1198
- return Q;
1199
- }
1200
- function Te(e) {
1201
- const t = w(e);
1202
- if (St() === "virtual") {
1203
- let n = T(t);
1204
- tr(() => {
1205
- const r = T(t);
1206
- (r === n || r === t.body) && e.isConnected && ye(e);
1207
- });
1208
- } else ye(e);
1209
- }
1210
- const zr = /* @__PURE__ */ p.forwardRef(({ children: e, ...t }, n) => {
1211
- let r = s.useRef(!1), o = s.useContext(oe);
1212
- n = de(n || (o == null ? void 0 : o.ref));
1213
- let i = W(o || {}, {
1214
- ...t,
1215
- ref: n,
1216
- register() {
1217
- r.current = !0, o && o.register();
1218
- }
1219
- });
1220
- return lr(o, n), s.useEffect(() => {
1221
- r.current || (r.current = !0);
1222
- }, []), /* @__PURE__ */ p.createElement(oe.Provider, {
1223
- value: i
1224
- }, e);
1225
- });
1226
- function Vr({ children: e }) {
1227
- let t = s.useMemo(() => ({
1228
- register: () => {
1229
- }
1230
- }), []);
1231
- return /* @__PURE__ */ p.createElement(oe.Provider, {
1232
- value: t
1233
- }, e);
1234
- }
1235
- function Nt(e) {
1236
- let { isDisabled: t, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: o } = e, i = s.useRef({
1237
- isFocusWithin: !1
1238
- }), { addGlobalListener: a, removeAllGlobalListeners: l } = nr(), c = s.useCallback((d) => {
1239
- d.currentTarget.contains(d.target) && i.current.isFocusWithin && !d.currentTarget.contains(d.relatedTarget) && (i.current.isFocusWithin = !1, l(), n && n(d), o && o(!1));
1240
- }, [
1241
- n,
1242
- o,
1243
- i,
1244
- l
1245
- ]), u = Ar(c), f = s.useCallback((d) => {
1246
- if (!d.currentTarget.contains(d.target)) return;
1247
- const b = w(d.target), v = T(b);
1248
- if (!i.current.isFocusWithin && v === O(d.nativeEvent)) {
1249
- r && r(d), o && o(!0), i.current.isFocusWithin = !0, u(d);
1250
- let $ = d.currentTarget;
1251
- a(b, "focus", (h) => {
1252
- if (i.current.isFocusWithin && !Ee($, h.target)) {
1253
- let g = new b.defaultView.FocusEvent("blur", {
1254
- relatedTarget: h.target
1255
- });
1256
- Ir(g, $);
1257
- let x = gt(g);
1258
- c(x);
1259
- }
1260
- }, {
1261
- capture: !0
1262
- });
1263
- }
1264
- }, [
1265
- r,
1266
- o,
1267
- u,
1268
- a,
1269
- c
1270
- ]);
1271
- return t ? {
1272
- focusWithinProps: {
1273
- // These cannot be null, that would conflict in mergeProps
1274
- onFocus: void 0,
1275
- onBlur: void 0
1276
- }
1277
- } : {
1278
- focusWithinProps: {
1279
- onFocus: f,
1280
- onBlur: c
1281
- }
1282
- };
1283
- }
1284
- function Br(e) {
1285
- let { ref: t, onInteractOutside: n, isDisabled: r, onInteractOutsideStart: o } = e, i = s.useRef({
1286
- isPointerDown: !1,
1287
- ignoreEmulatedMouseEvents: !1
1288
- }), a = xe((c) => {
1289
- n && Qe(c, t) && (o && o(c), i.current.isPointerDown = !0);
1290
- }), l = xe((c) => {
1291
- n && n(c);
1292
- });
1293
- s.useEffect(() => {
1294
- let c = i.current;
1295
- if (r) return;
1296
- const u = t.current, f = w(u);
1297
- if (typeof PointerEvent < "u") {
1298
- let d = (b) => {
1299
- c.isPointerDown && Qe(b, t) && l(b), c.isPointerDown = !1;
1300
- };
1301
- return f.addEventListener("pointerdown", a, !0), f.addEventListener("click", d, !0), () => {
1302
- f.removeEventListener("pointerdown", a, !0), f.removeEventListener("click", d, !0);
1303
- };
1304
- }
1305
- }, [
1306
- t,
1307
- r
1308
- ]);
1309
- }
1310
- function Qe(e, t) {
1311
- if (e.button > 0) return !1;
1312
- if (e.target) {
1313
- const n = e.target.ownerDocument;
1314
- if (!n || !n.documentElement.contains(e.target) || e.target.closest("[data-react-aria-top-layer]")) return !1;
1315
- }
1316
- return t.current ? !e.composedPath().includes(t.current) : !1;
1317
- }
1318
- const Ye = /* @__PURE__ */ p.createContext(null), Le = "react-aria-focus-scope-restore";
1319
- let m = null;
1320
- function jr(e) {
1321
- let { children: t, contain: n, restoreFocus: r, autoFocus: o } = e, i = s.useRef(null), a = s.useRef(null), l = s.useRef([]), { parentNode: c } = s.useContext(Ye) || {}, u = s.useMemo(() => new ke({
1322
- scopeRef: l
1323
- }), [
1324
- l
1325
- ]);
1326
- y(() => {
1327
- let b = c || E.root;
1328
- if (E.getTreeNode(b.scopeRef) && m && !ae(m, b.scopeRef)) {
1329
- let v = E.getTreeNode(m);
1330
- v && (b = v);
1331
- }
1332
- b.addChild(u), E.addNode(u);
1333
- }, [
1334
- u,
1335
- c
1336
- ]), y(() => {
1337
- let b = E.getTreeNode(l);
1338
- b && (b.contain = !!n);
1339
- }, [
1340
- n
1341
- ]), y(() => {
1342
- var b;
1343
- let v = (b = i.current) === null || b === void 0 ? void 0 : b.nextSibling, $ = [], h = (g) => g.stopPropagation();
1344
- for (; v && v !== a.current; )
1345
- $.push(v), v.addEventListener(Le, h), v = v.nextSibling;
1346
- return l.current = $, () => {
1347
- for (let g of $) g.removeEventListener(Le, h);
1348
- };
1349
- }, [
1350
- t
1351
- ]), Xr(l, r, n), qr(l, n), Qr(l, r, n), Zr(l, o), s.useEffect(() => {
1352
- const b = T(w(l.current ? l.current[0] : void 0));
1353
- let v = null;
1354
- if (L(b, l.current)) {
1355
- for (let $ of E.traverse()) $.scopeRef && L(b, $.scopeRef.current) && (v = $);
1356
- v === E.getTreeNode(l) && (m = v.scopeRef);
1357
- }
1358
- }, [
1359
- l
1360
- ]), y(() => () => {
1361
- var b, v, $;
1362
- let h = ($ = (v = E.getTreeNode(l)) === null || v === void 0 || (b = v.parent) === null || b === void 0 ? void 0 : b.scopeRef) !== null && $ !== void 0 ? $ : null;
1363
- (l === m || ae(l, m)) && (!h || E.getTreeNode(h)) && (m = h), E.removeTreeNode(l);
1364
- }, [
1365
- l
1366
- ]);
1367
- let f = s.useMemo(() => Gr(l), []), d = s.useMemo(() => ({
1368
- focusManager: f,
1369
- parentNode: u
1370
- }), [
1371
- u,
1372
- f
1373
- ]);
1374
- return /* @__PURE__ */ p.createElement(Ye.Provider, {
1375
- value: d
1376
- }, /* @__PURE__ */ p.createElement("span", {
1377
- "data-focus-scope-start": !0,
1378
- hidden: !0,
1379
- ref: i
1380
- }), t, /* @__PURE__ */ p.createElement("span", {
1381
- "data-focus-scope-end": !0,
1382
- hidden: !0,
1383
- ref: a
1384
- }));
1385
- }
1386
- function Gr(e) {
1387
- return {
1388
- focusNext(t = {}) {
1389
- let n = e.current, { from: r, tabbable: o, wrap: i, accept: a } = t;
1390
- var l;
1391
- let c = r || T(w((l = n[0]) !== null && l !== void 0 ? l : void 0)), u = n[0].previousElementSibling, f = I(n), d = M(f, {
1392
- tabbable: o,
1393
- accept: a
1394
- }, n);
1395
- d.currentNode = L(c, n) ? c : u;
1396
- let b = d.nextNode();
1397
- return !b && i && (d.currentNode = u, b = d.nextNode()), b && k(b, !0), b;
1398
- },
1399
- focusPrevious(t = {}) {
1400
- let n = e.current, { from: r, tabbable: o, wrap: i, accept: a } = t;
1401
- var l;
1402
- let c = r || T(w((l = n[0]) !== null && l !== void 0 ? l : void 0)), u = n[n.length - 1].nextElementSibling, f = I(n), d = M(f, {
1403
- tabbable: o,
1404
- accept: a
1405
- }, n);
1406
- d.currentNode = L(c, n) ? c : u;
1407
- let b = d.previousNode();
1408
- return !b && i && (d.currentNode = u, b = d.previousNode()), b && k(b, !0), b;
1409
- },
1410
- focusFirst(t = {}) {
1411
- let n = e.current, { tabbable: r, accept: o } = t, i = I(n), a = M(i, {
1412
- tabbable: r,
1413
- accept: o
1414
- }, n);
1415
- a.currentNode = n[0].previousElementSibling;
1416
- let l = a.nextNode();
1417
- return l && k(l, !0), l;
1418
- },
1419
- focusLast(t = {}) {
1420
- let n = e.current, { tabbable: r, accept: o } = t, i = I(n), a = M(i, {
1421
- tabbable: r,
1422
- accept: o
1423
- }, n);
1424
- a.currentNode = n[n.length - 1].nextElementSibling;
1425
- let l = a.previousNode();
1426
- return l && k(l, !0), l;
1427
- }
1428
- };
1429
- }
1430
- function I(e) {
1431
- return e[0].parentElement;
1432
- }
1433
- function j(e) {
1434
- let t = E.getTreeNode(m);
1435
- for (; t && t.scopeRef !== e; ) {
1436
- if (t.contain) return !1;
1437
- t = t.parent;
1438
- }
1439
- return !0;
1440
- }
1441
- function Ur(e) {
1442
- if (e.checked) return !0;
1443
- let t = [];
1444
- if (!e.form) t = [
1445
- ...w(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)
1446
- ].filter((i) => !i.form);
1447
- else {
1448
- var n, r;
1449
- let i = (r = e.form) === null || r === void 0 || (n = r.elements) === null || n === void 0 ? void 0 : n.namedItem(e.name);
1450
- t = [
1451
- ...i ?? []
1452
- ];
1453
- }
1454
- return t ? !t.some((i) => i.checked) : !1;
1455
- }
1456
- function qr(e, t) {
1457
- let n = s.useRef(void 0), r = s.useRef(void 0);
1458
- y(() => {
1459
- let o = e.current;
1460
- if (!t) {
1461
- r.current && (cancelAnimationFrame(r.current), r.current = void 0);
1462
- return;
1463
- }
1464
- const i = w(o ? o[0] : void 0);
1465
- let a = (u) => {
1466
- if (u.key !== "Tab" || u.altKey || u.ctrlKey || u.metaKey || !j(e) || u.isComposing) return;
1467
- let f = T(i), d = e.current;
1468
- if (!d || !L(f, d)) return;
1469
- let b = I(d), v = M(b, {
1470
- tabbable: !0
1471
- }, d);
1472
- if (!f) return;
1473
- v.currentNode = f;
1474
- let $ = u.shiftKey ? v.previousNode() : v.nextNode();
1475
- $ || (v.currentNode = u.shiftKey ? d[d.length - 1].nextElementSibling : d[0].previousElementSibling, $ = u.shiftKey ? v.previousNode() : v.nextNode()), u.preventDefault(), $ && k($, !0);
1476
- }, l = (u) => {
1477
- (!m || ae(m, e)) && L(O(u), e.current) ? (m = e, n.current = O(u)) : j(e) && !P(O(u), e) ? n.current ? n.current.focus() : m && m.current && Re(m.current) : j(e) && (n.current = O(u));
1478
- }, c = (u) => {
1479
- r.current && cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
1480
- let f = St(), d = (f === "virtual" || f === null) && dt() && ut(), b = T(i);
1481
- if (!d && b && j(e) && !P(b, e)) {
1482
- m = e;
1483
- let $ = O(u);
1484
- if ($ && $.isConnected) {
1485
- var v;
1486
- n.current = $, (v = n.current) === null || v === void 0 || v.focus();
1487
- } else m.current && Re(m.current);
1488
- }
1489
- });
1490
- };
1491
- return i.addEventListener("keydown", a, !1), i.addEventListener("focusin", l, !1), o == null || o.forEach((u) => u.addEventListener("focusin", l, !1)), o == null || o.forEach((u) => u.addEventListener("focusout", c, !1)), () => {
1492
- i.removeEventListener("keydown", a, !1), i.removeEventListener("focusin", l, !1), o == null || o.forEach((u) => u.removeEventListener("focusin", l, !1)), o == null || o.forEach((u) => u.removeEventListener("focusout", c, !1));
1493
- };
1494
- }, [
1495
- e,
1496
- t
1497
- ]), y(() => () => {
1498
- r.current && cancelAnimationFrame(r.current);
1499
- }, [
1500
- r
1501
- ]);
1502
- }
1503
- function Ct(e) {
1504
- return P(e);
1505
- }
1506
- function L(e, t) {
1507
- return !e || !t ? !1 : t.some((n) => n.contains(e));
1508
- }
1509
- function P(e, t = null) {
1510
- if (e instanceof Element && e.closest("[data-react-aria-top-layer]")) return !0;
1511
- for (let { scopeRef: n } of E.traverse(E.getTreeNode(t)))
1512
- if (n && L(e, n.current)) return !0;
1513
- return !1;
1514
- }
1515
- function Jr(e) {
1516
- return P(e, m);
1517
- }
1518
- function ae(e, t) {
1519
- var n;
1520
- let r = (n = E.getTreeNode(t)) === null || n === void 0 ? void 0 : n.parent;
1521
- for (; r; ) {
1522
- if (r.scopeRef === e) return !0;
1523
- r = r.parent;
1524
- }
1525
- return !1;
1526
- }
1527
- function k(e, t = !1) {
1528
- if (e != null && !t) try {
1529
- Te(e);
1530
- } catch {
1531
- }
1532
- else if (e != null) try {
1533
- e.focus();
1534
- } catch {
1535
- }
1536
- }
1537
- function Tt(e, t = !0) {
1538
- let n = e[0].previousElementSibling, r = I(e), o = M(r, {
1539
- tabbable: t
1540
- }, e);
1541
- o.currentNode = n;
1542
- let i = o.nextNode();
1543
- return t && !i && (r = I(e), o = M(r, {
1544
- tabbable: !1
1545
- }, e), o.currentNode = n, i = o.nextNode()), i;
1546
- }
1547
- function Re(e, t = !0) {
1548
- k(Tt(e, t));
1549
- }
1550
- function Zr(e, t) {
1551
- const n = p.useRef(t);
1552
- s.useEffect(() => {
1553
- if (n.current) {
1554
- m = e;
1555
- const r = w(e.current ? e.current[0] : void 0);
1556
- !L(T(r), m.current) && e.current && Re(e.current);
1557
- }
1558
- n.current = !1;
1559
- }, [
1560
- e
1561
- ]);
1562
- }
1563
- function Xr(e, t, n) {
1564
- y(() => {
1565
- if (t || n) return;
1566
- let r = e.current;
1567
- const o = w(r ? r[0] : void 0);
1568
- let i = (a) => {
1569
- let l = O(a);
1570
- L(l, e.current) ? m = e : Ct(l) || (m = null);
1571
- };
1572
- return o.addEventListener("focusin", i, !1), r == null || r.forEach((a) => a.addEventListener("focusin", i, !1)), () => {
1573
- o.removeEventListener("focusin", i, !1), r == null || r.forEach((a) => a.removeEventListener("focusin", i, !1));
1574
- };
1575
- }, [
1576
- e,
1577
- t,
1578
- n
1579
- ]);
1580
- }
1581
- function et(e) {
1582
- let t = E.getTreeNode(m);
1583
- for (; t && t.scopeRef !== e; ) {
1584
- if (t.nodeToRestore) return !1;
1585
- t = t.parent;
1586
- }
1587
- return (t == null ? void 0 : t.scopeRef) === e;
1588
- }
1589
- function Qr(e, t, n) {
1590
- const r = s.useRef(typeof document < "u" ? T(w(e.current ? e.current[0] : void 0)) : null);
1591
- y(() => {
1592
- let o = e.current;
1593
- const i = w(o ? o[0] : void 0);
1594
- if (!t || n) return;
1595
- let a = () => {
1596
- (!m || ae(m, e)) && L(T(i), e.current) && (m = e);
1597
- };
1598
- return i.addEventListener("focusin", a, !1), o == null || o.forEach((l) => l.addEventListener("focusin", a, !1)), () => {
1599
- i.removeEventListener("focusin", a, !1), o == null || o.forEach((l) => l.removeEventListener("focusin", a, !1));
1600
- };
1601
- }, [
1602
- e,
1603
- n
1604
- ]), y(() => {
1605
- const o = w(e.current ? e.current[0] : void 0);
1606
- if (!t) return;
1607
- let i = (a) => {
1608
- if (a.key !== "Tab" || a.altKey || a.ctrlKey || a.metaKey || !j(e) || a.isComposing) return;
1609
- let l = o.activeElement;
1610
- if (!P(l, e) || !et(e)) return;
1611
- let c = E.getTreeNode(e);
1612
- if (!c) return;
1613
- let u = c.nodeToRestore, f = M(o.body, {
1614
- tabbable: !0
1615
- });
1616
- f.currentNode = l;
1617
- let d = a.shiftKey ? f.previousNode() : f.nextNode();
1618
- if ((!u || !u.isConnected || u === o.body) && (u = void 0, c.nodeToRestore = void 0), (!d || !P(d, e)) && u) {
1619
- f.currentNode = u;
1620
- do
1621
- d = a.shiftKey ? f.previousNode() : f.nextNode();
1622
- while (P(d, e));
1623
- a.preventDefault(), a.stopPropagation(), d ? k(d, !0) : Ct(u) ? k(u, !0) : l.blur();
1624
- }
1625
- };
1626
- return n || o.addEventListener("keydown", i, !0), () => {
1627
- n || o.removeEventListener("keydown", i, !0);
1628
- };
1629
- }, [
1630
- e,
1631
- t,
1632
- n
1633
- ]), y(() => {
1634
- const o = w(e.current ? e.current[0] : void 0);
1635
- if (!t) return;
1636
- let i = E.getTreeNode(e);
1637
- if (i) {
1638
- var a;
1639
- return i.nodeToRestore = (a = r.current) !== null && a !== void 0 ? a : void 0, () => {
1640
- let l = E.getTreeNode(e);
1641
- if (!l) return;
1642
- let c = l.nodeToRestore, u = T(o);
1643
- if (t && c && (u && P(u, e) || u === o.body && et(e))) {
1644
- let f = E.clone();
1645
- requestAnimationFrame(() => {
1646
- if (o.activeElement === o.body) {
1647
- let d = f.getTreeNode(e);
1648
- for (; d; ) {
1649
- if (d.nodeToRestore && d.nodeToRestore.isConnected) {
1650
- tt(d.nodeToRestore);
1651
- return;
1652
- }
1653
- d = d.parent;
1654
- }
1655
- for (d = f.getTreeNode(e); d; ) {
1656
- if (d.scopeRef && d.scopeRef.current && E.getTreeNode(d.scopeRef)) {
1657
- let b = Tt(d.scopeRef.current, !0);
1658
- tt(b);
1659
- return;
1660
- }
1661
- d = d.parent;
1662
- }
1663
- }
1664
- });
1665
- }
1666
- };
1667
- }
1668
- }, [
1669
- e,
1670
- t
1671
- ]);
1672
- }
1673
- function tt(e) {
1674
- e.dispatchEvent(new CustomEvent(Le, {
1675
- bubbles: !0,
1676
- cancelable: !0
1677
- })) && k(e);
1678
- }
1679
- function M(e, t, n) {
1680
- let r = t != null && t.tabbable ? hr : pr, o = (e == null ? void 0 : e.nodeType) === Node.ELEMENT_NODE ? e : null, i = w(o), a = Kn(i, e || i, NodeFilter.SHOW_ELEMENT, {
1681
- acceptNode(l) {
1682
- var c;
1683
- return !(t == null || (c = t.from) === null || c === void 0) && c.contains(l) || t != null && t.tabbable && l.tagName === "INPUT" && l.getAttribute("type") === "radio" && (!Ur(l) || a.currentNode.tagName === "INPUT" && a.currentNode.type === "radio" && a.currentNode.name === l.name) ? NodeFilter.FILTER_REJECT : r(l) && (!n || L(l, n)) && (!(t != null && t.accept) || t.accept(l)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1684
- }
1685
- });
1686
- return t != null && t.from && (a.currentNode = t.from), a;
1687
- }
1688
- class We {
1689
- get size() {
1690
- return this.fastMap.size;
1691
- }
1692
- getTreeNode(t) {
1693
- return this.fastMap.get(t);
1694
- }
1695
- addTreeNode(t, n, r) {
1696
- let o = this.fastMap.get(n ?? null);
1697
- if (!o) return;
1698
- let i = new ke({
1699
- scopeRef: t
1700
- });
1701
- o.addChild(i), i.parent = o, this.fastMap.set(t, i), r && (i.nodeToRestore = r);
1702
- }
1703
- addNode(t) {
1704
- this.fastMap.set(t.scopeRef, t);
1705
- }
1706
- removeTreeNode(t) {
1707
- if (t === null) return;
1708
- let n = this.fastMap.get(t);
1709
- if (!n) return;
1710
- let r = n.parent;
1711
- for (let i of this.traverse()) i !== n && n.nodeToRestore && i.nodeToRestore && n.scopeRef && n.scopeRef.current && L(i.nodeToRestore, n.scopeRef.current) && (i.nodeToRestore = n.nodeToRestore);
1712
- let o = n.children;
1713
- r && (r.removeChild(n), o.size > 0 && o.forEach((i) => r && r.addChild(i))), this.fastMap.delete(n.scopeRef);
1714
- }
1715
- // Pre Order Depth First
1716
- *traverse(t = this.root) {
1717
- if (t.scopeRef != null && (yield t), t.children.size > 0) for (let n of t.children) yield* this.traverse(n);
1718
- }
1719
- clone() {
1720
- var t;
1721
- let n = new We();
1722
- var r;
1723
- for (let o of this.traverse()) n.addTreeNode(o.scopeRef, (r = (t = o.parent) === null || t === void 0 ? void 0 : t.scopeRef) !== null && r !== void 0 ? r : null, o.nodeToRestore);
1724
- return n;
1725
- }
1726
- constructor() {
1727
- this.fastMap = /* @__PURE__ */ new Map(), this.root = new ke({
1728
- scopeRef: null
1729
- }), this.fastMap.set(null, this.root);
1730
- }
1731
- }
1732
- class ke {
1733
- addChild(t) {
1734
- this.children.add(t), t.parent = this;
1735
- }
1736
- removeChild(t) {
1737
- this.children.delete(t), t.parent = void 0;
1738
- }
1739
- constructor(t) {
1740
- this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = t.scopeRef;
1741
- }
1742
- }
1743
- let E = new We();
1744
- const R = [];
1745
- function Yr(e, t) {
1746
- let { onClose: n, shouldCloseOnBlur: r, isOpen: o, isDismissable: i = !1, isKeyboardDismissDisabled: a = !1, shouldCloseOnInteractOutside: l } = e;
1747
- s.useEffect(() => {
1748
- if (o && !R.includes(t))
1749
- return R.push(t), () => {
1750
- let $ = R.indexOf(t);
1751
- $ >= 0 && R.splice($, 1);
1752
- };
1753
- }, [
1754
- o,
1755
- t
1756
- ]);
1757
- let c = () => {
1758
- R[R.length - 1] === t && n && n();
1759
- }, u = ($) => {
1760
- (!l || l($.target)) && R[R.length - 1] === t && ($.stopPropagation(), $.preventDefault());
1761
- }, f = ($) => {
1762
- (!l || l($.target)) && (R[R.length - 1] === t && ($.stopPropagation(), $.preventDefault()), c());
1763
- }, d = ($) => {
1764
- $.key === "Escape" && !a && !$.nativeEvent.isComposing && ($.stopPropagation(), $.preventDefault(), c());
1765
- };
1766
- Br({
1767
- ref: t,
1768
- onInteractOutside: i && o ? f : void 0,
1769
- onInteractOutsideStart: u
1770
- });
1771
- let { focusWithinProps: b } = Nt({
1772
- isDisabled: !r,
1773
- onBlurWithin: ($) => {
1774
- !$.relatedTarget || Jr($.relatedTarget) || (!l || l($.relatedTarget)) && (n == null || n());
1775
- }
1776
- }), v = ($) => {
1777
- $.target === $.currentTarget && $.preventDefault();
1778
- };
1779
- return {
1780
- overlayProps: {
1781
- onKeyDown: d,
1782
- ...b
1783
- },
1784
- underlayProps: {
1785
- onPointerDown: v
1786
- }
1787
- };
1788
- }
1789
- function eo(e, t, n) {
1790
- let { type: r } = e, { isOpen: o } = t;
1791
- s.useEffect(() => {
1792
- n && n.current && yr.set(n.current, t.close);
1793
- });
1794
- let i;
1795
- r === "menu" ? i = !0 : r === "listbox" && (i = "listbox");
1796
- let a = le();
1797
- return {
1798
- triggerProps: {
1799
- "aria-haspopup": i,
1800
- "aria-expanded": o,
1801
- "aria-controls": o ? a : void 0,
1802
- onPress: t.toggle
1803
- },
1804
- overlayProps: {
1805
- id: a
1806
- }
1807
- };
1808
- }
1809
- const q = typeof document < "u" && window.visualViewport;
1810
- let te = 0, he;
1811
- function to(e = {}) {
1812
- let { isDisabled: t } = e;
1813
- y(() => {
1814
- if (!t)
1815
- return te++, te === 1 && (Xn() ? he = ro() : he = no()), () => {
1816
- te--, te === 0 && he();
1817
- };
1818
- }, [
1819
- t
1820
- ]);
1821
- }
1822
- function no() {
1823
- let e = window.innerWidth - document.documentElement.clientWidth;
1824
- return Fe(e > 0 && // Use scrollbar-gutter when supported because it also works for fixed positioned elements.
1825
- ("scrollbarGutter" in document.documentElement.style ? me(document.documentElement, "scrollbarGutter", "stable") : me(document.documentElement, "paddingRight", `${e}px`)), me(document.documentElement, "overflow", "hidden"));
1826
- }
1827
- function ro() {
1828
- let e, t = !1, n = (c) => {
1829
- let u = c.target;
1830
- e = re(u) ? u : ft(u, !0), t = !1;
1831
- let f = u.ownerDocument.defaultView.getSelection();
1832
- f && !f.isCollapsed && f.containsNode(u, !0) && (t = !0), "selectionStart" in u && "selectionEnd" in u && u.selectionStart < u.selectionEnd && u.ownerDocument.activeElement === u && (t = !0);
1833
- }, r = document.createElement("style");
1834
- r.textContent = `
1835
- @layer {
1836
- * {
1837
- overscroll-behavior: contain;
1838
- }
1839
- }`.trim(), document.head.prepend(r);
1840
- let o = (c) => {
1841
- if (!(c.touches.length === 2 || t)) {
1842
- if (!e || e === document.documentElement || e === document.body) {
1843
- c.preventDefault();
1844
- return;
1845
- }
1846
- e.scrollHeight === e.clientHeight && e.scrollWidth === e.clientWidth && c.preventDefault();
1847
- }
1848
- }, i = (c) => {
1849
- let u = c.target, f = c.relatedTarget;
1850
- if (f && G(f))
1851
- f.focus({
1852
- preventScroll: !0
1853
- }), nt(f, G(u));
1854
- else if (!f) {
1855
- var d;
1856
- let b = (d = u.parentElement) === null || d === void 0 ? void 0 : d.closest("[tabindex]");
1857
- b == null || b.focus({
1858
- preventScroll: !0
1859
- });
1860
- }
1861
- }, a = HTMLElement.prototype.focus;
1862
- HTMLElement.prototype.focus = function(c) {
1863
- let u = document.activeElement != null && G(document.activeElement);
1864
- a.call(this, {
1865
- ...c,
1866
- preventScroll: !0
1867
- }), (!c || !c.preventScroll) && nt(this, u);
1868
- };
1869
- let l = Fe(ge(document, "touchstart", n, {
1870
- passive: !1,
1871
- capture: !0
1872
- }), ge(document, "touchmove", o, {
1873
- passive: !1,
1874
- capture: !0
1875
- }), ge(document, "blur", i, !0));
1876
- return () => {
1877
- l(), r.remove(), HTMLElement.prototype.focus = a;
1878
- };
1879
- }
1880
- function me(e, t, n) {
1881
- let r = e.style[t];
1882
- return e.style[t] = n, () => {
1883
- e.style[t] = r;
1884
- };
1885
- }
1886
- function ge(e, t, n, r) {
1887
- return e.addEventListener(t, n, r), () => {
1888
- e.removeEventListener(t, n, r);
1889
- };
1890
- }
1891
- function nt(e, t) {
1892
- t || !q ? rt(e) : q.addEventListener("resize", () => rt(e), {
1893
- once: !0
1894
- });
1895
- }
1896
- function rt(e) {
1897
- let t = document.scrollingElement || document.documentElement, n = e;
1898
- for (; n && n !== t; ) {
1899
- let r = ft(n);
1900
- if (r !== document.documentElement && r !== document.body && r !== n) {
1901
- let o = r.getBoundingClientRect(), i = n.getBoundingClientRect();
1902
- if (i.top < o.top || i.bottom > o.top + n.clientHeight) {
1903
- let a = o.bottom;
1904
- q && (a = Math.min(a, q.offsetTop + q.height));
1905
- let l = i.top - o.top - ((a - o.top) / 2 - i.height / 2);
1906
- r.scrollTo({
1907
- // Clamp to the valid range to prevent over-scrolling.
1908
- top: Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + l)),
1909
- behavior: "smooth"
1910
- });
1911
- }
1912
- }
1913
- n = r.parentElement;
1914
- }
1915
- }
1916
- const oo = /* @__PURE__ */ s.createContext({});
1917
- function io() {
1918
- var e;
1919
- return (e = s.useContext(oo)) !== null && e !== void 0 ? e : {};
1920
- }
1921
- var Lt = {};
1922
- Lt = {
1923
- dismiss: "تجاهل"
1924
- };
1925
- var Rt = {};
1926
- Rt = {
1927
- dismiss: "Отхвърляне"
1928
- };
1929
- var kt = {};
1930
- kt = {
1931
- dismiss: "Odstranit"
1932
- };
1933
- var Ft = {};
1934
- Ft = {
1935
- dismiss: "Luk"
1936
- };
1937
- var Pt = {};
1938
- Pt = {
1939
- dismiss: "Schließen"
1940
- };
1941
- var Mt = {};
1942
- Mt = {
1943
- dismiss: "Απόρριψη"
1944
- };
1945
- var Dt = {};
1946
- Dt = {
1947
- dismiss: "Dismiss"
1948
- };
1949
- var Ot = {};
1950
- Ot = {
1951
- dismiss: "Descartar"
1952
- };
1953
- var It = {};
1954
- It = {
1955
- dismiss: "Lõpeta"
1956
- };
1957
- var At = {};
1958
- At = {
1959
- dismiss: "Hylkää"
1960
- };
1961
- var Wt = {};
1962
- Wt = {
1963
- dismiss: "Rejeter"
1964
- };
1965
- var Ht = {};
1966
- Ht = {
1967
- dismiss: "התעלם"
1968
- };
1969
- var _t = {};
1970
- _t = {
1971
- dismiss: "Odbaci"
1972
- };
1973
- var Kt = {};
1974
- Kt = {
1975
- dismiss: "Elutasítás"
1976
- };
1977
- var zt = {};
1978
- zt = {
1979
- dismiss: "Ignora"
1980
- };
1981
- var Vt = {};
1982
- Vt = {
1983
- dismiss: "閉じる"
1984
- };
1985
- var Bt = {};
1986
- Bt = {
1987
- dismiss: "무시"
1988
- };
1989
- var jt = {};
1990
- jt = {
1991
- dismiss: "Atmesti"
1992
- };
1993
- var Gt = {};
1994
- Gt = {
1995
- dismiss: "Nerādīt"
1996
- };
1997
- var Ut = {};
1998
- Ut = {
1999
- dismiss: "Lukk"
2000
- };
2001
- var qt = {};
2002
- qt = {
2003
- dismiss: "Negeren"
2004
- };
2005
- var Jt = {};
2006
- Jt = {
2007
- dismiss: "Zignoruj"
2008
- };
2009
- var Zt = {};
2010
- Zt = {
2011
- dismiss: "Descartar"
2012
- };
2013
- var Xt = {};
2014
- Xt = {
2015
- dismiss: "Dispensar"
2016
- };
2017
- var Qt = {};
2018
- Qt = {
2019
- dismiss: "Revocare"
2020
- };
2021
- var Yt = {};
2022
- Yt = {
2023
- dismiss: "Пропустить"
2024
- };
2025
- var en = {};
2026
- en = {
2027
- dismiss: "Zrušiť"
2028
- };
2029
- var tn = {};
2030
- tn = {
2031
- dismiss: "Opusti"
2032
- };
2033
- var nn = {};
2034
- nn = {
2035
- dismiss: "Odbaci"
2036
- };
2037
- var rn = {};
2038
- rn = {
2039
- dismiss: "Avvisa"
2040
- };
2041
- var on = {};
2042
- on = {
2043
- dismiss: "Kapat"
2044
- };
2045
- var an = {};
2046
- an = {
2047
- dismiss: "Скасувати"
2048
- };
2049
- var ln = {};
2050
- ln = {
2051
- dismiss: "取消"
2052
- };
2053
- var cn = {};
2054
- cn = {
2055
- dismiss: "關閉"
2056
- };
2057
- var sn = {};
2058
- sn = {
2059
- "ar-AE": Lt,
2060
- "bg-BG": Rt,
2061
- "cs-CZ": kt,
2062
- "da-DK": Ft,
2063
- "de-DE": Pt,
2064
- "el-GR": Mt,
2065
- "en-US": Dt,
2066
- "es-ES": Ot,
2067
- "et-EE": It,
2068
- "fi-FI": At,
2069
- "fr-FR": Wt,
2070
- "he-IL": Ht,
2071
- "hr-HR": _t,
2072
- "hu-HU": Kt,
2073
- "it-IT": zt,
2074
- "ja-JP": Vt,
2075
- "ko-KR": Bt,
2076
- "lt-LT": jt,
2077
- "lv-LV": Gt,
2078
- "nb-NO": Ut,
2079
- "nl-NL": qt,
2080
- "pl-PL": Jt,
2081
- "pt-BR": Zt,
2082
- "pt-PT": Xt,
2083
- "ro-RO": Qt,
2084
- "ru-RU": Yt,
2085
- "sk-SK": en,
2086
- "sl-SI": tn,
2087
- "sr-SP": nn,
2088
- "sv-SE": rn,
2089
- "tr-TR": on,
2090
- "uk-UA": an,
2091
- "zh-CN": ln,
2092
- "zh-TW": cn
2093
- };
2094
- const ot = {
2095
- border: 0,
2096
- clip: "rect(0 0 0 0)",
2097
- clipPath: "inset(50%)",
2098
- height: "1px",
2099
- margin: "-1px",
2100
- overflow: "hidden",
2101
- padding: 0,
2102
- position: "absolute",
2103
- width: "1px",
2104
- whiteSpace: "nowrap"
2105
- };
2106
- function ao(e = {}) {
2107
- let { style: t, isFocusable: n } = e, [r, o] = s.useState(!1), { focusWithinProps: i } = Nt({
2108
- isDisabled: !n,
2109
- onFocusWithinChange: (l) => o(l)
2110
- }), a = s.useMemo(() => r ? t : t ? {
2111
- ...ot,
2112
- ...t
2113
- } : ot, [
2114
- r
2115
- ]);
2116
- return {
2117
- visuallyHiddenProps: {
2118
- ...i,
2119
- style: a
2120
- }
2121
- };
2122
- }
2123
- function lo(e) {
2124
- let { children: t, elementType: n = "div", isFocusable: r, style: o, ...i } = e, { visuallyHiddenProps: a } = ao(e);
2125
- return /* @__PURE__ */ p.createElement(n, W(i, a), t);
2126
- }
2127
- function co(e) {
2128
- return e && e.__esModule ? e.default : e;
2129
- }
2130
- function so(e) {
2131
- let { onDismiss: t, ...n } = e, r = Or(co(sn), "@react-aria/overlays"), o = rr(n, r.format("dismiss")), i = () => {
2132
- t && t();
2133
- };
2134
- return /* @__PURE__ */ p.createElement(lo, null, /* @__PURE__ */ p.createElement("button", {
2135
- ...o,
2136
- tabIndex: -1,
2137
- onClick: i,
2138
- style: {
2139
- width: 1,
2140
- height: 1
2141
- }
2142
- }));
2143
- }
2144
- const uo = typeof HTMLElement < "u" && "inert" in HTMLElement.prototype;
2145
- let z = /* @__PURE__ */ new WeakMap(), C = [];
2146
- function fo(e, t) {
2147
- let n = J(e == null ? void 0 : e[0]), r = t instanceof n.Element ? {
2148
- root: t
2149
- } : t;
2150
- var o;
2151
- let i = (o = r == null ? void 0 : r.root) !== null && o !== void 0 ? o : document.body, a = (r == null ? void 0 : r.shouldUseInert) && uo, l = new Set(e), c = /* @__PURE__ */ new Set(), u = (h) => a && h instanceof n.HTMLElement ? h.inert : h.getAttribute("aria-hidden") === "true", f = (h, g) => {
2152
- a && h instanceof n.HTMLElement ? h.inert = g : g ? h.setAttribute("aria-hidden", "true") : (h.removeAttribute("aria-hidden"), h instanceof n.HTMLElement && (h.inert = !1));
2153
- }, d = (h) => {
2154
- for (let N of h.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]")) l.add(N);
2155
- let g = (N) => {
2156
- if (c.has(N) || l.has(N) || N.parentElement && c.has(N.parentElement) && N.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
2157
- for (let $n of l)
2158
- if (N.contains($n)) return NodeFilter.FILTER_SKIP;
2159
- return NodeFilter.FILTER_ACCEPT;
2160
- }, x = document.createTreeWalker(h, NodeFilter.SHOW_ELEMENT, {
2161
- acceptNode: g
2162
- }), _e = g(h);
2163
- if (_e === NodeFilter.FILTER_ACCEPT && b(h), _e !== NodeFilter.FILTER_REJECT) {
2164
- let N = x.nextNode();
2165
- for (; N != null; )
2166
- b(N), N = x.nextNode();
2167
- }
2168
- }, b = (h) => {
2169
- var g;
2170
- let x = (g = z.get(h)) !== null && g !== void 0 ? g : 0;
2171
- u(h) && x === 0 || (x === 0 && f(h, !0), c.add(h), z.set(h, x + 1));
2172
- };
2173
- C.length && C[C.length - 1].disconnect(), d(i);
2174
- let v = new MutationObserver((h) => {
2175
- for (let g of h)
2176
- if (g.type === "childList" && ![
2177
- ...l,
2178
- ...c
2179
- ].some((x) => x.contains(g.target)))
2180
- for (let x of g.addedNodes)
2181
- (x instanceof HTMLElement || x instanceof SVGElement) && (x.dataset.liveAnnouncer === "true" || x.dataset.reactAriaTopLayer === "true") ? l.add(x) : x instanceof Element && d(x);
2182
- });
2183
- v.observe(i, {
2184
- childList: !0,
2185
- subtree: !0
2186
- });
2187
- let $ = {
2188
- visibleNodes: l,
2189
- hiddenNodes: c,
2190
- observe() {
2191
- v.observe(i, {
2192
- childList: !0,
2193
- subtree: !0
2194
- });
2195
- },
2196
- disconnect() {
2197
- v.disconnect();
2198
- }
2199
- };
2200
- return C.push($), () => {
2201
- v.disconnect();
2202
- for (let h of c) {
2203
- let g = z.get(h);
2204
- g != null && (g === 1 ? (f(h, !1), z.delete(h)) : z.set(h, g - 1));
2205
- }
2206
- $ === C[C.length - 1] ? (C.pop(), C.length && C[C.length - 1].observe()) : C.splice(C.indexOf($), 1);
2207
- };
2208
- }
2209
- const un = /* @__PURE__ */ p.createContext(null);
2210
- function bo(e) {
2211
- let t = X(), { portalContainer: n = t ? null : document.body, isExiting: r } = e, [o, i] = s.useState(!1), a = s.useMemo(() => ({
2212
- contain: o,
2213
- setContain: i
2214
- }), [
2215
- o,
2216
- i
2217
- ]), { getContainer: l } = io();
2218
- if (!e.portalContainer && l && (n = l()), !n) return null;
2219
- let c = e.children;
2220
- return e.disableFocusManagement || (c = /* @__PURE__ */ p.createElement(jr, {
2221
- restoreFocus: !0,
2222
- contain: (e.shouldContainFocus || o) && !r
2223
- }, c)), c = /* @__PURE__ */ p.createElement(un.Provider, {
2224
- value: a
2225
- }, /* @__PURE__ */ p.createElement(Vr, null, c)), /* @__PURE__ */ xn.createPortal(c, n);
2226
- }
2227
- function dn() {
2228
- let e = s.useContext(un), t = e == null ? void 0 : e.setContain;
2229
- y(() => {
2230
- t == null || t(!0);
2231
- }, [
2232
- t
2233
- ]);
2234
- }
2235
- function $o(e, t, n) {
2236
- let { overlayProps: r, underlayProps: o } = Yr({
2237
- ...e,
2238
- isOpen: t.isOpen,
2239
- onClose: t.close
2240
- }, n);
2241
- return to({
2242
- isDisabled: !t.isOpen
2243
- }), dn(), s.useEffect(() => {
2244
- if (t.isOpen && n.current) return fo([
2245
- n.current
2246
- ], {
2247
- shouldUseInert: !0
2248
- });
2249
- }, [
2250
- t.isOpen,
2251
- n
2252
- ]), {
2253
- modalProps: W(r),
2254
- underlayProps: o
2255
- };
2256
- }
2257
- function vo(e, t) {
2258
- let { role: n = "dialog" } = e, r = In();
2259
- r = e["aria-label"] ? void 0 : r;
2260
- let o = s.useRef(!1);
2261
- return s.useEffect(() => {
2262
- if (t.current && !t.current.contains(document.activeElement)) {
2263
- Te(t.current);
2264
- let i = setTimeout(() => {
2265
- (document.activeElement === t.current || document.activeElement === document.body) && (o.current = !0, t.current && (t.current.blur(), Te(t.current)), o.current = !1);
2266
- }, 500);
2267
- return () => {
2268
- clearTimeout(i);
2269
- };
2270
- }
2271
- }, [
2272
- t
2273
- ]), dn(), {
2274
- dialogProps: {
2275
- ...se(e, {
2276
- labelable: !0
2277
- }),
2278
- role: n,
2279
- tabIndex: -1,
2280
- "aria-labelledby": e["aria-labelledby"] || r,
2281
- // Prevent blur events from reaching useOverlay, which may cause
2282
- // popovers to close. Since focus is contained within the dialog,
2283
- // we don't want this to occur due to the above useEffect.
2284
- onBlur: (i) => {
2285
- o.current && i.stopPropagation();
2286
- }
2287
- },
2288
- titleProps: {
2289
- id: r
2290
- }
2291
- };
2292
- }
2293
- const po = /* @__PURE__ */ s.createContext({});
2294
- function fn(e) {
2295
- let [t, n] = gr(e.isOpen, e.defaultOpen || !1, e.onOpenChange);
2296
- const r = s.useCallback(() => {
2297
- n(!0);
2298
- }, [
2299
- n
2300
- ]), o = s.useCallback(() => {
2301
- n(!1);
2302
- }, [
2303
- n
2304
- ]), i = s.useCallback(() => {
2305
- n(!t);
2306
- }, [
2307
- n,
2308
- t
2309
- ]);
2310
- return {
2311
- isOpen: t,
2312
- setOpen: n,
2313
- open: r,
2314
- close: o,
2315
- toggle: i
2316
- };
2317
- }
2318
- function ho(e) {
2319
- let t = fn(e), [n, r] = s.useState(null), [o, i] = s.useState([]), a = () => {
2320
- i([]), t.close();
2321
- };
2322
- return {
2323
- focusStrategy: n,
2324
- ...t,
2325
- open(u = null) {
2326
- r(u), t.open();
2327
- },
2328
- toggle(u = null) {
2329
- r(u), t.toggle();
2330
- },
2331
- close() {
2332
- a();
2333
- },
2334
- expandedKeysStack: o,
2335
- openSubmenu: (u, f) => {
2336
- i((d) => f > d.length ? d : [
2337
- ...d.slice(0, f),
2338
- u
2339
- ]);
2340
- },
2341
- closeSubmenu: (u, f) => {
2342
- i((d) => d[f] === u ? d.slice(0, f) : d);
2343
- }
2344
- };
2345
- }
2346
- const mo = /* @__PURE__ */ s.createContext(null), go = /* @__PURE__ */ s.createContext(null), bn = /* @__PURE__ */ s.createContext(null), Y = /* @__PURE__ */ s.createContext(null);
2347
- function Lo(e) {
2348
- let t = ho(e), n = s.useRef(null), { triggerProps: r, overlayProps: o } = eo({
2349
- type: "dialog"
2350
- }, t, n), [i, a] = s.useState(null), l = s.useCallback(() => {
2351
- n.current && a(n.current.offsetWidth + "px");
2352
- }, [
2353
- n
2354
- ]);
2355
- return ar({
2356
- ref: n,
2357
- onResize: l
2358
- }), r.id = le(), o["aria-labelledby"] = r.id, /* @__PURE__ */ p.createElement(Oe, {
2359
- values: [
2360
- [
2361
- Y,
2362
- t
2363
- ],
2364
- [
2365
- go,
2366
- t
2367
- ],
2368
- [
2369
- bn,
2370
- o
2371
- ],
2372
- [
2373
- mo,
2374
- {
2375
- trigger: "DialogTrigger",
2376
- triggerRef: n,
2377
- "aria-labelledby": o["aria-labelledby"],
2378
- style: {
2379
- "--trigger-width": i
2380
- }
2381
- }
2382
- ]
2383
- ]
2384
- }, /* @__PURE__ */ p.createElement(zr, {
2385
- ...r,
2386
- ref: n,
2387
- isPressed: t.isOpen
2388
- }, e.children));
2389
- }
2390
- const Ro = /* @__PURE__ */ s.forwardRef(function(t, n) {
2391
- let r = t["aria-labelledby"];
2392
- [t, n] = pt(t, n, bn);
2393
- let { dialogProps: o, titleProps: i } = vo({
2394
- ...t,
2395
- // Only pass aria-labelledby from props, not context.
2396
- // Context is used as a fallback below.
2397
- "aria-labelledby": r
2398
- }, n), a = s.useContext(Y);
2399
- !o["aria-label"] && !o["aria-labelledby"] && t["aria-labelledby"] && (o["aria-labelledby"] = t["aria-labelledby"]);
2400
- let l = Ie({
2401
- defaultClassName: "react-aria-Dialog",
2402
- className: t.className,
2403
- style: t.style,
2404
- children: t.children,
2405
- values: {
2406
- close: (a == null ? void 0 : a.close) || (() => {
2407
- })
2408
- }
2409
- }), c = se(t, {
2410
- global: !0
2411
- });
2412
- return /* @__PURE__ */ p.createElement("section", {
2413
- ...W(c, l, o),
2414
- ref: n,
2415
- slot: t.slot || void 0
2416
- }, /* @__PURE__ */ p.createElement(Oe, {
2417
- values: [
2418
- [
2419
- Sn,
2420
- {
2421
- slots: {
2422
- [Se]: {},
2423
- title: {
2424
- ...i,
2425
- level: 2
2426
- }
2427
- }
2428
- }
2429
- ],
2430
- [
2431
- po,
2432
- {
2433
- slots: {
2434
- [Se]: {},
2435
- close: {
2436
- onPress: () => a == null ? void 0 : a.close()
2437
- }
2438
- }
2439
- }
2440
- ]
2441
- ]
2442
- }, l.children));
2443
- }), Eo = /* @__PURE__ */ s.createContext(null), He = /* @__PURE__ */ s.createContext(null), ko = /* @__PURE__ */ s.forwardRef(function(t, n) {
2444
- if (s.useContext(He))
2445
- return /* @__PURE__ */ p.createElement(it, {
2446
- ...t,
2447
- modalRef: n
2448
- }, t.children);
2449
- let { isDismissable: o, isKeyboardDismissDisabled: i, isOpen: a, defaultOpen: l, onOpenChange: c, children: u, isEntering: f, isExiting: d, UNSTABLE_portalContainer: b, shouldCloseOnInteractOutside: v, ...$ } = t;
2450
- return /* @__PURE__ */ p.createElement(wo, {
2451
- isDismissable: o,
2452
- isKeyboardDismissDisabled: i,
2453
- isOpen: a,
2454
- defaultOpen: l,
2455
- onOpenChange: c,
2456
- isEntering: f,
2457
- isExiting: d,
2458
- UNSTABLE_portalContainer: b,
2459
- shouldCloseOnInteractOutside: v
2460
- }, /* @__PURE__ */ p.createElement(it, {
2461
- ...$,
2462
- modalRef: n
2463
- }, u));
2464
- });
2465
- function yo(e, t) {
2466
- [e, t] = pt(e, t, Eo);
2467
- let n = s.useContext(Y), r = fn(e), o = e.isOpen != null || e.defaultOpen != null || !n ? r : n, i = de(t), a = s.useRef(null), l = Ge(i, o.isOpen), c = Ge(a, o.isOpen), u = l || c || e.isExiting || !1, f = X();
2468
- return !o.isOpen && !u || f ? null : /* @__PURE__ */ p.createElement(xo, {
2469
- ...e,
2470
- state: o,
2471
- isExiting: u,
2472
- overlayRef: i,
2473
- modalRef: a
2474
- });
2475
- }
2476
- const wo = /* @__PURE__ */ s.forwardRef(yo);
2477
- function xo({ UNSTABLE_portalContainer: e, ...t }) {
2478
- let n = t.modalRef, { state: r } = t, { modalProps: o, underlayProps: i } = $o(t, r, n), a = bt(t.overlayRef) || t.isEntering || !1, l = Ie({
2479
- ...t,
2480
- defaultClassName: "react-aria-ModalOverlay",
2481
- values: {
2482
- isEntering: a,
2483
- isExiting: t.isExiting,
2484
- state: r
2485
- }
2486
- }), c = sr(), u;
2487
- if (typeof document < "u") {
2488
- let d = re(document.body) ? document.body : document.scrollingElement || document.documentElement, b = d.getBoundingClientRect().height % 1;
2489
- u = d.scrollHeight - b;
2490
- }
2491
- let f = {
2492
- ...l.style,
2493
- "--visual-viewport-height": c.height + "px",
2494
- "--page-height": u !== void 0 ? u + "px" : void 0
2495
- };
2496
- return /* @__PURE__ */ p.createElement(bo, {
2497
- isExiting: t.isExiting,
2498
- portalContainer: e
2499
- }, /* @__PURE__ */ p.createElement("div", {
2500
- ...W(se(t, {
2501
- global: !0
2502
- }), i),
2503
- ...l,
2504
- style: f,
2505
- ref: t.overlayRef,
2506
- "data-entering": a || void 0,
2507
- "data-exiting": t.isExiting || void 0
2508
- }, /* @__PURE__ */ p.createElement(Oe, {
2509
- values: [
2510
- [
2511
- He,
2512
- {
2513
- modalProps: o,
2514
- modalRef: n,
2515
- isExiting: t.isExiting,
2516
- isDismissable: t.isDismissable
2517
- }
2518
- ],
2519
- [
2520
- Y,
2521
- r
2522
- ]
2523
- ]
2524
- }, l.children)));
2525
- }
2526
- function it(e) {
2527
- let { modalProps: t, modalRef: n, isExiting: r, isDismissable: o } = s.useContext(He), i = s.useContext(Y), a = s.useMemo(() => ct(e.modalRef, n), [
2528
- e.modalRef,
2529
- n
2530
- ]), l = de(a), c = bt(l), u = Ie({
2531
- ...e,
2532
- defaultClassName: "react-aria-Modal",
2533
- values: {
2534
- isEntering: c,
2535
- isExiting: r,
2536
- state: i
2537
- }
2538
- });
2539
- return /* @__PURE__ */ p.createElement("div", {
2540
- ...W(se(e, {
2541
- global: !0
2542
- }), t),
2543
- ...u,
2544
- ref: l,
2545
- "data-entering": c || void 0,
2546
- "data-exiting": r || void 0
2547
- }, o && /* @__PURE__ */ p.createElement(so, {
2548
- onDismiss: i.close
2549
- }), u.children);
2550
- }
2551
- export {
2552
- pt as $,
2553
- No as L,
2554
- Sn as a,
2555
- Lo as b,
2556
- ko as c,
2557
- To as d,
2558
- wo as e,
2559
- Ro as f,
2560
- Co as m
2561
- };