zudoku 0.0.0-e614aaa → 0.0.0-e6d1d34

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 (543) hide show
  1. package/README.md +1 -1
  2. package/dist/app/entry.server.d.ts +8 -6
  3. package/dist/app/entry.server.js +12 -8
  4. package/dist/app/entry.server.js.map +1 -1
  5. package/dist/app/main.js +2 -0
  6. package/dist/app/main.js.map +1 -1
  7. package/dist/app/tailwind.js +14 -0
  8. package/dist/app/tailwind.js.map +1 -1
  9. package/dist/cli/build/handler.js +2 -1
  10. package/dist/cli/build/handler.js.map +1 -1
  11. package/dist/cli/cmds/dev.d.ts +1 -1
  12. package/dist/cli/cmds/dev.js.map +1 -1
  13. package/dist/cli/dev/handler.js +2 -1
  14. package/dist/cli/dev/handler.js.map +1 -1
  15. package/dist/cli/preview/handler.js +13 -15
  16. package/dist/cli/preview/handler.js.map +1 -1
  17. package/dist/config/common.d.ts +0 -1
  18. package/dist/config/config.d.ts +13 -8
  19. package/dist/config/loader.d.ts +2 -2
  20. package/dist/config/loader.js +14 -25
  21. package/dist/config/loader.js.map +1 -1
  22. package/dist/config/validators/common.d.ts +2773 -597
  23. package/dist/config/validators/common.js +81 -4
  24. package/dist/config/validators/common.js.map +1 -1
  25. package/dist/config/validators/validate.d.ts +1013 -257
  26. package/dist/lib/authentication/authentication.d.ts +1 -0
  27. package/dist/lib/authentication/hook.d.ts +1 -0
  28. package/dist/lib/authentication/hook.js +11 -1
  29. package/dist/lib/authentication/hook.js.map +1 -1
  30. package/dist/lib/authentication/providers/clerk.d.ts +2 -2
  31. package/dist/lib/authentication/providers/clerk.js +19 -0
  32. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  33. package/dist/lib/authentication/providers/openid.d.ts +1 -0
  34. package/dist/lib/authentication/providers/openid.js +20 -8
  35. package/dist/lib/authentication/providers/openid.js.map +1 -1
  36. package/dist/lib/authentication/providers/supabase.d.ts +4 -0
  37. package/dist/lib/authentication/providers/supabase.js +117 -0
  38. package/dist/lib/authentication/providers/supabase.js.map +1 -0
  39. package/dist/lib/authentication/state.d.ts +0 -26
  40. package/dist/lib/authentication/state.js +1 -16
  41. package/dist/lib/authentication/state.js.map +1 -1
  42. package/dist/lib/components/AnchorLink.d.ts +2 -2
  43. package/dist/lib/components/AnchorLink.js +5 -4
  44. package/dist/lib/components/AnchorLink.js.map +1 -1
  45. package/dist/lib/components/Bootstrap.d.ts +2 -1
  46. package/dist/lib/components/Bootstrap.js +3 -2
  47. package/dist/lib/components/Bootstrap.js.map +1 -1
  48. package/dist/lib/components/Footer.d.ts +1 -0
  49. package/dist/lib/components/Footer.js +32 -0
  50. package/dist/lib/components/Footer.js.map +1 -0
  51. package/dist/lib/components/Header.js +4 -4
  52. package/dist/lib/components/Header.js.map +1 -1
  53. package/dist/lib/components/Heading.d.ts +1 -1
  54. package/dist/lib/components/InlineCode.d.ts +2 -1
  55. package/dist/lib/components/InlineCode.js +2 -9
  56. package/dist/lib/components/InlineCode.js.map +1 -1
  57. package/dist/lib/components/Layout.js +8 -29
  58. package/dist/lib/components/Layout.js.map +1 -1
  59. package/dist/lib/components/Main.d.ts +2 -0
  60. package/dist/lib/components/Main.js +17 -0
  61. package/dist/lib/components/Main.js.map +1 -0
  62. package/dist/lib/components/MobileTopNavigation.js +6 -3
  63. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  64. package/dist/lib/components/Pagination.d.ts +11 -0
  65. package/dist/lib/components/Pagination.js +10 -0
  66. package/dist/lib/components/Pagination.js.map +1 -0
  67. package/dist/lib/components/TopNavigation.d.ts +3 -2
  68. package/dist/lib/components/TopNavigation.js +26 -13
  69. package/dist/lib/components/TopNavigation.js.map +1 -1
  70. package/dist/lib/components/Zudoku.js +9 -3
  71. package/dist/lib/components/Zudoku.js.map +1 -1
  72. package/dist/lib/components/cache.d.ts +7 -0
  73. package/dist/lib/components/cache.js +7 -0
  74. package/dist/lib/components/cache.js.map +1 -1
  75. package/dist/lib/components/context/BypassProtectedRoutesContext.d.ts +1 -0
  76. package/dist/lib/components/context/BypassProtectedRoutesContext.js +3 -0
  77. package/dist/lib/components/context/BypassProtectedRoutesContext.js.map +1 -0
  78. package/dist/lib/components/context/ViewportAnchorContext.d.ts +2 -4
  79. package/dist/lib/components/context/ViewportAnchorContext.js +5 -10
  80. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  81. package/dist/lib/components/context/ZudokuContext.d.ts +2 -2
  82. package/dist/lib/components/context/ZudokuContext.js +13 -7
  83. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  84. package/dist/lib/components/index.d.ts +5 -2
  85. package/dist/lib/components/navigation/PoweredByZudoku.d.ts +3 -0
  86. package/dist/lib/components/navigation/PoweredByZudoku.js +6 -0
  87. package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -0
  88. package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
  89. package/dist/lib/components/navigation/Sidebar.js +1 -12
  90. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  91. package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
  92. package/dist/lib/components/navigation/SidebarCategory.js +10 -6
  93. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  94. package/dist/lib/components/navigation/SidebarItem.d.ts +1 -0
  95. package/dist/lib/components/navigation/SidebarItem.js +17 -11
  96. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  97. package/dist/lib/components/navigation/SidebarWrapper.d.ts +7 -6
  98. package/dist/lib/components/navigation/SidebarWrapper.js +18 -3
  99. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  100. package/dist/lib/{plugins/markdown → components/navigation}/Toc.js +5 -7
  101. package/dist/lib/components/navigation/Toc.js.map +1 -0
  102. package/dist/lib/components/navigation/ZudokuLogo.d.ts +6 -0
  103. package/dist/lib/components/navigation/ZudokuLogo.js +5 -0
  104. package/dist/lib/components/navigation/ZudokuLogo.js.map +1 -0
  105. package/dist/lib/core/RouteGuard.d.ts +1 -0
  106. package/dist/lib/core/RouteGuard.js +10 -3
  107. package/dist/lib/core/RouteGuard.js.map +1 -1
  108. package/dist/lib/core/ZudokuContext.d.ts +23 -7
  109. package/dist/lib/core/ZudokuContext.js +12 -5
  110. package/dist/lib/core/ZudokuContext.js.map +1 -1
  111. package/dist/lib/core/plugins.d.ts +9 -7
  112. package/dist/lib/errors/ErrorAlert.js +6 -1
  113. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  114. package/dist/lib/hooks/useEvent.test.js +1 -1
  115. package/dist/lib/hooks/useEvent.test.js.map +1 -1
  116. package/dist/lib/oas/graphql/index.d.ts +17 -4
  117. package/dist/lib/oas/graphql/index.js +148 -38
  118. package/dist/lib/oas/graphql/index.js.map +1 -1
  119. package/dist/lib/oas/parser/dereference/index.js +2 -0
  120. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  121. package/dist/lib/oas/parser/index.d.ts +5 -3
  122. package/dist/lib/oas/parser/index.js +0 -22
  123. package/dist/lib/oas/parser/index.js.map +1 -1
  124. package/dist/lib/plugins/api-catalog/Catalog.js +1 -1
  125. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
  126. package/dist/lib/plugins/api-catalog/index.js +19 -17
  127. package/dist/lib/plugins/api-catalog/index.js.map +1 -1
  128. package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
  129. package/dist/lib/plugins/markdown/MdxPage.js +3 -9
  130. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  131. package/dist/lib/plugins/openapi/ColorizedParam.js +1 -1
  132. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  133. package/dist/lib/plugins/openapi/Endpoint.js +1 -1
  134. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  135. package/dist/lib/plugins/openapi/OperationList.d.ts +1 -1
  136. package/dist/lib/plugins/openapi/OperationList.js +63 -19
  137. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  138. package/dist/lib/plugins/openapi/OperationListItem.d.ts +1 -1
  139. package/dist/lib/plugins/openapi/OperationListItem.js +6 -12
  140. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  141. package/dist/lib/plugins/openapi/ParamInfos.d.ts +6 -0
  142. package/dist/lib/plugins/openapi/ParamInfos.js +42 -0
  143. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -0
  144. package/dist/lib/plugins/openapi/ParameterListItem.js +9 -4
  145. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  146. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -1
  147. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  148. package/dist/lib/plugins/openapi/SchemaList.d.ts +1 -0
  149. package/dist/lib/plugins/openapi/SchemaList.js +52 -0
  150. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -0
  151. package/dist/lib/plugins/openapi/Sidecar.js +38 -9
  152. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  153. package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
  154. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
  155. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +1 -1
  156. package/dist/lib/plugins/openapi/client/GraphQLClient.js +1 -1
  157. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
  158. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +6 -2
  159. package/dist/lib/plugins/openapi/client/useCreateQuery.js +6 -5
  160. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  161. package/dist/lib/plugins/openapi/components/EnumValues.d.ts +5 -0
  162. package/dist/lib/plugins/openapi/components/EnumValues.js +15 -0
  163. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -0
  164. package/dist/lib/plugins/openapi/components/SelectOnClick.d.ts +5 -0
  165. package/dist/lib/plugins/openapi/components/SelectOnClick.js +16 -0
  166. package/dist/lib/plugins/openapi/components/SelectOnClick.js.map +1 -0
  167. package/dist/lib/plugins/openapi/graphql/gql.d.ts +9 -5
  168. package/dist/lib/plugins/openapi/graphql/gql.js +5 -4
  169. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  170. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +108 -55
  171. package/dist/lib/plugins/openapi/graphql/graphql.js +59 -34
  172. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  173. package/dist/lib/plugins/openapi/index.d.ts +6 -11
  174. package/dist/lib/plugins/openapi/index.js +41 -60
  175. package/dist/lib/plugins/openapi/index.js.map +1 -1
  176. package/dist/lib/plugins/openapi/interfaces.d.ts +36 -10
  177. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +2 -2
  178. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -5
  179. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  180. package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
  181. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  182. package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +11 -0
  183. package/dist/lib/plugins/openapi/playground/IdentityDialog.js +14 -0
  184. package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
  185. package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
  186. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +10 -0
  187. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
  188. package/dist/lib/plugins/openapi/playground/Playground.d.ts +13 -2
  189. package/dist/lib/plugins/openapi/playground/Playground.js +81 -27
  190. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  191. package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
  192. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  193. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
  194. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
  195. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
  196. package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
  197. package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
  198. package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
  199. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +19 -13
  200. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  201. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +6 -4
  202. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +4 -3
  203. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  204. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +1 -2
  205. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +2 -2
  206. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +1 -1
  207. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +2 -1
  208. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +2 -2
  209. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +1 -1
  210. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -1
  211. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +1 -1
  212. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +1 -1
  213. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.d.ts +4 -0
  214. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +12 -0
  215. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -0
  216. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +2 -4
  217. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +18 -13
  218. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  219. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -2
  220. package/dist/lib/plugins/openapi/schema/SchemaView.js +33 -48
  221. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  222. package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
  223. package/dist/lib/plugins/openapi/schema/utils.js +3 -1
  224. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  225. package/dist/lib/plugins/openapi/state.d.ts +25 -0
  226. package/dist/lib/plugins/openapi/state.js +18 -0
  227. package/dist/lib/plugins/openapi/state.js.map +1 -0
  228. package/dist/lib/plugins/openapi/util/createSidebarCategory.js +5 -7
  229. package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +1 -1
  230. package/dist/lib/plugins/openapi/util/getRoutes.js +9 -3
  231. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  232. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +23 -10
  233. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  234. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -0
  235. package/dist/lib/plugins/search-pagefind/ResultList.js +19 -17
  236. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  237. package/dist/lib/plugins/search-pagefind/get-results.d.ts +8 -1
  238. package/dist/lib/plugins/search-pagefind/get-results.js +9 -4
  239. package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -1
  240. package/dist/lib/ui/Badge.d.ts +1 -1
  241. package/dist/lib/ui/Button.d.ts +2 -2
  242. package/dist/lib/ui/Button.js +2 -1
  243. package/dist/lib/ui/Button.js.map +1 -1
  244. package/dist/lib/ui/Callout.d.ts +2 -1
  245. package/dist/lib/ui/Callout.js +3 -2
  246. package/dist/lib/ui/Callout.js.map +1 -1
  247. package/dist/lib/ui/Checkbox.d.ts +2 -8
  248. package/dist/lib/ui/Checkbox.js +1 -13
  249. package/dist/lib/ui/Checkbox.js.map +1 -1
  250. package/dist/lib/ui/Command.d.ts +1 -1
  251. package/dist/lib/ui/Select.js +1 -1
  252. package/dist/lib/ui/Select.js.map +1 -1
  253. package/dist/lib/ui/Stepper.d.ts +0 -1
  254. package/dist/lib/ui/Stepper.js +1 -1
  255. package/dist/lib/ui/Stepper.js.map +1 -1
  256. package/dist/lib/ui/SyntaxHighlight.d.ts +2 -1
  257. package/dist/lib/ui/SyntaxHighlight.js +21 -15
  258. package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
  259. package/dist/lib/util/MdxComponents.d.ts +3 -2
  260. package/dist/lib/util/MdxComponents.js +2 -2
  261. package/dist/lib/util/MdxComponents.js.map +1 -1
  262. package/dist/lib/util/joinPath.d.ts +3 -0
  263. package/dist/lib/util/joinPath.js +3 -0
  264. package/dist/lib/util/joinPath.js.map +1 -1
  265. package/dist/lib/util/traverse.d.ts +2 -8
  266. package/dist/lib/util/traverse.js +2 -2
  267. package/dist/lib/util/traverse.js.map +1 -1
  268. package/dist/lib/util/types.d.ts +7 -0
  269. package/dist/lib/util/types.js +2 -0
  270. package/dist/lib/util/types.js.map +1 -0
  271. package/dist/lib/util/useOnScreen.d.ts +3 -2
  272. package/dist/lib/util/useOnScreen.js +3 -3
  273. package/dist/lib/util/useOnScreen.js.map +1 -1
  274. package/dist/lib/util/useScrollToAnchor.js +20 -12
  275. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  276. package/dist/vite/api/schema-codegen.d.ts +1 -1
  277. package/dist/vite/api/schema-codegen.js +35 -12
  278. package/dist/vite/api/schema-codegen.js.map +1 -1
  279. package/dist/vite/api/schema-codegen.test.js +66 -0
  280. package/dist/vite/api/schema-codegen.test.js.map +1 -1
  281. package/dist/vite/build.js +1 -4
  282. package/dist/vite/build.js.map +1 -1
  283. package/dist/vite/config.js +7 -9
  284. package/dist/vite/config.js.map +1 -1
  285. package/dist/vite/create-pagefind-index.d.ts +4 -0
  286. package/dist/vite/create-pagefind-index.js +12 -0
  287. package/dist/vite/create-pagefind-index.js.map +1 -0
  288. package/dist/vite/dev-server.js +4 -4
  289. package/dist/vite/dev-server.js.map +1 -1
  290. package/dist/vite/plugin-api.js +36 -29
  291. package/dist/vite/plugin-api.js.map +1 -1
  292. package/dist/vite/plugin-config-reload.js +3 -2
  293. package/dist/vite/plugin-config-reload.js.map +1 -1
  294. package/dist/vite/plugin-docs.d.ts +1 -1
  295. package/dist/vite/plugin-docs.js +18 -1
  296. package/dist/vite/plugin-docs.js.map +1 -1
  297. package/dist/vite/prerender/FileWritingResponse.d.ts +9 -5
  298. package/dist/vite/prerender/FileWritingResponse.js +5 -5
  299. package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
  300. package/dist/vite/prerender/InMemoryResponse.d.ts +16 -0
  301. package/dist/vite/prerender/InMemoryResponse.js +32 -0
  302. package/dist/vite/prerender/InMemoryResponse.js.map +1 -0
  303. package/dist/vite/prerender/PrerenderResponse.d.ts +10 -0
  304. package/dist/vite/prerender/PrerenderResponse.js +2 -0
  305. package/dist/vite/prerender/PrerenderResponse.js.map +1 -0
  306. package/dist/vite/prerender/prerender.d.ts +1 -0
  307. package/dist/vite/prerender/prerender.js +32 -8
  308. package/dist/vite/prerender/prerender.js.map +1 -1
  309. package/dist/vite/prerender/worker.js +41 -14
  310. package/dist/vite/prerender/worker.js.map +1 -1
  311. package/dist/zuplo/with-zuplo.js +4 -0
  312. package/dist/zuplo/with-zuplo.js.map +1 -1
  313. package/lib/{AuthenticationPlugin-CiO1FM6Q.js → AuthenticationPlugin-foqdvvkf.js} +3 -3
  314. package/lib/{AuthenticationPlugin-CiO1FM6Q.js.map → AuthenticationPlugin-foqdvvkf.js.map} +1 -1
  315. package/lib/Button-Fp19CMUr.js +49 -0
  316. package/lib/Button-Fp19CMUr.js.map +1 -0
  317. package/lib/Callout-B2vsR09t.js +229 -0
  318. package/lib/Callout-B2vsR09t.js.map +1 -0
  319. package/lib/{Dialog-DIKGQxQc.js → Dialog-sbgekbjb.js} +47 -32
  320. package/lib/{Dialog-DIKGQxQc.js.map → Dialog-sbgekbjb.js.map} +1 -1
  321. package/lib/Drawer-kDAfOq_2.js +1133 -0
  322. package/lib/Drawer-kDAfOq_2.js.map +1 -0
  323. package/lib/{Markdown-DePfm7oQ.js → Markdown-aF5FdsNi.js} +6268 -4572
  324. package/lib/Markdown-aF5FdsNi.js.map +1 -0
  325. package/lib/MdxPage-Vw_dc9Yz.js +85 -0
  326. package/lib/MdxPage-Vw_dc9Yz.js.map +1 -0
  327. package/lib/{OasProvider-BSuptFK-.js → OasProvider-C5paEivQ.js} +4 -4
  328. package/lib/{OasProvider-BSuptFK-.js.map → OasProvider-C5paEivQ.js.map} +1 -1
  329. package/lib/OperationList-Ds9Izgkn.js +5069 -0
  330. package/lib/OperationList-Ds9Izgkn.js.map +1 -0
  331. package/lib/Pagination-SdlocK96.js +48 -0
  332. package/lib/Pagination-SdlocK96.js.map +1 -0
  333. package/lib/{index.esm-CQHE3GEU.js → RouteGuard-CqZPoZYJ.js} +192 -139
  334. package/lib/RouteGuard-CqZPoZYJ.js.map +1 -0
  335. package/lib/SchemaList-NZbDXAV5.js +148 -0
  336. package/lib/SchemaList-NZbDXAV5.js.map +1 -0
  337. package/lib/SchemaView-B3fOPR4V.js +357 -0
  338. package/lib/SchemaView-B3fOPR4V.js.map +1 -0
  339. package/lib/{Select-Dqtcn53H.js → Select-DVFRKf1R.js} +9 -9
  340. package/lib/{Select-Dqtcn53H.js.map → Select-DVFRKf1R.js.map} +1 -1
  341. package/lib/SlotletProvider-DXvc0aY6.js +338 -0
  342. package/lib/SlotletProvider-DXvc0aY6.js.map +1 -0
  343. package/lib/Spinner-CE68iCm0.js +7 -0
  344. package/lib/Spinner-CE68iCm0.js.map +1 -0
  345. package/lib/SyntaxHighlight-BEoSoPEo.js +2890 -0
  346. package/lib/SyntaxHighlight-BEoSoPEo.js.map +1 -0
  347. package/lib/Toc-YBsgI72s.js +92 -0
  348. package/lib/Toc-YBsgI72s.js.map +1 -0
  349. package/lib/{chunk-IR6S3I6Y-D_3UmFIn.js → chunk-HA7DTUK3-C4gP41vD.js} +278 -278
  350. package/lib/chunk-HA7DTUK3-C4gP41vD.js.map +1 -0
  351. package/lib/{circular-v7K6lDDh.js → circular-ByJI6Mci.js} +4887 -4419
  352. package/lib/circular-ByJI6Mci.js.map +1 -0
  353. package/lib/{createServer-DmusVVsi.js → createServer-mYvGvmc0.js} +4150 -4424
  354. package/lib/createServer-mYvGvmc0.js.map +1 -0
  355. package/lib/{hook-CN__aZIt.js → hook-CqpVYDqN.js} +398 -379
  356. package/lib/hook-CqpVYDqN.js.map +1 -0
  357. package/lib/index-D48iOQvJ.js +1973 -0
  358. package/lib/index-D48iOQvJ.js.map +1 -0
  359. package/lib/index-PGJOZ6R-.js +2227 -0
  360. package/lib/index-PGJOZ6R-.js.map +1 -0
  361. package/lib/{mutation-EclmI0is.js → mutation-8LjrN7uz.js} +2 -2
  362. package/lib/{mutation-EclmI0is.js.map → mutation-8LjrN7uz.js.map} +1 -1
  363. package/lib/post-processors/traverse.js +2 -2
  364. package/lib/post-processors/traverse.js.map +1 -1
  365. package/lib/prism-bash.min-HHIMdNJ_.js.map +1 -1
  366. package/lib/prism-csharp.min-bQAo2pmx.js.map +1 -1
  367. package/lib/prism-java.min-BpvsOuIa.js.map +1 -1
  368. package/lib/prism-javascript.min-CEqHqgbm.js.map +1 -1
  369. package/lib/prism-json.min-B1GJqK1k.js.map +1 -1
  370. package/lib/prism-jsstacktrace.min-BfobCF2F.js +2 -0
  371. package/lib/prism-jsstacktrace.min-BfobCF2F.js.map +1 -0
  372. package/lib/prism-markdown.min-C0Qn0m-5.js.map +1 -1
  373. package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
  374. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -1
  375. package/lib/prism-ruby.min-Dx9KO9ds.js.map +1 -1
  376. package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
  377. package/lib/ui/ActionButton.js +11 -10
  378. package/lib/ui/ActionButton.js.map +1 -1
  379. package/lib/ui/Button.js +13 -12
  380. package/lib/ui/Button.js.map +1 -1
  381. package/lib/ui/Callout.js +39 -21
  382. package/lib/ui/Callout.js.map +1 -1
  383. package/lib/ui/Checkbox.js +15 -25
  384. package/lib/ui/Checkbox.js.map +1 -1
  385. package/lib/ui/Command.js +1 -1
  386. package/lib/ui/Drawer.js +14 -1129
  387. package/lib/ui/Drawer.js.map +1 -1
  388. package/lib/ui/Select.js +1 -1
  389. package/lib/ui/Select.js.map +1 -1
  390. package/lib/ui/Stepper.js.map +1 -1
  391. package/lib/ui/SyntaxHighlight.js +8 -2902
  392. package/lib/ui/SyntaxHighlight.js.map +1 -1
  393. package/lib/{useExposedProps-RIvey2Oy.js → useExposedProps-B9qXJedG.js} +2 -2
  394. package/lib/{useExposedProps-RIvey2Oy.js.map → useExposedProps-B9qXJedG.js.map} +1 -1
  395. package/lib/useLatest-hmRS46UF.js +11 -0
  396. package/lib/useLatest-hmRS46UF.js.map +1 -0
  397. package/lib/zudoku.auth-auth0.js +1 -1
  398. package/lib/zudoku.auth-clerk.js +59 -41
  399. package/lib/zudoku.auth-clerk.js.map +1 -1
  400. package/lib/zudoku.auth-openid.js +341 -337
  401. package/lib/zudoku.auth-openid.js.map +1 -1
  402. package/lib/zudoku.components.js +32 -1395
  403. package/lib/zudoku.components.js.map +1 -1
  404. package/lib/zudoku.hooks.js +1 -1
  405. package/lib/zudoku.plugin-api-catalog.js +94 -98
  406. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  407. package/lib/zudoku.plugin-api-keys.js +4 -4
  408. package/lib/zudoku.plugin-custom-pages.js +2 -2
  409. package/lib/zudoku.plugin-markdown.js +1 -1
  410. package/lib/zudoku.plugin-openapi.js +5 -7
  411. package/lib/zudoku.plugin-openapi.js.map +1 -1
  412. package/lib/zudoku.plugin-redirect.js +1 -1
  413. package/lib/zudoku.plugin-search-pagefind.js +233 -0
  414. package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
  415. package/lib/zudoku.plugins.js.map +1 -1
  416. package/package.json +32 -24
  417. package/src/app/entry.server.tsx +23 -13
  418. package/src/app/main.css +98 -57
  419. package/src/app/main.tsx +2 -0
  420. package/src/app/tailwind.ts +14 -0
  421. package/src/lib/authentication/authentication.ts +2 -0
  422. package/src/lib/authentication/hook.ts +12 -1
  423. package/src/lib/authentication/providers/clerk.tsx +22 -2
  424. package/src/lib/authentication/providers/openid.tsx +23 -10
  425. package/src/lib/authentication/providers/supabase.tsx +157 -0
  426. package/src/lib/authentication/state.ts +1 -35
  427. package/src/lib/components/AnchorLink.tsx +9 -7
  428. package/src/lib/components/Bootstrap.tsx +13 -6
  429. package/src/lib/components/Footer.tsx +136 -0
  430. package/src/lib/components/Header.tsx +11 -7
  431. package/src/lib/components/InlineCode.tsx +13 -16
  432. package/src/lib/components/Layout.tsx +22 -68
  433. package/src/lib/components/Main.tsx +50 -0
  434. package/src/lib/components/MobileTopNavigation.tsx +27 -18
  435. package/src/lib/components/Pagination.tsx +50 -0
  436. package/src/lib/components/TopNavigation.tsx +40 -17
  437. package/src/lib/components/Zudoku.tsx +12 -3
  438. package/src/lib/components/cache.ts +8 -0
  439. package/src/lib/components/context/BypassProtectedRoutesContext.ts +3 -0
  440. package/src/lib/components/context/ViewportAnchorContext.tsx +6 -15
  441. package/src/lib/components/context/ZudokuContext.ts +17 -8
  442. package/src/lib/components/navigation/PoweredByZudoku.tsx +23 -0
  443. package/src/lib/components/navigation/Sidebar.tsx +30 -44
  444. package/src/lib/components/navigation/SidebarCategory.tsx +15 -12
  445. package/src/lib/components/navigation/SidebarItem.tsx +21 -29
  446. package/src/lib/components/navigation/SidebarWrapper.tsx +42 -23
  447. package/src/lib/{plugins/markdown → components/navigation}/Toc.tsx +5 -14
  448. package/src/lib/components/navigation/ZudokuLogo.tsx +25 -0
  449. package/src/lib/core/RouteGuard.tsx +27 -4
  450. package/src/lib/core/ZudokuContext.ts +35 -15
  451. package/src/lib/core/plugins.ts +8 -8
  452. package/src/lib/errors/ErrorAlert.tsx +24 -17
  453. package/src/lib/hooks/useEvent.test.tsx +1 -1
  454. package/src/lib/oas/graphql/index.ts +202 -54
  455. package/src/lib/oas/parser/dereference/index.ts +2 -0
  456. package/src/lib/oas/parser/index.ts +7 -29
  457. package/src/lib/plugins/api-catalog/Catalog.tsx +1 -4
  458. package/src/lib/plugins/api-catalog/index.tsx +40 -35
  459. package/src/lib/plugins/markdown/MdxPage.tsx +11 -47
  460. package/src/lib/plugins/openapi/ColorizedParam.tsx +1 -1
  461. package/src/lib/plugins/openapi/Endpoint.tsx +1 -1
  462. package/src/lib/plugins/openapi/OperationList.tsx +162 -84
  463. package/src/lib/plugins/openapi/OperationListItem.tsx +116 -110
  464. package/src/lib/plugins/openapi/ParamInfos.tsx +87 -0
  465. package/src/lib/plugins/openapi/ParameterListItem.tsx +35 -23
  466. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -0
  467. package/src/lib/plugins/openapi/SchemaList.tsx +151 -0
  468. package/src/lib/plugins/openapi/Sidecar.tsx +47 -11
  469. package/src/lib/plugins/openapi/SimpleSelect.tsx +1 -1
  470. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +1 -1
  471. package/src/lib/plugins/openapi/client/useCreateQuery.ts +13 -5
  472. package/src/lib/plugins/openapi/components/EnumValues.tsx +58 -0
  473. package/src/lib/plugins/openapi/components/SelectOnClick.tsx +29 -0
  474. package/src/lib/plugins/openapi/graphql/gql.ts +29 -20
  475. package/src/lib/plugins/openapi/graphql/graphql.ts +172 -86
  476. package/src/lib/plugins/openapi/index.tsx +55 -87
  477. package/src/lib/plugins/openapi/interfaces.ts +44 -15
  478. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +30 -32
  479. package/src/lib/plugins/openapi/playground/Headers.tsx +0 -1
  480. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +74 -0
  481. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +54 -0
  482. package/src/lib/plugins/openapi/playground/Playground.tsx +175 -88
  483. package/src/lib/plugins/openapi/playground/QueryParams.tsx +0 -1
  484. package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
  485. package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
  486. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +24 -4
  487. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +67 -45
  488. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +1 -8
  489. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +3 -0
  490. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +6 -3
  491. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +36 -0
  492. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +47 -50
  493. package/src/lib/plugins/openapi/schema/SchemaView.tsx +84 -138
  494. package/src/lib/plugins/openapi/schema/utils.ts +7 -1
  495. package/src/lib/plugins/openapi/state.ts +36 -0
  496. package/src/lib/plugins/openapi/util/createSidebarCategory.tsx +5 -7
  497. package/src/lib/plugins/openapi/util/getRoutes.tsx +9 -6
  498. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +39 -14
  499. package/src/lib/plugins/search-pagefind/ResultList.tsx +60 -53
  500. package/src/lib/plugins/search-pagefind/get-results.tsx +31 -10
  501. package/src/lib/ui/Button.tsx +4 -2
  502. package/src/lib/ui/Callout.tsx +28 -10
  503. package/src/lib/ui/Checkbox.tsx +8 -24
  504. package/src/lib/ui/Select.tsx +1 -1
  505. package/src/lib/ui/Stepper.tsx +1 -1
  506. package/src/lib/ui/SyntaxHighlight.tsx +96 -96
  507. package/src/lib/util/MdxComponents.tsx +2 -2
  508. package/src/lib/util/joinPath.tsx +3 -0
  509. package/src/lib/util/traverse.ts +4 -8
  510. package/src/lib/util/types.ts +7 -0
  511. package/src/lib/util/useOnScreen.ts +6 -4
  512. package/src/lib/util/useScrollToAnchor.ts +22 -12
  513. package/dist/lib/components/context/PluginSystem.d.ts +0 -1
  514. package/dist/lib/components/context/PluginSystem.js +0 -2
  515. package/dist/lib/components/context/PluginSystem.js.map +0 -1
  516. package/dist/lib/plugins/markdown/Toc.js.map +0 -1
  517. package/dist/vite/pagefind.d.ts +0 -4
  518. package/dist/vite/pagefind.js +0 -15
  519. package/dist/vite/pagefind.js.map +0 -1
  520. package/lib/Markdown-DePfm7oQ.js.map +0 -1
  521. package/lib/MdxPage-BN6l6zXL.js +0 -201
  522. package/lib/MdxPage-BN6l6zXL.js.map +0 -1
  523. package/lib/OperationList-DOcfDmJP.js +0 -5217
  524. package/lib/OperationList-DOcfDmJP.js.map +0 -1
  525. package/lib/SlotletProvider-DdtIOUi6.js +0 -221
  526. package/lib/SlotletProvider-DdtIOUi6.js.map +0 -1
  527. package/lib/Spinner-1KrEmx1V.js +0 -51
  528. package/lib/Spinner-1KrEmx1V.js.map +0 -1
  529. package/lib/chunk-IR6S3I6Y-D_3UmFIn.js.map +0 -1
  530. package/lib/circular-v7K6lDDh.js.map +0 -1
  531. package/lib/createServer-DmusVVsi.js.map +0 -1
  532. package/lib/hook-CN__aZIt.js.map +0 -1
  533. package/lib/index-BTbP6Lgf.js +0 -2103
  534. package/lib/index-BTbP6Lgf.js.map +0 -1
  535. package/lib/index.esm-CQHE3GEU.js.map +0 -1
  536. package/lib/joinUrl-10po2Jdj.js +0 -20
  537. package/lib/joinUrl-10po2Jdj.js.map +0 -1
  538. package/lib/useScrollToAnchor-RyqO3lj4.js +0 -290
  539. package/lib/useScrollToAnchor-RyqO3lj4.js.map +0 -1
  540. package/lib/zudoku.css +0 -1
  541. package/src/lib/components/context/PluginSystem.ts +0 -0
  542. package/src/lib/ui/Stepper.css +0 -43
  543. /package/dist/lib/{plugins/markdown → components/navigation}/Toc.d.ts +0 -0
@@ -1,12 +1,12 @@
1
- var Ge = (t) => {
1
+ var $e = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var me = (t, e, s) => e.has(t) || Ge("Cannot " + s);
5
- var n = (t, e, s) => (me(t, e, "read from private field"), s ? s.call(t) : e.get(t)), g = (t, e, s) => e.has(t) ? Ge("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), d = (t, e, s, r) => (me(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), w = (t, e, s) => (me(t, e, "access private method"), s);
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)), g = (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), d = (t, e, s, r) => (me(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), w = (t, e, s) => (me(t, e, "access private method"), s);
6
6
  import * as j from "react";
7
- import $e, { createContext as Et, useContext as Ot, useMemo as It } from "react";
8
- import { j as Ft } from "./jsx-runtime-CYK1ROHF.js";
9
- import { u as ve, m as ze } from "./chunk-IR6S3I6Y-D_3UmFIn.js";
7
+ import Ge, { createContext as Et, useContext as Ct } from "react";
8
+ import { j as Ot } from "./jsx-runtime-CYK1ROHF.js";
9
+ import { u as ve, m as ze } from "./chunk-HA7DTUK3-C4gP41vD.js";
10
10
  var qe = class {
11
11
  constructor() {
12
12
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
@@ -26,35 +26,35 @@ var qe = class {
26
26
  }, V = typeof window > "u" || "Deno" in globalThis;
27
27
  function Se() {
28
28
  }
29
- function fs(t, e) {
29
+ function bs(t, e) {
30
30
  return typeof t == "function" ? t(e) : t;
31
31
  }
32
32
  function we(t) {
33
33
  return typeof t == "number" && t >= 0 && t !== 1 / 0;
34
34
  }
35
- function at(t, e) {
35
+ function ot(t, e) {
36
36
  return Math.max(t + (e || 0) - Date.now(), 0);
37
37
  }
38
38
  function ye(t, e) {
39
39
  return typeof t == "function" ? t(e) : t;
40
40
  }
41
- function k(t, e) {
41
+ function x(t, e) {
42
42
  return typeof t == "function" ? t(e) : t;
43
43
  }
44
- function ys(t, e) {
44
+ function ms(t, e) {
45
45
  const {
46
46
  type: s = "all",
47
47
  exact: r,
48
48
  fetchStatus: i,
49
49
  predicate: a,
50
- queryKey: o,
51
- stale: u
50
+ queryKey: u,
51
+ stale: o
52
52
  } = t;
53
- if (o) {
53
+ if (u) {
54
54
  if (r) {
55
- if (e.queryHash !== Pt(o, e.options))
55
+ if (e.queryHash !== It(u, e.options))
56
56
  return !1;
57
- } else if (!Le(e.queryKey, o))
57
+ } else if (!Le(e.queryKey, u))
58
58
  return !1;
59
59
  }
60
60
  if (s !== "all") {
@@ -62,9 +62,9 @@ function ys(t, e) {
62
62
  if (s === "active" && !l || s === "inactive" && l)
63
63
  return !1;
64
64
  }
65
- return !(typeof u == "boolean" && e.isStale() !== u || i && i !== e.state.fetchStatus || a && !a(e));
65
+ return !(typeof o == "boolean" && e.isStale() !== o || i && i !== e.state.fetchStatus || a && !a(e));
66
66
  }
67
- function ps(t, e) {
67
+ function gs(t, e) {
68
68
  const { exact: s, status: r, predicate: i, mutationKey: a } = t;
69
69
  if (a) {
70
70
  if (!e.options.mutationKey)
@@ -77,7 +77,7 @@ function ps(t, e) {
77
77
  }
78
78
  return !(r && e.state.status !== r || i && !i(e));
79
79
  }
80
- function Pt(t, e) {
80
+ function It(t, e) {
81
81
  return ((e == null ? void 0 : e.queryKeyHashFn) || Re)(t);
82
82
  }
83
83
  function Re(t) {
@@ -89,22 +89,22 @@ function Re(t) {
89
89
  function Le(t, e) {
90
90
  return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((s) => !Le(t[s], e[s])) : !1;
91
91
  }
92
- function Ce(t, e) {
92
+ function Ee(t, e) {
93
93
  if (t === e)
94
94
  return t;
95
95
  const s = Je(t) && Je(e);
96
96
  if (s || Oe(t) && Oe(e)) {
97
- const r = s ? t : Object.keys(t), i = r.length, a = s ? e : Object.keys(e), o = a.length, u = s ? [] : {};
97
+ const r = s ? t : Object.keys(t), i = r.length, a = s ? e : Object.keys(e), u = a.length, o = s ? [] : {};
98
98
  let l = 0;
99
- for (let f = 0; f < o; f++) {
99
+ for (let f = 0; f < u; f++) {
100
100
  const m = s ? f : a[f];
101
- (!s && r.includes(m) || s) && t[m] === void 0 && e[m] === void 0 ? (u[m] = void 0, l++) : (u[m] = Ce(t[m], e[m]), u[m] === t[m] && t[m] !== void 0 && l++);
101
+ (!s && r.includes(m) || s) && t[m] === void 0 && e[m] === void 0 ? (o[m] = void 0, l++) : (o[m] = Ee(t[m], e[m]), o[m] === t[m] && t[m] !== void 0 && l++);
102
102
  }
103
- return i === o && l === i ? t : u;
103
+ return i === u && l === i ? t : o;
104
104
  }
105
105
  return e;
106
106
  }
107
- function Ee(t, e) {
107
+ function Ce(t, e) {
108
108
  if (!e || Object.keys(t).length !== Object.keys(e).length)
109
109
  return !1;
110
110
  for (const s in t)
@@ -127,7 +127,7 @@ function Oe(t) {
127
127
  function Ve(t) {
128
128
  return Object.prototype.toString.call(t) === "[object Object]";
129
129
  }
130
- function Tt(t) {
130
+ function Ft(t) {
131
131
  return new Promise((e) => {
132
132
  setTimeout(e, t);
133
133
  });
@@ -138,37 +138,40 @@ function Ie(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 Ee(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 Ee(t, e);
148
148
  }
149
149
  return e;
150
150
  }
151
- function vs(t, e, s = 0) {
151
+ function Ss(t) {
152
+ return t;
153
+ }
154
+ function ws(t, e, s = 0) {
152
155
  const r = [...t, e];
153
156
  return s && r.length > s ? r.slice(1) : r;
154
157
  }
155
- function bs(t, e, s = 0) {
158
+ function Rs(t, e, s = 0) {
156
159
  const r = [e, ...t];
157
160
  return s && r.length > s ? r.slice(0, -1) : r;
158
161
  }
159
162
  var pe = Symbol();
160
- function Dt(t, e) {
163
+ function Pt(t, e) {
161
164
  return process.env.NODE_ENV !== "production" && t.queryFn === pe && console.error(
162
165
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
163
166
  ), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === pe ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
164
167
  }
165
- var H, L, ee, tt, jt = (tt = class extends qe {
168
+ var H, L, X, st, Tt = (st = class extends qe {
166
169
  constructor() {
167
170
  super();
168
171
  g(this, H);
169
172
  g(this, L);
170
- g(this, ee);
171
- d(this, ee, (e) => {
173
+ g(this, X);
174
+ d(this, X, (e) => {
172
175
  if (!V && window.addEventListener) {
173
176
  const s = () => e();
174
177
  return window.addEventListener("visibilitychange", s, !1), () => {
@@ -178,7 +181,7 @@ var H, L, ee, tt, jt = (tt = class extends qe {
178
181
  });
179
182
  }
180
183
  onSubscribe() {
181
- n(this, L) || this.setEventListener(n(this, ee));
184
+ n(this, L) || this.setEventListener(n(this, X));
182
185
  }
183
186
  onUnsubscribe() {
184
187
  var e;
@@ -186,7 +189,7 @@ var H, L, ee, tt, jt = (tt = class extends qe {
186
189
  }
187
190
  setEventListener(e) {
188
191
  var s;
189
- d(this, ee, e), (s = n(this, L)) == null || s.call(this), d(this, L, e((r) => {
192
+ d(this, X, e), (s = n(this, L)) == null || s.call(this), d(this, L, e((r) => {
190
193
  typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
191
194
  }));
192
195
  }
@@ -203,13 +206,13 @@ var H, L, ee, tt, jt = (tt = class extends qe {
203
206
  var e;
204
207
  return typeof n(this, H) == "boolean" ? n(this, H) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
205
208
  }
206
- }, H = new WeakMap(), L = new WeakMap(), ee = new WeakMap(), tt), ot = new jt(), te, M, se, st, At = (st = class extends qe {
209
+ }, H = new WeakMap(), L = new WeakMap(), X = new WeakMap(), st), ut = new Tt(), ee, M, te, rt, Dt = (rt = class extends qe {
207
210
  constructor() {
208
211
  super();
209
- g(this, te, !0);
212
+ g(this, ee, !0);
210
213
  g(this, M);
211
- g(this, se);
212
- d(this, se, (e) => {
214
+ g(this, te);
215
+ d(this, te, (e) => {
213
216
  if (!V && window.addEventListener) {
214
217
  const s = () => e(!0), r = () => e(!1);
215
218
  return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
@@ -219,7 +222,7 @@ var H, L, ee, tt, jt = (tt = class extends qe {
219
222
  });
220
223
  }
221
224
  onSubscribe() {
222
- n(this, M) || this.setEventListener(n(this, se));
225
+ n(this, M) || this.setEventListener(n(this, te));
223
226
  }
224
227
  onUnsubscribe() {
225
228
  var e;
@@ -227,17 +230,17 @@ var H, L, ee, tt, jt = (tt = class extends qe {
227
230
  }
228
231
  setEventListener(e) {
229
232
  var s;
230
- d(this, se, e), (s = n(this, M)) == null || s.call(this), d(this, M, e(this.setOnline.bind(this)));
233
+ d(this, te, e), (s = n(this, M)) == null || s.call(this), d(this, M, e(this.setOnline.bind(this)));
231
234
  }
232
235
  setOnline(e) {
233
- n(this, te) !== e && (d(this, te, e), this.listeners.forEach((r) => {
236
+ n(this, ee) !== e && (d(this, ee, e), this.listeners.forEach((r) => {
234
237
  r(e);
235
238
  }));
236
239
  }
237
240
  isOnline() {
238
- return n(this, te);
241
+ return n(this, ee);
239
242
  }
240
- }, te = new WeakMap(), M = new WeakMap(), se = new WeakMap(), st), ut = new At();
243
+ }, ee = new WeakMap(), M = new WeakMap(), te = new WeakMap(), rt), ct = new Dt();
241
244
  function Fe() {
242
245
  let t, e;
243
246
  const s = new Promise((i, a) => {
@@ -260,30 +263,30 @@ function Fe() {
260
263
  }), e(i);
261
264
  }, s;
262
265
  }
263
- function kt(t) {
266
+ function jt(t) {
264
267
  return Math.min(1e3 * 2 ** t, 3e4);
265
268
  }
266
- function ct(t) {
267
- return (t ?? "online") === "online" ? ut.isOnline() : !0;
269
+ function ht(t) {
270
+ return (t ?? "online") === "online" ? ct.isOnline() : !0;
268
271
  }
269
- var ht = class extends Error {
272
+ var lt = class extends Error {
270
273
  constructor(t) {
271
274
  super("CancelledError"), this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
272
275
  }
273
276
  };
274
277
  function ge(t) {
275
- return t instanceof ht;
278
+ return t instanceof lt;
276
279
  }
277
- function xt(t) {
280
+ function At(t) {
278
281
  let e = !1, s = 0, r = !1, i;
279
- const a = Fe(), o = (h) => {
282
+ const a = Fe(), u = (h) => {
280
283
  var v;
281
- r || (p(new ht(h)), (v = t.abort) == null || v.call(t));
282
- }, u = () => {
284
+ r || (p(new lt(h)), (v = t.abort) == null || v.call(t));
285
+ }, o = () => {
283
286
  e = !0;
284
287
  }, l = () => {
285
288
  e = !1;
286
- }, f = () => ot.isFocused() && (t.networkMode === "always" || ut.isOnline()) && t.canRun(), m = () => ct(t.networkMode) && t.canRun(), c = (h) => {
289
+ }, f = () => ut.isFocused() && (t.networkMode === "always" || ct.isOnline()) && t.canRun(), m = () => ht(t.networkMode) && t.canRun(), c = (h) => {
287
290
  var v;
288
291
  r || (r = !0, (v = t.onSuccess) == null || v.call(t, h), i == null || i(), a.resolve(h));
289
292
  }, p = (h) => {
@@ -291,83 +294,83 @@ function xt(t) {
291
294
  r || (r = !0, (v = t.onError) == null || v.call(t, h), i == null || i(), a.reject(h));
292
295
  }, y = () => new Promise((h) => {
293
296
  var v;
294
- i = (C) => {
295
- (r || f()) && h(C);
297
+ i = (E) => {
298
+ (r || f()) && h(E);
296
299
  }, (v = t.onPause) == null || v.call(t);
297
300
  }).then(() => {
298
301
  var h;
299
302
  i = void 0, r || (h = t.onContinue) == null || h.call(t);
300
- }), E = () => {
303
+ }), C = () => {
301
304
  if (r)
302
305
  return;
303
306
  let h;
304
307
  const v = s === 0 ? t.initialPromise : void 0;
305
308
  try {
306
309
  h = v ?? t.fn();
307
- } catch (C) {
308
- h = Promise.reject(C);
310
+ } catch (E) {
311
+ h = Promise.reject(E);
309
312
  }
310
- Promise.resolve(h).then(c).catch((C) => {
313
+ Promise.resolve(h).then(c).catch((E) => {
311
314
  var be;
312
315
  if (r)
313
316
  return;
314
- const R = t.retry ?? (V ? 0 : 3), O = t.retryDelay ?? kt, q = typeof O == "function" ? O(s, C) : O, W = R === !0 || typeof R == "number" && s < R || typeof R == "function" && R(s, C);
315
- if (e || !W) {
316
- p(C);
317
+ const R = t.retry ?? (V ? 0 : 3), O = t.retryDelay ?? jt, q = typeof O == "function" ? O(s, E) : O, Z = R === !0 || typeof R == "number" && s < R || typeof R == "function" && R(s, E);
318
+ if (e || !Z) {
319
+ p(E);
317
320
  return;
318
321
  }
319
- s++, (be = t.onFail) == null || be.call(t, s, C), Tt(q).then(() => f() ? void 0 : y()).then(() => {
320
- e ? p(C) : E();
322
+ s++, (be = t.onFail) == null || be.call(t, s, E), Ft(q).then(() => f() ? void 0 : y()).then(() => {
323
+ e ? p(E) : C();
321
324
  });
322
325
  });
323
326
  };
324
327
  return {
325
328
  promise: a,
326
- cancel: o,
329
+ cancel: u,
327
330
  continue: () => (i == null || i(), a),
328
- cancelRetry: u,
331
+ cancelRetry: o,
329
332
  continueRetry: l,
330
333
  canStart: m,
331
- start: () => (m() ? E() : y().then(E), a)
334
+ start: () => (m() ? C() : y().then(C), a)
332
335
  };
333
336
  }
334
- function Qt() {
335
- let t = [], e = 0, s = (u) => {
336
- u();
337
- }, r = (u) => {
338
- u();
339
- }, i = (u) => setTimeout(u, 0);
340
- const a = (u) => {
341
- e ? t.push(u) : i(() => {
342
- s(u);
337
+ function xt() {
338
+ let t = [], e = 0, s = (o) => {
339
+ o();
340
+ }, r = (o) => {
341
+ o();
342
+ }, i = (o) => setTimeout(o, 0);
343
+ const a = (o) => {
344
+ e ? t.push(o) : i(() => {
345
+ s(o);
343
346
  });
344
- }, o = () => {
345
- const u = t;
346
- t = [], u.length && i(() => {
347
+ }, u = () => {
348
+ const o = t;
349
+ t = [], o.length && i(() => {
347
350
  r(() => {
348
- u.forEach((l) => {
351
+ o.forEach((l) => {
349
352
  s(l);
350
353
  });
351
354
  });
352
355
  });
353
356
  };
354
357
  return {
355
- batch: (u) => {
358
+ batch: (o) => {
356
359
  let l;
357
360
  e++;
358
361
  try {
359
- l = u();
362
+ l = o();
360
363
  } finally {
361
- e--, e || o();
364
+ e--, e || u();
362
365
  }
363
366
  return l;
364
367
  },
365
368
  /**
366
369
  * All calls to the wrapped function will be batched.
367
370
  */
368
- batchCalls: (u) => (...l) => {
371
+ batchCalls: (o) => (...l) => {
369
372
  a(() => {
370
- u(...l);
373
+ o(...l);
371
374
  });
372
375
  },
373
376
  schedule: a,
@@ -375,22 +378,22 @@ function Qt() {
375
378
  * Use this method to set a custom notify function.
376
379
  * This can be used to for example wrap notifications with `React.act` while running tests.
377
380
  */
378
- setNotifyFunction: (u) => {
379
- s = u;
381
+ setNotifyFunction: (o) => {
382
+ s = o;
380
383
  },
381
384
  /**
382
385
  * Use this method to set a custom function to batch notifications together into a single tick.
383
386
  * By default React Query will use the batch function provided by ReactDOM or React Native.
384
387
  */
385
- setBatchNotifyFunction: (u) => {
386
- r = u;
388
+ setBatchNotifyFunction: (o) => {
389
+ r = o;
387
390
  },
388
- setScheduler: (u) => {
389
- i = u;
391
+ setScheduler: (o) => {
392
+ i = o;
390
393
  }
391
394
  };
392
395
  }
393
- var Me = Qt(), K, rt, Ut = (rt = class {
396
+ var Me = xt(), K, nt, kt = (nt = class {
394
397
  constructor() {
395
398
  g(this, K);
396
399
  }
@@ -411,18 +414,18 @@ var Me = Qt(), K, rt, Ut = (rt = class {
411
414
  clearGcTimeout() {
412
415
  n(this, K) && (clearTimeout(n(this, K)), d(this, K, void 0));
413
416
  }
414
- }, K = new WeakMap(), rt), re, ne, D, B, I, he, G, A, U, nt, ms = (nt = class extends Ut {
417
+ }, K = new WeakMap(), nt), se, re, D, B, I, he, $, A, Q, it, Es = (it = class extends kt {
415
418
  constructor(e) {
416
419
  super();
417
420
  g(this, A);
421
+ g(this, se);
418
422
  g(this, re);
419
- g(this, ne);
420
423
  g(this, D);
421
424
  g(this, B);
422
425
  g(this, I);
423
426
  g(this, he);
424
- g(this, G);
425
- d(this, G, !1), d(this, he, e.defaultOptions), this.setOptions(e.options), this.observers = [], d(this, B, e.client), d(this, D, n(this, B).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, d(this, re, qt(this.options)), this.state = e.state ?? n(this, re), this.scheduleGc();
427
+ g(this, $);
428
+ d(this, $, !1), d(this, he, e.defaultOptions), this.setOptions(e.options), this.observers = [], d(this, B, e.client), d(this, D, n(this, B).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, d(this, se, Ut(this.options)), this.state = e.state ?? n(this, se), this.scheduleGc();
426
429
  }
427
430
  get meta() {
428
431
  return this.options.meta;
@@ -439,7 +442,7 @@ var Me = Qt(), K, rt, Ut = (rt = class {
439
442
  }
440
443
  setData(e, s) {
441
444
  const r = Ie(this.state.data, e, this.options);
442
- return w(this, A, U).call(this, {
445
+ return w(this, A, Q).call(this, {
443
446
  data: r,
444
447
  type: "success",
445
448
  dataUpdatedAt: s == null ? void 0 : s.updatedAt,
@@ -447,7 +450,7 @@ var Me = Qt(), K, rt, Ut = (rt = class {
447
450
  }), r;
448
451
  }
449
452
  setState(e, s) {
450
- w(this, A, U).call(this, { type: "setState", state: e, setStateOptions: s });
453
+ w(this, A, Q).call(this, { type: "setState", state: e, setStateOptions: s });
451
454
  }
452
455
  cancel(e) {
453
456
  var r, i;
@@ -458,11 +461,11 @@ var Me = Qt(), K, rt, Ut = (rt = class {
458
461
  super.destroy(), this.cancel({ silent: !0 });
459
462
  }
460
463
  reset() {
461
- this.destroy(), this.setState(n(this, re));
464
+ this.destroy(), this.setState(n(this, se));
462
465
  }
463
466
  isActive() {
464
467
  return this.observers.some(
465
- (e) => k(e.options.enabled, this) !== !1
468
+ (e) => x(e.options.enabled, this) !== !1
466
469
  );
467
470
  }
468
471
  isDisabled() {
@@ -474,7 +477,7 @@ var Me = Qt(), K, rt, Ut = (rt = class {
474
477
  ) : this.state.data === void 0;
475
478
  }
476
479
  isStaleByTime(e = 0) {
477
- return this.state.isInvalidated || this.state.data === void 0 || !at(this.state.dataUpdatedAt, e);
480
+ return this.state.isInvalidated || this.state.data === void 0 || !ot(this.state.dataUpdatedAt, e);
478
481
  }
479
482
  onFocus() {
480
483
  var s;
@@ -490,13 +493,13 @@ var Me = Qt(), K, rt, Ut = (rt = class {
490
493
  this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), n(this, D).notify({ type: "observerAdded", query: this, observer: e }));
491
494
  }
492
495
  removeObserver(e) {
493
- this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (n(this, I) && (n(this, G) ? n(this, I).cancel({ revert: !0 }) : n(this, I).cancelRetry()), this.scheduleGc()), n(this, D).notify({ type: "observerRemoved", query: this, observer: e }));
496
+ this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (n(this, I) && (n(this, $) ? n(this, I).cancel({ revert: !0 }) : n(this, I).cancelRetry()), this.scheduleGc()), n(this, D).notify({ type: "observerRemoved", query: this, observer: e }));
494
497
  }
495
498
  getObserversCount() {
496
499
  return this.observers.length;
497
500
  }
498
501
  invalidate() {
499
- this.state.isInvalidated || w(this, A, U).call(this, { type: "invalidate" });
502
+ this.state.isInvalidated || w(this, A, Q).call(this, { type: "invalidate" });
500
503
  }
501
504
  fetch(e, s) {
502
505
  var l, f, m;
@@ -516,20 +519,20 @@ var Me = Qt(), K, rt, Ut = (rt = class {
516
519
  const r = new AbortController(), i = (c) => {
517
520
  Object.defineProperty(c, "signal", {
518
521
  enumerable: !0,
519
- get: () => (d(this, G, !0), r.signal)
522
+ get: () => (d(this, $, !0), r.signal)
520
523
  });
521
524
  }, a = () => {
522
- const c = Dt(this.options, s), p = {
525
+ const c = Pt(this.options, s), p = {
523
526
  client: n(this, B),
524
527
  queryKey: this.queryKey,
525
528
  meta: this.meta
526
529
  };
527
- return i(p), d(this, G, !1), this.options.persister ? this.options.persister(
530
+ return i(p), d(this, $, !1), this.options.persister ? this.options.persister(
528
531
  c,
529
532
  p,
530
533
  this
531
534
  ) : c(p);
532
- }, o = {
535
+ }, u = {
533
536
  fetchOptions: s,
534
537
  options: this.options,
535
538
  queryKey: this.queryKey,
@@ -537,68 +540,68 @@ var Me = Qt(), K, rt, Ut = (rt = class {
537
540
  state: this.state,
538
541
  fetchFn: a
539
542
  };
540
- i(o), (l = this.options.behavior) == null || l.onFetch(
541
- o,
543
+ i(u), (l = this.options.behavior) == null || l.onFetch(
544
+ u,
542
545
  this
543
- ), d(this, ne, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((f = o.fetchOptions) == null ? void 0 : f.meta)) && w(this, A, U).call(this, { type: "fetch", meta: (m = o.fetchOptions) == null ? void 0 : m.meta });
544
- const u = (c) => {
545
- var p, y, E, h;
546
- ge(c) && c.silent || w(this, A, U).call(this, {
546
+ ), d(this, re, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((f = u.fetchOptions) == null ? void 0 : f.meta)) && w(this, A, Q).call(this, { type: "fetch", meta: (m = u.fetchOptions) == null ? void 0 : m.meta });
547
+ const o = (c) => {
548
+ var p, y, C, h;
549
+ ge(c) && c.silent || w(this, A, Q).call(this, {
547
550
  type: "error",
548
551
  error: c
549
552
  }), ge(c) || ((y = (p = n(this, D).config).onError) == null || y.call(
550
553
  p,
551
554
  c,
552
555
  this
553
- ), (h = (E = n(this, D).config).onSettled) == null || h.call(
554
- E,
556
+ ), (h = (C = n(this, D).config).onSettled) == null || h.call(
557
+ C,
555
558
  this.state.data,
556
559
  c,
557
560
  this
558
561
  )), this.scheduleGc();
559
562
  };
560
- return d(this, I, xt({
563
+ return d(this, I, At({
561
564
  initialPromise: s == null ? void 0 : s.initialPromise,
562
- fn: o.fetchFn,
565
+ fn: u.fetchFn,
563
566
  abort: r.abort.bind(r),
564
567
  onSuccess: (c) => {
565
- var p, y, E, h;
568
+ var p, y, C, h;
566
569
  if (c === void 0) {
567
570
  process.env.NODE_ENV !== "production" && console.error(
568
571
  `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
569
- ), u(new Error(`${this.queryHash} data is undefined`));
572
+ ), o(new Error(`${this.queryHash} data is undefined`));
570
573
  return;
571
574
  }
572
575
  try {
573
576
  this.setData(c);
574
577
  } catch (v) {
575
- u(v);
578
+ o(v);
576
579
  return;
577
580
  }
578
- (y = (p = n(this, D).config).onSuccess) == null || y.call(p, c, this), (h = (E = n(this, D).config).onSettled) == null || h.call(
579
- E,
581
+ (y = (p = n(this, D).config).onSuccess) == null || y.call(p, c, this), (h = (C = n(this, D).config).onSettled) == null || h.call(
582
+ C,
580
583
  c,
581
584
  this.state.error,
582
585
  this
583
586
  ), this.scheduleGc();
584
587
  },
585
- onError: u,
588
+ onError: o,
586
589
  onFail: (c, p) => {
587
- w(this, A, U).call(this, { type: "failed", failureCount: c, error: p });
590
+ w(this, A, Q).call(this, { type: "failed", failureCount: c, error: p });
588
591
  },
589
592
  onPause: () => {
590
- w(this, A, U).call(this, { type: "pause" });
593
+ w(this, A, Q).call(this, { type: "pause" });
591
594
  },
592
595
  onContinue: () => {
593
- w(this, A, U).call(this, { type: "continue" });
596
+ w(this, A, Q).call(this, { type: "continue" });
594
597
  },
595
- retry: o.options.retry,
596
- retryDelay: o.options.retryDelay,
597
- networkMode: o.options.networkMode,
598
+ retry: u.options.retry,
599
+ retryDelay: u.options.retryDelay,
600
+ networkMode: u.options.networkMode,
598
601
  canRun: () => !0
599
602
  })), n(this, I).start();
600
603
  }
601
- }, re = new WeakMap(), ne = new WeakMap(), D = new WeakMap(), B = new WeakMap(), I = new WeakMap(), he = new WeakMap(), G = new WeakMap(), A = new WeakSet(), U = function(e) {
604
+ }, se = new WeakMap(), re = new WeakMap(), D = new WeakMap(), B = new WeakMap(), I = new WeakMap(), he = new WeakMap(), $ = new WeakMap(), A = new WeakSet(), Q = function(e) {
602
605
  const s = (r) => {
603
606
  switch (e.type) {
604
607
  case "failed":
@@ -620,7 +623,7 @@ var Me = Qt(), K, rt, Ut = (rt = class {
620
623
  case "fetch":
621
624
  return {
622
625
  ...r,
623
- ...lt(r.data, this.options),
626
+ ...dt(r.data, this.options),
624
627
  fetchMeta: e.meta ?? null
625
628
  };
626
629
  case "success":
@@ -640,7 +643,7 @@ var Me = Qt(), K, rt, Ut = (rt = class {
640
643
  };
641
644
  case "error":
642
645
  const i = e.error;
643
- return ge(i) && i.revert && n(this, ne) ? { ...n(this, ne), fetchStatus: "idle" } : {
646
+ return ge(i) && i.revert && n(this, re) ? { ...n(this, re), fetchStatus: "idle" } : {
644
647
  ...r,
645
648
  error: i,
646
649
  errorUpdateCount: r.errorUpdateCount + 1,
@@ -667,19 +670,19 @@ var Me = Qt(), K, rt, Ut = (rt = class {
667
670
  r.onQueryUpdate();
668
671
  }), n(this, D).notify({ query: this, type: "updated", action: e });
669
672
  });
670
- }, nt);
671
- function lt(t, e) {
673
+ }, it);
674
+ function dt(t, e) {
672
675
  return {
673
676
  fetchFailureCount: 0,
674
677
  fetchFailureReason: null,
675
- fetchStatus: ct(e.networkMode) ? "fetching" : "paused",
678
+ fetchStatus: ht(e.networkMode) ? "fetching" : "paused",
676
679
  ...t === void 0 && {
677
680
  error: null,
678
681
  status: "pending"
679
682
  }
680
683
  };
681
684
  }
682
- function qt(t) {
685
+ function Ut(t) {
683
686
  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;
684
687
  return {
685
688
  data: e,
@@ -696,7 +699,7 @@ function qt(t) {
696
699
  fetchStatus: "idle"
697
700
  };
698
701
  }
699
- var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae, ke, xe, ft, it, dt = (it = class extends qe {
702
+ var T, b, le, P, G, ne, N, U, de, ie, ae, z, J, _, oe, S, ue, Pe, Te, De, je, Ae, xe, ke, yt, at, ft = (at = class extends qe {
700
703
  constructor(e, s) {
701
704
  super();
702
705
  g(this, S);
@@ -704,20 +707,20 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
704
707
  g(this, b);
705
708
  g(this, le);
706
709
  g(this, P);
707
- g(this, $);
708
- g(this, ie);
710
+ g(this, G);
711
+ g(this, ne);
709
712
  g(this, N);
710
- g(this, Q);
713
+ g(this, U);
711
714
  g(this, de);
712
- g(this, ae);
715
+ g(this, ie);
713
716
  // This property keeps track of the last query with defined data.
714
717
  // It will be used to pass the previous data and query to the placeholder function between renders.
715
- g(this, oe);
718
+ g(this, ae);
716
719
  g(this, z);
717
720
  g(this, J);
718
721
  g(this, _);
719
- g(this, ue, /* @__PURE__ */ new Set());
720
- this.options = s, d(this, T, e), d(this, Q, null), d(this, N, Fe()), this.options.experimental_prefetchInRender || n(this, N).reject(
722
+ g(this, oe, /* @__PURE__ */ new Set());
723
+ this.options = s, d(this, T, e), d(this, U, null), d(this, N, Fe()), this.options.experimental_prefetchInRender || n(this, N).reject(
721
724
  new Error("experimental_prefetchInRender feature flag is not enabled")
722
725
  ), this.bindMethods(), this.setOptions(s);
723
726
  }
@@ -725,35 +728,35 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
725
728
  this.refetch = this.refetch.bind(this);
726
729
  }
727
730
  onSubscribe() {
728
- this.listeners.size === 1 && (n(this, b).addObserver(this), Ze(n(this, b), this.options) ? w(this, S, ce).call(this) : this.updateResult(), w(this, S, je).call(this));
731
+ this.listeners.size === 1 && (n(this, b).addObserver(this), Ze(n(this, b), this.options) ? w(this, S, ue).call(this) : this.updateResult(), w(this, S, je).call(this));
729
732
  }
730
733
  onUnsubscribe() {
731
734
  this.hasListeners() || this.destroy();
732
735
  }
733
736
  shouldFetchOnReconnect() {
734
- return Qe(
737
+ return Ue(
735
738
  n(this, b),
736
739
  this.options,
737
740
  this.options.refetchOnReconnect
738
741
  );
739
742
  }
740
743
  shouldFetchOnWindowFocus() {
741
- return Qe(
744
+ return Ue(
742
745
  n(this, b),
743
746
  this.options,
744
747
  this.options.refetchOnWindowFocus
745
748
  );
746
749
  }
747
750
  destroy() {
748
- this.listeners = /* @__PURE__ */ new Set(), w(this, S, Ae).call(this), w(this, S, ke).call(this), n(this, b).removeObserver(this);
751
+ this.listeners = /* @__PURE__ */ new Set(), w(this, S, Ae).call(this), w(this, S, xe).call(this), n(this, b).removeObserver(this);
749
752
  }
750
753
  setOptions(e, s) {
751
754
  const r = this.options, i = n(this, b);
752
- if (this.options = n(this, T).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof k(this.options.enabled, n(this, b)) != "boolean")
755
+ if (this.options = n(this, T).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof x(this.options.enabled, n(this, b)) != "boolean")
753
756
  throw new Error(
754
757
  "Expected enabled to be a boolean or a callback that returns a boolean"
755
758
  );
756
- w(this, S, xe).call(this), n(this, b).setOptions(this.options), r._defaulted && !Ee(this.options, r) && n(this, T).getQueryCache().notify({
759
+ w(this, S, ke).call(this), n(this, b).setOptions(this.options), r._defaulted && !Ce(this.options, r) && n(this, T).getQueryCache().notify({
757
760
  type: "observerOptionsUpdated",
758
761
  query: n(this, b),
759
762
  observer: this
@@ -764,13 +767,13 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
764
767
  i,
765
768
  this.options,
766
769
  r
767
- ) && w(this, S, ce).call(this), this.updateResult(s), a && (n(this, b) !== i || k(this.options.enabled, n(this, b)) !== k(r.enabled, n(this, b)) || ye(this.options.staleTime, n(this, b)) !== ye(r.staleTime, n(this, b))) && w(this, S, Pe).call(this);
768
- const o = w(this, S, Te).call(this);
769
- a && (n(this, b) !== i || k(this.options.enabled, n(this, b)) !== k(r.enabled, n(this, b)) || o !== n(this, _)) && w(this, S, De).call(this, o);
770
+ ) && w(this, S, ue).call(this), this.updateResult(s), a && (n(this, b) !== i || x(this.options.enabled, n(this, b)) !== x(r.enabled, n(this, b)) || ye(this.options.staleTime, n(this, b)) !== ye(r.staleTime, n(this, b))) && w(this, S, Pe).call(this);
771
+ const u = w(this, S, Te).call(this);
772
+ a && (n(this, b) !== i || x(this.options.enabled, n(this, b)) !== x(r.enabled, n(this, b)) || u !== n(this, _)) && w(this, S, De).call(this, u);
770
773
  }
771
774
  getOptimisticResult(e) {
772
775
  const s = n(this, T).getQueryCache().build(n(this, T), e), r = this.createResult(s, e);
773
- return Mt(this, r) && (d(this, P, r), d(this, ie, this.options), d(this, $, n(this, b).state)), r;
776
+ return qt(this, r) && (d(this, P, r), d(this, ne, this.options), d(this, G, n(this, b).state)), r;
774
777
  }
775
778
  getCurrentResult() {
776
779
  return n(this, P);
@@ -786,7 +789,7 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
786
789
  }), r;
787
790
  }
788
791
  trackProp(e) {
789
- n(this, ue).add(e);
792
+ n(this, oe).add(e);
790
793
  }
791
794
  getCurrentQuery() {
792
795
  return n(this, b);
@@ -801,46 +804,46 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
801
804
  return r.fetch().then(() => this.createResult(r, s));
802
805
  }
803
806
  fetch(e) {
804
- return w(this, S, ce).call(this, {
807
+ return w(this, S, ue).call(this, {
805
808
  ...e,
806
809
  cancelRefetch: e.cancelRefetch ?? !0
807
810
  }).then(() => (this.updateResult(), n(this, P)));
808
811
  }
809
812
  createResult(e, s) {
810
813
  var Be;
811
- const r = n(this, b), i = this.options, a = n(this, P), o = n(this, $), u = n(this, ie), f = e !== r ? e.state : n(this, le), { state: m } = e;
814
+ const r = n(this, b), i = this.options, a = n(this, P), u = n(this, G), o = n(this, ne), f = e !== r ? e.state : n(this, le), { state: m } = e;
812
815
  let c = { ...m }, p = !1, y;
813
816
  if (s._optimisticResults) {
814
- const F = this.hasListeners(), Y = !F && Ze(e, s), X = F && We(e, r, s, i);
815
- (Y || X) && (c = {
817
+ const F = this.hasListeners(), W = !F && Ze(e, s), Y = F && We(e, r, s, i);
818
+ (W || Y) && (c = {
816
819
  ...c,
817
- ...lt(m.data, e.options)
820
+ ...dt(m.data, e.options)
818
821
  }), s._optimisticResults === "isRestoring" && (c.fetchStatus = "idle");
819
822
  }
820
- let { error: E, errorUpdatedAt: h, status: v } = c;
823
+ let { error: C, errorUpdatedAt: h, status: v } = c;
821
824
  if (s.select && c.data !== void 0)
822
- if (a && c.data === (o == null ? void 0 : o.data) && s.select === n(this, de))
823
- y = n(this, ae);
825
+ if (a && c.data === (u == null ? void 0 : u.data) && s.select === n(this, de))
826
+ y = n(this, ie);
824
827
  else
825
828
  try {
826
- d(this, de, s.select), y = s.select(c.data), y = Ie(a == null ? void 0 : a.data, y, s), d(this, ae, y), d(this, Q, null);
829
+ d(this, de, s.select), y = s.select(c.data), y = Ie(a == null ? void 0 : a.data, y, s), d(this, ie, y), d(this, U, null);
827
830
  } catch (F) {
828
- d(this, Q, F);
831
+ d(this, U, F);
829
832
  }
830
833
  else
831
834
  y = c.data;
832
835
  if (s.placeholderData !== void 0 && y === void 0 && v === "pending") {
833
836
  let F;
834
- if (a != null && a.isPlaceholderData && s.placeholderData === (u == null ? void 0 : u.placeholderData))
837
+ if (a != null && a.isPlaceholderData && s.placeholderData === (o == null ? void 0 : o.placeholderData))
835
838
  F = a.data;
836
839
  else if (F = typeof s.placeholderData == "function" ? s.placeholderData(
837
- (Be = n(this, oe)) == null ? void 0 : Be.state.data,
838
- n(this, oe)
840
+ (Be = n(this, ae)) == null ? void 0 : Be.state.data,
841
+ n(this, ae)
839
842
  ) : s.placeholderData, s.select && F !== void 0)
840
843
  try {
841
- F = s.select(F), d(this, Q, null);
842
- } catch (Y) {
843
- d(this, Q, Y);
844
+ F = s.select(F), d(this, U, null);
845
+ } catch (W) {
846
+ d(this, U, W);
844
847
  }
845
848
  F !== void 0 && (v = "success", y = Ie(
846
849
  a == null ? void 0 : a.data,
@@ -848,8 +851,8 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
848
851
  s
849
852
  ), p = !0);
850
853
  }
851
- n(this, Q) && (E = n(this, Q), y = n(this, ae), h = Date.now(), v = "error");
852
- const C = c.fetchStatus === "fetching", R = v === "pending", O = v === "error", q = R && C, W = y !== void 0, x = {
854
+ n(this, U) && (C = n(this, U), y = n(this, ie), h = Date.now(), v = "error");
855
+ const E = c.fetchStatus === "fetching", R = v === "pending", O = v === "error", q = R && E, Z = y !== void 0, k = {
853
856
  status: v,
854
857
  fetchStatus: c.fetchStatus,
855
858
  isPending: R,
@@ -859,70 +862,70 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
859
862
  isLoading: q,
860
863
  data: y,
861
864
  dataUpdatedAt: c.dataUpdatedAt,
862
- error: E,
865
+ error: C,
863
866
  errorUpdatedAt: h,
864
867
  failureCount: c.fetchFailureCount,
865
868
  failureReason: c.fetchFailureReason,
866
869
  errorUpdateCount: c.errorUpdateCount,
867
870
  isFetched: c.dataUpdateCount > 0 || c.errorUpdateCount > 0,
868
871
  isFetchedAfterMount: c.dataUpdateCount > f.dataUpdateCount || c.errorUpdateCount > f.errorUpdateCount,
869
- isFetching: C,
870
- isRefetching: C && !R,
871
- isLoadingError: O && !W,
872
+ isFetching: E,
873
+ isRefetching: E && !R,
874
+ isLoadingError: O && !Z,
872
875
  isPaused: c.fetchStatus === "paused",
873
876
  isPlaceholderData: p,
874
- isRefetchError: O && W,
877
+ isRefetchError: O && Z,
875
878
  isStale: Ne(e, s),
876
879
  refetch: this.refetch,
877
880
  promise: n(this, N)
878
881
  };
879
882
  if (this.options.experimental_prefetchInRender) {
880
883
  const F = (fe) => {
881
- x.status === "error" ? fe.reject(x.error) : x.data !== void 0 && fe.resolve(x.data);
882
- }, Y = () => {
883
- const fe = d(this, N, x.promise = Fe());
884
+ k.status === "error" ? fe.reject(k.error) : k.data !== void 0 && fe.resolve(k.data);
885
+ }, W = () => {
886
+ const fe = d(this, N, k.promise = Fe());
884
887
  F(fe);
885
- }, X = n(this, N);
886
- switch (X.status) {
888
+ }, Y = n(this, N);
889
+ switch (Y.status) {
887
890
  case "pending":
888
- e.queryHash === r.queryHash && F(X);
891
+ e.queryHash === r.queryHash && F(Y);
889
892
  break;
890
893
  case "fulfilled":
891
- (x.status === "error" || x.data !== X.value) && Y();
894
+ (k.status === "error" || k.data !== Y.value) && W();
892
895
  break;
893
896
  case "rejected":
894
- (x.status !== "error" || x.error !== X.reason) && Y();
897
+ (k.status !== "error" || k.error !== Y.reason) && W();
895
898
  break;
896
899
  }
897
900
  }
898
- return x;
901
+ return k;
899
902
  }
900
903
  updateResult(e) {
901
904
  const s = n(this, P), r = this.createResult(n(this, b), this.options);
902
- if (d(this, $, n(this, b).state), d(this, ie, this.options), n(this, $).data !== void 0 && d(this, oe, n(this, b)), Ee(r, s))
905
+ if (d(this, G, n(this, b).state), d(this, ne, this.options), n(this, G).data !== void 0 && d(this, ae, n(this, b)), Ce(r, s))
903
906
  return;
904
907
  d(this, P, r);
905
908
  const i = {}, a = () => {
906
909
  if (!s)
907
910
  return !0;
908
- const { notifyOnChangeProps: o } = this.options, u = typeof o == "function" ? o() : o;
909
- if (u === "all" || !u && !n(this, ue).size)
911
+ const { notifyOnChangeProps: u } = this.options, o = typeof u == "function" ? u() : u;
912
+ if (o === "all" || !o && !n(this, oe).size)
910
913
  return !0;
911
914
  const l = new Set(
912
- u ?? n(this, ue)
915
+ o ?? n(this, oe)
913
916
  );
914
917
  return this.options.throwOnError && l.add("error"), Object.keys(n(this, P)).some((f) => {
915
918
  const m = f;
916
919
  return n(this, P)[m] !== s[m] && l.has(m);
917
920
  });
918
921
  };
919
- (e == null ? void 0 : e.listeners) !== !1 && a() && (i.listeners = !0), w(this, S, ft).call(this, { ...i, ...e });
922
+ (e == null ? void 0 : e.listeners) !== !1 && a() && (i.listeners = !0), w(this, S, yt).call(this, { ...i, ...e });
920
923
  }
921
924
  onQueryUpdate() {
922
925
  this.updateResult(), this.hasListeners() && w(this, S, je).call(this);
923
926
  }
924
- }, T = new WeakMap(), b = new WeakMap(), le = new WeakMap(), P = new WeakMap(), $ = new WeakMap(), ie = new WeakMap(), N = new WeakMap(), Q = new WeakMap(), de = new WeakMap(), ae = new WeakMap(), oe = new WeakMap(), z = new WeakMap(), J = new WeakMap(), _ = new WeakMap(), ue = new WeakMap(), S = new WeakSet(), ce = function(e) {
925
- w(this, S, xe).call(this);
927
+ }, T = new WeakMap(), b = new WeakMap(), le = new WeakMap(), P = new WeakMap(), G = new WeakMap(), ne = new WeakMap(), N = new WeakMap(), U = new WeakMap(), de = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), z = new WeakMap(), J = new WeakMap(), _ = new WeakMap(), oe = new WeakMap(), S = new WeakSet(), ue = function(e) {
928
+ w(this, S, ke).call(this);
926
929
  let s = n(this, b).fetch(
927
930
  this.options,
928
931
  e
@@ -936,29 +939,29 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
936
939
  );
937
940
  if (V || n(this, P).isStale || !we(e))
938
941
  return;
939
- const r = at(n(this, P).dataUpdatedAt, e) + 1;
942
+ const r = ot(n(this, P).dataUpdatedAt, e) + 1;
940
943
  d(this, z, setTimeout(() => {
941
944
  n(this, P).isStale || this.updateResult();
942
945
  }, r));
943
946
  }, Te = function() {
944
947
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, b)) : this.options.refetchInterval) ?? !1;
945
948
  }, De = function(e) {
946
- w(this, S, ke).call(this), d(this, _, e), !(V || k(this.options.enabled, n(this, b)) === !1 || !we(n(this, _)) || n(this, _) === 0) && d(this, J, setInterval(() => {
947
- (this.options.refetchIntervalInBackground || ot.isFocused()) && w(this, S, ce).call(this);
949
+ w(this, S, xe).call(this), d(this, _, e), !(V || x(this.options.enabled, n(this, b)) === !1 || !we(n(this, _)) || n(this, _) === 0) && d(this, J, setInterval(() => {
950
+ (this.options.refetchIntervalInBackground || ut.isFocused()) && w(this, S, ue).call(this);
948
951
  }, n(this, _)));
949
952
  }, je = function() {
950
953
  w(this, S, Pe).call(this), w(this, S, De).call(this, w(this, S, Te).call(this));
951
954
  }, Ae = function() {
952
955
  n(this, z) && (clearTimeout(n(this, z)), d(this, z, void 0));
953
- }, ke = function() {
954
- n(this, J) && (clearInterval(n(this, J)), d(this, J, void 0));
955
956
  }, xe = function() {
957
+ n(this, J) && (clearInterval(n(this, J)), d(this, J, void 0));
958
+ }, ke = function() {
956
959
  const e = n(this, T).getQueryCache().build(n(this, T), this.options);
957
960
  if (e === n(this, b))
958
961
  return;
959
962
  const s = n(this, b);
960
963
  d(this, b, e), d(this, le, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
961
- }, ft = function(e) {
964
+ }, yt = function(e) {
962
965
  Me.batch(() => {
963
966
  e.listeners && this.listeners.forEach((s) => {
964
967
  s(n(this, P));
@@ -967,46 +970,46 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
967
970
  type: "observerResultsUpdated"
968
971
  });
969
972
  });
970
- }, it);
971
- function Lt(t, e) {
972
- return k(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
973
+ }, at);
974
+ function Qt(t, e) {
975
+ return x(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
973
976
  }
974
977
  function Ze(t, e) {
975
- return Lt(t, e) || t.state.data !== void 0 && Qe(t, e, e.refetchOnMount);
978
+ return Qt(t, e) || t.state.data !== void 0 && Ue(t, e, e.refetchOnMount);
976
979
  }
977
- function Qe(t, e, s) {
978
- if (k(e.enabled, t) !== !1) {
980
+ function Ue(t, e, s) {
981
+ if (x(e.enabled, t) !== !1) {
979
982
  const r = typeof s == "function" ? s(t) : s;
980
983
  return r === "always" || r !== !1 && Ne(t, e);
981
984
  }
982
985
  return !1;
983
986
  }
984
987
  function We(t, e, s, r) {
985
- return (t !== e || k(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Ne(t, s);
988
+ return (t !== e || x(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Ne(t, s);
986
989
  }
987
990
  function Ne(t, e) {
988
- return k(e.enabled, t) !== !1 && t.isStaleByTime(ye(e.staleTime, t));
991
+ return x(e.enabled, t) !== !1 && t.isStaleByTime(ye(e.staleTime, t));
989
992
  }
990
- function Mt(t, e) {
991
- return !Ee(t.getCurrentResult(), e);
993
+ function qt(t, e) {
994
+ return !Ce(t.getCurrentResult(), e);
992
995
  }
993
- var yt = j.createContext(
996
+ var pt = j.createContext(
994
997
  void 0
995
- ), pt = (t) => {
996
- const e = j.useContext(yt);
998
+ ), vt = (t) => {
999
+ const e = j.useContext(pt);
997
1000
  if (t)
998
1001
  return t;
999
1002
  if (!e)
1000
1003
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
1001
1004
  return e;
1002
- }, gs = ({
1005
+ }, Cs = ({
1003
1006
  client: t,
1004
1007
  children: e
1005
1008
  }) => (j.useEffect(() => (t.mount(), () => {
1006
1009
  t.unmount();
1007
- }), [t]), /* @__PURE__ */ Ft.jsx(yt.Provider, { value: t, children: e })), vt = j.createContext(!1), Nt = () => j.useContext(vt);
1008
- vt.Provider;
1009
- function _t() {
1010
+ }), [t]), /* @__PURE__ */ Ot.jsx(pt.Provider, { value: t, children: e })), bt = j.createContext(!1), Lt = () => j.useContext(bt);
1011
+ bt.Provider;
1012
+ function Mt() {
1010
1013
  let t = !1;
1011
1014
  return {
1012
1015
  clearReset: () => {
@@ -1018,115 +1021,130 @@ function _t() {
1018
1021
  isReset: () => t
1019
1022
  };
1020
1023
  }
1021
- var Ht = j.createContext(_t()), Kt = () => j.useContext(Ht);
1022
- function Bt(t, e) {
1024
+ var Nt = j.createContext(Mt()), _t = () => j.useContext(Nt);
1025
+ function Ht(t, e) {
1023
1026
  return typeof t == "function" ? t(...e) : !!t;
1024
1027
  }
1025
1028
  function Ye() {
1026
1029
  }
1027
- var Gt = (t, e) => {
1030
+ var Kt = (t, e) => {
1028
1031
  (t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
1029
- }, $t = (t) => {
1032
+ }, Bt = (t) => {
1030
1033
  j.useEffect(() => {
1031
1034
  t.clearReset();
1032
1035
  }, [t]);
1033
- }, zt = ({
1036
+ }, $t = ({
1034
1037
  result: t,
1035
1038
  errorResetBoundary: e,
1036
1039
  throwOnError: s,
1037
1040
  query: r,
1038
1041
  suspense: i
1039
- }) => t.isError && !e.isReset() && !t.isFetching && r && (i && t.data === void 0 || Bt(s, [t.error, r])), Jt = (t, e) => e.state.data === void 0, Vt = (t) => {
1042
+ }) => t.isError && !e.isReset() && !t.isFetching && r && (i && t.data === void 0 || Ht(s, [t.error, r])), Gt = (t, e) => e.state.data === void 0, zt = (t) => {
1040
1043
  const e = t.staleTime;
1041
1044
  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)));
1042
- }, Zt = (t, e) => t.isLoading && t.isFetching && !e, Wt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, Xe = (t, e, s) => e.fetchOptimistic(t).catch(() => {
1045
+ }, Jt = (t, e) => t.isLoading && t.isFetching && !e, Vt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, Xe = (t, e, s) => e.fetchOptimistic(t).catch(() => {
1043
1046
  s.clearReset();
1044
1047
  });
1045
- function bt(t, e, s) {
1046
- var c, p, y, E, h;
1048
+ function mt(t, e, s) {
1049
+ var c, p, y, C, h;
1047
1050
  if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
1048
1051
  throw new Error(
1049
1052
  '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'
1050
1053
  );
1051
- const r = pt(s), i = Nt(), a = Kt(), o = r.defaultQueryOptions(t);
1054
+ const r = vt(s), i = Lt(), a = _t(), u = r.defaultQueryOptions(t);
1052
1055
  (p = (c = r.getDefaultOptions().queries) == null ? void 0 : c._experimental_beforeQuery) == null || p.call(
1053
1056
  c,
1054
- o
1055
- ), o._optimisticResults = i ? "isRestoring" : "optimistic", Vt(o), Gt(o, a), $t(a);
1056
- const u = !r.getQueryCache().get(o.queryHash), [l] = j.useState(
1057
+ u
1058
+ ), u._optimisticResults = i ? "isRestoring" : "optimistic", zt(u), Kt(u, a), Bt(a);
1059
+ const o = !r.getQueryCache().get(u.queryHash), [l] = j.useState(
1057
1060
  () => new e(
1058
1061
  r,
1059
- o
1062
+ u
1060
1063
  )
1061
- ), f = l.getOptimisticResult(o), m = !i && t.subscribed !== !1;
1064
+ ), f = l.getOptimisticResult(u), m = !i && t.subscribed !== !1;
1062
1065
  if (j.useSyncExternalStore(
1063
1066
  j.useCallback(
1064
1067
  (v) => {
1065
- const C = m ? l.subscribe(Me.batchCalls(v)) : Ye;
1066
- return l.updateResult(), C;
1068
+ const E = m ? l.subscribe(Me.batchCalls(v)) : Ye;
1069
+ return l.updateResult(), E;
1067
1070
  },
1068
1071
  [l, m]
1069
1072
  ),
1070
1073
  () => l.getCurrentResult(),
1071
1074
  () => l.getCurrentResult()
1072
1075
  ), j.useEffect(() => {
1073
- l.setOptions(o, { listeners: !1 });
1074
- }, [o, l]), Wt(o, f))
1075
- throw Xe(o, l, a);
1076
- if (zt({
1076
+ l.setOptions(u, { listeners: !1 });
1077
+ }, [u, l]), Vt(u, f))
1078
+ throw Xe(u, l, a);
1079
+ if ($t({
1077
1080
  result: f,
1078
1081
  errorResetBoundary: a,
1079
- throwOnError: o.throwOnError,
1080
- query: r.getQueryCache().get(o.queryHash),
1081
- suspense: o.suspense
1082
+ throwOnError: u.throwOnError,
1083
+ query: r.getQueryCache().get(u.queryHash),
1084
+ suspense: u.suspense
1082
1085
  }))
1083
1086
  throw f.error;
1084
- if ((E = (y = r.getDefaultOptions().queries) == null ? void 0 : y._experimental_afterQuery) == null || E.call(
1087
+ if ((C = (y = r.getDefaultOptions().queries) == null ? void 0 : y._experimental_afterQuery) == null || C.call(
1085
1088
  y,
1086
- o,
1089
+ u,
1087
1090
  f
1088
- ), o.experimental_prefetchInRender && !V && Zt(f, i)) {
1089
- const v = u ? (
1091
+ ), u.experimental_prefetchInRender && !V && Jt(f, i)) {
1092
+ const v = o ? (
1090
1093
  // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
1091
- Xe(o, l, a)
1094
+ Xe(u, l, a)
1092
1095
  ) : (
1093
1096
  // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
1094
- (h = r.getQueryCache().get(o.queryHash)) == null ? void 0 : h.promise
1097
+ (h = r.getQueryCache().get(u.queryHash)) == null ? void 0 : h.promise
1095
1098
  );
1096
1099
  v == null || v.catch(Ye).finally(() => {
1097
1100
  l.updateResult();
1098
1101
  });
1099
1102
  }
1100
- return o.notifyOnChangeProps ? f : l.trackResult(f);
1103
+ return u.notifyOnChangeProps ? f : l.trackResult(f);
1101
1104
  }
1102
- function Yt(t, e) {
1103
- return bt(t, dt, e);
1105
+ function Zt(t, e) {
1106
+ return mt(t, ft, e);
1104
1107
  }
1105
- function Xt(t, e) {
1106
- return process.env.NODE_ENV !== "production" && t.queryFn === pe && console.error("skipToken is not allowed for useSuspenseQuery"), bt(
1108
+ function Wt(t, e) {
1109
+ return process.env.NODE_ENV !== "production" && t.queryFn === pe && console.error("skipToken is not allowed for useSuspenseQuery"), mt(
1107
1110
  {
1108
1111
  ...t,
1109
1112
  enabled: !0,
1110
1113
  suspense: !0,
1111
- throwOnError: Jt,
1114
+ throwOnError: Gt,
1112
1115
  placeholderData: void 0
1113
1116
  },
1114
- dt,
1117
+ ft,
1115
1118
  e
1116
1119
  );
1117
1120
  }
1118
- const Z = (...t) => {
1119
- const e = t.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
1120
- return e ? `/${e}` : "/";
1121
- }, mt = Object.freeze({
1121
+ const Yt = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, Xt = (t) => t.filter(
1122
+ (e) => e != null && e !== !1 && (typeof e == "string" || typeof e == "number")
1123
+ ).map((e) => `${e}`).filter((e) => e), es = (t) => {
1124
+ const e = t.join("/"), [, s = "", r = ""] = e.match(Yt) ?? [];
1125
+ return {
1126
+ prefix: s,
1127
+ pathname: r.split("/").filter((i) => i !== "")
1128
+ };
1129
+ }, ts = (t) => {
1130
+ const { prefix: e, pathname: s } = t;
1131
+ let r = e;
1132
+ return s.length > 0 ? (r ? r += "/" : r = "/", r += s.join("/")) : r || (r = "/"), r;
1133
+ }, et = (...t) => {
1134
+ const e = Xt(t), s = es(e);
1135
+ return ts(s);
1136
+ }, gt = Object.freeze({
1122
1137
  API_IDENTITIES: ["api-identities"]
1123
- }), Ss = () => {
1124
- const t = pt();
1138
+ }), Os = () => {
1139
+ const t = vt();
1125
1140
  return {
1126
1141
  invalidateCache: async (e) => {
1127
- await t.invalidateQueries({ queryKey: mt[e] });
1142
+ await t.invalidateQueries({ queryKey: gt[e] });
1128
1143
  }
1129
1144
  };
1145
+ }, ss = "no-dehydrate", ce = (...t) => {
1146
+ const e = t.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
1147
+ return e ? `/${e}` : "/";
1130
1148
  }, _e = (t, e) => {
1131
1149
  for (const s of t) {
1132
1150
  const r = He(s, e);
@@ -1143,58 +1161,63 @@ const Z = (...t) => {
1143
1161
  ]);
1144
1162
  if (a !== void 0) return a;
1145
1163
  }
1146
- }, ws = () => {
1147
- const t = ve(), s = gt().sidebar;
1164
+ }, Is = () => {
1165
+ const t = ve(), s = St().sidebar;
1148
1166
  return _e(s, (r) => {
1149
- if (r.type === "doc" && Z(r.id) === t.pathname)
1167
+ if (r.type === "doc" && ce(r.id) === t.pathname)
1150
1168
  return r;
1151
1169
  });
1152
- }, Rs = (t) => {
1170
+ }, Fs = (t) => {
1153
1171
  const e = ve();
1154
1172
  return He(t, (s) => {
1155
- if (s.type === "category" && s.link && Z(s.link.id) === e.pathname || s.type === "doc" && Z(s.id) === e.pathname)
1173
+ if (s.type === "category" && s.link && ce(s.link.id) === e.pathname || s.type === "doc" && ce(s.id) === e.pathname)
1156
1174
  return !0;
1157
1175
  });
1158
- }, Cs = () => {
1159
- const t = ve().pathname, s = gt().sidebar;
1176
+ }, Ps = () => {
1177
+ const t = ve().pathname, s = St().sidebar;
1160
1178
  let r, i, a = !1;
1161
- return _e(s, (o) => {
1162
- const u = o.type === "doc" ? Z(o.id) : o.type === "category" && o.link ? Z(o.link.id) : void 0;
1163
- if (u) {
1179
+ return _e(s, (u) => {
1180
+ const o = u.type === "doc" ? ce(u.id) : u.type === "category" && u.link ? ce(u.link.id) : void 0;
1181
+ if (o) {
1164
1182
  if (a)
1165
- return i = { label: o.label, id: u }, !0;
1166
- t === u ? a = !0 : r = { label: o.label, id: u };
1183
+ return i = { label: u.label, id: o }, !0;
1184
+ t === o ? a = !0 : r = { label: u.label, id: o };
1167
1185
  }
1168
1186
  }), { prev: r, next: i };
1169
- }, es = Et(
1187
+ }, rs = Et(
1170
1188
  void 0
1171
1189
  ), Ke = () => {
1172
- const t = Ot(es);
1190
+ const t = Ct(rs);
1173
1191
  if (!t)
1174
1192
  throw new Error("useZudoku must be used within a ZudokuProvider.");
1175
1193
  return t;
1176
- }, Es = () => {
1194
+ }, Ts = () => {
1177
1195
  const { getApiIdentities: t } = Ke();
1178
- return Yt({
1196
+ return Zt({
1179
1197
  queryFn: t,
1180
- queryKey: [mt.API_IDENTITIES]
1198
+ queryKey: gt.API_IDENTITIES
1181
1199
  });
1182
- }, gt = () => {
1200
+ }, St = () => {
1183
1201
  var c;
1184
- const { getPluginSidebar: t, sidebars: e, topNavigation: s, options: r } = Ke(), i = ve(), a = us(), o = (c = r.protectedRoutes) == null ? void 0 : c.some(
1202
+ const { getPluginSidebar: t, sidebars: e, topNavigation: s, options: r } = Ke(), i = ve(), a = ds(), u = (c = r.protectedRoutes) == null ? void 0 : c.some(
1185
1203
  (p) => ze(p, i.pathname)
1186
- ), u = Object.entries(e).find(([, p]) => _e(p, (y) => {
1187
- if ((y.type === "doc" ? Z(y.id) : y.type === "category" && y.link ? Z(y.link.id) : void 0) === i.pathname)
1204
+ );
1205
+ let o = Object.entries(e).find(([, p]) => _e(p, (y) => {
1206
+ if ((y.type === "doc" ? et(y.id) : y.type === "category" && y.link ? et(y.link.id) : void 0) === i.pathname)
1188
1207
  return y;
1189
- })), l = s.find((p) => p.id === (u == null ? void 0 : u[0])) ?? s.find((p) => ze(p.id, i.pathname)), { data: f } = Xt({
1208
+ }));
1209
+ const l = s.find((p) => p.id === (o == null ? void 0 : o[0])) ?? s.find((p) => ze(p.id, i.pathname));
1210
+ l && !o && l.id in e && (o = ["", e[l.id]]);
1211
+ const { data: f } = Wt({
1190
1212
  queryFn: () => t(i.pathname),
1191
- queryKey: ["plugin-sidebar", i.pathname]
1213
+ // We just want to suspend here and don't store in SSR dehydrated state
1214
+ queryKey: ["plugin-sidebar", ss, i.pathname]
1192
1215
  });
1193
1216
  return {
1194
- sidebar: a.isAuthEnabled && !a.isAuthenticated && o ? [] : [...u ? u[1] : [], ...f],
1217
+ sidebar: a.isAuthEnabled && !a.isAuthenticated && u ? [] : [...o ? o[1] : [], ...f],
1195
1218
  topNavItem: l
1196
1219
  };
1197
- }, et = (t) => {
1220
+ }, tt = (t) => {
1198
1221
  let e;
1199
1222
  const s = /* @__PURE__ */ new Set(), r = (f, m) => {
1200
1223
  const c = typeof f == "function" ? f(e) : f;
@@ -1202,21 +1225,21 @@ const Z = (...t) => {
1202
1225
  const p = e;
1203
1226
  e = m ?? (typeof c != "object" || c === null) ? c : Object.assign({}, e, c), s.forEach((y) => y(e, p));
1204
1227
  }
1205
- }, i = () => e, u = { setState: r, getState: i, getInitialState: () => l, subscribe: (f) => (s.add(f), () => s.delete(f)) }, l = e = t(r, i, u);
1206
- return u;
1207
- }, ts = (t) => t ? et(t) : et, ss = (t) => t;
1208
- function rs(t, e = ss) {
1209
- const s = $e.useSyncExternalStore(
1228
+ }, i = () => e, o = { setState: r, getState: i, getInitialState: () => l, subscribe: (f) => (s.add(f), () => s.delete(f)) }, l = e = t(r, i, o);
1229
+ return o;
1230
+ }, ns = (t) => t ? tt(t) : tt, is = (t) => t;
1231
+ function as(t, e = is) {
1232
+ const s = Ge.useSyncExternalStore(
1210
1233
  t.subscribe,
1211
1234
  () => e(t.getState()),
1212
1235
  () => e(t.getInitialState())
1213
1236
  );
1214
- return $e.useDebugValue(s), s;
1237
+ return Ge.useDebugValue(s), s;
1215
1238
  }
1216
- const ns = (t) => {
1217
- const e = ts(t), s = (r) => rs(e, r);
1239
+ const os = (t) => {
1240
+ const e = ns(t), s = (r) => as(e, r);
1218
1241
  return Object.assign(s, e), s;
1219
- }, St = (t) => ns;
1242
+ }, us = (t) => os;
1220
1243
  function wt(t, e) {
1221
1244
  let s;
1222
1245
  try {
@@ -1227,8 +1250,8 @@ function wt(t, e) {
1227
1250
  return {
1228
1251
  getItem: (i) => {
1229
1252
  var a;
1230
- const o = (l) => l === null ? null : JSON.parse(l, void 0), u = (a = s.getItem(i)) != null ? a : null;
1231
- return u instanceof Promise ? u.then(o) : o(u);
1253
+ const u = (l) => l === null ? null : JSON.parse(l, void 0), o = (a = s.getItem(i)) != null ? a : null;
1254
+ return o instanceof Promise ? o.then(u) : u(o);
1232
1255
  },
1233
1256
  setItem: (i, a) => s.setItem(
1234
1257
  i,
@@ -1237,12 +1260,12 @@ function wt(t, e) {
1237
1260
  removeItem: (i) => s.removeItem(i)
1238
1261
  };
1239
1262
  }
1240
- const Ue = (t) => (e) => {
1263
+ const Qe = (t) => (e) => {
1241
1264
  try {
1242
1265
  const s = t(e);
1243
1266
  return s instanceof Promise ? s : {
1244
1267
  then(r) {
1245
- return Ue(r)(s);
1268
+ return Qe(r)(s);
1246
1269
  },
1247
1270
  catch(r) {
1248
1271
  return this;
@@ -1254,11 +1277,11 @@ const Ue = (t) => (e) => {
1254
1277
  return this;
1255
1278
  },
1256
1279
  catch(r) {
1257
- return Ue(r)(s);
1280
+ return Qe(r)(s);
1258
1281
  }
1259
1282
  };
1260
1283
  }
1261
- }, is = (t, e) => (s, r, i) => {
1284
+ }, cs = (t, e) => (s, r, i) => {
1262
1285
  let a = {
1263
1286
  storage: wt(() => localStorage),
1264
1287
  partialize: (h) => h,
@@ -1268,8 +1291,8 @@ const Ue = (t) => (e) => {
1268
1291
  ...h
1269
1292
  }),
1270
1293
  ...e
1271
- }, o = !1;
1272
- const u = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
1294
+ }, u = !1;
1295
+ const o = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
1273
1296
  let f = a.storage;
1274
1297
  if (!f)
1275
1298
  return t(
@@ -1300,15 +1323,15 @@ const Ue = (t) => (e) => {
1300
1323
  );
1301
1324
  i.getInitialState = () => p;
1302
1325
  let y;
1303
- const E = () => {
1326
+ const C = () => {
1304
1327
  var h, v;
1305
1328
  if (!f) return;
1306
- o = !1, u.forEach((R) => {
1329
+ u = !1, o.forEach((R) => {
1307
1330
  var O;
1308
1331
  return R((O = r()) != null ? O : p);
1309
1332
  });
1310
- const C = ((v = a.onRehydrateStorage) == null ? void 0 : v.call(a, (h = r()) != null ? h : p)) || void 0;
1311
- return Ue(f.getItem.bind(f))(a.name).then((R) => {
1333
+ const E = ((v = a.onRehydrateStorage) == null ? void 0 : v.call(a, (h = r()) != null ? h : p)) || void 0;
1334
+ return Qe(f.getItem.bind(f))(a.name).then((R) => {
1312
1335
  if (R)
1313
1336
  if (typeof R.version == "number" && R.version !== a.version) {
1314
1337
  if (a.migrate) {
@@ -1326,16 +1349,16 @@ const Ue = (t) => (e) => {
1326
1349
  return [!1, void 0];
1327
1350
  }).then((R) => {
1328
1351
  var O;
1329
- const [q, W] = R;
1352
+ const [q, Z] = R;
1330
1353
  if (y = a.merge(
1331
- W,
1354
+ Z,
1332
1355
  (O = r()) != null ? O : p
1333
1356
  ), s(y, !0), q)
1334
1357
  return m();
1335
1358
  }).then(() => {
1336
- C == null || C(y, void 0), y = r(), o = !0, l.forEach((R) => R(y));
1359
+ E == null || E(y, void 0), y = r(), u = !0, l.forEach((R) => R(y));
1337
1360
  }).catch((R) => {
1338
- C == null || C(void 0, R);
1361
+ E == null || E(void 0, R);
1339
1362
  });
1340
1363
  };
1341
1364
  return i.persist = {
@@ -1349,24 +1372,24 @@ const Ue = (t) => (e) => {
1349
1372
  f == null || f.removeItem(a.name);
1350
1373
  },
1351
1374
  getOptions: () => a,
1352
- rehydrate: () => E(),
1353
- hasHydrated: () => o,
1354
- onHydrate: (h) => (u.add(h), () => {
1355
- u.delete(h);
1375
+ rehydrate: () => C(),
1376
+ hasHydrated: () => u,
1377
+ onHydrate: (h) => (o.add(h), () => {
1378
+ o.delete(h);
1356
1379
  }),
1357
1380
  onFinishHydration: (h) => (l.add(h), () => {
1358
1381
  l.delete(h);
1359
1382
  })
1360
- }, a.skipHydration || E(), y || p;
1361
- }, Rt = is, as = (t) => {
1383
+ }, a.skipHydration || C(), y || p;
1384
+ }, hs = cs, ls = (t) => {
1362
1385
  const e = (s) => {
1363
1386
  s.key === t.persist.getOptions().name && s.newValue && t.persist.rehydrate();
1364
1387
  };
1365
1388
  return window.addEventListener("storage", e), () => {
1366
1389
  window.removeEventListener("storage", e);
1367
1390
  };
1368
- }, Ct = St()(
1369
- Rt(
1391
+ }, Rt = us()(
1392
+ hs(
1370
1393
  (t) => ({
1371
1394
  isAuthenticated: !1,
1372
1395
  isPending: !0,
@@ -1384,81 +1407,77 @@ const Ue = (t) => (e) => {
1384
1407
  }
1385
1408
  )
1386
1409
  );
1387
- typeof window < "u" && as(Ct);
1388
- const os = St()(
1389
- Rt(
1390
- (t) => ({
1391
- selectedServer: void 0,
1392
- setSelectedServer: (e) => t({ selectedServer: e })
1393
- }),
1394
- { name: "zudoku-selected-server" }
1395
- )
1396
- ), Os = (t) => {
1397
- const { selectedServer: e, setSelectedServer: s } = os();
1398
- return { selectedServer: It(
1399
- () => {
1400
- var i;
1401
- return e && t.some((a) => a.url === e) ? e : ((i = t.at(0)) == null ? void 0 : i.url) ?? "";
1402
- },
1403
- [e, t]
1404
- ), setSelectedServer: s };
1405
- }, us = () => {
1406
- const { authentication: t } = Ke(), e = Ct(), s = typeof t < "u";
1410
+ typeof window < "u" && ls(Rt);
1411
+ const ds = () => {
1412
+ const { authentication: t } = Ke(), e = Rt(), s = typeof t < "u";
1407
1413
  return {
1408
1414
  isAuthEnabled: s,
1409
1415
  ...e,
1410
1416
  login: async () => {
1411
1417
  if (!s)
1412
1418
  throw new Error("Authentication is not enabled.");
1413
- await t.signIn();
1419
+ await t.signIn({
1420
+ redirectTo: window.location.href
1421
+ });
1414
1422
  },
1415
1423
  logout: async () => {
1416
1424
  if (!s)
1417
1425
  throw new Error("Authentication is not enabled.");
1418
1426
  await t.signOut(), window.location.href = "/";
1427
+ },
1428
+ signup: async () => {
1429
+ if (!s)
1430
+ throw new Error("Authentication is not enabled.");
1431
+ await t.signUp({
1432
+ redirectTo: window.location.href
1433
+ });
1419
1434
  }
1420
1435
  };
1421
1436
  };
1422
1437
  export {
1423
- ut as A,
1424
- ye as B,
1425
- fs as C,
1426
- Le as D,
1427
- pe as E,
1428
- gs as F,
1429
- gt as G,
1430
- _e as H,
1431
- Ss as I,
1432
- mt as J,
1433
- ms as Q,
1434
- Ut as R,
1438
+ Rs as A,
1439
+ ws as B,
1440
+ ut as C,
1441
+ ct as D,
1442
+ ye as E,
1443
+ bs as F,
1444
+ Le as G,
1445
+ pe as H,
1446
+ Cs as I,
1447
+ St as J,
1448
+ _e as K,
1449
+ Os as L,
1450
+ gt as M,
1451
+ Fs as N,
1452
+ Es as Q,
1453
+ kt as R,
1435
1454
  qe as S,
1436
- es as Z,
1437
- Ke as a,
1438
- Xt as b,
1439
- xt as c,
1440
- ws as d,
1441
- Cs as e,
1442
- pt as f,
1443
- Ye as g,
1455
+ rs as Z,
1456
+ Is as a,
1457
+ Ps as b,
1458
+ At as c,
1459
+ Wt as d,
1460
+ Ke as e,
1461
+ et as f,
1462
+ vt as g,
1444
1463
  Re as h,
1445
- Bt as i,
1446
- Z as j,
1447
- us as k,
1448
- Rs as l,
1449
- Yt as m,
1464
+ Ye as i,
1465
+ ce as j,
1466
+ Ht as k,
1467
+ ds as l,
1468
+ Zt as m,
1450
1469
  Me as n,
1451
- Os as o,
1452
- Es as p,
1453
- Pt as q,
1454
- ys as r,
1455
- Ee as s,
1456
- ps as t,
1457
- Ct as u,
1458
- Se as v,
1459
- Dt as w,
1460
- bs as x,
1461
- vs as y,
1462
- ot as z
1470
+ Ss as o,
1471
+ us as p,
1472
+ hs as q,
1473
+ wt as r,
1474
+ Ce as s,
1475
+ Ts as t,
1476
+ Rt as u,
1477
+ It as v,
1478
+ ms as w,
1479
+ gs as x,
1480
+ Se as y,
1481
+ Pt as z
1463
1482
  };
1464
- //# sourceMappingURL=hook-CN__aZIt.js.map
1483
+ //# sourceMappingURL=hook-CqpVYDqN.js.map