zudoku 0.0.0-e5be921 → 0.0.0-e614aaa
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/cli.js +3 -0
- package/dist/app/demo.js +1 -2
- package/dist/app/demo.js.map +1 -1
- package/dist/app/entry.client.d.ts +5 -0
- package/dist/app/entry.client.js +2 -15
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +1 -1
- package/dist/app/entry.server.js +1 -2
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.d.ts +2 -2
- package/dist/app/main.js +19 -9
- package/dist/app/main.js.map +1 -1
- package/dist/app/sentry.js +1 -1
- package/dist/app/sentry.js.map +1 -1
- package/dist/app/standalone.js +1 -2
- package/dist/app/standalone.js.map +1 -1
- package/dist/app/tailwind.js +6 -0
- package/dist/app/tailwind.js.map +1 -1
- package/dist/cli/build/handler.d.ts +1 -3
- package/dist/cli/build/handler.js +7 -0
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/cli.js +5 -0
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/build.d.ts +11 -3
- package/dist/cli/cmds/build.js +21 -13
- package/dist/cli/cmds/build.js.map +1 -1
- package/dist/cli/cmds/dev.js +5 -0
- package/dist/cli/cmds/dev.js.map +1 -1
- package/dist/cli/cmds/preview.d.ts +16 -0
- package/dist/cli/cmds/preview.js +25 -0
- package/dist/cli/cmds/preview.js.map +1 -0
- package/dist/cli/common/output.js.map +1 -1
- package/dist/cli/common/utils/ports.d.ts +1 -1
- package/dist/cli/common/utils/ports.js +16 -15
- package/dist/cli/common/utils/ports.js.map +1 -1
- package/dist/cli/dev/handler.d.ts +1 -0
- package/dist/cli/dev/handler.js +14 -12
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/cli/preview/handler.d.ts +3 -0
- package/dist/cli/preview/handler.js +37 -0
- package/dist/cli/preview/handler.js.map +1 -0
- package/dist/config/common.d.ts +5 -2
- package/dist/config/config.d.ts +3 -7
- package/dist/config/loader.d.ts +4 -4
- package/dist/config/loader.js +11 -5
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +32 -17
- package/dist/config/validators/InputSidebarSchema.js +11 -1
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/common.d.ts +821 -194
- package/dist/config/validators/common.js +71 -16
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +378 -131
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/MissingIcon.d.ts +2 -0
- package/dist/lib/MissingIcon.js +7 -0
- package/dist/lib/MissingIcon.js.map +1 -0
- package/dist/lib/authentication/components/CallbackHandler.js +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/SignIn.js +1 -1
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/components/SignOut.js +2 -2
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.d.ts +2 -2
- package/dist/lib/authentication/providers/auth0.js +2 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +35 -12
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +11 -3
- package/dist/lib/authentication/providers/openid.js +17 -9
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +9 -0
- package/dist/lib/authentication/state.js +19 -2
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/AnchorLink.d.ts +1 -1
- package/dist/lib/components/AnchorLink.js +6 -3
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Autocomplete.d.ts +13 -0
- package/dist/lib/components/Autocomplete.js +47 -0
- package/dist/lib/components/Autocomplete.js.map +1 -0
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/Bootstrap.d.ts +1 -2
- package/dist/lib/components/Bootstrap.js +3 -3
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/Header.js +15 -15
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +2 -2
- package/dist/lib/components/Layout.js +2 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Markdown.d.ts +2 -2
- package/dist/lib/components/Markdown.js +3 -1
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +1 -1
- package/dist/lib/components/NotFoundPage.js +1 -1
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/PathRenderer.d.ts +11 -0
- package/dist/lib/components/PathRenderer.js +28 -0
- package/dist/lib/components/PathRenderer.js.map +1 -0
- package/dist/lib/components/SlotletProvider.d.ts +2 -2
- package/dist/lib/components/StatusPage.d.ts +7 -0
- package/dist/lib/components/StatusPage.js +71 -0
- package/dist/lib/components/StatusPage.js.map +1 -0
- package/dist/lib/components/ThemeSwitch.js +8 -5
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/TopNavigation.js +5 -4
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.d.ts +1 -1
- package/dist/lib/components/Zudoku.js +8 -7
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/cache.d.ts +6 -0
- package/dist/lib/components/cache.js +13 -0
- package/dist/lib/components/cache.js.map +1 -0
- package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
- package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
- package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
- package/dist/lib/components/context/ViewportAnchorContext.js +16 -4
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/context/ZudokuContext.js +11 -4
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +32 -15
- package/dist/lib/components/index.js +17 -4
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.js +7 -2
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarBadge.d.ts +6 -3
- package/dist/lib/components/navigation/SidebarBadge.js +13 -11
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +18 -16
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +4 -3
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/components/navigation/utils.js +1 -1
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/RouteGuard.d.ts +1 -0
- package/dist/lib/core/RouteGuard.js +45 -0
- package/dist/lib/core/RouteGuard.js.map +1 -0
- package/dist/lib/core/ZudokuContext.d.ts +15 -3
- package/dist/lib/core/ZudokuContext.js +26 -8
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +13 -7
- package/dist/lib/core/plugins.js +3 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/RouterError.js +1 -1
- package/dist/lib/errors/RouterError.js.map +1 -1
- package/dist/lib/hooks/index.d.ts +3 -0
- package/dist/lib/hooks/index.js +5 -0
- package/dist/lib/hooks/index.js.map +1 -0
- package/dist/lib/hooks/useEvent.d.ts +11 -0
- package/dist/lib/hooks/useEvent.js +19 -0
- package/dist/lib/hooks/useEvent.js.map +1 -0
- package/dist/lib/hooks/useEvent.test.d.ts +1 -0
- package/dist/lib/hooks/useEvent.test.js +100 -0
- package/dist/lib/hooks/useEvent.test.js.map +1 -0
- package/dist/lib/icons.d.ts +1 -0
- package/dist/lib/icons.js +1 -0
- package/dist/lib/icons.js.map +1 -1
- package/dist/lib/oas/graphql/circular.d.ts +3 -0
- package/dist/lib/oas/graphql/circular.js +38 -0
- package/dist/lib/oas/graphql/circular.js.map +1 -0
- package/dist/lib/oas/graphql/index.d.ts +11 -0
- package/dist/lib/oas/graphql/index.js +93 -59
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/dereference/index.js +6 -3
- package/dist/lib/oas/parser/dereference/index.js.map +1 -1
- package/dist/lib/oas/parser/upgrade/index.js +19 -4
- package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +3 -5
- package/dist/lib/plugins/api-catalog/Catalog.js +23 -26
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
- package/dist/lib/plugins/api-catalog/index.d.ts +9 -1
- package/dist/lib/plugins/api-catalog/index.js +37 -8
- package/dist/lib/plugins/api-catalog/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +8 -4
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +1 -0
- package/dist/lib/plugins/api-keys/index.js +1 -0
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +8 -2
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +1 -0
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +0 -6
- package/dist/lib/plugins/markdown/resolver.js +0 -29
- package/dist/lib/plugins/markdown/resolver.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.d.ts +10 -2
- package/dist/lib/plugins/openapi/ColorizedParam.js +18 -7
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +8 -7
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OasProvider.d.ts +8 -0
- package/dist/lib/plugins/openapi/OasProvider.js +29 -0
- package/dist/lib/plugins/openapi/OasProvider.js.map +1 -0
- package/dist/lib/plugins/openapi/OperationList.d.ts +5 -2
- package/dist/lib/plugins/openapi/OperationList.js +39 -49
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +4 -2
- package/dist/lib/plugins/openapi/OperationListItem.js +16 -5
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -1
- package/dist/lib/plugins/openapi/ParameterList.js +3 -2
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +3 -2
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +4 -2
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +10 -3
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +3 -4
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +5 -13
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +7 -13
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +22 -34
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.d.ts +9 -0
- package/dist/lib/plugins/openapi/SidecarExamples.js +68 -0
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -0
- package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLClient.js +22 -93
- package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
- package/dist/lib/plugins/openapi/client/createServer.d.ts +2 -1
- package/dist/lib/plugins/openapi/client/createServer.js +5 -2
- package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +2 -4
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/context.d.ts +3 -3
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -2
- package/dist/lib/plugins/openapi/graphql/gql.js +3 -13
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +66 -29
- package/dist/lib/plugins/openapi/graphql/graphql.js +33 -15
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +10 -1
- package/dist/lib/plugins/openapi/index.js +84 -84
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +29 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +12 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +4 -4
- package/dist/lib/plugins/openapi/playground/Headers.js +84 -5
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +9 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +5 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/PathParams.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js +5 -7
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +26 -2
- package/dist/lib/plugins/openapi/playground/Playground.js +64 -56
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +24 -18
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/SubmitButton.js +22 -0
- package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +95 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +16 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +10 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +32 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js +56 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +2 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +5 -3
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +49 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -1
- package/dist/lib/plugins/openapi/post-processors/removeParameters.d.ts +10 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.js +66 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js +131 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +37 -0
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
- package/dist/lib/plugins/openapi/schema/utils.js +2 -0
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/util/createSidebarCategory.d.ts +9 -0
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js +25 -0
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +1 -0
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +19 -11
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.d.ts +10 -0
- package/dist/lib/plugins/openapi/util/getRoutes.js +74 -0
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -0
- package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +2 -0
- package/dist/lib/plugins/openapi/util/methodColorMap.js +10 -0
- package/dist/lib/plugins/openapi/util/methodColorMap.js.map +1 -0
- package/dist/lib/plugins/openapi/util/methodToColor.d.ts +20 -0
- package/dist/lib/plugins/openapi/util/methodToColor.js +24 -0
- package/dist/lib/plugins/openapi/util/methodToColor.js.map +1 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.d.ts +1 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js +27 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js.map +1 -0
- package/dist/lib/plugins/redirect/index.js +1 -1
- package/dist/lib/plugins/redirect/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/index.js +21 -7
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.d.ts +6 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +67 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +7 -0
- package/dist/lib/plugins/search-pagefind/ResultList.js +30 -0
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/get-results.d.ts +3 -0
- package/dist/lib/plugins/search-pagefind/get-results.js +37 -0
- package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/index.d.ts +6 -0
- package/dist/lib/plugins/search-pagefind/index.js +9 -0
- package/dist/lib/plugins/search-pagefind/index.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/types.d.ts +85 -0
- package/dist/lib/plugins/search-pagefind/types.js +2 -0
- package/dist/lib/plugins/search-pagefind/types.js.map +1 -0
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Badge.js +2 -1
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +1 -1
- package/dist/lib/ui/Card.js +1 -1
- package/dist/lib/ui/Card.js.map +1 -1
- package/dist/lib/ui/Checkbox.d.ts +8 -2
- package/dist/lib/ui/Checkbox.js +13 -1
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +17 -3
- package/dist/lib/ui/Command.js +7 -3
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Input.d.ts +1 -2
- package/dist/lib/ui/Input.js.map +1 -1
- package/dist/lib/ui/Select.js +2 -2
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/Stepper.d.ts +4 -0
- package/dist/lib/ui/Stepper.js +7 -0
- package/dist/lib/ui/Stepper.js.map +1 -0
- package/dist/lib/ui/SyntaxHighlight.d.ts +14 -0
- package/dist/lib/{components → ui}/SyntaxHighlight.js +9 -6
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -0
- package/dist/lib/ui/util.d.ts +2 -0
- package/dist/lib/ui/util.js +3 -0
- package/dist/lib/ui/util.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +19 -17
- package/dist/lib/util/MdxComponents.js +7 -6
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/createVariantComponent.d.ts +2 -2
- package/dist/lib/util/joinUrl.d.ts +1 -0
- package/dist/lib/util/joinUrl.js +40 -0
- package/dist/lib/util/joinUrl.js.map +1 -0
- package/dist/lib/util/joinUrl.test.d.ts +1 -0
- package/dist/lib/util/joinUrl.test.js +43 -0
- package/dist/lib/util/joinUrl.test.js.map +1 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.d.ts +1 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.js +14 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.js.map +1 -0
- package/dist/lib/util/traverse.d.ts +8 -1
- package/dist/lib/util/traverse.js +7 -3
- package/dist/lib/util/traverse.js.map +1 -1
- package/dist/lib/util/useExposedProps.js +1 -1
- package/dist/lib/util/useExposedProps.js.map +1 -1
- package/dist/lib/util/useLatest.d.ts +1 -0
- package/dist/lib/util/useLatest.js +15 -0
- package/dist/lib/util/useLatest.js.map +1 -0
- package/dist/lib/util/useOnScreen.d.ts +1 -1
- package/dist/lib/util/useScrollToAnchor.d.ts +1 -0
- package/dist/lib/util/useScrollToAnchor.js +26 -29
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/lib/util/useScrollToTop.js +7 -5
- package/dist/lib/util/useScrollToTop.js.map +1 -1
- package/dist/vite/api/schema-codegen.d.ts +12 -0
- package/dist/vite/api/schema-codegen.js +62 -0
- package/dist/vite/api/schema-codegen.js.map +1 -0
- package/dist/vite/api/schema-codegen.test.d.ts +1 -0
- package/dist/vite/api/schema-codegen.test.js +247 -0
- package/dist/vite/api/schema-codegen.test.js.map +1 -0
- package/dist/vite/build.js +41 -25
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +2 -5
- package/dist/vite/config.js +69 -61
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +5 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/css/collect.d.ts +2 -0
- package/dist/vite/css/collect.js +27 -0
- package/dist/vite/css/collect.js.map +1 -0
- package/dist/vite/css/plugin.d.ts +5 -0
- package/dist/vite/css/plugin.js +79 -0
- package/dist/vite/css/plugin.js.map +1 -0
- package/dist/vite/dev-server.d.ts +5 -2
- package/dist/vite/dev-server.js +52 -11
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/error-handler.d.ts +1 -1
- package/dist/vite/error-handler.js +1 -1
- package/dist/vite/error-handler.js.map +1 -1
- package/dist/vite/output.d.ts +14 -2
- package/dist/vite/output.js +12 -14
- package/dist/vite/output.js.map +1 -1
- package/dist/vite/pagefind.d.ts +4 -0
- package/dist/vite/pagefind.js +15 -0
- package/dist/vite/pagefind.js.map +1 -0
- package/dist/vite/plugin-api-keys.d.ts +2 -2
- package/dist/vite/plugin-api-keys.js +5 -5
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +2 -2
- package/dist/vite/plugin-api.js +175 -59
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +2 -2
- package/dist/vite/plugin-auth.js +7 -4
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +2 -2
- package/dist/vite/plugin-component.js +7 -3
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +4 -3
- package/dist/vite/plugin-config-reload.js +11 -5
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +2 -2
- package/dist/vite/plugin-config.js +9 -5
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +2 -2
- package/dist/vite/plugin-custom-pages.js +3 -3
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +2 -2
- package/dist/vite/plugin-docs.js +5 -5
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +2 -2
- package/dist/vite/plugin-frontmatter.js +5 -4
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +2 -2
- package/dist/vite/plugin-mdx.js +34 -16
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-redirect.d.ts +2 -2
- package/dist/vite/plugin-redirect.js +3 -3
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +2 -2
- package/dist/vite/plugin-search.js +5 -1
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-sidebar.d.ts +2 -2
- package/dist/vite/plugin-sidebar.js +13 -4
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin-theme-css.d.ts +2 -2
- package/dist/vite/plugin-theme-css.js +57 -2
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/dist/vite/plugin.d.ts +2 -2
- package/dist/vite/plugin.js +4 -0
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/{prerender.d.ts → prerender/FileWritingResponse.d.ts} +8 -9
- package/dist/vite/prerender/FileWritingResponse.js +51 -0
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -0
- package/dist/vite/prerender/prerender.d.ts +14 -0
- package/dist/vite/prerender/prerender.js +84 -0
- package/dist/vite/prerender/prerender.js.map +1 -0
- package/dist/vite/prerender/worker.d.ts +13 -0
- package/dist/vite/prerender/worker.js +32 -0
- package/dist/vite/prerender/worker.js.map +1 -0
- package/dist/vite/reporter.d.ts +3 -0
- package/dist/vite/reporter.js +33 -0
- package/dist/vite/reporter.js.map +1 -0
- package/dist/vite/sitemap.js +2 -1
- package/dist/vite/sitemap.js.map +1 -1
- package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
- package/dist/zuplo/enrich-with-zuplo.js +184 -0
- package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
- package/dist/zuplo/env.d.ts +1 -0
- package/dist/zuplo/env.js +3 -0
- package/dist/zuplo/env.js.map +1 -1
- package/dist/zuplo/policy-types.d.ts +33 -0
- package/dist/zuplo/policy-types.js +8 -0
- package/dist/zuplo/policy-types.js.map +1 -0
- package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
- package/dist/zuplo/with-zuplo-processors.js +26 -0
- package/dist/zuplo/with-zuplo-processors.js.map +1 -0
- package/dist/zuplo/with-zuplo.d.ts +1 -1
- package/dist/zuplo/with-zuplo.js +7 -26
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/AuthenticationPlugin-CiO1FM6Q.js +58 -0
- package/lib/AuthenticationPlugin-CiO1FM6Q.js.map +1 -0
- package/lib/{CategoryHeading-Bb9dqxD3.js → CategoryHeading-DpB47wvk.js} +3 -3
- package/lib/{CategoryHeading-Bb9dqxD3.js.map → CategoryHeading-DpB47wvk.js.map} +1 -1
- package/lib/ClientOnly-E7hGysn1.js.map +1 -1
- package/lib/{Dialog-k70Qfukb.js → Dialog-DIKGQxQc.js} +36 -20
- package/lib/{Dialog-k70Qfukb.js.map → Dialog-DIKGQxQc.js.map} +1 -1
- package/lib/{Markdown-CRsmPPfY.js → Markdown-DePfm7oQ.js} +5972 -5888
- package/lib/Markdown-DePfm7oQ.js.map +1 -0
- package/lib/MdxPage-BN6l6zXL.js +201 -0
- package/lib/MdxPage-BN6l6zXL.js.map +1 -0
- package/lib/OasProvider-BSuptFK-.js +34 -0
- package/lib/OasProvider-BSuptFK-.js.map +1 -0
- package/lib/OperationList-DOcfDmJP.js +5217 -0
- package/lib/OperationList-DOcfDmJP.js.map +1 -0
- package/lib/{Select-O9ZM3ZgX.js → Select-Dqtcn53H.js} +49 -49
- package/lib/Select-Dqtcn53H.js.map +1 -0
- package/lib/SlotletProvider-DdtIOUi6.js +221 -0
- package/lib/SlotletProvider-DdtIOUi6.js.map +1 -0
- package/lib/{Button-jK0EsymC.js → Spinner-1KrEmx1V.js} +17 -14
- package/lib/Spinner-1KrEmx1V.js.map +1 -0
- package/lib/chunk-IR6S3I6Y-D_3UmFIn.js +1821 -0
- package/lib/chunk-IR6S3I6Y-D_3UmFIn.js.map +1 -0
- package/lib/circular-v7K6lDDh.js +15409 -0
- package/lib/circular-v7K6lDDh.js.map +1 -0
- package/lib/{cn-BmFQLtkS.js → cn-qaFjX9_3.js} +2 -2
- package/lib/cn-qaFjX9_3.js.map +1 -0
- package/lib/{context-D1nXWxm7.js → context-DLCwaMXN.js} +2 -2
- package/lib/context-DLCwaMXN.js.map +1 -0
- package/lib/createServer-DmusVVsi.js +12728 -0
- package/lib/createServer-DmusVVsi.js.map +1 -0
- package/lib/hook-CN__aZIt.js +1464 -0
- package/lib/hook-CN__aZIt.js.map +1 -0
- package/lib/index-BTbP6Lgf.js +2103 -0
- package/lib/index-BTbP6Lgf.js.map +1 -0
- package/lib/index-CPNSgwSb.js +36 -0
- package/lib/index-CPNSgwSb.js.map +1 -0
- package/lib/{index-CkwDvuPt.js → index-Dl3Yl0yb.js} +303 -286
- package/lib/index-Dl3Yl0yb.js.map +1 -0
- package/lib/index-DwT-v3zK.js +86 -0
- package/lib/index-DwT-v3zK.js.map +1 -0
- package/lib/index-LNp6rxyU.js.map +1 -1
- package/lib/index-gQD2h1wX.js +447 -0
- package/lib/index-gQD2h1wX.js.map +1 -0
- package/lib/index.esm--gIChbWs.js +1207 -0
- package/lib/index.esm--gIChbWs.js.map +1 -0
- package/lib/index.esm-CQHE3GEU.js +691 -0
- package/lib/{index.esm-Bm8pj-bc.js.map → index.esm-CQHE3GEU.js.map} +1 -1
- package/lib/invariant-Caa8-XvF.js.map +1 -1
- package/lib/joinUrl-10po2Jdj.js +20 -0
- package/lib/joinUrl-10po2Jdj.js.map +1 -0
- package/lib/jsx-runtime-CYK1ROHF.js +446 -0
- package/lib/jsx-runtime-CYK1ROHF.js.map +1 -0
- package/lib/{hook-hEqe7fPB.js → mutation-EclmI0is.js} +39 -58
- package/lib/mutation-EclmI0is.js.map +1 -0
- package/lib/objectEntries-yMIkr2mI.js +5 -0
- package/lib/objectEntries-yMIkr2mI.js.map +1 -0
- package/lib/post-processors/removeExtensions.js +7 -7
- package/lib/post-processors/removeExtensions.js.map +1 -1
- package/lib/post-processors/removeParameters.js +48 -0
- package/lib/post-processors/removeParameters.js.map +1 -0
- package/lib/post-processors/removePaths.js.map +1 -1
- package/lib/post-processors/traverse.js +11 -8
- package/lib/post-processors/traverse.js.map +1 -1
- package/lib/{prism-bash.min-DadFsM4Z.js → prism-bash.min-HHIMdNJ_.js} +4 -4
- package/lib/{prism-bash.min-DadFsM4Z.js.map → prism-bash.min-HHIMdNJ_.js.map} +1 -1
- package/lib/prism-csharp.min-bQAo2pmx.js +63 -0
- package/lib/{prism-csharp.min-Yizuc34Y.js.map → prism-csharp.min-bQAo2pmx.js.map} +1 -1
- package/lib/prism-java.min-BpvsOuIa.js +35 -0
- package/lib/{prism-java.min-d5iT_mOd.js.map → prism-java.min-BpvsOuIa.js.map} +1 -1
- package/lib/{prism-markdown.min-F3U-vPBi.js → prism-markdown.min-C0Qn0m-5.js} +30 -30
- package/lib/{prism-markdown.min-F3U-vPBi.js.map → prism-markdown.min-C0Qn0m-5.js.map} +1 -1
- package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
- package/lib/prism-ruby.min-Dx9KO9ds.js +38 -0
- package/lib/{prism-ruby.min-C7LwcKyz.js.map → prism-ruby.min-Dx9KO9ds.js.map} +1 -1
- package/lib/prism-typescript.min-CD7H2IYQ.js +34 -0
- package/lib/{prism-typescript.min-oSVeWCAd.js.map → prism-typescript.min-CD7H2IYQ.js.map} +1 -1
- package/lib/ui/Accordion.js +2 -2
- package/lib/ui/Accordion.js.map +1 -1
- package/lib/ui/ActionButton.js +10 -11
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +3 -3
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js +2 -2
- package/lib/ui/AlertDialog.js.map +1 -1
- package/lib/ui/Badge.js +5 -4
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +5 -5
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js +3 -3
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +5 -5
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +9 -9
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +408 -402
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +26 -15
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/Command.js +114 -508
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +2 -2
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +357 -378
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +2 -2
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/Form.js +6 -6
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/HoverCard.js +2 -2
- package/lib/ui/Input.js +2 -2
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +3 -3
- package/lib/ui/Pagination.js +5 -5
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js +2 -2
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js +2 -2
- package/lib/ui/Progress.js.map +1 -1
- package/lib/ui/RadioGroup.js +2 -2
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js +2 -2
- package/lib/ui/ScrollArea.js.map +1 -1
- package/lib/ui/Select.js +4 -4
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +2 -2
- package/lib/ui/Skeleton.js.map +1 -1
- package/lib/ui/Slider.js +2 -2
- package/lib/ui/Stepper.js +6 -0
- package/lib/ui/Stepper.js.map +1 -0
- package/lib/ui/Switch.js +2 -2
- package/lib/ui/Switch.js.map +1 -1
- package/lib/{SyntaxHighlight-C31iouiO.js → ui/SyntaxHighlight.js} +460 -536
- package/lib/ui/SyntaxHighlight.js.map +1 -0
- package/lib/ui/Tabs.js +2 -2
- package/lib/ui/Textarea.js +2 -2
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js +3 -3
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js +2 -2
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js +2 -2
- package/lib/ui/util.js +6 -0
- package/lib/ui/util.js.map +1 -0
- package/lib/useExposedProps-RIvey2Oy.js +9 -0
- package/lib/useExposedProps-RIvey2Oy.js.map +1 -0
- package/lib/useScrollToAnchor-RyqO3lj4.js +290 -0
- package/lib/useScrollToAnchor-RyqO3lj4.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +19 -20
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +81 -53
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +379 -410
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +1003 -1263
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.css +1 -0
- package/lib/zudoku.hooks.js +19 -0
- package/lib/zudoku.hooks.js.map +1 -0
- package/lib/zudoku.icons.js +10 -0
- package/lib/zudoku.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +109 -109
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +108 -107
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +4 -4
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +23 -44
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +8 -6
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +34 -26
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugins.js +14 -0
- package/lib/zudoku.plugins.js.map +1 -0
- package/package.json +104 -89
- package/src/app/demo-cdn.html +31 -31
- package/src/app/demo.tsx +1 -2
- package/src/app/entry.client.tsx +9 -15
- package/src/app/entry.server.tsx +3 -3
- package/src/app/main.css +59 -45
- package/src/app/main.tsx +33 -10
- package/src/app/sentry.ts +1 -1
- package/src/app/standalone.tsx +1 -2
- package/src/app/tailwind.ts +6 -0
- package/src/lib/MissingIcon.tsx +22 -0
- package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
- package/src/lib/authentication/components/SignIn.tsx +1 -1
- package/src/lib/authentication/components/SignOut.tsx +3 -2
- package/src/lib/authentication/providers/auth0.tsx +4 -6
- package/src/lib/authentication/providers/clerk.tsx +48 -13
- package/src/lib/authentication/providers/openid.tsx +32 -15
- package/src/lib/authentication/state.ts +26 -2
- package/src/lib/components/AnchorLink.tsx +6 -3
- package/src/lib/components/Autocomplete.tsx +113 -0
- package/src/lib/components/Banner.tsx +1 -0
- package/src/lib/components/Bootstrap.tsx +4 -6
- package/src/lib/components/Header.tsx +14 -10
- package/src/lib/components/Heading.tsx +1 -1
- package/src/lib/components/Layout.tsx +4 -3
- package/src/lib/components/Markdown.tsx +14 -15
- package/src/lib/components/MobileTopNavigation.tsx +1 -1
- package/src/lib/components/NotFoundPage.tsx +1 -1
- package/src/lib/components/PathRenderer.tsx +61 -0
- package/src/lib/components/SlotletProvider.tsx +1 -1
- package/src/lib/components/StatusPage.tsx +91 -0
- package/src/lib/components/ThemeSwitch.tsx +29 -9
- package/src/lib/components/TopNavigation.tsx +15 -11
- package/src/lib/components/Zudoku.tsx +10 -6
- package/src/lib/components/cache.ts +15 -0
- package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
- package/src/lib/components/context/ViewportAnchorContext.tsx +20 -6
- package/src/lib/components/context/ZudokuContext.ts +17 -4
- package/src/lib/components/index.ts +22 -5
- package/src/lib/components/navigation/Sidebar.tsx +8 -2
- package/src/lib/components/navigation/SidebarBadge.tsx +17 -12
- package/src/lib/components/navigation/SidebarCategory.tsx +46 -47
- package/src/lib/components/navigation/SidebarItem.tsx +4 -2
- package/src/lib/components/navigation/SidebarWrapper.tsx +3 -2
- package/src/lib/components/navigation/utils.ts +1 -1
- package/src/lib/core/RouteGuard.tsx +73 -0
- package/src/lib/core/ZudokuContext.ts +41 -9
- package/src/lib/core/plugins.ts +27 -9
- package/src/lib/errors/RouterError.tsx +1 -1
- package/src/lib/hooks/index.ts +5 -0
- package/src/lib/hooks/useEvent.test.tsx +149 -0
- package/src/lib/hooks/useEvent.ts +41 -0
- package/src/lib/icons.ts +1 -0
- package/src/lib/oas/graphql/circular.ts +50 -0
- package/src/lib/oas/graphql/index.ts +135 -92
- package/src/lib/oas/parser/dereference/index.ts +8 -4
- package/src/lib/oas/parser/upgrade/index.ts +21 -5
- package/src/lib/plugins/api-catalog/Catalog.tsx +62 -110
- package/src/lib/plugins/api-catalog/index.tsx +69 -9
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +8 -4
- package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
- package/src/lib/plugins/api-keys/index.tsx +4 -1
- package/src/lib/plugins/custom-pages/index.tsx +1 -1
- package/src/lib/plugins/markdown/MdxPage.tsx +15 -3
- package/src/lib/plugins/markdown/index.tsx +2 -1
- package/src/lib/plugins/markdown/resolver.ts +0 -33
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +10 -7
- package/src/lib/plugins/openapi/ColorizedParam.tsx +29 -12
- package/src/lib/plugins/openapi/Endpoint.tsx +14 -12
- package/src/lib/plugins/openapi/OasProvider.tsx +51 -0
- package/src/lib/plugins/openapi/OperationList.tsx +106 -67
- package/src/lib/plugins/openapi/OperationListItem.tsx +48 -6
- package/src/lib/plugins/openapi/ParameterList.tsx +4 -0
- package/src/lib/plugins/openapi/ParameterListItem.tsx +7 -8
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +14 -2
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +15 -38
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +46 -63
- package/src/lib/plugins/openapi/Sidecar.tsx +44 -60
- package/src/lib/plugins/openapi/SidecarBox.tsx +4 -16
- package/src/lib/plugins/openapi/SidecarExamples.tsx +162 -0
- package/src/lib/plugins/openapi/client/GraphQLClient.tsx +28 -120
- package/src/lib/plugins/openapi/client/createServer.ts +6 -2
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +2 -5
- package/src/lib/plugins/openapi/context.tsx +2 -2
- package/src/lib/plugins/openapi/graphql/gql.ts +21 -5
- package/src/lib/plugins/openapi/graphql/graphql.ts +92 -45
- package/src/lib/plugins/openapi/index.tsx +130 -97
- package/src/lib/plugins/openapi/interfaces.ts +27 -2
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +54 -0
- package/src/lib/plugins/openapi/playground/Headers.tsx +166 -36
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +13 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +39 -65
- package/src/lib/plugins/openapi/playground/Playground.tsx +288 -235
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +6 -3
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +87 -88
- package/src/lib/plugins/openapi/playground/SubmitButton.tsx +75 -0
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +73 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +210 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +101 -0
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.test.ts +64 -0
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +36 -0
- package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +58 -0
- package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +7 -4
- package/src/lib/plugins/openapi/post-processors/removeParameters.test.ts +148 -0
- package/src/lib/plugins/openapi/post-processors/removeParameters.ts +101 -0
- package/src/lib/plugins/openapi/schema/{SchemaComponents.tsx → SchemaPropertyItem.tsx} +34 -9
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +4 -1
- package/src/lib/plugins/openapi/schema/utils.ts +4 -0
- package/src/lib/plugins/openapi/util/createSidebarCategory.tsx +39 -0
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +26 -11
- package/src/lib/plugins/openapi/util/getRoutes.tsx +123 -0
- package/src/lib/plugins/openapi/util/methodColorMap.tsx +11 -0
- package/src/lib/plugins/openapi/util/methodToColor.ts +27 -0
- package/src/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.tsx +32 -0
- package/src/lib/plugins/redirect/index.tsx +1 -1
- package/src/lib/plugins/search-inkeep/index.tsx +27 -8
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +139 -0
- package/src/lib/plugins/search-pagefind/ResultList.tsx +98 -0
- package/src/lib/plugins/search-pagefind/get-results.tsx +54 -0
- package/src/lib/plugins/search-pagefind/index.tsx +21 -0
- package/src/lib/plugins/search-pagefind/types.ts +118 -0
- package/src/lib/ui/Badge.tsx +2 -1
- package/src/lib/ui/Card.tsx +1 -1
- package/src/lib/ui/Checkbox.tsx +24 -7
- package/src/lib/ui/Command.tsx +45 -3
- package/src/lib/ui/Input.tsx +1 -2
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/ui/Stepper.css +43 -0
- package/src/lib/ui/Stepper.tsx +8 -0
- package/src/lib/{components → ui}/SyntaxHighlight.tsx +37 -8
- package/src/lib/ui/util.tsx +3 -0
- package/src/lib/util/MdxComponents.tsx +8 -6
- package/src/lib/util/createVariantComponent.tsx +2 -2
- package/src/lib/util/joinUrl.test.ts +62 -0
- package/src/lib/util/joinUrl.ts +57 -0
- package/src/lib/util/scrollIntoViewIfNeeded.ts +18 -0
- package/src/lib/util/traverse.ts +15 -5
- package/src/lib/util/useExposedProps.tsx +1 -1
- package/src/lib/util/useLatest.ts +18 -0
- package/src/lib/util/useScrollToAnchor.ts +33 -34
- package/src/lib/util/useScrollToTop.ts +9 -4
- package/dist/lib/components/SyntaxHighlight.d.ts +0 -11
- package/dist/lib/components/SyntaxHighlight.js.map +0 -1
- package/dist/lib/plugins/openapi/Route.d.ts +0 -6
- package/dist/lib/plugins/openapi/Route.js +0 -6
- package/dist/lib/plugins/openapi/Route.js.map +0 -1
- package/dist/lib/plugins/openapi/client/worker.d.ts +0 -4
- package/dist/lib/plugins/openapi/client/worker.js +0 -29
- package/dist/lib/plugins/openapi/client/worker.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/ResponseTab.js +0 -42
- package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js +0 -28
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
- package/dist/lib/plugins/openapi-worker.d.ts +0 -1
- package/dist/lib/plugins/openapi-worker.js +0 -8
- package/dist/lib/plugins/openapi-worker.js.map +0 -1
- package/dist/vite/prerender.js +0 -89
- package/dist/vite/prerender.js.map +0 -1
- package/lib/AnchorLink-BR0MvI7n.js +0 -35
- package/lib/AnchorLink-BR0MvI7n.js.map +0 -1
- package/lib/AuthenticationPlugin-D0Em0SwR.js +0 -59
- package/lib/AuthenticationPlugin-D0Em0SwR.js.map +0 -1
- package/lib/Button-jK0EsymC.js.map +0 -1
- package/lib/Markdown-CRsmPPfY.js.map +0 -1
- package/lib/MdxPage-Wp8QU0-q.js +0 -188
- package/lib/MdxPage-Wp8QU0-q.js.map +0 -1
- package/lib/OperationList-u8xHU9-b.js +0 -4706
- package/lib/OperationList-u8xHU9-b.js.map +0 -1
- package/lib/Route-DlG_HTMu.js +0 -11
- package/lib/Route-DlG_HTMu.js.map +0 -1
- package/lib/Select-O9ZM3ZgX.js.map +0 -1
- package/lib/SidebarBadge-DxFJcJ6V.js +0 -51
- package/lib/SidebarBadge-DxFJcJ6V.js.map +0 -1
- package/lib/SlotletProvider-BgvYIPQe.js +0 -252
- package/lib/SlotletProvider-BgvYIPQe.js.map +0 -1
- package/lib/Spinner-3cQDBVGr.js +0 -7
- package/lib/Spinner-3cQDBVGr.js.map +0 -1
- package/lib/SyntaxHighlight-C31iouiO.js.map +0 -1
- package/lib/__vite-browser-external-BYRIRx8p.js +0 -9
- package/lib/__vite-browser-external-BYRIRx8p.js.map +0 -1
- package/lib/assets/index-B_Jk_Yzp.js +0 -4820
- package/lib/assets/index-B_Jk_Yzp.js.map +0 -1
- package/lib/assets/worker-C_2va8B8.js +0 -18200
- package/lib/assets/worker-C_2va8B8.js.map +0 -1
- package/lib/cn-BmFQLtkS.js.map +0 -1
- package/lib/context-D1nXWxm7.js.map +0 -1
- package/lib/createServer-BCAHdrpE.js +0 -15302
- package/lib/createServer-BCAHdrpE.js.map +0 -1
- package/lib/hook-hEqe7fPB.js.map +0 -1
- package/lib/index-BuAyrJe3.js +0 -46
- package/lib/index-BuAyrJe3.js.map +0 -1
- package/lib/index-CkwDvuPt.js.map +0 -1
- package/lib/index-CmdLGbbk.js +0 -1279
- package/lib/index-CmdLGbbk.js.map +0 -1
- package/lib/index-Czzd9rjU.js +0 -899
- package/lib/index-Czzd9rjU.js.map +0 -1
- package/lib/index-Yn8c3UWE.js +0 -921
- package/lib/index-Yn8c3UWE.js.map +0 -1
- package/lib/index.esm-Bm8pj-bc.js +0 -675
- package/lib/index.esm-C5mr_sKO.js +0 -1193
- package/lib/index.esm-C5mr_sKO.js.map +0 -1
- package/lib/jsx-runtime-B6kdoens.js +0 -635
- package/lib/jsx-runtime-B6kdoens.js.map +0 -1
- package/lib/object_hash-CvlLgU-M.js +0 -785
- package/lib/object_hash-CvlLgU-M.js.map +0 -1
- package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
- package/lib/prism-java.min-d5iT_mOd.js +0 -7
- package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
- package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
- package/lib/router-lfyopgBI.js +0 -3024
- package/lib/router-lfyopgBI.js.map +0 -1
- package/lib/state-tsXBLONe.js +0 -203
- package/lib/state-tsXBLONe.js.map +0 -1
- package/lib/useExposedProps-CTPtylCV.js +0 -10
- package/lib/useExposedProps-CTPtylCV.js.map +0 -1
- package/lib/utils-DcpDOncX.js +0 -1218
- package/lib/utils-DcpDOncX.js.map +0 -1
- package/lib/zudoku.openapi-worker.js +0 -15
- package/lib/zudoku.openapi-worker.js.map +0 -1
- package/src/lib/plugins/openapi/Route.tsx +0 -19
- package/src/lib/plugins/openapi/client/worker.ts +0 -44
- package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -76
- package/src/lib/plugins/openapi-worker.ts +0 -11
- /package/dist/lib/plugins/openapi/schema/{SchemaComponents.d.ts → SchemaPropertyItem.d.ts} +0 -0
|
@@ -1,165 +1,168 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { j as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
var Ue = Object.defineProperty;
|
|
2
|
+
var Le = (t, e, n) => e in t ? Ue(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var _ = (t, e, n) => Le(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { j as q } from "./jsx-runtime-CYK1ROHF.js";
|
|
5
|
+
import { g as xe } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
6
|
+
import { C as Ce } from "./ClientOnly-E7hGysn1.js";
|
|
7
|
+
import { j as oe } from "./joinUrl-10po2Jdj.js";
|
|
8
|
+
import { A as je } from "./AuthenticationPlugin-CiO1FM6Q.js";
|
|
9
|
+
import { b as Ie, u as L } from "./hook-CN__aZIt.js";
|
|
10
|
+
import { N as Je } from "./chunk-IR6S3I6Y-D_3UmFIn.js";
|
|
11
|
+
import { Z as Oe } from "./invariant-Caa8-XvF.js";
|
|
12
|
+
var D = { exports: {} }, ze = D.exports, ie;
|
|
13
|
+
function De() {
|
|
14
|
+
return ie || (ie = 1, function(t) {
|
|
15
|
+
(function(e, n) {
|
|
16
|
+
t.exports ? t.exports = n() : e.log = n();
|
|
17
|
+
})(ze, function() {
|
|
18
|
+
var e = function() {
|
|
19
|
+
}, n = "undefined", o = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), a = [
|
|
20
|
+
"trace",
|
|
21
|
+
"debug",
|
|
22
|
+
"info",
|
|
23
|
+
"warn",
|
|
24
|
+
"error"
|
|
25
|
+
], r = {}, i = null;
|
|
26
|
+
function c(l, g) {
|
|
27
|
+
var u = l[g];
|
|
28
|
+
if (typeof u.bind == "function")
|
|
29
|
+
return u.bind(l);
|
|
30
|
+
try {
|
|
31
|
+
return Function.prototype.bind.call(u, l);
|
|
32
|
+
} catch {
|
|
33
|
+
return function() {
|
|
34
|
+
return Function.prototype.apply.apply(u, [l, arguments]);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function f() {
|
|
39
|
+
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
40
|
+
}
|
|
41
|
+
function w(l) {
|
|
42
|
+
return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ? f : console[l] !== void 0 ? c(console, l) : console.log !== void 0 ? c(console, "log") : e;
|
|
43
|
+
}
|
|
44
|
+
function p() {
|
|
45
|
+
for (var l = this.getLevel(), g = 0; g < a.length; g++) {
|
|
46
|
+
var u = a[g];
|
|
47
|
+
this[u] = g < l ? e : this.methodFactory(u, l, this.name);
|
|
48
|
+
}
|
|
49
|
+
if (this.log = this.debug, typeof console === n && l < this.levels.SILENT)
|
|
50
|
+
return "No console available for logging";
|
|
51
|
+
}
|
|
52
|
+
function b(l) {
|
|
31
53
|
return function() {
|
|
32
|
-
|
|
54
|
+
typeof console !== n && (p.call(this), this[l].apply(this, arguments));
|
|
33
55
|
};
|
|
34
56
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
38
|
-
}
|
|
39
|
-
function _(l) {
|
|
40
|
-
return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ? p : console[l] !== void 0 ? c(console, l) : console.log !== void 0 ? c(console, "log") : e;
|
|
41
|
-
}
|
|
42
|
-
function f() {
|
|
43
|
-
for (var l = this.getLevel(), m = 0; m < a.length; m++) {
|
|
44
|
-
var u = a[m];
|
|
45
|
-
this[u] = m < l ? e : this.methodFactory(u, l, this.name);
|
|
57
|
+
function T(l, g, u) {
|
|
58
|
+
return w(l) || b.apply(this, arguments);
|
|
46
59
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
var g = (a[d] || "silent").toUpperCase();
|
|
63
|
-
if (!(typeof window === n || !v)) {
|
|
64
|
-
try {
|
|
65
|
-
window.localStorage[v] = g;
|
|
66
|
-
return;
|
|
67
|
-
} catch {
|
|
68
|
-
}
|
|
69
|
-
try {
|
|
70
|
-
window.document.cookie = encodeURIComponent(v) + "=" + g + ";";
|
|
71
|
-
} catch {
|
|
60
|
+
function h(l, g) {
|
|
61
|
+
var u = this, J, $, R, v = "loglevel";
|
|
62
|
+
typeof l == "string" ? v += ":" + l : typeof l == "symbol" && (v = void 0);
|
|
63
|
+
function Ee(d) {
|
|
64
|
+
var y = (a[d] || "silent").toUpperCase();
|
|
65
|
+
if (!(typeof window === n || !v)) {
|
|
66
|
+
try {
|
|
67
|
+
window.localStorage[v] = y;
|
|
68
|
+
return;
|
|
69
|
+
} catch {
|
|
70
|
+
}
|
|
71
|
+
try {
|
|
72
|
+
window.document.cookie = encodeURIComponent(v) + "=" + y + ";";
|
|
73
|
+
} catch {
|
|
74
|
+
}
|
|
72
75
|
}
|
|
73
76
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if (!(typeof window === n || !v)) {
|
|
78
|
-
try {
|
|
79
|
-
d = window.localStorage[v];
|
|
80
|
-
} catch {
|
|
81
|
-
}
|
|
82
|
-
if (typeof d === n)
|
|
77
|
+
function te() {
|
|
78
|
+
var d;
|
|
79
|
+
if (!(typeof window === n || !v)) {
|
|
83
80
|
try {
|
|
84
|
-
|
|
85
|
-
re !== -1 && (d = /^([^;]+)/.exec(
|
|
86
|
-
g.slice(re + z.length + 1)
|
|
87
|
-
)[1]);
|
|
81
|
+
d = window.localStorage[v];
|
|
88
82
|
} catch {
|
|
89
83
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
84
|
+
if (typeof d === n)
|
|
85
|
+
try {
|
|
86
|
+
var y = window.document.cookie, O = encodeURIComponent(v), re = y.indexOf(O + "=");
|
|
87
|
+
re !== -1 && (d = /^([^;]+)/.exec(
|
|
88
|
+
y.slice(re + O.length + 1)
|
|
89
|
+
)[1]);
|
|
90
|
+
} catch {
|
|
91
|
+
}
|
|
92
|
+
return u.levels[d] === void 0 && (d = void 0), d;
|
|
98
93
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
}
|
|
95
|
+
function Re() {
|
|
96
|
+
if (!(typeof window === n || !v)) {
|
|
97
|
+
try {
|
|
98
|
+
window.localStorage.removeItem(v);
|
|
99
|
+
} catch {
|
|
100
|
+
}
|
|
101
|
+
try {
|
|
102
|
+
window.document.cookie = encodeURIComponent(v) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
103
|
+
} catch {
|
|
104
|
+
}
|
|
102
105
|
}
|
|
103
106
|
}
|
|
107
|
+
function U(d) {
|
|
108
|
+
var y = d;
|
|
109
|
+
if (typeof y == "string" && u.levels[y.toUpperCase()] !== void 0 && (y = u.levels[y.toUpperCase()]), typeof y == "number" && y >= 0 && y <= u.levels.SILENT)
|
|
110
|
+
return y;
|
|
111
|
+
throw new TypeError("log.setLevel() called with invalid level: " + d);
|
|
112
|
+
}
|
|
113
|
+
u.name = l, u.levels = {
|
|
114
|
+
TRACE: 0,
|
|
115
|
+
DEBUG: 1,
|
|
116
|
+
INFO: 2,
|
|
117
|
+
WARN: 3,
|
|
118
|
+
ERROR: 4,
|
|
119
|
+
SILENT: 5
|
|
120
|
+
}, u.methodFactory = g || T, u.getLevel = function() {
|
|
121
|
+
return R ?? $ ?? J;
|
|
122
|
+
}, u.setLevel = function(d, y) {
|
|
123
|
+
return R = U(d), y !== !1 && Ee(R), p.call(u);
|
|
124
|
+
}, u.setDefaultLevel = function(d) {
|
|
125
|
+
$ = U(d), te() || u.setLevel(d, !1);
|
|
126
|
+
}, u.resetLevel = function() {
|
|
127
|
+
R = null, Re(), p.call(u);
|
|
128
|
+
}, u.enableAll = function(d) {
|
|
129
|
+
u.setLevel(u.levels.TRACE, d);
|
|
130
|
+
}, u.disableAll = function(d) {
|
|
131
|
+
u.setLevel(u.levels.SILENT, d);
|
|
132
|
+
}, u.rebuild = function() {
|
|
133
|
+
if (i !== u && (J = U(i.getLevel())), p.call(u), i === u)
|
|
134
|
+
for (var d in r)
|
|
135
|
+
r[d].rebuild();
|
|
136
|
+
}, J = U(
|
|
137
|
+
i ? i.getLevel() : "WARN"
|
|
138
|
+
);
|
|
139
|
+
var ne = te();
|
|
140
|
+
ne != null && (R = U(ne)), p.call(u);
|
|
104
141
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
u.setLevel(u.levels.SILENT, d);
|
|
130
|
-
}, u.rebuild = function() {
|
|
131
|
-
if (i !== u && (O = U(i.getLevel())), f.call(u), i === u)
|
|
132
|
-
for (var d in r)
|
|
133
|
-
r[d].rebuild();
|
|
134
|
-
}, O = U(
|
|
135
|
-
i ? i.getLevel() : "WARN"
|
|
136
|
-
);
|
|
137
|
-
var ne = te();
|
|
138
|
-
ne != null && (R = U(ne)), f.call(u);
|
|
139
|
-
}
|
|
140
|
-
i = new h(), i.getLogger = function(m) {
|
|
141
|
-
if (typeof m != "symbol" && typeof m != "string" || m === "")
|
|
142
|
-
throw new TypeError("You must supply a name when creating a logger.");
|
|
143
|
-
var u = r[m];
|
|
144
|
-
return u || (u = r[m] = new h(
|
|
145
|
-
m,
|
|
146
|
-
i.methodFactory
|
|
147
|
-
)), u;
|
|
148
|
-
};
|
|
149
|
-
var J = typeof window !== n ? window.log : void 0;
|
|
150
|
-
return i.noConflict = function() {
|
|
151
|
-
return typeof window !== n && window.log === i && (window.log = J), i;
|
|
152
|
-
}, i.getLoggers = function() {
|
|
153
|
-
return r;
|
|
154
|
-
}, i.default = i, i;
|
|
155
|
-
});
|
|
156
|
-
})(pe);
|
|
157
|
-
var We = pe.exports;
|
|
158
|
-
const oe = /* @__PURE__ */ Oe(We);
|
|
159
|
-
let V;
|
|
160
|
-
var D, he;
|
|
161
|
-
(typeof navigator > "u" || !((he = (D = navigator.userAgent) == null ? void 0 : D.startsWith) != null && he.call(D, "Mozilla/5.0 "))) && (V = "oauth4webapi/v2.17.0");
|
|
162
|
-
function Z(t, e) {
|
|
142
|
+
i = new h(), i.getLogger = function(g) {
|
|
143
|
+
if (typeof g != "symbol" && typeof g != "string" || g === "")
|
|
144
|
+
throw new TypeError("You must supply a name when creating a logger.");
|
|
145
|
+
var u = r[g];
|
|
146
|
+
return u || (u = r[g] = new h(
|
|
147
|
+
g,
|
|
148
|
+
i.methodFactory
|
|
149
|
+
)), u;
|
|
150
|
+
};
|
|
151
|
+
var I = typeof window !== n ? window.log : void 0;
|
|
152
|
+
return i.noConflict = function() {
|
|
153
|
+
return typeof window !== n && window.log === i && (window.log = I), i;
|
|
154
|
+
}, i.getLoggers = function() {
|
|
155
|
+
return r;
|
|
156
|
+
}, i.default = i, i;
|
|
157
|
+
});
|
|
158
|
+
}(D)), D.exports;
|
|
159
|
+
}
|
|
160
|
+
var Ne = De();
|
|
161
|
+
const ae = /* @__PURE__ */ xe(Ne);
|
|
162
|
+
let B;
|
|
163
|
+
var z, pe;
|
|
164
|
+
(typeof navigator > "u" || !((pe = (z = navigator.userAgent) == null ? void 0 : z.startsWith) != null && pe.call(z, "Mozilla/5.0 "))) && (B = "oauth4webapi/v2.17.0");
|
|
165
|
+
function G(t, e) {
|
|
163
166
|
if (t == null)
|
|
164
167
|
return !1;
|
|
165
168
|
try {
|
|
@@ -168,19 +171,19 @@ function Z(t, e) {
|
|
|
168
171
|
return !1;
|
|
169
172
|
}
|
|
170
173
|
}
|
|
171
|
-
const
|
|
174
|
+
const W = Symbol(), We = Symbol(), Z = Symbol(), Ke = Symbol(), He = Symbol(), $e = Symbol(), Fe = new TextEncoder(), Me = new TextDecoder();
|
|
172
175
|
function E(t) {
|
|
173
|
-
return typeof t == "string" ?
|
|
176
|
+
return typeof t == "string" ? Fe.encode(t) : Me.decode(t);
|
|
174
177
|
}
|
|
175
|
-
const
|
|
178
|
+
const se = 32768;
|
|
176
179
|
function qe(t) {
|
|
177
180
|
t instanceof ArrayBuffer && (t = new Uint8Array(t));
|
|
178
181
|
const e = [];
|
|
179
|
-
for (let n = 0; n < t.byteLength; n +=
|
|
180
|
-
e.push(String.fromCharCode.apply(null, t.subarray(n, n +
|
|
182
|
+
for (let n = 0; n < t.byteLength; n += se)
|
|
183
|
+
e.push(String.fromCharCode.apply(null, t.subarray(n, n + se)));
|
|
181
184
|
return btoa(e.join("")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
182
185
|
}
|
|
183
|
-
function
|
|
186
|
+
function Be(t) {
|
|
184
187
|
try {
|
|
185
188
|
const e = atob(t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "")), n = new Uint8Array(e.length);
|
|
186
189
|
for (let o = 0; o < e.length; o++)
|
|
@@ -190,10 +193,10 @@ function Ve(t) {
|
|
|
190
193
|
throw new s("The input to be decoded is not correctly encoded.", { cause: e });
|
|
191
194
|
}
|
|
192
195
|
}
|
|
193
|
-
function
|
|
194
|
-
return typeof t == "string" ?
|
|
196
|
+
function k(t) {
|
|
197
|
+
return typeof t == "string" ? Be(t) : qe(t);
|
|
195
198
|
}
|
|
196
|
-
class
|
|
199
|
+
class Ve {
|
|
197
200
|
constructor(e) {
|
|
198
201
|
this.cache = /* @__PURE__ */ new Map(), this._cache = /* @__PURE__ */ new Map(), this.maxSize = e;
|
|
199
202
|
}
|
|
@@ -223,48 +226,48 @@ class S extends Error {
|
|
|
223
226
|
super(e ?? "operation not supported"), this.name = this.constructor.name, (n = Error.captureStackTrace) == null || n.call(Error, this, this.constructor);
|
|
224
227
|
}
|
|
225
228
|
}
|
|
226
|
-
class
|
|
229
|
+
class Ge extends Error {
|
|
227
230
|
constructor(e, n) {
|
|
228
231
|
var o;
|
|
229
232
|
super(e, n), this.name = this.constructor.name, (o = Error.captureStackTrace) == null || o.call(Error, this, this.constructor);
|
|
230
233
|
}
|
|
231
234
|
}
|
|
232
|
-
const s =
|
|
233
|
-
function
|
|
235
|
+
const s = Ge, we = new Ve(100);
|
|
236
|
+
function me(t) {
|
|
234
237
|
return t instanceof CryptoKey;
|
|
235
238
|
}
|
|
236
|
-
function
|
|
237
|
-
return
|
|
239
|
+
function Ze(t) {
|
|
240
|
+
return me(t) && t.type === "private";
|
|
238
241
|
}
|
|
239
242
|
function Ye(t) {
|
|
240
|
-
return
|
|
243
|
+
return me(t) && t.type === "public";
|
|
241
244
|
}
|
|
242
|
-
function
|
|
245
|
+
function Y(t) {
|
|
243
246
|
try {
|
|
244
247
|
const e = t.headers.get("dpop-nonce");
|
|
245
|
-
e &&
|
|
248
|
+
e && we.set(new URL(t.url).origin, e);
|
|
246
249
|
} catch {
|
|
247
250
|
}
|
|
248
251
|
return t;
|
|
249
252
|
}
|
|
250
|
-
function
|
|
253
|
+
function x(t) {
|
|
251
254
|
return !(t === null || typeof t != "object" || Array.isArray(t));
|
|
252
255
|
}
|
|
253
|
-
function
|
|
254
|
-
|
|
256
|
+
function K(t) {
|
|
257
|
+
G(t, Headers) && (t = Object.fromEntries(t.entries()));
|
|
255
258
|
const e = new Headers(t);
|
|
256
|
-
if (
|
|
259
|
+
if (B && !e.has("user-agent") && e.set("user-agent", B), e.has("authorization"))
|
|
257
260
|
throw new TypeError('"options.headers" must not include the "authorization" header name');
|
|
258
261
|
if (e.has("dpop"))
|
|
259
262
|
throw new TypeError('"options.headers" must not include the "dpop" header name');
|
|
260
263
|
return e;
|
|
261
264
|
}
|
|
262
|
-
function
|
|
265
|
+
function Qe(t) {
|
|
263
266
|
if (typeof t == "function" && (t = t()), !(t instanceof AbortSignal))
|
|
264
267
|
throw new TypeError('"options.signal" must return or be an instance of AbortSignal');
|
|
265
268
|
return t;
|
|
266
269
|
}
|
|
267
|
-
async function
|
|
270
|
+
async function Xe(t, e) {
|
|
268
271
|
if (!(t instanceof URL))
|
|
269
272
|
throw new TypeError('"issuerIdentifier" must be an instance of URL');
|
|
270
273
|
if (t.protocol !== "https:" && t.protocol !== "http:")
|
|
@@ -281,21 +284,21 @@ async function Qe(t, e) {
|
|
|
281
284
|
default:
|
|
282
285
|
throw new TypeError('"options.algorithm" must be "oidc" (default), or "oauth2"');
|
|
283
286
|
}
|
|
284
|
-
const o =
|
|
285
|
-
return o.set("accept", "application/json"), ((e == null ? void 0 : e[
|
|
287
|
+
const o = K(e == null ? void 0 : e.headers);
|
|
288
|
+
return o.set("accept", "application/json"), ((e == null ? void 0 : e[Z]) || fetch)(n.href, {
|
|
286
289
|
headers: Object.fromEntries(o.entries()),
|
|
287
290
|
method: "GET",
|
|
288
291
|
redirect: "manual",
|
|
289
|
-
signal:
|
|
290
|
-
}).then(
|
|
292
|
+
signal: null
|
|
293
|
+
}).then(Y);
|
|
291
294
|
}
|
|
292
|
-
function
|
|
295
|
+
function m(t) {
|
|
293
296
|
return typeof t == "string" && t.length !== 0;
|
|
294
297
|
}
|
|
295
|
-
async function
|
|
298
|
+
async function et(t, e) {
|
|
296
299
|
if (!(t instanceof URL))
|
|
297
300
|
throw new TypeError('"expectedIssuer" must be an instance of URL');
|
|
298
|
-
if (!
|
|
301
|
+
if (!G(e, Response))
|
|
299
302
|
throw new TypeError('"response" must be an instance of Response');
|
|
300
303
|
if (e.status !== 200)
|
|
301
304
|
throw new s('"response" is not a conform Authorization Server Metadata response');
|
|
@@ -306,46 +309,33 @@ async function Xe(t, e) {
|
|
|
306
309
|
} catch (o) {
|
|
307
310
|
throw new s('failed to parse "response" body as JSON', { cause: o });
|
|
308
311
|
}
|
|
309
|
-
if (!
|
|
312
|
+
if (!x(n))
|
|
310
313
|
throw new s('"response" body must be a top level object');
|
|
311
|
-
if (!
|
|
314
|
+
if (!m(n.issuer))
|
|
312
315
|
throw new s('"response" body "issuer" property must be a non-empty string');
|
|
313
316
|
if (new URL(n.issuer).href !== t.href)
|
|
314
317
|
throw new s('"response" body "issuer" does not match "expectedIssuer"');
|
|
315
318
|
return n;
|
|
316
319
|
}
|
|
317
|
-
function
|
|
318
|
-
return
|
|
319
|
-
}
|
|
320
|
-
function et() {
|
|
321
|
-
return H();
|
|
320
|
+
function Q() {
|
|
321
|
+
return k(crypto.getRandomValues(new Uint8Array(32)));
|
|
322
322
|
}
|
|
323
323
|
function tt() {
|
|
324
|
-
return
|
|
324
|
+
return Q();
|
|
325
|
+
}
|
|
326
|
+
function nt() {
|
|
327
|
+
return Q();
|
|
325
328
|
}
|
|
326
|
-
async function
|
|
327
|
-
if (!
|
|
329
|
+
async function rt(t) {
|
|
330
|
+
if (!m(t))
|
|
328
331
|
throw new TypeError('"codeVerifier" must be a non-empty string');
|
|
329
|
-
return
|
|
330
|
-
}
|
|
331
|
-
function rt(t) {
|
|
332
|
-
if (t instanceof CryptoKey)
|
|
333
|
-
return { key: t };
|
|
334
|
-
if (!((t == null ? void 0 : t.key) instanceof CryptoKey))
|
|
335
|
-
return {};
|
|
336
|
-
if (t.kid !== void 0 && !w(t.kid))
|
|
337
|
-
throw new TypeError('"kid" must be a non-empty string');
|
|
338
|
-
return {
|
|
339
|
-
key: t.key,
|
|
340
|
-
kid: t.kid,
|
|
341
|
-
modifyAssertion: t[we]
|
|
342
|
-
};
|
|
332
|
+
return k(await crypto.subtle.digest("SHA-256", E(t)));
|
|
343
333
|
}
|
|
344
|
-
function
|
|
334
|
+
function ce(t) {
|
|
345
335
|
return encodeURIComponent(t).replace(/%20/g, "+");
|
|
346
336
|
}
|
|
347
337
|
function ot(t, e) {
|
|
348
|
-
const n =
|
|
338
|
+
const n = ce(t), o = ce(e);
|
|
349
339
|
return `Basic ${btoa(`${n}:${o}`)}`;
|
|
350
340
|
}
|
|
351
341
|
function it(t) {
|
|
@@ -384,7 +374,7 @@ function st(t) {
|
|
|
384
374
|
throw new S("unsupported EcKeyAlgorithm namedCurve");
|
|
385
375
|
}
|
|
386
376
|
}
|
|
387
|
-
function
|
|
377
|
+
function ct(t) {
|
|
388
378
|
switch (t.algorithm.name) {
|
|
389
379
|
case "RSA-PSS":
|
|
390
380
|
return it(t);
|
|
@@ -399,120 +389,93 @@ function be(t) {
|
|
|
399
389
|
throw new S("unsupported CryptoKey algorithm name");
|
|
400
390
|
}
|
|
401
391
|
}
|
|
402
|
-
function
|
|
403
|
-
const e = t == null ? void 0 : t[
|
|
392
|
+
function H(t) {
|
|
393
|
+
const e = t == null ? void 0 : t[W];
|
|
404
394
|
return typeof e == "number" && Number.isFinite(e) ? e : 0;
|
|
405
395
|
}
|
|
406
|
-
function
|
|
407
|
-
const e = t == null ? void 0 : t[
|
|
396
|
+
function ge(t) {
|
|
397
|
+
const e = t == null ? void 0 : t[We];
|
|
408
398
|
return typeof e == "number" && Number.isFinite(e) && Math.sign(e) !== -1 ? e : 30;
|
|
409
399
|
}
|
|
410
|
-
function
|
|
400
|
+
function X() {
|
|
411
401
|
return Math.floor(Date.now() / 1e3);
|
|
412
402
|
}
|
|
413
|
-
function
|
|
414
|
-
const n = $() + x(e);
|
|
415
|
-
return {
|
|
416
|
-
jti: H(),
|
|
417
|
-
aud: [t.issuer, t.token_endpoint],
|
|
418
|
-
exp: n + 60,
|
|
419
|
-
iat: n,
|
|
420
|
-
nbf: n,
|
|
421
|
-
iss: e.client_id,
|
|
422
|
-
sub: e.client_id
|
|
423
|
-
};
|
|
424
|
-
}
|
|
425
|
-
async function ut(t, e, n, o, a) {
|
|
426
|
-
const r = { alg: be(n), kid: o }, i = ct(t, e);
|
|
427
|
-
return a == null || a(r, i), ve(r, i, n);
|
|
428
|
-
}
|
|
429
|
-
function I(t) {
|
|
403
|
+
function C(t) {
|
|
430
404
|
if (typeof t != "object" || t === null)
|
|
431
405
|
throw new TypeError('"as" must be an object');
|
|
432
|
-
if (!
|
|
406
|
+
if (!m(t.issuer))
|
|
433
407
|
throw new TypeError('"as.issuer" property must be a non-empty string');
|
|
434
408
|
return !0;
|
|
435
409
|
}
|
|
436
410
|
function j(t) {
|
|
437
411
|
if (typeof t != "object" || t === null)
|
|
438
412
|
throw new TypeError('"client" must be an object');
|
|
439
|
-
if (!
|
|
413
|
+
if (!m(t.client_id))
|
|
440
414
|
throw new TypeError('"client.client_id" property must be a non-empty string');
|
|
441
415
|
return !0;
|
|
442
416
|
}
|
|
443
|
-
function
|
|
444
|
-
if (!
|
|
417
|
+
function ue(t) {
|
|
418
|
+
if (!m(t))
|
|
445
419
|
throw new TypeError('"client.client_secret" property must be a non-empty string');
|
|
446
420
|
return t;
|
|
447
421
|
}
|
|
448
|
-
function
|
|
449
|
-
if (e !== void 0)
|
|
450
|
-
throw new TypeError(`"options.clientPrivateKey" property must not be provided when ${t} client authentication method is used.`);
|
|
451
|
-
}
|
|
452
|
-
function ce(t, e) {
|
|
422
|
+
function le(t, e) {
|
|
453
423
|
if (e !== void 0)
|
|
454
424
|
throw new TypeError(`"client.client_secret" property must not be provided when ${t} client authentication method is used.`);
|
|
455
425
|
}
|
|
456
|
-
async function
|
|
426
|
+
async function ut(t, e, n, o, a) {
|
|
457
427
|
switch (n.delete("client_secret"), n.delete("client_assertion_type"), n.delete("client_assertion"), e.token_endpoint_auth_method) {
|
|
458
428
|
case void 0:
|
|
459
429
|
case "client_secret_basic": {
|
|
460
|
-
|
|
430
|
+
o.set("authorization", ot(e.client_id, ue(e.client_secret)));
|
|
461
431
|
break;
|
|
462
432
|
}
|
|
463
433
|
case "client_secret_post": {
|
|
464
|
-
|
|
465
|
-
break;
|
|
466
|
-
}
|
|
467
|
-
case "private_key_jwt": {
|
|
468
|
-
if (ce("private_key_jwt", e.client_secret), a === void 0)
|
|
469
|
-
throw new TypeError('"options.clientPrivateKey" must be provided when "client.token_endpoint_auth_method" is "private_key_jwt"');
|
|
470
|
-
const { key: r, kid: i, modifyAssertion: c } = rt(a);
|
|
471
|
-
if (!ye(r))
|
|
472
|
-
throw new TypeError('"options.clientPrivateKey.key" must be a private CryptoKey');
|
|
473
|
-
n.set("client_id", e.client_id), n.set("client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"), n.set("client_assertion", await ut(t, e, r, i, c));
|
|
434
|
+
n.set("client_id", e.client_id), n.set("client_secret", ue(e.client_secret));
|
|
474
435
|
break;
|
|
475
436
|
}
|
|
437
|
+
case "private_key_jwt":
|
|
438
|
+
throw le("private_key_jwt", e.client_secret), new TypeError('"options.clientPrivateKey" must be provided when "client.token_endpoint_auth_method" is "private_key_jwt"');
|
|
476
439
|
case "tls_client_auth":
|
|
477
440
|
case "self_signed_tls_client_auth":
|
|
478
441
|
case "none": {
|
|
479
|
-
|
|
442
|
+
le(e.token_endpoint_auth_method, e.client_secret), e.token_endpoint_auth_method, n.set("client_id", e.client_id);
|
|
480
443
|
break;
|
|
481
444
|
}
|
|
482
445
|
default:
|
|
483
446
|
throw new S("unsupported client token_endpoint_auth_method");
|
|
484
447
|
}
|
|
485
448
|
}
|
|
486
|
-
async function
|
|
449
|
+
async function lt(t, e, n) {
|
|
487
450
|
if (!n.usages.includes("sign"))
|
|
488
451
|
throw new TypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"');
|
|
489
|
-
const o = `${
|
|
452
|
+
const o = `${k(E(JSON.stringify(t)))}.${k(E(JSON.stringify(e)))}`, a = k(await crypto.subtle.sign(Ae(n), n, E(o)));
|
|
490
453
|
return `${o}.${a}`;
|
|
491
454
|
}
|
|
492
455
|
async function dt(t, e, n, o, a, r) {
|
|
493
456
|
var T;
|
|
494
|
-
const { privateKey: i, publicKey: c, nonce:
|
|
495
|
-
if (!
|
|
457
|
+
const { privateKey: i, publicKey: c, nonce: f = we.get(n.origin) } = e;
|
|
458
|
+
if (!Ze(i))
|
|
496
459
|
throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
|
|
497
460
|
if (!Ye(c))
|
|
498
461
|
throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');
|
|
499
|
-
if (
|
|
462
|
+
if (f !== void 0 && !m(f))
|
|
500
463
|
throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');
|
|
501
464
|
if (!c.extractable)
|
|
502
465
|
throw new TypeError('"DPoP.publicKey.extractable" must be true');
|
|
503
|
-
const
|
|
504
|
-
alg:
|
|
466
|
+
const w = X() + a, p = {
|
|
467
|
+
alg: ct(i),
|
|
505
468
|
typ: "dpop+jwt",
|
|
506
469
|
jwk: await ft(c)
|
|
507
|
-
},
|
|
508
|
-
iat:
|
|
509
|
-
jti:
|
|
470
|
+
}, b = {
|
|
471
|
+
iat: w,
|
|
472
|
+
jti: Q(),
|
|
510
473
|
htm: o,
|
|
511
|
-
nonce:
|
|
474
|
+
nonce: f,
|
|
512
475
|
htu: `${n.origin}${n.pathname}`,
|
|
513
|
-
ath: r ?
|
|
476
|
+
ath: r ? k(await crypto.subtle.digest("SHA-256", E(r))) : void 0
|
|
514
477
|
};
|
|
515
|
-
(T = e[
|
|
478
|
+
(T = e[Ke]) == null || T.call(e, p, b), t.set("dpop", await lt(p, b, i));
|
|
516
479
|
}
|
|
517
480
|
let N;
|
|
518
481
|
async function ht(t) {
|
|
@@ -522,74 +485,74 @@ async function ht(t) {
|
|
|
522
485
|
async function ft(t) {
|
|
523
486
|
return N || (N = /* @__PURE__ */ new WeakMap()), N.get(t) || ht(t);
|
|
524
487
|
}
|
|
525
|
-
function
|
|
488
|
+
function de(t, e, n) {
|
|
526
489
|
if (typeof t != "string")
|
|
527
490
|
throw n ? new TypeError(`"as.mtls_endpoint_aliases.${e}" must be a string`) : new TypeError(`"as.${e}" must be a string`);
|
|
528
491
|
return new URL(t);
|
|
529
492
|
}
|
|
530
|
-
function
|
|
531
|
-
return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ?
|
|
493
|
+
function ye(t, e, n = !1) {
|
|
494
|
+
return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ? de(t.mtls_endpoint_aliases[e], e, n) : de(t[e], e, n);
|
|
532
495
|
}
|
|
533
|
-
function
|
|
534
|
-
return !!(t.use_mtls_endpoint_aliases || e != null && e[
|
|
496
|
+
function be(t, e) {
|
|
497
|
+
return !!(t.use_mtls_endpoint_aliases || e != null && e[$e]);
|
|
535
498
|
}
|
|
536
|
-
function
|
|
499
|
+
function V(t) {
|
|
537
500
|
const e = t;
|
|
538
501
|
return typeof e != "object" || Array.isArray(e) || e === null ? !1 : e.error !== void 0;
|
|
539
502
|
}
|
|
540
503
|
async function pt(t, e, n, o, a, r) {
|
|
541
|
-
if (!
|
|
504
|
+
if (!m(t))
|
|
542
505
|
throw new TypeError('"accessToken" must be a non-empty string');
|
|
543
506
|
if (!(n instanceof URL))
|
|
544
507
|
throw new TypeError('"url" must be an instance of URL');
|
|
545
|
-
return o =
|
|
508
|
+
return o = K(o), (r == null ? void 0 : r.DPoP) === void 0 ? o.set("authorization", `Bearer ${t}`) : (await dt(o, r.DPoP, n, e.toUpperCase(), H({ [W]: r == null ? void 0 : r[W] }), t), o.set("authorization", `DPoP ${t}`)), ((r == null ? void 0 : r[Z]) || fetch)(n.href, {
|
|
546
509
|
body: a,
|
|
547
510
|
headers: Object.fromEntries(o.entries()),
|
|
548
511
|
method: e,
|
|
549
512
|
redirect: "manual",
|
|
550
|
-
signal: r != null && r.signal ?
|
|
551
|
-
}).then(
|
|
513
|
+
signal: r != null && r.signal ? Qe(r.signal) : null
|
|
514
|
+
}).then(Y);
|
|
552
515
|
}
|
|
553
516
|
async function wt(t, e, n, o) {
|
|
554
|
-
|
|
555
|
-
const a =
|
|
517
|
+
C(t), j(e);
|
|
518
|
+
const a = ye(t, "userinfo_endpoint", be(e, o)), r = K(o == null ? void 0 : o.headers);
|
|
556
519
|
return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), pt(n, "GET", a, r, null, {
|
|
557
520
|
...o,
|
|
558
|
-
[
|
|
521
|
+
[W]: H(e)
|
|
559
522
|
});
|
|
560
523
|
}
|
|
561
524
|
async function mt(t, e, n, o, a, r, i) {
|
|
562
|
-
return await
|
|
525
|
+
return await ut(t, e, a, r), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), ((i == null ? void 0 : i[Z]) || fetch)(o.href, {
|
|
563
526
|
body: a,
|
|
564
527
|
headers: Object.fromEntries(r.entries()),
|
|
565
528
|
method: n,
|
|
566
529
|
redirect: "manual",
|
|
567
|
-
signal:
|
|
568
|
-
}).then(
|
|
530
|
+
signal: null
|
|
531
|
+
}).then(Y);
|
|
569
532
|
}
|
|
570
|
-
async function
|
|
571
|
-
const r =
|
|
533
|
+
async function _e(t, e, n, o, a) {
|
|
534
|
+
const r = ye(t, "token_endpoint", be(e, a));
|
|
572
535
|
o.set("grant_type", n);
|
|
573
|
-
const i =
|
|
536
|
+
const i = K(a == null ? void 0 : a.headers);
|
|
574
537
|
return i.set("accept", "application/json"), mt(t, e, "POST", r, o, i, a);
|
|
575
538
|
}
|
|
576
539
|
async function gt(t, e, n, o) {
|
|
577
|
-
if (
|
|
540
|
+
if (C(t), j(e), !m(n))
|
|
578
541
|
throw new TypeError('"refreshToken" must be a non-empty string');
|
|
579
542
|
const a = new URLSearchParams(o == null ? void 0 : o.additionalParameters);
|
|
580
|
-
return a.set("refresh_token", n),
|
|
543
|
+
return a.set("refresh_token", n), _e(t, e, "refresh_token", a, o);
|
|
581
544
|
}
|
|
582
|
-
const
|
|
545
|
+
const ve = /* @__PURE__ */ new WeakMap();
|
|
583
546
|
function yt(t) {
|
|
584
547
|
if (!t.id_token)
|
|
585
548
|
return;
|
|
586
|
-
const e =
|
|
549
|
+
const e = ve.get(t);
|
|
587
550
|
if (!e)
|
|
588
551
|
throw new TypeError('"ref" was already garbage collected or did not resolve from the proper sources');
|
|
589
552
|
return e[0];
|
|
590
553
|
}
|
|
591
|
-
async function
|
|
592
|
-
if (
|
|
554
|
+
async function Se(t, e, n, o = !1, a = !1) {
|
|
555
|
+
if (C(t), j(e), !G(n, Response))
|
|
593
556
|
throw new TypeError('"response" must be an instance of Response');
|
|
594
557
|
if (n.status !== 200) {
|
|
595
558
|
let i;
|
|
@@ -604,25 +567,25 @@ async function Ee(t, e, n, o = !1, a = !1) {
|
|
|
604
567
|
} catch (i) {
|
|
605
568
|
throw new s('failed to parse "response" body as JSON', { cause: i });
|
|
606
569
|
}
|
|
607
|
-
if (!
|
|
570
|
+
if (!x(r))
|
|
608
571
|
throw new s('"response" body must be a top level object');
|
|
609
|
-
if (!
|
|
572
|
+
if (!m(r.access_token))
|
|
610
573
|
throw new s('"response" body "access_token" property must be a non-empty string');
|
|
611
|
-
if (!
|
|
574
|
+
if (!m(r.token_type))
|
|
612
575
|
throw new s('"response" body "token_type" property must be a non-empty string');
|
|
613
576
|
if (r.token_type = r.token_type.toLowerCase(), r.token_type !== "dpop" && r.token_type !== "bearer")
|
|
614
577
|
throw new S("unsupported `token_type` value");
|
|
615
578
|
if (r.expires_in !== void 0 && (typeof r.expires_in != "number" || r.expires_in <= 0))
|
|
616
579
|
throw new s('"response" body "expires_in" property must be a positive number');
|
|
617
|
-
if (!a && r.refresh_token !== void 0 && !
|
|
580
|
+
if (!a && r.refresh_token !== void 0 && !m(r.refresh_token))
|
|
618
581
|
throw new s('"response" body "refresh_token" property must be a non-empty string');
|
|
619
582
|
if (r.scope !== void 0 && typeof r.scope != "string")
|
|
620
583
|
throw new s('"response" body "scope" property must be a string');
|
|
621
584
|
if (!o) {
|
|
622
|
-
if (r.id_token !== void 0 && !
|
|
585
|
+
if (r.id_token !== void 0 && !m(r.id_token))
|
|
623
586
|
throw new s('"response" body "id_token" property must be a non-empty string');
|
|
624
587
|
if (r.id_token) {
|
|
625
|
-
const { claims: i, jwt: c } = await
|
|
588
|
+
const { claims: i, jwt: c } = await xt(r.id_token, Ct.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), ke, H(e), ge(e), e[He]).then(kt.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(vt.bind(void 0, t.issuer)).then(_t.bind(void 0, e.client_id));
|
|
626
589
|
if (Array.isArray(i.aud) && i.aud.length !== 1) {
|
|
627
590
|
if (i.azp === void 0)
|
|
628
591
|
throw new s('ID Token "aud" (audience) claim includes additional untrusted audiences');
|
|
@@ -631,13 +594,13 @@ async function Ee(t, e, n, o = !1, a = !1) {
|
|
|
631
594
|
}
|
|
632
595
|
if (i.auth_time !== void 0 && (!Number.isFinite(i.auth_time) || Math.sign(i.auth_time) !== 1))
|
|
633
596
|
throw new s('ID Token "auth_time" (authentication time) must be a positive number');
|
|
634
|
-
|
|
597
|
+
ve.set(r, [i, c]);
|
|
635
598
|
}
|
|
636
599
|
}
|
|
637
600
|
return r;
|
|
638
601
|
}
|
|
639
602
|
async function bt(t, e, n) {
|
|
640
|
-
return
|
|
603
|
+
return Se(t, e, n);
|
|
641
604
|
}
|
|
642
605
|
function _t(t, e) {
|
|
643
606
|
if (Array.isArray(e.claims.aud)) {
|
|
@@ -652,24 +615,24 @@ function vt(t, e) {
|
|
|
652
615
|
throw new s('unexpected JWT "iss" (issuer) claim value');
|
|
653
616
|
return e;
|
|
654
617
|
}
|
|
655
|
-
const
|
|
618
|
+
const Te = /* @__PURE__ */ new WeakSet();
|
|
656
619
|
function St(t) {
|
|
657
|
-
return
|
|
620
|
+
return Te.add(t), t;
|
|
658
621
|
}
|
|
659
622
|
async function Tt(t, e, n, o, a, r) {
|
|
660
|
-
if (
|
|
623
|
+
if (C(t), j(e), !Te.has(n))
|
|
661
624
|
throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
|
|
662
|
-
if (!
|
|
625
|
+
if (!m(o))
|
|
663
626
|
throw new TypeError('"redirectUri" must be a non-empty string');
|
|
664
|
-
if (!
|
|
627
|
+
if (!m(a))
|
|
665
628
|
throw new TypeError('"codeVerifier" must be a non-empty string');
|
|
666
|
-
const i =
|
|
629
|
+
const i = A(n, "code");
|
|
667
630
|
if (!i)
|
|
668
631
|
throw new s('no authorization code in "callbackParameters"');
|
|
669
632
|
const c = new URLSearchParams(r == null ? void 0 : r.additionalParameters);
|
|
670
|
-
return c.set("redirect_uri", o), c.set("code_verifier", a), c.set("code", i),
|
|
633
|
+
return c.set("redirect_uri", o), c.set("code_verifier", a), c.set("code", i), _e(t, e, "authorization_code", c, r);
|
|
671
634
|
}
|
|
672
|
-
const
|
|
635
|
+
const At = {
|
|
673
636
|
aud: "audience",
|
|
674
637
|
c_hash: "code hash",
|
|
675
638
|
client_id: "client id",
|
|
@@ -685,28 +648,28 @@ const kt = {
|
|
|
685
648
|
htu: "http uri",
|
|
686
649
|
cnf: "confirmation"
|
|
687
650
|
};
|
|
688
|
-
function
|
|
651
|
+
function kt(t, e) {
|
|
689
652
|
for (const n of t)
|
|
690
653
|
if (e.claims[n] === void 0)
|
|
691
|
-
throw new s(`JWT "${n}" (${
|
|
654
|
+
throw new s(`JWT "${n}" (${At[n]}) claim missing`);
|
|
692
655
|
return e;
|
|
693
656
|
}
|
|
694
|
-
const Et = Symbol(),
|
|
657
|
+
const Et = Symbol(), F = Symbol();
|
|
695
658
|
async function Rt(t, e, n, o, a) {
|
|
696
|
-
const r = await
|
|
697
|
-
if (
|
|
659
|
+
const r = await Se(t, e, n);
|
|
660
|
+
if (V(r))
|
|
698
661
|
return r;
|
|
699
|
-
if (!
|
|
662
|
+
if (!m(r.id_token))
|
|
700
663
|
throw new s('"response" body "id_token" property must be a non-empty string');
|
|
701
|
-
a ?? (a = e.default_max_age ??
|
|
664
|
+
a ?? (a = e.default_max_age ?? F);
|
|
702
665
|
const i = yt(r);
|
|
703
|
-
if ((e.require_auth_time || a !==
|
|
666
|
+
if ((e.require_auth_time || a !== F) && i.auth_time === void 0)
|
|
704
667
|
throw new s('ID Token "auth_time" (authentication time) claim missing');
|
|
705
|
-
if (a !==
|
|
668
|
+
if (a !== F) {
|
|
706
669
|
if (typeof a != "number" || a < 0)
|
|
707
670
|
throw new TypeError('"maxAge" must be a non-negative number');
|
|
708
|
-
const c =
|
|
709
|
-
if (i.auth_time + a < c -
|
|
671
|
+
const c = X() + H(e), f = ge(e);
|
|
672
|
+
if (i.auth_time + a < c - f)
|
|
710
673
|
throw new s("too much time has elapsed since the last End-User authentication");
|
|
711
674
|
}
|
|
712
675
|
switch (o) {
|
|
@@ -716,7 +679,7 @@ async function Rt(t, e, n, o, a) {
|
|
|
716
679
|
throw new s('unexpected ID Token "nonce" claim value');
|
|
717
680
|
break;
|
|
718
681
|
default:
|
|
719
|
-
if (!
|
|
682
|
+
if (!m(o))
|
|
720
683
|
throw new TypeError('"expectedNonce" must be a non-empty string');
|
|
721
684
|
if (i.nonce === void 0)
|
|
722
685
|
throw new s('ID Token "nonce" claim missing');
|
|
@@ -734,13 +697,13 @@ async function Pt(t) {
|
|
|
734
697
|
ee(t);
|
|
735
698
|
try {
|
|
736
699
|
const e = await t.json();
|
|
737
|
-
if (
|
|
700
|
+
if (x(e) && typeof e.error == "string" && e.error.length)
|
|
738
701
|
return e.error_description !== void 0 && typeof e.error_description != "string" && delete e.error_description, e.error_uri !== void 0 && typeof e.error_uri != "string" && delete e.error_uri, e.algs !== void 0 && typeof e.algs != "string" && delete e.algs, e.scope !== void 0 && typeof e.scope != "string" && delete e.scope, e;
|
|
739
702
|
} catch {
|
|
740
703
|
}
|
|
741
704
|
}
|
|
742
705
|
}
|
|
743
|
-
function
|
|
706
|
+
function he(t) {
|
|
744
707
|
if (typeof t.modulusLength != "number" || t.modulusLength < 2048)
|
|
745
708
|
throw new s(`${t.name} modulusLength must be at least 2048 bits`);
|
|
746
709
|
}
|
|
@@ -756,7 +719,7 @@ function Ut(t) {
|
|
|
756
719
|
throw new S();
|
|
757
720
|
}
|
|
758
721
|
}
|
|
759
|
-
function
|
|
722
|
+
function Ae(t) {
|
|
760
723
|
switch (t.algorithm.name) {
|
|
761
724
|
case "ECDSA":
|
|
762
725
|
return {
|
|
@@ -764,7 +727,7 @@ function Pe(t) {
|
|
|
764
727
|
hash: Ut(t.algorithm.namedCurve)
|
|
765
728
|
};
|
|
766
729
|
case "RSA-PSS":
|
|
767
|
-
switch (
|
|
730
|
+
switch (he(t.algorithm), t.algorithm.hash.name) {
|
|
768
731
|
case "SHA-256":
|
|
769
732
|
case "SHA-384":
|
|
770
733
|
case "SHA-512":
|
|
@@ -776,54 +739,54 @@ function Pe(t) {
|
|
|
776
739
|
throw new S();
|
|
777
740
|
}
|
|
778
741
|
case "RSASSA-PKCS1-v1_5":
|
|
779
|
-
return
|
|
742
|
+
return he(t.algorithm), t.algorithm.name;
|
|
780
743
|
case "Ed448":
|
|
781
744
|
case "Ed25519":
|
|
782
745
|
return t.algorithm.name;
|
|
783
746
|
}
|
|
784
747
|
throw new S();
|
|
785
748
|
}
|
|
786
|
-
const
|
|
787
|
-
async function
|
|
749
|
+
const ke = Symbol();
|
|
750
|
+
async function Lt(t, e, n, o) {
|
|
788
751
|
const a = `${t}.${e}`;
|
|
789
|
-
if (!await crypto.subtle.verify(
|
|
752
|
+
if (!await crypto.subtle.verify(Ae(n), n, o, E(a)))
|
|
790
753
|
throw new s("JWT signature verification failed");
|
|
791
754
|
}
|
|
792
|
-
async function
|
|
793
|
-
let { 0: i, 1: c, 2:
|
|
794
|
-
if (
|
|
755
|
+
async function xt(t, e, n, o, a, r) {
|
|
756
|
+
let { 0: i, 1: c, 2: f, length: w } = t.split(".");
|
|
757
|
+
if (w === 5)
|
|
795
758
|
if (r !== void 0)
|
|
796
|
-
t = await r(t), { 0: i, 1: c, 2:
|
|
759
|
+
t = await r(t), { 0: i, 1: c, 2: f, length: w } = t.split(".");
|
|
797
760
|
else
|
|
798
761
|
throw new S("JWE structure JWTs are not supported");
|
|
799
|
-
if (
|
|
762
|
+
if (w !== 3)
|
|
800
763
|
throw new s("Invalid JWT");
|
|
801
|
-
let
|
|
764
|
+
let p;
|
|
802
765
|
try {
|
|
803
|
-
|
|
766
|
+
p = JSON.parse(E(k(i)));
|
|
804
767
|
} catch (l) {
|
|
805
768
|
throw new s("failed to parse JWT Header body as base64url encoded JSON", { cause: l });
|
|
806
769
|
}
|
|
807
|
-
if (!
|
|
770
|
+
if (!x(p))
|
|
808
771
|
throw new s("JWT Header must be a top level object");
|
|
809
|
-
if (e(
|
|
772
|
+
if (e(p), p.crit !== void 0)
|
|
810
773
|
throw new s('unexpected JWT "crit" header parameter');
|
|
811
|
-
const
|
|
774
|
+
const b = k(f);
|
|
812
775
|
let T;
|
|
813
|
-
n !==
|
|
776
|
+
n !== ke && (T = await n(p), await Lt(i, c, T, b));
|
|
814
777
|
let h;
|
|
815
778
|
try {
|
|
816
|
-
h = JSON.parse(E(
|
|
779
|
+
h = JSON.parse(E(k(c)));
|
|
817
780
|
} catch (l) {
|
|
818
781
|
throw new s("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
|
|
819
782
|
}
|
|
820
|
-
if (!
|
|
783
|
+
if (!x(h))
|
|
821
784
|
throw new s("JWT Payload must be a top level object");
|
|
822
|
-
const
|
|
785
|
+
const I = X() + o;
|
|
823
786
|
if (h.exp !== void 0) {
|
|
824
787
|
if (typeof h.exp != "number")
|
|
825
788
|
throw new s('unexpected JWT "exp" (expiration time) claim type');
|
|
826
|
-
if (h.exp <=
|
|
789
|
+
if (h.exp <= I - a)
|
|
827
790
|
throw new s('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()');
|
|
828
791
|
}
|
|
829
792
|
if (h.iat !== void 0 && typeof h.iat != "number")
|
|
@@ -833,14 +796,14 @@ async function Lt(t, e, n, o, a, r) {
|
|
|
833
796
|
if (h.nbf !== void 0) {
|
|
834
797
|
if (typeof h.nbf != "number")
|
|
835
798
|
throw new s('unexpected JWT "nbf" (not before) claim type');
|
|
836
|
-
if (h.nbf >
|
|
799
|
+
if (h.nbf > I + a)
|
|
837
800
|
throw new s('unexpected JWT "nbf" (not before) claim value, timestamp is > now()');
|
|
838
801
|
}
|
|
839
802
|
if (h.aud !== void 0 && typeof h.aud != "string" && !Array.isArray(h.aud))
|
|
840
803
|
throw new s('unexpected JWT "aud" (audience) claim type');
|
|
841
|
-
return { header:
|
|
804
|
+
return { header: p, claims: h, signature: b, key: T, jwt: t };
|
|
842
805
|
}
|
|
843
|
-
function
|
|
806
|
+
function Ct(t, e, n) {
|
|
844
807
|
if (t !== void 0) {
|
|
845
808
|
if (n.alg !== t)
|
|
846
809
|
throw new s('unexpected JWT "alg" header parameter');
|
|
@@ -854,62 +817,62 @@ function xt(t, e, n) {
|
|
|
854
817
|
if (n.alg !== "RS256")
|
|
855
818
|
throw new s('unexpected JWT "alg" header parameter');
|
|
856
819
|
}
|
|
857
|
-
function
|
|
820
|
+
function A(t, e) {
|
|
858
821
|
const { 0: n, length: o } = t.getAll(e);
|
|
859
822
|
if (o > 1)
|
|
860
823
|
throw new s(`"${e}" parameter must be provided only once`);
|
|
861
824
|
return n;
|
|
862
825
|
}
|
|
863
|
-
const
|
|
826
|
+
const jt = Symbol(), It = Symbol();
|
|
864
827
|
function Jt(t, e, n, o) {
|
|
865
|
-
if (
|
|
828
|
+
if (C(t), j(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
|
|
866
829
|
throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
|
|
867
|
-
if (
|
|
830
|
+
if (A(n, "response"))
|
|
868
831
|
throw new s('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');
|
|
869
|
-
const a =
|
|
832
|
+
const a = A(n, "iss"), r = A(n, "state");
|
|
870
833
|
if (!a && t.authorization_response_iss_parameter_supported)
|
|
871
834
|
throw new s('response parameter "iss" (issuer) missing');
|
|
872
835
|
if (a && a !== t.issuer)
|
|
873
836
|
throw new s('unexpected "iss" (issuer) response parameter value');
|
|
874
837
|
switch (o) {
|
|
875
838
|
case void 0:
|
|
876
|
-
case
|
|
839
|
+
case It:
|
|
877
840
|
if (r !== void 0)
|
|
878
841
|
throw new s('unexpected "state" response parameter encountered');
|
|
879
842
|
break;
|
|
880
|
-
case
|
|
843
|
+
case jt:
|
|
881
844
|
break;
|
|
882
845
|
default:
|
|
883
|
-
if (!
|
|
846
|
+
if (!m(o))
|
|
884
847
|
throw new s('"expectedState" must be a non-empty string');
|
|
885
848
|
if (r === void 0)
|
|
886
849
|
throw new s('response parameter "state" missing');
|
|
887
850
|
if (r !== o)
|
|
888
851
|
throw new s('unexpected "state" response parameter value');
|
|
889
852
|
}
|
|
890
|
-
const i =
|
|
853
|
+
const i = A(n, "error");
|
|
891
854
|
if (i)
|
|
892
855
|
return {
|
|
893
856
|
error: i,
|
|
894
|
-
error_description:
|
|
895
|
-
error_uri:
|
|
857
|
+
error_description: A(n, "error_description"),
|
|
858
|
+
error_uri: A(n, "error_uri")
|
|
896
859
|
};
|
|
897
|
-
const c =
|
|
898
|
-
if (c !== void 0 ||
|
|
860
|
+
const c = A(n, "id_token"), f = A(n, "token");
|
|
861
|
+
if (c !== void 0 || f !== void 0)
|
|
899
862
|
throw new S("implicit and hybrid flows are not supported");
|
|
900
863
|
return St(new URLSearchParams(n));
|
|
901
864
|
}
|
|
902
865
|
function Ot({
|
|
903
866
|
handleCallback: t
|
|
904
867
|
}) {
|
|
905
|
-
const e =
|
|
868
|
+
const e = Ie({
|
|
906
869
|
retry: !1,
|
|
907
870
|
queryKey: ["oauth-callback"],
|
|
908
871
|
queryFn: async () => {
|
|
909
872
|
try {
|
|
910
873
|
return await t();
|
|
911
874
|
} catch (n) {
|
|
912
|
-
throw new
|
|
875
|
+
throw new Oe("Could not validate user", {
|
|
913
876
|
cause: n,
|
|
914
877
|
title: "Authentication Error",
|
|
915
878
|
developerHint: "Check the configuration of your authorization provider and ensure all settings such as the callback URL are configured correctly."
|
|
@@ -917,17 +880,17 @@ function Ot({
|
|
|
917
880
|
}
|
|
918
881
|
}
|
|
919
882
|
});
|
|
920
|
-
return /* @__PURE__ */
|
|
883
|
+
return /* @__PURE__ */ q.jsx(Je, { to: e.data });
|
|
921
884
|
}
|
|
922
885
|
class P extends Error {
|
|
923
886
|
}
|
|
924
|
-
class
|
|
887
|
+
class fe extends P {
|
|
925
888
|
constructor(e, n, o) {
|
|
926
889
|
super(e, o), this.error = n;
|
|
927
890
|
}
|
|
928
891
|
}
|
|
929
|
-
const
|
|
930
|
-
class zt extends
|
|
892
|
+
const M = "code-verifier";
|
|
893
|
+
class zt extends je {
|
|
931
894
|
constructor(e, n) {
|
|
932
895
|
super(), this.callbackUrlPath = e, this.handleCallback = n;
|
|
933
896
|
}
|
|
@@ -936,7 +899,7 @@ class zt extends ze {
|
|
|
936
899
|
...super.getRoutes(),
|
|
937
900
|
{
|
|
938
901
|
path: this.callbackUrlPath,
|
|
939
|
-
element: /* @__PURE__ */
|
|
902
|
+
element: /* @__PURE__ */ q.jsx(Ce, { children: /* @__PURE__ */ q.jsx(Ot, { handleCallback: this.handleCallback }) })
|
|
940
903
|
}
|
|
941
904
|
];
|
|
942
905
|
}
|
|
@@ -948,20 +911,23 @@ class Dt {
|
|
|
948
911
|
clientId: o,
|
|
949
912
|
redirectToAfterSignUp: a,
|
|
950
913
|
redirectToAfterSignIn: r,
|
|
951
|
-
redirectToAfterSignOut: i
|
|
914
|
+
redirectToAfterSignOut: i,
|
|
915
|
+
basePath: c,
|
|
916
|
+
scopes: f
|
|
952
917
|
}) {
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
918
|
+
_(this, "client");
|
|
919
|
+
_(this, "issuer");
|
|
920
|
+
_(this, "authorizationServer");
|
|
921
|
+
_(this, "callbackUrlPath");
|
|
922
|
+
_(this, "logoutRedirectUrlPath");
|
|
923
|
+
_(this, "onAuthorizationUrl");
|
|
924
|
+
_(this, "redirectToAfterSignUp");
|
|
925
|
+
_(this, "redirectToAfterSignIn");
|
|
926
|
+
_(this, "redirectToAfterSignOut");
|
|
927
|
+
_(this, "audience");
|
|
928
|
+
_(this, "scopes");
|
|
929
|
+
_(this, "signOut", async () => {
|
|
930
|
+
L.setState({
|
|
965
931
|
isAuthenticated: !1,
|
|
966
932
|
isPending: !1,
|
|
967
933
|
profile: void 0,
|
|
@@ -977,9 +943,9 @@ class Dt {
|
|
|
977
943
|
n.toString()
|
|
978
944
|
)) : o = n;
|
|
979
945
|
});
|
|
980
|
-
|
|
981
|
-
const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(
|
|
982
|
-
if (sessionStorage.removeItem(
|
|
946
|
+
_(this, "handleCallback", async () => {
|
|
947
|
+
const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(M);
|
|
948
|
+
if (sessionStorage.removeItem(M), !o)
|
|
983
949
|
throw new P("No code verifier found in state.");
|
|
984
950
|
const a = await this.getAuthServer(), r = Jt(
|
|
985
951
|
a,
|
|
@@ -987,37 +953,37 @@ class Dt {
|
|
|
987
953
|
e.searchParams,
|
|
988
954
|
n ?? void 0
|
|
989
955
|
);
|
|
990
|
-
if (
|
|
991
|
-
throw
|
|
956
|
+
if (V(r))
|
|
957
|
+
throw ae.error("Error validating OAuth response", r), new fe(
|
|
992
958
|
"Error validating OAuth response",
|
|
993
959
|
r
|
|
994
960
|
);
|
|
995
961
|
const i = new URL(e);
|
|
996
|
-
i.pathname = this.
|
|
962
|
+
i.pathname = this.callbackUrlPath, i.search = "";
|
|
997
963
|
const c = await Tt(
|
|
998
964
|
a,
|
|
999
965
|
this.client,
|
|
1000
966
|
r,
|
|
1001
967
|
i.toString(),
|
|
1002
968
|
o
|
|
1003
|
-
),
|
|
969
|
+
), f = await Rt(
|
|
1004
970
|
a,
|
|
1005
971
|
this.client,
|
|
1006
972
|
c
|
|
1007
973
|
);
|
|
1008
|
-
this.setTokensFromResponse(
|
|
1009
|
-
const
|
|
974
|
+
this.setTokensFromResponse(f);
|
|
975
|
+
const w = await this.getAccessToken(), b = await (await wt(
|
|
1010
976
|
a,
|
|
1011
977
|
this.client,
|
|
1012
|
-
|
|
978
|
+
w
|
|
1013
979
|
)).json(), T = {
|
|
1014
|
-
sub:
|
|
1015
|
-
email:
|
|
1016
|
-
name:
|
|
1017
|
-
emailVerified:
|
|
1018
|
-
pictureUrl:
|
|
980
|
+
sub: b.sub,
|
|
981
|
+
email: b.email,
|
|
982
|
+
name: b.name,
|
|
983
|
+
emailVerified: b.email_verified ?? !1,
|
|
984
|
+
pictureUrl: b.picture
|
|
1019
985
|
};
|
|
1020
|
-
|
|
986
|
+
L.setState({
|
|
1021
987
|
isAuthenticated: !0,
|
|
1022
988
|
isPending: !1,
|
|
1023
989
|
profile: T
|
|
@@ -1028,12 +994,14 @@ class Dt {
|
|
|
1028
994
|
this.client = {
|
|
1029
995
|
client_id: o,
|
|
1030
996
|
token_endpoint_auth_method: "none"
|
|
1031
|
-
}, this.audience = n, this.issuer = e, this.
|
|
997
|
+
}, this.audience = n, this.issuer = e, this.callbackUrlPath = oe(c, "/oauth/callback"), this.scopes = f ?? ["openid", "profile", "email"];
|
|
998
|
+
const w = oe(c, "/");
|
|
999
|
+
this.logoutRedirectUrlPath = w, this.redirectToAfterSignUp = a ?? w, this.redirectToAfterSignIn = r ?? w, this.redirectToAfterSignOut = i ?? w;
|
|
1032
1000
|
}
|
|
1033
1001
|
async getAuthServer() {
|
|
1034
1002
|
if (!this.authorizationServer) {
|
|
1035
|
-
const e = new URL(this.issuer), n = await
|
|
1036
|
-
this.authorizationServer = await
|
|
1003
|
+
const e = new URL(this.issuer), n = await Xe(e);
|
|
1004
|
+
this.authorizationServer = await et(
|
|
1037
1005
|
e,
|
|
1038
1006
|
n
|
|
1039
1007
|
);
|
|
@@ -1045,17 +1013,18 @@ class Dt {
|
|
|
1045
1013
|
* @param response
|
|
1046
1014
|
*/
|
|
1047
1015
|
setTokensFromResponse(e) {
|
|
1048
|
-
if (
|
|
1049
|
-
throw
|
|
1016
|
+
if (V(e))
|
|
1017
|
+
throw ae.error("Bad Token Response", e), new fe("Bad Token Response", e);
|
|
1050
1018
|
if (!e.expires_in)
|
|
1051
1019
|
throw new P("No expires_in in response");
|
|
1052
1020
|
const n = {
|
|
1053
1021
|
accessToken: e.access_token,
|
|
1054
1022
|
refreshToken: e.refresh_token,
|
|
1023
|
+
idToken: e.id_token,
|
|
1055
1024
|
expiresOn: new Date(Date.now() + e.expires_in * 1e3),
|
|
1056
1025
|
tokenType: e.token_type
|
|
1057
1026
|
};
|
|
1058
|
-
|
|
1027
|
+
L.setState({
|
|
1059
1028
|
providerData: n
|
|
1060
1029
|
});
|
|
1061
1030
|
}
|
|
@@ -1074,37 +1043,37 @@ class Dt {
|
|
|
1074
1043
|
redirectTo: e,
|
|
1075
1044
|
isSignUp: n = !1
|
|
1076
1045
|
}) {
|
|
1077
|
-
var
|
|
1046
|
+
var w, p;
|
|
1078
1047
|
const o = "S256", a = await this.getAuthServer();
|
|
1079
1048
|
if (!a.authorization_endpoint)
|
|
1080
1049
|
throw new P("No authorization endpoint");
|
|
1081
|
-
const r =
|
|
1082
|
-
sessionStorage.setItem(
|
|
1050
|
+
const r = tt(), i = await rt(r);
|
|
1051
|
+
sessionStorage.setItem(M, r);
|
|
1083
1052
|
const c = new URL(
|
|
1084
1053
|
a.authorization_endpoint
|
|
1085
1054
|
);
|
|
1086
1055
|
sessionStorage.setItem("redirect-to", e);
|
|
1087
|
-
const
|
|
1088
|
-
if (
|
|
1056
|
+
const f = new URL(window.location.origin);
|
|
1057
|
+
if (f.pathname = this.callbackUrlPath, f.search = "", c.searchParams.set("client_id", this.client.client_id), c.searchParams.set("redirect_uri", f.toString()), c.searchParams.set("response_type", "code"), c.searchParams.set("scope", this.scopes.join(" ")), c.searchParams.set("code_challenge", i), c.searchParams.set(
|
|
1089
1058
|
"code_challenge_method",
|
|
1090
1059
|
o
|
|
1091
|
-
), this.audience && c.searchParams.set("audience", this.audience), (
|
|
1060
|
+
), this.audience && c.searchParams.set("audience", this.audience), (w = this.onAuthorizationUrl) == null || w.call(this, c, {
|
|
1092
1061
|
isSignIn: !n,
|
|
1093
1062
|
isSignUp: n
|
|
1094
|
-
}), ((
|
|
1095
|
-
const
|
|
1096
|
-
c.searchParams.set("state",
|
|
1063
|
+
}), ((p = a.code_challenge_methods_supported) == null ? void 0 : p.includes("S256")) !== !0) {
|
|
1064
|
+
const b = nt();
|
|
1065
|
+
c.searchParams.set("state", b);
|
|
1097
1066
|
}
|
|
1098
1067
|
location.href = c.href;
|
|
1099
1068
|
}
|
|
1100
1069
|
async getAccessToken() {
|
|
1101
|
-
const e = await this.getAuthServer(), { providerData: n } =
|
|
1070
|
+
const e = await this.getAuthServer(), { providerData: n } = L.getState();
|
|
1102
1071
|
if (!n)
|
|
1103
1072
|
throw new P("User is not authenticated");
|
|
1104
1073
|
const o = n;
|
|
1105
1074
|
if (new Date(o.expiresOn) < /* @__PURE__ */ new Date()) {
|
|
1106
1075
|
if (!o.refreshToken)
|
|
1107
|
-
return
|
|
1076
|
+
return L.setState({
|
|
1108
1077
|
isAuthenticated: !1,
|
|
1109
1078
|
isPending: !1,
|
|
1110
1079
|
profile: null,
|
|
@@ -1129,9 +1098,9 @@ class Dt {
|
|
|
1129
1098
|
return new zt(this.callbackUrlPath, this.handleCallback);
|
|
1130
1099
|
}
|
|
1131
1100
|
}
|
|
1132
|
-
const
|
|
1101
|
+
const Vt = (t) => new Dt(t);
|
|
1133
1102
|
export {
|
|
1134
1103
|
Dt as OpenIDAuthenticationProvider,
|
|
1135
|
-
|
|
1104
|
+
Vt as default
|
|
1136
1105
|
};
|
|
1137
1106
|
//# sourceMappingURL=zudoku.auth-openid.js.map
|