zudoku 0.0.0-fed343e → 0.0.0-ff3751f

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 (599) hide show
  1. package/README.md +121 -0
  2. package/cli.js +2 -2
  3. package/dist/app/entry.client.js +2 -2
  4. package/dist/app/entry.client.js.map +1 -1
  5. package/dist/app/entry.server.js +3 -0
  6. package/dist/app/entry.server.js.map +1 -1
  7. package/dist/app/main.d.ts +1 -0
  8. package/dist/app/main.js +12 -29
  9. package/dist/app/main.js.map +1 -1
  10. package/dist/app/standalone.js.map +1 -1
  11. package/dist/cli/cli.js +1 -2
  12. package/dist/cli/cli.js.map +1 -1
  13. package/dist/cli/common/machine-id/lib.js.map +1 -1
  14. package/dist/cli/common/outdated.js.map +1 -1
  15. package/dist/cli/common/utils/box.js.map +1 -1
  16. package/dist/cli/dev/handler.js +2 -2
  17. package/dist/cli/dev/handler.js.map +1 -1
  18. package/dist/config/config.d.ts +2 -6
  19. package/dist/config/validators/InputSidebarSchema.d.ts +21 -5
  20. package/dist/config/validators/InputSidebarSchema.js +7 -28
  21. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  22. package/dist/config/validators/SidebarSchema.d.ts +24 -1
  23. package/dist/config/validators/SidebarSchema.js +80 -44
  24. package/dist/config/validators/SidebarSchema.js.map +1 -1
  25. package/dist/config/validators/validate.d.ts +590 -311
  26. package/dist/config/validators/validate.js +42 -19
  27. package/dist/config/validators/validate.js.map +1 -1
  28. package/dist/index.d.ts +5 -1
  29. package/dist/index.js +1 -1
  30. package/dist/index.js.map +1 -1
  31. package/dist/lib/authentication/components/CallbackHandler.js +21 -31
  32. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  33. package/dist/lib/authentication/hook.d.ts +1 -1
  34. package/dist/lib/authentication/hook.js +1 -1
  35. package/dist/lib/authentication/hook.js.map +1 -1
  36. package/dist/lib/authentication/state.d.ts +16 -0
  37. package/dist/lib/authentication/state.js +5 -0
  38. package/dist/lib/authentication/state.js.map +1 -1
  39. package/dist/lib/components/Banner.js +7 -1
  40. package/dist/lib/components/Banner.js.map +1 -1
  41. package/dist/lib/components/ErrorPage.js +1 -2
  42. package/dist/lib/components/ErrorPage.js.map +1 -1
  43. package/dist/lib/components/Header.js +6 -1
  44. package/dist/lib/components/Header.js.map +1 -1
  45. package/dist/lib/components/Heading.d.ts +1 -1
  46. package/dist/lib/components/InlineCode.d.ts +2 -1
  47. package/dist/lib/components/InlineCode.js +9 -1
  48. package/dist/lib/components/InlineCode.js.map +1 -1
  49. package/dist/lib/components/Layout.js +1 -1
  50. package/dist/lib/components/Layout.js.map +1 -1
  51. package/dist/lib/components/MobileTopNavigation.js +5 -1
  52. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  53. package/dist/lib/components/Search.js +1 -1
  54. package/dist/lib/components/Search.js.map +1 -1
  55. package/dist/lib/components/SlotletProvider.d.ts +10 -2
  56. package/dist/lib/components/SlotletProvider.js +4 -2
  57. package/dist/lib/components/SlotletProvider.js.map +1 -1
  58. package/dist/lib/components/SyntaxHighlight.js +4 -1
  59. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  60. package/dist/lib/components/TopNavigation.d.ts +3 -0
  61. package/dist/lib/components/TopNavigation.js +38 -5
  62. package/dist/lib/components/TopNavigation.js.map +1 -1
  63. package/dist/lib/components/context/ZudokuContext.d.ts +6 -10
  64. package/dist/lib/components/context/ZudokuContext.js +26 -20
  65. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  66. package/dist/lib/components/index.d.ts +18 -8
  67. package/dist/lib/components/index.js +10 -3
  68. package/dist/lib/components/index.js.map +1 -1
  69. package/dist/lib/components/navigation/Sidebar.js +3 -3
  70. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  71. package/dist/lib/components/navigation/SidebarCategory.js +18 -9
  72. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  73. package/dist/lib/components/navigation/SidebarItem.js +12 -7
  74. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  75. package/dist/lib/components/navigation/utils.js +10 -14
  76. package/dist/lib/components/navigation/utils.js.map +1 -1
  77. package/dist/lib/core/DevPortalContext.d.ts +4 -7
  78. package/dist/lib/core/DevPortalContext.js.map +1 -1
  79. package/dist/lib/core/plugins.d.ts +1 -0
  80. package/dist/lib/core/plugins.js.map +1 -1
  81. package/dist/lib/errors/ErrorAlert.d.ts +1 -1
  82. package/dist/lib/errors/ErrorAlert.js +8 -3
  83. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  84. package/dist/lib/oas/graphql/index.d.ts +2 -1
  85. package/dist/lib/oas/graphql/index.js +24 -16
  86. package/dist/lib/oas/graphql/index.js.map +1 -1
  87. package/dist/lib/oas/parser/index.d.ts +1 -0
  88. package/dist/lib/oas/parser/index.js.map +1 -1
  89. package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
  90. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  91. package/dist/lib/plugins/custom-pages/CustomPage.d.ts +2 -0
  92. package/dist/lib/plugins/custom-pages/CustomPage.js +11 -0
  93. package/dist/lib/plugins/custom-pages/CustomPage.js.map +1 -0
  94. package/dist/lib/plugins/custom-pages/index.d.ts +10 -0
  95. package/dist/lib/plugins/custom-pages/index.js +11 -0
  96. package/dist/lib/plugins/custom-pages/index.js.map +1 -0
  97. package/dist/lib/plugins/markdown/MdxPage.js +2 -2
  98. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  99. package/dist/lib/plugins/markdown/index.d.ts +5 -5
  100. package/dist/lib/plugins/markdown/index.js +31 -3
  101. package/dist/lib/plugins/markdown/index.js.map +1 -1
  102. package/dist/lib/plugins/markdown/resolver.d.ts +38 -0
  103. package/dist/lib/plugins/markdown/resolver.js +75 -0
  104. package/dist/lib/plugins/markdown/resolver.js.map +1 -0
  105. package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -3
  106. package/dist/lib/plugins/openapi/Endpoint.js +46 -8
  107. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  108. package/dist/lib/plugins/openapi/OperationList.js +2 -2
  109. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  110. package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
  111. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  112. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +2 -1
  113. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +2 -2
  114. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  115. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  116. package/dist/lib/plugins/openapi/Route.d.ts +1 -1
  117. package/dist/lib/plugins/openapi/Route.js +1 -1
  118. package/dist/lib/plugins/openapi/Route.js.map +1 -1
  119. package/dist/lib/plugins/openapi/Sidecar.js +17 -6
  120. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  121. package/dist/lib/plugins/openapi/SimpleSelect.d.ts +2 -1
  122. package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
  123. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
  124. package/dist/lib/plugins/openapi/client/createMemoryClient.js +1 -1
  125. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -1
  126. package/dist/lib/plugins/openapi/client/createWorkerClient.js +1 -1
  127. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -1
  128. package/dist/lib/plugins/openapi/client/worker.js.map +1 -1
  129. package/dist/lib/plugins/openapi/graphql/gql.d.ts +10 -2
  130. package/dist/lib/plugins/openapi/graphql/gql.js +2 -1
  131. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  132. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +29 -3
  133. package/dist/lib/plugins/openapi/graphql/graphql.js +87 -0
  134. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  135. package/dist/lib/plugins/openapi/index.js +1 -1
  136. package/dist/lib/plugins/openapi/index.js.map +1 -1
  137. package/dist/lib/plugins/openapi/interfaces.d.ts +3 -0
  138. package/dist/lib/plugins/openapi/playground/Playground.d.ts +2 -1
  139. package/dist/lib/plugins/openapi/playground/Playground.js +15 -6
  140. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  141. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  142. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  143. package/dist/lib/plugins/openapi/playground/ResponseTab.js +1 -1
  144. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +1 -1
  145. package/dist/lib/plugins/openapi/playground/createUrl.js +3 -1
  146. package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -1
  147. package/dist/lib/plugins/redirect/index.d.ts +2 -5
  148. package/dist/lib/plugins/redirect/index.js +1 -1
  149. package/dist/lib/plugins/redirect/index.js.map +1 -1
  150. package/dist/lib/ui/Accordion.d.ts +7 -0
  151. package/dist/lib/ui/Accordion.js +14 -0
  152. package/dist/lib/ui/Accordion.js.map +1 -0
  153. package/dist/lib/ui/Alert.d.ts +8 -0
  154. package/dist/lib/ui/Alert.js +23 -0
  155. package/dist/lib/ui/Alert.js.map +1 -0
  156. package/dist/lib/ui/AlertDialog.d.ts +20 -0
  157. package/dist/lib/ui/AlertDialog.js +27 -0
  158. package/dist/lib/ui/AlertDialog.js.map +1 -0
  159. package/dist/lib/ui/AspectRatio.d.ts +3 -0
  160. package/dist/lib/ui/AspectRatio.js +4 -0
  161. package/dist/lib/ui/AspectRatio.js.map +1 -0
  162. package/dist/lib/ui/Badge.d.ts +9 -0
  163. package/dist/lib/ui/Badge.js +21 -0
  164. package/dist/lib/ui/Badge.js.map +1 -0
  165. package/dist/lib/ui/Breadcrumb.d.ts +19 -0
  166. package/dist/lib/ui/Breadcrumb.js +24 -0
  167. package/dist/lib/ui/Breadcrumb.js.map +1 -0
  168. package/dist/lib/ui/Button.d.ts +2 -3
  169. package/dist/lib/ui/Button.js +1 -1
  170. package/dist/lib/ui/Button.js.map +1 -1
  171. package/dist/lib/ui/Callout.d.ts +36 -35
  172. package/dist/lib/ui/Callout.js.map +1 -1
  173. package/dist/lib/ui/Carousel.d.ts +18 -0
  174. package/dist/lib/ui/Carousel.js +99 -0
  175. package/dist/lib/ui/Carousel.js.map +1 -0
  176. package/dist/lib/ui/Checkbox.d.ts +4 -0
  177. package/dist/lib/ui/Checkbox.js +9 -0
  178. package/dist/lib/ui/Checkbox.js.map +1 -0
  179. package/dist/lib/ui/Collapsible.d.ts +5 -0
  180. package/dist/lib/ui/Collapsible.js +6 -0
  181. package/dist/lib/ui/Collapsible.js.map +1 -0
  182. package/dist/lib/ui/Command.d.ts +80 -0
  183. package/dist/lib/ui/Command.js +31 -0
  184. package/dist/lib/ui/Command.js.map +1 -0
  185. package/dist/lib/{components → ui}/Dialog.js +2 -2
  186. package/dist/lib/ui/Dialog.js.map +1 -0
  187. package/dist/lib/ui/Drawer.d.ts +8 -10
  188. package/dist/lib/ui/Drawer.js.map +1 -1
  189. package/dist/lib/ui/Form.d.ts +23 -0
  190. package/dist/lib/ui/Form.js +63 -0
  191. package/dist/lib/ui/Form.js.map +1 -0
  192. package/dist/lib/ui/HoverCard.d.ts +6 -0
  193. package/dist/lib/ui/HoverCard.js +10 -0
  194. package/dist/lib/ui/HoverCard.js.map +1 -0
  195. package/dist/lib/ui/Label.d.ts +5 -0
  196. package/dist/lib/ui/Label.js +10 -0
  197. package/dist/lib/ui/Label.js.map +1 -0
  198. package/dist/lib/ui/Pagination.d.ts +28 -0
  199. package/dist/lib/ui/Pagination.js +24 -0
  200. package/dist/lib/ui/Pagination.js.map +1 -0
  201. package/dist/lib/ui/Popover.d.ts +6 -0
  202. package/dist/lib/ui/Popover.js +10 -0
  203. package/dist/lib/ui/Popover.js.map +1 -0
  204. package/dist/lib/ui/Progress.d.ts +4 -0
  205. package/dist/lib/ui/Progress.js +8 -0
  206. package/dist/lib/ui/Progress.js.map +1 -0
  207. package/dist/lib/ui/RadioGroup.d.ts +5 -0
  208. package/dist/lib/ui/RadioGroup.js +15 -0
  209. package/dist/lib/ui/RadioGroup.js.map +1 -0
  210. package/dist/lib/ui/ScrollArea.d.ts +5 -0
  211. package/dist/lib/ui/ScrollArea.js +12 -0
  212. package/dist/lib/ui/ScrollArea.js.map +1 -0
  213. package/dist/lib/ui/Select.js.map +1 -0
  214. package/dist/lib/ui/Skeleton.d.ts +2 -0
  215. package/dist/lib/ui/Skeleton.js +7 -0
  216. package/dist/lib/ui/Skeleton.js.map +1 -0
  217. package/dist/lib/ui/Slider.d.ts +4 -0
  218. package/dist/lib/ui/Slider.js +8 -0
  219. package/dist/lib/ui/Slider.js.map +1 -0
  220. package/dist/lib/ui/Switch.d.ts +4 -0
  221. package/dist/lib/ui/Switch.js +8 -0
  222. package/dist/lib/ui/Switch.js.map +1 -0
  223. package/dist/lib/ui/Textarea.d.ts +4 -0
  224. package/dist/lib/ui/Textarea.js +9 -0
  225. package/dist/lib/ui/Textarea.js.map +1 -0
  226. package/dist/lib/ui/Toggle.d.ts +12 -0
  227. package/dist/lib/ui/Toggle.js +26 -0
  228. package/dist/lib/ui/Toggle.js.map +1 -0
  229. package/dist/lib/ui/ToggleGroup.d.ts +12 -0
  230. package/dist/lib/ui/ToggleGroup.js +21 -0
  231. package/dist/lib/ui/ToggleGroup.js.map +1 -0
  232. package/dist/lib/ui/Tooltip.d.ts +7 -0
  233. package/dist/lib/ui/Tooltip.js +11 -0
  234. package/dist/lib/ui/Tooltip.js.map +1 -0
  235. package/dist/lib/util/MdxComponents.js.map +1 -1
  236. package/dist/lib/util/invariant.d.ts +9 -0
  237. package/dist/lib/util/invariant.js +7 -3
  238. package/dist/lib/util/invariant.js.map +1 -1
  239. package/dist/lib/util/useExposedProps.d.ts +2 -0
  240. package/dist/lib/util/useExposedProps.js +9 -0
  241. package/dist/lib/util/useExposedProps.js.map +1 -0
  242. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  243. package/dist/vite/build.js +12 -3
  244. package/dist/vite/build.js.map +1 -1
  245. package/dist/vite/config.d.ts +3 -9
  246. package/dist/vite/config.js +40 -69
  247. package/dist/vite/config.js.map +1 -1
  248. package/dist/vite/debug.d.ts +1 -0
  249. package/dist/vite/debug.js +10 -0
  250. package/dist/vite/debug.js.map +1 -0
  251. package/dist/vite/dev-server.d.ts +7 -1
  252. package/dist/vite/dev-server.js +20 -16
  253. package/dist/vite/dev-server.js.map +1 -1
  254. package/dist/vite/output.d.ts +101 -0
  255. package/dist/vite/output.js +30 -0
  256. package/dist/vite/output.js.map +1 -0
  257. package/dist/vite/plugin-api.js +4 -7
  258. package/dist/vite/plugin-api.js.map +1 -1
  259. package/dist/vite/plugin-component.js +17 -8
  260. package/dist/vite/plugin-component.js.map +1 -1
  261. package/dist/vite/plugin-config-reload.js +7 -4
  262. package/dist/vite/plugin-config-reload.js.map +1 -1
  263. package/dist/vite/plugin-config.d.ts +2 -3
  264. package/dist/vite/plugin-config.js +2 -3
  265. package/dist/vite/plugin-config.js.map +1 -1
  266. package/dist/vite/plugin-custom-pages.d.ts +4 -0
  267. package/dist/vite/plugin-custom-pages.js +30 -0
  268. package/dist/vite/plugin-custom-pages.js.map +1 -0
  269. package/dist/vite/plugin-docs.js +37 -24
  270. package/dist/vite/plugin-docs.js.map +1 -1
  271. package/dist/vite/plugin-frontmatter.d.ts +3 -0
  272. package/dist/vite/plugin-frontmatter.js +33 -0
  273. package/dist/vite/plugin-frontmatter.js.map +1 -0
  274. package/dist/vite/plugin-mdx.js +17 -0
  275. package/dist/vite/plugin-mdx.js.map +1 -1
  276. package/dist/vite/plugin-search.d.ts +3 -0
  277. package/dist/vite/plugin-search.js +26 -0
  278. package/dist/vite/plugin-search.js.map +1 -0
  279. package/dist/vite/plugin-sidebar.js +21 -7
  280. package/dist/vite/plugin-sidebar.js.map +1 -1
  281. package/dist/vite/plugin.js +7 -3
  282. package/dist/vite/plugin.js.map +1 -1
  283. package/dist/vite/prerender.d.ts +5 -1
  284. package/dist/vite/prerender.js +6 -5
  285. package/dist/vite/prerender.js.map +1 -1
  286. package/lib/{utils-ByIc_KIM.js → AnchorLink-BbB2q-jx.js} +231 -275
  287. package/lib/AnchorLink-BbB2q-jx.js.map +1 -0
  288. package/lib/{AuthenticationPlugin-Bx9FK124.js → AuthenticationPlugin-C9BHGXlE.js} +3 -3
  289. package/lib/{AuthenticationPlugin-Bx9FK124.js.map → AuthenticationPlugin-C9BHGXlE.js.map} +1 -1
  290. package/lib/{CategoryHeading-XnFqN2lJ.js → CategoryHeading-Bb9dqxD3.js} +4 -4
  291. package/lib/{CategoryHeading-XnFqN2lJ.js.map → CategoryHeading-Bb9dqxD3.js.map} +1 -1
  292. package/lib/ClientOnly-CVN6leDu.js +11 -0
  293. package/lib/ClientOnly-CVN6leDu.js.map +1 -0
  294. package/lib/{DeveloperHint-FBb2uXJe.js → DeveloperHint-DHdLXGHA.js} +2 -2
  295. package/lib/{DeveloperHint-FBb2uXJe.js.map → DeveloperHint-DHdLXGHA.js.map} +1 -1
  296. package/lib/Dialog-k70Qfukb.js +67 -0
  297. package/lib/Dialog-k70Qfukb.js.map +1 -0
  298. package/lib/{Markdown-B4aR03g6.js → Markdown-BDcCAWwm.js} +4298 -6518
  299. package/lib/Markdown-BDcCAWwm.js.map +1 -0
  300. package/lib/{MdxPage-BZyQsH8Z.js → MdxPage-DKMH_t0f.js} +25 -23
  301. package/lib/MdxPage-DKMH_t0f.js.map +1 -0
  302. package/lib/{OperationList-2NeWEM0u.js → OperationList-Tj7ubW_t.js} +181 -137
  303. package/lib/OperationList-Tj7ubW_t.js.map +1 -0
  304. package/lib/{Route-BZPewmrN.js → Route-C3DGB6OS.js} +3 -4
  305. package/lib/Route-C3DGB6OS.js.map +1 -0
  306. package/lib/Select-Bagt3Bme.js +223 -0
  307. package/lib/Select-Bagt3Bme.js.map +1 -0
  308. package/lib/SlotletProvider-Da7eFgd2.js +241 -0
  309. package/lib/SlotletProvider-Da7eFgd2.js.map +1 -0
  310. package/lib/Spinner-C6zroowC.js +40 -0
  311. package/lib/Spinner-C6zroowC.js.map +1 -0
  312. package/lib/StaggeredRender-DDHSzQKE.js +17 -0
  313. package/lib/StaggeredRender-DDHSzQKE.js.map +1 -0
  314. package/lib/ZudokuContext-BKXGJTmu.js +1222 -0
  315. package/lib/ZudokuContext-BKXGJTmu.js.map +1 -0
  316. package/lib/__vite-browser-external-BYRIRx8p.js +9 -0
  317. package/lib/__vite-browser-external-BYRIRx8p.js.map +1 -0
  318. package/lib/assets/{index-B9EWVYfo.js → index-B_Jk_Yzp.js} +968 -938
  319. package/lib/assets/index-B_Jk_Yzp.js.map +1 -0
  320. package/lib/assets/{worker-BvD7B6MG.js → worker-Bf8vjASY.js} +6769 -4411
  321. package/lib/assets/worker-Bf8vjASY.js.map +1 -0
  322. package/lib/cn-BmFQLtkS.js +2279 -0
  323. package/lib/cn-BmFQLtkS.js.map +1 -0
  324. package/lib/hook-sn0zMTkE.js +229 -0
  325. package/lib/hook-sn0zMTkE.js.map +1 -0
  326. package/lib/{index-Dv2KZuEw.js → index-AjWCJNGC.js} +1681 -1676
  327. package/lib/index-AjWCJNGC.js.map +1 -0
  328. package/lib/index-Bn6Lc9tq.js +9 -0
  329. package/lib/index-Bn6Lc9tq.js.map +1 -0
  330. package/lib/index-BuAyrJe3.js +46 -0
  331. package/lib/index-BuAyrJe3.js.map +1 -0
  332. package/lib/{index-BG0g4WW0.js → index-CRo94sKK.js} +750 -738
  333. package/lib/index-CRo94sKK.js.map +1 -0
  334. package/lib/{index-CLd8ycZz.js → index-CkwDvuPt.js} +947 -917
  335. package/lib/index-CkwDvuPt.js.map +1 -0
  336. package/lib/index-LNp6rxyU.js +2094 -0
  337. package/lib/index-LNp6rxyU.js.map +1 -0
  338. package/lib/index.esm-C5mr_sKO.js +1193 -0
  339. package/lib/index.esm-C5mr_sKO.js.map +1 -0
  340. package/lib/invariant-Caa8-XvF.js +26 -0
  341. package/lib/invariant-Caa8-XvF.js.map +1 -0
  342. package/lib/router-BsfSoK2j.js +3024 -0
  343. package/lib/router-BsfSoK2j.js.map +1 -0
  344. package/lib/state-CsuHT8ZO.js +183 -0
  345. package/lib/state-CsuHT8ZO.js.map +1 -0
  346. package/lib/ui/Accordion.js +47 -0
  347. package/lib/ui/Accordion.js.map +1 -0
  348. package/lib/ui/Alert.js +51 -0
  349. package/lib/ui/Alert.js.map +1 -0
  350. package/lib/ui/AlertDialog.js +114 -0
  351. package/lib/ui/AlertDialog.js.map +1 -0
  352. package/lib/ui/AspectRatio.js +6 -0
  353. package/lib/ui/AspectRatio.js.map +1 -0
  354. package/lib/ui/Badge.js +27 -0
  355. package/lib/ui/Badge.js.map +1 -0
  356. package/lib/ui/Breadcrumb.js +94 -0
  357. package/lib/ui/Breadcrumb.js.map +1 -0
  358. package/lib/ui/Button.js +49 -0
  359. package/lib/ui/Button.js.map +1 -0
  360. package/lib/ui/Callout.js +77 -0
  361. package/lib/ui/Callout.js.map +1 -0
  362. package/lib/ui/Card.js +62 -0
  363. package/lib/ui/Card.js.map +1 -0
  364. package/lib/ui/Carousel.js +1410 -0
  365. package/lib/ui/Carousel.js.map +1 -0
  366. package/lib/ui/Checkbox.js +28 -0
  367. package/lib/ui/Checkbox.js.map +1 -0
  368. package/lib/ui/Collapsible.js +8 -0
  369. package/lib/ui/Collapsible.js.map +1 -0
  370. package/lib/ui/Command.js +550 -0
  371. package/lib/ui/Command.js.map +1 -0
  372. package/lib/ui/Dialog.js +101 -0
  373. package/lib/ui/Dialog.js.map +1 -0
  374. package/lib/ui/Drawer.js +1153 -0
  375. package/lib/ui/Drawer.js.map +1 -0
  376. package/lib/ui/DropdownMenu.js +145 -0
  377. package/lib/ui/DropdownMenu.js.map +1 -0
  378. package/lib/ui/Form.js +95 -0
  379. package/lib/ui/Form.js.map +1 -0
  380. package/lib/ui/HoverCard.js +24 -0
  381. package/lib/ui/HoverCard.js.map +1 -0
  382. package/lib/ui/Input.js +22 -0
  383. package/lib/ui/Input.js.map +1 -0
  384. package/lib/ui/Label.js +20 -0
  385. package/lib/ui/Label.js.map +1 -0
  386. package/lib/ui/Pagination.js +106 -0
  387. package/lib/ui/Pagination.js.map +1 -0
  388. package/lib/ui/Popover.js +24 -0
  389. package/lib/ui/Popover.js.map +1 -0
  390. package/lib/ui/Progress.js +27 -0
  391. package/lib/ui/Progress.js.map +1 -0
  392. package/lib/ui/RadioGroup.js +32 -0
  393. package/lib/ui/RadioGroup.js.map +1 -0
  394. package/lib/ui/ScrollArea.js +39 -0
  395. package/lib/ui/ScrollArea.js.map +1 -0
  396. package/lib/ui/Select.js +122 -0
  397. package/lib/ui/Select.js.map +1 -0
  398. package/lib/ui/Skeleton.js +18 -0
  399. package/lib/ui/Skeleton.js.map +1 -0
  400. package/lib/ui/Slider.js +24 -0
  401. package/lib/ui/Slider.js.map +1 -0
  402. package/lib/ui/Switch.js +28 -0
  403. package/lib/ui/Switch.js.map +1 -0
  404. package/lib/ui/Tabs.js +47 -0
  405. package/lib/ui/Tabs.js.map +1 -0
  406. package/lib/ui/Textarea.js +21 -0
  407. package/lib/ui/Textarea.js.map +1 -0
  408. package/lib/ui/Toggle.js +38 -0
  409. package/lib/ui/Toggle.js.map +1 -0
  410. package/lib/ui/ToggleGroup.js +42 -0
  411. package/lib/ui/ToggleGroup.js.map +1 -0
  412. package/lib/ui/Tooltip.js +24 -0
  413. package/lib/ui/Tooltip.js.map +1 -0
  414. package/lib/urql-core-KJnLL26g.js +1455 -0
  415. package/lib/urql-core-KJnLL26g.js.map +1 -0
  416. package/lib/useExposedProps-ChOIUaS4.js +9 -0
  417. package/lib/useExposedProps-ChOIUaS4.js.map +1 -0
  418. package/lib/zudoku.auth-auth0.js +1 -1
  419. package/lib/zudoku.auth-clerk.js +2 -2
  420. package/lib/zudoku.auth-openid.js +541 -534
  421. package/lib/zudoku.auth-openid.js.map +1 -1
  422. package/lib/zudoku.components.js +953 -2849
  423. package/lib/zudoku.components.js.map +1 -1
  424. package/lib/zudoku.openapi-worker.js +4668 -4380
  425. package/lib/zudoku.openapi-worker.js.map +1 -1
  426. package/lib/zudoku.plugin-api-keys.js +69 -76
  427. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  428. package/lib/zudoku.plugin-custom-pages.js +22 -0
  429. package/lib/zudoku.plugin-custom-pages.js.map +1 -0
  430. package/lib/zudoku.plugin-markdown.js +93 -24
  431. package/lib/zudoku.plugin-markdown.js.map +1 -1
  432. package/lib/zudoku.plugin-openapi.js +9 -10
  433. package/lib/zudoku.plugin-openapi.js.map +1 -1
  434. package/lib/zudoku.plugin-redirect.js +2 -2
  435. package/lib/zudoku.plugin-redirect.js.map +1 -1
  436. package/lib/zudoku.plugin-search-inkeep.js +9 -13
  437. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  438. package/package.json +98 -72
  439. package/src/app/entry.client.tsx +4 -2
  440. package/src/app/entry.server.tsx +4 -0
  441. package/src/app/main.css +4 -1
  442. package/src/app/main.tsx +15 -33
  443. package/src/app/standalone.tsx +1 -1
  444. package/src/lib/authentication/components/CallbackHandler.tsx +20 -51
  445. package/src/lib/authentication/hook.ts +1 -1
  446. package/src/lib/authentication/state.ts +17 -0
  447. package/src/lib/components/Banner.tsx +12 -2
  448. package/src/lib/components/ErrorPage.tsx +0 -2
  449. package/src/lib/components/Header.tsx +21 -4
  450. package/src/lib/components/InlineCode.tsx +10 -0
  451. package/src/lib/components/Layout.tsx +2 -1
  452. package/src/lib/components/MobileTopNavigation.tsx +10 -2
  453. package/src/lib/components/Search.tsx +1 -1
  454. package/src/lib/components/SlotletProvider.tsx +29 -4
  455. package/src/lib/components/SyntaxHighlight.tsx +5 -1
  456. package/src/lib/components/TopNavigation.tsx +70 -23
  457. package/src/lib/components/context/ZudokuContext.ts +28 -20
  458. package/src/lib/components/index.ts +13 -4
  459. package/src/lib/components/navigation/Sidebar.tsx +6 -6
  460. package/src/lib/components/navigation/SidebarCategory.tsx +35 -29
  461. package/src/lib/components/navigation/SidebarItem.tsx +17 -20
  462. package/src/lib/components/navigation/utils.ts +11 -16
  463. package/src/lib/core/DevPortalContext.ts +4 -3
  464. package/src/lib/core/plugins.ts +2 -0
  465. package/src/lib/errors/ErrorAlert.tsx +18 -5
  466. package/src/lib/oas/graphql/index.ts +36 -24
  467. package/src/lib/oas/parser/index.ts +1 -0
  468. package/src/lib/plugins/api-keys/CreateApiKey.tsx +2 -2
  469. package/src/lib/plugins/custom-pages/CustomPage.tsx +18 -0
  470. package/src/lib/plugins/custom-pages/index.tsx +24 -0
  471. package/src/lib/plugins/markdown/MdxPage.tsx +11 -9
  472. package/src/lib/plugins/markdown/index.tsx +49 -10
  473. package/src/lib/plugins/markdown/resolver.ts +92 -0
  474. package/src/lib/plugins/openapi/Endpoint.tsx +86 -22
  475. package/src/lib/plugins/openapi/OperationList.tsx +4 -2
  476. package/src/lib/plugins/openapi/OperationListItem.tsx +1 -1
  477. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +3 -0
  478. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +1 -1
  479. package/src/lib/plugins/openapi/Route.tsx +1 -2
  480. package/src/lib/plugins/openapi/Sidecar.tsx +21 -6
  481. package/src/lib/plugins/openapi/SimpleSelect.tsx +10 -2
  482. package/src/lib/plugins/openapi/client/createMemoryClient.ts +1 -6
  483. package/src/lib/plugins/openapi/client/createWorkerClient.ts +1 -6
  484. package/src/lib/plugins/openapi/client/worker.ts +2 -2
  485. package/src/lib/plugins/openapi/graphql/gql.ts +11 -3
  486. package/src/lib/plugins/openapi/graphql/graphql.ts +116 -4
  487. package/src/lib/plugins/openapi/index.tsx +2 -6
  488. package/src/lib/plugins/openapi/interfaces.ts +4 -1
  489. package/src/lib/plugins/openapi/playground/Playground.tsx +42 -7
  490. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  491. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -1
  492. package/src/lib/plugins/openapi/playground/createUrl.ts +6 -1
  493. package/src/lib/plugins/redirect/index.tsx +3 -7
  494. package/src/lib/ui/Accordion.tsx +56 -0
  495. package/src/lib/ui/{Note.tsx → Alert.tsx} +11 -10
  496. package/src/lib/ui/AlertDialog.tsx +139 -0
  497. package/src/lib/ui/AspectRatio.tsx +5 -0
  498. package/src/lib/ui/Badge.tsx +36 -0
  499. package/src/lib/ui/Breadcrumb.tsx +115 -0
  500. package/src/lib/ui/Button.tsx +1 -1
  501. package/src/lib/ui/Callout.tsx +7 -6
  502. package/src/lib/ui/Carousel.tsx +260 -0
  503. package/src/lib/ui/Checkbox.tsx +28 -0
  504. package/src/lib/ui/Collapsible.tsx +9 -0
  505. package/src/lib/ui/Command.tsx +151 -0
  506. package/src/lib/{components → ui}/Dialog.tsx +4 -3
  507. package/src/lib/ui/Drawer.tsx +38 -36
  508. package/src/lib/ui/Form.tsx +177 -0
  509. package/src/lib/ui/HoverCard.tsx +27 -0
  510. package/src/lib/ui/Label.tsx +24 -0
  511. package/src/lib/ui/Pagination.tsx +117 -0
  512. package/src/lib/ui/Popover.tsx +29 -0
  513. package/src/lib/ui/Progress.tsx +26 -0
  514. package/src/lib/ui/RadioGroup.tsx +42 -0
  515. package/src/lib/ui/ScrollArea.tsx +46 -0
  516. package/src/lib/ui/Skeleton.tsx +15 -0
  517. package/src/lib/ui/Slider.tsx +26 -0
  518. package/src/lib/ui/Switch.tsx +27 -0
  519. package/src/lib/ui/Textarea.tsx +23 -0
  520. package/src/lib/ui/Toggle.tsx +43 -0
  521. package/src/lib/ui/ToggleGroup.tsx +59 -0
  522. package/src/lib/ui/Tooltip.tsx +28 -0
  523. package/src/lib/util/MdxComponents.tsx +0 -1
  524. package/src/lib/util/invariant.ts +15 -3
  525. package/src/lib/util/useExposedProps.tsx +16 -0
  526. package/src/lib/util/useScrollToAnchor.ts +1 -1
  527. package/dist/internal.d.ts +0 -1
  528. package/dist/internal.js +0 -2
  529. package/dist/internal.js.map +0 -1
  530. package/dist/lib/components/Dialog.js.map +0 -1
  531. package/dist/lib/components/Select.js.map +0 -1
  532. package/dist/lib/plugins/custom-page/index.d.ts +0 -8
  533. package/dist/lib/plugins/custom-page/index.js +0 -12
  534. package/dist/lib/plugins/custom-page/index.js.map +0 -1
  535. package/dist/lib/plugins/markdown/generateRoutes.d.ts +0 -3
  536. package/dist/lib/plugins/markdown/generateRoutes.js +0 -19
  537. package/dist/lib/plugins/markdown/generateRoutes.js.map +0 -1
  538. package/dist/lib/plugins/openapi/playground/Editor.d.ts +0 -1
  539. package/dist/lib/plugins/openapi/playground/Editor.js +0 -5
  540. package/dist/lib/plugins/openapi/playground/Editor.js.map +0 -1
  541. package/dist/lib/plugins/openapi/util/urql.d.ts +0 -7
  542. package/dist/lib/plugins/openapi/util/urql.js +0 -8
  543. package/dist/lib/plugins/openapi/util/urql.js.map +0 -1
  544. package/dist/lib/ui/Note.d.ts +0 -8
  545. package/dist/lib/ui/Note.js +0 -23
  546. package/dist/lib/ui/Note.js.map +0 -1
  547. package/dist/lib/util/slugify.d.ts +0 -2
  548. package/dist/lib/util/slugify.js +0 -3
  549. package/dist/lib/util/slugify.js.map +0 -1
  550. package/dist/vite/plugin-icons.d.ts +0 -3
  551. package/dist/vite/plugin-icons.js +0 -47
  552. package/dist/vite/plugin-icons.js.map +0 -1
  553. package/lib/ErrorPage-knunPbKI.js +0 -18
  554. package/lib/ErrorPage-knunPbKI.js.map +0 -1
  555. package/lib/Input-BEDZAKw0.js +0 -2198
  556. package/lib/Input-BEDZAKw0.js.map +0 -1
  557. package/lib/Markdown-B4aR03g6.js.map +0 -1
  558. package/lib/MdxPage-BZyQsH8Z.js.map +0 -1
  559. package/lib/OperationList-2NeWEM0u.js.map +0 -1
  560. package/lib/Route-BZPewmrN.js.map +0 -1
  561. package/lib/SidebarBadge-COz0hgfa.js +0 -498
  562. package/lib/SidebarBadge-COz0hgfa.js.map +0 -1
  563. package/lib/SlotletProvider-DJMaOUDs.js +0 -238
  564. package/lib/SlotletProvider-DJMaOUDs.js.map +0 -1
  565. package/lib/Spinner-3cQDBVGr.js +0 -7
  566. package/lib/Spinner-3cQDBVGr.js.map +0 -1
  567. package/lib/ZudokuContext-cr-pTRY1.js +0 -1084
  568. package/lib/ZudokuContext-cr-pTRY1.js.map +0 -1
  569. package/lib/assets/index-B9EWVYfo.js.map +0 -1
  570. package/lib/assets/worker-BvD7B6MG.js.map +0 -1
  571. package/lib/index-1EDgIO6b.js +0 -124
  572. package/lib/index-1EDgIO6b.js.map +0 -1
  573. package/lib/index-BG0g4WW0.js.map +0 -1
  574. package/lib/index-CLd8ycZz.js.map +0 -1
  575. package/lib/index-Dv2KZuEw.js.map +0 -1
  576. package/lib/index-Zezcv0xb.js +0 -2814
  577. package/lib/index-Zezcv0xb.js.map +0 -1
  578. package/lib/joinPath-B7kNnUX4.js +0 -8
  579. package/lib/joinPath-B7kNnUX4.js.map +0 -1
  580. package/lib/router-D2p7Olpn.js +0 -2971
  581. package/lib/router-D2p7Olpn.js.map +0 -1
  582. package/lib/slugify-DbLhpSPt.js +0 -28
  583. package/lib/slugify-DbLhpSPt.js.map +0 -1
  584. package/lib/state-lIwt9isb.js +0 -288
  585. package/lib/state-lIwt9isb.js.map +0 -1
  586. package/lib/urql-YhcsXYy8.js +0 -1591
  587. package/lib/urql-YhcsXYy8.js.map +0 -1
  588. package/lib/utils-ByIc_KIM.js.map +0 -1
  589. package/lib/zudoku.plugin-custom-page.js +0 -13
  590. package/lib/zudoku.plugin-custom-page.js.map +0 -1
  591. package/src/lib/plugins/custom-page/index.tsx +0 -22
  592. package/src/lib/plugins/markdown/generateRoutes.tsx +0 -35
  593. package/src/lib/plugins/openapi/playground/Editor.tsx +0 -4
  594. package/src/lib/plugins/openapi/util/urql.ts +0 -8
  595. package/src/lib/util/slugify.ts +0 -3
  596. /package/dist/lib/{components → ui}/Dialog.d.ts +0 -0
  597. /package/dist/lib/{components → ui}/Select.d.ts +0 -0
  598. /package/dist/lib/{components → ui}/Select.js +0 -0
  599. /package/src/lib/{components → ui}/Select.tsx +0 -0
@@ -0,0 +1,1222 @@
1
+ var _e = (t) => {
2
+ throw TypeError(t);
3
+ };
4
+ var be = (t, e, s) => e.has(t) || _e("Cannot " + s);
5
+ var i = (t, e, s) => (be(t, e, "read from private field"), s ? s.call(t) : e.get(t)), y = (t, e, s) => e.has(t) ? _e("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), c = (t, e, s, r) => (be(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), b = (t, e, s) => (be(t, e, "access private method"), s);
6
+ import * as I from "react";
7
+ import { createContext as dt, useContext as ft } from "react";
8
+ import { j as yt } from "./jsx-runtime-B6kdoens.js";
9
+ import { u as pe } from "./index-CRo94sKK.js";
10
+ import { b as pt } from "./router-BsfSoK2j.js";
11
+ var ke = class {
12
+ constructor() {
13
+ this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
14
+ }
15
+ subscribe(t) {
16
+ return this.listeners.add(t), this.onSubscribe(), () => {
17
+ this.listeners.delete(t), this.onUnsubscribe();
18
+ };
19
+ }
20
+ hasListeners() {
21
+ return this.listeners.size > 0;
22
+ }
23
+ onSubscribe() {
24
+ }
25
+ onUnsubscribe() {
26
+ }
27
+ }, V = typeof window > "u" || "Deno" in globalThis;
28
+ function ge() {
29
+ }
30
+ function Jt(t, e) {
31
+ return typeof t == "function" ? t(e) : t;
32
+ }
33
+ function Ce(t) {
34
+ return typeof t == "number" && t >= 0 && t !== 1 / 0;
35
+ }
36
+ function Ye(t, e) {
37
+ return Math.max(t + (e || 0) - Date.now(), 0);
38
+ }
39
+ function fe(t, e) {
40
+ return typeof t == "function" ? t(e) : t;
41
+ }
42
+ function q(t, e) {
43
+ return typeof t == "function" ? t(e) : t;
44
+ }
45
+ function Zt(t, e) {
46
+ const {
47
+ type: s = "all",
48
+ exact: r,
49
+ fetchStatus: n,
50
+ predicate: u,
51
+ queryKey: a,
52
+ stale: o
53
+ } = t;
54
+ if (a) {
55
+ if (r) {
56
+ if (e.queryHash !== vt(a, e.options))
57
+ return !1;
58
+ } else if (!Qe(e.queryKey, a))
59
+ return !1;
60
+ }
61
+ if (s !== "all") {
62
+ const l = e.isActive();
63
+ if (s === "active" && !l || s === "inactive" && l)
64
+ return !1;
65
+ }
66
+ return !(typeof o == "boolean" && e.isStale() !== o || n && n !== e.state.fetchStatus || u && !u(e));
67
+ }
68
+ function Xt(t, e) {
69
+ const { exact: s, status: r, predicate: n, mutationKey: u } = t;
70
+ if (u) {
71
+ if (!e.options.mutationKey)
72
+ return !1;
73
+ if (s) {
74
+ if (Se(e.options.mutationKey) !== Se(u))
75
+ return !1;
76
+ } else if (!Qe(e.options.mutationKey, u))
77
+ return !1;
78
+ }
79
+ return !(r && e.state.status !== r || n && !n(e));
80
+ }
81
+ function vt(t, e) {
82
+ return ((e == null ? void 0 : e.queryKeyHashFn) || Se)(t);
83
+ }
84
+ function Se(t) {
85
+ return JSON.stringify(
86
+ t,
87
+ (e, s) => Ee(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
88
+ );
89
+ }
90
+ function Qe(t, e) {
91
+ 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;
92
+ }
93
+ function Re(t, e) {
94
+ if (t === e)
95
+ return t;
96
+ const s = He(t) && He(e);
97
+ if (s || Ee(t) && Ee(e)) {
98
+ const r = s ? t : Object.keys(t), n = r.length, u = s ? e : Object.keys(e), a = u.length, o = s ? [] : {};
99
+ let l = 0;
100
+ for (let C = 0; C < a; C++) {
101
+ const v = s ? C : u[C];
102
+ (!s && r.includes(v) || s) && t[v] === void 0 && e[v] === void 0 ? (o[v] = void 0, l++) : (o[v] = Re(t[v], e[v]), o[v] === t[v] && t[v] !== void 0 && l++);
103
+ }
104
+ return n === a && l === n ? t : o;
105
+ }
106
+ return e;
107
+ }
108
+ function we(t, e) {
109
+ if (!e || Object.keys(t).length !== Object.keys(e).length)
110
+ return !1;
111
+ for (const s in t)
112
+ if (t[s] !== e[s])
113
+ return !1;
114
+ return !0;
115
+ }
116
+ function He(t) {
117
+ return Array.isArray(t) && t.length === Object.keys(t).length;
118
+ }
119
+ function Ee(t) {
120
+ if (!Be(t))
121
+ return !1;
122
+ const e = t.constructor;
123
+ if (e === void 0)
124
+ return !0;
125
+ const s = e.prototype;
126
+ return !(!Be(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
127
+ }
128
+ function Be(t) {
129
+ return Object.prototype.toString.call(t) === "[object Object]";
130
+ }
131
+ function bt(t) {
132
+ return new Promise((e) => {
133
+ setTimeout(e, t);
134
+ });
135
+ }
136
+ function Oe(t, e, s) {
137
+ if (typeof s.structuralSharing == "function")
138
+ return s.structuralSharing(t, e);
139
+ if (s.structuralSharing !== !1) {
140
+ if (process.env.NODE_ENV !== "production")
141
+ try {
142
+ return Re(t, e);
143
+ } catch (r) {
144
+ console.error(
145
+ `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}`
146
+ );
147
+ }
148
+ return Re(t, e);
149
+ }
150
+ return e;
151
+ }
152
+ function Yt(t, e, s = 0) {
153
+ const r = [...t, e];
154
+ return s && r.length > s ? r.slice(1) : r;
155
+ }
156
+ function es(t, e, s = 0) {
157
+ const r = [e, ...t];
158
+ return s && r.length > s ? r.slice(0, -1) : r;
159
+ }
160
+ var ye = Symbol();
161
+ function mt(t, e) {
162
+ return process.env.NODE_ENV !== "production" && t.queryFn === ye && console.error(
163
+ `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
164
+ ), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === ye ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
165
+ }
166
+ var K, Q, Z, $e, gt = ($e = class extends ke {
167
+ constructor() {
168
+ super();
169
+ y(this, K);
170
+ y(this, Q);
171
+ y(this, Z);
172
+ c(this, Z, (e) => {
173
+ if (!V && window.addEventListener) {
174
+ const s = () => e();
175
+ return window.addEventListener("visibilitychange", s, !1), () => {
176
+ window.removeEventListener("visibilitychange", s);
177
+ };
178
+ }
179
+ });
180
+ }
181
+ onSubscribe() {
182
+ i(this, Q) || this.setEventListener(i(this, Z));
183
+ }
184
+ onUnsubscribe() {
185
+ var e;
186
+ this.hasListeners() || ((e = i(this, Q)) == null || e.call(this), c(this, Q, void 0));
187
+ }
188
+ setEventListener(e) {
189
+ var s;
190
+ c(this, Z, e), (s = i(this, Q)) == null || s.call(this), c(this, Q, e((r) => {
191
+ typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
192
+ }));
193
+ }
194
+ setFocused(e) {
195
+ i(this, K) !== e && (c(this, K, e), this.onFocus());
196
+ }
197
+ onFocus() {
198
+ const e = this.isFocused();
199
+ this.listeners.forEach((s) => {
200
+ s(e);
201
+ });
202
+ }
203
+ isFocused() {
204
+ var e;
205
+ return typeof i(this, K) == "boolean" ? i(this, K) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
206
+ }
207
+ }, K = new WeakMap(), Q = new WeakMap(), Z = new WeakMap(), $e), et = new gt(), X, A, Y, We, Ct = (We = class extends ke {
208
+ constructor() {
209
+ super();
210
+ y(this, X, !0);
211
+ y(this, A);
212
+ y(this, Y);
213
+ c(this, Y, (e) => {
214
+ if (!V && window.addEventListener) {
215
+ const s = () => e(!0), r = () => e(!1);
216
+ return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
217
+ window.removeEventListener("online", s), window.removeEventListener("offline", r);
218
+ };
219
+ }
220
+ });
221
+ }
222
+ onSubscribe() {
223
+ i(this, A) || this.setEventListener(i(this, Y));
224
+ }
225
+ onUnsubscribe() {
226
+ var e;
227
+ this.hasListeners() || ((e = i(this, A)) == null || e.call(this), c(this, A, void 0));
228
+ }
229
+ setEventListener(e) {
230
+ var s;
231
+ c(this, Y, e), (s = i(this, A)) == null || s.call(this), c(this, A, e(this.setOnline.bind(this)));
232
+ }
233
+ setOnline(e) {
234
+ i(this, X) !== e && (c(this, X, e), this.listeners.forEach((r) => {
235
+ r(e);
236
+ }));
237
+ }
238
+ isOnline() {
239
+ return i(this, X);
240
+ }
241
+ }, X = new WeakMap(), A = new WeakMap(), Y = new WeakMap(), We), tt = new Ct();
242
+ function Fe() {
243
+ let t, e;
244
+ const s = new Promise((n, u) => {
245
+ t = n, e = u;
246
+ });
247
+ s.status = "pending", s.catch(() => {
248
+ });
249
+ function r(n) {
250
+ Object.assign(s, n), delete s.resolve, delete s.reject;
251
+ }
252
+ return s.resolve = (n) => {
253
+ r({
254
+ status: "fulfilled",
255
+ value: n
256
+ }), t(n);
257
+ }, s.reject = (n) => {
258
+ r({
259
+ status: "rejected",
260
+ reason: n
261
+ }), e(n);
262
+ }, s;
263
+ }
264
+ function St(t) {
265
+ return Math.min(1e3 * 2 ** t, 3e4);
266
+ }
267
+ function st(t) {
268
+ return (t ?? "online") === "online" ? tt.isOnline() : !0;
269
+ }
270
+ var rt = class extends Error {
271
+ constructor(t) {
272
+ super("CancelledError"), this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
273
+ }
274
+ };
275
+ function me(t) {
276
+ return t instanceof rt;
277
+ }
278
+ function Rt(t) {
279
+ let e = !1, s = 0, r = !1, n;
280
+ const u = Fe(), a = (f) => {
281
+ var g;
282
+ r || (m(new rt(f)), (g = t.abort) == null || g.call(t));
283
+ }, o = () => {
284
+ e = !0;
285
+ }, l = () => {
286
+ e = !1;
287
+ }, C = () => et.isFocused() && (t.networkMode === "always" || tt.isOnline()) && t.canRun(), v = () => st(t.networkMode) && t.canRun(), h = (f) => {
288
+ var g;
289
+ r || (r = !0, (g = t.onSuccess) == null || g.call(t, f), n == null || n(), u.resolve(f));
290
+ }, m = (f) => {
291
+ var g;
292
+ r || (r = !0, (g = t.onError) == null || g.call(t, f), n == null || n(), u.reject(f));
293
+ }, S = () => new Promise((f) => {
294
+ var g;
295
+ n = (P) => {
296
+ (r || C()) && f(P);
297
+ }, (g = t.onPause) == null || g.call(t);
298
+ }).then(() => {
299
+ var f;
300
+ n = void 0, r || (f = t.onContinue) == null || f.call(t);
301
+ }), w = () => {
302
+ if (r)
303
+ return;
304
+ let f;
305
+ const g = s === 0 ? t.initialPromise : void 0;
306
+ try {
307
+ f = g ?? t.fn();
308
+ } catch (P) {
309
+ f = Promise.reject(P);
310
+ }
311
+ Promise.resolve(f).then(h).catch((P) => {
312
+ var ve;
313
+ if (r)
314
+ return;
315
+ const U = t.retry ?? (V ? 0 : 3), N = t.retryDelay ?? St, ce = typeof N == "function" ? N(s, P) : N, le = U === !0 || typeof U == "number" && s < U || typeof U == "function" && U(s, P);
316
+ if (e || !le) {
317
+ m(P);
318
+ return;
319
+ }
320
+ s++, (ve = t.onFail) == null || ve.call(t, s, P), bt(ce).then(() => C() ? void 0 : S()).then(() => {
321
+ e ? m(P) : w();
322
+ });
323
+ });
324
+ };
325
+ return {
326
+ promise: u,
327
+ cancel: a,
328
+ continue: () => (n == null || n(), u),
329
+ cancelRetry: o,
330
+ continueRetry: l,
331
+ canStart: v,
332
+ start: () => (v() ? w() : S().then(w), u)
333
+ };
334
+ }
335
+ function wt() {
336
+ let t = [], e = 0, s = (o) => {
337
+ o();
338
+ }, r = (o) => {
339
+ o();
340
+ }, n = (o) => setTimeout(o, 0);
341
+ const u = (o) => {
342
+ e ? t.push(o) : n(() => {
343
+ s(o);
344
+ });
345
+ }, a = () => {
346
+ const o = t;
347
+ t = [], o.length && n(() => {
348
+ r(() => {
349
+ o.forEach((l) => {
350
+ s(l);
351
+ });
352
+ });
353
+ });
354
+ };
355
+ return {
356
+ batch: (o) => {
357
+ let l;
358
+ e++;
359
+ try {
360
+ l = o();
361
+ } finally {
362
+ e--, e || a();
363
+ }
364
+ return l;
365
+ },
366
+ /**
367
+ * All calls to the wrapped function will be batched.
368
+ */
369
+ batchCalls: (o) => (...l) => {
370
+ u(() => {
371
+ o(...l);
372
+ });
373
+ },
374
+ schedule: u,
375
+ /**
376
+ * Use this method to set a custom notify function.
377
+ * This can be used to for example wrap notifications with `React.act` while running tests.
378
+ */
379
+ setNotifyFunction: (o) => {
380
+ s = o;
381
+ },
382
+ /**
383
+ * Use this method to set a custom function to batch notifications together into a single tick.
384
+ * By default React Query will use the batch function provided by ReactDOM or React Native.
385
+ */
386
+ setBatchNotifyFunction: (o) => {
387
+ r = o;
388
+ },
389
+ setScheduler: (o) => {
390
+ n = o;
391
+ }
392
+ };
393
+ }
394
+ var Ae = wt(), _, Je, Et = (Je = class {
395
+ constructor() {
396
+ y(this, _);
397
+ }
398
+ destroy() {
399
+ this.clearGcTimeout();
400
+ }
401
+ scheduleGc() {
402
+ this.clearGcTimeout(), Ce(this.gcTime) && c(this, _, setTimeout(() => {
403
+ this.optionalRemove();
404
+ }, this.gcTime));
405
+ }
406
+ updateGcTime(t) {
407
+ this.gcTime = Math.max(
408
+ this.gcTime || 0,
409
+ t ?? (V ? 1 / 0 : 5 * 60 * 1e3)
410
+ );
411
+ }
412
+ clearGcTimeout() {
413
+ i(this, _) && (clearTimeout(i(this, _)), c(this, _, void 0));
414
+ }
415
+ }, _ = new WeakMap(), Je), ee, te, D, R, oe, H, T, k, Ze, ts = (Ze = class extends Et {
416
+ constructor(e) {
417
+ super();
418
+ y(this, T);
419
+ y(this, ee);
420
+ y(this, te);
421
+ y(this, D);
422
+ y(this, R);
423
+ y(this, oe);
424
+ y(this, H);
425
+ c(this, H, !1), c(this, oe, e.defaultOptions), this.setOptions(e.options), this.observers = [], c(this, D, e.cache), this.queryKey = e.queryKey, this.queryHash = e.queryHash, c(this, ee, Ot(this.options)), this.state = e.state ?? i(this, ee), this.scheduleGc();
426
+ }
427
+ get meta() {
428
+ return this.options.meta;
429
+ }
430
+ get promise() {
431
+ var e;
432
+ return (e = i(this, R)) == null ? void 0 : e.promise;
433
+ }
434
+ setOptions(e) {
435
+ this.options = { ...i(this, oe), ...e }, this.updateGcTime(this.options.gcTime);
436
+ }
437
+ optionalRemove() {
438
+ !this.observers.length && this.state.fetchStatus === "idle" && i(this, D).remove(this);
439
+ }
440
+ setData(e, s) {
441
+ const r = Oe(this.state.data, e, this.options);
442
+ return b(this, T, k).call(this, {
443
+ data: r,
444
+ type: "success",
445
+ dataUpdatedAt: s == null ? void 0 : s.updatedAt,
446
+ manual: s == null ? void 0 : s.manual
447
+ }), r;
448
+ }
449
+ setState(e, s) {
450
+ b(this, T, k).call(this, { type: "setState", state: e, setStateOptions: s });
451
+ }
452
+ cancel(e) {
453
+ var r, n;
454
+ const s = (r = i(this, R)) == null ? void 0 : r.promise;
455
+ return (n = i(this, R)) == null || n.cancel(e), s ? s.then(ge).catch(ge) : Promise.resolve();
456
+ }
457
+ destroy() {
458
+ super.destroy(), this.cancel({ silent: !0 });
459
+ }
460
+ reset() {
461
+ this.destroy(), this.setState(i(this, ee));
462
+ }
463
+ isActive() {
464
+ return this.observers.some(
465
+ (e) => q(e.options.enabled, this) !== !1
466
+ );
467
+ }
468
+ isDisabled() {
469
+ return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === ye || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
470
+ }
471
+ isStale() {
472
+ return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
473
+ (e) => e.getCurrentResult().isStale
474
+ ) : this.state.data === void 0;
475
+ }
476
+ isStaleByTime(e = 0) {
477
+ return this.state.isInvalidated || this.state.data === void 0 || !Ye(this.state.dataUpdatedAt, e);
478
+ }
479
+ onFocus() {
480
+ var s;
481
+ const e = this.observers.find((r) => r.shouldFetchOnWindowFocus());
482
+ e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this, R)) == null || s.continue();
483
+ }
484
+ onOnline() {
485
+ var s;
486
+ const e = this.observers.find((r) => r.shouldFetchOnReconnect());
487
+ e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this, R)) == null || s.continue();
488
+ }
489
+ addObserver(e) {
490
+ this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), i(this, D).notify({ type: "observerAdded", query: this, observer: e }));
491
+ }
492
+ removeObserver(e) {
493
+ this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (i(this, R) && (i(this, H) ? i(this, R).cancel({ revert: !0 }) : i(this, R).cancelRetry()), this.scheduleGc()), i(this, D).notify({ type: "observerRemoved", query: this, observer: e }));
494
+ }
495
+ getObserversCount() {
496
+ return this.observers.length;
497
+ }
498
+ invalidate() {
499
+ this.state.isInvalidated || b(this, T, k).call(this, { type: "invalidate" });
500
+ }
501
+ fetch(e, s) {
502
+ var l, C, v;
503
+ if (this.state.fetchStatus !== "idle") {
504
+ if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
505
+ this.cancel({ silent: !0 });
506
+ else if (i(this, R))
507
+ return i(this, R).continueRetry(), i(this, R).promise;
508
+ }
509
+ if (e && this.setOptions(e), !this.options.queryFn) {
510
+ const h = this.observers.find((m) => m.options.queryFn);
511
+ h && this.setOptions(h.options);
512
+ }
513
+ process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
514
+ "As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"
515
+ ));
516
+ const r = new AbortController(), n = (h) => {
517
+ Object.defineProperty(h, "signal", {
518
+ enumerable: !0,
519
+ get: () => (c(this, H, !0), r.signal)
520
+ });
521
+ }, u = () => {
522
+ const h = mt(this.options, s), m = {
523
+ queryKey: this.queryKey,
524
+ meta: this.meta
525
+ };
526
+ return n(m), c(this, H, !1), this.options.persister ? this.options.persister(
527
+ h,
528
+ m,
529
+ this
530
+ ) : h(m);
531
+ }, a = {
532
+ fetchOptions: s,
533
+ options: this.options,
534
+ queryKey: this.queryKey,
535
+ state: this.state,
536
+ fetchFn: u
537
+ };
538
+ n(a), (l = this.options.behavior) == null || l.onFetch(
539
+ a,
540
+ this
541
+ ), c(this, te, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((C = a.fetchOptions) == null ? void 0 : C.meta)) && b(this, T, k).call(this, { type: "fetch", meta: (v = a.fetchOptions) == null ? void 0 : v.meta });
542
+ const o = (h) => {
543
+ var m, S, w, f;
544
+ me(h) && h.silent || b(this, T, k).call(this, {
545
+ type: "error",
546
+ error: h
547
+ }), me(h) || ((S = (m = i(this, D).config).onError) == null || S.call(
548
+ m,
549
+ h,
550
+ this
551
+ ), (f = (w = i(this, D).config).onSettled) == null || f.call(
552
+ w,
553
+ this.state.data,
554
+ h,
555
+ this
556
+ )), this.scheduleGc();
557
+ };
558
+ return c(this, R, Rt({
559
+ initialPromise: s == null ? void 0 : s.initialPromise,
560
+ fn: a.fetchFn,
561
+ abort: r.abort.bind(r),
562
+ onSuccess: (h) => {
563
+ var m, S, w, f;
564
+ if (h === void 0) {
565
+ process.env.NODE_ENV !== "production" && console.error(
566
+ `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
567
+ ), o(new Error(`${this.queryHash} data is undefined`));
568
+ return;
569
+ }
570
+ try {
571
+ this.setData(h);
572
+ } catch (g) {
573
+ o(g);
574
+ return;
575
+ }
576
+ (S = (m = i(this, D).config).onSuccess) == null || S.call(m, h, this), (f = (w = i(this, D).config).onSettled) == null || f.call(
577
+ w,
578
+ h,
579
+ this.state.error,
580
+ this
581
+ ), this.scheduleGc();
582
+ },
583
+ onError: o,
584
+ onFail: (h, m) => {
585
+ b(this, T, k).call(this, { type: "failed", failureCount: h, error: m });
586
+ },
587
+ onPause: () => {
588
+ b(this, T, k).call(this, { type: "pause" });
589
+ },
590
+ onContinue: () => {
591
+ b(this, T, k).call(this, { type: "continue" });
592
+ },
593
+ retry: a.options.retry,
594
+ retryDelay: a.options.retryDelay,
595
+ networkMode: a.options.networkMode,
596
+ canRun: () => !0
597
+ })), i(this, R).start();
598
+ }
599
+ }, ee = new WeakMap(), te = new WeakMap(), D = new WeakMap(), R = new WeakMap(), oe = new WeakMap(), H = new WeakMap(), T = new WeakSet(), k = function(e) {
600
+ const s = (r) => {
601
+ switch (e.type) {
602
+ case "failed":
603
+ return {
604
+ ...r,
605
+ fetchFailureCount: e.failureCount,
606
+ fetchFailureReason: e.error
607
+ };
608
+ case "pause":
609
+ return {
610
+ ...r,
611
+ fetchStatus: "paused"
612
+ };
613
+ case "continue":
614
+ return {
615
+ ...r,
616
+ fetchStatus: "fetching"
617
+ };
618
+ case "fetch":
619
+ return {
620
+ ...r,
621
+ ...it(r.data, this.options),
622
+ fetchMeta: e.meta ?? null
623
+ };
624
+ case "success":
625
+ return {
626
+ ...r,
627
+ data: e.data,
628
+ dataUpdateCount: r.dataUpdateCount + 1,
629
+ dataUpdatedAt: e.dataUpdatedAt ?? Date.now(),
630
+ error: null,
631
+ isInvalidated: !1,
632
+ status: "success",
633
+ ...!e.manual && {
634
+ fetchStatus: "idle",
635
+ fetchFailureCount: 0,
636
+ fetchFailureReason: null
637
+ }
638
+ };
639
+ case "error":
640
+ const n = e.error;
641
+ return me(n) && n.revert && i(this, te) ? { ...i(this, te), fetchStatus: "idle" } : {
642
+ ...r,
643
+ error: n,
644
+ errorUpdateCount: r.errorUpdateCount + 1,
645
+ errorUpdatedAt: Date.now(),
646
+ fetchFailureCount: r.fetchFailureCount + 1,
647
+ fetchFailureReason: n,
648
+ fetchStatus: "idle",
649
+ status: "error"
650
+ };
651
+ case "invalidate":
652
+ return {
653
+ ...r,
654
+ isInvalidated: !0
655
+ };
656
+ case "setState":
657
+ return {
658
+ ...r,
659
+ ...e.state
660
+ };
661
+ }
662
+ };
663
+ this.state = s(this.state), Ae.batch(() => {
664
+ this.observers.forEach((r) => {
665
+ r.onQueryUpdate();
666
+ }), i(this, D).notify({ query: this, type: "updated", action: e });
667
+ });
668
+ }, Ze);
669
+ function it(t, e) {
670
+ return {
671
+ fetchFailureCount: 0,
672
+ fetchFailureReason: null,
673
+ fetchStatus: st(e.networkMode) ? "fetching" : "paused",
674
+ ...t === void 0 && {
675
+ error: null,
676
+ status: "pending"
677
+ }
678
+ };
679
+ }
680
+ function Ot(t) {
681
+ 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;
682
+ return {
683
+ data: e,
684
+ dataUpdateCount: 0,
685
+ dataUpdatedAt: s ? r ?? Date.now() : 0,
686
+ error: null,
687
+ errorUpdateCount: 0,
688
+ errorUpdatedAt: 0,
689
+ fetchFailureCount: 0,
690
+ fetchFailureReason: null,
691
+ fetchMeta: null,
692
+ isInvalidated: !1,
693
+ status: s ? "success" : "pending",
694
+ fetchStatus: "idle"
695
+ };
696
+ }
697
+ var F, d, ue, O, B, se, L, x, he, re, ie, G, z, M, ne, p, ae, Pe, De, Ie, Te, qe, je, xe, at, Xe, nt = (Xe = class extends ke {
698
+ constructor(e, s) {
699
+ super();
700
+ y(this, p);
701
+ y(this, F);
702
+ y(this, d);
703
+ y(this, ue);
704
+ y(this, O);
705
+ y(this, B);
706
+ y(this, se);
707
+ y(this, L);
708
+ y(this, x);
709
+ y(this, he);
710
+ y(this, re);
711
+ // This property keeps track of the last query with defined data.
712
+ // It will be used to pass the previous data and query to the placeholder function between renders.
713
+ y(this, ie);
714
+ y(this, G);
715
+ y(this, z);
716
+ y(this, M);
717
+ y(this, ne, /* @__PURE__ */ new Set());
718
+ this.options = s, c(this, F, e), c(this, x, null), c(this, L, Fe()), this.options.experimental_prefetchInRender || i(this, L).reject(
719
+ new Error("experimental_prefetchInRender feature flag is not enabled")
720
+ ), this.bindMethods(), this.setOptions(s);
721
+ }
722
+ bindMethods() {
723
+ this.refetch = this.refetch.bind(this);
724
+ }
725
+ onSubscribe() {
726
+ this.listeners.size === 1 && (i(this, d).addObserver(this), Ge(i(this, d), this.options) ? b(this, p, ae).call(this) : this.updateResult(), b(this, p, Te).call(this));
727
+ }
728
+ onUnsubscribe() {
729
+ this.hasListeners() || this.destroy();
730
+ }
731
+ shouldFetchOnReconnect() {
732
+ return Ue(
733
+ i(this, d),
734
+ this.options,
735
+ this.options.refetchOnReconnect
736
+ );
737
+ }
738
+ shouldFetchOnWindowFocus() {
739
+ return Ue(
740
+ i(this, d),
741
+ this.options,
742
+ this.options.refetchOnWindowFocus
743
+ );
744
+ }
745
+ destroy() {
746
+ this.listeners = /* @__PURE__ */ new Set(), b(this, p, qe).call(this), b(this, p, je).call(this), i(this, d).removeObserver(this);
747
+ }
748
+ setOptions(e, s) {
749
+ const r = this.options, n = i(this, d);
750
+ if (this.options = i(this, F).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof q(this.options.enabled, i(this, d)) != "boolean")
751
+ throw new Error(
752
+ "Expected enabled to be a boolean or a callback that returns a boolean"
753
+ );
754
+ b(this, p, xe).call(this), i(this, d).setOptions(this.options), r._defaulted && !we(this.options, r) && i(this, F).getQueryCache().notify({
755
+ type: "observerOptionsUpdated",
756
+ query: i(this, d),
757
+ observer: this
758
+ });
759
+ const u = this.hasListeners();
760
+ u && ze(
761
+ i(this, d),
762
+ n,
763
+ this.options,
764
+ r
765
+ ) && b(this, p, ae).call(this), this.updateResult(s), u && (i(this, d) !== n || q(this.options.enabled, i(this, d)) !== q(r.enabled, i(this, d)) || fe(this.options.staleTime, i(this, d)) !== fe(r.staleTime, i(this, d))) && b(this, p, Pe).call(this);
766
+ const a = b(this, p, De).call(this);
767
+ u && (i(this, d) !== n || q(this.options.enabled, i(this, d)) !== q(r.enabled, i(this, d)) || a !== i(this, M)) && b(this, p, Ie).call(this, a);
768
+ }
769
+ getOptimisticResult(e) {
770
+ const s = i(this, F).getQueryCache().build(i(this, F), e), r = this.createResult(s, e);
771
+ return Pt(this, r) && (c(this, O, r), c(this, se, this.options), c(this, B, i(this, d).state)), r;
772
+ }
773
+ getCurrentResult() {
774
+ return i(this, O);
775
+ }
776
+ trackResult(e, s) {
777
+ const r = {};
778
+ return Object.keys(e).forEach((n) => {
779
+ Object.defineProperty(r, n, {
780
+ configurable: !1,
781
+ enumerable: !0,
782
+ get: () => (this.trackProp(n), s == null || s(n), e[n])
783
+ });
784
+ }), r;
785
+ }
786
+ trackProp(e) {
787
+ i(this, ne).add(e);
788
+ }
789
+ getCurrentQuery() {
790
+ return i(this, d);
791
+ }
792
+ refetch({ ...e } = {}) {
793
+ return this.fetch({
794
+ ...e
795
+ });
796
+ }
797
+ fetchOptimistic(e) {
798
+ const s = i(this, F).defaultQueryOptions(e), r = i(this, F).getQueryCache().build(i(this, F), s);
799
+ return r.fetch().then(() => this.createResult(r, s));
800
+ }
801
+ fetch(e) {
802
+ return b(this, p, ae).call(this, {
803
+ ...e,
804
+ cancelRefetch: e.cancelRefetch ?? !0
805
+ }).then(() => (this.updateResult(), i(this, O)));
806
+ }
807
+ createResult(e, s) {
808
+ var Ke;
809
+ const r = i(this, d), n = this.options, u = i(this, O), a = i(this, B), o = i(this, se), C = e !== r ? e.state : i(this, ue), { state: v } = e;
810
+ let h = { ...v }, m = !1, S;
811
+ if (s._optimisticResults) {
812
+ const E = this.hasListeners(), W = !E && Ge(e, s), J = E && ze(e, r, s, n);
813
+ (W || J) && (h = {
814
+ ...h,
815
+ ...it(v.data, e.options)
816
+ }), s._optimisticResults === "isRestoring" && (h.fetchStatus = "idle");
817
+ }
818
+ let { error: w, errorUpdatedAt: f, status: g } = h;
819
+ if (s.select && h.data !== void 0)
820
+ if (u && h.data === (a == null ? void 0 : a.data) && s.select === i(this, he))
821
+ S = i(this, re);
822
+ else
823
+ try {
824
+ c(this, he, s.select), S = s.select(h.data), S = Oe(u == null ? void 0 : u.data, S, s), c(this, re, S), c(this, x, null);
825
+ } catch (E) {
826
+ c(this, x, E);
827
+ }
828
+ else
829
+ S = h.data;
830
+ if (s.placeholderData !== void 0 && S === void 0 && g === "pending") {
831
+ let E;
832
+ if (u != null && u.isPlaceholderData && s.placeholderData === (o == null ? void 0 : o.placeholderData))
833
+ E = u.data;
834
+ else if (E = typeof s.placeholderData == "function" ? s.placeholderData(
835
+ (Ke = i(this, ie)) == null ? void 0 : Ke.state.data,
836
+ i(this, ie)
837
+ ) : s.placeholderData, s.select && E !== void 0)
838
+ try {
839
+ E = s.select(E), c(this, x, null);
840
+ } catch (W) {
841
+ c(this, x, W);
842
+ }
843
+ E !== void 0 && (g = "success", S = Oe(
844
+ u == null ? void 0 : u.data,
845
+ E,
846
+ s
847
+ ), m = !0);
848
+ }
849
+ i(this, x) && (w = i(this, x), S = i(this, re), f = Date.now(), g = "error");
850
+ const P = h.fetchStatus === "fetching", U = g === "pending", N = g === "error", ce = U && P, le = S !== void 0, j = {
851
+ status: g,
852
+ fetchStatus: h.fetchStatus,
853
+ isPending: U,
854
+ isSuccess: g === "success",
855
+ isError: N,
856
+ isInitialLoading: ce,
857
+ isLoading: ce,
858
+ data: S,
859
+ dataUpdatedAt: h.dataUpdatedAt,
860
+ error: w,
861
+ errorUpdatedAt: f,
862
+ failureCount: h.fetchFailureCount,
863
+ failureReason: h.fetchFailureReason,
864
+ errorUpdateCount: h.errorUpdateCount,
865
+ isFetched: h.dataUpdateCount > 0 || h.errorUpdateCount > 0,
866
+ isFetchedAfterMount: h.dataUpdateCount > C.dataUpdateCount || h.errorUpdateCount > C.errorUpdateCount,
867
+ isFetching: P,
868
+ isRefetching: P && !U,
869
+ isLoadingError: N && !le,
870
+ isPaused: h.fetchStatus === "paused",
871
+ isPlaceholderData: m,
872
+ isRefetchError: N && le,
873
+ isStale: Le(e, s),
874
+ refetch: this.refetch,
875
+ promise: i(this, L)
876
+ };
877
+ if (this.options.experimental_prefetchInRender) {
878
+ const E = (de) => {
879
+ j.status === "error" ? de.reject(j.error) : j.data !== void 0 && de.resolve(j.data);
880
+ }, W = () => {
881
+ const de = c(this, L, j.promise = Fe());
882
+ E(de);
883
+ }, J = i(this, L);
884
+ switch (J.status) {
885
+ case "pending":
886
+ e.queryHash === r.queryHash && E(J);
887
+ break;
888
+ case "fulfilled":
889
+ (j.status === "error" || j.data !== J.value) && W();
890
+ break;
891
+ case "rejected":
892
+ (j.status !== "error" || j.error !== J.reason) && W();
893
+ break;
894
+ }
895
+ }
896
+ return j;
897
+ }
898
+ updateResult(e) {
899
+ const s = i(this, O), r = this.createResult(i(this, d), this.options);
900
+ if (c(this, B, i(this, d).state), c(this, se, this.options), i(this, B).data !== void 0 && c(this, ie, i(this, d)), we(r, s))
901
+ return;
902
+ c(this, O, r);
903
+ const n = {}, u = () => {
904
+ if (!s)
905
+ return !0;
906
+ const { notifyOnChangeProps: a } = this.options, o = typeof a == "function" ? a() : a;
907
+ if (o === "all" || !o && !i(this, ne).size)
908
+ return !0;
909
+ const l = new Set(
910
+ o ?? i(this, ne)
911
+ );
912
+ return this.options.throwOnError && l.add("error"), Object.keys(i(this, O)).some((C) => {
913
+ const v = C;
914
+ return i(this, O)[v] !== s[v] && l.has(v);
915
+ });
916
+ };
917
+ (e == null ? void 0 : e.listeners) !== !1 && u() && (n.listeners = !0), b(this, p, at).call(this, { ...n, ...e });
918
+ }
919
+ onQueryUpdate() {
920
+ this.updateResult(), this.hasListeners() && b(this, p, Te).call(this);
921
+ }
922
+ }, F = new WeakMap(), d = new WeakMap(), ue = new WeakMap(), O = new WeakMap(), B = new WeakMap(), se = new WeakMap(), L = new WeakMap(), x = new WeakMap(), he = new WeakMap(), re = new WeakMap(), ie = new WeakMap(), G = new WeakMap(), z = new WeakMap(), M = new WeakMap(), ne = new WeakMap(), p = new WeakSet(), ae = function(e) {
923
+ b(this, p, xe).call(this);
924
+ let s = i(this, d).fetch(
925
+ this.options,
926
+ e
927
+ );
928
+ return e != null && e.throwOnError || (s = s.catch(ge)), s;
929
+ }, Pe = function() {
930
+ b(this, p, qe).call(this);
931
+ const e = fe(
932
+ this.options.staleTime,
933
+ i(this, d)
934
+ );
935
+ if (V || i(this, O).isStale || !Ce(e))
936
+ return;
937
+ const r = Ye(i(this, O).dataUpdatedAt, e) + 1;
938
+ c(this, G, setTimeout(() => {
939
+ i(this, O).isStale || this.updateResult();
940
+ }, r));
941
+ }, De = function() {
942
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(i(this, d)) : this.options.refetchInterval) ?? !1;
943
+ }, Ie = function(e) {
944
+ b(this, p, je).call(this), c(this, M, e), !(V || q(this.options.enabled, i(this, d)) === !1 || !Ce(i(this, M)) || i(this, M) === 0) && c(this, z, setInterval(() => {
945
+ (this.options.refetchIntervalInBackground || et.isFocused()) && b(this, p, ae).call(this);
946
+ }, i(this, M)));
947
+ }, Te = function() {
948
+ b(this, p, Pe).call(this), b(this, p, Ie).call(this, b(this, p, De).call(this));
949
+ }, qe = function() {
950
+ i(this, G) && (clearTimeout(i(this, G)), c(this, G, void 0));
951
+ }, je = function() {
952
+ i(this, z) && (clearInterval(i(this, z)), c(this, z, void 0));
953
+ }, xe = function() {
954
+ const e = i(this, F).getQueryCache().build(i(this, F), this.options);
955
+ if (e === i(this, d))
956
+ return;
957
+ const s = i(this, d);
958
+ c(this, d, e), c(this, ue, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
959
+ }, at = function(e) {
960
+ Ae.batch(() => {
961
+ e.listeners && this.listeners.forEach((s) => {
962
+ s(i(this, O));
963
+ }), i(this, F).getQueryCache().notify({
964
+ query: i(this, d),
965
+ type: "observerResultsUpdated"
966
+ });
967
+ });
968
+ }, Xe);
969
+ function Ft(t, e) {
970
+ return q(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
971
+ }
972
+ function Ge(t, e) {
973
+ return Ft(t, e) || t.state.data !== void 0 && Ue(t, e, e.refetchOnMount);
974
+ }
975
+ function Ue(t, e, s) {
976
+ if (q(e.enabled, t) !== !1) {
977
+ const r = typeof s == "function" ? s(t) : s;
978
+ return r === "always" || r !== !1 && Le(t, e);
979
+ }
980
+ return !1;
981
+ }
982
+ function ze(t, e, s, r) {
983
+ return (t !== e || q(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Le(t, s);
984
+ }
985
+ function Le(t, e) {
986
+ return q(e.enabled, t) !== !1 && t.isStaleByTime(fe(e.staleTime, t));
987
+ }
988
+ function Pt(t, e) {
989
+ return !we(t.getCurrentResult(), e);
990
+ }
991
+ var ot = I.createContext(
992
+ void 0
993
+ ), Dt = (t) => {
994
+ const e = I.useContext(ot);
995
+ if (!e)
996
+ throw new Error("No QueryClient set, use QueryClientProvider to set one");
997
+ return e;
998
+ }, ss = ({
999
+ client: t,
1000
+ children: e
1001
+ }) => (I.useEffect(() => (t.mount(), () => {
1002
+ t.unmount();
1003
+ }), [t]), /* @__PURE__ */ yt.jsx(ot.Provider, { value: t, children: e })), ut = I.createContext(!1), It = () => I.useContext(ut);
1004
+ ut.Provider;
1005
+ function Tt() {
1006
+ let t = !1;
1007
+ return {
1008
+ clearReset: () => {
1009
+ t = !1;
1010
+ },
1011
+ reset: () => {
1012
+ t = !0;
1013
+ },
1014
+ isReset: () => t
1015
+ };
1016
+ }
1017
+ var qt = I.createContext(Tt()), jt = () => I.useContext(qt);
1018
+ function xt(t, e) {
1019
+ return typeof t == "function" ? t(...e) : !!t;
1020
+ }
1021
+ function Ut() {
1022
+ }
1023
+ var kt = (t, e) => {
1024
+ (t.suspense || t.throwOnError) && (e.isReset() || (t.retryOnMount = !1));
1025
+ }, Qt = (t) => {
1026
+ I.useEffect(() => {
1027
+ t.clearReset();
1028
+ }, [t]);
1029
+ }, At = ({
1030
+ result: t,
1031
+ errorResetBoundary: e,
1032
+ throwOnError: s,
1033
+ query: r
1034
+ }) => t.isError && !e.isReset() && !t.isFetching && r && xt(s, [t.error, r]), Lt = (t, e) => e.state.data === void 0, Mt = (t) => {
1035
+ t.suspense && (typeof t.staleTime != "number" && (t.staleTime = 1e3), typeof t.gcTime == "number" && (t.gcTime = Math.max(t.gcTime, 1e3)));
1036
+ }, Nt = (t, e) => t.isLoading && t.isFetching && !e, Kt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, Ve = (t, e, s) => e.fetchOptimistic(t).catch(() => {
1037
+ s.clearReset();
1038
+ });
1039
+ function ht(t, e, s) {
1040
+ var v, h, m, S, w;
1041
+ if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
1042
+ throw new Error(
1043
+ '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'
1044
+ );
1045
+ const r = Dt(), n = It(), u = jt(), a = r.defaultQueryOptions(t);
1046
+ (h = (v = r.getDefaultOptions().queries) == null ? void 0 : v._experimental_beforeQuery) == null || h.call(
1047
+ v,
1048
+ a
1049
+ ), a._optimisticResults = n ? "isRestoring" : "optimistic", Mt(a), kt(a, u), Qt(u);
1050
+ const o = !r.getQueryCache().get(a.queryHash), [l] = I.useState(
1051
+ () => new e(
1052
+ r,
1053
+ a
1054
+ )
1055
+ ), C = l.getOptimisticResult(a);
1056
+ if (I.useSyncExternalStore(
1057
+ I.useCallback(
1058
+ (f) => {
1059
+ const g = n ? () => {
1060
+ } : l.subscribe(Ae.batchCalls(f));
1061
+ return l.updateResult(), g;
1062
+ },
1063
+ [l, n]
1064
+ ),
1065
+ () => l.getCurrentResult(),
1066
+ () => l.getCurrentResult()
1067
+ ), I.useEffect(() => {
1068
+ l.setOptions(a, { listeners: !1 });
1069
+ }, [a, l]), Kt(a, C))
1070
+ throw Ve(a, l, u);
1071
+ if (At({
1072
+ result: C,
1073
+ errorResetBoundary: u,
1074
+ throwOnError: a.throwOnError,
1075
+ query: r.getQueryCache().get(a.queryHash)
1076
+ }))
1077
+ throw C.error;
1078
+ if ((S = (m = r.getDefaultOptions().queries) == null ? void 0 : m._experimental_afterQuery) == null || S.call(
1079
+ m,
1080
+ a,
1081
+ C
1082
+ ), a.experimental_prefetchInRender && !V && Nt(C, n)) {
1083
+ const f = o ? (
1084
+ // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
1085
+ Ve(a, l, u)
1086
+ ) : (
1087
+ // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
1088
+ (w = r.getQueryCache().get(a.queryHash)) == null ? void 0 : w.promise
1089
+ );
1090
+ f == null || f.catch(Ut).finally(() => {
1091
+ l.hasListeners() || l.updateResult();
1092
+ });
1093
+ }
1094
+ return a.notifyOnChangeProps ? C : l.trackResult(C);
1095
+ }
1096
+ function _t(t, e) {
1097
+ return ht(t, nt);
1098
+ }
1099
+ function Ht(t, e) {
1100
+ return process.env.NODE_ENV !== "production" && t.queryFn === ye && console.error("skipToken is not allowed for useSuspenseQuery"), ht(
1101
+ {
1102
+ ...t,
1103
+ enabled: !0,
1104
+ suspense: !0,
1105
+ throwOnError: Lt,
1106
+ placeholderData: void 0
1107
+ },
1108
+ nt
1109
+ );
1110
+ }
1111
+ const $ = (...t) => {
1112
+ const e = t.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
1113
+ return e ? `/${e}` : "/";
1114
+ }, Me = (t, e) => {
1115
+ for (const s of t) {
1116
+ const r = Ne(s, e);
1117
+ if (r !== void 0) return r;
1118
+ }
1119
+ }, Ne = (t, e, s = []) => {
1120
+ const r = e(t, s);
1121
+ if (r !== void 0) return r;
1122
+ if (t.type === "category")
1123
+ for (const n of t.items) {
1124
+ const u = Ne(n, e, [
1125
+ ...s,
1126
+ t
1127
+ ]);
1128
+ if (u !== void 0) return u;
1129
+ }
1130
+ }, rs = () => {
1131
+ const t = pe(), s = lt().data.sidebar;
1132
+ return Me(s, (r) => {
1133
+ if (r.type === "doc" && $(r.id) === t.pathname)
1134
+ return r;
1135
+ });
1136
+ }, is = (t) => {
1137
+ const e = pe();
1138
+ return Ne(t, (s) => {
1139
+ if (s.type === "category" && s.link && $(s.link.id) === e.pathname || s.type === "doc" && $(s.id) === e.pathname)
1140
+ return !0;
1141
+ });
1142
+ }, ns = () => {
1143
+ const t = pe().pathname, s = lt().data.sidebar;
1144
+ let r, n, u = !1;
1145
+ return Me(s, (a) => {
1146
+ const o = a.type === "doc" ? $(a.id) : a.type === "category" && a.link ? $(a.link.id) : void 0;
1147
+ if (o) {
1148
+ if (u)
1149
+ return n = { label: a.label, id: o }, !0;
1150
+ t === o ? u = !0 : r = { label: a.label, id: o };
1151
+ }
1152
+ }), { prev: r, next: n };
1153
+ }, Bt = dt(
1154
+ void 0
1155
+ ), ct = () => {
1156
+ const t = ft(Bt);
1157
+ if (!t)
1158
+ throw new Error("useDevPortal must be used within a DevPortalProvider.");
1159
+ return t;
1160
+ }, as = () => {
1161
+ const { getApiIdentities: t } = ct();
1162
+ return _t({
1163
+ queryFn: t,
1164
+ queryKey: ["api-identities"]
1165
+ });
1166
+ }, lt = () => {
1167
+ const { getPluginSidebar: t, sidebars: e, topNavigation: s } = ct(), r = pe(), n = Object.entries(e).find(([, a]) => Me(a, (o) => {
1168
+ if ((o.type === "doc" ? $(o.id) : o.type === "category" && o.link ? $(o.link.id) : void 0) === r.pathname)
1169
+ return o;
1170
+ })), u = s.find((a) => a.id === (n == null ? void 0 : n[0])) ?? s.find((a) => pt(a.id, r.pathname));
1171
+ return Ht({
1172
+ queryFn: async () => {
1173
+ const a = await t(r.pathname);
1174
+ return {
1175
+ sidebar: [
1176
+ ...n ? n[1] : [],
1177
+ ...a
1178
+ ],
1179
+ topNavItem: u
1180
+ };
1181
+ },
1182
+ queryKey: ["navigation", r.pathname]
1183
+ });
1184
+ };
1185
+ export {
1186
+ Me as A,
1187
+ ss as B,
1188
+ is as C,
1189
+ as as D,
1190
+ _t as E,
1191
+ ts as Q,
1192
+ Et as R,
1193
+ ke as S,
1194
+ Bt as Z,
1195
+ rs as a,
1196
+ ns as b,
1197
+ Rt as c,
1198
+ Dt as d,
1199
+ Ut as e,
1200
+ xt as f,
1201
+ Ht as g,
1202
+ Se as h,
1203
+ vt as i,
1204
+ Xt as j,
1205
+ ge as k,
1206
+ mt as l,
1207
+ Zt as m,
1208
+ Ae as n,
1209
+ es as o,
1210
+ Yt as p,
1211
+ et as q,
1212
+ tt as r,
1213
+ we as s,
1214
+ fe as t,
1215
+ ct as u,
1216
+ Jt as v,
1217
+ Qe as w,
1218
+ ye as x,
1219
+ $ as y,
1220
+ lt as z
1221
+ };
1222
+ //# sourceMappingURL=ZudokuContext-BKXGJTmu.js.map