zudoku 0.0.0-f3858d6 → 0.0.0-f49e3ea

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