zudoku 0.32.1 → 0.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/tailwind.js +6 -0
- package/dist/app/tailwind.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +15 -15
- package/dist/config/validators/InputSidebarSchema.js +10 -1
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/common.d.ts +40 -40
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +19 -19
- package/dist/lib/components/Header.js +1 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Layout.js +1 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/TopNavigation.js +3 -2
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/SidebarBadge.d.ts +2 -0
- package/dist/lib/components/navigation/SidebarBadge.js +3 -1
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +1 -1
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +3 -1
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +2 -2
- package/dist/lib/plugins/api-catalog/Catalog.js +11 -24
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
- package/dist/lib/plugins/api-catalog/index.d.ts +1 -0
- package/dist/lib/plugins/api-catalog/index.js +37 -8
- package/dist/lib/plugins/api-catalog/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +2 -2
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +0 -11
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +1 -1
- package/dist/lib/ui/Command.d.ts +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +14 -0
- package/dist/lib/{components → ui}/SyntaxHighlight.js +9 -6
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -0
- package/dist/lib/ui/util.d.ts +2 -0
- package/dist/lib/ui/util.js +3 -0
- package/dist/lib/ui/util.js.map +1 -0
- package/dist/lib/util/MdxComponents.js +1 -1
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/vite/config.js +4 -1
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/plugin-api.js +2 -2
- package/dist/vite/plugin-api.js.map +1 -1
- package/lib/{AuthenticationPlugin-_YVa673u.js → AuthenticationPlugin-BlxA4Mbn.js} +4 -4
- package/lib/{AuthenticationPlugin-_YVa673u.js.map → AuthenticationPlugin-BlxA4Mbn.js.map} +1 -1
- package/lib/{CategoryHeading-MYL1u_6K.js → CategoryHeading-DpB47wvk.js} +3 -3
- package/lib/{CategoryHeading-MYL1u_6K.js.map → CategoryHeading-DpB47wvk.js.map} +1 -1
- package/lib/{Markdown-8mv9nhGd.js → Markdown-Cr9sYpR_.js} +4800 -4729
- package/lib/Markdown-Cr9sYpR_.js.map +1 -0
- package/lib/{MdxPage-GM1T5jmO.js → MdxPage-Dt-UEQl8.js} +10 -10
- package/lib/MdxPage-Dt-UEQl8.js.map +1 -0
- package/lib/{OasProvider-IS9wBrb7.js → OasProvider-WVtvHP5H.js} +6 -6
- package/lib/{OasProvider-IS9wBrb7.js.map → OasProvider-WVtvHP5H.js.map} +1 -1
- package/lib/{OperationList-BTmRbbXk.js → OperationList-DhOwupvv.js} +18 -19
- package/lib/{OperationList-BTmRbbXk.js.map → OperationList-DhOwupvv.js.map} +1 -1
- package/lib/Select-D9hI1G-y.js +223 -0
- package/lib/{Select-D9CKL33X.js.map → Select-D9hI1G-y.js.map} +1 -1
- package/lib/{SlotletProvider-D0mFmGJu.js → SlotletProvider-CEfNOA8i.js} +53 -53
- package/lib/{SlotletProvider-D0mFmGJu.js.map → SlotletProvider-CEfNOA8i.js.map} +1 -1
- package/lib/{Spinner-BlzrEEk1.js → Spinner-1KrEmx1V.js} +3 -3
- package/lib/{Spinner-BlzrEEk1.js.map → Spinner-1KrEmx1V.js.map} +1 -1
- package/lib/{SyntaxHighlight-B0L4SC_N.js → SyntaxHighlight-CcnUjERD.js} +445 -445
- package/lib/SyntaxHighlight-CcnUjERD.js.map +1 -0
- package/lib/{chunk-SYFQ2XB5-QijJrSf0.js → chunk-IR6S3I6Y-D_3UmFIn.js} +597 -597
- package/lib/chunk-IR6S3I6Y-D_3UmFIn.js.map +1 -0
- package/lib/{circular-DxaIIlWD.js → circular-v7K6lDDh.js} +1413 -1413
- package/lib/{circular-DxaIIlWD.js.map → circular-v7K6lDDh.js.map} +1 -1
- package/lib/context-DLCwaMXN.js +22 -0
- package/lib/{context-rwLGh-6_.js.map → context-DLCwaMXN.js.map} +1 -1
- package/lib/{createServer-DSQiPwjN.js → createServer-DMf6O2Rz.js} +3669 -3562
- package/lib/createServer-DMf6O2Rz.js.map +1 -0
- package/lib/{hook-C_t2ISLC.js → hook-CWwSAAlH.js} +384 -379
- package/lib/hook-CWwSAAlH.js.map +1 -0
- package/lib/index-Bn6Lc9tq.js +9 -0
- package/lib/index-Bn6Lc9tq.js.map +1 -0
- package/lib/index-CPNSgwSb.js +36 -0
- package/lib/{index-Djenk2Hj.js.map → index-CPNSgwSb.js.map} +1 -1
- package/lib/{index-BANyVRgL.js → index-Do_30Hpk.js} +78 -78
- package/lib/index-Do_30Hpk.js.map +1 -0
- package/lib/{index-B7mqiOei.js → index-Du5aNddU.js} +101 -101
- package/lib/index-Du5aNddU.js.map +1 -0
- package/lib/{index-CjJS0l4l.js → index-LNp6rxyU.js} +2 -2
- package/lib/{index-CjJS0l4l.js.map → index-LNp6rxyU.js.map} +1 -1
- package/lib/{index.esm-CrSoEshU.js → index.esm--gIChbWs.js} +3 -3
- package/lib/{index.esm-CrSoEshU.js.map → index.esm--gIChbWs.js.map} +1 -1
- package/lib/{index.esm-9-TF9KQB.js → index.esm-CQHE3GEU.js} +52 -53
- package/lib/{index.esm-9-TF9KQB.js.map → index.esm-CQHE3GEU.js.map} +1 -1
- package/lib/joinUrl-10po2Jdj.js +20 -0
- package/lib/{joinUrl-nLx9pD-Z.js.map → joinUrl-10po2Jdj.js.map} +1 -1
- package/lib/{jsx-runtime-Bdg6XQ1m.js → jsx-runtime-CYK1ROHF.js} +99 -99
- package/lib/{jsx-runtime-Bdg6XQ1m.js.map → jsx-runtime-CYK1ROHF.js.map} +1 -1
- package/lib/{mutation-Cm3O9f3X.js → mutation-B0wxqzSN.js} +26 -26
- package/lib/{mutation-Cm3O9f3X.js.map → mutation-B0wxqzSN.js.map} +1 -1
- package/lib/post-processors/removeExtensions.js +4 -4
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +2 -2
- package/lib/ui/Alert.js +2 -2
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +2 -2
- package/lib/ui/Breadcrumb.js +4 -4
- package/lib/ui/Button.js +2 -2
- package/lib/ui/Callout.js +4 -4
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Checkbox.js +2 -2
- package/lib/ui/Command.js +2 -2
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Drawer.js +521 -543
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/Form.js +5 -5
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Label.js +2 -2
- package/lib/ui/Pagination.js +10 -10
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/SyntaxHighlight.js +10 -0
- package/lib/ui/SyntaxHighlight.js.map +1 -0
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +2 -2
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/ui/util.js +6 -0
- package/lib/ui/util.js.map +1 -0
- package/lib/{useExposedProps-Bbf99zic.js → useExposedProps-RIvey2Oy.js} +2 -2
- package/lib/{useExposedProps-Bbf99zic.js.map → useExposedProps-RIvey2Oy.js.map} +1 -1
- package/lib/{useScrollToAnchor-BGEcH3HM.js → useScrollToAnchor-C-sRxs9o.js} +13 -9
- package/lib/useScrollToAnchor-C-sRxs9o.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +18 -18
- package/lib/zudoku.auth-openid.js +255 -295
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +305 -298
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.icons.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +91 -108
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +6 -6
- package/lib/zudoku.plugin-custom-pages.js +3 -3
- package/lib/zudoku.plugin-markdown.js +2 -2
- package/lib/zudoku.plugin-openapi.js +6 -6
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +9 -9
- package/package.json +49 -50
- package/src/app/tailwind.ts +6 -0
- package/src/lib/components/Header.tsx +1 -1
- package/src/lib/components/Layout.tsx +1 -1
- package/src/lib/components/TopNavigation.tsx +13 -9
- package/src/lib/components/index.ts +2 -0
- package/src/lib/components/navigation/SidebarBadge.tsx +4 -1
- package/src/lib/components/navigation/SidebarItem.tsx +1 -0
- package/src/lib/components/navigation/SidebarWrapper.tsx +1 -1
- package/src/lib/oas/graphql/index.ts +4 -1
- package/src/lib/plugins/api-catalog/Catalog.tsx +31 -94
- package/src/lib/plugins/api-catalog/index.tsx +54 -9
- package/src/lib/plugins/markdown/MdxPage.tsx +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -2
- package/src/lib/plugins/openapi/graphql/gql.ts +9 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +1 -1
- package/src/lib/{components → ui}/SyntaxHighlight.tsx +23 -8
- package/src/lib/ui/util.tsx +3 -0
- package/src/lib/util/MdxComponents.tsx +1 -1
- package/dist/lib/components/SyntaxHighlight.d.ts +0 -12
- package/dist/lib/components/SyntaxHighlight.js.map +0 -1
- package/lib/Markdown-8mv9nhGd.js.map +0 -1
- package/lib/MdxPage-GM1T5jmO.js.map +0 -1
- package/lib/Select-D9CKL33X.js +0 -223
- package/lib/SyntaxHighlight-B0L4SC_N.js.map +0 -1
- package/lib/chunk-SYFQ2XB5-QijJrSf0.js.map +0 -1
- package/lib/context-rwLGh-6_.js +0 -22
- package/lib/createServer-DSQiPwjN.js.map +0 -1
- package/lib/hook-C_t2ISLC.js.map +0 -1
- package/lib/index-B7mqiOei.js.map +0 -1
- package/lib/index-BANyVRgL.js.map +0 -1
- package/lib/index-Djenk2Hj.js +0 -36
- package/lib/joinUrl-nLx9pD-Z.js +0 -20
- package/lib/useScrollToAnchor-BGEcH3HM.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Ge = (t) => {
|
|
2
2
|
throw TypeError(t);
|
|
3
3
|
};
|
|
4
|
-
var me = (t, e, s) => e.has(t) ||
|
|
5
|
-
var n = (t, e, s) => (me(t, e, "read from private field"), s ? s.call(t) : e.get(t)), g = (t, e, s) => e.has(t) ?
|
|
4
|
+
var me = (t, e, s) => e.has(t) || Ge("Cannot " + s);
|
|
5
|
+
var n = (t, e, s) => (me(t, e, "read from private field"), s ? s.call(t) : e.get(t)), g = (t, e, s) => e.has(t) ? Ge("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), d = (t, e, s, r) => (me(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), w = (t, e, s) => (me(t, e, "access private method"), s);
|
|
6
6
|
import * as A from "react";
|
|
7
|
-
import
|
|
8
|
-
import { j as
|
|
9
|
-
import { u as
|
|
7
|
+
import $e, { createContext as Et, useContext as Ot, useMemo as It } from "react";
|
|
8
|
+
import { j as Ft } from "./jsx-runtime-CYK1ROHF.js";
|
|
9
|
+
import { u as ve, m as ze } from "./chunk-IR6S3I6Y-D_3UmFIn.js";
|
|
10
10
|
var qe = class {
|
|
11
11
|
constructor() {
|
|
12
12
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
@@ -23,25 +23,25 @@ var qe = class {
|
|
|
23
23
|
}
|
|
24
24
|
onUnsubscribe() {
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
function
|
|
26
|
+
}, V = typeof window > "u" || "Deno" in globalThis;
|
|
27
|
+
function Se() {
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function fs(t, e) {
|
|
30
30
|
return typeof t == "function" ? t(e) : t;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function we(t) {
|
|
33
33
|
return typeof t == "number" && t >= 0 && t !== 1 / 0;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function at(t, e) {
|
|
36
36
|
return Math.max(t + (e || 0) - Date.now(), 0);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function ye(t, e) {
|
|
39
39
|
return typeof t == "function" ? t(e) : t;
|
|
40
40
|
}
|
|
41
41
|
function k(t, e) {
|
|
42
42
|
return typeof t == "function" ? t(e) : t;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function ys(t, e) {
|
|
45
45
|
const {
|
|
46
46
|
type: s = "all",
|
|
47
47
|
exact: r,
|
|
@@ -52,9 +52,9 @@ function fs(t, e) {
|
|
|
52
52
|
} = t;
|
|
53
53
|
if (o) {
|
|
54
54
|
if (r) {
|
|
55
|
-
if (e.queryHash !==
|
|
55
|
+
if (e.queryHash !== Pt(o, e.options))
|
|
56
56
|
return !1;
|
|
57
|
-
} else if (!
|
|
57
|
+
} else if (!Le(e.queryKey, o))
|
|
58
58
|
return !1;
|
|
59
59
|
}
|
|
60
60
|
if (s !== "all") {
|
|
@@ -64,47 +64,47 @@ function fs(t, e) {
|
|
|
64
64
|
}
|
|
65
65
|
return !(typeof u == "boolean" && e.isStale() !== u || i && i !== e.state.fetchStatus || a && !a(e));
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function ps(t, e) {
|
|
68
68
|
const { exact: s, status: r, predicate: i, mutationKey: a } = t;
|
|
69
69
|
if (a) {
|
|
70
70
|
if (!e.options.mutationKey)
|
|
71
71
|
return !1;
|
|
72
72
|
if (s) {
|
|
73
|
-
if (
|
|
73
|
+
if (Re(e.options.mutationKey) !== Re(a))
|
|
74
74
|
return !1;
|
|
75
|
-
} else if (!
|
|
75
|
+
} else if (!Le(e.options.mutationKey, a))
|
|
76
76
|
return !1;
|
|
77
77
|
}
|
|
78
78
|
return !(r && e.state.status !== r || i && !i(e));
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
return ((e == null ? void 0 : e.queryKeyHashFn) ||
|
|
80
|
+
function Pt(t, e) {
|
|
81
|
+
return ((e == null ? void 0 : e.queryKeyHashFn) || Re)(t);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Re(t) {
|
|
84
84
|
return JSON.stringify(
|
|
85
85
|
t,
|
|
86
|
-
(e, s) =>
|
|
86
|
+
(e, s) => Oe(s) ? Object.keys(s).sort().reduce((r, i) => (r[i] = s[i], r), {}) : s
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((s) => !
|
|
89
|
+
function Le(t, e) {
|
|
90
|
+
return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((s) => !Le(t[s], e[s])) : !1;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function Ce(t, e) {
|
|
93
93
|
if (t === e)
|
|
94
94
|
return t;
|
|
95
|
-
const s =
|
|
96
|
-
if (s ||
|
|
95
|
+
const s = Je(t) && Je(e);
|
|
96
|
+
if (s || Oe(t) && Oe(e)) {
|
|
97
97
|
const r = s ? t : Object.keys(t), i = r.length, a = s ? e : Object.keys(e), o = a.length, u = s ? [] : {};
|
|
98
98
|
let l = 0;
|
|
99
99
|
for (let f = 0; f < o; f++) {
|
|
100
|
-
const
|
|
101
|
-
(!s && r.includes(
|
|
100
|
+
const m = s ? f : a[f];
|
|
101
|
+
(!s && r.includes(m) || s) && t[m] === void 0 && e[m] === void 0 ? (u[m] = void 0, l++) : (u[m] = Ce(t[m], e[m]), u[m] === t[m] && t[m] !== void 0 && l++);
|
|
102
102
|
}
|
|
103
103
|
return i === o && l === i ? t : u;
|
|
104
104
|
}
|
|
105
105
|
return e;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Ee(t, e) {
|
|
108
108
|
if (!e || Object.keys(t).length !== Object.keys(e).length)
|
|
109
109
|
return !1;
|
|
110
110
|
for (const s in t)
|
|
@@ -112,43 +112,43 @@ function Ce(t, e) {
|
|
|
112
112
|
return !1;
|
|
113
113
|
return !0;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function Je(t) {
|
|
116
116
|
return Array.isArray(t) && t.length === Object.keys(t).length;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
if (!
|
|
118
|
+
function Oe(t) {
|
|
119
|
+
if (!Ve(t))
|
|
120
120
|
return !1;
|
|
121
121
|
const e = t.constructor;
|
|
122
122
|
if (e === void 0)
|
|
123
123
|
return !0;
|
|
124
124
|
const s = e.prototype;
|
|
125
|
-
return !(!
|
|
125
|
+
return !(!Ve(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function Ve(t) {
|
|
128
128
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function Tt(t) {
|
|
131
131
|
return new Promise((e) => {
|
|
132
132
|
setTimeout(e, t);
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function Ie(t, e, s) {
|
|
136
136
|
if (typeof s.structuralSharing == "function")
|
|
137
137
|
return s.structuralSharing(t, e);
|
|
138
138
|
if (s.structuralSharing !== !1) {
|
|
139
139
|
if (process.env.NODE_ENV !== "production")
|
|
140
140
|
try {
|
|
141
|
-
return
|
|
141
|
+
return Ce(t, e);
|
|
142
142
|
} catch (r) {
|
|
143
143
|
console.error(
|
|
144
144
|
`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${s.queryHash}]: ${r}`
|
|
145
145
|
);
|
|
146
146
|
}
|
|
147
|
-
return
|
|
147
|
+
return Ce(t, e);
|
|
148
148
|
}
|
|
149
149
|
return e;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function vs(t, e, s = 0) {
|
|
152
152
|
const r = [...t, e];
|
|
153
153
|
return s && r.length > s ? r.slice(1) : r;
|
|
154
154
|
}
|
|
@@ -156,20 +156,20 @@ function bs(t, e, s = 0) {
|
|
|
156
156
|
const r = [e, ...t];
|
|
157
157
|
return s && r.length > s ? r.slice(0, -1) : r;
|
|
158
158
|
}
|
|
159
|
-
var
|
|
160
|
-
function
|
|
161
|
-
return process.env.NODE_ENV !== "production" && t.queryFn ===
|
|
159
|
+
var pe = Symbol();
|
|
160
|
+
function Dt(t, e) {
|
|
161
|
+
return process.env.NODE_ENV !== "production" && t.queryFn === pe && console.error(
|
|
162
162
|
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
|
|
163
|
-
), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn ===
|
|
163
|
+
), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === pe ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
|
|
164
164
|
}
|
|
165
|
-
var H, L,
|
|
165
|
+
var H, L, ee, tt, At = (tt = class extends qe {
|
|
166
166
|
constructor() {
|
|
167
167
|
super();
|
|
168
168
|
g(this, H);
|
|
169
169
|
g(this, L);
|
|
170
|
-
g(this,
|
|
171
|
-
d(this,
|
|
172
|
-
if (!
|
|
170
|
+
g(this, ee);
|
|
171
|
+
d(this, ee, (e) => {
|
|
172
|
+
if (!V && window.addEventListener) {
|
|
173
173
|
const s = () => e();
|
|
174
174
|
return window.addEventListener("visibilitychange", s, !1), () => {
|
|
175
175
|
window.removeEventListener("visibilitychange", s);
|
|
@@ -178,7 +178,7 @@ var H, L, X, et, Dt = (et = class extends qe {
|
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
onSubscribe() {
|
|
181
|
-
n(this, L) || this.setEventListener(n(this,
|
|
181
|
+
n(this, L) || this.setEventListener(n(this, ee));
|
|
182
182
|
}
|
|
183
183
|
onUnsubscribe() {
|
|
184
184
|
var e;
|
|
@@ -186,7 +186,7 @@ var H, L, X, et, Dt = (et = class extends qe {
|
|
|
186
186
|
}
|
|
187
187
|
setEventListener(e) {
|
|
188
188
|
var s;
|
|
189
|
-
d(this,
|
|
189
|
+
d(this, ee, e), (s = n(this, L)) == null || s.call(this), d(this, L, e((r) => {
|
|
190
190
|
typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
|
|
191
191
|
}));
|
|
192
192
|
}
|
|
@@ -203,14 +203,14 @@ var H, L, X, et, Dt = (et = class extends qe {
|
|
|
203
203
|
var e;
|
|
204
204
|
return typeof n(this, H) == "boolean" ? n(this, H) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
|
|
205
205
|
}
|
|
206
|
-
}, H = new WeakMap(), L = new WeakMap(),
|
|
206
|
+
}, H = new WeakMap(), L = new WeakMap(), ee = new WeakMap(), tt), ot = new At(), te, M, se, st, jt = (st = class extends qe {
|
|
207
207
|
constructor() {
|
|
208
208
|
super();
|
|
209
|
-
g(this,
|
|
209
|
+
g(this, te, !0);
|
|
210
210
|
g(this, M);
|
|
211
|
-
g(this,
|
|
212
|
-
d(this,
|
|
213
|
-
if (!
|
|
211
|
+
g(this, se);
|
|
212
|
+
d(this, se, (e) => {
|
|
213
|
+
if (!V && window.addEventListener) {
|
|
214
214
|
const s = () => e(!0), r = () => e(!1);
|
|
215
215
|
return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
|
|
216
216
|
window.removeEventListener("online", s), window.removeEventListener("offline", r);
|
|
@@ -219,7 +219,7 @@ var H, L, X, et, Dt = (et = class extends qe {
|
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
221
|
onSubscribe() {
|
|
222
|
-
n(this, M) || this.setEventListener(n(this,
|
|
222
|
+
n(this, M) || this.setEventListener(n(this, se));
|
|
223
223
|
}
|
|
224
224
|
onUnsubscribe() {
|
|
225
225
|
var e;
|
|
@@ -227,18 +227,18 @@ var H, L, X, et, Dt = (et = class extends qe {
|
|
|
227
227
|
}
|
|
228
228
|
setEventListener(e) {
|
|
229
229
|
var s;
|
|
230
|
-
d(this,
|
|
230
|
+
d(this, se, e), (s = n(this, M)) == null || s.call(this), d(this, M, e(this.setOnline.bind(this)));
|
|
231
231
|
}
|
|
232
232
|
setOnline(e) {
|
|
233
|
-
n(this,
|
|
233
|
+
n(this, te) !== e && (d(this, te, e), this.listeners.forEach((r) => {
|
|
234
234
|
r(e);
|
|
235
235
|
}));
|
|
236
236
|
}
|
|
237
237
|
isOnline() {
|
|
238
|
-
return n(this,
|
|
238
|
+
return n(this, te);
|
|
239
239
|
}
|
|
240
|
-
},
|
|
241
|
-
function
|
|
240
|
+
}, te = new WeakMap(), M = new WeakMap(), se = new WeakMap(), st), ut = new jt();
|
|
241
|
+
function Fe() {
|
|
242
242
|
let t, e;
|
|
243
243
|
const s = new Promise((i, a) => {
|
|
244
244
|
t = i, e = a;
|
|
@@ -260,40 +260,40 @@ function Ie() {
|
|
|
260
260
|
}), e(i);
|
|
261
261
|
}, s;
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function kt(t) {
|
|
264
264
|
return Math.min(1e3 * 2 ** t, 3e4);
|
|
265
265
|
}
|
|
266
|
-
function
|
|
267
|
-
return (t ?? "online") === "online" ?
|
|
266
|
+
function ct(t) {
|
|
267
|
+
return (t ?? "online") === "online" ? ut.isOnline() : !0;
|
|
268
268
|
}
|
|
269
|
-
var
|
|
269
|
+
var ht = class extends Error {
|
|
270
270
|
constructor(t) {
|
|
271
271
|
super("CancelledError"), this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
|
|
272
272
|
}
|
|
273
273
|
};
|
|
274
|
-
function
|
|
275
|
-
return t instanceof
|
|
274
|
+
function ge(t) {
|
|
275
|
+
return t instanceof ht;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function xt(t) {
|
|
278
278
|
let e = !1, s = 0, r = !1, i;
|
|
279
|
-
const a =
|
|
280
|
-
var
|
|
281
|
-
r || (p(new
|
|
279
|
+
const a = Fe(), o = (h) => {
|
|
280
|
+
var v;
|
|
281
|
+
r || (p(new ht(h)), (v = t.abort) == null || v.call(t));
|
|
282
282
|
}, u = () => {
|
|
283
283
|
e = !0;
|
|
284
284
|
}, l = () => {
|
|
285
285
|
e = !1;
|
|
286
|
-
}, f = () =>
|
|
287
|
-
var
|
|
288
|
-
r || (r = !0, (
|
|
286
|
+
}, f = () => ot.isFocused() && (t.networkMode === "always" || ut.isOnline()) && t.canRun(), m = () => ct(t.networkMode) && t.canRun(), c = (h) => {
|
|
287
|
+
var v;
|
|
288
|
+
r || (r = !0, (v = t.onSuccess) == null || v.call(t, h), i == null || i(), a.resolve(h));
|
|
289
289
|
}, p = (h) => {
|
|
290
|
-
var
|
|
291
|
-
r || (r = !0, (
|
|
290
|
+
var v;
|
|
291
|
+
r || (r = !0, (v = t.onError) == null || v.call(t, h), i == null || i(), a.reject(h));
|
|
292
292
|
}, y = () => new Promise((h) => {
|
|
293
|
-
var
|
|
293
|
+
var v;
|
|
294
294
|
i = (C) => {
|
|
295
295
|
(r || f()) && h(C);
|
|
296
|
-
}, (
|
|
296
|
+
}, (v = t.onPause) == null || v.call(t);
|
|
297
297
|
}).then(() => {
|
|
298
298
|
var h;
|
|
299
299
|
i = void 0, r || (h = t.onContinue) == null || h.call(t);
|
|
@@ -301,9 +301,9 @@ function kt(t) {
|
|
|
301
301
|
if (r)
|
|
302
302
|
return;
|
|
303
303
|
let h;
|
|
304
|
-
const
|
|
304
|
+
const v = s === 0 ? t.initialPromise : void 0;
|
|
305
305
|
try {
|
|
306
|
-
h =
|
|
306
|
+
h = v ?? t.fn();
|
|
307
307
|
} catch (C) {
|
|
308
308
|
h = Promise.reject(C);
|
|
309
309
|
}
|
|
@@ -311,12 +311,12 @@ function kt(t) {
|
|
|
311
311
|
var be;
|
|
312
312
|
if (r)
|
|
313
313
|
return;
|
|
314
|
-
const R = t.retry ?? (
|
|
315
|
-
if (e || !
|
|
314
|
+
const R = t.retry ?? (V ? 0 : 3), O = t.retryDelay ?? kt, q = typeof O == "function" ? O(s, C) : O, W = R === !0 || typeof R == "number" && s < R || typeof R == "function" && R(s, C);
|
|
315
|
+
if (e || !W) {
|
|
316
316
|
p(C);
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
|
-
s++, (be = t.onFail) == null || be.call(t, s, C),
|
|
319
|
+
s++, (be = t.onFail) == null || be.call(t, s, C), Tt(q).then(() => f() ? void 0 : y()).then(() => {
|
|
320
320
|
e ? p(C) : E();
|
|
321
321
|
});
|
|
322
322
|
});
|
|
@@ -327,11 +327,11 @@ function kt(t) {
|
|
|
327
327
|
continue: () => (i == null || i(), a),
|
|
328
328
|
cancelRetry: u,
|
|
329
329
|
continueRetry: l,
|
|
330
|
-
canStart:
|
|
331
|
-
start: () => (
|
|
330
|
+
canStart: m,
|
|
331
|
+
start: () => (m() ? E() : y().then(E), a)
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function Qt() {
|
|
335
335
|
let t = [], e = 0, s = (u) => {
|
|
336
336
|
u();
|
|
337
337
|
}, r = (u) => {
|
|
@@ -390,7 +390,7 @@ function xt() {
|
|
|
390
390
|
}
|
|
391
391
|
};
|
|
392
392
|
}
|
|
393
|
-
var
|
|
393
|
+
var Me = Qt(), K, rt, Ut = (rt = class {
|
|
394
394
|
constructor() {
|
|
395
395
|
g(this, K);
|
|
396
396
|
}
|
|
@@ -398,30 +398,31 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
398
398
|
this.clearGcTimeout();
|
|
399
399
|
}
|
|
400
400
|
scheduleGc() {
|
|
401
|
-
this.clearGcTimeout(),
|
|
401
|
+
this.clearGcTimeout(), we(this.gcTime) && d(this, K, setTimeout(() => {
|
|
402
402
|
this.optionalRemove();
|
|
403
403
|
}, this.gcTime));
|
|
404
404
|
}
|
|
405
405
|
updateGcTime(t) {
|
|
406
406
|
this.gcTime = Math.max(
|
|
407
407
|
this.gcTime || 0,
|
|
408
|
-
t ?? (
|
|
408
|
+
t ?? (V ? 1 / 0 : 5 * 60 * 1e3)
|
|
409
409
|
);
|
|
410
410
|
}
|
|
411
411
|
clearGcTimeout() {
|
|
412
412
|
n(this, K) && (clearTimeout(n(this, K)), d(this, K, void 0));
|
|
413
413
|
}
|
|
414
|
-
}, K = new WeakMap(),
|
|
414
|
+
}, K = new WeakMap(), rt), re, ne, D, B, I, he, G, j, U, nt, ms = (nt = class extends Ut {
|
|
415
415
|
constructor(e) {
|
|
416
416
|
super();
|
|
417
417
|
g(this, j);
|
|
418
|
-
g(this, se);
|
|
419
418
|
g(this, re);
|
|
419
|
+
g(this, ne);
|
|
420
420
|
g(this, D);
|
|
421
|
-
g(this, I);
|
|
422
|
-
g(this, ce);
|
|
423
421
|
g(this, B);
|
|
424
|
-
|
|
422
|
+
g(this, I);
|
|
423
|
+
g(this, he);
|
|
424
|
+
g(this, G);
|
|
425
|
+
d(this, G, !1), d(this, he, e.defaultOptions), this.setOptions(e.options), this.observers = [], d(this, B, e.client), d(this, D, n(this, B).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, d(this, re, qt(this.options)), this.state = e.state ?? n(this, re), this.scheduleGc();
|
|
425
426
|
}
|
|
426
427
|
get meta() {
|
|
427
428
|
return this.options.meta;
|
|
@@ -431,14 +432,14 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
431
432
|
return (e = n(this, I)) == null ? void 0 : e.promise;
|
|
432
433
|
}
|
|
433
434
|
setOptions(e) {
|
|
434
|
-
this.options = { ...n(this,
|
|
435
|
+
this.options = { ...n(this, he), ...e }, this.updateGcTime(this.options.gcTime);
|
|
435
436
|
}
|
|
436
437
|
optionalRemove() {
|
|
437
438
|
!this.observers.length && this.state.fetchStatus === "idle" && n(this, D).remove(this);
|
|
438
439
|
}
|
|
439
440
|
setData(e, s) {
|
|
440
|
-
const r =
|
|
441
|
-
return w(this, j,
|
|
441
|
+
const r = Ie(this.state.data, e, this.options);
|
|
442
|
+
return w(this, j, U).call(this, {
|
|
442
443
|
data: r,
|
|
443
444
|
type: "success",
|
|
444
445
|
dataUpdatedAt: s == null ? void 0 : s.updatedAt,
|
|
@@ -446,18 +447,18 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
446
447
|
}), r;
|
|
447
448
|
}
|
|
448
449
|
setState(e, s) {
|
|
449
|
-
w(this, j,
|
|
450
|
+
w(this, j, U).call(this, { type: "setState", state: e, setStateOptions: s });
|
|
450
451
|
}
|
|
451
452
|
cancel(e) {
|
|
452
453
|
var r, i;
|
|
453
454
|
const s = (r = n(this, I)) == null ? void 0 : r.promise;
|
|
454
|
-
return (i = n(this, I)) == null || i.cancel(e), s ? s.then(
|
|
455
|
+
return (i = n(this, I)) == null || i.cancel(e), s ? s.then(Se).catch(Se) : Promise.resolve();
|
|
455
456
|
}
|
|
456
457
|
destroy() {
|
|
457
458
|
super.destroy(), this.cancel({ silent: !0 });
|
|
458
459
|
}
|
|
459
460
|
reset() {
|
|
460
|
-
this.destroy(), this.setState(n(this,
|
|
461
|
+
this.destroy(), this.setState(n(this, re));
|
|
461
462
|
}
|
|
462
463
|
isActive() {
|
|
463
464
|
return this.observers.some(
|
|
@@ -465,7 +466,7 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
465
466
|
);
|
|
466
467
|
}
|
|
467
468
|
isDisabled() {
|
|
468
|
-
return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn ===
|
|
469
|
+
return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === pe || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
|
|
469
470
|
}
|
|
470
471
|
isStale() {
|
|
471
472
|
return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
|
|
@@ -473,7 +474,7 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
473
474
|
) : this.state.data === void 0;
|
|
474
475
|
}
|
|
475
476
|
isStaleByTime(e = 0) {
|
|
476
|
-
return this.state.isInvalidated || this.state.data === void 0 || !
|
|
477
|
+
return this.state.isInvalidated || this.state.data === void 0 || !at(this.state.dataUpdatedAt, e);
|
|
477
478
|
}
|
|
478
479
|
onFocus() {
|
|
479
480
|
var s;
|
|
@@ -489,16 +490,16 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
489
490
|
this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), n(this, D).notify({ type: "observerAdded", query: this, observer: e }));
|
|
490
491
|
}
|
|
491
492
|
removeObserver(e) {
|
|
492
|
-
this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (n(this, I) && (n(this,
|
|
493
|
+
this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (n(this, I) && (n(this, G) ? n(this, I).cancel({ revert: !0 }) : n(this, I).cancelRetry()), this.scheduleGc()), n(this, D).notify({ type: "observerRemoved", query: this, observer: e }));
|
|
493
494
|
}
|
|
494
495
|
getObserversCount() {
|
|
495
496
|
return this.observers.length;
|
|
496
497
|
}
|
|
497
498
|
invalidate() {
|
|
498
|
-
this.state.isInvalidated || w(this, j,
|
|
499
|
+
this.state.isInvalidated || w(this, j, U).call(this, { type: "invalidate" });
|
|
499
500
|
}
|
|
500
501
|
fetch(e, s) {
|
|
501
|
-
var l, f,
|
|
502
|
+
var l, f, m;
|
|
502
503
|
if (this.state.fetchStatus !== "idle") {
|
|
503
504
|
if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
|
|
504
505
|
this.cancel({ silent: !0 });
|
|
@@ -515,14 +516,15 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
515
516
|
const r = new AbortController(), i = (c) => {
|
|
516
517
|
Object.defineProperty(c, "signal", {
|
|
517
518
|
enumerable: !0,
|
|
518
|
-
get: () => (d(this,
|
|
519
|
+
get: () => (d(this, G, !0), r.signal)
|
|
519
520
|
});
|
|
520
521
|
}, a = () => {
|
|
521
|
-
const c =
|
|
522
|
+
const c = Dt(this.options, s), p = {
|
|
523
|
+
client: n(this, B),
|
|
522
524
|
queryKey: this.queryKey,
|
|
523
525
|
meta: this.meta
|
|
524
526
|
};
|
|
525
|
-
return i(p), d(this,
|
|
527
|
+
return i(p), d(this, G, !1), this.options.persister ? this.options.persister(
|
|
526
528
|
c,
|
|
527
529
|
p,
|
|
528
530
|
this
|
|
@@ -531,19 +533,20 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
531
533
|
fetchOptions: s,
|
|
532
534
|
options: this.options,
|
|
533
535
|
queryKey: this.queryKey,
|
|
536
|
+
client: n(this, B),
|
|
534
537
|
state: this.state,
|
|
535
538
|
fetchFn: a
|
|
536
539
|
};
|
|
537
540
|
i(o), (l = this.options.behavior) == null || l.onFetch(
|
|
538
541
|
o,
|
|
539
542
|
this
|
|
540
|
-
), d(this,
|
|
543
|
+
), d(this, ne, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((f = o.fetchOptions) == null ? void 0 : f.meta)) && w(this, j, U).call(this, { type: "fetch", meta: (m = o.fetchOptions) == null ? void 0 : m.meta });
|
|
541
544
|
const u = (c) => {
|
|
542
545
|
var p, y, E, h;
|
|
543
|
-
|
|
546
|
+
ge(c) && c.silent || w(this, j, U).call(this, {
|
|
544
547
|
type: "error",
|
|
545
548
|
error: c
|
|
546
|
-
}),
|
|
549
|
+
}), ge(c) || ((y = (p = n(this, D).config).onError) == null || y.call(
|
|
547
550
|
p,
|
|
548
551
|
c,
|
|
549
552
|
this
|
|
@@ -554,7 +557,7 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
554
557
|
this
|
|
555
558
|
)), this.scheduleGc();
|
|
556
559
|
};
|
|
557
|
-
return d(this, I,
|
|
560
|
+
return d(this, I, xt({
|
|
558
561
|
initialPromise: s == null ? void 0 : s.initialPromise,
|
|
559
562
|
fn: o.fetchFn,
|
|
560
563
|
abort: r.abort.bind(r),
|
|
@@ -568,8 +571,8 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
568
571
|
}
|
|
569
572
|
try {
|
|
570
573
|
this.setData(c);
|
|
571
|
-
} catch (
|
|
572
|
-
u(
|
|
574
|
+
} catch (v) {
|
|
575
|
+
u(v);
|
|
573
576
|
return;
|
|
574
577
|
}
|
|
575
578
|
(y = (p = n(this, D).config).onSuccess) == null || y.call(p, c, this), (h = (E = n(this, D).config).onSettled) == null || h.call(
|
|
@@ -581,13 +584,13 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
581
584
|
},
|
|
582
585
|
onError: u,
|
|
583
586
|
onFail: (c, p) => {
|
|
584
|
-
w(this, j,
|
|
587
|
+
w(this, j, U).call(this, { type: "failed", failureCount: c, error: p });
|
|
585
588
|
},
|
|
586
589
|
onPause: () => {
|
|
587
|
-
w(this, j,
|
|
590
|
+
w(this, j, U).call(this, { type: "pause" });
|
|
588
591
|
},
|
|
589
592
|
onContinue: () => {
|
|
590
|
-
w(this, j,
|
|
593
|
+
w(this, j, U).call(this, { type: "continue" });
|
|
591
594
|
},
|
|
592
595
|
retry: o.options.retry,
|
|
593
596
|
retryDelay: o.options.retryDelay,
|
|
@@ -595,7 +598,7 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
595
598
|
canRun: () => !0
|
|
596
599
|
})), n(this, I).start();
|
|
597
600
|
}
|
|
598
|
-
},
|
|
601
|
+
}, re = new WeakMap(), ne = new WeakMap(), D = new WeakMap(), B = new WeakMap(), I = new WeakMap(), he = new WeakMap(), G = new WeakMap(), j = new WeakSet(), U = function(e) {
|
|
599
602
|
const s = (r) => {
|
|
600
603
|
switch (e.type) {
|
|
601
604
|
case "failed":
|
|
@@ -617,7 +620,7 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
617
620
|
case "fetch":
|
|
618
621
|
return {
|
|
619
622
|
...r,
|
|
620
|
-
...
|
|
623
|
+
...lt(r.data, this.options),
|
|
621
624
|
fetchMeta: e.meta ?? null
|
|
622
625
|
};
|
|
623
626
|
case "success":
|
|
@@ -637,7 +640,7 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
637
640
|
};
|
|
638
641
|
case "error":
|
|
639
642
|
const i = e.error;
|
|
640
|
-
return
|
|
643
|
+
return ge(i) && i.revert && n(this, ne) ? { ...n(this, ne), fetchStatus: "idle" } : {
|
|
641
644
|
...r,
|
|
642
645
|
error: i,
|
|
643
646
|
errorUpdateCount: r.errorUpdateCount + 1,
|
|
@@ -659,17 +662,17 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
659
662
|
};
|
|
660
663
|
}
|
|
661
664
|
};
|
|
662
|
-
this.state = s(this.state),
|
|
665
|
+
this.state = s(this.state), Me.batch(() => {
|
|
663
666
|
this.observers.forEach((r) => {
|
|
664
667
|
r.onQueryUpdate();
|
|
665
668
|
}), n(this, D).notify({ query: this, type: "updated", action: e });
|
|
666
669
|
});
|
|
667
|
-
},
|
|
668
|
-
function
|
|
670
|
+
}, nt);
|
|
671
|
+
function lt(t, e) {
|
|
669
672
|
return {
|
|
670
673
|
fetchFailureCount: 0,
|
|
671
674
|
fetchFailureReason: null,
|
|
672
|
-
fetchStatus:
|
|
675
|
+
fetchStatus: ct(e.networkMode) ? "fetching" : "paused",
|
|
673
676
|
...t === void 0 && {
|
|
674
677
|
error: null,
|
|
675
678
|
status: "pending"
|
|
@@ -693,28 +696,28 @@ function qt(t) {
|
|
|
693
696
|
fetchStatus: "idle"
|
|
694
697
|
};
|
|
695
698
|
}
|
|
696
|
-
var T,
|
|
699
|
+
var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, Ae, je, ke, xe, ft, it, dt = (it = class extends qe {
|
|
697
700
|
constructor(e, s) {
|
|
698
701
|
super();
|
|
699
702
|
g(this, S);
|
|
700
703
|
g(this, T);
|
|
701
|
-
g(this,
|
|
702
|
-
g(this, he);
|
|
703
|
-
g(this, P);
|
|
704
|
-
g(this, G);
|
|
705
|
-
g(this, ne);
|
|
706
|
-
g(this, N);
|
|
707
|
-
g(this, U);
|
|
704
|
+
g(this, b);
|
|
708
705
|
g(this, le);
|
|
706
|
+
g(this, P);
|
|
707
|
+
g(this, $);
|
|
709
708
|
g(this, ie);
|
|
709
|
+
g(this, N);
|
|
710
|
+
g(this, Q);
|
|
711
|
+
g(this, de);
|
|
712
|
+
g(this, ae);
|
|
710
713
|
// This property keeps track of the last query with defined data.
|
|
711
714
|
// It will be used to pass the previous data and query to the placeholder function between renders.
|
|
712
|
-
g(this,
|
|
713
|
-
g(this, $);
|
|
715
|
+
g(this, oe);
|
|
714
716
|
g(this, z);
|
|
717
|
+
g(this, J);
|
|
715
718
|
g(this, _);
|
|
716
|
-
g(this,
|
|
717
|
-
this.options = s, d(this, T, e), d(this,
|
|
719
|
+
g(this, ue, /* @__PURE__ */ new Set());
|
|
720
|
+
this.options = s, d(this, T, e), d(this, Q, null), d(this, N, Fe()), this.options.experimental_prefetchInRender || n(this, N).reject(
|
|
718
721
|
new Error("experimental_prefetchInRender feature flag is not enabled")
|
|
719
722
|
), this.bindMethods(), this.setOptions(s);
|
|
720
723
|
}
|
|
@@ -722,52 +725,52 @@ var T, m, he, P, G, ne, N, U, le, ie, ae, $, z, _, oe, S, ue, Fe, Pe, Te, De, Ae
|
|
|
722
725
|
this.refetch = this.refetch.bind(this);
|
|
723
726
|
}
|
|
724
727
|
onSubscribe() {
|
|
725
|
-
this.listeners.size === 1 && (n(this,
|
|
728
|
+
this.listeners.size === 1 && (n(this, b).addObserver(this), Ze(n(this, b), this.options) ? w(this, S, ce).call(this) : this.updateResult(), w(this, S, Ae).call(this));
|
|
726
729
|
}
|
|
727
730
|
onUnsubscribe() {
|
|
728
731
|
this.hasListeners() || this.destroy();
|
|
729
732
|
}
|
|
730
733
|
shouldFetchOnReconnect() {
|
|
731
|
-
return
|
|
732
|
-
n(this,
|
|
734
|
+
return Qe(
|
|
735
|
+
n(this, b),
|
|
733
736
|
this.options,
|
|
734
737
|
this.options.refetchOnReconnect
|
|
735
738
|
);
|
|
736
739
|
}
|
|
737
740
|
shouldFetchOnWindowFocus() {
|
|
738
|
-
return
|
|
739
|
-
n(this,
|
|
741
|
+
return Qe(
|
|
742
|
+
n(this, b),
|
|
740
743
|
this.options,
|
|
741
744
|
this.options.refetchOnWindowFocus
|
|
742
745
|
);
|
|
743
746
|
}
|
|
744
747
|
destroy() {
|
|
745
|
-
this.listeners = /* @__PURE__ */ new Set(), w(this, S,
|
|
748
|
+
this.listeners = /* @__PURE__ */ new Set(), w(this, S, je).call(this), w(this, S, ke).call(this), n(this, b).removeObserver(this);
|
|
746
749
|
}
|
|
747
750
|
setOptions(e, s) {
|
|
748
|
-
const r = this.options, i = n(this,
|
|
749
|
-
if (this.options = n(this, T).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof k(this.options.enabled, n(this,
|
|
751
|
+
const r = this.options, i = n(this, b);
|
|
752
|
+
if (this.options = n(this, T).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof k(this.options.enabled, n(this, b)) != "boolean")
|
|
750
753
|
throw new Error(
|
|
751
754
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
752
755
|
);
|
|
753
|
-
w(this, S,
|
|
756
|
+
w(this, S, xe).call(this), n(this, b).setOptions(this.options), r._defaulted && !Ee(this.options, r) && n(this, T).getQueryCache().notify({
|
|
754
757
|
type: "observerOptionsUpdated",
|
|
755
|
-
query: n(this,
|
|
758
|
+
query: n(this, b),
|
|
756
759
|
observer: this
|
|
757
760
|
});
|
|
758
761
|
const a = this.hasListeners();
|
|
759
|
-
a &&
|
|
760
|
-
n(this,
|
|
762
|
+
a && We(
|
|
763
|
+
n(this, b),
|
|
761
764
|
i,
|
|
762
765
|
this.options,
|
|
763
766
|
r
|
|
764
|
-
) && w(this, S,
|
|
765
|
-
const o = w(this, S,
|
|
766
|
-
a && (n(this,
|
|
767
|
+
) && w(this, S, ce).call(this), this.updateResult(s), a && (n(this, b) !== i || k(this.options.enabled, n(this, b)) !== k(r.enabled, n(this, b)) || ye(this.options.staleTime, n(this, b)) !== ye(r.staleTime, n(this, b))) && w(this, S, Pe).call(this);
|
|
768
|
+
const o = w(this, S, Te).call(this);
|
|
769
|
+
a && (n(this, b) !== i || k(this.options.enabled, n(this, b)) !== k(r.enabled, n(this, b)) || o !== n(this, _)) && w(this, S, De).call(this, o);
|
|
767
770
|
}
|
|
768
771
|
getOptimisticResult(e) {
|
|
769
772
|
const s = n(this, T).getQueryCache().build(n(this, T), e), r = this.createResult(s, e);
|
|
770
|
-
return
|
|
773
|
+
return Mt(this, r) && (d(this, P, r), d(this, ie, this.options), d(this, $, n(this, b).state)), r;
|
|
771
774
|
}
|
|
772
775
|
getCurrentResult() {
|
|
773
776
|
return n(this, P);
|
|
@@ -783,10 +786,10 @@ var T, m, he, P, G, ne, N, U, le, ie, ae, $, z, _, oe, S, ue, Fe, Pe, Te, De, Ae
|
|
|
783
786
|
}), r;
|
|
784
787
|
}
|
|
785
788
|
trackProp(e) {
|
|
786
|
-
n(this,
|
|
789
|
+
n(this, ue).add(e);
|
|
787
790
|
}
|
|
788
791
|
getCurrentQuery() {
|
|
789
|
-
return n(this,
|
|
792
|
+
return n(this, b);
|
|
790
793
|
}
|
|
791
794
|
refetch({ ...e } = {}) {
|
|
792
795
|
return this.fetch({
|
|
@@ -798,62 +801,62 @@ var T, m, he, P, G, ne, N, U, le, ie, ae, $, z, _, oe, S, ue, Fe, Pe, Te, De, Ae
|
|
|
798
801
|
return r.fetch().then(() => this.createResult(r, s));
|
|
799
802
|
}
|
|
800
803
|
fetch(e) {
|
|
801
|
-
return w(this, S,
|
|
804
|
+
return w(this, S, ce).call(this, {
|
|
802
805
|
...e,
|
|
803
806
|
cancelRefetch: e.cancelRefetch ?? !0
|
|
804
807
|
}).then(() => (this.updateResult(), n(this, P)));
|
|
805
808
|
}
|
|
806
809
|
createResult(e, s) {
|
|
807
|
-
var
|
|
808
|
-
const r = n(this,
|
|
809
|
-
let c = { ...
|
|
810
|
+
var Be;
|
|
811
|
+
const r = n(this, b), i = this.options, a = n(this, P), o = n(this, $), u = n(this, ie), f = e !== r ? e.state : n(this, le), { state: m } = e;
|
|
812
|
+
let c = { ...m }, p = !1, y;
|
|
810
813
|
if (s._optimisticResults) {
|
|
811
|
-
const F = this.hasListeners(),
|
|
812
|
-
(
|
|
814
|
+
const F = this.hasListeners(), Y = !F && Ze(e, s), X = F && We(e, r, s, i);
|
|
815
|
+
(Y || X) && (c = {
|
|
813
816
|
...c,
|
|
814
|
-
...
|
|
817
|
+
...lt(m.data, e.options)
|
|
815
818
|
}), s._optimisticResults === "isRestoring" && (c.fetchStatus = "idle");
|
|
816
819
|
}
|
|
817
|
-
let { error: E, errorUpdatedAt: h, status:
|
|
820
|
+
let { error: E, errorUpdatedAt: h, status: v } = c;
|
|
818
821
|
if (s.select && c.data !== void 0)
|
|
819
|
-
if (a && c.data === (o == null ? void 0 : o.data) && s.select === n(this,
|
|
820
|
-
y = n(this,
|
|
822
|
+
if (a && c.data === (o == null ? void 0 : o.data) && s.select === n(this, de))
|
|
823
|
+
y = n(this, ae);
|
|
821
824
|
else
|
|
822
825
|
try {
|
|
823
|
-
d(this,
|
|
826
|
+
d(this, de, s.select), y = s.select(c.data), y = Ie(a == null ? void 0 : a.data, y, s), d(this, ae, y), d(this, Q, null);
|
|
824
827
|
} catch (F) {
|
|
825
|
-
d(this,
|
|
828
|
+
d(this, Q, F);
|
|
826
829
|
}
|
|
827
830
|
else
|
|
828
831
|
y = c.data;
|
|
829
|
-
if (s.placeholderData !== void 0 && y === void 0 &&
|
|
832
|
+
if (s.placeholderData !== void 0 && y === void 0 && v === "pending") {
|
|
830
833
|
let F;
|
|
831
834
|
if (a != null && a.isPlaceholderData && s.placeholderData === (u == null ? void 0 : u.placeholderData))
|
|
832
835
|
F = a.data;
|
|
833
836
|
else if (F = typeof s.placeholderData == "function" ? s.placeholderData(
|
|
834
|
-
(
|
|
835
|
-
n(this,
|
|
837
|
+
(Be = n(this, oe)) == null ? void 0 : Be.state.data,
|
|
838
|
+
n(this, oe)
|
|
836
839
|
) : s.placeholderData, s.select && F !== void 0)
|
|
837
840
|
try {
|
|
838
|
-
F = s.select(F), d(this,
|
|
839
|
-
} catch (
|
|
840
|
-
d(this,
|
|
841
|
+
F = s.select(F), d(this, Q, null);
|
|
842
|
+
} catch (Y) {
|
|
843
|
+
d(this, Q, Y);
|
|
841
844
|
}
|
|
842
|
-
F !== void 0 && (
|
|
845
|
+
F !== void 0 && (v = "success", y = Ie(
|
|
843
846
|
a == null ? void 0 : a.data,
|
|
844
847
|
F,
|
|
845
848
|
s
|
|
846
849
|
), p = !0);
|
|
847
850
|
}
|
|
848
|
-
n(this,
|
|
849
|
-
const C = c.fetchStatus === "fetching", R =
|
|
850
|
-
status:
|
|
851
|
+
n(this, Q) && (E = n(this, Q), y = n(this, ae), h = Date.now(), v = "error");
|
|
852
|
+
const C = c.fetchStatus === "fetching", R = v === "pending", O = v === "error", q = R && C, W = y !== void 0, x = {
|
|
853
|
+
status: v,
|
|
851
854
|
fetchStatus: c.fetchStatus,
|
|
852
855
|
isPending: R,
|
|
853
|
-
isSuccess:
|
|
856
|
+
isSuccess: v === "success",
|
|
854
857
|
isError: O,
|
|
855
|
-
isInitialLoading:
|
|
856
|
-
isLoading:
|
|
858
|
+
isInitialLoading: q,
|
|
859
|
+
isLoading: q,
|
|
857
860
|
data: y,
|
|
858
861
|
dataUpdatedAt: c.dataUpdatedAt,
|
|
859
862
|
error: E,
|
|
@@ -865,145 +868,145 @@ var T, m, he, P, G, ne, N, U, le, ie, ae, $, z, _, oe, S, ue, Fe, Pe, Te, De, Ae
|
|
|
865
868
|
isFetchedAfterMount: c.dataUpdateCount > f.dataUpdateCount || c.errorUpdateCount > f.errorUpdateCount,
|
|
866
869
|
isFetching: C,
|
|
867
870
|
isRefetching: C && !R,
|
|
868
|
-
isLoadingError: O && !
|
|
871
|
+
isLoadingError: O && !W,
|
|
869
872
|
isPaused: c.fetchStatus === "paused",
|
|
870
873
|
isPlaceholderData: p,
|
|
871
|
-
isRefetchError: O &&
|
|
872
|
-
isStale:
|
|
874
|
+
isRefetchError: O && W,
|
|
875
|
+
isStale: Ne(e, s),
|
|
873
876
|
refetch: this.refetch,
|
|
874
877
|
promise: n(this, N)
|
|
875
878
|
};
|
|
876
879
|
if (this.options.experimental_prefetchInRender) {
|
|
877
|
-
const F = (
|
|
878
|
-
x.status === "error" ?
|
|
879
|
-
},
|
|
880
|
-
const
|
|
881
|
-
F(
|
|
882
|
-
},
|
|
883
|
-
switch (
|
|
880
|
+
const F = (fe) => {
|
|
881
|
+
x.status === "error" ? fe.reject(x.error) : x.data !== void 0 && fe.resolve(x.data);
|
|
882
|
+
}, Y = () => {
|
|
883
|
+
const fe = d(this, N, x.promise = Fe());
|
|
884
|
+
F(fe);
|
|
885
|
+
}, X = n(this, N);
|
|
886
|
+
switch (X.status) {
|
|
884
887
|
case "pending":
|
|
885
|
-
e.queryHash === r.queryHash && F(
|
|
888
|
+
e.queryHash === r.queryHash && F(X);
|
|
886
889
|
break;
|
|
887
890
|
case "fulfilled":
|
|
888
|
-
(x.status === "error" || x.data !==
|
|
891
|
+
(x.status === "error" || x.data !== X.value) && Y();
|
|
889
892
|
break;
|
|
890
893
|
case "rejected":
|
|
891
|
-
(x.status !== "error" || x.error !==
|
|
894
|
+
(x.status !== "error" || x.error !== X.reason) && Y();
|
|
892
895
|
break;
|
|
893
896
|
}
|
|
894
897
|
}
|
|
895
898
|
return x;
|
|
896
899
|
}
|
|
897
900
|
updateResult(e) {
|
|
898
|
-
const s = n(this, P), r = this.createResult(n(this,
|
|
899
|
-
if (d(this,
|
|
901
|
+
const s = n(this, P), r = this.createResult(n(this, b), this.options);
|
|
902
|
+
if (d(this, $, n(this, b).state), d(this, ie, this.options), n(this, $).data !== void 0 && d(this, oe, n(this, b)), Ee(r, s))
|
|
900
903
|
return;
|
|
901
904
|
d(this, P, r);
|
|
902
905
|
const i = {}, a = () => {
|
|
903
906
|
if (!s)
|
|
904
907
|
return !0;
|
|
905
908
|
const { notifyOnChangeProps: o } = this.options, u = typeof o == "function" ? o() : o;
|
|
906
|
-
if (u === "all" || !u && !n(this,
|
|
909
|
+
if (u === "all" || !u && !n(this, ue).size)
|
|
907
910
|
return !0;
|
|
908
911
|
const l = new Set(
|
|
909
|
-
u ?? n(this,
|
|
912
|
+
u ?? n(this, ue)
|
|
910
913
|
);
|
|
911
914
|
return this.options.throwOnError && l.add("error"), Object.keys(n(this, P)).some((f) => {
|
|
912
|
-
const
|
|
913
|
-
return n(this, P)[
|
|
915
|
+
const m = f;
|
|
916
|
+
return n(this, P)[m] !== s[m] && l.has(m);
|
|
914
917
|
});
|
|
915
918
|
};
|
|
916
|
-
(e == null ? void 0 : e.listeners) !== !1 && a() && (i.listeners = !0), w(this, S,
|
|
919
|
+
(e == null ? void 0 : e.listeners) !== !1 && a() && (i.listeners = !0), w(this, S, ft).call(this, { ...i, ...e });
|
|
917
920
|
}
|
|
918
921
|
onQueryUpdate() {
|
|
919
|
-
this.updateResult(), this.hasListeners() && w(this, S,
|
|
922
|
+
this.updateResult(), this.hasListeners() && w(this, S, Ae).call(this);
|
|
920
923
|
}
|
|
921
|
-
}, T = new WeakMap(),
|
|
922
|
-
w(this, S,
|
|
923
|
-
let s = n(this,
|
|
924
|
+
}, T = new WeakMap(), b = new WeakMap(), le = new WeakMap(), P = new WeakMap(), $ = new WeakMap(), ie = new WeakMap(), N = new WeakMap(), Q = new WeakMap(), de = new WeakMap(), ae = new WeakMap(), oe = new WeakMap(), z = new WeakMap(), J = new WeakMap(), _ = new WeakMap(), ue = new WeakMap(), S = new WeakSet(), ce = function(e) {
|
|
925
|
+
w(this, S, xe).call(this);
|
|
926
|
+
let s = n(this, b).fetch(
|
|
924
927
|
this.options,
|
|
925
928
|
e
|
|
926
929
|
);
|
|
927
|
-
return e != null && e.throwOnError || (s = s.catch(
|
|
928
|
-
},
|
|
929
|
-
w(this, S,
|
|
930
|
-
const e =
|
|
930
|
+
return e != null && e.throwOnError || (s = s.catch(Se)), s;
|
|
931
|
+
}, Pe = function() {
|
|
932
|
+
w(this, S, je).call(this);
|
|
933
|
+
const e = ye(
|
|
931
934
|
this.options.staleTime,
|
|
932
|
-
n(this,
|
|
935
|
+
n(this, b)
|
|
933
936
|
);
|
|
934
|
-
if (
|
|
937
|
+
if (V || n(this, P).isStale || !we(e))
|
|
935
938
|
return;
|
|
936
|
-
const r =
|
|
937
|
-
d(this,
|
|
939
|
+
const r = at(n(this, P).dataUpdatedAt, e) + 1;
|
|
940
|
+
d(this, z, setTimeout(() => {
|
|
938
941
|
n(this, P).isStale || this.updateResult();
|
|
939
942
|
}, r));
|
|
940
|
-
},
|
|
941
|
-
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this,
|
|
942
|
-
},
|
|
943
|
-
w(this, S,
|
|
944
|
-
(this.options.refetchIntervalInBackground ||
|
|
943
|
+
}, Te = function() {
|
|
944
|
+
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, b)) : this.options.refetchInterval) ?? !1;
|
|
945
|
+
}, De = function(e) {
|
|
946
|
+
w(this, S, ke).call(this), d(this, _, e), !(V || k(this.options.enabled, n(this, b)) === !1 || !we(n(this, _)) || n(this, _) === 0) && d(this, J, setInterval(() => {
|
|
947
|
+
(this.options.refetchIntervalInBackground || ot.isFocused()) && w(this, S, ce).call(this);
|
|
945
948
|
}, n(this, _)));
|
|
946
|
-
}, De = function() {
|
|
947
|
-
w(this, S, Fe).call(this), w(this, S, Te).call(this, w(this, S, Pe).call(this));
|
|
948
949
|
}, Ae = function() {
|
|
949
|
-
|
|
950
|
+
w(this, S, Pe).call(this), w(this, S, De).call(this, w(this, S, Te).call(this));
|
|
950
951
|
}, je = function() {
|
|
951
|
-
n(this, z) && (
|
|
952
|
+
n(this, z) && (clearTimeout(n(this, z)), d(this, z, void 0));
|
|
952
953
|
}, ke = function() {
|
|
954
|
+
n(this, J) && (clearInterval(n(this, J)), d(this, J, void 0));
|
|
955
|
+
}, xe = function() {
|
|
953
956
|
const e = n(this, T).getQueryCache().build(n(this, T), this.options);
|
|
954
|
-
if (e === n(this,
|
|
957
|
+
if (e === n(this, b))
|
|
955
958
|
return;
|
|
956
|
-
const s = n(this,
|
|
957
|
-
d(this,
|
|
958
|
-
},
|
|
959
|
-
|
|
959
|
+
const s = n(this, b);
|
|
960
|
+
d(this, b, e), d(this, le, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
|
|
961
|
+
}, ft = function(e) {
|
|
962
|
+
Me.batch(() => {
|
|
960
963
|
e.listeners && this.listeners.forEach((s) => {
|
|
961
964
|
s(n(this, P));
|
|
962
965
|
}), n(this, T).getQueryCache().notify({
|
|
963
|
-
query: n(this,
|
|
966
|
+
query: n(this, b),
|
|
964
967
|
type: "observerResultsUpdated"
|
|
965
968
|
});
|
|
966
969
|
});
|
|
967
|
-
},
|
|
968
|
-
function
|
|
970
|
+
}, it);
|
|
971
|
+
function Lt(t, e) {
|
|
969
972
|
return k(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
|
|
970
973
|
}
|
|
971
|
-
function
|
|
972
|
-
return
|
|
974
|
+
function Ze(t, e) {
|
|
975
|
+
return Lt(t, e) || t.state.data !== void 0 && Qe(t, e, e.refetchOnMount);
|
|
973
976
|
}
|
|
974
|
-
function
|
|
977
|
+
function Qe(t, e, s) {
|
|
975
978
|
if (k(e.enabled, t) !== !1) {
|
|
976
979
|
const r = typeof s == "function" ? s(t) : s;
|
|
977
|
-
return r === "always" || r !== !1 &&
|
|
980
|
+
return r === "always" || r !== !1 && Ne(t, e);
|
|
978
981
|
}
|
|
979
982
|
return !1;
|
|
980
983
|
}
|
|
981
|
-
function
|
|
982
|
-
return (t !== e || k(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") &&
|
|
984
|
+
function We(t, e, s, r) {
|
|
985
|
+
return (t !== e || k(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Ne(t, s);
|
|
983
986
|
}
|
|
984
|
-
function
|
|
985
|
-
return k(e.enabled, t) !== !1 && t.isStaleByTime(
|
|
987
|
+
function Ne(t, e) {
|
|
988
|
+
return k(e.enabled, t) !== !1 && t.isStaleByTime(ye(e.staleTime, t));
|
|
986
989
|
}
|
|
987
|
-
function
|
|
988
|
-
return !
|
|
990
|
+
function Mt(t, e) {
|
|
991
|
+
return !Ee(t.getCurrentResult(), e);
|
|
989
992
|
}
|
|
990
|
-
var
|
|
993
|
+
var yt = A.createContext(
|
|
991
994
|
void 0
|
|
992
|
-
),
|
|
993
|
-
const e = A.useContext(
|
|
995
|
+
), pt = (t) => {
|
|
996
|
+
const e = A.useContext(yt);
|
|
994
997
|
if (t)
|
|
995
998
|
return t;
|
|
996
999
|
if (!e)
|
|
997
1000
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
998
1001
|
return e;
|
|
999
|
-
},
|
|
1002
|
+
}, gs = ({
|
|
1000
1003
|
client: t,
|
|
1001
1004
|
children: e
|
|
1002
1005
|
}) => (A.useEffect(() => (t.mount(), () => {
|
|
1003
1006
|
t.unmount();
|
|
1004
|
-
}), [t]), /* @__PURE__ */
|
|
1005
|
-
|
|
1006
|
-
function
|
|
1007
|
+
}), [t]), /* @__PURE__ */ Ft.jsx(yt.Provider, { value: t, children: e })), vt = A.createContext(!1), Nt = () => A.useContext(vt);
|
|
1008
|
+
vt.Provider;
|
|
1009
|
+
function _t() {
|
|
1007
1010
|
let t = !1;
|
|
1008
1011
|
return {
|
|
1009
1012
|
clearReset: () => {
|
|
@@ -1015,27 +1018,28 @@ function Nt() {
|
|
|
1015
1018
|
isReset: () => t
|
|
1016
1019
|
};
|
|
1017
1020
|
}
|
|
1018
|
-
var
|
|
1019
|
-
function
|
|
1021
|
+
var Ht = A.createContext(_t()), Kt = () => A.useContext(Ht);
|
|
1022
|
+
function Bt(t, e) {
|
|
1020
1023
|
return typeof t == "function" ? t(...e) : !!t;
|
|
1021
1024
|
}
|
|
1022
|
-
function
|
|
1025
|
+
function Ye() {
|
|
1023
1026
|
}
|
|
1024
|
-
var
|
|
1027
|
+
var Gt = (t, e) => {
|
|
1025
1028
|
(t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
|
|
1026
|
-
},
|
|
1029
|
+
}, $t = (t) => {
|
|
1027
1030
|
A.useEffect(() => {
|
|
1028
1031
|
t.clearReset();
|
|
1029
1032
|
}, [t]);
|
|
1030
|
-
},
|
|
1033
|
+
}, zt = ({
|
|
1031
1034
|
result: t,
|
|
1032
1035
|
errorResetBoundary: e,
|
|
1033
1036
|
throwOnError: s,
|
|
1034
|
-
query: r
|
|
1035
|
-
|
|
1037
|
+
query: r,
|
|
1038
|
+
suspense: i
|
|
1039
|
+
}) => t.isError && !e.isReset() && !t.isFetching && r && (i && t.data === void 0 || Bt(s, [t.error, r])), Jt = (t, e) => e.state.data === void 0, Vt = (t) => {
|
|
1036
1040
|
const e = t.staleTime;
|
|
1037
1041
|
t.suspense && (t.staleTime = typeof e == "function" ? (...s) => Math.max(e(...s), 1e3) : Math.max(e ?? 1e3, 1e3), typeof t.gcTime == "number" && (t.gcTime = Math.max(t.gcTime, 1e3)));
|
|
1038
|
-
},
|
|
1042
|
+
}, Zt = (t, e) => t.isLoading && t.isFetching && !e, Wt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, Xe = (t, e, s) => e.fetchOptimistic(t).catch(() => {
|
|
1039
1043
|
s.clearReset();
|
|
1040
1044
|
});
|
|
1041
1045
|
function bt(t, e, s) {
|
|
@@ -1044,144 +1048,145 @@ function bt(t, e, s) {
|
|
|
1044
1048
|
throw new Error(
|
|
1045
1049
|
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
|
|
1046
1050
|
);
|
|
1047
|
-
const r =
|
|
1051
|
+
const r = pt(s), i = Nt(), a = Kt(), o = r.defaultQueryOptions(t);
|
|
1048
1052
|
(p = (c = r.getDefaultOptions().queries) == null ? void 0 : c._experimental_beforeQuery) == null || p.call(
|
|
1049
1053
|
c,
|
|
1050
1054
|
o
|
|
1051
|
-
), o._optimisticResults = i ? "isRestoring" : "optimistic",
|
|
1055
|
+
), o._optimisticResults = i ? "isRestoring" : "optimistic", Vt(o), Gt(o, a), $t(a);
|
|
1052
1056
|
const u = !r.getQueryCache().get(o.queryHash), [l] = A.useState(
|
|
1053
1057
|
() => new e(
|
|
1054
1058
|
r,
|
|
1055
1059
|
o
|
|
1056
1060
|
)
|
|
1057
|
-
), f = l.getOptimisticResult(o),
|
|
1061
|
+
), f = l.getOptimisticResult(o), m = !i && t.subscribed !== !1;
|
|
1058
1062
|
if (A.useSyncExternalStore(
|
|
1059
1063
|
A.useCallback(
|
|
1060
|
-
(
|
|
1061
|
-
const C =
|
|
1064
|
+
(v) => {
|
|
1065
|
+
const C = m ? l.subscribe(Me.batchCalls(v)) : Ye;
|
|
1062
1066
|
return l.updateResult(), C;
|
|
1063
1067
|
},
|
|
1064
|
-
[l,
|
|
1068
|
+
[l, m]
|
|
1065
1069
|
),
|
|
1066
1070
|
() => l.getCurrentResult(),
|
|
1067
1071
|
() => l.getCurrentResult()
|
|
1068
1072
|
), A.useEffect(() => {
|
|
1069
1073
|
l.setOptions(o, { listeners: !1 });
|
|
1070
|
-
}, [o, l]),
|
|
1071
|
-
throw
|
|
1072
|
-
if (
|
|
1074
|
+
}, [o, l]), Wt(o, f))
|
|
1075
|
+
throw Xe(o, l, a);
|
|
1076
|
+
if (zt({
|
|
1073
1077
|
result: f,
|
|
1074
1078
|
errorResetBoundary: a,
|
|
1075
1079
|
throwOnError: o.throwOnError,
|
|
1076
|
-
query: r.getQueryCache().get(o.queryHash)
|
|
1080
|
+
query: r.getQueryCache().get(o.queryHash),
|
|
1081
|
+
suspense: o.suspense
|
|
1077
1082
|
}))
|
|
1078
1083
|
throw f.error;
|
|
1079
1084
|
if ((E = (y = r.getDefaultOptions().queries) == null ? void 0 : y._experimental_afterQuery) == null || E.call(
|
|
1080
1085
|
y,
|
|
1081
1086
|
o,
|
|
1082
1087
|
f
|
|
1083
|
-
), o.experimental_prefetchInRender && !
|
|
1084
|
-
const
|
|
1088
|
+
), o.experimental_prefetchInRender && !V && Zt(f, i)) {
|
|
1089
|
+
const v = u ? (
|
|
1085
1090
|
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
1086
|
-
|
|
1091
|
+
Xe(o, l, a)
|
|
1087
1092
|
) : (
|
|
1088
1093
|
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
1089
1094
|
(h = r.getQueryCache().get(o.queryHash)) == null ? void 0 : h.promise
|
|
1090
1095
|
);
|
|
1091
|
-
|
|
1096
|
+
v == null || v.catch(Ye).finally(() => {
|
|
1092
1097
|
l.updateResult();
|
|
1093
1098
|
});
|
|
1094
1099
|
}
|
|
1095
1100
|
return o.notifyOnChangeProps ? f : l.trackResult(f);
|
|
1096
1101
|
}
|
|
1097
|
-
function Wt(t, e) {
|
|
1098
|
-
return bt(t, lt, e);
|
|
1099
|
-
}
|
|
1100
1102
|
function Yt(t, e) {
|
|
1101
|
-
return
|
|
1103
|
+
return bt(t, dt, e);
|
|
1104
|
+
}
|
|
1105
|
+
function Xt(t, e) {
|
|
1106
|
+
return process.env.NODE_ENV !== "production" && t.queryFn === pe && console.error("skipToken is not allowed for useSuspenseQuery"), bt(
|
|
1102
1107
|
{
|
|
1103
1108
|
...t,
|
|
1104
1109
|
enabled: !0,
|
|
1105
1110
|
suspense: !0,
|
|
1106
|
-
throwOnError:
|
|
1111
|
+
throwOnError: Jt,
|
|
1107
1112
|
placeholderData: void 0
|
|
1108
1113
|
},
|
|
1109
|
-
|
|
1114
|
+
dt,
|
|
1110
1115
|
e
|
|
1111
1116
|
);
|
|
1112
1117
|
}
|
|
1113
|
-
const
|
|
1118
|
+
const Z = (...t) => {
|
|
1114
1119
|
const e = t.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
|
|
1115
1120
|
return e ? `/${e}` : "/";
|
|
1116
1121
|
}, mt = Object.freeze({
|
|
1117
1122
|
API_IDENTITIES: ["api-identities"]
|
|
1118
|
-
}),
|
|
1119
|
-
const t =
|
|
1123
|
+
}), Ss = () => {
|
|
1124
|
+
const t = pt();
|
|
1120
1125
|
return {
|
|
1121
1126
|
invalidateCache: async (e) => {
|
|
1122
1127
|
await t.invalidateQueries({ queryKey: mt[e] });
|
|
1123
1128
|
}
|
|
1124
1129
|
};
|
|
1125
|
-
},
|
|
1130
|
+
}, _e = (t, e) => {
|
|
1126
1131
|
for (const s of t) {
|
|
1127
|
-
const r =
|
|
1132
|
+
const r = He(s, e);
|
|
1128
1133
|
if (r !== void 0) return r;
|
|
1129
1134
|
}
|
|
1130
|
-
},
|
|
1135
|
+
}, He = (t, e, s = []) => {
|
|
1131
1136
|
const r = e(t, s);
|
|
1132
1137
|
if (r !== void 0) return r;
|
|
1133
1138
|
if (t.type === "category")
|
|
1134
1139
|
for (const i of t.items) {
|
|
1135
|
-
const a =
|
|
1140
|
+
const a = He(i, e, [
|
|
1136
1141
|
...s,
|
|
1137
1142
|
t
|
|
1138
1143
|
]);
|
|
1139
1144
|
if (a !== void 0) return a;
|
|
1140
1145
|
}
|
|
1141
|
-
},
|
|
1142
|
-
const t =
|
|
1143
|
-
return
|
|
1144
|
-
if (r.type === "doc" &&
|
|
1146
|
+
}, ws = () => {
|
|
1147
|
+
const t = ve(), s = gt().sidebar;
|
|
1148
|
+
return _e(s, (r) => {
|
|
1149
|
+
if (r.type === "doc" && Z(r.id) === t.pathname)
|
|
1145
1150
|
return r;
|
|
1146
1151
|
});
|
|
1147
|
-
},
|
|
1148
|
-
const e =
|
|
1149
|
-
return
|
|
1150
|
-
if (s.type === "category" && s.link &&
|
|
1152
|
+
}, Rs = (t) => {
|
|
1153
|
+
const e = ve();
|
|
1154
|
+
return He(t, (s) => {
|
|
1155
|
+
if (s.type === "category" && s.link && Z(s.link.id) === e.pathname || s.type === "doc" && Z(s.id) === e.pathname)
|
|
1151
1156
|
return !0;
|
|
1152
1157
|
});
|
|
1153
|
-
},
|
|
1154
|
-
const t =
|
|
1158
|
+
}, Cs = () => {
|
|
1159
|
+
const t = ve().pathname, s = gt().sidebar;
|
|
1155
1160
|
let r, i, a = !1;
|
|
1156
|
-
return
|
|
1157
|
-
const u = o.type === "doc" ?
|
|
1161
|
+
return _e(s, (o) => {
|
|
1162
|
+
const u = o.type === "doc" ? Z(o.id) : o.type === "category" && o.link ? Z(o.link.id) : void 0;
|
|
1158
1163
|
if (u) {
|
|
1159
1164
|
if (a)
|
|
1160
1165
|
return i = { label: o.label, id: u }, !0;
|
|
1161
1166
|
t === u ? a = !0 : r = { label: o.label, id: u };
|
|
1162
1167
|
}
|
|
1163
1168
|
}), { prev: r, next: i };
|
|
1164
|
-
},
|
|
1169
|
+
}, es = Et(
|
|
1165
1170
|
void 0
|
|
1166
|
-
),
|
|
1167
|
-
const t =
|
|
1171
|
+
), Ke = () => {
|
|
1172
|
+
const t = Ot(es);
|
|
1168
1173
|
if (!t)
|
|
1169
1174
|
throw new Error("useZudoku must be used within a ZudokuProvider.");
|
|
1170
1175
|
return t;
|
|
1171
|
-
},
|
|
1172
|
-
const { getApiIdentities: t } =
|
|
1173
|
-
return
|
|
1176
|
+
}, Es = () => {
|
|
1177
|
+
const { getApiIdentities: t } = Ke();
|
|
1178
|
+
return Yt({
|
|
1174
1179
|
queryFn: t,
|
|
1175
1180
|
queryKey: [mt.API_IDENTITIES]
|
|
1176
1181
|
});
|
|
1177
|
-
},
|
|
1182
|
+
}, gt = () => {
|
|
1178
1183
|
var c;
|
|
1179
|
-
const { getPluginSidebar: t, sidebars: e, topNavigation: s, options: r } =
|
|
1180
|
-
(p) =>
|
|
1181
|
-
), u = Object.entries(e).find(([, p]) =>
|
|
1182
|
-
if ((y.type === "doc" ?
|
|
1184
|
+
const { getPluginSidebar: t, sidebars: e, topNavigation: s, options: r } = Ke(), i = ve(), a = us(), o = (c = r.protectedRoutes) == null ? void 0 : c.some(
|
|
1185
|
+
(p) => ze(p, i.pathname)
|
|
1186
|
+
), u = Object.entries(e).find(([, p]) => _e(p, (y) => {
|
|
1187
|
+
if ((y.type === "doc" ? Z(y.id) : y.type === "category" && y.link ? Z(y.link.id) : void 0) === i.pathname)
|
|
1183
1188
|
return y;
|
|
1184
|
-
})), l = s.find((p) => p.id === (u == null ? void 0 : u[0])) ?? s.find((p) =>
|
|
1189
|
+
})), l = s.find((p) => p.id === (u == null ? void 0 : u[0])) ?? s.find((p) => ze(p.id, i.pathname)), { data: f } = Xt({
|
|
1185
1190
|
queryFn: () => t(i.pathname),
|
|
1186
1191
|
queryKey: ["plugin-sidebar", i.pathname]
|
|
1187
1192
|
});
|
|
@@ -1189,30 +1194,30 @@ const V = (...t) => {
|
|
|
1189
1194
|
sidebar: a.isAuthEnabled && !a.isAuthenticated && o ? [] : [...u ? u[1] : [], ...f],
|
|
1190
1195
|
topNavItem: l
|
|
1191
1196
|
};
|
|
1192
|
-
},
|
|
1197
|
+
}, et = (t) => {
|
|
1193
1198
|
let e;
|
|
1194
|
-
const s = /* @__PURE__ */ new Set(), r = (f,
|
|
1199
|
+
const s = /* @__PURE__ */ new Set(), r = (f, m) => {
|
|
1195
1200
|
const c = typeof f == "function" ? f(e) : f;
|
|
1196
1201
|
if (!Object.is(c, e)) {
|
|
1197
1202
|
const p = e;
|
|
1198
|
-
e =
|
|
1203
|
+
e = m ?? (typeof c != "object" || c === null) ? c : Object.assign({}, e, c), s.forEach((y) => y(e, p));
|
|
1199
1204
|
}
|
|
1200
1205
|
}, i = () => e, u = { setState: r, getState: i, getInitialState: () => l, subscribe: (f) => (s.add(f), () => s.delete(f)) }, l = e = t(r, i, u);
|
|
1201
1206
|
return u;
|
|
1202
|
-
},
|
|
1203
|
-
function
|
|
1204
|
-
const s =
|
|
1207
|
+
}, ts = (t) => t ? et(t) : et, ss = (t) => t;
|
|
1208
|
+
function rs(t, e = ss) {
|
|
1209
|
+
const s = $e.useSyncExternalStore(
|
|
1205
1210
|
t.subscribe,
|
|
1206
1211
|
() => e(t.getState()),
|
|
1207
1212
|
() => e(t.getInitialState())
|
|
1208
1213
|
);
|
|
1209
|
-
return
|
|
1214
|
+
return $e.useDebugValue(s), s;
|
|
1210
1215
|
}
|
|
1211
|
-
const
|
|
1212
|
-
const e =
|
|
1216
|
+
const ns = (t) => {
|
|
1217
|
+
const e = ts(t), s = (r) => rs(e, r);
|
|
1213
1218
|
return Object.assign(s, e), s;
|
|
1214
|
-
},
|
|
1215
|
-
function
|
|
1219
|
+
}, St = (t) => ns;
|
|
1220
|
+
function wt(t, e) {
|
|
1216
1221
|
let s;
|
|
1217
1222
|
try {
|
|
1218
1223
|
s = t();
|
|
@@ -1253,13 +1258,13 @@ const Ue = (t) => (e) => {
|
|
|
1253
1258
|
}
|
|
1254
1259
|
};
|
|
1255
1260
|
}
|
|
1256
|
-
},
|
|
1261
|
+
}, is = (t, e) => (s, r, i) => {
|
|
1257
1262
|
let a = {
|
|
1258
|
-
storage:
|
|
1263
|
+
storage: wt(() => localStorage),
|
|
1259
1264
|
partialize: (h) => h,
|
|
1260
1265
|
version: 0,
|
|
1261
|
-
merge: (h,
|
|
1262
|
-
...
|
|
1266
|
+
merge: (h, v) => ({
|
|
1267
|
+
...v,
|
|
1263
1268
|
...h
|
|
1264
1269
|
}),
|
|
1265
1270
|
...e
|
|
@@ -1276,19 +1281,19 @@ const Ue = (t) => (e) => {
|
|
|
1276
1281
|
r,
|
|
1277
1282
|
i
|
|
1278
1283
|
);
|
|
1279
|
-
const
|
|
1284
|
+
const m = () => {
|
|
1280
1285
|
const h = a.partialize({ ...r() });
|
|
1281
1286
|
return f.setItem(a.name, {
|
|
1282
1287
|
state: h,
|
|
1283
1288
|
version: a.version
|
|
1284
1289
|
});
|
|
1285
1290
|
}, c = i.setState;
|
|
1286
|
-
i.setState = (h,
|
|
1287
|
-
c(h,
|
|
1291
|
+
i.setState = (h, v) => {
|
|
1292
|
+
c(h, v), m();
|
|
1288
1293
|
};
|
|
1289
1294
|
const p = t(
|
|
1290
1295
|
(...h) => {
|
|
1291
|
-
s(...h),
|
|
1296
|
+
s(...h), m();
|
|
1292
1297
|
},
|
|
1293
1298
|
r,
|
|
1294
1299
|
i
|
|
@@ -1296,13 +1301,13 @@ const Ue = (t) => (e) => {
|
|
|
1296
1301
|
i.getInitialState = () => p;
|
|
1297
1302
|
let y;
|
|
1298
1303
|
const E = () => {
|
|
1299
|
-
var h,
|
|
1304
|
+
var h, v;
|
|
1300
1305
|
if (!f) return;
|
|
1301
1306
|
o = !1, u.forEach((R) => {
|
|
1302
1307
|
var O;
|
|
1303
1308
|
return R((O = r()) != null ? O : p);
|
|
1304
1309
|
});
|
|
1305
|
-
const C = ((
|
|
1310
|
+
const C = ((v = a.onRehydrateStorage) == null ? void 0 : v.call(a, (h = r()) != null ? h : p)) || void 0;
|
|
1306
1311
|
return Ue(f.getItem.bind(f))(a.name).then((R) => {
|
|
1307
1312
|
if (R)
|
|
1308
1313
|
if (typeof R.version == "number" && R.version !== a.version) {
|
|
@@ -1311,7 +1316,7 @@ const Ue = (t) => (e) => {
|
|
|
1311
1316
|
R.state,
|
|
1312
1317
|
R.version
|
|
1313
1318
|
);
|
|
1314
|
-
return O instanceof Promise ? O.then((
|
|
1319
|
+
return O instanceof Promise ? O.then((q) => [!0, q]) : [!0, O];
|
|
1315
1320
|
}
|
|
1316
1321
|
console.error(
|
|
1317
1322
|
"State loaded from storage couldn't be migrated since no migrate function was provided"
|
|
@@ -1321,12 +1326,12 @@ const Ue = (t) => (e) => {
|
|
|
1321
1326
|
return [!1, void 0];
|
|
1322
1327
|
}).then((R) => {
|
|
1323
1328
|
var O;
|
|
1324
|
-
const [
|
|
1329
|
+
const [q, W] = R;
|
|
1325
1330
|
if (y = a.merge(
|
|
1326
|
-
|
|
1331
|
+
W,
|
|
1327
1332
|
(O = r()) != null ? O : p
|
|
1328
|
-
), s(y, !0),
|
|
1329
|
-
return
|
|
1333
|
+
), s(y, !0), q)
|
|
1334
|
+
return m();
|
|
1330
1335
|
}).then(() => {
|
|
1331
1336
|
C == null || C(y, void 0), y = r(), o = !0, l.forEach((R) => R(y));
|
|
1332
1337
|
}).catch((R) => {
|
|
@@ -1353,15 +1358,15 @@ const Ue = (t) => (e) => {
|
|
|
1353
1358
|
l.delete(h);
|
|
1354
1359
|
})
|
|
1355
1360
|
}, a.skipHydration || E(), y || p;
|
|
1356
|
-
},
|
|
1361
|
+
}, Rt = is, as = (t) => {
|
|
1357
1362
|
const e = (s) => {
|
|
1358
1363
|
s.key === t.persist.getOptions().name && s.newValue && t.persist.rehydrate();
|
|
1359
1364
|
};
|
|
1360
1365
|
return window.addEventListener("storage", e), () => {
|
|
1361
1366
|
window.removeEventListener("storage", e);
|
|
1362
1367
|
};
|
|
1363
|
-
},
|
|
1364
|
-
|
|
1368
|
+
}, Ct = St()(
|
|
1369
|
+
Rt(
|
|
1365
1370
|
(t) => ({
|
|
1366
1371
|
isAuthenticated: !1,
|
|
1367
1372
|
isPending: !1,
|
|
@@ -1370,31 +1375,31 @@ const Ue = (t) => (e) => {
|
|
|
1370
1375
|
}),
|
|
1371
1376
|
{
|
|
1372
1377
|
name: "auth-state",
|
|
1373
|
-
storage:
|
|
1378
|
+
storage: wt(() => localStorage)
|
|
1374
1379
|
// partialize: (s) => ({ state: s }),
|
|
1375
1380
|
}
|
|
1376
1381
|
)
|
|
1377
1382
|
);
|
|
1378
|
-
typeof window < "u" &&
|
|
1379
|
-
const
|
|
1380
|
-
|
|
1383
|
+
typeof window < "u" && as(Ct);
|
|
1384
|
+
const os = St()(
|
|
1385
|
+
Rt(
|
|
1381
1386
|
(t) => ({
|
|
1382
1387
|
selectedServer: void 0,
|
|
1383
1388
|
setSelectedServer: (e) => t({ selectedServer: e })
|
|
1384
1389
|
}),
|
|
1385
1390
|
{ name: "zudoku-selected-server" }
|
|
1386
1391
|
)
|
|
1387
|
-
),
|
|
1388
|
-
const { selectedServer: e, setSelectedServer: s } =
|
|
1389
|
-
return { selectedServer:
|
|
1392
|
+
), Os = (t) => {
|
|
1393
|
+
const { selectedServer: e, setSelectedServer: s } = os();
|
|
1394
|
+
return { selectedServer: It(
|
|
1390
1395
|
() => {
|
|
1391
1396
|
var i;
|
|
1392
1397
|
return e && t.some((a) => a.url === e) ? e : ((i = t.at(0)) == null ? void 0 : i.url) ?? "";
|
|
1393
1398
|
},
|
|
1394
1399
|
[e, t]
|
|
1395
1400
|
), setSelectedServer: s };
|
|
1396
|
-
},
|
|
1397
|
-
const { authentication: t } =
|
|
1401
|
+
}, us = () => {
|
|
1402
|
+
const { authentication: t } = Ke(), e = Ct(), s = typeof t < "u";
|
|
1398
1403
|
return {
|
|
1399
1404
|
isAuthEnabled: s,
|
|
1400
1405
|
...e,
|
|
@@ -1411,45 +1416,45 @@ const as = gt()(
|
|
|
1411
1416
|
};
|
|
1412
1417
|
};
|
|
1413
1418
|
export {
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1419
|
+
Le as A,
|
|
1420
|
+
pe as B,
|
|
1421
|
+
gs as C,
|
|
1422
|
+
gt as D,
|
|
1423
|
+
_e as E,
|
|
1424
|
+
Ss as F,
|
|
1420
1425
|
mt as G,
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1426
|
+
Yt as H,
|
|
1427
|
+
Os as I,
|
|
1428
|
+
Es as J,
|
|
1424
1429
|
ms as Q,
|
|
1425
1430
|
Ut as R,
|
|
1426
1431
|
qe as S,
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1432
|
+
es as Z,
|
|
1433
|
+
Xt as a,
|
|
1434
|
+
ws as b,
|
|
1435
|
+
xt as c,
|
|
1436
|
+
Cs as d,
|
|
1437
|
+
pt as e,
|
|
1438
|
+
Ye as f,
|
|
1439
|
+
Bt as g,
|
|
1440
|
+
Re as h,
|
|
1441
|
+
Ke as i,
|
|
1442
|
+
Z as j,
|
|
1443
|
+
us as k,
|
|
1444
|
+
Rs as l,
|
|
1445
|
+
Pt as m,
|
|
1446
|
+
Me as n,
|
|
1447
|
+
ys as o,
|
|
1448
|
+
ps as p,
|
|
1449
|
+
Se as q,
|
|
1450
|
+
Dt as r,
|
|
1451
|
+
Ee as s,
|
|
1447
1452
|
bs as t,
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1453
|
+
Ct as u,
|
|
1454
|
+
vs as v,
|
|
1455
|
+
ot as w,
|
|
1456
|
+
ut as x,
|
|
1457
|
+
ye as y,
|
|
1458
|
+
fs as z
|
|
1454
1459
|
};
|
|
1455
|
-
//# sourceMappingURL=hook-
|
|
1460
|
+
//# sourceMappingURL=hook-CWwSAAlH.js.map
|