zudoku 0.0.0-f2fd45c → 0.0.0-f3786a4

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