zudoku 0.26.0 → 0.27.0

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 (300) hide show
  1. package/dist/app/main.d.ts +1 -1
  2. package/dist/app/main.js +19 -7
  3. package/dist/app/main.js.map +1 -1
  4. package/dist/config/config.d.ts +1 -0
  5. package/dist/config/validators/InputSidebarSchema.d.ts +2 -2
  6. package/dist/config/validators/common.d.ts +78 -0
  7. package/dist/config/validators/common.js +6 -0
  8. package/dist/config/validators/common.js.map +1 -1
  9. package/dist/config/validators/validate.d.ts +34 -0
  10. package/dist/lib/authentication/providers/auth0.js +1 -1
  11. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  12. package/dist/lib/authentication/providers/openid.d.ts +1 -1
  13. package/dist/lib/authentication/providers/openid.js +10 -6
  14. package/dist/lib/authentication/providers/openid.js.map +1 -1
  15. package/dist/lib/components/AnchorLink.js +5 -2
  16. package/dist/lib/components/AnchorLink.js.map +1 -1
  17. package/dist/lib/components/Autocomplete.d.ts +12 -0
  18. package/dist/lib/components/Autocomplete.js +47 -0
  19. package/dist/lib/components/Autocomplete.js.map +1 -0
  20. package/dist/lib/components/Header.js +4 -4
  21. package/dist/lib/components/Header.js.map +1 -1
  22. package/dist/lib/components/Heading.d.ts +1 -1
  23. package/dist/lib/components/Markdown.d.ts +2 -2
  24. package/dist/lib/components/Markdown.js +3 -1
  25. package/dist/lib/components/Markdown.js.map +1 -1
  26. package/dist/lib/components/StatusPage.d.ts +7 -0
  27. package/dist/lib/components/StatusPage.js +71 -0
  28. package/dist/lib/components/StatusPage.js.map +1 -0
  29. package/dist/lib/components/SyntaxHighlight.d.ts +2 -1
  30. package/dist/lib/components/SyntaxHighlight.js +2 -2
  31. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  32. package/dist/lib/components/ThemeSwitch.js +4 -4
  33. package/dist/lib/components/ThemeSwitch.js.map +1 -1
  34. package/dist/lib/components/cache.d.ts +6 -0
  35. package/dist/lib/components/cache.js +13 -0
  36. package/dist/lib/components/cache.js.map +1 -0
  37. package/dist/lib/components/context/ViewportAnchorContext.js +16 -4
  38. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  39. package/dist/lib/components/context/ZudokuContext.js +2 -1
  40. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  41. package/dist/lib/components/index.d.ts +9 -2
  42. package/dist/lib/components/index.js +5 -2
  43. package/dist/lib/components/index.js.map +1 -1
  44. package/dist/lib/core/RouteGuard.d.ts +1 -0
  45. package/dist/lib/core/RouteGuard.js +28 -0
  46. package/dist/lib/core/RouteGuard.js.map +1 -0
  47. package/dist/lib/core/ZudokuContext.d.ts +4 -2
  48. package/dist/lib/core/ZudokuContext.js +9 -7
  49. package/dist/lib/core/ZudokuContext.js.map +1 -1
  50. package/dist/lib/oas/graphql/circular.d.ts +3 -0
  51. package/dist/lib/oas/graphql/circular.js +27 -0
  52. package/dist/lib/oas/graphql/circular.js.map +1 -0
  53. package/dist/lib/oas/graphql/index.js +5 -6
  54. package/dist/lib/oas/graphql/index.js.map +1 -1
  55. package/dist/lib/oas/parser/dereference/index.d.ts +0 -1
  56. package/dist/lib/oas/parser/dereference/index.js +1 -1
  57. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  58. package/dist/lib/plugins/markdown/MdxPage.js +8 -2
  59. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  60. package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
  61. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  62. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  63. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  64. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -1
  65. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -2
  66. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  67. package/dist/lib/plugins/openapi/Sidecar.js +3 -3
  68. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  69. package/dist/lib/plugins/openapi/index.js +4 -11
  70. package/dist/lib/plugins/openapi/index.js.map +1 -1
  71. package/dist/lib/plugins/openapi/interfaces.d.ts +7 -2
  72. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
  73. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +12 -0
  74. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
  75. package/dist/lib/plugins/openapi/playground/Headers.js +67 -4
  76. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  77. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +5 -0
  78. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +4 -0
  79. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -0
  80. package/dist/lib/plugins/openapi/playground/PathParams.js +4 -12
  81. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  82. package/dist/lib/plugins/openapi/playground/Playground.d.ts +18 -1
  83. package/dist/lib/plugins/openapi/playground/Playground.js +53 -40
  84. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  85. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  86. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  87. package/dist/lib/plugins/openapi/playground/QueryParams.js +21 -30
  88. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  89. package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +7 -0
  90. package/dist/lib/plugins/openapi/playground/SubmitButton.js +22 -0
  91. package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -0
  92. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +7 -0
  93. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +11 -0
  94. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +1 -0
  95. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +8 -0
  96. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +95 -0
  97. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -0
  98. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +7 -0
  99. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +16 -0
  100. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -0
  101. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +10 -0
  102. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +32 -0
  103. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -0
  104. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.d.ts +1 -0
  105. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js +56 -0
  106. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js.map +1 -0
  107. package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +2 -1
  108. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +5 -3
  109. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -1
  110. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +49 -0
  111. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -1
  112. package/dist/lib/plugins/openapi/post-processors/removeParameters.d.ts +10 -0
  113. package/dist/lib/plugins/openapi/post-processors/removeParameters.js +66 -0
  114. package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +1 -0
  115. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.d.ts +1 -0
  116. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js +131 -0
  117. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +1 -0
  118. package/dist/lib/plugins/openapi/schema/SchemaComponents.js +1 -1
  119. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +1 -1
  120. package/dist/lib/ui/Command.d.ts +9 -1
  121. package/dist/lib/ui/Command.js +5 -1
  122. package/dist/lib/ui/Command.js.map +1 -1
  123. package/dist/lib/ui/Select.js +2 -2
  124. package/dist/lib/ui/Select.js.map +1 -1
  125. package/dist/lib/util/MdxComponents.js +2 -2
  126. package/dist/lib/util/MdxComponents.js.map +1 -1
  127. package/dist/lib/util/joinUrl.d.ts +1 -0
  128. package/dist/lib/util/joinUrl.js +40 -0
  129. package/dist/lib/util/joinUrl.js.map +1 -0
  130. package/dist/lib/util/useScrollToAnchor.d.ts +1 -0
  131. package/dist/lib/util/useScrollToAnchor.js +26 -15
  132. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  133. package/dist/vite/build.js +10 -10
  134. package/dist/vite/build.js.map +1 -1
  135. package/dist/vite/config.js +4 -1
  136. package/dist/vite/config.js.map +1 -1
  137. package/dist/vite/dev-server.js +4 -1
  138. package/dist/vite/dev-server.js.map +1 -1
  139. package/dist/vite/plugin-api.d.ts +1 -1
  140. package/dist/vite/plugin-api.js +31 -7
  141. package/dist/vite/plugin-api.js.map +1 -1
  142. package/dist/vite/plugin-auth.js +4 -1
  143. package/dist/vite/plugin-auth.js.map +1 -1
  144. package/dist/vite/plugin-mdx.js +9 -4
  145. package/dist/vite/plugin-mdx.js.map +1 -1
  146. package/dist/vite/prerender.d.ts +2 -2
  147. package/dist/vite/prerender.js +5 -4
  148. package/dist/vite/prerender.js.map +1 -1
  149. package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
  150. package/dist/zuplo/enrich-with-zuplo.js +184 -0
  151. package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
  152. package/dist/zuplo/env.d.ts +1 -0
  153. package/dist/zuplo/env.js +3 -0
  154. package/dist/zuplo/env.js.map +1 -1
  155. package/dist/zuplo/policy-types.d.ts +33 -0
  156. package/dist/zuplo/policy-types.js +8 -0
  157. package/dist/zuplo/policy-types.js.map +1 -0
  158. package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
  159. package/dist/zuplo/with-zuplo-processors.js +26 -0
  160. package/dist/zuplo/with-zuplo-processors.js.map +1 -0
  161. package/dist/zuplo/with-zuplo.d.ts +1 -1
  162. package/dist/zuplo/with-zuplo.js +7 -26
  163. package/dist/zuplo/with-zuplo.js.map +1 -1
  164. package/lib/{AuthenticationPlugin-DNXBcsVN.js → AuthenticationPlugin-CO_YCd2x.js} +3 -3
  165. package/lib/{AuthenticationPlugin-DNXBcsVN.js.map → AuthenticationPlugin-CO_YCd2x.js.map} +1 -1
  166. package/lib/{Markdown-BrfrjEk_.js → Markdown-B8o9Qz4q.js} +1197 -1186
  167. package/lib/{Markdown-BrfrjEk_.js.map → Markdown-B8o9Qz4q.js.map} +1 -1
  168. package/lib/{MdxPage-LNZLj_A5.js → MdxPage-BxRt3Ly7.js} +63 -58
  169. package/lib/MdxPage-BxRt3Ly7.js.map +1 -0
  170. package/lib/OperationList-DH-zIgtq.js +5160 -0
  171. package/lib/OperationList-DH-zIgtq.js.map +1 -0
  172. package/lib/{Route-Pzk6qwIk.js → Route-DJ0ZlVq1.js} +3 -3
  173. package/lib/{Route-Pzk6qwIk.js.map → Route-DJ0ZlVq1.js.map} +1 -1
  174. package/lib/{Select-DkOpAG0c.js → Select-B7UXR0SB.js} +61 -61
  175. package/lib/Select-B7UXR0SB.js.map +1 -0
  176. package/lib/{SlotletProvider-DPbx9KdU.js → SlotletProvider-CtIp8rP3.js} +4 -4
  177. package/lib/{SlotletProvider-DPbx9KdU.js.map → SlotletProvider-CtIp8rP3.js.map} +1 -1
  178. package/lib/{Button-oroWHXAy.js → Spinner-BlzrEEk1.js} +15 -12
  179. package/lib/Spinner-BlzrEEk1.js.map +1 -0
  180. package/lib/{SyntaxHighlight-CJCSPG1F.js → SyntaxHighlight-C1w1QPdY.js} +300 -295
  181. package/lib/{SyntaxHighlight-CJCSPG1F.js.map → SyntaxHighlight-C1w1QPdY.js.map} +1 -1
  182. package/lib/{ZudokuContext-D3ayHjP-.js → ZudokuContext-8jts0fF3.js} +259 -248
  183. package/lib/ZudokuContext-8jts0fF3.js.map +1 -0
  184. package/lib/{chunk-SYFQ2XB5-KWlHsT7t.js → chunk-SYFQ2XB5-BPvC-soB.js} +6 -5
  185. package/lib/{chunk-SYFQ2XB5-KWlHsT7t.js.map → chunk-SYFQ2XB5-BPvC-soB.js.map} +1 -1
  186. package/lib/circular-Dgpd6AN-.js +15397 -0
  187. package/lib/circular-Dgpd6AN-.js.map +1 -0
  188. package/lib/{createServer-BcaswoFO.js → createServer-BV0tHzLK.js} +3450 -5577
  189. package/lib/createServer-BV0tHzLK.js.map +1 -0
  190. package/lib/{hook-DUyACbIK.js → hook-BG02esyv.js} +2 -2
  191. package/lib/{hook-DUyACbIK.js.map → hook-BG02esyv.js.map} +1 -1
  192. package/lib/index-B7mqiOei.js +509 -0
  193. package/lib/index-B7mqiOei.js.map +1 -0
  194. package/lib/index-DmqsUPcm.js +1915 -0
  195. package/lib/index-DmqsUPcm.js.map +1 -0
  196. package/lib/joinUrl-BTy9bvoK.js +20 -0
  197. package/lib/joinUrl-BTy9bvoK.js.map +1 -0
  198. package/lib/post-processors/removeExtensions.js +7 -7
  199. package/lib/post-processors/removeExtensions.js.map +1 -1
  200. package/lib/post-processors/removeParameters.js +48 -0
  201. package/lib/post-processors/removeParameters.js.map +1 -0
  202. package/lib/ui/ActionButton.js +10 -11
  203. package/lib/ui/ActionButton.js.map +1 -1
  204. package/lib/ui/Command.js +125 -13
  205. package/lib/ui/Command.js.map +1 -1
  206. package/lib/ui/Select.js +2 -2
  207. package/lib/ui/Select.js.map +1 -1
  208. package/lib/{useExposedProps-BBHR7aLM.js → useExposedProps-BLKFBylA.js} +2 -2
  209. package/lib/{useExposedProps-BBHR7aLM.js.map → useExposedProps-BLKFBylA.js.map} +1 -1
  210. package/lib/useScrollToAnchor-Bl6mz9_x.js +288 -0
  211. package/lib/useScrollToAnchor-Bl6mz9_x.js.map +1 -0
  212. package/lib/zudoku.auth-auth0.js +7 -9
  213. package/lib/zudoku.auth-auth0.js.map +1 -1
  214. package/lib/zudoku.auth-clerk.js +1 -1
  215. package/lib/zudoku.auth-openid.js +223 -219
  216. package/lib/zudoku.auth-openid.js.map +1 -1
  217. package/lib/zudoku.components.js +754 -992
  218. package/lib/zudoku.components.js.map +1 -1
  219. package/lib/zudoku.plugin-api-catalog.js +3 -3
  220. package/lib/zudoku.plugin-api-keys.js +5 -5
  221. package/lib/zudoku.plugin-custom-pages.js +2 -2
  222. package/lib/zudoku.plugin-markdown.js +1 -1
  223. package/lib/zudoku.plugin-openapi.js +4 -4
  224. package/lib/zudoku.plugin-redirect.js +1 -1
  225. package/package.json +2 -2
  226. package/src/app/main.css +50 -50
  227. package/src/app/main.tsx +26 -7
  228. package/src/lib/authentication/providers/auth0.tsx +1 -4
  229. package/src/lib/authentication/providers/openid.tsx +12 -5
  230. package/src/lib/components/AnchorLink.tsx +5 -2
  231. package/src/lib/components/Autocomplete.tsx +111 -0
  232. package/src/lib/components/Header.tsx +4 -4
  233. package/src/lib/components/Markdown.tsx +14 -15
  234. package/src/lib/components/StatusPage.tsx +91 -0
  235. package/src/lib/components/SyntaxHighlight.tsx +14 -0
  236. package/src/lib/components/ThemeSwitch.tsx +14 -15
  237. package/src/lib/components/cache.ts +15 -0
  238. package/src/lib/components/context/ViewportAnchorContext.tsx +20 -6
  239. package/src/lib/components/context/ZudokuContext.ts +3 -1
  240. package/src/lib/components/index.ts +9 -2
  241. package/src/lib/core/RouteGuard.tsx +35 -0
  242. package/src/lib/core/ZudokuContext.ts +9 -8
  243. package/src/lib/oas/graphql/circular.ts +29 -0
  244. package/src/lib/oas/graphql/index.ts +9 -9
  245. package/src/lib/oas/parser/dereference/index.ts +1 -2
  246. package/src/lib/plugins/markdown/MdxPage.tsx +9 -1
  247. package/src/lib/plugins/openapi/OperationListItem.tsx +0 -2
  248. package/src/lib/plugins/openapi/ParameterListItem.tsx +1 -0
  249. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +5 -0
  250. package/src/lib/plugins/openapi/Sidecar.tsx +4 -2
  251. package/src/lib/plugins/openapi/index.tsx +9 -15
  252. package/src/lib/plugins/openapi/interfaces.ts +10 -2
  253. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +54 -0
  254. package/src/lib/plugins/openapi/playground/Headers.tsx +136 -39
  255. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +8 -0
  256. package/src/lib/plugins/openapi/playground/PathParams.tsx +34 -74
  257. package/src/lib/plugins/openapi/playground/Playground.tsx +219 -177
  258. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  259. package/src/lib/plugins/openapi/playground/QueryParams.tsx +90 -122
  260. package/src/lib/plugins/openapi/playground/SubmitButton.tsx +75 -0
  261. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +73 -0
  262. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +210 -0
  263. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +101 -0
  264. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.test.ts +64 -0
  265. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +36 -0
  266. package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +58 -0
  267. package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +7 -4
  268. package/src/lib/plugins/openapi/post-processors/removeParameters.test.ts +148 -0
  269. package/src/lib/plugins/openapi/post-processors/removeParameters.ts +101 -0
  270. package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +1 -1
  271. package/src/lib/ui/Command.tsx +20 -0
  272. package/src/lib/ui/Select.tsx +1 -1
  273. package/src/lib/util/MdxComponents.tsx +2 -1
  274. package/src/lib/util/joinUrl.ts +57 -0
  275. package/src/lib/util/useScrollToAnchor.ts +32 -15
  276. package/dist/lib/plugins/openapi/playground/EnumSelector.d.ts +0 -8
  277. package/dist/lib/plugins/openapi/playground/EnumSelector.js +0 -21
  278. package/dist/lib/plugins/openapi/playground/EnumSelector.js.map +0 -1
  279. package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +0 -4
  280. package/dist/lib/plugins/openapi/playground/ResponseTab.js +0 -42
  281. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +0 -1
  282. package/lib/AnchorLink-_Vu02ceN.js +0 -34
  283. package/lib/AnchorLink-_Vu02ceN.js.map +0 -1
  284. package/lib/Button-oroWHXAy.js.map +0 -1
  285. package/lib/Command-D5DE0DD7.js +0 -611
  286. package/lib/Command-D5DE0DD7.js.map +0 -1
  287. package/lib/MdxPage-LNZLj_A5.js.map +0 -1
  288. package/lib/OperationList-PCwzTp1r.js +0 -5144
  289. package/lib/OperationList-PCwzTp1r.js.map +0 -1
  290. package/lib/Select-DkOpAG0c.js.map +0 -1
  291. package/lib/Spinner-C5gHXrVz.js +0 -7
  292. package/lib/Spinner-C5gHXrVz.js.map +0 -1
  293. package/lib/ZudokuContext-D3ayHjP-.js.map +0 -1
  294. package/lib/createServer-BcaswoFO.js.map +0 -1
  295. package/lib/index-CaILD1AV.js +0 -1292
  296. package/lib/index-CaILD1AV.js.map +0 -1
  297. package/lib/index-TaRXY2w1.js +0 -43
  298. package/lib/index-TaRXY2w1.js.map +0 -1
  299. package/src/lib/plugins/openapi/playground/EnumSelector.tsx +0 -86
  300. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -76
@@ -1,13 +1,13 @@
1
- var _e = (t) => {
1
+ var Ke = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var me = (t, e, s) => e.has(t) || _e("Cannot " + s);
5
- var n = (t, e, s) => (me(t, e, "read from private field"), s ? s.call(t) : e.get(t)), f = (t, e, s) => e.has(t) ? _e("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), c = (t, e, s, r) => (me(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), m = (t, e, s) => (me(t, e, "access private method"), s);
4
+ var me = (t, e, s) => e.has(t) || Ke("Cannot " + s);
5
+ var n = (t, e, s) => (me(t, e, "read from private field"), s ? s.call(t) : e.get(t)), f = (t, e, s) => e.has(t) ? Ke("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), h = (t, e, s, r) => (me(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), m = (t, e, s) => (me(t, e, "access private method"), s);
6
6
  import * as T from "react";
7
- import { createContext as ft, useContext as yt } from "react";
8
- import { j as pt } from "./jsx-runtime-Bdg6XQ1m.js";
9
- import { u as pe, m as bt } from "./chunk-SYFQ2XB5-KWlHsT7t.js";
10
- var Qe = class {
7
+ import { createContext as pt, useContext as bt } from "react";
8
+ import { j as mt } from "./jsx-runtime-Bdg6XQ1m.js";
9
+ import { u as pe, m as vt } from "./chunk-SYFQ2XB5-BPvC-soB.js";
10
+ var Ae = class {
11
11
  constructor() {
12
12
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
13
13
  }
@@ -26,7 +26,7 @@ var Qe = class {
26
26
  }, V = typeof window > "u" || "Deno" in globalThis;
27
27
  function ge() {
28
28
  }
29
- function Zt(t, e) {
29
+ function Wt(t, e) {
30
30
  return typeof t == "function" ? t(e) : t;
31
31
  }
32
32
  function Se(t) {
@@ -41,7 +41,7 @@ function fe(t, e) {
41
41
  function x(t, e) {
42
42
  return typeof t == "function" ? t(e) : t;
43
43
  }
44
- function Wt(t, e) {
44
+ function Jt(t, e) {
45
45
  const {
46
46
  type: s = "all",
47
47
  exact: r,
@@ -52,9 +52,9 @@ function Wt(t, e) {
52
52
  } = t;
53
53
  if (a) {
54
54
  if (r) {
55
- if (e.queryHash !== mt(a, e.options))
55
+ if (e.queryHash !== gt(a, e.options))
56
56
  return !1;
57
- } else if (!qe(e.queryKey, a))
57
+ } else if (!Qe(e.queryKey, a))
58
58
  return !1;
59
59
  }
60
60
  if (s !== "all") {
@@ -64,32 +64,32 @@ function Wt(t, e) {
64
64
  }
65
65
  return !(typeof u == "boolean" && e.isStale() !== u || i && i !== e.state.fetchStatus || o && !o(e));
66
66
  }
67
- function Jt(t, e) {
67
+ function Yt(t, e) {
68
68
  const { exact: s, status: r, predicate: i, mutationKey: o } = t;
69
69
  if (o) {
70
70
  if (!e.options.mutationKey)
71
71
  return !1;
72
72
  if (s) {
73
- if (Re(e.options.mutationKey) !== Re(o))
73
+ if (Ce(e.options.mutationKey) !== Ce(o))
74
74
  return !1;
75
- } else if (!qe(e.options.mutationKey, o))
75
+ } else if (!Qe(e.options.mutationKey, o))
76
76
  return !1;
77
77
  }
78
78
  return !(r && e.state.status !== r || i && !i(e));
79
79
  }
80
- function mt(t, e) {
81
- return ((e == null ? void 0 : e.queryKeyHashFn) || Re)(t);
80
+ function gt(t, e) {
81
+ return ((e == null ? void 0 : e.queryKeyHashFn) || Ce)(t);
82
82
  }
83
- function Re(t) {
83
+ function Ce(t) {
84
84
  return JSON.stringify(
85
85
  t,
86
86
  (e, s) => Ee(s) ? Object.keys(s).sort().reduce((r, i) => (r[i] = s[i], r), {}) : s
87
87
  );
88
88
  }
89
- function qe(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) => !qe(t[s], e[s])) : !1;
89
+ function Qe(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) => !Qe(t[s], e[s])) : !1;
91
91
  }
92
- function Ce(t, e) {
92
+ function Re(t, e) {
93
93
  if (t === e)
94
94
  return t;
95
95
  const s = He(t) && He(e);
@@ -98,7 +98,7 @@ function Ce(t, e) {
98
98
  let l = 0;
99
99
  for (let S = 0; S < a; S++) {
100
100
  const v = s ? S : o[S];
101
- (!s && r.includes(v) || s) && t[v] === void 0 && e[v] === void 0 ? (u[v] = void 0, l++) : (u[v] = Ce(t[v], e[v]), u[v] === t[v] && t[v] !== void 0 && l++);
101
+ (!s && r.includes(v) || s) && t[v] === void 0 && e[v] === void 0 ? (u[v] = void 0, l++) : (u[v] = Re(t[v], e[v]), u[v] === t[v] && t[v] !== void 0 && l++);
102
102
  }
103
103
  return i === a && l === i ? t : u;
104
104
  }
@@ -127,7 +127,7 @@ function Ee(t) {
127
127
  function Be(t) {
128
128
  return Object.prototype.toString.call(t) === "[object Object]";
129
129
  }
130
- function vt(t) {
130
+ function St(t) {
131
131
  return new Promise((e) => {
132
132
  setTimeout(e, t);
133
133
  });
@@ -138,13 +138,13 @@ function Oe(t, e, s) {
138
138
  if (s.structuralSharing !== !1) {
139
139
  if (process.env.NODE_ENV !== "production")
140
140
  try {
141
- return Ce(t, e);
141
+ return Re(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 Ce(t, e);
147
+ return Re(t, e);
148
148
  }
149
149
  return e;
150
150
  }
@@ -152,23 +152,23 @@ function Xt(t, e, s = 0) {
152
152
  const r = [...t, e];
153
153
  return s && r.length > s ? r.slice(1) : r;
154
154
  }
155
- function Yt(t, e, s = 0) {
155
+ function es(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
159
  var ye = Symbol();
160
- function gt(t, e) {
160
+ function Ct(t, e) {
161
161
  return process.env.NODE_ENV !== "production" && t.queryFn === ye && console.error(
162
162
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
163
163
  ), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === ye ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
164
164
  }
165
- var K, q, J, Ze, St = (Ze = class extends Qe {
165
+ var _, Q, J, Ze, Rt = (Ze = class extends Ae {
166
166
  constructor() {
167
167
  super();
168
- f(this, K);
169
- f(this, q);
168
+ f(this, _);
169
+ f(this, Q);
170
170
  f(this, J);
171
- c(this, J, (e) => {
171
+ h(this, J, (e) => {
172
172
  if (!V && window.addEventListener) {
173
173
  const s = () => e();
174
174
  return window.addEventListener("visibilitychange", s, !1), () => {
@@ -178,20 +178,20 @@ var K, q, J, Ze, St = (Ze = class extends Qe {
178
178
  });
179
179
  }
180
180
  onSubscribe() {
181
- n(this, q) || this.setEventListener(n(this, J));
181
+ n(this, Q) || this.setEventListener(n(this, J));
182
182
  }
183
183
  onUnsubscribe() {
184
184
  var e;
185
- this.hasListeners() || ((e = n(this, q)) == null || e.call(this), c(this, q, void 0));
185
+ this.hasListeners() || ((e = n(this, Q)) == null || e.call(this), h(this, Q, void 0));
186
186
  }
187
187
  setEventListener(e) {
188
188
  var s;
189
- c(this, J, e), (s = n(this, q)) == null || s.call(this), c(this, q, e((r) => {
189
+ h(this, J, e), (s = n(this, Q)) == null || s.call(this), h(this, Q, e((r) => {
190
190
  typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
191
191
  }));
192
192
  }
193
193
  setFocused(e) {
194
- n(this, K) !== e && (c(this, K, e), this.onFocus());
194
+ n(this, _) !== e && (h(this, _, e), this.onFocus());
195
195
  }
196
196
  onFocus() {
197
197
  const e = this.isFocused();
@@ -201,15 +201,15 @@ var K, q, J, Ze, St = (Ze = class extends Qe {
201
201
  }
202
202
  isFocused() {
203
203
  var e;
204
- return typeof n(this, K) == "boolean" ? n(this, K) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
204
+ return typeof n(this, _) == "boolean" ? n(this, _) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
205
205
  }
206
- }, K = new WeakMap(), q = new WeakMap(), J = new WeakMap(), Ze), tt = new St(), X, A, Y, We, Rt = (We = class extends Qe {
206
+ }, _ = new WeakMap(), Q = new WeakMap(), J = new WeakMap(), Ze), tt = new Rt(), Y, U, X, We, wt = (We = class extends Ae {
207
207
  constructor() {
208
208
  super();
209
- f(this, X, !0);
210
- f(this, A);
211
- f(this, Y);
212
- c(this, Y, (e) => {
209
+ f(this, Y, !0);
210
+ f(this, U);
211
+ f(this, X);
212
+ h(this, X, (e) => {
213
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), () => {
@@ -219,25 +219,25 @@ var K, q, J, Ze, St = (Ze = class extends Qe {
219
219
  });
220
220
  }
221
221
  onSubscribe() {
222
- n(this, A) || this.setEventListener(n(this, Y));
222
+ n(this, U) || this.setEventListener(n(this, X));
223
223
  }
224
224
  onUnsubscribe() {
225
225
  var e;
226
- this.hasListeners() || ((e = n(this, A)) == null || e.call(this), c(this, A, void 0));
226
+ this.hasListeners() || ((e = n(this, U)) == null || e.call(this), h(this, U, void 0));
227
227
  }
228
228
  setEventListener(e) {
229
229
  var s;
230
- c(this, Y, e), (s = n(this, A)) == null || s.call(this), c(this, A, e(this.setOnline.bind(this)));
230
+ h(this, X, e), (s = n(this, U)) == null || s.call(this), h(this, U, e(this.setOnline.bind(this)));
231
231
  }
232
232
  setOnline(e) {
233
- n(this, X) !== e && (c(this, X, e), this.listeners.forEach((r) => {
233
+ n(this, Y) !== e && (h(this, Y, e), this.listeners.forEach((r) => {
234
234
  r(e);
235
235
  }));
236
236
  }
237
237
  isOnline() {
238
- return n(this, X);
238
+ return n(this, Y);
239
239
  }
240
- }, X = new WeakMap(), A = new WeakMap(), Y = new WeakMap(), We), st = new Rt();
240
+ }, Y = new WeakMap(), U = new WeakMap(), X = new WeakMap(), We), st = new wt();
241
241
  function Fe() {
242
242
  let t, e;
243
243
  const s = new Promise((i, o) => {
@@ -260,7 +260,7 @@ function Fe() {
260
260
  }), e(i);
261
261
  }, s;
262
262
  }
263
- function Ct(t) {
263
+ function Et(t) {
264
264
  return Math.min(1e3 * 2 ** t, 3e4);
265
265
  }
266
266
  function rt(t) {
@@ -274,19 +274,19 @@ var nt = class extends Error {
274
274
  function ve(t) {
275
275
  return t instanceof nt;
276
276
  }
277
- function wt(t) {
277
+ function Ot(t) {
278
278
  let e = !1, s = 0, r = !1, i;
279
279
  const o = Fe(), a = (b) => {
280
280
  var p;
281
- r || (R(new nt(b)), (p = t.abort) == null || p.call(t));
281
+ r || (C(new nt(b)), (p = t.abort) == null || p.call(t));
282
282
  }, u = () => {
283
283
  e = !0;
284
284
  }, l = () => {
285
285
  e = !1;
286
- }, S = () => tt.isFocused() && (t.networkMode === "always" || st.isOnline()) && t.canRun(), v = () => rt(t.networkMode) && t.canRun(), h = (b) => {
286
+ }, S = () => tt.isFocused() && (t.networkMode === "always" || st.isOnline()) && t.canRun(), v = () => rt(t.networkMode) && t.canRun(), c = (b) => {
287
287
  var p;
288
288
  r || (r = !0, (p = t.onSuccess) == null || p.call(t, b), i == null || i(), o.resolve(b));
289
- }, R = (b) => {
289
+ }, C = (b) => {
290
290
  var p;
291
291
  r || (r = !0, (p = t.onError) == null || p.call(t, b), i == null || i(), o.reject(b));
292
292
  }, g = () => new Promise((b) => {
@@ -307,17 +307,17 @@ function wt(t) {
307
307
  } catch (E) {
308
308
  b = Promise.reject(E);
309
309
  }
310
- Promise.resolve(b).then(h).catch((E) => {
310
+ Promise.resolve(b).then(c).catch((E) => {
311
311
  var be;
312
312
  if (r)
313
313
  return;
314
- const U = t.retry ?? (V ? 0 : 3), N = t.retryDelay ?? Ct, ce = typeof N == "function" ? N(s, E) : N, le = U === !0 || typeof U == "number" && s < U || typeof U == "function" && U(s, E);
314
+ const q = t.retry ?? (V ? 0 : 3), N = t.retryDelay ?? Et, he = typeof N == "function" ? N(s, E) : N, le = q === !0 || typeof q == "number" && s < q || typeof q == "function" && q(s, E);
315
315
  if (e || !le) {
316
- R(E);
316
+ C(E);
317
317
  return;
318
318
  }
319
- s++, (be = t.onFail) == null || be.call(t, s, E), vt(ce).then(() => S() ? void 0 : g()).then(() => {
320
- e ? R(E) : w();
319
+ s++, (be = t.onFail) == null || be.call(t, s, E), St(he).then(() => S() ? void 0 : g()).then(() => {
320
+ e ? C(E) : w();
321
321
  });
322
322
  });
323
323
  };
@@ -331,7 +331,7 @@ function wt(t) {
331
331
  start: () => (v() ? w() : g().then(w), o)
332
332
  };
333
333
  }
334
- function Et() {
334
+ function Ft() {
335
335
  let t = [], e = 0, s = (u) => {
336
336
  u();
337
337
  }, r = (u) => {
@@ -390,15 +390,15 @@ function Et() {
390
390
  }
391
391
  };
392
392
  }
393
- var Ae = Et(), _, Je, Ot = (Je = class {
393
+ var Ue = Ft(), K, Je, It = (Je = class {
394
394
  constructor() {
395
- f(this, _);
395
+ f(this, K);
396
396
  }
397
397
  destroy() {
398
398
  this.clearGcTimeout();
399
399
  }
400
400
  scheduleGc() {
401
- this.clearGcTimeout(), Se(this.gcTime) && c(this, _, setTimeout(() => {
401
+ this.clearGcTimeout(), Se(this.gcTime) && h(this, K, setTimeout(() => {
402
402
  this.optionalRemove();
403
403
  }, this.gcTime));
404
404
  }
@@ -409,36 +409,36 @@ var Ae = Et(), _, Je, Ot = (Je = class {
409
409
  );
410
410
  }
411
411
  clearGcTimeout() {
412
- n(this, _) && (clearTimeout(n(this, _)), c(this, _, void 0));
412
+ n(this, K) && (clearTimeout(n(this, K)), h(this, K, void 0));
413
413
  }
414
- }, _ = new WeakMap(), Je), ee, te, I, C, ue, H, D, Q, Xe, es = (Xe = class extends Ot {
414
+ }, K = new WeakMap(), Je), ee, te, P, R, ue, H, D, A, Ye, ts = (Ye = class extends It {
415
415
  constructor(e) {
416
416
  super();
417
417
  f(this, D);
418
418
  f(this, ee);
419
419
  f(this, te);
420
- f(this, I);
421
- f(this, C);
420
+ f(this, P);
421
+ f(this, R);
422
422
  f(this, ue);
423
423
  f(this, H);
424
- c(this, H, !1), c(this, ue, e.defaultOptions), this.setOptions(e.options), this.observers = [], c(this, I, e.cache), this.queryKey = e.queryKey, this.queryHash = e.queryHash, c(this, ee, Ft(this.options)), this.state = e.state ?? n(this, ee), this.scheduleGc();
424
+ h(this, H, !1), h(this, ue, e.defaultOptions), this.setOptions(e.options), this.observers = [], h(this, P, e.cache), this.queryKey = e.queryKey, this.queryHash = e.queryHash, h(this, ee, Pt(this.options)), this.state = e.state ?? n(this, ee), this.scheduleGc();
425
425
  }
426
426
  get meta() {
427
427
  return this.options.meta;
428
428
  }
429
429
  get promise() {
430
430
  var e;
431
- return (e = n(this, C)) == null ? void 0 : e.promise;
431
+ return (e = n(this, R)) == null ? void 0 : e.promise;
432
432
  }
433
433
  setOptions(e) {
434
434
  this.options = { ...n(this, ue), ...e }, this.updateGcTime(this.options.gcTime);
435
435
  }
436
436
  optionalRemove() {
437
- !this.observers.length && this.state.fetchStatus === "idle" && n(this, I).remove(this);
437
+ !this.observers.length && this.state.fetchStatus === "idle" && n(this, P).remove(this);
438
438
  }
439
439
  setData(e, s) {
440
440
  const r = Oe(this.state.data, e, this.options);
441
- return m(this, D, Q).call(this, {
441
+ return m(this, D, A).call(this, {
442
442
  data: r,
443
443
  type: "success",
444
444
  dataUpdatedAt: s == null ? void 0 : s.updatedAt,
@@ -446,12 +446,12 @@ var Ae = Et(), _, Je, Ot = (Je = class {
446
446
  }), r;
447
447
  }
448
448
  setState(e, s) {
449
- m(this, D, Q).call(this, { type: "setState", state: e, setStateOptions: s });
449
+ m(this, D, A).call(this, { type: "setState", state: e, setStateOptions: s });
450
450
  }
451
451
  cancel(e) {
452
452
  var r, i;
453
- const s = (r = n(this, C)) == null ? void 0 : r.promise;
454
- return (i = n(this, C)) == null || i.cancel(e), s ? s.then(ge).catch(ge) : Promise.resolve();
453
+ const s = (r = n(this, R)) == null ? void 0 : r.promise;
454
+ return (i = n(this, R)) == null || i.cancel(e), s ? s.then(ge).catch(ge) : Promise.resolve();
455
455
  }
456
456
  destroy() {
457
457
  super.destroy(), this.cancel({ silent: !0 });
@@ -478,55 +478,55 @@ var Ae = Et(), _, Je, Ot = (Je = class {
478
478
  onFocus() {
479
479
  var s;
480
480
  const e = this.observers.find((r) => r.shouldFetchOnWindowFocus());
481
- e == null || e.refetch({ cancelRefetch: !1 }), (s = n(this, C)) == null || s.continue();
481
+ e == null || e.refetch({ cancelRefetch: !1 }), (s = n(this, R)) == null || s.continue();
482
482
  }
483
483
  onOnline() {
484
484
  var s;
485
485
  const e = this.observers.find((r) => r.shouldFetchOnReconnect());
486
- e == null || e.refetch({ cancelRefetch: !1 }), (s = n(this, C)) == null || s.continue();
486
+ e == null || e.refetch({ cancelRefetch: !1 }), (s = n(this, R)) == null || s.continue();
487
487
  }
488
488
  addObserver(e) {
489
- this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), n(this, I).notify({ type: "observerAdded", query: this, observer: e }));
489
+ this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), n(this, P).notify({ type: "observerAdded", query: this, observer: e }));
490
490
  }
491
491
  removeObserver(e) {
492
- this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (n(this, C) && (n(this, H) ? n(this, C).cancel({ revert: !0 }) : n(this, C).cancelRetry()), this.scheduleGc()), n(this, I).notify({ type: "observerRemoved", query: this, observer: e }));
492
+ this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (n(this, R) && (n(this, H) ? n(this, R).cancel({ revert: !0 }) : n(this, R).cancelRetry()), this.scheduleGc()), n(this, P).notify({ type: "observerRemoved", query: this, observer: e }));
493
493
  }
494
494
  getObserversCount() {
495
495
  return this.observers.length;
496
496
  }
497
497
  invalidate() {
498
- this.state.isInvalidated || m(this, D, Q).call(this, { type: "invalidate" });
498
+ this.state.isInvalidated || m(this, D, A).call(this, { type: "invalidate" });
499
499
  }
500
500
  fetch(e, s) {
501
501
  var l, S, v;
502
502
  if (this.state.fetchStatus !== "idle") {
503
503
  if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
504
504
  this.cancel({ silent: !0 });
505
- else if (n(this, C))
506
- return n(this, C).continueRetry(), n(this, C).promise;
505
+ else if (n(this, R))
506
+ return n(this, R).continueRetry(), n(this, R).promise;
507
507
  }
508
508
  if (e && this.setOptions(e), !this.options.queryFn) {
509
- const h = this.observers.find((R) => R.options.queryFn);
510
- h && this.setOptions(h.options);
509
+ const c = this.observers.find((C) => C.options.queryFn);
510
+ c && this.setOptions(c.options);
511
511
  }
512
512
  process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
513
513
  "As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"
514
514
  ));
515
- const r = new AbortController(), i = (h) => {
516
- Object.defineProperty(h, "signal", {
515
+ const r = new AbortController(), i = (c) => {
516
+ Object.defineProperty(c, "signal", {
517
517
  enumerable: !0,
518
- get: () => (c(this, H, !0), r.signal)
518
+ get: () => (h(this, H, !0), r.signal)
519
519
  });
520
520
  }, o = () => {
521
- const h = gt(this.options, s), R = {
521
+ const c = Ct(this.options, s), C = {
522
522
  queryKey: this.queryKey,
523
523
  meta: this.meta
524
524
  };
525
- return i(R), c(this, H, !1), this.options.persister ? this.options.persister(
526
- h,
527
- R,
525
+ return i(C), h(this, H, !1), this.options.persister ? this.options.persister(
526
+ c,
527
+ C,
528
528
  this
529
- ) : h(R);
529
+ ) : c(C);
530
530
  }, a = {
531
531
  fetchOptions: s,
532
532
  options: this.options,
@@ -537,65 +537,65 @@ var Ae = Et(), _, Je, Ot = (Je = class {
537
537
  i(a), (l = this.options.behavior) == null || l.onFetch(
538
538
  a,
539
539
  this
540
- ), c(this, te, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((S = a.fetchOptions) == null ? void 0 : S.meta)) && m(this, D, Q).call(this, { type: "fetch", meta: (v = a.fetchOptions) == null ? void 0 : v.meta });
541
- const u = (h) => {
542
- var R, g, w, b;
543
- ve(h) && h.silent || m(this, D, Q).call(this, {
540
+ ), h(this, te, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((S = a.fetchOptions) == null ? void 0 : S.meta)) && m(this, D, A).call(this, { type: "fetch", meta: (v = a.fetchOptions) == null ? void 0 : v.meta });
541
+ const u = (c) => {
542
+ var C, g, w, b;
543
+ ve(c) && c.silent || m(this, D, A).call(this, {
544
544
  type: "error",
545
- error: h
546
- }), ve(h) || ((g = (R = n(this, I).config).onError) == null || g.call(
547
- R,
548
- h,
545
+ error: c
546
+ }), ve(c) || ((g = (C = n(this, P).config).onError) == null || g.call(
547
+ C,
548
+ c,
549
549
  this
550
- ), (b = (w = n(this, I).config).onSettled) == null || b.call(
550
+ ), (b = (w = n(this, P).config).onSettled) == null || b.call(
551
551
  w,
552
552
  this.state.data,
553
- h,
553
+ c,
554
554
  this
555
555
  )), this.scheduleGc();
556
556
  };
557
- return c(this, C, wt({
557
+ return h(this, R, Ot({
558
558
  initialPromise: s == null ? void 0 : s.initialPromise,
559
559
  fn: a.fetchFn,
560
560
  abort: r.abort.bind(r),
561
- onSuccess: (h) => {
562
- var R, g, w, b;
563
- if (h === void 0) {
561
+ onSuccess: (c) => {
562
+ var C, g, w, b;
563
+ if (c === void 0) {
564
564
  process.env.NODE_ENV !== "production" && console.error(
565
565
  `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
566
566
  ), u(new Error(`${this.queryHash} data is undefined`));
567
567
  return;
568
568
  }
569
569
  try {
570
- this.setData(h);
570
+ this.setData(c);
571
571
  } catch (p) {
572
572
  u(p);
573
573
  return;
574
574
  }
575
- (g = (R = n(this, I).config).onSuccess) == null || g.call(R, h, this), (b = (w = n(this, I).config).onSettled) == null || b.call(
575
+ (g = (C = n(this, P).config).onSuccess) == null || g.call(C, c, this), (b = (w = n(this, P).config).onSettled) == null || b.call(
576
576
  w,
577
- h,
577
+ c,
578
578
  this.state.error,
579
579
  this
580
580
  ), this.scheduleGc();
581
581
  },
582
582
  onError: u,
583
- onFail: (h, R) => {
584
- m(this, D, Q).call(this, { type: "failed", failureCount: h, error: R });
583
+ onFail: (c, C) => {
584
+ m(this, D, A).call(this, { type: "failed", failureCount: c, error: C });
585
585
  },
586
586
  onPause: () => {
587
- m(this, D, Q).call(this, { type: "pause" });
587
+ m(this, D, A).call(this, { type: "pause" });
588
588
  },
589
589
  onContinue: () => {
590
- m(this, D, Q).call(this, { type: "continue" });
590
+ m(this, D, A).call(this, { type: "continue" });
591
591
  },
592
592
  retry: a.options.retry,
593
593
  retryDelay: a.options.retryDelay,
594
594
  networkMode: a.options.networkMode,
595
595
  canRun: () => !0
596
- })), n(this, C).start();
596
+ })), n(this, R).start();
597
597
  }
598
- }, ee = new WeakMap(), te = new WeakMap(), I = new WeakMap(), C = new WeakMap(), ue = new WeakMap(), H = new WeakMap(), D = new WeakSet(), Q = function(e) {
598
+ }, ee = new WeakMap(), te = new WeakMap(), P = new WeakMap(), R = new WeakMap(), ue = new WeakMap(), H = new WeakMap(), D = new WeakSet(), A = function(e) {
599
599
  const s = (r) => {
600
600
  switch (e.type) {
601
601
  case "failed":
@@ -659,12 +659,12 @@ var Ae = Et(), _, Je, Ot = (Je = class {
659
659
  };
660
660
  }
661
661
  };
662
- this.state = s(this.state), Ae.batch(() => {
662
+ this.state = s(this.state), Ue.batch(() => {
663
663
  this.observers.forEach((r) => {
664
664
  r.onQueryUpdate();
665
- }), n(this, I).notify({ query: this, type: "updated", action: e });
665
+ }), n(this, P).notify({ query: this, type: "updated", action: e });
666
666
  });
667
- }, Xe);
667
+ }, Ye);
668
668
  function it(t, e) {
669
669
  return {
670
670
  fetchFailureCount: 0,
@@ -676,7 +676,7 @@ function it(t, e) {
676
676
  }
677
677
  };
678
678
  }
679
- function Ft(t) {
679
+ function Pt(t) {
680
680
  const e = typeof t.initialData == "function" ? t.initialData() : t.initialData, s = e !== void 0, r = s ? typeof t.initialDataUpdatedAt == "function" ? t.initialDataUpdatedAt() : t.initialDataUpdatedAt : 0;
681
681
  return {
682
682
  data: e,
@@ -693,11 +693,11 @@ function Ft(t) {
693
693
  fetchStatus: "idle"
694
694
  };
695
695
  }
696
- var P, d, oe, F, B, se, M, k, he, re, ne, G, z, L, ie, y, ae, Pe, Ie, Te, De, xe, je, ke, ut, Ye, at = (Ye = class extends Qe {
696
+ var I, d, oe, F, B, se, M, k, ce, re, ne, G, z, L, ie, y, ae, Ie, Pe, Te, De, xe, je, ke, ut, Xe, at = (Xe = class extends Ae {
697
697
  constructor(e, s) {
698
698
  super();
699
699
  f(this, y);
700
- f(this, P);
700
+ f(this, I);
701
701
  f(this, d);
702
702
  f(this, oe);
703
703
  f(this, F);
@@ -705,7 +705,7 @@ var P, d, oe, F, B, se, M, k, he, re, ne, G, z, L, ie, y, ae, Pe, Ie, Te, De, xe
705
705
  f(this, se);
706
706
  f(this, M);
707
707
  f(this, k);
708
- f(this, he);
708
+ f(this, ce);
709
709
  f(this, re);
710
710
  // This property keeps track of the last query with defined data.
711
711
  // It will be used to pass the previous data and query to the placeholder function between renders.
@@ -714,7 +714,7 @@ var P, d, oe, F, B, se, M, k, he, re, ne, G, z, L, ie, y, ae, Pe, Ie, Te, De, xe
714
714
  f(this, z);
715
715
  f(this, L);
716
716
  f(this, ie, /* @__PURE__ */ new Set());
717
- this.options = s, c(this, P, e), c(this, k, null), c(this, M, Fe()), this.options.experimental_prefetchInRender || n(this, M).reject(
717
+ this.options = s, h(this, I, e), h(this, k, null), h(this, M, Fe()), this.options.experimental_prefetchInRender || n(this, M).reject(
718
718
  new Error("experimental_prefetchInRender feature flag is not enabled")
719
719
  ), this.bindMethods(), this.setOptions(s);
720
720
  }
@@ -728,14 +728,14 @@ var P, d, oe, F, B, se, M, k, he, re, ne, G, z, L, ie, y, ae, Pe, Ie, Te, De, xe
728
728
  this.hasListeners() || this.destroy();
729
729
  }
730
730
  shouldFetchOnReconnect() {
731
- return Ue(
731
+ return qe(
732
732
  n(this, d),
733
733
  this.options,
734
734
  this.options.refetchOnReconnect
735
735
  );
736
736
  }
737
737
  shouldFetchOnWindowFocus() {
738
- return Ue(
738
+ return qe(
739
739
  n(this, d),
740
740
  this.options,
741
741
  this.options.refetchOnWindowFocus
@@ -746,11 +746,11 @@ var P, d, oe, F, B, se, M, k, he, re, ne, G, z, L, ie, y, ae, Pe, Ie, Te, De, xe
746
746
  }
747
747
  setOptions(e, s) {
748
748
  const r = this.options, i = n(this, d);
749
- if (this.options = n(this, P).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof x(this.options.enabled, n(this, d)) != "boolean")
749
+ if (this.options = n(this, I).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof x(this.options.enabled, n(this, d)) != "boolean")
750
750
  throw new Error(
751
751
  "Expected enabled to be a boolean or a callback that returns a boolean"
752
752
  );
753
- m(this, y, ke).call(this), n(this, d).setOptions(this.options), r._defaulted && !we(this.options, r) && n(this, P).getQueryCache().notify({
753
+ m(this, y, ke).call(this), n(this, d).setOptions(this.options), r._defaulted && !we(this.options, r) && n(this, I).getQueryCache().notify({
754
754
  type: "observerOptionsUpdated",
755
755
  query: n(this, d),
756
756
  observer: this
@@ -761,13 +761,13 @@ var P, d, oe, F, B, se, M, k, he, re, ne, G, z, L, ie, y, ae, Pe, Ie, Te, De, xe
761
761
  i,
762
762
  this.options,
763
763
  r
764
- ) && m(this, y, ae).call(this), this.updateResult(s), o && (n(this, d) !== i || x(this.options.enabled, n(this, d)) !== x(r.enabled, n(this, d)) || fe(this.options.staleTime, n(this, d)) !== fe(r.staleTime, n(this, d))) && m(this, y, Pe).call(this);
765
- const a = m(this, y, Ie).call(this);
764
+ ) && m(this, y, ae).call(this), this.updateResult(s), o && (n(this, d) !== i || x(this.options.enabled, n(this, d)) !== x(r.enabled, n(this, d)) || fe(this.options.staleTime, n(this, d)) !== fe(r.staleTime, n(this, d))) && m(this, y, Ie).call(this);
765
+ const a = m(this, y, Pe).call(this);
766
766
  o && (n(this, d) !== i || x(this.options.enabled, n(this, d)) !== x(r.enabled, n(this, d)) || a !== n(this, L)) && m(this, y, Te).call(this, a);
767
767
  }
768
768
  getOptimisticResult(e) {
769
- const s = n(this, P).getQueryCache().build(n(this, P), e), r = this.createResult(s, e);
770
- return It(this, r) && (c(this, F, r), c(this, se, this.options), c(this, B, n(this, d).state)), r;
769
+ const s = n(this, I).getQueryCache().build(n(this, I), e), r = this.createResult(s, e);
770
+ return Dt(this, r) && (h(this, F, r), h(this, se, this.options), h(this, B, n(this, d).state)), r;
771
771
  }
772
772
  getCurrentResult() {
773
773
  return n(this, F);
@@ -794,7 +794,7 @@ var P, d, oe, F, B, se, M, k, he, re, ne, G, z, L, ie, y, ae, Pe, Ie, Te, De, xe
794
794
  });
795
795
  }
796
796
  fetchOptimistic(e) {
797
- const s = n(this, P).defaultQueryOptions(e), r = n(this, P).getQueryCache().build(n(this, P), s);
797
+ const s = n(this, I).defaultQueryOptions(e), r = n(this, I).getQueryCache().build(n(this, I), s);
798
798
  return r.fetch().then(() => this.createResult(r, s));
799
799
  }
800
800
  fetch(e) {
@@ -804,70 +804,70 @@ var P, d, oe, F, B, se, M, k, he, re, ne, G, z, L, ie, y, ae, Pe, Ie, Te, De, xe
804
804
  }).then(() => (this.updateResult(), n(this, F)));
805
805
  }
806
806
  createResult(e, s) {
807
- var Ke;
807
+ var _e;
808
808
  const r = n(this, d), i = this.options, o = n(this, F), a = n(this, B), u = n(this, se), S = e !== r ? e.state : n(this, oe), { state: v } = e;
809
- let h = { ...v }, R = !1, g;
809
+ let c = { ...v }, C = !1, g;
810
810
  if (s._optimisticResults) {
811
811
  const O = this.hasListeners(), Z = !O && Ge(e, s), W = O && ze(e, r, s, i);
812
- (Z || W) && (h = {
813
- ...h,
812
+ (Z || W) && (c = {
813
+ ...c,
814
814
  ...it(v.data, e.options)
815
- }), s._optimisticResults === "isRestoring" && (h.fetchStatus = "idle");
815
+ }), s._optimisticResults === "isRestoring" && (c.fetchStatus = "idle");
816
816
  }
817
- let { error: w, errorUpdatedAt: b, status: p } = h;
818
- if (s.select && h.data !== void 0)
819
- if (o && h.data === (a == null ? void 0 : a.data) && s.select === n(this, he))
817
+ let { error: w, errorUpdatedAt: b, status: p } = c;
818
+ if (s.select && c.data !== void 0)
819
+ if (o && c.data === (a == null ? void 0 : a.data) && s.select === n(this, ce))
820
820
  g = n(this, re);
821
821
  else
822
822
  try {
823
- c(this, he, s.select), g = s.select(h.data), g = Oe(o == null ? void 0 : o.data, g, s), c(this, re, g), c(this, k, null);
823
+ h(this, ce, s.select), g = s.select(c.data), g = Oe(o == null ? void 0 : o.data, g, s), h(this, re, g), h(this, k, null);
824
824
  } catch (O) {
825
- c(this, k, O);
825
+ h(this, k, O);
826
826
  }
827
827
  else
828
- g = h.data;
828
+ g = c.data;
829
829
  if (s.placeholderData !== void 0 && g === void 0 && p === "pending") {
830
830
  let O;
831
831
  if (o != null && o.isPlaceholderData && s.placeholderData === (u == null ? void 0 : u.placeholderData))
832
832
  O = o.data;
833
833
  else if (O = typeof s.placeholderData == "function" ? s.placeholderData(
834
- (Ke = n(this, ne)) == null ? void 0 : Ke.state.data,
834
+ (_e = n(this, ne)) == null ? void 0 : _e.state.data,
835
835
  n(this, ne)
836
836
  ) : s.placeholderData, s.select && O !== void 0)
837
837
  try {
838
- O = s.select(O), c(this, k, null);
838
+ O = s.select(O), h(this, k, null);
839
839
  } catch (Z) {
840
- c(this, k, Z);
840
+ h(this, k, Z);
841
841
  }
842
842
  O !== void 0 && (p = "success", g = Oe(
843
843
  o == null ? void 0 : o.data,
844
844
  O,
845
845
  s
846
- ), R = !0);
846
+ ), C = !0);
847
847
  }
848
848
  n(this, k) && (w = n(this, k), g = n(this, re), b = Date.now(), p = "error");
849
- const E = h.fetchStatus === "fetching", U = p === "pending", N = p === "error", ce = U && E, le = g !== void 0, j = {
849
+ const E = c.fetchStatus === "fetching", q = p === "pending", N = p === "error", he = q && E, le = g !== void 0, j = {
850
850
  status: p,
851
- fetchStatus: h.fetchStatus,
852
- isPending: U,
851
+ fetchStatus: c.fetchStatus,
852
+ isPending: q,
853
853
  isSuccess: p === "success",
854
854
  isError: N,
855
- isInitialLoading: ce,
856
- isLoading: ce,
855
+ isInitialLoading: he,
856
+ isLoading: he,
857
857
  data: g,
858
- dataUpdatedAt: h.dataUpdatedAt,
858
+ dataUpdatedAt: c.dataUpdatedAt,
859
859
  error: w,
860
860
  errorUpdatedAt: b,
861
- failureCount: h.fetchFailureCount,
862
- failureReason: h.fetchFailureReason,
863
- errorUpdateCount: h.errorUpdateCount,
864
- isFetched: h.dataUpdateCount > 0 || h.errorUpdateCount > 0,
865
- isFetchedAfterMount: h.dataUpdateCount > S.dataUpdateCount || h.errorUpdateCount > S.errorUpdateCount,
861
+ failureCount: c.fetchFailureCount,
862
+ failureReason: c.fetchFailureReason,
863
+ errorUpdateCount: c.errorUpdateCount,
864
+ isFetched: c.dataUpdateCount > 0 || c.errorUpdateCount > 0,
865
+ isFetchedAfterMount: c.dataUpdateCount > S.dataUpdateCount || c.errorUpdateCount > S.errorUpdateCount,
866
866
  isFetching: E,
867
- isRefetching: E && !U,
867
+ isRefetching: E && !q,
868
868
  isLoadingError: N && !le,
869
- isPaused: h.fetchStatus === "paused",
870
- isPlaceholderData: R,
869
+ isPaused: c.fetchStatus === "paused",
870
+ isPlaceholderData: C,
871
871
  isRefetchError: N && le,
872
872
  isStale: Me(e, s),
873
873
  refetch: this.refetch,
@@ -877,7 +877,7 @@ var P, d, oe, F, B, se, M, k, he, re, ne, G, z, L, ie, y, ae, Pe, Ie, Te, De, xe
877
877
  const O = (de) => {
878
878
  j.status === "error" ? de.reject(j.error) : j.data !== void 0 && de.resolve(j.data);
879
879
  }, Z = () => {
880
- const de = c(this, M, j.promise = Fe());
880
+ const de = h(this, M, j.promise = Fe());
881
881
  O(de);
882
882
  }, W = n(this, M);
883
883
  switch (W.status) {
@@ -896,9 +896,9 @@ var P, d, oe, F, B, se, M, k, he, re, ne, G, z, L, ie, y, ae, Pe, Ie, Te, De, xe
896
896
  }
897
897
  updateResult(e) {
898
898
  const s = n(this, F), r = this.createResult(n(this, d), this.options);
899
- if (c(this, B, n(this, d).state), c(this, se, this.options), n(this, B).data !== void 0 && c(this, ne, n(this, d)), we(r, s))
899
+ if (h(this, B, n(this, d).state), h(this, se, this.options), n(this, B).data !== void 0 && h(this, ne, n(this, d)), we(r, s))
900
900
  return;
901
- c(this, F, r);
901
+ h(this, F, r);
902
902
  const i = {}, o = () => {
903
903
  if (!s)
904
904
  return !0;
@@ -918,14 +918,14 @@ var P, d, oe, F, B, se, M, k, he, re, ne, G, z, L, ie, y, ae, Pe, Ie, Te, De, xe
918
918
  onQueryUpdate() {
919
919
  this.updateResult(), this.hasListeners() && m(this, y, De).call(this);
920
920
  }
921
- }, P = new WeakMap(), d = new WeakMap(), oe = new WeakMap(), F = new WeakMap(), B = new WeakMap(), se = new WeakMap(), M = new WeakMap(), k = new WeakMap(), he = new WeakMap(), re = new WeakMap(), ne = new WeakMap(), G = new WeakMap(), z = new WeakMap(), L = new WeakMap(), ie = new WeakMap(), y = new WeakSet(), ae = function(e) {
921
+ }, I = new WeakMap(), d = new WeakMap(), oe = new WeakMap(), F = new WeakMap(), B = new WeakMap(), se = new WeakMap(), M = new WeakMap(), k = new WeakMap(), ce = new WeakMap(), re = new WeakMap(), ne = new WeakMap(), G = new WeakMap(), z = new WeakMap(), L = new WeakMap(), ie = new WeakMap(), y = new WeakSet(), ae = function(e) {
922
922
  m(this, y, ke).call(this);
923
923
  let s = n(this, d).fetch(
924
924
  this.options,
925
925
  e
926
926
  );
927
927
  return e != null && e.throwOnError || (s = s.catch(ge)), s;
928
- }, Pe = function() {
928
+ }, Ie = function() {
929
929
  m(this, y, xe).call(this);
930
930
  const e = fe(
931
931
  this.options.staleTime,
@@ -934,44 +934,44 @@ var P, d, oe, F, B, se, M, k, he, re, ne, G, z, L, ie, y, ae, Pe, Ie, Te, De, xe
934
934
  if (V || n(this, F).isStale || !Se(e))
935
935
  return;
936
936
  const r = et(n(this, F).dataUpdatedAt, e) + 1;
937
- c(this, G, setTimeout(() => {
937
+ h(this, G, setTimeout(() => {
938
938
  n(this, F).isStale || this.updateResult();
939
939
  }, r));
940
- }, Ie = function() {
940
+ }, Pe = function() {
941
941
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, d)) : this.options.refetchInterval) ?? !1;
942
942
  }, Te = function(e) {
943
- m(this, y, je).call(this), c(this, L, e), !(V || x(this.options.enabled, n(this, d)) === !1 || !Se(n(this, L)) || n(this, L) === 0) && c(this, z, setInterval(() => {
943
+ m(this, y, je).call(this), h(this, L, e), !(V || x(this.options.enabled, n(this, d)) === !1 || !Se(n(this, L)) || n(this, L) === 0) && h(this, z, setInterval(() => {
944
944
  (this.options.refetchIntervalInBackground || tt.isFocused()) && m(this, y, ae).call(this);
945
945
  }, n(this, L)));
946
946
  }, De = function() {
947
- m(this, y, Pe).call(this), m(this, y, Te).call(this, m(this, y, Ie).call(this));
947
+ m(this, y, Ie).call(this), m(this, y, Te).call(this, m(this, y, Pe).call(this));
948
948
  }, xe = function() {
949
- n(this, G) && (clearTimeout(n(this, G)), c(this, G, void 0));
949
+ n(this, G) && (clearTimeout(n(this, G)), h(this, G, void 0));
950
950
  }, je = function() {
951
- n(this, z) && (clearInterval(n(this, z)), c(this, z, void 0));
951
+ n(this, z) && (clearInterval(n(this, z)), h(this, z, void 0));
952
952
  }, ke = function() {
953
- const e = n(this, P).getQueryCache().build(n(this, P), this.options);
953
+ const e = n(this, I).getQueryCache().build(n(this, I), this.options);
954
954
  if (e === n(this, d))
955
955
  return;
956
956
  const s = n(this, d);
957
- c(this, d, e), c(this, oe, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
957
+ h(this, d, e), h(this, oe, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
958
958
  }, ut = function(e) {
959
- Ae.batch(() => {
959
+ Ue.batch(() => {
960
960
  e.listeners && this.listeners.forEach((s) => {
961
961
  s(n(this, F));
962
- }), n(this, P).getQueryCache().notify({
962
+ }), n(this, I).getQueryCache().notify({
963
963
  query: n(this, d),
964
964
  type: "observerResultsUpdated"
965
965
  });
966
966
  });
967
- }, Ye);
968
- function Pt(t, e) {
967
+ }, Xe);
968
+ function Tt(t, e) {
969
969
  return x(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
970
970
  }
971
971
  function Ge(t, e) {
972
- return Pt(t, e) || t.state.data !== void 0 && Ue(t, e, e.refetchOnMount);
972
+ return Tt(t, e) || t.state.data !== void 0 && qe(t, e, e.refetchOnMount);
973
973
  }
974
- function Ue(t, e, s) {
974
+ function qe(t, e, s) {
975
975
  if (x(e.enabled, t) !== !1) {
976
976
  const r = typeof s == "function" ? s(t) : s;
977
977
  return r === "always" || r !== !1 && Me(t, e);
@@ -984,26 +984,26 @@ function ze(t, e, s, r) {
984
984
  function Me(t, e) {
985
985
  return x(e.enabled, t) !== !1 && t.isStaleByTime(fe(e.staleTime, t));
986
986
  }
987
- function It(t, e) {
987
+ function Dt(t, e) {
988
988
  return !we(t.getCurrentResult(), e);
989
989
  }
990
990
  var ot = T.createContext(
991
991
  void 0
992
- ), Tt = (t) => {
992
+ ), ct = (t) => {
993
993
  const e = T.useContext(ot);
994
994
  if (t)
995
995
  return t;
996
996
  if (!e)
997
997
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
998
998
  return e;
999
- }, ts = ({
999
+ }, ss = ({
1000
1000
  client: t,
1001
1001
  children: e
1002
1002
  }) => (T.useEffect(() => (t.mount(), () => {
1003
1003
  t.unmount();
1004
- }), [t]), /* @__PURE__ */ pt.jsx(ot.Provider, { value: t, children: e })), ht = T.createContext(!1), Dt = () => T.useContext(ht);
1004
+ }), [t]), /* @__PURE__ */ mt.jsx(ot.Provider, { value: t, children: e })), ht = T.createContext(!1), xt = () => T.useContext(ht);
1005
1005
  ht.Provider;
1006
- function xt() {
1006
+ function jt() {
1007
1007
  let t = !1;
1008
1008
  return {
1009
1009
  clearReset: () => {
@@ -1015,40 +1015,40 @@ function xt() {
1015
1015
  isReset: () => t
1016
1016
  };
1017
1017
  }
1018
- var jt = T.createContext(xt()), kt = () => T.useContext(jt);
1019
- function Ut(t, e) {
1018
+ var kt = T.createContext(jt()), qt = () => T.useContext(kt);
1019
+ function At(t, e) {
1020
1020
  return typeof t == "function" ? t(...e) : !!t;
1021
1021
  }
1022
1022
  function Ve() {
1023
1023
  }
1024
1024
  var Qt = (t, e) => {
1025
1025
  (t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
1026
- }, qt = (t) => {
1026
+ }, Ut = (t) => {
1027
1027
  T.useEffect(() => {
1028
1028
  t.clearReset();
1029
1029
  }, [t]);
1030
- }, At = ({
1030
+ }, Mt = ({
1031
1031
  result: t,
1032
1032
  errorResetBoundary: e,
1033
1033
  throwOnError: s,
1034
1034
  query: r
1035
- }) => t.isError && !e.isReset() && !t.isFetching && r && Ut(s, [t.error, r]), Mt = (t, e) => e.state.data === void 0, Lt = (t) => {
1035
+ }) => t.isError && !e.isReset() && !t.isFetching && r && At(s, [t.error, r]), Lt = (t, e) => e.state.data === void 0, Nt = (t) => {
1036
1036
  const e = t.staleTime;
1037
1037
  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
- }, Nt = (t, e) => t.isLoading && t.isFetching && !e, Kt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, $e = (t, e, s) => e.fetchOptimistic(t).catch(() => {
1038
+ }, _t = (t, e) => t.isLoading && t.isFetching && !e, Kt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, $e = (t, e, s) => e.fetchOptimistic(t).catch(() => {
1039
1039
  s.clearReset();
1040
1040
  });
1041
- function ct(t, e, s) {
1042
- var h, R, g, w, b;
1041
+ function lt(t, e, s) {
1042
+ var c, C, g, w, b;
1043
1043
  if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
1044
1044
  throw new Error(
1045
1045
  '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
1046
  );
1047
- const r = Tt(s), i = Dt(), o = kt(), a = r.defaultQueryOptions(t);
1048
- (R = (h = r.getDefaultOptions().queries) == null ? void 0 : h._experimental_beforeQuery) == null || R.call(
1049
- h,
1047
+ const r = ct(s), i = xt(), o = qt(), a = r.defaultQueryOptions(t);
1048
+ (C = (c = r.getDefaultOptions().queries) == null ? void 0 : c._experimental_beforeQuery) == null || C.call(
1049
+ c,
1050
1050
  a
1051
- ), a._optimisticResults = i ? "isRestoring" : "optimistic", Lt(a), Qt(a, o), qt(o);
1051
+ ), a._optimisticResults = i ? "isRestoring" : "optimistic", Nt(a), Qt(a, o), Ut(o);
1052
1052
  const u = !r.getQueryCache().get(a.queryHash), [l] = T.useState(
1053
1053
  () => new e(
1054
1054
  r,
@@ -1058,7 +1058,7 @@ function ct(t, e, s) {
1058
1058
  if (T.useSyncExternalStore(
1059
1059
  T.useCallback(
1060
1060
  (p) => {
1061
- const E = v ? l.subscribe(Ae.batchCalls(p)) : Ve;
1061
+ const E = v ? l.subscribe(Ue.batchCalls(p)) : Ve;
1062
1062
  return l.updateResult(), E;
1063
1063
  },
1064
1064
  [l, v]
@@ -1069,7 +1069,7 @@ function ct(t, e, s) {
1069
1069
  l.setOptions(a, { listeners: !1 });
1070
1070
  }, [a, l]), Kt(a, S))
1071
1071
  throw $e(a, l, o);
1072
- if (At({
1072
+ if (Mt({
1073
1073
  result: S,
1074
1074
  errorResetBoundary: o,
1075
1075
  throwOnError: a.throwOnError,
@@ -1080,7 +1080,7 @@ function ct(t, e, s) {
1080
1080
  g,
1081
1081
  a,
1082
1082
  S
1083
- ), a.experimental_prefetchInRender && !V && Nt(S, i)) {
1083
+ ), a.experimental_prefetchInRender && !V && _t(S, i)) {
1084
1084
  const p = u ? (
1085
1085
  // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
1086
1086
  $e(a, l, o)
@@ -1094,16 +1094,16 @@ function ct(t, e, s) {
1094
1094
  }
1095
1095
  return a.notifyOnChangeProps ? S : l.trackResult(S);
1096
1096
  }
1097
- function _t(t, e) {
1098
- return ct(t, at, e);
1099
- }
1100
1097
  function Ht(t, e) {
1101
- return process.env.NODE_ENV !== "production" && t.queryFn === ye && console.error("skipToken is not allowed for useSuspenseQuery"), ct(
1098
+ return lt(t, at, e);
1099
+ }
1100
+ function Bt(t, e) {
1101
+ return process.env.NODE_ENV !== "production" && t.queryFn === ye && console.error("skipToken is not allowed for useSuspenseQuery"), lt(
1102
1102
  {
1103
1103
  ...t,
1104
1104
  enabled: !0,
1105
1105
  suspense: !0,
1106
- throwOnError: Mt,
1106
+ throwOnError: Lt,
1107
1107
  placeholderData: void 0
1108
1108
  },
1109
1109
  at,
@@ -1113,6 +1113,15 @@ function Ht(t, e) {
1113
1113
  const $ = (...t) => {
1114
1114
  const e = t.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
1115
1115
  return e ? `/${e}` : "/";
1116
+ }, dt = Object.freeze({
1117
+ API_IDENTITIES: ["api-identities"]
1118
+ }), rs = () => {
1119
+ const t = ct();
1120
+ return {
1121
+ invalidateCache: async (e) => {
1122
+ await t.invalidateQueries({ queryKey: dt[e] });
1123
+ }
1124
+ };
1116
1125
  }, Le = (t, e) => {
1117
1126
  for (const s of t) {
1118
1127
  const r = Ne(s, e);
@@ -1129,20 +1138,20 @@ const $ = (...t) => {
1129
1138
  ]);
1130
1139
  if (o !== void 0) return o;
1131
1140
  }
1132
- }, ss = () => {
1133
- const t = pe(), s = dt().sidebar;
1141
+ }, ns = () => {
1142
+ const t = pe(), s = yt().sidebar;
1134
1143
  return Le(s, (r) => {
1135
1144
  if (r.type === "doc" && $(r.id) === t.pathname)
1136
1145
  return r;
1137
1146
  });
1138
- }, rs = (t) => {
1147
+ }, is = (t) => {
1139
1148
  const e = pe();
1140
1149
  return Ne(t, (s) => {
1141
1150
  if (s.type === "category" && s.link && $(s.link.id) === e.pathname || s.type === "doc" && $(s.id) === e.pathname)
1142
1151
  return !0;
1143
1152
  });
1144
- }, ns = () => {
1145
- const t = pe().pathname, s = dt().sidebar;
1153
+ }, as = () => {
1154
+ const t = pe().pathname, s = yt().sidebar;
1146
1155
  let r, i, o = !1;
1147
1156
  return Le(s, (a) => {
1148
1157
  const u = a.type === "doc" ? $(a.id) : a.type === "category" && a.link ? $(a.link.id) : void 0;
@@ -1152,24 +1161,24 @@ const $ = (...t) => {
1152
1161
  t === u ? o = !0 : r = { label: a.label, id: u };
1153
1162
  }
1154
1163
  }), { prev: r, next: i };
1155
- }, Bt = ft(
1164
+ }, Gt = pt(
1156
1165
  void 0
1157
- ), lt = () => {
1158
- const t = yt(Bt);
1166
+ ), ft = () => {
1167
+ const t = bt(Gt);
1159
1168
  if (!t)
1160
1169
  throw new Error("useZudoku must be used within a ZudokuProvider.");
1161
1170
  return t;
1162
- }, is = () => {
1163
- const { getApiIdentities: t } = lt();
1164
- return _t({
1171
+ }, us = () => {
1172
+ const { getApiIdentities: t } = ft();
1173
+ return Ht({
1165
1174
  queryFn: t,
1166
- queryKey: ["api-identities"]
1175
+ queryKey: [dt.API_IDENTITIES]
1167
1176
  });
1168
- }, dt = () => {
1169
- const { getPluginSidebar: t, sidebars: e, topNavigation: s } = lt(), r = pe(), i = Object.entries(e).find(([, u]) => Le(u, (l) => {
1177
+ }, yt = () => {
1178
+ const { getPluginSidebar: t, sidebars: e, topNavigation: s } = ft(), r = pe(), i = Object.entries(e).find(([, u]) => Le(u, (l) => {
1170
1179
  if ((l.type === "doc" ? $(l.id) : l.type === "category" && l.link ? $(l.link.id) : void 0) === r.pathname)
1171
1180
  return l;
1172
- })), o = s.find((u) => u.id === (i == null ? void 0 : i[0])) ?? s.find((u) => bt(u.id, r.pathname)), { data: a } = Ht({
1181
+ })), o = s.find((u) => u.id === (i == null ? void 0 : i[0])) ?? s.find((u) => vt(u.id, r.pathname)), { data: a } = Bt({
1173
1182
  queryFn: () => t(r.pathname),
1174
1183
  queryKey: ["plugin-sidebar", r.pathname]
1175
1184
  });
@@ -1179,40 +1188,42 @@ const $ = (...t) => {
1179
1188
  };
1180
1189
  };
1181
1190
  export {
1182
- ye as A,
1183
- ts as B,
1184
- rs as C,
1185
- dt as D,
1186
- Le as E,
1187
- es as Q,
1188
- Ot as R,
1189
- Qe as S,
1190
- Bt as Z,
1191
- lt as a,
1192
- ss as b,
1193
- wt as c,
1194
- ns as d,
1195
- Tt as e,
1191
+ ss as A,
1192
+ yt as B,
1193
+ Le as C,
1194
+ rs as D,
1195
+ dt as E,
1196
+ Ht as F,
1197
+ us as G,
1198
+ ts as Q,
1199
+ It as R,
1200
+ Ae as S,
1201
+ Gt as Z,
1202
+ ft as a,
1203
+ ns as b,
1204
+ Ot as c,
1205
+ as as d,
1206
+ ct as e,
1196
1207
  Ve as f,
1197
- Ut as g,
1198
- Re as h,
1208
+ At as g,
1209
+ Ce as h,
1199
1210
  is as i,
1200
1211
  $ as j,
1201
- _t as k,
1202
- mt as l,
1203
- Wt as m,
1204
- Ae as n,
1205
- Jt as o,
1206
- ge as p,
1207
- gt as q,
1208
- Yt as r,
1212
+ gt as k,
1213
+ Yt as l,
1214
+ Jt as m,
1215
+ Ue as n,
1216
+ ge as o,
1217
+ Ct as p,
1218
+ es as q,
1219
+ Xt as r,
1209
1220
  we as s,
1210
- Xt as t,
1211
- Ht as u,
1212
- tt as v,
1213
- st as w,
1214
- fe as x,
1215
- Zt as y,
1216
- qe as z
1221
+ tt as t,
1222
+ Bt as u,
1223
+ st as v,
1224
+ fe as w,
1225
+ Wt as x,
1226
+ Qe as y,
1227
+ ye as z
1217
1228
  };
1218
- //# sourceMappingURL=ZudokuContext-D3ayHjP-.js.map
1229
+ //# sourceMappingURL=ZudokuContext-8jts0fF3.js.map