zudoku 0.0.0-f90a252 → 0.0.0-f9211eb

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