@articles-media/articles-dev-box 1.0.17 → 1.0.22

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.
Files changed (86) hide show
  1. package/README.md +6 -5
  2. package/dist/Ad-Ck5UdTq3.js +387 -0
  3. package/dist/Ad-DYtftKNV.cjs +1 -0
  4. package/dist/Ad.cjs +1 -1
  5. package/dist/Ad.js +2 -604
  6. package/dist/AdConfirmExitModal-CJ-HtcVC.js +56 -0
  7. package/dist/AdConfirmExitModal-CRCnzYQM.cjs +1 -0
  8. package/dist/AdDetailsModal-DRNRTL2W.js +108 -0
  9. package/dist/AdDetailsModal-g0n7LiV6.cjs +1 -0
  10. package/dist/ArticlesAd.cjs +1 -1
  11. package/dist/ArticlesAd.js +16 -15
  12. package/dist/Button-BlAdEbSd.js +30 -0
  13. package/dist/Button-CbpRj01E.cjs +1 -0
  14. package/dist/CreditsModal.cjs +1 -0
  15. package/dist/CreditsModal.js +56 -0
  16. package/dist/DarkModeHandler.cjs +1 -1
  17. package/dist/DarkModeHandler.js +17 -16
  18. package/dist/FriendsList.cjs +1 -1
  19. package/dist/FriendsList.js +77 -121
  20. package/dist/GameScoreboard-CBY3JsFa.js +165 -0
  21. package/dist/GameScoreboard-DdOCRxON.cjs +1 -0
  22. package/dist/GameScoreboard.cjs +1 -1
  23. package/dist/GameScoreboard.js +2 -190
  24. package/dist/GlobalBody.cjs +33 -1
  25. package/dist/GlobalBody.js +36 -7
  26. package/dist/GlobalHead.cjs +1 -1
  27. package/dist/GlobalHead.js +10 -12
  28. package/dist/Link-MFZblBb4.js +17 -0
  29. package/dist/Link-c7exNCJ3.cjs +1 -0
  30. package/dist/Modal-BX1s6CCU.js +1631 -0
  31. package/dist/Modal-DP9CeAVD.cjs +3 -0
  32. package/dist/ReturnToLauncherButton.cjs +1 -1
  33. package/dist/ReturnToLauncherButton.js +39 -54
  34. package/dist/SettingsModal--sWLmLGp.cjs +1 -0
  35. package/dist/SettingsModal-XI2dMI09.js +247 -0
  36. package/dist/SettingsModal.cjs +1 -1
  37. package/dist/SettingsModal.js +2 -658
  38. package/dist/StatusModal-D7WDDR9P.cjs +1 -0
  39. package/dist/StatusModal-elrPJvX1.js +70 -0
  40. package/dist/ViewUserModal-DDjWLpyM.js +3094 -0
  41. package/dist/ViewUserModal-DPVcjXNU.cjs +1 -0
  42. package/dist/ViewUserModal.cjs +1 -1
  43. package/dist/ViewUserModal.js +3 -3149
  44. package/dist/articles-dev-box.css +2 -1
  45. package/dist/chunk-350yNsax.cjs +1 -0
  46. package/dist/classnames-DP6dWde5.js +31 -0
  47. package/dist/classnames-pS64X3rL.cjs +1 -0
  48. package/dist/index.cjs +1 -1
  49. package/dist/index.js +16 -28
  50. package/dist/jsx-runtime-VZk6y-ec.js +191 -0
  51. package/dist/jsx-runtime-hCcDh67y.cjs +6 -0
  52. package/dist/numberWithCommas-BSKBdR-e.js +18 -0
  53. package/dist/numberWithCommas-D9tgiUnq.cjs +1 -0
  54. package/dist/useAuthSiteStatus-1rHjYC4N.js +29 -0
  55. package/dist/useAuthSiteStatus-P5kHc_Bz.cjs +1 -0
  56. package/dist/useFullscreen.cjs +1 -0
  57. package/dist/useFullscreen.js +24 -0
  58. package/dist/useUserDetails.cjs +1 -1
  59. package/dist/useUserDetails.js +22 -32
  60. package/dist/useUserFriends.cjs +1 -1
  61. package/dist/useUserFriends.js +29 -51
  62. package/dist/useUserToken.cjs +1 -1
  63. package/dist/useUserToken.js +16 -21
  64. package/package.json +17 -10
  65. package/dist/AdConfirmExitModal-Bhz-lt9w.js +0 -72
  66. package/dist/AdConfirmExitModal-N3Lvhb4y.cjs +0 -1
  67. package/dist/AdDetailsModal-BMj8DjV0.cjs +0 -1
  68. package/dist/AdDetailsModal-DXvfmyKK.js +0 -83
  69. package/dist/Button-0ZK0NKiK.cjs +0 -1
  70. package/dist/Button-_Quon8UV.js +0 -54
  71. package/dist/ElementChildren-DN3RWY2E.js +0 -51
  72. package/dist/ElementChildren-eAwIENLl.cjs +0 -1
  73. package/dist/GlobalBody-BrrtfBBs.js +0 -123
  74. package/dist/GlobalBody-weON_TbJ.cjs +0 -33
  75. package/dist/Modal-Bdhkgkwr.cjs +0 -2
  76. package/dist/Modal-nux8R77F.js +0 -2087
  77. package/dist/StatusModal-B086BgSW.js +0 -71
  78. package/dist/StatusModal-CzPyqQQA.cjs +0 -1
  79. package/dist/index-BlP2-uOi.cjs +0 -1
  80. package/dist/index-C8MeSLnR.js +0 -2504
  81. package/dist/index-DWV8myok.cjs +0 -6
  82. package/dist/index-YnD2EP-S.js +0 -43
  83. package/dist/jsx-runtime-nZSsnGb7.cjs +0 -6
  84. package/dist/jsx-runtime-tc70JA_2.js +0 -264
  85. package/dist/numberWithCommas-CRgrb58X.cjs +0 -1
  86. package/dist/numberWithCommas-DnAkiOFL.js +0 -1256
@@ -1,2087 +0,0 @@
1
- import { g as Zt, c as Q } from "./index-YnD2EP-S.js";
2
- import * as V from "react";
3
- import pe, { useState as be, useRef as W, useEffect as X, useCallback as B, useMemo as Ze, useContext as Te, createContext as Qt, useLayoutEffect as en, cloneElement as Qe, forwardRef as tn, useImperativeHandle as nn } from "react";
4
- import ge from "react-dom";
5
- import { j as N } from "./jsx-runtime-tc70JA_2.js";
6
- const xe = !!(typeof window < "u" && window.document && window.document.createElement);
7
- var Ve = !1, ze = !1;
8
- try {
9
- var ke = {
10
- get passive() {
11
- return Ve = !0;
12
- },
13
- get once() {
14
- return ze = Ve = !0;
15
- }
16
- };
17
- xe && (window.addEventListener("test", ke, ke), window.removeEventListener("test", ke, !0));
18
- } catch {
19
- }
20
- function Mt(e, t, n, r) {
21
- if (r && typeof r != "boolean" && !ze) {
22
- var i = r.once, o = r.capture, s = n;
23
- !ze && i && (s = n.__once || function u(d) {
24
- this.removeEventListener(t, u, o), n.call(this, d);
25
- }, n.__once = s), e.addEventListener(t, s, Ve ? r : o);
26
- }
27
- e.addEventListener(t, n, r);
28
- }
29
- function Ne(e) {
30
- return e && e.ownerDocument || document;
31
- }
32
- function Ge(e, t, n, r) {
33
- var i = r && typeof r != "boolean" ? r.capture : r;
34
- e.removeEventListener(t, n, i), n.__once && e.removeEventListener(t, n.__once, i);
35
- }
36
- var _e;
37
- function ct(e) {
38
- if ((!_e && _e !== 0 || e) && xe) {
39
- var t = document.createElement("div");
40
- t.style.position = "absolute", t.style.top = "-9999px", t.style.width = "50px", t.style.height = "50px", t.style.overflow = "scroll", document.body.appendChild(t), _e = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
41
- }
42
- return _e;
43
- }
44
- function rn() {
45
- return be(null);
46
- }
47
- function on(e) {
48
- const t = W(e);
49
- return X(() => {
50
- t.current = e;
51
- }, [e]), t;
52
- }
53
- function Ke(e) {
54
- const t = on(e);
55
- return B(function(...n) {
56
- return t.current && t.current(...n);
57
- }, [t]);
58
- }
59
- const lt = (e) => !e || typeof e == "function" ? e : (t) => {
60
- e.current = t;
61
- };
62
- function an(e, t) {
63
- const n = lt(e), r = lt(t);
64
- return (i) => {
65
- n && n(i), r && r(i);
66
- };
67
- }
68
- function Pt(e, t) {
69
- return Ze(() => an(e, t), [e, t]);
70
- }
71
- function sn(e) {
72
- const t = W(e);
73
- return t.current = e, t;
74
- }
75
- function un(e) {
76
- const t = sn(e);
77
- X(() => () => t.current(), []);
78
- }
79
- function cn(e) {
80
- var t = Ne(e);
81
- return t && t.defaultView || window;
82
- }
83
- function ln(e, t) {
84
- return cn(e).getComputedStyle(e, t);
85
- }
86
- var fn = /([A-Z])/g;
87
- function dn(e) {
88
- return e.replace(fn, "-$1").toLowerCase();
89
- }
90
- var pn = /^ms-/;
91
- function Me(e) {
92
- return dn(e).replace(pn, "-ms-");
93
- }
94
- var vn = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;
95
- function hn(e) {
96
- return !!(e && vn.test(e));
97
- }
98
- function ve(e, t) {
99
- var n = "", r = "";
100
- if (typeof t == "string")
101
- return e.style.getPropertyValue(Me(t)) || ln(e).getPropertyValue(Me(t));
102
- Object.keys(t).forEach(function(i) {
103
- var o = t[i];
104
- !o && o !== 0 ? e.style.removeProperty(Me(i)) : hn(i) ? r += i + "(" + o + ") " : n += Me(i) + ": " + o + ";";
105
- }), r && (n += "transform: " + r + ";"), e.style.cssText += ";" + n;
106
- }
107
- function je(e, t, n, r) {
108
- return Mt(e, t, n, r), function() {
109
- Ge(e, t, n, r);
110
- };
111
- }
112
- function mn(e, t, n, r) {
113
- if (r === void 0 && (r = !0), e) {
114
- var i = document.createEvent("HTMLEvents");
115
- i.initEvent(t, n, r), e.dispatchEvent(i);
116
- }
117
- }
118
- function yn(e) {
119
- var t = ve(e, "transitionDuration") || "", n = t.indexOf("ms") === -1 ? 1e3 : 1;
120
- return parseFloat(t) * n;
121
- }
122
- function En(e, t, n) {
123
- n === void 0 && (n = 5);
124
- var r = !1, i = setTimeout(function() {
125
- r || mn(e, "transitionend", !0);
126
- }, t + n), o = je(e, "transitionend", function() {
127
- r = !0;
128
- }, {
129
- once: !0
130
- });
131
- return function() {
132
- clearTimeout(i), o();
133
- };
134
- }
135
- function At(e, t, n, r) {
136
- n == null && (n = yn(e) || 0);
137
- var i = En(e, n, r), o = je(e, "transitionend", t);
138
- return function() {
139
- i(), o();
140
- };
141
- }
142
- function Ie(e) {
143
- e === void 0 && (e = Ne());
144
- try {
145
- var t = e.activeElement;
146
- return !t || !t.nodeName ? null : t;
147
- } catch {
148
- return e.body;
149
- }
150
- }
151
- function ft(e, t) {
152
- if (e.contains) return e.contains(t);
153
- if (e.compareDocumentPosition) return e === t || !!(e.compareDocumentPosition(t) & 16);
154
- }
155
- function gn() {
156
- const e = W(!0), t = W(() => e.current);
157
- return X(() => (e.current = !0, () => {
158
- e.current = !1;
159
- }), []), t.current;
160
- }
161
- function bn(e) {
162
- const t = W(e);
163
- return t.current = e, t;
164
- }
165
- function Tn(e) {
166
- const t = bn(e);
167
- X(() => () => t.current(), []);
168
- }
169
- function xn(e) {
170
- const t = W(null);
171
- return X(() => {
172
- t.current = e;
173
- }), t.current;
174
- }
175
- function Rn(e) {
176
- const t = W(e);
177
- return X(() => {
178
- t.current = e;
179
- }, [e]), t;
180
- }
181
- function fe(e) {
182
- const t = Rn(e);
183
- return B(function(...n) {
184
- return t.current && t.current(...n);
185
- }, [t]);
186
- }
187
- const On = "data-rr-ui-";
188
- function Sn(e) {
189
- return `${On}${e}`;
190
- }
191
- function wn(e = document) {
192
- const t = e.defaultView;
193
- return Math.abs(t.innerWidth - e.documentElement.clientWidth);
194
- }
195
- const dt = Sn("modal-open");
196
- class et {
197
- constructor({
198
- ownerDocument: t,
199
- handleContainerOverflow: n = !0,
200
- isRTL: r = !1
201
- } = {}) {
202
- this.handleContainerOverflow = n, this.isRTL = r, this.modals = [], this.ownerDocument = t;
203
- }
204
- getScrollbarWidth() {
205
- return wn(this.ownerDocument);
206
- }
207
- getElement() {
208
- return (this.ownerDocument || document).body;
209
- }
210
- setModalAttributes(t) {
211
- }
212
- removeModalAttributes(t) {
213
- }
214
- setContainerStyle(t) {
215
- const n = {
216
- overflow: "hidden"
217
- }, r = this.isRTL ? "paddingLeft" : "paddingRight", i = this.getElement();
218
- t.style = {
219
- overflow: i.style.overflow,
220
- [r]: i.style[r]
221
- }, t.scrollBarWidth && (n[r] = `${parseInt(ve(i, r) || "0", 10) + t.scrollBarWidth}px`), i.setAttribute(dt, ""), ve(i, n);
222
- }
223
- reset() {
224
- [...this.modals].forEach((t) => this.remove(t));
225
- }
226
- removeContainerStyle(t) {
227
- const n = this.getElement();
228
- n.removeAttribute(dt), Object.assign(n.style, t.style);
229
- }
230
- add(t) {
231
- let n = this.modals.indexOf(t);
232
- return n !== -1 || (n = this.modals.length, this.modals.push(t), this.setModalAttributes(t), n !== 0) || (this.state = {
233
- scrollBarWidth: this.getScrollbarWidth(),
234
- style: {}
235
- }, this.handleContainerOverflow && this.setContainerStyle(this.state)), n;
236
- }
237
- remove(t) {
238
- const n = this.modals.indexOf(t);
239
- n !== -1 && (this.modals.splice(n, 1), !this.modals.length && this.handleContainerOverflow && this.removeContainerStyle(this.state), this.removeModalAttributes(t));
240
- }
241
- isTopModal(t) {
242
- return !!this.modals.length && this.modals[this.modals.length - 1] === t;
243
- }
244
- }
245
- const jt = /* @__PURE__ */ Qt(xe ? window : void 0);
246
- jt.Provider;
247
- function tt() {
248
- return Te(jt);
249
- }
250
- const Le = (e, t) => xe ? e == null ? (t || Ne()).body : (typeof e == "function" && (e = e()), e && "current" in e && (e = e.current), e && ("nodeType" in e || e.getBoundingClientRect) ? e : null) : null;
251
- function Cn(e, t) {
252
- const n = tt(), [r, i] = be(() => Le(e, n?.document));
253
- if (!r) {
254
- const o = Le(e);
255
- o && i(o);
256
- }
257
- return X(() => {
258
- }, [t, r]), X(() => {
259
- const o = Le(e);
260
- o !== r && i(o);
261
- }, [e, r]), r;
262
- }
263
- const pt = (e) => !e || typeof e == "function" ? e : (t) => {
264
- e.current = t;
265
- };
266
- function _n(e, t) {
267
- const n = pt(e), r = pt(t);
268
- return (i) => {
269
- n && n(i), r && r(i);
270
- };
271
- }
272
- function nt(e, t) {
273
- return Ze(() => _n(e, t), [e, t]);
274
- }
275
- const Mn = typeof global < "u" && // @ts-ignore
276
- global.navigator && // @ts-ignore
277
- global.navigator.product === "ReactNative", Pn = typeof document < "u", vt = Pn || Mn ? en : X;
278
- function An(e) {
279
- return e.code === "Escape" || e.keyCode === 27;
280
- }
281
- function jn() {
282
- const e = V.version.split(".");
283
- return {
284
- major: +e[0],
285
- minor: +e[1],
286
- patch: +e[2]
287
- };
288
- }
289
- function De(e) {
290
- if (!e || typeof e == "function")
291
- return null;
292
- const {
293
- major: t
294
- } = jn();
295
- return t >= 19 ? e.props.ref : e.ref;
296
- }
297
- function Nn({
298
- children: e,
299
- in: t,
300
- onExited: n,
301
- mountOnEnter: r,
302
- unmountOnExit: i
303
- }) {
304
- const o = W(null), s = W(t), u = fe(n);
305
- X(() => {
306
- t ? s.current = !0 : u(o.current);
307
- }, [t, u]);
308
- const d = nt(o, De(e)), p = /* @__PURE__ */ Qe(e, {
309
- ref: d
310
- });
311
- return t ? p : i || !s.current && r ? null : p;
312
- }
313
- const Dn = ["onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "addEndListener", "children"];
314
- function kn(e, t) {
315
- if (e == null) return {};
316
- var n = {};
317
- for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
318
- if (t.indexOf(r) >= 0) continue;
319
- n[r] = e[r];
320
- }
321
- return n;
322
- }
323
- function In(e) {
324
- let {
325
- onEnter: t,
326
- onEntering: n,
327
- onEntered: r,
328
- onExit: i,
329
- onExiting: o,
330
- onExited: s,
331
- addEndListener: u,
332
- children: d
333
- } = e, p = kn(e, Dn);
334
- const v = W(null), y = nt(v, De(d)), x = (j) => (c) => {
335
- j && v.current && j(v.current, c);
336
- }, _ = B(x(t), [t]), D = B(x(n), [n]), C = B(x(r), [r]), L = B(x(i), [i]), $ = B(x(o), [o]), G = B(x(s), [s]), I = B(x(u), [u]);
337
- return Object.assign({}, p, {
338
- nodeRef: v
339
- }, t && {
340
- onEnter: _
341
- }, n && {
342
- onEntering: D
343
- }, r && {
344
- onEntered: C
345
- }, i && {
346
- onExit: L
347
- }, o && {
348
- onExiting: $
349
- }, s && {
350
- onExited: G
351
- }, u && {
352
- addEndListener: I
353
- }, {
354
- children: typeof d == "function" ? (j, c) => (
355
- // TODO: Types for RTG missing innerProps, so need to cast.
356
- d(j, Object.assign({}, c, {
357
- ref: y
358
- }))
359
- ) : /* @__PURE__ */ Qe(d, {
360
- ref: y
361
- })
362
- });
363
- }
364
- const Ln = ["component"];
365
- function $n(e, t) {
366
- if (e == null) return {};
367
- var n = {};
368
- for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
369
- if (t.indexOf(r) >= 0) continue;
370
- n[r] = e[r];
371
- }
372
- return n;
373
- }
374
- const Fn = /* @__PURE__ */ V.forwardRef((e, t) => {
375
- let {
376
- component: n
377
- } = e, r = $n(e, Ln);
378
- const i = In(r);
379
- return /* @__PURE__ */ N.jsx(n, Object.assign({
380
- ref: t
381
- }, i));
382
- });
383
- function Bn({
384
- in: e,
385
- onTransition: t
386
- }) {
387
- const n = W(null), r = W(!0), i = fe(t);
388
- return vt(() => {
389
- if (!n.current)
390
- return;
391
- let o = !1;
392
- return i({
393
- in: e,
394
- element: n.current,
395
- initial: r.current,
396
- isStale: () => o
397
- }), () => {
398
- o = !0;
399
- };
400
- }, [e, i]), vt(() => (r.current = !1, () => {
401
- r.current = !0;
402
- }), []), n;
403
- }
404
- function Wn({
405
- children: e,
406
- in: t,
407
- onExited: n,
408
- onEntered: r,
409
- transition: i
410
- }) {
411
- const [o, s] = be(!t);
412
- t && o && s(!1);
413
- const u = Bn({
414
- in: !!t,
415
- onTransition: (p) => {
416
- const v = () => {
417
- p.isStale() || (p.in ? r?.(p.element, p.initial) : (s(!0), n?.(p.element)));
418
- };
419
- Promise.resolve(i(p)).then(v, (y) => {
420
- throw p.in || s(!0), y;
421
- });
422
- }
423
- }), d = nt(u, De(e));
424
- return o && !t ? null : /* @__PURE__ */ Qe(e, {
425
- ref: d
426
- });
427
- }
428
- function ht(e, t, n) {
429
- return e ? /* @__PURE__ */ N.jsx(Fn, Object.assign({}, n, {
430
- component: e
431
- })) : t ? /* @__PURE__ */ N.jsx(Wn, Object.assign({}, n, {
432
- transition: t
433
- })) : /* @__PURE__ */ N.jsx(Nn, Object.assign({}, n));
434
- }
435
- const Un = ["show", "role", "className", "style", "children", "backdrop", "keyboard", "onBackdropClick", "onEscapeKeyDown", "transition", "runTransition", "backdropTransition", "runBackdropTransition", "autoFocus", "enforceFocus", "restoreFocus", "restoreFocusOptions", "renderDialog", "renderBackdrop", "manager", "container", "onShow", "onHide", "onExit", "onExited", "onExiting", "onEnter", "onEntering", "onEntered"];
436
- function qn(e, t) {
437
- if (e == null) return {};
438
- var n = {};
439
- for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
440
- if (t.indexOf(r) >= 0) continue;
441
- n[r] = e[r];
442
- }
443
- return n;
444
- }
445
- let $e;
446
- function Yn(e) {
447
- return $e || ($e = new et({
448
- ownerDocument: e?.document
449
- })), $e;
450
- }
451
- function Hn(e) {
452
- const t = tt(), n = e || Yn(t), r = W({
453
- dialog: null,
454
- backdrop: null
455
- });
456
- return Object.assign(r.current, {
457
- add: () => n.add(r.current),
458
- remove: () => n.remove(r.current),
459
- isTopModal: () => n.isTopModal(r.current),
460
- setDialogRef: B((i) => {
461
- r.current.dialog = i;
462
- }, []),
463
- setBackdropRef: B((i) => {
464
- r.current.backdrop = i;
465
- }, [])
466
- });
467
- }
468
- const Nt = /* @__PURE__ */ tn((e, t) => {
469
- let {
470
- show: n = !1,
471
- role: r = "dialog",
472
- className: i,
473
- style: o,
474
- children: s,
475
- backdrop: u = !0,
476
- keyboard: d = !0,
477
- onBackdropClick: p,
478
- onEscapeKeyDown: v,
479
- transition: y,
480
- runTransition: x,
481
- backdropTransition: _,
482
- runBackdropTransition: D,
483
- autoFocus: C = !0,
484
- enforceFocus: L = !0,
485
- restoreFocus: $ = !0,
486
- restoreFocusOptions: G,
487
- renderDialog: I,
488
- renderBackdrop: j = (k) => /* @__PURE__ */ N.jsx("div", Object.assign({}, k)),
489
- manager: c,
490
- container: Y,
491
- onShow: K,
492
- onHide: ee = () => {
493
- },
494
- onExit: se,
495
- onExited: te,
496
- onExiting: ne,
497
- onEnter: oe,
498
- onEntering: ie,
499
- onEntered: J
500
- } = e, ue = qn(e, Un);
501
- const U = tt(), z = Cn(Y), F = Hn(c), ce = gn(), a = xn(n), [f, E] = be(!n), m = W(null);
502
- nn(t, () => F, [F]), xe && !a && n && (m.current = Ie(U?.document)), n && f && E(!1);
503
- const h = fe(() => {
504
- if (F.add(), R.current = je(document, "keydown", S), w.current = je(
505
- document,
506
- "focus",
507
- // the timeout is necessary b/c this will run before the new modal is mounted
508
- // and so steals focus from it
509
- () => setTimeout(g),
510
- !0
511
- ), K && K(), C) {
512
- var k, Ce;
513
- const Oe = Ie((k = (Ce = F.dialog) == null ? void 0 : Ce.ownerDocument) != null ? k : U?.document);
514
- F.dialog && Oe && !ft(F.dialog, Oe) && (m.current = Oe, F.dialog.focus());
515
- }
516
- }), O = fe(() => {
517
- if (F.remove(), R.current == null || R.current(), w.current == null || w.current(), $) {
518
- var k;
519
- (k = m.current) == null || k.focus == null || k.focus(G), m.current = null;
520
- }
521
- });
522
- X(() => {
523
- !n || !z || h();
524
- }, [
525
- n,
526
- z,
527
- /* should never change: */
528
- h
529
- ]), X(() => {
530
- f && O();
531
- }, [f, O]), Tn(() => {
532
- O();
533
- });
534
- const g = fe(() => {
535
- if (!L || !ce() || !F.isTopModal())
536
- return;
537
- const k = Ie(U?.document);
538
- F.dialog && k && !ft(F.dialog, k) && F.dialog.focus();
539
- }), b = fe((k) => {
540
- k.target === k.currentTarget && (p?.(k), u === !0 && ee());
541
- }), S = fe((k) => {
542
- d && An(k) && F.isTopModal() && (v?.(k), k.defaultPrevented || ee());
543
- }), w = W(), R = W(), q = (...k) => {
544
- E(!0), te?.(...k);
545
- };
546
- if (!z)
547
- return null;
548
- const l = Object.assign({
549
- role: r,
550
- ref: F.setDialogRef,
551
- // apparently only works on the dialog role element
552
- "aria-modal": r === "dialog" ? !0 : void 0
553
- }, ue, {
554
- style: o,
555
- className: i,
556
- tabIndex: -1
557
- });
558
- let H = I ? I(l) : /* @__PURE__ */ N.jsx("div", Object.assign({}, l, {
559
- children: /* @__PURE__ */ V.cloneElement(s, {
560
- role: "document"
561
- })
562
- }));
563
- H = ht(y, x, {
564
- unmountOnExit: !0,
565
- mountOnEnter: !0,
566
- appear: !0,
567
- in: !!n,
568
- onExit: se,
569
- onExiting: ne,
570
- onExited: q,
571
- onEnter: oe,
572
- onEntering: ie,
573
- onEntered: J,
574
- children: H
575
- });
576
- let Z = null;
577
- return u && (Z = j({
578
- ref: F.setBackdropRef,
579
- onClick: b
580
- }), Z = ht(_, D, {
581
- in: !!n,
582
- appear: !0,
583
- mountOnEnter: !0,
584
- unmountOnExit: !0,
585
- children: Z
586
- })), /* @__PURE__ */ N.jsx(N.Fragment, {
587
- children: /* @__PURE__ */ ge.createPortal(/* @__PURE__ */ N.jsxs(N.Fragment, {
588
- children: [Z, H]
589
- }), z)
590
- });
591
- });
592
- Nt.displayName = "Modal";
593
- const Vn = Object.assign(Nt, {
594
- Manager: et
595
- });
596
- function zn(e, t) {
597
- return e.classList ? !!t && e.classList.contains(t) : (" " + (e.className.baseVal || e.className) + " ").indexOf(" " + t + " ") !== -1;
598
- }
599
- function Gn(e, t) {
600
- e.classList ? e.classList.add(t) : zn(e, t) || (typeof e.className == "string" ? e.className = e.className + " " + t : e.setAttribute("class", (e.className && e.className.baseVal || "") + " " + t));
601
- }
602
- var Kn = Function.prototype.bind.call(Function.prototype.call, [].slice);
603
- function me(e, t) {
604
- return Kn(e.querySelectorAll(t));
605
- }
606
- function mt(e, t) {
607
- return e.replace(new RegExp("(^|\\s)" + t + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
608
- }
609
- function Xn(e, t) {
610
- e.classList ? e.classList.remove(t) : typeof e.className == "string" ? e.className = mt(e.className, t) : e.setAttribute("class", mt(e.className && e.className.baseVal || "", t));
611
- }
612
- const ye = {
613
- FIXED_CONTENT: ".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",
614
- STICKY_CONTENT: ".sticky-top",
615
- NAVBAR_TOGGLER: ".navbar-toggler"
616
- };
617
- class Jn extends et {
618
- adjustAndStore(t, n, r) {
619
- const i = n.style[t];
620
- n.dataset[t] = i, ve(n, {
621
- [t]: `${parseFloat(ve(n, t)) + r}px`
622
- });
623
- }
624
- restore(t, n) {
625
- const r = n.dataset[t];
626
- r !== void 0 && (delete n.dataset[t], ve(n, {
627
- [t]: r
628
- }));
629
- }
630
- setContainerStyle(t) {
631
- super.setContainerStyle(t);
632
- const n = this.getElement();
633
- if (Gn(n, "modal-open"), !t.scrollBarWidth) return;
634
- const r = this.isRTL ? "paddingLeft" : "paddingRight", i = this.isRTL ? "marginLeft" : "marginRight";
635
- me(n, ye.FIXED_CONTENT).forEach((o) => this.adjustAndStore(r, o, t.scrollBarWidth)), me(n, ye.STICKY_CONTENT).forEach((o) => this.adjustAndStore(i, o, -t.scrollBarWidth)), me(n, ye.NAVBAR_TOGGLER).forEach((o) => this.adjustAndStore(i, o, t.scrollBarWidth));
636
- }
637
- removeContainerStyle(t) {
638
- super.removeContainerStyle(t);
639
- const n = this.getElement();
640
- Xn(n, "modal-open");
641
- const r = this.isRTL ? "paddingLeft" : "paddingRight", i = this.isRTL ? "marginLeft" : "marginRight";
642
- me(n, ye.FIXED_CONTENT).forEach((o) => this.restore(r, o)), me(n, ye.STICKY_CONTENT).forEach((o) => this.restore(i, o)), me(n, ye.NAVBAR_TOGGLER).forEach((o) => this.restore(i, o));
643
- }
644
- }
645
- let Fe;
646
- function Zn(e) {
647
- return Fe || (Fe = new Jn(e)), Fe;
648
- }
649
- function Qn(e, t) {
650
- if (e == null) return {};
651
- var n = {};
652
- for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
653
- if (t.indexOf(r) !== -1) continue;
654
- n[r] = e[r];
655
- }
656
- return n;
657
- }
658
- function Xe(e, t) {
659
- return Xe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
660
- return n.__proto__ = r, n;
661
- }, Xe(e, t);
662
- }
663
- function er(e, t) {
664
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Xe(e, t);
665
- }
666
- var Pe = { exports: {} }, Ae = { exports: {} }, P = {};
667
- var yt;
668
- function tr() {
669
- if (yt) return P;
670
- yt = 1;
671
- var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, n = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, s = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, u = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, d = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, p = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, v = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, y = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, x = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, _ = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, C = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, L = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, $ = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, G = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
672
- function I(c) {
673
- if (typeof c == "object" && c !== null) {
674
- var Y = c.$$typeof;
675
- switch (Y) {
676
- case t:
677
- switch (c = c.type, c) {
678
- case d:
679
- case p:
680
- case r:
681
- case o:
682
- case i:
683
- case y:
684
- return c;
685
- default:
686
- switch (c = c && c.$$typeof, c) {
687
- case u:
688
- case v:
689
- case D:
690
- case _:
691
- case s:
692
- return c;
693
- default:
694
- return Y;
695
- }
696
- }
697
- case n:
698
- return Y;
699
- }
700
- }
701
- }
702
- function j(c) {
703
- return I(c) === p;
704
- }
705
- return P.AsyncMode = d, P.ConcurrentMode = p, P.ContextConsumer = u, P.ContextProvider = s, P.Element = t, P.ForwardRef = v, P.Fragment = r, P.Lazy = D, P.Memo = _, P.Portal = n, P.Profiler = o, P.StrictMode = i, P.Suspense = y, P.isAsyncMode = function(c) {
706
- return j(c) || I(c) === d;
707
- }, P.isConcurrentMode = j, P.isContextConsumer = function(c) {
708
- return I(c) === u;
709
- }, P.isContextProvider = function(c) {
710
- return I(c) === s;
711
- }, P.isElement = function(c) {
712
- return typeof c == "object" && c !== null && c.$$typeof === t;
713
- }, P.isForwardRef = function(c) {
714
- return I(c) === v;
715
- }, P.isFragment = function(c) {
716
- return I(c) === r;
717
- }, P.isLazy = function(c) {
718
- return I(c) === D;
719
- }, P.isMemo = function(c) {
720
- return I(c) === _;
721
- }, P.isPortal = function(c) {
722
- return I(c) === n;
723
- }, P.isProfiler = function(c) {
724
- return I(c) === o;
725
- }, P.isStrictMode = function(c) {
726
- return I(c) === i;
727
- }, P.isSuspense = function(c) {
728
- return I(c) === y;
729
- }, P.isValidElementType = function(c) {
730
- return typeof c == "string" || typeof c == "function" || c === r || c === p || c === o || c === i || c === y || c === x || typeof c == "object" && c !== null && (c.$$typeof === D || c.$$typeof === _ || c.$$typeof === s || c.$$typeof === u || c.$$typeof === v || c.$$typeof === L || c.$$typeof === $ || c.$$typeof === G || c.$$typeof === C);
731
- }, P.typeOf = I, P;
732
- }
733
- var A = {};
734
- var Et;
735
- function nr() {
736
- return Et || (Et = 1, process.env.NODE_ENV !== "production" && (function() {
737
- var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, n = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, s = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, u = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, d = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, p = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, v = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, y = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, x = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, _ = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, C = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, L = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, $ = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, G = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
738
- function I(l) {
739
- return typeof l == "string" || typeof l == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
740
- l === r || l === p || l === o || l === i || l === y || l === x || typeof l == "object" && l !== null && (l.$$typeof === D || l.$$typeof === _ || l.$$typeof === s || l.$$typeof === u || l.$$typeof === v || l.$$typeof === L || l.$$typeof === $ || l.$$typeof === G || l.$$typeof === C);
741
- }
742
- function j(l) {
743
- if (typeof l == "object" && l !== null) {
744
- var H = l.$$typeof;
745
- switch (H) {
746
- case t:
747
- var Z = l.type;
748
- switch (Z) {
749
- case d:
750
- case p:
751
- case r:
752
- case o:
753
- case i:
754
- case y:
755
- return Z;
756
- default:
757
- var k = Z && Z.$$typeof;
758
- switch (k) {
759
- case u:
760
- case v:
761
- case D:
762
- case _:
763
- case s:
764
- return k;
765
- default:
766
- return H;
767
- }
768
- }
769
- case n:
770
- return H;
771
- }
772
- }
773
- }
774
- var c = d, Y = p, K = u, ee = s, se = t, te = v, ne = r, oe = D, ie = _, J = n, ue = o, U = i, z = y, F = !1;
775
- function ce(l) {
776
- return F || (F = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), a(l) || j(l) === d;
777
- }
778
- function a(l) {
779
- return j(l) === p;
780
- }
781
- function f(l) {
782
- return j(l) === u;
783
- }
784
- function E(l) {
785
- return j(l) === s;
786
- }
787
- function m(l) {
788
- return typeof l == "object" && l !== null && l.$$typeof === t;
789
- }
790
- function h(l) {
791
- return j(l) === v;
792
- }
793
- function O(l) {
794
- return j(l) === r;
795
- }
796
- function g(l) {
797
- return j(l) === D;
798
- }
799
- function b(l) {
800
- return j(l) === _;
801
- }
802
- function S(l) {
803
- return j(l) === n;
804
- }
805
- function w(l) {
806
- return j(l) === o;
807
- }
808
- function R(l) {
809
- return j(l) === i;
810
- }
811
- function q(l) {
812
- return j(l) === y;
813
- }
814
- A.AsyncMode = c, A.ConcurrentMode = Y, A.ContextConsumer = K, A.ContextProvider = ee, A.Element = se, A.ForwardRef = te, A.Fragment = ne, A.Lazy = oe, A.Memo = ie, A.Portal = J, A.Profiler = ue, A.StrictMode = U, A.Suspense = z, A.isAsyncMode = ce, A.isConcurrentMode = a, A.isContextConsumer = f, A.isContextProvider = E, A.isElement = m, A.isForwardRef = h, A.isFragment = O, A.isLazy = g, A.isMemo = b, A.isPortal = S, A.isProfiler = w, A.isStrictMode = R, A.isSuspense = q, A.isValidElementType = I, A.typeOf = j;
815
- })()), A;
816
- }
817
- var gt;
818
- function Dt() {
819
- return gt || (gt = 1, process.env.NODE_ENV === "production" ? Ae.exports = tr() : Ae.exports = nr()), Ae.exports;
820
- }
821
- var Be, bt;
822
- function rr() {
823
- if (bt) return Be;
824
- bt = 1;
825
- var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
826
- function r(o) {
827
- if (o == null)
828
- throw new TypeError("Object.assign cannot be called with null or undefined");
829
- return Object(o);
830
- }
831
- function i() {
832
- try {
833
- if (!Object.assign)
834
- return !1;
835
- var o = new String("abc");
836
- if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5")
837
- return !1;
838
- for (var s = {}, u = 0; u < 10; u++)
839
- s["_" + String.fromCharCode(u)] = u;
840
- var d = Object.getOwnPropertyNames(s).map(function(v) {
841
- return s[v];
842
- });
843
- if (d.join("") !== "0123456789")
844
- return !1;
845
- var p = {};
846
- return "abcdefghijklmnopqrst".split("").forEach(function(v) {
847
- p[v] = v;
848
- }), Object.keys(Object.assign({}, p)).join("") === "abcdefghijklmnopqrst";
849
- } catch {
850
- return !1;
851
- }
852
- }
853
- return Be = i() ? Object.assign : function(o, s) {
854
- for (var u, d = r(o), p, v = 1; v < arguments.length; v++) {
855
- u = Object(arguments[v]);
856
- for (var y in u)
857
- t.call(u, y) && (d[y] = u[y]);
858
- if (e) {
859
- p = e(u);
860
- for (var x = 0; x < p.length; x++)
861
- n.call(u, p[x]) && (d[p[x]] = u[p[x]]);
862
- }
863
- }
864
- return d;
865
- }, Be;
866
- }
867
- var We, Tt;
868
- function rt() {
869
- if (Tt) return We;
870
- Tt = 1;
871
- var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
872
- return We = e, We;
873
- }
874
- var Ue, xt;
875
- function kt() {
876
- return xt || (xt = 1, Ue = Function.call.bind(Object.prototype.hasOwnProperty)), Ue;
877
- }
878
- var qe, Rt;
879
- function or() {
880
- if (Rt) return qe;
881
- Rt = 1;
882
- var e = function() {
883
- };
884
- if (process.env.NODE_ENV !== "production") {
885
- var t = /* @__PURE__ */ rt(), n = {}, r = /* @__PURE__ */ kt();
886
- e = function(o) {
887
- var s = "Warning: " + o;
888
- typeof console < "u" && console.error(s);
889
- try {
890
- throw new Error(s);
891
- } catch {
892
- }
893
- };
894
- }
895
- function i(o, s, u, d, p) {
896
- if (process.env.NODE_ENV !== "production") {
897
- for (var v in o)
898
- if (r(o, v)) {
899
- var y;
900
- try {
901
- if (typeof o[v] != "function") {
902
- var x = Error(
903
- (d || "React class") + ": " + u + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
904
- );
905
- throw x.name = "Invariant Violation", x;
906
- }
907
- y = o[v](s, v, d, u, null, t);
908
- } catch (D) {
909
- y = D;
910
- }
911
- if (y && !(y instanceof Error) && e(
912
- (d || "React class") + ": type specification of " + u + " `" + v + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof y + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
913
- ), y instanceof Error && !(y.message in n)) {
914
- n[y.message] = !0;
915
- var _ = p ? p() : "";
916
- e(
917
- "Failed " + u + " type: " + y.message + (_ ?? "")
918
- );
919
- }
920
- }
921
- }
922
- }
923
- return i.resetWarningCache = function() {
924
- process.env.NODE_ENV !== "production" && (n = {});
925
- }, qe = i, qe;
926
- }
927
- var Ye, Ot;
928
- function ir() {
929
- if (Ot) return Ye;
930
- Ot = 1;
931
- var e = Dt(), t = rr(), n = /* @__PURE__ */ rt(), r = /* @__PURE__ */ kt(), i = /* @__PURE__ */ or(), o = function() {
932
- };
933
- process.env.NODE_ENV !== "production" && (o = function(u) {
934
- var d = "Warning: " + u;
935
- typeof console < "u" && console.error(d);
936
- try {
937
- throw new Error(d);
938
- } catch {
939
- }
940
- });
941
- function s() {
942
- return null;
943
- }
944
- return Ye = function(u, d) {
945
- var p = typeof Symbol == "function" && Symbol.iterator, v = "@@iterator";
946
- function y(a) {
947
- var f = a && (p && a[p] || a[v]);
948
- if (typeof f == "function")
949
- return f;
950
- }
951
- var x = "<<anonymous>>", _ = {
952
- array: $("array"),
953
- bigint: $("bigint"),
954
- bool: $("boolean"),
955
- func: $("function"),
956
- number: $("number"),
957
- object: $("object"),
958
- string: $("string"),
959
- symbol: $("symbol"),
960
- any: G(),
961
- arrayOf: I,
962
- element: j(),
963
- elementType: c(),
964
- instanceOf: Y,
965
- node: te(),
966
- objectOf: ee,
967
- oneOf: K,
968
- oneOfType: se,
969
- shape: oe,
970
- exact: ie
971
- };
972
- function D(a, f) {
973
- return a === f ? a !== 0 || 1 / a === 1 / f : a !== a && f !== f;
974
- }
975
- function C(a, f) {
976
- this.message = a, this.data = f && typeof f == "object" ? f : {}, this.stack = "";
977
- }
978
- C.prototype = Error.prototype;
979
- function L(a) {
980
- if (process.env.NODE_ENV !== "production")
981
- var f = {}, E = 0;
982
- function m(O, g, b, S, w, R, q) {
983
- if (S = S || x, R = R || b, q !== n) {
984
- if (d) {
985
- var l = new Error(
986
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
987
- );
988
- throw l.name = "Invariant Violation", l;
989
- } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
990
- var H = S + ":" + b;
991
- !f[H] && // Avoid spamming the console because they are often not actionable except for lib authors
992
- E < 3 && (o(
993
- "You are manually calling a React.PropTypes validation function for the `" + R + "` prop on `" + S + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
994
- ), f[H] = !0, E++);
995
- }
996
- }
997
- return g[b] == null ? O ? g[b] === null ? new C("The " + w + " `" + R + "` is marked as required " + ("in `" + S + "`, but its value is `null`.")) : new C("The " + w + " `" + R + "` is marked as required in " + ("`" + S + "`, but its value is `undefined`.")) : null : a(g, b, S, w, R);
998
- }
999
- var h = m.bind(null, !1);
1000
- return h.isRequired = m.bind(null, !0), h;
1001
- }
1002
- function $(a) {
1003
- function f(E, m, h, O, g, b) {
1004
- var S = E[m], w = U(S);
1005
- if (w !== a) {
1006
- var R = z(S);
1007
- return new C(
1008
- "Invalid " + O + " `" + g + "` of type " + ("`" + R + "` supplied to `" + h + "`, expected ") + ("`" + a + "`."),
1009
- { expectedType: a }
1010
- );
1011
- }
1012
- return null;
1013
- }
1014
- return L(f);
1015
- }
1016
- function G() {
1017
- return L(s);
1018
- }
1019
- function I(a) {
1020
- function f(E, m, h, O, g) {
1021
- if (typeof a != "function")
1022
- return new C("Property `" + g + "` of component `" + h + "` has invalid PropType notation inside arrayOf.");
1023
- var b = E[m];
1024
- if (!Array.isArray(b)) {
1025
- var S = U(b);
1026
- return new C("Invalid " + O + " `" + g + "` of type " + ("`" + S + "` supplied to `" + h + "`, expected an array."));
1027
- }
1028
- for (var w = 0; w < b.length; w++) {
1029
- var R = a(b, w, h, O, g + "[" + w + "]", n);
1030
- if (R instanceof Error)
1031
- return R;
1032
- }
1033
- return null;
1034
- }
1035
- return L(f);
1036
- }
1037
- function j() {
1038
- function a(f, E, m, h, O) {
1039
- var g = f[E];
1040
- if (!u(g)) {
1041
- var b = U(g);
1042
- return new C("Invalid " + h + " `" + O + "` of type " + ("`" + b + "` supplied to `" + m + "`, expected a single ReactElement."));
1043
- }
1044
- return null;
1045
- }
1046
- return L(a);
1047
- }
1048
- function c() {
1049
- function a(f, E, m, h, O) {
1050
- var g = f[E];
1051
- if (!e.isValidElementType(g)) {
1052
- var b = U(g);
1053
- return new C("Invalid " + h + " `" + O + "` of type " + ("`" + b + "` supplied to `" + m + "`, expected a single ReactElement type."));
1054
- }
1055
- return null;
1056
- }
1057
- return L(a);
1058
- }
1059
- function Y(a) {
1060
- function f(E, m, h, O, g) {
1061
- if (!(E[m] instanceof a)) {
1062
- var b = a.name || x, S = ce(E[m]);
1063
- return new C("Invalid " + O + " `" + g + "` of type " + ("`" + S + "` supplied to `" + h + "`, expected ") + ("instance of `" + b + "`."));
1064
- }
1065
- return null;
1066
- }
1067
- return L(f);
1068
- }
1069
- function K(a) {
1070
- if (!Array.isArray(a))
1071
- return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
1072
- "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
1073
- ) : o("Invalid argument supplied to oneOf, expected an array.")), s;
1074
- function f(E, m, h, O, g) {
1075
- for (var b = E[m], S = 0; S < a.length; S++)
1076
- if (D(b, a[S]))
1077
- return null;
1078
- var w = JSON.stringify(a, function(q, l) {
1079
- var H = z(l);
1080
- return H === "symbol" ? String(l) : l;
1081
- });
1082
- return new C("Invalid " + O + " `" + g + "` of value `" + String(b) + "` " + ("supplied to `" + h + "`, expected one of " + w + "."));
1083
- }
1084
- return L(f);
1085
- }
1086
- function ee(a) {
1087
- function f(E, m, h, O, g) {
1088
- if (typeof a != "function")
1089
- return new C("Property `" + g + "` of component `" + h + "` has invalid PropType notation inside objectOf.");
1090
- var b = E[m], S = U(b);
1091
- if (S !== "object")
1092
- return new C("Invalid " + O + " `" + g + "` of type " + ("`" + S + "` supplied to `" + h + "`, expected an object."));
1093
- for (var w in b)
1094
- if (r(b, w)) {
1095
- var R = a(b, w, h, O, g + "." + w, n);
1096
- if (R instanceof Error)
1097
- return R;
1098
- }
1099
- return null;
1100
- }
1101
- return L(f);
1102
- }
1103
- function se(a) {
1104
- if (!Array.isArray(a))
1105
- return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), s;
1106
- for (var f = 0; f < a.length; f++) {
1107
- var E = a[f];
1108
- if (typeof E != "function")
1109
- return o(
1110
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + F(E) + " at index " + f + "."
1111
- ), s;
1112
- }
1113
- function m(h, O, g, b, S) {
1114
- for (var w = [], R = 0; R < a.length; R++) {
1115
- var q = a[R], l = q(h, O, g, b, S, n);
1116
- if (l == null)
1117
- return null;
1118
- l.data && r(l.data, "expectedType") && w.push(l.data.expectedType);
1119
- }
1120
- var H = w.length > 0 ? ", expected one of type [" + w.join(", ") + "]" : "";
1121
- return new C("Invalid " + b + " `" + S + "` supplied to " + ("`" + g + "`" + H + "."));
1122
- }
1123
- return L(m);
1124
- }
1125
- function te() {
1126
- function a(f, E, m, h, O) {
1127
- return J(f[E]) ? null : new C("Invalid " + h + " `" + O + "` supplied to " + ("`" + m + "`, expected a ReactNode."));
1128
- }
1129
- return L(a);
1130
- }
1131
- function ne(a, f, E, m, h) {
1132
- return new C(
1133
- (a || "React class") + ": " + f + " type `" + E + "." + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + h + "`."
1134
- );
1135
- }
1136
- function oe(a) {
1137
- function f(E, m, h, O, g) {
1138
- var b = E[m], S = U(b);
1139
- if (S !== "object")
1140
- return new C("Invalid " + O + " `" + g + "` of type `" + S + "` " + ("supplied to `" + h + "`, expected `object`."));
1141
- for (var w in a) {
1142
- var R = a[w];
1143
- if (typeof R != "function")
1144
- return ne(h, O, g, w, z(R));
1145
- var q = R(b, w, h, O, g + "." + w, n);
1146
- if (q)
1147
- return q;
1148
- }
1149
- return null;
1150
- }
1151
- return L(f);
1152
- }
1153
- function ie(a) {
1154
- function f(E, m, h, O, g) {
1155
- var b = E[m], S = U(b);
1156
- if (S !== "object")
1157
- return new C("Invalid " + O + " `" + g + "` of type `" + S + "` " + ("supplied to `" + h + "`, expected `object`."));
1158
- var w = t({}, E[m], a);
1159
- for (var R in w) {
1160
- var q = a[R];
1161
- if (r(a, R) && typeof q != "function")
1162
- return ne(h, O, g, R, z(q));
1163
- if (!q)
1164
- return new C(
1165
- "Invalid " + O + " `" + g + "` key `" + R + "` supplied to `" + h + "`.\nBad object: " + JSON.stringify(E[m], null, " ") + `
1166
- Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
1167
- );
1168
- var l = q(b, R, h, O, g + "." + R, n);
1169
- if (l)
1170
- return l;
1171
- }
1172
- return null;
1173
- }
1174
- return L(f);
1175
- }
1176
- function J(a) {
1177
- switch (typeof a) {
1178
- case "number":
1179
- case "string":
1180
- case "undefined":
1181
- return !0;
1182
- case "boolean":
1183
- return !a;
1184
- case "object":
1185
- if (Array.isArray(a))
1186
- return a.every(J);
1187
- if (a === null || u(a))
1188
- return !0;
1189
- var f = y(a);
1190
- if (f) {
1191
- var E = f.call(a), m;
1192
- if (f !== a.entries) {
1193
- for (; !(m = E.next()).done; )
1194
- if (!J(m.value))
1195
- return !1;
1196
- } else
1197
- for (; !(m = E.next()).done; ) {
1198
- var h = m.value;
1199
- if (h && !J(h[1]))
1200
- return !1;
1201
- }
1202
- } else
1203
- return !1;
1204
- return !0;
1205
- default:
1206
- return !1;
1207
- }
1208
- }
1209
- function ue(a, f) {
1210
- return a === "symbol" ? !0 : f ? f["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && f instanceof Symbol : !1;
1211
- }
1212
- function U(a) {
1213
- var f = typeof a;
1214
- return Array.isArray(a) ? "array" : a instanceof RegExp ? "object" : ue(f, a) ? "symbol" : f;
1215
- }
1216
- function z(a) {
1217
- if (typeof a > "u" || a === null)
1218
- return "" + a;
1219
- var f = U(a);
1220
- if (f === "object") {
1221
- if (a instanceof Date)
1222
- return "date";
1223
- if (a instanceof RegExp)
1224
- return "regexp";
1225
- }
1226
- return f;
1227
- }
1228
- function F(a) {
1229
- var f = z(a);
1230
- switch (f) {
1231
- case "array":
1232
- case "object":
1233
- return "an " + f;
1234
- case "boolean":
1235
- case "date":
1236
- case "regexp":
1237
- return "a " + f;
1238
- default:
1239
- return f;
1240
- }
1241
- }
1242
- function ce(a) {
1243
- return !a.constructor || !a.constructor.name ? x : a.constructor.name;
1244
- }
1245
- return _.checkPropTypes = i, _.resetWarningCache = i.resetWarningCache, _.PropTypes = _, _;
1246
- }, Ye;
1247
- }
1248
- var He, St;
1249
- function ar() {
1250
- if (St) return He;
1251
- St = 1;
1252
- var e = /* @__PURE__ */ rt();
1253
- function t() {
1254
- }
1255
- function n() {
1256
- }
1257
- return n.resetWarningCache = t, He = function() {
1258
- function r(s, u, d, p, v, y) {
1259
- if (y !== e) {
1260
- var x = new Error(
1261
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
1262
- );
1263
- throw x.name = "Invariant Violation", x;
1264
- }
1265
- }
1266
- r.isRequired = r;
1267
- function i() {
1268
- return r;
1269
- }
1270
- var o = {
1271
- array: r,
1272
- bigint: r,
1273
- bool: r,
1274
- func: r,
1275
- number: r,
1276
- object: r,
1277
- string: r,
1278
- symbol: r,
1279
- any: r,
1280
- arrayOf: i,
1281
- element: r,
1282
- elementType: r,
1283
- instanceOf: i,
1284
- node: r,
1285
- objectOf: i,
1286
- oneOf: i,
1287
- oneOfType: i,
1288
- shape: i,
1289
- exact: i,
1290
- checkPropTypes: n,
1291
- resetWarningCache: t
1292
- };
1293
- return o.PropTypes = o, o;
1294
- }, He;
1295
- }
1296
- var wt;
1297
- function sr() {
1298
- if (wt) return Pe.exports;
1299
- if (wt = 1, process.env.NODE_ENV !== "production") {
1300
- var e = Dt(), t = !0;
1301
- Pe.exports = /* @__PURE__ */ ir()(e.isElement, t);
1302
- } else
1303
- Pe.exports = /* @__PURE__ */ ar()();
1304
- return Pe.exports;
1305
- }
1306
- var ur = /* @__PURE__ */ sr();
1307
- const T = /* @__PURE__ */ Zt(ur), Ct = {
1308
- disabled: !1
1309
- };
1310
- var cr = process.env.NODE_ENV !== "production" ? T.oneOfType([T.number, T.shape({
1311
- enter: T.number,
1312
- exit: T.number,
1313
- appear: T.number
1314
- }).isRequired]) : null;
1315
- process.env.NODE_ENV !== "production" && T.oneOfType([T.string, T.shape({
1316
- enter: T.string,
1317
- exit: T.string,
1318
- active: T.string
1319
- }), T.shape({
1320
- enter: T.string,
1321
- enterDone: T.string,
1322
- enterActive: T.string,
1323
- exit: T.string,
1324
- exitDone: T.string,
1325
- exitActive: T.string
1326
- })]);
1327
- const It = pe.createContext(null);
1328
- var lr = function(t) {
1329
- return t.scrollTop;
1330
- }, Se = "unmounted", le = "exited", ae = "entering", de = "entered", Je = "exiting", re = /* @__PURE__ */ (function(e) {
1331
- er(t, e);
1332
- function t(r, i) {
1333
- var o;
1334
- o = e.call(this, r, i) || this;
1335
- var s = i, u = s && !s.isMounting ? r.enter : r.appear, d;
1336
- return o.appearStatus = null, r.in ? u ? (d = le, o.appearStatus = ae) : d = de : r.unmountOnExit || r.mountOnEnter ? d = Se : d = le, o.state = {
1337
- status: d
1338
- }, o.nextCallback = null, o;
1339
- }
1340
- t.getDerivedStateFromProps = function(i, o) {
1341
- var s = i.in;
1342
- return s && o.status === Se ? {
1343
- status: le
1344
- } : null;
1345
- };
1346
- var n = t.prototype;
1347
- return n.componentDidMount = function() {
1348
- this.updateStatus(!0, this.appearStatus);
1349
- }, n.componentDidUpdate = function(i) {
1350
- var o = null;
1351
- if (i !== this.props) {
1352
- var s = this.state.status;
1353
- this.props.in ? s !== ae && s !== de && (o = ae) : (s === ae || s === de) && (o = Je);
1354
- }
1355
- this.updateStatus(!1, o);
1356
- }, n.componentWillUnmount = function() {
1357
- this.cancelNextCallback();
1358
- }, n.getTimeouts = function() {
1359
- var i = this.props.timeout, o, s, u;
1360
- return o = s = u = i, i != null && typeof i != "number" && (o = i.exit, s = i.enter, u = i.appear !== void 0 ? i.appear : s), {
1361
- exit: o,
1362
- enter: s,
1363
- appear: u
1364
- };
1365
- }, n.updateStatus = function(i, o) {
1366
- if (i === void 0 && (i = !1), o !== null)
1367
- if (this.cancelNextCallback(), o === ae) {
1368
- if (this.props.unmountOnExit || this.props.mountOnEnter) {
1369
- var s = this.props.nodeRef ? this.props.nodeRef.current : ge.findDOMNode(this);
1370
- s && lr(s);
1371
- }
1372
- this.performEnter(i);
1373
- } else
1374
- this.performExit();
1375
- else this.props.unmountOnExit && this.state.status === le && this.setState({
1376
- status: Se
1377
- });
1378
- }, n.performEnter = function(i) {
1379
- var o = this, s = this.props.enter, u = this.context ? this.context.isMounting : i, d = this.props.nodeRef ? [u] : [ge.findDOMNode(this), u], p = d[0], v = d[1], y = this.getTimeouts(), x = u ? y.appear : y.enter;
1380
- if (!i && !s || Ct.disabled) {
1381
- this.safeSetState({
1382
- status: de
1383
- }, function() {
1384
- o.props.onEntered(p);
1385
- });
1386
- return;
1387
- }
1388
- this.props.onEnter(p, v), this.safeSetState({
1389
- status: ae
1390
- }, function() {
1391
- o.props.onEntering(p, v), o.onTransitionEnd(x, function() {
1392
- o.safeSetState({
1393
- status: de
1394
- }, function() {
1395
- o.props.onEntered(p, v);
1396
- });
1397
- });
1398
- });
1399
- }, n.performExit = function() {
1400
- var i = this, o = this.props.exit, s = this.getTimeouts(), u = this.props.nodeRef ? void 0 : ge.findDOMNode(this);
1401
- if (!o || Ct.disabled) {
1402
- this.safeSetState({
1403
- status: le
1404
- }, function() {
1405
- i.props.onExited(u);
1406
- });
1407
- return;
1408
- }
1409
- this.props.onExit(u), this.safeSetState({
1410
- status: Je
1411
- }, function() {
1412
- i.props.onExiting(u), i.onTransitionEnd(s.exit, function() {
1413
- i.safeSetState({
1414
- status: le
1415
- }, function() {
1416
- i.props.onExited(u);
1417
- });
1418
- });
1419
- });
1420
- }, n.cancelNextCallback = function() {
1421
- this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
1422
- }, n.safeSetState = function(i, o) {
1423
- o = this.setNextCallback(o), this.setState(i, o);
1424
- }, n.setNextCallback = function(i) {
1425
- var o = this, s = !0;
1426
- return this.nextCallback = function(u) {
1427
- s && (s = !1, o.nextCallback = null, i(u));
1428
- }, this.nextCallback.cancel = function() {
1429
- s = !1;
1430
- }, this.nextCallback;
1431
- }, n.onTransitionEnd = function(i, o) {
1432
- this.setNextCallback(o);
1433
- var s = this.props.nodeRef ? this.props.nodeRef.current : ge.findDOMNode(this), u = i == null && !this.props.addEndListener;
1434
- if (!s || u) {
1435
- setTimeout(this.nextCallback, 0);
1436
- return;
1437
- }
1438
- if (this.props.addEndListener) {
1439
- var d = this.props.nodeRef ? [this.nextCallback] : [s, this.nextCallback], p = d[0], v = d[1];
1440
- this.props.addEndListener(p, v);
1441
- }
1442
- i != null && setTimeout(this.nextCallback, i);
1443
- }, n.render = function() {
1444
- var i = this.state.status;
1445
- if (i === Se)
1446
- return null;
1447
- var o = this.props, s = o.children;
1448
- o.in, o.mountOnEnter, o.unmountOnExit, o.appear, o.enter, o.exit, o.timeout, o.addEndListener, o.onEnter, o.onEntering, o.onEntered, o.onExit, o.onExiting, o.onExited, o.nodeRef;
1449
- var u = Qn(o, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
1450
- return (
1451
- // allows for nested Transitions
1452
- /* @__PURE__ */ pe.createElement(It.Provider, {
1453
- value: null
1454
- }, typeof s == "function" ? s(i, u) : pe.cloneElement(pe.Children.only(s), u))
1455
- );
1456
- }, t;
1457
- })(pe.Component);
1458
- re.contextType = It;
1459
- re.propTypes = process.env.NODE_ENV !== "production" ? {
1460
- /**
1461
- * A React reference to DOM element that need to transition:
1462
- * https://stackoverflow.com/a/51127130/4671932
1463
- *
1464
- * - When `nodeRef` prop is used, `node` is not passed to callback functions
1465
- * (e.g. `onEnter`) because user already has direct access to the node.
1466
- * - When changing `key` prop of `Transition` in a `TransitionGroup` a new
1467
- * `nodeRef` need to be provided to `Transition` with changed `key` prop
1468
- * (see
1469
- * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
1470
- */
1471
- nodeRef: T.shape({
1472
- current: typeof Element > "u" ? T.any : function(e, t, n, r, i, o) {
1473
- var s = e[t];
1474
- return T.instanceOf(s && "ownerDocument" in s ? s.ownerDocument.defaultView.Element : Element)(e, t, n, r, i, o);
1475
- }
1476
- }),
1477
- /**
1478
- * A `function` child can be used instead of a React element. This function is
1479
- * called with the current transition status (`'entering'`, `'entered'`,
1480
- * `'exiting'`, `'exited'`), which can be used to apply context
1481
- * specific props to a component.
1482
- *
1483
- * ```jsx
1484
- * <Transition in={this.state.in} timeout={150}>
1485
- * {state => (
1486
- * <MyComponent className={`fade fade-${state}`} />
1487
- * )}
1488
- * </Transition>
1489
- * ```
1490
- */
1491
- children: T.oneOfType([T.func.isRequired, T.element.isRequired]).isRequired,
1492
- /**
1493
- * Show the component; triggers the enter or exit states
1494
- */
1495
- in: T.bool,
1496
- /**
1497
- * By default the child component is mounted immediately along with
1498
- * the parent `Transition` component. If you want to "lazy mount" the component on the
1499
- * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
1500
- * mounted, even on "exited", unless you also specify `unmountOnExit`.
1501
- */
1502
- mountOnEnter: T.bool,
1503
- /**
1504
- * By default the child component stays mounted after it reaches the `'exited'` state.
1505
- * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
1506
- */
1507
- unmountOnExit: T.bool,
1508
- /**
1509
- * By default the child component does not perform the enter transition when
1510
- * it first mounts, regardless of the value of `in`. If you want this
1511
- * behavior, set both `appear` and `in` to `true`.
1512
- *
1513
- * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
1514
- * > only adds an additional enter transition. However, in the
1515
- * > `<CSSTransition>` component that first enter transition does result in
1516
- * > additional `.appear-*` classes, that way you can choose to style it
1517
- * > differently.
1518
- */
1519
- appear: T.bool,
1520
- /**
1521
- * Enable or disable enter transitions.
1522
- */
1523
- enter: T.bool,
1524
- /**
1525
- * Enable or disable exit transitions.
1526
- */
1527
- exit: T.bool,
1528
- /**
1529
- * The duration of the transition, in milliseconds.
1530
- * Required unless `addEndListener` is provided.
1531
- *
1532
- * You may specify a single timeout for all transitions:
1533
- *
1534
- * ```jsx
1535
- * timeout={500}
1536
- * ```
1537
- *
1538
- * or individually:
1539
- *
1540
- * ```jsx
1541
- * timeout={{
1542
- * appear: 500,
1543
- * enter: 300,
1544
- * exit: 500,
1545
- * }}
1546
- * ```
1547
- *
1548
- * - `appear` defaults to the value of `enter`
1549
- * - `enter` defaults to `0`
1550
- * - `exit` defaults to `0`
1551
- *
1552
- * @type {number | { enter?: number, exit?: number, appear?: number }}
1553
- */
1554
- timeout: function(t) {
1555
- var n = cr;
1556
- t.addEndListener || (n = n.isRequired);
1557
- for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
1558
- i[o - 1] = arguments[o];
1559
- return n.apply(void 0, [t].concat(i));
1560
- },
1561
- /**
1562
- * Add a custom transition end trigger. Called with the transitioning
1563
- * DOM node and a `done` callback. Allows for more fine grained transition end
1564
- * logic. Timeouts are still used as a fallback if provided.
1565
- *
1566
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
1567
- *
1568
- * ```jsx
1569
- * addEndListener={(node, done) => {
1570
- * // use the css transitionend event to mark the finish of a transition
1571
- * node.addEventListener('transitionend', done, false);
1572
- * }}
1573
- * ```
1574
- */
1575
- addEndListener: T.func,
1576
- /**
1577
- * Callback fired before the "entering" status is applied. An extra parameter
1578
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
1579
- *
1580
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
1581
- *
1582
- * @type Function(node: HtmlElement, isAppearing: bool) -> void
1583
- */
1584
- onEnter: T.func,
1585
- /**
1586
- * Callback fired after the "entering" status is applied. An extra parameter
1587
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
1588
- *
1589
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
1590
- *
1591
- * @type Function(node: HtmlElement, isAppearing: bool)
1592
- */
1593
- onEntering: T.func,
1594
- /**
1595
- * Callback fired after the "entered" status is applied. An extra parameter
1596
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
1597
- *
1598
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
1599
- *
1600
- * @type Function(node: HtmlElement, isAppearing: bool) -> void
1601
- */
1602
- onEntered: T.func,
1603
- /**
1604
- * Callback fired before the "exiting" status is applied.
1605
- *
1606
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
1607
- *
1608
- * @type Function(node: HtmlElement) -> void
1609
- */
1610
- onExit: T.func,
1611
- /**
1612
- * Callback fired after the "exiting" status is applied.
1613
- *
1614
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
1615
- *
1616
- * @type Function(node: HtmlElement) -> void
1617
- */
1618
- onExiting: T.func,
1619
- /**
1620
- * Callback fired after the "exited" status is applied.
1621
- *
1622
- * **Note**: when `nodeRef` prop is passed, `node` is not passed
1623
- *
1624
- * @type Function(node: HtmlElement) -> void
1625
- */
1626
- onExited: T.func
1627
- } : {};
1628
- function Ee() {
1629
- }
1630
- re.defaultProps = {
1631
- in: !1,
1632
- mountOnEnter: !1,
1633
- unmountOnExit: !1,
1634
- appear: !1,
1635
- enter: !0,
1636
- exit: !0,
1637
- onEnter: Ee,
1638
- onEntering: Ee,
1639
- onEntered: Ee,
1640
- onExit: Ee,
1641
- onExiting: Ee,
1642
- onExited: Ee
1643
- };
1644
- re.UNMOUNTED = Se;
1645
- re.EXITED = le;
1646
- re.ENTERING = ae;
1647
- re.ENTERED = de;
1648
- re.EXITING = Je;
1649
- function _t(e, t) {
1650
- const n = ve(e, t) || "", r = n.indexOf("ms") === -1 ? 1e3 : 1;
1651
- return parseFloat(n) * r;
1652
- }
1653
- function fr(e, t) {
1654
- const n = _t(e, "transitionDuration"), r = _t(e, "transitionDelay"), i = At(e, (o) => {
1655
- o.target === e && (i(), t(o));
1656
- }, n + r);
1657
- }
1658
- function dr(e) {
1659
- e.offsetHeight;
1660
- }
1661
- function pr(e) {
1662
- return e && "setState" in e ? ge.findDOMNode(e) : e ?? null;
1663
- }
1664
- const Lt = /* @__PURE__ */ pe.forwardRef(({
1665
- onEnter: e,
1666
- onEntering: t,
1667
- onEntered: n,
1668
- onExit: r,
1669
- onExiting: i,
1670
- onExited: o,
1671
- addEndListener: s,
1672
- children: u,
1673
- childRef: d,
1674
- ...p
1675
- }, v) => {
1676
- const y = W(null), x = Pt(y, d), _ = (Y) => {
1677
- x(pr(Y));
1678
- }, D = (Y) => (K) => {
1679
- Y && y.current && Y(y.current, K);
1680
- }, C = B(D(e), [e]), L = B(D(t), [t]), $ = B(D(n), [n]), G = B(D(r), [r]), I = B(D(i), [i]), j = B(D(o), [o]), c = B(D(s), [s]);
1681
- return /* @__PURE__ */ N.jsx(re, {
1682
- ref: v,
1683
- ...p,
1684
- onEnter: C,
1685
- onEntered: $,
1686
- onEntering: L,
1687
- onExit: G,
1688
- onExited: j,
1689
- onExiting: I,
1690
- addEndListener: c,
1691
- nodeRef: y,
1692
- children: typeof u == "function" ? (Y, K) => (
1693
- // TODO: Types for RTG missing innerProps, so need to cast.
1694
- u(Y, {
1695
- ...K,
1696
- ref: _
1697
- })
1698
- ) : /* @__PURE__ */ pe.cloneElement(u, {
1699
- ref: _
1700
- })
1701
- });
1702
- });
1703
- Lt.displayName = "TransitionWrapper";
1704
- const vr = {
1705
- [ae]: "show",
1706
- [de]: "show"
1707
- }, ot = /* @__PURE__ */ V.forwardRef(({
1708
- className: e,
1709
- children: t,
1710
- transitionClasses: n = {},
1711
- onEnter: r,
1712
- ...i
1713
- }, o) => {
1714
- const s = {
1715
- in: !1,
1716
- timeout: 300,
1717
- mountOnEnter: !1,
1718
- unmountOnExit: !1,
1719
- appear: !1,
1720
- ...i
1721
- }, u = B((d, p) => {
1722
- dr(d), r?.(d, p);
1723
- }, [r]);
1724
- return /* @__PURE__ */ N.jsx(Lt, {
1725
- ref: o,
1726
- addEndListener: fr,
1727
- ...s,
1728
- onEnter: u,
1729
- childRef: De(t),
1730
- children: (d, p) => /* @__PURE__ */ V.cloneElement(t, {
1731
- ...p,
1732
- className: Q("fade", e, t.props.className, vr[d], n[d])
1733
- })
1734
- });
1735
- });
1736
- ot.displayName = "Fade";
1737
- const hr = ["xxl", "xl", "lg", "md", "sm", "xs"], mr = "xs", we = /* @__PURE__ */ V.createContext({
1738
- prefixes: {},
1739
- breakpoints: hr,
1740
- minBreakpoint: mr
1741
- }), {
1742
- Consumer: Cr,
1743
- Provider: _r
1744
- } = we;
1745
- function Re(e, t) {
1746
- const {
1747
- prefixes: n
1748
- } = Te(we);
1749
- return e || n[t] || t;
1750
- }
1751
- function Mr() {
1752
- const {
1753
- breakpoints: e
1754
- } = Te(we);
1755
- return e;
1756
- }
1757
- function Pr() {
1758
- const {
1759
- minBreakpoint: e
1760
- } = Te(we);
1761
- return e;
1762
- }
1763
- function yr() {
1764
- const {
1765
- dir: e
1766
- } = Te(we);
1767
- return e === "rtl";
1768
- }
1769
- const $t = /* @__PURE__ */ V.forwardRef(({
1770
- className: e,
1771
- bsPrefix: t,
1772
- as: n = "div",
1773
- ...r
1774
- }, i) => (t = Re(t, "modal-body"), /* @__PURE__ */ N.jsx(n, {
1775
- ref: i,
1776
- className: Q(e, t),
1777
- ...r
1778
- })));
1779
- $t.displayName = "ModalBody";
1780
- const Ft = /* @__PURE__ */ V.createContext({
1781
- onHide() {
1782
- }
1783
- }), it = /* @__PURE__ */ V.forwardRef(({
1784
- bsPrefix: e,
1785
- className: t,
1786
- contentClassName: n,
1787
- centered: r,
1788
- size: i,
1789
- fullscreen: o,
1790
- children: s,
1791
- scrollable: u,
1792
- ...d
1793
- }, p) => {
1794
- e = Re(e, "modal");
1795
- const v = `${e}-dialog`, y = typeof o == "string" ? `${e}-fullscreen-${o}` : `${e}-fullscreen`;
1796
- return /* @__PURE__ */ N.jsx("div", {
1797
- ...d,
1798
- ref: p,
1799
- className: Q(v, t, i && `${e}-${i}`, r && `${v}-centered`, u && `${v}-scrollable`, o && y),
1800
- children: /* @__PURE__ */ N.jsx("div", {
1801
- className: Q(`${e}-content`, n),
1802
- children: s
1803
- })
1804
- });
1805
- });
1806
- it.displayName = "ModalDialog";
1807
- const Bt = /* @__PURE__ */ V.forwardRef(({
1808
- className: e,
1809
- bsPrefix: t,
1810
- as: n = "div",
1811
- ...r
1812
- }, i) => (t = Re(t, "modal-footer"), /* @__PURE__ */ N.jsx(n, {
1813
- ref: i,
1814
- className: Q(e, t),
1815
- ...r
1816
- })));
1817
- Bt.displayName = "ModalFooter";
1818
- const Er = {
1819
- /** An accessible label indicating the relevant information about the Close Button. */
1820
- "aria-label": T.string,
1821
- /** A callback fired after the Close Button is clicked. */
1822
- onClick: T.func,
1823
- /**
1824
- * Render different color variant for the button.
1825
- *
1826
- * Omitting this will render the default dark color.
1827
- */
1828
- variant: T.oneOf(["white"])
1829
- }, at = /* @__PURE__ */ V.forwardRef(({
1830
- className: e,
1831
- variant: t,
1832
- "aria-label": n = "Close",
1833
- ...r
1834
- }, i) => /* @__PURE__ */ N.jsx("button", {
1835
- ref: i,
1836
- type: "button",
1837
- className: Q("btn-close", t && `btn-close-${t}`, e),
1838
- "aria-label": n,
1839
- ...r
1840
- }));
1841
- at.displayName = "CloseButton";
1842
- at.propTypes = Er;
1843
- const Wt = /* @__PURE__ */ V.forwardRef(({
1844
- closeLabel: e = "Close",
1845
- closeVariant: t,
1846
- closeButton: n = !1,
1847
- onHide: r,
1848
- children: i,
1849
- ...o
1850
- }, s) => {
1851
- const u = Te(Ft), d = Ke(() => {
1852
- u?.onHide(), r?.();
1853
- });
1854
- return /* @__PURE__ */ N.jsxs("div", {
1855
- ref: s,
1856
- ...o,
1857
- children: [i, n && /* @__PURE__ */ N.jsx(at, {
1858
- "aria-label": e,
1859
- variant: t,
1860
- onClick: d
1861
- })]
1862
- });
1863
- });
1864
- Wt.displayName = "AbstractModalHeader";
1865
- const Ut = /* @__PURE__ */ V.forwardRef(({
1866
- bsPrefix: e,
1867
- className: t,
1868
- closeLabel: n = "Close",
1869
- closeButton: r = !1,
1870
- ...i
1871
- }, o) => (e = Re(e, "modal-header"), /* @__PURE__ */ N.jsx(Wt, {
1872
- ref: o,
1873
- ...i,
1874
- className: Q(t, e),
1875
- closeLabel: n,
1876
- closeButton: r
1877
- })));
1878
- Ut.displayName = "ModalHeader";
1879
- const gr = ((e) => (
1880
- // eslint-disable-next-line react/display-name
1881
- /* @__PURE__ */ V.forwardRef((t, n) => /* @__PURE__ */ N.jsx("div", {
1882
- ...t,
1883
- ref: n,
1884
- className: Q(t.className, e)
1885
- }))
1886
- )), br = gr("h4"), qt = /* @__PURE__ */ V.forwardRef(({
1887
- className: e,
1888
- bsPrefix: t,
1889
- as: n = br,
1890
- ...r
1891
- }, i) => (t = Re(t, "modal-title"), /* @__PURE__ */ N.jsx(n, {
1892
- ref: i,
1893
- className: Q(e, t),
1894
- ...r
1895
- })));
1896
- qt.displayName = "ModalTitle";
1897
- function Tr(e) {
1898
- return /* @__PURE__ */ N.jsx(ot, {
1899
- ...e,
1900
- timeout: null
1901
- });
1902
- }
1903
- function xr(e) {
1904
- return /* @__PURE__ */ N.jsx(ot, {
1905
- ...e,
1906
- timeout: null
1907
- });
1908
- }
1909
- const Yt = /* @__PURE__ */ V.forwardRef(({
1910
- bsPrefix: e,
1911
- className: t,
1912
- style: n,
1913
- dialogClassName: r,
1914
- contentClassName: i,
1915
- children: o,
1916
- dialogAs: s = it,
1917
- "data-bs-theme": u,
1918
- "aria-labelledby": d,
1919
- "aria-describedby": p,
1920
- "aria-label": v,
1921
- /* BaseModal props */
1922
- show: y = !1,
1923
- animation: x = !0,
1924
- backdrop: _ = !0,
1925
- keyboard: D = !0,
1926
- onEscapeKeyDown: C,
1927
- onShow: L,
1928
- onHide: $,
1929
- container: G,
1930
- autoFocus: I = !0,
1931
- enforceFocus: j = !0,
1932
- restoreFocus: c = !0,
1933
- restoreFocusOptions: Y,
1934
- onEntered: K,
1935
- onExit: ee,
1936
- onExiting: se,
1937
- onEnter: te,
1938
- onEntering: ne,
1939
- onExited: oe,
1940
- backdropClassName: ie,
1941
- manager: J,
1942
- ...ue
1943
- }, U) => {
1944
- const [z, F] = be({}), [ce, a] = be(!1), f = W(!1), E = W(!1), m = W(null), [h, O] = rn(), g = Pt(U, O), b = Ke($), S = yr();
1945
- e = Re(e, "modal");
1946
- const w = Ze(() => ({
1947
- onHide: b
1948
- }), [b]);
1949
- function R() {
1950
- return J || Zn({
1951
- isRTL: S
1952
- });
1953
- }
1954
- function q(M) {
1955
- if (!xe) return;
1956
- const he = R().getScrollbarWidth() > 0, ut = M.scrollHeight > Ne(M).documentElement.clientHeight;
1957
- F({
1958
- paddingRight: he && !ut ? ct() : void 0,
1959
- paddingLeft: !he && ut ? ct() : void 0
1960
- });
1961
- }
1962
- const l = Ke(() => {
1963
- h && q(h.dialog);
1964
- });
1965
- un(() => {
1966
- Ge(window, "resize", l), m.current == null || m.current();
1967
- });
1968
- const H = () => {
1969
- f.current = !0;
1970
- }, Z = (M) => {
1971
- f.current && h && M.target === h.dialog && (E.current = !0), f.current = !1;
1972
- }, k = () => {
1973
- a(!0), m.current = At(h.dialog, () => {
1974
- a(!1);
1975
- });
1976
- }, Ce = (M) => {
1977
- M.target === M.currentTarget && k();
1978
- }, Oe = (M) => {
1979
- if (_ === "static") {
1980
- Ce(M);
1981
- return;
1982
- }
1983
- if (E.current || M.target !== M.currentTarget) {
1984
- E.current = !1;
1985
- return;
1986
- }
1987
- $?.();
1988
- }, Ht = (M) => {
1989
- D ? C?.(M) : (M.preventDefault(), _ === "static" && k());
1990
- }, Vt = (M, he) => {
1991
- M && q(M), te?.(M, he);
1992
- }, zt = (M) => {
1993
- m.current == null || m.current(), ee?.(M);
1994
- }, Gt = (M, he) => {
1995
- ne?.(M, he), Mt(window, "resize", l);
1996
- }, Kt = (M) => {
1997
- M && (M.style.display = ""), oe?.(M), Ge(window, "resize", l);
1998
- }, Xt = B((M) => /* @__PURE__ */ N.jsx("div", {
1999
- ...M,
2000
- className: Q(`${e}-backdrop`, ie, !x && "show")
2001
- }), [x, ie, e]), st = {
2002
- ...n,
2003
- ...z
2004
- };
2005
- st.display = "block";
2006
- const Jt = (M) => /* @__PURE__ */ N.jsx("div", {
2007
- role: "dialog",
2008
- ...M,
2009
- style: st,
2010
- className: Q(t, e, ce && `${e}-static`, !x && "show"),
2011
- onClick: _ ? Oe : void 0,
2012
- onMouseUp: Z,
2013
- "data-bs-theme": u,
2014
- "aria-label": v,
2015
- "aria-labelledby": d,
2016
- "aria-describedby": p,
2017
- children: /* @__PURE__ */ N.jsx(s, {
2018
- ...ue,
2019
- onMouseDown: H,
2020
- className: r,
2021
- contentClassName: i,
2022
- children: o
2023
- })
2024
- });
2025
- return /* @__PURE__ */ N.jsx(Ft.Provider, {
2026
- value: w,
2027
- children: /* @__PURE__ */ N.jsx(Vn, {
2028
- show: y,
2029
- ref: g,
2030
- backdrop: _,
2031
- container: G,
2032
- keyboard: !0,
2033
- autoFocus: I,
2034
- enforceFocus: j,
2035
- restoreFocus: c,
2036
- restoreFocusOptions: Y,
2037
- onEscapeKeyDown: Ht,
2038
- onShow: L,
2039
- onHide: $,
2040
- onEnter: Vt,
2041
- onEntering: Gt,
2042
- onEntered: K,
2043
- onExit: zt,
2044
- onExiting: se,
2045
- onExited: Kt,
2046
- manager: R(),
2047
- transition: x ? Tr : void 0,
2048
- backdropTransition: x ? xr : void 0,
2049
- renderBackdrop: Xt,
2050
- renderDialog: Jt
2051
- })
2052
- });
2053
- });
2054
- Yt.displayName = "Modal";
2055
- const Ar = Object.assign(Yt, {
2056
- Body: $t,
2057
- Header: Ut,
2058
- Title: qt,
2059
- Footer: Bt,
2060
- Dialog: it,
2061
- TRANSITION_DURATION: 300,
2062
- BACKDROP_TRANSITION_DURATION: 150
2063
- });
2064
- export {
2065
- ot as F,
2066
- Ar as M,
2067
- T as P,
2068
- Mr as a,
2069
- Pr as b,
2070
- un as c,
2071
- gn as d,
2072
- ft as e,
2073
- fe as f,
2074
- nt as g,
2075
- Cn as h,
2076
- An as i,
2077
- yr as j,
2078
- zn as k,
2079
- je as l,
2080
- Pt as m,
2081
- Ke as n,
2082
- Ne as o,
2083
- De as p,
2084
- ht as r,
2085
- pr as s,
2086
- Re as u
2087
- };