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