zudoku 0.0.0-f471fb8 → 0.0.0-f52e8af

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 (974) hide show
  1. package/cli.js +8 -2
  2. package/dist/app/ZuploBuildConfig.d.ts +155 -0
  3. package/dist/app/ZuploBuildConfig.js +29 -0
  4. package/dist/app/ZuploBuildConfig.js.map +1 -0
  5. package/dist/app/entry.client.js +36 -0
  6. package/dist/app/entry.client.js.map +1 -1
  7. package/dist/app/entry.server.d.ts +5 -4
  8. package/dist/app/entry.server.js +2 -2
  9. package/dist/app/entry.server.js.map +1 -1
  10. package/dist/app/env.d.ts +33 -0
  11. package/dist/app/env.js +29 -0
  12. package/dist/app/env.js.map +1 -0
  13. package/dist/app/main.js +16 -4
  14. package/dist/app/main.js.map +1 -1
  15. package/dist/cli/build/handler.js +2 -1
  16. package/dist/cli/build/handler.js.map +1 -1
  17. package/dist/cli/cli.js +12 -1
  18. package/dist/cli/cli.js.map +1 -1
  19. package/dist/cli/cmds/dev.js +1 -7
  20. package/dist/cli/cmds/dev.js.map +1 -1
  21. package/dist/cli/common/machine-id/lib.js +1 -0
  22. package/dist/cli/common/machine-id/lib.js.map +1 -1
  23. package/dist/cli/dev/handler.js +2 -1
  24. package/dist/cli/dev/handler.js.map +1 -1
  25. package/dist/config/config.d.ts +3 -1
  26. package/dist/config/loader.d.ts +2 -16
  27. package/dist/config/loader.js +10 -94
  28. package/dist/config/loader.js.map +1 -1
  29. package/dist/config/validators/BuildSchema.d.ts +60 -0
  30. package/dist/config/validators/BuildSchema.js +31 -0
  31. package/dist/config/validators/BuildSchema.js.map +1 -0
  32. package/dist/config/validators/common.d.ts +1487 -335
  33. package/dist/config/validators/common.js +59 -9
  34. package/dist/config/validators/common.js.map +1 -1
  35. package/dist/config/validators/icon-types.d.ts +1 -1
  36. package/dist/config/validators/validate.d.ts +515 -128
  37. package/dist/index.d.ts +2 -1
  38. package/dist/index.js +1 -0
  39. package/dist/index.js.map +1 -1
  40. package/dist/lib/authentication/components/CallbackHandler.js +5 -1
  41. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  42. package/dist/lib/authentication/components/SignIn.d.ts +1 -1
  43. package/dist/lib/authentication/components/SignIn.js +5 -2
  44. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  45. package/dist/lib/authentication/components/SignUp.d.ts +1 -1
  46. package/dist/lib/authentication/components/SignUp.js +4 -1
  47. package/dist/lib/authentication/components/SignUp.js.map +1 -1
  48. package/dist/lib/authentication/providers/auth0.js +1 -1
  49. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  50. package/dist/lib/authentication/providers/clerk.js +15 -7
  51. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  52. package/dist/lib/authentication/providers/openid.d.ts +5 -6
  53. package/dist/lib/authentication/providers/openid.js +14 -20
  54. package/dist/lib/authentication/providers/openid.js.map +1 -1
  55. package/dist/lib/components/Banner.js +1 -1
  56. package/dist/lib/components/Banner.js.map +1 -1
  57. package/dist/lib/components/Bootstrap.d.ts +2 -1
  58. package/dist/lib/components/Bootstrap.js +3 -2
  59. package/dist/lib/components/Bootstrap.js.map +1 -1
  60. package/dist/lib/components/BuildCheck.d.ts +4 -0
  61. package/dist/lib/components/BuildCheck.js +38 -0
  62. package/dist/lib/components/BuildCheck.js.map +1 -0
  63. package/dist/lib/components/Footer.d.ts +1 -0
  64. package/dist/lib/components/Footer.js +32 -0
  65. package/dist/lib/components/Footer.js.map +1 -0
  66. package/dist/lib/components/Header.js +3 -3
  67. package/dist/lib/components/Header.js.map +1 -1
  68. package/dist/lib/components/Heading.d.ts +2 -2
  69. package/dist/lib/components/Heading.js +1 -1
  70. package/dist/lib/components/Heading.js.map +1 -1
  71. package/dist/lib/components/Layout.js +3 -1
  72. package/dist/lib/components/Layout.js.map +1 -1
  73. package/dist/lib/components/Main.js +3 -2
  74. package/dist/lib/components/Main.js.map +1 -1
  75. package/dist/lib/components/Markdown.d.ts +3 -1
  76. package/dist/lib/components/Markdown.js +8 -14
  77. package/dist/lib/components/Markdown.js.map +1 -1
  78. package/dist/lib/components/MobileTopNavigation.js +6 -3
  79. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  80. package/dist/lib/components/Pagination.d.ts +2 -1
  81. package/dist/lib/components/Pagination.js +3 -3
  82. package/dist/lib/components/Pagination.js.map +1 -1
  83. package/dist/lib/components/Search.js +7 -1
  84. package/dist/lib/components/Search.js.map +1 -1
  85. package/dist/lib/components/TopNavigation.d.ts +1 -0
  86. package/dist/lib/components/TopNavigation.js +3 -3
  87. package/dist/lib/components/TopNavigation.js.map +1 -1
  88. package/dist/lib/components/Zudoku.js +2 -1
  89. package/dist/lib/components/Zudoku.js.map +1 -1
  90. package/dist/lib/components/context/BypassProtectedRoutesContext.d.ts +1 -0
  91. package/dist/lib/components/context/BypassProtectedRoutesContext.js +3 -0
  92. package/dist/lib/components/context/BypassProtectedRoutesContext.js.map +1 -0
  93. package/dist/lib/components/context/ViewportAnchorContext.js +8 -9
  94. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  95. package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
  96. package/dist/lib/components/context/ZudokuContext.js +2 -3
  97. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  98. package/dist/lib/components/index.d.ts +8 -2
  99. package/dist/lib/components/index.js +2 -0
  100. package/dist/lib/components/index.js.map +1 -1
  101. package/dist/lib/components/navigation/PoweredByZudoku.d.ts +3 -0
  102. package/dist/lib/components/navigation/PoweredByZudoku.js +7 -0
  103. package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -0
  104. package/dist/lib/components/navigation/Sidebar.js +3 -10
  105. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  106. package/dist/lib/components/navigation/SidebarCategory.js +9 -5
  107. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  108. package/dist/lib/components/navigation/SidebarItem.js +2 -3
  109. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  110. package/dist/lib/components/navigation/SidebarWrapper.d.ts +2 -3
  111. package/dist/lib/components/navigation/SidebarWrapper.js +18 -2
  112. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  113. package/dist/lib/components/navigation/Toc.js +2 -2
  114. package/dist/lib/components/navigation/Toc.js.map +1 -1
  115. package/dist/lib/components/navigation/ZudokuLogo.d.ts +6 -0
  116. package/dist/lib/components/navigation/ZudokuLogo.js +5 -0
  117. package/dist/lib/components/navigation/ZudokuLogo.js.map +1 -0
  118. package/dist/lib/components/navigation/ZuploLogo.d.ts +3 -0
  119. package/dist/lib/components/navigation/ZuploLogo.js +4 -0
  120. package/dist/lib/components/navigation/ZuploLogo.js.map +1 -0
  121. package/dist/lib/core/RouteGuard.d.ts +1 -0
  122. package/dist/lib/core/RouteGuard.js +9 -3
  123. package/dist/lib/core/RouteGuard.js.map +1 -1
  124. package/dist/lib/core/ZudokuContext.d.ts +14 -2
  125. package/dist/lib/core/ZudokuContext.js.map +1 -1
  126. package/dist/lib/errors/ErrorAlert.js +1 -1
  127. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  128. package/dist/lib/oas/graphql/circular.js +23 -18
  129. package/dist/lib/oas/graphql/circular.js.map +1 -1
  130. package/dist/lib/oas/parser/index.d.ts +3 -0
  131. package/dist/lib/oas/parser/index.js +7 -1
  132. package/dist/lib/oas/parser/index.js.map +1 -1
  133. package/dist/lib/oas/parser/upgrade/index.d.ts +1 -0
  134. package/dist/lib/oas/parser/upgrade/index.js +77 -25
  135. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  136. package/dist/lib/plugins/api-catalog/Catalog.js +1 -1
  137. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
  138. package/dist/lib/plugins/markdown/MdxPage.js +1 -1
  139. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  140. package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
  141. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  142. package/dist/lib/plugins/openapi/ColorizedParam.js +1 -1
  143. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  144. package/dist/lib/plugins/openapi/OperationList.d.ts +1 -1
  145. package/dist/lib/plugins/openapi/OperationList.js +7 -5
  146. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  147. package/dist/lib/plugins/openapi/OperationListItem.js +4 -3
  148. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  149. package/dist/lib/plugins/openapi/ParamInfos.js +4 -1
  150. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
  151. package/dist/lib/plugins/openapi/ParameterListItem.js +9 -1
  152. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  153. package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +2 -4
  154. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -4
  155. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  156. package/dist/lib/plugins/openapi/SchemaList.js +6 -5
  157. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
  158. package/dist/lib/plugins/openapi/Sidecar.js +33 -3
  159. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  160. package/dist/lib/plugins/openapi/SidecarExamples.js +9 -1
  161. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  162. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +5 -0
  163. package/dist/lib/plugins/openapi/client/useCreateQuery.js +10 -4
  164. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  165. package/dist/lib/plugins/openapi/components/ConstValue.d.ts +5 -0
  166. package/dist/lib/plugins/openapi/components/ConstValue.js +6 -0
  167. package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -0
  168. package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
  169. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
  170. package/dist/lib/plugins/openapi/components/ResponseContent.d.ts +12 -0
  171. package/dist/lib/plugins/openapi/components/ResponseContent.js +21 -0
  172. package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -0
  173. package/dist/lib/plugins/openapi/index.d.ts +3 -4
  174. package/dist/lib/plugins/openapi/index.js +6 -4
  175. package/dist/lib/plugins/openapi/index.js.map +1 -1
  176. package/dist/lib/plugins/openapi/interfaces.d.ts +4 -3
  177. package/dist/lib/plugins/openapi/playground/Headers.js +2 -2
  178. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  179. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -3
  180. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
  181. package/dist/lib/plugins/openapi/playground/Playground.js +2 -2
  182. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  183. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
  184. package/dist/lib/plugins/openapi/playground/QueryParams.js +3 -3
  185. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  186. package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +1 -1
  187. package/dist/lib/plugins/openapi/playground/SubmitButton.js +1 -1
  188. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +1 -1
  189. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +1 -1
  190. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +1 -1
  191. package/dist/lib/plugins/openapi/processors/removeExtensions.d.ts +8 -0
  192. package/dist/lib/plugins/openapi/{post-processors → processors}/removeExtensions.js +1 -1
  193. package/dist/lib/plugins/openapi/processors/removeExtensions.js.map +1 -0
  194. package/dist/lib/plugins/openapi/{post-processors → processors}/removeExtensions.test.js +26 -6
  195. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js.map +1 -0
  196. package/dist/lib/plugins/openapi/{post-processors → processors}/removeParameters.d.ts +3 -1
  197. package/dist/lib/plugins/openapi/{post-processors → processors}/removeParameters.js +1 -1
  198. package/dist/lib/plugins/openapi/processors/removeParameters.js.map +1 -0
  199. package/dist/lib/plugins/openapi/{post-processors → processors}/removeParameters.test.js +53 -25
  200. package/dist/lib/plugins/openapi/processors/removeParameters.test.js.map +1 -0
  201. package/dist/lib/plugins/openapi/{post-processors → processors}/removePaths.d.ts +3 -1
  202. package/dist/lib/plugins/openapi/{post-processors → processors}/removePaths.js +1 -1
  203. package/dist/lib/plugins/openapi/processors/removePaths.js.map +1 -0
  204. package/dist/lib/plugins/openapi/processors/removePaths.test.js +144 -0
  205. package/dist/lib/plugins/openapi/processors/removePaths.test.js.map +1 -0
  206. package/dist/lib/plugins/openapi/processors/traverse.js.map +1 -0
  207. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +1 -2
  208. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +2 -2
  209. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +1 -1
  210. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +2 -1
  211. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +2 -2
  212. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +1 -1
  213. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -1
  214. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +1 -1
  215. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +1 -1
  216. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.d.ts +4 -0
  217. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +15 -0
  218. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -0
  219. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +2 -4
  220. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +19 -13
  221. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  222. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -2
  223. package/dist/lib/plugins/openapi/schema/SchemaView.js +34 -53
  224. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  225. package/dist/lib/plugins/openapi/schema/utils.d.ts +7 -1
  226. package/dist/lib/plugins/openapi/schema/utils.js +14 -5
  227. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  228. package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
  229. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +44 -0
  230. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  231. package/dist/lib/plugins/openapi/util/getRoutes.js +52 -15
  232. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  233. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +9 -4
  234. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  235. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
  236. package/dist/lib/plugins/search-pagefind/ResultList.js +6 -12
  237. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  238. package/dist/lib/plugins/search-pagefind/index.d.ts +1 -3
  239. package/dist/lib/shiki.d.ts +35 -0
  240. package/dist/lib/shiki.js +103 -0
  241. package/dist/lib/shiki.js.map +1 -0
  242. package/dist/lib/ui/Callout.js +1 -1
  243. package/dist/lib/ui/Callout.js.map +1 -1
  244. package/dist/lib/ui/CodeBlock.d.ts +16 -0
  245. package/dist/lib/ui/CodeBlock.js +18 -0
  246. package/dist/lib/ui/CodeBlock.js.map +1 -0
  247. package/dist/lib/ui/Form.d.ts +1 -1
  248. package/dist/lib/ui/SyntaxHighlight.d.ts +10 -15
  249. package/dist/lib/ui/SyntaxHighlight.js +12 -60
  250. package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
  251. package/dist/lib/util/MdxComponents.d.ts +10 -3
  252. package/dist/lib/util/MdxComponents.js +11 -10
  253. package/dist/lib/util/MdxComponents.js.map +1 -1
  254. package/dist/lib/util/detectOS.d.ts +1 -0
  255. package/dist/lib/util/detectOS.js +11 -0
  256. package/dist/lib/util/detectOS.js.map +1 -0
  257. package/dist/lib/util/ensureArray.d.ts +1 -0
  258. package/dist/lib/util/ensureArray.js +2 -0
  259. package/dist/lib/util/ensureArray.js.map +1 -0
  260. package/dist/lib/util/traverse.d.ts +1 -1
  261. package/dist/lib/util/traverse.js +6 -5
  262. package/dist/lib/util/traverse.js.map +1 -1
  263. package/dist/lib/util/url.d.ts +4 -0
  264. package/dist/lib/util/url.js +13 -0
  265. package/dist/lib/util/url.js.map +1 -0
  266. package/dist/lib/util/url.test.js +26 -0
  267. package/dist/lib/util/url.test.js.map +1 -0
  268. package/dist/vite/api/SchemaManager.d.ts +36 -0
  269. package/dist/vite/api/SchemaManager.js +122 -0
  270. package/dist/vite/api/SchemaManager.js.map +1 -0
  271. package/dist/vite/api/SchemaManager.test.d.ts +1 -0
  272. package/dist/vite/api/SchemaManager.test.js +106 -0
  273. package/dist/vite/api/SchemaManager.test.js.map +1 -0
  274. package/dist/vite/api/schema-codegen.js +10 -6
  275. package/dist/vite/api/schema-codegen.js.map +1 -1
  276. package/dist/vite/build.js +2 -9
  277. package/dist/vite/build.js.map +1 -1
  278. package/dist/vite/config.js +56 -17
  279. package/dist/vite/config.js.map +1 -1
  280. package/dist/vite/dev-server.d.ts +0 -1
  281. package/dist/vite/dev-server.js +12 -12
  282. package/dist/vite/dev-server.js.map +1 -1
  283. package/dist/vite/html.d.ts +6 -2
  284. package/dist/vite/html.js +11 -8
  285. package/dist/vite/html.js.map +1 -1
  286. package/dist/vite/plugin-api.js +52 -106
  287. package/dist/vite/plugin-api.js.map +1 -1
  288. package/dist/vite/plugin-config-reload.js +6 -3
  289. package/dist/vite/plugin-config-reload.js.map +1 -1
  290. package/dist/vite/plugin-mdx.js +4 -11
  291. package/dist/vite/plugin-mdx.js.map +1 -1
  292. package/dist/vite/plugin-search.js +1 -1
  293. package/dist/vite/plugin-search.js.map +1 -1
  294. package/dist/vite/plugin-shiki-register.d.ts +3 -0
  295. package/dist/vite/plugin-shiki-register.js +38 -0
  296. package/dist/vite/plugin-shiki-register.js.map +1 -0
  297. package/dist/vite/plugin-sidebar.d.ts +3 -1
  298. package/dist/vite/plugin-sidebar.js +9 -3
  299. package/dist/vite/plugin-sidebar.js.map +1 -1
  300. package/dist/vite/plugin.js +2 -0
  301. package/dist/vite/plugin.js.map +1 -1
  302. package/dist/vite/prerender/FileWritingResponse.d.ts +9 -5
  303. package/dist/vite/prerender/FileWritingResponse.js +5 -5
  304. package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
  305. package/dist/vite/prerender/InMemoryResponse.d.ts +16 -0
  306. package/dist/vite/prerender/InMemoryResponse.js +32 -0
  307. package/dist/vite/prerender/InMemoryResponse.js.map +1 -0
  308. package/dist/vite/prerender/PrerenderResponse.d.ts +10 -0
  309. package/dist/vite/prerender/PrerenderResponse.js +2 -0
  310. package/dist/vite/prerender/PrerenderResponse.js.map +1 -0
  311. package/dist/vite/prerender/prerender.d.ts +1 -0
  312. package/dist/vite/prerender/prerender.js +24 -5
  313. package/dist/vite/prerender/prerender.js.map +1 -1
  314. package/dist/vite/prerender/worker.js +36 -8
  315. package/dist/vite/prerender/worker.js.map +1 -1
  316. package/dist/zuplo/enrich-with-zuplo.d.ts +3 -3
  317. package/dist/zuplo/enrich-with-zuplo.js +18 -17
  318. package/dist/zuplo/enrich-with-zuplo.js.map +1 -1
  319. package/dist/zuplo/with-zuplo-processors.d.ts +2 -2
  320. package/dist/zuplo/with-zuplo-processors.js +7 -7
  321. package/dist/zuplo/with-zuplo-processors.js.map +1 -1
  322. package/dist/zuplo/with-zuplo.d.ts +4 -1
  323. package/dist/zuplo/with-zuplo.js +6 -5
  324. package/dist/zuplo/with-zuplo.js.map +1 -1
  325. package/lib/AuthenticationPlugin-B9ZLD8dq.js +90 -0
  326. package/lib/AuthenticationPlugin-B9ZLD8dq.js.map +1 -0
  327. package/lib/{Button-Fp19CMUr.js → Button-Bdk_Ij3U.js} +4 -4
  328. package/lib/{Button-Fp19CMUr.js.map → Button-Bdk_Ij3U.js.map} +1 -1
  329. package/lib/{Callout-D5frCCJ0.js → Callout-hI9CHaoU.js} +20 -19
  330. package/lib/{Callout-D5frCCJ0.js.map → Callout-hI9CHaoU.js.map} +1 -1
  331. package/lib/Card-BlCYNw5W.js +61 -0
  332. package/lib/Card-BlCYNw5W.js.map +1 -0
  333. package/lib/{CategoryHeading-DpB47wvk.js → CategoryHeading-DZi-Szor.js} +3 -3
  334. package/lib/{CategoryHeading-DpB47wvk.js.map → CategoryHeading-DZi-Szor.js.map} +1 -1
  335. package/lib/{Dialog-Dv6WG8RN.js → Dialog-qJtc4-PZ.js} +8 -8
  336. package/lib/{Dialog-Dv6WG8RN.js.map → Dialog-qJtc4-PZ.js.map} +1 -1
  337. package/lib/{Drawer-kDAfOq_2.js → Drawer-BPBxzel2.js} +26 -26
  338. package/lib/Drawer-BPBxzel2.js.map +1 -0
  339. package/lib/Markdown-D3MUf20w.js +7691 -0
  340. package/lib/Markdown-D3MUf20w.js.map +1 -0
  341. package/lib/MdxPage-qSYniGrR.js +84 -0
  342. package/lib/MdxPage-qSYniGrR.js.map +1 -0
  343. package/lib/OasProvider-BHyIG4Ge.js +33 -0
  344. package/lib/{OasProvider-OlYb8W57.js.map → OasProvider-BHyIG4Ge.js.map} +1 -1
  345. package/lib/{OperationList-BvfIzVRx.js → OperationList-CfVK_S-T.js} +2055 -1978
  346. package/lib/OperationList-CfVK_S-T.js.map +1 -0
  347. package/lib/Pagination-CjsamWJW.js +48 -0
  348. package/lib/Pagination-CjsamWJW.js.map +1 -0
  349. package/lib/RouteGuard-ChX1tPqA.js +55 -0
  350. package/lib/RouteGuard-ChX1tPqA.js.map +1 -0
  351. package/lib/{SchemaList-Bi35O4XD.js → SchemaList-BZRVKC7J.js} +60 -48
  352. package/lib/SchemaList-BZRVKC7J.js.map +1 -0
  353. package/lib/SchemaView-Db5jA7z7.js +375 -0
  354. package/lib/SchemaView-Db5jA7z7.js.map +1 -0
  355. package/lib/Select-CaRC4cvg.js +211 -0
  356. package/lib/{Select-DVFRKf1R.js.map → Select-CaRC4cvg.js.map} +1 -1
  357. package/lib/SlotletProvider-ZhDNaV0q.js +257 -0
  358. package/lib/SlotletProvider-ZhDNaV0q.js.map +1 -0
  359. package/lib/{Spinner-CE68iCm0.js → Spinner-mNLZ6awP.js} +2 -2
  360. package/lib/{Spinner-CE68iCm0.js.map → Spinner-mNLZ6awP.js.map} +1 -1
  361. package/lib/SyntaxHighlight-IcJTpNbL.js +9107 -0
  362. package/lib/SyntaxHighlight-IcJTpNbL.js.map +1 -0
  363. package/lib/{Toc-YBsgI72s.js → Toc-B0gpT6e6.js} +19 -19
  364. package/lib/Toc-B0gpT6e6.js.map +1 -0
  365. package/lib/{chunk-HA7DTUK3-C4gP41vD.js → chunk-BAXFHI7N-C9WnHsLV.js} +715 -697
  366. package/lib/chunk-BAXFHI7N-C9WnHsLV.js.map +1 -0
  367. package/lib/{circular-ByJI6Mci.js → circular-BGxf3iUW.js} +4224 -5172
  368. package/lib/circular-BGxf3iUW.js.map +1 -0
  369. package/lib/{cn-qaFjX9_3.js → cn-CwJPJKOE.js} +28 -29
  370. package/lib/{cn-qaFjX9_3.js.map → cn-CwJPJKOE.js.map} +1 -1
  371. package/lib/{createServer-mMau3eV_.js → createServer-C1kGUn7C.js} +4509 -4443
  372. package/lib/createServer-C1kGUn7C.js.map +1 -0
  373. package/lib/hook-CqYKERnR.js +1442 -0
  374. package/lib/hook-CqYKERnR.js.map +1 -0
  375. package/lib/{index-DwT-v3zK.js → index--oeBayMa.js} +2 -2
  376. package/lib/{index-DwT-v3zK.js.map → index--oeBayMa.js.map} +1 -1
  377. package/lib/{index-LNp6rxyU.js → index-BvvmIczU.js} +2 -2
  378. package/lib/{index-LNp6rxyU.js.map → index-BvvmIczU.js.map} +1 -1
  379. package/lib/index-CrcNWbel.js +316 -0
  380. package/lib/index-CrcNWbel.js.map +1 -0
  381. package/lib/index-D1LYvDiD.js +3158 -0
  382. package/lib/index-D1LYvDiD.js.map +1 -0
  383. package/lib/index-LSPm9Daf.js +4976 -0
  384. package/lib/index-LSPm9Daf.js.map +1 -0
  385. package/lib/{index-CPNSgwSb.js → index-Z13x6tPX.js} +5 -5
  386. package/lib/{index-CPNSgwSb.js.map → index-Z13x6tPX.js.map} +1 -1
  387. package/lib/{index-Dl3Yl0yb.js → index-zddirpDj.js} +621 -636
  388. package/lib/index-zddirpDj.js.map +1 -0
  389. package/lib/index.esm-BFcSKCe-.js +683 -0
  390. package/lib/index.esm-BFcSKCe-.js.map +1 -0
  391. package/lib/index.esm-D2ZUREQN.js +1216 -0
  392. package/lib/index.esm-D2ZUREQN.js.map +1 -0
  393. package/lib/invariant-DAFpPywt.js +48 -0
  394. package/lib/{invariant-Caa8-XvF.js.map → invariant-DAFpPywt.js.map} +1 -1
  395. package/lib/jsx-runtime-C5mzlN2N.js +285 -0
  396. package/lib/jsx-runtime-C5mzlN2N.js.map +1 -0
  397. package/lib/mutation-DpoXF3gn.js +196 -0
  398. package/lib/mutation-DpoXF3gn.js.map +1 -0
  399. package/lib/objectEntries-yMIkr2mI.js +5 -0
  400. package/lib/objectEntries-yMIkr2mI.js.map +1 -0
  401. package/lib/{post-processors → processors}/removeExtensions.js +1 -1
  402. package/lib/processors/removeExtensions.js.map +1 -0
  403. package/lib/processors/removeParameters.js +47 -0
  404. package/lib/processors/removeParameters.js.map +1 -0
  405. package/lib/processors/removePaths.js +28 -0
  406. package/lib/processors/removePaths.js.map +1 -0
  407. package/lib/processors/traverse.js +17 -0
  408. package/lib/processors/traverse.js.map +1 -0
  409. package/lib/ui/Accordion.js +2 -2
  410. package/lib/ui/ActionButton.js +4 -4
  411. package/lib/ui/Alert.js +3 -3
  412. package/lib/ui/AlertDialog.js +2 -2
  413. package/lib/ui/Badge.js +3 -3
  414. package/lib/ui/Breadcrumb.js +2 -2
  415. package/lib/ui/Button.js +3 -3
  416. package/lib/ui/Callout.js +9 -8
  417. package/lib/ui/Callout.js.map +1 -1
  418. package/lib/ui/Card.js +2 -2
  419. package/lib/ui/Carousel.js +348 -348
  420. package/lib/ui/Carousel.js.map +1 -1
  421. package/lib/ui/Checkbox.js +2 -2
  422. package/lib/ui/CodeBlock.js +83 -0
  423. package/lib/ui/CodeBlock.js.map +1 -0
  424. package/lib/ui/Command.js +58 -58
  425. package/lib/ui/Command.js.map +1 -1
  426. package/lib/ui/Dialog.js +2 -2
  427. package/lib/ui/Drawer.js +3 -3
  428. package/lib/ui/DropdownMenu.js +2 -2
  429. package/lib/ui/Form.js +3 -3
  430. package/lib/ui/HoverCard.js +2 -2
  431. package/lib/ui/Input.js +2 -2
  432. package/lib/ui/Label.js +3 -3
  433. package/lib/ui/Pagination.js +2 -2
  434. package/lib/ui/Popover.js +2 -2
  435. package/lib/ui/Progress.js +2 -2
  436. package/lib/ui/RadioGroup.js +2 -2
  437. package/lib/ui/ScrollArea.js +2 -2
  438. package/lib/ui/Select.js +2 -2
  439. package/lib/ui/Skeleton.js +2 -2
  440. package/lib/ui/Slider.js +2 -2
  441. package/lib/ui/Stepper.js +1 -1
  442. package/lib/ui/Switch.js +2 -2
  443. package/lib/ui/SyntaxHighlight.js +6 -7
  444. package/lib/ui/SyntaxHighlight.js.map +1 -1
  445. package/lib/ui/Tabs.js +11 -11
  446. package/lib/ui/Textarea.js +2 -2
  447. package/lib/ui/Toggle.js +3 -3
  448. package/lib/ui/ToggleGroup.js +2 -2
  449. package/lib/ui/Tooltip.js +2 -2
  450. package/lib/ui/util.js +1 -1
  451. package/lib/{useExposedProps-B9qXJedG.js → useExposedProps-DG8J6ewJ.js} +2 -2
  452. package/lib/{useExposedProps-B9qXJedG.js.map → useExposedProps-DG8J6ewJ.js.map} +1 -1
  453. package/lib/useLatest-hmRS46UF.js +11 -0
  454. package/lib/useLatest-hmRS46UF.js.map +1 -0
  455. package/lib/zudoku.auth-auth0.js +28 -31
  456. package/lib/zudoku.auth-auth0.js.map +1 -1
  457. package/lib/zudoku.auth-clerk.js +66 -72
  458. package/lib/zudoku.auth-clerk.js.map +1 -1
  459. package/lib/zudoku.auth-openid.js +493 -494
  460. package/lib/zudoku.auth-openid.js.map +1 -1
  461. package/lib/zudoku.components.js +31 -28
  462. package/lib/zudoku.components.js.map +1 -1
  463. package/lib/zudoku.hooks.js +2 -2
  464. package/lib/zudoku.icons.js +1 -1
  465. package/lib/zudoku.plugin-api-catalog.js +59 -65
  466. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  467. package/lib/zudoku.plugin-api-keys.js +10 -10
  468. package/lib/zudoku.plugin-custom-pages.js +4 -4
  469. package/lib/zudoku.plugin-markdown.js +25 -28
  470. package/lib/zudoku.plugin-markdown.js.map +1 -1
  471. package/lib/zudoku.plugin-openapi.js +7 -6
  472. package/lib/zudoku.plugin-redirect.js +1 -1
  473. package/lib/zudoku.plugin-search-inkeep.js +26 -27
  474. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  475. package/lib/zudoku.plugin-search-pagefind.js +111 -119
  476. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  477. package/package.json +81 -72
  478. package/src/app/ZuploBuildConfig.ts +33 -0
  479. package/src/app/demo.html +1 -1
  480. package/src/app/entry.client.tsx +43 -0
  481. package/src/app/entry.server.tsx +6 -3
  482. package/src/app/env.ts +35 -0
  483. package/src/app/main.css +64 -7
  484. package/src/app/main.tsx +24 -1
  485. package/src/lib/authentication/components/CallbackHandler.tsx +11 -1
  486. package/src/lib/authentication/components/SignIn.tsx +35 -2
  487. package/src/lib/authentication/components/SignUp.tsx +35 -1
  488. package/src/lib/authentication/providers/auth0.tsx +1 -1
  489. package/src/lib/authentication/providers/clerk.tsx +16 -12
  490. package/src/lib/authentication/providers/openid.tsx +20 -27
  491. package/src/lib/components/Banner.tsx +1 -1
  492. package/src/lib/components/Bootstrap.tsx +13 -6
  493. package/src/lib/components/BuildCheck.tsx +75 -0
  494. package/src/lib/components/Footer.tsx +136 -0
  495. package/src/lib/components/Header.tsx +3 -3
  496. package/src/lib/components/Heading.tsx +3 -3
  497. package/src/lib/components/Layout.tsx +10 -4
  498. package/src/lib/components/Main.tsx +7 -5
  499. package/src/lib/components/Markdown.tsx +29 -24
  500. package/src/lib/components/MobileTopNavigation.tsx +29 -20
  501. package/src/lib/components/Pagination.tsx +7 -4
  502. package/src/lib/components/Search.tsx +14 -3
  503. package/src/lib/components/TopNavigation.tsx +3 -3
  504. package/src/lib/components/Zudoku.tsx +3 -3
  505. package/src/lib/components/context/BypassProtectedRoutesContext.ts +3 -0
  506. package/src/lib/components/context/ViewportAnchorContext.tsx +8 -15
  507. package/src/lib/components/context/ZudokuContext.ts +2 -3
  508. package/src/lib/components/index.ts +2 -0
  509. package/src/lib/components/navigation/PoweredByZudoku.tsx +33 -0
  510. package/src/lib/components/navigation/Sidebar.tsx +33 -38
  511. package/src/lib/components/navigation/SidebarCategory.tsx +9 -5
  512. package/src/lib/components/navigation/SidebarItem.tsx +2 -3
  513. package/src/lib/components/navigation/SidebarWrapper.tsx +37 -16
  514. package/src/lib/components/navigation/Toc.tsx +4 -4
  515. package/src/lib/components/navigation/ZudokuLogo.tsx +25 -0
  516. package/src/lib/components/navigation/ZuploLogo.tsx +14 -0
  517. package/src/lib/core/RouteGuard.tsx +26 -4
  518. package/src/lib/core/ZudokuContext.ts +14 -2
  519. package/src/lib/errors/ErrorAlert.tsx +1 -1
  520. package/src/lib/oas/graphql/circular.ts +27 -19
  521. package/src/lib/oas/parser/index.ts +7 -1
  522. package/src/lib/oas/parser/upgrade/index.ts +98 -28
  523. package/src/lib/plugins/api-catalog/Catalog.tsx +1 -4
  524. package/src/lib/plugins/markdown/MdxPage.tsx +3 -2
  525. package/src/lib/plugins/openapi/CollapsibleCode.tsx +7 -4
  526. package/src/lib/plugins/openapi/ColorizedParam.tsx +1 -1
  527. package/src/lib/plugins/openapi/OperationList.tsx +28 -17
  528. package/src/lib/plugins/openapi/OperationListItem.tsx +23 -42
  529. package/src/lib/plugins/openapi/ParamInfos.tsx +4 -1
  530. package/src/lib/plugins/openapi/ParameterListItem.tsx +32 -0
  531. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +5 -16
  532. package/src/lib/plugins/openapi/SchemaList.tsx +19 -7
  533. package/src/lib/plugins/openapi/Sidecar.tsx +36 -3
  534. package/src/lib/plugins/openapi/SidecarExamples.tsx +8 -2
  535. package/src/lib/plugins/openapi/client/useCreateQuery.ts +23 -4
  536. package/src/lib/plugins/openapi/components/ConstValue.tsx +24 -0
  537. package/src/lib/plugins/openapi/components/EnumValues.tsx +1 -1
  538. package/src/lib/plugins/openapi/components/ResponseContent.tsx +104 -0
  539. package/src/lib/plugins/openapi/index.tsx +8 -7
  540. package/src/lib/plugins/openapi/interfaces.ts +4 -3
  541. package/src/lib/plugins/openapi/playground/Headers.tsx +2 -2
  542. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +22 -35
  543. package/src/lib/plugins/openapi/playground/Playground.tsx +5 -5
  544. package/src/lib/plugins/openapi/playground/QueryParams.tsx +4 -4
  545. package/src/lib/plugins/openapi/playground/SubmitButton.tsx +2 -2
  546. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +2 -2
  547. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +1 -1
  548. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +1 -1
  549. package/src/lib/plugins/openapi/{post-processors → processors}/removeExtensions.test.ts +29 -9
  550. package/src/lib/plugins/openapi/{post-processors → processors}/removeExtensions.ts +5 -3
  551. package/src/lib/plugins/openapi/{post-processors → processors}/removeParameters.test.ts +67 -33
  552. package/src/lib/plugins/openapi/{post-processors → processors}/removeParameters.ts +5 -3
  553. package/src/lib/plugins/openapi/processors/removePaths.test.ts +167 -0
  554. package/src/lib/plugins/openapi/{post-processors → processors}/removePaths.ts +5 -3
  555. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +1 -8
  556. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +3 -0
  557. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +6 -3
  558. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +39 -0
  559. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +45 -34
  560. package/src/lib/plugins/openapi/schema/SchemaView.tsx +91 -143
  561. package/src/lib/plugins/openapi/schema/utils.ts +29 -6
  562. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +51 -1
  563. package/src/lib/plugins/openapi/util/getRoutes.tsx +87 -15
  564. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +11 -4
  565. package/src/lib/plugins/search-pagefind/ResultList.tsx +5 -16
  566. package/src/lib/plugins/search-pagefind/index.tsx +1 -1
  567. package/src/lib/shiki.ts +133 -0
  568. package/src/lib/ui/Callout.tsx +2 -1
  569. package/src/lib/ui/CodeBlock.tsx +102 -0
  570. package/src/lib/ui/SyntaxHighlight.tsx +23 -182
  571. package/src/lib/util/MdxComponents.tsx +29 -14
  572. package/src/lib/util/detectOS.ts +9 -0
  573. package/src/lib/util/ensureArray.ts +3 -0
  574. package/src/lib/util/traverse.ts +8 -5
  575. package/src/lib/util/url.test.ts +51 -0
  576. package/src/lib/util/url.ts +18 -0
  577. package/src/shiki/langs/abap.js +1 -0
  578. package/src/shiki/langs/actionscript-3.js +1 -0
  579. package/src/shiki/langs/ada.js +1 -0
  580. package/src/shiki/langs/angular-expression.js +1 -0
  581. package/src/shiki/langs/angular-html.js +1 -0
  582. package/src/shiki/langs/angular-inline-style.js +1 -0
  583. package/src/shiki/langs/angular-inline-template.js +1 -0
  584. package/src/shiki/langs/angular-let-declaration.js +1 -0
  585. package/src/shiki/langs/angular-template-blocks.js +1 -0
  586. package/src/shiki/langs/angular-template.js +1 -0
  587. package/src/shiki/langs/angular-ts.js +1 -0
  588. package/src/shiki/langs/apache.js +1 -0
  589. package/src/shiki/langs/apex.js +1 -0
  590. package/src/shiki/langs/apl.js +1 -0
  591. package/src/shiki/langs/applescript.js +1 -0
  592. package/src/shiki/langs/ara.js +1 -0
  593. package/src/shiki/langs/asciidoc.js +1 -0
  594. package/src/shiki/langs/asm.js +1 -0
  595. package/src/shiki/langs/astro.js +1 -0
  596. package/src/shiki/langs/awk.js +1 -0
  597. package/src/shiki/langs/ballerina.js +1 -0
  598. package/src/shiki/langs/bat.js +1 -0
  599. package/src/shiki/langs/beancount.js +1 -0
  600. package/src/shiki/langs/berry.js +1 -0
  601. package/src/shiki/langs/bibtex.js +1 -0
  602. package/src/shiki/langs/bicep.js +1 -0
  603. package/src/shiki/langs/blade.js +1 -0
  604. package/src/shiki/langs/bsl.js +1 -0
  605. package/src/shiki/langs/c.js +1 -0
  606. package/src/shiki/langs/cadence.js +1 -0
  607. package/src/shiki/langs/cairo.js +1 -0
  608. package/src/shiki/langs/clarity.js +1 -0
  609. package/src/shiki/langs/clojure.js +1 -0
  610. package/src/shiki/langs/cmake.js +1 -0
  611. package/src/shiki/langs/cobol.js +1 -0
  612. package/src/shiki/langs/codeowners.js +1 -0
  613. package/src/shiki/langs/codeql.js +1 -0
  614. package/src/shiki/langs/coffee.js +1 -0
  615. package/src/shiki/langs/common-lisp.js +1 -0
  616. package/src/shiki/langs/coq.js +1 -0
  617. package/src/shiki/langs/cpp-macro.js +1 -0
  618. package/src/shiki/langs/cpp.js +1 -0
  619. package/src/shiki/langs/crystal.js +1 -0
  620. package/src/shiki/langs/csharp.js +1 -0
  621. package/src/shiki/langs/css.js +1 -0
  622. package/src/shiki/langs/csv.js +1 -0
  623. package/src/shiki/langs/cue.js +1 -0
  624. package/src/shiki/langs/cypher.js +1 -0
  625. package/src/shiki/langs/d.js +1 -0
  626. package/src/shiki/langs/dart.js +1 -0
  627. package/src/shiki/langs/dax.js +1 -0
  628. package/src/shiki/langs/desktop.js +1 -0
  629. package/src/shiki/langs/diff.js +1 -0
  630. package/src/shiki/langs/docker.js +1 -0
  631. package/src/shiki/langs/dotenv.js +1 -0
  632. package/src/shiki/langs/dream-maker.js +1 -0
  633. package/src/shiki/langs/edge.js +1 -0
  634. package/src/shiki/langs/elixir.js +1 -0
  635. package/src/shiki/langs/elm.js +1 -0
  636. package/src/shiki/langs/emacs-lisp.js +1 -0
  637. package/src/shiki/langs/erb.js +1 -0
  638. package/src/shiki/langs/erlang.js +1 -0
  639. package/src/shiki/langs/es-tag-css.js +1 -0
  640. package/src/shiki/langs/es-tag-glsl.js +1 -0
  641. package/src/shiki/langs/es-tag-html.js +1 -0
  642. package/src/shiki/langs/es-tag-sql.js +1 -0
  643. package/src/shiki/langs/es-tag-xml.js +1 -0
  644. package/src/shiki/langs/fennel.js +1 -0
  645. package/src/shiki/langs/fish.js +1 -0
  646. package/src/shiki/langs/fluent.js +1 -0
  647. package/src/shiki/langs/fortran-fixed-form.js +1 -0
  648. package/src/shiki/langs/fortran-free-form.js +1 -0
  649. package/src/shiki/langs/fsharp.js +1 -0
  650. package/src/shiki/langs/gdresource.js +1 -0
  651. package/src/shiki/langs/gdscript.js +1 -0
  652. package/src/shiki/langs/gdshader.js +1 -0
  653. package/src/shiki/langs/genie.js +1 -0
  654. package/src/shiki/langs/gherkin.js +1 -0
  655. package/src/shiki/langs/git-commit.js +1 -0
  656. package/src/shiki/langs/git-rebase.js +1 -0
  657. package/src/shiki/langs/gleam.js +1 -0
  658. package/src/shiki/langs/glimmer-js.js +1 -0
  659. package/src/shiki/langs/glimmer-ts.js +1 -0
  660. package/src/shiki/langs/glsl.js +1 -0
  661. package/src/shiki/langs/gnuplot.js +1 -0
  662. package/src/shiki/langs/go.js +1 -0
  663. package/src/shiki/langs/graphql.js +1 -0
  664. package/src/shiki/langs/groovy.js +1 -0
  665. package/src/shiki/langs/hack.js +1 -0
  666. package/src/shiki/langs/haml.js +1 -0
  667. package/src/shiki/langs/handlebars.js +1 -0
  668. package/src/shiki/langs/haskell.js +1 -0
  669. package/src/shiki/langs/haxe.js +1 -0
  670. package/src/shiki/langs/hcl.js +1 -0
  671. package/src/shiki/langs/hjson.js +1 -0
  672. package/src/shiki/langs/hlsl.js +1 -0
  673. package/src/shiki/langs/html-derivative.js +1 -0
  674. package/src/shiki/langs/html.js +1 -0
  675. package/src/shiki/langs/http.js +1 -0
  676. package/src/shiki/langs/hxml.js +1 -0
  677. package/src/shiki/langs/hy.js +1 -0
  678. package/src/shiki/langs/imba.js +1 -0
  679. package/src/shiki/langs/ini.js +1 -0
  680. package/src/shiki/langs/java.js +1 -0
  681. package/src/shiki/langs/javascript.js +1 -0
  682. package/src/shiki/langs/jinja-html.js +1 -0
  683. package/src/shiki/langs/jinja.js +1 -0
  684. package/src/shiki/langs/jison.js +1 -0
  685. package/src/shiki/langs/json.js +1 -0
  686. package/src/shiki/langs/json5.js +1 -0
  687. package/src/shiki/langs/jsonc.js +1 -0
  688. package/src/shiki/langs/jsonl.js +1 -0
  689. package/src/shiki/langs/jsonnet.js +1 -0
  690. package/src/shiki/langs/jssm.js +1 -0
  691. package/src/shiki/langs/jsx.js +1 -0
  692. package/src/shiki/langs/julia.js +1 -0
  693. package/src/shiki/langs/kotlin.js +1 -0
  694. package/src/shiki/langs/kusto.js +1 -0
  695. package/src/shiki/langs/latex.js +1 -0
  696. package/src/shiki/langs/lean.js +1 -0
  697. package/src/shiki/langs/less.js +1 -0
  698. package/src/shiki/langs/liquid.js +1 -0
  699. package/src/shiki/langs/llvm.js +1 -0
  700. package/src/shiki/langs/log.js +1 -0
  701. package/src/shiki/langs/logo.js +1 -0
  702. package/src/shiki/langs/lua.js +1 -0
  703. package/src/shiki/langs/luau.js +1 -0
  704. package/src/shiki/langs/make.js +1 -0
  705. package/src/shiki/langs/markdown-vue.js +1 -0
  706. package/src/shiki/langs/markdown.js +1 -0
  707. package/src/shiki/langs/marko.js +1 -0
  708. package/src/shiki/langs/matlab.js +1 -0
  709. package/src/shiki/langs/mdc.js +1 -0
  710. package/src/shiki/langs/mdx.js +1 -0
  711. package/src/shiki/langs/mermaid.js +1 -0
  712. package/src/shiki/langs/mipsasm.js +1 -0
  713. package/src/shiki/langs/mojo.js +1 -0
  714. package/src/shiki/langs/move.js +1 -0
  715. package/src/shiki/langs/narrat.js +1 -0
  716. package/src/shiki/langs/nextflow.js +1 -0
  717. package/src/shiki/langs/nginx.js +1 -0
  718. package/src/shiki/langs/nim.js +1 -0
  719. package/src/shiki/langs/nix.js +1 -0
  720. package/src/shiki/langs/nushell.js +1 -0
  721. package/src/shiki/langs/objective-c.js +1 -0
  722. package/src/shiki/langs/objective-cpp.js +1 -0
  723. package/src/shiki/langs/ocaml.js +1 -0
  724. package/src/shiki/langs/pascal.js +1 -0
  725. package/src/shiki/langs/perl.js +1 -0
  726. package/src/shiki/langs/php.js +1 -0
  727. package/src/shiki/langs/plsql.js +1 -0
  728. package/src/shiki/langs/po.js +1 -0
  729. package/src/shiki/langs/polar.js +1 -0
  730. package/src/shiki/langs/postcss.js +1 -0
  731. package/src/shiki/langs/powerquery.js +1 -0
  732. package/src/shiki/langs/powershell.js +1 -0
  733. package/src/shiki/langs/prisma.js +1 -0
  734. package/src/shiki/langs/prolog.js +1 -0
  735. package/src/shiki/langs/proto.js +1 -0
  736. package/src/shiki/langs/pug.js +1 -0
  737. package/src/shiki/langs/puppet.js +1 -0
  738. package/src/shiki/langs/purescript.js +1 -0
  739. package/src/shiki/langs/python.js +1 -0
  740. package/src/shiki/langs/qml.js +1 -0
  741. package/src/shiki/langs/qmldir.js +1 -0
  742. package/src/shiki/langs/qss.js +1 -0
  743. package/src/shiki/langs/r.js +1 -0
  744. package/src/shiki/langs/racket.js +1 -0
  745. package/src/shiki/langs/raku.js +1 -0
  746. package/src/shiki/langs/razor.js +1 -0
  747. package/src/shiki/langs/reg.js +1 -0
  748. package/src/shiki/langs/regexp.js +1 -0
  749. package/src/shiki/langs/rel.js +1 -0
  750. package/src/shiki/langs/riscv.js +1 -0
  751. package/src/shiki/langs/rst.js +1 -0
  752. package/src/shiki/langs/ruby.js +1 -0
  753. package/src/shiki/langs/rust.js +1 -0
  754. package/src/shiki/langs/sas.js +1 -0
  755. package/src/shiki/langs/sass.js +1 -0
  756. package/src/shiki/langs/scala.js +1 -0
  757. package/src/shiki/langs/scheme.js +1 -0
  758. package/src/shiki/langs/scss.js +1 -0
  759. package/src/shiki/langs/sdbl.js +1 -0
  760. package/src/shiki/langs/shaderlab.js +1 -0
  761. package/src/shiki/langs/shellscript.js +1 -0
  762. package/src/shiki/langs/shellsession.js +1 -0
  763. package/src/shiki/langs/smalltalk.js +1 -0
  764. package/src/shiki/langs/solidity.js +1 -0
  765. package/src/shiki/langs/soy.js +1 -0
  766. package/src/shiki/langs/sparql.js +1 -0
  767. package/src/shiki/langs/splunk.js +1 -0
  768. package/src/shiki/langs/sql.js +1 -0
  769. package/src/shiki/langs/ssh-config.js +1 -0
  770. package/src/shiki/langs/stata.js +1 -0
  771. package/src/shiki/langs/stylus.js +1 -0
  772. package/src/shiki/langs/svelte.js +1 -0
  773. package/src/shiki/langs/swift.js +1 -0
  774. package/src/shiki/langs/system-verilog.js +1 -0
  775. package/src/shiki/langs/systemd.js +1 -0
  776. package/src/shiki/langs/talonscript.js +1 -0
  777. package/src/shiki/langs/tasl.js +1 -0
  778. package/src/shiki/langs/tcl.js +1 -0
  779. package/src/shiki/langs/templ.js +1 -0
  780. package/src/shiki/langs/terraform.js +1 -0
  781. package/src/shiki/langs/tex.js +1 -0
  782. package/src/shiki/langs/toml.js +1 -0
  783. package/src/shiki/langs/ts-tags.js +1 -0
  784. package/src/shiki/langs/tsv.js +1 -0
  785. package/src/shiki/langs/tsx.js +1 -0
  786. package/src/shiki/langs/turtle.js +1 -0
  787. package/src/shiki/langs/twig.js +1 -0
  788. package/src/shiki/langs/typescript.js +1 -0
  789. package/src/shiki/langs/typespec.js +1 -0
  790. package/src/shiki/langs/typst.js +1 -0
  791. package/src/shiki/langs/v.js +1 -0
  792. package/src/shiki/langs/vala.js +1 -0
  793. package/src/shiki/langs/vb.js +1 -0
  794. package/src/shiki/langs/verilog.js +1 -0
  795. package/src/shiki/langs/vhdl.js +1 -0
  796. package/src/shiki/langs/viml.js +1 -0
  797. package/src/shiki/langs/vue-directives.js +1 -0
  798. package/src/shiki/langs/vue-html.js +1 -0
  799. package/src/shiki/langs/vue-interpolations.js +1 -0
  800. package/src/shiki/langs/vue-sfc-style-variable-injection.js +1 -0
  801. package/src/shiki/langs/vue.js +1 -0
  802. package/src/shiki/langs/vyper.js +1 -0
  803. package/src/shiki/langs/wasm.js +1 -0
  804. package/src/shiki/langs/wenyan.js +1 -0
  805. package/src/shiki/langs/wgsl.js +1 -0
  806. package/src/shiki/langs/wikitext.js +1 -0
  807. package/src/shiki/langs/wit.js +1 -0
  808. package/src/shiki/langs/wolfram.js +1 -0
  809. package/src/shiki/langs/xml.js +1 -0
  810. package/src/shiki/langs/xsl.js +1 -0
  811. package/src/shiki/langs/yaml.js +1 -0
  812. package/src/shiki/langs/zenscript.js +1 -0
  813. package/src/shiki/langs/zig.js +1 -0
  814. package/src/shiki/themes/andromeeda.js +1 -0
  815. package/src/shiki/themes/aurora-x.js +1 -0
  816. package/src/shiki/themes/ayu-dark.js +1 -0
  817. package/src/shiki/themes/catppuccin-frappe.js +1 -0
  818. package/src/shiki/themes/catppuccin-latte.js +1 -0
  819. package/src/shiki/themes/catppuccin-macchiato.js +1 -0
  820. package/src/shiki/themes/catppuccin-mocha.js +1 -0
  821. package/src/shiki/themes/dark-plus.js +1 -0
  822. package/src/shiki/themes/dracula-soft.js +1 -0
  823. package/src/shiki/themes/dracula.js +1 -0
  824. package/src/shiki/themes/everforest-dark.js +1 -0
  825. package/src/shiki/themes/everforest-light.js +1 -0
  826. package/src/shiki/themes/github-dark-default.js +1 -0
  827. package/src/shiki/themes/github-dark-dimmed.js +1 -0
  828. package/src/shiki/themes/github-dark-high-contrast.js +1 -0
  829. package/src/shiki/themes/github-dark.js +1 -0
  830. package/src/shiki/themes/github-light-default.js +1 -0
  831. package/src/shiki/themes/github-light-high-contrast.js +1 -0
  832. package/src/shiki/themes/github-light.js +1 -0
  833. package/src/shiki/themes/gruvbox-dark-hard.js +1 -0
  834. package/src/shiki/themes/gruvbox-dark-medium.js +1 -0
  835. package/src/shiki/themes/gruvbox-dark-soft.js +1 -0
  836. package/src/shiki/themes/gruvbox-light-hard.js +1 -0
  837. package/src/shiki/themes/gruvbox-light-medium.js +1 -0
  838. package/src/shiki/themes/gruvbox-light-soft.js +1 -0
  839. package/src/shiki/themes/houston.js +1 -0
  840. package/src/shiki/themes/kanagawa-dragon.js +1 -0
  841. package/src/shiki/themes/kanagawa-lotus.js +1 -0
  842. package/src/shiki/themes/kanagawa-wave.js +1 -0
  843. package/src/shiki/themes/laserwave.js +1 -0
  844. package/src/shiki/themes/light-plus.js +1 -0
  845. package/src/shiki/themes/material-theme-darker.js +1 -0
  846. package/src/shiki/themes/material-theme-lighter.js +1 -0
  847. package/src/shiki/themes/material-theme-ocean.js +1 -0
  848. package/src/shiki/themes/material-theme-palenight.js +1 -0
  849. package/src/shiki/themes/material-theme.js +1 -0
  850. package/src/shiki/themes/min-dark.js +1 -0
  851. package/src/shiki/themes/min-light.js +1 -0
  852. package/src/shiki/themes/monokai.js +1 -0
  853. package/src/shiki/themes/night-owl.js +1 -0
  854. package/src/shiki/themes/nord.js +1 -0
  855. package/src/shiki/themes/one-dark-pro.js +1 -0
  856. package/src/shiki/themes/one-light.js +1 -0
  857. package/src/shiki/themes/plastic.js +1 -0
  858. package/src/shiki/themes/poimandres.js +1 -0
  859. package/src/shiki/themes/red.js +1 -0
  860. package/src/shiki/themes/rose-pine-dawn.js +1 -0
  861. package/src/shiki/themes/rose-pine-moon.js +1 -0
  862. package/src/shiki/themes/rose-pine.js +1 -0
  863. package/src/shiki/themes/slack-dark.js +1 -0
  864. package/src/shiki/themes/slack-ochin.js +1 -0
  865. package/src/shiki/themes/snazzy-light.js +1 -0
  866. package/src/shiki/themes/solarized-dark.js +1 -0
  867. package/src/shiki/themes/solarized-light.js +1 -0
  868. package/src/shiki/themes/synthwave-84.js +1 -0
  869. package/src/shiki/themes/tokyo-night.js +1 -0
  870. package/src/shiki/themes/vesper.js +1 -0
  871. package/src/shiki/themes/vitesse-black.js +1 -0
  872. package/src/shiki/themes/vitesse-dark.js +1 -0
  873. package/src/shiki/themes/vitesse-light.js +1 -0
  874. package/client.d.ts +0 -8
  875. package/dist/cli/dev/pagefind-command.d.ts +0 -3
  876. package/dist/cli/dev/pagefind-command.js +0 -59
  877. package/dist/cli/dev/pagefind-command.js.map +0 -1
  878. package/dist/lib/components/context/PluginSystem.js +0 -2
  879. package/dist/lib/components/context/PluginSystem.js.map +0 -1
  880. package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +0 -7
  881. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +0 -1
  882. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +0 -1
  883. package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +0 -1
  884. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +0 -1
  885. package/dist/lib/plugins/openapi/post-processors/removePaths.js.map +0 -1
  886. package/dist/lib/plugins/openapi/post-processors/removePaths.test.js +0 -104
  887. package/dist/lib/plugins/openapi/post-processors/removePaths.test.js.map +0 -1
  888. package/dist/lib/plugins/openapi/post-processors/traverse.js.map +0 -1
  889. package/dist/zuplo/env.d.ts +0 -7
  890. package/dist/zuplo/env.js +0 -12
  891. package/dist/zuplo/env.js.map +0 -1
  892. package/lib/AuthenticationPlugin-foqdvvkf.js +0 -58
  893. package/lib/AuthenticationPlugin-foqdvvkf.js.map +0 -1
  894. package/lib/Drawer-kDAfOq_2.js.map +0 -1
  895. package/lib/Markdown-aF5FdsNi.js +0 -16960
  896. package/lib/Markdown-aF5FdsNi.js.map +0 -1
  897. package/lib/MdxPage-ZW1StNhp.js +0 -83
  898. package/lib/MdxPage-ZW1StNhp.js.map +0 -1
  899. package/lib/OasProvider-OlYb8W57.js +0 -34
  900. package/lib/OperationList-BvfIzVRx.js.map +0 -1
  901. package/lib/Pagination-CYB3nVYx.js +0 -46
  902. package/lib/Pagination-CYB3nVYx.js.map +0 -1
  903. package/lib/SchemaList-Bi35O4XD.js.map +0 -1
  904. package/lib/SchemaView-D7MC5cjz.js +0 -356
  905. package/lib/SchemaView-D7MC5cjz.js.map +0 -1
  906. package/lib/Select-DVFRKf1R.js +0 -223
  907. package/lib/SlotletProvider-DXvc0aY6.js +0 -338
  908. package/lib/SlotletProvider-DXvc0aY6.js.map +0 -1
  909. package/lib/SyntaxHighlight-BEoSoPEo.js +0 -2890
  910. package/lib/SyntaxHighlight-BEoSoPEo.js.map +0 -1
  911. package/lib/Toc-YBsgI72s.js.map +0 -1
  912. package/lib/_commonjsHelpers-BkfeUUK-.js +0 -29
  913. package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
  914. package/lib/chunk-HA7DTUK3-C4gP41vD.js.map +0 -1
  915. package/lib/circular-ByJI6Mci.js.map +0 -1
  916. package/lib/context-DLCwaMXN.js +0 -22
  917. package/lib/context-DLCwaMXN.js.map +0 -1
  918. package/lib/createServer-mMau3eV_.js.map +0 -1
  919. package/lib/hook-CqpVYDqN.js +0 -1483
  920. package/lib/hook-CqpVYDqN.js.map +0 -1
  921. package/lib/index-Bt7MKhZq.js +0 -2514
  922. package/lib/index-Bt7MKhZq.js.map +0 -1
  923. package/lib/index-CXfEwK_7.js +0 -2226
  924. package/lib/index-CXfEwK_7.js.map +0 -1
  925. package/lib/index-Dl3Yl0yb.js.map +0 -1
  926. package/lib/index-gQD2h1wX.js +0 -447
  927. package/lib/index-gQD2h1wX.js.map +0 -1
  928. package/lib/index.esm--gIChbWs.js +0 -1207
  929. package/lib/index.esm--gIChbWs.js.map +0 -1
  930. package/lib/invariant-Caa8-XvF.js +0 -26
  931. package/lib/jsx-runtime-CYK1ROHF.js +0 -446
  932. package/lib/jsx-runtime-CYK1ROHF.js.map +0 -1
  933. package/lib/mutation-8LjrN7uz.js +0 -208
  934. package/lib/mutation-8LjrN7uz.js.map +0 -1
  935. package/lib/objectEntries-BS7aAgOm.js +0 -12
  936. package/lib/objectEntries-BS7aAgOm.js.map +0 -1
  937. package/lib/post-processors/removeExtensions.js.map +0 -1
  938. package/lib/post-processors/removeParameters.js +0 -48
  939. package/lib/post-processors/removeParameters.js.map +0 -1
  940. package/lib/post-processors/removePaths.js +0 -28
  941. package/lib/post-processors/removePaths.js.map +0 -1
  942. package/lib/post-processors/traverse.js +0 -15
  943. package/lib/post-processors/traverse.js.map +0 -1
  944. package/lib/prism-bash.min-HHIMdNJ_.js +0 -7
  945. package/lib/prism-bash.min-HHIMdNJ_.js.map +0 -1
  946. package/lib/prism-csharp.min-bQAo2pmx.js +0 -63
  947. package/lib/prism-csharp.min-bQAo2pmx.js.map +0 -1
  948. package/lib/prism-java.min-BpvsOuIa.js +0 -35
  949. package/lib/prism-java.min-BpvsOuIa.js.map +0 -1
  950. package/lib/prism-javascript.min-CEqHqgbm.js +0 -9
  951. package/lib/prism-javascript.min-CEqHqgbm.js.map +0 -1
  952. package/lib/prism-json.min-B1GJqK1k.js +0 -2
  953. package/lib/prism-json.min-B1GJqK1k.js.map +0 -1
  954. package/lib/prism-jsstacktrace.min-BfobCF2F.js +0 -2
  955. package/lib/prism-jsstacktrace.min-BfobCF2F.js.map +0 -1
  956. package/lib/prism-markdown.min-C0Qn0m-5.js +0 -61
  957. package/lib/prism-markdown.min-C0Qn0m-5.js.map +0 -1
  958. package/lib/prism-markup-BNGj0Tvm.js +0 -174
  959. package/lib/prism-markup-BNGj0Tvm.js.map +0 -1
  960. package/lib/prism-objectivec.min-BXSWqpJJ.js +0 -2
  961. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +0 -1
  962. package/lib/prism-ruby.min-Dx9KO9ds.js +0 -38
  963. package/lib/prism-ruby.min-Dx9KO9ds.js.map +0 -1
  964. package/lib/prism-typescript.min-CD7H2IYQ.js +0 -34
  965. package/lib/prism-typescript.min-CD7H2IYQ.js.map +0 -1
  966. package/src/lib/components/context/PluginSystem.ts +0 -0
  967. package/src/lib/plugins/openapi/post-processors/removePaths.test.ts +0 -126
  968. /package/dist/lib/plugins/openapi/{post-processors → processors}/removeExtensions.test.d.ts +0 -0
  969. /package/dist/lib/plugins/openapi/{post-processors → processors}/removeParameters.test.d.ts +0 -0
  970. /package/dist/lib/plugins/openapi/{post-processors → processors}/removePaths.test.d.ts +0 -0
  971. /package/dist/lib/plugins/openapi/{post-processors → processors}/traverse.d.ts +0 -0
  972. /package/dist/lib/plugins/openapi/{post-processors → processors}/traverse.js +0 -0
  973. /package/dist/lib/{components/context/PluginSystem.d.ts → util/url.test.d.ts} +0 -0
  974. /package/src/lib/plugins/openapi/{post-processors → processors}/traverse.ts +0 -0
@@ -1,21 +1,18 @@
1
- var Le = Object.defineProperty;
2
- var xe = (t, e, n) => e in t ? Le(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var b = (t, e, n) => xe(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { j as B } from "./jsx-runtime-CYK1ROHF.js";
5
- import { g as Ce } from "./_commonjsHelpers-BkfeUUK-.js";
6
- import { C as Ie } from "./ClientOnly-E7hGysn1.js";
7
- import { d as je, f as ie, u as x } from "./hook-CqpVYDqN.js";
8
- import { A as Je } from "./AuthenticationPlugin-foqdvvkf.js";
9
- import { N as Oe } from "./chunk-HA7DTUK3-C4gP41vD.js";
10
- import { Z as ze } from "./invariant-Caa8-XvF.js";
11
- var D = { exports: {} }, De = D.exports, ae;
12
- function Ne() {
13
- return ae || (ae = 1, function(t) {
1
+ import { j as M } from "./jsx-runtime-C5mzlN2N.js";
2
+ import { g as Pe, Z as Ue } from "./invariant-DAFpPywt.js";
3
+ import { C as Le } from "./ClientOnly-E7hGysn1.js";
4
+ import { d as xe, f as he, u as L } from "./hook-CqYKERnR.js";
5
+ import { A as Ce } from "./AuthenticationPlugin-B9ZLD8dq.js";
6
+ import { N as Ie } from "./chunk-BAXFHI7N-C9WnHsLV.js";
7
+ import { a as je } from "./index-LSPm9Daf.js";
8
+ var z = { exports: {} }, Oe = z.exports, re;
9
+ function ze() {
10
+ return re || (re = 1, function(t) {
14
11
  (function(e, n) {
15
12
  t.exports ? t.exports = n() : e.log = n();
16
- })(De, function() {
13
+ })(Oe, function() {
17
14
  var e = function() {
18
- }, n = "undefined", o = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), a = [
15
+ }, n = "undefined", o = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), s = [
19
16
  "trace",
20
17
  "debug",
21
18
  "info",
@@ -34,79 +31,79 @@ function Ne() {
34
31
  };
35
32
  }
36
33
  }
37
- function p() {
34
+ function f() {
38
35
  console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
39
36
  }
40
- function w(l) {
41
- return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ? p : console[l] !== void 0 ? c(console, l) : console.log !== void 0 ? c(console, "log") : e;
37
+ function y(l) {
38
+ 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;
42
39
  }
43
- function f() {
44
- for (var l = this.getLevel(), m = 0; m < a.length; m++) {
45
- var u = a[m];
40
+ function p() {
41
+ for (var l = this.getLevel(), m = 0; m < s.length; m++) {
42
+ var u = s[m];
46
43
  this[u] = m < l ? e : this.methodFactory(u, l, this.name);
47
44
  }
48
45
  if (this.log = this.debug, typeof console === n && l < this.levels.SILENT)
49
46
  return "No console available for logging";
50
47
  }
51
- function v(l) {
48
+ function A(l) {
52
49
  return function() {
53
- typeof console !== n && (f.call(this), this[l].apply(this, arguments));
50
+ typeof console !== n && (p.call(this), this[l].apply(this, arguments));
54
51
  };
55
52
  }
56
- function _(l, m, u) {
57
- return w(l) || v.apply(this, arguments);
53
+ function b(l, m, u) {
54
+ return y(l) || A.apply(this, arguments);
58
55
  }
59
56
  function h(l, m) {
60
- var u = this, J, $, U, S = "loglevel";
61
- typeof l == "string" ? S += ":" + l : typeof l == "symbol" && (S = void 0);
62
- function Re(d) {
63
- var y = (a[d] || "silent").toUpperCase();
64
- if (!(typeof window === n || !S)) {
57
+ var u = this, j, K, P, _ = "loglevel";
58
+ typeof l == "string" ? _ += ":" + l : typeof l == "symbol" && (_ = void 0);
59
+ function ke(d) {
60
+ var g = (s[d] || "silent").toUpperCase();
61
+ if (!(typeof window === n || !_)) {
65
62
  try {
66
- window.localStorage[S] = y;
63
+ window.localStorage[_] = g;
67
64
  return;
68
65
  } catch {
69
66
  }
70
67
  try {
71
- window.document.cookie = encodeURIComponent(S) + "=" + y + ";";
68
+ window.document.cookie = encodeURIComponent(_) + "=" + g + ";";
72
69
  } catch {
73
70
  }
74
71
  }
75
72
  }
76
- function ne() {
73
+ function ee() {
77
74
  var d;
78
- if (!(typeof window === n || !S)) {
75
+ if (!(typeof window === n || !_)) {
79
76
  try {
80
- d = window.localStorage[S];
77
+ d = window.localStorage[_];
81
78
  } catch {
82
79
  }
83
80
  if (typeof d === n)
84
81
  try {
85
- var y = window.document.cookie, O = encodeURIComponent(S), oe = y.indexOf(O + "=");
86
- oe !== -1 && (d = /^([^;]+)/.exec(
87
- y.slice(oe + O.length + 1)
82
+ var g = window.document.cookie, O = encodeURIComponent(_), ne = g.indexOf(O + "=");
83
+ ne !== -1 && (d = /^([^;]+)/.exec(
84
+ g.slice(ne + O.length + 1)
88
85
  )[1]);
89
86
  } catch {
90
87
  }
91
88
  return u.levels[d] === void 0 && (d = void 0), d;
92
89
  }
93
90
  }
94
- function Pe() {
95
- if (!(typeof window === n || !S)) {
91
+ function Ee() {
92
+ if (!(typeof window === n || !_)) {
96
93
  try {
97
- window.localStorage.removeItem(S);
94
+ window.localStorage.removeItem(_);
98
95
  } catch {
99
96
  }
100
97
  try {
101
- window.document.cookie = encodeURIComponent(S) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
98
+ window.document.cookie = encodeURIComponent(_) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
102
99
  } catch {
103
100
  }
104
101
  }
105
102
  }
106
- function L(d) {
107
- var y = d;
108
- if (typeof y == "string" && u.levels[y.toUpperCase()] !== void 0 && (y = u.levels[y.toUpperCase()]), typeof y == "number" && y >= 0 && y <= u.levels.SILENT)
109
- return y;
103
+ function U(d) {
104
+ var g = d;
105
+ if (typeof g == "string" && u.levels[g.toUpperCase()] !== void 0 && (g = u.levels[g.toUpperCase()]), typeof g == "number" && g >= 0 && g <= u.levels.SILENT)
106
+ return g;
110
107
  throw new TypeError("log.setLevel() called with invalid level: " + d);
111
108
  }
112
109
  u.name = l, u.levels = {
@@ -116,27 +113,27 @@ function Ne() {
116
113
  WARN: 3,
117
114
  ERROR: 4,
118
115
  SILENT: 5
119
- }, u.methodFactory = m || _, u.getLevel = function() {
120
- return U ?? $ ?? J;
121
- }, u.setLevel = function(d, y) {
122
- return U = L(d), y !== !1 && Re(U), f.call(u);
116
+ }, u.methodFactory = m || b, u.getLevel = function() {
117
+ return P ?? K ?? j;
118
+ }, u.setLevel = function(d, g) {
119
+ return P = U(d), g !== !1 && ke(P), p.call(u);
123
120
  }, u.setDefaultLevel = function(d) {
124
- $ = L(d), ne() || u.setLevel(d, !1);
121
+ K = U(d), ee() || u.setLevel(d, !1);
125
122
  }, u.resetLevel = function() {
126
- U = null, Pe(), f.call(u);
123
+ P = null, Ee(), p.call(u);
127
124
  }, u.enableAll = function(d) {
128
125
  u.setLevel(u.levels.TRACE, d);
129
126
  }, u.disableAll = function(d) {
130
127
  u.setLevel(u.levels.SILENT, d);
131
128
  }, u.rebuild = function() {
132
- if (i !== u && (J = L(i.getLevel())), f.call(u), i === u)
129
+ if (i !== u && (j = U(i.getLevel())), p.call(u), i === u)
133
130
  for (var d in r)
134
131
  r[d].rebuild();
135
- }, J = L(
132
+ }, j = U(
136
133
  i ? i.getLevel() : "WARN"
137
134
  );
138
- var re = ne();
139
- re != null && (U = L(re)), f.call(u);
135
+ var te = ee();
136
+ te != null && (P = U(te)), p.call(u);
140
137
  }
141
138
  i = new h(), i.getLogger = function(m) {
142
139
  if (typeof m != "symbol" && typeof m != "string" || m === "")
@@ -147,21 +144,20 @@ function Ne() {
147
144
  i.methodFactory
148
145
  )), u;
149
146
  };
150
- var P = typeof window !== n ? window.log : void 0;
147
+ var R = typeof window !== n ? window.log : void 0;
151
148
  return i.noConflict = function() {
152
- return typeof window !== n && window.log === i && (window.log = P), i;
149
+ return typeof window !== n && window.log === i && (window.log = R), i;
153
150
  }, i.getLoggers = function() {
154
151
  return r;
155
152
  }, i.default = i, i;
156
153
  });
157
- }(D)), D.exports;
158
- }
159
- var We = Ne();
160
- const se = /* @__PURE__ */ Ce(We);
161
- let V;
162
- var z, we;
163
- (typeof navigator > "u" || !((we = (z = navigator.userAgent) == null ? void 0 : z.startsWith) != null && we.call(z, "Mozilla/5.0 "))) && (V = "oauth4webapi/v2.17.0");
164
- function Y(t, e) {
154
+ }(z)), z.exports;
155
+ }
156
+ var Je = ze();
157
+ const oe = /* @__PURE__ */ Pe(Je);
158
+ let B;
159
+ (typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (B = "oauth4webapi/v2.17.0");
160
+ function V(t, e) {
165
161
  if (t == null)
166
162
  return !1;
167
163
  try {
@@ -170,32 +166,32 @@ function Y(t, e) {
170
166
  return !1;
171
167
  }
172
168
  }
173
- const W = Symbol(), Ke = Symbol(), Z = Symbol(), He = Symbol(), $e = Symbol(), Fe = Symbol(), Me = new TextEncoder(), qe = new TextDecoder();
174
- function E(t) {
175
- return typeof t == "string" ? Me.encode(t) : qe.decode(t);
169
+ const D = Symbol(), De = Symbol(), G = Symbol(), Ne = Symbol(), We = Symbol(), Ke = Symbol(), He = new TextEncoder(), $e = new TextDecoder();
170
+ function k(t) {
171
+ return typeof t == "string" ? He.encode(t) : $e.decode(t);
176
172
  }
177
- const ce = 32768;
178
- function Be(t) {
173
+ const ie = 32768;
174
+ function Fe(t) {
179
175
  t instanceof ArrayBuffer && (t = new Uint8Array(t));
180
176
  const e = [];
181
- for (let n = 0; n < t.byteLength; n += ce)
182
- e.push(String.fromCharCode.apply(null, t.subarray(n, n + ce)));
177
+ for (let n = 0; n < t.byteLength; n += ie)
178
+ e.push(String.fromCharCode.apply(null, t.subarray(n, n + ie)));
183
179
  return btoa(e.join("")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
184
180
  }
185
- function Ve(t) {
181
+ function Me(t) {
186
182
  try {
187
183
  const e = atob(t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "")), n = new Uint8Array(e.length);
188
184
  for (let o = 0; o < e.length; o++)
189
185
  n[o] = e.charCodeAt(o);
190
186
  return n;
191
187
  } catch (e) {
192
- throw new s("The input to be decoded is not correctly encoded.", { cause: e });
188
+ throw new a("The input to be decoded is not correctly encoded.", { cause: e });
193
189
  }
194
190
  }
195
- function k(t) {
196
- return typeof t == "string" ? Ve(t) : Be(t);
191
+ function T(t) {
192
+ return typeof t == "string" ? Me(t) : Fe(t);
197
193
  }
198
- class Ge {
194
+ class Be {
199
195
  constructor(e) {
200
196
  this.cache = /* @__PURE__ */ new Map(), this._cache = /* @__PURE__ */ new Map(), this.maxSize = e;
201
197
  }
@@ -219,60 +215,58 @@ class Ge {
219
215
  this.cache.set(e, n), this.cache.size >= this.maxSize && (this._cache = this.cache, this.cache = /* @__PURE__ */ new Map());
220
216
  }
221
217
  }
222
- class T extends Error {
218
+ class v extends Error {
223
219
  constructor(e) {
224
- var n;
225
- super(e ?? "operation not supported"), this.name = this.constructor.name, (n = Error.captureStackTrace) == null || n.call(Error, this, this.constructor);
220
+ super(e ?? "operation not supported"), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
226
221
  }
227
222
  }
228
- class Ye extends Error {
223
+ class qe extends Error {
229
224
  constructor(e, n) {
230
- var o;
231
- super(e, n), this.name = this.constructor.name, (o = Error.captureStackTrace) == null || o.call(Error, this, this.constructor);
225
+ super(e, n), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
232
226
  }
233
227
  }
234
- const s = Ye, ge = new Ge(100);
235
- function me(t) {
228
+ const a = qe, fe = new Be(100);
229
+ function pe(t) {
236
230
  return t instanceof CryptoKey;
237
231
  }
238
- function Ze(t) {
239
- return me(t) && t.type === "private";
232
+ function Ve(t) {
233
+ return pe(t) && t.type === "private";
240
234
  }
241
- function Qe(t) {
242
- return me(t) && t.type === "public";
235
+ function Ge(t) {
236
+ return pe(t) && t.type === "public";
243
237
  }
244
- function Q(t) {
238
+ function Z(t) {
245
239
  try {
246
240
  const e = t.headers.get("dpop-nonce");
247
- e && ge.set(new URL(t.url).origin, e);
241
+ e && fe.set(new URL(t.url).origin, e);
248
242
  } catch {
249
243
  }
250
244
  return t;
251
245
  }
252
- function C(t) {
246
+ function x(t) {
253
247
  return !(t === null || typeof t != "object" || Array.isArray(t));
254
248
  }
255
- function K(t) {
256
- Y(t, Headers) && (t = Object.fromEntries(t.entries()));
249
+ function N(t) {
250
+ V(t, Headers) && (t = Object.fromEntries(t.entries()));
257
251
  const e = new Headers(t);
258
- if (V && !e.has("user-agent") && e.set("user-agent", V), e.has("authorization"))
252
+ if (B && !e.has("user-agent") && e.set("user-agent", B), e.has("authorization"))
259
253
  throw new TypeError('"options.headers" must not include the "authorization" header name');
260
254
  if (e.has("dpop"))
261
255
  throw new TypeError('"options.headers" must not include the "dpop" header name');
262
256
  return e;
263
257
  }
264
- function Xe(t) {
258
+ function Ze(t) {
265
259
  if (typeof t == "function" && (t = t()), !(t instanceof AbortSignal))
266
260
  throw new TypeError('"options.signal" must return or be an instance of AbortSignal');
267
261
  return t;
268
262
  }
269
- async function et(t, e) {
263
+ async function Ye(t, e) {
270
264
  if (!(t instanceof URL))
271
265
  throw new TypeError('"issuerIdentifier" must be an instance of URL');
272
266
  if (t.protocol !== "https:" && t.protocol !== "http:")
273
267
  throw new TypeError('"issuer.protocol" must be "https:" or "http:"');
274
268
  const n = new URL(t.href);
275
- switch (e == null ? void 0 : e.algorithm) {
269
+ switch (e?.algorithm) {
276
270
  case void 0:
277
271
  case "oidc":
278
272
  n.pathname = `${n.pathname}/.well-known/openid-configuration`.replace("//", "/");
@@ -283,61 +277,61 @@ async function et(t, e) {
283
277
  default:
284
278
  throw new TypeError('"options.algorithm" must be "oidc" (default), or "oauth2"');
285
279
  }
286
- const o = K(e == null ? void 0 : e.headers);
287
- return o.set("accept", "application/json"), ((e == null ? void 0 : e[Z]) || fetch)(n.href, {
280
+ const o = N(e?.headers);
281
+ return o.set("accept", "application/json"), (e?.[G] || fetch)(n.href, {
288
282
  headers: Object.fromEntries(o.entries()),
289
283
  method: "GET",
290
284
  redirect: "manual",
291
285
  signal: null
292
- }).then(Q);
286
+ }).then(Z);
293
287
  }
294
- function g(t) {
288
+ function w(t) {
295
289
  return typeof t == "string" && t.length !== 0;
296
290
  }
297
- async function tt(t, e) {
291
+ async function Qe(t, e) {
298
292
  if (!(t instanceof URL))
299
293
  throw new TypeError('"expectedIssuer" must be an instance of URL');
300
- if (!Y(e, Response))
294
+ if (!V(e, Response))
301
295
  throw new TypeError('"response" must be an instance of Response');
302
296
  if (e.status !== 200)
303
- throw new s('"response" is not a conform Authorization Server Metadata response');
304
- te(e);
297
+ throw new a('"response" is not a conform Authorization Server Metadata response');
298
+ X(e);
305
299
  let n;
306
300
  try {
307
301
  n = await e.json();
308
302
  } catch (o) {
309
- throw new s('failed to parse "response" body as JSON', { cause: o });
303
+ throw new a('failed to parse "response" body as JSON', { cause: o });
310
304
  }
311
- if (!C(n))
312
- throw new s('"response" body must be a top level object');
313
- if (!g(n.issuer))
314
- throw new s('"response" body "issuer" property must be a non-empty string');
305
+ if (!x(n))
306
+ throw new a('"response" body must be a top level object');
307
+ if (!w(n.issuer))
308
+ throw new a('"response" body "issuer" property must be a non-empty string');
315
309
  if (new URL(n.issuer).href !== t.href)
316
- throw new s('"response" body "issuer" does not match "expectedIssuer"');
310
+ throw new a('"response" body "issuer" does not match "expectedIssuer"');
317
311
  return n;
318
312
  }
319
- function X() {
320
- return k(crypto.getRandomValues(new Uint8Array(32)));
313
+ function Y() {
314
+ return T(crypto.getRandomValues(new Uint8Array(32)));
321
315
  }
322
- function nt() {
323
- return X();
316
+ function Xe() {
317
+ return Y();
324
318
  }
325
- function rt() {
326
- return X();
319
+ function et() {
320
+ return Y();
327
321
  }
328
- async function ot(t) {
329
- if (!g(t))
322
+ async function tt(t) {
323
+ if (!w(t))
330
324
  throw new TypeError('"codeVerifier" must be a non-empty string');
331
- return k(await crypto.subtle.digest("SHA-256", E(t)));
325
+ return T(await crypto.subtle.digest("SHA-256", k(t)));
332
326
  }
333
- function ue(t) {
327
+ function se(t) {
334
328
  return encodeURIComponent(t).replace(/%20/g, "+");
335
329
  }
336
- function it(t, e) {
337
- const n = ue(t), o = ue(e);
330
+ function nt(t, e) {
331
+ const n = se(t), o = se(e);
338
332
  return `Basic ${btoa(`${n}:${o}`)}`;
339
333
  }
340
- function at(t) {
334
+ function rt(t) {
341
335
  switch (t.algorithm.hash.name) {
342
336
  case "SHA-256":
343
337
  return "PS256";
@@ -346,10 +340,10 @@ function at(t) {
346
340
  case "SHA-512":
347
341
  return "PS512";
348
342
  default:
349
- throw new T("unsupported RsaHashedKeyAlgorithm hash name");
343
+ throw new v("unsupported RsaHashedKeyAlgorithm hash name");
350
344
  }
351
345
  }
352
- function st(t) {
346
+ function ot(t) {
353
347
  switch (t.algorithm.hash.name) {
354
348
  case "SHA-256":
355
349
  return "RS256";
@@ -358,10 +352,10 @@ function st(t) {
358
352
  case "SHA-512":
359
353
  return "RS512";
360
354
  default:
361
- throw new T("unsupported RsaHashedKeyAlgorithm hash name");
355
+ throw new v("unsupported RsaHashedKeyAlgorithm hash name");
362
356
  }
363
357
  }
364
- function ct(t) {
358
+ function it(t) {
365
359
  switch (t.algorithm.namedCurve) {
366
360
  case "P-256":
367
361
  return "ES256";
@@ -370,268 +364,267 @@ function ct(t) {
370
364
  case "P-521":
371
365
  return "ES512";
372
366
  default:
373
- throw new T("unsupported EcKeyAlgorithm namedCurve");
367
+ throw new v("unsupported EcKeyAlgorithm namedCurve");
374
368
  }
375
369
  }
376
- function ut(t) {
370
+ function st(t) {
377
371
  switch (t.algorithm.name) {
378
372
  case "RSA-PSS":
379
- return at(t);
373
+ return rt(t);
380
374
  case "RSASSA-PKCS1-v1_5":
381
- return st(t);
375
+ return ot(t);
382
376
  case "ECDSA":
383
- return ct(t);
377
+ return it(t);
384
378
  case "Ed25519":
385
379
  case "Ed448":
386
380
  return "EdDSA";
387
381
  default:
388
- throw new T("unsupported CryptoKey algorithm name");
382
+ throw new v("unsupported CryptoKey algorithm name");
389
383
  }
390
384
  }
391
- function H(t) {
392
- const e = t == null ? void 0 : t[W];
385
+ function W(t) {
386
+ const e = t?.[D];
393
387
  return typeof e == "number" && Number.isFinite(e) ? e : 0;
394
388
  }
395
- function ye(t) {
396
- const e = t == null ? void 0 : t[Ke];
389
+ function we(t) {
390
+ const e = t?.[De];
397
391
  return typeof e == "number" && Number.isFinite(e) && Math.sign(e) !== -1 ? e : 30;
398
392
  }
399
- function ee() {
393
+ function Q() {
400
394
  return Math.floor(Date.now() / 1e3);
401
395
  }
402
- function I(t) {
396
+ function C(t) {
403
397
  if (typeof t != "object" || t === null)
404
398
  throw new TypeError('"as" must be an object');
405
- if (!g(t.issuer))
399
+ if (!w(t.issuer))
406
400
  throw new TypeError('"as.issuer" property must be a non-empty string');
407
401
  return !0;
408
402
  }
409
- function j(t) {
403
+ function I(t) {
410
404
  if (typeof t != "object" || t === null)
411
405
  throw new TypeError('"client" must be an object');
412
- if (!g(t.client_id))
406
+ if (!w(t.client_id))
413
407
  throw new TypeError('"client.client_id" property must be a non-empty string');
414
408
  return !0;
415
409
  }
416
- function le(t) {
417
- if (!g(t))
410
+ function ae(t) {
411
+ if (!w(t))
418
412
  throw new TypeError('"client.client_secret" property must be a non-empty string');
419
413
  return t;
420
414
  }
421
- function de(t, e) {
415
+ function ce(t, e) {
422
416
  if (e !== void 0)
423
417
  throw new TypeError(`"client.client_secret" property must not be provided when ${t} client authentication method is used.`);
424
418
  }
425
- async function lt(t, e, n, o, a) {
419
+ async function at(t, e, n, o, s) {
426
420
  switch (n.delete("client_secret"), n.delete("client_assertion_type"), n.delete("client_assertion"), e.token_endpoint_auth_method) {
427
421
  case void 0:
428
422
  case "client_secret_basic": {
429
- o.set("authorization", it(e.client_id, le(e.client_secret)));
423
+ o.set("authorization", nt(e.client_id, ae(e.client_secret)));
430
424
  break;
431
425
  }
432
426
  case "client_secret_post": {
433
- n.set("client_id", e.client_id), n.set("client_secret", le(e.client_secret));
427
+ n.set("client_id", e.client_id), n.set("client_secret", ae(e.client_secret));
434
428
  break;
435
429
  }
436
430
  case "private_key_jwt":
437
- throw de("private_key_jwt", e.client_secret), new TypeError('"options.clientPrivateKey" must be provided when "client.token_endpoint_auth_method" is "private_key_jwt"');
431
+ 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"');
438
432
  case "tls_client_auth":
439
433
  case "self_signed_tls_client_auth":
440
434
  case "none": {
441
- de(e.token_endpoint_auth_method, e.client_secret), e.token_endpoint_auth_method, n.set("client_id", e.client_id);
435
+ ce(e.token_endpoint_auth_method, e.client_secret), e.token_endpoint_auth_method, n.set("client_id", e.client_id);
442
436
  break;
443
437
  }
444
438
  default:
445
- throw new T("unsupported client token_endpoint_auth_method");
439
+ throw new v("unsupported client token_endpoint_auth_method");
446
440
  }
447
441
  }
448
- async function dt(t, e, n) {
442
+ async function ct(t, e, n) {
449
443
  if (!n.usages.includes("sign"))
450
444
  throw new TypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"');
451
- const o = `${k(E(JSON.stringify(t)))}.${k(E(JSON.stringify(e)))}`, a = k(await crypto.subtle.sign(ke(n), n, E(o)));
452
- return `${o}.${a}`;
445
+ const o = `${T(k(JSON.stringify(t)))}.${T(k(JSON.stringify(e)))}`, s = T(await crypto.subtle.sign(Se(n), n, k(o)));
446
+ return `${o}.${s}`;
453
447
  }
454
- async function ht(t, e, n, o, a, r) {
455
- var _;
456
- const { privateKey: i, publicKey: c, nonce: p = ge.get(n.origin) } = e;
457
- if (!Ze(i))
448
+ async function ut(t, e, n, o, s, r) {
449
+ const { privateKey: i, publicKey: c, nonce: f = fe.get(n.origin) } = e;
450
+ if (!Ve(i))
458
451
  throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
459
- if (!Qe(c))
452
+ if (!Ge(c))
460
453
  throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');
461
- if (p !== void 0 && !g(p))
454
+ if (f !== void 0 && !w(f))
462
455
  throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');
463
456
  if (!c.extractable)
464
457
  throw new TypeError('"DPoP.publicKey.extractable" must be true');
465
- const w = ee() + a, f = {
466
- alg: ut(i),
458
+ const y = Q() + s, p = {
459
+ alg: st(i),
467
460
  typ: "dpop+jwt",
468
- jwk: await pt(c)
469
- }, v = {
470
- iat: w,
471
- jti: X(),
461
+ jwk: await dt(c)
462
+ }, A = {
463
+ iat: y,
464
+ jti: Y(),
472
465
  htm: o,
473
- nonce: p,
466
+ nonce: f,
474
467
  htu: `${n.origin}${n.pathname}`,
475
- ath: r ? k(await crypto.subtle.digest("SHA-256", E(r))) : void 0
468
+ ath: r ? T(await crypto.subtle.digest("SHA-256", k(r))) : void 0
476
469
  };
477
- (_ = e[He]) == null || _.call(e, f, v), t.set("dpop", await dt(f, v, i));
470
+ e[Ne]?.(p, A), t.set("dpop", await ct(p, A, i));
478
471
  }
479
- let N;
480
- async function ft(t) {
481
- const { kty: e, e: n, n: o, x: a, y: r, crv: i } = await crypto.subtle.exportKey("jwk", t), c = { kty: e, e: n, n: o, x: a, y: r, crv: i };
482
- return N.set(t, c), c;
472
+ let J;
473
+ async function lt(t) {
474
+ 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 };
475
+ return J.set(t, c), c;
483
476
  }
484
- async function pt(t) {
485
- return N || (N = /* @__PURE__ */ new WeakMap()), N.get(t) || ft(t);
477
+ async function dt(t) {
478
+ return J || (J = /* @__PURE__ */ new WeakMap()), J.get(t) || lt(t);
486
479
  }
487
- function he(t, e, n) {
480
+ function ue(t, e, n) {
488
481
  if (typeof t != "string")
489
482
  throw n ? new TypeError(`"as.mtls_endpoint_aliases.${e}" must be a string`) : new TypeError(`"as.${e}" must be a string`);
490
483
  return new URL(t);
491
484
  }
492
- function be(t, e, n = !1) {
493
- return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ? he(t.mtls_endpoint_aliases[e], e, n) : he(t[e], e, n);
485
+ function me(t, e, n = !1) {
486
+ 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);
494
487
  }
495
- function _e(t, e) {
496
- return !!(t.use_mtls_endpoint_aliases || e != null && e[Fe]);
488
+ function ge(t, e) {
489
+ return !!(t.use_mtls_endpoint_aliases || e?.[Ke]);
497
490
  }
498
- function G(t) {
491
+ function q(t) {
499
492
  const e = t;
500
493
  return typeof e != "object" || Array.isArray(e) || e === null ? !1 : e.error !== void 0;
501
494
  }
502
- async function wt(t, e, n, o, a, r) {
503
- if (!g(t))
495
+ async function ht(t, e, n, o, s, r) {
496
+ if (!w(t))
504
497
  throw new TypeError('"accessToken" must be a non-empty string');
505
498
  if (!(n instanceof URL))
506
499
  throw new TypeError('"url" must be an instance of URL');
507
- return o = K(o), (r == null ? void 0 : r.DPoP) === void 0 ? o.set("authorization", `Bearer ${t}`) : (await ht(o, r.DPoP, n, e.toUpperCase(), H({ [W]: r == null ? void 0 : r[W] }), t), o.set("authorization", `DPoP ${t}`)), ((r == null ? void 0 : r[Z]) || fetch)(n.href, {
508
- body: a,
500
+ return o = N(o), r?.DPoP === void 0 ? o.set("authorization", `Bearer ${t}`) : (await ut(o, r.DPoP, n, e.toUpperCase(), W({ [D]: r?.[D] }), t), o.set("authorization", `DPoP ${t}`)), (r?.[G] || fetch)(n.href, {
501
+ body: s,
509
502
  headers: Object.fromEntries(o.entries()),
510
503
  method: e,
511
504
  redirect: "manual",
512
- signal: r != null && r.signal ? Xe(r.signal) : null
513
- }).then(Q);
505
+ signal: r?.signal ? Ze(r.signal) : null
506
+ }).then(Z);
514
507
  }
515
- async function gt(t, e, n, o) {
516
- I(t), j(e);
517
- const a = be(t, "userinfo_endpoint", _e(e, o)), r = K(o == null ? void 0 : o.headers);
518
- return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), wt(n, "GET", a, r, null, {
508
+ async function ft(t, e, n, o) {
509
+ C(t), I(e);
510
+ const s = me(t, "userinfo_endpoint", ge(e, o)), r = N(o?.headers);
511
+ return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), ht(n, "GET", s, r, null, {
519
512
  ...o,
520
- [W]: H(e)
513
+ [D]: W(e)
521
514
  });
522
515
  }
523
- async function mt(t, e, n, o, a, r, i) {
524
- return await lt(t, e, a, r), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), ((i == null ? void 0 : i[Z]) || fetch)(o.href, {
525
- body: a,
516
+ async function pt(t, e, n, o, s, r, i) {
517
+ return await at(t, e, s, r), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), (i?.[G] || fetch)(o.href, {
518
+ body: s,
526
519
  headers: Object.fromEntries(r.entries()),
527
520
  method: n,
528
521
  redirect: "manual",
529
522
  signal: null
530
- }).then(Q);
523
+ }).then(Z);
531
524
  }
532
- async function ve(t, e, n, o, a) {
533
- const r = be(t, "token_endpoint", _e(e, a));
525
+ async function ye(t, e, n, o, s) {
526
+ const r = me(t, "token_endpoint", ge(e, s));
534
527
  o.set("grant_type", n);
535
- const i = K(a == null ? void 0 : a.headers);
536
- return i.set("accept", "application/json"), mt(t, e, "POST", r, o, i, a);
528
+ const i = N(s?.headers);
529
+ return i.set("accept", "application/json"), pt(t, e, "POST", r, o, i, s);
537
530
  }
538
- async function yt(t, e, n, o) {
539
- if (I(t), j(e), !g(n))
531
+ async function wt(t, e, n, o) {
532
+ if (C(t), I(e), !w(n))
540
533
  throw new TypeError('"refreshToken" must be a non-empty string');
541
- const a = new URLSearchParams(o == null ? void 0 : o.additionalParameters);
542
- return a.set("refresh_token", n), ve(t, e, "refresh_token", a, o);
534
+ const s = new URLSearchParams(o?.additionalParameters);
535
+ return s.set("refresh_token", n), ye(t, e, "refresh_token", s, o);
543
536
  }
544
- const Se = /* @__PURE__ */ new WeakMap();
545
- function bt(t) {
537
+ const be = /* @__PURE__ */ new WeakMap();
538
+ function mt(t) {
546
539
  if (!t.id_token)
547
540
  return;
548
- const e = Se.get(t);
541
+ const e = be.get(t);
549
542
  if (!e)
550
543
  throw new TypeError('"ref" was already garbage collected or did not resolve from the proper sources');
551
544
  return e[0];
552
545
  }
553
- async function Te(t, e, n, o = !1, a = !1) {
554
- if (I(t), j(e), !Y(n, Response))
546
+ async function _e(t, e, n, o = !1, s = !1) {
547
+ if (C(t), I(e), !V(n, Response))
555
548
  throw new TypeError('"response" must be an instance of Response');
556
549
  if (n.status !== 200) {
557
550
  let i;
558
- if (i = await Ut(n))
551
+ if (i = await Et(n))
559
552
  return i;
560
- throw new s('"response" is not a conform Token Endpoint response');
553
+ throw new a('"response" is not a conform Token Endpoint response');
561
554
  }
562
- te(n);
555
+ X(n);
563
556
  let r;
564
557
  try {
565
558
  r = await n.json();
566
559
  } catch (i) {
567
- throw new s('failed to parse "response" body as JSON', { cause: i });
560
+ throw new a('failed to parse "response" body as JSON', { cause: i });
568
561
  }
569
- if (!C(r))
570
- throw new s('"response" body must be a top level object');
571
- if (!g(r.access_token))
572
- throw new s('"response" body "access_token" property must be a non-empty string');
573
- if (!g(r.token_type))
574
- throw new s('"response" body "token_type" property must be a non-empty string');
562
+ if (!x(r))
563
+ throw new a('"response" body must be a top level object');
564
+ if (!w(r.access_token))
565
+ throw new a('"response" body "access_token" property must be a non-empty string');
566
+ if (!w(r.token_type))
567
+ throw new a('"response" body "token_type" property must be a non-empty string');
575
568
  if (r.token_type = r.token_type.toLowerCase(), r.token_type !== "dpop" && r.token_type !== "bearer")
576
- throw new T("unsupported `token_type` value");
569
+ throw new v("unsupported `token_type` value");
577
570
  if (r.expires_in !== void 0 && (typeof r.expires_in != "number" || r.expires_in <= 0))
578
- throw new s('"response" body "expires_in" property must be a positive number');
579
- if (!a && r.refresh_token !== void 0 && !g(r.refresh_token))
580
- throw new s('"response" body "refresh_token" property must be a non-empty string');
571
+ throw new a('"response" body "expires_in" property must be a positive number');
572
+ if (!s && r.refresh_token !== void 0 && !w(r.refresh_token))
573
+ throw new a('"response" body "refresh_token" property must be a non-empty string');
581
574
  if (r.scope !== void 0 && typeof r.scope != "string")
582
- throw new s('"response" body "scope" property must be a string');
575
+ throw new a('"response" body "scope" property must be a string');
583
576
  if (!o) {
584
- if (r.id_token !== void 0 && !g(r.id_token))
585
- throw new s('"response" body "id_token" property must be a non-empty string');
577
+ if (r.id_token !== void 0 && !w(r.id_token))
578
+ throw new a('"response" body "id_token" property must be a non-empty string');
586
579
  if (r.id_token) {
587
- 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), Ee, H(e), ye(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));
580
+ const { claims: i, jwt: c } = await Ut(r.id_token, Lt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Te, W(e), we(e), e[We]).then(Tt.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(bt.bind(void 0, t.issuer)).then(yt.bind(void 0, e.client_id));
588
581
  if (Array.isArray(i.aud) && i.aud.length !== 1) {
589
582
  if (i.azp === void 0)
590
- throw new s('ID Token "aud" (audience) claim includes additional untrusted audiences');
583
+ throw new a('ID Token "aud" (audience) claim includes additional untrusted audiences');
591
584
  if (i.azp !== e.client_id)
592
- throw new s('unexpected ID Token "azp" (authorized party) claim value');
585
+ throw new a('unexpected ID Token "azp" (authorized party) claim value');
593
586
  }
594
587
  if (i.auth_time !== void 0 && (!Number.isFinite(i.auth_time) || Math.sign(i.auth_time) !== 1))
595
- throw new s('ID Token "auth_time" (authentication time) must be a positive number');
596
- Se.set(r, [i, c]);
588
+ throw new a('ID Token "auth_time" (authentication time) must be a positive number');
589
+ be.set(r, [i, c]);
597
590
  }
598
591
  }
599
592
  return r;
600
593
  }
601
- async function _t(t, e, n) {
602
- return Te(t, e, n);
594
+ async function gt(t, e, n) {
595
+ return _e(t, e, n);
603
596
  }
604
- function vt(t, e) {
597
+ function yt(t, e) {
605
598
  if (Array.isArray(e.claims.aud)) {
606
599
  if (!e.claims.aud.includes(t))
607
- throw new s('unexpected JWT "aud" (audience) claim value');
600
+ throw new a('unexpected JWT "aud" (audience) claim value');
608
601
  } else if (e.claims.aud !== t)
609
- throw new s('unexpected JWT "aud" (audience) claim value');
602
+ throw new a('unexpected JWT "aud" (audience) claim value');
610
603
  return e;
611
604
  }
612
- function St(t, e) {
605
+ function bt(t, e) {
613
606
  if (e.claims.iss !== t)
614
- throw new s('unexpected JWT "iss" (issuer) claim value');
607
+ throw new a('unexpected JWT "iss" (issuer) claim value');
615
608
  return e;
616
609
  }
617
- const Ae = /* @__PURE__ */ new WeakSet();
618
- function Tt(t) {
619
- return Ae.add(t), t;
610
+ const ve = /* @__PURE__ */ new WeakSet();
611
+ function _t(t) {
612
+ return ve.add(t), t;
620
613
  }
621
- async function At(t, e, n, o, a, r) {
622
- if (I(t), j(e), !Ae.has(n))
614
+ async function vt(t, e, n, o, s, r) {
615
+ if (C(t), I(e), !ve.has(n))
623
616
  throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
624
- if (!g(o))
617
+ if (!w(o))
625
618
  throw new TypeError('"redirectUri" must be a non-empty string');
626
- if (!g(a))
619
+ if (!w(s))
627
620
  throw new TypeError('"codeVerifier" must be a non-empty string');
628
- const i = A(n, "code");
621
+ const i = S(n, "code");
629
622
  if (!i)
630
- throw new s('no authorization code in "callbackParameters"');
631
- const c = new URLSearchParams(r == null ? void 0 : r.additionalParameters);
632
- return c.set("redirect_uri", o), c.set("code_verifier", a), c.set("code", i), ve(t, e, "authorization_code", c, r);
623
+ throw new a('no authorization code in "callbackParameters"');
624
+ const c = new URLSearchParams(r?.additionalParameters);
625
+ return c.set("redirect_uri", o), c.set("code_verifier", s), c.set("code", i), ye(t, e, "authorization_code", c, r);
633
626
  }
634
- const kt = {
627
+ const St = {
635
628
  aud: "audience",
636
629
  c_hash: "code hash",
637
630
  client_id: "client id",
@@ -647,66 +640,66 @@ const kt = {
647
640
  htu: "http uri",
648
641
  cnf: "confirmation"
649
642
  };
650
- function Et(t, e) {
643
+ function Tt(t, e) {
651
644
  for (const n of t)
652
645
  if (e.claims[n] === void 0)
653
- throw new s(`JWT "${n}" (${kt[n]}) claim missing`);
646
+ throw new a(`JWT "${n}" (${St[n]}) claim missing`);
654
647
  return e;
655
648
  }
656
- const Rt = Symbol(), F = Symbol();
657
- async function Pt(t, e, n, o, a) {
658
- const r = await Te(t, e, n);
659
- if (G(r))
649
+ const At = Symbol(), H = Symbol();
650
+ async function kt(t, e, n, o, s) {
651
+ const r = await _e(t, e, n);
652
+ if (q(r))
660
653
  return r;
661
- if (!g(r.id_token))
662
- throw new s('"response" body "id_token" property must be a non-empty string');
663
- a ?? (a = e.default_max_age ?? F);
664
- const i = bt(r);
665
- if ((e.require_auth_time || a !== F) && i.auth_time === void 0)
666
- throw new s('ID Token "auth_time" (authentication time) claim missing');
667
- if (a !== F) {
668
- if (typeof a != "number" || a < 0)
654
+ if (!w(r.id_token))
655
+ throw new a('"response" body "id_token" property must be a non-empty string');
656
+ s ?? (s = e.default_max_age ?? H);
657
+ const i = mt(r);
658
+ if ((e.require_auth_time || s !== H) && i.auth_time === void 0)
659
+ throw new a('ID Token "auth_time" (authentication time) claim missing');
660
+ if (s !== H) {
661
+ if (typeof s != "number" || s < 0)
669
662
  throw new TypeError('"maxAge" must be a non-negative number');
670
- const c = ee() + H(e), p = ye(e);
671
- if (i.auth_time + a < c - p)
672
- throw new s("too much time has elapsed since the last End-User authentication");
663
+ const c = Q() + W(e), f = we(e);
664
+ if (i.auth_time + s < c - f)
665
+ throw new a("too much time has elapsed since the last End-User authentication");
673
666
  }
674
667
  switch (o) {
675
668
  case void 0:
676
- case Rt:
669
+ case At:
677
670
  if (i.nonce !== void 0)
678
- throw new s('unexpected ID Token "nonce" claim value');
671
+ throw new a('unexpected ID Token "nonce" claim value');
679
672
  break;
680
673
  default:
681
- if (!g(o))
674
+ if (!w(o))
682
675
  throw new TypeError('"expectedNonce" must be a non-empty string');
683
676
  if (i.nonce === void 0)
684
- throw new s('ID Token "nonce" claim missing');
677
+ throw new a('ID Token "nonce" claim missing');
685
678
  if (i.nonce !== o)
686
- throw new s('unexpected ID Token "nonce" claim value');
679
+ throw new a('unexpected ID Token "nonce" claim value');
687
680
  }
688
681
  return r;
689
682
  }
690
- function te(t) {
683
+ function X(t) {
691
684
  if (t.bodyUsed)
692
685
  throw new TypeError('"response" body has been used already');
693
686
  }
694
- async function Ut(t) {
687
+ async function Et(t) {
695
688
  if (t.status > 399 && t.status < 500) {
696
- te(t);
689
+ X(t);
697
690
  try {
698
691
  const e = await t.json();
699
- if (C(e) && typeof e.error == "string" && e.error.length)
692
+ if (x(e) && typeof e.error == "string" && e.error.length)
700
693
  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;
701
694
  } catch {
702
695
  }
703
696
  }
704
697
  }
705
- function fe(t) {
698
+ function le(t) {
706
699
  if (typeof t.modulusLength != "number" || t.modulusLength < 2048)
707
- throw new s(`${t.name} modulusLength must be at least 2048 bits`);
700
+ throw new a(`${t.name} modulusLength must be at least 2048 bits`);
708
701
  }
709
- function Lt(t) {
702
+ function Rt(t) {
710
703
  switch (t) {
711
704
  case "P-256":
712
705
  return "SHA-256";
@@ -715,18 +708,18 @@ function Lt(t) {
715
708
  case "P-521":
716
709
  return "SHA-512";
717
710
  default:
718
- throw new T();
711
+ throw new v();
719
712
  }
720
713
  }
721
- function ke(t) {
714
+ function Se(t) {
722
715
  switch (t.algorithm.name) {
723
716
  case "ECDSA":
724
717
  return {
725
718
  name: t.algorithm.name,
726
- hash: Lt(t.algorithm.namedCurve)
719
+ hash: Rt(t.algorithm.namedCurve)
727
720
  };
728
721
  case "RSA-PSS":
729
- switch (fe(t.algorithm), t.algorithm.hash.name) {
722
+ switch (le(t.algorithm), t.algorithm.hash.name) {
730
723
  case "SHA-256":
731
724
  case "SHA-384":
732
725
  case "SHA-512":
@@ -735,279 +728,213 @@ function ke(t) {
735
728
  saltLength: parseInt(t.algorithm.hash.name.slice(-3), 10) >> 3
736
729
  };
737
730
  default:
738
- throw new T();
731
+ throw new v();
739
732
  }
740
733
  case "RSASSA-PKCS1-v1_5":
741
- return fe(t.algorithm), t.algorithm.name;
734
+ return le(t.algorithm), t.algorithm.name;
742
735
  case "Ed448":
743
736
  case "Ed25519":
744
737
  return t.algorithm.name;
745
738
  }
746
- throw new T();
739
+ throw new v();
747
740
  }
748
- const Ee = Symbol();
749
- async function xt(t, e, n, o) {
750
- const a = `${t}.${e}`;
751
- if (!await crypto.subtle.verify(ke(n), n, o, E(a)))
752
- throw new s("JWT signature verification failed");
741
+ const Te = Symbol();
742
+ async function Pt(t, e, n, o) {
743
+ const s = `${t}.${e}`;
744
+ if (!await crypto.subtle.verify(Se(n), n, o, k(s)))
745
+ throw new a("JWT signature verification failed");
753
746
  }
754
- async function Ct(t, e, n, o, a, r) {
755
- let { 0: i, 1: c, 2: p, length: w } = t.split(".");
756
- if (w === 5)
747
+ async function Ut(t, e, n, o, s, r) {
748
+ let { 0: i, 1: c, 2: f, length: y } = t.split(".");
749
+ if (y === 5)
757
750
  if (r !== void 0)
758
- t = await r(t), { 0: i, 1: c, 2: p, length: w } = t.split(".");
751
+ t = await r(t), { 0: i, 1: c, 2: f, length: y } = t.split(".");
759
752
  else
760
- throw new T("JWE structure JWTs are not supported");
761
- if (w !== 3)
762
- throw new s("Invalid JWT");
763
- let f;
753
+ throw new v("JWE structure JWTs are not supported");
754
+ if (y !== 3)
755
+ throw new a("Invalid JWT");
756
+ let p;
764
757
  try {
765
- f = JSON.parse(E(k(i)));
758
+ p = JSON.parse(k(T(i)));
766
759
  } catch (l) {
767
- throw new s("failed to parse JWT Header body as base64url encoded JSON", { cause: l });
760
+ throw new a("failed to parse JWT Header body as base64url encoded JSON", { cause: l });
768
761
  }
769
- if (!C(f))
770
- throw new s("JWT Header must be a top level object");
771
- if (e(f), f.crit !== void 0)
772
- throw new s('unexpected JWT "crit" header parameter');
773
- const v = k(p);
774
- let _;
775
- n !== Ee && (_ = await n(f), await xt(i, c, _, v));
762
+ if (!x(p))
763
+ throw new a("JWT Header must be a top level object");
764
+ if (e(p), p.crit !== void 0)
765
+ throw new a('unexpected JWT "crit" header parameter');
766
+ const A = T(f);
767
+ let b;
768
+ n !== Te && (b = await n(p), await Pt(i, c, b, A));
776
769
  let h;
777
770
  try {
778
- h = JSON.parse(E(k(c)));
771
+ h = JSON.parse(k(T(c)));
779
772
  } catch (l) {
780
- throw new s("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
773
+ throw new a("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
781
774
  }
782
- if (!C(h))
783
- throw new s("JWT Payload must be a top level object");
784
- const P = ee() + o;
775
+ if (!x(h))
776
+ throw new a("JWT Payload must be a top level object");
777
+ const R = Q() + o;
785
778
  if (h.exp !== void 0) {
786
779
  if (typeof h.exp != "number")
787
- throw new s('unexpected JWT "exp" (expiration time) claim type');
788
- if (h.exp <= P - a)
789
- throw new s('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()');
780
+ throw new a('unexpected JWT "exp" (expiration time) claim type');
781
+ if (h.exp <= R - s)
782
+ throw new a('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()');
790
783
  }
791
784
  if (h.iat !== void 0 && typeof h.iat != "number")
792
- throw new s('unexpected JWT "iat" (issued at) claim type');
785
+ throw new a('unexpected JWT "iat" (issued at) claim type');
793
786
  if (h.iss !== void 0 && typeof h.iss != "string")
794
- throw new s('unexpected JWT "iss" (issuer) claim type');
787
+ throw new a('unexpected JWT "iss" (issuer) claim type');
795
788
  if (h.nbf !== void 0) {
796
789
  if (typeof h.nbf != "number")
797
- throw new s('unexpected JWT "nbf" (not before) claim type');
798
- if (h.nbf > P + a)
799
- throw new s('unexpected JWT "nbf" (not before) claim value, timestamp is > now()');
790
+ throw new a('unexpected JWT "nbf" (not before) claim type');
791
+ if (h.nbf > R + s)
792
+ throw new a('unexpected JWT "nbf" (not before) claim value, timestamp is > now()');
800
793
  }
801
794
  if (h.aud !== void 0 && typeof h.aud != "string" && !Array.isArray(h.aud))
802
- throw new s('unexpected JWT "aud" (audience) claim type');
803
- return { header: f, claims: h, signature: v, key: _, jwt: t };
795
+ throw new a('unexpected JWT "aud" (audience) claim type');
796
+ return { header: p, claims: h, signature: A, key: b, jwt: t };
804
797
  }
805
- function It(t, e, n) {
798
+ function Lt(t, e, n) {
806
799
  if (t !== void 0) {
807
800
  if (n.alg !== t)
808
- throw new s('unexpected JWT "alg" header parameter');
801
+ throw new a('unexpected JWT "alg" header parameter');
809
802
  return;
810
803
  }
811
804
  if (Array.isArray(e)) {
812
805
  if (!e.includes(n.alg))
813
- throw new s('unexpected JWT "alg" header parameter');
806
+ throw new a('unexpected JWT "alg" header parameter');
814
807
  return;
815
808
  }
816
809
  if (n.alg !== "RS256")
817
- throw new s('unexpected JWT "alg" header parameter');
810
+ throw new a('unexpected JWT "alg" header parameter');
818
811
  }
819
- function A(t, e) {
812
+ function S(t, e) {
820
813
  const { 0: n, length: o } = t.getAll(e);
821
814
  if (o > 1)
822
- throw new s(`"${e}" parameter must be provided only once`);
815
+ throw new a(`"${e}" parameter must be provided only once`);
823
816
  return n;
824
817
  }
825
- const jt = Symbol(), Jt = Symbol();
826
- function Ot(t, e, n, o) {
827
- if (I(t), j(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
818
+ const xt = Symbol(), Ct = Symbol();
819
+ function It(t, e, n, o) {
820
+ if (C(t), I(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
828
821
  throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
829
- if (A(n, "response"))
830
- throw new s('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');
831
- const a = A(n, "iss"), r = A(n, "state");
832
- if (!a && t.authorization_response_iss_parameter_supported)
833
- throw new s('response parameter "iss" (issuer) missing');
834
- if (a && a !== t.issuer)
835
- throw new s('unexpected "iss" (issuer) response parameter value');
822
+ if (S(n, "response"))
823
+ throw new a('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');
824
+ const s = S(n, "iss"), r = S(n, "state");
825
+ if (!s && t.authorization_response_iss_parameter_supported)
826
+ throw new a('response parameter "iss" (issuer) missing');
827
+ if (s && s !== t.issuer)
828
+ throw new a('unexpected "iss" (issuer) response parameter value');
836
829
  switch (o) {
837
830
  case void 0:
838
- case Jt:
831
+ case Ct:
839
832
  if (r !== void 0)
840
- throw new s('unexpected "state" response parameter encountered');
833
+ throw new a('unexpected "state" response parameter encountered');
841
834
  break;
842
- case jt:
835
+ case xt:
843
836
  break;
844
837
  default:
845
- if (!g(o))
846
- throw new s('"expectedState" must be a non-empty string');
838
+ if (!w(o))
839
+ throw new a('"expectedState" must be a non-empty string');
847
840
  if (r === void 0)
848
- throw new s('response parameter "state" missing');
841
+ throw new a('response parameter "state" missing');
849
842
  if (r !== o)
850
- throw new s('unexpected "state" response parameter value');
843
+ throw new a('unexpected "state" response parameter value');
851
844
  }
852
- const i = A(n, "error");
845
+ const i = S(n, "error");
853
846
  if (i)
854
847
  return {
855
848
  error: i,
856
- error_description: A(n, "error_description"),
857
- error_uri: A(n, "error_uri")
849
+ error_description: S(n, "error_description"),
850
+ error_uri: S(n, "error_uri")
858
851
  };
859
- const c = A(n, "id_token"), p = A(n, "token");
860
- if (c !== void 0 || p !== void 0)
861
- throw new T("implicit and hybrid flows are not supported");
862
- return Tt(new URLSearchParams(n));
852
+ const c = S(n, "id_token"), f = S(n, "token");
853
+ if (c !== void 0 || f !== void 0)
854
+ throw new v("implicit and hybrid flows are not supported");
855
+ return _t(new URLSearchParams(n));
863
856
  }
864
- function zt({
857
+ function jt(t, e, n = "/") {
858
+ return t.startsWith(e) ? n !== "/" && t.startsWith(e + n) ? t.slice(e.length + n.length) : t.slice(e.length) : t;
859
+ }
860
+ function Ot({
865
861
  handleCallback: t
866
862
  }) {
867
- const e = je({
863
+ const { options: e } = je(), n = xe({
868
864
  retry: !1,
869
865
  queryKey: ["oauth-callback"],
870
866
  queryFn: async () => {
871
867
  try {
872
- return await t();
873
- } catch (n) {
874
- throw new ze("Could not validate user", {
875
- cause: n,
868
+ return he(
869
+ jt(
870
+ await t(),
871
+ window.location.origin,
872
+ e.basePath
873
+ )
874
+ );
875
+ } catch (o) {
876
+ throw new Ue("Could not validate user", {
877
+ cause: o,
876
878
  title: "Authentication Error",
877
879
  developerHint: "Check the configuration of your authorization provider and ensure all settings such as the callback URL are configured correctly."
878
880
  });
879
881
  }
880
882
  }
881
883
  });
882
- return /* @__PURE__ */ B.jsx(Oe, { to: e.data });
884
+ return /* @__PURE__ */ M.jsx(Ie, { to: n.data });
883
885
  }
884
- class R extends Error {
886
+ class E extends Error {
885
887
  }
886
- class pe extends R {
888
+ class de extends E {
887
889
  constructor(e, n, o) {
888
890
  super(e, o), this.error = n;
889
891
  }
890
892
  }
891
- const M = "code-verifier", q = "oauth-state";
892
- class Dt extends Je {
893
- constructor(e, n) {
894
- super(), this.callbackUrlPath = e, this.handleCallback = n;
893
+ const $ = "code-verifier", F = "oauth-state", Ae = "/oauth/callback";
894
+ class zt extends Ce {
895
+ constructor(e) {
896
+ super(), this.handleCallback = e;
895
897
  }
896
898
  getRoutes() {
897
899
  return [
898
900
  ...super.getRoutes(),
899
901
  {
900
- path: this.callbackUrlPath,
901
- element: /* @__PURE__ */ B.jsx(Ie, { children: /* @__PURE__ */ B.jsx(zt, { handleCallback: this.handleCallback }) })
902
+ path: Ae,
903
+ element: /* @__PURE__ */ M.jsx(Le, { children: /* @__PURE__ */ M.jsx(Ot, { handleCallback: this.handleCallback }) })
902
904
  }
903
905
  ];
904
906
  }
905
907
  }
906
- class Nt {
908
+ class Jt {
909
+ client;
910
+ issuer;
911
+ authorizationServer;
912
+ callbackUrlPath;
913
+ onAuthorizationUrl;
914
+ redirectToAfterSignUp;
915
+ redirectToAfterSignIn;
916
+ redirectToAfterSignOut;
917
+ audience;
918
+ scopes;
907
919
  constructor({
908
920
  issuer: e,
909
921
  audience: n,
910
922
  clientId: o,
911
- redirectToAfterSignUp: a,
923
+ redirectToAfterSignUp: s,
912
924
  redirectToAfterSignIn: r,
913
- redirectToAfterSignOut: i,
925
+ redirectToAfterSignOut: i = "/",
914
926
  basePath: c,
915
- scopes: p
927
+ scopes: f
916
928
  }) {
917
- b(this, "client");
918
- b(this, "issuer");
919
- b(this, "authorizationServer");
920
- b(this, "callbackUrlPath");
921
- b(this, "logoutRedirectUrlPath");
922
- b(this, "onAuthorizationUrl");
923
- b(this, "redirectToAfterSignUp");
924
- b(this, "redirectToAfterSignIn");
925
- b(this, "redirectToAfterSignOut");
926
- b(this, "audience");
927
- b(this, "scopes");
928
- b(this, "signRequest", async (e) => {
929
- const n = await this.getAccessToken();
930
- return e.headers.set("Authorization", `Bearer ${n}`), e;
931
- });
932
- b(this, "signOut", async () => {
933
- x.setState({
934
- isAuthenticated: !1,
935
- isPending: !1,
936
- profile: void 0,
937
- providerData: void 0
938
- });
939
- const e = await this.getAuthServer(), n = new URL(
940
- window.location.origin + this.redirectToAfterSignOut
941
- );
942
- n.pathname = this.logoutRedirectUrlPath;
943
- let o;
944
- e.end_session_endpoint ? (o = new URL(e.end_session_endpoint), o.searchParams.set(
945
- "post_logout_redirect_uri",
946
- n.toString()
947
- )) : o = n;
948
- });
949
- b(this, "handleCallback", async () => {
950
- const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(q);
951
- if (sessionStorage.removeItem(q), n !== o)
952
- throw new R("Invalid state parameter");
953
- const a = sessionStorage.getItem(M);
954
- if (sessionStorage.removeItem(M), !a)
955
- throw new R("No code verifier found in state.");
956
- const r = await this.getAuthServer(), i = Ot(
957
- r,
958
- this.client,
959
- e.searchParams,
960
- n ?? void 0
961
- );
962
- if (G(i))
963
- throw se.error("Error validating OAuth response", i), new pe(
964
- "Error validating OAuth response",
965
- i
966
- );
967
- const c = new URL(e);
968
- c.pathname = this.callbackUrlPath, c.search = "";
969
- const p = await At(
970
- r,
971
- this.client,
972
- i,
973
- c.toString(),
974
- a
975
- ), w = await Pt(
976
- r,
977
- this.client,
978
- p
979
- );
980
- this.setTokensFromResponse(w);
981
- const f = await this.getAccessToken(), _ = await (await gt(
982
- r,
983
- this.client,
984
- f
985
- )).json(), h = {
986
- sub: _.sub,
987
- email: _.email,
988
- name: _.name,
989
- emailVerified: _.email_verified ?? !1,
990
- pictureUrl: _.picture
991
- };
992
- x.setState({
993
- isAuthenticated: !0,
994
- isPending: !1,
995
- profile: h
996
- });
997
- const P = sessionStorage.getItem("redirect-to") ?? "/";
998
- return sessionStorage.removeItem("redirect-to"), P;
999
- });
1000
929
  this.client = {
1001
930
  client_id: o,
1002
931
  token_endpoint_auth_method: "none"
1003
- }, this.audience = n, this.issuer = e, this.callbackUrlPath = ie(c, "/oauth/callback"), this.scopes = p ?? ["openid", "profile", "email"];
1004
- const w = ie(c, "/");
1005
- this.logoutRedirectUrlPath = w, this.redirectToAfterSignUp = a ?? w, this.redirectToAfterSignIn = r ?? w, this.redirectToAfterSignOut = i ?? w;
932
+ }, this.audience = n, this.issuer = e, this.callbackUrlPath = he(c, Ae), this.scopes = f ?? ["openid", "profile", "email"], this.redirectToAfterSignUp = s, this.redirectToAfterSignIn = r, this.redirectToAfterSignOut = i;
1006
933
  }
1007
934
  async getAuthServer() {
1008
935
  if (!this.authorizationServer) {
1009
- const e = new URL(this.issuer), n = await et(e);
1010
- this.authorizationServer = await tt(
936
+ const e = new URL(this.issuer), n = await Ye(e);
937
+ this.authorizationServer = await Qe(
1011
938
  e,
1012
939
  n
1013
940
  );
@@ -1019,10 +946,10 @@ class Nt {
1019
946
  * @param response
1020
947
  */
1021
948
  setTokensFromResponse(e) {
1022
- if (G(e))
1023
- throw se.error("Bad Token Response", e), new pe("Bad Token Response", e);
949
+ if (q(e))
950
+ throw oe.error("Bad Token Response", e), new de("Bad Token Response", e);
1024
951
  if (!e.expires_in)
1025
- throw new R("No expires_in in response");
952
+ throw new E("No expires_in in response");
1026
953
  const n = {
1027
954
  accessToken: e.access_token,
1028
955
  refreshToken: e.refresh_token,
@@ -1030,81 +957,153 @@ class Nt {
1030
957
  expiresOn: new Date(Date.now() + e.expires_in * 1e3),
1031
958
  tokenType: e.token_type
1032
959
  };
1033
- x.setState({
960
+ L.setState({
1034
961
  providerData: n
1035
962
  });
1036
963
  }
1037
964
  async signUp({ redirectTo: e } = {}) {
1038
965
  return this.authorize({
1039
- redirectTo: e ?? this.redirectToAfterSignUp,
966
+ redirectTo: this.redirectToAfterSignUp ?? e ?? "/",
1040
967
  isSignUp: !0
1041
968
  });
1042
969
  }
1043
970
  async signIn({ redirectTo: e } = {}) {
1044
971
  return this.authorize({
1045
- redirectTo: e ?? this.redirectToAfterSignIn
972
+ redirectTo: this.redirectToAfterSignIn ?? e ?? "/"
1046
973
  });
1047
974
  }
1048
975
  async authorize({
1049
976
  redirectTo: e,
1050
977
  isSignUp: n = !1
1051
978
  }) {
1052
- var v;
1053
- const o = "S256", a = await this.getAuthServer();
1054
- if (!a.authorization_endpoint)
1055
- throw new R("No authorization endpoint");
1056
- const r = nt(), i = await ot(r);
1057
- sessionStorage.setItem(M, r);
979
+ const o = "S256", s = await this.getAuthServer();
980
+ if (!s.authorization_endpoint)
981
+ throw new E("No authorization endpoint");
982
+ const r = Xe(), i = await tt(r);
983
+ sessionStorage.setItem($, r);
1058
984
  const c = new URL(
1059
- a.authorization_endpoint
1060
- ), p = e.startsWith(window.location.origin) ? e.slice(window.location.origin.length) : e;
1061
- sessionStorage.setItem("redirect-to", p);
1062
- const w = new URL(window.location.origin);
1063
- w.pathname = this.callbackUrlPath, w.search = "", c.searchParams.set("client_id", this.client.client_id), c.searchParams.set("redirect_uri", w.toString()), c.searchParams.set("response_type", "code"), c.searchParams.set("scope", this.scopes.join(" ")), c.searchParams.set("code_challenge", i), c.searchParams.set(
985
+ s.authorization_endpoint
986
+ );
987
+ sessionStorage.setItem("redirect-to", e);
988
+ const f = new URL(window.location.origin);
989
+ 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(
1064
990
  "code_challenge_method",
1065
991
  o
1066
- ), this.audience && c.searchParams.set("audience", this.audience), (v = this.onAuthorizationUrl) == null || v.call(this, c, {
992
+ ), this.audience && c.searchParams.set("audience", this.audience), this.onAuthorizationUrl?.(c, {
1067
993
  isSignIn: !n,
1068
994
  isSignUp: n
1069
995
  });
1070
- const f = rt();
1071
- sessionStorage.setItem(q, f), c.searchParams.set("state", f), location.href = c.href;
996
+ const y = et();
997
+ sessionStorage.setItem(F, y), c.searchParams.set("state", y), location.href = c.href;
1072
998
  }
1073
999
  async getAccessToken() {
1074
- const e = await this.getAuthServer(), { providerData: n } = x.getState();
1000
+ const e = await this.getAuthServer(), { providerData: n } = L.getState();
1075
1001
  if (!n)
1076
- throw new R("User is not authenticated");
1002
+ throw new E("User is not authenticated");
1077
1003
  const o = n;
1078
1004
  if (new Date(o.expiresOn) < /* @__PURE__ */ new Date()) {
1079
1005
  if (!o.refreshToken)
1080
- return x.setState({
1006
+ return L.setState({
1081
1007
  isAuthenticated: !1,
1082
1008
  isPending: !1,
1083
1009
  profile: null,
1084
1010
  providerData: null
1085
1011
  }), "";
1086
- const a = await yt(
1012
+ const s = await wt(
1087
1013
  e,
1088
1014
  this.client,
1089
1015
  o.refreshToken
1090
- ), r = await _t(
1016
+ ), r = await gt(
1091
1017
  e,
1092
1018
  this.client,
1093
- a
1019
+ s
1094
1020
  );
1095
1021
  if (!r.access_token)
1096
- throw new R("No access token in response");
1022
+ throw new E("No access token in response");
1097
1023
  return this.setTokensFromResponse(r), r.access_token.toString();
1098
1024
  } else
1099
1025
  return o.accessToken;
1100
1026
  }
1027
+ signRequest = async (e) => {
1028
+ const n = await this.getAccessToken();
1029
+ return e.headers.set("Authorization", `Bearer ${n}`), e;
1030
+ };
1031
+ signOut = async () => {
1032
+ L.setState({
1033
+ isAuthenticated: !1,
1034
+ isPending: !1,
1035
+ profile: void 0,
1036
+ providerData: void 0
1037
+ });
1038
+ const e = await this.getAuthServer(), n = new URL(
1039
+ window.location.origin + this.redirectToAfterSignOut
1040
+ );
1041
+ n.pathname = this.callbackUrlPath;
1042
+ let o;
1043
+ e.end_session_endpoint ? (o = new URL(e.end_session_endpoint), o.searchParams.set(
1044
+ "post_logout_redirect_uri",
1045
+ n.toString()
1046
+ )) : o = n;
1047
+ };
1048
+ handleCallback = async () => {
1049
+ const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(F);
1050
+ if (sessionStorage.removeItem(F), n !== o)
1051
+ throw new E("Invalid state parameter");
1052
+ const s = sessionStorage.getItem($);
1053
+ if (sessionStorage.removeItem($), !s)
1054
+ throw new E("No code verifier found in state.");
1055
+ const r = await this.getAuthServer(), i = It(
1056
+ r,
1057
+ this.client,
1058
+ e.searchParams,
1059
+ n ?? void 0
1060
+ );
1061
+ if (q(i))
1062
+ throw oe.error("Error validating OAuth response", i), new de(
1063
+ "Error validating OAuth response",
1064
+ i
1065
+ );
1066
+ const c = new URL(e);
1067
+ c.pathname = this.callbackUrlPath, c.search = "";
1068
+ const f = await vt(
1069
+ r,
1070
+ this.client,
1071
+ i,
1072
+ c.toString(),
1073
+ s
1074
+ ), y = await kt(
1075
+ r,
1076
+ this.client,
1077
+ f
1078
+ );
1079
+ this.setTokensFromResponse(y);
1080
+ const p = await this.getAccessToken(), b = await (await ft(
1081
+ r,
1082
+ this.client,
1083
+ p
1084
+ )).json(), h = {
1085
+ sub: b.sub,
1086
+ email: b.email,
1087
+ name: b.name,
1088
+ emailVerified: b.email_verified ?? !1,
1089
+ pictureUrl: b.picture
1090
+ };
1091
+ L.setState({
1092
+ isAuthenticated: !0,
1093
+ isPending: !1,
1094
+ profile: h
1095
+ });
1096
+ const R = sessionStorage.getItem("redirect-to") ?? "/";
1097
+ return sessionStorage.removeItem("redirect-to"), R;
1098
+ };
1101
1099
  getAuthenticationPlugin() {
1102
- return new Dt(this.callbackUrlPath, this.handleCallback);
1100
+ return new zt(this.handleCallback);
1103
1101
  }
1104
1102
  }
1105
- const Vt = (t) => new Nt(t);
1103
+ const Mt = (t) => new Jt(t);
1106
1104
  export {
1107
- Nt as OpenIDAuthenticationProvider,
1108
- Vt as default
1105
+ Ae as OPENID_CALLBACK_PATH,
1106
+ Jt as OpenIDAuthenticationProvider,
1107
+ Mt as default
1109
1108
  };
1110
1109
  //# sourceMappingURL=zudoku.auth-openid.js.map