zudoku 0.3.0-dev.82 → 0.3.0-dev.84

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.
Files changed (192) hide show
  1. package/cli.js +5 -1
  2. package/dist/app/demo.js +5 -4
  3. package/dist/app/demo.js.map +1 -1
  4. package/dist/app/main.js +3 -1
  5. package/dist/app/main.js.map +1 -1
  6. package/dist/app/standalone.js +5 -4
  7. package/dist/app/standalone.js.map +1 -1
  8. package/dist/config/validators/ResolvedSidebarSchema.d.ts +18 -0
  9. package/dist/config/validators/ResolvedSidebarSchema.js +76 -0
  10. package/dist/config/validators/ResolvedSidebarSchema.js.map +1 -0
  11. package/dist/config/validators/SidebarSchema.d.ts +177 -0
  12. package/dist/config/validators/SidebarSchema.js +71 -0
  13. package/dist/config/validators/SidebarSchema.js.map +1 -0
  14. package/dist/config/validators/validate.d.ts +411 -59
  15. package/dist/config/validators/validate.js +22 -4
  16. package/dist/config/validators/validate.js.map +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/lib/components/DevPortal.js +1 -1
  19. package/dist/lib/components/DevPortal.js.map +1 -1
  20. package/dist/lib/components/Header.js.map +1 -1
  21. package/dist/lib/components/Heading.d.ts +1 -1
  22. package/dist/lib/components/Layout.js +2 -2
  23. package/dist/lib/components/Layout.js.map +1 -1
  24. package/dist/lib/components/TopNavigation.js +5 -5
  25. package/dist/lib/components/TopNavigation.js.map +1 -1
  26. package/dist/lib/components/context/DevPortalProvider.d.ts +9 -3
  27. package/dist/lib/components/context/DevPortalProvider.js +11 -23
  28. package/dist/lib/components/context/DevPortalProvider.js.map +1 -1
  29. package/dist/lib/components/context/ThemeContext.d.ts +1 -4
  30. package/dist/lib/components/context/ThemeContext.js +3 -29
  31. package/dist/lib/components/context/ThemeContext.js.map +1 -1
  32. package/dist/lib/components/context/ThemeProvider.d.ts +4 -0
  33. package/dist/lib/components/context/ThemeProvider.js +23 -0
  34. package/dist/lib/components/context/ThemeProvider.js.map +1 -0
  35. package/dist/lib/components/navigation/Sidebar.d.ts +1 -0
  36. package/dist/lib/components/navigation/Sidebar.js +12 -0
  37. package/dist/lib/components/navigation/Sidebar.js.map +1 -0
  38. package/dist/lib/components/navigation/SidebarBadge.d.ts +22 -0
  39. package/dist/lib/components/navigation/SidebarBadge.js +24 -0
  40. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -0
  41. package/dist/lib/components/navigation/SidebarCategory.d.ts +5 -0
  42. package/dist/lib/components/navigation/SidebarCategory.js +33 -0
  43. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -0
  44. package/dist/lib/components/navigation/SidebarItem.d.ts +12 -0
  45. package/dist/lib/components/navigation/SidebarItem.js +42 -0
  46. package/dist/lib/components/navigation/SidebarItem.js.map +1 -0
  47. package/dist/lib/components/navigation/{SideNavigationWrapper.d.ts → SidebarWrapper.d.ts} +1 -1
  48. package/dist/lib/components/navigation/{SideNavigationWrapper.js → SidebarWrapper.js} +2 -2
  49. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -0
  50. package/dist/lib/components/navigation/utils.d.ts +16 -0
  51. package/dist/lib/components/navigation/utils.js +85 -0
  52. package/dist/lib/components/navigation/utils.js.map +1 -0
  53. package/dist/lib/core/DevPortalContext.d.ts +9 -32
  54. package/dist/lib/core/DevPortalContext.js +8 -5
  55. package/dist/lib/core/DevPortalContext.js.map +1 -1
  56. package/dist/lib/core/plugins.d.ts +6 -8
  57. package/dist/lib/core/plugins.js.map +1 -1
  58. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +16 -2
  59. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  60. package/dist/lib/plugins/api-keys/index.js +6 -0
  61. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  62. package/dist/lib/plugins/markdown/MdxPage.js +5 -36
  63. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  64. package/dist/lib/plugins/markdown/generateRoutes.js +20 -43
  65. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  66. package/dist/lib/plugins/openapi/Sidecar.js +12 -2
  67. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  68. package/dist/lib/plugins/openapi/index.js +14 -11
  69. package/dist/lib/plugins/openapi/index.js.map +1 -1
  70. package/dist/lib/plugins/openapi/interfaces.d.ts +1 -1
  71. package/dist/lib/util/useScrollToAnchor.js +31 -17
  72. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  73. package/dist/vite/plugin-sidebar.d.ts +3 -0
  74. package/dist/vite/plugin-sidebar.js +23 -0
  75. package/dist/vite/plugin-sidebar.js.map +1 -0
  76. package/dist/vite/plugin.js +2 -0
  77. package/dist/vite/plugin.js.map +1 -1
  78. package/lib/{AuthenticationPlugin-XS0DoAhE.js → AuthenticationPlugin-DgwV0hVu.js} +7 -7
  79. package/lib/{AuthenticationPlugin-XS0DoAhE.js.map → AuthenticationPlugin-DgwV0hVu.js.map} +1 -1
  80. package/lib/{CategoryHeading-DCmchnA1.js → CategoryHeading-BWq12Bfa.js} +3 -3
  81. package/lib/{CategoryHeading-DCmchnA1.js.map → CategoryHeading-BWq12Bfa.js.map} +1 -1
  82. package/lib/{Combination-C442XfGG.js → Combination-DkycFHkm.js} +4 -4
  83. package/lib/{Combination-C442XfGG.js.map → Combination-DkycFHkm.js.map} +1 -1
  84. package/lib/{DevPortalProvider-BWeAysxF.js → DevPortalProvider-CTxoCHIT.js} +375 -417
  85. package/lib/DevPortalProvider-CTxoCHIT.js.map +1 -0
  86. package/lib/DeveloperHint-BQSFXH01.js +10 -0
  87. package/lib/{DeveloperHint-DQVwIery.js.map → DeveloperHint-BQSFXH01.js.map} +1 -1
  88. package/lib/{Input-3IEt27jb.js → Input-BclXSY0g.js} +5 -5
  89. package/lib/{Input-3IEt27jb.js.map → Input-BclXSY0g.js.map} +1 -1
  90. package/lib/{Markdown-QsZ-PHET.js → Markdown-B_Gax7at.js} +1136 -1152
  91. package/lib/{Markdown-QsZ-PHET.js.map → Markdown-B_Gax7at.js.map} +1 -1
  92. package/lib/{MdxPage-CA1WmW14.js → MdxPage-Crlr0GmN.js} +67 -81
  93. package/lib/MdxPage-Crlr0GmN.js.map +1 -0
  94. package/lib/{OperationList-CHK_erYP.js → OperationList-nQ0bd8TU.js} +8 -8
  95. package/lib/{OperationList-CHK_erYP.js.map → OperationList-nQ0bd8TU.js.map} +1 -1
  96. package/lib/Route-CNvxEBnR.js +14 -0
  97. package/lib/{Route-D70pGn9n.js.map → Route-CNvxEBnR.js.map} +1 -1
  98. package/lib/{SlotletProvider-B71hNEUL.js → SlotletProvider-CzMAO73_.js} +12 -12
  99. package/lib/{SlotletProvider-B71hNEUL.js.map → SlotletProvider-CzMAO73_.js.map} +1 -1
  100. package/lib/Spinner-fF-Xv-gw.js +274 -0
  101. package/lib/Spinner-fF-Xv-gw.js.map +1 -0
  102. package/lib/index-7kcHaXD6.js +1771 -0
  103. package/lib/index-7kcHaXD6.js.map +1 -0
  104. package/lib/{index-Bl6YeerK.js → index-CgCPw6Jn.js} +1026 -1043
  105. package/lib/index-CgCPw6Jn.js.map +1 -0
  106. package/lib/{index-BH-Ub36F.js → index-DkuZvRNP.js} +4 -4
  107. package/lib/{index-BH-Ub36F.js.map → index-DkuZvRNP.js.map} +1 -1
  108. package/lib/joinPath-VeNuJa7y.js +8 -0
  109. package/lib/joinPath-VeNuJa7y.js.map +1 -0
  110. package/lib/jsx-runtime-B6kdoens.js +635 -0
  111. package/lib/jsx-runtime-B6kdoens.js.map +1 -0
  112. package/lib/{AnchorLink-BZcpTwOs.js → utils-CzT_9Tsn.js} +258 -214
  113. package/lib/utils-CzT_9Tsn.js.map +1 -0
  114. package/lib/zudoku.auth-clerk.js +1 -1
  115. package/lib/zudoku.auth-openid.js +2 -2
  116. package/lib/zudoku.components.js +1229 -1227
  117. package/lib/zudoku.components.js.map +1 -1
  118. package/lib/zudoku.plugin-api-keys.js +129 -107
  119. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  120. package/lib/zudoku.plugin-custom-page.js +2 -2
  121. package/lib/zudoku.plugin-markdown.js +21 -38
  122. package/lib/zudoku.plugin-markdown.js.map +1 -1
  123. package/lib/zudoku.plugin-openapi.js +8 -6
  124. package/lib/zudoku.plugin-openapi.js.map +1 -1
  125. package/package.json +4 -1
  126. package/src/app/demo.tsx +5 -4
  127. package/src/app/main.css +2 -2
  128. package/src/app/main.tsx +3 -1
  129. package/src/app/standalone.tsx +5 -4
  130. package/src/lib/components/DevPortal.tsx +1 -1
  131. package/src/lib/components/Header.tsx +2 -2
  132. package/src/lib/components/Layout.tsx +2 -2
  133. package/src/lib/components/TopNavigation.tsx +5 -5
  134. package/src/lib/components/context/DevPortalProvider.ts +11 -28
  135. package/src/lib/components/context/ThemeContext.tsx +3 -41
  136. package/src/lib/components/context/ThemeProvider.tsx +27 -0
  137. package/src/lib/components/navigation/{SideNavigation.tsx → Sidebar.tsx} +7 -7
  138. package/src/lib/components/navigation/SidebarBadge.tsx +40 -0
  139. package/src/lib/components/navigation/SidebarCategory.tsx +105 -0
  140. package/src/lib/components/navigation/SidebarItem.tsx +96 -0
  141. package/src/lib/components/navigation/{SideNavigationWrapper.tsx → SidebarWrapper.tsx} +1 -1
  142. package/src/lib/components/navigation/utils.ts +120 -0
  143. package/src/lib/core/DevPortalContext.ts +12 -44
  144. package/src/lib/core/plugins.ts +6 -13
  145. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +31 -10
  146. package/src/lib/plugins/api-keys/index.tsx +10 -0
  147. package/src/lib/plugins/markdown/MdxPage.tsx +14 -50
  148. package/src/lib/plugins/markdown/generateRoutes.tsx +29 -57
  149. package/src/lib/plugins/openapi/Sidecar.tsx +15 -2
  150. package/src/lib/plugins/openapi/index.tsx +17 -23
  151. package/src/lib/plugins/openapi/interfaces.ts +1 -1
  152. package/src/lib/util/useScrollToAnchor.ts +39 -18
  153. package/dist/lib/components/navigation/SideNavigation.d.ts +0 -1
  154. package/dist/lib/components/navigation/SideNavigation.js +0 -12
  155. package/dist/lib/components/navigation/SideNavigation.js.map +0 -1
  156. package/dist/lib/components/navigation/SideNavigationCategory.d.ts +0 -4
  157. package/dist/lib/components/navigation/SideNavigationCategory.js +0 -26
  158. package/dist/lib/components/navigation/SideNavigationCategory.js.map +0 -1
  159. package/dist/lib/components/navigation/SideNavigationItem.d.ts +0 -9
  160. package/dist/lib/components/navigation/SideNavigationItem.js +0 -44
  161. package/dist/lib/components/navigation/SideNavigationItem.js.map +0 -1
  162. package/dist/lib/components/navigation/SideNavigationWrapper.js.map +0 -1
  163. package/dist/lib/components/navigation/useNavigationCollapsibleState.d.ts +0 -9
  164. package/dist/lib/components/navigation/useNavigationCollapsibleState.js +0 -28
  165. package/dist/lib/components/navigation/useNavigationCollapsibleState.js.map +0 -1
  166. package/dist/lib/components/navigation/util.d.ts +0 -8
  167. package/dist/lib/components/navigation/util.js +0 -15
  168. package/dist/lib/components/navigation/util.js.map +0 -1
  169. package/dist/lib/plugins/openapi/MethodBadge.d.ts +0 -13
  170. package/dist/lib/plugins/openapi/MethodBadge.js +0 -26
  171. package/dist/lib/plugins/openapi/MethodBadge.js.map +0 -1
  172. package/dist/lib/util/traverseNavigation.d.ts +0 -6
  173. package/dist/lib/util/traverseNavigation.js +0 -30
  174. package/dist/lib/util/traverseNavigation.js.map +0 -1
  175. package/lib/AnchorLink-BZcpTwOs.js.map +0 -1
  176. package/lib/DevPortalProvider-BWeAysxF.js.map +0 -1
  177. package/lib/DeveloperHint-DQVwIery.js +0 -10
  178. package/lib/MdxPage-CA1WmW14.js.map +0 -1
  179. package/lib/Route-D70pGn9n.js +0 -13
  180. package/lib/Spinner-Coi7ORUV.js +0 -244
  181. package/lib/Spinner-Coi7ORUV.js.map +0 -1
  182. package/lib/index-Bl6YeerK.js.map +0 -1
  183. package/lib/index-Dt-pU7Vu.js +0 -916
  184. package/lib/index-Dt-pU7Vu.js.map +0 -1
  185. package/lib/jsx-runtime-CJBdjYYx.js +0 -1526
  186. package/lib/jsx-runtime-CJBdjYYx.js.map +0 -1
  187. package/src/lib/components/navigation/SideNavigationCategory.tsx +0 -72
  188. package/src/lib/components/navigation/SideNavigationItem.tsx +0 -148
  189. package/src/lib/components/navigation/useNavigationCollapsibleState.ts +0 -42
  190. package/src/lib/components/navigation/util.ts +0 -38
  191. package/src/lib/plugins/openapi/MethodBadge.tsx +0 -36
  192. package/src/lib/util/traverseNavigation.ts +0 -55
@@ -1,13 +1,13 @@
1
- var It = (e) => {
1
+ var qt = (e) => {
2
2
  throw TypeError(e);
3
3
  };
4
- var ct = (e, t, s) => t.has(e) || It("Cannot " + s);
5
- var i = (e, t, s) => (ct(e, t, "read from private field"), s ? s.call(e) : t.get(e)), d = (e, t, s) => t.has(e) ? It("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), c = (e, t, s, r) => (ct(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s), v = (e, t, s) => (ct(e, t, "access private method"), s);
6
- import * as A from "react";
7
- import { createContext as ae, useContext as oe } from "react";
8
- import { j as ue, u as he } from "./jsx-runtime-CJBdjYYx.js";
9
- import { m as Gt } from "./router-BiRCp01d.js";
10
- var Pt = class {
4
+ var ct = (e, t, s) => t.has(e) || qt("Cannot " + s);
5
+ var i = (e, t, s) => (ct(e, t, "read from private field"), s ? s.call(e) : t.get(e)), f = (e, t, s) => t.has(e) ? qt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), h = (e, t, s, r) => (ct(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s), v = (e, t, s) => (ct(e, t, "access private method"), s);
6
+ import * as T from "react";
7
+ import { createContext as re, useContext as ie } from "react";
8
+ import { j as ne } from "./jsx-runtime-B6kdoens.js";
9
+ import { u as ae } from "./index-7kcHaXD6.js";
10
+ var Dt = class {
11
11
  constructor() {
12
12
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
13
13
  }
@@ -24,15 +24,15 @@ var Pt = class {
24
24
  onUnsubscribe() {
25
25
  }
26
26
  }, st = typeof window > "u" || "Deno" in globalThis;
27
- function ft() {
27
+ function dt() {
28
28
  }
29
- function Ge(e, t) {
29
+ function Le(e, t) {
30
30
  return typeof e == "function" ? e(t) : e;
31
31
  }
32
- function dt(e) {
32
+ function ft(e) {
33
33
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
34
34
  }
35
- function Ht(e, t) {
35
+ function Bt(e, t) {
36
36
  return Math.max(e + (t || 0) - Date.now(), 0);
37
37
  }
38
38
  function ut(e, t) {
@@ -41,43 +41,43 @@ function ut(e, t) {
41
41
  function q(e, t) {
42
42
  return typeof e == "function" ? e(t) : e;
43
43
  }
44
- function He(e, t) {
44
+ function Ne(e, t) {
45
45
  const {
46
46
  type: s = "all",
47
47
  exact: r,
48
48
  fetchStatus: n,
49
- predicate: u,
49
+ predicate: c,
50
50
  queryKey: o,
51
51
  stale: l
52
52
  } = e;
53
53
  if (o) {
54
54
  if (r) {
55
- if (t.queryHash !== ce(o, t.options))
55
+ if (t.queryHash !== oe(o, t.options))
56
56
  return !1;
57
- } else if (!Dt(t.queryKey, o))
57
+ } else if (!Pt(t.queryKey, o))
58
58
  return !1;
59
59
  }
60
60
  if (s !== "all") {
61
- const m = t.isActive();
62
- if (s === "active" && !m || s === "inactive" && m)
61
+ const b = t.isActive();
62
+ if (s === "active" && !b || s === "inactive" && b)
63
63
  return !1;
64
64
  }
65
- return !(typeof l == "boolean" && t.isStale() !== l || n && n !== t.state.fetchStatus || u && !u(t));
65
+ return !(typeof l == "boolean" && t.isStale() !== l || n && n !== t.state.fetchStatus || c && !c(t));
66
66
  }
67
- function Ve(e, t) {
68
- const { exact: s, status: r, predicate: n, mutationKey: u } = e;
69
- if (u) {
67
+ function Ke(e, t) {
68
+ const { exact: s, status: r, predicate: n, mutationKey: c } = e;
69
+ if (c) {
70
70
  if (!t.options.mutationKey)
71
71
  return !1;
72
72
  if (s) {
73
- if (yt(t.options.mutationKey) !== yt(u))
73
+ if (yt(t.options.mutationKey) !== yt(c))
74
74
  return !1;
75
- } else if (!Dt(t.options.mutationKey, u))
75
+ } else if (!Pt(t.options.mutationKey, c))
76
76
  return !1;
77
77
  }
78
78
  return !(r && t.state.status !== r || n && !n(t));
79
79
  }
80
- function ce(e, t) {
80
+ function oe(e, t) {
81
81
  return ((t == null ? void 0 : t.queryKeyHashFn) || yt)(e);
82
82
  }
83
83
  function yt(e) {
@@ -86,21 +86,21 @@ function yt(e) {
86
86
  (t, s) => vt(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
87
87
  );
88
88
  }
89
- function Dt(e, t) {
90
- return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Dt(e[s], t[s])) : !1;
89
+ function Pt(e, t) {
90
+ return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Pt(e[s], t[s])) : !1;
91
91
  }
92
- function Vt(e, t) {
92
+ function Gt(e, t) {
93
93
  if (e === t)
94
94
  return e;
95
- const s = jt(e) && jt(t);
95
+ const s = It(e) && It(t);
96
96
  if (s || vt(e) && vt(t)) {
97
- const r = s ? e : Object.keys(e), n = r.length, u = s ? t : Object.keys(t), o = u.length, l = s ? [] : {};
98
- let m = 0;
97
+ const r = s ? e : Object.keys(e), n = r.length, c = s ? t : Object.keys(t), o = c.length, l = s ? [] : {};
98
+ let b = 0;
99
99
  for (let R = 0; R < o; R++) {
100
- const b = s ? R : u[R];
101
- (!s && r.includes(b) || s) && e[b] === void 0 && t[b] === void 0 ? (l[b] = void 0, m++) : (l[b] = Vt(e[b], t[b]), l[b] === e[b] && e[b] !== void 0 && m++);
100
+ const m = s ? R : c[R];
101
+ (!s && r.includes(m) || s) && e[m] === void 0 && t[m] === void 0 ? (l[m] = void 0, b++) : (l[m] = Gt(e[m], t[m]), l[m] === e[m] && e[m] !== void 0 && b++);
102
102
  }
103
- return n === o && m === n ? e : l;
103
+ return n === o && b === n ? e : l;
104
104
  }
105
105
  return t;
106
106
  }
@@ -112,7 +112,7 @@ function pt(e, t) {
112
112
  return !1;
113
113
  return !0;
114
114
  }
115
- function jt(e) {
115
+ function It(e) {
116
116
  return Array.isArray(e) && e.length === Object.keys(e).length;
117
117
  }
118
118
  function vt(e) {
@@ -127,31 +127,31 @@ function vt(e) {
127
127
  function xt(e) {
128
128
  return Object.prototype.toString.call(e) === "[object Object]";
129
129
  }
130
- function le(e) {
130
+ function ue(e) {
131
131
  return new Promise((t) => {
132
132
  setTimeout(t, e);
133
133
  });
134
134
  }
135
135
  function mt(e, t, s) {
136
- return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? Vt(e, t) : t;
136
+ return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? Gt(e, t) : t;
137
137
  }
138
- function $e(e, t, s = 0) {
138
+ function _e(e, t, s = 0) {
139
139
  const r = [...e, t];
140
140
  return s && r.length > s ? r.slice(1) : r;
141
141
  }
142
- function ze(e, t, s = 0) {
142
+ function Be(e, t, s = 0) {
143
143
  const r = [t, ...e];
144
144
  return s && r.length > s ? r.slice(0, -1) : r;
145
145
  }
146
- var bt = Symbol(), fe = (e, t) => (process.env.NODE_ENV !== "production" && e.queryFn === bt && console.error(
146
+ var bt = Symbol(), he = (e, t) => (process.env.NODE_ENV !== "production" && e.queryFn === bt && console.error(
147
147
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
148
- ), !e.queryFn && (t != null && t.initialPromise) ? () => t.initialPromise : !e.queryFn || e.queryFn === bt ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn), N, k, $, Lt, de = (Lt = class extends Pt {
148
+ ), !e.queryFn && (t != null && t.initialPromise) ? () => t.initialPromise : !e.queryFn || e.queryFn === bt ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn), N, M, z, kt, ce = (kt = class extends Dt {
149
149
  constructor() {
150
150
  super();
151
- d(this, N);
152
- d(this, k);
153
- d(this, $);
154
- c(this, $, (t) => {
151
+ f(this, N);
152
+ f(this, M);
153
+ f(this, z);
154
+ h(this, z, (t) => {
155
155
  if (!st && window.addEventListener) {
156
156
  const s = () => t();
157
157
  return window.addEventListener("visibilitychange", s, !1), () => {
@@ -161,20 +161,20 @@ var bt = Symbol(), fe = (e, t) => (process.env.NODE_ENV !== "production" && e.qu
161
161
  });
162
162
  }
163
163
  onSubscribe() {
164
- i(this, k) || this.setEventListener(i(this, $));
164
+ i(this, M) || this.setEventListener(i(this, z));
165
165
  }
166
166
  onUnsubscribe() {
167
167
  var t;
168
- this.hasListeners() || ((t = i(this, k)) == null || t.call(this), c(this, k, void 0));
168
+ this.hasListeners() || ((t = i(this, M)) == null || t.call(this), h(this, M, void 0));
169
169
  }
170
170
  setEventListener(t) {
171
171
  var s;
172
- c(this, $, t), (s = i(this, k)) == null || s.call(this), c(this, k, t((r) => {
172
+ h(this, z, t), (s = i(this, M)) == null || s.call(this), h(this, M, t((r) => {
173
173
  typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
174
174
  }));
175
175
  }
176
176
  setFocused(t) {
177
- i(this, N) !== t && (c(this, N, t), this.onFocus());
177
+ i(this, N) !== t && (h(this, N, t), this.onFocus());
178
178
  }
179
179
  onFocus() {
180
180
  const t = this.isFocused();
@@ -186,13 +186,13 @@ var bt = Symbol(), fe = (e, t) => (process.env.NODE_ENV !== "production" && e.qu
186
186
  var t;
187
187
  return typeof i(this, N) == "boolean" ? i(this, N) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
188
188
  }
189
- }, N = new WeakMap(), k = new WeakMap(), $ = new WeakMap(), Lt), $t = new de(), z, M, W, Nt, ye = (Nt = class extends Pt {
189
+ }, N = new WeakMap(), M = new WeakMap(), z = new WeakMap(), kt), Ht = new ce(), $, k, W, Lt, le = (Lt = class extends Dt {
190
190
  constructor() {
191
191
  super();
192
- d(this, z, !0);
193
- d(this, M);
194
- d(this, W);
195
- c(this, W, (t) => {
192
+ f(this, $, !0);
193
+ f(this, k);
194
+ f(this, W);
195
+ h(this, W, (t) => {
196
196
  if (!st && window.addEventListener) {
197
197
  const s = () => t(!0), r = () => t(!1);
198
198
  return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
@@ -202,128 +202,128 @@ var bt = Symbol(), fe = (e, t) => (process.env.NODE_ENV !== "production" && e.qu
202
202
  });
203
203
  }
204
204
  onSubscribe() {
205
- i(this, M) || this.setEventListener(i(this, W));
205
+ i(this, k) || this.setEventListener(i(this, W));
206
206
  }
207
207
  onUnsubscribe() {
208
208
  var t;
209
- this.hasListeners() || ((t = i(this, M)) == null || t.call(this), c(this, M, void 0));
209
+ this.hasListeners() || ((t = i(this, k)) == null || t.call(this), h(this, k, void 0));
210
210
  }
211
211
  setEventListener(t) {
212
212
  var s;
213
- c(this, W, t), (s = i(this, M)) == null || s.call(this), c(this, M, t(this.setOnline.bind(this)));
213
+ h(this, W, t), (s = i(this, k)) == null || s.call(this), h(this, k, t(this.setOnline.bind(this)));
214
214
  }
215
215
  setOnline(t) {
216
- i(this, z) !== t && (c(this, z, t), this.listeners.forEach((r) => {
216
+ i(this, $) !== t && (h(this, $, t), this.listeners.forEach((r) => {
217
217
  r(t);
218
218
  }));
219
219
  }
220
220
  isOnline() {
221
- return i(this, z);
221
+ return i(this, $);
222
222
  }
223
- }, z = new WeakMap(), M = new WeakMap(), W = new WeakMap(), Nt), zt = new ye();
224
- function pe(e) {
223
+ }, $ = new WeakMap(), k = new WeakMap(), W = new WeakMap(), Lt), Vt = new le();
224
+ function de(e) {
225
225
  return Math.min(1e3 * 2 ** e, 3e4);
226
226
  }
227
- function Wt(e) {
228
- return (e ?? "online") === "online" ? zt.isOnline() : !0;
227
+ function zt(e) {
228
+ return (e ?? "online") === "online" ? Vt.isOnline() : !0;
229
229
  }
230
- var Jt = class {
230
+ var $t = class {
231
231
  constructor(e) {
232
232
  this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
233
233
  }
234
234
  };
235
235
  function lt(e) {
236
- return e instanceof Jt;
236
+ return e instanceof $t;
237
237
  }
238
- function ve(e) {
239
- let t = !1, s = 0, r = !1, n, u, o;
240
- const l = new Promise((g, C) => {
241
- u = g, o = C;
242
- }), m = (g) => {
243
- var C;
244
- r || (O(new Jt(g)), (C = e.abort) == null || C.call(e));
238
+ function fe(e) {
239
+ let t = !1, s = 0, r = !1, n, c, o;
240
+ const l = new Promise((g, S) => {
241
+ c = g, o = S;
242
+ }), b = (g) => {
243
+ var S;
244
+ r || (O(new $t(g)), (S = e.abort) == null || S.call(e));
245
245
  }, R = () => {
246
246
  t = !0;
247
- }, b = () => {
247
+ }, m = () => {
248
248
  t = !1;
249
- }, a = () => $t.isFocused() && (e.networkMode === "always" || zt.isOnline()) && e.canRun(), h = () => Wt(e.networkMode) && e.canRun(), p = (g) => {
250
- var C;
251
- r || (r = !0, (C = e.onSuccess) == null || C.call(e, g), n == null || n(), u(g));
249
+ }, a = () => Ht.isFocused() && (e.networkMode === "always" || Vt.isOnline()) && e.canRun(), u = () => zt(e.networkMode) && e.canRun(), p = (g) => {
250
+ var S;
251
+ r || (r = !0, (S = e.onSuccess) == null || S.call(e, g), n == null || n(), c(g));
252
252
  }, O = (g) => {
253
- var C;
254
- r || (r = !0, (C = e.onError) == null || C.call(e, g), n == null || n(), o(g));
255
- }, T = () => new Promise((g) => {
256
- var C;
257
- n = (P) => {
258
- (r || a()) && g(P);
259
- }, (C = e.onPause) == null || C.call(e);
253
+ var S;
254
+ r || (r = !0, (S = e.onError) == null || S.call(e, g), n == null || n(), o(g));
255
+ }, U = () => new Promise((g) => {
256
+ var S;
257
+ n = (D) => {
258
+ (r || a()) && g(D);
259
+ }, (S = e.onPause) == null || S.call(e);
260
260
  }).then(() => {
261
261
  var g;
262
262
  n = void 0, r || (g = e.onContinue) == null || g.call(e);
263
- }), U = () => {
263
+ }), A = () => {
264
264
  if (r)
265
265
  return;
266
266
  let g;
267
- const C = s === 0 ? e.initialPromise : void 0;
267
+ const S = s === 0 ? e.initialPromise : void 0;
268
268
  try {
269
- g = C ?? e.fn();
270
- } catch (P) {
271
- g = Promise.reject(P);
269
+ g = S ?? e.fn();
270
+ } catch (D) {
271
+ g = Promise.reject(D);
272
272
  }
273
- Promise.resolve(g).then(p).catch((P) => {
273
+ Promise.resolve(g).then(p).catch((D) => {
274
274
  var w;
275
275
  if (r)
276
276
  return;
277
- const x = e.retry ?? (st ? 0 : 3), V = e.retryDelay ?? pe, qt = typeof V == "function" ? V(s, P) : V, ot = x === !0 || typeof x == "number" && s < x || typeof x == "function" && x(s, P);
277
+ const j = e.retry ?? (st ? 0 : 3), V = e.retryDelay ?? de, Qt = typeof V == "function" ? V(s, D) : V, ot = j === !0 || typeof j == "number" && s < j || typeof j == "function" && j(s, D);
278
278
  if (t || !ot) {
279
- O(P);
279
+ O(D);
280
280
  return;
281
281
  }
282
- s++, (w = e.onFail) == null || w.call(e, s, P), le(qt).then(() => a() ? void 0 : T()).then(() => {
283
- t ? O(P) : U();
282
+ s++, (w = e.onFail) == null || w.call(e, s, D), ue(Qt).then(() => a() ? void 0 : U()).then(() => {
283
+ t ? O(D) : A();
284
284
  });
285
285
  });
286
286
  };
287
287
  return {
288
288
  promise: l,
289
- cancel: m,
289
+ cancel: b,
290
290
  continue: () => (n == null || n(), l),
291
291
  cancelRetry: R,
292
- continueRetry: b,
293
- canStart: h,
294
- start: () => (h() ? U() : T().then(U), l)
292
+ continueRetry: m,
293
+ canStart: u,
294
+ start: () => (u() ? A() : U().then(A), l)
295
295
  };
296
296
  }
297
- function me() {
298
- let e = [], t = 0, s = (h) => {
299
- h();
300
- }, r = (h) => {
301
- h();
302
- }, n = (h) => setTimeout(h, 0);
303
- const u = (h) => {
304
- n = h;
305
- }, o = (h) => {
297
+ function ye() {
298
+ let e = [], t = 0, s = (u) => {
299
+ u();
300
+ }, r = (u) => {
301
+ u();
302
+ }, n = (u) => setTimeout(u, 0);
303
+ const c = (u) => {
304
+ n = u;
305
+ }, o = (u) => {
306
306
  let p;
307
307
  t++;
308
308
  try {
309
- p = h();
309
+ p = u();
310
310
  } finally {
311
311
  t--, t || R();
312
312
  }
313
313
  return p;
314
- }, l = (h) => {
315
- t ? e.push(h) : n(() => {
316
- s(h);
314
+ }, l = (u) => {
315
+ t ? e.push(u) : n(() => {
316
+ s(u);
317
317
  });
318
- }, m = (h) => (...p) => {
318
+ }, b = (u) => (...p) => {
319
319
  l(() => {
320
- h(...p);
320
+ u(...p);
321
321
  });
322
322
  }, R = () => {
323
- const h = e;
324
- e = [], h.length && n(() => {
323
+ const u = e;
324
+ e = [], u.length && n(() => {
325
325
  r(() => {
326
- h.forEach((p) => {
326
+ u.forEach((p) => {
327
327
  s(p);
328
328
  });
329
329
  });
@@ -331,26 +331,26 @@ function me() {
331
331
  };
332
332
  return {
333
333
  batch: o,
334
- batchCalls: m,
334
+ batchCalls: b,
335
335
  schedule: l,
336
- setNotifyFunction: (h) => {
337
- s = h;
336
+ setNotifyFunction: (u) => {
337
+ s = u;
338
338
  },
339
- setBatchNotifyFunction: (h) => {
340
- r = h;
339
+ setBatchNotifyFunction: (u) => {
340
+ r = u;
341
341
  },
342
- setScheduler: u
342
+ setScheduler: c
343
343
  };
344
344
  }
345
- var At = me(), K, Kt, be = (Kt = class {
345
+ var Tt = ye(), K, Nt, pe = (Nt = class {
346
346
  constructor() {
347
- d(this, K);
347
+ f(this, K);
348
348
  }
349
349
  destroy() {
350
350
  this.clearGcTimeout();
351
351
  }
352
352
  scheduleGc() {
353
- this.clearGcTimeout(), dt(this.gcTime) && c(this, K, setTimeout(() => {
353
+ this.clearGcTimeout(), ft(this.gcTime) && h(this, K, setTimeout(() => {
354
354
  this.optionalRemove();
355
355
  }, this.gcTime));
356
356
  }
@@ -361,36 +361,36 @@ var At = me(), K, Kt, be = (Kt = class {
361
361
  );
362
362
  }
363
363
  clearGcTimeout() {
364
- i(this, K) && (clearTimeout(i(this, K)), c(this, K, void 0));
364
+ i(this, K) && (clearTimeout(i(this, K)), h(this, K, void 0));
365
365
  }
366
- }, K = new WeakMap(), Kt), J, X, D, S, it, _, Q, j, _t, We = (_t = class extends be {
366
+ }, K = new WeakMap(), Nt), J, X, P, C, it, _, Q, x, Kt, Ge = (Kt = class extends pe {
367
367
  constructor(t) {
368
368
  super();
369
- d(this, Q);
370
- d(this, J);
371
- d(this, X);
372
- d(this, D);
373
- d(this, S);
374
- d(this, it);
375
- d(this, _);
376
- c(this, _, !1), c(this, it, t.defaultOptions), this.setOptions(t.options), this.observers = [], c(this, D, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, c(this, J, t.state || ge(this.options)), this.state = i(this, J), this.scheduleGc();
369
+ f(this, Q);
370
+ f(this, J);
371
+ f(this, X);
372
+ f(this, P);
373
+ f(this, C);
374
+ f(this, it);
375
+ f(this, _);
376
+ h(this, _, !1), h(this, it, t.defaultOptions), this.setOptions(t.options), this.observers = [], h(this, P, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, h(this, J, t.state || ve(this.options)), this.state = i(this, J), this.scheduleGc();
377
377
  }
378
378
  get meta() {
379
379
  return this.options.meta;
380
380
  }
381
381
  get promise() {
382
382
  var t;
383
- return (t = i(this, S)) == null ? void 0 : t.promise;
383
+ return (t = i(this, C)) == null ? void 0 : t.promise;
384
384
  }
385
385
  setOptions(t) {
386
386
  this.options = { ...i(this, it), ...t }, this.updateGcTime(this.options.gcTime);
387
387
  }
388
388
  optionalRemove() {
389
- !this.observers.length && this.state.fetchStatus === "idle" && i(this, D).remove(this);
389
+ !this.observers.length && this.state.fetchStatus === "idle" && i(this, P).remove(this);
390
390
  }
391
391
  setData(t, s) {
392
392
  const r = mt(this.state.data, t, this.options);
393
- return v(this, Q, j).call(this, {
393
+ return v(this, Q, x).call(this, {
394
394
  data: r,
395
395
  type: "success",
396
396
  dataUpdatedAt: s == null ? void 0 : s.updatedAt,
@@ -398,12 +398,12 @@ var At = me(), K, Kt, be = (Kt = class {
398
398
  }), r;
399
399
  }
400
400
  setState(t, s) {
401
- v(this, Q, j).call(this, { type: "setState", state: t, setStateOptions: s });
401
+ v(this, Q, x).call(this, { type: "setState", state: t, setStateOptions: s });
402
402
  }
403
403
  cancel(t) {
404
404
  var r, n;
405
- const s = (r = i(this, S)) == null ? void 0 : r.promise;
406
- return (n = i(this, S)) == null || n.cancel(t), s ? s.then(ft).catch(ft) : Promise.resolve();
405
+ const s = (r = i(this, C)) == null ? void 0 : r.promise;
406
+ return (n = i(this, C)) == null || n.cancel(t), s ? s.then(dt).catch(dt) : Promise.resolve();
407
407
  }
408
408
  destroy() {
409
409
  super.destroy(), this.cancel({ silent: !0 });
@@ -425,40 +425,40 @@ var At = me(), K, Kt, be = (Kt = class {
425
425
  ) : this.state.data === void 0;
426
426
  }
427
427
  isStaleByTime(t = 0) {
428
- return this.state.isInvalidated || this.state.data === void 0 || !Ht(this.state.dataUpdatedAt, t);
428
+ return this.state.isInvalidated || this.state.data === void 0 || !Bt(this.state.dataUpdatedAt, t);
429
429
  }
430
430
  onFocus() {
431
431
  var s;
432
432
  const t = this.observers.find((r) => r.shouldFetchOnWindowFocus());
433
- t == null || t.refetch({ cancelRefetch: !1 }), (s = i(this, S)) == null || s.continue();
433
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = i(this, C)) == null || s.continue();
434
434
  }
435
435
  onOnline() {
436
436
  var s;
437
437
  const t = this.observers.find((r) => r.shouldFetchOnReconnect());
438
- t == null || t.refetch({ cancelRefetch: !1 }), (s = i(this, S)) == null || s.continue();
438
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = i(this, C)) == null || s.continue();
439
439
  }
440
440
  addObserver(t) {
441
- this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(), i(this, D).notify({ type: "observerAdded", query: this, observer: t }));
441
+ this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(), i(this, P).notify({ type: "observerAdded", query: this, observer: t }));
442
442
  }
443
443
  removeObserver(t) {
444
- this.observers.includes(t) && (this.observers = this.observers.filter((s) => s !== t), this.observers.length || (i(this, S) && (i(this, _) ? i(this, S).cancel({ revert: !0 }) : i(this, S).cancelRetry()), this.scheduleGc()), i(this, D).notify({ type: "observerRemoved", query: this, observer: t }));
444
+ this.observers.includes(t) && (this.observers = this.observers.filter((s) => s !== t), this.observers.length || (i(this, C) && (i(this, _) ? i(this, C).cancel({ revert: !0 }) : i(this, C).cancelRetry()), this.scheduleGc()), i(this, P).notify({ type: "observerRemoved", query: this, observer: t }));
445
445
  }
446
446
  getObserversCount() {
447
447
  return this.observers.length;
448
448
  }
449
449
  invalidate() {
450
- this.state.isInvalidated || v(this, Q, j).call(this, { type: "invalidate" });
450
+ this.state.isInvalidated || v(this, Q, x).call(this, { type: "invalidate" });
451
451
  }
452
452
  fetch(t, s) {
453
- var m, R, b;
453
+ var b, R, m;
454
454
  if (this.state.fetchStatus !== "idle") {
455
455
  if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
456
456
  this.cancel({ silent: !0 });
457
- else if (i(this, S))
458
- return i(this, S).continueRetry(), i(this, S).promise;
457
+ else if (i(this, C))
458
+ return i(this, C).continueRetry(), i(this, C).promise;
459
459
  }
460
460
  if (t && this.setOptions(t), !this.options.queryFn) {
461
- const a = this.observers.find((h) => h.options.queryFn);
461
+ const a = this.observers.find((u) => u.options.queryFn);
462
462
  a && this.setOptions(a.options);
463
463
  }
464
464
  process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
@@ -467,58 +467,58 @@ var At = me(), K, Kt, be = (Kt = class {
467
467
  const r = new AbortController(), n = (a) => {
468
468
  Object.defineProperty(a, "signal", {
469
469
  enumerable: !0,
470
- get: () => (c(this, _, !0), r.signal)
470
+ get: () => (h(this, _, !0), r.signal)
471
471
  });
472
- }, u = () => {
473
- const a = fe(this.options, s), h = {
472
+ }, c = () => {
473
+ const a = he(this.options, s), u = {
474
474
  queryKey: this.queryKey,
475
475
  meta: this.meta
476
476
  };
477
- return n(h), c(this, _, !1), this.options.persister ? this.options.persister(
477
+ return n(u), h(this, _, !1), this.options.persister ? this.options.persister(
478
478
  a,
479
- h,
479
+ u,
480
480
  this
481
- ) : a(h);
481
+ ) : a(u);
482
482
  }, o = {
483
483
  fetchOptions: s,
484
484
  options: this.options,
485
485
  queryKey: this.queryKey,
486
486
  state: this.state,
487
- fetchFn: u
487
+ fetchFn: c
488
488
  };
489
- n(o), (m = this.options.behavior) == null || m.onFetch(
489
+ n(o), (b = this.options.behavior) == null || b.onFetch(
490
490
  o,
491
491
  this
492
- ), c(this, X, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((R = o.fetchOptions) == null ? void 0 : R.meta)) && v(this, Q, j).call(this, { type: "fetch", meta: (b = o.fetchOptions) == null ? void 0 : b.meta });
492
+ ), h(this, X, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((R = o.fetchOptions) == null ? void 0 : R.meta)) && v(this, Q, x).call(this, { type: "fetch", meta: (m = o.fetchOptions) == null ? void 0 : m.meta });
493
493
  const l = (a) => {
494
- var h, p, O, T;
495
- lt(a) && a.silent || v(this, Q, j).call(this, {
494
+ var u, p, O, U;
495
+ lt(a) && a.silent || v(this, Q, x).call(this, {
496
496
  type: "error",
497
497
  error: a
498
- }), lt(a) || ((p = (h = i(this, D).config).onError) == null || p.call(
499
- h,
498
+ }), lt(a) || ((p = (u = i(this, P).config).onError) == null || p.call(
499
+ u,
500
500
  a,
501
501
  this
502
- ), (T = (O = i(this, D).config).onSettled) == null || T.call(
502
+ ), (U = (O = i(this, P).config).onSettled) == null || U.call(
503
503
  O,
504
504
  this.state.data,
505
505
  a,
506
506
  this
507
507
  )), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
508
508
  };
509
- return c(this, S, ve({
509
+ return h(this, C, fe({
510
510
  initialPromise: s == null ? void 0 : s.initialPromise,
511
511
  fn: o.fetchFn,
512
512
  abort: r.abort.bind(r),
513
513
  onSuccess: (a) => {
514
- var h, p, O, T;
514
+ var u, p, O, U;
515
515
  if (a === void 0) {
516
516
  process.env.NODE_ENV !== "production" && console.error(
517
517
  `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
518
518
  ), l(new Error(`${this.queryHash} data is undefined`));
519
519
  return;
520
520
  }
521
- this.setData(a), (p = (h = i(this, D).config).onSuccess) == null || p.call(h, a, this), (T = (O = i(this, D).config).onSettled) == null || T.call(
521
+ this.setData(a), (p = (u = i(this, P).config).onSuccess) == null || p.call(u, a, this), (U = (O = i(this, P).config).onSettled) == null || U.call(
522
522
  O,
523
523
  a,
524
524
  this.state.error,
@@ -526,22 +526,22 @@ var At = me(), K, Kt, be = (Kt = class {
526
526
  ), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
527
527
  },
528
528
  onError: l,
529
- onFail: (a, h) => {
530
- v(this, Q, j).call(this, { type: "failed", failureCount: a, error: h });
529
+ onFail: (a, u) => {
530
+ v(this, Q, x).call(this, { type: "failed", failureCount: a, error: u });
531
531
  },
532
532
  onPause: () => {
533
- v(this, Q, j).call(this, { type: "pause" });
533
+ v(this, Q, x).call(this, { type: "pause" });
534
534
  },
535
535
  onContinue: () => {
536
- v(this, Q, j).call(this, { type: "continue" });
536
+ v(this, Q, x).call(this, { type: "continue" });
537
537
  },
538
538
  retry: o.options.retry,
539
539
  retryDelay: o.options.retryDelay,
540
540
  networkMode: o.options.networkMode,
541
541
  canRun: () => !0
542
- })), i(this, S).start();
542
+ })), i(this, C).start();
543
543
  }
544
- }, J = new WeakMap(), X = new WeakMap(), D = new WeakMap(), S = new WeakMap(), it = new WeakMap(), _ = new WeakMap(), Q = new WeakSet(), j = function(t) {
544
+ }, J = new WeakMap(), X = new WeakMap(), P = new WeakMap(), C = new WeakMap(), it = new WeakMap(), _ = new WeakMap(), Q = new WeakSet(), x = function(t) {
545
545
  const s = (r) => {
546
546
  switch (t.type) {
547
547
  case "failed":
@@ -563,7 +563,7 @@ var At = me(), K, Kt, be = (Kt = class {
563
563
  case "fetch":
564
564
  return {
565
565
  ...r,
566
- ...Xt(r.data, this.options),
566
+ ...Wt(r.data, this.options),
567
567
  fetchMeta: t.meta ?? null
568
568
  };
569
569
  case "success":
@@ -605,24 +605,24 @@ var At = me(), K, Kt, be = (Kt = class {
605
605
  };
606
606
  }
607
607
  };
608
- this.state = s(this.state), At.batch(() => {
608
+ this.state = s(this.state), Tt.batch(() => {
609
609
  this.observers.forEach((r) => {
610
610
  r.onQueryUpdate();
611
- }), i(this, D).notify({ query: this, type: "updated", action: t });
611
+ }), i(this, P).notify({ query: this, type: "updated", action: t });
612
612
  });
613
- }, _t);
614
- function Xt(e, t) {
613
+ }, Kt);
614
+ function Wt(e, t) {
615
615
  return {
616
616
  fetchFailureCount: 0,
617
617
  fetchFailureReason: null,
618
- fetchStatus: Wt(t.networkMode) ? "fetching" : "paused",
618
+ fetchStatus: zt(t.networkMode) ? "fetching" : "paused",
619
619
  ...e === void 0 && {
620
620
  error: null,
621
621
  status: "pending"
622
622
  }
623
623
  };
624
624
  }
625
- function ge(e) {
625
+ function ve(e) {
626
626
  const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = t !== void 0, r = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
627
627
  return {
628
628
  data: t,
@@ -639,78 +639,78 @@ function ge(e) {
639
639
  fetchStatus: "idle"
640
640
  };
641
641
  }
642
- var E, f, nt, F, B, Y, I, at, Z, tt, G, H, L, et, y, rt, gt, Rt, Ct, St, wt, Ft, Ot, Zt, Bt, Yt = (Bt = class extends Pt {
642
+ var E, d, nt, F, B, Y, I, at, Z, tt, G, H, L, et, y, rt, gt, Rt, St, Ct, wt, Ft, Ot, Xt, _t, Jt = (_t = class extends Dt {
643
643
  constructor(t, s) {
644
644
  super();
645
- d(this, y);
646
- d(this, E);
647
- d(this, f);
648
- d(this, nt);
649
- d(this, F);
650
- d(this, B);
651
- d(this, Y);
652
- d(this, I);
653
- d(this, at);
654
- d(this, Z);
645
+ f(this, y);
646
+ f(this, E);
647
+ f(this, d);
648
+ f(this, nt);
649
+ f(this, F);
650
+ f(this, B);
651
+ f(this, Y);
652
+ f(this, I);
653
+ f(this, at);
654
+ f(this, Z);
655
655
  // This property keeps track of the last query with defined data.
656
656
  // It will be used to pass the previous data and query to the placeholder function between renders.
657
- d(this, tt);
658
- d(this, G);
659
- d(this, H);
660
- d(this, L);
661
- d(this, et, /* @__PURE__ */ new Set());
662
- this.options = s, c(this, E, t), c(this, I, null), this.bindMethods(), this.setOptions(s);
657
+ f(this, tt);
658
+ f(this, G);
659
+ f(this, H);
660
+ f(this, L);
661
+ f(this, et, /* @__PURE__ */ new Set());
662
+ this.options = s, h(this, E, t), h(this, I, null), this.bindMethods(), this.setOptions(s);
663
663
  }
664
664
  bindMethods() {
665
665
  this.refetch = this.refetch.bind(this);
666
666
  }
667
667
  onSubscribe() {
668
- this.listeners.size === 1 && (i(this, f).addObserver(this), kt(i(this, f), this.options) ? v(this, y, rt).call(this) : this.updateResult(), v(this, y, St).call(this));
668
+ this.listeners.size === 1 && (i(this, d).addObserver(this), jt(i(this, d), this.options) ? v(this, y, rt).call(this) : this.updateResult(), v(this, y, Ct).call(this));
669
669
  }
670
670
  onUnsubscribe() {
671
671
  this.hasListeners() || this.destroy();
672
672
  }
673
673
  shouldFetchOnReconnect() {
674
674
  return Et(
675
- i(this, f),
675
+ i(this, d),
676
676
  this.options,
677
677
  this.options.refetchOnReconnect
678
678
  );
679
679
  }
680
680
  shouldFetchOnWindowFocus() {
681
681
  return Et(
682
- i(this, f),
682
+ i(this, d),
683
683
  this.options,
684
684
  this.options.refetchOnWindowFocus
685
685
  );
686
686
  }
687
687
  destroy() {
688
- this.listeners = /* @__PURE__ */ new Set(), v(this, y, wt).call(this), v(this, y, Ft).call(this), i(this, f).removeObserver(this);
688
+ this.listeners = /* @__PURE__ */ new Set(), v(this, y, wt).call(this), v(this, y, Ft).call(this), i(this, d).removeObserver(this);
689
689
  }
690
690
  setOptions(t, s) {
691
- const r = this.options, n = i(this, f);
692
- if (this.options = i(this, E).defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof q(this.options.enabled, i(this, f)) != "boolean")
691
+ const r = this.options, n = i(this, d);
692
+ if (this.options = i(this, E).defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof q(this.options.enabled, i(this, d)) != "boolean")
693
693
  throw new Error(
694
694
  "Expected enabled to be a boolean or a callback that returns a boolean"
695
695
  );
696
- v(this, y, Ot).call(this), i(this, f).setOptions(this.options), r._defaulted && !pt(this.options, r) && i(this, E).getQueryCache().notify({
696
+ v(this, y, Ot).call(this), i(this, d).setOptions(this.options), r._defaulted && !pt(this.options, r) && i(this, E).getQueryCache().notify({
697
697
  type: "observerOptionsUpdated",
698
- query: i(this, f),
698
+ query: i(this, d),
699
699
  observer: this
700
700
  });
701
- const u = this.hasListeners();
702
- u && Mt(
703
- i(this, f),
701
+ const c = this.hasListeners();
702
+ c && Mt(
703
+ i(this, d),
704
704
  n,
705
705
  this.options,
706
706
  r
707
- ) && v(this, y, rt).call(this), this.updateResult(s), u && (i(this, f) !== n || q(this.options.enabled, i(this, f)) !== q(r.enabled, i(this, f)) || ut(this.options.staleTime, i(this, f)) !== ut(r.staleTime, i(this, f))) && v(this, y, gt).call(this);
707
+ ) && v(this, y, rt).call(this), this.updateResult(s), c && (i(this, d) !== n || q(this.options.enabled, i(this, d)) !== q(r.enabled, i(this, d)) || ut(this.options.staleTime, i(this, d)) !== ut(r.staleTime, i(this, d))) && v(this, y, gt).call(this);
708
708
  const o = v(this, y, Rt).call(this);
709
- u && (i(this, f) !== n || q(this.options.enabled, i(this, f)) !== q(r.enabled, i(this, f)) || o !== i(this, L)) && v(this, y, Ct).call(this, o);
709
+ c && (i(this, d) !== n || q(this.options.enabled, i(this, d)) !== q(r.enabled, i(this, d)) || o !== i(this, L)) && v(this, y, St).call(this, o);
710
710
  }
711
711
  getOptimisticResult(t) {
712
712
  const s = i(this, E).getQueryCache().build(i(this, E), t), r = this.createResult(s, t);
713
- return Ce(this, r) && (c(this, F, r), c(this, Y, this.options), c(this, B, i(this, f).state)), r;
713
+ return be(this, r) && (h(this, F, r), h(this, Y, this.options), h(this, B, i(this, d).state)), r;
714
714
  }
715
715
  getCurrentResult() {
716
716
  return i(this, F);
@@ -729,7 +729,7 @@ var E, f, nt, F, B, Y, I, at, Z, tt, G, H, L, et, y, rt, gt, Rt, Ct, St, wt, Ft,
729
729
  i(this, et).add(t);
730
730
  }
731
731
  getCurrentQuery() {
732
- return i(this, f);
732
+ return i(this, d);
733
733
  }
734
734
  refetch({ ...t } = {}) {
735
735
  return this.fetch({
@@ -748,183 +748,183 @@ var E, f, nt, F, B, Y, I, at, Z, tt, G, H, L, et, y, rt, gt, Rt, Ct, St, wt, Ft,
748
748
  }
749
749
  createResult(t, s) {
750
750
  var ot;
751
- const r = i(this, f), n = this.options, u = i(this, F), o = i(this, B), l = i(this, Y), R = t !== r ? t.state : i(this, nt), { state: b } = t;
752
- let a = { ...b }, h = !1, p;
751
+ const r = i(this, d), n = this.options, c = i(this, F), o = i(this, B), l = i(this, Y), R = t !== r ? t.state : i(this, nt), { state: m } = t;
752
+ let a = { ...m }, u = !1, p;
753
753
  if (s._optimisticResults) {
754
- const w = this.hasListeners(), ht = !w && kt(t, s), ne = w && Mt(t, r, s, n);
755
- (ht || ne) && (a = {
754
+ const w = this.hasListeners(), ht = !w && jt(t, s), se = w && Mt(t, r, s, n);
755
+ (ht || se) && (a = {
756
756
  ...a,
757
- ...Xt(b.data, t.options)
757
+ ...Wt(m.data, t.options)
758
758
  }), s._optimisticResults === "isRestoring" && (a.fetchStatus = "idle");
759
759
  }
760
- let { error: O, errorUpdatedAt: T, status: U } = a;
760
+ let { error: O, errorUpdatedAt: U, status: A } = a;
761
761
  if (s.select && a.data !== void 0)
762
- if (u && a.data === (o == null ? void 0 : o.data) && s.select === i(this, at))
762
+ if (c && a.data === (o == null ? void 0 : o.data) && s.select === i(this, at))
763
763
  p = i(this, Z);
764
764
  else
765
765
  try {
766
- c(this, at, s.select), p = s.select(a.data), p = mt(u == null ? void 0 : u.data, p, s), c(this, Z, p), c(this, I, null);
766
+ h(this, at, s.select), p = s.select(a.data), p = mt(c == null ? void 0 : c.data, p, s), h(this, Z, p), h(this, I, null);
767
767
  } catch (w) {
768
- c(this, I, w);
768
+ h(this, I, w);
769
769
  }
770
770
  else
771
771
  p = a.data;
772
- if (s.placeholderData !== void 0 && p === void 0 && U === "pending") {
772
+ if (s.placeholderData !== void 0 && p === void 0 && A === "pending") {
773
773
  let w;
774
- if (u != null && u.isPlaceholderData && s.placeholderData === (l == null ? void 0 : l.placeholderData))
775
- w = u.data;
774
+ if (c != null && c.isPlaceholderData && s.placeholderData === (l == null ? void 0 : l.placeholderData))
775
+ w = c.data;
776
776
  else if (w = typeof s.placeholderData == "function" ? s.placeholderData(
777
777
  (ot = i(this, tt)) == null ? void 0 : ot.state.data,
778
778
  i(this, tt)
779
779
  ) : s.placeholderData, s.select && w !== void 0)
780
780
  try {
781
- w = s.select(w), c(this, I, null);
781
+ w = s.select(w), h(this, I, null);
782
782
  } catch (ht) {
783
- c(this, I, ht);
783
+ h(this, I, ht);
784
784
  }
785
- w !== void 0 && (U = "success", p = mt(
786
- u == null ? void 0 : u.data,
785
+ w !== void 0 && (A = "success", p = mt(
786
+ c == null ? void 0 : c.data,
787
787
  w,
788
788
  s
789
- ), h = !0);
789
+ ), u = !0);
790
790
  }
791
- i(this, I) && (O = i(this, I), p = i(this, Z), T = Date.now(), U = "error");
792
- const g = a.fetchStatus === "fetching", C = U === "pending", P = U === "error", x = C && g, V = p !== void 0;
791
+ i(this, I) && (O = i(this, I), p = i(this, Z), U = Date.now(), A = "error");
792
+ const g = a.fetchStatus === "fetching", S = A === "pending", D = A === "error", j = S && g, V = p !== void 0;
793
793
  return {
794
- status: U,
794
+ status: A,
795
795
  fetchStatus: a.fetchStatus,
796
- isPending: C,
797
- isSuccess: U === "success",
798
- isError: P,
799
- isInitialLoading: x,
800
- isLoading: x,
796
+ isPending: S,
797
+ isSuccess: A === "success",
798
+ isError: D,
799
+ isInitialLoading: j,
800
+ isLoading: j,
801
801
  data: p,
802
802
  dataUpdatedAt: a.dataUpdatedAt,
803
803
  error: O,
804
- errorUpdatedAt: T,
804
+ errorUpdatedAt: U,
805
805
  failureCount: a.fetchFailureCount,
806
806
  failureReason: a.fetchFailureReason,
807
807
  errorUpdateCount: a.errorUpdateCount,
808
808
  isFetched: a.dataUpdateCount > 0 || a.errorUpdateCount > 0,
809
809
  isFetchedAfterMount: a.dataUpdateCount > R.dataUpdateCount || a.errorUpdateCount > R.errorUpdateCount,
810
810
  isFetching: g,
811
- isRefetching: g && !C,
812
- isLoadingError: P && !V,
811
+ isRefetching: g && !S,
812
+ isLoadingError: D && !V,
813
813
  isPaused: a.fetchStatus === "paused",
814
- isPlaceholderData: h,
815
- isRefetchError: P && V,
816
- isStale: Tt(t, s),
814
+ isPlaceholderData: u,
815
+ isRefetchError: D && V,
816
+ isStale: Ut(t, s),
817
817
  refetch: this.refetch
818
818
  };
819
819
  }
820
820
  updateResult(t) {
821
- const s = i(this, F), r = this.createResult(i(this, f), this.options);
822
- if (c(this, B, i(this, f).state), c(this, Y, this.options), i(this, B).data !== void 0 && c(this, tt, i(this, f)), pt(r, s))
821
+ const s = i(this, F), r = this.createResult(i(this, d), this.options);
822
+ if (h(this, B, i(this, d).state), h(this, Y, this.options), i(this, B).data !== void 0 && h(this, tt, i(this, d)), pt(r, s))
823
823
  return;
824
- c(this, F, r);
825
- const n = {}, u = () => {
824
+ h(this, F, r);
825
+ const n = {}, c = () => {
826
826
  if (!s)
827
827
  return !0;
828
828
  const { notifyOnChangeProps: o } = this.options, l = typeof o == "function" ? o() : o;
829
829
  if (l === "all" || !l && !i(this, et).size)
830
830
  return !0;
831
- const m = new Set(
831
+ const b = new Set(
832
832
  l ?? i(this, et)
833
833
  );
834
- return this.options.throwOnError && m.add("error"), Object.keys(i(this, F)).some((R) => {
835
- const b = R;
836
- return i(this, F)[b] !== s[b] && m.has(b);
834
+ return this.options.throwOnError && b.add("error"), Object.keys(i(this, F)).some((R) => {
835
+ const m = R;
836
+ return i(this, F)[m] !== s[m] && b.has(m);
837
837
  });
838
838
  };
839
- (t == null ? void 0 : t.listeners) !== !1 && u() && (n.listeners = !0), v(this, y, Zt).call(this, { ...n, ...t });
839
+ (t == null ? void 0 : t.listeners) !== !1 && c() && (n.listeners = !0), v(this, y, Xt).call(this, { ...n, ...t });
840
840
  }
841
841
  onQueryUpdate() {
842
- this.updateResult(), this.hasListeners() && v(this, y, St).call(this);
842
+ this.updateResult(), this.hasListeners() && v(this, y, Ct).call(this);
843
843
  }
844
- }, E = new WeakMap(), f = new WeakMap(), nt = new WeakMap(), F = new WeakMap(), B = new WeakMap(), Y = new WeakMap(), I = new WeakMap(), at = new WeakMap(), Z = new WeakMap(), tt = new WeakMap(), G = new WeakMap(), H = new WeakMap(), L = new WeakMap(), et = new WeakMap(), y = new WeakSet(), rt = function(t) {
844
+ }, E = new WeakMap(), d = new WeakMap(), nt = new WeakMap(), F = new WeakMap(), B = new WeakMap(), Y = new WeakMap(), I = new WeakMap(), at = new WeakMap(), Z = new WeakMap(), tt = new WeakMap(), G = new WeakMap(), H = new WeakMap(), L = new WeakMap(), et = new WeakMap(), y = new WeakSet(), rt = function(t) {
845
845
  v(this, y, Ot).call(this);
846
- let s = i(this, f).fetch(
846
+ let s = i(this, d).fetch(
847
847
  this.options,
848
848
  t
849
849
  );
850
- return t != null && t.throwOnError || (s = s.catch(ft)), s;
850
+ return t != null && t.throwOnError || (s = s.catch(dt)), s;
851
851
  }, gt = function() {
852
852
  v(this, y, wt).call(this);
853
853
  const t = ut(
854
854
  this.options.staleTime,
855
- i(this, f)
855
+ i(this, d)
856
856
  );
857
- if (st || i(this, F).isStale || !dt(t))
857
+ if (st || i(this, F).isStale || !ft(t))
858
858
  return;
859
- const r = Ht(i(this, F).dataUpdatedAt, t) + 1;
860
- c(this, G, setTimeout(() => {
859
+ const r = Bt(i(this, F).dataUpdatedAt, t) + 1;
860
+ h(this, G, setTimeout(() => {
861
861
  i(this, F).isStale || this.updateResult();
862
862
  }, r));
863
863
  }, Rt = function() {
864
- return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(i(this, f)) : this.options.refetchInterval) ?? !1;
865
- }, Ct = function(t) {
866
- v(this, y, Ft).call(this), c(this, L, t), !(st || q(this.options.enabled, i(this, f)) === !1 || !dt(i(this, L)) || i(this, L) === 0) && c(this, H, setInterval(() => {
867
- (this.options.refetchIntervalInBackground || $t.isFocused()) && v(this, y, rt).call(this);
864
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(i(this, d)) : this.options.refetchInterval) ?? !1;
865
+ }, St = function(t) {
866
+ v(this, y, Ft).call(this), h(this, L, t), !(st || q(this.options.enabled, i(this, d)) === !1 || !ft(i(this, L)) || i(this, L) === 0) && h(this, H, setInterval(() => {
867
+ (this.options.refetchIntervalInBackground || Ht.isFocused()) && v(this, y, rt).call(this);
868
868
  }, i(this, L)));
869
- }, St = function() {
870
- v(this, y, gt).call(this), v(this, y, Ct).call(this, v(this, y, Rt).call(this));
869
+ }, Ct = function() {
870
+ v(this, y, gt).call(this), v(this, y, St).call(this, v(this, y, Rt).call(this));
871
871
  }, wt = function() {
872
- i(this, G) && (clearTimeout(i(this, G)), c(this, G, void 0));
872
+ i(this, G) && (clearTimeout(i(this, G)), h(this, G, void 0));
873
873
  }, Ft = function() {
874
- i(this, H) && (clearInterval(i(this, H)), c(this, H, void 0));
874
+ i(this, H) && (clearInterval(i(this, H)), h(this, H, void 0));
875
875
  }, Ot = function() {
876
876
  const t = i(this, E).getQueryCache().build(i(this, E), this.options);
877
- if (t === i(this, f))
877
+ if (t === i(this, d))
878
878
  return;
879
- const s = i(this, f);
880
- c(this, f, t), c(this, nt, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
881
- }, Zt = function(t) {
882
- At.batch(() => {
879
+ const s = i(this, d);
880
+ h(this, d, t), h(this, nt, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
881
+ }, Xt = function(t) {
882
+ Tt.batch(() => {
883
883
  t.listeners && this.listeners.forEach((s) => {
884
884
  s(i(this, F));
885
885
  }), i(this, E).getQueryCache().notify({
886
- query: i(this, f),
886
+ query: i(this, d),
887
887
  type: "observerResultsUpdated"
888
888
  });
889
889
  });
890
- }, Bt);
891
- function Re(e, t) {
890
+ }, _t);
891
+ function me(e, t) {
892
892
  return q(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
893
893
  }
894
- function kt(e, t) {
895
- return Re(e, t) || e.state.data !== void 0 && Et(e, t, t.refetchOnMount);
894
+ function jt(e, t) {
895
+ return me(e, t) || e.state.data !== void 0 && Et(e, t, t.refetchOnMount);
896
896
  }
897
897
  function Et(e, t, s) {
898
898
  if (q(t.enabled, e) !== !1) {
899
899
  const r = typeof s == "function" ? s(e) : s;
900
- return r === "always" || r !== !1 && Tt(e, t);
900
+ return r === "always" || r !== !1 && Ut(e, t);
901
901
  }
902
902
  return !1;
903
903
  }
904
904
  function Mt(e, t, s, r) {
905
- return (e !== t || q(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && Tt(e, s);
905
+ return (e !== t || q(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && Ut(e, s);
906
906
  }
907
- function Tt(e, t) {
907
+ function Ut(e, t) {
908
908
  return q(t.enabled, e) !== !1 && e.isStaleByTime(ut(t.staleTime, e));
909
909
  }
910
- function Ce(e, t) {
910
+ function be(e, t) {
911
911
  return !pt(e.getCurrentResult(), t);
912
912
  }
913
- var te = A.createContext(
913
+ var Yt = T.createContext(
914
914
  void 0
915
- ), Se = (e) => {
916
- const t = A.useContext(te);
915
+ ), ge = (e) => {
916
+ const t = T.useContext(Yt);
917
917
  if (!t)
918
918
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
919
919
  return t;
920
- }, Je = ({
920
+ }, He = ({
921
921
  client: e,
922
922
  children: t
923
- }) => (A.useEffect(() => (e.mount(), () => {
923
+ }) => (T.useEffect(() => (e.mount(), () => {
924
924
  e.unmount();
925
- }), [e]), /* @__PURE__ */ ue.jsx(te.Provider, { value: e, children: t })), ee = A.createContext(!1), we = () => A.useContext(ee);
926
- ee.Provider;
927
- function Fe() {
925
+ }), [e]), /* @__PURE__ */ ne.jsx(Yt.Provider, { value: e, children: t })), Zt = T.createContext(!1), Re = () => T.useContext(Zt);
926
+ Zt.Provider;
927
+ function Se() {
928
928
  let e = !1;
929
929
  return {
930
930
  clearReset: () => {
@@ -936,191 +936,149 @@ function Fe() {
936
936
  isReset: () => e
937
937
  };
938
938
  }
939
- var Oe = A.createContext(Fe()), Ee = () => A.useContext(Oe);
940
- function Pe(e, t) {
939
+ var Ce = T.createContext(Se()), we = () => T.useContext(Ce);
940
+ function Fe(e, t) {
941
941
  return typeof e == "function" ? e(...t) : !!e;
942
942
  }
943
- function Xe() {
943
+ function Ve() {
944
944
  }
945
- var De = (e, t) => {
945
+ var Oe = (e, t) => {
946
946
  (e.suspense || e.throwOnError) && (t.isReset() || (e.retryOnMount = !1));
947
- }, Ae = (e) => {
948
- A.useEffect(() => {
947
+ }, Ee = (e) => {
948
+ T.useEffect(() => {
949
949
  e.clearReset();
950
950
  }, [e]);
951
- }, Te = ({
951
+ }, De = ({
952
952
  result: e,
953
953
  errorResetBoundary: t,
954
954
  throwOnError: s,
955
955
  query: r
956
- }) => e.isError && !t.isReset() && !e.isFetching && r && Pe(s, [e.error, r]), Ue = (e, t) => t.state.data === void 0, Qe = (e) => {
956
+ }) => e.isError && !t.isReset() && !e.isFetching && r && Fe(s, [e.error, r]), Pe = (e, t) => t.state.data === void 0, Te = (e) => {
957
957
  e.suspense && typeof e.staleTime != "number" && (e.staleTime = 1e3);
958
- }, qe = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, Ie = (e, t, s) => t.fetchOptimistic(e).catch(() => {
958
+ }, Ue = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, Ae = (e, t, s) => t.fetchOptimistic(e).catch(() => {
959
959
  s.clearReset();
960
960
  });
961
- function se(e, t, s) {
962
- var R, b, a, h;
961
+ function te(e, t, s) {
962
+ var R, m, a, u;
963
963
  if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e)))
964
964
  throw new Error(
965
965
  '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'
966
966
  );
967
- const r = Se(), n = we(), u = Ee(), o = r.defaultQueryOptions(e);
968
- (b = (R = r.getDefaultOptions().queries) == null ? void 0 : R._experimental_beforeQuery) == null || b.call(
967
+ const r = ge(), n = Re(), c = we(), o = r.defaultQueryOptions(e);
968
+ (m = (R = r.getDefaultOptions().queries) == null ? void 0 : R._experimental_beforeQuery) == null || m.call(
969
969
  R,
970
970
  o
971
- ), o._optimisticResults = n ? "isRestoring" : "optimistic", Qe(o), De(o, u), Ae(u);
972
- const [l] = A.useState(
971
+ ), o._optimisticResults = n ? "isRestoring" : "optimistic", Te(o), Oe(o, c), Ee(c);
972
+ const [l] = T.useState(
973
973
  () => new t(
974
974
  r,
975
975
  o
976
976
  )
977
- ), m = l.getOptimisticResult(o);
978
- if (A.useSyncExternalStore(
979
- A.useCallback(
977
+ ), b = l.getOptimisticResult(o);
978
+ if (T.useSyncExternalStore(
979
+ T.useCallback(
980
980
  (p) => {
981
981
  const O = n ? () => {
982
- } : l.subscribe(At.batchCalls(p));
982
+ } : l.subscribe(Tt.batchCalls(p));
983
983
  return l.updateResult(), O;
984
984
  },
985
985
  [l, n]
986
986
  ),
987
987
  () => l.getCurrentResult(),
988
988
  () => l.getCurrentResult()
989
- ), A.useEffect(() => {
989
+ ), T.useEffect(() => {
990
990
  l.setOptions(o, { listeners: !1 });
991
- }, [o, l]), qe(o, m))
992
- throw Ie(o, l, u);
993
- if (Te({
994
- result: m,
995
- errorResetBoundary: u,
991
+ }, [o, l]), Ue(o, b))
992
+ throw Ae(o, l, c);
993
+ if (De({
994
+ result: b,
995
+ errorResetBoundary: c,
996
996
  throwOnError: o.throwOnError,
997
997
  query: r.getQueryCache().get(o.queryHash)
998
998
  }))
999
- throw m.error;
1000
- return (h = (a = r.getDefaultOptions().queries) == null ? void 0 : a._experimental_afterQuery) == null || h.call(
999
+ throw b.error;
1000
+ return (u = (a = r.getDefaultOptions().queries) == null ? void 0 : a._experimental_afterQuery) == null || u.call(
1001
1001
  a,
1002
1002
  o,
1003
- m
1004
- ), o.notifyOnChangeProps ? m : l.trackResult(m);
1003
+ b
1004
+ ), o.notifyOnChangeProps ? b : l.trackResult(b);
1005
1005
  }
1006
- function je(e, t) {
1007
- return se(e, Yt);
1006
+ function Qe(e, t) {
1007
+ return te(e, Jt);
1008
1008
  }
1009
- function xe(e, t) {
1010
- return process.env.NODE_ENV !== "production" && e.queryFn === bt && console.error("skipToken is not allowed for useSuspenseQuery"), se(
1009
+ function qe(e, t) {
1010
+ return process.env.NODE_ENV !== "production" && e.queryFn === bt && console.error("skipToken is not allowed for useSuspenseQuery"), te(
1011
1011
  {
1012
1012
  ...e,
1013
1013
  enabled: !0,
1014
1014
  suspense: !0,
1015
- throwOnError: Ue,
1015
+ throwOnError: Pe,
1016
1016
  placeholderData: void 0
1017
1017
  },
1018
- Yt
1018
+ Jt
1019
1019
  );
1020
1020
  }
1021
- const re = (e) => "path" in e, Ye = (e) => "href" in e, Ze = (e, t, s) => !!Ut(
1022
- e,
1023
- (r, n) => {
1024
- if (re(r) && Gt(n, t))
1025
- return !0;
1026
- },
1027
- s
1028
- ), ke = (...e) => {
1029
- const t = e.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
1030
- return t ? `/${t}` : "";
1031
- }, Ut = (e, t, s, r = []) => {
1032
- const n = re(e) ? ke(s, e.path) : s, u = t(e, n, r);
1033
- if (u !== void 0) return u;
1034
- if ("children" in e && e.children) {
1035
- const o = [...r, e];
1036
- for (const l of e.children) {
1037
- const m = Ut(
1038
- l,
1039
- t,
1040
- n,
1041
- o
1042
- );
1043
- if (m !== void 0) return m;
1044
- }
1045
- }
1046
- }, Me = (e, t) => {
1047
- if (e.categories)
1048
- for (const s of e.categories) {
1049
- const r = Ut(s, t, e.path);
1050
- if (r !== void 0) return r;
1051
- }
1052
- }, ie = ae(
1021
+ const ee = re(
1053
1022
  void 0
1054
- ), ts = ie.Provider, Qt = () => {
1055
- const e = oe(ie);
1023
+ ), ze = ee.Provider, At = () => {
1024
+ const e = ie(ee);
1056
1025
  if (!e)
1057
1026
  throw new Error("useDevPortal must be used within a DevPortalProvider.");
1058
1027
  return e;
1059
- }, es = () => {
1060
- const { getApiIdentities: e } = Qt();
1061
- return je({
1028
+ }, $e = () => {
1029
+ const { getApiIdentities: e } = At();
1030
+ return Qe({
1062
1031
  queryFn: e,
1063
1032
  queryKey: ["api-identities"]
1064
1033
  });
1065
- }, Le = () => {
1066
- const { navigation: e } = Qt(), t = he();
1067
- for (const s of e) {
1068
- const r = Me(s, (n, u) => {
1069
- if (t.pathname === u)
1070
- return s;
1071
- });
1072
- if (r)
1073
- return r;
1074
- }
1075
- return t.pathname === "/" ? e.find((s) => s.path === "/") : e.find(
1076
- (s) => s.path !== "/" && Gt({ path: s.path, end: !1 }, t.pathname)
1077
- );
1078
- }, ss = () => {
1079
- const { getNavigation: e } = Qt(), t = Le(), s = (t == null ? void 0 : t.path) ?? "";
1080
- return xe({
1081
- queryFn: async () => ({
1082
- items: [...(t == null ? void 0 : t.categories) ?? [], ...await e(s)],
1083
- currentTopNavItem: t
1084
- }),
1085
- queryKey: ["navigation", s]
1034
+ }, Ie = () => {
1035
+ const { topNavigation: e } = At(), s = ae().pathname.split("/").at(1);
1036
+ if (s)
1037
+ return e.find((r) => r.id === s);
1038
+ }, We = () => {
1039
+ const { getPluginNavigation: e, sidebars: t } = At(), s = Ie(), r = s == null ? void 0 : s.id, n = r ? t[r] ?? [] : [];
1040
+ return qe({
1041
+ queryFn: async () => {
1042
+ const c = r ? await e(r) : [];
1043
+ return {
1044
+ items: [...n, ...c],
1045
+ currentTopNavItem: s
1046
+ };
1047
+ },
1048
+ queryKey: ["navigation", r]
1086
1049
  });
1087
1050
  };
1088
1051
  export {
1089
- es as A,
1090
- je as B,
1091
- pt as C,
1092
- ts as D,
1093
- Xe as E,
1094
- Pe as F,
1095
- ve as G,
1096
- We as Q,
1097
- be as R,
1098
- Pt as S,
1099
- Ve as a,
1100
- ft as b,
1101
- ze as c,
1102
- $e as d,
1103
- fe as e,
1104
- $t as f,
1105
- Ge as g,
1106
- ce as h,
1052
+ fe as A,
1053
+ ze as D,
1054
+ Ge as Q,
1055
+ pe as R,
1056
+ Dt as S,
1057
+ Ke as a,
1058
+ dt as b,
1059
+ Be as c,
1060
+ _e as d,
1061
+ he as e,
1062
+ Ht as f,
1063
+ Le as g,
1064
+ oe as h,
1107
1065
  yt as i,
1108
- Je as j,
1109
- Ze as k,
1110
- re as l,
1111
- He as m,
1112
- At as n,
1113
- zt as o,
1114
- Dt as p,
1115
- ke as q,
1066
+ He as j,
1067
+ Ie as k,
1068
+ We as l,
1069
+ Ne as m,
1070
+ Tt as n,
1071
+ Vt as o,
1072
+ Pt as p,
1073
+ ge as q,
1116
1074
  ut as r,
1117
1075
  bt as s,
1118
- Ye as t,
1119
- Qt as u,
1120
- Le as v,
1121
- ss as w,
1122
- Se as x,
1123
- xe as y,
1124
- Me as z
1076
+ qe as t,
1077
+ At as u,
1078
+ $e as v,
1079
+ Qe as w,
1080
+ pt as x,
1081
+ Ve as y,
1082
+ Fe as z
1125
1083
  };
1126
- //# sourceMappingURL=DevPortalProvider-BWeAysxF.js.map
1084
+ //# sourceMappingURL=DevPortalProvider-CTxoCHIT.js.map