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