zudoku 0.28.1 → 0.28.3
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 -2
- package/dist/app/main.js.map +1 -1
- package/dist/lib/components/index.d.ts +4 -0
- package/dist/lib/components/index.js +2 -0
- 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/oas/graphql/index.js +11 -10
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.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/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/Playground.d.ts +3 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
- 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/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 -97
- 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/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-BuG8Tuwc.js → MdxPage-DkH3V4hV.js} +5 -5
- package/lib/{MdxPage-BuG8Tuwc.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-CDt1xdc4.js → OperationList-wzZNceUl.js} +339 -336
- package/lib/{OperationList-CDt1xdc4.js.map → OperationList-wzZNceUl.js.map} +1 -1
- 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/{createServer-CjNktZzL.js → createServer-DIztAu7i.js} +11 -8
- package/lib/{createServer-CjNktZzL.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-Eb1oiHbM.js → index-DrR58fsJ.js} +234 -223
- 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-BZsGmBng.js → useScrollToAnchor-DYGn1MT9.js} +11 -10
- 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 +530 -443
- 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 -2
- package/src/lib/components/index.ts +2 -0
- package/src/lib/components/navigation/Sidebar.tsx +7 -1
- package/src/lib/oas/graphql/index.ts +14 -17
- package/src/lib/plugins/openapi/OperationListItem.tsx +1 -1
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -2
- package/src/lib/plugins/openapi/playground/Headers.tsx +5 -9
- package/src/lib/plugins/openapi/playground/Playground.tsx +4 -1
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +5 -2
- package/src/lib/util/scrollIntoViewIfNeeded.ts +18 -0
- package/src/lib/util/useScrollToAnchor.ts +1 -19
- package/lib/index-Eb1oiHbM.js.map +0 -1
- package/lib/useScrollToAnchor-BZsGmBng.js.map +0 -1
package/lib/zudoku.components.js
CHANGED
|
@@ -2,68 +2,69 @@ var lt = Object.defineProperty;
|
|
|
2
2
|
var xe = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var ct = (t, e,
|
|
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
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,
|
|
18
|
-
import { M as
|
|
19
|
-
import { j as
|
|
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
20
|
import * as $ from "react";
|
|
21
|
-
import
|
|
22
|
-
import { S as
|
|
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
23
|
import { Z as $e } from "./invariant-Caa8-XvF.js";
|
|
24
|
-
import { E as
|
|
25
|
-
import { Button as
|
|
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
26
|
import { Callout as Rt } from "./ui/Callout.js";
|
|
27
27
|
import * as Ft from "react-dom";
|
|
28
|
-
import { C as
|
|
29
|
-
import { CircleXIcon as
|
|
30
|
-
import { Drawer as
|
|
31
|
-
import { c as
|
|
32
|
-
import { S as
|
|
33
|
-
import { u as Xt, a as
|
|
34
|
-
import { B as ee, S as
|
|
35
|
-
import { DropdownMenu as
|
|
36
|
-
import { j as
|
|
37
|
-
import { VisuallyHidden as
|
|
38
|
-
import { z as
|
|
39
|
-
import { a as
|
|
40
|
-
|
|
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";
|
|
37
|
+
import { VisuallyHidden as _e } from "@radix-ui/react-visually-hidden";
|
|
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 =
|
|
47
|
+
build(e, r, s) {
|
|
48
|
+
const a = r.queryKey, i = r.queryHash ?? Be(a, r);
|
|
48
49
|
let o = this.get(i);
|
|
49
50
|
return o || (o = new jt({
|
|
50
51
|
cache: this,
|
|
51
52
|
queryKey: a,
|
|
52
53
|
queryHash: i,
|
|
53
|
-
options: e.defaultQueryOptions(
|
|
54
|
+
options: e.defaultQueryOptions(r),
|
|
54
55
|
state: s,
|
|
55
56
|
defaultOptions: e.getQueryDefaults(a)
|
|
56
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, Ie, dn = (Ie = class extends Be {
|
|
|
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) => be(
|
|
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,50 +110,50 @@ var D, Ie, dn = (Ie = class extends Be {
|
|
|
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,
|
|
154
|
+
const r = _(e);
|
|
155
|
+
if (typeof r == "string") {
|
|
156
|
+
const s = l(this, C).get(r), a = s == null ? void 0 : s.find(
|
|
156
157
|
(i) => i.state.status === "pending"
|
|
157
158
|
);
|
|
158
159
|
return !a || a === e;
|
|
@@ -161,9 +162,9 @@ var D, Ie, dn = (Ie = class extends Be {
|
|
|
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,210 +173,210 @@ var D, Ie, dn = (Ie = class extends Be {
|
|
|
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) => je(
|
|
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
|
-
if (
|
|
229
|
+
if (k == null && b.pages.length)
|
|
229
230
|
return Promise.resolve(b);
|
|
230
|
-
const
|
|
231
|
+
const X = {
|
|
231
232
|
queryKey: e.queryKey,
|
|
232
|
-
pageParam:
|
|
233
|
+
pageParam: k,
|
|
233
234
|
direction: K ? "backward" : "forward",
|
|
234
235
|
meta: e.options.meta
|
|
235
236
|
};
|
|
236
|
-
|
|
237
|
-
const ot = await
|
|
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: pe(b.pages, ot,
|
|
242
|
-
pageParams: pe(b.pageParams,
|
|
242
|
+
pages: pe(b.pages, ot, ge),
|
|
243
|
+
pageParams: pe(b.pageParams, k, ge)
|
|
243
244
|
};
|
|
244
245
|
};
|
|
245
246
|
if (a && i.length) {
|
|
246
|
-
const b = a === "backward",
|
|
247
|
+
const b = a === "backward", k = b ? pr : Me, K = {
|
|
247
248
|
pages: i,
|
|
248
249
|
pageParams: o
|
|
249
|
-
},
|
|
250
|
-
u = await L(K,
|
|
250
|
+
}, X = k(s, K);
|
|
251
|
+
u = await L(K, X, b);
|
|
251
252
|
} else {
|
|
252
253
|
const b = t ?? i.length;
|
|
253
254
|
do {
|
|
254
|
-
const
|
|
255
|
-
if (d > 0 &&
|
|
255
|
+
const k = d === 0 ? o[0] ?? s.initialPageParam : Me(s, u);
|
|
256
|
+
if (d > 0 && k == null)
|
|
256
257
|
break;
|
|
257
|
-
u = await L(u,
|
|
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,
|
|
292
|
+
var p, E, q, Q, R, I, F, H, Qe, xr = (Qe = class {
|
|
292
293
|
constructor(t = {}) {
|
|
293
294
|
j(this, p);
|
|
294
|
-
j(this,
|
|
295
|
-
j(this, Q);
|
|
296
|
-
j(this, T);
|
|
295
|
+
j(this, E);
|
|
297
296
|
j(this, q);
|
|
298
|
-
j(this,
|
|
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;
|
|
316
317
|
}
|
|
317
318
|
isMutating(t) {
|
|
318
|
-
return l(this,
|
|
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
|
-
), i = a == null ? void 0 : a.state.data, o =
|
|
339
|
+
), i = a == null ? void 0 : a.state.data, o = kt(e, i);
|
|
339
340
|
if (o !== void 0)
|
|
340
|
-
return l(this, p).build(this, s).setData(o, { ...
|
|
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,149 +384,149 @@ var p, A, Q, T, q, I, R, F, qe, gn = (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 i = a.fetch(void 0,
|
|
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
|
-
Pe(e.staleTime,
|
|
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 we.isOnline() ? l(this,
|
|
427
|
+
return we.isOnline() ? l(this, E).resumePausedMutations() : Promise.resolve();
|
|
427
428
|
}
|
|
428
429
|
getQueryCache() {
|
|
429
430
|
return l(this, p);
|
|
430
431
|
}
|
|
431
432
|
getMutationCache() {
|
|
432
|
-
return l(this,
|
|
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
|
|
485
486
|
};
|
|
486
487
|
}
|
|
487
488
|
clear() {
|
|
488
|
-
l(this, p).clear(), l(this,
|
|
489
|
+
l(this, p).clear(), l(this, E).clear();
|
|
489
490
|
}
|
|
490
|
-
}, p = 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 Oe(t, e,
|
|
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(), i = ((d =
|
|
499
|
-
o.forEach(({ state:
|
|
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 (
|
|
516
|
-
const { fetchStatus: b, ...
|
|
517
|
-
|
|
518
|
-
...
|
|
519
|
-
data:
|
|
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) {
|
|
517
|
+
const { fetchStatus: b, ...k } = f;
|
|
518
|
+
g.setState({
|
|
519
|
+
...k,
|
|
520
|
+
data: S
|
|
520
521
|
});
|
|
521
522
|
}
|
|
522
523
|
} else
|
|
523
|
-
|
|
524
|
+
g = a.build(
|
|
524
525
|
t,
|
|
525
526
|
{
|
|
526
|
-
...(
|
|
527
|
-
...(L =
|
|
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,53 +534,53 @@ function Oe(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
542
|
const b = Promise.resolve(v).then(i);
|
|
542
|
-
|
|
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
|
+
const a = Dt(s), [i, o] = $.useState(), u = $.useRef(e);
|
|
553
554
|
return u.current = e, $.useMemo(() => {
|
|
554
|
-
if (
|
|
555
|
-
if (typeof
|
|
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, i,
|
|
574
|
+
}, [a, i, r]), $.useEffect(() => {
|
|
574
575
|
i && (Oe(a, { queries: i }, u.current), o(void 0));
|
|
575
576
|
}, [a, i]), t;
|
|
576
577
|
};
|
|
577
|
-
const
|
|
578
|
+
const br = () => {
|
|
578
579
|
var a;
|
|
579
|
-
const t = z(), e =
|
|
580
|
-
(i) => ut({ path: i, end: !0 },
|
|
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)
|
|
581
582
|
);
|
|
582
|
-
if (
|
|
583
|
+
if (T(() => {
|
|
583
584
|
var i;
|
|
584
585
|
s && !t.isAuthenticated && ((i = e.authentication) == null || i.signIn());
|
|
585
586
|
}, [s, t.isAuthenticated, e.authentication]), s && !t.isAuthenticated)
|
|
@@ -589,10 +590,10 @@ const xn = () => {
|
|
|
589
590
|
title: "Authentication is not enabled",
|
|
590
591
|
developerHint: "To use protectedRoutes you need authentication to be enabled"
|
|
591
592
|
});
|
|
592
|
-
return /* @__PURE__ */
|
|
593
|
+
return /* @__PURE__ */ n.jsx(le, {});
|
|
593
594
|
};
|
|
594
|
-
function
|
|
595
|
-
return /* @__PURE__ */
|
|
595
|
+
function jr({ error: t }) {
|
|
596
|
+
return /* @__PURE__ */ n.jsx(Ue, { error: t });
|
|
596
597
|
}
|
|
597
598
|
/**
|
|
598
599
|
* react-router v7.1.3
|
|
@@ -604,30 +605,30 @@ function yn({ error: t }) {
|
|
|
604
605
|
*
|
|
605
606
|
* @license MIT
|
|
606
607
|
*/
|
|
607
|
-
function
|
|
608
|
+
function wr(t) {
|
|
608
609
|
return /* @__PURE__ */ $.createElement(dt, { flushSync: Ft.flushSync, ...t });
|
|
609
610
|
}
|
|
610
|
-
const ae = de({ stagger: !1 }),
|
|
611
|
+
const ae = de({ stagger: !1 }), Pr = new xr({
|
|
611
612
|
defaultOptions: {
|
|
612
613
|
queries: {
|
|
613
614
|
staleTime: 1e3 * 60 * 5
|
|
614
615
|
}
|
|
615
616
|
}
|
|
616
|
-
}),
|
|
617
|
+
}), Sr = ({
|
|
617
618
|
router: t,
|
|
618
619
|
hydrate: e = !1
|
|
619
|
-
}) => /* @__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 = ({
|
|
620
621
|
router: t,
|
|
621
622
|
context: e,
|
|
622
|
-
queryClient:
|
|
623
|
+
queryClient: r,
|
|
623
624
|
helmetContext: s
|
|
624
|
-
}) => /* @__PURE__ */
|
|
625
|
-
var
|
|
626
|
-
function
|
|
627
|
-
return
|
|
628
|
-
(function(
|
|
629
|
-
s(e,
|
|
630
|
-
})(
|
|
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) {
|
|
631
632
|
const a = {
|
|
632
633
|
delay: 500,
|
|
633
634
|
minDuration: 200,
|
|
@@ -641,7 +642,7 @@ function Cn() {
|
|
|
641
642
|
}
|
|
642
643
|
function o(u, d) {
|
|
643
644
|
d = Object.assign({}, a, d);
|
|
644
|
-
const c = i() && d.ssr,
|
|
645
|
+
const c = i() && d.ssr, m = c && u ? "DISPLAY" : "IDLE", [f, h] = s.useState(m), x = s.useRef(null);
|
|
645
646
|
return s.useEffect(() => {
|
|
646
647
|
if (u && (f === "IDLE" || c)) {
|
|
647
648
|
clearTimeout(x.current);
|
|
@@ -657,66 +658,66 @@ function Cn() {
|
|
|
657
658
|
!u && f !== "DISPLAY" && (clearTimeout(x.current), h("IDLE"));
|
|
658
659
|
}, [u, f, d.delay, d.minDuration, c]), s.useEffect(() => () => clearTimeout(x.current), []), f === "DISPLAY" || f === "EXPIRE";
|
|
659
660
|
}
|
|
660
|
-
|
|
661
|
+
r.defaultOptions = a, r.useSpinDelay = o;
|
|
661
662
|
});
|
|
662
|
-
}(
|
|
663
|
+
}(U, U.exports)), U.exports;
|
|
663
664
|
}
|
|
664
|
-
var
|
|
665
|
-
const
|
|
665
|
+
var Dr = Nr();
|
|
666
|
+
const Mr = () => {
|
|
666
667
|
const t = oe(), e = he(t.pathname);
|
|
667
|
-
|
|
668
|
+
T(() => {
|
|
668
669
|
e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
|
|
669
670
|
}, [t.pathname]);
|
|
670
671
|
};
|
|
671
|
-
function
|
|
672
|
+
function Or({
|
|
672
673
|
className: t,
|
|
673
674
|
...e
|
|
674
675
|
}) {
|
|
675
|
-
return /* @__PURE__ */
|
|
676
|
+
return /* @__PURE__ */ n.jsx(
|
|
676
677
|
"div",
|
|
677
678
|
{
|
|
678
|
-
className:
|
|
679
|
+
className: Z("animate-pulse rounded-md bg-muted", t),
|
|
679
680
|
...e
|
|
680
681
|
}
|
|
681
682
|
);
|
|
682
683
|
}
|
|
683
|
-
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 = {
|
|
684
685
|
info: "bg-blue-500",
|
|
685
686
|
note: "bg-gray-500",
|
|
686
687
|
tip: "bg-green-600",
|
|
687
688
|
caution: "bg-orange-500",
|
|
688
689
|
danger: "bg-rose-500"
|
|
689
|
-
},
|
|
690
|
-
const { page: t } =
|
|
690
|
+
}, Fr = () => {
|
|
691
|
+
const { page: t } = A(), [e, r] = B(!0);
|
|
691
692
|
if (!(t != null && t.banner) || !e)
|
|
692
|
-
return /* @__PURE__ */
|
|
693
|
-
const s = t.banner.color && t.banner.color in
|
|
694
|
-
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(
|
|
695
696
|
"div",
|
|
696
697
|
{
|
|
697
|
-
className:
|
|
698
|
+
className: Z(
|
|
698
699
|
"relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
|
|
699
700
|
s
|
|
700
701
|
),
|
|
701
702
|
style: a,
|
|
702
703
|
children: [
|
|
703
|
-
/* @__PURE__ */
|
|
704
|
-
t.banner.dismissible && /* @__PURE__ */
|
|
704
|
+
/* @__PURE__ */ n.jsx("div", { className: "w-full", children: t.banner.message }),
|
|
705
|
+
t.banner.dismissible && /* @__PURE__ */ n.jsx(
|
|
705
706
|
"button",
|
|
706
707
|
{
|
|
707
708
|
type: "button",
|
|
708
709
|
className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
|
|
709
|
-
onClick: () =>
|
|
710
|
-
children: /* @__PURE__ */
|
|
710
|
+
onClick: () => r(!1),
|
|
711
|
+
children: /* @__PURE__ */ n.jsx(Ht, { size: 16 })
|
|
711
712
|
}
|
|
712
713
|
)
|
|
713
714
|
]
|
|
714
715
|
}
|
|
715
716
|
);
|
|
716
|
-
},
|
|
717
|
-
const e =
|
|
718
|
-
|
|
719
|
-
if (
|
|
717
|
+
}, We = ({ className: t }) => {
|
|
718
|
+
const e = A(), [r, s] = B(!1), a = pt(() => s(!1), []);
|
|
719
|
+
T(() => {
|
|
720
|
+
if (r)
|
|
720
721
|
return;
|
|
721
722
|
function o(u) {
|
|
722
723
|
u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(), s(!0));
|
|
@@ -724,53 +725,53 @@ const Mn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
724
725
|
return window.addEventListener("keydown", o), () => {
|
|
725
726
|
window.removeEventListener("keydown", o);
|
|
726
727
|
};
|
|
727
|
-
}, [
|
|
728
|
-
const i = e.plugins.find(
|
|
729
|
-
return i ? /* @__PURE__ */
|
|
730
|
-
/* @__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(
|
|
731
732
|
"button",
|
|
732
733
|
{
|
|
733
734
|
type: "button",
|
|
734
735
|
onClick: () => s(!0),
|
|
735
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",
|
|
736
737
|
children: [
|
|
737
|
-
/* @__PURE__ */
|
|
738
|
-
/* @__PURE__ */
|
|
738
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
739
|
+
/* @__PURE__ */ n.jsx(zt, { size: 14 }),
|
|
739
740
|
"Search"
|
|
740
741
|
] }),
|
|
741
|
-
/* @__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" })
|
|
742
743
|
]
|
|
743
744
|
}
|
|
744
745
|
),
|
|
745
|
-
/* @__PURE__ */
|
|
746
|
-
isOpen:
|
|
746
|
+
/* @__PURE__ */ n.jsx(fe, { fallback: null, children: i.renderSearch({
|
|
747
|
+
isOpen: r,
|
|
747
748
|
onClose: a
|
|
748
749
|
}) })
|
|
749
750
|
] }) : null;
|
|
750
751
|
}, Je = () => {
|
|
751
|
-
const { resolvedTheme: t, setTheme: e } =
|
|
752
|
-
return /* @__PURE__ */
|
|
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(
|
|
753
754
|
ee,
|
|
754
755
|
{
|
|
755
756
|
variant: "ghost",
|
|
756
757
|
size: "icon",
|
|
757
758
|
"aria-label": t === "dark" ? "Switch to light mode" : "Switch to dark mode",
|
|
758
759
|
onClick: () => e(t === "dark" ? "light" : "dark"),
|
|
759
|
-
children: /* @__PURE__ */
|
|
760
|
+
children: /* @__PURE__ */ n.jsx(r, { size: 18 })
|
|
760
761
|
}
|
|
761
762
|
) });
|
|
762
|
-
}, et = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always",
|
|
763
|
-
const { topNavigation: t } =
|
|
764
|
-
return t.length <= 1 ? /* @__PURE__ */
|
|
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)) }) }) });
|
|
765
766
|
}, tt = ({
|
|
766
767
|
id: t,
|
|
767
768
|
label: e,
|
|
768
|
-
default:
|
|
769
|
+
default: r
|
|
769
770
|
}) => {
|
|
770
771
|
var c;
|
|
771
|
-
const { sidebars: s } =
|
|
772
|
-
if (
|
|
773
|
-
}) :
|
|
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));
|
|
774
775
|
if (!d)
|
|
775
776
|
throw new $e("Page not found.", {
|
|
776
777
|
developerHint: `No links found in top navigation for '${t}'. Check that the sidebar isn't empty or that a default link is set.`
|
|
@@ -778,39 +779,39 @@ const Mn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
778
779
|
return (
|
|
779
780
|
// We don't use isActive here because it has to be inside the sidebar,
|
|
780
781
|
// the top nav id doesn't necessarily start with the sidebar id
|
|
781
|
-
/* @__PURE__ */
|
|
782
|
+
/* @__PURE__ */ n.jsx(
|
|
782
783
|
ft,
|
|
783
784
|
{
|
|
784
|
-
className: ({ isPending:
|
|
785
|
+
className: ({ isPending: m }) => hr(
|
|
785
786
|
"block lg:py-3.5 font-medium -mb-px",
|
|
786
|
-
u ||
|
|
787
|
+
u || m ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
787
788
|
),
|
|
788
789
|
to: d,
|
|
789
790
|
children: e
|
|
790
791
|
}
|
|
791
792
|
)
|
|
792
793
|
);
|
|
793
|
-
},
|
|
794
|
-
const { topNavigation: t } =
|
|
795
|
-
return /* @__PURE__ */
|
|
796
|
-
|
|
794
|
+
}, zr = () => {
|
|
795
|
+
const { topNavigation: t } = A(), { isAuthenticated: e } = z(), [r, s] = B(!1);
|
|
796
|
+
return /* @__PURE__ */ n.jsxs(
|
|
797
|
+
Ze,
|
|
797
798
|
{
|
|
798
799
|
direction: "right",
|
|
799
|
-
open:
|
|
800
|
+
open: r,
|
|
800
801
|
onOpenChange: (a) => s(a),
|
|
801
802
|
children: [
|
|
802
|
-
/* @__PURE__ */
|
|
803
|
-
/* @__PURE__ */
|
|
804
|
-
|
|
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,
|
|
805
806
|
{
|
|
806
807
|
className: "lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none",
|
|
807
808
|
"aria-describedby": void 0,
|
|
808
|
-
children: /* @__PURE__ */
|
|
809
|
-
/* @__PURE__ */
|
|
810
|
-
/* @__PURE__ */
|
|
811
|
-
/* @__PURE__ */
|
|
812
|
-
/* @__PURE__ */
|
|
813
|
-
t.filter(et(e)).map((a) => /* @__PURE__ */
|
|
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))
|
|
814
815
|
] })
|
|
815
816
|
] })
|
|
816
817
|
}
|
|
@@ -818,26 +819,26 @@ const Mn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
818
819
|
]
|
|
819
820
|
}
|
|
820
821
|
);
|
|
821
|
-
}, J = ({ item: t }) => t.children ? /* @__PURE__ */
|
|
822
|
-
/* @__PURE__ */
|
|
823
|
-
/* @__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) => (
|
|
824
825
|
// eslint-disable-next-line react/no-array-index-key
|
|
825
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ n.jsx(J, { item: e }, r)
|
|
826
827
|
)) }) })
|
|
827
|
-
] }, t.label) : /* @__PURE__ */
|
|
828
|
-
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 }),
|
|
829
830
|
t.label
|
|
830
|
-
] }, t.label) }),
|
|
831
|
-
const e = z(), { isAuthenticated:
|
|
832
|
-
return /* @__PURE__ */
|
|
833
|
-
/* @__PURE__ */
|
|
834
|
-
/* @__PURE__ */
|
|
835
|
-
/* @__PURE__ */
|
|
836
|
-
(o == null ? void 0 : o.logo) && /* @__PURE__ */
|
|
837
|
-
/* @__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(
|
|
838
839
|
"img",
|
|
839
840
|
{
|
|
840
|
-
src: /https?:\/\//.test(o.logo.src.light) ? o.logo.src.light :
|
|
841
|
+
src: /https?:\/\//.test(o.logo.src.light) ? o.logo.src.light : Ne(
|
|
841
842
|
"/",
|
|
842
843
|
o.logo.src.light
|
|
843
844
|
),
|
|
@@ -847,10 +848,10 @@ const Mn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
847
848
|
loading: "lazy"
|
|
848
849
|
}
|
|
849
850
|
),
|
|
850
|
-
/* @__PURE__ */
|
|
851
|
+
/* @__PURE__ */ n.jsx(
|
|
851
852
|
"img",
|
|
852
853
|
{
|
|
853
|
-
src: /https?:\/\//.test(o.logo.src.dark) ? o.logo.src.dark :
|
|
854
|
+
src: /https?:\/\//.test(o.logo.src.dark) ? o.logo.src.dark : Ne(
|
|
854
855
|
"/",
|
|
855
856
|
o.logo.src.dark
|
|
856
857
|
),
|
|
@@ -861,58 +862,58 @@ const Mn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
861
862
|
}
|
|
862
863
|
)
|
|
863
864
|
] }),
|
|
864
|
-
/* @__PURE__ */
|
|
865
|
+
/* @__PURE__ */ n.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: o == null ? void 0 : o.pageTitle })
|
|
865
866
|
] }) }) }),
|
|
866
|
-
/* @__PURE__ */
|
|
867
|
-
/* @__PURE__ */
|
|
868
|
-
/* @__PURE__ */
|
|
869
|
-
/* @__PURE__ */
|
|
870
|
-
/* @__PURE__ */
|
|
871
|
-
a && /* @__PURE__ */
|
|
872
|
-
|
|
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,
|
|
873
874
|
{
|
|
874
|
-
fallback: /* @__PURE__ */
|
|
875
|
-
children:
|
|
876
|
-
/* @__PURE__ */
|
|
877
|
-
/* @__PURE__ */
|
|
878
|
-
/* @__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: [
|
|
879
880
|
s != null && s.name ? `${s.name}` : "My Account",
|
|
880
|
-
(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 })
|
|
881
882
|
] }),
|
|
882
|
-
d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */
|
|
883
|
-
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)),
|
|
884
885
|
d.filter(
|
|
885
886
|
(c) => !c.category || c.category === "middle"
|
|
886
|
-
).length > 0 && /* @__PURE__ */
|
|
887
|
+
).length > 0 && /* @__PURE__ */ n.jsx(re, {}),
|
|
887
888
|
d.filter(
|
|
888
889
|
(c) => !c.category || c.category === "middle"
|
|
889
|
-
).map((c) => /* @__PURE__ */
|
|
890
|
-
d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */
|
|
891
|
-
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))
|
|
892
893
|
] })
|
|
893
|
-
] }) : /* @__PURE__ */
|
|
894
|
+
] }) : /* @__PURE__ */ n.jsx(ee, { variant: "ghost", onClick: () => e.login(), children: "Login" })
|
|
894
895
|
}
|
|
895
896
|
),
|
|
896
|
-
/* @__PURE__ */
|
|
897
|
-
/* @__PURE__ */
|
|
897
|
+
/* @__PURE__ */ n.jsx(D, { name: "head-navigation-end" }),
|
|
898
|
+
/* @__PURE__ */ n.jsx(Je, {})
|
|
898
899
|
] })
|
|
899
900
|
] })
|
|
900
901
|
] }) }),
|
|
901
|
-
/* @__PURE__ */
|
|
902
|
-
/* @__PURE__ */
|
|
903
|
-
/* @__PURE__ */
|
|
904
|
-
/* @__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" })
|
|
905
906
|
] }) })
|
|
906
907
|
] });
|
|
907
|
-
}), st = xt(({ children: t, className: e, pushMainContent:
|
|
908
|
+
}), st = xt(({ children: t, className: e, pushMainContent: r }, s) => /* @__PURE__ */ n.jsx(
|
|
908
909
|
"nav",
|
|
909
910
|
{
|
|
910
|
-
"data-navigation": String(
|
|
911
|
-
className:
|
|
911
|
+
"data-navigation": String(r),
|
|
912
|
+
className: Z(
|
|
912
913
|
"scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 border-r pr-10",
|
|
913
914
|
"-mx-[--padding-nav-item] pb-20 pt-[--padding-content-top]",
|
|
914
915
|
"w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
|
|
915
|
-
!
|
|
916
|
+
!r && "border-r-0",
|
|
916
917
|
e
|
|
917
918
|
),
|
|
918
919
|
ref: s,
|
|
@@ -920,32 +921,36 @@ const Mn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
920
921
|
}
|
|
921
922
|
));
|
|
922
923
|
st.displayName = "SidebarWrapper";
|
|
923
|
-
const
|
|
924
|
+
const Br = ({
|
|
924
925
|
onRequestClose: t
|
|
925
926
|
}) => {
|
|
926
|
-
const e = he(null),
|
|
927
|
-
return
|
|
928
|
-
|
|
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(
|
|
929
934
|
st,
|
|
930
935
|
{
|
|
931
936
|
ref: e,
|
|
932
|
-
pushMainContent:
|
|
937
|
+
pushMainContent: r.sidebar.length > 0,
|
|
933
938
|
children: [
|
|
934
|
-
/* @__PURE__ */
|
|
935
|
-
|
|
936
|
-
/* @__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" })
|
|
937
942
|
]
|
|
938
943
|
}
|
|
939
944
|
),
|
|
940
|
-
/* @__PURE__ */
|
|
941
|
-
|
|
945
|
+
/* @__PURE__ */ n.jsx(
|
|
946
|
+
Ve,
|
|
942
947
|
{
|
|
943
948
|
className: "lg:hidden h-[100dvh] left-0 w-[320px] rounded-none",
|
|
944
949
|
"aria-describedby": void 0,
|
|
945
|
-
children: /* @__PURE__ */
|
|
946
|
-
/* @__PURE__ */
|
|
947
|
-
|
|
948
|
-
|
|
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,
|
|
949
954
|
{
|
|
950
955
|
item: s,
|
|
951
956
|
onRequestClose: t
|
|
@@ -956,54 +961,54 @@ const Fn = ({
|
|
|
956
961
|
}
|
|
957
962
|
)
|
|
958
963
|
] });
|
|
959
|
-
},
|
|
960
|
-
const e = oe(), { setActiveAnchor:
|
|
961
|
-
Zt(),
|
|
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();
|
|
962
967
|
const i = he(e.pathname);
|
|
963
|
-
|
|
964
|
-
var
|
|
965
|
-
(
|
|
966
|
-
}, [a]),
|
|
967
|
-
e.pathname !== i.current &&
|
|
968
|
-
}, [e.pathname,
|
|
969
|
-
const o = !!ce().location, u =
|
|
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, {
|
|
970
975
|
delay: 300,
|
|
971
976
|
minDuration: 500
|
|
972
|
-
}), [d, c] =
|
|
973
|
-
return /* @__PURE__ */
|
|
977
|
+
}), [d, c] = B(!1);
|
|
978
|
+
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
974
979
|
!1,
|
|
975
|
-
/* @__PURE__ */
|
|
976
|
-
(s == null ? void 0 : s.description) && /* @__PURE__ */
|
|
977
|
-
(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 })
|
|
978
983
|
] }),
|
|
979
|
-
/* @__PURE__ */
|
|
980
|
-
/* @__PURE__ */
|
|
981
|
-
/* @__PURE__ */
|
|
982
|
-
/* @__PURE__ */
|
|
983
|
-
|
|
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(
|
|
988
|
+
Ze,
|
|
984
989
|
{
|
|
985
990
|
direction: "left",
|
|
986
991
|
open: d,
|
|
987
|
-
onOpenChange: (
|
|
992
|
+
onOpenChange: (m) => c(m),
|
|
988
993
|
children: [
|
|
989
|
-
/* @__PURE__ */
|
|
990
|
-
/* @__PURE__ */
|
|
994
|
+
/* @__PURE__ */ n.jsx(Br, { onRequestClose: () => c(!1) }),
|
|
995
|
+
/* @__PURE__ */ n.jsx(
|
|
991
996
|
"div",
|
|
992
997
|
{
|
|
993
|
-
className:
|
|
998
|
+
className: Z(
|
|
994
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",
|
|
995
1000
|
"peer-data-[navigation=false]:hidden"
|
|
996
1001
|
),
|
|
997
|
-
children: /* @__PURE__ */
|
|
998
|
-
/* @__PURE__ */
|
|
999
|
-
/* @__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" })
|
|
1000
1005
|
] })
|
|
1001
1006
|
}
|
|
1002
1007
|
),
|
|
1003
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ n.jsxs(
|
|
1004
1009
|
"main",
|
|
1005
1010
|
{
|
|
1006
|
-
className:
|
|
1011
|
+
className: Z(
|
|
1007
1012
|
"h-full dark:border-white/10 translate-x-0",
|
|
1008
1013
|
"lg:overflow-visible",
|
|
1009
1014
|
// This works in tandem with the `SidebarWrapper` component
|
|
@@ -1011,9 +1016,9 @@ const Fn = ({
|
|
|
1011
1016
|
"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
|
|
1012
1017
|
),
|
|
1013
1018
|
children: [
|
|
1014
|
-
/* @__PURE__ */
|
|
1015
|
-
t ?? /* @__PURE__ */
|
|
1016
|
-
/* @__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" })
|
|
1017
1022
|
]
|
|
1018
1023
|
}
|
|
1019
1024
|
)
|
|
@@ -1021,11 +1026,92 @@ const Fn = ({
|
|
|
1021
1026
|
}
|
|
1022
1027
|
) }) })
|
|
1023
1028
|
] });
|
|
1024
|
-
},
|
|
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 = {
|
|
1025
1111
|
didCatch: !1,
|
|
1026
1112
|
error: null
|
|
1027
1113
|
};
|
|
1028
|
-
class
|
|
1114
|
+
class Yr extends yt {
|
|
1029
1115
|
constructor(e) {
|
|
1030
1116
|
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = se;
|
|
1031
1117
|
}
|
|
@@ -1040,25 +1126,25 @@ class Hn extends yt {
|
|
|
1040
1126
|
error: e
|
|
1041
1127
|
} = this.state;
|
|
1042
1128
|
if (e !== null) {
|
|
1043
|
-
for (var
|
|
1129
|
+
for (var r, s, a = arguments.length, i = new Array(a), o = 0; o < a; o++)
|
|
1044
1130
|
i[o] = arguments[o];
|
|
1045
|
-
(
|
|
1131
|
+
(r = (s = this.props).onReset) === null || r === void 0 || r.call(s, {
|
|
1046
1132
|
args: i,
|
|
1047
1133
|
reason: "imperative-api"
|
|
1048
1134
|
}), this.setState(se);
|
|
1049
1135
|
}
|
|
1050
1136
|
}
|
|
1051
|
-
componentDidCatch(e,
|
|
1137
|
+
componentDidCatch(e, r) {
|
|
1052
1138
|
var s, a;
|
|
1053
|
-
(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);
|
|
1054
1140
|
}
|
|
1055
|
-
componentDidUpdate(e,
|
|
1141
|
+
componentDidUpdate(e, r) {
|
|
1056
1142
|
const {
|
|
1057
1143
|
didCatch: s
|
|
1058
1144
|
} = this.state, {
|
|
1059
1145
|
resetKeys: a
|
|
1060
1146
|
} = this.props;
|
|
1061
|
-
if (s &&
|
|
1147
|
+
if (s && r.error !== null && Vr(e.resetKeys, a)) {
|
|
1062
1148
|
var i, o;
|
|
1063
1149
|
(i = (o = this.props).onReset) === null || i === void 0 || i.call(o, {
|
|
1064
1150
|
next: a,
|
|
@@ -1070,7 +1156,7 @@ class Hn extends yt {
|
|
|
1070
1156
|
render() {
|
|
1071
1157
|
const {
|
|
1072
1158
|
children: e,
|
|
1073
|
-
fallbackRender:
|
|
1159
|
+
fallbackRender: r,
|
|
1074
1160
|
FallbackComponent: s,
|
|
1075
1161
|
fallback: a
|
|
1076
1162
|
} = this.props, {
|
|
@@ -1083,8 +1169,8 @@ class Hn extends yt {
|
|
|
1083
1169
|
error: o,
|
|
1084
1170
|
resetErrorBoundary: this.resetErrorBoundary
|
|
1085
1171
|
};
|
|
1086
|
-
if (typeof
|
|
1087
|
-
u =
|
|
1172
|
+
if (typeof r == "function")
|
|
1173
|
+
u = r(d);
|
|
1088
1174
|
else if (s)
|
|
1089
1175
|
u = ve(s, d);
|
|
1090
1176
|
else if (a !== void 0)
|
|
@@ -1092,7 +1178,7 @@ class Hn extends yt {
|
|
|
1092
1178
|
else
|
|
1093
1179
|
throw o;
|
|
1094
1180
|
}
|
|
1095
|
-
return ve(
|
|
1181
|
+
return ve(Zr.Provider, {
|
|
1096
1182
|
value: {
|
|
1097
1183
|
didCatch: i,
|
|
1098
1184
|
error: o,
|
|
@@ -1101,11 +1187,11 @@ class Hn extends yt {
|
|
|
1101
1187
|
}, u);
|
|
1102
1188
|
}
|
|
1103
1189
|
}
|
|
1104
|
-
function
|
|
1190
|
+
function Vr() {
|
|
1105
1191
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
1106
|
-
return t.length !== e.length || t.some((
|
|
1192
|
+
return t.length !== e.length || t.some((r, s) => !Object.is(r, e[s]));
|
|
1107
1193
|
}
|
|
1108
|
-
class
|
|
1194
|
+
class Xr {
|
|
1109
1195
|
constructor(e) {
|
|
1110
1196
|
P(this, "plugins");
|
|
1111
1197
|
P(this, "sidebars");
|
|
@@ -1116,103 +1202,104 @@ class Kn {
|
|
|
1116
1202
|
P(this, "navigationPlugins");
|
|
1117
1203
|
P(this, "initialize", async () => {
|
|
1118
1204
|
await Promise.all(
|
|
1119
|
-
this.plugins.filter(
|
|
1120
|
-
var
|
|
1121
|
-
return (
|
|
1205
|
+
this.plugins.filter(Ir).map((e) => {
|
|
1206
|
+
var r;
|
|
1207
|
+
return (r = e.initialize) == null ? void 0 : r.call(e, this);
|
|
1122
1208
|
})
|
|
1123
1209
|
);
|
|
1124
1210
|
});
|
|
1125
1211
|
P(this, "getApiIdentities", async () => (await Promise.all(
|
|
1126
|
-
this.plugins.filter(
|
|
1212
|
+
this.plugins.filter(Rr).map((r) => r.getIdentities(this))
|
|
1127
1213
|
)).flat());
|
|
1128
1214
|
P(this, "getPluginSidebar", async (e) => (await Promise.all(
|
|
1129
1215
|
this.navigationPlugins.map(
|
|
1130
1216
|
(s) => {
|
|
1131
1217
|
var a;
|
|
1132
|
-
return (a = s.getSidebar) == null ? void 0 : a.call(s,
|
|
1218
|
+
return (a = s.getSidebar) == null ? void 0 : a.call(s, ne(e));
|
|
1133
1219
|
}
|
|
1134
1220
|
)
|
|
1135
1221
|
)).flatMap((s) => s ?? []));
|
|
1136
1222
|
P(this, "signRequest", async (e) => {
|
|
1137
1223
|
if (!this.authentication)
|
|
1138
1224
|
throw new Error("No authentication provider configured");
|
|
1139
|
-
const
|
|
1140
|
-
return e.headers.set("Authorization", `Bearer ${
|
|
1225
|
+
const r = await this.authentication.getAccessToken();
|
|
1226
|
+
return e.headers.set("Authorization", `Bearer ${r}`), e;
|
|
1141
1227
|
});
|
|
1142
|
-
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;
|
|
1143
1229
|
}
|
|
1144
1230
|
}
|
|
1145
|
-
function
|
|
1146
|
-
return /* @__PURE__ */
|
|
1231
|
+
function Gr({ error: t, resetErrorBoundary: e }) {
|
|
1232
|
+
return /* @__PURE__ */ n.jsx(Ue, { error: t });
|
|
1147
1233
|
}
|
|
1148
|
-
const
|
|
1149
|
-
(!
|
|
1150
|
-
const
|
|
1151
|
-
Header:
|
|
1152
|
-
},
|
|
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 = ({
|
|
1153
1239
|
children: t,
|
|
1154
1240
|
context: e
|
|
1155
1241
|
}) => (Ot({
|
|
1156
1242
|
queryFn: async () => (await e.initialize(), !0),
|
|
1157
1243
|
queryKey: ["zudoku-initialize"]
|
|
1158
|
-
}), /* @__PURE__ */
|
|
1244
|
+
}), /* @__PURE__ */ n.jsx(At.Provider, { value: e, children: t })), at = He(
|
|
1159
1245
|
({ children: t, ...e }) => {
|
|
1160
1246
|
var f, h;
|
|
1161
|
-
const
|
|
1162
|
-
() => ({ ...
|
|
1247
|
+
const r = te(
|
|
1248
|
+
() => ({ ...nt, ...e.overrides }),
|
|
1163
1249
|
[e.overrides]
|
|
1164
1250
|
), s = te(() => {
|
|
1165
1251
|
var v;
|
|
1166
1252
|
return {
|
|
1167
|
-
...(e.plugins ?? []).filter(
|
|
1168
|
-
(
|
|
1253
|
+
...(e.plugins ?? []).filter(Qr).flatMap(
|
|
1254
|
+
(g) => g.getMdxComponents ? [g.getMdxComponents()] : []
|
|
1169
1255
|
).reduce(
|
|
1170
|
-
(
|
|
1256
|
+
(g, S) => ({ ...g, ...S }),
|
|
1171
1257
|
{}
|
|
1172
1258
|
),
|
|
1173
|
-
...
|
|
1259
|
+
...Wt,
|
|
1174
1260
|
...(v = e.mdx) == null ? void 0 : v.components
|
|
1175
1261
|
};
|
|
1176
|
-
}, [(f = e.mdx) == null ? void 0 : f.components, e.plugins]), { stagger: a } = vt(ae), [i, o] =
|
|
1262
|
+
}, [(f = e.mdx) == null ? void 0 : f.components, e.plugins]), { stagger: a } = vt(ae), [i, o] = B(!1), u = te(
|
|
1177
1263
|
() => i ? { stagger: !0 } : { stagger: a },
|
|
1178
1264
|
[a, i]
|
|
1179
1265
|
), d = ce();
|
|
1180
|
-
|
|
1266
|
+
T(() => {
|
|
1181
1267
|
i || o(!0);
|
|
1182
1268
|
}, [i, d.location]);
|
|
1183
|
-
const [c] =
|
|
1184
|
-
var
|
|
1185
|
-
return /* @__PURE__ */
|
|
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);
|
|
1186
1272
|
});
|
|
1187
|
-
return /* @__PURE__ */
|
|
1188
|
-
/* @__PURE__ */
|
|
1189
|
-
/* @__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, {}) }) }) }) }) }) }) })
|
|
1190
1276
|
] });
|
|
1191
1277
|
}
|
|
1192
1278
|
);
|
|
1193
1279
|
at.displayName = "ZudokoInner";
|
|
1194
|
-
const it = (t) => /* @__PURE__ */
|
|
1280
|
+
const it = (t) => /* @__PURE__ */ n.jsx(Yr, { FallbackComponent: Gr, children: /* @__PURE__ */ n.jsx(at, { ...t }) });
|
|
1195
1281
|
it.displayName = "Zudoku";
|
|
1196
|
-
const
|
|
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;
|
|
1197
1283
|
export {
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
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
|
|
1217
1304
|
};
|
|
1218
1305
|
//# sourceMappingURL=zudoku.components.js.map
|