zudoku 0.3.0-dev.68 → 0.3.0-dev.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/main.js +1 -0
- package/dist/app/main.js.map +1 -1
- package/dist/config/validators/validate.d.ts +3 -0
- package/dist/config/validators/validate.js +1 -0
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/components/DevPortal.d.ts +1 -0
- package/dist/lib/components/DevPortal.js +3 -1
- package/dist/lib/components/DevPortal.js.map +1 -1
- package/dist/lib/components/Layout.js +2 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/SlotletProvider.d.ts +9 -0
- package/dist/lib/components/SlotletProvider.js +11 -0
- package/dist/lib/components/SlotletProvider.js.map +1 -0
- package/dist/lib/components/context/ViewportAnchorContext.js +1 -2
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/navigation/SideNavigation.js +3 -2
- package/dist/lib/components/navigation/SideNavigation.js.map +1 -1
- package/dist/lib/core/DevPortalContext.d.ts +2 -0
- package/dist/lib/core/DevPortalContext.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +2 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.js +1 -1
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/markdown/Toc.js +1 -2
- package/dist/lib/plugins/markdown/Toc.js.map +1 -1
- package/dist/lib/plugins/openapi/StaggeredRender.js +2 -3
- package/dist/lib/plugins/openapi/StaggeredRender.js.map +1 -1
- package/dist/lib/util/invariant.d.ts +6 -0
- package/dist/lib/util/invariant.js +21 -0
- package/dist/lib/util/invariant.js.map +1 -0
- package/dist/lib/util/requestIdleCallbackPolyfill.d.ts +1 -0
- package/dist/lib/util/requestIdleCallbackPolyfill.js +7 -0
- package/dist/lib/util/requestIdleCallbackPolyfill.js.map +1 -0
- package/dist/lib/util/useScrollToAnchor.js +2 -3
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/lib/{AnchorLink-61IZfWrS.js → AnchorLink-C_pYhuZi.js} +2 -2
- package/lib/{AnchorLink-61IZfWrS.js.map → AnchorLink-C_pYhuZi.js.map} +1 -1
- package/lib/{CategoryHeading-aW8CL0KA.js → CategoryHeading-D5Q-X6lE.js} +2 -2
- package/lib/{CategoryHeading-aW8CL0KA.js.map → CategoryHeading-D5Q-X6lE.js.map} +1 -1
- package/lib/{Combination-BbWKjDLe.js → Combination-Cq0UkOXq.js} +2 -2
- package/lib/{Combination-BbWKjDLe.js.map → Combination-Cq0UkOXq.js.map} +1 -1
- package/lib/{Input-BY0B_0qy.js → Input-DdAxw3vC.js} +3 -3
- package/lib/{Input-BY0B_0qy.js.map → Input-DdAxw3vC.js.map} +1 -1
- package/lib/{Markdown-BO5EsS-C.js → Markdown-DsCvZnhw.js} +746 -748
- package/lib/Markdown-DsCvZnhw.js.map +1 -0
- package/lib/{MdxPage-DEfyHwSx.js → MdxPage-B_7x36CA.js} +28 -28
- package/lib/MdxPage-B_7x36CA.js.map +1 -0
- package/lib/{OperationList-VK1_1rzp.js → OperationList-i6FGZUu4.js} +7 -7
- package/lib/{OperationList-VK1_1rzp.js.map → OperationList-i6FGZUu4.js.map} +1 -1
- package/lib/{hook-gOGk1OUF.js → SlotletProvider-CpNYmq6S.js} +42 -33
- package/lib/SlotletProvider-CpNYmq6S.js.map +1 -0
- package/lib/{Spinner-6NfpF1CA.js → Spinner-BBPlEab_.js} +48 -48
- package/lib/Spinner-BBPlEab_.js.map +1 -0
- package/lib/{index-7W7DUZbY.js → index-DT-cf5tv.js} +4 -4
- package/lib/{index-7W7DUZbY.js.map → index-DT-cf5tv.js.map} +1 -1
- package/lib/zudoku.components.js +544 -534
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +49 -46
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-page.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/package.json +1 -2
- package/src/app/main.tsx +1 -0
- package/src/lib/components/DevPortal.tsx +5 -1
- package/src/lib/components/Layout.tsx +3 -0
- package/src/lib/components/SlotletProvider.tsx +25 -0
- package/src/lib/components/context/ViewportAnchorContext.tsx +1 -2
- package/src/lib/components/navigation/SideNavigation.tsx +3 -0
- package/src/lib/core/DevPortalContext.ts +2 -0
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +3 -0
- package/src/lib/plugins/api-keys/index.tsx +1 -1
- package/src/lib/plugins/markdown/Toc.tsx +1 -2
- package/src/lib/plugins/openapi/StaggeredRender.tsx +2 -3
- package/src/lib/util/invariant.ts +26 -0
- package/src/lib/util/requestIdleCallbackPolyfill.ts +6 -0
- package/src/lib/util/useScrollToAnchor.ts +2 -3
- package/dist/lib/util/requestIdle.d.ts +0 -2
- package/dist/lib/util/requestIdle.js +0 -3
- package/dist/lib/util/requestIdle.js.map +0 -1
- package/lib/Markdown-BO5EsS-C.js.map +0 -1
- package/lib/MdxPage-DEfyHwSx.js.map +0 -1
- package/lib/Spinner-6NfpF1CA.js.map +0 -1
- package/lib/hook-gOGk1OUF.js.map +0 -1
- package/src/lib/util/requestIdle.ts +0 -4
package/lib/zudoku.components.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var sr = Object.defineProperty;
|
|
2
|
+
var dt = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
5
|
+
var ir = (t, e, n) => e in t ? sr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
|
+
var j = (t, e, n) => ir(t, typeof e != "symbol" ? e + "" : e, n), ht = (t, e, n) => e.has(t) || dt("Cannot " + n);
|
|
7
|
+
var f = (t, e, n) => (ht(t, e, "read from private field"), n ? n.call(t) : e.get(t)), N = (t, e, n) => e.has(t) ? dt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), M = (t, e, n, r) => (ht(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n);
|
|
8
|
+
var be = (t, e, n, r) => ({
|
|
9
9
|
set _(a) {
|
|
10
|
-
|
|
10
|
+
M(t, e, a, n);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return
|
|
13
|
+
return f(t, e, r);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { H as
|
|
17
|
-
import { c as
|
|
18
|
-
import { E as
|
|
19
|
-
import { j as o, d as
|
|
20
|
-
import { M as
|
|
16
|
+
import { H as _t, a as Ge, M as cr, A as ur, u as lr } from "./AnchorLink-C_pYhuZi.js";
|
|
17
|
+
import { c as fe, d as dr, R as hr, a as P, C as fr, N as Ke, b as pr, u as mr, L as _e, M as gr, T as vr, V as xr, e as qe, f as yr, g as wr } from "./Markdown-DsCvZnhw.js";
|
|
18
|
+
import { E as Et, u as br, S as Mr, a as Ee, R as Cr } from "./SlotletProvider-CpNYmq6S.js";
|
|
19
|
+
import { j as o, d as Pr, u as Rr, a as se, O as _r } from "./jsx-runtime-BIr0WBt_.js";
|
|
20
|
+
import { M as Er, c as Sr, a as St, b as jt, A as jr, u as pe, h as Nr, d as y, e as Dr, F as Ir, D as Ar, C as Or, P as ie, f as He, g as Tr, i as Nt, R as kr, S as Fr, j as Lr, k as Kr, l as Dt, m as $r, n as Se, o as It, B as $e } from "./Combination-Cq0UkOXq.js";
|
|
21
21
|
import * as c from "react";
|
|
22
|
-
import
|
|
23
|
-
import { g as
|
|
24
|
-
import { r as
|
|
25
|
-
import { S as
|
|
26
|
-
import { S as
|
|
22
|
+
import Br, { StrictMode as At, createContext as Ot, Component as Qr, createElement as ft, isValidElement as Ur, memo as Tt, useMemo as Me, useContext as Gr, useState as Be, useEffect as W, Fragment as qr, useRef as De, forwardRef as Hr, Suspense as zr } from "react";
|
|
23
|
+
import { g as ze } from "./_commonjsHelpers-BVfed4GL.js";
|
|
24
|
+
import { r as Vr } from "./router-BiRCp01d.js";
|
|
25
|
+
import { S as Qe, c as kt, P as Ie, R as Yr, I as Xr, a as Ft, T as Lt, C as Kt, b as Wr } from "./Spinner-BBPlEab_.js";
|
|
26
|
+
import { S as $t, h as Bt, Q as Jr, n as E, m as pt, a as mt, b as $, e as Zr, c as ea, d as ta, f as na, o as gt, r as vt, g as ra, i as xt, p as yt, s as aa, u as Ve, j as oa, D as sa, k as Ye, l as wt, q as Qt, t as ia, v as ca, w as ua } from "./DevPortalProvider-BBhQ8kgI.js";
|
|
27
27
|
/**
|
|
28
28
|
* @license lucide-react v0.378.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
32
|
*/
|
|
33
|
-
const
|
|
33
|
+
const Xe = fe("ChevronRight", [
|
|
34
34
|
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
35
35
|
]);
|
|
36
36
|
/**
|
|
@@ -39,7 +39,7 @@ const Ve = pe("ChevronRight", [
|
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
41
|
*/
|
|
42
|
-
const
|
|
42
|
+
const la = fe("Dot", [
|
|
43
43
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
|
44
44
|
]);
|
|
45
45
|
/**
|
|
@@ -48,7 +48,7 @@ const ca = pe("Dot", [
|
|
|
48
48
|
* This source code is licensed under the ISC license.
|
|
49
49
|
* See the LICENSE file in the root directory of this source tree.
|
|
50
50
|
*/
|
|
51
|
-
const
|
|
51
|
+
const da = fe("ExternalLink", [
|
|
52
52
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
53
53
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
54
54
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
@@ -59,7 +59,7 @@ const ua = pe("ExternalLink", [
|
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
61
|
*/
|
|
62
|
-
const
|
|
62
|
+
const ha = fe("MoonStar", [
|
|
63
63
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9", key: "4ay0iu" }],
|
|
64
64
|
["path", { d: "M20 3v4", key: "1olli1" }],
|
|
65
65
|
["path", { d: "M22 5h-4", key: "1gvqau" }]
|
|
@@ -70,7 +70,7 @@ const la = pe("MoonStar", [
|
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
72
|
*/
|
|
73
|
-
const
|
|
73
|
+
const fa = fe("Sun", [
|
|
74
74
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
75
75
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
76
76
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -81,14 +81,14 @@ const da = pe("Sun", [
|
|
|
81
81
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
82
82
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
83
83
|
]);
|
|
84
|
-
function
|
|
85
|
-
return /* @__PURE__ */ o.jsx(
|
|
84
|
+
function pa({ error: t }) {
|
|
85
|
+
return /* @__PURE__ */ o.jsx(Et, { error: t });
|
|
86
86
|
}
|
|
87
87
|
var me = {};
|
|
88
|
-
const
|
|
88
|
+
const ma = /* @__PURE__ */ ze(Vr), ga = /* @__PURE__ */ ze(Pr), va = /* @__PURE__ */ ze(dr);
|
|
89
89
|
Object.defineProperty(me, "__esModule", { value: !0 });
|
|
90
|
-
var
|
|
91
|
-
function
|
|
90
|
+
var xa = Br, k = ma, We = ga, B = va;
|
|
91
|
+
function ya(t) {
|
|
92
92
|
if (t && t.__esModule) return t;
|
|
93
93
|
var e = /* @__PURE__ */ Object.create(null);
|
|
94
94
|
return t && Object.keys(t).forEach(function(n) {
|
|
@@ -103,8 +103,8 @@ function va(t) {
|
|
|
103
103
|
}
|
|
104
104
|
}), e.default = t, Object.freeze(e);
|
|
105
105
|
}
|
|
106
|
-
var O = /* @__PURE__ */
|
|
107
|
-
function
|
|
106
|
+
var O = /* @__PURE__ */ ya(xa);
|
|
107
|
+
function wa({
|
|
108
108
|
basename: t,
|
|
109
109
|
children: e,
|
|
110
110
|
location: n = "/",
|
|
@@ -117,7 +117,7 @@ function xa({
|
|
|
117
117
|
hash: n.hash || "",
|
|
118
118
|
state: n.state != null ? n.state : null,
|
|
119
119
|
key: n.key || "default"
|
|
120
|
-
}, i =
|
|
120
|
+
}, i = Ut();
|
|
121
121
|
return /* @__PURE__ */ O.createElement(B.Router, {
|
|
122
122
|
basename: t,
|
|
123
123
|
children: e,
|
|
@@ -128,7 +128,7 @@ function xa({
|
|
|
128
128
|
static: !0
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function ba({
|
|
132
132
|
context: t,
|
|
133
133
|
router: e,
|
|
134
134
|
hydrate: n = !0,
|
|
@@ -137,7 +137,7 @@ function ya({
|
|
|
137
137
|
e && t || (process.env.NODE_ENV !== "production" ? k.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : k.UNSAFE_invariant(!1));
|
|
138
138
|
let a = {
|
|
139
139
|
router: e,
|
|
140
|
-
navigator:
|
|
140
|
+
navigator: Ut(),
|
|
141
141
|
static: !0,
|
|
142
142
|
staticContext: t,
|
|
143
143
|
basename: t.basename || "/"
|
|
@@ -146,9 +146,9 @@ function ya({
|
|
|
146
146
|
let h = {
|
|
147
147
|
loaderData: t.loaderData,
|
|
148
148
|
actionData: t.actionData,
|
|
149
|
-
errors:
|
|
149
|
+
errors: Ca(t.errors)
|
|
150
150
|
};
|
|
151
|
-
i = `window.__staticRouterHydrationData = JSON.parse(${
|
|
151
|
+
i = `window.__staticRouterHydrationData = JSON.parse(${ja(JSON.stringify(JSON.stringify(h)))});`;
|
|
152
152
|
}
|
|
153
153
|
let {
|
|
154
154
|
state: u
|
|
@@ -172,7 +172,7 @@ function ya({
|
|
|
172
172
|
future: {
|
|
173
173
|
v7_relativeSplatPath: e.future.v7_relativeSplatPath
|
|
174
174
|
}
|
|
175
|
-
}, /* @__PURE__ */ O.createElement(
|
|
175
|
+
}, /* @__PURE__ */ O.createElement(Ma, {
|
|
176
176
|
routes: e.routes,
|
|
177
177
|
future: e.future,
|
|
178
178
|
state: u
|
|
@@ -184,14 +184,14 @@ function ya({
|
|
|
184
184
|
}
|
|
185
185
|
}) : null);
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function Ma({
|
|
188
188
|
routes: t,
|
|
189
189
|
future: e,
|
|
190
190
|
state: n
|
|
191
191
|
}) {
|
|
192
|
-
return
|
|
192
|
+
return We.UNSAFE_useRoutesImpl(t, void 0, n, e);
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function Ca(t) {
|
|
195
195
|
if (!t) return null;
|
|
196
196
|
let e = Object.entries(t), n = {};
|
|
197
197
|
for (let [r, a] of e)
|
|
@@ -209,10 +209,10 @@ function Ma(t) {
|
|
|
209
209
|
} : n[r] = a;
|
|
210
210
|
return n;
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function Ut() {
|
|
213
213
|
return {
|
|
214
|
-
createHref:
|
|
215
|
-
encodeLocation:
|
|
214
|
+
createHref: Gt,
|
|
215
|
+
encodeLocation: qt,
|
|
216
216
|
push(t) {
|
|
217
217
|
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(t)})\` somewhere in your app.`);
|
|
218
218
|
},
|
|
@@ -230,14 +230,14 @@ function Qt() {
|
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function Pa(t, e) {
|
|
234
234
|
return k.createStaticHandler(t, {
|
|
235
235
|
...e,
|
|
236
|
-
mapRouteProperties:
|
|
236
|
+
mapRouteProperties: We.UNSAFE_mapRouteProperties
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
|
-
function
|
|
240
|
-
let r = {}, a = k.UNSAFE_convertRoutesToDataRoutes(t,
|
|
239
|
+
function Ra(t, e, n = {}) {
|
|
240
|
+
let r = {}, a = k.UNSAFE_convertRoutesToDataRoutes(t, We.UNSAFE_mapRouteProperties, void 0, r), s = e.matches.map((u) => {
|
|
241
241
|
let h = r[u.route.id] || u.route;
|
|
242
242
|
return {
|
|
243
243
|
...u,
|
|
@@ -299,8 +299,8 @@ function Ca(t, e, n = {}) {
|
|
|
299
299
|
revalidate() {
|
|
300
300
|
throw i("revalidate");
|
|
301
301
|
},
|
|
302
|
-
createHref:
|
|
303
|
-
encodeLocation:
|
|
302
|
+
createHref: Gt,
|
|
303
|
+
encodeLocation: qt,
|
|
304
304
|
getFetcher() {
|
|
305
305
|
return k.IDLE_FETCHER;
|
|
306
306
|
},
|
|
@@ -326,51 +326,51 @@ function Ca(t, e, n = {}) {
|
|
|
326
326
|
}
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function Gt(t) {
|
|
330
330
|
return typeof t == "string" ? t : B.createPath(t);
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function qt(t) {
|
|
333
333
|
let e = typeof t == "string" ? t : B.createPath(t);
|
|
334
334
|
e = e.replace(/ $/, "%20");
|
|
335
|
-
let n =
|
|
335
|
+
let n = _a.test(e) ? new URL(e) : new URL(e, "http://localhost");
|
|
336
336
|
return {
|
|
337
337
|
pathname: n.pathname,
|
|
338
338
|
search: n.search,
|
|
339
339
|
hash: n.hash
|
|
340
340
|
};
|
|
341
341
|
}
|
|
342
|
-
const
|
|
342
|
+
const _a = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ea = {
|
|
343
343
|
"&": "\\u0026",
|
|
344
344
|
">": "\\u003e",
|
|
345
345
|
"<": "\\u003c",
|
|
346
346
|
"\u2028": "\\u2028",
|
|
347
347
|
"\u2029": "\\u2029"
|
|
348
|
-
},
|
|
349
|
-
function
|
|
350
|
-
return t.replace(
|
|
348
|
+
}, Sa = /[&><\u2028\u2029]/g;
|
|
349
|
+
function ja(t) {
|
|
350
|
+
return t.replace(Sa, (e) => Ea[e]);
|
|
351
351
|
}
|
|
352
|
-
me.StaticRouter =
|
|
353
|
-
var
|
|
354
|
-
me.createStaticHandler =
|
|
355
|
-
me.createStaticRouter =
|
|
356
|
-
const
|
|
352
|
+
me.StaticRouter = wa;
|
|
353
|
+
var Na = me.StaticRouterProvider = ba;
|
|
354
|
+
me.createStaticHandler = Pa;
|
|
355
|
+
me.createStaticRouter = Ra;
|
|
356
|
+
const Da = ({
|
|
357
357
|
router: t,
|
|
358
358
|
hydrate: e = !1
|
|
359
|
-
}) => /* @__PURE__ */ o.jsx(At, { children: /* @__PURE__ */ o.jsx(
|
|
359
|
+
}) => /* @__PURE__ */ o.jsx(At, { children: /* @__PURE__ */ o.jsx(_t, { children: /* @__PURE__ */ o.jsx(Qe.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ o.jsx(hr, { router: t }) }) }) }), Ia = ({
|
|
360
360
|
router: t,
|
|
361
361
|
context: e,
|
|
362
362
|
helmetContext: n
|
|
363
|
-
}) => /* @__PURE__ */ o.jsx(At, { children: /* @__PURE__ */ o.jsx(
|
|
364
|
-
var T,
|
|
363
|
+
}) => /* @__PURE__ */ o.jsx(At, { children: /* @__PURE__ */ o.jsx(_t, { context: n, children: /* @__PURE__ */ o.jsx(Na, { router: t, context: e }) }) });
|
|
364
|
+
var T, Ct, Aa = (Ct = class extends $t {
|
|
365
365
|
constructor(e = {}) {
|
|
366
366
|
super();
|
|
367
|
-
|
|
368
|
-
this.config = e,
|
|
367
|
+
N(this, T);
|
|
368
|
+
this.config = e, M(this, T, /* @__PURE__ */ new Map());
|
|
369
369
|
}
|
|
370
370
|
build(e, n, r) {
|
|
371
|
-
const a = n.queryKey, s = n.queryHash ??
|
|
371
|
+
const a = n.queryKey, s = n.queryHash ?? Bt(a, n);
|
|
372
372
|
let i = this.get(s);
|
|
373
|
-
return i || (i = new
|
|
373
|
+
return i || (i = new Jr({
|
|
374
374
|
cache: this,
|
|
375
375
|
queryKey: a,
|
|
376
376
|
queryHash: s,
|
|
@@ -380,14 +380,14 @@ var T, bt, Da = (bt = class extends Kt {
|
|
|
380
380
|
}), this.add(i)), i;
|
|
381
381
|
}
|
|
382
382
|
add(e) {
|
|
383
|
-
|
|
383
|
+
f(this, T).has(e.queryHash) || (f(this, T).set(e.queryHash, e), this.notify({
|
|
384
384
|
type: "added",
|
|
385
385
|
query: e
|
|
386
386
|
}));
|
|
387
387
|
}
|
|
388
388
|
remove(e) {
|
|
389
|
-
const n =
|
|
390
|
-
n && (e.destroy(), n === e &&
|
|
389
|
+
const n = f(this, T).get(e.queryHash);
|
|
390
|
+
n && (e.destroy(), n === e && f(this, T).delete(e.queryHash), this.notify({ type: "removed", query: e }));
|
|
391
391
|
}
|
|
392
392
|
clear() {
|
|
393
393
|
E.batch(() => {
|
|
@@ -397,10 +397,10 @@ var T, bt, Da = (bt = class extends Kt {
|
|
|
397
397
|
});
|
|
398
398
|
}
|
|
399
399
|
get(e) {
|
|
400
|
-
return
|
|
400
|
+
return f(this, T).get(e);
|
|
401
401
|
}
|
|
402
402
|
getAll() {
|
|
403
|
-
return [...
|
|
403
|
+
return [...f(this, T).values()];
|
|
404
404
|
}
|
|
405
405
|
find(e) {
|
|
406
406
|
const n = { exact: !0, ...e };
|
|
@@ -433,43 +433,43 @@ var T, bt, Da = (bt = class extends Kt {
|
|
|
433
433
|
});
|
|
434
434
|
});
|
|
435
435
|
}
|
|
436
|
-
}, T = new WeakMap(),
|
|
436
|
+
}, T = new WeakMap(), Ct), _, he, Pt, Oa = (Pt = class extends $t {
|
|
437
437
|
constructor(e = {}) {
|
|
438
438
|
super();
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
this.config = e,
|
|
439
|
+
N(this, _);
|
|
440
|
+
N(this, he);
|
|
441
|
+
this.config = e, M(this, _, /* @__PURE__ */ new Map()), M(this, he, Date.now());
|
|
442
442
|
}
|
|
443
443
|
build(e, n, r) {
|
|
444
|
-
const a = new
|
|
444
|
+
const a = new Er({
|
|
445
445
|
mutationCache: this,
|
|
446
|
-
mutationId: ++
|
|
446
|
+
mutationId: ++be(this, he)._,
|
|
447
447
|
options: e.defaultMutationOptions(n),
|
|
448
448
|
state: r
|
|
449
449
|
});
|
|
450
450
|
return this.add(a), a;
|
|
451
451
|
}
|
|
452
452
|
add(e) {
|
|
453
|
-
const n = Ce(e), r =
|
|
454
|
-
r.push(e),
|
|
453
|
+
const n = Ce(e), r = f(this, _).get(n) ?? [];
|
|
454
|
+
r.push(e), f(this, _).set(n, r), this.notify({ type: "added", mutation: e });
|
|
455
455
|
}
|
|
456
456
|
remove(e) {
|
|
457
457
|
var r;
|
|
458
458
|
const n = Ce(e);
|
|
459
|
-
if (
|
|
460
|
-
const a = (r =
|
|
461
|
-
a && (a.length === 0 ?
|
|
459
|
+
if (f(this, _).has(n)) {
|
|
460
|
+
const a = (r = f(this, _).get(n)) == null ? void 0 : r.filter((s) => s !== e);
|
|
461
|
+
a && (a.length === 0 ? f(this, _).delete(n) : f(this, _).set(n, a));
|
|
462
462
|
}
|
|
463
463
|
this.notify({ type: "removed", mutation: e });
|
|
464
464
|
}
|
|
465
465
|
canRun(e) {
|
|
466
466
|
var r;
|
|
467
|
-
const n = (r =
|
|
467
|
+
const n = (r = f(this, _).get(Ce(e))) == null ? void 0 : r.find((a) => a.state.status === "pending");
|
|
468
468
|
return !n || n === e;
|
|
469
469
|
}
|
|
470
470
|
runNext(e) {
|
|
471
471
|
var r;
|
|
472
|
-
const n = (r =
|
|
472
|
+
const n = (r = f(this, _).get(Ce(e))) == null ? void 0 : r.find((a) => a !== e && a.state.isPaused);
|
|
473
473
|
return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
|
|
474
474
|
}
|
|
475
475
|
clear() {
|
|
@@ -480,16 +480,16 @@ var T, bt, Da = (bt = class extends Kt {
|
|
|
480
480
|
});
|
|
481
481
|
}
|
|
482
482
|
getAll() {
|
|
483
|
-
return [...
|
|
483
|
+
return [...f(this, _).values()].flat();
|
|
484
484
|
}
|
|
485
485
|
find(e) {
|
|
486
486
|
const n = { exact: !0, ...e };
|
|
487
487
|
return this.getAll().find(
|
|
488
|
-
(r) =>
|
|
488
|
+
(r) => mt(n, r)
|
|
489
489
|
);
|
|
490
490
|
}
|
|
491
491
|
findAll(e = {}) {
|
|
492
|
-
return this.getAll().filter((n) =>
|
|
492
|
+
return this.getAll().filter((n) => mt(e, n));
|
|
493
493
|
}
|
|
494
494
|
notify(e) {
|
|
495
495
|
E.batch(() => {
|
|
@@ -506,61 +506,61 @@ var T, bt, Da = (bt = class extends Kt {
|
|
|
506
506
|
)
|
|
507
507
|
);
|
|
508
508
|
}
|
|
509
|
-
}, _ = new WeakMap(), he = new WeakMap(),
|
|
509
|
+
}, _ = new WeakMap(), he = new WeakMap(), Pt);
|
|
510
510
|
function Ce(t) {
|
|
511
511
|
var e;
|
|
512
512
|
return ((e = t.options.scope) == null ? void 0 : e.id) ?? String(t.mutationId);
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function Ta(t) {
|
|
515
515
|
return {
|
|
516
516
|
onFetch: (e, n) => {
|
|
517
517
|
const r = async () => {
|
|
518
518
|
var x, R, F, Q, V;
|
|
519
519
|
const a = e.options, s = (F = (R = (x = e.fetchOptions) == null ? void 0 : x.meta) == null ? void 0 : R.fetchMore) == null ? void 0 : F.direction, i = ((Q = e.state.data) == null ? void 0 : Q.pages) || [], u = ((V = e.state.data) == null ? void 0 : V.pageParams) || [], h = { pages: [], pageParams: [] };
|
|
520
520
|
let l = !1;
|
|
521
|
-
const m = (
|
|
522
|
-
Object.defineProperty(
|
|
521
|
+
const m = (b) => {
|
|
522
|
+
Object.defineProperty(b, "signal", {
|
|
523
523
|
enumerable: !0,
|
|
524
524
|
get: () => (e.signal.aborted ? l = !0 : e.signal.addEventListener("abort", () => {
|
|
525
525
|
l = !0;
|
|
526
526
|
}), e.signal)
|
|
527
527
|
});
|
|
528
|
-
}, d =
|
|
528
|
+
}, d = Zr(e.options, e.fetchOptions), p = async (b, I, L) => {
|
|
529
529
|
if (l)
|
|
530
530
|
return Promise.reject();
|
|
531
|
-
if (
|
|
532
|
-
return Promise.resolve(
|
|
531
|
+
if (I == null && b.pages.length)
|
|
532
|
+
return Promise.resolve(b);
|
|
533
533
|
const Y = {
|
|
534
534
|
queryKey: e.queryKey,
|
|
535
|
-
pageParam:
|
|
535
|
+
pageParam: I,
|
|
536
536
|
direction: L ? "backward" : "forward",
|
|
537
537
|
meta: e.options.meta
|
|
538
538
|
};
|
|
539
539
|
m(Y);
|
|
540
540
|
const Z = await d(
|
|
541
541
|
Y
|
|
542
|
-
), { maxPages: ye } = e.options, X = L ?
|
|
542
|
+
), { maxPages: ye } = e.options, X = L ? ea : ta;
|
|
543
543
|
return {
|
|
544
|
-
pages: X(
|
|
545
|
-
pageParams: X(
|
|
544
|
+
pages: X(b.pages, Z, ye),
|
|
545
|
+
pageParams: X(b.pageParams, I, ye)
|
|
546
546
|
};
|
|
547
547
|
};
|
|
548
548
|
let v;
|
|
549
549
|
if (s && i.length) {
|
|
550
|
-
const
|
|
550
|
+
const b = s === "backward", I = b ? ka : bt, L = {
|
|
551
551
|
pages: i,
|
|
552
552
|
pageParams: u
|
|
553
|
-
}, Y =
|
|
554
|
-
v = await
|
|
553
|
+
}, Y = I(a, L);
|
|
554
|
+
v = await p(L, Y, b);
|
|
555
555
|
} else {
|
|
556
|
-
v = await
|
|
556
|
+
v = await p(
|
|
557
557
|
h,
|
|
558
558
|
u[0] ?? a.initialPageParam
|
|
559
559
|
);
|
|
560
|
-
const
|
|
561
|
-
for (let
|
|
562
|
-
const L =
|
|
563
|
-
v = await
|
|
560
|
+
const b = t ?? i.length;
|
|
561
|
+
for (let I = 1; I < b; I++) {
|
|
562
|
+
const L = bt(a, v);
|
|
563
|
+
v = await p(v, L);
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
return v;
|
|
@@ -581,7 +581,7 @@ function Ia(t) {
|
|
|
581
581
|
}
|
|
582
582
|
};
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function bt(t, { pages: e, pageParams: n }) {
|
|
585
585
|
const r = e.length - 1;
|
|
586
586
|
return t.getNextPageParam(
|
|
587
587
|
e[r],
|
|
@@ -590,7 +590,7 @@ function wt(t, { pages: e, pageParams: n }) {
|
|
|
590
590
|
n
|
|
591
591
|
);
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function ka(t, { pages: e, pageParams: n }) {
|
|
594
594
|
var r;
|
|
595
595
|
return (r = t.getPreviousPageParam) == null ? void 0 : r.call(
|
|
596
596
|
t,
|
|
@@ -600,65 +600,65 @@ function Oa(t, { pages: e, pageParams: n }) {
|
|
|
600
600
|
n
|
|
601
601
|
);
|
|
602
602
|
}
|
|
603
|
-
var w, G,
|
|
603
|
+
var w, G, q, ne, re, H, ae, oe, Rt, Fa = (Rt = class {
|
|
604
604
|
constructor(t = {}) {
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
605
|
+
N(this, w);
|
|
606
|
+
N(this, G);
|
|
607
|
+
N(this, q);
|
|
608
|
+
N(this, ne);
|
|
609
|
+
N(this, re);
|
|
610
|
+
N(this, H);
|
|
611
|
+
N(this, ae);
|
|
612
|
+
N(this, oe);
|
|
613
|
+
M(this, w, t.queryCache || new Aa()), M(this, G, t.mutationCache || new Oa()), M(this, q, t.defaultOptions || {}), M(this, ne, /* @__PURE__ */ new Map()), M(this, re, /* @__PURE__ */ new Map()), M(this, H, 0);
|
|
614
614
|
}
|
|
615
615
|
mount() {
|
|
616
|
-
|
|
617
|
-
t && (await this.resumePausedMutations(),
|
|
618
|
-
})),
|
|
619
|
-
t && (await this.resumePausedMutations(),
|
|
616
|
+
be(this, H)._++, f(this, H) === 1 && (M(this, ae, na.subscribe(async (t) => {
|
|
617
|
+
t && (await this.resumePausedMutations(), f(this, w).onFocus());
|
|
618
|
+
})), M(this, oe, gt.subscribe(async (t) => {
|
|
619
|
+
t && (await this.resumePausedMutations(), f(this, w).onOnline());
|
|
620
620
|
})));
|
|
621
621
|
}
|
|
622
622
|
unmount() {
|
|
623
623
|
var t, e;
|
|
624
|
-
|
|
624
|
+
be(this, H)._--, f(this, H) === 0 && ((t = f(this, ae)) == null || t.call(this), M(this, ae, void 0), (e = f(this, oe)) == null || e.call(this), M(this, oe, void 0));
|
|
625
625
|
}
|
|
626
626
|
isFetching(t) {
|
|
627
|
-
return
|
|
627
|
+
return f(this, w).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
628
628
|
}
|
|
629
629
|
isMutating(t) {
|
|
630
|
-
return
|
|
630
|
+
return f(this, G).findAll({ ...t, status: "pending" }).length;
|
|
631
631
|
}
|
|
632
632
|
getQueryData(t) {
|
|
633
633
|
var n;
|
|
634
634
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
635
|
-
return (n =
|
|
635
|
+
return (n = f(this, w).get(e.queryHash)) == null ? void 0 : n.state.data;
|
|
636
636
|
}
|
|
637
637
|
ensureQueryData(t) {
|
|
638
638
|
const e = this.getQueryData(t.queryKey);
|
|
639
639
|
if (e === void 0)
|
|
640
640
|
return this.fetchQuery(t);
|
|
641
641
|
{
|
|
642
|
-
const n = this.defaultQueryOptions(t), r =
|
|
643
|
-
return t.revalidateIfStale && r.isStaleByTime(
|
|
642
|
+
const n = this.defaultQueryOptions(t), r = f(this, w).build(this, n);
|
|
643
|
+
return t.revalidateIfStale && r.isStaleByTime(vt(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(e);
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
646
|
getQueriesData(t) {
|
|
647
|
-
return
|
|
647
|
+
return f(this, w).findAll(t).map(({ queryKey: e, state: n }) => {
|
|
648
648
|
const r = n.data;
|
|
649
649
|
return [e, r];
|
|
650
650
|
});
|
|
651
651
|
}
|
|
652
652
|
setQueryData(t, e, n) {
|
|
653
|
-
const r = this.defaultQueryOptions({ queryKey: t }), a =
|
|
653
|
+
const r = this.defaultQueryOptions({ queryKey: t }), a = f(this, w).get(
|
|
654
654
|
r.queryHash
|
|
655
|
-
), s = a == null ? void 0 : a.state.data, i =
|
|
655
|
+
), s = a == null ? void 0 : a.state.data, i = ra(e, s);
|
|
656
656
|
if (i !== void 0)
|
|
657
|
-
return
|
|
657
|
+
return f(this, w).build(this, r).setData(i, { ...n, manual: !0 });
|
|
658
658
|
}
|
|
659
659
|
setQueriesData(t, e, n) {
|
|
660
660
|
return E.batch(
|
|
661
|
-
() =>
|
|
661
|
+
() => f(this, w).findAll(t).map(({ queryKey: r }) => [
|
|
662
662
|
r,
|
|
663
663
|
this.setQueryData(r, e, n)
|
|
664
664
|
])
|
|
@@ -667,10 +667,10 @@ var w, G, H, ne, re, q, ae, oe, Pt, Ta = (Pt = class {
|
|
|
667
667
|
getQueryState(t) {
|
|
668
668
|
var n;
|
|
669
669
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
670
|
-
return (n =
|
|
670
|
+
return (n = f(this, w).get(e.queryHash)) == null ? void 0 : n.state;
|
|
671
671
|
}
|
|
672
672
|
removeQueries(t) {
|
|
673
|
-
const e =
|
|
673
|
+
const e = f(this, w);
|
|
674
674
|
E.batch(() => {
|
|
675
675
|
e.findAll(t).forEach((n) => {
|
|
676
676
|
e.remove(n);
|
|
@@ -678,7 +678,7 @@ var w, G, H, ne, re, q, ae, oe, Pt, Ta = (Pt = class {
|
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
680
|
resetQueries(t, e) {
|
|
681
|
-
const n =
|
|
681
|
+
const n = f(this, w), r = {
|
|
682
682
|
type: "active",
|
|
683
683
|
...t
|
|
684
684
|
};
|
|
@@ -688,13 +688,13 @@ var w, G, H, ne, re, q, ae, oe, Pt, Ta = (Pt = class {
|
|
|
688
688
|
}
|
|
689
689
|
cancelQueries(t = {}, e = {}) {
|
|
690
690
|
const n = { revert: !0, ...e }, r = E.batch(
|
|
691
|
-
() =>
|
|
691
|
+
() => f(this, w).findAll(t).map((a) => a.cancel(n))
|
|
692
692
|
);
|
|
693
693
|
return Promise.all(r).then($).catch($);
|
|
694
694
|
}
|
|
695
695
|
invalidateQueries(t = {}, e = {}) {
|
|
696
696
|
return E.batch(() => {
|
|
697
|
-
if (
|
|
697
|
+
if (f(this, w).findAll(t).forEach((r) => {
|
|
698
698
|
r.invalidate();
|
|
699
699
|
}), t.refetchType === "none")
|
|
700
700
|
return Promise.resolve();
|
|
@@ -710,7 +710,7 @@ var w, G, H, ne, re, q, ae, oe, Pt, Ta = (Pt = class {
|
|
|
710
710
|
...e,
|
|
711
711
|
cancelRefetch: (e == null ? void 0 : e.cancelRefetch) ?? !0
|
|
712
712
|
}, r = E.batch(
|
|
713
|
-
() =>
|
|
713
|
+
() => f(this, w).findAll(t).filter((a) => !a.isDisabled()).map((a) => {
|
|
714
714
|
let s = a.fetch(void 0, n);
|
|
715
715
|
return n.throwOnError || (s = s.catch($)), a.state.fetchStatus === "paused" ? Promise.resolve() : s;
|
|
716
716
|
})
|
|
@@ -720,94 +720,94 @@ var w, G, H, ne, re, q, ae, oe, Pt, Ta = (Pt = class {
|
|
|
720
720
|
fetchQuery(t) {
|
|
721
721
|
const e = this.defaultQueryOptions(t);
|
|
722
722
|
e.retry === void 0 && (e.retry = !1);
|
|
723
|
-
const n =
|
|
723
|
+
const n = f(this, w).build(this, e);
|
|
724
724
|
return n.isStaleByTime(
|
|
725
|
-
|
|
725
|
+
vt(e.staleTime, n)
|
|
726
726
|
) ? n.fetch(e) : Promise.resolve(n.state.data);
|
|
727
727
|
}
|
|
728
728
|
prefetchQuery(t) {
|
|
729
729
|
return this.fetchQuery(t).then($).catch($);
|
|
730
730
|
}
|
|
731
731
|
fetchInfiniteQuery(t) {
|
|
732
|
-
return t.behavior =
|
|
732
|
+
return t.behavior = Ta(t.pages), this.fetchQuery(t);
|
|
733
733
|
}
|
|
734
734
|
prefetchInfiniteQuery(t) {
|
|
735
735
|
return this.fetchInfiniteQuery(t).then($).catch($);
|
|
736
736
|
}
|
|
737
737
|
resumePausedMutations() {
|
|
738
|
-
return
|
|
738
|
+
return gt.isOnline() ? f(this, G).resumePausedMutations() : Promise.resolve();
|
|
739
739
|
}
|
|
740
740
|
getQueryCache() {
|
|
741
|
-
return
|
|
741
|
+
return f(this, w);
|
|
742
742
|
}
|
|
743
743
|
getMutationCache() {
|
|
744
|
-
return
|
|
744
|
+
return f(this, G);
|
|
745
745
|
}
|
|
746
746
|
getDefaultOptions() {
|
|
747
|
-
return
|
|
747
|
+
return f(this, q);
|
|
748
748
|
}
|
|
749
749
|
setDefaultOptions(t) {
|
|
750
|
-
|
|
750
|
+
M(this, q, t);
|
|
751
751
|
}
|
|
752
752
|
setQueryDefaults(t, e) {
|
|
753
|
-
|
|
753
|
+
f(this, ne).set(xt(t), {
|
|
754
754
|
queryKey: t,
|
|
755
755
|
defaultOptions: e
|
|
756
756
|
});
|
|
757
757
|
}
|
|
758
758
|
getQueryDefaults(t) {
|
|
759
|
-
const e = [...
|
|
759
|
+
const e = [...f(this, ne).values()];
|
|
760
760
|
let n = {};
|
|
761
761
|
return e.forEach((r) => {
|
|
762
|
-
|
|
762
|
+
yt(t, r.queryKey) && (n = { ...n, ...r.defaultOptions });
|
|
763
763
|
}), n;
|
|
764
764
|
}
|
|
765
765
|
setMutationDefaults(t, e) {
|
|
766
|
-
|
|
766
|
+
f(this, re).set(xt(t), {
|
|
767
767
|
mutationKey: t,
|
|
768
768
|
defaultOptions: e
|
|
769
769
|
});
|
|
770
770
|
}
|
|
771
771
|
getMutationDefaults(t) {
|
|
772
|
-
const e = [...
|
|
772
|
+
const e = [...f(this, re).values()];
|
|
773
773
|
let n = {};
|
|
774
774
|
return e.forEach((r) => {
|
|
775
|
-
|
|
775
|
+
yt(t, r.mutationKey) && (n = { ...n, ...r.defaultOptions });
|
|
776
776
|
}), n;
|
|
777
777
|
}
|
|
778
778
|
defaultQueryOptions(t) {
|
|
779
779
|
if (t._defaulted)
|
|
780
780
|
return t;
|
|
781
781
|
const e = {
|
|
782
|
-
...
|
|
782
|
+
...f(this, q).queries,
|
|
783
783
|
...this.getQueryDefaults(t.queryKey),
|
|
784
784
|
...t,
|
|
785
785
|
_defaulted: !0
|
|
786
786
|
};
|
|
787
|
-
return e.queryHash || (e.queryHash =
|
|
787
|
+
return e.queryHash || (e.queryHash = Bt(
|
|
788
788
|
e.queryKey,
|
|
789
789
|
e
|
|
790
|
-
)), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.enabled !== !0 && e.queryFn ===
|
|
790
|
+
)), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.enabled !== !0 && e.queryFn === aa && (e.enabled = !1), e;
|
|
791
791
|
}
|
|
792
792
|
defaultMutationOptions(t) {
|
|
793
793
|
return t != null && t._defaulted ? t : {
|
|
794
|
-
...
|
|
794
|
+
...f(this, q).mutations,
|
|
795
795
|
...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
|
|
796
796
|
...t,
|
|
797
797
|
_defaulted: !0
|
|
798
798
|
};
|
|
799
799
|
}
|
|
800
800
|
clear() {
|
|
801
|
-
|
|
801
|
+
f(this, w).clear(), f(this, G).clear();
|
|
802
802
|
}
|
|
803
|
-
}, w = new WeakMap(), G = new WeakMap(),
|
|
804
|
-
const
|
|
803
|
+
}, w = new WeakMap(), G = new WeakMap(), q = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), H = new WeakMap(), ae = new WeakMap(), oe = new WeakMap(), Rt);
|
|
804
|
+
const La = Ot(null), Le = {
|
|
805
805
|
didCatch: !1,
|
|
806
806
|
error: null
|
|
807
807
|
};
|
|
808
|
-
class
|
|
808
|
+
class Ka extends Qr {
|
|
809
809
|
constructor(e) {
|
|
810
|
-
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
810
|
+
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Le;
|
|
811
811
|
}
|
|
812
812
|
static getDerivedStateFromError(e) {
|
|
813
813
|
return {
|
|
@@ -825,7 +825,7 @@ class Fa extends $r {
|
|
|
825
825
|
(n = (r = this.props).onReset) === null || n === void 0 || n.call(r, {
|
|
826
826
|
args: s,
|
|
827
827
|
reason: "imperative-api"
|
|
828
|
-
}), this.setState(
|
|
828
|
+
}), this.setState(Le);
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
831
|
componentDidCatch(e, n) {
|
|
@@ -838,13 +838,13 @@ class Fa extends $r {
|
|
|
838
838
|
} = this.state, {
|
|
839
839
|
resetKeys: a
|
|
840
840
|
} = this.props;
|
|
841
|
-
if (r && n.error !== null &&
|
|
841
|
+
if (r && n.error !== null && $a(e.resetKeys, a)) {
|
|
842
842
|
var s, i;
|
|
843
843
|
(s = (i = this.props).onReset) === null || s === void 0 || s.call(i, {
|
|
844
844
|
next: a,
|
|
845
845
|
prev: e.resetKeys,
|
|
846
846
|
reason: "keys"
|
|
847
|
-
}), this.setState(
|
|
847
|
+
}), this.setState(Le);
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
850
|
render() {
|
|
@@ -866,13 +866,13 @@ class Fa extends $r {
|
|
|
866
866
|
if (typeof n == "function")
|
|
867
867
|
u = n(h);
|
|
868
868
|
else if (r)
|
|
869
|
-
u =
|
|
870
|
-
else if (a === null ||
|
|
869
|
+
u = ft(r, h);
|
|
870
|
+
else if (a === null || Ur(a))
|
|
871
871
|
u = a;
|
|
872
872
|
else
|
|
873
873
|
throw i;
|
|
874
874
|
}
|
|
875
|
-
return
|
|
875
|
+
return ft(La.Provider, {
|
|
876
876
|
value: {
|
|
877
877
|
didCatch: s,
|
|
878
878
|
error: i,
|
|
@@ -881,34 +881,34 @@ class Fa extends $r {
|
|
|
881
881
|
}, u);
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function $a() {
|
|
885
885
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
886
886
|
return t.length !== e.length || t.some((n, r) => !Object.is(n, e[r]));
|
|
887
887
|
}
|
|
888
|
-
const
|
|
889
|
-
class
|
|
888
|
+
const Ba = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function", Qa = (t) => "getRoutes" in t && typeof t.getRoutes == "function", Ua = (t) => "initialize" in t && typeof t.initialize == "function", Ga = (t) => "getHead" in t && typeof t.getHead == "function", qa = (t) => "getIdentities" in t && typeof t.getIdentities == "function", Ht = new Fa();
|
|
889
|
+
class Ha {
|
|
890
890
|
constructor(e) {
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
891
|
+
j(this, "plugins", []);
|
|
892
|
+
j(this, "navigation");
|
|
893
|
+
j(this, "meta");
|
|
894
|
+
j(this, "page");
|
|
895
|
+
j(this, "authentication");
|
|
896
|
+
j(this, "navigationPlugins");
|
|
897
|
+
j(this, "initialize", async () => {
|
|
898
898
|
await Promise.all([
|
|
899
|
-
this.plugins.filter(
|
|
899
|
+
this.plugins.filter(Ua).map((e) => {
|
|
900
900
|
var n;
|
|
901
901
|
return (n = e.initialize) == null ? void 0 : n.call(e, this);
|
|
902
902
|
})
|
|
903
903
|
]);
|
|
904
904
|
});
|
|
905
|
-
|
|
905
|
+
j(this, "invalidateCache", async (e) => {
|
|
906
906
|
await Ht.invalidateQueries({ queryKey: e });
|
|
907
907
|
});
|
|
908
|
-
|
|
909
|
-
this.plugins.filter(
|
|
908
|
+
j(this, "getApiIdentities", async () => (await Promise.all(
|
|
909
|
+
this.plugins.filter(qa).map((n) => n.getIdentities(this))
|
|
910
910
|
)).flat());
|
|
911
|
-
|
|
911
|
+
j(this, "getNavigation", async (e) => (await Promise.all(
|
|
912
912
|
this.navigationPlugins.map(
|
|
913
913
|
async (r) => {
|
|
914
914
|
var a;
|
|
@@ -916,30 +916,32 @@ class Ga {
|
|
|
916
916
|
}
|
|
917
917
|
)
|
|
918
918
|
)).flatMap((r) => r ?? []));
|
|
919
|
-
|
|
919
|
+
j(this, "signRequest", async (e) => {
|
|
920
920
|
if (!this.authentication)
|
|
921
921
|
throw new Error("No authentication provider configured");
|
|
922
922
|
const n = await this.authentication.getAccessToken();
|
|
923
923
|
return e.headers.set("Authorization", `Bearer ${n}`), e;
|
|
924
924
|
});
|
|
925
|
-
this.plugins = e.plugins ?? [], this.navigation = e.navigation, this.navigationPlugins = this.plugins.filter(
|
|
925
|
+
this.plugins = e.plugins ?? [], this.navigation = e.navigation, this.navigationPlugins = this.plugins.filter(Qa), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page;
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
|
-
function
|
|
929
|
-
return /* @__PURE__ */ o.jsx(
|
|
928
|
+
function za({ error: t, resetErrorBoundary: e }) {
|
|
929
|
+
return /* @__PURE__ */ o.jsx(Et, { error: t });
|
|
930
930
|
}
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
931
|
+
const Pe = globalThis;
|
|
932
|
+
(!Pe.requestIdleCallback || !Pe.cancelIdleCallback) && (Pe.requestIdleCallback = (t) => setTimeout(t, 1), Pe.cancelIdleCallback = clearTimeout);
|
|
933
|
+
var Ue = ["Enter", " "], Va = ["ArrowDown", "PageUp", "Home"], zt = ["ArrowUp", "PageDown", "End"], Ya = [...Va, ...zt], Xa = {
|
|
934
|
+
ltr: [...Ue, "ArrowRight"],
|
|
935
|
+
rtl: [...Ue, "ArrowLeft"]
|
|
936
|
+
}, Wa = {
|
|
935
937
|
ltr: ["ArrowLeft"],
|
|
936
938
|
rtl: ["ArrowRight"]
|
|
937
|
-
}, ge = "Menu", [le,
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
]), ve =
|
|
942
|
-
const { __scopeMenu: e, open: n = !1, children: r, dir: a, onOpenChange: s, modal: i = !0 } = t, u = ve(e), [h, l] = c.useState(null), m = c.useRef(!1), d =
|
|
939
|
+
}, ge = "Menu", [le, Ja, Za] = Sr(ge), [J, Vt] = St(ge, [
|
|
940
|
+
Za,
|
|
941
|
+
jt,
|
|
942
|
+
kt
|
|
943
|
+
]), ve = jt(), Yt = kt(), [Xt, z] = J(ge), [eo, xe] = J(ge), Wt = (t) => {
|
|
944
|
+
const { __scopeMenu: e, open: n = !1, children: r, dir: a, onOpenChange: s, modal: i = !0 } = t, u = ve(e), [h, l] = c.useState(null), m = c.useRef(!1), d = He(s), p = Kr(a);
|
|
943
945
|
return c.useEffect(() => {
|
|
944
946
|
const v = () => {
|
|
945
947
|
m.current = !0, document.addEventListener("pointerdown", x, { capture: !0, once: !0 }), document.addEventListener("pointermove", x, { capture: !0, once: !0 });
|
|
@@ -947,8 +949,8 @@ var Be = ["Enter", " "], qa = ["ArrowDown", "PageUp", "Home"], qt = ["ArrowUp",
|
|
|
947
949
|
return document.addEventListener("keydown", v, { capture: !0 }), () => {
|
|
948
950
|
document.removeEventListener("keydown", v, { capture: !0 }), document.removeEventListener("pointerdown", x, { capture: !0 }), document.removeEventListener("pointermove", x, { capture: !0 });
|
|
949
951
|
};
|
|
950
|
-
}, []), /* @__PURE__ */ o.jsx(
|
|
951
|
-
|
|
952
|
+
}, []), /* @__PURE__ */ o.jsx(Dt, { ...u, children: /* @__PURE__ */ o.jsx(
|
|
953
|
+
Xt,
|
|
952
954
|
{
|
|
953
955
|
scope: e,
|
|
954
956
|
open: n,
|
|
@@ -956,12 +958,12 @@ var Be = ["Enter", " "], qa = ["ArrowDown", "PageUp", "Home"], qt = ["ArrowUp",
|
|
|
956
958
|
content: h,
|
|
957
959
|
onContentChange: l,
|
|
958
960
|
children: /* @__PURE__ */ o.jsx(
|
|
959
|
-
|
|
961
|
+
eo,
|
|
960
962
|
{
|
|
961
963
|
scope: e,
|
|
962
964
|
onClose: c.useCallback(() => d(!1), [d]),
|
|
963
965
|
isUsingKeyboardRef: m,
|
|
964
|
-
dir:
|
|
966
|
+
dir: p,
|
|
965
967
|
modal: i,
|
|
966
968
|
children: r
|
|
967
969
|
}
|
|
@@ -969,34 +971,34 @@ var Be = ["Enter", " "], qa = ["ArrowDown", "PageUp", "Home"], qt = ["ArrowUp",
|
|
|
969
971
|
}
|
|
970
972
|
) });
|
|
971
973
|
};
|
|
972
|
-
|
|
973
|
-
var
|
|
974
|
+
Wt.displayName = ge;
|
|
975
|
+
var to = "MenuAnchor", Je = c.forwardRef(
|
|
974
976
|
(t, e) => {
|
|
975
977
|
const { __scopeMenu: n, ...r } = t, a = ve(n);
|
|
976
|
-
return /* @__PURE__ */ o.jsx(
|
|
978
|
+
return /* @__PURE__ */ o.jsx(jr, { ...a, ...r, ref: e });
|
|
977
979
|
}
|
|
978
980
|
);
|
|
979
|
-
|
|
980
|
-
var
|
|
981
|
+
Je.displayName = to;
|
|
982
|
+
var Ze = "MenuPortal", [no, Jt] = J(Ze, {
|
|
981
983
|
forceMount: void 0
|
|
982
|
-
}),
|
|
983
|
-
const { __scopeMenu: e, forceMount: n, children: r, container: a } = t, s = z(
|
|
984
|
-
return /* @__PURE__ */ o.jsx(
|
|
984
|
+
}), Zt = (t) => {
|
|
985
|
+
const { __scopeMenu: e, forceMount: n, children: r, container: a } = t, s = z(Ze, e);
|
|
986
|
+
return /* @__PURE__ */ o.jsx(no, { scope: e, forceMount: n, children: /* @__PURE__ */ o.jsx(Ie, { present: n || s.open, children: /* @__PURE__ */ o.jsx($r, { asChild: !0, container: a, children: r }) }) });
|
|
985
987
|
};
|
|
986
|
-
|
|
987
|
-
var D = "MenuContent", [
|
|
988
|
+
Zt.displayName = Ze;
|
|
989
|
+
var D = "MenuContent", [ro, et] = J(D), en = c.forwardRef(
|
|
988
990
|
(t, e) => {
|
|
989
|
-
const n =
|
|
990
|
-
return /* @__PURE__ */ o.jsx(le.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ o.jsx(
|
|
991
|
+
const n = Jt(D, t.__scopeMenu), { forceMount: r = n.forceMount, ...a } = t, s = z(D, t.__scopeMenu), i = xe(D, t.__scopeMenu);
|
|
992
|
+
return /* @__PURE__ */ o.jsx(le.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ o.jsx(Ie, { present: r || s.open, children: /* @__PURE__ */ o.jsx(le.Slot, { scope: t.__scopeMenu, children: i.modal ? /* @__PURE__ */ o.jsx(ao, { ...a, ref: e }) : /* @__PURE__ */ o.jsx(oo, { ...a, ref: e }) }) }) });
|
|
991
993
|
}
|
|
992
|
-
),
|
|
994
|
+
), ao = c.forwardRef(
|
|
993
995
|
(t, e) => {
|
|
994
|
-
const n = z(D, t.__scopeMenu), r = c.useRef(null), a =
|
|
996
|
+
const n = z(D, t.__scopeMenu), r = c.useRef(null), a = pe(e, r);
|
|
995
997
|
return c.useEffect(() => {
|
|
996
998
|
const s = r.current;
|
|
997
|
-
if (s) return
|
|
999
|
+
if (s) return Nr(s);
|
|
998
1000
|
}, []), /* @__PURE__ */ o.jsx(
|
|
999
|
-
|
|
1001
|
+
tt,
|
|
1000
1002
|
{
|
|
1001
1003
|
...t,
|
|
1002
1004
|
ref: a,
|
|
@@ -1012,10 +1014,10 @@ var D = "MenuContent", [to, Je] = J(D), Zt = c.forwardRef(
|
|
|
1012
1014
|
}
|
|
1013
1015
|
);
|
|
1014
1016
|
}
|
|
1015
|
-
),
|
|
1017
|
+
), oo = c.forwardRef((t, e) => {
|
|
1016
1018
|
const n = z(D, t.__scopeMenu);
|
|
1017
1019
|
return /* @__PURE__ */ o.jsx(
|
|
1018
|
-
|
|
1020
|
+
tt,
|
|
1019
1021
|
{
|
|
1020
1022
|
...t,
|
|
1021
1023
|
ref: e,
|
|
@@ -1025,7 +1027,7 @@ var D = "MenuContent", [to, Je] = J(D), Zt = c.forwardRef(
|
|
|
1025
1027
|
onDismiss: () => n.onOpenChange(!1)
|
|
1026
1028
|
}
|
|
1027
1029
|
);
|
|
1028
|
-
}),
|
|
1030
|
+
}), tt = c.forwardRef(
|
|
1029
1031
|
(t, e) => {
|
|
1030
1032
|
const {
|
|
1031
1033
|
__scopeMenu: n,
|
|
@@ -1038,24 +1040,24 @@ var D = "MenuContent", [to, Je] = J(D), Zt = c.forwardRef(
|
|
|
1038
1040
|
onEscapeKeyDown: l,
|
|
1039
1041
|
onPointerDownOutside: m,
|
|
1040
1042
|
onFocusOutside: d,
|
|
1041
|
-
onInteractOutside:
|
|
1043
|
+
onInteractOutside: p,
|
|
1042
1044
|
onDismiss: v,
|
|
1043
1045
|
disableOutsideScroll: x,
|
|
1044
1046
|
...R
|
|
1045
|
-
} = t, F = z(D, n), Q = xe(D, n), V = ve(n),
|
|
1046
|
-
var te,
|
|
1047
|
-
const S = we.current + g,
|
|
1048
|
-
(function K(
|
|
1049
|
-
we.current =
|
|
1047
|
+
} = t, F = z(D, n), Q = xe(D, n), V = ve(n), b = Yt(n), I = Ja(n), [L, Y] = c.useState(null), Z = c.useRef(null), ye = pe(e, Z, F.onContentChange), X = c.useRef(0), we = c.useRef(""), nr = c.useRef(0), Oe = c.useRef(null), it = c.useRef("right"), Te = c.useRef(0), rr = x ? kr : c.Fragment, ar = x ? { as: Fr, allowPinchZoom: !0 } : void 0, or = (g) => {
|
|
1048
|
+
var te, ut;
|
|
1049
|
+
const S = we.current + g, A = I().filter((K) => !K.disabled), U = document.activeElement, ke = (te = A.find((K) => K.ref.current === U)) == null ? void 0 : te.textValue, Fe = A.map((K) => K.textValue), ct = xo(Fe, S, ke), ce = (ut = A.find((K) => K.textValue === ct)) == null ? void 0 : ut.ref.current;
|
|
1050
|
+
(function K(lt) {
|
|
1051
|
+
we.current = lt, window.clearTimeout(X.current), lt !== "" && (X.current = window.setTimeout(() => K(""), 1e3));
|
|
1050
1052
|
})(S), ce && setTimeout(() => ce.focus());
|
|
1051
1053
|
};
|
|
1052
|
-
c.useEffect(() => () => window.clearTimeout(X.current), []),
|
|
1054
|
+
c.useEffect(() => () => window.clearTimeout(X.current), []), Dr();
|
|
1053
1055
|
const ee = c.useCallback((g) => {
|
|
1054
|
-
var
|
|
1055
|
-
return
|
|
1056
|
+
var A, U;
|
|
1057
|
+
return it.current === ((A = Oe.current) == null ? void 0 : A.side) && wo(g, (U = Oe.current) == null ? void 0 : U.area);
|
|
1056
1058
|
}, []);
|
|
1057
1059
|
return /* @__PURE__ */ o.jsx(
|
|
1058
|
-
|
|
1060
|
+
ro,
|
|
1059
1061
|
{
|
|
1060
1062
|
scope: n,
|
|
1061
1063
|
searchRef: we,
|
|
@@ -1078,12 +1080,12 @@ var D = "MenuContent", [to, Je] = J(D), Zt = c.forwardRef(
|
|
|
1078
1080
|
},
|
|
1079
1081
|
[ee]
|
|
1080
1082
|
),
|
|
1081
|
-
pointerGraceTimerRef:
|
|
1083
|
+
pointerGraceTimerRef: nr,
|
|
1082
1084
|
onPointerGraceIntentChange: c.useCallback((g) => {
|
|
1083
|
-
|
|
1085
|
+
Oe.current = g;
|
|
1084
1086
|
}, []),
|
|
1085
|
-
children: /* @__PURE__ */ o.jsx(
|
|
1086
|
-
|
|
1087
|
+
children: /* @__PURE__ */ o.jsx(rr, { ...ar, children: /* @__PURE__ */ o.jsx(
|
|
1088
|
+
Ir,
|
|
1087
1089
|
{
|
|
1088
1090
|
asChild: !0,
|
|
1089
1091
|
trapped: a,
|
|
@@ -1093,20 +1095,20 @@ var D = "MenuContent", [to, Je] = J(D), Zt = c.forwardRef(
|
|
|
1093
1095
|
}),
|
|
1094
1096
|
onUnmountAutoFocus: i,
|
|
1095
1097
|
children: /* @__PURE__ */ o.jsx(
|
|
1096
|
-
|
|
1098
|
+
Ar,
|
|
1097
1099
|
{
|
|
1098
1100
|
asChild: !0,
|
|
1099
1101
|
disableOutsidePointerEvents: u,
|
|
1100
1102
|
onEscapeKeyDown: l,
|
|
1101
1103
|
onPointerDownOutside: m,
|
|
1102
1104
|
onFocusOutside: d,
|
|
1103
|
-
onInteractOutside:
|
|
1105
|
+
onInteractOutside: p,
|
|
1104
1106
|
onDismiss: v,
|
|
1105
1107
|
children: /* @__PURE__ */ o.jsx(
|
|
1106
|
-
|
|
1108
|
+
Yr,
|
|
1107
1109
|
{
|
|
1108
1110
|
asChild: !0,
|
|
1109
|
-
...
|
|
1111
|
+
...b,
|
|
1110
1112
|
dir: Q.dir,
|
|
1111
1113
|
orientation: "vertical",
|
|
1112
1114
|
loop: r,
|
|
@@ -1117,11 +1119,11 @@ var D = "MenuContent", [to, Je] = J(D), Zt = c.forwardRef(
|
|
|
1117
1119
|
}),
|
|
1118
1120
|
preventScrollOnEntryFocus: !0,
|
|
1119
1121
|
children: /* @__PURE__ */ o.jsx(
|
|
1120
|
-
|
|
1122
|
+
Or,
|
|
1121
1123
|
{
|
|
1122
1124
|
role: "menu",
|
|
1123
1125
|
"aria-orientation": "vertical",
|
|
1124
|
-
"data-state":
|
|
1126
|
+
"data-state": xn(F.open),
|
|
1125
1127
|
"data-radix-menu-content": "",
|
|
1126
1128
|
dir: Q.dir,
|
|
1127
1129
|
...V,
|
|
@@ -1129,13 +1131,13 @@ var D = "MenuContent", [to, Je] = J(D), Zt = c.forwardRef(
|
|
|
1129
1131
|
ref: ye,
|
|
1130
1132
|
style: { outline: "none", ...R.style },
|
|
1131
1133
|
onKeyDown: y(R.onKeyDown, (g) => {
|
|
1132
|
-
const
|
|
1133
|
-
|
|
1134
|
-
const
|
|
1135
|
-
if (g.target !==
|
|
1134
|
+
const A = g.target.closest("[data-radix-menu-content]") === g.currentTarget, U = g.ctrlKey || g.altKey || g.metaKey, ke = g.key.length === 1;
|
|
1135
|
+
A && (g.key === "Tab" && g.preventDefault(), !U && ke && or(g.key));
|
|
1136
|
+
const Fe = Z.current;
|
|
1137
|
+
if (g.target !== Fe || !Ya.includes(g.key)) return;
|
|
1136
1138
|
g.preventDefault();
|
|
1137
|
-
const ce =
|
|
1138
|
-
|
|
1139
|
+
const ce = I().filter((te) => !te.disabled).map((te) => te.ref.current);
|
|
1140
|
+
zt.includes(g.key) && ce.reverse(), go(ce);
|
|
1139
1141
|
}),
|
|
1140
1142
|
onBlur: y(t.onBlur, (g) => {
|
|
1141
1143
|
g.currentTarget.contains(g.target) || (window.clearTimeout(X.current), we.current = "");
|
|
@@ -1143,10 +1145,10 @@ var D = "MenuContent", [to, Je] = J(D), Zt = c.forwardRef(
|
|
|
1143
1145
|
onPointerMove: y(
|
|
1144
1146
|
t.onPointerMove,
|
|
1145
1147
|
de((g) => {
|
|
1146
|
-
const S = g.target,
|
|
1147
|
-
if (g.currentTarget.contains(S) &&
|
|
1148
|
-
const U = g.clientX >
|
|
1149
|
-
|
|
1148
|
+
const S = g.target, A = Te.current !== g.clientX;
|
|
1149
|
+
if (g.currentTarget.contains(S) && A) {
|
|
1150
|
+
const U = g.clientX > Te.current ? "right" : "left";
|
|
1151
|
+
it.current = U, Te.current = g.clientX;
|
|
1150
1152
|
}
|
|
1151
1153
|
})
|
|
1152
1154
|
)
|
|
@@ -1162,57 +1164,57 @@ var D = "MenuContent", [to, Je] = J(D), Zt = c.forwardRef(
|
|
|
1162
1164
|
);
|
|
1163
1165
|
}
|
|
1164
1166
|
);
|
|
1165
|
-
|
|
1166
|
-
var
|
|
1167
|
+
en.displayName = D;
|
|
1168
|
+
var so = "MenuGroup", nt = c.forwardRef(
|
|
1167
1169
|
(t, e) => {
|
|
1168
1170
|
const { __scopeMenu: n, ...r } = t;
|
|
1169
1171
|
return /* @__PURE__ */ o.jsx(ie.div, { role: "group", ...r, ref: e });
|
|
1170
1172
|
}
|
|
1171
1173
|
);
|
|
1172
|
-
|
|
1173
|
-
var
|
|
1174
|
+
nt.displayName = so;
|
|
1175
|
+
var io = "MenuLabel", tn = c.forwardRef(
|
|
1174
1176
|
(t, e) => {
|
|
1175
1177
|
const { __scopeMenu: n, ...r } = t;
|
|
1176
1178
|
return /* @__PURE__ */ o.jsx(ie.div, { ...r, ref: e });
|
|
1177
1179
|
}
|
|
1178
1180
|
);
|
|
1179
|
-
|
|
1180
|
-
var
|
|
1181
|
+
tn.displayName = io;
|
|
1182
|
+
var je = "MenuItem", Mt = "menu.itemSelect", Ae = c.forwardRef(
|
|
1181
1183
|
(t, e) => {
|
|
1182
|
-
const { disabled: n = !1, onSelect: r, ...a } = t, s = c.useRef(null), i = xe(
|
|
1184
|
+
const { disabled: n = !1, onSelect: r, ...a } = t, s = c.useRef(null), i = xe(je, t.__scopeMenu), u = et(je, t.__scopeMenu), h = pe(e, s), l = c.useRef(!1), m = () => {
|
|
1183
1185
|
const d = s.current;
|
|
1184
1186
|
if (!n && d) {
|
|
1185
|
-
const
|
|
1186
|
-
d.addEventListener(Mt, (v) => r == null ? void 0 : r(v), { once: !0 }),
|
|
1187
|
+
const p = new CustomEvent(Mt, { bubbles: !0, cancelable: !0 });
|
|
1188
|
+
d.addEventListener(Mt, (v) => r == null ? void 0 : r(v), { once: !0 }), Lr(d, p), p.defaultPrevented ? l.current = !1 : i.onClose();
|
|
1187
1189
|
}
|
|
1188
1190
|
};
|
|
1189
1191
|
return /* @__PURE__ */ o.jsx(
|
|
1190
|
-
|
|
1192
|
+
nn,
|
|
1191
1193
|
{
|
|
1192
1194
|
...a,
|
|
1193
1195
|
ref: h,
|
|
1194
1196
|
disabled: n,
|
|
1195
1197
|
onClick: y(t.onClick, m),
|
|
1196
1198
|
onPointerDown: (d) => {
|
|
1197
|
-
var
|
|
1198
|
-
(
|
|
1199
|
+
var p;
|
|
1200
|
+
(p = t.onPointerDown) == null || p.call(t, d), l.current = !0;
|
|
1199
1201
|
},
|
|
1200
1202
|
onPointerUp: y(t.onPointerUp, (d) => {
|
|
1201
|
-
var
|
|
1202
|
-
l.current || (
|
|
1203
|
+
var p;
|
|
1204
|
+
l.current || (p = d.currentTarget) == null || p.click();
|
|
1203
1205
|
}),
|
|
1204
1206
|
onKeyDown: y(t.onKeyDown, (d) => {
|
|
1205
|
-
const
|
|
1206
|
-
n ||
|
|
1207
|
+
const p = u.searchRef.current !== "";
|
|
1208
|
+
n || p && d.key === " " || Ue.includes(d.key) && (d.currentTarget.click(), d.preventDefault());
|
|
1207
1209
|
})
|
|
1208
1210
|
}
|
|
1209
1211
|
);
|
|
1210
1212
|
}
|
|
1211
1213
|
);
|
|
1212
|
-
|
|
1213
|
-
var
|
|
1214
|
+
Ae.displayName = je;
|
|
1215
|
+
var nn = c.forwardRef(
|
|
1214
1216
|
(t, e) => {
|
|
1215
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: a, ...s } = t, i =
|
|
1217
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: a, ...s } = t, i = et(je, n), u = Yt(n), h = c.useRef(null), l = pe(e, h), [m, d] = c.useState(!1), [p, v] = c.useState("");
|
|
1216
1218
|
return c.useEffect(() => {
|
|
1217
1219
|
const x = h.current;
|
|
1218
1220
|
x && v((x.textContent ?? "").trim());
|
|
@@ -1221,8 +1223,8 @@ var tn = c.forwardRef(
|
|
|
1221
1223
|
{
|
|
1222
1224
|
scope: n,
|
|
1223
1225
|
disabled: r,
|
|
1224
|
-
textValue: a ??
|
|
1225
|
-
children: /* @__PURE__ */ o.jsx(
|
|
1226
|
+
textValue: a ?? p,
|
|
1227
|
+
children: /* @__PURE__ */ o.jsx(Xr, { asChild: !0, ...u, focusable: !r, children: /* @__PURE__ */ o.jsx(
|
|
1226
1228
|
ie.div,
|
|
1227
1229
|
{
|
|
1228
1230
|
role: "menuitem",
|
|
@@ -1248,49 +1250,49 @@ var tn = c.forwardRef(
|
|
|
1248
1250
|
}
|
|
1249
1251
|
);
|
|
1250
1252
|
}
|
|
1251
|
-
),
|
|
1253
|
+
), co = "MenuCheckboxItem", rn = c.forwardRef(
|
|
1252
1254
|
(t, e) => {
|
|
1253
1255
|
const { checked: n = !1, onCheckedChange: r, ...a } = t;
|
|
1254
|
-
return /* @__PURE__ */ o.jsx(
|
|
1255
|
-
|
|
1256
|
+
return /* @__PURE__ */ o.jsx(un, { scope: t.__scopeMenu, checked: n, children: /* @__PURE__ */ o.jsx(
|
|
1257
|
+
Ae,
|
|
1256
1258
|
{
|
|
1257
1259
|
role: "menuitemcheckbox",
|
|
1258
|
-
"aria-checked":
|
|
1260
|
+
"aria-checked": Ne(n) ? "mixed" : n,
|
|
1259
1261
|
...a,
|
|
1260
1262
|
ref: e,
|
|
1261
|
-
"data-state":
|
|
1263
|
+
"data-state": ot(n),
|
|
1262
1264
|
onSelect: y(
|
|
1263
1265
|
a.onSelect,
|
|
1264
|
-
() => r == null ? void 0 : r(
|
|
1266
|
+
() => r == null ? void 0 : r(Ne(n) ? !0 : !n),
|
|
1265
1267
|
{ checkForDefaultPrevented: !1 }
|
|
1266
1268
|
)
|
|
1267
1269
|
}
|
|
1268
1270
|
) });
|
|
1269
1271
|
}
|
|
1270
1272
|
);
|
|
1271
|
-
|
|
1272
|
-
var
|
|
1273
|
-
|
|
1273
|
+
rn.displayName = co;
|
|
1274
|
+
var an = "MenuRadioGroup", [uo, lo] = J(
|
|
1275
|
+
an,
|
|
1274
1276
|
{ value: void 0, onValueChange: () => {
|
|
1275
1277
|
} }
|
|
1276
|
-
),
|
|
1278
|
+
), on = c.forwardRef(
|
|
1277
1279
|
(t, e) => {
|
|
1278
|
-
const { value: n, onValueChange: r, ...a } = t, s =
|
|
1279
|
-
return /* @__PURE__ */ o.jsx(
|
|
1280
|
+
const { value: n, onValueChange: r, ...a } = t, s = He(r);
|
|
1281
|
+
return /* @__PURE__ */ o.jsx(uo, { scope: t.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ o.jsx(nt, { ...a, ref: e }) });
|
|
1280
1282
|
}
|
|
1281
1283
|
);
|
|
1282
|
-
|
|
1283
|
-
var
|
|
1284
|
+
on.displayName = an;
|
|
1285
|
+
var sn = "MenuRadioItem", cn = c.forwardRef(
|
|
1284
1286
|
(t, e) => {
|
|
1285
|
-
const { value: n, ...r } = t, a =
|
|
1286
|
-
return /* @__PURE__ */ o.jsx(
|
|
1287
|
-
|
|
1287
|
+
const { value: n, ...r } = t, a = lo(sn, t.__scopeMenu), s = n === a.value;
|
|
1288
|
+
return /* @__PURE__ */ o.jsx(un, { scope: t.__scopeMenu, checked: s, children: /* @__PURE__ */ o.jsx(
|
|
1289
|
+
Ae,
|
|
1288
1290
|
{
|
|
1289
1291
|
role: "menuitemradio",
|
|
1290
1292
|
"aria-checked": s,
|
|
1291
1293
|
...r,
|
|
1292
1294
|
ref: e,
|
|
1293
|
-
"data-state":
|
|
1295
|
+
"data-state": ot(s),
|
|
1294
1296
|
onSelect: y(
|
|
1295
1297
|
r.onSelect,
|
|
1296
1298
|
() => {
|
|
@@ -1303,31 +1305,31 @@ var on = "MenuRadioItem", sn = c.forwardRef(
|
|
|
1303
1305
|
) });
|
|
1304
1306
|
}
|
|
1305
1307
|
);
|
|
1306
|
-
|
|
1307
|
-
var
|
|
1308
|
-
|
|
1308
|
+
cn.displayName = sn;
|
|
1309
|
+
var rt = "MenuItemIndicator", [un, ho] = J(
|
|
1310
|
+
rt,
|
|
1309
1311
|
{ checked: !1 }
|
|
1310
|
-
),
|
|
1312
|
+
), ln = c.forwardRef(
|
|
1311
1313
|
(t, e) => {
|
|
1312
|
-
const { __scopeMenu: n, forceMount: r, ...a } = t, s =
|
|
1314
|
+
const { __scopeMenu: n, forceMount: r, ...a } = t, s = ho(rt, n);
|
|
1313
1315
|
return /* @__PURE__ */ o.jsx(
|
|
1314
|
-
|
|
1316
|
+
Ie,
|
|
1315
1317
|
{
|
|
1316
|
-
present: r ||
|
|
1318
|
+
present: r || Ne(s.checked) || s.checked === !0,
|
|
1317
1319
|
children: /* @__PURE__ */ o.jsx(
|
|
1318
1320
|
ie.span,
|
|
1319
1321
|
{
|
|
1320
1322
|
...a,
|
|
1321
1323
|
ref: e,
|
|
1322
|
-
"data-state":
|
|
1324
|
+
"data-state": ot(s.checked)
|
|
1323
1325
|
}
|
|
1324
1326
|
)
|
|
1325
1327
|
}
|
|
1326
1328
|
);
|
|
1327
1329
|
}
|
|
1328
1330
|
);
|
|
1329
|
-
|
|
1330
|
-
var
|
|
1331
|
+
ln.displayName = rt;
|
|
1332
|
+
var fo = "MenuSeparator", dn = c.forwardRef(
|
|
1331
1333
|
(t, e) => {
|
|
1332
1334
|
const { __scopeMenu: n, ...r } = t;
|
|
1333
1335
|
return /* @__PURE__ */ o.jsx(
|
|
@@ -1341,18 +1343,18 @@ var lo = "MenuSeparator", ln = c.forwardRef(
|
|
|
1341
1343
|
);
|
|
1342
1344
|
}
|
|
1343
1345
|
);
|
|
1344
|
-
|
|
1345
|
-
var
|
|
1346
|
+
dn.displayName = fo;
|
|
1347
|
+
var po = "MenuArrow", hn = c.forwardRef(
|
|
1346
1348
|
(t, e) => {
|
|
1347
1349
|
const { __scopeMenu: n, ...r } = t, a = ve(n);
|
|
1348
|
-
return /* @__PURE__ */ o.jsx(
|
|
1350
|
+
return /* @__PURE__ */ o.jsx(Tr, { ...a, ...r, ref: e });
|
|
1349
1351
|
}
|
|
1350
1352
|
);
|
|
1351
|
-
|
|
1352
|
-
var
|
|
1353
|
-
const { __scopeMenu: e, children: n, open: r = !1, onOpenChange: a } = t, s = z(
|
|
1354
|
-
return c.useEffect(() => (s.open === !1 && d(!1), () => d(!1)), [s.open, d]), /* @__PURE__ */ o.jsx(
|
|
1355
|
-
|
|
1353
|
+
hn.displayName = po;
|
|
1354
|
+
var at = "MenuSub", [mo, fn] = J(at), pn = (t) => {
|
|
1355
|
+
const { __scopeMenu: e, children: n, open: r = !1, onOpenChange: a } = t, s = z(at, e), i = ve(e), [u, h] = c.useState(null), [l, m] = c.useState(null), d = He(a);
|
|
1356
|
+
return c.useEffect(() => (s.open === !1 && d(!1), () => d(!1)), [s.open, d]), /* @__PURE__ */ o.jsx(Dt, { ...i, children: /* @__PURE__ */ o.jsx(
|
|
1357
|
+
Xt,
|
|
1356
1358
|
{
|
|
1357
1359
|
scope: e,
|
|
1358
1360
|
open: r,
|
|
@@ -1360,11 +1362,11 @@ var nt = "MenuSub", [po, hn] = J(nt), pn = (t) => {
|
|
|
1360
1362
|
content: l,
|
|
1361
1363
|
onContentChange: m,
|
|
1362
1364
|
children: /* @__PURE__ */ o.jsx(
|
|
1363
|
-
|
|
1365
|
+
mo,
|
|
1364
1366
|
{
|
|
1365
1367
|
scope: e,
|
|
1366
|
-
contentId:
|
|
1367
|
-
triggerId:
|
|
1368
|
+
contentId: Se(),
|
|
1369
|
+
triggerId: Se(),
|
|
1368
1370
|
trigger: u,
|
|
1369
1371
|
onTriggerChange: h,
|
|
1370
1372
|
children: n
|
|
@@ -1373,10 +1375,10 @@ var nt = "MenuSub", [po, hn] = J(nt), pn = (t) => {
|
|
|
1373
1375
|
}
|
|
1374
1376
|
) });
|
|
1375
1377
|
};
|
|
1376
|
-
pn.displayName =
|
|
1377
|
-
var ue = "MenuSubTrigger",
|
|
1378
|
+
pn.displayName = at;
|
|
1379
|
+
var ue = "MenuSubTrigger", mn = c.forwardRef(
|
|
1378
1380
|
(t, e) => {
|
|
1379
|
-
const n = z(ue, t.__scopeMenu), r = xe(ue, t.__scopeMenu), a =
|
|
1381
|
+
const n = z(ue, t.__scopeMenu), r = xe(ue, t.__scopeMenu), a = fn(ue, t.__scopeMenu), s = et(ue, t.__scopeMenu), i = c.useRef(null), { pointerGraceTimerRef: u, onPointerGraceIntentChange: h } = s, l = { __scopeMenu: t.__scopeMenu }, m = c.useCallback(() => {
|
|
1380
1382
|
i.current && window.clearTimeout(i.current), i.current = null;
|
|
1381
1383
|
}, []);
|
|
1382
1384
|
return c.useEffect(() => m, [m]), c.useEffect(() => {
|
|
@@ -1384,19 +1386,19 @@ var ue = "MenuSubTrigger", fn = c.forwardRef(
|
|
|
1384
1386
|
return () => {
|
|
1385
1387
|
window.clearTimeout(d), h(null);
|
|
1386
1388
|
};
|
|
1387
|
-
}, [u, h]), /* @__PURE__ */ o.jsx(
|
|
1388
|
-
|
|
1389
|
+
}, [u, h]), /* @__PURE__ */ o.jsx(Je, { asChild: !0, ...l, children: /* @__PURE__ */ o.jsx(
|
|
1390
|
+
nn,
|
|
1389
1391
|
{
|
|
1390
1392
|
id: a.triggerId,
|
|
1391
1393
|
"aria-haspopup": "menu",
|
|
1392
1394
|
"aria-expanded": n.open,
|
|
1393
1395
|
"aria-controls": a.contentId,
|
|
1394
|
-
"data-state":
|
|
1396
|
+
"data-state": xn(n.open),
|
|
1395
1397
|
...t,
|
|
1396
1398
|
ref: Nt(e, a.onTriggerChange),
|
|
1397
1399
|
onClick: (d) => {
|
|
1398
|
-
var
|
|
1399
|
-
(
|
|
1400
|
+
var p;
|
|
1401
|
+
(p = t.onClick) == null || p.call(t, d), !(t.disabled || d.defaultPrevented) && (d.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
1400
1402
|
},
|
|
1401
1403
|
onPointerMove: y(
|
|
1402
1404
|
t.onPointerMove,
|
|
@@ -1411,18 +1413,18 @@ var ue = "MenuSubTrigger", fn = c.forwardRef(
|
|
|
1411
1413
|
de((d) => {
|
|
1412
1414
|
var v, x;
|
|
1413
1415
|
m();
|
|
1414
|
-
const
|
|
1415
|
-
if (
|
|
1416
|
-
const R = (x = n.content) == null ? void 0 : x.dataset.side, F = R === "right", Q = F ? -5 : 5, V =
|
|
1416
|
+
const p = (v = n.content) == null ? void 0 : v.getBoundingClientRect();
|
|
1417
|
+
if (p) {
|
|
1418
|
+
const R = (x = n.content) == null ? void 0 : x.dataset.side, F = R === "right", Q = F ? -5 : 5, V = p[F ? "left" : "right"], b = p[F ? "right" : "left"];
|
|
1417
1419
|
s.onPointerGraceIntentChange({
|
|
1418
1420
|
area: [
|
|
1419
1421
|
// Apply a bleed on clientX to ensure that our exit point is
|
|
1420
1422
|
// consistently within polygon bounds
|
|
1421
1423
|
{ x: d.clientX + Q, y: d.clientY },
|
|
1422
|
-
{ x: V, y:
|
|
1423
|
-
{ x:
|
|
1424
|
-
{ x:
|
|
1425
|
-
{ x: V, y:
|
|
1424
|
+
{ x: V, y: p.top },
|
|
1425
|
+
{ x: b, y: p.top },
|
|
1426
|
+
{ x: b, y: p.bottom },
|
|
1427
|
+
{ x: V, y: p.bottom }
|
|
1426
1428
|
],
|
|
1427
1429
|
side: R
|
|
1428
1430
|
}), window.clearTimeout(u.current), u.current = window.setTimeout(
|
|
@@ -1437,19 +1439,19 @@ var ue = "MenuSubTrigger", fn = c.forwardRef(
|
|
|
1437
1439
|
),
|
|
1438
1440
|
onKeyDown: y(t.onKeyDown, (d) => {
|
|
1439
1441
|
var v;
|
|
1440
|
-
const
|
|
1441
|
-
t.disabled ||
|
|
1442
|
+
const p = s.searchRef.current !== "";
|
|
1443
|
+
t.disabled || p && d.key === " " || Xa[r.dir].includes(d.key) && (n.onOpenChange(!0), (v = n.content) == null || v.focus(), d.preventDefault());
|
|
1442
1444
|
})
|
|
1443
1445
|
}
|
|
1444
1446
|
) });
|
|
1445
1447
|
}
|
|
1446
1448
|
);
|
|
1447
|
-
|
|
1448
|
-
var
|
|
1449
|
+
mn.displayName = ue;
|
|
1450
|
+
var gn = "MenuSubContent", vn = c.forwardRef(
|
|
1449
1451
|
(t, e) => {
|
|
1450
|
-
const n =
|
|
1451
|
-
return /* @__PURE__ */ o.jsx(le.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ o.jsx(
|
|
1452
|
-
|
|
1452
|
+
const n = Jt(D, t.__scopeMenu), { forceMount: r = n.forceMount, ...a } = t, s = z(D, t.__scopeMenu), i = xe(D, t.__scopeMenu), u = fn(gn, t.__scopeMenu), h = c.useRef(null), l = pe(e, h);
|
|
1453
|
+
return /* @__PURE__ */ o.jsx(le.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ o.jsx(Ie, { present: r || s.open, children: /* @__PURE__ */ o.jsx(le.Slot, { scope: t.__scopeMenu, children: /* @__PURE__ */ o.jsx(
|
|
1454
|
+
tt,
|
|
1453
1455
|
{
|
|
1454
1456
|
id: u.contentId,
|
|
1455
1457
|
"aria-labelledby": u.triggerId,
|
|
@@ -1473,41 +1475,41 @@ var mn = "MenuSubContent", gn = c.forwardRef(
|
|
|
1473
1475
|
}),
|
|
1474
1476
|
onKeyDown: y(t.onKeyDown, (m) => {
|
|
1475
1477
|
var v;
|
|
1476
|
-
const d = m.currentTarget.contains(m.target),
|
|
1477
|
-
d &&
|
|
1478
|
+
const d = m.currentTarget.contains(m.target), p = Wa[i.dir].includes(m.key);
|
|
1479
|
+
d && p && (s.onOpenChange(!1), (v = u.trigger) == null || v.focus(), m.preventDefault());
|
|
1478
1480
|
})
|
|
1479
1481
|
}
|
|
1480
1482
|
) }) }) });
|
|
1481
1483
|
}
|
|
1482
1484
|
);
|
|
1483
|
-
|
|
1484
|
-
function
|
|
1485
|
+
vn.displayName = gn;
|
|
1486
|
+
function xn(t) {
|
|
1485
1487
|
return t ? "open" : "closed";
|
|
1486
1488
|
}
|
|
1487
|
-
function
|
|
1489
|
+
function Ne(t) {
|
|
1488
1490
|
return t === "indeterminate";
|
|
1489
1491
|
}
|
|
1490
|
-
function
|
|
1491
|
-
return
|
|
1492
|
+
function ot(t) {
|
|
1493
|
+
return Ne(t) ? "indeterminate" : t ? "checked" : "unchecked";
|
|
1492
1494
|
}
|
|
1493
|
-
function
|
|
1495
|
+
function go(t) {
|
|
1494
1496
|
const e = document.activeElement;
|
|
1495
1497
|
for (const n of t)
|
|
1496
1498
|
if (n === e || (n.focus(), document.activeElement !== e)) return;
|
|
1497
1499
|
}
|
|
1498
|
-
function
|
|
1500
|
+
function vo(t, e) {
|
|
1499
1501
|
return t.map((n, r) => t[(e + r) % t.length]);
|
|
1500
1502
|
}
|
|
1501
|
-
function
|
|
1503
|
+
function xo(t, e, n) {
|
|
1502
1504
|
const a = e.length > 1 && Array.from(e).every((l) => l === e[0]) ? e[0] : e, s = n ? t.indexOf(n) : -1;
|
|
1503
|
-
let i =
|
|
1505
|
+
let i = vo(t, Math.max(s, 0));
|
|
1504
1506
|
a.length === 1 && (i = i.filter((l) => l !== n));
|
|
1505
1507
|
const h = i.find(
|
|
1506
1508
|
(l) => l.toLowerCase().startsWith(a.toLowerCase())
|
|
1507
1509
|
);
|
|
1508
1510
|
return h !== n ? h : void 0;
|
|
1509
1511
|
}
|
|
1510
|
-
function
|
|
1512
|
+
function yo(t, e) {
|
|
1511
1513
|
const { x: n, y: r } = t;
|
|
1512
1514
|
let a = !1;
|
|
1513
1515
|
for (let s = 0, i = e.length - 1; s < e.length; i = s++) {
|
|
@@ -1516,18 +1518,18 @@ function vo(t, e) {
|
|
|
1516
1518
|
}
|
|
1517
1519
|
return a;
|
|
1518
1520
|
}
|
|
1519
|
-
function
|
|
1521
|
+
function wo(t, e) {
|
|
1520
1522
|
if (!e) return !1;
|
|
1521
1523
|
const n = { x: t.clientX, y: t.clientY };
|
|
1522
|
-
return
|
|
1524
|
+
return yo(n, e);
|
|
1523
1525
|
}
|
|
1524
1526
|
function de(t) {
|
|
1525
1527
|
return (e) => e.pointerType === "mouse" ? t(e) : void 0;
|
|
1526
1528
|
}
|
|
1527
|
-
var
|
|
1528
|
-
|
|
1529
|
-
[
|
|
1530
|
-
), C =
|
|
1529
|
+
var bo = Wt, Mo = Je, Co = Zt, Po = en, Ro = nt, _o = tn, Eo = Ae, So = rn, jo = on, No = cn, Do = ln, Io = dn, Ao = hn, Oo = pn, To = mn, ko = vn, st = "DropdownMenu", [Fo, As] = St(
|
|
1530
|
+
st,
|
|
1531
|
+
[Vt]
|
|
1532
|
+
), C = Vt(), [Lo, yn] = Fo(st), wn = (t) => {
|
|
1531
1533
|
const {
|
|
1532
1534
|
__scopeDropdownMenu: e,
|
|
1533
1535
|
children: n,
|
|
@@ -1536,31 +1538,31 @@ var yo = Xt, wo = Xe, Mo = Jt, bo = Zt, Co = et, Po = en, Ro = De, _o = nn, Eo =
|
|
|
1536
1538
|
defaultOpen: s,
|
|
1537
1539
|
onOpenChange: i,
|
|
1538
1540
|
modal: u = !0
|
|
1539
|
-
} = t, h = C(e), l = c.useRef(null), [m = !1, d] =
|
|
1541
|
+
} = t, h = C(e), l = c.useRef(null), [m = !1, d] = It({
|
|
1540
1542
|
prop: a,
|
|
1541
1543
|
defaultProp: s,
|
|
1542
1544
|
onChange: i
|
|
1543
1545
|
});
|
|
1544
1546
|
return /* @__PURE__ */ o.jsx(
|
|
1545
|
-
|
|
1547
|
+
Lo,
|
|
1546
1548
|
{
|
|
1547
1549
|
scope: e,
|
|
1548
|
-
triggerId:
|
|
1550
|
+
triggerId: Se(),
|
|
1549
1551
|
triggerRef: l,
|
|
1550
|
-
contentId:
|
|
1552
|
+
contentId: Se(),
|
|
1551
1553
|
open: m,
|
|
1552
1554
|
onOpenChange: d,
|
|
1553
|
-
onOpenToggle: c.useCallback(() => d((
|
|
1555
|
+
onOpenToggle: c.useCallback(() => d((p) => !p), [d]),
|
|
1554
1556
|
modal: u,
|
|
1555
|
-
children: /* @__PURE__ */ o.jsx(
|
|
1557
|
+
children: /* @__PURE__ */ o.jsx(bo, { ...h, open: m, onOpenChange: d, dir: r, modal: u, children: n })
|
|
1556
1558
|
}
|
|
1557
1559
|
);
|
|
1558
1560
|
};
|
|
1559
|
-
|
|
1560
|
-
var
|
|
1561
|
+
wn.displayName = st;
|
|
1562
|
+
var bn = "DropdownMenuTrigger", Mn = c.forwardRef(
|
|
1561
1563
|
(t, e) => {
|
|
1562
|
-
const { __scopeDropdownMenu: n, disabled: r = !1, ...a } = t, s =
|
|
1563
|
-
return /* @__PURE__ */ o.jsx(
|
|
1564
|
+
const { __scopeDropdownMenu: n, disabled: r = !1, ...a } = t, s = yn(bn, n), i = C(n);
|
|
1565
|
+
return /* @__PURE__ */ o.jsx(Mo, { asChild: !0, ...i, children: /* @__PURE__ */ o.jsx(
|
|
1564
1566
|
ie.button,
|
|
1565
1567
|
{
|
|
1566
1568
|
type: "button",
|
|
@@ -1583,17 +1585,17 @@ var wn = "DropdownMenuTrigger", Mn = c.forwardRef(
|
|
|
1583
1585
|
) });
|
|
1584
1586
|
}
|
|
1585
1587
|
);
|
|
1586
|
-
Mn.displayName =
|
|
1587
|
-
var
|
|
1588
|
+
Mn.displayName = bn;
|
|
1589
|
+
var Ko = "DropdownMenuPortal", Cn = (t) => {
|
|
1588
1590
|
const { __scopeDropdownMenu: e, ...n } = t, r = C(e);
|
|
1589
|
-
return /* @__PURE__ */ o.jsx(
|
|
1591
|
+
return /* @__PURE__ */ o.jsx(Co, { ...r, ...n });
|
|
1590
1592
|
};
|
|
1591
|
-
|
|
1592
|
-
var
|
|
1593
|
+
Cn.displayName = Ko;
|
|
1594
|
+
var Pn = "DropdownMenuContent", Rn = c.forwardRef(
|
|
1593
1595
|
(t, e) => {
|
|
1594
|
-
const { __scopeDropdownMenu: n, ...r } = t, a =
|
|
1596
|
+
const { __scopeDropdownMenu: n, ...r } = t, a = yn(Pn, n), s = C(n), i = c.useRef(!1);
|
|
1595
1597
|
return /* @__PURE__ */ o.jsx(
|
|
1596
|
-
|
|
1598
|
+
Po,
|
|
1597
1599
|
{
|
|
1598
1600
|
id: a.contentId,
|
|
1599
1601
|
"aria-labelledby": a.triggerId,
|
|
@@ -1620,76 +1622,76 @@ var Cn = "DropdownMenuContent", Pn = c.forwardRef(
|
|
|
1620
1622
|
);
|
|
1621
1623
|
}
|
|
1622
1624
|
);
|
|
1623
|
-
|
|
1624
|
-
var
|
|
1625
|
+
Rn.displayName = Pn;
|
|
1626
|
+
var $o = "DropdownMenuGroup", Bo = c.forwardRef(
|
|
1625
1627
|
(t, e) => {
|
|
1626
1628
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1627
|
-
return /* @__PURE__ */ o.jsx(
|
|
1629
|
+
return /* @__PURE__ */ o.jsx(Ro, { ...a, ...r, ref: e });
|
|
1628
1630
|
}
|
|
1629
1631
|
);
|
|
1630
|
-
|
|
1631
|
-
var
|
|
1632
|
+
Bo.displayName = $o;
|
|
1633
|
+
var Qo = "DropdownMenuLabel", _n = c.forwardRef(
|
|
1632
1634
|
(t, e) => {
|
|
1633
1635
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1634
|
-
return /* @__PURE__ */ o.jsx(
|
|
1636
|
+
return /* @__PURE__ */ o.jsx(_o, { ...a, ...r, ref: e });
|
|
1635
1637
|
}
|
|
1636
1638
|
);
|
|
1637
|
-
|
|
1638
|
-
var
|
|
1639
|
+
_n.displayName = Qo;
|
|
1640
|
+
var Uo = "DropdownMenuItem", En = c.forwardRef(
|
|
1639
1641
|
(t, e) => {
|
|
1640
1642
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1641
|
-
return /* @__PURE__ */ o.jsx(
|
|
1643
|
+
return /* @__PURE__ */ o.jsx(Eo, { ...a, ...r, ref: e });
|
|
1642
1644
|
}
|
|
1643
1645
|
);
|
|
1644
|
-
|
|
1645
|
-
var
|
|
1646
|
+
En.displayName = Uo;
|
|
1647
|
+
var Go = "DropdownMenuCheckboxItem", Sn = c.forwardRef((t, e) => {
|
|
1646
1648
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1647
|
-
return /* @__PURE__ */ o.jsx(
|
|
1649
|
+
return /* @__PURE__ */ o.jsx(So, { ...a, ...r, ref: e });
|
|
1648
1650
|
});
|
|
1649
|
-
|
|
1650
|
-
var
|
|
1651
|
+
Sn.displayName = Go;
|
|
1652
|
+
var qo = "DropdownMenuRadioGroup", Ho = c.forwardRef((t, e) => {
|
|
1651
1653
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1652
|
-
return /* @__PURE__ */ o.jsx(
|
|
1654
|
+
return /* @__PURE__ */ o.jsx(jo, { ...a, ...r, ref: e });
|
|
1653
1655
|
});
|
|
1654
|
-
|
|
1655
|
-
var
|
|
1656
|
+
Ho.displayName = qo;
|
|
1657
|
+
var zo = "DropdownMenuRadioItem", jn = c.forwardRef((t, e) => {
|
|
1656
1658
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1657
|
-
return /* @__PURE__ */ o.jsx(
|
|
1659
|
+
return /* @__PURE__ */ o.jsx(No, { ...a, ...r, ref: e });
|
|
1658
1660
|
});
|
|
1659
|
-
|
|
1660
|
-
var
|
|
1661
|
+
jn.displayName = zo;
|
|
1662
|
+
var Vo = "DropdownMenuItemIndicator", Nn = c.forwardRef((t, e) => {
|
|
1661
1663
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1662
|
-
return /* @__PURE__ */ o.jsx(
|
|
1664
|
+
return /* @__PURE__ */ o.jsx(Do, { ...a, ...r, ref: e });
|
|
1663
1665
|
});
|
|
1664
|
-
Nn.displayName =
|
|
1665
|
-
var
|
|
1666
|
+
Nn.displayName = Vo;
|
|
1667
|
+
var Yo = "DropdownMenuSeparator", Dn = c.forwardRef((t, e) => {
|
|
1666
1668
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1667
|
-
return /* @__PURE__ */ o.jsx(
|
|
1669
|
+
return /* @__PURE__ */ o.jsx(Io, { ...a, ...r, ref: e });
|
|
1668
1670
|
});
|
|
1669
|
-
|
|
1670
|
-
var
|
|
1671
|
+
Dn.displayName = Yo;
|
|
1672
|
+
var Xo = "DropdownMenuArrow", Wo = c.forwardRef(
|
|
1671
1673
|
(t, e) => {
|
|
1672
1674
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1673
|
-
return /* @__PURE__ */ o.jsx(
|
|
1675
|
+
return /* @__PURE__ */ o.jsx(Ao, { ...a, ...r, ref: e });
|
|
1674
1676
|
}
|
|
1675
1677
|
);
|
|
1676
|
-
|
|
1677
|
-
var
|
|
1678
|
-
const { __scopeDropdownMenu: e, children: n, open: r, onOpenChange: a, defaultOpen: s } = t, i = C(e), [u = !1, h] =
|
|
1678
|
+
Wo.displayName = Xo;
|
|
1679
|
+
var Jo = (t) => {
|
|
1680
|
+
const { __scopeDropdownMenu: e, children: n, open: r, onOpenChange: a, defaultOpen: s } = t, i = C(e), [u = !1, h] = It({
|
|
1679
1681
|
prop: r,
|
|
1680
1682
|
defaultProp: s,
|
|
1681
1683
|
onChange: a
|
|
1682
1684
|
});
|
|
1683
|
-
return /* @__PURE__ */ o.jsx(
|
|
1684
|
-
},
|
|
1685
|
+
return /* @__PURE__ */ o.jsx(Oo, { ...i, open: u, onOpenChange: h, children: n });
|
|
1686
|
+
}, Zo = "DropdownMenuSubTrigger", In = c.forwardRef((t, e) => {
|
|
1685
1687
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1686
|
-
return /* @__PURE__ */ o.jsx(
|
|
1688
|
+
return /* @__PURE__ */ o.jsx(To, { ...a, ...r, ref: e });
|
|
1687
1689
|
});
|
|
1688
|
-
|
|
1689
|
-
var
|
|
1690
|
+
In.displayName = Zo;
|
|
1691
|
+
var es = "DropdownMenuSubContent", An = c.forwardRef((t, e) => {
|
|
1690
1692
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1691
1693
|
return /* @__PURE__ */ o.jsx(
|
|
1692
|
-
|
|
1694
|
+
ko,
|
|
1693
1695
|
{
|
|
1694
1696
|
...a,
|
|
1695
1697
|
...r,
|
|
@@ -1705,10 +1707,10 @@ var Jo = "DropdownMenuSubContent", An = c.forwardRef((t, e) => {
|
|
|
1705
1707
|
}
|
|
1706
1708
|
);
|
|
1707
1709
|
});
|
|
1708
|
-
An.displayName =
|
|
1709
|
-
var
|
|
1710
|
-
const
|
|
1711
|
-
|
|
1710
|
+
An.displayName = es;
|
|
1711
|
+
var ts = wn, ns = Mn, On = Cn, Tn = Rn, kn = _n, Fn = En, Ln = Sn, Kn = jn, $n = Nn, Bn = Dn, rs = Jo, Qn = In, Un = An;
|
|
1712
|
+
const as = ts, os = ns, ss = On, is = rs, Gn = c.forwardRef(({ className: t, inset: e, children: n, ...r }, a) => /* @__PURE__ */ o.jsxs(
|
|
1713
|
+
Qn,
|
|
1712
1714
|
{
|
|
1713
1715
|
ref: a,
|
|
1714
1716
|
className: P(
|
|
@@ -1719,13 +1721,13 @@ const ns = Zo, rs = es, as = In, os = ts, Un = c.forwardRef(({ className: t, ins
|
|
|
1719
1721
|
...r,
|
|
1720
1722
|
children: [
|
|
1721
1723
|
n,
|
|
1722
|
-
/* @__PURE__ */ o.jsx(
|
|
1724
|
+
/* @__PURE__ */ o.jsx(Xe, { className: "ml-auto h-4 w-4" })
|
|
1723
1725
|
]
|
|
1724
1726
|
}
|
|
1725
1727
|
));
|
|
1726
|
-
|
|
1727
|
-
const
|
|
1728
|
-
|
|
1728
|
+
Gn.displayName = Qn.displayName;
|
|
1729
|
+
const qn = c.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ o.jsx(
|
|
1730
|
+
Un,
|
|
1729
1731
|
{
|
|
1730
1732
|
ref: n,
|
|
1731
1733
|
className: P(
|
|
@@ -1735,9 +1737,9 @@ const Gn = c.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ o.jsx(
|
|
|
1735
1737
|
...e
|
|
1736
1738
|
}
|
|
1737
1739
|
));
|
|
1738
|
-
|
|
1739
|
-
const Hn = c.forwardRef(({ className: t, sideOffset: e = 4, ...n }, r) => /* @__PURE__ */ o.jsx(
|
|
1740
|
-
|
|
1740
|
+
qn.displayName = Un.displayName;
|
|
1741
|
+
const Hn = c.forwardRef(({ className: t, sideOffset: e = 4, ...n }, r) => /* @__PURE__ */ o.jsx(On, { children: /* @__PURE__ */ o.jsx(
|
|
1742
|
+
Tn,
|
|
1741
1743
|
{
|
|
1742
1744
|
ref: r,
|
|
1743
1745
|
sideOffset: e,
|
|
@@ -1749,9 +1751,9 @@ const Hn = c.forwardRef(({ className: t, sideOffset: e = 4, ...n }, r) => /* @__
|
|
|
1749
1751
|
...n
|
|
1750
1752
|
}
|
|
1751
1753
|
) }));
|
|
1752
|
-
Hn.displayName =
|
|
1753
|
-
const
|
|
1754
|
-
|
|
1754
|
+
Hn.displayName = Tn.displayName;
|
|
1755
|
+
const zn = c.forwardRef(({ className: t, inset: e, ...n }, r) => /* @__PURE__ */ o.jsx(
|
|
1756
|
+
Fn,
|
|
1755
1757
|
{
|
|
1756
1758
|
ref: r,
|
|
1757
1759
|
className: P(
|
|
@@ -1762,9 +1764,9 @@ const qn = c.forwardRef(({ className: t, inset: e, ...n }, r) => /* @__PURE__ */
|
|
|
1762
1764
|
...n
|
|
1763
1765
|
}
|
|
1764
1766
|
));
|
|
1765
|
-
|
|
1766
|
-
const
|
|
1767
|
-
|
|
1767
|
+
zn.displayName = Fn.displayName;
|
|
1768
|
+
const cs = c.forwardRef(({ className: t, children: e, checked: n, ...r }, a) => /* @__PURE__ */ o.jsxs(
|
|
1769
|
+
Ln,
|
|
1768
1770
|
{
|
|
1769
1771
|
ref: a,
|
|
1770
1772
|
className: P(
|
|
@@ -1774,14 +1776,14 @@ const ss = c.forwardRef(({ className: t, children: e, checked: n, ...r }, a) =>
|
|
|
1774
1776
|
checked: n,
|
|
1775
1777
|
...r,
|
|
1776
1778
|
children: [
|
|
1777
|
-
/* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(
|
|
1779
|
+
/* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx($n, { children: /* @__PURE__ */ o.jsx(fr, { className: "h-4 w-4" }) }) }),
|
|
1778
1780
|
e
|
|
1779
1781
|
]
|
|
1780
1782
|
}
|
|
1781
1783
|
));
|
|
1782
|
-
|
|
1783
|
-
const
|
|
1784
|
-
|
|
1784
|
+
cs.displayName = Ln.displayName;
|
|
1785
|
+
const us = c.forwardRef(({ className: t, children: e, ...n }, r) => /* @__PURE__ */ o.jsxs(
|
|
1786
|
+
Kn,
|
|
1785
1787
|
{
|
|
1786
1788
|
ref: r,
|
|
1787
1789
|
className: P(
|
|
@@ -1790,14 +1792,14 @@ const is = c.forwardRef(({ className: t, children: e, ...n }, r) => /* @__PURE__
|
|
|
1790
1792
|
),
|
|
1791
1793
|
...n,
|
|
1792
1794
|
children: [
|
|
1793
|
-
/* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(
|
|
1795
|
+
/* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx($n, { children: /* @__PURE__ */ o.jsx(la, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1794
1796
|
e
|
|
1795
1797
|
]
|
|
1796
1798
|
}
|
|
1797
1799
|
));
|
|
1798
|
-
|
|
1799
|
-
const
|
|
1800
|
-
|
|
1800
|
+
us.displayName = Kn.displayName;
|
|
1801
|
+
const Vn = c.forwardRef(({ className: t, inset: e, ...n }, r) => /* @__PURE__ */ o.jsx(
|
|
1802
|
+
kn,
|
|
1801
1803
|
{
|
|
1802
1804
|
ref: r,
|
|
1803
1805
|
className: P(
|
|
@@ -1808,20 +1810,20 @@ const zn = c.forwardRef(({ className: t, inset: e, ...n }, r) => /* @__PURE__ */
|
|
|
1808
1810
|
...n
|
|
1809
1811
|
}
|
|
1810
1812
|
));
|
|
1811
|
-
|
|
1812
|
-
const
|
|
1813
|
-
|
|
1813
|
+
Vn.displayName = kn.displayName;
|
|
1814
|
+
const Yn = c.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ o.jsx(
|
|
1815
|
+
Bn,
|
|
1814
1816
|
{
|
|
1815
1817
|
ref: n,
|
|
1816
1818
|
className: P("-mx-1 my-1 h-px bg-muted", t),
|
|
1817
1819
|
...e
|
|
1818
1820
|
}
|
|
1819
1821
|
));
|
|
1820
|
-
|
|
1821
|
-
const
|
|
1822
|
-
const { navigation: t } =
|
|
1822
|
+
Yn.displayName = Bn.displayName;
|
|
1823
|
+
const ls = () => {
|
|
1824
|
+
const { navigation: t } = Ve();
|
|
1823
1825
|
return t.length <= 1 ? null : /* @__PURE__ */ o.jsx("nav", { className: "border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ o.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.map((e) => /* @__PURE__ */ o.jsx("li", { children: /* @__PURE__ */ o.jsx(
|
|
1824
|
-
|
|
1826
|
+
Ke,
|
|
1825
1827
|
{
|
|
1826
1828
|
className: ({ isActive: n }) => pr(
|
|
1827
1829
|
"block py-3.5 font-medium -mb-px border-b-2",
|
|
@@ -1831,17 +1833,17 @@ const cs = () => {
|
|
|
1831
1833
|
children: e.label
|
|
1832
1834
|
}
|
|
1833
1835
|
) }, e.label)) }) });
|
|
1834
|
-
},
|
|
1835
|
-
/* @__PURE__ */ o.jsx(
|
|
1836
|
-
/* @__PURE__ */ o.jsx(
|
|
1836
|
+
}, Xn = ({ item: t }) => t.children ? /* @__PURE__ */ o.jsxs(is, { children: [
|
|
1837
|
+
/* @__PURE__ */ o.jsx(Gn, { children: t.label }),
|
|
1838
|
+
/* @__PURE__ */ o.jsx(ss, { children: /* @__PURE__ */ o.jsx(qn, { children: t.children.map((e, n) => (
|
|
1837
1839
|
// eslint-disable-next-line react/no-array-index-key
|
|
1838
|
-
/* @__PURE__ */ o.jsx(
|
|
1840
|
+
/* @__PURE__ */ o.jsx(Xn, { item: e }, n)
|
|
1839
1841
|
)) }) })
|
|
1840
|
-
] }, t.label) : /* @__PURE__ */ o.jsx(
|
|
1841
|
-
const [e, n] =
|
|
1842
|
+
] }, t.label) : /* @__PURE__ */ o.jsx(_e, { to: t.path ?? "", children: /* @__PURE__ */ o.jsx(zn, { children: t.label }, t.label) }), Wn = Tt(function() {
|
|
1843
|
+
const [e, n] = mr(), { isAuthenticated: r, profile: a, isAuthEnabled: s, login: i, logout: u } = br(), h = Ve(), { page: l, plugins: m } = h, d = e ? ha : fa;
|
|
1842
1844
|
return /* @__PURE__ */ o.jsx("header", { className: "fixed top-0 w-full z-10 bg-background/80 backdrop-blur", children: /* @__PURE__ */ o.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
1843
1845
|
/* @__PURE__ */ o.jsxs("div", { className: "grid grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-12 h-[--top-header-height]", children: [
|
|
1844
|
-
/* @__PURE__ */ o.jsx("div", { className: "flex", children: /* @__PURE__ */ o.jsx(
|
|
1846
|
+
/* @__PURE__ */ o.jsx("div", { className: "flex", children: /* @__PURE__ */ o.jsx(_e, { to: "/", children: /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
1845
1847
|
(l == null ? void 0 : l.logo) && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
1846
1848
|
/* @__PURE__ */ o.jsx(
|
|
1847
1849
|
"img",
|
|
@@ -1869,12 +1871,12 @@ const cs = () => {
|
|
|
1869
1871
|
/* @__PURE__ */ o.jsxs("div", { className: "grid grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
1870
1872
|
/* @__PURE__ */ o.jsx("div", { className: "w-full max-w-prose" }),
|
|
1871
1873
|
/* @__PURE__ */ o.jsxs("div", { className: "items-center justify-self-end text-sm hidden lg:flex gap-2", children: [
|
|
1872
|
-
s && !r ? /* @__PURE__ */ o.jsx(
|
|
1873
|
-
/* @__PURE__ */ o.jsx(
|
|
1874
|
+
s && !r ? /* @__PURE__ */ o.jsx($e, { variant: "ghost", asChild: !0, children: /* @__PURE__ */ o.jsx(_e, { to: "/signin", children: "Login" }) }) : /* @__PURE__ */ o.jsxs(as, { children: [
|
|
1875
|
+
/* @__PURE__ */ o.jsx(os, { asChild: !0, children: /* @__PURE__ */ o.jsx($e, { variant: "ghost", children: a != null && a.email ? `${a.email}` : "My Account" }) }),
|
|
1874
1876
|
/* @__PURE__ */ o.jsxs(Hn, { className: "w-56", children: [
|
|
1875
|
-
/* @__PURE__ */ o.jsx(
|
|
1876
|
-
/* @__PURE__ */ o.jsx(
|
|
1877
|
-
m.filter((
|
|
1877
|
+
/* @__PURE__ */ o.jsx(Vn, { children: "My Account" }),
|
|
1878
|
+
/* @__PURE__ */ o.jsx(Yn, {}),
|
|
1879
|
+
m.filter((p) => Ba(p)).flatMap((p) => p.getProfileMenuItems(h)).map((p) => /* @__PURE__ */ o.jsx(Xn, { item: p }, p.label))
|
|
1878
1880
|
] })
|
|
1879
1881
|
] }),
|
|
1880
1882
|
/* @__PURE__ */ o.jsx(
|
|
@@ -1890,75 +1892,75 @@ const cs = () => {
|
|
|
1890
1892
|
] })
|
|
1891
1893
|
] })
|
|
1892
1894
|
] }),
|
|
1893
|
-
/* @__PURE__ */ o.jsx(
|
|
1895
|
+
/* @__PURE__ */ o.jsx(ls, {})
|
|
1894
1896
|
] }) });
|
|
1895
|
-
}),
|
|
1896
|
-
Header:
|
|
1897
|
-
},
|
|
1897
|
+
}), Jn = {
|
|
1898
|
+
Header: Wn
|
|
1899
|
+
}, ds = Ot(Jn), hs = ds.Provider, fs = ({
|
|
1898
1900
|
children: t,
|
|
1899
1901
|
...e
|
|
1900
1902
|
}) => {
|
|
1901
|
-
var d,
|
|
1902
|
-
const n =
|
|
1903
|
-
() => ({ ...
|
|
1903
|
+
var d, p;
|
|
1904
|
+
const n = Me(
|
|
1905
|
+
() => ({ ...Jn, ...e.overrides }),
|
|
1904
1906
|
[e.overrides]
|
|
1905
|
-
), r =
|
|
1907
|
+
), r = Me(
|
|
1906
1908
|
() => {
|
|
1907
1909
|
var v;
|
|
1908
|
-
return { ...
|
|
1910
|
+
return { ...gr, ...(v = e.mdx) == null ? void 0 : v.components };
|
|
1909
1911
|
},
|
|
1910
1912
|
[(d = e.mdx) == null ? void 0 : d.components]
|
|
1911
|
-
), { stagger: a } =
|
|
1913
|
+
), { stagger: a } = Gr(Qe), [s, i] = Be(!1), u = Me(
|
|
1912
1914
|
() => s ? { stagger: !0 } : { stagger: a },
|
|
1913
1915
|
[a, s]
|
|
1914
|
-
), h =
|
|
1916
|
+
), h = Rr();
|
|
1915
1917
|
W(() => {
|
|
1916
1918
|
s || i(!0);
|
|
1917
1919
|
}, [s, h.location]);
|
|
1918
|
-
const l =
|
|
1920
|
+
const l = Me(() => new Ha(e), [e]);
|
|
1919
1921
|
W(() => {
|
|
1920
1922
|
l.initialize();
|
|
1921
1923
|
}, [l]);
|
|
1922
|
-
const m = (
|
|
1924
|
+
const m = (p = e.plugins) == null ? void 0 : p.filter(Ga).map((v, x) => {
|
|
1923
1925
|
var R;
|
|
1924
|
-
return /* @__PURE__ */ o.jsx(
|
|
1926
|
+
return /* @__PURE__ */ o.jsx(qr, { children: (R = v.getHead) == null ? void 0 : R.call(v) }, x);
|
|
1925
1927
|
});
|
|
1926
|
-
return /* @__PURE__ */ o.jsxs(
|
|
1927
|
-
/* @__PURE__ */ o.jsx(
|
|
1928
|
-
/* @__PURE__ */ o.jsx(
|
|
1928
|
+
return /* @__PURE__ */ o.jsxs(oa, { client: Ht, children: [
|
|
1929
|
+
/* @__PURE__ */ o.jsx(Ge, { children: m }),
|
|
1930
|
+
/* @__PURE__ */ o.jsx(Qe.Provider, { value: u, children: /* @__PURE__ */ o.jsx(sa, { value: l, children: /* @__PURE__ */ o.jsx(cr, { components: r, children: /* @__PURE__ */ o.jsx(vr, { children: /* @__PURE__ */ o.jsx(hs, { value: n, children: /* @__PURE__ */ o.jsx(Mr, { slotlets: e.slotlets, children: /* @__PURE__ */ o.jsx(xr, { children: t }) }) }) }) }) }) })
|
|
1929
1931
|
] });
|
|
1930
|
-
},
|
|
1931
|
-
|
|
1932
|
-
const
|
|
1933
|
-
const t = se(), { setActiveAnchor: e } =
|
|
1932
|
+
}, ps = Tt(fs), Zn = (t) => /* @__PURE__ */ o.jsx(Ka, { FallbackComponent: za, children: /* @__PURE__ */ o.jsx(ps, { ...t }) });
|
|
1933
|
+
Zn.displayName = "DevPortal";
|
|
1934
|
+
const ms = () => {
|
|
1935
|
+
const t = se(), { setActiveAnchor: e } = qe();
|
|
1934
1936
|
W(() => {
|
|
1935
1937
|
if (!t.hash) return;
|
|
1936
1938
|
const n = t.hash.split("/")[0].slice(1), r = document.getElementById(decodeURIComponent(n));
|
|
1937
1939
|
if (r) {
|
|
1938
1940
|
requestAnimationFrame(() => {
|
|
1939
|
-
r.scrollIntoView(),
|
|
1941
|
+
r.scrollIntoView(), requestIdleCallback(() => e(n));
|
|
1940
1942
|
});
|
|
1941
1943
|
return;
|
|
1942
1944
|
}
|
|
1943
1945
|
const a = new MutationObserver((s, i) => {
|
|
1944
1946
|
const u = document.getElementById(decodeURIComponent(n));
|
|
1945
|
-
u && (u.scrollIntoView(),
|
|
1947
|
+
u && (u.scrollIntoView(), requestIdleCallback(() => e(n)), i.disconnect());
|
|
1946
1948
|
});
|
|
1947
1949
|
return a.observe(document.body, { childList: !0, subtree: !0 }), () => a.disconnect();
|
|
1948
1950
|
}, [t.hash, e]);
|
|
1949
|
-
},
|
|
1950
|
-
const t = se(), e =
|
|
1951
|
+
}, gs = () => {
|
|
1952
|
+
const t = se(), e = De(t.pathname);
|
|
1951
1953
|
W(() => {
|
|
1952
1954
|
e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
|
|
1953
1955
|
}, [t.pathname]);
|
|
1954
|
-
},
|
|
1956
|
+
}, er = ({
|
|
1955
1957
|
item: t,
|
|
1956
1958
|
defaultOpen: e,
|
|
1957
1959
|
path: n
|
|
1958
1960
|
}) => {
|
|
1959
|
-
const [r, a] =
|
|
1961
|
+
const [r, a] = Be(e), s = se(), i = De(s.pathname), [u, h] = Be(!1);
|
|
1960
1962
|
W(() => {
|
|
1961
|
-
!r && i.current !== s.pathname && a(
|
|
1963
|
+
!r && i.current !== s.pathname && a(Ye(t, s.pathname, n)), i.current = s.pathname;
|
|
1962
1964
|
}, [r, t, n, s.pathname]);
|
|
1963
1965
|
const l = () => {
|
|
1964
1966
|
h(!0), a((m) => !m);
|
|
@@ -1970,7 +1972,7 @@ const ps = () => {
|
|
|
1970
1972
|
onOpenChange: l,
|
|
1971
1973
|
"data-animate": u
|
|
1972
1974
|
};
|
|
1973
|
-
},
|
|
1975
|
+
}, Re = yr(
|
|
1974
1976
|
"flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
1975
1977
|
{
|
|
1976
1978
|
variants: {
|
|
@@ -1984,22 +1986,22 @@ const ps = () => {
|
|
|
1984
1986
|
}
|
|
1985
1987
|
}
|
|
1986
1988
|
}
|
|
1987
|
-
),
|
|
1989
|
+
), vs = "data-anchor", tr = ({
|
|
1988
1990
|
category: t,
|
|
1989
1991
|
item: e,
|
|
1990
1992
|
activeAnchor: n,
|
|
1991
1993
|
currentTopNavItem: r,
|
|
1992
1994
|
basePath: a = ""
|
|
1993
1995
|
}) => {
|
|
1994
|
-
const s =
|
|
1996
|
+
const s = wt(e) ? Qt(a, e.path) : "", i = se(), u = er({
|
|
1995
1997
|
item: e,
|
|
1996
1998
|
path: s,
|
|
1997
|
-
defaultOpen: () =>
|
|
1999
|
+
defaultOpen: () => Ye(e, i.pathname, a)
|
|
1998
2000
|
});
|
|
1999
|
-
if (
|
|
2001
|
+
if (ia(e)) {
|
|
2000
2002
|
const l = P(
|
|
2001
2003
|
"flex items-center gap-2",
|
|
2002
|
-
|
|
2004
|
+
Re({
|
|
2003
2005
|
isActive: e.href === i.pathname
|
|
2004
2006
|
})
|
|
2005
2007
|
);
|
|
@@ -2012,10 +2014,10 @@ const ps = () => {
|
|
|
2012
2014
|
rel: "noopener noreferrer",
|
|
2013
2015
|
children: [
|
|
2014
2016
|
e.label,
|
|
2015
|
-
/* @__PURE__ */ o.jsx(
|
|
2017
|
+
/* @__PURE__ */ o.jsx(da, { size: 14 })
|
|
2016
2018
|
]
|
|
2017
2019
|
}
|
|
2018
|
-
) : /* @__PURE__ */ o.jsx(
|
|
2020
|
+
) : /* @__PURE__ */ o.jsx(Ke, { className: l, to: e.href, children: e.label });
|
|
2019
2021
|
}
|
|
2020
2022
|
const h = /* @__PURE__ */ o.jsxs("div", { className: "flex justify-between w-full", children: [
|
|
2021
2023
|
/* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-2 truncate w-full", children: [
|
|
@@ -2023,26 +2025,26 @@ const ps = () => {
|
|
|
2023
2025
|
typeof e.label != "string" ? e.label : /* @__PURE__ */ o.jsx("span", { className: "truncate", children: e.label })
|
|
2024
2026
|
] }),
|
|
2025
2027
|
e.children && /* @__PURE__ */ o.jsx(
|
|
2026
|
-
|
|
2028
|
+
Xe,
|
|
2027
2029
|
{
|
|
2028
2030
|
size: 16,
|
|
2029
2031
|
className: "transition shrink-0 group-data-[state=open]:rotate-90"
|
|
2030
2032
|
}
|
|
2031
2033
|
)
|
|
2032
2034
|
] });
|
|
2033
|
-
return /* @__PURE__ */ o.jsx("li", { title: typeof e.label == "string" ? e.label : e.title, children: e.children ? /* @__PURE__ */ o.jsxs(
|
|
2035
|
+
return /* @__PURE__ */ o.jsx("li", { title: typeof e.label == "string" ? e.label : e.title, children: e.children ? /* @__PURE__ */ o.jsxs(Ft, { ...u, className: "flex flex-col", children: [
|
|
2034
2036
|
/* @__PURE__ */ o.jsx(
|
|
2035
|
-
|
|
2037
|
+
Lt,
|
|
2036
2038
|
{
|
|
2037
2039
|
className: P(
|
|
2038
2040
|
"group text-start",
|
|
2039
|
-
|
|
2041
|
+
Re({ isActive: !1 })
|
|
2040
2042
|
),
|
|
2041
2043
|
children: h
|
|
2042
2044
|
}
|
|
2043
2045
|
),
|
|
2044
|
-
/* @__PURE__ */ o.jsx(
|
|
2045
|
-
|
|
2046
|
+
/* @__PURE__ */ o.jsx(Kt, { className: "CollapsibleContent ms-[calc(var(--padding-nav-item)*1.125)]", children: /* @__PURE__ */ o.jsx("ul", { className: "mt-1 border-l ps-1.5", children: e.children.map((l) => /* @__PURE__ */ o.jsx(
|
|
2047
|
+
tr,
|
|
2046
2048
|
{
|
|
2047
2049
|
category: t,
|
|
2048
2050
|
item: l,
|
|
@@ -2050,37 +2052,37 @@ const ps = () => {
|
|
|
2050
2052
|
currentTopNavItem: r,
|
|
2051
2053
|
basePath: s
|
|
2052
2054
|
},
|
|
2053
|
-
|
|
2055
|
+
wt(l) ? l.path : l.href
|
|
2054
2056
|
)) }) })
|
|
2055
2057
|
] }) : e.path.startsWith("#") ? /* @__PURE__ */ o.jsx(
|
|
2056
|
-
|
|
2058
|
+
ur,
|
|
2057
2059
|
{
|
|
2058
2060
|
to: e.path,
|
|
2059
|
-
[
|
|
2060
|
-
className:
|
|
2061
|
+
[vs]: e.path,
|
|
2062
|
+
className: Re({
|
|
2061
2063
|
isActive: e.path.slice(1) === n,
|
|
2062
2064
|
isMuted: e.muted
|
|
2063
2065
|
}),
|
|
2064
2066
|
children: h
|
|
2065
2067
|
}
|
|
2066
2068
|
) : /* @__PURE__ */ o.jsx(
|
|
2067
|
-
|
|
2069
|
+
Ke,
|
|
2068
2070
|
{
|
|
2069
|
-
className: ({ isActive: l }) =>
|
|
2071
|
+
className: ({ isActive: l }) => Re({ isActive: l }),
|
|
2070
2072
|
to: s,
|
|
2071
2073
|
children: h
|
|
2072
2074
|
}
|
|
2073
2075
|
) });
|
|
2074
|
-
},
|
|
2076
|
+
}, xs = ({
|
|
2075
2077
|
category: t
|
|
2076
2078
|
}) => {
|
|
2077
|
-
const { activeAnchor: e } =
|
|
2079
|
+
const { activeAnchor: e } = qe(), n = ca(), r = se(), a = t.collapsible ?? !0, s = er({
|
|
2078
2080
|
item: t,
|
|
2079
2081
|
path: (n == null ? void 0 : n.path) ?? "",
|
|
2080
|
-
defaultOpen: () => !a || t.expanded ||
|
|
2082
|
+
defaultOpen: () => !a || t.expanded || Ye(t, r.pathname, (n == null ? void 0 : n.path) ?? "")
|
|
2081
2083
|
});
|
|
2082
|
-
return /* @__PURE__ */ o.jsxs(
|
|
2083
|
-
t.label.length > 0 ? /* @__PURE__ */ o.jsx(
|
|
2084
|
+
return /* @__PURE__ */ o.jsxs(Ft, { ...s, children: [
|
|
2085
|
+
t.label.length > 0 ? /* @__PURE__ */ o.jsx(Lt, { asChild: a, disabled: !a, children: /* @__PURE__ */ o.jsxs(
|
|
2084
2086
|
"h5",
|
|
2085
2087
|
{
|
|
2086
2088
|
className: P(
|
|
@@ -2090,7 +2092,7 @@ const ps = () => {
|
|
|
2090
2092
|
children: [
|
|
2091
2093
|
t.label,
|
|
2092
2094
|
a && /* @__PURE__ */ o.jsx(
|
|
2093
|
-
|
|
2095
|
+
Xe,
|
|
2094
2096
|
{
|
|
2095
2097
|
className: "group-data-[state=open]:rotate-90 transition",
|
|
2096
2098
|
size: 16
|
|
@@ -2099,19 +2101,19 @@ const ps = () => {
|
|
|
2099
2101
|
]
|
|
2100
2102
|
}
|
|
2101
2103
|
) }) : "Endpoints",
|
|
2102
|
-
/* @__PURE__ */ o.jsx(
|
|
2103
|
-
|
|
2104
|
+
/* @__PURE__ */ o.jsx(Kt, { className: "CollapsibleContent -mx-[--padding-nav-item]", children: /* @__PURE__ */ o.jsx("ul", { className: "space-y-0.5 mt-1.5 mb-4 ms-3", children: t.children.map((i, u) => /* @__PURE__ */ o.jsx(
|
|
2105
|
+
tr,
|
|
2104
2106
|
{
|
|
2105
2107
|
category: t,
|
|
2106
2108
|
item: i,
|
|
2107
2109
|
activeAnchor: e,
|
|
2108
2110
|
currentTopNavItem: n,
|
|
2109
|
-
basePath:
|
|
2111
|
+
basePath: Qt(n == null ? void 0 : n.path, t.path)
|
|
2110
2112
|
},
|
|
2111
2113
|
u
|
|
2112
2114
|
)) }) })
|
|
2113
2115
|
] }, t.label);
|
|
2114
|
-
},
|
|
2116
|
+
}, ys = Hr(function({ children: e, className: n, pushMainContent: r }, a) {
|
|
2115
2117
|
return /* @__PURE__ */ o.jsx(
|
|
2116
2118
|
"nav",
|
|
2117
2119
|
{
|
|
@@ -2124,35 +2126,39 @@ const ps = () => {
|
|
|
2124
2126
|
children: e
|
|
2125
2127
|
}
|
|
2126
2128
|
);
|
|
2127
|
-
}),
|
|
2128
|
-
const t =
|
|
2129
|
-
return /* @__PURE__ */ o.
|
|
2130
|
-
|
|
2129
|
+
}), ws = () => {
|
|
2130
|
+
const t = De(null), e = ua();
|
|
2131
|
+
return /* @__PURE__ */ o.jsxs(
|
|
2132
|
+
ys,
|
|
2131
2133
|
{
|
|
2132
2134
|
ref: t,
|
|
2133
2135
|
pushMainContent: e.data.items.length > 0,
|
|
2134
|
-
children:
|
|
2136
|
+
children: [
|
|
2137
|
+
/* @__PURE__ */ o.jsx(Ee, { name: "zudoku-before-navigation" }),
|
|
2138
|
+
e.data.items.map((n) => /* @__PURE__ */ o.jsx(xs, { category: n }, n.label)),
|
|
2139
|
+
/* @__PURE__ */ o.jsx(Ee, { name: "zudoku-after-navigation" })
|
|
2140
|
+
]
|
|
2135
2141
|
}
|
|
2136
2142
|
);
|
|
2137
|
-
},
|
|
2138
|
-
const e = se(), { setActiveAnchor: n } =
|
|
2139
|
-
|
|
2140
|
-
const a =
|
|
2143
|
+
}, bs = ({ children: t }) => {
|
|
2144
|
+
const e = se(), { setActiveAnchor: n } = qe(), { meta: r } = Ve();
|
|
2145
|
+
ms(), gs();
|
|
2146
|
+
const a = De(e.pathname);
|
|
2141
2147
|
return W(() => {
|
|
2142
2148
|
e.pathname !== a.current && n(""), a.current = e.pathname;
|
|
2143
2149
|
}, [e.pathname, n]), /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
2144
|
-
/* @__PURE__ */ o.jsxs(
|
|
2150
|
+
/* @__PURE__ */ o.jsxs(Ge, { titleTemplate: r == null ? void 0 : r.title, children: [
|
|
2145
2151
|
(r == null ? void 0 : r.description) && /* @__PURE__ */ o.jsx("meta", { name: "description", content: r.description }),
|
|
2146
2152
|
(r == null ? void 0 : r.favicon) && /* @__PURE__ */ o.jsx("link", { rel: "icon", href: r.favicon })
|
|
2147
2153
|
] }),
|
|
2148
|
-
/* @__PURE__ */ o.jsx(
|
|
2154
|
+
/* @__PURE__ */ o.jsx(Wn, {}),
|
|
2149
2155
|
/* @__PURE__ */ o.jsx("div", { className: "max-w-screen-2xl mx-auto pt-[--header-height] px-10 lg:px-12 h-full", children: /* @__PURE__ */ o.jsxs(
|
|
2150
|
-
|
|
2156
|
+
zr,
|
|
2151
2157
|
{
|
|
2152
|
-
fallback: /* @__PURE__ */ o.jsx("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ o.jsx(
|
|
2158
|
+
fallback: /* @__PURE__ */ o.jsx("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ o.jsx(Wr, {}) }),
|
|
2153
2159
|
children: [
|
|
2154
|
-
/* @__PURE__ */ o.jsx(
|
|
2155
|
-
/* @__PURE__ */ o.
|
|
2160
|
+
/* @__PURE__ */ o.jsx(ws, {}),
|
|
2161
|
+
/* @__PURE__ */ o.jsxs(
|
|
2156
2162
|
"main",
|
|
2157
2163
|
{
|
|
2158
2164
|
className: P(
|
|
@@ -2161,25 +2167,29 @@ const ps = () => {
|
|
|
2161
2167
|
"lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
|
|
2162
2168
|
"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
|
|
2163
2169
|
),
|
|
2164
|
-
children:
|
|
2170
|
+
children: [
|
|
2171
|
+
/* @__PURE__ */ o.jsx(Ee, { name: "zudoku-before-content" }),
|
|
2172
|
+
t ?? /* @__PURE__ */ o.jsx(_r, {}),
|
|
2173
|
+
/* @__PURE__ */ o.jsx(Ee, { name: "zudoku-after-content" })
|
|
2174
|
+
]
|
|
2165
2175
|
}
|
|
2166
2176
|
)
|
|
2167
2177
|
]
|
|
2168
2178
|
}
|
|
2169
2179
|
) })
|
|
2170
2180
|
] });
|
|
2171
|
-
},
|
|
2181
|
+
}, Os = lr, Ts = wr, ks = Zn, Fs = bs, Ls = _e, Ks = Cr, $s = pa, Bs = Da, Qs = Ia, Us = $e, Gs = Ge;
|
|
2172
2182
|
export {
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2183
|
+
Bs as Bootstrap,
|
|
2184
|
+
Qs as BootstrapStatic,
|
|
2185
|
+
Us as Button,
|
|
2186
|
+
Ts as Callout,
|
|
2187
|
+
ks as DevPortal,
|
|
2188
|
+
Gs as Head,
|
|
2189
|
+
Fs as Layout,
|
|
2190
|
+
Ls as Link,
|
|
2191
|
+
Ks as RouterError,
|
|
2192
|
+
$s as ServerError,
|
|
2193
|
+
Os as useMDXComponents
|
|
2184
2194
|
};
|
|
2185
2195
|
//# sourceMappingURL=zudoku.components.js.map
|