zudoku 0.0.0-fd0986c → 0.0.0-fdf886de
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/demo.js +1 -1
- package/dist/app/entry.client.js +1 -1
- package/dist/app/entry.server.js +1 -1
- package/dist/app/main.d.ts +1 -1
- package/dist/app/main.js +12 -6
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +1 -1
- package/dist/config/config.d.ts +1 -0
- package/dist/config/validators/InputNavigationSchema.d.ts +251 -156
- package/dist/config/validators/InputNavigationSchema.js +5 -4
- package/dist/config/validators/InputNavigationSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js +0 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -1
- package/dist/config/validators/NavigationSchema.js +6 -3
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +13 -0
- package/dist/config/validators/ProtectedRoutesSchema.js +10 -0
- package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/icon-types.js +16 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +44 -30
- package/dist/config/validators/validate.js +8 -2
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +11 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js +11 -9
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/OAuthErrorPage.d.ts +3 -0
- package/dist/lib/authentication/components/OAuthErrorPage.js +99 -0
- package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -0
- package/dist/lib/authentication/errors.d.ts +6 -12
- package/dist/lib/authentication/errors.js +2 -1
- package/dist/lib/authentication/errors.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +1 -0
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.js +4 -2
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +4 -2
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.js +3 -1
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/BuildCheck.d.ts +2 -1
- package/dist/lib/components/BuildCheck.js +9 -3
- package/dist/lib/components/BuildCheck.js.map +1 -1
- package/dist/lib/components/Header.js +1 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Layout.js +4 -7
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Markdown.js +2 -2
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/Meta.d.ts +2 -0
- package/dist/lib/components/Meta.js +11 -0
- package/dist/lib/components/Meta.js.map +1 -0
- package/dist/lib/components/MobileTopNavigation.js +5 -3
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +1 -1
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/TopNavigation.js +4 -3
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +1 -1
- package/dist/lib/components/Typography.js +1 -1
- package/dist/lib/components/Typography.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.js +22 -14
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +0 -27
- package/dist/lib/components/index.js +0 -15
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/NavigationCategory.js +1 -1
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.d.ts +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +11 -3
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/components/navigation/utils.d.ts +3 -1
- package/dist/lib/components/navigation/utils.js +18 -14
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/RouteGuard.js +9 -9
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +5 -1
- package/dist/lib/core/ZudokuContext.js +23 -1
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/__internal.d.ts +37 -0
- package/dist/lib/core/__internal.js +26 -0
- package/dist/lib/core/__internal.js.map +1 -0
- package/dist/lib/core/plugins.d.ts +2 -1
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/core/router.d.ts +1 -0
- package/dist/lib/core/router.js +2 -0
- package/dist/lib/core/router.js.map +1 -0
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +13 -3
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +3 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +9 -4
- package/dist/lib/plugins/api-keys/index.js +3 -7
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.js +3 -0
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +42 -10
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +4 -2
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/shiki.d.ts +4 -0
- package/dist/lib/shiki.js +2 -0
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/ActionButton.js +1 -1
- package/dist/lib/ui/ActionButton.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/CodeBlock.js +30 -4
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +1 -1
- package/dist/lib/ui/Dialog.js +2 -2
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/util/invariant.d.ts +6 -5
- package/dist/lib/util/invariant.js +1 -1
- package/dist/lib/util/invariant.js.map +1 -1
- package/dist/vite/config.js +6 -1
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.js +9 -1
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/mdx/remark-inject-filepath.d.ts +3 -0
- package/dist/vite/mdx/remark-inject-filepath.js +6 -0
- package/dist/vite/mdx/remark-inject-filepath.js.map +1 -0
- package/dist/vite/mdx/remark-link-rewrite.d.ts +2 -0
- package/dist/vite/mdx/remark-link-rewrite.js +20 -0
- package/dist/vite/mdx/remark-link-rewrite.js.map +1 -0
- package/dist/vite/mdx/remark-normalize-image-url.d.ts +2 -0
- package/dist/vite/mdx/remark-normalize-image-url.js +12 -0
- package/dist/vite/mdx/remark-normalize-image-url.js.map +1 -0
- package/dist/vite/{remarkStaticGeneration.d.ts → mdx/remark-static-generation.d.ts} +2 -2
- package/dist/vite/{remarkStaticGeneration.js → mdx/remark-static-generation.js} +1 -1
- package/dist/vite/mdx/remark-static-generation.js.map +1 -0
- package/dist/vite/plugin-config.d.ts +1 -1
- package/dist/vite/plugin-config.js +2 -1
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-docs.js +18 -13
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-mdx.js +6 -23
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-theme.js +80 -40
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/prerender/worker.js +5 -1
- package/dist/vite/prerender/worker.js.map +1 -1
- package/dist/vite/shadcn-registry.d.ts +4 -4
- package/dist/vite/sitemap.js +10 -9
- package/dist/vite/sitemap.js.map +1 -1
- package/lib/Button-B3o-2Xdf.js.map +1 -1
- package/lib/Card-CMDQUPM4.js.map +1 -1
- package/lib/CategoryHeading-DCpZu3yG.js +17 -0
- package/lib/CategoryHeading-DCpZu3yG.js.map +1 -0
- package/lib/ClientOnly-E7hGysn1.js.map +1 -1
- package/lib/CodeBlock-yJjjRwj-.js +98 -0
- package/lib/CodeBlock-yJjjRwj-.js.map +1 -0
- package/lib/{Command-C9AC5cf-.js → Command-CDn17s8X.js} +2 -2
- package/lib/{Command-C9AC5cf-.js.map → Command-CDn17s8X.js.map} +1 -1
- package/lib/Dialog-BrIjMmUK.js +114 -0
- package/lib/Dialog-BrIjMmUK.js.map +1 -0
- package/lib/{Drawer-DXGPOKPx.js → Drawer-DJ05s2pH.js} +86 -86
- package/lib/{Drawer-DXGPOKPx.js.map → Drawer-DJ05s2pH.js.map} +1 -1
- package/lib/{MdxPage-BI0vLjSn.js → MdxPage-BmOQ5m5g.js} +19 -18
- package/lib/{MdxPage-BI0vLjSn.js.map → MdxPage-BmOQ5m5g.js.map} +1 -1
- package/lib/OAuthErrorPage-Jv3r8wnL.js +150 -0
- package/lib/OAuthErrorPage-Jv3r8wnL.js.map +1 -0
- package/lib/{OasProvider-CK4C2QI3.js → OasProvider-CA_lpILt.js} +3 -3
- package/lib/{OasProvider-CK4C2QI3.js.map → OasProvider-CA_lpILt.js.map} +1 -1
- package/lib/{OperationList-DhA6x6qm.js → OperationList-C-TObVw6.js} +47 -44
- package/lib/OperationList-C-TObVw6.js.map +1 -0
- package/lib/{Pagination-YjKVdgm9.js → Pagination-CBiRGddW.js} +3 -3
- package/lib/{Pagination-YjKVdgm9.js.map → Pagination-CBiRGddW.js.map} +1 -1
- package/lib/RouteGuard-JLH6tCY8.js +56 -0
- package/lib/RouteGuard-JLH6tCY8.js.map +1 -0
- package/lib/RouterError-DcVonMP1.js +41 -0
- package/lib/RouterError-DcVonMP1.js.map +1 -0
- package/lib/{SchemaList-Cx9MS7Wf.js → SchemaList-BeYWvBC7.js} +15 -14
- package/lib/{SchemaList-Cx9MS7Wf.js.map → SchemaList-BeYWvBC7.js.map} +1 -1
- package/lib/{SchemaView-C6sTKWyS.js → SchemaView-CRcShewo.js} +4 -4
- package/lib/{SchemaView-C6sTKWyS.js.map → SchemaView-CRcShewo.js.map} +1 -1
- package/lib/Select-C3efYI1n.js +273 -0
- package/lib/Select-C3efYI1n.js.map +1 -0
- package/lib/{SignUp-DiDmVb3x.js → SignUp-CxBGHgba.js} +6 -6
- package/lib/{SignUp-DiDmVb3x.js.map → SignUp-CxBGHgba.js.map} +1 -1
- package/lib/{Slot-CrCBhP3G.js → Slot-DOtTvoyj.js} +2050 -2288
- package/lib/{Slot-CrCBhP3G.js.map → Slot-DOtTvoyj.js.map} +1 -1
- package/lib/Spinner-mNLZ6awP.js.map +1 -1
- package/lib/{SyntaxHighlight-CVe58ZSY.js → SyntaxHighlight-GR0eix_L.js} +411 -409
- package/lib/SyntaxHighlight-GR0eix_L.js.map +1 -0
- package/lib/{Toc-CpsFSXeD.js → Toc-BlcGIkXc.js} +2 -2
- package/lib/{Toc-CpsFSXeD.js.map → Toc-BlcGIkXc.js.map} +1 -1
- package/lib/ZudokuContext-BuJD7yIX.js +1286 -0
- package/lib/ZudokuContext-BuJD7yIX.js.map +1 -0
- package/lib/chunk-QMGIS6GS-DqecZ6nq.js +9204 -0
- package/lib/chunk-QMGIS6GS-DqecZ6nq.js.map +1 -0
- package/lib/{circular-OvXQH6UK.js → circular-CGTcsqA3.js} +2 -2
- package/lib/{circular-OvXQH6UK.js.map → circular-CGTcsqA3.js.map} +1 -1
- package/lib/cn-dYga0KKN.js.map +1 -1
- package/lib/{createServer-B5U_8E3S.js → createServer-DjgpuLne.js} +5 -5
- package/lib/{createServer-B5U_8E3S.js.map → createServer-DjgpuLne.js.map} +1 -1
- package/lib/errors-CrI3s7mR.js +45 -0
- package/lib/errors-CrI3s7mR.js.map +1 -0
- package/lib/hook-bv3iuX7X.js +247 -0
- package/lib/hook-bv3iuX7X.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/{index-BzcS9JBW.js → index-CvTWnHZF.js} +860 -938
- package/lib/index-CvTWnHZF.js.map +1 -0
- package/lib/index-DI5SPFK9.js.map +1 -1
- package/lib/index-DmNq2fbN.js.map +1 -1
- package/lib/index-DzO-Qh6S.js +1061 -0
- package/lib/index-DzO-Qh6S.js.map +1 -0
- package/lib/{index-4XtG1tlD.js → index-HarEI51d.js} +2 -2
- package/lib/{index-4XtG1tlD.js.map → index-HarEI51d.js.map} +1 -1
- package/lib/index.esm-BnYHxCYC.js +683 -0
- package/lib/index.esm-BnYHxCYC.js.map +1 -0
- package/lib/index.esm-CdzlRw50.js +1254 -0
- package/lib/index.esm-CdzlRw50.js.map +1 -0
- package/lib/{invariant-DAFpPywt.js → invariant-Bm-FVUQE.js} +2 -6
- package/lib/invariant-Bm-FVUQE.js.map +1 -0
- package/lib/jsx-runtime-C5mzlN2N.js.map +1 -1
- package/lib/mutation-Dy_5up8v.js +196 -0
- package/lib/mutation-Dy_5up8v.js.map +1 -0
- package/lib/processors/removeExtensions.js.map +1 -1
- package/lib/processors/removeParameters.js.map +1 -1
- package/lib/processors/removePaths.js.map +1 -1
- package/lib/processors/traverse.js.map +1 -1
- package/lib/ui/Accordion.js.map +1 -1
- package/lib/ui/ActionButton.js +9 -9
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js.map +1 -1
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +1 -1
- package/lib/ui/Command.js +1 -1
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +56 -41
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +1 -1
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Form.js +1 -1
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/HoverCard.js.map +1 -1
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js.map +1 -1
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js.map +1 -1
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js.map +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js.map +1 -1
- package/lib/ui/Slider.js.map +1 -1
- package/lib/ui/Stepper.js.map +1 -1
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +4 -4
- package/lib/ui/Tabs.js.map +1 -1
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/useExposedProps-BH9aq4MD.js +113 -0
- package/lib/useExposedProps-BH9aq4MD.js.map +1 -0
- package/lib/useLatest-hmRS46UF.js +11 -0
- package/lib/useLatest-hmRS46UF.js.map +1 -0
- package/lib/zudoku.__internal.js +2965 -0
- package/lib/zudoku.__internal.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +46 -9880
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +25 -22
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +204 -195
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +97 -0
- package/lib/zudoku.auth-supabase.js.map +1 -0
- package/lib/zudoku.components.js +21 -28
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +7 -7
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +23 -22
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +410 -295
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +8 -5
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +7 -6
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +3 -3
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +28 -27
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/lib/zudoku.router.js +123 -0
- package/lib/zudoku.router.js.map +1 -0
- package/package.json +31 -23
- package/src/app/demo.tsx +1 -1
- package/src/app/entry.client.tsx +1 -1
- package/src/app/entry.server.tsx +1 -1
- package/src/app/main.css +22 -5
- package/src/app/main.tsx +23 -11
- package/src/app/standalone.tsx +1 -1
- package/src/lib/authentication/components/CallbackHandler.tsx +22 -15
- package/src/lib/authentication/components/OAuthErrorPage.tsx +171 -0
- package/src/lib/authentication/errors.ts +27 -13
- package/src/lib/authentication/hook.ts +2 -0
- package/src/lib/authentication/providers/azureb2c.tsx +8 -3
- package/src/lib/authentication/providers/clerk.tsx +4 -1
- package/src/lib/authentication/providers/openid.tsx +7 -1
- package/src/lib/components/BuildCheck.tsx +13 -3
- package/src/lib/components/Header.tsx +4 -3
- package/src/lib/components/Heading.tsx +1 -1
- package/src/lib/components/Layout.tsx +2 -21
- package/src/lib/components/Markdown.tsx +3 -3
- package/src/lib/components/Meta.tsx +32 -0
- package/src/lib/components/MobileTopNavigation.tsx +6 -3
- package/src/lib/components/NotFoundPage.tsx +3 -2
- package/src/lib/components/TopNavigation.tsx +4 -4
- package/src/lib/components/Typography.tsx +1 -1
- package/src/lib/components/context/ZudokuContext.ts +26 -19
- package/src/lib/components/index.ts +0 -18
- package/src/lib/components/navigation/NavigationCategory.tsx +1 -1
- package/src/lib/components/navigation/NavigationItem.tsx +13 -3
- package/src/lib/components/navigation/utils.ts +21 -15
- package/src/lib/core/RouteGuard.tsx +13 -13
- package/src/lib/core/ZudokuContext.ts +37 -5
- package/src/lib/core/__internal.tsx +30 -0
- package/src/lib/core/plugins.ts +2 -1
- package/src/lib/core/router.ts +1 -0
- package/src/lib/errors/ErrorAlert.tsx +5 -7
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +17 -3
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +21 -3
- package/src/lib/plugins/api-keys/index.tsx +16 -11
- package/src/lib/plugins/custom-pages/index.tsx +3 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -1
- package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +2 -0
- package/src/lib/plugins/openapi/index.tsx +66 -16
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +8 -2
- package/src/lib/shiki.ts +2 -0
- package/src/lib/ui/ActionButton.tsx +3 -1
- package/src/lib/ui/CodeBlock.tsx +38 -13
- package/src/lib/ui/Dialog.tsx +12 -3
- package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
- package/src/lib/util/invariant.ts +7 -5
- package/src/shiki/langs/vue-vine.js +1 -0
- package/dist/vite/remarkStaticGeneration.js.map +0 -1
- package/lib/Alert-Cig_8hW6.js +0 -161
- package/lib/Alert-Cig_8hW6.js.map +0 -1
- package/lib/CodeBlock-BaBgX9Wy.js +0 -85
- package/lib/CodeBlock-BaBgX9Wy.js.map +0 -1
- package/lib/Dialog-DMWw1doX.js +0 -99
- package/lib/Dialog-DMWw1doX.js.map +0 -1
- package/lib/OperationList-DhA6x6qm.js.map +0 -1
- package/lib/RouteGuard-Vnlz_t51.js +0 -737
- package/lib/RouteGuard-Vnlz_t51.js.map +0 -1
- package/lib/SyntaxHighlight-CVe58ZSY.js.map +0 -1
- package/lib/chunk-DQRVZFIR-DHK7_Ilc.js +0 -1839
- package/lib/chunk-DQRVZFIR-DHK7_Ilc.js.map +0 -1
- package/lib/clerk-BDZ31hjU.js +0 -25190
- package/lib/clerk-BDZ31hjU.js.map +0 -1
- package/lib/errors-DOCWNkkS.js +0 -78
- package/lib/errors-DOCWNkkS.js.map +0 -1
- package/lib/hook-CZjW2buS.js +0 -1510
- package/lib/hook-CZjW2buS.js.map +0 -1
- package/lib/index-Bm35Tkgf.js +0 -107
- package/lib/index-Bm35Tkgf.js.map +0 -1
- package/lib/index-BzcS9JBW.js.map +0 -1
- package/lib/index-Sb7nQNHJ.js +0 -3980
- package/lib/index-Sb7nQNHJ.js.map +0 -1
- package/lib/index.esm-Cp4wkyud.js +0 -1236
- package/lib/index.esm-Cp4wkyud.js.map +0 -1
- package/lib/invariant-DAFpPywt.js.map +0 -1
- package/lib/useExposedProps-BIYjecPD.js +0 -9
- package/lib/useExposedProps-BIYjecPD.js.map +0 -1
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { g as Le } from "./invariant-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { j as D } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { g as Le } from "./invariant-Bm-FVUQE.js";
|
|
3
|
+
import { E as Ue } from "./index-DzO-Qh6S.js";
|
|
4
|
+
import { C as xe } from "./ClientOnly-E7hGysn1.js";
|
|
5
|
+
import { j as Ce } from "./ZudokuContext-BuJD7yIX.js";
|
|
6
|
+
import { C as Ie, O as re, A as R } from "./errors-CrI3s7mR.js";
|
|
7
|
+
import { C as je, O as Oe } from "./OAuthErrorPage-Jv3r8wnL.js";
|
|
8
|
+
import { u as S } from "./hook-bv3iuX7X.js";
|
|
9
|
+
var J = { exports: {} }, De = J.exports, oe;
|
|
10
|
+
function Je() {
|
|
8
11
|
return oe || (oe = 1, function(t) {
|
|
9
12
|
(function(e, n) {
|
|
10
13
|
t.exports ? t.exports = n() : e.log = n();
|
|
11
|
-
})(
|
|
14
|
+
})(De, function() {
|
|
12
15
|
var e = function() {
|
|
13
16
|
}, n = "undefined", o = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), s = [
|
|
14
17
|
"trace",
|
|
@@ -51,11 +54,11 @@ function De() {
|
|
|
51
54
|
function b(l, m, c) {
|
|
52
55
|
return y(l) || k.apply(this, arguments);
|
|
53
56
|
}
|
|
54
|
-
function
|
|
55
|
-
var c = this, j,
|
|
57
|
+
function h(l, m) {
|
|
58
|
+
var c = this, j, H, L, _ = "loglevel";
|
|
56
59
|
typeof l == "string" ? _ += ":" + l : typeof l == "symbol" && (_ = void 0);
|
|
57
|
-
function Ee(
|
|
58
|
-
var g = (s[
|
|
60
|
+
function Ee(f) {
|
|
61
|
+
var g = (s[f] || "silent").toUpperCase();
|
|
59
62
|
if (!(typeof window === n || !_)) {
|
|
60
63
|
try {
|
|
61
64
|
window.localStorage[_] = g;
|
|
@@ -68,22 +71,22 @@ function De() {
|
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
73
|
}
|
|
71
|
-
function
|
|
72
|
-
var
|
|
74
|
+
function ee() {
|
|
75
|
+
var f;
|
|
73
76
|
if (!(typeof window === n || !_)) {
|
|
74
77
|
try {
|
|
75
|
-
|
|
78
|
+
f = window.localStorage[_];
|
|
76
79
|
} catch {
|
|
77
80
|
}
|
|
78
|
-
if (typeof
|
|
81
|
+
if (typeof f === n)
|
|
79
82
|
try {
|
|
80
|
-
var g = window.document.cookie,
|
|
81
|
-
|
|
82
|
-
g.slice(
|
|
83
|
+
var g = window.document.cookie, O = encodeURIComponent(_), ne = g.indexOf(O + "=");
|
|
84
|
+
ne !== -1 && (f = /^([^;]+)/.exec(
|
|
85
|
+
g.slice(ne + O.length + 1)
|
|
83
86
|
)[1]);
|
|
84
87
|
} catch {
|
|
85
88
|
}
|
|
86
|
-
return c.levels[
|
|
89
|
+
return c.levels[f] === void 0 && (f = void 0), f;
|
|
87
90
|
}
|
|
88
91
|
}
|
|
89
92
|
function Re() {
|
|
@@ -98,11 +101,11 @@ function De() {
|
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
103
|
}
|
|
101
|
-
function U(
|
|
102
|
-
var g =
|
|
104
|
+
function U(f) {
|
|
105
|
+
var g = f;
|
|
103
106
|
if (typeof g == "string" && c.levels[g.toUpperCase()] !== void 0 && (g = c.levels[g.toUpperCase()]), typeof g == "number" && g >= 0 && g <= c.levels.SILENT)
|
|
104
107
|
return g;
|
|
105
|
-
throw new TypeError("log.setLevel() called with invalid level: " +
|
|
108
|
+
throw new TypeError("log.setLevel() called with invalid level: " + f);
|
|
106
109
|
}
|
|
107
110
|
c.name = l, c.levels = {
|
|
108
111
|
TRACE: 0,
|
|
@@ -112,32 +115,32 @@ function De() {
|
|
|
112
115
|
ERROR: 4,
|
|
113
116
|
SILENT: 5
|
|
114
117
|
}, c.methodFactory = m || b, c.getLevel = function() {
|
|
115
|
-
return L ??
|
|
116
|
-
}, c.setLevel = function(
|
|
117
|
-
return L = U(
|
|
118
|
-
}, c.setDefaultLevel = function(
|
|
119
|
-
|
|
118
|
+
return L ?? H ?? j;
|
|
119
|
+
}, c.setLevel = function(f, g) {
|
|
120
|
+
return L = U(f), g !== !1 && Ee(L), p.call(c);
|
|
121
|
+
}, c.setDefaultLevel = function(f) {
|
|
122
|
+
H = U(f), ee() || c.setLevel(f, !1);
|
|
120
123
|
}, c.resetLevel = function() {
|
|
121
124
|
L = null, Re(), p.call(c);
|
|
122
|
-
}, c.enableAll = function(
|
|
123
|
-
c.setLevel(c.levels.TRACE,
|
|
124
|
-
}, c.disableAll = function(
|
|
125
|
-
c.setLevel(c.levels.SILENT,
|
|
125
|
+
}, c.enableAll = function(f) {
|
|
126
|
+
c.setLevel(c.levels.TRACE, f);
|
|
127
|
+
}, c.disableAll = function(f) {
|
|
128
|
+
c.setLevel(c.levels.SILENT, f);
|
|
126
129
|
}, c.rebuild = function() {
|
|
127
130
|
if (i !== c && (j = U(i.getLevel())), p.call(c), i === c)
|
|
128
|
-
for (var
|
|
129
|
-
r[
|
|
131
|
+
for (var f in r)
|
|
132
|
+
r[f].rebuild();
|
|
130
133
|
}, j = U(
|
|
131
134
|
i ? i.getLevel() : "WARN"
|
|
132
135
|
);
|
|
133
|
-
var
|
|
134
|
-
|
|
136
|
+
var te = ee();
|
|
137
|
+
te != null && (L = U(te)), p.call(c);
|
|
135
138
|
}
|
|
136
|
-
i = new
|
|
139
|
+
i = new h(), i.getLogger = function(m) {
|
|
137
140
|
if (typeof m != "symbol" && typeof m != "string" || m === "")
|
|
138
141
|
throw new TypeError("You must supply a name when creating a logger.");
|
|
139
142
|
var c = r[m];
|
|
140
|
-
return c || (c = r[m] = new
|
|
143
|
+
return c || (c = r[m] = new h(
|
|
141
144
|
m,
|
|
142
145
|
i.methodFactory
|
|
143
146
|
)), c;
|
|
@@ -149,13 +152,13 @@ function De() {
|
|
|
149
152
|
return r;
|
|
150
153
|
}, i.default = i, i;
|
|
151
154
|
});
|
|
152
|
-
}(
|
|
155
|
+
}(J)), J.exports;
|
|
153
156
|
}
|
|
154
|
-
var
|
|
155
|
-
const ie = /* @__PURE__ */ Le(
|
|
156
|
-
let
|
|
157
|
-
(typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (
|
|
158
|
-
function
|
|
157
|
+
var ze = Je();
|
|
158
|
+
const ie = /* @__PURE__ */ Le(ze);
|
|
159
|
+
let B;
|
|
160
|
+
(typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (B = "oauth4webapi/v2.17.0");
|
|
161
|
+
function V(t, e) {
|
|
159
162
|
if (t == null)
|
|
160
163
|
return !1;
|
|
161
164
|
try {
|
|
@@ -164,19 +167,19 @@ function q(t, e) {
|
|
|
164
167
|
return !1;
|
|
165
168
|
}
|
|
166
169
|
}
|
|
167
|
-
const
|
|
170
|
+
const N = Symbol(), Ne = Symbol(), G = Symbol(), We = Symbol(), Ke = Symbol(), He = Symbol(), $e = new TextEncoder(), Fe = new TextDecoder();
|
|
168
171
|
function E(t) {
|
|
169
|
-
return typeof t == "string" ?
|
|
172
|
+
return typeof t == "string" ? $e.encode(t) : Fe.decode(t);
|
|
170
173
|
}
|
|
171
174
|
const se = 32768;
|
|
172
|
-
function
|
|
175
|
+
function Me(t) {
|
|
173
176
|
t instanceof ArrayBuffer && (t = new Uint8Array(t));
|
|
174
177
|
const e = [];
|
|
175
178
|
for (let n = 0; n < t.byteLength; n += se)
|
|
176
179
|
e.push(String.fromCharCode.apply(null, t.subarray(n, n + se)));
|
|
177
180
|
return btoa(e.join("")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
178
181
|
}
|
|
179
|
-
function
|
|
182
|
+
function Be(t) {
|
|
180
183
|
try {
|
|
181
184
|
const e = atob(t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "")), n = new Uint8Array(e.length);
|
|
182
185
|
for (let o = 0; o < e.length; o++)
|
|
@@ -187,9 +190,9 @@ function Fe(t) {
|
|
|
187
190
|
}
|
|
188
191
|
}
|
|
189
192
|
function A(t) {
|
|
190
|
-
return typeof t == "string" ?
|
|
193
|
+
return typeof t == "string" ? Be(t) : Me(t);
|
|
191
194
|
}
|
|
192
|
-
class
|
|
195
|
+
class qe {
|
|
193
196
|
constructor(e) {
|
|
194
197
|
this.cache = /* @__PURE__ */ new Map(), this._cache = /* @__PURE__ */ new Map(), this.maxSize = e;
|
|
195
198
|
}
|
|
@@ -218,22 +221,22 @@ class v extends Error {
|
|
|
218
221
|
super(e ?? "operation not supported"), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
|
|
219
222
|
}
|
|
220
223
|
}
|
|
221
|
-
class
|
|
224
|
+
class Ve extends Error {
|
|
222
225
|
constructor(e, n) {
|
|
223
226
|
super(e, n), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
|
|
224
227
|
}
|
|
225
228
|
}
|
|
226
|
-
const a =
|
|
229
|
+
const a = Ve, we = new qe(100);
|
|
227
230
|
function me(t) {
|
|
228
231
|
return t instanceof CryptoKey;
|
|
229
232
|
}
|
|
230
|
-
function
|
|
233
|
+
function Ge(t) {
|
|
231
234
|
return me(t) && t.type === "private";
|
|
232
235
|
}
|
|
233
|
-
function
|
|
236
|
+
function Ye(t) {
|
|
234
237
|
return me(t) && t.type === "public";
|
|
235
238
|
}
|
|
236
|
-
function
|
|
239
|
+
function Y(t) {
|
|
237
240
|
try {
|
|
238
241
|
const e = t.headers.get("dpop-nonce");
|
|
239
242
|
e && we.set(new URL(t.url).origin, e);
|
|
@@ -244,21 +247,21 @@ function G(t) {
|
|
|
244
247
|
function x(t) {
|
|
245
248
|
return !(t === null || typeof t != "object" || Array.isArray(t));
|
|
246
249
|
}
|
|
247
|
-
function
|
|
248
|
-
|
|
250
|
+
function W(t) {
|
|
251
|
+
V(t, Headers) && (t = Object.fromEntries(t.entries()));
|
|
249
252
|
const e = new Headers(t);
|
|
250
|
-
if (
|
|
253
|
+
if (B && !e.has("user-agent") && e.set("user-agent", B), e.has("authorization"))
|
|
251
254
|
throw new TypeError('"options.headers" must not include the "authorization" header name');
|
|
252
255
|
if (e.has("dpop"))
|
|
253
256
|
throw new TypeError('"options.headers" must not include the "dpop" header name');
|
|
254
257
|
return e;
|
|
255
258
|
}
|
|
256
|
-
function
|
|
259
|
+
function Ze(t) {
|
|
257
260
|
if (typeof t == "function" && (t = t()), !(t instanceof AbortSignal))
|
|
258
261
|
throw new TypeError('"options.signal" must return or be an instance of AbortSignal');
|
|
259
262
|
return t;
|
|
260
263
|
}
|
|
261
|
-
async function
|
|
264
|
+
async function Qe(t, e) {
|
|
262
265
|
if (!(t instanceof URL))
|
|
263
266
|
throw new TypeError('"issuerIdentifier" must be an instance of URL');
|
|
264
267
|
if (t.protocol !== "https:" && t.protocol !== "http:")
|
|
@@ -275,25 +278,25 @@ async function Ye(t, e) {
|
|
|
275
278
|
default:
|
|
276
279
|
throw new TypeError('"options.algorithm" must be "oidc" (default), or "oauth2"');
|
|
277
280
|
}
|
|
278
|
-
const o =
|
|
279
|
-
return o.set("accept", "application/json"), (e?.[
|
|
281
|
+
const o = W(e?.headers);
|
|
282
|
+
return o.set("accept", "application/json"), (e?.[G] || fetch)(n.href, {
|
|
280
283
|
headers: Object.fromEntries(o.entries()),
|
|
281
284
|
method: "GET",
|
|
282
285
|
redirect: "manual",
|
|
283
286
|
signal: null
|
|
284
|
-
}).then(
|
|
287
|
+
}).then(Y);
|
|
285
288
|
}
|
|
286
289
|
function w(t) {
|
|
287
290
|
return typeof t == "string" && t.length !== 0;
|
|
288
291
|
}
|
|
289
|
-
async function
|
|
292
|
+
async function Xe(t, e) {
|
|
290
293
|
if (!(t instanceof URL))
|
|
291
294
|
throw new TypeError('"expectedIssuer" must be an instance of URL');
|
|
292
|
-
if (!
|
|
295
|
+
if (!V(e, Response))
|
|
293
296
|
throw new TypeError('"response" must be an instance of Response');
|
|
294
297
|
if (e.status !== 200)
|
|
295
298
|
throw new a('"response" is not a conform Authorization Server Metadata response');
|
|
296
|
-
|
|
299
|
+
X(e);
|
|
297
300
|
let n;
|
|
298
301
|
try {
|
|
299
302
|
n = await e.json();
|
|
@@ -308,16 +311,16 @@ async function Ze(t, e) {
|
|
|
308
311
|
throw new a('"response" body "issuer" does not match "expectedIssuer"');
|
|
309
312
|
return n;
|
|
310
313
|
}
|
|
311
|
-
function
|
|
314
|
+
function Z() {
|
|
312
315
|
return A(crypto.getRandomValues(new Uint8Array(32)));
|
|
313
316
|
}
|
|
314
|
-
function
|
|
315
|
-
return
|
|
317
|
+
function et() {
|
|
318
|
+
return Z();
|
|
316
319
|
}
|
|
317
|
-
function
|
|
318
|
-
return
|
|
320
|
+
function tt() {
|
|
321
|
+
return Z();
|
|
319
322
|
}
|
|
320
|
-
async function
|
|
323
|
+
async function nt(t) {
|
|
321
324
|
if (!w(t))
|
|
322
325
|
throw new TypeError('"codeVerifier" must be a non-empty string');
|
|
323
326
|
return A(await crypto.subtle.digest("SHA-256", E(t)));
|
|
@@ -325,11 +328,11 @@ async function et(t) {
|
|
|
325
328
|
function ae(t) {
|
|
326
329
|
return encodeURIComponent(t).replace(/%20/g, "+");
|
|
327
330
|
}
|
|
328
|
-
function
|
|
331
|
+
function rt(t, e) {
|
|
329
332
|
const n = ae(t), o = ae(e);
|
|
330
333
|
return `Basic ${btoa(`${n}:${o}`)}`;
|
|
331
334
|
}
|
|
332
|
-
function
|
|
335
|
+
function ot(t) {
|
|
333
336
|
switch (t.algorithm.hash.name) {
|
|
334
337
|
case "SHA-256":
|
|
335
338
|
return "PS256";
|
|
@@ -341,7 +344,7 @@ function nt(t) {
|
|
|
341
344
|
throw new v("unsupported RsaHashedKeyAlgorithm hash name");
|
|
342
345
|
}
|
|
343
346
|
}
|
|
344
|
-
function
|
|
347
|
+
function it(t) {
|
|
345
348
|
switch (t.algorithm.hash.name) {
|
|
346
349
|
case "SHA-256":
|
|
347
350
|
return "RS256";
|
|
@@ -353,7 +356,7 @@ function rt(t) {
|
|
|
353
356
|
throw new v("unsupported RsaHashedKeyAlgorithm hash name");
|
|
354
357
|
}
|
|
355
358
|
}
|
|
356
|
-
function
|
|
359
|
+
function st(t) {
|
|
357
360
|
switch (t.algorithm.namedCurve) {
|
|
358
361
|
case "P-256":
|
|
359
362
|
return "ES256";
|
|
@@ -365,14 +368,14 @@ function ot(t) {
|
|
|
365
368
|
throw new v("unsupported EcKeyAlgorithm namedCurve");
|
|
366
369
|
}
|
|
367
370
|
}
|
|
368
|
-
function
|
|
371
|
+
function at(t) {
|
|
369
372
|
switch (t.algorithm.name) {
|
|
370
373
|
case "RSA-PSS":
|
|
371
|
-
return
|
|
374
|
+
return ot(t);
|
|
372
375
|
case "RSASSA-PKCS1-v1_5":
|
|
373
|
-
return
|
|
376
|
+
return it(t);
|
|
374
377
|
case "ECDSA":
|
|
375
|
-
return
|
|
378
|
+
return st(t);
|
|
376
379
|
case "Ed25519":
|
|
377
380
|
case "Ed448":
|
|
378
381
|
return "EdDSA";
|
|
@@ -380,15 +383,15 @@ function it(t) {
|
|
|
380
383
|
throw new v("unsupported CryptoKey algorithm name");
|
|
381
384
|
}
|
|
382
385
|
}
|
|
383
|
-
function
|
|
384
|
-
const e = t?.[
|
|
386
|
+
function K(t) {
|
|
387
|
+
const e = t?.[N];
|
|
385
388
|
return typeof e == "number" && Number.isFinite(e) ? e : 0;
|
|
386
389
|
}
|
|
387
390
|
function ge(t) {
|
|
388
|
-
const e = t?.[
|
|
391
|
+
const e = t?.[Ne];
|
|
389
392
|
return typeof e == "number" && Number.isFinite(e) && Math.sign(e) !== -1 ? e : 30;
|
|
390
393
|
}
|
|
391
|
-
function
|
|
394
|
+
function Q() {
|
|
392
395
|
return Math.floor(Date.now() / 1e3);
|
|
393
396
|
}
|
|
394
397
|
function C(t) {
|
|
@@ -414,11 +417,11 @@ function ue(t, e) {
|
|
|
414
417
|
if (e !== void 0)
|
|
415
418
|
throw new TypeError(`"client.client_secret" property must not be provided when ${t} client authentication method is used.`);
|
|
416
419
|
}
|
|
417
|
-
async function
|
|
420
|
+
async function ct(t, e, n, o, s) {
|
|
418
421
|
switch (n.delete("client_secret"), n.delete("client_assertion_type"), n.delete("client_assertion"), e.token_endpoint_auth_method) {
|
|
419
422
|
case void 0:
|
|
420
423
|
case "client_secret_basic": {
|
|
421
|
-
o.set("authorization",
|
|
424
|
+
o.set("authorization", rt(e.client_id, ce(e.client_secret)));
|
|
422
425
|
break;
|
|
423
426
|
}
|
|
424
427
|
case "client_secret_post": {
|
|
@@ -437,43 +440,43 @@ async function st(t, e, n, o, s) {
|
|
|
437
440
|
throw new v("unsupported client token_endpoint_auth_method");
|
|
438
441
|
}
|
|
439
442
|
}
|
|
440
|
-
async function
|
|
443
|
+
async function ut(t, e, n) {
|
|
441
444
|
if (!n.usages.includes("sign"))
|
|
442
445
|
throw new TypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"');
|
|
443
446
|
const o = `${A(E(JSON.stringify(t)))}.${A(E(JSON.stringify(e)))}`, s = A(await crypto.subtle.sign(Ae(n), n, E(o)));
|
|
444
447
|
return `${o}.${s}`;
|
|
445
448
|
}
|
|
446
|
-
async function
|
|
449
|
+
async function lt(t, e, n, o, s, r) {
|
|
447
450
|
const { privateKey: i, publicKey: u, nonce: d = we.get(n.origin) } = e;
|
|
448
|
-
if (!
|
|
451
|
+
if (!Ge(i))
|
|
449
452
|
throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
|
|
450
|
-
if (!
|
|
453
|
+
if (!Ye(u))
|
|
451
454
|
throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');
|
|
452
455
|
if (d !== void 0 && !w(d))
|
|
453
456
|
throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');
|
|
454
457
|
if (!u.extractable)
|
|
455
458
|
throw new TypeError('"DPoP.publicKey.extractable" must be true');
|
|
456
|
-
const y =
|
|
457
|
-
alg:
|
|
459
|
+
const y = Q() + s, p = {
|
|
460
|
+
alg: at(i),
|
|
458
461
|
typ: "dpop+jwt",
|
|
459
|
-
jwk: await
|
|
462
|
+
jwk: await ft(u)
|
|
460
463
|
}, k = {
|
|
461
464
|
iat: y,
|
|
462
|
-
jti:
|
|
465
|
+
jti: Z(),
|
|
463
466
|
htm: o,
|
|
464
467
|
nonce: d,
|
|
465
468
|
htu: `${n.origin}${n.pathname}`,
|
|
466
469
|
ath: r ? A(await crypto.subtle.digest("SHA-256", E(r))) : void 0
|
|
467
470
|
};
|
|
468
|
-
e[
|
|
471
|
+
e[We]?.(p, k), t.set("dpop", await ut(p, k, i));
|
|
469
472
|
}
|
|
470
|
-
let
|
|
471
|
-
async function
|
|
473
|
+
let z;
|
|
474
|
+
async function dt(t) {
|
|
472
475
|
const { kty: e, e: n, n: o, x: s, y: r, crv: i } = await crypto.subtle.exportKey("jwk", t), u = { kty: e, e: n, n: o, x: s, y: r, crv: i };
|
|
473
|
-
return
|
|
476
|
+
return z.set(t, u), u;
|
|
474
477
|
}
|
|
475
|
-
async function
|
|
476
|
-
return
|
|
478
|
+
async function ft(t) {
|
|
479
|
+
return z || (z = /* @__PURE__ */ new WeakMap()), z.get(t) || dt(t);
|
|
477
480
|
}
|
|
478
481
|
function le(t, e, n) {
|
|
479
482
|
if (typeof t != "string")
|
|
@@ -484,47 +487,47 @@ function ye(t, e, n = !1) {
|
|
|
484
487
|
return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ? le(t.mtls_endpoint_aliases[e], e, n) : le(t[e], e, n);
|
|
485
488
|
}
|
|
486
489
|
function be(t, e) {
|
|
487
|
-
return !!(t.use_mtls_endpoint_aliases || e?.[
|
|
490
|
+
return !!(t.use_mtls_endpoint_aliases || e?.[He]);
|
|
488
491
|
}
|
|
489
|
-
function
|
|
492
|
+
function q(t) {
|
|
490
493
|
const e = t;
|
|
491
494
|
return typeof e != "object" || Array.isArray(e) || e === null ? !1 : e.error !== void 0;
|
|
492
495
|
}
|
|
493
|
-
async function
|
|
496
|
+
async function ht(t, e, n, o, s, r) {
|
|
494
497
|
if (!w(t))
|
|
495
498
|
throw new TypeError('"accessToken" must be a non-empty string');
|
|
496
499
|
if (!(n instanceof URL))
|
|
497
500
|
throw new TypeError('"url" must be an instance of URL');
|
|
498
|
-
return o =
|
|
501
|
+
return o = W(o), r?.DPoP === void 0 ? o.set("authorization", `Bearer ${t}`) : (await lt(o, r.DPoP, n, e.toUpperCase(), K({ [N]: r?.[N] }), t), o.set("authorization", `DPoP ${t}`)), (r?.[G] || fetch)(n.href, {
|
|
499
502
|
body: s,
|
|
500
503
|
headers: Object.fromEntries(o.entries()),
|
|
501
504
|
method: e,
|
|
502
505
|
redirect: "manual",
|
|
503
|
-
signal: r?.signal ?
|
|
504
|
-
}).then(
|
|
506
|
+
signal: r?.signal ? Ze(r.signal) : null
|
|
507
|
+
}).then(Y);
|
|
505
508
|
}
|
|
506
|
-
async function
|
|
509
|
+
async function pt(t, e, n, o) {
|
|
507
510
|
C(t), I(e);
|
|
508
|
-
const s = ye(t, "userinfo_endpoint", be(e, o)), r =
|
|
509
|
-
return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")),
|
|
511
|
+
const s = ye(t, "userinfo_endpoint", be(e, o)), r = W(o?.headers);
|
|
512
|
+
return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), ht(n, "GET", s, r, null, {
|
|
510
513
|
...o,
|
|
511
|
-
[
|
|
514
|
+
[N]: K(e)
|
|
512
515
|
});
|
|
513
516
|
}
|
|
514
|
-
async function
|
|
515
|
-
return await
|
|
517
|
+
async function wt(t, e, n, o, s, r, i) {
|
|
518
|
+
return await ct(t, e, s, r), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), (i?.[G] || fetch)(o.href, {
|
|
516
519
|
body: s,
|
|
517
520
|
headers: Object.fromEntries(r.entries()),
|
|
518
521
|
method: n,
|
|
519
522
|
redirect: "manual",
|
|
520
523
|
signal: null
|
|
521
|
-
}).then(
|
|
524
|
+
}).then(Y);
|
|
522
525
|
}
|
|
523
526
|
async function _e(t, e, n, o, s) {
|
|
524
527
|
const r = ye(t, "token_endpoint", be(e, s));
|
|
525
528
|
o.set("grant_type", n);
|
|
526
|
-
const i =
|
|
527
|
-
return i.set("accept", "application/json"),
|
|
529
|
+
const i = W(s?.headers);
|
|
530
|
+
return i.set("accept", "application/json"), wt(t, e, "POST", r, o, i, s);
|
|
528
531
|
}
|
|
529
532
|
async function de(t, e, n, o) {
|
|
530
533
|
if (C(t), I(e), !w(n))
|
|
@@ -533,7 +536,7 @@ async function de(t, e, n, o) {
|
|
|
533
536
|
return s.set("refresh_token", n), _e(t, e, "refresh_token", s, o);
|
|
534
537
|
}
|
|
535
538
|
const ve = /* @__PURE__ */ new WeakMap();
|
|
536
|
-
function
|
|
539
|
+
function mt(t) {
|
|
537
540
|
if (!t.id_token)
|
|
538
541
|
return;
|
|
539
542
|
const e = ve.get(t);
|
|
@@ -542,15 +545,15 @@ function pt(t) {
|
|
|
542
545
|
return e[0];
|
|
543
546
|
}
|
|
544
547
|
async function Se(t, e, n, o = !1, s = !1) {
|
|
545
|
-
if (C(t), I(e), !
|
|
548
|
+
if (C(t), I(e), !V(n, Response))
|
|
546
549
|
throw new TypeError('"response" must be an instance of Response');
|
|
547
550
|
if (n.status !== 200) {
|
|
548
551
|
let i;
|
|
549
|
-
if (i = await
|
|
552
|
+
if (i = await kt(n))
|
|
550
553
|
return i;
|
|
551
554
|
throw new a('"response" is not a conform Token Endpoint response');
|
|
552
555
|
}
|
|
553
|
-
|
|
556
|
+
X(n);
|
|
554
557
|
let r;
|
|
555
558
|
try {
|
|
556
559
|
r = await n.json();
|
|
@@ -575,7 +578,7 @@ async function Se(t, e, n, o = !1, s = !1) {
|
|
|
575
578
|
if (r.id_token !== void 0 && !w(r.id_token))
|
|
576
579
|
throw new a('"response" body "id_token" property must be a non-empty string');
|
|
577
580
|
if (r.id_token) {
|
|
578
|
-
const { claims: i, jwt: u } = await
|
|
581
|
+
const { claims: i, jwt: u } = await Pt(r.id_token, Lt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), ke, K(e), ge(e), e[Ke]).then(St.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(yt.bind(void 0, t.issuer)).then(gt.bind(void 0, e.client_id));
|
|
579
582
|
if (Array.isArray(i.aud) && i.aud.length !== 1) {
|
|
580
583
|
if (i.azp === void 0)
|
|
581
584
|
throw new a('ID Token "aud" (audience) claim includes additional untrusted audiences');
|
|
@@ -589,10 +592,10 @@ async function Se(t, e, n, o = !1, s = !1) {
|
|
|
589
592
|
}
|
|
590
593
|
return r;
|
|
591
594
|
}
|
|
592
|
-
async function
|
|
595
|
+
async function fe(t, e, n) {
|
|
593
596
|
return Se(t, e, n);
|
|
594
597
|
}
|
|
595
|
-
function
|
|
598
|
+
function gt(t, e) {
|
|
596
599
|
if (Array.isArray(e.claims.aud)) {
|
|
597
600
|
if (!e.claims.aud.includes(t))
|
|
598
601
|
throw new a('unexpected JWT "aud" (audience) claim value');
|
|
@@ -600,16 +603,16 @@ function wt(t, e) {
|
|
|
600
603
|
throw new a('unexpected JWT "aud" (audience) claim value');
|
|
601
604
|
return e;
|
|
602
605
|
}
|
|
603
|
-
function
|
|
606
|
+
function yt(t, e) {
|
|
604
607
|
if (e.claims.iss !== t)
|
|
605
608
|
throw new a('unexpected JWT "iss" (issuer) claim value');
|
|
606
609
|
return e;
|
|
607
610
|
}
|
|
608
611
|
const Te = /* @__PURE__ */ new WeakSet();
|
|
609
|
-
function
|
|
612
|
+
function bt(t) {
|
|
610
613
|
return Te.add(t), t;
|
|
611
614
|
}
|
|
612
|
-
async function
|
|
615
|
+
async function _t(t, e, n, o, s, r) {
|
|
613
616
|
if (C(t), I(e), !Te.has(n))
|
|
614
617
|
throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
|
|
615
618
|
if (!w(o))
|
|
@@ -622,7 +625,7 @@ async function yt(t, e, n, o, s, r) {
|
|
|
622
625
|
const u = new URLSearchParams(r?.additionalParameters);
|
|
623
626
|
return u.set("redirect_uri", o), u.set("code_verifier", s), u.set("code", i), _e(t, e, "authorization_code", u, r);
|
|
624
627
|
}
|
|
625
|
-
const
|
|
628
|
+
const vt = {
|
|
626
629
|
aud: "audience",
|
|
627
630
|
c_hash: "code hash",
|
|
628
631
|
client_id: "client id",
|
|
@@ -638,33 +641,33 @@ const bt = {
|
|
|
638
641
|
htu: "http uri",
|
|
639
642
|
cnf: "confirmation"
|
|
640
643
|
};
|
|
641
|
-
function
|
|
644
|
+
function St(t, e) {
|
|
642
645
|
for (const n of t)
|
|
643
646
|
if (e.claims[n] === void 0)
|
|
644
|
-
throw new a(`JWT "${n}" (${
|
|
647
|
+
throw new a(`JWT "${n}" (${vt[n]}) claim missing`);
|
|
645
648
|
return e;
|
|
646
649
|
}
|
|
647
|
-
const
|
|
648
|
-
async function
|
|
650
|
+
const Tt = Symbol(), $ = Symbol();
|
|
651
|
+
async function At(t, e, n, o, s) {
|
|
649
652
|
const r = await Se(t, e, n);
|
|
650
|
-
if (
|
|
653
|
+
if (q(r))
|
|
651
654
|
return r;
|
|
652
655
|
if (!w(r.id_token))
|
|
653
656
|
throw new a('"response" body "id_token" property must be a non-empty string');
|
|
654
|
-
s ?? (s = e.default_max_age ??
|
|
655
|
-
const i =
|
|
656
|
-
if ((e.require_auth_time || s !==
|
|
657
|
+
s ?? (s = e.default_max_age ?? $);
|
|
658
|
+
const i = mt(r);
|
|
659
|
+
if ((e.require_auth_time || s !== $) && i.auth_time === void 0)
|
|
657
660
|
throw new a('ID Token "auth_time" (authentication time) claim missing');
|
|
658
|
-
if (s !==
|
|
661
|
+
if (s !== $) {
|
|
659
662
|
if (typeof s != "number" || s < 0)
|
|
660
663
|
throw new TypeError('"maxAge" must be a non-negative number');
|
|
661
|
-
const u =
|
|
664
|
+
const u = Q() + K(e), d = ge(e);
|
|
662
665
|
if (i.auth_time + s < u - d)
|
|
663
666
|
throw new a("too much time has elapsed since the last End-User authentication");
|
|
664
667
|
}
|
|
665
668
|
switch (o) {
|
|
666
669
|
case void 0:
|
|
667
|
-
case
|
|
670
|
+
case Tt:
|
|
668
671
|
if (i.nonce !== void 0)
|
|
669
672
|
throw new a('unexpected ID Token "nonce" claim value');
|
|
670
673
|
break;
|
|
@@ -678,13 +681,13 @@ async function St(t, e, n, o, s) {
|
|
|
678
681
|
}
|
|
679
682
|
return r;
|
|
680
683
|
}
|
|
681
|
-
function
|
|
684
|
+
function X(t) {
|
|
682
685
|
if (t.bodyUsed)
|
|
683
686
|
throw new TypeError('"response" body has been used already');
|
|
684
687
|
}
|
|
685
|
-
async function
|
|
688
|
+
async function kt(t) {
|
|
686
689
|
if (t.status > 399 && t.status < 500) {
|
|
687
|
-
|
|
690
|
+
X(t);
|
|
688
691
|
try {
|
|
689
692
|
const e = await t.json();
|
|
690
693
|
if (x(e) && typeof e.error == "string" && e.error.length)
|
|
@@ -693,11 +696,11 @@ async function Tt(t) {
|
|
|
693
696
|
}
|
|
694
697
|
}
|
|
695
698
|
}
|
|
696
|
-
function
|
|
699
|
+
function he(t) {
|
|
697
700
|
if (typeof t.modulusLength != "number" || t.modulusLength < 2048)
|
|
698
701
|
throw new a(`${t.name} modulusLength must be at least 2048 bits`);
|
|
699
702
|
}
|
|
700
|
-
function
|
|
703
|
+
function Et(t) {
|
|
701
704
|
switch (t) {
|
|
702
705
|
case "P-256":
|
|
703
706
|
return "SHA-256";
|
|
@@ -714,10 +717,10 @@ function Ae(t) {
|
|
|
714
717
|
case "ECDSA":
|
|
715
718
|
return {
|
|
716
719
|
name: t.algorithm.name,
|
|
717
|
-
hash:
|
|
720
|
+
hash: Et(t.algorithm.namedCurve)
|
|
718
721
|
};
|
|
719
722
|
case "RSA-PSS":
|
|
720
|
-
switch (
|
|
723
|
+
switch (he(t.algorithm), t.algorithm.hash.name) {
|
|
721
724
|
case "SHA-256":
|
|
722
725
|
case "SHA-384":
|
|
723
726
|
case "SHA-512":
|
|
@@ -729,7 +732,7 @@ function Ae(t) {
|
|
|
729
732
|
throw new v();
|
|
730
733
|
}
|
|
731
734
|
case "RSASSA-PKCS1-v1_5":
|
|
732
|
-
return
|
|
735
|
+
return he(t.algorithm), t.algorithm.name;
|
|
733
736
|
case "Ed448":
|
|
734
737
|
case "Ed25519":
|
|
735
738
|
return t.algorithm.name;
|
|
@@ -737,12 +740,12 @@ function Ae(t) {
|
|
|
737
740
|
throw new v();
|
|
738
741
|
}
|
|
739
742
|
const ke = Symbol();
|
|
740
|
-
async function
|
|
743
|
+
async function Rt(t, e, n, o) {
|
|
741
744
|
const s = `${t}.${e}`;
|
|
742
745
|
if (!await crypto.subtle.verify(Ae(n), n, o, E(s)))
|
|
743
746
|
throw new a("JWT signature verification failed");
|
|
744
747
|
}
|
|
745
|
-
async function
|
|
748
|
+
async function Pt(t, e, n, o, s, r) {
|
|
746
749
|
let { 0: i, 1: u, 2: d, length: y } = t.split(".");
|
|
747
750
|
if (y === 5)
|
|
748
751
|
if (r !== void 0)
|
|
@@ -763,37 +766,37 @@ async function Et(t, e, n, o, s, r) {
|
|
|
763
766
|
throw new a('unexpected JWT "crit" header parameter');
|
|
764
767
|
const k = A(d);
|
|
765
768
|
let b;
|
|
766
|
-
n !== ke && (b = await n(p), await
|
|
767
|
-
let
|
|
769
|
+
n !== ke && (b = await n(p), await Rt(i, u, b, k));
|
|
770
|
+
let h;
|
|
768
771
|
try {
|
|
769
|
-
|
|
772
|
+
h = JSON.parse(E(A(u)));
|
|
770
773
|
} catch (l) {
|
|
771
774
|
throw new a("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
|
|
772
775
|
}
|
|
773
|
-
if (!x(
|
|
776
|
+
if (!x(h))
|
|
774
777
|
throw new a("JWT Payload must be a top level object");
|
|
775
|
-
const P =
|
|
776
|
-
if (
|
|
777
|
-
if (typeof
|
|
778
|
+
const P = Q() + o;
|
|
779
|
+
if (h.exp !== void 0) {
|
|
780
|
+
if (typeof h.exp != "number")
|
|
778
781
|
throw new a('unexpected JWT "exp" (expiration time) claim type');
|
|
779
|
-
if (
|
|
782
|
+
if (h.exp <= P - s)
|
|
780
783
|
throw new a('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()');
|
|
781
784
|
}
|
|
782
|
-
if (
|
|
785
|
+
if (h.iat !== void 0 && typeof h.iat != "number")
|
|
783
786
|
throw new a('unexpected JWT "iat" (issued at) claim type');
|
|
784
|
-
if (
|
|
787
|
+
if (h.iss !== void 0 && typeof h.iss != "string")
|
|
785
788
|
throw new a('unexpected JWT "iss" (issuer) claim type');
|
|
786
|
-
if (
|
|
787
|
-
if (typeof
|
|
789
|
+
if (h.nbf !== void 0) {
|
|
790
|
+
if (typeof h.nbf != "number")
|
|
788
791
|
throw new a('unexpected JWT "nbf" (not before) claim type');
|
|
789
|
-
if (
|
|
792
|
+
if (h.nbf > P + s)
|
|
790
793
|
throw new a('unexpected JWT "nbf" (not before) claim value, timestamp is > now()');
|
|
791
794
|
}
|
|
792
|
-
if (
|
|
795
|
+
if (h.aud !== void 0 && typeof h.aud != "string" && !Array.isArray(h.aud))
|
|
793
796
|
throw new a('unexpected JWT "aud" (audience) claim type');
|
|
794
|
-
return { header: p, claims:
|
|
797
|
+
return { header: p, claims: h, signature: k, key: b, jwt: t };
|
|
795
798
|
}
|
|
796
|
-
function
|
|
799
|
+
function Lt(t, e, n) {
|
|
797
800
|
if (t !== void 0) {
|
|
798
801
|
if (n.alg !== t)
|
|
799
802
|
throw new a('unexpected JWT "alg" header parameter');
|
|
@@ -813,8 +816,8 @@ function T(t, e) {
|
|
|
813
816
|
throw new a(`"${e}" parameter must be provided only once`);
|
|
814
817
|
return n;
|
|
815
818
|
}
|
|
816
|
-
const
|
|
817
|
-
function
|
|
819
|
+
const Ut = Symbol(), xt = Symbol();
|
|
820
|
+
function Ct(t, e, n, o) {
|
|
818
821
|
if (C(t), I(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
|
|
819
822
|
throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
|
|
820
823
|
if (T(n, "response"))
|
|
@@ -826,11 +829,11 @@ function Ut(t, e, n, o) {
|
|
|
826
829
|
throw new a('unexpected "iss" (issuer) response parameter value');
|
|
827
830
|
switch (o) {
|
|
828
831
|
case void 0:
|
|
829
|
-
case
|
|
832
|
+
case xt:
|
|
830
833
|
if (r !== void 0)
|
|
831
834
|
throw new a('unexpected "state" response parameter encountered');
|
|
832
835
|
break;
|
|
833
|
-
case
|
|
836
|
+
case Ut:
|
|
834
837
|
break;
|
|
835
838
|
default:
|
|
836
839
|
if (!w(o))
|
|
@@ -850,10 +853,10 @@ function Ut(t, e, n, o) {
|
|
|
850
853
|
const u = T(n, "id_token"), d = T(n, "token");
|
|
851
854
|
if (u !== void 0 || d !== void 0)
|
|
852
855
|
throw new v("implicit and hybrid flows are not supported");
|
|
853
|
-
return
|
|
856
|
+
return bt(new URLSearchParams(n));
|
|
854
857
|
}
|
|
855
|
-
const
|
|
856
|
-
class
|
|
858
|
+
const F = "code-verifier", M = "oauth-state", pe = "/oauth/callback";
|
|
859
|
+
class It extends Ie {
|
|
857
860
|
client;
|
|
858
861
|
issuer;
|
|
859
862
|
authorizationServer;
|
|
@@ -877,12 +880,12 @@ class xt extends Ce {
|
|
|
877
880
|
super(), this.client = {
|
|
878
881
|
client_id: o,
|
|
879
882
|
token_endpoint_auth_method: "none"
|
|
880
|
-
}, this.audience = n, this.issuer = e, this.callbackUrlPath =
|
|
883
|
+
}, this.audience = n, this.issuer = e, this.callbackUrlPath = Ce(u, pe), this.scopes = d ?? ["openid", "profile", "email"], this.redirectToAfterSignUp = s, this.redirectToAfterSignIn = r, this.redirectToAfterSignOut = i;
|
|
881
884
|
}
|
|
882
885
|
async getAuthServer() {
|
|
883
886
|
if (!this.authorizationServer) {
|
|
884
|
-
const e = new URL(this.issuer), n = await
|
|
885
|
-
this.authorizationServer = await
|
|
887
|
+
const e = new URL(this.issuer), n = await Qe(e);
|
|
888
|
+
this.authorizationServer = await Xe(
|
|
886
889
|
e,
|
|
887
890
|
n
|
|
888
891
|
);
|
|
@@ -894,7 +897,7 @@ class xt extends Ce {
|
|
|
894
897
|
* @param response
|
|
895
898
|
*/
|
|
896
899
|
setTokensFromResponse(e) {
|
|
897
|
-
if (
|
|
900
|
+
if (q(e))
|
|
898
901
|
throw ie.error("Bad Token Response", e), new re("Bad Token Response", e);
|
|
899
902
|
if (!e.expires_in)
|
|
900
903
|
throw new R("No expires_in in response");
|
|
@@ -936,8 +939,8 @@ class xt extends Ce {
|
|
|
936
939
|
const s = "S256", r = await this.getAuthServer();
|
|
937
940
|
if (!r.authorization_endpoint)
|
|
938
941
|
throw new R("No authorization endpoint");
|
|
939
|
-
const i =
|
|
940
|
-
sessionStorage.setItem(
|
|
942
|
+
const i = et(), u = await nt(i);
|
|
943
|
+
sessionStorage.setItem(F, i);
|
|
941
944
|
const d = new URL(
|
|
942
945
|
r.authorization_endpoint
|
|
943
946
|
);
|
|
@@ -950,8 +953,8 @@ class xt extends Ce {
|
|
|
950
953
|
isSignIn: !n,
|
|
951
954
|
isSignUp: n
|
|
952
955
|
});
|
|
953
|
-
const p =
|
|
954
|
-
sessionStorage.setItem(
|
|
956
|
+
const p = tt();
|
|
957
|
+
sessionStorage.setItem(M, p), d.searchParams.set("state", p), o ? location.replace(d.href) : location.href = d.href;
|
|
955
958
|
}
|
|
956
959
|
async getAccessToken() {
|
|
957
960
|
const e = await this.getAuthServer(), { providerData: n } = S.getState();
|
|
@@ -970,7 +973,7 @@ class xt extends Ce {
|
|
|
970
973
|
e,
|
|
971
974
|
this.client,
|
|
972
975
|
o.refreshToken
|
|
973
|
-
), r = await
|
|
976
|
+
), r = await fe(
|
|
974
977
|
e,
|
|
975
978
|
this.client,
|
|
976
979
|
s
|
|
@@ -1024,7 +1027,7 @@ class xt extends Ce {
|
|
|
1024
1027
|
o,
|
|
1025
1028
|
this.client,
|
|
1026
1029
|
n.refreshToken
|
|
1027
|
-
), r = await
|
|
1030
|
+
), r = await fe(
|
|
1028
1031
|
o,
|
|
1029
1032
|
this.client,
|
|
1030
1033
|
s
|
|
@@ -1045,42 +1048,42 @@ class xt extends Ce {
|
|
|
1045
1048
|
S.setState({ isPending: !1 });
|
|
1046
1049
|
};
|
|
1047
1050
|
handleCallback = async () => {
|
|
1048
|
-
const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(
|
|
1049
|
-
if (sessionStorage.removeItem(
|
|
1051
|
+
const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(M);
|
|
1052
|
+
if (sessionStorage.removeItem(M), n !== o)
|
|
1050
1053
|
throw new R("Invalid state parameter");
|
|
1051
|
-
const s = sessionStorage.getItem(
|
|
1052
|
-
if (sessionStorage.removeItem(
|
|
1054
|
+
const s = sessionStorage.getItem(F);
|
|
1055
|
+
if (sessionStorage.removeItem(F), !s)
|
|
1053
1056
|
throw new R("No code verifier found in state.");
|
|
1054
|
-
const r = await this.getAuthServer(), i =
|
|
1057
|
+
const r = await this.getAuthServer(), i = Ct(
|
|
1055
1058
|
r,
|
|
1056
1059
|
this.client,
|
|
1057
1060
|
e.searchParams,
|
|
1058
1061
|
n ?? void 0
|
|
1059
1062
|
);
|
|
1060
|
-
if (
|
|
1063
|
+
if (q(i))
|
|
1061
1064
|
throw ie.error("Error validating OAuth response", i), new re(
|
|
1062
1065
|
"Error validating OAuth response",
|
|
1063
1066
|
i
|
|
1064
1067
|
);
|
|
1065
1068
|
const u = new URL(e);
|
|
1066
1069
|
u.pathname = this.callbackUrlPath, u.search = "";
|
|
1067
|
-
const d = await
|
|
1070
|
+
const d = await _t(
|
|
1068
1071
|
r,
|
|
1069
1072
|
this.client,
|
|
1070
1073
|
i,
|
|
1071
1074
|
u.toString(),
|
|
1072
1075
|
s
|
|
1073
|
-
), y = await
|
|
1076
|
+
), y = await At(
|
|
1074
1077
|
r,
|
|
1075
1078
|
this.client,
|
|
1076
1079
|
d
|
|
1077
1080
|
);
|
|
1078
1081
|
this.setTokensFromResponse(y);
|
|
1079
|
-
const p = await this.getAccessToken(), b = await (await
|
|
1082
|
+
const p = await this.getAccessToken(), b = await (await pt(
|
|
1080
1083
|
r,
|
|
1081
1084
|
this.client,
|
|
1082
1085
|
p
|
|
1083
|
-
)).json(),
|
|
1086
|
+
)).json(), h = {
|
|
1084
1087
|
sub: b.sub,
|
|
1085
1088
|
email: b.email,
|
|
1086
1089
|
name: b.name,
|
|
@@ -1090,7 +1093,7 @@ class xt extends Ce {
|
|
|
1090
1093
|
S.setState({
|
|
1091
1094
|
isAuthenticated: !0,
|
|
1092
1095
|
isPending: !1,
|
|
1093
|
-
profile:
|
|
1096
|
+
profile: h
|
|
1094
1097
|
});
|
|
1095
1098
|
const P = sessionStorage.getItem("redirect-to") ?? "/";
|
|
1096
1099
|
return sessionStorage.removeItem("redirect-to"), P;
|
|
@@ -1100,15 +1103,21 @@ class xt extends Ce {
|
|
|
1100
1103
|
...super.getRoutes(),
|
|
1101
1104
|
{
|
|
1102
1105
|
path: pe,
|
|
1103
|
-
element: /* @__PURE__ */
|
|
1106
|
+
element: /* @__PURE__ */ D.jsx(xe, { children: /* @__PURE__ */ D.jsx(
|
|
1107
|
+
Ue,
|
|
1108
|
+
{
|
|
1109
|
+
fallbackRender: ({ error: e }) => /* @__PURE__ */ D.jsx(Oe, { error: e }),
|
|
1110
|
+
children: /* @__PURE__ */ D.jsx(je, { handleCallback: this.handleCallback })
|
|
1111
|
+
}
|
|
1112
|
+
) })
|
|
1104
1113
|
}
|
|
1105
1114
|
];
|
|
1106
1115
|
}
|
|
1107
1116
|
}
|
|
1108
|
-
const
|
|
1117
|
+
const Ht = (t) => new It(t);
|
|
1109
1118
|
export {
|
|
1110
1119
|
pe as OPENID_CALLBACK_PATH,
|
|
1111
|
-
|
|
1112
|
-
|
|
1120
|
+
It as OpenIDAuthenticationProvider,
|
|
1121
|
+
Ht as default
|
|
1113
1122
|
};
|
|
1114
1123
|
//# sourceMappingURL=zudoku.auth-openid.js.map
|