zudoku 0.13.2 → 0.13.3
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/config/validators/InputSidebarSchema.d.ts +19 -4
- package/dist/config/validators/InputSidebarSchema.js +7 -28
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/SidebarSchema.js +5 -6
- package/dist/config/validators/SidebarSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +6 -6
- package/dist/lib/components/MobileTopNavigation.js +1 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.js +1 -1
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +18 -7
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +12 -5
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +1 -0
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/vite/plugin-mdx.js +17 -0
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/lib/{AuthenticationPlugin-CbgJ5SAh.js → AuthenticationPlugin-D1nhROkO.js} +3 -3
- package/lib/{AuthenticationPlugin-CbgJ5SAh.js.map → AuthenticationPlugin-D1nhROkO.js.map} +1 -1
- package/lib/{CategoryHeading-3Qtp2yZ8.js → CategoryHeading-B7TlPvuN.js} +2 -2
- package/lib/{CategoryHeading-3Qtp2yZ8.js.map → CategoryHeading-B7TlPvuN.js.map} +1 -1
- package/lib/{DeveloperHint-BE9DzNhv.js → DeveloperHint-B_QCCafl.js} +2 -2
- package/lib/{DeveloperHint-BE9DzNhv.js.map → DeveloperHint-B_QCCafl.js.map} +1 -1
- package/lib/{ErrorPage-B0COs372.js → ErrorPage-DqqAV1dr.js} +3 -3
- package/lib/{ErrorPage-B0COs372.js.map → ErrorPage-DqqAV1dr.js.map} +1 -1
- package/lib/{Input-CHfE_2Qk.js → Input-a9rLgbP_.js} +4 -4
- package/lib/{Input-CHfE_2Qk.js.map → Input-a9rLgbP_.js.map} +1 -1
- package/lib/{Markdown-CWI6lU11.js → Markdown-Y__eLG0x.js} +2 -2
- package/lib/{Markdown-CWI6lU11.js.map → Markdown-Y__eLG0x.js.map} +1 -1
- package/lib/{MdxPage-C3tlrV4j.js → MdxPage-B4FcPIi5.js} +6 -6
- package/lib/MdxPage-B4FcPIi5.js.map +1 -0
- package/lib/{OperationList-BO-ES1C5.js → OperationList-BhLMwPSh.js} +8 -8
- package/lib/{OperationList-BO-ES1C5.js.map → OperationList-BhLMwPSh.js.map} +1 -1
- package/lib/{Route-Dq6zv0Pi.js → Route-fK1i4Ryz.js} +3 -3
- package/lib/{Route-Dq6zv0Pi.js.map → Route-fK1i4Ryz.js.map} +1 -1
- package/lib/{SidebarBadge-DmI5hT04.js → SidebarBadge-BdzN0ZBK.js} +3 -3
- package/lib/{SidebarBadge-DmI5hT04.js.map → SidebarBadge-BdzN0ZBK.js.map} +1 -1
- package/lib/{SlotletProvider-RvaeLR6z.js → SlotletProvider-DmqWiVFt.js} +7 -7
- package/lib/{SlotletProvider-RvaeLR6z.js.map → SlotletProvider-DmqWiVFt.js.map} +1 -1
- package/lib/{ZudokuContext-BEmsYQoq.js → ZudokuContext-MRoel6bS.js} +2 -2
- package/lib/{ZudokuContext-BEmsYQoq.js.map → ZudokuContext-MRoel6bS.js.map} +1 -1
- package/lib/{index-Dvh1BL_e.js → index-BijFM__9.js} +3 -3
- package/lib/{index-Dvh1BL_e.js.map → index-BijFM__9.js.map} +1 -1
- package/lib/{index-BRCiYFaL.js → index-DFN92YJN.js} +3 -2
- package/lib/{index-BRCiYFaL.js.map → index-DFN92YJN.js.map} +1 -1
- package/lib/{index-Do_BBSIs.js → index-_GxJ8hpM.js} +3 -3
- package/lib/{index-Do_BBSIs.js.map → index-_GxJ8hpM.js.map} +1 -1
- package/lib/{index-DNfiZTPV.js → index-dHVZhVNO.js} +102 -101
- package/lib/index-dHVZhVNO.js.map +1 -0
- package/lib/{router-Oe6YmY6B.js → router-BsfSoK2j.js} +3 -3
- package/lib/{router-Oe6YmY6B.js.map → router-BsfSoK2j.js.map} +1 -1
- package/lib/{useExposedProps-Csw8oAlt.js → useExposedProps-BWwxa-Hg.js} +2 -2
- package/lib/{useExposedProps-Csw8oAlt.js.map → useExposedProps-BWwxa-Hg.js.map} +1 -1
- package/lib/{utils-Chi3p5nE.js → utils-C8S3st2k.js} +3 -3
- package/lib/{utils-Chi3p5nE.js.map → utils-C8S3st2k.js.map} +1 -1
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +5 -5
- package/lib/zudoku.components.js +661 -654
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +7 -7
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +7 -7
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/package.json +1 -1
- package/src/app/main.css +0 -1
- package/src/lib/components/MobileTopNavigation.tsx +1 -1
- package/src/lib/components/navigation/Sidebar.tsx +1 -1
- package/src/lib/components/navigation/SidebarCategory.tsx +34 -26
- package/src/lib/components/navigation/SidebarItem.tsx +16 -17
- package/src/lib/plugins/markdown/MdxPage.tsx +10 -8
- package/src/lib/plugins/openapi/playground/Playground.tsx +1 -0
- package/lib/MdxPage-C3tlrV4j.js.map +0 -1
- package/lib/index-DNfiZTPV.js.map +0 -1
package/lib/zudoku.components.js
CHANGED
|
@@ -13,30 +13,30 @@ var ut = (e, t, n, r) => ({
|
|
|
13
13
|
return w(e, t, r);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { c as On, H as
|
|
17
|
-
import { e as Qa, f as Va, R as Ga, N as Ze, L as
|
|
18
|
-
import { E as An, S as xe, a as
|
|
16
|
+
import { c as On, H as At, M as Ua, d as za, A as Ka, b as qa } from "./utils-C8S3st2k.js";
|
|
17
|
+
import { e as Qa, f as Va, R as Ga, N as Ze, L as kt, g as Wa, O as In, h as Ya, b as Xa, u as $t } from "./index-DFN92YJN.js";
|
|
18
|
+
import { E as An, S as xe, a as Ja, R as Za } from "./SlotletProvider-DmqWiVFt.js";
|
|
19
19
|
import { j as a } from "./jsx-runtime-B6kdoens.js";
|
|
20
|
-
import { M as
|
|
21
|
-
import { a as
|
|
20
|
+
import { M as eo, f as to, c as kn, p as $n, A as no, d as rt, j as ro, b as I, k as ao, F as oo, D as so, C as io, P as Ke, i as Ft, q as lo, s as Fn, R as co, S as uo, t as fo, h as ho, r as Ln, m as po, a as gt, u as Bn, V as Hn, n as pn, B as jt } from "./index-_GxJ8hpM.js";
|
|
21
|
+
import { a as F, c as Un, b as mo, T as go, d as vo, V as wo, u as Lt, e as xo, C as yo } from "./Markdown-Y__eLG0x.js";
|
|
22
22
|
import * as h from "react";
|
|
23
|
-
import p, { StrictMode as zn, createContext as Kn, Component as
|
|
24
|
-
import { a as
|
|
25
|
-
import { B as
|
|
26
|
-
import { a as
|
|
27
|
-
import { S as Gn, f as Wn, Q as
|
|
28
|
-
import { j as
|
|
29
|
-
import { ChevronRightIcon as Xn, CheckIcon as
|
|
30
|
-
import { c as Jn, P as
|
|
31
|
-
import { S as
|
|
32
|
-
function
|
|
23
|
+
import p, { StrictMode as zn, createContext as Kn, Component as bo, createElement as mn, isValidElement as So, useState as Ie, useMemo as mt, useLayoutEffect as Co, useEffect as Ce, useCallback as qn, Suspense as Qn, memo as Vn, useContext as Mo, Fragment as Ro, useRef as Bt, forwardRef as Eo } from "react";
|
|
24
|
+
import { a as Ht } from "./index-DJqnphbT.js";
|
|
25
|
+
import { B as Do } from "./router-BsfSoK2j.js";
|
|
26
|
+
import { a as Nt, R as Po, T as jo, C as No } from "./index-BijFM__9.js";
|
|
27
|
+
import { S as Gn, f as Wn, Q as To, n as se, m as gn, g as vn, i as be, j as _o, k as Oo, l as Io, o as Ao, p as wn, r as xn, q as ko, h as yn, t as bn, v as $o, u as qe, b as Fo, Z as Lo, w as Bo, c as Yn, x as Ho } from "./ZudokuContext-MRoel6bS.js";
|
|
28
|
+
import { j as vt } from "./joinPath-B7kNnUX4.js";
|
|
29
|
+
import { ChevronRightIcon as Xn, CheckIcon as Uo, DotIcon as zo, CircleXIcon as Ko, SearchIcon as qo, MenuIcon as Qo, MoonStarIcon as Vo, SunIcon as Go, ExternalLinkIcon as Wo, PanelLeftIcon as Yo } from "lucide-react";
|
|
30
|
+
import { c as Jn, P as yt, R as Xo, I as Jo, O as Zo, C as es, T as ts, a as ns, b as rs, D as as, d as os, e as ss, S as Ct } from "./SidebarBadge-BdzN0ZBK.js";
|
|
31
|
+
import { S as is } from "./Spinner-3cQDBVGr.js";
|
|
32
|
+
function ls({ error: e }) {
|
|
33
33
|
return /* @__PURE__ */ a.jsx(An, { error: e });
|
|
34
34
|
}
|
|
35
35
|
var at = {};
|
|
36
|
-
const
|
|
36
|
+
const cs = /* @__PURE__ */ Ht(Do), us = /* @__PURE__ */ Ht(Qa), ds = /* @__PURE__ */ Ht(Va);
|
|
37
37
|
Object.defineProperty(at, "__esModule", { value: !0 });
|
|
38
|
-
var
|
|
39
|
-
function
|
|
38
|
+
var fs = p, we = cs, Ut = us, Se = ds;
|
|
39
|
+
function hs(e) {
|
|
40
40
|
if (e && e.__esModule) return e;
|
|
41
41
|
var t = /* @__PURE__ */ Object.create(null);
|
|
42
42
|
return e && Object.keys(e).forEach(function(n) {
|
|
@@ -51,8 +51,8 @@ function fs(e) {
|
|
|
51
51
|
}
|
|
52
52
|
}), t.default = e, Object.freeze(t);
|
|
53
53
|
}
|
|
54
|
-
var ge = /* @__PURE__ */ fs
|
|
55
|
-
function
|
|
54
|
+
var ge = /* @__PURE__ */ hs(fs);
|
|
55
|
+
function ps({
|
|
56
56
|
basename: e,
|
|
57
57
|
children: t,
|
|
58
58
|
location: n = "/",
|
|
@@ -76,7 +76,7 @@ function hs({
|
|
|
76
76
|
static: !0
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function ms({
|
|
80
80
|
context: e,
|
|
81
81
|
router: t,
|
|
82
82
|
hydrate: n = !0,
|
|
@@ -94,9 +94,9 @@ function ps({
|
|
|
94
94
|
let u = {
|
|
95
95
|
loaderData: e.loaderData,
|
|
96
96
|
actionData: e.actionData,
|
|
97
|
-
errors:
|
|
97
|
+
errors: vs(e.errors)
|
|
98
98
|
};
|
|
99
|
-
i = `window.__staticRouterHydrationData = JSON.parse(${
|
|
99
|
+
i = `window.__staticRouterHydrationData = JSON.parse(${Cs(JSON.stringify(JSON.stringify(u)))});`;
|
|
100
100
|
}
|
|
101
101
|
let {
|
|
102
102
|
state: l
|
|
@@ -120,7 +120,7 @@ function ps({
|
|
|
120
120
|
future: {
|
|
121
121
|
v7_relativeSplatPath: t.future.v7_relativeSplatPath
|
|
122
122
|
}
|
|
123
|
-
}, /* @__PURE__ */ ge.createElement(
|
|
123
|
+
}, /* @__PURE__ */ ge.createElement(gs, {
|
|
124
124
|
routes: t.routes,
|
|
125
125
|
future: t.future,
|
|
126
126
|
state: l
|
|
@@ -132,14 +132,14 @@ function ps({
|
|
|
132
132
|
}
|
|
133
133
|
}) : null);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function gs({
|
|
136
136
|
routes: e,
|
|
137
137
|
future: t,
|
|
138
138
|
state: n
|
|
139
139
|
}) {
|
|
140
140
|
return Ut.UNSAFE_useRoutesImpl(e, void 0, n, t);
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function vs(e) {
|
|
143
143
|
if (!e) return null;
|
|
144
144
|
let t = Object.entries(e), n = {};
|
|
145
145
|
for (let [r, o] of t)
|
|
@@ -178,13 +178,13 @@ function Zn() {
|
|
|
178
178
|
}
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function ws(e, t) {
|
|
182
182
|
return we.createStaticHandler(e, {
|
|
183
183
|
...t,
|
|
184
184
|
mapRouteProperties: Ut.UNSAFE_mapRouteProperties
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function xs(e, t, n = {}) {
|
|
188
188
|
let r = {}, o = we.UNSAFE_convertRoutesToDataRoutes(e, Ut.UNSAFE_mapRouteProperties, void 0, r), s = t.matches.map((l) => {
|
|
189
189
|
let u = r[l.route.id] || l.route;
|
|
190
190
|
return {
|
|
@@ -280,36 +280,36 @@ function er(e) {
|
|
|
280
280
|
function tr(e) {
|
|
281
281
|
let t = typeof e == "string" ? e : Se.createPath(e);
|
|
282
282
|
t = t.replace(/ $/, "%20");
|
|
283
|
-
let n =
|
|
283
|
+
let n = ys.test(t) ? new URL(t) : new URL(t, "http://localhost");
|
|
284
284
|
return {
|
|
285
285
|
pathname: n.pathname,
|
|
286
286
|
search: n.search,
|
|
287
287
|
hash: n.hash
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
const
|
|
290
|
+
const ys = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, bs = {
|
|
291
291
|
"&": "\\u0026",
|
|
292
292
|
">": "\\u003e",
|
|
293
293
|
"<": "\\u003c",
|
|
294
294
|
"\u2028": "\\u2028",
|
|
295
295
|
"\u2029": "\\u2029"
|
|
296
|
-
},
|
|
297
|
-
function
|
|
298
|
-
return e.replace(
|
|
299
|
-
}
|
|
300
|
-
at.StaticRouter =
|
|
301
|
-
var
|
|
302
|
-
at.createStaticHandler =
|
|
303
|
-
at.createStaticRouter =
|
|
304
|
-
const
|
|
296
|
+
}, Ss = /[&><\u2028\u2029]/g;
|
|
297
|
+
function Cs(e) {
|
|
298
|
+
return e.replace(Ss, (t) => bs[t]);
|
|
299
|
+
}
|
|
300
|
+
at.StaticRouter = ps;
|
|
301
|
+
var Ms = at.StaticRouterProvider = ms;
|
|
302
|
+
at.createStaticHandler = ws;
|
|
303
|
+
at.createStaticRouter = xs;
|
|
304
|
+
const Rs = ({
|
|
305
305
|
router: e,
|
|
306
306
|
hydrate: t = !1
|
|
307
|
-
}) => /* @__PURE__ */ a.jsx(zn, { children: /* @__PURE__ */ a.jsx(On, { children: /* @__PURE__ */ a.jsx(
|
|
307
|
+
}) => /* @__PURE__ */ a.jsx(zn, { children: /* @__PURE__ */ a.jsx(On, { children: /* @__PURE__ */ a.jsx(Nt.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(Ga, { router: e }) }) }) }), Es = ({
|
|
308
308
|
router: e,
|
|
309
309
|
context: t,
|
|
310
310
|
helmetContext: n
|
|
311
|
-
}) => /* @__PURE__ */ a.jsx(zn, { children: /* @__PURE__ */ a.jsx(On, { context: n, children: /* @__PURE__ */ a.jsx(
|
|
312
|
-
var ve, Nn,
|
|
311
|
+
}) => /* @__PURE__ */ a.jsx(zn, { children: /* @__PURE__ */ a.jsx(On, { context: n, children: /* @__PURE__ */ a.jsx(Ms, { router: e, context: t }) }) });
|
|
312
|
+
var ve, Nn, Ds = (Nn = class extends Gn {
|
|
313
313
|
constructor(t = {}) {
|
|
314
314
|
super();
|
|
315
315
|
ce(this, ve);
|
|
@@ -318,7 +318,7 @@ var ve, Nn, Es = (Nn = class extends Gn {
|
|
|
318
318
|
build(t, n, r) {
|
|
319
319
|
const o = n.queryKey, s = n.queryHash ?? Wn(o, n);
|
|
320
320
|
let i = this.get(s);
|
|
321
|
-
return i || (i = new
|
|
321
|
+
return i || (i = new To({
|
|
322
322
|
cache: this,
|
|
323
323
|
queryKey: o,
|
|
324
324
|
queryHash: s,
|
|
@@ -381,7 +381,7 @@ var ve, Nn, Es = (Nn = class extends Gn {
|
|
|
381
381
|
});
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
|
-
}, ve = new WeakMap(), Nn), oe, nt, Tn,
|
|
384
|
+
}, ve = new WeakMap(), Nn), oe, nt, Tn, Ps = (Tn = class extends Gn {
|
|
385
385
|
constructor(t = {}) {
|
|
386
386
|
super();
|
|
387
387
|
ce(this, oe);
|
|
@@ -389,7 +389,7 @@ var ve, Nn, Es = (Nn = class extends Gn {
|
|
|
389
389
|
this.config = t, X(this, oe, /* @__PURE__ */ new Map()), X(this, nt, Date.now());
|
|
390
390
|
}
|
|
391
391
|
build(t, n, r) {
|
|
392
|
-
const o = new
|
|
392
|
+
const o = new eo({
|
|
393
393
|
mutationCache: this,
|
|
394
394
|
mutationId: ++ut(this, nt)._,
|
|
395
395
|
options: t.defaultMutationOptions(n),
|
|
@@ -462,59 +462,59 @@ function dt(e) {
|
|
|
462
462
|
function Sn(e) {
|
|
463
463
|
return {
|
|
464
464
|
onFetch: (t, n) => {
|
|
465
|
-
var f, c, d,
|
|
466
|
-
const r = t.options, o = (d = (c = (f = t.fetchOptions) == null ? void 0 : f.meta) == null ? void 0 : c.fetchMore) == null ? void 0 : d.direction, s = ((
|
|
465
|
+
var f, c, d, R, C;
|
|
466
|
+
const r = t.options, o = (d = (c = (f = t.fetchOptions) == null ? void 0 : f.meta) == null ? void 0 : c.fetchMore) == null ? void 0 : d.direction, s = ((R = t.state.data) == null ? void 0 : R.pages) || [], i = ((C = t.state.data) == null ? void 0 : C.pageParams) || [];
|
|
467
467
|
let l = { pages: [], pageParams: [] }, u = 0;
|
|
468
468
|
const m = async () => {
|
|
469
|
-
let
|
|
470
|
-
const
|
|
469
|
+
let g = !1;
|
|
470
|
+
const T = (P) => {
|
|
471
471
|
Object.defineProperty(P, "signal", {
|
|
472
472
|
enumerable: !0,
|
|
473
|
-
get: () => (t.signal.aborted ?
|
|
474
|
-
|
|
473
|
+
get: () => (t.signal.aborted ? g = !0 : t.signal.addEventListener("abort", () => {
|
|
474
|
+
g = !0;
|
|
475
475
|
}), t.signal)
|
|
476
476
|
});
|
|
477
|
-
},
|
|
478
|
-
if (
|
|
477
|
+
}, M = _o(t.options, t.fetchOptions), A = async (P, v, z) => {
|
|
478
|
+
if (g)
|
|
479
479
|
return Promise.reject();
|
|
480
|
-
if (
|
|
480
|
+
if (v == null && P.pages.length)
|
|
481
481
|
return Promise.resolve(P);
|
|
482
482
|
const Z = {
|
|
483
483
|
queryKey: t.queryKey,
|
|
484
|
-
pageParam:
|
|
484
|
+
pageParam: v,
|
|
485
485
|
direction: z ? "backward" : "forward",
|
|
486
486
|
meta: t.options.meta
|
|
487
487
|
};
|
|
488
|
-
|
|
489
|
-
const b = await
|
|
488
|
+
T(Z);
|
|
489
|
+
const b = await M(
|
|
490
490
|
Z
|
|
491
|
-
), { maxPages: j } = t.options, D = z ?
|
|
491
|
+
), { maxPages: j } = t.options, D = z ? Oo : Io;
|
|
492
492
|
return {
|
|
493
493
|
pages: D(P.pages, b, j),
|
|
494
|
-
pageParams: D(P.pageParams,
|
|
494
|
+
pageParams: D(P.pageParams, v, j)
|
|
495
495
|
};
|
|
496
496
|
};
|
|
497
497
|
if (o && s.length) {
|
|
498
|
-
const P = o === "backward",
|
|
498
|
+
const P = o === "backward", v = P ? js : Cn, z = {
|
|
499
499
|
pages: s,
|
|
500
500
|
pageParams: i
|
|
501
|
-
}, Z =
|
|
502
|
-
l = await
|
|
501
|
+
}, Z = v(r, z);
|
|
502
|
+
l = await A(z, Z, P);
|
|
503
503
|
} else {
|
|
504
504
|
const P = e ?? s.length;
|
|
505
505
|
do {
|
|
506
|
-
const
|
|
507
|
-
if (u > 0 &&
|
|
506
|
+
const v = u === 0 ? i[0] ?? r.initialPageParam : Cn(r, l);
|
|
507
|
+
if (u > 0 && v == null)
|
|
508
508
|
break;
|
|
509
|
-
l = await
|
|
509
|
+
l = await A(l, v), u++;
|
|
510
510
|
} while (u < P);
|
|
511
511
|
}
|
|
512
512
|
return l;
|
|
513
513
|
};
|
|
514
514
|
t.options.persister ? t.fetchFn = () => {
|
|
515
|
-
var
|
|
516
|
-
return (
|
|
517
|
-
|
|
515
|
+
var g, T;
|
|
516
|
+
return (T = (g = t.options).persister) == null ? void 0 : T.call(
|
|
517
|
+
g,
|
|
518
518
|
m,
|
|
519
519
|
{
|
|
520
520
|
queryKey: t.queryKey,
|
|
@@ -536,13 +536,13 @@ function Cn(e, { pages: t, pageParams: n }) {
|
|
|
536
536
|
n
|
|
537
537
|
) : void 0;
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function js(e, { pages: t, pageParams: n }) {
|
|
540
540
|
var r;
|
|
541
541
|
return t.length > 0 ? (r = e.getPreviousPageParam) == null ? void 0 : r.call(e, t[0], t, n[0], n) : void 0;
|
|
542
542
|
}
|
|
543
|
-
var
|
|
543
|
+
var $, Pe, je, Be, He, Ne, Ue, ze, _n, Ns = (_n = class {
|
|
544
544
|
constructor(e = {}) {
|
|
545
|
-
ce(this,
|
|
545
|
+
ce(this, $);
|
|
546
546
|
ce(this, Pe);
|
|
547
547
|
ce(this, je);
|
|
548
548
|
ce(this, Be);
|
|
@@ -550,13 +550,13 @@ var F, Pe, je, Be, He, Ne, Ue, ze, _n, js = (_n = class {
|
|
|
550
550
|
ce(this, Ne);
|
|
551
551
|
ce(this, Ue);
|
|
552
552
|
ce(this, ze);
|
|
553
|
-
X(this,
|
|
553
|
+
X(this, $, e.queryCache || new Ds()), X(this, Pe, e.mutationCache || new Ps()), X(this, je, e.defaultOptions || {}), X(this, Be, /* @__PURE__ */ new Map()), X(this, He, /* @__PURE__ */ new Map()), X(this, Ne, 0);
|
|
554
554
|
}
|
|
555
555
|
mount() {
|
|
556
|
-
ut(this, Ne)._++, w(this, Ne) === 1 && (X(this, Ue,
|
|
557
|
-
e && (await this.resumePausedMutations(), w(this,
|
|
556
|
+
ut(this, Ne)._++, w(this, Ne) === 1 && (X(this, Ue, Ao.subscribe(async (e) => {
|
|
557
|
+
e && (await this.resumePausedMutations(), w(this, $).onFocus());
|
|
558
558
|
})), X(this, ze, wn.subscribe(async (e) => {
|
|
559
|
-
e && (await this.resumePausedMutations(), w(this,
|
|
559
|
+
e && (await this.resumePausedMutations(), w(this, $).onOnline());
|
|
560
560
|
})));
|
|
561
561
|
}
|
|
562
562
|
unmount() {
|
|
@@ -564,7 +564,7 @@ var F, Pe, je, Be, He, Ne, Ue, ze, _n, js = (_n = class {
|
|
|
564
564
|
ut(this, Ne)._--, w(this, Ne) === 0 && ((e = w(this, Ue)) == null || e.call(this), X(this, Ue, void 0), (t = w(this, ze)) == null || t.call(this), X(this, ze, void 0));
|
|
565
565
|
}
|
|
566
566
|
isFetching(e) {
|
|
567
|
-
return w(this,
|
|
567
|
+
return w(this, $).findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
568
568
|
}
|
|
569
569
|
isMutating(e) {
|
|
570
570
|
return w(this, Pe).findAll({ ...e, status: "pending" }).length;
|
|
@@ -572,33 +572,33 @@ var F, Pe, je, Be, He, Ne, Ue, ze, _n, js = (_n = class {
|
|
|
572
572
|
getQueryData(e) {
|
|
573
573
|
var n;
|
|
574
574
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
575
|
-
return (n = w(this,
|
|
575
|
+
return (n = w(this, $).get(t.queryHash)) == null ? void 0 : n.state.data;
|
|
576
576
|
}
|
|
577
577
|
ensureQueryData(e) {
|
|
578
578
|
const t = this.getQueryData(e.queryKey);
|
|
579
579
|
if (t === void 0)
|
|
580
580
|
return this.fetchQuery(e);
|
|
581
581
|
{
|
|
582
|
-
const n = this.defaultQueryOptions(e), r = w(this,
|
|
582
|
+
const n = this.defaultQueryOptions(e), r = w(this, $).build(this, n);
|
|
583
583
|
return e.revalidateIfStale && r.isStaleByTime(xn(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(t);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
getQueriesData(e) {
|
|
587
|
-
return w(this,
|
|
587
|
+
return w(this, $).findAll(e).map(({ queryKey: t, state: n }) => {
|
|
588
588
|
const r = n.data;
|
|
589
589
|
return [t, r];
|
|
590
590
|
});
|
|
591
591
|
}
|
|
592
592
|
setQueryData(e, t, n) {
|
|
593
|
-
const r = this.defaultQueryOptions({ queryKey: e }), o = w(this,
|
|
593
|
+
const r = this.defaultQueryOptions({ queryKey: e }), o = w(this, $).get(
|
|
594
594
|
r.queryHash
|
|
595
|
-
), s = o == null ? void 0 : o.state.data, i =
|
|
595
|
+
), s = o == null ? void 0 : o.state.data, i = ko(t, s);
|
|
596
596
|
if (i !== void 0)
|
|
597
|
-
return w(this,
|
|
597
|
+
return w(this, $).build(this, r).setData(i, { ...n, manual: !0 });
|
|
598
598
|
}
|
|
599
599
|
setQueriesData(e, t, n) {
|
|
600
600
|
return se.batch(
|
|
601
|
-
() => w(this,
|
|
601
|
+
() => w(this, $).findAll(e).map(({ queryKey: r }) => [
|
|
602
602
|
r,
|
|
603
603
|
this.setQueryData(r, t, n)
|
|
604
604
|
])
|
|
@@ -607,10 +607,10 @@ var F, Pe, je, Be, He, Ne, Ue, ze, _n, js = (_n = class {
|
|
|
607
607
|
getQueryState(e) {
|
|
608
608
|
var n;
|
|
609
609
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
610
|
-
return (n = w(this,
|
|
610
|
+
return (n = w(this, $).get(t.queryHash)) == null ? void 0 : n.state;
|
|
611
611
|
}
|
|
612
612
|
removeQueries(e) {
|
|
613
|
-
const t = w(this,
|
|
613
|
+
const t = w(this, $);
|
|
614
614
|
se.batch(() => {
|
|
615
615
|
t.findAll(e).forEach((n) => {
|
|
616
616
|
t.remove(n);
|
|
@@ -618,7 +618,7 @@ var F, Pe, je, Be, He, Ne, Ue, ze, _n, js = (_n = class {
|
|
|
618
618
|
});
|
|
619
619
|
}
|
|
620
620
|
resetQueries(e, t) {
|
|
621
|
-
const n = w(this,
|
|
621
|
+
const n = w(this, $), r = {
|
|
622
622
|
type: "active",
|
|
623
623
|
...e
|
|
624
624
|
};
|
|
@@ -628,13 +628,13 @@ var F, Pe, je, Be, He, Ne, Ue, ze, _n, js = (_n = class {
|
|
|
628
628
|
}
|
|
629
629
|
cancelQueries(e = {}, t = {}) {
|
|
630
630
|
const n = { revert: !0, ...t }, r = se.batch(
|
|
631
|
-
() => w(this,
|
|
631
|
+
() => w(this, $).findAll(e).map((o) => o.cancel(n))
|
|
632
632
|
);
|
|
633
633
|
return Promise.all(r).then(be).catch(be);
|
|
634
634
|
}
|
|
635
635
|
invalidateQueries(e = {}, t = {}) {
|
|
636
636
|
return se.batch(() => {
|
|
637
|
-
if (w(this,
|
|
637
|
+
if (w(this, $).findAll(e).forEach((r) => {
|
|
638
638
|
r.invalidate();
|
|
639
639
|
}), e.refetchType === "none")
|
|
640
640
|
return Promise.resolve();
|
|
@@ -650,7 +650,7 @@ var F, Pe, je, Be, He, Ne, Ue, ze, _n, js = (_n = class {
|
|
|
650
650
|
...t,
|
|
651
651
|
cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
|
|
652
652
|
}, r = se.batch(
|
|
653
|
-
() => w(this,
|
|
653
|
+
() => w(this, $).findAll(e).filter((o) => !o.isDisabled()).map((o) => {
|
|
654
654
|
let s = o.fetch(void 0, n);
|
|
655
655
|
return n.throwOnError || (s = s.catch(be)), o.state.fetchStatus === "paused" ? Promise.resolve() : s;
|
|
656
656
|
})
|
|
@@ -660,7 +660,7 @@ var F, Pe, je, Be, He, Ne, Ue, ze, _n, js = (_n = class {
|
|
|
660
660
|
fetchQuery(e) {
|
|
661
661
|
const t = this.defaultQueryOptions(e);
|
|
662
662
|
t.retry === void 0 && (t.retry = !1);
|
|
663
|
-
const n = w(this,
|
|
663
|
+
const n = w(this, $).build(this, t);
|
|
664
664
|
return n.isStaleByTime(
|
|
665
665
|
xn(t.staleTime, n)
|
|
666
666
|
) ? n.fetch(t) : Promise.resolve(n.state.data);
|
|
@@ -681,7 +681,7 @@ var F, Pe, je, Be, He, Ne, Ue, ze, _n, js = (_n = class {
|
|
|
681
681
|
return wn.isOnline() ? w(this, Pe).resumePausedMutations() : Promise.resolve();
|
|
682
682
|
}
|
|
683
683
|
getQueryCache() {
|
|
684
|
-
return w(this,
|
|
684
|
+
return w(this, $);
|
|
685
685
|
}
|
|
686
686
|
getMutationCache() {
|
|
687
687
|
return w(this, Pe);
|
|
@@ -730,7 +730,7 @@ var F, Pe, je, Be, He, Ne, Ue, ze, _n, js = (_n = class {
|
|
|
730
730
|
return t.queryHash || (t.queryHash = Wn(
|
|
731
731
|
t.queryKey,
|
|
732
732
|
t
|
|
733
|
-
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn ===
|
|
733
|
+
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === $o && (t.enabled = !1), t;
|
|
734
734
|
}
|
|
735
735
|
defaultMutationOptions(e) {
|
|
736
736
|
return e != null && e._defaulted ? e : {
|
|
@@ -741,16 +741,16 @@ var F, Pe, je, Be, He, Ne, Ue, ze, _n, js = (_n = class {
|
|
|
741
741
|
};
|
|
742
742
|
}
|
|
743
743
|
clear() {
|
|
744
|
-
w(this,
|
|
744
|
+
w(this, $).clear(), w(this, Pe).clear();
|
|
745
745
|
}
|
|
746
|
-
},
|
|
747
|
-
const
|
|
746
|
+
}, $ = new WeakMap(), Pe = new WeakMap(), je = new WeakMap(), Be = new WeakMap(), He = new WeakMap(), Ne = new WeakMap(), Ue = new WeakMap(), ze = new WeakMap(), _n);
|
|
747
|
+
const Ts = Kn(null), Mt = {
|
|
748
748
|
didCatch: !1,
|
|
749
749
|
error: null
|
|
750
750
|
};
|
|
751
|
-
class
|
|
751
|
+
class _s extends bo {
|
|
752
752
|
constructor(t) {
|
|
753
|
-
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
753
|
+
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Mt;
|
|
754
754
|
}
|
|
755
755
|
static getDerivedStateFromError(t) {
|
|
756
756
|
return {
|
|
@@ -768,7 +768,7 @@ class Ts extends yo {
|
|
|
768
768
|
(n = (r = this.props).onReset) === null || n === void 0 || n.call(r, {
|
|
769
769
|
args: s,
|
|
770
770
|
reason: "imperative-api"
|
|
771
|
-
}), this.setState(
|
|
771
|
+
}), this.setState(Mt);
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
774
|
componentDidCatch(t, n) {
|
|
@@ -781,13 +781,13 @@ class Ts extends yo {
|
|
|
781
781
|
} = this.state, {
|
|
782
782
|
resetKeys: o
|
|
783
783
|
} = this.props;
|
|
784
|
-
if (r && n.error !== null &&
|
|
784
|
+
if (r && n.error !== null && Os(t.resetKeys, o)) {
|
|
785
785
|
var s, i;
|
|
786
786
|
(s = (i = this.props).onReset) === null || s === void 0 || s.call(i, {
|
|
787
787
|
next: o,
|
|
788
788
|
prev: t.resetKeys,
|
|
789
789
|
reason: "keys"
|
|
790
|
-
}), this.setState(
|
|
790
|
+
}), this.setState(Mt);
|
|
791
791
|
}
|
|
792
792
|
}
|
|
793
793
|
render() {
|
|
@@ -810,12 +810,12 @@ class Ts extends yo {
|
|
|
810
810
|
l = n(u);
|
|
811
811
|
else if (r)
|
|
812
812
|
l = mn(r, u);
|
|
813
|
-
else if (o === null ||
|
|
813
|
+
else if (o === null || So(o))
|
|
814
814
|
l = o;
|
|
815
815
|
else
|
|
816
816
|
throw i;
|
|
817
817
|
}
|
|
818
|
-
return mn(
|
|
818
|
+
return mn(Ts.Provider, {
|
|
819
819
|
value: {
|
|
820
820
|
didCatch: s,
|
|
821
821
|
error: i,
|
|
@@ -824,12 +824,12 @@ class Ts extends yo {
|
|
|
824
824
|
}, l);
|
|
825
825
|
}
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function Os() {
|
|
828
828
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
829
829
|
return e.length !== t.length || e.some((n, r) => !Object.is(n, t[r]));
|
|
830
830
|
}
|
|
831
|
-
const
|
|
832
|
-
class
|
|
831
|
+
const Is = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", As = (e) => "getRoutes" in e && typeof e.getRoutes == "function", ks = (e) => "renderSearch" in e && typeof e.renderSearch == "function", $s = (e) => "initialize" in e && typeof e.initialize == "function", Fs = (e) => "getHead" in e && typeof e.getHead == "function", Ls = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", Bs = (e) => "getIdentities" in e && typeof e.getIdentities == "function", nr = new Ns();
|
|
832
|
+
class Hs {
|
|
833
833
|
constructor(t) {
|
|
834
834
|
ae(this, "plugins");
|
|
835
835
|
ae(this, "sidebars");
|
|
@@ -840,7 +840,7 @@ class Bs {
|
|
|
840
840
|
ae(this, "navigationPlugins");
|
|
841
841
|
ae(this, "initialize", async () => {
|
|
842
842
|
await Promise.all(
|
|
843
|
-
this.plugins.filter(
|
|
843
|
+
this.plugins.filter($s).map((t) => {
|
|
844
844
|
var n;
|
|
845
845
|
return (n = t.initialize) == null ? void 0 : n.call(t, this);
|
|
846
846
|
})
|
|
@@ -850,13 +850,13 @@ class Bs {
|
|
|
850
850
|
await nr.invalidateQueries({ queryKey: t });
|
|
851
851
|
});
|
|
852
852
|
ae(this, "getApiIdentities", async () => (await Promise.all(
|
|
853
|
-
this.plugins.filter(
|
|
853
|
+
this.plugins.filter(Bs).map((n) => n.getIdentities(this))
|
|
854
854
|
)).flat());
|
|
855
855
|
ae(this, "getPluginSidebar", async (t) => (await Promise.all(
|
|
856
856
|
this.navigationPlugins.map(
|
|
857
857
|
(r) => {
|
|
858
858
|
var o;
|
|
859
|
-
return (o = r.getSidebar) == null ? void 0 : o.call(r,
|
|
859
|
+
return (o = r.getSidebar) == null ? void 0 : o.call(r, vt(t));
|
|
860
860
|
}
|
|
861
861
|
)
|
|
862
862
|
)).flatMap((r) => r ?? []));
|
|
@@ -866,32 +866,32 @@ class Bs {
|
|
|
866
866
|
const n = await this.authentication.getAccessToken();
|
|
867
867
|
return t.headers.set("Authorization", `Bearer ${n}`), t;
|
|
868
868
|
});
|
|
869
|
-
this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(
|
|
869
|
+
this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(As), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
|
|
870
870
|
}
|
|
871
871
|
}
|
|
872
|
-
function
|
|
872
|
+
function Us({ error: e, resetErrorBoundary: t }) {
|
|
873
873
|
return /* @__PURE__ */ a.jsx(An, { error: e });
|
|
874
874
|
}
|
|
875
875
|
const ft = globalThis;
|
|
876
876
|
(!ft.requestIdleCallback || !ft.cancelIdleCallback) && (ft.requestIdleCallback = (e) => setTimeout(e, 1), ft.cancelIdleCallback = clearTimeout);
|
|
877
|
-
var
|
|
878
|
-
ltr: [...
|
|
879
|
-
rtl: [...
|
|
880
|
-
},
|
|
877
|
+
var Tt = ["Enter", " "], zs = ["ArrowDown", "PageUp", "Home"], rr = ["ArrowUp", "PageDown", "End"], Ks = [...zs, ...rr], qs = {
|
|
878
|
+
ltr: [...Tt, "ArrowRight"],
|
|
879
|
+
rtl: [...Tt, "ArrowLeft"]
|
|
880
|
+
}, Qs = {
|
|
881
881
|
ltr: ["ArrowLeft"],
|
|
882
882
|
rtl: ["ArrowRight"]
|
|
883
|
-
}, ot = "Menu", [et,
|
|
884
|
-
|
|
883
|
+
}, ot = "Menu", [et, Vs, Gs] = to(ot), [Ae, ar] = kn(ot, [
|
|
884
|
+
Gs,
|
|
885
885
|
$n,
|
|
886
886
|
Jn
|
|
887
|
-
]), st = $n(), or = Jn(), [sr, Te] = Ae(ot), [
|
|
888
|
-
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, l = st(t), [u, m] = h.useState(null), f = h.useRef(!1), c =
|
|
887
|
+
]), st = $n(), or = Jn(), [sr, Te] = Ae(ot), [Ws, it] = Ae(ot), ir = (e) => {
|
|
888
|
+
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, l = st(t), [u, m] = h.useState(null), f = h.useRef(!1), c = Ft(s), d = ho(o);
|
|
889
889
|
return h.useEffect(() => {
|
|
890
|
-
const
|
|
891
|
-
f.current = !0, document.addEventListener("pointerdown",
|
|
892
|
-
},
|
|
893
|
-
return document.addEventListener("keydown",
|
|
894
|
-
document.removeEventListener("keydown",
|
|
890
|
+
const R = () => {
|
|
891
|
+
f.current = !0, document.addEventListener("pointerdown", C, { capture: !0, once: !0 }), document.addEventListener("pointermove", C, { capture: !0, once: !0 });
|
|
892
|
+
}, C = () => f.current = !1;
|
|
893
|
+
return document.addEventListener("keydown", R, { capture: !0 }), () => {
|
|
894
|
+
document.removeEventListener("keydown", R, { capture: !0 }), document.removeEventListener("pointerdown", C, { capture: !0 }), document.removeEventListener("pointermove", C, { capture: !0 });
|
|
895
895
|
};
|
|
896
896
|
}, []), /* @__PURE__ */ a.jsx(Ln, { ...l, children: /* @__PURE__ */ a.jsx(
|
|
897
897
|
sr,
|
|
@@ -902,7 +902,7 @@ var Nt = ["Enter", " "], Us = ["ArrowDown", "PageUp", "Home"], rr = ["ArrowUp",
|
|
|
902
902
|
content: u,
|
|
903
903
|
onContentChange: m,
|
|
904
904
|
children: /* @__PURE__ */ a.jsx(
|
|
905
|
-
|
|
905
|
+
Ws,
|
|
906
906
|
{
|
|
907
907
|
scope: t,
|
|
908
908
|
onClose: h.useCallback(() => c(!1), [c]),
|
|
@@ -916,31 +916,31 @@ var Nt = ["Enter", " "], Us = ["ArrowDown", "PageUp", "Home"], rr = ["ArrowUp",
|
|
|
916
916
|
) });
|
|
917
917
|
};
|
|
918
918
|
ir.displayName = ot;
|
|
919
|
-
var
|
|
919
|
+
var Ys = "MenuAnchor", zt = h.forwardRef(
|
|
920
920
|
(e, t) => {
|
|
921
921
|
const { __scopeMenu: n, ...r } = e, o = st(n);
|
|
922
|
-
return /* @__PURE__ */ a.jsx(
|
|
922
|
+
return /* @__PURE__ */ a.jsx(no, { ...o, ...r, ref: t });
|
|
923
923
|
}
|
|
924
924
|
);
|
|
925
|
-
zt.displayName =
|
|
926
|
-
var Kt = "MenuPortal", [
|
|
925
|
+
zt.displayName = Ys;
|
|
926
|
+
var Kt = "MenuPortal", [Xs, lr] = Ae(Kt, {
|
|
927
927
|
forceMount: void 0
|
|
928
928
|
}), cr = (e) => {
|
|
929
929
|
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Te(Kt, t);
|
|
930
|
-
return /* @__PURE__ */ a.jsx(
|
|
930
|
+
return /* @__PURE__ */ a.jsx(Xs, { scope: t, forceMount: n, children: /* @__PURE__ */ a.jsx(yt, { present: n || s.open, children: /* @__PURE__ */ a.jsx(po, { asChild: !0, container: o, children: r }) }) });
|
|
931
931
|
};
|
|
932
932
|
cr.displayName = Kt;
|
|
933
|
-
var ue = "MenuContent", [
|
|
933
|
+
var ue = "MenuContent", [Js, qt] = Ae(ue), ur = h.forwardRef(
|
|
934
934
|
(e, t) => {
|
|
935
935
|
const n = lr(ue, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Te(ue, e.__scopeMenu), i = it(ue, e.__scopeMenu);
|
|
936
|
-
return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(
|
|
936
|
+
return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(yt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(et.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ a.jsx(Zs, { ...o, ref: t }) : /* @__PURE__ */ a.jsx(ei, { ...o, ref: t }) }) }) });
|
|
937
937
|
}
|
|
938
|
-
),
|
|
938
|
+
), Zs = h.forwardRef(
|
|
939
939
|
(e, t) => {
|
|
940
940
|
const n = Te(ue, e.__scopeMenu), r = h.useRef(null), o = rt(t, r);
|
|
941
941
|
return h.useEffect(() => {
|
|
942
942
|
const s = r.current;
|
|
943
|
-
if (s) return
|
|
943
|
+
if (s) return ro(s);
|
|
944
944
|
}, []), /* @__PURE__ */ a.jsx(
|
|
945
945
|
Qt,
|
|
946
946
|
{
|
|
@@ -949,7 +949,7 @@ var ue = "MenuContent", [Xs, qt] = Ae(ue), ur = h.forwardRef(
|
|
|
949
949
|
trapFocus: n.open,
|
|
950
950
|
disableOutsidePointerEvents: n.open,
|
|
951
951
|
disableOutsideScroll: !0,
|
|
952
|
-
onFocusOutside:
|
|
952
|
+
onFocusOutside: I(
|
|
953
953
|
e.onFocusOutside,
|
|
954
954
|
(s) => s.preventDefault(),
|
|
955
955
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -958,7 +958,7 @@ var ue = "MenuContent", [Xs, qt] = Ae(ue), ur = h.forwardRef(
|
|
|
958
958
|
}
|
|
959
959
|
);
|
|
960
960
|
}
|
|
961
|
-
),
|
|
961
|
+
), ei = h.forwardRef((e, t) => {
|
|
962
962
|
const n = Te(ue, e.__scopeMenu);
|
|
963
963
|
return /* @__PURE__ */ a.jsx(
|
|
964
964
|
Qt,
|
|
@@ -985,23 +985,23 @@ var ue = "MenuContent", [Xs, qt] = Ae(ue), ur = h.forwardRef(
|
|
|
985
985
|
onPointerDownOutside: f,
|
|
986
986
|
onFocusOutside: c,
|
|
987
987
|
onInteractOutside: d,
|
|
988
|
-
onDismiss:
|
|
989
|
-
disableOutsideScroll:
|
|
990
|
-
...
|
|
991
|
-
} = e,
|
|
988
|
+
onDismiss: R,
|
|
989
|
+
disableOutsideScroll: C,
|
|
990
|
+
...g
|
|
991
|
+
} = e, T = Te(ue, n), M = it(ue, n), A = st(n), P = or(n), v = Vs(n), [z, Z] = h.useState(null), b = h.useRef(null), j = rt(t, b, T.onContentChange), D = h.useRef(0), B = h.useRef(""), K = h.useRef(0), W = h.useRef(null), x = h.useRef("right"), V = h.useRef(0), G = C ? co : h.Fragment, te = C ? { as: uo, allowPinchZoom: !0 } : void 0, q = (y) => {
|
|
992
992
|
var le, Re;
|
|
993
|
-
const Q = B.current + y, ie =
|
|
993
|
+
const Q = B.current + y, ie = v().filter((re) => !re.disabled), de = document.activeElement, pe = (le = ie.find((re) => re.ref.current === de)) == null ? void 0 : le.textValue, Me = ie.map((re) => re.textValue), ke = fi(Me, Q, pe), ye = (Re = ie.find((re) => re.textValue === ke)) == null ? void 0 : Re.ref.current;
|
|
994
994
|
(function re($e) {
|
|
995
995
|
B.current = $e, window.clearTimeout(D.current), $e !== "" && (D.current = window.setTimeout(() => re(""), 1e3));
|
|
996
996
|
})(Q), ye && setTimeout(() => ye.focus());
|
|
997
997
|
};
|
|
998
|
-
h.useEffect(() => () => window.clearTimeout(D.current), []),
|
|
998
|
+
h.useEffect(() => () => window.clearTimeout(D.current), []), ao();
|
|
999
999
|
const Y = h.useCallback((y) => {
|
|
1000
1000
|
var ie, de;
|
|
1001
|
-
return x.current === ((ie = W.current) == null ? void 0 : ie.side) &&
|
|
1001
|
+
return x.current === ((ie = W.current) == null ? void 0 : ie.side) && pi(y, (de = W.current) == null ? void 0 : de.area);
|
|
1002
1002
|
}, []);
|
|
1003
1003
|
return /* @__PURE__ */ a.jsx(
|
|
1004
|
-
|
|
1004
|
+
Js,
|
|
1005
1005
|
{
|
|
1006
1006
|
scope: n,
|
|
1007
1007
|
searchRef: B,
|
|
@@ -1029,17 +1029,17 @@ var ue = "MenuContent", [Xs, qt] = Ae(ue), ur = h.forwardRef(
|
|
|
1029
1029
|
W.current = y;
|
|
1030
1030
|
}, []),
|
|
1031
1031
|
children: /* @__PURE__ */ a.jsx(G, { ...te, children: /* @__PURE__ */ a.jsx(
|
|
1032
|
-
|
|
1032
|
+
oo,
|
|
1033
1033
|
{
|
|
1034
1034
|
asChild: !0,
|
|
1035
1035
|
trapped: o,
|
|
1036
|
-
onMountAutoFocus:
|
|
1036
|
+
onMountAutoFocus: I(s, (y) => {
|
|
1037
1037
|
var Q;
|
|
1038
1038
|
y.preventDefault(), (Q = b.current) == null || Q.focus({ preventScroll: !0 });
|
|
1039
1039
|
}),
|
|
1040
1040
|
onUnmountAutoFocus: i,
|
|
1041
1041
|
children: /* @__PURE__ */ a.jsx(
|
|
1042
|
-
|
|
1042
|
+
so,
|
|
1043
1043
|
{
|
|
1044
1044
|
asChild: !0,
|
|
1045
1045
|
disableOutsidePointerEvents: l,
|
|
@@ -1047,46 +1047,46 @@ var ue = "MenuContent", [Xs, qt] = Ae(ue), ur = h.forwardRef(
|
|
|
1047
1047
|
onPointerDownOutside: f,
|
|
1048
1048
|
onFocusOutside: c,
|
|
1049
1049
|
onInteractOutside: d,
|
|
1050
|
-
onDismiss:
|
|
1050
|
+
onDismiss: R,
|
|
1051
1051
|
children: /* @__PURE__ */ a.jsx(
|
|
1052
|
-
|
|
1052
|
+
Xo,
|
|
1053
1053
|
{
|
|
1054
1054
|
asChild: !0,
|
|
1055
1055
|
...P,
|
|
1056
|
-
dir:
|
|
1056
|
+
dir: M.dir,
|
|
1057
1057
|
orientation: "vertical",
|
|
1058
1058
|
loop: r,
|
|
1059
1059
|
currentTabStopId: z,
|
|
1060
1060
|
onCurrentTabStopIdChange: Z,
|
|
1061
|
-
onEntryFocus:
|
|
1062
|
-
|
|
1061
|
+
onEntryFocus: I(u, (y) => {
|
|
1062
|
+
M.isUsingKeyboardRef.current || y.preventDefault();
|
|
1063
1063
|
}),
|
|
1064
1064
|
preventScrollOnEntryFocus: !0,
|
|
1065
1065
|
children: /* @__PURE__ */ a.jsx(
|
|
1066
|
-
|
|
1066
|
+
io,
|
|
1067
1067
|
{
|
|
1068
1068
|
role: "menu",
|
|
1069
1069
|
"aria-orientation": "vertical",
|
|
1070
|
-
"data-state": Dr(
|
|
1070
|
+
"data-state": Dr(T.open),
|
|
1071
1071
|
"data-radix-menu-content": "",
|
|
1072
|
-
dir:
|
|
1073
|
-
...
|
|
1074
|
-
...
|
|
1072
|
+
dir: M.dir,
|
|
1073
|
+
...A,
|
|
1074
|
+
...g,
|
|
1075
1075
|
ref: j,
|
|
1076
|
-
style: { outline: "none", ...
|
|
1077
|
-
onKeyDown:
|
|
1076
|
+
style: { outline: "none", ...g.style },
|
|
1077
|
+
onKeyDown: I(g.onKeyDown, (y) => {
|
|
1078
1078
|
const ie = y.target.closest("[data-radix-menu-content]") === y.currentTarget, de = y.ctrlKey || y.altKey || y.metaKey, pe = y.key.length === 1;
|
|
1079
1079
|
ie && (y.key === "Tab" && y.preventDefault(), !de && pe && q(y.key));
|
|
1080
1080
|
const Me = b.current;
|
|
1081
|
-
if (y.target !== Me || !
|
|
1081
|
+
if (y.target !== Me || !Ks.includes(y.key)) return;
|
|
1082
1082
|
y.preventDefault();
|
|
1083
|
-
const ye =
|
|
1084
|
-
rr.includes(y.key) && ye.reverse(),
|
|
1083
|
+
const ye = v().filter((le) => !le.disabled).map((le) => le.ref.current);
|
|
1084
|
+
rr.includes(y.key) && ye.reverse(), ui(ye);
|
|
1085
1085
|
}),
|
|
1086
|
-
onBlur:
|
|
1086
|
+
onBlur: I(e.onBlur, (y) => {
|
|
1087
1087
|
y.currentTarget.contains(y.target) || (window.clearTimeout(D.current), B.current = "");
|
|
1088
1088
|
}),
|
|
1089
|
-
onPointerMove:
|
|
1089
|
+
onPointerMove: I(
|
|
1090
1090
|
e.onPointerMove,
|
|
1091
1091
|
tt((y) => {
|
|
1092
1092
|
const Q = y.target, ie = V.current !== y.clientX;
|
|
@@ -1109,27 +1109,27 @@ var ue = "MenuContent", [Xs, qt] = Ae(ue), ur = h.forwardRef(
|
|
|
1109
1109
|
}
|
|
1110
1110
|
);
|
|
1111
1111
|
ur.displayName = ue;
|
|
1112
|
-
var
|
|
1112
|
+
var ti = "MenuGroup", Vt = h.forwardRef(
|
|
1113
1113
|
(e, t) => {
|
|
1114
1114
|
const { __scopeMenu: n, ...r } = e;
|
|
1115
1115
|
return /* @__PURE__ */ a.jsx(Ke.div, { role: "group", ...r, ref: t });
|
|
1116
1116
|
}
|
|
1117
1117
|
);
|
|
1118
|
-
Vt.displayName =
|
|
1119
|
-
var
|
|
1118
|
+
Vt.displayName = ti;
|
|
1119
|
+
var ni = "MenuLabel", dr = h.forwardRef(
|
|
1120
1120
|
(e, t) => {
|
|
1121
1121
|
const { __scopeMenu: n, ...r } = e;
|
|
1122
1122
|
return /* @__PURE__ */ a.jsx(Ke.div, { ...r, ref: t });
|
|
1123
1123
|
}
|
|
1124
1124
|
);
|
|
1125
|
-
dr.displayName =
|
|
1126
|
-
var
|
|
1125
|
+
dr.displayName = ni;
|
|
1126
|
+
var wt = "MenuItem", Mn = "menu.itemSelect", bt = h.forwardRef(
|
|
1127
1127
|
(e, t) => {
|
|
1128
|
-
const { disabled: n = !1, onSelect: r, ...o } = e, s = h.useRef(null), i = it(
|
|
1128
|
+
const { disabled: n = !1, onSelect: r, ...o } = e, s = h.useRef(null), i = it(wt, e.__scopeMenu), l = qt(wt, e.__scopeMenu), u = rt(t, s), m = h.useRef(!1), f = () => {
|
|
1129
1129
|
const c = s.current;
|
|
1130
1130
|
if (!n && c) {
|
|
1131
1131
|
const d = new CustomEvent(Mn, { bubbles: !0, cancelable: !0 });
|
|
1132
|
-
c.addEventListener(Mn, (
|
|
1132
|
+
c.addEventListener(Mn, (R) => r == null ? void 0 : r(R), { once: !0 }), fo(c, d), d.defaultPrevented ? m.current = !1 : i.onClose();
|
|
1133
1133
|
}
|
|
1134
1134
|
};
|
|
1135
1135
|
return /* @__PURE__ */ a.jsx(
|
|
@@ -1138,37 +1138,37 @@ var vt = "MenuItem", Mn = "menu.itemSelect", yt = h.forwardRef(
|
|
|
1138
1138
|
...o,
|
|
1139
1139
|
ref: u,
|
|
1140
1140
|
disabled: n,
|
|
1141
|
-
onClick:
|
|
1141
|
+
onClick: I(e.onClick, f),
|
|
1142
1142
|
onPointerDown: (c) => {
|
|
1143
1143
|
var d;
|
|
1144
1144
|
(d = e.onPointerDown) == null || d.call(e, c), m.current = !0;
|
|
1145
1145
|
},
|
|
1146
|
-
onPointerUp:
|
|
1146
|
+
onPointerUp: I(e.onPointerUp, (c) => {
|
|
1147
1147
|
var d;
|
|
1148
1148
|
m.current || (d = c.currentTarget) == null || d.click();
|
|
1149
1149
|
}),
|
|
1150
|
-
onKeyDown:
|
|
1150
|
+
onKeyDown: I(e.onKeyDown, (c) => {
|
|
1151
1151
|
const d = l.searchRef.current !== "";
|
|
1152
|
-
n || d && c.key === " " ||
|
|
1152
|
+
n || d && c.key === " " || Tt.includes(c.key) && (c.currentTarget.click(), c.preventDefault());
|
|
1153
1153
|
})
|
|
1154
1154
|
}
|
|
1155
1155
|
);
|
|
1156
1156
|
}
|
|
1157
1157
|
);
|
|
1158
|
-
|
|
1158
|
+
bt.displayName = wt;
|
|
1159
1159
|
var fr = h.forwardRef(
|
|
1160
1160
|
(e, t) => {
|
|
1161
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = qt(
|
|
1161
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = qt(wt, n), l = or(n), u = h.useRef(null), m = rt(t, u), [f, c] = h.useState(!1), [d, R] = h.useState("");
|
|
1162
1162
|
return h.useEffect(() => {
|
|
1163
|
-
const
|
|
1164
|
-
|
|
1163
|
+
const C = u.current;
|
|
1164
|
+
C && R((C.textContent ?? "").trim());
|
|
1165
1165
|
}, [s.children]), /* @__PURE__ */ a.jsx(
|
|
1166
1166
|
et.ItemSlot,
|
|
1167
1167
|
{
|
|
1168
1168
|
scope: n,
|
|
1169
1169
|
disabled: r,
|
|
1170
1170
|
textValue: o ?? d,
|
|
1171
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1171
|
+
children: /* @__PURE__ */ a.jsx(Jo, { asChild: !0, ...l, focusable: !r, children: /* @__PURE__ */ a.jsx(
|
|
1172
1172
|
Ke.div,
|
|
1173
1173
|
{
|
|
1174
1174
|
role: "menuitem",
|
|
@@ -1177,67 +1177,67 @@ var fr = h.forwardRef(
|
|
|
1177
1177
|
"data-disabled": r ? "" : void 0,
|
|
1178
1178
|
...s,
|
|
1179
1179
|
ref: m,
|
|
1180
|
-
onPointerMove:
|
|
1180
|
+
onPointerMove: I(
|
|
1181
1181
|
e.onPointerMove,
|
|
1182
|
-
tt((
|
|
1183
|
-
r ? i.onItemLeave(
|
|
1182
|
+
tt((C) => {
|
|
1183
|
+
r ? i.onItemLeave(C) : (i.onItemEnter(C), C.defaultPrevented || C.currentTarget.focus({ preventScroll: !0 }));
|
|
1184
1184
|
})
|
|
1185
1185
|
),
|
|
1186
|
-
onPointerLeave:
|
|
1186
|
+
onPointerLeave: I(
|
|
1187
1187
|
e.onPointerLeave,
|
|
1188
|
-
tt((
|
|
1188
|
+
tt((C) => i.onItemLeave(C))
|
|
1189
1189
|
),
|
|
1190
|
-
onFocus:
|
|
1191
|
-
onBlur:
|
|
1190
|
+
onFocus: I(e.onFocus, () => c(!0)),
|
|
1191
|
+
onBlur: I(e.onBlur, () => c(!1))
|
|
1192
1192
|
}
|
|
1193
1193
|
) })
|
|
1194
1194
|
}
|
|
1195
1195
|
);
|
|
1196
1196
|
}
|
|
1197
|
-
),
|
|
1197
|
+
), ri = "MenuCheckboxItem", hr = h.forwardRef(
|
|
1198
1198
|
(e, t) => {
|
|
1199
1199
|
const { checked: n = !1, onCheckedChange: r, ...o } = e;
|
|
1200
1200
|
return /* @__PURE__ */ a.jsx(wr, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ a.jsx(
|
|
1201
|
-
|
|
1201
|
+
bt,
|
|
1202
1202
|
{
|
|
1203
1203
|
role: "menuitemcheckbox",
|
|
1204
|
-
"aria-checked":
|
|
1204
|
+
"aria-checked": xt(n) ? "mixed" : n,
|
|
1205
1205
|
...o,
|
|
1206
1206
|
ref: t,
|
|
1207
1207
|
"data-state": Yt(n),
|
|
1208
|
-
onSelect:
|
|
1208
|
+
onSelect: I(
|
|
1209
1209
|
o.onSelect,
|
|
1210
|
-
() => r == null ? void 0 : r(
|
|
1210
|
+
() => r == null ? void 0 : r(xt(n) ? !0 : !n),
|
|
1211
1211
|
{ checkForDefaultPrevented: !1 }
|
|
1212
1212
|
)
|
|
1213
1213
|
}
|
|
1214
1214
|
) });
|
|
1215
1215
|
}
|
|
1216
1216
|
);
|
|
1217
|
-
hr.displayName =
|
|
1218
|
-
var pr = "MenuRadioGroup", [
|
|
1217
|
+
hr.displayName = ri;
|
|
1218
|
+
var pr = "MenuRadioGroup", [ai, oi] = Ae(
|
|
1219
1219
|
pr,
|
|
1220
1220
|
{ value: void 0, onValueChange: () => {
|
|
1221
1221
|
} }
|
|
1222
1222
|
), mr = h.forwardRef(
|
|
1223
1223
|
(e, t) => {
|
|
1224
|
-
const { value: n, onValueChange: r, ...o } = e, s =
|
|
1225
|
-
return /* @__PURE__ */ a.jsx(
|
|
1224
|
+
const { value: n, onValueChange: r, ...o } = e, s = Ft(r);
|
|
1225
|
+
return /* @__PURE__ */ a.jsx(ai, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ a.jsx(Vt, { ...o, ref: t }) });
|
|
1226
1226
|
}
|
|
1227
1227
|
);
|
|
1228
1228
|
mr.displayName = pr;
|
|
1229
1229
|
var gr = "MenuRadioItem", vr = h.forwardRef(
|
|
1230
1230
|
(e, t) => {
|
|
1231
|
-
const { value: n, ...r } = e, o =
|
|
1231
|
+
const { value: n, ...r } = e, o = oi(gr, e.__scopeMenu), s = n === o.value;
|
|
1232
1232
|
return /* @__PURE__ */ a.jsx(wr, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ a.jsx(
|
|
1233
|
-
|
|
1233
|
+
bt,
|
|
1234
1234
|
{
|
|
1235
1235
|
role: "menuitemradio",
|
|
1236
1236
|
"aria-checked": s,
|
|
1237
1237
|
...r,
|
|
1238
1238
|
ref: t,
|
|
1239
1239
|
"data-state": Yt(s),
|
|
1240
|
-
onSelect:
|
|
1240
|
+
onSelect: I(
|
|
1241
1241
|
r.onSelect,
|
|
1242
1242
|
() => {
|
|
1243
1243
|
var i;
|
|
@@ -1250,16 +1250,16 @@ var gr = "MenuRadioItem", vr = h.forwardRef(
|
|
|
1250
1250
|
}
|
|
1251
1251
|
);
|
|
1252
1252
|
vr.displayName = gr;
|
|
1253
|
-
var Gt = "MenuItemIndicator", [wr,
|
|
1253
|
+
var Gt = "MenuItemIndicator", [wr, si] = Ae(
|
|
1254
1254
|
Gt,
|
|
1255
1255
|
{ checked: !1 }
|
|
1256
1256
|
), xr = h.forwardRef(
|
|
1257
1257
|
(e, t) => {
|
|
1258
|
-
const { __scopeMenu: n, forceMount: r, ...o } = e, s =
|
|
1258
|
+
const { __scopeMenu: n, forceMount: r, ...o } = e, s = si(Gt, n);
|
|
1259
1259
|
return /* @__PURE__ */ a.jsx(
|
|
1260
|
-
|
|
1260
|
+
yt,
|
|
1261
1261
|
{
|
|
1262
|
-
present: r ||
|
|
1262
|
+
present: r || xt(s.checked) || s.checked === !0,
|
|
1263
1263
|
children: /* @__PURE__ */ a.jsx(
|
|
1264
1264
|
Ke.span,
|
|
1265
1265
|
{
|
|
@@ -1273,7 +1273,7 @@ var Gt = "MenuItemIndicator", [wr, oi] = Ae(
|
|
|
1273
1273
|
}
|
|
1274
1274
|
);
|
|
1275
1275
|
xr.displayName = Gt;
|
|
1276
|
-
var
|
|
1276
|
+
var ii = "MenuSeparator", yr = h.forwardRef(
|
|
1277
1277
|
(e, t) => {
|
|
1278
1278
|
const { __scopeMenu: n, ...r } = e;
|
|
1279
1279
|
return /* @__PURE__ */ a.jsx(
|
|
@@ -1287,16 +1287,16 @@ var si = "MenuSeparator", yr = h.forwardRef(
|
|
|
1287
1287
|
);
|
|
1288
1288
|
}
|
|
1289
1289
|
);
|
|
1290
|
-
yr.displayName =
|
|
1291
|
-
var
|
|
1290
|
+
yr.displayName = ii;
|
|
1291
|
+
var li = "MenuArrow", br = h.forwardRef(
|
|
1292
1292
|
(e, t) => {
|
|
1293
1293
|
const { __scopeMenu: n, ...r } = e, o = st(n);
|
|
1294
|
-
return /* @__PURE__ */ a.jsx(
|
|
1294
|
+
return /* @__PURE__ */ a.jsx(lo, { ...o, ...r, ref: t });
|
|
1295
1295
|
}
|
|
1296
1296
|
);
|
|
1297
|
-
br.displayName =
|
|
1298
|
-
var Wt = "MenuSub", [
|
|
1299
|
-
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, s = Te(Wt, t), i = st(t), [l, u] = h.useState(null), [m, f] = h.useState(null), c =
|
|
1297
|
+
br.displayName = li;
|
|
1298
|
+
var Wt = "MenuSub", [ci, Sr] = Ae(Wt), Cr = (e) => {
|
|
1299
|
+
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, s = Te(Wt, t), i = st(t), [l, u] = h.useState(null), [m, f] = h.useState(null), c = Ft(o);
|
|
1300
1300
|
return h.useEffect(() => (s.open === !1 && c(!1), () => c(!1)), [s.open, c]), /* @__PURE__ */ a.jsx(Ln, { ...i, children: /* @__PURE__ */ a.jsx(
|
|
1301
1301
|
sr,
|
|
1302
1302
|
{
|
|
@@ -1306,7 +1306,7 @@ var Wt = "MenuSub", [li, Sr] = Ae(Wt), Cr = (e) => {
|
|
|
1306
1306
|
content: m,
|
|
1307
1307
|
onContentChange: f,
|
|
1308
1308
|
children: /* @__PURE__ */ a.jsx(
|
|
1309
|
-
|
|
1309
|
+
ci,
|
|
1310
1310
|
{
|
|
1311
1311
|
scope: t,
|
|
1312
1312
|
contentId: gt(),
|
|
@@ -1344,7 +1344,7 @@ var Xe = "MenuSubTrigger", Mr = h.forwardRef(
|
|
|
1344
1344
|
var d;
|
|
1345
1345
|
(d = e.onClick) == null || d.call(e, c), !(e.disabled || c.defaultPrevented) && (c.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
1346
1346
|
},
|
|
1347
|
-
onPointerMove:
|
|
1347
|
+
onPointerMove: I(
|
|
1348
1348
|
e.onPointerMove,
|
|
1349
1349
|
tt((c) => {
|
|
1350
1350
|
s.onItemEnter(c), !c.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
@@ -1352,25 +1352,25 @@ var Xe = "MenuSubTrigger", Mr = h.forwardRef(
|
|
|
1352
1352
|
}, 100));
|
|
1353
1353
|
})
|
|
1354
1354
|
),
|
|
1355
|
-
onPointerLeave:
|
|
1355
|
+
onPointerLeave: I(
|
|
1356
1356
|
e.onPointerLeave,
|
|
1357
1357
|
tt((c) => {
|
|
1358
|
-
var
|
|
1358
|
+
var R, C;
|
|
1359
1359
|
f();
|
|
1360
|
-
const d = (
|
|
1360
|
+
const d = (R = n.content) == null ? void 0 : R.getBoundingClientRect();
|
|
1361
1361
|
if (d) {
|
|
1362
|
-
const
|
|
1362
|
+
const g = (C = n.content) == null ? void 0 : C.dataset.side, T = g === "right", M = T ? -5 : 5, A = d[T ? "left" : "right"], P = d[T ? "right" : "left"];
|
|
1363
1363
|
s.onPointerGraceIntentChange({
|
|
1364
1364
|
area: [
|
|
1365
1365
|
// Apply a bleed on clientX to ensure that our exit point is
|
|
1366
1366
|
// consistently within polygon bounds
|
|
1367
|
-
{ x: c.clientX +
|
|
1368
|
-
{ x:
|
|
1367
|
+
{ x: c.clientX + M, y: c.clientY },
|
|
1368
|
+
{ x: A, y: d.top },
|
|
1369
1369
|
{ x: P, y: d.top },
|
|
1370
1370
|
{ x: P, y: d.bottom },
|
|
1371
|
-
{ x:
|
|
1371
|
+
{ x: A, y: d.bottom }
|
|
1372
1372
|
],
|
|
1373
|
-
side:
|
|
1373
|
+
side: g
|
|
1374
1374
|
}), window.clearTimeout(l.current), l.current = window.setTimeout(
|
|
1375
1375
|
() => s.onPointerGraceIntentChange(null),
|
|
1376
1376
|
300
|
|
@@ -1381,10 +1381,10 @@ var Xe = "MenuSubTrigger", Mr = h.forwardRef(
|
|
|
1381
1381
|
}
|
|
1382
1382
|
})
|
|
1383
1383
|
),
|
|
1384
|
-
onKeyDown:
|
|
1385
|
-
var
|
|
1384
|
+
onKeyDown: I(e.onKeyDown, (c) => {
|
|
1385
|
+
var R;
|
|
1386
1386
|
const d = s.searchRef.current !== "";
|
|
1387
|
-
e.disabled || d && c.key === " " ||
|
|
1387
|
+
e.disabled || d && c.key === " " || qs[r.dir].includes(c.key) && (n.onOpenChange(!0), (R = n.content) == null || R.focus(), c.preventDefault());
|
|
1388
1388
|
})
|
|
1389
1389
|
}
|
|
1390
1390
|
) });
|
|
@@ -1394,7 +1394,7 @@ Mr.displayName = Xe;
|
|
|
1394
1394
|
var Rr = "MenuSubContent", Er = h.forwardRef(
|
|
1395
1395
|
(e, t) => {
|
|
1396
1396
|
const n = lr(ue, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Te(ue, e.__scopeMenu), i = it(ue, e.__scopeMenu), l = Sr(Rr, e.__scopeMenu), u = h.useRef(null), m = rt(t, u);
|
|
1397
|
-
return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(
|
|
1397
|
+
return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(yt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(et.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(
|
|
1398
1398
|
Qt,
|
|
1399
1399
|
{
|
|
1400
1400
|
id: l.contentId,
|
|
@@ -1411,16 +1411,16 @@ var Rr = "MenuSubContent", Er = h.forwardRef(
|
|
|
1411
1411
|
i.isUsingKeyboardRef.current && ((c = u.current) == null || c.focus()), f.preventDefault();
|
|
1412
1412
|
},
|
|
1413
1413
|
onCloseAutoFocus: (f) => f.preventDefault(),
|
|
1414
|
-
onFocusOutside:
|
|
1414
|
+
onFocusOutside: I(e.onFocusOutside, (f) => {
|
|
1415
1415
|
f.target !== l.trigger && s.onOpenChange(!1);
|
|
1416
1416
|
}),
|
|
1417
|
-
onEscapeKeyDown:
|
|
1417
|
+
onEscapeKeyDown: I(e.onEscapeKeyDown, (f) => {
|
|
1418
1418
|
i.onClose(), f.preventDefault();
|
|
1419
1419
|
}),
|
|
1420
|
-
onKeyDown:
|
|
1421
|
-
var
|
|
1422
|
-
const c = f.currentTarget.contains(f.target), d =
|
|
1423
|
-
c && d && (s.onOpenChange(!1), (
|
|
1420
|
+
onKeyDown: I(e.onKeyDown, (f) => {
|
|
1421
|
+
var R;
|
|
1422
|
+
const c = f.currentTarget.contains(f.target), d = Qs[i.dir].includes(f.key);
|
|
1423
|
+
c && d && (s.onOpenChange(!1), (R = l.trigger) == null || R.focus(), f.preventDefault());
|
|
1424
1424
|
})
|
|
1425
1425
|
}
|
|
1426
1426
|
) }) }) });
|
|
@@ -1430,30 +1430,30 @@ Er.displayName = Rr;
|
|
|
1430
1430
|
function Dr(e) {
|
|
1431
1431
|
return e ? "open" : "closed";
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1433
|
+
function xt(e) {
|
|
1434
1434
|
return e === "indeterminate";
|
|
1435
1435
|
}
|
|
1436
1436
|
function Yt(e) {
|
|
1437
|
-
return
|
|
1437
|
+
return xt(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function ui(e) {
|
|
1440
1440
|
const t = document.activeElement;
|
|
1441
1441
|
for (const n of e)
|
|
1442
1442
|
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
1443
1443
|
}
|
|
1444
|
-
function
|
|
1444
|
+
function di(e, t) {
|
|
1445
1445
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
1446
1446
|
}
|
|
1447
|
-
function
|
|
1447
|
+
function fi(e, t, n) {
|
|
1448
1448
|
const o = t.length > 1 && Array.from(t).every((m) => m === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
1449
|
-
let i =
|
|
1449
|
+
let i = di(e, Math.max(s, 0));
|
|
1450
1450
|
o.length === 1 && (i = i.filter((m) => m !== n));
|
|
1451
1451
|
const u = i.find(
|
|
1452
1452
|
(m) => m.toLowerCase().startsWith(o.toLowerCase())
|
|
1453
1453
|
);
|
|
1454
1454
|
return u !== n ? u : void 0;
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1456
|
+
function hi(e, t) {
|
|
1457
1457
|
const { x: n, y: r } = e;
|
|
1458
1458
|
let o = !1;
|
|
1459
1459
|
for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
|
|
@@ -1462,18 +1462,18 @@ function fi(e, t) {
|
|
|
1462
1462
|
}
|
|
1463
1463
|
return o;
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1465
|
+
function pi(e, t) {
|
|
1466
1466
|
if (!t) return !1;
|
|
1467
1467
|
const n = { x: e.clientX, y: e.clientY };
|
|
1468
|
-
return
|
|
1468
|
+
return hi(n, t);
|
|
1469
1469
|
}
|
|
1470
1470
|
function tt(e) {
|
|
1471
1471
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
1472
1472
|
}
|
|
1473
|
-
var
|
|
1473
|
+
var mi = ir, gi = zt, vi = cr, wi = ur, xi = Vt, yi = dr, bi = bt, Si = hr, Ci = mr, Mi = vr, Ri = xr, Ei = yr, Di = br, Pi = Cr, ji = Mr, Ni = Er, Xt = "DropdownMenu", [Ti, dc] = kn(
|
|
1474
1474
|
Xt,
|
|
1475
1475
|
[ar]
|
|
1476
|
-
), J = ar(), [
|
|
1476
|
+
), J = ar(), [_i, Pr] = Ti(Xt), jr = (e) => {
|
|
1477
1477
|
const {
|
|
1478
1478
|
__scopeDropdownMenu: t,
|
|
1479
1479
|
children: n,
|
|
@@ -1488,7 +1488,7 @@ var pi = ir, mi = zt, gi = cr, vi = ur, wi = Vt, xi = dr, yi = yt, bi = hr, Si =
|
|
|
1488
1488
|
onChange: i
|
|
1489
1489
|
});
|
|
1490
1490
|
return /* @__PURE__ */ a.jsx(
|
|
1491
|
-
|
|
1491
|
+
_i,
|
|
1492
1492
|
{
|
|
1493
1493
|
scope: t,
|
|
1494
1494
|
triggerId: gt(),
|
|
@@ -1498,7 +1498,7 @@ var pi = ir, mi = zt, gi = cr, vi = ur, wi = Vt, xi = dr, yi = yt, bi = hr, Si =
|
|
|
1498
1498
|
onOpenChange: c,
|
|
1499
1499
|
onOpenToggle: h.useCallback(() => c((d) => !d), [c]),
|
|
1500
1500
|
modal: l,
|
|
1501
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1501
|
+
children: /* @__PURE__ */ a.jsx(mi, { ...u, open: f, onOpenChange: c, dir: r, modal: l, children: n })
|
|
1502
1502
|
}
|
|
1503
1503
|
);
|
|
1504
1504
|
};
|
|
@@ -1506,7 +1506,7 @@ jr.displayName = Xt;
|
|
|
1506
1506
|
var Nr = "DropdownMenuTrigger", Tr = h.forwardRef(
|
|
1507
1507
|
(e, t) => {
|
|
1508
1508
|
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Pr(Nr, n), i = J(n);
|
|
1509
|
-
return /* @__PURE__ */ a.jsx(
|
|
1509
|
+
return /* @__PURE__ */ a.jsx(gi, { asChild: !0, ...i, children: /* @__PURE__ */ a.jsx(
|
|
1510
1510
|
Ke.button,
|
|
1511
1511
|
{
|
|
1512
1512
|
type: "button",
|
|
@@ -1519,10 +1519,10 @@ var Nr = "DropdownMenuTrigger", Tr = h.forwardRef(
|
|
|
1519
1519
|
disabled: r,
|
|
1520
1520
|
...o,
|
|
1521
1521
|
ref: Fn(t, s.triggerRef),
|
|
1522
|
-
onPointerDown:
|
|
1522
|
+
onPointerDown: I(e.onPointerDown, (l) => {
|
|
1523
1523
|
!r && l.button === 0 && l.ctrlKey === !1 && (s.onOpenToggle(), s.open || l.preventDefault());
|
|
1524
1524
|
}),
|
|
1525
|
-
onKeyDown:
|
|
1525
|
+
onKeyDown: I(e.onKeyDown, (l) => {
|
|
1526
1526
|
r || (["Enter", " "].includes(l.key) && s.onOpenToggle(), l.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(l.key) && l.preventDefault());
|
|
1527
1527
|
})
|
|
1528
1528
|
}
|
|
@@ -1530,27 +1530,27 @@ var Nr = "DropdownMenuTrigger", Tr = h.forwardRef(
|
|
|
1530
1530
|
}
|
|
1531
1531
|
);
|
|
1532
1532
|
Tr.displayName = Nr;
|
|
1533
|
-
var
|
|
1533
|
+
var Oi = "DropdownMenuPortal", _r = (e) => {
|
|
1534
1534
|
const { __scopeDropdownMenu: t, ...n } = e, r = J(t);
|
|
1535
|
-
return /* @__PURE__ */ a.jsx(
|
|
1535
|
+
return /* @__PURE__ */ a.jsx(vi, { ...r, ...n });
|
|
1536
1536
|
};
|
|
1537
|
-
_r.displayName =
|
|
1537
|
+
_r.displayName = Oi;
|
|
1538
1538
|
var Or = "DropdownMenuContent", Ir = h.forwardRef(
|
|
1539
1539
|
(e, t) => {
|
|
1540
1540
|
const { __scopeDropdownMenu: n, ...r } = e, o = Pr(Or, n), s = J(n), i = h.useRef(!1);
|
|
1541
1541
|
return /* @__PURE__ */ a.jsx(
|
|
1542
|
-
|
|
1542
|
+
wi,
|
|
1543
1543
|
{
|
|
1544
1544
|
id: o.contentId,
|
|
1545
1545
|
"aria-labelledby": o.triggerId,
|
|
1546
1546
|
...s,
|
|
1547
1547
|
...r,
|
|
1548
1548
|
ref: t,
|
|
1549
|
-
onCloseAutoFocus:
|
|
1549
|
+
onCloseAutoFocus: I(e.onCloseAutoFocus, (l) => {
|
|
1550
1550
|
var u;
|
|
1551
1551
|
i.current || (u = o.triggerRef.current) == null || u.focus(), i.current = !1, l.preventDefault();
|
|
1552
1552
|
}),
|
|
1553
|
-
onInteractOutside:
|
|
1553
|
+
onInteractOutside: I(e.onInteractOutside, (l) => {
|
|
1554
1554
|
const u = l.detail.originalEvent, m = u.button === 0 && u.ctrlKey === !0, f = u.button === 2 || m;
|
|
1555
1555
|
(!o.modal || f) && (i.current = !0);
|
|
1556
1556
|
}),
|
|
@@ -1567,75 +1567,75 @@ var Or = "DropdownMenuContent", Ir = h.forwardRef(
|
|
|
1567
1567
|
}
|
|
1568
1568
|
);
|
|
1569
1569
|
Ir.displayName = Or;
|
|
1570
|
-
var
|
|
1570
|
+
var Ii = "DropdownMenuGroup", Ai = h.forwardRef(
|
|
1571
1571
|
(e, t) => {
|
|
1572
1572
|
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1573
|
-
return /* @__PURE__ */ a.jsx(
|
|
1573
|
+
return /* @__PURE__ */ a.jsx(xi, { ...o, ...r, ref: t });
|
|
1574
1574
|
}
|
|
1575
1575
|
);
|
|
1576
|
-
|
|
1577
|
-
var
|
|
1576
|
+
Ai.displayName = Ii;
|
|
1577
|
+
var ki = "DropdownMenuLabel", Ar = h.forwardRef(
|
|
1578
1578
|
(e, t) => {
|
|
1579
1579
|
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1580
|
-
return /* @__PURE__ */ a.jsx(
|
|
1580
|
+
return /* @__PURE__ */ a.jsx(yi, { ...o, ...r, ref: t });
|
|
1581
1581
|
}
|
|
1582
1582
|
);
|
|
1583
|
-
Ar.displayName =
|
|
1584
|
-
var
|
|
1583
|
+
Ar.displayName = ki;
|
|
1584
|
+
var $i = "DropdownMenuItem", kr = h.forwardRef(
|
|
1585
1585
|
(e, t) => {
|
|
1586
1586
|
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1587
|
-
return /* @__PURE__ */ a.jsx(
|
|
1587
|
+
return /* @__PURE__ */ a.jsx(bi, { ...o, ...r, ref: t });
|
|
1588
1588
|
}
|
|
1589
1589
|
);
|
|
1590
|
-
kr.displayName =
|
|
1591
|
-
var
|
|
1592
|
-
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1593
|
-
return /* @__PURE__ */ a.jsx(bi, { ...o, ...r, ref: t });
|
|
1594
|
-
});
|
|
1595
|
-
$r.displayName = $i;
|
|
1596
|
-
var Fi = "DropdownMenuRadioGroup", Li = h.forwardRef((e, t) => {
|
|
1590
|
+
kr.displayName = $i;
|
|
1591
|
+
var Fi = "DropdownMenuCheckboxItem", $r = h.forwardRef((e, t) => {
|
|
1597
1592
|
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1598
1593
|
return /* @__PURE__ */ a.jsx(Si, { ...o, ...r, ref: t });
|
|
1599
1594
|
});
|
|
1600
|
-
|
|
1601
|
-
var
|
|
1595
|
+
$r.displayName = Fi;
|
|
1596
|
+
var Li = "DropdownMenuRadioGroup", Bi = h.forwardRef((e, t) => {
|
|
1602
1597
|
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1603
1598
|
return /* @__PURE__ */ a.jsx(Ci, { ...o, ...r, ref: t });
|
|
1604
1599
|
});
|
|
1605
|
-
|
|
1606
|
-
var Hi = "
|
|
1600
|
+
Bi.displayName = Li;
|
|
1601
|
+
var Hi = "DropdownMenuRadioItem", Fr = h.forwardRef((e, t) => {
|
|
1607
1602
|
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1608
1603
|
return /* @__PURE__ */ a.jsx(Mi, { ...o, ...r, ref: t });
|
|
1609
1604
|
});
|
|
1610
|
-
|
|
1611
|
-
var Ui = "
|
|
1605
|
+
Fr.displayName = Hi;
|
|
1606
|
+
var Ui = "DropdownMenuItemIndicator", Lr = h.forwardRef((e, t) => {
|
|
1612
1607
|
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1613
1608
|
return /* @__PURE__ */ a.jsx(Ri, { ...o, ...r, ref: t });
|
|
1614
1609
|
});
|
|
1615
|
-
|
|
1616
|
-
var zi = "
|
|
1610
|
+
Lr.displayName = Ui;
|
|
1611
|
+
var zi = "DropdownMenuSeparator", Br = h.forwardRef((e, t) => {
|
|
1612
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1613
|
+
return /* @__PURE__ */ a.jsx(Ei, { ...o, ...r, ref: t });
|
|
1614
|
+
});
|
|
1615
|
+
Br.displayName = zi;
|
|
1616
|
+
var Ki = "DropdownMenuArrow", qi = h.forwardRef(
|
|
1617
1617
|
(e, t) => {
|
|
1618
1618
|
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1619
|
-
return /* @__PURE__ */ a.jsx(
|
|
1619
|
+
return /* @__PURE__ */ a.jsx(Di, { ...o, ...r, ref: t });
|
|
1620
1620
|
}
|
|
1621
1621
|
);
|
|
1622
|
-
|
|
1623
|
-
var
|
|
1622
|
+
qi.displayName = Ki;
|
|
1623
|
+
var Qi = (e) => {
|
|
1624
1624
|
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: s } = e, i = J(t), [l = !1, u] = Bn({
|
|
1625
1625
|
prop: r,
|
|
1626
1626
|
defaultProp: s,
|
|
1627
1627
|
onChange: o
|
|
1628
1628
|
});
|
|
1629
|
-
return /* @__PURE__ */ a.jsx(
|
|
1630
|
-
},
|
|
1629
|
+
return /* @__PURE__ */ a.jsx(Pi, { ...i, open: l, onOpenChange: u, children: n });
|
|
1630
|
+
}, Vi = "DropdownMenuSubTrigger", Hr = h.forwardRef((e, t) => {
|
|
1631
1631
|
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1632
|
-
return /* @__PURE__ */ a.jsx(
|
|
1632
|
+
return /* @__PURE__ */ a.jsx(ji, { ...o, ...r, ref: t });
|
|
1633
1633
|
});
|
|
1634
|
-
Hr.displayName =
|
|
1635
|
-
var
|
|
1634
|
+
Hr.displayName = Vi;
|
|
1635
|
+
var Gi = "DropdownMenuSubContent", Ur = h.forwardRef((e, t) => {
|
|
1636
1636
|
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1637
1637
|
return /* @__PURE__ */ a.jsx(
|
|
1638
|
-
|
|
1638
|
+
Ni,
|
|
1639
1639
|
{
|
|
1640
1640
|
...o,
|
|
1641
1641
|
...r,
|
|
@@ -1651,13 +1651,13 @@ var Vi = "DropdownMenuSubContent", Ur = h.forwardRef((e, t) => {
|
|
|
1651
1651
|
}
|
|
1652
1652
|
);
|
|
1653
1653
|
});
|
|
1654
|
-
Ur.displayName =
|
|
1655
|
-
var
|
|
1656
|
-
const
|
|
1654
|
+
Ur.displayName = Gi;
|
|
1655
|
+
var Wi = jr, Yi = Tr, zr = _r, Kr = Ir, qr = Ar, Qr = kr, Vr = $r, Gr = Fr, Wr = Lr, Yr = Br, Xi = Qi, Xr = Hr, Jr = Ur;
|
|
1656
|
+
const Ji = Wi, Zi = Yi, el = zr, tl = Xi, Zr = h.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
|
|
1657
1657
|
Xr,
|
|
1658
1658
|
{
|
|
1659
1659
|
ref: o,
|
|
1660
|
-
className:
|
|
1660
|
+
className: F(
|
|
1661
1661
|
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
1662
1662
|
t && "pl-8",
|
|
1663
1663
|
e
|
|
@@ -1674,7 +1674,7 @@ const ea = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
|
1674
1674
|
Jr,
|
|
1675
1675
|
{
|
|
1676
1676
|
ref: n,
|
|
1677
|
-
className:
|
|
1677
|
+
className: F(
|
|
1678
1678
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1679
1679
|
e
|
|
1680
1680
|
),
|
|
@@ -1687,7 +1687,7 @@ const ta = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
|
|
|
1687
1687
|
{
|
|
1688
1688
|
ref: r,
|
|
1689
1689
|
sideOffset: t,
|
|
1690
|
-
className:
|
|
1690
|
+
className: F(
|
|
1691
1691
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1692
1692
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1693
1693
|
e
|
|
@@ -1700,7 +1700,7 @@ const na = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
1700
1700
|
Qr,
|
|
1701
1701
|
{
|
|
1702
1702
|
ref: r,
|
|
1703
|
-
className:
|
|
1703
|
+
className: F(
|
|
1704
1704
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1705
1705
|
t && "pl-8",
|
|
1706
1706
|
e
|
|
@@ -1709,44 +1709,44 @@ const na = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
1709
1709
|
}
|
|
1710
1710
|
));
|
|
1711
1711
|
na.displayName = Qr.displayName;
|
|
1712
|
-
const
|
|
1712
|
+
const nl = h.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
|
|
1713
1713
|
Vr,
|
|
1714
1714
|
{
|
|
1715
1715
|
ref: o,
|
|
1716
|
-
className:
|
|
1716
|
+
className: F(
|
|
1717
1717
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1718
1718
|
e
|
|
1719
1719
|
),
|
|
1720
1720
|
checked: n,
|
|
1721
1721
|
...r,
|
|
1722
1722
|
children: [
|
|
1723
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(Wr, { children: /* @__PURE__ */ a.jsx(
|
|
1723
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(Wr, { children: /* @__PURE__ */ a.jsx(Uo, { className: "h-4 w-4" }) }) }),
|
|
1724
1724
|
t
|
|
1725
1725
|
]
|
|
1726
1726
|
}
|
|
1727
1727
|
));
|
|
1728
|
-
|
|
1729
|
-
const
|
|
1728
|
+
nl.displayName = Vr.displayName;
|
|
1729
|
+
const rl = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ a.jsxs(
|
|
1730
1730
|
Gr,
|
|
1731
1731
|
{
|
|
1732
1732
|
ref: r,
|
|
1733
|
-
className:
|
|
1733
|
+
className: F(
|
|
1734
1734
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1735
1735
|
e
|
|
1736
1736
|
),
|
|
1737
1737
|
...n,
|
|
1738
1738
|
children: [
|
|
1739
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(Wr, { children: /* @__PURE__ */ a.jsx(
|
|
1739
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(Wr, { children: /* @__PURE__ */ a.jsx(zo, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1740
1740
|
t
|
|
1741
1741
|
]
|
|
1742
1742
|
}
|
|
1743
1743
|
));
|
|
1744
|
-
|
|
1744
|
+
rl.displayName = Gr.displayName;
|
|
1745
1745
|
const ra = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ a.jsx(
|
|
1746
1746
|
qr,
|
|
1747
1747
|
{
|
|
1748
1748
|
ref: r,
|
|
1749
|
-
className:
|
|
1749
|
+
className: F(
|
|
1750
1750
|
"px-2 py-1.5 text-sm font-semibold",
|
|
1751
1751
|
t && "pl-8",
|
|
1752
1752
|
e
|
|
@@ -1759,7 +1759,7 @@ const aa = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
|
1759
1759
|
Yr,
|
|
1760
1760
|
{
|
|
1761
1761
|
ref: n,
|
|
1762
|
-
className:
|
|
1762
|
+
className: F("-mx-1 my-1 h-px bg-muted", e),
|
|
1763
1763
|
...t
|
|
1764
1764
|
}
|
|
1765
1765
|
));
|
|
@@ -1770,7 +1770,7 @@ const Rn = {
|
|
|
1770
1770
|
tip: "bg-green-600",
|
|
1771
1771
|
caution: "bg-orange-500",
|
|
1772
1772
|
danger: "bg-rose-500"
|
|
1773
|
-
},
|
|
1773
|
+
}, al = () => {
|
|
1774
1774
|
const { page: e } = qe(), [t, n] = Ie(!0);
|
|
1775
1775
|
if (!(e != null && e.banner) || !t)
|
|
1776
1776
|
return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
|
|
@@ -1778,7 +1778,7 @@ const Rn = {
|
|
|
1778
1778
|
return /* @__PURE__ */ a.jsxs(
|
|
1779
1779
|
"div",
|
|
1780
1780
|
{
|
|
1781
|
-
className:
|
|
1781
|
+
className: F(
|
|
1782
1782
|
"relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
|
|
1783
1783
|
r
|
|
1784
1784
|
),
|
|
@@ -1791,14 +1791,14 @@ const Rn = {
|
|
|
1791
1791
|
type: "button",
|
|
1792
1792
|
className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
|
|
1793
1793
|
onClick: () => n(!1),
|
|
1794
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1794
|
+
children: /* @__PURE__ */ a.jsx(Ko, { size: 16 })
|
|
1795
1795
|
}
|
|
1796
1796
|
)
|
|
1797
1797
|
]
|
|
1798
1798
|
}
|
|
1799
1799
|
);
|
|
1800
1800
|
};
|
|
1801
|
-
function
|
|
1801
|
+
function ol(e) {
|
|
1802
1802
|
if (typeof document > "u") return;
|
|
1803
1803
|
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
1804
1804
|
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
@@ -1856,41 +1856,41 @@ const oa = p.createContext({
|
|
|
1856
1856
|
throw new Error("useDrawerContext must be used within a Drawer.Root");
|
|
1857
1857
|
return e;
|
|
1858
1858
|
};
|
|
1859
|
-
|
|
1859
|
+
ol(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
1860
1860
|
[data-state=closed]
|
|
1861
1861
|
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);
|
|
1862
|
-
function
|
|
1862
|
+
function sl() {
|
|
1863
1863
|
const e = navigator.userAgent;
|
|
1864
1864
|
return typeof window < "u" && (/Firefox/.test(e) && /Mobile/.test(e) || // Android Firefox
|
|
1865
1865
|
/FxiOS/.test(e));
|
|
1866
1866
|
}
|
|
1867
|
-
function
|
|
1867
|
+
function il() {
|
|
1868
1868
|
return Jt(/^Mac/);
|
|
1869
1869
|
}
|
|
1870
|
-
function
|
|
1870
|
+
function ll() {
|
|
1871
1871
|
return Jt(/^iPhone/);
|
|
1872
1872
|
}
|
|
1873
1873
|
function En() {
|
|
1874
1874
|
return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
1875
1875
|
}
|
|
1876
|
-
function
|
|
1876
|
+
function cl() {
|
|
1877
1877
|
return Jt(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
1878
|
-
|
|
1878
|
+
il() && navigator.maxTouchPoints > 1;
|
|
1879
1879
|
}
|
|
1880
1880
|
function sa() {
|
|
1881
|
-
return
|
|
1881
|
+
return ll() || cl();
|
|
1882
1882
|
}
|
|
1883
1883
|
function Jt(e) {
|
|
1884
1884
|
return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
|
|
1885
1885
|
}
|
|
1886
|
-
const
|
|
1886
|
+
const ul = 24, dl = typeof window < "u" ? Co : Ce;
|
|
1887
1887
|
function Dn(...e) {
|
|
1888
1888
|
return (...t) => {
|
|
1889
1889
|
for (let n of e)
|
|
1890
1890
|
typeof n == "function" && n(...t);
|
|
1891
1891
|
};
|
|
1892
1892
|
}
|
|
1893
|
-
const
|
|
1893
|
+
const Rt = typeof document < "u" && window.visualViewport;
|
|
1894
1894
|
function Pn(e) {
|
|
1895
1895
|
let t = window.getComputedStyle(e);
|
|
1896
1896
|
return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
|
|
@@ -1900,7 +1900,7 @@ function ia(e) {
|
|
|
1900
1900
|
e = e.parentElement;
|
|
1901
1901
|
return e || document.scrollingElement || document.documentElement;
|
|
1902
1902
|
}
|
|
1903
|
-
const
|
|
1903
|
+
const fl = /* @__PURE__ */ new Set([
|
|
1904
1904
|
"checkbox",
|
|
1905
1905
|
"radio",
|
|
1906
1906
|
"range",
|
|
@@ -1911,19 +1911,19 @@ const dl = /* @__PURE__ */ new Set([
|
|
|
1911
1911
|
"submit",
|
|
1912
1912
|
"reset"
|
|
1913
1913
|
]);
|
|
1914
|
-
let ht = 0,
|
|
1915
|
-
function
|
|
1914
|
+
let ht = 0, Et;
|
|
1915
|
+
function hl(e = {}) {
|
|
1916
1916
|
let { isDisabled: t } = e;
|
|
1917
|
-
|
|
1917
|
+
dl(() => {
|
|
1918
1918
|
if (!t)
|
|
1919
|
-
return ht++, ht === 1 && sa() && (
|
|
1920
|
-
ht--, ht === 0 && (
|
|
1919
|
+
return ht++, ht === 1 && sa() && (Et = pl()), () => {
|
|
1920
|
+
ht--, ht === 0 && (Et == null || Et());
|
|
1921
1921
|
};
|
|
1922
1922
|
}, [
|
|
1923
1923
|
t
|
|
1924
1924
|
]);
|
|
1925
1925
|
}
|
|
1926
|
-
function
|
|
1926
|
+
function pl() {
|
|
1927
1927
|
let e, t = 0, n = (c) => {
|
|
1928
1928
|
e = ia(c.target), !(e === document.documentElement && e === document.body) && (t = c.changedTouches[0].pageY);
|
|
1929
1929
|
}, r = (c) => {
|
|
@@ -1931,25 +1931,25 @@ function hl() {
|
|
|
1931
1931
|
c.preventDefault();
|
|
1932
1932
|
return;
|
|
1933
1933
|
}
|
|
1934
|
-
let d = c.changedTouches[0].pageY,
|
|
1935
|
-
|
|
1934
|
+
let d = c.changedTouches[0].pageY, R = e.scrollTop, C = e.scrollHeight - e.clientHeight;
|
|
1935
|
+
C !== 0 && ((R <= 0 && d > t || R >= C && d < t) && c.preventDefault(), t = d);
|
|
1936
1936
|
}, o = (c) => {
|
|
1937
1937
|
let d = c.target;
|
|
1938
|
-
|
|
1938
|
+
_t(d) && d !== document.activeElement && (c.preventDefault(), d.style.transform = "translateY(-2000px)", d.focus(), requestAnimationFrame(() => {
|
|
1939
1939
|
d.style.transform = "";
|
|
1940
1940
|
}));
|
|
1941
1941
|
}, s = (c) => {
|
|
1942
1942
|
let d = c.target;
|
|
1943
|
-
|
|
1944
|
-
d.style.transform = "",
|
|
1943
|
+
_t(d) && (d.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
1944
|
+
d.style.transform = "", Rt && (Rt.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
1945
1945
|
jn(d);
|
|
1946
|
-
}) :
|
|
1946
|
+
}) : Rt.addEventListener("resize", () => jn(d), {
|
|
1947
1947
|
once: !0
|
|
1948
1948
|
}));
|
|
1949
1949
|
}));
|
|
1950
1950
|
}, i = () => {
|
|
1951
1951
|
window.scrollTo(0, 0);
|
|
1952
|
-
}, l = window.pageXOffset, u = window.pageYOffset, m = Dn(
|
|
1952
|
+
}, l = window.pageXOffset, u = window.pageYOffset, m = Dn(ml(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
1953
1953
|
window.scrollTo(0, 0);
|
|
1954
1954
|
let f = Dn(We(document, "touchstart", n, {
|
|
1955
1955
|
passive: !1,
|
|
@@ -1965,7 +1965,7 @@ function hl() {
|
|
|
1965
1965
|
m(), f(), window.scrollTo(l, u);
|
|
1966
1966
|
};
|
|
1967
1967
|
}
|
|
1968
|
-
function
|
|
1968
|
+
function ml(e, t, n) {
|
|
1969
1969
|
let r = e.style[t];
|
|
1970
1970
|
return e.style[t] = n, () => {
|
|
1971
1971
|
e.style[t] = r;
|
|
@@ -1982,23 +1982,23 @@ function jn(e) {
|
|
|
1982
1982
|
let n = ia(e);
|
|
1983
1983
|
if (n !== document.documentElement && n !== document.body && n !== e) {
|
|
1984
1984
|
let r = n.getBoundingClientRect().top, o = e.getBoundingClientRect().top, s = e.getBoundingClientRect().bottom;
|
|
1985
|
-
const i = n.getBoundingClientRect().bottom +
|
|
1985
|
+
const i = n.getBoundingClientRect().bottom + ul;
|
|
1986
1986
|
s > i && (n.scrollTop += o - r);
|
|
1987
1987
|
}
|
|
1988
1988
|
e = n.parentElement;
|
|
1989
1989
|
}
|
|
1990
1990
|
}
|
|
1991
|
-
function
|
|
1992
|
-
return e instanceof HTMLInputElement && !
|
|
1991
|
+
function _t(e) {
|
|
1992
|
+
return e instanceof HTMLInputElement && !fl.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
1993
1993
|
}
|
|
1994
|
-
function
|
|
1994
|
+
function gl(e, t) {
|
|
1995
1995
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
1996
1996
|
}
|
|
1997
|
-
function
|
|
1998
|
-
return (t) => e.forEach((n) =>
|
|
1997
|
+
function vl(...e) {
|
|
1998
|
+
return (t) => e.forEach((n) => gl(n, t));
|
|
1999
1999
|
}
|
|
2000
2000
|
function la(...e) {
|
|
2001
|
-
return h.useCallback(
|
|
2001
|
+
return h.useCallback(vl(...e), e);
|
|
2002
2002
|
}
|
|
2003
2003
|
const ca = /* @__PURE__ */ new WeakMap();
|
|
2004
2004
|
function H(e, t, n = !1) {
|
|
@@ -2012,7 +2012,7 @@ function H(e, t, n = !1) {
|
|
|
2012
2012
|
r[o] = e.style[o], e.style[o] = s;
|
|
2013
2013
|
}), !n && ca.set(e, r);
|
|
2014
2014
|
}
|
|
2015
|
-
function
|
|
2015
|
+
function wl(e, t) {
|
|
2016
2016
|
if (!e || !(e instanceof HTMLElement)) return;
|
|
2017
2017
|
let n = ca.get(e);
|
|
2018
2018
|
n && (e.style[t] = n[t]);
|
|
@@ -2039,10 +2039,10 @@ function pt(e, t) {
|
|
|
2039
2039
|
let o = r.match(/^matrix3d\((.+)\)$/);
|
|
2040
2040
|
return o ? parseFloat(o[1].split(", ")[U(t) ? 13 : 12]) : (o = r.match(/^matrix\((.+)\)$/), o ? parseFloat(o[1].split(", ")[U(t) ? 5 : 4]) : null);
|
|
2041
2041
|
}
|
|
2042
|
-
function
|
|
2042
|
+
function xl(e) {
|
|
2043
2043
|
return 8 * (Math.log(e + 1) - 2);
|
|
2044
2044
|
}
|
|
2045
|
-
function
|
|
2045
|
+
function Dt(e, t) {
|
|
2046
2046
|
if (!e) return () => {
|
|
2047
2047
|
};
|
|
2048
2048
|
const n = e.style.cssText;
|
|
@@ -2050,13 +2050,13 @@ function Et(e, t) {
|
|
|
2050
2050
|
e.style.cssText = n;
|
|
2051
2051
|
};
|
|
2052
2052
|
}
|
|
2053
|
-
function
|
|
2053
|
+
function yl(...e) {
|
|
2054
2054
|
return (...t) => {
|
|
2055
2055
|
for (const n of e)
|
|
2056
2056
|
typeof n == "function" && n(...t);
|
|
2057
2057
|
};
|
|
2058
2058
|
}
|
|
2059
|
-
const
|
|
2059
|
+
const k = {
|
|
2060
2060
|
DURATION: 0.5,
|
|
2061
2061
|
EASE: [
|
|
2062
2062
|
0.32,
|
|
@@ -2064,14 +2064,14 @@ const $ = {
|
|
|
2064
2064
|
0,
|
|
2065
2065
|
1
|
|
2066
2066
|
]
|
|
2067
|
-
}, ua = 0.4,
|
|
2067
|
+
}, ua = 0.4, bl = 0.25, Sl = 100, da = 8, Oe = 16, Ot = 26, Pt = "vaul-dragging";
|
|
2068
2068
|
function fa(e) {
|
|
2069
2069
|
const t = p.useRef(e);
|
|
2070
2070
|
return p.useEffect(() => {
|
|
2071
2071
|
t.current = e;
|
|
2072
2072
|
}), p.useMemo(() => (...n) => t.current == null ? void 0 : t.current.call(t, ...n), []);
|
|
2073
2073
|
}
|
|
2074
|
-
function
|
|
2074
|
+
function Cl({ defaultProp: e, onChange: t }) {
|
|
2075
2075
|
const n = p.useState(e), [r] = n, o = p.useRef(r), s = fa(t);
|
|
2076
2076
|
return p.useEffect(() => {
|
|
2077
2077
|
o.current !== r && (s(r), o.current = r);
|
|
@@ -2083,7 +2083,7 @@ function Sl({ defaultProp: e, onChange: t }) {
|
|
|
2083
2083
|
}
|
|
2084
2084
|
function ha({ prop: e, defaultProp: t, onChange: n = () => {
|
|
2085
2085
|
} }) {
|
|
2086
|
-
const [r, o] =
|
|
2086
|
+
const [r, o] = Cl({
|
|
2087
2087
|
defaultProp: t,
|
|
2088
2088
|
onChange: n
|
|
2089
2089
|
}), s = e !== void 0, i = s ? e : r, l = fa(n), u = p.useCallback((m) => {
|
|
@@ -2103,34 +2103,34 @@ function ha({ prop: e, defaultProp: t, onChange: n = () => {
|
|
|
2103
2103
|
u
|
|
2104
2104
|
];
|
|
2105
2105
|
}
|
|
2106
|
-
function
|
|
2106
|
+
function Ml({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: o, fadeFromIndex: s, onSnapPointChange: i, direction: l = "bottom", container: u, snapToSequentialPoint: m }) {
|
|
2107
2107
|
const [f, c] = ha({
|
|
2108
2108
|
prop: e,
|
|
2109
2109
|
defaultProp: n == null ? void 0 : n[0],
|
|
2110
2110
|
onChange: t
|
|
2111
|
-
}), [d,
|
|
2111
|
+
}), [d, R] = p.useState(typeof window < "u" ? {
|
|
2112
2112
|
innerWidth: window.innerWidth,
|
|
2113
2113
|
innerHeight: window.innerHeight
|
|
2114
2114
|
} : void 0);
|
|
2115
2115
|
p.useEffect(() => {
|
|
2116
2116
|
function b() {
|
|
2117
|
-
|
|
2117
|
+
R({
|
|
2118
2118
|
innerWidth: window.innerWidth,
|
|
2119
2119
|
innerHeight: window.innerHeight
|
|
2120
2120
|
});
|
|
2121
2121
|
}
|
|
2122
2122
|
return window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
|
|
2123
2123
|
}, []);
|
|
2124
|
-
const
|
|
2124
|
+
const C = p.useMemo(() => f === (n == null ? void 0 : n[n.length - 1]) || null, [
|
|
2125
2125
|
n,
|
|
2126
2126
|
f
|
|
2127
|
-
]),
|
|
2127
|
+
]), g = p.useMemo(() => {
|
|
2128
2128
|
var b;
|
|
2129
2129
|
return (b = n == null ? void 0 : n.findIndex((j) => j === f)) != null ? b : null;
|
|
2130
2130
|
}, [
|
|
2131
2131
|
n,
|
|
2132
2132
|
f
|
|
2133
|
-
]),
|
|
2133
|
+
]), T = n && n.length > 0 && (s || s === 0) && !Number.isNaN(s) && n[s] === f || !n, M = p.useMemo(() => {
|
|
2134
2134
|
const b = u ? {
|
|
2135
2135
|
width: u.getBoundingClientRect().width,
|
|
2136
2136
|
height: u.getBoundingClientRect().height
|
|
@@ -2156,26 +2156,26 @@ function Cl({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
2156
2156
|
n,
|
|
2157
2157
|
d,
|
|
2158
2158
|
u
|
|
2159
|
-
]),
|
|
2160
|
-
|
|
2161
|
-
|
|
2159
|
+
]), A = p.useMemo(() => g !== null ? M == null ? void 0 : M[g] : null, [
|
|
2160
|
+
M,
|
|
2161
|
+
g
|
|
2162
2162
|
]), P = p.useCallback((b) => {
|
|
2163
2163
|
var j;
|
|
2164
|
-
const D = (j =
|
|
2164
|
+
const D = (j = M == null ? void 0 : M.findIndex((B) => B === b)) != null ? j : null;
|
|
2165
2165
|
i(D), H(r.current, {
|
|
2166
|
-
transition: `transform ${
|
|
2166
|
+
transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
|
|
2167
2167
|
transform: U(l) ? `translate3d(0, ${b}px, 0)` : `translate3d(${b}px, 0, 0)`
|
|
2168
|
-
}),
|
|
2169
|
-
transition: `opacity ${
|
|
2168
|
+
}), M && D !== M.length - 1 && s !== void 0 && D !== s && D < s ? H(o.current, {
|
|
2169
|
+
transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
|
|
2170
2170
|
opacity: "0"
|
|
2171
2171
|
}) : H(o.current, {
|
|
2172
|
-
transition: `opacity ${
|
|
2172
|
+
transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
|
|
2173
2173
|
opacity: "1"
|
|
2174
2174
|
}), c(n == null ? void 0 : n[Math.max(D, 0)]);
|
|
2175
2175
|
}, [
|
|
2176
2176
|
r.current,
|
|
2177
2177
|
n,
|
|
2178
|
-
|
|
2178
|
+
M,
|
|
2179
2179
|
s,
|
|
2180
2180
|
o,
|
|
2181
2181
|
c
|
|
@@ -2184,91 +2184,91 @@ function Cl({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
2184
2184
|
if (f || e) {
|
|
2185
2185
|
var b;
|
|
2186
2186
|
const j = (b = n == null ? void 0 : n.findIndex((D) => D === e || D === f)) != null ? b : -1;
|
|
2187
|
-
|
|
2187
|
+
M && j !== -1 && typeof M[j] == "number" && P(M[j]);
|
|
2188
2188
|
}
|
|
2189
2189
|
}, [
|
|
2190
2190
|
f,
|
|
2191
2191
|
e,
|
|
2192
2192
|
n,
|
|
2193
|
-
|
|
2193
|
+
M,
|
|
2194
2194
|
P
|
|
2195
2195
|
]);
|
|
2196
|
-
function
|
|
2196
|
+
function v({ draggedDistance: b, closeDrawer: j, velocity: D, dismissible: B }) {
|
|
2197
2197
|
if (s === void 0) return;
|
|
2198
|
-
const K = l === "bottom" || l === "right" ? (
|
|
2198
|
+
const K = l === "bottom" || l === "right" ? (A ?? 0) - b : (A ?? 0) + b, W = g === s - 1, x = g === 0, V = b > 0;
|
|
2199
2199
|
if (W && H(o.current, {
|
|
2200
|
-
transition: `opacity ${
|
|
2200
|
+
transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`
|
|
2201
2201
|
}), !m && D > 2 && !V) {
|
|
2202
|
-
B ? j() : P(
|
|
2202
|
+
B ? j() : P(M[0]);
|
|
2203
2203
|
return;
|
|
2204
2204
|
}
|
|
2205
|
-
if (!m && D > 2 && V &&
|
|
2206
|
-
P(
|
|
2205
|
+
if (!m && D > 2 && V && M && n) {
|
|
2206
|
+
P(M[n.length - 1]);
|
|
2207
2207
|
return;
|
|
2208
2208
|
}
|
|
2209
|
-
const G =
|
|
2209
|
+
const G = M == null ? void 0 : M.reduce((q, Y) => typeof q != "number" || typeof Y != "number" ? q : Math.abs(Y - K) < Math.abs(q - K) ? Y : q), te = U(l) ? window.innerHeight : window.innerWidth;
|
|
2210
2210
|
if (D > ua && Math.abs(b) < te * 0.4) {
|
|
2211
2211
|
const q = V ? 1 : -1;
|
|
2212
|
-
if (q > 0 &&
|
|
2213
|
-
P(
|
|
2212
|
+
if (q > 0 && C && n) {
|
|
2213
|
+
P(M[n.length - 1]);
|
|
2214
2214
|
return;
|
|
2215
2215
|
}
|
|
2216
|
-
if (x && q < 0 && B && j(),
|
|
2217
|
-
P(
|
|
2216
|
+
if (x && q < 0 && B && j(), g === null) return;
|
|
2217
|
+
P(M[g + q]);
|
|
2218
2218
|
return;
|
|
2219
2219
|
}
|
|
2220
2220
|
P(G);
|
|
2221
2221
|
}
|
|
2222
2222
|
function z({ draggedDistance: b }) {
|
|
2223
|
-
if (
|
|
2224
|
-
const j = l === "bottom" || l === "right" ?
|
|
2225
|
-
(l === "bottom" || l === "right") && j <
|
|
2223
|
+
if (A === null) return;
|
|
2224
|
+
const j = l === "bottom" || l === "right" ? A - b : A + b;
|
|
2225
|
+
(l === "bottom" || l === "right") && j < M[M.length - 1] || (l === "top" || l === "left") && j > M[M.length - 1] || H(r.current, {
|
|
2226
2226
|
transform: U(l) ? `translate3d(0, ${j}px, 0)` : `translate3d(${j}px, 0, 0)`
|
|
2227
2227
|
});
|
|
2228
2228
|
}
|
|
2229
2229
|
function Z(b, j) {
|
|
2230
|
-
if (!n || typeof
|
|
2231
|
-
const D =
|
|
2232
|
-
if (
|
|
2230
|
+
if (!n || typeof g != "number" || !M || s === void 0) return null;
|
|
2231
|
+
const D = g === s - 1;
|
|
2232
|
+
if (g >= s && j)
|
|
2233
2233
|
return 0;
|
|
2234
2234
|
if (D && !j) return 1;
|
|
2235
|
-
if (!
|
|
2236
|
-
const K = D ?
|
|
2235
|
+
if (!T && !D) return null;
|
|
2236
|
+
const K = D ? g + 1 : g - 1, W = D ? M[K] - M[K - 1] : M[K + 1] - M[K], x = b / Math.abs(W);
|
|
2237
2237
|
return D ? 1 - x : x;
|
|
2238
2238
|
}
|
|
2239
2239
|
return {
|
|
2240
|
-
isLastSnapPoint:
|
|
2240
|
+
isLastSnapPoint: C,
|
|
2241
2241
|
activeSnapPoint: f,
|
|
2242
|
-
shouldFade:
|
|
2242
|
+
shouldFade: T,
|
|
2243
2243
|
getPercentageDragged: Z,
|
|
2244
2244
|
setActiveSnapPoint: c,
|
|
2245
|
-
activeSnapPointIndex:
|
|
2246
|
-
onRelease:
|
|
2245
|
+
activeSnapPointIndex: g,
|
|
2246
|
+
onRelease: v,
|
|
2247
2247
|
onDrag: z,
|
|
2248
|
-
snapPointsOffset:
|
|
2248
|
+
snapPointsOffset: M
|
|
2249
2249
|
};
|
|
2250
2250
|
}
|
|
2251
|
-
const
|
|
2251
|
+
const Rl = () => () => {
|
|
2252
2252
|
};
|
|
2253
|
-
function
|
|
2253
|
+
function El() {
|
|
2254
2254
|
const { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: o } = Qe(), s = p.useRef(null), i = mt(() => document.body.style.backgroundColor, []);
|
|
2255
2255
|
function l() {
|
|
2256
|
-
return (window.innerWidth -
|
|
2256
|
+
return (window.innerWidth - Ot) / window.innerWidth;
|
|
2257
2257
|
}
|
|
2258
2258
|
p.useEffect(() => {
|
|
2259
2259
|
if (t && n) {
|
|
2260
2260
|
s.current && clearTimeout(s.current);
|
|
2261
2261
|
const u = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
|
|
2262
2262
|
if (!u) return;
|
|
2263
|
-
|
|
2263
|
+
yl(r && !o ? Dt(document.body, {
|
|
2264
2264
|
background: "black"
|
|
2265
|
-
}) :
|
|
2265
|
+
}) : Rl, Dt(u, {
|
|
2266
2266
|
transformOrigin: U(e) ? "top" : "left",
|
|
2267
2267
|
transitionProperty: "transform, border-radius",
|
|
2268
|
-
transitionDuration: `${
|
|
2269
|
-
transitionTimingFunction: `cubic-bezier(${
|
|
2268
|
+
transitionDuration: `${k.DURATION}s`,
|
|
2269
|
+
transitionTimingFunction: `cubic-bezier(${k.EASE.join(",")})`
|
|
2270
2270
|
}));
|
|
2271
|
-
const m =
|
|
2271
|
+
const m = Dt(u, {
|
|
2272
2272
|
borderRadius: `${da}px`,
|
|
2273
2273
|
overflow: "hidden",
|
|
2274
2274
|
...U(e) ? {
|
|
@@ -2280,7 +2280,7 @@ function Rl() {
|
|
|
2280
2280
|
return () => {
|
|
2281
2281
|
m(), s.current = window.setTimeout(() => {
|
|
2282
2282
|
i ? document.body.style.background = i : document.body.style.removeProperty("background");
|
|
2283
|
-
},
|
|
2283
|
+
}, k.DURATION * 1e3);
|
|
2284
2284
|
};
|
|
2285
2285
|
}
|
|
2286
2286
|
}, [
|
|
@@ -2290,7 +2290,7 @@ function Rl() {
|
|
|
2290
2290
|
]);
|
|
2291
2291
|
}
|
|
2292
2292
|
let Ye = null;
|
|
2293
|
-
function
|
|
2293
|
+
function Dl({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: o, noBodyStyles: s }) {
|
|
2294
2294
|
const [i, l] = p.useState(() => typeof window < "u" ? window.location.href : ""), u = p.useRef(0), m = p.useCallback(() => {
|
|
2295
2295
|
if (En() && Ye === null && e && !s) {
|
|
2296
2296
|
Ye = {
|
|
@@ -2307,8 +2307,8 @@ function El({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRes
|
|
|
2307
2307
|
right: "0px",
|
|
2308
2308
|
height: "auto"
|
|
2309
2309
|
}), window.setTimeout(() => window.requestAnimationFrame(() => {
|
|
2310
|
-
const
|
|
2311
|
-
|
|
2310
|
+
const R = d - window.innerHeight;
|
|
2311
|
+
R && u.current >= d && (document.body.style.top = `${-(u.current + R)}px`);
|
|
2312
2312
|
}), 300);
|
|
2313
2313
|
}
|
|
2314
2314
|
}, [
|
|
@@ -2358,67 +2358,67 @@ function El({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRes
|
|
|
2358
2358
|
restorePositionSetting: f
|
|
2359
2359
|
};
|
|
2360
2360
|
}
|
|
2361
|
-
function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: s, shouldScaleBackground: i = !1, setBackgroundColorOnScale: l = !0, closeThreshold: u =
|
|
2361
|
+
function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: s, shouldScaleBackground: i = !1, setBackgroundColorOnScale: l = !0, closeThreshold: u = bl, scrollLockTimeout: m = Sl, dismissible: f = !0, handleOnly: c = !1, fadeFromIndex: d = s && s.length - 1, activeSnapPoint: R, setActiveSnapPoint: C, fixed: g, modal: T = !0, onClose: M, nested: A, noBodyStyles: P = !1, direction: v = "bottom", defaultOpen: z = !1, disablePreventScroll: Z = !0, snapToSequentialPoint: b = !1, preventScrollRestoration: j = !1, repositionInputs: D = !0, onAnimationEnd: B, container: K, autoFocus: W = !1 }) {
|
|
2362
2362
|
var x, V;
|
|
2363
2363
|
const [G = !1, te] = ha({
|
|
2364
2364
|
defaultProp: z,
|
|
2365
2365
|
prop: e,
|
|
2366
2366
|
onChange: (S) => {
|
|
2367
|
-
t == null || t(S), !S && !
|
|
2367
|
+
t == null || t(S), !S && !A && _a(), setTimeout(() => {
|
|
2368
2368
|
B == null || B(S);
|
|
2369
|
-
},
|
|
2369
|
+
}, k.DURATION * 1e3), S && !T && typeof window < "u" && window.requestAnimationFrame(() => {
|
|
2370
2370
|
document.body.style.pointerEvents = "auto";
|
|
2371
2371
|
}), S || (document.body.style.pointerEvents = "auto");
|
|
2372
2372
|
}
|
|
2373
|
-
}), [q, Y] = p.useState(!1), [y, Q] = p.useState(!1), [ie, de] = p.useState(!1), pe = p.useRef(null), Me = p.useRef(null), ke = p.useRef(null), ye = p.useRef(null), le = p.useRef(null), Re = p.useRef(!1), re = p.useRef(null), $e = p.useRef(0), Fe = p.useRef(!1), nn = p.useRef(!z), rn = p.useRef(0), E = p.useRef(null), an = p.useRef(((x = E.current) == null ? void 0 : x.getBoundingClientRect().height) || 0), on = p.useRef(((V = E.current) == null ? void 0 : V.getBoundingClientRect().width) || 0),
|
|
2373
|
+
}), [q, Y] = p.useState(!1), [y, Q] = p.useState(!1), [ie, de] = p.useState(!1), pe = p.useRef(null), Me = p.useRef(null), ke = p.useRef(null), ye = p.useRef(null), le = p.useRef(null), Re = p.useRef(!1), re = p.useRef(null), $e = p.useRef(0), Fe = p.useRef(!1), nn = p.useRef(!z), rn = p.useRef(0), E = p.useRef(null), an = p.useRef(((x = E.current) == null ? void 0 : x.getBoundingClientRect().height) || 0), on = p.useRef(((V = E.current) == null ? void 0 : V.getBoundingClientRect().width) || 0), St = p.useRef(0), Da = p.useCallback((S) => {
|
|
2374
2374
|
s && S === Ve.length - 1 && (Me.current = /* @__PURE__ */ new Date());
|
|
2375
|
-
}, []), { activeSnapPoint: Pa, activeSnapPointIndex: Le, setActiveSnapPoint: sn, onRelease: ja, snapPointsOffset: Ve, onDrag: Na, shouldFade: ln, getPercentageDragged: Ta } =
|
|
2375
|
+
}, []), { activeSnapPoint: Pa, activeSnapPointIndex: Le, setActiveSnapPoint: sn, onRelease: ja, snapPointsOffset: Ve, onDrag: Na, shouldFade: ln, getPercentageDragged: Ta } = Ml({
|
|
2376
2376
|
snapPoints: s,
|
|
2377
|
-
activeSnapPointProp:
|
|
2378
|
-
setActiveSnapPointProp:
|
|
2377
|
+
activeSnapPointProp: R,
|
|
2378
|
+
setActiveSnapPointProp: C,
|
|
2379
2379
|
drawerRef: E,
|
|
2380
2380
|
fadeFromIndex: d,
|
|
2381
2381
|
overlayRef: pe,
|
|
2382
2382
|
onSnapPointChange: Da,
|
|
2383
|
-
direction:
|
|
2383
|
+
direction: v,
|
|
2384
2384
|
container: K,
|
|
2385
2385
|
snapToSequentialPoint: b
|
|
2386
2386
|
});
|
|
2387
|
-
|
|
2388
|
-
isDisabled: !G || y || !
|
|
2387
|
+
hl({
|
|
2388
|
+
isDisabled: !G || y || !T || ie || !q || !D || !Z
|
|
2389
2389
|
});
|
|
2390
|
-
const { restorePositionSetting: _a } =
|
|
2390
|
+
const { restorePositionSetting: _a } = Dl({
|
|
2391
2391
|
isOpen: G,
|
|
2392
|
-
modal:
|
|
2393
|
-
nested:
|
|
2392
|
+
modal: T,
|
|
2393
|
+
nested: A ?? !1,
|
|
2394
2394
|
hasBeenOpened: q,
|
|
2395
2395
|
preventScrollRestoration: j,
|
|
2396
2396
|
noBodyStyles: P
|
|
2397
2397
|
});
|
|
2398
2398
|
function lt() {
|
|
2399
|
-
return (window.innerWidth -
|
|
2399
|
+
return (window.innerWidth - Ot) / window.innerWidth;
|
|
2400
2400
|
}
|
|
2401
2401
|
function Oa(S) {
|
|
2402
|
-
var
|
|
2403
|
-
!f && !s || E.current && !E.current.contains(S.target) || (an.current = ((
|
|
2402
|
+
var _, O;
|
|
2403
|
+
!f && !s || E.current && !E.current.contains(S.target) || (an.current = ((_ = E.current) == null ? void 0 : _.getBoundingClientRect().height) || 0, on.current = ((O = E.current) == null ? void 0 : O.getBoundingClientRect().width) || 0, Q(!0), ke.current = /* @__PURE__ */ new Date(), sa() && window.addEventListener("touchend", () => Re.current = !1, {
|
|
2404
2404
|
once: !0
|
|
2405
|
-
}), S.target.setPointerCapture(S.pointerId), $e.current = U(
|
|
2405
|
+
}), S.target.setPointerCapture(S.pointerId), $e.current = U(v) ? S.pageY : S.pageX);
|
|
2406
2406
|
}
|
|
2407
|
-
function cn(S,
|
|
2408
|
-
var
|
|
2407
|
+
function cn(S, _) {
|
|
2408
|
+
var O;
|
|
2409
2409
|
let N = S;
|
|
2410
|
-
const L = (
|
|
2410
|
+
const L = (O = window.getSelection()) == null ? void 0 : O.toString(), ne = E.current ? pt(E.current, v) : null, ee = /* @__PURE__ */ new Date();
|
|
2411
2411
|
if (N.tagName === "SELECT" || N.hasAttribute("data-vaul-no-drag") || N.closest("[data-vaul-no-drag]"))
|
|
2412
2412
|
return !1;
|
|
2413
|
-
if (
|
|
2413
|
+
if (v === "right" || v === "left")
|
|
2414
2414
|
return !0;
|
|
2415
2415
|
if (Me.current && ee.getTime() - Me.current.getTime() < 500)
|
|
2416
2416
|
return !1;
|
|
2417
|
-
if (ne !== null && (
|
|
2417
|
+
if (ne !== null && (v === "bottom" ? ne > 0 : ne < 0))
|
|
2418
2418
|
return !0;
|
|
2419
2419
|
if (L && L.length > 0)
|
|
2420
2420
|
return !1;
|
|
2421
|
-
if (le.current && ee.getTime() - le.current.getTime() < m && ne === 0 ||
|
|
2421
|
+
if (le.current && ee.getTime() - le.current.getTime() < m && ne === 0 || _)
|
|
2422
2422
|
return le.current = ee, !1;
|
|
2423
2423
|
for (; N; ) {
|
|
2424
2424
|
if (N.scrollHeight > N.clientHeight) {
|
|
@@ -2433,22 +2433,22 @@ function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
2433
2433
|
}
|
|
2434
2434
|
function Ia(S) {
|
|
2435
2435
|
if (E.current && y) {
|
|
2436
|
-
const
|
|
2436
|
+
const _ = v === "bottom" || v === "right" ? 1 : -1, O = ($e.current - (U(v) ? S.pageY : S.pageX)) * _, N = O > 0, L = s && !f && !N;
|
|
2437
2437
|
if (L && Le === 0) return;
|
|
2438
|
-
const ne = Math.abs(
|
|
2438
|
+
const ne = Math.abs(O), ee = document.querySelector("[data-vaul-drawer-wrapper]"), Ee = v === "bottom" || v === "top" ? an.current : on.current;
|
|
2439
2439
|
let fe = ne / Ee;
|
|
2440
2440
|
const _e = Ta(ne, N);
|
|
2441
2441
|
if (_e !== null && (fe = _e), L && fe >= 1 || !Re.current && !cn(S.target, N)) return;
|
|
2442
|
-
if (E.current.classList.add(
|
|
2442
|
+
if (E.current.classList.add(Pt), Re.current = !0, H(E.current, {
|
|
2443
2443
|
transition: "none"
|
|
2444
2444
|
}), H(pe.current, {
|
|
2445
2445
|
transition: "none"
|
|
2446
2446
|
}), s && Na({
|
|
2447
|
-
draggedDistance:
|
|
2447
|
+
draggedDistance: O
|
|
2448
2448
|
}), N && !s) {
|
|
2449
|
-
const me =
|
|
2449
|
+
const me = xl(O), ct = Math.min(me * -1, 0) * _;
|
|
2450
2450
|
H(E.current, {
|
|
2451
|
-
transform: U(
|
|
2451
|
+
transform: U(v) ? `translate3d(0, ${ct}px, 0)` : `translate3d(${ct}px, 0, 0)`
|
|
2452
2452
|
});
|
|
2453
2453
|
return;
|
|
2454
2454
|
}
|
|
@@ -2460,14 +2460,14 @@ function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
2460
2460
|
const me = Math.min(lt() + fe * (1 - lt()), 1), ct = 8 - fe * 8, dn = Math.max(0, 14 - fe * 14);
|
|
2461
2461
|
H(ee, {
|
|
2462
2462
|
borderRadius: `${ct}px`,
|
|
2463
|
-
transform: U(
|
|
2463
|
+
transform: U(v) ? `scale(${me}) translate3d(0, ${dn}px, 0)` : `scale(${me}) translate3d(${dn}px, 0, 0)`,
|
|
2464
2464
|
transition: "none"
|
|
2465
2465
|
}, !0);
|
|
2466
2466
|
}
|
|
2467
2467
|
if (!s) {
|
|
2468
|
-
const me = ne *
|
|
2468
|
+
const me = ne * _;
|
|
2469
2469
|
H(E.current, {
|
|
2470
|
-
transform: U(
|
|
2470
|
+
transform: U(v) ? `translate3d(0, ${me}px, 0)` : `translate3d(${me}px, 0, 0)`
|
|
2471
2471
|
});
|
|
2472
2472
|
}
|
|
2473
2473
|
}
|
|
@@ -2478,15 +2478,15 @@ function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
2478
2478
|
});
|
|
2479
2479
|
}, []), p.useEffect(() => {
|
|
2480
2480
|
var S;
|
|
2481
|
-
function
|
|
2481
|
+
function _() {
|
|
2482
2482
|
if (!E.current || !D) return;
|
|
2483
|
-
const
|
|
2484
|
-
if (
|
|
2483
|
+
const O = document.activeElement;
|
|
2484
|
+
if (_t(O) || Fe.current) {
|
|
2485
2485
|
var N;
|
|
2486
2486
|
const L = ((N = window.visualViewport) == null ? void 0 : N.height) || 0, ne = window.innerHeight;
|
|
2487
2487
|
let ee = ne - L;
|
|
2488
2488
|
const Ee = E.current.getBoundingClientRect().height || 0, fe = Ee > ne * 0.8;
|
|
2489
|
-
|
|
2489
|
+
St.current || (St.current = Ee);
|
|
2490
2490
|
const _e = E.current.getBoundingClientRect().top;
|
|
2491
2491
|
if (Math.abs(rn.current - ee) > 60 && (Fe.current = !Fe.current), s && s.length > 0 && Ve && Le) {
|
|
2492
2492
|
const De = Ve[Le] || 0;
|
|
@@ -2495,14 +2495,14 @@ function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
2495
2495
|
if (rn.current = ee, Ee > L || Fe.current) {
|
|
2496
2496
|
const De = E.current.getBoundingClientRect().height;
|
|
2497
2497
|
let me = De;
|
|
2498
|
-
De > L && (me = L - (fe ? _e :
|
|
2499
|
-
} else
|
|
2498
|
+
De > L && (me = L - (fe ? _e : Ot)), g ? E.current.style.height = `${De - Math.max(ee, 0)}px` : E.current.style.height = `${Math.max(me, L - _e)}px`;
|
|
2499
|
+
} else sl() || (E.current.style.height = `${St.current}px`);
|
|
2500
2500
|
s && s.length > 0 && !Fe.current ? E.current.style.bottom = "0px" : E.current.style.bottom = `${Math.max(ee, 0)}px`;
|
|
2501
2501
|
}
|
|
2502
2502
|
}
|
|
2503
|
-
return (S = window.visualViewport) == null || S.addEventListener("resize",
|
|
2504
|
-
var
|
|
2505
|
-
return (
|
|
2503
|
+
return (S = window.visualViewport) == null || S.addEventListener("resize", _), () => {
|
|
2504
|
+
var O;
|
|
2505
|
+
return (O = window.visualViewport) == null ? void 0 : O.removeEventListener("resize", _);
|
|
2506
2506
|
};
|
|
2507
2507
|
}, [
|
|
2508
2508
|
Le,
|
|
@@ -2510,23 +2510,23 @@ function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
2510
2510
|
Ve
|
|
2511
2511
|
]);
|
|
2512
2512
|
function Ge(S) {
|
|
2513
|
-
Aa(),
|
|
2513
|
+
Aa(), M == null || M(), S || te(!1), setTimeout(() => {
|
|
2514
2514
|
s && sn(s[0]);
|
|
2515
|
-
},
|
|
2515
|
+
}, k.DURATION * 1e3);
|
|
2516
2516
|
}
|
|
2517
2517
|
function un() {
|
|
2518
2518
|
if (!E.current) return;
|
|
2519
|
-
const S = document.querySelector("[data-vaul-drawer-wrapper]"),
|
|
2519
|
+
const S = document.querySelector("[data-vaul-drawer-wrapper]"), _ = pt(E.current, v);
|
|
2520
2520
|
H(E.current, {
|
|
2521
2521
|
transform: "translate3d(0, 0, 0)",
|
|
2522
|
-
transition: `transform ${
|
|
2522
|
+
transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`
|
|
2523
2523
|
}), H(pe.current, {
|
|
2524
|
-
transition: `opacity ${
|
|
2524
|
+
transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
|
|
2525
2525
|
opacity: "1"
|
|
2526
|
-
}), i &&
|
|
2526
|
+
}), i && _ && _ > 0 && G && H(S, {
|
|
2527
2527
|
borderRadius: `${da}px`,
|
|
2528
2528
|
overflow: "hidden",
|
|
2529
|
-
...U(
|
|
2529
|
+
...U(v) ? {
|
|
2530
2530
|
transform: `scale(${lt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
2531
2531
|
transformOrigin: "top"
|
|
2532
2532
|
} : {
|
|
@@ -2534,31 +2534,31 @@ function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
2534
2534
|
transformOrigin: "left"
|
|
2535
2535
|
},
|
|
2536
2536
|
transitionProperty: "transform, border-radius",
|
|
2537
|
-
transitionDuration: `${
|
|
2538
|
-
transitionTimingFunction: `cubic-bezier(${
|
|
2537
|
+
transitionDuration: `${k.DURATION}s`,
|
|
2538
|
+
transitionTimingFunction: `cubic-bezier(${k.EASE.join(",")})`
|
|
2539
2539
|
}, !0);
|
|
2540
2540
|
}
|
|
2541
2541
|
function Aa() {
|
|
2542
|
-
!y || !E.current || (E.current.classList.remove(
|
|
2542
|
+
!y || !E.current || (E.current.classList.remove(Pt), Re.current = !1, Q(!1), ye.current = /* @__PURE__ */ new Date());
|
|
2543
2543
|
}
|
|
2544
2544
|
function ka(S) {
|
|
2545
2545
|
if (!y || !E.current) return;
|
|
2546
|
-
E.current.classList.remove(
|
|
2547
|
-
const
|
|
2548
|
-
if (!S || !cn(S.target, !1) || !
|
|
2549
|
-
const
|
|
2546
|
+
E.current.classList.remove(Pt), Re.current = !1, Q(!1), ye.current = /* @__PURE__ */ new Date();
|
|
2547
|
+
const _ = pt(E.current, v);
|
|
2548
|
+
if (!S || !cn(S.target, !1) || !_ || Number.isNaN(_) || ke.current === null) return;
|
|
2549
|
+
const O = ye.current.getTime() - ke.current.getTime(), N = $e.current - (U(v) ? S.pageY : S.pageX), L = Math.abs(N) / O;
|
|
2550
2550
|
if (L > 0.05 && (de(!0), setTimeout(() => {
|
|
2551
2551
|
de(!1);
|
|
2552
2552
|
}, 200)), s) {
|
|
2553
2553
|
ja({
|
|
2554
|
-
draggedDistance: N * (
|
|
2554
|
+
draggedDistance: N * (v === "bottom" || v === "right" ? 1 : -1),
|
|
2555
2555
|
closeDrawer: Ge,
|
|
2556
2556
|
velocity: L,
|
|
2557
2557
|
dismissible: f
|
|
2558
2558
|
}), o == null || o(S, !0);
|
|
2559
2559
|
return;
|
|
2560
2560
|
}
|
|
2561
|
-
if (
|
|
2561
|
+
if (v === "bottom" || v === "right" ? N > 0 : N < 0) {
|
|
2562
2562
|
un(), o == null || o(S, !0);
|
|
2563
2563
|
return;
|
|
2564
2564
|
}
|
|
@@ -2569,8 +2569,8 @@ function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
2569
2569
|
var ne;
|
|
2570
2570
|
const ee = Math.min((ne = E.current.getBoundingClientRect().height) != null ? ne : 0, window.innerHeight);
|
|
2571
2571
|
var Ee;
|
|
2572
|
-
const fe = Math.min((Ee = E.current.getBoundingClientRect().width) != null ? Ee : 0, window.innerWidth), _e =
|
|
2573
|
-
if (Math.abs(
|
|
2572
|
+
const fe = Math.min((Ee = E.current.getBoundingClientRect().width) != null ? Ee : 0, window.innerWidth), _e = v === "left" || v === "right";
|
|
2573
|
+
if (Math.abs(_) >= (_e ? fe : ee) * u) {
|
|
2574
2574
|
Ge(), o == null || o(S, !1);
|
|
2575
2575
|
return;
|
|
2576
2576
|
}
|
|
@@ -2579,45 +2579,45 @@ function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
2579
2579
|
p.useEffect(() => (G && (H(document.documentElement, {
|
|
2580
2580
|
scrollBehavior: "auto"
|
|
2581
2581
|
}), Me.current = /* @__PURE__ */ new Date()), () => {
|
|
2582
|
-
|
|
2582
|
+
wl(document.documentElement, "scrollBehavior");
|
|
2583
2583
|
}), [
|
|
2584
2584
|
G
|
|
2585
2585
|
]);
|
|
2586
2586
|
function $a(S) {
|
|
2587
|
-
const
|
|
2587
|
+
const _ = S ? (window.innerWidth - Oe) / window.innerWidth : 1, O = S ? -Oe : 0;
|
|
2588
2588
|
re.current && window.clearTimeout(re.current), H(E.current, {
|
|
2589
|
-
transition: `transform ${
|
|
2590
|
-
transform: `scale(${
|
|
2589
|
+
transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
|
|
2590
|
+
transform: `scale(${_}) translate3d(0, ${O}px, 0)`
|
|
2591
2591
|
}), !S && E.current && (re.current = setTimeout(() => {
|
|
2592
|
-
const N = pt(E.current,
|
|
2592
|
+
const N = pt(E.current, v);
|
|
2593
2593
|
H(E.current, {
|
|
2594
2594
|
transition: "none",
|
|
2595
|
-
transform: U(
|
|
2595
|
+
transform: U(v) ? `translate3d(0, ${N}px, 0)` : `translate3d(${N}px, 0, 0)`
|
|
2596
2596
|
});
|
|
2597
2597
|
}, 500));
|
|
2598
2598
|
}
|
|
2599
|
-
function Fa(S,
|
|
2600
|
-
if (
|
|
2601
|
-
const
|
|
2599
|
+
function Fa(S, _) {
|
|
2600
|
+
if (_ < 0) return;
|
|
2601
|
+
const O = (window.innerWidth - Oe) / window.innerWidth, N = O + _ * (1 - O), L = -Oe + _ * Oe;
|
|
2602
2602
|
H(E.current, {
|
|
2603
|
-
transform: U(
|
|
2603
|
+
transform: U(v) ? `scale(${N}) translate3d(0, ${L}px, 0)` : `scale(${N}) translate3d(${L}px, 0, 0)`,
|
|
2604
2604
|
transition: "none"
|
|
2605
2605
|
});
|
|
2606
2606
|
}
|
|
2607
|
-
function La(S,
|
|
2608
|
-
const
|
|
2609
|
-
|
|
2610
|
-
transition: `transform ${
|
|
2611
|
-
transform: U(
|
|
2607
|
+
function La(S, _) {
|
|
2608
|
+
const O = U(v) ? window.innerHeight : window.innerWidth, N = _ ? (O - Oe) / O : 1, L = _ ? -Oe : 0;
|
|
2609
|
+
_ && H(E.current, {
|
|
2610
|
+
transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
|
|
2611
|
+
transform: U(v) ? `scale(${N}) translate3d(0, ${L}px, 0)` : `scale(${N}) translate3d(${L}px, 0, 0)`
|
|
2612
2612
|
});
|
|
2613
2613
|
}
|
|
2614
2614
|
return p.useEffect(() => {
|
|
2615
|
-
|
|
2615
|
+
T || window.requestAnimationFrame(() => {
|
|
2616
2616
|
document.body.style.pointerEvents = "auto";
|
|
2617
2617
|
});
|
|
2618
2618
|
}, [
|
|
2619
|
-
|
|
2620
|
-
]), /* @__PURE__ */ p.createElement(
|
|
2619
|
+
T
|
|
2620
|
+
]), /* @__PURE__ */ p.createElement(os, {
|
|
2621
2621
|
defaultOpen: z,
|
|
2622
2622
|
onOpenChange: (S) => {
|
|
2623
2623
|
!f && !S || (S ? Y(!0) : Ge(!0), te(S));
|
|
@@ -2645,10 +2645,10 @@ function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
2645
2645
|
onNestedOpenChange: $a,
|
|
2646
2646
|
onNestedRelease: La,
|
|
2647
2647
|
keyboardIsOpen: Fe,
|
|
2648
|
-
modal:
|
|
2648
|
+
modal: T,
|
|
2649
2649
|
snapPointsOffset: Ve,
|
|
2650
2650
|
activeSnapPointIndex: Le,
|
|
2651
|
-
direction:
|
|
2651
|
+
direction: v,
|
|
2652
2652
|
shouldScaleBackground: i,
|
|
2653
2653
|
setBackgroundColorOnScale: l,
|
|
2654
2654
|
noBodyStyles: P,
|
|
@@ -2664,7 +2664,7 @@ const ma = /* @__PURE__ */ p.forwardRef(function({ ...e }, t) {
|
|
|
2664
2664
|
const c = p.useCallback((d) => o(d), [
|
|
2665
2665
|
o
|
|
2666
2666
|
]);
|
|
2667
|
-
return /* @__PURE__ */ p.createElement(
|
|
2667
|
+
return /* @__PURE__ */ p.createElement(Zo, {
|
|
2668
2668
|
onMouseUp: c,
|
|
2669
2669
|
ref: m,
|
|
2670
2670
|
"data-vaul-overlay": "",
|
|
@@ -2676,8 +2676,8 @@ const ma = /* @__PURE__ */ p.forwardRef(function({ ...e }, t) {
|
|
|
2676
2676
|
});
|
|
2677
2677
|
ma.displayName = "Drawer.Overlay";
|
|
2678
2678
|
const ga = /* @__PURE__ */ p.forwardRef(function({ onPointerDownOutside: e, style: t, onOpenAutoFocus: n, ...r }, o) {
|
|
2679
|
-
const { drawerRef: s, onPress: i, onRelease: l, onDrag: u, keyboardIsOpen: m, snapPointsOffset: f, activeSnapPointIndex: c, modal: d, isOpen:
|
|
2680
|
-
|
|
2679
|
+
const { drawerRef: s, onPress: i, onRelease: l, onDrag: u, keyboardIsOpen: m, snapPointsOffset: f, activeSnapPointIndex: c, modal: d, isOpen: R, direction: C, snapPoints: g, container: T, handleOnly: M, shouldAnimate: A, autoFocus: P } = Qe(), [v, z] = p.useState(!1), Z = la(o, s), b = p.useRef(null), j = p.useRef(null), D = p.useRef(!1), B = g && g.length > 0;
|
|
2680
|
+
El();
|
|
2681
2681
|
const K = (x, V, G = 0) => {
|
|
2682
2682
|
if (D.current) return !0;
|
|
2683
2683
|
const te = Math.abs(x.y), q = Math.abs(x.x), Y = q > te, y = [
|
|
@@ -2699,13 +2699,13 @@ const ga = /* @__PURE__ */ p.forwardRef(function({ onPointerDownOutside: e, styl
|
|
|
2699
2699
|
function W(x) {
|
|
2700
2700
|
b.current = null, D.current = !1, l(x);
|
|
2701
2701
|
}
|
|
2702
|
-
return /* @__PURE__ */ p.createElement(
|
|
2703
|
-
"data-vaul-drawer-direction":
|
|
2702
|
+
return /* @__PURE__ */ p.createElement(es, {
|
|
2703
|
+
"data-vaul-drawer-direction": C,
|
|
2704
2704
|
"data-vaul-drawer": "",
|
|
2705
|
-
"data-vaul-delayed-snap-points":
|
|
2706
|
-
"data-vaul-snap-points":
|
|
2707
|
-
"data-vaul-custom-container":
|
|
2708
|
-
"data-vaul-animate":
|
|
2705
|
+
"data-vaul-delayed-snap-points": v ? "true" : "false",
|
|
2706
|
+
"data-vaul-snap-points": R && B ? "true" : "false",
|
|
2707
|
+
"data-vaul-custom-container": T ? "true" : "false",
|
|
2708
|
+
"data-vaul-animate": A != null && A.current ? "true" : "false",
|
|
2709
2709
|
...r,
|
|
2710
2710
|
ref: Z,
|
|
2711
2711
|
style: f && f.length > 0 ? {
|
|
@@ -2713,7 +2713,7 @@ const ga = /* @__PURE__ */ p.forwardRef(function({ onPointerDownOutside: e, styl
|
|
|
2713
2713
|
...t
|
|
2714
2714
|
} : t,
|
|
2715
2715
|
onPointerDown: (x) => {
|
|
2716
|
-
|
|
2716
|
+
M || (r.onPointerDown == null || r.onPointerDown.call(r, x), b.current = {
|
|
2717
2717
|
x: x.pageX,
|
|
2718
2718
|
y: x.pageY
|
|
2719
2719
|
}, i(x));
|
|
@@ -2735,12 +2735,12 @@ const ga = /* @__PURE__ */ p.forwardRef(function({ onPointerDownOutside: e, styl
|
|
|
2735
2735
|
}
|
|
2736
2736
|
},
|
|
2737
2737
|
onPointerMove: (x) => {
|
|
2738
|
-
if (j.current = x,
|
|
2738
|
+
if (j.current = x, M || (r.onPointerMove == null || r.onPointerMove.call(r, x), !b.current)) return;
|
|
2739
2739
|
const V = x.pageY - b.current.y, G = x.pageX - b.current.x, te = x.pointerType === "touch" ? 10 : 2;
|
|
2740
2740
|
K({
|
|
2741
2741
|
x: G,
|
|
2742
2742
|
y: V
|
|
2743
|
-
},
|
|
2743
|
+
}, C, te) ? u(x) : (Math.abs(G) > te || Math.abs(V) > te) && (b.current = null);
|
|
2744
2744
|
},
|
|
2745
2745
|
onPointerUp: (x) => {
|
|
2746
2746
|
r.onPointerUp == null || r.onPointerUp.call(r, x), b.current = null, D.current = !1, l(x);
|
|
@@ -2754,19 +2754,19 @@ const ga = /* @__PURE__ */ p.forwardRef(function({ onPointerDownOutside: e, styl
|
|
|
2754
2754
|
});
|
|
2755
2755
|
});
|
|
2756
2756
|
ga.displayName = "Drawer.Content";
|
|
2757
|
-
const
|
|
2758
|
-
const { closeDrawer: o, isDragging: s, snapPoints: i, activeSnapPoint: l, setActiveSnapPoint: u, dismissible: m, handleOnly: f, isOpen: c, onPress: d, onDrag:
|
|
2759
|
-
function
|
|
2760
|
-
if (
|
|
2757
|
+
const Pl = 250, jl = 120, va = /* @__PURE__ */ p.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
|
|
2758
|
+
const { closeDrawer: o, isDragging: s, snapPoints: i, activeSnapPoint: l, setActiveSnapPoint: u, dismissible: m, handleOnly: f, isOpen: c, onPress: d, onDrag: R } = Qe(), C = p.useRef(null), g = p.useRef(!1);
|
|
2759
|
+
function T() {
|
|
2760
|
+
if (g.current) {
|
|
2761
2761
|
P();
|
|
2762
2762
|
return;
|
|
2763
2763
|
}
|
|
2764
2764
|
window.setTimeout(() => {
|
|
2765
|
-
|
|
2766
|
-
},
|
|
2765
|
+
M();
|
|
2766
|
+
}, jl);
|
|
2767
2767
|
}
|
|
2768
|
-
function
|
|
2769
|
-
if (s || e ||
|
|
2768
|
+
function M() {
|
|
2769
|
+
if (s || e || g.current) {
|
|
2770
2770
|
P();
|
|
2771
2771
|
return;
|
|
2772
2772
|
}
|
|
@@ -2783,22 +2783,22 @@ const Dl = 250, Pl = 120, va = /* @__PURE__ */ p.forwardRef(function({ preventCy
|
|
|
2783
2783
|
const Z = i[z + 1];
|
|
2784
2784
|
u(Z);
|
|
2785
2785
|
}
|
|
2786
|
-
function
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
},
|
|
2786
|
+
function A() {
|
|
2787
|
+
C.current = window.setTimeout(() => {
|
|
2788
|
+
g.current = !0;
|
|
2789
|
+
}, Pl);
|
|
2790
2790
|
}
|
|
2791
2791
|
function P() {
|
|
2792
|
-
|
|
2792
|
+
C.current && window.clearTimeout(C.current), g.current = !1;
|
|
2793
2793
|
}
|
|
2794
2794
|
return /* @__PURE__ */ p.createElement("div", {
|
|
2795
|
-
onClick:
|
|
2795
|
+
onClick: T,
|
|
2796
2796
|
onPointerCancel: P,
|
|
2797
|
-
onPointerDown: (
|
|
2798
|
-
f && d(
|
|
2797
|
+
onPointerDown: (v) => {
|
|
2798
|
+
f && d(v), A();
|
|
2799
2799
|
},
|
|
2800
|
-
onPointerMove: (
|
|
2801
|
-
f && v
|
|
2800
|
+
onPointerMove: (v) => {
|
|
2801
|
+
f && R(v);
|
|
2802
2802
|
},
|
|
2803
2803
|
// onPointerUp is already handled by the content component
|
|
2804
2804
|
ref: r,
|
|
@@ -2812,7 +2812,7 @@ const Dl = 250, Pl = 120, va = /* @__PURE__ */ p.forwardRef(function({ preventCy
|
|
|
2812
2812
|
}, t));
|
|
2813
2813
|
});
|
|
2814
2814
|
va.displayName = "Drawer.Handle";
|
|
2815
|
-
function
|
|
2815
|
+
function Nl({ onDrag: e, onOpenChange: t, ...n }) {
|
|
2816
2816
|
const { onNestedDrag: r, onNestedOpenChange: o, onNestedRelease: s } = Qe();
|
|
2817
2817
|
if (!r)
|
|
2818
2818
|
throw new Error("Drawer.NestedRoot must be placed in another drawer");
|
|
@@ -2831,24 +2831,24 @@ function jl({ onDrag: e, onOpenChange: t, ...n }) {
|
|
|
2831
2831
|
...n
|
|
2832
2832
|
});
|
|
2833
2833
|
}
|
|
2834
|
-
function
|
|
2834
|
+
function Tl(e) {
|
|
2835
2835
|
const t = Qe(), { container: n = t.container, ...r } = e;
|
|
2836
|
-
return /* @__PURE__ */ p.createElement(
|
|
2836
|
+
return /* @__PURE__ */ p.createElement(ss, {
|
|
2837
2837
|
container: n,
|
|
2838
2838
|
...r
|
|
2839
2839
|
});
|
|
2840
2840
|
}
|
|
2841
2841
|
const he = {
|
|
2842
2842
|
Root: pa,
|
|
2843
|
-
NestedRoot:
|
|
2843
|
+
NestedRoot: Nl,
|
|
2844
2844
|
Content: ga,
|
|
2845
2845
|
Overlay: ma,
|
|
2846
|
-
Trigger:
|
|
2847
|
-
Portal:
|
|
2846
|
+
Trigger: ts,
|
|
2847
|
+
Portal: Tl,
|
|
2848
2848
|
Handle: va,
|
|
2849
|
-
Close:
|
|
2850
|
-
Title:
|
|
2851
|
-
Description:
|
|
2849
|
+
Close: ns,
|
|
2850
|
+
Title: rs,
|
|
2851
|
+
Description: as
|
|
2852
2852
|
}, Zt = ({
|
|
2853
2853
|
shouldScaleBackground: e = !0,
|
|
2854
2854
|
...t
|
|
@@ -2860,23 +2860,23 @@ const he = {
|
|
|
2860
2860
|
}
|
|
2861
2861
|
);
|
|
2862
2862
|
Zt.displayName = "Drawer";
|
|
2863
|
-
const wa = he.Trigger,
|
|
2863
|
+
const wa = he.Trigger, _l = he.Portal, Ol = he.Close, xa = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
2864
2864
|
he.Overlay,
|
|
2865
2865
|
{
|
|
2866
2866
|
ref: n,
|
|
2867
|
-
className:
|
|
2867
|
+
className: F("fixed inset-0 z-50 bg-black/80", e),
|
|
2868
2868
|
...t
|
|
2869
2869
|
}
|
|
2870
2870
|
));
|
|
2871
2871
|
xa.displayName = he.Overlay.displayName;
|
|
2872
2872
|
const en = h.forwardRef(
|
|
2873
|
-
({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ a.jsxs(
|
|
2873
|
+
({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ a.jsxs(_l, { children: [
|
|
2874
2874
|
/* @__PURE__ */ a.jsx(xa, {}),
|
|
2875
2875
|
/* @__PURE__ */ a.jsxs(
|
|
2876
2876
|
he.Content,
|
|
2877
2877
|
{
|
|
2878
2878
|
ref: o,
|
|
2879
|
-
className:
|
|
2879
|
+
className: F(
|
|
2880
2880
|
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
2881
2881
|
e
|
|
2882
2882
|
),
|
|
@@ -2894,7 +2894,7 @@ const tn = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
|
2894
2894
|
he.Title,
|
|
2895
2895
|
{
|
|
2896
2896
|
ref: n,
|
|
2897
|
-
className:
|
|
2897
|
+
className: F(
|
|
2898
2898
|
"text-lg font-semibold leading-none tracking-tight",
|
|
2899
2899
|
e
|
|
2900
2900
|
),
|
|
@@ -2902,15 +2902,15 @@ const tn = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
|
2902
2902
|
}
|
|
2903
2903
|
));
|
|
2904
2904
|
tn.displayName = he.Title.displayName;
|
|
2905
|
-
const
|
|
2905
|
+
const Il = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
2906
2906
|
he.Description,
|
|
2907
2907
|
{
|
|
2908
2908
|
ref: n,
|
|
2909
|
-
className:
|
|
2909
|
+
className: F("text-sm text-muted-foreground", e),
|
|
2910
2910
|
...t
|
|
2911
2911
|
}
|
|
2912
2912
|
));
|
|
2913
|
-
|
|
2913
|
+
Il.displayName = he.Description.displayName;
|
|
2914
2914
|
const ya = () => {
|
|
2915
2915
|
const e = qe(), [t, n] = Ie(!1), r = qn(() => n(!1), []);
|
|
2916
2916
|
Ce(() => {
|
|
@@ -2923,7 +2923,7 @@ const ya = () => {
|
|
|
2923
2923
|
window.removeEventListener("keydown", s);
|
|
2924
2924
|
};
|
|
2925
2925
|
}, [t, n]);
|
|
2926
|
-
const o = e.plugins.find(
|
|
2926
|
+
const o = e.plugins.find(ks);
|
|
2927
2927
|
return o ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2928
2928
|
/* @__PURE__ */ a.jsxs(
|
|
2929
2929
|
"button",
|
|
@@ -2933,7 +2933,7 @@ const ya = () => {
|
|
|
2933
2933
|
className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
|
|
2934
2934
|
children: [
|
|
2935
2935
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
2936
|
-
/* @__PURE__ */ a.jsx(
|
|
2936
|
+
/* @__PURE__ */ a.jsx(qo, { size: 14 }),
|
|
2937
2937
|
"Search"
|
|
2938
2938
|
] }),
|
|
2939
2939
|
/* @__PURE__ */ a.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
|
|
@@ -2945,14 +2945,14 @@ const ya = () => {
|
|
|
2945
2945
|
onClose: r
|
|
2946
2946
|
}) })
|
|
2947
2947
|
] }) : null;
|
|
2948
|
-
},
|
|
2948
|
+
}, Al = () => {
|
|
2949
2949
|
const { topNavigation: e } = qe();
|
|
2950
2950
|
return /* @__PURE__ */ a.jsxs(Zt, { direction: "right", children: [
|
|
2951
|
-
/* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(wa, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(
|
|
2951
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(wa, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(Qo, { size: 22 }) }) }),
|
|
2952
2952
|
/* @__PURE__ */ a.jsxs(
|
|
2953
2953
|
en,
|
|
2954
2954
|
{
|
|
2955
|
-
className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none",
|
|
2955
|
+
className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none overflow-auto",
|
|
2956
2956
|
"aria-describedby": void 0,
|
|
2957
2957
|
children: [
|
|
2958
2958
|
/* @__PURE__ */ a.jsx(Hn, { children: /* @__PURE__ */ a.jsx(tn, { children: "Navigation" }) }),
|
|
@@ -2965,14 +2965,14 @@ const ya = () => {
|
|
|
2965
2965
|
n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
2966
2966
|
),
|
|
2967
2967
|
to: t.id,
|
|
2968
|
-
children: /* @__PURE__ */ a.jsx(
|
|
2968
|
+
children: /* @__PURE__ */ a.jsx(Ol, { children: t.label })
|
|
2969
2969
|
}
|
|
2970
2970
|
) }, t.label)) })
|
|
2971
2971
|
]
|
|
2972
2972
|
}
|
|
2973
2973
|
)
|
|
2974
2974
|
] });
|
|
2975
|
-
},
|
|
2975
|
+
}, kl = () => {
|
|
2976
2976
|
const { topNavigation: e } = qe();
|
|
2977
2977
|
return e.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.map((t) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
2978
2978
|
Ze,
|
|
@@ -2985,19 +2985,19 @@ const ya = () => {
|
|
|
2985
2985
|
children: t.label
|
|
2986
2986
|
}
|
|
2987
2987
|
) }, t.label)) }) });
|
|
2988
|
-
}, ba = ({ item: e }) => e.children ? /* @__PURE__ */ a.jsxs(
|
|
2988
|
+
}, ba = ({ item: e }) => e.children ? /* @__PURE__ */ a.jsxs(tl, { children: [
|
|
2989
2989
|
/* @__PURE__ */ a.jsx(Zr, { children: e.label }),
|
|
2990
|
-
/* @__PURE__ */ a.jsx(
|
|
2990
|
+
/* @__PURE__ */ a.jsx(el, { children: /* @__PURE__ */ a.jsx(ea, { children: e.children.map((t, n) => (
|
|
2991
2991
|
// eslint-disable-next-line react/no-array-index-key
|
|
2992
2992
|
/* @__PURE__ */ a.jsx(ba, { item: t }, n)
|
|
2993
2993
|
)) }) })
|
|
2994
|
-
] }, e.label) : /* @__PURE__ */ a.jsx(
|
|
2995
|
-
const t = pn(), [n, r] =
|
|
2994
|
+
] }, e.label) : /* @__PURE__ */ a.jsx(kt, { to: e.path ?? "", children: /* @__PURE__ */ a.jsx(na, { children: e.label }, e.label) }), Sa = Vn(function() {
|
|
2995
|
+
const t = pn(), [n, r] = mo(), { isAuthenticated: o, profile: s, isAuthEnabled: i } = pn(), l = qe(), { page: u, plugins: m } = l, f = m.filter((d) => Is(d)).flatMap((d) => d.getProfileMenuItems(l)).map((d) => /* @__PURE__ */ a.jsx(ba, { item: d }, d.label)), c = n ? Vo : Go;
|
|
2996
2996
|
return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
|
|
2997
|
-
/* @__PURE__ */ a.jsx(
|
|
2997
|
+
/* @__PURE__ */ a.jsx(al, {}),
|
|
2998
2998
|
/* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
2999
2999
|
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
|
|
3000
|
-
/* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(
|
|
3000
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(kt, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
3001
3001
|
(u == null ? void 0 : u.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3002
3002
|
/* @__PURE__ */ a.jsx(
|
|
3003
3003
|
"img",
|
|
@@ -3005,7 +3005,7 @@ const ya = () => {
|
|
|
3005
3005
|
src: u.logo.src.light,
|
|
3006
3006
|
alt: u.logo.alt ?? u.pageTitle,
|
|
3007
3007
|
style: { width: u.logo.width },
|
|
3008
|
-
className:
|
|
3008
|
+
className: F("h-10", n && "hidden"),
|
|
3009
3009
|
loading: "lazy"
|
|
3010
3010
|
}
|
|
3011
3011
|
),
|
|
@@ -3015,7 +3015,7 @@ const ya = () => {
|
|
|
3015
3015
|
src: u.logo.src.dark,
|
|
3016
3016
|
alt: u.logo.alt ?? u.pageTitle,
|
|
3017
3017
|
style: { width: u.logo.width },
|
|
3018
|
-
className:
|
|
3018
|
+
className: F("h-10", !n && "hidden"),
|
|
3019
3019
|
loading: "lazy"
|
|
3020
3020
|
}
|
|
3021
3021
|
)
|
|
@@ -3024,11 +3024,11 @@ const ya = () => {
|
|
|
3024
3024
|
] }) }) }),
|
|
3025
3025
|
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
3026
3026
|
/* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(ya, {}) }),
|
|
3027
|
-
/* @__PURE__ */ a.jsx(
|
|
3027
|
+
/* @__PURE__ */ a.jsx(Al, {}),
|
|
3028
3028
|
/* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
|
|
3029
3029
|
/* @__PURE__ */ a.jsx(xe, { name: "head-navigation-start" }),
|
|
3030
|
-
i && !o ? /* @__PURE__ */ a.jsx(
|
|
3031
|
-
/* @__PURE__ */ a.jsx(
|
|
3030
|
+
i && !o ? /* @__PURE__ */ a.jsx(jt, { variant: "ghost", onClick: () => t.login(), children: "Login" }) : f.length > 0 && /* @__PURE__ */ a.jsxs(Ji, { modal: !1, children: [
|
|
3031
|
+
/* @__PURE__ */ a.jsx(Zi, { asChild: !0, children: /* @__PURE__ */ a.jsx(jt, { variant: "ghost", children: s != null && s.email ? `${s.email}` : "My Account" }) }),
|
|
3032
3032
|
/* @__PURE__ */ a.jsxs(ta, { className: "w-56", children: [
|
|
3033
3033
|
/* @__PURE__ */ a.jsx(ra, { children: "My Account" }),
|
|
3034
3034
|
/* @__PURE__ */ a.jsx(aa, {}),
|
|
@@ -3050,13 +3050,13 @@ const ya = () => {
|
|
|
3050
3050
|
] })
|
|
3051
3051
|
] }),
|
|
3052
3052
|
/* @__PURE__ */ a.jsx(xe, { name: "top-navigation-before" }),
|
|
3053
|
-
/* @__PURE__ */ a.jsx(
|
|
3053
|
+
/* @__PURE__ */ a.jsx(kl, {}),
|
|
3054
3054
|
/* @__PURE__ */ a.jsx(xe, { name: "top-navigation-after" })
|
|
3055
3055
|
] })
|
|
3056
3056
|
] });
|
|
3057
3057
|
}), Ca = {
|
|
3058
3058
|
Header: Sa
|
|
3059
|
-
},
|
|
3059
|
+
}, $l = Kn(Ca), Fl = $l.Provider, Ll = (e) => {
|
|
3060
3060
|
const [t, n] = Ie(!1);
|
|
3061
3061
|
Ce(() => {
|
|
3062
3062
|
const s = localStorage.getItem("theme"), i = window.matchMedia("(prefers-color-scheme: dark)"), l = s === "dark" || !s && i.matches;
|
|
@@ -3066,14 +3066,14 @@ const ya = () => {
|
|
|
3066
3066
|
const s = !t;
|
|
3067
3067
|
document.documentElement.classList.toggle("dark", s), localStorage.setItem("theme", s ? "dark" : "light"), n(s);
|
|
3068
3068
|
}, [t]), o = [t, r];
|
|
3069
|
-
return /* @__PURE__ */ a.jsx(
|
|
3070
|
-
},
|
|
3069
|
+
return /* @__PURE__ */ a.jsx(go.Provider, { value: o, ...e });
|
|
3070
|
+
}, Bl = ({
|
|
3071
3071
|
children: e,
|
|
3072
3072
|
context: t
|
|
3073
|
-
}) => (
|
|
3073
|
+
}) => (Fo({
|
|
3074
3074
|
queryFn: async () => (await t.initialize(), !0),
|
|
3075
3075
|
queryKey: ["zudoku-initialize"]
|
|
3076
|
-
}), /* @__PURE__ */ a.jsx(
|
|
3076
|
+
}), /* @__PURE__ */ a.jsx(Lo.Provider, { value: t, children: e })), Hl = ({
|
|
3077
3077
|
children: e,
|
|
3078
3078
|
...t
|
|
3079
3079
|
}) => {
|
|
@@ -3082,52 +3082,52 @@ const ya = () => {
|
|
|
3082
3082
|
() => ({ ...Ca, ...t.overrides }),
|
|
3083
3083
|
[t.overrides]
|
|
3084
3084
|
), r = mt(() => {
|
|
3085
|
-
var
|
|
3085
|
+
var C;
|
|
3086
3086
|
return {
|
|
3087
|
-
...(t.plugins ?? []).filter(
|
|
3088
|
-
(
|
|
3089
|
-
).reduce((
|
|
3090
|
-
...
|
|
3091
|
-
...(
|
|
3087
|
+
...(t.plugins ?? []).filter(Ls).flatMap(
|
|
3088
|
+
(g) => g.getMdxComponents ? [g.getMdxComponents()] : []
|
|
3089
|
+
).reduce((g, T) => ({ ...g, ...T }), {}),
|
|
3090
|
+
...vo,
|
|
3091
|
+
...(C = t.mdx) == null ? void 0 : C.components
|
|
3092
3092
|
};
|
|
3093
|
-
}, [(c = t.mdx) == null ? void 0 : c.components, t.plugins]), { stagger: o } =
|
|
3093
|
+
}, [(c = t.mdx) == null ? void 0 : c.components, t.plugins]), { stagger: o } = Mo(Nt), [s, i] = Ie(!1), l = mt(
|
|
3094
3094
|
() => s ? { stagger: !0 } : { stagger: o },
|
|
3095
3095
|
[o, s]
|
|
3096
3096
|
), u = Wa();
|
|
3097
3097
|
Ce(() => {
|
|
3098
3098
|
s || i(!0);
|
|
3099
3099
|
}, [s, u.location]);
|
|
3100
|
-
const [m] = Ie(() => new
|
|
3101
|
-
var
|
|
3102
|
-
return /* @__PURE__ */ a.jsx(
|
|
3100
|
+
const [m] = Ie(() => new Hs(t)), f = (d = t.plugins) == null ? void 0 : d.filter(Fs).map((R, C) => {
|
|
3101
|
+
var g;
|
|
3102
|
+
return /* @__PURE__ */ a.jsx(Ro, { children: (g = R.getHead) == null ? void 0 : g.call(R) }, C);
|
|
3103
3103
|
});
|
|
3104
|
-
return /* @__PURE__ */ a.jsxs(
|
|
3105
|
-
/* @__PURE__ */ a.jsx(
|
|
3106
|
-
/* @__PURE__ */ a.jsx(
|
|
3104
|
+
return /* @__PURE__ */ a.jsxs(Bo, { client: nr, children: [
|
|
3105
|
+
/* @__PURE__ */ a.jsx(At, { children: f }),
|
|
3106
|
+
/* @__PURE__ */ a.jsx(Nt.Provider, { value: l, children: /* @__PURE__ */ a.jsx(Bl, { context: m, children: /* @__PURE__ */ a.jsx(Ua, { components: r, children: /* @__PURE__ */ a.jsx(Ll, { children: /* @__PURE__ */ a.jsx(Fl, { value: n, children: /* @__PURE__ */ a.jsx(Ja, { slotlets: t.slotlets, children: /* @__PURE__ */ a.jsx(wo, { children: e ?? /* @__PURE__ */ a.jsx(In, {}) }) }) }) }) }) }) })
|
|
3107
3107
|
] });
|
|
3108
|
-
},
|
|
3108
|
+
}, Ul = Vn(Hl), Ma = (e) => /* @__PURE__ */ a.jsx(_s, { FallbackComponent: Us, children: /* @__PURE__ */ a.jsx(Ul, { ...e }) });
|
|
3109
3109
|
Ma.displayName = "DevPortal";
|
|
3110
|
-
const
|
|
3110
|
+
const zl = ({
|
|
3111
3111
|
category: e,
|
|
3112
3112
|
level: t
|
|
3113
3113
|
}) => {
|
|
3114
|
-
var
|
|
3115
|
-
const n = Yn(), r = za(e), [o, s] = Ie(!1), i = e.collapsible ?? !0, l = e.collapsed ?? !0, u = !!(!i || !l || r), [m, f] = Ie(u);
|
|
3114
|
+
var R, C;
|
|
3115
|
+
const n = Yn(), r = za(e), [o, s] = Ie(!1), i = e.collapsible ?? !0, l = e.collapsed ?? !0, u = !!(!i || !l || r), [m, f] = Ie(u), c = Ya(vt(n == null ? void 0 : n.id, (R = e.link) == null ? void 0 : R.id));
|
|
3116
3116
|
Ce(() => {
|
|
3117
3117
|
r && f(!0);
|
|
3118
3118
|
}, [r]);
|
|
3119
|
-
const
|
|
3119
|
+
const d = i && /* @__PURE__ */ a.jsx(
|
|
3120
3120
|
"button",
|
|
3121
3121
|
{
|
|
3122
3122
|
type: "button",
|
|
3123
|
-
onClick: (
|
|
3124
|
-
|
|
3123
|
+
onClick: (g) => {
|
|
3124
|
+
g.preventDefault(), f((T) => !T), s(!0);
|
|
3125
3125
|
},
|
|
3126
3126
|
children: /* @__PURE__ */ a.jsx(
|
|
3127
3127
|
Xn,
|
|
3128
3128
|
{
|
|
3129
3129
|
size: 16,
|
|
3130
|
-
className:
|
|
3130
|
+
className: F(
|
|
3131
3131
|
o && "transition",
|
|
3132
3132
|
"shrink-0 group-data-[state=open]:rotate-90"
|
|
3133
3133
|
)
|
|
@@ -3136,83 +3136,92 @@ const Ul = ({
|
|
|
3136
3136
|
}
|
|
3137
3137
|
);
|
|
3138
3138
|
return /* @__PURE__ */ a.jsxs(
|
|
3139
|
-
|
|
3139
|
+
Po,
|
|
3140
3140
|
{
|
|
3141
|
-
className:
|
|
3141
|
+
className: "flex flex-col",
|
|
3142
3142
|
defaultOpen: u,
|
|
3143
3143
|
open: m,
|
|
3144
3144
|
onOpenChange: () => f(!0),
|
|
3145
3145
|
children: [
|
|
3146
|
-
/* @__PURE__ */ a.jsx(
|
|
3146
|
+
/* @__PURE__ */ a.jsx(jo, { className: "group", asChild: !0, disabled: !i, children: /* @__PURE__ */ a.jsxs(
|
|
3147
3147
|
"div",
|
|
3148
3148
|
{
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3149
|
+
onClick: () => s(!0),
|
|
3150
|
+
className: Je({
|
|
3151
|
+
isActive: !1,
|
|
3152
|
+
isTopLevel: t === 0,
|
|
3153
|
+
className: [
|
|
3154
|
+
"text-start",
|
|
3155
|
+
i ? "cursor-pointer" : "cursor-default hover:bg-transparent"
|
|
3156
|
+
]
|
|
3157
|
+
}),
|
|
3154
3158
|
children: [
|
|
3155
3159
|
e.icon && /* @__PURE__ */ a.jsx(
|
|
3156
3160
|
e.icon,
|
|
3157
3161
|
{
|
|
3158
3162
|
size: 16,
|
|
3159
|
-
className:
|
|
3163
|
+
className: F(
|
|
3164
|
+
"align-[-0.125em] -translate-x-1",
|
|
3165
|
+
c && "text-primary"
|
|
3166
|
+
)
|
|
3160
3167
|
}
|
|
3161
3168
|
),
|
|
3162
|
-
((
|
|
3169
|
+
((C = e.link) == null ? void 0 : C.type) === "doc" ? /* @__PURE__ */ a.jsx(
|
|
3163
3170
|
Ze,
|
|
3164
3171
|
{
|
|
3165
|
-
to:
|
|
3172
|
+
to: vt(n == null ? void 0 : n.id, e.link.id),
|
|
3166
3173
|
className: "flex-1",
|
|
3167
|
-
onClick: () =>
|
|
3168
|
-
|
|
3174
|
+
onClick: () => {
|
|
3175
|
+
c && !m && f(!0);
|
|
3176
|
+
},
|
|
3177
|
+
children: /* @__PURE__ */ a.jsxs(
|
|
3169
3178
|
"div",
|
|
3170
3179
|
{
|
|
3171
|
-
className:
|
|
3180
|
+
className: F(
|
|
3172
3181
|
"flex items-center gap-2 justify-between w-full",
|
|
3173
|
-
|
|
3182
|
+
c ? "text-primary" : "text-foreground/80"
|
|
3174
3183
|
),
|
|
3175
3184
|
children: [
|
|
3176
3185
|
/* @__PURE__ */ a.jsx("div", { className: "truncate", children: e.label }),
|
|
3177
|
-
|
|
3186
|
+
d
|
|
3178
3187
|
]
|
|
3179
3188
|
}
|
|
3180
3189
|
)
|
|
3181
3190
|
}
|
|
3182
3191
|
) : /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full", children: [
|
|
3183
3192
|
/* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
|
|
3184
|
-
|
|
3193
|
+
d
|
|
3185
3194
|
] })
|
|
3186
3195
|
]
|
|
3187
3196
|
}
|
|
3188
3197
|
) }),
|
|
3189
3198
|
/* @__PURE__ */ a.jsx(
|
|
3190
|
-
|
|
3199
|
+
No,
|
|
3191
3200
|
{
|
|
3192
|
-
className:
|
|
3201
|
+
className: F(
|
|
3193
3202
|
// CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
|
|
3194
|
-
o && "CollapsibleContent"
|
|
3195
|
-
"ms-[calc(var(--padding-nav-item)*1.125)]"
|
|
3203
|
+
o && "CollapsibleContent"
|
|
3196
3204
|
),
|
|
3197
|
-
children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l
|
|
3198
|
-
|
|
3205
|
+
children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ms-0.5", children: e.items.map((g) => /* @__PURE__ */ a.jsx(
|
|
3206
|
+
It,
|
|
3199
3207
|
{
|
|
3200
3208
|
level: t + 1,
|
|
3201
|
-
item:
|
|
3209
|
+
item: g
|
|
3202
3210
|
},
|
|
3203
|
-
("id" in
|
|
3211
|
+
("id" in g ? g.id : "") + ("href" in g ? g.href : "") + g.label
|
|
3204
3212
|
)) })
|
|
3205
3213
|
}
|
|
3206
3214
|
)
|
|
3207
3215
|
]
|
|
3208
3216
|
}
|
|
3209
3217
|
);
|
|
3210
|
-
}, Je =
|
|
3218
|
+
}, Je = xo(
|
|
3211
3219
|
"flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
3212
3220
|
{
|
|
3213
3221
|
variants: {
|
|
3214
3222
|
isTopLevel: {
|
|
3215
|
-
true: "font-
|
|
3223
|
+
true: "font-medium -mx-[--padding-nav-item]",
|
|
3224
|
+
false: "-mr-[--padding-nav-item] ml-[--padding-nav-item]"
|
|
3216
3225
|
},
|
|
3217
3226
|
isActive: {
|
|
3218
3227
|
true: "text-primary font-medium",
|
|
@@ -3222,27 +3231,31 @@ const Ul = ({
|
|
|
3222
3231
|
true: "text-foreground/30",
|
|
3223
3232
|
false: ""
|
|
3224
3233
|
}
|
|
3234
|
+
},
|
|
3235
|
+
defaultVariants: {
|
|
3236
|
+
isActive: !1
|
|
3225
3237
|
}
|
|
3226
3238
|
}
|
|
3227
|
-
), Ra = "data-anchor",
|
|
3239
|
+
), Ra = "data-anchor", It = ({
|
|
3228
3240
|
item: e,
|
|
3229
3241
|
level: t = 0
|
|
3230
3242
|
}) => {
|
|
3231
|
-
|
|
3243
|
+
var s, i;
|
|
3244
|
+
const n = Yn(), { activeAnchor: r } = Lt(), [o] = Xa();
|
|
3232
3245
|
switch (e.type) {
|
|
3233
3246
|
case "category":
|
|
3234
|
-
return /* @__PURE__ */ a.jsx(
|
|
3247
|
+
return /* @__PURE__ */ a.jsx(zl, { category: e, level: t });
|
|
3235
3248
|
case "doc":
|
|
3236
3249
|
return /* @__PURE__ */ a.jsxs(
|
|
3237
3250
|
Ze,
|
|
3238
3251
|
{
|
|
3239
|
-
className: ({ isActive:
|
|
3240
|
-
to:
|
|
3252
|
+
className: ({ isActive: l }) => Je({ isActive: l, isTopLevel: t === 0 }),
|
|
3253
|
+
to: vt(n == null ? void 0 : n.id, e.id),
|
|
3241
3254
|
children: [
|
|
3242
3255
|
e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
|
|
3243
3256
|
e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3244
|
-
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
3245
|
-
/* @__PURE__ */ a.jsx(
|
|
3257
|
+
/* @__PURE__ */ a.jsx("span", { className: "truncate flex-1", title: e.label, children: e.label }),
|
|
3258
|
+
/* @__PURE__ */ a.jsx(Ct, { ...e.badge })
|
|
3246
3259
|
] }) : e.label
|
|
3247
3260
|
]
|
|
3248
3261
|
}
|
|
@@ -3253,59 +3266,53 @@ const Ul = ({
|
|
|
3253
3266
|
{
|
|
3254
3267
|
to: { hash: e.href, search: o.toString() },
|
|
3255
3268
|
[Ra]: e.href.slice(1),
|
|
3256
|
-
className:
|
|
3257
|
-
|
|
3258
|
-
t === 0
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
})
|
|
3262
|
-
),
|
|
3269
|
+
className: Je({
|
|
3270
|
+
isActive: e.href.slice(1) === r,
|
|
3271
|
+
isTopLevel: t === 0,
|
|
3272
|
+
className: ((s = e.badge) == null ? void 0 : s.placement) !== "start" && "justify-between"
|
|
3273
|
+
}),
|
|
3263
3274
|
children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3264
3275
|
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
3265
|
-
/* @__PURE__ */ a.jsx(
|
|
3276
|
+
/* @__PURE__ */ a.jsx(Ct, { ...e.badge })
|
|
3266
3277
|
] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
|
|
3267
3278
|
}
|
|
3268
3279
|
) : e.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
|
|
3269
3280
|
"a",
|
|
3270
3281
|
{
|
|
3271
|
-
className:
|
|
3272
|
-
Je({ isTopLevel: t === 0 }),
|
|
3273
|
-
"block"
|
|
3274
|
-
),
|
|
3282
|
+
className: Je({ isTopLevel: t === 0 }),
|
|
3275
3283
|
href: e.href,
|
|
3276
3284
|
target: "_blank",
|
|
3277
3285
|
rel: "noopener noreferrer",
|
|
3278
3286
|
children: [
|
|
3279
3287
|
/* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: e.label }),
|
|
3280
|
-
/* @__PURE__ */ a.
|
|
3281
|
-
" ",
|
|
3282
|
-
/* @__PURE__ */ a.jsx(Go, { className: "inline ml-1", size: 12 })
|
|
3283
|
-
] })
|
|
3288
|
+
/* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(Wo, { className: "inline -translate-y-0.5", size: 12 }) })
|
|
3284
3289
|
]
|
|
3285
3290
|
}
|
|
3286
3291
|
) : /* @__PURE__ */ a.jsx(
|
|
3287
3292
|
Ze,
|
|
3288
3293
|
{
|
|
3289
|
-
className:
|
|
3294
|
+
className: Je({
|
|
3295
|
+
className: ((i = e.badge) == null ? void 0 : i.placement) !== "start" && "justify-between"
|
|
3296
|
+
}),
|
|
3290
3297
|
to: e.href,
|
|
3291
3298
|
children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3292
3299
|
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
3293
|
-
/* @__PURE__ */ a.jsx(
|
|
3300
|
+
/* @__PURE__ */ a.jsx(Ct, { ...e.badge })
|
|
3294
3301
|
] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
|
|
3295
3302
|
}
|
|
3296
3303
|
);
|
|
3297
3304
|
}
|
|
3298
|
-
},
|
|
3305
|
+
}, Kl = (e, t = { block: "center" }) => {
|
|
3299
3306
|
if (!e) return;
|
|
3300
3307
|
const n = e.getBoundingClientRect();
|
|
3301
3308
|
n.top >= 0 && n.left >= 0 && n.bottom <= (window.innerHeight || document.documentElement.clientHeight) && n.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
|
|
3302
|
-
},
|
|
3303
|
-
const e =
|
|
3309
|
+
}, ql = () => {
|
|
3310
|
+
const e = $t(), { setActiveAnchor: t } = Lt();
|
|
3304
3311
|
Ce(() => {
|
|
3305
3312
|
if (!e.hash) return;
|
|
3306
3313
|
const n = decodeURIComponent(e.hash.split("/")[0].slice(1)), r = () => {
|
|
3307
3314
|
const o = document.getElementById(n), s = document.querySelector(`[${Ra}="${n}"]`);
|
|
3308
|
-
return o ? (o.scrollIntoView(),
|
|
3315
|
+
return o ? (o.scrollIntoView(), Kl(s), requestIdleCallback(() => t(n)), !0) : !1;
|
|
3309
3316
|
};
|
|
3310
3317
|
if (!r()) {
|
|
3311
3318
|
const o = new MutationObserver((s, i) => {
|
|
@@ -3314,16 +3321,16 @@ const Ul = ({
|
|
|
3314
3321
|
return o.observe(document.body, { childList: !0, subtree: !0 }), () => o.disconnect();
|
|
3315
3322
|
}
|
|
3316
3323
|
}, [e.hash, t]);
|
|
3317
|
-
},
|
|
3318
|
-
const e =
|
|
3324
|
+
}, Ql = () => {
|
|
3325
|
+
const e = $t(), t = Bt(e.pathname);
|
|
3319
3326
|
Ce(() => {
|
|
3320
3327
|
t.current !== e.pathname && (window.scrollTo(0, 0), t.current = e.pathname);
|
|
3321
3328
|
}, [e.pathname]);
|
|
3322
|
-
}, Ea =
|
|
3329
|
+
}, Ea = Eo(({ children: e, className: t, pushMainContent: n }, r) => /* @__PURE__ */ a.jsx(
|
|
3323
3330
|
"nav",
|
|
3324
3331
|
{
|
|
3325
3332
|
"data-navigation": String(n),
|
|
3326
|
-
className:
|
|
3333
|
+
className: F(
|
|
3327
3334
|
"scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0",
|
|
3328
3335
|
"px-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 mt-[--padding-content-top]",
|
|
3329
3336
|
"w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
|
|
@@ -3334,8 +3341,8 @@ const Ul = ({
|
|
|
3334
3341
|
}
|
|
3335
3342
|
));
|
|
3336
3343
|
Ea.displayName = "SidebarWrapper";
|
|
3337
|
-
const
|
|
3338
|
-
const e =
|
|
3344
|
+
const Vl = () => {
|
|
3345
|
+
const e = Bt(null), t = Ho();
|
|
3339
3346
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3340
3347
|
/* @__PURE__ */ a.jsxs(
|
|
3341
3348
|
Ea,
|
|
@@ -3344,7 +3351,7 @@ const Ql = () => {
|
|
|
3344
3351
|
pushMainContent: t.data.items.length > 0,
|
|
3345
3352
|
children: [
|
|
3346
3353
|
/* @__PURE__ */ a.jsx(xe, { name: "zudoku-before-navigation" }),
|
|
3347
|
-
t.data.items.map((n) => /* @__PURE__ */ a.jsx(
|
|
3354
|
+
t.data.items.map((n) => /* @__PURE__ */ a.jsx(It, { item: n }, n.label)),
|
|
3348
3355
|
/* @__PURE__ */ a.jsx(xe, { name: "zudoku-after-navigation" })
|
|
3349
3356
|
]
|
|
3350
3357
|
}
|
|
@@ -3352,19 +3359,19 @@ const Ql = () => {
|
|
|
3352
3359
|
/* @__PURE__ */ a.jsxs(
|
|
3353
3360
|
en,
|
|
3354
3361
|
{
|
|
3355
|
-
className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none",
|
|
3362
|
+
className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none overflow-auto",
|
|
3356
3363
|
"aria-describedby": void 0,
|
|
3357
3364
|
children: [
|
|
3358
3365
|
/* @__PURE__ */ a.jsx(Hn, { children: /* @__PURE__ */ a.jsx(tn, { children: "Sidebar" }) }),
|
|
3359
|
-
t.data.items.map((n) => /* @__PURE__ */ a.jsx(
|
|
3366
|
+
t.data.items.map((n) => /* @__PURE__ */ a.jsx(It, { item: n }, n.label))
|
|
3360
3367
|
]
|
|
3361
3368
|
}
|
|
3362
3369
|
)
|
|
3363
3370
|
] });
|
|
3364
|
-
},
|
|
3365
|
-
const t =
|
|
3366
|
-
|
|
3367
|
-
const s =
|
|
3371
|
+
}, Gl = ({ children: e }) => {
|
|
3372
|
+
const t = $t(), { setActiveAnchor: n } = Lt(), { meta: r, authentication: o } = qe();
|
|
3373
|
+
ql(), Ql();
|
|
3374
|
+
const s = Bt(t.pathname);
|
|
3368
3375
|
return Ce(() => {
|
|
3369
3376
|
var i;
|
|
3370
3377
|
(i = o == null ? void 0 : o.pageLoad) == null || i.call(o);
|
|
@@ -3372,7 +3379,7 @@ const Ql = () => {
|
|
|
3372
3379
|
t.pathname !== s.current && n(""), s.current = t.pathname;
|
|
3373
3380
|
}, [t.pathname, n]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3374
3381
|
!1,
|
|
3375
|
-
/* @__PURE__ */ a.jsxs(
|
|
3382
|
+
/* @__PURE__ */ a.jsxs(At, { titleTemplate: r == null ? void 0 : r.title, children: [
|
|
3376
3383
|
(r == null ? void 0 : r.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: r.description }),
|
|
3377
3384
|
(r == null ? void 0 : r.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: r.favicon })
|
|
3378
3385
|
] }),
|
|
@@ -3382,18 +3389,18 @@ const Ql = () => {
|
|
|
3382
3389
|
/* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ a.jsx(
|
|
3383
3390
|
Qn,
|
|
3384
3391
|
{
|
|
3385
|
-
fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(
|
|
3392
|
+
fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(is, {}) }),
|
|
3386
3393
|
children: /* @__PURE__ */ a.jsxs(Zt, { direction: "left", children: [
|
|
3387
|
-
/* @__PURE__ */ a.jsx(
|
|
3394
|
+
/* @__PURE__ */ a.jsx(Vl, {}),
|
|
3388
3395
|
/* @__PURE__ */ a.jsx(
|
|
3389
3396
|
"div",
|
|
3390
3397
|
{
|
|
3391
|
-
className:
|
|
3398
|
+
className: F(
|
|
3392
3399
|
"lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
|
|
3393
3400
|
"peer-data-[navigation=false]:hidden"
|
|
3394
3401
|
),
|
|
3395
3402
|
children: /* @__PURE__ */ a.jsxs(wa, { className: "flex items-center gap-2", children: [
|
|
3396
|
-
/* @__PURE__ */ a.jsx(
|
|
3403
|
+
/* @__PURE__ */ a.jsx(Yo, { size: 16, strokeWidth: 1.5 }),
|
|
3397
3404
|
/* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
|
|
3398
3405
|
] })
|
|
3399
3406
|
}
|
|
@@ -3401,7 +3408,7 @@ const Ql = () => {
|
|
|
3401
3408
|
/* @__PURE__ */ a.jsxs(
|
|
3402
3409
|
"main",
|
|
3403
3410
|
{
|
|
3404
|
-
className:
|
|
3411
|
+
className: F(
|
|
3405
3412
|
"h-full dark:border-white/10 translate-x-0",
|
|
3406
3413
|
"lg:overflow-visible",
|
|
3407
3414
|
// This works in tandem with the `SidebarWrapper` component
|
|
@@ -3419,18 +3426,18 @@ const Ql = () => {
|
|
|
3419
3426
|
}
|
|
3420
3427
|
) })
|
|
3421
3428
|
] });
|
|
3422
|
-
},
|
|
3429
|
+
}, fc = qa, hc = yo, pc = Ma, mc = Gl, gc = kt, vc = Za, wc = ls, xc = Rs, yc = Es, bc = jt, Sc = At;
|
|
3423
3430
|
export {
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3431
|
+
xc as Bootstrap,
|
|
3432
|
+
yc as BootstrapStatic,
|
|
3433
|
+
bc as Button,
|
|
3434
|
+
hc as Callout,
|
|
3435
|
+
pc as DevPortal,
|
|
3436
|
+
Sc as Head,
|
|
3437
|
+
mc as Layout,
|
|
3438
|
+
gc as Link,
|
|
3439
|
+
vc as RouterError,
|
|
3440
|
+
wc as ServerError,
|
|
3441
|
+
fc as useMDXComponents
|
|
3435
3442
|
};
|
|
3436
3443
|
//# sourceMappingURL=zudoku.components.js.map
|