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