@inertiaui/modal-react 0.19.3 → 0.19.5
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 +679 -657
- package/dist/inertiaui-modal.umd.cjs +3 -3
- package/package.json +3 -3
- package/src/ModalRoot.jsx +3 -3
- package/src/helpers.js +2 -2
package/dist/inertiaui-modal.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var q = (e, t, n) =>
|
|
1
|
+
var pn = Object.defineProperty;
|
|
2
|
+
var hn = (e, t, n) => t in e ? pn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var q = (e, t, n) => hn(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as Ee from "react";
|
|
5
|
-
import E, { createContext as H,
|
|
6
|
-
import {
|
|
5
|
+
import E, { createContext as H, useContext as R, useEffect as M, useRef as O, useState as S, createElement as Re, useMemo as C, forwardRef as ct, useImperativeHandle as Ft, useLayoutEffect as vn, useCallback as Y, Fragment as G, isValidElement as gn, cloneElement as wn, useId as Pe, useSyncExternalStore as xn, useReducer as yn, createRef as bn } from "react";
|
|
6
|
+
import { jsxs as se, Fragment as dt, jsx as T } from "react/jsx-runtime";
|
|
7
7
|
import De from "axios";
|
|
8
|
-
import { router as
|
|
9
|
-
import { mergeDataIntoQueryString as
|
|
10
|
-
import { createPortal as
|
|
8
|
+
import { router as ye, usePage as En } from "@inertiajs/react";
|
|
9
|
+
import { mergeDataIntoQueryString as $n } from "@inertiajs/core";
|
|
10
|
+
import { createPortal as Tn } from "react-dom";
|
|
11
11
|
const ge = {
|
|
12
12
|
type: "modal",
|
|
13
13
|
navigate: !1,
|
|
@@ -28,7 +28,7 @@ const ge = {
|
|
|
28
28
|
position: "right"
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
class
|
|
31
|
+
class On {
|
|
32
32
|
constructor() {
|
|
33
33
|
this.config = {}, this.reset();
|
|
34
34
|
}
|
|
@@ -47,8 +47,8 @@ class $n {
|
|
|
47
47
|
}
|
|
48
48
|
const r = t.split(".");
|
|
49
49
|
let l = this.config;
|
|
50
|
-
for (let
|
|
51
|
-
l = l[r[
|
|
50
|
+
for (let o = 0; o < r.length - 1; o++)
|
|
51
|
+
l = l[r[o]] = l[r[o]] || {};
|
|
52
52
|
l[r[r.length - 1]] = n;
|
|
53
53
|
}
|
|
54
54
|
get(t) {
|
|
@@ -64,61 +64,83 @@ class $n {
|
|
|
64
64
|
return r;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
const _e = new
|
|
68
|
-
function
|
|
67
|
+
const _e = new On(), Sl = () => _e.reset(), Fl = (e, t) => _e.put(e, t), ft = (e) => _e.get(e), ce = (e, t) => _e.get(e ? `slideover.${t}` : `modal.${t}`);
|
|
68
|
+
function Pn(e, t) {
|
|
69
69
|
return e = typeof e == "string" ? new URL(e, window.location.origin) : e, t = typeof t == "string" ? new URL(t, window.location.origin) : t, `${e.origin}${e.pathname}` == `${t.origin}${t.pathname}`;
|
|
70
70
|
}
|
|
71
71
|
function et(e = "inertiaui_modal_") {
|
|
72
72
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? `${e}${crypto.randomUUID()}` : `${e}${Date.now().toString(36)}_${Math.random().toString(36).substr(2, 9)}`;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
|
|
74
|
+
function Ct(e, t, n = !1) {
|
|
75
|
+
const r = (l) => typeof l == "string" ? l.toLowerCase() : l;
|
|
76
|
+
return n && (t = t.map(r)), Array.isArray(e) ? e.filter((l) => !t.includes(n ? r(l) : l)) : Object.keys(e).reduce((l, o) => (t.includes(n ? r(o) : o) || (l[o] = e[o]), l), {});
|
|
76
77
|
}
|
|
77
|
-
function
|
|
78
|
+
function Nt(e, t) {
|
|
78
79
|
return Array.isArray(e) ? e.filter((n) => t.includes(n)) : t.reduce((n, r) => (r in e && (n[r] = e[r]), n), {});
|
|
79
80
|
}
|
|
80
|
-
function
|
|
81
|
+
function Mn(e) {
|
|
81
82
|
return Array.isArray(e) ? e.filter((t) => t !== null) : Object.keys(e).reduce((t, n) => (n in e && e[n] !== null && (t[n] = e[n]), t), {});
|
|
82
83
|
}
|
|
83
|
-
function
|
|
84
|
+
function Ln(e, t = 3, n = 10) {
|
|
84
85
|
return new Promise((r, l) => {
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
87
|
-
r(
|
|
86
|
+
const o = e();
|
|
87
|
+
if (o) {
|
|
88
|
+
r(o);
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
90
|
-
let
|
|
91
|
+
let a = t * 1e3 / n;
|
|
91
92
|
const s = setInterval(() => {
|
|
92
93
|
const i = e();
|
|
93
|
-
i && (clearInterval(s), r(i)), --
|
|
94
|
+
i && (clearInterval(s), r(i)), --a <= 0 && (clearInterval(s), l(new Error("Condition not met in time")));
|
|
94
95
|
}, n);
|
|
95
96
|
});
|
|
96
97
|
}
|
|
97
98
|
function we(e) {
|
|
98
99
|
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, n) => n.toUpperCase()), e = e.replace(/(.)(?=[A-Z])/g, "$1-"), e.toLowerCase()) : e) : "";
|
|
99
100
|
}
|
|
101
|
+
function yt(e) {
|
|
102
|
+
return Ct(
|
|
103
|
+
e || {},
|
|
104
|
+
[
|
|
105
|
+
"name",
|
|
106
|
+
"slideover",
|
|
107
|
+
"closeButton",
|
|
108
|
+
"close-button",
|
|
109
|
+
"closeExplicitly",
|
|
110
|
+
"close-explicitly",
|
|
111
|
+
"maxWidth",
|
|
112
|
+
"max-width",
|
|
113
|
+
"paddingClasses",
|
|
114
|
+
"padding-classes",
|
|
115
|
+
"panelClasses",
|
|
116
|
+
"panel-classes",
|
|
117
|
+
"position"
|
|
118
|
+
],
|
|
119
|
+
!0
|
|
120
|
+
);
|
|
121
|
+
}
|
|
100
122
|
const Be = H(null);
|
|
101
123
|
Be.displayName = "ModalStackContext";
|
|
102
|
-
let
|
|
103
|
-
const
|
|
104
|
-
const [t, n] = S([]), [r, l] = S({}),
|
|
124
|
+
let At = null, kt = null, $e = null, rt = null, Ie = [], de = {};
|
|
125
|
+
const Sn = ({ children: e }) => {
|
|
126
|
+
const [t, n] = S([]), [r, l] = S({}), o = (v) => {
|
|
105
127
|
n((u) => {
|
|
106
128
|
const m = v([...u]), p = (g) => {
|
|
107
|
-
var
|
|
108
|
-
return m.length < 2 ? !0 : ((
|
|
129
|
+
var y;
|
|
130
|
+
return m.length < 2 ? !0 : ((y = m.map((h) => ({ id: h.id, shouldRender: h.shouldRender })).reverse().find((h) => h.shouldRender)) == null ? void 0 : y.id) === g;
|
|
109
131
|
};
|
|
110
|
-
return m.forEach((g,
|
|
111
|
-
m[
|
|
132
|
+
return m.forEach((g, y) => {
|
|
133
|
+
m[y].onTopOfStack = p(g.id), m[y].getParentModal = () => y < 1 ? null : m.slice(0, y).reverse().find((h) => h.isOpen), m[y].getChildModal = () => y === m.length - 1 ? null : m.slice(y + 1).find((h) => h.isOpen);
|
|
112
134
|
}), m;
|
|
113
135
|
});
|
|
114
136
|
};
|
|
115
137
|
M(() => {
|
|
116
138
|
Ie = t;
|
|
117
139
|
}, [t]);
|
|
118
|
-
class
|
|
119
|
-
constructor(u, m, p, g,
|
|
140
|
+
class a {
|
|
141
|
+
constructor(u, m, p, g, y) {
|
|
120
142
|
q(this, "show", () => {
|
|
121
|
-
|
|
143
|
+
o(
|
|
122
144
|
(u) => u.map((m) => (m.id === this.id && !m.isOpen && (m.isOpen = !0, m.shouldRender = !0), m))
|
|
123
145
|
);
|
|
124
146
|
});
|
|
@@ -126,7 +148,7 @@ const Ln = ({ children: e }) => {
|
|
|
126
148
|
u ? this.show() : this.close();
|
|
127
149
|
});
|
|
128
150
|
q(this, "close", () => {
|
|
129
|
-
|
|
151
|
+
o(
|
|
130
152
|
(u) => u.map((m) => {
|
|
131
153
|
var p;
|
|
132
154
|
return m.id === this.id && m.isOpen && (Object.keys(m.listeners).forEach((g) => {
|
|
@@ -136,7 +158,7 @@ const Ln = ({ children: e }) => {
|
|
|
136
158
|
);
|
|
137
159
|
});
|
|
138
160
|
q(this, "afterLeave", () => {
|
|
139
|
-
this.isOpen ||
|
|
161
|
+
this.isOpen || o((u) => {
|
|
140
162
|
const m = u.map((p) => {
|
|
141
163
|
var g;
|
|
142
164
|
return p.id === this.id && !p.isOpen && (p.shouldRender = !1, (g = p.afterLeaveCallback) == null || g.call(p), p.afterLeaveCallback = null), p;
|
|
@@ -165,7 +187,7 @@ const Ln = ({ children: e }) => {
|
|
|
165
187
|
q(this, "reload", (u = {}) => {
|
|
166
188
|
var p;
|
|
167
189
|
let m = Object.keys(this.response.props);
|
|
168
|
-
u.only && (m =
|
|
190
|
+
u.only && (m = Nt(m, u.only)), u.except && (m = Ct(m, u.except)), (p = this.response) != null && p.url && De.get(this.response.url, {
|
|
169
191
|
headers: {
|
|
170
192
|
Accept: "text/html, application/xhtml+xml",
|
|
171
193
|
"X-Inertia": !0,
|
|
@@ -181,19 +203,19 @@ const Ln = ({ children: e }) => {
|
|
|
181
203
|
});
|
|
182
204
|
});
|
|
183
205
|
q(this, "updateProps", (u) => {
|
|
184
|
-
Object.assign(this.props, u),
|
|
206
|
+
Object.assign(this.props, yt(u)), o((m) => m);
|
|
185
207
|
});
|
|
186
|
-
if (this.id = m.id ?? et(), this.isOpen = !1, this.shouldRender = !1, this.listeners = {}, this.component = u, this.props = m.props, this.response = m, this.config = p ?? {}, this.onCloseCallback = g, this.afterLeaveCallback =
|
|
208
|
+
if (this.id = m.id ?? et(), this.isOpen = !1, this.shouldRender = !1, this.listeners = {}, this.component = u, this.props = yt(m.props), this.response = m, this.config = p ?? {}, this.onCloseCallback = g, this.afterLeaveCallback = y, de[this.id]) {
|
|
187
209
|
this.config = {
|
|
188
210
|
...this.config,
|
|
189
|
-
...
|
|
211
|
+
...de[this.id].config ?? {}
|
|
190
212
|
};
|
|
191
|
-
const h =
|
|
213
|
+
const h = de[this.id].onClose, $ = de[this.id].onAfterLeave;
|
|
192
214
|
h && (this.onCloseCallback = g ? () => {
|
|
193
215
|
g(), h();
|
|
194
|
-
} : h), $ && (this.afterLeaveCallback =
|
|
195
|
-
|
|
196
|
-
} : $), delete
|
|
216
|
+
} : h), $ && (this.afterLeaveCallback = y ? () => {
|
|
217
|
+
y(), $();
|
|
218
|
+
} : $), delete de[this.id];
|
|
197
219
|
}
|
|
198
220
|
this.index = -1, this.getParentModal = () => null, this.getChildModal = () => null, this.onTopOfStack = !0;
|
|
199
221
|
}
|
|
@@ -202,16 +224,16 @@ const Ln = ({ children: e }) => {
|
|
|
202
224
|
}
|
|
203
225
|
}
|
|
204
226
|
const s = (v, u = {}, m = null, p = null) => kt(v.component).then((g) => i(g, v, u, m, p)), i = (v, u, m, p, g) => {
|
|
205
|
-
const
|
|
206
|
-
return
|
|
227
|
+
const y = new a(v, u, m, p, g);
|
|
228
|
+
return y.index = t.length, o((h) => [...h, y]), y.show(), y;
|
|
207
229
|
};
|
|
208
|
-
function
|
|
230
|
+
function c(v, u, m, p) {
|
|
209
231
|
if (!r[v])
|
|
210
232
|
throw new Error(`The local modal "${v}" has not been registered.`);
|
|
211
233
|
const g = i(null, {}, u, m, p);
|
|
212
234
|
return g.name = v, r[v].callback(g), g;
|
|
213
235
|
}
|
|
214
|
-
const f = (v, u = {}) =>
|
|
236
|
+
const f = (v, u = {}) => x(
|
|
215
237
|
v,
|
|
216
238
|
u.method ?? "get",
|
|
217
239
|
u.data ?? {},
|
|
@@ -224,41 +246,41 @@ const Ln = ({ children: e }) => {
|
|
|
224
246
|
).then((m) => {
|
|
225
247
|
const p = u.listeners ?? {};
|
|
226
248
|
return Object.keys(p).forEach((g) => {
|
|
227
|
-
const
|
|
228
|
-
m.on(
|
|
249
|
+
const y = we(g);
|
|
250
|
+
m.on(y, p[g]);
|
|
229
251
|
}), m;
|
|
230
|
-
}),
|
|
252
|
+
}), x = (v, u, m = {}, p = {}, g = {}, y = null, h = null, $ = "brackets", F = !1) => {
|
|
231
253
|
const j = et();
|
|
232
|
-
return new Promise((_,
|
|
254
|
+
return new Promise((_, A) => {
|
|
233
255
|
if (v.startsWith("#")) {
|
|
234
|
-
_(
|
|
256
|
+
_(c(v.substring(1), g, y, h));
|
|
235
257
|
return;
|
|
236
258
|
}
|
|
237
|
-
const [U, B] =
|
|
259
|
+
const [U, B] = $n(u, v || "", m, $);
|
|
238
260
|
let X = F && t.length === 0;
|
|
239
261
|
if (t.length === 0 && ($e = typeof window < "u" ? window.location.href : ""), p = {
|
|
240
262
|
...p,
|
|
241
263
|
Accept: "text/html, application/xhtml+xml",
|
|
242
264
|
"X-Requested-With": "XMLHttpRequest",
|
|
243
265
|
"X-Inertia": !0,
|
|
244
|
-
"X-Inertia-Version":
|
|
266
|
+
"X-Inertia-Version": At,
|
|
245
267
|
"X-InertiaUI-Modal": j,
|
|
246
268
|
"X-InertiaUI-Modal-Use-Router": X ? 1 : 0,
|
|
247
269
|
"X-InertiaUI-Modal-Base-Url": $e
|
|
248
270
|
}, X)
|
|
249
|
-
return rt = null,
|
|
271
|
+
return rt = null, de[j] = {
|
|
250
272
|
config: g,
|
|
251
|
-
onClose:
|
|
273
|
+
onClose: y,
|
|
252
274
|
onAfterLeave: h
|
|
253
|
-
},
|
|
275
|
+
}, ye.visit(U, {
|
|
254
276
|
method: u,
|
|
255
277
|
data: B,
|
|
256
278
|
headers: p,
|
|
257
279
|
preserveScroll: !0,
|
|
258
280
|
preserveState: !0,
|
|
259
|
-
onError:
|
|
281
|
+
onError: A,
|
|
260
282
|
onFinish: () => {
|
|
261
|
-
|
|
283
|
+
Ln(() => rt).then(_);
|
|
262
284
|
}
|
|
263
285
|
});
|
|
264
286
|
De({
|
|
@@ -266,11 +288,11 @@ const Ln = ({ children: e }) => {
|
|
|
266
288
|
method: u,
|
|
267
289
|
data: B,
|
|
268
290
|
headers: p
|
|
269
|
-
}).then((P) => _(s(P.data, g,
|
|
270
|
-
|
|
291
|
+
}).then((P) => _(s(P.data, g, y, h))).catch((P) => {
|
|
292
|
+
A(P);
|
|
271
293
|
});
|
|
272
294
|
});
|
|
273
|
-
},
|
|
295
|
+
}, d = {
|
|
274
296
|
stack: t,
|
|
275
297
|
localModals: r,
|
|
276
298
|
push: i,
|
|
@@ -279,8 +301,8 @@ const Ln = ({ children: e }) => {
|
|
|
279
301
|
closeAll: () => {
|
|
280
302
|
Ie.reverse().forEach((v) => v.close());
|
|
281
303
|
},
|
|
282
|
-
reset: () =>
|
|
283
|
-
visit:
|
|
304
|
+
reset: () => o(() => []),
|
|
305
|
+
visit: x,
|
|
284
306
|
visitModal: f,
|
|
285
307
|
registerLocalModal: (v, u) => {
|
|
286
308
|
l((m) => ({
|
|
@@ -295,37 +317,37 @@ const Ln = ({ children: e }) => {
|
|
|
295
317
|
});
|
|
296
318
|
}
|
|
297
319
|
};
|
|
298
|
-
return /* @__PURE__ */ T(Be.Provider, { value:
|
|
320
|
+
return /* @__PURE__ */ T(Be.Provider, { value: d, children: e });
|
|
299
321
|
}, Xe = () => {
|
|
300
322
|
const e = R(Be);
|
|
301
323
|
if (e === null)
|
|
302
324
|
throw new Error("useModalStack must be used within a ModalStackProvider");
|
|
303
325
|
return e;
|
|
304
|
-
},
|
|
305
|
-
e.initialPage && (
|
|
306
|
-
},
|
|
326
|
+
}, bt = ["closeButton", "closeExplicitly", "maxWidth", "paddingClasses", "panelClasses", "position", "slideover"], Fn = (e) => {
|
|
327
|
+
e.initialPage && (At = e.initialPage.version), e.resolveComponent && (kt = e.resolveComponent);
|
|
328
|
+
}, Cl = (e, t) => (Fn(t), /* @__PURE__ */ T(Sn, { children: /* @__PURE__ */ T(e, { ...t, children: ({ Component: r, props: l, key: o }) => /* @__PURE__ */ se(dt, { children: [
|
|
307
329
|
(() => {
|
|
308
|
-
const s = Re(r, { key:
|
|
309
|
-
return typeof r.layout == "function" ? r.layout(s) : Array.isArray(r.layout) ? r.layout.concat(s).reverse().reduce((
|
|
330
|
+
const s = Re(r, { key: o, ...l });
|
|
331
|
+
return typeof r.layout == "function" ? r.layout(s) : Array.isArray(r.layout) ? r.layout.concat(s).reverse().reduce((c, f) => Re(f, l, c)) : s;
|
|
310
332
|
})(),
|
|
311
|
-
/* @__PURE__ */ T(
|
|
312
|
-
] }) }) })),
|
|
333
|
+
/* @__PURE__ */ T(Cn, {})
|
|
334
|
+
] }) }) })), Cn = ({ children: e }) => {
|
|
313
335
|
var s;
|
|
314
336
|
const t = R(Be);
|
|
315
337
|
let n = !1, r = !1;
|
|
316
|
-
M(() =>
|
|
317
|
-
() =>
|
|
318
|
-
const
|
|
319
|
-
if (!
|
|
338
|
+
M(() => ye.on("start", () => n = !0), []), M(() => ye.on("finish", () => n = !1), []), M(
|
|
339
|
+
() => ye.on("navigate", function(i) {
|
|
340
|
+
const c = i.detail.page.props._inertiaui_modal;
|
|
341
|
+
if (!c) {
|
|
320
342
|
r && t.closeAll();
|
|
321
343
|
return;
|
|
322
344
|
}
|
|
323
|
-
r =
|
|
324
|
-
if (!
|
|
345
|
+
r = c, $e = c.baseUrl, t.pushFromResponseData(c, {}, () => {
|
|
346
|
+
if (!c.baseUrl) {
|
|
325
347
|
console.error("No base url in modal response data so cannot navigate back");
|
|
326
348
|
return;
|
|
327
349
|
}
|
|
328
|
-
!n && window.location.href !==
|
|
350
|
+
!n && window.location.href !== c.baseUrl && ye.visit(c.baseUrl, {
|
|
329
351
|
preserveScroll: !0,
|
|
330
352
|
preserveState: !0
|
|
331
353
|
});
|
|
@@ -337,23 +359,23 @@ const Ln = ({ children: e }) => {
|
|
|
337
359
|
);
|
|
338
360
|
const l = (i) => (Ie.length && (i.headers["X-InertiaUI-Modal-Base-Url"] = $e), i);
|
|
339
361
|
M(() => (De.interceptors.request.use(l), () => De.interceptors.request.eject(l)), []);
|
|
340
|
-
const
|
|
362
|
+
const o = En(), a = O();
|
|
341
363
|
return M(() => {
|
|
342
|
-
var f,
|
|
343
|
-
const i = (f =
|
|
344
|
-
|
|
345
|
-
}, [(s =
|
|
364
|
+
var f, x;
|
|
365
|
+
const i = (f = o.props) == null ? void 0 : f._inertiaui_modal, c = a.current;
|
|
366
|
+
a.current = i, i && c && i.component === c.component && Pn(i.url, c.url) && ((x = t.stack[0]) == null || x.updateProps(i.props ?? {}));
|
|
367
|
+
}, [(s = o.props) == null ? void 0 : s._inertiaui_modal]), /* @__PURE__ */ se(dt, { children: [
|
|
346
368
|
e,
|
|
347
|
-
t.stack.length > 0 && /* @__PURE__ */ T(
|
|
369
|
+
t.stack.length > 0 && /* @__PURE__ */ T(Rt, { index: 0 })
|
|
348
370
|
] });
|
|
349
371
|
}, mt = E.createContext(null);
|
|
350
372
|
mt.displayName = "ModalIndexContext";
|
|
351
|
-
const
|
|
373
|
+
const It = () => {
|
|
352
374
|
const e = E.useContext(mt);
|
|
353
375
|
if (e === void 0)
|
|
354
376
|
throw new Error("useModalIndex must be used within a ModalIndexProvider");
|
|
355
377
|
return e;
|
|
356
|
-
},
|
|
378
|
+
}, Rt = ({ index: e }) => {
|
|
357
379
|
const { stack: t } = Xe(), n = C(() => t[e], [t, e]);
|
|
358
380
|
return (n == null ? void 0 : n.component) && /* @__PURE__ */ T(mt.Provider, { value: e, children: /* @__PURE__ */ T(
|
|
359
381
|
n.component,
|
|
@@ -362,44 +384,44 @@ const Nt = () => {
|
|
|
362
384
|
onModalEvent: (...r) => n.emit(...r)
|
|
363
385
|
}
|
|
364
386
|
) });
|
|
365
|
-
},
|
|
366
|
-
const i =
|
|
387
|
+
}, Dt = ct(({ name: e, children: t, onFocus: n = null, onBlur: r = null, onClose: l = null, onSuccess: o = null, ...a }, s) => {
|
|
388
|
+
const i = It(), { stack: c, registerLocalModal: f, removeLocalModal: x } = Xe(), [b, w] = S(null), d = C(() => e ? b : c[i], [e, b, i, c]), v = C(() => {
|
|
367
389
|
var h;
|
|
368
|
-
return (h =
|
|
369
|
-
}, [i,
|
|
390
|
+
return (h = c.find(($) => $.shouldRender && $.index > (d == null ? void 0 : d.index))) == null ? void 0 : h.index;
|
|
391
|
+
}, [i, c]), u = C(() => (d == null ? void 0 : d.config.slideover) ?? a.slideover ?? ft("type") === "slideover", [a.slideover]), m = C(
|
|
370
392
|
() => ({
|
|
371
393
|
slideover: u,
|
|
372
|
-
closeButton:
|
|
373
|
-
closeExplicitly:
|
|
374
|
-
maxWidth:
|
|
375
|
-
paddingClasses:
|
|
376
|
-
panelClasses:
|
|
377
|
-
position:
|
|
378
|
-
...
|
|
394
|
+
closeButton: a.closeButton ?? ce(u, "closeButton"),
|
|
395
|
+
closeExplicitly: a.closeExplicitly ?? ce(u, "closeExplicitly"),
|
|
396
|
+
maxWidth: a.maxWidth ?? ce(u, "maxWidth"),
|
|
397
|
+
paddingClasses: a.paddingClasses ?? ce(u, "paddingClasses"),
|
|
398
|
+
panelClasses: a.panelClasses ?? ce(u, "panelClasses"),
|
|
399
|
+
position: a.position ?? ce(u, "position"),
|
|
400
|
+
...d == null ? void 0 : d.config
|
|
379
401
|
}),
|
|
380
|
-
[
|
|
402
|
+
[a, d == null ? void 0 : d.config]
|
|
381
403
|
);
|
|
382
404
|
M(() => {
|
|
383
405
|
if (e) {
|
|
384
406
|
let h = null;
|
|
385
407
|
return f(e, ($) => {
|
|
386
|
-
h = $.registerEventListenersFromProps(
|
|
408
|
+
h = $.registerEventListenersFromProps(a), w($);
|
|
387
409
|
}), () => {
|
|
388
|
-
h == null || h(), h = null,
|
|
410
|
+
h == null || h(), h = null, x(e);
|
|
389
411
|
};
|
|
390
412
|
}
|
|
391
|
-
return
|
|
413
|
+
return d.registerEventListenersFromProps(a);
|
|
392
414
|
}, [e]);
|
|
393
|
-
const p = O(
|
|
415
|
+
const p = O(d);
|
|
394
416
|
M(() => {
|
|
395
|
-
p.current =
|
|
396
|
-
}, [
|
|
397
|
-
|
|
398
|
-
}, [
|
|
399
|
-
const [g,
|
|
417
|
+
p.current = d;
|
|
418
|
+
}, [d]), M(() => {
|
|
419
|
+
d !== null && (d.isOpen ? o == null || o() : l == null || l());
|
|
420
|
+
}, [d == null ? void 0 : d.isOpen]);
|
|
421
|
+
const [g, y] = S(!1);
|
|
400
422
|
return M(() => {
|
|
401
|
-
g &&
|
|
402
|
-
}, [
|
|
423
|
+
g && d !== null && d.isOpen && (d.onTopOfStack ? n == null || n() : r == null || r()), y(!0);
|
|
424
|
+
}, [d == null ? void 0 : d.onTopOfStack]), Ft(
|
|
403
425
|
s,
|
|
404
426
|
() => ({
|
|
405
427
|
afterLeave: () => {
|
|
@@ -458,43 +480,43 @@ const Nt = () => {
|
|
|
458
480
|
return (h = p.current) == null ? void 0 : h.shouldRender;
|
|
459
481
|
}
|
|
460
482
|
}),
|
|
461
|
-
[
|
|
462
|
-
), (
|
|
483
|
+
[d]
|
|
484
|
+
), (d == null ? void 0 : d.shouldRender) && /* @__PURE__ */ se(dt, { children: [
|
|
463
485
|
typeof t == "function" ? t({
|
|
464
|
-
afterLeave:
|
|
465
|
-
close:
|
|
486
|
+
afterLeave: d.afterLeave,
|
|
487
|
+
close: d.close,
|
|
466
488
|
config: m,
|
|
467
|
-
emit:
|
|
468
|
-
getChildModal:
|
|
469
|
-
getParentModal:
|
|
470
|
-
id:
|
|
471
|
-
index:
|
|
472
|
-
isOpen:
|
|
473
|
-
modalContext:
|
|
474
|
-
onTopOfStack:
|
|
475
|
-
reload:
|
|
476
|
-
setOpen:
|
|
477
|
-
shouldRender:
|
|
489
|
+
emit: d.emit,
|
|
490
|
+
getChildModal: d.getChildModal,
|
|
491
|
+
getParentModal: d.getParentModal,
|
|
492
|
+
id: d.id,
|
|
493
|
+
index: d.index,
|
|
494
|
+
isOpen: d.isOpen,
|
|
495
|
+
modalContext: d,
|
|
496
|
+
onTopOfStack: d.onTopOfStack,
|
|
497
|
+
reload: d.reload,
|
|
498
|
+
setOpen: d.setOpen,
|
|
499
|
+
shouldRender: d.shouldRender
|
|
478
500
|
}) : t,
|
|
479
|
-
v && /* @__PURE__ */ T(
|
|
501
|
+
v && /* @__PURE__ */ T(Rt, { index: v })
|
|
480
502
|
] });
|
|
481
503
|
});
|
|
482
|
-
|
|
483
|
-
function
|
|
504
|
+
Dt.displayName = "HeadlessModal";
|
|
505
|
+
function jt(e) {
|
|
484
506
|
var t, n, r = "";
|
|
485
507
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
486
508
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
487
509
|
var l = e.length;
|
|
488
|
-
for (t = 0; t < l; t++) e[t] && (n =
|
|
510
|
+
for (t = 0; t < l; t++) e[t] && (n = jt(e[t])) && (r && (r += " "), r += n);
|
|
489
511
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
490
512
|
return r;
|
|
491
513
|
}
|
|
492
514
|
function je() {
|
|
493
|
-
for (var e, t, n = 0, r = "", l = arguments.length; n < l; n++) (e = arguments[n]) && (t =
|
|
515
|
+
for (var e, t, n = 0, r = "", l = arguments.length; n < l; n++) (e = arguments[n]) && (t = jt(e)) && (r && (r += " "), r += t);
|
|
494
516
|
return r;
|
|
495
517
|
}
|
|
496
|
-
var
|
|
497
|
-
let
|
|
518
|
+
var Nn = Object.defineProperty, An = (e, t, n) => t in e ? Nn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, tt = (e, t, n) => (An(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
519
|
+
let kn = class {
|
|
498
520
|
constructor() {
|
|
499
521
|
tt(this, "current", this.detect()), tt(this, "handoffState", "pending"), tt(this, "currentId", 0);
|
|
500
522
|
}
|
|
@@ -522,9 +544,9 @@ let Nn = class {
|
|
|
522
544
|
get isHandoffComplete() {
|
|
523
545
|
return this.handoffState === "complete";
|
|
524
546
|
}
|
|
525
|
-
},
|
|
547
|
+
}, ae = new kn();
|
|
526
548
|
function Ve(e) {
|
|
527
|
-
return
|
|
549
|
+
return ae.isServer ? null : e instanceof Node ? e.ownerDocument : e != null && e.hasOwnProperty("current") && e.current instanceof Node ? e.current.ownerDocument : document;
|
|
528
550
|
}
|
|
529
551
|
function qe(e) {
|
|
530
552
|
typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
|
|
@@ -532,8 +554,8 @@ function qe(e) {
|
|
|
532
554
|
}));
|
|
533
555
|
}
|
|
534
556
|
function re() {
|
|
535
|
-
let e = [], t = { addEventListener(n, r, l,
|
|
536
|
-
return n.addEventListener(r, l,
|
|
557
|
+
let e = [], t = { addEventListener(n, r, l, o) {
|
|
558
|
+
return n.addEventListener(r, l, o), t.add(() => n.removeEventListener(r, l, o));
|
|
537
559
|
}, requestAnimationFrame(...n) {
|
|
538
560
|
let r = requestAnimationFrame(...n);
|
|
539
561
|
return t.add(() => cancelAnimationFrame(r));
|
|
@@ -550,9 +572,9 @@ function re() {
|
|
|
550
572
|
r.current = !1;
|
|
551
573
|
});
|
|
552
574
|
}, style(n, r, l) {
|
|
553
|
-
let
|
|
575
|
+
let o = n.style.getPropertyValue(r);
|
|
554
576
|
return Object.assign(n.style, { [r]: l }), this.add(() => {
|
|
555
|
-
Object.assign(n.style, { [r]:
|
|
577
|
+
Object.assign(n.style, { [r]: o });
|
|
556
578
|
});
|
|
557
579
|
}, group(n) {
|
|
558
580
|
let r = re();
|
|
@@ -571,21 +593,21 @@ function pt() {
|
|
|
571
593
|
let [e] = S(re);
|
|
572
594
|
return M(() => () => e.dispose(), [e]), e;
|
|
573
595
|
}
|
|
574
|
-
let
|
|
575
|
-
|
|
596
|
+
let k = (e, t) => {
|
|
597
|
+
ae.isServer ? M(e, t) : vn(e, t);
|
|
576
598
|
};
|
|
577
599
|
function ue(e) {
|
|
578
600
|
let t = O(e);
|
|
579
|
-
return
|
|
601
|
+
return k(() => {
|
|
580
602
|
t.current = e;
|
|
581
603
|
}, [e]), t;
|
|
582
604
|
}
|
|
583
605
|
let L = function(e) {
|
|
584
606
|
let t = ue(e);
|
|
585
607
|
return E.useCallback((...n) => t.current(...n), [t]);
|
|
586
|
-
},
|
|
587
|
-
function
|
|
588
|
-
return R(
|
|
608
|
+
}, In = H(void 0);
|
|
609
|
+
function Rn() {
|
|
610
|
+
return R(In);
|
|
589
611
|
}
|
|
590
612
|
function lt(...e) {
|
|
591
613
|
return Array.from(new Set(e.flatMap((t) => typeof t == "string" ? t.split(" ") : []))).filter(Boolean).join(" ");
|
|
@@ -600,53 +622,53 @@ function ne(e, t, ...n) {
|
|
|
600
622
|
}
|
|
601
623
|
var Ue = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Ue || {}), te = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(te || {});
|
|
602
624
|
function W() {
|
|
603
|
-
let e =
|
|
604
|
-
return Y((t) =>
|
|
605
|
-
}
|
|
606
|
-
function
|
|
607
|
-
s = s ??
|
|
608
|
-
let i =
|
|
609
|
-
if (
|
|
610
|
-
let
|
|
611
|
-
if (
|
|
612
|
-
let { static: f = !1, ...
|
|
613
|
-
if (f) return
|
|
625
|
+
let e = jn();
|
|
626
|
+
return Y((t) => Dn({ mergeRefs: e, ...t }), [e]);
|
|
627
|
+
}
|
|
628
|
+
function Dn({ ourProps: e, theirProps: t, slot: n, defaultTag: r, features: l, visible: o = !0, name: a, mergeRefs: s }) {
|
|
629
|
+
s = s ?? Un;
|
|
630
|
+
let i = Ut(t, e);
|
|
631
|
+
if (o) return ke(i, n, r, a, s);
|
|
632
|
+
let c = l ?? 0;
|
|
633
|
+
if (c & 2) {
|
|
634
|
+
let { static: f = !1, ...x } = i;
|
|
635
|
+
if (f) return ke(x, n, r, a, s);
|
|
614
636
|
}
|
|
615
|
-
if (
|
|
616
|
-
let { unmount: f = !0, ...
|
|
637
|
+
if (c & 1) {
|
|
638
|
+
let { unmount: f = !0, ...x } = i;
|
|
617
639
|
return ne(f ? 0 : 1, { 0() {
|
|
618
640
|
return null;
|
|
619
641
|
}, 1() {
|
|
620
|
-
return
|
|
642
|
+
return ke({ ...x, hidden: !0, style: { display: "none" } }, n, r, a, s);
|
|
621
643
|
} });
|
|
622
644
|
}
|
|
623
|
-
return
|
|
645
|
+
return ke(i, n, r, a, s);
|
|
624
646
|
}
|
|
625
|
-
function
|
|
626
|
-
let { as:
|
|
647
|
+
function ke(e, t = {}, n, r, l) {
|
|
648
|
+
let { as: o = n, children: a, refName: s = "ref", ...i } = nt(e, ["unmount", "static"]), c = e.ref !== void 0 ? { [s]: e.ref } : {}, f = typeof a == "function" ? a(t) : a;
|
|
627
649
|
"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);
|
|
628
|
-
let
|
|
650
|
+
let x = {};
|
|
629
651
|
if (t) {
|
|
630
652
|
let b = !1, w = [];
|
|
631
|
-
for (let [
|
|
653
|
+
for (let [d, v] of Object.entries(t)) typeof v == "boolean" && (b = !0), v === !0 && w.push(d.replace(/([A-Z])/g, (u) => `-${u.toLowerCase()}`));
|
|
632
654
|
if (b) {
|
|
633
|
-
|
|
634
|
-
for (let
|
|
655
|
+
x["data-headlessui-state"] = w.join(" ");
|
|
656
|
+
for (let d of w) x[`data-${d}`] = "";
|
|
635
657
|
}
|
|
636
658
|
}
|
|
637
|
-
if (
|
|
638
|
-
if (Object.keys(le(i)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${r} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(le(i)).concat(Object.keys(le(
|
|
659
|
+
if (o === G && (Object.keys(le(i)).length > 0 || Object.keys(le(x)).length > 0)) if (!gn(f) || Array.isArray(f) && f.length > 1) {
|
|
660
|
+
if (Object.keys(le(i)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${r} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(le(i)).concat(Object.keys(le(x))).map((b) => ` - ${b}`).join(`
|
|
639
661
|
`), "", "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((b) => ` - ${b}`).join(`
|
|
640
662
|
`)].join(`
|
|
641
663
|
`));
|
|
642
664
|
} else {
|
|
643
|
-
let b = f.props, w = b == null ? void 0 : b.className,
|
|
644
|
-
for (let m in
|
|
645
|
-
return
|
|
665
|
+
let b = f.props, w = b == null ? void 0 : b.className, d = typeof w == "function" ? (...m) => lt(w(...m), i.className) : lt(w, i.className), v = d ? { className: d } : {}, u = Ut(f.props, le(nt(i, ["ref"])));
|
|
666
|
+
for (let m in x) m in u && delete x[m];
|
|
667
|
+
return wn(f, Object.assign({}, u, x, c, { ref: l(Hn(f), c.ref) }, v));
|
|
646
668
|
}
|
|
647
|
-
return Re(
|
|
669
|
+
return Re(o, Object.assign({}, nt(i, ["ref"]), o !== G && c, o !== G && x), f);
|
|
648
670
|
}
|
|
649
|
-
function
|
|
671
|
+
function jn() {
|
|
650
672
|
let e = O([]), t = Y((n) => {
|
|
651
673
|
for (let r of e.current) r != null && (typeof r == "function" ? r(n) : r.current = n);
|
|
652
674
|
}, []);
|
|
@@ -654,32 +676,32 @@ function Dn() {
|
|
|
654
676
|
if (!n.every((r) => r == null)) return e.current = n, t;
|
|
655
677
|
};
|
|
656
678
|
}
|
|
657
|
-
function
|
|
679
|
+
function Un(...e) {
|
|
658
680
|
return e.every((t) => t == null) ? void 0 : (t) => {
|
|
659
681
|
for (let n of e) n != null && (typeof n == "function" ? n(t) : n.current = t);
|
|
660
682
|
};
|
|
661
683
|
}
|
|
662
|
-
function
|
|
684
|
+
function Ut(...e) {
|
|
663
685
|
if (e.length === 0) return {};
|
|
664
686
|
if (e.length === 1) return e[0];
|
|
665
687
|
let t = {}, n = {};
|
|
666
688
|
for (let r of e) for (let l in r) l.startsWith("on") && typeof r[l] == "function" ? (n[l] != null || (n[l] = []), n[l].push(r[l])) : t[l] = r[l];
|
|
667
689
|
if (t.disabled || t["aria-disabled"]) for (let r in n) /^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r) && (n[r] = [(l) => {
|
|
668
|
-
var
|
|
669
|
-
return (
|
|
690
|
+
var o;
|
|
691
|
+
return (o = l == null ? void 0 : l.preventDefault) == null ? void 0 : o.call(l);
|
|
670
692
|
}]);
|
|
671
|
-
for (let r in n) Object.assign(t, { [r](l, ...
|
|
672
|
-
let
|
|
673
|
-
for (let s of
|
|
693
|
+
for (let r in n) Object.assign(t, { [r](l, ...o) {
|
|
694
|
+
let a = n[r];
|
|
695
|
+
for (let s of a) {
|
|
674
696
|
if ((l instanceof Event || (l == null ? void 0 : l.nativeEvent) instanceof Event) && l.defaultPrevented) return;
|
|
675
|
-
s(l, ...
|
|
697
|
+
s(l, ...o);
|
|
676
698
|
}
|
|
677
699
|
} });
|
|
678
700
|
return t;
|
|
679
701
|
}
|
|
680
702
|
function D(e) {
|
|
681
703
|
var t;
|
|
682
|
-
return Object.assign(
|
|
704
|
+
return Object.assign(ct(e), { displayName: (t = e.displayName) != null ? t : e.name });
|
|
683
705
|
}
|
|
684
706
|
function le(e) {
|
|
685
707
|
let t = Object.assign({}, e);
|
|
@@ -691,19 +713,19 @@ function nt(e, t = []) {
|
|
|
691
713
|
for (let r of t) r in n && delete n[r];
|
|
692
714
|
return n;
|
|
693
715
|
}
|
|
694
|
-
function
|
|
716
|
+
function Hn(e) {
|
|
695
717
|
return E.version.split(".")[0] >= "19" ? e.props.ref : e.ref;
|
|
696
718
|
}
|
|
697
|
-
let
|
|
719
|
+
let Wn = "span";
|
|
698
720
|
var He = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(He || {});
|
|
699
|
-
function
|
|
721
|
+
function _n(e, t) {
|
|
700
722
|
var n;
|
|
701
|
-
let { features: r = 1, ...l } = e,
|
|
702
|
-
return W()({ ourProps:
|
|
723
|
+
let { features: r = 1, ...l } = e, o = { ref: t, "aria-hidden": (r & 2) === 2 ? !0 : (n = l["aria-hidden"]) != null ? n : void 0, hidden: (r & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(r & 4) === 4 && (r & 2) !== 2 && { display: "none" } } };
|
|
724
|
+
return W()({ ourProps: o, theirProps: l, slot: {}, defaultTag: Wn, name: "Hidden" });
|
|
703
725
|
}
|
|
704
|
-
let it = D(
|
|
705
|
-
function
|
|
706
|
-
return Object.assign(e, { [
|
|
726
|
+
let it = D(_n), Ht = Symbol();
|
|
727
|
+
function Bn(e, t = !0) {
|
|
728
|
+
return Object.assign(e, { [Ht]: t });
|
|
707
729
|
}
|
|
708
730
|
function Z(...e) {
|
|
709
731
|
let t = O(e);
|
|
@@ -713,43 +735,43 @@ function Z(...e) {
|
|
|
713
735
|
let n = L((r) => {
|
|
714
736
|
for (let l of t.current) l != null && (typeof l == "function" ? l(r) : l.current = r);
|
|
715
737
|
});
|
|
716
|
-
return e.every((r) => r == null || (r == null ? void 0 : r[
|
|
738
|
+
return e.every((r) => r == null || (r == null ? void 0 : r[Ht])) ? void 0 : n;
|
|
717
739
|
}
|
|
718
740
|
let ht = H(null);
|
|
719
741
|
ht.displayName = "DescriptionContext";
|
|
720
|
-
function
|
|
742
|
+
function Wt() {
|
|
721
743
|
let e = R(ht);
|
|
722
744
|
if (e === null) {
|
|
723
745
|
let t = new Error("You used a <Description /> component, but it is not inside a relevant parent.");
|
|
724
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t,
|
|
746
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t, Wt), t;
|
|
725
747
|
}
|
|
726
748
|
return e;
|
|
727
749
|
}
|
|
728
|
-
function
|
|
750
|
+
function Xn() {
|
|
729
751
|
let [e, t] = S([]);
|
|
730
752
|
return [e.length > 0 ? e.join(" ") : void 0, C(() => function(n) {
|
|
731
|
-
let r = L((
|
|
732
|
-
let s =
|
|
753
|
+
let r = L((o) => (t((a) => [...a, o]), () => t((a) => {
|
|
754
|
+
let s = a.slice(), i = s.indexOf(o);
|
|
733
755
|
return i !== -1 && s.splice(i, 1), s;
|
|
734
756
|
}))), l = C(() => ({ register: r, slot: n.slot, name: n.name, props: n.props, value: n.value }), [r, n.slot, n.name, n.props, n.value]);
|
|
735
757
|
return E.createElement(ht.Provider, { value: l }, n.children);
|
|
736
758
|
}, [t])];
|
|
737
759
|
}
|
|
738
|
-
let
|
|
739
|
-
function
|
|
740
|
-
let n = Pe(), r =
|
|
741
|
-
|
|
742
|
-
let i = r || !1,
|
|
743
|
-
return W()({ ourProps: f, theirProps:
|
|
760
|
+
let Vn = "p";
|
|
761
|
+
function qn(e, t) {
|
|
762
|
+
let n = Pe(), r = Rn(), { id: l = `headlessui-description-${n}`, ...o } = e, a = Wt(), s = Z(t);
|
|
763
|
+
k(() => a.register(l), [l, a.register]);
|
|
764
|
+
let i = r || !1, c = C(() => ({ ...a.slot, disabled: i }), [a.slot, i]), f = { ref: s, ...a.props, id: l };
|
|
765
|
+
return W()({ ourProps: f, theirProps: o, slot: c, defaultTag: Vn, name: a.name || "Description" });
|
|
744
766
|
}
|
|
745
|
-
let
|
|
746
|
-
var
|
|
747
|
-
let
|
|
767
|
+
let Yn = D(qn), zn = Object.assign(Yn, {});
|
|
768
|
+
var _t = ((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))(_t || {});
|
|
769
|
+
let Gn = H(() => {
|
|
748
770
|
});
|
|
749
|
-
function
|
|
750
|
-
return E.createElement(
|
|
771
|
+
function Kn({ value: e, children: t }) {
|
|
772
|
+
return E.createElement(Gn.Provider, { value: e }, t);
|
|
751
773
|
}
|
|
752
|
-
let
|
|
774
|
+
let Zn = class extends Map {
|
|
753
775
|
constructor(t) {
|
|
754
776
|
super(), this.factory = t;
|
|
755
777
|
}
|
|
@@ -758,21 +780,21 @@ let Kn = class extends Map {
|
|
|
758
780
|
return n === void 0 && (n = this.factory(t), this.set(t, n)), n;
|
|
759
781
|
}
|
|
760
782
|
};
|
|
761
|
-
function
|
|
783
|
+
function Bt(e, t) {
|
|
762
784
|
let n = e(), r = /* @__PURE__ */ new Set();
|
|
763
785
|
return { getSnapshot() {
|
|
764
786
|
return n;
|
|
765
787
|
}, subscribe(l) {
|
|
766
788
|
return r.add(l), () => r.delete(l);
|
|
767
|
-
}, dispatch(l, ...
|
|
768
|
-
let
|
|
769
|
-
|
|
789
|
+
}, dispatch(l, ...o) {
|
|
790
|
+
let a = t[l].call(n, ...o);
|
|
791
|
+
a && (n = a, r.forEach((s) => s()));
|
|
770
792
|
} };
|
|
771
793
|
}
|
|
772
|
-
function
|
|
773
|
-
return
|
|
794
|
+
function Xt(e) {
|
|
795
|
+
return xn(e.subscribe, e.getSnapshot, e.getSnapshot);
|
|
774
796
|
}
|
|
775
|
-
let
|
|
797
|
+
let Jn = new Zn(() => Bt(() => [], { ADD(e) {
|
|
776
798
|
return this.includes(e) ? this : [...this, e];
|
|
777
799
|
}, REMOVE(e) {
|
|
778
800
|
let t = this.indexOf(e);
|
|
@@ -781,78 +803,78 @@ let Zn = new Kn(() => Wt(() => [], { ADD(e) {
|
|
|
781
803
|
return n.splice(t, 1), n;
|
|
782
804
|
} }));
|
|
783
805
|
function fe(e, t) {
|
|
784
|
-
let n =
|
|
785
|
-
if (
|
|
806
|
+
let n = Jn.get(t), r = Pe(), l = Xt(n);
|
|
807
|
+
if (k(() => {
|
|
786
808
|
if (e) return n.dispatch("ADD", r), () => n.dispatch("REMOVE", r);
|
|
787
809
|
}, [n, e]), !e) return !1;
|
|
788
|
-
let
|
|
789
|
-
return
|
|
810
|
+
let o = l.indexOf(r), a = l.length;
|
|
811
|
+
return o === -1 && (o = a, a += 1), o === a - 1;
|
|
790
812
|
}
|
|
791
|
-
let
|
|
792
|
-
function
|
|
813
|
+
let ot = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ new Map();
|
|
814
|
+
function Et(e) {
|
|
793
815
|
var t;
|
|
794
816
|
let n = (t = Te.get(e)) != null ? t : 0;
|
|
795
|
-
return Te.set(e, n + 1), n !== 0 ? () =>
|
|
817
|
+
return Te.set(e, n + 1), n !== 0 ? () => $t(e) : (ot.set(e, { "aria-hidden": e.getAttribute("aria-hidden"), inert: e.inert }), e.setAttribute("aria-hidden", "true"), e.inert = !0, () => $t(e));
|
|
796
818
|
}
|
|
797
|
-
function
|
|
819
|
+
function $t(e) {
|
|
798
820
|
var t;
|
|
799
821
|
let n = (t = Te.get(e)) != null ? t : 1;
|
|
800
822
|
if (n === 1 ? Te.delete(e) : Te.set(e, n - 1), n !== 1) return;
|
|
801
|
-
let r =
|
|
802
|
-
r && (r["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", r["aria-hidden"]), e.inert = r.inert,
|
|
823
|
+
let r = ot.get(e);
|
|
824
|
+
r && (r["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", r["aria-hidden"]), e.inert = r.inert, ot.delete(e));
|
|
803
825
|
}
|
|
804
|
-
function
|
|
826
|
+
function Qn(e, { allowed: t, disallowed: n } = {}) {
|
|
805
827
|
let r = fe(e, "inert-others");
|
|
806
|
-
|
|
807
|
-
var l,
|
|
828
|
+
k(() => {
|
|
829
|
+
var l, o;
|
|
808
830
|
if (!r) return;
|
|
809
|
-
let
|
|
810
|
-
for (let i of (l = n == null ? void 0 : n()) != null ? l : []) i &&
|
|
811
|
-
let s = (
|
|
831
|
+
let a = re();
|
|
832
|
+
for (let i of (l = n == null ? void 0 : n()) != null ? l : []) i && a.add(Et(i));
|
|
833
|
+
let s = (o = t == null ? void 0 : t()) != null ? o : [];
|
|
812
834
|
for (let i of s) {
|
|
813
835
|
if (!i) continue;
|
|
814
|
-
let
|
|
815
|
-
if (!
|
|
836
|
+
let c = Ve(i);
|
|
837
|
+
if (!c) continue;
|
|
816
838
|
let f = i.parentElement;
|
|
817
|
-
for (; f && f !==
|
|
818
|
-
for (let
|
|
839
|
+
for (; f && f !== c.body; ) {
|
|
840
|
+
for (let x of f.children) s.some((b) => x.contains(b)) || a.add(Et(x));
|
|
819
841
|
f = f.parentElement;
|
|
820
842
|
}
|
|
821
843
|
}
|
|
822
|
-
return
|
|
844
|
+
return a.dispose;
|
|
823
845
|
}, [r, t, n]);
|
|
824
846
|
}
|
|
825
|
-
function
|
|
847
|
+
function er(e, t, n) {
|
|
826
848
|
let r = ue((l) => {
|
|
827
|
-
let
|
|
828
|
-
|
|
849
|
+
let o = l.getBoundingClientRect();
|
|
850
|
+
o.x === 0 && o.y === 0 && o.width === 0 && o.height === 0 && n();
|
|
829
851
|
});
|
|
830
852
|
M(() => {
|
|
831
853
|
if (!e) return;
|
|
832
854
|
let l = t === null ? null : t instanceof HTMLElement ? t : t.current;
|
|
833
855
|
if (!l) return;
|
|
834
|
-
let
|
|
856
|
+
let o = re();
|
|
835
857
|
if (typeof ResizeObserver < "u") {
|
|
836
|
-
let
|
|
837
|
-
|
|
858
|
+
let a = new ResizeObserver(() => r.current(l));
|
|
859
|
+
a.observe(l), o.add(() => a.disconnect());
|
|
838
860
|
}
|
|
839
861
|
if (typeof IntersectionObserver < "u") {
|
|
840
|
-
let
|
|
841
|
-
|
|
862
|
+
let a = new IntersectionObserver(() => r.current(l));
|
|
863
|
+
a.observe(l), o.add(() => a.disconnect());
|
|
842
864
|
}
|
|
843
|
-
return () =>
|
|
865
|
+
return () => o.dispose();
|
|
844
866
|
}, [t, r, e]);
|
|
845
867
|
}
|
|
846
|
-
let We = ["[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(","),
|
|
847
|
-
var J = ((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))(J || {}),
|
|
848
|
-
function
|
|
868
|
+
let We = ["[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(","), tr = ["[data-autofocus]"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
|
|
869
|
+
var J = ((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))(J || {}), at = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(at || {}), nr = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(nr || {});
|
|
870
|
+
function rr(e = document.body) {
|
|
849
871
|
return e == null ? [] : Array.from(e.querySelectorAll(We)).sort((t, n) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (n.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
850
872
|
}
|
|
851
|
-
function
|
|
852
|
-
return e == null ? [] : Array.from(e.querySelectorAll(
|
|
873
|
+
function lr(e = document.body) {
|
|
874
|
+
return e == null ? [] : Array.from(e.querySelectorAll(tr)).sort((t, n) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (n.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
853
875
|
}
|
|
854
|
-
var
|
|
855
|
-
function
|
|
876
|
+
var Vt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Vt || {});
|
|
877
|
+
function ir(e, t = 0) {
|
|
856
878
|
var n;
|
|
857
879
|
return e === ((n = Ve(e)) == null ? void 0 : n.body) ? !1 : ne(t, { 0() {
|
|
858
880
|
return e.matches(We);
|
|
@@ -865,7 +887,7 @@ function lr(e, t = 0) {
|
|
|
865
887
|
return !1;
|
|
866
888
|
} });
|
|
867
889
|
}
|
|
868
|
-
var
|
|
890
|
+
var or = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(or || {});
|
|
869
891
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
870
892
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
871
893
|
}, !0), document.addEventListener("click", (e) => {
|
|
@@ -875,130 +897,130 @@ function Q(e) {
|
|
|
875
897
|
e == null || e.focus({ preventScroll: !0 });
|
|
876
898
|
}
|
|
877
899
|
let ar = ["textarea", "input"].join(",");
|
|
878
|
-
function
|
|
900
|
+
function sr(e) {
|
|
879
901
|
var t, n;
|
|
880
902
|
return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, ar)) != null ? n : !1;
|
|
881
903
|
}
|
|
882
|
-
function
|
|
904
|
+
function ur(e, t = (n) => n) {
|
|
883
905
|
return e.slice().sort((n, r) => {
|
|
884
|
-
let l = t(n),
|
|
885
|
-
if (l === null ||
|
|
886
|
-
let
|
|
887
|
-
return
|
|
906
|
+
let l = t(n), o = t(r);
|
|
907
|
+
if (l === null || o === null) return 0;
|
|
908
|
+
let a = l.compareDocumentPosition(o);
|
|
909
|
+
return a & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : a & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
888
910
|
});
|
|
889
911
|
}
|
|
890
912
|
function Oe(e, t, { sorted: n = !0, relativeTo: r = null, skipElements: l = [] } = {}) {
|
|
891
|
-
let
|
|
892
|
-
l.length > 0 &&
|
|
913
|
+
let o = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e.ownerDocument, a = Array.isArray(e) ? n ? ur(e) : e : t & 64 ? lr(e) : rr(e);
|
|
914
|
+
l.length > 0 && a.length > 1 && (a = a.filter((w) => !l.some((d) => d != null && "current" in d ? (d == null ? void 0 : d.current) === w : d === w))), r = r ?? o.activeElement;
|
|
893
915
|
let s = (() => {
|
|
894
916
|
if (t & 5) return 1;
|
|
895
917
|
if (t & 10) return -1;
|
|
896
918
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
897
919
|
})(), i = (() => {
|
|
898
920
|
if (t & 1) return 0;
|
|
899
|
-
if (t & 2) return Math.max(0,
|
|
900
|
-
if (t & 4) return Math.max(0,
|
|
901
|
-
if (t & 8) return
|
|
921
|
+
if (t & 2) return Math.max(0, a.indexOf(r)) - 1;
|
|
922
|
+
if (t & 4) return Math.max(0, a.indexOf(r)) + 1;
|
|
923
|
+
if (t & 8) return a.length - 1;
|
|
902
924
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
903
|
-
})(),
|
|
925
|
+
})(), c = t & 32 ? { preventScroll: !0 } : {}, f = 0, x = a.length, b;
|
|
904
926
|
do {
|
|
905
|
-
if (f >=
|
|
927
|
+
if (f >= x || f + x <= 0) return 0;
|
|
906
928
|
let w = i + f;
|
|
907
|
-
if (t & 16) w = (w +
|
|
929
|
+
if (t & 16) w = (w + x) % x;
|
|
908
930
|
else {
|
|
909
931
|
if (w < 0) return 3;
|
|
910
|
-
if (w >=
|
|
932
|
+
if (w >= x) return 1;
|
|
911
933
|
}
|
|
912
|
-
b =
|
|
913
|
-
} while (b !==
|
|
914
|
-
return t & 6 &&
|
|
934
|
+
b = a[w], b == null || b.focus(c), f += s;
|
|
935
|
+
} while (b !== o.activeElement);
|
|
936
|
+
return t & 6 && sr(b) && b.select(), 2;
|
|
915
937
|
}
|
|
916
|
-
function
|
|
938
|
+
function qt() {
|
|
917
939
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
918
940
|
}
|
|
919
|
-
function
|
|
941
|
+
function cr() {
|
|
920
942
|
return /Android/gi.test(window.navigator.userAgent);
|
|
921
943
|
}
|
|
922
944
|
function dr() {
|
|
923
|
-
return
|
|
945
|
+
return qt() || cr();
|
|
924
946
|
}
|
|
925
|
-
function
|
|
947
|
+
function xe(e, t, n, r) {
|
|
926
948
|
let l = ue(n);
|
|
927
949
|
M(() => {
|
|
928
950
|
if (!e) return;
|
|
929
|
-
function a
|
|
930
|
-
l.current(
|
|
951
|
+
function o(a) {
|
|
952
|
+
l.current(a);
|
|
931
953
|
}
|
|
932
|
-
return document.addEventListener(t,
|
|
954
|
+
return document.addEventListener(t, o, r), () => document.removeEventListener(t, o, r);
|
|
933
955
|
}, [e, t, r]);
|
|
934
956
|
}
|
|
935
|
-
function
|
|
957
|
+
function Yt(e, t, n, r) {
|
|
936
958
|
let l = ue(n);
|
|
937
959
|
M(() => {
|
|
938
960
|
if (!e) return;
|
|
939
|
-
function a
|
|
940
|
-
l.current(
|
|
961
|
+
function o(a) {
|
|
962
|
+
l.current(a);
|
|
941
963
|
}
|
|
942
|
-
return window.addEventListener(t,
|
|
964
|
+
return window.addEventListener(t, o, r), () => window.removeEventListener(t, o, r);
|
|
943
965
|
}, [e, t, r]);
|
|
944
966
|
}
|
|
945
|
-
const
|
|
946
|
-
function
|
|
947
|
-
let r = fe(e, "outside-click"), l = ue(n),
|
|
967
|
+
const Tt = 30;
|
|
968
|
+
function fr(e, t, n) {
|
|
969
|
+
let r = fe(e, "outside-click"), l = ue(n), o = Y(function(i, c) {
|
|
948
970
|
if (i.defaultPrevented) return;
|
|
949
|
-
let f =
|
|
971
|
+
let f = c(i);
|
|
950
972
|
if (f === null || !f.getRootNode().contains(f) || !f.isConnected) return;
|
|
951
|
-
let
|
|
973
|
+
let x = function b(w) {
|
|
952
974
|
return typeof w == "function" ? b(w()) : Array.isArray(w) || w instanceof Set ? w : [w];
|
|
953
975
|
}(t);
|
|
954
|
-
for (let b of
|
|
955
|
-
return !
|
|
956
|
-
}, [l, t]),
|
|
957
|
-
|
|
958
|
-
var
|
|
959
|
-
|
|
960
|
-
}, !0),
|
|
961
|
-
var
|
|
962
|
-
|
|
963
|
-
}, !0),
|
|
964
|
-
dr() ||
|
|
976
|
+
for (let b of x) if (b !== null && (b.contains(f) || i.composed && i.composedPath().includes(b))) return;
|
|
977
|
+
return !ir(f, Vt.Loose) && f.tabIndex !== -1 && i.preventDefault(), l.current(i, f);
|
|
978
|
+
}, [l, t]), a = O(null);
|
|
979
|
+
xe(r, "pointerdown", (i) => {
|
|
980
|
+
var c, f;
|
|
981
|
+
a.current = ((f = (c = i.composedPath) == null ? void 0 : c.call(i)) == null ? void 0 : f[0]) || i.target;
|
|
982
|
+
}, !0), xe(r, "mousedown", (i) => {
|
|
983
|
+
var c, f;
|
|
984
|
+
a.current = ((f = (c = i.composedPath) == null ? void 0 : c.call(i)) == null ? void 0 : f[0]) || i.target;
|
|
985
|
+
}, !0), xe(r, "click", (i) => {
|
|
986
|
+
dr() || a.current && (o(i, () => a.current), a.current = null);
|
|
965
987
|
}, !0);
|
|
966
988
|
let s = O({ x: 0, y: 0 });
|
|
967
|
-
|
|
989
|
+
xe(r, "touchstart", (i) => {
|
|
968
990
|
s.current.x = i.touches[0].clientX, s.current.y = i.touches[0].clientY;
|
|
969
|
-
}, !0),
|
|
970
|
-
let
|
|
971
|
-
if (!(Math.abs(
|
|
972
|
-
}, !0),
|
|
991
|
+
}, !0), xe(r, "touchend", (i) => {
|
|
992
|
+
let c = { x: i.changedTouches[0].clientX, y: i.changedTouches[0].clientY };
|
|
993
|
+
if (!(Math.abs(c.x - s.current.x) >= Tt || Math.abs(c.y - s.current.y) >= Tt)) return o(i, () => i.target instanceof HTMLElement ? i.target : null);
|
|
994
|
+
}, !0), Yt(r, "blur", (i) => o(i, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
973
995
|
}
|
|
974
996
|
function Me(...e) {
|
|
975
997
|
return C(() => Ve(...e), [...e]);
|
|
976
998
|
}
|
|
977
|
-
function
|
|
999
|
+
function zt(e, t, n, r) {
|
|
978
1000
|
let l = ue(n);
|
|
979
1001
|
M(() => {
|
|
980
1002
|
e = e ?? window;
|
|
981
|
-
function a
|
|
982
|
-
l.current(
|
|
1003
|
+
function o(a) {
|
|
1004
|
+
l.current(a);
|
|
983
1005
|
}
|
|
984
|
-
return e.addEventListener(t,
|
|
1006
|
+
return e.addEventListener(t, o, r), () => e.removeEventListener(t, o, r);
|
|
985
1007
|
}, [e, t, r]);
|
|
986
1008
|
}
|
|
987
|
-
function
|
|
1009
|
+
function mr() {
|
|
988
1010
|
let e;
|
|
989
1011
|
return { before({ doc: t }) {
|
|
990
1012
|
var n;
|
|
991
1013
|
let r = t.documentElement, l = (n = t.defaultView) != null ? n : window;
|
|
992
1014
|
e = Math.max(0, l.innerWidth - r.clientWidth);
|
|
993
1015
|
}, after({ doc: t, d: n }) {
|
|
994
|
-
let r = t.documentElement, l = Math.max(0, r.clientWidth - r.offsetWidth),
|
|
995
|
-
n.style(r, "paddingRight", `${
|
|
1016
|
+
let r = t.documentElement, l = Math.max(0, r.clientWidth - r.offsetWidth), o = Math.max(0, e - l);
|
|
1017
|
+
n.style(r, "paddingRight", `${o}px`);
|
|
996
1018
|
} };
|
|
997
1019
|
}
|
|
998
|
-
function
|
|
999
|
-
return
|
|
1020
|
+
function pr() {
|
|
1021
|
+
return qt() ? { before({ doc: e, d: t, meta: n }) {
|
|
1000
1022
|
function r(l) {
|
|
1001
|
-
return n.containers.flatMap((
|
|
1023
|
+
return n.containers.flatMap((o) => o()).some((o) => o.contains(l));
|
|
1002
1024
|
}
|
|
1003
1025
|
t.microTask(() => {
|
|
1004
1026
|
var l;
|
|
@@ -1006,13 +1028,13 @@ function mr() {
|
|
|
1006
1028
|
let s = re();
|
|
1007
1029
|
s.style(e.documentElement, "scrollBehavior", "auto"), t.add(() => t.microTask(() => s.dispose()));
|
|
1008
1030
|
}
|
|
1009
|
-
let
|
|
1031
|
+
let o = (l = window.scrollY) != null ? l : window.pageYOffset, a = null;
|
|
1010
1032
|
t.addEventListener(e, "click", (s) => {
|
|
1011
1033
|
if (s.target instanceof HTMLElement) try {
|
|
1012
1034
|
let i = s.target.closest("a");
|
|
1013
1035
|
if (!i) return;
|
|
1014
|
-
let { hash:
|
|
1015
|
-
f && !r(f) && (
|
|
1036
|
+
let { hash: c } = new URL(i.href), f = e.querySelector(c);
|
|
1037
|
+
f && !r(f) && (a = f);
|
|
1016
1038
|
} catch {
|
|
1017
1039
|
}
|
|
1018
1040
|
}, !0), t.addEventListener(e, "touchstart", (s) => {
|
|
@@ -1033,22 +1055,22 @@ function mr() {
|
|
|
1033
1055
|
}, { passive: !1 }), t.add(() => {
|
|
1034
1056
|
var s;
|
|
1035
1057
|
let i = (s = window.scrollY) != null ? s : window.pageYOffset;
|
|
1036
|
-
|
|
1058
|
+
o !== i && window.scrollTo(0, o), a && a.isConnected && (a.scrollIntoView({ block: "nearest" }), a = null);
|
|
1037
1059
|
});
|
|
1038
1060
|
});
|
|
1039
1061
|
} } : {};
|
|
1040
1062
|
}
|
|
1041
|
-
function
|
|
1063
|
+
function hr() {
|
|
1042
1064
|
return { before({ doc: e, d: t }) {
|
|
1043
1065
|
t.style(e.documentElement, "overflow", "hidden");
|
|
1044
1066
|
} };
|
|
1045
1067
|
}
|
|
1046
|
-
function
|
|
1068
|
+
function vr(e) {
|
|
1047
1069
|
let t = {};
|
|
1048
1070
|
for (let n of e) Object.assign(t, n(t));
|
|
1049
1071
|
return t;
|
|
1050
1072
|
}
|
|
1051
|
-
let
|
|
1073
|
+
let oe = Bt(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
|
|
1052
1074
|
var n;
|
|
1053
1075
|
let r = (n = this.get(e)) != null ? n : { doc: e, count: 0, d: re(), meta: /* @__PURE__ */ new Set() };
|
|
1054
1076
|
return r.count++, r.meta.add(t), this.set(e, r), this;
|
|
@@ -1056,91 +1078,91 @@ let ae = Wt(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
|
|
|
1056
1078
|
let n = this.get(e);
|
|
1057
1079
|
return n && (n.count--, n.meta.delete(t)), this;
|
|
1058
1080
|
}, SCROLL_PREVENT({ doc: e, d: t, meta: n }) {
|
|
1059
|
-
let r = { doc: e, d: t, meta:
|
|
1060
|
-
l.forEach(({ before:
|
|
1081
|
+
let r = { doc: e, d: t, meta: vr(n) }, l = [pr(), mr(), hr()];
|
|
1082
|
+
l.forEach(({ before: o }) => o == null ? void 0 : o(r)), l.forEach(({ after: o }) => o == null ? void 0 : o(r));
|
|
1061
1083
|
}, SCROLL_ALLOW({ d: e }) {
|
|
1062
1084
|
e.dispose();
|
|
1063
1085
|
}, TEARDOWN({ doc: e }) {
|
|
1064
1086
|
this.delete(e);
|
|
1065
1087
|
} });
|
|
1066
|
-
|
|
1067
|
-
let e =
|
|
1088
|
+
oe.subscribe(() => {
|
|
1089
|
+
let e = oe.getSnapshot(), t = /* @__PURE__ */ new Map();
|
|
1068
1090
|
for (let [n] of e) t.set(n, n.documentElement.style.overflow);
|
|
1069
1091
|
for (let n of e.values()) {
|
|
1070
1092
|
let r = t.get(n.doc) === "hidden", l = n.count !== 0;
|
|
1071
|
-
(l && !r || !l && r) &&
|
|
1093
|
+
(l && !r || !l && r) && oe.dispatch(n.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", n), n.count === 0 && oe.dispatch("TEARDOWN", n);
|
|
1072
1094
|
}
|
|
1073
1095
|
});
|
|
1074
|
-
function
|
|
1075
|
-
let r =
|
|
1076
|
-
return
|
|
1077
|
-
if (!(!t || !e)) return
|
|
1078
|
-
}, [e, t]),
|
|
1096
|
+
function gr(e, t, n = () => ({ containers: [] })) {
|
|
1097
|
+
let r = Xt(oe), l = t ? r.get(t) : void 0, o = l ? l.count > 0 : !1;
|
|
1098
|
+
return k(() => {
|
|
1099
|
+
if (!(!t || !e)) return oe.dispatch("PUSH", t, n), () => oe.dispatch("POP", t, n);
|
|
1100
|
+
}, [e, t]), o;
|
|
1079
1101
|
}
|
|
1080
|
-
function
|
|
1102
|
+
function wr(e, t, n = () => [document.body]) {
|
|
1081
1103
|
let r = fe(e, "scroll-lock");
|
|
1082
|
-
|
|
1083
|
-
var
|
|
1084
|
-
return { containers: [...(
|
|
1104
|
+
gr(r, t, (l) => {
|
|
1105
|
+
var o;
|
|
1106
|
+
return { containers: [...(o = l.containers) != null ? o : [], n] };
|
|
1085
1107
|
});
|
|
1086
1108
|
}
|
|
1087
|
-
function
|
|
1088
|
-
let [t, n] = S(e), r = Y((i) => n(i), [t]), l = Y((i) => n((
|
|
1089
|
-
return { flags: t, setFlag: r, addFlag: l, hasFlag:
|
|
1109
|
+
function xr(e = 0) {
|
|
1110
|
+
let [t, n] = S(e), r = Y((i) => n(i), [t]), l = Y((i) => n((c) => c | i), [t]), o = Y((i) => (t & i) === i, [t]), a = Y((i) => n((c) => c & ~i), [n]), s = Y((i) => n((c) => c ^ i), [n]);
|
|
1111
|
+
return { flags: t, setFlag: r, addFlag: l, hasFlag: o, removeFlag: a, toggleFlag: s };
|
|
1090
1112
|
}
|
|
1091
|
-
var
|
|
1092
|
-
typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((
|
|
1113
|
+
var Ot, Pt;
|
|
1114
|
+
typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((Ot = process == null ? void 0 : process.env) == null ? void 0 : Ot.NODE_ENV) === "test" && typeof ((Pt = Element == null ? void 0 : Element.prototype) == null ? void 0 : Pt.getAnimations) > "u" && (Element.prototype.getAnimations = function() {
|
|
1093
1115
|
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(`
|
|
1094
1116
|
`)), [];
|
|
1095
1117
|
});
|
|
1096
1118
|
var yr = ((e) => (e[e.None = 0] = "None", e[e.Closed = 1] = "Closed", e[e.Enter = 2] = "Enter", e[e.Leave = 4] = "Leave", e))(yr || {});
|
|
1097
|
-
function
|
|
1119
|
+
function br(e) {
|
|
1098
1120
|
let t = {};
|
|
1099
1121
|
for (let n in e) e[n] === !0 && (t[`data-${n}`] = "");
|
|
1100
1122
|
return t;
|
|
1101
1123
|
}
|
|
1102
|
-
function
|
|
1103
|
-
let [l,
|
|
1104
|
-
return
|
|
1124
|
+
function Er(e, t, n, r) {
|
|
1125
|
+
let [l, o] = S(n), { hasFlag: a, addFlag: s, removeFlag: i } = xr(e && l ? 3 : 0), c = O(!1), f = O(!1), x = pt();
|
|
1126
|
+
return k(() => {
|
|
1105
1127
|
var b;
|
|
1106
1128
|
if (e) {
|
|
1107
|
-
if (n &&
|
|
1129
|
+
if (n && o(!0), !t) {
|
|
1108
1130
|
n && s(3);
|
|
1109
1131
|
return;
|
|
1110
1132
|
}
|
|
1111
|
-
return (b = r == null ? void 0 : r.start) == null || b.call(r, n),
|
|
1112
|
-
f.current ? f.current = !1 : f.current =
|
|
1133
|
+
return (b = r == null ? void 0 : r.start) == null || b.call(r, n), $r(t, { inFlight: c, prepare() {
|
|
1134
|
+
f.current ? f.current = !1 : f.current = c.current, c.current = !0, !f.current && (n ? (s(3), i(4)) : (s(4), i(2)));
|
|
1113
1135
|
}, run() {
|
|
1114
1136
|
f.current ? n ? (i(3), s(4)) : (i(4), s(3)) : n ? i(1) : s(1);
|
|
1115
1137
|
}, done() {
|
|
1116
1138
|
var w;
|
|
1117
|
-
f.current && typeof t.getAnimations == "function" && t.getAnimations().length > 0 || (
|
|
1139
|
+
f.current && typeof t.getAnimations == "function" && t.getAnimations().length > 0 || (c.current = !1, i(7), n || o(!1), (w = r == null ? void 0 : r.end) == null || w.call(r, n));
|
|
1118
1140
|
} });
|
|
1119
1141
|
}
|
|
1120
|
-
}, [e, n, t,
|
|
1142
|
+
}, [e, n, t, x]), e ? [l, { closed: a(1), enter: a(2), leave: a(4), transition: a(2) || a(4) }] : [n, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
|
|
1121
1143
|
}
|
|
1122
|
-
function
|
|
1123
|
-
let
|
|
1124
|
-
return
|
|
1125
|
-
n(),
|
|
1126
|
-
|
|
1144
|
+
function $r(e, { prepare: t, run: n, done: r, inFlight: l }) {
|
|
1145
|
+
let o = re();
|
|
1146
|
+
return Or(e, { prepare: t, inFlight: l }), o.nextFrame(() => {
|
|
1147
|
+
n(), o.requestAnimationFrame(() => {
|
|
1148
|
+
o.add(Tr(e, r));
|
|
1127
1149
|
});
|
|
1128
|
-
}),
|
|
1150
|
+
}), o.dispose;
|
|
1129
1151
|
}
|
|
1130
|
-
function
|
|
1152
|
+
function Tr(e, t) {
|
|
1131
1153
|
var n, r;
|
|
1132
1154
|
let l = re();
|
|
1133
1155
|
if (!e) return l.dispose;
|
|
1134
|
-
let
|
|
1156
|
+
let o = !1;
|
|
1135
1157
|
l.add(() => {
|
|
1136
|
-
|
|
1158
|
+
o = !0;
|
|
1137
1159
|
});
|
|
1138
|
-
let
|
|
1139
|
-
return
|
|
1140
|
-
|
|
1160
|
+
let a = (r = (n = e.getAnimations) == null ? void 0 : n.call(e).filter((s) => s instanceof CSSTransition)) != null ? r : [];
|
|
1161
|
+
return a.length === 0 ? (t(), l.dispose) : (Promise.allSettled(a.map((s) => s.finished)).then(() => {
|
|
1162
|
+
o || t();
|
|
1141
1163
|
}), l.dispose);
|
|
1142
1164
|
}
|
|
1143
|
-
function
|
|
1165
|
+
function Or(e, { inFlight: t, prepare: n }) {
|
|
1144
1166
|
if (t != null && t.current) {
|
|
1145
1167
|
n();
|
|
1146
1168
|
return;
|
|
@@ -1152,7 +1174,7 @@ function vt(e, t) {
|
|
|
1152
1174
|
let n = O([]), r = L(e);
|
|
1153
1175
|
M(() => {
|
|
1154
1176
|
let l = [...n.current];
|
|
1155
|
-
for (let [
|
|
1177
|
+
for (let [o, a] of t.entries()) if (n.current[o] !== a) {
|
|
1156
1178
|
let s = r(t, l);
|
|
1157
1179
|
return n.current = t, s;
|
|
1158
1180
|
}
|
|
@@ -1164,20 +1186,20 @@ var z = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing
|
|
|
1164
1186
|
function ze() {
|
|
1165
1187
|
return R(Ye);
|
|
1166
1188
|
}
|
|
1167
|
-
function
|
|
1189
|
+
function Pr({ value: e, children: t }) {
|
|
1168
1190
|
return E.createElement(Ye.Provider, { value: e }, t);
|
|
1169
1191
|
}
|
|
1170
|
-
function
|
|
1192
|
+
function Mr({ children: e }) {
|
|
1171
1193
|
return E.createElement(Ye.Provider, { value: null }, e);
|
|
1172
1194
|
}
|
|
1173
|
-
function
|
|
1195
|
+
function Lr(e) {
|
|
1174
1196
|
function t() {
|
|
1175
1197
|
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", t));
|
|
1176
1198
|
}
|
|
1177
1199
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", t), t());
|
|
1178
1200
|
}
|
|
1179
1201
|
let ee = [];
|
|
1180
|
-
|
|
1202
|
+
Lr(() => {
|
|
1181
1203
|
function e(t) {
|
|
1182
1204
|
if (!(t.target instanceof HTMLElement) || t.target === document.body || ee[0] === t.target) return;
|
|
1183
1205
|
let n = t.target;
|
|
@@ -1185,7 +1207,7 @@ Mr(() => {
|
|
|
1185
1207
|
}
|
|
1186
1208
|
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 });
|
|
1187
1209
|
});
|
|
1188
|
-
function
|
|
1210
|
+
function Gt(e) {
|
|
1189
1211
|
let t = L(e), n = O(!1);
|
|
1190
1212
|
M(() => (n.current = !1, () => {
|
|
1191
1213
|
n.current = !0, qe(() => {
|
|
@@ -1193,29 +1215,29 @@ function Yt(e) {
|
|
|
1193
1215
|
});
|
|
1194
1216
|
}), [t]);
|
|
1195
1217
|
}
|
|
1196
|
-
function
|
|
1218
|
+
function Sr() {
|
|
1197
1219
|
let e = typeof document > "u";
|
|
1198
1220
|
return "useSyncExternalStore" in Ee ? ((t) => t.useSyncExternalStore)(Ee)(() => () => {
|
|
1199
1221
|
}, () => !1, () => !e) : !1;
|
|
1200
1222
|
}
|
|
1201
1223
|
function Le() {
|
|
1202
|
-
let e =
|
|
1203
|
-
return t &&
|
|
1224
|
+
let e = Sr(), [t, n] = Ee.useState(ae.isHandoffComplete);
|
|
1225
|
+
return t && ae.isHandoffComplete === !1 && n(!1), Ee.useEffect(() => {
|
|
1204
1226
|
t !== !0 && n(!0);
|
|
1205
|
-
}, [t]), Ee.useEffect(() =>
|
|
1227
|
+
}, [t]), Ee.useEffect(() => ae.handoff(), []), e ? !1 : t;
|
|
1206
1228
|
}
|
|
1207
|
-
let
|
|
1208
|
-
function
|
|
1209
|
-
return R(
|
|
1229
|
+
let Kt = H(!1);
|
|
1230
|
+
function Fr() {
|
|
1231
|
+
return R(Kt);
|
|
1210
1232
|
}
|
|
1211
|
-
function
|
|
1212
|
-
return E.createElement(
|
|
1233
|
+
function Mt(e) {
|
|
1234
|
+
return E.createElement(Kt.Provider, { value: e.force }, e.children);
|
|
1213
1235
|
}
|
|
1214
|
-
function
|
|
1215
|
-
let t =
|
|
1216
|
-
var
|
|
1217
|
-
if (!t && n !== null) return (
|
|
1218
|
-
if (
|
|
1236
|
+
function Cr(e) {
|
|
1237
|
+
let t = Fr(), n = R(Jt), r = Me(e), [l, o] = S(() => {
|
|
1238
|
+
var a;
|
|
1239
|
+
if (!t && n !== null) return (a = n.current) != null ? a : null;
|
|
1240
|
+
if (ae.isServer) return null;
|
|
1219
1241
|
let s = r == null ? void 0 : r.getElementById("headlessui-portal-root");
|
|
1220
1242
|
if (s) return s;
|
|
1221
1243
|
if (r === null) return null;
|
|
@@ -1225,145 +1247,145 @@ function Fr(e) {
|
|
|
1225
1247
|
return M(() => {
|
|
1226
1248
|
l !== null && (r != null && r.body.contains(l) || r == null || r.body.appendChild(l));
|
|
1227
1249
|
}, [l, r]), M(() => {
|
|
1228
|
-
t || n !== null &&
|
|
1229
|
-
}, [n,
|
|
1230
|
-
}
|
|
1231
|
-
let
|
|
1232
|
-
let n = e, r = O(null), l = Z(
|
|
1233
|
-
r.current =
|
|
1234
|
-
}), t),
|
|
1235
|
-
var
|
|
1236
|
-
return
|
|
1237
|
-
}), i = R(st),
|
|
1238
|
-
|
|
1239
|
-
!
|
|
1240
|
-
}, [
|
|
1250
|
+
t || n !== null && o(n.current);
|
|
1251
|
+
}, [n, o, t]), l;
|
|
1252
|
+
}
|
|
1253
|
+
let Zt = G, Nr = D(function(e, t) {
|
|
1254
|
+
let n = e, r = O(null), l = Z(Bn((x) => {
|
|
1255
|
+
r.current = x;
|
|
1256
|
+
}), t), o = Me(r), a = Cr(r), [s] = S(() => {
|
|
1257
|
+
var x;
|
|
1258
|
+
return ae.isServer ? null : (x = o == null ? void 0 : o.createElement("div")) != null ? x : null;
|
|
1259
|
+
}), i = R(st), c = Le();
|
|
1260
|
+
k(() => {
|
|
1261
|
+
!a || !s || a.contains(s) || (s.setAttribute("data-headlessui-portal", ""), a.appendChild(s));
|
|
1262
|
+
}, [a, s]), k(() => {
|
|
1241
1263
|
if (s && i) return i.register(s);
|
|
1242
|
-
}, [i, s]),
|
|
1243
|
-
var
|
|
1244
|
-
!
|
|
1264
|
+
}, [i, s]), Gt(() => {
|
|
1265
|
+
var x;
|
|
1266
|
+
!a || !s || (s instanceof Node && a.contains(s) && a.removeChild(s), a.childNodes.length <= 0 && ((x = a.parentElement) == null || x.removeChild(a)));
|
|
1245
1267
|
});
|
|
1246
1268
|
let f = W();
|
|
1247
|
-
return
|
|
1269
|
+
return c ? !a || !s ? null : Tn(f({ ourProps: { ref: l }, theirProps: n, slot: {}, defaultTag: Zt, name: "Portal" }), s) : null;
|
|
1248
1270
|
});
|
|
1249
|
-
function kr(e, t) {
|
|
1250
|
-
let n = Z(t), { enabled: r = !0, ...l } = e, a = W();
|
|
1251
|
-
return r ? E.createElement(Cr, { ...l, ref: n }) : a({ ourProps: { ref: n }, theirProps: l, slot: {}, defaultTag: Gt, name: "Portal" });
|
|
1252
|
-
}
|
|
1253
|
-
let Nr = G, Kt = H(null);
|
|
1254
1271
|
function Ar(e, t) {
|
|
1255
|
-
let {
|
|
1256
|
-
return E.createElement(
|
|
1272
|
+
let n = Z(t), { enabled: r = !0, ...l } = e, o = W();
|
|
1273
|
+
return r ? E.createElement(Nr, { ...l, ref: n }) : o({ ourProps: { ref: n }, theirProps: l, slot: {}, defaultTag: Zt, name: "Portal" });
|
|
1274
|
+
}
|
|
1275
|
+
let kr = G, Jt = H(null);
|
|
1276
|
+
function Ir(e, t) {
|
|
1277
|
+
let { target: n, ...r } = e, l = { ref: Z(t) }, o = W();
|
|
1278
|
+
return E.createElement(Jt.Provider, { value: n }, o({ ourProps: l, theirProps: r, defaultTag: kr, name: "Popover.Group" }));
|
|
1257
1279
|
}
|
|
1258
1280
|
let st = H(null);
|
|
1259
|
-
function
|
|
1260
|
-
let e = R(st), t = O([]), n = L((
|
|
1261
|
-
let
|
|
1262
|
-
|
|
1281
|
+
function Rr() {
|
|
1282
|
+
let e = R(st), t = O([]), n = L((o) => (t.current.push(o), e && e.register(o), () => r(o))), r = L((o) => {
|
|
1283
|
+
let a = t.current.indexOf(o);
|
|
1284
|
+
a !== -1 && t.current.splice(a, 1), e && e.unregister(o);
|
|
1263
1285
|
}), l = C(() => ({ register: n, unregister: r, portals: t }), [n, r, t]);
|
|
1264
|
-
return [t, C(() => function({ children:
|
|
1265
|
-
return E.createElement(st.Provider, { value: l },
|
|
1286
|
+
return [t, C(() => function({ children: o }) {
|
|
1287
|
+
return E.createElement(st.Provider, { value: l }, o);
|
|
1266
1288
|
}, [l])];
|
|
1267
1289
|
}
|
|
1268
|
-
let
|
|
1269
|
-
function
|
|
1290
|
+
let Dr = D(Ar), Qt = D(Ir), jr = Object.assign(Dr, { Group: Qt });
|
|
1291
|
+
function Ur(e, t = typeof document < "u" ? document.defaultView : null, n) {
|
|
1270
1292
|
let r = fe(e, "escape");
|
|
1271
|
-
|
|
1272
|
-
r && (l.defaultPrevented || l.key ===
|
|
1293
|
+
zt(t, "keydown", (l) => {
|
|
1294
|
+
r && (l.defaultPrevented || l.key === _t.Escape && n(l));
|
|
1273
1295
|
});
|
|
1274
1296
|
}
|
|
1275
|
-
function
|
|
1297
|
+
function Hr() {
|
|
1276
1298
|
var e;
|
|
1277
1299
|
let [t] = S(() => typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(pointer: coarse)") : null), [n, r] = S((e = t == null ? void 0 : t.matches) != null ? e : !1);
|
|
1278
|
-
return
|
|
1300
|
+
return k(() => {
|
|
1279
1301
|
if (!t) return;
|
|
1280
|
-
function l(
|
|
1281
|
-
r(
|
|
1302
|
+
function l(o) {
|
|
1303
|
+
r(o.matches);
|
|
1282
1304
|
}
|
|
1283
1305
|
return t.addEventListener("change", l), () => t.removeEventListener("change", l);
|
|
1284
1306
|
}, [t]), n;
|
|
1285
1307
|
}
|
|
1286
|
-
function
|
|
1308
|
+
function Wr({ defaultContainers: e = [], portals: t, mainTreeNode: n } = {}) {
|
|
1287
1309
|
let r = Me(n), l = L(() => {
|
|
1288
|
-
var
|
|
1310
|
+
var o, a;
|
|
1289
1311
|
let s = [];
|
|
1290
1312
|
for (let i of e) i !== null && (i instanceof HTMLElement ? s.push(i) : "current" in i && i.current instanceof HTMLElement && s.push(i.current));
|
|
1291
1313
|
if (t != null && t.current) for (let i of t.current) s.push(i);
|
|
1292
|
-
for (let i of (
|
|
1314
|
+
for (let i of (o = r == null ? void 0 : r.querySelectorAll("html > *, body > *")) != null ? o : []) i !== document.body && i !== document.head && i instanceof HTMLElement && i.id !== "headlessui-portal-root" && (n && (i.contains(n) || i.contains((a = n == null ? void 0 : n.getRootNode()) == null ? void 0 : a.host)) || s.some((c) => i.contains(c)) || s.push(i));
|
|
1293
1315
|
return s;
|
|
1294
1316
|
});
|
|
1295
|
-
return { resolveContainers: l, contains: L((
|
|
1296
|
-
}
|
|
1297
|
-
let
|
|
1298
|
-
function
|
|
1299
|
-
let [n, r] = S(null), l =
|
|
1300
|
-
return E.createElement(
|
|
1301
|
-
var
|
|
1302
|
-
if (
|
|
1303
|
-
for (let i of (s = (
|
|
1317
|
+
return { resolveContainers: l, contains: L((o) => l().some((a) => a.contains(o))) };
|
|
1318
|
+
}
|
|
1319
|
+
let en = H(null);
|
|
1320
|
+
function Lt({ children: e, node: t }) {
|
|
1321
|
+
let [n, r] = S(null), l = tn(t ?? n);
|
|
1322
|
+
return E.createElement(en.Provider, { value: l }, e, l === null && E.createElement(it, { features: He.Hidden, ref: (o) => {
|
|
1323
|
+
var a, s;
|
|
1324
|
+
if (o) {
|
|
1325
|
+
for (let i of (s = (a = Ve(o)) == null ? void 0 : a.querySelectorAll("html > *, body > *")) != null ? s : []) if (i !== document.body && i !== document.head && i instanceof HTMLElement && i != null && i.contains(o)) {
|
|
1304
1326
|
r(i);
|
|
1305
1327
|
break;
|
|
1306
1328
|
}
|
|
1307
1329
|
}
|
|
1308
1330
|
} }));
|
|
1309
1331
|
}
|
|
1310
|
-
function
|
|
1332
|
+
function tn(e = null) {
|
|
1311
1333
|
var t;
|
|
1312
|
-
return (t = R(
|
|
1334
|
+
return (t = R(en)) != null ? t : e;
|
|
1313
1335
|
}
|
|
1314
1336
|
function gt() {
|
|
1315
1337
|
let e = O(!1);
|
|
1316
|
-
return
|
|
1338
|
+
return k(() => (e.current = !0, () => {
|
|
1317
1339
|
e.current = !1;
|
|
1318
1340
|
}), []), e;
|
|
1319
1341
|
}
|
|
1320
1342
|
var be = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(be || {});
|
|
1321
|
-
function
|
|
1343
|
+
function _r() {
|
|
1322
1344
|
let e = O(0);
|
|
1323
|
-
return
|
|
1345
|
+
return Yt(!0, "keydown", (t) => {
|
|
1324
1346
|
t.key === "Tab" && (e.current = t.shiftKey ? 1 : 0);
|
|
1325
1347
|
}, !0), e;
|
|
1326
1348
|
}
|
|
1327
|
-
function
|
|
1349
|
+
function nn(e) {
|
|
1328
1350
|
if (!e) return /* @__PURE__ */ new Set();
|
|
1329
1351
|
if (typeof e == "function") return new Set(e());
|
|
1330
1352
|
let t = /* @__PURE__ */ new Set();
|
|
1331
1353
|
for (let n of e.current) n.current instanceof HTMLElement && t.add(n.current);
|
|
1332
1354
|
return t;
|
|
1333
1355
|
}
|
|
1334
|
-
let
|
|
1356
|
+
let Br = "div";
|
|
1335
1357
|
var ie = ((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))(ie || {});
|
|
1336
|
-
function
|
|
1337
|
-
let n = O(null), r = Z(n, t), { initialFocus: l, initialFocusFallback:
|
|
1358
|
+
function Xr(e, t) {
|
|
1359
|
+
let n = O(null), r = Z(n, t), { initialFocus: l, initialFocusFallback: o, containers: a, features: s = 15, ...i } = e;
|
|
1338
1360
|
Le() || (s = 0);
|
|
1339
|
-
let
|
|
1340
|
-
|
|
1341
|
-
let f =
|
|
1342
|
-
|
|
1343
|
-
let
|
|
1361
|
+
let c = Me(n);
|
|
1362
|
+
zr(s, { ownerDocument: c });
|
|
1363
|
+
let f = Gr(s, { ownerDocument: c, container: n, initialFocus: l, initialFocusFallback: o });
|
|
1364
|
+
Kr(s, { ownerDocument: c, container: n, containers: a, previousActiveElement: f });
|
|
1365
|
+
let x = _r(), b = L((p) => {
|
|
1344
1366
|
let g = n.current;
|
|
1345
|
-
g && ((
|
|
1346
|
-
ne(
|
|
1347
|
-
Oe(g, J.First, { skipElements: [p.relatedTarget,
|
|
1367
|
+
g && ((y) => y())(() => {
|
|
1368
|
+
ne(x.current, { [be.Forwards]: () => {
|
|
1369
|
+
Oe(g, J.First, { skipElements: [p.relatedTarget, o] });
|
|
1348
1370
|
}, [be.Backwards]: () => {
|
|
1349
|
-
Oe(g, J.Last, { skipElements: [p.relatedTarget,
|
|
1371
|
+
Oe(g, J.Last, { skipElements: [p.relatedTarget, o] });
|
|
1350
1372
|
} });
|
|
1351
1373
|
});
|
|
1352
|
-
}), w = fe(!!(s & 2), "focus-trap#tab-lock"),
|
|
1353
|
-
p.key == "Tab" && (v.current = !0,
|
|
1374
|
+
}), w = fe(!!(s & 2), "focus-trap#tab-lock"), d = pt(), v = O(!1), u = { ref: r, onKeyDown(p) {
|
|
1375
|
+
p.key == "Tab" && (v.current = !0, d.requestAnimationFrame(() => {
|
|
1354
1376
|
v.current = !1;
|
|
1355
1377
|
}));
|
|
1356
1378
|
}, onBlur(p) {
|
|
1357
1379
|
if (!(s & 4)) return;
|
|
1358
|
-
let g =
|
|
1380
|
+
let g = nn(a);
|
|
1359
1381
|
n.current instanceof HTMLElement && g.add(n.current);
|
|
1360
|
-
let
|
|
1361
|
-
|
|
1382
|
+
let y = p.relatedTarget;
|
|
1383
|
+
y instanceof HTMLElement && y.dataset.headlessuiFocusGuard !== "true" && (rn(g, y) || (v.current ? Oe(n.current, ne(x.current, { [be.Forwards]: () => J.Next, [be.Backwards]: () => J.Previous }) | J.WrapAround, { relativeTo: p.target }) : p.target instanceof HTMLElement && Q(p.target)));
|
|
1362
1384
|
} }, m = W();
|
|
1363
|
-
return E.createElement(E.Fragment, null, w && E.createElement(it, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: b, features: He.Focusable }), m({ ourProps: u, theirProps: i, defaultTag:
|
|
1385
|
+
return E.createElement(E.Fragment, null, w && E.createElement(it, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: b, features: He.Focusable }), m({ ourProps: u, theirProps: i, defaultTag: Br, name: "FocusTrap" }), w && E.createElement(it, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: b, features: He.Focusable }));
|
|
1364
1386
|
}
|
|
1365
|
-
let
|
|
1366
|
-
function
|
|
1387
|
+
let Vr = D(Xr), qr = Object.assign(Vr, { features: ie });
|
|
1388
|
+
function Yr(e = !0) {
|
|
1367
1389
|
let t = O(ee.slice());
|
|
1368
1390
|
return vt(([n], [r]) => {
|
|
1369
1391
|
r === !0 && n === !1 && qe(() => {
|
|
@@ -1374,76 +1396,76 @@ function qr(e = !0) {
|
|
|
1374
1396
|
return (n = t.current.find((r) => r != null && r.isConnected)) != null ? n : null;
|
|
1375
1397
|
});
|
|
1376
1398
|
}
|
|
1377
|
-
function
|
|
1378
|
-
let n = !!(e & 8), r =
|
|
1399
|
+
function zr(e, { ownerDocument: t }) {
|
|
1400
|
+
let n = !!(e & 8), r = Yr(n);
|
|
1379
1401
|
vt(() => {
|
|
1380
1402
|
n || (t == null ? void 0 : t.activeElement) === (t == null ? void 0 : t.body) && Q(r());
|
|
1381
|
-
}, [n]),
|
|
1403
|
+
}, [n]), Gt(() => {
|
|
1382
1404
|
n && Q(r());
|
|
1383
1405
|
});
|
|
1384
1406
|
}
|
|
1385
|
-
function
|
|
1386
|
-
let
|
|
1407
|
+
function Gr(e, { ownerDocument: t, container: n, initialFocus: r, initialFocusFallback: l }) {
|
|
1408
|
+
let o = O(null), a = fe(!!(e & 1), "focus-trap#initial-focus"), s = gt();
|
|
1387
1409
|
return vt(() => {
|
|
1388
1410
|
if (e === 0) return;
|
|
1389
|
-
if (!
|
|
1411
|
+
if (!a) {
|
|
1390
1412
|
l != null && l.current && Q(l.current);
|
|
1391
1413
|
return;
|
|
1392
1414
|
}
|
|
1393
1415
|
let i = n.current;
|
|
1394
1416
|
i && qe(() => {
|
|
1395
1417
|
if (!s.current) return;
|
|
1396
|
-
let
|
|
1418
|
+
let c = t == null ? void 0 : t.activeElement;
|
|
1397
1419
|
if (r != null && r.current) {
|
|
1398
|
-
if ((r == null ? void 0 : r.current) ===
|
|
1399
|
-
|
|
1420
|
+
if ((r == null ? void 0 : r.current) === c) {
|
|
1421
|
+
o.current = c;
|
|
1400
1422
|
return;
|
|
1401
1423
|
}
|
|
1402
|
-
} else if (i.contains(
|
|
1403
|
-
|
|
1424
|
+
} else if (i.contains(c)) {
|
|
1425
|
+
o.current = c;
|
|
1404
1426
|
return;
|
|
1405
1427
|
}
|
|
1406
1428
|
if (r != null && r.current) Q(r.current);
|
|
1407
1429
|
else {
|
|
1408
1430
|
if (e & 16) {
|
|
1409
|
-
if (Oe(i, J.First | J.AutoFocus) !==
|
|
1410
|
-
} else if (Oe(i, J.First) !==
|
|
1431
|
+
if (Oe(i, J.First | J.AutoFocus) !== at.Error) return;
|
|
1432
|
+
} else if (Oe(i, J.First) !== at.Error) return;
|
|
1411
1433
|
if (l != null && l.current && (Q(l.current), (t == null ? void 0 : t.activeElement) === l.current)) return;
|
|
1412
1434
|
console.warn("There are no focusable elements inside the <FocusTrap />");
|
|
1413
1435
|
}
|
|
1414
|
-
|
|
1436
|
+
o.current = t == null ? void 0 : t.activeElement;
|
|
1415
1437
|
});
|
|
1416
|
-
}, [l,
|
|
1438
|
+
}, [l, a, e]), o;
|
|
1417
1439
|
}
|
|
1418
|
-
function
|
|
1419
|
-
let
|
|
1420
|
-
|
|
1421
|
-
if (!
|
|
1422
|
-
let i =
|
|
1440
|
+
function Kr(e, { ownerDocument: t, container: n, containers: r, previousActiveElement: l }) {
|
|
1441
|
+
let o = gt(), a = !!(e & 4);
|
|
1442
|
+
zt(t == null ? void 0 : t.defaultView, "focus", (s) => {
|
|
1443
|
+
if (!a || !o.current) return;
|
|
1444
|
+
let i = nn(r);
|
|
1423
1445
|
n.current instanceof HTMLElement && i.add(n.current);
|
|
1424
|
-
let
|
|
1425
|
-
if (!
|
|
1446
|
+
let c = l.current;
|
|
1447
|
+
if (!c) return;
|
|
1426
1448
|
let f = s.target;
|
|
1427
|
-
f && f instanceof HTMLElement ?
|
|
1449
|
+
f && f instanceof HTMLElement ? rn(i, f) ? (l.current = f, Q(f)) : (s.preventDefault(), s.stopPropagation(), Q(c)) : Q(l.current);
|
|
1428
1450
|
}, !0);
|
|
1429
1451
|
}
|
|
1430
|
-
function
|
|
1452
|
+
function rn(e, t) {
|
|
1431
1453
|
for (let n of e) if (n.contains(t)) return !0;
|
|
1432
1454
|
return !1;
|
|
1433
1455
|
}
|
|
1434
|
-
function
|
|
1456
|
+
function ln(e) {
|
|
1435
1457
|
var t;
|
|
1436
|
-
return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || ((t = e.as) != null ? t :
|
|
1458
|
+
return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || ((t = e.as) != null ? t : an) !== G || E.Children.count(e.children) === 1;
|
|
1437
1459
|
}
|
|
1438
1460
|
let Ge = H(null);
|
|
1439
1461
|
Ge.displayName = "TransitionContext";
|
|
1440
|
-
var
|
|
1441
|
-
function
|
|
1462
|
+
var Zr = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(Zr || {});
|
|
1463
|
+
function Jr() {
|
|
1442
1464
|
let e = R(Ge);
|
|
1443
1465
|
if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
|
|
1444
1466
|
return e;
|
|
1445
1467
|
}
|
|
1446
|
-
function
|
|
1468
|
+
function Qr() {
|
|
1447
1469
|
let e = R(Ke);
|
|
1448
1470
|
if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
|
|
1449
1471
|
return e;
|
|
@@ -1453,104 +1475,104 @@ Ke.displayName = "NestingContext";
|
|
|
1453
1475
|
function Ze(e) {
|
|
1454
1476
|
return "children" in e ? Ze(e.children) : e.current.filter(({ el: t }) => t.current !== null).filter(({ state: t }) => t === "visible").length > 0;
|
|
1455
1477
|
}
|
|
1456
|
-
function
|
|
1457
|
-
let n = ue(e), r = O([]), l = gt(),
|
|
1478
|
+
function on(e, t) {
|
|
1479
|
+
let n = ue(e), r = O([]), l = gt(), o = pt(), a = L((w, d = te.Hidden) => {
|
|
1458
1480
|
let v = r.current.findIndex(({ el: u }) => u === w);
|
|
1459
|
-
v !== -1 && (ne(
|
|
1481
|
+
v !== -1 && (ne(d, { [te.Unmount]() {
|
|
1460
1482
|
r.current.splice(v, 1);
|
|
1461
1483
|
}, [te.Hidden]() {
|
|
1462
1484
|
r.current[v].state = "hidden";
|
|
1463
|
-
} }),
|
|
1485
|
+
} }), o.microTask(() => {
|
|
1464
1486
|
var u;
|
|
1465
1487
|
!Ze(r) && l.current && ((u = n.current) == null || u.call(n));
|
|
1466
1488
|
}));
|
|
1467
1489
|
}), s = L((w) => {
|
|
1468
|
-
let
|
|
1469
|
-
return
|
|
1470
|
-
}), i = O([]),
|
|
1471
|
-
i.current.splice(0), t && (t.chains.current[
|
|
1490
|
+
let d = r.current.find(({ el: v }) => v === w);
|
|
1491
|
+
return d ? d.state !== "visible" && (d.state = "visible") : r.current.push({ el: w, state: "visible" }), () => a(w, te.Unmount);
|
|
1492
|
+
}), i = O([]), c = O(Promise.resolve()), f = O({ enter: [], leave: [] }), x = L((w, d, v) => {
|
|
1493
|
+
i.current.splice(0), t && (t.chains.current[d] = t.chains.current[d].filter(([u]) => u !== w)), t == null || t.chains.current[d].push([w, new Promise((u) => {
|
|
1472
1494
|
i.current.push(u);
|
|
1473
|
-
})]), t == null || t.chains.current[
|
|
1474
|
-
Promise.all(f.current[
|
|
1475
|
-
})]),
|
|
1476
|
-
}), b = L((w,
|
|
1477
|
-
Promise.all(f.current[
|
|
1495
|
+
})]), t == null || t.chains.current[d].push([w, new Promise((u) => {
|
|
1496
|
+
Promise.all(f.current[d].map(([m, p]) => p)).then(() => u());
|
|
1497
|
+
})]), d === "enter" ? c.current = c.current.then(() => t == null ? void 0 : t.wait.current).then(() => v(d)) : v(d);
|
|
1498
|
+
}), b = L((w, d, v) => {
|
|
1499
|
+
Promise.all(f.current[d].splice(0).map(([u, m]) => m)).then(() => {
|
|
1478
1500
|
var u;
|
|
1479
1501
|
(u = i.current.shift()) == null || u();
|
|
1480
|
-
}).then(() => v(
|
|
1502
|
+
}).then(() => v(d));
|
|
1481
1503
|
});
|
|
1482
|
-
return C(() => ({ children: r, register: s, unregister:
|
|
1504
|
+
return C(() => ({ children: r, register: s, unregister: a, onStart: x, onStop: b, wait: c, chains: f }), [s, a, r, x, b, f, c]);
|
|
1483
1505
|
}
|
|
1484
|
-
let
|
|
1485
|
-
function
|
|
1506
|
+
let an = G, sn = Ue.RenderStrategy;
|
|
1507
|
+
function el(e, t) {
|
|
1486
1508
|
var n, r;
|
|
1487
|
-
let { transition: l = !0, beforeEnter:
|
|
1488
|
-
|
|
1509
|
+
let { transition: l = !0, beforeEnter: o, afterEnter: a, beforeLeave: s, afterLeave: i, enter: c, enterFrom: f, enterTo: x, entered: b, leave: w, leaveFrom: d, leaveTo: v, ...u } = e, [m, p] = S(null), g = O(null), y = ln(e), h = Z(...y ? [g, t, p] : t === null ? [] : [t]), $ = (n = u.unmount) == null || n ? te.Unmount : te.Hidden, { show: F, appear: j, initial: _ } = Jr(), [A, U] = S(F ? "visible" : "hidden"), B = Qr(), { register: X, unregister: P } = B;
|
|
1510
|
+
k(() => X(g), [X, g]), k(() => {
|
|
1489
1511
|
if ($ === te.Hidden && g.current) {
|
|
1490
|
-
if (F &&
|
|
1512
|
+
if (F && A !== "visible") {
|
|
1491
1513
|
U("visible");
|
|
1492
1514
|
return;
|
|
1493
1515
|
}
|
|
1494
|
-
return ne(
|
|
1516
|
+
return ne(A, { hidden: () => P(g), visible: () => X(g) });
|
|
1495
1517
|
}
|
|
1496
|
-
}, [
|
|
1518
|
+
}, [A, g, X, P, F, $]);
|
|
1497
1519
|
let V = Le();
|
|
1498
|
-
|
|
1499
|
-
if (
|
|
1500
|
-
}, [g,
|
|
1501
|
-
let Se = _ && !j, Fe = j && F && _, pe = O(!1), K =
|
|
1520
|
+
k(() => {
|
|
1521
|
+
if (y && V && A === "visible" && g.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
1522
|
+
}, [g, A, V, y]);
|
|
1523
|
+
let Se = _ && !j, Fe = j && F && _, pe = O(!1), K = on(() => {
|
|
1502
1524
|
pe.current || (U("hidden"), P(g));
|
|
1503
1525
|
}, B), Ce = L((Qe) => {
|
|
1504
1526
|
pe.current = !0;
|
|
1505
|
-
let
|
|
1506
|
-
K.onStart(g,
|
|
1507
|
-
ve === "enter" ?
|
|
1527
|
+
let Ae = Qe ? "enter" : "leave";
|
|
1528
|
+
K.onStart(g, Ae, (ve) => {
|
|
1529
|
+
ve === "enter" ? o == null || o() : ve === "leave" && (s == null || s());
|
|
1508
1530
|
});
|
|
1509
|
-
}),
|
|
1510
|
-
let
|
|
1511
|
-
pe.current = !1, K.onStop(g,
|
|
1512
|
-
ve === "enter" ?
|
|
1513
|
-
}),
|
|
1531
|
+
}), N = L((Qe) => {
|
|
1532
|
+
let Ae = Qe ? "enter" : "leave";
|
|
1533
|
+
pe.current = !1, K.onStop(g, Ae, (ve) => {
|
|
1534
|
+
ve === "enter" ? a == null || a() : ve === "leave" && (i == null || i());
|
|
1535
|
+
}), Ae === "leave" && !Ze(K) && (U("hidden"), P(g));
|
|
1514
1536
|
});
|
|
1515
1537
|
M(() => {
|
|
1516
|
-
|
|
1517
|
-
}, [F,
|
|
1518
|
-
let
|
|
1519
|
-
|
|
1520
|
-
let
|
|
1521
|
-
return E.createElement(Ke.Provider, { value: K }, E.createElement(
|
|
1538
|
+
y && l || (Ce(F), N(F));
|
|
1539
|
+
}, [F, y, l]);
|
|
1540
|
+
let Ne = !(!l || !y || !V || Se), [, I] = Er(Ne, m, F, { start: Ce, end: N }), fn = le({ ref: h, className: ((r = lt(u.className, Fe && c, Fe && f, I.enter && c, I.enter && I.closed && f, I.enter && !I.closed && x, I.leave && w, I.leave && !I.closed && d, I.leave && I.closed && v, !I.transition && F && b)) == null ? void 0 : r.trim()) || void 0, ...br(I) }), he = 0;
|
|
1541
|
+
A === "visible" && (he |= z.Open), A === "hidden" && (he |= z.Closed), I.enter && (he |= z.Opening), I.leave && (he |= z.Closing);
|
|
1542
|
+
let mn = W();
|
|
1543
|
+
return E.createElement(Ke.Provider, { value: K }, E.createElement(Pr, { value: he }, mn({ ourProps: fn, theirProps: u, defaultTag: an, features: sn, visible: A === "visible", name: "Transition.Child" })));
|
|
1522
1544
|
}
|
|
1523
|
-
function
|
|
1524
|
-
let { show: n, appear: r = !1, unmount: l = !0, ...
|
|
1545
|
+
function tl(e, t) {
|
|
1546
|
+
let { show: n, appear: r = !1, unmount: l = !0, ...o } = e, a = O(null), s = ln(e), i = Z(...s ? [a, t] : t === null ? [] : [t]);
|
|
1525
1547
|
Le();
|
|
1526
|
-
let
|
|
1527
|
-
if (n === void 0 &&
|
|
1528
|
-
let [f,
|
|
1529
|
-
n ||
|
|
1530
|
-
}), [w,
|
|
1531
|
-
|
|
1532
|
-
w !== !1 && v.current[v.current.length - 1] !== n && (v.current.push(n),
|
|
1548
|
+
let c = ze();
|
|
1549
|
+
if (n === void 0 && c !== null && (n = (c & z.Open) === z.Open), n === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
|
|
1550
|
+
let [f, x] = S(n ? "visible" : "hidden"), b = on(() => {
|
|
1551
|
+
n || x("hidden");
|
|
1552
|
+
}), [w, d] = S(!0), v = O([n]);
|
|
1553
|
+
k(() => {
|
|
1554
|
+
w !== !1 && v.current[v.current.length - 1] !== n && (v.current.push(n), d(!1));
|
|
1533
1555
|
}, [v, n]);
|
|
1534
1556
|
let u = C(() => ({ show: n, appear: r, initial: w }), [n, r, w]);
|
|
1535
|
-
|
|
1536
|
-
n ?
|
|
1557
|
+
k(() => {
|
|
1558
|
+
n ? x("visible") : !Ze(b) && a.current !== null && x("hidden");
|
|
1537
1559
|
}, [n, b]);
|
|
1538
1560
|
let m = { unmount: l }, p = L(() => {
|
|
1539
1561
|
var h;
|
|
1540
|
-
w &&
|
|
1562
|
+
w && d(!1), (h = e.beforeEnter) == null || h.call(e);
|
|
1541
1563
|
}), g = L(() => {
|
|
1542
1564
|
var h;
|
|
1543
|
-
w &&
|
|
1544
|
-
}),
|
|
1545
|
-
return E.createElement(Ke.Provider, { value: b }, E.createElement(Ge.Provider, { value: u },
|
|
1565
|
+
w && d(!1), (h = e.beforeLeave) == null || h.call(e);
|
|
1566
|
+
}), y = W();
|
|
1567
|
+
return E.createElement(Ke.Provider, { value: b }, E.createElement(Ge.Provider, { value: u }, y({ ourProps: { ...m, as: G, children: E.createElement(un, { ref: i, ...m, ...o, beforeEnter: p, beforeLeave: g }) }, theirProps: {}, defaultTag: G, features: sn, visible: f === "visible", name: "Transition" })));
|
|
1546
1568
|
}
|
|
1547
|
-
function
|
|
1569
|
+
function nl(e, t) {
|
|
1548
1570
|
let n = R(Ge) !== null, r = ze() !== null;
|
|
1549
|
-
return E.createElement(E.Fragment, null, !n && r ? E.createElement(ut, { ref: t, ...e }) : E.createElement(
|
|
1571
|
+
return E.createElement(E.Fragment, null, !n && r ? E.createElement(ut, { ref: t, ...e }) : E.createElement(un, { ref: t, ...e }));
|
|
1550
1572
|
}
|
|
1551
|
-
let ut = D(
|
|
1552
|
-
var
|
|
1553
|
-
let
|
|
1573
|
+
let ut = D(tl), un = D(el), me = D(nl), cn = Object.assign(ut, { Child: me, Root: ut });
|
|
1574
|
+
var rl = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(rl || {}), ll = ((e) => (e[e.SetTitleId = 0] = "SetTitleId", e))(ll || {});
|
|
1575
|
+
let il = { 0(e, t) {
|
|
1554
1576
|
return e.titleId === t.id ? e : { ...e, titleId: t.id };
|
|
1555
1577
|
} }, wt = H(null);
|
|
1556
1578
|
wt.displayName = "DialogContext";
|
|
@@ -1562,68 +1584,68 @@ function Je(e) {
|
|
|
1562
1584
|
}
|
|
1563
1585
|
return t;
|
|
1564
1586
|
}
|
|
1565
|
-
function
|
|
1566
|
-
return ne(t.type,
|
|
1587
|
+
function ol(e, t) {
|
|
1588
|
+
return ne(t.type, il, e, t);
|
|
1567
1589
|
}
|
|
1568
|
-
let
|
|
1569
|
-
let n = Pe(), { id: r = `headlessui-dialog-${n}`, open: l, onClose:
|
|
1590
|
+
let St = D(function(e, t) {
|
|
1591
|
+
let n = Pe(), { id: r = `headlessui-dialog-${n}`, open: l, onClose: o, initialFocus: a, role: s = "dialog", autoFocus: i = !0, __demoMode: c = !1, unmount: f = !1, ...x } = e, b = O(!1);
|
|
1570
1592
|
s = function() {
|
|
1571
1593
|
return s === "dialog" || s === "alertdialog" ? s : (b.current || (b.current = !0, console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog");
|
|
1572
1594
|
}();
|
|
1573
1595
|
let w = ze();
|
|
1574
1596
|
l === void 0 && w !== null && (l = (w & z.Open) === z.Open);
|
|
1575
|
-
let
|
|
1576
|
-
var
|
|
1577
|
-
return (
|
|
1578
|
-
} },
|
|
1579
|
-
|
|
1580
|
-
var
|
|
1581
|
-
return [(
|
|
1597
|
+
let d = O(null), v = Z(d, t), u = Me(d), m = l ? 0 : 1, [p, g] = yn(ol, { titleId: null, descriptionId: null, panelRef: bn() }), y = L(() => o(!1)), h = L((N) => g({ type: 0, id: N })), $ = Le() ? m === 0 : !1, [F, j] = Rr(), _ = { get current() {
|
|
1598
|
+
var N;
|
|
1599
|
+
return (N = p.panelRef.current) != null ? N : d.current;
|
|
1600
|
+
} }, A = tn(), { resolveContainers: U } = Wr({ mainTreeNode: A, portals: F, defaultContainers: [_] }), B = w !== null ? (w & z.Closing) === z.Closing : !1;
|
|
1601
|
+
Qn(c || B ? !1 : $, { allowed: L(() => {
|
|
1602
|
+
var N, Ne;
|
|
1603
|
+
return [(Ne = (N = d.current) == null ? void 0 : N.closest("[data-headlessui-portal]")) != null ? Ne : null];
|
|
1582
1604
|
}), disallowed: L(() => {
|
|
1583
|
-
var
|
|
1584
|
-
return [(
|
|
1585
|
-
}) }),
|
|
1586
|
-
|
|
1587
|
-
}),
|
|
1588
|
-
|
|
1589
|
-
}),
|
|
1590
|
-
let [X, P] =
|
|
1591
|
-
$ && !
|
|
1605
|
+
var N;
|
|
1606
|
+
return [(N = A == null ? void 0 : A.closest("body > *:not(#headlessui-portal-root)")) != null ? N : null];
|
|
1607
|
+
}) }), fr($, U, (N) => {
|
|
1608
|
+
N.preventDefault(), y();
|
|
1609
|
+
}), Ur($, u == null ? void 0 : u.defaultView, (N) => {
|
|
1610
|
+
N.preventDefault(), N.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), y();
|
|
1611
|
+
}), wr(c || B ? !1 : $, u, U), er($, d, y);
|
|
1612
|
+
let [X, P] = Xn(), V = C(() => [{ dialogState: m, close: y, setTitleId: h, unmount: f }, p], [m, p, y, h, f]), Se = C(() => ({ open: m === 0 }), [m]), Fe = { ref: v, id: r, role: s, tabIndex: -1, "aria-modal": c ? void 0 : m === 0 ? !0 : void 0, "aria-labelledby": p.titleId, "aria-describedby": X, unmount: f }, pe = !Hr(), K = ie.None;
|
|
1613
|
+
$ && !c && (K |= ie.RestoreFocus, K |= ie.TabLock, i && (K |= ie.AutoFocus), pe && (K |= ie.InitialFocus));
|
|
1592
1614
|
let Ce = W();
|
|
1593
|
-
return E.createElement(
|
|
1594
|
-
}), al = "div",
|
|
1595
|
-
function
|
|
1596
|
-
let { transition: n = !1, open: r, ...l } = e,
|
|
1597
|
-
if (!
|
|
1598
|
-
if (!
|
|
1615
|
+
return E.createElement(Mr, null, E.createElement(Mt, { force: !0 }, E.createElement(jr, null, E.createElement(wt.Provider, { value: V }, E.createElement(Qt, { target: d }, E.createElement(Mt, { force: !1 }, E.createElement(P, { slot: Se }, E.createElement(j, null, E.createElement(qr, { initialFocus: a, initialFocusFallback: d, containers: U, features: K }, E.createElement(Kn, { value: y }, Ce({ ourProps: Fe, theirProps: x, slot: Se, defaultTag: al, features: sl, visible: m === 0, name: "Dialog" })))))))))));
|
|
1616
|
+
}), al = "div", sl = Ue.RenderStrategy | Ue.Static;
|
|
1617
|
+
function ul(e, t) {
|
|
1618
|
+
let { transition: n = !1, open: r, ...l } = e, o = ze(), a = e.hasOwnProperty("open") || o !== null, s = e.hasOwnProperty("onClose");
|
|
1619
|
+
if (!a && !s) throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");
|
|
1620
|
+
if (!a) throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");
|
|
1599
1621
|
if (!s) throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");
|
|
1600
|
-
if (!
|
|
1622
|
+
if (!o && typeof e.open != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);
|
|
1601
1623
|
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}`);
|
|
1602
|
-
return (r !== void 0 || n) && !l.static ? E.createElement(
|
|
1624
|
+
return (r !== void 0 || n) && !l.static ? E.createElement(Lt, null, E.createElement(cn, { show: r, transition: n, unmount: l.unmount }, E.createElement(St, { ref: t, ...l }))) : E.createElement(Lt, null, E.createElement(St, { ref: t, open: r, ...l }));
|
|
1603
1625
|
}
|
|
1604
|
-
let
|
|
1626
|
+
let cl = "div";
|
|
1605
1627
|
function dl(e, t) {
|
|
1606
|
-
let n = Pe(), { id: r = `headlessui-dialog-panel-${n}`, transition: l = !1, ...
|
|
1628
|
+
let n = Pe(), { id: r = `headlessui-dialog-panel-${n}`, transition: l = !1, ...o } = e, [{ dialogState: a, unmount: s }, i] = Je("Dialog.Panel"), c = Z(t, i.panelRef), f = C(() => ({ open: a === 0 }), [a]), x = L((u) => {
|
|
1607
1629
|
u.stopPropagation();
|
|
1608
|
-
}), b = { ref:
|
|
1609
|
-
return E.createElement(w, { ...
|
|
1610
|
-
}
|
|
1611
|
-
let
|
|
1612
|
-
function
|
|
1613
|
-
let { transition: n = !1, ...r } = e, [{ dialogState: l, unmount:
|
|
1614
|
-
return E.createElement(i, { ...
|
|
1615
|
-
}
|
|
1616
|
-
let
|
|
1617
|
-
function
|
|
1618
|
-
let n = Pe(), { id: r = `headlessui-dialog-title-${n}`, ...l } = e, [{ dialogState:
|
|
1619
|
-
M(() => (
|
|
1620
|
-
let i = C(() => ({ open:
|
|
1621
|
-
return W()({ ourProps:
|
|
1622
|
-
}
|
|
1623
|
-
let
|
|
1624
|
-
D(
|
|
1625
|
-
let
|
|
1626
|
-
function
|
|
1630
|
+
}), b = { ref: c, id: r, onClick: x }, w = l ? me : G, d = l ? { unmount: s } : {}, v = W();
|
|
1631
|
+
return E.createElement(w, { ...d }, v({ ourProps: b, theirProps: o, slot: f, defaultTag: cl, name: "Dialog.Panel" }));
|
|
1632
|
+
}
|
|
1633
|
+
let fl = "div";
|
|
1634
|
+
function ml(e, t) {
|
|
1635
|
+
let { transition: n = !1, ...r } = e, [{ dialogState: l, unmount: o }] = Je("Dialog.Backdrop"), a = C(() => ({ open: l === 0 }), [l]), s = { ref: t, "aria-hidden": !0 }, i = n ? me : G, c = n ? { unmount: o } : {}, f = W();
|
|
1636
|
+
return E.createElement(i, { ...c }, f({ ourProps: s, theirProps: r, slot: a, defaultTag: fl, name: "Dialog.Backdrop" }));
|
|
1637
|
+
}
|
|
1638
|
+
let pl = "h2";
|
|
1639
|
+
function hl(e, t) {
|
|
1640
|
+
let n = Pe(), { id: r = `headlessui-dialog-title-${n}`, ...l } = e, [{ dialogState: o, setTitleId: a }] = Je("Dialog.Title"), s = Z(t);
|
|
1641
|
+
M(() => (a(r), () => a(null)), [r, a]);
|
|
1642
|
+
let i = C(() => ({ open: o === 0 }), [o]), c = { ref: s, id: r };
|
|
1643
|
+
return W()({ ourProps: c, theirProps: l, slot: i, defaultTag: pl, name: "Dialog.Title" });
|
|
1644
|
+
}
|
|
1645
|
+
let vl = D(ul), xt = D(dl);
|
|
1646
|
+
D(ml);
|
|
1647
|
+
let gl = D(hl), wl = Object.assign(vl, { Panel: xt, Title: gl, Description: zn });
|
|
1648
|
+
function dn({ onClick: e }) {
|
|
1627
1649
|
return /* @__PURE__ */ se(
|
|
1628
1650
|
"button",
|
|
1629
1651
|
{
|
|
@@ -1656,7 +1678,7 @@ function un({ onClick: e }) {
|
|
|
1656
1678
|
}
|
|
1657
1679
|
);
|
|
1658
1680
|
}
|
|
1659
|
-
const
|
|
1681
|
+
const xl = ({ modalContext: e, config: t, children: n }) => {
|
|
1660
1682
|
const [r, l] = S(!1);
|
|
1661
1683
|
return /* @__PURE__ */ T("div", { className: "im-modal-container fixed inset-0 z-40 overflow-y-auto p-4", children: /* @__PURE__ */ T(
|
|
1662
1684
|
"div",
|
|
@@ -1689,12 +1711,12 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
|
|
|
1689
1711
|
"sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": t.maxWidth === "7xl"
|
|
1690
1712
|
}),
|
|
1691
1713
|
children: /* @__PURE__ */ se(
|
|
1692
|
-
|
|
1714
|
+
xt,
|
|
1693
1715
|
{
|
|
1694
1716
|
className: `im-modal-content relative ${t.paddingClasses} ${t.panelClasses}`,
|
|
1695
1717
|
"data-inertiaui-modal-entered": r,
|
|
1696
1718
|
children: [
|
|
1697
|
-
t.closeButton && /* @__PURE__ */ T("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ T(
|
|
1719
|
+
t.closeButton && /* @__PURE__ */ T("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ T(dn, { onClick: e.close }) }),
|
|
1698
1720
|
typeof n == "function" ? n({ modalContext: e, config: t }) : n
|
|
1699
1721
|
]
|
|
1700
1722
|
}
|
|
@@ -1735,12 +1757,12 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
|
|
|
1735
1757
|
"sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": t.maxWidth === "7xl"
|
|
1736
1758
|
}),
|
|
1737
1759
|
children: /* @__PURE__ */ se(
|
|
1738
|
-
|
|
1760
|
+
xt,
|
|
1739
1761
|
{
|
|
1740
1762
|
className: `im-slideover-content relative ${t.paddingClasses} ${t.panelClasses}`,
|
|
1741
1763
|
"data-inertiaui-modal-entered": r,
|
|
1742
1764
|
children: [
|
|
1743
|
-
t.closeButton && /* @__PURE__ */ T("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ T(
|
|
1765
|
+
t.closeButton && /* @__PURE__ */ T("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ T(dn, { onClick: e.close }) }),
|
|
1744
1766
|
typeof n == "function" ? n({ modalContext: e, config: t }) : n
|
|
1745
1767
|
]
|
|
1746
1768
|
}
|
|
@@ -1749,41 +1771,41 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
|
|
|
1749
1771
|
)
|
|
1750
1772
|
}
|
|
1751
1773
|
) });
|
|
1752
|
-
},
|
|
1753
|
-
const
|
|
1754
|
-
return
|
|
1755
|
-
|
|
1774
|
+
}, bl = ct(({ name: e, children: t, onFocus: n = null, onBlur: r = null, onClose: l = null, onSuccess: o = null, onAfterLeave: a = null, ...s }, i) => {
|
|
1775
|
+
const c = (x) => typeof t == "function" ? t(x) : t, f = O(null);
|
|
1776
|
+
return Ft(i, () => f.current, [f]), /* @__PURE__ */ T(
|
|
1777
|
+
Dt,
|
|
1756
1778
|
{
|
|
1757
1779
|
ref: f,
|
|
1758
1780
|
name: e,
|
|
1759
1781
|
onFocus: n,
|
|
1760
1782
|
onBlur: r,
|
|
1761
1783
|
onClose: l,
|
|
1762
|
-
onSuccess:
|
|
1784
|
+
onSuccess: o,
|
|
1763
1785
|
...s,
|
|
1764
1786
|
children: ({
|
|
1765
|
-
afterLeave:
|
|
1787
|
+
afterLeave: x,
|
|
1766
1788
|
close: b,
|
|
1767
1789
|
config: w,
|
|
1768
|
-
emit:
|
|
1790
|
+
emit: d,
|
|
1769
1791
|
getChildModal: v,
|
|
1770
1792
|
getParentModal: u,
|
|
1771
1793
|
id: m,
|
|
1772
1794
|
index: p,
|
|
1773
1795
|
isOpen: g,
|
|
1774
|
-
modalContext:
|
|
1796
|
+
modalContext: y,
|
|
1775
1797
|
onTopOfStack: h,
|
|
1776
1798
|
reload: $,
|
|
1777
1799
|
setOpen: F,
|
|
1778
1800
|
shouldRender: j
|
|
1779
1801
|
}) => /* @__PURE__ */ T(
|
|
1780
|
-
|
|
1802
|
+
cn,
|
|
1781
1803
|
{
|
|
1782
1804
|
appear: !0,
|
|
1783
1805
|
show: g ?? !1,
|
|
1784
|
-
afterLeave:
|
|
1806
|
+
afterLeave: a,
|
|
1785
1807
|
children: /* @__PURE__ */ se(
|
|
1786
|
-
|
|
1808
|
+
wl,
|
|
1787
1809
|
{
|
|
1788
1810
|
as: "div",
|
|
1789
1811
|
className: "im-dialog relative z-20",
|
|
@@ -1813,19 +1835,19 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
|
|
|
1813
1835
|
w.slideover ? /* @__PURE__ */ T(
|
|
1814
1836
|
yl,
|
|
1815
1837
|
{
|
|
1816
|
-
modalContext:
|
|
1838
|
+
modalContext: y,
|
|
1817
1839
|
config: w,
|
|
1818
|
-
children:
|
|
1819
|
-
afterLeave:
|
|
1840
|
+
children: c({
|
|
1841
|
+
afterLeave: x,
|
|
1820
1842
|
close: b,
|
|
1821
1843
|
config: w,
|
|
1822
|
-
emit:
|
|
1844
|
+
emit: d,
|
|
1823
1845
|
getChildModal: v,
|
|
1824
1846
|
getParentModal: u,
|
|
1825
1847
|
id: m,
|
|
1826
1848
|
index: p,
|
|
1827
1849
|
isOpen: g,
|
|
1828
|
-
modalContext:
|
|
1850
|
+
modalContext: y,
|
|
1829
1851
|
onTopOfStack: h,
|
|
1830
1852
|
reload: $,
|
|
1831
1853
|
setOpen: F,
|
|
@@ -1833,21 +1855,21 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
|
|
|
1833
1855
|
})
|
|
1834
1856
|
}
|
|
1835
1857
|
) : /* @__PURE__ */ T(
|
|
1836
|
-
|
|
1858
|
+
xl,
|
|
1837
1859
|
{
|
|
1838
|
-
modalContext:
|
|
1860
|
+
modalContext: y,
|
|
1839
1861
|
config: w,
|
|
1840
|
-
children:
|
|
1841
|
-
afterLeave:
|
|
1862
|
+
children: c({
|
|
1863
|
+
afterLeave: x,
|
|
1842
1864
|
close: b,
|
|
1843
1865
|
config: w,
|
|
1844
|
-
emit:
|
|
1866
|
+
emit: d,
|
|
1845
1867
|
getChildModal: v,
|
|
1846
1868
|
getParentModal: u,
|
|
1847
1869
|
id: m,
|
|
1848
1870
|
index: p,
|
|
1849
1871
|
isOpen: g,
|
|
1850
|
-
modalContext:
|
|
1872
|
+
modalContext: y,
|
|
1851
1873
|
onTopOfStack: h,
|
|
1852
1874
|
reload: $,
|
|
1853
1875
|
setOpen: F,
|
|
@@ -1863,56 +1885,56 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
|
|
|
1863
1885
|
}
|
|
1864
1886
|
);
|
|
1865
1887
|
});
|
|
1866
|
-
|
|
1867
|
-
const
|
|
1888
|
+
bl.displayName = "Modal";
|
|
1889
|
+
const kl = ({
|
|
1868
1890
|
href: e,
|
|
1869
1891
|
method: t = "get",
|
|
1870
1892
|
data: n = {},
|
|
1871
1893
|
as: r = "a",
|
|
1872
1894
|
headers: l = {},
|
|
1873
|
-
queryStringArrayFormat:
|
|
1874
|
-
onAfterLeave:
|
|
1895
|
+
queryStringArrayFormat: o = "brackets",
|
|
1896
|
+
onAfterLeave: a = null,
|
|
1875
1897
|
onBlur: s = null,
|
|
1876
1898
|
onClose: i = null,
|
|
1877
|
-
onError:
|
|
1899
|
+
onError: c = null,
|
|
1878
1900
|
onFocus: f = null,
|
|
1879
|
-
onStart:
|
|
1901
|
+
onStart: x = null,
|
|
1880
1902
|
onSuccess: b = null,
|
|
1881
1903
|
navigate: w = null,
|
|
1882
|
-
children:
|
|
1904
|
+
children: d,
|
|
1883
1905
|
...v
|
|
1884
1906
|
}) => {
|
|
1885
|
-
const [u, m] = S(!1), [p, g] = S(null), { stack:
|
|
1907
|
+
const [u, m] = S(!1), [p, g] = S(null), { stack: y, visit: h } = Xe(), $ = C(() => w ?? ft("navigate"), [w]), F = {}, j = {};
|
|
1886
1908
|
Object.keys(v).forEach((P) => {
|
|
1887
|
-
|
|
1909
|
+
bt.includes(P) || (P.startsWith("on") && typeof v[P] == "function" ? P.toLowerCase() in window ? F[P] = v[P] : j[P] = v[P] : F[P] = v[P]);
|
|
1888
1910
|
});
|
|
1889
|
-
const [_,
|
|
1911
|
+
const [_, A] = S(!1);
|
|
1890
1912
|
M(() => {
|
|
1891
|
-
p && (p.onTopOfStack && _ ? f == null || f() : !p.onTopOfStack && !_ && (s == null || s()),
|
|
1892
|
-
}, [
|
|
1913
|
+
p && (p.onTopOfStack && _ ? f == null || f() : !p.onTopOfStack && !_ && (s == null || s()), A(!p.onTopOfStack));
|
|
1914
|
+
}, [y]);
|
|
1893
1915
|
const U = Y(() => {
|
|
1894
1916
|
i == null || i();
|
|
1895
1917
|
}, [i]), B = Y(() => {
|
|
1896
|
-
g(null),
|
|
1897
|
-
}, [
|
|
1918
|
+
g(null), a == null || a();
|
|
1919
|
+
}, [a]), X = Y(
|
|
1898
1920
|
(P) => {
|
|
1899
|
-
P == null || P.preventDefault(), !u && (e.startsWith("#") || (m(!0),
|
|
1921
|
+
P == null || P.preventDefault(), !u && (e.startsWith("#") || (m(!0), x == null || x()), h(
|
|
1900
1922
|
e,
|
|
1901
1923
|
t,
|
|
1902
1924
|
n,
|
|
1903
1925
|
l,
|
|
1904
|
-
|
|
1905
|
-
() => U(
|
|
1926
|
+
Mn(Nt(v, bt)),
|
|
1927
|
+
() => U(y.length),
|
|
1906
1928
|
B,
|
|
1907
|
-
|
|
1929
|
+
o,
|
|
1908
1930
|
$
|
|
1909
1931
|
).then((V) => {
|
|
1910
1932
|
g(V), V.registerEventListenersFromProps(j), b == null || b();
|
|
1911
1933
|
}).catch((V) => {
|
|
1912
|
-
console.error(V),
|
|
1934
|
+
console.error(V), c == null || c(V);
|
|
1913
1935
|
}).finally(() => m(!1)));
|
|
1914
1936
|
},
|
|
1915
|
-
[e, t, n, l,
|
|
1937
|
+
[e, t, n, l, o, v, U, B]
|
|
1916
1938
|
);
|
|
1917
1939
|
return /* @__PURE__ */ T(
|
|
1918
1940
|
r,
|
|
@@ -1920,27 +1942,27 @@ const Nl = ({
|
|
|
1920
1942
|
...F,
|
|
1921
1943
|
href: e,
|
|
1922
1944
|
onClick: X,
|
|
1923
|
-
children: typeof
|
|
1945
|
+
children: typeof d == "function" ? d({ loading: u }) : d
|
|
1924
1946
|
}
|
|
1925
1947
|
);
|
|
1926
1948
|
};
|
|
1927
|
-
function
|
|
1928
|
-
return Xe().stack[
|
|
1949
|
+
function Il() {
|
|
1950
|
+
return Xe().stack[It()] ?? null;
|
|
1929
1951
|
}
|
|
1930
|
-
const
|
|
1952
|
+
const Rl = (e) => (t) => (t.default.layout = (n) => Re(e, {}, n), t);
|
|
1931
1953
|
export {
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1954
|
+
Dt as HeadlessModal,
|
|
1955
|
+
bl as Modal,
|
|
1956
|
+
kl as ModalLink,
|
|
1957
|
+
Cn as ModalRoot,
|
|
1958
|
+
Sn as ModalStackProvider,
|
|
1937
1959
|
ft as getConfig,
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1960
|
+
Fn as initFromPageProps,
|
|
1961
|
+
Fl as putConfig,
|
|
1962
|
+
Cl as renderApp,
|
|
1963
|
+
Sl as resetConfig,
|
|
1964
|
+
Rl as setPageLayout,
|
|
1965
|
+
Il as useModal,
|
|
1966
|
+
It as useModalIndex,
|
|
1945
1967
|
Xe as useModalStack
|
|
1946
1968
|
};
|