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