zudoku 0.0.0-e101786 → 0.0.0-e20b2e4

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 (505) hide show
  1. package/dist/app/entry.server.d.ts +1 -1
  2. package/dist/app/main.d.ts +1 -1
  3. package/dist/app/main.js +18 -8
  4. package/dist/app/main.js.map +1 -1
  5. package/dist/cli/common/output.js.map +1 -1
  6. package/dist/cli/dev/handler.js +7 -2
  7. package/dist/cli/dev/handler.js.map +1 -1
  8. package/dist/config/config.d.ts +1 -0
  9. package/dist/config/loader.js +4 -1
  10. package/dist/config/loader.js.map +1 -1
  11. package/dist/config/validators/common.d.ts +217 -28
  12. package/dist/config/validators/common.js +15 -6
  13. package/dist/config/validators/common.js.map +1 -1
  14. package/dist/config/validators/icon-types.d.ts +1 -1
  15. package/dist/config/validators/validate.d.ts +88 -12
  16. package/dist/lib/authentication/providers/auth0.js +1 -1
  17. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  18. package/dist/lib/authentication/providers/openid.d.ts +1 -1
  19. package/dist/lib/authentication/providers/openid.js +10 -6
  20. package/dist/lib/authentication/providers/openid.js.map +1 -1
  21. package/dist/lib/authentication/state.d.ts +9 -0
  22. package/dist/lib/authentication/state.js +11 -0
  23. package/dist/lib/authentication/state.js.map +1 -1
  24. package/dist/lib/components/AnchorLink.js +5 -2
  25. package/dist/lib/components/AnchorLink.js.map +1 -1
  26. package/dist/lib/components/Autocomplete.d.ts +13 -0
  27. package/dist/lib/components/Autocomplete.js +47 -0
  28. package/dist/lib/components/Autocomplete.js.map +1 -0
  29. package/dist/lib/components/Header.js +4 -4
  30. package/dist/lib/components/Header.js.map +1 -1
  31. package/dist/lib/components/Heading.d.ts +1 -1
  32. package/dist/lib/components/Markdown.d.ts +2 -2
  33. package/dist/lib/components/Markdown.js +3 -1
  34. package/dist/lib/components/Markdown.js.map +1 -1
  35. package/dist/lib/components/PathRenderer.d.ts +11 -0
  36. package/dist/lib/components/PathRenderer.js +28 -0
  37. package/dist/lib/components/PathRenderer.js.map +1 -0
  38. package/dist/lib/components/StatusPage.d.ts +7 -0
  39. package/dist/lib/components/StatusPage.js +71 -0
  40. package/dist/lib/components/StatusPage.js.map +1 -0
  41. package/dist/lib/components/SyntaxHighlight.d.ts +2 -1
  42. package/dist/lib/components/SyntaxHighlight.js +2 -2
  43. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  44. package/dist/lib/components/ThemeSwitch.js +2 -2
  45. package/dist/lib/components/ThemeSwitch.js.map +1 -1
  46. package/dist/lib/components/cache.d.ts +6 -0
  47. package/dist/lib/components/cache.js +13 -0
  48. package/dist/lib/components/cache.js.map +1 -0
  49. package/dist/lib/components/context/ViewportAnchorContext.js +16 -4
  50. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  51. package/dist/lib/components/context/ZudokuContext.js +10 -3
  52. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  53. package/dist/lib/components/index.d.ts +14 -2
  54. package/dist/lib/components/index.js +10 -3
  55. package/dist/lib/components/index.js.map +1 -1
  56. package/dist/lib/components/navigation/Sidebar.js +6 -1
  57. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  58. package/dist/lib/components/navigation/SidebarCategory.js +17 -15
  59. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  60. package/dist/lib/components/navigation/SidebarItem.js +1 -0
  61. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  62. package/dist/lib/core/RouteGuard.d.ts +1 -0
  63. package/dist/lib/core/RouteGuard.js +32 -0
  64. package/dist/lib/core/RouteGuard.js.map +1 -0
  65. package/dist/lib/core/ZudokuContext.d.ts +4 -2
  66. package/dist/lib/core/ZudokuContext.js +9 -7
  67. package/dist/lib/core/ZudokuContext.js.map +1 -1
  68. package/dist/lib/oas/graphql/circular.d.ts +3 -0
  69. package/dist/lib/oas/graphql/circular.js +38 -0
  70. package/dist/lib/oas/graphql/circular.js.map +1 -0
  71. package/dist/lib/oas/graphql/index.d.ts +8 -0
  72. package/dist/lib/oas/graphql/index.js +61 -42
  73. package/dist/lib/oas/graphql/index.js.map +1 -1
  74. package/dist/lib/oas/parser/dereference/index.d.ts +0 -1
  75. package/dist/lib/oas/parser/dereference/index.js +1 -1
  76. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  77. package/dist/lib/oas/parser/upgrade/index.js +2 -1
  78. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  79. package/dist/lib/plugins/markdown/MdxPage.js +8 -2
  80. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  81. package/dist/lib/plugins/markdown/resolver.d.ts +0 -6
  82. package/dist/lib/plugins/markdown/resolver.js +0 -29
  83. package/dist/lib/plugins/markdown/resolver.js.map +1 -1
  84. package/dist/lib/plugins/openapi/ColorizedParam.js +3 -1
  85. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  86. package/dist/lib/plugins/openapi/Endpoint.js +6 -7
  87. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  88. package/dist/lib/plugins/openapi/{Route.d.ts → OpenApiRoute.d.ts} +2 -1
  89. package/dist/lib/plugins/openapi/{Route.js → OpenApiRoute.js} +3 -4
  90. package/dist/lib/plugins/openapi/OpenApiRoute.js.map +1 -0
  91. package/dist/lib/plugins/openapi/OperationList.d.ts +4 -1
  92. package/dist/lib/plugins/openapi/OperationList.js +29 -19
  93. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  94. package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
  95. package/dist/lib/plugins/openapi/OperationListItem.js +3 -3
  96. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  97. package/dist/lib/plugins/openapi/ParameterListItem.js +2 -2
  98. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  99. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -1
  100. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +8 -3
  101. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  102. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +1 -1
  103. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +2 -0
  104. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  105. package/dist/lib/plugins/openapi/Sidecar.js +11 -16
  106. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  107. package/dist/lib/plugins/openapi/SidecarBox.js +1 -1
  108. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  109. package/dist/lib/plugins/openapi/SidecarExamples.js +17 -14
  110. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  111. package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -2
  112. package/dist/lib/plugins/openapi/graphql/gql.js +3 -2
  113. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  114. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +66 -29
  115. package/dist/lib/plugins/openapi/graphql/graphql.js +33 -15
  116. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  117. package/dist/lib/plugins/openapi/index.js +126 -61
  118. package/dist/lib/plugins/openapi/index.js.map +1 -1
  119. package/dist/lib/plugins/openapi/interfaces.d.ts +12 -4
  120. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
  121. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +12 -0
  122. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
  123. package/dist/lib/plugins/openapi/playground/Headers.d.ts +4 -4
  124. package/dist/lib/plugins/openapi/playground/Headers.js +84 -5
  125. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  126. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +9 -0
  127. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +5 -0
  128. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -0
  129. package/dist/lib/plugins/openapi/playground/PathParams.js +3 -11
  130. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  131. package/dist/lib/plugins/openapi/playground/Playground.d.ts +22 -1
  132. package/dist/lib/plugins/openapi/playground/Playground.js +61 -56
  133. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  134. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  135. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  136. package/dist/lib/plugins/openapi/playground/QueryParams.js +20 -29
  137. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  138. package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +7 -0
  139. package/dist/lib/plugins/openapi/playground/SubmitButton.js +22 -0
  140. package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -0
  141. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +7 -0
  142. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +11 -0
  143. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +1 -0
  144. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +8 -0
  145. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +95 -0
  146. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -0
  147. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +7 -0
  148. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +16 -0
  149. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -0
  150. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +10 -0
  151. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +32 -0
  152. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -0
  153. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.d.ts +1 -0
  154. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js +56 -0
  155. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js.map +1 -0
  156. package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +2 -1
  157. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +5 -3
  158. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -1
  159. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +49 -0
  160. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -1
  161. package/dist/lib/plugins/openapi/post-processors/removeParameters.d.ts +10 -0
  162. package/dist/lib/plugins/openapi/post-processors/removeParameters.js +66 -0
  163. package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +1 -0
  164. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.d.ts +1 -0
  165. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js +131 -0
  166. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +1 -0
  167. package/dist/lib/plugins/openapi/schema/{SchemaComponents.js → SchemaPropertyItem.js} +10 -8
  168. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
  169. package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
  170. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  171. package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
  172. package/dist/lib/plugins/openapi/schema/utils.js +2 -0
  173. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  174. package/dist/lib/ui/Badge.d.ts +1 -1
  175. package/dist/lib/ui/Badge.js +1 -0
  176. package/dist/lib/ui/Badge.js.map +1 -1
  177. package/dist/lib/ui/Command.d.ts +9 -1
  178. package/dist/lib/ui/Command.js +5 -1
  179. package/dist/lib/ui/Command.js.map +1 -1
  180. package/dist/lib/ui/Input.d.ts +1 -2
  181. package/dist/lib/ui/Input.js.map +1 -1
  182. package/dist/lib/ui/Select.js +2 -2
  183. package/dist/lib/ui/Select.js.map +1 -1
  184. package/dist/lib/util/MdxComponents.js +2 -2
  185. package/dist/lib/util/MdxComponents.js.map +1 -1
  186. package/dist/lib/util/joinUrl.d.ts +1 -0
  187. package/dist/lib/util/joinUrl.js +40 -0
  188. package/dist/lib/util/joinUrl.js.map +1 -0
  189. package/dist/lib/util/joinUrl.test.d.ts +1 -0
  190. package/dist/lib/util/joinUrl.test.js +43 -0
  191. package/dist/lib/util/joinUrl.test.js.map +1 -0
  192. package/dist/lib/util/scrollIntoViewIfNeeded.d.ts +1 -0
  193. package/dist/lib/util/scrollIntoViewIfNeeded.js +14 -0
  194. package/dist/lib/util/scrollIntoViewIfNeeded.js.map +1 -0
  195. package/dist/lib/util/useLatest.d.ts +1 -0
  196. package/dist/lib/util/useLatest.js +15 -0
  197. package/dist/lib/util/useLatest.js.map +1 -0
  198. package/dist/lib/util/useScrollToAnchor.d.ts +1 -0
  199. package/dist/lib/util/useScrollToAnchor.js +27 -28
  200. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  201. package/dist/lib/util/useScrollToTop.js +6 -4
  202. package/dist/lib/util/useScrollToTop.js.map +1 -1
  203. package/dist/vite/build.js +15 -12
  204. package/dist/vite/build.js.map +1 -1
  205. package/dist/vite/config.js +4 -1
  206. package/dist/vite/config.js.map +1 -1
  207. package/dist/vite/config.test.js +5 -1
  208. package/dist/vite/config.test.js.map +1 -1
  209. package/dist/vite/dev-server.js +4 -1
  210. package/dist/vite/dev-server.js.map +1 -1
  211. package/dist/vite/plugin-api.d.ts +1 -1
  212. package/dist/vite/plugin-api.js +153 -98
  213. package/dist/vite/plugin-api.js.map +1 -1
  214. package/dist/vite/plugin-auth.js +4 -1
  215. package/dist/vite/plugin-auth.js.map +1 -1
  216. package/dist/vite/plugin-config.js +2 -1
  217. package/dist/vite/plugin-config.js.map +1 -1
  218. package/dist/vite/plugin-mdx.js +20 -9
  219. package/dist/vite/plugin-mdx.js.map +1 -1
  220. package/dist/vite/plugin-theme-css.js +7 -4
  221. package/dist/vite/plugin-theme-css.js.map +1 -1
  222. package/dist/vite/plugin.js.map +1 -1
  223. package/dist/vite/{prerender.d.ts → prerender/FileWritingResponse.d.ts} +0 -6
  224. package/dist/vite/prerender/FileWritingResponse.js +42 -0
  225. package/dist/vite/prerender/FileWritingResponse.js.map +1 -0
  226. package/dist/vite/prerender/prerender.d.ts +6 -0
  227. package/dist/vite/prerender/prerender.js +101 -0
  228. package/dist/vite/prerender/prerender.js.map +1 -0
  229. package/dist/vite/prerender/worker.d.ts +11 -0
  230. package/dist/vite/prerender/worker.js +21 -0
  231. package/dist/vite/prerender/worker.js.map +1 -0
  232. package/dist/vite/reporter.d.ts +3 -0
  233. package/dist/vite/reporter.js +33 -0
  234. package/dist/vite/reporter.js.map +1 -0
  235. package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
  236. package/dist/zuplo/enrich-with-zuplo.js +184 -0
  237. package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
  238. package/dist/zuplo/env.d.ts +1 -0
  239. package/dist/zuplo/env.js +3 -0
  240. package/dist/zuplo/env.js.map +1 -1
  241. package/dist/zuplo/policy-types.d.ts +33 -0
  242. package/dist/zuplo/policy-types.js +8 -0
  243. package/dist/zuplo/policy-types.js.map +1 -0
  244. package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
  245. package/dist/zuplo/with-zuplo-processors.js +26 -0
  246. package/dist/zuplo/with-zuplo-processors.js.map +1 -0
  247. package/dist/zuplo/with-zuplo.d.ts +1 -1
  248. package/dist/zuplo/with-zuplo.js +7 -26
  249. package/dist/zuplo/with-zuplo.js.map +1 -1
  250. package/lib/{AuthenticationPlugin-D7G3me8L.js → AuthenticationPlugin-DjnQ5hs7.js} +4 -4
  251. package/lib/{AuthenticationPlugin-D7G3me8L.js.map → AuthenticationPlugin-DjnQ5hs7.js.map} +1 -1
  252. package/lib/{CategoryHeading-CBconmtI.js → CategoryHeading-MYL1u_6K.js} +3 -3
  253. package/lib/{CategoryHeading-CBconmtI.js.map → CategoryHeading-MYL1u_6K.js.map} +1 -1
  254. package/lib/{Markdown-CZDLNOFc.js → Markdown-8mv9nhGd.js} +3391 -3403
  255. package/lib/Markdown-8mv9nhGd.js.map +1 -0
  256. package/lib/{MdxPage-DKMbBROv.js → MdxPage-ZX2oquWw.js} +61 -56
  257. package/lib/MdxPage-ZX2oquWw.js.map +1 -0
  258. package/lib/OpenApiRoute-BP9kzG5k.js +36 -0
  259. package/lib/OpenApiRoute-BP9kzG5k.js.map +1 -0
  260. package/lib/OperationList-c72qPMtm.js +5180 -0
  261. package/lib/OperationList-c72qPMtm.js.map +1 -0
  262. package/lib/Select-NSz0gku6.js +223 -0
  263. package/lib/Select-NSz0gku6.js.map +1 -0
  264. package/lib/{SlotletProvider-pfc9oejW.js → SlotletProvider-D0mFmGJu.js} +53 -53
  265. package/lib/{SlotletProvider-pfc9oejW.js.map → SlotletProvider-D0mFmGJu.js.map} +1 -1
  266. package/lib/{Button-DeAoTouo.js → Spinner-BlzrEEk1.js} +16 -13
  267. package/lib/Spinner-BlzrEEk1.js.map +1 -0
  268. package/lib/{SyntaxHighlight-Bz-lOJtH.js → SyntaxHighlight-B0L4SC_N.js} +390 -383
  269. package/lib/SyntaxHighlight-B0L4SC_N.js.map +1 -0
  270. package/lib/{chunk-D52XG6IA-Dl7HLe6j.js → chunk-SYFQ2XB5-QijJrSf0.js} +409 -411
  271. package/lib/chunk-SYFQ2XB5-QijJrSf0.js.map +1 -0
  272. package/lib/circular-DxaIIlWD.js +15409 -0
  273. package/lib/circular-DxaIIlWD.js.map +1 -0
  274. package/lib/context-rwLGh-6_.js +22 -0
  275. package/lib/{context-h_UkBLvr.js.map → context-rwLGh-6_.js.map} +1 -1
  276. package/lib/{createServer-BznDkeSA.js → createServer-ZDNGmPfQ.js} +3611 -5736
  277. package/lib/createServer-ZDNGmPfQ.js.map +1 -0
  278. package/lib/hook-Dnj3SwPC.js +1455 -0
  279. package/lib/hook-Dnj3SwPC.js.map +1 -0
  280. package/lib/index-B7mqiOei.js +509 -0
  281. package/lib/index-B7mqiOei.js.map +1 -0
  282. package/lib/index-CZjcfK-H.js +2063 -0
  283. package/lib/index-CZjcfK-H.js.map +1 -0
  284. package/lib/{index-LNp6rxyU.js → index-CjJS0l4l.js} +2 -2
  285. package/lib/{index-LNp6rxyU.js.map → index-CjJS0l4l.js.map} +1 -1
  286. package/lib/index-Djenk2Hj.js +36 -0
  287. package/lib/{index-CPNSgwSb.js.map → index-Djenk2Hj.js.map} +1 -1
  288. package/lib/{index-CBXSgjaE.js → index-Dl3Yl0yb.js} +65 -69
  289. package/lib/index-Dl3Yl0yb.js.map +1 -0
  290. package/lib/{index.esm-BSV1C092.js → index.esm-9-TF9KQB.js} +52 -52
  291. package/lib/{index.esm-BSV1C092.js.map → index.esm-9-TF9KQB.js.map} +1 -1
  292. package/lib/index.esm-CrSoEshU.js +1207 -0
  293. package/lib/index.esm-CrSoEshU.js.map +1 -0
  294. package/lib/joinUrl-nLx9pD-Z.js +20 -0
  295. package/lib/joinUrl-nLx9pD-Z.js.map +1 -0
  296. package/lib/{jsx-runtime-Dx-03ztt.js → jsx-runtime-Bdg6XQ1m.js} +135 -135
  297. package/lib/{jsx-runtime-Dx-03ztt.js.map → jsx-runtime-Bdg6XQ1m.js.map} +1 -1
  298. package/lib/mutation-ByGtmi0-.js +208 -0
  299. package/lib/mutation-ByGtmi0-.js.map +1 -0
  300. package/lib/post-processors/removeExtensions.js +7 -7
  301. package/lib/post-processors/removeExtensions.js.map +1 -1
  302. package/lib/post-processors/removeParameters.js +48 -0
  303. package/lib/post-processors/removeParameters.js.map +1 -0
  304. package/lib/{prism-bash.min-DadFsM4Z.js → prism-bash.min-HHIMdNJ_.js} +4 -4
  305. package/lib/{prism-bash.min-DadFsM4Z.js.map → prism-bash.min-HHIMdNJ_.js.map} +1 -1
  306. package/lib/{prism-csharp.min-DUwvItt4.js → prism-csharp.min-bQAo2pmx.js} +33 -33
  307. package/lib/{prism-csharp.min-DUwvItt4.js.map → prism-csharp.min-bQAo2pmx.js.map} +1 -1
  308. package/lib/{prism-java.min-BtgBR4yd.js → prism-java.min-BpvsOuIa.js} +12 -12
  309. package/lib/{prism-java.min-BtgBR4yd.js.map → prism-java.min-BpvsOuIa.js.map} +1 -1
  310. package/lib/{prism-markdown.min-F3U-vPBi.js → prism-markdown.min-C0Qn0m-5.js} +30 -30
  311. package/lib/{prism-markdown.min-F3U-vPBi.js.map → prism-markdown.min-C0Qn0m-5.js.map} +1 -1
  312. package/lib/{prism-ruby.min-DeDXCp1r.js → prism-ruby.min-Dx9KO9ds.js} +16 -16
  313. package/lib/{prism-ruby.min-DeDXCp1r.js.map → prism-ruby.min-Dx9KO9ds.js.map} +1 -1
  314. package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
  315. package/lib/ui/Accordion.js +1 -1
  316. package/lib/ui/ActionButton.js +10 -11
  317. package/lib/ui/ActionButton.js.map +1 -1
  318. package/lib/ui/Alert.js +2 -2
  319. package/lib/ui/AlertDialog.js +1 -1
  320. package/lib/ui/Badge.js +3 -2
  321. package/lib/ui/Badge.js.map +1 -1
  322. package/lib/ui/Breadcrumb.js +1 -1
  323. package/lib/ui/Button.js +2 -2
  324. package/lib/ui/Callout.js +1 -1
  325. package/lib/ui/Card.js +1 -1
  326. package/lib/ui/Carousel.js +3 -3
  327. package/lib/ui/Carousel.js.map +1 -1
  328. package/lib/ui/Checkbox.js +2 -2
  329. package/lib/ui/Command.js +125 -13
  330. package/lib/ui/Command.js.map +1 -1
  331. package/lib/ui/Dialog.js +1 -1
  332. package/lib/ui/Drawer.js +520 -519
  333. package/lib/ui/Drawer.js.map +1 -1
  334. package/lib/ui/DropdownMenu.js +1 -1
  335. package/lib/ui/Form.js +2 -2
  336. package/lib/ui/HoverCard.js +1 -1
  337. package/lib/ui/Input.js +1 -1
  338. package/lib/ui/Input.js.map +1 -1
  339. package/lib/ui/Label.js +2 -2
  340. package/lib/ui/Pagination.js +7 -7
  341. package/lib/ui/Popover.js +1 -1
  342. package/lib/ui/Progress.js +1 -1
  343. package/lib/ui/RadioGroup.js +1 -1
  344. package/lib/ui/ScrollArea.js +1 -1
  345. package/lib/ui/Select.js +3 -3
  346. package/lib/ui/Select.js.map +1 -1
  347. package/lib/ui/Skeleton.js +1 -1
  348. package/lib/ui/Slider.js +1 -1
  349. package/lib/ui/Switch.js +1 -1
  350. package/lib/ui/Tabs.js +1 -1
  351. package/lib/ui/Textarea.js +1 -1
  352. package/lib/ui/Toggle.js +2 -2
  353. package/lib/ui/ToggleGroup.js +1 -1
  354. package/lib/ui/Tooltip.js +1 -1
  355. package/lib/{useExposedProps-DE9lR6MF.js → useExposedProps-Bbf99zic.js} +2 -2
  356. package/lib/{useExposedProps-DE9lR6MF.js.map → useExposedProps-Bbf99zic.js.map} +1 -1
  357. package/lib/useScrollToAnchor-DkVfWsxe.js +286 -0
  358. package/lib/useScrollToAnchor-DkVfWsxe.js.map +1 -0
  359. package/lib/zudoku.auth-auth0.js +8 -10
  360. package/lib/zudoku.auth-auth0.js.map +1 -1
  361. package/lib/zudoku.auth-clerk.js +18 -18
  362. package/lib/zudoku.auth-openid.js +224 -221
  363. package/lib/zudoku.auth-openid.js.map +1 -1
  364. package/lib/zudoku.components.js +828 -940
  365. package/lib/zudoku.components.js.map +1 -1
  366. package/lib/zudoku.plugin-api-catalog.js +18 -19
  367. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  368. package/lib/zudoku.plugin-api-keys.js +15 -16
  369. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  370. package/lib/zudoku.plugin-custom-pages.js +3 -3
  371. package/lib/zudoku.plugin-markdown.js +23 -44
  372. package/lib/zudoku.plugin-markdown.js.map +1 -1
  373. package/lib/zudoku.plugin-openapi.js +7 -6
  374. package/lib/zudoku.plugin-openapi.js.map +1 -1
  375. package/lib/zudoku.plugin-redirect.js +1 -1
  376. package/lib/zudoku.plugin-search-inkeep.js +9 -9
  377. package/package.json +53 -49
  378. package/src/app/demo-cdn.html +31 -31
  379. package/src/app/entry.server.tsx +1 -1
  380. package/src/app/main.css +52 -51
  381. package/src/app/main.tsx +31 -8
  382. package/src/lib/authentication/providers/auth0.tsx +1 -4
  383. package/src/lib/authentication/providers/openid.tsx +12 -5
  384. package/src/lib/authentication/state.ts +18 -0
  385. package/src/lib/components/AnchorLink.tsx +5 -2
  386. package/src/lib/components/Autocomplete.tsx +113 -0
  387. package/src/lib/components/Header.tsx +4 -4
  388. package/src/lib/components/Markdown.tsx +14 -15
  389. package/src/lib/components/PathRenderer.tsx +61 -0
  390. package/src/lib/components/StatusPage.tsx +91 -0
  391. package/src/lib/components/SyntaxHighlight.tsx +14 -0
  392. package/src/lib/components/ThemeSwitch.tsx +2 -2
  393. package/src/lib/components/cache.ts +15 -0
  394. package/src/lib/components/context/ViewportAnchorContext.tsx +20 -6
  395. package/src/lib/components/context/ZudokuContext.ts +16 -3
  396. package/src/lib/components/index.ts +14 -3
  397. package/src/lib/components/navigation/Sidebar.tsx +7 -1
  398. package/src/lib/components/navigation/SidebarCategory.tsx +46 -43
  399. package/src/lib/components/navigation/SidebarItem.tsx +1 -0
  400. package/src/lib/core/RouteGuard.tsx +39 -0
  401. package/src/lib/core/ZudokuContext.ts +9 -8
  402. package/src/lib/oas/graphql/circular.ts +50 -0
  403. package/src/lib/oas/graphql/index.ts +95 -69
  404. package/src/lib/oas/parser/dereference/index.ts +1 -2
  405. package/src/lib/oas/parser/upgrade/index.ts +2 -1
  406. package/src/lib/plugins/markdown/MdxPage.tsx +9 -1
  407. package/src/lib/plugins/markdown/resolver.ts +0 -33
  408. package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -3
  409. package/src/lib/plugins/openapi/Endpoint.tsx +11 -9
  410. package/src/lib/plugins/openapi/{Route.tsx → OpenApiRoute.tsx} +3 -3
  411. package/src/lib/plugins/openapi/OperationList.tsx +47 -19
  412. package/src/lib/plugins/openapi/OperationListItem.tsx +7 -4
  413. package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -6
  414. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +11 -1
  415. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +2 -0
  416. package/src/lib/plugins/openapi/Sidecar.tsx +27 -34
  417. package/src/lib/plugins/openapi/SidecarBox.tsx +1 -1
  418. package/src/lib/plugins/openapi/SidecarExamples.tsx +24 -24
  419. package/src/lib/plugins/openapi/graphql/gql.ts +12 -4
  420. package/src/lib/plugins/openapi/graphql/graphql.ts +92 -45
  421. package/src/lib/plugins/openapi/index.tsx +163 -78
  422. package/src/lib/plugins/openapi/interfaces.ts +16 -12
  423. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +54 -0
  424. package/src/lib/plugins/openapi/playground/Headers.tsx +165 -36
  425. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +13 -0
  426. package/src/lib/plugins/openapi/playground/PathParams.tsx +35 -75
  427. package/src/lib/plugins/openapi/playground/Playground.tsx +251 -213
  428. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +6 -3
  429. package/src/lib/plugins/openapi/playground/QueryParams.tsx +84 -114
  430. package/src/lib/plugins/openapi/playground/SubmitButton.tsx +75 -0
  431. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +73 -0
  432. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +210 -0
  433. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +101 -0
  434. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.test.ts +64 -0
  435. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +36 -0
  436. package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +58 -0
  437. package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +7 -4
  438. package/src/lib/plugins/openapi/post-processors/removeParameters.test.ts +148 -0
  439. package/src/lib/plugins/openapi/post-processors/removeParameters.ts +101 -0
  440. package/src/lib/plugins/openapi/schema/{SchemaComponents.tsx → SchemaPropertyItem.tsx} +11 -7
  441. package/src/lib/plugins/openapi/schema/SchemaView.tsx +4 -1
  442. package/src/lib/plugins/openapi/schema/utils.ts +4 -0
  443. package/src/lib/ui/Badge.tsx +1 -0
  444. package/src/lib/ui/Command.tsx +20 -0
  445. package/src/lib/ui/Input.tsx +1 -2
  446. package/src/lib/ui/Select.tsx +1 -1
  447. package/src/lib/util/MdxComponents.tsx +2 -1
  448. package/src/lib/util/joinUrl.test.ts +62 -0
  449. package/src/lib/util/joinUrl.ts +57 -0
  450. package/src/lib/util/scrollIntoViewIfNeeded.ts +18 -0
  451. package/src/lib/util/useLatest.ts +18 -0
  452. package/src/lib/util/useScrollToAnchor.ts +33 -34
  453. package/src/lib/util/useScrollToTop.ts +8 -3
  454. package/dist/lib/plugins/openapi/Route.js.map +0 -1
  455. package/dist/lib/plugins/openapi/playground/EnumSelector.d.ts +0 -8
  456. package/dist/lib/plugins/openapi/playground/EnumSelector.js +0 -21
  457. package/dist/lib/plugins/openapi/playground/EnumSelector.js.map +0 -1
  458. package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +0 -4
  459. package/dist/lib/plugins/openapi/playground/ResponseTab.js +0 -42
  460. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +0 -1
  461. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
  462. package/dist/vite/prerender.js +0 -89
  463. package/dist/vite/prerender.js.map +0 -1
  464. package/lib/AnchorLink-DFZZbmvr.js +0 -34
  465. package/lib/AnchorLink-DFZZbmvr.js.map +0 -1
  466. package/lib/Button-DeAoTouo.js.map +0 -1
  467. package/lib/Command-9x_kZHr4.js +0 -611
  468. package/lib/Command-9x_kZHr4.js.map +0 -1
  469. package/lib/Markdown-CZDLNOFc.js.map +0 -1
  470. package/lib/MdxPage-DKMbBROv.js.map +0 -1
  471. package/lib/OperationList-DFa3DqhW.js +0 -5143
  472. package/lib/OperationList-DFa3DqhW.js.map +0 -1
  473. package/lib/Route-DYwKZ_c_.js +0 -35
  474. package/lib/Route-DYwKZ_c_.js.map +0 -1
  475. package/lib/Select-B_IxRUUC.js +0 -223
  476. package/lib/Select-B_IxRUUC.js.map +0 -1
  477. package/lib/Spinner-DuxJLLNE.js +0 -7
  478. package/lib/Spinner-DuxJLLNE.js.map +0 -1
  479. package/lib/StaggeredRender-DgsamH_G.js +0 -17
  480. package/lib/StaggeredRender-DgsamH_G.js.map +0 -1
  481. package/lib/SyntaxHighlight-Bz-lOJtH.js.map +0 -1
  482. package/lib/ZudokuContext-hmLMUdf2.js +0 -1217
  483. package/lib/ZudokuContext-hmLMUdf2.js.map +0 -1
  484. package/lib/__vite-browser-external-BYRIRx8p.js +0 -9
  485. package/lib/__vite-browser-external-BYRIRx8p.js.map +0 -1
  486. package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +0 -1
  487. package/lib/context-h_UkBLvr.js +0 -22
  488. package/lib/createServer-BznDkeSA.js.map +0 -1
  489. package/lib/hook-CHq7pFyz.js +0 -227
  490. package/lib/hook-CHq7pFyz.js.map +0 -1
  491. package/lib/index-Bn6Lc9tq.js +0 -9
  492. package/lib/index-Bn6Lc9tq.js.map +0 -1
  493. package/lib/index-CBXSgjaE.js.map +0 -1
  494. package/lib/index-CPNSgwSb.js +0 -36
  495. package/lib/index-PqKef_jH.js +0 -1292
  496. package/lib/index-PqKef_jH.js.map +0 -1
  497. package/lib/index-TaRXY2w1.js +0 -43
  498. package/lib/index-TaRXY2w1.js.map +0 -1
  499. package/lib/index.esm-BnnBRKJX.js +0 -1214
  500. package/lib/index.esm-BnnBRKJX.js.map +0 -1
  501. package/lib/state-CFQsUZUP.js +0 -202
  502. package/lib/state-CFQsUZUP.js.map +0 -1
  503. package/src/lib/plugins/openapi/playground/EnumSelector.tsx +0 -86
  504. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -76
  505. /package/dist/lib/plugins/openapi/schema/{SchemaComponents.d.ts → SchemaPropertyItem.d.ts} +0 -0
@@ -0,0 +1,2063 @@
1
+ var pt = Object.defineProperty;
2
+ var qe = (t) => {
3
+ throw TypeError(t);
4
+ };
5
+ var ht = (t, a, s) => a in t ? pt(t, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[a] = s;
6
+ var Y = (t, a, s) => ht(t, typeof a != "symbol" ? a + "" : a, s), xt = (t, a, s) => a.has(t) || qe("Cannot " + s);
7
+ var ee = (t, a, s) => (xt(t, a, "read from private field"), s ? s.call(t) : a.get(t)), te = (t, a, s) => a.has(t) ? qe("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, s);
8
+ import { j as e } from "./jsx-runtime-Bdg6XQ1m.js";
9
+ import { s as ae } from "./index-CjJS0l4l.js";
10
+ import { Circle as ft, ChevronRightIcon as z, CheckIcon as gt, DotIcon as yt, Check as vt, Search as jt, XIcon as bt, ChevronDownIcon as Nt, InfoIcon as De, LogInIcon as wt, CirclePlayIcon as Ct } from "lucide-react";
11
+ import { m as Tt, r as $t } from "./chunk-SYFQ2XB5-QijJrSf0.js";
12
+ import { m as St, o as Pt, p as kt, k as Rt } from "./hook-Dnj3SwPC.js";
13
+ import { Button as _ } from "./ui/Button.js";
14
+ import { j as R } from "./joinUrl-nLx9pD-Z.js";
15
+ import { Z as It } from "./invariant-Caa8-XvF.js";
16
+ import { VisuallyHidden as Ot } from "@radix-ui/react-visually-hidden";
17
+ import * as f from "react";
18
+ import { Fragment as I, useRef as q, useEffect as ue, useState as H, useCallback as Et, useTransition as At } from "react";
19
+ import { V as $, T as qt, D as Dt, b as Lt, a as Vt, c as Ft } from "./index-B7mqiOei.js";
20
+ import { S as Me, a as Ue, b as _e, c as Je, e as M, u as zt } from "./Select-NSz0gku6.js";
21
+ import { b as pe, u as he, C as O, a as Ht, F as Gt } from "./index.esm-CrSoEshU.js";
22
+ import { c as xe } from "./index-Djenk2Hj.js";
23
+ import { c as u } from "./cn-qaFjX9_3.js";
24
+ import * as Qe from "@radix-ui/react-label";
25
+ import * as G from "@radix-ui/react-radio-group";
26
+ import { Card as fe, CardHeader as Bt, CardTitle as Mt, CardContent as Ut } from "./ui/Card.js";
27
+ import { Tabs as We, TabsList as Ze, TabsTrigger as E, TabsContent as A } from "./ui/Tabs.js";
28
+ import { z as _t, S as Jt } from "./SyntaxHighlight-B0L4SC_N.js";
29
+ import { B as U, S as Qt } from "./Spinner-BlzrEEk1.js";
30
+ import * as b from "@radix-ui/react-dropdown-menu";
31
+ import * as ie from "@radix-ui/react-checkbox";
32
+ import * as J from "@radix-ui/react-popover";
33
+ import { PopoverAnchor as Wt } from "@radix-ui/react-popover";
34
+ import { Input as ge } from "./ui/Input.js";
35
+ import { Slot as Zt } from "@radix-ui/react-slot";
36
+ import { Callout as Kt } from "./ui/Callout.js";
37
+ import { Collapsible as Le, CollapsibleTrigger as Ve, CollapsibleContent as Fe } from "./ui/Collapsible.js";
38
+ import * as ye from "@radix-ui/react-collapsible";
39
+ let se;
40
+ const Xt = (t) => {
41
+ var a;
42
+ if ((a = t.errors) != null && a[0])
43
+ throw new It(t.errors[0].message, {
44
+ developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
45
+ });
46
+ };
47
+ var Z, K;
48
+ class Yt {
49
+ constructor(a) {
50
+ te(this, Z, async () => (se || (se = import("./createServer-ZDNGmPfQ.js").then(
51
+ (a) => a.createServer(this.config)
52
+ )), se));
53
+ te(this, K, async (a) => this.config.server ? fetch(this.config.server, a) : (await ee(this, Z).call(this)).fetch("http://localhost/graphql", a));
54
+ Y(this, "fetch", async (a, ...[s]) => {
55
+ var l;
56
+ const n = (l = a.match(/query (\w+)/)) == null ? void 0 : l[1], o = await ee(this, K).call(this, {
57
+ method: "POST",
58
+ body: JSON.stringify({ query: a, variables: s, operationName: n }),
59
+ headers: { "Content-Type": "application/json" }
60
+ });
61
+ if (!o.ok)
62
+ throw new Error("Network response was not ok");
63
+ const d = await o.json();
64
+ return Xt(d), d.data;
65
+ });
66
+ this.config = a;
67
+ }
68
+ }
69
+ Z = new WeakMap(), K = new WeakMap();
70
+ class D extends String {
71
+ constructor(s, n) {
72
+ super(s);
73
+ Y(this, "__apiType");
74
+ this.value = s, this.__meta__ = n;
75
+ }
76
+ toString() {
77
+ return this.value;
78
+ }
79
+ }
80
+ const ea = new D(
81
+ `
82
+ fragment OperationsFragment on OperationItem {
83
+ slug
84
+ summary
85
+ method
86
+ description
87
+ operationId
88
+ contentTypes
89
+ path
90
+ parameters {
91
+ name
92
+ in
93
+ description
94
+ required
95
+ schema
96
+ style
97
+ examples {
98
+ name
99
+ description
100
+ externalValue
101
+ value
102
+ summary
103
+ }
104
+ }
105
+ requestBody {
106
+ content {
107
+ mediaType
108
+ encoding {
109
+ name
110
+ }
111
+ examples {
112
+ name
113
+ description
114
+ externalValue
115
+ value
116
+ summary
117
+ }
118
+ schema
119
+ }
120
+ description
121
+ required
122
+ }
123
+ responses {
124
+ statusCode
125
+ links
126
+ description
127
+ content {
128
+ examples {
129
+ name
130
+ description
131
+ externalValue
132
+ value
133
+ summary
134
+ }
135
+ mediaType
136
+ encoding {
137
+ name
138
+ }
139
+ schema
140
+ }
141
+ }
142
+ }
143
+ `,
144
+ { fragmentName: "OperationsFragment" }
145
+ ), ta = new D(`
146
+ query ServersQuery($input: JSON!, $type: SchemaType!) {
147
+ schema(input: $input, type: $type) {
148
+ url
149
+ servers {
150
+ url
151
+ }
152
+ }
153
+ }
154
+ `), aa = new D(`
155
+ query AllOperations($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
156
+ schema(input: $input, type: $type) {
157
+ servers {
158
+ url
159
+ }
160
+ description
161
+ summary
162
+ title
163
+ url
164
+ version
165
+ tags(name: $tag) {
166
+ name
167
+ description
168
+ }
169
+ operations(tag: $tag, untagged: $untagged) {
170
+ slug
171
+ ...OperationsFragment
172
+ }
173
+ }
174
+ }
175
+ fragment OperationsFragment on OperationItem {
176
+ slug
177
+ summary
178
+ method
179
+ description
180
+ operationId
181
+ contentTypes
182
+ path
183
+ parameters {
184
+ name
185
+ in
186
+ description
187
+ required
188
+ schema
189
+ style
190
+ examples {
191
+ name
192
+ description
193
+ externalValue
194
+ value
195
+ summary
196
+ }
197
+ }
198
+ requestBody {
199
+ content {
200
+ mediaType
201
+ encoding {
202
+ name
203
+ }
204
+ examples {
205
+ name
206
+ description
207
+ externalValue
208
+ value
209
+ summary
210
+ }
211
+ schema
212
+ }
213
+ description
214
+ required
215
+ }
216
+ responses {
217
+ statusCode
218
+ links
219
+ description
220
+ content {
221
+ examples {
222
+ name
223
+ description
224
+ externalValue
225
+ value
226
+ summary
227
+ }
228
+ mediaType
229
+ encoding {
230
+ name
231
+ }
232
+ schema
233
+ }
234
+ }
235
+ }`), sa = new D(`
236
+ query getServerQuery($input: JSON!, $type: SchemaType!) {
237
+ schema(input: $input, type: $type) {
238
+ url
239
+ servers {
240
+ url
241
+ }
242
+ }
243
+ }
244
+ `), na = new D(`
245
+ query GetCategories($input: JSON!, $type: SchemaType!) {
246
+ schema(input: $input, type: $type) {
247
+ url
248
+ tags {
249
+ name
250
+ }
251
+ }
252
+ }
253
+ `), ra = new D(`
254
+ query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {
255
+ schema(input: $input, type: $type) {
256
+ operations(tag: $tag) {
257
+ slug
258
+ deprecated
259
+ method
260
+ summary
261
+ operationId
262
+ path
263
+ tags {
264
+ name
265
+ }
266
+ }
267
+ untagged: operations(untagged: true) {
268
+ slug
269
+ deprecated
270
+ method
271
+ summary
272
+ operationId
273
+ path
274
+ }
275
+ }
276
+ }
277
+ `), oa = {
278
+ "\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": ta,
279
+ "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": ea,
280
+ "\n query AllOperations(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tags(name: $tag) {\n name\n description\n }\n operations(tag: $tag, untagged: $untagged) {\n slug\n ...OperationsFragment\n }\n }\n }\n": aa,
281
+ "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": sa,
282
+ "\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n name\n }\n }\n }\n": na,
283
+ "\n query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {\n schema(input: $input, type: $type) {\n operations(tag: $tag) {\n slug\n deprecated\n method\n summary\n operationId\n path\n tags {\n name\n }\n }\n untagged: operations(untagged: true) {\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n": ra
284
+ };
285
+ function Ke(t) {
286
+ return oa[t] ?? {};
287
+ }
288
+ const la = xe(
289
+ "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
290
+ {
291
+ variants: {
292
+ variant: {
293
+ default: "bg-background text-foreground",
294
+ destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
295
+ }
296
+ },
297
+ defaultVariants: {
298
+ variant: "default"
299
+ }
300
+ }
301
+ ), de = f.forwardRef(({ className: t, variant: a, ...s }, n) => /* @__PURE__ */ e.jsx(
302
+ "div",
303
+ {
304
+ ref: n,
305
+ role: "alert",
306
+ className: u(la({ variant: a }), t),
307
+ ...s
308
+ }
309
+ ));
310
+ de.displayName = "Alert";
311
+ const ce = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
312
+ "h5",
313
+ {
314
+ ref: s,
315
+ className: u("mb-1 font-medium leading-none tracking-tight", t),
316
+ ...a
317
+ }
318
+ ));
319
+ ce.displayName = "AlertTitle";
320
+ const me = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
321
+ "div",
322
+ {
323
+ ref: s,
324
+ className: u("text-sm [&_p]:leading-relaxed", t),
325
+ ...a
326
+ }
327
+ ));
328
+ me.displayName = "AlertDescription";
329
+ const ia = ({
330
+ path: t,
331
+ renderParam: a
332
+ }) => {
333
+ let s = 0;
334
+ return t.split("/").map((n, o, d) => {
335
+ const l = Array.from(n.matchAll(/{([^}]+)}/g)), c = [];
336
+ let i = 0;
337
+ return l.forEach((p) => {
338
+ const [g, w] = p;
339
+ if (!w) return;
340
+ const j = p.index;
341
+ j > i && c.push(
342
+ /* @__PURE__ */ e.jsx(I, { children: n.slice(i, j) }, `text-${i}-${j}`)
343
+ ), c.push(
344
+ /* @__PURE__ */ e.jsx(I, { children: a({ name: w, originalValue: g, index: s++ }) }, `param-${w}`)
345
+ ), i = j + g.length;
346
+ }), i < n.length && c.push(
347
+ /* @__PURE__ */ e.jsx(I, { children: n.slice(i) }, `text-${i}-${n.length}`)
348
+ ), // eslint-disable-next-line react/no-array-index-key
349
+ /* @__PURE__ */ e.jsxs(I, { children: [
350
+ c,
351
+ o < d.length - 1 && "/",
352
+ /* @__PURE__ */ e.jsx("wbr", {})
353
+ ] }, `${n}-${o}`);
354
+ });
355
+ }, da = xe(
356
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
357
+ ), V = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
358
+ Qe.Root,
359
+ {
360
+ ref: s,
361
+ className: u(da(), t),
362
+ ...a
363
+ }
364
+ ));
365
+ V.displayName = Qe.Root.displayName;
366
+ const ve = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
367
+ G.Root,
368
+ {
369
+ className: u("grid gap-2", t),
370
+ ...a,
371
+ ref: s
372
+ }
373
+ ));
374
+ ve.displayName = G.Root.displayName;
375
+ const Q = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
376
+ G.Item,
377
+ {
378
+ ref: s,
379
+ className: u(
380
+ "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
381
+ t
382
+ ),
383
+ ...a,
384
+ children: /* @__PURE__ */ e.jsx(G.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(ft, { className: "h-2.5 w-2.5 fill-current text-current" }) })
385
+ }
386
+ ));
387
+ Q.displayName = G.Item.displayName;
388
+ const Xe = f.forwardRef(
389
+ ({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
390
+ "textarea",
391
+ {
392
+ className: u(
393
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
394
+ t
395
+ ),
396
+ ref: s,
397
+ ...a
398
+ }
399
+ )
400
+ );
401
+ Xe.displayName = "Textarea";
402
+ const ne = (t) => Math.abs(
403
+ isNaN(parseInt(t)) ? t.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(t)) ? 0 : parseInt(t)
404
+ ), re = (t) => t.length > 1 ? parseInt(t.split("").reduce((a, s) => `${ne(a) + ne(s)}`)) : ne(t), ze = (t, a = {}) => {
405
+ const s = (3 * re(t) + 2 * re(t) + re(t)) % 360, { saturation: n = 75, lightness: o = 60 } = a;
406
+ return `${s}deg ${n}% ${o}%`;
407
+ }, oe = "data-linked-param", ca = (t) => {
408
+ const { resolvedTheme: a } = _t();
409
+ return {
410
+ text: ze(
411
+ t,
412
+ a === "light" ? { saturation: 95, lightness: 38 } : {}
413
+ ),
414
+ background: ze(
415
+ t,
416
+ a === "light" ? { saturation: 85, lightness: 40 } : {}
417
+ )
418
+ };
419
+ }, Ye = ({
420
+ name: t,
421
+ className: a,
422
+ slug: s,
423
+ title: n,
424
+ children: o,
425
+ onClick: d
426
+ }) => {
427
+ const l = q(null), c = s == null ? void 0 : s.replace(/[{}]/g, ""), i = t.replace(/[{}]/g, ""), { text: p, background: g } = ca(i), w = `hsl(${p} / 100%)`, j = `hsl(${g} / 10%)`, m = `hsl(${g} / 50%)`;
428
+ return ue(() => {
429
+ if (!c || !l.current) return;
430
+ const h = () => {
431
+ document.querySelectorAll(`[${oe}="${c}"]`).forEach((v) => {
432
+ v instanceof HTMLElement && (v.dataset.active = "true");
433
+ });
434
+ }, x = () => {
435
+ document.querySelectorAll(`[${oe}="${c}"]`).forEach((v) => {
436
+ v instanceof HTMLElement && (v.dataset.active = "false");
437
+ });
438
+ }, y = l.current;
439
+ return y.addEventListener("mouseenter", h), y.addEventListener("mouseleave", x), () => {
440
+ y.removeEventListener("mouseenter", h), y.removeEventListener("mouseleave", x);
441
+ };
442
+ }, [c]), /* @__PURE__ */ e.jsx(
443
+ "span",
444
+ {
445
+ [oe]: c,
446
+ className: u(
447
+ // This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
448
+ "relative rounded transition-all duration-100 rounded-lg",
449
+ "border border-[--border-color] p-0.5 text-[--param-color] bg-[--background-color]",
450
+ "data-[active=true]:border-[--param-color] data-[active=true]:shadow data-[active=true]:bottom-px",
451
+ a
452
+ ),
453
+ title: n,
454
+ suppressHydrationWarning: !0,
455
+ ref: l,
456
+ onClick: d,
457
+ style: {
458
+ "--param-color": w,
459
+ "--border-color": m,
460
+ "--background-color": j
461
+ },
462
+ children: o ?? t
463
+ }
464
+ );
465
+ }, ma = (t, a, s) => {
466
+ const n = a.replace(/(:\w+|\{\w+})/g, (d) => {
467
+ var i;
468
+ const l = d.replace(/[:{}]/g, "");
469
+ return ((i = s.pathParams.find((p) => p.name === l)) == null ? void 0 : i.value) ?? d;
470
+ }), o = new URL(
471
+ n.replace(/^\//, ""),
472
+ t.endsWith("/") ? t : `${t}/`
473
+ );
474
+ return s.queryParams.filter((d) => d.active).forEach((d) => {
475
+ o.searchParams.set(d.name, d.value);
476
+ }), o;
477
+ }, et = b.Root, tt = b.Trigger, ua = b.Group, pa = f.forwardRef(({ className: t, inset: a, children: s, ...n }, o) => /* @__PURE__ */ e.jsxs(
478
+ b.SubTrigger,
479
+ {
480
+ ref: o,
481
+ className: u(
482
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
483
+ a && "pl-8",
484
+ t
485
+ ),
486
+ ...n,
487
+ children: [
488
+ s,
489
+ /* @__PURE__ */ e.jsx(z, { className: "ml-auto h-4 w-4" })
490
+ ]
491
+ }
492
+ ));
493
+ pa.displayName = b.SubTrigger.displayName;
494
+ const ha = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
495
+ b.SubContent,
496
+ {
497
+ ref: s,
498
+ className: u(
499
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
500
+ t
501
+ ),
502
+ ...a
503
+ }
504
+ ));
505
+ ha.displayName = b.SubContent.displayName;
506
+ const je = f.forwardRef(({ className: t, sideOffset: a = 4, ...s }, n) => /* @__PURE__ */ e.jsx(b.Portal, { children: /* @__PURE__ */ e.jsx(
507
+ b.Content,
508
+ {
509
+ ref: n,
510
+ sideOffset: a,
511
+ className: u(
512
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
513
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
514
+ t
515
+ ),
516
+ ...s
517
+ }
518
+ ) }));
519
+ je.displayName = b.Content.displayName;
520
+ const be = f.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ e.jsx(
521
+ b.Item,
522
+ {
523
+ ref: n,
524
+ className: u(
525
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
526
+ a && "pl-8",
527
+ t
528
+ ),
529
+ ...s
530
+ }
531
+ ));
532
+ be.displayName = b.Item.displayName;
533
+ const xa = f.forwardRef(({ className: t, children: a, checked: s, ...n }, o) => /* @__PURE__ */ e.jsxs(
534
+ b.CheckboxItem,
535
+ {
536
+ ref: o,
537
+ className: u(
538
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
539
+ t
540
+ ),
541
+ checked: s,
542
+ ...n,
543
+ children: [
544
+ /* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(b.ItemIndicator, { children: /* @__PURE__ */ e.jsx(gt, { className: "h-4 w-4" }) }) }),
545
+ a
546
+ ]
547
+ }
548
+ ));
549
+ xa.displayName = b.CheckboxItem.displayName;
550
+ const fa = f.forwardRef(({ className: t, children: a, ...s }, n) => /* @__PURE__ */ e.jsxs(
551
+ b.RadioItem,
552
+ {
553
+ ref: n,
554
+ className: u(
555
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
556
+ t
557
+ ),
558
+ ...s,
559
+ children: [
560
+ /* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(b.ItemIndicator, { children: /* @__PURE__ */ e.jsx(yt, { className: "h-4 w-4 fill-current" }) }) }),
561
+ a
562
+ ]
563
+ }
564
+ ));
565
+ fa.displayName = b.RadioItem.displayName;
566
+ const at = f.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ e.jsx(
567
+ b.Label,
568
+ {
569
+ ref: n,
570
+ className: u(
571
+ "px-2 py-1.5 text-sm font-semibold",
572
+ a && "pl-8",
573
+ t
574
+ ),
575
+ ...s
576
+ }
577
+ ));
578
+ at.displayName = b.Label.displayName;
579
+ const st = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
580
+ b.Separator,
581
+ {
582
+ ref: s,
583
+ className: u("-mx-1 my-1 h-px bg-muted", t),
584
+ ...a
585
+ }
586
+ ));
587
+ st.displayName = b.Separator.displayName;
588
+ const ga = ({
589
+ examples: t,
590
+ onSelect: a
591
+ }) => /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2 mt-2 items-end", children: /* @__PURE__ */ e.jsxs(et, { children: [
592
+ /* @__PURE__ */ e.jsx(tt, { asChild: !0, children: /* @__PURE__ */ e.jsx(U, { variant: "outline", children: "Use Example" }) }),
593
+ /* @__PURE__ */ e.jsx(je, { className: "w-56", children: t.map((s) => {
594
+ var n;
595
+ return /* @__PURE__ */ e.jsxs("div", { children: [
596
+ /* @__PURE__ */ e.jsx(at, { children: s.mediaType }),
597
+ /* @__PURE__ */ e.jsx(st, {}),
598
+ /* @__PURE__ */ e.jsx(ua, { children: (n = s.examples) == null ? void 0 : n.map((o) => /* @__PURE__ */ e.jsx(
599
+ be,
600
+ {
601
+ onSelect: () => a(o),
602
+ className: "line-clamp-1",
603
+ children: o.summary ?? o.name
604
+ },
605
+ o.name
606
+ )) })
607
+ ] }, s.mediaType);
608
+ }) })
609
+ ] }) }), X = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
610
+ "div",
611
+ {
612
+ ref: s,
613
+ className: u(
614
+ "rounded-xl border bg-card text-card-foreground shadow-sm",
615
+ t
616
+ ),
617
+ ...a
618
+ }
619
+ ));
620
+ X.displayName = "Card";
621
+ const ya = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
622
+ "div",
623
+ {
624
+ ref: s,
625
+ className: u("flex flex-col space-y-1.5 p-6", t),
626
+ ...a
627
+ }
628
+ ));
629
+ ya.displayName = "CardHeader";
630
+ const va = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
631
+ "h3",
632
+ {
633
+ ref: s,
634
+ className: u("font-semibold leading-none tracking-tight", t),
635
+ ...a
636
+ }
637
+ ));
638
+ va.displayName = "CardTitle";
639
+ const ja = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
640
+ "p",
641
+ {
642
+ ref: s,
643
+ className: u("text-sm text-muted-foreground", t),
644
+ ...a
645
+ }
646
+ ));
647
+ ja.displayName = "CardDescription";
648
+ const ba = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx("div", { ref: s, className: u("p-6 pt-0", t), ...a }));
649
+ ba.displayName = "CardContent";
650
+ const Na = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
651
+ "div",
652
+ {
653
+ ref: s,
654
+ className: u("flex items-center p-6 pt-0", t),
655
+ ...a
656
+ }
657
+ ));
658
+ Na.displayName = "CardFooter";
659
+ const wa = xe(
660
+ "peer h-4 w-4 shrink-0 rounded-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary",
661
+ {
662
+ variants: {
663
+ variant: {
664
+ default: "border border-primary data-[state=checked]:bg-primary",
665
+ outline: "border border-input data-[state=checked]:bg-accent"
666
+ }
667
+ },
668
+ defaultVariants: {
669
+ variant: "default"
670
+ }
671
+ }
672
+ ), Ne = f.forwardRef(({ className: t, variant: a, ...s }, n) => /* @__PURE__ */ e.jsx(
673
+ ie.Root,
674
+ {
675
+ ref: n,
676
+ className: u(wa({ variant: a, className: t })),
677
+ ...s,
678
+ children: /* @__PURE__ */ e.jsx(
679
+ ie.Indicator,
680
+ {
681
+ className: u("flex items-center justify-center text-current"),
682
+ children: /* @__PURE__ */ e.jsx(vt, { className: "h-4 w-4" })
683
+ }
684
+ )
685
+ }
686
+ ));
687
+ Ne.displayName = ie.Root.displayName;
688
+ const nt = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
689
+ $,
690
+ {
691
+ ref: s,
692
+ className: u(
693
+ "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
694
+ t
695
+ ),
696
+ ...a
697
+ }
698
+ ));
699
+ nt.displayName = $.displayName;
700
+ const Ca = f.forwardRef(({ className: t, ...a }, s) => (
701
+ // eslint-disable-next-line react/no-unknown-property
702
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
703
+ /* @__PURE__ */ e.jsx(jt, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
704
+ /* @__PURE__ */ e.jsx(
705
+ $.Input,
706
+ {
707
+ ref: s,
708
+ className: u(
709
+ "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
710
+ t
711
+ ),
712
+ ...a
713
+ }
714
+ )
715
+ ] })
716
+ ));
717
+ Ca.displayName = $.Input.displayName;
718
+ const rt = f.forwardRef(({ className: t, ...a }, s) => (
719
+ // eslint-disable-next-line react/no-unknown-property
720
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center", "cmdk-input-wrapper": "", children: /* @__PURE__ */ e.jsx(
721
+ $.Input,
722
+ {
723
+ ref: s,
724
+ className: u(
725
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
726
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
727
+ t
728
+ ),
729
+ ...a
730
+ }
731
+ ) })
732
+ ));
733
+ rt.displayName = $.Input.displayName;
734
+ const ot = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
735
+ $.List,
736
+ {
737
+ ref: s,
738
+ className: u("max-h-[300px] overflow-y-auto overflow-x-hidden", t),
739
+ ...a
740
+ }
741
+ ));
742
+ ot.displayName = $.List.displayName;
743
+ const Ta = f.forwardRef((t, a) => /* @__PURE__ */ e.jsx(
744
+ $.Empty,
745
+ {
746
+ ref: a,
747
+ className: "py-6 text-center text-sm",
748
+ ...t
749
+ }
750
+ ));
751
+ Ta.displayName = $.Empty.displayName;
752
+ const $a = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
753
+ $.Group,
754
+ {
755
+ ref: s,
756
+ className: u(
757
+ "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
758
+ t
759
+ ),
760
+ ...a
761
+ }
762
+ ));
763
+ $a.displayName = $.Group.displayName;
764
+ const Sa = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
765
+ $.Separator,
766
+ {
767
+ ref: s,
768
+ className: u("-mx-1 h-px bg-border", t),
769
+ ...a
770
+ }
771
+ ));
772
+ Sa.displayName = $.Separator.displayName;
773
+ const lt = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
774
+ $.Item,
775
+ {
776
+ ref: s,
777
+ className: u(
778
+ "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
779
+ t
780
+ ),
781
+ ...a
782
+ }
783
+ ));
784
+ lt.displayName = $.Item.displayName;
785
+ const Pa = J.Root, it = f.forwardRef(({ className: t, align: a = "center", sideOffset: s = 4, ...n }, o) => /* @__PURE__ */ e.jsx(J.Portal, { children: /* @__PURE__ */ e.jsx(
786
+ J.Content,
787
+ {
788
+ ref: o,
789
+ align: a,
790
+ sideOffset: s,
791
+ className: u(
792
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
793
+ t
794
+ ),
795
+ ...n
796
+ }
797
+ ) }));
798
+ it.displayName = J.Content.displayName;
799
+ const ka = ({
800
+ value: t,
801
+ options: a,
802
+ onChange: s,
803
+ className: n,
804
+ placeholder: o = "Enter value",
805
+ onEnterPress: d,
806
+ ref: l
807
+ }) => {
808
+ const [c, i] = H(!1), [p, g] = H(!1), w = qt((m) => m.filtered.count), j = q(null);
809
+ return /* @__PURE__ */ e.jsxs(Pa, { open: c, children: [
810
+ /* @__PURE__ */ e.jsx(Wt, { children: /* @__PURE__ */ e.jsx(
811
+ rt,
812
+ {
813
+ ref: (m) => {
814
+ j.current = m, typeof l == "function" ? l(m) : l && (l.current = m);
815
+ },
816
+ value: t,
817
+ placeholder: o,
818
+ className: u("h-9 bg-transparent", n),
819
+ onFocus: () => i(!0),
820
+ onBlur: () => {
821
+ p || i(!1);
822
+ },
823
+ onKeyDown: (m) => {
824
+ var h;
825
+ m.key === "Enter" && (i(!1), (h = j.current) == null || h.blur(), d == null || d(m));
826
+ },
827
+ onValueChange: (m) => s(m)
828
+ }
829
+ ) }),
830
+ /* @__PURE__ */ e.jsx(
831
+ it,
832
+ {
833
+ onMouseEnter: () => g(!0),
834
+ onMouseLeave: () => g(!1),
835
+ onOpenAutoFocus: (m) => m.preventDefault(),
836
+ className: u("p-0 w-[--radix-popover-trigger-width]", {
837
+ "border-0": w === 0
838
+ }),
839
+ align: "start",
840
+ side: "bottom",
841
+ onWheel: (m) => {
842
+ m.stopPropagation();
843
+ },
844
+ onTouchMove: (m) => {
845
+ m.stopPropagation();
846
+ },
847
+ children: /* @__PURE__ */ e.jsx(ot, { className: "max-h-[140px]", children: a.map((m) => /* @__PURE__ */ e.jsx(
848
+ lt,
849
+ {
850
+ value: m,
851
+ onSelect: (h) => {
852
+ s(h), i(!1);
853
+ },
854
+ className: "cursor-pointer",
855
+ children: m
856
+ },
857
+ m
858
+ )) })
859
+ }
860
+ )
861
+ ] });
862
+ }, W = ({ shouldFilter: t, ...a }) => /* @__PURE__ */ e.jsx(nt, { className: "bg-transparent", shouldFilter: t, children: /* @__PURE__ */ e.jsx(ka, { ...a }) }), we = (t, a) => {
863
+ const s = f.forwardRef(({ className: n, asChild: o, ...d }, l) => {
864
+ const c = o ? Zt : t;
865
+ return f.createElement(c, {
866
+ ...d,
867
+ ref: l,
868
+ className: typeof a == "function" ? a({ className: n }) : u(a, n)
869
+ });
870
+ });
871
+ return s.displayName = `VariantComponent(${t})`, s;
872
+ }, Ce = we(
873
+ "div",
874
+ "grid grid-cols-[2fr_3fr] gap-2 items-center"
875
+ ), Te = we(
876
+ "div",
877
+ "group hover:bg-accent px-3 grid col-span-full grid-cols-subgrid"
878
+ ), Ra = Object.freeze([
879
+ "Accept",
880
+ "Accept-Encoding",
881
+ "Accept-Language",
882
+ "Authorization",
883
+ "Cache-Control",
884
+ "Connection",
885
+ "Content-Disposition",
886
+ "Content-Encoding",
887
+ "Content-Language",
888
+ "Content-Length",
889
+ "Content-Range",
890
+ "Content-Security-Policy",
891
+ "Content-Type",
892
+ "Cookie",
893
+ "Date",
894
+ "ETag",
895
+ "Expires",
896
+ "Host",
897
+ "If-Modified-Since",
898
+ "Location",
899
+ "Origin",
900
+ "Pragma",
901
+ "Referer",
902
+ "Set-Cookie",
903
+ "User-Agent",
904
+ "X-Requested-With"
905
+ ]), Ia = ({
906
+ control: t,
907
+ headers: a
908
+ }) => {
909
+ const { fields: s, append: n, remove: o } = pe({
910
+ control: t,
911
+ name: "headers"
912
+ }), { setValue: d, watch: l } = he(), c = q([]), i = q([]), p = l("headers"), g = Et(() => {
913
+ n({ name: "", value: "", active: !1 });
914
+ }, [n]);
915
+ ue(() => {
916
+ p.length === 0 && g();
917
+ }, [p, g]);
918
+ const w = (h) => {
919
+ var x;
920
+ (x = c.current[h]) == null || x.focus();
921
+ }, j = (h) => {
922
+ g(), requestAnimationFrame(() => {
923
+ var x;
924
+ return (x = i.current[h + 1]) == null ? void 0 : x.focus();
925
+ });
926
+ }, m = a.filter((h) => !p.some((x) => x.name === h.name)).map(({ name: h }) => h);
927
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
928
+ /* @__PURE__ */ e.jsx(X, { className: "overflow-hidden", children: /* @__PURE__ */ e.jsx(Ce, { children: s.map((h, x) => {
929
+ const y = a.find(
930
+ (v) => v.name === l(`headers.${x}.name`)
931
+ );
932
+ return /* @__PURE__ */ e.jsxs(Te, { children: [
933
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 ", children: [
934
+ /* @__PURE__ */ e.jsx(
935
+ O,
936
+ {
937
+ control: t,
938
+ name: `headers.${x}.active`,
939
+ render: ({ field: v }) => /* @__PURE__ */ e.jsx(
940
+ Ne,
941
+ {
942
+ variant: "outline",
943
+ id: `headers.${x}.active`,
944
+ checked: v.value,
945
+ onCheckedChange: (N) => {
946
+ v.onChange(N);
947
+ }
948
+ }
949
+ )
950
+ }
951
+ ),
952
+ /* @__PURE__ */ e.jsx(
953
+ O,
954
+ {
955
+ control: t,
956
+ name: `headers.${x}.name`,
957
+ render: ({ field: v }) => /* @__PURE__ */ e.jsx(
958
+ W,
959
+ {
960
+ ...v,
961
+ placeholder: "Name",
962
+ className: "border-0 shadow-none bg-transparent text-xs font-mono",
963
+ options: [...m, ...Ra],
964
+ onEnterPress: () => w(x),
965
+ onChange: (N) => {
966
+ v.onChange(N), d(`headers.${x}.active`, !0);
967
+ },
968
+ ref: (N) => {
969
+ i.current[x] = N;
970
+ }
971
+ }
972
+ )
973
+ }
974
+ )
975
+ ] }),
976
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
977
+ /* @__PURE__ */ e.jsx(
978
+ O,
979
+ {
980
+ control: t,
981
+ name: `headers.${x}.value`,
982
+ render: ({ field: v }) => (y == null ? void 0 : y.enum) && y.enum.length > 0 ? /* @__PURE__ */ e.jsx(
983
+ W,
984
+ {
985
+ shouldFilter: !1,
986
+ value: v.value,
987
+ options: y.enum ?? [],
988
+ onChange: (C) => {
989
+ v.onChange(C), d(`headers.${x}.active`, !0);
990
+ },
991
+ className: "font-mono text-xs border-0"
992
+ }
993
+ ) : /* @__PURE__ */ e.jsx(
994
+ ge,
995
+ {
996
+ placeholder: "Value",
997
+ className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0",
998
+ ...v,
999
+ ref: (C) => {
1000
+ c.current[x] = C;
1001
+ },
1002
+ onKeyDown: (C) => {
1003
+ C.key === "Enter" && C.currentTarget.value.trim() && j(x);
1004
+ },
1005
+ autoComplete: "off"
1006
+ }
1007
+ )
1008
+ }
1009
+ ),
1010
+ /* @__PURE__ */ e.jsx(
1011
+ _,
1012
+ {
1013
+ size: "icon",
1014
+ variant: "ghost",
1015
+ className: "text-muted-foreground opacity-0 group-hover:opacity-100 rounded-full w-8 h-7",
1016
+ onClick: () => o(x),
1017
+ type: "button",
1018
+ children: /* @__PURE__ */ e.jsx(bt, { size: 16 })
1019
+ }
1020
+ )
1021
+ ] })
1022
+ ] }, h.id);
1023
+ }) }) }),
1024
+ /* @__PURE__ */ e.jsx("div", { className: "text-end", children: /* @__PURE__ */ e.jsx(
1025
+ _,
1026
+ {
1027
+ className: "",
1028
+ onClick: g,
1029
+ type: "button",
1030
+ variant: "secondary",
1031
+ children: "Add header"
1032
+ }
1033
+ ) })
1034
+ ] });
1035
+ }, Oa = ({
1036
+ control: t
1037
+ }) => {
1038
+ const { fields: a } = pe({
1039
+ control: t,
1040
+ name: "pathParams"
1041
+ });
1042
+ return /* @__PURE__ */ e.jsx(X, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx(Ce, { children: a.map((s, n) => /* @__PURE__ */ e.jsxs(Te, { children: [
1043
+ /* @__PURE__ */ e.jsx(
1044
+ O,
1045
+ {
1046
+ control: t,
1047
+ name: `pathParams.${n}.name`,
1048
+ render: () => /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ e.jsx(
1049
+ Ye,
1050
+ {
1051
+ slug: s.name,
1052
+ name: s.name,
1053
+ className: "font-mono text-xs px-2"
1054
+ }
1055
+ ) })
1056
+ }
1057
+ ),
1058
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ e.jsx(
1059
+ O,
1060
+ {
1061
+ control: t,
1062
+ name: `pathParams.${n}.value`,
1063
+ render: ({ field: o }) => /* @__PURE__ */ e.jsx(
1064
+ ge,
1065
+ {
1066
+ ...o,
1067
+ required: !0,
1068
+ placeholder: "Enter value",
1069
+ className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0"
1070
+ }
1071
+ )
1072
+ }
1073
+ ) })
1074
+ ] }, s.id)) }) });
1075
+ }, Ea = we(
1076
+ "input",
1077
+ "px-2 bg-transparent h-6 font-mono text-xs m-2"
1078
+ ), Aa = ({
1079
+ control: t,
1080
+ queryParams: a
1081
+ }) => {
1082
+ const { fields: s } = pe({
1083
+ control: t,
1084
+ name: "queryParams"
1085
+ }), n = he(), o = a.map((d) => !!d.isRequired);
1086
+ return /* @__PURE__ */ e.jsx(X, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx("div", { className: "w-full ", children: /* @__PURE__ */ e.jsx(Ce, { children: s.map((d, l) => {
1087
+ const c = a.find(
1088
+ (i) => i.name === n.watch(`queryParams.${l}.name`)
1089
+ );
1090
+ return /* @__PURE__ */ e.jsxs(Te, { children: [
1091
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
1092
+ /* @__PURE__ */ e.jsx(
1093
+ O,
1094
+ {
1095
+ control: t,
1096
+ name: `queryParams.${l}.active`,
1097
+ render: ({ field: i }) => /* @__PURE__ */ e.jsx(
1098
+ Ne,
1099
+ {
1100
+ variant: "outline",
1101
+ id: `queryParams.${l}.active`,
1102
+ className: "mr-2",
1103
+ checked: i.value,
1104
+ onCheckedChange: i.onChange
1105
+ }
1106
+ )
1107
+ }
1108
+ ),
1109
+ /* @__PURE__ */ e.jsx(
1110
+ O,
1111
+ {
1112
+ control: t,
1113
+ render: ({ field: i }) => o[l] ? /* @__PURE__ */ e.jsx(Ea, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1114
+ "label",
1115
+ {
1116
+ className: "flex items-center cursor-pointer gap-1",
1117
+ htmlFor: `queryParams.${l}.active`,
1118
+ title: o[l] ? "Required field" : void 0,
1119
+ children: [
1120
+ i.value,
1121
+ o[l] && /* @__PURE__ */ e.jsx("sup", { children: " *" })
1122
+ ]
1123
+ }
1124
+ ) }) : /* @__PURE__ */ e.jsx(
1125
+ W,
1126
+ {
1127
+ value: i.value,
1128
+ options: a.map((p) => p.name),
1129
+ onChange: (p) => {
1130
+ i.onChange(p);
1131
+ },
1132
+ className: "border-0 font-mono text-xs bg-transparent hover:bg-transparent"
1133
+ }
1134
+ ),
1135
+ name: `queryParams.${l}.name`
1136
+ }
1137
+ )
1138
+ ] }, d.id),
1139
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ e.jsx(
1140
+ O,
1141
+ {
1142
+ control: t,
1143
+ render: ({ field: i }) => (c == null ? void 0 : c.enum) && c.enum.length > 0 ? /* @__PURE__ */ e.jsx(
1144
+ W,
1145
+ {
1146
+ value: i.value,
1147
+ options: c.enum ?? [],
1148
+ onChange: (g) => {
1149
+ i.onChange(g), n.setValue(`queryParams.${l}.active`, !0);
1150
+ },
1151
+ className: "font-mono text-xs border-0 ring-1 ring-ring"
1152
+ }
1153
+ ) : /* @__PURE__ */ e.jsx(
1154
+ ge,
1155
+ {
1156
+ ...i,
1157
+ onChange: (g) => {
1158
+ i.onChange(g.target.value), g.target.value.length > 0 && n.setValue(`queryParams.${l}.active`, !0);
1159
+ },
1160
+ placeholder: "Enter value",
1161
+ className: "w-full border-0 shadow-none focus-visible:ring-0 text-xs font-mono"
1162
+ }
1163
+ ),
1164
+ name: `queryParams.${l}.value`
1165
+ }
1166
+ ) })
1167
+ ] }, d.id);
1168
+ }) }) }) });
1169
+ }, P = {
1170
+ green: "text-green-600",
1171
+ blue: "text-sky-600",
1172
+ yellow: "text-yellow-600",
1173
+ red: "text-red-600",
1174
+ purple: "text-purple-600",
1175
+ indigo: "text-indigo-600",
1176
+ gray: "text-gray-600"
1177
+ }, qa = {
1178
+ get: P.green,
1179
+ post: P.blue,
1180
+ put: P.yellow,
1181
+ delete: P.red,
1182
+ patch: P.purple,
1183
+ options: P.indigo,
1184
+ head: P.gray,
1185
+ trace: P.gray
1186
+ }, Da = (t) => qa[t.toLocaleLowerCase()] ?? P.gray, La = ({
1187
+ method: t,
1188
+ url: a,
1189
+ headers: s,
1190
+ body: n
1191
+ }) => /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 font-mono text-xs", children: [
1192
+ /* @__PURE__ */ e.jsxs("div", { className: "gap-2 p-2 bg-muted rounded-md", children: [
1193
+ /* @__PURE__ */ e.jsx("span", { className: u(Da(t), "font-semibold"), children: t }),
1194
+ " ",
1195
+ /* @__PURE__ */ e.jsx("span", { className: "break-all", children: a }),
1196
+ " ",
1197
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "HTTP/1.1" })
1198
+ ] }),
1199
+ /* @__PURE__ */ e.jsxs("div", { className: "mx-1.5 flex flex-col gap-3", children: [
1200
+ /* @__PURE__ */ e.jsxs(Le, { defaultOpen: !0, children: [
1201
+ /* @__PURE__ */ e.jsxs(Ve, { className: "flex items-center gap-2 hover:text-primary group", children: [
1202
+ /* @__PURE__ */ e.jsx(z, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
1203
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
1204
+ ] }),
1205
+ /* @__PURE__ */ e.jsx(Fe, { children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 pl-1.5 pt-2", children: s.map(([o, d]) => /* @__PURE__ */ e.jsxs(I, { children: [
1206
+ /* @__PURE__ */ e.jsx("div", { className: "text-primary", children: o }),
1207
+ /* @__PURE__ */ e.jsx("div", { className: "break-words", children: d })
1208
+ ] }, o)) }) })
1209
+ ] }),
1210
+ /* @__PURE__ */ e.jsxs(Le, { defaultOpen: !0, children: [
1211
+ /* @__PURE__ */ e.jsxs(Ve, { className: "flex items-center gap-2 hover:text-primary group", children: [
1212
+ /* @__PURE__ */ e.jsx(z, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
1213
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Body" })
1214
+ ] }),
1215
+ /* @__PURE__ */ e.jsx(Fe, { children: /* @__PURE__ */ e.jsx("div", { className: "pl-0 pt-2", children: /* @__PURE__ */ e.jsx(
1216
+ "div",
1217
+ {
1218
+ className: u(
1219
+ "whitespace-pre-wrap break-all bg-muted p-2 rounded-md",
1220
+ !n && "text-muted-foreground"
1221
+ ),
1222
+ children: n ?? "Empty body"
1223
+ }
1224
+ ) }) })
1225
+ ] })
1226
+ ] })
1227
+ ] }), He = ye.Root, Ge = ye.CollapsibleTrigger, Be = ye.CollapsibleContent;
1228
+ function $e(t) {
1229
+ if (t === null) return "null";
1230
+ if (Array.isArray(t)) {
1231
+ if (t.length === 0) return "any[]";
1232
+ const a = t[0];
1233
+ return a === void 0 ? "any[]" : `${$e(a)}[]`;
1234
+ }
1235
+ return typeof t == "object" ? Va(t) : typeof t;
1236
+ }
1237
+ function Va(t, a = "") {
1238
+ const s = ["{"];
1239
+ for (const [n, o] of Object.entries(t)) {
1240
+ const d = $e(o);
1241
+ s.push(` ${n}: ${d};`);
1242
+ }
1243
+ return s.push("}"), s.join(`
1244
+ `);
1245
+ }
1246
+ function Fa(t) {
1247
+ return { lines: [`type GeneratedType = ${$e(t)};`] };
1248
+ }
1249
+ const za = {
1250
+ 200: "OK",
1251
+ 201: "Created",
1252
+ 202: "Accepted",
1253
+ 204: "No Content",
1254
+ 400: "Bad Request",
1255
+ 401: "Unauthorized",
1256
+ 403: "Forbidden",
1257
+ 404: "Not Found",
1258
+ 405: "Method Not Allowed",
1259
+ 500: "Internal Server Error"
1260
+ }, Ha = (t) => {
1261
+ var s;
1262
+ return (s = Object.entries({
1263
+ "application/json": "json",
1264
+ "text/json": "json",
1265
+ "text/html": "html",
1266
+ "text/css": "css",
1267
+ "text/javascript": "javascript",
1268
+ "application/xml": "xml",
1269
+ "application/xhtml+xml": "xhtml"
1270
+ }).find(
1271
+ ([n]) => t.includes(n)
1272
+ )) == null ? void 0 : s[1];
1273
+ }, Ga = (t) => {
1274
+ var s;
1275
+ const a = ((s = t.find(([n, o]) => n === "Content-Type")) == null ? void 0 : s[1]) || "";
1276
+ return Ha(a);
1277
+ }, Ba = (t) => {
1278
+ try {
1279
+ return JSON.stringify(JSON.parse(t), null, 2);
1280
+ } catch {
1281
+ return null;
1282
+ }
1283
+ }, Ma = (t) => {
1284
+ const a = [
1285
+ "Content-Type",
1286
+ "Content-Length",
1287
+ "Authorization",
1288
+ "X-RateLimit-Remaining",
1289
+ "X-RateLimit-Limit",
1290
+ "Cache-Control",
1291
+ "ETag"
1292
+ ].map((s) => s.toLowerCase());
1293
+ return [...t].sort(([s], [n]) => {
1294
+ const o = a.indexOf(s.toLowerCase()), d = a.indexOf(n.toLowerCase());
1295
+ return o === d ? 0 : o === -1 ? 1 : d === -1 ? -1 : o - d;
1296
+ });
1297
+ }, Ua = ({
1298
+ body: t = "",
1299
+ headers: a,
1300
+ status: s,
1301
+ time: n,
1302
+ size: o,
1303
+ url: d
1304
+ }) => {
1305
+ var m;
1306
+ const l = Ga(a), c = Ba(t), i = c || t, [p, g] = H(
1307
+ c ? "formatted" : "raw"
1308
+ ), w = St({
1309
+ queryKey: ["types", i],
1310
+ queryFn: async () => Fa(JSON.parse(i)),
1311
+ enabled: p === "types"
1312
+ }), j = Ma([...a]);
1313
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 h-full overflow-y-scroll max-h-[calc(100vh-220px)] py-4", children: [
1314
+ /* @__PURE__ */ e.jsxs(He, { defaultOpen: !0, children: [
1315
+ /* @__PURE__ */ e.jsxs(Ge, { className: "flex items-center gap-2 hover:text-primary group", children: [
1316
+ /* @__PURE__ */ e.jsx(z, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
1317
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
1318
+ ] }),
1319
+ /* @__PURE__ */ e.jsx(Be, { children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 pl-1.5 pt-2 font-mono text-xs", children: [
1320
+ j.slice(0, 5).map(([h, x]) => /* @__PURE__ */ e.jsxs(I, { children: [
1321
+ /* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: h }),
1322
+ /* @__PURE__ */ e.jsx("div", { className: "break-all", children: x })
1323
+ ] }, h)),
1324
+ j.length > 5 && /* @__PURE__ */ e.jsxs(He, { className: "col-span-full grid-cols-subgrid grid", children: [
1325
+ /* @__PURE__ */ e.jsxs(Ge, { className: "col-span-2 text-xs text-muted-foreground hover:text-primary flex items-center gap-1 py-1", children: [
1326
+ /* @__PURE__ */ e.jsx(z, { className: "h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
1327
+ "Show ",
1328
+ j.length - 5,
1329
+ " more headers"
1330
+ ] }),
1331
+ /* @__PURE__ */ e.jsx(Be, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children: j.slice(5).map(([h, x]) => /* @__PURE__ */ e.jsxs(I, { children: [
1332
+ /* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: h }),
1333
+ /* @__PURE__ */ e.jsx("div", { className: "break-all", children: x })
1334
+ ] }, h)) })
1335
+ ] })
1336
+ ] }) })
1337
+ ] }),
1338
+ /* @__PURE__ */ e.jsx(fe, { className: "shadow-none", children: /* @__PURE__ */ e.jsx(
1339
+ Jt,
1340
+ {
1341
+ language: p === "types" ? "typescript" : p === "raw" ? c ? "plain" : l : "json",
1342
+ noBackground: !0,
1343
+ className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
1344
+ code: (p === "raw" ? t : p === "types" ? (m = w.data) == null ? void 0 : m.lines.join(`
1345
+ `) : i) ?? ""
1346
+ }
1347
+ ) }),
1348
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 justify-between", children: [
1349
+ /* @__PURE__ */ e.jsxs("div", { className: "flex text-xs gap-2 border bg-muted rounded-md p-2 items-center h-8 font-mono divide-x", children: [
1350
+ /* @__PURE__ */ e.jsxs("div", { children: [
1351
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Status" }),
1352
+ " ",
1353
+ s,
1354
+ " ",
1355
+ za[s] ?? ""
1356
+ ] }),
1357
+ /* @__PURE__ */ e.jsxs("div", { children: [
1358
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Time" }),
1359
+ " ",
1360
+ n.toFixed(0),
1361
+ "ms"
1362
+ ] }),
1363
+ /* @__PURE__ */ e.jsxs("div", { children: [
1364
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Size" }),
1365
+ " ",
1366
+ o,
1367
+ "B"
1368
+ ] })
1369
+ ] }),
1370
+ c && /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(
1371
+ Me,
1372
+ {
1373
+ value: p,
1374
+ onValueChange: (h) => g(h),
1375
+ children: [
1376
+ /* @__PURE__ */ e.jsx(Ue, { className: "min-w-32", children: /* @__PURE__ */ e.jsx(_e, { placeholder: "View" }) }),
1377
+ /* @__PURE__ */ e.jsxs(Je, { children: [
1378
+ /* @__PURE__ */ e.jsx(M, { value: "formatted", children: "Formatted" }),
1379
+ /* @__PURE__ */ e.jsx(M, { value: "raw", children: "Raw" }),
1380
+ /* @__PURE__ */ e.jsx(M, { value: "types", children: "Types" })
1381
+ ] })
1382
+ ]
1383
+ }
1384
+ ) })
1385
+ ] })
1386
+ ] });
1387
+ }, _a = ({
1388
+ queryMutation: t,
1389
+ showPathParamsWarning: a
1390
+ }) => {
1391
+ var n;
1392
+ const s = ((((n = t.data) == null ? void 0 : n.status) ?? 0) / 100).toFixed(0);
1393
+ return /* @__PURE__ */ e.jsx("div", { className: "min-w-0 p-8 bg-muted/70 overflow-y-auto", children: t.error ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
1394
+ a && /* @__PURE__ */ e.jsx(Kt, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
1395
+ /* @__PURE__ */ e.jsxs(fe, { children: [
1396
+ /* @__PURE__ */ e.jsx(Bt, { children: /* @__PURE__ */ e.jsx(Mt, { children: "Request failed" }) }),
1397
+ /* @__PURE__ */ e.jsxs(Ut, { children: [
1398
+ "Error:",
1399
+ " ",
1400
+ t.error.message || String(t.error) || "Unexpected error"
1401
+ ] })
1402
+ ] })
1403
+ ] }) : t.data ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs(We, { defaultValue: "response", children: [
1404
+ /* @__PURE__ */ e.jsxs(Ze, { children: [
1405
+ /* @__PURE__ */ e.jsx(E, { value: "request", children: "Request" }),
1406
+ /* @__PURE__ */ e.jsxs(E, { value: "response", children: [
1407
+ "Response",
1408
+ /* @__PURE__ */ e.jsxs(
1409
+ "span",
1410
+ {
1411
+ className: u(
1412
+ "text-xs font-mono ml-1",
1413
+ s === "2" && "text-green-500",
1414
+ s === "3" && "text-blue-500",
1415
+ s === "4" && "text-yellow-500",
1416
+ s === "5" && "text-red-500"
1417
+ ),
1418
+ children: [
1419
+ "(",
1420
+ t.data.status,
1421
+ ")"
1422
+ ]
1423
+ }
1424
+ )
1425
+ ] })
1426
+ ] }),
1427
+ /* @__PURE__ */ e.jsx(A, { value: "request", children: /* @__PURE__ */ e.jsx(La, { ...t.data.request }) }),
1428
+ /* @__PURE__ */ e.jsx(A, { value: "response", children: /* @__PURE__ */ e.jsx(
1429
+ Ua,
1430
+ {
1431
+ status: t.data.status,
1432
+ time: t.data.time,
1433
+ size: t.data.size,
1434
+ headers: t.data.headers,
1435
+ body: t.data.body,
1436
+ url: t.data.request.url
1437
+ }
1438
+ ) })
1439
+ ] }) }) : /* @__PURE__ */ e.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ e.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: t.isPending ? /* @__PURE__ */ e.jsx(Qt, {}) : "Send a request first to see the response here" }) }) });
1440
+ }, Ja = ({
1441
+ identities: t,
1442
+ formRef: a,
1443
+ disabled: s
1444
+ }) => {
1445
+ const { setValue: n } = he(), [o, d] = H();
1446
+ return t.length === 0 ? /* @__PURE__ */ e.jsx(U, { disabled: s, children: "Send" }) : /* @__PURE__ */ e.jsxs("div", { className: "flex", children: [
1447
+ /* @__PURE__ */ e.jsx(
1448
+ U,
1449
+ {
1450
+ className: "rounded-r-none inset-shadow-sm",
1451
+ disabled: s,
1452
+ onClick: () => {
1453
+ var l;
1454
+ return (l = a == null ? void 0 : a.current) == null ? void 0 : l.requestSubmit();
1455
+ },
1456
+ children: "Send"
1457
+ }
1458
+ ),
1459
+ /* @__PURE__ */ e.jsxs(et, { children: [
1460
+ /* @__PURE__ */ e.jsx(tt, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1461
+ U,
1462
+ {
1463
+ disabled: s,
1464
+ className: "rounded-l-none border-l border-border/40 inset-shadow-sm w-6",
1465
+ size: "icon",
1466
+ children: /* @__PURE__ */ e.jsx(Nt, { className: "w-4 h-4" })
1467
+ }
1468
+ ) }),
1469
+ /* @__PURE__ */ e.jsx(ve, { value: o, children: /* @__PURE__ */ e.jsx(je, { className: "w-56", align: "end", alignOffset: -150, children: [{ id: F, label: "None" }, ...t].map(
1470
+ (l) => /* @__PURE__ */ e.jsxs(
1471
+ be,
1472
+ {
1473
+ onClick: () => {
1474
+ var c;
1475
+ d(l.id), n("identity", l.id), (c = a == null ? void 0 : a.current) == null || c.requestSubmit();
1476
+ },
1477
+ onMouseEnter: () => d(l.id),
1478
+ onMouseLeave: () => d(void 0),
1479
+ children: [
1480
+ /* @__PURE__ */ e.jsx(Q, { value: l.id, className: "mr-2" }),
1481
+ l.label
1482
+ ]
1483
+ },
1484
+ l.id
1485
+ )
1486
+ ) }) })
1487
+ ] })
1488
+ ] });
1489
+ }, F = "__none", Qa = ({
1490
+ server: t,
1491
+ servers: a = [],
1492
+ url: s,
1493
+ method: n,
1494
+ headers: o = [],
1495
+ queryParams: d = [],
1496
+ pathParams: l = [],
1497
+ defaultBody: c = "",
1498
+ examples: i
1499
+ }) => {
1500
+ var Ie, Oe, Ee;
1501
+ const { selectedServer: p, setSelectedServer: g } = Pt(
1502
+ a.map((r) => ({ url: r }))
1503
+ ), [, w] = At(), { register: j, control: m, handleSubmit: h, watch: x, setValue: y, ...v } = Ht({
1504
+ defaultValues: {
1505
+ body: c,
1506
+ queryParams: d.map((r) => ({
1507
+ name: r.name,
1508
+ value: r.defaultValue ?? "",
1509
+ active: r.defaultActive ?? !1,
1510
+ enum: r.enum ?? []
1511
+ })).concat([
1512
+ {
1513
+ name: "",
1514
+ value: "",
1515
+ active: !1,
1516
+ enum: []
1517
+ }
1518
+ ]),
1519
+ pathParams: l.map((r) => ({
1520
+ name: r.name,
1521
+ value: r.defaultValue ?? ""
1522
+ })),
1523
+ headers: o.map((r) => ({
1524
+ name: r.name,
1525
+ value: r.defaultValue ?? "",
1526
+ active: r.defaultActive ?? !1
1527
+ })).concat([
1528
+ {
1529
+ name: "",
1530
+ value: "",
1531
+ active: !1
1532
+ }
1533
+ ]),
1534
+ identity: F
1535
+ }
1536
+ }), N = x(), C = kt(), Se = q(!1);
1537
+ ue(() => {
1538
+ var k;
1539
+ if (Se.current) return;
1540
+ const r = (k = C.data) == null ? void 0 : k.at(0);
1541
+ r && (y("identity", r.id), Se.current = !0);
1542
+ }, [y, C.data]);
1543
+ const Pe = q(null), ke = zt({
1544
+ mutationFn: async (r) => {
1545
+ var B, L;
1546
+ const k = performance.now(), S = new Request(
1547
+ ma(p ?? t, s, r),
1548
+ {
1549
+ method: n.toUpperCase(),
1550
+ headers: Object.fromEntries(
1551
+ r.headers.filter((T) => T.name && T.active).map((T) => [T.name, T.value])
1552
+ ),
1553
+ body: r.body ? r.body : void 0
1554
+ }
1555
+ );
1556
+ r.identity !== F && ((L = (B = C.data) == null ? void 0 : B.find((T) => T.id === r.identity)) == null || L.authorizeRequest(S));
1557
+ try {
1558
+ const T = await fetch(S, {
1559
+ signal: AbortSignal.timeout(5e3)
1560
+ }), mt = performance.now() - k, Ae = await T.text(), ut = new URL(S.url);
1561
+ return {
1562
+ status: T.status,
1563
+ headers: Array.from(T.headers.entries()),
1564
+ size: Ae.length,
1565
+ body: Ae,
1566
+ time: mt,
1567
+ request: {
1568
+ method: S.method.toUpperCase(),
1569
+ url: S.url,
1570
+ headers: [
1571
+ ["Host", ut.host],
1572
+ ["User-Agent", "Zudoku Playground"],
1573
+ ...Array.from(S.headers.entries())
1574
+ ],
1575
+ body: r.body ? r.body : void 0
1576
+ }
1577
+ };
1578
+ } catch (T) {
1579
+ throw T instanceof TypeError ? new Error(
1580
+ "The request failed, possibly due to network issues or CORS policy."
1581
+ ) : T;
1582
+ }
1583
+ }
1584
+ }), dt = /* @__PURE__ */ e.jsx(
1585
+ ia,
1586
+ {
1587
+ path: s,
1588
+ renderParam: ({ name: r, originalValue: k, index: S }) => {
1589
+ var L;
1590
+ const B = (L = N.pathParams.find(
1591
+ (T) => T.name === r
1592
+ )) == null ? void 0 : L.value;
1593
+ return /* @__PURE__ */ e.jsx(
1594
+ Ye,
1595
+ {
1596
+ name: r,
1597
+ backgroundOpacity: "0",
1598
+ slug: r,
1599
+ onClick: () => v.setFocus(`pathParams.${S}.value`),
1600
+ children: B || k
1601
+ }
1602
+ );
1603
+ }
1604
+ }
1605
+ ), Re = N.queryParams.filter((r) => r.active).map((r, k, S) => /* @__PURE__ */ e.jsxs(I, { children: [
1606
+ r.name,
1607
+ "=",
1608
+ encodeURIComponent(r.value).replaceAll("%20", "+"),
1609
+ k < S.length - 1 && "&",
1610
+ /* @__PURE__ */ e.jsx("wbr", {})
1611
+ ] }, r.name)), ct = /* @__PURE__ */ e.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: a && a.length > 1 ? /* @__PURE__ */ e.jsxs(
1612
+ Me,
1613
+ {
1614
+ onValueChange: (r) => {
1615
+ w(() => g(r));
1616
+ },
1617
+ value: p,
1618
+ defaultValue: p,
1619
+ children: [
1620
+ /* @__PURE__ */ e.jsx(Ue, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto", children: /* @__PURE__ */ e.jsx(_e, {}) }),
1621
+ /* @__PURE__ */ e.jsx(Je, { children: a.map((r) => /* @__PURE__ */ e.jsx(M, { value: r, children: r.replace(/^https?:\/\//, "") }, r)) })
1622
+ ]
1623
+ }
1624
+ ) : /* @__PURE__ */ e.jsx("span", { children: t.replace(/^https?:\/\//, "") }) });
1625
+ return /* @__PURE__ */ e.jsx(
1626
+ Gt,
1627
+ {
1628
+ register: j,
1629
+ control: m,
1630
+ handleSubmit: h,
1631
+ watch: x,
1632
+ setValue: y,
1633
+ ...v,
1634
+ children: /* @__PURE__ */ e.jsx(
1635
+ "form",
1636
+ {
1637
+ onSubmit: h((r) => ke.mutateAsync(r)),
1638
+ ref: Pe,
1639
+ children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 text-sm h-full", children: [
1640
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 p-4 after:bg-muted-foreground/20 relative after:absolute after:w-px after:inset-0 after:left-auto", children: [
1641
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-stretch", children: [
1642
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
1643
+ /* @__PURE__ */ e.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: n.toUpperCase() }),
1644
+ /* @__PURE__ */ e.jsxs("div", { className: "items-center p-2 font-mono text-xs break-words", children: [
1645
+ ct,
1646
+ dt,
1647
+ Re.length > 0 ? "?" : "",
1648
+ Re
1649
+ ] })
1650
+ ] }),
1651
+ /* @__PURE__ */ e.jsx(
1652
+ Ja,
1653
+ {
1654
+ identities: C.data ?? [],
1655
+ formRef: Pe,
1656
+ disabled: v.formState.isSubmitting
1657
+ }
1658
+ )
1659
+ ] }),
1660
+ /* @__PURE__ */ e.jsxs(We, { defaultValue: "parameters", children: [
1661
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1 justify-between", children: /* @__PURE__ */ e.jsxs(Ze, { children: [
1662
+ /* @__PURE__ */ e.jsxs(E, { value: "parameters", children: [
1663
+ "Parameters",
1664
+ (N.pathParams.some((r) => r.value !== "") || N.queryParams.some((r) => r.active)) && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
1665
+ ] }),
1666
+ /* @__PURE__ */ e.jsxs(E, { value: "headers", children: [
1667
+ "Headers",
1668
+ N.headers.filter((r) => r.active).length > 0 && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
1669
+ ] }),
1670
+ /* @__PURE__ */ e.jsxs(E, { value: "auth", children: [
1671
+ "Auth",
1672
+ N.identity !== F && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
1673
+ ] }),
1674
+ /* @__PURE__ */ e.jsx(E, { value: "body", children: "Body" })
1675
+ ] }) }),
1676
+ /* @__PURE__ */ e.jsx(A, { value: "headers", children: /* @__PURE__ */ e.jsx(Ia, { control: m, headers: o }) }),
1677
+ /* @__PURE__ */ e.jsxs(A, { value: "parameters", children: [
1678
+ l.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
1679
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
1680
+ /* @__PURE__ */ e.jsx(Oa, { control: m })
1681
+ ] }),
1682
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
1683
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
1684
+ /* @__PURE__ */ e.jsx(Aa, { control: m, queryParams: d })
1685
+ ] })
1686
+ ] }),
1687
+ /* @__PURE__ */ e.jsxs(A, { value: "body", children: [
1688
+ !["POST", "PUT", "PATCH", "DELETE"].includes(
1689
+ n.toUpperCase()
1690
+ ) && /* @__PURE__ */ e.jsxs(de, { className: "mb-2", children: [
1691
+ /* @__PURE__ */ e.jsx(De, { className: "w-4 h-4" }),
1692
+ /* @__PURE__ */ e.jsx(ce, { children: "Body" }),
1693
+ /* @__PURE__ */ e.jsx(me, { children: "Body is only supported for POST, PUT, PATCH, and DELETE requests" })
1694
+ ] }),
1695
+ /* @__PURE__ */ e.jsx(
1696
+ Xe,
1697
+ {
1698
+ ...j("body"),
1699
+ className: u(
1700
+ "border w-full rounded-lg p-2 bg-muted h-40 font-mono",
1701
+ !["POST", "PUT", "PATCH", "DELETE"].includes(
1702
+ n.toUpperCase()
1703
+ ) && "h-20"
1704
+ ),
1705
+ placeholder: ["POST", "PUT", "PATCH", "DELETE"].includes(
1706
+ n.toUpperCase()
1707
+ ) ? void 0 : "This request does not support a body",
1708
+ disabled: !["POST", "PUT", "PATCH", "DELETE"].includes(
1709
+ n.toUpperCase()
1710
+ )
1711
+ }
1712
+ ),
1713
+ i && /* @__PURE__ */ e.jsx(
1714
+ ga,
1715
+ {
1716
+ examples: i,
1717
+ onSelect: (r) => y("body", JSON.stringify(r.value, null, 2))
1718
+ }
1719
+ )
1720
+ ] }),
1721
+ /* @__PURE__ */ e.jsx(A, { value: "auth", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
1722
+ ((Ie = C.data) == null ? void 0 : Ie.length) === 0 && /* @__PURE__ */ e.jsxs(de, { children: [
1723
+ /* @__PURE__ */ e.jsx(De, { className: "w-4 h-4" }),
1724
+ /* @__PURE__ */ e.jsx(ce, { children: "Authentication" }),
1725
+ /* @__PURE__ */ e.jsx(me, { children: "No identities found. Please create an identity first." })
1726
+ ] }),
1727
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ e.jsx(fe, { className: "w-full overflow-hidden", children: /* @__PURE__ */ e.jsxs(
1728
+ ve,
1729
+ {
1730
+ onValueChange: (r) => y("identity", r),
1731
+ value: N.identity,
1732
+ defaultValue: N.identity,
1733
+ className: "gap-0",
1734
+ disabled: ((Oe = C.data) == null ? void 0 : Oe.length) === 0,
1735
+ children: [
1736
+ /* @__PURE__ */ e.jsxs(
1737
+ V,
1738
+ {
1739
+ className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
1740
+ htmlFor: "none",
1741
+ children: [
1742
+ /* @__PURE__ */ e.jsx(Q, { value: F, id: "none", children: "None" }),
1743
+ /* @__PURE__ */ e.jsx(V, { htmlFor: "none", className: "ml-2", children: "None" })
1744
+ ]
1745
+ }
1746
+ ),
1747
+ (Ee = C.data) == null ? void 0 : Ee.map((r) => /* @__PURE__ */ e.jsxs(
1748
+ V,
1749
+ {
1750
+ className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
1751
+ children: [
1752
+ /* @__PURE__ */ e.jsx(
1753
+ Q,
1754
+ {
1755
+ value: r.id,
1756
+ id: r.id,
1757
+ children: r.label
1758
+ }
1759
+ ),
1760
+ /* @__PURE__ */ e.jsx(V, { htmlFor: r.id, className: "ml-2", children: r.label })
1761
+ ]
1762
+ },
1763
+ r.id
1764
+ ))
1765
+ ]
1766
+ }
1767
+ ) }) })
1768
+ ] }) })
1769
+ ] })
1770
+ ] }),
1771
+ /* @__PURE__ */ e.jsx(
1772
+ _a,
1773
+ {
1774
+ queryMutation: ke,
1775
+ showPathParamsWarning: N.pathParams.some(
1776
+ (r) => r.value === ""
1777
+ )
1778
+ }
1779
+ )
1780
+ ] })
1781
+ }
1782
+ )
1783
+ }
1784
+ );
1785
+ }, Wa = ({
1786
+ className: t,
1787
+ size: a = 16
1788
+ }) => /* @__PURE__ */ e.jsx(
1789
+ "svg",
1790
+ {
1791
+ xmlns: "http://www.w3.org/2000/svg",
1792
+ viewBox: "0 0 24 24",
1793
+ fill: "currentColor",
1794
+ className: t,
1795
+ width: a,
1796
+ height: a,
1797
+ children: /* @__PURE__ */ e.jsx(
1798
+ "path",
1799
+ {
1800
+ fillRule: "evenodd",
1801
+ d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm14.024-.983a1.125 1.125 0 0 1 0 1.966l-5.603 3.113A1.125 1.125 0 0 1 9 15.113V8.887c0-.857.921-1.4 1.671-.983l5.603 3.113Z",
1802
+ clipRule: "evenodd"
1803
+ }
1804
+ )
1805
+ }
1806
+ ), Za = (t) => {
1807
+ const [a, s] = H(!1);
1808
+ return /* @__PURE__ */ e.jsxs(Dt, { onOpenChange: (n) => s(n), children: [
1809
+ /* @__PURE__ */ e.jsx(Lt, { asChild: !0, children: t.children ?? /* @__PURE__ */ e.jsxs(
1810
+ "button",
1811
+ {
1812
+ type: "button",
1813
+ className: "flex gap-1 items-center px-2 py-1 rounded-md transition text-xs bg-primary text-primary-foreground shadow-sm hover:bg-primary/80",
1814
+ children: [
1815
+ "Test",
1816
+ /* @__PURE__ */ e.jsx(Wa, { size: 14 })
1817
+ ]
1818
+ }
1819
+ ) }),
1820
+ /* @__PURE__ */ e.jsxs(
1821
+ Vt,
1822
+ {
1823
+ className: "max-w-screen-xl w-full h-5/6 overflow-hidden p-0",
1824
+ "aria-describedby": void 0,
1825
+ children: [
1826
+ /* @__PURE__ */ e.jsx(Ot, { children: /* @__PURE__ */ e.jsx(Ft, { children: "Playground" }) }),
1827
+ a && /* @__PURE__ */ e.jsx(Qa, { ...t })
1828
+ ]
1829
+ }
1830
+ )
1831
+ ] });
1832
+ }, Ka = Ke(`
1833
+ query GetCategories($input: JSON!, $type: SchemaType!) {
1834
+ schema(input: $input, type: $type) {
1835
+ url
1836
+ tags {
1837
+ name
1838
+ }
1839
+ }
1840
+ }
1841
+ `), Xa = Ke(`
1842
+ query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {
1843
+ schema(input: $input, type: $type) {
1844
+ operations(tag: $tag) {
1845
+ slug
1846
+ deprecated
1847
+ method
1848
+ summary
1849
+ operationId
1850
+ path
1851
+ tags {
1852
+ name
1853
+ }
1854
+ }
1855
+ untagged: operations(untagged: true) {
1856
+ slug
1857
+ deprecated
1858
+ method
1859
+ summary
1860
+ operationId
1861
+ path
1862
+ }
1863
+ }
1864
+ }
1865
+ `), Ya = {
1866
+ get: "green",
1867
+ post: "blue",
1868
+ put: "yellow",
1869
+ delete: "red",
1870
+ patch: "purple",
1871
+ options: "gray",
1872
+ head: "gray"
1873
+ }, le = "~endpoints", Ts = (t) => {
1874
+ const a = R(t.navigationId ?? "/reference"), s = t.type === "file" ? Object.keys(t.input) : [], n = new Yt(t);
1875
+ return {
1876
+ getHead: () => {
1877
+ if (t.type === "url" && !t.skipPreload)
1878
+ return /* @__PURE__ */ e.jsx(
1879
+ "link",
1880
+ {
1881
+ rel: "preload",
1882
+ href: t.input,
1883
+ as: "fetch",
1884
+ crossOrigin: "anonymous"
1885
+ }
1886
+ );
1887
+ if (t.server)
1888
+ return /* @__PURE__ */ e.jsx("link", { rel: "preconnect", href: t.server });
1889
+ },
1890
+ getMdxComponents: () => ({
1891
+ OpenPlaygroundButton: ({
1892
+ requireAuth: o,
1893
+ server: d,
1894
+ method: l,
1895
+ url: c,
1896
+ ...i
1897
+ }) => {
1898
+ const p = Rt();
1899
+ if (!d)
1900
+ throw new Error("Server is required");
1901
+ return o && !p.isAuthenticated ? /* @__PURE__ */ e.jsxs(
1902
+ _,
1903
+ {
1904
+ className: "gap-2 items-center",
1905
+ variant: "outline",
1906
+ onClick: p.login,
1907
+ children: [
1908
+ "Login to open in Playground ",
1909
+ /* @__PURE__ */ e.jsx(wt, { size: 16 })
1910
+ ]
1911
+ }
1912
+ ) : /* @__PURE__ */ e.jsx(
1913
+ Za,
1914
+ {
1915
+ url: c ?? "/",
1916
+ method: l ?? "get",
1917
+ server: d,
1918
+ ...i,
1919
+ children: /* @__PURE__ */ e.jsxs(_, { className: "gap-2 items-center", variant: "outline", children: [
1920
+ "Open in Playground ",
1921
+ /* @__PURE__ */ e.jsx(Ct, { size: 16 })
1922
+ ] })
1923
+ }
1924
+ );
1925
+ }
1926
+ }),
1927
+ getSidebar: async (o) => {
1928
+ var d;
1929
+ if (!Tt({ path: a, end: !1 }, o))
1930
+ return [];
1931
+ try {
1932
+ const l = s.find(
1933
+ (m) => o.startsWith(R(a, m))
1934
+ ), c = l ?? Object.keys(t.input).at(0), i = await n.fetch(Ka, {
1935
+ type: t.type,
1936
+ input: t.type === "file" ? t.input[c] : t.input
1937
+ }), p = (d = t.tagPages) == null ? void 0 : d.find(
1938
+ (m) => o.split("/").at(-1) === ae(m)
1939
+ ), g = await n.fetch(Xa, {
1940
+ type: t.type,
1941
+ input: t.type === "file" ? t.input[c] : t.input,
1942
+ tag: t.loadTags ? void 0 : p
1943
+ }), w = i.schema.tags.flatMap((m) => {
1944
+ const h = R(a, l, ae(m.name)), x = g.schema.operations.filter(
1945
+ (y) => {
1946
+ var v, N;
1947
+ return ((v = y.tags) == null ? void 0 : v.length) !== 0 && ((N = y.tags) == null ? void 0 : N.map((C) => C.name).includes(m.name));
1948
+ }
1949
+ ).map((y) => ({
1950
+ type: "link",
1951
+ label: y.summary ?? y.path,
1952
+ href: `${h}#${y.slug}`,
1953
+ badge: {
1954
+ label: y.method,
1955
+ color: Ya[y.method.toLowerCase()],
1956
+ invert: !0
1957
+ }
1958
+ }));
1959
+ return t.loadTags && x.length === 0 ? [] : {
1960
+ type: "category",
1961
+ label: m.name,
1962
+ link: {
1963
+ type: "doc",
1964
+ id: h,
1965
+ label: m.name
1966
+ },
1967
+ collapsible: t.loadTags,
1968
+ collapsed: !t.loadTags,
1969
+ items: x
1970
+ };
1971
+ }), { untagged: j } = g.schema;
1972
+ if (j.length > 0) {
1973
+ const m = R(a, l, le);
1974
+ w.push({
1975
+ type: "category",
1976
+ label: "Other endpoints",
1977
+ link: {
1978
+ type: "doc",
1979
+ id: m,
1980
+ label: "Other endpoints"
1981
+ },
1982
+ collapsible: t.loadTags,
1983
+ collapsed: !t.loadTags,
1984
+ items: j.map((h) => ({
1985
+ type: "link",
1986
+ label: h.summary ?? h.path,
1987
+ href: `${m}#${h.slug}`
1988
+ }))
1989
+ });
1990
+ }
1991
+ return w;
1992
+ } catch {
1993
+ return [];
1994
+ }
1995
+ },
1996
+ getRoutes: () => {
1997
+ const o = s.length > 1 ? [null, ...s] : [null], d = (t.tagPages ?? []).map((l) => ({
1998
+ tag: l,
1999
+ path: ae(l)
2000
+ }));
2001
+ return o.map((l) => {
2002
+ const c = R(a, l);
2003
+ return {
2004
+ path: c,
2005
+ async lazy() {
2006
+ const { OpenApiRoute: i } = await import("./OpenApiRoute-BP9kzG5k.js");
2007
+ return {
2008
+ element: /* @__PURE__ */ e.jsx(
2009
+ i,
2010
+ {
2011
+ version: l ?? void 0,
2012
+ basePath: a,
2013
+ versions: s,
2014
+ client: n,
2015
+ config: t
2016
+ }
2017
+ )
2018
+ };
2019
+ },
2020
+ children: [
2021
+ {
2022
+ index: !0,
2023
+ loader: () => {
2024
+ var i;
2025
+ return $t(
2026
+ R(c, ((i = d.at(0)) == null ? void 0 : i.path) ?? le)
2027
+ );
2028
+ }
2029
+ },
2030
+ {
2031
+ path: R(c, le),
2032
+ async lazy() {
2033
+ const { OperationList: i } = await import("./OperationList-c72qPMtm.js");
2034
+ return { element: /* @__PURE__ */ e.jsx(i, { untagged: !0 }) };
2035
+ }
2036
+ },
2037
+ ...d.map((i) => ({
2038
+ path: R(c, i.path),
2039
+ async lazy() {
2040
+ const { OperationList: p } = await import("./OperationList-c72qPMtm.js");
2041
+ return {
2042
+ element: /* @__PURE__ */ e.jsx(p, { tag: i.tag })
2043
+ };
2044
+ }
2045
+ }))
2046
+ ]
2047
+ };
2048
+ });
2049
+ }
2050
+ };
2051
+ };
2052
+ export {
2053
+ Ye as C,
2054
+ Za as P,
2055
+ He as a,
2056
+ Be as b,
2057
+ Ge as c,
2058
+ ia as d,
2059
+ Ke as g,
2060
+ Da as m,
2061
+ Ts as o
2062
+ };
2063
+ //# sourceMappingURL=index-CZjcfK-H.js.map