@inertiaui/modal-react 0.16.0 → 0.17.0
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 +1899 -1876
- package/dist/inertiaui-modal.umd.cjs +20 -13
- package/package.json +4 -5
- package/src/HeadlessModal.jsx +17 -1
- package/src/Modal.jsx +19 -7
- package/src/ModalContent.jsx +38 -15
- package/src/ModalRoot.jsx +46 -36
- package/src/SlideoverContent.jsx +40 -17
- package/src/focusTrapper.js +23 -0
- package/src/helpers.js +2 -2
package/dist/inertiaui-modal.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { router as
|
|
8
|
-
import { mergeDataIntoQueryString as
|
|
9
|
-
|
|
10
|
-
const De = {
|
|
1
|
+
var en = Object.defineProperty;
|
|
2
|
+
var tn = (t, e, r) => e in t ? en(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var oe = (t, e, r) => tn(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import * as _e from "react";
|
|
5
|
+
import J, { createContext as Je, useState as z, useEffect as X, useContext as Pe, useRef as q, createElement as Ve, useMemo as ve, forwardRef as Tt, useImperativeHandle as er, useLayoutEffect as rn, useCallback as ue, Fragment as we, isValidElement as nn, cloneElement as an } from "react";
|
|
6
|
+
import He from "axios";
|
|
7
|
+
import { router as Ie, usePage as sn } from "@inertiajs/react";
|
|
8
|
+
import { mergeDataIntoQueryString as ln } from "@inertiajs/core";
|
|
9
|
+
const ke = {
|
|
11
10
|
type: "modal",
|
|
12
11
|
navigate: !1,
|
|
13
12
|
modal: {
|
|
@@ -27,44 +26,44 @@ const De = {
|
|
|
27
26
|
position: "right"
|
|
28
27
|
}
|
|
29
28
|
};
|
|
30
|
-
class
|
|
29
|
+
class on {
|
|
31
30
|
constructor() {
|
|
32
31
|
this.config = {}, this.reset();
|
|
33
32
|
}
|
|
34
33
|
reset() {
|
|
35
|
-
this.config = JSON.parse(JSON.stringify(
|
|
34
|
+
this.config = JSON.parse(JSON.stringify(ke));
|
|
36
35
|
}
|
|
37
|
-
put(
|
|
38
|
-
if (typeof
|
|
36
|
+
put(e, r) {
|
|
37
|
+
if (typeof e == "object") {
|
|
39
38
|
this.config = {
|
|
40
|
-
type:
|
|
41
|
-
navigate:
|
|
42
|
-
modal: { ...
|
|
43
|
-
slideover: { ...
|
|
39
|
+
type: e.type ?? ke.type,
|
|
40
|
+
navigate: e.navigate ?? ke.navigate,
|
|
41
|
+
modal: { ...ke.modal, ...e.modal ?? {} },
|
|
42
|
+
slideover: { ...ke.slideover, ...e.slideover ?? {} }
|
|
44
43
|
};
|
|
45
44
|
return;
|
|
46
45
|
}
|
|
47
|
-
const
|
|
48
|
-
let
|
|
49
|
-
for (let
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
const n = e.split(".");
|
|
47
|
+
let s = this.config;
|
|
48
|
+
for (let l = 0; l < n.length - 1; l++)
|
|
49
|
+
s = s[n[l]] = s[n[l]] || {};
|
|
50
|
+
s[n[n.length - 1]] = r;
|
|
52
51
|
}
|
|
53
|
-
get(
|
|
54
|
-
if (typeof
|
|
52
|
+
get(e) {
|
|
53
|
+
if (typeof e > "u")
|
|
55
54
|
return this.config;
|
|
56
|
-
const
|
|
57
|
-
let
|
|
58
|
-
for (const
|
|
59
|
-
if (
|
|
55
|
+
const r = e.split(".");
|
|
56
|
+
let n = this.config;
|
|
57
|
+
for (const s of r) {
|
|
58
|
+
if (n[s] === void 0)
|
|
60
59
|
return null;
|
|
61
|
-
|
|
60
|
+
n = n[s];
|
|
62
61
|
}
|
|
63
|
-
return
|
|
62
|
+
return n;
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
|
-
const
|
|
67
|
-
var
|
|
65
|
+
const Ze = new on(), Ca = () => Ze.reset(), ka = (t, e) => Ze.put(t, e), Rt = (t) => Ze.get(t), Re = (t, e) => Ze.get(t ? `slideover.${e}` : `modal.${e}`);
|
|
66
|
+
var mt = { exports: {} }, Fe = {};
|
|
68
67
|
/**
|
|
69
68
|
* @license React
|
|
70
69
|
* react-jsx-runtime.production.min.js
|
|
@@ -74,21 +73,21 @@ var Ct = { exports: {} }, We = {};
|
|
|
74
73
|
* This source code is licensed under the MIT license found in the
|
|
75
74
|
* LICENSE file in the root directory of this source tree.
|
|
76
75
|
*/
|
|
77
|
-
var
|
|
78
|
-
function
|
|
79
|
-
if (
|
|
80
|
-
|
|
81
|
-
var
|
|
82
|
-
function
|
|
83
|
-
var
|
|
84
|
-
|
|
85
|
-
for (
|
|
86
|
-
if (
|
|
87
|
-
return { $$typeof:
|
|
76
|
+
var Kt;
|
|
77
|
+
function un() {
|
|
78
|
+
if (Kt) return Fe;
|
|
79
|
+
Kt = 1;
|
|
80
|
+
var t = J, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
81
|
+
function i(m, o, g) {
|
|
82
|
+
var y, w = {}, P = null, S = null;
|
|
83
|
+
g !== void 0 && (P = "" + g), o.key !== void 0 && (P = "" + o.key), o.ref !== void 0 && (S = o.ref);
|
|
84
|
+
for (y in o) n.call(o, y) && !l.hasOwnProperty(y) && (w[y] = o[y]);
|
|
85
|
+
if (m && m.defaultProps) for (y in o = m.defaultProps, o) w[y] === void 0 && (w[y] = o[y]);
|
|
86
|
+
return { $$typeof: e, type: m, key: P, ref: S, props: w, _owner: s.current };
|
|
88
87
|
}
|
|
89
|
-
return
|
|
88
|
+
return Fe.Fragment = r, Fe.jsx = i, Fe.jsxs = i, Fe;
|
|
90
89
|
}
|
|
91
|
-
var
|
|
90
|
+
var Ne = {};
|
|
92
91
|
/**
|
|
93
92
|
* @license React
|
|
94
93
|
* react-jsx-runtime.development.js
|
|
@@ -98,54 +97,54 @@ var Ue = {};
|
|
|
98
97
|
* This source code is licensed under the MIT license found in the
|
|
99
98
|
* LICENSE file in the root directory of this source tree.
|
|
100
99
|
*/
|
|
101
|
-
var
|
|
102
|
-
function
|
|
103
|
-
return
|
|
104
|
-
var
|
|
100
|
+
var Vt;
|
|
101
|
+
function cn() {
|
|
102
|
+
return Vt || (Vt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
103
|
+
var t = J, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), m = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), p = Symbol.iterator, E = "@@iterator";
|
|
105
104
|
function d(a) {
|
|
106
105
|
if (a === null || typeof a != "object")
|
|
107
106
|
return null;
|
|
108
|
-
var h =
|
|
107
|
+
var h = p && a[p] || a[E];
|
|
109
108
|
return typeof h == "function" ? h : null;
|
|
110
109
|
}
|
|
111
|
-
var
|
|
110
|
+
var f = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
112
111
|
function v(a) {
|
|
113
112
|
{
|
|
114
|
-
for (var h = arguments.length,
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
for (var h = arguments.length, x = new Array(h > 1 ? h - 1 : 0), C = 1; C < h; C++)
|
|
114
|
+
x[C - 1] = arguments[C];
|
|
115
|
+
R("error", a, x);
|
|
117
116
|
}
|
|
118
117
|
}
|
|
119
|
-
function
|
|
118
|
+
function R(a, h, x) {
|
|
120
119
|
{
|
|
121
|
-
var
|
|
122
|
-
|
|
123
|
-
var
|
|
124
|
-
return String(
|
|
120
|
+
var C = f.ReactDebugCurrentFrame, M = C.getStackAddendum();
|
|
121
|
+
M !== "" && (h += "%s", x = x.concat([M]));
|
|
122
|
+
var $ = x.map(function(A) {
|
|
123
|
+
return String(A);
|
|
125
124
|
});
|
|
126
|
-
|
|
125
|
+
$.unshift("Warning: " + h), Function.prototype.apply.call(console[a], console, $);
|
|
127
126
|
}
|
|
128
127
|
}
|
|
129
|
-
var
|
|
130
|
-
|
|
131
|
-
function
|
|
132
|
-
return !!(typeof a == "string" || typeof a == "function" || a ===
|
|
128
|
+
var O = !1, b = !1, D = !1, B = !1, Z = !1, ee;
|
|
129
|
+
ee = Symbol.for("react.module.reference");
|
|
130
|
+
function Y(a) {
|
|
131
|
+
return !!(typeof a == "string" || typeof a == "function" || a === n || a === l || Z || a === s || a === g || a === y || B || a === S || O || b || D || typeof a == "object" && a !== null && (a.$$typeof === P || a.$$typeof === w || a.$$typeof === i || a.$$typeof === m || a.$$typeof === o || // This needs to include all possible module reference object
|
|
133
132
|
// types supported by any Flight configuration anywhere since
|
|
134
133
|
// we don't know which Flight build this will end up being used
|
|
135
134
|
// with.
|
|
136
|
-
a.$$typeof ===
|
|
135
|
+
a.$$typeof === ee || a.getModuleId !== void 0));
|
|
137
136
|
}
|
|
138
|
-
function
|
|
139
|
-
var
|
|
140
|
-
if (
|
|
141
|
-
return
|
|
142
|
-
var
|
|
143
|
-
return
|
|
137
|
+
function G(a, h, x) {
|
|
138
|
+
var C = a.displayName;
|
|
139
|
+
if (C)
|
|
140
|
+
return C;
|
|
141
|
+
var M = h.displayName || h.name || "";
|
|
142
|
+
return M !== "" ? x + "(" + M + ")" : x;
|
|
144
143
|
}
|
|
145
|
-
function
|
|
144
|
+
function j(a) {
|
|
146
145
|
return a.displayName || "Context";
|
|
147
146
|
}
|
|
148
|
-
function
|
|
147
|
+
function u(a) {
|
|
149
148
|
if (a == null)
|
|
150
149
|
return null;
|
|
151
150
|
if (typeof a.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof a == "function")
|
|
@@ -153,36 +152,36 @@ function Ir() {
|
|
|
153
152
|
if (typeof a == "string")
|
|
154
153
|
return a;
|
|
155
154
|
switch (a) {
|
|
156
|
-
case r:
|
|
157
|
-
return "Fragment";
|
|
158
155
|
case n:
|
|
156
|
+
return "Fragment";
|
|
157
|
+
case r:
|
|
159
158
|
return "Portal";
|
|
160
|
-
case o:
|
|
161
|
-
return "Profiler";
|
|
162
159
|
case l:
|
|
160
|
+
return "Profiler";
|
|
161
|
+
case s:
|
|
163
162
|
return "StrictMode";
|
|
164
|
-
case
|
|
163
|
+
case g:
|
|
165
164
|
return "Suspense";
|
|
166
|
-
case
|
|
165
|
+
case y:
|
|
167
166
|
return "SuspenseList";
|
|
168
167
|
}
|
|
169
168
|
if (typeof a == "object")
|
|
170
169
|
switch (a.$$typeof) {
|
|
171
|
-
case
|
|
170
|
+
case m:
|
|
172
171
|
var h = a;
|
|
173
|
-
return
|
|
174
|
-
case u:
|
|
175
|
-
var E = a;
|
|
176
|
-
return G(E._context) + ".Provider";
|
|
172
|
+
return j(h) + ".Consumer";
|
|
177
173
|
case i:
|
|
178
|
-
|
|
174
|
+
var x = a;
|
|
175
|
+
return j(x._context) + ".Provider";
|
|
176
|
+
case o:
|
|
177
|
+
return G(a, a.render, "ForwardRef");
|
|
179
178
|
case w:
|
|
180
|
-
var
|
|
181
|
-
return
|
|
182
|
-
case
|
|
183
|
-
var
|
|
179
|
+
var C = a.displayName || null;
|
|
180
|
+
return C !== null ? C : u(a.type) || "Memo";
|
|
181
|
+
case P: {
|
|
182
|
+
var M = a, $ = M._payload, A = M._init;
|
|
184
183
|
try {
|
|
185
|
-
return
|
|
184
|
+
return u(A($));
|
|
186
185
|
} catch {
|
|
187
186
|
return null;
|
|
188
187
|
}
|
|
@@ -190,18 +189,18 @@ function Ir() {
|
|
|
190
189
|
}
|
|
191
190
|
return null;
|
|
192
191
|
}
|
|
193
|
-
var
|
|
194
|
-
function
|
|
192
|
+
var c = Object.assign, T = 0, I, _, L, k, W, U, ae;
|
|
193
|
+
function K() {
|
|
195
194
|
}
|
|
196
|
-
|
|
197
|
-
function
|
|
195
|
+
K.__reactDisabledLog = !0;
|
|
196
|
+
function ie() {
|
|
198
197
|
{
|
|
199
|
-
if (
|
|
200
|
-
|
|
198
|
+
if (T === 0) {
|
|
199
|
+
I = console.log, _ = console.info, L = console.warn, k = console.error, W = console.group, U = console.groupCollapsed, ae = console.groupEnd;
|
|
201
200
|
var a = {
|
|
202
201
|
configurable: !0,
|
|
203
202
|
enumerable: !0,
|
|
204
|
-
value:
|
|
203
|
+
value: K,
|
|
205
204
|
writable: !0
|
|
206
205
|
};
|
|
207
206
|
Object.defineProperties(console, {
|
|
@@ -214,332 +213,332 @@ function Ir() {
|
|
|
214
213
|
groupEnd: a
|
|
215
214
|
});
|
|
216
215
|
}
|
|
217
|
-
|
|
216
|
+
T++;
|
|
218
217
|
}
|
|
219
218
|
}
|
|
220
|
-
function
|
|
219
|
+
function re() {
|
|
221
220
|
{
|
|
222
|
-
if (
|
|
221
|
+
if (T--, T === 0) {
|
|
223
222
|
var a = {
|
|
224
223
|
configurable: !0,
|
|
225
224
|
enumerable: !0,
|
|
226
225
|
writable: !0
|
|
227
226
|
};
|
|
228
227
|
Object.defineProperties(console, {
|
|
229
|
-
log:
|
|
230
|
-
value:
|
|
228
|
+
log: c({}, a, {
|
|
229
|
+
value: I
|
|
231
230
|
}),
|
|
232
|
-
info:
|
|
233
|
-
value:
|
|
231
|
+
info: c({}, a, {
|
|
232
|
+
value: _
|
|
234
233
|
}),
|
|
235
|
-
warn:
|
|
236
|
-
value:
|
|
234
|
+
warn: c({}, a, {
|
|
235
|
+
value: L
|
|
237
236
|
}),
|
|
238
|
-
error:
|
|
239
|
-
value:
|
|
237
|
+
error: c({}, a, {
|
|
238
|
+
value: k
|
|
240
239
|
}),
|
|
241
|
-
group:
|
|
242
|
-
value:
|
|
240
|
+
group: c({}, a, {
|
|
241
|
+
value: W
|
|
243
242
|
}),
|
|
244
|
-
groupCollapsed:
|
|
245
|
-
value:
|
|
243
|
+
groupCollapsed: c({}, a, {
|
|
244
|
+
value: U
|
|
246
245
|
}),
|
|
247
|
-
groupEnd:
|
|
248
|
-
value:
|
|
246
|
+
groupEnd: c({}, a, {
|
|
247
|
+
value: ae
|
|
249
248
|
})
|
|
250
249
|
});
|
|
251
250
|
}
|
|
252
|
-
|
|
251
|
+
T < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
253
252
|
}
|
|
254
253
|
}
|
|
255
|
-
var
|
|
256
|
-
function
|
|
254
|
+
var fe = f.ReactCurrentDispatcher, le;
|
|
255
|
+
function ne(a, h, x) {
|
|
257
256
|
{
|
|
258
|
-
if (
|
|
257
|
+
if (le === void 0)
|
|
259
258
|
try {
|
|
260
259
|
throw Error();
|
|
261
|
-
} catch (
|
|
262
|
-
var
|
|
263
|
-
|
|
260
|
+
} catch (M) {
|
|
261
|
+
var C = M.stack.trim().match(/\n( *(at )?)/);
|
|
262
|
+
le = C && C[1] || "";
|
|
264
263
|
}
|
|
265
264
|
return `
|
|
266
|
-
` +
|
|
265
|
+
` + le + a;
|
|
267
266
|
}
|
|
268
267
|
}
|
|
269
|
-
var
|
|
268
|
+
var ce = !1, Le;
|
|
270
269
|
{
|
|
271
|
-
var
|
|
272
|
-
|
|
270
|
+
var kr = typeof WeakMap == "function" ? WeakMap : Map;
|
|
271
|
+
Le = new kr();
|
|
273
272
|
}
|
|
274
|
-
function
|
|
275
|
-
if (!a ||
|
|
273
|
+
function Ct(a, h) {
|
|
274
|
+
if (!a || ce)
|
|
276
275
|
return "";
|
|
277
276
|
{
|
|
278
|
-
var
|
|
279
|
-
if (
|
|
280
|
-
return
|
|
277
|
+
var x = Le.get(a);
|
|
278
|
+
if (x !== void 0)
|
|
279
|
+
return x;
|
|
281
280
|
}
|
|
282
|
-
var
|
|
283
|
-
|
|
284
|
-
var
|
|
281
|
+
var C;
|
|
282
|
+
ce = !0;
|
|
283
|
+
var M = Error.prepareStackTrace;
|
|
285
284
|
Error.prepareStackTrace = void 0;
|
|
286
|
-
var
|
|
287
|
-
|
|
285
|
+
var $;
|
|
286
|
+
$ = fe.current, fe.current = null, ie();
|
|
288
287
|
try {
|
|
289
288
|
if (h) {
|
|
290
|
-
var
|
|
289
|
+
var A = function() {
|
|
291
290
|
throw Error();
|
|
292
291
|
};
|
|
293
|
-
if (Object.defineProperty(
|
|
292
|
+
if (Object.defineProperty(A.prototype, "props", {
|
|
294
293
|
set: function() {
|
|
295
294
|
throw Error();
|
|
296
295
|
}
|
|
297
296
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
298
297
|
try {
|
|
299
|
-
Reflect.construct(
|
|
300
|
-
} catch (
|
|
301
|
-
|
|
298
|
+
Reflect.construct(A, []);
|
|
299
|
+
} catch (te) {
|
|
300
|
+
C = te;
|
|
302
301
|
}
|
|
303
|
-
Reflect.construct(a, [],
|
|
302
|
+
Reflect.construct(a, [], A);
|
|
304
303
|
} else {
|
|
305
304
|
try {
|
|
306
|
-
|
|
307
|
-
} catch (
|
|
308
|
-
|
|
305
|
+
A.call();
|
|
306
|
+
} catch (te) {
|
|
307
|
+
C = te;
|
|
309
308
|
}
|
|
310
|
-
a.call(
|
|
309
|
+
a.call(A.prototype);
|
|
311
310
|
}
|
|
312
311
|
} else {
|
|
313
312
|
try {
|
|
314
313
|
throw Error();
|
|
315
|
-
} catch (
|
|
316
|
-
|
|
314
|
+
} catch (te) {
|
|
315
|
+
C = te;
|
|
317
316
|
}
|
|
318
317
|
a();
|
|
319
318
|
}
|
|
320
|
-
} catch (
|
|
321
|
-
if (
|
|
322
|
-
for (var
|
|
323
|
-
`),
|
|
324
|
-
`),
|
|
325
|
-
|
|
326
|
-
for (;
|
|
327
|
-
if (
|
|
328
|
-
if (
|
|
319
|
+
} catch (te) {
|
|
320
|
+
if (te && C && typeof te.stack == "string") {
|
|
321
|
+
for (var N = te.stack.split(`
|
|
322
|
+
`), Q = C.stack.split(`
|
|
323
|
+
`), V = N.length - 1, H = Q.length - 1; V >= 1 && H >= 0 && N[V] !== Q[H]; )
|
|
324
|
+
H--;
|
|
325
|
+
for (; V >= 1 && H >= 0; V--, H--)
|
|
326
|
+
if (N[V] !== Q[H]) {
|
|
327
|
+
if (V !== 1 || H !== 1)
|
|
329
328
|
do
|
|
330
|
-
if (
|
|
331
|
-
var
|
|
332
|
-
` +
|
|
333
|
-
return a.displayName &&
|
|
329
|
+
if (V--, H--, H < 0 || N[V] !== Q[H]) {
|
|
330
|
+
var se = `
|
|
331
|
+
` + N[V].replace(" at new ", " at ");
|
|
332
|
+
return a.displayName && se.includes("<anonymous>") && (se = se.replace("<anonymous>", a.displayName)), typeof a == "function" && Le.set(a, se), se;
|
|
334
333
|
}
|
|
335
|
-
while (
|
|
334
|
+
while (V >= 1 && H >= 0);
|
|
336
335
|
break;
|
|
337
336
|
}
|
|
338
337
|
}
|
|
339
338
|
} finally {
|
|
340
|
-
|
|
339
|
+
ce = !1, fe.current = $, re(), Error.prepareStackTrace = M;
|
|
341
340
|
}
|
|
342
|
-
var
|
|
343
|
-
return typeof a == "function" &&
|
|
341
|
+
var Te = a ? a.displayName || a.name : "", me = Te ? ne(Te) : "";
|
|
342
|
+
return typeof a == "function" && Le.set(a, me), me;
|
|
344
343
|
}
|
|
345
|
-
function
|
|
346
|
-
return
|
|
344
|
+
function Fr(a, h, x) {
|
|
345
|
+
return Ct(a, !1);
|
|
347
346
|
}
|
|
348
|
-
function
|
|
347
|
+
function Nr(a) {
|
|
349
348
|
var h = a.prototype;
|
|
350
349
|
return !!(h && h.isReactComponent);
|
|
351
350
|
}
|
|
352
|
-
function
|
|
351
|
+
function $e(a, h, x) {
|
|
353
352
|
if (a == null)
|
|
354
353
|
return "";
|
|
355
354
|
if (typeof a == "function")
|
|
356
|
-
return
|
|
355
|
+
return Ct(a, Nr(a));
|
|
357
356
|
if (typeof a == "string")
|
|
358
|
-
return
|
|
357
|
+
return ne(a);
|
|
359
358
|
switch (a) {
|
|
360
|
-
case
|
|
361
|
-
return
|
|
362
|
-
case
|
|
363
|
-
return
|
|
359
|
+
case g:
|
|
360
|
+
return ne("Suspense");
|
|
361
|
+
case y:
|
|
362
|
+
return ne("SuspenseList");
|
|
364
363
|
}
|
|
365
364
|
if (typeof a == "object")
|
|
366
365
|
switch (a.$$typeof) {
|
|
367
|
-
case
|
|
368
|
-
return
|
|
366
|
+
case o:
|
|
367
|
+
return Fr(a.render);
|
|
369
368
|
case w:
|
|
370
|
-
return
|
|
371
|
-
case
|
|
372
|
-
var
|
|
369
|
+
return $e(a.type, h, x);
|
|
370
|
+
case P: {
|
|
371
|
+
var C = a, M = C._payload, $ = C._init;
|
|
373
372
|
try {
|
|
374
|
-
return
|
|
373
|
+
return $e($(M), h, x);
|
|
375
374
|
} catch {
|
|
376
375
|
}
|
|
377
376
|
}
|
|
378
377
|
}
|
|
379
378
|
return "";
|
|
380
379
|
}
|
|
381
|
-
var
|
|
382
|
-
function
|
|
380
|
+
var Ce = Object.prototype.hasOwnProperty, kt = {}, Ft = f.ReactDebugCurrentFrame;
|
|
381
|
+
function We(a) {
|
|
383
382
|
if (a) {
|
|
384
|
-
var h = a._owner,
|
|
385
|
-
|
|
383
|
+
var h = a._owner, x = $e(a.type, a._source, h ? h.type : null);
|
|
384
|
+
Ft.setExtraStackFrame(x);
|
|
386
385
|
} else
|
|
387
|
-
|
|
386
|
+
Ft.setExtraStackFrame(null);
|
|
388
387
|
}
|
|
389
|
-
function
|
|
388
|
+
function jr(a, h, x, C, M) {
|
|
390
389
|
{
|
|
391
|
-
var
|
|
392
|
-
for (var
|
|
393
|
-
if (
|
|
394
|
-
var
|
|
390
|
+
var $ = Function.call.bind(Ce);
|
|
391
|
+
for (var A in a)
|
|
392
|
+
if ($(a, A)) {
|
|
393
|
+
var N = void 0;
|
|
395
394
|
try {
|
|
396
|
-
if (typeof a[
|
|
397
|
-
var
|
|
398
|
-
throw
|
|
395
|
+
if (typeof a[A] != "function") {
|
|
396
|
+
var Q = Error((C || "React class") + ": " + x + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
397
|
+
throw Q.name = "Invariant Violation", Q;
|
|
399
398
|
}
|
|
400
|
-
|
|
401
|
-
} catch (
|
|
402
|
-
|
|
399
|
+
N = a[A](h, A, C, x, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
400
|
+
} catch (V) {
|
|
401
|
+
N = V;
|
|
403
402
|
}
|
|
404
|
-
|
|
403
|
+
N && !(N instanceof Error) && (We(M), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", x, A, typeof N), We(null)), N instanceof Error && !(N.message in kt) && (kt[N.message] = !0, We(M), v("Failed %s type: %s", x, N.message), We(null));
|
|
405
404
|
}
|
|
406
405
|
}
|
|
407
406
|
}
|
|
408
|
-
var
|
|
409
|
-
function
|
|
410
|
-
return
|
|
407
|
+
var Ar = Array.isArray;
|
|
408
|
+
function lt(a) {
|
|
409
|
+
return Ar(a);
|
|
411
410
|
}
|
|
412
|
-
function
|
|
411
|
+
function Ir(a) {
|
|
413
412
|
{
|
|
414
|
-
var h = typeof Symbol == "function" && Symbol.toStringTag,
|
|
415
|
-
return
|
|
413
|
+
var h = typeof Symbol == "function" && Symbol.toStringTag, x = h && a[Symbol.toStringTag] || a.constructor.name || "Object";
|
|
414
|
+
return x;
|
|
416
415
|
}
|
|
417
416
|
}
|
|
418
|
-
function
|
|
417
|
+
function _r(a) {
|
|
419
418
|
try {
|
|
420
|
-
return
|
|
419
|
+
return Nt(a), !1;
|
|
421
420
|
} catch {
|
|
422
421
|
return !0;
|
|
423
422
|
}
|
|
424
423
|
}
|
|
425
|
-
function
|
|
424
|
+
function Nt(a) {
|
|
426
425
|
return "" + a;
|
|
427
426
|
}
|
|
428
|
-
function
|
|
429
|
-
if (
|
|
430
|
-
return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
427
|
+
function jt(a) {
|
|
428
|
+
if (_r(a))
|
|
429
|
+
return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ir(a)), Nt(a);
|
|
431
430
|
}
|
|
432
|
-
var
|
|
431
|
+
var At = f.ReactCurrentOwner, Dr = {
|
|
433
432
|
key: !0,
|
|
434
433
|
ref: !0,
|
|
435
434
|
__self: !0,
|
|
436
435
|
__source: !0
|
|
437
|
-
},
|
|
438
|
-
function
|
|
439
|
-
if (
|
|
436
|
+
}, It, _t;
|
|
437
|
+
function Mr(a) {
|
|
438
|
+
if (Ce.call(a, "ref")) {
|
|
440
439
|
var h = Object.getOwnPropertyDescriptor(a, "ref").get;
|
|
441
440
|
if (h && h.isReactWarning)
|
|
442
441
|
return !1;
|
|
443
442
|
}
|
|
444
443
|
return a.ref !== void 0;
|
|
445
444
|
}
|
|
446
|
-
function
|
|
447
|
-
if (
|
|
445
|
+
function Lr(a) {
|
|
446
|
+
if (Ce.call(a, "key")) {
|
|
448
447
|
var h = Object.getOwnPropertyDescriptor(a, "key").get;
|
|
449
448
|
if (h && h.isReactWarning)
|
|
450
449
|
return !1;
|
|
451
450
|
}
|
|
452
451
|
return a.key !== void 0;
|
|
453
452
|
}
|
|
454
|
-
function
|
|
455
|
-
typeof a.ref == "string" &&
|
|
453
|
+
function $r(a, h) {
|
|
454
|
+
typeof a.ref == "string" && At.current;
|
|
456
455
|
}
|
|
457
|
-
function
|
|
456
|
+
function Wr(a, h) {
|
|
458
457
|
{
|
|
459
|
-
var
|
|
460
|
-
|
|
458
|
+
var x = function() {
|
|
459
|
+
It || (It = !0, v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
|
|
461
460
|
};
|
|
462
|
-
|
|
463
|
-
get:
|
|
461
|
+
x.isReactWarning = !0, Object.defineProperty(a, "key", {
|
|
462
|
+
get: x,
|
|
464
463
|
configurable: !0
|
|
465
464
|
});
|
|
466
465
|
}
|
|
467
466
|
}
|
|
468
|
-
function
|
|
467
|
+
function Ur(a, h) {
|
|
469
468
|
{
|
|
470
|
-
var
|
|
471
|
-
|
|
469
|
+
var x = function() {
|
|
470
|
+
_t || (_t = !0, v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
|
|
472
471
|
};
|
|
473
|
-
|
|
474
|
-
get:
|
|
472
|
+
x.isReactWarning = !0, Object.defineProperty(a, "ref", {
|
|
473
|
+
get: x,
|
|
475
474
|
configurable: !0
|
|
476
475
|
});
|
|
477
476
|
}
|
|
478
477
|
}
|
|
479
|
-
var
|
|
480
|
-
var
|
|
478
|
+
var Br = function(a, h, x, C, M, $, A) {
|
|
479
|
+
var N = {
|
|
481
480
|
// This tag allows us to uniquely identify this as a React Element
|
|
482
|
-
$$typeof:
|
|
481
|
+
$$typeof: e,
|
|
483
482
|
// Built-in properties that belong on the element
|
|
484
483
|
type: a,
|
|
485
484
|
key: h,
|
|
486
|
-
ref:
|
|
487
|
-
props:
|
|
485
|
+
ref: x,
|
|
486
|
+
props: A,
|
|
488
487
|
// Record the component responsible for creating this element.
|
|
489
|
-
_owner:
|
|
488
|
+
_owner: $
|
|
490
489
|
};
|
|
491
|
-
return
|
|
490
|
+
return N._store = {}, Object.defineProperty(N._store, "validated", {
|
|
492
491
|
configurable: !1,
|
|
493
492
|
enumerable: !1,
|
|
494
493
|
writable: !0,
|
|
495
494
|
value: !1
|
|
496
|
-
}), Object.defineProperty(
|
|
495
|
+
}), Object.defineProperty(N, "_self", {
|
|
497
496
|
configurable: !1,
|
|
498
497
|
enumerable: !1,
|
|
499
498
|
writable: !1,
|
|
500
|
-
value:
|
|
501
|
-
}), Object.defineProperty(
|
|
499
|
+
value: C
|
|
500
|
+
}), Object.defineProperty(N, "_source", {
|
|
502
501
|
configurable: !1,
|
|
503
502
|
enumerable: !1,
|
|
504
503
|
writable: !1,
|
|
505
|
-
value:
|
|
506
|
-
}), Object.freeze && (Object.freeze(
|
|
504
|
+
value: M
|
|
505
|
+
}), Object.freeze && (Object.freeze(N.props), Object.freeze(N)), N;
|
|
507
506
|
};
|
|
508
|
-
function
|
|
507
|
+
function Kr(a, h, x, C, M) {
|
|
509
508
|
{
|
|
510
|
-
var
|
|
511
|
-
|
|
512
|
-
for (
|
|
513
|
-
|
|
509
|
+
var $, A = {}, N = null, Q = null;
|
|
510
|
+
x !== void 0 && (jt(x), N = "" + x), Lr(h) && (jt(h.key), N = "" + h.key), Mr(h) && (Q = h.ref, $r(h, M));
|
|
511
|
+
for ($ in h)
|
|
512
|
+
Ce.call(h, $) && !Dr.hasOwnProperty($) && (A[$] = h[$]);
|
|
514
513
|
if (a && a.defaultProps) {
|
|
515
|
-
var
|
|
516
|
-
for (
|
|
517
|
-
|
|
514
|
+
var V = a.defaultProps;
|
|
515
|
+
for ($ in V)
|
|
516
|
+
A[$] === void 0 && (A[$] = V[$]);
|
|
518
517
|
}
|
|
519
|
-
if (
|
|
520
|
-
var
|
|
521
|
-
|
|
518
|
+
if (N || Q) {
|
|
519
|
+
var H = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
|
|
520
|
+
N && Wr(A, H), Q && Ur(A, H);
|
|
522
521
|
}
|
|
523
|
-
return
|
|
522
|
+
return Br(a, N, Q, M, C, At.current, A);
|
|
524
523
|
}
|
|
525
524
|
}
|
|
526
|
-
var
|
|
527
|
-
function
|
|
525
|
+
var ot = f.ReactCurrentOwner, Dt = f.ReactDebugCurrentFrame;
|
|
526
|
+
function Ee(a) {
|
|
528
527
|
if (a) {
|
|
529
|
-
var h = a._owner,
|
|
530
|
-
|
|
528
|
+
var h = a._owner, x = $e(a.type, a._source, h ? h.type : null);
|
|
529
|
+
Dt.setExtraStackFrame(x);
|
|
531
530
|
} else
|
|
532
|
-
|
|
531
|
+
Dt.setExtraStackFrame(null);
|
|
533
532
|
}
|
|
534
|
-
var
|
|
535
|
-
|
|
536
|
-
function
|
|
537
|
-
return typeof a == "object" && a !== null && a.$$typeof ===
|
|
533
|
+
var ut;
|
|
534
|
+
ut = !1;
|
|
535
|
+
function ct(a) {
|
|
536
|
+
return typeof a == "object" && a !== null && a.$$typeof === e;
|
|
538
537
|
}
|
|
539
|
-
function
|
|
538
|
+
function Mt() {
|
|
540
539
|
{
|
|
541
|
-
if (
|
|
542
|
-
var a =
|
|
540
|
+
if (ot.current) {
|
|
541
|
+
var a = u(ot.current.type);
|
|
543
542
|
if (a)
|
|
544
543
|
return `
|
|
545
544
|
|
|
@@ -548,283 +547,314 @@ Check the render method of \`` + a + "`.";
|
|
|
548
547
|
return "";
|
|
549
548
|
}
|
|
550
549
|
}
|
|
551
|
-
function
|
|
550
|
+
function Vr(a) {
|
|
552
551
|
return "";
|
|
553
552
|
}
|
|
554
|
-
var
|
|
555
|
-
function
|
|
553
|
+
var Lt = {};
|
|
554
|
+
function Hr(a) {
|
|
556
555
|
{
|
|
557
|
-
var h =
|
|
556
|
+
var h = Mt();
|
|
558
557
|
if (!h) {
|
|
559
|
-
var
|
|
560
|
-
|
|
558
|
+
var x = typeof a == "string" ? a : a.displayName || a.name;
|
|
559
|
+
x && (h = `
|
|
561
560
|
|
|
562
|
-
Check the top-level render call using <` +
|
|
561
|
+
Check the top-level render call using <` + x + ">.");
|
|
563
562
|
}
|
|
564
563
|
return h;
|
|
565
564
|
}
|
|
566
565
|
}
|
|
567
|
-
function
|
|
566
|
+
function $t(a, h) {
|
|
568
567
|
{
|
|
569
568
|
if (!a._store || a._store.validated || a.key != null)
|
|
570
569
|
return;
|
|
571
570
|
a._store.validated = !0;
|
|
572
|
-
var
|
|
573
|
-
if (
|
|
571
|
+
var x = Hr(h);
|
|
572
|
+
if (Lt[x])
|
|
574
573
|
return;
|
|
575
|
-
|
|
576
|
-
var
|
|
577
|
-
a && a._owner && a._owner !==
|
|
574
|
+
Lt[x] = !0;
|
|
575
|
+
var C = "";
|
|
576
|
+
a && a._owner && a._owner !== ot.current && (C = " It was passed a child from " + u(a._owner.type) + "."), Ee(a), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', x, C), Ee(null);
|
|
578
577
|
}
|
|
579
578
|
}
|
|
580
|
-
function
|
|
579
|
+
function Wt(a, h) {
|
|
581
580
|
{
|
|
582
581
|
if (typeof a != "object")
|
|
583
582
|
return;
|
|
584
|
-
if (
|
|
585
|
-
for (var
|
|
586
|
-
var
|
|
587
|
-
|
|
583
|
+
if (lt(a))
|
|
584
|
+
for (var x = 0; x < a.length; x++) {
|
|
585
|
+
var C = a[x];
|
|
586
|
+
ct(C) && $t(C, h);
|
|
588
587
|
}
|
|
589
|
-
else if (
|
|
588
|
+
else if (ct(a))
|
|
590
589
|
a._store && (a._store.validated = !0);
|
|
591
590
|
else if (a) {
|
|
592
|
-
var
|
|
593
|
-
if (typeof
|
|
594
|
-
for (var
|
|
595
|
-
|
|
591
|
+
var M = d(a);
|
|
592
|
+
if (typeof M == "function" && M !== a.entries)
|
|
593
|
+
for (var $ = M.call(a), A; !(A = $.next()).done; )
|
|
594
|
+
ct(A.value) && $t(A.value, h);
|
|
596
595
|
}
|
|
597
596
|
}
|
|
598
597
|
}
|
|
599
|
-
function
|
|
598
|
+
function Yr(a) {
|
|
600
599
|
{
|
|
601
600
|
var h = a.type;
|
|
602
601
|
if (h == null || typeof h == "string")
|
|
603
602
|
return;
|
|
604
|
-
var
|
|
603
|
+
var x;
|
|
605
604
|
if (typeof h == "function")
|
|
606
|
-
|
|
607
|
-
else if (typeof h == "object" && (h.$$typeof ===
|
|
605
|
+
x = h.propTypes;
|
|
606
|
+
else if (typeof h == "object" && (h.$$typeof === o || // Note: Memo only checks outer props here.
|
|
608
607
|
// Inner props are checked in the reconciler.
|
|
609
608
|
h.$$typeof === w))
|
|
610
|
-
|
|
609
|
+
x = h.propTypes;
|
|
611
610
|
else
|
|
612
611
|
return;
|
|
613
|
-
if (
|
|
614
|
-
var
|
|
615
|
-
|
|
616
|
-
} else if (h.PropTypes !== void 0 && !
|
|
617
|
-
|
|
618
|
-
var
|
|
619
|
-
v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
612
|
+
if (x) {
|
|
613
|
+
var C = u(h);
|
|
614
|
+
jr(x, a.props, "prop", C, a);
|
|
615
|
+
} else if (h.PropTypes !== void 0 && !ut) {
|
|
616
|
+
ut = !0;
|
|
617
|
+
var M = u(h);
|
|
618
|
+
v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", M || "Unknown");
|
|
620
619
|
}
|
|
621
620
|
typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
622
621
|
}
|
|
623
622
|
}
|
|
624
|
-
function
|
|
623
|
+
function qr(a) {
|
|
625
624
|
{
|
|
626
|
-
for (var h = Object.keys(a.props),
|
|
627
|
-
var
|
|
628
|
-
if (
|
|
629
|
-
|
|
625
|
+
for (var h = Object.keys(a.props), x = 0; x < h.length; x++) {
|
|
626
|
+
var C = h[x];
|
|
627
|
+
if (C !== "children" && C !== "key") {
|
|
628
|
+
Ee(a), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), Ee(null);
|
|
630
629
|
break;
|
|
631
630
|
}
|
|
632
631
|
}
|
|
633
|
-
a.ref !== null && (
|
|
632
|
+
a.ref !== null && (Ee(a), v("Invalid attribute `ref` supplied to `React.Fragment`."), Ee(null));
|
|
634
633
|
}
|
|
635
634
|
}
|
|
636
|
-
var
|
|
637
|
-
function
|
|
635
|
+
var Ut = {};
|
|
636
|
+
function Bt(a, h, x, C, M, $) {
|
|
638
637
|
{
|
|
639
|
-
var
|
|
640
|
-
if (!
|
|
641
|
-
var
|
|
642
|
-
(a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (
|
|
643
|
-
var
|
|
644
|
-
|
|
645
|
-
var
|
|
646
|
-
a === null ?
|
|
638
|
+
var A = Y(a);
|
|
639
|
+
if (!A) {
|
|
640
|
+
var N = "";
|
|
641
|
+
(a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (N += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
642
|
+
var Q = Vr();
|
|
643
|
+
Q ? N += Q : N += Mt();
|
|
644
|
+
var V;
|
|
645
|
+
a === null ? V = "null" : lt(a) ? V = "array" : a !== void 0 && a.$$typeof === e ? (V = "<" + (u(a.type) || "Unknown") + " />", N = " Did you accidentally export a JSX literal instead of a component?") : V = typeof a, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", V, N);
|
|
647
646
|
}
|
|
648
|
-
var
|
|
649
|
-
if (
|
|
650
|
-
return
|
|
651
|
-
if (
|
|
652
|
-
var
|
|
653
|
-
if (
|
|
654
|
-
if (
|
|
655
|
-
if (
|
|
656
|
-
for (var
|
|
657
|
-
|
|
658
|
-
Object.freeze && Object.freeze(
|
|
647
|
+
var H = Kr(a, h, x, M, $);
|
|
648
|
+
if (H == null)
|
|
649
|
+
return H;
|
|
650
|
+
if (A) {
|
|
651
|
+
var se = h.children;
|
|
652
|
+
if (se !== void 0)
|
|
653
|
+
if (C)
|
|
654
|
+
if (lt(se)) {
|
|
655
|
+
for (var Te = 0; Te < se.length; Te++)
|
|
656
|
+
Wt(se[Te], a);
|
|
657
|
+
Object.freeze && Object.freeze(se);
|
|
659
658
|
} else
|
|
660
659
|
v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
661
660
|
else
|
|
662
|
-
|
|
661
|
+
Wt(se, a);
|
|
663
662
|
}
|
|
664
|
-
if (
|
|
665
|
-
var
|
|
666
|
-
return
|
|
667
|
-
}),
|
|
668
|
-
if (!
|
|
669
|
-
var
|
|
663
|
+
if (Ce.call(h, "key")) {
|
|
664
|
+
var me = u(a), te = Object.keys(h).filter(function(Qr) {
|
|
665
|
+
return Qr !== "key";
|
|
666
|
+
}), dt = te.length > 0 ? "{key: someKey, " + te.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
667
|
+
if (!Ut[me + dt]) {
|
|
668
|
+
var Zr = te.length > 0 ? "{" + te.join(": ..., ") + ": ...}" : "{}";
|
|
670
669
|
v(`A props object containing a "key" prop is being spread into JSX:
|
|
671
670
|
let props = %s;
|
|
672
671
|
<%s {...props} />
|
|
673
672
|
React keys must be passed directly to JSX without using spread:
|
|
674
673
|
let props = %s;
|
|
675
|
-
<%s key={someKey} {...props} />`,
|
|
674
|
+
<%s key={someKey} {...props} />`, dt, me, Zr, me), Ut[me + dt] = !0;
|
|
676
675
|
}
|
|
677
676
|
}
|
|
678
|
-
return a ===
|
|
677
|
+
return a === n ? qr(H) : Yr(H), H;
|
|
679
678
|
}
|
|
680
679
|
}
|
|
681
|
-
function
|
|
682
|
-
return
|
|
680
|
+
function Xr(a, h, x) {
|
|
681
|
+
return Bt(a, h, x, !0);
|
|
683
682
|
}
|
|
684
|
-
function
|
|
685
|
-
return
|
|
683
|
+
function zr(a, h, x) {
|
|
684
|
+
return Bt(a, h, x, !1);
|
|
686
685
|
}
|
|
687
|
-
var
|
|
688
|
-
|
|
689
|
-
}()),
|
|
686
|
+
var Gr = zr, Jr = Xr;
|
|
687
|
+
Ne.Fragment = n, Ne.jsx = Gr, Ne.jsxs = Jr;
|
|
688
|
+
}()), Ne;
|
|
689
|
+
}
|
|
690
|
+
process.env.NODE_ENV === "production" ? mt.exports = un() : mt.exports = cn();
|
|
691
|
+
var F = mt.exports;
|
|
692
|
+
const Ht = {
|
|
693
|
+
modifiedElements: [],
|
|
694
|
+
bodyState: {
|
|
695
|
+
hasOverflowHidden: !1,
|
|
696
|
+
hasPointerEventsNone: !1,
|
|
697
|
+
originalPaddingRight: ""
|
|
698
|
+
},
|
|
699
|
+
prepare() {
|
|
700
|
+
const t = window.innerWidth - document.documentElement.clientWidth;
|
|
701
|
+
this.bodyState.originalPaddingRight = document.body.style.paddingRight;
|
|
702
|
+
const e = parseInt(window.getComputedStyle(document.body).paddingRight, 10);
|
|
703
|
+
document.body.style.paddingRight = `${e + t}px`, document.body.classList.contains("overflow-hidden") || (document.body.classList.add("overflow-hidden"), this.bodyState.hasOverflowHidden = !0), document.body.classList.contains("pointer-events-none") || (document.body.classList.add("pointer-events-none"), this.bodyState.hasPointerEventsNone = !0), Array.from(document.body.children).forEach((r) => {
|
|
704
|
+
!r.classList.contains("im-dialog") && r.getAttribute("aria-hidden") !== "true" && (r.setAttribute("aria-hidden", "true"), this.modifiedElements.push(r));
|
|
705
|
+
});
|
|
706
|
+
},
|
|
707
|
+
cleanup() {
|
|
708
|
+
this.bodyState.hasOverflowHidden && (document.body.classList.remove("overflow-hidden"), this.bodyState.hasOverflowHidden = !1), this.bodyState.hasPointerEventsNone && (document.body.classList.remove("pointer-events-none"), this.bodyState.hasPointerEventsNone = !1), document.body.style.paddingRight = this.bodyState.originalPaddingRight, this.bodyState.originalPaddingRight = "", this.modifiedElements.forEach((t) => {
|
|
709
|
+
t.removeAttribute("aria-hidden");
|
|
710
|
+
}), this.modifiedElements = [];
|
|
711
|
+
}
|
|
712
|
+
};
|
|
713
|
+
function ft(t = "inertiaui_modal_") {
|
|
714
|
+
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? `${t}${crypto.randomUUID()}` : `${t}${Date.now().toString(36)}_${Math.random().toString(36).substr(2, 9)}`;
|
|
690
715
|
}
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
function Nr(e, t) {
|
|
694
|
-
return Array.isArray(e) ? e.filter((n) => !t.includes(n)) : Object.keys(e).reduce((n, r) => (t.includes(r) || (n[r] = e[r]), n), {});
|
|
716
|
+
function dn(t, e) {
|
|
717
|
+
return Array.isArray(t) ? t.filter((r) => !e.includes(r)) : Object.keys(t).reduce((r, n) => (e.includes(n) || (r[n] = t[n]), r), {});
|
|
695
718
|
}
|
|
696
|
-
function
|
|
697
|
-
return Array.isArray(
|
|
719
|
+
function tr(t, e) {
|
|
720
|
+
return Array.isArray(t) ? t.filter((r) => e.includes(r)) : e.reduce((r, n) => (n in t && (r[n] = t[n]), r), {});
|
|
698
721
|
}
|
|
699
|
-
function
|
|
700
|
-
return Array.isArray(
|
|
722
|
+
function fn(t) {
|
|
723
|
+
return Array.isArray(t) ? t.filter((e) => e !== null) : Object.keys(t).reduce((e, r) => (r in t && t[r] !== null && (e[r] = t[r]), e), {});
|
|
701
724
|
}
|
|
702
|
-
function
|
|
703
|
-
return new Promise((
|
|
704
|
-
const
|
|
705
|
-
if (
|
|
706
|
-
|
|
725
|
+
function vn(t, e = 3, r = 10) {
|
|
726
|
+
return new Promise((n, s) => {
|
|
727
|
+
const l = t();
|
|
728
|
+
if (l) {
|
|
729
|
+
n(l);
|
|
707
730
|
return;
|
|
708
731
|
}
|
|
709
|
-
let
|
|
710
|
-
const
|
|
711
|
-
const
|
|
712
|
-
|
|
713
|
-
},
|
|
732
|
+
let i = e * 1e3 / r;
|
|
733
|
+
const m = setInterval(() => {
|
|
734
|
+
const o = t();
|
|
735
|
+
o && (clearInterval(m), n(o)), --i <= 0 && (clearInterval(m), s(new Error("Condition not met in time")));
|
|
736
|
+
}, r);
|
|
714
737
|
});
|
|
715
738
|
}
|
|
716
|
-
function
|
|
717
|
-
return
|
|
718
|
-
}
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
let
|
|
722
|
-
const
|
|
723
|
-
const [
|
|
724
|
-
|
|
725
|
-
const
|
|
726
|
-
var
|
|
727
|
-
return
|
|
739
|
+
function je(t) {
|
|
740
|
+
return t ? (t = t.replace(/_/g, "-"), t = t.replace(/-+/g, "-"), /[A-Z]/.test(t) ? (t = t.replace(/\s+/g, "").replace(/_/g, "").replace(/(?:^|\s|-)+([A-Za-z])/g, (e, r) => r.toUpperCase()), t = t.replace(/(.)(?=[A-Z])/g, "$1-"), t.toLowerCase()) : t) : "";
|
|
741
|
+
}
|
|
742
|
+
const Qe = Je(null);
|
|
743
|
+
Qe.displayName = "ModalStackContext";
|
|
744
|
+
let rr = null, nr = null, De = null, bt = null, gt = [], Se = {};
|
|
745
|
+
const pn = ({ children: t }) => {
|
|
746
|
+
const [e, r] = z([]), [n, s] = z({}), l = (E) => {
|
|
747
|
+
r((d) => {
|
|
748
|
+
const f = E([...d]), v = (R) => {
|
|
749
|
+
var O;
|
|
750
|
+
return f.length < 2 ? !0 : ((O = f.map((b) => ({ id: b.id, shouldRender: b.shouldRender })).reverse().find((b) => b.shouldRender)) == null ? void 0 : O.id) === R;
|
|
728
751
|
};
|
|
729
|
-
return
|
|
730
|
-
|
|
731
|
-
}),
|
|
752
|
+
return f.forEach((R, O) => {
|
|
753
|
+
f[O].onTopOfStack = v(R.id), f[O].getParentModal = () => O < 1 ? null : f.slice(0, O).reverse().find((b) => b.isOpen), f[O].getChildModal = () => O === f.length - 1 ? null : f.slice(O + 1).find((b) => b.isOpen);
|
|
754
|
+
}), f;
|
|
732
755
|
});
|
|
733
756
|
};
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
}, [
|
|
737
|
-
class
|
|
738
|
-
constructor(d,
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
(
|
|
742
|
-
);
|
|
743
|
-
});
|
|
744
|
-
le(this, "show", () => {
|
|
745
|
-
o(
|
|
746
|
-
(d) => d.map((m) => (m.id === this.id && !m.isOpen && (m.isOpen = !0, m.shouldRender = !0), m))
|
|
757
|
+
X(() => {
|
|
758
|
+
gt = e;
|
|
759
|
+
}, [e]);
|
|
760
|
+
class i {
|
|
761
|
+
constructor(d, f, v, R, O) {
|
|
762
|
+
oe(this, "show", () => {
|
|
763
|
+
l(
|
|
764
|
+
(d) => d.map((f) => (f.id === this.id && !f.isOpen && (f.isOpen = !0, f.shouldRender = !0), f))
|
|
747
765
|
);
|
|
748
766
|
});
|
|
749
|
-
|
|
767
|
+
oe(this, "setOpen", (d) => {
|
|
750
768
|
d ? this.show() : this.close();
|
|
751
769
|
});
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
(d) => d.map((
|
|
770
|
+
oe(this, "close", () => {
|
|
771
|
+
l(
|
|
772
|
+
(d) => d.map((f) => {
|
|
755
773
|
var v;
|
|
756
|
-
return
|
|
757
|
-
|
|
758
|
-
}),
|
|
774
|
+
return f.id === this.id && f.isOpen && (Object.keys(f.listeners).forEach((R) => {
|
|
775
|
+
f.off(R);
|
|
776
|
+
}), f.isOpen = !1, (v = f.onCloseCallback) == null || v.call(f)), f;
|
|
759
777
|
})
|
|
760
778
|
);
|
|
761
779
|
});
|
|
762
|
-
|
|
763
|
-
this.isOpen ||
|
|
764
|
-
const
|
|
765
|
-
var
|
|
766
|
-
return v.id === this.id && !v.isOpen && (v.shouldRender = !1, (
|
|
780
|
+
oe(this, "afterLeave", () => {
|
|
781
|
+
this.isOpen || l((d) => {
|
|
782
|
+
const f = d.map((v) => {
|
|
783
|
+
var R;
|
|
784
|
+
return v.id === this.id && !v.isOpen && (v.shouldRender = !1, (R = v.afterLeaveCallback) == null || R.call(v), v.afterLeaveCallback = null), v;
|
|
767
785
|
});
|
|
768
|
-
return this.index === 0 ? [] :
|
|
786
|
+
return this.index === 0 ? [] : f;
|
|
769
787
|
});
|
|
770
788
|
});
|
|
771
|
-
|
|
772
|
-
d =
|
|
789
|
+
oe(this, "on", (d, f) => {
|
|
790
|
+
d = je(d), this.listeners[d] = this.listeners[d] ?? [], this.listeners[d].push(f);
|
|
773
791
|
});
|
|
774
|
-
|
|
792
|
+
oe(this, "off", (d, f) => {
|
|
775
793
|
var v;
|
|
776
|
-
d =
|
|
794
|
+
d = je(d), f ? this.listeners[d] = ((v = this.listeners[d]) == null ? void 0 : v.filter((R) => R !== f)) ?? [] : delete this.listeners[d];
|
|
777
795
|
});
|
|
778
|
-
|
|
796
|
+
oe(this, "emit", (d, ...f) => {
|
|
779
797
|
var v;
|
|
780
|
-
(v = this.listeners[
|
|
798
|
+
(v = this.listeners[je(d)]) == null || v.forEach((R) => R(...f));
|
|
781
799
|
});
|
|
782
|
-
|
|
783
|
-
const
|
|
800
|
+
oe(this, "registerEventListenersFromProps", (d) => {
|
|
801
|
+
const f = [];
|
|
784
802
|
return Object.keys(d).filter((v) => v.startsWith("on")).forEach((v) => {
|
|
785
|
-
const
|
|
786
|
-
this.on(
|
|
787
|
-
}), () =>
|
|
803
|
+
const R = je(v).replace(/^on-/, "");
|
|
804
|
+
this.on(R, d[v]), f.push(() => this.off(R, d[v]));
|
|
805
|
+
}), () => f.forEach((v) => v());
|
|
788
806
|
});
|
|
789
|
-
|
|
807
|
+
oe(this, "reload", (d = {}) => {
|
|
790
808
|
var v;
|
|
791
|
-
let
|
|
792
|
-
d.only && (
|
|
809
|
+
let f = Object.keys(this.response.props);
|
|
810
|
+
d.only && (f = tr(f, d.only)), d.except && (f = dn(f, d.except)), (v = this.response) != null && v.url && He.get(this.response.url, {
|
|
793
811
|
headers: {
|
|
794
812
|
Accept: "text/html, application/xhtml+xml",
|
|
795
813
|
"X-Inertia": !0,
|
|
796
814
|
"X-Inertia-Partial-Component": this.response.component,
|
|
797
815
|
"X-Inertia-Version": this.response.version,
|
|
798
|
-
"X-Inertia-Partial-Data":
|
|
799
|
-
"X-InertiaUI-Modal":
|
|
816
|
+
"X-Inertia-Partial-Data": f.join(","),
|
|
817
|
+
"X-InertiaUI-Modal": ft(),
|
|
800
818
|
"X-InertiaUI-Modal-Use-Router": 0,
|
|
801
|
-
"X-InertiaUI-Modal-Base-Url":
|
|
819
|
+
"X-InertiaUI-Modal-Base-Url": De
|
|
802
820
|
}
|
|
803
|
-
}).then((
|
|
804
|
-
this.updateProps(
|
|
821
|
+
}).then((R) => {
|
|
822
|
+
this.updateProps(R.data.props);
|
|
805
823
|
});
|
|
806
824
|
});
|
|
807
|
-
|
|
808
|
-
Object.assign(this.props, d),
|
|
825
|
+
oe(this, "updateProps", (d) => {
|
|
826
|
+
Object.assign(this.props, d), l((f) => f);
|
|
809
827
|
});
|
|
810
|
-
this.id =
|
|
828
|
+
if (this.id = f.id ?? ft(), this.isOpen = !1, this.shouldRender = !1, this.listeners = {}, this.component = d, this.props = f.props, this.response = f, this.config = v ?? {}, this.onCloseCallback = R, this.afterLeaveCallback = O, Se[this.id]) {
|
|
829
|
+
this.config = {
|
|
830
|
+
...this.config,
|
|
831
|
+
...Se[this.id].config ?? {}
|
|
832
|
+
};
|
|
833
|
+
const b = Se[this.id].onClose, D = Se[this.id].onAfterLeave;
|
|
834
|
+
b && (this.onCloseCallback = R ? () => {
|
|
835
|
+
R(), b();
|
|
836
|
+
} : b), D && (this.afterLeaveCallback = O ? () => {
|
|
837
|
+
O(), D();
|
|
838
|
+
} : D), delete Se[this.id];
|
|
839
|
+
}
|
|
840
|
+
this.index = -1, this.getParentModal = () => null, this.getChildModal = () => null, this.onTopOfStack = !0;
|
|
811
841
|
}
|
|
812
842
|
static generateId() {
|
|
813
843
|
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)}`;
|
|
814
844
|
}
|
|
815
845
|
}
|
|
816
|
-
const
|
|
817
|
-
const
|
|
818
|
-
return
|
|
846
|
+
const m = (E, d = {}, f = null, v = null) => nr(E.component).then((R) => o(R, E, d, f, v)), o = (E, d, f, v, R) => {
|
|
847
|
+
const O = new i(E, d, f, v, R);
|
|
848
|
+
return O.index = e.length, l((b) => [...b, O]), O.show(), O;
|
|
819
849
|
};
|
|
820
|
-
function
|
|
821
|
-
if (!
|
|
822
|
-
throw new Error(`The local modal "${
|
|
823
|
-
const
|
|
824
|
-
return
|
|
850
|
+
function g(E, d, f, v) {
|
|
851
|
+
if (!n[E])
|
|
852
|
+
throw new Error(`The local modal "${E}" has not been registered.`);
|
|
853
|
+
const R = o(null, {}, d, f, v);
|
|
854
|
+
return R.name = E, n[E].callback(R), R;
|
|
825
855
|
}
|
|
826
|
-
const
|
|
827
|
-
|
|
856
|
+
const y = (E, d = {}) => w(
|
|
857
|
+
E,
|
|
828
858
|
d.method ?? "get",
|
|
829
859
|
d.data ?? {},
|
|
830
860
|
d.headers ?? {},
|
|
@@ -832,290 +862,292 @@ const Ur = ({ children: e }) => {
|
|
|
832
862
|
d.onClose,
|
|
833
863
|
d.onAfterLeave,
|
|
834
864
|
d.queryStringArrayFormat ?? "brackets",
|
|
835
|
-
d.navigate ??
|
|
836
|
-
).then((
|
|
865
|
+
d.navigate ?? Rt("navigate")
|
|
866
|
+
).then((f) => {
|
|
837
867
|
const v = d.listeners ?? {};
|
|
838
|
-
return Object.keys(v).forEach((
|
|
839
|
-
const
|
|
840
|
-
|
|
841
|
-
}),
|
|
842
|
-
}), w = (
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
868
|
+
return Object.keys(v).forEach((R) => {
|
|
869
|
+
const O = je(R);
|
|
870
|
+
f.on(O, v[R]);
|
|
871
|
+
}), f;
|
|
872
|
+
}), w = (E, d, f = {}, v = {}, R = {}, O = null, b = null, D = "brackets", B = !1) => {
|
|
873
|
+
const Z = ft();
|
|
874
|
+
return new Promise((ee, Y) => {
|
|
875
|
+
if (E.startsWith("#")) {
|
|
876
|
+
ee(g(E.substring(1), R, O, b));
|
|
877
|
+
return;
|
|
878
|
+
}
|
|
879
|
+
const [G, j] = ln(d, E || "", f, D);
|
|
880
|
+
let u = B && e.length === 0;
|
|
881
|
+
if (e.length === 0 && (De = typeof window < "u" ? window.location.href : ""), v = {
|
|
882
|
+
...v,
|
|
883
|
+
Accept: "text/html, application/xhtml+xml",
|
|
884
|
+
"X-Requested-With": "XMLHttpRequest",
|
|
885
|
+
"X-Inertia": !0,
|
|
886
|
+
"X-Inertia-Version": rr,
|
|
887
|
+
"X-InertiaUI-Modal": Z,
|
|
888
|
+
"X-InertiaUI-Modal-Use-Router": u ? 1 : 0,
|
|
889
|
+
"X-InertiaUI-Modal-Base-Url": De
|
|
890
|
+
}, u)
|
|
891
|
+
return bt = null, Se[Z] = {
|
|
892
|
+
config: R,
|
|
893
|
+
onClose: O,
|
|
894
|
+
onAfterLeave: b
|
|
895
|
+
}, Ie.visit(G, {
|
|
896
|
+
method: d,
|
|
897
|
+
data: j,
|
|
898
|
+
headers: v,
|
|
899
|
+
preserveScroll: !0,
|
|
900
|
+
preserveState: !0,
|
|
901
|
+
onError: Y,
|
|
902
|
+
onFinish: () => {
|
|
903
|
+
vn(() => bt).then(ee);
|
|
904
|
+
}
|
|
905
|
+
});
|
|
906
|
+
He({
|
|
907
|
+
url: G,
|
|
860
908
|
method: d,
|
|
861
|
-
data:
|
|
862
|
-
headers: v
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
onError: te,
|
|
866
|
-
onFinish: () => {
|
|
867
|
-
Wr(() => $t).then((M) => {
|
|
868
|
-
const $ = M.onCloseCallback, I = M.afterLeaveCallback;
|
|
869
|
-
M.update(
|
|
870
|
-
x,
|
|
871
|
-
() => {
|
|
872
|
-
T == null || T(), $ == null || $();
|
|
873
|
-
},
|
|
874
|
-
() => {
|
|
875
|
-
F == null || F(), I == null || I();
|
|
876
|
-
}
|
|
877
|
-
), ee(M);
|
|
878
|
-
});
|
|
879
|
-
}
|
|
909
|
+
data: j,
|
|
910
|
+
headers: v
|
|
911
|
+
}).then((c) => ee(m(c.data, R, O, b))).catch((c) => {
|
|
912
|
+
Y(c);
|
|
880
913
|
});
|
|
881
|
-
lt({
|
|
882
|
-
url: H,
|
|
883
|
-
method: d,
|
|
884
|
-
data: q,
|
|
885
|
-
headers: v
|
|
886
|
-
}).then((M) => ee(s(M.data, x, T, F))).catch((M) => {
|
|
887
|
-
te(M);
|
|
888
914
|
});
|
|
889
|
-
}
|
|
890
|
-
stack:
|
|
891
|
-
localModals:
|
|
892
|
-
push:
|
|
893
|
-
pushFromResponseData:
|
|
915
|
+
}, p = {
|
|
916
|
+
stack: e,
|
|
917
|
+
localModals: n,
|
|
918
|
+
push: o,
|
|
919
|
+
pushFromResponseData: m,
|
|
894
920
|
closeAll: () => {
|
|
895
|
-
|
|
921
|
+
gt.reverse().forEach((E) => E.close());
|
|
896
922
|
},
|
|
897
|
-
reset: () =>
|
|
923
|
+
reset: () => l(() => []),
|
|
898
924
|
visit: w,
|
|
899
|
-
visitModal:
|
|
900
|
-
registerLocalModal: (
|
|
901
|
-
|
|
902
|
-
...
|
|
903
|
-
[
|
|
925
|
+
visitModal: y,
|
|
926
|
+
registerLocalModal: (E, d) => {
|
|
927
|
+
s((f) => ({
|
|
928
|
+
...f,
|
|
929
|
+
[E]: { name: E, callback: d }
|
|
904
930
|
}));
|
|
905
931
|
},
|
|
906
|
-
removeLocalModal: (
|
|
907
|
-
|
|
908
|
-
const
|
|
909
|
-
return delete
|
|
932
|
+
removeLocalModal: (E) => {
|
|
933
|
+
s((d) => {
|
|
934
|
+
const f = { ...d };
|
|
935
|
+
return delete f[E], f;
|
|
910
936
|
});
|
|
911
937
|
}
|
|
912
938
|
};
|
|
913
|
-
return /* @__PURE__ */
|
|
914
|
-
},
|
|
915
|
-
const
|
|
916
|
-
if (
|
|
939
|
+
return /* @__PURE__ */ F.jsx(Qe.Provider, { value: p, children: t });
|
|
940
|
+
}, et = () => {
|
|
941
|
+
const t = Pe(Qe);
|
|
942
|
+
if (t === null)
|
|
917
943
|
throw new Error("useModalStack must be used within a ModalStackProvider");
|
|
918
|
-
return
|
|
919
|
-
},
|
|
920
|
-
|
|
921
|
-
},
|
|
922
|
-
|
|
923
|
-
const
|
|
924
|
-
const
|
|
925
|
-
const
|
|
926
|
-
return typeof
|
|
944
|
+
return t;
|
|
945
|
+
}, Yt = ["closeButton", "closeExplicitly", "maxWidth", "paddingClasses", "panelClasses", "position", "slideover"], hn = (t) => {
|
|
946
|
+
t.initialPage && (rr = t.initialPage.version), t.resolveComponent && (nr = t.resolveComponent);
|
|
947
|
+
}, Fa = (t, e) => {
|
|
948
|
+
hn(e);
|
|
949
|
+
const r = ({ Component: n, props: s, key: l }) => {
|
|
950
|
+
const i = () => {
|
|
951
|
+
const m = Ve(n, { key: l, ...s });
|
|
952
|
+
return typeof n.layout == "function" ? n.layout(m) : Array.isArray(n.layout) ? n.layout.concat(m).reverse().reduce((g, y) => Ve(y, s, g)) : m;
|
|
927
953
|
};
|
|
928
|
-
return /* @__PURE__ */
|
|
929
|
-
|
|
930
|
-
/* @__PURE__ */
|
|
954
|
+
return /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
|
|
955
|
+
i(),
|
|
956
|
+
/* @__PURE__ */ F.jsx(mn, {})
|
|
931
957
|
] });
|
|
932
958
|
};
|
|
933
|
-
return /* @__PURE__ */
|
|
934
|
-
},
|
|
935
|
-
var
|
|
936
|
-
const
|
|
937
|
-
let
|
|
938
|
-
|
|
939
|
-
() =>
|
|
940
|
-
const
|
|
941
|
-
if (!
|
|
942
|
-
|
|
959
|
+
return /* @__PURE__ */ F.jsx(pn, { children: /* @__PURE__ */ F.jsx(t, { ...e, children: r }) });
|
|
960
|
+
}, mn = ({ children: t }) => {
|
|
961
|
+
var m;
|
|
962
|
+
const e = Pe(Qe);
|
|
963
|
+
let r = !1, n = !1;
|
|
964
|
+
X(() => Ie.on("start", () => r = !0), []), X(() => Ie.on("finish", () => r = !1), []), X(
|
|
965
|
+
() => Ie.on("navigate", function(o) {
|
|
966
|
+
const g = o.detail.page.props._inertiaui_modal;
|
|
967
|
+
if (!g) {
|
|
968
|
+
n && e.closeAll();
|
|
943
969
|
return;
|
|
944
970
|
}
|
|
945
|
-
|
|
946
|
-
if (!
|
|
971
|
+
n = g, De = g.baseUrl, e.pushFromResponseData(g, {}, () => {
|
|
972
|
+
if (!g.baseUrl) {
|
|
947
973
|
console.error("No base url in modal response data so cannot navigate back");
|
|
948
974
|
return;
|
|
949
975
|
}
|
|
950
|
-
!
|
|
976
|
+
!r && window.location.href !== g.baseUrl && Ie.visit(g.baseUrl, {
|
|
951
977
|
preserveScroll: !0,
|
|
952
978
|
preserveState: !0
|
|
953
979
|
});
|
|
954
|
-
}).then((
|
|
955
|
-
|
|
980
|
+
}).then((y) => {
|
|
981
|
+
bt = y;
|
|
956
982
|
});
|
|
957
983
|
}),
|
|
958
984
|
[]
|
|
959
985
|
);
|
|
960
|
-
const
|
|
961
|
-
|
|
962
|
-
const
|
|
963
|
-
return
|
|
964
|
-
var
|
|
965
|
-
const
|
|
966
|
-
|
|
967
|
-
}, [(
|
|
968
|
-
|
|
969
|
-
|
|
986
|
+
const s = (o) => (gt.length && (o.headers["X-InertiaUI-Modal-Base-Url"] = De), o);
|
|
987
|
+
X(() => (He.interceptors.request.use(s), () => He.interceptors.request.eject(s)), []);
|
|
988
|
+
const l = sn(), i = q();
|
|
989
|
+
return X(() => {
|
|
990
|
+
var y, w;
|
|
991
|
+
const o = (y = l.props) == null ? void 0 : y._inertiaui_modal, g = i.current;
|
|
992
|
+
i.current = o, o && g && o.component === g.component && o.url === g.url && ((w = e.stack[0]) == null || w.updateProps(o.props ?? {}));
|
|
993
|
+
}, [(m = l.props) == null ? void 0 : m._inertiaui_modal]), /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
|
|
994
|
+
t,
|
|
995
|
+
e.stack.length > 0 && /* @__PURE__ */ F.jsx(ir, { index: 0 })
|
|
970
996
|
] });
|
|
971
|
-
},
|
|
972
|
-
|
|
973
|
-
const
|
|
974
|
-
const
|
|
975
|
-
if (
|
|
997
|
+
}, St = J.createContext(null);
|
|
998
|
+
St.displayName = "ModalIndexContext";
|
|
999
|
+
const ar = () => {
|
|
1000
|
+
const t = J.useContext(St);
|
|
1001
|
+
if (t === void 0)
|
|
976
1002
|
throw new Error("useModalIndex must be used within a ModalIndexProvider");
|
|
977
|
-
return
|
|
978
|
-
},
|
|
979
|
-
const { stack:
|
|
980
|
-
return (
|
|
981
|
-
|
|
1003
|
+
return t;
|
|
1004
|
+
}, ir = ({ index: t }) => {
|
|
1005
|
+
const { stack: e } = et(), r = ve(() => e[t], [e, t]);
|
|
1006
|
+
return (r == null ? void 0 : r.component) && /* @__PURE__ */ F.jsx(St.Provider, { value: t, children: /* @__PURE__ */ F.jsx(
|
|
1007
|
+
r.component,
|
|
982
1008
|
{
|
|
983
|
-
...
|
|
984
|
-
onModalEvent: (...
|
|
1009
|
+
...r.props,
|
|
1010
|
+
onModalEvent: (...n) => r.emit(...n)
|
|
985
1011
|
}
|
|
986
1012
|
) });
|
|
987
|
-
},
|
|
988
|
-
const
|
|
989
|
-
var
|
|
990
|
-
return (
|
|
991
|
-
}, [
|
|
1013
|
+
}, sr = Tt(({ name: t, children: e, onFocus: r = null, onBlur: n = null, onClose: s = null, onSuccess: l = null, ...i }, m) => {
|
|
1014
|
+
const o = ar(), { stack: g, registerLocalModal: y, removeLocalModal: w } = et(), [P, S] = z(null), p = ve(() => t ? P : g[o], [t, P, o, g]), E = ve(() => {
|
|
1015
|
+
var b;
|
|
1016
|
+
return (b = g.find((D) => D.shouldRender && D.index > (p == null ? void 0 : p.index))) == null ? void 0 : b.index;
|
|
1017
|
+
}, [o, g]), d = ve(() => (p == null ? void 0 : p.config.slideover) ?? i.slideover ?? Rt("type") === "slideover", [i.slideover]), f = ve(
|
|
992
1018
|
() => ({
|
|
993
|
-
slideover:
|
|
994
|
-
closeButton:
|
|
995
|
-
closeExplicitly:
|
|
996
|
-
maxWidth:
|
|
997
|
-
paddingClasses:
|
|
998
|
-
panelClasses:
|
|
999
|
-
position:
|
|
1000
|
-
...
|
|
1019
|
+
slideover: d,
|
|
1020
|
+
closeButton: i.closeButton ?? Re(d, "closeButton"),
|
|
1021
|
+
closeExplicitly: i.closeExplicitly ?? Re(d, "closeExplicitly"),
|
|
1022
|
+
maxWidth: i.maxWidth ?? Re(d, "maxWidth"),
|
|
1023
|
+
paddingClasses: i.paddingClasses ?? Re(d, "paddingClasses"),
|
|
1024
|
+
panelClasses: i.panelClasses ?? Re(d, "panelClasses"),
|
|
1025
|
+
position: i.position ?? Re(d, "position"),
|
|
1026
|
+
...p == null ? void 0 : p.config
|
|
1001
1027
|
}),
|
|
1002
|
-
[
|
|
1028
|
+
[i, p == null ? void 0 : p.config]
|
|
1003
1029
|
);
|
|
1004
|
-
|
|
1005
|
-
if (
|
|
1006
|
-
let
|
|
1007
|
-
return
|
|
1008
|
-
|
|
1030
|
+
X(() => {
|
|
1031
|
+
if (t) {
|
|
1032
|
+
let b = null;
|
|
1033
|
+
return y(t, (D) => {
|
|
1034
|
+
b = D.registerEventListenersFromProps(i), S(D);
|
|
1009
1035
|
}), () => {
|
|
1010
|
-
|
|
1036
|
+
b == null || b(), b = null, w(t);
|
|
1011
1037
|
};
|
|
1012
1038
|
}
|
|
1013
|
-
return
|
|
1014
|
-
}, [
|
|
1015
|
-
const
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
}, [
|
|
1019
|
-
|
|
1039
|
+
return p.registerEventListenersFromProps(i);
|
|
1040
|
+
}, [t]);
|
|
1041
|
+
const v = q(p);
|
|
1042
|
+
X(() => {
|
|
1043
|
+
v.current = p;
|
|
1044
|
+
}, [p]), X(() => {
|
|
1045
|
+
p !== null && (p.isOpen ? l == null || l() : s == null || s());
|
|
1046
|
+
}, [p == null ? void 0 : p.isOpen]);
|
|
1047
|
+
const [R, O] = z(!1);
|
|
1048
|
+
return X(() => {
|
|
1049
|
+
R && p !== null && p.isOpen && (p.onTopOfStack ? r == null || r() : n == null || n()), O(!0);
|
|
1050
|
+
}, [p == null ? void 0 : p.onTopOfStack]), er(
|
|
1051
|
+
m,
|
|
1020
1052
|
() => ({
|
|
1021
1053
|
afterLeave: () => {
|
|
1022
|
-
var
|
|
1023
|
-
return (
|
|
1054
|
+
var b;
|
|
1055
|
+
return (b = v.current) == null ? void 0 : b.afterLeave();
|
|
1024
1056
|
},
|
|
1025
1057
|
close: () => {
|
|
1026
|
-
var
|
|
1027
|
-
return (
|
|
1058
|
+
var b;
|
|
1059
|
+
return (b = v.current) == null ? void 0 : b.close();
|
|
1028
1060
|
},
|
|
1029
|
-
emit: (...
|
|
1030
|
-
var
|
|
1031
|
-
return (
|
|
1061
|
+
emit: (...b) => {
|
|
1062
|
+
var D;
|
|
1063
|
+
return (D = v.current) == null ? void 0 : D.emit(...b);
|
|
1032
1064
|
},
|
|
1033
1065
|
getChildModal: () => {
|
|
1034
|
-
var
|
|
1035
|
-
return (
|
|
1066
|
+
var b;
|
|
1067
|
+
return (b = v.current) == null ? void 0 : b.getChildModal();
|
|
1036
1068
|
},
|
|
1037
1069
|
getParentModal: () => {
|
|
1038
|
-
var
|
|
1039
|
-
return (
|
|
1070
|
+
var b;
|
|
1071
|
+
return (b = v.current) == null ? void 0 : b.getParentModal();
|
|
1040
1072
|
},
|
|
1041
|
-
reload: (...
|
|
1042
|
-
var
|
|
1043
|
-
return (
|
|
1073
|
+
reload: (...b) => {
|
|
1074
|
+
var D;
|
|
1075
|
+
return (D = v.current) == null ? void 0 : D.reload(...b);
|
|
1044
1076
|
},
|
|
1045
1077
|
setOpen: () => {
|
|
1046
|
-
var
|
|
1047
|
-
return (
|
|
1078
|
+
var b;
|
|
1079
|
+
return (b = v.current) == null ? void 0 : b.setOpen();
|
|
1048
1080
|
},
|
|
1049
1081
|
get id() {
|
|
1050
|
-
var
|
|
1051
|
-
return (
|
|
1082
|
+
var b;
|
|
1083
|
+
return (b = v.current) == null ? void 0 : b.id;
|
|
1052
1084
|
},
|
|
1053
1085
|
get index() {
|
|
1054
|
-
var
|
|
1055
|
-
return (
|
|
1086
|
+
var b;
|
|
1087
|
+
return (b = v.current) == null ? void 0 : b.index;
|
|
1056
1088
|
},
|
|
1057
1089
|
get isOpen() {
|
|
1058
|
-
var
|
|
1059
|
-
return (
|
|
1090
|
+
var b;
|
|
1091
|
+
return (b = v.current) == null ? void 0 : b.isOpen;
|
|
1060
1092
|
},
|
|
1061
1093
|
get config() {
|
|
1062
|
-
var
|
|
1063
|
-
return (
|
|
1094
|
+
var b;
|
|
1095
|
+
return (b = v.current) == null ? void 0 : b.config;
|
|
1064
1096
|
},
|
|
1065
1097
|
get modalContext() {
|
|
1066
|
-
return
|
|
1098
|
+
return v.current;
|
|
1067
1099
|
},
|
|
1068
1100
|
get onTopOfStack() {
|
|
1069
|
-
var
|
|
1070
|
-
return (
|
|
1101
|
+
var b;
|
|
1102
|
+
return (b = v.current) == null ? void 0 : b.onTopOfStack;
|
|
1071
1103
|
},
|
|
1072
1104
|
get shouldRender() {
|
|
1073
|
-
var
|
|
1074
|
-
return (
|
|
1105
|
+
var b;
|
|
1106
|
+
return (b = v.current) == null ? void 0 : b.shouldRender;
|
|
1075
1107
|
}
|
|
1076
1108
|
}),
|
|
1077
|
-
[
|
|
1078
|
-
), (
|
|
1079
|
-
typeof
|
|
1080
|
-
afterLeave:
|
|
1081
|
-
close:
|
|
1082
|
-
config:
|
|
1083
|
-
emit:
|
|
1084
|
-
getChildModal:
|
|
1085
|
-
getParentModal:
|
|
1086
|
-
id:
|
|
1087
|
-
index:
|
|
1088
|
-
isOpen:
|
|
1089
|
-
modalContext:
|
|
1090
|
-
onTopOfStack:
|
|
1091
|
-
reload:
|
|
1092
|
-
setOpen:
|
|
1093
|
-
shouldRender:
|
|
1094
|
-
}) :
|
|
1095
|
-
|
|
1109
|
+
[p]
|
|
1110
|
+
), (p == null ? void 0 : p.shouldRender) && /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
|
|
1111
|
+
typeof e == "function" ? e({
|
|
1112
|
+
afterLeave: p.afterLeave,
|
|
1113
|
+
close: p.close,
|
|
1114
|
+
config: f,
|
|
1115
|
+
emit: p.emit,
|
|
1116
|
+
getChildModal: p.getChildModal,
|
|
1117
|
+
getParentModal: p.getParentModal,
|
|
1118
|
+
id: p.id,
|
|
1119
|
+
index: p.index,
|
|
1120
|
+
isOpen: p.isOpen,
|
|
1121
|
+
modalContext: p,
|
|
1122
|
+
onTopOfStack: p.onTopOfStack,
|
|
1123
|
+
reload: p.reload,
|
|
1124
|
+
setOpen: p.setOpen,
|
|
1125
|
+
shouldRender: p.shouldRender
|
|
1126
|
+
}) : e,
|
|
1127
|
+
E && /* @__PURE__ */ F.jsx(ir, { index: E })
|
|
1096
1128
|
] });
|
|
1097
1129
|
});
|
|
1098
|
-
|
|
1099
|
-
function
|
|
1100
|
-
var
|
|
1101
|
-
if (typeof
|
|
1102
|
-
else if (typeof
|
|
1103
|
-
var
|
|
1104
|
-
for (
|
|
1105
|
-
} else for (
|
|
1106
|
-
return
|
|
1130
|
+
sr.displayName = "HeadlessModal";
|
|
1131
|
+
function lr(t) {
|
|
1132
|
+
var e, r, n = "";
|
|
1133
|
+
if (typeof t == "string" || typeof t == "number") n += t;
|
|
1134
|
+
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1135
|
+
var s = t.length;
|
|
1136
|
+
for (e = 0; e < s; e++) t[e] && (r = lr(t[e])) && (n && (n += " "), n += r);
|
|
1137
|
+
} else for (r in t) t[r] && (n && (n += " "), n += r);
|
|
1138
|
+
return n;
|
|
1107
1139
|
}
|
|
1108
|
-
function
|
|
1109
|
-
for (var
|
|
1110
|
-
return
|
|
1140
|
+
function Ye() {
|
|
1141
|
+
for (var t, e, r = 0, n = "", s = arguments.length; r < s; r++) (t = arguments[r]) && (e = lr(t)) && (n && (n += " "), n += e);
|
|
1142
|
+
return n;
|
|
1111
1143
|
}
|
|
1112
|
-
var
|
|
1113
|
-
let
|
|
1144
|
+
var bn = Object.defineProperty, gn = (t, e, r) => e in t ? bn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, vt = (t, e, r) => (gn(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
1145
|
+
let yn = class {
|
|
1114
1146
|
constructor() {
|
|
1115
|
-
|
|
1147
|
+
vt(this, "current", this.detect()), vt(this, "handoffState", "pending"), vt(this, "currentId", 0);
|
|
1116
1148
|
}
|
|
1117
|
-
set(
|
|
1118
|
-
this.current !==
|
|
1149
|
+
set(e) {
|
|
1150
|
+
this.current !== e && (this.handoffState = "pending", this.currentId = 0, this.current = e);
|
|
1119
1151
|
}
|
|
1120
1152
|
reset() {
|
|
1121
1153
|
this.set(this.detect());
|
|
@@ -1138,1117 +1170,596 @@ let Xr = class {
|
|
|
1138
1170
|
get isHandoffComplete() {
|
|
1139
1171
|
return this.handoffState === "complete";
|
|
1140
1172
|
}
|
|
1141
|
-
},
|
|
1142
|
-
function
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
function pt(e) {
|
|
1146
|
-
typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
|
|
1147
|
-
throw t;
|
|
1173
|
+
}, Ke = new yn();
|
|
1174
|
+
function wn(t) {
|
|
1175
|
+
typeof queueMicrotask == "function" ? queueMicrotask(t) : Promise.resolve().then(t).catch((e) => setTimeout(() => {
|
|
1176
|
+
throw e;
|
|
1148
1177
|
}));
|
|
1149
1178
|
}
|
|
1150
|
-
function
|
|
1151
|
-
let
|
|
1152
|
-
return
|
|
1153
|
-
}, requestAnimationFrame(...
|
|
1154
|
-
let
|
|
1155
|
-
return
|
|
1156
|
-
}, nextFrame(...
|
|
1157
|
-
return
|
|
1158
|
-
}, setTimeout(...
|
|
1159
|
-
let
|
|
1160
|
-
return
|
|
1161
|
-
}, microTask(...
|
|
1162
|
-
let
|
|
1163
|
-
return
|
|
1164
|
-
|
|
1165
|
-
}),
|
|
1166
|
-
|
|
1179
|
+
function tt() {
|
|
1180
|
+
let t = [], e = { addEventListener(r, n, s, l) {
|
|
1181
|
+
return r.addEventListener(n, s, l), e.add(() => r.removeEventListener(n, s, l));
|
|
1182
|
+
}, requestAnimationFrame(...r) {
|
|
1183
|
+
let n = requestAnimationFrame(...r);
|
|
1184
|
+
return e.add(() => cancelAnimationFrame(n));
|
|
1185
|
+
}, nextFrame(...r) {
|
|
1186
|
+
return e.requestAnimationFrame(() => e.requestAnimationFrame(...r));
|
|
1187
|
+
}, setTimeout(...r) {
|
|
1188
|
+
let n = setTimeout(...r);
|
|
1189
|
+
return e.add(() => clearTimeout(n));
|
|
1190
|
+
}, microTask(...r) {
|
|
1191
|
+
let n = { current: !0 };
|
|
1192
|
+
return wn(() => {
|
|
1193
|
+
n.current && r[0]();
|
|
1194
|
+
}), e.add(() => {
|
|
1195
|
+
n.current = !1;
|
|
1167
1196
|
});
|
|
1168
|
-
}, style(
|
|
1169
|
-
let
|
|
1170
|
-
return Object.assign(
|
|
1171
|
-
Object.assign(
|
|
1197
|
+
}, style(r, n, s) {
|
|
1198
|
+
let l = r.style.getPropertyValue(n);
|
|
1199
|
+
return Object.assign(r.style, { [n]: s }), this.add(() => {
|
|
1200
|
+
Object.assign(r.style, { [n]: l });
|
|
1172
1201
|
});
|
|
1173
|
-
}, group(
|
|
1174
|
-
let
|
|
1175
|
-
return n
|
|
1176
|
-
}, add(
|
|
1177
|
-
return
|
|
1178
|
-
let
|
|
1179
|
-
if (
|
|
1202
|
+
}, group(r) {
|
|
1203
|
+
let n = tt();
|
|
1204
|
+
return r(n), this.add(() => n.dispose());
|
|
1205
|
+
}, add(r) {
|
|
1206
|
+
return t.includes(r) || t.push(r), () => {
|
|
1207
|
+
let n = t.indexOf(r);
|
|
1208
|
+
if (n >= 0) for (let s of t.splice(n, 1)) s();
|
|
1180
1209
|
};
|
|
1181
1210
|
}, dispose() {
|
|
1182
|
-
for (let
|
|
1211
|
+
for (let r of t.splice(0)) r();
|
|
1183
1212
|
} };
|
|
1184
|
-
return
|
|
1213
|
+
return e;
|
|
1185
1214
|
}
|
|
1186
|
-
function
|
|
1187
|
-
let [
|
|
1188
|
-
return
|
|
1215
|
+
function or() {
|
|
1216
|
+
let [t] = z(tt);
|
|
1217
|
+
return X(() => () => t.dispose(), [t]), t;
|
|
1189
1218
|
}
|
|
1190
|
-
let
|
|
1191
|
-
|
|
1219
|
+
let he = (t, e) => {
|
|
1220
|
+
Ke.isServer ? X(t, e) : rn(t, e);
|
|
1192
1221
|
};
|
|
1193
|
-
function
|
|
1194
|
-
let
|
|
1195
|
-
return
|
|
1196
|
-
|
|
1197
|
-
}, [
|
|
1198
|
-
}
|
|
1199
|
-
let
|
|
1200
|
-
let
|
|
1201
|
-
return
|
|
1202
|
-
}
|
|
1203
|
-
function
|
|
1204
|
-
return
|
|
1205
|
-
}
|
|
1206
|
-
function kt(...e) {
|
|
1207
|
-
return Array.from(new Set(e.flatMap((t) => typeof t == "string" ? t.split(" ") : []))).filter(Boolean).join(" ");
|
|
1222
|
+
function ur(t) {
|
|
1223
|
+
let e = q(t);
|
|
1224
|
+
return he(() => {
|
|
1225
|
+
e.current = t;
|
|
1226
|
+
}, [t]), e;
|
|
1227
|
+
}
|
|
1228
|
+
let de = function(t) {
|
|
1229
|
+
let e = ur(t);
|
|
1230
|
+
return J.useCallback((...r) => e.current(...r), [e]);
|
|
1231
|
+
};
|
|
1232
|
+
function yt(...t) {
|
|
1233
|
+
return Array.from(new Set(t.flatMap((e) => typeof e == "string" ? e.split(" ") : []))).filter(Boolean).join(" ");
|
|
1208
1234
|
}
|
|
1209
|
-
function
|
|
1210
|
-
if (
|
|
1211
|
-
let
|
|
1212
|
-
return typeof
|
|
1235
|
+
function rt(t, e, ...r) {
|
|
1236
|
+
if (t in e) {
|
|
1237
|
+
let s = e[t];
|
|
1238
|
+
return typeof s == "function" ? s(...r) : s;
|
|
1213
1239
|
}
|
|
1214
|
-
let
|
|
1215
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
|
1216
|
-
}
|
|
1217
|
-
var
|
|
1218
|
-
function
|
|
1219
|
-
let
|
|
1220
|
-
return
|
|
1221
|
-
}
|
|
1222
|
-
function
|
|
1223
|
-
|
|
1224
|
-
let
|
|
1225
|
-
if (
|
|
1226
|
-
let
|
|
1227
|
-
if (
|
|
1228
|
-
let { static:
|
|
1229
|
-
if (
|
|
1240
|
+
let n = new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map((s) => `"${s}"`).join(", ")}.`);
|
|
1241
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, rt), n;
|
|
1242
|
+
}
|
|
1243
|
+
var cr = ((t) => (t[t.None = 0] = "None", t[t.RenderStrategy = 1] = "RenderStrategy", t[t.Static = 2] = "Static", t))(cr || {}), pe = ((t) => (t[t.Unmount = 0] = "Unmount", t[t.Hidden = 1] = "Hidden", t))(pe || {});
|
|
1244
|
+
function dr() {
|
|
1245
|
+
let t = En();
|
|
1246
|
+
return ue((e) => xn({ mergeRefs: t, ...e }), [t]);
|
|
1247
|
+
}
|
|
1248
|
+
function xn({ ourProps: t, theirProps: e, slot: r, defaultTag: n, features: s, visible: l = !0, name: i, mergeRefs: m }) {
|
|
1249
|
+
m = m ?? Tn;
|
|
1250
|
+
let o = fr(e, t);
|
|
1251
|
+
if (l) return Ue(o, r, n, i, m);
|
|
1252
|
+
let g = s ?? 0;
|
|
1253
|
+
if (g & 2) {
|
|
1254
|
+
let { static: y = !1, ...w } = o;
|
|
1255
|
+
if (y) return Ue(w, r, n, i, m);
|
|
1230
1256
|
}
|
|
1231
|
-
if (
|
|
1232
|
-
let { unmount:
|
|
1233
|
-
return
|
|
1257
|
+
if (g & 1) {
|
|
1258
|
+
let { unmount: y = !0, ...w } = o;
|
|
1259
|
+
return rt(y ? 0 : 1, { 0() {
|
|
1234
1260
|
return null;
|
|
1235
1261
|
}, 1() {
|
|
1236
|
-
return
|
|
1262
|
+
return Ue({ ...w, hidden: !0, style: { display: "none" } }, r, n, i, m);
|
|
1237
1263
|
} });
|
|
1238
1264
|
}
|
|
1239
|
-
return
|
|
1265
|
+
return Ue(o, r, n, i, m);
|
|
1240
1266
|
}
|
|
1241
|
-
function
|
|
1242
|
-
let { as:
|
|
1243
|
-
"className" in
|
|
1267
|
+
function Ue(t, e = {}, r, n, s) {
|
|
1268
|
+
let { as: l = r, children: i, refName: m = "ref", ...o } = pt(t, ["unmount", "static"]), g = t.ref !== void 0 ? { [m]: t.ref } : {}, y = typeof i == "function" ? i(e) : i;
|
|
1269
|
+
"className" in o && o.className && typeof o.className == "function" && (o.className = o.className(e)), o["aria-labelledby"] && o["aria-labelledby"] === o.id && (o["aria-labelledby"] = void 0);
|
|
1244
1270
|
let w = {};
|
|
1245
|
-
if (
|
|
1246
|
-
let
|
|
1247
|
-
for (let [
|
|
1248
|
-
if (
|
|
1249
|
-
w["data-headlessui-state"] =
|
|
1250
|
-
for (let
|
|
1271
|
+
if (e) {
|
|
1272
|
+
let P = !1, S = [];
|
|
1273
|
+
for (let [p, E] of Object.entries(e)) typeof E == "boolean" && (P = !0), E === !0 && S.push(p.replace(/([A-Z])/g, (d) => `-${d.toLowerCase()}`));
|
|
1274
|
+
if (P) {
|
|
1275
|
+
w["data-headlessui-state"] = S.join(" ");
|
|
1276
|
+
for (let p of S) w[`data-${p}`] = "";
|
|
1251
1277
|
}
|
|
1252
1278
|
}
|
|
1253
|
-
if (
|
|
1254
|
-
if (Object.keys(
|
|
1255
|
-
`), "", "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((
|
|
1279
|
+
if (l === we && (Object.keys(be(o)).length > 0 || Object.keys(be(w)).length > 0)) if (!nn(y) || Array.isArray(y) && y.length > 1) {
|
|
1280
|
+
if (Object.keys(be(o)).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(be(o)).concat(Object.keys(be(w))).map((P) => ` - ${P}`).join(`
|
|
1281
|
+
`), "", "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((P) => ` - ${P}`).join(`
|
|
1256
1282
|
`)].join(`
|
|
1257
1283
|
`));
|
|
1258
1284
|
} else {
|
|
1259
|
-
let
|
|
1260
|
-
for (let
|
|
1261
|
-
return
|
|
1285
|
+
let P = y.props, S = P == null ? void 0 : P.className, p = typeof S == "function" ? (...f) => yt(S(...f), o.className) : yt(S, o.className), E = p ? { className: p } : {}, d = fr(y.props, be(pt(o, ["ref"])));
|
|
1286
|
+
for (let f in w) f in d && delete w[f];
|
|
1287
|
+
return an(y, Object.assign({}, d, w, g, { ref: s(Rn(y), g.ref) }, E));
|
|
1262
1288
|
}
|
|
1263
|
-
return
|
|
1289
|
+
return Ve(l, Object.assign({}, pt(o, ["ref"]), l !== we && g, l !== we && w), y);
|
|
1264
1290
|
}
|
|
1265
|
-
function
|
|
1266
|
-
let
|
|
1267
|
-
for (let
|
|
1291
|
+
function En() {
|
|
1292
|
+
let t = q([]), e = ue((r) => {
|
|
1293
|
+
for (let n of t.current) n != null && (typeof n == "function" ? n(r) : n.current = r);
|
|
1268
1294
|
}, []);
|
|
1269
|
-
return (...
|
|
1270
|
-
if (!
|
|
1295
|
+
return (...r) => {
|
|
1296
|
+
if (!r.every((n) => n == null)) return t.current = r, e;
|
|
1271
1297
|
};
|
|
1272
1298
|
}
|
|
1273
|
-
function
|
|
1274
|
-
return
|
|
1275
|
-
for (let
|
|
1299
|
+
function Tn(...t) {
|
|
1300
|
+
return t.every((e) => e == null) ? void 0 : (e) => {
|
|
1301
|
+
for (let r of t) r != null && (typeof r == "function" ? r(e) : r.current = e);
|
|
1276
1302
|
};
|
|
1277
1303
|
}
|
|
1278
|
-
function
|
|
1279
|
-
if (
|
|
1280
|
-
if (
|
|
1281
|
-
let
|
|
1282
|
-
for (let
|
|
1283
|
-
if (
|
|
1284
|
-
var
|
|
1285
|
-
return (
|
|
1304
|
+
function fr(...t) {
|
|
1305
|
+
if (t.length === 0) return {};
|
|
1306
|
+
if (t.length === 1) return t[0];
|
|
1307
|
+
let e = {}, r = {};
|
|
1308
|
+
for (let n of t) for (let s in n) s.startsWith("on") && typeof n[s] == "function" ? (r[s] != null || (r[s] = []), r[s].push(n[s])) : e[s] = n[s];
|
|
1309
|
+
if (e.disabled || e["aria-disabled"]) for (let n in r) /^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n) && (r[n] = [(s) => {
|
|
1310
|
+
var l;
|
|
1311
|
+
return (l = s == null ? void 0 : s.preventDefault) == null ? void 0 : l.call(s);
|
|
1286
1312
|
}]);
|
|
1287
|
-
for (let
|
|
1288
|
-
let
|
|
1289
|
-
for (let
|
|
1290
|
-
if ((
|
|
1291
|
-
s
|
|
1313
|
+
for (let n in r) Object.assign(e, { [n](s, ...l) {
|
|
1314
|
+
let i = r[n];
|
|
1315
|
+
for (let m of i) {
|
|
1316
|
+
if ((s instanceof Event || (s == null ? void 0 : s.nativeEvent) instanceof Event) && s.defaultPrevented) return;
|
|
1317
|
+
m(s, ...l);
|
|
1292
1318
|
}
|
|
1293
1319
|
} });
|
|
1294
|
-
return t;
|
|
1295
|
-
}
|
|
1296
|
-
function Q(e) {
|
|
1297
|
-
var t;
|
|
1298
|
-
return Object.assign(It(e), { displayName: (t = e.displayName) != null ? t : e.name });
|
|
1299
|
-
}
|
|
1300
|
-
function Se(e) {
|
|
1301
|
-
let t = Object.assign({}, e);
|
|
1302
|
-
for (let n in t) t[n] === void 0 && delete t[n];
|
|
1303
|
-
return t;
|
|
1304
|
-
}
|
|
1305
|
-
function St(e, t = []) {
|
|
1306
|
-
let n = Object.assign({}, e);
|
|
1307
|
-
for (let r of t) r in n && delete n[r];
|
|
1308
|
-
return n;
|
|
1309
|
-
}
|
|
1310
|
-
function Zr(e) {
|
|
1311
|
-
return O.version.split(".")[0] >= "19" ? e.props.ref : e.ref;
|
|
1312
|
-
}
|
|
1313
|
-
let Qr = "span";
|
|
1314
|
-
var ot = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(ot || {});
|
|
1315
|
-
function el(e, t) {
|
|
1316
|
-
var n;
|
|
1317
|
-
let { features: r = 1, ...l } = e, o = { ref: t, "aria-hidden": (r & 2) === 2 ? !0 : (n = l["aria-hidden"]) != null ? n : void 0, hidden: (r & 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", ...(r & 4) === 4 && (r & 2) !== 2 && { display: "none" } } };
|
|
1318
|
-
return ie()({ ourProps: o, theirProps: l, slot: {}, defaultTag: Qr, name: "Hidden" });
|
|
1319
|
-
}
|
|
1320
|
-
let jt = Q(el), Cn = Symbol();
|
|
1321
|
-
function tl(e, t = !0) {
|
|
1322
|
-
return Object.assign(e, { [Cn]: t });
|
|
1323
|
-
}
|
|
1324
|
-
function ce(...e) {
|
|
1325
|
-
let t = j(e);
|
|
1326
|
-
L(() => {
|
|
1327
|
-
t.current = e;
|
|
1328
|
-
}, [e]);
|
|
1329
|
-
let n = A((r) => {
|
|
1330
|
-
for (let l of t.current) l != null && (typeof l == "function" ? l(r) : l.current = r);
|
|
1331
|
-
});
|
|
1332
|
-
return e.every((r) => r == null || (r == null ? void 0 : r[Cn])) ? void 0 : n;
|
|
1333
|
-
}
|
|
1334
|
-
let Ut = ae(null);
|
|
1335
|
-
Ut.displayName = "DescriptionContext";
|
|
1336
|
-
function $n() {
|
|
1337
|
-
let e = Z(Ut);
|
|
1338
|
-
if (e === null) {
|
|
1339
|
-
let t = new Error("You used a <Description /> component, but it is not inside a relevant parent.");
|
|
1340
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t, $n), t;
|
|
1341
|
-
}
|
|
1342
1320
|
return e;
|
|
1343
1321
|
}
|
|
1344
|
-
function
|
|
1345
|
-
|
|
1346
|
-
return
|
|
1347
|
-
let r = A((o) => (t((u) => [...u, o]), () => t((u) => {
|
|
1348
|
-
let s = u.slice(), i = s.indexOf(o);
|
|
1349
|
-
return i !== -1 && s.splice(i, 1), s;
|
|
1350
|
-
}))), l = B(() => ({ register: r, slot: n.slot, name: n.name, props: n.props, value: n.value }), [r, n.slot, n.name, n.props, n.value]);
|
|
1351
|
-
return O.createElement(Ut.Provider, { value: l }, n.children);
|
|
1352
|
-
}, [t])];
|
|
1353
|
-
}
|
|
1354
|
-
let rl = "p";
|
|
1355
|
-
function ll(e, t) {
|
|
1356
|
-
let n = Ge(), r = Kr(), { id: l = `headlessui-description-${n}`, ...o } = e, u = $n(), s = ce(t);
|
|
1357
|
-
z(() => u.register(l), [l, u.register]);
|
|
1358
|
-
let i = r || !1, p = B(() => ({ ...u.slot, disabled: i }), [u.slot, i]), c = { ref: s, ...u.props, id: l };
|
|
1359
|
-
return ie()({ ourProps: c, theirProps: o, slot: p, defaultTag: rl, name: u.name || "Description" });
|
|
1360
|
-
}
|
|
1361
|
-
let al = Q(ll), il = Object.assign(al, {});
|
|
1362
|
-
var Fn = ((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))(Fn || {});
|
|
1363
|
-
let ol = ae(() => {
|
|
1364
|
-
});
|
|
1365
|
-
function ul({ value: e, children: t }) {
|
|
1366
|
-
return O.createElement(ol.Provider, { value: e }, t);
|
|
1367
|
-
}
|
|
1368
|
-
let sl = class extends Map {
|
|
1369
|
-
constructor(t) {
|
|
1370
|
-
super(), this.factory = t;
|
|
1371
|
-
}
|
|
1372
|
-
get(t) {
|
|
1373
|
-
let n = super.get(t);
|
|
1374
|
-
return n === void 0 && (n = this.factory(t), this.set(t, n)), n;
|
|
1375
|
-
}
|
|
1376
|
-
};
|
|
1377
|
-
function kn(e, t) {
|
|
1378
|
-
let n = e(), r = /* @__PURE__ */ new Set();
|
|
1379
|
-
return { getSnapshot() {
|
|
1380
|
-
return n;
|
|
1381
|
-
}, subscribe(l) {
|
|
1382
|
-
return r.add(l), () => r.delete(l);
|
|
1383
|
-
}, dispatch(l, ...o) {
|
|
1384
|
-
let u = t[l].call(n, ...o);
|
|
1385
|
-
u && (n = u, r.forEach((s) => s()));
|
|
1386
|
-
} };
|
|
1387
|
-
}
|
|
1388
|
-
function jn(e) {
|
|
1389
|
-
return $r(e.subscribe, e.getSnapshot, e.getSnapshot);
|
|
1390
|
-
}
|
|
1391
|
-
let cl = new sl(() => kn(() => [], { ADD(e) {
|
|
1392
|
-
return this.includes(e) ? this : [...this, e];
|
|
1393
|
-
}, REMOVE(e) {
|
|
1394
|
-
let t = this.indexOf(e);
|
|
1395
|
-
if (t === -1) return this;
|
|
1396
|
-
let n = this.slice();
|
|
1397
|
-
return n.splice(t, 1), n;
|
|
1398
|
-
} }));
|
|
1399
|
-
function Ae(e, t) {
|
|
1400
|
-
let n = cl.get(t), r = Ge(), l = jn(n);
|
|
1401
|
-
if (z(() => {
|
|
1402
|
-
if (e) return n.dispatch("ADD", r), () => n.dispatch("REMOVE", r);
|
|
1403
|
-
}, [n, e]), !e) return !1;
|
|
1404
|
-
let o = l.indexOf(r), u = l.length;
|
|
1405
|
-
return o === -1 && (o = u, u += 1), o === u - 1;
|
|
1406
|
-
}
|
|
1407
|
-
let _t = /* @__PURE__ */ new Map(), Ke = /* @__PURE__ */ new Map();
|
|
1408
|
-
function dn(e) {
|
|
1409
|
-
var t;
|
|
1410
|
-
let n = (t = Ke.get(e)) != null ? t : 0;
|
|
1411
|
-
return Ke.set(e, n + 1), n !== 0 ? () => fn(e) : (_t.set(e, { "aria-hidden": e.getAttribute("aria-hidden"), inert: e.inert }), e.setAttribute("aria-hidden", "true"), e.inert = !0, () => fn(e));
|
|
1412
|
-
}
|
|
1413
|
-
function fn(e) {
|
|
1414
|
-
var t;
|
|
1415
|
-
let n = (t = Ke.get(e)) != null ? t : 1;
|
|
1416
|
-
if (n === 1 ? Ke.delete(e) : Ke.set(e, n - 1), n !== 1) return;
|
|
1417
|
-
let r = _t.get(e);
|
|
1418
|
-
r && (r["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", r["aria-hidden"]), e.inert = r.inert, _t.delete(e));
|
|
1419
|
-
}
|
|
1420
|
-
function dl(e, { allowed: t, disallowed: n } = {}) {
|
|
1421
|
-
let r = Ae(e, "inert-others");
|
|
1422
|
-
z(() => {
|
|
1423
|
-
var l, o;
|
|
1424
|
-
if (!r) return;
|
|
1425
|
-
let u = ye();
|
|
1426
|
-
for (let i of (l = n == null ? void 0 : n()) != null ? l : []) i && u.add(dn(i));
|
|
1427
|
-
let s = (o = t == null ? void 0 : t()) != null ? o : [];
|
|
1428
|
-
for (let i of s) {
|
|
1429
|
-
if (!i) continue;
|
|
1430
|
-
let p = ft(i);
|
|
1431
|
-
if (!p) continue;
|
|
1432
|
-
let c = i.parentElement;
|
|
1433
|
-
for (; c && c !== p.body; ) {
|
|
1434
|
-
for (let w of c.children) s.some((b) => w.contains(b)) || u.add(dn(w));
|
|
1435
|
-
c = c.parentElement;
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
return u.dispose;
|
|
1439
|
-
}, [r, t, n]);
|
|
1440
|
-
}
|
|
1441
|
-
function fl(e, t, n) {
|
|
1442
|
-
let r = ke((l) => {
|
|
1443
|
-
let o = l.getBoundingClientRect();
|
|
1444
|
-
o.x === 0 && o.y === 0 && o.width === 0 && o.height === 0 && n();
|
|
1445
|
-
});
|
|
1446
|
-
L(() => {
|
|
1447
|
-
if (!e) return;
|
|
1448
|
-
let l = t === null ? null : t instanceof HTMLElement ? t : t.current;
|
|
1449
|
-
if (!l) return;
|
|
1450
|
-
let o = ye();
|
|
1451
|
-
if (typeof ResizeObserver < "u") {
|
|
1452
|
-
let u = new ResizeObserver(() => r.current(l));
|
|
1453
|
-
u.observe(l), o.add(() => u.disconnect());
|
|
1454
|
-
}
|
|
1455
|
-
if (typeof IntersectionObserver < "u") {
|
|
1456
|
-
let u = new IntersectionObserver(() => r.current(l));
|
|
1457
|
-
u.observe(l), o.add(() => u.disconnect());
|
|
1458
|
-
}
|
|
1459
|
-
return () => o.dispose();
|
|
1460
|
-
}, [t, r, e]);
|
|
1461
|
-
}
|
|
1462
|
-
let ut = ["[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(","), pl = ["[data-autofocus]"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
|
|
1463
|
-
var pe = ((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))(pe || {}), Mt = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(Mt || {}), ml = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(ml || {});
|
|
1464
|
-
function hl(e = document.body) {
|
|
1465
|
-
return e == null ? [] : Array.from(e.querySelectorAll(ut)).sort((t, n) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (n.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
1466
|
-
}
|
|
1467
|
-
function vl(e = document.body) {
|
|
1468
|
-
return e == null ? [] : Array.from(e.querySelectorAll(pl)).sort((t, n) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (n.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
1469
|
-
}
|
|
1470
|
-
var _n = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(_n || {});
|
|
1471
|
-
function gl(e, t = 0) {
|
|
1472
|
-
var n;
|
|
1473
|
-
return e === ((n = ft(e)) == null ? void 0 : n.body) ? !1 : we(t, { 0() {
|
|
1474
|
-
return e.matches(ut);
|
|
1475
|
-
}, 1() {
|
|
1476
|
-
let r = e;
|
|
1477
|
-
for (; r !== null; ) {
|
|
1478
|
-
if (r.matches(ut)) return !0;
|
|
1479
|
-
r = r.parentElement;
|
|
1480
|
-
}
|
|
1481
|
-
return !1;
|
|
1482
|
-
} });
|
|
1483
|
-
}
|
|
1484
|
-
var wl = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(wl || {});
|
|
1485
|
-
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
1486
|
-
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
1487
|
-
}, !0), document.addEventListener("click", (e) => {
|
|
1488
|
-
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
1489
|
-
}, !0));
|
|
1490
|
-
function me(e) {
|
|
1491
|
-
e == null || e.focus({ preventScroll: !0 });
|
|
1492
|
-
}
|
|
1493
|
-
let yl = ["textarea", "input"].join(",");
|
|
1494
|
-
function bl(e) {
|
|
1495
|
-
var t, n;
|
|
1496
|
-
return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, yl)) != null ? n : !1;
|
|
1497
|
-
}
|
|
1498
|
-
function xl(e, t = (n) => n) {
|
|
1499
|
-
return e.slice().sort((n, r) => {
|
|
1500
|
-
let l = t(n), o = t(r);
|
|
1501
|
-
if (l === null || o === null) return 0;
|
|
1502
|
-
let u = l.compareDocumentPosition(o);
|
|
1503
|
-
return u & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : u & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
1504
|
-
});
|
|
1505
|
-
}
|
|
1506
|
-
function ze(e, t, { sorted: n = !0, relativeTo: r = null, skipElements: l = [] } = {}) {
|
|
1507
|
-
let o = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e.ownerDocument, u = Array.isArray(e) ? n ? xl(e) : e : t & 64 ? vl(e) : hl(e);
|
|
1508
|
-
l.length > 0 && u.length > 1 && (u = u.filter((y) => !l.some((g) => g != null && "current" in g ? (g == null ? void 0 : g.current) === y : g === y))), r = r ?? o.activeElement;
|
|
1509
|
-
let s = (() => {
|
|
1510
|
-
if (t & 5) return 1;
|
|
1511
|
-
if (t & 10) return -1;
|
|
1512
|
-
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
1513
|
-
})(), i = (() => {
|
|
1514
|
-
if (t & 1) return 0;
|
|
1515
|
-
if (t & 2) return Math.max(0, u.indexOf(r)) - 1;
|
|
1516
|
-
if (t & 4) return Math.max(0, u.indexOf(r)) + 1;
|
|
1517
|
-
if (t & 8) return u.length - 1;
|
|
1518
|
-
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
1519
|
-
})(), p = t & 32 ? { preventScroll: !0 } : {}, c = 0, w = u.length, b;
|
|
1520
|
-
do {
|
|
1521
|
-
if (c >= w || c + w <= 0) return 0;
|
|
1522
|
-
let y = i + c;
|
|
1523
|
-
if (t & 16) y = (y + w) % w;
|
|
1524
|
-
else {
|
|
1525
|
-
if (y < 0) return 3;
|
|
1526
|
-
if (y >= w) return 1;
|
|
1527
|
-
}
|
|
1528
|
-
b = u[y], b == null || b.focus(p), c += s;
|
|
1529
|
-
} while (b !== o.activeElement);
|
|
1530
|
-
return t & 6 && bl(b) && b.select(), 2;
|
|
1531
|
-
}
|
|
1532
|
-
function Mn() {
|
|
1533
|
-
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
1534
|
-
}
|
|
1535
|
-
function El() {
|
|
1536
|
-
return /Android/gi.test(window.navigator.userAgent);
|
|
1537
|
-
}
|
|
1538
|
-
function Tl() {
|
|
1539
|
-
return Mn() || El();
|
|
1540
|
-
}
|
|
1541
|
-
function Be(e, t, n, r) {
|
|
1542
|
-
let l = ke(n);
|
|
1543
|
-
L(() => {
|
|
1544
|
-
if (!e) return;
|
|
1545
|
-
function o(u) {
|
|
1546
|
-
l.current(u);
|
|
1547
|
-
}
|
|
1548
|
-
return document.addEventListener(t, o, r), () => document.removeEventListener(t, o, r);
|
|
1549
|
-
}, [e, t, r]);
|
|
1550
|
-
}
|
|
1551
|
-
function An(e, t, n, r) {
|
|
1552
|
-
let l = ke(n);
|
|
1553
|
-
L(() => {
|
|
1554
|
-
if (!e) return;
|
|
1555
|
-
function o(u) {
|
|
1556
|
-
l.current(u);
|
|
1557
|
-
}
|
|
1558
|
-
return window.addEventListener(t, o, r), () => window.removeEventListener(t, o, r);
|
|
1559
|
-
}, [e, t, r]);
|
|
1560
|
-
}
|
|
1561
|
-
const pn = 30;
|
|
1562
|
-
function Ol(e, t, n) {
|
|
1563
|
-
let r = Ae(e, "outside-click"), l = ke(n), o = oe(function(i, p) {
|
|
1564
|
-
if (i.defaultPrevented) return;
|
|
1565
|
-
let c = p(i);
|
|
1566
|
-
if (c === null || !c.getRootNode().contains(c) || !c.isConnected) return;
|
|
1567
|
-
let w = function b(y) {
|
|
1568
|
-
return typeof y == "function" ? b(y()) : Array.isArray(y) || y instanceof Set ? y : [y];
|
|
1569
|
-
}(t);
|
|
1570
|
-
for (let b of w) if (b !== null && (b.contains(c) || i.composed && i.composedPath().includes(b))) return;
|
|
1571
|
-
return !gl(c, _n.Loose) && c.tabIndex !== -1 && i.preventDefault(), l.current(i, c);
|
|
1572
|
-
}, [l, t]), u = j(null);
|
|
1573
|
-
Be(r, "pointerdown", (i) => {
|
|
1574
|
-
var p, c;
|
|
1575
|
-
u.current = ((c = (p = i.composedPath) == null ? void 0 : p.call(i)) == null ? void 0 : c[0]) || i.target;
|
|
1576
|
-
}, !0), Be(r, "mousedown", (i) => {
|
|
1577
|
-
var p, c;
|
|
1578
|
-
u.current = ((c = (p = i.composedPath) == null ? void 0 : p.call(i)) == null ? void 0 : c[0]) || i.target;
|
|
1579
|
-
}, !0), Be(r, "click", (i) => {
|
|
1580
|
-
Tl() || u.current && (o(i, () => u.current), u.current = null);
|
|
1581
|
-
}, !0);
|
|
1582
|
-
let s = j({ x: 0, y: 0 });
|
|
1583
|
-
Be(r, "touchstart", (i) => {
|
|
1584
|
-
s.current.x = i.touches[0].clientX, s.current.y = i.touches[0].clientY;
|
|
1585
|
-
}, !0), Be(r, "touchend", (i) => {
|
|
1586
|
-
let p = { x: i.changedTouches[0].clientX, y: i.changedTouches[0].clientY };
|
|
1587
|
-
if (!(Math.abs(p.x - s.current.x) >= pn || Math.abs(p.y - s.current.y) >= pn)) return o(i, () => i.target instanceof HTMLElement ? i.target : null);
|
|
1588
|
-
}, !0), An(r, "blur", (i) => o(i, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
1589
|
-
}
|
|
1590
|
-
function Je(...e) {
|
|
1591
|
-
return B(() => ft(...e), [...e]);
|
|
1592
|
-
}
|
|
1593
|
-
function Ln(e, t, n, r) {
|
|
1594
|
-
let l = ke(n);
|
|
1595
|
-
L(() => {
|
|
1596
|
-
e = e ?? window;
|
|
1597
|
-
function o(u) {
|
|
1598
|
-
l.current(u);
|
|
1599
|
-
}
|
|
1600
|
-
return e.addEventListener(t, o, r), () => e.removeEventListener(t, o, r);
|
|
1601
|
-
}, [e, t, r]);
|
|
1602
|
-
}
|
|
1603
|
-
function Pl() {
|
|
1604
|
-
let e;
|
|
1605
|
-
return { before({ doc: t }) {
|
|
1606
|
-
var n;
|
|
1607
|
-
let r = t.documentElement, l = (n = t.defaultView) != null ? n : window;
|
|
1608
|
-
e = Math.max(0, l.innerWidth - r.clientWidth);
|
|
1609
|
-
}, after({ doc: t, d: n }) {
|
|
1610
|
-
let r = t.documentElement, l = Math.max(0, r.clientWidth - r.offsetWidth), o = Math.max(0, e - l);
|
|
1611
|
-
n.style(r, "paddingRight", `${o}px`);
|
|
1612
|
-
} };
|
|
1613
|
-
}
|
|
1614
|
-
function Rl() {
|
|
1615
|
-
return Mn() ? { before({ doc: e, d: t, meta: n }) {
|
|
1616
|
-
function r(l) {
|
|
1617
|
-
return n.containers.flatMap((o) => o()).some((o) => o.contains(l));
|
|
1618
|
-
}
|
|
1619
|
-
t.microTask(() => {
|
|
1620
|
-
var l;
|
|
1621
|
-
if (window.getComputedStyle(e.documentElement).scrollBehavior !== "auto") {
|
|
1622
|
-
let s = ye();
|
|
1623
|
-
s.style(e.documentElement, "scrollBehavior", "auto"), t.add(() => t.microTask(() => s.dispose()));
|
|
1624
|
-
}
|
|
1625
|
-
let o = (l = window.scrollY) != null ? l : window.pageYOffset, u = null;
|
|
1626
|
-
t.addEventListener(e, "click", (s) => {
|
|
1627
|
-
if (s.target instanceof HTMLElement) try {
|
|
1628
|
-
let i = s.target.closest("a");
|
|
1629
|
-
if (!i) return;
|
|
1630
|
-
let { hash: p } = new URL(i.href), c = e.querySelector(p);
|
|
1631
|
-
c && !r(c) && (u = c);
|
|
1632
|
-
} catch {
|
|
1633
|
-
}
|
|
1634
|
-
}, !0), t.addEventListener(e, "touchstart", (s) => {
|
|
1635
|
-
if (s.target instanceof HTMLElement) if (r(s.target)) {
|
|
1636
|
-
let i = s.target;
|
|
1637
|
-
for (; i.parentElement && r(i.parentElement); ) i = i.parentElement;
|
|
1638
|
-
t.style(i, "overscrollBehavior", "contain");
|
|
1639
|
-
} else t.style(s.target, "touchAction", "none");
|
|
1640
|
-
}), t.addEventListener(e, "touchmove", (s) => {
|
|
1641
|
-
if (s.target instanceof HTMLElement) {
|
|
1642
|
-
if (s.target.tagName === "INPUT") return;
|
|
1643
|
-
if (r(s.target)) {
|
|
1644
|
-
let i = s.target;
|
|
1645
|
-
for (; i.parentElement && i.dataset.headlessuiPortal !== "" && !(i.scrollHeight > i.clientHeight || i.scrollWidth > i.clientWidth); ) i = i.parentElement;
|
|
1646
|
-
i.dataset.headlessuiPortal === "" && s.preventDefault();
|
|
1647
|
-
} else s.preventDefault();
|
|
1648
|
-
}
|
|
1649
|
-
}, { passive: !1 }), t.add(() => {
|
|
1650
|
-
var s;
|
|
1651
|
-
let i = (s = window.scrollY) != null ? s : window.pageYOffset;
|
|
1652
|
-
o !== i && window.scrollTo(0, o), u && u.isConnected && (u.scrollIntoView({ block: "nearest" }), u = null);
|
|
1653
|
-
});
|
|
1654
|
-
});
|
|
1655
|
-
} } : {};
|
|
1322
|
+
function Ot(t) {
|
|
1323
|
+
var e;
|
|
1324
|
+
return Object.assign(Tt(t), { displayName: (e = t.displayName) != null ? e : t.name });
|
|
1656
1325
|
}
|
|
1657
|
-
function
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1326
|
+
function be(t) {
|
|
1327
|
+
let e = Object.assign({}, t);
|
|
1328
|
+
for (let r in e) e[r] === void 0 && delete e[r];
|
|
1329
|
+
return e;
|
|
1661
1330
|
}
|
|
1662
|
-
function
|
|
1663
|
-
let
|
|
1664
|
-
for (let n of e)
|
|
1665
|
-
return
|
|
1331
|
+
function pt(t, e = []) {
|
|
1332
|
+
let r = Object.assign({}, t);
|
|
1333
|
+
for (let n of e) n in r && delete r[n];
|
|
1334
|
+
return r;
|
|
1666
1335
|
}
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
let r = (n = this.get(e)) != null ? n : { doc: e, count: 0, d: ye(), meta: /* @__PURE__ */ new Set() };
|
|
1670
|
-
return r.count++, r.meta.add(t), this.set(e, r), this;
|
|
1671
|
-
}, POP(e, t) {
|
|
1672
|
-
let n = this.get(e);
|
|
1673
|
-
return n && (n.count--, n.meta.delete(t)), this;
|
|
1674
|
-
}, SCROLL_PREVENT({ doc: e, d: t, meta: n }) {
|
|
1675
|
-
let r = { doc: e, d: t, meta: Cl(n) }, l = [Rl(), Pl(), Sl()];
|
|
1676
|
-
l.forEach(({ before: o }) => o == null ? void 0 : o(r)), l.forEach(({ after: o }) => o == null ? void 0 : o(r));
|
|
1677
|
-
}, SCROLL_ALLOW({ d: e }) {
|
|
1678
|
-
e.dispose();
|
|
1679
|
-
}, TEARDOWN({ doc: e }) {
|
|
1680
|
-
this.delete(e);
|
|
1681
|
-
} });
|
|
1682
|
-
$e.subscribe(() => {
|
|
1683
|
-
let e = $e.getSnapshot(), t = /* @__PURE__ */ new Map();
|
|
1684
|
-
for (let [n] of e) t.set(n, n.documentElement.style.overflow);
|
|
1685
|
-
for (let n of e.values()) {
|
|
1686
|
-
let r = t.get(n.doc) === "hidden", l = n.count !== 0;
|
|
1687
|
-
(l && !r || !l && r) && $e.dispatch(n.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", n), n.count === 0 && $e.dispatch("TEARDOWN", n);
|
|
1688
|
-
}
|
|
1689
|
-
});
|
|
1690
|
-
function $l(e, t, n = () => ({ containers: [] })) {
|
|
1691
|
-
let r = jn($e), l = t ? r.get(t) : void 0, o = l ? l.count > 0 : !1;
|
|
1692
|
-
return z(() => {
|
|
1693
|
-
if (!(!t || !e)) return $e.dispatch("PUSH", t, n), () => $e.dispatch("POP", t, n);
|
|
1694
|
-
}, [e, t]), o;
|
|
1336
|
+
function Rn(t) {
|
|
1337
|
+
return J.version.split(".")[0] >= "19" ? t.props.ref : t.ref;
|
|
1695
1338
|
}
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1339
|
+
let Sn = Symbol();
|
|
1340
|
+
function vr(...t) {
|
|
1341
|
+
let e = q(t);
|
|
1342
|
+
X(() => {
|
|
1343
|
+
e.current = t;
|
|
1344
|
+
}, [t]);
|
|
1345
|
+
let r = de((n) => {
|
|
1346
|
+
for (let s of e.current) s != null && (typeof s == "function" ? s(n) : s.current = n);
|
|
1701
1347
|
});
|
|
1348
|
+
return t.every((n) => n == null || (n == null ? void 0 : n[Sn])) ? void 0 : r;
|
|
1702
1349
|
}
|
|
1703
|
-
function
|
|
1704
|
-
let [
|
|
1705
|
-
return { flags:
|
|
1350
|
+
function On(t = 0) {
|
|
1351
|
+
let [e, r] = z(t), n = ue((o) => r(o), [e]), s = ue((o) => r((g) => g | o), [e]), l = ue((o) => (e & o) === o, [e]), i = ue((o) => r((g) => g & ~o), [r]), m = ue((o) => r((g) => g ^ o), [r]);
|
|
1352
|
+
return { flags: e, setFlag: n, addFlag: s, hasFlag: l, removeFlag: i, toggleFlag: m };
|
|
1706
1353
|
}
|
|
1707
|
-
var
|
|
1708
|
-
typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((
|
|
1354
|
+
var qt, Xt;
|
|
1355
|
+
typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((qt = process == null ? void 0 : process.env) == null ? void 0 : qt.NODE_ENV) === "test" && typeof ((Xt = Element == null ? void 0 : Element.prototype) == null ? void 0 : Xt.getAnimations) > "u" && (Element.prototype.getAnimations = function() {
|
|
1709
1356
|
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(`
|
|
1710
1357
|
`)), [];
|
|
1711
1358
|
});
|
|
1712
|
-
var
|
|
1713
|
-
function
|
|
1714
|
-
let
|
|
1715
|
-
for (let
|
|
1716
|
-
return
|
|
1359
|
+
var Pn = ((t) => (t[t.None = 0] = "None", t[t.Closed = 1] = "Closed", t[t.Enter = 2] = "Enter", t[t.Leave = 4] = "Leave", t))(Pn || {});
|
|
1360
|
+
function Cn(t) {
|
|
1361
|
+
let e = {};
|
|
1362
|
+
for (let r in t) t[r] === !0 && (e[`data-${r}`] = "");
|
|
1363
|
+
return e;
|
|
1717
1364
|
}
|
|
1718
|
-
function
|
|
1719
|
-
let [
|
|
1720
|
-
return
|
|
1721
|
-
var
|
|
1722
|
-
if (
|
|
1723
|
-
if (
|
|
1724
|
-
|
|
1365
|
+
function kn(t, e, r, n) {
|
|
1366
|
+
let [s, l] = z(r), { hasFlag: i, addFlag: m, removeFlag: o } = On(t && s ? 3 : 0), g = q(!1), y = q(!1), w = or();
|
|
1367
|
+
return he(() => {
|
|
1368
|
+
var P;
|
|
1369
|
+
if (t) {
|
|
1370
|
+
if (r && l(!0), !e) {
|
|
1371
|
+
r && m(3);
|
|
1725
1372
|
return;
|
|
1726
1373
|
}
|
|
1727
|
-
return (
|
|
1728
|
-
|
|
1374
|
+
return (P = n == null ? void 0 : n.start) == null || P.call(n, r), Fn(e, { inFlight: g, prepare() {
|
|
1375
|
+
y.current ? y.current = !1 : y.current = g.current, g.current = !0, !y.current && (r ? (m(3), o(4)) : (m(4), o(2)));
|
|
1729
1376
|
}, run() {
|
|
1730
|
-
|
|
1377
|
+
y.current ? r ? (o(3), m(4)) : (o(4), m(3)) : r ? o(1) : m(1);
|
|
1731
1378
|
}, done() {
|
|
1732
|
-
var
|
|
1733
|
-
|
|
1379
|
+
var S;
|
|
1380
|
+
y.current && typeof e.getAnimations == "function" && e.getAnimations().length > 0 || (g.current = !1, o(7), r || l(!1), (S = n == null ? void 0 : n.end) == null || S.call(n, r));
|
|
1734
1381
|
} });
|
|
1735
1382
|
}
|
|
1736
|
-
}, [
|
|
1383
|
+
}, [t, r, e, w]), t ? [s, { closed: i(1), enter: i(2), leave: i(4), transition: i(2) || i(4) }] : [r, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
|
|
1737
1384
|
}
|
|
1738
|
-
function
|
|
1739
|
-
let
|
|
1740
|
-
return
|
|
1741
|
-
|
|
1742
|
-
|
|
1385
|
+
function Fn(t, { prepare: e, run: r, done: n, inFlight: s }) {
|
|
1386
|
+
let l = tt();
|
|
1387
|
+
return jn(t, { prepare: e, inFlight: s }), l.nextFrame(() => {
|
|
1388
|
+
r(), l.requestAnimationFrame(() => {
|
|
1389
|
+
l.add(Nn(t, n));
|
|
1743
1390
|
});
|
|
1744
|
-
}),
|
|
1745
|
-
}
|
|
1746
|
-
function
|
|
1747
|
-
var
|
|
1748
|
-
let
|
|
1749
|
-
if (!
|
|
1750
|
-
let
|
|
1751
|
-
|
|
1752
|
-
|
|
1391
|
+
}), l.dispose;
|
|
1392
|
+
}
|
|
1393
|
+
function Nn(t, e) {
|
|
1394
|
+
var r, n;
|
|
1395
|
+
let s = tt();
|
|
1396
|
+
if (!t) return s.dispose;
|
|
1397
|
+
let l = !1;
|
|
1398
|
+
s.add(() => {
|
|
1399
|
+
l = !0;
|
|
1753
1400
|
});
|
|
1754
|
-
let
|
|
1755
|
-
return
|
|
1756
|
-
|
|
1757
|
-
}),
|
|
1758
|
-
}
|
|
1759
|
-
function
|
|
1760
|
-
if (
|
|
1761
|
-
|
|
1401
|
+
let i = (n = (r = t.getAnimations) == null ? void 0 : r.call(t).filter((m) => m instanceof CSSTransition)) != null ? n : [];
|
|
1402
|
+
return i.length === 0 ? (e(), s.dispose) : (Promise.allSettled(i.map((m) => m.finished)).then(() => {
|
|
1403
|
+
l || e();
|
|
1404
|
+
}), s.dispose);
|
|
1405
|
+
}
|
|
1406
|
+
function jn(t, { inFlight: e, prepare: r }) {
|
|
1407
|
+
if (e != null && e.current) {
|
|
1408
|
+
r();
|
|
1762
1409
|
return;
|
|
1763
1410
|
}
|
|
1764
|
-
let
|
|
1765
|
-
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
return n.current = t, s;
|
|
1774
|
-
}
|
|
1775
|
-
}, [r, ...t]);
|
|
1776
|
-
}
|
|
1777
|
-
let mt = ae(null);
|
|
1778
|
-
mt.displayName = "OpenClosedContext";
|
|
1779
|
-
var ue = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(ue || {});
|
|
1780
|
-
function ht() {
|
|
1781
|
-
return Z(mt);
|
|
1782
|
-
}
|
|
1783
|
-
function Nl({ value: e, children: t }) {
|
|
1784
|
-
return O.createElement(mt.Provider, { value: e }, t);
|
|
1785
|
-
}
|
|
1786
|
-
function Dl({ children: e }) {
|
|
1787
|
-
return O.createElement(mt.Provider, { value: null }, e);
|
|
1788
|
-
}
|
|
1789
|
-
function Wl(e) {
|
|
1790
|
-
function t() {
|
|
1791
|
-
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", t));
|
|
1792
|
-
}
|
|
1793
|
-
typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", t), t());
|
|
1794
|
-
}
|
|
1795
|
-
let ve = [];
|
|
1796
|
-
Wl(() => {
|
|
1797
|
-
function e(t) {
|
|
1798
|
-
if (!(t.target instanceof HTMLElement) || t.target === document.body || ve[0] === t.target) return;
|
|
1799
|
-
let n = t.target;
|
|
1800
|
-
n = n.closest(ut), ve.unshift(n ?? t.target), ve = ve.filter((r) => r != null && r.isConnected), ve.splice(10);
|
|
1801
|
-
}
|
|
1802
|
-
window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 });
|
|
1803
|
-
});
|
|
1804
|
-
function In(e) {
|
|
1805
|
-
let t = A(e), n = j(!1);
|
|
1806
|
-
L(() => (n.current = !1, () => {
|
|
1807
|
-
n.current = !0, pt(() => {
|
|
1808
|
-
n.current && t();
|
|
1809
|
-
});
|
|
1810
|
-
}), [t]);
|
|
1811
|
-
}
|
|
1812
|
-
function Ul() {
|
|
1813
|
-
let e = typeof document > "u";
|
|
1814
|
-
return "useSyncExternalStore" in Xe ? ((t) => t.useSyncExternalStore)(Xe)(() => () => {
|
|
1815
|
-
}, () => !1, () => !e) : !1;
|
|
1816
|
-
}
|
|
1817
|
-
function Ze() {
|
|
1818
|
-
let e = Ul(), [t, n] = Xe.useState(Fe.isHandoffComplete);
|
|
1819
|
-
return t && Fe.isHandoffComplete === !1 && n(!1), Xe.useEffect(() => {
|
|
1820
|
-
t !== !0 && n(!0);
|
|
1821
|
-
}, [t]), Xe.useEffect(() => Fe.handoff(), []), e ? !1 : t;
|
|
1822
|
-
}
|
|
1823
|
-
let Nn = ae(!1);
|
|
1824
|
-
function Hl() {
|
|
1825
|
-
return Z(Nn);
|
|
1826
|
-
}
|
|
1827
|
-
function vn(e) {
|
|
1828
|
-
return O.createElement(Nn.Provider, { value: e.force }, e.children);
|
|
1829
|
-
}
|
|
1830
|
-
function Bl(e) {
|
|
1831
|
-
let t = Hl(), n = Z(Wn), r = Je(e), [l, o] = V(() => {
|
|
1832
|
-
var u;
|
|
1833
|
-
if (!t && n !== null) return (u = n.current) != null ? u : null;
|
|
1834
|
-
if (Fe.isServer) return null;
|
|
1835
|
-
let s = r == null ? void 0 : r.getElementById("headlessui-portal-root");
|
|
1836
|
-
if (s) return s;
|
|
1837
|
-
if (r === null) return null;
|
|
1838
|
-
let i = r.createElement("div");
|
|
1839
|
-
return i.setAttribute("id", "headlessui-portal-root"), r.body.appendChild(i);
|
|
1840
|
-
});
|
|
1841
|
-
return L(() => {
|
|
1842
|
-
l !== null && (r != null && r.body.contains(l) || r == null || r.body.appendChild(l));
|
|
1843
|
-
}, [l, r]), L(() => {
|
|
1844
|
-
t || n !== null && o(n.current);
|
|
1845
|
-
}, [n, o, t]), l;
|
|
1846
|
-
}
|
|
1847
|
-
let Dn = se, Vl = Q(function(e, t) {
|
|
1848
|
-
let n = e, r = j(null), l = ce(tl((w) => {
|
|
1849
|
-
r.current = w;
|
|
1850
|
-
}), t), o = Je(r), u = Bl(r), [s] = V(() => {
|
|
1851
|
-
var w;
|
|
1852
|
-
return Fe.isServer ? null : (w = o == null ? void 0 : o.createElement("div")) != null ? w : null;
|
|
1853
|
-
}), i = Z(At), p = Ze();
|
|
1854
|
-
z(() => {
|
|
1855
|
-
!u || !s || u.contains(s) || (s.setAttribute("data-headlessui-portal", ""), u.appendChild(s));
|
|
1856
|
-
}, [u, s]), z(() => {
|
|
1857
|
-
if (s && i) return i.register(s);
|
|
1858
|
-
}, [i, s]), In(() => {
|
|
1859
|
-
var w;
|
|
1860
|
-
!u || !s || (s instanceof Node && u.contains(s) && u.removeChild(s), u.childNodes.length <= 0 && ((w = u.parentElement) == null || w.removeChild(u)));
|
|
1861
|
-
});
|
|
1862
|
-
let c = ie();
|
|
1863
|
-
return p ? !u || !s ? null : Mr(c({ ourProps: { ref: l }, theirProps: n, slot: {}, defaultTag: Dn, name: "Portal" }), s) : null;
|
|
1864
|
-
});
|
|
1865
|
-
function Yl(e, t) {
|
|
1866
|
-
let n = ce(t), { enabled: r = !0, ...l } = e, o = ie();
|
|
1867
|
-
return r ? O.createElement(Vl, { ...l, ref: n }) : o({ ourProps: { ref: n }, theirProps: l, slot: {}, defaultTag: Dn, name: "Portal" });
|
|
1868
|
-
}
|
|
1869
|
-
let Xl = se, Wn = ae(null);
|
|
1870
|
-
function ql(e, t) {
|
|
1871
|
-
let { target: n, ...r } = e, l = { ref: ce(t) }, o = ie();
|
|
1872
|
-
return O.createElement(Wn.Provider, { value: n }, o({ ourProps: l, theirProps: r, defaultTag: Xl, name: "Popover.Group" }));
|
|
1873
|
-
}
|
|
1874
|
-
let At = ae(null);
|
|
1875
|
-
function Kl() {
|
|
1876
|
-
let e = Z(At), t = j([]), n = A((o) => (t.current.push(o), e && e.register(o), () => r(o))), r = A((o) => {
|
|
1877
|
-
let u = t.current.indexOf(o);
|
|
1878
|
-
u !== -1 && t.current.splice(u, 1), e && e.unregister(o);
|
|
1879
|
-
}), l = B(() => ({ register: n, unregister: r, portals: t }), [n, r, t]);
|
|
1880
|
-
return [t, B(() => function({ children: o }) {
|
|
1881
|
-
return O.createElement(At.Provider, { value: l }, o);
|
|
1882
|
-
}, [l])];
|
|
1883
|
-
}
|
|
1884
|
-
let zl = Q(Yl), Un = Q(ql), Gl = Object.assign(zl, { Group: Un });
|
|
1885
|
-
function Jl(e, t = typeof document < "u" ? document.defaultView : null, n) {
|
|
1886
|
-
let r = Ae(e, "escape");
|
|
1887
|
-
Ln(t, "keydown", (l) => {
|
|
1888
|
-
r && (l.defaultPrevented || l.key === Fn.Escape && n(l));
|
|
1889
|
-
});
|
|
1890
|
-
}
|
|
1891
|
-
function Zl() {
|
|
1411
|
+
let n = t.style.transition;
|
|
1412
|
+
t.style.transition = "none", r(), t.offsetHeight, t.style.transition = n;
|
|
1413
|
+
}
|
|
1414
|
+
/*!
|
|
1415
|
+
* tabbable 6.2.0
|
|
1416
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
1417
|
+
*/
|
|
1418
|
+
var pr = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], qe = /* @__PURE__ */ pr.join(","), hr = typeof Element > "u", xe = hr ? function() {
|
|
1419
|
+
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Xe = !hr && Element.prototype.getRootNode ? function(t) {
|
|
1892
1420
|
var e;
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
}
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1421
|
+
return t == null || (e = t.getRootNode) === null || e === void 0 ? void 0 : e.call(t);
|
|
1422
|
+
} : function(t) {
|
|
1423
|
+
return t == null ? void 0 : t.ownerDocument;
|
|
1424
|
+
}, ze = function t(e, r) {
|
|
1425
|
+
var n;
|
|
1426
|
+
r === void 0 && (r = !0);
|
|
1427
|
+
var s = e == null || (n = e.getAttribute) === null || n === void 0 ? void 0 : n.call(e, "inert"), l = s === "" || s === "true", i = l || r && e && t(e.parentNode);
|
|
1428
|
+
return i;
|
|
1429
|
+
}, An = function(e) {
|
|
1430
|
+
var r, n = e == null || (r = e.getAttribute) === null || r === void 0 ? void 0 : r.call(e, "contenteditable");
|
|
1431
|
+
return n === "" || n === "true";
|
|
1432
|
+
}, mr = function(e, r, n) {
|
|
1433
|
+
if (ze(e))
|
|
1434
|
+
return [];
|
|
1435
|
+
var s = Array.prototype.slice.apply(e.querySelectorAll(qe));
|
|
1436
|
+
return r && xe.call(e, qe) && s.unshift(e), s = s.filter(n), s;
|
|
1437
|
+
}, br = function t(e, r, n) {
|
|
1438
|
+
for (var s = [], l = Array.from(e); l.length; ) {
|
|
1439
|
+
var i = l.shift();
|
|
1440
|
+
if (!ze(i, !1))
|
|
1441
|
+
if (i.tagName === "SLOT") {
|
|
1442
|
+
var m = i.assignedElements(), o = m.length ? m : i.children, g = t(o, !0, n);
|
|
1443
|
+
n.flatten ? s.push.apply(s, g) : s.push({
|
|
1444
|
+
scopeParent: i,
|
|
1445
|
+
candidates: g
|
|
1446
|
+
});
|
|
1447
|
+
} else {
|
|
1448
|
+
var y = xe.call(i, qe);
|
|
1449
|
+
y && n.filter(i) && (r || !e.includes(i)) && s.push(i);
|
|
1450
|
+
var w = i.shadowRoot || // check for an undisclosed shadow
|
|
1451
|
+
typeof n.getShadowRoot == "function" && n.getShadowRoot(i), P = !ze(w, !1) && (!n.shadowRootFilter || n.shadowRootFilter(i));
|
|
1452
|
+
if (w && P) {
|
|
1453
|
+
var S = t(w === !0 ? i.children : w.children, !0, n);
|
|
1454
|
+
n.flatten ? s.push.apply(s, S) : s.push({
|
|
1455
|
+
scopeParent: i,
|
|
1456
|
+
candidates: S
|
|
1457
|
+
});
|
|
1458
|
+
} else
|
|
1459
|
+
l.unshift.apply(l, i.children);
|
|
1922
1460
|
}
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
}
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
return
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
function Vn(e) {
|
|
1944
|
-
if (!e) return /* @__PURE__ */ new Set();
|
|
1945
|
-
if (typeof e == "function") return new Set(e());
|
|
1946
|
-
let t = /* @__PURE__ */ new Set();
|
|
1947
|
-
for (let n of e.current) n.current instanceof HTMLElement && t.add(n.current);
|
|
1948
|
-
return t;
|
|
1949
|
-
}
|
|
1950
|
-
let ta = "div";
|
|
1951
|
-
var Ce = ((e) => (e[e.None = 0] = "None", e[e.InitialFocus = 1] = "InitialFocus", e[e.TabLock = 2] = "TabLock", e[e.FocusLock = 4] = "FocusLock", e[e.RestoreFocus = 8] = "RestoreFocus", e[e.AutoFocus = 16] = "AutoFocus", e))(Ce || {});
|
|
1952
|
-
function na(e, t) {
|
|
1953
|
-
let n = j(null), r = ce(n, t), { initialFocus: l, initialFocusFallback: o, containers: u, features: s = 15, ...i } = e;
|
|
1954
|
-
Ze() || (s = 0);
|
|
1955
|
-
let p = Je(n);
|
|
1956
|
-
ia(s, { ownerDocument: p });
|
|
1957
|
-
let c = oa(s, { ownerDocument: p, container: n, initialFocus: l, initialFocusFallback: o });
|
|
1958
|
-
ua(s, { ownerDocument: p, container: n, containers: u, previousActiveElement: c });
|
|
1959
|
-
let w = ea(), b = A((v) => {
|
|
1960
|
-
let x = n.current;
|
|
1961
|
-
x && ((T) => T())(() => {
|
|
1962
|
-
we(w.current, { [Ye.Forwards]: () => {
|
|
1963
|
-
ze(x, pe.First, { skipElements: [v.relatedTarget, o] });
|
|
1964
|
-
}, [Ye.Backwards]: () => {
|
|
1965
|
-
ze(x, pe.Last, { skipElements: [v.relatedTarget, o] });
|
|
1966
|
-
} });
|
|
1967
|
-
});
|
|
1968
|
-
}), y = Ae(!!(s & 2), "focus-trap#tab-lock"), g = Wt(), f = j(!1), d = { ref: r, onKeyDown(v) {
|
|
1969
|
-
v.key == "Tab" && (f.current = !0, g.requestAnimationFrame(() => {
|
|
1970
|
-
f.current = !1;
|
|
1971
|
-
}));
|
|
1972
|
-
}, onBlur(v) {
|
|
1973
|
-
if (!(s & 4)) return;
|
|
1974
|
-
let x = Vn(u);
|
|
1975
|
-
n.current instanceof HTMLElement && x.add(n.current);
|
|
1976
|
-
let T = v.relatedTarget;
|
|
1977
|
-
T instanceof HTMLElement && T.dataset.headlessuiFocusGuard !== "true" && (Yn(x, T) || (f.current ? ze(n.current, we(w.current, { [Ye.Forwards]: () => pe.Next, [Ye.Backwards]: () => pe.Previous }) | pe.WrapAround, { relativeTo: v.target }) : v.target instanceof HTMLElement && me(v.target)));
|
|
1978
|
-
} }, m = ie();
|
|
1979
|
-
return O.createElement(O.Fragment, null, y && O.createElement(jt, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: b, features: ot.Focusable }), m({ ourProps: d, theirProps: i, defaultTag: ta, name: "FocusTrap" }), y && O.createElement(jt, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: b, features: ot.Focusable }));
|
|
1980
|
-
}
|
|
1981
|
-
let ra = Q(na), la = Object.assign(ra, { features: Ce });
|
|
1982
|
-
function aa(e = !0) {
|
|
1983
|
-
let t = j(ve.slice());
|
|
1984
|
-
return Ht(([n], [r]) => {
|
|
1985
|
-
r === !0 && n === !1 && pt(() => {
|
|
1986
|
-
t.current.splice(0);
|
|
1987
|
-
}), r === !1 && n === !0 && (t.current = ve.slice());
|
|
1988
|
-
}, [e, ve, t]), A(() => {
|
|
1989
|
-
var n;
|
|
1990
|
-
return (n = t.current.find((r) => r != null && r.isConnected)) != null ? n : null;
|
|
1991
|
-
});
|
|
1992
|
-
}
|
|
1993
|
-
function ia(e, { ownerDocument: t }) {
|
|
1994
|
-
let n = !!(e & 8), r = aa(n);
|
|
1995
|
-
Ht(() => {
|
|
1996
|
-
n || (t == null ? void 0 : t.activeElement) === (t == null ? void 0 : t.body) && me(r());
|
|
1997
|
-
}, [n]), In(() => {
|
|
1998
|
-
n && me(r());
|
|
1461
|
+
}
|
|
1462
|
+
return s;
|
|
1463
|
+
}, gr = function(e) {
|
|
1464
|
+
return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
|
|
1465
|
+
}, ge = function(e) {
|
|
1466
|
+
if (!e)
|
|
1467
|
+
throw new Error("No node provided");
|
|
1468
|
+
return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || An(e)) && !gr(e) ? 0 : e.tabIndex;
|
|
1469
|
+
}, In = function(e, r) {
|
|
1470
|
+
var n = ge(e);
|
|
1471
|
+
return n < 0 && r && !gr(e) ? 0 : n;
|
|
1472
|
+
}, _n = function(e, r) {
|
|
1473
|
+
return e.tabIndex === r.tabIndex ? e.documentOrder - r.documentOrder : e.tabIndex - r.tabIndex;
|
|
1474
|
+
}, yr = function(e) {
|
|
1475
|
+
return e.tagName === "INPUT";
|
|
1476
|
+
}, Dn = function(e) {
|
|
1477
|
+
return yr(e) && e.type === "hidden";
|
|
1478
|
+
}, Mn = function(e) {
|
|
1479
|
+
var r = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(n) {
|
|
1480
|
+
return n.tagName === "SUMMARY";
|
|
1999
1481
|
});
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
1482
|
+
return r;
|
|
1483
|
+
}, Ln = function(e, r) {
|
|
1484
|
+
for (var n = 0; n < e.length; n++)
|
|
1485
|
+
if (e[n].checked && e[n].form === r)
|
|
1486
|
+
return e[n];
|
|
1487
|
+
}, $n = function(e) {
|
|
1488
|
+
if (!e.name)
|
|
1489
|
+
return !0;
|
|
1490
|
+
var r = e.form || Xe(e), n = function(m) {
|
|
1491
|
+
return r.querySelectorAll('input[type="radio"][name="' + m + '"]');
|
|
1492
|
+
}, s;
|
|
1493
|
+
if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
|
|
1494
|
+
s = n(window.CSS.escape(e.name));
|
|
1495
|
+
else
|
|
1496
|
+
try {
|
|
1497
|
+
s = n(e.name);
|
|
1498
|
+
} catch (i) {
|
|
1499
|
+
return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", i.message), !1;
|
|
1500
|
+
}
|
|
1501
|
+
var l = Ln(s, e.form);
|
|
1502
|
+
return !l || l === e;
|
|
1503
|
+
}, Wn = function(e) {
|
|
1504
|
+
return yr(e) && e.type === "radio";
|
|
1505
|
+
}, Un = function(e) {
|
|
1506
|
+
return Wn(e) && !$n(e);
|
|
1507
|
+
}, Bn = function(e) {
|
|
1508
|
+
var r, n = e && Xe(e), s = (r = n) === null || r === void 0 ? void 0 : r.host, l = !1;
|
|
1509
|
+
if (n && n !== e) {
|
|
1510
|
+
var i, m, o;
|
|
1511
|
+
for (l = !!((i = s) !== null && i !== void 0 && (m = i.ownerDocument) !== null && m !== void 0 && m.contains(s) || e != null && (o = e.ownerDocument) !== null && o !== void 0 && o.contains(e)); !l && s; ) {
|
|
1512
|
+
var g, y, w;
|
|
1513
|
+
n = Xe(s), s = (g = n) === null || g === void 0 ? void 0 : g.host, l = !!((y = s) !== null && y !== void 0 && (w = y.ownerDocument) !== null && w !== void 0 && w.contains(s));
|
|
2008
1514
|
}
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
1515
|
+
}
|
|
1516
|
+
return l;
|
|
1517
|
+
}, zt = function(e) {
|
|
1518
|
+
var r = e.getBoundingClientRect(), n = r.width, s = r.height;
|
|
1519
|
+
return n === 0 && s === 0;
|
|
1520
|
+
}, Kn = function(e, r) {
|
|
1521
|
+
var n = r.displayCheck, s = r.getShadowRoot;
|
|
1522
|
+
if (getComputedStyle(e).visibility === "hidden")
|
|
1523
|
+
return !0;
|
|
1524
|
+
var l = xe.call(e, "details>summary:first-of-type"), i = l ? e.parentElement : e;
|
|
1525
|
+
if (xe.call(i, "details:not([open]) *"))
|
|
1526
|
+
return !0;
|
|
1527
|
+
if (!n || n === "full" || n === "legacy-full") {
|
|
1528
|
+
if (typeof s == "function") {
|
|
1529
|
+
for (var m = e; e; ) {
|
|
1530
|
+
var o = e.parentElement, g = Xe(e);
|
|
1531
|
+
if (o && !o.shadowRoot && s(o) === !0)
|
|
1532
|
+
return zt(e);
|
|
1533
|
+
e.assignedSlot ? e = e.assignedSlot : !o && g !== e.ownerDocument ? e = g.host : e = o;
|
|
2021
1534
|
}
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
1535
|
+
e = m;
|
|
1536
|
+
}
|
|
1537
|
+
if (Bn(e))
|
|
1538
|
+
return !e.getClientRects().length;
|
|
1539
|
+
if (n !== "legacy-full")
|
|
1540
|
+
return !0;
|
|
1541
|
+
} else if (n === "non-zero-area")
|
|
1542
|
+
return zt(e);
|
|
1543
|
+
return !1;
|
|
1544
|
+
}, Vn = function(e) {
|
|
1545
|
+
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))
|
|
1546
|
+
for (var r = e.parentElement; r; ) {
|
|
1547
|
+
if (r.tagName === "FIELDSET" && r.disabled) {
|
|
1548
|
+
for (var n = 0; n < r.children.length; n++) {
|
|
1549
|
+
var s = r.children.item(n);
|
|
1550
|
+
if (s.tagName === "LEGEND")
|
|
1551
|
+
return xe.call(r, "fieldset[disabled] *") ? !0 : !s.contains(e);
|
|
1552
|
+
}
|
|
1553
|
+
return !0;
|
|
2029
1554
|
}
|
|
2030
|
-
|
|
2031
|
-
}
|
|
2032
|
-
}, [l, u, e]), o;
|
|
2033
|
-
}
|
|
2034
|
-
function ua(e, { ownerDocument: t, container: n, containers: r, previousActiveElement: l }) {
|
|
2035
|
-
let o = Bt(), u = !!(e & 4);
|
|
2036
|
-
Ln(t == null ? void 0 : t.defaultView, "focus", (s) => {
|
|
2037
|
-
if (!u || !o.current) return;
|
|
2038
|
-
let i = Vn(r);
|
|
2039
|
-
n.current instanceof HTMLElement && i.add(n.current);
|
|
2040
|
-
let p = l.current;
|
|
2041
|
-
if (!p) return;
|
|
2042
|
-
let c = s.target;
|
|
2043
|
-
c && c instanceof HTMLElement ? Yn(i, c) ? (l.current = c, me(c)) : (s.preventDefault(), s.stopPropagation(), me(p)) : me(l.current);
|
|
2044
|
-
}, !0);
|
|
2045
|
-
}
|
|
2046
|
-
function Yn(e, t) {
|
|
2047
|
-
for (let n of e) if (n.contains(t)) return !0;
|
|
1555
|
+
r = r.parentElement;
|
|
1556
|
+
}
|
|
2048
1557
|
return !1;
|
|
1558
|
+
}, Ge = function(e, r) {
|
|
1559
|
+
return !(r.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
|
|
1560
|
+
// because we're limited in the type of selectors we can use in JSDom (see related
|
|
1561
|
+
// note related to `candidateSelectors`)
|
|
1562
|
+
ze(r) || Dn(r) || Kn(r, e) || // For a details element with a summary, the summary element gets the focus
|
|
1563
|
+
Mn(r) || Vn(r));
|
|
1564
|
+
}, wt = function(e, r) {
|
|
1565
|
+
return !(Un(r) || ge(r) < 0 || !Ge(e, r));
|
|
1566
|
+
}, Hn = function(e) {
|
|
1567
|
+
var r = parseInt(e.getAttribute("tabindex"), 10);
|
|
1568
|
+
return !!(isNaN(r) || r >= 0);
|
|
1569
|
+
}, Yn = function t(e) {
|
|
1570
|
+
var r = [], n = [];
|
|
1571
|
+
return e.forEach(function(s, l) {
|
|
1572
|
+
var i = !!s.scopeParent, m = i ? s.scopeParent : s, o = In(m, i), g = i ? t(s.candidates) : m;
|
|
1573
|
+
o === 0 ? i ? r.push.apply(r, g) : r.push(m) : n.push({
|
|
1574
|
+
documentOrder: l,
|
|
1575
|
+
tabIndex: o,
|
|
1576
|
+
item: s,
|
|
1577
|
+
isScope: i,
|
|
1578
|
+
content: g
|
|
1579
|
+
});
|
|
1580
|
+
}), n.sort(_n).reduce(function(s, l) {
|
|
1581
|
+
return l.isScope ? s.push.apply(s, l.content) : s.push(l.content), s;
|
|
1582
|
+
}, []).concat(r);
|
|
1583
|
+
}, qn = function(e, r) {
|
|
1584
|
+
r = r || {};
|
|
1585
|
+
var n;
|
|
1586
|
+
return r.getShadowRoot ? n = br([e], r.includeContainer, {
|
|
1587
|
+
filter: wt.bind(null, r),
|
|
1588
|
+
flatten: !1,
|
|
1589
|
+
getShadowRoot: r.getShadowRoot,
|
|
1590
|
+
shadowRootFilter: Hn
|
|
1591
|
+
}) : n = mr(e, r.includeContainer, wt.bind(null, r)), Yn(n);
|
|
1592
|
+
}, Xn = function(e, r) {
|
|
1593
|
+
r = r || {};
|
|
1594
|
+
var n;
|
|
1595
|
+
return r.getShadowRoot ? n = br([e], r.includeContainer, {
|
|
1596
|
+
filter: Ge.bind(null, r),
|
|
1597
|
+
flatten: !0,
|
|
1598
|
+
getShadowRoot: r.getShadowRoot
|
|
1599
|
+
}) : n = mr(e, r.includeContainer, Ge.bind(null, r)), n;
|
|
1600
|
+
}, Oe = function(e, r) {
|
|
1601
|
+
if (r = r || {}, !e)
|
|
1602
|
+
throw new Error("No node provided");
|
|
1603
|
+
return xe.call(e, qe) === !1 ? !1 : wt(r, e);
|
|
1604
|
+
}, zn = /* @__PURE__ */ pr.concat("iframe").join(","), ht = function(e, r) {
|
|
1605
|
+
if (r = r || {}, !e)
|
|
1606
|
+
throw new Error("No node provided");
|
|
1607
|
+
return xe.call(e, zn) === !1 ? !1 : Ge(r, e);
|
|
1608
|
+
};
|
|
1609
|
+
let Pt = Je(null);
|
|
1610
|
+
Pt.displayName = "OpenClosedContext";
|
|
1611
|
+
var ye = ((t) => (t[t.Open = 1] = "Open", t[t.Closed = 2] = "Closed", t[t.Closing = 4] = "Closing", t[t.Opening = 8] = "Opening", t))(ye || {});
|
|
1612
|
+
function wr() {
|
|
1613
|
+
return Pe(Pt);
|
|
1614
|
+
}
|
|
1615
|
+
function Gn({ value: t, children: e }) {
|
|
1616
|
+
return J.createElement(Pt.Provider, { value: t }, e);
|
|
1617
|
+
}
|
|
1618
|
+
function Jn() {
|
|
1619
|
+
let t = typeof document > "u";
|
|
1620
|
+
return "useSyncExternalStore" in _e ? ((e) => e.useSyncExternalStore)(_e)(() => () => {
|
|
1621
|
+
}, () => !1, () => !t) : !1;
|
|
1622
|
+
}
|
|
1623
|
+
function xr() {
|
|
1624
|
+
let t = Jn(), [e, r] = _e.useState(Ke.isHandoffComplete);
|
|
1625
|
+
return e && Ke.isHandoffComplete === !1 && r(!1), _e.useEffect(() => {
|
|
1626
|
+
e !== !0 && r(!0);
|
|
1627
|
+
}, [e]), _e.useEffect(() => Ke.handoff(), []), t ? !1 : e;
|
|
1628
|
+
}
|
|
1629
|
+
function Zn() {
|
|
1630
|
+
let t = q(!1);
|
|
1631
|
+
return he(() => (t.current = !0, () => {
|
|
1632
|
+
t.current = !1;
|
|
1633
|
+
}), []), t;
|
|
1634
|
+
}
|
|
1635
|
+
function Er(t) {
|
|
1636
|
+
var e;
|
|
1637
|
+
return !!(t.enter || t.enterFrom || t.enterTo || t.leave || t.leaveFrom || t.leaveTo) || ((e = t.as) != null ? e : Rr) !== we || J.Children.count(t.children) === 1;
|
|
2049
1638
|
}
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
let
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
function ca() {
|
|
2058
|
-
let e = Z(vt);
|
|
2059
|
-
if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
|
|
2060
|
-
return e;
|
|
2061
|
-
}
|
|
2062
|
-
function da() {
|
|
2063
|
-
let e = Z(gt);
|
|
2064
|
-
if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
|
|
2065
|
-
return e;
|
|
1639
|
+
let nt = Je(null);
|
|
1640
|
+
nt.displayName = "TransitionContext";
|
|
1641
|
+
var Qn = ((t) => (t.Visible = "visible", t.Hidden = "hidden", t))(Qn || {});
|
|
1642
|
+
function ea() {
|
|
1643
|
+
let t = Pe(nt);
|
|
1644
|
+
if (t === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
|
|
1645
|
+
return t;
|
|
2066
1646
|
}
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
return
|
|
1647
|
+
function ta() {
|
|
1648
|
+
let t = Pe(at);
|
|
1649
|
+
if (t === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
|
|
1650
|
+
return t;
|
|
2071
1651
|
}
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
1652
|
+
let at = Je(null);
|
|
1653
|
+
at.displayName = "NestingContext";
|
|
1654
|
+
function it(t) {
|
|
1655
|
+
return "children" in t ? it(t.children) : t.current.filter(({ el: e }) => e.current !== null).filter(({ state: e }) => e === "visible").length > 0;
|
|
1656
|
+
}
|
|
1657
|
+
function Tr(t, e) {
|
|
1658
|
+
let r = ur(t), n = q([]), s = Zn(), l = or(), i = de((S, p = pe.Hidden) => {
|
|
1659
|
+
let E = n.current.findIndex(({ el: d }) => d === S);
|
|
1660
|
+
E !== -1 && (rt(p, { [pe.Unmount]() {
|
|
1661
|
+
n.current.splice(E, 1);
|
|
1662
|
+
}, [pe.Hidden]() {
|
|
1663
|
+
n.current[E].state = "hidden";
|
|
1664
|
+
} }), l.microTask(() => {
|
|
2080
1665
|
var d;
|
|
2081
|
-
!
|
|
1666
|
+
!it(n) && s.current && ((d = r.current) == null || d.call(r));
|
|
2082
1667
|
}));
|
|
2083
|
-
}),
|
|
2084
|
-
let
|
|
2085
|
-
return
|
|
2086
|
-
}),
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
})]),
|
|
2090
|
-
Promise.all(
|
|
2091
|
-
})]),
|
|
2092
|
-
}),
|
|
2093
|
-
Promise.all(
|
|
1668
|
+
}), m = de((S) => {
|
|
1669
|
+
let p = n.current.find(({ el: E }) => E === S);
|
|
1670
|
+
return p ? p.state !== "visible" && (p.state = "visible") : n.current.push({ el: S, state: "visible" }), () => i(S, pe.Unmount);
|
|
1671
|
+
}), o = q([]), g = q(Promise.resolve()), y = q({ enter: [], leave: [] }), w = de((S, p, E) => {
|
|
1672
|
+
o.current.splice(0), e && (e.chains.current[p] = e.chains.current[p].filter(([d]) => d !== S)), e == null || e.chains.current[p].push([S, new Promise((d) => {
|
|
1673
|
+
o.current.push(d);
|
|
1674
|
+
})]), e == null || e.chains.current[p].push([S, new Promise((d) => {
|
|
1675
|
+
Promise.all(y.current[p].map(([f, v]) => v)).then(() => d());
|
|
1676
|
+
})]), p === "enter" ? g.current = g.current.then(() => e == null ? void 0 : e.wait.current).then(() => E(p)) : E(p);
|
|
1677
|
+
}), P = de((S, p, E) => {
|
|
1678
|
+
Promise.all(y.current[p].splice(0).map(([d, f]) => f)).then(() => {
|
|
2094
1679
|
var d;
|
|
2095
|
-
(d =
|
|
2096
|
-
}).then(() =>
|
|
1680
|
+
(d = o.current.shift()) == null || d();
|
|
1681
|
+
}).then(() => E(p));
|
|
2097
1682
|
});
|
|
2098
|
-
return
|
|
2099
|
-
}
|
|
2100
|
-
let
|
|
2101
|
-
function
|
|
2102
|
-
var
|
|
2103
|
-
let { transition:
|
|
2104
|
-
|
|
2105
|
-
if (
|
|
2106
|
-
if (
|
|
2107
|
-
|
|
1683
|
+
return ve(() => ({ children: n, register: m, unregister: i, onStart: w, onStop: P, wait: g, chains: y }), [m, i, n, w, P, y, g]);
|
|
1684
|
+
}
|
|
1685
|
+
let Rr = we, Sr = cr.RenderStrategy;
|
|
1686
|
+
function ra(t, e) {
|
|
1687
|
+
var r, n;
|
|
1688
|
+
let { transition: s = !0, beforeEnter: l, afterEnter: i, beforeLeave: m, afterLeave: o, enter: g, enterFrom: y, enterTo: w, entered: P, leave: S, leaveFrom: p, leaveTo: E, ...d } = t, [f, v] = z(null), R = q(null), O = Er(t), b = vr(...O ? [R, e, v] : e === null ? [] : [e]), D = (r = d.unmount) == null || r ? pe.Unmount : pe.Hidden, { show: B, appear: Z, initial: ee } = ea(), [Y, G] = z(B ? "visible" : "hidden"), j = ta(), { register: u, unregister: c } = j;
|
|
1689
|
+
he(() => u(R), [u, R]), he(() => {
|
|
1690
|
+
if (D === pe.Hidden && R.current) {
|
|
1691
|
+
if (B && Y !== "visible") {
|
|
1692
|
+
G("visible");
|
|
2108
1693
|
return;
|
|
2109
1694
|
}
|
|
2110
|
-
return
|
|
2111
|
-
}
|
|
2112
|
-
}, [
|
|
2113
|
-
let
|
|
2114
|
-
|
|
2115
|
-
if (
|
|
2116
|
-
}, [
|
|
2117
|
-
let
|
|
2118
|
-
|
|
2119
|
-
},
|
|
2120
|
-
|
|
2121
|
-
let
|
|
2122
|
-
|
|
2123
|
-
|
|
1695
|
+
return rt(Y, { hidden: () => c(R), visible: () => u(R) });
|
|
1696
|
+
}
|
|
1697
|
+
}, [Y, R, u, c, B, D]);
|
|
1698
|
+
let T = xr();
|
|
1699
|
+
he(() => {
|
|
1700
|
+
if (O && T && Y === "visible" && R.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
1701
|
+
}, [R, Y, T, O]);
|
|
1702
|
+
let I = ee && !Z, _ = Z && B && ee, L = q(!1), k = Tr(() => {
|
|
1703
|
+
L.current || (G("hidden"), c(R));
|
|
1704
|
+
}, j), W = de((le) => {
|
|
1705
|
+
L.current = !0;
|
|
1706
|
+
let ne = le ? "enter" : "leave";
|
|
1707
|
+
k.onStart(R, ne, (ce) => {
|
|
1708
|
+
ce === "enter" ? l == null || l() : ce === "leave" && (m == null || m());
|
|
2124
1709
|
});
|
|
2125
|
-
}),
|
|
2126
|
-
let
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
}),
|
|
1710
|
+
}), U = de((le) => {
|
|
1711
|
+
let ne = le ? "enter" : "leave";
|
|
1712
|
+
L.current = !1, k.onStop(R, ne, (ce) => {
|
|
1713
|
+
ce === "enter" ? i == null || i() : ce === "leave" && (o == null || o());
|
|
1714
|
+
}), ne === "leave" && !it(k) && (G("hidden"), c(R));
|
|
2130
1715
|
});
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
}, [
|
|
2134
|
-
let
|
|
2135
|
-
|
|
2136
|
-
let
|
|
2137
|
-
return
|
|
2138
|
-
}
|
|
2139
|
-
function
|
|
2140
|
-
let { show:
|
|
2141
|
-
|
|
2142
|
-
let
|
|
2143
|
-
if (
|
|
2144
|
-
let [
|
|
2145
|
-
|
|
2146
|
-
}), [
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
}, [
|
|
2150
|
-
let d =
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
}, [
|
|
2154
|
-
let
|
|
2155
|
-
var
|
|
2156
|
-
|
|
2157
|
-
}),
|
|
2158
|
-
var
|
|
2159
|
-
|
|
2160
|
-
}),
|
|
2161
|
-
return
|
|
2162
|
-
}
|
|
2163
|
-
function ma(e, t) {
|
|
2164
|
-
let n = Z(vt) !== null, r = ht() !== null;
|
|
2165
|
-
return O.createElement(O.Fragment, null, !n && r ? O.createElement(Lt, { ref: t, ...e }) : O.createElement(Gn, { ref: t, ...e }));
|
|
2166
|
-
}
|
|
2167
|
-
let Lt = Q(pa), Gn = Q(fa), Le = Q(ma), Jn = Object.assign(Lt, { Child: Le, Root: Lt });
|
|
2168
|
-
var ha = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(ha || {}), va = ((e) => (e[e.SetTitleId = 0] = "SetTitleId", e))(va || {});
|
|
2169
|
-
let ga = { 0(e, t) {
|
|
2170
|
-
return e.titleId === t.id ? e : { ...e, titleId: t.id };
|
|
2171
|
-
} }, Vt = ae(null);
|
|
2172
|
-
Vt.displayName = "DialogContext";
|
|
2173
|
-
function yt(e) {
|
|
2174
|
-
let t = Z(Vt);
|
|
2175
|
-
if (t === null) {
|
|
2176
|
-
let n = new Error(`<${e} /> is missing a parent <Dialog /> component.`);
|
|
2177
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n, yt), n;
|
|
2178
|
-
}
|
|
2179
|
-
return t;
|
|
2180
|
-
}
|
|
2181
|
-
function wa(e, t) {
|
|
2182
|
-
return we(t.type, ga, e, t);
|
|
2183
|
-
}
|
|
2184
|
-
let wn = Q(function(e, t) {
|
|
2185
|
-
let n = Ge(), { id: r = `headlessui-dialog-${n}`, open: l, onClose: o, initialFocus: u, role: s = "dialog", autoFocus: i = !0, __demoMode: p = !1, unmount: c = !1, ...w } = e, b = j(!1);
|
|
2186
|
-
s = function() {
|
|
2187
|
-
return s === "dialog" || s === "alertdialog" ? s : (b.current || (b.current = !0, console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog");
|
|
2188
|
-
}();
|
|
2189
|
-
let y = ht();
|
|
2190
|
-
l === void 0 && y !== null && (l = (y & ue.Open) === ue.Open);
|
|
2191
|
-
let g = j(null), f = ce(g, t), d = Je(g), m = l ? 0 : 1, [v, x] = Fr(wa, { titleId: null, descriptionId: null, panelRef: kr() }), T = A(() => o(!1)), F = A((N) => x({ type: 0, id: N })), X = Ze() ? m === 0 : !1, [U, ee] = Kl(), te = { get current() {
|
|
2192
|
-
var N;
|
|
2193
|
-
return (N = v.panelRef.current) != null ? N : g.current;
|
|
2194
|
-
} }, H = Bn(), { resolveContainers: q } = Ql({ mainTreeNode: H, portals: U, defaultContainers: [te] }), G = y !== null ? (y & ue.Closing) === ue.Closing : !1;
|
|
2195
|
-
dl(p || G ? !1 : X, { allowed: A(() => {
|
|
2196
|
-
var N, Te;
|
|
2197
|
-
return [(Te = (N = g.current) == null ? void 0 : N.closest("[data-headlessui-portal]")) != null ? Te : null];
|
|
2198
|
-
}), disallowed: A(() => {
|
|
2199
|
-
var N;
|
|
2200
|
-
return [(N = H == null ? void 0 : H.closest("body > *:not(#headlessui-portal-root)")) != null ? N : null];
|
|
2201
|
-
}) }), Ol(X, q, (N) => {
|
|
2202
|
-
N.preventDefault(), T();
|
|
2203
|
-
}), Jl(X, d == null ? void 0 : d.defaultView, (N) => {
|
|
2204
|
-
N.preventDefault(), N.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), T();
|
|
2205
|
-
}), Fl(p || G ? !1 : X, d, q), fl(X, g, T);
|
|
2206
|
-
let [M, $] = nl(), I = B(() => [{ dialogState: m, close: T, setTitleId: F, unmount: c }, v], [m, v, T, F, c]), be = B(() => ({ open: m === 0 }), [m]), xe = { ref: f, id: r, role: s, tabIndex: -1, "aria-modal": p ? void 0 : m === 0 ? !0 : void 0, "aria-labelledby": v.titleId, "aria-describedby": M, unmount: c }, he = !Zl(), ne = Ce.None;
|
|
2207
|
-
X && !p && (ne |= Ce.RestoreFocus, ne |= Ce.TabLock, i && (ne |= Ce.AutoFocus), he && (ne |= Ce.InitialFocus));
|
|
2208
|
-
let Ee = ie();
|
|
2209
|
-
return O.createElement(Dl, null, O.createElement(vn, { force: !0 }, O.createElement(Gl, null, O.createElement(Vt.Provider, { value: I }, O.createElement(Un, { target: g }, O.createElement(vn, { force: !1 }, O.createElement($, { slot: be }, O.createElement(ee, null, O.createElement(la, { initialFocus: u, initialFocusFallback: g, containers: q, features: ne }, O.createElement(ul, { value: T }, Ee({ ourProps: xe, theirProps: w, slot: be, defaultTag: ya, features: ba, visible: m === 0, name: "Dialog" })))))))))));
|
|
2210
|
-
}), ya = "div", ba = it.RenderStrategy | it.Static;
|
|
2211
|
-
function xa(e, t) {
|
|
2212
|
-
let { transition: n = !1, open: r, ...l } = e, o = ht(), u = e.hasOwnProperty("open") || o !== null, s = e.hasOwnProperty("onClose");
|
|
2213
|
-
if (!u && !s) throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");
|
|
2214
|
-
if (!u) throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");
|
|
2215
|
-
if (!s) throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");
|
|
2216
|
-
if (!o && 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}`);
|
|
2217
|
-
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}`);
|
|
2218
|
-
return (r !== void 0 || n) && !l.static ? O.createElement(gn, null, O.createElement(Jn, { show: r, transition: n, unmount: l.unmount }, O.createElement(wn, { ref: t, ...l }))) : O.createElement(gn, null, O.createElement(wn, { ref: t, open: r, ...l }));
|
|
2219
|
-
}
|
|
2220
|
-
let Ea = "div";
|
|
2221
|
-
function Ta(e, t) {
|
|
2222
|
-
let n = Ge(), { id: r = `headlessui-dialog-panel-${n}`, transition: l = !1, ...o } = e, [{ dialogState: u, unmount: s }, i] = yt("Dialog.Panel"), p = ce(t, i.panelRef), c = B(() => ({ open: u === 0 }), [u]), w = A((d) => {
|
|
2223
|
-
d.stopPropagation();
|
|
2224
|
-
}), b = { ref: p, id: r, onClick: w }, y = l ? Le : se, g = l ? { unmount: s } : {}, f = ie();
|
|
2225
|
-
return O.createElement(y, { ...g }, f({ ourProps: b, theirProps: o, slot: c, defaultTag: Ea, name: "Dialog.Panel" }));
|
|
2226
|
-
}
|
|
2227
|
-
let Oa = "div";
|
|
2228
|
-
function Pa(e, t) {
|
|
2229
|
-
let { transition: n = !1, ...r } = e, [{ dialogState: l, unmount: o }] = yt("Dialog.Backdrop"), u = B(() => ({ open: l === 0 }), [l]), s = { ref: t, "aria-hidden": !0 }, i = n ? Le : se, p = n ? { unmount: o } : {}, c = ie();
|
|
2230
|
-
return O.createElement(i, { ...p }, c({ ourProps: s, theirProps: r, slot: u, defaultTag: Oa, name: "Dialog.Backdrop" }));
|
|
1716
|
+
X(() => {
|
|
1717
|
+
O && s || (W(B), U(B));
|
|
1718
|
+
}, [B, O, s]);
|
|
1719
|
+
let ae = !(!s || !O || !T || I), [, K] = kn(ae, f, B, { start: W, end: U }), ie = be({ ref: b, className: ((n = yt(d.className, _ && g, _ && y, K.enter && g, K.enter && K.closed && y, K.enter && !K.closed && w, K.leave && S, K.leave && !K.closed && p, K.leave && K.closed && E, !K.transition && B && P)) == null ? void 0 : n.trim()) || void 0, ...Cn(K) }), re = 0;
|
|
1720
|
+
Y === "visible" && (re |= ye.Open), Y === "hidden" && (re |= ye.Closed), K.enter && (re |= ye.Opening), K.leave && (re |= ye.Closing);
|
|
1721
|
+
let fe = dr();
|
|
1722
|
+
return J.createElement(at.Provider, { value: k }, J.createElement(Gn, { value: re }, fe({ ourProps: ie, theirProps: d, defaultTag: Rr, features: Sr, visible: Y === "visible", name: "Transition.Child" })));
|
|
1723
|
+
}
|
|
1724
|
+
function na(t, e) {
|
|
1725
|
+
let { show: r, appear: n = !1, unmount: s = !0, ...l } = t, i = q(null), m = Er(t), o = vr(...m ? [i, e] : e === null ? [] : [e]);
|
|
1726
|
+
xr();
|
|
1727
|
+
let g = wr();
|
|
1728
|
+
if (r === void 0 && g !== null && (r = (g & ye.Open) === ye.Open), r === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
|
|
1729
|
+
let [y, w] = z(r ? "visible" : "hidden"), P = Tr(() => {
|
|
1730
|
+
r || w("hidden");
|
|
1731
|
+
}), [S, p] = z(!0), E = q([r]);
|
|
1732
|
+
he(() => {
|
|
1733
|
+
S !== !1 && E.current[E.current.length - 1] !== r && (E.current.push(r), p(!1));
|
|
1734
|
+
}, [E, r]);
|
|
1735
|
+
let d = ve(() => ({ show: r, appear: n, initial: S }), [r, n, S]);
|
|
1736
|
+
he(() => {
|
|
1737
|
+
r ? w("visible") : !it(P) && i.current !== null && w("hidden");
|
|
1738
|
+
}, [r, P]);
|
|
1739
|
+
let f = { unmount: s }, v = de(() => {
|
|
1740
|
+
var b;
|
|
1741
|
+
S && p(!1), (b = t.beforeEnter) == null || b.call(t);
|
|
1742
|
+
}), R = de(() => {
|
|
1743
|
+
var b;
|
|
1744
|
+
S && p(!1), (b = t.beforeLeave) == null || b.call(t);
|
|
1745
|
+
}), O = dr();
|
|
1746
|
+
return J.createElement(at.Provider, { value: P }, J.createElement(nt.Provider, { value: d }, O({ ourProps: { ...f, as: we, children: J.createElement(Or, { ref: o, ...f, ...l, beforeEnter: v, beforeLeave: R }) }, theirProps: {}, defaultTag: we, features: Sr, visible: y === "visible", name: "Transition" })));
|
|
2231
1747
|
}
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
L(() => (u(r), () => u(null)), [r, u]);
|
|
2236
|
-
let i = B(() => ({ open: o === 0 }), [o]), p = { ref: s, id: r };
|
|
2237
|
-
return ie()({ ourProps: p, theirProps: l, slot: i, defaultTag: Ra, name: "Dialog.Title" });
|
|
1748
|
+
function aa(t, e) {
|
|
1749
|
+
let r = Pe(nt) !== null, n = wr() !== null;
|
|
1750
|
+
return J.createElement(J.Fragment, null, !r && n ? J.createElement(xt, { ref: e, ...t }) : J.createElement(Or, { ref: e, ...t }));
|
|
2238
1751
|
}
|
|
2239
|
-
let
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
function Zn({ onClick: e }) {
|
|
2243
|
-
return /* @__PURE__ */ R.jsxs(
|
|
1752
|
+
let xt = Ot(na), Or = Ot(ra), st = Ot(aa), ia = Object.assign(xt, { Child: st, Root: xt });
|
|
1753
|
+
function Pr({ onClick: t }) {
|
|
1754
|
+
return /* @__PURE__ */ F.jsxs(
|
|
2244
1755
|
"button",
|
|
2245
1756
|
{
|
|
2246
1757
|
type: "button",
|
|
2247
1758
|
className: "im-close-button text-gray-400 hover:text-gray-500",
|
|
2248
|
-
onClick:
|
|
1759
|
+
onClick: t,
|
|
2249
1760
|
children: [
|
|
2250
|
-
/* @__PURE__ */
|
|
2251
|
-
/* @__PURE__ */
|
|
1761
|
+
/* @__PURE__ */ F.jsx("span", { className: "sr-only", children: "Close" }),
|
|
1762
|
+
/* @__PURE__ */ F.jsx(
|
|
2252
1763
|
"svg",
|
|
2253
1764
|
{
|
|
2254
1765
|
className: "size-6",
|
|
@@ -2258,7 +1769,7 @@ function Zn({ onClick: e }) {
|
|
|
2258
1769
|
strokeWidth: "2",
|
|
2259
1770
|
stroke: "currentColor",
|
|
2260
1771
|
"aria-hidden": "true",
|
|
2261
|
-
children: /* @__PURE__ */
|
|
1772
|
+
children: /* @__PURE__ */ F.jsx(
|
|
2262
1773
|
"path",
|
|
2263
1774
|
{
|
|
2264
1775
|
strokeLinecap: "round",
|
|
@@ -2272,114 +1783,626 @@ function Zn({ onClick: e }) {
|
|
|
2272
1783
|
}
|
|
2273
1784
|
);
|
|
2274
1785
|
}
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
)
|
|
1786
|
+
/*!
|
|
1787
|
+
* focus-trap 7.6.2
|
|
1788
|
+
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
1789
|
+
*/
|
|
1790
|
+
function Et(t, e) {
|
|
1791
|
+
(e == null || e > t.length) && (e = t.length);
|
|
1792
|
+
for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
|
|
1793
|
+
return n;
|
|
1794
|
+
}
|
|
1795
|
+
function sa(t) {
|
|
1796
|
+
if (Array.isArray(t)) return Et(t);
|
|
1797
|
+
}
|
|
1798
|
+
function la(t, e, r) {
|
|
1799
|
+
return (e = fa(e)) in t ? Object.defineProperty(t, e, {
|
|
1800
|
+
value: r,
|
|
1801
|
+
enumerable: !0,
|
|
1802
|
+
configurable: !0,
|
|
1803
|
+
writable: !0
|
|
1804
|
+
}) : t[e] = r, t;
|
|
1805
|
+
}
|
|
1806
|
+
function oa(t) {
|
|
1807
|
+
if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t);
|
|
1808
|
+
}
|
|
1809
|
+
function ua() {
|
|
1810
|
+
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1811
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1812
|
+
}
|
|
1813
|
+
function Gt(t, e) {
|
|
1814
|
+
var r = Object.keys(t);
|
|
1815
|
+
if (Object.getOwnPropertySymbols) {
|
|
1816
|
+
var n = Object.getOwnPropertySymbols(t);
|
|
1817
|
+
e && (n = n.filter(function(s) {
|
|
1818
|
+
return Object.getOwnPropertyDescriptor(t, s).enumerable;
|
|
1819
|
+
})), r.push.apply(r, n);
|
|
2309
1820
|
}
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
1821
|
+
return r;
|
|
1822
|
+
}
|
|
1823
|
+
function Jt(t) {
|
|
1824
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
1825
|
+
var r = arguments[e] != null ? arguments[e] : {};
|
|
1826
|
+
e % 2 ? Gt(Object(r), !0).forEach(function(n) {
|
|
1827
|
+
la(t, n, r[n]);
|
|
1828
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Gt(Object(r)).forEach(function(n) {
|
|
1829
|
+
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1830
|
+
});
|
|
1831
|
+
}
|
|
1832
|
+
return t;
|
|
1833
|
+
}
|
|
1834
|
+
function ca(t) {
|
|
1835
|
+
return sa(t) || oa(t) || va(t) || ua();
|
|
1836
|
+
}
|
|
1837
|
+
function da(t, e) {
|
|
1838
|
+
if (typeof t != "object" || !t) return t;
|
|
1839
|
+
var r = t[Symbol.toPrimitive];
|
|
1840
|
+
if (r !== void 0) {
|
|
1841
|
+
var n = r.call(t, e || "default");
|
|
1842
|
+
if (typeof n != "object") return n;
|
|
1843
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1844
|
+
}
|
|
1845
|
+
return (e === "string" ? String : Number)(t);
|
|
1846
|
+
}
|
|
1847
|
+
function fa(t) {
|
|
1848
|
+
var e = da(t, "string");
|
|
1849
|
+
return typeof e == "symbol" ? e : e + "";
|
|
1850
|
+
}
|
|
1851
|
+
function va(t, e) {
|
|
1852
|
+
if (t) {
|
|
1853
|
+
if (typeof t == "string") return Et(t, e);
|
|
1854
|
+
var r = {}.toString.call(t).slice(8, -1);
|
|
1855
|
+
return r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set" ? Array.from(t) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Et(t, e) : void 0;
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
var Zt = {
|
|
1859
|
+
activateTrap: function(e, r) {
|
|
1860
|
+
if (e.length > 0) {
|
|
1861
|
+
var n = e[e.length - 1];
|
|
1862
|
+
n !== r && n.pause();
|
|
1863
|
+
}
|
|
1864
|
+
var s = e.indexOf(r);
|
|
1865
|
+
s === -1 || e.splice(s, 1), e.push(r);
|
|
1866
|
+
},
|
|
1867
|
+
deactivateTrap: function(e, r) {
|
|
1868
|
+
var n = e.indexOf(r);
|
|
1869
|
+
n !== -1 && e.splice(n, 1), e.length > 0 && e[e.length - 1].unpause();
|
|
1870
|
+
}
|
|
1871
|
+
}, pa = function(e) {
|
|
1872
|
+
return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
|
|
1873
|
+
}, ha = function(e) {
|
|
1874
|
+
return (e == null ? void 0 : e.key) === "Escape" || (e == null ? void 0 : e.key) === "Esc" || (e == null ? void 0 : e.keyCode) === 27;
|
|
1875
|
+
}, Me = function(e) {
|
|
1876
|
+
return (e == null ? void 0 : e.key) === "Tab" || (e == null ? void 0 : e.keyCode) === 9;
|
|
1877
|
+
}, ma = function(e) {
|
|
1878
|
+
return Me(e) && !e.shiftKey;
|
|
1879
|
+
}, ba = function(e) {
|
|
1880
|
+
return Me(e) && e.shiftKey;
|
|
1881
|
+
}, Qt = function(e) {
|
|
1882
|
+
return setTimeout(e, 0);
|
|
1883
|
+
}, Ae = function(e) {
|
|
1884
|
+
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
|
|
1885
|
+
n[s - 1] = arguments[s];
|
|
1886
|
+
return typeof e == "function" ? e.apply(void 0, n) : e;
|
|
1887
|
+
}, Be = function(e) {
|
|
1888
|
+
return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
|
|
1889
|
+
}, ga = [], ya = function(e, r) {
|
|
1890
|
+
var n = (r == null ? void 0 : r.document) || document, s = (r == null ? void 0 : r.trapStack) || ga, l = Jt({
|
|
1891
|
+
returnFocusOnDeactivate: !0,
|
|
1892
|
+
escapeDeactivates: !0,
|
|
1893
|
+
delayInitialFocus: !0,
|
|
1894
|
+
isKeyForward: ma,
|
|
1895
|
+
isKeyBackward: ba
|
|
1896
|
+
}, r), i = {
|
|
1897
|
+
// containers given to createFocusTrap()
|
|
1898
|
+
// @type {Array<HTMLElement>}
|
|
1899
|
+
containers: [],
|
|
1900
|
+
// list of objects identifying tabbable nodes in `containers` in the trap
|
|
1901
|
+
// NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
|
|
1902
|
+
// is active, but the trap should never get to a state where there isn't at least one group
|
|
1903
|
+
// with at least one tabbable node in it (that would lead to an error condition that would
|
|
1904
|
+
// result in an error being thrown)
|
|
1905
|
+
// @type {Array<{
|
|
1906
|
+
// container: HTMLElement,
|
|
1907
|
+
// tabbableNodes: Array<HTMLElement>, // empty if none
|
|
1908
|
+
// focusableNodes: Array<HTMLElement>, // empty if none
|
|
1909
|
+
// posTabIndexesFound: boolean,
|
|
1910
|
+
// firstTabbableNode: HTMLElement|undefined,
|
|
1911
|
+
// lastTabbableNode: HTMLElement|undefined,
|
|
1912
|
+
// firstDomTabbableNode: HTMLElement|undefined,
|
|
1913
|
+
// lastDomTabbableNode: HTMLElement|undefined,
|
|
1914
|
+
// nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
|
|
1915
|
+
// }>}
|
|
1916
|
+
containerGroups: [],
|
|
1917
|
+
// same order/length as `containers` list
|
|
1918
|
+
// references to objects in `containerGroups`, but only those that actually have
|
|
1919
|
+
// tabbable nodes in them
|
|
1920
|
+
// NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
|
|
1921
|
+
// the same length
|
|
1922
|
+
tabbableGroups: [],
|
|
1923
|
+
nodeFocusedBeforeActivation: null,
|
|
1924
|
+
mostRecentlyFocusedNode: null,
|
|
1925
|
+
active: !1,
|
|
1926
|
+
paused: !1,
|
|
1927
|
+
// timer ID for when delayInitialFocus is true and initial focus in this trap
|
|
1928
|
+
// has been delayed during activation
|
|
1929
|
+
delayInitialFocusTimer: void 0,
|
|
1930
|
+
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
1931
|
+
recentNavEvent: void 0
|
|
1932
|
+
}, m, o = function(u, c, T) {
|
|
1933
|
+
return u && u[c] !== void 0 ? u[c] : l[T || c];
|
|
1934
|
+
}, g = function(u, c) {
|
|
1935
|
+
var T = typeof (c == null ? void 0 : c.composedPath) == "function" ? c.composedPath() : void 0;
|
|
1936
|
+
return i.containerGroups.findIndex(function(I) {
|
|
1937
|
+
var _ = I.container, L = I.tabbableNodes;
|
|
1938
|
+
return _.contains(u) || // fall back to explicit tabbable search which will take into consideration any
|
|
1939
|
+
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
1940
|
+
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
1941
|
+
// look inside web components even if open)
|
|
1942
|
+
(T == null ? void 0 : T.includes(_)) || L.find(function(k) {
|
|
1943
|
+
return k === u;
|
|
1944
|
+
});
|
|
1945
|
+
});
|
|
1946
|
+
}, y = function(u) {
|
|
1947
|
+
var c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, T = c.hasFallback, I = T === void 0 ? !1 : T, _ = c.params, L = _ === void 0 ? [] : _, k = l[u];
|
|
1948
|
+
if (typeof k == "function" && (k = k.apply(void 0, ca(L))), k === !0 && (k = void 0), !k) {
|
|
1949
|
+
if (k === void 0 || k === !1)
|
|
1950
|
+
return k;
|
|
1951
|
+
throw new Error("`".concat(u, "` was specified but was not a node, or did not return a node"));
|
|
1952
|
+
}
|
|
1953
|
+
var W = k;
|
|
1954
|
+
if (typeof k == "string") {
|
|
1955
|
+
try {
|
|
1956
|
+
W = n.querySelector(k);
|
|
1957
|
+
} catch (U) {
|
|
1958
|
+
throw new Error("`".concat(u, '` appears to be an invalid selector; error="').concat(U.message, '"'));
|
|
2341
1959
|
}
|
|
2342
|
-
|
|
1960
|
+
if (!W && !I)
|
|
1961
|
+
throw new Error("`".concat(u, "` as selector refers to no known node"));
|
|
1962
|
+
}
|
|
1963
|
+
return W;
|
|
1964
|
+
}, w = function() {
|
|
1965
|
+
var u = y("initialFocus", {
|
|
1966
|
+
hasFallback: !0
|
|
1967
|
+
});
|
|
1968
|
+
if (u === !1)
|
|
1969
|
+
return !1;
|
|
1970
|
+
if (u === void 0 || u && !ht(u, l.tabbableOptions))
|
|
1971
|
+
if (g(n.activeElement) >= 0)
|
|
1972
|
+
u = n.activeElement;
|
|
1973
|
+
else {
|
|
1974
|
+
var c = i.tabbableGroups[0], T = c && c.firstTabbableNode;
|
|
1975
|
+
u = T || y("fallbackFocus");
|
|
1976
|
+
}
|
|
1977
|
+
else u === null && (u = y("fallbackFocus"));
|
|
1978
|
+
if (!u)
|
|
1979
|
+
throw new Error("Your focus-trap needs to have at least one focusable element");
|
|
1980
|
+
return u;
|
|
1981
|
+
}, P = function() {
|
|
1982
|
+
if (i.containerGroups = i.containers.map(function(u) {
|
|
1983
|
+
var c = qn(u, l.tabbableOptions), T = Xn(u, l.tabbableOptions), I = c.length > 0 ? c[0] : void 0, _ = c.length > 0 ? c[c.length - 1] : void 0, L = T.find(function(U) {
|
|
1984
|
+
return Oe(U);
|
|
1985
|
+
}), k = T.slice().reverse().find(function(U) {
|
|
1986
|
+
return Oe(U);
|
|
1987
|
+
}), W = !!c.find(function(U) {
|
|
1988
|
+
return ge(U) > 0;
|
|
1989
|
+
});
|
|
1990
|
+
return {
|
|
1991
|
+
container: u,
|
|
1992
|
+
tabbableNodes: c,
|
|
1993
|
+
focusableNodes: T,
|
|
1994
|
+
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
1995
|
+
posTabIndexesFound: W,
|
|
1996
|
+
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
1997
|
+
firstTabbableNode: I,
|
|
1998
|
+
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
1999
|
+
lastTabbableNode: _,
|
|
2000
|
+
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
|
2001
|
+
// would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
|
|
2002
|
+
// because that API doesn't work with Shadow DOM as well as it should (@see
|
|
2003
|
+
// https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
|
|
2004
|
+
// to address an edge case related to positive tabindex support, this seems like a much easier,
|
|
2005
|
+
// "close enough most of the time" alternative for positive tabindexes which should generally
|
|
2006
|
+
// be avoided anyway...
|
|
2007
|
+
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
2008
|
+
firstDomTabbableNode: L,
|
|
2009
|
+
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
2010
|
+
lastDomTabbableNode: k,
|
|
2011
|
+
/**
|
|
2012
|
+
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
|
2013
|
+
* in this container, if any.
|
|
2014
|
+
* @param {HTMLElement} node
|
|
2015
|
+
* @param {boolean} [forward] True if going in forward tab order; false if going
|
|
2016
|
+
* in reverse.
|
|
2017
|
+
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
2018
|
+
*/
|
|
2019
|
+
nextTabbableNode: function(ae) {
|
|
2020
|
+
var K = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, ie = c.indexOf(ae);
|
|
2021
|
+
return ie < 0 ? K ? T.slice(T.indexOf(ae) + 1).find(function(re) {
|
|
2022
|
+
return Oe(re);
|
|
2023
|
+
}) : T.slice(0, T.indexOf(ae)).reverse().find(function(re) {
|
|
2024
|
+
return Oe(re);
|
|
2025
|
+
}) : c[ie + (K ? 1 : -1)];
|
|
2026
|
+
}
|
|
2027
|
+
};
|
|
2028
|
+
}), i.tabbableGroups = i.containerGroups.filter(function(u) {
|
|
2029
|
+
return u.tabbableNodes.length > 0;
|
|
2030
|
+
}), i.tabbableGroups.length <= 0 && !y("fallbackFocus"))
|
|
2031
|
+
throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
|
|
2032
|
+
if (i.containerGroups.find(function(u) {
|
|
2033
|
+
return u.posTabIndexesFound;
|
|
2034
|
+
}) && i.containerGroups.length > 1)
|
|
2035
|
+
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
2036
|
+
}, S = function(u) {
|
|
2037
|
+
var c = u.activeElement;
|
|
2038
|
+
if (c)
|
|
2039
|
+
return c.shadowRoot && c.shadowRoot.activeElement !== null ? S(c.shadowRoot) : c;
|
|
2040
|
+
}, p = function(u) {
|
|
2041
|
+
if (u !== !1 && u !== S(document)) {
|
|
2042
|
+
if (!u || !u.focus) {
|
|
2043
|
+
p(w());
|
|
2044
|
+
return;
|
|
2045
|
+
}
|
|
2046
|
+
u.focus({
|
|
2047
|
+
preventScroll: !!l.preventScroll
|
|
2048
|
+
}), i.mostRecentlyFocusedNode = u, pa(u) && u.select();
|
|
2049
|
+
}
|
|
2050
|
+
}, E = function(u) {
|
|
2051
|
+
var c = y("setReturnFocus", {
|
|
2052
|
+
params: [u]
|
|
2053
|
+
});
|
|
2054
|
+
return c || (c === !1 ? !1 : u);
|
|
2055
|
+
}, d = function(u) {
|
|
2056
|
+
var c = u.target, T = u.event, I = u.isBackward, _ = I === void 0 ? !1 : I;
|
|
2057
|
+
c = c || Be(T), P();
|
|
2058
|
+
var L = null;
|
|
2059
|
+
if (i.tabbableGroups.length > 0) {
|
|
2060
|
+
var k = g(c, T), W = k >= 0 ? i.containerGroups[k] : void 0;
|
|
2061
|
+
if (k < 0)
|
|
2062
|
+
_ ? L = i.tabbableGroups[i.tabbableGroups.length - 1].lastTabbableNode : L = i.tabbableGroups[0].firstTabbableNode;
|
|
2063
|
+
else if (_) {
|
|
2064
|
+
var U = i.tabbableGroups.findIndex(function(le) {
|
|
2065
|
+
var ne = le.firstTabbableNode;
|
|
2066
|
+
return c === ne;
|
|
2067
|
+
});
|
|
2068
|
+
if (U < 0 && (W.container === c || ht(c, l.tabbableOptions) && !Oe(c, l.tabbableOptions) && !W.nextTabbableNode(c, !1)) && (U = k), U >= 0) {
|
|
2069
|
+
var ae = U === 0 ? i.tabbableGroups.length - 1 : U - 1, K = i.tabbableGroups[ae];
|
|
2070
|
+
L = ge(c) >= 0 ? K.lastTabbableNode : K.lastDomTabbableNode;
|
|
2071
|
+
} else Me(T) || (L = W.nextTabbableNode(c, !1));
|
|
2072
|
+
} else {
|
|
2073
|
+
var ie = i.tabbableGroups.findIndex(function(le) {
|
|
2074
|
+
var ne = le.lastTabbableNode;
|
|
2075
|
+
return c === ne;
|
|
2076
|
+
});
|
|
2077
|
+
if (ie < 0 && (W.container === c || ht(c, l.tabbableOptions) && !Oe(c, l.tabbableOptions) && !W.nextTabbableNode(c)) && (ie = k), ie >= 0) {
|
|
2078
|
+
var re = ie === i.tabbableGroups.length - 1 ? 0 : ie + 1, fe = i.tabbableGroups[re];
|
|
2079
|
+
L = ge(c) >= 0 ? fe.firstTabbableNode : fe.firstDomTabbableNode;
|
|
2080
|
+
} else Me(T) || (L = W.nextTabbableNode(c));
|
|
2081
|
+
}
|
|
2082
|
+
} else
|
|
2083
|
+
L = y("fallbackFocus");
|
|
2084
|
+
return L;
|
|
2085
|
+
}, f = function(u) {
|
|
2086
|
+
var c = Be(u);
|
|
2087
|
+
if (!(g(c, u) >= 0)) {
|
|
2088
|
+
if (Ae(l.clickOutsideDeactivates, u)) {
|
|
2089
|
+
m.deactivate({
|
|
2090
|
+
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
2091
|
+
// which will result in the outside click setting focus to the node
|
|
2092
|
+
// that was clicked (and if not focusable, to "nothing"); by setting
|
|
2093
|
+
// `returnFocus: true`, we'll attempt to re-focus the node originally-focused
|
|
2094
|
+
// on activation (or the configured `setReturnFocus` node), whether the
|
|
2095
|
+
// outside click was on a focusable node or not
|
|
2096
|
+
returnFocus: l.returnFocusOnDeactivate
|
|
2097
|
+
});
|
|
2098
|
+
return;
|
|
2099
|
+
}
|
|
2100
|
+
Ae(l.allowOutsideClick, u) || u.preventDefault();
|
|
2101
|
+
}
|
|
2102
|
+
}, v = function(u) {
|
|
2103
|
+
var c = Be(u), T = g(c, u) >= 0;
|
|
2104
|
+
if (T || c instanceof Document)
|
|
2105
|
+
T && (i.mostRecentlyFocusedNode = c);
|
|
2106
|
+
else {
|
|
2107
|
+
u.stopImmediatePropagation();
|
|
2108
|
+
var I, _ = !0;
|
|
2109
|
+
if (i.mostRecentlyFocusedNode)
|
|
2110
|
+
if (ge(i.mostRecentlyFocusedNode) > 0) {
|
|
2111
|
+
var L = g(i.mostRecentlyFocusedNode), k = i.containerGroups[L].tabbableNodes;
|
|
2112
|
+
if (k.length > 0) {
|
|
2113
|
+
var W = k.findIndex(function(U) {
|
|
2114
|
+
return U === i.mostRecentlyFocusedNode;
|
|
2115
|
+
});
|
|
2116
|
+
W >= 0 && (l.isKeyForward(i.recentNavEvent) ? W + 1 < k.length && (I = k[W + 1], _ = !1) : W - 1 >= 0 && (I = k[W - 1], _ = !1));
|
|
2117
|
+
}
|
|
2118
|
+
} else
|
|
2119
|
+
i.containerGroups.some(function(U) {
|
|
2120
|
+
return U.tabbableNodes.some(function(ae) {
|
|
2121
|
+
return ge(ae) > 0;
|
|
2122
|
+
});
|
|
2123
|
+
}) || (_ = !1);
|
|
2124
|
+
else
|
|
2125
|
+
_ = !1;
|
|
2126
|
+
_ && (I = d({
|
|
2127
|
+
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
2128
|
+
// outside the trap causing the focus escape we're trying to fix)
|
|
2129
|
+
target: i.mostRecentlyFocusedNode,
|
|
2130
|
+
isBackward: l.isKeyBackward(i.recentNavEvent)
|
|
2131
|
+
})), p(I || i.mostRecentlyFocusedNode || w());
|
|
2132
|
+
}
|
|
2133
|
+
i.recentNavEvent = void 0;
|
|
2134
|
+
}, R = function(u) {
|
|
2135
|
+
var c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
2136
|
+
i.recentNavEvent = u;
|
|
2137
|
+
var T = d({
|
|
2138
|
+
event: u,
|
|
2139
|
+
isBackward: c
|
|
2140
|
+
});
|
|
2141
|
+
T && (Me(u) && u.preventDefault(), p(T));
|
|
2142
|
+
}, O = function(u) {
|
|
2143
|
+
(l.isKeyForward(u) || l.isKeyBackward(u)) && R(u, l.isKeyBackward(u));
|
|
2144
|
+
}, b = function(u) {
|
|
2145
|
+
ha(u) && Ae(l.escapeDeactivates, u) !== !1 && (u.preventDefault(), m.deactivate());
|
|
2146
|
+
}, D = function(u) {
|
|
2147
|
+
var c = Be(u);
|
|
2148
|
+
g(c, u) >= 0 || Ae(l.clickOutsideDeactivates, u) || Ae(l.allowOutsideClick, u) || (u.preventDefault(), u.stopImmediatePropagation());
|
|
2149
|
+
}, B = function() {
|
|
2150
|
+
if (i.active)
|
|
2151
|
+
return Zt.activateTrap(s, m), i.delayInitialFocusTimer = l.delayInitialFocus ? Qt(function() {
|
|
2152
|
+
p(w());
|
|
2153
|
+
}) : p(w()), n.addEventListener("focusin", v, !0), n.addEventListener("mousedown", f, {
|
|
2154
|
+
capture: !0,
|
|
2155
|
+
passive: !1
|
|
2156
|
+
}), n.addEventListener("touchstart", f, {
|
|
2157
|
+
capture: !0,
|
|
2158
|
+
passive: !1
|
|
2159
|
+
}), n.addEventListener("click", D, {
|
|
2160
|
+
capture: !0,
|
|
2161
|
+
passive: !1
|
|
2162
|
+
}), n.addEventListener("keydown", O, {
|
|
2163
|
+
capture: !0,
|
|
2164
|
+
passive: !1
|
|
2165
|
+
}), n.addEventListener("keydown", b), m;
|
|
2166
|
+
}, Z = function() {
|
|
2167
|
+
if (i.active)
|
|
2168
|
+
return n.removeEventListener("focusin", v, !0), n.removeEventListener("mousedown", f, !0), n.removeEventListener("touchstart", f, !0), n.removeEventListener("click", D, !0), n.removeEventListener("keydown", O, !0), n.removeEventListener("keydown", b), m;
|
|
2169
|
+
}, ee = function(u) {
|
|
2170
|
+
var c = u.some(function(T) {
|
|
2171
|
+
var I = Array.from(T.removedNodes);
|
|
2172
|
+
return I.some(function(_) {
|
|
2173
|
+
return _ === i.mostRecentlyFocusedNode;
|
|
2174
|
+
});
|
|
2175
|
+
});
|
|
2176
|
+
c && p(w());
|
|
2177
|
+
}, Y = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(ee) : void 0, G = function() {
|
|
2178
|
+
Y && (Y.disconnect(), i.active && !i.paused && i.containers.map(function(u) {
|
|
2179
|
+
Y.observe(u, {
|
|
2180
|
+
subtree: !0,
|
|
2181
|
+
childList: !0
|
|
2182
|
+
});
|
|
2183
|
+
}));
|
|
2184
|
+
};
|
|
2185
|
+
return m = {
|
|
2186
|
+
get active() {
|
|
2187
|
+
return i.active;
|
|
2188
|
+
},
|
|
2189
|
+
get paused() {
|
|
2190
|
+
return i.paused;
|
|
2191
|
+
},
|
|
2192
|
+
activate: function(u) {
|
|
2193
|
+
if (i.active)
|
|
2194
|
+
return this;
|
|
2195
|
+
var c = o(u, "onActivate"), T = o(u, "onPostActivate"), I = o(u, "checkCanFocusTrap");
|
|
2196
|
+
I || P(), i.active = !0, i.paused = !1, i.nodeFocusedBeforeActivation = n.activeElement, c == null || c();
|
|
2197
|
+
var _ = function() {
|
|
2198
|
+
I && P(), B(), G(), T == null || T();
|
|
2199
|
+
};
|
|
2200
|
+
return I ? (I(i.containers.concat()).then(_, _), this) : (_(), this);
|
|
2201
|
+
},
|
|
2202
|
+
deactivate: function(u) {
|
|
2203
|
+
if (!i.active)
|
|
2204
|
+
return this;
|
|
2205
|
+
var c = Jt({
|
|
2206
|
+
onDeactivate: l.onDeactivate,
|
|
2207
|
+
onPostDeactivate: l.onPostDeactivate,
|
|
2208
|
+
checkCanReturnFocus: l.checkCanReturnFocus
|
|
2209
|
+
}, u);
|
|
2210
|
+
clearTimeout(i.delayInitialFocusTimer), i.delayInitialFocusTimer = void 0, Z(), i.active = !1, i.paused = !1, G(), Zt.deactivateTrap(s, m);
|
|
2211
|
+
var T = o(c, "onDeactivate"), I = o(c, "onPostDeactivate"), _ = o(c, "checkCanReturnFocus"), L = o(c, "returnFocus", "returnFocusOnDeactivate");
|
|
2212
|
+
T == null || T();
|
|
2213
|
+
var k = function() {
|
|
2214
|
+
Qt(function() {
|
|
2215
|
+
L && p(E(i.nodeFocusedBeforeActivation)), I == null || I();
|
|
2216
|
+
});
|
|
2217
|
+
};
|
|
2218
|
+
return L && _ ? (_(E(i.nodeFocusedBeforeActivation)).then(k, k), this) : (k(), this);
|
|
2219
|
+
},
|
|
2220
|
+
pause: function(u) {
|
|
2221
|
+
if (i.paused || !i.active)
|
|
2222
|
+
return this;
|
|
2223
|
+
var c = o(u, "onPause"), T = o(u, "onPostPause");
|
|
2224
|
+
return i.paused = !0, c == null || c(), Z(), G(), T == null || T(), this;
|
|
2225
|
+
},
|
|
2226
|
+
unpause: function(u) {
|
|
2227
|
+
if (!i.paused || !i.active)
|
|
2228
|
+
return this;
|
|
2229
|
+
var c = o(u, "onUnpause"), T = o(u, "onPostUnpause");
|
|
2230
|
+
return i.paused = !1, c == null || c(), P(), B(), G(), T == null || T(), this;
|
|
2231
|
+
},
|
|
2232
|
+
updateContainerElements: function(u) {
|
|
2233
|
+
var c = [].concat(u).filter(Boolean);
|
|
2234
|
+
return i.containers = c.map(function(T) {
|
|
2235
|
+
return typeof T == "string" ? n.querySelector(T) : T;
|
|
2236
|
+
}), i.active && P(), G(), this;
|
|
2237
|
+
}
|
|
2238
|
+
}, m.updateContainerElements(e), m;
|
|
2239
|
+
};
|
|
2240
|
+
function Cr(t, e, r) {
|
|
2241
|
+
let n = null;
|
|
2242
|
+
return t && (n = ya(t, {
|
|
2243
|
+
clickOutsideDeactivates: !e,
|
|
2244
|
+
escapeDeactivates: !e,
|
|
2245
|
+
onDeactivate: () => r == null ? void 0 : r(),
|
|
2246
|
+
fallbackFocus: () => t
|
|
2247
|
+
}), n.activate()), { deactivate: () => {
|
|
2248
|
+
n == null || n.deactivate(), n = null;
|
|
2249
|
+
}, wrapper: t };
|
|
2250
|
+
}
|
|
2251
|
+
const wa = ({ modalContext: t, config: e, children: r }) => {
|
|
2252
|
+
const [n, s] = z(!1), l = q(null), [i, m] = z(null);
|
|
2253
|
+
function o() {
|
|
2254
|
+
m(Cr(l.current, e == null ? void 0 : e.closeExplicitly, () => t.close())), s(!0);
|
|
2255
|
+
}
|
|
2256
|
+
return X(() => () => i == null ? void 0 : i.deactivate(), [i]), /* @__PURE__ */ F.jsx("div", { className: "im-modal-container fixed inset-0 z-40 overflow-y-auto p-4", children: /* @__PURE__ */ F.jsx(
|
|
2257
|
+
"div",
|
|
2258
|
+
{
|
|
2259
|
+
className: Ye("im-modal-positioner flex min-h-full justify-center", {
|
|
2260
|
+
"items-start": e.position === "top",
|
|
2261
|
+
"items-center": e.position === "center",
|
|
2262
|
+
"items-end": e.position === "bottom"
|
|
2263
|
+
}),
|
|
2264
|
+
children: /* @__PURE__ */ F.jsx(
|
|
2265
|
+
st,
|
|
2266
|
+
{
|
|
2267
|
+
as: "div",
|
|
2268
|
+
ref: l,
|
|
2269
|
+
enterFrom: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
2270
|
+
enterTo: "opacity-100 translate-y-0 sm:scale-100",
|
|
2271
|
+
leaveFrom: "opacity-100 translate-y-0 sm:scale-100",
|
|
2272
|
+
leaveTo: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
2273
|
+
afterEnter: o,
|
|
2274
|
+
afterLeave: t.afterLeave,
|
|
2275
|
+
className: Ye(
|
|
2276
|
+
"im-modal-wrapper pointer-events-auto w-full transition duration-300 ease-in-out",
|
|
2277
|
+
t.onTopOfStack ? "" : "blur-sm",
|
|
2278
|
+
{
|
|
2279
|
+
"sm:max-w-sm": e.maxWidth === "sm",
|
|
2280
|
+
"sm:max-w-md": e.maxWidth === "md",
|
|
2281
|
+
"sm:max-w-md md:max-w-lg": e.maxWidth === "lg",
|
|
2282
|
+
"sm:max-w-md md:max-w-xl": e.maxWidth === "xl",
|
|
2283
|
+
"sm:max-w-md md:max-w-xl lg:max-w-2xl": e.maxWidth === "2xl",
|
|
2284
|
+
"sm:max-w-md md:max-w-xl lg:max-w-3xl": e.maxWidth === "3xl",
|
|
2285
|
+
"sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl": e.maxWidth === "4xl",
|
|
2286
|
+
"sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl": e.maxWidth === "5xl",
|
|
2287
|
+
"sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl": e.maxWidth === "6xl",
|
|
2288
|
+
"sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": e.maxWidth === "7xl"
|
|
2289
|
+
}
|
|
2290
|
+
),
|
|
2291
|
+
children: /* @__PURE__ */ F.jsxs(
|
|
2292
|
+
"div",
|
|
2293
|
+
{
|
|
2294
|
+
className: `im-modal-content relative ${e.paddingClasses} ${e.panelClasses}`,
|
|
2295
|
+
"data-inertiaui-modal-entered": n,
|
|
2296
|
+
children: [
|
|
2297
|
+
e.closeButton && /* @__PURE__ */ F.jsx("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ F.jsx(Pr, { onClick: t.close }) }),
|
|
2298
|
+
typeof r == "function" ? r({ modalContext: t, config: e }) : r
|
|
2299
|
+
]
|
|
2300
|
+
}
|
|
2301
|
+
)
|
|
2302
|
+
}
|
|
2303
|
+
)
|
|
2304
|
+
}
|
|
2305
|
+
) });
|
|
2306
|
+
}, xa = ({ modalContext: t, config: e, children: r }) => {
|
|
2307
|
+
const [n, s] = z(!1), l = q(null), [i, m] = z(null);
|
|
2308
|
+
function o() {
|
|
2309
|
+
m(Cr(l.current, e == null ? void 0 : e.closeExplicitly, () => t.close())), s(!0);
|
|
2343
2310
|
}
|
|
2344
|
-
)
|
|
2345
|
-
|
|
2346
|
-
return yn(r, () => o.current, [o]), /* @__PURE__ */ R.jsx(
|
|
2347
|
-
Pn,
|
|
2311
|
+
return X(() => () => i == null ? void 0 : i.deactivate(), [i]), /* @__PURE__ */ F.jsx("div", { className: "im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ F.jsx(
|
|
2312
|
+
"div",
|
|
2348
2313
|
{
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2314
|
+
className: Ye("im-slideover-positioner flex min-h-full items-center", {
|
|
2315
|
+
"justify-start rtl:justify-end": (e == null ? void 0 : e.position) === "left",
|
|
2316
|
+
"justify-end rtl:justify-start": (e == null ? void 0 : e.position) === "right"
|
|
2317
|
+
}),
|
|
2318
|
+
children: /* @__PURE__ */ F.jsx(
|
|
2319
|
+
st,
|
|
2320
|
+
{
|
|
2321
|
+
as: "div",
|
|
2322
|
+
ref: l,
|
|
2323
|
+
enterFrom: `opacity-0 ${e.position === "left" ? "-translate-x-full" : "translate-x-full"}`,
|
|
2324
|
+
enterTo: "opacity-100 translate-x-0",
|
|
2325
|
+
leaveFrom: "opacity-100 translate-x-0",
|
|
2326
|
+
leaveTo: `opacity-0 ${e.position === "left" ? "-translate-x-full" : "translate-x-full"}`,
|
|
2327
|
+
afterEnter: o,
|
|
2328
|
+
afterLeave: t.afterLeave,
|
|
2329
|
+
className: Ye(
|
|
2330
|
+
"im-slideover-wrapper pointer-events-auto w-full transition duration-300 ease-in-out",
|
|
2331
|
+
t.onTopOfStack ? "" : "blur-sm",
|
|
2332
|
+
{
|
|
2333
|
+
"sm:max-w-sm": e.maxWidth === "sm",
|
|
2334
|
+
"sm:max-w-md": e.maxWidth === "md",
|
|
2335
|
+
"sm:max-w-md md:max-w-lg": e.maxWidth === "lg",
|
|
2336
|
+
"sm:max-w-md md:max-w-xl": e.maxWidth === "xl",
|
|
2337
|
+
"sm:max-w-md md:max-w-xl lg:max-w-2xl": e.maxWidth === "2xl",
|
|
2338
|
+
"sm:max-w-md md:max-w-xl lg:max-w-3xl": e.maxWidth === "3xl",
|
|
2339
|
+
"sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl": e.maxWidth === "4xl",
|
|
2340
|
+
"sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl": e.maxWidth === "5xl",
|
|
2341
|
+
"sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl": e.maxWidth === "6xl",
|
|
2342
|
+
"sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": e.maxWidth === "7xl"
|
|
2343
|
+
}
|
|
2344
|
+
),
|
|
2345
|
+
children: /* @__PURE__ */ F.jsxs(
|
|
2346
|
+
"div",
|
|
2347
|
+
{
|
|
2348
|
+
className: `im-slideover-content relative ${e.paddingClasses} ${e.panelClasses}`,
|
|
2349
|
+
"data-inertiaui-modal-entered": n,
|
|
2350
|
+
children: [
|
|
2351
|
+
e.closeButton && /* @__PURE__ */ F.jsx("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ F.jsx(Pr, { onClick: t.close }) }),
|
|
2352
|
+
typeof r == "function" ? r({ modalContext: t, config: e }) : r
|
|
2353
|
+
]
|
|
2354
|
+
}
|
|
2355
|
+
)
|
|
2356
|
+
}
|
|
2357
|
+
)
|
|
2358
|
+
}
|
|
2359
|
+
) });
|
|
2360
|
+
}, Ea = Tt(({ name: t, children: e, onFocus: r = null, onBlur: n = null, onClose: s = null, onSuccess: l = null, onAfterLeave: i = null, ...m }, o) => {
|
|
2361
|
+
const g = (w) => typeof e == "function" ? e(w) : e, y = q(null);
|
|
2362
|
+
return X(() => {
|
|
2363
|
+
var w;
|
|
2364
|
+
if (((w = y == null ? void 0 : y.current) == null ? void 0 : w.index) === 0)
|
|
2365
|
+
return Ht.prepare(), () => Ht.cleanup();
|
|
2366
|
+
}, [y]), er(o, () => y.current, [y]), /* @__PURE__ */ F.jsx(
|
|
2367
|
+
sr,
|
|
2368
|
+
{
|
|
2369
|
+
ref: y,
|
|
2370
|
+
name: t,
|
|
2371
|
+
onFocus: r,
|
|
2372
|
+
onBlur: n,
|
|
2373
|
+
onClose: s,
|
|
2374
|
+
onSuccess: l,
|
|
2375
|
+
...m,
|
|
2352
2376
|
children: ({
|
|
2353
|
-
afterLeave:
|
|
2354
|
-
close:
|
|
2355
|
-
config:
|
|
2377
|
+
afterLeave: w,
|
|
2378
|
+
close: P,
|
|
2379
|
+
config: S,
|
|
2356
2380
|
emit: p,
|
|
2357
|
-
getChildModal:
|
|
2358
|
-
getParentModal:
|
|
2359
|
-
id:
|
|
2360
|
-
index:
|
|
2361
|
-
isOpen:
|
|
2362
|
-
modalContext:
|
|
2363
|
-
onTopOfStack:
|
|
2364
|
-
reload:
|
|
2365
|
-
setOpen:
|
|
2366
|
-
shouldRender:
|
|
2367
|
-
}) => /* @__PURE__ */
|
|
2368
|
-
|
|
2381
|
+
getChildModal: E,
|
|
2382
|
+
getParentModal: d,
|
|
2383
|
+
id: f,
|
|
2384
|
+
index: v,
|
|
2385
|
+
isOpen: R,
|
|
2386
|
+
modalContext: O,
|
|
2387
|
+
onTopOfStack: b,
|
|
2388
|
+
reload: D,
|
|
2389
|
+
setOpen: B,
|
|
2390
|
+
shouldRender: Z
|
|
2391
|
+
}) => /* @__PURE__ */ F.jsx(
|
|
2392
|
+
ia,
|
|
2369
2393
|
{
|
|
2370
2394
|
appear: !0,
|
|
2371
|
-
show:
|
|
2372
|
-
|
|
2373
|
-
|
|
2395
|
+
show: R ?? !1,
|
|
2396
|
+
afterLeave: i,
|
|
2397
|
+
children: /* @__PURE__ */ F.jsxs(
|
|
2398
|
+
"div",
|
|
2374
2399
|
{
|
|
2375
|
-
as: "div",
|
|
2376
2400
|
className: "im-dialog relative z-20",
|
|
2377
|
-
|
|
2378
|
-
"data-inertiaui-modal-
|
|
2379
|
-
"data-inertiaui-modal-index": y,
|
|
2401
|
+
"data-inertiaui-modal-id": f,
|
|
2402
|
+
"data-inertiaui-modal-index": v,
|
|
2380
2403
|
children: [
|
|
2381
|
-
|
|
2382
|
-
|
|
2404
|
+
v === 0 ? /* @__PURE__ */ F.jsx(
|
|
2405
|
+
st,
|
|
2383
2406
|
{
|
|
2384
2407
|
enter: "transition transform ease-in-out duration-300",
|
|
2385
2408
|
enterFrom: "opacity-0",
|
|
@@ -2387,58 +2410,58 @@ const ka = ({ modalContext: e, config: t, children: n }) => /* @__PURE__ */ R.js
|
|
|
2387
2410
|
leave: "transition transform ease-in-out duration-300",
|
|
2388
2411
|
leaveFrom: "opacity-100",
|
|
2389
2412
|
leaveTo: "opacity-0",
|
|
2390
|
-
children:
|
|
2413
|
+
children: b ? /* @__PURE__ */ F.jsx(
|
|
2391
2414
|
"div",
|
|
2392
2415
|
{
|
|
2393
2416
|
className: "im-backdrop fixed inset-0 z-30 bg-black/75",
|
|
2394
2417
|
"aria-hidden": "true"
|
|
2395
2418
|
}
|
|
2396
|
-
) : /* @__PURE__ */
|
|
2419
|
+
) : /* @__PURE__ */ F.jsx("div", {})
|
|
2397
2420
|
}
|
|
2398
2421
|
) : null,
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2422
|
+
v > 0 && b ? /* @__PURE__ */ F.jsx("div", { className: "im-backdrop fixed inset-0 z-30 bg-black/75" }) : null,
|
|
2423
|
+
S.slideover ? /* @__PURE__ */ F.jsx(
|
|
2424
|
+
xa,
|
|
2402
2425
|
{
|
|
2403
|
-
modalContext:
|
|
2404
|
-
config:
|
|
2405
|
-
children:
|
|
2406
|
-
afterLeave:
|
|
2407
|
-
close:
|
|
2408
|
-
config:
|
|
2426
|
+
modalContext: O,
|
|
2427
|
+
config: S,
|
|
2428
|
+
children: g({
|
|
2429
|
+
afterLeave: w,
|
|
2430
|
+
close: P,
|
|
2431
|
+
config: S,
|
|
2409
2432
|
emit: p,
|
|
2410
|
-
getChildModal:
|
|
2411
|
-
getParentModal:
|
|
2412
|
-
id:
|
|
2413
|
-
index:
|
|
2414
|
-
isOpen:
|
|
2415
|
-
modalContext:
|
|
2416
|
-
onTopOfStack:
|
|
2417
|
-
reload:
|
|
2418
|
-
setOpen:
|
|
2419
|
-
shouldRender:
|
|
2433
|
+
getChildModal: E,
|
|
2434
|
+
getParentModal: d,
|
|
2435
|
+
id: f,
|
|
2436
|
+
index: v,
|
|
2437
|
+
isOpen: R,
|
|
2438
|
+
modalContext: O,
|
|
2439
|
+
onTopOfStack: b,
|
|
2440
|
+
reload: D,
|
|
2441
|
+
setOpen: B,
|
|
2442
|
+
shouldRender: Z
|
|
2420
2443
|
})
|
|
2421
2444
|
}
|
|
2422
|
-
) : /* @__PURE__ */
|
|
2423
|
-
|
|
2445
|
+
) : /* @__PURE__ */ F.jsx(
|
|
2446
|
+
wa,
|
|
2424
2447
|
{
|
|
2425
|
-
modalContext:
|
|
2426
|
-
config:
|
|
2427
|
-
children:
|
|
2428
|
-
afterLeave:
|
|
2429
|
-
close:
|
|
2430
|
-
config:
|
|
2448
|
+
modalContext: O,
|
|
2449
|
+
config: S,
|
|
2450
|
+
children: g({
|
|
2451
|
+
afterLeave: w,
|
|
2452
|
+
close: P,
|
|
2453
|
+
config: S,
|
|
2431
2454
|
emit: p,
|
|
2432
|
-
getChildModal:
|
|
2433
|
-
getParentModal:
|
|
2434
|
-
id:
|
|
2435
|
-
index:
|
|
2436
|
-
isOpen:
|
|
2437
|
-
modalContext:
|
|
2438
|
-
onTopOfStack:
|
|
2439
|
-
reload:
|
|
2440
|
-
setOpen:
|
|
2441
|
-
shouldRender:
|
|
2455
|
+
getChildModal: E,
|
|
2456
|
+
getParentModal: d,
|
|
2457
|
+
id: f,
|
|
2458
|
+
index: v,
|
|
2459
|
+
isOpen: R,
|
|
2460
|
+
modalContext: O,
|
|
2461
|
+
onTopOfStack: b,
|
|
2462
|
+
reload: D,
|
|
2463
|
+
setOpen: B,
|
|
2464
|
+
shouldRender: Z
|
|
2442
2465
|
})
|
|
2443
2466
|
}
|
|
2444
2467
|
)
|
|
@@ -2450,84 +2473,84 @@ const ka = ({ modalContext: e, config: t, children: n }) => /* @__PURE__ */ R.js
|
|
|
2450
2473
|
}
|
|
2451
2474
|
);
|
|
2452
2475
|
});
|
|
2453
|
-
|
|
2454
|
-
const
|
|
2455
|
-
href:
|
|
2456
|
-
method:
|
|
2457
|
-
data:
|
|
2458
|
-
as:
|
|
2459
|
-
headers:
|
|
2460
|
-
queryStringArrayFormat:
|
|
2461
|
-
onAfterLeave:
|
|
2462
|
-
onBlur:
|
|
2463
|
-
onClose:
|
|
2464
|
-
onError:
|
|
2465
|
-
onFocus:
|
|
2476
|
+
Ea.displayName = "Modal";
|
|
2477
|
+
const ja = ({
|
|
2478
|
+
href: t,
|
|
2479
|
+
method: e = "get",
|
|
2480
|
+
data: r = {},
|
|
2481
|
+
as: n = "a",
|
|
2482
|
+
headers: s = {},
|
|
2483
|
+
queryStringArrayFormat: l = "brackets",
|
|
2484
|
+
onAfterLeave: i = null,
|
|
2485
|
+
onBlur: m = null,
|
|
2486
|
+
onClose: o = null,
|
|
2487
|
+
onError: g = null,
|
|
2488
|
+
onFocus: y = null,
|
|
2466
2489
|
onStart: w = null,
|
|
2467
|
-
onSuccess:
|
|
2468
|
-
navigate:
|
|
2469
|
-
children:
|
|
2470
|
-
...
|
|
2490
|
+
onSuccess: P = null,
|
|
2491
|
+
navigate: S = null,
|
|
2492
|
+
children: p,
|
|
2493
|
+
...E
|
|
2471
2494
|
}) => {
|
|
2472
|
-
const [d,
|
|
2473
|
-
Object.keys(
|
|
2474
|
-
|
|
2495
|
+
const [d, f] = z(!1), [v, R] = z(null), { stack: O, visit: b } = et(), D = ve(() => S ?? Rt("navigate"), [S]), B = {}, Z = {};
|
|
2496
|
+
Object.keys(E).forEach((c) => {
|
|
2497
|
+
Yt.includes(c) || (c.startsWith("on") && typeof E[c] == "function" ? c.toLowerCase() in window ? B[c] = E[c] : Z[c] = E[c] : B[c] = E[c]);
|
|
2475
2498
|
});
|
|
2476
|
-
const [
|
|
2477
|
-
|
|
2478
|
-
v && (v.onTopOfStack &&
|
|
2479
|
-
}, [
|
|
2480
|
-
const
|
|
2481
|
-
|
|
2482
|
-
}, [
|
|
2483
|
-
|
|
2484
|
-
}, [
|
|
2485
|
-
(
|
|
2486
|
-
|
|
2487
|
-
e,
|
|
2499
|
+
const [ee, Y] = z(!1);
|
|
2500
|
+
X(() => {
|
|
2501
|
+
v && (v.onTopOfStack && ee ? y == null || y() : !v.onTopOfStack && !ee && (m == null || m()), Y(!v.onTopOfStack));
|
|
2502
|
+
}, [O]);
|
|
2503
|
+
const G = ue(() => {
|
|
2504
|
+
o == null || o();
|
|
2505
|
+
}, [o]), j = ue(() => {
|
|
2506
|
+
R(null), i == null || i();
|
|
2507
|
+
}, [i]), u = ue(
|
|
2508
|
+
(c) => {
|
|
2509
|
+
c == null || c.preventDefault(), !d && (t.startsWith("#") || (f(!0), w == null || w()), b(
|
|
2488
2510
|
t,
|
|
2489
|
-
|
|
2511
|
+
e,
|
|
2512
|
+
r,
|
|
2513
|
+
s,
|
|
2514
|
+
fn(tr(E, Yt)),
|
|
2515
|
+
() => G(O.length),
|
|
2516
|
+
j,
|
|
2490
2517
|
l,
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
).
|
|
2497
|
-
x(I), I.registerEventListenersFromProps(ee), b == null || b();
|
|
2498
|
-
}).catch((I) => {
|
|
2499
|
-
console.error(I), p == null || p(I);
|
|
2500
|
-
}).finally(() => m(!1)));
|
|
2518
|
+
D
|
|
2519
|
+
).then((T) => {
|
|
2520
|
+
R(T), T.registerEventListenersFromProps(Z), P == null || P();
|
|
2521
|
+
}).catch((T) => {
|
|
2522
|
+
console.error(T), g == null || g(T);
|
|
2523
|
+
}).finally(() => f(!1)));
|
|
2501
2524
|
},
|
|
2502
|
-
[e,
|
|
2525
|
+
[t, e, r, s, l, E, G, j]
|
|
2503
2526
|
);
|
|
2504
|
-
return /* @__PURE__ */
|
|
2505
|
-
|
|
2527
|
+
return /* @__PURE__ */ F.jsx(
|
|
2528
|
+
n,
|
|
2506
2529
|
{
|
|
2507
|
-
...
|
|
2508
|
-
href:
|
|
2509
|
-
onClick:
|
|
2510
|
-
children: typeof
|
|
2530
|
+
...B,
|
|
2531
|
+
href: t,
|
|
2532
|
+
onClick: u,
|
|
2533
|
+
children: typeof p == "function" ? p({ loading: d }) : p
|
|
2511
2534
|
}
|
|
2512
2535
|
);
|
|
2513
2536
|
};
|
|
2514
|
-
function
|
|
2515
|
-
return
|
|
2537
|
+
function Aa() {
|
|
2538
|
+
return et().stack[ar()] ?? null;
|
|
2516
2539
|
}
|
|
2517
|
-
const
|
|
2540
|
+
const Ia = (t) => (e) => (e.default.layout = (r) => Ve(t, {}, r), e);
|
|
2518
2541
|
export {
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2542
|
+
sr as HeadlessModal,
|
|
2543
|
+
Ea as Modal,
|
|
2544
|
+
ja as ModalLink,
|
|
2545
|
+
mn as ModalRoot,
|
|
2546
|
+
pn as ModalStackProvider,
|
|
2547
|
+
Rt as getConfig,
|
|
2548
|
+
hn as initFromPageProps,
|
|
2549
|
+
ka as putConfig,
|
|
2550
|
+
Fa as renderApp,
|
|
2551
|
+
Ca as resetConfig,
|
|
2552
|
+
Ia as setPageLayout,
|
|
2553
|
+
Aa as useModal,
|
|
2554
|
+
ar as useModalIndex,
|
|
2555
|
+
et as useModalStack
|
|
2533
2556
|
};
|