zudoku 0.3.0-dev.7 → 0.3.0-dev.70
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.
- package/dist/app/App.d.ts +1 -2
- package/dist/app/App.js +1 -29
- package/dist/app/App.js.map +1 -1
- package/dist/app/demo.d.ts +2 -0
- package/dist/app/demo.js +32 -0
- package/dist/app/demo.js.map +1 -0
- package/dist/app/entry.client.d.ts +2 -0
- package/dist/app/entry.client.js +35 -0
- package/dist/app/entry.client.js.map +1 -0
- package/dist/app/entry.server.d.ts +14 -0
- package/dist/app/entry.server.js +105 -0
- package/dist/app/entry.server.js.map +1 -0
- package/dist/app/main.d.ts +6 -1
- package/dist/app/main.js +68 -12
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.d.ts +2 -0
- package/dist/app/standalone.js +37 -0
- package/dist/app/standalone.js.map +1 -0
- package/dist/app/tailwind.d.ts +1 -1
- package/dist/app/tailwind.js +0 -4
- package/dist/app/tailwind.js.map +1 -1
- package/dist/cli/cmds/dev.js +5 -0
- package/dist/cli/cmds/dev.js.map +1 -1
- package/dist/cli/dev/handler.d.ts +1 -0
- package/dist/cli/dev/handler.js +3 -1
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/config.d.ts +19 -45
- package/dist/config/validators/validate.d.ts +911 -2
- package/dist/config/validators/validate.js +151 -1
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/internal.d.ts +1 -0
- package/dist/internal.js +2 -0
- package/dist/internal.js.map +1 -0
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +13 -0
- package/dist/lib/authentication/AuthenticationPlugin.js +31 -0
- package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -0
- package/dist/lib/authentication/Callback.d.ts +1 -1
- package/dist/lib/authentication/Callback.js +3 -3
- package/dist/lib/authentication/Callback.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +6 -9
- package/dist/lib/authentication/components/SignIn.d.ts +1 -0
- package/dist/lib/authentication/components/SignIn.js +10 -0
- package/dist/lib/authentication/components/SignIn.js.map +1 -0
- package/dist/lib/authentication/components/SignOut.d.ts +1 -0
- package/dist/lib/authentication/components/SignOut.js +10 -0
- package/dist/lib/authentication/components/SignOut.js.map +1 -0
- package/dist/lib/authentication/components/SignUp.d.ts +1 -0
- package/dist/lib/authentication/components/SignUp.js +10 -0
- package/dist/lib/authentication/components/SignUp.js.map +1 -0
- package/dist/lib/authentication/hook.js +2 -2
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.js +4 -5
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +59 -30
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +20 -7
- package/dist/lib/authentication/providers/openid.js +58 -17
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/Bootstrap.d.ts +13 -0
- package/dist/lib/components/Bootstrap.js +12 -0
- package/dist/lib/components/Bootstrap.js.map +1 -0
- package/dist/lib/components/DevPortal.d.ts +5 -19
- package/dist/lib/components/DevPortal.js +32 -12
- package/dist/lib/components/DevPortal.js.map +1 -1
- package/dist/lib/components/DeveloperHint.d.ts +5 -0
- package/dist/lib/components/DeveloperHint.js +10 -0
- package/dist/lib/components/DeveloperHint.js.map +1 -0
- package/dist/lib/components/ErrorPage.d.ts +6 -0
- package/dist/lib/components/ErrorPage.js +9 -0
- package/dist/lib/components/ErrorPage.js.map +1 -0
- package/dist/lib/components/Header.js +17 -3
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +9 -4
- package/dist/lib/components/Heading.js +17 -2
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/InlineCode.d.ts +5 -0
- package/dist/lib/components/InlineCode.js +4 -0
- package/dist/lib/components/InlineCode.js.map +1 -0
- package/dist/lib/components/Layout.js +4 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/NotFoundPage.d.ts +1 -0
- package/dist/lib/components/NotFoundPage.js +12 -0
- package/dist/lib/components/NotFoundPage.js.map +1 -0
- package/dist/lib/components/SlotletProvider.d.ts +9 -0
- package/dist/lib/components/SlotletProvider.js +11 -0
- package/dist/lib/components/SlotletProvider.js.map +1 -0
- package/dist/lib/components/SyntaxHighlight.d.ts +3 -2
- package/dist/lib/components/SyntaxHighlight.js +24 -22
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +1 -1
- package/dist/lib/components/TopNavigation.js +5 -1
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/DevPortalProvider.d.ts +1 -1
- package/dist/lib/components/context/DevPortalProvider.js +20 -3
- package/dist/lib/components/context/DevPortalProvider.js.map +1 -1
- package/dist/lib/components/index.d.ts +32 -3
- package/dist/lib/components/index.js +21 -3
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/SideNavigation.js +3 -2
- package/dist/lib/components/navigation/SideNavigation.js.map +1 -1
- package/dist/lib/components/navigation/SideNavigationCategory.js +3 -3
- package/dist/lib/components/navigation/SideNavigationCategory.js.map +1 -1
- package/dist/lib/components/navigation/SideNavigationItem.d.ts +0 -4
- package/dist/lib/components/navigation/SideNavigationItem.js +4 -4
- package/dist/lib/components/navigation/SideNavigationItem.js.map +1 -1
- package/dist/lib/components/navigation/useNavigationCollapsibleState.d.ts +4 -1
- package/dist/lib/components/navigation/useNavigationCollapsibleState.js +17 -5
- package/dist/lib/components/navigation/useNavigationCollapsibleState.js.map +1 -1
- package/dist/lib/core/DevPortalContext.d.ts +48 -12
- package/dist/lib/core/DevPortalContext.js +7 -9
- package/dist/lib/core/DevPortalContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +16 -4
- package/dist/lib/core/plugins.js +2 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.d.ts +3 -0
- package/dist/lib/errors/ErrorAlert.js +8 -0
- package/dist/lib/errors/ErrorAlert.js.map +1 -0
- package/dist/lib/errors/RouterError.d.ts +1 -0
- package/dist/lib/errors/RouterError.js +12 -0
- package/dist/lib/errors/RouterError.js.map +1 -0
- package/dist/lib/errors/ServerError.d.ts +3 -0
- package/dist/lib/errors/ServerError.js +6 -0
- package/dist/lib/errors/ServerError.js.map +1 -0
- package/dist/lib/errors/TopLevelError.d.ts +2 -0
- package/dist/lib/errors/TopLevelError.js +7 -0
- package/dist/lib/errors/TopLevelError.js.map +1 -0
- package/dist/lib/oas/graphql/index.js +6 -4
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/index.d.ts +1 -1
- package/dist/lib/oas/parser/index.js +38 -12
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.js +2 -2
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
- package/dist/lib/plugins/api-keys/ProtectedRoute.d.ts +1 -0
- package/dist/lib/plugins/api-keys/ProtectedRoute.js +14 -0
- package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +40 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
- package/dist/lib/plugins/{api-key → api-keys}/index.d.ts +4 -5
- package/dist/lib/plugins/{api-key → api-keys}/index.js +12 -20
- package/dist/lib/plugins/api-keys/index.js.map +1 -0
- package/dist/lib/plugins/custom-page/index.d.ts +8 -0
- package/dist/lib/plugins/custom-page/index.js +12 -0
- package/dist/lib/plugins/custom-page/index.js.map +1 -0
- package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
- package/dist/lib/plugins/markdown/MdxPage.js +7 -6
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/Toc.js +17 -9
- package/dist/lib/plugins/markdown/Toc.js.map +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.d.ts +3 -3
- package/dist/lib/plugins/markdown/generateRoutes.js +4 -4
- package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +4 -1
- package/dist/lib/plugins/markdown/index.js +3 -7
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.d.ts +2 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +14 -9
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +17 -5
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +10 -5
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/{MakeRequest.d.ts → PlaygroundDialogWrapper.d.ts} +1 -1
- package/dist/lib/plugins/openapi/{MakeRequest.js → PlaygroundDialogWrapper.js} +4 -16
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -0
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +1 -9
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.d.ts +6 -0
- package/dist/lib/plugins/openapi/Route.js +8 -0
- package/dist/lib/plugins/openapi/Route.js.map +1 -0
- package/dist/lib/plugins/openapi/SchemaListView.js +6 -27
- package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +7 -0
- package/dist/lib/plugins/openapi/SchemaListViewItem.js +16 -0
- package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
- package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
- package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
- package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
- package/dist/lib/plugins/openapi/Sidecar.js +26 -19
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.d.ts +1 -0
- package/dist/lib/plugins/openapi/SidecarBox.js +3 -2
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/{Select.d.ts → SimpleSelect.d.ts} +3 -2
- package/dist/lib/plugins/openapi/SimpleSelect.js +5 -0
- package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -0
- package/dist/lib/plugins/openapi/StaggeredRender.d.ts +8 -0
- package/dist/lib/plugins/openapi/StaggeredRender.js +18 -0
- package/dist/lib/plugins/openapi/StaggeredRender.js.map +1 -0
- package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +12 -0
- package/dist/lib/plugins/openapi/client/createMemoryClient.js +46 -0
- package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -0
- package/dist/lib/plugins/openapi/client/createServer.d.ts +4 -0
- package/dist/lib/plugins/openapi/client/createServer.js +30 -0
- package/dist/lib/plugins/openapi/client/createServer.js.map +1 -0
- package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +10 -0
- package/dist/lib/plugins/openapi/{worker/createSharedWorkerClient.js → client/createWorkerClient.js} +15 -2
- package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -0
- package/dist/lib/plugins/openapi/client/interfaces.d.ts +4 -0
- package/dist/lib/plugins/openapi/client/interfaces.js +2 -0
- package/dist/lib/plugins/openapi/client/interfaces.js.map +1 -0
- package/dist/lib/plugins/openapi/{worker → client}/worker.js +2 -2
- package/dist/lib/plugins/openapi/client/worker.js.map +1 -0
- package/dist/lib/plugins/openapi/context.d.ts +5 -0
- package/dist/lib/plugins/openapi/context.js +11 -0
- package/dist/lib/plugins/openapi/context.js.map +1 -0
- package/dist/lib/plugins/openapi/index.d.ts +4 -18
- package/dist/lib/plugins/openapi/index.js +35 -20
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +15 -0
- package/dist/lib/plugins/openapi/interfaces.js +2 -0
- package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/PathParams.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js +9 -12
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +5 -5
- package/dist/lib/plugins/openapi/playground/Playground.js +31 -15
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +3 -0
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +12 -0
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/QueryParams.js +13 -9
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/createUrl.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/createUrl.js +5 -9
- package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -1
- package/dist/lib/plugins/openapi/util/prose.d.ts +1 -0
- package/dist/lib/plugins/openapi/util/prose.js +4 -0
- package/dist/lib/plugins/openapi/util/prose.js.map +1 -0
- package/dist/lib/plugins/openapi-worker.d.ts +1 -1
- package/dist/lib/plugins/openapi-worker.js +1 -1
- package/dist/lib/plugins/openapi-worker.js.map +1 -1
- package/dist/lib/plugins/redirect/index.d.ts +0 -1
- package/dist/lib/plugins/redirect/index.js +3 -4
- package/dist/lib/plugins/redirect/index.js.map +1 -1
- package/dist/lib/ui/Callout.js +2 -2
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Card.js +1 -1
- package/dist/lib/ui/Card.js.map +1 -1
- package/dist/lib/ui/DropdownMenu.d.ts +27 -0
- package/dist/lib/ui/DropdownMenu.js +36 -0
- package/dist/lib/ui/DropdownMenu.js.map +1 -0
- package/dist/lib/ui/Input.js.map +1 -0
- package/dist/lib/ui/button-variants.d.ts +2 -2
- package/dist/lib/ui/button-variants.js +1 -0
- package/dist/lib/ui/button-variants.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +2 -2
- package/dist/lib/util/MdxComponents.js +7 -5
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/groupBy.d.ts +1 -6
- package/dist/lib/util/groupBy.js +10 -8
- package/dist/lib/util/groupBy.js.map +1 -1
- package/dist/lib/util/invariant.d.ts +6 -0
- package/dist/lib/util/invariant.js +21 -0
- package/dist/lib/util/invariant.js.map +1 -0
- package/dist/lib/util/joinPath.js +2 -1
- package/dist/lib/util/joinPath.js.map +1 -1
- package/dist/lib/util/logInit.d.ts +1 -0
- package/dist/lib/util/logInit.js +9 -0
- package/dist/lib/util/logInit.js.map +1 -0
- package/dist/lib/util/objectEntries.d.ts +4 -0
- package/dist/lib/util/objectEntries.js +2 -0
- package/dist/lib/util/objectEntries.js.map +1 -0
- package/dist/lib/util/renderIf.d.ts +1 -0
- package/dist/lib/util/renderIf.js +2 -0
- package/dist/lib/util/renderIf.js.map +1 -0
- package/dist/lib/util/requestIdleCallbackPolyfill.d.ts +1 -0
- package/dist/lib/util/requestIdleCallbackPolyfill.js +7 -0
- package/dist/lib/util/requestIdleCallbackPolyfill.js.map +1 -0
- package/dist/vite/build.js +30 -7
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +21 -12
- package/dist/vite/config.js +107 -55
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +6 -3
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/dev-server.d.ts +2 -1
- package/dist/vite/dev-server.js +44 -15
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/html.js +18 -5
- package/dist/vite/html.js.map +1 -1
- package/dist/vite/plugin-api-keys.js +7 -8
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.js +9 -20
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.js +5 -6
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.js +5 -2
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +0 -2
- package/dist/vite/plugin-config.js +2 -13
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-css.d.ts +6 -0
- package/dist/vite/plugin-custom-css.js +54 -0
- package/dist/vite/plugin-custom-css.js.map +1 -0
- package/dist/vite/plugin-docs.js +15 -5
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +3 -1
- package/dist/vite/plugin-mdx.js +5 -5
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-metadata.js +1 -1
- package/dist/vite/plugin-metadata.js.map +1 -1
- package/dist/vite/plugin-redirect.js +10 -10
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin.js +3 -5
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.d.ts +17 -0
- package/dist/vite/prerender.js +79 -0
- package/dist/vite/prerender.js.map +1 -0
- package/lib/AnchorLink-C_pYhuZi.js +705 -0
- package/lib/AnchorLink-C_pYhuZi.js.map +1 -0
- package/lib/AuthenticationPlugin-RvXALgvS.js +52 -0
- package/lib/AuthenticationPlugin-RvXALgvS.js.map +1 -0
- package/lib/CategoryHeading-D5Q-X6lE.js +10 -0
- package/lib/CategoryHeading-D5Q-X6lE.js.map +1 -0
- package/lib/Combination-Cq0UkOXq.js +2774 -0
- package/lib/Combination-Cq0UkOXq.js.map +1 -0
- package/lib/DevPortalProvider-BBhQ8kgI.js +1125 -0
- package/lib/DevPortalProvider-BBhQ8kgI.js.map +1 -0
- package/lib/Input-DdAxw3vC.js +2239 -0
- package/lib/Input-DdAxw3vC.js.map +1 -0
- package/lib/Markdown-DsCvZnhw.js +15035 -0
- package/lib/Markdown-DsCvZnhw.js.map +1 -0
- package/lib/MdxPage-B_7x36CA.js +200 -0
- package/lib/MdxPage-B_7x36CA.js.map +1 -0
- package/lib/OperationList-i6FGZUu4.js +5467 -0
- package/lib/OperationList-i6FGZUu4.js.map +1 -0
- package/lib/Route-Bsrd0acQ.js +13 -0
- package/lib/Route-Bsrd0acQ.js.map +1 -0
- package/lib/SlotletProvider-CpNYmq6S.js +102 -0
- package/lib/SlotletProvider-CpNYmq6S.js.map +1 -0
- package/lib/Spinner-BBPlEab_.js +359 -0
- package/lib/Spinner-BBPlEab_.js.map +1 -0
- package/lib/_commonjsHelpers-BVfed4GL.js +29 -0
- package/lib/_commonjsHelpers-BVfed4GL.js.map +1 -0
- package/lib/assets/index-BPdJm2ty.js +1 -0
- package/lib/assets/index-BPdJm2ty.js.map +1 -0
- package/lib/assets/{worker-BCcpCNJ7.js → worker-BWwCA-wk.js} +10727 -10300
- package/lib/assets/worker-BWwCA-wk.js.map +1 -0
- package/lib/context-_fYfJFgk.js +14 -0
- package/lib/context-_fYfJFgk.js.map +1 -0
- package/lib/index-DT-cf5tv.js +726 -0
- package/lib/index-DT-cf5tv.js.map +1 -0
- package/lib/index-pI9JkN46.js +4765 -0
- package/lib/index-pI9JkN46.js.map +1 -0
- package/lib/jsx-runtime-BIr0WBt_.js +1526 -0
- package/lib/jsx-runtime-BIr0WBt_.js.map +1 -0
- package/lib/prism-bash.min-DadFsM4Z.js +1 -0
- package/lib/prism-bash.min-DadFsM4Z.js.map +1 -0
- package/lib/prism-csharp.min-Yizuc34Y.js +1 -0
- package/lib/prism-csharp.min-Yizuc34Y.js.map +1 -0
- package/lib/prism-java.min-d5iT_mOd.js +1 -0
- package/lib/prism-java.min-d5iT_mOd.js.map +1 -0
- package/lib/prism-json.min-B1GJqK1k.js +1 -0
- package/lib/prism-json.min-B1GJqK1k.js.map +1 -0
- package/lib/prism-markup-templating-DZrrEs0A.js +1 -0
- package/lib/prism-markup-templating-DZrrEs0A.js.map +1 -0
- package/lib/prism-objectivec.min-BXSWqpJJ.js +1 -0
- package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -0
- package/lib/prism-php.min-o7FpoMP_.js +1 -0
- package/lib/prism-php.min-o7FpoMP_.js.map +1 -0
- package/lib/prism-ruby.min-C7LwcKyz.js +1 -0
- package/lib/prism-ruby.min-C7LwcKyz.js.map +1 -0
- package/lib/router-BiRCp01d.js +2971 -0
- package/lib/router-BiRCp01d.js.map +1 -0
- package/lib/slugify-CiPVjteN.js +28 -0
- package/lib/slugify-CiPVjteN.js.map +1 -0
- package/lib/state-DKdaQzvh.js +288 -0
- package/lib/state-DKdaQzvh.js.map +1 -0
- package/lib/urql-DMlBWUKL.js +1 -0
- package/lib/urql-DMlBWUKL.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +15 -13
- package/lib/zudoku.auth-auth0.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +59 -29
- package/lib/zudoku.auth-clerk.js.map +1 -0
- package/lib/zudoku.auth-openid.js +715 -539
- package/lib/zudoku.auth-openid.js.map +1 -0
- package/lib/zudoku.components.js +1835 -550
- package/lib/zudoku.components.js.map +1 -0
- package/lib/zudoku.openapi-worker.js +15035 -146
- package/lib/zudoku.openapi-worker.js.map +1 -0
- package/lib/zudoku.plugin-api-keys.js +300 -0
- package/lib/zudoku.plugin-api-keys.js.map +1 -0
- package/lib/zudoku.plugin-custom-page.js +13 -0
- package/lib/zudoku.plugin-custom-page.js.map +1 -0
- package/lib/zudoku.plugin-markdown.js +48 -0
- package/lib/zudoku.plugin-markdown.js.map +1 -0
- package/lib/zudoku.plugin-openapi.js +10 -0
- package/lib/zudoku.plugin-openapi.js.map +1 -0
- package/lib/zudoku.plugin-redirect.js +11 -0
- package/lib/zudoku.plugin-redirect.js.map +1 -0
- package/package.json +60 -25
- package/src/app/App.tsx +0 -41
- package/src/app/demo-cdn.html +26 -0
- package/src/app/demo.html +18 -0
- package/src/app/demo.tsx +45 -0
- package/src/app/entry.client.tsx +47 -0
- package/src/app/entry.server.tsx +160 -0
- package/src/app/main.css +84 -4
- package/src/app/main.tsx +87 -15
- package/src/app/standalone.html +20 -0
- package/src/app/standalone.tsx +51 -0
- package/src/app/tailwind.ts +2 -6
- package/src/lib/authentication/AuthenticationPlugin.tsx +38 -0
- package/src/lib/authentication/Callback.tsx +4 -4
- package/src/lib/authentication/authentication.ts +6 -12
- package/src/lib/authentication/components/SignIn.tsx +11 -0
- package/src/lib/authentication/components/SignOut.tsx +11 -0
- package/src/lib/authentication/components/SignUp.tsx +11 -0
- package/src/lib/authentication/hook.ts +2 -2
- package/src/lib/authentication/providers/auth0.tsx +6 -5
- package/src/lib/authentication/providers/clerk.tsx +63 -31
- package/src/lib/authentication/providers/openid.tsx +69 -18
- package/src/lib/components/Bootstrap.tsx +44 -0
- package/src/lib/components/DevPortal.tsx +59 -49
- package/src/lib/components/DeveloperHint.tsx +25 -0
- package/src/lib/components/ErrorPage.tsx +28 -0
- package/src/lib/components/Header.tsx +97 -32
- package/src/lib/components/Heading.tsx +26 -7
- package/src/lib/components/InlineCode.tsx +19 -0
- package/src/lib/components/Layout.tsx +12 -7
- package/src/lib/components/NotFoundPage.tsx +33 -0
- package/src/lib/components/SlotletProvider.tsx +25 -0
- package/src/lib/components/SyntaxHighlight.tsx +53 -44
- package/src/lib/components/TopNavigation.tsx +6 -1
- package/src/lib/components/context/DevPortalProvider.ts +24 -4
- package/src/lib/components/index.ts +25 -3
- package/src/lib/components/navigation/SideNavigation.tsx +3 -0
- package/src/lib/components/navigation/SideNavigationCategory.tsx +5 -9
- package/src/lib/components/navigation/SideNavigationItem.tsx +5 -9
- package/src/lib/components/navigation/useNavigationCollapsibleState.ts +21 -6
- package/src/lib/core/DevPortalContext.ts +56 -25
- package/src/lib/core/plugins.ts +26 -5
- package/src/lib/errors/ErrorAlert.tsx +21 -0
- package/src/lib/errors/RouterError.tsx +13 -0
- package/src/lib/errors/ServerError.tsx +5 -0
- package/src/lib/errors/TopLevelError.tsx +8 -0
- package/src/lib/oas/graphql/index.ts +9 -5
- package/src/lib/oas/parser/index.ts +41 -20
- package/src/lib/plugins/{api-key → api-keys}/CreateApiKey.tsx +2 -2
- package/src/lib/plugins/api-keys/ProtectedRoute.tsx +29 -0
- package/src/lib/plugins/{api-key → api-keys}/SettingsApiKeys.tsx +19 -9
- package/src/lib/plugins/{api-key → api-keys}/index.tsx +17 -41
- package/src/lib/plugins/custom-page/index.tsx +22 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +51 -34
- package/src/lib/plugins/markdown/Toc.tsx +53 -40
- package/src/lib/plugins/markdown/generateRoutes.tsx +16 -6
- package/src/lib/plugins/markdown/index.tsx +10 -7
- package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -16
- package/src/lib/plugins/openapi/OperationList.tsx +46 -10
- package/src/lib/plugins/openapi/OperationListItem.tsx +68 -42
- package/src/lib/plugins/openapi/ParameterList.tsx +1 -1
- package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -4
- package/src/lib/plugins/openapi/{MakeRequest.tsx → PlaygroundDialogWrapper.tsx} +3 -19
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +2 -16
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +3 -2
- package/src/lib/plugins/openapi/Route.tsx +21 -0
- package/src/lib/plugins/openapi/SchemaListView.tsx +23 -192
- package/src/lib/plugins/openapi/SchemaListViewItem.tsx +110 -0
- package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +63 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +40 -28
- package/src/lib/plugins/openapi/SidecarBox.tsx +13 -2
- package/src/lib/plugins/openapi/{Select.tsx → SimpleSelect.tsx} +6 -3
- package/src/lib/plugins/openapi/StaggeredRender.tsx +31 -0
- package/src/lib/plugins/openapi/client/createMemoryClient.ts +56 -0
- package/src/lib/plugins/openapi/client/createServer.ts +33 -0
- package/src/lib/plugins/openapi/{worker/createSharedWorkerClient.ts → client/createWorkerClient.ts} +21 -2
- package/src/lib/plugins/openapi/client/interfaces.ts +5 -0
- package/src/lib/plugins/openapi/{worker → client}/worker.ts +3 -3
- package/src/lib/plugins/openapi/context.tsx +16 -0
- package/src/lib/plugins/openapi/index.tsx +59 -52
- package/src/lib/plugins/openapi/interfaces.ts +9 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +80 -48
- package/src/lib/plugins/openapi/playground/Playground.tsx +200 -210
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +36 -0
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +92 -65
- package/src/lib/plugins/openapi/playground/createUrl.ts +12 -15
- package/src/lib/plugins/openapi/util/prose.ts +7 -0
- package/src/lib/plugins/openapi-worker.ts +1 -1
- package/src/lib/plugins/redirect/index.tsx +3 -4
- package/src/lib/ui/Callout.tsx +4 -4
- package/src/lib/ui/Card.tsx +1 -1
- package/src/lib/ui/DropdownMenu.tsx +199 -0
- package/src/lib/ui/button-variants.ts +1 -0
- package/src/lib/util/MdxComponents.tsx +7 -15
- package/src/lib/util/groupBy.ts +7 -12
- package/src/lib/util/invariant.ts +26 -0
- package/src/lib/util/joinPath.tsx +2 -1
- package/src/lib/util/logInit.ts +9 -0
- package/src/lib/util/objectEntries.ts +5 -0
- package/src/lib/util/renderIf.ts +4 -0
- package/src/lib/util/requestIdleCallbackPolyfill.ts +6 -0
- package/dist/lib/components/Input.js.map +0 -1
- package/dist/lib/components/Link.d.ts +0 -1
- package/dist/lib/components/Link.js +0 -2
- package/dist/lib/components/Link.js.map +0 -1
- package/dist/lib/components/Router.d.ts +0 -4
- package/dist/lib/components/Router.js +0 -20
- package/dist/lib/components/Router.js.map +0 -1
- package/dist/lib/core/helmet.d.ts +0 -4
- package/dist/lib/core/helmet.js +0 -5
- package/dist/lib/core/helmet.js.map +0 -1
- package/dist/lib/core/icons.d.ts +0 -1
- package/dist/lib/core/icons.js +0 -2
- package/dist/lib/core/icons.js.map +0 -1
- package/dist/lib/core/router.d.ts +0 -1
- package/dist/lib/core/router.js +0 -2
- package/dist/lib/core/router.js.map +0 -1
- package/dist/lib/plugins/api-key/CreateApiKey.js.map +0 -1
- package/dist/lib/plugins/api-key/SettingsApiKeys.js +0 -38
- package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +0 -1
- package/dist/lib/plugins/api-key/index.js.map +0 -1
- package/dist/lib/plugins/index.d.ts +0 -4
- package/dist/lib/plugins/index.js +0 -5
- package/dist/lib/plugins/index.js.map +0 -1
- package/dist/lib/plugins/openapi/MakeRequest.js.map +0 -1
- package/dist/lib/plugins/openapi/Select.js +0 -5
- package/dist/lib/plugins/openapi/Select.js.map +0 -1
- package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -5
- package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
- package/dist/lib/plugins/openapi/worker/shared-worker.d.ts +0 -1
- package/dist/lib/plugins/openapi/worker/shared-worker.js +0 -6
- package/dist/lib/plugins/openapi/worker/shared-worker.js.map +0 -1
- package/dist/lib/plugins/openapi/worker/worker.js.map +0 -1
- package/dist/vite/common.d.ts +0 -1
- package/dist/vite/common.js +0 -5
- package/dist/vite/common.js.map +0 -1
- package/dist/vite/plugin-html.d.ts +0 -3
- package/dist/vite/plugin-html.js +0 -47
- package/dist/vite/plugin-html.js.map +0 -1
- package/dist/vite/plugin-openapi-worker.d.ts +0 -4
- package/dist/vite/plugin-openapi-worker.js +0 -28
- package/dist/vite/plugin-openapi-worker.js.map +0 -1
- package/lib/Spinner-BewqqUU-.js +0 -8413
- package/lib/clerk-Wslx_mPo.js +0 -19685
- package/lib/index-PyGcnQFX.js +0 -3462
- package/lib/loglevel-CoH7VSwE.js +0 -152
- package/lib/state-2Hu1renZ.js +0 -313
- package/lib/zudoku.plugins.js +0 -19902
- package/src/lib/components/Link.tsx +0 -1
- package/src/lib/components/Router.tsx +0 -28
- package/src/lib/core/helmet.ts +0 -5
- package/src/lib/core/icons.tsx +0 -1
- package/src/lib/core/router.tsx +0 -1
- package/src/lib/plugins/index.ts +0 -4
- package/src/lib/plugins/openapi/worker/shared-worker.ts +0 -5
- /package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.d.ts +0 -0
- /package/dist/lib/plugins/{api-key → api-keys}/SettingsApiKeys.d.ts +0 -0
- /package/dist/lib/plugins/openapi/{worker → client}/worker.d.ts +0 -0
- /package/dist/lib/{components → ui}/Input.d.ts +0 -0
- /package/dist/lib/{components → ui}/Input.js +0 -0
- /package/src/lib/{components → ui}/Input.tsx +0 -0
|
@@ -0,0 +1,1125 @@
|
|
|
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, a as he } from "./jsx-runtime-BIr0WBt_.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
|
+
pt as B,
|
|
1091
|
+
Xe as C,
|
|
1092
|
+
ts as D,
|
|
1093
|
+
Pe as E,
|
|
1094
|
+
ve as F,
|
|
1095
|
+
We as Q,
|
|
1096
|
+
be as R,
|
|
1097
|
+
Pt as S,
|
|
1098
|
+
Ve as a,
|
|
1099
|
+
ft as b,
|
|
1100
|
+
ze as c,
|
|
1101
|
+
$e as d,
|
|
1102
|
+
fe as e,
|
|
1103
|
+
$t as f,
|
|
1104
|
+
Ge as g,
|
|
1105
|
+
ce as h,
|
|
1106
|
+
yt as i,
|
|
1107
|
+
Je as j,
|
|
1108
|
+
Ze as k,
|
|
1109
|
+
re as l,
|
|
1110
|
+
He as m,
|
|
1111
|
+
At as n,
|
|
1112
|
+
zt as o,
|
|
1113
|
+
Dt as p,
|
|
1114
|
+
ke as q,
|
|
1115
|
+
ut as r,
|
|
1116
|
+
bt as s,
|
|
1117
|
+
Ye as t,
|
|
1118
|
+
Qt as u,
|
|
1119
|
+
Le as v,
|
|
1120
|
+
ss as w,
|
|
1121
|
+
Se as x,
|
|
1122
|
+
xe as y,
|
|
1123
|
+
Me as z
|
|
1124
|
+
};
|
|
1125
|
+
//# sourceMappingURL=DevPortalProvider-BBhQ8kgI.js.map
|