@inertiaui/modal-react 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/inertiaui-modal.js +117 -117
- package/dist/inertiaui-modal.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/HeadlessModal.jsx +2 -2
package/dist/inertiaui-modal.js
CHANGED
|
@@ -2,7 +2,7 @@ var Ga = Object.defineProperty;
|
|
|
2
2
|
var Ka = (e, t, r) => t in e ? Ga(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var Oe = (e, t, r) => Ka(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import * as Rt from "react";
|
|
5
|
-
import
|
|
5
|
+
import F, { createContext as he, useState as Q, useContext as fe, forwardRef as En, useMemo as ne, useEffect as oe, useImperativeHandle as Zo, useLayoutEffect as Ja, useRef as U, Fragment as we, isValidElement as Ya, cloneElement as Xa, createElement as Qa, useId as It, useSyncExternalStore as Za, useCallback as Fe, useReducer as es, createRef as ts } from "react";
|
|
6
6
|
import { router as ei } from "@inertiajs/react";
|
|
7
7
|
import { createPortal as rs } from "react-dom";
|
|
8
8
|
const zt = {
|
|
@@ -97,7 +97,7 @@ var ro;
|
|
|
97
97
|
function ss() {
|
|
98
98
|
if (ro) return Et;
|
|
99
99
|
ro = 1;
|
|
100
|
-
var e =
|
|
100
|
+
var e = F, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
101
101
|
function a(s, l, f) {
|
|
102
102
|
var u, y = {}, h = null, v = null;
|
|
103
103
|
f !== void 0 && (h = "" + f), l.key !== void 0 && (h = "" + l.key), l.ref !== void 0 && (v = l.ref);
|
|
@@ -120,7 +120,7 @@ var St = {};
|
|
|
120
120
|
var no;
|
|
121
121
|
function ls() {
|
|
122
122
|
return no || (no = 1, process.env.NODE_ENV !== "production" && function() {
|
|
123
|
-
var e =
|
|
123
|
+
var e = F, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), s = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), c = Symbol.iterator, p = "@@iterator";
|
|
124
124
|
function m(d) {
|
|
125
125
|
if (d === null || typeof d != "object")
|
|
126
126
|
return null;
|
|
@@ -448,14 +448,14 @@ function ls() {
|
|
|
448
448
|
if (Pa(d))
|
|
449
449
|
return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ra(d)), Vn(d);
|
|
450
450
|
}
|
|
451
|
-
var wt = b.ReactCurrentOwner,
|
|
451
|
+
var wt = b.ReactCurrentOwner, Fa = {
|
|
452
452
|
key: !0,
|
|
453
453
|
ref: !0,
|
|
454
454
|
__self: !0,
|
|
455
455
|
__source: !0
|
|
456
|
-
}, Gn, Kn,
|
|
457
|
-
|
|
458
|
-
function
|
|
456
|
+
}, Gn, Kn, Fr;
|
|
457
|
+
Fr = {};
|
|
458
|
+
function Ca(d) {
|
|
459
459
|
if (bt.call(d, "ref")) {
|
|
460
460
|
var w = Object.getOwnPropertyDescriptor(d, "ref").get;
|
|
461
461
|
if (w && w.isReactWarning)
|
|
@@ -474,7 +474,7 @@ function ls() {
|
|
|
474
474
|
function _a(d, w) {
|
|
475
475
|
if (typeof d.ref == "string" && wt.current && w && wt.current.stateNode !== w) {
|
|
476
476
|
var O = R(wt.current.type);
|
|
477
|
-
|
|
477
|
+
Fr[O] || (E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', R(wt.current.type), d.ref), Fr[O] = !0);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
function Na(d, w) {
|
|
@@ -531,9 +531,9 @@ function ls() {
|
|
|
531
531
|
function La(d, w, O, P, k) {
|
|
532
532
|
{
|
|
533
533
|
var B, I = {}, _ = null, ae = null;
|
|
534
|
-
O !== void 0 && (zn(O), _ = "" + O), $a(w) && (zn(w.key), _ = "" + w.key),
|
|
534
|
+
O !== void 0 && (zn(O), _ = "" + O), $a(w) && (zn(w.key), _ = "" + w.key), Ca(w) && (ae = w.ref, _a(w, k));
|
|
535
535
|
for (B in w)
|
|
536
|
-
bt.call(w, B) && !
|
|
536
|
+
bt.call(w, B) && !Fa.hasOwnProperty(B) && (I[B] = w[B]);
|
|
537
537
|
if (d && d.defaultProps) {
|
|
538
538
|
var z = d.defaultProps;
|
|
539
539
|
for (B in z)
|
|
@@ -546,7 +546,7 @@ function ls() {
|
|
|
546
546
|
return Ia(d, _, ae, k, P, wt.current, I);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
var
|
|
549
|
+
var Cr = b.ReactCurrentOwner, Jn = b.ReactDebugCurrentFrame;
|
|
550
550
|
function rt(d) {
|
|
551
551
|
if (d) {
|
|
552
552
|
var w = d._owner, O = qt(d.type, d._source, w ? w.type : null);
|
|
@@ -561,8 +561,8 @@ function ls() {
|
|
|
561
561
|
}
|
|
562
562
|
function Yn() {
|
|
563
563
|
{
|
|
564
|
-
if (
|
|
565
|
-
var d = R(
|
|
564
|
+
if (Cr.current) {
|
|
565
|
+
var d = R(Cr.current.type);
|
|
566
566
|
if (d)
|
|
567
567
|
return `
|
|
568
568
|
|
|
@@ -597,7 +597,7 @@ Check the top-level render call using <` + O + ">.");
|
|
|
597
597
|
return;
|
|
598
598
|
Xn[O] = !0;
|
|
599
599
|
var P = "";
|
|
600
|
-
d && d._owner && d._owner !==
|
|
600
|
+
d && d._owner && d._owner !== Cr.current && (P = " It was passed a child from " + R(d._owner.type) + "."), rt(d), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', O, P), rt(null);
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
function Zn(d, w) {
|
|
@@ -779,7 +779,7 @@ const Ts = (e, t, r, { allOwnKeys: n } = {}) => (Lt(t, (o, i) => {
|
|
|
779
779
|
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
780
780
|
value: t.prototype
|
|
781
781
|
}), r && Object.assign(e.prototype, r);
|
|
782
|
-
},
|
|
782
|
+
}, Fs = (e, t, r, n) => {
|
|
783
783
|
let o, i, a;
|
|
784
784
|
const s = {};
|
|
785
785
|
if (t = t || {}, e == null) return t;
|
|
@@ -789,7 +789,7 @@ const Ts = (e, t, r, { allOwnKeys: n } = {}) => (Lt(t, (o, i) => {
|
|
|
789
789
|
e = r !== !1 && Sn(e);
|
|
790
790
|
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
791
791
|
return t;
|
|
792
|
-
},
|
|
792
|
+
}, Cs = (e, t, r) => {
|
|
793
793
|
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
794
794
|
const n = e.indexOf(t, r);
|
|
795
795
|
return n !== -1 && n === r;
|
|
@@ -918,10 +918,10 @@ const qs = (e) => {
|
|
|
918
918
|
trim: As,
|
|
919
919
|
stripBOM: Rs,
|
|
920
920
|
inherits: Ps,
|
|
921
|
-
toFlatObject:
|
|
921
|
+
toFlatObject: Fs,
|
|
922
922
|
kindOf: dr,
|
|
923
923
|
kindOfTest: Ee,
|
|
924
|
-
endsWith:
|
|
924
|
+
endsWith: Cs,
|
|
925
925
|
toArray: $s,
|
|
926
926
|
forEachEntry: Ns,
|
|
927
927
|
matchAll: Ds,
|
|
@@ -947,10 +947,10 @@ const qs = (e) => {
|
|
|
947
947
|
setImmediate: li,
|
|
948
948
|
asap: Gs
|
|
949
949
|
};
|
|
950
|
-
function
|
|
950
|
+
function C(e, t, r, n, o) {
|
|
951
951
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), r && (this.config = r), n && (this.request = n), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
952
952
|
}
|
|
953
|
-
g.inherits(
|
|
953
|
+
g.inherits(C, Error, {
|
|
954
954
|
toJSON: function() {
|
|
955
955
|
return {
|
|
956
956
|
// Standard
|
|
@@ -971,7 +971,7 @@ g.inherits(F, Error, {
|
|
|
971
971
|
};
|
|
972
972
|
}
|
|
973
973
|
});
|
|
974
|
-
const ui =
|
|
974
|
+
const ui = C.prototype, ci = {};
|
|
975
975
|
[
|
|
976
976
|
"ERR_BAD_OPTION_VALUE",
|
|
977
977
|
"ERR_BAD_OPTION",
|
|
@@ -989,13 +989,13 @@ const ui = F.prototype, ci = {};
|
|
|
989
989
|
].forEach((e) => {
|
|
990
990
|
ci[e] = { value: e };
|
|
991
991
|
});
|
|
992
|
-
Object.defineProperties(
|
|
992
|
+
Object.defineProperties(C, ci);
|
|
993
993
|
Object.defineProperty(ui, "isAxiosError", { value: !0 });
|
|
994
|
-
|
|
994
|
+
C.from = (e, t, r, n, o, i) => {
|
|
995
995
|
const a = Object.create(ui);
|
|
996
996
|
return g.toFlatObject(e, a, function(l) {
|
|
997
997
|
return l !== Error.prototype;
|
|
998
|
-
}, (s) => s !== "isAxiosError"),
|
|
998
|
+
}, (s) => s !== "isAxiosError"), C.call(a, e.message, t, r, n, o), a.cause = e, a.name = e.name, i && Object.assign(a, i), a;
|
|
999
999
|
};
|
|
1000
1000
|
const Ks = null;
|
|
1001
1001
|
function tn(e) {
|
|
@@ -1033,7 +1033,7 @@ function yr(e, t, r) {
|
|
|
1033
1033
|
if (g.isDate(c))
|
|
1034
1034
|
return c.toISOString();
|
|
1035
1035
|
if (!l && g.isBlob(c))
|
|
1036
|
-
throw new
|
|
1036
|
+
throw new C("Blob is not supported. Use a Buffer instead.");
|
|
1037
1037
|
return g.isArrayBuffer(c) || g.isTypedArray(c) ? l && typeof Blob == "function" ? new Blob([c]) : Buffer.from(c) : c;
|
|
1038
1038
|
}
|
|
1039
1039
|
function u(c, p, m) {
|
|
@@ -1279,7 +1279,7 @@ const Mt = {
|
|
|
1279
1279
|
return JSON.parse(t);
|
|
1280
1280
|
} catch (s) {
|
|
1281
1281
|
if (a)
|
|
1282
|
-
throw s.name === "SyntaxError" ?
|
|
1282
|
+
throw s.name === "SyntaxError" ? C.from(s, C.ERR_BAD_RESPONSE, this, null, this.response) : s;
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
1285
|
return t;
|
|
@@ -1514,16 +1514,16 @@ function hi(e) {
|
|
|
1514
1514
|
return !!(e && e.__CANCEL__);
|
|
1515
1515
|
}
|
|
1516
1516
|
function mt(e, t, r) {
|
|
1517
|
-
|
|
1517
|
+
C.call(this, e ?? "canceled", C.ERR_CANCELED, t, r), this.name = "CanceledError";
|
|
1518
1518
|
}
|
|
1519
|
-
g.inherits(mt,
|
|
1519
|
+
g.inherits(mt, C, {
|
|
1520
1520
|
__CANCEL__: !0
|
|
1521
1521
|
});
|
|
1522
1522
|
function vi(e, t, r) {
|
|
1523
1523
|
const n = r.config.validateStatus;
|
|
1524
|
-
!r.status || !n || n(r.status) ? e(r) : t(new
|
|
1524
|
+
!r.status || !n || n(r.status) ? e(r) : t(new C(
|
|
1525
1525
|
"Request failed with status code " + r.status,
|
|
1526
|
-
[
|
|
1526
|
+
[C.ERR_BAD_REQUEST, C.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
1527
1527
|
r.config,
|
|
1528
1528
|
r.request,
|
|
1529
1529
|
r
|
|
@@ -1773,15 +1773,15 @@ const bi = (e) => {
|
|
|
1773
1773
|
"onloadend" in m ? m.onloadend = b : m.onreadystatechange = function() {
|
|
1774
1774
|
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(b);
|
|
1775
1775
|
}, m.onabort = function() {
|
|
1776
|
-
m && (n(new
|
|
1776
|
+
m && (n(new C("Request aborted", C.ECONNABORTED, e, m)), m = null);
|
|
1777
1777
|
}, m.onerror = function() {
|
|
1778
|
-
n(new
|
|
1778
|
+
n(new C("Network Error", C.ERR_NETWORK, e, m)), m = null;
|
|
1779
1779
|
}, m.ontimeout = function() {
|
|
1780
1780
|
let x = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1781
1781
|
const A = o.transitional || mi;
|
|
1782
|
-
o.timeoutErrorMessage && (x = o.timeoutErrorMessage), n(new
|
|
1782
|
+
o.timeoutErrorMessage && (x = o.timeoutErrorMessage), n(new C(
|
|
1783
1783
|
x,
|
|
1784
|
-
A.clarifyTimeoutError ?
|
|
1784
|
+
A.clarifyTimeoutError ? C.ETIMEDOUT : C.ECONNABORTED,
|
|
1785
1785
|
e,
|
|
1786
1786
|
m
|
|
1787
1787
|
)), m = null;
|
|
@@ -1792,7 +1792,7 @@ const bi = (e) => {
|
|
|
1792
1792
|
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
1793
1793
|
const E = hl(o.url);
|
|
1794
1794
|
if (E && ue.protocols.indexOf(E) === -1) {
|
|
1795
|
-
n(new
|
|
1795
|
+
n(new C("Unsupported protocol " + E + ":", C.ERR_BAD_REQUEST, e));
|
|
1796
1796
|
return;
|
|
1797
1797
|
}
|
|
1798
1798
|
m.send(i || null);
|
|
@@ -1805,11 +1805,11 @@ const bi = (e) => {
|
|
|
1805
1805
|
if (!o) {
|
|
1806
1806
|
o = !0, s();
|
|
1807
1807
|
const u = f instanceof Error ? f : this.reason;
|
|
1808
|
-
n.abort(u instanceof
|
|
1808
|
+
n.abort(u instanceof C ? u : new mt(u instanceof Error ? u.message : u));
|
|
1809
1809
|
}
|
|
1810
1810
|
};
|
|
1811
1811
|
let a = t && setTimeout(() => {
|
|
1812
|
-
a = null, i(new
|
|
1812
|
+
a = null, i(new C(`timeout ${t} of ms exceeded`, C.ETIMEDOUT));
|
|
1813
1813
|
}, t);
|
|
1814
1814
|
const s = () => {
|
|
1815
1815
|
e && (a && clearTimeout(a), a = null, e.forEach((f) => {
|
|
@@ -1877,13 +1877,13 @@ const bi = (e) => {
|
|
|
1877
1877
|
}, {
|
|
1878
1878
|
highWaterMark: 2
|
|
1879
1879
|
});
|
|
1880
|
-
}, hr = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", wi = hr && typeof ReadableStream == "function",
|
|
1880
|
+
}, hr = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", wi = hr && typeof ReadableStream == "function", Fl = hr && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Ei = (e, ...t) => {
|
|
1881
1881
|
try {
|
|
1882
1882
|
return !!e(...t);
|
|
1883
1883
|
} catch {
|
|
1884
1884
|
return !1;
|
|
1885
1885
|
}
|
|
1886
|
-
},
|
|
1886
|
+
}, Cl = wi && Ei(() => {
|
|
1887
1887
|
let e = !1;
|
|
1888
1888
|
const t = new Request(ue.origin, {
|
|
1889
1889
|
body: new ReadableStream(),
|
|
@@ -1899,7 +1899,7 @@ const bi = (e) => {
|
|
|
1899
1899
|
hr && ((e) => {
|
|
1900
1900
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1901
1901
|
!rr[t] && (rr[t] = g.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
|
|
1902
|
-
throw new
|
|
1902
|
+
throw new C(`Response type '${t}' is not supported`, C.ERR_NOT_SUPPORT, n);
|
|
1903
1903
|
});
|
|
1904
1904
|
});
|
|
1905
1905
|
})(new Response());
|
|
@@ -1916,7 +1916,7 @@ const $l = async (e) => {
|
|
|
1916
1916
|
if (g.isArrayBufferView(e) || g.isArrayBuffer(e))
|
|
1917
1917
|
return e.byteLength;
|
|
1918
1918
|
if (g.isURLSearchParams(e) && (e = e + ""), g.isString(e))
|
|
1919
|
-
return (await
|
|
1919
|
+
return (await Fl(e)).byteLength;
|
|
1920
1920
|
}, _l = async (e, t) => {
|
|
1921
1921
|
const r = g.toFiniteNumber(e.getContentLength());
|
|
1922
1922
|
return r ?? $l(t);
|
|
@@ -1942,7 +1942,7 @@ const $l = async (e) => {
|
|
|
1942
1942
|
});
|
|
1943
1943
|
let m;
|
|
1944
1944
|
try {
|
|
1945
|
-
if (l &&
|
|
1945
|
+
if (l && Cl && r !== "get" && r !== "head" && (m = await _l(u, n)) !== 0) {
|
|
1946
1946
|
let A = new Request(t, {
|
|
1947
1947
|
method: "POST",
|
|
1948
1948
|
body: n,
|
|
@@ -1999,11 +1999,11 @@ const $l = async (e) => {
|
|
|
1999
1999
|
});
|
|
2000
2000
|
} catch (b) {
|
|
2001
2001
|
throw p && p(), b && b.name === "TypeError" && /fetch/i.test(b.message) ? Object.assign(
|
|
2002
|
-
new
|
|
2002
|
+
new C("Network Error", C.ERR_NETWORK, e, c),
|
|
2003
2003
|
{
|
|
2004
2004
|
cause: b.cause || b
|
|
2005
2005
|
}
|
|
2006
|
-
) :
|
|
2006
|
+
) : C.from(b, b && b.code, e, c);
|
|
2007
2007
|
}
|
|
2008
2008
|
}), on = {
|
|
2009
2009
|
http: Ks,
|
|
@@ -2029,7 +2029,7 @@ const ho = (e) => `- ${e}`, Dl = (e) => g.isFunction(e) || e === null || e === !
|
|
|
2029
2029
|
r = e[i];
|
|
2030
2030
|
let a;
|
|
2031
2031
|
if (n = r, !Dl(r) && (n = on[(a = String(r)).toLowerCase()], n === void 0))
|
|
2032
|
-
throw new
|
|
2032
|
+
throw new C(`Unknown adapter '${a}'`);
|
|
2033
2033
|
if (n)
|
|
2034
2034
|
break;
|
|
2035
2035
|
o[a || "#" + i] = n;
|
|
@@ -2041,7 +2041,7 @@ const ho = (e) => `- ${e}`, Dl = (e) => g.isFunction(e) || e === null || e === !
|
|
|
2041
2041
|
let a = t ? i.length > 1 ? `since :
|
|
2042
2042
|
` + i.map(ho).join(`
|
|
2043
2043
|
`) : " " + ho(i[0]) : "as no adapter specified";
|
|
2044
|
-
throw new
|
|
2044
|
+
throw new C(
|
|
2045
2045
|
"There is no suitable adapter to dispatch the request " + a,
|
|
2046
2046
|
"ERR_NOT_SUPPORT"
|
|
2047
2047
|
);
|
|
@@ -2085,9 +2085,9 @@ An.transitional = function(t, r, n) {
|
|
|
2085
2085
|
}
|
|
2086
2086
|
return (i, a, s) => {
|
|
2087
2087
|
if (t === !1)
|
|
2088
|
-
throw new
|
|
2088
|
+
throw new C(
|
|
2089
2089
|
o(a, " has been removed" + (r ? " in " + r : "")),
|
|
2090
|
-
|
|
2090
|
+
C.ERR_DEPRECATED
|
|
2091
2091
|
);
|
|
2092
2092
|
return r && !go[a] && (go[a] = !0, console.warn(
|
|
2093
2093
|
o(
|
|
@@ -2099,7 +2099,7 @@ An.transitional = function(t, r, n) {
|
|
|
2099
2099
|
};
|
|
2100
2100
|
function Il(e, t, r) {
|
|
2101
2101
|
if (typeof e != "object")
|
|
2102
|
-
throw new
|
|
2102
|
+
throw new C("options must be an object", C.ERR_BAD_OPTION_VALUE);
|
|
2103
2103
|
const n = Object.keys(e);
|
|
2104
2104
|
let o = n.length;
|
|
2105
2105
|
for (; o-- > 0; ) {
|
|
@@ -2107,11 +2107,11 @@ function Il(e, t, r) {
|
|
|
2107
2107
|
if (a) {
|
|
2108
2108
|
const s = e[i], l = s === void 0 || a(s, i, e);
|
|
2109
2109
|
if (l !== !0)
|
|
2110
|
-
throw new
|
|
2110
|
+
throw new C("option " + i + " must be " + l, C.ERR_BAD_OPTION_VALUE);
|
|
2111
2111
|
continue;
|
|
2112
2112
|
}
|
|
2113
2113
|
if (r !== !0)
|
|
2114
|
-
throw new
|
|
2114
|
+
throw new C("Unknown option " + i, C.ERR_BAD_OPTION);
|
|
2115
2115
|
}
|
|
2116
2116
|
}
|
|
2117
2117
|
const an = {
|
|
@@ -2401,7 +2401,7 @@ G.CancelToken = Tn;
|
|
|
2401
2401
|
G.isCancel = hi;
|
|
2402
2402
|
G.VERSION = xi;
|
|
2403
2403
|
G.toFormData = yr;
|
|
2404
|
-
G.AxiosError =
|
|
2404
|
+
G.AxiosError = C;
|
|
2405
2405
|
G.Cancel = G.CanceledError;
|
|
2406
2406
|
G.all = function(t) {
|
|
2407
2407
|
return Promise.all(t);
|
|
@@ -2590,7 +2590,7 @@ if (Xe)
|
|
|
2590
2590
|
}
|
|
2591
2591
|
var Br = function() {
|
|
2592
2592
|
throw new lt();
|
|
2593
|
-
},
|
|
2593
|
+
}, Fu = Xe ? function() {
|
|
2594
2594
|
try {
|
|
2595
2595
|
return arguments.callee, Br;
|
|
2596
2596
|
} catch {
|
|
@@ -2600,7 +2600,7 @@ var Br = function() {
|
|
|
2600
2600
|
return Br;
|
|
2601
2601
|
}
|
|
2602
2602
|
}
|
|
2603
|
-
}() : Br, it = uu(),
|
|
2603
|
+
}() : Br, it = uu(), Cu = fu(), ee = Object.getPrototypeOf || (Cu ? function(e) {
|
|
2604
2604
|
return e.__proto__;
|
|
2605
2605
|
} : null), st = {}, $u = typeof Uint8Array > "u" || !ee ? N : ee(Uint8Array), Qe = {
|
|
2606
2606
|
__proto__: null,
|
|
@@ -2660,7 +2660,7 @@ var Br = function() {
|
|
|
2660
2660
|
"%StringIteratorPrototype%": it && ee ? ee(""[Symbol.iterator]()) : N,
|
|
2661
2661
|
"%Symbol%": it ? Symbol : N,
|
|
2662
2662
|
"%SyntaxError%": ct,
|
|
2663
|
-
"%ThrowTypeError%":
|
|
2663
|
+
"%ThrowTypeError%": Fu,
|
|
2664
2664
|
"%TypedArray%": $u,
|
|
2665
2665
|
"%TypeError%": lt,
|
|
2666
2666
|
"%Uint8Array%": typeof Uint8Array > "u" ? N : Uint8Array,
|
|
@@ -2801,7 +2801,7 @@ var Nu = function e(t) {
|
|
|
2801
2801
|
}
|
|
2802
2802
|
}
|
|
2803
2803
|
return s;
|
|
2804
|
-
},
|
|
2804
|
+
}, Fi = { exports: {} }, Ur, Oo;
|
|
2805
2805
|
function Pn() {
|
|
2806
2806
|
if (Oo) return Ur;
|
|
2807
2807
|
Oo = 1;
|
|
@@ -2821,7 +2821,7 @@ if (Zt)
|
|
|
2821
2821
|
} catch {
|
|
2822
2822
|
Zt = null;
|
|
2823
2823
|
}
|
|
2824
|
-
var
|
|
2824
|
+
var Ci = Zt, Ao = Pn(), Wu = Ri, at = kt, To = Ci, Hu = function(t, r, n) {
|
|
2825
2825
|
if (!t || typeof t != "object" && typeof t != "function")
|
|
2826
2826
|
throw new at("`obj` must be an object or a function`");
|
|
2827
2827
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -2858,11 +2858,11 @@ $i.hasArrayLengthDefineBug = function() {
|
|
|
2858
2858
|
return !0;
|
|
2859
2859
|
}
|
|
2860
2860
|
};
|
|
2861
|
-
var qu = $i, Vu = yt, Ro = Hu, zu = qu(), Po =
|
|
2861
|
+
var qu = $i, Vu = yt, Ro = Hu, zu = qu(), Po = Ci, Fo = kt, Gu = Vu("%Math.floor%"), Ku = function(t, r) {
|
|
2862
2862
|
if (typeof t != "function")
|
|
2863
|
-
throw new
|
|
2863
|
+
throw new Fo("`fn` is not a function");
|
|
2864
2864
|
if (typeof r != "number" || r < 0 || r > 4294967295 || Gu(r) !== r)
|
|
2865
|
-
throw new
|
|
2865
|
+
throw new Fo("`length` must be a positive 32-bit integer");
|
|
2866
2866
|
var n = arguments.length > 2 && !!arguments[2], o = !0, i = !0;
|
|
2867
2867
|
if ("length" in t && Po) {
|
|
2868
2868
|
var a = Po(t, "length");
|
|
@@ -2898,8 +2898,8 @@ var qu = $i, Vu = yt, Ro = Hu, zu = qu(), Po = Fi, Co = kt, Gu = Vu("%Math.floor
|
|
|
2898
2898
|
return s(t, i, arguments);
|
|
2899
2899
|
};
|
|
2900
2900
|
l ? l(e.exports, "apply", { value: u }) : e.exports.apply = u;
|
|
2901
|
-
})(
|
|
2902
|
-
var Ju =
|
|
2901
|
+
})(Fi);
|
|
2902
|
+
var Ju = Fi.exports, _i = yt, Ni = Ju, Yu = Ni(_i("String.prototype.indexOf")), Xu = function(t, r) {
|
|
2903
2903
|
var n = _i(t, !!r);
|
|
2904
2904
|
return typeof n == "function" && Yu(t, ".prototype.") > -1 ? Ni(n) : n;
|
|
2905
2905
|
};
|
|
@@ -2907,7 +2907,7 @@ const Qu = {}, Zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
2907
2907
|
__proto__: null,
|
|
2908
2908
|
default: Qu
|
|
2909
2909
|
}, Symbol.toStringTag, { value: "Module" })), ec = /* @__PURE__ */ as(Zu);
|
|
2910
|
-
var
|
|
2910
|
+
var Fn = typeof Map == "function" && Map.prototype, Wr = Object.getOwnPropertyDescriptor && Fn ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, ir = Fn && Wr && typeof Wr.get == "function" ? Wr.get : null, Co = Fn && Map.prototype.forEach, Cn = typeof Set == "function" && Set.prototype, Hr = Object.getOwnPropertyDescriptor && Cn ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, ar = Cn && Hr && typeof Hr.get == "function" ? Hr.get : null, $o = Cn && Set.prototype.forEach, tc = typeof WeakMap == "function" && WeakMap.prototype, Pt = tc ? WeakMap.prototype.has : null, rc = typeof WeakSet == "function" && WeakSet.prototype, Ft = rc ? WeakSet.prototype.has : null, nc = typeof WeakRef == "function" && WeakRef.prototype, _o = nc ? WeakRef.prototype.deref : null, oc = Boolean.prototype.valueOf, ic = Object.prototype.toString, ac = Function.prototype.toString, sc = String.prototype.match, $n = String.prototype.slice, Me = String.prototype.replace, lc = String.prototype.toUpperCase, No = String.prototype.toLowerCase, Di = RegExp.prototype.test, Do = Array.prototype.concat, Re = Array.prototype.join, uc = Array.prototype.slice, Io = Math.floor, un = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, qr = Object.getOwnPropertySymbols, cn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, ft = typeof Symbol == "function" && typeof Symbol.iterator == "object", ie = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === ft || !0) ? Symbol.toStringTag : null, Ii = Object.prototype.propertyIsEnumerable, Lo = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(e) {
|
|
2911
2911
|
return e.__proto__;
|
|
2912
2912
|
} : null);
|
|
2913
2913
|
function Mo(e, t) {
|
|
@@ -3003,7 +3003,7 @@ var fn = ec, ko = fn.custom, jo = Mi(ko) ? ko : null, cc = function e(t, r, n, o
|
|
|
3003
3003
|
}
|
|
3004
3004
|
if (wc(t)) {
|
|
3005
3005
|
var A = [];
|
|
3006
|
-
return
|
|
3006
|
+
return Co && Co.call(t, function(R, M) {
|
|
3007
3007
|
A.push(h(M, t, !0) + " => " + h(R, t));
|
|
3008
3008
|
}), Uo("Map", ir.call(t), A, y);
|
|
3009
3009
|
}
|
|
@@ -3131,7 +3131,7 @@ function Ec(e) {
|
|
|
3131
3131
|
try {
|
|
3132
3132
|
Pt.call(e, Pt);
|
|
3133
3133
|
try {
|
|
3134
|
-
|
|
3134
|
+
Ft.call(e, Ft);
|
|
3135
3135
|
} catch {
|
|
3136
3136
|
return !0;
|
|
3137
3137
|
}
|
|
@@ -3165,10 +3165,10 @@ function xc(e) {
|
|
|
3165
3165
|
return !1;
|
|
3166
3166
|
}
|
|
3167
3167
|
function Oc(e) {
|
|
3168
|
-
if (!
|
|
3168
|
+
if (!Ft || !e || typeof e != "object")
|
|
3169
3169
|
return !1;
|
|
3170
3170
|
try {
|
|
3171
|
-
|
|
3171
|
+
Ft.call(e, Ft);
|
|
3172
3172
|
try {
|
|
3173
3173
|
Pt.call(e, Pt);
|
|
3174
3174
|
} catch {
|
|
@@ -3258,7 +3258,7 @@ function Gt(e, t) {
|
|
|
3258
3258
|
Ii.call(e, i[f]) && n.push("[" + t(i[f]) + "]: " + t(e[i[f]], e));
|
|
3259
3259
|
return n;
|
|
3260
3260
|
}
|
|
3261
|
-
var Bi = yt, ht = Xu,
|
|
3261
|
+
var Bi = yt, ht = Xu, Fc = cc, Cc = kt, Kt = Bi("%WeakMap%", !0), Jt = Bi("%Map%", !0), $c = ht("WeakMap.prototype.get", !0), _c = ht("WeakMap.prototype.set", !0), Nc = ht("WeakMap.prototype.has", !0), Dc = ht("Map.prototype.get", !0), Ic = ht("Map.prototype.set", !0), Lc = ht("Map.prototype.has", !0), _n = function(e, t) {
|
|
3262
3262
|
for (var r = e, n; (n = r.next) !== null; r = n)
|
|
3263
3263
|
if (n.key === t)
|
|
3264
3264
|
return r.next = n.next, n.next = /** @type {NonNullable<typeof list.next>} */
|
|
@@ -3281,7 +3281,7 @@ var Bi = yt, ht = Xu, Cc = cc, Fc = kt, Kt = Bi("%WeakMap%", !0), Jt = Bi("%Map%
|
|
|
3281
3281
|
var t, r, n, o = {
|
|
3282
3282
|
assert: function(i) {
|
|
3283
3283
|
if (!o.has(i))
|
|
3284
|
-
throw new
|
|
3284
|
+
throw new Cc("Side channel does not contain " + Fc(i));
|
|
3285
3285
|
},
|
|
3286
3286
|
get: function(i) {
|
|
3287
3287
|
if (Kt && i && (typeof i == "object" || typeof i == "function")) {
|
|
@@ -3442,7 +3442,7 @@ var Bi = yt, ht = Xu, Cc = cc, Fc = kt, Kt = Bi("%WeakMap%", !0), Jt = Bi("%Map%
|
|
|
3442
3442
|
isRegExp: Yc,
|
|
3443
3443
|
maybeMap: Zc,
|
|
3444
3444
|
merge: Vc
|
|
3445
|
-
}, Hi = Bc, er = Wi,
|
|
3445
|
+
}, Hi = Bc, er = Wi, Ct = Nn, ef = Object.prototype.hasOwnProperty, qi = {
|
|
3446
3446
|
brackets: function(t) {
|
|
3447
3447
|
return t + "[]";
|
|
3448
3448
|
},
|
|
@@ -3455,7 +3455,7 @@ var Bi = yt, ht = Xu, Cc = cc, Fc = kt, Kt = Bi("%WeakMap%", !0), Jt = Bi("%Map%
|
|
|
3455
3455
|
}
|
|
3456
3456
|
}, Te = Array.isArray, tf = Array.prototype.push, Vi = function(e, t) {
|
|
3457
3457
|
tf.apply(e, Te(t) ? t : [t]);
|
|
3458
|
-
}, rf = Date.prototype.toISOString, Wo =
|
|
3458
|
+
}, rf = Date.prototype.toISOString, Wo = Ct.default, X = {
|
|
3459
3459
|
addQueryPrefix: !1,
|
|
3460
3460
|
allowDots: !1,
|
|
3461
3461
|
allowEmptyArrays: !1,
|
|
@@ -3468,7 +3468,7 @@ var Bi = yt, ht = Xu, Cc = cc, Fc = kt, Kt = Bi("%WeakMap%", !0), Jt = Bi("%Map%
|
|
|
3468
3468
|
encoder: er.encode,
|
|
3469
3469
|
encodeValuesOnly: !1,
|
|
3470
3470
|
format: Wo,
|
|
3471
|
-
formatter:
|
|
3471
|
+
formatter: Ct.formatters[Wo],
|
|
3472
3472
|
// deprecated
|
|
3473
3473
|
indices: !1,
|
|
3474
3474
|
serializeDate: function(t) {
|
|
@@ -3558,13 +3558,13 @@ var Bi = yt, ht = Xu, Cc = cc, Fc = kt, Kt = Bi("%WeakMap%", !0), Jt = Bi("%Map%
|
|
|
3558
3558
|
var r = t.charset || X.charset;
|
|
3559
3559
|
if (typeof t.charset < "u" && t.charset !== "utf-8" && t.charset !== "iso-8859-1")
|
|
3560
3560
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
3561
|
-
var n =
|
|
3561
|
+
var n = Ct.default;
|
|
3562
3562
|
if (typeof t.format < "u") {
|
|
3563
|
-
if (!ef.call(
|
|
3563
|
+
if (!ef.call(Ct.formatters, t.format))
|
|
3564
3564
|
throw new TypeError("Unknown format option provided.");
|
|
3565
3565
|
n = t.format;
|
|
3566
3566
|
}
|
|
3567
|
-
var o =
|
|
3567
|
+
var o = Ct.formatters[n], i = X.filter;
|
|
3568
3568
|
(typeof t.filter == "function" || Te(t.filter)) && (i = t.filter);
|
|
3569
3569
|
var a;
|
|
3570
3570
|
if (t.arrayFormat in qi ? a = t.arrayFormat : "indices" in t ? a = t.indices ? "indices" : "repeat" : a = X.arrayFormat, "commaRoundTrip" in t && typeof t.commaRoundTrip != "boolean")
|
|
@@ -4076,10 +4076,10 @@ const hp = ({ children: e }) => {
|
|
|
4076
4076
|
e,
|
|
4077
4077
|
t.length > 0 && /* @__PURE__ */ D.jsx(Gi, { index: 0 })
|
|
4078
4078
|
] });
|
|
4079
|
-
}, In =
|
|
4079
|
+
}, In = F.createContext(null);
|
|
4080
4080
|
In.displayName = "ModalIndexContext";
|
|
4081
4081
|
const Sf = () => {
|
|
4082
|
-
const e =
|
|
4082
|
+
const e = F.useContext(In);
|
|
4083
4083
|
if (e === void 0)
|
|
4084
4084
|
throw new Error("useModalIndex must be used within a ModalIndexProvider");
|
|
4085
4085
|
return e;
|
|
@@ -4124,8 +4124,8 @@ const Sf = () => {
|
|
|
4124
4124
|
emit: (...v) => u.emit(...v),
|
|
4125
4125
|
getChildModal: () => u.getChildModal(),
|
|
4126
4126
|
getParentModal: () => u.getParentModal(),
|
|
4127
|
-
index: u.index,
|
|
4128
|
-
isOpen: u.open,
|
|
4127
|
+
index: u == null ? void 0 : u.index,
|
|
4128
|
+
isOpen: u == null ? void 0 : u.open,
|
|
4129
4129
|
modalContext: u,
|
|
4130
4130
|
modalProps: h,
|
|
4131
4131
|
reload: () => u.reload(),
|
|
@@ -4252,7 +4252,7 @@ function tt(e) {
|
|
|
4252
4252
|
}
|
|
4253
4253
|
let q = function(e) {
|
|
4254
4254
|
let t = tt(e);
|
|
4255
|
-
return
|
|
4255
|
+
return F.useCallback((...r) => t.current(...r), [t]);
|
|
4256
4256
|
}, Tf = he(void 0);
|
|
4257
4257
|
function Rf() {
|
|
4258
4258
|
return fe(Tf);
|
|
@@ -4349,14 +4349,14 @@ function Xr(e, t = []) {
|
|
|
4349
4349
|
for (let n of t) n in r && delete r[n];
|
|
4350
4350
|
return r;
|
|
4351
4351
|
}
|
|
4352
|
-
let
|
|
4352
|
+
let Ff = "span";
|
|
4353
4353
|
var ur = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(ur || {});
|
|
4354
|
-
function
|
|
4354
|
+
function Cf(e, t) {
|
|
4355
4355
|
var r;
|
|
4356
4356
|
let { features: n = 1, ...o } = e, i = { ref: t, "aria-hidden": (n & 2) === 2 ? !0 : (r = o["aria-hidden"]) != null ? r : void 0, hidden: (n & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(n & 4) === 4 && (n & 2) !== 2 && { display: "none" } } };
|
|
4357
|
-
return ve({ ourProps: i, theirProps: o, slot: {}, defaultTag:
|
|
4357
|
+
return ve({ ourProps: i, theirProps: o, slot: {}, defaultTag: Ff, name: "Hidden" });
|
|
4358
4358
|
}
|
|
4359
|
-
let hn = de(
|
|
4359
|
+
let hn = de(Cf), Xi = Symbol();
|
|
4360
4360
|
function $f(e, t = !0) {
|
|
4361
4361
|
return Object.assign(e, { [Xi]: t });
|
|
4362
4362
|
}
|
|
@@ -4387,7 +4387,7 @@ function _f() {
|
|
|
4387
4387
|
let s = a.slice(), l = s.indexOf(i);
|
|
4388
4388
|
return l !== -1 && s.splice(l, 1), s;
|
|
4389
4389
|
}))), o = ne(() => ({ register: n, slot: r.slot, name: r.name, props: r.props, value: r.value }), [n, r.slot, r.name, r.props, r.value]);
|
|
4390
|
-
return
|
|
4390
|
+
return F.createElement(Mn.Provider, { value: o }, r.children);
|
|
4391
4391
|
}, [t])];
|
|
4392
4392
|
}
|
|
4393
4393
|
let Nf = "p";
|
|
@@ -4402,7 +4402,7 @@ var Zi = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backs
|
|
|
4402
4402
|
let Mf = he(() => {
|
|
4403
4403
|
});
|
|
4404
4404
|
function kf({ value: e, children: t }) {
|
|
4405
|
-
return
|
|
4405
|
+
return F.createElement(Mf.Provider, { value: e }, t);
|
|
4406
4406
|
}
|
|
4407
4407
|
let jf = class extends Map {
|
|
4408
4408
|
constructor(t) {
|
|
@@ -4499,7 +4499,7 @@ function Wf(e, t, r) {
|
|
|
4499
4499
|
}, [t, n, e]);
|
|
4500
4500
|
}
|
|
4501
4501
|
let cr = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(","), Hf = ["[data-autofocus]"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
|
|
4502
|
-
var
|
|
4502
|
+
var Ce = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e[e.AutoFocus = 64] = "AutoFocus", e))(Ce || {}), gn = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(gn || {}), qf = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(qf || {});
|
|
4503
4503
|
function Vf(e = document.body) {
|
|
4504
4504
|
return e == null ? [] : Array.from(e.querySelectorAll(cr)).sort((t, r) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
4505
4505
|
}
|
|
@@ -4599,7 +4599,7 @@ function oa(e, t, r, n) {
|
|
|
4599
4599
|
}
|
|
4600
4600
|
const Go = 30;
|
|
4601
4601
|
function ed(e, t, r) {
|
|
4602
|
-
let n = vt(e, "outside-click"), o = tt(r), i =
|
|
4602
|
+
let n = vt(e, "outside-click"), o = tt(r), i = Fe(function(l, f) {
|
|
4603
4603
|
if (l.defaultPrevented) return;
|
|
4604
4604
|
let u = f(l);
|
|
4605
4605
|
if (u === null || !u.getRootNode().contains(u) || !u.isConnected) return;
|
|
@@ -4740,7 +4740,7 @@ function ad(e, t, r = () => [document.body]) {
|
|
|
4740
4740
|
});
|
|
4741
4741
|
}
|
|
4742
4742
|
function sd(e = 0) {
|
|
4743
|
-
let [t, r] = Q(e), n =
|
|
4743
|
+
let [t, r] = Q(e), n = Fe((l) => r(l), [t]), o = Fe((l) => r((f) => f | l), [t]), i = Fe((l) => (t & l) === l, [t]), a = Fe((l) => r((f) => f & ~l), [r]), s = Fe((l) => r((f) => f ^ l), [r]);
|
|
4744
4744
|
return { flags: t, setFlag: n, addFlag: o, hasFlag: i, removeFlag: a, toggleFlag: s };
|
|
4745
4745
|
}
|
|
4746
4746
|
var Ko, Jo;
|
|
@@ -4820,10 +4820,10 @@ function Er() {
|
|
|
4820
4820
|
return fe(wr);
|
|
4821
4821
|
}
|
|
4822
4822
|
function md({ value: e, children: t }) {
|
|
4823
|
-
return
|
|
4823
|
+
return F.createElement(wr.Provider, { value: e }, t);
|
|
4824
4824
|
}
|
|
4825
4825
|
function yd({ children: e }) {
|
|
4826
|
-
return
|
|
4826
|
+
return F.createElement(wr.Provider, { value: null }, e);
|
|
4827
4827
|
}
|
|
4828
4828
|
function hd(e) {
|
|
4829
4829
|
function t() {
|
|
@@ -4864,7 +4864,7 @@ function gd() {
|
|
|
4864
4864
|
return fe(sa);
|
|
4865
4865
|
}
|
|
4866
4866
|
function Yo(e) {
|
|
4867
|
-
return
|
|
4867
|
+
return F.createElement(sa.Provider, { value: e.force }, e.children);
|
|
4868
4868
|
}
|
|
4869
4869
|
function bd(e) {
|
|
4870
4870
|
let t = gd(), r = fe(ua), n = Bt(e), [o, i] = Q(() => {
|
|
@@ -4901,12 +4901,12 @@ let la = we, wd = de(function(e, t) {
|
|
|
4901
4901
|
});
|
|
4902
4902
|
function Ed(e, t) {
|
|
4903
4903
|
let r = Pe(t), { enabled: n = !0, ...o } = e;
|
|
4904
|
-
return n ?
|
|
4904
|
+
return n ? F.createElement(wd, { ...o, ref: r }) : ve({ ourProps: { ref: r }, theirProps: o, slot: {}, defaultTag: la, name: "Portal" });
|
|
4905
4905
|
}
|
|
4906
4906
|
let Sd = we, ua = he(null);
|
|
4907
4907
|
function xd(e, t) {
|
|
4908
4908
|
let { target: r, ...n } = e, o = { ref: Pe(t) };
|
|
4909
|
-
return
|
|
4909
|
+
return F.createElement(ua.Provider, { value: r }, ve({ ourProps: o, theirProps: n, defaultTag: Sd, name: "Popover.Group" }));
|
|
4910
4910
|
}
|
|
4911
4911
|
let bn = he(null);
|
|
4912
4912
|
function Od() {
|
|
@@ -4915,7 +4915,7 @@ function Od() {
|
|
|
4915
4915
|
a !== -1 && t.current.splice(a, 1), e && e.unregister(i);
|
|
4916
4916
|
}), o = ne(() => ({ register: r, unregister: n, portals: t }), [r, n, t]);
|
|
4917
4917
|
return [t, ne(() => function({ children: i }) {
|
|
4918
|
-
return
|
|
4918
|
+
return F.createElement(bn.Provider, { value: o }, i);
|
|
4919
4919
|
}, [o])];
|
|
4920
4920
|
}
|
|
4921
4921
|
let Ad = de(Ed), ca = de(xd), Td = Object.assign(Ad, { Group: ca });
|
|
@@ -4936,7 +4936,7 @@ function Pd() {
|
|
|
4936
4936
|
return t.addEventListener("change", o), () => t.removeEventListener("change", o);
|
|
4937
4937
|
}, [t]), r;
|
|
4938
4938
|
}
|
|
4939
|
-
function
|
|
4939
|
+
function Fd({ defaultContainers: e = [], portals: t, mainTreeNode: r } = {}) {
|
|
4940
4940
|
let n = Bt(r), o = q(() => {
|
|
4941
4941
|
var i, a;
|
|
4942
4942
|
let s = [];
|
|
@@ -4950,7 +4950,7 @@ function Cd({ defaultContainers: e = [], portals: t, mainTreeNode: r } = {}) {
|
|
|
4950
4950
|
let fa = he(null);
|
|
4951
4951
|
function Xo({ children: e, node: t }) {
|
|
4952
4952
|
let [r, n] = Q(null), o = da(t ?? r);
|
|
4953
|
-
return
|
|
4953
|
+
return F.createElement(fa.Provider, { value: o }, e, o === null && F.createElement(hn, { features: ur.Hidden, ref: (i) => {
|
|
4954
4954
|
var a, s;
|
|
4955
4955
|
if (i) {
|
|
4956
4956
|
for (let l of (s = (a = gr(i)) == null ? void 0 : a.querySelectorAll("html > *, body > *")) != null ? s : []) if (l !== document.body && l !== document.head && l instanceof HTMLElement && l != null && l.contains(i)) {
|
|
@@ -4971,7 +4971,7 @@ function jn() {
|
|
|
4971
4971
|
}), []), e;
|
|
4972
4972
|
}
|
|
4973
4973
|
var Tt = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(Tt || {});
|
|
4974
|
-
function
|
|
4974
|
+
function Cd() {
|
|
4975
4975
|
let e = U(0);
|
|
4976
4976
|
return oa(!0, "keydown", (t) => {
|
|
4977
4977
|
t.key === "Tab" && (e.current = t.shiftKey ? 1 : 0);
|
|
@@ -4993,13 +4993,13 @@ function _d(e, t) {
|
|
|
4993
4993
|
Ld(s, { ownerDocument: f });
|
|
4994
4994
|
let u = Md(s, { ownerDocument: f, container: r, initialFocus: o, initialFocusFallback: i });
|
|
4995
4995
|
kd(s, { ownerDocument: f, container: r, containers: a, previousActiveElement: u });
|
|
4996
|
-
let y =
|
|
4996
|
+
let y = Cd(), h = q((b) => {
|
|
4997
4997
|
let E = r.current;
|
|
4998
4998
|
E && ((S) => S())(() => {
|
|
4999
4999
|
je(y.current, { [Tt.Forwards]: () => {
|
|
5000
|
-
_t(E,
|
|
5000
|
+
_t(E, Ce.First, { skipElements: [b.relatedTarget, i] });
|
|
5001
5001
|
}, [Tt.Backwards]: () => {
|
|
5002
|
-
_t(E,
|
|
5002
|
+
_t(E, Ce.Last, { skipElements: [b.relatedTarget, i] });
|
|
5003
5003
|
} });
|
|
5004
5004
|
});
|
|
5005
5005
|
}), v = vt(!!(s & 2), "focus-trap#tab-lock"), c = Ln(), p = U(!1), m = { ref: n, onKeyDown(b) {
|
|
@@ -5011,9 +5011,9 @@ function _d(e, t) {
|
|
|
5011
5011
|
let E = pa(a);
|
|
5012
5012
|
r.current instanceof HTMLElement && E.add(r.current);
|
|
5013
5013
|
let S = b.relatedTarget;
|
|
5014
|
-
S instanceof HTMLElement && S.dataset.headlessuiFocusGuard !== "true" && (ma(E, S) || (p.current ? _t(r.current, je(y.current, { [Tt.Forwards]: () =>
|
|
5014
|
+
S instanceof HTMLElement && S.dataset.headlessuiFocusGuard !== "true" && (ma(E, S) || (p.current ? _t(r.current, je(y.current, { [Tt.Forwards]: () => Ce.Next, [Tt.Backwards]: () => Ce.Previous }) | Ce.WrapAround, { relativeTo: b.target }) : b.target instanceof HTMLElement && $e(b.target)));
|
|
5015
5015
|
} };
|
|
5016
|
-
return
|
|
5016
|
+
return F.createElement(F.Fragment, null, v && F.createElement(hn, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: h, features: ur.Focusable }), ve({ ourProps: m, theirProps: l, defaultTag: $d, name: "FocusTrap" }), v && F.createElement(hn, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: h, features: ur.Focusable }));
|
|
5017
5017
|
}
|
|
5018
5018
|
let Nd = de(_d), Dd = Object.assign(Nd, { features: Ge });
|
|
5019
5019
|
function Id(e = !0) {
|
|
@@ -5059,8 +5059,8 @@ function Md(e, { ownerDocument: t, container: r, initialFocus: n, initialFocusFa
|
|
|
5059
5059
|
if (n != null && n.current) $e(n.current);
|
|
5060
5060
|
else {
|
|
5061
5061
|
if (e & 16) {
|
|
5062
|
-
if (_t(l,
|
|
5063
|
-
} else if (_t(l,
|
|
5062
|
+
if (_t(l, Ce.First | Ce.AutoFocus) !== gn.Error) return;
|
|
5063
|
+
} else if (_t(l, Ce.First) !== gn.Error) return;
|
|
5064
5064
|
if (o != null && o.current && ($e(o.current), (t == null ? void 0 : t.activeElement) === o.current)) return;
|
|
5065
5065
|
console.warn("There are no focusable elements inside the <FocusTrap />");
|
|
5066
5066
|
}
|
|
@@ -5086,7 +5086,7 @@ function ma(e, t) {
|
|
|
5086
5086
|
}
|
|
5087
5087
|
function ya(e) {
|
|
5088
5088
|
var t;
|
|
5089
|
-
return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || ((t = e.as) != null ? t : va) !== we ||
|
|
5089
|
+
return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || ((t = e.as) != null ? t : va) !== we || F.Children.count(e.children) === 1;
|
|
5090
5090
|
}
|
|
5091
5091
|
let Sr = he(null);
|
|
5092
5092
|
Sr.displayName = "TransitionContext";
|
|
@@ -5169,7 +5169,7 @@ function Wd(e, t) {
|
|
|
5169
5169
|
x && o || (W($), _e($));
|
|
5170
5170
|
}, [$, x, o]);
|
|
5171
5171
|
let Wt = !(!o || !x || !K || pe), [, te] = cd(Wt, b, $, { start: W, end: _e }), Tr = Ve({ ref: A, className: ((n = yn(m.className, ge && f, ge && u, te.enter && f, te.enter && te.closed && u, te.enter && !te.closed && y, te.leave && v, te.leave && !te.closed && c, te.leave && te.closed && p, !te.transition && $ && h)) == null ? void 0 : n.trim()) || void 0, ...ud(te) }), We = 0;
|
|
5172
|
-
return L === "visible" && (We |= be.Open), L === "hidden" && (We |= be.Closed), te.enter && (We |= be.Opening), te.leave && (We |= be.Closing),
|
|
5172
|
+
return L === "visible" && (We |= be.Open), L === "hidden" && (We |= be.Closed), te.enter && (We |= be.Opening), te.leave && (We |= be.Closing), F.createElement(xr.Provider, { value: re }, F.createElement(md, { value: We }, ve({ ourProps: Tr, theirProps: m, defaultTag: va, features: ga, visible: L === "visible", name: "Transition.Child" })));
|
|
5173
5173
|
}
|
|
5174
5174
|
function Hd(e, t) {
|
|
5175
5175
|
let { show: r, appear: n = !1, unmount: o = !0, ...i } = e, a = U(null), s = ya(e), l = Pe(...s ? [a, t] : t === null ? [] : [t]);
|
|
@@ -5193,11 +5193,11 @@ function Hd(e, t) {
|
|
|
5193
5193
|
var x;
|
|
5194
5194
|
v && c(!1), (x = e.beforeLeave) == null || x.call(e);
|
|
5195
5195
|
});
|
|
5196
|
-
return
|
|
5196
|
+
return F.createElement(xr.Provider, { value: h }, F.createElement(Sr.Provider, { value: m }, ve({ ourProps: { ...b, as: we, children: F.createElement(ba, { ref: l, ...b, ...i, beforeEnter: E, beforeLeave: S }) }, theirProps: {}, defaultTag: we, features: ga, visible: u === "visible", name: "Transition" })));
|
|
5197
5197
|
}
|
|
5198
5198
|
function qd(e, t) {
|
|
5199
5199
|
let r = fe(Sr) !== null, n = Er() !== null;
|
|
5200
|
-
return
|
|
5200
|
+
return F.createElement(F.Fragment, null, !r && n ? F.createElement(wn, { ref: t, ...e }) : F.createElement(ba, { ref: t, ...e }));
|
|
5201
5201
|
}
|
|
5202
5202
|
let wn = de(Hd), ba = de(Wd), gt = de(qd), wa = Object.assign(wn, { Child: gt, Root: wn });
|
|
5203
5203
|
var Vd = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Vd || {}), zd = ((e) => (e[e.SetTitleId = 0] = "SetTitleId", e))(zd || {});
|
|
@@ -5226,7 +5226,7 @@ let Qo = de(function(e, t) {
|
|
|
5226
5226
|
let c = U(null), p = Pe(c, t), m = Bt(c), b = o ? 0 : 1, [E, S] = es(Kd, { titleId: null, descriptionId: null, panelRef: ts() }), x = q(() => i(!1)), A = q((W) => S({ type: 0, id: W })), T = Ut() ? b === 0 : !1, [$, j] = Od(), H = { get current() {
|
|
5227
5227
|
var W;
|
|
5228
5228
|
return (W = E.panelRef.current) != null ? W : c.current;
|
|
5229
|
-
} }, L = da(), { resolveContainers: Y } =
|
|
5229
|
+
} }, L = da(), { resolveContainers: Y } = Fd({ mainTreeNode: L, portals: $, defaultContainers: [H] }), Z = v !== null ? (v & be.Closing) === be.Closing : !1;
|
|
5230
5230
|
Uf(f || Z ? !1 : T, { allowed: q(() => {
|
|
5231
5231
|
var W, _e;
|
|
5232
5232
|
return [(_e = (W = c.current) == null ? void 0 : W.closest("[data-headlessui-portal]")) != null ? _e : null];
|
|
@@ -5239,7 +5239,7 @@ let Qo = de(function(e, t) {
|
|
|
5239
5239
|
W.preventDefault(), W.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), x();
|
|
5240
5240
|
}), ad(f || Z ? !1 : T, m, Y), Wf(T, c, x);
|
|
5241
5241
|
let [R, M] = _f(), K = ne(() => [{ dialogState: b, close: x, setTitleId: A, unmount: u }, E], [b, E, x, A, u]), pe = ne(() => ({ open: b === 0 }), [b]), ge = { ref: p, id: n, role: s, tabIndex: -1, "aria-modal": f ? void 0 : b === 0 ? !0 : void 0, "aria-labelledby": E.titleId, "aria-describedby": R, unmount: u }, Se = !Pd(), re = Ge.None;
|
|
5242
|
-
return T && !f && (re |= Ge.RestoreFocus, re |= Ge.TabLock, l && (re |= Ge.AutoFocus), Se && (re |= Ge.InitialFocus)),
|
|
5242
|
+
return T && !f && (re |= Ge.RestoreFocus, re |= Ge.TabLock, l && (re |= Ge.AutoFocus), Se && (re |= Ge.InitialFocus)), F.createElement(yd, null, F.createElement(Yo, { force: !0 }, F.createElement(Td, null, F.createElement(Bn.Provider, { value: K }, F.createElement(ca, { target: c }, F.createElement(Yo, { force: !1 }, F.createElement(M, { slot: pe }, F.createElement(j, null, F.createElement(Dd, { initialFocus: a, initialFocusFallback: c, containers: Y, features: re }, F.createElement(kf, { value: x }, ve({ ourProps: ge, theirProps: y, slot: pe, defaultTag: Jd, features: Yd, visible: b === 0, name: "Dialog" })))))))))));
|
|
5243
5243
|
}), Jd = "div", Yd = lr.RenderStrategy | lr.Static;
|
|
5244
5244
|
function Xd(e, t) {
|
|
5245
5245
|
let { transition: r = !1, open: n, ...o } = e, i = Er(), a = e.hasOwnProperty("open") || i !== null, s = e.hasOwnProperty("onClose");
|
|
@@ -5248,19 +5248,19 @@ function Xd(e, t) {
|
|
|
5248
5248
|
if (!s) throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");
|
|
5249
5249
|
if (!i && typeof e.open != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);
|
|
5250
5250
|
if (typeof e.onClose != "function") throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);
|
|
5251
|
-
return (n !== void 0 || r) && !o.static ?
|
|
5251
|
+
return (n !== void 0 || r) && !o.static ? F.createElement(Xo, null, F.createElement(wa, { show: n, transition: r, unmount: o.unmount }, F.createElement(Qo, { ref: t, ...o }))) : F.createElement(Xo, null, F.createElement(Qo, { ref: t, open: n, ...o }));
|
|
5252
5252
|
}
|
|
5253
5253
|
let Qd = "div";
|
|
5254
5254
|
function Zd(e, t) {
|
|
5255
5255
|
let r = It(), { id: n = `headlessui-dialog-panel-${r}`, transition: o = !1, ...i } = e, [{ dialogState: a, unmount: s }, l] = Ar("Dialog.Panel"), f = Pe(t, l.panelRef), u = ne(() => ({ open: a === 0 }), [a]), y = q((v) => {
|
|
5256
5256
|
v.stopPropagation();
|
|
5257
5257
|
}), h = { ref: f, id: n, onClick: y };
|
|
5258
|
-
return
|
|
5258
|
+
return F.createElement(o ? gt : we, { ...o ? { unmount: s } : {} }, ve({ ourProps: h, theirProps: i, slot: u, defaultTag: Qd, name: "Dialog.Panel" }));
|
|
5259
5259
|
}
|
|
5260
5260
|
let ep = "div";
|
|
5261
5261
|
function tp(e, t) {
|
|
5262
5262
|
let { transition: r = !1, ...n } = e, [{ dialogState: o, unmount: i }] = Ar("Dialog.Backdrop"), a = ne(() => ({ open: o === 0 }), [o]), s = { ref: t, "aria-hidden": !0 };
|
|
5263
|
-
return
|
|
5263
|
+
return F.createElement(r ? gt : we, { ...r ? { unmount: i } : {} }, ve({ ourProps: s, theirProps: n, slot: a, defaultTag: ep, name: "Dialog.Backdrop" }));
|
|
5264
5264
|
}
|
|
5265
5265
|
let rp = "h2";
|
|
5266
5266
|
function np(e, t) {
|
|
@@ -5485,14 +5485,14 @@ const wp = ({
|
|
|
5485
5485
|
oe(() => {
|
|
5486
5486
|
E && (E.onTopOfStack && j ? y == null || y() : !E.onTopOfStack && !j && (l == null || l()), H(!E.onTopOfStack));
|
|
5487
5487
|
}, [x]);
|
|
5488
|
-
const L =
|
|
5488
|
+
const L = Fe(
|
|
5489
5489
|
(R) => {
|
|
5490
5490
|
o && R === 0 && (window.location.hash = ""), f == null || f();
|
|
5491
5491
|
},
|
|
5492
5492
|
[f, o]
|
|
5493
|
-
), Y =
|
|
5493
|
+
), Y = Fe(() => {
|
|
5494
5494
|
S(null), s == null || s();
|
|
5495
|
-
}, [s]), Z =
|
|
5495
|
+
}, [s]), Z = Fe(
|
|
5496
5496
|
(R) => {
|
|
5497
5497
|
R == null || R.preventDefault(), !m && (e.startsWith("#") || (b(!0), h == null || h()), A(
|
|
5498
5498
|
e,
|
|
@@ -36,7 +36,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
36
36
|
`)>=0)return!1;return!0}function Du(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=he.call(Array(e.indent+1)," ");else return null;return{base:r,prev:he.call(Array(t+1),r)}}function rn(e,t){if(e.length===0)return"";var r=`
|
|
37
37
|
`+t.prev+t.base;return r+he.call(e,","+r)+`
|
|
38
38
|
`+t.prev}function Xt(e,t){var r=en(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=Pe(e,o)?t(e[o],e):""}var i=typeof Xr=="function"?Xr(e):[],a;if(at){a={};for(var s=0;s<i.length;s++)a["$"+i[s]]=i[s]}for(var l in e)Pe(e,l)&&(r&&String(Number(l))===l&&l<e.length||at&&a["$"+l]instanceof Symbol||(Go.call(/[^\w$]/,l)?n.push(t(l,e)+": "+t(e[l],e)):n.push(l+": "+t(e[l],e))));if(typeof Xr=="function")for(var f=0;f<i.length;f++)Yo.call(e,i[f])&&n.push("["+t(i[f])+"]: "+t(e[i[f]],e));return n}var si=ot,st=au,Iu=vu,Lu=Et,Qt=si("%WeakMap%",!0),Zt=si("%Map%",!0),ku=st("WeakMap.prototype.get",!0),ju=st("WeakMap.prototype.set",!0),Bu=st("WeakMap.prototype.has",!0),Uu=st("Map.prototype.get",!0),Wu=st("Map.prototype.set",!0),Hu=st("Map.prototype.has",!0),nn=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},qu=function(e,t){var r=nn(e,t);return r&&r.value},Vu=function(e,t,r){var n=nn(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},zu=function(e,t){return!!nn(e,t)},Gu=function(){var t,r,n,o={assert:function(i){if(!o.has(i))throw new Lu("Side channel does not contain "+Iu(i))},get:function(i){if(Qt&&i&&(typeof i=="object"||typeof i=="function")){if(t)return ku(t,i)}else if(Zt){if(r)return Uu(r,i)}else if(n)return qu(n,i)},has:function(i){if(Qt&&i&&(typeof i=="object"||typeof i=="function")){if(t)return Bu(t,i)}else if(Zt){if(r)return Hu(r,i)}else if(n)return zu(n,i);return!1},set:function(i,a){Qt&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new Qt),ju(t,i,a)):Zt?(r||(r=new Zt),Wu(r,i,a)):(n||(n={key:{},next:null}),Vu(n,i,a))}};return o},Ku=String.prototype.replace,Ju=/%20/g,on={RFC1738:"RFC1738",RFC3986:"RFC3986"},an={default:on.RFC3986,formatters:{RFC1738:function(e){return Ku.call(e,Ju,"+")},RFC3986:function(e){return String(e)}},RFC1738:on.RFC1738,RFC3986:on.RFC3986},Yu=an,sn=Object.prototype.hasOwnProperty,Ue=Array.isArray,ve=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Xu=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(Ue(n)){for(var o=[],i=0;i<n.length;++i)typeof n[i]<"u"&&o.push(n[i]);r.obj[r.prop]=o}}},li=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(n[o]=t[o]);return n},Qu=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(Ue(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!sn.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var o=t;return Ue(t)&&!Ue(r)&&(o=li(t,n)),Ue(t)&&Ue(r)?(r.forEach(function(i,a){if(sn.call(t,a)){var s=t[a];s&&typeof s=="object"&&i&&typeof i=="object"?t[a]=e(s,i,n):t.push(i)}else t[a]=i}),t):Object.keys(r).reduce(function(i,a){var s=r[a];return sn.call(i,a)?i[a]=e(i[a],s,n):i[a]=s,i},o)},Zu=function(t,r){return Object.keys(r).reduce(function(n,o){return n[o]=r[o],n},t)},ec=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},ln=1024,tc=function(t,r,n,o,i){if(t.length===0)return t;var a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),n==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(g){return"%26%23"+parseInt(g.slice(2),16)+"%3B"});for(var s="",l=0;l<a.length;l+=ln){for(var f=a.length>=ln?a.slice(l,l+ln):a,u=[],h=0;h<f.length;++h){var v=f.charCodeAt(h);if(v===45||v===46||v===95||v===126||v>=48&&v<=57||v>=65&&v<=90||v>=97&&v<=122||i===Yu.RFC1738&&(v===40||v===41)){u[u.length]=f.charAt(h);continue}if(v<128){u[u.length]=ve[v];continue}if(v<2048){u[u.length]=ve[192|v>>6]+ve[128|v&63];continue}if(v<55296||v>=57344){u[u.length]=ve[224|v>>12]+ve[128|v>>6&63]+ve[128|v&63];continue}h+=1,v=65536+((v&1023)<<10|f.charCodeAt(h)&1023),u[u.length]=ve[240|v>>18]+ve[128|v>>12&63]+ve[128|v>>6&63]+ve[128|v&63]}s+=u.join("")}return s},rc=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],o=0;o<r.length;++o)for(var i=r[o],a=i.obj[i.prop],s=Object.keys(a),l=0;l<s.length;++l){var f=s[l],u=a[f];typeof u=="object"&&u!==null&&n.indexOf(u)===-1&&(r.push({obj:a,prop:f}),n.push(u))}return Xu(r),t},nc=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},oc=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},ic=function(t,r){return[].concat(t,r)},ac=function(t,r){if(Ue(t)){for(var n=[],o=0;o<t.length;o+=1)n.push(r(t[o]));return n}return r(t)},ui={arrayToObject:li,assign:Zu,combine:ic,compact:rc,decode:ec,encode:tc,isBuffer:oc,isRegExp:nc,maybeMap:ac,merge:Qu},ci=Gu,er=ui,Tt=an,sc=Object.prototype.hasOwnProperty,fi={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},ge=Array.isArray,lc=Array.prototype.push,di=function(e,t){lc.apply(e,ge(t)?t:[t])},uc=Date.prototype.toISOString,pi=Tt.default,Y={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:er.encode,encodeValuesOnly:!1,format:pi,formatter:Tt.formatters[pi],indices:!1,serializeDate:function(t){return uc.call(t)},skipNulls:!1,strictNullHandling:!1},cc=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},un={},fc=function e(t,r,n,o,i,a,s,l,f,u,h,v,g,c,m,y,w,S){for(var x=t,O=S,T=0,P=!1;(O=O.get(un))!==void 0&&!P;){var _=O.get(t);if(T+=1,typeof _<"u"){if(_===T)throw new RangeError("Cyclic object value");P=!0}typeof O.get(un)>"u"&&(T=0)}if(typeof u=="function"?x=u(r,x):x instanceof Date?x=g(x):n==="comma"&&ge(x)&&(x=er.maybeMap(x,function(U){return U instanceof Date?g(U):U})),x===null){if(a)return f&&!y?f(r,Y.encoder,w,"key",c):r;x=""}if(cc(x)||er.isBuffer(x)){if(f){var j=y?r:f(r,Y.encoder,w,"key",c);return[m(j)+"="+m(f(x,Y.encoder,w,"value",c))]}return[m(r)+"="+m(String(x))]}var H=[];if(typeof x>"u")return H;var I;if(n==="comma"&&ge(x))y&&f&&(x=er.maybeMap(x,f)),I=[{value:x.length>0?x.join(",")||null:void 0}];else if(ge(u))I=u;else{var X=Object.keys(x);I=h?X.sort(h):X}var Z=l?r.replace(/\./g,"%2E"):r,C=o&&ge(x)&&x.length===1?Z+"[]":Z;if(i&&ge(x)&&x.length===0)return C+"[]";for(var L=0;L<I.length;++L){var K=I[L],ce=typeof K=="object"&&typeof K.value<"u"?K.value:x[K];if(!(s&&ce===null)){var ye=v&&l?K.replace(/\./g,"%2E"):K,we=ge(x)?typeof n=="function"?n(C,ye):C:C+(v?"."+ye:"["+ye+"]");S.set(t,T);var re=ci();re.set(un,S),di(H,e(ce,we,n,o,i,a,s,l,n==="comma"&&y&&ge(x)?null:f,u,h,v,g,c,m,y,w,re))}}return H},dc=function(t){if(!t)return Y;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||Y.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Tt.default;if(typeof t.format<"u"){if(!sc.call(Tt.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var o=Tt.formatters[n],i=Y.filter;(typeof t.filter=="function"||ge(t.filter))&&(i=t.filter);var a;if(t.arrayFormat in fi?a=t.arrayFormat:"indices"in t?a=t.indices?"indices":"repeat":a=Y.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:Y.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Y.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Y.allowEmptyArrays,arrayFormat:a,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Y.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Y.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Y.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Y.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Y.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Y.encodeValuesOnly,filter:i,format:n,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Y.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Y.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Y.strictNullHandling}},pc=function(e,t){var r=e,n=dc(t),o,i;typeof n.filter=="function"?(i=n.filter,r=i("",r)):ge(n.filter)&&(i=n.filter,o=i);var a=[];if(typeof r!="object"||r===null)return"";var s=fi[n.arrayFormat],l=s==="comma"&&n.commaRoundTrip;o||(o=Object.keys(r)),n.sort&&o.sort(n.sort);for(var f=ci(),u=0;u<o.length;++u){var h=o[u];n.skipNulls&&r[h]===null||di(a,fc(r[h],h,s,l,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,f))}var v=a.join(n.delimiter),g=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?g+="utf8=%26%2310003%3B&":g+="utf8=%E2%9C%93&"),v.length>0?g+v:""},lt=ui,cn=Object.prototype.hasOwnProperty,mc=Array.isArray,V={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:lt.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},yc=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},mi=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},hc="utf8=%26%2310003%3B",vc="utf8=%E2%9C%93",gc=function(t,r){var n={__proto__:null},o=r.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=r.parameterLimit===1/0?void 0:r.parameterLimit,a=o.split(r.delimiter,i),s=-1,l,f=r.charset;if(r.charsetSentinel)for(l=0;l<a.length;++l)a[l].indexOf("utf8=")===0&&(a[l]===vc?f="utf-8":a[l]===hc&&(f="iso-8859-1"),s=l,l=a.length);for(l=0;l<a.length;++l)if(l!==s){var u=a[l],h=u.indexOf("]="),v=h===-1?u.indexOf("="):h+1,g,c;v===-1?(g=r.decoder(u,V.decoder,f,"key"),c=r.strictNullHandling?null:""):(g=r.decoder(u.slice(0,v),V.decoder,f,"key"),c=lt.maybeMap(mi(u.slice(v+1),r),function(y){return r.decoder(y,V.decoder,f,"value")})),c&&r.interpretNumericEntities&&f==="iso-8859-1"&&(c=yc(c)),u.indexOf("[]=")>-1&&(c=mc(c)?[c]:c);var m=cn.call(n,g);m&&r.duplicates==="combine"?n[g]=lt.combine(n[g],c):(!m||r.duplicates==="last")&&(n[g]=c)}return n},bc=function(e,t,r,n){for(var o=n?t:mi(t,r),i=e.length-1;i>=0;--i){var a,s=e[i];if(s==="[]"&&r.parseArrays)a=r.allowEmptyArrays&&(o===""||r.strictNullHandling&&o===null)?[]:[].concat(o);else{a=r.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,f=r.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(f,10);!r.parseArrays&&f===""?a={0:o}:!isNaN(u)&&s!==f&&String(u)===f&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(a=[],a[u]=o):f!=="__proto__"&&(a[f]=o)}o=a}return o},wc=function(t,r,n,o){if(t){var i=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,l=n.depth>0&&a.exec(i),f=l?i.slice(0,l.index):i,u=[];if(f){if(!n.plainObjects&&cn.call(Object.prototype,f)&&!n.allowPrototypes)return;u.push(f)}for(var h=0;n.depth>0&&(l=s.exec(i))!==null&&h<n.depth;){if(h+=1,!n.plainObjects&&cn.call(Object.prototype,l[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(l[1])}if(l){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");u.push("["+i.slice(l.index)+"]")}return bc(u,r,n,o)}},Ec=function(t){if(!t)return V;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?V.charset:t.charset,n=typeof t.duplicates>"u"?V.duplicates:t.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:V.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:V.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:V.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:V.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:V.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:V.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:V.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:V.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:V.decoder,delimiter:typeof t.delimiter=="string"||lt.isRegExp(t.delimiter)?t.delimiter:V.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:V.depth,duplicates:n,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:V.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:V.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:V.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:V.strictDepth,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:V.strictNullHandling}},Sc=function(e,t){var r=Ec(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?gc(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),a=0;a<i.length;++a){var s=i[a],l=wc(s,n[s],r,typeof e=="string");o=lt.merge(o,l,r)}return r.allowSparse===!0?o:lt.compact(o)},xc=pc,Oc=Sc,Ac=an,yi={formats:Ac,parse:Oc,stringify:xc},Tc={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
|
39
|
-
* @license MIT */(function(e,t){(function(r,n){e.exports=n()})(wr,function(){var r={};r.version="0.2.0";var n=r.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};r.configure=function(c){var m,y;for(m in c)y=c[m],y!==void 0&&c.hasOwnProperty(m)&&(n[m]=y);return this},r.status=null,r.set=function(c){var m=r.isStarted();c=o(c,n.minimum,1),r.status=c===1?null:c;var y=r.render(!m),w=y.querySelector(n.barSelector),S=n.speed,x=n.easing;return y.offsetWidth,s(function(O){n.positionUsing===""&&(n.positionUsing=r.getPositioningCSS()),l(w,a(c,S,x)),c===1?(l(y,{transition:"none",opacity:1}),y.offsetWidth,setTimeout(function(){l(y,{transition:"all "+S+"ms linear",opacity:0}),setTimeout(function(){r.remove(),O()},S)},S)):setTimeout(O,S)}),this},r.isStarted=function(){return typeof r.status=="number"},r.start=function(){r.status||r.set(0);var c=function(){setTimeout(function(){r.status&&(r.trickle(),c())},n.trickleSpeed)};return n.trickle&&c(),this},r.done=function(c){return!c&&!r.status?this:r.inc(.3+.5*Math.random()).set(1)},r.inc=function(c){var m=r.status;return m?(typeof c!="number"&&(c=(1-m)*o(Math.random()*m,.1,.95)),m=o(m+c,0,.994),r.set(m)):r.start()},r.trickle=function(){return r.inc(Math.random()*n.trickleRate)},function(){var c=0,m=0;r.promise=function(y){return!y||y.state()==="resolved"?this:(m===0&&r.start(),c++,m++,y.always(function(){m--,m===0?(c=0,r.done()):r.set((c-m)/c)}),this)}}(),r.render=function(c){if(r.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var m=document.createElement("div");m.id="nprogress",m.innerHTML=n.template;var y=m.querySelector(n.barSelector),w=c?"-100":i(r.status||0),S=document.querySelector(n.parent),x;return l(y,{transition:"all 0 linear",transform:"translate3d("+w+"%,0,0)"}),n.showSpinner||(x=m.querySelector(n.spinnerSelector),x&&g(x)),S!=document.body&&u(S,"nprogress-custom-parent"),S.appendChild(m),m},r.remove=function(){h(document.documentElement,"nprogress-busy"),h(document.querySelector(n.parent),"nprogress-custom-parent");var c=document.getElementById("nprogress");c&&g(c)},r.isRendered=function(){return!!document.getElementById("nprogress")},r.getPositioningCSS=function(){var c=document.body.style,m="WebkitTransform"in c?"Webkit":"MozTransform"in c?"Moz":"msTransform"in c?"ms":"OTransform"in c?"O":"";return m+"Perspective"in c?"translate3d":m+"Transform"in c?"translate":"margin"};function o(c,m,y){return c<m?m:c>y?y:c}function i(c){return(-1+c)*100}function a(c,m,y){var w;return n.positionUsing==="translate3d"?w={transform:"translate3d("+i(c)+"%,0,0)"}:n.positionUsing==="translate"?w={transform:"translate("+i(c)+"%,0)"}:w={"margin-left":i(c)+"%"},w.transition="all "+m+"ms "+y,w}var s=function(){var c=[];function m(){var y=c.shift();y&&y(m)}return function(y){c.push(y),c.length==1&&m()}}(),l=function(){var c=["Webkit","O","Moz","ms"],m={};function y(O){return O.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(T,P){return P.toUpperCase()})}function w(O){var T=document.body.style;if(O in T)return O;for(var P=c.length,_=O.charAt(0).toUpperCase()+O.slice(1),j;P--;)if(j=c[P]+_,j in T)return j;return O}function S(O){return O=y(O),m[O]||(m[O]=w(O))}function x(O,T,P){T=S(T),O.style[T]=P}return function(O,T){var P=arguments,_,j;if(P.length==2)for(_ in T)j=T[_],j!==void 0&&T.hasOwnProperty(_)&&x(O,_,j);else x(O,P[1],P[2])}}();function f(c,m){var y=typeof c=="string"?c:v(c);return y.indexOf(" "+m+" ")>=0}function u(c,m){var y=v(c),w=y+m;f(y,m)||(c.className=w.substring(1))}function h(c,m){var y=v(c),w;f(c,m)&&(w=y.replace(" "+m+" "," "),c.className=w.substring(1,w.length-1))}function v(c){return(" "+(c.className||"")+" ").replace(/\s+/gi," ")}function g(c){c&&c.parentNode&&c.parentNode.removeChild(c)}return r})})(Tc);function Pc(e,t,r,n="brackets"){let o=/^https?:\/\//.test(t.toString()),i=o||t.toString().startsWith("/"),a=!i&&!t.toString().startsWith("#")&&!t.toString().startsWith("?"),s=t.toString().includes("?")||e==="get"&&Object.keys(r).length,l=t.toString().includes("#"),f=new URL(t.toString(),"http://localhost");return e==="get"&&Object.keys(r).length&&(f.search=yi.stringify(cl(yi.parse(f.search,{ignoreQueryPrefix:!0}),r),{encodeValuesOnly:!0,arrayFormat:n}),r={}),[[o?`${f.protocol}//${f.host}`:"",i?f.pathname:"",a?f.pathname.substring(1):"",s?f.search:"",l?f.hash:""].join(""),r]}const tr=p.createContext(null);tr.displayName="ModalStackContext";const Cc=({children:e})=>{const[t,r]=p.useState([]),[n,o]=p.useState({});class i{constructor(c,m,y,w,S){Se(this,"updateStack",c=>{r(m=>{const y=c([...m]);return y.forEach((w,S)=>{y[S].index=S,y[S].onTopOfStack=S===y.length-1}),y})});Se(this,"setOpen",c=>{c?this.open=!0:this.close()});Se(this,"close",()=>{this.updateStack(c=>c.map(m=>{var y;return m.id===this.id&&(Object.keys(m.listeners).forEach(w=>{m.off(w)}),m.open=!1,(y=m.onCloseCallback)==null||y.call(m)),m}))});Se(this,"afterLeave",()=>{this.open||this.updateStack(c=>c.filter(m=>{var y;return m.id!==this.id?!0:((y=m.afterLeaveCallback)==null||y.call(m),!1)}))});Se(this,"on",(c,m)=>{this.listeners[c]=this.listeners[c]??[],this.listeners[c].push(m)});Se(this,"off",(c,m)=>{var y;m?this.listeners[c]=((y=this.listeners[c])==null?void 0:y.filter(w=>w!==m))??[]:delete this.listeners[c]});Se(this,"emit",(c,...m)=>{var y;return console.log("Emitting",c,"with args",m),(y=this.listeners[c])==null||y.forEach(w=>w(...m)),"OK"});Se(this,"registerEventListenersFromProps",c=>{const m=[];return Object.keys(c).filter(y=>y.startsWith("on")).forEach(y=>{const w=y.replace(/^on/,"").replace(/^./,S=>S.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();this.on(w,c[y]),m.push(()=>this.off(w,c[y]))}),()=>m.forEach(y=>y())});Se(this,"reload",(c={})=>{let m=Object.keys(this.response.props);c.only&&(m=xo(m,c.only)),c.except&&(m=Gs(m,c.except)),z.get(this.response.url,{headers:{Accept:"text/html, application/xhtml+xml","X-Inertia":!0,"X-Inertia-Partial-Component":this.response.component,"X-Inertia-Version":this.response.version,"X-Inertia-Partial-Data":m.join(",")}}).then(y=>{Object.assign(this.componentProps,y.data.props),r(w=>[...w])})});this.id=i.generateId(),this.open=!0,this.listeners={},this.component=c,this.componentProps=m.props,this.response=m,this.modalProps=y,this.onCloseCallback=w,this.afterLeaveCallback=S,this.index=-1,this.getParentModal=()=>null,this.getChildModal=()=>null,this.onTopOfStack=!0}static generateId(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`inertiaui_modal_${crypto.randomUUID()}`:`inertiaui_modal_${Date.now().toString(36)}_${Math.random().toString(36).substr(2,9)}`}}const a=(g,c,m,y,w)=>{const S=new i(g,c,m,y,w);return r(x=>{const O=[...x,S];return O.forEach((T,P)=>{T.index=P,T.onTopOfStack=P===O.length-1}),O.forEach((T,P)=>{T.getParentModal=()=>P>0?O[P-1]:null,T.getChildModal=()=>P<O.length-1?O[P+1]:null}),O}),S};function s(g,c,m,y){if(!n[g])throw new Error(`The local modal "${g}" has not been registered.`);const w=a(null,{},c,m,y);return w.name=g,n[g].callback(w),w}const l=(g,c={})=>f(g,c.method??"get",c.data??{},c.headers??{},c.config??{},c.onClose,c.onAfterLeave,c.queryStringArrayFormat??"brackets"),f=(g,c,m={},y={},w={},S=null,x=null,O="brackets")=>new Promise((T,P)=>{if(g.startsWith("#")){const H=s(g.substring(1),w,S,x);T(H);return}const[_,j]=Pc(c,g||"",m,O);Js().then(H=>{z({url:_,method:c,data:j,headers:{...y,Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0,"X-Inertia-Version":H.version,"X-InertiaUI-Modal":!0}}).then(I=>{De.router.resolveComponent(I.data.component).then(X=>{T(a(X,I.data,w,S,x))})}).catch(I=>{P(I)})})}),v={stack:t,localModals:n,push:a,reset:()=>r([]),visit:f,visitModal:l,registerLocalModal:(g,c)=>{o(m=>({...m,[g]:{name:g,callback:c}}))},removeLocalModal:g=>{o(c=>{const m={...c};return delete m[g],m})}};return R.jsx(tr.Provider,{value:v,children:e})},rr=()=>{const e=p.useContext(tr);if(e===null)throw new Error("useModalStack must be used within a ModalStackProvider");return e},hi=["closeButton","closeExplicitly","maxWidth","paddingClasses","panelClasses","position","slideover"],Fc=({children:e})=>{const t=p.useContext(tr).stack;return R.jsxs(R.Fragment,{children:[e,t.length>0&&R.jsx(gi,{index:0})]})},fn=p.createContext(null);fn.displayName="ModalIndexContext";const vi=()=>{const e=p.useContext(fn);if(e===void 0)throw new Error("useModalIndex must be used within a ModalIndexProvider");return e},gi=({index:e})=>{const{stack:t}=rr(),r=t[e];return!r||!r.component?null:R.jsx(fn.Provider,{value:e,children:R.jsx(r.component,{...r.componentProps,onModalEvent:(...n)=>r.emit(...n)})})},dn=p.forwardRef(({name:e,children:t,...r},n)=>{const o=vi(),{stack:i,registerLocalModal:a,removeLocalModal:s}=rr(),[l,f]=p.useState(null),u=p.useMemo(()=>e?l:i[o]),h=p.useMemo(()=>(u==null?void 0:u.modalProps.slideover)??r.slideover??Dn("type")==="slideover",[r.slideover]),v=p.useMemo(()=>({slideover:h,closeButton:r.closeButton??Ye(h,"closeButton"),closeExplicitly:r.closeExplicitly??Ye(h,"closeExplicitly"),maxWidth:r.maxWidth??Ye(h,"maxWidth"),paddingClasses:r.paddingClasses??Ye(h,"paddingClasses"),panelClasses:r.panelClasses??Ye(h,"panelClasses"),position:r.position??Ye(h,"position"),...u==null?void 0:u.modalProps}),[r,u==null?void 0:u.modalProps]);return p.useEffect(()=>{if(e){let g=null;return a(e,c=>{g=c.registerEventListenersFromProps(r),f(c)}),()=>{g==null||g(),g=null,s(e)}}return u.registerEventListenersFromProps(r)},[e]),p.useImperativeHandle(n,()=>({afterLeave:()=>u.afterLeave(),close:()=>u.close(),emit:(...g)=>u.emit(...g),getChildModal:()=>u.getChildModal(),getParentModal:()=>u.getParentModal(),index:u.index,isOpen:u.open,modalContext:u,modalProps:v,reload:()=>u.reload(),setOpen:()=>u.setOpen()}),[u]),u&&R.jsxs(R.Fragment,{children:[typeof t=="function"?t({afterLeave:u.afterLeave,close:u.close,emit:u.emit,getChildModal:u.getChildModal,getParentModal:u.getParentModal,index:u.index,isOpen:u.open,modalContext:u,modalProps:v,reload:u.reload,setOpen:u.setOpen}):t,i[u.index+1]&&R.jsx(gi,{index:u.index+1})]})});dn.displayName="HeadlessModal";function bi(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=bi(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function nr(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=bi(e))&&(n&&(n+=" "),n+=t);return n}var $c=Object.defineProperty,_c=(e,t,r)=>t in e?$c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pn=(e,t,r)=>(_c(e,typeof t!="symbol"?t+"":t,r),r);let Nc=class{constructor(){pn(this,"current",this.detect()),pn(this,"handoffState","pending"),pn(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},We=new Nc;function or(e){return We.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function ir(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Fe(){let e=[],t={addEventListener(r,n,o,i){return r.addEventListener(n,o,i),t.add(()=>r.removeEventListener(n,o,i))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return ir(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,o){let i=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:o}),this.add(()=>{Object.assign(r.style,{[n]:i})})},group(r){let n=Fe();return r(n),this.add(()=>n.dispose())},add(r){return e.includes(r)||e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let o of e.splice(n,1))o()}},dispose(){for(let r of e.splice(0))r()}};return t}function mn(){let[e]=p.useState(Fe);return p.useEffect(()=>()=>e.dispose(),[e]),e}let ne=(e,t)=>{We.isServer?p.useEffect(e,t):p.useLayoutEffect(e,t)};function He(e){let t=p.useRef(e);return ne(()=>{t.current=e},[e]),t}let q=function(e){let t=He(e);return p.useCallback((...r)=>t.current(...r),[t])},Mc=p.createContext(void 0);function Rc(){return p.useContext(Mc)}function yn(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function $e(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,$e),n}var ar=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ar||{}),_e=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(_e||{});function fe({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:o,visible:i=!0,name:a,mergeRefs:s}){s=s??Dc;let l=wi(t,e);if(i)return sr(l,r,n,a,s);let f=o??0;if(f&2){let{static:u=!1,...h}=l;if(u)return sr(h,r,n,a,s)}if(f&1){let{unmount:u=!0,...h}=l;return $e(u?0:1,{0(){return null},1(){return sr({...h,hidden:!0,style:{display:"none"}},r,n,a,s)}})}return sr(l,r,n,a,s)}function sr(e,t={},r,n,o){let{as:i=r,children:a,refName:s="ref",...l}=hn(e,["unmount","static"]),f=e.ref!==void 0?{[s]:e.ref}:{},u=typeof a=="function"?a(t):a;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let h={};if(t){let v=!1,g=[];for(let[c,m]of Object.entries(t))typeof m=="boolean"&&(v=!0),m===!0&&g.push(c.replace(/([A-Z])/g,y=>`-${y.toLowerCase()}`));if(v){h["data-headlessui-state"]=g.join(" ");for(let c of g)h[`data-${c}`]=""}}if(i===p.Fragment&&(Object.keys(qe(l)).length>0||Object.keys(qe(h)).length>0))if(!p.isValidElement(u)||Array.isArray(u)&&u.length>1){if(Object.keys(qe(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(qe(l)).concat(Object.keys(qe(h))).map(v=>` - ${v}`).join(`
|
|
39
|
+
* @license MIT */(function(e,t){(function(r,n){e.exports=n()})(wr,function(){var r={};r.version="0.2.0";var n=r.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};r.configure=function(c){var m,y;for(m in c)y=c[m],y!==void 0&&c.hasOwnProperty(m)&&(n[m]=y);return this},r.status=null,r.set=function(c){var m=r.isStarted();c=o(c,n.minimum,1),r.status=c===1?null:c;var y=r.render(!m),w=y.querySelector(n.barSelector),S=n.speed,x=n.easing;return y.offsetWidth,s(function(O){n.positionUsing===""&&(n.positionUsing=r.getPositioningCSS()),l(w,a(c,S,x)),c===1?(l(y,{transition:"none",opacity:1}),y.offsetWidth,setTimeout(function(){l(y,{transition:"all "+S+"ms linear",opacity:0}),setTimeout(function(){r.remove(),O()},S)},S)):setTimeout(O,S)}),this},r.isStarted=function(){return typeof r.status=="number"},r.start=function(){r.status||r.set(0);var c=function(){setTimeout(function(){r.status&&(r.trickle(),c())},n.trickleSpeed)};return n.trickle&&c(),this},r.done=function(c){return!c&&!r.status?this:r.inc(.3+.5*Math.random()).set(1)},r.inc=function(c){var m=r.status;return m?(typeof c!="number"&&(c=(1-m)*o(Math.random()*m,.1,.95)),m=o(m+c,0,.994),r.set(m)):r.start()},r.trickle=function(){return r.inc(Math.random()*n.trickleRate)},function(){var c=0,m=0;r.promise=function(y){return!y||y.state()==="resolved"?this:(m===0&&r.start(),c++,m++,y.always(function(){m--,m===0?(c=0,r.done()):r.set((c-m)/c)}),this)}}(),r.render=function(c){if(r.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var m=document.createElement("div");m.id="nprogress",m.innerHTML=n.template;var y=m.querySelector(n.barSelector),w=c?"-100":i(r.status||0),S=document.querySelector(n.parent),x;return l(y,{transition:"all 0 linear",transform:"translate3d("+w+"%,0,0)"}),n.showSpinner||(x=m.querySelector(n.spinnerSelector),x&&g(x)),S!=document.body&&u(S,"nprogress-custom-parent"),S.appendChild(m),m},r.remove=function(){h(document.documentElement,"nprogress-busy"),h(document.querySelector(n.parent),"nprogress-custom-parent");var c=document.getElementById("nprogress");c&&g(c)},r.isRendered=function(){return!!document.getElementById("nprogress")},r.getPositioningCSS=function(){var c=document.body.style,m="WebkitTransform"in c?"Webkit":"MozTransform"in c?"Moz":"msTransform"in c?"ms":"OTransform"in c?"O":"";return m+"Perspective"in c?"translate3d":m+"Transform"in c?"translate":"margin"};function o(c,m,y){return c<m?m:c>y?y:c}function i(c){return(-1+c)*100}function a(c,m,y){var w;return n.positionUsing==="translate3d"?w={transform:"translate3d("+i(c)+"%,0,0)"}:n.positionUsing==="translate"?w={transform:"translate("+i(c)+"%,0)"}:w={"margin-left":i(c)+"%"},w.transition="all "+m+"ms "+y,w}var s=function(){var c=[];function m(){var y=c.shift();y&&y(m)}return function(y){c.push(y),c.length==1&&m()}}(),l=function(){var c=["Webkit","O","Moz","ms"],m={};function y(O){return O.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(T,P){return P.toUpperCase()})}function w(O){var T=document.body.style;if(O in T)return O;for(var P=c.length,_=O.charAt(0).toUpperCase()+O.slice(1),j;P--;)if(j=c[P]+_,j in T)return j;return O}function S(O){return O=y(O),m[O]||(m[O]=w(O))}function x(O,T,P){T=S(T),O.style[T]=P}return function(O,T){var P=arguments,_,j;if(P.length==2)for(_ in T)j=T[_],j!==void 0&&T.hasOwnProperty(_)&&x(O,_,j);else x(O,P[1],P[2])}}();function f(c,m){var y=typeof c=="string"?c:v(c);return y.indexOf(" "+m+" ")>=0}function u(c,m){var y=v(c),w=y+m;f(y,m)||(c.className=w.substring(1))}function h(c,m){var y=v(c),w;f(c,m)&&(w=y.replace(" "+m+" "," "),c.className=w.substring(1,w.length-1))}function v(c){return(" "+(c.className||"")+" ").replace(/\s+/gi," ")}function g(c){c&&c.parentNode&&c.parentNode.removeChild(c)}return r})})(Tc);function Pc(e,t,r,n="brackets"){let o=/^https?:\/\//.test(t.toString()),i=o||t.toString().startsWith("/"),a=!i&&!t.toString().startsWith("#")&&!t.toString().startsWith("?"),s=t.toString().includes("?")||e==="get"&&Object.keys(r).length,l=t.toString().includes("#"),f=new URL(t.toString(),"http://localhost");return e==="get"&&Object.keys(r).length&&(f.search=yi.stringify(cl(yi.parse(f.search,{ignoreQueryPrefix:!0}),r),{encodeValuesOnly:!0,arrayFormat:n}),r={}),[[o?`${f.protocol}//${f.host}`:"",i?f.pathname:"",a?f.pathname.substring(1):"",s?f.search:"",l?f.hash:""].join(""),r]}const tr=p.createContext(null);tr.displayName="ModalStackContext";const Cc=({children:e})=>{const[t,r]=p.useState([]),[n,o]=p.useState({});class i{constructor(c,m,y,w,S){Se(this,"updateStack",c=>{r(m=>{const y=c([...m]);return y.forEach((w,S)=>{y[S].index=S,y[S].onTopOfStack=S===y.length-1}),y})});Se(this,"setOpen",c=>{c?this.open=!0:this.close()});Se(this,"close",()=>{this.updateStack(c=>c.map(m=>{var y;return m.id===this.id&&(Object.keys(m.listeners).forEach(w=>{m.off(w)}),m.open=!1,(y=m.onCloseCallback)==null||y.call(m)),m}))});Se(this,"afterLeave",()=>{this.open||this.updateStack(c=>c.filter(m=>{var y;return m.id!==this.id?!0:((y=m.afterLeaveCallback)==null||y.call(m),!1)}))});Se(this,"on",(c,m)=>{this.listeners[c]=this.listeners[c]??[],this.listeners[c].push(m)});Se(this,"off",(c,m)=>{var y;m?this.listeners[c]=((y=this.listeners[c])==null?void 0:y.filter(w=>w!==m))??[]:delete this.listeners[c]});Se(this,"emit",(c,...m)=>{var y;return console.log("Emitting",c,"with args",m),(y=this.listeners[c])==null||y.forEach(w=>w(...m)),"OK"});Se(this,"registerEventListenersFromProps",c=>{const m=[];return Object.keys(c).filter(y=>y.startsWith("on")).forEach(y=>{const w=y.replace(/^on/,"").replace(/^./,S=>S.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();this.on(w,c[y]),m.push(()=>this.off(w,c[y]))}),()=>m.forEach(y=>y())});Se(this,"reload",(c={})=>{let m=Object.keys(this.response.props);c.only&&(m=xo(m,c.only)),c.except&&(m=Gs(m,c.except)),z.get(this.response.url,{headers:{Accept:"text/html, application/xhtml+xml","X-Inertia":!0,"X-Inertia-Partial-Component":this.response.component,"X-Inertia-Version":this.response.version,"X-Inertia-Partial-Data":m.join(",")}}).then(y=>{Object.assign(this.componentProps,y.data.props),r(w=>[...w])})});this.id=i.generateId(),this.open=!0,this.listeners={},this.component=c,this.componentProps=m.props,this.response=m,this.modalProps=y,this.onCloseCallback=w,this.afterLeaveCallback=S,this.index=-1,this.getParentModal=()=>null,this.getChildModal=()=>null,this.onTopOfStack=!0}static generateId(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`inertiaui_modal_${crypto.randomUUID()}`:`inertiaui_modal_${Date.now().toString(36)}_${Math.random().toString(36).substr(2,9)}`}}const a=(g,c,m,y,w)=>{const S=new i(g,c,m,y,w);return r(x=>{const O=[...x,S];return O.forEach((T,P)=>{T.index=P,T.onTopOfStack=P===O.length-1}),O.forEach((T,P)=>{T.getParentModal=()=>P>0?O[P-1]:null,T.getChildModal=()=>P<O.length-1?O[P+1]:null}),O}),S};function s(g,c,m,y){if(!n[g])throw new Error(`The local modal "${g}" has not been registered.`);const w=a(null,{},c,m,y);return w.name=g,n[g].callback(w),w}const l=(g,c={})=>f(g,c.method??"get",c.data??{},c.headers??{},c.config??{},c.onClose,c.onAfterLeave,c.queryStringArrayFormat??"brackets"),f=(g,c,m={},y={},w={},S=null,x=null,O="brackets")=>new Promise((T,P)=>{if(g.startsWith("#")){const H=s(g.substring(1),w,S,x);T(H);return}const[_,j]=Pc(c,g||"",m,O);Js().then(H=>{z({url:_,method:c,data:j,headers:{...y,Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0,"X-Inertia-Version":H.version,"X-InertiaUI-Modal":!0}}).then(I=>{De.router.resolveComponent(I.data.component).then(X=>{T(a(X,I.data,w,S,x))})}).catch(I=>{P(I)})})}),v={stack:t,localModals:n,push:a,reset:()=>r([]),visit:f,visitModal:l,registerLocalModal:(g,c)=>{o(m=>({...m,[g]:{name:g,callback:c}}))},removeLocalModal:g=>{o(c=>{const m={...c};return delete m[g],m})}};return R.jsx(tr.Provider,{value:v,children:e})},rr=()=>{const e=p.useContext(tr);if(e===null)throw new Error("useModalStack must be used within a ModalStackProvider");return e},hi=["closeButton","closeExplicitly","maxWidth","paddingClasses","panelClasses","position","slideover"],Fc=({children:e})=>{const t=p.useContext(tr).stack;return R.jsxs(R.Fragment,{children:[e,t.length>0&&R.jsx(gi,{index:0})]})},fn=p.createContext(null);fn.displayName="ModalIndexContext";const vi=()=>{const e=p.useContext(fn);if(e===void 0)throw new Error("useModalIndex must be used within a ModalIndexProvider");return e},gi=({index:e})=>{const{stack:t}=rr(),r=t[e];return!r||!r.component?null:R.jsx(fn.Provider,{value:e,children:R.jsx(r.component,{...r.componentProps,onModalEvent:(...n)=>r.emit(...n)})})},dn=p.forwardRef(({name:e,children:t,...r},n)=>{const o=vi(),{stack:i,registerLocalModal:a,removeLocalModal:s}=rr(),[l,f]=p.useState(null),u=p.useMemo(()=>e?l:i[o]),h=p.useMemo(()=>(u==null?void 0:u.modalProps.slideover)??r.slideover??Dn("type")==="slideover",[r.slideover]),v=p.useMemo(()=>({slideover:h,closeButton:r.closeButton??Ye(h,"closeButton"),closeExplicitly:r.closeExplicitly??Ye(h,"closeExplicitly"),maxWidth:r.maxWidth??Ye(h,"maxWidth"),paddingClasses:r.paddingClasses??Ye(h,"paddingClasses"),panelClasses:r.panelClasses??Ye(h,"panelClasses"),position:r.position??Ye(h,"position"),...u==null?void 0:u.modalProps}),[r,u==null?void 0:u.modalProps]);return p.useEffect(()=>{if(e){let g=null;return a(e,c=>{g=c.registerEventListenersFromProps(r),f(c)}),()=>{g==null||g(),g=null,s(e)}}return u.registerEventListenersFromProps(r)},[e]),p.useImperativeHandle(n,()=>({afterLeave:()=>u.afterLeave(),close:()=>u.close(),emit:(...g)=>u.emit(...g),getChildModal:()=>u.getChildModal(),getParentModal:()=>u.getParentModal(),index:u==null?void 0:u.index,isOpen:u==null?void 0:u.open,modalContext:u,modalProps:v,reload:()=>u.reload(),setOpen:()=>u.setOpen()}),[u]),u&&R.jsxs(R.Fragment,{children:[typeof t=="function"?t({afterLeave:u.afterLeave,close:u.close,emit:u.emit,getChildModal:u.getChildModal,getParentModal:u.getParentModal,index:u.index,isOpen:u.open,modalContext:u,modalProps:v,reload:u.reload,setOpen:u.setOpen}):t,i[u.index+1]&&R.jsx(gi,{index:u.index+1})]})});dn.displayName="HeadlessModal";function bi(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=bi(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function nr(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=bi(e))&&(n&&(n+=" "),n+=t);return n}var $c=Object.defineProperty,_c=(e,t,r)=>t in e?$c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pn=(e,t,r)=>(_c(e,typeof t!="symbol"?t+"":t,r),r);let Nc=class{constructor(){pn(this,"current",this.detect()),pn(this,"handoffState","pending"),pn(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},We=new Nc;function or(e){return We.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function ir(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Fe(){let e=[],t={addEventListener(r,n,o,i){return r.addEventListener(n,o,i),t.add(()=>r.removeEventListener(n,o,i))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return ir(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,o){let i=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:o}),this.add(()=>{Object.assign(r.style,{[n]:i})})},group(r){let n=Fe();return r(n),this.add(()=>n.dispose())},add(r){return e.includes(r)||e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let o of e.splice(n,1))o()}},dispose(){for(let r of e.splice(0))r()}};return t}function mn(){let[e]=p.useState(Fe);return p.useEffect(()=>()=>e.dispose(),[e]),e}let ne=(e,t)=>{We.isServer?p.useEffect(e,t):p.useLayoutEffect(e,t)};function He(e){let t=p.useRef(e);return ne(()=>{t.current=e},[e]),t}let q=function(e){let t=He(e);return p.useCallback((...r)=>t.current(...r),[t])},Mc=p.createContext(void 0);function Rc(){return p.useContext(Mc)}function yn(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function $e(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,$e),n}var ar=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ar||{}),_e=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(_e||{});function fe({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:o,visible:i=!0,name:a,mergeRefs:s}){s=s??Dc;let l=wi(t,e);if(i)return sr(l,r,n,a,s);let f=o??0;if(f&2){let{static:u=!1,...h}=l;if(u)return sr(h,r,n,a,s)}if(f&1){let{unmount:u=!0,...h}=l;return $e(u?0:1,{0(){return null},1(){return sr({...h,hidden:!0,style:{display:"none"}},r,n,a,s)}})}return sr(l,r,n,a,s)}function sr(e,t={},r,n,o){let{as:i=r,children:a,refName:s="ref",...l}=hn(e,["unmount","static"]),f=e.ref!==void 0?{[s]:e.ref}:{},u=typeof a=="function"?a(t):a;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let h={};if(t){let v=!1,g=[];for(let[c,m]of Object.entries(t))typeof m=="boolean"&&(v=!0),m===!0&&g.push(c.replace(/([A-Z])/g,y=>`-${y.toLowerCase()}`));if(v){h["data-headlessui-state"]=g.join(" ");for(let c of g)h[`data-${c}`]=""}}if(i===p.Fragment&&(Object.keys(qe(l)).length>0||Object.keys(qe(h)).length>0))if(!p.isValidElement(u)||Array.isArray(u)&&u.length>1){if(Object.keys(qe(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(qe(l)).concat(Object.keys(qe(h))).map(v=>` - ${v}`).join(`
|
|
40
40
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(v=>` - ${v}`).join(`
|
|
41
41
|
`)].join(`
|
|
42
42
|
`))}else{let v=u.props,g=v==null?void 0:v.className,c=typeof g=="function"?(...w)=>yn(g(...w),l.className):yn(g,l.className),m=c?{className:c}:{},y=wi(u.props,qe(hn(l,["ref"])));for(let w in h)w in y&&delete h[w];return p.cloneElement(u,Object.assign({},y,h,f,{ref:o(u.ref,f.ref)},m))}return p.createElement(i,Object.assign({},hn(l,["ref"]),i!==p.Fragment&&f,i!==p.Fragment&&h),u)}function Dc(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function wi(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];if(t.disabled||t["aria-disabled"])for(let n in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(r[n]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let n in r)Object.assign(t,{[n](o,...i){let a=r[n];for(let s of a){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return t}function se(e){var t;return Object.assign(p.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function qe(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function hn(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let Ic="span";var lr=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(lr||{});function Lc(e,t){var r;let{features:n=1,...o}=e,i={ref:t,"aria-hidden":(n&2)===2?!0:(r=o["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return fe({ourProps:i,theirProps:o,slot:{},defaultTag:Ic,name:"Hidden"})}let vn=se(Lc),Ei=Symbol();function kc(e,t=!0){return Object.assign(e,{[Ei]:t})}function be(...e){let t=p.useRef(e);p.useEffect(()=>{t.current=e},[e]);let r=q(n=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return e.every(n=>n==null||(n==null?void 0:n[Ei]))?void 0:r}let gn=p.createContext(null);gn.displayName="DescriptionContext";function Si(){let e=p.useContext(gn);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Si),t}return e}function jc(){let[e,t]=p.useState([]);return[e.length>0?e.join(" "):void 0,p.useMemo(()=>function(r){let n=q(i=>(t(a=>[...a,i]),()=>t(a=>{let s=a.slice(),l=s.indexOf(i);return l!==-1&&s.splice(l,1),s}))),o=p.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props,value:r.value}),[n,r.slot,r.name,r.props,r.value]);return p.createElement(gn.Provider,{value:o},r.children)},[t])]}let Bc="p";function Uc(e,t){let r=p.useId(),n=Rc(),{id:o=`headlessui-description-${r}`,...i}=e,a=Si(),s=be(t);ne(()=>a.register(o),[o,a.register]);let l=n||!1,f=p.useMemo(()=>({...a.slot,disabled:l}),[a.slot,l]),u={ref:s,...a.props,id:o};return fe({ourProps:u,theirProps:i,slot:f,defaultTag:Bc,name:a.name||"Description"})}let Wc=se(Uc),Hc=Object.assign(Wc,{});var xi=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(xi||{});let qc=p.createContext(()=>{});function Vc({value:e,children:t}){return p.createElement(qc.Provider,{value:e},t)}let zc=class extends Map{constructor(t){super(),this.factory=t}get(t){let r=super.get(t);return r===void 0&&(r=this.factory(t),this.set(t,r)),r}};function Oi(e,t){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...i){let a=t[o].call(r,...i);a&&(r=a,n.forEach(s=>s()))}}}function Ai(e){return p.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}let Gc=new zc(()=>Oi(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let r=this.slice();return r.splice(t,1),r}}));function ut(e,t){let r=Gc.get(t),n=p.useId(),o=Ai(r);if(ne(()=>{if(e)return r.dispatch("ADD",n),()=>r.dispatch("REMOVE",n)},[r,e]),!e)return!1;let i=o.indexOf(n),a=o.length;return i===-1&&(i=a,a+=1),i===a-1}let bn=new Map,Pt=new Map;function Ti(e){var t;let r=(t=Pt.get(e))!=null?t:0;return Pt.set(e,r+1),r!==0?()=>Pi(e):(bn.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Pi(e))}function Pi(e){var t;let r=(t=Pt.get(e))!=null?t:1;if(r===1?Pt.delete(e):Pt.set(e,r-1),r!==1)return;let n=bn.get(e);n&&(n["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,bn.delete(e))}function Kc(e,{allowed:t,disallowed:r}={}){let n=ut(e,"inert-others");ne(()=>{var o,i;if(!n)return;let a=Fe();for(let l of(o=r==null?void 0:r())!=null?o:[])l&&a.add(Ti(l));let s=(i=t==null?void 0:t())!=null?i:[];for(let l of s){if(!l)continue;let f=or(l);if(!f)continue;let u=l.parentElement;for(;u&&u!==f.body;){for(let h of u.children)s.some(v=>h.contains(v))||a.add(Ti(h));u=u.parentElement}}return a.dispose},[n,t,r])}function Jc(e,t,r){let n=He(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&r()});p.useEffect(()=>{if(!e)return;let o=t===null?null:t instanceof HTMLElement?t:t.current;if(!o)return;let i=Fe();if(typeof ResizeObserver<"u"){let a=new ResizeObserver(()=>n.current(o));a.observe(o),i.add(()=>a.disconnect())}if(typeof IntersectionObserver<"u"){let a=new IntersectionObserver(()=>n.current(o));a.observe(o),i.add(()=>a.disconnect())}return()=>i.dispose()},[t,n,e])}let ur=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Yc=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var xe=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(xe||{}),wn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(wn||{}),Xc=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Xc||{});function Qc(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(ur)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}function Zc(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Yc)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ci=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ci||{});function ef(e,t=0){var r;return e===((r=or(e))==null?void 0:r.body)?!1:$e(t,{0(){return e.matches(ur)},1(){let n=e;for(;n!==null;){if(n.matches(ur))return!0;n=n.parentElement}return!1}})}var tf=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(tf||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Oe(e){e==null||e.focus({preventScroll:!0})}let rf=["textarea","input"].join(",");function nf(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,rf))!=null?r:!1}function of(e,t=r=>r){return e.slice().sort((r,n)=>{let o=t(r),i=t(n);if(o===null||i===null)return 0;let a=o.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Ct(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?r?of(e):e:t&64?Zc(e):Qc(e);o.length>0&&a.length>1&&(a=a.filter(g=>!o.some(c=>c!=null&&"current"in c?(c==null?void 0:c.current)===g:c===g))),n=n??i.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,a.indexOf(n))-1;if(t&4)return Math.max(0,a.indexOf(n))+1;if(t&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=t&32?{preventScroll:!0}:{},u=0,h=a.length,v;do{if(u>=h||u+h<=0)return 0;let g=l+u;if(t&16)g=(g+h)%h;else{if(g<0)return 3;if(g>=h)return 1}v=a[g],v==null||v.focus(f),u+=s}while(v!==i.activeElement);return t&6&&nf(v)&&v.select(),2}function Fi(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function af(){return/Android/gi.test(window.navigator.userAgent)}function sf(){return Fi()||af()}function Ft(e,t,r,n){let o=He(r);p.useEffect(()=>{if(!e)return;function i(a){o.current(a)}return document.addEventListener(t,i,n),()=>document.removeEventListener(t,i,n)},[e,t,n])}function $i(e,t,r,n){let o=He(r);p.useEffect(()=>{if(!e)return;function i(a){o.current(a)}return window.addEventListener(t,i,n),()=>window.removeEventListener(t,i,n)},[e,t,n])}const _i=30;function lf(e,t,r){let n=ut(e,"outside-click"),o=He(r),i=p.useCallback(function(l,f){if(l.defaultPrevented)return;let u=f(l);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let h=function v(g){return typeof g=="function"?v(g()):Array.isArray(g)||g instanceof Set?g:[g]}(t);for(let v of h)if(v!==null&&(v.contains(u)||l.composed&&l.composedPath().includes(v)))return;return!ef(u,Ci.Loose)&&u.tabIndex!==-1&&l.preventDefault(),o.current(l,u)},[o,t]),a=p.useRef(null);Ft(n,"pointerdown",l=>{var f,u;a.current=((u=(f=l.composedPath)==null?void 0:f.call(l))==null?void 0:u[0])||l.target},!0),Ft(n,"mousedown",l=>{var f,u;a.current=((u=(f=l.composedPath)==null?void 0:f.call(l))==null?void 0:u[0])||l.target},!0),Ft(n,"click",l=>{sf()||a.current&&(i(l,()=>a.current),a.current=null)},!0);let s=p.useRef({x:0,y:0});Ft(n,"touchstart",l=>{s.current.x=l.touches[0].clientX,s.current.y=l.touches[0].clientY},!0),Ft(n,"touchend",l=>{let f={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(f.x-s.current.x)>=_i||Math.abs(f.y-s.current.y)>=_i))return i(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),$i(n,"blur",l=>i(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function $t(...e){return p.useMemo(()=>or(...e),[...e])}function Ni(e,t,r,n){let o=He(r);p.useEffect(()=>{e=e??window;function i(a){o.current(a)}return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)},[e,t,n])}function uf(){let e;return{before({doc:t}){var r;let n=t.documentElement,o=(r=t.defaultView)!=null?r:window;e=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),i=Math.max(0,e-o);r.style(n,"paddingRight",`${i}px`)}}}function cf(){return Fi()?{before({doc:e,d:t,meta:r}){function n(o){return r.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=Fe();s.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>s.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,a=null;t.addEventListener(e,"click",s=>{if(s.target instanceof HTMLElement)try{let l=s.target.closest("a");if(!l)return;let{hash:f}=new URL(l.href),u=e.querySelector(f);u&&!n(u)&&(a=u)}catch{}},!0),t.addEventListener(e,"touchstart",s=>{if(s.target instanceof HTMLElement)if(n(s.target)){let l=s.target;for(;l.parentElement&&n(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(s.target,"touchAction","none")}),t.addEventListener(e,"touchmove",s=>{if(s.target instanceof HTMLElement){if(s.target.tagName==="INPUT")return;if(n(s.target)){let l=s.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()}},{passive:!1}),t.add(()=>{var s;let l=(s=window.scrollY)!=null?s:window.pageYOffset;i!==l&&window.scrollTo(0,i),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function ff(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function df(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Ve=Oi(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:Fe(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:df(r)},o=[cf(),uf(),ff()];o.forEach(({before:i})=>i==null?void 0:i(n)),o.forEach(({after:i})=>i==null?void 0:i(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Ve.subscribe(()=>{let e=Ve.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=t.get(r.doc)==="hidden",o=r.count!==0;(o&&!n||!o&&n)&&Ve.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&Ve.dispatch("TEARDOWN",r)}});function pf(e,t,r=()=>({containers:[]})){let n=Ai(Ve),o=t?n.get(t):void 0,i=o?o.count>0:!1;return ne(()=>{if(!(!t||!e))return Ve.dispatch("PUSH",t,r),()=>Ve.dispatch("POP",t,r)},[e,t]),i}function mf(e,t,r=()=>[document.body]){let n=ut(e,"scroll-lock");pf(n,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],r]}})}function yf(e=0){let[t,r]=p.useState(e),n=p.useCallback(l=>r(l),[t]),o=p.useCallback(l=>r(f=>f|l),[t]),i=p.useCallback(l=>(t&l)===l,[t]),a=p.useCallback(l=>r(f=>f&~l),[r]),s=p.useCallback(l=>r(f=>f^l),[r]);return{flags:t,setFlag:n,addFlag:o,hasFlag:i,removeFlag:a,toggleFlag:s}}var Mi,Ri;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Mi=process==null?void 0:process.env)==null?void 0:Mi.NODE_ENV)==="test"&&typeof((Ri=Element==null?void 0:Element.prototype)==null?void 0:Ri.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
package/package.json
CHANGED
package/src/HeadlessModal.jsx
CHANGED
|
@@ -54,8 +54,8 @@ const HeadlessModal = forwardRef(({ name, children, ...props }, ref) => {
|
|
|
54
54
|
emit: (...args) => modalContext.emit(...args),
|
|
55
55
|
getChildModal: () => modalContext.getChildModal(),
|
|
56
56
|
getParentModal: () => modalContext.getParentModal(),
|
|
57
|
-
index: modalContext
|
|
58
|
-
isOpen: modalContext
|
|
57
|
+
index: modalContext?.index,
|
|
58
|
+
isOpen: modalContext?.open,
|
|
59
59
|
modalContext,
|
|
60
60
|
modalProps,
|
|
61
61
|
reload: () => modalContext.reload(),
|