zudoku 0.3.0-dev.8 → 0.3.0-dev.80

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