zudoku 0.21.15 → 0.23.0
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/demo.js.map +1 -1
- package/dist/app/entry.client.js +1 -15
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.js +1 -2
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.d.ts +1 -1
- package/dist/app/sentry.js +1 -1
- package/dist/app/sentry.js.map +1 -1
- package/dist/app/standalone.js +1 -1
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/cmds/build.js +1 -0
- package/dist/cli/cmds/build.js.map +1 -1
- package/dist/config/validators/common.d.ts +104 -104
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +90 -90
- package/dist/lib/authentication/components/CallbackHandler.js +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/SignIn.js +1 -1
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/components/SignOut.js +1 -1
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- package/dist/lib/components/AnchorLink.d.ts +1 -1
- package/dist/lib/components/AnchorLink.js +1 -1
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Bootstrap.d.ts +1 -2
- package/dist/lib/components/Bootstrap.js +3 -3
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/Header.js +1 -1
- package/dist/lib/components/Header.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/Markdown.js +1 -1
- package/dist/lib/components/Markdown.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/ReactMarkdown.d.ts +29 -0
- package/dist/lib/components/ReactMarkdown.js +182 -0
- package/dist/lib/components/ReactMarkdown.js.map +1 -0
- package/dist/lib/components/SlotletProvider.d.ts +2 -2
- package/dist/lib/components/TopNavigation.js +1 -1
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.js +1 -1
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.js +1 -1
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +4 -4
- package/dist/lib/components/index.js +1 -1
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +1 -1
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/utils.js +1 -1
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +3 -5
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/RouterError.js +1 -1
- package/dist/lib/errors/RouterError.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +1 -0
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.js +1 -1
- package/dist/lib/plugins/openapi/Route.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/index.js +1 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/redirect/index.js +1 -1
- package/dist/lib/plugins/redirect/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/index.d.ts +22 -3
- package/dist/lib/plugins/search-inkeep/index.js +27 -5
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/inkeep.d.ts +3 -4
- package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +16 -16
- package/dist/lib/util/MdxComponents.js +1 -3
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/createVariantComponent.d.ts +2 -2
- package/dist/lib/util/useExposedProps.js +1 -1
- package/dist/lib/util/useExposedProps.js.map +1 -1
- package/dist/lib/util/useOnScreen.d.ts +1 -1
- package/dist/lib/util/useScrollToAnchor.js +1 -1
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/lib/util/useScrollToTop.js +1 -1
- package/dist/lib/util/useScrollToTop.js.map +1 -1
- package/dist/vite/config.js +15 -8
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/css/collect.d.ts +2 -0
- package/dist/vite/css/collect.js +27 -0
- package/dist/vite/css/collect.js.map +1 -0
- package/dist/vite/css/plugin.d.ts +5 -0
- package/dist/vite/css/plugin.js +79 -0
- package/dist/vite/css/plugin.js.map +1 -0
- package/dist/vite/dev-server.js +7 -3
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-mdx.js +2 -0
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin.js +4 -0
- package/dist/vite/plugin.js.map +1 -1
- package/lib/{AnchorLink-BR0MvI7n.js → AnchorLink-DFZZbmvr.js} +13 -14
- package/lib/AnchorLink-DFZZbmvr.js.map +1 -0
- package/lib/{AuthenticationPlugin-D0Em0SwR.js → AuthenticationPlugin-DQy635W9.js} +15 -16
- package/lib/AuthenticationPlugin-DQy635W9.js.map +1 -0
- package/lib/{Button-jK0EsymC.js → Button-DeAoTouo.js} +4 -4
- package/lib/{Button-jK0EsymC.js.map → Button-DeAoTouo.js.map} +1 -1
- package/lib/{CategoryHeading-Bb9dqxD3.js → CategoryHeading-CBconmtI.js} +3 -3
- package/lib/{CategoryHeading-Bb9dqxD3.js.map → CategoryHeading-CBconmtI.js.map} +1 -1
- package/lib/ClientOnly-E7hGysn1.js.map +1 -1
- package/lib/{Dialog-k70Qfukb.js → Dialog-Bxv1yEIg.js} +3 -3
- package/lib/{Dialog-k70Qfukb.js.map → Dialog-Bxv1yEIg.js.map} +1 -1
- package/lib/{Markdown-CdkU5HcM.js → Markdown-CZDLNOFc.js} +13235 -13225
- package/lib/Markdown-CZDLNOFc.js.map +1 -0
- package/lib/{MdxPage-ChziqNPp.js → MdxPage-CBa4X6L5.js} +9 -9
- package/lib/MdxPage-CBa4X6L5.js.map +1 -0
- package/lib/OperationList-Bj-6EKhp.js +4889 -0
- package/lib/{OperationList-CQKkyrZH.js.map → OperationList-Bj-6EKhp.js.map} +1 -1
- package/lib/Route-C9cYcP-j.js +11 -0
- package/lib/Route-C9cYcP-j.js.map +1 -0
- package/lib/{Select-O9ZM3ZgX.js → Select-Bb_Hqc70.js} +5 -5
- package/lib/{Select-O9ZM3ZgX.js.map → Select-Bb_Hqc70.js.map} +1 -1
- package/lib/{SidebarBadge-DxFJcJ6V.js → SidebarBadge-Bm793GDY.js} +3 -3
- package/lib/{SidebarBadge-DxFJcJ6V.js.map → SidebarBadge-Bm793GDY.js.map} +1 -1
- package/lib/SlotletProvider-pfc9oejW.js +221 -0
- package/lib/SlotletProvider-pfc9oejW.js.map +1 -0
- package/lib/{Spinner-3cQDBVGr.js → Spinner-DuxJLLNE.js} +2 -2
- package/lib/{Spinner-3cQDBVGr.js.map → Spinner-DuxJLLNE.js.map} +1 -1
- package/lib/{SyntaxHighlight-C31iouiO.js → SyntaxHighlight-Bz-lOJtH.js} +8 -10
- package/lib/{SyntaxHighlight-C31iouiO.js.map → SyntaxHighlight-Bz-lOJtH.js.map} +1 -1
- package/lib/assets/{index-B_Jk_Yzp.js → index-C7jnHK4b.js} +218 -197
- package/lib/assets/index-C7jnHK4b.js.map +1 -0
- package/lib/assets/{worker-C_2va8B8.js → worker-BmEAZjUP.js} +5249 -4922
- package/lib/assets/worker-BmEAZjUP.js.map +1 -0
- package/lib/chunk-D52XG6IA-Dl7HLe6j.js +1823 -0
- package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +1 -0
- package/lib/{cn-BmFQLtkS.js → cn-qaFjX9_3.js} +2 -2
- package/lib/cn-qaFjX9_3.js.map +1 -0
- package/lib/{context-D1nXWxm7.js → context-h_UkBLvr.js} +2 -2
- package/lib/{context-D1nXWxm7.js.map → context-h_UkBLvr.js.map} +1 -1
- package/lib/{createServer-BCAHdrpE.js → createServer-BVFp6Bl3.js} +4521 -4195
- package/lib/createServer-BVFp6Bl3.js.map +1 -0
- package/lib/{hook-hEqe7fPB.js → hook-DMHiUaIV.js} +3 -3
- package/lib/{hook-hEqe7fPB.js.map → hook-DMHiUaIV.js.map} +1 -1
- package/lib/{index-DjB6H4GT.js → index-B6rTMjdI.js} +47 -47
- package/lib/{index-DjB6H4GT.js.map → index-B6rTMjdI.js.map} +1 -1
- package/lib/{index-CkwDvuPt.js → index-CBXSgjaE.js} +259 -238
- package/lib/index-CBXSgjaE.js.map +1 -0
- package/lib/index-CPNSgwSb.js +36 -0
- package/lib/index-CPNSgwSb.js.map +1 -0
- package/lib/index-LNp6rxyU.js.map +1 -1
- package/lib/index.esm-BSV1C092.js +692 -0
- package/lib/{index.esm-Bm8pj-bc.js.map → index.esm-BSV1C092.js.map} +1 -1
- package/lib/index.esm-BnnBRKJX.js +1214 -0
- package/lib/index.esm-BnnBRKJX.js.map +1 -0
- package/lib/invariant-Caa8-XvF.js.map +1 -1
- package/lib/jsx-runtime-Dx-03ztt.js +446 -0
- package/lib/jsx-runtime-Dx-03ztt.js.map +1 -0
- package/lib/object_hash-BNWPnMN9.js +787 -0
- package/lib/object_hash-BNWPnMN9.js.map +1 -0
- package/lib/post-processors/removeExtensions.js.map +1 -1
- package/lib/post-processors/removePaths.js.map +1 -1
- package/lib/post-processors/traverse.js.map +1 -1
- package/lib/prism-csharp.min-DUwvItt4.js +63 -0
- package/lib/{prism-csharp.min-Yizuc34Y.js.map → prism-csharp.min-DUwvItt4.js.map} +1 -1
- package/lib/prism-java.min-BtgBR4yd.js +35 -0
- package/lib/{prism-java.min-d5iT_mOd.js.map → prism-java.min-BtgBR4yd.js.map} +1 -1
- package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
- package/lib/prism-ruby.min-DeDXCp1r.js +38 -0
- package/lib/{prism-ruby.min-C7LwcKyz.js.map → prism-ruby.min-DeDXCp1r.js.map} +1 -1
- package/lib/prism-typescript.min-CD7H2IYQ.js +34 -0
- package/lib/{prism-typescript.min-oSVeWCAd.js.map → prism-typescript.min-CD7H2IYQ.js.map} +1 -1
- package/lib/state-CFQsUZUP.js +202 -0
- package/lib/state-CFQsUZUP.js.map +1 -0
- package/lib/ui/Accordion.js +2 -2
- package/lib/ui/Accordion.js.map +1 -1
- package/lib/ui/ActionButton.js +4 -4
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +3 -3
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js +2 -2
- package/lib/ui/AlertDialog.js.map +1 -1
- package/lib/ui/Badge.js +3 -3
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +2 -2
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js +3 -3
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +2 -2
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +2 -2
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +407 -401
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +2 -2
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/Command.js +111 -108
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +2 -2
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +2 -2
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/Form.js +3 -3
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/HoverCard.js +2 -2
- package/lib/ui/Input.js +2 -2
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +3 -3
- package/lib/ui/Pagination.js +2 -2
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js +2 -2
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js +2 -2
- package/lib/ui/Progress.js.map +1 -1
- package/lib/ui/RadioGroup.js +2 -2
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js +2 -2
- package/lib/ui/ScrollArea.js.map +1 -1
- package/lib/ui/Select.js +2 -2
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +2 -2
- package/lib/ui/Skeleton.js.map +1 -1
- package/lib/ui/Slider.js +2 -2
- package/lib/ui/Switch.js +2 -2
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/Tabs.js +2 -2
- package/lib/ui/Textarea.js +2 -2
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js +3 -3
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js +2 -2
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js +2 -2
- package/lib/useExposedProps-DE9lR6MF.js +9 -0
- package/lib/useExposedProps-DE9lR6MF.js.map +1 -0
- package/lib/{utils-DcpDOncX.js → utils-R0j3Raw1.js} +30 -31
- package/lib/{utils-DcpDOncX.js.map → utils-R0j3Raw1.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +348 -346
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +679 -939
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +1 -1
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +3 -3
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +15 -16
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +4 -4
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +2 -2
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +5 -5
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +45 -24
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/package.json +43 -37
- package/src/app/demo.tsx +1 -1
- package/src/app/entry.client.tsx +1 -15
- package/src/app/entry.server.tsx +2 -2
- package/src/app/main.tsx +1 -1
- package/src/app/sentry.ts +1 -1
- package/src/app/standalone.tsx +1 -1
- package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
- package/src/lib/authentication/components/SignIn.tsx +1 -1
- package/src/lib/authentication/components/SignOut.tsx +1 -1
- package/src/lib/components/AnchorLink.tsx +1 -1
- package/src/lib/components/Bootstrap.tsx +4 -6
- package/src/lib/components/Header.tsx +1 -1
- package/src/lib/components/Layout.tsx +1 -1
- package/src/lib/components/Markdown.tsx +1 -1
- package/src/lib/components/NotFoundPage.tsx +1 -1
- package/src/lib/components/ReactMarkdown.license.txt +21 -0
- package/src/lib/components/ReactMarkdown.tsx +264 -0
- package/src/lib/components/SlotletProvider.tsx +1 -1
- package/src/lib/components/TopNavigation.tsx +1 -1
- package/src/lib/components/Zudoku.tsx +1 -1
- package/src/lib/components/context/ZudokuContext.ts +1 -1
- package/src/lib/components/index.ts +1 -1
- package/src/lib/components/navigation/SidebarCategory.tsx +1 -1
- package/src/lib/components/navigation/SidebarItem.tsx +1 -1
- package/src/lib/components/navigation/utils.ts +1 -1
- package/src/lib/core/plugins.ts +3 -7
- package/src/lib/errors/RouterError.tsx +1 -1
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +1 -1
- package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
- package/src/lib/plugins/api-keys/index.tsx +1 -1
- package/src/lib/plugins/custom-pages/index.tsx +1 -1
- package/src/lib/plugins/markdown/MdxPage.tsx +1 -1
- package/src/lib/plugins/markdown/index.tsx +2 -1
- package/src/lib/plugins/openapi/Route.tsx +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/index.tsx +1 -1
- package/src/lib/plugins/redirect/index.tsx +1 -1
- package/src/lib/plugins/search-inkeep/index.tsx +59 -23
- package/src/lib/plugins/search-inkeep/inkeep.ts +3 -9
- package/src/lib/util/MdxComponents.tsx +1 -3
- package/src/lib/util/createVariantComponent.tsx +2 -2
- package/src/lib/util/useExposedProps.tsx +1 -1
- package/src/lib/util/useScrollToAnchor.ts +1 -1
- package/src/lib/util/useScrollToTop.ts +1 -1
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +0 -2
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +0 -3
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +0 -1
- package/lib/AnchorLink-BR0MvI7n.js.map +0 -1
- package/lib/AuthenticationPlugin-D0Em0SwR.js.map +0 -1
- package/lib/InkeepCustomTrigger-CE5-K5ex.js +0 -6
- package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +0 -1
- package/lib/Markdown-CdkU5HcM.js.map +0 -1
- package/lib/MdxPage-ChziqNPp.js.map +0 -1
- package/lib/OperationList-CQKkyrZH.js +0 -4706
- package/lib/Route-DlG_HTMu.js +0 -11
- package/lib/Route-DlG_HTMu.js.map +0 -1
- package/lib/SlotletProvider-D77pO-fA.js +0 -252
- package/lib/SlotletProvider-D77pO-fA.js.map +0 -1
- package/lib/assets/index-B_Jk_Yzp.js.map +0 -1
- package/lib/assets/worker-C_2va8B8.js.map +0 -1
- package/lib/cn-BmFQLtkS.js.map +0 -1
- package/lib/createServer-BCAHdrpE.js.map +0 -1
- package/lib/index-BuAyrJe3.js +0 -46
- package/lib/index-BuAyrJe3.js.map +0 -1
- package/lib/index-CkwDvuPt.js.map +0 -1
- package/lib/index-Czzd9rjU.js +0 -899
- package/lib/index-Czzd9rjU.js.map +0 -1
- package/lib/index-Yn8c3UWE.js +0 -921
- package/lib/index-Yn8c3UWE.js.map +0 -1
- package/lib/index.esm-Bm8pj-bc.js +0 -675
- package/lib/index.esm-C5mr_sKO.js +0 -1193
- package/lib/index.esm-C5mr_sKO.js.map +0 -1
- package/lib/jsx-runtime-B6kdoens.js +0 -635
- package/lib/jsx-runtime-B6kdoens.js.map +0 -1
- package/lib/object_hash-CvlLgU-M.js +0 -785
- package/lib/object_hash-CvlLgU-M.js.map +0 -1
- package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
- package/lib/prism-java.min-d5iT_mOd.js +0 -7
- package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
- package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
- package/lib/router-lfyopgBI.js +0 -3024
- package/lib/router-lfyopgBI.js.map +0 -1
- package/lib/state-tsXBLONe.js +0 -203
- package/lib/state-tsXBLONe.js.map +0 -1
- package/lib/useExposedProps-CTPtylCV.js +0 -10
- package/lib/useExposedProps-CTPtylCV.js.map +0 -1
- package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +0 -3
|
@@ -1,165 +1,167 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var b = (t, e, n) =>
|
|
4
|
-
import { j as
|
|
5
|
-
import {
|
|
6
|
-
import { A as ze } from "./AuthenticationPlugin-
|
|
7
|
-
import { g as De } from "./utils-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { u as
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
(function(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
var je = Object.defineProperty;
|
|
2
|
+
var Je = (t, e, n) => e in t ? je(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 we } from "./jsx-runtime-Dx-03ztt.js";
|
|
5
|
+
import { g as Oe } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
6
|
+
import { A as ze } from "./AuthenticationPlugin-DQy635W9.js";
|
|
7
|
+
import { g as De } from "./utils-R0j3Raw1.js";
|
|
8
|
+
import { N as Ne } from "./chunk-D52XG6IA-Dl7HLe6j.js";
|
|
9
|
+
import { Z as Ke } from "./invariant-Caa8-XvF.js";
|
|
10
|
+
import { u as L } from "./state-CFQsUZUP.js";
|
|
11
|
+
var N = { exports: {} }, We = N.exports, ie;
|
|
12
|
+
function He() {
|
|
13
|
+
return ie || (ie = 1, function(t) {
|
|
14
|
+
(function(e, n) {
|
|
15
|
+
t.exports ? t.exports = n() : e.log = n();
|
|
16
|
+
})(We, function() {
|
|
17
|
+
var e = function() {
|
|
18
|
+
}, n = "undefined", o = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), a = [
|
|
19
|
+
"trace",
|
|
20
|
+
"debug",
|
|
21
|
+
"info",
|
|
22
|
+
"warn",
|
|
23
|
+
"error"
|
|
24
|
+
], r = {}, i = null;
|
|
25
|
+
function c(l, g) {
|
|
26
|
+
var u = l[g];
|
|
27
|
+
if (typeof u.bind == "function")
|
|
28
|
+
return u.bind(l);
|
|
29
|
+
try {
|
|
30
|
+
return Function.prototype.bind.call(u, l);
|
|
31
|
+
} catch {
|
|
32
|
+
return function() {
|
|
33
|
+
return Function.prototype.apply.apply(u, [l, arguments]);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function p() {
|
|
38
|
+
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
39
|
+
}
|
|
40
|
+
function _(l) {
|
|
41
|
+
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;
|
|
42
|
+
}
|
|
43
|
+
function f() {
|
|
44
|
+
for (var l = this.getLevel(), g = 0; g < a.length; g++) {
|
|
45
|
+
var u = a[g];
|
|
46
|
+
this[u] = g < l ? e : this.methodFactory(u, l, this.name);
|
|
47
|
+
}
|
|
48
|
+
if (this.log = this.debug, typeof console === n && l < this.levels.SILENT)
|
|
49
|
+
return "No console available for logging";
|
|
50
|
+
}
|
|
51
|
+
function y(l) {
|
|
31
52
|
return function() {
|
|
32
|
-
|
|
53
|
+
typeof console !== n && (f.call(this), this[l].apply(this, arguments));
|
|
33
54
|
};
|
|
34
55
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
38
|
-
}
|
|
39
|
-
function _(l) {
|
|
40
|
-
return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ? p : console[l] !== void 0 ? c(console, l) : console.log !== void 0 ? c(console, "log") : e;
|
|
41
|
-
}
|
|
42
|
-
function f() {
|
|
43
|
-
for (var l = this.getLevel(), m = 0; m < a.length; m++) {
|
|
44
|
-
var u = a[m];
|
|
45
|
-
this[u] = m < l ? e : this.methodFactory(u, l, this.name);
|
|
56
|
+
function T(l, g, u) {
|
|
57
|
+
return _(l) || y.apply(this, arguments);
|
|
46
58
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
var g = (a[d] || "silent").toUpperCase();
|
|
63
|
-
if (!(typeof window === n || !v)) {
|
|
64
|
-
try {
|
|
65
|
-
window.localStorage[v] = g;
|
|
66
|
-
return;
|
|
67
|
-
} catch {
|
|
68
|
-
}
|
|
69
|
-
try {
|
|
70
|
-
window.document.cookie = encodeURIComponent(v) + "=" + g + ";";
|
|
71
|
-
} catch {
|
|
59
|
+
function h(l, g) {
|
|
60
|
+
var u = this, O, M, R, v = "loglevel";
|
|
61
|
+
typeof l == "string" ? v += ":" + l : typeof l == "symbol" && (v = void 0);
|
|
62
|
+
function xe(d) {
|
|
63
|
+
var m = (a[d] || "silent").toUpperCase();
|
|
64
|
+
if (!(typeof window === n || !v)) {
|
|
65
|
+
try {
|
|
66
|
+
window.localStorage[v] = m;
|
|
67
|
+
return;
|
|
68
|
+
} catch {
|
|
69
|
+
}
|
|
70
|
+
try {
|
|
71
|
+
window.document.cookie = encodeURIComponent(v) + "=" + m + ";";
|
|
72
|
+
} catch {
|
|
73
|
+
}
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if (!(typeof window === n || !v)) {
|
|
78
|
-
try {
|
|
79
|
-
d = window.localStorage[v];
|
|
80
|
-
} catch {
|
|
81
|
-
}
|
|
82
|
-
if (typeof d === n)
|
|
76
|
+
function ne() {
|
|
77
|
+
var d;
|
|
78
|
+
if (!(typeof window === n || !v)) {
|
|
83
79
|
try {
|
|
84
|
-
|
|
85
|
-
re !== -1 && (d = /^([^;]+)/.exec(
|
|
86
|
-
g.slice(re + z.length + 1)
|
|
87
|
-
)[1]);
|
|
80
|
+
d = window.localStorage[v];
|
|
88
81
|
} catch {
|
|
89
82
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
83
|
+
if (typeof d === n)
|
|
84
|
+
try {
|
|
85
|
+
var m = window.document.cookie, z = encodeURIComponent(v), oe = m.indexOf(z + "=");
|
|
86
|
+
oe !== -1 && (d = /^([^;]+)/.exec(
|
|
87
|
+
m.slice(oe + z.length + 1)
|
|
88
|
+
)[1]);
|
|
89
|
+
} catch {
|
|
90
|
+
}
|
|
91
|
+
return u.levels[d] === void 0 && (d = void 0), d;
|
|
98
92
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
93
|
+
}
|
|
94
|
+
function Ce() {
|
|
95
|
+
if (!(typeof window === n || !v)) {
|
|
96
|
+
try {
|
|
97
|
+
window.localStorage.removeItem(v);
|
|
98
|
+
} catch {
|
|
99
|
+
}
|
|
100
|
+
try {
|
|
101
|
+
window.document.cookie = encodeURIComponent(v) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
102
|
+
} catch {
|
|
103
|
+
}
|
|
102
104
|
}
|
|
103
105
|
}
|
|
106
|
+
function U(d) {
|
|
107
|
+
var m = d;
|
|
108
|
+
if (typeof m == "string" && u.levels[m.toUpperCase()] !== void 0 && (m = u.levels[m.toUpperCase()]), typeof m == "number" && m >= 0 && m <= u.levels.SILENT)
|
|
109
|
+
return m;
|
|
110
|
+
throw new TypeError("log.setLevel() called with invalid level: " + d);
|
|
111
|
+
}
|
|
112
|
+
u.name = l, u.levels = {
|
|
113
|
+
TRACE: 0,
|
|
114
|
+
DEBUG: 1,
|
|
115
|
+
INFO: 2,
|
|
116
|
+
WARN: 3,
|
|
117
|
+
ERROR: 4,
|
|
118
|
+
SILENT: 5
|
|
119
|
+
}, u.methodFactory = g || T, u.getLevel = function() {
|
|
120
|
+
return R ?? M ?? O;
|
|
121
|
+
}, u.setLevel = function(d, m) {
|
|
122
|
+
return R = U(d), m !== !1 && xe(R), f.call(u);
|
|
123
|
+
}, u.setDefaultLevel = function(d) {
|
|
124
|
+
M = U(d), ne() || u.setLevel(d, !1);
|
|
125
|
+
}, u.resetLevel = function() {
|
|
126
|
+
R = null, Ce(), f.call(u);
|
|
127
|
+
}, u.enableAll = function(d) {
|
|
128
|
+
u.setLevel(u.levels.TRACE, d);
|
|
129
|
+
}, u.disableAll = function(d) {
|
|
130
|
+
u.setLevel(u.levels.SILENT, d);
|
|
131
|
+
}, u.rebuild = function() {
|
|
132
|
+
if (i !== u && (O = U(i.getLevel())), f.call(u), i === u)
|
|
133
|
+
for (var d in r)
|
|
134
|
+
r[d].rebuild();
|
|
135
|
+
}, O = U(
|
|
136
|
+
i ? i.getLevel() : "WARN"
|
|
137
|
+
);
|
|
138
|
+
var re = ne();
|
|
139
|
+
re != null && (R = U(re)), f.call(u);
|
|
104
140
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
u.setLevel(u.levels.SILENT, d);
|
|
130
|
-
}, u.rebuild = function() {
|
|
131
|
-
if (i !== u && (O = U(i.getLevel())), f.call(u), i === u)
|
|
132
|
-
for (var d in r)
|
|
133
|
-
r[d].rebuild();
|
|
134
|
-
}, O = U(
|
|
135
|
-
i ? i.getLevel() : "WARN"
|
|
136
|
-
);
|
|
137
|
-
var ne = te();
|
|
138
|
-
ne != null && (R = U(ne)), f.call(u);
|
|
139
|
-
}
|
|
140
|
-
i = new h(), i.getLogger = function(m) {
|
|
141
|
-
if (typeof m != "symbol" && typeof m != "string" || m === "")
|
|
142
|
-
throw new TypeError("You must supply a name when creating a logger.");
|
|
143
|
-
var u = r[m];
|
|
144
|
-
return u || (u = r[m] = new h(
|
|
145
|
-
m,
|
|
146
|
-
i.methodFactory
|
|
147
|
-
)), u;
|
|
148
|
-
};
|
|
149
|
-
var J = typeof window !== n ? window.log : void 0;
|
|
150
|
-
return i.noConflict = function() {
|
|
151
|
-
return typeof window !== n && window.log === i && (window.log = J), i;
|
|
152
|
-
}, i.getLoggers = function() {
|
|
153
|
-
return r;
|
|
154
|
-
}, i.default = i, i;
|
|
155
|
-
});
|
|
156
|
-
})(pe);
|
|
157
|
-
var We = pe.exports;
|
|
158
|
-
const oe = /* @__PURE__ */ Oe(We);
|
|
159
|
-
let V;
|
|
160
|
-
var D, he;
|
|
161
|
-
(typeof navigator > "u" || !((he = (D = navigator.userAgent) == null ? void 0 : D.startsWith) != null && he.call(D, "Mozilla/5.0 "))) && (V = "oauth4webapi/v2.17.0");
|
|
162
|
-
function Z(t, e) {
|
|
141
|
+
i = new h(), i.getLogger = function(g) {
|
|
142
|
+
if (typeof g != "symbol" && typeof g != "string" || g === "")
|
|
143
|
+
throw new TypeError("You must supply a name when creating a logger.");
|
|
144
|
+
var u = r[g];
|
|
145
|
+
return u || (u = r[g] = new h(
|
|
146
|
+
g,
|
|
147
|
+
i.methodFactory
|
|
148
|
+
)), u;
|
|
149
|
+
};
|
|
150
|
+
var J = typeof window !== n ? window.log : void 0;
|
|
151
|
+
return i.noConflict = function() {
|
|
152
|
+
return typeof window !== n && window.log === i && (window.log = J), i;
|
|
153
|
+
}, i.getLoggers = function() {
|
|
154
|
+
return r;
|
|
155
|
+
}, i.default = i, i;
|
|
156
|
+
});
|
|
157
|
+
}(N)), N.exports;
|
|
158
|
+
}
|
|
159
|
+
var $e = He();
|
|
160
|
+
const ae = /* @__PURE__ */ Oe($e);
|
|
161
|
+
let G;
|
|
162
|
+
var D, pe;
|
|
163
|
+
(typeof navigator > "u" || !((pe = (D = navigator.userAgent) == null ? void 0 : D.startsWith) != null && pe.call(D, "Mozilla/5.0 "))) && (G = "oauth4webapi/v2.17.0");
|
|
164
|
+
function Y(t, e) {
|
|
163
165
|
if (t == null)
|
|
164
166
|
return !1;
|
|
165
167
|
try {
|
|
@@ -168,19 +170,19 @@ function Z(t, e) {
|
|
|
168
170
|
return !1;
|
|
169
171
|
}
|
|
170
172
|
}
|
|
171
|
-
const
|
|
173
|
+
const W = Symbol(), Fe = Symbol(), Q = Symbol(), ge = Symbol(), Me = Symbol(), qe = Symbol(), Be = new TextEncoder(), Ve = new TextDecoder();
|
|
172
174
|
function E(t) {
|
|
173
|
-
return typeof t == "string" ?
|
|
175
|
+
return typeof t == "string" ? Be.encode(t) : Ve.decode(t);
|
|
174
176
|
}
|
|
175
|
-
const
|
|
176
|
-
function
|
|
177
|
+
const se = 32768;
|
|
178
|
+
function Ge(t) {
|
|
177
179
|
t instanceof ArrayBuffer && (t = new Uint8Array(t));
|
|
178
180
|
const e = [];
|
|
179
|
-
for (let n = 0; n < t.byteLength; n +=
|
|
180
|
-
e.push(String.fromCharCode.apply(null, t.subarray(n, n +
|
|
181
|
+
for (let n = 0; n < t.byteLength; n += se)
|
|
182
|
+
e.push(String.fromCharCode.apply(null, t.subarray(n, n + se)));
|
|
181
183
|
return btoa(e.join("")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
182
184
|
}
|
|
183
|
-
function
|
|
185
|
+
function Ze(t) {
|
|
184
186
|
try {
|
|
185
187
|
const e = atob(t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "")), n = new Uint8Array(e.length);
|
|
186
188
|
for (let o = 0; o < e.length; o++)
|
|
@@ -191,9 +193,9 @@ function Ve(t) {
|
|
|
191
193
|
}
|
|
192
194
|
}
|
|
193
195
|
function A(t) {
|
|
194
|
-
return typeof t == "string" ?
|
|
196
|
+
return typeof t == "string" ? Ze(t) : Ge(t);
|
|
195
197
|
}
|
|
196
|
-
class
|
|
198
|
+
class Ye {
|
|
197
199
|
constructor(e) {
|
|
198
200
|
this.cache = /* @__PURE__ */ new Map(), this._cache = /* @__PURE__ */ new Map(), this.maxSize = e;
|
|
199
201
|
}
|
|
@@ -223,23 +225,23 @@ class S extends Error {
|
|
|
223
225
|
super(e ?? "operation not supported"), this.name = this.constructor.name, (n = Error.captureStackTrace) == null || n.call(Error, this, this.constructor);
|
|
224
226
|
}
|
|
225
227
|
}
|
|
226
|
-
class
|
|
228
|
+
class Qe extends Error {
|
|
227
229
|
constructor(e, n) {
|
|
228
230
|
var o;
|
|
229
231
|
super(e, n), this.name = this.constructor.name, (o = Error.captureStackTrace) == null || o.call(Error, this, this.constructor);
|
|
230
232
|
}
|
|
231
233
|
}
|
|
232
|
-
const s =
|
|
233
|
-
function
|
|
234
|
+
const s = Qe, me = new Ye(100);
|
|
235
|
+
function ye(t) {
|
|
234
236
|
return t instanceof CryptoKey;
|
|
235
237
|
}
|
|
236
|
-
function
|
|
237
|
-
return
|
|
238
|
+
function be(t) {
|
|
239
|
+
return ye(t) && t.type === "private";
|
|
238
240
|
}
|
|
239
|
-
function
|
|
240
|
-
return
|
|
241
|
+
function Xe(t) {
|
|
242
|
+
return ye(t) && t.type === "public";
|
|
241
243
|
}
|
|
242
|
-
function
|
|
244
|
+
function X(t) {
|
|
243
245
|
try {
|
|
244
246
|
const e = t.headers.get("dpop-nonce");
|
|
245
247
|
e && me.set(new URL(t.url).origin, e);
|
|
@@ -247,24 +249,24 @@ function Q(t) {
|
|
|
247
249
|
}
|
|
248
250
|
return t;
|
|
249
251
|
}
|
|
250
|
-
function
|
|
252
|
+
function x(t) {
|
|
251
253
|
return !(t === null || typeof t != "object" || Array.isArray(t));
|
|
252
254
|
}
|
|
253
|
-
function
|
|
254
|
-
|
|
255
|
+
function H(t) {
|
|
256
|
+
Y(t, Headers) && (t = Object.fromEntries(t.entries()));
|
|
255
257
|
const e = new Headers(t);
|
|
256
|
-
if (
|
|
258
|
+
if (G && !e.has("user-agent") && e.set("user-agent", G), e.has("authorization"))
|
|
257
259
|
throw new TypeError('"options.headers" must not include the "authorization" header name');
|
|
258
260
|
if (e.has("dpop"))
|
|
259
261
|
throw new TypeError('"options.headers" must not include the "dpop" header name');
|
|
260
262
|
return e;
|
|
261
263
|
}
|
|
262
|
-
function
|
|
264
|
+
function ee(t) {
|
|
263
265
|
if (typeof t == "function" && (t = t()), !(t instanceof AbortSignal))
|
|
264
266
|
throw new TypeError('"options.signal" must return or be an instance of AbortSignal');
|
|
265
267
|
return t;
|
|
266
268
|
}
|
|
267
|
-
async function
|
|
269
|
+
async function et(t, e) {
|
|
268
270
|
if (!(t instanceof URL))
|
|
269
271
|
throw new TypeError('"issuerIdentifier" must be an instance of URL');
|
|
270
272
|
if (t.protocol !== "https:" && t.protocol !== "http:")
|
|
@@ -281,32 +283,32 @@ async function Qe(t, e) {
|
|
|
281
283
|
default:
|
|
282
284
|
throw new TypeError('"options.algorithm" must be "oidc" (default), or "oauth2"');
|
|
283
285
|
}
|
|
284
|
-
const o =
|
|
285
|
-
return o.set("accept", "application/json"), ((e == null ? void 0 : e[
|
|
286
|
+
const o = H(e == null ? void 0 : e.headers);
|
|
287
|
+
return o.set("accept", "application/json"), ((e == null ? void 0 : e[Q]) || fetch)(n.href, {
|
|
286
288
|
headers: Object.fromEntries(o.entries()),
|
|
287
289
|
method: "GET",
|
|
288
290
|
redirect: "manual",
|
|
289
|
-
signal: e != null && e.signal ?
|
|
290
|
-
}).then(
|
|
291
|
+
signal: e != null && e.signal ? ee(e.signal) : null
|
|
292
|
+
}).then(X);
|
|
291
293
|
}
|
|
292
294
|
function w(t) {
|
|
293
295
|
return typeof t == "string" && t.length !== 0;
|
|
294
296
|
}
|
|
295
|
-
async function
|
|
297
|
+
async function tt(t, e) {
|
|
296
298
|
if (!(t instanceof URL))
|
|
297
299
|
throw new TypeError('"expectedIssuer" must be an instance of URL');
|
|
298
|
-
if (!
|
|
300
|
+
if (!Y(e, Response))
|
|
299
301
|
throw new TypeError('"response" must be an instance of Response');
|
|
300
302
|
if (e.status !== 200)
|
|
301
303
|
throw new s('"response" is not a conform Authorization Server Metadata response');
|
|
302
|
-
|
|
304
|
+
te(e);
|
|
303
305
|
let n;
|
|
304
306
|
try {
|
|
305
307
|
n = await e.json();
|
|
306
308
|
} catch (o) {
|
|
307
309
|
throw new s('failed to parse "response" body as JSON', { cause: o });
|
|
308
310
|
}
|
|
309
|
-
if (!
|
|
311
|
+
if (!x(n))
|
|
310
312
|
throw new s('"response" body must be a top level object');
|
|
311
313
|
if (!w(n.issuer))
|
|
312
314
|
throw new s('"response" body "issuer" property must be a non-empty string');
|
|
@@ -314,21 +316,21 @@ async function Xe(t, e) {
|
|
|
314
316
|
throw new s('"response" body "issuer" does not match "expectedIssuer"');
|
|
315
317
|
return n;
|
|
316
318
|
}
|
|
317
|
-
function
|
|
319
|
+
function $() {
|
|
318
320
|
return A(crypto.getRandomValues(new Uint8Array(32)));
|
|
319
321
|
}
|
|
320
|
-
function
|
|
321
|
-
return
|
|
322
|
+
function nt() {
|
|
323
|
+
return $();
|
|
322
324
|
}
|
|
323
|
-
function
|
|
324
|
-
return
|
|
325
|
+
function rt() {
|
|
326
|
+
return $();
|
|
325
327
|
}
|
|
326
|
-
async function
|
|
328
|
+
async function ot(t) {
|
|
327
329
|
if (!w(t))
|
|
328
330
|
throw new TypeError('"codeVerifier" must be a non-empty string');
|
|
329
331
|
return A(await crypto.subtle.digest("SHA-256", E(t)));
|
|
330
332
|
}
|
|
331
|
-
function
|
|
333
|
+
function it(t) {
|
|
332
334
|
if (t instanceof CryptoKey)
|
|
333
335
|
return { key: t };
|
|
334
336
|
if (!((t == null ? void 0 : t.key) instanceof CryptoKey))
|
|
@@ -338,17 +340,17 @@ function rt(t) {
|
|
|
338
340
|
return {
|
|
339
341
|
key: t.key,
|
|
340
342
|
kid: t.kid,
|
|
341
|
-
modifyAssertion: t[
|
|
343
|
+
modifyAssertion: t[ge]
|
|
342
344
|
};
|
|
343
345
|
}
|
|
344
|
-
function
|
|
346
|
+
function ce(t) {
|
|
345
347
|
return encodeURIComponent(t).replace(/%20/g, "+");
|
|
346
348
|
}
|
|
347
|
-
function
|
|
348
|
-
const n =
|
|
349
|
+
function at(t, e) {
|
|
350
|
+
const n = ce(t), o = ce(e);
|
|
349
351
|
return `Basic ${btoa(`${n}:${o}`)}`;
|
|
350
352
|
}
|
|
351
|
-
function
|
|
353
|
+
function st(t) {
|
|
352
354
|
switch (t.algorithm.hash.name) {
|
|
353
355
|
case "SHA-256":
|
|
354
356
|
return "PS256";
|
|
@@ -360,7 +362,7 @@ function it(t) {
|
|
|
360
362
|
throw new S("unsupported RsaHashedKeyAlgorithm hash name");
|
|
361
363
|
}
|
|
362
364
|
}
|
|
363
|
-
function
|
|
365
|
+
function ct(t) {
|
|
364
366
|
switch (t.algorithm.hash.name) {
|
|
365
367
|
case "SHA-256":
|
|
366
368
|
return "RS256";
|
|
@@ -372,7 +374,7 @@ function at(t) {
|
|
|
372
374
|
throw new S("unsupported RsaHashedKeyAlgorithm hash name");
|
|
373
375
|
}
|
|
374
376
|
}
|
|
375
|
-
function
|
|
377
|
+
function ut(t) {
|
|
376
378
|
switch (t.algorithm.namedCurve) {
|
|
377
379
|
case "P-256":
|
|
378
380
|
return "ES256";
|
|
@@ -384,14 +386,14 @@ function st(t) {
|
|
|
384
386
|
throw new S("unsupported EcKeyAlgorithm namedCurve");
|
|
385
387
|
}
|
|
386
388
|
}
|
|
387
|
-
function
|
|
389
|
+
function _e(t) {
|
|
388
390
|
switch (t.algorithm.name) {
|
|
389
391
|
case "RSA-PSS":
|
|
390
|
-
return
|
|
392
|
+
return st(t);
|
|
391
393
|
case "RSASSA-PKCS1-v1_5":
|
|
392
|
-
return
|
|
394
|
+
return ct(t);
|
|
393
395
|
case "ECDSA":
|
|
394
|
-
return
|
|
396
|
+
return ut(t);
|
|
395
397
|
case "Ed25519":
|
|
396
398
|
case "Ed448":
|
|
397
399
|
return "EdDSA";
|
|
@@ -399,21 +401,21 @@ function be(t) {
|
|
|
399
401
|
throw new S("unsupported CryptoKey algorithm name");
|
|
400
402
|
}
|
|
401
403
|
}
|
|
402
|
-
function
|
|
403
|
-
const e = t == null ? void 0 : t[
|
|
404
|
+
function C(t) {
|
|
405
|
+
const e = t == null ? void 0 : t[W];
|
|
404
406
|
return typeof e == "number" && Number.isFinite(e) ? e : 0;
|
|
405
407
|
}
|
|
406
|
-
function
|
|
407
|
-
const e = t == null ? void 0 : t[
|
|
408
|
+
function ve(t) {
|
|
409
|
+
const e = t == null ? void 0 : t[Fe];
|
|
408
410
|
return typeof e == "number" && Number.isFinite(e) && Math.sign(e) !== -1 ? e : 30;
|
|
409
411
|
}
|
|
410
|
-
function
|
|
412
|
+
function F() {
|
|
411
413
|
return Math.floor(Date.now() / 1e3);
|
|
412
414
|
}
|
|
413
|
-
function
|
|
414
|
-
const n =
|
|
415
|
+
function lt(t, e) {
|
|
416
|
+
const n = F() + C(e);
|
|
415
417
|
return {
|
|
416
|
-
jti:
|
|
418
|
+
jti: $(),
|
|
417
419
|
aud: [t.issuer, t.token_endpoint],
|
|
418
420
|
exp: n + 60,
|
|
419
421
|
iat: n,
|
|
@@ -422,9 +424,9 @@ function ct(t, e) {
|
|
|
422
424
|
sub: e.client_id
|
|
423
425
|
};
|
|
424
426
|
}
|
|
425
|
-
async function
|
|
426
|
-
const r = { alg:
|
|
427
|
-
return a == null || a(r, i),
|
|
427
|
+
async function dt(t, e, n, o, a) {
|
|
428
|
+
const r = { alg: _e(n), kid: o }, i = lt(t, e);
|
|
429
|
+
return a == null || a(r, i), Se(r, i, n);
|
|
428
430
|
}
|
|
429
431
|
function I(t) {
|
|
430
432
|
if (typeof t != "object" || t === null)
|
|
@@ -440,171 +442,171 @@ function j(t) {
|
|
|
440
442
|
throw new TypeError('"client.client_id" property must be a non-empty string');
|
|
441
443
|
return !0;
|
|
442
444
|
}
|
|
443
|
-
function
|
|
445
|
+
function ue(t) {
|
|
444
446
|
if (!w(t))
|
|
445
447
|
throw new TypeError('"client.client_secret" property must be a non-empty string');
|
|
446
448
|
return t;
|
|
447
449
|
}
|
|
448
|
-
function
|
|
450
|
+
function q(t, e) {
|
|
449
451
|
if (e !== void 0)
|
|
450
452
|
throw new TypeError(`"options.clientPrivateKey" property must not be provided when ${t} client authentication method is used.`);
|
|
451
453
|
}
|
|
452
|
-
function
|
|
454
|
+
function le(t, e) {
|
|
453
455
|
if (e !== void 0)
|
|
454
456
|
throw new TypeError(`"client.client_secret" property must not be provided when ${t} client authentication method is used.`);
|
|
455
457
|
}
|
|
456
|
-
async function
|
|
458
|
+
async function ht(t, e, n, o, a) {
|
|
457
459
|
switch (n.delete("client_secret"), n.delete("client_assertion_type"), n.delete("client_assertion"), e.token_endpoint_auth_method) {
|
|
458
460
|
case void 0:
|
|
459
461
|
case "client_secret_basic": {
|
|
460
|
-
|
|
462
|
+
q("client_secret_basic", a), o.set("authorization", at(e.client_id, ue(e.client_secret)));
|
|
461
463
|
break;
|
|
462
464
|
}
|
|
463
465
|
case "client_secret_post": {
|
|
464
|
-
|
|
466
|
+
q("client_secret_post", a), n.set("client_id", e.client_id), n.set("client_secret", ue(e.client_secret));
|
|
465
467
|
break;
|
|
466
468
|
}
|
|
467
469
|
case "private_key_jwt": {
|
|
468
|
-
if (
|
|
470
|
+
if (le("private_key_jwt", e.client_secret), a === void 0)
|
|
469
471
|
throw new TypeError('"options.clientPrivateKey" must be provided when "client.token_endpoint_auth_method" is "private_key_jwt"');
|
|
470
|
-
const { key: r, kid: i, modifyAssertion: c } =
|
|
471
|
-
if (!
|
|
472
|
+
const { key: r, kid: i, modifyAssertion: c } = it(a);
|
|
473
|
+
if (!be(r))
|
|
472
474
|
throw new TypeError('"options.clientPrivateKey.key" must be a private CryptoKey');
|
|
473
|
-
n.set("client_id", e.client_id), n.set("client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"), n.set("client_assertion", await
|
|
475
|
+
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 dt(t, e, r, i, c));
|
|
474
476
|
break;
|
|
475
477
|
}
|
|
476
478
|
case "tls_client_auth":
|
|
477
479
|
case "self_signed_tls_client_auth":
|
|
478
480
|
case "none": {
|
|
479
|
-
|
|
481
|
+
le(e.token_endpoint_auth_method, e.client_secret), q(e.token_endpoint_auth_method, a), n.set("client_id", e.client_id);
|
|
480
482
|
break;
|
|
481
483
|
}
|
|
482
484
|
default:
|
|
483
485
|
throw new S("unsupported client token_endpoint_auth_method");
|
|
484
486
|
}
|
|
485
487
|
}
|
|
486
|
-
async function
|
|
488
|
+
async function Se(t, e, n) {
|
|
487
489
|
if (!n.usages.includes("sign"))
|
|
488
490
|
throw new TypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"');
|
|
489
|
-
const o = `${A(E(JSON.stringify(t)))}.${A(E(JSON.stringify(e)))}`, a = A(await crypto.subtle.sign(
|
|
491
|
+
const o = `${A(E(JSON.stringify(t)))}.${A(E(JSON.stringify(e)))}`, a = A(await crypto.subtle.sign(Ue(n), n, E(o)));
|
|
490
492
|
return `${o}.${a}`;
|
|
491
493
|
}
|
|
492
|
-
async function
|
|
494
|
+
async function ft(t, e, n, o, a, r) {
|
|
493
495
|
var T;
|
|
494
496
|
const { privateKey: i, publicKey: c, nonce: p = me.get(n.origin) } = e;
|
|
495
|
-
if (!
|
|
497
|
+
if (!be(i))
|
|
496
498
|
throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
|
|
497
|
-
if (!
|
|
499
|
+
if (!Xe(c))
|
|
498
500
|
throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');
|
|
499
501
|
if (p !== void 0 && !w(p))
|
|
500
502
|
throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');
|
|
501
503
|
if (!c.extractable)
|
|
502
504
|
throw new TypeError('"DPoP.publicKey.extractable" must be true');
|
|
503
|
-
const _ =
|
|
504
|
-
alg:
|
|
505
|
+
const _ = F() + a, f = {
|
|
506
|
+
alg: _e(i),
|
|
505
507
|
typ: "dpop+jwt",
|
|
506
|
-
jwk: await
|
|
508
|
+
jwk: await wt(c)
|
|
507
509
|
}, y = {
|
|
508
510
|
iat: _,
|
|
509
|
-
jti:
|
|
511
|
+
jti: $(),
|
|
510
512
|
htm: o,
|
|
511
513
|
nonce: p,
|
|
512
514
|
htu: `${n.origin}${n.pathname}`,
|
|
513
515
|
ath: r ? A(await crypto.subtle.digest("SHA-256", E(r))) : void 0
|
|
514
516
|
};
|
|
515
|
-
(T = e[
|
|
517
|
+
(T = e[ge]) == null || T.call(e, f, y), t.set("dpop", await Se(f, y, i));
|
|
516
518
|
}
|
|
517
|
-
let
|
|
518
|
-
async function
|
|
519
|
+
let K;
|
|
520
|
+
async function pt(t) {
|
|
519
521
|
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
|
|
522
|
+
return K.set(t, c), c;
|
|
521
523
|
}
|
|
522
|
-
async function
|
|
523
|
-
return
|
|
524
|
+
async function wt(t) {
|
|
525
|
+
return K || (K = /* @__PURE__ */ new WeakMap()), K.get(t) || pt(t);
|
|
524
526
|
}
|
|
525
|
-
function
|
|
527
|
+
function de(t, e, n) {
|
|
526
528
|
if (typeof t != "string")
|
|
527
529
|
throw n ? new TypeError(`"as.mtls_endpoint_aliases.${e}" must be a string`) : new TypeError(`"as.${e}" must be a string`);
|
|
528
530
|
return new URL(t);
|
|
529
531
|
}
|
|
530
|
-
function
|
|
531
|
-
return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ?
|
|
532
|
+
function Te(t, e, n = !1) {
|
|
533
|
+
return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ? de(t.mtls_endpoint_aliases[e], e, n) : de(t[e], e, n);
|
|
532
534
|
}
|
|
533
|
-
function
|
|
534
|
-
return !!(t.use_mtls_endpoint_aliases || e != null && e[
|
|
535
|
+
function ke(t, e) {
|
|
536
|
+
return !!(t.use_mtls_endpoint_aliases || e != null && e[qe]);
|
|
535
537
|
}
|
|
536
|
-
function
|
|
538
|
+
function Z(t) {
|
|
537
539
|
const e = t;
|
|
538
540
|
return typeof e != "object" || Array.isArray(e) || e === null ? !1 : e.error !== void 0;
|
|
539
541
|
}
|
|
540
|
-
async function
|
|
542
|
+
async function gt(t, e, n, o, a, r) {
|
|
541
543
|
if (!w(t))
|
|
542
544
|
throw new TypeError('"accessToken" must be a non-empty string');
|
|
543
545
|
if (!(n instanceof URL))
|
|
544
546
|
throw new TypeError('"url" must be an instance of URL');
|
|
545
|
-
return o =
|
|
547
|
+
return o = H(o), (r == null ? void 0 : r.DPoP) === void 0 ? o.set("authorization", `Bearer ${t}`) : (await ft(o, r.DPoP, n, e.toUpperCase(), C({ [W]: r == null ? void 0 : r[W] }), t), o.set("authorization", `DPoP ${t}`)), ((r == null ? void 0 : r[Q]) || fetch)(n.href, {
|
|
546
548
|
body: a,
|
|
547
549
|
headers: Object.fromEntries(o.entries()),
|
|
548
550
|
method: e,
|
|
549
551
|
redirect: "manual",
|
|
550
|
-
signal: r != null && r.signal ?
|
|
551
|
-
}).then(
|
|
552
|
+
signal: r != null && r.signal ? ee(r.signal) : null
|
|
553
|
+
}).then(X);
|
|
552
554
|
}
|
|
553
|
-
async function
|
|
555
|
+
async function mt(t, e, n, o) {
|
|
554
556
|
I(t), j(e);
|
|
555
|
-
const a =
|
|
556
|
-
return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")),
|
|
557
|
+
const a = Te(t, "userinfo_endpoint", ke(e, o)), r = H(o == null ? void 0 : o.headers);
|
|
558
|
+
return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), gt(n, "GET", a, r, null, {
|
|
557
559
|
...o,
|
|
558
|
-
[
|
|
560
|
+
[W]: C(e)
|
|
559
561
|
});
|
|
560
562
|
}
|
|
561
|
-
async function
|
|
562
|
-
return await
|
|
563
|
+
async function yt(t, e, n, o, a, r, i) {
|
|
564
|
+
return await ht(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
565
|
body: a,
|
|
564
566
|
headers: Object.fromEntries(r.entries()),
|
|
565
567
|
method: n,
|
|
566
568
|
redirect: "manual",
|
|
567
|
-
signal: i != null && i.signal ?
|
|
568
|
-
}).then(
|
|
569
|
+
signal: i != null && i.signal ? ee(i.signal) : null
|
|
570
|
+
}).then(X);
|
|
569
571
|
}
|
|
570
|
-
async function
|
|
571
|
-
const r =
|
|
572
|
+
async function Ae(t, e, n, o, a) {
|
|
573
|
+
const r = Te(t, "token_endpoint", ke(e, a));
|
|
572
574
|
o.set("grant_type", n);
|
|
573
|
-
const i =
|
|
574
|
-
return i.set("accept", "application/json"),
|
|
575
|
+
const i = H(a == null ? void 0 : a.headers);
|
|
576
|
+
return i.set("accept", "application/json"), yt(t, e, "POST", r, o, i, a);
|
|
575
577
|
}
|
|
576
|
-
async function
|
|
578
|
+
async function bt(t, e, n, o) {
|
|
577
579
|
if (I(t), j(e), !w(n))
|
|
578
580
|
throw new TypeError('"refreshToken" must be a non-empty string');
|
|
579
581
|
const a = new URLSearchParams(o == null ? void 0 : o.additionalParameters);
|
|
580
|
-
return a.set("refresh_token", n),
|
|
582
|
+
return a.set("refresh_token", n), Ae(t, e, "refresh_token", a, o);
|
|
581
583
|
}
|
|
582
|
-
const
|
|
583
|
-
function
|
|
584
|
+
const Ee = /* @__PURE__ */ new WeakMap();
|
|
585
|
+
function _t(t) {
|
|
584
586
|
if (!t.id_token)
|
|
585
587
|
return;
|
|
586
|
-
const e =
|
|
588
|
+
const e = Ee.get(t);
|
|
587
589
|
if (!e)
|
|
588
590
|
throw new TypeError('"ref" was already garbage collected or did not resolve from the proper sources');
|
|
589
591
|
return e[0];
|
|
590
592
|
}
|
|
591
|
-
async function
|
|
592
|
-
if (I(t), j(e), !
|
|
593
|
+
async function Re(t, e, n, o = !1, a = !1) {
|
|
594
|
+
if (I(t), j(e), !Y(n, Response))
|
|
593
595
|
throw new TypeError('"response" must be an instance of Response');
|
|
594
596
|
if (n.status !== 200) {
|
|
595
597
|
let i;
|
|
596
|
-
if (i = await
|
|
598
|
+
if (i = await Lt(n))
|
|
597
599
|
return i;
|
|
598
600
|
throw new s('"response" is not a conform Token Endpoint response');
|
|
599
601
|
}
|
|
600
|
-
|
|
602
|
+
te(n);
|
|
601
603
|
let r;
|
|
602
604
|
try {
|
|
603
605
|
r = await n.json();
|
|
604
606
|
} catch (i) {
|
|
605
607
|
throw new s('failed to parse "response" body as JSON', { cause: i });
|
|
606
608
|
}
|
|
607
|
-
if (!
|
|
609
|
+
if (!x(r))
|
|
608
610
|
throw new s('"response" body must be a top level object');
|
|
609
611
|
if (!w(r.access_token))
|
|
610
612
|
throw new s('"response" body "access_token" property must be a non-empty string');
|
|
@@ -622,7 +624,7 @@ async function Ee(t, e, n, o = !1, a = !1) {
|
|
|
622
624
|
if (r.id_token !== void 0 && !w(r.id_token))
|
|
623
625
|
throw new s('"response" body "id_token" property must be a non-empty string');
|
|
624
626
|
if (r.id_token) {
|
|
625
|
-
const { claims: i, jwt: c } = await
|
|
627
|
+
const { claims: i, jwt: c } = await It(r.id_token, jt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Le, C(e), ve(e), e[Me]).then(Rt.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(Tt.bind(void 0, t.issuer)).then(St.bind(void 0, e.client_id));
|
|
626
628
|
if (Array.isArray(i.aud) && i.aud.length !== 1) {
|
|
627
629
|
if (i.azp === void 0)
|
|
628
630
|
throw new s('ID Token "aud" (audience) claim includes additional untrusted audiences');
|
|
@@ -631,15 +633,15 @@ async function Ee(t, e, n, o = !1, a = !1) {
|
|
|
631
633
|
}
|
|
632
634
|
if (i.auth_time !== void 0 && (!Number.isFinite(i.auth_time) || Math.sign(i.auth_time) !== 1))
|
|
633
635
|
throw new s('ID Token "auth_time" (authentication time) must be a positive number');
|
|
634
|
-
|
|
636
|
+
Ee.set(r, [i, c]);
|
|
635
637
|
}
|
|
636
638
|
}
|
|
637
639
|
return r;
|
|
638
640
|
}
|
|
639
|
-
async function
|
|
640
|
-
return
|
|
641
|
+
async function vt(t, e, n) {
|
|
642
|
+
return Re(t, e, n);
|
|
641
643
|
}
|
|
642
|
-
function
|
|
644
|
+
function St(t, e) {
|
|
643
645
|
if (Array.isArray(e.claims.aud)) {
|
|
644
646
|
if (!e.claims.aud.includes(t))
|
|
645
647
|
throw new s('unexpected JWT "aud" (audience) claim value');
|
|
@@ -647,17 +649,17 @@ function _t(t, e) {
|
|
|
647
649
|
throw new s('unexpected JWT "aud" (audience) claim value');
|
|
648
650
|
return e;
|
|
649
651
|
}
|
|
650
|
-
function
|
|
652
|
+
function Tt(t, e) {
|
|
651
653
|
if (e.claims.iss !== t)
|
|
652
654
|
throw new s('unexpected JWT "iss" (issuer) claim value');
|
|
653
655
|
return e;
|
|
654
656
|
}
|
|
655
|
-
const
|
|
656
|
-
function
|
|
657
|
-
return
|
|
657
|
+
const Pe = /* @__PURE__ */ new WeakSet();
|
|
658
|
+
function kt(t) {
|
|
659
|
+
return Pe.add(t), t;
|
|
658
660
|
}
|
|
659
|
-
async function
|
|
660
|
-
if (I(t), j(e), !
|
|
661
|
+
async function At(t, e, n, o, a, r) {
|
|
662
|
+
if (I(t), j(e), !Pe.has(n))
|
|
661
663
|
throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
|
|
662
664
|
if (!w(o))
|
|
663
665
|
throw new TypeError('"redirectUri" must be a non-empty string');
|
|
@@ -667,9 +669,9 @@ async function Tt(t, e, n, o, a, r) {
|
|
|
667
669
|
if (!i)
|
|
668
670
|
throw new s('no authorization code in "callbackParameters"');
|
|
669
671
|
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),
|
|
672
|
+
return c.set("redirect_uri", o), c.set("code_verifier", a), c.set("code", i), Ae(t, e, "authorization_code", c, r);
|
|
671
673
|
}
|
|
672
|
-
const
|
|
674
|
+
const Et = {
|
|
673
675
|
aud: "audience",
|
|
674
676
|
c_hash: "code hash",
|
|
675
677
|
client_id: "client id",
|
|
@@ -685,33 +687,33 @@ const kt = {
|
|
|
685
687
|
htu: "http uri",
|
|
686
688
|
cnf: "confirmation"
|
|
687
689
|
};
|
|
688
|
-
function
|
|
690
|
+
function Rt(t, e) {
|
|
689
691
|
for (const n of t)
|
|
690
692
|
if (e.claims[n] === void 0)
|
|
691
|
-
throw new s(`JWT "${n}" (${
|
|
693
|
+
throw new s(`JWT "${n}" (${Et[n]}) claim missing`);
|
|
692
694
|
return e;
|
|
693
695
|
}
|
|
694
|
-
const
|
|
695
|
-
async function
|
|
696
|
-
const r = await
|
|
697
|
-
if (
|
|
696
|
+
const Pt = Symbol(), B = Symbol();
|
|
697
|
+
async function Ut(t, e, n, o, a) {
|
|
698
|
+
const r = await Re(t, e, n);
|
|
699
|
+
if (Z(r))
|
|
698
700
|
return r;
|
|
699
701
|
if (!w(r.id_token))
|
|
700
702
|
throw new s('"response" body "id_token" property must be a non-empty string');
|
|
701
703
|
a ?? (a = e.default_max_age ?? B);
|
|
702
|
-
const i =
|
|
704
|
+
const i = _t(r);
|
|
703
705
|
if ((e.require_auth_time || a !== B) && i.auth_time === void 0)
|
|
704
706
|
throw new s('ID Token "auth_time" (authentication time) claim missing');
|
|
705
707
|
if (a !== B) {
|
|
706
708
|
if (typeof a != "number" || a < 0)
|
|
707
709
|
throw new TypeError('"maxAge" must be a non-negative number');
|
|
708
|
-
const c =
|
|
710
|
+
const c = F() + C(e), p = ve(e);
|
|
709
711
|
if (i.auth_time + a < c - p)
|
|
710
712
|
throw new s("too much time has elapsed since the last End-User authentication");
|
|
711
713
|
}
|
|
712
714
|
switch (o) {
|
|
713
715
|
case void 0:
|
|
714
|
-
case
|
|
716
|
+
case Pt:
|
|
715
717
|
if (i.nonce !== void 0)
|
|
716
718
|
throw new s('unexpected ID Token "nonce" claim value');
|
|
717
719
|
break;
|
|
@@ -725,26 +727,26 @@ async function Rt(t, e, n, o, a) {
|
|
|
725
727
|
}
|
|
726
728
|
return r;
|
|
727
729
|
}
|
|
728
|
-
function
|
|
730
|
+
function te(t) {
|
|
729
731
|
if (t.bodyUsed)
|
|
730
732
|
throw new TypeError('"response" body has been used already');
|
|
731
733
|
}
|
|
732
|
-
async function
|
|
734
|
+
async function Lt(t) {
|
|
733
735
|
if (t.status > 399 && t.status < 500) {
|
|
734
|
-
|
|
736
|
+
te(t);
|
|
735
737
|
try {
|
|
736
738
|
const e = await t.json();
|
|
737
|
-
if (
|
|
739
|
+
if (x(e) && typeof e.error == "string" && e.error.length)
|
|
738
740
|
return e.error_description !== void 0 && typeof e.error_description != "string" && delete e.error_description, e.error_uri !== void 0 && typeof e.error_uri != "string" && delete e.error_uri, e.algs !== void 0 && typeof e.algs != "string" && delete e.algs, e.scope !== void 0 && typeof e.scope != "string" && delete e.scope, e;
|
|
739
741
|
} catch {
|
|
740
742
|
}
|
|
741
743
|
}
|
|
742
744
|
}
|
|
743
|
-
function
|
|
745
|
+
function he(t) {
|
|
744
746
|
if (typeof t.modulusLength != "number" || t.modulusLength < 2048)
|
|
745
747
|
throw new s(`${t.name} modulusLength must be at least 2048 bits`);
|
|
746
748
|
}
|
|
747
|
-
function
|
|
749
|
+
function xt(t) {
|
|
748
750
|
switch (t) {
|
|
749
751
|
case "P-256":
|
|
750
752
|
return "SHA-256";
|
|
@@ -756,15 +758,15 @@ function Ut(t) {
|
|
|
756
758
|
throw new S();
|
|
757
759
|
}
|
|
758
760
|
}
|
|
759
|
-
function
|
|
761
|
+
function Ue(t) {
|
|
760
762
|
switch (t.algorithm.name) {
|
|
761
763
|
case "ECDSA":
|
|
762
764
|
return {
|
|
763
765
|
name: t.algorithm.name,
|
|
764
|
-
hash:
|
|
766
|
+
hash: xt(t.algorithm.namedCurve)
|
|
765
767
|
};
|
|
766
768
|
case "RSA-PSS":
|
|
767
|
-
switch (
|
|
769
|
+
switch (he(t.algorithm), t.algorithm.hash.name) {
|
|
768
770
|
case "SHA-256":
|
|
769
771
|
case "SHA-384":
|
|
770
772
|
case "SHA-512":
|
|
@@ -776,20 +778,20 @@ function Pe(t) {
|
|
|
776
778
|
throw new S();
|
|
777
779
|
}
|
|
778
780
|
case "RSASSA-PKCS1-v1_5":
|
|
779
|
-
return
|
|
781
|
+
return he(t.algorithm), t.algorithm.name;
|
|
780
782
|
case "Ed448":
|
|
781
783
|
case "Ed25519":
|
|
782
784
|
return t.algorithm.name;
|
|
783
785
|
}
|
|
784
786
|
throw new S();
|
|
785
787
|
}
|
|
786
|
-
const
|
|
788
|
+
const Le = Symbol();
|
|
787
789
|
async function Ct(t, e, n, o) {
|
|
788
790
|
const a = `${t}.${e}`;
|
|
789
|
-
if (!await crypto.subtle.verify(
|
|
791
|
+
if (!await crypto.subtle.verify(Ue(n), n, o, E(a)))
|
|
790
792
|
throw new s("JWT signature verification failed");
|
|
791
793
|
}
|
|
792
|
-
async function
|
|
794
|
+
async function It(t, e, n, o, a, r) {
|
|
793
795
|
let { 0: i, 1: c, 2: p, length: _ } = t.split(".");
|
|
794
796
|
if (_ === 5)
|
|
795
797
|
if (r !== void 0)
|
|
@@ -804,22 +806,22 @@ async function Lt(t, e, n, o, a, r) {
|
|
|
804
806
|
} catch (l) {
|
|
805
807
|
throw new s("failed to parse JWT Header body as base64url encoded JSON", { cause: l });
|
|
806
808
|
}
|
|
807
|
-
if (!
|
|
809
|
+
if (!x(f))
|
|
808
810
|
throw new s("JWT Header must be a top level object");
|
|
809
811
|
if (e(f), f.crit !== void 0)
|
|
810
812
|
throw new s('unexpected JWT "crit" header parameter');
|
|
811
813
|
const y = A(p);
|
|
812
814
|
let T;
|
|
813
|
-
n !==
|
|
815
|
+
n !== Le && (T = await n(f), await Ct(i, c, T, y));
|
|
814
816
|
let h;
|
|
815
817
|
try {
|
|
816
818
|
h = JSON.parse(E(A(c)));
|
|
817
819
|
} catch (l) {
|
|
818
820
|
throw new s("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
|
|
819
821
|
}
|
|
820
|
-
if (!
|
|
822
|
+
if (!x(h))
|
|
821
823
|
throw new s("JWT Payload must be a top level object");
|
|
822
|
-
const J =
|
|
824
|
+
const J = F() + o;
|
|
823
825
|
if (h.exp !== void 0) {
|
|
824
826
|
if (typeof h.exp != "number")
|
|
825
827
|
throw new s('unexpected JWT "exp" (expiration time) claim type');
|
|
@@ -840,7 +842,7 @@ async function Lt(t, e, n, o, a, r) {
|
|
|
840
842
|
throw new s('unexpected JWT "aud" (audience) claim type');
|
|
841
843
|
return { header: f, claims: h, signature: y, key: T, jwt: t };
|
|
842
844
|
}
|
|
843
|
-
function
|
|
845
|
+
function jt(t, e, n) {
|
|
844
846
|
if (t !== void 0) {
|
|
845
847
|
if (n.alg !== t)
|
|
846
848
|
throw new s('unexpected JWT "alg" header parameter');
|
|
@@ -860,8 +862,8 @@ function k(t, e) {
|
|
|
860
862
|
throw new s(`"${e}" parameter must be provided only once`);
|
|
861
863
|
return n;
|
|
862
864
|
}
|
|
863
|
-
const
|
|
864
|
-
function
|
|
865
|
+
const Jt = Symbol(), Ot = Symbol();
|
|
866
|
+
function zt(t, e, n, o) {
|
|
865
867
|
if (I(t), j(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
|
|
866
868
|
throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
|
|
867
869
|
if (k(n, "response"))
|
|
@@ -873,11 +875,11 @@ function Jt(t, e, n, o) {
|
|
|
873
875
|
throw new s('unexpected "iss" (issuer) response parameter value');
|
|
874
876
|
switch (o) {
|
|
875
877
|
case void 0:
|
|
876
|
-
case
|
|
878
|
+
case Ot:
|
|
877
879
|
if (r !== void 0)
|
|
878
880
|
throw new s('unexpected "state" response parameter encountered');
|
|
879
881
|
break;
|
|
880
|
-
case
|
|
882
|
+
case Jt:
|
|
881
883
|
break;
|
|
882
884
|
default:
|
|
883
885
|
if (!w(o))
|
|
@@ -897,9 +899,9 @@ function Jt(t, e, n, o) {
|
|
|
897
899
|
const c = k(n, "id_token"), p = k(n, "token");
|
|
898
900
|
if (c !== void 0 || p !== void 0)
|
|
899
901
|
throw new S("implicit and hybrid flows are not supported");
|
|
900
|
-
return
|
|
902
|
+
return kt(new URLSearchParams(n));
|
|
901
903
|
}
|
|
902
|
-
function
|
|
904
|
+
function Dt({
|
|
903
905
|
handleCallback: t
|
|
904
906
|
}) {
|
|
905
907
|
const e = De({
|
|
@@ -909,7 +911,7 @@ function Ot({
|
|
|
909
911
|
try {
|
|
910
912
|
return await t();
|
|
911
913
|
} catch (n) {
|
|
912
|
-
throw new
|
|
914
|
+
throw new Ke("Could not validate user", {
|
|
913
915
|
cause: n,
|
|
914
916
|
title: "Authentication Error",
|
|
915
917
|
developerHint: "Check the configuration of your authorization provider and ensure all settings such as the callback URL are configured correctly."
|
|
@@ -917,17 +919,17 @@ function Ot({
|
|
|
917
919
|
}
|
|
918
920
|
}
|
|
919
921
|
});
|
|
920
|
-
return /* @__PURE__ */
|
|
922
|
+
return /* @__PURE__ */ we.jsx(Ne, { to: e.data });
|
|
921
923
|
}
|
|
922
924
|
class P extends Error {
|
|
923
925
|
}
|
|
924
|
-
class
|
|
926
|
+
class fe extends P {
|
|
925
927
|
constructor(e, n, o) {
|
|
926
928
|
super(e, o), this.error = n;
|
|
927
929
|
}
|
|
928
930
|
}
|
|
929
|
-
const
|
|
930
|
-
class
|
|
931
|
+
const V = "code-verifier";
|
|
932
|
+
class Nt extends ze {
|
|
931
933
|
constructor(e, n) {
|
|
932
934
|
super(), this.callbackUrlPath = e, this.handleCallback = n;
|
|
933
935
|
}
|
|
@@ -936,12 +938,12 @@ class zt extends ze {
|
|
|
936
938
|
...super.getRoutes(),
|
|
937
939
|
{
|
|
938
940
|
path: this.callbackUrlPath,
|
|
939
|
-
element: /* @__PURE__ */
|
|
941
|
+
element: /* @__PURE__ */ we.jsx(Dt, { handleCallback: this.handleCallback })
|
|
940
942
|
}
|
|
941
943
|
];
|
|
942
944
|
}
|
|
943
945
|
}
|
|
944
|
-
class
|
|
946
|
+
class Kt {
|
|
945
947
|
constructor({
|
|
946
948
|
issuer: e,
|
|
947
949
|
audience: n,
|
|
@@ -961,7 +963,7 @@ class Dt {
|
|
|
961
963
|
b(this, "redirectToAfterSignOut");
|
|
962
964
|
b(this, "audience");
|
|
963
965
|
b(this, "signOut", async () => {
|
|
964
|
-
|
|
966
|
+
L.setState({
|
|
965
967
|
isAuthenticated: !1,
|
|
966
968
|
isPending: !1,
|
|
967
969
|
profile: void 0,
|
|
@@ -978,35 +980,35 @@ class Dt {
|
|
|
978
980
|
)) : o = n;
|
|
979
981
|
});
|
|
980
982
|
b(this, "handleCallback", async () => {
|
|
981
|
-
const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(
|
|
982
|
-
if (sessionStorage.removeItem(
|
|
983
|
+
const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(V);
|
|
984
|
+
if (sessionStorage.removeItem(V), !o)
|
|
983
985
|
throw new P("No code verifier found in state.");
|
|
984
|
-
const a = await this.getAuthServer(), r =
|
|
986
|
+
const a = await this.getAuthServer(), r = zt(
|
|
985
987
|
a,
|
|
986
988
|
this.client,
|
|
987
989
|
e.searchParams,
|
|
988
990
|
n ?? void 0
|
|
989
991
|
);
|
|
990
|
-
if (
|
|
991
|
-
throw
|
|
992
|
+
if (Z(r))
|
|
993
|
+
throw ae.error("Error validating OAuth response", r), new fe(
|
|
992
994
|
"Error validating OAuth response",
|
|
993
995
|
r
|
|
994
996
|
);
|
|
995
997
|
const i = new URL(e);
|
|
996
998
|
i.pathname = this.redirectToAfterSignIn, i.search = "";
|
|
997
|
-
const c = await
|
|
999
|
+
const c = await At(
|
|
998
1000
|
a,
|
|
999
1001
|
this.client,
|
|
1000
1002
|
r,
|
|
1001
1003
|
i.toString(),
|
|
1002
1004
|
o
|
|
1003
|
-
), p = await
|
|
1005
|
+
), p = await Ut(
|
|
1004
1006
|
a,
|
|
1005
1007
|
this.client,
|
|
1006
1008
|
c
|
|
1007
1009
|
);
|
|
1008
1010
|
this.setTokensFromResponse(p);
|
|
1009
|
-
const _ = await this.getAccessToken(), y = await (await
|
|
1011
|
+
const _ = await this.getAccessToken(), y = await (await mt(
|
|
1010
1012
|
a,
|
|
1011
1013
|
this.client,
|
|
1012
1014
|
_
|
|
@@ -1017,7 +1019,7 @@ class Dt {
|
|
|
1017
1019
|
emailVerified: y.email_verified ?? !1,
|
|
1018
1020
|
pictureUrl: y.picture
|
|
1019
1021
|
};
|
|
1020
|
-
|
|
1022
|
+
L.setState({
|
|
1021
1023
|
isAuthenticated: !0,
|
|
1022
1024
|
isPending: !1,
|
|
1023
1025
|
profile: T
|
|
@@ -1032,8 +1034,8 @@ class Dt {
|
|
|
1032
1034
|
}
|
|
1033
1035
|
async getAuthServer() {
|
|
1034
1036
|
if (!this.authorizationServer) {
|
|
1035
|
-
const e = new URL(this.issuer), n = await
|
|
1036
|
-
this.authorizationServer = await
|
|
1037
|
+
const e = new URL(this.issuer), n = await et(e);
|
|
1038
|
+
this.authorizationServer = await tt(
|
|
1037
1039
|
e,
|
|
1038
1040
|
n
|
|
1039
1041
|
);
|
|
@@ -1045,8 +1047,8 @@ class Dt {
|
|
|
1045
1047
|
* @param response
|
|
1046
1048
|
*/
|
|
1047
1049
|
setTokensFromResponse(e) {
|
|
1048
|
-
if (
|
|
1049
|
-
throw
|
|
1050
|
+
if (Z(e))
|
|
1051
|
+
throw ae.error("Bad Token Response", e), new fe("Bad Token Response", e);
|
|
1050
1052
|
if (!e.expires_in)
|
|
1051
1053
|
throw new P("No expires_in in response");
|
|
1052
1054
|
const n = {
|
|
@@ -1055,7 +1057,7 @@ class Dt {
|
|
|
1055
1057
|
expiresOn: new Date(Date.now() + e.expires_in * 1e3),
|
|
1056
1058
|
tokenType: e.token_type
|
|
1057
1059
|
};
|
|
1058
|
-
|
|
1060
|
+
L.setState({
|
|
1059
1061
|
providerData: n
|
|
1060
1062
|
});
|
|
1061
1063
|
}
|
|
@@ -1078,8 +1080,8 @@ class Dt {
|
|
|
1078
1080
|
const o = "S256", a = await this.getAuthServer();
|
|
1079
1081
|
if (!a.authorization_endpoint)
|
|
1080
1082
|
throw new P("No authorization endpoint");
|
|
1081
|
-
const r =
|
|
1082
|
-
sessionStorage.setItem(
|
|
1083
|
+
const r = nt(), i = await ot(r);
|
|
1084
|
+
sessionStorage.setItem(V, r);
|
|
1083
1085
|
const c = new URL(
|
|
1084
1086
|
a.authorization_endpoint
|
|
1085
1087
|
);
|
|
@@ -1092,29 +1094,29 @@ class Dt {
|
|
|
1092
1094
|
isSignIn: !n,
|
|
1093
1095
|
isSignUp: n
|
|
1094
1096
|
}), ((f = a.code_challenge_methods_supported) == null ? void 0 : f.includes("S256")) !== !0) {
|
|
1095
|
-
const y =
|
|
1097
|
+
const y = rt();
|
|
1096
1098
|
c.searchParams.set("state", y);
|
|
1097
1099
|
}
|
|
1098
1100
|
location.href = c.href;
|
|
1099
1101
|
}
|
|
1100
1102
|
async getAccessToken() {
|
|
1101
|
-
const e = await this.getAuthServer(), { providerData: n } =
|
|
1103
|
+
const e = await this.getAuthServer(), { providerData: n } = L.getState();
|
|
1102
1104
|
if (!n)
|
|
1103
1105
|
throw new P("User is not authenticated");
|
|
1104
1106
|
const o = n;
|
|
1105
1107
|
if (new Date(o.expiresOn) < /* @__PURE__ */ new Date()) {
|
|
1106
1108
|
if (!o.refreshToken)
|
|
1107
|
-
return
|
|
1109
|
+
return L.setState({
|
|
1108
1110
|
isAuthenticated: !1,
|
|
1109
1111
|
isPending: !1,
|
|
1110
1112
|
profile: null,
|
|
1111
1113
|
providerData: null
|
|
1112
1114
|
}), "";
|
|
1113
|
-
const a = await
|
|
1115
|
+
const a = await bt(
|
|
1114
1116
|
e,
|
|
1115
1117
|
this.client,
|
|
1116
1118
|
o.refreshToken
|
|
1117
|
-
), r = await
|
|
1119
|
+
), r = await vt(
|
|
1118
1120
|
e,
|
|
1119
1121
|
this.client,
|
|
1120
1122
|
a
|
|
@@ -1126,12 +1128,12 @@ class Dt {
|
|
|
1126
1128
|
return o.accessToken;
|
|
1127
1129
|
}
|
|
1128
1130
|
getAuthenticationPlugin() {
|
|
1129
|
-
return new
|
|
1131
|
+
return new Nt(this.callbackUrlPath, this.handleCallback);
|
|
1130
1132
|
}
|
|
1131
1133
|
}
|
|
1132
|
-
const
|
|
1134
|
+
const Gt = (t) => new Kt(t);
|
|
1133
1135
|
export {
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
+
Kt as OpenIDAuthenticationProvider,
|
|
1137
|
+
Gt as default
|
|
1136
1138
|
};
|
|
1137
1139
|
//# sourceMappingURL=zudoku.auth-openid.js.map
|