zudoku 0.12.2 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/main.js +3 -3
- package/dist/app/main.js.map +1 -1
- package/dist/cli/dev/handler.js +2 -2
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/validators/validate.d.ts +42 -23
- package/dist/config/validators/validate.js +6 -2
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/lib/components/Banner.js +7 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/Header.js +1 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Layout.js +1 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +2 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/Search.js +1 -1
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/SlotletProvider.d.ts +9 -2
- package/dist/lib/components/SlotletProvider.js +4 -2
- package/dist/lib/components/SlotletProvider.js.map +1 -1
- package/dist/lib/components/index.d.ts +2 -1
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/core/DevPortalContext.d.ts +1 -1
- package/dist/lib/oas/graphql/index.js +2 -6
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/CustomPage.d.ts +2 -0
- package/dist/lib/plugins/custom-pages/CustomPage.js +10 -0
- package/dist/lib/plugins/custom-pages/CustomPage.js.map +1 -0
- package/dist/lib/plugins/custom-pages/index.d.ts +10 -0
- package/dist/lib/plugins/custom-pages/index.js +11 -0
- package/dist/lib/plugins/custom-pages/index.js.map +1 -0
- package/dist/lib/plugins/openapi/Endpoint.js +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +1 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.d.ts +1 -1
- package/dist/lib/plugins/openapi/Route.js +1 -1
- package/dist/lib/plugins/openapi/Route.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/client/createMemoryClient.js +1 -1
- package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -1
- package/dist/lib/plugins/openapi/client/createWorkerClient.js +1 -1
- package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +1 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/ui/Callout.d.ts +36 -35
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Drawer.d.ts +8 -10
- package/dist/lib/ui/Drawer.js.map +1 -1
- package/dist/lib/util/useExposedProps.d.ts +2 -0
- package/dist/lib/util/useExposedProps.js +8 -0
- package/dist/lib/util/useExposedProps.js.map +1 -0
- package/dist/vite/config.js +2 -0
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.d.ts +6 -1
- package/dist/vite/dev-server.js +13 -3
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-component.js +0 -1
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +4 -0
- package/dist/vite/plugin-custom-pages.js +30 -0
- package/dist/vite/plugin-custom-pages.js.map +1 -0
- package/dist/vite/plugin.js +2 -0
- package/dist/vite/plugin.js.map +1 -1
- package/lib/{AuthenticationPlugin-Bx9FK124.js → AuthenticationPlugin-CbgJ5SAh.js} +3 -3
- package/lib/{AuthenticationPlugin-Bx9FK124.js.map → AuthenticationPlugin-CbgJ5SAh.js.map} +1 -1
- package/lib/{DeveloperHint-YeWHKvyr.js → DeveloperHint-CiXPc9Xm.js} +2 -2
- package/lib/{DeveloperHint-YeWHKvyr.js.map → DeveloperHint-CiXPc9Xm.js.map} +1 -1
- package/lib/ErrorPage-B-zoPPVx.js +15 -0
- package/lib/{ErrorPage-CsZAN_za.js.map → ErrorPage-B-zoPPVx.js.map} +1 -1
- package/lib/Input-QMLhK7Rb.js +2229 -0
- package/lib/Input-QMLhK7Rb.js.map +1 -0
- package/lib/{Markdown-DapSf3wG.js → Markdown-D6Nze6qq.js} +3281 -5392
- package/lib/Markdown-D6Nze6qq.js.map +1 -0
- package/lib/{MdxPage-BqBWsXZ1.js → MdxPage-DBhq6-5F.js} +15 -15
- package/lib/{MdxPage-BqBWsXZ1.js.map → MdxPage-DBhq6-5F.js.map} +1 -1
- package/lib/{OperationList-CYrmxPa8.js → OperationList-Ba24gUd2.js} +50 -51
- package/lib/OperationList-Ba24gUd2.js.map +1 -0
- package/lib/{Route-Q5mqNQrv.js → Route-DI38nxYt.js} +3 -4
- package/lib/Route-DI38nxYt.js.map +1 -0
- package/lib/SidebarBadge-B9-VJSQr.js +503 -0
- package/lib/SidebarBadge-B9-VJSQr.js.map +1 -0
- package/lib/{SlotletProvider-D3UD5Go3.js → SlotletProvider-Cb8mGpBO.js} +46 -46
- package/lib/{SlotletProvider-D3UD5Go3.js.map → SlotletProvider-Cb8mGpBO.js.map} +1 -1
- package/lib/ZudokuContext-BEmsYQoq.js +1173 -0
- package/lib/ZudokuContext-BEmsYQoq.js.map +1 -0
- package/lib/assets/{index-B9EWVYfo.js → index-B_Jk_Yzp.js} +968 -938
- package/lib/assets/index-B_Jk_Yzp.js.map +1 -0
- package/lib/assets/{worker-Bcj4NA2p.js → worker-Bf8vjASY.js} +4582 -4303
- package/lib/assets/worker-Bf8vjASY.js.map +1 -0
- package/lib/cn-BmFQLtkS.js +2279 -0
- package/lib/cn-BmFQLtkS.js.map +1 -0
- package/lib/{index-BG0g4WW0.js → index-BRCiYFaL.js} +747 -737
- package/lib/index-BRCiYFaL.js.map +1 -0
- package/lib/{index-CLd8ycZz.js → index-CkwDvuPt.js} +947 -917
- package/lib/index-CkwDvuPt.js.map +1 -0
- package/lib/{index-LNp6rxyU.js → index-D06ATMgg.js} +2 -2
- package/lib/{index-LNp6rxyU.js.map → index-D06ATMgg.js.map} +1 -1
- package/lib/{index-BlJ2rj99.js → index-DA74gNq3.js} +1124 -974
- package/lib/index-DA74gNq3.js.map +1 -0
- package/lib/index-DJqnphbT.js +35 -0
- package/lib/{index-Bn6Lc9tq.js.map → index-DJqnphbT.js.map} +1 -1
- package/lib/{index-BngPzhKn.js → index-dgcPryXi.js} +3 -3
- package/lib/{index-BngPzhKn.js.map → index-dgcPryXi.js.map} +1 -1
- package/lib/{index-Dolisrci.js → index-g_JJcuFg.js} +603 -549
- package/lib/index-g_JJcuFg.js.map +1 -0
- package/lib/router-Oe6YmY6B.js +3024 -0
- package/lib/router-Oe6YmY6B.js.map +1 -0
- package/lib/state-CsuHT8ZO.js +183 -0
- package/lib/state-CsuHT8ZO.js.map +1 -0
- package/lib/urql-core-KJnLL26g.js +1455 -0
- package/lib/urql-core-KJnLL26g.js.map +1 -0
- package/lib/useExposedProps-Csw8oAlt.js +9 -0
- package/lib/useExposedProps-Csw8oAlt.js.map +1 -0
- package/lib/{utils-ByIc_KIM.js → utils-Chi3p5nE.js} +4 -4
- package/lib/utils-Chi3p5nE.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +363 -350
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +1697 -1623
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +4599 -4319
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +7 -7
- package/lib/zudoku.plugin-custom-pages.js +21 -0
- package/lib/zudoku.plugin-custom-pages.js.map +1 -0
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +8 -8
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/package.json +61 -68
- package/src/app/main.tsx +3 -3
- package/src/lib/components/Banner.tsx +12 -2
- package/src/lib/components/Header.tsx +4 -2
- package/src/lib/components/Layout.tsx +1 -0
- package/src/lib/components/MobileTopNavigation.tsx +4 -0
- package/src/lib/components/Search.tsx +1 -1
- package/src/lib/components/SlotletProvider.tsx +27 -4
- package/src/lib/components/index.ts +1 -1
- package/src/lib/core/DevPortalContext.ts +1 -1
- package/src/lib/oas/graphql/index.ts +3 -11
- package/src/lib/plugins/custom-pages/CustomPage.tsx +15 -0
- package/src/lib/plugins/custom-pages/index.tsx +24 -0
- package/src/lib/plugins/openapi/Endpoint.tsx +1 -1
- package/src/lib/plugins/openapi/OperationList.tsx +1 -1
- package/src/lib/plugins/openapi/Route.tsx +1 -2
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/client/createMemoryClient.ts +1 -6
- package/src/lib/plugins/openapi/client/createWorkerClient.ts +1 -6
- package/src/lib/plugins/openapi/index.tsx +1 -5
- package/src/lib/ui/Callout.tsx +7 -6
- package/src/lib/ui/Drawer.tsx +38 -36
- package/src/lib/util/useExposedProps.tsx +10 -0
- package/dist/lib/plugins/custom-page/index.d.ts +0 -8
- package/dist/lib/plugins/custom-page/index.js +0 -12
- package/dist/lib/plugins/custom-page/index.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/Editor.d.ts +0 -1
- package/dist/lib/plugins/openapi/playground/Editor.js +0 -5
- package/dist/lib/plugins/openapi/playground/Editor.js.map +0 -1
- package/dist/lib/plugins/openapi/util/urql.d.ts +0 -7
- package/dist/lib/plugins/openapi/util/urql.js +0 -8
- package/dist/lib/plugins/openapi/util/urql.js.map +0 -1
- package/lib/CategoryHeading-ovR-zHRq.js +0 -10
- package/lib/CategoryHeading-ovR-zHRq.js.map +0 -1
- package/lib/ErrorPage-CsZAN_za.js +0 -16
- package/lib/Input-CtVUl3eT.js +0 -2198
- package/lib/Input-CtVUl3eT.js.map +0 -1
- package/lib/Markdown-DapSf3wG.js.map +0 -1
- package/lib/OperationList-CYrmxPa8.js.map +0 -1
- package/lib/Route-Q5mqNQrv.js.map +0 -1
- package/lib/SidebarBadge-Dx7jtnoA.js +0 -498
- package/lib/SidebarBadge-Dx7jtnoA.js.map +0 -1
- package/lib/ZudokuContext-cr-pTRY1.js +0 -1084
- package/lib/ZudokuContext-cr-pTRY1.js.map +0 -1
- package/lib/_commonjsHelpers-BkfeUUK-.js +0 -29
- package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
- package/lib/assets/index-B9EWVYfo.js.map +0 -1
- package/lib/assets/worker-Bcj4NA2p.js.map +0 -1
- package/lib/index-BG0g4WW0.js.map +0 -1
- package/lib/index-BlJ2rj99.js.map +0 -1
- package/lib/index-Bn6Lc9tq.js +0 -9
- package/lib/index-CLd8ycZz.js.map +0 -1
- package/lib/index-Dolisrci.js.map +0 -1
- package/lib/router-D2p7Olpn.js +0 -2971
- package/lib/router-D2p7Olpn.js.map +0 -1
- package/lib/state-hNe1dw4B.js +0 -548
- package/lib/state-hNe1dw4B.js.map +0 -1
- package/lib/urql-YhcsXYy8.js +0 -1591
- package/lib/urql-YhcsXYy8.js.map +0 -1
- package/lib/utils-ByIc_KIM.js.map +0 -1
- package/lib/zudoku.plugin-custom-page.js +0 -13
- package/lib/zudoku.plugin-custom-page.js.map +0 -1
- package/src/lib/plugins/custom-page/index.tsx +0 -22
- package/src/lib/plugins/openapi/playground/Editor.tsx +0 -4
- package/src/lib/plugins/openapi/util/urql.ts +0 -8
package/lib/zudoku.components.js
CHANGED
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Ba = Object.defineProperty;
|
|
2
|
+
var fn = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
set _(
|
|
10
|
-
|
|
5
|
+
var Ha = (e, t, n) => t in e ? Ba(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var ae = (e, t, n) => Ha(e, typeof t != "symbol" ? t + "" : t, n), hn = (e, t, n) => t.has(e) || fn("Cannot " + n);
|
|
7
|
+
var w = (e, t, n) => (hn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ce = (e, t, n) => t.has(e) ? fn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), X = (e, t, n, r) => (hn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
|
|
8
|
+
var ut = (e, t, n, r) => ({
|
|
9
|
+
set _(o) {
|
|
10
|
+
X(e, t, o, n);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return
|
|
13
|
+
return w(e, t, r);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { c as
|
|
17
|
-
import { e as
|
|
18
|
-
import { E as
|
|
19
|
-
import { j as
|
|
20
|
-
import { M as
|
|
21
|
-
import {
|
|
16
|
+
import { c as On, H as It, M as Ua, d as za, A as Ka, b as qa } from "./utils-Chi3p5nE.js";
|
|
17
|
+
import { e as Qa, f as Va, R as Ga, N as Ze, L as At, g as Wa, O as In, b as Ya, u as kt } from "./index-BRCiYFaL.js";
|
|
18
|
+
import { E as An, S as xe, a as Xa, R as Ja } from "./SlotletProvider-Cb8mGpBO.js";
|
|
19
|
+
import { j as a } from "./jsx-runtime-B6kdoens.js";
|
|
20
|
+
import { M as Za, f as eo, c as kn, p as $n, A as to, d as rt, j as no, b as A, k as ro, F as ao, D as oo, C as so, P as Ke, i as $t, q as io, s as Fn, R as lo, S as co, t as uo, h as fo, r as Ln, m as ho, a as gt, u as Bn, V as Hn, n as pn, B as Pt } from "./index-g_JJcuFg.js";
|
|
21
|
+
import { c as Un, b as po, T as mo, d as go, V as vo, u as Ft, e as wo, a as xo } from "./Markdown-D6Nze6qq.js";
|
|
22
22
|
import * as h from "react";
|
|
23
|
-
import
|
|
24
|
-
import { a as
|
|
25
|
-
import {
|
|
26
|
-
import { a as
|
|
27
|
-
import { S as
|
|
28
|
-
import { j as
|
|
29
|
-
import { ChevronRightIcon as
|
|
30
|
-
import { c as
|
|
31
|
-
import {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
23
|
+
import p, { StrictMode as zn, createContext as Kn, Component as yo, createElement as mn, isValidElement as bo, useState as Ie, useMemo as mt, useLayoutEffect as So, useEffect as Ce, useCallback as qn, Suspense as Qn, memo as Vn, useContext as Co, Fragment as Mo, useRef as Lt, forwardRef as Ro } from "react";
|
|
24
|
+
import { a as Bt } from "./index-DJqnphbT.js";
|
|
25
|
+
import { B as Eo } from "./router-Oe6YmY6B.js";
|
|
26
|
+
import { a as jt, R as Do, T as Po, C as jo } from "./index-dgcPryXi.js";
|
|
27
|
+
import { S as Gn, f as Wn, Q as No, n as se, m as gn, g as vn, i as be, j as To, k as _o, l as Oo, o as Io, p as wn, r as xn, q as Ao, h as yn, t as bn, v as ko, u as qe, b as $o, Z as Fo, w as Lo, c as Yn, x as Bo } from "./ZudokuContext-BEmsYQoq.js";
|
|
28
|
+
import { j as Ht } from "./joinPath-B7kNnUX4.js";
|
|
29
|
+
import { ChevronRightIcon as Xn, CheckIcon as Ho, DotIcon as Uo, CircleXIcon as zo, SearchIcon as Ko, MenuIcon as qo, MoonStarIcon as Qo, SunIcon as Vo, ExternalLinkIcon as Go, PanelLeftIcon as Wo } from "lucide-react";
|
|
30
|
+
import { c as Jn, P as xt, R as Yo, I as Xo, O as Jo, C as Zo, T as es, a as ts, b as ns, D as rs, d as as, e as os, S as St } from "./SidebarBadge-B9-VJSQr.js";
|
|
31
|
+
import { c as O } from "./cn-BmFQLtkS.js";
|
|
32
|
+
import { S as ss } from "./Spinner-3cQDBVGr.js";
|
|
33
|
+
function is({ error: e }) {
|
|
34
|
+
return /* @__PURE__ */ a.jsx(An, { error: e });
|
|
35
|
+
}
|
|
36
|
+
var at = {};
|
|
37
|
+
const ls = /* @__PURE__ */ Bt(Eo), cs = /* @__PURE__ */ Bt(Qa), us = /* @__PURE__ */ Bt(Va);
|
|
38
|
+
Object.defineProperty(at, "__esModule", { value: !0 });
|
|
39
|
+
var ds = p, we = ls, Ut = cs, Se = us;
|
|
40
|
+
function fs(e) {
|
|
40
41
|
if (e && e.__esModule) return e;
|
|
41
42
|
var t = /* @__PURE__ */ Object.create(null);
|
|
42
43
|
return e && Object.keys(e).forEach(function(n) {
|
|
@@ -51,41 +52,41 @@ function os(e) {
|
|
|
51
52
|
}
|
|
52
53
|
}), t.default = e, Object.freeze(t);
|
|
53
54
|
}
|
|
54
|
-
var
|
|
55
|
-
function
|
|
55
|
+
var ge = /* @__PURE__ */ fs(ds);
|
|
56
|
+
function hs({
|
|
56
57
|
basename: e,
|
|
57
58
|
children: t,
|
|
58
59
|
location: n = "/",
|
|
59
60
|
future: r
|
|
60
61
|
}) {
|
|
61
|
-
typeof n == "string" && (n =
|
|
62
|
-
let
|
|
62
|
+
typeof n == "string" && (n = Se.parsePath(n));
|
|
63
|
+
let o = we.Action.Pop, s = {
|
|
63
64
|
pathname: n.pathname || "/",
|
|
64
65
|
search: n.search || "",
|
|
65
66
|
hash: n.hash || "",
|
|
66
67
|
state: n.state != null ? n.state : null,
|
|
67
68
|
key: n.key || "default"
|
|
68
|
-
}, i =
|
|
69
|
-
return /* @__PURE__ */
|
|
69
|
+
}, i = Zn();
|
|
70
|
+
return /* @__PURE__ */ ge.createElement(Se.Router, {
|
|
70
71
|
basename: e,
|
|
71
72
|
children: t,
|
|
72
73
|
location: s,
|
|
73
|
-
navigationType:
|
|
74
|
+
navigationType: o,
|
|
74
75
|
navigator: i,
|
|
75
76
|
future: r,
|
|
76
77
|
static: !0
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function ps({
|
|
80
81
|
context: e,
|
|
81
82
|
router: t,
|
|
82
83
|
hydrate: n = !0,
|
|
83
84
|
nonce: r
|
|
84
85
|
}) {
|
|
85
|
-
t && e || (process.env.NODE_ENV !== "production" ?
|
|
86
|
-
let
|
|
86
|
+
t && e || (process.env.NODE_ENV !== "production" ? we.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : we.UNSAFE_invariant(!1));
|
|
87
|
+
let o = {
|
|
87
88
|
router: t,
|
|
88
|
-
navigator:
|
|
89
|
+
navigator: Zn(),
|
|
89
90
|
static: !0,
|
|
90
91
|
staticContext: e,
|
|
91
92
|
basename: e.basename || "/"
|
|
@@ -94,37 +95,37 @@ function ss({
|
|
|
94
95
|
let u = {
|
|
95
96
|
loaderData: e.loaderData,
|
|
96
97
|
actionData: e.actionData,
|
|
97
|
-
errors:
|
|
98
|
+
errors: gs(e.errors)
|
|
98
99
|
};
|
|
99
|
-
i = `window.__staticRouterHydrationData = JSON.parse(${
|
|
100
|
+
i = `window.__staticRouterHydrationData = JSON.parse(${Ss(JSON.stringify(JSON.stringify(u)))});`;
|
|
100
101
|
}
|
|
101
102
|
let {
|
|
102
103
|
state: l
|
|
103
|
-
} =
|
|
104
|
-
return /* @__PURE__ */
|
|
105
|
-
value:
|
|
106
|
-
}, /* @__PURE__ */
|
|
104
|
+
} = o.router;
|
|
105
|
+
return /* @__PURE__ */ ge.createElement(ge.Fragment, null, /* @__PURE__ */ ge.createElement(Se.UNSAFE_DataRouterContext.Provider, {
|
|
106
|
+
value: o
|
|
107
|
+
}, /* @__PURE__ */ ge.createElement(Se.UNSAFE_DataRouterStateContext.Provider, {
|
|
107
108
|
value: l
|
|
108
|
-
}, /* @__PURE__ */
|
|
109
|
+
}, /* @__PURE__ */ ge.createElement(Se.UNSAFE_FetchersContext.Provider, {
|
|
109
110
|
value: s
|
|
110
|
-
}, /* @__PURE__ */
|
|
111
|
+
}, /* @__PURE__ */ ge.createElement(Se.UNSAFE_ViewTransitionContext.Provider, {
|
|
111
112
|
value: {
|
|
112
113
|
isTransitioning: !1
|
|
113
114
|
}
|
|
114
|
-
}, /* @__PURE__ */
|
|
115
|
-
basename:
|
|
115
|
+
}, /* @__PURE__ */ ge.createElement(Se.Router, {
|
|
116
|
+
basename: o.basename,
|
|
116
117
|
location: l.location,
|
|
117
118
|
navigationType: l.historyAction,
|
|
118
|
-
navigator:
|
|
119
|
-
static:
|
|
119
|
+
navigator: o.navigator,
|
|
120
|
+
static: o.static,
|
|
120
121
|
future: {
|
|
121
122
|
v7_relativeSplatPath: t.future.v7_relativeSplatPath
|
|
122
123
|
}
|
|
123
|
-
}, /* @__PURE__ */
|
|
124
|
+
}, /* @__PURE__ */ ge.createElement(ms, {
|
|
124
125
|
routes: t.routes,
|
|
125
126
|
future: t.future,
|
|
126
127
|
state: l
|
|
127
|
-
})))))), i ? /* @__PURE__ */
|
|
128
|
+
})))))), i ? /* @__PURE__ */ ge.createElement("script", {
|
|
128
129
|
suppressHydrationWarning: !0,
|
|
129
130
|
nonce: r,
|
|
130
131
|
dangerouslySetInnerHTML: {
|
|
@@ -132,35 +133,35 @@ function ss({
|
|
|
132
133
|
}
|
|
133
134
|
}) : null);
|
|
134
135
|
}
|
|
135
|
-
function
|
|
136
|
+
function ms({
|
|
136
137
|
routes: e,
|
|
137
138
|
future: t,
|
|
138
139
|
state: n
|
|
139
140
|
}) {
|
|
140
|
-
return
|
|
141
|
+
return Ut.UNSAFE_useRoutesImpl(e, void 0, n, t);
|
|
141
142
|
}
|
|
142
|
-
function
|
|
143
|
+
function gs(e) {
|
|
143
144
|
if (!e) return null;
|
|
144
145
|
let t = Object.entries(e), n = {};
|
|
145
|
-
for (let [r,
|
|
146
|
-
|
|
147
|
-
...
|
|
146
|
+
for (let [r, o] of t)
|
|
147
|
+
we.isRouteErrorResponse(o) ? n[r] = {
|
|
148
|
+
...o,
|
|
148
149
|
__type: "RouteErrorResponse"
|
|
149
|
-
} :
|
|
150
|
-
message:
|
|
150
|
+
} : o instanceof Error ? n[r] = {
|
|
151
|
+
message: o.message,
|
|
151
152
|
__type: "Error",
|
|
152
153
|
// If this is a subclass (i.e., ReferenceError), send up the type so we
|
|
153
154
|
// can re-create the same type during hydration.
|
|
154
|
-
...
|
|
155
|
-
__subType:
|
|
155
|
+
...o.name !== "Error" ? {
|
|
156
|
+
__subType: o.name
|
|
156
157
|
} : {}
|
|
157
|
-
} : n[r] =
|
|
158
|
+
} : n[r] = o;
|
|
158
159
|
return n;
|
|
159
160
|
}
|
|
160
|
-
function
|
|
161
|
+
function Zn() {
|
|
161
162
|
return {
|
|
162
|
-
createHref:
|
|
163
|
-
encodeLocation:
|
|
163
|
+
createHref: er,
|
|
164
|
+
encodeLocation: tr,
|
|
164
165
|
push(e) {
|
|
165
166
|
throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`);
|
|
166
167
|
},
|
|
@@ -178,14 +179,14 @@ function Qn() {
|
|
|
178
179
|
}
|
|
179
180
|
};
|
|
180
181
|
}
|
|
181
|
-
function
|
|
182
|
-
return
|
|
182
|
+
function vs(e, t) {
|
|
183
|
+
return we.createStaticHandler(e, {
|
|
183
184
|
...t,
|
|
184
|
-
mapRouteProperties:
|
|
185
|
+
mapRouteProperties: Ut.UNSAFE_mapRouteProperties
|
|
185
186
|
});
|
|
186
187
|
}
|
|
187
|
-
function
|
|
188
|
-
let r = {},
|
|
188
|
+
function ws(e, t, n = {}) {
|
|
189
|
+
let r = {}, o = we.UNSAFE_convertRoutesToDataRoutes(e, Ut.UNSAFE_mapRouteProperties, void 0, r), s = t.matches.map((l) => {
|
|
189
190
|
let u = r[l.route.id] || l.route;
|
|
190
191
|
return {
|
|
191
192
|
...l,
|
|
@@ -209,14 +210,14 @@ function us(e, t, n = {}) {
|
|
|
209
210
|
},
|
|
210
211
|
get state() {
|
|
211
212
|
return {
|
|
212
|
-
historyAction:
|
|
213
|
+
historyAction: we.Action.Pop,
|
|
213
214
|
location: t.location,
|
|
214
215
|
matches: s,
|
|
215
216
|
loaderData: t.loaderData,
|
|
216
217
|
actionData: t.actionData,
|
|
217
218
|
errors: t.errors,
|
|
218
219
|
initialized: !0,
|
|
219
|
-
navigation:
|
|
220
|
+
navigation: we.IDLE_NAVIGATION,
|
|
220
221
|
restoreScrollPosition: null,
|
|
221
222
|
preventScrollReset: !1,
|
|
222
223
|
revalidation: "idle",
|
|
@@ -225,7 +226,7 @@ function us(e, t, n = {}) {
|
|
|
225
226
|
};
|
|
226
227
|
},
|
|
227
228
|
get routes() {
|
|
228
|
-
return
|
|
229
|
+
return o;
|
|
229
230
|
},
|
|
230
231
|
get window() {
|
|
231
232
|
},
|
|
@@ -247,10 +248,10 @@ function us(e, t, n = {}) {
|
|
|
247
248
|
revalidate() {
|
|
248
249
|
throw i("revalidate");
|
|
249
250
|
},
|
|
250
|
-
createHref:
|
|
251
|
-
encodeLocation:
|
|
251
|
+
createHref: er,
|
|
252
|
+
encodeLocation: tr,
|
|
252
253
|
getFetcher() {
|
|
253
|
-
return
|
|
254
|
+
return we.IDLE_FETCHER;
|
|
254
255
|
},
|
|
255
256
|
deleteFetcher() {
|
|
256
257
|
throw i("deleteFetcher");
|
|
@@ -259,7 +260,7 @@ function us(e, t, n = {}) {
|
|
|
259
260
|
throw i("dispose");
|
|
260
261
|
},
|
|
261
262
|
getBlocker() {
|
|
262
|
-
return
|
|
263
|
+
return we.IDLE_BLOCKER;
|
|
263
264
|
},
|
|
264
265
|
deleteBlocker() {
|
|
265
266
|
throw i("deleteBlocker");
|
|
@@ -274,173 +275,173 @@ function us(e, t, n = {}) {
|
|
|
274
275
|
}
|
|
275
276
|
};
|
|
276
277
|
}
|
|
277
|
-
function
|
|
278
|
-
return typeof e == "string" ? e :
|
|
278
|
+
function er(e) {
|
|
279
|
+
return typeof e == "string" ? e : Se.createPath(e);
|
|
279
280
|
}
|
|
280
|
-
function
|
|
281
|
-
let t = typeof e == "string" ? e :
|
|
281
|
+
function tr(e) {
|
|
282
|
+
let t = typeof e == "string" ? e : Se.createPath(e);
|
|
282
283
|
t = t.replace(/ $/, "%20");
|
|
283
|
-
let n =
|
|
284
|
+
let n = xs.test(t) ? new URL(t) : new URL(t, "http://localhost");
|
|
284
285
|
return {
|
|
285
286
|
pathname: n.pathname,
|
|
286
287
|
search: n.search,
|
|
287
288
|
hash: n.hash
|
|
288
289
|
};
|
|
289
290
|
}
|
|
290
|
-
const
|
|
291
|
+
const xs = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, ys = {
|
|
291
292
|
"&": "\\u0026",
|
|
292
293
|
">": "\\u003e",
|
|
293
294
|
"<": "\\u003c",
|
|
294
295
|
"\u2028": "\\u2028",
|
|
295
296
|
"\u2029": "\\u2029"
|
|
296
|
-
},
|
|
297
|
-
function
|
|
298
|
-
return e.replace(
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
var
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
const
|
|
297
|
+
}, bs = /[&><\u2028\u2029]/g;
|
|
298
|
+
function Ss(e) {
|
|
299
|
+
return e.replace(bs, (t) => ys[t]);
|
|
300
|
+
}
|
|
301
|
+
at.StaticRouter = hs;
|
|
302
|
+
var Cs = at.StaticRouterProvider = ps;
|
|
303
|
+
at.createStaticHandler = vs;
|
|
304
|
+
at.createStaticRouter = ws;
|
|
305
|
+
const Ms = ({
|
|
305
306
|
router: e,
|
|
306
307
|
hydrate: t = !1
|
|
307
|
-
}) => /* @__PURE__ */
|
|
308
|
+
}) => /* @__PURE__ */ a.jsx(zn, { children: /* @__PURE__ */ a.jsx(On, { children: /* @__PURE__ */ a.jsx(jt.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(Ga, { router: e }) }) }) }), Rs = ({
|
|
308
309
|
router: e,
|
|
309
310
|
context: t,
|
|
310
311
|
helmetContext: n
|
|
311
|
-
}) => /* @__PURE__ */
|
|
312
|
-
var
|
|
312
|
+
}) => /* @__PURE__ */ a.jsx(zn, { children: /* @__PURE__ */ a.jsx(On, { context: n, children: /* @__PURE__ */ a.jsx(Cs, { router: e, context: t }) }) });
|
|
313
|
+
var ve, Nn, Es = (Nn = class extends Gn {
|
|
313
314
|
constructor(t = {}) {
|
|
314
315
|
super();
|
|
315
|
-
|
|
316
|
-
this.config = t,
|
|
316
|
+
ce(this, ve);
|
|
317
|
+
this.config = t, X(this, ve, /* @__PURE__ */ new Map());
|
|
317
318
|
}
|
|
318
319
|
build(t, n, r) {
|
|
319
|
-
const
|
|
320
|
+
const o = n.queryKey, s = n.queryHash ?? Wn(o, n);
|
|
320
321
|
let i = this.get(s);
|
|
321
|
-
return i || (i = new
|
|
322
|
+
return i || (i = new No({
|
|
322
323
|
cache: this,
|
|
323
|
-
queryKey:
|
|
324
|
+
queryKey: o,
|
|
324
325
|
queryHash: s,
|
|
325
326
|
options: t.defaultQueryOptions(n),
|
|
326
327
|
state: r,
|
|
327
|
-
defaultOptions: t.getQueryDefaults(
|
|
328
|
+
defaultOptions: t.getQueryDefaults(o)
|
|
328
329
|
}), this.add(i)), i;
|
|
329
330
|
}
|
|
330
331
|
add(t) {
|
|
331
|
-
|
|
332
|
+
w(this, ve).has(t.queryHash) || (w(this, ve).set(t.queryHash, t), this.notify({
|
|
332
333
|
type: "added",
|
|
333
334
|
query: t
|
|
334
335
|
}));
|
|
335
336
|
}
|
|
336
337
|
remove(t) {
|
|
337
|
-
const n =
|
|
338
|
-
n && (t.destroy(), n === t &&
|
|
338
|
+
const n = w(this, ve).get(t.queryHash);
|
|
339
|
+
n && (t.destroy(), n === t && w(this, ve).delete(t.queryHash), this.notify({ type: "removed", query: t }));
|
|
339
340
|
}
|
|
340
341
|
clear() {
|
|
341
|
-
|
|
342
|
+
se.batch(() => {
|
|
342
343
|
this.getAll().forEach((t) => {
|
|
343
344
|
this.remove(t);
|
|
344
345
|
});
|
|
345
346
|
});
|
|
346
347
|
}
|
|
347
348
|
get(t) {
|
|
348
|
-
return
|
|
349
|
+
return w(this, ve).get(t);
|
|
349
350
|
}
|
|
350
351
|
getAll() {
|
|
351
|
-
return [...
|
|
352
|
+
return [...w(this, ve).values()];
|
|
352
353
|
}
|
|
353
354
|
find(t) {
|
|
354
355
|
const n = { exact: !0, ...t };
|
|
355
356
|
return this.getAll().find(
|
|
356
|
-
(r) =>
|
|
357
|
+
(r) => gn(n, r)
|
|
357
358
|
);
|
|
358
359
|
}
|
|
359
360
|
findAll(t = {}) {
|
|
360
361
|
const n = this.getAll();
|
|
361
|
-
return Object.keys(t).length > 0 ? n.filter((r) =>
|
|
362
|
+
return Object.keys(t).length > 0 ? n.filter((r) => gn(t, r)) : n;
|
|
362
363
|
}
|
|
363
364
|
notify(t) {
|
|
364
|
-
|
|
365
|
+
se.batch(() => {
|
|
365
366
|
this.listeners.forEach((n) => {
|
|
366
367
|
n(t);
|
|
367
368
|
});
|
|
368
369
|
});
|
|
369
370
|
}
|
|
370
371
|
onFocus() {
|
|
371
|
-
|
|
372
|
+
se.batch(() => {
|
|
372
373
|
this.getAll().forEach((t) => {
|
|
373
374
|
t.onFocus();
|
|
374
375
|
});
|
|
375
376
|
});
|
|
376
377
|
}
|
|
377
378
|
onOnline() {
|
|
378
|
-
|
|
379
|
+
se.batch(() => {
|
|
379
380
|
this.getAll().forEach((t) => {
|
|
380
381
|
t.onOnline();
|
|
381
382
|
});
|
|
382
383
|
});
|
|
383
384
|
}
|
|
384
|
-
},
|
|
385
|
+
}, ve = new WeakMap(), Nn), oe, nt, Tn, Ds = (Tn = class extends Gn {
|
|
385
386
|
constructor(t = {}) {
|
|
386
387
|
super();
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
this.config = t,
|
|
388
|
+
ce(this, oe);
|
|
389
|
+
ce(this, nt);
|
|
390
|
+
this.config = t, X(this, oe, /* @__PURE__ */ new Map()), X(this, nt, Date.now());
|
|
390
391
|
}
|
|
391
392
|
build(t, n, r) {
|
|
392
|
-
const
|
|
393
|
+
const o = new Za({
|
|
393
394
|
mutationCache: this,
|
|
394
|
-
mutationId: ++
|
|
395
|
+
mutationId: ++ut(this, nt)._,
|
|
395
396
|
options: t.defaultMutationOptions(n),
|
|
396
397
|
state: r
|
|
397
398
|
});
|
|
398
|
-
return this.add(
|
|
399
|
+
return this.add(o), o;
|
|
399
400
|
}
|
|
400
401
|
add(t) {
|
|
401
|
-
const n =
|
|
402
|
-
r.push(t),
|
|
402
|
+
const n = dt(t), r = w(this, oe).get(n) ?? [];
|
|
403
|
+
r.push(t), w(this, oe).set(n, r), this.notify({ type: "added", mutation: t });
|
|
403
404
|
}
|
|
404
405
|
remove(t) {
|
|
405
406
|
var r;
|
|
406
|
-
const n =
|
|
407
|
-
if (
|
|
408
|
-
const
|
|
409
|
-
|
|
407
|
+
const n = dt(t);
|
|
408
|
+
if (w(this, oe).has(n)) {
|
|
409
|
+
const o = (r = w(this, oe).get(n)) == null ? void 0 : r.filter((s) => s !== t);
|
|
410
|
+
o && (o.length === 0 ? w(this, oe).delete(n) : w(this, oe).set(n, o));
|
|
410
411
|
}
|
|
411
412
|
this.notify({ type: "removed", mutation: t });
|
|
412
413
|
}
|
|
413
414
|
canRun(t) {
|
|
414
415
|
var r;
|
|
415
|
-
const n = (r =
|
|
416
|
+
const n = (r = w(this, oe).get(dt(t))) == null ? void 0 : r.find((o) => o.state.status === "pending");
|
|
416
417
|
return !n || n === t;
|
|
417
418
|
}
|
|
418
419
|
runNext(t) {
|
|
419
420
|
var r;
|
|
420
|
-
const n = (r =
|
|
421
|
+
const n = (r = w(this, oe).get(dt(t))) == null ? void 0 : r.find((o) => o !== t && o.state.isPaused);
|
|
421
422
|
return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
|
|
422
423
|
}
|
|
423
424
|
clear() {
|
|
424
|
-
|
|
425
|
+
se.batch(() => {
|
|
425
426
|
this.getAll().forEach((t) => {
|
|
426
427
|
this.remove(t);
|
|
427
428
|
});
|
|
428
429
|
});
|
|
429
430
|
}
|
|
430
431
|
getAll() {
|
|
431
|
-
return [...
|
|
432
|
+
return [...w(this, oe).values()].flat();
|
|
432
433
|
}
|
|
433
434
|
find(t) {
|
|
434
435
|
const n = { exact: !0, ...t };
|
|
435
436
|
return this.getAll().find(
|
|
436
|
-
(r) =>
|
|
437
|
+
(r) => vn(n, r)
|
|
437
438
|
);
|
|
438
439
|
}
|
|
439
440
|
findAll(t = {}) {
|
|
440
|
-
return this.getAll().filter((n) =>
|
|
441
|
+
return this.getAll().filter((n) => vn(t, n));
|
|
441
442
|
}
|
|
442
443
|
notify(t) {
|
|
443
|
-
|
|
444
|
+
se.batch(() => {
|
|
444
445
|
this.listeners.forEach((n) => {
|
|
445
446
|
n(t);
|
|
446
447
|
});
|
|
@@ -448,76 +449,74 @@ var de, Sn, ws = (Sn = class extends Un {
|
|
|
448
449
|
}
|
|
449
450
|
resumePausedMutations() {
|
|
450
451
|
const t = this.getAll().filter((n) => n.state.isPaused);
|
|
451
|
-
return
|
|
452
|
+
return se.batch(
|
|
452
453
|
() => Promise.all(
|
|
453
|
-
t.map((n) => n.continue().catch(
|
|
454
|
+
t.map((n) => n.continue().catch(be))
|
|
454
455
|
)
|
|
455
456
|
);
|
|
456
457
|
}
|
|
457
|
-
},
|
|
458
|
-
function
|
|
458
|
+
}, oe = new WeakMap(), nt = new WeakMap(), Tn);
|
|
459
|
+
function dt(e) {
|
|
459
460
|
var t;
|
|
460
461
|
return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
|
|
461
462
|
}
|
|
462
|
-
function
|
|
463
|
+
function Sn(e) {
|
|
463
464
|
return {
|
|
464
465
|
onFetch: (t, n) => {
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
466
|
+
var f, c, d, v, M;
|
|
467
|
+
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 = ((v = t.state.data) == null ? void 0 : v.pages) || [], i = ((M = t.state.data) == null ? void 0 : M.pageParams) || [];
|
|
468
|
+
let l = { pages: [], pageParams: [] }, u = 0;
|
|
469
|
+
const m = async () => {
|
|
470
|
+
let C = !1;
|
|
471
|
+
const _ = (P) => {
|
|
472
|
+
Object.defineProperty(P, "signal", {
|
|
471
473
|
enumerable: !0,
|
|
472
|
-
get: () => (t.signal.aborted ?
|
|
473
|
-
|
|
474
|
+
get: () => (t.signal.aborted ? C = !0 : t.signal.addEventListener("abort", () => {
|
|
475
|
+
C = !0;
|
|
474
476
|
}), t.signal)
|
|
475
477
|
});
|
|
476
|
-
},
|
|
477
|
-
if (
|
|
478
|
+
}, R = To(t.options, t.fetchOptions), k = async (P, g, z) => {
|
|
479
|
+
if (C)
|
|
478
480
|
return Promise.reject();
|
|
479
|
-
if (
|
|
480
|
-
return Promise.resolve(
|
|
481
|
-
const
|
|
481
|
+
if (g == null && P.pages.length)
|
|
482
|
+
return Promise.resolve(P);
|
|
483
|
+
const Z = {
|
|
482
484
|
queryKey: t.queryKey,
|
|
483
|
-
pageParam:
|
|
484
|
-
direction:
|
|
485
|
+
pageParam: g,
|
|
486
|
+
direction: z ? "backward" : "forward",
|
|
485
487
|
meta: t.options.meta
|
|
486
488
|
};
|
|
487
|
-
|
|
488
|
-
const
|
|
489
|
-
|
|
490
|
-
), { maxPages:
|
|
489
|
+
_(Z);
|
|
490
|
+
const b = await R(
|
|
491
|
+
Z
|
|
492
|
+
), { maxPages: j } = t.options, D = z ? _o : Oo;
|
|
491
493
|
return {
|
|
492
|
-
pages:
|
|
493
|
-
pageParams:
|
|
494
|
+
pages: D(P.pages, b, j),
|
|
495
|
+
pageParams: D(P.pageParams, g, j)
|
|
494
496
|
};
|
|
495
497
|
};
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
f = await d(C, N, x);
|
|
498
|
+
if (o && s.length) {
|
|
499
|
+
const P = o === "backward", g = P ? Ps : Cn, z = {
|
|
500
|
+
pages: s,
|
|
501
|
+
pageParams: i
|
|
502
|
+
}, Z = g(r, z);
|
|
503
|
+
l = await k(z, Z, P);
|
|
503
504
|
} else {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
f = await d(f, C);
|
|
512
|
-
}
|
|
505
|
+
const P = e ?? s.length;
|
|
506
|
+
do {
|
|
507
|
+
const g = u === 0 ? i[0] ?? r.initialPageParam : Cn(r, l);
|
|
508
|
+
if (u > 0 && g == null)
|
|
509
|
+
break;
|
|
510
|
+
l = await k(l, g), u++;
|
|
511
|
+
} while (u < P);
|
|
513
512
|
}
|
|
514
|
-
return
|
|
513
|
+
return l;
|
|
515
514
|
};
|
|
516
515
|
t.options.persister ? t.fetchFn = () => {
|
|
517
|
-
var
|
|
518
|
-
return (
|
|
519
|
-
|
|
520
|
-
|
|
516
|
+
var C, _;
|
|
517
|
+
return (_ = (C = t.options).persister) == null ? void 0 : _.call(
|
|
518
|
+
C,
|
|
519
|
+
m,
|
|
521
520
|
{
|
|
522
521
|
queryKey: t.queryKey,
|
|
523
522
|
meta: t.options.meta,
|
|
@@ -525,88 +524,82 @@ function xs(e) {
|
|
|
525
524
|
},
|
|
526
525
|
n
|
|
527
526
|
);
|
|
528
|
-
} : t.fetchFn =
|
|
527
|
+
} : t.fetchFn = m;
|
|
529
528
|
}
|
|
530
529
|
};
|
|
531
530
|
}
|
|
532
|
-
function
|
|
531
|
+
function Cn(e, { pages: t, pageParams: n }) {
|
|
533
532
|
const r = t.length - 1;
|
|
534
|
-
return e.getNextPageParam(
|
|
533
|
+
return t.length > 0 ? e.getNextPageParam(
|
|
535
534
|
t[r],
|
|
536
535
|
t,
|
|
537
536
|
n[r],
|
|
538
537
|
n
|
|
539
|
-
);
|
|
538
|
+
) : void 0;
|
|
540
539
|
}
|
|
541
|
-
function
|
|
540
|
+
function Ps(e, { pages: t, pageParams: n }) {
|
|
542
541
|
var r;
|
|
543
|
-
return (r = e.getPreviousPageParam) == null ? void 0 : r.call(
|
|
544
|
-
e,
|
|
545
|
-
t[0],
|
|
546
|
-
t,
|
|
547
|
-
n[0],
|
|
548
|
-
n
|
|
549
|
-
);
|
|
542
|
+
return t.length > 0 ? (r = e.getPreviousPageParam) == null ? void 0 : r.call(e, t[0], t, n[0], n) : void 0;
|
|
550
543
|
}
|
|
551
|
-
var
|
|
544
|
+
var F, Pe, je, Be, He, Ne, Ue, ze, _n, js = (_n = class {
|
|
552
545
|
constructor(e = {}) {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
546
|
+
ce(this, F);
|
|
547
|
+
ce(this, Pe);
|
|
548
|
+
ce(this, je);
|
|
549
|
+
ce(this, Be);
|
|
550
|
+
ce(this, He);
|
|
551
|
+
ce(this, Ne);
|
|
552
|
+
ce(this, Ue);
|
|
553
|
+
ce(this, ze);
|
|
554
|
+
X(this, F, e.queryCache || new Es()), X(this, Pe, e.mutationCache || new Ds()), X(this, je, e.defaultOptions || {}), X(this, Be, /* @__PURE__ */ new Map()), X(this, He, /* @__PURE__ */ new Map()), X(this, Ne, 0);
|
|
562
555
|
}
|
|
563
556
|
mount() {
|
|
564
|
-
|
|
565
|
-
e && (await this.resumePausedMutations(),
|
|
566
|
-
})),
|
|
567
|
-
e && (await this.resumePausedMutations(),
|
|
557
|
+
ut(this, Ne)._++, w(this, Ne) === 1 && (X(this, Ue, Io.subscribe(async (e) => {
|
|
558
|
+
e && (await this.resumePausedMutations(), w(this, F).onFocus());
|
|
559
|
+
})), X(this, ze, wn.subscribe(async (e) => {
|
|
560
|
+
e && (await this.resumePausedMutations(), w(this, F).onOnline());
|
|
568
561
|
})));
|
|
569
562
|
}
|
|
570
563
|
unmount() {
|
|
571
564
|
var e, t;
|
|
572
|
-
|
|
565
|
+
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));
|
|
573
566
|
}
|
|
574
567
|
isFetching(e) {
|
|
575
|
-
return
|
|
568
|
+
return w(this, F).findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
576
569
|
}
|
|
577
570
|
isMutating(e) {
|
|
578
|
-
return
|
|
571
|
+
return w(this, Pe).findAll({ ...e, status: "pending" }).length;
|
|
579
572
|
}
|
|
580
573
|
getQueryData(e) {
|
|
581
574
|
var n;
|
|
582
575
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
583
|
-
return (n =
|
|
576
|
+
return (n = w(this, F).get(t.queryHash)) == null ? void 0 : n.state.data;
|
|
584
577
|
}
|
|
585
578
|
ensureQueryData(e) {
|
|
586
579
|
const t = this.getQueryData(e.queryKey);
|
|
587
580
|
if (t === void 0)
|
|
588
581
|
return this.fetchQuery(e);
|
|
589
582
|
{
|
|
590
|
-
const n = this.defaultQueryOptions(e), r =
|
|
591
|
-
return e.revalidateIfStale && r.isStaleByTime(
|
|
583
|
+
const n = this.defaultQueryOptions(e), r = w(this, F).build(this, n);
|
|
584
|
+
return e.revalidateIfStale && r.isStaleByTime(xn(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(t);
|
|
592
585
|
}
|
|
593
586
|
}
|
|
594
587
|
getQueriesData(e) {
|
|
595
|
-
return
|
|
588
|
+
return w(this, F).findAll(e).map(({ queryKey: t, state: n }) => {
|
|
596
589
|
const r = n.data;
|
|
597
590
|
return [t, r];
|
|
598
591
|
});
|
|
599
592
|
}
|
|
600
593
|
setQueryData(e, t, n) {
|
|
601
|
-
const r = this.defaultQueryOptions({ queryKey: e }),
|
|
594
|
+
const r = this.defaultQueryOptions({ queryKey: e }), o = w(this, F).get(
|
|
602
595
|
r.queryHash
|
|
603
|
-
), s =
|
|
596
|
+
), s = o == null ? void 0 : o.state.data, i = Ao(t, s);
|
|
604
597
|
if (i !== void 0)
|
|
605
|
-
return
|
|
598
|
+
return w(this, F).build(this, r).setData(i, { ...n, manual: !0 });
|
|
606
599
|
}
|
|
607
600
|
setQueriesData(e, t, n) {
|
|
608
|
-
return
|
|
609
|
-
() =>
|
|
601
|
+
return se.batch(
|
|
602
|
+
() => w(this, F).findAll(e).map(({ queryKey: r }) => [
|
|
610
603
|
r,
|
|
611
604
|
this.setQueryData(r, t, n)
|
|
612
605
|
])
|
|
@@ -615,34 +608,34 @@ var $, Se, Ee, ke, $e, Ce, Le, Fe, Cn, Ms = (Cn = class {
|
|
|
615
608
|
getQueryState(e) {
|
|
616
609
|
var n;
|
|
617
610
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
618
|
-
return (n =
|
|
611
|
+
return (n = w(this, F).get(t.queryHash)) == null ? void 0 : n.state;
|
|
619
612
|
}
|
|
620
613
|
removeQueries(e) {
|
|
621
|
-
const t =
|
|
622
|
-
|
|
614
|
+
const t = w(this, F);
|
|
615
|
+
se.batch(() => {
|
|
623
616
|
t.findAll(e).forEach((n) => {
|
|
624
617
|
t.remove(n);
|
|
625
618
|
});
|
|
626
619
|
});
|
|
627
620
|
}
|
|
628
621
|
resetQueries(e, t) {
|
|
629
|
-
const n =
|
|
622
|
+
const n = w(this, F), r = {
|
|
630
623
|
type: "active",
|
|
631
624
|
...e
|
|
632
625
|
};
|
|
633
|
-
return
|
|
634
|
-
|
|
626
|
+
return se.batch(() => (n.findAll(e).forEach((o) => {
|
|
627
|
+
o.reset();
|
|
635
628
|
}), this.refetchQueries(r, t)));
|
|
636
629
|
}
|
|
637
630
|
cancelQueries(e = {}, t = {}) {
|
|
638
|
-
const n = { revert: !0, ...t }, r =
|
|
639
|
-
() =>
|
|
631
|
+
const n = { revert: !0, ...t }, r = se.batch(
|
|
632
|
+
() => w(this, F).findAll(e).map((o) => o.cancel(n))
|
|
640
633
|
);
|
|
641
|
-
return Promise.all(r).then(
|
|
634
|
+
return Promise.all(r).then(be).catch(be);
|
|
642
635
|
}
|
|
643
636
|
invalidateQueries(e = {}, t = {}) {
|
|
644
|
-
return
|
|
645
|
-
if (
|
|
637
|
+
return se.batch(() => {
|
|
638
|
+
if (w(this, F).findAll(e).forEach((r) => {
|
|
646
639
|
r.invalidate();
|
|
647
640
|
}), e.refetchType === "none")
|
|
648
641
|
return Promise.resolve();
|
|
@@ -657,105 +650,108 @@ var $, Se, Ee, ke, $e, Ce, Le, Fe, Cn, Ms = (Cn = class {
|
|
|
657
650
|
const n = {
|
|
658
651
|
...t,
|
|
659
652
|
cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
|
|
660
|
-
}, r =
|
|
661
|
-
() =>
|
|
662
|
-
let s =
|
|
663
|
-
return n.throwOnError || (s = s.catch(
|
|
653
|
+
}, r = se.batch(
|
|
654
|
+
() => w(this, F).findAll(e).filter((o) => !o.isDisabled()).map((o) => {
|
|
655
|
+
let s = o.fetch(void 0, n);
|
|
656
|
+
return n.throwOnError || (s = s.catch(be)), o.state.fetchStatus === "paused" ? Promise.resolve() : s;
|
|
664
657
|
})
|
|
665
658
|
);
|
|
666
|
-
return Promise.all(r).then(
|
|
659
|
+
return Promise.all(r).then(be);
|
|
667
660
|
}
|
|
668
661
|
fetchQuery(e) {
|
|
669
662
|
const t = this.defaultQueryOptions(e);
|
|
670
663
|
t.retry === void 0 && (t.retry = !1);
|
|
671
|
-
const n =
|
|
664
|
+
const n = w(this, F).build(this, t);
|
|
672
665
|
return n.isStaleByTime(
|
|
673
|
-
|
|
666
|
+
xn(t.staleTime, n)
|
|
674
667
|
) ? n.fetch(t) : Promise.resolve(n.state.data);
|
|
675
668
|
}
|
|
676
669
|
prefetchQuery(e) {
|
|
677
|
-
return this.fetchQuery(e).then(
|
|
670
|
+
return this.fetchQuery(e).then(be).catch(be);
|
|
678
671
|
}
|
|
679
672
|
fetchInfiniteQuery(e) {
|
|
680
|
-
return e.behavior =
|
|
673
|
+
return e.behavior = Sn(e.pages), this.fetchQuery(e);
|
|
681
674
|
}
|
|
682
675
|
prefetchInfiniteQuery(e) {
|
|
683
|
-
return this.fetchInfiniteQuery(e).then(
|
|
676
|
+
return this.fetchInfiniteQuery(e).then(be).catch(be);
|
|
677
|
+
}
|
|
678
|
+
ensureInfiniteQueryData(e) {
|
|
679
|
+
return e.behavior = Sn(e.pages), this.ensureQueryData(e);
|
|
684
680
|
}
|
|
685
681
|
resumePausedMutations() {
|
|
686
|
-
return
|
|
682
|
+
return wn.isOnline() ? w(this, Pe).resumePausedMutations() : Promise.resolve();
|
|
687
683
|
}
|
|
688
684
|
getQueryCache() {
|
|
689
|
-
return
|
|
685
|
+
return w(this, F);
|
|
690
686
|
}
|
|
691
687
|
getMutationCache() {
|
|
692
|
-
return
|
|
688
|
+
return w(this, Pe);
|
|
693
689
|
}
|
|
694
690
|
getDefaultOptions() {
|
|
695
|
-
return
|
|
691
|
+
return w(this, je);
|
|
696
692
|
}
|
|
697
693
|
setDefaultOptions(e) {
|
|
698
|
-
|
|
694
|
+
X(this, je, e);
|
|
699
695
|
}
|
|
700
696
|
setQueryDefaults(e, t) {
|
|
701
|
-
|
|
697
|
+
w(this, Be).set(yn(e), {
|
|
702
698
|
queryKey: e,
|
|
703
699
|
defaultOptions: t
|
|
704
700
|
});
|
|
705
701
|
}
|
|
706
702
|
getQueryDefaults(e) {
|
|
707
|
-
const t = [...
|
|
703
|
+
const t = [...w(this, Be).values()];
|
|
708
704
|
let n = {};
|
|
709
705
|
return t.forEach((r) => {
|
|
710
|
-
|
|
706
|
+
bn(e, r.queryKey) && (n = { ...n, ...r.defaultOptions });
|
|
711
707
|
}), n;
|
|
712
708
|
}
|
|
713
709
|
setMutationDefaults(e, t) {
|
|
714
|
-
|
|
710
|
+
w(this, He).set(yn(e), {
|
|
715
711
|
mutationKey: e,
|
|
716
712
|
defaultOptions: t
|
|
717
713
|
});
|
|
718
714
|
}
|
|
719
715
|
getMutationDefaults(e) {
|
|
720
|
-
const t = [...
|
|
716
|
+
const t = [...w(this, He).values()];
|
|
721
717
|
let n = {};
|
|
722
718
|
return t.forEach((r) => {
|
|
723
|
-
|
|
719
|
+
bn(e, r.mutationKey) && (n = { ...n, ...r.defaultOptions });
|
|
724
720
|
}), n;
|
|
725
721
|
}
|
|
726
722
|
defaultQueryOptions(e) {
|
|
727
723
|
if (e._defaulted)
|
|
728
724
|
return e;
|
|
729
725
|
const t = {
|
|
730
|
-
...
|
|
726
|
+
...w(this, je).queries,
|
|
731
727
|
...this.getQueryDefaults(e.queryKey),
|
|
732
728
|
...e,
|
|
733
729
|
_defaulted: !0
|
|
734
730
|
};
|
|
735
|
-
return t.queryHash || (t.queryHash =
|
|
731
|
+
return t.queryHash || (t.queryHash = Wn(
|
|
736
732
|
t.queryKey,
|
|
737
733
|
t
|
|
738
|
-
)), 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 ===
|
|
734
|
+
)), 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 === ko && (t.enabled = !1), t;
|
|
739
735
|
}
|
|
740
736
|
defaultMutationOptions(e) {
|
|
741
737
|
return e != null && e._defaulted ? e : {
|
|
742
|
-
...
|
|
738
|
+
...w(this, je).mutations,
|
|
743
739
|
...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
|
|
744
740
|
...e,
|
|
745
741
|
_defaulted: !0
|
|
746
742
|
};
|
|
747
743
|
}
|
|
748
744
|
clear() {
|
|
749
|
-
|
|
745
|
+
w(this, F).clear(), w(this, Pe).clear();
|
|
750
746
|
}
|
|
751
|
-
},
|
|
752
|
-
const
|
|
747
|
+
}, F = new WeakMap(), Pe = new WeakMap(), je = new WeakMap(), Be = new WeakMap(), He = new WeakMap(), Ne = new WeakMap(), Ue = new WeakMap(), ze = new WeakMap(), _n);
|
|
748
|
+
const Ns = Kn(null), Ct = {
|
|
753
749
|
didCatch: !1,
|
|
754
750
|
error: null
|
|
755
751
|
};
|
|
756
|
-
class
|
|
752
|
+
class Ts extends yo {
|
|
757
753
|
constructor(t) {
|
|
758
|
-
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
754
|
+
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Ct;
|
|
759
755
|
}
|
|
760
756
|
static getDerivedStateFromError(t) {
|
|
761
757
|
return {
|
|
@@ -768,31 +764,31 @@ class Es extends fa {
|
|
|
768
764
|
error: t
|
|
769
765
|
} = this.state;
|
|
770
766
|
if (t !== null) {
|
|
771
|
-
for (var n, r,
|
|
767
|
+
for (var n, r, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
|
|
772
768
|
s[i] = arguments[i];
|
|
773
769
|
(n = (r = this.props).onReset) === null || n === void 0 || n.call(r, {
|
|
774
770
|
args: s,
|
|
775
771
|
reason: "imperative-api"
|
|
776
|
-
}), this.setState(
|
|
772
|
+
}), this.setState(Ct);
|
|
777
773
|
}
|
|
778
774
|
}
|
|
779
775
|
componentDidCatch(t, n) {
|
|
780
|
-
var r,
|
|
781
|
-
(r = (
|
|
776
|
+
var r, o;
|
|
777
|
+
(r = (o = this.props).onError) === null || r === void 0 || r.call(o, t, n);
|
|
782
778
|
}
|
|
783
779
|
componentDidUpdate(t, n) {
|
|
784
780
|
const {
|
|
785
781
|
didCatch: r
|
|
786
782
|
} = this.state, {
|
|
787
|
-
resetKeys:
|
|
783
|
+
resetKeys: o
|
|
788
784
|
} = this.props;
|
|
789
|
-
if (r && n.error !== null &&
|
|
785
|
+
if (r && n.error !== null && _s(t.resetKeys, o)) {
|
|
790
786
|
var s, i;
|
|
791
787
|
(s = (i = this.props).onReset) === null || s === void 0 || s.call(i, {
|
|
792
|
-
next:
|
|
788
|
+
next: o,
|
|
793
789
|
prev: t.resetKeys,
|
|
794
790
|
reason: "keys"
|
|
795
|
-
}), this.setState(
|
|
791
|
+
}), this.setState(Ct);
|
|
796
792
|
}
|
|
797
793
|
}
|
|
798
794
|
render() {
|
|
@@ -800,7 +796,7 @@ class Es extends fa {
|
|
|
800
796
|
children: t,
|
|
801
797
|
fallbackRender: n,
|
|
802
798
|
FallbackComponent: r,
|
|
803
|
-
fallback:
|
|
799
|
+
fallback: o
|
|
804
800
|
} = this.props, {
|
|
805
801
|
didCatch: s,
|
|
806
802
|
error: i
|
|
@@ -814,13 +810,13 @@ class Es extends fa {
|
|
|
814
810
|
if (typeof n == "function")
|
|
815
811
|
l = n(u);
|
|
816
812
|
else if (r)
|
|
817
|
-
l =
|
|
818
|
-
else if (
|
|
819
|
-
l =
|
|
813
|
+
l = mn(r, u);
|
|
814
|
+
else if (o === null || bo(o))
|
|
815
|
+
l = o;
|
|
820
816
|
else
|
|
821
817
|
throw i;
|
|
822
818
|
}
|
|
823
|
-
return
|
|
819
|
+
return mn(Ns.Provider, {
|
|
824
820
|
value: {
|
|
825
821
|
didCatch: s,
|
|
826
822
|
error: i,
|
|
@@ -829,89 +825,89 @@ class Es extends fa {
|
|
|
829
825
|
}, l);
|
|
830
826
|
}
|
|
831
827
|
}
|
|
832
|
-
function
|
|
828
|
+
function _s() {
|
|
833
829
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
834
830
|
return e.length !== t.length || e.some((n, r) => !Object.is(n, t[r]));
|
|
835
831
|
}
|
|
836
|
-
const
|
|
837
|
-
class
|
|
832
|
+
const Os = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", Is = (e) => "getRoutes" in e && typeof e.getRoutes == "function", As = (e) => "renderSearch" in e && typeof e.renderSearch == "function", ks = (e) => "initialize" in e && typeof e.initialize == "function", $s = (e) => "getHead" in e && typeof e.getHead == "function", Fs = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", Ls = (e) => "getIdentities" in e && typeof e.getIdentities == "function", nr = new js();
|
|
833
|
+
class Bs {
|
|
838
834
|
constructor(t) {
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
835
|
+
ae(this, "plugins");
|
|
836
|
+
ae(this, "sidebars");
|
|
837
|
+
ae(this, "topNavigation");
|
|
838
|
+
ae(this, "meta");
|
|
839
|
+
ae(this, "page");
|
|
840
|
+
ae(this, "authentication");
|
|
841
|
+
ae(this, "navigationPlugins");
|
|
842
|
+
ae(this, "initialize", async () => {
|
|
847
843
|
await Promise.all(
|
|
848
|
-
this.plugins.filter(
|
|
844
|
+
this.plugins.filter(ks).map((t) => {
|
|
849
845
|
var n;
|
|
850
846
|
return (n = t.initialize) == null ? void 0 : n.call(t, this);
|
|
851
847
|
})
|
|
852
848
|
);
|
|
853
849
|
});
|
|
854
|
-
|
|
855
|
-
await
|
|
850
|
+
ae(this, "invalidateCache", async (t) => {
|
|
851
|
+
await nr.invalidateQueries({ queryKey: t });
|
|
856
852
|
});
|
|
857
|
-
|
|
858
|
-
this.plugins.filter(
|
|
853
|
+
ae(this, "getApiIdentities", async () => (await Promise.all(
|
|
854
|
+
this.plugins.filter(Ls).map((n) => n.getIdentities(this))
|
|
859
855
|
)).flat());
|
|
860
|
-
|
|
856
|
+
ae(this, "getPluginSidebar", async (t) => (await Promise.all(
|
|
861
857
|
this.navigationPlugins.map(
|
|
862
858
|
(r) => {
|
|
863
|
-
var
|
|
864
|
-
return (
|
|
859
|
+
var o;
|
|
860
|
+
return (o = r.getSidebar) == null ? void 0 : o.call(r, Ht(t));
|
|
865
861
|
}
|
|
866
862
|
)
|
|
867
863
|
)).flatMap((r) => r ?? []));
|
|
868
|
-
|
|
864
|
+
ae(this, "signRequest", async (t) => {
|
|
869
865
|
if (!this.authentication)
|
|
870
866
|
throw new Error("No authentication provider configured");
|
|
871
867
|
const n = await this.authentication.getAccessToken();
|
|
872
868
|
return t.headers.set("Authorization", `Bearer ${n}`), t;
|
|
873
869
|
});
|
|
874
|
-
this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(
|
|
870
|
+
this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Is), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
|
|
875
871
|
}
|
|
876
872
|
}
|
|
877
|
-
function
|
|
878
|
-
return /* @__PURE__ */
|
|
873
|
+
function Hs({ error: e, resetErrorBoundary: t }) {
|
|
874
|
+
return /* @__PURE__ */ a.jsx(An, { error: e });
|
|
879
875
|
}
|
|
880
|
-
const
|
|
881
|
-
(!
|
|
882
|
-
var
|
|
883
|
-
ltr: [...
|
|
884
|
-
rtl: [...
|
|
885
|
-
},
|
|
876
|
+
const ft = globalThis;
|
|
877
|
+
(!ft.requestIdleCallback || !ft.cancelIdleCallback) && (ft.requestIdleCallback = (e) => setTimeout(e, 1), ft.cancelIdleCallback = clearTimeout);
|
|
878
|
+
var Nt = ["Enter", " "], Us = ["ArrowDown", "PageUp", "Home"], rr = ["ArrowUp", "PageDown", "End"], zs = [...Us, ...rr], Ks = {
|
|
879
|
+
ltr: [...Nt, "ArrowRight"],
|
|
880
|
+
rtl: [...Nt, "ArrowLeft"]
|
|
881
|
+
}, qs = {
|
|
886
882
|
ltr: ["ArrowLeft"],
|
|
887
883
|
rtl: ["ArrowRight"]
|
|
888
|
-
},
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
]),
|
|
893
|
-
const { __scopeMenu: t, open: n = !1, children: r, dir:
|
|
884
|
+
}, ot = "Menu", [et, Qs, Vs] = eo(ot), [Ae, ar] = kn(ot, [
|
|
885
|
+
Vs,
|
|
886
|
+
$n,
|
|
887
|
+
Jn
|
|
888
|
+
]), st = $n(), or = Jn(), [sr, Te] = Ae(ot), [Gs, it] = Ae(ot), ir = (e) => {
|
|
889
|
+
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 = $t(s), d = fo(o);
|
|
894
890
|
return h.useEffect(() => {
|
|
895
|
-
const
|
|
896
|
-
|
|
897
|
-
},
|
|
898
|
-
return document.addEventListener("keydown",
|
|
899
|
-
document.removeEventListener("keydown",
|
|
891
|
+
const v = () => {
|
|
892
|
+
f.current = !0, document.addEventListener("pointerdown", M, { capture: !0, once: !0 }), document.addEventListener("pointermove", M, { capture: !0, once: !0 });
|
|
893
|
+
}, M = () => f.current = !1;
|
|
894
|
+
return document.addEventListener("keydown", v, { capture: !0 }), () => {
|
|
895
|
+
document.removeEventListener("keydown", v, { capture: !0 }), document.removeEventListener("pointerdown", M, { capture: !0 }), document.removeEventListener("pointermove", M, { capture: !0 });
|
|
900
896
|
};
|
|
901
|
-
}, []), /* @__PURE__ */
|
|
902
|
-
|
|
897
|
+
}, []), /* @__PURE__ */ a.jsx(Ln, { ...l, children: /* @__PURE__ */ a.jsx(
|
|
898
|
+
sr,
|
|
903
899
|
{
|
|
904
900
|
scope: t,
|
|
905
901
|
open: n,
|
|
906
902
|
onOpenChange: c,
|
|
907
903
|
content: u,
|
|
908
|
-
onContentChange:
|
|
909
|
-
children: /* @__PURE__ */
|
|
910
|
-
|
|
904
|
+
onContentChange: m,
|
|
905
|
+
children: /* @__PURE__ */ a.jsx(
|
|
906
|
+
Gs,
|
|
911
907
|
{
|
|
912
908
|
scope: t,
|
|
913
909
|
onClose: h.useCallback(() => c(!1), [c]),
|
|
914
|
-
isUsingKeyboardRef:
|
|
910
|
+
isUsingKeyboardRef: f,
|
|
915
911
|
dir: d,
|
|
916
912
|
modal: i,
|
|
917
913
|
children: r
|
|
@@ -920,37 +916,37 @@ var jt = ["Enter", " "], As = ["ArrowDown", "PageUp", "Home"], Yn = ["ArrowUp",
|
|
|
920
916
|
}
|
|
921
917
|
) });
|
|
922
918
|
};
|
|
923
|
-
|
|
924
|
-
var
|
|
919
|
+
ir.displayName = ot;
|
|
920
|
+
var Ws = "MenuAnchor", zt = h.forwardRef(
|
|
925
921
|
(e, t) => {
|
|
926
|
-
const { __scopeMenu: n, ...r } = e,
|
|
927
|
-
return /* @__PURE__ */
|
|
922
|
+
const { __scopeMenu: n, ...r } = e, o = st(n);
|
|
923
|
+
return /* @__PURE__ */ a.jsx(to, { ...o, ...r, ref: t });
|
|
928
924
|
}
|
|
929
925
|
);
|
|
930
|
-
|
|
931
|
-
var
|
|
926
|
+
zt.displayName = Ws;
|
|
927
|
+
var Kt = "MenuPortal", [Ys, lr] = Ae(Kt, {
|
|
932
928
|
forceMount: void 0
|
|
933
|
-
}),
|
|
934
|
-
const { __scopeMenu: t, forceMount: n, children: r, container:
|
|
935
|
-
return /* @__PURE__ */
|
|
929
|
+
}), cr = (e) => {
|
|
930
|
+
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Te(Kt, t);
|
|
931
|
+
return /* @__PURE__ */ a.jsx(Ys, { scope: t, forceMount: n, children: /* @__PURE__ */ a.jsx(xt, { present: n || s.open, children: /* @__PURE__ */ a.jsx(ho, { asChild: !0, container: o, children: r }) }) });
|
|
936
932
|
};
|
|
937
|
-
|
|
938
|
-
var
|
|
933
|
+
cr.displayName = Kt;
|
|
934
|
+
var ue = "MenuContent", [Xs, qt] = Ae(ue), ur = h.forwardRef(
|
|
939
935
|
(e, t) => {
|
|
940
|
-
const n =
|
|
941
|
-
return /* @__PURE__ */
|
|
936
|
+
const n = lr(ue, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Te(ue, e.__scopeMenu), i = it(ue, e.__scopeMenu);
|
|
937
|
+
return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(et.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ a.jsx(Js, { ...o, ref: t }) : /* @__PURE__ */ a.jsx(Zs, { ...o, ref: t }) }) }) });
|
|
942
938
|
}
|
|
943
|
-
),
|
|
939
|
+
), Js = h.forwardRef(
|
|
944
940
|
(e, t) => {
|
|
945
|
-
const n =
|
|
941
|
+
const n = Te(ue, e.__scopeMenu), r = h.useRef(null), o = rt(t, r);
|
|
946
942
|
return h.useEffect(() => {
|
|
947
943
|
const s = r.current;
|
|
948
|
-
if (s) return
|
|
949
|
-
}, []), /* @__PURE__ */
|
|
950
|
-
|
|
944
|
+
if (s) return no(s);
|
|
945
|
+
}, []), /* @__PURE__ */ a.jsx(
|
|
946
|
+
Qt,
|
|
951
947
|
{
|
|
952
948
|
...e,
|
|
953
|
-
ref:
|
|
949
|
+
ref: o,
|
|
954
950
|
trapFocus: n.open,
|
|
955
951
|
disableOutsidePointerEvents: n.open,
|
|
956
952
|
disableOutsideScroll: !0,
|
|
@@ -963,10 +959,10 @@ var se = "MenuContent", [Ks, zt] = _e(se), rr = h.forwardRef(
|
|
|
963
959
|
}
|
|
964
960
|
);
|
|
965
961
|
}
|
|
966
|
-
),
|
|
967
|
-
const n =
|
|
968
|
-
return /* @__PURE__ */
|
|
969
|
-
|
|
962
|
+
), Zs = h.forwardRef((e, t) => {
|
|
963
|
+
const n = Te(ue, e.__scopeMenu);
|
|
964
|
+
return /* @__PURE__ */ a.jsx(
|
|
965
|
+
Qt,
|
|
970
966
|
{
|
|
971
967
|
...e,
|
|
972
968
|
ref: t,
|
|
@@ -976,128 +972,128 @@ var se = "MenuContent", [Ks, zt] = _e(se), rr = h.forwardRef(
|
|
|
976
972
|
onDismiss: () => n.onOpenChange(!1)
|
|
977
973
|
}
|
|
978
974
|
);
|
|
979
|
-
}),
|
|
975
|
+
}), Qt = h.forwardRef(
|
|
980
976
|
(e, t) => {
|
|
981
977
|
const {
|
|
982
978
|
__scopeMenu: n,
|
|
983
979
|
loop: r = !1,
|
|
984
|
-
trapFocus:
|
|
980
|
+
trapFocus: o,
|
|
985
981
|
onOpenAutoFocus: s,
|
|
986
982
|
onCloseAutoFocus: i,
|
|
987
983
|
disableOutsidePointerEvents: l,
|
|
988
984
|
onEntryFocus: u,
|
|
989
|
-
onEscapeKeyDown:
|
|
990
|
-
onPointerDownOutside:
|
|
985
|
+
onEscapeKeyDown: m,
|
|
986
|
+
onPointerDownOutside: f,
|
|
991
987
|
onFocusOutside: c,
|
|
992
988
|
onInteractOutside: d,
|
|
993
|
-
onDismiss:
|
|
994
|
-
disableOutsideScroll:
|
|
995
|
-
...
|
|
996
|
-
} = e,
|
|
997
|
-
var le,
|
|
998
|
-
const
|
|
999
|
-
(function re(
|
|
1000
|
-
|
|
1001
|
-
})(
|
|
989
|
+
onDismiss: v,
|
|
990
|
+
disableOutsideScroll: M,
|
|
991
|
+
...C
|
|
992
|
+
} = e, _ = Te(ue, n), R = it(ue, n), k = st(n), P = or(n), g = Qs(n), [z, Z] = h.useState(null), b = h.useRef(null), j = rt(t, b, _.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 = M ? lo : h.Fragment, te = M ? { as: co, allowPinchZoom: !0 } : void 0, q = (y) => {
|
|
993
|
+
var le, Re;
|
|
994
|
+
const Q = B.current + y, ie = g().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 = di(Me, Q, pe), ye = (Re = ie.find((re) => re.textValue === ke)) == null ? void 0 : Re.ref.current;
|
|
995
|
+
(function re($e) {
|
|
996
|
+
B.current = $e, window.clearTimeout(D.current), $e !== "" && (D.current = window.setTimeout(() => re(""), 1e3));
|
|
997
|
+
})(Q), ye && setTimeout(() => ye.focus());
|
|
1002
998
|
};
|
|
1003
|
-
h.useEffect(() => () => window.clearTimeout(
|
|
1004
|
-
const
|
|
1005
|
-
var
|
|
1006
|
-
return
|
|
999
|
+
h.useEffect(() => () => window.clearTimeout(D.current), []), ro();
|
|
1000
|
+
const Y = h.useCallback((y) => {
|
|
1001
|
+
var ie, de;
|
|
1002
|
+
return x.current === ((ie = W.current) == null ? void 0 : ie.side) && hi(y, (de = W.current) == null ? void 0 : de.area);
|
|
1007
1003
|
}, []);
|
|
1008
|
-
return /* @__PURE__ */
|
|
1009
|
-
|
|
1004
|
+
return /* @__PURE__ */ a.jsx(
|
|
1005
|
+
Xs,
|
|
1010
1006
|
{
|
|
1011
1007
|
scope: n,
|
|
1012
|
-
searchRef:
|
|
1008
|
+
searchRef: B,
|
|
1013
1009
|
onItemEnter: h.useCallback(
|
|
1014
|
-
(
|
|
1015
|
-
|
|
1010
|
+
(y) => {
|
|
1011
|
+
Y(y) && y.preventDefault();
|
|
1016
1012
|
},
|
|
1017
|
-
[
|
|
1013
|
+
[Y]
|
|
1018
1014
|
),
|
|
1019
1015
|
onItemLeave: h.useCallback(
|
|
1020
|
-
(
|
|
1021
|
-
var
|
|
1022
|
-
|
|
1016
|
+
(y) => {
|
|
1017
|
+
var Q;
|
|
1018
|
+
Y(y) || ((Q = b.current) == null || Q.focus(), Z(null));
|
|
1023
1019
|
},
|
|
1024
|
-
[
|
|
1020
|
+
[Y]
|
|
1025
1021
|
),
|
|
1026
1022
|
onTriggerLeave: h.useCallback(
|
|
1027
|
-
(
|
|
1028
|
-
|
|
1023
|
+
(y) => {
|
|
1024
|
+
Y(y) && y.preventDefault();
|
|
1029
1025
|
},
|
|
1030
|
-
[
|
|
1026
|
+
[Y]
|
|
1031
1027
|
),
|
|
1032
|
-
pointerGraceTimerRef:
|
|
1033
|
-
onPointerGraceIntentChange: h.useCallback((
|
|
1034
|
-
|
|
1028
|
+
pointerGraceTimerRef: K,
|
|
1029
|
+
onPointerGraceIntentChange: h.useCallback((y) => {
|
|
1030
|
+
W.current = y;
|
|
1035
1031
|
}, []),
|
|
1036
|
-
children: /* @__PURE__ */
|
|
1037
|
-
|
|
1032
|
+
children: /* @__PURE__ */ a.jsx(G, { ...te, children: /* @__PURE__ */ a.jsx(
|
|
1033
|
+
ao,
|
|
1038
1034
|
{
|
|
1039
1035
|
asChild: !0,
|
|
1040
|
-
trapped:
|
|
1041
|
-
onMountAutoFocus: A(s, (
|
|
1042
|
-
var
|
|
1043
|
-
|
|
1036
|
+
trapped: o,
|
|
1037
|
+
onMountAutoFocus: A(s, (y) => {
|
|
1038
|
+
var Q;
|
|
1039
|
+
y.preventDefault(), (Q = b.current) == null || Q.focus({ preventScroll: !0 });
|
|
1044
1040
|
}),
|
|
1045
1041
|
onUnmountAutoFocus: i,
|
|
1046
|
-
children: /* @__PURE__ */
|
|
1047
|
-
|
|
1042
|
+
children: /* @__PURE__ */ a.jsx(
|
|
1043
|
+
oo,
|
|
1048
1044
|
{
|
|
1049
1045
|
asChild: !0,
|
|
1050
1046
|
disableOutsidePointerEvents: l,
|
|
1051
|
-
onEscapeKeyDown:
|
|
1052
|
-
onPointerDownOutside:
|
|
1047
|
+
onEscapeKeyDown: m,
|
|
1048
|
+
onPointerDownOutside: f,
|
|
1053
1049
|
onFocusOutside: c,
|
|
1054
1050
|
onInteractOutside: d,
|
|
1055
|
-
onDismiss:
|
|
1056
|
-
children: /* @__PURE__ */
|
|
1057
|
-
|
|
1051
|
+
onDismiss: v,
|
|
1052
|
+
children: /* @__PURE__ */ a.jsx(
|
|
1053
|
+
Yo,
|
|
1058
1054
|
{
|
|
1059
1055
|
asChild: !0,
|
|
1060
|
-
...
|
|
1061
|
-
dir:
|
|
1056
|
+
...P,
|
|
1057
|
+
dir: R.dir,
|
|
1062
1058
|
orientation: "vertical",
|
|
1063
1059
|
loop: r,
|
|
1064
|
-
currentTabStopId:
|
|
1065
|
-
onCurrentTabStopIdChange:
|
|
1066
|
-
onEntryFocus: A(u, (
|
|
1067
|
-
|
|
1060
|
+
currentTabStopId: z,
|
|
1061
|
+
onCurrentTabStopIdChange: Z,
|
|
1062
|
+
onEntryFocus: A(u, (y) => {
|
|
1063
|
+
R.isUsingKeyboardRef.current || y.preventDefault();
|
|
1068
1064
|
}),
|
|
1069
1065
|
preventScrollOnEntryFocus: !0,
|
|
1070
|
-
children: /* @__PURE__ */
|
|
1071
|
-
|
|
1066
|
+
children: /* @__PURE__ */ a.jsx(
|
|
1067
|
+
so,
|
|
1072
1068
|
{
|
|
1073
1069
|
role: "menu",
|
|
1074
1070
|
"aria-orientation": "vertical",
|
|
1075
|
-
"data-state":
|
|
1071
|
+
"data-state": Dr(_.open),
|
|
1076
1072
|
"data-radix-menu-content": "",
|
|
1077
|
-
dir:
|
|
1078
|
-
...
|
|
1079
|
-
...
|
|
1080
|
-
ref:
|
|
1081
|
-
style: { outline: "none", ...
|
|
1082
|
-
onKeyDown: A(
|
|
1083
|
-
const
|
|
1084
|
-
|
|
1085
|
-
const
|
|
1086
|
-
if (
|
|
1087
|
-
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1073
|
+
dir: R.dir,
|
|
1074
|
+
...k,
|
|
1075
|
+
...C,
|
|
1076
|
+
ref: j,
|
|
1077
|
+
style: { outline: "none", ...C.style },
|
|
1078
|
+
onKeyDown: A(C.onKeyDown, (y) => {
|
|
1079
|
+
const ie = y.target.closest("[data-radix-menu-content]") === y.currentTarget, de = y.ctrlKey || y.altKey || y.metaKey, pe = y.key.length === 1;
|
|
1080
|
+
ie && (y.key === "Tab" && y.preventDefault(), !de && pe && q(y.key));
|
|
1081
|
+
const Me = b.current;
|
|
1082
|
+
if (y.target !== Me || !zs.includes(y.key)) return;
|
|
1083
|
+
y.preventDefault();
|
|
1084
|
+
const ye = g().filter((le) => !le.disabled).map((le) => le.ref.current);
|
|
1085
|
+
rr.includes(y.key) && ye.reverse(), ci(ye);
|
|
1090
1086
|
}),
|
|
1091
|
-
onBlur: A(e.onBlur, (
|
|
1092
|
-
|
|
1087
|
+
onBlur: A(e.onBlur, (y) => {
|
|
1088
|
+
y.currentTarget.contains(y.target) || (window.clearTimeout(D.current), B.current = "");
|
|
1093
1089
|
}),
|
|
1094
1090
|
onPointerMove: A(
|
|
1095
1091
|
e.onPointerMove,
|
|
1096
|
-
|
|
1097
|
-
const
|
|
1098
|
-
if (
|
|
1099
|
-
const
|
|
1100
|
-
|
|
1092
|
+
tt((y) => {
|
|
1093
|
+
const Q = y.target, ie = V.current !== y.clientX;
|
|
1094
|
+
if (y.currentTarget.contains(Q) && ie) {
|
|
1095
|
+
const de = y.clientX > V.current ? "right" : "left";
|
|
1096
|
+
x.current = de, V.current = y.clientX;
|
|
1101
1097
|
}
|
|
1102
1098
|
})
|
|
1103
1099
|
)
|
|
@@ -1113,84 +1109,84 @@ var se = "MenuContent", [Ks, zt] = _e(se), rr = h.forwardRef(
|
|
|
1113
1109
|
);
|
|
1114
1110
|
}
|
|
1115
1111
|
);
|
|
1116
|
-
|
|
1117
|
-
var
|
|
1112
|
+
ur.displayName = ue;
|
|
1113
|
+
var ei = "MenuGroup", Vt = h.forwardRef(
|
|
1118
1114
|
(e, t) => {
|
|
1119
1115
|
const { __scopeMenu: n, ...r } = e;
|
|
1120
|
-
return /* @__PURE__ */
|
|
1116
|
+
return /* @__PURE__ */ a.jsx(Ke.div, { role: "group", ...r, ref: t });
|
|
1121
1117
|
}
|
|
1122
1118
|
);
|
|
1123
|
-
Vt.displayName =
|
|
1124
|
-
var
|
|
1119
|
+
Vt.displayName = ei;
|
|
1120
|
+
var ti = "MenuLabel", dr = h.forwardRef(
|
|
1125
1121
|
(e, t) => {
|
|
1126
1122
|
const { __scopeMenu: n, ...r } = e;
|
|
1127
|
-
return /* @__PURE__ */
|
|
1123
|
+
return /* @__PURE__ */ a.jsx(Ke.div, { ...r, ref: t });
|
|
1128
1124
|
}
|
|
1129
1125
|
);
|
|
1130
|
-
|
|
1131
|
-
var
|
|
1126
|
+
dr.displayName = ti;
|
|
1127
|
+
var vt = "MenuItem", Mn = "menu.itemSelect", yt = h.forwardRef(
|
|
1132
1128
|
(e, t) => {
|
|
1133
|
-
const { disabled: n = !1, onSelect: r, ...
|
|
1129
|
+
const { disabled: n = !1, onSelect: r, ...o } = e, s = h.useRef(null), i = it(vt, e.__scopeMenu), l = qt(vt, e.__scopeMenu), u = rt(t, s), m = h.useRef(!1), f = () => {
|
|
1134
1130
|
const c = s.current;
|
|
1135
1131
|
if (!n && c) {
|
|
1136
|
-
const d = new CustomEvent(
|
|
1137
|
-
c.addEventListener(
|
|
1132
|
+
const d = new CustomEvent(Mn, { bubbles: !0, cancelable: !0 });
|
|
1133
|
+
c.addEventListener(Mn, (v) => r == null ? void 0 : r(v), { once: !0 }), uo(c, d), d.defaultPrevented ? m.current = !1 : i.onClose();
|
|
1138
1134
|
}
|
|
1139
1135
|
};
|
|
1140
|
-
return /* @__PURE__ */
|
|
1141
|
-
|
|
1136
|
+
return /* @__PURE__ */ a.jsx(
|
|
1137
|
+
fr,
|
|
1142
1138
|
{
|
|
1143
|
-
...
|
|
1139
|
+
...o,
|
|
1144
1140
|
ref: u,
|
|
1145
1141
|
disabled: n,
|
|
1146
|
-
onClick: A(e.onClick,
|
|
1142
|
+
onClick: A(e.onClick, f),
|
|
1147
1143
|
onPointerDown: (c) => {
|
|
1148
1144
|
var d;
|
|
1149
|
-
(d = e.onPointerDown) == null || d.call(e, c),
|
|
1145
|
+
(d = e.onPointerDown) == null || d.call(e, c), m.current = !0;
|
|
1150
1146
|
},
|
|
1151
1147
|
onPointerUp: A(e.onPointerUp, (c) => {
|
|
1152
1148
|
var d;
|
|
1153
|
-
|
|
1149
|
+
m.current || (d = c.currentTarget) == null || d.click();
|
|
1154
1150
|
}),
|
|
1155
1151
|
onKeyDown: A(e.onKeyDown, (c) => {
|
|
1156
1152
|
const d = l.searchRef.current !== "";
|
|
1157
|
-
n || d && c.key === " " ||
|
|
1153
|
+
n || d && c.key === " " || Nt.includes(c.key) && (c.currentTarget.click(), c.preventDefault());
|
|
1158
1154
|
})
|
|
1159
1155
|
}
|
|
1160
1156
|
);
|
|
1161
1157
|
}
|
|
1162
1158
|
);
|
|
1163
|
-
|
|
1164
|
-
var
|
|
1159
|
+
yt.displayName = vt;
|
|
1160
|
+
var fr = h.forwardRef(
|
|
1165
1161
|
(e, t) => {
|
|
1166
|
-
const { __scopeMenu: n, disabled: r = !1, textValue:
|
|
1162
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = qt(vt, n), l = or(n), u = h.useRef(null), m = rt(t, u), [f, c] = h.useState(!1), [d, v] = h.useState("");
|
|
1167
1163
|
return h.useEffect(() => {
|
|
1168
|
-
const
|
|
1169
|
-
|
|
1170
|
-
}, [s.children]), /* @__PURE__ */
|
|
1171
|
-
|
|
1164
|
+
const M = u.current;
|
|
1165
|
+
M && v((M.textContent ?? "").trim());
|
|
1166
|
+
}, [s.children]), /* @__PURE__ */ a.jsx(
|
|
1167
|
+
et.ItemSlot,
|
|
1172
1168
|
{
|
|
1173
1169
|
scope: n,
|
|
1174
1170
|
disabled: r,
|
|
1175
|
-
textValue:
|
|
1176
|
-
children: /* @__PURE__ */
|
|
1177
|
-
|
|
1171
|
+
textValue: o ?? d,
|
|
1172
|
+
children: /* @__PURE__ */ a.jsx(Xo, { asChild: !0, ...l, focusable: !r, children: /* @__PURE__ */ a.jsx(
|
|
1173
|
+
Ke.div,
|
|
1178
1174
|
{
|
|
1179
1175
|
role: "menuitem",
|
|
1180
|
-
"data-highlighted":
|
|
1176
|
+
"data-highlighted": f ? "" : void 0,
|
|
1181
1177
|
"aria-disabled": r || void 0,
|
|
1182
1178
|
"data-disabled": r ? "" : void 0,
|
|
1183
1179
|
...s,
|
|
1184
|
-
ref:
|
|
1180
|
+
ref: m,
|
|
1185
1181
|
onPointerMove: A(
|
|
1186
1182
|
e.onPointerMove,
|
|
1187
|
-
|
|
1188
|
-
r ? i.onItemLeave(
|
|
1183
|
+
tt((M) => {
|
|
1184
|
+
r ? i.onItemLeave(M) : (i.onItemEnter(M), M.defaultPrevented || M.currentTarget.focus({ preventScroll: !0 }));
|
|
1189
1185
|
})
|
|
1190
1186
|
),
|
|
1191
1187
|
onPointerLeave: A(
|
|
1192
1188
|
e.onPointerLeave,
|
|
1193
|
-
|
|
1189
|
+
tt((M) => i.onItemLeave(M))
|
|
1194
1190
|
),
|
|
1195
1191
|
onFocus: A(e.onFocus, () => c(!0)),
|
|
1196
1192
|
onBlur: A(e.onBlur, () => c(!1))
|
|
@@ -1199,54 +1195,54 @@ var ar = h.forwardRef(
|
|
|
1199
1195
|
}
|
|
1200
1196
|
);
|
|
1201
1197
|
}
|
|
1202
|
-
),
|
|
1198
|
+
), ni = "MenuCheckboxItem", hr = h.forwardRef(
|
|
1203
1199
|
(e, t) => {
|
|
1204
|
-
const { checked: n = !1, onCheckedChange: r, ...
|
|
1205
|
-
return /* @__PURE__ */
|
|
1206
|
-
|
|
1200
|
+
const { checked: n = !1, onCheckedChange: r, ...o } = e;
|
|
1201
|
+
return /* @__PURE__ */ a.jsx(wr, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ a.jsx(
|
|
1202
|
+
yt,
|
|
1207
1203
|
{
|
|
1208
1204
|
role: "menuitemcheckbox",
|
|
1209
|
-
"aria-checked":
|
|
1210
|
-
...
|
|
1205
|
+
"aria-checked": wt(n) ? "mixed" : n,
|
|
1206
|
+
...o,
|
|
1211
1207
|
ref: t,
|
|
1212
|
-
"data-state":
|
|
1208
|
+
"data-state": Yt(n),
|
|
1213
1209
|
onSelect: A(
|
|
1214
|
-
|
|
1215
|
-
() => r == null ? void 0 : r(
|
|
1210
|
+
o.onSelect,
|
|
1211
|
+
() => r == null ? void 0 : r(wt(n) ? !0 : !n),
|
|
1216
1212
|
{ checkForDefaultPrevented: !1 }
|
|
1217
1213
|
)
|
|
1218
1214
|
}
|
|
1219
1215
|
) });
|
|
1220
1216
|
}
|
|
1221
1217
|
);
|
|
1222
|
-
|
|
1223
|
-
var
|
|
1224
|
-
|
|
1218
|
+
hr.displayName = ni;
|
|
1219
|
+
var pr = "MenuRadioGroup", [ri, ai] = Ae(
|
|
1220
|
+
pr,
|
|
1225
1221
|
{ value: void 0, onValueChange: () => {
|
|
1226
1222
|
} }
|
|
1227
|
-
),
|
|
1223
|
+
), mr = h.forwardRef(
|
|
1228
1224
|
(e, t) => {
|
|
1229
|
-
const { value: n, onValueChange: r, ...
|
|
1230
|
-
return /* @__PURE__ */
|
|
1225
|
+
const { value: n, onValueChange: r, ...o } = e, s = $t(r);
|
|
1226
|
+
return /* @__PURE__ */ a.jsx(ri, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ a.jsx(Vt, { ...o, ref: t }) });
|
|
1231
1227
|
}
|
|
1232
1228
|
);
|
|
1233
|
-
|
|
1234
|
-
var
|
|
1229
|
+
mr.displayName = pr;
|
|
1230
|
+
var gr = "MenuRadioItem", vr = h.forwardRef(
|
|
1235
1231
|
(e, t) => {
|
|
1236
|
-
const { value: n, ...r } = e,
|
|
1237
|
-
return /* @__PURE__ */
|
|
1238
|
-
|
|
1232
|
+
const { value: n, ...r } = e, o = ai(gr, e.__scopeMenu), s = n === o.value;
|
|
1233
|
+
return /* @__PURE__ */ a.jsx(wr, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ a.jsx(
|
|
1234
|
+
yt,
|
|
1239
1235
|
{
|
|
1240
1236
|
role: "menuitemradio",
|
|
1241
1237
|
"aria-checked": s,
|
|
1242
1238
|
...r,
|
|
1243
1239
|
ref: t,
|
|
1244
|
-
"data-state":
|
|
1240
|
+
"data-state": Yt(s),
|
|
1245
1241
|
onSelect: A(
|
|
1246
1242
|
r.onSelect,
|
|
1247
1243
|
() => {
|
|
1248
1244
|
var i;
|
|
1249
|
-
return (i =
|
|
1245
|
+
return (i = o.onValueChange) == null ? void 0 : i.call(o, n);
|
|
1250
1246
|
},
|
|
1251
1247
|
{ checkForDefaultPrevented: !1 }
|
|
1252
1248
|
)
|
|
@@ -1254,35 +1250,35 @@ var cr = "MenuRadioItem", ur = h.forwardRef(
|
|
|
1254
1250
|
) });
|
|
1255
1251
|
}
|
|
1256
1252
|
);
|
|
1257
|
-
|
|
1258
|
-
var
|
|
1259
|
-
|
|
1253
|
+
vr.displayName = gr;
|
|
1254
|
+
var Gt = "MenuItemIndicator", [wr, oi] = Ae(
|
|
1255
|
+
Gt,
|
|
1260
1256
|
{ checked: !1 }
|
|
1261
|
-
),
|
|
1257
|
+
), xr = h.forwardRef(
|
|
1262
1258
|
(e, t) => {
|
|
1263
|
-
const { __scopeMenu: n, forceMount: r, ...
|
|
1264
|
-
return /* @__PURE__ */
|
|
1265
|
-
|
|
1259
|
+
const { __scopeMenu: n, forceMount: r, ...o } = e, s = oi(Gt, n);
|
|
1260
|
+
return /* @__PURE__ */ a.jsx(
|
|
1261
|
+
xt,
|
|
1266
1262
|
{
|
|
1267
|
-
present: r ||
|
|
1268
|
-
children: /* @__PURE__ */
|
|
1269
|
-
|
|
1263
|
+
present: r || wt(s.checked) || s.checked === !0,
|
|
1264
|
+
children: /* @__PURE__ */ a.jsx(
|
|
1265
|
+
Ke.span,
|
|
1270
1266
|
{
|
|
1271
|
-
...
|
|
1267
|
+
...o,
|
|
1272
1268
|
ref: t,
|
|
1273
|
-
"data-state":
|
|
1269
|
+
"data-state": Yt(s.checked)
|
|
1274
1270
|
}
|
|
1275
1271
|
)
|
|
1276
1272
|
}
|
|
1277
1273
|
);
|
|
1278
1274
|
}
|
|
1279
1275
|
);
|
|
1280
|
-
|
|
1281
|
-
var
|
|
1276
|
+
xr.displayName = Gt;
|
|
1277
|
+
var si = "MenuSeparator", yr = h.forwardRef(
|
|
1282
1278
|
(e, t) => {
|
|
1283
1279
|
const { __scopeMenu: n, ...r } = e;
|
|
1284
|
-
return /* @__PURE__ */
|
|
1285
|
-
|
|
1280
|
+
return /* @__PURE__ */ a.jsx(
|
|
1281
|
+
Ke.div,
|
|
1286
1282
|
{
|
|
1287
1283
|
role: "separator",
|
|
1288
1284
|
"aria-orientation": "horizontal",
|
|
@@ -1292,30 +1288,30 @@ var Zs = "MenuSeparator", hr = h.forwardRef(
|
|
|
1292
1288
|
);
|
|
1293
1289
|
}
|
|
1294
1290
|
);
|
|
1295
|
-
|
|
1296
|
-
var
|
|
1291
|
+
yr.displayName = si;
|
|
1292
|
+
var ii = "MenuArrow", br = h.forwardRef(
|
|
1297
1293
|
(e, t) => {
|
|
1298
|
-
const { __scopeMenu: n, ...r } = e,
|
|
1299
|
-
return /* @__PURE__ */
|
|
1294
|
+
const { __scopeMenu: n, ...r } = e, o = st(n);
|
|
1295
|
+
return /* @__PURE__ */ a.jsx(io, { ...o, ...r, ref: t });
|
|
1300
1296
|
}
|
|
1301
1297
|
);
|
|
1302
|
-
|
|
1303
|
-
var
|
|
1304
|
-
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange:
|
|
1305
|
-
return h.useEffect(() => (s.open === !1 && c(!1), () => c(!1)), [s.open, c]), /* @__PURE__ */
|
|
1306
|
-
|
|
1298
|
+
br.displayName = ii;
|
|
1299
|
+
var Wt = "MenuSub", [li, Sr] = Ae(Wt), Cr = (e) => {
|
|
1300
|
+
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 = $t(o);
|
|
1301
|
+
return h.useEffect(() => (s.open === !1 && c(!1), () => c(!1)), [s.open, c]), /* @__PURE__ */ a.jsx(Ln, { ...i, children: /* @__PURE__ */ a.jsx(
|
|
1302
|
+
sr,
|
|
1307
1303
|
{
|
|
1308
1304
|
scope: t,
|
|
1309
1305
|
open: r,
|
|
1310
1306
|
onOpenChange: c,
|
|
1311
|
-
content:
|
|
1312
|
-
onContentChange:
|
|
1313
|
-
children: /* @__PURE__ */
|
|
1314
|
-
|
|
1307
|
+
content: m,
|
|
1308
|
+
onContentChange: f,
|
|
1309
|
+
children: /* @__PURE__ */ a.jsx(
|
|
1310
|
+
li,
|
|
1315
1311
|
{
|
|
1316
1312
|
scope: t,
|
|
1317
|
-
contentId:
|
|
1318
|
-
triggerId:
|
|
1313
|
+
contentId: gt(),
|
|
1314
|
+
triggerId: gt(),
|
|
1319
1315
|
trigger: l,
|
|
1320
1316
|
onTriggerChange: u,
|
|
1321
1317
|
children: n
|
|
@@ -1324,58 +1320,58 @@ var qt = "MenuSub", [ti, mr] = _e(qt), gr = (e) => {
|
|
|
1324
1320
|
}
|
|
1325
1321
|
) });
|
|
1326
1322
|
};
|
|
1327
|
-
|
|
1328
|
-
var
|
|
1323
|
+
Cr.displayName = Wt;
|
|
1324
|
+
var Xe = "MenuSubTrigger", Mr = h.forwardRef(
|
|
1329
1325
|
(e, t) => {
|
|
1330
|
-
const n =
|
|
1326
|
+
const n = Te(Xe, e.__scopeMenu), r = it(Xe, e.__scopeMenu), o = Sr(Xe, e.__scopeMenu), s = qt(Xe, e.__scopeMenu), i = h.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = s, m = { __scopeMenu: e.__scopeMenu }, f = h.useCallback(() => {
|
|
1331
1327
|
i.current && window.clearTimeout(i.current), i.current = null;
|
|
1332
1328
|
}, []);
|
|
1333
|
-
return h.useEffect(() =>
|
|
1329
|
+
return h.useEffect(() => f, [f]), h.useEffect(() => {
|
|
1334
1330
|
const c = l.current;
|
|
1335
1331
|
return () => {
|
|
1336
1332
|
window.clearTimeout(c), u(null);
|
|
1337
1333
|
};
|
|
1338
|
-
}, [l, u]), /* @__PURE__ */
|
|
1339
|
-
|
|
1334
|
+
}, [l, u]), /* @__PURE__ */ a.jsx(zt, { asChild: !0, ...m, children: /* @__PURE__ */ a.jsx(
|
|
1335
|
+
fr,
|
|
1340
1336
|
{
|
|
1341
|
-
id:
|
|
1337
|
+
id: o.triggerId,
|
|
1342
1338
|
"aria-haspopup": "menu",
|
|
1343
1339
|
"aria-expanded": n.open,
|
|
1344
|
-
"aria-controls":
|
|
1345
|
-
"data-state":
|
|
1340
|
+
"aria-controls": o.contentId,
|
|
1341
|
+
"data-state": Dr(n.open),
|
|
1346
1342
|
...e,
|
|
1347
|
-
ref:
|
|
1343
|
+
ref: Fn(t, o.onTriggerChange),
|
|
1348
1344
|
onClick: (c) => {
|
|
1349
1345
|
var d;
|
|
1350
1346
|
(d = e.onClick) == null || d.call(e, c), !(e.disabled || c.defaultPrevented) && (c.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
1351
1347
|
},
|
|
1352
1348
|
onPointerMove: A(
|
|
1353
1349
|
e.onPointerMove,
|
|
1354
|
-
|
|
1350
|
+
tt((c) => {
|
|
1355
1351
|
s.onItemEnter(c), !c.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
1356
|
-
n.onOpenChange(!0),
|
|
1352
|
+
n.onOpenChange(!0), f();
|
|
1357
1353
|
}, 100));
|
|
1358
1354
|
})
|
|
1359
1355
|
),
|
|
1360
1356
|
onPointerLeave: A(
|
|
1361
1357
|
e.onPointerLeave,
|
|
1362
|
-
|
|
1363
|
-
var
|
|
1364
|
-
|
|
1365
|
-
const d = (
|
|
1358
|
+
tt((c) => {
|
|
1359
|
+
var v, M;
|
|
1360
|
+
f();
|
|
1361
|
+
const d = (v = n.content) == null ? void 0 : v.getBoundingClientRect();
|
|
1366
1362
|
if (d) {
|
|
1367
|
-
const
|
|
1363
|
+
const C = (M = n.content) == null ? void 0 : M.dataset.side, _ = C === "right", R = _ ? -5 : 5, k = d[_ ? "left" : "right"], P = d[_ ? "right" : "left"];
|
|
1368
1364
|
s.onPointerGraceIntentChange({
|
|
1369
1365
|
area: [
|
|
1370
1366
|
// Apply a bleed on clientX to ensure that our exit point is
|
|
1371
1367
|
// consistently within polygon bounds
|
|
1372
|
-
{ x: c.clientX +
|
|
1373
|
-
{ x:
|
|
1374
|
-
{ x, y: d.top },
|
|
1375
|
-
{ x, y: d.bottom },
|
|
1376
|
-
{ x:
|
|
1368
|
+
{ x: c.clientX + R, y: c.clientY },
|
|
1369
|
+
{ x: k, y: d.top },
|
|
1370
|
+
{ x: P, y: d.top },
|
|
1371
|
+
{ x: P, y: d.bottom },
|
|
1372
|
+
{ x: k, y: d.bottom }
|
|
1377
1373
|
],
|
|
1378
|
-
side:
|
|
1374
|
+
side: C
|
|
1379
1375
|
}), window.clearTimeout(l.current), l.current = window.setTimeout(
|
|
1380
1376
|
() => s.onPointerGraceIntentChange(null),
|
|
1381
1377
|
300
|
|
@@ -1387,132 +1383,132 @@ var qe = "MenuSubTrigger", vr = h.forwardRef(
|
|
|
1387
1383
|
})
|
|
1388
1384
|
),
|
|
1389
1385
|
onKeyDown: A(e.onKeyDown, (c) => {
|
|
1390
|
-
var
|
|
1386
|
+
var v;
|
|
1391
1387
|
const d = s.searchRef.current !== "";
|
|
1392
|
-
e.disabled || d && c.key === " " ||
|
|
1388
|
+
e.disabled || d && c.key === " " || Ks[r.dir].includes(c.key) && (n.onOpenChange(!0), (v = n.content) == null || v.focus(), c.preventDefault());
|
|
1393
1389
|
})
|
|
1394
1390
|
}
|
|
1395
1391
|
) });
|
|
1396
1392
|
}
|
|
1397
1393
|
);
|
|
1398
|
-
|
|
1399
|
-
var
|
|
1394
|
+
Mr.displayName = Xe;
|
|
1395
|
+
var Rr = "MenuSubContent", Er = h.forwardRef(
|
|
1400
1396
|
(e, t) => {
|
|
1401
|
-
const n =
|
|
1402
|
-
return /* @__PURE__ */
|
|
1403
|
-
|
|
1397
|
+
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);
|
|
1398
|
+
return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(et.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(
|
|
1399
|
+
Qt,
|
|
1404
1400
|
{
|
|
1405
1401
|
id: l.contentId,
|
|
1406
1402
|
"aria-labelledby": l.triggerId,
|
|
1407
|
-
...
|
|
1408
|
-
ref:
|
|
1403
|
+
...o,
|
|
1404
|
+
ref: m,
|
|
1409
1405
|
align: "start",
|
|
1410
1406
|
side: i.dir === "rtl" ? "left" : "right",
|
|
1411
1407
|
disableOutsidePointerEvents: !1,
|
|
1412
1408
|
disableOutsideScroll: !1,
|
|
1413
1409
|
trapFocus: !1,
|
|
1414
|
-
onOpenAutoFocus: (
|
|
1410
|
+
onOpenAutoFocus: (f) => {
|
|
1415
1411
|
var c;
|
|
1416
|
-
i.isUsingKeyboardRef.current && ((c = u.current) == null || c.focus()),
|
|
1412
|
+
i.isUsingKeyboardRef.current && ((c = u.current) == null || c.focus()), f.preventDefault();
|
|
1417
1413
|
},
|
|
1418
|
-
onCloseAutoFocus: (
|
|
1419
|
-
onFocusOutside: A(e.onFocusOutside, (
|
|
1420
|
-
|
|
1414
|
+
onCloseAutoFocus: (f) => f.preventDefault(),
|
|
1415
|
+
onFocusOutside: A(e.onFocusOutside, (f) => {
|
|
1416
|
+
f.target !== l.trigger && s.onOpenChange(!1);
|
|
1421
1417
|
}),
|
|
1422
|
-
onEscapeKeyDown: A(e.onEscapeKeyDown, (
|
|
1423
|
-
i.onClose(),
|
|
1418
|
+
onEscapeKeyDown: A(e.onEscapeKeyDown, (f) => {
|
|
1419
|
+
i.onClose(), f.preventDefault();
|
|
1424
1420
|
}),
|
|
1425
|
-
onKeyDown: A(e.onKeyDown, (
|
|
1426
|
-
var
|
|
1427
|
-
const c =
|
|
1428
|
-
c && d && (s.onOpenChange(!1), (
|
|
1421
|
+
onKeyDown: A(e.onKeyDown, (f) => {
|
|
1422
|
+
var v;
|
|
1423
|
+
const c = f.currentTarget.contains(f.target), d = qs[i.dir].includes(f.key);
|
|
1424
|
+
c && d && (s.onOpenChange(!1), (v = l.trigger) == null || v.focus(), f.preventDefault());
|
|
1429
1425
|
})
|
|
1430
1426
|
}
|
|
1431
1427
|
) }) }) });
|
|
1432
1428
|
}
|
|
1433
1429
|
);
|
|
1434
|
-
|
|
1435
|
-
function
|
|
1430
|
+
Er.displayName = Rr;
|
|
1431
|
+
function Dr(e) {
|
|
1436
1432
|
return e ? "open" : "closed";
|
|
1437
1433
|
}
|
|
1438
|
-
function
|
|
1434
|
+
function wt(e) {
|
|
1439
1435
|
return e === "indeterminate";
|
|
1440
1436
|
}
|
|
1441
|
-
function
|
|
1442
|
-
return
|
|
1437
|
+
function Yt(e) {
|
|
1438
|
+
return wt(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
1443
1439
|
}
|
|
1444
|
-
function
|
|
1440
|
+
function ci(e) {
|
|
1445
1441
|
const t = document.activeElement;
|
|
1446
1442
|
for (const n of e)
|
|
1447
1443
|
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
1448
1444
|
}
|
|
1449
|
-
function
|
|
1445
|
+
function ui(e, t) {
|
|
1450
1446
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
1451
1447
|
}
|
|
1452
|
-
function
|
|
1453
|
-
const
|
|
1454
|
-
let i =
|
|
1455
|
-
|
|
1448
|
+
function di(e, t, n) {
|
|
1449
|
+
const o = t.length > 1 && Array.from(t).every((m) => m === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
1450
|
+
let i = ui(e, Math.max(s, 0));
|
|
1451
|
+
o.length === 1 && (i = i.filter((m) => m !== n));
|
|
1456
1452
|
const u = i.find(
|
|
1457
|
-
(
|
|
1453
|
+
(m) => m.toLowerCase().startsWith(o.toLowerCase())
|
|
1458
1454
|
);
|
|
1459
1455
|
return u !== n ? u : void 0;
|
|
1460
1456
|
}
|
|
1461
|
-
function
|
|
1457
|
+
function fi(e, t) {
|
|
1462
1458
|
const { x: n, y: r } = e;
|
|
1463
|
-
let
|
|
1459
|
+
let o = !1;
|
|
1464
1460
|
for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
|
|
1465
|
-
const l = t[s].x, u = t[s].y,
|
|
1466
|
-
u > r !=
|
|
1461
|
+
const l = t[s].x, u = t[s].y, m = t[i].x, f = t[i].y;
|
|
1462
|
+
u > r != f > r && n < (m - l) * (r - u) / (f - u) + l && (o = !o);
|
|
1467
1463
|
}
|
|
1468
|
-
return
|
|
1464
|
+
return o;
|
|
1469
1465
|
}
|
|
1470
|
-
function
|
|
1466
|
+
function hi(e, t) {
|
|
1471
1467
|
if (!t) return !1;
|
|
1472
1468
|
const n = { x: e.clientX, y: e.clientY };
|
|
1473
|
-
return
|
|
1469
|
+
return fi(n, t);
|
|
1474
1470
|
}
|
|
1475
|
-
function
|
|
1471
|
+
function tt(e) {
|
|
1476
1472
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
1477
1473
|
}
|
|
1478
|
-
var
|
|
1479
|
-
|
|
1480
|
-
[
|
|
1481
|
-
),
|
|
1474
|
+
var pi = ir, mi = zt, gi = cr, vi = ur, wi = Vt, xi = dr, yi = yt, bi = hr, Si = mr, Ci = vr, Mi = xr, Ri = yr, Ei = br, Di = Cr, Pi = Mr, ji = Er, Xt = "DropdownMenu", [Ni, dc] = kn(
|
|
1475
|
+
Xt,
|
|
1476
|
+
[ar]
|
|
1477
|
+
), J = ar(), [Ti, Pr] = Ni(Xt), jr = (e) => {
|
|
1482
1478
|
const {
|
|
1483
1479
|
__scopeDropdownMenu: t,
|
|
1484
1480
|
children: n,
|
|
1485
1481
|
dir: r,
|
|
1486
|
-
open:
|
|
1482
|
+
open: o,
|
|
1487
1483
|
defaultOpen: s,
|
|
1488
1484
|
onOpenChange: i,
|
|
1489
1485
|
modal: l = !0
|
|
1490
|
-
} = e, u =
|
|
1491
|
-
prop:
|
|
1486
|
+
} = e, u = J(t), m = h.useRef(null), [f = !1, c] = Bn({
|
|
1487
|
+
prop: o,
|
|
1492
1488
|
defaultProp: s,
|
|
1493
1489
|
onChange: i
|
|
1494
1490
|
});
|
|
1495
|
-
return /* @__PURE__ */
|
|
1496
|
-
|
|
1491
|
+
return /* @__PURE__ */ a.jsx(
|
|
1492
|
+
Ti,
|
|
1497
1493
|
{
|
|
1498
1494
|
scope: t,
|
|
1499
|
-
triggerId:
|
|
1500
|
-
triggerRef:
|
|
1501
|
-
contentId:
|
|
1502
|
-
open:
|
|
1495
|
+
triggerId: gt(),
|
|
1496
|
+
triggerRef: m,
|
|
1497
|
+
contentId: gt(),
|
|
1498
|
+
open: f,
|
|
1503
1499
|
onOpenChange: c,
|
|
1504
1500
|
onOpenToggle: h.useCallback(() => c((d) => !d), [c]),
|
|
1505
1501
|
modal: l,
|
|
1506
|
-
children: /* @__PURE__ */
|
|
1502
|
+
children: /* @__PURE__ */ a.jsx(pi, { ...u, open: f, onOpenChange: c, dir: r, modal: l, children: n })
|
|
1507
1503
|
}
|
|
1508
1504
|
);
|
|
1509
1505
|
};
|
|
1510
|
-
|
|
1511
|
-
var
|
|
1506
|
+
jr.displayName = Xt;
|
|
1507
|
+
var Nr = "DropdownMenuTrigger", Tr = h.forwardRef(
|
|
1512
1508
|
(e, t) => {
|
|
1513
|
-
const { __scopeDropdownMenu: n, disabled: r = !1, ...
|
|
1514
|
-
return /* @__PURE__ */
|
|
1515
|
-
|
|
1509
|
+
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Pr(Nr, n), i = J(n);
|
|
1510
|
+
return /* @__PURE__ */ a.jsx(mi, { asChild: !0, ...i, children: /* @__PURE__ */ a.jsx(
|
|
1511
|
+
Ke.button,
|
|
1516
1512
|
{
|
|
1517
1513
|
type: "button",
|
|
1518
1514
|
id: s.triggerId,
|
|
@@ -1522,8 +1518,8 @@ var Sr = "DropdownMenuTrigger", Er = h.forwardRef(
|
|
|
1522
1518
|
"data-state": s.open ? "open" : "closed",
|
|
1523
1519
|
"data-disabled": r ? "" : void 0,
|
|
1524
1520
|
disabled: r,
|
|
1525
|
-
...
|
|
1526
|
-
ref:
|
|
1521
|
+
...o,
|
|
1522
|
+
ref: Fn(t, s.triggerRef),
|
|
1527
1523
|
onPointerDown: A(e.onPointerDown, (l) => {
|
|
1528
1524
|
!r && l.button === 0 && l.ctrlKey === !1 && (s.onOpenToggle(), s.open || l.preventDefault());
|
|
1529
1525
|
}),
|
|
@@ -1534,30 +1530,30 @@ var Sr = "DropdownMenuTrigger", Er = h.forwardRef(
|
|
|
1534
1530
|
) });
|
|
1535
1531
|
}
|
|
1536
1532
|
);
|
|
1537
|
-
|
|
1538
|
-
var
|
|
1539
|
-
const { __scopeDropdownMenu: t, ...n } = e, r =
|
|
1540
|
-
return /* @__PURE__ */
|
|
1533
|
+
Tr.displayName = Nr;
|
|
1534
|
+
var _i = "DropdownMenuPortal", _r = (e) => {
|
|
1535
|
+
const { __scopeDropdownMenu: t, ...n } = e, r = J(t);
|
|
1536
|
+
return /* @__PURE__ */ a.jsx(gi, { ...r, ...n });
|
|
1541
1537
|
};
|
|
1542
|
-
|
|
1543
|
-
var
|
|
1538
|
+
_r.displayName = _i;
|
|
1539
|
+
var Or = "DropdownMenuContent", Ir = h.forwardRef(
|
|
1544
1540
|
(e, t) => {
|
|
1545
|
-
const { __scopeDropdownMenu: n, ...r } = e,
|
|
1546
|
-
return /* @__PURE__ */
|
|
1547
|
-
|
|
1541
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Pr(Or, n), s = J(n), i = h.useRef(!1);
|
|
1542
|
+
return /* @__PURE__ */ a.jsx(
|
|
1543
|
+
vi,
|
|
1548
1544
|
{
|
|
1549
|
-
id:
|
|
1550
|
-
"aria-labelledby":
|
|
1545
|
+
id: o.contentId,
|
|
1546
|
+
"aria-labelledby": o.triggerId,
|
|
1551
1547
|
...s,
|
|
1552
1548
|
...r,
|
|
1553
1549
|
ref: t,
|
|
1554
1550
|
onCloseAutoFocus: A(e.onCloseAutoFocus, (l) => {
|
|
1555
1551
|
var u;
|
|
1556
|
-
i.current || (u =
|
|
1552
|
+
i.current || (u = o.triggerRef.current) == null || u.focus(), i.current = !1, l.preventDefault();
|
|
1557
1553
|
}),
|
|
1558
1554
|
onInteractOutside: A(e.onInteractOutside, (l) => {
|
|
1559
|
-
const u = l.detail.originalEvent,
|
|
1560
|
-
(!
|
|
1555
|
+
const u = l.detail.originalEvent, m = u.button === 0 && u.ctrlKey === !0, f = u.button === 2 || m;
|
|
1556
|
+
(!o.modal || f) && (i.current = !0);
|
|
1561
1557
|
}),
|
|
1562
1558
|
style: {
|
|
1563
1559
|
...e.style,
|
|
@@ -1571,78 +1567,78 @@ var Rr = "DropdownMenuContent", Dr = h.forwardRef(
|
|
|
1571
1567
|
);
|
|
1572
1568
|
}
|
|
1573
1569
|
);
|
|
1574
|
-
|
|
1575
|
-
var
|
|
1570
|
+
Ir.displayName = Or;
|
|
1571
|
+
var Oi = "DropdownMenuGroup", Ii = h.forwardRef(
|
|
1576
1572
|
(e, t) => {
|
|
1577
|
-
const { __scopeDropdownMenu: n, ...r } = e,
|
|
1578
|
-
return /* @__PURE__ */
|
|
1573
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1574
|
+
return /* @__PURE__ */ a.jsx(wi, { ...o, ...r, ref: t });
|
|
1579
1575
|
}
|
|
1580
1576
|
);
|
|
1581
|
-
|
|
1582
|
-
var
|
|
1577
|
+
Ii.displayName = Oi;
|
|
1578
|
+
var Ai = "DropdownMenuLabel", Ar = h.forwardRef(
|
|
1583
1579
|
(e, t) => {
|
|
1584
|
-
const { __scopeDropdownMenu: n, ...r } = e,
|
|
1585
|
-
return /* @__PURE__ */
|
|
1580
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1581
|
+
return /* @__PURE__ */ a.jsx(xi, { ...o, ...r, ref: t });
|
|
1586
1582
|
}
|
|
1587
1583
|
);
|
|
1588
|
-
|
|
1589
|
-
var
|
|
1584
|
+
Ar.displayName = Ai;
|
|
1585
|
+
var ki = "DropdownMenuItem", kr = h.forwardRef(
|
|
1590
1586
|
(e, t) => {
|
|
1591
|
-
const { __scopeDropdownMenu: n, ...r } = e,
|
|
1592
|
-
return /* @__PURE__ */
|
|
1587
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1588
|
+
return /* @__PURE__ */ a.jsx(yi, { ...o, ...r, ref: t });
|
|
1593
1589
|
}
|
|
1594
1590
|
);
|
|
1595
|
-
|
|
1596
|
-
var
|
|
1597
|
-
const { __scopeDropdownMenu: n, ...r } = e,
|
|
1598
|
-
return /* @__PURE__ */
|
|
1591
|
+
kr.displayName = ki;
|
|
1592
|
+
var $i = "DropdownMenuCheckboxItem", $r = h.forwardRef((e, t) => {
|
|
1593
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1594
|
+
return /* @__PURE__ */ a.jsx(bi, { ...o, ...r, ref: t });
|
|
1599
1595
|
});
|
|
1600
|
-
|
|
1601
|
-
var
|
|
1602
|
-
const { __scopeDropdownMenu: n, ...r } = e,
|
|
1603
|
-
return /* @__PURE__ */
|
|
1596
|
+
$r.displayName = $i;
|
|
1597
|
+
var Fi = "DropdownMenuRadioGroup", Li = h.forwardRef((e, t) => {
|
|
1598
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1599
|
+
return /* @__PURE__ */ a.jsx(Si, { ...o, ...r, ref: t });
|
|
1604
1600
|
});
|
|
1605
|
-
|
|
1606
|
-
var
|
|
1607
|
-
const { __scopeDropdownMenu: n, ...r } = e,
|
|
1608
|
-
return /* @__PURE__ */
|
|
1601
|
+
Li.displayName = Fi;
|
|
1602
|
+
var Bi = "DropdownMenuRadioItem", Fr = h.forwardRef((e, t) => {
|
|
1603
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1604
|
+
return /* @__PURE__ */ a.jsx(Ci, { ...o, ...r, ref: t });
|
|
1609
1605
|
});
|
|
1610
|
-
|
|
1611
|
-
var
|
|
1612
|
-
const { __scopeDropdownMenu: n, ...r } = e,
|
|
1613
|
-
return /* @__PURE__ */
|
|
1606
|
+
Fr.displayName = Bi;
|
|
1607
|
+
var Hi = "DropdownMenuItemIndicator", Lr = h.forwardRef((e, t) => {
|
|
1608
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1609
|
+
return /* @__PURE__ */ a.jsx(Mi, { ...o, ...r, ref: t });
|
|
1614
1610
|
});
|
|
1615
|
-
|
|
1616
|
-
var
|
|
1617
|
-
const { __scopeDropdownMenu: n, ...r } = e,
|
|
1618
|
-
return /* @__PURE__ */
|
|
1611
|
+
Lr.displayName = Hi;
|
|
1612
|
+
var Ui = "DropdownMenuSeparator", Br = h.forwardRef((e, t) => {
|
|
1613
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1614
|
+
return /* @__PURE__ */ a.jsx(Ri, { ...o, ...r, ref: t });
|
|
1619
1615
|
});
|
|
1620
|
-
|
|
1621
|
-
var
|
|
1616
|
+
Br.displayName = Ui;
|
|
1617
|
+
var zi = "DropdownMenuArrow", Ki = h.forwardRef(
|
|
1622
1618
|
(e, t) => {
|
|
1623
|
-
const { __scopeDropdownMenu: n, ...r } = e,
|
|
1624
|
-
return /* @__PURE__ */
|
|
1619
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1620
|
+
return /* @__PURE__ */ a.jsx(Ei, { ...o, ...r, ref: t });
|
|
1625
1621
|
}
|
|
1626
1622
|
);
|
|
1627
|
-
|
|
1628
|
-
var
|
|
1629
|
-
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange:
|
|
1623
|
+
Ki.displayName = zi;
|
|
1624
|
+
var qi = (e) => {
|
|
1625
|
+
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: s } = e, i = J(t), [l = !1, u] = Bn({
|
|
1630
1626
|
prop: r,
|
|
1631
1627
|
defaultProp: s,
|
|
1632
|
-
onChange:
|
|
1628
|
+
onChange: o
|
|
1633
1629
|
});
|
|
1634
|
-
return /* @__PURE__ */
|
|
1635
|
-
},
|
|
1636
|
-
const { __scopeDropdownMenu: n, ...r } = e,
|
|
1637
|
-
return /* @__PURE__ */
|
|
1630
|
+
return /* @__PURE__ */ a.jsx(Di, { ...i, open: l, onOpenChange: u, children: n });
|
|
1631
|
+
}, Qi = "DropdownMenuSubTrigger", Hr = h.forwardRef((e, t) => {
|
|
1632
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1633
|
+
return /* @__PURE__ */ a.jsx(Pi, { ...o, ...r, ref: t });
|
|
1638
1634
|
});
|
|
1639
|
-
|
|
1640
|
-
var
|
|
1641
|
-
const { __scopeDropdownMenu: n, ...r } = e,
|
|
1642
|
-
return /* @__PURE__ */
|
|
1643
|
-
|
|
1635
|
+
Hr.displayName = Qi;
|
|
1636
|
+
var Vi = "DropdownMenuSubContent", Ur = h.forwardRef((e, t) => {
|
|
1637
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
|
|
1638
|
+
return /* @__PURE__ */ a.jsx(
|
|
1639
|
+
ji,
|
|
1644
1640
|
{
|
|
1645
|
-
...
|
|
1641
|
+
...o,
|
|
1646
1642
|
...r,
|
|
1647
1643
|
ref: t,
|
|
1648
1644
|
style: {
|
|
@@ -1656,12 +1652,12 @@ var Hi = "DropdownMenuSubContent", Ar = h.forwardRef((e, t) => {
|
|
|
1656
1652
|
}
|
|
1657
1653
|
);
|
|
1658
1654
|
});
|
|
1659
|
-
|
|
1660
|
-
var
|
|
1661
|
-
const
|
|
1662
|
-
|
|
1655
|
+
Ur.displayName = Vi;
|
|
1656
|
+
var Gi = jr, Wi = Tr, zr = _r, Kr = Ir, qr = Ar, Qr = kr, Vr = $r, Gr = Fr, Wr = Lr, Yr = Br, Yi = qi, Xr = Hr, Jr = Ur;
|
|
1657
|
+
const Xi = Gi, Ji = Wi, Zi = zr, el = Yi, Zr = h.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
|
|
1658
|
+
Xr,
|
|
1663
1659
|
{
|
|
1664
|
-
ref:
|
|
1660
|
+
ref: o,
|
|
1665
1661
|
className: O(
|
|
1666
1662
|
"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",
|
|
1667
1663
|
t && "pl-8",
|
|
@@ -1670,13 +1666,13 @@ const Ki = Ui, Vi = Bi, Qi = kr, qi = zi, Qr = h.forwardRef(({ className: e, ins
|
|
|
1670
1666
|
...r,
|
|
1671
1667
|
children: [
|
|
1672
1668
|
n,
|
|
1673
|
-
/* @__PURE__ */
|
|
1669
|
+
/* @__PURE__ */ a.jsx(Xn, { className: "ml-auto h-4 w-4" })
|
|
1674
1670
|
]
|
|
1675
1671
|
}
|
|
1676
1672
|
));
|
|
1677
|
-
|
|
1678
|
-
const
|
|
1679
|
-
|
|
1673
|
+
Zr.displayName = Xr.displayName;
|
|
1674
|
+
const ea = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
1675
|
+
Jr,
|
|
1680
1676
|
{
|
|
1681
1677
|
ref: n,
|
|
1682
1678
|
className: O(
|
|
@@ -1686,9 +1682,9 @@ const qr = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
|
1686
1682
|
...t
|
|
1687
1683
|
}
|
|
1688
1684
|
));
|
|
1689
|
-
|
|
1690
|
-
const
|
|
1691
|
-
|
|
1685
|
+
ea.displayName = Jr.displayName;
|
|
1686
|
+
const ta = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ a.jsx(zr, { children: /* @__PURE__ */ a.jsx(
|
|
1687
|
+
Kr,
|
|
1692
1688
|
{
|
|
1693
1689
|
ref: r,
|
|
1694
1690
|
sideOffset: t,
|
|
@@ -1700,9 +1696,9 @@ const Gr = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
|
|
|
1700
1696
|
...n
|
|
1701
1697
|
}
|
|
1702
1698
|
) }));
|
|
1703
|
-
|
|
1704
|
-
const
|
|
1705
|
-
|
|
1699
|
+
ta.displayName = Kr.displayName;
|
|
1700
|
+
const na = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ a.jsx(
|
|
1701
|
+
Qr,
|
|
1706
1702
|
{
|
|
1707
1703
|
ref: r,
|
|
1708
1704
|
className: O(
|
|
@@ -1713,11 +1709,11 @@ const Wr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
1713
1709
|
...n
|
|
1714
1710
|
}
|
|
1715
1711
|
));
|
|
1716
|
-
|
|
1717
|
-
const
|
|
1718
|
-
|
|
1712
|
+
na.displayName = Qr.displayName;
|
|
1713
|
+
const tl = h.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
|
|
1714
|
+
Vr,
|
|
1719
1715
|
{
|
|
1720
|
-
ref:
|
|
1716
|
+
ref: o,
|
|
1721
1717
|
className: O(
|
|
1722
1718
|
"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",
|
|
1723
1719
|
e
|
|
@@ -1725,14 +1721,14 @@ const Gi = h.forwardRef(({ className: e, children: t, checked: n, ...r }, a) =>
|
|
|
1725
1721
|
checked: n,
|
|
1726
1722
|
...r,
|
|
1727
1723
|
children: [
|
|
1728
|
-
/* @__PURE__ */
|
|
1724
|
+
/* @__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(Ho, { className: "h-4 w-4" }) }) }),
|
|
1729
1725
|
t
|
|
1730
1726
|
]
|
|
1731
1727
|
}
|
|
1732
1728
|
));
|
|
1733
|
-
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1729
|
+
tl.displayName = Vr.displayName;
|
|
1730
|
+
const nl = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ a.jsxs(
|
|
1731
|
+
Gr,
|
|
1736
1732
|
{
|
|
1737
1733
|
ref: r,
|
|
1738
1734
|
className: O(
|
|
@@ -1741,14 +1737,14 @@ const Wi = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
1741
1737
|
),
|
|
1742
1738
|
...n,
|
|
1743
1739
|
children: [
|
|
1744
|
-
/* @__PURE__ */
|
|
1740
|
+
/* @__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 fill-current" }) }) }),
|
|
1745
1741
|
t
|
|
1746
1742
|
]
|
|
1747
1743
|
}
|
|
1748
1744
|
));
|
|
1749
|
-
|
|
1750
|
-
const
|
|
1751
|
-
|
|
1745
|
+
nl.displayName = Gr.displayName;
|
|
1746
|
+
const ra = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ a.jsx(
|
|
1747
|
+
qr,
|
|
1752
1748
|
{
|
|
1753
1749
|
ref: r,
|
|
1754
1750
|
className: O(
|
|
@@ -1759,60 +1755,62 @@ const Yr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
1759
1755
|
...n
|
|
1760
1756
|
}
|
|
1761
1757
|
));
|
|
1762
|
-
|
|
1763
|
-
const
|
|
1764
|
-
|
|
1758
|
+
ra.displayName = qr.displayName;
|
|
1759
|
+
const aa = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
1760
|
+
Yr,
|
|
1765
1761
|
{
|
|
1766
1762
|
ref: n,
|
|
1767
1763
|
className: O("-mx-1 my-1 h-px bg-muted", e),
|
|
1768
1764
|
...t
|
|
1769
1765
|
}
|
|
1770
1766
|
));
|
|
1771
|
-
|
|
1772
|
-
const
|
|
1767
|
+
aa.displayName = Yr.displayName;
|
|
1768
|
+
const Rn = {
|
|
1773
1769
|
info: "bg-blue-500",
|
|
1774
1770
|
note: "bg-gray-500",
|
|
1775
1771
|
tip: "bg-green-600",
|
|
1776
1772
|
caution: "bg-orange-500",
|
|
1777
1773
|
danger: "bg-rose-500"
|
|
1778
|
-
},
|
|
1779
|
-
const { page: e } =
|
|
1780
|
-
|
|
1774
|
+
}, rl = () => {
|
|
1775
|
+
const { page: e } = qe(), [t, n] = Ie(!0);
|
|
1776
|
+
if (!(e != null && e.banner) || !t)
|
|
1777
|
+
return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
|
|
1778
|
+
const r = e.banner.color && e.banner.color in Rn ? Rn[e.banner.color] : e.banner.color ? void 0 : "bg-primary", o = r ? {} : { backgroundColor: e.banner.color };
|
|
1779
|
+
return /* @__PURE__ */ a.jsxs(
|
|
1781
1780
|
"div",
|
|
1782
1781
|
{
|
|
1783
1782
|
className: O(
|
|
1784
1783
|
"relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
|
|
1785
|
-
|
|
1784
|
+
r
|
|
1786
1785
|
),
|
|
1786
|
+
style: o,
|
|
1787
1787
|
children: [
|
|
1788
|
-
/* @__PURE__ */
|
|
1789
|
-
e.banner.dismissible && /* @__PURE__ */
|
|
1788
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-full", children: e.banner.message }),
|
|
1789
|
+
e.banner.dismissible && /* @__PURE__ */ a.jsx(
|
|
1790
1790
|
"button",
|
|
1791
1791
|
{
|
|
1792
1792
|
type: "button",
|
|
1793
1793
|
className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
|
|
1794
1794
|
onClick: () => n(!1),
|
|
1795
|
-
children: /* @__PURE__ */
|
|
1795
|
+
children: /* @__PURE__ */ a.jsx(zo, { size: 16 })
|
|
1796
1796
|
}
|
|
1797
1797
|
)
|
|
1798
1798
|
]
|
|
1799
1799
|
}
|
|
1800
1800
|
);
|
|
1801
1801
|
};
|
|
1802
|
-
function
|
|
1802
|
+
function al(e) {
|
|
1803
1803
|
if (typeof document > "u") return;
|
|
1804
1804
|
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
1805
1805
|
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
1806
1806
|
}
|
|
1807
|
-
const
|
|
1807
|
+
const oa = p.createContext({
|
|
1808
1808
|
drawerRef: {
|
|
1809
1809
|
current: null
|
|
1810
1810
|
},
|
|
1811
1811
|
overlayRef: {
|
|
1812
1812
|
current: null
|
|
1813
1813
|
},
|
|
1814
|
-
scaleBackground: () => {
|
|
1815
|
-
},
|
|
1816
1814
|
onPress: () => {
|
|
1817
1815
|
},
|
|
1818
1816
|
onRelease: () => {
|
|
@@ -1827,7 +1825,6 @@ const Jr = g.createContext({
|
|
|
1827
1825
|
},
|
|
1828
1826
|
openProp: void 0,
|
|
1829
1827
|
dismissible: !1,
|
|
1830
|
-
handleOnly: !1,
|
|
1831
1828
|
isOpen: !1,
|
|
1832
1829
|
isDragging: !1,
|
|
1833
1830
|
keyboardIsOpen: {
|
|
@@ -1835,6 +1832,7 @@ const Jr = g.createContext({
|
|
|
1835
1832
|
},
|
|
1836
1833
|
snapPointsOffset: null,
|
|
1837
1834
|
snapPoints: null,
|
|
1835
|
+
handleOnly: !1,
|
|
1838
1836
|
modal: !1,
|
|
1839
1837
|
shouldFade: !1,
|
|
1840
1838
|
activeSnapPoint: null,
|
|
@@ -1842,53 +1840,68 @@ const Jr = g.createContext({
|
|
|
1842
1840
|
},
|
|
1843
1841
|
setActiveSnapPoint: () => {
|
|
1844
1842
|
},
|
|
1845
|
-
visible: !1,
|
|
1846
1843
|
closeDrawer: () => {
|
|
1847
1844
|
},
|
|
1848
|
-
|
|
1845
|
+
direction: "bottom",
|
|
1846
|
+
shouldAnimate: {
|
|
1847
|
+
current: !0
|
|
1849
1848
|
},
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1849
|
+
shouldScaleBackground: !1,
|
|
1850
|
+
setBackgroundColorOnScale: !0,
|
|
1851
|
+
noBodyStyles: !1,
|
|
1852
|
+
container: null,
|
|
1853
|
+
autoFocus: !1
|
|
1854
|
+
}), Qe = () => {
|
|
1855
|
+
const e = p.useContext(oa);
|
|
1853
1856
|
if (!e)
|
|
1854
1857
|
throw new Error("useDrawerContext must be used within a Drawer.Root");
|
|
1855
1858
|
return e;
|
|
1856
1859
|
};
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1860
|
+
al(`[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(
|
|
1861
|
+
[data-state=closed]
|
|
1862
|
+
){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)}}`);
|
|
1863
|
+
function ol() {
|
|
1864
|
+
const e = navigator.userAgent;
|
|
1865
|
+
return typeof window < "u" && (/Firefox/.test(e) && /Mobile/.test(e) || // Android Firefox
|
|
1866
|
+
/FxiOS/.test(e));
|
|
1864
1867
|
}
|
|
1865
|
-
function
|
|
1866
|
-
return
|
|
1868
|
+
function sl() {
|
|
1869
|
+
return Jt(/^Mac/);
|
|
1867
1870
|
}
|
|
1868
|
-
function
|
|
1869
|
-
return
|
|
1871
|
+
function il() {
|
|
1872
|
+
return Jt(/^iPhone/);
|
|
1870
1873
|
}
|
|
1871
|
-
function
|
|
1872
|
-
return
|
|
1873
|
-
Zi() && navigator.maxTouchPoints > 1;
|
|
1874
|
+
function En() {
|
|
1875
|
+
return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
1874
1876
|
}
|
|
1875
|
-
function
|
|
1876
|
-
return
|
|
1877
|
+
function ll() {
|
|
1878
|
+
return Jt(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
1879
|
+
sl() && navigator.maxTouchPoints > 1;
|
|
1877
1880
|
}
|
|
1878
|
-
function
|
|
1881
|
+
function sa() {
|
|
1882
|
+
return il() || ll();
|
|
1883
|
+
}
|
|
1884
|
+
function Jt(e) {
|
|
1879
1885
|
return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
|
|
1880
1886
|
}
|
|
1881
|
-
const
|
|
1882
|
-
function
|
|
1887
|
+
const cl = 24, ul = typeof window < "u" ? So : Ce;
|
|
1888
|
+
function Dn(...e) {
|
|
1889
|
+
return (...t) => {
|
|
1890
|
+
for (let n of e)
|
|
1891
|
+
typeof n == "function" && n(...t);
|
|
1892
|
+
};
|
|
1893
|
+
}
|
|
1894
|
+
const Mt = typeof document < "u" && window.visualViewport;
|
|
1895
|
+
function Pn(e) {
|
|
1883
1896
|
let t = window.getComputedStyle(e);
|
|
1884
1897
|
return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
|
|
1885
1898
|
}
|
|
1886
|
-
function
|
|
1887
|
-
for (
|
|
1899
|
+
function ia(e) {
|
|
1900
|
+
for (Pn(e) && (e = e.parentElement); e && !Pn(e); )
|
|
1888
1901
|
e = e.parentElement;
|
|
1889
1902
|
return e || document.scrollingElement || document.documentElement;
|
|
1890
1903
|
}
|
|
1891
|
-
const
|
|
1904
|
+
const dl = /* @__PURE__ */ new Set([
|
|
1892
1905
|
"checkbox",
|
|
1893
1906
|
"radio",
|
|
1894
1907
|
"range",
|
|
@@ -1899,179 +1912,113 @@ const nl = /* @__PURE__ */ new Set([
|
|
|
1899
1912
|
"submit",
|
|
1900
1913
|
"reset"
|
|
1901
1914
|
]);
|
|
1902
|
-
let
|
|
1903
|
-
function
|
|
1915
|
+
let ht = 0, Rt;
|
|
1916
|
+
function fl(e = {}) {
|
|
1904
1917
|
let { isDisabled: t } = e;
|
|
1905
|
-
|
|
1918
|
+
ul(() => {
|
|
1906
1919
|
if (!t)
|
|
1907
|
-
return
|
|
1908
|
-
|
|
1920
|
+
return ht++, ht === 1 && sa() && (Rt = hl()), () => {
|
|
1921
|
+
ht--, ht === 0 && (Rt == null || Rt());
|
|
1909
1922
|
};
|
|
1910
1923
|
}, [
|
|
1911
1924
|
t
|
|
1912
1925
|
]);
|
|
1913
1926
|
}
|
|
1914
|
-
function
|
|
1915
|
-
return Nt(no(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
1916
|
-
}
|
|
1917
|
-
function al() {
|
|
1927
|
+
function hl() {
|
|
1918
1928
|
let e, t = 0, n = (c) => {
|
|
1919
|
-
e =
|
|
1929
|
+
e = ia(c.target), !(e === document.documentElement && e === document.body) && (t = c.changedTouches[0].pageY);
|
|
1920
1930
|
}, r = (c) => {
|
|
1921
1931
|
if (!e || e === document.documentElement || e === document.body) {
|
|
1922
1932
|
c.preventDefault();
|
|
1923
1933
|
return;
|
|
1924
1934
|
}
|
|
1925
|
-
let d = c.changedTouches[0].pageY,
|
|
1926
|
-
|
|
1927
|
-
},
|
|
1935
|
+
let d = c.changedTouches[0].pageY, v = e.scrollTop, M = e.scrollHeight - e.clientHeight;
|
|
1936
|
+
M !== 0 && ((v <= 0 && d > t || v >= M && d < t) && c.preventDefault(), t = d);
|
|
1937
|
+
}, o = (c) => {
|
|
1928
1938
|
let d = c.target;
|
|
1929
|
-
|
|
1939
|
+
Tt(d) && d !== document.activeElement && (c.preventDefault(), d.style.transform = "translateY(-2000px)", d.focus(), requestAnimationFrame(() => {
|
|
1930
1940
|
d.style.transform = "";
|
|
1931
1941
|
}));
|
|
1932
1942
|
}, s = (c) => {
|
|
1933
1943
|
let d = c.target;
|
|
1934
|
-
|
|
1935
|
-
d.style.transform = "",
|
|
1936
|
-
|
|
1937
|
-
}) :
|
|
1944
|
+
Tt(d) && (d.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
1945
|
+
d.style.transform = "", Mt && (Mt.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
1946
|
+
jn(d);
|
|
1947
|
+
}) : Mt.addEventListener("resize", () => jn(d), {
|
|
1938
1948
|
once: !0
|
|
1939
1949
|
}));
|
|
1940
1950
|
}));
|
|
1941
1951
|
}, i = () => {
|
|
1942
1952
|
window.scrollTo(0, 0);
|
|
1943
|
-
}, l = window.pageXOffset, u = window.pageYOffset,
|
|
1953
|
+
}, l = window.pageXOffset, u = window.pageYOffset, m = Dn(pl(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
1944
1954
|
window.scrollTo(0, 0);
|
|
1945
|
-
let
|
|
1955
|
+
let f = Dn(We(document, "touchstart", n, {
|
|
1946
1956
|
passive: !1,
|
|
1947
1957
|
capture: !0
|
|
1948
|
-
}),
|
|
1958
|
+
}), We(document, "touchmove", r, {
|
|
1949
1959
|
passive: !1,
|
|
1950
1960
|
capture: !0
|
|
1951
|
-
}),
|
|
1961
|
+
}), We(document, "touchend", o, {
|
|
1952
1962
|
passive: !1,
|
|
1953
1963
|
capture: !0
|
|
1954
|
-
}),
|
|
1964
|
+
}), We(document, "focus", s, !0), We(window, "scroll", i));
|
|
1955
1965
|
return () => {
|
|
1956
|
-
|
|
1966
|
+
m(), f(), window.scrollTo(l, u);
|
|
1957
1967
|
};
|
|
1958
1968
|
}
|
|
1959
|
-
function
|
|
1969
|
+
function pl(e, t, n) {
|
|
1960
1970
|
let r = e.style[t];
|
|
1961
1971
|
return e.style[t] = n, () => {
|
|
1962
1972
|
e.style[t] = r;
|
|
1963
1973
|
};
|
|
1964
1974
|
}
|
|
1965
|
-
function
|
|
1975
|
+
function We(e, t, n, r) {
|
|
1966
1976
|
return e.addEventListener(t, n, r), () => {
|
|
1967
1977
|
e.removeEventListener(t, n, r);
|
|
1968
1978
|
};
|
|
1969
1979
|
}
|
|
1970
|
-
function
|
|
1980
|
+
function jn(e) {
|
|
1971
1981
|
let t = document.scrollingElement || document.documentElement;
|
|
1972
1982
|
for (; e && e !== t; ) {
|
|
1973
|
-
let n =
|
|
1983
|
+
let n = ia(e);
|
|
1974
1984
|
if (n !== document.documentElement && n !== document.body && n !== e) {
|
|
1975
|
-
let r = n.getBoundingClientRect().top,
|
|
1976
|
-
const i = n.getBoundingClientRect().bottom;
|
|
1977
|
-
s > i && (n.scrollTop +=
|
|
1985
|
+
let r = n.getBoundingClientRect().top, o = e.getBoundingClientRect().top, s = e.getBoundingClientRect().bottom;
|
|
1986
|
+
const i = n.getBoundingClientRect().bottom + cl;
|
|
1987
|
+
s > i && (n.scrollTop += o - r);
|
|
1978
1988
|
}
|
|
1979
1989
|
e = n.parentElement;
|
|
1980
1990
|
}
|
|
1981
1991
|
}
|
|
1982
|
-
function
|
|
1983
|
-
return e instanceof HTMLInputElement && !
|
|
1992
|
+
function Tt(e) {
|
|
1993
|
+
return e instanceof HTMLInputElement && !dl.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
1984
1994
|
}
|
|
1985
|
-
function
|
|
1995
|
+
function ml(e, t) {
|
|
1986
1996
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
1987
1997
|
}
|
|
1988
|
-
function
|
|
1989
|
-
return (t) => e.forEach((n) =>
|
|
1998
|
+
function gl(...e) {
|
|
1999
|
+
return (t) => e.forEach((n) => ml(n, t));
|
|
1990
2000
|
}
|
|
1991
|
-
function
|
|
1992
|
-
return h.useCallback(
|
|
2001
|
+
function la(...e) {
|
|
2002
|
+
return h.useCallback(gl(...e), e);
|
|
1993
2003
|
}
|
|
1994
|
-
|
|
1995
|
-
function
|
|
1996
|
-
const [i, l] = g.useState(() => typeof window < "u" ? window.location.href : ""), u = g.useRef(0), v = g.useCallback(() => {
|
|
1997
|
-
if (Qe === null && e && !s) {
|
|
1998
|
-
Qe = {
|
|
1999
|
-
position: document.body.style.position,
|
|
2000
|
-
top: document.body.style.top,
|
|
2001
|
-
left: document.body.style.left,
|
|
2002
|
-
height: document.body.style.height,
|
|
2003
|
-
right: "unset"
|
|
2004
|
-
};
|
|
2005
|
-
const { scrollX: c, innerHeight: d } = window;
|
|
2006
|
-
document.body.style.setProperty("position", "fixed", "important"), Object.assign(document.body.style, {
|
|
2007
|
-
top: `${-u.current}px`,
|
|
2008
|
-
left: `${-c}px`,
|
|
2009
|
-
right: "0px",
|
|
2010
|
-
height: "auto"
|
|
2011
|
-
}), window.setTimeout(() => window.requestAnimationFrame(() => {
|
|
2012
|
-
const f = d - window.innerHeight;
|
|
2013
|
-
f && u.current >= d && (document.body.style.top = `${-(u.current + f)}px`);
|
|
2014
|
-
}), 300);
|
|
2015
|
-
}
|
|
2016
|
-
}, [
|
|
2017
|
-
e
|
|
2018
|
-
]), m = g.useCallback(() => {
|
|
2019
|
-
if (Qe !== null && !s) {
|
|
2020
|
-
const c = -parseInt(document.body.style.top, 10), d = -parseInt(document.body.style.left, 10);
|
|
2021
|
-
Object.assign(document.body.style, Qe), window.requestAnimationFrame(() => {
|
|
2022
|
-
if (a && i !== window.location.href) {
|
|
2023
|
-
l(window.location.href);
|
|
2024
|
-
return;
|
|
2025
|
-
}
|
|
2026
|
-
window.scrollTo(d, c);
|
|
2027
|
-
}), Qe = null;
|
|
2028
|
-
}
|
|
2029
|
-
}, [
|
|
2030
|
-
i
|
|
2031
|
-
]);
|
|
2032
|
-
return g.useEffect(() => {
|
|
2033
|
-
function c() {
|
|
2034
|
-
u.current = window.scrollY;
|
|
2035
|
-
}
|
|
2036
|
-
return c(), window.addEventListener("scroll", c), () => {
|
|
2037
|
-
window.removeEventListener("scroll", c);
|
|
2038
|
-
};
|
|
2039
|
-
}, []), g.useEffect(() => {
|
|
2040
|
-
n || !r || (e ? (!window.matchMedia("(display-mode: standalone)").matches && v(), t || window.setTimeout(() => {
|
|
2041
|
-
m();
|
|
2042
|
-
}, 500)) : m());
|
|
2043
|
-
}, [
|
|
2044
|
-
e,
|
|
2045
|
-
r,
|
|
2046
|
-
i,
|
|
2047
|
-
t,
|
|
2048
|
-
n,
|
|
2049
|
-
v,
|
|
2050
|
-
m
|
|
2051
|
-
]), {
|
|
2052
|
-
restorePositionSetting: m
|
|
2053
|
-
};
|
|
2054
|
-
}
|
|
2055
|
-
const oo = /* @__PURE__ */ new WeakMap();
|
|
2056
|
-
function I(e, t, n = !1) {
|
|
2004
|
+
const ca = /* @__PURE__ */ new WeakMap();
|
|
2005
|
+
function H(e, t, n = !1) {
|
|
2057
2006
|
if (!e || !(e instanceof HTMLElement)) return;
|
|
2058
2007
|
let r = {};
|
|
2059
|
-
Object.entries(t).forEach(([
|
|
2060
|
-
if (
|
|
2061
|
-
e.style.setProperty(
|
|
2008
|
+
Object.entries(t).forEach(([o, s]) => {
|
|
2009
|
+
if (o.startsWith("--")) {
|
|
2010
|
+
e.style.setProperty(o, s);
|
|
2062
2011
|
return;
|
|
2063
2012
|
}
|
|
2064
|
-
r[
|
|
2065
|
-
}), !n &&
|
|
2013
|
+
r[o] = e.style[o], e.style[o] = s;
|
|
2014
|
+
}), !n && ca.set(e, r);
|
|
2066
2015
|
}
|
|
2067
|
-
function
|
|
2016
|
+
function vl(e, t) {
|
|
2068
2017
|
if (!e || !(e instanceof HTMLElement)) return;
|
|
2069
|
-
let n =
|
|
2070
|
-
n && (
|
|
2071
|
-
e.style[r] = a;
|
|
2072
|
-
}));
|
|
2018
|
+
let n = ca.get(e);
|
|
2019
|
+
n && (e.style[t] = n[t]);
|
|
2073
2020
|
}
|
|
2074
|
-
const
|
|
2021
|
+
const U = (e) => {
|
|
2075
2022
|
switch (e) {
|
|
2076
2023
|
case "top":
|
|
2077
2024
|
case "bottom":
|
|
@@ -2083,20 +2030,34 @@ const z = (e) => {
|
|
|
2083
2030
|
return e;
|
|
2084
2031
|
}
|
|
2085
2032
|
};
|
|
2086
|
-
function
|
|
2033
|
+
function pt(e, t) {
|
|
2087
2034
|
if (!e)
|
|
2088
2035
|
return null;
|
|
2089
2036
|
const n = window.getComputedStyle(e), r = (
|
|
2090
2037
|
// @ts-ignore
|
|
2091
2038
|
n.transform || n.webkitTransform || n.mozTransform
|
|
2092
2039
|
);
|
|
2093
|
-
let
|
|
2094
|
-
return
|
|
2040
|
+
let o = r.match(/^matrix3d\((.+)\)$/);
|
|
2041
|
+
return o ? parseFloat(o[1].split(", ")[U(t) ? 13 : 12]) : (o = r.match(/^matrix\((.+)\)$/), o ? parseFloat(o[1].split(", ")[U(t) ? 5 : 4]) : null);
|
|
2095
2042
|
}
|
|
2096
|
-
function
|
|
2043
|
+
function wl(e) {
|
|
2097
2044
|
return 8 * (Math.log(e + 1) - 2);
|
|
2098
2045
|
}
|
|
2099
|
-
|
|
2046
|
+
function Et(e, t) {
|
|
2047
|
+
if (!e) return () => {
|
|
2048
|
+
};
|
|
2049
|
+
const n = e.style.cssText;
|
|
2050
|
+
return Object.assign(e.style, t), () => {
|
|
2051
|
+
e.style.cssText = n;
|
|
2052
|
+
};
|
|
2053
|
+
}
|
|
2054
|
+
function xl(...e) {
|
|
2055
|
+
return (...t) => {
|
|
2056
|
+
for (const n of e)
|
|
2057
|
+
typeof n == "function" && n(...t);
|
|
2058
|
+
};
|
|
2059
|
+
}
|
|
2060
|
+
const $ = {
|
|
2100
2061
|
DURATION: 0.5,
|
|
2101
2062
|
EASE: [
|
|
2102
2063
|
0.32,
|
|
@@ -2104,38 +2065,38 @@ const T = {
|
|
|
2104
2065
|
0,
|
|
2105
2066
|
1
|
|
2106
2067
|
]
|
|
2107
|
-
},
|
|
2108
|
-
function
|
|
2109
|
-
const t =
|
|
2110
|
-
return
|
|
2068
|
+
}, ua = 0.4, yl = 0.25, bl = 100, da = 8, Oe = 16, _t = 26, Dt = "vaul-dragging";
|
|
2069
|
+
function fa(e) {
|
|
2070
|
+
const t = p.useRef(e);
|
|
2071
|
+
return p.useEffect(() => {
|
|
2111
2072
|
t.current = e;
|
|
2112
|
-
}),
|
|
2073
|
+
}), p.useMemo(() => (...n) => t.current == null ? void 0 : t.current.call(t, ...n), []);
|
|
2113
2074
|
}
|
|
2114
|
-
function
|
|
2115
|
-
const n =
|
|
2116
|
-
return
|
|
2117
|
-
|
|
2075
|
+
function Sl({ defaultProp: e, onChange: t }) {
|
|
2076
|
+
const n = p.useState(e), [r] = n, o = p.useRef(r), s = fa(t);
|
|
2077
|
+
return p.useEffect(() => {
|
|
2078
|
+
o.current !== r && (s(r), o.current = r);
|
|
2118
2079
|
}, [
|
|
2119
2080
|
r,
|
|
2120
|
-
|
|
2081
|
+
o,
|
|
2121
2082
|
s
|
|
2122
2083
|
]), n;
|
|
2123
2084
|
}
|
|
2124
|
-
function
|
|
2085
|
+
function ha({ prop: e, defaultProp: t, onChange: n = () => {
|
|
2125
2086
|
} }) {
|
|
2126
|
-
const [r,
|
|
2087
|
+
const [r, o] = Sl({
|
|
2127
2088
|
defaultProp: t,
|
|
2128
2089
|
onChange: n
|
|
2129
|
-
}), s = e !== void 0, i = s ? e : r, l =
|
|
2090
|
+
}), s = e !== void 0, i = s ? e : r, l = fa(n), u = p.useCallback((m) => {
|
|
2130
2091
|
if (s) {
|
|
2131
|
-
const c = typeof
|
|
2092
|
+
const c = typeof m == "function" ? m(e) : m;
|
|
2132
2093
|
c !== e && l(c);
|
|
2133
2094
|
} else
|
|
2134
|
-
|
|
2095
|
+
o(m);
|
|
2135
2096
|
}, [
|
|
2136
2097
|
s,
|
|
2137
2098
|
e,
|
|
2138
|
-
|
|
2099
|
+
o,
|
|
2139
2100
|
l
|
|
2140
2101
|
]);
|
|
2141
2102
|
return [
|
|
@@ -2143,686 +2104,795 @@ function dl({ prop: e, defaultProp: t, onChange: n = () => {
|
|
|
2143
2104
|
u
|
|
2144
2105
|
];
|
|
2145
2106
|
}
|
|
2146
|
-
function
|
|
2147
|
-
const [
|
|
2107
|
+
function Cl({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: o, fadeFromIndex: s, onSnapPointChange: i, direction: l = "bottom", container: u, snapToSequentialPoint: m }) {
|
|
2108
|
+
const [f, c] = ha({
|
|
2148
2109
|
prop: e,
|
|
2149
2110
|
defaultProp: n == null ? void 0 : n[0],
|
|
2150
2111
|
onChange: t
|
|
2151
|
-
}),
|
|
2112
|
+
}), [d, v] = p.useState(typeof window < "u" ? {
|
|
2113
|
+
innerWidth: window.innerWidth,
|
|
2114
|
+
innerHeight: window.innerHeight
|
|
2115
|
+
} : void 0);
|
|
2116
|
+
p.useEffect(() => {
|
|
2117
|
+
function b() {
|
|
2118
|
+
v({
|
|
2119
|
+
innerWidth: window.innerWidth,
|
|
2120
|
+
innerHeight: window.innerHeight
|
|
2121
|
+
});
|
|
2122
|
+
}
|
|
2123
|
+
return window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
|
|
2124
|
+
}, []);
|
|
2125
|
+
const M = p.useMemo(() => f === (n == null ? void 0 : n[n.length - 1]) || null, [
|
|
2152
2126
|
n,
|
|
2153
|
-
|
|
2154
|
-
]),
|
|
2127
|
+
f
|
|
2128
|
+
]), C = p.useMemo(() => {
|
|
2129
|
+
var b;
|
|
2130
|
+
return (b = n == null ? void 0 : n.findIndex((j) => j === f)) != null ? b : null;
|
|
2131
|
+
}, [
|
|
2155
2132
|
n,
|
|
2156
|
-
|
|
2157
|
-
]), f =
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2133
|
+
f
|
|
2134
|
+
]), _ = n && n.length > 0 && (s || s === 0) && !Number.isNaN(s) && n[s] === f || !n, R = p.useMemo(() => {
|
|
2135
|
+
const b = u ? {
|
|
2136
|
+
width: u.getBoundingClientRect().width,
|
|
2137
|
+
height: u.getBoundingClientRect().height
|
|
2138
|
+
} : typeof window < "u" ? {
|
|
2139
|
+
width: window.innerWidth,
|
|
2140
|
+
height: window.innerHeight
|
|
2141
|
+
} : {
|
|
2142
|
+
width: 0,
|
|
2143
|
+
height: 0
|
|
2144
|
+
};
|
|
2145
|
+
var j;
|
|
2146
|
+
return (j = n == null ? void 0 : n.map((D) => {
|
|
2147
|
+
const B = typeof D == "string";
|
|
2148
|
+
let K = 0;
|
|
2149
|
+
if (B && (K = parseInt(D, 10)), U(l)) {
|
|
2150
|
+
const x = B ? K : d ? D * b.height : 0;
|
|
2151
|
+
return d ? l === "bottom" ? b.height - x : -b.height + x : x;
|
|
2165
2152
|
}
|
|
2166
|
-
const
|
|
2167
|
-
return
|
|
2168
|
-
})) != null ?
|
|
2153
|
+
const W = B ? K : d ? D * b.width : 0;
|
|
2154
|
+
return d ? l === "right" ? b.width - W : -b.width + W : W;
|
|
2155
|
+
})) != null ? j : [];
|
|
2169
2156
|
}, [
|
|
2170
|
-
n
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2157
|
+
n,
|
|
2158
|
+
d,
|
|
2159
|
+
u
|
|
2160
|
+
]), k = p.useMemo(() => C !== null ? R == null ? void 0 : R[C] : null, [
|
|
2161
|
+
R,
|
|
2162
|
+
C
|
|
2163
|
+
]), P = p.useCallback((b) => {
|
|
2164
|
+
var j;
|
|
2165
|
+
const D = (j = R == null ? void 0 : R.findIndex((B) => B === b)) != null ? j : null;
|
|
2166
|
+
i(D), H(r.current, {
|
|
2167
|
+
transition: `transform ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
|
|
2168
|
+
transform: U(l) ? `translate3d(0, ${b}px, 0)` : `translate3d(${b}px, 0, 0)`
|
|
2169
|
+
}), R && D !== R.length - 1 && s !== void 0 && D !== s && D < s ? H(o.current, {
|
|
2170
|
+
transition: `opacity ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
|
|
2182
2171
|
opacity: "0"
|
|
2183
|
-
}) :
|
|
2184
|
-
transition: `opacity ${
|
|
2172
|
+
}) : H(o.current, {
|
|
2173
|
+
transition: `opacity ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
|
|
2185
2174
|
opacity: "1"
|
|
2186
|
-
}),
|
|
2175
|
+
}), c(n == null ? void 0 : n[Math.max(D, 0)]);
|
|
2187
2176
|
}, [
|
|
2188
2177
|
r.current,
|
|
2189
2178
|
n,
|
|
2190
|
-
|
|
2179
|
+
R,
|
|
2191
2180
|
s,
|
|
2192
|
-
|
|
2193
|
-
|
|
2181
|
+
o,
|
|
2182
|
+
c
|
|
2194
2183
|
]);
|
|
2195
|
-
|
|
2196
|
-
if (
|
|
2197
|
-
var
|
|
2198
|
-
const
|
|
2199
|
-
|
|
2184
|
+
p.useEffect(() => {
|
|
2185
|
+
if (f || e) {
|
|
2186
|
+
var b;
|
|
2187
|
+
const j = (b = n == null ? void 0 : n.findIndex((D) => D === e || D === f)) != null ? b : -1;
|
|
2188
|
+
R && j !== -1 && typeof R[j] == "number" && P(R[j]);
|
|
2200
2189
|
}
|
|
2201
2190
|
}, [
|
|
2202
|
-
|
|
2191
|
+
f,
|
|
2203
2192
|
e,
|
|
2204
2193
|
n,
|
|
2205
|
-
|
|
2206
|
-
|
|
2194
|
+
R,
|
|
2195
|
+
P
|
|
2207
2196
|
]);
|
|
2208
|
-
function
|
|
2197
|
+
function g({ draggedDistance: b, closeDrawer: j, velocity: D, dismissible: B }) {
|
|
2209
2198
|
if (s === void 0) return;
|
|
2210
|
-
const
|
|
2211
|
-
if (
|
|
2212
|
-
transition: `opacity ${
|
|
2213
|
-
}),
|
|
2214
|
-
|
|
2199
|
+
const K = l === "bottom" || l === "right" ? (k ?? 0) - b : (k ?? 0) + b, W = C === s - 1, x = C === 0, V = b > 0;
|
|
2200
|
+
if (W && H(o.current, {
|
|
2201
|
+
transition: `opacity ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`
|
|
2202
|
+
}), !m && D > 2 && !V) {
|
|
2203
|
+
B ? j() : P(R[0]);
|
|
2215
2204
|
return;
|
|
2216
2205
|
}
|
|
2217
|
-
if (
|
|
2218
|
-
R
|
|
2206
|
+
if (!m && D > 2 && V && R && n) {
|
|
2207
|
+
P(R[n.length - 1]);
|
|
2219
2208
|
return;
|
|
2220
2209
|
}
|
|
2221
|
-
const
|
|
2222
|
-
if (
|
|
2223
|
-
const
|
|
2224
|
-
if (
|
|
2225
|
-
R
|
|
2210
|
+
const G = R == null ? void 0 : R.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;
|
|
2211
|
+
if (D > ua && Math.abs(b) < te * 0.4) {
|
|
2212
|
+
const q = V ? 1 : -1;
|
|
2213
|
+
if (q > 0 && M && n) {
|
|
2214
|
+
P(R[n.length - 1]);
|
|
2226
2215
|
return;
|
|
2227
2216
|
}
|
|
2228
|
-
if (
|
|
2229
|
-
R
|
|
2217
|
+
if (x && q < 0 && B && j(), C === null) return;
|
|
2218
|
+
P(R[C + q]);
|
|
2230
2219
|
return;
|
|
2231
2220
|
}
|
|
2232
|
-
|
|
2221
|
+
P(G);
|
|
2233
2222
|
}
|
|
2234
|
-
function
|
|
2235
|
-
if (
|
|
2236
|
-
const
|
|
2237
|
-
(l === "bottom" || l === "right") &&
|
|
2238
|
-
transform:
|
|
2223
|
+
function z({ draggedDistance: b }) {
|
|
2224
|
+
if (k === null) return;
|
|
2225
|
+
const j = l === "bottom" || l === "right" ? k - b : k + b;
|
|
2226
|
+
(l === "bottom" || l === "right") && j < R[R.length - 1] || (l === "top" || l === "left") && j > R[R.length - 1] || H(r.current, {
|
|
2227
|
+
transform: U(l) ? `translate3d(0, ${j}px, 0)` : `translate3d(${j}px, 0, 0)`
|
|
2239
2228
|
});
|
|
2240
2229
|
}
|
|
2241
|
-
function
|
|
2242
|
-
if (!n || typeof
|
|
2243
|
-
const
|
|
2244
|
-
if (
|
|
2230
|
+
function Z(b, j) {
|
|
2231
|
+
if (!n || typeof C != "number" || !R || s === void 0) return null;
|
|
2232
|
+
const D = C === s - 1;
|
|
2233
|
+
if (C >= s && j)
|
|
2245
2234
|
return 0;
|
|
2246
|
-
if (
|
|
2247
|
-
if (!
|
|
2248
|
-
const
|
|
2249
|
-
return
|
|
2235
|
+
if (D && !j) return 1;
|
|
2236
|
+
if (!_ && !D) return null;
|
|
2237
|
+
const K = D ? C + 1 : C - 1, W = D ? R[K] - R[K - 1] : R[K + 1] - R[K], x = b / Math.abs(W);
|
|
2238
|
+
return D ? 1 - x : x;
|
|
2250
2239
|
}
|
|
2251
2240
|
return {
|
|
2252
|
-
isLastSnapPoint:
|
|
2253
|
-
activeSnapPoint:
|
|
2254
|
-
shouldFade:
|
|
2255
|
-
getPercentageDragged:
|
|
2256
|
-
setActiveSnapPoint:
|
|
2257
|
-
activeSnapPointIndex:
|
|
2258
|
-
onRelease:
|
|
2259
|
-
onDrag:
|
|
2260
|
-
snapPointsOffset:
|
|
2241
|
+
isLastSnapPoint: M,
|
|
2242
|
+
activeSnapPoint: f,
|
|
2243
|
+
shouldFade: _,
|
|
2244
|
+
getPercentageDragged: Z,
|
|
2245
|
+
setActiveSnapPoint: c,
|
|
2246
|
+
activeSnapPointIndex: C,
|
|
2247
|
+
onRelease: g,
|
|
2248
|
+
onDrag: z,
|
|
2249
|
+
snapPointsOffset: R
|
|
2250
|
+
};
|
|
2251
|
+
}
|
|
2252
|
+
const Ml = () => () => {
|
|
2253
|
+
};
|
|
2254
|
+
function Rl() {
|
|
2255
|
+
const { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: o } = Qe(), s = p.useRef(null), i = mt(() => document.body.style.backgroundColor, []);
|
|
2256
|
+
function l() {
|
|
2257
|
+
return (window.innerWidth - _t) / window.innerWidth;
|
|
2258
|
+
}
|
|
2259
|
+
p.useEffect(() => {
|
|
2260
|
+
if (t && n) {
|
|
2261
|
+
s.current && clearTimeout(s.current);
|
|
2262
|
+
const u = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
|
|
2263
|
+
if (!u) return;
|
|
2264
|
+
xl(r && !o ? Et(document.body, {
|
|
2265
|
+
background: "black"
|
|
2266
|
+
}) : Ml, Et(u, {
|
|
2267
|
+
transformOrigin: U(e) ? "top" : "left",
|
|
2268
|
+
transitionProperty: "transform, border-radius",
|
|
2269
|
+
transitionDuration: `${$.DURATION}s`,
|
|
2270
|
+
transitionTimingFunction: `cubic-bezier(${$.EASE.join(",")})`
|
|
2271
|
+
}));
|
|
2272
|
+
const m = Et(u, {
|
|
2273
|
+
borderRadius: `${da}px`,
|
|
2274
|
+
overflow: "hidden",
|
|
2275
|
+
...U(e) ? {
|
|
2276
|
+
transform: `scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`
|
|
2277
|
+
} : {
|
|
2278
|
+
transform: `scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`
|
|
2279
|
+
}
|
|
2280
|
+
});
|
|
2281
|
+
return () => {
|
|
2282
|
+
m(), s.current = window.setTimeout(() => {
|
|
2283
|
+
i ? document.body.style.background = i : document.body.style.removeProperty("background");
|
|
2284
|
+
}, $.DURATION * 1e3);
|
|
2285
|
+
};
|
|
2286
|
+
}
|
|
2287
|
+
}, [
|
|
2288
|
+
t,
|
|
2289
|
+
n,
|
|
2290
|
+
i
|
|
2291
|
+
]);
|
|
2292
|
+
}
|
|
2293
|
+
let Ye = null;
|
|
2294
|
+
function El({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: o, noBodyStyles: s }) {
|
|
2295
|
+
const [i, l] = p.useState(() => typeof window < "u" ? window.location.href : ""), u = p.useRef(0), m = p.useCallback(() => {
|
|
2296
|
+
if (En() && Ye === null && e && !s) {
|
|
2297
|
+
Ye = {
|
|
2298
|
+
position: document.body.style.position,
|
|
2299
|
+
top: document.body.style.top,
|
|
2300
|
+
left: document.body.style.left,
|
|
2301
|
+
height: document.body.style.height,
|
|
2302
|
+
right: "unset"
|
|
2303
|
+
};
|
|
2304
|
+
const { scrollX: c, innerHeight: d } = window;
|
|
2305
|
+
document.body.style.setProperty("position", "fixed", "important"), Object.assign(document.body.style, {
|
|
2306
|
+
top: `${-u.current}px`,
|
|
2307
|
+
left: `${-c}px`,
|
|
2308
|
+
right: "0px",
|
|
2309
|
+
height: "auto"
|
|
2310
|
+
}), window.setTimeout(() => window.requestAnimationFrame(() => {
|
|
2311
|
+
const v = d - window.innerHeight;
|
|
2312
|
+
v && u.current >= d && (document.body.style.top = `${-(u.current + v)}px`);
|
|
2313
|
+
}), 300);
|
|
2314
|
+
}
|
|
2315
|
+
}, [
|
|
2316
|
+
e
|
|
2317
|
+
]), f = p.useCallback(() => {
|
|
2318
|
+
if (En() && Ye !== null && !s) {
|
|
2319
|
+
const c = -parseInt(document.body.style.top, 10), d = -parseInt(document.body.style.left, 10);
|
|
2320
|
+
Object.assign(document.body.style, Ye), window.requestAnimationFrame(() => {
|
|
2321
|
+
if (o && i !== window.location.href) {
|
|
2322
|
+
l(window.location.href);
|
|
2323
|
+
return;
|
|
2324
|
+
}
|
|
2325
|
+
window.scrollTo(d, c);
|
|
2326
|
+
}), Ye = null;
|
|
2327
|
+
}
|
|
2328
|
+
}, [
|
|
2329
|
+
i
|
|
2330
|
+
]);
|
|
2331
|
+
return p.useEffect(() => {
|
|
2332
|
+
function c() {
|
|
2333
|
+
u.current = window.scrollY;
|
|
2334
|
+
}
|
|
2335
|
+
return c(), window.addEventListener("scroll", c), () => {
|
|
2336
|
+
window.removeEventListener("scroll", c);
|
|
2337
|
+
};
|
|
2338
|
+
}, []), p.useEffect(() => {
|
|
2339
|
+
if (t)
|
|
2340
|
+
return () => {
|
|
2341
|
+
typeof document > "u" || document.querySelector("[data-vaul-drawer]") || f();
|
|
2342
|
+
};
|
|
2343
|
+
}, [
|
|
2344
|
+
t,
|
|
2345
|
+
f
|
|
2346
|
+
]), p.useEffect(() => {
|
|
2347
|
+
n || !r || (e ? (!window.matchMedia("(display-mode: standalone)").matches && m(), t || window.setTimeout(() => {
|
|
2348
|
+
f();
|
|
2349
|
+
}, 500)) : f());
|
|
2350
|
+
}, [
|
|
2351
|
+
e,
|
|
2352
|
+
r,
|
|
2353
|
+
i,
|
|
2354
|
+
t,
|
|
2355
|
+
n,
|
|
2356
|
+
m,
|
|
2357
|
+
f
|
|
2358
|
+
]), {
|
|
2359
|
+
restorePositionSetting: f
|
|
2261
2360
|
};
|
|
2262
2361
|
}
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2362
|
+
function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: s, shouldScaleBackground: i = !1, setBackgroundColorOnScale: l = !0, closeThreshold: u = yl, scrollLockTimeout: m = bl, dismissible: f = !0, handleOnly: c = !1, fadeFromIndex: d = s && s.length - 1, activeSnapPoint: v, setActiveSnapPoint: M, fixed: C, modal: _ = !0, onClose: R, nested: k, noBodyStyles: P = !1, direction: g = "bottom", defaultOpen: z = !1, disablePreventScroll: Z = !0, snapToSequentialPoint: b = !1, preventScrollRestoration: j = !1, repositionInputs: D = !0, onAnimationEnd: B, container: K, autoFocus: W = !1 }) {
|
|
2363
|
+
var x, V;
|
|
2364
|
+
const [G = !1, te] = ha({
|
|
2365
|
+
defaultProp: z,
|
|
2366
|
+
prop: e,
|
|
2367
|
+
onChange: (S) => {
|
|
2368
|
+
t == null || t(S), !S && !k && _a(), setTimeout(() => {
|
|
2369
|
+
B == null || B(S);
|
|
2370
|
+
}, $.DURATION * 1e3), S && !_ && typeof window < "u" && window.requestAnimationFrame(() => {
|
|
2371
|
+
document.body.style.pointerEvents = "auto";
|
|
2372
|
+
}), S || (document.body.style.pointerEvents = "auto");
|
|
2373
|
+
}
|
|
2374
|
+
}), [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), bt = p.useRef(0), Da = p.useCallback((S) => {
|
|
2375
|
+
s && S === Ve.length - 1 && (Me.current = /* @__PURE__ */ new Date());
|
|
2376
|
+
}, []), { activeSnapPoint: Pa, activeSnapPointIndex: Le, setActiveSnapPoint: sn, onRelease: ja, snapPointsOffset: Ve, onDrag: Na, shouldFade: ln, getPercentageDragged: Ta } = Cl({
|
|
2377
|
+
snapPoints: s,
|
|
2378
|
+
activeSnapPointProp: v,
|
|
2379
|
+
setActiveSnapPointProp: M,
|
|
2380
|
+
drawerRef: E,
|
|
2381
|
+
fadeFromIndex: d,
|
|
2382
|
+
overlayRef: pe,
|
|
2383
|
+
onSnapPointChange: Da,
|
|
2384
|
+
direction: g,
|
|
2385
|
+
container: K,
|
|
2386
|
+
snapToSequentialPoint: b
|
|
2277
2387
|
});
|
|
2278
|
-
|
|
2279
|
-
isDisabled: !
|
|
2388
|
+
fl({
|
|
2389
|
+
isDisabled: !G || y || !_ || ie || !q || !D || !Z
|
|
2280
2390
|
});
|
|
2281
|
-
const { restorePositionSetting:
|
|
2282
|
-
isOpen:
|
|
2283
|
-
modal:
|
|
2284
|
-
nested:
|
|
2285
|
-
hasBeenOpened:
|
|
2286
|
-
preventScrollRestoration:
|
|
2287
|
-
noBodyStyles:
|
|
2391
|
+
const { restorePositionSetting: _a } = El({
|
|
2392
|
+
isOpen: G,
|
|
2393
|
+
modal: _,
|
|
2394
|
+
nested: k ?? !1,
|
|
2395
|
+
hasBeenOpened: q,
|
|
2396
|
+
preventScrollRestoration: j,
|
|
2397
|
+
noBodyStyles: P
|
|
2288
2398
|
});
|
|
2289
|
-
function
|
|
2290
|
-
return (window.innerWidth -
|
|
2399
|
+
function lt() {
|
|
2400
|
+
return (window.innerWidth - _t) / window.innerWidth;
|
|
2291
2401
|
}
|
|
2292
|
-
function
|
|
2293
|
-
var
|
|
2294
|
-
!
|
|
2402
|
+
function Oa(S) {
|
|
2403
|
+
var T, I;
|
|
2404
|
+
!f && !s || E.current && !E.current.contains(S.target) || (an.current = ((T = E.current) == null ? void 0 : T.getBoundingClientRect().height) || 0, on.current = ((I = E.current) == null ? void 0 : I.getBoundingClientRect().width) || 0, Q(!0), ke.current = /* @__PURE__ */ new Date(), sa() && window.addEventListener("touchend", () => Re.current = !1, {
|
|
2295
2405
|
once: !0
|
|
2296
|
-
}), S.target.setPointerCapture(S.pointerId),
|
|
2406
|
+
}), S.target.setPointerCapture(S.pointerId), $e.current = U(g) ? S.pageY : S.pageX);
|
|
2297
2407
|
}
|
|
2298
|
-
function
|
|
2299
|
-
var
|
|
2300
|
-
let
|
|
2301
|
-
const
|
|
2302
|
-
if (
|
|
2408
|
+
function cn(S, T) {
|
|
2409
|
+
var I;
|
|
2410
|
+
let N = S;
|
|
2411
|
+
const L = (I = window.getSelection()) == null ? void 0 : I.toString(), ne = E.current ? pt(E.current, g) : null, ee = /* @__PURE__ */ new Date();
|
|
2412
|
+
if (N.tagName === "SELECT" || N.hasAttribute("data-vaul-no-drag") || N.closest("[data-vaul-no-drag]"))
|
|
2303
2413
|
return !1;
|
|
2304
|
-
if (
|
|
2414
|
+
if (g === "right" || g === "left")
|
|
2305
2415
|
return !0;
|
|
2306
|
-
if (
|
|
2416
|
+
if (Me.current && ee.getTime() - Me.current.getTime() < 500)
|
|
2307
2417
|
return !1;
|
|
2308
|
-
if (
|
|
2418
|
+
if (ne !== null && (g === "bottom" ? ne > 0 : ne < 0))
|
|
2309
2419
|
return !0;
|
|
2310
|
-
if (
|
|
2420
|
+
if (L && L.length > 0)
|
|
2311
2421
|
return !1;
|
|
2312
|
-
if (
|
|
2313
|
-
return
|
|
2314
|
-
for (;
|
|
2315
|
-
if (
|
|
2316
|
-
if (
|
|
2317
|
-
return
|
|
2318
|
-
if (
|
|
2422
|
+
if (le.current && ee.getTime() - le.current.getTime() < m && ne === 0 || T)
|
|
2423
|
+
return le.current = ee, !1;
|
|
2424
|
+
for (; N; ) {
|
|
2425
|
+
if (N.scrollHeight > N.clientHeight) {
|
|
2426
|
+
if (N.scrollTop !== 0)
|
|
2427
|
+
return le.current = /* @__PURE__ */ new Date(), !1;
|
|
2428
|
+
if (N.getAttribute("role") === "dialog")
|
|
2319
2429
|
return !0;
|
|
2320
2430
|
}
|
|
2321
|
-
|
|
2431
|
+
N = N.parentNode;
|
|
2322
2432
|
}
|
|
2323
2433
|
return !0;
|
|
2324
2434
|
}
|
|
2325
|
-
function
|
|
2326
|
-
if (
|
|
2327
|
-
const
|
|
2328
|
-
if (
|
|
2329
|
-
const
|
|
2330
|
-
let
|
|
2331
|
-
const
|
|
2332
|
-
if (
|
|
2333
|
-
if (
|
|
2435
|
+
function Ia(S) {
|
|
2436
|
+
if (E.current && y) {
|
|
2437
|
+
const T = g === "bottom" || g === "right" ? 1 : -1, I = ($e.current - (U(g) ? S.pageY : S.pageX)) * T, N = I > 0, L = s && !f && !N;
|
|
2438
|
+
if (L && Le === 0) return;
|
|
2439
|
+
const ne = Math.abs(I), ee = document.querySelector("[data-vaul-drawer-wrapper]"), Ee = g === "bottom" || g === "top" ? an.current : on.current;
|
|
2440
|
+
let fe = ne / Ee;
|
|
2441
|
+
const _e = Ta(ne, N);
|
|
2442
|
+
if (_e !== null && (fe = _e), L && fe >= 1 || !Re.current && !cn(S.target, N)) return;
|
|
2443
|
+
if (E.current.classList.add(Dt), Re.current = !0, H(E.current, {
|
|
2334
2444
|
transition: "none"
|
|
2335
|
-
}),
|
|
2445
|
+
}), H(pe.current, {
|
|
2336
2446
|
transition: "none"
|
|
2337
|
-
}),
|
|
2338
|
-
draggedDistance:
|
|
2339
|
-
}),
|
|
2340
|
-
const
|
|
2341
|
-
|
|
2342
|
-
transform:
|
|
2447
|
+
}), s && Na({
|
|
2448
|
+
draggedDistance: I
|
|
2449
|
+
}), N && !s) {
|
|
2450
|
+
const me = wl(I), ct = Math.min(me * -1, 0) * T;
|
|
2451
|
+
H(E.current, {
|
|
2452
|
+
transform: U(g) ? `translate3d(0, ${ct}px, 0)` : `translate3d(${ct}px, 0, 0)`
|
|
2343
2453
|
});
|
|
2344
2454
|
return;
|
|
2345
2455
|
}
|
|
2346
|
-
const
|
|
2347
|
-
if ((
|
|
2348
|
-
opacity: `${
|
|
2456
|
+
const De = 1 - fe;
|
|
2457
|
+
if ((ln || d && Le === d - 1) && (r == null || r(S, fe), H(pe.current, {
|
|
2458
|
+
opacity: `${De}`,
|
|
2349
2459
|
transition: "none"
|
|
2350
|
-
}, !0)),
|
|
2351
|
-
const
|
|
2352
|
-
|
|
2353
|
-
borderRadius: `${
|
|
2354
|
-
transform:
|
|
2460
|
+
}, !0)), ee && pe.current && i) {
|
|
2461
|
+
const me = Math.min(lt() + fe * (1 - lt()), 1), ct = 8 - fe * 8, dn = Math.max(0, 14 - fe * 14);
|
|
2462
|
+
H(ee, {
|
|
2463
|
+
borderRadius: `${ct}px`,
|
|
2464
|
+
transform: U(g) ? `scale(${me}) translate3d(0, ${dn}px, 0)` : `scale(${me}) translate3d(${dn}px, 0, 0)`,
|
|
2355
2465
|
transition: "none"
|
|
2356
2466
|
}, !0);
|
|
2357
2467
|
}
|
|
2358
|
-
if (!
|
|
2359
|
-
const
|
|
2360
|
-
|
|
2361
|
-
transform:
|
|
2468
|
+
if (!s) {
|
|
2469
|
+
const me = ne * T;
|
|
2470
|
+
H(E.current, {
|
|
2471
|
+
transform: U(g) ? `translate3d(0, ${me}px, 0)` : `translate3d(${me}px, 0, 0)`
|
|
2362
2472
|
});
|
|
2363
2473
|
}
|
|
2364
2474
|
}
|
|
2365
2475
|
}
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2476
|
+
p.useEffect(() => {
|
|
2477
|
+
window.requestAnimationFrame(() => {
|
|
2478
|
+
nn.current = !0;
|
|
2479
|
+
});
|
|
2480
|
+
}, []), p.useEffect(() => {
|
|
2369
2481
|
var S;
|
|
2370
|
-
function
|
|
2371
|
-
if (!
|
|
2372
|
-
const
|
|
2373
|
-
if (
|
|
2374
|
-
var
|
|
2375
|
-
const
|
|
2376
|
-
let
|
|
2377
|
-
const
|
|
2378
|
-
bt.current || (bt.current =
|
|
2379
|
-
const
|
|
2380
|
-
if (Math.abs(
|
|
2381
|
-
const
|
|
2382
|
-
|
|
2482
|
+
function T() {
|
|
2483
|
+
if (!E.current || !D) return;
|
|
2484
|
+
const I = document.activeElement;
|
|
2485
|
+
if (Tt(I) || Fe.current) {
|
|
2486
|
+
var N;
|
|
2487
|
+
const L = ((N = window.visualViewport) == null ? void 0 : N.height) || 0, ne = window.innerHeight;
|
|
2488
|
+
let ee = ne - L;
|
|
2489
|
+
const Ee = E.current.getBoundingClientRect().height || 0, fe = Ee > ne * 0.8;
|
|
2490
|
+
bt.current || (bt.current = Ee);
|
|
2491
|
+
const _e = E.current.getBoundingClientRect().top;
|
|
2492
|
+
if (Math.abs(rn.current - ee) > 60 && (Fe.current = !Fe.current), s && s.length > 0 && Ve && Le) {
|
|
2493
|
+
const De = Ve[Le] || 0;
|
|
2494
|
+
ee += De;
|
|
2383
2495
|
}
|
|
2384
|
-
if (
|
|
2385
|
-
const
|
|
2386
|
-
let
|
|
2387
|
-
|
|
2388
|
-
} else
|
|
2389
|
-
|
|
2390
|
-
i && i.length > 0 && !ge.current ? M.current.style.bottom = "0px" : M.current.style.bottom = `${Math.max(B, 0)}px`;
|
|
2496
|
+
if (rn.current = ee, Ee > L || Fe.current) {
|
|
2497
|
+
const De = E.current.getBoundingClientRect().height;
|
|
2498
|
+
let me = De;
|
|
2499
|
+
De > L && (me = L - (fe ? _e : _t)), C ? E.current.style.height = `${De - Math.max(ee, 0)}px` : E.current.style.height = `${Math.max(me, L - _e)}px`;
|
|
2500
|
+
} else ol() || (E.current.style.height = `${bt.current}px`);
|
|
2501
|
+
s && s.length > 0 && !Fe.current ? E.current.style.bottom = "0px" : E.current.style.bottom = `${Math.max(ee, 0)}px`;
|
|
2391
2502
|
}
|
|
2392
2503
|
}
|
|
2393
|
-
return (S = window.visualViewport) == null || S.addEventListener("resize",
|
|
2394
|
-
var
|
|
2395
|
-
return (
|
|
2504
|
+
return (S = window.visualViewport) == null || S.addEventListener("resize", T), () => {
|
|
2505
|
+
var I;
|
|
2506
|
+
return (I = window.visualViewport) == null ? void 0 : I.removeEventListener("resize", T);
|
|
2396
2507
|
};
|
|
2397
2508
|
}, [
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2509
|
+
Le,
|
|
2510
|
+
s,
|
|
2511
|
+
Ve
|
|
2401
2512
|
]);
|
|
2402
|
-
function
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
}, 300), setTimeout(() => {
|
|
2412
|
-
i && tn(i[0]);
|
|
2413
|
-
}, T.DURATION * 1e3));
|
|
2414
|
-
}
|
|
2415
|
-
g.useEffect(() => {
|
|
2416
|
-
if (!_ && r) {
|
|
2417
|
-
const S = setTimeout(() => {
|
|
2418
|
-
dt(document.body);
|
|
2419
|
-
}, 200);
|
|
2420
|
-
return () => clearTimeout(S);
|
|
2421
|
-
}
|
|
2422
|
-
}, [
|
|
2423
|
-
_,
|
|
2424
|
-
r
|
|
2425
|
-
]), Zr(() => {
|
|
2426
|
-
e ? (w(!0), te(!0)) : Ae();
|
|
2427
|
-
}, [
|
|
2428
|
-
e
|
|
2429
|
-
]), g.useEffect(() => {
|
|
2430
|
-
X && (t == null || t(_));
|
|
2431
|
-
}, [
|
|
2432
|
-
_
|
|
2433
|
-
]), g.useEffect(() => {
|
|
2434
|
-
Oe(!0);
|
|
2435
|
-
}, []);
|
|
2436
|
-
function on() {
|
|
2437
|
-
if (!M.current) return;
|
|
2438
|
-
const S = document.querySelector("[vaul-drawer-wrapper]"), D = ft(M.current, p);
|
|
2439
|
-
I(M.current, {
|
|
2513
|
+
function Ge(S) {
|
|
2514
|
+
Aa(), R == null || R(), S || te(!1), setTimeout(() => {
|
|
2515
|
+
s && sn(s[0]);
|
|
2516
|
+
}, $.DURATION * 1e3);
|
|
2517
|
+
}
|
|
2518
|
+
function un() {
|
|
2519
|
+
if (!E.current) return;
|
|
2520
|
+
const S = document.querySelector("[data-vaul-drawer-wrapper]"), T = pt(E.current, g);
|
|
2521
|
+
H(E.current, {
|
|
2440
2522
|
transform: "translate3d(0, 0, 0)",
|
|
2441
|
-
transition: `transform ${
|
|
2442
|
-
}),
|
|
2443
|
-
transition: `opacity ${
|
|
2523
|
+
transition: `transform ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`
|
|
2524
|
+
}), H(pe.current, {
|
|
2525
|
+
transition: `opacity ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
|
|
2444
2526
|
opacity: "1"
|
|
2445
|
-
}),
|
|
2446
|
-
borderRadius: `${
|
|
2527
|
+
}), i && T && T > 0 && G && H(S, {
|
|
2528
|
+
borderRadius: `${da}px`,
|
|
2447
2529
|
overflow: "hidden",
|
|
2448
|
-
...
|
|
2449
|
-
transform: `scale(${
|
|
2530
|
+
...U(g) ? {
|
|
2531
|
+
transform: `scale(${lt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
2450
2532
|
transformOrigin: "top"
|
|
2451
2533
|
} : {
|
|
2452
|
-
transform: `scale(${
|
|
2534
|
+
transform: `scale(${lt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
|
|
2453
2535
|
transformOrigin: "left"
|
|
2454
2536
|
},
|
|
2455
2537
|
transitionProperty: "transform, border-radius",
|
|
2456
|
-
transitionDuration: `${
|
|
2457
|
-
transitionTimingFunction: `cubic-bezier(${
|
|
2538
|
+
transitionDuration: `${$.DURATION}s`,
|
|
2539
|
+
transitionTimingFunction: `cubic-bezier(${$.EASE.join(",")})`
|
|
2458
2540
|
}, !0);
|
|
2459
2541
|
}
|
|
2460
|
-
function
|
|
2461
|
-
!
|
|
2462
|
-
}
|
|
2463
|
-
function
|
|
2464
|
-
if (!
|
|
2465
|
-
|
|
2466
|
-
const
|
|
2467
|
-
if (!
|
|
2468
|
-
const
|
|
2469
|
-
if (
|
|
2470
|
-
|
|
2471
|
-
}, 200)),
|
|
2472
|
-
|
|
2473
|
-
draggedDistance:
|
|
2474
|
-
closeDrawer:
|
|
2475
|
-
velocity:
|
|
2476
|
-
dismissible:
|
|
2477
|
-
}),
|
|
2542
|
+
function Aa() {
|
|
2543
|
+
!y || !E.current || (E.current.classList.remove(Dt), Re.current = !1, Q(!1), ye.current = /* @__PURE__ */ new Date());
|
|
2544
|
+
}
|
|
2545
|
+
function ka(S) {
|
|
2546
|
+
if (!y || !E.current) return;
|
|
2547
|
+
E.current.classList.remove(Dt), Re.current = !1, Q(!1), ye.current = /* @__PURE__ */ new Date();
|
|
2548
|
+
const T = pt(E.current, g);
|
|
2549
|
+
if (!S || !cn(S.target, !1) || !T || Number.isNaN(T) || ke.current === null) return;
|
|
2550
|
+
const I = ye.current.getTime() - ke.current.getTime(), N = $e.current - (U(g) ? S.pageY : S.pageX), L = Math.abs(N) / I;
|
|
2551
|
+
if (L > 0.05 && (de(!0), setTimeout(() => {
|
|
2552
|
+
de(!1);
|
|
2553
|
+
}, 200)), s) {
|
|
2554
|
+
ja({
|
|
2555
|
+
draggedDistance: N * (g === "bottom" || g === "right" ? 1 : -1),
|
|
2556
|
+
closeDrawer: Ge,
|
|
2557
|
+
velocity: L,
|
|
2558
|
+
dismissible: f
|
|
2559
|
+
}), o == null || o(S, !0);
|
|
2478
2560
|
return;
|
|
2479
2561
|
}
|
|
2480
|
-
if (
|
|
2481
|
-
|
|
2562
|
+
if (g === "bottom" || g === "right" ? N > 0 : N < 0) {
|
|
2563
|
+
un(), o == null || o(S, !0);
|
|
2482
2564
|
return;
|
|
2483
2565
|
}
|
|
2484
|
-
if (
|
|
2485
|
-
|
|
2566
|
+
if (L > ua) {
|
|
2567
|
+
Ge(), o == null || o(S, !1);
|
|
2486
2568
|
return;
|
|
2487
2569
|
}
|
|
2488
|
-
var
|
|
2489
|
-
const
|
|
2490
|
-
|
|
2491
|
-
|
|
2570
|
+
var ne;
|
|
2571
|
+
const ee = Math.min((ne = E.current.getBoundingClientRect().height) != null ? ne : 0, window.innerHeight);
|
|
2572
|
+
var Ee;
|
|
2573
|
+
const fe = Math.min((Ee = E.current.getBoundingClientRect().width) != null ? Ee : 0, window.innerWidth), _e = g === "left" || g === "right";
|
|
2574
|
+
if (Math.abs(T) >= (_e ? fe : ee) * u) {
|
|
2575
|
+
Ge(), o == null || o(S, !1);
|
|
2492
2576
|
return;
|
|
2493
2577
|
}
|
|
2494
|
-
|
|
2495
|
-
}
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
}, [
|
|
2501
|
-
|
|
2502
|
-
]), g.useEffect(() => {
|
|
2503
|
-
if (M.current && Q) {
|
|
2504
|
-
var S;
|
|
2505
|
-
const D = M == null || (S = M.current) == null ? void 0 : S.querySelectorAll("*");
|
|
2506
|
-
D == null || D.forEach((k) => {
|
|
2507
|
-
const j = k;
|
|
2508
|
-
(j.scrollHeight > j.clientHeight || j.scrollWidth > j.clientWidth) && j.classList.add("vaul-scrollable");
|
|
2509
|
-
});
|
|
2510
|
-
}
|
|
2511
|
-
}, [
|
|
2512
|
-
Q
|
|
2578
|
+
o == null || o(S, !0), un();
|
|
2579
|
+
}
|
|
2580
|
+
p.useEffect(() => (G && (H(document.documentElement, {
|
|
2581
|
+
scrollBehavior: "auto"
|
|
2582
|
+
}), Me.current = /* @__PURE__ */ new Date()), () => {
|
|
2583
|
+
vl(document.documentElement, "scrollBehavior");
|
|
2584
|
+
}), [
|
|
2585
|
+
G
|
|
2513
2586
|
]);
|
|
2514
|
-
function
|
|
2515
|
-
const
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
overflow: "hidden",
|
|
2523
|
-
...z(p) ? {
|
|
2524
|
-
transform: `scale(${Ie()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
2525
|
-
transformOrigin: "top"
|
|
2526
|
-
} : {
|
|
2527
|
-
transform: `scale(${Ie()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
|
|
2528
|
-
transformOrigin: "left"
|
|
2529
|
-
},
|
|
2530
|
-
transitionProperty: "transform, border-radius",
|
|
2531
|
-
transitionDuration: `${T.DURATION}s`,
|
|
2532
|
-
transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
|
|
2533
|
-
})) : (dt(D, "overflow"), dt(D, "transform"), dt(D, "borderRadius"), I(D, {
|
|
2534
|
-
transitionProperty: "transform, border-radius",
|
|
2535
|
-
transitionDuration: `${T.DURATION}s`,
|
|
2536
|
-
transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
|
|
2537
|
-
})));
|
|
2538
|
-
}
|
|
2539
|
-
function Po(S) {
|
|
2540
|
-
const D = S ? (window.innerWidth - Ne) / window.innerWidth : 1, k = S ? -Ne : 0;
|
|
2541
|
-
me.current && window.clearTimeout(me.current), I(M.current, {
|
|
2542
|
-
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2543
|
-
transform: `scale(${D}) translate3d(0, ${k}px, 0)`
|
|
2544
|
-
}), !S && M.current && (me.current = setTimeout(() => {
|
|
2545
|
-
const j = ft(M.current, p);
|
|
2546
|
-
I(M.current, {
|
|
2587
|
+
function $a(S) {
|
|
2588
|
+
const T = S ? (window.innerWidth - Oe) / window.innerWidth : 1, I = S ? -Oe : 0;
|
|
2589
|
+
re.current && window.clearTimeout(re.current), H(E.current, {
|
|
2590
|
+
transition: `transform ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
|
|
2591
|
+
transform: `scale(${T}) translate3d(0, ${I}px, 0)`
|
|
2592
|
+
}), !S && E.current && (re.current = setTimeout(() => {
|
|
2593
|
+
const N = pt(E.current, g);
|
|
2594
|
+
H(E.current, {
|
|
2547
2595
|
transition: "none",
|
|
2548
|
-
transform:
|
|
2596
|
+
transform: U(g) ? `translate3d(0, ${N}px, 0)` : `translate3d(${N}px, 0, 0)`
|
|
2549
2597
|
});
|
|
2550
2598
|
}, 500));
|
|
2551
2599
|
}
|
|
2552
|
-
function
|
|
2553
|
-
if (
|
|
2554
|
-
const
|
|
2555
|
-
|
|
2556
|
-
transform:
|
|
2600
|
+
function Fa(S, T) {
|
|
2601
|
+
if (T < 0) return;
|
|
2602
|
+
const I = (window.innerWidth - Oe) / window.innerWidth, N = I + T * (1 - I), L = -Oe + T * Oe;
|
|
2603
|
+
H(E.current, {
|
|
2604
|
+
transform: U(g) ? `scale(${N}) translate3d(0, ${L}px, 0)` : `scale(${N}) translate3d(${L}px, 0, 0)`,
|
|
2557
2605
|
transition: "none"
|
|
2558
2606
|
});
|
|
2559
2607
|
}
|
|
2560
|
-
function
|
|
2561
|
-
const
|
|
2562
|
-
|
|
2563
|
-
transition: `transform ${
|
|
2564
|
-
transform:
|
|
2608
|
+
function La(S, T) {
|
|
2609
|
+
const I = U(g) ? window.innerHeight : window.innerWidth, N = T ? (I - Oe) / I : 1, L = T ? -Oe : 0;
|
|
2610
|
+
T && H(E.current, {
|
|
2611
|
+
transition: `transform ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
|
|
2612
|
+
transform: U(g) ? `scale(${N}) translate3d(0, ${L}px, 0)` : `scale(${N}) translate3d(${L}px, 0, 0)`
|
|
2565
2613
|
});
|
|
2566
2614
|
}
|
|
2567
|
-
return
|
|
2568
|
-
|
|
2615
|
+
return p.useEffect(() => {
|
|
2616
|
+
_ || window.requestAnimationFrame(() => {
|
|
2617
|
+
document.body.style.pointerEvents = "auto";
|
|
2618
|
+
});
|
|
2619
|
+
}, [
|
|
2620
|
+
_
|
|
2621
|
+
]), /* @__PURE__ */ p.createElement(as, {
|
|
2622
|
+
defaultOpen: z,
|
|
2569
2623
|
onOpenChange: (S) => {
|
|
2570
|
-
|
|
2571
|
-
t == null || t(S);
|
|
2572
|
-
return;
|
|
2573
|
-
}
|
|
2574
|
-
S ? (te(!0), w(S)) : Ae();
|
|
2624
|
+
!f && !S || (S ? Y(!0) : Ge(!0), te(S));
|
|
2575
2625
|
},
|
|
2576
|
-
open:
|
|
2577
|
-
}, /* @__PURE__ */
|
|
2626
|
+
open: G
|
|
2627
|
+
}, /* @__PURE__ */ p.createElement(oa.Provider, {
|
|
2578
2628
|
value: {
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
overlayRef: U,
|
|
2585
|
-
scaleBackground: ot,
|
|
2629
|
+
activeSnapPoint: Pa,
|
|
2630
|
+
snapPoints: s,
|
|
2631
|
+
setActiveSnapPoint: sn,
|
|
2632
|
+
drawerRef: E,
|
|
2633
|
+
overlayRef: pe,
|
|
2586
2634
|
onOpenChange: t,
|
|
2587
|
-
onPress:
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
handleOnly:
|
|
2593
|
-
isOpen:
|
|
2594
|
-
isDragging:
|
|
2595
|
-
shouldFade:
|
|
2596
|
-
closeDrawer:
|
|
2597
|
-
onNestedDrag:
|
|
2598
|
-
onNestedOpenChange:
|
|
2599
|
-
onNestedRelease:
|
|
2600
|
-
keyboardIsOpen:
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
direction:
|
|
2635
|
+
onPress: Oa,
|
|
2636
|
+
onRelease: ka,
|
|
2637
|
+
onDrag: Ia,
|
|
2638
|
+
dismissible: f,
|
|
2639
|
+
shouldAnimate: nn,
|
|
2640
|
+
handleOnly: c,
|
|
2641
|
+
isOpen: G,
|
|
2642
|
+
isDragging: y,
|
|
2643
|
+
shouldFade: ln,
|
|
2644
|
+
closeDrawer: Ge,
|
|
2645
|
+
onNestedDrag: Fa,
|
|
2646
|
+
onNestedOpenChange: $a,
|
|
2647
|
+
onNestedRelease: La,
|
|
2648
|
+
keyboardIsOpen: Fe,
|
|
2649
|
+
modal: _,
|
|
2650
|
+
snapPointsOffset: Ve,
|
|
2651
|
+
activeSnapPointIndex: Le,
|
|
2652
|
+
direction: g,
|
|
2653
|
+
shouldScaleBackground: i,
|
|
2654
|
+
setBackgroundColorOnScale: l,
|
|
2655
|
+
noBodyStyles: P,
|
|
2656
|
+
container: K,
|
|
2657
|
+
autoFocus: W
|
|
2605
2658
|
}
|
|
2606
2659
|
}, n));
|
|
2607
2660
|
}
|
|
2608
|
-
const
|
|
2609
|
-
const {
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2661
|
+
const ma = /* @__PURE__ */ p.forwardRef(function({ ...e }, t) {
|
|
2662
|
+
const { overlayRef: n, snapPoints: r, onRelease: o, shouldFade: s, isOpen: i, modal: l, shouldAnimate: u } = Qe(), m = la(t, n), f = r && r.length > 0;
|
|
2663
|
+
if (!l)
|
|
2664
|
+
return null;
|
|
2665
|
+
const c = p.useCallback((d) => o(d), [
|
|
2666
|
+
o
|
|
2667
|
+
]);
|
|
2668
|
+
return /* @__PURE__ */ p.createElement(Jo, {
|
|
2669
|
+
onMouseUp: c,
|
|
2670
|
+
ref: m,
|
|
2671
|
+
"data-vaul-overlay": "",
|
|
2672
|
+
"data-vaul-snap-points": i && f ? "true" : "false",
|
|
2673
|
+
"data-vaul-snap-points-overlay": i && s ? "true" : "false",
|
|
2674
|
+
"data-vaul-animate": u != null && u.current ? "true" : "false",
|
|
2675
|
+
...e
|
|
2676
|
+
});
|
|
2677
|
+
});
|
|
2678
|
+
ma.displayName = "Drawer.Overlay";
|
|
2679
|
+
const ga = /* @__PURE__ */ p.forwardRef(function({ onPointerDownOutside: e, style: t, onOpenAutoFocus: n, ...r }, o) {
|
|
2680
|
+
const { drawerRef: s, onPress: i, onRelease: l, onDrag: u, keyboardIsOpen: m, snapPointsOffset: f, activeSnapPointIndex: c, modal: d, isOpen: v, direction: M, snapPoints: C, container: _, handleOnly: R, shouldAnimate: k, autoFocus: P } = Qe(), [g, z] = p.useState(!1), Z = la(o, s), b = p.useRef(null), j = p.useRef(null), D = p.useRef(!1), B = C && C.length > 0;
|
|
2681
|
+
Rl();
|
|
2682
|
+
const K = (x, V, G = 0) => {
|
|
2683
|
+
if (D.current) return !0;
|
|
2684
|
+
const te = Math.abs(x.y), q = Math.abs(x.x), Y = q > te, y = [
|
|
2685
|
+
"bottom",
|
|
2686
|
+
"right"
|
|
2687
|
+
].includes(V) ? 1 : -1;
|
|
2688
|
+
if (V === "left" || V === "right") {
|
|
2689
|
+
if (!(x.x * y < 0) && q >= 0 && q <= G)
|
|
2690
|
+
return Y;
|
|
2691
|
+
} else if (!(x.y * y < 0) && te >= 0 && te <= G)
|
|
2692
|
+
return !Y;
|
|
2693
|
+
return D.current = !0, !0;
|
|
2694
|
+
};
|
|
2695
|
+
p.useEffect(() => {
|
|
2696
|
+
B && window.requestAnimationFrame(() => {
|
|
2697
|
+
z(!0);
|
|
2698
|
+
});
|
|
2699
|
+
}, []);
|
|
2700
|
+
function W(x) {
|
|
2701
|
+
b.current = null, D.current = !1, l(x);
|
|
2702
|
+
}
|
|
2703
|
+
return /* @__PURE__ */ p.createElement(Zo, {
|
|
2704
|
+
"data-vaul-drawer-direction": M,
|
|
2705
|
+
"data-vaul-drawer": "",
|
|
2706
|
+
"data-vaul-delayed-snap-points": g ? "true" : "false",
|
|
2707
|
+
"data-vaul-snap-points": v && B ? "true" : "false",
|
|
2708
|
+
"data-vaul-custom-container": _ ? "true" : "false",
|
|
2709
|
+
"data-vaul-animate": k != null && k.current ? "true" : "false",
|
|
2710
|
+
...r,
|
|
2711
|
+
ref: Z,
|
|
2712
|
+
style: f && f.length > 0 ? {
|
|
2713
|
+
"--snap-point-height": `${f[c ?? 0]}px`,
|
|
2714
|
+
...t
|
|
2715
|
+
} : t,
|
|
2716
|
+
onPointerDown: (x) => {
|
|
2717
|
+
R || (r.onPointerDown == null || r.onPointerDown.call(r, x), b.current = {
|
|
2718
|
+
x: x.pageX,
|
|
2719
|
+
y: x.pageY
|
|
2720
|
+
}, i(x));
|
|
2721
|
+
},
|
|
2722
|
+
onOpenAutoFocus: (x) => {
|
|
2723
|
+
n == null || n(x), P || x.preventDefault();
|
|
2724
|
+
},
|
|
2725
|
+
onPointerDownOutside: (x) => {
|
|
2726
|
+
if (e == null || e(x), !d || x.defaultPrevented) {
|
|
2727
|
+
x.preventDefault();
|
|
2728
|
+
return;
|
|
2729
|
+
}
|
|
2730
|
+
m.current && (m.current = !1);
|
|
2731
|
+
},
|
|
2732
|
+
onFocusOutside: (x) => {
|
|
2733
|
+
if (!d) {
|
|
2734
|
+
x.preventDefault();
|
|
2735
|
+
return;
|
|
2736
|
+
}
|
|
2737
|
+
},
|
|
2738
|
+
onPointerMove: (x) => {
|
|
2739
|
+
if (j.current = x, R || (r.onPointerMove == null || r.onPointerMove.call(r, x), !b.current)) return;
|
|
2740
|
+
const V = x.pageY - b.current.y, G = x.pageX - b.current.x, te = x.pointerType === "touch" ? 10 : 2;
|
|
2741
|
+
K({
|
|
2742
|
+
x: G,
|
|
2743
|
+
y: V
|
|
2744
|
+
}, M, te) ? u(x) : (Math.abs(G) > te || Math.abs(V) > te) && (b.current = null);
|
|
2745
|
+
},
|
|
2746
|
+
onPointerUp: (x) => {
|
|
2747
|
+
r.onPointerUp == null || r.onPointerUp.call(r, x), b.current = null, D.current = !1, l(x);
|
|
2748
|
+
},
|
|
2749
|
+
onPointerOut: (x) => {
|
|
2750
|
+
r.onPointerOut == null || r.onPointerOut.call(r, x), W(j.current);
|
|
2751
|
+
},
|
|
2752
|
+
onContextMenu: (x) => {
|
|
2753
|
+
r.onContextMenu == null || r.onContextMenu.call(r, x), j.current && W(j.current);
|
|
2754
|
+
}
|
|
2755
|
+
});
|
|
2756
|
+
});
|
|
2757
|
+
ga.displayName = "Drawer.Content";
|
|
2758
|
+
const Dl = 250, Pl = 120, va = /* @__PURE__ */ p.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
|
|
2759
|
+
const { closeDrawer: o, isDragging: s, snapPoints: i, activeSnapPoint: l, setActiveSnapPoint: u, dismissible: m, handleOnly: f, isOpen: c, onPress: d, onDrag: v } = Qe(), M = p.useRef(null), C = p.useRef(!1);
|
|
2760
|
+
function _() {
|
|
2761
|
+
if (C.current) {
|
|
2762
|
+
P();
|
|
2613
2763
|
return;
|
|
2614
2764
|
}
|
|
2615
2765
|
window.setTimeout(() => {
|
|
2616
|
-
|
|
2617
|
-
},
|
|
2766
|
+
R();
|
|
2767
|
+
}, Pl);
|
|
2618
2768
|
}
|
|
2619
|
-
function
|
|
2620
|
-
if (
|
|
2621
|
-
|
|
2769
|
+
function R() {
|
|
2770
|
+
if (s || e || C.current) {
|
|
2771
|
+
P();
|
|
2622
2772
|
return;
|
|
2623
2773
|
}
|
|
2624
|
-
if (
|
|
2625
|
-
|
|
2774
|
+
if (P(), !i || i.length === 0) {
|
|
2775
|
+
m || o();
|
|
2626
2776
|
return;
|
|
2627
2777
|
}
|
|
2628
|
-
if (
|
|
2629
|
-
|
|
2778
|
+
if (l === i[i.length - 1] && m) {
|
|
2779
|
+
o();
|
|
2630
2780
|
return;
|
|
2631
2781
|
}
|
|
2632
|
-
const
|
|
2633
|
-
if (
|
|
2634
|
-
const
|
|
2635
|
-
|
|
2636
|
-
}
|
|
2637
|
-
function
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
},
|
|
2641
|
-
}
|
|
2642
|
-
function
|
|
2643
|
-
window.clearTimeout(
|
|
2644
|
-
}
|
|
2645
|
-
return /* @__PURE__ */
|
|
2646
|
-
onClick:
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
onPointerCancel: x,
|
|
2651
|
-
onPointerDown: (p) => {
|
|
2652
|
-
c && d(p), q();
|
|
2782
|
+
const z = i.findIndex((b) => b === l);
|
|
2783
|
+
if (z === -1) return;
|
|
2784
|
+
const Z = i[z + 1];
|
|
2785
|
+
u(Z);
|
|
2786
|
+
}
|
|
2787
|
+
function k() {
|
|
2788
|
+
M.current = window.setTimeout(() => {
|
|
2789
|
+
C.current = !0;
|
|
2790
|
+
}, Dl);
|
|
2791
|
+
}
|
|
2792
|
+
function P() {
|
|
2793
|
+
M.current && window.clearTimeout(M.current), C.current = !1;
|
|
2794
|
+
}
|
|
2795
|
+
return /* @__PURE__ */ p.createElement("div", {
|
|
2796
|
+
onClick: _,
|
|
2797
|
+
onPointerCancel: P,
|
|
2798
|
+
onPointerDown: (g) => {
|
|
2799
|
+
f && d(g), k();
|
|
2653
2800
|
},
|
|
2654
|
-
onPointerMove: (
|
|
2655
|
-
|
|
2801
|
+
onPointerMove: (g) => {
|
|
2802
|
+
f && v(g);
|
|
2656
2803
|
},
|
|
2657
2804
|
// onPointerUp is already handled by the content component
|
|
2658
2805
|
ref: r,
|
|
2659
|
-
"vaul-drawer-visible":
|
|
2660
|
-
"vaul-handle": "",
|
|
2806
|
+
"data-vaul-drawer-visible": c ? "true" : "false",
|
|
2807
|
+
"data-vaul-handle": "",
|
|
2661
2808
|
"aria-hidden": "true",
|
|
2662
2809
|
...n
|
|
2663
|
-
}, /* @__PURE__ */
|
|
2664
|
-
"vaul-handle-hitarea": "",
|
|
2810
|
+
}, /* @__PURE__ */ p.createElement("span", {
|
|
2811
|
+
"data-vaul-handle-hitarea": "",
|
|
2665
2812
|
"aria-hidden": "true"
|
|
2666
2813
|
}, t));
|
|
2667
2814
|
});
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
const {
|
|
2671
|
-
return /* @__PURE__ */ g.createElement(Ka, {
|
|
2672
|
-
onMouseUp: s,
|
|
2673
|
-
ref: v,
|
|
2674
|
-
"vaul-drawer-visible": u ? "true" : "false",
|
|
2675
|
-
"vaul-overlay": "",
|
|
2676
|
-
"vaul-snap-points": l && m ? "true" : "false",
|
|
2677
|
-
"vaul-snap-points-overlay": l && i ? "true" : "false",
|
|
2678
|
-
...t
|
|
2679
|
-
});
|
|
2680
|
-
});
|
|
2681
|
-
co.displayName = "Drawer.Overlay";
|
|
2682
|
-
const uo = /* @__PURE__ */ g.forwardRef(function({ onOpenAutoFocus: e, onPointerDownOutside: t, onAnimationEnd: n, style: r, ...a }, s) {
|
|
2683
|
-
const { drawerRef: i, onPress: l, onRelease: u, onDrag: v, dismissible: m, keyboardIsOpen: c, snapPointsOffset: d, visible: f, closeDrawer: y, modal: R, openProp: K, onOpenChange: H, setVisible: q, handleOnly: x, direction: p } = wt(), C = ro(s, i), N = g.useRef(null), P = g.useRef(!1), _ = (w, L, te = 0) => {
|
|
2684
|
-
if (P.current) return !0;
|
|
2685
|
-
const Q = Math.abs(w.y), V = Math.abs(w.x), X = V > Q, Oe = [
|
|
2686
|
-
"bottom",
|
|
2687
|
-
"right"
|
|
2688
|
-
].includes(L) ? 1 : -1;
|
|
2689
|
-
if (L === "left" || L === "right") {
|
|
2690
|
-
if (!(w.x * Oe < 0) && V >= 0 && V <= te)
|
|
2691
|
-
return X;
|
|
2692
|
-
} else if (!(w.y * Oe < 0) && Q >= 0 && Q <= te)
|
|
2693
|
-
return !X;
|
|
2694
|
-
return P.current = !0, !0;
|
|
2695
|
-
};
|
|
2696
|
-
return g.useEffect(() => {
|
|
2697
|
-
q(!0);
|
|
2698
|
-
}, []), /* @__PURE__ */ g.createElement(Va, {
|
|
2699
|
-
"vaul-drawer": "",
|
|
2700
|
-
"vaul-drawer-direction": p,
|
|
2701
|
-
"vaul-drawer-visible": f ? "true" : "false",
|
|
2702
|
-
...a,
|
|
2703
|
-
ref: C,
|
|
2704
|
-
style: d && d.length > 0 ? {
|
|
2705
|
-
"--snap-point-height": `${d[0]}px`,
|
|
2706
|
-
...r
|
|
2707
|
-
} : r,
|
|
2708
|
-
onOpenAutoFocus: (w) => {
|
|
2709
|
-
if (e)
|
|
2710
|
-
e(w);
|
|
2711
|
-
else {
|
|
2712
|
-
var L;
|
|
2713
|
-
w.preventDefault(), (L = i.current) == null || L.focus();
|
|
2714
|
-
}
|
|
2715
|
-
},
|
|
2716
|
-
onPointerDown: (w) => {
|
|
2717
|
-
x || (a.onPointerDown == null || a.onPointerDown.call(a, w), N.current = {
|
|
2718
|
-
x: w.clientX,
|
|
2719
|
-
y: w.clientY
|
|
2720
|
-
}, l(w));
|
|
2721
|
-
},
|
|
2722
|
-
onPointerDownOutside: (w) => {
|
|
2723
|
-
if (t == null || t(w), !R || w.defaultPrevented) {
|
|
2724
|
-
w.preventDefault();
|
|
2725
|
-
return;
|
|
2726
|
-
}
|
|
2727
|
-
c.current && (c.current = !1), w.preventDefault(), H == null || H(!1), !(!m || K !== void 0) && y();
|
|
2728
|
-
},
|
|
2729
|
-
onFocusOutside: (w) => {
|
|
2730
|
-
if (!R) {
|
|
2731
|
-
w.preventDefault();
|
|
2732
|
-
return;
|
|
2733
|
-
}
|
|
2734
|
-
},
|
|
2735
|
-
onEscapeKeyDown: (w) => {
|
|
2736
|
-
if (!R) {
|
|
2737
|
-
w.preventDefault();
|
|
2738
|
-
return;
|
|
2739
|
-
}
|
|
2740
|
-
},
|
|
2741
|
-
onPointerMove: (w) => {
|
|
2742
|
-
if (x || (a.onPointerMove == null || a.onPointerMove.call(a, w), !N.current)) return;
|
|
2743
|
-
const L = w.clientY - N.current.y, te = w.clientX - N.current.x, Q = w.pointerType === "touch" ? 10 : 2;
|
|
2744
|
-
_({
|
|
2745
|
-
x: te,
|
|
2746
|
-
y: L
|
|
2747
|
-
}, p, Q) ? v(w) : (Math.abs(te) > Q || Math.abs(L) > Q) && (N.current = null);
|
|
2748
|
-
},
|
|
2749
|
-
onPointerUp: (w) => {
|
|
2750
|
-
a.onPointerUp == null || a.onPointerUp.call(a, w), N.current = null, P.current = !1, u(w);
|
|
2751
|
-
}
|
|
2752
|
-
});
|
|
2753
|
-
});
|
|
2754
|
-
uo.displayName = "Drawer.Content";
|
|
2755
|
-
function vl({ onDrag: e, onOpenChange: t, ...n }) {
|
|
2756
|
-
const { onNestedDrag: r, onNestedOpenChange: a, onNestedRelease: s } = wt();
|
|
2815
|
+
va.displayName = "Drawer.Handle";
|
|
2816
|
+
function jl({ onDrag: e, onOpenChange: t, ...n }) {
|
|
2817
|
+
const { onNestedDrag: r, onNestedOpenChange: o, onNestedRelease: s } = Qe();
|
|
2757
2818
|
if (!r)
|
|
2758
2819
|
throw new Error("Drawer.NestedRoot must be placed in another drawer");
|
|
2759
|
-
return /* @__PURE__ */
|
|
2820
|
+
return /* @__PURE__ */ p.createElement(pa, {
|
|
2760
2821
|
nested: !0,
|
|
2761
2822
|
onClose: () => {
|
|
2762
|
-
|
|
2823
|
+
o(!1);
|
|
2763
2824
|
},
|
|
2764
2825
|
onDrag: (i, l) => {
|
|
2765
2826
|
r(i, l), e == null || e(i, l);
|
|
2766
2827
|
},
|
|
2767
2828
|
onOpenChange: (i) => {
|
|
2768
|
-
i &&
|
|
2829
|
+
i && o(i);
|
|
2769
2830
|
},
|
|
2770
2831
|
onRelease: s,
|
|
2771
2832
|
...n
|
|
2772
2833
|
});
|
|
2773
2834
|
}
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2835
|
+
function Nl(e) {
|
|
2836
|
+
const t = Qe(), { container: n = t.container, ...r } = e;
|
|
2837
|
+
return /* @__PURE__ */ p.createElement(os, {
|
|
2838
|
+
container: n,
|
|
2839
|
+
...r
|
|
2840
|
+
});
|
|
2841
|
+
}
|
|
2842
|
+
const he = {
|
|
2843
|
+
Root: pa,
|
|
2844
|
+
NestedRoot: jl,
|
|
2845
|
+
Content: ga,
|
|
2846
|
+
Overlay: ma,
|
|
2847
|
+
Trigger: es,
|
|
2848
|
+
Portal: Nl,
|
|
2849
|
+
Handle: va,
|
|
2850
|
+
Close: ts,
|
|
2851
|
+
Title: ns,
|
|
2852
|
+
Description: rs
|
|
2853
|
+
}, Zt = ({
|
|
2786
2854
|
shouldScaleBackground: e = !0,
|
|
2787
2855
|
...t
|
|
2788
|
-
}) => /* @__PURE__ */
|
|
2789
|
-
|
|
2856
|
+
}) => /* @__PURE__ */ a.jsx(
|
|
2857
|
+
he.Root,
|
|
2790
2858
|
{
|
|
2791
2859
|
shouldScaleBackground: e,
|
|
2792
2860
|
...t
|
|
2793
2861
|
}
|
|
2794
2862
|
);
|
|
2795
|
-
|
|
2796
|
-
const
|
|
2797
|
-
|
|
2863
|
+
Zt.displayName = "Drawer";
|
|
2864
|
+
const wa = he.Trigger, Tl = he.Portal, _l = he.Close, xa = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
2865
|
+
he.Overlay,
|
|
2798
2866
|
{
|
|
2799
2867
|
ref: n,
|
|
2800
2868
|
className: O("fixed inset-0 z-50 bg-black/80", e),
|
|
2801
2869
|
...t
|
|
2802
2870
|
}
|
|
2803
2871
|
));
|
|
2804
|
-
|
|
2805
|
-
const
|
|
2806
|
-
/* @__PURE__ */
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2872
|
+
xa.displayName = he.Overlay.displayName;
|
|
2873
|
+
const en = h.forwardRef(
|
|
2874
|
+
({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ a.jsxs(Tl, { children: [
|
|
2875
|
+
/* @__PURE__ */ a.jsx(xa, {}),
|
|
2876
|
+
/* @__PURE__ */ a.jsxs(
|
|
2877
|
+
he.Content,
|
|
2878
|
+
{
|
|
2879
|
+
ref: o,
|
|
2880
|
+
className: O(
|
|
2881
|
+
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
2882
|
+
e
|
|
2883
|
+
),
|
|
2884
|
+
...r,
|
|
2885
|
+
children: [
|
|
2886
|
+
!n && /* @__PURE__ */ a.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
2887
|
+
t
|
|
2888
|
+
]
|
|
2889
|
+
}
|
|
2890
|
+
)
|
|
2891
|
+
] })
|
|
2892
|
+
);
|
|
2893
|
+
en.displayName = "DrawerContent";
|
|
2894
|
+
const tn = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
2895
|
+
he.Title,
|
|
2826
2896
|
{
|
|
2827
2897
|
ref: n,
|
|
2828
2898
|
className: O(
|
|
@@ -2832,45 +2902,19 @@ const Zt = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
|
2832
2902
|
...t
|
|
2833
2903
|
}
|
|
2834
2904
|
));
|
|
2835
|
-
|
|
2836
|
-
const
|
|
2837
|
-
|
|
2905
|
+
tn.displayName = he.Title.displayName;
|
|
2906
|
+
const Ol = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
2907
|
+
he.Description,
|
|
2838
2908
|
{
|
|
2839
2909
|
ref: n,
|
|
2840
2910
|
className: O("text-sm text-muted-foreground", e),
|
|
2841
2911
|
...t
|
|
2842
2912
|
}
|
|
2843
2913
|
));
|
|
2844
|
-
|
|
2845
|
-
const
|
|
2846
|
-
const
|
|
2847
|
-
|
|
2848
|
-
/* @__PURE__ */ o.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ o.jsx(fo, { className: "lg:hidden", children: /* @__PURE__ */ o.jsx(ka, { size: 22 }) }) }),
|
|
2849
|
-
/* @__PURE__ */ o.jsxs(
|
|
2850
|
-
Jt,
|
|
2851
|
-
{
|
|
2852
|
-
className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none",
|
|
2853
|
-
"aria-describedby": void 0,
|
|
2854
|
-
children: [
|
|
2855
|
-
/* @__PURE__ */ o.jsx(In, { children: /* @__PURE__ */ o.jsx(Zt, { children: "Navigation" }) }),
|
|
2856
|
-
/* @__PURE__ */ o.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: e.map((t) => /* @__PURE__ */ o.jsx("li", { children: /* @__PURE__ */ o.jsx(
|
|
2857
|
-
We,
|
|
2858
|
-
{
|
|
2859
|
-
className: ({ isActive: n }) => An(
|
|
2860
|
-
"block font-medium border-b-2",
|
|
2861
|
-
n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
2862
|
-
),
|
|
2863
|
-
to: t.id,
|
|
2864
|
-
children: /* @__PURE__ */ o.jsx(bl, { children: t.label })
|
|
2865
|
-
}
|
|
2866
|
-
) }, t.label)) })
|
|
2867
|
-
]
|
|
2868
|
-
}
|
|
2869
|
-
)
|
|
2870
|
-
] });
|
|
2871
|
-
}, Ml = () => {
|
|
2872
|
-
const e = Ue(), [t, n] = Te(!1), r = Ln(() => n(!1), []);
|
|
2873
|
-
be(() => {
|
|
2914
|
+
Ol.displayName = he.Description.displayName;
|
|
2915
|
+
const ya = () => {
|
|
2916
|
+
const e = qe(), [t, n] = Ie(!1), r = qn(() => n(!1), []);
|
|
2917
|
+
Ce(() => {
|
|
2874
2918
|
if (t)
|
|
2875
2919
|
return;
|
|
2876
2920
|
function s(i) {
|
|
@@ -2880,34 +2924,61 @@ const yl = () => {
|
|
|
2880
2924
|
window.removeEventListener("keydown", s);
|
|
2881
2925
|
};
|
|
2882
2926
|
}, [t, n]);
|
|
2883
|
-
const
|
|
2884
|
-
return
|
|
2885
|
-
/* @__PURE__ */
|
|
2927
|
+
const o = e.plugins.find(As);
|
|
2928
|
+
return o ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2929
|
+
/* @__PURE__ */ a.jsxs(
|
|
2886
2930
|
"button",
|
|
2887
2931
|
{
|
|
2888
2932
|
type: "button",
|
|
2889
2933
|
onClick: () => n(!0),
|
|
2890
|
-
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-
|
|
2934
|
+
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",
|
|
2891
2935
|
children: [
|
|
2892
|
-
/* @__PURE__ */
|
|
2893
|
-
/* @__PURE__ */
|
|
2936
|
+
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
2937
|
+
/* @__PURE__ */ a.jsx(Ko, { size: 14 }),
|
|
2894
2938
|
"Search"
|
|
2895
2939
|
] }),
|
|
2896
|
-
/* @__PURE__ */
|
|
2940
|
+
/* @__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" })
|
|
2897
2941
|
]
|
|
2898
2942
|
}
|
|
2899
2943
|
),
|
|
2900
|
-
/* @__PURE__ */
|
|
2944
|
+
/* @__PURE__ */ a.jsx(Qn, { fallback: null, children: o.renderSearch({
|
|
2901
2945
|
isOpen: t,
|
|
2902
2946
|
onClose: r
|
|
2903
2947
|
}) })
|
|
2904
2948
|
] }) : null;
|
|
2905
|
-
},
|
|
2906
|
-
const { topNavigation: e } =
|
|
2907
|
-
return
|
|
2908
|
-
|
|
2949
|
+
}, Il = () => {
|
|
2950
|
+
const { topNavigation: e } = qe();
|
|
2951
|
+
return /* @__PURE__ */ a.jsxs(Zt, { direction: "right", children: [
|
|
2952
|
+
/* @__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 }) }) }),
|
|
2953
|
+
/* @__PURE__ */ a.jsxs(
|
|
2954
|
+
en,
|
|
2955
|
+
{
|
|
2956
|
+
className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none",
|
|
2957
|
+
"aria-describedby": void 0,
|
|
2958
|
+
children: [
|
|
2959
|
+
/* @__PURE__ */ a.jsx(Hn, { children: /* @__PURE__ */ a.jsx(tn, { children: "Navigation" }) }),
|
|
2960
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(ya, {}) }),
|
|
2961
|
+
/* @__PURE__ */ a.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: e.map((t) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
2962
|
+
Ze,
|
|
2963
|
+
{
|
|
2964
|
+
className: ({ isActive: n }) => Un(
|
|
2965
|
+
"block font-medium border-b-2",
|
|
2966
|
+
n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
2967
|
+
),
|
|
2968
|
+
to: t.id,
|
|
2969
|
+
children: /* @__PURE__ */ a.jsx(_l, { children: t.label })
|
|
2970
|
+
}
|
|
2971
|
+
) }, t.label)) })
|
|
2972
|
+
]
|
|
2973
|
+
}
|
|
2974
|
+
)
|
|
2975
|
+
] });
|
|
2976
|
+
}, Al = () => {
|
|
2977
|
+
const { topNavigation: e } = qe();
|
|
2978
|
+
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(
|
|
2979
|
+
Ze,
|
|
2909
2980
|
{
|
|
2910
|
-
className: ({ isActive: n }) =>
|
|
2981
|
+
className: ({ isActive: n }) => Un(
|
|
2911
2982
|
"block py-3.5 font-medium -mb-px border-b-2",
|
|
2912
2983
|
n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
2913
2984
|
),
|
|
@@ -2915,21 +2986,21 @@ const yl = () => {
|
|
|
2915
2986
|
children: t.label
|
|
2916
2987
|
}
|
|
2917
2988
|
) }, t.label)) }) });
|
|
2918
|
-
},
|
|
2919
|
-
/* @__PURE__ */
|
|
2920
|
-
/* @__PURE__ */
|
|
2989
|
+
}, ba = ({ item: e }) => e.children ? /* @__PURE__ */ a.jsxs(el, { children: [
|
|
2990
|
+
/* @__PURE__ */ a.jsx(Zr, { children: e.label }),
|
|
2991
|
+
/* @__PURE__ */ a.jsx(Zi, { children: /* @__PURE__ */ a.jsx(ea, { children: e.children.map((t, n) => (
|
|
2921
2992
|
// eslint-disable-next-line react/no-array-index-key
|
|
2922
|
-
/* @__PURE__ */
|
|
2993
|
+
/* @__PURE__ */ a.jsx(ba, { item: t }, n)
|
|
2923
2994
|
)) }) })
|
|
2924
|
-
] }, e.label) : /* @__PURE__ */
|
|
2925
|
-
const t =
|
|
2926
|
-
return /* @__PURE__ */
|
|
2927
|
-
/* @__PURE__ */
|
|
2928
|
-
/* @__PURE__ */
|
|
2929
|
-
/* @__PURE__ */
|
|
2930
|
-
/* @__PURE__ */
|
|
2931
|
-
(u == null ? void 0 : u.logo) && /* @__PURE__ */
|
|
2932
|
-
/* @__PURE__ */
|
|
2995
|
+
] }, e.label) : /* @__PURE__ */ a.jsx(At, { to: e.path ?? "", children: /* @__PURE__ */ a.jsx(na, { children: e.label }, e.label) }), Sa = Vn(function() {
|
|
2996
|
+
const t = pn(), [n, r] = po(), { isAuthenticated: o, profile: s, isAuthEnabled: i } = pn(), l = qe(), { page: u, plugins: m } = l, f = m.filter((d) => Os(d)).flatMap((d) => d.getProfileMenuItems(l)).map((d) => /* @__PURE__ */ a.jsx(ba, { item: d }, d.label)), c = n ? Qo : Vo;
|
|
2997
|
+
return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
|
|
2998
|
+
/* @__PURE__ */ a.jsx(rl, {}),
|
|
2999
|
+
/* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
3000
|
+
/* @__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: [
|
|
3001
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(At, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
3002
|
+
(u == null ? void 0 : u.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3003
|
+
/* @__PURE__ */ a.jsx(
|
|
2933
3004
|
"img",
|
|
2934
3005
|
{
|
|
2935
3006
|
src: u.logo.src.light,
|
|
@@ -2939,7 +3010,7 @@ const yl = () => {
|
|
|
2939
3010
|
loading: "lazy"
|
|
2940
3011
|
}
|
|
2941
3012
|
),
|
|
2942
|
-
/* @__PURE__ */
|
|
3013
|
+
/* @__PURE__ */ a.jsx(
|
|
2943
3014
|
"img",
|
|
2944
3015
|
{
|
|
2945
3016
|
src: u.logo.src.dark,
|
|
@@ -2950,192 +3021,194 @@ const yl = () => {
|
|
|
2950
3021
|
}
|
|
2951
3022
|
)
|
|
2952
3023
|
] }),
|
|
2953
|
-
/* @__PURE__ */
|
|
3024
|
+
/* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: u == null ? void 0 : u.pageTitle })
|
|
2954
3025
|
] }) }) }),
|
|
2955
|
-
/* @__PURE__ */
|
|
2956
|
-
/* @__PURE__ */
|
|
2957
|
-
/* @__PURE__ */
|
|
2958
|
-
/* @__PURE__ */
|
|
2959
|
-
/* @__PURE__ */
|
|
2960
|
-
i && !
|
|
2961
|
-
/* @__PURE__ */
|
|
2962
|
-
/* @__PURE__ */
|
|
2963
|
-
/* @__PURE__ */
|
|
2964
|
-
/* @__PURE__ */
|
|
2965
|
-
|
|
3026
|
+
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
3027
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(ya, {}) }),
|
|
3028
|
+
/* @__PURE__ */ a.jsx(Il, {}),
|
|
3029
|
+
/* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
|
|
3030
|
+
/* @__PURE__ */ a.jsx(xe, { name: "head-navigation-start" }),
|
|
3031
|
+
i && !o ? /* @__PURE__ */ a.jsx(Pt, { variant: "ghost", onClick: () => t.login(), children: "Login" }) : f.length > 0 && /* @__PURE__ */ a.jsxs(Xi, { modal: !1, children: [
|
|
3032
|
+
/* @__PURE__ */ a.jsx(Ji, { asChild: !0, children: /* @__PURE__ */ a.jsx(Pt, { variant: "ghost", children: s != null && s.email ? `${s.email}` : "My Account" }) }),
|
|
3033
|
+
/* @__PURE__ */ a.jsxs(ta, { className: "w-56", children: [
|
|
3034
|
+
/* @__PURE__ */ a.jsx(ra, { children: "My Account" }),
|
|
3035
|
+
/* @__PURE__ */ a.jsx(aa, {}),
|
|
3036
|
+
f
|
|
2966
3037
|
] })
|
|
2967
3038
|
] }),
|
|
2968
|
-
/* @__PURE__ */
|
|
3039
|
+
/* @__PURE__ */ a.jsx(
|
|
2969
3040
|
"button",
|
|
2970
3041
|
{
|
|
2971
3042
|
type: "button",
|
|
2972
3043
|
"aria-label": n ? "Switch to light mode" : "Switch to dark mode",
|
|
2973
3044
|
className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
|
|
2974
3045
|
onClick: r,
|
|
2975
|
-
children: /* @__PURE__ */
|
|
3046
|
+
children: /* @__PURE__ */ a.jsx(c, { size: 18 })
|
|
2976
3047
|
}
|
|
2977
3048
|
),
|
|
2978
|
-
/* @__PURE__ */
|
|
3049
|
+
/* @__PURE__ */ a.jsx(xe, { name: "head-navigation-end" })
|
|
2979
3050
|
] })
|
|
2980
3051
|
] })
|
|
2981
3052
|
] }),
|
|
2982
|
-
/* @__PURE__ */
|
|
3053
|
+
/* @__PURE__ */ a.jsx(xe, { name: "top-navigation-before" }),
|
|
3054
|
+
/* @__PURE__ */ a.jsx(Al, {}),
|
|
3055
|
+
/* @__PURE__ */ a.jsx(xe, { name: "top-navigation-after" })
|
|
2983
3056
|
] })
|
|
2984
3057
|
] });
|
|
2985
|
-
}),
|
|
2986
|
-
Header:
|
|
2987
|
-
},
|
|
2988
|
-
const [t, n] =
|
|
2989
|
-
|
|
3058
|
+
}), Ca = {
|
|
3059
|
+
Header: Sa
|
|
3060
|
+
}, kl = Kn(Ca), $l = kl.Provider, Fl = (e) => {
|
|
3061
|
+
const [t, n] = Ie(!1);
|
|
3062
|
+
Ce(() => {
|
|
2990
3063
|
const s = localStorage.getItem("theme"), i = window.matchMedia("(prefers-color-scheme: dark)"), l = s === "dark" || !s && i.matches;
|
|
2991
3064
|
n(l);
|
|
2992
3065
|
}, [t]);
|
|
2993
|
-
const r =
|
|
3066
|
+
const r = qn(() => {
|
|
2994
3067
|
const s = !t;
|
|
2995
3068
|
document.documentElement.classList.toggle("dark", s), localStorage.setItem("theme", s ? "dark" : "light"), n(s);
|
|
2996
|
-
}, [t]),
|
|
2997
|
-
return /* @__PURE__ */
|
|
2998
|
-
},
|
|
3069
|
+
}, [t]), o = [t, r];
|
|
3070
|
+
return /* @__PURE__ */ a.jsx(mo.Provider, { value: o, ...e });
|
|
3071
|
+
}, Ll = ({
|
|
2999
3072
|
children: e,
|
|
3000
3073
|
context: t
|
|
3001
|
-
}) => (
|
|
3074
|
+
}) => ($o({
|
|
3002
3075
|
queryFn: async () => (await t.initialize(), !0),
|
|
3003
3076
|
queryKey: ["zudoku-initialize"]
|
|
3004
|
-
}), /* @__PURE__ */
|
|
3077
|
+
}), /* @__PURE__ */ a.jsx(Fo.Provider, { value: t, children: e })), Bl = ({
|
|
3005
3078
|
children: e,
|
|
3006
3079
|
...t
|
|
3007
3080
|
}) => {
|
|
3008
3081
|
var c, d;
|
|
3009
|
-
const n =
|
|
3010
|
-
() => ({ ...
|
|
3082
|
+
const n = mt(
|
|
3083
|
+
() => ({ ...Ca, ...t.overrides }),
|
|
3011
3084
|
[t.overrides]
|
|
3012
|
-
), r =
|
|
3013
|
-
var
|
|
3085
|
+
), r = mt(() => {
|
|
3086
|
+
var M;
|
|
3014
3087
|
return {
|
|
3015
|
-
...(t.plugins ?? []).filter(
|
|
3016
|
-
(
|
|
3017
|
-
).reduce((
|
|
3018
|
-
...
|
|
3019
|
-
...(
|
|
3088
|
+
...(t.plugins ?? []).filter(Fs).flatMap(
|
|
3089
|
+
(C) => C.getMdxComponents ? [C.getMdxComponents()] : []
|
|
3090
|
+
).reduce((C, _) => ({ ...C, ..._ }), {}),
|
|
3091
|
+
...go,
|
|
3092
|
+
...(M = t.mdx) == null ? void 0 : M.components
|
|
3020
3093
|
};
|
|
3021
|
-
}, [(c = t.mdx) == null ? void 0 : c.components, t.plugins]), { stagger:
|
|
3022
|
-
() => s ? { stagger: !0 } : { stagger:
|
|
3023
|
-
[
|
|
3024
|
-
), u =
|
|
3025
|
-
|
|
3094
|
+
}, [(c = t.mdx) == null ? void 0 : c.components, t.plugins]), { stagger: o } = Co(jt), [s, i] = Ie(!1), l = mt(
|
|
3095
|
+
() => s ? { stagger: !0 } : { stagger: o },
|
|
3096
|
+
[o, s]
|
|
3097
|
+
), u = Wa();
|
|
3098
|
+
Ce(() => {
|
|
3026
3099
|
s || i(!0);
|
|
3027
3100
|
}, [s, u.location]);
|
|
3028
|
-
const [
|
|
3029
|
-
var
|
|
3030
|
-
return /* @__PURE__ */
|
|
3101
|
+
const [m] = Ie(() => new Bs(t)), f = (d = t.plugins) == null ? void 0 : d.filter($s).map((v, M) => {
|
|
3102
|
+
var C;
|
|
3103
|
+
return /* @__PURE__ */ a.jsx(Mo, { children: (C = v.getHead) == null ? void 0 : C.call(v) }, M);
|
|
3031
3104
|
});
|
|
3032
|
-
return /* @__PURE__ */
|
|
3033
|
-
/* @__PURE__ */
|
|
3034
|
-
/* @__PURE__ */
|
|
3105
|
+
return /* @__PURE__ */ a.jsxs(Lo, { client: nr, children: [
|
|
3106
|
+
/* @__PURE__ */ a.jsx(It, { children: f }),
|
|
3107
|
+
/* @__PURE__ */ a.jsx(jt.Provider, { value: l, children: /* @__PURE__ */ a.jsx(Ll, { context: m, children: /* @__PURE__ */ a.jsx(Ua, { components: r, children: /* @__PURE__ */ a.jsx(Fl, { children: /* @__PURE__ */ a.jsx($l, { value: n, children: /* @__PURE__ */ a.jsx(Xa, { slotlets: t.slotlets, children: /* @__PURE__ */ a.jsx(vo, { children: e ?? /* @__PURE__ */ a.jsx(In, {}) }) }) }) }) }) }) })
|
|
3035
3108
|
] });
|
|
3036
|
-
},
|
|
3037
|
-
|
|
3038
|
-
const
|
|
3109
|
+
}, Hl = Vn(Bl), Ma = (e) => /* @__PURE__ */ a.jsx(Ts, { FallbackComponent: Hs, children: /* @__PURE__ */ a.jsx(Hl, { ...e }) });
|
|
3110
|
+
Ma.displayName = "DevPortal";
|
|
3111
|
+
const Ul = ({
|
|
3039
3112
|
category: e,
|
|
3040
3113
|
level: t
|
|
3041
3114
|
}) => {
|
|
3042
3115
|
var d;
|
|
3043
|
-
const n =
|
|
3044
|
-
|
|
3045
|
-
r &&
|
|
3116
|
+
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);
|
|
3117
|
+
Ce(() => {
|
|
3118
|
+
r && f(!0);
|
|
3046
3119
|
}, [r]);
|
|
3047
|
-
const c = i && /* @__PURE__ */
|
|
3120
|
+
const c = i && /* @__PURE__ */ a.jsx(
|
|
3048
3121
|
"button",
|
|
3049
3122
|
{
|
|
3050
3123
|
type: "button",
|
|
3051
|
-
onClick: (
|
|
3052
|
-
|
|
3124
|
+
onClick: (v) => {
|
|
3125
|
+
v.preventDefault(), f((M) => !M), s(!0);
|
|
3053
3126
|
},
|
|
3054
|
-
children: /* @__PURE__ */
|
|
3055
|
-
|
|
3127
|
+
children: /* @__PURE__ */ a.jsx(
|
|
3128
|
+
Xn,
|
|
3056
3129
|
{
|
|
3057
3130
|
size: 16,
|
|
3058
3131
|
className: O(
|
|
3059
|
-
|
|
3132
|
+
o && "transition",
|
|
3060
3133
|
"shrink-0 group-data-[state=open]:rotate-90"
|
|
3061
3134
|
)
|
|
3062
3135
|
}
|
|
3063
3136
|
)
|
|
3064
3137
|
}
|
|
3065
3138
|
);
|
|
3066
|
-
return /* @__PURE__ */
|
|
3067
|
-
|
|
3139
|
+
return /* @__PURE__ */ a.jsxs(
|
|
3140
|
+
Do,
|
|
3068
3141
|
{
|
|
3069
3142
|
className: O("flex flex-col", t === 0 && "-mx-[--padding-nav-item]"),
|
|
3070
3143
|
defaultOpen: u,
|
|
3071
|
-
open:
|
|
3072
|
-
onOpenChange: () =>
|
|
3144
|
+
open: m,
|
|
3145
|
+
onOpenChange: () => f(!0),
|
|
3073
3146
|
children: [
|
|
3074
|
-
/* @__PURE__ */
|
|
3147
|
+
/* @__PURE__ */ a.jsx(Po, { className: "group", asChild: !0, disabled: !i, children: /* @__PURE__ */ a.jsxs(
|
|
3075
3148
|
"div",
|
|
3076
3149
|
{
|
|
3077
3150
|
className: O(
|
|
3078
3151
|
"text-start",
|
|
3079
|
-
|
|
3152
|
+
Je({ isActive: !1, isTopLevel: t === 0 }),
|
|
3080
3153
|
i ? "cursor-pointer" : "cursor-default hover:bg-transparent"
|
|
3081
3154
|
),
|
|
3082
3155
|
children: [
|
|
3083
|
-
e.icon && /* @__PURE__ */
|
|
3156
|
+
e.icon && /* @__PURE__ */ a.jsx(
|
|
3084
3157
|
e.icon,
|
|
3085
3158
|
{
|
|
3086
3159
|
size: 16,
|
|
3087
3160
|
className: "align-[-0.125em] -translate-x-1"
|
|
3088
3161
|
}
|
|
3089
3162
|
),
|
|
3090
|
-
((d = e.link) == null ? void 0 : d.type) === "doc" ? /* @__PURE__ */
|
|
3091
|
-
|
|
3163
|
+
((d = e.link) == null ? void 0 : d.type) === "doc" ? /* @__PURE__ */ a.jsx(
|
|
3164
|
+
Ze,
|
|
3092
3165
|
{
|
|
3093
|
-
to:
|
|
3166
|
+
to: Ht(n == null ? void 0 : n.id, e.link.id),
|
|
3094
3167
|
className: "flex-1",
|
|
3095
3168
|
onClick: () => s(!0),
|
|
3096
|
-
children: ({ isActive:
|
|
3169
|
+
children: ({ isActive: v }) => /* @__PURE__ */ a.jsxs(
|
|
3097
3170
|
"div",
|
|
3098
3171
|
{
|
|
3099
3172
|
className: O(
|
|
3100
3173
|
"flex items-center gap-2 justify-between w-full",
|
|
3101
|
-
|
|
3174
|
+
v ? "text-primary font-medium" : "text-foreground/80"
|
|
3102
3175
|
),
|
|
3103
3176
|
children: [
|
|
3104
|
-
/* @__PURE__ */
|
|
3177
|
+
/* @__PURE__ */ a.jsx("div", { className: "truncate", children: e.label }),
|
|
3105
3178
|
c
|
|
3106
3179
|
]
|
|
3107
3180
|
}
|
|
3108
3181
|
)
|
|
3109
3182
|
}
|
|
3110
|
-
) : /* @__PURE__ */
|
|
3111
|
-
/* @__PURE__ */
|
|
3183
|
+
) : /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full", children: [
|
|
3184
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
|
|
3112
3185
|
c
|
|
3113
3186
|
] })
|
|
3114
3187
|
]
|
|
3115
3188
|
}
|
|
3116
3189
|
) }),
|
|
3117
|
-
/* @__PURE__ */
|
|
3118
|
-
|
|
3190
|
+
/* @__PURE__ */ a.jsx(
|
|
3191
|
+
jo,
|
|
3119
3192
|
{
|
|
3120
3193
|
className: O(
|
|
3121
3194
|
// CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
|
|
3122
|
-
|
|
3195
|
+
o && "CollapsibleContent",
|
|
3123
3196
|
"ms-[calc(var(--padding-nav-item)*1.125)]"
|
|
3124
3197
|
),
|
|
3125
|
-
children: /* @__PURE__ */
|
|
3126
|
-
|
|
3198
|
+
children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ps-2", children: e.items.map((v) => /* @__PURE__ */ a.jsx(
|
|
3199
|
+
Ot,
|
|
3127
3200
|
{
|
|
3128
3201
|
level: t + 1,
|
|
3129
|
-
item:
|
|
3202
|
+
item: v
|
|
3130
3203
|
},
|
|
3131
|
-
("id" in
|
|
3204
|
+
("id" in v ? v.id : "") + ("href" in v ? v.href : "") + v.label
|
|
3132
3205
|
)) })
|
|
3133
3206
|
}
|
|
3134
3207
|
)
|
|
3135
3208
|
]
|
|
3136
3209
|
}
|
|
3137
3210
|
);
|
|
3138
|
-
},
|
|
3211
|
+
}, Je = wo(
|
|
3139
3212
|
"flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
3140
3213
|
{
|
|
3141
3214
|
variants: {
|
|
@@ -3152,102 +3225,102 @@ const Pl = ({
|
|
|
3152
3225
|
}
|
|
3153
3226
|
}
|
|
3154
3227
|
}
|
|
3155
|
-
),
|
|
3228
|
+
), Ra = "data-anchor", Ot = ({
|
|
3156
3229
|
item: e,
|
|
3157
3230
|
level: t = 0
|
|
3158
3231
|
}) => {
|
|
3159
|
-
const n =
|
|
3232
|
+
const n = Yn(), { activeAnchor: r } = Ft(), [o] = Ya();
|
|
3160
3233
|
switch (e.type) {
|
|
3161
3234
|
case "category":
|
|
3162
|
-
return /* @__PURE__ */
|
|
3235
|
+
return /* @__PURE__ */ a.jsx(Ul, { category: e, level: t });
|
|
3163
3236
|
case "doc":
|
|
3164
|
-
return /* @__PURE__ */
|
|
3165
|
-
|
|
3237
|
+
return /* @__PURE__ */ a.jsxs(
|
|
3238
|
+
Ze,
|
|
3166
3239
|
{
|
|
3167
|
-
className: ({ isActive: s }) =>
|
|
3168
|
-
to:
|
|
3240
|
+
className: ({ isActive: s }) => Je({ isActive: s, isTopLevel: t === 0 }),
|
|
3241
|
+
to: Ht(n == null ? void 0 : n.id, e.id),
|
|
3169
3242
|
children: [
|
|
3170
|
-
e.icon && /* @__PURE__ */
|
|
3171
|
-
e.badge ? /* @__PURE__ */
|
|
3172
|
-
/* @__PURE__ */
|
|
3173
|
-
/* @__PURE__ */
|
|
3243
|
+
e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
|
|
3244
|
+
e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3245
|
+
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
3246
|
+
/* @__PURE__ */ a.jsx(St, { ...e.badge })
|
|
3174
3247
|
] }) : e.label
|
|
3175
3248
|
]
|
|
3176
3249
|
}
|
|
3177
3250
|
);
|
|
3178
3251
|
case "link":
|
|
3179
|
-
return e.href.startsWith("#") ? /* @__PURE__ */
|
|
3180
|
-
|
|
3252
|
+
return e.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
|
|
3253
|
+
Ka,
|
|
3181
3254
|
{
|
|
3182
|
-
to: { hash: e.href, search:
|
|
3183
|
-
[
|
|
3255
|
+
to: { hash: e.href, search: o.toString() },
|
|
3256
|
+
[Ra]: e.href.slice(1),
|
|
3184
3257
|
className: O(
|
|
3185
3258
|
"flex gap-2.5 justify-between",
|
|
3186
3259
|
t === 0 && "-mx-[--padding-nav-item]",
|
|
3187
|
-
|
|
3260
|
+
Je({
|
|
3188
3261
|
isActive: e.href.slice(1) === r
|
|
3189
3262
|
})
|
|
3190
3263
|
),
|
|
3191
|
-
children: e.badge ? /* @__PURE__ */
|
|
3192
|
-
/* @__PURE__ */
|
|
3193
|
-
/* @__PURE__ */
|
|
3194
|
-
] }) : /* @__PURE__ */
|
|
3264
|
+
children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3265
|
+
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
3266
|
+
/* @__PURE__ */ a.jsx(St, { ...e.badge })
|
|
3267
|
+
] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
|
|
3195
3268
|
}
|
|
3196
|
-
) : e.href.startsWith("http") ? /* @__PURE__ */
|
|
3269
|
+
) : e.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
|
|
3197
3270
|
"a",
|
|
3198
3271
|
{
|
|
3199
3272
|
className: O(
|
|
3200
|
-
|
|
3273
|
+
Je({ isTopLevel: t === 0 }),
|
|
3201
3274
|
"block"
|
|
3202
3275
|
),
|
|
3203
3276
|
href: e.href,
|
|
3204
3277
|
target: "_blank",
|
|
3205
3278
|
rel: "noopener noreferrer",
|
|
3206
3279
|
children: [
|
|
3207
|
-
/* @__PURE__ */
|
|
3208
|
-
/* @__PURE__ */
|
|
3280
|
+
/* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: e.label }),
|
|
3281
|
+
/* @__PURE__ */ a.jsxs("span", { className: "whitespace-nowrap", children: [
|
|
3209
3282
|
" ",
|
|
3210
|
-
/* @__PURE__ */
|
|
3283
|
+
/* @__PURE__ */ a.jsx(Go, { className: "inline ml-1", size: 12 })
|
|
3211
3284
|
] })
|
|
3212
3285
|
]
|
|
3213
3286
|
}
|
|
3214
|
-
) : /* @__PURE__ */
|
|
3215
|
-
|
|
3287
|
+
) : /* @__PURE__ */ a.jsx(
|
|
3288
|
+
Ze,
|
|
3216
3289
|
{
|
|
3217
|
-
className: O("flex gap-2.5 justify-between",
|
|
3290
|
+
className: O("flex gap-2.5 justify-between", Je()),
|
|
3218
3291
|
to: e.href,
|
|
3219
|
-
children: e.badge ? /* @__PURE__ */
|
|
3220
|
-
/* @__PURE__ */
|
|
3221
|
-
/* @__PURE__ */
|
|
3222
|
-
] }) : /* @__PURE__ */
|
|
3292
|
+
children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3293
|
+
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
3294
|
+
/* @__PURE__ */ a.jsx(St, { ...e.badge })
|
|
3295
|
+
] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
|
|
3223
3296
|
}
|
|
3224
3297
|
);
|
|
3225
3298
|
}
|
|
3226
|
-
},
|
|
3299
|
+
}, zl = (e, t = { block: "center" }) => {
|
|
3227
3300
|
if (!e) return;
|
|
3228
3301
|
const n = e.getBoundingClientRect();
|
|
3229
3302
|
n.top >= 0 && n.left >= 0 && n.bottom <= (window.innerHeight || document.documentElement.clientHeight) && n.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
|
|
3230
|
-
},
|
|
3231
|
-
const e =
|
|
3232
|
-
|
|
3303
|
+
}, Kl = () => {
|
|
3304
|
+
const e = kt(), { setActiveAnchor: t } = Ft();
|
|
3305
|
+
Ce(() => {
|
|
3233
3306
|
if (!e.hash) return;
|
|
3234
3307
|
const n = decodeURIComponent(e.hash.split("/")[0].slice(1)), r = () => {
|
|
3235
|
-
const
|
|
3236
|
-
return
|
|
3308
|
+
const o = document.getElementById(n), s = document.querySelector(`[${Ra}="${n}"]`);
|
|
3309
|
+
return o ? (o.scrollIntoView(), zl(s), requestIdleCallback(() => t(n)), !0) : !1;
|
|
3237
3310
|
};
|
|
3238
3311
|
if (!r()) {
|
|
3239
|
-
const
|
|
3312
|
+
const o = new MutationObserver((s, i) => {
|
|
3240
3313
|
r() && i.disconnect();
|
|
3241
3314
|
});
|
|
3242
|
-
return
|
|
3315
|
+
return o.observe(document.body, { childList: !0, subtree: !0 }), () => o.disconnect();
|
|
3243
3316
|
}
|
|
3244
3317
|
}, [e.hash, t]);
|
|
3245
|
-
},
|
|
3246
|
-
const e =
|
|
3247
|
-
|
|
3318
|
+
}, ql = () => {
|
|
3319
|
+
const e = kt(), t = Lt(e.pathname);
|
|
3320
|
+
Ce(() => {
|
|
3248
3321
|
t.current !== e.pathname && (window.scrollTo(0, 0), t.current = e.pathname);
|
|
3249
3322
|
}, [e.pathname]);
|
|
3250
|
-
},
|
|
3323
|
+
}, Ea = Ro(({ children: e, className: t, pushMainContent: n }, r) => /* @__PURE__ */ a.jsx(
|
|
3251
3324
|
"nav",
|
|
3252
3325
|
{
|
|
3253
3326
|
"data-navigation": String(n),
|
|
@@ -3261,71 +3334,72 @@ const Pl = ({
|
|
|
3261
3334
|
children: e
|
|
3262
3335
|
}
|
|
3263
3336
|
));
|
|
3264
|
-
|
|
3265
|
-
const
|
|
3266
|
-
const e =
|
|
3267
|
-
return /* @__PURE__ */
|
|
3268
|
-
/* @__PURE__ */
|
|
3269
|
-
|
|
3337
|
+
Ea.displayName = "SidebarWrapper";
|
|
3338
|
+
const Ql = () => {
|
|
3339
|
+
const e = Lt(null), t = Bo();
|
|
3340
|
+
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3341
|
+
/* @__PURE__ */ a.jsxs(
|
|
3342
|
+
Ea,
|
|
3270
3343
|
{
|
|
3271
3344
|
ref: e,
|
|
3272
3345
|
pushMainContent: t.data.items.length > 0,
|
|
3273
3346
|
children: [
|
|
3274
|
-
/* @__PURE__ */
|
|
3275
|
-
t.data.items.map((n) => /* @__PURE__ */
|
|
3276
|
-
/* @__PURE__ */
|
|
3347
|
+
/* @__PURE__ */ a.jsx(xe, { name: "zudoku-before-navigation" }),
|
|
3348
|
+
t.data.items.map((n) => /* @__PURE__ */ a.jsx(Ot, { item: n }, n.label)),
|
|
3349
|
+
/* @__PURE__ */ a.jsx(xe, { name: "zudoku-after-navigation" })
|
|
3277
3350
|
]
|
|
3278
3351
|
}
|
|
3279
3352
|
),
|
|
3280
|
-
/* @__PURE__ */
|
|
3281
|
-
|
|
3353
|
+
/* @__PURE__ */ a.jsxs(
|
|
3354
|
+
en,
|
|
3282
3355
|
{
|
|
3283
3356
|
className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none",
|
|
3284
3357
|
"aria-describedby": void 0,
|
|
3285
3358
|
children: [
|
|
3286
|
-
/* @__PURE__ */
|
|
3287
|
-
t.data.items.map((n) => /* @__PURE__ */
|
|
3359
|
+
/* @__PURE__ */ a.jsx(Hn, { children: /* @__PURE__ */ a.jsx(tn, { children: "Sidebar" }) }),
|
|
3360
|
+
t.data.items.map((n) => /* @__PURE__ */ a.jsx(Ot, { item: n }, n.label))
|
|
3288
3361
|
]
|
|
3289
3362
|
}
|
|
3290
3363
|
)
|
|
3291
3364
|
] });
|
|
3292
|
-
},
|
|
3293
|
-
const t =
|
|
3294
|
-
|
|
3295
|
-
const s =
|
|
3296
|
-
return
|
|
3365
|
+
}, Vl = ({ children: e }) => {
|
|
3366
|
+
const t = kt(), { setActiveAnchor: n } = Ft(), { meta: r, authentication: o } = qe();
|
|
3367
|
+
Kl(), ql();
|
|
3368
|
+
const s = Lt(t.pathname);
|
|
3369
|
+
return Ce(() => {
|
|
3297
3370
|
var i;
|
|
3298
|
-
(i =
|
|
3299
|
-
}, [
|
|
3371
|
+
(i = o == null ? void 0 : o.pageLoad) == null || i.call(o);
|
|
3372
|
+
}, [o]), Ce(() => {
|
|
3300
3373
|
t.pathname !== s.current && n(""), s.current = t.pathname;
|
|
3301
|
-
}, [t.pathname, n]), /* @__PURE__ */
|
|
3374
|
+
}, [t.pathname, n]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3302
3375
|
!1,
|
|
3303
|
-
/* @__PURE__ */
|
|
3304
|
-
(r == null ? void 0 : r.description) && /* @__PURE__ */
|
|
3305
|
-
(r == null ? void 0 : r.favicon) && /* @__PURE__ */
|
|
3376
|
+
/* @__PURE__ */ a.jsxs(It, { titleTemplate: r == null ? void 0 : r.title, children: [
|
|
3377
|
+
(r == null ? void 0 : r.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: r.description }),
|
|
3378
|
+
(r == null ? void 0 : r.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: r.favicon })
|
|
3306
3379
|
] }),
|
|
3307
|
-
/* @__PURE__ */
|
|
3308
|
-
/* @__PURE__ */
|
|
3309
|
-
/* @__PURE__ */
|
|
3310
|
-
|
|
3380
|
+
/* @__PURE__ */ a.jsx(xe, { name: "layout-before-head" }),
|
|
3381
|
+
/* @__PURE__ */ a.jsx(Sa, {}),
|
|
3382
|
+
/* @__PURE__ */ a.jsx(xe, { name: "layout-after-head" }),
|
|
3383
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ a.jsx(
|
|
3384
|
+
Qn,
|
|
3311
3385
|
{
|
|
3312
|
-
fallback: /* @__PURE__ */
|
|
3313
|
-
children: /* @__PURE__ */
|
|
3314
|
-
/* @__PURE__ */
|
|
3315
|
-
/* @__PURE__ */
|
|
3386
|
+
fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(ss, {}) }),
|
|
3387
|
+
children: /* @__PURE__ */ a.jsxs(Zt, { direction: "left", children: [
|
|
3388
|
+
/* @__PURE__ */ a.jsx(Ql, {}),
|
|
3389
|
+
/* @__PURE__ */ a.jsx(
|
|
3316
3390
|
"div",
|
|
3317
3391
|
{
|
|
3318
3392
|
className: O(
|
|
3319
3393
|
"lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
|
|
3320
3394
|
"peer-data-[navigation=false]:hidden"
|
|
3321
3395
|
),
|
|
3322
|
-
children: /* @__PURE__ */
|
|
3323
|
-
/* @__PURE__ */
|
|
3324
|
-
/* @__PURE__ */
|
|
3396
|
+
children: /* @__PURE__ */ a.jsxs(wa, { className: "flex items-center gap-2", children: [
|
|
3397
|
+
/* @__PURE__ */ a.jsx(Wo, { size: 16, strokeWidth: 1.5 }),
|
|
3398
|
+
/* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
|
|
3325
3399
|
] })
|
|
3326
3400
|
}
|
|
3327
3401
|
),
|
|
3328
|
-
/* @__PURE__ */
|
|
3402
|
+
/* @__PURE__ */ a.jsxs(
|
|
3329
3403
|
"main",
|
|
3330
3404
|
{
|
|
3331
3405
|
className: O(
|
|
@@ -3336,9 +3410,9 @@ const Il = () => {
|
|
|
3336
3410
|
"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
|
|
3337
3411
|
),
|
|
3338
3412
|
children: [
|
|
3339
|
-
/* @__PURE__ */
|
|
3340
|
-
e ?? /* @__PURE__ */
|
|
3341
|
-
/* @__PURE__ */
|
|
3413
|
+
/* @__PURE__ */ a.jsx(xe, { name: "zudoku-before-content" }),
|
|
3414
|
+
e ?? /* @__PURE__ */ a.jsx(In, {}),
|
|
3415
|
+
/* @__PURE__ */ a.jsx(xe, { name: "zudoku-after-content" })
|
|
3342
3416
|
]
|
|
3343
3417
|
}
|
|
3344
3418
|
)
|
|
@@ -3346,18 +3420,18 @@ const Il = () => {
|
|
|
3346
3420
|
}
|
|
3347
3421
|
) })
|
|
3348
3422
|
] });
|
|
3349
|
-
},
|
|
3423
|
+
}, fc = qa, hc = xo, pc = Ma, mc = Vl, gc = At, vc = Ja, wc = is, xc = Ms, yc = Rs, bc = Pt, Sc = It;
|
|
3350
3424
|
export {
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3425
|
+
xc as Bootstrap,
|
|
3426
|
+
yc as BootstrapStatic,
|
|
3427
|
+
bc as Button,
|
|
3428
|
+
hc as Callout,
|
|
3429
|
+
pc as DevPortal,
|
|
3430
|
+
Sc as Head,
|
|
3431
|
+
mc as Layout,
|
|
3432
|
+
gc as Link,
|
|
3433
|
+
vc as RouterError,
|
|
3434
|
+
wc as ServerError,
|
|
3435
|
+
fc as useMDXComponents
|
|
3362
3436
|
};
|
|
3363
3437
|
//# sourceMappingURL=zudoku.components.js.map
|