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