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