zudoku 0.0.0-fed343e → 0.0.0-ff3751f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +121 -0
- package/cli.js +2 -2
- package/dist/app/entry.client.js +2 -2
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.js +3 -0
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.d.ts +1 -0
- package/dist/app/main.js +12 -29
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/cli.js +1 -2
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/common/machine-id/lib.js.map +1 -1
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/cli/common/utils/box.js.map +1 -1
- package/dist/cli/dev/handler.js +2 -2
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/config.d.ts +2 -6
- package/dist/config/validators/InputSidebarSchema.d.ts +21 -5
- package/dist/config/validators/InputSidebarSchema.js +7 -28
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/SidebarSchema.d.ts +24 -1
- package/dist/config/validators/SidebarSchema.js +80 -44
- package/dist/config/validators/SidebarSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +590 -311
- package/dist/config/validators/validate.js +42 -19
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js +21 -31
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +1 -1
- package/dist/lib/authentication/hook.js +1 -1
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +16 -0
- package/dist/lib/authentication/state.js +5 -0
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/Banner.js +7 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/ErrorPage.js +1 -2
- package/dist/lib/components/ErrorPage.js.map +1 -1
- package/dist/lib/components/Header.js +6 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/InlineCode.d.ts +2 -1
- package/dist/lib/components/InlineCode.js +9 -1
- package/dist/lib/components/InlineCode.js.map +1 -1
- package/dist/lib/components/Layout.js +1 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +5 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/Search.js +1 -1
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/SlotletProvider.d.ts +10 -2
- package/dist/lib/components/SlotletProvider.js +4 -2
- package/dist/lib/components/SlotletProvider.js.map +1 -1
- package/dist/lib/components/SyntaxHighlight.js +4 -1
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +3 -0
- package/dist/lib/components/TopNavigation.js +38 -5
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +6 -10
- package/dist/lib/components/context/ZudokuContext.js +26 -20
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +18 -8
- package/dist/lib/components/index.js +10 -3
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.js +3 -3
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +18 -9
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +12 -7
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/utils.js +10 -14
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/DevPortalContext.d.ts +4 -7
- package/dist/lib/core/DevPortalContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.d.ts +1 -1
- package/dist/lib/errors/ErrorAlert.js +8 -3
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/oas/graphql/index.d.ts +2 -1
- package/dist/lib/oas/graphql/index.js +24 -16
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/index.d.ts +1 -0
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/custom-pages/CustomPage.d.ts +2 -0
- package/dist/lib/plugins/custom-pages/CustomPage.js +11 -0
- package/dist/lib/plugins/custom-pages/CustomPage.js.map +1 -0
- package/dist/lib/plugins/custom-pages/index.d.ts +10 -0
- package/dist/lib/plugins/custom-pages/index.js +11 -0
- package/dist/lib/plugins/custom-pages/index.js.map +1 -0
- package/dist/lib/plugins/markdown/MdxPage.js +2 -2
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +5 -5
- package/dist/lib/plugins/markdown/index.js +31 -3
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +38 -0
- package/dist/lib/plugins/markdown/resolver.js +75 -0
- package/dist/lib/plugins/markdown/resolver.js.map +1 -0
- package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -3
- package/dist/lib/plugins/openapi/Endpoint.js +46 -8
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +2 -2
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +2 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +2 -2
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.d.ts +1 -1
- package/dist/lib/plugins/openapi/Route.js +1 -1
- package/dist/lib/plugins/openapi/Route.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +17 -6
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SimpleSelect.d.ts +2 -1
- package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
- package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
- package/dist/lib/plugins/openapi/client/createMemoryClient.js +1 -1
- package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -1
- package/dist/lib/plugins/openapi/client/createWorkerClient.js +1 -1
- package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -1
- package/dist/lib/plugins/openapi/client/worker.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +10 -2
- package/dist/lib/plugins/openapi/graphql/gql.js +2 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +29 -3
- package/dist/lib/plugins/openapi/graphql/graphql.js +87 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +1 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +3 -0
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +2 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +15 -6
- 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/ResponseTab.js +1 -1
- package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/createUrl.js +3 -1
- package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -1
- package/dist/lib/plugins/redirect/index.d.ts +2 -5
- package/dist/lib/plugins/redirect/index.js +1 -1
- package/dist/lib/plugins/redirect/index.js.map +1 -1
- package/dist/lib/ui/Accordion.d.ts +7 -0
- package/dist/lib/ui/Accordion.js +14 -0
- package/dist/lib/ui/Accordion.js.map +1 -0
- package/dist/lib/ui/Alert.d.ts +8 -0
- package/dist/lib/ui/Alert.js +23 -0
- package/dist/lib/ui/Alert.js.map +1 -0
- package/dist/lib/ui/AlertDialog.d.ts +20 -0
- package/dist/lib/ui/AlertDialog.js +27 -0
- package/dist/lib/ui/AlertDialog.js.map +1 -0
- package/dist/lib/ui/AspectRatio.d.ts +3 -0
- package/dist/lib/ui/AspectRatio.js +4 -0
- package/dist/lib/ui/AspectRatio.js.map +1 -0
- package/dist/lib/ui/Badge.d.ts +9 -0
- package/dist/lib/ui/Badge.js +21 -0
- package/dist/lib/ui/Badge.js.map +1 -0
- package/dist/lib/ui/Breadcrumb.d.ts +19 -0
- package/dist/lib/ui/Breadcrumb.js +24 -0
- package/dist/lib/ui/Breadcrumb.js.map +1 -0
- package/dist/lib/ui/Button.d.ts +2 -3
- package/dist/lib/ui/Button.js +1 -1
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Callout.d.ts +36 -35
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Carousel.d.ts +18 -0
- package/dist/lib/ui/Carousel.js +99 -0
- package/dist/lib/ui/Carousel.js.map +1 -0
- package/dist/lib/ui/Checkbox.d.ts +4 -0
- package/dist/lib/ui/Checkbox.js +9 -0
- package/dist/lib/ui/Checkbox.js.map +1 -0
- package/dist/lib/ui/Collapsible.d.ts +5 -0
- package/dist/lib/ui/Collapsible.js +6 -0
- package/dist/lib/ui/Collapsible.js.map +1 -0
- package/dist/lib/ui/Command.d.ts +80 -0
- package/dist/lib/ui/Command.js +31 -0
- package/dist/lib/ui/Command.js.map +1 -0
- package/dist/lib/{components → ui}/Dialog.js +2 -2
- package/dist/lib/ui/Dialog.js.map +1 -0
- package/dist/lib/ui/Drawer.d.ts +8 -10
- package/dist/lib/ui/Drawer.js.map +1 -1
- package/dist/lib/ui/Form.d.ts +23 -0
- package/dist/lib/ui/Form.js +63 -0
- package/dist/lib/ui/Form.js.map +1 -0
- package/dist/lib/ui/HoverCard.d.ts +6 -0
- package/dist/lib/ui/HoverCard.js +10 -0
- package/dist/lib/ui/HoverCard.js.map +1 -0
- package/dist/lib/ui/Label.d.ts +5 -0
- package/dist/lib/ui/Label.js +10 -0
- package/dist/lib/ui/Label.js.map +1 -0
- package/dist/lib/ui/Pagination.d.ts +28 -0
- package/dist/lib/ui/Pagination.js +24 -0
- package/dist/lib/ui/Pagination.js.map +1 -0
- package/dist/lib/ui/Popover.d.ts +6 -0
- package/dist/lib/ui/Popover.js +10 -0
- package/dist/lib/ui/Popover.js.map +1 -0
- package/dist/lib/ui/Progress.d.ts +4 -0
- package/dist/lib/ui/Progress.js +8 -0
- package/dist/lib/ui/Progress.js.map +1 -0
- package/dist/lib/ui/RadioGroup.d.ts +5 -0
- package/dist/lib/ui/RadioGroup.js +15 -0
- package/dist/lib/ui/RadioGroup.js.map +1 -0
- package/dist/lib/ui/ScrollArea.d.ts +5 -0
- package/dist/lib/ui/ScrollArea.js +12 -0
- package/dist/lib/ui/ScrollArea.js.map +1 -0
- package/dist/lib/ui/Select.js.map +1 -0
- package/dist/lib/ui/Skeleton.d.ts +2 -0
- package/dist/lib/ui/Skeleton.js +7 -0
- package/dist/lib/ui/Skeleton.js.map +1 -0
- package/dist/lib/ui/Slider.d.ts +4 -0
- package/dist/lib/ui/Slider.js +8 -0
- package/dist/lib/ui/Slider.js.map +1 -0
- package/dist/lib/ui/Switch.d.ts +4 -0
- package/dist/lib/ui/Switch.js +8 -0
- package/dist/lib/ui/Switch.js.map +1 -0
- package/dist/lib/ui/Textarea.d.ts +4 -0
- package/dist/lib/ui/Textarea.js +9 -0
- package/dist/lib/ui/Textarea.js.map +1 -0
- package/dist/lib/ui/Toggle.d.ts +12 -0
- package/dist/lib/ui/Toggle.js +26 -0
- package/dist/lib/ui/Toggle.js.map +1 -0
- package/dist/lib/ui/ToggleGroup.d.ts +12 -0
- package/dist/lib/ui/ToggleGroup.js +21 -0
- package/dist/lib/ui/ToggleGroup.js.map +1 -0
- package/dist/lib/ui/Tooltip.d.ts +7 -0
- package/dist/lib/ui/Tooltip.js +11 -0
- package/dist/lib/ui/Tooltip.js.map +1 -0
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/invariant.d.ts +9 -0
- package/dist/lib/util/invariant.js +7 -3
- package/dist/lib/util/invariant.js.map +1 -1
- package/dist/lib/util/useExposedProps.d.ts +2 -0
- package/dist/lib/util/useExposedProps.js +9 -0
- package/dist/lib/util/useExposedProps.js.map +1 -0
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/build.js +12 -3
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +3 -9
- package/dist/vite/config.js +40 -69
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/debug.d.ts +1 -0
- package/dist/vite/debug.js +10 -0
- package/dist/vite/debug.js.map +1 -0
- package/dist/vite/dev-server.d.ts +7 -1
- package/dist/vite/dev-server.js +20 -16
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/output.d.ts +101 -0
- package/dist/vite/output.js +30 -0
- package/dist/vite/output.js.map +1 -0
- package/dist/vite/plugin-api.js +4 -7
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-component.js +17 -8
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.js +7 -4
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +2 -3
- package/dist/vite/plugin-config.js +2 -3
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +4 -0
- package/dist/vite/plugin-custom-pages.js +30 -0
- package/dist/vite/plugin-custom-pages.js.map +1 -0
- package/dist/vite/plugin-docs.js +37 -24
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +3 -0
- package/dist/vite/plugin-frontmatter.js +33 -0
- package/dist/vite/plugin-frontmatter.js.map +1 -0
- package/dist/vite/plugin-mdx.js +17 -0
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +3 -0
- package/dist/vite/plugin-search.js +26 -0
- package/dist/vite/plugin-search.js.map +1 -0
- package/dist/vite/plugin-sidebar.js +21 -7
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin.js +7 -3
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.d.ts +5 -1
- package/dist/vite/prerender.js +6 -5
- package/dist/vite/prerender.js.map +1 -1
- package/lib/{utils-ByIc_KIM.js → AnchorLink-BbB2q-jx.js} +231 -275
- package/lib/AnchorLink-BbB2q-jx.js.map +1 -0
- package/lib/{AuthenticationPlugin-Bx9FK124.js → AuthenticationPlugin-C9BHGXlE.js} +3 -3
- package/lib/{AuthenticationPlugin-Bx9FK124.js.map → AuthenticationPlugin-C9BHGXlE.js.map} +1 -1
- package/lib/{CategoryHeading-XnFqN2lJ.js → CategoryHeading-Bb9dqxD3.js} +4 -4
- package/lib/{CategoryHeading-XnFqN2lJ.js.map → CategoryHeading-Bb9dqxD3.js.map} +1 -1
- package/lib/ClientOnly-CVN6leDu.js +11 -0
- package/lib/ClientOnly-CVN6leDu.js.map +1 -0
- package/lib/{DeveloperHint-FBb2uXJe.js → DeveloperHint-DHdLXGHA.js} +2 -2
- package/lib/{DeveloperHint-FBb2uXJe.js.map → DeveloperHint-DHdLXGHA.js.map} +1 -1
- package/lib/Dialog-k70Qfukb.js +67 -0
- package/lib/Dialog-k70Qfukb.js.map +1 -0
- package/lib/{Markdown-B4aR03g6.js → Markdown-BDcCAWwm.js} +4298 -6518
- package/lib/Markdown-BDcCAWwm.js.map +1 -0
- package/lib/{MdxPage-BZyQsH8Z.js → MdxPage-DKMH_t0f.js} +25 -23
- package/lib/MdxPage-DKMH_t0f.js.map +1 -0
- package/lib/{OperationList-2NeWEM0u.js → OperationList-Tj7ubW_t.js} +181 -137
- package/lib/OperationList-Tj7ubW_t.js.map +1 -0
- package/lib/{Route-BZPewmrN.js → Route-C3DGB6OS.js} +3 -4
- package/lib/Route-C3DGB6OS.js.map +1 -0
- package/lib/Select-Bagt3Bme.js +223 -0
- package/lib/Select-Bagt3Bme.js.map +1 -0
- package/lib/SlotletProvider-Da7eFgd2.js +241 -0
- package/lib/SlotletProvider-Da7eFgd2.js.map +1 -0
- package/lib/Spinner-C6zroowC.js +40 -0
- package/lib/Spinner-C6zroowC.js.map +1 -0
- package/lib/StaggeredRender-DDHSzQKE.js +17 -0
- package/lib/StaggeredRender-DDHSzQKE.js.map +1 -0
- package/lib/ZudokuContext-BKXGJTmu.js +1222 -0
- package/lib/ZudokuContext-BKXGJTmu.js.map +1 -0
- package/lib/__vite-browser-external-BYRIRx8p.js +9 -0
- package/lib/__vite-browser-external-BYRIRx8p.js.map +1 -0
- package/lib/assets/{index-B9EWVYfo.js → index-B_Jk_Yzp.js} +968 -938
- package/lib/assets/index-B_Jk_Yzp.js.map +1 -0
- package/lib/assets/{worker-BvD7B6MG.js → worker-Bf8vjASY.js} +6769 -4411
- package/lib/assets/worker-Bf8vjASY.js.map +1 -0
- package/lib/cn-BmFQLtkS.js +2279 -0
- package/lib/cn-BmFQLtkS.js.map +1 -0
- package/lib/hook-sn0zMTkE.js +229 -0
- package/lib/hook-sn0zMTkE.js.map +1 -0
- package/lib/{index-Dv2KZuEw.js → index-AjWCJNGC.js} +1681 -1676
- package/lib/index-AjWCJNGC.js.map +1 -0
- package/lib/index-Bn6Lc9tq.js +9 -0
- package/lib/index-Bn6Lc9tq.js.map +1 -0
- package/lib/index-BuAyrJe3.js +46 -0
- package/lib/index-BuAyrJe3.js.map +1 -0
- package/lib/{index-BG0g4WW0.js → index-CRo94sKK.js} +750 -738
- package/lib/index-CRo94sKK.js.map +1 -0
- package/lib/{index-CLd8ycZz.js → index-CkwDvuPt.js} +947 -917
- package/lib/index-CkwDvuPt.js.map +1 -0
- package/lib/index-LNp6rxyU.js +2094 -0
- package/lib/index-LNp6rxyU.js.map +1 -0
- package/lib/index.esm-C5mr_sKO.js +1193 -0
- package/lib/index.esm-C5mr_sKO.js.map +1 -0
- package/lib/invariant-Caa8-XvF.js +26 -0
- package/lib/invariant-Caa8-XvF.js.map +1 -0
- package/lib/router-BsfSoK2j.js +3024 -0
- package/lib/router-BsfSoK2j.js.map +1 -0
- package/lib/state-CsuHT8ZO.js +183 -0
- package/lib/state-CsuHT8ZO.js.map +1 -0
- package/lib/ui/Accordion.js +47 -0
- package/lib/ui/Accordion.js.map +1 -0
- package/lib/ui/Alert.js +51 -0
- package/lib/ui/Alert.js.map +1 -0
- package/lib/ui/AlertDialog.js +114 -0
- package/lib/ui/AlertDialog.js.map +1 -0
- package/lib/ui/AspectRatio.js +6 -0
- package/lib/ui/AspectRatio.js.map +1 -0
- package/lib/ui/Badge.js +27 -0
- package/lib/ui/Badge.js.map +1 -0
- package/lib/ui/Breadcrumb.js +94 -0
- package/lib/ui/Breadcrumb.js.map +1 -0
- package/lib/ui/Button.js +49 -0
- package/lib/ui/Button.js.map +1 -0
- package/lib/ui/Callout.js +77 -0
- package/lib/ui/Callout.js.map +1 -0
- package/lib/ui/Card.js +62 -0
- package/lib/ui/Card.js.map +1 -0
- package/lib/ui/Carousel.js +1410 -0
- package/lib/ui/Carousel.js.map +1 -0
- package/lib/ui/Checkbox.js +28 -0
- package/lib/ui/Checkbox.js.map +1 -0
- package/lib/ui/Collapsible.js +8 -0
- package/lib/ui/Collapsible.js.map +1 -0
- package/lib/ui/Command.js +550 -0
- package/lib/ui/Command.js.map +1 -0
- package/lib/ui/Dialog.js +101 -0
- package/lib/ui/Dialog.js.map +1 -0
- package/lib/ui/Drawer.js +1153 -0
- package/lib/ui/Drawer.js.map +1 -0
- package/lib/ui/DropdownMenu.js +145 -0
- package/lib/ui/DropdownMenu.js.map +1 -0
- package/lib/ui/Form.js +95 -0
- package/lib/ui/Form.js.map +1 -0
- package/lib/ui/HoverCard.js +24 -0
- package/lib/ui/HoverCard.js.map +1 -0
- package/lib/ui/Input.js +22 -0
- package/lib/ui/Input.js.map +1 -0
- package/lib/ui/Label.js +20 -0
- package/lib/ui/Label.js.map +1 -0
- package/lib/ui/Pagination.js +106 -0
- package/lib/ui/Pagination.js.map +1 -0
- package/lib/ui/Popover.js +24 -0
- package/lib/ui/Popover.js.map +1 -0
- package/lib/ui/Progress.js +27 -0
- package/lib/ui/Progress.js.map +1 -0
- package/lib/ui/RadioGroup.js +32 -0
- package/lib/ui/RadioGroup.js.map +1 -0
- package/lib/ui/ScrollArea.js +39 -0
- package/lib/ui/ScrollArea.js.map +1 -0
- package/lib/ui/Select.js +122 -0
- package/lib/ui/Select.js.map +1 -0
- package/lib/ui/Skeleton.js +18 -0
- package/lib/ui/Skeleton.js.map +1 -0
- package/lib/ui/Slider.js +24 -0
- package/lib/ui/Slider.js.map +1 -0
- package/lib/ui/Switch.js +28 -0
- package/lib/ui/Switch.js.map +1 -0
- package/lib/ui/Tabs.js +47 -0
- package/lib/ui/Tabs.js.map +1 -0
- package/lib/ui/Textarea.js +21 -0
- package/lib/ui/Textarea.js.map +1 -0
- package/lib/ui/Toggle.js +38 -0
- package/lib/ui/Toggle.js.map +1 -0
- package/lib/ui/ToggleGroup.js +42 -0
- package/lib/ui/ToggleGroup.js.map +1 -0
- package/lib/ui/Tooltip.js +24 -0
- package/lib/ui/Tooltip.js.map +1 -0
- package/lib/urql-core-KJnLL26g.js +1455 -0
- package/lib/urql-core-KJnLL26g.js.map +1 -0
- package/lib/useExposedProps-ChOIUaS4.js +9 -0
- package/lib/useExposedProps-ChOIUaS4.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +541 -534
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +953 -2849
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +4668 -4380
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +69 -76
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +22 -0
- package/lib/zudoku.plugin-custom-pages.js.map +1 -0
- package/lib/zudoku.plugin-markdown.js +93 -24
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +9 -10
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +2 -2
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +9 -13
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/package.json +98 -72
- package/src/app/entry.client.tsx +4 -2
- package/src/app/entry.server.tsx +4 -0
- package/src/app/main.css +4 -1
- package/src/app/main.tsx +15 -33
- package/src/app/standalone.tsx +1 -1
- package/src/lib/authentication/components/CallbackHandler.tsx +20 -51
- package/src/lib/authentication/hook.ts +1 -1
- package/src/lib/authentication/state.ts +17 -0
- package/src/lib/components/Banner.tsx +12 -2
- package/src/lib/components/ErrorPage.tsx +0 -2
- package/src/lib/components/Header.tsx +21 -4
- package/src/lib/components/InlineCode.tsx +10 -0
- package/src/lib/components/Layout.tsx +2 -1
- package/src/lib/components/MobileTopNavigation.tsx +10 -2
- package/src/lib/components/Search.tsx +1 -1
- package/src/lib/components/SlotletProvider.tsx +29 -4
- package/src/lib/components/SyntaxHighlight.tsx +5 -1
- package/src/lib/components/TopNavigation.tsx +70 -23
- package/src/lib/components/context/ZudokuContext.ts +28 -20
- package/src/lib/components/index.ts +13 -4
- package/src/lib/components/navigation/Sidebar.tsx +6 -6
- package/src/lib/components/navigation/SidebarCategory.tsx +35 -29
- package/src/lib/components/navigation/SidebarItem.tsx +17 -20
- package/src/lib/components/navigation/utils.ts +11 -16
- package/src/lib/core/DevPortalContext.ts +4 -3
- package/src/lib/core/plugins.ts +2 -0
- package/src/lib/errors/ErrorAlert.tsx +18 -5
- package/src/lib/oas/graphql/index.ts +36 -24
- package/src/lib/oas/parser/index.ts +1 -0
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +2 -2
- package/src/lib/plugins/custom-pages/CustomPage.tsx +18 -0
- package/src/lib/plugins/custom-pages/index.tsx +24 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +11 -9
- package/src/lib/plugins/markdown/index.tsx +49 -10
- package/src/lib/plugins/markdown/resolver.ts +92 -0
- package/src/lib/plugins/openapi/Endpoint.tsx +86 -22
- package/src/lib/plugins/openapi/OperationList.tsx +4 -2
- package/src/lib/plugins/openapi/OperationListItem.tsx +1 -1
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +3 -0
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +1 -1
- package/src/lib/plugins/openapi/Route.tsx +1 -2
- package/src/lib/plugins/openapi/Sidecar.tsx +21 -6
- package/src/lib/plugins/openapi/SimpleSelect.tsx +10 -2
- package/src/lib/plugins/openapi/client/createMemoryClient.ts +1 -6
- package/src/lib/plugins/openapi/client/createWorkerClient.ts +1 -6
- package/src/lib/plugins/openapi/client/worker.ts +2 -2
- package/src/lib/plugins/openapi/graphql/gql.ts +11 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +116 -4
- package/src/lib/plugins/openapi/index.tsx +2 -6
- package/src/lib/plugins/openapi/interfaces.ts +4 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +42 -7
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -1
- package/src/lib/plugins/openapi/playground/createUrl.ts +6 -1
- package/src/lib/plugins/redirect/index.tsx +3 -7
- package/src/lib/ui/Accordion.tsx +56 -0
- package/src/lib/ui/{Note.tsx → Alert.tsx} +11 -10
- package/src/lib/ui/AlertDialog.tsx +139 -0
- package/src/lib/ui/AspectRatio.tsx +5 -0
- package/src/lib/ui/Badge.tsx +36 -0
- package/src/lib/ui/Breadcrumb.tsx +115 -0
- package/src/lib/ui/Button.tsx +1 -1
- package/src/lib/ui/Callout.tsx +7 -6
- package/src/lib/ui/Carousel.tsx +260 -0
- package/src/lib/ui/Checkbox.tsx +28 -0
- package/src/lib/ui/Collapsible.tsx +9 -0
- package/src/lib/ui/Command.tsx +151 -0
- package/src/lib/{components → ui}/Dialog.tsx +4 -3
- package/src/lib/ui/Drawer.tsx +38 -36
- package/src/lib/ui/Form.tsx +177 -0
- package/src/lib/ui/HoverCard.tsx +27 -0
- package/src/lib/ui/Label.tsx +24 -0
- package/src/lib/ui/Pagination.tsx +117 -0
- package/src/lib/ui/Popover.tsx +29 -0
- package/src/lib/ui/Progress.tsx +26 -0
- package/src/lib/ui/RadioGroup.tsx +42 -0
- package/src/lib/ui/ScrollArea.tsx +46 -0
- package/src/lib/ui/Skeleton.tsx +15 -0
- package/src/lib/ui/Slider.tsx +26 -0
- package/src/lib/ui/Switch.tsx +27 -0
- package/src/lib/ui/Textarea.tsx +23 -0
- package/src/lib/ui/Toggle.tsx +43 -0
- package/src/lib/ui/ToggleGroup.tsx +59 -0
- package/src/lib/ui/Tooltip.tsx +28 -0
- package/src/lib/util/MdxComponents.tsx +0 -1
- package/src/lib/util/invariant.ts +15 -3
- package/src/lib/util/useExposedProps.tsx +16 -0
- package/src/lib/util/useScrollToAnchor.ts +1 -1
- package/dist/internal.d.ts +0 -1
- package/dist/internal.js +0 -2
- package/dist/internal.js.map +0 -1
- package/dist/lib/components/Dialog.js.map +0 -1
- package/dist/lib/components/Select.js.map +0 -1
- package/dist/lib/plugins/custom-page/index.d.ts +0 -8
- package/dist/lib/plugins/custom-page/index.js +0 -12
- package/dist/lib/plugins/custom-page/index.js.map +0 -1
- package/dist/lib/plugins/markdown/generateRoutes.d.ts +0 -3
- package/dist/lib/plugins/markdown/generateRoutes.js +0 -19
- package/dist/lib/plugins/markdown/generateRoutes.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/Editor.d.ts +0 -1
- package/dist/lib/plugins/openapi/playground/Editor.js +0 -5
- package/dist/lib/plugins/openapi/playground/Editor.js.map +0 -1
- package/dist/lib/plugins/openapi/util/urql.d.ts +0 -7
- package/dist/lib/plugins/openapi/util/urql.js +0 -8
- package/dist/lib/plugins/openapi/util/urql.js.map +0 -1
- package/dist/lib/ui/Note.d.ts +0 -8
- package/dist/lib/ui/Note.js +0 -23
- package/dist/lib/ui/Note.js.map +0 -1
- package/dist/lib/util/slugify.d.ts +0 -2
- package/dist/lib/util/slugify.js +0 -3
- package/dist/lib/util/slugify.js.map +0 -1
- package/dist/vite/plugin-icons.d.ts +0 -3
- package/dist/vite/plugin-icons.js +0 -47
- package/dist/vite/plugin-icons.js.map +0 -1
- package/lib/ErrorPage-knunPbKI.js +0 -18
- package/lib/ErrorPage-knunPbKI.js.map +0 -1
- package/lib/Input-BEDZAKw0.js +0 -2198
- package/lib/Input-BEDZAKw0.js.map +0 -1
- package/lib/Markdown-B4aR03g6.js.map +0 -1
- package/lib/MdxPage-BZyQsH8Z.js.map +0 -1
- package/lib/OperationList-2NeWEM0u.js.map +0 -1
- package/lib/Route-BZPewmrN.js.map +0 -1
- package/lib/SidebarBadge-COz0hgfa.js +0 -498
- package/lib/SidebarBadge-COz0hgfa.js.map +0 -1
- package/lib/SlotletProvider-DJMaOUDs.js +0 -238
- package/lib/SlotletProvider-DJMaOUDs.js.map +0 -1
- package/lib/Spinner-3cQDBVGr.js +0 -7
- package/lib/Spinner-3cQDBVGr.js.map +0 -1
- package/lib/ZudokuContext-cr-pTRY1.js +0 -1084
- package/lib/ZudokuContext-cr-pTRY1.js.map +0 -1
- package/lib/assets/index-B9EWVYfo.js.map +0 -1
- package/lib/assets/worker-BvD7B6MG.js.map +0 -1
- package/lib/index-1EDgIO6b.js +0 -124
- package/lib/index-1EDgIO6b.js.map +0 -1
- package/lib/index-BG0g4WW0.js.map +0 -1
- package/lib/index-CLd8ycZz.js.map +0 -1
- package/lib/index-Dv2KZuEw.js.map +0 -1
- package/lib/index-Zezcv0xb.js +0 -2814
- package/lib/index-Zezcv0xb.js.map +0 -1
- package/lib/joinPath-B7kNnUX4.js +0 -8
- package/lib/joinPath-B7kNnUX4.js.map +0 -1
- package/lib/router-D2p7Olpn.js +0 -2971
- package/lib/router-D2p7Olpn.js.map +0 -1
- package/lib/slugify-DbLhpSPt.js +0 -28
- package/lib/slugify-DbLhpSPt.js.map +0 -1
- package/lib/state-lIwt9isb.js +0 -288
- package/lib/state-lIwt9isb.js.map +0 -1
- package/lib/urql-YhcsXYy8.js +0 -1591
- package/lib/urql-YhcsXYy8.js.map +0 -1
- package/lib/utils-ByIc_KIM.js.map +0 -1
- package/lib/zudoku.plugin-custom-page.js +0 -13
- package/lib/zudoku.plugin-custom-page.js.map +0 -1
- package/src/lib/plugins/custom-page/index.tsx +0 -22
- package/src/lib/plugins/markdown/generateRoutes.tsx +0 -35
- package/src/lib/plugins/openapi/playground/Editor.tsx +0 -4
- package/src/lib/plugins/openapi/util/urql.ts +0 -8
- package/src/lib/util/slugify.ts +0 -3
- /package/dist/lib/{components → ui}/Dialog.d.ts +0 -0
- /package/dist/lib/{components → ui}/Select.d.ts +0 -0
- /package/dist/lib/{components → ui}/Select.js +0 -0
- /package/src/lib/{components → ui}/Select.tsx +0 -0
|
@@ -1,100 +1,97 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { j as
|
|
5
|
-
import { c as
|
|
6
|
-
import { A as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
import { a as He } from "./index-BG0g4WW0.js";
|
|
13
|
-
import { u as z } from "./state-lIwt9isb.js";
|
|
14
|
-
var fe = { exports: {} };
|
|
1
|
+
var Ie = Object.defineProperty;
|
|
2
|
+
var je = (t, e, n) => e in t ? Ie(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var b = (t, e, n) => je(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { j as fe } from "./jsx-runtime-B6kdoens.js";
|
|
5
|
+
import { c as Je, g as Oe } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
6
|
+
import { A as Ne } from "./AuthenticationPlugin-C9BHGXlE.js";
|
|
7
|
+
import { g as ze } from "./ZudokuContext-BKXGJTmu.js";
|
|
8
|
+
import { Z as De } from "./invariant-Caa8-XvF.js";
|
|
9
|
+
import { N as Ke } from "./index-CRo94sKK.js";
|
|
10
|
+
import { u as N } from "./state-CsuHT8ZO.js";
|
|
11
|
+
var pe = { exports: {} };
|
|
15
12
|
(function(t) {
|
|
16
|
-
(function(e,
|
|
17
|
-
t.exports ? t.exports =
|
|
18
|
-
})(
|
|
13
|
+
(function(e, n) {
|
|
14
|
+
t.exports ? t.exports = n() : e.log = n();
|
|
15
|
+
})(Je, function() {
|
|
19
16
|
var e = function() {
|
|
20
|
-
},
|
|
17
|
+
}, n = "undefined", o = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), a = [
|
|
21
18
|
"trace",
|
|
22
19
|
"debug",
|
|
23
20
|
"info",
|
|
24
21
|
"warn",
|
|
25
22
|
"error"
|
|
26
|
-
],
|
|
27
|
-
function
|
|
28
|
-
var
|
|
29
|
-
if (typeof
|
|
30
|
-
return
|
|
23
|
+
], r = {}, i = null;
|
|
24
|
+
function c(l, g) {
|
|
25
|
+
var u = l[g];
|
|
26
|
+
if (typeof u.bind == "function")
|
|
27
|
+
return u.bind(l);
|
|
31
28
|
try {
|
|
32
|
-
return Function.prototype.bind.call(
|
|
29
|
+
return Function.prototype.bind.call(u, l);
|
|
33
30
|
} catch {
|
|
34
31
|
return function() {
|
|
35
|
-
return Function.prototype.apply.apply(
|
|
32
|
+
return Function.prototype.apply.apply(u, [l, arguments]);
|
|
36
33
|
};
|
|
37
34
|
}
|
|
38
35
|
}
|
|
39
|
-
function
|
|
36
|
+
function p() {
|
|
40
37
|
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
41
38
|
}
|
|
42
|
-
function
|
|
43
|
-
return l === "debug" && (l = "log"), typeof console ===
|
|
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;
|
|
44
41
|
}
|
|
45
|
-
function
|
|
46
|
-
for (var l = this.getLevel(),
|
|
47
|
-
var
|
|
48
|
-
this[
|
|
42
|
+
function f() {
|
|
43
|
+
for (var l = this.getLevel(), g = 0; g < a.length; g++) {
|
|
44
|
+
var u = a[g];
|
|
45
|
+
this[u] = g < l ? e : this.methodFactory(u, l, this.name);
|
|
49
46
|
}
|
|
50
|
-
if (this.log = this.debug, typeof console ===
|
|
47
|
+
if (this.log = this.debug, typeof console === n && l < this.levels.SILENT)
|
|
51
48
|
return "No console available for logging";
|
|
52
49
|
}
|
|
53
|
-
function
|
|
50
|
+
function y(l) {
|
|
54
51
|
return function() {
|
|
55
|
-
typeof console !==
|
|
52
|
+
typeof console !== n && (f.call(this), this[l].apply(this, arguments));
|
|
56
53
|
};
|
|
57
54
|
}
|
|
58
|
-
function
|
|
59
|
-
return
|
|
55
|
+
function T(l, g, u) {
|
|
56
|
+
return _(l) || y.apply(this, arguments);
|
|
60
57
|
}
|
|
61
|
-
function
|
|
62
|
-
var
|
|
58
|
+
function h(l, g) {
|
|
59
|
+
var u = this, J, F, R, v = "loglevel";
|
|
63
60
|
typeof l == "string" ? v += ":" + l : typeof l == "symbol" && (v = void 0);
|
|
64
|
-
function
|
|
65
|
-
var
|
|
66
|
-
if (!(typeof window ===
|
|
61
|
+
function Le(d) {
|
|
62
|
+
var m = (a[d] || "silent").toUpperCase();
|
|
63
|
+
if (!(typeof window === n || !v)) {
|
|
67
64
|
try {
|
|
68
|
-
window.localStorage[v] =
|
|
65
|
+
window.localStorage[v] = m;
|
|
69
66
|
return;
|
|
70
67
|
} catch {
|
|
71
68
|
}
|
|
72
69
|
try {
|
|
73
|
-
window.document.cookie = encodeURIComponent(v) + "=" +
|
|
70
|
+
window.document.cookie = encodeURIComponent(v) + "=" + m + ";";
|
|
74
71
|
} catch {
|
|
75
72
|
}
|
|
76
73
|
}
|
|
77
74
|
}
|
|
78
75
|
function ne() {
|
|
79
76
|
var d;
|
|
80
|
-
if (!(typeof window ===
|
|
77
|
+
if (!(typeof window === n || !v)) {
|
|
81
78
|
try {
|
|
82
79
|
d = window.localStorage[v];
|
|
83
80
|
} catch {
|
|
84
81
|
}
|
|
85
|
-
if (typeof d ===
|
|
82
|
+
if (typeof d === n)
|
|
86
83
|
try {
|
|
87
|
-
var
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
var m = window.document.cookie, O = encodeURIComponent(v), oe = m.indexOf(O + "=");
|
|
85
|
+
oe !== -1 && (d = /^([^;]+)/.exec(
|
|
86
|
+
m.slice(oe + O.length + 1)
|
|
90
87
|
)[1]);
|
|
91
88
|
} catch {
|
|
92
89
|
}
|
|
93
|
-
return
|
|
90
|
+
return u.levels[d] === void 0 && (d = void 0), d;
|
|
94
91
|
}
|
|
95
92
|
}
|
|
96
|
-
function
|
|
97
|
-
if (!(typeof window ===
|
|
93
|
+
function Ce() {
|
|
94
|
+
if (!(typeof window === n || !v)) {
|
|
98
95
|
try {
|
|
99
96
|
window.localStorage.removeItem(v);
|
|
100
97
|
} catch {
|
|
@@ -105,64 +102,64 @@ var fe = { exports: {} };
|
|
|
105
102
|
}
|
|
106
103
|
}
|
|
107
104
|
}
|
|
108
|
-
function
|
|
109
|
-
var
|
|
110
|
-
if (typeof
|
|
111
|
-
return
|
|
105
|
+
function U(d) {
|
|
106
|
+
var m = d;
|
|
107
|
+
if (typeof m == "string" && u.levels[m.toUpperCase()] !== void 0 && (m = u.levels[m.toUpperCase()]), typeof m == "number" && m >= 0 && m <= u.levels.SILENT)
|
|
108
|
+
return m;
|
|
112
109
|
throw new TypeError("log.setLevel() called with invalid level: " + d);
|
|
113
110
|
}
|
|
114
|
-
|
|
111
|
+
u.name = l, u.levels = {
|
|
115
112
|
TRACE: 0,
|
|
116
113
|
DEBUG: 1,
|
|
117
114
|
INFO: 2,
|
|
118
115
|
WARN: 3,
|
|
119
116
|
ERROR: 4,
|
|
120
117
|
SILENT: 5
|
|
121
|
-
},
|
|
122
|
-
return
|
|
123
|
-
},
|
|
124
|
-
return
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
},
|
|
134
|
-
if (i !==
|
|
135
|
-
for (var d in
|
|
136
|
-
|
|
137
|
-
},
|
|
118
|
+
}, u.methodFactory = g || T, u.getLevel = function() {
|
|
119
|
+
return R ?? F ?? J;
|
|
120
|
+
}, u.setLevel = function(d, m) {
|
|
121
|
+
return R = U(d), m !== !1 && Le(R), f.call(u);
|
|
122
|
+
}, u.setDefaultLevel = function(d) {
|
|
123
|
+
F = U(d), ne() || u.setLevel(d, !1);
|
|
124
|
+
}, u.resetLevel = function() {
|
|
125
|
+
R = null, Ce(), f.call(u);
|
|
126
|
+
}, u.enableAll = function(d) {
|
|
127
|
+
u.setLevel(u.levels.TRACE, d);
|
|
128
|
+
}, u.disableAll = function(d) {
|
|
129
|
+
u.setLevel(u.levels.SILENT, d);
|
|
130
|
+
}, u.rebuild = function() {
|
|
131
|
+
if (i !== u && (J = U(i.getLevel())), f.call(u), i === u)
|
|
132
|
+
for (var d in r)
|
|
133
|
+
r[d].rebuild();
|
|
134
|
+
}, J = U(
|
|
138
135
|
i ? i.getLevel() : "WARN"
|
|
139
136
|
);
|
|
140
|
-
var
|
|
141
|
-
|
|
137
|
+
var re = ne();
|
|
138
|
+
re != null && (R = U(re)), f.call(u);
|
|
142
139
|
}
|
|
143
|
-
i = new
|
|
144
|
-
if (typeof
|
|
140
|
+
i = new h(), i.getLogger = function(g) {
|
|
141
|
+
if (typeof g != "symbol" && typeof g != "string" || g === "")
|
|
145
142
|
throw new TypeError("You must supply a name when creating a logger.");
|
|
146
|
-
var
|
|
147
|
-
return
|
|
148
|
-
|
|
143
|
+
var u = r[g];
|
|
144
|
+
return u || (u = r[g] = new h(
|
|
145
|
+
g,
|
|
149
146
|
i.methodFactory
|
|
150
|
-
)),
|
|
147
|
+
)), u;
|
|
151
148
|
};
|
|
152
|
-
var
|
|
149
|
+
var j = typeof window !== n ? window.log : void 0;
|
|
153
150
|
return i.noConflict = function() {
|
|
154
|
-
return typeof window !==
|
|
151
|
+
return typeof window !== n && window.log === i && (window.log = j), i;
|
|
155
152
|
}, i.getLoggers = function() {
|
|
156
|
-
return
|
|
153
|
+
return r;
|
|
157
154
|
}, i.default = i, i;
|
|
158
155
|
});
|
|
159
|
-
})(
|
|
160
|
-
var
|
|
161
|
-
const
|
|
162
|
-
let
|
|
163
|
-
var
|
|
164
|
-
(typeof navigator > "u" || !((he = (
|
|
165
|
-
function
|
|
156
|
+
})(pe);
|
|
157
|
+
var We = pe.exports;
|
|
158
|
+
const M = /* @__PURE__ */ Oe(We);
|
|
159
|
+
let G;
|
|
160
|
+
var z, he;
|
|
161
|
+
(typeof navigator > "u" || !((he = (z = navigator.userAgent) == null ? void 0 : z.startsWith) != null && he.call(z, "Mozilla/5.0 "))) && (G = "oauth4webapi/v2.17.0");
|
|
162
|
+
function Y(t, e) {
|
|
166
163
|
if (t == null)
|
|
167
164
|
return !1;
|
|
168
165
|
try {
|
|
@@ -171,98 +168,98 @@ function Q(t, e) {
|
|
|
171
168
|
return !1;
|
|
172
169
|
}
|
|
173
170
|
}
|
|
174
|
-
const
|
|
175
|
-
function
|
|
171
|
+
const K = Symbol(), He = Symbol(), Q = Symbol(), we = Symbol(), $e = Symbol(), Fe = Symbol(), Me = new TextEncoder(), Be = new TextDecoder();
|
|
172
|
+
function E(t) {
|
|
176
173
|
return typeof t == "string" ? Me.encode(t) : Be.decode(t);
|
|
177
174
|
}
|
|
178
|
-
const
|
|
175
|
+
const ie = 32768;
|
|
179
176
|
function qe(t) {
|
|
180
177
|
t instanceof ArrayBuffer && (t = new Uint8Array(t));
|
|
181
178
|
const e = [];
|
|
182
|
-
for (let
|
|
183
|
-
e.push(String.fromCharCode.apply(null, t.subarray(
|
|
179
|
+
for (let n = 0; n < t.byteLength; n += ie)
|
|
180
|
+
e.push(String.fromCharCode.apply(null, t.subarray(n, n + ie)));
|
|
184
181
|
return btoa(e.join("")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
185
182
|
}
|
|
186
|
-
function
|
|
183
|
+
function Ve(t) {
|
|
187
184
|
try {
|
|
188
|
-
const e = atob(t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "")),
|
|
185
|
+
const e = atob(t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "")), n = new Uint8Array(e.length);
|
|
189
186
|
for (let o = 0; o < e.length; o++)
|
|
190
|
-
|
|
191
|
-
return
|
|
187
|
+
n[o] = e.charCodeAt(o);
|
|
188
|
+
return n;
|
|
192
189
|
} catch (e) {
|
|
193
|
-
throw new
|
|
190
|
+
throw new s("The input to be decoded is not correctly encoded.", { cause: e });
|
|
194
191
|
}
|
|
195
192
|
}
|
|
196
|
-
function
|
|
197
|
-
return typeof t == "string" ?
|
|
193
|
+
function A(t) {
|
|
194
|
+
return typeof t == "string" ? Ve(t) : qe(t);
|
|
198
195
|
}
|
|
199
|
-
class
|
|
196
|
+
class Ge {
|
|
200
197
|
constructor(e) {
|
|
201
198
|
this.cache = /* @__PURE__ */ new Map(), this._cache = /* @__PURE__ */ new Map(), this.maxSize = e;
|
|
202
199
|
}
|
|
203
200
|
get(e) {
|
|
204
|
-
let
|
|
205
|
-
if (
|
|
206
|
-
return
|
|
207
|
-
if (
|
|
208
|
-
return this.update(e,
|
|
201
|
+
let n = this.cache.get(e);
|
|
202
|
+
if (n)
|
|
203
|
+
return n;
|
|
204
|
+
if (n = this._cache.get(e))
|
|
205
|
+
return this.update(e, n), n;
|
|
209
206
|
}
|
|
210
207
|
has(e) {
|
|
211
208
|
return this.cache.has(e) || this._cache.has(e);
|
|
212
209
|
}
|
|
213
|
-
set(e,
|
|
214
|
-
return this.cache.has(e) ? this.cache.set(e,
|
|
210
|
+
set(e, n) {
|
|
211
|
+
return this.cache.has(e) ? this.cache.set(e, n) : this.update(e, n), this;
|
|
215
212
|
}
|
|
216
213
|
delete(e) {
|
|
217
214
|
return this.cache.has(e) ? this.cache.delete(e) : this._cache.has(e) ? this._cache.delete(e) : !1;
|
|
218
215
|
}
|
|
219
|
-
update(e,
|
|
220
|
-
this.cache.set(e,
|
|
216
|
+
update(e, n) {
|
|
217
|
+
this.cache.set(e, n), this.cache.size >= this.maxSize && (this._cache = this.cache, this.cache = /* @__PURE__ */ new Map());
|
|
221
218
|
}
|
|
222
219
|
}
|
|
223
220
|
class S extends Error {
|
|
224
221
|
constructor(e) {
|
|
225
|
-
var
|
|
226
|
-
super(e ?? "operation not supported"), this.name = this.constructor.name, (
|
|
222
|
+
var n;
|
|
223
|
+
super(e ?? "operation not supported"), this.name = this.constructor.name, (n = Error.captureStackTrace) == null || n.call(Error, this, this.constructor);
|
|
227
224
|
}
|
|
228
225
|
}
|
|
229
|
-
class
|
|
230
|
-
constructor(e,
|
|
226
|
+
class Ze extends Error {
|
|
227
|
+
constructor(e, n) {
|
|
231
228
|
var o;
|
|
232
|
-
super(e,
|
|
229
|
+
super(e, n), this.name = this.constructor.name, (o = Error.captureStackTrace) == null || o.call(Error, this, this.constructor);
|
|
233
230
|
}
|
|
234
231
|
}
|
|
235
|
-
const
|
|
236
|
-
function
|
|
232
|
+
const s = Ze, ge = new Ge(100);
|
|
233
|
+
function me(t) {
|
|
237
234
|
return t instanceof CryptoKey;
|
|
238
235
|
}
|
|
239
|
-
function
|
|
240
|
-
return
|
|
236
|
+
function ye(t) {
|
|
237
|
+
return me(t) && t.type === "private";
|
|
241
238
|
}
|
|
242
|
-
function
|
|
243
|
-
return
|
|
239
|
+
function Ye(t) {
|
|
240
|
+
return me(t) && t.type === "public";
|
|
244
241
|
}
|
|
245
|
-
function
|
|
242
|
+
function X(t) {
|
|
246
243
|
try {
|
|
247
244
|
const e = t.headers.get("dpop-nonce");
|
|
248
|
-
e &&
|
|
245
|
+
e && ge.set(new URL(t.url).origin, e);
|
|
249
246
|
} catch {
|
|
250
247
|
}
|
|
251
248
|
return t;
|
|
252
249
|
}
|
|
253
|
-
function
|
|
250
|
+
function L(t) {
|
|
254
251
|
return !(t === null || typeof t != "object" || Array.isArray(t));
|
|
255
252
|
}
|
|
256
|
-
function
|
|
257
|
-
|
|
253
|
+
function W(t) {
|
|
254
|
+
Y(t, Headers) && (t = Object.fromEntries(t.entries()));
|
|
258
255
|
const e = new Headers(t);
|
|
259
|
-
if (
|
|
256
|
+
if (G && !e.has("user-agent") && e.set("user-agent", G), e.has("authorization"))
|
|
260
257
|
throw new TypeError('"options.headers" must not include the "authorization" header name');
|
|
261
258
|
if (e.has("dpop"))
|
|
262
259
|
throw new TypeError('"options.headers" must not include the "dpop" header name');
|
|
263
260
|
return e;
|
|
264
261
|
}
|
|
265
|
-
function
|
|
262
|
+
function ee(t) {
|
|
266
263
|
if (typeof t == "function" && (t = t()), !(t instanceof AbortSignal))
|
|
267
264
|
throw new TypeError('"options.signal" must return or be an instance of AbortSignal');
|
|
268
265
|
return t;
|
|
@@ -272,80 +269,84 @@ async function Qe(t, e) {
|
|
|
272
269
|
throw new TypeError('"issuerIdentifier" must be an instance of URL');
|
|
273
270
|
if (t.protocol !== "https:" && t.protocol !== "http:")
|
|
274
271
|
throw new TypeError('"issuer.protocol" must be "https:" or "http:"');
|
|
275
|
-
const
|
|
272
|
+
const n = new URL(t.href);
|
|
276
273
|
switch (e == null ? void 0 : e.algorithm) {
|
|
277
274
|
case void 0:
|
|
278
275
|
case "oidc":
|
|
279
|
-
|
|
276
|
+
n.pathname = `${n.pathname}/.well-known/openid-configuration`.replace("//", "/");
|
|
280
277
|
break;
|
|
281
278
|
case "oauth2":
|
|
282
|
-
|
|
279
|
+
n.pathname === "/" ? n.pathname = ".well-known/oauth-authorization-server" : n.pathname = `.well-known/oauth-authorization-server/${n.pathname}`.replace("//", "/");
|
|
283
280
|
break;
|
|
284
281
|
default:
|
|
285
282
|
throw new TypeError('"options.algorithm" must be "oidc" (default), or "oauth2"');
|
|
286
283
|
}
|
|
287
|
-
const o =
|
|
288
|
-
return o.set("accept", "application/json"), ((e == null ? void 0 : e[
|
|
284
|
+
const o = W(e == null ? void 0 : e.headers);
|
|
285
|
+
return o.set("accept", "application/json"), ((e == null ? void 0 : e[Q]) || fetch)(n.href, {
|
|
289
286
|
headers: Object.fromEntries(o.entries()),
|
|
290
287
|
method: "GET",
|
|
291
288
|
redirect: "manual",
|
|
292
|
-
signal: e != null && e.signal ?
|
|
293
|
-
}).then(
|
|
289
|
+
signal: e != null && e.signal ? ee(e.signal) : null
|
|
290
|
+
}).then(X);
|
|
294
291
|
}
|
|
295
|
-
function
|
|
292
|
+
function w(t) {
|
|
296
293
|
return typeof t == "string" && t.length !== 0;
|
|
297
294
|
}
|
|
298
295
|
async function Xe(t, e) {
|
|
299
296
|
if (!(t instanceof URL))
|
|
300
297
|
throw new TypeError('"expectedIssuer" must be an instance of URL');
|
|
301
|
-
if (!
|
|
298
|
+
if (!Y(e, Response))
|
|
302
299
|
throw new TypeError('"response" must be an instance of Response');
|
|
303
300
|
if (e.status !== 200)
|
|
304
|
-
throw new
|
|
305
|
-
|
|
306
|
-
let
|
|
301
|
+
throw new s('"response" is not a conform Authorization Server Metadata response');
|
|
302
|
+
te(e);
|
|
303
|
+
let n;
|
|
307
304
|
try {
|
|
308
|
-
|
|
305
|
+
n = await e.json();
|
|
309
306
|
} catch (o) {
|
|
310
|
-
throw new
|
|
307
|
+
throw new s('failed to parse "response" body as JSON', { cause: o });
|
|
311
308
|
}
|
|
312
|
-
if (!
|
|
313
|
-
throw new
|
|
314
|
-
if (!
|
|
315
|
-
throw new
|
|
316
|
-
if (new URL(
|
|
317
|
-
throw new
|
|
318
|
-
return
|
|
309
|
+
if (!L(n))
|
|
310
|
+
throw new s('"response" body must be a top level object');
|
|
311
|
+
if (!w(n.issuer))
|
|
312
|
+
throw new s('"response" body "issuer" property must be a non-empty string');
|
|
313
|
+
if (new URL(n.issuer).href !== t.href)
|
|
314
|
+
throw new s('"response" body "issuer" does not match "expectedIssuer"');
|
|
315
|
+
return n;
|
|
319
316
|
}
|
|
320
|
-
function
|
|
321
|
-
return
|
|
317
|
+
function H() {
|
|
318
|
+
return A(crypto.getRandomValues(new Uint8Array(32)));
|
|
322
319
|
}
|
|
323
320
|
function et() {
|
|
324
|
-
return
|
|
321
|
+
return H();
|
|
325
322
|
}
|
|
326
323
|
function tt() {
|
|
327
|
-
return
|
|
324
|
+
return H();
|
|
328
325
|
}
|
|
329
|
-
async function
|
|
330
|
-
if (!
|
|
326
|
+
async function nt(t) {
|
|
327
|
+
if (!w(t))
|
|
331
328
|
throw new TypeError('"codeVerifier" must be a non-empty string');
|
|
332
|
-
return
|
|
329
|
+
return A(await crypto.subtle.digest("SHA-256", E(t)));
|
|
333
330
|
}
|
|
334
|
-
function
|
|
331
|
+
function rt(t) {
|
|
335
332
|
if (t instanceof CryptoKey)
|
|
336
333
|
return { key: t };
|
|
337
334
|
if (!((t == null ? void 0 : t.key) instanceof CryptoKey))
|
|
338
335
|
return {};
|
|
339
|
-
if (t.kid !== void 0 && !
|
|
336
|
+
if (t.kid !== void 0 && !w(t.kid))
|
|
340
337
|
throw new TypeError('"kid" must be a non-empty string');
|
|
341
|
-
return {
|
|
338
|
+
return {
|
|
339
|
+
key: t.key,
|
|
340
|
+
kid: t.kid,
|
|
341
|
+
modifyAssertion: t[we]
|
|
342
|
+
};
|
|
342
343
|
}
|
|
343
344
|
function ae(t) {
|
|
344
345
|
return encodeURIComponent(t).replace(/%20/g, "+");
|
|
345
346
|
}
|
|
346
347
|
function ot(t, e) {
|
|
347
|
-
const
|
|
348
|
-
return `Basic ${btoa(`${
|
|
348
|
+
const n = ae(t), o = ae(e);
|
|
349
|
+
return `Basic ${btoa(`${n}:${o}`)}`;
|
|
349
350
|
}
|
|
350
351
|
function it(t) {
|
|
351
352
|
switch (t.algorithm.hash.name) {
|
|
@@ -359,7 +360,7 @@ function it(t) {
|
|
|
359
360
|
throw new S("unsupported RsaHashedKeyAlgorithm hash name");
|
|
360
361
|
}
|
|
361
362
|
}
|
|
362
|
-
function
|
|
363
|
+
function at(t) {
|
|
363
364
|
switch (t.algorithm.hash.name) {
|
|
364
365
|
case "SHA-256":
|
|
365
366
|
return "RS256";
|
|
@@ -371,7 +372,7 @@ function st(t) {
|
|
|
371
372
|
throw new S("unsupported RsaHashedKeyAlgorithm hash name");
|
|
372
373
|
}
|
|
373
374
|
}
|
|
374
|
-
function
|
|
375
|
+
function st(t) {
|
|
375
376
|
switch (t.algorithm.namedCurve) {
|
|
376
377
|
case "P-256":
|
|
377
378
|
return "ES256";
|
|
@@ -383,14 +384,14 @@ function at(t) {
|
|
|
383
384
|
throw new S("unsupported EcKeyAlgorithm namedCurve");
|
|
384
385
|
}
|
|
385
386
|
}
|
|
386
|
-
function
|
|
387
|
+
function be(t) {
|
|
387
388
|
switch (t.algorithm.name) {
|
|
388
389
|
case "RSA-PSS":
|
|
389
390
|
return it(t);
|
|
390
391
|
case "RSASSA-PKCS1-v1_5":
|
|
391
|
-
return st(t);
|
|
392
|
-
case "ECDSA":
|
|
393
392
|
return at(t);
|
|
393
|
+
case "ECDSA":
|
|
394
|
+
return st(t);
|
|
394
395
|
case "Ed25519":
|
|
395
396
|
case "Ed448":
|
|
396
397
|
return "EdDSA";
|
|
@@ -398,271 +399,277 @@ function me(t) {
|
|
|
398
399
|
throw new S("unsupported CryptoKey algorithm name");
|
|
399
400
|
}
|
|
400
401
|
}
|
|
401
|
-
function
|
|
402
|
-
const e = t == null ? void 0 : t[
|
|
402
|
+
function C(t) {
|
|
403
|
+
const e = t == null ? void 0 : t[K];
|
|
403
404
|
return typeof e == "number" && Number.isFinite(e) ? e : 0;
|
|
404
405
|
}
|
|
405
|
-
function
|
|
406
|
-
const e = t == null ? void 0 : t[
|
|
406
|
+
function _e(t) {
|
|
407
|
+
const e = t == null ? void 0 : t[He];
|
|
407
408
|
return typeof e == "number" && Number.isFinite(e) && Math.sign(e) !== -1 ? e : 30;
|
|
408
409
|
}
|
|
409
|
-
function
|
|
410
|
+
function $() {
|
|
410
411
|
return Math.floor(Date.now() / 1e3);
|
|
411
412
|
}
|
|
412
413
|
function ct(t, e) {
|
|
413
|
-
const
|
|
414
|
+
const n = $() + C(e);
|
|
414
415
|
return {
|
|
415
|
-
jti:
|
|
416
|
+
jti: H(),
|
|
416
417
|
aud: [t.issuer, t.token_endpoint],
|
|
417
|
-
exp:
|
|
418
|
-
iat:
|
|
419
|
-
nbf:
|
|
418
|
+
exp: n + 60,
|
|
419
|
+
iat: n,
|
|
420
|
+
nbf: n,
|
|
420
421
|
iss: e.client_id,
|
|
421
422
|
sub: e.client_id
|
|
422
423
|
};
|
|
423
424
|
}
|
|
424
|
-
async function ut(t, e,
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
kid: o
|
|
428
|
-
}, ct(t, e), r);
|
|
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);
|
|
429
428
|
}
|
|
430
|
-
function
|
|
429
|
+
function x(t) {
|
|
431
430
|
if (typeof t != "object" || t === null)
|
|
432
431
|
throw new TypeError('"as" must be an object');
|
|
433
|
-
if (!
|
|
432
|
+
if (!w(t.issuer))
|
|
434
433
|
throw new TypeError('"as.issuer" property must be a non-empty string');
|
|
435
434
|
return !0;
|
|
436
435
|
}
|
|
437
|
-
function
|
|
436
|
+
function I(t) {
|
|
438
437
|
if (typeof t != "object" || t === null)
|
|
439
438
|
throw new TypeError('"client" must be an object');
|
|
440
|
-
if (!
|
|
439
|
+
if (!w(t.client_id))
|
|
441
440
|
throw new TypeError('"client.client_id" property must be a non-empty string');
|
|
442
441
|
return !0;
|
|
443
442
|
}
|
|
444
|
-
function
|
|
445
|
-
if (!
|
|
443
|
+
function se(t) {
|
|
444
|
+
if (!w(t))
|
|
446
445
|
throw new TypeError('"client.client_secret" property must be a non-empty string');
|
|
447
446
|
return t;
|
|
448
447
|
}
|
|
449
|
-
function
|
|
448
|
+
function B(t, e) {
|
|
450
449
|
if (e !== void 0)
|
|
451
450
|
throw new TypeError(`"options.clientPrivateKey" property must not be provided when ${t} client authentication method is used.`);
|
|
452
451
|
}
|
|
453
|
-
function
|
|
452
|
+
function ce(t, e) {
|
|
454
453
|
if (e !== void 0)
|
|
455
454
|
throw new TypeError(`"client.client_secret" property must not be provided when ${t} client authentication method is used.`);
|
|
456
455
|
}
|
|
457
|
-
async function lt(t, e,
|
|
458
|
-
switch (
|
|
456
|
+
async function lt(t, e, n, o, a) {
|
|
457
|
+
switch (n.delete("client_secret"), n.delete("client_assertion_type"), n.delete("client_assertion"), e.token_endpoint_auth_method) {
|
|
459
458
|
case void 0:
|
|
460
459
|
case "client_secret_basic": {
|
|
461
|
-
|
|
460
|
+
B("client_secret_basic", a), o.set("authorization", ot(e.client_id, se(e.client_secret)));
|
|
462
461
|
break;
|
|
463
462
|
}
|
|
464
463
|
case "client_secret_post": {
|
|
465
|
-
|
|
464
|
+
B("client_secret_post", a), n.set("client_id", e.client_id), n.set("client_secret", se(e.client_secret));
|
|
466
465
|
break;
|
|
467
466
|
}
|
|
468
467
|
case "private_key_jwt": {
|
|
469
|
-
if (
|
|
468
|
+
if (ce("private_key_jwt", e.client_secret), a === void 0)
|
|
470
469
|
throw new TypeError('"options.clientPrivateKey" must be provided when "client.token_endpoint_auth_method" is "private_key_jwt"');
|
|
471
|
-
const { key:
|
|
472
|
-
if (!
|
|
470
|
+
const { key: r, kid: i, modifyAssertion: c } = rt(a);
|
|
471
|
+
if (!ye(r))
|
|
473
472
|
throw new TypeError('"options.clientPrivateKey.key" must be a private CryptoKey');
|
|
474
|
-
|
|
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));
|
|
475
474
|
break;
|
|
476
475
|
}
|
|
477
476
|
case "tls_client_auth":
|
|
478
477
|
case "self_signed_tls_client_auth":
|
|
479
478
|
case "none": {
|
|
480
|
-
|
|
479
|
+
ce(e.token_endpoint_auth_method, e.client_secret), B(e.token_endpoint_auth_method, a), n.set("client_id", e.client_id);
|
|
481
480
|
break;
|
|
482
481
|
}
|
|
483
482
|
default:
|
|
484
483
|
throw new S("unsupported client token_endpoint_auth_method");
|
|
485
484
|
}
|
|
486
485
|
}
|
|
487
|
-
async function
|
|
488
|
-
if (!
|
|
486
|
+
async function ve(t, e, n) {
|
|
487
|
+
if (!n.usages.includes("sign"))
|
|
489
488
|
throw new TypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"');
|
|
490
|
-
const o = `${
|
|
491
|
-
return `${o}.${
|
|
489
|
+
const o = `${A(E(JSON.stringify(t)))}.${A(E(JSON.stringify(e)))}`, a = A(await crypto.subtle.sign(Pe(n), n, E(o)));
|
|
490
|
+
return `${o}.${a}`;
|
|
492
491
|
}
|
|
493
|
-
async function dt(t, e,
|
|
494
|
-
|
|
495
|
-
|
|
492
|
+
async function dt(t, e, n, o, a, r) {
|
|
493
|
+
var T;
|
|
494
|
+
const { privateKey: i, publicKey: c, nonce: p = ge.get(n.origin) } = e;
|
|
495
|
+
if (!ye(i))
|
|
496
496
|
throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
|
|
497
|
-
if (!
|
|
497
|
+
if (!Ye(c))
|
|
498
498
|
throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');
|
|
499
|
-
if (
|
|
499
|
+
if (p !== void 0 && !w(p))
|
|
500
500
|
throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');
|
|
501
|
-
if (!
|
|
501
|
+
if (!c.extractable)
|
|
502
502
|
throw new TypeError('"DPoP.publicKey.extractable" must be true');
|
|
503
|
-
const
|
|
504
|
-
alg:
|
|
503
|
+
const _ = $() + a, f = {
|
|
504
|
+
alg: be(i),
|
|
505
505
|
typ: "dpop+jwt",
|
|
506
|
-
jwk: await ft(
|
|
507
|
-
}, {
|
|
508
|
-
iat:
|
|
509
|
-
jti:
|
|
506
|
+
jwk: await ft(c)
|
|
507
|
+
}, y = {
|
|
508
|
+
iat: _,
|
|
509
|
+
jti: H(),
|
|
510
510
|
htm: o,
|
|
511
|
-
nonce:
|
|
512
|
-
htu: `${
|
|
513
|
-
ath:
|
|
514
|
-
}
|
|
515
|
-
t.set("dpop", y);
|
|
511
|
+
nonce: p,
|
|
512
|
+
htu: `${n.origin}${n.pathname}`,
|
|
513
|
+
ath: r ? A(await crypto.subtle.digest("SHA-256", E(r))) : void 0
|
|
514
|
+
};
|
|
515
|
+
(T = e[we]) == null || T.call(e, f, y), t.set("dpop", await ve(f, y, i));
|
|
516
516
|
}
|
|
517
|
-
let
|
|
517
|
+
let D;
|
|
518
518
|
async function ht(t) {
|
|
519
|
-
const { kty: e, e:
|
|
520
|
-
return
|
|
519
|
+
const { kty: e, e: n, n: o, x: a, y: r, crv: i } = await crypto.subtle.exportKey("jwk", t), c = { kty: e, e: n, n: o, x: a, y: r, crv: i };
|
|
520
|
+
return D.set(t, c), c;
|
|
521
521
|
}
|
|
522
522
|
async function ft(t) {
|
|
523
|
-
return
|
|
523
|
+
return D || (D = /* @__PURE__ */ new WeakMap()), D.get(t) || ht(t);
|
|
524
524
|
}
|
|
525
|
-
function
|
|
525
|
+
function ue(t, e, n) {
|
|
526
526
|
if (typeof t != "string")
|
|
527
|
-
throw new TypeError(`"as.${e}" must be a string`);
|
|
527
|
+
throw n ? new TypeError(`"as.mtls_endpoint_aliases.${e}" must be a string`) : new TypeError(`"as.${e}" must be a string`);
|
|
528
528
|
return new URL(t);
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
return
|
|
530
|
+
function Se(t, e, n = !1) {
|
|
531
|
+
return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ? ue(t.mtls_endpoint_aliases[e], e, n) : ue(t[e], e, n);
|
|
532
|
+
}
|
|
533
|
+
function Te(t, e) {
|
|
534
|
+
return !!(t.use_mtls_endpoint_aliases || e != null && e[Fe]);
|
|
532
535
|
}
|
|
533
536
|
function Z(t) {
|
|
534
537
|
const e = t;
|
|
535
538
|
return typeof e != "object" || Array.isArray(e) || e === null ? !1 : e.error !== void 0;
|
|
536
539
|
}
|
|
537
|
-
async function
|
|
538
|
-
if (!
|
|
540
|
+
async function pt(t, e, n, o, a, r) {
|
|
541
|
+
if (!w(t))
|
|
539
542
|
throw new TypeError('"accessToken" must be a non-empty string');
|
|
540
|
-
if (!(
|
|
543
|
+
if (!(n instanceof URL))
|
|
541
544
|
throw new TypeError('"url" must be an instance of URL');
|
|
542
|
-
return o =
|
|
543
|
-
body:
|
|
545
|
+
return o = W(o), (r == null ? void 0 : r.DPoP) === void 0 ? o.set("authorization", `Bearer ${t}`) : (await dt(o, r.DPoP, n, e.toUpperCase(), C({ [K]: r == null ? void 0 : r[K] }), t), o.set("authorization", `DPoP ${t}`)), ((r == null ? void 0 : r[Q]) || fetch)(n.href, {
|
|
546
|
+
body: a,
|
|
544
547
|
headers: Object.fromEntries(o.entries()),
|
|
545
548
|
method: e,
|
|
546
549
|
redirect: "manual",
|
|
547
|
-
signal:
|
|
548
|
-
}).then(
|
|
550
|
+
signal: r != null && r.signal ? ee(r.signal) : null
|
|
551
|
+
}).then(X);
|
|
549
552
|
}
|
|
550
|
-
async function
|
|
551
|
-
|
|
552
|
-
const
|
|
553
|
-
return e.userinfo_signed_response_alg ?
|
|
553
|
+
async function wt(t, e, n, o) {
|
|
554
|
+
x(t), I(e);
|
|
555
|
+
const a = Se(t, "userinfo_endpoint", Te(e, o)), r = W(o == null ? void 0 : o.headers);
|
|
556
|
+
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, {
|
|
554
557
|
...o,
|
|
555
|
-
[
|
|
558
|
+
[K]: C(e)
|
|
556
559
|
});
|
|
557
560
|
}
|
|
558
|
-
async function
|
|
559
|
-
return await lt(t, e,
|
|
560
|
-
body:
|
|
561
|
-
headers: Object.fromEntries(
|
|
562
|
-
method:
|
|
561
|
+
async function gt(t, e, n, o, a, r, i) {
|
|
562
|
+
return await lt(t, e, a, r, i == null ? void 0 : i.clientPrivateKey), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), ((i == null ? void 0 : i[Q]) || fetch)(o.href, {
|
|
563
|
+
body: a,
|
|
564
|
+
headers: Object.fromEntries(r.entries()),
|
|
565
|
+
method: n,
|
|
563
566
|
redirect: "manual",
|
|
564
|
-
signal: i != null && i.signal ?
|
|
565
|
-
}).then(
|
|
567
|
+
signal: i != null && i.signal ? ee(i.signal) : null
|
|
568
|
+
}).then(X);
|
|
566
569
|
}
|
|
567
|
-
async function
|
|
568
|
-
const
|
|
569
|
-
o.set("grant_type",
|
|
570
|
-
const i =
|
|
571
|
-
return i.set("accept", "application/json"),
|
|
570
|
+
async function ke(t, e, n, o, a) {
|
|
571
|
+
const r = Se(t, "token_endpoint", Te(e, a));
|
|
572
|
+
o.set("grant_type", n);
|
|
573
|
+
const i = W(a == null ? void 0 : a.headers);
|
|
574
|
+
return i.set("accept", "application/json"), gt(t, e, "POST", r, o, i, a);
|
|
572
575
|
}
|
|
573
|
-
async function
|
|
574
|
-
if (
|
|
576
|
+
async function mt(t, e, n, o) {
|
|
577
|
+
if (x(t), I(e), !w(n))
|
|
575
578
|
throw new TypeError('"refreshToken" must be a non-empty string');
|
|
576
|
-
const
|
|
577
|
-
return
|
|
579
|
+
const a = new URLSearchParams(o == null ? void 0 : o.additionalParameters);
|
|
580
|
+
return a.set("refresh_token", n), ke(t, e, "refresh_token", a, o);
|
|
578
581
|
}
|
|
579
|
-
const
|
|
580
|
-
function
|
|
582
|
+
const Ae = /* @__PURE__ */ new WeakMap();
|
|
583
|
+
function yt(t) {
|
|
581
584
|
if (!t.id_token)
|
|
582
585
|
return;
|
|
583
|
-
const e =
|
|
586
|
+
const e = Ae.get(t);
|
|
584
587
|
if (!e)
|
|
585
588
|
throw new TypeError('"ref" was already garbage collected or did not resolve from the proper sources');
|
|
586
|
-
return e;
|
|
589
|
+
return e[0];
|
|
587
590
|
}
|
|
588
|
-
async function
|
|
589
|
-
if (
|
|
591
|
+
async function Ee(t, e, n, o = !1, a = !1) {
|
|
592
|
+
if (x(t), I(e), !Y(n, Response))
|
|
590
593
|
throw new TypeError('"response" must be an instance of Response');
|
|
591
|
-
if (
|
|
594
|
+
if (n.status !== 200) {
|
|
592
595
|
let i;
|
|
593
|
-
if (i = await
|
|
596
|
+
if (i = await Pt(n))
|
|
594
597
|
return i;
|
|
595
|
-
throw new
|
|
598
|
+
throw new s('"response" is not a conform Token Endpoint response');
|
|
596
599
|
}
|
|
597
|
-
|
|
598
|
-
let
|
|
600
|
+
te(n);
|
|
601
|
+
let r;
|
|
599
602
|
try {
|
|
600
|
-
|
|
603
|
+
r = await n.json();
|
|
601
604
|
} catch (i) {
|
|
602
|
-
throw new
|
|
605
|
+
throw new s('failed to parse "response" body as JSON', { cause: i });
|
|
603
606
|
}
|
|
604
|
-
if (!
|
|
605
|
-
throw new
|
|
606
|
-
if (!
|
|
607
|
-
throw new
|
|
608
|
-
if (!
|
|
609
|
-
throw new
|
|
610
|
-
if (
|
|
607
|
+
if (!L(r))
|
|
608
|
+
throw new s('"response" body must be a top level object');
|
|
609
|
+
if (!w(r.access_token))
|
|
610
|
+
throw new s('"response" body "access_token" property must be a non-empty string');
|
|
611
|
+
if (!w(r.token_type))
|
|
612
|
+
throw new s('"response" body "token_type" property must be a non-empty string');
|
|
613
|
+
if (r.token_type = r.token_type.toLowerCase(), r.token_type !== "dpop" && r.token_type !== "bearer")
|
|
611
614
|
throw new S("unsupported `token_type` value");
|
|
612
|
-
if (
|
|
613
|
-
throw new
|
|
614
|
-
if (!
|
|
615
|
-
throw new
|
|
616
|
-
if (
|
|
617
|
-
throw new
|
|
615
|
+
if (r.expires_in !== void 0 && (typeof r.expires_in != "number" || r.expires_in <= 0))
|
|
616
|
+
throw new s('"response" body "expires_in" property must be a positive number');
|
|
617
|
+
if (!a && r.refresh_token !== void 0 && !w(r.refresh_token))
|
|
618
|
+
throw new s('"response" body "refresh_token" property must be a non-empty string');
|
|
619
|
+
if (r.scope !== void 0 && typeof r.scope != "string")
|
|
620
|
+
throw new s('"response" body "scope" property must be a string');
|
|
618
621
|
if (!o) {
|
|
619
|
-
if (
|
|
620
|
-
throw new
|
|
621
|
-
if (
|
|
622
|
-
const { claims: i } = await
|
|
623
|
-
if (Array.isArray(i.aud) && i.aud.length !== 1
|
|
624
|
-
|
|
622
|
+
if (r.id_token !== void 0 && !w(r.id_token))
|
|
623
|
+
throw new s('"response" body "id_token" property must be a non-empty string');
|
|
624
|
+
if (r.id_token) {
|
|
625
|
+
const { claims: i, jwt: c } = await Ct(r.id_token, xt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Ue, C(e), _e(e), e[$e]).then(At.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(vt.bind(void 0, t.issuer)).then(_t.bind(void 0, e.client_id));
|
|
626
|
+
if (Array.isArray(i.aud) && i.aud.length !== 1) {
|
|
627
|
+
if (i.azp === void 0)
|
|
628
|
+
throw new s('ID Token "aud" (audience) claim includes additional untrusted audiences');
|
|
629
|
+
if (i.azp !== e.client_id)
|
|
630
|
+
throw new s('unexpected ID Token "azp" (authorized party) claim value');
|
|
631
|
+
}
|
|
625
632
|
if (i.auth_time !== void 0 && (!Number.isFinite(i.auth_time) || Math.sign(i.auth_time) !== 1))
|
|
626
|
-
throw new
|
|
627
|
-
|
|
633
|
+
throw new s('ID Token "auth_time" (authentication time) must be a positive number');
|
|
634
|
+
Ae.set(r, [i, c]);
|
|
628
635
|
}
|
|
629
636
|
}
|
|
630
|
-
return
|
|
637
|
+
return r;
|
|
631
638
|
}
|
|
632
|
-
async function
|
|
633
|
-
return
|
|
639
|
+
async function bt(t, e, n) {
|
|
640
|
+
return Ee(t, e, n);
|
|
634
641
|
}
|
|
635
|
-
function
|
|
642
|
+
function _t(t, e) {
|
|
636
643
|
if (Array.isArray(e.claims.aud)) {
|
|
637
644
|
if (!e.claims.aud.includes(t))
|
|
638
|
-
throw new
|
|
645
|
+
throw new s('unexpected JWT "aud" (audience) claim value');
|
|
639
646
|
} else if (e.claims.aud !== t)
|
|
640
|
-
throw new
|
|
647
|
+
throw new s('unexpected JWT "aud" (audience) claim value');
|
|
641
648
|
return e;
|
|
642
649
|
}
|
|
643
|
-
function
|
|
650
|
+
function vt(t, e) {
|
|
644
651
|
if (e.claims.iss !== t)
|
|
645
|
-
throw new
|
|
652
|
+
throw new s('unexpected JWT "iss" (issuer) claim value');
|
|
646
653
|
return e;
|
|
647
654
|
}
|
|
648
|
-
const
|
|
649
|
-
function
|
|
650
|
-
return
|
|
655
|
+
const Re = /* @__PURE__ */ new WeakSet();
|
|
656
|
+
function St(t) {
|
|
657
|
+
return Re.add(t), t;
|
|
651
658
|
}
|
|
652
|
-
async function
|
|
653
|
-
if (
|
|
659
|
+
async function Tt(t, e, n, o, a, r) {
|
|
660
|
+
if (x(t), I(e), !Re.has(n))
|
|
654
661
|
throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
|
|
655
|
-
if (!
|
|
662
|
+
if (!w(o))
|
|
656
663
|
throw new TypeError('"redirectUri" must be a non-empty string');
|
|
657
|
-
if (!
|
|
664
|
+
if (!w(a))
|
|
658
665
|
throw new TypeError('"codeVerifier" must be a non-empty string');
|
|
659
|
-
const i =
|
|
666
|
+
const i = k(n, "code");
|
|
660
667
|
if (!i)
|
|
661
|
-
throw new
|
|
662
|
-
const
|
|
663
|
-
return
|
|
668
|
+
throw new s('no authorization code in "callbackParameters"');
|
|
669
|
+
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), ke(t, e, "authorization_code", c, r);
|
|
664
671
|
}
|
|
665
|
-
const
|
|
672
|
+
const kt = {
|
|
666
673
|
aud: "audience",
|
|
667
674
|
c_hash: "code hash",
|
|
668
675
|
client_id: "client id",
|
|
@@ -679,55 +686,55 @@ const Et = {
|
|
|
679
686
|
cnf: "confirmation"
|
|
680
687
|
};
|
|
681
688
|
function At(t, e) {
|
|
682
|
-
for (const
|
|
683
|
-
if (e.claims[
|
|
684
|
-
throw new
|
|
689
|
+
for (const n of t)
|
|
690
|
+
if (e.claims[n] === void 0)
|
|
691
|
+
throw new s(`JWT "${n}" (${kt[n]}) claim missing`);
|
|
685
692
|
return e;
|
|
686
693
|
}
|
|
687
|
-
const
|
|
688
|
-
async function
|
|
689
|
-
const
|
|
690
|
-
if (Z(
|
|
691
|
-
return
|
|
692
|
-
if (!
|
|
693
|
-
throw new
|
|
694
|
-
|
|
695
|
-
const i =
|
|
696
|
-
if ((e.require_auth_time ||
|
|
697
|
-
throw new
|
|
698
|
-
if (
|
|
699
|
-
if (typeof
|
|
694
|
+
const Et = Symbol(), q = Symbol();
|
|
695
|
+
async function Rt(t, e, n, o, a) {
|
|
696
|
+
const r = await Ee(t, e, n);
|
|
697
|
+
if (Z(r))
|
|
698
|
+
return r;
|
|
699
|
+
if (!w(r.id_token))
|
|
700
|
+
throw new s('"response" body "id_token" property must be a non-empty string');
|
|
701
|
+
a ?? (a = e.default_max_age ?? q);
|
|
702
|
+
const i = yt(r);
|
|
703
|
+
if ((e.require_auth_time || a !== q) && i.auth_time === void 0)
|
|
704
|
+
throw new s('ID Token "auth_time" (authentication time) claim missing');
|
|
705
|
+
if (a !== q) {
|
|
706
|
+
if (typeof a != "number" || a < 0)
|
|
700
707
|
throw new TypeError('"maxAge" must be a non-negative number');
|
|
701
|
-
const
|
|
702
|
-
if (i.auth_time +
|
|
703
|
-
throw new
|
|
708
|
+
const c = $() + C(e), p = _e(e);
|
|
709
|
+
if (i.auth_time + a < c - p)
|
|
710
|
+
throw new s("too much time has elapsed since the last End-User authentication");
|
|
704
711
|
}
|
|
705
712
|
switch (o) {
|
|
706
713
|
case void 0:
|
|
707
|
-
case
|
|
714
|
+
case Et:
|
|
708
715
|
if (i.nonce !== void 0)
|
|
709
|
-
throw new
|
|
716
|
+
throw new s('unexpected ID Token "nonce" claim value');
|
|
710
717
|
break;
|
|
711
718
|
default:
|
|
712
|
-
if (!
|
|
719
|
+
if (!w(o))
|
|
713
720
|
throw new TypeError('"expectedNonce" must be a non-empty string');
|
|
714
721
|
if (i.nonce === void 0)
|
|
715
|
-
throw new
|
|
722
|
+
throw new s('ID Token "nonce" claim missing');
|
|
716
723
|
if (i.nonce !== o)
|
|
717
|
-
throw new
|
|
724
|
+
throw new s('unexpected ID Token "nonce" claim value');
|
|
718
725
|
}
|
|
719
|
-
return
|
|
726
|
+
return r;
|
|
720
727
|
}
|
|
721
|
-
function
|
|
728
|
+
function te(t) {
|
|
722
729
|
if (t.bodyUsed)
|
|
723
730
|
throw new TypeError('"response" body has been used already');
|
|
724
731
|
}
|
|
725
|
-
async function
|
|
732
|
+
async function Pt(t) {
|
|
726
733
|
if (t.status > 399 && t.status < 500) {
|
|
727
|
-
|
|
734
|
+
te(t);
|
|
728
735
|
try {
|
|
729
736
|
const e = await t.json();
|
|
730
|
-
if (
|
|
737
|
+
if (L(e) && typeof e.error == "string" && e.error.length)
|
|
731
738
|
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;
|
|
732
739
|
} catch {
|
|
733
740
|
}
|
|
@@ -735,7 +742,7 @@ async function xt(t) {
|
|
|
735
742
|
}
|
|
736
743
|
function le(t) {
|
|
737
744
|
if (typeof t.modulusLength != "number" || t.modulusLength < 2048)
|
|
738
|
-
throw new
|
|
745
|
+
throw new s(`${t.name} modulusLength must be at least 2048 bits`);
|
|
739
746
|
}
|
|
740
747
|
function Ut(t) {
|
|
741
748
|
switch (t) {
|
|
@@ -749,7 +756,7 @@ function Ut(t) {
|
|
|
749
756
|
throw new S();
|
|
750
757
|
}
|
|
751
758
|
}
|
|
752
|
-
function
|
|
759
|
+
function Pe(t) {
|
|
753
760
|
switch (t.algorithm.name) {
|
|
754
761
|
case "ECDSA":
|
|
755
762
|
return {
|
|
@@ -776,160 +783,160 @@ function Ee(t) {
|
|
|
776
783
|
}
|
|
777
784
|
throw new S();
|
|
778
785
|
}
|
|
779
|
-
const
|
|
780
|
-
async function Lt(t, e,
|
|
781
|
-
const
|
|
782
|
-
if (
|
|
783
|
-
throw new
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
let
|
|
786
|
+
const Ue = Symbol();
|
|
787
|
+
async function Lt(t, e, n, o) {
|
|
788
|
+
const a = `${t}.${e}`;
|
|
789
|
+
if (!await crypto.subtle.verify(Pe(n), n, o, E(a)))
|
|
790
|
+
throw new s("JWT signature verification failed");
|
|
791
|
+
}
|
|
792
|
+
async function Ct(t, e, n, o, a, r) {
|
|
793
|
+
let { 0: i, 1: c, 2: p, length: _ } = t.split(".");
|
|
794
|
+
if (_ === 5)
|
|
795
|
+
if (r !== void 0)
|
|
796
|
+
t = await r(t), { 0: i, 1: c, 2: p, length: _ } = t.split(".");
|
|
797
|
+
else
|
|
798
|
+
throw new S("JWE structure JWTs are not supported");
|
|
799
|
+
if (_ !== 3)
|
|
800
|
+
throw new s("Invalid JWT");
|
|
801
|
+
let f;
|
|
787
802
|
try {
|
|
788
|
-
|
|
789
|
-
} catch (
|
|
790
|
-
throw new
|
|
791
|
-
}
|
|
792
|
-
if (!C(m))
|
|
793
|
-
throw new a("JWT Header must be a top level object");
|
|
794
|
-
if (e(m), m.crit !== void 0)
|
|
795
|
-
throw new a('unexpected JWT "crit" header parameter');
|
|
796
|
-
const y = k(u);
|
|
797
|
-
let b;
|
|
798
|
-
if (r !== Ae) {
|
|
799
|
-
b = await r(m);
|
|
800
|
-
const P = `${n}.${i}`;
|
|
801
|
-
if (!await crypto.subtle.verify(Ee(b), b, y, A(P)))
|
|
802
|
-
throw new a("JWT signature verification failed");
|
|
803
|
+
f = JSON.parse(E(A(i)));
|
|
804
|
+
} catch (l) {
|
|
805
|
+
throw new s("failed to parse JWT Header body as base64url encoded JSON", { cause: l });
|
|
803
806
|
}
|
|
807
|
+
if (!L(f))
|
|
808
|
+
throw new s("JWT Header must be a top level object");
|
|
809
|
+
if (e(f), f.crit !== void 0)
|
|
810
|
+
throw new s('unexpected JWT "crit" header parameter');
|
|
811
|
+
const y = A(p);
|
|
812
|
+
let T;
|
|
813
|
+
n !== Ue && (T = await n(f), await Lt(i, c, T, y));
|
|
804
814
|
let h;
|
|
805
815
|
try {
|
|
806
|
-
h = JSON.parse(A(
|
|
807
|
-
} catch (
|
|
808
|
-
throw new
|
|
816
|
+
h = JSON.parse(E(A(c)));
|
|
817
|
+
} catch (l) {
|
|
818
|
+
throw new s("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
|
|
809
819
|
}
|
|
810
|
-
if (!
|
|
811
|
-
throw new
|
|
812
|
-
const
|
|
820
|
+
if (!L(h))
|
|
821
|
+
throw new s("JWT Payload must be a top level object");
|
|
822
|
+
const j = $() + o;
|
|
813
823
|
if (h.exp !== void 0) {
|
|
814
824
|
if (typeof h.exp != "number")
|
|
815
|
-
throw new
|
|
816
|
-
if (h.exp <=
|
|
817
|
-
throw new
|
|
825
|
+
throw new s('unexpected JWT "exp" (expiration time) claim type');
|
|
826
|
+
if (h.exp <= j - a)
|
|
827
|
+
throw new s('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()');
|
|
818
828
|
}
|
|
819
829
|
if (h.iat !== void 0 && typeof h.iat != "number")
|
|
820
|
-
throw new
|
|
830
|
+
throw new s('unexpected JWT "iat" (issued at) claim type');
|
|
821
831
|
if (h.iss !== void 0 && typeof h.iss != "string")
|
|
822
|
-
throw new
|
|
832
|
+
throw new s('unexpected JWT "iss" (issuer) claim type');
|
|
823
833
|
if (h.nbf !== void 0) {
|
|
824
834
|
if (typeof h.nbf != "number")
|
|
825
|
-
throw new
|
|
826
|
-
if (h.nbf >
|
|
827
|
-
throw new
|
|
835
|
+
throw new s('unexpected JWT "nbf" (not before) claim type');
|
|
836
|
+
if (h.nbf > j + a)
|
|
837
|
+
throw new s('unexpected JWT "nbf" (not before) claim value, timestamp is > now()');
|
|
828
838
|
}
|
|
829
839
|
if (h.aud !== void 0 && typeof h.aud != "string" && !Array.isArray(h.aud))
|
|
830
|
-
throw new
|
|
831
|
-
return { header:
|
|
840
|
+
throw new s('unexpected JWT "aud" (audience) claim type');
|
|
841
|
+
return { header: f, claims: h, signature: y, key: T, jwt: t };
|
|
832
842
|
}
|
|
833
|
-
function
|
|
843
|
+
function xt(t, e, n) {
|
|
834
844
|
if (t !== void 0) {
|
|
835
|
-
if (
|
|
836
|
-
throw new
|
|
845
|
+
if (n.alg !== t)
|
|
846
|
+
throw new s('unexpected JWT "alg" header parameter');
|
|
837
847
|
return;
|
|
838
848
|
}
|
|
839
849
|
if (Array.isArray(e)) {
|
|
840
|
-
if (!e.includes(
|
|
841
|
-
throw new
|
|
850
|
+
if (!e.includes(n.alg))
|
|
851
|
+
throw new s('unexpected JWT "alg" header parameter');
|
|
842
852
|
return;
|
|
843
853
|
}
|
|
844
|
-
if (
|
|
845
|
-
throw new
|
|
854
|
+
if (n.alg !== "RS256")
|
|
855
|
+
throw new s('unexpected JWT "alg" header parameter');
|
|
846
856
|
}
|
|
847
|
-
function
|
|
848
|
-
const { 0:
|
|
857
|
+
function k(t, e) {
|
|
858
|
+
const { 0: n, length: o } = t.getAll(e);
|
|
849
859
|
if (o > 1)
|
|
850
|
-
throw new
|
|
851
|
-
return
|
|
860
|
+
throw new s(`"${e}" parameter must be provided only once`);
|
|
861
|
+
return n;
|
|
852
862
|
}
|
|
853
863
|
const It = Symbol(), jt = Symbol();
|
|
854
|
-
function Jt(t, e,
|
|
855
|
-
if (
|
|
864
|
+
function Jt(t, e, n, o) {
|
|
865
|
+
if (x(t), I(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
|
|
856
866
|
throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
|
|
857
|
-
if (
|
|
858
|
-
throw new
|
|
859
|
-
const
|
|
860
|
-
if (!
|
|
861
|
-
throw new
|
|
862
|
-
if (
|
|
863
|
-
throw new
|
|
867
|
+
if (k(n, "response"))
|
|
868
|
+
throw new s('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');
|
|
869
|
+
const a = k(n, "iss"), r = k(n, "state");
|
|
870
|
+
if (!a && t.authorization_response_iss_parameter_supported)
|
|
871
|
+
throw new s('response parameter "iss" (issuer) missing');
|
|
872
|
+
if (a && a !== t.issuer)
|
|
873
|
+
throw new s('unexpected "iss" (issuer) response parameter value');
|
|
864
874
|
switch (o) {
|
|
865
875
|
case void 0:
|
|
866
876
|
case jt:
|
|
867
|
-
if (
|
|
868
|
-
throw new
|
|
877
|
+
if (r !== void 0)
|
|
878
|
+
throw new s('unexpected "state" response parameter encountered');
|
|
869
879
|
break;
|
|
870
880
|
case It:
|
|
871
881
|
break;
|
|
872
882
|
default:
|
|
873
|
-
if (!
|
|
874
|
-
throw new
|
|
875
|
-
if (
|
|
876
|
-
throw new
|
|
877
|
-
if (
|
|
878
|
-
throw new
|
|
883
|
+
if (!w(o))
|
|
884
|
+
throw new s('"expectedState" must be a non-empty string');
|
|
885
|
+
if (r === void 0)
|
|
886
|
+
throw new s('response parameter "state" missing');
|
|
887
|
+
if (r !== o)
|
|
888
|
+
throw new s('unexpected "state" response parameter value');
|
|
879
889
|
}
|
|
880
|
-
const i =
|
|
890
|
+
const i = k(n, "error");
|
|
881
891
|
if (i)
|
|
882
892
|
return {
|
|
883
893
|
error: i,
|
|
884
|
-
error_description:
|
|
885
|
-
error_uri:
|
|
894
|
+
error_description: k(n, "error_description"),
|
|
895
|
+
error_uri: k(n, "error_uri")
|
|
886
896
|
};
|
|
887
|
-
const
|
|
888
|
-
if (
|
|
897
|
+
const c = k(n, "id_token"), p = k(n, "token");
|
|
898
|
+
if (c !== void 0 || p !== void 0)
|
|
889
899
|
throw new S("implicit and hybrid flows are not supported");
|
|
890
|
-
return
|
|
900
|
+
return St(new URLSearchParams(n));
|
|
891
901
|
}
|
|
892
902
|
function Ot({
|
|
893
903
|
handleCallback: t
|
|
894
904
|
}) {
|
|
895
|
-
const
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
/* @__PURE__ */ E.jsx(ze, { className: "mb-4", children: "Check the configuration of your authorization provider and ensure all settings such as the callback URL are configured correctly." }),
|
|
909
|
-
"An error occurred while authorizing the user.",
|
|
910
|
-
/* @__PURE__ */ E.jsx(We, { code: e.toString(), language: "plain" })
|
|
911
|
-
] })
|
|
905
|
+
const e = ze({
|
|
906
|
+
retry: !1,
|
|
907
|
+
queryKey: ["oauth-callback"],
|
|
908
|
+
queryFn: async () => {
|
|
909
|
+
try {
|
|
910
|
+
return await t();
|
|
911
|
+
} catch (n) {
|
|
912
|
+
throw new De("Could not validate user", {
|
|
913
|
+
cause: n,
|
|
914
|
+
title: "Authentication Error",
|
|
915
|
+
developerHint: "Check the configuration of your authorization provider and ensure all settings such as the callback URL are configured correctly."
|
|
916
|
+
});
|
|
917
|
+
}
|
|
912
918
|
}
|
|
913
|
-
|
|
919
|
+
});
|
|
920
|
+
return /* @__PURE__ */ fe.jsx(Ke, { to: e.data });
|
|
914
921
|
}
|
|
915
|
-
class
|
|
922
|
+
class P extends Error {
|
|
916
923
|
}
|
|
917
|
-
class de extends
|
|
918
|
-
constructor(e,
|
|
919
|
-
super(e, o), this.error =
|
|
924
|
+
class de extends P {
|
|
925
|
+
constructor(e, n, o) {
|
|
926
|
+
super(e, o), this.error = n;
|
|
920
927
|
}
|
|
921
928
|
}
|
|
922
929
|
const V = "code-verifier";
|
|
923
|
-
class Nt extends
|
|
924
|
-
constructor(e,
|
|
925
|
-
super(), this.callbackUrlPath = e, this.handleCallback =
|
|
930
|
+
class Nt extends Ne {
|
|
931
|
+
constructor(e, n) {
|
|
932
|
+
super(), this.callbackUrlPath = e, this.handleCallback = n;
|
|
926
933
|
}
|
|
927
934
|
getRoutes() {
|
|
928
935
|
return [
|
|
929
936
|
...super.getRoutes(),
|
|
930
937
|
{
|
|
931
938
|
path: this.callbackUrlPath,
|
|
932
|
-
element: /* @__PURE__ */
|
|
939
|
+
element: /* @__PURE__ */ fe.jsx(Ot, { handleCallback: this.handleCallback })
|
|
933
940
|
}
|
|
934
941
|
];
|
|
935
942
|
}
|
|
@@ -937,100 +944,100 @@ class Nt extends je {
|
|
|
937
944
|
class zt {
|
|
938
945
|
constructor({
|
|
939
946
|
issuer: e,
|
|
940
|
-
audience:
|
|
947
|
+
audience: n,
|
|
941
948
|
clientId: o,
|
|
942
|
-
redirectToAfterSignUp:
|
|
943
|
-
redirectToAfterSignIn:
|
|
949
|
+
redirectToAfterSignUp: a,
|
|
950
|
+
redirectToAfterSignIn: r,
|
|
944
951
|
redirectToAfterSignOut: i
|
|
945
952
|
}) {
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
953
|
+
b(this, "client");
|
|
954
|
+
b(this, "issuer");
|
|
955
|
+
b(this, "authorizationServer");
|
|
956
|
+
b(this, "callbackUrlPath", "/oauth/callback");
|
|
957
|
+
b(this, "logoutRedirectUrlPath", "/");
|
|
958
|
+
b(this, "onAuthorizationUrl");
|
|
959
|
+
b(this, "redirectToAfterSignUp");
|
|
960
|
+
b(this, "redirectToAfterSignIn");
|
|
961
|
+
b(this, "redirectToAfterSignOut");
|
|
962
|
+
b(this, "audience");
|
|
963
|
+
b(this, "signOut", async () => {
|
|
964
|
+
N.setState({
|
|
958
965
|
isAuthenticated: !1,
|
|
959
966
|
isPending: !1,
|
|
960
967
|
profile: void 0
|
|
961
968
|
}), sessionStorage.clear();
|
|
962
|
-
const e = await this.getAuthServer(),
|
|
969
|
+
const e = await this.getAuthServer(), n = new URL(
|
|
963
970
|
window.location.origin + this.redirectToAfterSignOut
|
|
964
971
|
);
|
|
965
|
-
|
|
972
|
+
n.pathname = this.logoutRedirectUrlPath;
|
|
966
973
|
let o;
|
|
967
974
|
e.end_session_endpoint ? (o = new URL(e.end_session_endpoint), o.searchParams.set(
|
|
968
975
|
"post_logout_redirect_uri",
|
|
969
|
-
|
|
970
|
-
)) : o =
|
|
976
|
+
n.toString()
|
|
977
|
+
)) : o = n;
|
|
971
978
|
});
|
|
972
|
-
|
|
973
|
-
const e = new URL(window.location.href),
|
|
979
|
+
b(this, "handleCallback", async () => {
|
|
980
|
+
const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(V);
|
|
974
981
|
if (sessionStorage.removeItem(V), !o)
|
|
975
|
-
throw new
|
|
976
|
-
const
|
|
977
|
-
|
|
982
|
+
throw new P("No code verifier found in state.");
|
|
983
|
+
const a = await this.getAuthServer(), r = Jt(
|
|
984
|
+
a,
|
|
978
985
|
this.client,
|
|
979
986
|
e.searchParams,
|
|
980
|
-
|
|
987
|
+
n ?? void 0
|
|
981
988
|
);
|
|
982
|
-
if (Z(
|
|
983
|
-
throw
|
|
989
|
+
if (Z(r))
|
|
990
|
+
throw M.error("Error validating OAuth response", r), new de(
|
|
984
991
|
"Error validating OAuth response",
|
|
985
|
-
|
|
992
|
+
r
|
|
986
993
|
);
|
|
987
994
|
const i = new URL(e);
|
|
988
995
|
i.pathname = this.redirectToAfterSignIn, i.search = "";
|
|
989
|
-
const
|
|
990
|
-
|
|
996
|
+
const c = await Tt(
|
|
997
|
+
a,
|
|
991
998
|
this.client,
|
|
992
|
-
|
|
999
|
+
r,
|
|
993
1000
|
i.toString(),
|
|
994
1001
|
o
|
|
995
|
-
),
|
|
996
|
-
|
|
1002
|
+
), p = await Rt(
|
|
1003
|
+
a,
|
|
997
1004
|
this.client,
|
|
998
|
-
|
|
1005
|
+
c
|
|
999
1006
|
);
|
|
1000
|
-
this.setTokensFromResponse(
|
|
1001
|
-
const
|
|
1002
|
-
|
|
1007
|
+
this.setTokensFromResponse(p);
|
|
1008
|
+
const _ = await this.getAccessToken(), y = await (await wt(
|
|
1009
|
+
a,
|
|
1003
1010
|
this.client,
|
|
1004
|
-
|
|
1005
|
-
)).json(),
|
|
1006
|
-
sub:
|
|
1007
|
-
email:
|
|
1008
|
-
name:
|
|
1009
|
-
emailVerified:
|
|
1010
|
-
pictureUrl:
|
|
1011
|
+
_
|
|
1012
|
+
)).json(), T = {
|
|
1013
|
+
sub: y.sub,
|
|
1014
|
+
email: y.email,
|
|
1015
|
+
name: y.name,
|
|
1016
|
+
emailVerified: y.email_verified ?? !1,
|
|
1017
|
+
pictureUrl: y.picture
|
|
1011
1018
|
};
|
|
1012
|
-
|
|
1019
|
+
N.setState({
|
|
1013
1020
|
isAuthenticated: !0,
|
|
1014
1021
|
isPending: !1,
|
|
1015
|
-
profile:
|
|
1022
|
+
profile: T
|
|
1016
1023
|
}), sessionStorage.setItem(
|
|
1017
1024
|
"profile-state",
|
|
1018
|
-
JSON.stringify(
|
|
1025
|
+
JSON.stringify(N.getState().profile)
|
|
1019
1026
|
);
|
|
1020
|
-
const
|
|
1021
|
-
return sessionStorage.removeItem("redirect-to"),
|
|
1027
|
+
const h = sessionStorage.getItem("redirect-to") ?? "/";
|
|
1028
|
+
return sessionStorage.removeItem("redirect-to"), h;
|
|
1022
1029
|
});
|
|
1023
1030
|
this.client = {
|
|
1024
1031
|
client_id: o,
|
|
1025
1032
|
token_endpoint_auth_method: "none"
|
|
1026
|
-
}, this.audience =
|
|
1033
|
+
}, this.audience = n, this.issuer = e, this.redirectToAfterSignUp = a ?? "/", this.redirectToAfterSignIn = r ?? "/", this.redirectToAfterSignOut = i ?? "/";
|
|
1027
1034
|
}
|
|
1028
1035
|
async getAuthServer() {
|
|
1029
1036
|
if (!this.authorizationServer) {
|
|
1030
|
-
const e = new URL(this.issuer),
|
|
1037
|
+
const e = new URL(this.issuer), n = await Qe(e);
|
|
1031
1038
|
this.authorizationServer = await Xe(
|
|
1032
1039
|
e,
|
|
1033
|
-
|
|
1040
|
+
n
|
|
1034
1041
|
);
|
|
1035
1042
|
}
|
|
1036
1043
|
return this.authorizationServer;
|
|
@@ -1041,16 +1048,16 @@ class zt {
|
|
|
1041
1048
|
*/
|
|
1042
1049
|
setTokensFromResponse(e) {
|
|
1043
1050
|
if (Z(e))
|
|
1044
|
-
throw
|
|
1051
|
+
throw M.error("Bad Token Response", e), new de("Bad Token Response", e);
|
|
1045
1052
|
if (!e.expires_in)
|
|
1046
|
-
throw new
|
|
1047
|
-
const
|
|
1053
|
+
throw new P("No expires_in in response");
|
|
1054
|
+
const n = {
|
|
1048
1055
|
accessToken: e.access_token,
|
|
1049
1056
|
refreshToken: e.refresh_token,
|
|
1050
1057
|
expiresOn: new Date(Date.now() + e.expires_in * 1e3),
|
|
1051
1058
|
tokenType: e.token_type
|
|
1052
1059
|
};
|
|
1053
|
-
sessionStorage.setItem("token-state", JSON.stringify(
|
|
1060
|
+
sessionStorage.setItem("token-state", JSON.stringify(n));
|
|
1054
1061
|
}
|
|
1055
1062
|
async signUp({ redirectTo: e } = {}) {
|
|
1056
1063
|
return this.authorize({
|
|
@@ -1065,51 +1072,51 @@ class zt {
|
|
|
1065
1072
|
}
|
|
1066
1073
|
async authorize({
|
|
1067
1074
|
redirectTo: e,
|
|
1068
|
-
isSignUp:
|
|
1075
|
+
isSignUp: n = !1
|
|
1069
1076
|
}) {
|
|
1070
|
-
var
|
|
1071
|
-
const o = "S256",
|
|
1072
|
-
if (!
|
|
1073
|
-
throw new
|
|
1074
|
-
const
|
|
1075
|
-
sessionStorage.setItem(V,
|
|
1076
|
-
const
|
|
1077
|
-
|
|
1077
|
+
var _, f;
|
|
1078
|
+
const o = "S256", a = await this.getAuthServer();
|
|
1079
|
+
if (!a.authorization_endpoint)
|
|
1080
|
+
throw new P("No authorization endpoint");
|
|
1081
|
+
const r = et(), i = await nt(r);
|
|
1082
|
+
sessionStorage.setItem(V, r);
|
|
1083
|
+
const c = new URL(
|
|
1084
|
+
a.authorization_endpoint
|
|
1078
1085
|
);
|
|
1079
1086
|
sessionStorage.setItem("redirect-to", e);
|
|
1080
|
-
const
|
|
1081
|
-
if (
|
|
1087
|
+
const p = new URL(window.location.origin);
|
|
1088
|
+
if (p.pathname = this.callbackUrlPath, p.search = "", c.searchParams.set("client_id", this.client.client_id), c.searchParams.set("redirect_uri", p.toString()), c.searchParams.set("response_type", "code"), c.searchParams.set("scope", "openid profile email"), c.searchParams.set("code_challenge", i), c.searchParams.set(
|
|
1082
1089
|
"code_challenge_method",
|
|
1083
1090
|
o
|
|
1084
|
-
), this.audience &&
|
|
1085
|
-
isSignIn: !
|
|
1086
|
-
isSignUp:
|
|
1087
|
-
}), ((
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1091
|
+
), this.audience && c.searchParams.set("audience", this.audience), (_ = this.onAuthorizationUrl) == null || _.call(this, c, {
|
|
1092
|
+
isSignIn: !n,
|
|
1093
|
+
isSignUp: n
|
|
1094
|
+
}), ((f = a.code_challenge_methods_supported) == null ? void 0 : f.includes("S256")) !== !0) {
|
|
1095
|
+
const y = tt();
|
|
1096
|
+
c.searchParams.set("state", y);
|
|
1090
1097
|
}
|
|
1091
|
-
location.href =
|
|
1098
|
+
location.href = c.href;
|
|
1092
1099
|
}
|
|
1093
1100
|
async getAccessToken() {
|
|
1094
|
-
const e = await this.getAuthServer(),
|
|
1095
|
-
if (!
|
|
1096
|
-
throw new
|
|
1097
|
-
const o = JSON.parse(
|
|
1101
|
+
const e = await this.getAuthServer(), n = sessionStorage.getItem("token-state");
|
|
1102
|
+
if (!n)
|
|
1103
|
+
throw new P("User is not authenticated");
|
|
1104
|
+
const o = JSON.parse(n);
|
|
1098
1105
|
if (o.expiresOn < /* @__PURE__ */ new Date()) {
|
|
1099
1106
|
if (!o.refreshToken)
|
|
1100
1107
|
return await this.signIn(), "";
|
|
1101
|
-
const
|
|
1108
|
+
const a = await mt(
|
|
1102
1109
|
e,
|
|
1103
1110
|
this.client,
|
|
1104
1111
|
o.refreshToken
|
|
1105
|
-
),
|
|
1112
|
+
), r = await bt(
|
|
1106
1113
|
e,
|
|
1107
1114
|
this.client,
|
|
1108
|
-
|
|
1115
|
+
a
|
|
1109
1116
|
);
|
|
1110
|
-
if (!
|
|
1111
|
-
throw new
|
|
1112
|
-
return this.setTokensFromResponse(
|
|
1117
|
+
if (!r.access_token)
|
|
1118
|
+
throw new P("No access token in response");
|
|
1119
|
+
return this.setTokensFromResponse(r), r.access_token.toString();
|
|
1113
1120
|
} else
|
|
1114
1121
|
return o.accessToken;
|
|
1115
1122
|
}
|
|
@@ -1117,23 +1124,23 @@ class zt {
|
|
|
1117
1124
|
const e = sessionStorage.getItem("profile-state");
|
|
1118
1125
|
if (e)
|
|
1119
1126
|
try {
|
|
1120
|
-
const
|
|
1121
|
-
|
|
1127
|
+
const n = JSON.parse(e);
|
|
1128
|
+
N.setState({
|
|
1122
1129
|
isAuthenticated: !0,
|
|
1123
1130
|
isPending: !1,
|
|
1124
|
-
profile:
|
|
1131
|
+
profile: n
|
|
1125
1132
|
});
|
|
1126
|
-
} catch (
|
|
1127
|
-
|
|
1133
|
+
} catch (n) {
|
|
1134
|
+
M.error("Error parsing auth state", n);
|
|
1128
1135
|
}
|
|
1129
1136
|
}
|
|
1130
1137
|
getAuthenticationPlugin() {
|
|
1131
1138
|
return new Nt(this.callbackUrlPath, this.handleCallback);
|
|
1132
1139
|
}
|
|
1133
1140
|
}
|
|
1134
|
-
const
|
|
1141
|
+
const qt = (t) => new zt(t);
|
|
1135
1142
|
export {
|
|
1136
1143
|
zt as OpenIDAuthenticationProvider,
|
|
1137
|
-
|
|
1144
|
+
qt as default
|
|
1138
1145
|
};
|
|
1139
1146
|
//# sourceMappingURL=zudoku.auth-openid.js.map
|