zudoku 0.0.0-f0602bf → 0.0.0-f0b4321

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