zudoku 0.0.0-f9d5b02 → 0.0.0-fabd0c1

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.
Files changed (580) hide show
  1. package/client.d.ts +7 -0
  2. package/dist/app/demo.js +1 -1
  3. package/dist/app/demo.js.map +1 -1
  4. package/dist/app/entry.client.d.ts +1 -0
  5. package/dist/app/entry.client.js +14 -1
  6. package/dist/app/entry.client.js.map +1 -1
  7. package/dist/app/entry.server.d.ts +1 -0
  8. package/dist/app/entry.server.js +2 -2
  9. package/dist/app/entry.server.js.map +1 -1
  10. package/dist/app/main.d.ts +1 -1
  11. package/dist/app/main.js +2 -1
  12. package/dist/app/main.js.map +1 -1
  13. package/dist/app/sentry.d.ts +3 -0
  14. package/dist/app/sentry.js +19 -0
  15. package/dist/app/sentry.js.map +1 -0
  16. package/dist/app/standalone.js +1 -1
  17. package/dist/app/standalone.js.map +1 -1
  18. package/dist/app/tailwind.d.ts +2 -1
  19. package/dist/app/tailwind.js +64 -52
  20. package/dist/app/tailwind.js.map +1 -1
  21. package/dist/cli/cli.js +0 -2
  22. package/dist/cli/cli.js.map +1 -1
  23. package/dist/cli/cmds/build.js +1 -0
  24. package/dist/cli/cmds/build.js.map +1 -1
  25. package/dist/cli/common/logger.js +9 -0
  26. package/dist/cli/common/logger.js.map +1 -1
  27. package/dist/cli/common/outdated.js +2 -1
  28. package/dist/cli/common/outdated.js.map +1 -1
  29. package/dist/config/common.d.ts +8 -0
  30. package/dist/config/common.js +2 -0
  31. package/dist/config/common.js.map +1 -0
  32. package/dist/config/config.d.ts +3 -2
  33. package/dist/config/loader.d.ts +20 -0
  34. package/dist/config/loader.js +154 -0
  35. package/dist/config/loader.js.map +1 -0
  36. package/dist/config/validators/InputSidebarSchema.d.ts +14 -13
  37. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  38. package/dist/config/validators/common.d.ts +4945 -0
  39. package/dist/config/validators/common.js +280 -0
  40. package/dist/config/validators/common.js.map +1 -0
  41. package/dist/config/validators/icon-types.d.ts +1 -0
  42. package/dist/config/validators/icon-types.js +2 -0
  43. package/dist/config/validators/icon-types.js.map +1 -0
  44. package/dist/config/validators/validate.d.ts +800 -530
  45. package/dist/config/validators/validate.js +9 -228
  46. package/dist/config/validators/validate.js.map +1 -1
  47. package/dist/lib/authentication/AuthenticationPlugin.d.ts +4 -2
  48. package/dist/lib/authentication/AuthenticationPlugin.js +3 -0
  49. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
  50. package/dist/lib/authentication/authentication.d.ts +1 -1
  51. package/dist/lib/authentication/components/CallbackHandler.js +1 -1
  52. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  53. package/dist/lib/authentication/components/SignIn.js +1 -1
  54. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  55. package/dist/lib/authentication/components/SignOut.js +1 -1
  56. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  57. package/dist/lib/authentication/hook.d.ts +5 -4
  58. package/dist/lib/authentication/hook.js +1 -3
  59. package/dist/lib/authentication/hook.js.map +1 -1
  60. package/dist/lib/authentication/providers/auth0.js +2 -2
  61. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  62. package/dist/lib/authentication/providers/openid.d.ts +7 -1
  63. package/dist/lib/authentication/providers/openid.js +18 -27
  64. package/dist/lib/authentication/providers/openid.js.map +1 -1
  65. package/dist/lib/authentication/state.d.ts +25 -4
  66. package/dist/lib/authentication/state.js +28 -5
  67. package/dist/lib/authentication/state.js.map +1 -1
  68. package/dist/lib/components/AnchorLink.d.ts +1 -1
  69. package/dist/lib/components/AnchorLink.js +1 -1
  70. package/dist/lib/components/AnchorLink.js.map +1 -1
  71. package/dist/lib/components/Bootstrap.d.ts +1 -2
  72. package/dist/lib/components/Bootstrap.js +11 -7
  73. package/dist/lib/components/Bootstrap.js.map +1 -1
  74. package/dist/lib/components/Header.js +14 -6
  75. package/dist/lib/components/Header.js.map +1 -1
  76. package/dist/lib/components/Heading.d.ts +4 -4
  77. package/dist/lib/components/Heading.js +1 -1
  78. package/dist/lib/components/Heading.js.map +1 -1
  79. package/dist/lib/components/Layout.js +14 -5
  80. package/dist/lib/components/Layout.js.map +1 -1
  81. package/dist/lib/components/Markdown.js +1 -1
  82. package/dist/lib/components/Markdown.js.map +1 -1
  83. package/dist/lib/components/MobileTopNavigation.js +5 -7
  84. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  85. package/dist/lib/components/NotFoundPage.js +1 -1
  86. package/dist/lib/components/NotFoundPage.js.map +1 -1
  87. package/dist/lib/components/ReactMarkdown.d.ts +29 -0
  88. package/dist/lib/components/ReactMarkdown.js +182 -0
  89. package/dist/lib/components/ReactMarkdown.js.map +1 -0
  90. package/dist/lib/components/Search.d.ts +3 -1
  91. package/dist/lib/components/Search.js +3 -3
  92. package/dist/lib/components/Search.js.map +1 -1
  93. package/dist/lib/components/SlotletProvider.d.ts +2 -2
  94. package/dist/lib/components/SyntaxHighlight.js +2 -6
  95. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  96. package/dist/lib/components/ThemeSwitch.js +5 -3
  97. package/dist/lib/components/ThemeSwitch.js.map +1 -1
  98. package/dist/lib/components/TopNavigation.d.ts +2 -0
  99. package/dist/lib/components/TopNavigation.js +13 -7
  100. package/dist/lib/components/TopNavigation.js.map +1 -1
  101. package/dist/lib/components/Zudoku.js +1 -1
  102. package/dist/lib/components/Zudoku.js.map +1 -1
  103. package/dist/lib/components/context/ZudokuContext.js +1 -1
  104. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  105. package/dist/lib/components/index.d.ts +15 -5
  106. package/dist/lib/components/index.js +1 -1
  107. package/dist/lib/components/index.js.map +1 -1
  108. package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
  109. package/dist/lib/components/navigation/Sidebar.js +2 -2
  110. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  111. package/dist/lib/components/navigation/SidebarBadge.d.ts +0 -9
  112. package/dist/lib/components/navigation/SidebarBadge.js +0 -9
  113. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
  114. package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
  115. package/dist/lib/components/navigation/SidebarCategory.js +4 -5
  116. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  117. package/dist/lib/components/navigation/SidebarItem.d.ts +2 -4
  118. package/dist/lib/components/navigation/SidebarItem.js +6 -11
  119. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  120. package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
  121. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  122. package/dist/lib/components/navigation/utils.js +1 -1
  123. package/dist/lib/components/navigation/utils.js.map +1 -1
  124. package/dist/lib/core/ZudokuContext.d.ts +1 -1
  125. package/dist/lib/core/plugins.d.ts +5 -1
  126. package/dist/lib/core/plugins.js.map +1 -1
  127. package/dist/lib/errors/RouterError.js +1 -1
  128. package/dist/lib/errors/RouterError.js.map +1 -1
  129. package/dist/lib/oas/graphql/index.js +4 -1
  130. package/dist/lib/oas/graphql/index.js.map +1 -1
  131. package/dist/lib/oas/parser/upgrade/index.d.ts +2 -2
  132. package/dist/lib/oas/parser/upgrade/index.js +3 -20
  133. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  134. package/dist/lib/plugins/api-catalog/Catalog.d.ts +2 -0
  135. package/dist/lib/plugins/api-catalog/Catalog.js +36 -0
  136. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
  137. package/dist/lib/plugins/api-catalog/index.d.ts +30 -0
  138. package/dist/lib/plugins/api-catalog/index.js +15 -0
  139. package/dist/lib/plugins/api-catalog/index.js.map +1 -0
  140. package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
  141. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  142. package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
  143. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
  144. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +1 -1
  145. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  146. package/dist/lib/plugins/api-keys/index.js +3 -0
  147. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  148. package/dist/lib/plugins/markdown/MdxPage.d.ts +9 -1
  149. package/dist/lib/plugins/markdown/MdxPage.js +16 -3
  150. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  151. package/dist/lib/plugins/markdown/index.d.ts +3 -1
  152. package/dist/lib/plugins/markdown/index.js +1 -1
  153. package/dist/lib/plugins/markdown/index.js.map +1 -1
  154. package/dist/lib/plugins/markdown/resolver.js.map +1 -1
  155. package/dist/lib/plugins/openapi/ColorizedParam.js +2 -2
  156. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  157. package/dist/lib/plugins/openapi/OperationList.js +24 -3
  158. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  159. package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
  160. package/dist/lib/plugins/openapi/OperationListItem.js +14 -4
  161. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  162. package/dist/lib/plugins/openapi/Route.d.ts +4 -2
  163. package/dist/lib/plugins/openapi/Route.js +25 -2
  164. package/dist/lib/plugins/openapi/Route.js.map +1 -1
  165. package/dist/lib/plugins/openapi/Sidecar.js +3 -13
  166. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  167. package/dist/lib/plugins/openapi/client/GraphQLClient.js +12 -0
  168. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
  169. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +1 -1
  170. package/dist/lib/plugins/openapi/client/useCreateQuery.js +4 -2
  171. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  172. package/dist/lib/plugins/openapi/context.d.ts +3 -3
  173. package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
  174. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  175. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  176. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +2 -0
  177. package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
  178. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  179. package/dist/lib/plugins/openapi/index.js +13 -13
  180. package/dist/lib/plugins/openapi/index.js.map +1 -1
  181. package/dist/lib/plugins/openapi/interfaces.d.ts +20 -1
  182. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
  183. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  184. package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +6 -0
  185. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +14 -0
  186. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -0
  187. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.d.ts +1 -0
  188. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +125 -0
  189. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -0
  190. package/dist/lib/plugins/openapi/post-processors/removePaths.d.ts +11 -0
  191. package/dist/lib/plugins/openapi/post-processors/removePaths.js +33 -0
  192. package/dist/lib/plugins/openapi/post-processors/removePaths.js.map +1 -0
  193. package/dist/lib/plugins/openapi/post-processors/removePaths.test.d.ts +1 -0
  194. package/dist/lib/plugins/openapi/post-processors/removePaths.test.js +104 -0
  195. package/dist/lib/plugins/openapi/post-processors/removePaths.test.js.map +1 -0
  196. package/dist/lib/plugins/openapi/post-processors/traverse.d.ts +1 -0
  197. package/dist/lib/plugins/openapi/post-processors/traverse.js +2 -0
  198. package/dist/lib/plugins/openapi/post-processors/traverse.js.map +1 -0
  199. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  200. package/dist/lib/plugins/openapi/util/methodToColor.d.ts +20 -0
  201. package/dist/lib/plugins/openapi/util/methodToColor.js +24 -0
  202. package/dist/lib/plugins/openapi/util/methodToColor.js.map +1 -0
  203. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.d.ts +1 -0
  204. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js +27 -0
  205. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js.map +1 -0
  206. package/dist/lib/plugins/redirect/index.d.ts +1 -1
  207. package/dist/lib/plugins/redirect/index.js +1 -1
  208. package/dist/lib/plugins/redirect/index.js.map +1 -1
  209. package/dist/lib/plugins/search-inkeep/index.d.ts +22 -3
  210. package/dist/lib/plugins/search-inkeep/index.js +41 -5
  211. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  212. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +3 -4
  213. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
  214. package/dist/lib/ui/Button.d.ts +1 -1
  215. package/dist/lib/ui/Command.d.ts +1 -1
  216. package/dist/lib/util/MdxComponents.d.ts +18 -19
  217. package/dist/lib/util/MdxComponents.js +1 -3
  218. package/dist/lib/util/MdxComponents.js.map +1 -1
  219. package/dist/lib/util/createVariantComponent.d.ts +2 -2
  220. package/dist/lib/util/traverse.d.ts +2 -0
  221. package/dist/lib/util/traverse.js +18 -0
  222. package/dist/lib/util/traverse.js.map +1 -0
  223. package/dist/lib/util/useExposedProps.js +1 -1
  224. package/dist/lib/util/useExposedProps.js.map +1 -1
  225. package/dist/lib/util/useOnScreen.d.ts +1 -1
  226. package/dist/lib/util/useScrollToAnchor.js +1 -1
  227. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  228. package/dist/lib/util/useScrollToTop.js +1 -1
  229. package/dist/lib/util/useScrollToTop.js.map +1 -1
  230. package/dist/vite/build.js +15 -3
  231. package/dist/vite/build.js.map +1 -1
  232. package/dist/vite/config.d.ts +6 -4
  233. package/dist/vite/config.js +70 -23
  234. package/dist/vite/config.js.map +1 -1
  235. package/dist/vite/config.test.js +7 -5
  236. package/dist/vite/config.test.js.map +1 -1
  237. package/dist/vite/css/collect.d.ts +2 -0
  238. package/dist/vite/css/collect.js +27 -0
  239. package/dist/vite/css/collect.js.map +1 -0
  240. package/dist/vite/css/plugin.d.ts +5 -0
  241. package/dist/vite/css/plugin.js +79 -0
  242. package/dist/vite/css/plugin.js.map +1 -0
  243. package/dist/vite/dev-server.js +19 -6
  244. package/dist/vite/dev-server.js.map +1 -1
  245. package/dist/vite/output.d.ts +1 -1
  246. package/dist/vite/output.js +39 -10
  247. package/dist/vite/output.js.map +1 -1
  248. package/dist/vite/plugin-api.js +93 -20
  249. package/dist/vite/plugin-api.js.map +1 -1
  250. package/dist/vite/plugin-component.js +15 -19
  251. package/dist/vite/plugin-component.js.map +1 -1
  252. package/dist/vite/plugin-config-reload.d.ts +1 -2
  253. package/dist/vite/plugin-config-reload.js.map +1 -1
  254. package/dist/vite/plugin-config.js +20 -0
  255. package/dist/vite/plugin-config.js.map +1 -1
  256. package/dist/vite/plugin-docs.test.js +15 -23
  257. package/dist/vite/plugin-docs.test.js.map +1 -1
  258. package/dist/vite/plugin-mdx.js +60 -4
  259. package/dist/vite/plugin-mdx.js.map +1 -1
  260. package/dist/vite/{plugin-custom-css.d.ts → plugin-theme-css.d.ts} +2 -2
  261. package/dist/vite/{plugin-custom-css.js → plugin-theme-css.js} +10 -3
  262. package/dist/vite/plugin-theme-css.js.map +1 -0
  263. package/dist/vite/plugin.d.ts +1 -2
  264. package/dist/vite/plugin.js +6 -2
  265. package/dist/vite/plugin.js.map +1 -1
  266. package/dist/vite/prerender.d.ts +2 -1
  267. package/dist/vite/prerender.js +2 -2
  268. package/dist/vite/prerender.js.map +1 -1
  269. package/dist/vite/remarkStaticGeneration.js +5 -5
  270. package/dist/vite/remarkStaticGeneration.js.map +1 -1
  271. package/dist/vite/sitemap.d.ts +1 -1
  272. package/dist/zuplo/env.d.ts +6 -0
  273. package/dist/zuplo/env.js +9 -0
  274. package/dist/zuplo/env.js.map +1 -0
  275. package/dist/zuplo/with-zuplo.d.ts +3 -0
  276. package/dist/zuplo/with-zuplo.js +28 -0
  277. package/dist/zuplo/with-zuplo.js.map +1 -0
  278. package/lib/AnchorLink-DFZZbmvr.js +34 -0
  279. package/lib/AnchorLink-DFZZbmvr.js.map +1 -0
  280. package/lib/{AuthenticationPlugin-DeGDVa1r.js → AuthenticationPlugin-fB7viE7A.js} +23 -21
  281. package/lib/AuthenticationPlugin-fB7viE7A.js.map +1 -0
  282. package/lib/{Button-jK0EsymC.js → Button-DeAoTouo.js} +4 -4
  283. package/lib/{Button-jK0EsymC.js.map → Button-DeAoTouo.js.map} +1 -1
  284. package/lib/{CategoryHeading-Bb9dqxD3.js → CategoryHeading-CBconmtI.js} +3 -3
  285. package/lib/{CategoryHeading-Bb9dqxD3.js.map → CategoryHeading-CBconmtI.js.map} +1 -1
  286. package/lib/ClientOnly-E7hGysn1.js.map +1 -1
  287. package/lib/{Dialog-k70Qfukb.js → Dialog-Bxv1yEIg.js} +3 -3
  288. package/lib/{Dialog-k70Qfukb.js.map → Dialog-Bxv1yEIg.js.map} +1 -1
  289. package/lib/{Markdown-BorQdbxW.js → Markdown-CZDLNOFc.js} +13227 -13217
  290. package/lib/Markdown-CZDLNOFc.js.map +1 -0
  291. package/lib/MdxPage-CPBw4_lf.js +188 -0
  292. package/lib/MdxPage-CPBw4_lf.js.map +1 -0
  293. package/lib/OperationList-n4U_BHmO.js +5062 -0
  294. package/lib/OperationList-n4U_BHmO.js.map +1 -0
  295. package/lib/Route-C8nwd9A2.js +37 -0
  296. package/lib/Route-C8nwd9A2.js.map +1 -0
  297. package/lib/{Select-DP74t8Yy.js → Select-D3XuKKuH.js} +5 -5
  298. package/lib/{Select-DP74t8Yy.js.map → Select-D3XuKKuH.js.map} +1 -1
  299. package/lib/SlotletProvider-pfc9oejW.js +221 -0
  300. package/lib/SlotletProvider-pfc9oejW.js.map +1 -0
  301. package/lib/{Spinner-3cQDBVGr.js → Spinner-DuxJLLNE.js} +2 -2
  302. package/lib/{Spinner-3cQDBVGr.js.map → Spinner-DuxJLLNE.js.map} +1 -1
  303. package/lib/StaggeredRender-DgsamH_G.js +17 -0
  304. package/lib/StaggeredRender-DgsamH_G.js.map +1 -0
  305. package/lib/{SyntaxHighlight-CBmwwKoM.js → SyntaxHighlight-Bz-lOJtH.js} +9 -13
  306. package/lib/{SyntaxHighlight-CBmwwKoM.js.map → SyntaxHighlight-Bz-lOJtH.js.map} +1 -1
  307. package/lib/assets/{index-B_Jk_Yzp.js → index-C7jnHK4b.js} +218 -197
  308. package/lib/assets/index-C7jnHK4b.js.map +1 -0
  309. package/lib/assets/{worker-CPsGZsve.js → worker-D2kRl-cG.js} +5326 -4949
  310. package/lib/assets/worker-D2kRl-cG.js.map +1 -0
  311. package/lib/chunk-D52XG6IA-Dl7HLe6j.js +1823 -0
  312. package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +1 -0
  313. package/lib/{cn-BmFQLtkS.js → cn-qaFjX9_3.js} +2 -2
  314. package/lib/cn-qaFjX9_3.js.map +1 -0
  315. package/lib/{context-D1nXWxm7.js → context-h_UkBLvr.js} +2 -2
  316. package/lib/context-h_UkBLvr.js.map +1 -0
  317. package/lib/{createServer-DK-g7kbB.js → createServer-69sLlmQA.js} +5350 -5760
  318. package/lib/createServer-69sLlmQA.js.map +1 -0
  319. package/lib/{hook-Diu0rqp-.js → hook-DgGeo5iL.js} +12 -14
  320. package/lib/{hook-Diu0rqp-.js.map → hook-DgGeo5iL.js.map} +1 -1
  321. package/lib/{index-CkwDvuPt.js → index-CBXSgjaE.js} +259 -238
  322. package/lib/index-CBXSgjaE.js.map +1 -0
  323. package/lib/index-CPNSgwSb.js +36 -0
  324. package/lib/index-CPNSgwSb.js.map +1 -0
  325. package/lib/index-DStSNvP-.js +1284 -0
  326. package/lib/index-DStSNvP-.js.map +1 -0
  327. package/lib/index-LNp6rxyU.js.map +1 -1
  328. package/lib/index.esm-BSV1C092.js +692 -0
  329. package/lib/index.esm-BSV1C092.js.map +1 -0
  330. package/lib/index.esm-BnnBRKJX.js +1214 -0
  331. package/lib/index.esm-BnnBRKJX.js.map +1 -0
  332. package/lib/invariant-Caa8-XvF.js.map +1 -1
  333. package/lib/jsx-runtime-Dx-03ztt.js +446 -0
  334. package/lib/jsx-runtime-Dx-03ztt.js.map +1 -0
  335. package/lib/object_hash-BNWPnMN9.js +787 -0
  336. package/lib/object_hash-BNWPnMN9.js.map +1 -0
  337. package/lib/post-processors/removeExtensions.js +11 -0
  338. package/lib/post-processors/removeExtensions.js.map +1 -0
  339. package/lib/post-processors/removePaths.js +28 -0
  340. package/lib/post-processors/removePaths.js.map +1 -0
  341. package/lib/post-processors/traverse.js +12 -0
  342. package/lib/post-processors/traverse.js.map +1 -0
  343. package/lib/prism-csharp.min-DUwvItt4.js +63 -0
  344. package/lib/{prism-csharp.min-Yizuc34Y.js.map → prism-csharp.min-DUwvItt4.js.map} +1 -1
  345. package/lib/prism-java.min-BtgBR4yd.js +35 -0
  346. package/lib/{prism-java.min-d5iT_mOd.js.map → prism-java.min-BtgBR4yd.js.map} +1 -1
  347. package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
  348. package/lib/prism-ruby.min-DeDXCp1r.js +38 -0
  349. package/lib/{prism-ruby.min-C7LwcKyz.js.map → prism-ruby.min-DeDXCp1r.js.map} +1 -1
  350. package/lib/prism-typescript.min-CD7H2IYQ.js +34 -0
  351. package/lib/{prism-typescript.min-oSVeWCAd.js.map → prism-typescript.min-CD7H2IYQ.js.map} +1 -1
  352. package/lib/state-CFQsUZUP.js +202 -0
  353. package/lib/state-CFQsUZUP.js.map +1 -0
  354. package/lib/ui/Accordion.js +2 -2
  355. package/lib/ui/Accordion.js.map +1 -1
  356. package/lib/ui/ActionButton.js +4 -4
  357. package/lib/ui/ActionButton.js.map +1 -1
  358. package/lib/ui/Alert.js +3 -3
  359. package/lib/ui/Alert.js.map +1 -1
  360. package/lib/ui/AlertDialog.js +2 -2
  361. package/lib/ui/AlertDialog.js.map +1 -1
  362. package/lib/ui/Badge.js +3 -3
  363. package/lib/ui/Badge.js.map +1 -1
  364. package/lib/ui/Breadcrumb.js +2 -2
  365. package/lib/ui/Breadcrumb.js.map +1 -1
  366. package/lib/ui/Button.js +3 -3
  367. package/lib/ui/Button.js.map +1 -1
  368. package/lib/ui/Callout.js +2 -2
  369. package/lib/ui/Callout.js.map +1 -1
  370. package/lib/ui/Card.js +2 -2
  371. package/lib/ui/Card.js.map +1 -1
  372. package/lib/ui/Carousel.js +407 -401
  373. package/lib/ui/Carousel.js.map +1 -1
  374. package/lib/ui/Checkbox.js +2 -2
  375. package/lib/ui/Checkbox.js.map +1 -1
  376. package/lib/ui/Command.js +111 -108
  377. package/lib/ui/Command.js.map +1 -1
  378. package/lib/ui/Dialog.js +2 -2
  379. package/lib/ui/Dialog.js.map +1 -1
  380. package/lib/ui/Drawer.js +81 -81
  381. package/lib/ui/Drawer.js.map +1 -1
  382. package/lib/ui/DropdownMenu.js +2 -2
  383. package/lib/ui/DropdownMenu.js.map +1 -1
  384. package/lib/ui/Form.js +3 -3
  385. package/lib/ui/Form.js.map +1 -1
  386. package/lib/ui/HoverCard.js +2 -2
  387. package/lib/ui/Input.js +2 -2
  388. package/lib/ui/Input.js.map +1 -1
  389. package/lib/ui/Label.js +3 -3
  390. package/lib/ui/Pagination.js +2 -2
  391. package/lib/ui/Pagination.js.map +1 -1
  392. package/lib/ui/Popover.js +2 -2
  393. package/lib/ui/Popover.js.map +1 -1
  394. package/lib/ui/Progress.js +2 -2
  395. package/lib/ui/Progress.js.map +1 -1
  396. package/lib/ui/RadioGroup.js +2 -2
  397. package/lib/ui/RadioGroup.js.map +1 -1
  398. package/lib/ui/ScrollArea.js +2 -2
  399. package/lib/ui/ScrollArea.js.map +1 -1
  400. package/lib/ui/Select.js +2 -2
  401. package/lib/ui/Select.js.map +1 -1
  402. package/lib/ui/Skeleton.js +2 -2
  403. package/lib/ui/Skeleton.js.map +1 -1
  404. package/lib/ui/Slider.js +2 -2
  405. package/lib/ui/Switch.js +2 -2
  406. package/lib/ui/Switch.js.map +1 -1
  407. package/lib/ui/Tabs.js +2 -2
  408. package/lib/ui/Textarea.js +2 -2
  409. package/lib/ui/Textarea.js.map +1 -1
  410. package/lib/ui/Toggle.js +3 -3
  411. package/lib/ui/Toggle.js.map +1 -1
  412. package/lib/ui/ToggleGroup.js +2 -2
  413. package/lib/ui/ToggleGroup.js.map +1 -1
  414. package/lib/ui/Tooltip.js +2 -2
  415. package/lib/useExposedProps-DE9lR6MF.js +9 -0
  416. package/lib/useExposedProps-DE9lR6MF.js.map +1 -0
  417. package/lib/{utils-DcpDOncX.js → utils-B4O1uet5.js} +35 -36
  418. package/lib/{utils-DcpDOncX.js.map → utils-B4O1uet5.js.map} +1 -1
  419. package/lib/zudoku.auth-auth0.js +9 -8
  420. package/lib/zudoku.auth-auth0.js.map +1 -1
  421. package/lib/zudoku.auth-clerk.js +2 -2
  422. package/lib/zudoku.auth-clerk.js.map +1 -1
  423. package/lib/zudoku.auth-openid.js +365 -371
  424. package/lib/zudoku.auth-openid.js.map +1 -1
  425. package/lib/zudoku.components.js +814 -967
  426. package/lib/zudoku.components.js.map +1 -1
  427. package/lib/zudoku.openapi-worker.js +1 -1
  428. package/lib/zudoku.openapi-worker.js.map +1 -1
  429. package/lib/zudoku.plugin-api-catalog.js +123 -0
  430. package/lib/zudoku.plugin-api-catalog.js.map +1 -0
  431. package/lib/zudoku.plugin-api-keys.js +40 -39
  432. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  433. package/lib/zudoku.plugin-custom-pages.js +4 -4
  434. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  435. package/lib/zudoku.plugin-markdown.js +16 -15
  436. package/lib/zudoku.plugin-markdown.js.map +1 -1
  437. package/lib/zudoku.plugin-openapi.js +5 -5
  438. package/lib/zudoku.plugin-redirect.js +1 -1
  439. package/lib/zudoku.plugin-redirect.js.map +1 -1
  440. package/lib/zudoku.plugin-search-inkeep.js +53 -24
  441. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  442. package/package.json +74 -51
  443. package/src/app/demo.tsx +1 -1
  444. package/src/app/entry.client.tsx +16 -1
  445. package/src/app/entry.server.tsx +3 -2
  446. package/src/app/main.tsx +6 -2
  447. package/src/app/sentry.ts +24 -0
  448. package/src/app/standalone.tsx +1 -1
  449. package/src/app/tailwind.ts +67 -52
  450. package/src/lib/authentication/AuthenticationPlugin.tsx +4 -1
  451. package/src/lib/authentication/authentication.ts +1 -1
  452. package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
  453. package/src/lib/authentication/components/SignIn.tsx +1 -1
  454. package/src/lib/authentication/components/SignOut.tsx +1 -1
  455. package/src/lib/authentication/hook.ts +1 -3
  456. package/src/lib/authentication/providers/auth0.tsx +3 -2
  457. package/src/lib/authentication/providers/openid.tsx +22 -33
  458. package/src/lib/authentication/state.ts +44 -10
  459. package/src/lib/components/AnchorLink.tsx +1 -1
  460. package/src/lib/components/Bootstrap.tsx +25 -20
  461. package/src/lib/components/Header.tsx +44 -11
  462. package/src/lib/components/Heading.tsx +13 -13
  463. package/src/lib/components/Layout.tsx +55 -38
  464. package/src/lib/components/Markdown.tsx +1 -1
  465. package/src/lib/components/MobileTopNavigation.tsx +26 -33
  466. package/src/lib/components/NotFoundPage.tsx +1 -1
  467. package/src/lib/components/ReactMarkdown.license.txt +21 -0
  468. package/src/lib/components/ReactMarkdown.tsx +264 -0
  469. package/src/lib/components/Search.tsx +3 -3
  470. package/src/lib/components/SlotletProvider.tsx +1 -1
  471. package/src/lib/components/SyntaxHighlight.tsx +3 -6
  472. package/src/lib/components/ThemeSwitch.tsx +6 -4
  473. package/src/lib/components/TopNavigation.tsx +26 -18
  474. package/src/lib/components/Zudoku.tsx +1 -1
  475. package/src/lib/components/context/ZudokuContext.ts +1 -1
  476. package/src/lib/components/index.ts +1 -1
  477. package/src/lib/components/navigation/Sidebar.tsx +18 -8
  478. package/src/lib/components/navigation/SidebarBadge.tsx +0 -10
  479. package/src/lib/components/navigation/SidebarCategory.tsx +11 -10
  480. package/src/lib/components/navigation/SidebarItem.tsx +11 -14
  481. package/src/lib/components/navigation/SidebarWrapper.tsx +1 -1
  482. package/src/lib/components/navigation/utils.ts +1 -1
  483. package/src/lib/core/ZudokuContext.ts +1 -1
  484. package/src/lib/core/plugins.ts +5 -1
  485. package/src/lib/errors/RouterError.tsx +1 -1
  486. package/src/lib/oas/graphql/index.ts +4 -1
  487. package/src/lib/oas/parser/upgrade/index.ts +4 -27
  488. package/src/lib/plugins/api-catalog/Catalog.tsx +123 -0
  489. package/src/lib/plugins/api-catalog/index.tsx +64 -0
  490. package/src/lib/plugins/api-keys/CreateApiKey.tsx +1 -1
  491. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
  492. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
  493. package/src/lib/plugins/api-keys/index.tsx +4 -1
  494. package/src/lib/plugins/custom-pages/index.tsx +1 -1
  495. package/src/lib/plugins/markdown/MdxPage.tsx +28 -2
  496. package/src/lib/plugins/markdown/index.tsx +5 -2
  497. package/src/lib/plugins/markdown/resolver.ts +2 -4
  498. package/src/lib/plugins/openapi/ColorizedParam.tsx +2 -2
  499. package/src/lib/plugins/openapi/OperationList.tsx +64 -8
  500. package/src/lib/plugins/openapi/OperationListItem.tsx +31 -2
  501. package/src/lib/plugins/openapi/Route.tsx +45 -9
  502. package/src/lib/plugins/openapi/Sidecar.tsx +3 -17
  503. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +17 -0
  504. package/src/lib/plugins/openapi/client/useCreateQuery.ts +5 -2
  505. package/src/lib/plugins/openapi/context.tsx +2 -2
  506. package/src/lib/plugins/openapi/graphql/gql.ts +2 -2
  507. package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
  508. package/src/lib/plugins/openapi/index.tsx +35 -28
  509. package/src/lib/plugins/openapi/interfaces.ts +22 -1
  510. package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -0
  511. package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +144 -0
  512. package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +24 -0
  513. package/src/lib/plugins/openapi/post-processors/removePaths.test.ts +126 -0
  514. package/src/lib/plugins/openapi/post-processors/removePaths.ts +55 -0
  515. package/src/lib/plugins/openapi/post-processors/traverse.ts +1 -0
  516. package/src/lib/plugins/openapi/schema/SchemaView.tsx +1 -1
  517. package/src/lib/plugins/openapi/util/methodToColor.ts +27 -0
  518. package/src/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.tsx +32 -0
  519. package/src/lib/plugins/redirect/index.tsx +2 -2
  520. package/src/lib/plugins/search-inkeep/index.tsx +78 -23
  521. package/src/lib/plugins/search-inkeep/inkeep.ts +3 -9
  522. package/src/lib/util/MdxComponents.tsx +3 -8
  523. package/src/lib/util/createVariantComponent.tsx +2 -2
  524. package/src/lib/util/traverse.ts +25 -0
  525. package/src/lib/util/useExposedProps.tsx +1 -1
  526. package/src/lib/util/useScrollToAnchor.ts +1 -1
  527. package/src/lib/util/useScrollToTop.ts +1 -1
  528. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +0 -2
  529. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +0 -3
  530. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +0 -1
  531. package/dist/vite/plugin-custom-css.js.map +0 -1
  532. package/lib/AnchorLink-CDlhr8gL.js +0 -706
  533. package/lib/AnchorLink-CDlhr8gL.js.map +0 -1
  534. package/lib/AuthenticationPlugin-DeGDVa1r.js.map +0 -1
  535. package/lib/InkeepCustomTrigger-CE5-K5ex.js +0 -6
  536. package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +0 -1
  537. package/lib/Markdown-BorQdbxW.js.map +0 -1
  538. package/lib/MdxPage-DFlbtJWi.js +0 -174
  539. package/lib/MdxPage-DFlbtJWi.js.map +0 -1
  540. package/lib/OperationList-KshJrrLL.js +0 -4691
  541. package/lib/OperationList-KshJrrLL.js.map +0 -1
  542. package/lib/Route-DlG_HTMu.js +0 -11
  543. package/lib/Route-DlG_HTMu.js.map +0 -1
  544. package/lib/SidebarBadge-DxFJcJ6V.js +0 -51
  545. package/lib/SidebarBadge-DxFJcJ6V.js.map +0 -1
  546. package/lib/SlotletProvider-D2v6rJy1.js +0 -252
  547. package/lib/SlotletProvider-D2v6rJy1.js.map +0 -1
  548. package/lib/assets/index-B_Jk_Yzp.js.map +0 -1
  549. package/lib/assets/worker-CPsGZsve.js.map +0 -1
  550. package/lib/cn-BmFQLtkS.js.map +0 -1
  551. package/lib/context-D1nXWxm7.js.map +0 -1
  552. package/lib/createServer-DK-g7kbB.js.map +0 -1
  553. package/lib/index-BcesIHH4.js +0 -1273
  554. package/lib/index-BcesIHH4.js.map +0 -1
  555. package/lib/index-BuAyrJe3.js +0 -46
  556. package/lib/index-BuAyrJe3.js.map +0 -1
  557. package/lib/index-CkwDvuPt.js.map +0 -1
  558. package/lib/index-Czzd9rjU.js +0 -899
  559. package/lib/index-Czzd9rjU.js.map +0 -1
  560. package/lib/index-Yn8c3UWE.js +0 -921
  561. package/lib/index-Yn8c3UWE.js.map +0 -1
  562. package/lib/index.esm-C5mr_sKO.js +0 -1193
  563. package/lib/index.esm-C5mr_sKO.js.map +0 -1
  564. package/lib/jsx-runtime-B6kdoens.js +0 -635
  565. package/lib/jsx-runtime-B6kdoens.js.map +0 -1
  566. package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
  567. package/lib/prism-java.min-d5iT_mOd.js +0 -7
  568. package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
  569. package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
  570. package/lib/prism-php.min-o7FpoMP_.js +0 -11
  571. package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
  572. package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
  573. package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
  574. package/lib/router-lfyopgBI.js +0 -3024
  575. package/lib/router-lfyopgBI.js.map +0 -1
  576. package/lib/state-BsPrOUAh.js +0 -252
  577. package/lib/state-BsPrOUAh.js.map +0 -1
  578. package/lib/useExposedProps-CTPtylCV.js +0 -10
  579. package/lib/useExposedProps-CTPtylCV.js.map +0 -1
  580. package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +0 -3
@@ -1,164 +1,166 @@
1
- var Ie = Object.defineProperty;
2
- var je = (t, e, n) => e in t ? Ie(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var b = (t, e, n) => je(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { j as fe } from "./jsx-runtime-B6kdoens.js";
5
- import { c as Je, g as Oe } from "./_commonjsHelpers-BkfeUUK-.js";
6
- import { A as ze } from "./AuthenticationPlugin-DeGDVa1r.js";
7
- import { g as Ne } from "./utils-DcpDOncX.js";
8
- import { Z as De } from "./invariant-Caa8-XvF.js";
9
- import { l as Ke } from "./index-Czzd9rjU.js";
10
- import { u as z } from "./state-BsPrOUAh.js";
11
- var pe = { exports: {} };
12
- (function(t) {
13
- (function(e, n) {
14
- t.exports ? t.exports = n() : e.log = n();
15
- })(Je, function() {
16
- var e = function() {
17
- }, n = "undefined", o = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), a = [
18
- "trace",
19
- "debug",
20
- "info",
21
- "warn",
22
- "error"
23
- ], r = {}, i = null;
24
- function c(l, g) {
25
- var u = l[g];
26
- if (typeof u.bind == "function")
27
- return u.bind(l);
28
- try {
29
- return Function.prototype.bind.call(u, l);
30
- } catch {
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 _ = (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-fB7viE7A.js";
7
+ import { u as De } from "./utils-B4O1uet5.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, m) {
26
+ var u = l[m];
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 b(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(), m = 0; m < a.length; m++) {
45
+ var u = a[m];
46
+ this[u] = m < 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
- return Function.prototype.apply.apply(u, [l, arguments]);
53
+ typeof console !== n && (f.call(this), this[l].apply(this, arguments));
33
54
  };
34
55
  }
35
- }
36
- function p() {
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(), g = 0; g < a.length; g++) {
44
- var u = a[g];
45
- this[u] = g < l ? e : this.methodFactory(u, l, this.name);
56
+ function T(l, m, u) {
57
+ return b(l) || y.apply(this, arguments);
46
58
  }
47
- if (this.log = this.debug, typeof console === n && l < this.levels.SILENT)
48
- return "No console available for logging";
49
- }
50
- function y(l) {
51
- return function() {
52
- typeof console !== n && (f.call(this), this[l].apply(this, arguments));
53
- };
54
- }
55
- function T(l, g, u) {
56
- return _(l) || y.apply(this, arguments);
57
- }
58
- function h(l, g) {
59
- var u = this, J, F, R, v = "loglevel";
60
- typeof l == "string" ? v += ":" + l : typeof l == "symbol" && (v = void 0);
61
- function Le(d) {
62
- var m = (a[d] || "silent").toUpperCase();
63
- if (!(typeof window === n || !v)) {
64
- try {
65
- window.localStorage[v] = m;
66
- return;
67
- } catch {
68
- }
69
- try {
70
- window.document.cookie = encodeURIComponent(v) + "=" + m + ";";
71
- } catch {
59
+ function h(l, m) {
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 g = (a[d] || "silent").toUpperCase();
64
+ if (!(typeof window === n || !v)) {
65
+ try {
66
+ window.localStorage[v] = g;
67
+ return;
68
+ } catch {
69
+ }
70
+ try {
71
+ window.document.cookie = encodeURIComponent(v) + "=" + g + ";";
72
+ } catch {
73
+ }
72
74
  }
73
75
  }
74
- }
75
- function ne() {
76
- var d;
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
- var m = window.document.cookie, O = encodeURIComponent(v), oe = m.indexOf(O + "=");
85
- oe !== -1 && (d = /^([^;]+)/.exec(
86
- m.slice(oe + O.length + 1)
87
- )[1]);
80
+ d = window.localStorage[v];
88
81
  } catch {
89
82
  }
90
- return u.levels[d] === void 0 && (d = void 0), d;
91
- }
92
- }
93
- function Ce() {
94
- if (!(typeof window === n || !v)) {
95
- try {
96
- window.localStorage.removeItem(v);
97
- } catch {
83
+ if (typeof d === n)
84
+ try {
85
+ var g = window.document.cookie, z = encodeURIComponent(v), oe = g.indexOf(z + "=");
86
+ oe !== -1 && (d = /^([^;]+)/.exec(
87
+ g.slice(oe + z.length + 1)
88
+ )[1]);
89
+ } catch {
90
+ }
91
+ return u.levels[d] === void 0 && (d = void 0), d;
98
92
  }
99
- try {
100
- window.document.cookie = encodeURIComponent(v) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
101
- } catch {
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 g = d;
108
+ if (typeof g == "string" && u.levels[g.toUpperCase()] !== void 0 && (g = u.levels[g.toUpperCase()]), typeof g == "number" && g >= 0 && g <= u.levels.SILENT)
109
+ return g;
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 = m || T, u.getLevel = function() {
120
+ return R ?? M ?? O;
121
+ }, u.setLevel = function(d, g) {
122
+ return R = U(d), g !== !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
- function U(d) {
106
- var m = d;
107
- if (typeof m == "string" && u.levels[m.toUpperCase()] !== void 0 && (m = u.levels[m.toUpperCase()]), typeof m == "number" && m >= 0 && m <= u.levels.SILENT)
108
- return m;
109
- throw new TypeError("log.setLevel() called with invalid level: " + d);
110
- }
111
- u.name = l, u.levels = {
112
- TRACE: 0,
113
- DEBUG: 1,
114
- INFO: 2,
115
- WARN: 3,
116
- ERROR: 4,
117
- SILENT: 5
118
- }, u.methodFactory = g || T, u.getLevel = function() {
119
- return R ?? F ?? J;
120
- }, u.setLevel = function(d, m) {
121
- return R = U(d), m !== !1 && Le(R), f.call(u);
122
- }, u.setDefaultLevel = function(d) {
123
- F = U(d), ne() || u.setLevel(d, !1);
124
- }, u.resetLevel = function() {
125
- R = null, Ce(), f.call(u);
126
- }, u.enableAll = function(d) {
127
- u.setLevel(u.levels.TRACE, d);
128
- }, u.disableAll = function(d) {
129
- u.setLevel(u.levels.SILENT, d);
130
- }, u.rebuild = function() {
131
- if (i !== u && (J = U(i.getLevel())), f.call(u), i === u)
132
- for (var d in r)
133
- r[d].rebuild();
134
- }, J = U(
135
- i ? i.getLevel() : "WARN"
136
- );
137
- var re = ne();
138
- re != null && (R = U(re)), f.call(u);
139
- }
140
- i = new h(), i.getLogger = function(g) {
141
- if (typeof g != "symbol" && typeof g != "string" || g === "")
142
- throw new TypeError("You must supply a name when creating a logger.");
143
- var u = r[g];
144
- return u || (u = r[g] = new h(
145
- g,
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 M = /* @__PURE__ */ Oe(We);
141
+ i = new h(), i.getLogger = function(m) {
142
+ if (typeof m != "symbol" && typeof m != "string" || m === "")
143
+ throw new TypeError("You must supply a name when creating a logger.");
144
+ var u = r[m];
145
+ return u || (u = r[m] = new h(
146
+ m,
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);
159
161
  let G;
160
- var N, he;
161
- (typeof navigator > "u" || !((he = (N = navigator.userAgent) == null ? void 0 : N.startsWith) != null && he.call(N, "Mozilla/5.0 "))) && (G = "oauth4webapi/v2.17.0");
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");
162
164
  function Y(t, e) {
163
165
  if (t == null)
164
166
  return !1;
@@ -168,19 +170,19 @@ function Y(t, e) {
168
170
  return !1;
169
171
  }
170
172
  }
171
- const K = Symbol(), He = Symbol(), Q = Symbol(), we = Symbol(), $e = Symbol(), Fe = Symbol(), Me = new TextEncoder(), Be = new TextDecoder();
173
+ const W = Symbol(), Fe = Symbol(), Q = Symbol(), me = Symbol(), Me = Symbol(), qe = Symbol(), Be = new TextEncoder(), Ve = new TextDecoder();
172
174
  function E(t) {
173
- return typeof t == "string" ? Me.encode(t) : Be.decode(t);
175
+ return typeof t == "string" ? Be.encode(t) : Ve.decode(t);
174
176
  }
175
- const ie = 32768;
176
- function qe(t) {
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 += ie)
180
- e.push(String.fromCharCode.apply(null, t.subarray(n, n + ie)));
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 Ve(t) {
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" ? Ve(t) : qe(t);
196
+ return typeof t == "string" ? Ze(t) : Ge(t);
195
197
  }
196
- class Ge {
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,21 +225,21 @@ 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 Ze extends Error {
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 = Ze, ge = new Ge(100);
233
- function me(t) {
234
+ const s = Qe, ge = new Ye(100);
235
+ function ye(t) {
234
236
  return t instanceof CryptoKey;
235
237
  }
236
- function ye(t) {
237
- return me(t) && t.type === "private";
238
+ function _e(t) {
239
+ return ye(t) && t.type === "private";
238
240
  }
239
- function Ye(t) {
240
- return me(t) && t.type === "public";
241
+ function Xe(t) {
242
+ return ye(t) && t.type === "public";
241
243
  }
242
244
  function X(t) {
243
245
  try {
@@ -247,10 +249,10 @@ function X(t) {
247
249
  }
248
250
  return t;
249
251
  }
250
- function L(t) {
252
+ function x(t) {
251
253
  return !(t === null || typeof t != "object" || Array.isArray(t));
252
254
  }
253
- function W(t) {
255
+ function H(t) {
254
256
  Y(t, Headers) && (t = Object.fromEntries(t.entries()));
255
257
  const e = new Headers(t);
256
258
  if (G && !e.has("user-agent") && e.set("user-agent", G), e.has("authorization"))
@@ -264,7 +266,7 @@ function ee(t) {
264
266
  throw new TypeError('"options.signal" must return or be an instance of AbortSignal');
265
267
  return t;
266
268
  }
267
- async function Qe(t, e) {
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,7 +283,7 @@ 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 = W(e == null ? void 0 : e.headers);
286
+ const o = H(e == null ? void 0 : e.headers);
285
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",
@@ -292,7 +294,7 @@ async function Qe(t, e) {
292
294
  function w(t) {
293
295
  return typeof t == "string" && t.length !== 0;
294
296
  }
295
- async function Xe(t, e) {
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
300
  if (!Y(e, Response))
@@ -306,7 +308,7 @@ async function Xe(t, e) {
306
308
  } catch (o) {
307
309
  throw new s('failed to parse "response" body as JSON', { cause: o });
308
310
  }
309
- if (!L(n))
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 H() {
319
+ function $() {
318
320
  return A(crypto.getRandomValues(new Uint8Array(32)));
319
321
  }
320
- function et() {
321
- return H();
322
+ function nt() {
323
+ return $();
322
324
  }
323
- function tt() {
324
- return H();
325
+ function rt() {
326
+ return $();
325
327
  }
326
- async function nt(t) {
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 rt(t) {
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[we]
343
+ modifyAssertion: t[me]
342
344
  };
343
345
  }
344
- function ae(t) {
346
+ function ce(t) {
345
347
  return encodeURIComponent(t).replace(/%20/g, "+");
346
348
  }
347
- function ot(t, e) {
348
- const n = ae(t), o = ae(e);
349
+ function at(t, e) {
350
+ const n = ce(t), o = ce(e);
349
351
  return `Basic ${btoa(`${n}:${o}`)}`;
350
352
  }
351
- function it(t) {
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 at(t) {
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 st(t) {
377
+ function ut(t) {
376
378
  switch (t.algorithm.namedCurve) {
377
379
  case "P-256":
378
380
  return "ES256";
@@ -387,11 +389,11 @@ function st(t) {
387
389
  function be(t) {
388
390
  switch (t.algorithm.name) {
389
391
  case "RSA-PSS":
390
- return it(t);
392
+ return st(t);
391
393
  case "RSASSA-PKCS1-v1_5":
392
- return at(t);
394
+ return ct(t);
393
395
  case "ECDSA":
394
- return st(t);
396
+ return ut(t);
395
397
  case "Ed25519":
396
398
  case "Ed448":
397
399
  return "EdDSA";
@@ -400,20 +402,20 @@ function be(t) {
400
402
  }
401
403
  }
402
404
  function C(t) {
403
- const e = t == null ? void 0 : t[K];
405
+ const e = t == null ? void 0 : t[W];
404
406
  return typeof e == "number" && Number.isFinite(e) ? e : 0;
405
407
  }
406
- function _e(t) {
407
- const e = t == null ? void 0 : t[He];
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 ct(t, e) {
414
- const n = $() + C(e);
415
+ function lt(t, e) {
416
+ const n = F() + C(e);
415
417
  return {
416
- jti: H(),
418
+ jti: $(),
417
419
  aud: [t.issuer, t.token_endpoint],
418
420
  exp: n + 60,
419
421
  iat: n,
@@ -422,127 +424,127 @@ function ct(t, e) {
422
424
  sub: e.client_id
423
425
  };
424
426
  }
425
- async function ut(t, e, n, o, a) {
426
- const r = { alg: be(n), kid: o }, i = ct(t, e);
427
- return a == null || a(r, i), ve(r, i, n);
427
+ async function dt(t, e, n, o, a) {
428
+ const r = { alg: be(n), kid: o }, i = lt(t, e);
429
+ return a == null || a(r, i), Se(r, i, n);
428
430
  }
429
- function x(t) {
431
+ function I(t) {
430
432
  if (typeof t != "object" || t === null)
431
433
  throw new TypeError('"as" must be an object');
432
434
  if (!w(t.issuer))
433
435
  throw new TypeError('"as.issuer" property must be a non-empty string');
434
436
  return !0;
435
437
  }
436
- function I(t) {
438
+ function j(t) {
437
439
  if (typeof t != "object" || t === null)
438
440
  throw new TypeError('"client" must be an object');
439
441
  if (!w(t.client_id))
440
442
  throw new TypeError('"client.client_id" property must be a non-empty string');
441
443
  return !0;
442
444
  }
443
- function se(t) {
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 B(t, e) {
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 ce(t, e) {
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 lt(t, e, n, o, a) {
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
- B("client_secret_basic", a), o.set("authorization", ot(e.client_id, se(e.client_secret)));
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
- B("client_secret_post", a), n.set("client_id", e.client_id), n.set("client_secret", se(e.client_secret));
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 (ce("private_key_jwt", e.client_secret), a === void 0)
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 } = rt(a);
471
- if (!ye(r))
472
+ const { key: r, kid: i, modifyAssertion: c } = it(a);
473
+ if (!_e(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 ut(t, e, r, i, c));
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
- ce(e.token_endpoint_auth_method, e.client_secret), B(e.token_endpoint_auth_method, a), n.set("client_id", e.client_id);
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 ve(t, e, n) {
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(Pe(n), n, E(o)));
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 dt(t, e, n, o, a, r) {
494
+ async function ft(t, e, n, o, a, r) {
493
495
  var T;
494
496
  const { privateKey: i, publicKey: c, nonce: p = ge.get(n.origin) } = e;
495
- if (!ye(i))
497
+ if (!_e(i))
496
498
  throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
497
- if (!Ye(c))
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 _ = $() + a, f = {
505
+ const b = F() + a, f = {
504
506
  alg: be(i),
505
507
  typ: "dpop+jwt",
506
- jwk: await ft(c)
508
+ jwk: await wt(c)
507
509
  }, y = {
508
- iat: _,
509
- jti: H(),
510
+ iat: b,
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[we]) == null || T.call(e, f, y), t.set("dpop", await ve(f, y, i));
517
+ (T = e[me]) == null || T.call(e, f, y), t.set("dpop", await Se(f, y, i));
516
518
  }
517
- let D;
518
- async function ht(t) {
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 D.set(t, c), c;
522
+ return K.set(t, c), c;
521
523
  }
522
- async function ft(t) {
523
- return D || (D = /* @__PURE__ */ new WeakMap()), D.get(t) || ht(t);
524
+ async function wt(t) {
525
+ return K || (K = /* @__PURE__ */ new WeakMap()), K.get(t) || pt(t);
524
526
  }
525
- function ue(t, e, n) {
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 Se(t, e, n = !1) {
531
- return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ? ue(t.mtls_endpoint_aliases[e], e, n) : ue(t[e], e, n);
532
+ 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 Te(t, e) {
534
- return !!(t.use_mtls_endpoint_aliases || e != null && e[Fe]);
535
+ function ke(t, e) {
536
+ return !!(t.use_mtls_endpoint_aliases || e != null && e[qe]);
535
537
  }
536
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 pt(t, e, n, o, a, r) {
542
+ async function mt(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 = W(o), (r == null ? void 0 : r.DPoP) === void 0 ? o.set("authorization", `Bearer ${t}`) : (await dt(o, r.DPoP, n, e.toUpperCase(), C({ [K]: r == null ? void 0 : r[K] }), t), o.set("authorization", `DPoP ${t}`)), ((r == null ? void 0 : r[Q]) || fetch)(n.href, {
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,
@@ -550,16 +552,16 @@ async function pt(t, e, n, o, a, r) {
550
552
  signal: r != null && r.signal ? ee(r.signal) : null
551
553
  }).then(X);
552
554
  }
553
- async function wt(t, e, n, o) {
554
- x(t), I(e);
555
- const a = Se(t, "userinfo_endpoint", Te(e, o)), r = W(o == null ? void 0 : o.headers);
556
- return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), pt(n, "GET", a, r, null, {
555
+ async function gt(t, e, n, o) {
556
+ I(t), j(e);
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")), mt(n, "GET", a, r, null, {
557
559
  ...o,
558
- [K]: C(e)
560
+ [W]: C(e)
559
561
  });
560
562
  }
561
- async function gt(t, e, n, o, a, r, i) {
562
- return await lt(t, e, a, r, i == null ? void 0 : i.clientPrivateKey), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), ((i == null ? void 0 : i[Q]) || fetch)(o.href, {
563
+ 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,
@@ -567,33 +569,33 @@ async function gt(t, e, n, o, a, r, i) {
567
569
  signal: i != null && i.signal ? ee(i.signal) : null
568
570
  }).then(X);
569
571
  }
570
- async function ke(t, e, n, o, a) {
571
- const r = Se(t, "token_endpoint", Te(e, a));
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 = W(a == null ? void 0 : a.headers);
574
- return i.set("accept", "application/json"), gt(t, e, "POST", r, o, i, a);
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 mt(t, e, n, o) {
577
- if (x(t), I(e), !w(n))
578
+ async function _t(t, e, n, o) {
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), ke(t, e, "refresh_token", a, o);
582
+ return a.set("refresh_token", n), Ae(t, e, "refresh_token", a, o);
581
583
  }
582
- const Ae = /* @__PURE__ */ new WeakMap();
583
- function yt(t) {
584
+ const Ee = /* @__PURE__ */ new WeakMap();
585
+ function bt(t) {
584
586
  if (!t.id_token)
585
587
  return;
586
- const e = Ae.get(t);
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 Ee(t, e, n, o = !1, a = !1) {
592
- if (x(t), I(e), !Y(n, Response))
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 Pt(n))
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
  }
@@ -604,7 +606,7 @@ async function Ee(t, e, n, o = !1, a = !1) {
604
606
  } catch (i) {
605
607
  throw new s('failed to parse "response" body as JSON', { cause: i });
606
608
  }
607
- if (!L(r))
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 Ct(r.id_token, xt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Ue, C(e), _e(e), e[$e]).then(At.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(vt.bind(void 0, t.issuer)).then(_t.bind(void 0, e.client_id));
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
- Ae.set(r, [i, c]);
636
+ Ee.set(r, [i, c]);
635
637
  }
636
638
  }
637
639
  return r;
638
640
  }
639
- async function bt(t, e, n) {
640
- return Ee(t, e, n);
641
+ async function vt(t, e, n) {
642
+ return Re(t, e, n);
641
643
  }
642
- function _t(t, e) {
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 vt(t, e) {
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 Re = /* @__PURE__ */ new WeakSet();
656
- function St(t) {
657
- return Re.add(t), t;
657
+ const Pe = /* @__PURE__ */ new WeakSet();
658
+ function kt(t) {
659
+ return Pe.add(t), t;
658
660
  }
659
- async function Tt(t, e, n, o, a, r) {
660
- if (x(t), I(e), !Re.has(n))
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), ke(t, e, "authorization_code", c, r);
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 kt = {
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 At(t, e) {
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}" (${kt[n]}) claim missing`);
693
+ throw new s(`JWT "${n}" (${Et[n]}) claim missing`);
692
694
  return e;
693
695
  }
694
- const Et = Symbol(), q = Symbol();
695
- async function Rt(t, e, n, o, a) {
696
- const r = await Ee(t, e, n);
696
+ const Pt = Symbol(), B = Symbol();
697
+ async function Ut(t, e, n, o, a) {
698
+ const r = await Re(t, e, n);
697
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
- a ?? (a = e.default_max_age ?? q);
702
- const i = yt(r);
703
- if ((e.require_auth_time || a !== q) && i.auth_time === void 0)
703
+ a ?? (a = e.default_max_age ?? B);
704
+ const i = bt(r);
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
- if (a !== q) {
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 = $() + C(e), p = _e(e);
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 Et:
716
+ case Pt:
715
717
  if (i.nonce !== void 0)
716
718
  throw new s('unexpected ID Token "nonce" claim value');
717
719
  break;
@@ -729,22 +731,22 @@ function te(t) {
729
731
  if (t.bodyUsed)
730
732
  throw new TypeError('"response" body has been used already');
731
733
  }
732
- async function Pt(t) {
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 (L(e) && typeof e.error == "string" && e.error.length)
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 le(t) {
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 Ut(t) {
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 Pe(t) {
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: Ut(t.algorithm.namedCurve)
766
+ hash: xt(t.algorithm.namedCurve)
765
767
  };
766
768
  case "RSA-PSS":
767
- switch (le(t.algorithm), t.algorithm.hash.name) {
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,27 +778,27 @@ function Pe(t) {
776
778
  throw new S();
777
779
  }
778
780
  case "RSASSA-PKCS1-v1_5":
779
- return le(t.algorithm), t.algorithm.name;
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 Ue = Symbol();
787
- async function Lt(t, e, n, o) {
788
+ const Le = Symbol();
789
+ async function Ct(t, e, n, o) {
788
790
  const a = `${t}.${e}`;
789
- if (!await crypto.subtle.verify(Pe(n), n, o, E(a)))
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 Ct(t, e, n, o, a, r) {
793
- let { 0: i, 1: c, 2: p, length: _ } = t.split(".");
794
- if (_ === 5)
794
+ async function It(t, e, n, o, a, r) {
795
+ let { 0: i, 1: c, 2: p, length: b } = t.split(".");
796
+ if (b === 5)
795
797
  if (r !== void 0)
796
- t = await r(t), { 0: i, 1: c, 2: p, length: _ } = t.split(".");
798
+ t = await r(t), { 0: i, 1: c, 2: p, length: b } = t.split(".");
797
799
  else
798
800
  throw new S("JWE structure JWTs are not supported");
799
- if (_ !== 3)
801
+ if (b !== 3)
800
802
  throw new s("Invalid JWT");
801
803
  let f;
802
804
  try {
@@ -804,26 +806,26 @@ async function Ct(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 (!L(f))
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 !== Ue && (T = await n(f), await Lt(i, c, T, y));
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 (!L(h))
822
+ if (!x(h))
821
823
  throw new s("JWT Payload must be a top level object");
822
- const j = $() + o;
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');
826
- if (h.exp <= j - a)
828
+ if (h.exp <= J - a)
827
829
  throw new s('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()');
828
830
  }
829
831
  if (h.iat !== void 0 && typeof h.iat != "number")
@@ -833,14 +835,14 @@ async function Ct(t, e, n, o, a, r) {
833
835
  if (h.nbf !== void 0) {
834
836
  if (typeof h.nbf != "number")
835
837
  throw new s('unexpected JWT "nbf" (not before) claim type');
836
- if (h.nbf > j + a)
838
+ if (h.nbf > J + a)
837
839
  throw new s('unexpected JWT "nbf" (not before) claim value, timestamp is > now()');
838
840
  }
839
841
  if (h.aud !== void 0 && typeof h.aud != "string" && !Array.isArray(h.aud))
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 xt(t, e, n) {
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,9 +862,9 @@ function k(t, e) {
860
862
  throw new s(`"${e}" parameter must be provided only once`);
861
863
  return n;
862
864
  }
863
- const It = Symbol(), jt = Symbol();
864
- function Jt(t, e, n, o) {
865
- if (x(t), I(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
865
+ const Jt = Symbol(), Ot = Symbol();
866
+ function zt(t, e, n, o) {
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"))
868
870
  throw new s('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');
@@ -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 jt:
878
+ case Ot:
877
879
  if (r !== void 0)
878
880
  throw new s('unexpected "state" response parameter encountered');
879
881
  break;
880
- case It:
882
+ case Jt:
881
883
  break;
882
884
  default:
883
885
  if (!w(o))
@@ -897,19 +899,19 @@ 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 St(new URLSearchParams(n));
902
+ return kt(new URLSearchParams(n));
901
903
  }
902
- function Ot({
904
+ function Dt({
903
905
  handleCallback: t
904
906
  }) {
905
- const e = Ne({
907
+ const e = De({
906
908
  retry: !1,
907
909
  queryKey: ["oauth-callback"],
908
910
  queryFn: async () => {
909
911
  try {
910
912
  return await t();
911
913
  } catch (n) {
912
- throw new De("Could not validate user", {
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__ */ fe.jsx(Ke, { to: e.data });
922
+ return /* @__PURE__ */ we.jsx(Ne, { to: e.data });
921
923
  }
922
924
  class P extends Error {
923
925
  }
924
- class de extends P {
926
+ class fe extends P {
925
927
  constructor(e, n, o) {
926
928
  super(e, o), this.error = n;
927
929
  }
928
930
  }
929
931
  const V = "code-verifier";
930
- class zt extends ze {
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__ */ fe.jsx(Ot, { handleCallback: this.handleCallback })
941
+ element: /* @__PURE__ */ we.jsx(Dt, { handleCallback: this.handleCallback })
940
942
  }
941
943
  ];
942
944
  }
943
945
  }
944
- class Nt {
946
+ class Kt {
945
947
  constructor({
946
948
  issuer: e,
947
949
  audience: n,
@@ -950,22 +952,23 @@ class Nt {
950
952
  redirectToAfterSignIn: r,
951
953
  redirectToAfterSignOut: i
952
954
  }) {
953
- b(this, "client");
954
- b(this, "issuer");
955
- b(this, "authorizationServer");
956
- b(this, "callbackUrlPath", "/oauth/callback");
957
- b(this, "logoutRedirectUrlPath", "/");
958
- b(this, "onAuthorizationUrl");
959
- b(this, "redirectToAfterSignUp");
960
- b(this, "redirectToAfterSignIn");
961
- b(this, "redirectToAfterSignOut");
962
- b(this, "audience");
963
- b(this, "signOut", async () => {
964
- z.setState({
955
+ _(this, "client");
956
+ _(this, "issuer");
957
+ _(this, "authorizationServer");
958
+ _(this, "callbackUrlPath", "/oauth/callback");
959
+ _(this, "logoutRedirectUrlPath", "/");
960
+ _(this, "onAuthorizationUrl");
961
+ _(this, "redirectToAfterSignUp");
962
+ _(this, "redirectToAfterSignIn");
963
+ _(this, "redirectToAfterSignOut");
964
+ _(this, "audience");
965
+ _(this, "signOut", async () => {
966
+ L.setState({
965
967
  isAuthenticated: !1,
966
968
  isPending: !1,
967
- profile: void 0
968
- }), sessionStorage.clear();
969
+ profile: void 0,
970
+ providerData: void 0
971
+ });
969
972
  const e = await this.getAuthServer(), n = new URL(
970
973
  window.location.origin + this.redirectToAfterSignOut
971
974
  );
@@ -976,39 +979,39 @@ class Nt {
976
979
  n.toString()
977
980
  )) : o = n;
978
981
  });
979
- b(this, "handleCallback", async () => {
982
+ _(this, "handleCallback", async () => {
980
983
  const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(V);
981
984
  if (sessionStorage.removeItem(V), !o)
982
985
  throw new P("No code verifier found in state.");
983
- const a = await this.getAuthServer(), r = Jt(
986
+ const a = await this.getAuthServer(), r = zt(
984
987
  a,
985
988
  this.client,
986
989
  e.searchParams,
987
990
  n ?? void 0
988
991
  );
989
992
  if (Z(r))
990
- throw M.error("Error validating OAuth response", r), new de(
993
+ throw ae.error("Error validating OAuth response", r), new fe(
991
994
  "Error validating OAuth response",
992
995
  r
993
996
  );
994
997
  const i = new URL(e);
995
998
  i.pathname = this.redirectToAfterSignIn, i.search = "";
996
- const c = await Tt(
999
+ const c = await At(
997
1000
  a,
998
1001
  this.client,
999
1002
  r,
1000
1003
  i.toString(),
1001
1004
  o
1002
- ), p = await Rt(
1005
+ ), p = await Ut(
1003
1006
  a,
1004
1007
  this.client,
1005
1008
  c
1006
1009
  );
1007
1010
  this.setTokensFromResponse(p);
1008
- const _ = await this.getAccessToken(), y = await (await wt(
1011
+ const b = await this.getAccessToken(), y = await (await gt(
1009
1012
  a,
1010
1013
  this.client,
1011
- _
1014
+ b
1012
1015
  )).json(), T = {
1013
1016
  sub: y.sub,
1014
1017
  email: y.email,
@@ -1016,14 +1019,11 @@ class Nt {
1016
1019
  emailVerified: y.email_verified ?? !1,
1017
1020
  pictureUrl: y.picture
1018
1021
  };
1019
- z.setState({
1022
+ L.setState({
1020
1023
  isAuthenticated: !0,
1021
1024
  isPending: !1,
1022
1025
  profile: T
1023
- }), sessionStorage.setItem(
1024
- "profile-state",
1025
- JSON.stringify(z.getState().profile)
1026
- );
1026
+ });
1027
1027
  const h = sessionStorage.getItem("redirect-to") ?? "/";
1028
1028
  return sessionStorage.removeItem("redirect-to"), h;
1029
1029
  });
@@ -1034,8 +1034,8 @@ class Nt {
1034
1034
  }
1035
1035
  async getAuthServer() {
1036
1036
  if (!this.authorizationServer) {
1037
- const e = new URL(this.issuer), n = await Qe(e);
1038
- this.authorizationServer = await Xe(
1037
+ const e = new URL(this.issuer), n = await et(e);
1038
+ this.authorizationServer = await tt(
1039
1039
  e,
1040
1040
  n
1041
1041
  );
@@ -1048,16 +1048,19 @@ class Nt {
1048
1048
  */
1049
1049
  setTokensFromResponse(e) {
1050
1050
  if (Z(e))
1051
- throw M.error("Bad Token Response", e), new de("Bad Token Response", e);
1051
+ throw ae.error("Bad Token Response", e), new fe("Bad Token Response", e);
1052
1052
  if (!e.expires_in)
1053
1053
  throw new P("No expires_in in response");
1054
1054
  const n = {
1055
1055
  accessToken: e.access_token,
1056
1056
  refreshToken: e.refresh_token,
1057
+ idToken: e.id_token,
1057
1058
  expiresOn: new Date(Date.now() + e.expires_in * 1e3),
1058
1059
  tokenType: e.token_type
1059
1060
  };
1060
- sessionStorage.setItem("token-state", JSON.stringify(n));
1061
+ L.setState({
1062
+ providerData: n
1063
+ });
1061
1064
  }
1062
1065
  async signUp({ redirectTo: e } = {}) {
1063
1066
  return this.authorize({
@@ -1074,11 +1077,11 @@ class Nt {
1074
1077
  redirectTo: e,
1075
1078
  isSignUp: n = !1
1076
1079
  }) {
1077
- var _, f;
1080
+ var b, f;
1078
1081
  const o = "S256", a = await this.getAuthServer();
1079
1082
  if (!a.authorization_endpoint)
1080
1083
  throw new P("No authorization endpoint");
1081
- const r = et(), i = await nt(r);
1084
+ const r = nt(), i = await ot(r);
1082
1085
  sessionStorage.setItem(V, r);
1083
1086
  const c = new URL(
1084
1087
  a.authorization_endpoint
@@ -1088,28 +1091,33 @@ class Nt {
1088
1091
  if (p.pathname = this.callbackUrlPath, p.search = "", c.searchParams.set("client_id", this.client.client_id), c.searchParams.set("redirect_uri", p.toString()), c.searchParams.set("response_type", "code"), c.searchParams.set("scope", "openid profile email"), c.searchParams.set("code_challenge", i), c.searchParams.set(
1089
1092
  "code_challenge_method",
1090
1093
  o
1091
- ), this.audience && c.searchParams.set("audience", this.audience), (_ = this.onAuthorizationUrl) == null || _.call(this, c, {
1094
+ ), this.audience && c.searchParams.set("audience", this.audience), (b = this.onAuthorizationUrl) == null || b.call(this, c, {
1092
1095
  isSignIn: !n,
1093
1096
  isSignUp: n
1094
1097
  }), ((f = a.code_challenge_methods_supported) == null ? void 0 : f.includes("S256")) !== !0) {
1095
- const y = tt();
1098
+ const y = rt();
1096
1099
  c.searchParams.set("state", y);
1097
1100
  }
1098
1101
  location.href = c.href;
1099
1102
  }
1100
1103
  async getAccessToken() {
1101
- const e = await this.getAuthServer(), n = sessionStorage.getItem("token-state");
1104
+ const e = await this.getAuthServer(), { providerData: n } = L.getState();
1102
1105
  if (!n)
1103
1106
  throw new P("User is not authenticated");
1104
- const o = JSON.parse(n);
1105
- if (o.expiresOn < /* @__PURE__ */ new Date()) {
1107
+ const o = n;
1108
+ if (new Date(o.expiresOn) < /* @__PURE__ */ new Date()) {
1106
1109
  if (!o.refreshToken)
1107
- return await this.signIn(), "";
1108
- const a = await mt(
1110
+ return L.setState({
1111
+ isAuthenticated: !1,
1112
+ isPending: !1,
1113
+ profile: null,
1114
+ providerData: null
1115
+ }), "";
1116
+ const a = await _t(
1109
1117
  e,
1110
1118
  this.client,
1111
1119
  o.refreshToken
1112
- ), r = await bt(
1120
+ ), r = await vt(
1113
1121
  e,
1114
1122
  this.client,
1115
1123
  a
@@ -1120,27 +1128,13 @@ class Nt {
1120
1128
  } else
1121
1129
  return o.accessToken;
1122
1130
  }
1123
- pageLoad() {
1124
- const e = sessionStorage.getItem("profile-state");
1125
- if (e)
1126
- try {
1127
- const n = JSON.parse(e);
1128
- z.setState({
1129
- isAuthenticated: !0,
1130
- isPending: !1,
1131
- profile: n
1132
- });
1133
- } catch (n) {
1134
- M.error("Error parsing auth state", n);
1135
- }
1136
- }
1137
1131
  getAuthenticationPlugin() {
1138
- return new zt(this.callbackUrlPath, this.handleCallback);
1132
+ return new Nt(this.callbackUrlPath, this.handleCallback);
1139
1133
  }
1140
1134
  }
1141
- const qt = (t) => new Nt(t);
1135
+ const Gt = (t) => new Kt(t);
1142
1136
  export {
1143
- Nt as OpenIDAuthenticationProvider,
1144
- qt as default
1137
+ Kt as OpenIDAuthenticationProvider,
1138
+ Gt as default
1145
1139
  };
1146
1140
  //# sourceMappingURL=zudoku.auth-openid.js.map