zudoku 0.32.5 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +3 -0
- package/dist/app/main.js +1 -1
- package/dist/app/main.js.map +1 -1
- package/dist/cli/build/handler.d.ts +1 -3
- package/dist/cli/build/handler.js +7 -0
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/cli.js +5 -0
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/build.d.ts +11 -3
- package/dist/cli/cmds/build.js +20 -13
- package/dist/cli/cmds/build.js.map +1 -1
- package/dist/cli/cmds/preview.d.ts +16 -0
- package/dist/cli/cmds/preview.js +25 -0
- package/dist/cli/cmds/preview.js.map +1 -0
- package/dist/cli/preview/handler.d.ts +3 -0
- package/dist/cli/preview/handler.js +37 -0
- package/dist/cli/preview/handler.js.map +1 -0
- package/dist/config/common.d.ts +5 -2
- package/dist/config/config.d.ts +2 -7
- package/dist/config/loader.d.ts +4 -4
- package/dist/config/loader.js +7 -4
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/validate.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.d.ts +2 -2
- package/dist/lib/authentication/providers/auth0.js +1 -0
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +4 -3
- package/dist/lib/authentication/providers/openid.js +4 -2
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/ThemeSwitch.js +1 -1
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/Zudoku.d.ts +1 -1
- package/dist/lib/components/Zudoku.js +7 -6
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
- package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
- package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
- package/dist/lib/core/RouteGuard.js +12 -5
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +10 -0
- package/dist/lib/core/ZudokuContext.js +17 -1
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +8 -2
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/hooks/index.d.ts +3 -0
- package/dist/lib/hooks/index.js +5 -0
- package/dist/lib/hooks/index.js.map +1 -0
- package/dist/lib/hooks/useEvent.d.ts +11 -0
- package/dist/lib/hooks/useEvent.js +19 -0
- package/dist/lib/hooks/useEvent.js.map +1 -0
- package/dist/lib/hooks/useEvent.test.d.ts +1 -0
- package/dist/lib/hooks/useEvent.test.js +100 -0
- package/dist/lib/hooks/useEvent.test.js.map +1 -0
- package/dist/lib/ui/Stepper.d.ts +4 -0
- package/dist/lib/ui/Stepper.js +7 -0
- package/dist/lib/ui/Stepper.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +3 -1
- package/dist/lib/util/MdxComponents.js +3 -0
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/vite/config.d.ts +2 -5
- package/dist/vite/config.js +21 -33
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +1 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/css/plugin.d.ts +2 -2
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +2 -2
- package/dist/vite/plugin-api-keys.js +3 -3
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +2 -2
- package/dist/vite/plugin-api.js +5 -5
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +2 -2
- package/dist/vite/plugin-auth.js +3 -3
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +2 -2
- package/dist/vite/plugin-component.js +3 -2
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +4 -3
- package/dist/vite/plugin-config-reload.js +11 -6
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +2 -2
- package/dist/vite/plugin-config.js +2 -2
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +2 -2
- package/dist/vite/plugin-custom-pages.js +3 -3
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +2 -2
- package/dist/vite/plugin-docs.js +5 -5
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +2 -2
- package/dist/vite/plugin-frontmatter.js +5 -4
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +2 -2
- package/dist/vite/plugin-mdx.js +1 -1
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-redirect.d.ts +2 -2
- package/dist/vite/plugin-redirect.js +3 -3
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +2 -2
- package/dist/vite/plugin-search.js +1 -1
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-sidebar.d.ts +2 -2
- package/dist/vite/plugin-sidebar.js +2 -2
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin-theme-css.d.ts +2 -2
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/dist/vite/plugin.d.ts +2 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender/FileWritingResponse.d.ts +2 -1
- package/dist/vite/prerender/FileWritingResponse.js +4 -1
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
- package/dist/vite/prerender/worker.d.ts +1 -1
- package/dist/vite/prerender/worker.js +3 -0
- package/dist/vite/prerender/worker.js.map +1 -1
- package/lib/{AuthenticationPlugin-BlxA4Mbn.js → AuthenticationPlugin-_gUMnGxb.js} +2 -2
- package/lib/{AuthenticationPlugin-BlxA4Mbn.js.map → AuthenticationPlugin-_gUMnGxb.js.map} +1 -1
- package/lib/{Markdown-Cr9sYpR_.js → Markdown-DePfm7oQ.js} +1384 -1381
- package/lib/{Markdown-Cr9sYpR_.js.map → Markdown-DePfm7oQ.js.map} +1 -1
- package/lib/{MdxPage-Dt-UEQl8.js → MdxPage-DM9mE-G-.js} +4 -4
- package/lib/{MdxPage-Dt-UEQl8.js.map → MdxPage-DM9mE-G-.js.map} +1 -1
- package/lib/{OasProvider-WVtvHP5H.js → OasProvider-Bvu4dDpX.js} +3 -3
- package/lib/{OasProvider-WVtvHP5H.js.map → OasProvider-Bvu4dDpX.js.map} +1 -1
- package/lib/{OperationList-DhOwupvv.js → OperationList-DWnNbwVg.js} +241 -240
- package/lib/OperationList-DWnNbwVg.js.map +1 -0
- package/lib/{Select-D9hI1G-y.js → Select-BmoX1iTH.js} +36 -36
- package/lib/{Select-D9hI1G-y.js.map → Select-BmoX1iTH.js.map} +1 -1
- package/lib/{SlotletProvider-CEfNOA8i.js → SlotletProvider-DdtIOUi6.js} +2 -2
- package/lib/{SlotletProvider-CEfNOA8i.js.map → SlotletProvider-DdtIOUi6.js.map} +1 -1
- package/lib/{createServer-DMf6O2Rz.js → createServer-DmusVVsi.js} +987 -967
- package/lib/createServer-DmusVVsi.js.map +1 -0
- package/lib/{hook-CWwSAAlH.js → hook-4_6pQSo4.js} +29 -29
- package/lib/{hook-CWwSAAlH.js.map → hook-4_6pQSo4.js.map} +1 -1
- package/lib/{index-Do_30Hpk.js → index-DVBlM15k.js} +83 -82
- package/lib/{index-Do_30Hpk.js.map → index-DVBlM15k.js.map} +1 -1
- package/lib/index-DwT-v3zK.js +86 -0
- package/lib/index-DwT-v3zK.js.map +1 -0
- package/lib/{mutation-B0wxqzSN.js → mutation-DTunCQKB.js} +2 -2
- package/lib/{mutation-B0wxqzSN.js.map → mutation-DTunCQKB.js.map} +1 -1
- package/lib/objectEntries-yMIkr2mI.js +5 -0
- package/lib/objectEntries-yMIkr2mI.js.map +1 -0
- package/lib/ui/Stepper.js +6 -0
- package/lib/ui/Stepper.js.map +1 -0
- package/lib/ui/SyntaxHighlight.js +2902 -7
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/{useScrollToAnchor-C-sRxs9o.js → useScrollToAnchor-BW8y_cwU.js} +3 -3
- package/lib/{useScrollToAnchor-C-sRxs9o.js.map → useScrollToAnchor-BW8y_cwU.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +15 -14
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +126 -124
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +497 -456
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.css +1 -0
- package/lib/zudoku.hooks.js +19 -0
- package/lib/zudoku.hooks.js.map +1 -0
- package/lib/zudoku.plugin-api-catalog.js +2 -2
- package/lib/zudoku.plugin-api-keys.js +5 -5
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/lib/zudoku.plugins.js +9 -8
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +12 -4
- package/src/app/main.tsx +1 -1
- package/src/lib/authentication/providers/auth0.tsx +3 -2
- package/src/lib/authentication/providers/openid.tsx +8 -5
- package/src/lib/components/ThemeSwitch.tsx +1 -1
- package/src/lib/components/Zudoku.tsx +9 -5
- package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
- package/src/lib/core/RouteGuard.tsx +13 -5
- package/src/lib/core/ZudokuContext.ts +31 -0
- package/src/lib/core/plugins.ts +16 -2
- package/src/lib/hooks/index.ts +5 -0
- package/src/lib/hooks/useEvent.test.tsx +149 -0
- package/src/lib/hooks/useEvent.ts +41 -0
- package/src/lib/ui/Stepper.css +43 -0
- package/src/lib/ui/Stepper.tsx +8 -0
- package/src/lib/util/MdxComponents.tsx +4 -1
- package/lib/OperationList-DhOwupvv.js.map +0 -1
- package/lib/SyntaxHighlight-CcnUjERD.js +0 -2986
- package/lib/SyntaxHighlight-CcnUjERD.js.map +0 -1
- package/lib/createServer-DMf6O2Rz.js.map +0 -1
package/lib/zudoku.components.js
CHANGED
|
@@ -3,49 +3,50 @@ var xe = (t) => {
|
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
5
|
var dt = (t, e, r) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
6
|
-
var
|
|
7
|
-
var l = (t, e, r) => (ve(t, e, "read from private field"), r ? r.call(t) : e.get(t)),
|
|
8
|
-
var
|
|
6
|
+
var j = (t, e, r) => dt(t, typeof e != "symbol" ? e + "" : e, r), ve = (t, e, r) => e.has(t) || xe("Cannot " + r);
|
|
7
|
+
var l = (t, e, r) => (ve(t, e, "read from private field"), r ? r.call(t) : e.get(t)), w = (t, e, r) => e.has(t) ? xe("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), y = (t, e, r, s) => (ve(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r);
|
|
8
|
+
var _ = (t, e, r, s) => ({
|
|
9
9
|
set _(a) {
|
|
10
|
-
|
|
10
|
+
y(t, e, a, r);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return l(t, e,
|
|
13
|
+
return l(t, e, s);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { a as Fe, H as
|
|
17
|
-
import { z as Be, J as ht } from "./
|
|
18
|
-
import { u as
|
|
19
|
-
import { S as He,
|
|
20
|
-
import { j as
|
|
16
|
+
import { a as Fe, H as le } from "./index.esm-CQHE3GEU.js";
|
|
17
|
+
import { z as Be, J as ht } from "./index-DwT-v3zK.js";
|
|
18
|
+
import { u as te, m as ft, O as ce, R as mt, S as gt, h as ue, f as pt, L as de } from "./chunk-IR6S3I6Y-D_3UmFIn.js";
|
|
19
|
+
import { S as He, q as ze, Q as xt, n as P, r as ye, t as be, v as M, w as vt, x as yt, y as bt, z as jt, A as je, B as we, C as wt, h as Pe, D as ke, E as Pt, f as kt, k as z, a as D, F as Le, G as Ke, H as Ct, j as ae, b as St, Z as Nt, I as Et, J as Dt } from "./hook-4_6pQSo4.js";
|
|
20
|
+
import { j as n } from "./jsx-runtime-CYK1ROHF.js";
|
|
21
21
|
import * as U from "react";
|
|
22
|
-
import
|
|
22
|
+
import Mt, { useRef as V, useEffect as A, createContext as he, StrictMode as $e, useState as L, useCallback as Ot, Suspense as fe, memo as Ue, forwardRef as At, Component as qt, createElement as Ce, useMemo as re, useContext as Tt } from "react";
|
|
23
23
|
import { Z as Ze } from "./invariant-Caa8-XvF.js";
|
|
24
|
-
import { E as Ye, S, a as
|
|
25
|
-
import { Button as
|
|
26
|
-
import { Callout as
|
|
27
|
-
import { M as
|
|
28
|
-
import * as
|
|
29
|
-
import { C as
|
|
30
|
-
import { CircleXIcon as
|
|
24
|
+
import { E as Ye, S, a as It, R as Qt } from "./SlotletProvider-DdtIOUi6.js";
|
|
25
|
+
import { Button as Rt } from "./ui/Button.js";
|
|
26
|
+
import { Callout as Ft } from "./ui/Callout.js";
|
|
27
|
+
import { M as Bt } from "./mutation-DTunCQKB.js";
|
|
28
|
+
import * as Ht from "react-dom";
|
|
29
|
+
import { C as me } from "./ClientOnly-E7hGysn1.js";
|
|
30
|
+
import { CircleXIcon as zt, SearchIcon as Lt, SunIcon as Kt, MoonIcon as $t, MenuIcon as Ut, PanelLeftIcon as Zt } from "lucide-react";
|
|
31
31
|
import { Drawer as Ve, DrawerTrigger as Xe, DrawerContent as Ge, DrawerTitle as _e } from "./ui/Drawer.js";
|
|
32
32
|
import { c as Q } from "./cn-qaFjX9_3.js";
|
|
33
|
-
import { s as
|
|
34
|
-
import { u as
|
|
35
|
-
import { B as
|
|
36
|
-
import { isSearchPlugin as
|
|
37
|
-
import { DropdownMenu as dr, DropdownMenuTrigger as hr, DropdownMenuContent as fr, DropdownMenuLabel as
|
|
33
|
+
import { s as Yt, S as Se, a as Vt, M as Xt, u as Gt } from "./useScrollToAnchor-BW8y_cwU.js";
|
|
34
|
+
import { u as _t, H as Wt, P as Jt, a as er, V as tr, M as rr } from "./Markdown-DePfm7oQ.js";
|
|
35
|
+
import { B as ie, S as We } from "./Spinner-1KrEmx1V.js";
|
|
36
|
+
import { isSearchPlugin as sr, isProfileMenuPlugin as nr, isNavigationPlugin as ar, isEventConsumerPlugin as ir, needsInitialization as or, isApiIdentityPlugin as lr, isMdxProviderPlugin as cr, hasHead as ur } from "./zudoku.plugins.js";
|
|
37
|
+
import { DropdownMenu as dr, DropdownMenuTrigger as hr, DropdownMenuContent as fr, DropdownMenuLabel as mr, DropdownMenuSeparator as se, DropdownMenuSub as gr, DropdownMenuSubTrigger as pr, DropdownMenuPortal as xr, DropdownMenuSubContent as vr, DropdownMenuItem as yr } from "./ui/DropdownMenu.js";
|
|
38
38
|
import { j as Ne } from "./joinUrl-10po2Jdj.js";
|
|
39
39
|
import { VisuallyHidden as Je } from "@radix-ui/react-visually-hidden";
|
|
40
40
|
import { a as br } from "./index-CPNSgwSb.js";
|
|
41
41
|
import { C as jr } from "./CategoryHeading-DpB47wvk.js";
|
|
42
|
-
|
|
42
|
+
import { o as wr } from "./objectEntries-yMIkr2mI.js";
|
|
43
|
+
var E, Ie, Pr = (Ie = class extends He {
|
|
43
44
|
constructor(e = {}) {
|
|
44
45
|
super();
|
|
45
|
-
|
|
46
|
-
this.config = e,
|
|
46
|
+
w(this, E);
|
|
47
|
+
this.config = e, y(this, E, /* @__PURE__ */ new Map());
|
|
47
48
|
}
|
|
48
|
-
build(e, r,
|
|
49
|
+
build(e, r, s) {
|
|
49
50
|
const a = r.queryKey, o = r.queryHash ?? ze(a, r);
|
|
50
51
|
let i = this.get(o);
|
|
51
52
|
return i || (i = new xt({
|
|
@@ -53,108 +54,108 @@ var D, Ie, wr = (Ie = class extends He {
|
|
|
53
54
|
queryKey: a,
|
|
54
55
|
queryHash: o,
|
|
55
56
|
options: e.defaultQueryOptions(r),
|
|
56
|
-
state:
|
|
57
|
+
state: s,
|
|
57
58
|
defaultOptions: e.getQueryDefaults(a)
|
|
58
59
|
}), this.add(i)), i;
|
|
59
60
|
}
|
|
60
61
|
add(e) {
|
|
61
|
-
l(this,
|
|
62
|
+
l(this, E).has(e.queryHash) || (l(this, E).set(e.queryHash, e), this.notify({
|
|
62
63
|
type: "added",
|
|
63
64
|
query: e
|
|
64
65
|
}));
|
|
65
66
|
}
|
|
66
67
|
remove(e) {
|
|
67
|
-
const r = l(this,
|
|
68
|
-
r && (e.destroy(), r === e && l(this,
|
|
68
|
+
const r = l(this, E).get(e.queryHash);
|
|
69
|
+
r && (e.destroy(), r === e && l(this, E).delete(e.queryHash), this.notify({ type: "removed", query: e }));
|
|
69
70
|
}
|
|
70
71
|
clear() {
|
|
71
|
-
|
|
72
|
+
P.batch(() => {
|
|
72
73
|
this.getAll().forEach((e) => {
|
|
73
74
|
this.remove(e);
|
|
74
75
|
});
|
|
75
76
|
});
|
|
76
77
|
}
|
|
77
78
|
get(e) {
|
|
78
|
-
return l(this,
|
|
79
|
+
return l(this, E).get(e);
|
|
79
80
|
}
|
|
80
81
|
getAll() {
|
|
81
|
-
return [...l(this,
|
|
82
|
+
return [...l(this, E).values()];
|
|
82
83
|
}
|
|
83
84
|
find(e) {
|
|
84
85
|
const r = { exact: !0, ...e };
|
|
85
86
|
return this.getAll().find(
|
|
86
|
-
(
|
|
87
|
+
(s) => ye(r, s)
|
|
87
88
|
);
|
|
88
89
|
}
|
|
89
90
|
findAll(e = {}) {
|
|
90
91
|
const r = this.getAll();
|
|
91
|
-
return Object.keys(e).length > 0 ? r.filter((
|
|
92
|
+
return Object.keys(e).length > 0 ? r.filter((s) => ye(e, s)) : r;
|
|
92
93
|
}
|
|
93
94
|
notify(e) {
|
|
94
|
-
|
|
95
|
+
P.batch(() => {
|
|
95
96
|
this.listeners.forEach((r) => {
|
|
96
97
|
r(e);
|
|
97
98
|
});
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
101
|
onFocus() {
|
|
101
|
-
|
|
102
|
+
P.batch(() => {
|
|
102
103
|
this.getAll().forEach((e) => {
|
|
103
104
|
e.onFocus();
|
|
104
105
|
});
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
108
|
onOnline() {
|
|
108
|
-
|
|
109
|
+
P.batch(() => {
|
|
109
110
|
this.getAll().forEach((e) => {
|
|
110
111
|
e.onOnline();
|
|
111
112
|
});
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
|
-
},
|
|
115
|
+
}, E = new WeakMap(), Ie), O, C, Y, Qe, kr = (Qe = class extends He {
|
|
115
116
|
constructor(e = {}) {
|
|
116
117
|
super();
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
this.config = e,
|
|
118
|
+
w(this, O);
|
|
119
|
+
w(this, C);
|
|
120
|
+
w(this, Y);
|
|
121
|
+
this.config = e, y(this, O, /* @__PURE__ */ new Set()), y(this, C, /* @__PURE__ */ new Map()), y(this, Y, 0);
|
|
121
122
|
}
|
|
122
|
-
build(e, r,
|
|
123
|
-
const a = new
|
|
123
|
+
build(e, r, s) {
|
|
124
|
+
const a = new Bt({
|
|
124
125
|
mutationCache: this,
|
|
125
|
-
mutationId: ++
|
|
126
|
+
mutationId: ++_(this, Y)._,
|
|
126
127
|
options: e.defaultMutationOptions(r),
|
|
127
|
-
state:
|
|
128
|
+
state: s
|
|
128
129
|
});
|
|
129
130
|
return this.add(a), a;
|
|
130
131
|
}
|
|
131
132
|
add(e) {
|
|
132
133
|
l(this, O).add(e);
|
|
133
|
-
const r =
|
|
134
|
+
const r = W(e);
|
|
134
135
|
if (typeof r == "string") {
|
|
135
|
-
const
|
|
136
|
-
|
|
136
|
+
const s = l(this, C).get(r);
|
|
137
|
+
s ? s.push(e) : l(this, C).set(r, [e]);
|
|
137
138
|
}
|
|
138
139
|
this.notify({ type: "added", mutation: e });
|
|
139
140
|
}
|
|
140
141
|
remove(e) {
|
|
141
142
|
if (l(this, O).delete(e)) {
|
|
142
|
-
const r =
|
|
143
|
+
const r = W(e);
|
|
143
144
|
if (typeof r == "string") {
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
146
|
-
if (
|
|
147
|
-
const a =
|
|
148
|
-
a !== -1 &&
|
|
149
|
-
} else
|
|
145
|
+
const s = l(this, C).get(r);
|
|
146
|
+
if (s)
|
|
147
|
+
if (s.length > 1) {
|
|
148
|
+
const a = s.indexOf(e);
|
|
149
|
+
a !== -1 && s.splice(a, 1);
|
|
150
|
+
} else s[0] === e && l(this, C).delete(r);
|
|
150
151
|
}
|
|
151
152
|
}
|
|
152
153
|
this.notify({ type: "removed", mutation: e });
|
|
153
154
|
}
|
|
154
155
|
canRun(e) {
|
|
155
|
-
const r =
|
|
156
|
+
const r = W(e);
|
|
156
157
|
if (typeof r == "string") {
|
|
157
|
-
const
|
|
158
|
+
const s = l(this, C).get(r), a = s == null ? void 0 : s.find(
|
|
158
159
|
(o) => o.state.status === "pending"
|
|
159
160
|
);
|
|
160
161
|
return !a || a === e;
|
|
@@ -162,16 +163,16 @@ var D, Ie, wr = (Ie = class extends He {
|
|
|
162
163
|
return !0;
|
|
163
164
|
}
|
|
164
165
|
runNext(e) {
|
|
165
|
-
var
|
|
166
|
-
const r =
|
|
166
|
+
var s;
|
|
167
|
+
const r = W(e);
|
|
167
168
|
if (typeof r == "string") {
|
|
168
|
-
const a = (
|
|
169
|
+
const a = (s = l(this, C).get(r)) == null ? void 0 : s.find((o) => o !== e && o.state.isPaused);
|
|
169
170
|
return (a == null ? void 0 : a.continue()) ?? Promise.resolve();
|
|
170
171
|
} else
|
|
171
172
|
return Promise.resolve();
|
|
172
173
|
}
|
|
173
174
|
clear() {
|
|
174
|
-
|
|
175
|
+
P.batch(() => {
|
|
175
176
|
l(this, O).forEach((e) => {
|
|
176
177
|
this.notify({ type: "removed", mutation: e });
|
|
177
178
|
}), l(this, O).clear(), l(this, C).clear();
|
|
@@ -183,14 +184,14 @@ var D, Ie, wr = (Ie = class extends He {
|
|
|
183
184
|
find(e) {
|
|
184
185
|
const r = { exact: !0, ...e };
|
|
185
186
|
return this.getAll().find(
|
|
186
|
-
(
|
|
187
|
+
(s) => be(r, s)
|
|
187
188
|
);
|
|
188
189
|
}
|
|
189
190
|
findAll(e = {}) {
|
|
190
191
|
return this.getAll().filter((r) => be(e, r));
|
|
191
192
|
}
|
|
192
193
|
notify(e) {
|
|
193
|
-
|
|
194
|
+
P.batch(() => {
|
|
194
195
|
this.listeners.forEach((r) => {
|
|
195
196
|
r(e);
|
|
196
197
|
});
|
|
@@ -198,63 +199,63 @@ var D, Ie, wr = (Ie = class extends He {
|
|
|
198
199
|
}
|
|
199
200
|
resumePausedMutations() {
|
|
200
201
|
const e = this.getAll().filter((r) => r.state.isPaused);
|
|
201
|
-
return
|
|
202
|
+
return P.batch(
|
|
202
203
|
() => Promise.all(
|
|
203
204
|
e.map((r) => r.continue().catch(M))
|
|
204
205
|
)
|
|
205
206
|
);
|
|
206
207
|
}
|
|
207
208
|
}, O = new WeakMap(), C = new WeakMap(), Y = new WeakMap(), Qe);
|
|
208
|
-
function
|
|
209
|
+
function W(t) {
|
|
209
210
|
var e;
|
|
210
211
|
return (e = t.options.scope) == null ? void 0 : e.id;
|
|
211
212
|
}
|
|
212
|
-
function
|
|
213
|
+
function Ee(t) {
|
|
213
214
|
return {
|
|
214
215
|
onFetch: (e, r) => {
|
|
215
|
-
var g,
|
|
216
|
-
const
|
|
216
|
+
var g, m, h, f, v;
|
|
217
|
+
const s = e.options, a = (h = (m = (g = e.fetchOptions) == null ? void 0 : g.meta) == null ? void 0 : m.fetchMore) == null ? void 0 : h.direction, o = ((f = e.state.data) == null ? void 0 : f.pages) || [], i = ((v = e.state.data) == null ? void 0 : v.pageParams) || [];
|
|
217
218
|
let u = { pages: [], pageParams: [] }, d = 0;
|
|
218
219
|
const c = async () => {
|
|
219
|
-
let
|
|
220
|
+
let x = !1;
|
|
220
221
|
const k = (b) => {
|
|
221
222
|
Object.defineProperty(b, "signal", {
|
|
222
223
|
enumerable: !0,
|
|
223
|
-
get: () => (e.signal.aborted ?
|
|
224
|
-
|
|
224
|
+
get: () => (e.signal.aborted ? x = !0 : e.signal.addEventListener("abort", () => {
|
|
225
|
+
x = !0;
|
|
225
226
|
}), e.signal)
|
|
226
227
|
});
|
|
227
|
-
},
|
|
228
|
-
if (
|
|
228
|
+
}, X = vt(e.options, e.fetchOptions), K = async (b, N, $) => {
|
|
229
|
+
if (x)
|
|
229
230
|
return Promise.reject();
|
|
230
231
|
if (N == null && b.pages.length)
|
|
231
232
|
return Promise.resolve(b);
|
|
232
|
-
const
|
|
233
|
+
const G = {
|
|
233
234
|
client: e.client,
|
|
234
235
|
queryKey: e.queryKey,
|
|
235
236
|
pageParam: N,
|
|
236
237
|
direction: $ ? "backward" : "forward",
|
|
237
238
|
meta: e.options.meta
|
|
238
239
|
};
|
|
239
|
-
k(
|
|
240
|
-
const ct = await
|
|
241
|
-
|
|
242
|
-
), { maxPages:
|
|
240
|
+
k(G);
|
|
241
|
+
const ct = await X(
|
|
242
|
+
G
|
|
243
|
+
), { maxPages: ge } = e.options, pe = $ ? yt : bt;
|
|
243
244
|
return {
|
|
244
|
-
pages: pe(b.pages, ct,
|
|
245
|
-
pageParams: pe(b.pageParams, N,
|
|
245
|
+
pages: pe(b.pages, ct, ge),
|
|
246
|
+
pageParams: pe(b.pageParams, N, ge)
|
|
246
247
|
};
|
|
247
248
|
};
|
|
248
249
|
if (a && o.length) {
|
|
249
|
-
const b = a === "backward", N = b ?
|
|
250
|
+
const b = a === "backward", N = b ? Cr : De, $ = {
|
|
250
251
|
pages: o,
|
|
251
252
|
pageParams: i
|
|
252
|
-
},
|
|
253
|
-
u = await K($,
|
|
253
|
+
}, G = N(s, $);
|
|
254
|
+
u = await K($, G, b);
|
|
254
255
|
} else {
|
|
255
256
|
const b = t ?? o.length;
|
|
256
257
|
do {
|
|
257
|
-
const N = d === 0 ? i[0] ??
|
|
258
|
+
const N = d === 0 ? i[0] ?? s.initialPageParam : De(s, u);
|
|
258
259
|
if (d > 0 && N == null)
|
|
259
260
|
break;
|
|
260
261
|
u = await K(u, N), d++;
|
|
@@ -263,9 +264,9 @@ function De(t) {
|
|
|
263
264
|
return u;
|
|
264
265
|
};
|
|
265
266
|
e.options.persister ? e.fetchFn = () => {
|
|
266
|
-
var
|
|
267
|
-
return (k = (
|
|
268
|
-
|
|
267
|
+
var x, k;
|
|
268
|
+
return (k = (x = e.options).persister) == null ? void 0 : k.call(
|
|
269
|
+
x,
|
|
269
270
|
c,
|
|
270
271
|
{
|
|
271
272
|
client: e.client,
|
|
@@ -279,112 +280,112 @@ function De(t) {
|
|
|
279
280
|
}
|
|
280
281
|
};
|
|
281
282
|
}
|
|
282
|
-
function
|
|
283
|
-
const
|
|
283
|
+
function De(t, { pages: e, pageParams: r }) {
|
|
284
|
+
const s = e.length - 1;
|
|
284
285
|
return e.length > 0 ? t.getNextPageParam(
|
|
285
|
-
e[
|
|
286
|
+
e[s],
|
|
286
287
|
e,
|
|
287
|
-
r[
|
|
288
|
+
r[s],
|
|
288
289
|
r
|
|
289
290
|
) : void 0;
|
|
290
291
|
}
|
|
291
|
-
function
|
|
292
|
-
var
|
|
293
|
-
return e.length > 0 ? (
|
|
292
|
+
function Cr(t, { pages: e, pageParams: r }) {
|
|
293
|
+
var s;
|
|
294
|
+
return e.length > 0 ? (s = t.getPreviousPageParam) == null ? void 0 : s.call(t, e[0], e, r[0], r) : void 0;
|
|
294
295
|
}
|
|
295
|
-
var
|
|
296
|
+
var p, q, T, R, F, I, B, H, Re, Sr = (Re = class {
|
|
296
297
|
constructor(t = {}) {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
298
|
+
w(this, p);
|
|
299
|
+
w(this, q);
|
|
300
|
+
w(this, T);
|
|
301
|
+
w(this, R);
|
|
302
|
+
w(this, F);
|
|
303
|
+
w(this, I);
|
|
304
|
+
w(this, B);
|
|
305
|
+
w(this, H);
|
|
306
|
+
y(this, p, t.queryCache || new Pr()), y(this, q, t.mutationCache || new kr()), y(this, T, t.defaultOptions || {}), y(this, R, /* @__PURE__ */ new Map()), y(this, F, /* @__PURE__ */ new Map()), y(this, I, 0);
|
|
306
307
|
}
|
|
307
308
|
mount() {
|
|
308
|
-
|
|
309
|
-
t && (await this.resumePausedMutations(), l(this,
|
|
310
|
-
})),
|
|
311
|
-
t && (await this.resumePausedMutations(), l(this,
|
|
309
|
+
_(this, I)._++, l(this, I) === 1 && (y(this, B, jt.subscribe(async (t) => {
|
|
310
|
+
t && (await this.resumePausedMutations(), l(this, p).onFocus());
|
|
311
|
+
})), y(this, H, je.subscribe(async (t) => {
|
|
312
|
+
t && (await this.resumePausedMutations(), l(this, p).onOnline());
|
|
312
313
|
})));
|
|
313
314
|
}
|
|
314
315
|
unmount() {
|
|
315
316
|
var t, e;
|
|
316
|
-
|
|
317
|
+
_(this, I)._--, l(this, I) === 0 && ((t = l(this, B)) == null || t.call(this), y(this, B, void 0), (e = l(this, H)) == null || e.call(this), y(this, H, void 0));
|
|
317
318
|
}
|
|
318
319
|
isFetching(t) {
|
|
319
|
-
return l(this,
|
|
320
|
+
return l(this, p).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
320
321
|
}
|
|
321
322
|
isMutating(t) {
|
|
322
|
-
return l(this,
|
|
323
|
+
return l(this, q).findAll({ ...t, status: "pending" }).length;
|
|
323
324
|
}
|
|
324
325
|
getQueryData(t) {
|
|
325
326
|
var r;
|
|
326
327
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
327
|
-
return (r = l(this,
|
|
328
|
+
return (r = l(this, p).get(e.queryHash)) == null ? void 0 : r.state.data;
|
|
328
329
|
}
|
|
329
330
|
ensureQueryData(t) {
|
|
330
|
-
const e = this.defaultQueryOptions(t), r = l(this,
|
|
331
|
-
return
|
|
331
|
+
const e = this.defaultQueryOptions(t), r = l(this, p).build(this, e), s = r.state.data;
|
|
332
|
+
return s === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && r.isStaleByTime(we(e.staleTime, r)) && this.prefetchQuery(e), Promise.resolve(s));
|
|
332
333
|
}
|
|
333
334
|
getQueriesData(t) {
|
|
334
|
-
return l(this,
|
|
335
|
-
const
|
|
336
|
-
return [e,
|
|
335
|
+
return l(this, p).findAll(t).map(({ queryKey: e, state: r }) => {
|
|
336
|
+
const s = r.data;
|
|
337
|
+
return [e, s];
|
|
337
338
|
});
|
|
338
339
|
}
|
|
339
340
|
setQueryData(t, e, r) {
|
|
340
|
-
const
|
|
341
|
-
|
|
341
|
+
const s = this.defaultQueryOptions({ queryKey: t }), a = l(this, p).get(
|
|
342
|
+
s.queryHash
|
|
342
343
|
), o = a == null ? void 0 : a.state.data, i = wt(e, o);
|
|
343
344
|
if (i !== void 0)
|
|
344
|
-
return l(this,
|
|
345
|
+
return l(this, p).build(this, s).setData(i, { ...r, manual: !0 });
|
|
345
346
|
}
|
|
346
347
|
setQueriesData(t, e, r) {
|
|
347
|
-
return
|
|
348
|
-
() => l(this,
|
|
349
|
-
|
|
350
|
-
this.setQueryData(
|
|
348
|
+
return P.batch(
|
|
349
|
+
() => l(this, p).findAll(t).map(({ queryKey: s }) => [
|
|
350
|
+
s,
|
|
351
|
+
this.setQueryData(s, e, r)
|
|
351
352
|
])
|
|
352
353
|
);
|
|
353
354
|
}
|
|
354
355
|
getQueryState(t) {
|
|
355
356
|
var r;
|
|
356
357
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
357
|
-
return (r = l(this,
|
|
358
|
+
return (r = l(this, p).get(
|
|
358
359
|
e.queryHash
|
|
359
360
|
)) == null ? void 0 : r.state;
|
|
360
361
|
}
|
|
361
362
|
removeQueries(t) {
|
|
362
|
-
const e = l(this,
|
|
363
|
-
|
|
363
|
+
const e = l(this, p);
|
|
364
|
+
P.batch(() => {
|
|
364
365
|
e.findAll(t).forEach((r) => {
|
|
365
366
|
e.remove(r);
|
|
366
367
|
});
|
|
367
368
|
});
|
|
368
369
|
}
|
|
369
370
|
resetQueries(t, e) {
|
|
370
|
-
const r = l(this,
|
|
371
|
+
const r = l(this, p), s = {
|
|
371
372
|
type: "active",
|
|
372
373
|
...t
|
|
373
374
|
};
|
|
374
|
-
return
|
|
375
|
+
return P.batch(() => (r.findAll(t).forEach((a) => {
|
|
375
376
|
a.reset();
|
|
376
|
-
}), this.refetchQueries(
|
|
377
|
+
}), this.refetchQueries(s, e)));
|
|
377
378
|
}
|
|
378
379
|
cancelQueries(t, e = {}) {
|
|
379
|
-
const r = { revert: !0, ...e },
|
|
380
|
-
() => l(this,
|
|
380
|
+
const r = { revert: !0, ...e }, s = P.batch(
|
|
381
|
+
() => l(this, p).findAll(t).map((a) => a.cancel(r))
|
|
381
382
|
);
|
|
382
|
-
return Promise.all(
|
|
383
|
+
return Promise.all(s).then(M).catch(M);
|
|
383
384
|
}
|
|
384
385
|
invalidateQueries(t, e = {}) {
|
|
385
|
-
return
|
|
386
|
-
if (l(this,
|
|
387
|
-
|
|
386
|
+
return P.batch(() => {
|
|
387
|
+
if (l(this, p).findAll(t).forEach((s) => {
|
|
388
|
+
s.invalidate();
|
|
388
389
|
}), (t == null ? void 0 : t.refetchType) === "none")
|
|
389
390
|
return Promise.resolve();
|
|
390
391
|
const r = {
|
|
@@ -398,18 +399,18 @@ var x, E, q, R, F, T, B, H, Re, Cr = (Re = class {
|
|
|
398
399
|
const r = {
|
|
399
400
|
...e,
|
|
400
401
|
cancelRefetch: e.cancelRefetch ?? !0
|
|
401
|
-
},
|
|
402
|
-
() => l(this,
|
|
402
|
+
}, s = P.batch(
|
|
403
|
+
() => l(this, p).findAll(t).filter((a) => !a.isDisabled()).map((a) => {
|
|
403
404
|
let o = a.fetch(void 0, r);
|
|
404
405
|
return r.throwOnError || (o = o.catch(M)), a.state.fetchStatus === "paused" ? Promise.resolve() : o;
|
|
405
406
|
})
|
|
406
407
|
);
|
|
407
|
-
return Promise.all(
|
|
408
|
+
return Promise.all(s).then(M);
|
|
408
409
|
}
|
|
409
410
|
fetchQuery(t) {
|
|
410
411
|
const e = this.defaultQueryOptions(t);
|
|
411
412
|
e.retry === void 0 && (e.retry = !1);
|
|
412
|
-
const r = l(this,
|
|
413
|
+
const r = l(this, p).build(this, e);
|
|
413
414
|
return r.isStaleByTime(
|
|
414
415
|
we(e.staleTime, r)
|
|
415
416
|
) ? r.fetch(e) : Promise.resolve(r.state.data);
|
|
@@ -418,28 +419,28 @@ var x, E, q, R, F, T, B, H, Re, Cr = (Re = class {
|
|
|
418
419
|
return this.fetchQuery(t).then(M).catch(M);
|
|
419
420
|
}
|
|
420
421
|
fetchInfiniteQuery(t) {
|
|
421
|
-
return t.behavior =
|
|
422
|
+
return t.behavior = Ee(t.pages), this.fetchQuery(t);
|
|
422
423
|
}
|
|
423
424
|
prefetchInfiniteQuery(t) {
|
|
424
425
|
return this.fetchInfiniteQuery(t).then(M).catch(M);
|
|
425
426
|
}
|
|
426
427
|
ensureInfiniteQueryData(t) {
|
|
427
|
-
return t.behavior =
|
|
428
|
+
return t.behavior = Ee(t.pages), this.ensureQueryData(t);
|
|
428
429
|
}
|
|
429
430
|
resumePausedMutations() {
|
|
430
|
-
return je.isOnline() ? l(this,
|
|
431
|
+
return je.isOnline() ? l(this, q).resumePausedMutations() : Promise.resolve();
|
|
431
432
|
}
|
|
432
433
|
getQueryCache() {
|
|
433
|
-
return l(this,
|
|
434
|
+
return l(this, p);
|
|
434
435
|
}
|
|
435
436
|
getMutationCache() {
|
|
436
|
-
return l(this,
|
|
437
|
+
return l(this, q);
|
|
437
438
|
}
|
|
438
439
|
getDefaultOptions() {
|
|
439
|
-
return l(this,
|
|
440
|
+
return l(this, T);
|
|
440
441
|
}
|
|
441
442
|
setDefaultOptions(t) {
|
|
442
|
-
|
|
443
|
+
y(this, T, t);
|
|
443
444
|
}
|
|
444
445
|
setQueryDefaults(t, e) {
|
|
445
446
|
l(this, R).set(Pe(t), {
|
|
@@ -449,8 +450,8 @@ var x, E, q, R, F, T, B, H, Re, Cr = (Re = class {
|
|
|
449
450
|
}
|
|
450
451
|
getQueryDefaults(t) {
|
|
451
452
|
const e = [...l(this, R).values()], r = {};
|
|
452
|
-
return e.forEach((
|
|
453
|
-
ke(t,
|
|
453
|
+
return e.forEach((s) => {
|
|
454
|
+
ke(t, s.queryKey) && Object.assign(r, s.defaultOptions);
|
|
454
455
|
}), r;
|
|
455
456
|
}
|
|
456
457
|
setMutationDefaults(t, e) {
|
|
@@ -462,15 +463,15 @@ var x, E, q, R, F, T, B, H, Re, Cr = (Re = class {
|
|
|
462
463
|
getMutationDefaults(t) {
|
|
463
464
|
const e = [...l(this, F).values()];
|
|
464
465
|
let r = {};
|
|
465
|
-
return e.forEach((
|
|
466
|
-
ke(t,
|
|
466
|
+
return e.forEach((s) => {
|
|
467
|
+
ke(t, s.mutationKey) && (r = { ...r, ...s.defaultOptions });
|
|
467
468
|
}), r;
|
|
468
469
|
}
|
|
469
470
|
defaultQueryOptions(t) {
|
|
470
471
|
if (t._defaulted)
|
|
471
472
|
return t;
|
|
472
473
|
const e = {
|
|
473
|
-
...l(this,
|
|
474
|
+
...l(this, T).queries,
|
|
474
475
|
...this.getQueryDefaults(t.queryKey),
|
|
475
476
|
...t,
|
|
476
477
|
_defaulted: !0
|
|
@@ -482,129 +483,135 @@ var x, E, q, R, F, T, B, H, Re, Cr = (Re = class {
|
|
|
482
483
|
}
|
|
483
484
|
defaultMutationOptions(t) {
|
|
484
485
|
return t != null && t._defaulted ? t : {
|
|
485
|
-
...l(this,
|
|
486
|
+
...l(this, T).mutations,
|
|
486
487
|
...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
|
|
487
488
|
...t,
|
|
488
489
|
_defaulted: !0
|
|
489
490
|
};
|
|
490
491
|
}
|
|
491
492
|
clear() {
|
|
492
|
-
l(this,
|
|
493
|
+
l(this, p).clear(), l(this, q).clear();
|
|
493
494
|
}
|
|
494
|
-
},
|
|
495
|
-
function
|
|
495
|
+
}, p = new WeakMap(), q = new WeakMap(), T = new WeakMap(), R = new WeakMap(), F = new WeakMap(), I = new WeakMap(), B = new WeakMap(), H = new WeakMap(), Re);
|
|
496
|
+
function Nr(t) {
|
|
496
497
|
return t;
|
|
497
498
|
}
|
|
498
|
-
function
|
|
499
|
+
function Me(t, e, r) {
|
|
499
500
|
var d, c;
|
|
500
501
|
if (typeof e != "object" || e === null)
|
|
501
502
|
return;
|
|
502
|
-
const
|
|
503
|
-
i.forEach(({ state: g, ...
|
|
504
|
-
var h,
|
|
505
|
-
|
|
503
|
+
const s = t.getMutationCache(), a = t.getQueryCache(), o = ((d = r == null ? void 0 : r.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((c = t.getDefaultOptions().hydrate) == null ? void 0 : c.deserializeData) ?? Nr, i = e.mutations || [], u = e.queries || [];
|
|
504
|
+
i.forEach(({ state: g, ...m }) => {
|
|
505
|
+
var h, f;
|
|
506
|
+
s.build(
|
|
506
507
|
t,
|
|
507
508
|
{
|
|
508
509
|
...(h = t.getDefaultOptions().hydrate) == null ? void 0 : h.mutations,
|
|
509
|
-
...(
|
|
510
|
-
...
|
|
510
|
+
...(f = r == null ? void 0 : r.defaultOptions) == null ? void 0 : f.mutations,
|
|
511
|
+
...m
|
|
511
512
|
},
|
|
512
513
|
g
|
|
513
514
|
);
|
|
514
|
-
}), u.forEach(({ queryKey: g, state:
|
|
515
|
-
var
|
|
516
|
-
let
|
|
517
|
-
const k =
|
|
518
|
-
if (
|
|
519
|
-
if (
|
|
520
|
-
const { fetchStatus: b, ...N } =
|
|
521
|
-
|
|
515
|
+
}), u.forEach(({ queryKey: g, state: m, queryHash: h, meta: f, promise: v }) => {
|
|
516
|
+
var X, K;
|
|
517
|
+
let x = a.get(h);
|
|
518
|
+
const k = m.data === void 0 ? m.data : o(m.data);
|
|
519
|
+
if (x) {
|
|
520
|
+
if (x.state.dataUpdatedAt < m.dataUpdatedAt) {
|
|
521
|
+
const { fetchStatus: b, ...N } = m;
|
|
522
|
+
x.setState({
|
|
522
523
|
...N,
|
|
523
524
|
data: k
|
|
524
525
|
});
|
|
525
526
|
}
|
|
526
527
|
} else
|
|
527
|
-
|
|
528
|
+
x = a.build(
|
|
528
529
|
t,
|
|
529
530
|
{
|
|
530
|
-
...(
|
|
531
|
+
...(X = t.getDefaultOptions().hydrate) == null ? void 0 : X.queries,
|
|
531
532
|
...(K = r == null ? void 0 : r.defaultOptions) == null ? void 0 : K.queries,
|
|
532
533
|
queryKey: g,
|
|
533
534
|
queryHash: h,
|
|
534
|
-
meta:
|
|
535
|
+
meta: f
|
|
535
536
|
},
|
|
536
537
|
// Reset fetch status to idle to avoid
|
|
537
538
|
// query being stuck in fetching state upon hydration
|
|
538
539
|
{
|
|
539
|
-
...
|
|
540
|
+
...m,
|
|
540
541
|
data: k,
|
|
541
542
|
fetchStatus: "idle"
|
|
542
543
|
}
|
|
543
544
|
);
|
|
544
|
-
if (
|
|
545
|
-
const b = Promise.resolve(
|
|
546
|
-
|
|
545
|
+
if (v) {
|
|
546
|
+
const b = Promise.resolve(v).then(o);
|
|
547
|
+
x.fetch(void 0, { initialPromise: b });
|
|
547
548
|
}
|
|
548
549
|
});
|
|
549
550
|
}
|
|
550
|
-
var
|
|
551
|
+
var Oe = (t, e) => typeof t == "object" && t !== null && e in t, Er = ({
|
|
551
552
|
children: t,
|
|
552
553
|
options: e = {},
|
|
553
554
|
state: r,
|
|
554
|
-
queryClient:
|
|
555
|
+
queryClient: s
|
|
555
556
|
}) => {
|
|
556
|
-
const a = kt(
|
|
557
|
+
const a = kt(s), [o, i] = U.useState(), u = U.useRef(e);
|
|
557
558
|
return u.current = e, U.useMemo(() => {
|
|
558
559
|
if (r) {
|
|
559
560
|
if (typeof r != "object")
|
|
560
561
|
return;
|
|
561
|
-
const d = a.getQueryCache(), c = r.queries || [], g = [],
|
|
562
|
+
const d = a.getQueryCache(), c = r.queries || [], g = [], m = [];
|
|
562
563
|
for (const h of c) {
|
|
563
|
-
const
|
|
564
|
-
if (!
|
|
564
|
+
const f = d.get(h.queryHash);
|
|
565
|
+
if (!f)
|
|
565
566
|
g.push(h);
|
|
566
567
|
else {
|
|
567
|
-
const
|
|
568
|
-
|
|
568
|
+
const v = h.state.dataUpdatedAt > f.state.dataUpdatedAt || // RSC special serialized then-able chunks
|
|
569
|
+
Oe(h.promise, "status") && Oe(f.promise, "status") && h.promise.status !== f.promise.status, x = o == null ? void 0 : o.find(
|
|
569
570
|
(k) => k.queryHash === h.queryHash
|
|
570
571
|
);
|
|
571
|
-
|
|
572
|
+
v && (!x || h.state.dataUpdatedAt > x.state.dataUpdatedAt) && m.push(h);
|
|
572
573
|
}
|
|
573
574
|
}
|
|
574
|
-
g.length > 0 &&
|
|
575
|
-
(h) => h ? [...h, ...
|
|
575
|
+
g.length > 0 && Me(a, { queries: g }, u.current), m.length > 0 && i(
|
|
576
|
+
(h) => h ? [...h, ...m] : m
|
|
576
577
|
);
|
|
577
578
|
}
|
|
578
579
|
}, [a, o, r]), U.useEffect(() => {
|
|
579
|
-
o && (
|
|
580
|
+
o && (Me(a, { queries: o }, u.current), i(void 0));
|
|
580
581
|
}, [a, o]), t;
|
|
581
582
|
};
|
|
582
583
|
const Dr = (t) => {
|
|
583
|
-
const e =
|
|
584
|
-
return e.current = t,
|
|
584
|
+
const e = V(t);
|
|
585
|
+
return e.current = t, A(() => {
|
|
585
586
|
e.current = t;
|
|
586
587
|
}, [t]), e;
|
|
587
588
|
}, Mr = () => {
|
|
588
589
|
var o;
|
|
589
|
-
const t = z(), e =
|
|
590
|
+
const t = z(), e = D(), r = te(), s = Dr(r.pathname), a = (o = e.options.protectedRoutes) == null ? void 0 : o.some(
|
|
590
591
|
(i) => ft({ path: i, end: !0 }, r.pathname)
|
|
591
592
|
);
|
|
592
|
-
if (
|
|
593
|
+
if (A(() => {
|
|
593
594
|
var i;
|
|
594
|
-
a
|
|
595
|
-
redirectTo:
|
|
596
|
-
})
|
|
597
|
-
}, [
|
|
595
|
+
!a || t.isPending || t.isAuthenticated || (i = e.authentication) == null || i.signIn({
|
|
596
|
+
redirectTo: s.current
|
|
597
|
+
});
|
|
598
|
+
}, [
|
|
599
|
+
a,
|
|
600
|
+
t.isPending,
|
|
601
|
+
t.isAuthenticated,
|
|
602
|
+
e.authentication,
|
|
603
|
+
s
|
|
604
|
+
]), a && !t.isAuthenticated)
|
|
598
605
|
return null;
|
|
599
606
|
if (a && !t.isAuthEnabled)
|
|
600
607
|
throw new Ze("Authentication is not enabled", {
|
|
601
608
|
title: "Authentication is not enabled",
|
|
602
609
|
developerHint: "To use protectedRoutes you need authentication to be enabled"
|
|
603
610
|
});
|
|
604
|
-
return /* @__PURE__ */
|
|
611
|
+
return /* @__PURE__ */ n.jsx(ce, {});
|
|
605
612
|
};
|
|
606
613
|
function Or({ error: t }) {
|
|
607
|
-
return /* @__PURE__ */
|
|
614
|
+
return /* @__PURE__ */ n.jsx(Ye, { error: t });
|
|
608
615
|
}
|
|
609
616
|
/**
|
|
610
617
|
* react-router v7.1.5
|
|
@@ -617,75 +624,75 @@ function Or({ error: t }) {
|
|
|
617
624
|
* @license MIT
|
|
618
625
|
*/
|
|
619
626
|
function Ar(t) {
|
|
620
|
-
return /* @__PURE__ */ U.createElement(
|
|
627
|
+
return /* @__PURE__ */ U.createElement(mt, { flushSync: Ht.flushSync, ...t });
|
|
621
628
|
}
|
|
622
|
-
const
|
|
629
|
+
const oe = he({ stagger: !1 }), qr = new Sr({
|
|
623
630
|
defaultOptions: {
|
|
624
631
|
queries: {
|
|
625
632
|
staleTime: 1e3 * 60 * 5
|
|
626
633
|
}
|
|
627
634
|
}
|
|
628
|
-
}),
|
|
635
|
+
}), Tr = ({
|
|
629
636
|
router: t,
|
|
630
637
|
hydrate: e = !1
|
|
631
|
-
}) => /* @__PURE__ */
|
|
638
|
+
}) => /* @__PURE__ */ n.jsx($e, { children: /* @__PURE__ */ n.jsx(Le, { client: qr, children: /* @__PURE__ */ n.jsx(Er, { state: e ? window.DATA : void 0, children: /* @__PURE__ */ n.jsx(Fe, { children: /* @__PURE__ */ n.jsx(oe.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ n.jsx(Ar, { router: t }) }) }) }) }) }), Ir = ({
|
|
632
639
|
router: t,
|
|
633
640
|
context: e,
|
|
634
641
|
queryClient: r,
|
|
635
|
-
helmetContext:
|
|
636
|
-
}) => /* @__PURE__ */
|
|
637
|
-
var Z = { exports: {} },
|
|
638
|
-
function
|
|
639
|
-
return
|
|
640
|
-
(function(r,
|
|
641
|
-
|
|
642
|
-
})(
|
|
642
|
+
helmetContext: s
|
|
643
|
+
}) => /* @__PURE__ */ n.jsx($e, { children: /* @__PURE__ */ n.jsx(Le, { client: r, children: /* @__PURE__ */ n.jsx(Fe, { context: s, children: /* @__PURE__ */ n.jsx(gt, { router: t, context: e }) }) }) });
|
|
644
|
+
var Z = { exports: {} }, Qr = Z.exports, Ae;
|
|
645
|
+
function Rr() {
|
|
646
|
+
return Ae || (Ae = 1, function(t, e) {
|
|
647
|
+
(function(r, s) {
|
|
648
|
+
s(e, Mt);
|
|
649
|
+
})(Qr, function(r, s) {
|
|
643
650
|
const a = {
|
|
644
651
|
delay: 500,
|
|
645
652
|
minDuration: 200,
|
|
646
653
|
ssr: !0
|
|
647
654
|
};
|
|
648
655
|
function o() {
|
|
649
|
-
const [u, d] =
|
|
650
|
-
return
|
|
656
|
+
const [u, d] = s.useState(!0);
|
|
657
|
+
return s.useEffect(() => {
|
|
651
658
|
d(!1);
|
|
652
659
|
}, []), u;
|
|
653
660
|
}
|
|
654
661
|
function i(u, d) {
|
|
655
662
|
d = Object.assign({}, a, d);
|
|
656
|
-
const c = o() && d.ssr, g = c && u ? "DISPLAY" : "IDLE", [
|
|
657
|
-
return
|
|
658
|
-
if (u && (
|
|
659
|
-
clearTimeout(
|
|
660
|
-
const
|
|
661
|
-
|
|
663
|
+
const c = o() && d.ssr, g = c && u ? "DISPLAY" : "IDLE", [m, h] = s.useState(g), f = s.useRef(null);
|
|
664
|
+
return s.useEffect(() => {
|
|
665
|
+
if (u && (m === "IDLE" || c)) {
|
|
666
|
+
clearTimeout(f.current);
|
|
667
|
+
const v = c ? 0 : d.delay;
|
|
668
|
+
f.current = setTimeout(() => {
|
|
662
669
|
if (!u)
|
|
663
670
|
return h("IDLE");
|
|
664
|
-
|
|
671
|
+
f.current = setTimeout(() => {
|
|
665
672
|
h("EXPIRE");
|
|
666
673
|
}, d.minDuration), h("DISPLAY");
|
|
667
|
-
},
|
|
674
|
+
}, v), c || h("DELAY");
|
|
668
675
|
}
|
|
669
|
-
!u &&
|
|
670
|
-
}, [u,
|
|
676
|
+
!u && m !== "DISPLAY" && (clearTimeout(f.current), h("IDLE"));
|
|
677
|
+
}, [u, m, d.delay, d.minDuration, c]), s.useEffect(() => () => clearTimeout(f.current), []), m === "DISPLAY" || m === "EXPIRE";
|
|
671
678
|
}
|
|
672
679
|
r.defaultOptions = a, r.useSpinDelay = i;
|
|
673
680
|
});
|
|
674
681
|
}(Z, Z.exports)), Z.exports;
|
|
675
682
|
}
|
|
676
|
-
var
|
|
677
|
-
const
|
|
678
|
-
const t =
|
|
679
|
-
|
|
680
|
-
const r = e.current !== t.pathname,
|
|
681
|
-
r && !
|
|
683
|
+
var Fr = Rr();
|
|
684
|
+
const Br = () => {
|
|
685
|
+
const t = te(), e = V(t.pathname);
|
|
686
|
+
A(() => {
|
|
687
|
+
const r = e.current !== t.pathname, s = t.hash !== "";
|
|
688
|
+
r && !s && window.scrollTo(0, 0), e.current = t.pathname;
|
|
682
689
|
}, [t.pathname, t.hash]);
|
|
683
690
|
};
|
|
684
|
-
function
|
|
691
|
+
function Hr({
|
|
685
692
|
className: t,
|
|
686
693
|
...e
|
|
687
694
|
}) {
|
|
688
|
-
return /* @__PURE__ */
|
|
695
|
+
return /* @__PURE__ */ n.jsx(
|
|
689
696
|
"div",
|
|
690
697
|
{
|
|
691
698
|
className: Q("animate-pulse rounded-md bg-muted", t),
|
|
@@ -699,70 +706,70 @@ const qe = {
|
|
|
699
706
|
tip: "bg-green-600",
|
|
700
707
|
caution: "bg-orange-500",
|
|
701
708
|
danger: "bg-rose-500"
|
|
702
|
-
},
|
|
703
|
-
const { page: t } =
|
|
709
|
+
}, zr = () => {
|
|
710
|
+
const { page: t } = D(), [e, r] = L(!0);
|
|
704
711
|
if (!(t != null && t.banner) || !e)
|
|
705
|
-
return /* @__PURE__ */
|
|
706
|
-
const
|
|
707
|
-
return /* @__PURE__ */
|
|
712
|
+
return /* @__PURE__ */ n.jsx("style", { children: ":root { --banner-height: 0px; }" });
|
|
713
|
+
const s = t.banner.color && t.banner.color in qe ? qe[t.banner.color] : t.banner.color ? void 0 : "bg-primary", a = s ? {} : { backgroundColor: t.banner.color };
|
|
714
|
+
return /* @__PURE__ */ n.jsxs(
|
|
708
715
|
"div",
|
|
709
716
|
{
|
|
710
717
|
className: Q(
|
|
711
718
|
"relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
|
|
712
|
-
|
|
719
|
+
s
|
|
713
720
|
),
|
|
714
721
|
style: a,
|
|
715
722
|
children: [
|
|
716
|
-
/* @__PURE__ */
|
|
717
|
-
t.banner.dismissible && /* @__PURE__ */
|
|
723
|
+
/* @__PURE__ */ n.jsx("div", { className: "w-full", children: t.banner.message }),
|
|
724
|
+
t.banner.dismissible && /* @__PURE__ */ n.jsx(
|
|
718
725
|
"button",
|
|
719
726
|
{
|
|
720
727
|
type: "button",
|
|
721
728
|
className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
|
|
722
729
|
onClick: () => r(!1),
|
|
723
|
-
children: /* @__PURE__ */
|
|
730
|
+
children: /* @__PURE__ */ n.jsx(zt, { size: 16 })
|
|
724
731
|
}
|
|
725
732
|
)
|
|
726
733
|
]
|
|
727
734
|
}
|
|
728
735
|
);
|
|
729
736
|
}, et = ({ className: t }) => {
|
|
730
|
-
const e =
|
|
731
|
-
|
|
737
|
+
const e = D(), [r, s] = L(!1), a = Ot(() => s(!1), []);
|
|
738
|
+
A(() => {
|
|
732
739
|
if (r)
|
|
733
740
|
return;
|
|
734
741
|
function i(u) {
|
|
735
|
-
u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(),
|
|
742
|
+
u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(), s(!0));
|
|
736
743
|
}
|
|
737
744
|
return window.addEventListener("keydown", i), () => {
|
|
738
745
|
window.removeEventListener("keydown", i);
|
|
739
746
|
};
|
|
740
|
-
}, [r,
|
|
741
|
-
const o = e.plugins.find(
|
|
742
|
-
return o ? /* @__PURE__ */
|
|
743
|
-
/* @__PURE__ */
|
|
747
|
+
}, [r, s]);
|
|
748
|
+
const o = e.plugins.find(sr);
|
|
749
|
+
return o ? /* @__PURE__ */ n.jsxs("div", { className: t, children: [
|
|
750
|
+
/* @__PURE__ */ n.jsxs(
|
|
744
751
|
"button",
|
|
745
752
|
{
|
|
746
753
|
type: "button",
|
|
747
|
-
onClick: () =>
|
|
754
|
+
onClick: () => s(!0),
|
|
748
755
|
className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
|
|
749
756
|
children: [
|
|
750
|
-
/* @__PURE__ */
|
|
751
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
758
|
+
/* @__PURE__ */ n.jsx(Lt, { size: 14 }),
|
|
752
759
|
"Search"
|
|
753
760
|
] }),
|
|
754
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ n.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
|
|
755
762
|
]
|
|
756
763
|
}
|
|
757
764
|
),
|
|
758
|
-
/* @__PURE__ */
|
|
765
|
+
/* @__PURE__ */ n.jsx(fe, { fallback: null, children: o.renderSearch({
|
|
759
766
|
isOpen: r,
|
|
760
767
|
onClose: a
|
|
761
768
|
}) })
|
|
762
769
|
] }) : null;
|
|
763
770
|
}, tt = () => {
|
|
764
771
|
const { resolvedTheme: t, setTheme: e } = Be();
|
|
765
|
-
return /* @__PURE__ */
|
|
772
|
+
return /* @__PURE__ */ n.jsx(me, { fallback: /* @__PURE__ */ n.jsx(ie, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ n.jsxs(
|
|
766
773
|
"button",
|
|
767
774
|
{
|
|
768
775
|
type: "button",
|
|
@@ -770,18 +777,18 @@ const qe = {
|
|
|
770
777
|
onClick: () => e(t === "dark" ? "light" : "dark"),
|
|
771
778
|
"aria-label": t === "dark" ? "Switch to light mode" : "Switch to dark mode",
|
|
772
779
|
children: [
|
|
773
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ n.jsx(
|
|
774
781
|
"div",
|
|
775
782
|
{
|
|
776
783
|
className: Q(
|
|
777
784
|
"border border-transparent rounded-full p-0.5 [&>svg>circle]:transition-colors [&>svg>path]:transition-transform transition-all [&>svg>path]:duration-200 [&>svg>circle]:duration-500 [&>svg>circle]:fill-transparent",
|
|
778
|
-
t === "light" && "border-border bg-muted
|
|
785
|
+
t === "light" && "border-border bg-muted",
|
|
779
786
|
t === "dark" && "group-hover:[&>svg>path]:scale-110 group-hover:[&>svg>path]:-translate-x-[1px] group-hover:[&>svg>path]:-translate-y-[1px] group-hover:rotate-[15deg] "
|
|
780
787
|
),
|
|
781
|
-
children: /* @__PURE__ */
|
|
788
|
+
children: /* @__PURE__ */ n.jsx(Kt, { size: 16 })
|
|
782
789
|
}
|
|
783
790
|
),
|
|
784
|
-
/* @__PURE__ */
|
|
791
|
+
/* @__PURE__ */ n.jsx(
|
|
785
792
|
"div",
|
|
786
793
|
{
|
|
787
794
|
className: Q(
|
|
@@ -789,17 +796,17 @@ const qe = {
|
|
|
789
796
|
t === "dark" && "border-border bg-muted [&>svg>path]:fill-white [&>svg>path]:stroke-transparent",
|
|
790
797
|
t === "light" && "group-hover:rotate-[-10deg] [&>svg>path]:stroke-currentColor"
|
|
791
798
|
),
|
|
792
|
-
children: /* @__PURE__ */
|
|
799
|
+
children: /* @__PURE__ */ n.jsx($t, { size: 16 })
|
|
793
800
|
}
|
|
794
801
|
)
|
|
795
802
|
]
|
|
796
803
|
}
|
|
797
804
|
) });
|
|
798
|
-
}, rt = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always",
|
|
799
|
-
const { topNavigation: t } =
|
|
800
|
-
return t.length <= 1 ? /* @__PURE__ */
|
|
801
|
-
/* @__PURE__ */
|
|
802
|
-
/* @__PURE__ */
|
|
805
|
+
}, rt = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", Lr = () => {
|
|
806
|
+
const { topNavigation: t } = D(), { isAuthenticated: e } = z();
|
|
807
|
+
return t.length <= 1 ? /* @__PURE__ */ n.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ n.jsx(fe, { children: /* @__PURE__ */ n.jsxs("div", { className: " items-center justify-between px-8 h-[--top-nav-height] hidden lg:flex text-sm", children: [
|
|
808
|
+
/* @__PURE__ */ n.jsx("nav", { className: "text-sm", children: /* @__PURE__ */ n.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx(st, { ...r }) }, r.id)) }) }),
|
|
809
|
+
/* @__PURE__ */ n.jsx(S, { name: "top-navigation-side" })
|
|
803
810
|
] }) });
|
|
804
811
|
}, st = ({
|
|
805
812
|
id: t,
|
|
@@ -807,9 +814,9 @@ const qe = {
|
|
|
807
814
|
default: r
|
|
808
815
|
}) => {
|
|
809
816
|
var c;
|
|
810
|
-
const { sidebars:
|
|
811
|
-
if (g.type === "doc") return
|
|
812
|
-
}) :
|
|
817
|
+
const { sidebars: s } = D(), a = s[t], o = Ke(), i = !!ue().location, u = ((c = o.topNavItem) == null ? void 0 : c.id) === t && !i, d = r ?? (a ? Ct(a, (g) => {
|
|
818
|
+
if (g.type === "doc") return ae(g.id);
|
|
819
|
+
}) : ae(t));
|
|
813
820
|
if (!d)
|
|
814
821
|
throw new Ze("Page not found.", {
|
|
815
822
|
developerHint: `No links found in top navigation for '${t}'. Check that the sidebar isn't empty or that a default link is set.`
|
|
@@ -817,7 +824,7 @@ const qe = {
|
|
|
817
824
|
return (
|
|
818
825
|
// We don't use isActive here because it has to be inside the sidebar,
|
|
819
826
|
// the top nav id doesn't necessarily start with the sidebar id
|
|
820
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ n.jsx(
|
|
821
828
|
pt,
|
|
822
829
|
{
|
|
823
830
|
className: ({ isPending: g }) => br(
|
|
@@ -829,27 +836,27 @@ const qe = {
|
|
|
829
836
|
}
|
|
830
837
|
)
|
|
831
838
|
);
|
|
832
|
-
},
|
|
833
|
-
const { topNavigation: t } =
|
|
834
|
-
return /* @__PURE__ */
|
|
839
|
+
}, Kr = () => {
|
|
840
|
+
const { topNavigation: t } = D(), { isAuthenticated: e } = z(), [r, s] = L(!1);
|
|
841
|
+
return /* @__PURE__ */ n.jsxs(
|
|
835
842
|
Ve,
|
|
836
843
|
{
|
|
837
844
|
direction: "right",
|
|
838
845
|
open: r,
|
|
839
|
-
onOpenChange: (a) =>
|
|
846
|
+
onOpenChange: (a) => s(a),
|
|
840
847
|
children: [
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
/* @__PURE__ */
|
|
848
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ n.jsx(Xe, { className: "lg:hidden", children: /* @__PURE__ */ n.jsx(Ut, { size: 22 }) }) }),
|
|
849
|
+
/* @__PURE__ */ n.jsx(
|
|
843
850
|
Ge,
|
|
844
851
|
{
|
|
845
852
|
className: "lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none",
|
|
846
853
|
"aria-describedby": void 0,
|
|
847
|
-
children: /* @__PURE__ */
|
|
848
|
-
/* @__PURE__ */
|
|
849
|
-
/* @__PURE__ */
|
|
850
|
-
/* @__PURE__ */
|
|
851
|
-
/* @__PURE__ */
|
|
852
|
-
t.filter(rt(e)).map((a) => /* @__PURE__ */
|
|
854
|
+
children: /* @__PURE__ */ n.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
|
|
855
|
+
/* @__PURE__ */ n.jsx(Je, { children: /* @__PURE__ */ n.jsx(_e, { children: "Navigation" }) }),
|
|
856
|
+
/* @__PURE__ */ n.jsx(et, { className: "flex p-4" }),
|
|
857
|
+
/* @__PURE__ */ n.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
|
|
858
|
+
/* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx(tt, {}) }),
|
|
859
|
+
t.filter(rt(e)).map((a) => /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx("button", { onClick: () => s(!1), children: /* @__PURE__ */ n.jsx(st, { ...a }) }) }, a.label))
|
|
853
860
|
] })
|
|
854
861
|
] })
|
|
855
862
|
}
|
|
@@ -857,23 +864,23 @@ const qe = {
|
|
|
857
864
|
]
|
|
858
865
|
}
|
|
859
866
|
);
|
|
860
|
-
},
|
|
861
|
-
/* @__PURE__ */
|
|
862
|
-
/* @__PURE__ */
|
|
867
|
+
}, ee = ({ item: t }) => t.children ? /* @__PURE__ */ n.jsxs(gr, { children: [
|
|
868
|
+
/* @__PURE__ */ n.jsx(pr, { children: t.label }),
|
|
869
|
+
/* @__PURE__ */ n.jsx(xr, { children: /* @__PURE__ */ n.jsx(vr, { children: t.children.map((e, r) => (
|
|
863
870
|
// eslint-disable-next-line react/no-array-index-key
|
|
864
|
-
/* @__PURE__ */
|
|
871
|
+
/* @__PURE__ */ n.jsx(ee, { item: e }, r)
|
|
865
872
|
)) }) })
|
|
866
|
-
] }, t.label) : /* @__PURE__ */
|
|
867
|
-
t.icon && /* @__PURE__ */
|
|
873
|
+
] }, t.label) : /* @__PURE__ */ n.jsx(de, { to: t.path ?? "", children: /* @__PURE__ */ n.jsxs(yr, { className: "flex gap-2", children: [
|
|
874
|
+
t.icon && /* @__PURE__ */ n.jsx(t.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
|
|
868
875
|
t.label
|
|
869
876
|
] }, t.label) }), nt = Ue(function() {
|
|
870
|
-
const e = z(), { isAuthenticated: r, profile:
|
|
871
|
-
return /* @__PURE__ */
|
|
872
|
-
/* @__PURE__ */
|
|
873
|
-
/* @__PURE__ */
|
|
874
|
-
/* @__PURE__ */
|
|
875
|
-
(i == null ? void 0 : i.logo) && /* @__PURE__ */
|
|
876
|
-
/* @__PURE__ */
|
|
877
|
+
const e = z(), { isAuthenticated: r, profile: s, isAuthEnabled: a } = z(), o = D(), { page: i, plugins: u } = o, d = u.filter((c) => nr(c)).flatMap((c) => c.getProfileMenuItems(o)).sort((c) => c.weight ?? 0);
|
|
878
|
+
return /* @__PURE__ */ n.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
|
|
879
|
+
/* @__PURE__ */ n.jsx(zr, {}),
|
|
880
|
+
/* @__PURE__ */ n.jsx("div", { className: "border-b", children: /* @__PURE__ */ n.jsxs("div", { className: "max-w-screen-2xl 2xl:border-x mx-auto grid grid-cols-[1fr_auto] lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center px-4 lg:px-8 h-[--top-header-height]", children: [
|
|
881
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex", children: /* @__PURE__ */ n.jsx(de, { to: "/", children: /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
882
|
+
(i == null ? void 0 : i.logo) && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
883
|
+
/* @__PURE__ */ n.jsx(
|
|
877
884
|
"img",
|
|
878
885
|
{
|
|
879
886
|
src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light : Ne(
|
|
@@ -886,7 +893,7 @@ const qe = {
|
|
|
886
893
|
loading: "lazy"
|
|
887
894
|
}
|
|
888
895
|
),
|
|
889
|
-
/* @__PURE__ */
|
|
896
|
+
/* @__PURE__ */ n.jsx(
|
|
890
897
|
"img",
|
|
891
898
|
{
|
|
892
899
|
src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : Ne(
|
|
@@ -900,50 +907,50 @@ const qe = {
|
|
|
900
907
|
}
|
|
901
908
|
)
|
|
902
909
|
] }),
|
|
903
|
-
/* @__PURE__ */
|
|
910
|
+
/* @__PURE__ */ n.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: i == null ? void 0 : i.pageTitle })
|
|
904
911
|
] }) }) }),
|
|
905
|
-
/* @__PURE__ */
|
|
906
|
-
/* @__PURE__ */
|
|
907
|
-
/* @__PURE__ */
|
|
908
|
-
/* @__PURE__ */
|
|
909
|
-
/* @__PURE__ */
|
|
910
|
-
a && /* @__PURE__ */
|
|
911
|
-
|
|
912
|
+
/* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
913
|
+
/* @__PURE__ */ n.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ n.jsx(et, {}) }),
|
|
914
|
+
/* @__PURE__ */ n.jsx(Kr, {}),
|
|
915
|
+
/* @__PURE__ */ n.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
|
|
916
|
+
/* @__PURE__ */ n.jsx(S, { name: "head-navigation-start" }),
|
|
917
|
+
a && /* @__PURE__ */ n.jsx(
|
|
918
|
+
me,
|
|
912
919
|
{
|
|
913
|
-
fallback: /* @__PURE__ */
|
|
914
|
-
children: r ? Object.values(d).length > 0 && /* @__PURE__ */
|
|
915
|
-
/* @__PURE__ */
|
|
916
|
-
/* @__PURE__ */
|
|
917
|
-
/* @__PURE__ */
|
|
918
|
-
|
|
919
|
-
(
|
|
920
|
+
fallback: /* @__PURE__ */ n.jsx(Hr, { className: "rounded h-5 w-24 mr-4" }),
|
|
921
|
+
children: r ? Object.values(d).length > 0 && /* @__PURE__ */ n.jsxs(dr, { modal: !1, children: [
|
|
922
|
+
/* @__PURE__ */ n.jsx(hr, { asChild: !0, children: /* @__PURE__ */ n.jsx(ie, { variant: "ghost", children: s != null && s.name ? `${s.name}` : "My Account" }) }),
|
|
923
|
+
/* @__PURE__ */ n.jsxs(fr, { className: "w-56", children: [
|
|
924
|
+
/* @__PURE__ */ n.jsxs(mr, { children: [
|
|
925
|
+
s != null && s.name ? `${s.name}` : "My Account",
|
|
926
|
+
(s == null ? void 0 : s.email) && /* @__PURE__ */ n.jsx("div", { className: "font-normal text-muted-foreground", children: s.email })
|
|
920
927
|
] }),
|
|
921
|
-
d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */
|
|
922
|
-
d.filter((c) => c.category === "top").map((c) => /* @__PURE__ */
|
|
928
|
+
d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */ n.jsx(se, {}),
|
|
929
|
+
d.filter((c) => c.category === "top").map((c) => /* @__PURE__ */ n.jsx(ee, { item: c }, c.label)),
|
|
923
930
|
d.filter(
|
|
924
931
|
(c) => !c.category || c.category === "middle"
|
|
925
|
-
).length > 0 && /* @__PURE__ */
|
|
932
|
+
).length > 0 && /* @__PURE__ */ n.jsx(se, {}),
|
|
926
933
|
d.filter(
|
|
927
934
|
(c) => !c.category || c.category === "middle"
|
|
928
|
-
).map((c) => /* @__PURE__ */
|
|
929
|
-
d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */
|
|
930
|
-
d.filter((c) => c.category === "bottom").map((c) => /* @__PURE__ */
|
|
935
|
+
).map((c) => /* @__PURE__ */ n.jsx(ee, { item: c }, c.label)),
|
|
936
|
+
d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */ n.jsx(se, {}),
|
|
937
|
+
d.filter((c) => c.category === "bottom").map((c) => /* @__PURE__ */ n.jsx(ee, { item: c }, c.label))
|
|
931
938
|
] })
|
|
932
|
-
] }) : /* @__PURE__ */
|
|
939
|
+
] }) : /* @__PURE__ */ n.jsx(ie, { variant: "ghost", onClick: () => e.login(), children: "Login" })
|
|
933
940
|
}
|
|
934
941
|
),
|
|
935
|
-
/* @__PURE__ */
|
|
936
|
-
/* @__PURE__ */
|
|
942
|
+
/* @__PURE__ */ n.jsx(S, { name: "head-navigation-end" }),
|
|
943
|
+
/* @__PURE__ */ n.jsx(tt, {})
|
|
937
944
|
] })
|
|
938
945
|
] })
|
|
939
946
|
] }) }),
|
|
940
|
-
/* @__PURE__ */
|
|
941
|
-
/* @__PURE__ */
|
|
942
|
-
/* @__PURE__ */
|
|
943
|
-
/* @__PURE__ */
|
|
947
|
+
/* @__PURE__ */ n.jsx("div", { className: "border-b hidden lg:block", children: /* @__PURE__ */ n.jsxs("div", { className: "max-w-screen-2xl mx-auto 2xl:border-x", children: [
|
|
948
|
+
/* @__PURE__ */ n.jsx(S, { name: "top-navigation-before" }),
|
|
949
|
+
/* @__PURE__ */ n.jsx(Lr, {}),
|
|
950
|
+
/* @__PURE__ */ n.jsx(S, { name: "top-navigation-after" })
|
|
944
951
|
] }) })
|
|
945
952
|
] });
|
|
946
|
-
}), at =
|
|
953
|
+
}), at = At(({ children: t, className: e, pushMainContent: r }, s) => /* @__PURE__ */ n.jsx(
|
|
947
954
|
"nav",
|
|
948
955
|
{
|
|
949
956
|
"data-navigation": String(r),
|
|
@@ -954,96 +961,96 @@ const qe = {
|
|
|
954
961
|
!r && "border-r-0",
|
|
955
962
|
e
|
|
956
963
|
),
|
|
957
|
-
ref:
|
|
964
|
+
ref: s,
|
|
958
965
|
children: t
|
|
959
966
|
}
|
|
960
967
|
));
|
|
961
968
|
at.displayName = "SidebarWrapper";
|
|
962
|
-
const
|
|
969
|
+
const $r = ({
|
|
963
970
|
onRequestClose: t
|
|
964
971
|
}) => {
|
|
965
|
-
const e =
|
|
966
|
-
return
|
|
972
|
+
const e = V(null), r = Ke();
|
|
973
|
+
return A(() => {
|
|
967
974
|
var a;
|
|
968
|
-
const
|
|
969
|
-
|
|
970
|
-
}, []), /* @__PURE__ */
|
|
971
|
-
/* @__PURE__ */
|
|
975
|
+
const s = (a = e.current) == null ? void 0 : a.querySelector('[aria-current="page"]');
|
|
976
|
+
Yt(s ?? null);
|
|
977
|
+
}, []), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
978
|
+
/* @__PURE__ */ n.jsxs(
|
|
972
979
|
at,
|
|
973
980
|
{
|
|
974
981
|
ref: e,
|
|
975
982
|
pushMainContent: r.sidebar.length > 0,
|
|
976
983
|
children: [
|
|
977
|
-
/* @__PURE__ */
|
|
978
|
-
r.sidebar.map((
|
|
979
|
-
/* @__PURE__ */
|
|
984
|
+
/* @__PURE__ */ n.jsx(S, { name: "zudoku-before-navigation" }),
|
|
985
|
+
r.sidebar.map((s) => /* @__PURE__ */ n.jsx(Se, { item: s }, s.label)),
|
|
986
|
+
/* @__PURE__ */ n.jsx(S, { name: "zudoku-after-navigation" })
|
|
980
987
|
]
|
|
981
988
|
}
|
|
982
989
|
),
|
|
983
|
-
/* @__PURE__ */
|
|
990
|
+
/* @__PURE__ */ n.jsx(
|
|
984
991
|
Ge,
|
|
985
992
|
{
|
|
986
993
|
className: "lg:hidden h-[100dvh] left-0 w-[320px] rounded-none",
|
|
987
994
|
"aria-describedby": void 0,
|
|
988
|
-
children: /* @__PURE__ */
|
|
989
|
-
/* @__PURE__ */
|
|
990
|
-
r.sidebar.map((
|
|
995
|
+
children: /* @__PURE__ */ n.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
|
|
996
|
+
/* @__PURE__ */ n.jsx(Je, { children: /* @__PURE__ */ n.jsx(_e, { children: "Sidebar" }) }),
|
|
997
|
+
r.sidebar.map((s) => /* @__PURE__ */ n.jsx(
|
|
991
998
|
Se,
|
|
992
999
|
{
|
|
993
|
-
item:
|
|
1000
|
+
item: s,
|
|
994
1001
|
onRequestClose: t
|
|
995
1002
|
},
|
|
996
|
-
|
|
1003
|
+
s.label
|
|
997
1004
|
))
|
|
998
1005
|
] })
|
|
999
1006
|
}
|
|
1000
1007
|
)
|
|
1001
1008
|
] });
|
|
1002
|
-
}, Te = () => /* @__PURE__ */
|
|
1003
|
-
const e =
|
|
1004
|
-
|
|
1005
|
-
const o =
|
|
1006
|
-
|
|
1009
|
+
}, Te = () => /* @__PURE__ */ n.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ n.jsx(We, {}) }), Ur = ({ children: t }) => {
|
|
1010
|
+
const e = te(), { setActiveAnchor: r } = _t(), { meta: s, authentication: a } = D();
|
|
1011
|
+
Vt(), Br();
|
|
1012
|
+
const o = V(e.pathname);
|
|
1013
|
+
A(() => {
|
|
1007
1014
|
var g;
|
|
1008
1015
|
(g = a == null ? void 0 : a.onPageLoad) == null || g.call(a);
|
|
1009
|
-
}, [a]),
|
|
1016
|
+
}, [a]), A(() => {
|
|
1010
1017
|
e.pathname !== o.current && r(""), o.current = e.pathname;
|
|
1011
1018
|
}, [e.pathname, r]);
|
|
1012
|
-
const i = !!ue().location, u =
|
|
1019
|
+
const i = !!ue().location, u = Fr.useSpinDelay(i, {
|
|
1013
1020
|
delay: 300,
|
|
1014
1021
|
minDuration: 500
|
|
1015
1022
|
}), [d, c] = L(!1);
|
|
1016
|
-
return /* @__PURE__ */
|
|
1023
|
+
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1017
1024
|
!1,
|
|
1018
|
-
/* @__PURE__ */
|
|
1019
|
-
(
|
|
1020
|
-
(
|
|
1025
|
+
/* @__PURE__ */ n.jsxs(le, { titleTemplate: s == null ? void 0 : s.title, children: [
|
|
1026
|
+
(s == null ? void 0 : s.description) && /* @__PURE__ */ n.jsx("meta", { name: "description", content: s.description }),
|
|
1027
|
+
(s == null ? void 0 : s.favicon) && /* @__PURE__ */ n.jsx("link", { rel: "icon", href: s.favicon })
|
|
1021
1028
|
] }),
|
|
1022
|
-
/* @__PURE__ */
|
|
1023
|
-
/* @__PURE__ */
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ n.jsx(S, { name: "layout-before-head" }),
|
|
1030
|
+
/* @__PURE__ */ n.jsx(nt, {}),
|
|
1031
|
+
/* @__PURE__ */ n.jsx(S, { name: "layout-after-head" }),
|
|
1032
|
+
/* @__PURE__ */ n.jsx("div", { className: "w-full min-h-[calc(100vh-var(--header-height))] max-w-screen-2xl mx-auto px-4 lg:px-8 2xl:border-x", children: u ? /* @__PURE__ */ n.jsx(Te, {}) : /* @__PURE__ */ n.jsx(fe, { fallback: /* @__PURE__ */ n.jsx(Te, {}), children: /* @__PURE__ */ n.jsxs(
|
|
1026
1033
|
Ve,
|
|
1027
1034
|
{
|
|
1028
1035
|
direction: "left",
|
|
1029
1036
|
open: d,
|
|
1030
1037
|
onOpenChange: (g) => c(g),
|
|
1031
1038
|
children: [
|
|
1032
|
-
/* @__PURE__ */
|
|
1033
|
-
/* @__PURE__ */
|
|
1039
|
+
/* @__PURE__ */ n.jsx($r, { onRequestClose: () => c(!1) }),
|
|
1040
|
+
/* @__PURE__ */ n.jsx(
|
|
1034
1041
|
"div",
|
|
1035
1042
|
{
|
|
1036
1043
|
className: Q(
|
|
1037
1044
|
"lg:hidden -mx-4 px-4 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
|
|
1038
1045
|
"peer-data-[navigation=false]:hidden"
|
|
1039
1046
|
),
|
|
1040
|
-
children: /* @__PURE__ */
|
|
1041
|
-
/* @__PURE__ */
|
|
1042
|
-
/* @__PURE__ */
|
|
1047
|
+
children: /* @__PURE__ */ n.jsxs(Xe, { className: "flex items-center gap-2", children: [
|
|
1048
|
+
/* @__PURE__ */ n.jsx(Zt, { size: 16, strokeWidth: 1.5 }),
|
|
1049
|
+
/* @__PURE__ */ n.jsx("span", { className: "text-sm", children: "Menu" })
|
|
1043
1050
|
] })
|
|
1044
1051
|
}
|
|
1045
1052
|
),
|
|
1046
|
-
/* @__PURE__ */
|
|
1053
|
+
/* @__PURE__ */ n.jsxs(
|
|
1047
1054
|
"main",
|
|
1048
1055
|
{
|
|
1049
1056
|
className: Q(
|
|
@@ -1054,9 +1061,9 @@ const Kr = ({
|
|
|
1054
1061
|
"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
|
|
1055
1062
|
),
|
|
1056
1063
|
children: [
|
|
1057
|
-
/* @__PURE__ */
|
|
1058
|
-
t ?? /* @__PURE__ */
|
|
1059
|
-
/* @__PURE__ */
|
|
1064
|
+
/* @__PURE__ */ n.jsx(S, { name: "zudoku-before-content" }),
|
|
1065
|
+
t ?? /* @__PURE__ */ n.jsx(ce, {}),
|
|
1066
|
+
/* @__PURE__ */ n.jsx(S, { name: "zudoku-after-content" })
|
|
1060
1067
|
]
|
|
1061
1068
|
}
|
|
1062
1069
|
)
|
|
@@ -1064,15 +1071,15 @@ const Kr = ({
|
|
|
1064
1071
|
}
|
|
1065
1072
|
) }) })
|
|
1066
1073
|
] });
|
|
1067
|
-
},
|
|
1074
|
+
}, Zr = ({
|
|
1068
1075
|
title: t = "An error occurred",
|
|
1069
1076
|
message: e,
|
|
1070
1077
|
category: r
|
|
1071
|
-
}) => /* @__PURE__ */
|
|
1072
|
-
r && /* @__PURE__ */
|
|
1073
|
-
t && /* @__PURE__ */
|
|
1074
|
-
/* @__PURE__ */
|
|
1075
|
-
] }),
|
|
1078
|
+
}) => /* @__PURE__ */ n.jsxs("div", { className: Jt + " h-full pt-[--padding-content-top]", children: [
|
|
1079
|
+
r && /* @__PURE__ */ n.jsx(jr, { children: r }),
|
|
1080
|
+
t && /* @__PURE__ */ n.jsx(Wt, { level: 1, className: "flex gap-3.5 items-center", children: t }),
|
|
1081
|
+
/* @__PURE__ */ n.jsx("p", { children: e })
|
|
1082
|
+
] }), Yr = (t) => {
|
|
1076
1083
|
switch (t) {
|
|
1077
1084
|
case 400:
|
|
1078
1085
|
return {
|
|
@@ -1135,23 +1142,23 @@ const Kr = ({
|
|
|
1135
1142
|
message: "Something went wrong while processing your request."
|
|
1136
1143
|
};
|
|
1137
1144
|
}
|
|
1138
|
-
},
|
|
1139
|
-
const r =
|
|
1140
|
-
return /* @__PURE__ */
|
|
1141
|
-
|
|
1145
|
+
}, Vr = ({ statusCode: t, message: e }) => {
|
|
1146
|
+
const r = Yr(t);
|
|
1147
|
+
return /* @__PURE__ */ n.jsx(
|
|
1148
|
+
Zr,
|
|
1142
1149
|
{
|
|
1143
1150
|
title: r.title,
|
|
1144
1151
|
message: e ?? r.message,
|
|
1145
1152
|
category: t
|
|
1146
1153
|
}
|
|
1147
1154
|
);
|
|
1148
|
-
},
|
|
1155
|
+
}, Xr = he(null), ne = {
|
|
1149
1156
|
didCatch: !1,
|
|
1150
1157
|
error: null
|
|
1151
1158
|
};
|
|
1152
|
-
class
|
|
1159
|
+
class Gr extends qt {
|
|
1153
1160
|
constructor(e) {
|
|
1154
|
-
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
1161
|
+
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ne;
|
|
1155
1162
|
}
|
|
1156
1163
|
static getDerivedStateFromError(e) {
|
|
1157
1164
|
return {
|
|
@@ -1164,38 +1171,38 @@ class Xr extends qt {
|
|
|
1164
1171
|
error: e
|
|
1165
1172
|
} = this.state;
|
|
1166
1173
|
if (e !== null) {
|
|
1167
|
-
for (var r,
|
|
1174
|
+
for (var r, s, a = arguments.length, o = new Array(a), i = 0; i < a; i++)
|
|
1168
1175
|
o[i] = arguments[i];
|
|
1169
|
-
(r = (
|
|
1176
|
+
(r = (s = this.props).onReset) === null || r === void 0 || r.call(s, {
|
|
1170
1177
|
args: o,
|
|
1171
1178
|
reason: "imperative-api"
|
|
1172
|
-
}), this.setState(
|
|
1179
|
+
}), this.setState(ne);
|
|
1173
1180
|
}
|
|
1174
1181
|
}
|
|
1175
1182
|
componentDidCatch(e, r) {
|
|
1176
|
-
var
|
|
1177
|
-
(
|
|
1183
|
+
var s, a;
|
|
1184
|
+
(s = (a = this.props).onError) === null || s === void 0 || s.call(a, e, r);
|
|
1178
1185
|
}
|
|
1179
1186
|
componentDidUpdate(e, r) {
|
|
1180
1187
|
const {
|
|
1181
|
-
didCatch:
|
|
1188
|
+
didCatch: s
|
|
1182
1189
|
} = this.state, {
|
|
1183
1190
|
resetKeys: a
|
|
1184
1191
|
} = this.props;
|
|
1185
|
-
if (
|
|
1192
|
+
if (s && r.error !== null && _r(e.resetKeys, a)) {
|
|
1186
1193
|
var o, i;
|
|
1187
1194
|
(o = (i = this.props).onReset) === null || o === void 0 || o.call(i, {
|
|
1188
1195
|
next: a,
|
|
1189
1196
|
prev: e.resetKeys,
|
|
1190
1197
|
reason: "keys"
|
|
1191
|
-
}), this.setState(
|
|
1198
|
+
}), this.setState(ne);
|
|
1192
1199
|
}
|
|
1193
1200
|
}
|
|
1194
1201
|
render() {
|
|
1195
1202
|
const {
|
|
1196
1203
|
children: e,
|
|
1197
1204
|
fallbackRender: r,
|
|
1198
|
-
FallbackComponent:
|
|
1205
|
+
FallbackComponent: s,
|
|
1199
1206
|
fallback: a
|
|
1200
1207
|
} = this.props, {
|
|
1201
1208
|
didCatch: o,
|
|
@@ -1209,14 +1216,14 @@ class Xr extends qt {
|
|
|
1209
1216
|
};
|
|
1210
1217
|
if (typeof r == "function")
|
|
1211
1218
|
u = r(d);
|
|
1212
|
-
else if (
|
|
1213
|
-
u = Ce(
|
|
1219
|
+
else if (s)
|
|
1220
|
+
u = Ce(s, d);
|
|
1214
1221
|
else if (a !== void 0)
|
|
1215
1222
|
u = a;
|
|
1216
1223
|
else
|
|
1217
1224
|
throw i;
|
|
1218
1225
|
}
|
|
1219
|
-
return Ce(
|
|
1226
|
+
return Ce(Xr.Provider, {
|
|
1220
1227
|
value: {
|
|
1221
1228
|
didCatch: o,
|
|
1222
1229
|
error: i,
|
|
@@ -1225,20 +1232,35 @@ class Xr extends qt {
|
|
|
1225
1232
|
}, u);
|
|
1226
1233
|
}
|
|
1227
1234
|
}
|
|
1228
|
-
function
|
|
1235
|
+
function _r() {
|
|
1229
1236
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
1230
|
-
return t.length !== e.length || t.some((r,
|
|
1237
|
+
return t.length !== e.length || t.some((r, s) => !Object.is(r, e[s]));
|
|
1231
1238
|
}
|
|
1232
|
-
|
|
1239
|
+
let Wr = () => ({
|
|
1240
|
+
emit(t, ...e) {
|
|
1241
|
+
for (let r = this.events[t] || [], s = 0, a = r.length; s < a; s++)
|
|
1242
|
+
r[s](...e);
|
|
1243
|
+
},
|
|
1244
|
+
events: {},
|
|
1245
|
+
on(t, e) {
|
|
1246
|
+
var r;
|
|
1247
|
+
return ((r = this.events)[t] || (r[t] = [])).push(e), () => {
|
|
1248
|
+
var s;
|
|
1249
|
+
this.events[t] = (s = this.events[t]) == null ? void 0 : s.filter((a) => e !== a);
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
});
|
|
1253
|
+
class Jr {
|
|
1233
1254
|
constructor(e) {
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1255
|
+
j(this, "plugins");
|
|
1256
|
+
j(this, "sidebars");
|
|
1257
|
+
j(this, "topNavigation");
|
|
1258
|
+
j(this, "meta");
|
|
1259
|
+
j(this, "page");
|
|
1260
|
+
j(this, "authentication");
|
|
1261
|
+
j(this, "navigationPlugins");
|
|
1262
|
+
j(this, "emitter", Wr());
|
|
1263
|
+
j(this, "initialize", async () => {
|
|
1242
1264
|
await Promise.all(
|
|
1243
1265
|
this.plugins.filter(or).map((e) => {
|
|
1244
1266
|
var r;
|
|
@@ -1246,99 +1268,118 @@ class _r {
|
|
|
1246
1268
|
})
|
|
1247
1269
|
);
|
|
1248
1270
|
});
|
|
1249
|
-
|
|
1271
|
+
j(this, "getApiIdentities", async () => (await Promise.all(
|
|
1250
1272
|
this.plugins.filter(lr).map((r) => r.getIdentities(this))
|
|
1251
1273
|
)).flat());
|
|
1252
|
-
|
|
1274
|
+
j(this, "emitEvent", (e, ...r) => this.emitter.emit(e, ...r));
|
|
1275
|
+
j(this, "getPluginSidebar", async (e) => (await Promise.all(
|
|
1253
1276
|
this.navigationPlugins.map(
|
|
1254
|
-
(
|
|
1277
|
+
(s) => {
|
|
1255
1278
|
var a;
|
|
1256
|
-
return (a =
|
|
1279
|
+
return (a = s.getSidebar) == null ? void 0 : a.call(s, ae(e));
|
|
1257
1280
|
}
|
|
1258
1281
|
)
|
|
1259
|
-
)).flatMap((
|
|
1260
|
-
|
|
1282
|
+
)).flatMap((s) => s ?? []));
|
|
1283
|
+
j(this, "signRequest", async (e) => {
|
|
1261
1284
|
if (!this.authentication)
|
|
1262
1285
|
throw new Error("No authentication provider configured");
|
|
1263
1286
|
const r = await this.authentication.getAccessToken();
|
|
1264
1287
|
return e.headers.set("Authorization", `Bearer ${r}`), e;
|
|
1265
1288
|
});
|
|
1266
|
-
this.options = e, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(
|
|
1289
|
+
this.options = e, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(ar), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page, this.plugins.forEach((r) => {
|
|
1290
|
+
ir(r) && wr(r.events).forEach(([s, a]) => {
|
|
1291
|
+
this.emitter.on(s, a);
|
|
1292
|
+
});
|
|
1293
|
+
});
|
|
1294
|
+
}
|
|
1295
|
+
addEventListener(e, r) {
|
|
1296
|
+
return this.emitter.on(e, r);
|
|
1267
1297
|
}
|
|
1268
1298
|
}
|
|
1269
|
-
function
|
|
1270
|
-
return /* @__PURE__ */
|
|
1299
|
+
function es({ error: t, resetErrorBoundary: e }) {
|
|
1300
|
+
return /* @__PURE__ */ n.jsx(Ye, { error: t });
|
|
1271
1301
|
}
|
|
1272
|
-
const
|
|
1273
|
-
(!
|
|
1302
|
+
const J = globalThis;
|
|
1303
|
+
(!J.requestIdleCallback || !J.cancelIdleCallback) && (J.requestIdleCallback = (t) => setTimeout(t, 1), J.cancelIdleCallback = clearTimeout);
|
|
1274
1304
|
const it = {
|
|
1275
1305
|
Header: nt
|
|
1276
|
-
},
|
|
1306
|
+
}, ts = he(it), rs = ts.Provider, ss = () => {
|
|
1307
|
+
const t = te(), e = D(), r = V(void 0);
|
|
1308
|
+
return A(() => {
|
|
1309
|
+
e.emitEvent("location", {
|
|
1310
|
+
from: r.current,
|
|
1311
|
+
to: t
|
|
1312
|
+
}), r.current = t;
|
|
1313
|
+
}, [e, t]), null;
|
|
1314
|
+
}, ns = ({
|
|
1277
1315
|
children: t,
|
|
1278
1316
|
context: e
|
|
1279
1317
|
}) => (St({
|
|
1280
1318
|
queryFn: async () => (await e.initialize(), !0),
|
|
1281
1319
|
queryKey: ["zudoku-initialize"]
|
|
1282
|
-
}), /* @__PURE__ */
|
|
1320
|
+
}), /* @__PURE__ */ n.jsx(Nt.Provider, { value: e, children: t })), ot = Ue(
|
|
1283
1321
|
({ children: t, ...e }) => {
|
|
1284
|
-
var
|
|
1285
|
-
const r =
|
|
1322
|
+
var m, h;
|
|
1323
|
+
const r = re(
|
|
1286
1324
|
() => ({ ...it, ...e.overrides }),
|
|
1287
1325
|
[e.overrides]
|
|
1288
|
-
),
|
|
1289
|
-
var
|
|
1326
|
+
), s = re(() => {
|
|
1327
|
+
var v;
|
|
1290
1328
|
return {
|
|
1291
1329
|
...(e.plugins ?? []).filter(cr).flatMap(
|
|
1292
|
-
(
|
|
1330
|
+
(x) => x.getMdxComponents ? [x.getMdxComponents()] : []
|
|
1293
1331
|
).reduce(
|
|
1294
|
-
(
|
|
1332
|
+
(x, k) => ({ ...x, ...k }),
|
|
1295
1333
|
{}
|
|
1296
1334
|
),
|
|
1297
|
-
...
|
|
1298
|
-
...(
|
|
1335
|
+
...er,
|
|
1336
|
+
...(v = e.mdx) == null ? void 0 : v.components
|
|
1299
1337
|
};
|
|
1300
|
-
}, [(
|
|
1338
|
+
}, [(m = e.mdx) == null ? void 0 : m.components, e.plugins]), { stagger: a } = Tt(oe), [o, i] = L(!1), u = re(
|
|
1301
1339
|
() => o ? { stagger: !0 } : { stagger: a },
|
|
1302
1340
|
[a, o]
|
|
1303
1341
|
), d = ue();
|
|
1304
|
-
|
|
1342
|
+
A(() => {
|
|
1305
1343
|
o || i(!0);
|
|
1306
1344
|
}, [o, d.location]);
|
|
1307
|
-
const [c] = L(() => new
|
|
1308
|
-
var
|
|
1309
|
-
return
|
|
1310
|
-
});
|
|
1311
|
-
return /* @__PURE__ */
|
|
1312
|
-
|
|
1313
|
-
/* @__PURE__ */
|
|
1345
|
+
const [c] = L(() => new Jr(e)), g = (h = e.plugins) == null ? void 0 : h.flatMap((f) => {
|
|
1346
|
+
var v;
|
|
1347
|
+
return ur(f) ? ((v = f.getHead) == null ? void 0 : v.call(f)) ?? [] : [];
|
|
1348
|
+
}).map((f, v) => /* @__PURE__ */ n.jsx(le, { children: f }, v));
|
|
1349
|
+
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1350
|
+
g,
|
|
1351
|
+
/* @__PURE__ */ n.jsx(oe.Provider, { value: u, children: /* @__PURE__ */ n.jsxs(ns, { context: c, children: [
|
|
1352
|
+
/* @__PURE__ */ n.jsx(ss, {}),
|
|
1353
|
+
/* @__PURE__ */ n.jsx(Xt, { components: s, children: /* @__PURE__ */ n.jsx(ht, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ n.jsx(rs, { value: r, children: /* @__PURE__ */ n.jsx(It, { slotlets: e.slotlets, children: /* @__PURE__ */ n.jsx(tr, { children: t ?? /* @__PURE__ */ n.jsx(ce, {}) }) }) }) }) })
|
|
1354
|
+
] }) })
|
|
1314
1355
|
] });
|
|
1315
1356
|
}
|
|
1316
1357
|
);
|
|
1317
1358
|
ot.displayName = "ZudokoInner";
|
|
1318
|
-
const lt = (t) => /* @__PURE__ */
|
|
1359
|
+
const lt = (t) => /* @__PURE__ */ n.jsx(Gr, { FallbackComponent: es, children: /* @__PURE__ */ n.jsx(ot, { ...t }) });
|
|
1319
1360
|
lt.displayName = "Zudoku";
|
|
1320
|
-
const
|
|
1361
|
+
const Os = Gt, As = Ur, qs = Qt, Ts = Or, Is = Tr, Qs = Ir, Rs = Mr, Fs = le, Bs = D, Hs = z, zs = Et, Ls = Dt, Ks = lt, $s = Vr, Us = Ft, Zs = rr, Ys = We, Vs = me, Xs = Rt, Gs = de, _s = Be;
|
|
1321
1362
|
export {
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1363
|
+
Is as Bootstrap,
|
|
1364
|
+
Qs as BootstrapStatic,
|
|
1365
|
+
Xs as Button,
|
|
1366
|
+
Ls as CACHE_KEYS,
|
|
1367
|
+
Us as Callout,
|
|
1368
|
+
Vs as ClientOnly,
|
|
1369
|
+
Fs as Head,
|
|
1370
|
+
As as Layout,
|
|
1371
|
+
Gs as Link,
|
|
1372
|
+
Zs as Markdown,
|
|
1373
|
+
Rs as RouteGuard,
|
|
1374
|
+
qs as RouterError,
|
|
1375
|
+
Ts as ServerError,
|
|
1376
|
+
Ys as Spinner,
|
|
1377
|
+
$s as StatusPage,
|
|
1378
|
+
Ks as Zudoku,
|
|
1379
|
+
Hs as useAuth,
|
|
1380
|
+
zs as useCache,
|
|
1381
|
+
Os as useMDXComponents,
|
|
1382
|
+
_s as useTheme,
|
|
1383
|
+
Bs as useZudoku
|
|
1343
1384
|
};
|
|
1344
1385
|
//# sourceMappingURL=zudoku.components.js.map
|