zudoku 0.3.0-dev.54 → 0.3.0-dev.55
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/lib/AnchorLink-BaXHjhF-.js +989 -0
- package/lib/{AnchorLink-BCN_a_Uz.js.map → AnchorLink-BaXHjhF-.js.map} +1 -1
- package/lib/Combination-BfufJFkX.js +1365 -0
- package/lib/{Combination-B0Iu6mhJ.js.map → Combination-BfufJFkX.js.map} +1 -1
- package/lib/DevPortalProvider-GjdO0Xr-.js +1610 -0
- package/lib/{DevPortalProvider-Do9oJqme.js.map → DevPortalProvider-GjdO0Xr-.js.map} +1 -1
- package/lib/Markdown-B8nPVql1.js +19708 -0
- package/lib/Markdown-B8nPVql1.js.map +1 -0
- package/lib/MdxPage-Dlujuj-J.js +223 -0
- package/lib/{MdxPage-Bsc79cD-.js.map → MdxPage-Dlujuj-J.js.map} +1 -1
- package/lib/OperationList-krPgt6sE.js +8041 -0
- package/lib/{OperationList-K-JWBxau.js.map → OperationList-krPgt6sE.js.map} +1 -1
- package/lib/Playground-DOHxca0P.js +539 -0
- package/lib/{Playground-Czy7ha9z.js.map → Playground-DOHxca0P.js.map} +1 -1
- package/lib/Route-CR6TEwVC.js +13 -0
- package/lib/{Route-D-egsGHx.js.map → Route-CR6TEwVC.js.map} +1 -1
- package/lib/Select-Boi_pe3L.js +5298 -0
- package/lib/{Select-CcBbwJ2R.js.map → Select-Boi_pe3L.js.map} +1 -1
- package/lib/Spinner-oU0QJmi_.js +16 -0
- package/lib/{Spinner-C9_Opdev.js.map → Spinner-oU0QJmi_.js.map} +1 -1
- package/lib/_commonjsHelpers-BxmBWJD2.js +34 -0
- package/lib/_commonjsHelpers-BxmBWJD2.js.map +1 -0
- package/lib/assets/index-CpIig0AX.js +6341 -0
- package/lib/{index-pI9JkN46.js.map → assets/index-CpIig0AX.js.map} +1 -1
- package/lib/assets/worker-B5k2aBV9.js +18921 -0
- package/lib/assets/{worker-BjPv-hjP.js.map → worker-B5k2aBV9.js.map} +1 -1
- package/lib/context-BoN_3uxi.js +17 -0
- package/lib/{context-_fYfJFgk.js.map → context-BoN_3uxi.js.map} +1 -1
- package/lib/hook-CIuFuyBT.js +90 -0
- package/lib/{hook-CKqQERWo.js.map → hook-CIuFuyBT.js.map} +1 -1
- package/lib/index-BL1P4Gqq.js +280 -0
- package/lib/{index-ByHya67R.js.map → index-BL1P4Gqq.js.map} +1 -1
- package/lib/index-Bn03IPZt.js +6341 -0
- package/lib/{assets/index-BPdJm2ty.js.map → index-Bn03IPZt.js.map} +1 -1
- package/lib/{index-jsFBaizC.js → index-Dih8IAqw.js} +103 -83
- package/lib/{index-jsFBaizC.js.map → index-Dih8IAqw.js.map} +1 -1
- package/lib/index-FprhHF51.js +253 -0
- package/lib/{index-DseBZFJ-.js.map → index-FprhHF51.js.map} +1 -1
- package/lib/jsx-runtime-DvZ6OKMM.js +2110 -0
- package/lib/{jsx-runtime-CJZJivg2.js.map → jsx-runtime-DvZ6OKMM.js.map} +1 -1
- package/lib/mutation-DWY9x2Uc.js +250 -0
- package/lib/{mutation-DjbQSHzT.js.map → mutation-DWY9x2Uc.js.map} +1 -1
- package/lib/prism-bash.min-BtBk0onv.js +7 -0
- package/lib/{prism-bash.min-DadFsM4Z.js.map → prism-bash.min-BtBk0onv.js.map} +1 -1
- package/lib/prism-csharp.min-Cv7D49bv.js +30 -0
- package/lib/{prism-csharp.min-Yizuc34Y.js.map → prism-csharp.min-Cv7D49bv.js.map} +1 -1
- package/lib/prism-java.min-tNK-JX6x.js +7 -0
- package/lib/{prism-java.min-d5iT_mOd.js.map → prism-java.min-tNK-JX6x.js.map} +1 -1
- package/lib/prism-json.min-Cdtv-CME.js +2 -0
- package/lib/{prism-json.min-B1GJqK1k.js.map → prism-json.min-Cdtv-CME.js.map} +1 -1
- package/lib/prism-markup-templating-iotg2sCU.js +94 -0
- package/lib/{prism-markup-templating-DZrrEs0A.js.map → prism-markup-templating-iotg2sCU.js.map} +1 -1
- package/lib/prism-objectivec.min-CY4WGixz.js +2 -0
- package/lib/{prism-objectivec.min-BXSWqpJJ.js.map → prism-objectivec.min-CY4WGixz.js.map} +1 -1
- package/lib/prism-php.min-T6sIVgED.js +11 -0
- package/lib/{prism-php.min-o7FpoMP_.js.map → prism-php.min-T6sIVgED.js.map} +1 -1
- package/lib/prism-ruby.min-B-2KAa4y.js +8 -0
- package/lib/{prism-ruby.min-C7LwcKyz.js.map → prism-ruby.min-B-2KAa4y.js.map} +1 -1
- package/lib/router-ButO1QyY.js +4062 -0
- package/lib/{router-CBw2vqJE.js.map → router-ButO1QyY.js.map} +1 -1
- package/lib/slugify-CmS97Vy8.js +50 -0
- package/lib/{slugify-CiPVjteN.js.map → slugify-CmS97Vy8.js.map} +1 -1
- package/lib/state-CmGfNKhR.js +436 -0
- package/lib/{state-DKdaQzvh.js.map → state-CmGfNKhR.js.map} +1 -1
- package/lib/urql-DtVKPBx_.js +2567 -0
- package/lib/{urql-DEKdguFl.js.map → urql-DtVKPBx_.js.map} +1 -1
- package/lib/util-B5KX4h4M.js +55 -0
- package/lib/{util-_jwUlTBU.js.map → util-B5KX4h4M.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +24 -18
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +43 -34
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +1121 -734
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +1076 -823
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +13776 -9681
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +206 -165
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +41 -33
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +6 -6
- package/lib/zudoku.plugin-redirect.js +10 -8
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/package.json +1 -1
- package/lib/AnchorLink-BCN_a_Uz.js +0 -705
- package/lib/Combination-B0Iu6mhJ.js +0 -915
- package/lib/DevPortalProvider-Do9oJqme.js +0 -1081
- package/lib/Markdown-aE_XoLNs.js +0 -15030
- package/lib/Markdown-aE_XoLNs.js.map +0 -1
- package/lib/MdxPage-Bsc79cD-.js +0 -190
- package/lib/OperationList-K-JWBxau.js +0 -5091
- package/lib/Playground-Czy7ha9z.js +0 -502
- package/lib/Route-D-egsGHx.js +0 -13
- package/lib/Select-CcBbwJ2R.js +0 -3667
- package/lib/Spinner-C9_Opdev.js +0 -15
- package/lib/_commonjsHelpers-BVfed4GL.js +0 -29
- package/lib/_commonjsHelpers-BVfed4GL.js.map +0 -1
- package/lib/assets/index-BPdJm2ty.js +0 -4765
- package/lib/assets/worker-BjPv-hjP.js +0 -14897
- package/lib/context-_fYfJFgk.js +0 -14
- package/lib/hook-CKqQERWo.js +0 -77
- package/lib/index-ByHya67R.js +0 -207
- package/lib/index-DseBZFJ-.js +0 -170
- package/lib/index-pI9JkN46.js +0 -4765
- package/lib/jsx-runtime-CJZJivg2.js +0 -1526
- package/lib/mutation-DjbQSHzT.js +0 -208
- package/lib/prism-bash.min-DadFsM4Z.js +0 -7
- package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
- package/lib/prism-java.min-d5iT_mOd.js +0 -7
- package/lib/prism-json.min-B1GJqK1k.js +0 -2
- package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
- package/lib/prism-objectivec.min-BXSWqpJJ.js +0 -2
- package/lib/prism-php.min-o7FpoMP_.js +0 -11
- package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
- package/lib/router-CBw2vqJE.js +0 -2973
- package/lib/slugify-CiPVjteN.js +0 -28
- package/lib/state-DKdaQzvh.js +0 -288
- package/lib/urql-DEKdguFl.js +0 -1592
- package/lib/util-_jwUlTBU.js +0 -41
package/lib/zudoku.components.js
CHANGED
|
@@ -1,37 +1,41 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __typeError = (msg) => {
|
|
3
|
+
throw TypeError(msg);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
8
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
9
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
|
+
var __privateWrapper = (obj, member, setter, getter) => ({
|
|
12
|
+
set _(value) {
|
|
13
|
+
__privateSet(obj, member, value, setter);
|
|
11
14
|
},
|
|
12
15
|
get _() {
|
|
13
|
-
return
|
|
16
|
+
return __privateGet(obj, member, getter);
|
|
14
17
|
}
|
|
15
18
|
});
|
|
16
|
-
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
19
|
+
var _queries, _a, _mutations, _mutationId, _b, _queryCache, _mutationCache, _defaultOptions, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline, _c;
|
|
20
|
+
import { c as createLucideIcon, d as dist$1, R as RouterProvider, N as NavLink, a as cx, u as useTheme, M as MdxComponents, T as ThemeProvider, V as ViewportAnchorProvider, b as useViewportAnchor, e as cn, f as cva, C as Callout$1, L as Link$1 } from "./Markdown-B8nPVql1.js";
|
|
21
|
+
import { E as ErrorAlert, u as useAuth, R as RouterError$1 } from "./hook-CIuFuyBT.js";
|
|
22
|
+
import { j as jsxRuntimeExports, d as dist, u as useLocation, O as Outlet } from "./jsx-runtime-DvZ6OKMM.js";
|
|
23
|
+
import { H as HelmetProvider, a as Helmet, M as MDXProvider, A as AnchorLink, u as useMDXComponents$1 } from "./AnchorLink-BaXHjhF-.js";
|
|
24
|
+
import React__default, { StrictMode, createContext, Component, createElement, isValidElement, memo, useMemo, useEffect, Fragment, useRef, useState, forwardRef, Suspense } from "react";
|
|
25
|
+
import { g as getAugmentedNamespace } from "./_commonjsHelpers-BxmBWJD2.js";
|
|
26
|
+
import { r as router$1 } from "./router-ButO1QyY.js";
|
|
27
|
+
import { S as Subscribable, h as hashQueryKeyByOptions, Q as Query, n as notifyManager, m as matchQuery, a as matchMutation, b as noop, e as ensureQueryFn, c as addToStart, d as addToEnd, f as focusManager, o as onlineManager, r as resolveStaleTime, g as functionalUpdate, i as hashKey, p as partialMatchKey, s as skipToken, u as useDevPortal, j as QueryClientProvider, D as DevPortalProvider, k as useTopNavigationItem, l as useNavigation } from "./DevPortalProvider-GjdO0Xr-.js";
|
|
28
|
+
import { M as Mutation } from "./mutation-DWY9x2Uc.js";
|
|
29
|
+
import { R as Root, T as Trigger, C as Content } from "./index-FprhHF51.js";
|
|
30
|
+
import { c as checkHasActiveItem, i as isPathItem, j as joinPath, a as isLinkItem } from "./util-B5KX4h4M.js";
|
|
31
|
+
import { S as Spinner } from "./Spinner-oU0QJmi_.js";
|
|
28
32
|
/**
|
|
29
33
|
* @license lucide-react v0.378.0 - ISC
|
|
30
34
|
*
|
|
31
35
|
* This source code is licensed under the ISC license.
|
|
32
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
33
37
|
*/
|
|
34
|
-
const
|
|
38
|
+
const ChevronRight = createLucideIcon("ChevronRight", [
|
|
35
39
|
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
36
40
|
]);
|
|
37
41
|
/**
|
|
@@ -40,7 +44,7 @@ const _e = U("ChevronRight", [
|
|
|
40
44
|
* This source code is licensed under the ISC license.
|
|
41
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
46
|
*/
|
|
43
|
-
const
|
|
47
|
+
const ExternalLink = createLucideIcon("ExternalLink", [
|
|
44
48
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
45
49
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
46
50
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
@@ -51,7 +55,7 @@ const Dt = U("ExternalLink", [
|
|
|
51
55
|
* This source code is licensed under the ISC license.
|
|
52
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
53
57
|
*/
|
|
54
|
-
const
|
|
58
|
+
const MoonStar = createLucideIcon("MoonStar", [
|
|
55
59
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9", key: "4ay0iu" }],
|
|
56
60
|
["path", { d: "M20 3v4", key: "1olli1" }],
|
|
57
61
|
["path", { d: "M22 5h-4", key: "1gvqau" }]
|
|
@@ -62,7 +66,7 @@ const _t = U("MoonStar", [
|
|
|
62
66
|
* This source code is licensed under the ISC license.
|
|
63
67
|
* See the LICENSE file in the root directory of this source tree.
|
|
64
68
|
*/
|
|
65
|
-
const
|
|
69
|
+
const Sun = createLucideIcon("Sun", [
|
|
66
70
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
67
71
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
68
72
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -73,973 +77,1193 @@ const Tt = U("Sun", [
|
|
|
73
77
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
74
78
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
75
79
|
]);
|
|
76
|
-
function
|
|
77
|
-
return /* @__PURE__ */
|
|
80
|
+
function ServerError$1({ error }) {
|
|
81
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorAlert, { error });
|
|
78
82
|
}
|
|
79
|
-
var
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
83
|
+
var server = {};
|
|
84
|
+
const require$$1 = /* @__PURE__ */ getAugmentedNamespace(router$1);
|
|
85
|
+
const require$$2 = /* @__PURE__ */ getAugmentedNamespace(dist);
|
|
86
|
+
const require$$3 = /* @__PURE__ */ getAugmentedNamespace(dist$1);
|
|
87
|
+
Object.defineProperty(server, "__esModule", { value: true });
|
|
88
|
+
var React = React__default;
|
|
89
|
+
var router = require$$1;
|
|
90
|
+
var reactRouter = require$$2;
|
|
91
|
+
var reactRouterDom = require$$3;
|
|
92
|
+
function _interopNamespace(e) {
|
|
93
|
+
if (e && e.__esModule) return e;
|
|
94
|
+
var n = /* @__PURE__ */ Object.create(null);
|
|
95
|
+
if (e) {
|
|
96
|
+
Object.keys(e).forEach(function(k) {
|
|
97
|
+
if (k !== "default") {
|
|
98
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
99
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
100
|
+
enumerable: true,
|
|
101
|
+
get: function() {
|
|
102
|
+
return e[k];
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
n["default"] = e;
|
|
109
|
+
return Object.freeze(n);
|
|
97
110
|
}
|
|
98
|
-
var
|
|
99
|
-
function
|
|
100
|
-
basename
|
|
101
|
-
children
|
|
102
|
-
location:
|
|
103
|
-
future
|
|
111
|
+
var React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
|
112
|
+
function StaticRouter({
|
|
113
|
+
basename,
|
|
114
|
+
children,
|
|
115
|
+
location: locationProp = "/",
|
|
116
|
+
future
|
|
104
117
|
}) {
|
|
105
|
-
typeof
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
if (typeof locationProp === "string") {
|
|
119
|
+
locationProp = reactRouterDom.parsePath(locationProp);
|
|
120
|
+
}
|
|
121
|
+
let action = router.Action.Pop;
|
|
122
|
+
let location = {
|
|
123
|
+
pathname: locationProp.pathname || "/",
|
|
124
|
+
search: locationProp.search || "",
|
|
125
|
+
hash: locationProp.hash || "",
|
|
126
|
+
state: locationProp.state != null ? locationProp.state : null,
|
|
127
|
+
key: locationProp.key || "default"
|
|
128
|
+
};
|
|
129
|
+
let staticNavigator = getStatelessNavigator();
|
|
130
|
+
return /* @__PURE__ */ React__namespace.createElement(reactRouterDom.Router, {
|
|
131
|
+
basename,
|
|
132
|
+
children,
|
|
133
|
+
location,
|
|
134
|
+
navigationType: action,
|
|
135
|
+
navigator: staticNavigator,
|
|
136
|
+
future,
|
|
137
|
+
static: true
|
|
121
138
|
});
|
|
122
139
|
}
|
|
123
|
-
function
|
|
124
|
-
context
|
|
125
|
-
router:
|
|
126
|
-
hydrate
|
|
127
|
-
nonce
|
|
140
|
+
function StaticRouterProvider({
|
|
141
|
+
context,
|
|
142
|
+
router: router$12,
|
|
143
|
+
hydrate = true,
|
|
144
|
+
nonce
|
|
128
145
|
}) {
|
|
129
|
-
|
|
130
|
-
let
|
|
131
|
-
router:
|
|
132
|
-
navigator:
|
|
133
|
-
static:
|
|
134
|
-
staticContext:
|
|
135
|
-
basename:
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
146
|
+
!(router$12 && context) ? process.env.NODE_ENV !== "production" ? router.UNSAFE_invariant(false, "You must provide `router` and `context` to <StaticRouterProvider>") : router.UNSAFE_invariant(false) : void 0;
|
|
147
|
+
let dataRouterContext = {
|
|
148
|
+
router: router$12,
|
|
149
|
+
navigator: getStatelessNavigator(),
|
|
150
|
+
static: true,
|
|
151
|
+
staticContext: context,
|
|
152
|
+
basename: context.basename || "/"
|
|
153
|
+
};
|
|
154
|
+
let fetchersContext = /* @__PURE__ */ new Map();
|
|
155
|
+
let hydrateScript = "";
|
|
156
|
+
if (hydrate !== false) {
|
|
157
|
+
let data = {
|
|
158
|
+
loaderData: context.loaderData,
|
|
159
|
+
actionData: context.actionData,
|
|
160
|
+
errors: serializeErrors(context.errors)
|
|
142
161
|
};
|
|
143
|
-
|
|
162
|
+
let json = htmlEscape(JSON.stringify(JSON.stringify(data)));
|
|
163
|
+
hydrateScript = `window.__staticRouterHydrationData = JSON.parse(${json});`;
|
|
144
164
|
}
|
|
145
165
|
let {
|
|
146
|
-
state
|
|
147
|
-
} =
|
|
148
|
-
return /* @__PURE__ */
|
|
149
|
-
value:
|
|
150
|
-
}, /* @__PURE__ */
|
|
151
|
-
value:
|
|
152
|
-
}, /* @__PURE__ */
|
|
153
|
-
value:
|
|
154
|
-
}, /* @__PURE__ */
|
|
166
|
+
state
|
|
167
|
+
} = dataRouterContext.router;
|
|
168
|
+
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(reactRouterDom.UNSAFE_DataRouterContext.Provider, {
|
|
169
|
+
value: dataRouterContext
|
|
170
|
+
}, /* @__PURE__ */ React__namespace.createElement(reactRouterDom.UNSAFE_DataRouterStateContext.Provider, {
|
|
171
|
+
value: state
|
|
172
|
+
}, /* @__PURE__ */ React__namespace.createElement(reactRouterDom.UNSAFE_FetchersContext.Provider, {
|
|
173
|
+
value: fetchersContext
|
|
174
|
+
}, /* @__PURE__ */ React__namespace.createElement(reactRouterDom.UNSAFE_ViewTransitionContext.Provider, {
|
|
155
175
|
value: {
|
|
156
|
-
isTransitioning:
|
|
176
|
+
isTransitioning: false
|
|
157
177
|
}
|
|
158
|
-
}, /* @__PURE__ */
|
|
159
|
-
basename:
|
|
160
|
-
location:
|
|
161
|
-
navigationType:
|
|
162
|
-
navigator:
|
|
163
|
-
static:
|
|
178
|
+
}, /* @__PURE__ */ React__namespace.createElement(reactRouterDom.Router, {
|
|
179
|
+
basename: dataRouterContext.basename,
|
|
180
|
+
location: state.location,
|
|
181
|
+
navigationType: state.historyAction,
|
|
182
|
+
navigator: dataRouterContext.navigator,
|
|
183
|
+
static: dataRouterContext.static,
|
|
164
184
|
future: {
|
|
165
|
-
v7_relativeSplatPath:
|
|
185
|
+
v7_relativeSplatPath: router$12.future.v7_relativeSplatPath
|
|
166
186
|
}
|
|
167
|
-
}, /* @__PURE__ */
|
|
168
|
-
routes:
|
|
169
|
-
future:
|
|
170
|
-
state
|
|
171
|
-
})))))),
|
|
172
|
-
suppressHydrationWarning:
|
|
173
|
-
nonce
|
|
187
|
+
}, /* @__PURE__ */ React__namespace.createElement(DataRoutes, {
|
|
188
|
+
routes: router$12.routes,
|
|
189
|
+
future: router$12.future,
|
|
190
|
+
state
|
|
191
|
+
})))))), hydrateScript ? /* @__PURE__ */ React__namespace.createElement("script", {
|
|
192
|
+
suppressHydrationWarning: true,
|
|
193
|
+
nonce,
|
|
174
194
|
dangerouslySetInnerHTML: {
|
|
175
|
-
__html:
|
|
195
|
+
__html: hydrateScript
|
|
176
196
|
}
|
|
177
197
|
}) : null);
|
|
178
198
|
}
|
|
179
|
-
function
|
|
180
|
-
routes
|
|
181
|
-
future
|
|
182
|
-
state
|
|
199
|
+
function DataRoutes({
|
|
200
|
+
routes,
|
|
201
|
+
future,
|
|
202
|
+
state
|
|
183
203
|
}) {
|
|
184
|
-
return
|
|
204
|
+
return reactRouter.UNSAFE_useRoutesImpl(routes, void 0, state, future);
|
|
185
205
|
}
|
|
186
|
-
function
|
|
187
|
-
if (!
|
|
188
|
-
let
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
206
|
+
function serializeErrors(errors) {
|
|
207
|
+
if (!errors) return null;
|
|
208
|
+
let entries = Object.entries(errors);
|
|
209
|
+
let serialized = {};
|
|
210
|
+
for (let [key, val] of entries) {
|
|
211
|
+
if (router.isRouteErrorResponse(val)) {
|
|
212
|
+
serialized[key] = {
|
|
213
|
+
...val,
|
|
214
|
+
__type: "RouteErrorResponse"
|
|
215
|
+
};
|
|
216
|
+
} else if (val instanceof Error) {
|
|
217
|
+
serialized[key] = {
|
|
218
|
+
message: val.message,
|
|
219
|
+
__type: "Error",
|
|
220
|
+
// If this is a subclass (i.e., ReferenceError), send up the type so we
|
|
221
|
+
// can re-create the same type during hydration.
|
|
222
|
+
...val.name !== "Error" ? {
|
|
223
|
+
__subType: val.name
|
|
224
|
+
} : {}
|
|
225
|
+
};
|
|
226
|
+
} else {
|
|
227
|
+
serialized[key] = val;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return serialized;
|
|
203
231
|
}
|
|
204
|
-
function
|
|
232
|
+
function getStatelessNavigator() {
|
|
205
233
|
return {
|
|
206
|
-
createHref
|
|
207
|
-
encodeLocation
|
|
208
|
-
push(
|
|
209
|
-
throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(
|
|
234
|
+
createHref,
|
|
235
|
+
encodeLocation,
|
|
236
|
+
push(to) {
|
|
237
|
+
throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(to)})\` somewhere in your app.`);
|
|
210
238
|
},
|
|
211
|
-
replace(
|
|
212
|
-
throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(
|
|
239
|
+
replace(to) {
|
|
240
|
+
throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(to)}, { replace: true })\` somewhere in your app.`);
|
|
213
241
|
},
|
|
214
|
-
go(
|
|
215
|
-
throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${
|
|
242
|
+
go(delta) {
|
|
243
|
+
throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${delta})\` somewhere in your app.`);
|
|
216
244
|
},
|
|
217
245
|
back() {
|
|
218
|
-
throw new Error(
|
|
246
|
+
throw new Error(`You cannot use navigator.back() on the server because it is a stateless environment.`);
|
|
219
247
|
},
|
|
220
248
|
forward() {
|
|
221
|
-
throw new Error(
|
|
249
|
+
throw new Error(`You cannot use navigator.forward() on the server because it is a stateless environment.`);
|
|
222
250
|
}
|
|
223
251
|
};
|
|
224
252
|
}
|
|
225
|
-
function
|
|
226
|
-
return
|
|
227
|
-
...
|
|
228
|
-
mapRouteProperties:
|
|
253
|
+
function createStaticHandler(routes, opts) {
|
|
254
|
+
return router.createStaticHandler(routes, {
|
|
255
|
+
...opts,
|
|
256
|
+
mapRouteProperties: reactRouter.UNSAFE_mapRouteProperties
|
|
229
257
|
});
|
|
230
258
|
}
|
|
231
|
-
function
|
|
232
|
-
let
|
|
233
|
-
|
|
259
|
+
function createStaticRouter(routes, context, opts = {}) {
|
|
260
|
+
let manifest = {};
|
|
261
|
+
let dataRoutes = router.UNSAFE_convertRoutesToDataRoutes(routes, reactRouter.UNSAFE_mapRouteProperties, void 0, manifest);
|
|
262
|
+
let matches = context.matches.map((match) => {
|
|
263
|
+
let route = manifest[match.route.id] || match.route;
|
|
234
264
|
return {
|
|
235
|
-
...
|
|
236
|
-
route
|
|
265
|
+
...match,
|
|
266
|
+
route
|
|
237
267
|
};
|
|
238
|
-
})
|
|
268
|
+
});
|
|
269
|
+
let msg = (method) => `You cannot use router.${method}() on the server because it is a stateless environment`;
|
|
239
270
|
return {
|
|
240
271
|
get basename() {
|
|
241
|
-
return
|
|
272
|
+
return context.basename;
|
|
242
273
|
},
|
|
243
274
|
get future() {
|
|
244
|
-
var
|
|
275
|
+
var _a2, _b2;
|
|
245
276
|
return {
|
|
246
|
-
v7_fetcherPersist:
|
|
247
|
-
v7_normalizeFormMethod:
|
|
248
|
-
v7_partialHydration: ((
|
|
249
|
-
v7_prependBasename:
|
|
250
|
-
v7_relativeSplatPath: ((
|
|
251
|
-
unstable_skipActionErrorRevalidation:
|
|
277
|
+
v7_fetcherPersist: false,
|
|
278
|
+
v7_normalizeFormMethod: false,
|
|
279
|
+
v7_partialHydration: ((_a2 = opts.future) == null ? void 0 : _a2.v7_partialHydration) === true,
|
|
280
|
+
v7_prependBasename: false,
|
|
281
|
+
v7_relativeSplatPath: ((_b2 = opts.future) == null ? void 0 : _b2.v7_relativeSplatPath) === true,
|
|
282
|
+
unstable_skipActionErrorRevalidation: false
|
|
252
283
|
};
|
|
253
284
|
},
|
|
254
285
|
get state() {
|
|
255
286
|
return {
|
|
256
|
-
historyAction:
|
|
257
|
-
location:
|
|
258
|
-
matches
|
|
259
|
-
loaderData:
|
|
260
|
-
actionData:
|
|
261
|
-
errors:
|
|
262
|
-
initialized:
|
|
263
|
-
navigation:
|
|
287
|
+
historyAction: router.Action.Pop,
|
|
288
|
+
location: context.location,
|
|
289
|
+
matches,
|
|
290
|
+
loaderData: context.loaderData,
|
|
291
|
+
actionData: context.actionData,
|
|
292
|
+
errors: context.errors,
|
|
293
|
+
initialized: true,
|
|
294
|
+
navigation: router.IDLE_NAVIGATION,
|
|
264
295
|
restoreScrollPosition: null,
|
|
265
|
-
preventScrollReset:
|
|
296
|
+
preventScrollReset: false,
|
|
266
297
|
revalidation: "idle",
|
|
267
298
|
fetchers: /* @__PURE__ */ new Map(),
|
|
268
299
|
blockers: /* @__PURE__ */ new Map()
|
|
269
300
|
};
|
|
270
301
|
},
|
|
271
302
|
get routes() {
|
|
272
|
-
return
|
|
303
|
+
return dataRoutes;
|
|
273
304
|
},
|
|
274
305
|
get window() {
|
|
306
|
+
return void 0;
|
|
275
307
|
},
|
|
276
308
|
initialize() {
|
|
277
|
-
throw
|
|
309
|
+
throw msg("initialize");
|
|
278
310
|
},
|
|
279
311
|
subscribe() {
|
|
280
|
-
throw
|
|
312
|
+
throw msg("subscribe");
|
|
281
313
|
},
|
|
282
314
|
enableScrollRestoration() {
|
|
283
|
-
throw
|
|
315
|
+
throw msg("enableScrollRestoration");
|
|
284
316
|
},
|
|
285
317
|
navigate() {
|
|
286
|
-
throw
|
|
318
|
+
throw msg("navigate");
|
|
287
319
|
},
|
|
288
320
|
fetch() {
|
|
289
|
-
throw
|
|
321
|
+
throw msg("fetch");
|
|
290
322
|
},
|
|
291
323
|
revalidate() {
|
|
292
|
-
throw
|
|
324
|
+
throw msg("revalidate");
|
|
293
325
|
},
|
|
294
|
-
createHref
|
|
295
|
-
encodeLocation
|
|
326
|
+
createHref,
|
|
327
|
+
encodeLocation,
|
|
296
328
|
getFetcher() {
|
|
297
|
-
return
|
|
329
|
+
return router.IDLE_FETCHER;
|
|
298
330
|
},
|
|
299
331
|
deleteFetcher() {
|
|
300
|
-
throw
|
|
332
|
+
throw msg("deleteFetcher");
|
|
301
333
|
},
|
|
302
334
|
dispose() {
|
|
303
|
-
throw
|
|
335
|
+
throw msg("dispose");
|
|
304
336
|
},
|
|
305
337
|
getBlocker() {
|
|
306
|
-
return
|
|
338
|
+
return router.IDLE_BLOCKER;
|
|
307
339
|
},
|
|
308
340
|
deleteBlocker() {
|
|
309
|
-
throw
|
|
341
|
+
throw msg("deleteBlocker");
|
|
310
342
|
},
|
|
311
343
|
patchRoutes() {
|
|
312
|
-
throw
|
|
344
|
+
throw msg("patchRoutes");
|
|
313
345
|
},
|
|
314
346
|
_internalFetchControllers: /* @__PURE__ */ new Map(),
|
|
315
347
|
_internalActiveDeferreds: /* @__PURE__ */ new Map(),
|
|
316
348
|
_internalSetRoutes() {
|
|
317
|
-
throw
|
|
349
|
+
throw msg("_internalSetRoutes");
|
|
318
350
|
}
|
|
319
351
|
};
|
|
320
352
|
}
|
|
321
|
-
function
|
|
322
|
-
return typeof
|
|
353
|
+
function createHref(to) {
|
|
354
|
+
return typeof to === "string" ? to : reactRouterDom.createPath(to);
|
|
323
355
|
}
|
|
324
|
-
function
|
|
325
|
-
let
|
|
326
|
-
|
|
327
|
-
let
|
|
356
|
+
function encodeLocation(to) {
|
|
357
|
+
let href = typeof to === "string" ? to : reactRouterDom.createPath(to);
|
|
358
|
+
href = href.replace(/ $/, "%20");
|
|
359
|
+
let encoded = ABSOLUTE_URL_REGEX.test(href) ? new URL(href) : new URL(href, "http://localhost");
|
|
328
360
|
return {
|
|
329
|
-
pathname:
|
|
330
|
-
search:
|
|
331
|
-
hash:
|
|
361
|
+
pathname: encoded.pathname,
|
|
362
|
+
search: encoded.search,
|
|
363
|
+
hash: encoded.hash
|
|
332
364
|
};
|
|
333
365
|
}
|
|
334
|
-
const
|
|
366
|
+
const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
367
|
+
const ESCAPE_LOOKUP = {
|
|
335
368
|
"&": "\\u0026",
|
|
336
369
|
">": "\\u003e",
|
|
337
370
|
"<": "\\u003c",
|
|
338
371
|
"\u2028": "\\u2028",
|
|
339
372
|
"\u2029": "\\u2029"
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
|
|
373
|
+
};
|
|
374
|
+
const ESCAPE_REGEX = /[&><\u2028\u2029]/g;
|
|
375
|
+
function htmlEscape(str) {
|
|
376
|
+
return str.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]);
|
|
343
377
|
}
|
|
344
|
-
|
|
345
|
-
var
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
const
|
|
349
|
-
router:
|
|
350
|
-
}) => /* @__PURE__ */
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
378
|
+
server.StaticRouter = StaticRouter;
|
|
379
|
+
var StaticRouterProvider_1 = server.StaticRouterProvider = StaticRouterProvider;
|
|
380
|
+
server.createStaticHandler = createStaticHandler;
|
|
381
|
+
server.createStaticRouter = createStaticRouter;
|
|
382
|
+
const Bootstrap$1 = ({
|
|
383
|
+
router: router2
|
|
384
|
+
}) => /* @__PURE__ */ jsxRuntimeExports.jsx(StrictMode, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(HelmetProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(RouterProvider, { router: router2 }) }) });
|
|
385
|
+
const BootstrapStatic$1 = ({
|
|
386
|
+
router: router2,
|
|
387
|
+
context,
|
|
388
|
+
helmetContext
|
|
389
|
+
}) => /* @__PURE__ */ jsxRuntimeExports.jsx(StrictMode, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(HelmetProvider, { context: helmetContext, children: /* @__PURE__ */ jsxRuntimeExports.jsx(StaticRouterProvider_1, { router: router2, context }) }) });
|
|
390
|
+
var QueryCache = (_a = class extends Subscribable {
|
|
391
|
+
constructor(config = {}) {
|
|
357
392
|
super();
|
|
358
|
-
|
|
359
|
-
this.config =
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
393
|
+
__privateAdd(this, _queries);
|
|
394
|
+
this.config = config;
|
|
395
|
+
__privateSet(this, _queries, /* @__PURE__ */ new Map());
|
|
396
|
+
}
|
|
397
|
+
build(client, options, state) {
|
|
398
|
+
const queryKey = options.queryKey;
|
|
399
|
+
const queryHash = options.queryHash ?? hashQueryKeyByOptions(queryKey, options);
|
|
400
|
+
let query = this.get(queryHash);
|
|
401
|
+
if (!query) {
|
|
402
|
+
query = new Query({
|
|
403
|
+
cache: this,
|
|
404
|
+
queryKey,
|
|
405
|
+
queryHash,
|
|
406
|
+
options: client.defaultQueryOptions(options),
|
|
407
|
+
state,
|
|
408
|
+
defaultOptions: client.getQueryDefaults(queryKey)
|
|
409
|
+
});
|
|
410
|
+
this.add(query);
|
|
411
|
+
}
|
|
412
|
+
return query;
|
|
413
|
+
}
|
|
414
|
+
add(query) {
|
|
415
|
+
if (!__privateGet(this, _queries).has(query.queryHash)) {
|
|
416
|
+
__privateGet(this, _queries).set(query.queryHash, query);
|
|
417
|
+
this.notify({
|
|
418
|
+
type: "added",
|
|
419
|
+
query
|
|
420
|
+
});
|
|
421
|
+
}
|
|
378
422
|
}
|
|
379
|
-
remove(
|
|
380
|
-
const
|
|
381
|
-
|
|
423
|
+
remove(query) {
|
|
424
|
+
const queryInMap = __privateGet(this, _queries).get(query.queryHash);
|
|
425
|
+
if (queryInMap) {
|
|
426
|
+
query.destroy();
|
|
427
|
+
if (queryInMap === query) {
|
|
428
|
+
__privateGet(this, _queries).delete(query.queryHash);
|
|
429
|
+
}
|
|
430
|
+
this.notify({ type: "removed", query });
|
|
431
|
+
}
|
|
382
432
|
}
|
|
383
433
|
clear() {
|
|
384
|
-
|
|
385
|
-
this.getAll().forEach((
|
|
386
|
-
this.remove(
|
|
434
|
+
notifyManager.batch(() => {
|
|
435
|
+
this.getAll().forEach((query) => {
|
|
436
|
+
this.remove(query);
|
|
387
437
|
});
|
|
388
438
|
});
|
|
389
439
|
}
|
|
390
|
-
get(
|
|
391
|
-
return
|
|
440
|
+
get(queryHash) {
|
|
441
|
+
return __privateGet(this, _queries).get(queryHash);
|
|
392
442
|
}
|
|
393
443
|
getAll() {
|
|
394
|
-
return [...
|
|
444
|
+
return [...__privateGet(this, _queries).values()];
|
|
395
445
|
}
|
|
396
|
-
find(
|
|
397
|
-
const
|
|
446
|
+
find(filters) {
|
|
447
|
+
const defaultedFilters = { exact: true, ...filters };
|
|
398
448
|
return this.getAll().find(
|
|
399
|
-
(
|
|
449
|
+
(query) => matchQuery(defaultedFilters, query)
|
|
400
450
|
);
|
|
401
451
|
}
|
|
402
|
-
findAll(
|
|
403
|
-
const
|
|
404
|
-
return Object.keys(
|
|
452
|
+
findAll(filters = {}) {
|
|
453
|
+
const queries = this.getAll();
|
|
454
|
+
return Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;
|
|
405
455
|
}
|
|
406
|
-
notify(
|
|
407
|
-
|
|
408
|
-
this.listeners.forEach((
|
|
409
|
-
|
|
456
|
+
notify(event) {
|
|
457
|
+
notifyManager.batch(() => {
|
|
458
|
+
this.listeners.forEach((listener) => {
|
|
459
|
+
listener(event);
|
|
410
460
|
});
|
|
411
461
|
});
|
|
412
462
|
}
|
|
413
463
|
onFocus() {
|
|
414
|
-
|
|
415
|
-
this.getAll().forEach((
|
|
416
|
-
|
|
464
|
+
notifyManager.batch(() => {
|
|
465
|
+
this.getAll().forEach((query) => {
|
|
466
|
+
query.onFocus();
|
|
417
467
|
});
|
|
418
468
|
});
|
|
419
469
|
}
|
|
420
470
|
onOnline() {
|
|
421
|
-
|
|
422
|
-
this.getAll().forEach((
|
|
423
|
-
|
|
471
|
+
notifyManager.batch(() => {
|
|
472
|
+
this.getAll().forEach((query) => {
|
|
473
|
+
query.onOnline();
|
|
424
474
|
});
|
|
425
475
|
});
|
|
426
476
|
}
|
|
427
|
-
},
|
|
428
|
-
|
|
477
|
+
}, _queries = new WeakMap(), _a);
|
|
478
|
+
var MutationCache = (_b = class extends Subscribable {
|
|
479
|
+
constructor(config = {}) {
|
|
429
480
|
super();
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
this.config =
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
481
|
+
__privateAdd(this, _mutations);
|
|
482
|
+
__privateAdd(this, _mutationId);
|
|
483
|
+
this.config = config;
|
|
484
|
+
__privateSet(this, _mutations, /* @__PURE__ */ new Map());
|
|
485
|
+
__privateSet(this, _mutationId, Date.now());
|
|
486
|
+
}
|
|
487
|
+
build(client, options, state) {
|
|
488
|
+
const mutation = new Mutation({
|
|
436
489
|
mutationCache: this,
|
|
437
|
-
mutationId: ++
|
|
438
|
-
options:
|
|
439
|
-
state
|
|
490
|
+
mutationId: ++__privateWrapper(this, _mutationId)._,
|
|
491
|
+
options: client.defaultMutationOptions(options),
|
|
492
|
+
state
|
|
440
493
|
});
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
494
|
+
this.add(mutation);
|
|
495
|
+
return mutation;
|
|
496
|
+
}
|
|
497
|
+
add(mutation) {
|
|
498
|
+
const scope = scopeFor(mutation);
|
|
499
|
+
const mutations = __privateGet(this, _mutations).get(scope) ?? [];
|
|
500
|
+
mutations.push(mutation);
|
|
501
|
+
__privateGet(this, _mutations).set(scope, mutations);
|
|
502
|
+
this.notify({ type: "added", mutation });
|
|
503
|
+
}
|
|
504
|
+
remove(mutation) {
|
|
505
|
+
var _a2;
|
|
506
|
+
const scope = scopeFor(mutation);
|
|
507
|
+
if (__privateGet(this, _mutations).has(scope)) {
|
|
508
|
+
const mutations = (_a2 = __privateGet(this, _mutations).get(scope)) == null ? void 0 : _a2.filter((x) => x !== mutation);
|
|
509
|
+
if (mutations) {
|
|
510
|
+
if (mutations.length === 0) {
|
|
511
|
+
__privateGet(this, _mutations).delete(scope);
|
|
512
|
+
} else {
|
|
513
|
+
__privateGet(this, _mutations).set(scope, mutations);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
453
516
|
}
|
|
454
|
-
this.notify({ type: "removed", mutation
|
|
517
|
+
this.notify({ type: "removed", mutation });
|
|
455
518
|
}
|
|
456
|
-
canRun(
|
|
457
|
-
var
|
|
458
|
-
const
|
|
459
|
-
return !
|
|
519
|
+
canRun(mutation) {
|
|
520
|
+
var _a2;
|
|
521
|
+
const firstPendingMutation = (_a2 = __privateGet(this, _mutations).get(scopeFor(mutation))) == null ? void 0 : _a2.find((m) => m.state.status === "pending");
|
|
522
|
+
return !firstPendingMutation || firstPendingMutation === mutation;
|
|
460
523
|
}
|
|
461
|
-
runNext(
|
|
462
|
-
var
|
|
463
|
-
const
|
|
464
|
-
return (
|
|
524
|
+
runNext(mutation) {
|
|
525
|
+
var _a2;
|
|
526
|
+
const foundMutation = (_a2 = __privateGet(this, _mutations).get(scopeFor(mutation))) == null ? void 0 : _a2.find((m) => m !== mutation && m.state.isPaused);
|
|
527
|
+
return (foundMutation == null ? void 0 : foundMutation.continue()) ?? Promise.resolve();
|
|
465
528
|
}
|
|
466
529
|
clear() {
|
|
467
|
-
|
|
468
|
-
this.getAll().forEach((
|
|
469
|
-
this.remove(
|
|
530
|
+
notifyManager.batch(() => {
|
|
531
|
+
this.getAll().forEach((mutation) => {
|
|
532
|
+
this.remove(mutation);
|
|
470
533
|
});
|
|
471
534
|
});
|
|
472
535
|
}
|
|
473
536
|
getAll() {
|
|
474
|
-
return [...
|
|
537
|
+
return [...__privateGet(this, _mutations).values()].flat();
|
|
475
538
|
}
|
|
476
|
-
find(
|
|
477
|
-
const
|
|
539
|
+
find(filters) {
|
|
540
|
+
const defaultedFilters = { exact: true, ...filters };
|
|
478
541
|
return this.getAll().find(
|
|
479
|
-
(
|
|
542
|
+
(mutation) => matchMutation(defaultedFilters, mutation)
|
|
480
543
|
);
|
|
481
544
|
}
|
|
482
|
-
findAll(
|
|
483
|
-
return this.getAll().filter((
|
|
545
|
+
findAll(filters = {}) {
|
|
546
|
+
return this.getAll().filter((mutation) => matchMutation(filters, mutation));
|
|
484
547
|
}
|
|
485
|
-
notify(
|
|
486
|
-
|
|
487
|
-
this.listeners.forEach((
|
|
488
|
-
|
|
548
|
+
notify(event) {
|
|
549
|
+
notifyManager.batch(() => {
|
|
550
|
+
this.listeners.forEach((listener) => {
|
|
551
|
+
listener(event);
|
|
489
552
|
});
|
|
490
553
|
});
|
|
491
554
|
}
|
|
492
555
|
resumePausedMutations() {
|
|
493
|
-
const
|
|
494
|
-
return
|
|
556
|
+
const pausedMutations = this.getAll().filter((x) => x.state.isPaused);
|
|
557
|
+
return notifyManager.batch(
|
|
495
558
|
() => Promise.all(
|
|
496
|
-
|
|
559
|
+
pausedMutations.map((mutation) => mutation.continue().catch(noop))
|
|
497
560
|
)
|
|
498
561
|
);
|
|
499
562
|
}
|
|
500
|
-
},
|
|
501
|
-
function
|
|
502
|
-
var
|
|
503
|
-
return ((
|
|
563
|
+
}, _mutations = new WeakMap(), _mutationId = new WeakMap(), _b);
|
|
564
|
+
function scopeFor(mutation) {
|
|
565
|
+
var _a2;
|
|
566
|
+
return ((_a2 = mutation.options.scope) == null ? void 0 : _a2.id) ?? String(mutation.mutationId);
|
|
504
567
|
}
|
|
505
|
-
function
|
|
568
|
+
function infiniteQueryBehavior(pages) {
|
|
506
569
|
return {
|
|
507
|
-
onFetch: (
|
|
508
|
-
const
|
|
509
|
-
var
|
|
510
|
-
const
|
|
511
|
-
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
570
|
+
onFetch: (context, query) => {
|
|
571
|
+
const fetchFn = async () => {
|
|
572
|
+
var _a2, _b2, _c2, _d, _e;
|
|
573
|
+
const options = context.options;
|
|
574
|
+
const direction = (_c2 = (_b2 = (_a2 = context.fetchOptions) == null ? void 0 : _a2.meta) == null ? void 0 : _b2.fetchMore) == null ? void 0 : _c2.direction;
|
|
575
|
+
const oldPages = ((_d = context.state.data) == null ? void 0 : _d.pages) || [];
|
|
576
|
+
const oldPageParams = ((_e = context.state.data) == null ? void 0 : _e.pageParams) || [];
|
|
577
|
+
const empty = { pages: [], pageParams: [] };
|
|
578
|
+
let cancelled = false;
|
|
579
|
+
const addSignalProperty = (object) => {
|
|
580
|
+
Object.defineProperty(object, "signal", {
|
|
581
|
+
enumerable: true,
|
|
582
|
+
get: () => {
|
|
583
|
+
if (context.signal.aborted) {
|
|
584
|
+
cancelled = true;
|
|
585
|
+
} else {
|
|
586
|
+
context.signal.addEventListener("abort", () => {
|
|
587
|
+
cancelled = true;
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
return context.signal;
|
|
591
|
+
}
|
|
518
592
|
});
|
|
519
|
-
}
|
|
520
|
-
|
|
593
|
+
};
|
|
594
|
+
const queryFn = ensureQueryFn(context.options, context.fetchOptions);
|
|
595
|
+
const fetchPage = async (data, param, previous) => {
|
|
596
|
+
if (cancelled) {
|
|
521
597
|
return Promise.reject();
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
598
|
+
}
|
|
599
|
+
if (param == null && data.pages.length) {
|
|
600
|
+
return Promise.resolve(data);
|
|
601
|
+
}
|
|
602
|
+
const queryFnContext = {
|
|
603
|
+
queryKey: context.queryKey,
|
|
604
|
+
pageParam: param,
|
|
605
|
+
direction: previous ? "backward" : "forward",
|
|
606
|
+
meta: context.options.meta
|
|
529
607
|
};
|
|
530
|
-
|
|
531
|
-
const
|
|
532
|
-
|
|
533
|
-
)
|
|
608
|
+
addSignalProperty(queryFnContext);
|
|
609
|
+
const page = await queryFn(
|
|
610
|
+
queryFnContext
|
|
611
|
+
);
|
|
612
|
+
const { maxPages } = context.options;
|
|
613
|
+
const addTo = previous ? addToStart : addToEnd;
|
|
534
614
|
return {
|
|
535
|
-
pages:
|
|
536
|
-
pageParams:
|
|
615
|
+
pages: addTo(data.pages, page, maxPages),
|
|
616
|
+
pageParams: addTo(data.pageParams, param, maxPages)
|
|
537
617
|
};
|
|
538
618
|
};
|
|
539
|
-
let
|
|
540
|
-
if (
|
|
541
|
-
const
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
619
|
+
let result;
|
|
620
|
+
if (direction && oldPages.length) {
|
|
621
|
+
const previous = direction === "backward";
|
|
622
|
+
const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
|
|
623
|
+
const oldData = {
|
|
624
|
+
pages: oldPages,
|
|
625
|
+
pageParams: oldPageParams
|
|
626
|
+
};
|
|
627
|
+
const param = pageParamFn(options, oldData);
|
|
628
|
+
result = await fetchPage(oldData, param, previous);
|
|
546
629
|
} else {
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
630
|
+
result = await fetchPage(
|
|
631
|
+
empty,
|
|
632
|
+
oldPageParams[0] ?? options.initialPageParam
|
|
550
633
|
);
|
|
551
|
-
const
|
|
552
|
-
for (let
|
|
553
|
-
const
|
|
554
|
-
|
|
634
|
+
const remainingPages = pages ?? oldPages.length;
|
|
635
|
+
for (let i = 1; i < remainingPages; i++) {
|
|
636
|
+
const param = getNextPageParam(options, result);
|
|
637
|
+
result = await fetchPage(result, param);
|
|
555
638
|
}
|
|
556
639
|
}
|
|
557
|
-
return
|
|
640
|
+
return result;
|
|
558
641
|
};
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
642
|
+
if (context.options.persister) {
|
|
643
|
+
context.fetchFn = () => {
|
|
644
|
+
var _a2, _b2;
|
|
645
|
+
return (_b2 = (_a2 = context.options).persister) == null ? void 0 : _b2.call(
|
|
646
|
+
_a2,
|
|
647
|
+
fetchFn,
|
|
648
|
+
{
|
|
649
|
+
queryKey: context.queryKey,
|
|
650
|
+
meta: context.options.meta,
|
|
651
|
+
signal: context.signal
|
|
652
|
+
},
|
|
653
|
+
query
|
|
654
|
+
);
|
|
655
|
+
};
|
|
656
|
+
} else {
|
|
657
|
+
context.fetchFn = fetchFn;
|
|
658
|
+
}
|
|
572
659
|
}
|
|
573
660
|
};
|
|
574
661
|
}
|
|
575
|
-
function
|
|
576
|
-
const
|
|
577
|
-
return
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
662
|
+
function getNextPageParam(options, { pages, pageParams }) {
|
|
663
|
+
const lastIndex = pages.length - 1;
|
|
664
|
+
return options.getNextPageParam(
|
|
665
|
+
pages[lastIndex],
|
|
666
|
+
pages,
|
|
667
|
+
pageParams[lastIndex],
|
|
668
|
+
pageParams
|
|
582
669
|
);
|
|
583
670
|
}
|
|
584
|
-
function
|
|
585
|
-
var
|
|
586
|
-
return (
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
671
|
+
function getPreviousPageParam(options, { pages, pageParams }) {
|
|
672
|
+
var _a2;
|
|
673
|
+
return (_a2 = options.getPreviousPageParam) == null ? void 0 : _a2.call(
|
|
674
|
+
options,
|
|
675
|
+
pages[0],
|
|
676
|
+
pages,
|
|
677
|
+
pageParams[0],
|
|
678
|
+
pageParams
|
|
592
679
|
);
|
|
593
680
|
}
|
|
594
|
-
var
|
|
595
|
-
constructor(
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
681
|
+
var QueryClient = (_c = class {
|
|
682
|
+
constructor(config = {}) {
|
|
683
|
+
__privateAdd(this, _queryCache);
|
|
684
|
+
__privateAdd(this, _mutationCache);
|
|
685
|
+
__privateAdd(this, _defaultOptions);
|
|
686
|
+
__privateAdd(this, _queryDefaults);
|
|
687
|
+
__privateAdd(this, _mutationDefaults);
|
|
688
|
+
__privateAdd(this, _mountCount);
|
|
689
|
+
__privateAdd(this, _unsubscribeFocus);
|
|
690
|
+
__privateAdd(this, _unsubscribeOnline);
|
|
691
|
+
__privateSet(this, _queryCache, config.queryCache || new QueryCache());
|
|
692
|
+
__privateSet(this, _mutationCache, config.mutationCache || new MutationCache());
|
|
693
|
+
__privateSet(this, _defaultOptions, config.defaultOptions || {});
|
|
694
|
+
__privateSet(this, _queryDefaults, /* @__PURE__ */ new Map());
|
|
695
|
+
__privateSet(this, _mutationDefaults, /* @__PURE__ */ new Map());
|
|
696
|
+
__privateSet(this, _mountCount, 0);
|
|
605
697
|
}
|
|
606
698
|
mount() {
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
699
|
+
__privateWrapper(this, _mountCount)._++;
|
|
700
|
+
if (__privateGet(this, _mountCount) !== 1)
|
|
701
|
+
return;
|
|
702
|
+
__privateSet(this, _unsubscribeFocus, focusManager.subscribe(async (focused) => {
|
|
703
|
+
if (focused) {
|
|
704
|
+
await this.resumePausedMutations();
|
|
705
|
+
__privateGet(this, _queryCache).onFocus();
|
|
706
|
+
}
|
|
707
|
+
}));
|
|
708
|
+
__privateSet(this, _unsubscribeOnline, onlineManager.subscribe(async (online) => {
|
|
709
|
+
if (online) {
|
|
710
|
+
await this.resumePausedMutations();
|
|
711
|
+
__privateGet(this, _queryCache).onOnline();
|
|
712
|
+
}
|
|
713
|
+
}));
|
|
612
714
|
}
|
|
613
715
|
unmount() {
|
|
614
|
-
var
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
716
|
+
var _a2, _b2;
|
|
717
|
+
__privateWrapper(this, _mountCount)._--;
|
|
718
|
+
if (__privateGet(this, _mountCount) !== 0)
|
|
719
|
+
return;
|
|
720
|
+
(_a2 = __privateGet(this, _unsubscribeFocus)) == null ? void 0 : _a2.call(this);
|
|
721
|
+
__privateSet(this, _unsubscribeFocus, void 0);
|
|
722
|
+
(_b2 = __privateGet(this, _unsubscribeOnline)) == null ? void 0 : _b2.call(this);
|
|
723
|
+
__privateSet(this, _unsubscribeOnline, void 0);
|
|
724
|
+
}
|
|
725
|
+
isFetching(filters) {
|
|
726
|
+
return __privateGet(this, _queryCache).findAll({ ...filters, fetchStatus: "fetching" }).length;
|
|
727
|
+
}
|
|
728
|
+
isMutating(filters) {
|
|
729
|
+
return __privateGet(this, _mutationCache).findAll({ ...filters, status: "pending" }).length;
|
|
730
|
+
}
|
|
731
|
+
getQueryData(queryKey) {
|
|
732
|
+
var _a2;
|
|
733
|
+
const options = this.defaultQueryOptions({ queryKey });
|
|
734
|
+
return (_a2 = __privateGet(this, _queryCache).get(options.queryHash)) == null ? void 0 : _a2.state.data;
|
|
735
|
+
}
|
|
736
|
+
ensureQueryData(options) {
|
|
737
|
+
const cachedData = this.getQueryData(options.queryKey);
|
|
738
|
+
if (cachedData === void 0)
|
|
739
|
+
return this.fetchQuery(options);
|
|
740
|
+
else {
|
|
741
|
+
const defaultedOptions = this.defaultQueryOptions(options);
|
|
742
|
+
const query = __privateGet(this, _queryCache).build(this, defaultedOptions);
|
|
743
|
+
if (options.revalidateIfStale && query.isStaleByTime(resolveStaleTime(defaultedOptions.staleTime, query))) {
|
|
744
|
+
void this.prefetchQuery(defaultedOptions);
|
|
745
|
+
}
|
|
746
|
+
return Promise.resolve(cachedData);
|
|
635
747
|
}
|
|
636
748
|
}
|
|
637
|
-
getQueriesData(
|
|
638
|
-
return
|
|
639
|
-
const
|
|
640
|
-
return [
|
|
749
|
+
getQueriesData(filters) {
|
|
750
|
+
return __privateGet(this, _queryCache).findAll(filters).map(({ queryKey, state }) => {
|
|
751
|
+
const data = state.data;
|
|
752
|
+
return [queryKey, data];
|
|
641
753
|
});
|
|
642
754
|
}
|
|
643
|
-
setQueryData(
|
|
644
|
-
const
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
755
|
+
setQueryData(queryKey, updater, options) {
|
|
756
|
+
const defaultedOptions = this.defaultQueryOptions({ queryKey });
|
|
757
|
+
const query = __privateGet(this, _queryCache).get(
|
|
758
|
+
defaultedOptions.queryHash
|
|
759
|
+
);
|
|
760
|
+
const prevData = query == null ? void 0 : query.state.data;
|
|
761
|
+
const data = functionalUpdate(updater, prevData);
|
|
762
|
+
if (data === void 0) {
|
|
763
|
+
return void 0;
|
|
764
|
+
}
|
|
765
|
+
return __privateGet(this, _queryCache).build(this, defaultedOptions).setData(data, { ...options, manual: true });
|
|
766
|
+
}
|
|
767
|
+
setQueriesData(filters, updater, options) {
|
|
768
|
+
return notifyManager.batch(
|
|
769
|
+
() => __privateGet(this, _queryCache).findAll(filters).map(({ queryKey }) => [
|
|
770
|
+
queryKey,
|
|
771
|
+
this.setQueryData(queryKey, updater, options)
|
|
655
772
|
])
|
|
656
773
|
);
|
|
657
774
|
}
|
|
658
|
-
getQueryState(
|
|
659
|
-
var
|
|
660
|
-
const
|
|
661
|
-
return (
|
|
775
|
+
getQueryState(queryKey) {
|
|
776
|
+
var _a2;
|
|
777
|
+
const options = this.defaultQueryOptions({ queryKey });
|
|
778
|
+
return (_a2 = __privateGet(this, _queryCache).get(options.queryHash)) == null ? void 0 : _a2.state;
|
|
662
779
|
}
|
|
663
|
-
removeQueries(
|
|
664
|
-
const
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
780
|
+
removeQueries(filters) {
|
|
781
|
+
const queryCache = __privateGet(this, _queryCache);
|
|
782
|
+
notifyManager.batch(() => {
|
|
783
|
+
queryCache.findAll(filters).forEach((query) => {
|
|
784
|
+
queryCache.remove(query);
|
|
668
785
|
});
|
|
669
786
|
});
|
|
670
787
|
}
|
|
671
|
-
resetQueries(
|
|
672
|
-
const
|
|
788
|
+
resetQueries(filters, options) {
|
|
789
|
+
const queryCache = __privateGet(this, _queryCache);
|
|
790
|
+
const refetchFilters = {
|
|
673
791
|
type: "active",
|
|
674
|
-
...
|
|
792
|
+
...filters
|
|
675
793
|
};
|
|
676
|
-
return
|
|
677
|
-
|
|
678
|
-
|
|
794
|
+
return notifyManager.batch(() => {
|
|
795
|
+
queryCache.findAll(filters).forEach((query) => {
|
|
796
|
+
query.reset();
|
|
797
|
+
});
|
|
798
|
+
return this.refetchQueries(refetchFilters, options);
|
|
799
|
+
});
|
|
679
800
|
}
|
|
680
|
-
cancelQueries(
|
|
681
|
-
const
|
|
682
|
-
|
|
801
|
+
cancelQueries(filters = {}, cancelOptions = {}) {
|
|
802
|
+
const defaultedCancelOptions = { revert: true, ...cancelOptions };
|
|
803
|
+
const promises = notifyManager.batch(
|
|
804
|
+
() => __privateGet(this, _queryCache).findAll(filters).map((query) => query.cancel(defaultedCancelOptions))
|
|
683
805
|
);
|
|
684
|
-
return Promise.all(
|
|
806
|
+
return Promise.all(promises).then(noop).catch(noop);
|
|
685
807
|
}
|
|
686
|
-
invalidateQueries(
|
|
687
|
-
return
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
})
|
|
808
|
+
invalidateQueries(filters = {}, options = {}) {
|
|
809
|
+
return notifyManager.batch(() => {
|
|
810
|
+
__privateGet(this, _queryCache).findAll(filters).forEach((query) => {
|
|
811
|
+
query.invalidate();
|
|
812
|
+
});
|
|
813
|
+
if (filters.refetchType === "none") {
|
|
691
814
|
return Promise.resolve();
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
815
|
+
}
|
|
816
|
+
const refetchFilters = {
|
|
817
|
+
...filters,
|
|
818
|
+
type: filters.refetchType ?? filters.type ?? "active"
|
|
695
819
|
};
|
|
696
|
-
return this.refetchQueries(
|
|
820
|
+
return this.refetchQueries(refetchFilters, options);
|
|
697
821
|
});
|
|
698
822
|
}
|
|
699
|
-
refetchQueries(
|
|
700
|
-
const
|
|
701
|
-
...
|
|
702
|
-
cancelRefetch: (
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
823
|
+
refetchQueries(filters = {}, options) {
|
|
824
|
+
const fetchOptions = {
|
|
825
|
+
...options,
|
|
826
|
+
cancelRefetch: (options == null ? void 0 : options.cancelRefetch) ?? true
|
|
827
|
+
};
|
|
828
|
+
const promises = notifyManager.batch(
|
|
829
|
+
() => __privateGet(this, _queryCache).findAll(filters).filter((query) => !query.isDisabled()).map((query) => {
|
|
830
|
+
let promise = query.fetch(void 0, fetchOptions);
|
|
831
|
+
if (!fetchOptions.throwOnError) {
|
|
832
|
+
promise = promise.catch(noop);
|
|
833
|
+
}
|
|
834
|
+
return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
|
|
707
835
|
})
|
|
708
836
|
);
|
|
709
|
-
return Promise.all(
|
|
837
|
+
return Promise.all(promises).then(noop);
|
|
710
838
|
}
|
|
711
|
-
fetchQuery(
|
|
712
|
-
const
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
839
|
+
fetchQuery(options) {
|
|
840
|
+
const defaultedOptions = this.defaultQueryOptions(options);
|
|
841
|
+
if (defaultedOptions.retry === void 0) {
|
|
842
|
+
defaultedOptions.retry = false;
|
|
843
|
+
}
|
|
844
|
+
const query = __privateGet(this, _queryCache).build(this, defaultedOptions);
|
|
845
|
+
return query.isStaleByTime(
|
|
846
|
+
resolveStaleTime(defaultedOptions.staleTime, query)
|
|
847
|
+
) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);
|
|
718
848
|
}
|
|
719
|
-
prefetchQuery(
|
|
720
|
-
return this.fetchQuery(
|
|
849
|
+
prefetchQuery(options) {
|
|
850
|
+
return this.fetchQuery(options).then(noop).catch(noop);
|
|
721
851
|
}
|
|
722
|
-
fetchInfiniteQuery(
|
|
723
|
-
|
|
852
|
+
fetchInfiniteQuery(options) {
|
|
853
|
+
options.behavior = infiniteQueryBehavior(options.pages);
|
|
854
|
+
return this.fetchQuery(options);
|
|
724
855
|
}
|
|
725
|
-
prefetchInfiniteQuery(
|
|
726
|
-
return this.fetchInfiniteQuery(
|
|
856
|
+
prefetchInfiniteQuery(options) {
|
|
857
|
+
return this.fetchInfiniteQuery(options).then(noop).catch(noop);
|
|
727
858
|
}
|
|
728
859
|
resumePausedMutations() {
|
|
729
|
-
|
|
860
|
+
if (onlineManager.isOnline()) {
|
|
861
|
+
return __privateGet(this, _mutationCache).resumePausedMutations();
|
|
862
|
+
}
|
|
863
|
+
return Promise.resolve();
|
|
730
864
|
}
|
|
731
865
|
getQueryCache() {
|
|
732
|
-
return
|
|
866
|
+
return __privateGet(this, _queryCache);
|
|
733
867
|
}
|
|
734
868
|
getMutationCache() {
|
|
735
|
-
return
|
|
869
|
+
return __privateGet(this, _mutationCache);
|
|
736
870
|
}
|
|
737
871
|
getDefaultOptions() {
|
|
738
|
-
return
|
|
872
|
+
return __privateGet(this, _defaultOptions);
|
|
739
873
|
}
|
|
740
|
-
setDefaultOptions(
|
|
741
|
-
|
|
874
|
+
setDefaultOptions(options) {
|
|
875
|
+
__privateSet(this, _defaultOptions, options);
|
|
742
876
|
}
|
|
743
|
-
setQueryDefaults(
|
|
744
|
-
|
|
745
|
-
queryKey
|
|
746
|
-
defaultOptions:
|
|
877
|
+
setQueryDefaults(queryKey, options) {
|
|
878
|
+
__privateGet(this, _queryDefaults).set(hashKey(queryKey), {
|
|
879
|
+
queryKey,
|
|
880
|
+
defaultOptions: options
|
|
747
881
|
});
|
|
748
882
|
}
|
|
749
|
-
getQueryDefaults(
|
|
750
|
-
const
|
|
751
|
-
let
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
883
|
+
getQueryDefaults(queryKey) {
|
|
884
|
+
const defaults = [...__privateGet(this, _queryDefaults).values()];
|
|
885
|
+
let result = {};
|
|
886
|
+
defaults.forEach((queryDefault) => {
|
|
887
|
+
if (partialMatchKey(queryKey, queryDefault.queryKey)) {
|
|
888
|
+
result = { ...result, ...queryDefault.defaultOptions };
|
|
889
|
+
}
|
|
890
|
+
});
|
|
891
|
+
return result;
|
|
892
|
+
}
|
|
893
|
+
setMutationDefaults(mutationKey, options) {
|
|
894
|
+
__privateGet(this, _mutationDefaults).set(hashKey(mutationKey), {
|
|
895
|
+
mutationKey,
|
|
896
|
+
defaultOptions: options
|
|
760
897
|
});
|
|
761
898
|
}
|
|
762
|
-
getMutationDefaults(
|
|
763
|
-
const
|
|
764
|
-
let
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
899
|
+
getMutationDefaults(mutationKey) {
|
|
900
|
+
const defaults = [...__privateGet(this, _mutationDefaults).values()];
|
|
901
|
+
let result = {};
|
|
902
|
+
defaults.forEach((queryDefault) => {
|
|
903
|
+
if (partialMatchKey(mutationKey, queryDefault.mutationKey)) {
|
|
904
|
+
result = { ...result, ...queryDefault.defaultOptions };
|
|
905
|
+
}
|
|
906
|
+
});
|
|
907
|
+
return result;
|
|
908
|
+
}
|
|
909
|
+
defaultQueryOptions(options) {
|
|
910
|
+
if (options._defaulted) {
|
|
911
|
+
return options;
|
|
912
|
+
}
|
|
913
|
+
const defaultedOptions = {
|
|
914
|
+
...__privateGet(this, _defaultOptions).queries,
|
|
915
|
+
...this.getQueryDefaults(options.queryKey),
|
|
916
|
+
...options,
|
|
917
|
+
_defaulted: true
|
|
777
918
|
};
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
919
|
+
if (!defaultedOptions.queryHash) {
|
|
920
|
+
defaultedOptions.queryHash = hashQueryKeyByOptions(
|
|
921
|
+
defaultedOptions.queryKey,
|
|
922
|
+
defaultedOptions
|
|
923
|
+
);
|
|
924
|
+
}
|
|
925
|
+
if (defaultedOptions.refetchOnReconnect === void 0) {
|
|
926
|
+
defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always";
|
|
927
|
+
}
|
|
928
|
+
if (defaultedOptions.throwOnError === void 0) {
|
|
929
|
+
defaultedOptions.throwOnError = !!defaultedOptions.suspense;
|
|
930
|
+
}
|
|
931
|
+
if (!defaultedOptions.networkMode && defaultedOptions.persister) {
|
|
932
|
+
defaultedOptions.networkMode = "offlineFirst";
|
|
933
|
+
}
|
|
934
|
+
if (defaultedOptions.enabled !== true && defaultedOptions.queryFn === skipToken) {
|
|
935
|
+
defaultedOptions.enabled = false;
|
|
936
|
+
}
|
|
937
|
+
return defaultedOptions;
|
|
938
|
+
}
|
|
939
|
+
defaultMutationOptions(options) {
|
|
940
|
+
if (options == null ? void 0 : options._defaulted) {
|
|
941
|
+
return options;
|
|
942
|
+
}
|
|
943
|
+
return {
|
|
944
|
+
...__privateGet(this, _defaultOptions).mutations,
|
|
945
|
+
...(options == null ? void 0 : options.mutationKey) && this.getMutationDefaults(options.mutationKey),
|
|
946
|
+
...options,
|
|
947
|
+
_defaulted: true
|
|
789
948
|
};
|
|
790
949
|
}
|
|
791
950
|
clear() {
|
|
792
|
-
|
|
951
|
+
__privateGet(this, _queryCache).clear();
|
|
952
|
+
__privateGet(this, _mutationCache).clear();
|
|
793
953
|
}
|
|
794
|
-
},
|
|
795
|
-
const
|
|
796
|
-
|
|
954
|
+
}, _queryCache = new WeakMap(), _mutationCache = new WeakMap(), _defaultOptions = new WeakMap(), _queryDefaults = new WeakMap(), _mutationDefaults = new WeakMap(), _mountCount = new WeakMap(), _unsubscribeFocus = new WeakMap(), _unsubscribeOnline = new WeakMap(), _c);
|
|
955
|
+
const ErrorBoundaryContext = createContext(null);
|
|
956
|
+
const initialState = {
|
|
957
|
+
didCatch: false,
|
|
797
958
|
error: null
|
|
798
959
|
};
|
|
799
|
-
class
|
|
800
|
-
constructor(
|
|
801
|
-
super(
|
|
960
|
+
class ErrorBoundary extends Component {
|
|
961
|
+
constructor(props) {
|
|
962
|
+
super(props);
|
|
963
|
+
this.resetErrorBoundary = this.resetErrorBoundary.bind(this);
|
|
964
|
+
this.state = initialState;
|
|
802
965
|
}
|
|
803
|
-
static getDerivedStateFromError(
|
|
966
|
+
static getDerivedStateFromError(error) {
|
|
804
967
|
return {
|
|
805
|
-
didCatch:
|
|
806
|
-
error
|
|
968
|
+
didCatch: true,
|
|
969
|
+
error
|
|
807
970
|
};
|
|
808
971
|
}
|
|
809
972
|
resetErrorBoundary() {
|
|
810
973
|
const {
|
|
811
|
-
error
|
|
974
|
+
error
|
|
812
975
|
} = this.state;
|
|
813
|
-
if (
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
976
|
+
if (error !== null) {
|
|
977
|
+
var _this$props$onReset, _this$props;
|
|
978
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
979
|
+
args[_key] = arguments[_key];
|
|
980
|
+
}
|
|
981
|
+
(_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {
|
|
982
|
+
args,
|
|
818
983
|
reason: "imperative-api"
|
|
819
|
-
})
|
|
984
|
+
});
|
|
985
|
+
this.setState(initialState);
|
|
820
986
|
}
|
|
821
987
|
}
|
|
822
|
-
componentDidCatch(
|
|
823
|
-
var
|
|
824
|
-
(
|
|
988
|
+
componentDidCatch(error, info) {
|
|
989
|
+
var _this$props$onError, _this$props2;
|
|
990
|
+
(_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error, info);
|
|
825
991
|
}
|
|
826
|
-
componentDidUpdate(
|
|
992
|
+
componentDidUpdate(prevProps, prevState) {
|
|
827
993
|
const {
|
|
828
|
-
didCatch
|
|
829
|
-
} = this.state
|
|
830
|
-
|
|
994
|
+
didCatch
|
|
995
|
+
} = this.state;
|
|
996
|
+
const {
|
|
997
|
+
resetKeys
|
|
831
998
|
} = this.props;
|
|
832
|
-
if (
|
|
833
|
-
var
|
|
834
|
-
(
|
|
835
|
-
next:
|
|
836
|
-
prev:
|
|
999
|
+
if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {
|
|
1000
|
+
var _this$props$onReset2, _this$props3;
|
|
1001
|
+
(_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {
|
|
1002
|
+
next: resetKeys,
|
|
1003
|
+
prev: prevProps.resetKeys,
|
|
837
1004
|
reason: "keys"
|
|
838
|
-
})
|
|
1005
|
+
});
|
|
1006
|
+
this.setState(initialState);
|
|
839
1007
|
}
|
|
840
1008
|
}
|
|
841
1009
|
render() {
|
|
842
1010
|
const {
|
|
843
|
-
children
|
|
844
|
-
fallbackRender
|
|
845
|
-
FallbackComponent
|
|
846
|
-
fallback
|
|
847
|
-
} = this.props
|
|
848
|
-
|
|
849
|
-
|
|
1011
|
+
children,
|
|
1012
|
+
fallbackRender,
|
|
1013
|
+
FallbackComponent,
|
|
1014
|
+
fallback
|
|
1015
|
+
} = this.props;
|
|
1016
|
+
const {
|
|
1017
|
+
didCatch,
|
|
1018
|
+
error
|
|
850
1019
|
} = this.state;
|
|
851
|
-
let
|
|
852
|
-
if (
|
|
853
|
-
const
|
|
854
|
-
error
|
|
1020
|
+
let childToRender = children;
|
|
1021
|
+
if (didCatch) {
|
|
1022
|
+
const props = {
|
|
1023
|
+
error,
|
|
855
1024
|
resetErrorBoundary: this.resetErrorBoundary
|
|
856
1025
|
};
|
|
857
|
-
if (typeof
|
|
858
|
-
|
|
859
|
-
else if (
|
|
860
|
-
|
|
861
|
-
else if (
|
|
862
|
-
|
|
863
|
-
else
|
|
864
|
-
throw
|
|
1026
|
+
if (typeof fallbackRender === "function") {
|
|
1027
|
+
childToRender = fallbackRender(props);
|
|
1028
|
+
} else if (FallbackComponent) {
|
|
1029
|
+
childToRender = createElement(FallbackComponent, props);
|
|
1030
|
+
} else if (fallback === null || isValidElement(fallback)) {
|
|
1031
|
+
childToRender = fallback;
|
|
1032
|
+
} else {
|
|
1033
|
+
throw error;
|
|
1034
|
+
}
|
|
865
1035
|
}
|
|
866
|
-
return
|
|
1036
|
+
return createElement(ErrorBoundaryContext.Provider, {
|
|
867
1037
|
value: {
|
|
868
|
-
didCatch
|
|
869
|
-
error
|
|
1038
|
+
didCatch,
|
|
1039
|
+
error,
|
|
870
1040
|
resetErrorBoundary: this.resetErrorBoundary
|
|
871
1041
|
}
|
|
872
|
-
},
|
|
1042
|
+
}, childToRender);
|
|
873
1043
|
}
|
|
874
1044
|
}
|
|
875
|
-
function
|
|
876
|
-
let
|
|
877
|
-
|
|
1045
|
+
function hasArrayChanged() {
|
|
1046
|
+
let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
1047
|
+
let b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
1048
|
+
return a.length !== b.length || a.some((item, index) => !Object.is(item, b[index]));
|
|
878
1049
|
}
|
|
879
|
-
const
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
1050
|
+
const isNavigationPlugin = (obj) => "getRoutes" in obj && typeof obj.getRoutes === "function";
|
|
1051
|
+
const needsInitialization = (obj) => "initialize" in obj && typeof obj.initialize === "function";
|
|
1052
|
+
const hasHead = (obj) => "getHead" in obj && typeof obj.getHead === "function";
|
|
1053
|
+
const isApiIdentityPlugin = (obj) => "getIdentities" in obj && typeof obj.getIdentities === "function";
|
|
1054
|
+
const queryClient = new QueryClient();
|
|
1055
|
+
class DevPortalContext {
|
|
1056
|
+
constructor(config) {
|
|
1057
|
+
__publicField(this, "plugins", []);
|
|
1058
|
+
__publicField(this, "navigation");
|
|
1059
|
+
__publicField(this, "meta");
|
|
1060
|
+
__publicField(this, "page");
|
|
1061
|
+
__publicField(this, "authentication");
|
|
1062
|
+
__publicField(this, "navigationPlugins");
|
|
1063
|
+
__publicField(this, "initialize", async () => {
|
|
889
1064
|
await Promise.all([
|
|
890
|
-
this.plugins.filter(
|
|
891
|
-
var
|
|
892
|
-
return (
|
|
1065
|
+
this.plugins.filter(needsInitialization).map((plugin) => {
|
|
1066
|
+
var _a2;
|
|
1067
|
+
return (_a2 = plugin.initialize) == null ? void 0 : _a2.call(plugin, this);
|
|
893
1068
|
})
|
|
894
1069
|
]);
|
|
895
1070
|
});
|
|
896
|
-
|
|
897
|
-
await
|
|
1071
|
+
__publicField(this, "invalidateCache", async (key) => {
|
|
1072
|
+
await queryClient.invalidateQueries({ queryKey: key });
|
|
898
1073
|
});
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
1074
|
+
__publicField(this, "getApiIdentities", async () => {
|
|
1075
|
+
const keys = await Promise.all(
|
|
1076
|
+
this.plugins.filter(isApiIdentityPlugin).map((plugin) => plugin.getIdentities(this))
|
|
1077
|
+
);
|
|
1078
|
+
return keys.flat();
|
|
1079
|
+
});
|
|
1080
|
+
__publicField(this, "getNavigation", async (path) => {
|
|
1081
|
+
const navigations = await Promise.all(
|
|
1082
|
+
this.navigationPlugins.map(
|
|
1083
|
+
async (plugin) => {
|
|
1084
|
+
var _a2;
|
|
1085
|
+
return (_a2 = plugin.getNavigation) == null ? void 0 : _a2.call(plugin, path);
|
|
1086
|
+
}
|
|
1087
|
+
)
|
|
1088
|
+
);
|
|
1089
|
+
return navigations.flatMap((nav) => nav ?? []);
|
|
1090
|
+
});
|
|
1091
|
+
__publicField(this, "signRequest", async (request) => {
|
|
1092
|
+
if (!this.authentication) {
|
|
912
1093
|
throw new Error("No authentication provider configured");
|
|
913
|
-
|
|
914
|
-
|
|
1094
|
+
}
|
|
1095
|
+
const accessToken = await this.authentication.getAccessToken();
|
|
1096
|
+
request.headers.set("Authorization", `Bearer ${accessToken}`);
|
|
1097
|
+
return request;
|
|
915
1098
|
});
|
|
916
|
-
this.plugins =
|
|
1099
|
+
this.plugins = config.plugins ?? [];
|
|
1100
|
+
this.navigation = config.navigation;
|
|
1101
|
+
this.navigationPlugins = this.plugins.filter(isNavigationPlugin);
|
|
1102
|
+
this.authentication = config.authentication;
|
|
1103
|
+
this.meta = config.metadata;
|
|
1104
|
+
this.page = config.page;
|
|
917
1105
|
}
|
|
918
1106
|
}
|
|
919
|
-
function
|
|
920
|
-
return /* @__PURE__ */
|
|
1107
|
+
function TopLevelError({ error, resetErrorBoundary }) {
|
|
1108
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorAlert, { error });
|
|
921
1109
|
}
|
|
922
|
-
const
|
|
923
|
-
const { navigation
|
|
924
|
-
|
|
925
|
-
|
|
1110
|
+
const TopNavigation = () => {
|
|
1111
|
+
const { navigation } = useDevPortal();
|
|
1112
|
+
if (navigation.length <= 1) {
|
|
1113
|
+
return null;
|
|
1114
|
+
}
|
|
1115
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("nav", { className: "border-b border-border text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "flex flex-row items-center gap-8", children: navigation.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1116
|
+
NavLink,
|
|
926
1117
|
{
|
|
927
|
-
className: ({ isActive
|
|
1118
|
+
className: ({ isActive }) => cx(
|
|
928
1119
|
"block py-3.5 font-medium -mb-px border-b-2",
|
|
929
|
-
|
|
1120
|
+
isActive ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
930
1121
|
),
|
|
931
|
-
to:
|
|
932
|
-
children:
|
|
1122
|
+
to: item.path,
|
|
1123
|
+
children: item.label
|
|
933
1124
|
}
|
|
934
|
-
) },
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
1125
|
+
) }, item.label)) }) });
|
|
1126
|
+
};
|
|
1127
|
+
const Header = memo(function HeaderInner() {
|
|
1128
|
+
const [isDark, toggleTheme] = useTheme();
|
|
1129
|
+
const { isAuthenticated, profile, isAuthEnabled, login, logout } = useAuth();
|
|
1130
|
+
const { page } = useDevPortal();
|
|
1131
|
+
const ThemeIcon = isDark ? MoonStar : Sun;
|
|
1132
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("header", { className: "fixed top-0 w-full z-10 bg-background/80 backdrop-blur", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
1133
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b border-border px-12 h-[--top-header-height]", children: [
|
|
1134
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
1135
|
+
(page == null ? void 0 : page.logo) && /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: page.logo, alt: page.pageTitle, className: "h-10" }),
|
|
1136
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: page == null ? void 0 : page.pageTitle })
|
|
942
1137
|
] }),
|
|
943
|
-
/* @__PURE__ */
|
|
944
|
-
/* @__PURE__ */
|
|
945
|
-
/* @__PURE__ */
|
|
946
|
-
|
|
1138
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
1139
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full max-w-prose" }),
|
|
1140
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "items-center justify-self-end text-sm hidden lg:flex", children: [
|
|
1141
|
+
isAuthEnabled && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: isAuthenticated ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
947
1142
|
"button",
|
|
948
1143
|
{
|
|
949
1144
|
type: "button",
|
|
950
1145
|
className: "cursor-pointer hover:bg-secondary p-1 px-2 mx-2 rounded text-nowrap",
|
|
951
|
-
onClick:
|
|
1146
|
+
onClick: logout,
|
|
952
1147
|
children: [
|
|
953
1148
|
"Logout ",
|
|
954
|
-
|
|
1149
|
+
(profile == null ? void 0 : profile.email) ? `(${profile.email})` : null
|
|
955
1150
|
]
|
|
956
1151
|
}
|
|
957
|
-
) : /* @__PURE__ */
|
|
1152
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
958
1153
|
"button",
|
|
959
1154
|
{
|
|
960
1155
|
type: "button",
|
|
961
1156
|
className: "cursor-pointer hover:bg-secondary p-1 px-2 mx-2 rounded",
|
|
962
|
-
onClick:
|
|
1157
|
+
onClick: login,
|
|
963
1158
|
children: "Login"
|
|
964
1159
|
}
|
|
965
1160
|
) }),
|
|
966
|
-
/* @__PURE__ */
|
|
1161
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
967
1162
|
"button",
|
|
968
1163
|
{
|
|
969
1164
|
type: "button",
|
|
970
|
-
"aria-label":
|
|
1165
|
+
"aria-label": isDark ? "Switch to light mode" : "Switch to dark mode",
|
|
971
1166
|
className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
|
|
972
|
-
onClick:
|
|
973
|
-
children: /* @__PURE__ */
|
|
1167
|
+
onClick: toggleTheme,
|
|
1168
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeIcon, { size: 18 })
|
|
974
1169
|
}
|
|
975
1170
|
)
|
|
976
1171
|
] })
|
|
977
1172
|
] })
|
|
978
1173
|
] }),
|
|
979
|
-
/* @__PURE__ */
|
|
1174
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TopNavigation, {})
|
|
980
1175
|
] }) });
|
|
981
|
-
})
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1176
|
+
});
|
|
1177
|
+
const DEFAULT_COMPONENTS = {
|
|
1178
|
+
Header
|
|
1179
|
+
};
|
|
1180
|
+
const ComponentsContext = createContext(DEFAULT_COMPONENTS);
|
|
1181
|
+
const ComponentsProvider = ComponentsContext.Provider;
|
|
1182
|
+
const DevPortalInner = ({
|
|
1183
|
+
children,
|
|
1184
|
+
...props
|
|
986
1185
|
}) => {
|
|
987
|
-
var
|
|
988
|
-
const
|
|
989
|
-
() => ({ ...
|
|
990
|
-
[
|
|
991
|
-
)
|
|
1186
|
+
var _a2, _b2;
|
|
1187
|
+
const components = useMemo(
|
|
1188
|
+
() => ({ ...DEFAULT_COMPONENTS, ...props.overrides }),
|
|
1189
|
+
[props.overrides]
|
|
1190
|
+
);
|
|
1191
|
+
const mdxComponents = useMemo(
|
|
992
1192
|
() => {
|
|
993
|
-
var
|
|
994
|
-
return { ...
|
|
1193
|
+
var _a3;
|
|
1194
|
+
return { ...MdxComponents, ...(_a3 = props.mdx) == null ? void 0 : _a3.components };
|
|
995
1195
|
},
|
|
996
|
-
[(
|
|
997
|
-
)
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1196
|
+
[(_a2 = props.mdx) == null ? void 0 : _a2.components]
|
|
1197
|
+
);
|
|
1198
|
+
const devPortalContext = useMemo(() => new DevPortalContext(props), [props]);
|
|
1199
|
+
useEffect(() => {
|
|
1200
|
+
void devPortalContext.initialize();
|
|
1201
|
+
}, [devPortalContext]);
|
|
1202
|
+
const heads = (_b2 = props.plugins) == null ? void 0 : _b2.filter(hasHead).map((plugin, i) => {
|
|
1203
|
+
var _a3;
|
|
1204
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Fragment, { children: (_a3 = plugin.getHead) == null ? void 0 : _a3.call(plugin) }, i);
|
|
1004
1205
|
});
|
|
1005
|
-
return /* @__PURE__ */
|
|
1006
|
-
/* @__PURE__ */
|
|
1007
|
-
/* @__PURE__ */
|
|
1206
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(QueryClientProvider, { client: queryClient, children: [
|
|
1207
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Helmet, { children: heads }),
|
|
1208
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DevPortalProvider, { value: devPortalContext, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MDXProvider, { components: mdxComponents, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ComponentsProvider, { value: components, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ViewportAnchorProvider, { children }) }) }) }) })
|
|
1008
1209
|
] });
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
const
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1210
|
+
};
|
|
1211
|
+
const Inner = memo(DevPortalInner);
|
|
1212
|
+
const DevPortal$1 = (props) => {
|
|
1213
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { FallbackComponent: TopLevelError, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Inner, { ...props }) });
|
|
1214
|
+
};
|
|
1215
|
+
DevPortal$1.displayName = "DevPortal";
|
|
1216
|
+
const useScrollToAnchor = () => {
|
|
1217
|
+
const location = useLocation();
|
|
1218
|
+
const { setActiveAnchor } = useViewportAnchor();
|
|
1219
|
+
useEffect(() => {
|
|
1220
|
+
if (!location.hash) return;
|
|
1221
|
+
const hash = location.hash.split("/")[0].slice(1);
|
|
1222
|
+
const element = document.getElementById(decodeURIComponent(hash));
|
|
1223
|
+
if (element) {
|
|
1017
1224
|
requestAnimationFrame(() => {
|
|
1018
|
-
|
|
1225
|
+
element.scrollIntoView();
|
|
1226
|
+
requestIdleCallback(() => setActiveAnchor(hash));
|
|
1019
1227
|
});
|
|
1020
1228
|
return;
|
|
1021
1229
|
}
|
|
1022
|
-
const
|
|
1023
|
-
const
|
|
1024
|
-
|
|
1230
|
+
const observer = new MutationObserver((_mutations2, obs) => {
|
|
1231
|
+
const element2 = document.getElementById(decodeURIComponent(hash));
|
|
1232
|
+
if (!element2) return;
|
|
1233
|
+
element2.scrollIntoView();
|
|
1234
|
+
requestIdleCallback(() => setActiveAnchor(hash));
|
|
1235
|
+
obs.disconnect();
|
|
1025
1236
|
});
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
},
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1237
|
+
observer.observe(document.body, { childList: true, subtree: true });
|
|
1238
|
+
return () => observer.disconnect();
|
|
1239
|
+
}, [location.hash, setActiveAnchor]);
|
|
1240
|
+
};
|
|
1241
|
+
const useScrollToTop = () => {
|
|
1242
|
+
const location = useLocation();
|
|
1243
|
+
const previousPath = useRef(location.pathname);
|
|
1244
|
+
useEffect(() => {
|
|
1245
|
+
if (previousPath.current === location.pathname) return;
|
|
1246
|
+
window.scrollTo(0, 0);
|
|
1247
|
+
previousPath.current = location.pathname;
|
|
1248
|
+
}, [location.pathname]);
|
|
1249
|
+
};
|
|
1250
|
+
const useNavigationCollapsibleState = ({
|
|
1251
|
+
item,
|
|
1252
|
+
defaultOpen,
|
|
1253
|
+
path
|
|
1037
1254
|
}) => {
|
|
1038
|
-
const [
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1255
|
+
const [isOpen, setIsOpen] = useState(defaultOpen);
|
|
1256
|
+
const location = useLocation();
|
|
1257
|
+
const previousLocationPath = useRef(location.pathname);
|
|
1258
|
+
useEffect(() => {
|
|
1259
|
+
if (!isOpen && previousLocationPath.current !== location.pathname) {
|
|
1260
|
+
setIsOpen(checkHasActiveItem(item, location.pathname, path));
|
|
1261
|
+
}
|
|
1262
|
+
previousLocationPath.current = location.pathname;
|
|
1263
|
+
}, [isOpen, item, path, location.pathname]);
|
|
1264
|
+
return [isOpen, setIsOpen];
|
|
1265
|
+
};
|
|
1266
|
+
const navigationListItem = cva(
|
|
1043
1267
|
"flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
1044
1268
|
{
|
|
1045
1269
|
variants: {
|
|
@@ -1053,126 +1277,135 @@ const xr = () => {
|
|
|
1053
1277
|
}
|
|
1054
1278
|
}
|
|
1055
1279
|
}
|
|
1056
|
-
)
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1280
|
+
);
|
|
1281
|
+
const DATA_ANCHOR_ATTR = "data-anchor";
|
|
1282
|
+
const SideNavigationItem = ({
|
|
1283
|
+
category,
|
|
1284
|
+
item,
|
|
1285
|
+
activeAnchor,
|
|
1286
|
+
currentTopNavItem,
|
|
1287
|
+
basePath = ""
|
|
1062
1288
|
}) => {
|
|
1063
|
-
const
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1289
|
+
const currentPath = isPathItem(item) ? joinPath(basePath, item.path) : "";
|
|
1290
|
+
const location = useLocation();
|
|
1291
|
+
const [isOpen, setIsOpen] = useNavigationCollapsibleState({
|
|
1292
|
+
item,
|
|
1293
|
+
path: currentPath,
|
|
1294
|
+
defaultOpen: () => checkHasActiveItem(item, location.pathname, currentPath)
|
|
1067
1295
|
});
|
|
1068
|
-
if (
|
|
1069
|
-
const
|
|
1296
|
+
if (isLinkItem(item)) {
|
|
1297
|
+
const classes = cn(
|
|
1070
1298
|
"flex items-center gap-2",
|
|
1071
|
-
|
|
1072
|
-
isActive:
|
|
1299
|
+
navigationListItem({
|
|
1300
|
+
isActive: item.href === location.pathname
|
|
1073
1301
|
})
|
|
1074
1302
|
);
|
|
1075
|
-
return
|
|
1303
|
+
return item.href.startsWith("http") ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1076
1304
|
"a",
|
|
1077
1305
|
{
|
|
1078
|
-
className:
|
|
1079
|
-
href:
|
|
1306
|
+
className: classes,
|
|
1307
|
+
href: item.href,
|
|
1080
1308
|
target: "_blank",
|
|
1081
1309
|
rel: "noopener noreferrer",
|
|
1082
1310
|
children: [
|
|
1083
|
-
|
|
1084
|
-
/* @__PURE__ */
|
|
1311
|
+
item.label,
|
|
1312
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { size: 14 })
|
|
1085
1313
|
]
|
|
1086
1314
|
}
|
|
1087
|
-
) : /* @__PURE__ */
|
|
1315
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(NavLink, { className: classes, to: item.href, children: item.label });
|
|
1088
1316
|
}
|
|
1089
|
-
const
|
|
1090
|
-
/* @__PURE__ */
|
|
1091
|
-
|
|
1092
|
-
typeof
|
|
1317
|
+
const linkContent = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between w-full", children: [
|
|
1318
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 truncate w-full", children: [
|
|
1319
|
+
item.icon,
|
|
1320
|
+
typeof item.label !== "string" ? item.label : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: item.label })
|
|
1093
1321
|
] }),
|
|
1094
|
-
|
|
1095
|
-
|
|
1322
|
+
item.children && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1323
|
+
ChevronRight,
|
|
1096
1324
|
{
|
|
1097
1325
|
size: 16,
|
|
1098
1326
|
className: "transition shrink-0 group-data-[state=open]:rotate-90"
|
|
1099
1327
|
}
|
|
1100
1328
|
)
|
|
1101
1329
|
] });
|
|
1102
|
-
return /* @__PURE__ */
|
|
1103
|
-
|
|
1330
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("li", { title: typeof item.label === "string" ? item.label : item.title, children: item.children ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1331
|
+
Root,
|
|
1104
1332
|
{
|
|
1105
|
-
open:
|
|
1106
|
-
onOpenChange: () =>
|
|
1333
|
+
open: isOpen,
|
|
1334
|
+
onOpenChange: () => setIsOpen((prev) => !prev),
|
|
1107
1335
|
className: "flex flex-col",
|
|
1108
1336
|
children: [
|
|
1109
|
-
/* @__PURE__ */
|
|
1110
|
-
|
|
1337
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1338
|
+
Trigger,
|
|
1111
1339
|
{
|
|
1112
|
-
className:
|
|
1340
|
+
className: cn(
|
|
1113
1341
|
"group text-start",
|
|
1114
|
-
|
|
1342
|
+
navigationListItem({ isActive: false })
|
|
1115
1343
|
),
|
|
1116
|
-
children:
|
|
1344
|
+
children: linkContent
|
|
1117
1345
|
}
|
|
1118
1346
|
),
|
|
1119
|
-
/* @__PURE__ */
|
|
1120
|
-
|
|
1347
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Content, { className: "CollapsibleContent ms-[calc(var(--padding-nav-item)*1.125)]", children: /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "mt-1 border-border border-l ps-1.5", children: item.children.map((child) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1348
|
+
SideNavigationItem,
|
|
1121
1349
|
{
|
|
1122
|
-
category
|
|
1123
|
-
item:
|
|
1124
|
-
activeAnchor
|
|
1125
|
-
currentTopNavItem
|
|
1126
|
-
basePath:
|
|
1350
|
+
category,
|
|
1351
|
+
item: child,
|
|
1352
|
+
activeAnchor,
|
|
1353
|
+
currentTopNavItem,
|
|
1354
|
+
basePath: currentPath
|
|
1127
1355
|
},
|
|
1128
|
-
|
|
1356
|
+
isPathItem(child) ? child.path : child.href
|
|
1129
1357
|
)) }) })
|
|
1130
1358
|
]
|
|
1131
1359
|
}
|
|
1132
|
-
) :
|
|
1133
|
-
|
|
1360
|
+
) : item.path.startsWith("#") ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1361
|
+
AnchorLink,
|
|
1134
1362
|
{
|
|
1135
|
-
to:
|
|
1136
|
-
[
|
|
1137
|
-
className:
|
|
1138
|
-
isActive:
|
|
1139
|
-
isMuted:
|
|
1363
|
+
to: item.path,
|
|
1364
|
+
...{ [DATA_ANCHOR_ATTR]: item.path },
|
|
1365
|
+
className: navigationListItem({
|
|
1366
|
+
isActive: item.path.slice(1) === activeAnchor,
|
|
1367
|
+
isMuted: item.muted
|
|
1140
1368
|
}),
|
|
1141
|
-
children:
|
|
1369
|
+
children: linkContent
|
|
1142
1370
|
}
|
|
1143
|
-
) : /* @__PURE__ */
|
|
1144
|
-
|
|
1371
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1372
|
+
NavLink,
|
|
1145
1373
|
{
|
|
1146
|
-
className: ({ isActive
|
|
1147
|
-
to:
|
|
1148
|
-
children:
|
|
1374
|
+
className: ({ isActive }) => navigationListItem({ isActive }),
|
|
1375
|
+
to: currentPath,
|
|
1376
|
+
children: linkContent
|
|
1149
1377
|
}
|
|
1150
1378
|
) });
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1379
|
+
};
|
|
1380
|
+
const SideNavigationCategory = ({
|
|
1381
|
+
category
|
|
1153
1382
|
}) => {
|
|
1154
|
-
const { activeAnchor
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1383
|
+
const { activeAnchor } = useViewportAnchor();
|
|
1384
|
+
const navItem = useTopNavigationItem();
|
|
1385
|
+
const location = useLocation();
|
|
1386
|
+
const isCollapsible = category.collapsible ?? true;
|
|
1387
|
+
const [isOpen, setIsOpen] = useNavigationCollapsibleState({
|
|
1388
|
+
item: category,
|
|
1389
|
+
path: (navItem == null ? void 0 : navItem.path) ?? "",
|
|
1390
|
+
defaultOpen: () => !isCollapsible || category.expanded || checkHasActiveItem(category, location.pathname, (navItem == null ? void 0 : navItem.path) ?? "")
|
|
1158
1391
|
});
|
|
1159
|
-
return /* @__PURE__ */
|
|
1160
|
-
|
|
1392
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1393
|
+
Root,
|
|
1161
1394
|
{
|
|
1162
|
-
open:
|
|
1163
|
-
onOpenChange: () =>
|
|
1395
|
+
open: isOpen,
|
|
1396
|
+
onOpenChange: () => setIsOpen((prev) => !prev),
|
|
1164
1397
|
children: [
|
|
1165
|
-
|
|
1398
|
+
category.label.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(Trigger, { asChild: isCollapsible, disabled: !isCollapsible, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1166
1399
|
"h5",
|
|
1167
1400
|
{
|
|
1168
|
-
className:
|
|
1401
|
+
className: cn(
|
|
1169
1402
|
"flex group items-center justify-between cursor-pointer font-semibold text-foreground/90 px-[--padding-nav-item] py-1.5 rounded-lg transition-colors duration-300 -mx-[--padding-nav-item]",
|
|
1170
|
-
|
|
1403
|
+
isCollapsible ? "hover:bg-accent" : "cursor-auto"
|
|
1171
1404
|
),
|
|
1172
1405
|
children: [
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1406
|
+
category.label,
|
|
1407
|
+
isCollapsible && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1408
|
+
ChevronRight,
|
|
1176
1409
|
{
|
|
1177
1410
|
className: "group-data-[state=open]:rotate-90 transition",
|
|
1178
1411
|
size: 16
|
|
@@ -1181,88 +1414,108 @@ const xr = () => {
|
|
|
1181
1414
|
]
|
|
1182
1415
|
}
|
|
1183
1416
|
) }) : "Endpoints",
|
|
1184
|
-
/* @__PURE__ */
|
|
1185
|
-
|
|
1417
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Content, { className: "CollapsibleContent -mx-[--padding-nav-item]", children: /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "space-y-0.5 mt-1.5 mb-4 ms-3", children: category.children.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1418
|
+
SideNavigationItem,
|
|
1186
1419
|
{
|
|
1187
|
-
category
|
|
1188
|
-
item
|
|
1189
|
-
activeAnchor
|
|
1190
|
-
currentTopNavItem:
|
|
1191
|
-
basePath:
|
|
1420
|
+
category,
|
|
1421
|
+
item,
|
|
1422
|
+
activeAnchor,
|
|
1423
|
+
currentTopNavItem: navItem,
|
|
1424
|
+
basePath: joinPath(navItem == null ? void 0 : navItem.path, category.path)
|
|
1192
1425
|
},
|
|
1193
|
-
|
|
1426
|
+
isPathItem(item) ? item.path + item.label : item.href
|
|
1194
1427
|
)) }) })
|
|
1195
1428
|
]
|
|
1196
1429
|
},
|
|
1197
|
-
|
|
1430
|
+
category.label
|
|
1198
1431
|
);
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1432
|
+
};
|
|
1433
|
+
const SideNavigationWrapper = forwardRef(function SideNavigation({ children, className, pushMainContent }, ref) {
|
|
1434
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1201
1435
|
"nav",
|
|
1202
1436
|
{
|
|
1203
|
-
"data-navigation": String(
|
|
1204
|
-
className:
|
|
1437
|
+
"data-navigation": String(pushMainContent),
|
|
1438
|
+
className: cn(
|
|
1205
1439
|
"peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 p-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 pt-[--padding-content-top] w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
|
|
1206
|
-
|
|
1440
|
+
className
|
|
1207
1441
|
),
|
|
1208
|
-
ref
|
|
1209
|
-
children
|
|
1442
|
+
ref,
|
|
1443
|
+
children
|
|
1210
1444
|
}
|
|
1211
1445
|
);
|
|
1212
|
-
})
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1446
|
+
});
|
|
1447
|
+
const SideNavigation2 = () => {
|
|
1448
|
+
const navRef = useRef(null);
|
|
1449
|
+
const navigation = useNavigation();
|
|
1450
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1451
|
+
SideNavigationWrapper,
|
|
1216
1452
|
{
|
|
1217
|
-
ref:
|
|
1218
|
-
pushMainContent:
|
|
1219
|
-
children:
|
|
1453
|
+
ref: navRef,
|
|
1454
|
+
pushMainContent: navigation.data.items.length > 0,
|
|
1455
|
+
children: navigation.data.items.map((category) => /* @__PURE__ */ jsxRuntimeExports.jsx(SideNavigationCategory, { category }, category.label))
|
|
1220
1456
|
}
|
|
1221
1457
|
);
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
const
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1458
|
+
};
|
|
1459
|
+
const Layout$1 = ({ children }) => {
|
|
1460
|
+
const location = useLocation();
|
|
1461
|
+
const { setActiveAnchor } = useViewportAnchor();
|
|
1462
|
+
const { meta } = useDevPortal();
|
|
1463
|
+
useScrollToAnchor();
|
|
1464
|
+
useScrollToTop();
|
|
1465
|
+
const previousLocationPath = useRef(location.pathname);
|
|
1466
|
+
useEffect(() => {
|
|
1467
|
+
if (location.pathname !== previousLocationPath.current) {
|
|
1468
|
+
setActiveAnchor("");
|
|
1469
|
+
}
|
|
1470
|
+
previousLocationPath.current = location.pathname;
|
|
1471
|
+
}, [location.pathname, setActiveAnchor]);
|
|
1472
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
1473
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Helmet, { titleTemplate: meta == null ? void 0 : meta.title, children: [
|
|
1474
|
+
(meta == null ? void 0 : meta.description) && /* @__PURE__ */ jsxRuntimeExports.jsx("meta", { name: "description", content: meta.description }),
|
|
1475
|
+
(meta == null ? void 0 : meta.favicon) && /* @__PURE__ */ jsxRuntimeExports.jsx("link", { rel: "icon", href: meta.favicon })
|
|
1232
1476
|
] }),
|
|
1233
|
-
/* @__PURE__ */
|
|
1234
|
-
/* @__PURE__ */
|
|
1235
|
-
|
|
1477
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Header, {}),
|
|
1478
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "max-w-screen-2xl mx-auto pt-[--header-height] px-10 lg:px-12 h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1479
|
+
Suspense,
|
|
1236
1480
|
{
|
|
1237
|
-
fallback: /* @__PURE__ */
|
|
1481
|
+
fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner, {}) }),
|
|
1238
1482
|
children: [
|
|
1239
|
-
/* @__PURE__ */
|
|
1240
|
-
/* @__PURE__ */
|
|
1483
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SideNavigation2, {}),
|
|
1484
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1241
1485
|
"main",
|
|
1242
1486
|
{
|
|
1243
|
-
className:
|
|
1487
|
+
className: cn(
|
|
1244
1488
|
"dark:border-white/10 translate-x-0 h-full",
|
|
1245
1489
|
"lg:overflow-visible",
|
|
1246
1490
|
"lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
|
|
1247
1491
|
"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
|
|
1248
1492
|
),
|
|
1249
|
-
children:
|
|
1493
|
+
children: children ?? /* @__PURE__ */ jsxRuntimeExports.jsx(Outlet, {})
|
|
1250
1494
|
}
|
|
1251
1495
|
)
|
|
1252
1496
|
]
|
|
1253
1497
|
}
|
|
1254
1498
|
) })
|
|
1255
1499
|
] });
|
|
1256
|
-
}
|
|
1500
|
+
};
|
|
1501
|
+
const useMDXComponents = useMDXComponents$1;
|
|
1502
|
+
const Callout = Callout$1;
|
|
1503
|
+
const DevPortal = DevPortal$1;
|
|
1504
|
+
const Layout = Layout$1;
|
|
1505
|
+
const Link = Link$1;
|
|
1506
|
+
const RouterError = RouterError$1;
|
|
1507
|
+
const ServerError = ServerError$1;
|
|
1508
|
+
const Bootstrap = Bootstrap$1;
|
|
1509
|
+
const BootstrapStatic = BootstrapStatic$1;
|
|
1257
1510
|
export {
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1511
|
+
Bootstrap,
|
|
1512
|
+
BootstrapStatic,
|
|
1513
|
+
Callout,
|
|
1514
|
+
DevPortal,
|
|
1515
|
+
Layout,
|
|
1516
|
+
Link,
|
|
1517
|
+
RouterError,
|
|
1518
|
+
ServerError,
|
|
1519
|
+
useMDXComponents
|
|
1267
1520
|
};
|
|
1268
1521
|
//# sourceMappingURL=zudoku.components.js.map
|