@scalar/api-reference 1.49.3 → 1.49.5

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 (655) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
  3. package/dist/blocks/index.js +4 -2
  4. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  5. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +9 -0
  6. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -0
  7. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +106 -0
  8. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -0
  9. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +9 -0
  10. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -0
  11. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +121 -0
  12. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -0
  13. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js +27 -0
  14. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -0
  15. package/dist/blocks/scalar-client-selector-block/index.d.ts +1 -1
  16. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +9 -0
  17. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js.map +1 -0
  18. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js +55 -0
  19. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js.map +1 -0
  20. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +7 -0
  21. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js.map +1 -0
  22. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js +69 -0
  23. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js.map +1 -0
  24. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js +9 -0
  25. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js.map +1 -0
  26. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js +68 -0
  27. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js.map +1 -0
  28. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js +7 -0
  29. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js.map +1 -0
  30. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js +40 -0
  31. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js.map +1 -0
  32. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js +7 -0
  33. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js.map +1 -0
  34. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js +35 -0
  35. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js.map +1 -0
  36. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js +7 -0
  37. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js.map +1 -0
  38. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js +25 -0
  39. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js.map +1 -0
  40. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js +9 -0
  41. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js.map +1 -0
  42. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js +15 -0
  43. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js.map +1 -0
  44. package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +14 -0
  45. package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js.map +1 -0
  46. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +9 -0
  47. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js.map +1 -0
  48. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js +92 -0
  49. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -0
  50. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js +7 -0
  51. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js.map +1 -0
  52. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.script.js +19 -0
  53. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.script.js.map +1 -0
  54. package/dist/blocks/scalar-info-block/index.d.ts +2 -2
  55. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +7 -0
  56. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js.map +1 -0
  57. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js +71 -0
  58. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js.map +1 -0
  59. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +7 -0
  60. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js.map +1 -0
  61. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +69 -0
  62. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -0
  63. package/dist/blocks/scalar-server-selector-block/index.d.ts +1 -1
  64. package/dist/browser/standalone.js +2310 -45326
  65. package/dist/browser/webpack-stats.json +1 -1
  66. package/dist/components/AgentScalar/AgentScalarButton.vue.js +7 -0
  67. package/dist/components/AgentScalar/AgentScalarButton.vue.js.map +1 -0
  68. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js +21 -0
  69. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js.map +1 -0
  70. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.d.ts +2 -1
  71. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.d.ts.map +1 -1
  72. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js +7 -0
  73. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js.map +1 -0
  74. package/dist/{AgentScalarChatInterface-MUbtSqMw.js → components/AgentScalar/AgentScalarChatInterface.vue.script.js} +10 -9
  75. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.script.js.map +1 -0
  76. package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts +2 -4
  77. package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts.map +1 -1
  78. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +9 -0
  79. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js.map +1 -0
  80. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +67 -0
  81. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -0
  82. package/dist/components/AgentScalar/OpenMCPButton.vue.d.ts +2 -0
  83. package/dist/components/AgentScalar/OpenMCPButton.vue.d.ts.map +1 -1
  84. package/dist/components/AgentScalar/OpenMCPButton.vue.js +9 -0
  85. package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -0
  86. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +184 -0
  87. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -0
  88. package/dist/components/AgentScalar/index.d.ts +3 -3
  89. package/dist/components/Anchor/Anchor.vue.js +7 -0
  90. package/dist/components/Anchor/Anchor.vue.js.map +1 -0
  91. package/dist/components/Anchor/Anchor.vue.script.js +40 -0
  92. package/dist/components/Anchor/Anchor.vue.script.js.map +1 -0
  93. package/dist/components/Anchor/WithBreadcrumb.vue.js +7 -0
  94. package/dist/components/Anchor/WithBreadcrumb.vue.js.map +1 -0
  95. package/dist/components/Anchor/WithBreadcrumb.vue.script.js +32 -0
  96. package/dist/components/Anchor/WithBreadcrumb.vue.script.js.map +1 -0
  97. package/dist/components/Anchor/index.d.ts +2 -2
  98. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  99. package/dist/components/ApiReference.vue.js +12 -0
  100. package/dist/components/ApiReference.vue.js.map +1 -0
  101. package/dist/components/ApiReference.vue.script.js +668 -0
  102. package/dist/components/ApiReference.vue.script.js.map +1 -0
  103. package/dist/components/Badge/Badge.vue.js +9 -0
  104. package/dist/components/Badge/Badge.vue.js.map +1 -0
  105. package/dist/components/Badge/Badge.vue.script.js +22 -0
  106. package/dist/components/Badge/Badge.vue.script.js.map +1 -0
  107. package/dist/components/Badge/index.d.ts +1 -1
  108. package/dist/components/ClassicHeader.vue.js +16 -0
  109. package/dist/components/ClassicHeader.vue.js.map +1 -0
  110. package/dist/components/Content/Auth/Auth.vue.js +7 -0
  111. package/dist/components/Content/Auth/Auth.vue.js.map +1 -0
  112. package/dist/components/Content/Auth/Auth.vue.script.js +70 -0
  113. package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -0
  114. package/dist/components/Content/Auth/helpers/get-default-security.js +64 -0
  115. package/dist/components/Content/Auth/helpers/get-default-security.js.map +1 -0
  116. package/dist/components/Content/Auth/index.d.ts +1 -1
  117. package/dist/components/Content/Content.vue.js +8 -0
  118. package/dist/components/Content/Content.vue.js.map +1 -0
  119. package/dist/components/Content/Content.vue.script.js +192 -0
  120. package/dist/components/Content/Content.vue.script.js.map +1 -0
  121. package/dist/components/Content/Models/Model.vue.js +7 -0
  122. package/dist/components/Content/Models/Model.vue.js.map +1 -0
  123. package/dist/components/Content/Models/Model.vue.script.js +61 -0
  124. package/dist/components/Content/Models/Model.vue.script.js.map +1 -0
  125. package/dist/components/Content/Models/ModelTag.vue.js +7 -0
  126. package/dist/components/Content/Models/ModelTag.vue.js.map +1 -0
  127. package/dist/components/Content/Models/ModelTag.vue.script.js +69 -0
  128. package/dist/components/Content/Models/ModelTag.vue.script.js.map +1 -0
  129. package/dist/components/Content/Models/components/ClassicLayout.vue.js +9 -0
  130. package/dist/components/Content/Models/components/ClassicLayout.vue.js.map +1 -0
  131. package/dist/components/Content/Models/components/ClassicLayout.vue.script.js +81 -0
  132. package/dist/components/Content/Models/components/ClassicLayout.vue.script.js.map +1 -0
  133. package/dist/components/Content/Models/components/ModernLayout.vue.js +7 -0
  134. package/dist/components/Content/Models/components/ModernLayout.vue.js.map +1 -0
  135. package/dist/components/Content/Models/components/ModernLayout.vue.script.js +66 -0
  136. package/dist/components/Content/Models/components/ModernLayout.vue.script.js.map +1 -0
  137. package/dist/components/Content/Models/index.d.ts +2 -2
  138. package/dist/components/Content/Operations/TraversedEntry.vue.js +7 -0
  139. package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -0
  140. package/dist/components/Content/Operations/TraversedEntry.vue.script.js +213 -0
  141. package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -0
  142. package/dist/components/Content/Schema/RenderString.vue.js +7 -0
  143. package/dist/components/Content/Schema/RenderString.vue.js.map +1 -0
  144. package/dist/components/Content/Schema/RenderString.vue.script.js +36 -0
  145. package/dist/components/Content/Schema/RenderString.vue.script.js.map +1 -0
  146. package/dist/components/Content/Schema/Schema.vue.d.ts +4 -0
  147. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  148. package/dist/components/Content/Schema/Schema.vue.js +9 -0
  149. package/dist/components/Content/Schema/Schema.vue.js.map +1 -0
  150. package/dist/components/Content/Schema/Schema.vue.script.js +194 -0
  151. package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -0
  152. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +5 -1
  153. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  154. package/dist/components/Content/Schema/SchemaComposition.vue.js +7 -0
  155. package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -0
  156. package/dist/components/Content/Schema/SchemaComposition.vue.script.js +176 -0
  157. package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -0
  158. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +9 -0
  159. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js.map +1 -0
  160. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js +29 -0
  161. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js.map +1 -0
  162. package/dist/components/Content/Schema/SchemaEnums.vue.js +9 -0
  163. package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -0
  164. package/dist/components/Content/Schema/SchemaEnums.vue.script.js +108 -0
  165. package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -0
  166. package/dist/components/Content/Schema/SchemaHeading.vue.js +9 -0
  167. package/dist/components/Content/Schema/SchemaHeading.vue.js.map +1 -0
  168. package/dist/components/Content/Schema/SchemaHeading.vue.script.js +45 -0
  169. package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -0
  170. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js +7 -0
  171. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -0
  172. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +55 -0
  173. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -0
  174. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +2 -0
  175. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  176. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +7 -0
  177. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -0
  178. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +181 -0
  179. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -0
  180. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +6 -0
  181. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  182. package/dist/components/Content/Schema/SchemaProperty.vue.js +9 -0
  183. package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -0
  184. package/dist/components/Content/Schema/SchemaProperty.vue.script.js +273 -0
  185. package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -0
  186. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +9 -0
  187. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js.map +1 -0
  188. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +35 -0
  189. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -0
  190. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +9 -0
  191. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js.map +1 -0
  192. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js +30 -0
  193. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js.map +1 -0
  194. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +9 -0
  195. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js.map +1 -0
  196. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +67 -0
  197. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -0
  198. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +9 -0
  199. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -0
  200. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +251 -0
  201. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -0
  202. package/dist/components/Content/Schema/helpers/format-example.js +26 -0
  203. package/dist/components/Content/Schema/helpers/format-example.js.map +1 -0
  204. package/dist/components/Content/Schema/helpers/format-value.js +22 -0
  205. package/dist/components/Content/Schema/helpers/format-value.js.map +1 -0
  206. package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +1 -1
  207. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +32 -0
  208. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js.map +1 -0
  209. package/dist/components/Content/Schema/helpers/get-enum-values.js +22 -0
  210. package/dist/components/Content/Schema/helpers/get-enum-values.js.map +1 -0
  211. package/dist/components/Content/Schema/helpers/get-property-description.js +36 -0
  212. package/dist/components/Content/Schema/helpers/get-property-description.js.map +1 -0
  213. package/dist/components/Content/Schema/helpers/get-ref-name.js +19 -0
  214. package/dist/components/Content/Schema/helpers/get-ref-name.js.map +1 -0
  215. package/dist/components/Content/Schema/helpers/get-schema-type.js +49 -0
  216. package/dist/components/Content/Schema/helpers/get-schema-type.js.map +1 -0
  217. package/dist/components/Content/Schema/helpers/has-complex-array-items.js +53 -0
  218. package/dist/components/Content/Schema/helpers/has-complex-array-items.js.map +1 -0
  219. package/dist/components/Content/Schema/helpers/is-empty-schema-object.js +18 -0
  220. package/dist/components/Content/Schema/helpers/is-empty-schema-object.js.map +1 -0
  221. package/dist/components/Content/Schema/helpers/is-type-object.js +18 -0
  222. package/dist/components/Content/Schema/helpers/is-type-object.js.map +1 -0
  223. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +175 -0
  224. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -0
  225. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +68 -0
  226. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js.map +1 -0
  227. package/dist/components/Content/Schema/helpers/schema-composition.js +11 -0
  228. package/dist/components/Content/Schema/helpers/schema-composition.js.map +1 -0
  229. package/dist/components/Content/Schema/helpers/schema-name.js +23 -0
  230. package/dist/components/Content/Schema/helpers/schema-name.js.map +1 -0
  231. package/dist/components/Content/Schema/helpers/should-display-description.js +17 -0
  232. package/dist/components/Content/Schema/helpers/should-display-description.js.map +1 -0
  233. package/dist/components/Content/Schema/helpers/should-display-heading.js +18 -0
  234. package/dist/components/Content/Schema/helpers/should-display-heading.js.map +1 -0
  235. package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js +20 -0
  236. package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js.map +1 -0
  237. package/dist/components/Content/Schema/helpers/sort-property-names.js +45 -0
  238. package/dist/components/Content/Schema/helpers/sort-property-names.js.map +1 -0
  239. package/dist/components/Content/Schema/index.d.ts +4 -4
  240. package/dist/components/Content/Tags/Tag.vue.js +7 -0
  241. package/dist/components/Content/Tags/Tag.vue.js.map +1 -0
  242. package/dist/components/Content/Tags/Tag.vue.script.js +56 -0
  243. package/dist/components/Content/Tags/Tag.vue.script.js.map +1 -0
  244. package/dist/components/Content/Tags/components/ClassicLayout.vue.js +9 -0
  245. package/dist/components/Content/Tags/components/ClassicLayout.vue.js.map +1 -0
  246. package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js +49 -0
  247. package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js.map +1 -0
  248. package/dist/components/Content/Tags/components/ModernLayout.vue.js +9 -0
  249. package/dist/components/Content/Tags/components/ModernLayout.vue.js.map +1 -0
  250. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js +63 -0
  251. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js.map +1 -0
  252. package/dist/components/Content/Tags/components/TagSection.vue.js +7 -0
  253. package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -0
  254. package/dist/components/Content/Tags/components/TagSection.vue.script.js +78 -0
  255. package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -0
  256. package/dist/components/Content/Tags/index.d.ts +1 -1
  257. package/dist/components/Content/index.d.ts +2 -2
  258. package/dist/components/GettingStarted.vue.js +9 -0
  259. package/dist/components/GettingStarted.vue.js.map +1 -0
  260. package/dist/components/GettingStarted.vue.script.js +71 -0
  261. package/dist/components/GettingStarted.vue.script.js.map +1 -0
  262. package/dist/components/HttpMethod/HttpMethod.vue.js +7 -0
  263. package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -0
  264. package/dist/components/HttpMethod/HttpMethod.vue.script.js +33 -0
  265. package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -0
  266. package/dist/components/HttpMethod/index.d.ts +1 -1
  267. package/dist/components/IntersectionObserver.vue.js +7 -0
  268. package/dist/components/IntersectionObserver.vue.js.map +1 -0
  269. package/dist/components/IntersectionObserver.vue.script.js +45 -0
  270. package/dist/components/IntersectionObserver.vue.script.js.map +1 -0
  271. package/dist/components/Lazy/Lazy.vue.js +7 -0
  272. package/dist/components/Lazy/Lazy.vue.js.map +1 -0
  273. package/dist/components/Lazy/Lazy.vue.script.js +101 -0
  274. package/dist/components/Lazy/Lazy.vue.script.js.map +1 -0
  275. package/dist/components/LinkList/LinkList.vue.js +9 -0
  276. package/dist/components/LinkList/LinkList.vue.js.map +1 -0
  277. package/dist/components/LinkList/LinkList.vue.script.js +53 -0
  278. package/dist/components/LinkList/LinkList.vue.script.js.map +1 -0
  279. package/dist/components/LinkList/index.d.ts +1 -1
  280. package/dist/components/LoadingSkeleton.vue.js +9 -0
  281. package/dist/components/LoadingSkeleton.vue.js.map +1 -0
  282. package/dist/components/LoadingSkeleton.vue.script.js +20 -0
  283. package/dist/components/LoadingSkeleton.vue.script.js.map +1 -0
  284. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  285. package/dist/components/MobileHeader.vue.js +7 -0
  286. package/dist/components/MobileHeader.vue.js.map +1 -0
  287. package/dist/components/MobileHeader.vue.script.js +43 -0
  288. package/dist/components/MobileHeader.vue.script.js.map +1 -0
  289. package/dist/components/OperationPath.vue.js +9 -0
  290. package/dist/components/OperationPath.vue.js.map +1 -0
  291. package/dist/components/OperationPath.vue.script.js +24 -0
  292. package/dist/components/OperationPath.vue.script.js.map +1 -0
  293. package/dist/components/OperationsList/OperationsList.vue.js +9 -0
  294. package/dist/components/OperationsList/OperationsList.vue.js.map +1 -0
  295. package/dist/components/OperationsList/OperationsList.vue.script.js +49 -0
  296. package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -0
  297. package/dist/components/OperationsList/OperationsListItem.vue.js +9 -0
  298. package/dist/components/OperationsList/OperationsListItem.vue.js.map +1 -0
  299. package/dist/components/OperationsList/OperationsListItem.vue.script.js +51 -0
  300. package/dist/components/OperationsList/OperationsListItem.vue.script.js.map +1 -0
  301. package/dist/components/OperationsList/index.d.ts +1 -1
  302. package/dist/components/RenderPlugins/RenderPlugins.vue.js +7 -0
  303. package/dist/components/RenderPlugins/RenderPlugins.vue.js.map +1 -0
  304. package/dist/components/RenderPlugins/RenderPlugins.vue.script.js +44 -0
  305. package/dist/components/RenderPlugins/RenderPlugins.vue.script.js.map +1 -0
  306. package/dist/components/RenderPlugins/index.d.ts +1 -1
  307. package/dist/components/ScreenReader.vue.js +9 -0
  308. package/dist/components/ScreenReader.vue.js.map +1 -0
  309. package/dist/components/ScreenReader.vue.script.js +22 -0
  310. package/dist/components/ScreenReader.vue.script.js.map +1 -0
  311. package/dist/components/Section/CompactSection.vue.js +9 -0
  312. package/dist/components/Section/CompactSection.vue.js.map +1 -0
  313. package/dist/components/Section/CompactSection.vue.script.js +56 -0
  314. package/dist/components/Section/CompactSection.vue.script.js.map +1 -0
  315. package/dist/components/Section/Section.vue.js +9 -0
  316. package/dist/components/Section/Section.vue.js.map +1 -0
  317. package/dist/components/Section/Section.vue.script.js +23 -0
  318. package/dist/components/Section/Section.vue.script.js.map +1 -0
  319. package/dist/components/Section/SectionAccordion.vue.js +9 -0
  320. package/dist/components/Section/SectionAccordion.vue.js.map +1 -0
  321. package/dist/components/Section/SectionAccordion.vue.script.js +60 -0
  322. package/dist/components/Section/SectionAccordion.vue.script.js.map +1 -0
  323. package/dist/components/Section/SectionColumn.vue.js +14 -0
  324. package/dist/components/Section/SectionColumn.vue.js.map +1 -0
  325. package/dist/components/Section/SectionColumns.vue.js +14 -0
  326. package/dist/components/Section/SectionColumns.vue.js.map +1 -0
  327. package/dist/components/Section/SectionContainer.vue.js +9 -0
  328. package/dist/components/Section/SectionContainer.vue.js.map +1 -0
  329. package/dist/components/Section/SectionContainer.vue.script.js +19 -0
  330. package/dist/components/Section/SectionContainer.vue.script.js.map +1 -0
  331. package/dist/components/Section/SectionContainerAccordion.vue.js +9 -0
  332. package/dist/components/Section/SectionContainerAccordion.vue.js.map +1 -0
  333. package/dist/components/Section/SectionContainerAccordion.vue.script.js +40 -0
  334. package/dist/components/Section/SectionContainerAccordion.vue.script.js.map +1 -0
  335. package/dist/components/Section/SectionContent.vue.js +9 -0
  336. package/dist/components/Section/SectionContent.vue.js.map +1 -0
  337. package/dist/components/Section/SectionContent.vue.script.js +23 -0
  338. package/dist/components/Section/SectionContent.vue.script.js.map +1 -0
  339. package/dist/components/Section/SectionHeader.vue.js +9 -0
  340. package/dist/components/Section/SectionHeader.vue.js.map +1 -0
  341. package/dist/components/Section/SectionHeader.vue.script.js +23 -0
  342. package/dist/components/Section/SectionHeader.vue.script.js.map +1 -0
  343. package/dist/components/Section/SectionHeaderTag.vue.js +9 -0
  344. package/dist/components/Section/SectionHeaderTag.vue.js.map +1 -0
  345. package/dist/components/Section/SectionHeaderTag.vue.script.js +18 -0
  346. package/dist/components/Section/SectionHeaderTag.vue.script.js.map +1 -0
  347. package/dist/components/Section/index.d.ts +10 -10
  348. package/dist/components/SectionFlare/SectionFlare.vue.js +14 -0
  349. package/dist/components/SectionFlare/SectionFlare.vue.js.map +1 -0
  350. package/dist/components/SectionFlare/index.d.ts +1 -1
  351. package/dist/components/ShowMoreButton.vue.js +9 -0
  352. package/dist/components/ShowMoreButton.vue.js.map +1 -0
  353. package/dist/components/ShowMoreButton.vue.script.js +22 -0
  354. package/dist/components/ShowMoreButton.vue.script.js.map +1 -0
  355. package/dist/components/index.d.ts +5 -5
  356. package/dist/components/index.js +20 -102
  357. package/dist/features/Operation/Operation.vue.js +7 -0
  358. package/dist/features/Operation/Operation.vue.js.map +1 -0
  359. package/dist/features/Operation/Operation.vue.script.js +115 -0
  360. package/dist/features/Operation/Operation.vue.script.js.map +1 -0
  361. package/dist/features/Operation/components/ContentTypeSelect.vue.js +7 -0
  362. package/dist/features/Operation/components/ContentTypeSelect.vue.js.map +1 -0
  363. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +75 -0
  364. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -0
  365. package/dist/features/Operation/components/Header.vue.js +7 -0
  366. package/dist/features/Operation/components/Header.vue.js.map +1 -0
  367. package/dist/features/Operation/components/Header.vue.script.js +42 -0
  368. package/dist/features/Operation/components/Header.vue.script.js.map +1 -0
  369. package/dist/features/Operation/components/Headers.vue.js +9 -0
  370. package/dist/features/Operation/components/Headers.vue.js.map +1 -0
  371. package/dist/features/Operation/components/Headers.vue.script.js +58 -0
  372. package/dist/features/Operation/components/Headers.vue.script.js.map +1 -0
  373. package/dist/features/Operation/components/OperationParameters.vue.d.ts +1 -1
  374. package/dist/features/Operation/components/OperationParameters.vue.js +7 -0
  375. package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -0
  376. package/dist/features/Operation/components/OperationParameters.vue.script.js +108 -0
  377. package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -0
  378. package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -1
  379. package/dist/features/Operation/components/OperationResponses.vue.js +7 -0
  380. package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -0
  381. package/dist/features/Operation/components/OperationResponses.vue.script.js +48 -0
  382. package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -0
  383. package/dist/features/Operation/components/ParameterList.vue.d.ts +1 -1
  384. package/dist/features/Operation/components/ParameterList.vue.js +7 -0
  385. package/dist/features/Operation/components/ParameterList.vue.js.map +1 -0
  386. package/dist/features/Operation/components/ParameterList.vue.script.js +53 -0
  387. package/dist/features/Operation/components/ParameterList.vue.script.js.map +1 -0
  388. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +1 -1
  389. package/dist/features/Operation/components/ParameterListItem.vue.js +9 -0
  390. package/dist/features/Operation/components/ParameterListItem.vue.js.map +1 -0
  391. package/dist/features/Operation/components/ParameterListItem.vue.script.js +161 -0
  392. package/dist/features/Operation/components/ParameterListItem.vue.script.js.map +1 -0
  393. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  394. package/dist/features/Operation/components/RequestBody.vue.js +9 -0
  395. package/dist/features/Operation/components/RequestBody.vue.js.map +1 -0
  396. package/dist/features/Operation/components/RequestBody.vue.script.js +160 -0
  397. package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -0
  398. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -1
  399. package/dist/features/Operation/components/callbacks/Callback.vue.js +9 -0
  400. package/dist/features/Operation/components/callbacks/Callback.vue.js.map +1 -0
  401. package/dist/features/Operation/components/callbacks/Callback.vue.script.js +62 -0
  402. package/dist/features/Operation/components/callbacks/Callback.vue.script.js.map +1 -0
  403. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +1 -1
  404. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +7 -0
  405. package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -0
  406. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +67 -0
  407. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -0
  408. package/dist/features/Operation/helpers/filter-selected-security.js +30 -0
  409. package/dist/features/Operation/helpers/filter-selected-security.js.map +1 -0
  410. package/dist/features/Operation/helpers/get-first-server.js +27 -0
  411. package/dist/features/Operation/helpers/get-first-server.js.map +1 -0
  412. package/dist/features/Operation/index.d.ts +1 -1
  413. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -1
  414. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  415. package/dist/features/Operation/layouts/ClassicLayout.vue.js +9 -0
  416. package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -0
  417. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +254 -0
  418. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -0
  419. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +1 -1
  420. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  421. package/dist/features/Operation/layouts/ModernLayout.vue.js +9 -0
  422. package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -0
  423. package/dist/features/Operation/layouts/ModernLayout.vue.script.js +254 -0
  424. package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -0
  425. package/dist/features/Operation/request-body-composition-index.d.ts +8 -0
  426. package/dist/features/Operation/request-body-composition-index.d.ts.map +1 -0
  427. package/dist/features/Operation/request-body-composition-index.js +10 -0
  428. package/dist/features/Operation/request-body-composition-index.js.map +1 -0
  429. package/dist/features/Search/components/SearchButton.vue.js +7 -0
  430. package/dist/features/Search/components/SearchButton.vue.js.map +1 -0
  431. package/dist/features/Search/components/SearchButton.vue.script.js +77 -0
  432. package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -0
  433. package/dist/features/Search/components/SearchModal.vue.js +9 -0
  434. package/dist/features/Search/components/SearchModal.vue.js.map +1 -0
  435. package/dist/features/Search/components/SearchModal.vue.script.js +115 -0
  436. package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -0
  437. package/dist/features/Search/components/SearchResult.vue.js +7 -0
  438. package/dist/features/Search/components/SearchResult.vue.js.map +1 -0
  439. package/dist/features/Search/components/SearchResult.vue.script.js +69 -0
  440. package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -0
  441. package/dist/features/Search/helpers/create-fuse-instance.js +52 -0
  442. package/dist/features/Search/helpers/create-fuse-instance.js.map +1 -0
  443. package/dist/features/Search/helpers/create-search-index.js +127 -0
  444. package/dist/features/Search/helpers/create-search-index.js.map +1 -0
  445. package/dist/features/Search/hooks/useSearchIndex.js +31 -0
  446. package/dist/features/Search/hooks/useSearchIndex.js.map +1 -0
  447. package/dist/features/Search/index.d.ts +2 -2
  448. package/dist/features/Search/types.d.ts +1 -1
  449. package/dist/features/ask-agent-button/AskAgentButton.vue.js +9 -0
  450. package/dist/features/ask-agent-button/AskAgentButton.vue.js.map +1 -0
  451. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js +49 -0
  452. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js.map +1 -0
  453. package/dist/features/developer-tools/DeveloperTools.vue.d.ts +2 -1
  454. package/dist/features/developer-tools/DeveloperTools.vue.d.ts.map +1 -1
  455. package/dist/features/developer-tools/DeveloperTools.vue.js +7 -0
  456. package/dist/features/developer-tools/DeveloperTools.vue.js.map +1 -0
  457. package/dist/features/developer-tools/DeveloperTools.vue.script.js +56 -0
  458. package/dist/features/developer-tools/DeveloperTools.vue.script.js.map +1 -0
  459. package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js +13 -0
  460. package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js.map +1 -0
  461. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js +7 -0
  462. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js.map +1 -0
  463. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +38 -0
  464. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -0
  465. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js +7 -0
  466. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -0
  467. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +112 -0
  468. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -0
  469. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js +7 -0
  470. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js.map +1 -0
  471. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +60 -0
  472. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js.map +1 -0
  473. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js +7 -0
  474. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js.map +1 -0
  475. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +35 -0
  476. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -0
  477. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts +2 -0
  478. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -1
  479. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js +7 -0
  480. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map +1 -0
  481. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +68 -0
  482. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -0
  483. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts +2 -0
  484. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
  485. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js +7 -0
  486. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -0
  487. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +86 -0
  488. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -0
  489. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts +2 -0
  490. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -1
  491. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js +7 -0
  492. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map +1 -0
  493. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +68 -0
  494. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -0
  495. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js +7 -0
  496. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js.map +1 -0
  497. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +44 -0
  498. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -0
  499. package/dist/features/developer-tools/components/DeployApiReference.vue.d.ts +2 -0
  500. package/dist/features/developer-tools/components/DeployApiReference.vue.d.ts.map +1 -1
  501. package/dist/features/developer-tools/components/DeployApiReference.vue.js +7 -0
  502. package/dist/features/developer-tools/components/DeployApiReference.vue.js.map +1 -0
  503. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +32 -0
  504. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -0
  505. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js +7 -0
  506. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js.map +1 -0
  507. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +86 -0
  508. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -0
  509. package/dist/features/developer-tools/components/ShareApiReference.vue.d.ts +2 -0
  510. package/dist/features/developer-tools/components/ShareApiReference.vue.d.ts.map +1 -1
  511. package/dist/features/developer-tools/components/ShareApiReference.vue.js +7 -0
  512. package/dist/features/developer-tools/components/ShareApiReference.vue.js.map +1 -0
  513. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +32 -0
  514. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -0
  515. package/dist/features/developer-tools/index.d.ts +1 -1
  516. package/dist/features/example-responses/ExampleResponse.vue.js +9 -0
  517. package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -0
  518. package/dist/features/example-responses/ExampleResponse.vue.script.js +56 -0
  519. package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -0
  520. package/dist/features/example-responses/ExampleResponseTab.vue.js +9 -0
  521. package/dist/features/example-responses/ExampleResponseTab.vue.js.map +1 -0
  522. package/dist/features/example-responses/ExampleResponseTab.vue.script.js +21 -0
  523. package/dist/features/example-responses/ExampleResponseTab.vue.script.js.map +1 -0
  524. package/dist/features/example-responses/ExampleResponseTabList.vue.js +9 -0
  525. package/dist/features/example-responses/ExampleResponseTabList.vue.js.map +1 -0
  526. package/dist/features/example-responses/ExampleResponseTabList.vue.script.js +31 -0
  527. package/dist/features/example-responses/ExampleResponseTabList.vue.script.js.map +1 -0
  528. package/dist/features/example-responses/ExampleResponses.vue.js +9 -0
  529. package/dist/features/example-responses/ExampleResponses.vue.js.map +1 -0
  530. package/dist/features/example-responses/ExampleResponses.vue.script.js +157 -0
  531. package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -0
  532. package/dist/features/example-responses/ExampleSchema.vue.js +7 -0
  533. package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -0
  534. package/dist/features/example-responses/ExampleSchema.vue.script.js +42 -0
  535. package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -0
  536. package/dist/features/example-responses/has-response-content.js +37 -0
  537. package/dist/features/example-responses/has-response-content.js.map +1 -0
  538. package/dist/features/example-responses/index.d.ts +1 -1
  539. package/dist/features/external-docs/ExternalDocs.vue.js +7 -0
  540. package/dist/features/external-docs/ExternalDocs.vue.js.map +1 -0
  541. package/dist/features/external-docs/ExternalDocs.vue.script.js +37 -0
  542. package/dist/features/external-docs/ExternalDocs.vue.script.js.map +1 -0
  543. package/dist/features/external-docs/index.d.ts +1 -1
  544. package/dist/features/index.d.ts +2 -2
  545. package/dist/features/index.js +4 -3
  546. package/dist/features/info-object/Contact.vue.js +7 -0
  547. package/dist/features/info-object/Contact.vue.js.map +1 -0
  548. package/dist/features/info-object/Contact.vue.script.js +37 -0
  549. package/dist/features/info-object/Contact.vue.script.js.map +1 -0
  550. package/dist/features/info-object/License.vue.js +7 -0
  551. package/dist/features/info-object/License.vue.js.map +1 -0
  552. package/dist/features/info-object/License.vue.script.js +32 -0
  553. package/dist/features/info-object/License.vue.script.js.map +1 -0
  554. package/dist/features/info-object/TermsOfService.vue.js +7 -0
  555. package/dist/features/info-object/TermsOfService.vue.js.map +1 -0
  556. package/dist/features/info-object/TermsOfService.vue.script.js +29 -0
  557. package/dist/features/info-object/TermsOfService.vue.script.js.map +1 -0
  558. package/dist/features/info-object/index.d.ts +3 -3
  559. package/dist/features/multiple-documents/DocumentSelector.vue.js +7 -0
  560. package/dist/features/multiple-documents/DocumentSelector.vue.js.map +1 -0
  561. package/dist/features/multiple-documents/DocumentSelector.vue.script.js +48 -0
  562. package/dist/features/multiple-documents/DocumentSelector.vue.script.js.map +1 -0
  563. package/dist/features/specification-extension/SpecificationExtension.vue.js +7 -0
  564. package/dist/features/specification-extension/SpecificationExtension.vue.js.map +1 -0
  565. package/dist/features/specification-extension/SpecificationExtension.vue.script.js +56 -0
  566. package/dist/features/specification-extension/SpecificationExtension.vue.script.js.map +1 -0
  567. package/dist/features/specification-extension/helpers.js +15 -0
  568. package/dist/features/specification-extension/helpers.js.map +1 -0
  569. package/dist/features/specification-extension/index.d.ts +2 -2
  570. package/dist/features/test-request-button/TestRequestButton.vue.d.ts +1 -0
  571. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  572. package/dist/features/test-request-button/TestRequestButton.vue.js +9 -0
  573. package/dist/features/test-request-button/TestRequestButton.vue.js.map +1 -0
  574. package/dist/features/test-request-button/TestRequestButton.vue.script.js +49 -0
  575. package/dist/features/test-request-button/TestRequestButton.vue.script.js.map +1 -0
  576. package/dist/features/test-request-button/index.d.ts +1 -1
  577. package/dist/features/x-badges/XBadges.vue.js +7 -0
  578. package/dist/features/x-badges/XBadges.vue.js.map +1 -0
  579. package/dist/features/x-badges/XBadges.vue.script.js +31 -0
  580. package/dist/features/x-badges/XBadges.vue.script.js.map +1 -0
  581. package/dist/features/x-badges/index.d.ts +1 -1
  582. package/dist/helpers/color-mode.js +15 -0
  583. package/dist/helpers/color-mode.js.map +1 -0
  584. package/dist/helpers/download.js +77 -0
  585. package/dist/helpers/download.js.map +1 -0
  586. package/dist/helpers/id-routing.js +107 -0
  587. package/dist/helpers/id-routing.js.map +1 -0
  588. package/dist/helpers/index.d.ts +8 -8
  589. package/dist/helpers/index.js +8 -2
  590. package/dist/{lazy-bus-CV8Ox5hD.js → helpers/lazy-bus.js} +3 -106
  591. package/dist/helpers/lazy-bus.js.map +1 -0
  592. package/dist/helpers/load-from-perssistance.js +23 -0
  593. package/dist/helpers/load-from-perssistance.js.map +1 -0
  594. package/dist/helpers/map-config-plugins.js +44 -0
  595. package/dist/helpers/map-config-plugins.js.map +1 -0
  596. package/dist/helpers/map-config-to-workspace-store.js +24 -0
  597. package/dist/helpers/map-config-to-workspace-store.js.map +1 -0
  598. package/dist/helpers/normalize-configurations.js +66 -0
  599. package/dist/helpers/normalize-configurations.js.map +1 -0
  600. package/dist/helpers/openapi.js +132 -0
  601. package/dist/helpers/openapi.js.map +1 -0
  602. package/dist/{storage--3JuzjCI.js → helpers/storage.js} +2 -2
  603. package/dist/helpers/storage.js.map +1 -0
  604. package/dist/helpers/upload-temp-document.d.ts +2 -1
  605. package/dist/helpers/upload-temp-document.d.ts.map +1 -1
  606. package/dist/helpers/upload-temp-document.js +24 -0
  607. package/dist/helpers/upload-temp-document.js.map +1 -0
  608. package/dist/hooks/index.d.ts +2 -2
  609. package/dist/hooks/index.js +2 -2
  610. package/dist/{use-agent-Bnm1de0n.js → hooks/use-agent.js} +2 -2
  611. package/dist/hooks/use-agent.js.map +1 -0
  612. package/dist/{use-intersection-8QqPi2O-.js → hooks/use-intersection.js} +2 -2
  613. package/dist/hooks/use-intersection.js.map +1 -0
  614. package/dist/index.d.ts +4 -4
  615. package/dist/index.js +6 -6
  616. package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
  617. package/dist/plugins/hooks/usePluginManager.js +16 -0
  618. package/dist/plugins/hooks/usePluginManager.js.map +1 -0
  619. package/dist/plugins/index.d.ts +3 -3
  620. package/dist/plugins/index.js +3 -1
  621. package/dist/plugins/persistance-plugin.js +39 -0
  622. package/dist/plugins/persistance-plugin.js.map +1 -0
  623. package/dist/plugins/plugin-manager.js +32 -0
  624. package/dist/plugins/plugin-manager.js.map +1 -0
  625. package/dist/ssr.js +6 -6
  626. package/dist/standalone/lib/html-api.js +73 -0
  627. package/dist/standalone/lib/html-api.js.map +1 -0
  628. package/dist/style.css +7171 -5725
  629. package/package.json +14 -14
  630. package/dist/AgentScalarChatInterface-MUbtSqMw.js.map +0 -1
  631. package/dist/ExternalDocs-phu7GxpZ.js +0 -272
  632. package/dist/ExternalDocs-phu7GxpZ.js.map +0 -1
  633. package/dist/MobileHeader-DAm6yQX0.js +0 -1373
  634. package/dist/MobileHeader-DAm6yQX0.js.map +0 -1
  635. package/dist/Operation-CvpVIkc3.js +0 -3829
  636. package/dist/Operation-CvpVIkc3.js.map +0 -1
  637. package/dist/SearchButton-xzhIpMCZ.js +0 -621
  638. package/dist/SearchButton-xzhIpMCZ.js.map +0 -1
  639. package/dist/ServerSelector-5y29y2BJ.js +0 -852
  640. package/dist/ServerSelector-5y29y2BJ.js.map +0 -1
  641. package/dist/components/index.js.map +0 -1
  642. package/dist/consts/urls.d.ts +0 -13
  643. package/dist/consts/urls.d.ts.map +0 -1
  644. package/dist/lazy-bus-CV8Ox5hD.js.map +0 -1
  645. package/dist/normalize-configurations-DcVpOEjD.js +0 -232
  646. package/dist/normalize-configurations-DcVpOEjD.js.map +0 -1
  647. package/dist/plugins-4EyiUD_A.js +0 -80
  648. package/dist/plugins-4EyiUD_A.js.map +0 -1
  649. package/dist/src-DJwsRvMU.js +0 -1686
  650. package/dist/src-DJwsRvMU.js.map +0 -1
  651. package/dist/storage--3JuzjCI.js.map +0 -1
  652. package/dist/urls-gPTXGgbj.js +0 -17
  653. package/dist/urls-gPTXGgbj.js.map +0 -1
  654. package/dist/use-agent-Bnm1de0n.js.map +0 -1
  655. package/dist/use-intersection-8QqPi2O-.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"src-DJwsRvMU.js","names":["$attrs","$slots","$emit"],"sources":["../src/components/AgentScalar/AgentScalarButton.vue","../src/components/AgentScalar/AgentScalarButton.vue","../src/components/AgentScalar/AgentScalarDrawer.vue","../src/components/AgentScalar/AgentScalarDrawer.vue","../src/helpers/upload-temp-document.ts","../src/components/AgentScalar/OpenMCPButton.vue","../src/components/AgentScalar/OpenMCPButton.vue","../src/features/developer-tools/components/ApiReferenceToolbarPopover.vue","../src/features/developer-tools/components/ApiReferenceToolbarPopover.vue","../src/features/developer-tools/components/ApiReferenceToolbarTitle.vue","../src/features/developer-tools/components/ApiReferenceToolbarTitle.vue","../src/features/developer-tools/components/ApiReferenceToolbarBlurb.vue","../src/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue","../src/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue","../src/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue","../src/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue","../src/features/developer-tools/components/DeployApiReference.vue","../src/features/developer-tools/components/DeployApiReference.vue","../src/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue","../src/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue","../src/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue","../src/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue","../src/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue","../src/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue","../src/features/developer-tools/components/ModifyConfiguration.vue","../src/features/developer-tools/components/ModifyConfiguration.vue","../src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue","../src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue","../src/features/developer-tools/components/ShareApiReference.vue","../src/features/developer-tools/components/ShareApiReference.vue","../src/features/developer-tools/DeveloperTools.vue","../src/features/developer-tools/DeveloperTools.vue","../src/components/ApiReference.vue","../src/components/ApiReference.vue","../src/components/GettingStarted.vue","../src/components/GettingStarted.vue","../src/standalone/lib/html-api.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconSparkle } from '@scalar/icons'\n\nimport { useAgentContext } from '@/hooks/use-agent'\n\nconst agentContext = useAgentContext()\n</script>\n\n<template>\n <button\n class=\"bg-sidebar-b-search text-sidebar-c-2 hover:text-sidebar-c-1 flex items-center gap-1.5 rounded border px-2 text-base whitespace-nowrap\"\n type=\"button\"\n @click=\"agentContext?.toggleAgent()\">\n <ScalarIconSparkle />\n Ask AI\n </button>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarIconSparkle } from '@scalar/icons'\n\nimport { useAgentContext } from '@/hooks/use-agent'\n\nconst agentContext = useAgentContext()\n</script>\n\n<template>\n <button\n class=\"bg-sidebar-b-search text-sidebar-c-2 hover:text-sidebar-c-1 flex items-center gap-1.5 rounded border px-2 text-base whitespace-nowrap\"\n type=\"button\"\n @click=\"agentContext?.toggleAgent()\">\n <ScalarIconSparkle />\n Ask AI\n </button>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarIconX } from '@scalar/icons'\nimport { defineAsyncComponent } from 'vue'\n\nimport '@scalar/agent-chat/style.css'\n\nimport { ScalarIconButton } from '@scalar/components'\nimport type { ApiReferenceConfigurationWithSource } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport { useAgentContext } from '@/hooks/use-agent'\n\ndefineProps<{\n agentScalarConfiguration: ApiReferenceConfigurationWithSource['agent']\n workspaceStore: WorkspaceStore\n eventBus: WorkspaceEventBus\n}>()\n\nconst agentContext = useAgentContext()\n\nconst AgentScalarChatInterface = defineAsyncComponent(\n async () => import('./AgentScalarChatInterface.vue'),\n)\n</script>\n\n<template>\n <Transition\n enterActiveClass=\"transition-opacity duration-500\"\n enterFromClass=\"opacity-0\"\n enterToClass=\"opacity-100\"\n leaveActiveClass=\"transition-opacity duration-200\"\n leaveFromClass=\"opacity-100\"\n leaveToClass=\"opacity-0\">\n <div\n v-show=\"agentContext?.showAgent.value\"\n class=\"agent-scalar-overlay bg-backdrop fixed inset-0 z-10 ease-[cubic-bezier(0.77,0,0.175,1)]\"\n @click=\"agentContext?.closeAgent()\" />\n </Transition>\n <Transition\n enterActiveClass=\"transition-transform duration-300\"\n enterFromClass=\"-translate-x-full\"\n enterToClass=\"translate-x-0\"\n leaveActiveClass=\"transition-transform duration-200\"\n leaveFromClass=\"translate-x-0\"\n leaveToClass=\"-translate-x-full\">\n <div\n v-show=\"agentContext?.showAgent.value\"\n class=\"agent-scalar left-w-sidebar bg-b-1 fixed inset-y-0 right-12 z-10 grid border-r shadow-lg\"\n @keydown.escape=\"agentContext?.closeAgent()\">\n <div\n class=\"agent-scalar-container custom-scroll custom-scroll-self-contain-overflow overflow-auto px-6\">\n <AgentScalarChatInterface\n :agentScalarConfiguration\n :prefilledMessage=\"agentContext?.prefilledMessage\"\n :workspaceStore />\n </div>\n <ScalarIconButton\n class=\"agent-scalar-exit-button absolute top-2 right-2\"\n :icon=\"ScalarIconX\"\n label=\"Close Client\"\n weight=\"bold\"\n @click=\"agentContext?.closeAgent()\" />\n </div>\n </Transition>\n</template>\n\n<style scoped>\n@reference \"../../style.css\";\n\n@media (max-width: 1000px) {\n .agent-scalar.agent-scalar {\n @apply inset-x-0 top-12 rounded-t-lg;\n }\n .agent-scalar.agent-scalar,\n .agent-scalar-overlay.agent-scalar-overlay {\n @apply z-15;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarIconX } from '@scalar/icons'\nimport { defineAsyncComponent } from 'vue'\n\nimport '@scalar/agent-chat/style.css'\n\nimport { ScalarIconButton } from '@scalar/components'\nimport type { ApiReferenceConfigurationWithSource } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport { useAgentContext } from '@/hooks/use-agent'\n\ndefineProps<{\n agentScalarConfiguration: ApiReferenceConfigurationWithSource['agent']\n workspaceStore: WorkspaceStore\n eventBus: WorkspaceEventBus\n}>()\n\nconst agentContext = useAgentContext()\n\nconst AgentScalarChatInterface = defineAsyncComponent(\n async () => import('./AgentScalarChatInterface.vue'),\n)\n</script>\n\n<template>\n <Transition\n enterActiveClass=\"transition-opacity duration-500\"\n enterFromClass=\"opacity-0\"\n enterToClass=\"opacity-100\"\n leaveActiveClass=\"transition-opacity duration-200\"\n leaveFromClass=\"opacity-100\"\n leaveToClass=\"opacity-0\">\n <div\n v-show=\"agentContext?.showAgent.value\"\n class=\"agent-scalar-overlay bg-backdrop fixed inset-0 z-10 ease-[cubic-bezier(0.77,0,0.175,1)]\"\n @click=\"agentContext?.closeAgent()\" />\n </Transition>\n <Transition\n enterActiveClass=\"transition-transform duration-300\"\n enterFromClass=\"-translate-x-full\"\n enterToClass=\"translate-x-0\"\n leaveActiveClass=\"transition-transform duration-200\"\n leaveFromClass=\"translate-x-0\"\n leaveToClass=\"-translate-x-full\">\n <div\n v-show=\"agentContext?.showAgent.value\"\n class=\"agent-scalar left-w-sidebar bg-b-1 fixed inset-y-0 right-12 z-10 grid border-r shadow-lg\"\n @keydown.escape=\"agentContext?.closeAgent()\">\n <div\n class=\"agent-scalar-container custom-scroll custom-scroll-self-contain-overflow overflow-auto px-6\">\n <AgentScalarChatInterface\n :agentScalarConfiguration\n :prefilledMessage=\"agentContext?.prefilledMessage\"\n :workspaceStore />\n </div>\n <ScalarIconButton\n class=\"agent-scalar-exit-button absolute top-2 right-2\"\n :icon=\"ScalarIconX\"\n label=\"Close Client\"\n weight=\"bold\"\n @click=\"agentContext?.closeAgent()\" />\n </div>\n </Transition>\n</template>\n\n<style scoped>\n@reference \"../../style.css\";\n\n@media (max-width: 1000px) {\n .agent-scalar.agent-scalar {\n @apply inset-x-0 top-12 rounded-t-lg;\n }\n .agent-scalar.agent-scalar,\n .agent-scalar-overlay.agent-scalar-overlay {\n @apply z-15;\n }\n}\n</style>\n","import { redirectToProxy } from '@scalar/helpers/url/redirect-to-proxy'\n\nimport { PROXY_URL, UPLOAD_TEMP_API_URL } from '@/consts/urls'\n\n/** Type guard for the response body */\nfunction isResponseBody(data: unknown): data is { url: string } {\n return !!data && typeof data === 'object' && 'url' in data && typeof (data as any).url === 'string'\n}\n\n/** Upload a document and return a temporary URL */\nexport async function uploadTempDocument(document: string): Promise<string> {\n const body = JSON.stringify({ document })\n\n // Proxy the request to avoid localhost CORS issues\n const response = await fetch(redirectToProxy(PROXY_URL, UPLOAD_TEMP_API_URL), {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body,\n })\n\n if (!response.ok) {\n throw new Error(` Failed to generate temporary link, server responded with ${response.status}`)\n }\n const data = (await response.json()) as unknown\n\n if (!isResponseBody(data)) {\n throw new Error('Failed to generate temporary link, invalid response from server')\n }\n\n return data.url\n}\n","<script setup lang=\"ts\">\nimport { useLoadingState } from '@scalar/components'\nimport { ScalarIconArrowUpRight } from '@scalar/icons'\nimport { isValidUrl } from '@scalar/oas-utils/helpers'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { nextTick } from 'vue'\n\nimport { DASHBOARD_REGISTER_URL } from '@/consts/urls'\nimport { uploadTempDocument } from '@/helpers/upload-temp-document'\n\nconst props = defineProps<{\n config?: {\n name?: string\n url?: string\n }\n url?: string\n workspace: WorkspaceStore\n}>()\n\nconst { copyToClipboard } = useClipboard()\n\nconst { toast } = useToasts()\n\nconst loader = useLoadingState()\n\nconst hasConfig = props.config?.name || props.config?.url\n\nconst encoded = btoa(JSON.stringify(props.config ?? {}))\n\nconst name = encodeURIComponent(props.config?.name ?? '')\nconst cursorLink = `cursor://anysphere.cursor-deeplink/mcp/install?name=${name}&config=${encoded}`\nconst vscodeLink = `vscode:mcp/install?${encodeURIComponent(JSON.stringify(props.config ?? {}))}`\n\nconst docUrl = defineModel<string>('url')\n\n/** Generate and open the registration link */\nasync function generateRegisterLink() {\n if (loader.isLoading || !props.workspace) {\n return\n }\n\n // If we have already have a document URL that is valid\n if (docUrl.value && isValidUrl(docUrl.value)) {\n openRegisterLink(docUrl.value)\n return\n }\n\n loader.start()\n\n const document = props.workspace.exportActiveDocument('json')\n\n if (!document) {\n toast('Unable to export active document', 'error')\n await loader.invalidate()\n return\n }\n\n try {\n docUrl.value = await uploadTempDocument(document)\n await loader.validate()\n openRegisterLink(docUrl.value)\n\n await nextTick()\n\n await loader.clear()\n } catch (error) {\n const message =\n error instanceof Error ? error.message : 'An unknown error occurred'\n toast(message, 'error')\n await loader.invalidate()\n }\n}\n\n/** Open the registration link in a new tab */\nfunction openRegisterLink(docUrl: string) {\n const url = new URL(DASHBOARD_REGISTER_URL)\n url.searchParams.set('url', docUrl)\n url.searchParams.set('createMcp', 'true')\n\n window.open(url.toString(), '_blank')\n}\n</script>\n\n<template>\n <div class=\"scalar-mcp-layer\">\n <a\n class=\"scalar-mcp-layer-link\"\n :href=\"hasConfig ? vscodeLink : undefined\"\n :target=\"hasConfig ? '_blank' : undefined\"\n @click=\"\n (e) => {\n if (!hasConfig) {\n e.preventDefault()\n generateRegisterLink()\n }\n }\n \">\n <svg\n class=\"mcp-logo\"\n fill=\"currentColor\"\n height=\"800\"\n viewBox=\"0 0 32 32\"\n width=\"800\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M30.865 3.448 24.282.281a1.99 1.99 0 0 0-2.276.385L9.397 12.171 3.902 8.004a1.33 1.33 0 0 0-1.703.073L.439 9.681a1.33 1.33 0 0 0-.005 1.969L5.2 15.999.434 20.348a1.33 1.33 0 0 0 .005 1.969l1.76 1.604a1.33 1.33 0 0 0 1.703.073l5.495-4.172 12.615 11.51a1.98 1.98 0 0 0 2.271.385l6.589-3.172a1.99 1.99 0 0 0 1.13-1.802V5.248c0-.766-.443-1.469-1.135-1.802zm-6.86 19.818L14.432 16l9.573-7.266z\" />\n </svg>\n VS Code\n <ScalarIconArrowUpRight class=\"mcp-nav ml-auto size-4\" />\n </a>\n <a\n class=\"scalar-mcp-layer-link\"\n :href=\"hasConfig ? cursorLink : undefined\"\n :target=\"hasConfig ? '_blank' : undefined\"\n @click=\"\n (e) => {\n if (!hasConfig) {\n e.preventDefault()\n generateRegisterLink()\n }\n }\n \">\n <svg\n class=\"mcp-logo\"\n viewBox=\"0 0 466.73 532.09\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M457.43 125.94 244.42 2.96a22.13 22.13 0 0 0-22.12 0L9.3 125.94C3.55 129.26 0 135.4 0 142.05v247.99c0 6.65 3.55 12.79 9.3 16.11l213.01 122.98a22.13 22.13 0 0 0 22.12 0l213.01-122.98c5.75-3.32 9.3-9.46 9.3-16.11V142.05c0-6.65-3.55-12.79-9.3-16.11zm-13.38 26.05L238.42 508.15c-1.39 2.4-5.06 1.42-5.06-1.36V273.58c0-4.66-2.49-8.97-6.53-11.31L24.87 145.67c-2.4-1.39-1.42-5.06 1.36-5.06h411.26c5.84 0 9.49 6.33 6.57 11.39h-.01Z\"\n style=\"fill: currentColor\" />\n </svg>\n Cursor\n <ScalarIconArrowUpRight class=\"mcp-nav ml-auto size-4\" />\n </a>\n <!-- localhost + you don't have a MCP added -->\n <div\n v-if=\"!hasConfig\"\n class=\"scalar-mcp-layer-link\"\n @click=\"generateRegisterLink\">\n <svg\n class=\"mcp-logo\"\n fill=\"none\"\n height=\"173\"\n viewBox=\"0 0 156 173\"\n width=\"156\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"m6 80.912 67.882-67.883c9.373-9.372 24.569-9.372 33.941 0s9.373 24.569 0 33.942L56.558 98.236\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-width=\"12\" />\n <path\n d=\"m57.265 97.529 50.558-50.558c9.373-9.373 24.569-9.373 33.942 0l.353.353c9.373 9.373 9.373 24.569 0 33.941L80.725 142.66a8 8 0 0 0 0 11.313l12.606 12.607\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-width=\"12\" />\n <path\n d=\"M90.853 30 40.648 80.205c-9.372 9.372-9.372 24.568 0 33.941 9.373 9.372 24.569 9.372 33.941 0l50.205-50.205\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-width=\"12\" />\n </svg>\n Generate MCP\n <ScalarIconArrowUpRight class=\"mcp-nav ml-auto size-4\" />\n </div>\n <!-- you do have an MCP added -->\n <div\n v-else\n class=\"scalar-mcp-layer-link\"\n @click=\"copyToClipboard(config?.url ?? '')\">\n Connect MCP\n <svg\n class=\"mcp-logo ml-auto\"\n fill=\"none\"\n height=\"173\"\n viewBox=\"0 0 156 173\"\n width=\"156\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"m6 80.912 67.882-67.883c9.373-9.372 24.569-9.372 33.941 0s9.373 24.569 0 33.942L56.558 98.236\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-width=\"12\" />\n <path\n d=\"m57.265 97.529 50.558-50.558c9.373-9.373 24.569-9.373 33.942 0l.353.353c9.373 9.373 9.373 24.569 0 33.941L80.725 142.66a8 8 0 0 0 0 11.313l12.606 12.607\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-width=\"12\" />\n <path\n d=\"M90.853 30 40.648 80.205c-9.372 9.372-9.372 24.568 0 33.941 9.373 9.372 24.569 9.372 33.941 0l50.205-50.205\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-width=\"12\" />\n </svg>\n </div>\n </div>\n</template>\n\n<style scoped>\n.scalar-mcp-layer {\n gap: 2px;\n display: flex;\n flex-direction: column;\n background: transparent;\n position: relative;\n justify-content: flex-end;\n transition: all 0.4s ease-in-out;\n height: 32px;\n}\n.scalar-mcp-layer:hover {\n height: 172px;\n}\n.scalar-mcp-layer-link:hover {\n cursor: pointer !important;\n}\n.scalar-mcp-layer .scalar-mcp-layer-link {\n cursor: pointer;\n width: 100%;\n padding: 9px 6px;\n height: 31px;\n display: block;\n text-align: center;\n display: flex;\n align-items: center;\n white-space: nowrap;\n font-size: var(--scalar-small);\n line-height: 1.385;\n text-decoration: none;\n border-radius: var(--scalar-radius);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n gap: 6px;\n color: var(--scalar-sidebar-color-1);\n background: var(--scalar-background-1);\n transition: transform 0.2s ease-in-out;\n position: absolute;\n bottom: 0;\n}\n/* increase click area for gap */\n.scalar-mcp-layer-link:after {\n content: '';\n position: absolute;\n bottom: -2px;\n height: 2px;\n width: 100%;\n left: 0;\n}\n.scalar-mcp-layer div.scalar-mcp-layer-link {\n cursor: default;\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:nth-last-child(1) {\n transform: translate3d(0, 0, 0);\n position: relative;\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:nth-last-child(2) {\n transform: translate3d(0, -2px, 0) scale(0.99);\n}\n.scalar-mcp-layer:hover a:nth-last-child(2) {\n transform: translate3d(0, calc(-100% - 2px), 0) scale(0.99);\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:nth-last-child(3) {\n transform: translate3d(0, -4px, 0) scale(0.98);\n}\n.scalar-mcp-layer:hover a:nth-last-child(3) {\n transform: translate3d(0, calc(-200% - 4px), 0) scale(1);\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:nth-last-child(4) {\n transform: translate3d(0, -6px, 0) scale(0.97);\n}\n.scalar-mcp-layer:hover a:nth-last-child(4) {\n transform: translate3d(0, calc(-300% - 6px), 0) scale(1);\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:nth-last-child(5) {\n transform: translate3d(0, -8px, 0) scale(0.96);\n}\n.scalar-mcp-layer:hover .scalar-mcp-layer-link:nth-last-child(5) {\n transform: translate3d(0, calc(-400% - 8px), 0) scale(1);\n}\n.scalar-mcp-layer:hover .scalar-mcp-layer-link {\n transition: transform 0.2s ease-in-out 0.1s;\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:hover {\n background: var(--scalar-background-2);\n}\n.scalar-mcp-layer .mcp-logo {\n width: 16px;\n height: 16px;\n color: var(--scalar-sidebar-color-1);\n}\n.mcp-nav {\n color: var(--scalar-sidebar-color-2);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useLoadingState } from '@scalar/components'\nimport { ScalarIconArrowUpRight } from '@scalar/icons'\nimport { isValidUrl } from '@scalar/oas-utils/helpers'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { nextTick } from 'vue'\n\nimport { DASHBOARD_REGISTER_URL } from '@/consts/urls'\nimport { uploadTempDocument } from '@/helpers/upload-temp-document'\n\nconst props = defineProps<{\n config?: {\n name?: string\n url?: string\n }\n url?: string\n workspace: WorkspaceStore\n}>()\n\nconst { copyToClipboard } = useClipboard()\n\nconst { toast } = useToasts()\n\nconst loader = useLoadingState()\n\nconst hasConfig = props.config?.name || props.config?.url\n\nconst encoded = btoa(JSON.stringify(props.config ?? {}))\n\nconst name = encodeURIComponent(props.config?.name ?? '')\nconst cursorLink = `cursor://anysphere.cursor-deeplink/mcp/install?name=${name}&config=${encoded}`\nconst vscodeLink = `vscode:mcp/install?${encodeURIComponent(JSON.stringify(props.config ?? {}))}`\n\nconst docUrl = defineModel<string>('url')\n\n/** Generate and open the registration link */\nasync function generateRegisterLink() {\n if (loader.isLoading || !props.workspace) {\n return\n }\n\n // If we have already have a document URL that is valid\n if (docUrl.value && isValidUrl(docUrl.value)) {\n openRegisterLink(docUrl.value)\n return\n }\n\n loader.start()\n\n const document = props.workspace.exportActiveDocument('json')\n\n if (!document) {\n toast('Unable to export active document', 'error')\n await loader.invalidate()\n return\n }\n\n try {\n docUrl.value = await uploadTempDocument(document)\n await loader.validate()\n openRegisterLink(docUrl.value)\n\n await nextTick()\n\n await loader.clear()\n } catch (error) {\n const message =\n error instanceof Error ? error.message : 'An unknown error occurred'\n toast(message, 'error')\n await loader.invalidate()\n }\n}\n\n/** Open the registration link in a new tab */\nfunction openRegisterLink(docUrl: string) {\n const url = new URL(DASHBOARD_REGISTER_URL)\n url.searchParams.set('url', docUrl)\n url.searchParams.set('createMcp', 'true')\n\n window.open(url.toString(), '_blank')\n}\n</script>\n\n<template>\n <div class=\"scalar-mcp-layer\">\n <a\n class=\"scalar-mcp-layer-link\"\n :href=\"hasConfig ? vscodeLink : undefined\"\n :target=\"hasConfig ? '_blank' : undefined\"\n @click=\"\n (e) => {\n if (!hasConfig) {\n e.preventDefault()\n generateRegisterLink()\n }\n }\n \">\n <svg\n class=\"mcp-logo\"\n fill=\"currentColor\"\n height=\"800\"\n viewBox=\"0 0 32 32\"\n width=\"800\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M30.865 3.448 24.282.281a1.99 1.99 0 0 0-2.276.385L9.397 12.171 3.902 8.004a1.33 1.33 0 0 0-1.703.073L.439 9.681a1.33 1.33 0 0 0-.005 1.969L5.2 15.999.434 20.348a1.33 1.33 0 0 0 .005 1.969l1.76 1.604a1.33 1.33 0 0 0 1.703.073l5.495-4.172 12.615 11.51a1.98 1.98 0 0 0 2.271.385l6.589-3.172a1.99 1.99 0 0 0 1.13-1.802V5.248c0-.766-.443-1.469-1.135-1.802zm-6.86 19.818L14.432 16l9.573-7.266z\" />\n </svg>\n VS Code\n <ScalarIconArrowUpRight class=\"mcp-nav ml-auto size-4\" />\n </a>\n <a\n class=\"scalar-mcp-layer-link\"\n :href=\"hasConfig ? cursorLink : undefined\"\n :target=\"hasConfig ? '_blank' : undefined\"\n @click=\"\n (e) => {\n if (!hasConfig) {\n e.preventDefault()\n generateRegisterLink()\n }\n }\n \">\n <svg\n class=\"mcp-logo\"\n viewBox=\"0 0 466.73 532.09\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M457.43 125.94 244.42 2.96a22.13 22.13 0 0 0-22.12 0L9.3 125.94C3.55 129.26 0 135.4 0 142.05v247.99c0 6.65 3.55 12.79 9.3 16.11l213.01 122.98a22.13 22.13 0 0 0 22.12 0l213.01-122.98c5.75-3.32 9.3-9.46 9.3-16.11V142.05c0-6.65-3.55-12.79-9.3-16.11zm-13.38 26.05L238.42 508.15c-1.39 2.4-5.06 1.42-5.06-1.36V273.58c0-4.66-2.49-8.97-6.53-11.31L24.87 145.67c-2.4-1.39-1.42-5.06 1.36-5.06h411.26c5.84 0 9.49 6.33 6.57 11.39h-.01Z\"\n style=\"fill: currentColor\" />\n </svg>\n Cursor\n <ScalarIconArrowUpRight class=\"mcp-nav ml-auto size-4\" />\n </a>\n <!-- localhost + you don't have a MCP added -->\n <div\n v-if=\"!hasConfig\"\n class=\"scalar-mcp-layer-link\"\n @click=\"generateRegisterLink\">\n <svg\n class=\"mcp-logo\"\n fill=\"none\"\n height=\"173\"\n viewBox=\"0 0 156 173\"\n width=\"156\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"m6 80.912 67.882-67.883c9.373-9.372 24.569-9.372 33.941 0s9.373 24.569 0 33.942L56.558 98.236\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-width=\"12\" />\n <path\n d=\"m57.265 97.529 50.558-50.558c9.373-9.373 24.569-9.373 33.942 0l.353.353c9.373 9.373 9.373 24.569 0 33.941L80.725 142.66a8 8 0 0 0 0 11.313l12.606 12.607\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-width=\"12\" />\n <path\n d=\"M90.853 30 40.648 80.205c-9.372 9.372-9.372 24.568 0 33.941 9.373 9.372 24.569 9.372 33.941 0l50.205-50.205\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-width=\"12\" />\n </svg>\n Generate MCP\n <ScalarIconArrowUpRight class=\"mcp-nav ml-auto size-4\" />\n </div>\n <!-- you do have an MCP added -->\n <div\n v-else\n class=\"scalar-mcp-layer-link\"\n @click=\"copyToClipboard(config?.url ?? '')\">\n Connect MCP\n <svg\n class=\"mcp-logo ml-auto\"\n fill=\"none\"\n height=\"173\"\n viewBox=\"0 0 156 173\"\n width=\"156\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"m6 80.912 67.882-67.883c9.373-9.372 24.569-9.372 33.941 0s9.373 24.569 0 33.942L56.558 98.236\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-width=\"12\" />\n <path\n d=\"m57.265 97.529 50.558-50.558c9.373-9.373 24.569-9.373 33.942 0l.353.353c9.373 9.373 9.373 24.569 0 33.941L80.725 142.66a8 8 0 0 0 0 11.313l12.606 12.607\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-width=\"12\" />\n <path\n d=\"M90.853 30 40.648 80.205c-9.372 9.372-9.372 24.568 0 33.941 9.373 9.372 24.569 9.372 33.941 0l50.205-50.205\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-width=\"12\" />\n </svg>\n </div>\n </div>\n</template>\n\n<style scoped>\n.scalar-mcp-layer {\n gap: 2px;\n display: flex;\n flex-direction: column;\n background: transparent;\n position: relative;\n justify-content: flex-end;\n transition: all 0.4s ease-in-out;\n height: 32px;\n}\n.scalar-mcp-layer:hover {\n height: 172px;\n}\n.scalar-mcp-layer-link:hover {\n cursor: pointer !important;\n}\n.scalar-mcp-layer .scalar-mcp-layer-link {\n cursor: pointer;\n width: 100%;\n padding: 9px 6px;\n height: 31px;\n display: block;\n text-align: center;\n display: flex;\n align-items: center;\n white-space: nowrap;\n font-size: var(--scalar-small);\n line-height: 1.385;\n text-decoration: none;\n border-radius: var(--scalar-radius);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n gap: 6px;\n color: var(--scalar-sidebar-color-1);\n background: var(--scalar-background-1);\n transition: transform 0.2s ease-in-out;\n position: absolute;\n bottom: 0;\n}\n/* increase click area for gap */\n.scalar-mcp-layer-link:after {\n content: '';\n position: absolute;\n bottom: -2px;\n height: 2px;\n width: 100%;\n left: 0;\n}\n.scalar-mcp-layer div.scalar-mcp-layer-link {\n cursor: default;\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:nth-last-child(1) {\n transform: translate3d(0, 0, 0);\n position: relative;\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:nth-last-child(2) {\n transform: translate3d(0, -2px, 0) scale(0.99);\n}\n.scalar-mcp-layer:hover a:nth-last-child(2) {\n transform: translate3d(0, calc(-100% - 2px), 0) scale(0.99);\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:nth-last-child(3) {\n transform: translate3d(0, -4px, 0) scale(0.98);\n}\n.scalar-mcp-layer:hover a:nth-last-child(3) {\n transform: translate3d(0, calc(-200% - 4px), 0) scale(1);\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:nth-last-child(4) {\n transform: translate3d(0, -6px, 0) scale(0.97);\n}\n.scalar-mcp-layer:hover a:nth-last-child(4) {\n transform: translate3d(0, calc(-300% - 6px), 0) scale(1);\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:nth-last-child(5) {\n transform: translate3d(0, -8px, 0) scale(0.96);\n}\n.scalar-mcp-layer:hover .scalar-mcp-layer-link:nth-last-child(5) {\n transform: translate3d(0, calc(-400% - 8px), 0) scale(1);\n}\n.scalar-mcp-layer:hover .scalar-mcp-layer-link {\n transition: transform 0.2s ease-in-out 0.1s;\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:hover {\n background: var(--scalar-background-2);\n}\n.scalar-mcp-layer .mcp-logo {\n width: 16px;\n height: 16px;\n color: var(--scalar-sidebar-color-1);\n}\n.mcp-nav {\n color: var(--scalar-sidebar-color-2);\n}\n</style>\n","<script lang=\"ts\" setup>\nimport { ScalarFloatingBackdrop, ScalarPopover } from '@scalar/components'\nimport { ScalarIconCaretDown, ScalarIconInfo } from '@scalar/icons'\n</script>\n\n<template>\n <ScalarPopover\n class=\"max-h-[inherit] max-w-[inherit] p-0 text-base\"\n placement=\"bottom-end\"\n teleport>\n <template #default=\"{ open }\">\n <slot\n name=\"button\"\n :open>\n <button\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n type=\"button\">\n <slot name=\"label\" />\n <ScalarIconCaretDown\n class=\"size-3\"\n :class=\"{ 'rotate-180': open }\" />\n </button>\n </slot>\n </template>\n <template #popover=\"props\">\n <div class=\"custom-scroll bg-b-1 flex flex-col gap-7 rounded-lg p-7 pb-6\">\n <slot v-bind=\"props\" />\n </div>\n <div class=\"text-c-2 flex items-center justify-center gap-1 p-2 text-sm\">\n <ScalarIconInfo class=\"size-3.5 shrink-0\" />\n <div>\n <slot name=\"info\">\n \"<slot name=\"label\" />\" will only appear when running on localhost.\n </slot>\n </div>\n </div>\n </template>\n <template #backdrop>\n <ScalarFloatingBackdrop class=\"bg-b-2 rounded-lg\" />\n </template>\n </ScalarPopover>\n</template>\n","<script lang=\"ts\" setup>\nimport { ScalarFloatingBackdrop, ScalarPopover } from '@scalar/components'\nimport { ScalarIconCaretDown, ScalarIconInfo } from '@scalar/icons'\n</script>\n\n<template>\n <ScalarPopover\n class=\"max-h-[inherit] max-w-[inherit] p-0 text-base\"\n placement=\"bottom-end\"\n teleport>\n <template #default=\"{ open }\">\n <slot\n name=\"button\"\n :open>\n <button\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n type=\"button\">\n <slot name=\"label\" />\n <ScalarIconCaretDown\n class=\"size-3\"\n :class=\"{ 'rotate-180': open }\" />\n </button>\n </slot>\n </template>\n <template #popover=\"props\">\n <div class=\"custom-scroll bg-b-1 flex flex-col gap-7 rounded-lg p-7 pb-6\">\n <slot v-bind=\"props\" />\n </div>\n <div class=\"text-c-2 flex items-center justify-center gap-1 p-2 text-sm\">\n <ScalarIconInfo class=\"size-3.5 shrink-0\" />\n <div>\n <slot name=\"info\">\n \"<slot name=\"label\" />\" will only appear when running on localhost.\n </slot>\n </div>\n </div>\n </template>\n <template #backdrop>\n <ScalarFloatingBackdrop class=\"bg-b-2 rounded-lg\" />\n </template>\n </ScalarPopover>\n</template>\n","<script lang=\"ts\" setup>\nimport { ScalarIconButton } from '@scalar/components'\nimport { ScalarIconCopy, ScalarIconInfo } from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst CONFIG_SETTING = 'showDeveloperTools: \"never\"'\n\nconst { copyToClipboard } = useClipboard()\n</script>\n<template>\n <ApiReferenceToolbarPopover\n class=\"w-120\"\n placement=\"bottom-start\">\n <template #button>\n <button\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 ml-auto flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n type=\"button\">\n <ScalarIconInfo />\n Developer Tools\n </button>\n </template>\n <div class=\"-m-2 flex flex-col gap-2 leading-relaxed\">\n <div>\n The developer tools allow you to customize the appearance and behavior\n of your documentation. You can also share your documentation using the\n Scalar Registry.\n </div>\n <div>\n To disable the toolbar, set\n <div\n class=\"bg-b-2 inline-flex items-center gap-0.5 rounded border px-1 py-0.5 text-sm\">\n <code class=\"font-code\">{{ CONFIG_SETTING }}</code>\n <ScalarIconButton\n class=\"-m-1 p-1.25\"\n :icon=\"ScalarIconCopy\"\n label=\"Copy link to clipboard\"\n size=\"sm\"\n @click=\"copyToClipboard(CONFIG_SETTING)\" />\n </div>\n in your configuration.\n </div>\n </div>\n <template #info>\n The developer tools will only appear when running on localhost.\n </template>\n </ApiReferenceToolbarPopover>\n</template>\n","<script lang=\"ts\" setup>\nimport { ScalarIconButton } from '@scalar/components'\nimport { ScalarIconCopy, ScalarIconInfo } from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst CONFIG_SETTING = 'showDeveloperTools: \"never\"'\n\nconst { copyToClipboard } = useClipboard()\n</script>\n<template>\n <ApiReferenceToolbarPopover\n class=\"w-120\"\n placement=\"bottom-start\">\n <template #button>\n <button\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 ml-auto flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n type=\"button\">\n <ScalarIconInfo />\n Developer Tools\n </button>\n </template>\n <div class=\"-m-2 flex flex-col gap-2 leading-relaxed\">\n <div>\n The developer tools allow you to customize the appearance and behavior\n of your documentation. You can also share your documentation using the\n Scalar Registry.\n </div>\n <div>\n To disable the toolbar, set\n <div\n class=\"bg-b-2 inline-flex items-center gap-0.5 rounded border px-1 py-0.5 text-sm\">\n <code class=\"font-code\">{{ CONFIG_SETTING }}</code>\n <ScalarIconButton\n class=\"-m-1 p-1.25\"\n :icon=\"ScalarIconCopy\"\n label=\"Copy link to clipboard\"\n size=\"sm\"\n @click=\"copyToClipboard(CONFIG_SETTING)\" />\n </div>\n in your configuration.\n </div>\n </div>\n <template #info>\n The developer tools will only appear when running on localhost.\n </template>\n </ApiReferenceToolbarPopover>\n</template>\n","<script setup lang=\"ts\"></script>\n<template>\n <p\n class=\"text-c-3 [&_code]:font-code [&_a:hover]:text-c-1 text-center leading-normal [&_a]:underline\">\n <slot />\n </p>\n</template>\n","<script lang=\"ts\" setup>\nimport { ScalarButton, useLoadingState } from '@scalar/components'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { nextTick } from 'vue'\n\nimport { DASHBOARD_REGISTER_URL } from '@/consts/urls'\nimport { uploadTempDocument } from '@/helpers/upload-temp-document'\n\nconst { sdks = [], workspace } = defineProps<{\n workspace: WorkspaceStore\n sdks?: string[]\n}>()\n\nconst tempDocUrl = defineModel<string>('url')\n\nconst { toast } = useToasts()\nconst loader = useLoadingState()\n\n/** Open the registration link in a new tab */\nfunction openRegisterLink(docUrl: string) {\n const url = new URL(DASHBOARD_REGISTER_URL)\n url.searchParams.set('url', docUrl)\n sdks.forEach((sdk) => url.searchParams.append('sdk', sdk))\n\n window.open(url.toString(), '_blank')\n}\n\n/** Generate and open the registration link */\nasync function generateRegisterLink() {\n if (loader.isLoading || !workspace) {\n return\n }\n\n // If we have already have a temporary document URL, use it\n if (tempDocUrl.value) {\n openRegisterLink(tempDocUrl.value)\n return\n }\n\n loader.start()\n\n const document = workspace.exportActiveDocument('json')\n\n if (!document) {\n toast('Unable to export active document', 'error')\n await loader.invalidate()\n return\n }\n\n try {\n tempDocUrl.value = await uploadTempDocument(document)\n await loader.validate()\n openRegisterLink(tempDocUrl.value)\n\n await nextTick()\n\n await loader.clear()\n } catch (error) {\n const message =\n error instanceof Error ? error.message : 'An unknown error occurred'\n toast(message, 'error')\n await loader.invalidate()\n }\n}\n</script>\n<template>\n <ScalarButton\n class=\"h-auto p-2.5\"\n :loader\n @click=\"generateRegisterLink\">\n <slot>Generate</slot>\n </ScalarButton>\n</template>\n","<script lang=\"ts\" setup>\nimport { ScalarButton, useLoadingState } from '@scalar/components'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { nextTick } from 'vue'\n\nimport { DASHBOARD_REGISTER_URL } from '@/consts/urls'\nimport { uploadTempDocument } from '@/helpers/upload-temp-document'\n\nconst { sdks = [], workspace } = defineProps<{\n workspace: WorkspaceStore\n sdks?: string[]\n}>()\n\nconst tempDocUrl = defineModel<string>('url')\n\nconst { toast } = useToasts()\nconst loader = useLoadingState()\n\n/** Open the registration link in a new tab */\nfunction openRegisterLink(docUrl: string) {\n const url = new URL(DASHBOARD_REGISTER_URL)\n url.searchParams.set('url', docUrl)\n sdks.forEach((sdk) => url.searchParams.append('sdk', sdk))\n\n window.open(url.toString(), '_blank')\n}\n\n/** Generate and open the registration link */\nasync function generateRegisterLink() {\n if (loader.isLoading || !workspace) {\n return\n }\n\n // If we have already have a temporary document URL, use it\n if (tempDocUrl.value) {\n openRegisterLink(tempDocUrl.value)\n return\n }\n\n loader.start()\n\n const document = workspace.exportActiveDocument('json')\n\n if (!document) {\n toast('Unable to export active document', 'error')\n await loader.invalidate()\n return\n }\n\n try {\n tempDocUrl.value = await uploadTempDocument(document)\n await loader.validate()\n openRegisterLink(tempDocUrl.value)\n\n await nextTick()\n\n await loader.clear()\n } catch (error) {\n const message =\n error instanceof Error ? error.message : 'An unknown error occurred'\n toast(message, 'error')\n await loader.invalidate()\n }\n}\n</script>\n<template>\n <ScalarButton\n class=\"h-auto p-2.5\"\n :loader\n @click=\"generateRegisterLink\">\n <slot>Generate</slot>\n </ScalarButton>\n</template>\n","<script lang=\"ts\" setup>\nimport {\n ScalarIconBookOpen,\n ScalarIconBracketsCurly,\n ScalarIconCloud,\n ScalarIconFileMd,\n ScalarIconGitBranch,\n ScalarIconGlobeSimple,\n ScalarIconLockSimple,\n ScalarIconWarningOctagon,\n} from '@scalar/icons'\nimport { type ScalarIconComponent } from '@scalar/icons/types'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarBlurb from './ApiReferenceToolbarBlurb.vue'\nimport ApiReferenceToolbarRegisterButton from './ApiReferenceToolbarRegisterButton.vue'\n\nconst { workspace } = defineProps<{\n workspace: WorkspaceStore\n}>()\n\nconst FEATURES = [\n { icon: ScalarIconLockSimple, label: 'Password Protection' },\n { icon: ScalarIconGlobeSimple, label: 'Custom Domains' },\n { icon: ScalarIconBookOpen, label: 'Free-form content' },\n { icon: ScalarIconCloud, label: 'CDN Infrastructure' },\n { icon: ScalarIconGitBranch, label: 'Pull from GitHub' },\n { icon: ScalarIconFileMd, label: 'Markdown/MDX' },\n { icon: ScalarIconWarningOctagon, label: 'Spectral Linting' },\n { icon: ScalarIconBracketsCurly, label: 'JSON Schema Hosting' },\n] as const satisfies ReadonlyArray<{\n icon: ScalarIconComponent\n label: string\n}>\n</script>\n<template>\n <ul class=\"text-c-2 mb-2 grid grid-cols-2 gap-2.5 font-medium\">\n <li\n v-for=\"feature in FEATURES\"\n :key=\"feature.label\"\n class=\"flex items-center gap-2\">\n <component\n :is=\"feature.icon\"\n class=\"text-c-3 size-3.5\"\n weight=\"bold\" />\n {{ feature.label }}\n </li>\n </ul>\n <ApiReferenceToolbarRegisterButton :workspace>\n Deploy on Scalar\n </ApiReferenceToolbarRegisterButton>\n <ApiReferenceToolbarBlurb>\n Deploy your documentation for free. <br />\n Additional features might require\n <a\n href=\"https://scalar.com/products/docs/getting-started\"\n target=\"_blank\"\n >Scalar Pro</a\n >.\n </ApiReferenceToolbarBlurb>\n</template>\n","<script lang=\"ts\" setup>\nimport {\n ScalarIconBookOpen,\n ScalarIconBracketsCurly,\n ScalarIconCloud,\n ScalarIconFileMd,\n ScalarIconGitBranch,\n ScalarIconGlobeSimple,\n ScalarIconLockSimple,\n ScalarIconWarningOctagon,\n} from '@scalar/icons'\nimport { type ScalarIconComponent } from '@scalar/icons/types'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarBlurb from './ApiReferenceToolbarBlurb.vue'\nimport ApiReferenceToolbarRegisterButton from './ApiReferenceToolbarRegisterButton.vue'\n\nconst { workspace } = defineProps<{\n workspace: WorkspaceStore\n}>()\n\nconst FEATURES = [\n { icon: ScalarIconLockSimple, label: 'Password Protection' },\n { icon: ScalarIconGlobeSimple, label: 'Custom Domains' },\n { icon: ScalarIconBookOpen, label: 'Free-form content' },\n { icon: ScalarIconCloud, label: 'CDN Infrastructure' },\n { icon: ScalarIconGitBranch, label: 'Pull from GitHub' },\n { icon: ScalarIconFileMd, label: 'Markdown/MDX' },\n { icon: ScalarIconWarningOctagon, label: 'Spectral Linting' },\n { icon: ScalarIconBracketsCurly, label: 'JSON Schema Hosting' },\n] as const satisfies ReadonlyArray<{\n icon: ScalarIconComponent\n label: string\n}>\n</script>\n<template>\n <ul class=\"text-c-2 mb-2 grid grid-cols-2 gap-2.5 font-medium\">\n <li\n v-for=\"feature in FEATURES\"\n :key=\"feature.label\"\n class=\"flex items-center gap-2\">\n <component\n :is=\"feature.icon\"\n class=\"text-c-3 size-3.5\"\n weight=\"bold\" />\n {{ feature.label }}\n </li>\n </ul>\n <ApiReferenceToolbarRegisterButton :workspace>\n Deploy on Scalar\n </ApiReferenceToolbarRegisterButton>\n <ApiReferenceToolbarBlurb>\n Deploy your documentation for free. <br />\n Additional features might require\n <a\n href=\"https://scalar.com/products/docs/getting-started\"\n target=\"_blank\"\n >Scalar Pro</a\n >.\n </ApiReferenceToolbarBlurb>\n</template>\n","<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareRegister from './ApiReferenceToolbarShareRegister.vue'\n\nconst { workspace } = defineProps<{\n workspace: WorkspaceStore\n}>()\n</script>\n\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Deploy</template>\n <ScalarFormSection>\n <template #label>Scalar Docs</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Deploy your documentation on Scalar, the modern documentation platform\n for your API and everything else.\n </p>\n <ApiReferenceToolbarShareRegister :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n","<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareRegister from './ApiReferenceToolbarShareRegister.vue'\n\nconst { workspace } = defineProps<{\n workspace: WorkspaceStore\n}>()\n</script>\n\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Deploy</template>\n <ScalarFormSection>\n <template #label>Scalar Docs</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Deploy your documentation on Scalar, the modern documentation platform\n for your API and everything else.\n </p>\n <ApiReferenceToolbarShareRegister :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n","<script lang=\"ts\" setup>\nimport {\n ScalarCheckboxRadioGroup,\n type ScalarCheckboxOption,\n} from '@scalar/components'\nimport { computed } from 'vue'\n\nconst ModernOption = { label: 'Modern', value: 'modern' } as const\nconst ClassicOption = { label: 'Classic', value: 'classic' } as const\n\nconst options = [\n ModernOption,\n ClassicOption,\n] as const satisfies ScalarCheckboxOption[]\n\nconst model = defineModel<'modern' | 'classic'>()\n\nconst selected = computed<(typeof options)[number]>({\n get: () => (model.value === 'modern' ? ModernOption : ClassicOption),\n set: (option) => (model.value = option.value),\n})\n</script>\n<template>\n <ScalarCheckboxRadioGroup\n v-model=\"selected\"\n :options />\n</template>\n","<script lang=\"ts\" setup>\nimport {\n ScalarCheckboxRadioGroup,\n type ScalarCheckboxOption,\n} from '@scalar/components'\nimport { computed } from 'vue'\n\nconst ModernOption = { label: 'Modern', value: 'modern' } as const\nconst ClassicOption = { label: 'Classic', value: 'classic' } as const\n\nconst options = [\n ModernOption,\n ClassicOption,\n] as const satisfies ScalarCheckboxOption[]\n\nconst model = defineModel<'modern' | 'classic'>()\n\nconst selected = computed<(typeof options)[number]>({\n get: () => (model.value === 'modern' ? ModernOption : ClassicOption),\n set: (option) => (model.value = option.value),\n})\n</script>\n<template>\n <ScalarCheckboxRadioGroup\n v-model=\"selected\"\n :options />\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarFormInputGroup, ScalarToggleInput } from '@scalar/components'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\n\ntype LayoutOptions = {\n showSidebar?: boolean\n defaultOpenFirstTag?: boolean\n defaultOpenAllTags?: boolean\n expandAllModelSections?: boolean\n expandAllResponses?: boolean\n hideClientButton?: boolean\n hideDarkModeToggle?: boolean\n hideModels?: boolean\n hideSearch?: boolean\n hideTestRequestButton?: boolean\n showOperationId?: boolean\n}\n\nconst { configuration } = defineProps<{\n configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst model = defineModel<LayoutOptions>({\n default: {},\n})\n\nfunction getValue(key: keyof LayoutOptions, defaultValue: boolean = false) {\n return model.value[key] ?? configuration?.[key] ?? defaultValue\n}\n\nfunction setValue(\n key: keyof LayoutOptions,\n value: boolean,\n defaultValue: boolean = false,\n) {\n if (value !== defaultValue) {\n model.value = { ...model.value, [key]: value }\n } else {\n model.value = Object.fromEntries(\n Object.entries(model.value).filter(([k]) => key !== k),\n )\n }\n}\n</script>\n<template>\n <ScalarFormInputGroup>\n <ScalarToggleInput\n :modelValue=\"getValue('showSidebar', true)\"\n @update:modelValue=\"(v) => setValue('showSidebar', !!v, true)\">\n Show Sidebar\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('defaultOpenFirstTag', true)\"\n @update:modelValue=\"(v) => setValue('defaultOpenFirstTag', !!v, true)\">\n Default Open First Tag\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('defaultOpenAllTags')\"\n @update:modelValue=\"(v) => setValue('defaultOpenAllTags', !!v)\">\n Default Open All Tags\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('expandAllModelSections')\"\n @update:modelValue=\"(v) => setValue('expandAllModelSections', !!v)\">\n Expand All Model Sections\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('expandAllResponses')\"\n @update:modelValue=\"(v) => setValue('expandAllResponses', !!v)\">\n Expand All Responses\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideClientButton')\"\n @update:modelValue=\"(v) => setValue('hideClientButton', !!v)\">\n Hide Client Button\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideDarkModeToggle')\"\n @update:modelValue=\"(v) => setValue('hideDarkModeToggle', !!v)\">\n Hide Dark Mode Toggle\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideModels')\"\n @update:modelValue=\"(v) => setValue('hideModels', !!v)\">\n Hide Models\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideSearch')\"\n @update:modelValue=\"(v) => setValue('hideSearch', !!v)\">\n Hide Search\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('showOperationId')\"\n @update:modelValue=\"(v) => setValue('showOperationId', !!v)\">\n Show Operation ID\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideTestRequestButton')\"\n @update:modelValue=\"(v) => setValue('hideTestRequestButton', !!v)\">\n Hide Test Request Button\n </ScalarToggleInput>\n </ScalarFormInputGroup>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarFormInputGroup, ScalarToggleInput } from '@scalar/components'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\n\ntype LayoutOptions = {\n showSidebar?: boolean\n defaultOpenFirstTag?: boolean\n defaultOpenAllTags?: boolean\n expandAllModelSections?: boolean\n expandAllResponses?: boolean\n hideClientButton?: boolean\n hideDarkModeToggle?: boolean\n hideModels?: boolean\n hideSearch?: boolean\n hideTestRequestButton?: boolean\n showOperationId?: boolean\n}\n\nconst { configuration } = defineProps<{\n configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst model = defineModel<LayoutOptions>({\n default: {},\n})\n\nfunction getValue(key: keyof LayoutOptions, defaultValue: boolean = false) {\n return model.value[key] ?? configuration?.[key] ?? defaultValue\n}\n\nfunction setValue(\n key: keyof LayoutOptions,\n value: boolean,\n defaultValue: boolean = false,\n) {\n if (value !== defaultValue) {\n model.value = { ...model.value, [key]: value }\n } else {\n model.value = Object.fromEntries(\n Object.entries(model.value).filter(([k]) => key !== k),\n )\n }\n}\n</script>\n<template>\n <ScalarFormInputGroup>\n <ScalarToggleInput\n :modelValue=\"getValue('showSidebar', true)\"\n @update:modelValue=\"(v) => setValue('showSidebar', !!v, true)\">\n Show Sidebar\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('defaultOpenFirstTag', true)\"\n @update:modelValue=\"(v) => setValue('defaultOpenFirstTag', !!v, true)\">\n Default Open First Tag\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('defaultOpenAllTags')\"\n @update:modelValue=\"(v) => setValue('defaultOpenAllTags', !!v)\">\n Default Open All Tags\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('expandAllModelSections')\"\n @update:modelValue=\"(v) => setValue('expandAllModelSections', !!v)\">\n Expand All Model Sections\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('expandAllResponses')\"\n @update:modelValue=\"(v) => setValue('expandAllResponses', !!v)\">\n Expand All Responses\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideClientButton')\"\n @update:modelValue=\"(v) => setValue('hideClientButton', !!v)\">\n Hide Client Button\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideDarkModeToggle')\"\n @update:modelValue=\"(v) => setValue('hideDarkModeToggle', !!v)\">\n Hide Dark Mode Toggle\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideModels')\"\n @update:modelValue=\"(v) => setValue('hideModels', !!v)\">\n Hide Models\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideSearch')\"\n @update:modelValue=\"(v) => setValue('hideSearch', !!v)\">\n Hide Search\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('showOperationId')\"\n @update:modelValue=\"(v) => setValue('showOperationId', !!v)\">\n Show Operation ID\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideTestRequestButton')\"\n @update:modelValue=\"(v) => setValue('hideTestRequestButton', !!v)\">\n Hide Test Request Button\n </ScalarToggleInput>\n </ScalarFormInputGroup>\n</template>\n","<script lang=\"ts\" setup>\nimport {\n ScalarCombobox,\n ScalarFormInput,\n ScalarListboxCheckbox,\n ScalarThemeSwatches,\n} from '@scalar/components'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport { presets, themeIds, themeLabels, type ThemeId } from '@scalar/themes'\nimport { computed } from 'vue'\n\ntype ThemeOption = {\n id: Exclude<ThemeId, 'none'>\n label: string\n css: string\n}\n\nconst model = defineModel<ThemeId>()\n\nconst options = computed<ThemeOption[]>(() =>\n themeIds\n .filter((id) => id !== 'none')\n .map((id) => ({\n id,\n label: themeLabels[id],\n css: presets[id].theme,\n })),\n)\nconst selected = computed<ThemeOption>({\n get: () => {\n const theme = model.value ?? 'default'\n return (\n options.value.find((o) => o.id === theme) ??\n (options.value[0] as ThemeOption)\n )\n },\n set: (option) => (model.value = option.id),\n})\n</script>\n<template>\n <ScalarCombobox\n v-model=\"selected\"\n :options\n resize>\n <template #default=\"{ open }\">\n <ScalarFormInput>\n <div class=\"min-w-0 flex-1 truncate text-left\">\n {{ selected.label }}\n </div>\n <ScalarThemeSwatches\n class=\"mr-2\"\n :css=\"selected.css\" />\n <ScalarIconCaretDown\n class=\"size-3.5 transition-transform\"\n :class=\"{ 'rotate-180': open }\" />\n </ScalarFormInput>\n </template>\n <template #option=\"{ selected, option }\">\n <ScalarListboxCheckbox :selected />\n <span class=\"text-c-1 inline-block min-w-0 flex-1 truncate\">\n {{ option.label }}\n </span>\n <ScalarThemeSwatches :css=\"option.css\" />\n </template>\n </ScalarCombobox>\n</template>\n","<script lang=\"ts\" setup>\nimport {\n ScalarCombobox,\n ScalarFormInput,\n ScalarListboxCheckbox,\n ScalarThemeSwatches,\n} from '@scalar/components'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport { presets, themeIds, themeLabels, type ThemeId } from '@scalar/themes'\nimport { computed } from 'vue'\n\ntype ThemeOption = {\n id: Exclude<ThemeId, 'none'>\n label: string\n css: string\n}\n\nconst model = defineModel<ThemeId>()\n\nconst options = computed<ThemeOption[]>(() =>\n themeIds\n .filter((id) => id !== 'none')\n .map((id) => ({\n id,\n label: themeLabels[id],\n css: presets[id].theme,\n })),\n)\nconst selected = computed<ThemeOption>({\n get: () => {\n const theme = model.value ?? 'default'\n return (\n options.value.find((o) => o.id === theme) ??\n (options.value[0] as ThemeOption)\n )\n },\n set: (option) => (model.value = option.id),\n})\n</script>\n<template>\n <ScalarCombobox\n v-model=\"selected\"\n :options\n resize>\n <template #default=\"{ open }\">\n <ScalarFormInput>\n <div class=\"min-w-0 flex-1 truncate text-left\">\n {{ selected.label }}\n </div>\n <ScalarThemeSwatches\n class=\"mr-2\"\n :css=\"selected.css\" />\n <ScalarIconCaretDown\n class=\"size-3.5 transition-transform\"\n :class=\"{ 'rotate-180': open }\" />\n </ScalarFormInput>\n </template>\n <template #option=\"{ selected, option }\">\n <ScalarListboxCheckbox :selected />\n <span class=\"text-c-1 inline-block min-w-0 flex-1 truncate\">\n {{ option.label }}\n </span>\n <ScalarThemeSwatches :css=\"option.css\" />\n </template>\n </ScalarCombobox>\n</template>\n","<script lang=\"ts\" setup>\nimport {\n ScalarCodeBlock,\n ScalarFormField,\n ScalarFormSection,\n} from '@scalar/components'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { type ThemeId } from '@scalar/themes'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { computed } from 'vue'\n\nimport ApiReferenceToolbarConfigLayout from './ApiReferenceToolbarConfigLayout.vue'\nimport ApiReferenceToolbarConfigLayoutOptions from './ApiReferenceToolbarConfigLayoutOptions.vue'\nimport ApiReferenceToolbarConfigTheme from './ApiReferenceToolbarConfigTheme.vue'\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst { configuration } = defineProps<{\n configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst overrides = defineModel<Partial<ApiReferenceConfiguration>>('overrides')\n\nconst snippet = computed<string>(() => {\n return prettyPrintJson({\n ...overrides.value, // Make sure the overrides are first\n ...configuration,\n ...overrides.value, // But also that they override the configuration\n })\n})\n\nconst theme = computed<ThemeId>({\n get: () => overrides.value?.theme ?? configuration?.theme ?? 'default',\n set: (t) => (overrides.value = { ...overrides.value, theme: t }),\n})\n\nconst layout = computed<'modern' | 'classic'>({\n get: () => overrides.value?.layout ?? configuration?.layout ?? 'modern',\n set: (l) => (overrides.value = { ...overrides.value, layout: l }),\n})\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Configure</template>\n <ScalarFormSection>\n <template #label>Scalar Configuration</template>\n <ScalarCodeBlock\n class=\"bg-b-1.5 flex max-h-40 flex-col rounded border text-sm\"\n :content=\"snippet\"\n lang=\"json\" />\n </ScalarFormSection>\n <div class=\"flex flex-col gap-4\">\n <ScalarFormField>\n <template #label>Theme</template>\n <ApiReferenceToolbarConfigTheme v-model=\"theme\" />\n </ScalarFormField>\n <ScalarFormField>\n <template #label>Layout</template>\n <ApiReferenceToolbarConfigLayout v-model=\"layout\" />\n </ScalarFormField>\n <ScalarFormField is=\"div\">\n <template #label>Layout Options</template>\n <ApiReferenceToolbarConfigLayoutOptions\n v-model=\"overrides\"\n :configuration />\n </ScalarFormField>\n </div>\n </ApiReferenceToolbarPopover>\n</template>\n","<script lang=\"ts\" setup>\nimport {\n ScalarCodeBlock,\n ScalarFormField,\n ScalarFormSection,\n} from '@scalar/components'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { type ThemeId } from '@scalar/themes'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { computed } from 'vue'\n\nimport ApiReferenceToolbarConfigLayout from './ApiReferenceToolbarConfigLayout.vue'\nimport ApiReferenceToolbarConfigLayoutOptions from './ApiReferenceToolbarConfigLayoutOptions.vue'\nimport ApiReferenceToolbarConfigTheme from './ApiReferenceToolbarConfigTheme.vue'\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst { configuration } = defineProps<{\n configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst overrides = defineModel<Partial<ApiReferenceConfiguration>>('overrides')\n\nconst snippet = computed<string>(() => {\n return prettyPrintJson({\n ...overrides.value, // Make sure the overrides are first\n ...configuration,\n ...overrides.value, // But also that they override the configuration\n })\n})\n\nconst theme = computed<ThemeId>({\n get: () => overrides.value?.theme ?? configuration?.theme ?? 'default',\n set: (t) => (overrides.value = { ...overrides.value, theme: t }),\n})\n\nconst layout = computed<'modern' | 'classic'>({\n get: () => overrides.value?.layout ?? configuration?.layout ?? 'modern',\n set: (l) => (overrides.value = { ...overrides.value, layout: l }),\n})\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Configure</template>\n <ScalarFormSection>\n <template #label>Scalar Configuration</template>\n <ScalarCodeBlock\n class=\"bg-b-1.5 flex max-h-40 flex-col rounded border text-sm\"\n :content=\"snippet\"\n lang=\"json\" />\n </ScalarFormSection>\n <div class=\"flex flex-col gap-4\">\n <ScalarFormField>\n <template #label>Theme</template>\n <ApiReferenceToolbarConfigTheme v-model=\"theme\" />\n </ScalarFormField>\n <ScalarFormField>\n <template #label>Layout</template>\n <ApiReferenceToolbarConfigLayout v-model=\"layout\" />\n </ScalarFormField>\n <ScalarFormField is=\"div\">\n <template #label>Layout Options</template>\n <ApiReferenceToolbarConfigLayoutOptions\n v-model=\"overrides\"\n :configuration />\n </ScalarFormField>\n </div>\n </ApiReferenceToolbarPopover>\n</template>\n","<script lang=\"ts\" setup>\nimport {\n ScalarButton,\n ScalarTextInputCopy,\n useLoadingState,\n} from '@scalar/components'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport { REGISTRY_SHARE_URL } from '@/consts/urls'\nimport { uploadTempDocument } from '@/helpers/upload-temp-document'\n\nimport ApiReferenceToolbarBlurb from './ApiReferenceToolbarBlurb.vue'\n\nconst { workspace } = defineProps<{\n workspace: WorkspaceStore\n}>()\n\nconst { toast } = useToasts()\nconst loader = useLoadingState()\n\nconst tempDocUrl = defineModel<string>('url')\n\nasync function generateTemporaryLink() {\n if (loader.isLoading || !workspace || !!tempDocUrl.value) {\n return\n }\n\n loader.start()\n\n const document = workspace.exportActiveDocument('json')\n\n if (!document) {\n toast('Unable to export active document', 'error')\n await loader.invalidate()\n return\n }\n\n try {\n const url = await uploadTempDocument(document)\n await loader.validate({ duration: 900, persist: true }) // Wait to show the success state\n tempDocUrl.value = url\n } catch (error) {\n const message =\n error instanceof Error ? error.message : 'An unknown error occurred'\n toast(message, 'error')\n await loader.invalidate()\n }\n}\n</script>\n<template>\n <template v-if=\"tempDocUrl\">\n <ScalarTextInputCopy\n immediate\n :modelValue=\"tempDocUrl\"\n name=\"temporary-link\"\n :placeholder=\"`${REGISTRY_SHARE_URL}/apis/…`\">\n </ScalarTextInputCopy>\n </template>\n <template v-else>\n <ScalarButton\n class=\"h-auto p-2.5\"\n :loader\n variant=\"gradient\"\n @click=\"generateTemporaryLink\">\n Upload Document\n </ScalarButton>\n </template>\n <ApiReferenceToolbarBlurb class=\"-mt-1\">\n Your document will automatically be deleted after 7 days.\n </ApiReferenceToolbarBlurb>\n</template>\n","<script lang=\"ts\" setup>\nimport {\n ScalarButton,\n ScalarTextInputCopy,\n useLoadingState,\n} from '@scalar/components'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport { REGISTRY_SHARE_URL } from '@/consts/urls'\nimport { uploadTempDocument } from '@/helpers/upload-temp-document'\n\nimport ApiReferenceToolbarBlurb from './ApiReferenceToolbarBlurb.vue'\n\nconst { workspace } = defineProps<{\n workspace: WorkspaceStore\n}>()\n\nconst { toast } = useToasts()\nconst loader = useLoadingState()\n\nconst tempDocUrl = defineModel<string>('url')\n\nasync function generateTemporaryLink() {\n if (loader.isLoading || !workspace || !!tempDocUrl.value) {\n return\n }\n\n loader.start()\n\n const document = workspace.exportActiveDocument('json')\n\n if (!document) {\n toast('Unable to export active document', 'error')\n await loader.invalidate()\n return\n }\n\n try {\n const url = await uploadTempDocument(document)\n await loader.validate({ duration: 900, persist: true }) // Wait to show the success state\n tempDocUrl.value = url\n } catch (error) {\n const message =\n error instanceof Error ? error.message : 'An unknown error occurred'\n toast(message, 'error')\n await loader.invalidate()\n }\n}\n</script>\n<template>\n <template v-if=\"tempDocUrl\">\n <ScalarTextInputCopy\n immediate\n :modelValue=\"tempDocUrl\"\n name=\"temporary-link\"\n :placeholder=\"`${REGISTRY_SHARE_URL}/apis/…`\">\n </ScalarTextInputCopy>\n </template>\n <template v-else>\n <ScalarButton\n class=\"h-auto p-2.5\"\n :loader\n variant=\"gradient\"\n @click=\"generateTemporaryLink\">\n Upload Document\n </ScalarButton>\n </template>\n <ApiReferenceToolbarBlurb class=\"-mt-1\">\n Your document will automatically be deleted after 7 days.\n </ApiReferenceToolbarBlurb>\n</template>\n","<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareTemporary from './ApiReferenceToolbarShareTemporary.vue'\n\nconst { workspace } = defineProps<{\n workspace: WorkspaceStore\n}>()\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Share</template>\n <ScalarFormSection>\n <template #label>Share your API Reference</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Upload your OpenAPI document to share your API Reference with others. As\n easy as pressing a button.\n </p>\n <ApiReferenceToolbarShareTemporary :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n","<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareTemporary from './ApiReferenceToolbarShareTemporary.vue'\n\nconst { workspace } = defineProps<{\n workspace: WorkspaceStore\n}>()\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Share</template>\n <ScalarFormSection>\n <template #label>Share your API Reference</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Upload your OpenAPI document to share your API Reference with others. As\n easy as pressing a button.\n </p>\n <ApiReferenceToolbarShareTemporary :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n","<script lang=\"ts\" setup>\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { computed } from 'vue'\n\nimport ApiReferenceToolbarTitle from './components/ApiReferenceToolbarTitle.vue'\nimport DeployApiReference from './components/DeployApiReference.vue'\nimport ModifyConfiguration from './components/ModifyConfiguration.vue'\nimport ShareApiReference from './components/ShareApiReference.vue'\n\nconst { configuration } = defineProps<{\n workspace?: WorkspaceStore\n configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst overrides = defineModel<Partial<ApiReferenceConfiguration>>('overrides')\n\nconst showDeveloperTools = computed<boolean>(() => {\n if (configuration?.showDeveloperTools === 'always') {\n return true\n }\n\n if (configuration?.showDeveloperTools === 'never') {\n return false\n }\n\n if (typeof window === 'undefined') {\n return false\n }\n\n return isLocalUrl(window.location.href)\n})\n</script>\n<template>\n <header\n v-if=\"showDeveloperTools\"\n aria-label=\"Developer Tools\"\n class=\"api-reference-toolbar bg-b-1 relative z-1 flex h-10 justify-center border-b px-15\">\n <div\n class=\"-mx-2 flex max-w-(--refs-content-max-width) flex-1 items-center\">\n <div class=\"flex flex-1 items-center\">\n <ApiReferenceToolbarTitle />\n </div>\n <ModifyConfiguration\n v-model:overrides=\"overrides\"\n :configuration />\n <template v-if=\"workspace\">\n <ShareApiReference :workspace />\n <DeployApiReference :workspace />\n </template>\n </div>\n </header>\n</template>\n","<script lang=\"ts\" setup>\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { computed } from 'vue'\n\nimport ApiReferenceToolbarTitle from './components/ApiReferenceToolbarTitle.vue'\nimport DeployApiReference from './components/DeployApiReference.vue'\nimport ModifyConfiguration from './components/ModifyConfiguration.vue'\nimport ShareApiReference from './components/ShareApiReference.vue'\n\nconst { configuration } = defineProps<{\n workspace?: WorkspaceStore\n configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst overrides = defineModel<Partial<ApiReferenceConfiguration>>('overrides')\n\nconst showDeveloperTools = computed<boolean>(() => {\n if (configuration?.showDeveloperTools === 'always') {\n return true\n }\n\n if (configuration?.showDeveloperTools === 'never') {\n return false\n }\n\n if (typeof window === 'undefined') {\n return false\n }\n\n return isLocalUrl(window.location.href)\n})\n</script>\n<template>\n <header\n v-if=\"showDeveloperTools\"\n aria-label=\"Developer Tools\"\n class=\"api-reference-toolbar bg-b-1 relative z-1 flex h-10 justify-center border-b px-15\">\n <div\n class=\"-mx-2 flex max-w-(--refs-content-max-width) flex-1 items-center\">\n <div class=\"flex flex-1 items-center\">\n <ApiReferenceToolbarTitle />\n </div>\n <ModifyConfiguration\n v-model:overrides=\"overrides\"\n :configuration />\n <template v-if=\"workspace\">\n <ShareApiReference :workspace />\n <DeployApiReference :workspace />\n </template>\n </div>\n </header>\n</template>\n","<script setup lang=\"ts\">\nimport { provideUseId } from '@headlessui/vue'\nimport { OpenApiClientButton } from '@scalar/api-client/components'\nimport {\n createApiClientModal,\n type ApiClientModal,\n} from '@scalar/api-client/v2/features/modal'\nimport { getActiveEnvironment, getServers } from '@scalar/api-client/v2/helpers'\nimport {\n addScalarClassesToHeadless,\n ScalarColorModeToggleButton,\n ScalarColorModeToggleIcon,\n ScalarSidebarFooter,\n} from '@scalar/components'\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport {\n createSidebarState,\n ScalarSidebar,\n scrollSidebarToTop,\n} from '@scalar/sidebar'\nimport { getThemeStyles, hasObtrusiveScrollbars } from '@scalar/themes'\nimport {\n apiReferenceConfigurationSchema,\n type AnyApiReferenceConfiguration,\n type ApiReferenceConfiguration,\n type ApiReferenceConfigurationRaw,\n} from '@scalar/types/api-reference'\nimport { useBreakpoints } from '@scalar/use-hooks/useBreakpoints'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { useColorMode } from '@scalar/use-hooks/useColorMode'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport { createWorkspaceStore } from '@scalar/workspace-store/client'\nimport { createWorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n TraversedEntry,\n TraversedTag,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { useScrollLock } from '@vueuse/core'\nimport diff from 'microdiff'\nimport {\n computed,\n onBeforeMount,\n onBeforeUnmount,\n onMounted,\n onServerPrefetch,\n provide,\n ref,\n useId,\n useTemplateRef,\n watch,\n} from 'vue'\n\nimport {\n AgentScalarButton,\n AgentScalarDrawer,\n OpenMCPButton,\n} from '@/components/AgentScalar'\nimport ClassicHeader from '@/components/ClassicHeader.vue'\nimport Content from '@/components/Content/Content.vue'\nimport MobileHeader from '@/components/MobileHeader.vue'\nimport { DeveloperTools } from '@/features/developer-tools'\nimport DocumentSelector from '@/features/multiple-documents/DocumentSelector.vue'\nimport SearchButton from '@/features/Search/components/SearchButton.vue'\nimport { getSystemModePreference } from '@/helpers/color-mode'\nimport { downloadDocument } from '@/helpers/download'\nimport {\n getIdFromUrl,\n makeUrlFromId,\n matchesBasePath,\n} from '@/helpers/id-routing'\nimport {\n scrollToLazy as _scrollToLazy,\n addToPriorityQueue,\n blockIntersection,\n intersectionEnabled,\n} from '@/helpers/lazy-bus'\nimport {\n loadAuthFromStorage,\n loadClientFromStorage,\n} from '@/helpers/load-from-perssistance'\nimport { mapConfigPlugins } from '@/helpers/map-config-plugins'\nimport { mapConfigToWorkspaceStore } from '@/helpers/map-config-to-workspace-store'\nimport {\n normalizeConfigurations,\n type NormalizedConfiguration,\n} from '@/helpers/normalize-configurations'\nimport { AGENT_CONTEXT_SYMBOL, useAgent } from '@/hooks/use-agent'\nimport { useIntersection } from '@/hooks/use-intersection'\nimport { createPluginManager, PLUGIN_MANAGER_SYMBOL } from '@/plugins'\nimport { persistencePlugin } from '@/plugins/persistance-plugin'\n\nconst props = defineProps<{\n /**\n * Configuration for the API reference.\n * Can be a single configuration or an array of configurations for multiple documents.\n */\n configuration?: AnyApiReferenceConfiguration\n}>()\n\ndefineSlots<{\n 'content-start'?(): { breadcrumb: string }\n 'content-end'?(): { breadcrumb: string }\n 'sidebar-start'?(): { breadcrumb: string }\n 'sidebar-end'?(): { breadcrumb: string }\n 'editor-placeholder'?(): { breadcrumb: string }\n footer?(): { breadcrumb: string }\n}>()\n\nconst { mediaQueries } = useBreakpoints()\nconst { copyToClipboard } = useClipboard()\n\n/**\n * Used to inject the environment into built packages\n *\n * Primary use case is the open-in-client button\n */\nconst isDevelopment = import.meta.env.DEV\n\nconst obtrusiveScrollbars = computed(hasObtrusiveScrollbars)\n\nconst eventBus = createWorkspaceEventBus({ debug: isDevelopment })\nconst isSidebarOpen = ref(false)\n\nwatch(\n () => mediaQueries?.lg?.value,\n (newValue, oldValue) => {\n // Close the drawer when we go from desktop to mobile\n if (oldValue && !newValue) {\n isSidebarOpen.value = false\n }\n },\n)\n\n/**\n * Due to a bug in headless UI, we need to set an ID here that can be shared across server/client\n * TODO remove this once the bug is fixed\n *\n * @see https://github.com/tailwindlabs/headlessui/issues/2979\n */\nprovideUseId(() => useId())\n\n// ---------------------------------------------------------------------------\n/**\n * Configuration Handling\n *\n * We will normalize the configurations and store them in a computed property.\n * The active configuration will be associated with the active document.\n */\nconst configList = computed(() => normalizeConfigurations(props.configuration))\n\nconst isMultiDocument = computed(() => Object.keys(configList.value).length > 1)\n\n/** Search for the source with a default attribute or use the first one */\nconst activeSlug = ref<string>(\n Object.values(configList.value).find((c) => c.default)?.slug ??\n configList.value[Object.keys(configList.value)?.[0] ?? '']?.slug ??\n '',\n)\n\n/**\n * On initial page load we need to determine if there is a valid document slug in the URL\n *\n * If there is we set the active slug to the document slug\n */\nif (typeof window !== 'undefined') {\n const url = new URL(window.location.href)\n\n // To handle legacy query parameter multi-document support we redirect\n // to the new path routing format\n const apiParam = url.searchParams.get('api')\n if (apiParam && configList.value[apiParam]) {\n activeSlug.value = apiParam\n const idFromUrl = getIdFromUrl(\n url,\n configList.value[apiParam].config.pathRouting?.basePath,\n apiParam,\n )\n const newUrl = makeUrlFromId(\n idFromUrl,\n configList.value[apiParam].config.pathRouting?.basePath,\n isMultiDocument.value,\n )\n if (newUrl) {\n newUrl.searchParams.delete('api')\n window.history.replaceState({}, '', newUrl.toString())\n }\n }\n\n /**\n * For path routing on initial load we do not know which basePath to check for\n * we need to search the configs to see if any of the base paths match the URL\n * and then use that basePath to get the initial id\n *\n * With this approach we cannot support multi-document mode with one of configs having\n * an empty basePath\n *\n * Other conflicts are possible.\n */\n const basePaths = Object.values(configList.value).map(\n (c) => c.config.pathRouting?.basePath,\n )\n\n const initialId = getIdFromUrl(\n url,\n basePaths.find((p) => (p ? matchesBasePath(url, p) : false)),\n isMultiDocument.value ? undefined : activeSlug.value,\n )\n const documentSlug = initialId.split('/')[0]\n\n if (documentSlug && configList.value[documentSlug]) {\n activeSlug.value = documentSlug\n }\n}\n\n/** Computed document options list for the selector logic */\nconst documentOptionList = computed(() =>\n Object.values(configList.value).map((c) => ({\n label: c.title,\n id: c.slug,\n })),\n)\n\n/** Configuration overrides to apply to the selected document (from the localhost toolbar) */\nconst configurationOverrides = ref<\n Partial<Omit<ApiReferenceConfiguration, 'slug' | 'title' | ''>>\n>({})\n\n/** Any dev toolbar modifications are merged with the active configuration */\nconst mergedConfig = computed<ApiReferenceConfigurationRaw>(() => ({\n // Provides a default set of values when the lookup fails\n ...apiReferenceConfigurationSchema.parse({}),\n // The active configuration based on the slug\n ...configList.value[activeSlug.value]?.config,\n // Any overrides from the localhost toolbar\n ...configurationOverrides.value,\n}))\n\n/** Convenience break out var to determine which routing mode we are using */\nconst basePath = computed(() => mergedConfig.value.pathRouting?.basePath)\n\nconst themeStyle = computed(() =>\n getThemeStyles(mergedConfig.value.theme, {\n fonts: mergedConfig.value.withDefaultFonts,\n }),\n)\n\n/** Plugin injection is not reactive. All plugins must be provided at first render */\nprovide(\n PLUGIN_MANAGER_SYMBOL,\n createPluginManager({\n plugins: Object.values(configList.value).flatMap(\n (c) => c.config.plugins ?? [],\n ),\n }),\n)\n// ---------------------------------------------------------------------------\n/** Navigation State Handling */\n\n// Front-end redirect\nif (mergedConfig.value.redirect && typeof window !== 'undefined') {\n const newPath = mergedConfig.value.redirect(\n (mergedConfig.value.pathRouting ? window.location.pathname : '') +\n window.location.hash,\n )\n if (newPath) {\n window.history.replaceState({}, '', newPath)\n }\n}\n\n/**\n * Sets the active slug and updates the URL with the selected document slug\n *\n * If an element ID is passed in we will configure the path or hash routing\n */\nfunction syncSlugAndUrlWithDocument(\n slug: string,\n elementId: string | undefined,\n config: ApiReferenceConfigurationRaw,\n) {\n // We create a new URL and go to the root element if an ID is not provided\n const url = makeUrlFromId(\n elementId || slug,\n config.pathRouting?.basePath,\n isMultiDocument.value,\n )\n\n if (url) {\n window.history.replaceState({}, '', url.toString())\n }\n\n // Update the active slug\n activeSlug.value = slug\n}\n\n// ---------------------------------------------------------------------------\n/** Workspace Store Initialization */\n\n/**\n * Initializes the new client workspace store.\n */\nconst workspaceStore = createWorkspaceStore({\n verbose: isDevelopment,\n plugins: [\n persistencePlugin({\n prefix: () => activeSlug.value,\n persistAuth: () => mergedConfig.value.persistAuth ?? false,\n }),\n ],\n})\n\n// TODO: persistence should be hoisted into standalone\n// Client side integrations will want to handle dark mode externally\nconst { toggleColorMode, isDarkMode } = useColorMode({\n initialColorMode: {\n true: 'dark' as const,\n false: 'light' as const,\n undefined: 'system' as const,\n }[String(mergedConfig.value.darkMode)],\n overrideColorMode: mergedConfig.value.forceDarkModeState,\n})\n\n/**\n * Create top level sidebar entries for each document\n * This allows sharing a single sidebar state for across the workspace\n */\nconst itemsFromWorkspace = computed<TraversedEntry[]>(() => {\n return Object.entries(workspaceStore.workspace.documents).map(\n ([slug, document]) => ({\n id: slug,\n type: 'document',\n description: document.info.description,\n name: document.info.title ?? slug,\n title: document.info.title ?? slug,\n children: document?.['x-scalar-navigation']?.children ?? [],\n }),\n )\n})\n\n/** Initialize the sidebar */\nconst sidebarState = createSidebarState<TraversedEntry>(itemsFromWorkspace, {\n hooks: {},\n})\n\n/** Recursively set all children of the given items to open */\nconst setChildrenOpen = (items: TraversedEntry[]): void => {\n items.forEach((item) => {\n if (item.type === 'tag' || item.type === 'models') {\n sidebarState.setExpanded(item.id, true)\n }\n if ('children' in item && item.children) {\n setChildrenOpen(item.children)\n }\n })\n}\n\n/** We get the sub items for the sidebar based on the configuration/document slug */\nconst sidebarItems = computed<TraversedEntry[]>(() => {\n const config = mergedConfig.value\n\n if (!config) {\n return []\n }\n\n const docItems =\n sidebarState.items.value.find(\n (item): item is TraversedTag => item.id === activeSlug.value,\n )?.children ?? []\n\n // When the default open all tags configuration is enabled we open all the children of the document\n if (config.defaultOpenAllTags) {\n setChildrenOpen(docItems)\n }\n\n // When the expand all model sections configuration is enabled we open all the children of the models tag\n if (config.expandAllModelSections) {\n const models = docItems.find(\n (item): item is TraversedTag => item.type === 'models',\n )\n if (models) {\n sidebarState.setExpanded(models.id, true)\n models.children?.forEach((child) => {\n sidebarState.setExpanded(child.id, true)\n })\n }\n }\n\n return docItems\n})\n\n/** Find the sidebar entry that represents the introduction section */\nconst infoSectionId = computed(\n () =>\n sidebarItems.value.find(\n (item) => item.type === 'text' && item.title === 'Introduction',\n )?.id,\n)\n\n/** User for mobile navigation */\nconst breadcrumb = ref('')\n\nconst slotProps = computed(() => ({\n breadcrumb: breadcrumb.value,\n}))\n\nconst setBreadcrumb = (id: string) => {\n const item = sidebarState.getEntryById(id)\n\n if (!item || item.type === 'document') {\n breadcrumb.value = ''\n } else {\n breadcrumb.value = item.title\n }\n}\n\nconst scrollToLazyElement = (id: string) => {\n setBreadcrumb(id)\n sidebarState.setSelected(id)\n _scrollToLazy(id, sidebarState.setExpanded, sidebarState.getEntryById)\n}\n\n/** Maps some config values to the workspace store to keep it reactive */\nmapConfigToWorkspaceStore({\n config: () => mergedConfig.value,\n store: workspaceStore,\n isDarkMode,\n})\n\n/** Merged environment variables from workspace and document levels */\nconst environment = computed(() =>\n getActiveEnvironment(\n workspaceStore,\n workspaceStore.workspace.activeDocument ?? null,\n ),\n)\n\nif (typeof window !== 'undefined') {\n // @ts-expect-error - For debugging purposes expose the store\n window.dataDumpWorkspace = () => workspaceStore\n}\n\n// For testing\ndefineExpose({\n eventBus,\n workspaceStore,\n sidebarItems,\n})\n\n// ---------------------------------------------------------------------------\n// Document Management\n\n/**\n * Handle changing the active document\n *\n * 1. If the document has not be loaded to the workspace store we set it to empty and asynchronously load it\n * 2. If the document has been loaded to the workspace store we just set it to active\n * 3. If the content from the configuration has changes we need to update the document in the workspace store\n */\nconst changeSelectedDocument = async (\n slug: string,\n elementId?: string | undefined,\n) => {\n const normalized = configList.value[slug]\n\n if (!normalized) {\n console.warn(`Document ${slug} not found in configList`)\n return\n }\n\n const config = {\n ...normalized.config,\n ...configurationOverrides.value,\n }\n\n // Store `onDocumentSelect` result to await its execution later, before calling `onLoaded`\n const onDocumentSelectPromise = config.onDocumentSelect?.()\n\n // Set the active slug and update any routing\n syncSlugAndUrlWithDocument(slug, elementId, config)\n\n // Update the document on the route as well, the method and path don't matter as we update them before opening\n apiClient.value?.route({\n documentSlug: slug,\n method: 'get',\n path: '/',\n })\n\n const isFirstLoad = !workspaceStore.workspace.documents[slug]\n\n // If the document is not in the store, we asynchronously load it\n if (isFirstLoad) {\n const result = await workspaceStore.addDocument(\n normalized.source.url\n ? {\n name: slug,\n url: normalized.source.url,\n fetch: config.fetch,\n }\n : {\n name: slug,\n document: normalized.source.content ?? {},\n },\n config,\n )\n\n const document = workspaceStore.workspace.documents[slug]\n\n // If the document does not have a selected server we set it to the first server\n if (\n result === true &&\n document !== undefined &&\n document['x-scalar-selected-server'] === undefined\n ) {\n // Set the active server if the document is loaded successfully\n const servers = getServers(\n normalized.config.servers ?? document.servers,\n {\n baseServerUrl: mergedConfig.value.baseServerURL,\n documentUrl: normalized.source.url,\n },\n )\n if (servers.length > 0) {\n workspaceStore.updateDocument(\n slug,\n 'x-scalar-selected-server',\n servers[0]!.url,\n )\n }\n }\n }\n\n // Always set it to active; if the document is null we show a loading state\n workspaceStore.update('x-scalar-active-document', slug)\n\n // If the document has persistence enabled we load the auth schemes from storage\n if (config.persistAuth) {\n loadAuthFromStorage(workspaceStore, slug)\n }\n\n // ensure that `onLoaded` hook doesn't block execution but is executed after `onDocumentSelect`\n void (async () => {\n await onDocumentSelectPromise\n void config.onLoaded?.(slug)\n })()\n\n // When loading to a specified element we need to freeze and scroll\n if (elementId && elementId !== slug) {\n scrollToLazyElement(elementId)\n }\n // If there is no child element of the document specified and defaultOpenFirstTag is enabled, we expand the first tag\n else if (config.defaultOpenFirstTag) {\n const firstTag = sidebarItems.value.find((item) => item.type === 'tag')\n if (firstTag) {\n sidebarState.setExpanded(firstTag.id, true)\n }\n }\n}\n\n/**\n * TODO:Move this to a dedicated updateDocument function in the future and\n * away from vue-reactivity based updates\n */\nwatch(\n () => Object.values(configList.value),\n async (newConfigList, oldConfigList) => {\n /**\n * Handles replacing and updating documents within the workspace store\n * when we detect configuration changes.\n */\n const updateSource = async (\n updated: NormalizedConfiguration,\n previous: NormalizedConfiguration | undefined,\n ) => {\n /** If we have not loaded the document previously we don't need to handle any updates to store */\n if (!workspaceStore.workspace.documents[updated.slug]) {\n return\n }\n /** If the URL has changed we fetch and rebase */\n if (updated.source.url && updated.source.url !== previous?.source.url) {\n await workspaceStore.addDocument(\n {\n name: updated.slug,\n url: updated.source.url,\n fetch: updated.config.fetch,\n },\n updated.config,\n )\n\n return\n }\n\n // If the was not a URL change then we require a document to continue\n if (!updated.source.content) {\n return\n }\n\n /**\n * We need to deeply check for document changes. Parse documents and then only rebase\n * if we detect deep changes in the two sources\n */\n if (\n diff(\n updated.source.content,\n previous && 'content' in previous.source\n ? (previous.source.content ?? {})\n : {},\n ).length\n ) {\n await workspaceStore.addDocument(\n {\n name: updated.slug,\n document: updated.source.content,\n },\n updated.config,\n )\n }\n }\n\n newConfigList.forEach((newConfig, index) =>\n updateSource(newConfig, oldConfigList[index]),\n )\n\n const newSlugs = newConfigList.map((c) => c.slug)\n const oldSlugs = oldConfigList.map((c) => c.slug)\n\n // If the slugs have changed, we need to update the active document and the URL query param\n if (\n newSlugs.length !== oldSlugs.length ||\n !newSlugs.every((slug, index) => slug === oldSlugs[index])\n ) {\n await changeSelectedDocument(newSlugs[0] ?? '')\n }\n },\n {\n deep: true,\n },\n)\n\n/** Preload the first document during SSR */\nonServerPrefetch(() => changeSelectedDocument(activeSlug.value))\n\n/** Load the first document on page load */\nonBeforeMount(async () => {\n loadClientFromStorage(workspaceStore)\n\n await changeSelectedDocument(\n activeSlug.value,\n getIdFromUrl(\n window.location.href,\n configList.value[activeSlug.value]?.config.pathRouting?.basePath,\n isMultiDocument.value ? undefined : activeSlug.value,\n ),\n )\n})\n\nconst documentUrl = computed(() => {\n return configList.value[activeSlug.value]?.source?.url\n})\n\n// --------------------------------------------------------------------------- */\n// Agent Scalar\n\n/**\n * Determines if Agent Scalar should be enabled based on the configuration and the current URL\n *\n * - If the agent is disabled in the configuration, it should not be enabled\n * - If the current URL is a local URL, it should be enabled\n * - If the agent key is set, it should be enabled\n */\nconst agent = useAgent({\n agentEnabled: computed(() => {\n const currentConfiguration = configList.value[activeSlug.value]\n\n if (currentConfiguration?.agent?.disabled) {\n return false\n }\n\n if (typeof window !== 'undefined' && isLocalUrl(window.location.href)) {\n return true\n }\n\n return Boolean(configList.value[activeSlug.value]?.agent?.key)\n }),\n})\nprovide(AGENT_CONTEXT_SYMBOL, agent)\n\n// --------------------------------------------------------------------------- */\n// Api Client Modal\n\n// Setup the ApiClient on mount\nconst modal = useTemplateRef<HTMLElement>('modal')\nconst apiClient = ref<ApiClientModal | null>(null)\nonMounted(() => {\n if (!modal.value) {\n return\n }\n\n apiClient.value = createApiClientModal({\n el: modal.value,\n eventBus,\n workspaceStore,\n options: mergedConfig,\n plugins: mapConfigPlugins(mergedConfig),\n })\n})\nonBeforeUnmount(() => {\n apiClient.value?.app.unmount()\n})\n\n// ---------------------------------------------------------------------------\n// Top level event handlers and user specified callbacks\n\n/** Ensure we call the onServerChange callback */\neventBus.on('server:update:selected', ({ url }) =>\n mergedConfig.value.onServerChange?.(url),\n)\n\n/** Download the document from the store */\neventBus.on('ui:download:document', async ({ format }) => {\n const document = await workspaceStore.exportActiveDocument(format)\n\n if (!document) {\n console.error('No document found to download')\n return\n }\n\n downloadDocument(document, activeSlug.value ?? 'openapi', format)\n})\n\n// ---------------------------------------------------------------------------\n// Local event and scroll handling\n\n/**\n * Handler for a direct navigation event such as a sidebar or search click\n *\n * Depending on the item type we handle a selection event differently:\n *\n * - Tag: If a tag is closed we open it and all its parents and scroll to it\n * If a tag is open we just close the tag\n * - Operation:\n * Open all parents and scroll to the operation\n */\nconst handleSelectSidebarEntry = (id: string, caller?: 'sidebar') => {\n const item = sidebarState.getEntryById(id)\n\n if (\n (item?.type === 'tag' ||\n item?.type === 'models' ||\n item?.type === 'text') &&\n sidebarState.isExpanded(id) && // Only close if the item is expanded\n sidebarState.selectedItem.value === id // Only close if the item is not the currently selected item\n ) {\n // hack until we fix intersection logic\n const unblock = blockIntersection()\n\n sidebarState.setExpanded(id, false)\n\n unblock()\n\n return\n }\n\n // Close the mobile menu upon selecting any item that's not a tag or model\n if (item?.type !== 'tag' && item?.type !== 'models') {\n isSidebarOpen.value = false\n }\n\n scrollToLazyElement(id)\n\n const url = makeUrlFromId(id, basePath.value, isMultiDocument.value)\n if (url) {\n window.history.pushState({}, '', url)\n\n // Trigger the onSidebarClick callback if the caller is sidebar\n if (caller === 'sidebar') {\n mergedConfig.value.onSidebarClick?.(url.toString())\n }\n }\n\n if (agent.showAgent.value) {\n agent.closeAgent()\n }\n}\n\n/** Handle a navigation item selection event */\neventBus.on('select:nav-item', ({ id }) => handleSelectSidebarEntry(id))\n\n/** Handle a scroll to navigation item event */\neventBus.on('scroll-to:nav-item', ({ id }) => handleSelectSidebarEntry(id))\n\n/** Handle an intersecting navigation item event */\neventBus.on('intersecting:nav-item', ({ id }) => {\n if (!intersectionEnabled.value) {\n return\n }\n\n sidebarState.setSelected(id)\n setBreadcrumb(id)\n\n // Scroll the sidebar to keep the selected element near the top\n scrollSidebarToTop(id)\n\n const url = makeUrlFromId(id, basePath.value, isMultiDocument.value)\n if (url && workspaceStore.workspace.activeDocument) {\n window.history.replaceState({}, '', url.toString())\n }\n})\n\neventBus.on('toggle:nav-item', ({ id, open }) => {\n if (open) {\n mergedConfig.value.onShowMore?.(id)\n\n // Pre-queue first child so it renders immediately when the tag expands\n const entry = sidebarState.getEntryById(id)\n if (entry && 'children' in entry && entry.children) {\n const first = entry.children[0]\n\n if (first) {\n addToPriorityQueue(first.id)\n }\n }\n }\n sidebarState.setExpanded(id, open ?? !sidebarState.isExpanded(id))\n})\n\neventBus.on('copy-url:nav-item', ({ id }) => {\n const url = makeUrlFromId(\n id,\n basePath.value,\n isMultiDocument.value,\n )?.toString()\n return url && copyToClipboard(url)\n})\n\n// ---------------------------------------------------------------------------\n// History and scroll restoration\n\nonBeforeMount(() => {\n window.history.scrollRestoration = 'manual'\n // Ensure we add our scalar wrapper class to the headless ui root, mounted is too late\n addScalarClassesToHeadless()\n\n // When we detect a back button press we scroll to the new id\n window.addEventListener('popstate', () => {\n const id = getIdFromUrl(\n window.location.href,\n mergedConfig.value.pathRouting?.basePath,\n isMultiDocument.value ? undefined : activeSlug.value,\n )\n if (id) {\n scrollToLazyElement(id)\n }\n })\n})\n\n// ---------------------------------------------------------------------------\n// Document start intersection observer\n\nconst documentStartRef = useTemplateRef<HTMLElement>('documentStartRef')\n\nuseIntersection(documentStartRef, () => {\n eventBus.emit('intersecting:nav-item', { id: activeSlug.value })\n})\n\nconst colorMode = computed(() => {\n const mode = workspaceStore.workspace['x-scalar-color-mode']\n\n if (mode === 'system') {\n return getSystemModePreference()\n }\n\n return mode\n})\n\nconst bodyScrollLocked = useScrollLock(\n typeof document !== 'undefined' ? document.body : null,\n)\n\nwatch(agent.showAgent, () => (bodyScrollLocked.value = agent.showAgent.value))\n\nconst showMCPButton = computed(() => {\n if (mergedConfig.value.mcp?.disabled) {\n return false\n }\n\n if (typeof window !== 'undefined' && isLocalUrl(window.location.href)) {\n return true\n }\n\n if (mergedConfig.value.mcp) {\n return true\n }\n\n return false\n})\n</script>\n\n<template>\n <!-- SingleApiReference -->\n <div>\n <!-- Inject any custom CSS directly into a style tag -->\n <component :is=\"'style'\">\n {{ mergedConfig.customCss }}\n {{ themeStyle }}\n </component>\n <div\n ref=\"documentEl\"\n class=\"scalar-app scalar-api-reference references-layout\"\n :class=\"[\n {\n 'scalar-api-references-standalone-mobile': mergedConfig.showSidebar,\n 'scalar-scrollbars-obtrusive': obtrusiveScrollbars,\n 'references-editable': mergedConfig.isEditable,\n 'references-sidebar': mergedConfig.showSidebar,\n 'references-sidebar-mobile-open': isSidebarOpen,\n 'references-classic': mergedConfig.layout === 'classic',\n },\n $attrs.class,\n ]\">\n <!-- Agent Scalar -->\n <AgentScalarDrawer\n v-if=\"agent.agentEnabled.value\"\n :agentScalarConfiguration=\"configList[activeSlug]?.agent\"\n :eventBus\n :workspaceStore />\n\n <!-- Mobile Header and Sidebar when in modern layout -->\n\n <MobileHeader\n v-if=\"mergedConfig.layout === 'modern'\"\n :breadcrumb=\"breadcrumb\"\n :isSidebarOpen=\"isSidebarOpen\"\n :showSidebar=\"mergedConfig.showSidebar\"\n @toggleSidebar=\"() => (isSidebarOpen = !isSidebarOpen)\">\n <template #search>\n <SearchButton\n v-if=\"!mergedConfig.hideSearch\"\n class=\"my-2\"\n :document=\"workspaceStore.workspace.activeDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :searchHotKey=\"mergedConfig.searchHotKey\"\n :showSidebar=\"mergedConfig.showSidebar\" />\n </template>\n <template #sidebar=\"{ sidebarClasses }\">\n <ScalarSidebar\n v-if=\"mergedConfig.showSidebar && mergedConfig.layout === 'modern'\"\n :aria-label=\"`Sidebar for ${workspaceStore.workspace.activeDocument?.info?.title}`\"\n class=\"t-doc__sidebar\"\n :class=\"sidebarClasses\"\n :isExpanded=\"sidebarState.isExpanded\"\n :isSelected=\"sidebarState.isSelected\"\n :items=\"sidebarItems\"\n layout=\"reference\"\n :options=\"mergedConfig\"\n role=\"navigation\"\n @selectItem=\"(id) => handleSelectSidebarEntry(id, 'sidebar')\"\n @toggleGroup=\"\n (id: string) =>\n sidebarState.setExpanded(id, !sidebarState.isExpanded(id))\n \">\n <template #header>\n <!-- Wrap in a div when slot is filled -->\n <DocumentSelector\n v-if=\"documentOptionList.length > 1\"\n class=\"p-3 pb-0\"\n :modelValue=\"activeSlug\"\n :options=\"documentOptionList\"\n @update:modelValue=\"changeSelectedDocument\" />\n\n <!-- Search -->\n <div\n v-if=\"!mergedConfig.hideSearch\"\n class=\"flex gap-1.5 px-3 pt-3\">\n <SearchButton\n :document=\"workspaceStore.workspace.activeDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :searchHotKey=\"mergedConfig.searchHotKey\" />\n\n <AgentScalarButton v-if=\"agent.agentEnabled.value\" />\n </div>\n <!-- Sidebar Start -->\n <slot\n name=\"sidebar-start\"\n v-bind=\"slotProps\" />\n </template>\n <template #footer>\n <slot\n name=\"sidebar-end\"\n v-bind=\"slotProps\">\n <!-- We default the sidebar footer to the standard scalar elements -->\n <ScalarSidebarFooter class=\"darklight-reference\">\n <OpenApiClientButton\n v-if=\"!mergedConfig.hideClientButton && !showMCPButton\"\n buttonSource=\"sidebar\"\n :integration=\"mergedConfig._integration\"\n :isDevelopment=\"isDevelopment\"\n :url=\"documentUrl\" />\n <OpenMCPButton\n v-if=\"showMCPButton\"\n :config=\"mergedConfig.mcp\"\n :isDevelopment=\"isDevelopment\"\n :url=\"documentUrl\"\n :workspace=\"workspaceStore\" />\n <!-- Override the dark mode toggle slot to hide it -->\n <template #toggle>\n <ScalarColorModeToggleButton\n v-if=\"\n !mergedConfig.hideDarkModeToggle &&\n !mergedConfig.forceDarkModeState\n \"\n :modelValue=\"colorMode === 'dark'\"\n @update:modelValue=\"() => toggleColorMode()\" />\n <span v-else />\n </template>\n </ScalarSidebarFooter>\n </slot>\n </template>\n </ScalarSidebar>\n </template>\n </MobileHeader>\n\n <!-- Primary Content -->\n <main\n :aria-label=\"`Open API Documentation for ${workspaceStore.workspace.activeDocument?.info?.title}`\"\n class=\"references-rendered\"\n :inert=\"agent.showAgent.value\">\n <Content\n :authStore=\"workspaceStore.auth\"\n :document=\"workspaceStore.workspace.activeDocument\"\n :environment\n :eventBus\n :expandedItems=\"sidebarState.expandedItems.value\"\n :headingSlugGenerator=\"\n mergedConfig.generateHeadingSlug ??\n ((heading) => `${activeSlug}/description/${heading.slug}`)\n \"\n :infoSectionId=\"infoSectionId ?? 'description/introduction'\"\n :items=\"sidebarItems\"\n :options=\"mergedConfig\"\n :xScalarDefaultClient=\"\n workspaceStore.workspace['x-scalar-default-client']\n \">\n <template #start>\n <DeveloperTools\n v-if=\"\n workspaceStore.workspace.activeDocument && mediaQueries.lg.value\n \"\n v-model:overrides=\"configurationOverrides\"\n :configuration=\"mergedConfig\"\n :workspace=\"workspaceStore\" />\n\n <!-- Placeholder intersection observer that emits an empty string to clear the hash when scrolled to the top -->\n <div ref=\"documentStartRef\" />\n\n <ClassicHeader v-if=\"mergedConfig.layout === 'classic'\">\n <div class=\"w-64 empty:hidden\">\n <DocumentSelector\n v-if=\"documentOptionList.length > 1\"\n :modelValue=\"activeSlug\"\n :options=\"documentOptionList\"\n @update:modelValue=\"changeSelectedDocument\" />\n </div>\n <SearchButton\n v-if=\"!mergedConfig.hideSearch\"\n class=\"t-doc__sidebar max-w-64\"\n :document=\"workspaceStore.workspace.activeDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :searchHotKey=\"mergedConfig.searchHotKey\" />\n <template #dark-mode-toggle>\n <ScalarColorModeToggleIcon\n v-if=\"\n !mergedConfig.hideDarkModeToggle &&\n !mergedConfig.forceDarkModeState\n \"\n class=\"text-c-2 hover:text-c-1\"\n :mode=\"colorMode\"\n style=\"transform: scale(1.4)\"\n variant=\"icon\"\n @click=\"() => toggleColorMode()\" />\n </template>\n </ClassicHeader>\n <slot\n name=\"content-start\"\n v-bind=\"slotProps\" />\n </template>\n <!-- TODO: Remove this; we no longer directly support an inline editor -->\n <template\n v-if=\"mergedConfig.isEditable\"\n #empty-state>\n <slot\n name=\"editor-placeholder\"\n v-bind=\"slotProps\" />\n </template>\n <template #end>\n <slot\n name=\"content-end\"\n v-bind=\"slotProps\" />\n </template>\n </Content>\n </main>\n <!-- Optional Footer -->\n <div\n v-if=\"$slots.footer\"\n class=\"references-footer\">\n <slot\n name=\"footer\"\n v-bind=\"slotProps\" />\n </div>\n <!-- Client Modal mount point -->\n <div ref=\"modal\" />\n </div>\n <ScalarToasts />\n </div>\n</template>\n\n<style>\n@import '@/style.css';\n\n/* Add base styles to the body. Removed browser default margins for a better experience. */\n@layer scalar-base {\n body {\n margin: 0;\n background-color: var(--scalar-background-1);\n }\n}\n/** Used to check if css is loaded */\n:root {\n --scalar-loaded-api-reference: true;\n}\n</style>\n<style scoped>\n/* Configurable Layout Variables */\n@layer scalar-config {\n .scalar-api-reference {\n /* The header height */\n --refs-header-height: calc(\n var(--scalar-custom-header-height, 0px) + var(--scalar-header-height, 0px)\n );\n /* The offset of visible references content (minus headers) */\n --refs-viewport-offset: calc(\n var(--refs-header-height, 0px) + var(--refs-content-offset, 0px)\n );\n /* The calculated height of visible references content (minus headers) */\n --refs-viewport-height: calc(\n var(--full-height, 100dvh) - var(--refs-viewport-offset, 0px)\n );\n /* The width of the sidebar */\n --refs-sidebar-width: var(--scalar-sidebar-width, 0px);\n /* The height of the sidebar */\n --refs-sidebar-height: calc(\n var(--full-height, 100dvh) - var(--refs-header-height, 0px)\n );\n /* The maximum width of the content column */\n --refs-content-max-width: var(--scalar-content-max-width, 1540px);\n }\n\n .scalar-api-reference.references-classic {\n /* Classic layout is wider */\n --refs-content-max-width: var(--scalar-content-max-width, 1420px);\n min-height: 100dvh;\n --refs-sidebar-width: 0;\n }\n}\n.t-doc__sidebar {\n z-index: 10;\n}\n\n/* ----------------------------------------------------- */\n/* References Layout */\n.references-layout {\n /* Try to fill the container */\n min-height: 100dvh;\n min-width: 100%;\n max-width: 100%;\n flex: 1;\n\n /*\n Calculated by a resize observer and set in the style attribute\n Falls back to the viewport height\n */\n --full-height: 100dvh;\n\n /* Grid layout */\n display: grid;\n grid-template-rows: var(--scalar-header-height, 0px) repeat(2, auto);\n grid-template-columns: auto 1fr;\n grid-template-areas:\n 'header header'\n 'navigation rendered'\n 'footer footer';\n\n background: var(--scalar-background-1);\n}\n\n.references-editor {\n grid-area: editor;\n display: flex;\n min-width: 0;\n background: var(--scalar-background-1);\n}\n\n.references-rendered {\n position: relative;\n grid-area: rendered;\n min-width: 0;\n background: var(--scalar-background-1);\n}\n.scalar-api-reference.references-classic,\n.references-classic .references-rendered {\n height: initial !important;\n max-height: initial !important;\n}\n\n@layer scalar-config {\n .references-sidebar {\n /* Set a default width if references are enabled */\n --refs-sidebar-width: var(--scalar-sidebar-width, 288px);\n }\n}\n\n/* Footer */\n.references-footer {\n grid-area: footer;\n}\n/* ----------------------------------------------------- */\n/* Responsive / Mobile Layout */\n\n@media (max-width: 1000px) {\n /* Stack view on mobile */\n .references-layout {\n /* Adjust the sidebar height to the viewport height minus the header height */\n --refs-sidebar-height: calc(\n var(--full-height, 100dvh) - var(--scalar-custom-header-height, 0px)\n );\n\n grid-template-columns: 100%;\n grid-template-rows: var(--scalar-header-height, 0px) 0px auto auto;\n\n grid-template-areas:\n 'header'\n 'navigation'\n 'rendered'\n 'footer';\n }\n .references-editable {\n grid-template-areas:\n 'header'\n 'navigation'\n 'editor';\n }\n\n .references-rendered {\n position: static;\n }\n}\n</style>\n<style scoped>\n/**\n* Sidebar CSS for standalone\n* TODO: @brynn move this to the sidebar block OR the ApiReferenceStandalone component\n* when the new elements are available\n*/\n@media (max-width: 1000px) {\n .scalar-api-references-standalone-mobile:not(.references-classic) {\n --scalar-header-height: 50px;\n }\n}\n</style>\n<style scoped>\n.darklight-reference {\n width: 100%;\n margin-top: auto;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { provideUseId } from '@headlessui/vue'\nimport { OpenApiClientButton } from '@scalar/api-client/components'\nimport {\n createApiClientModal,\n type ApiClientModal,\n} from '@scalar/api-client/v2/features/modal'\nimport { getActiveEnvironment, getServers } from '@scalar/api-client/v2/helpers'\nimport {\n addScalarClassesToHeadless,\n ScalarColorModeToggleButton,\n ScalarColorModeToggleIcon,\n ScalarSidebarFooter,\n} from '@scalar/components'\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport {\n createSidebarState,\n ScalarSidebar,\n scrollSidebarToTop,\n} from '@scalar/sidebar'\nimport { getThemeStyles, hasObtrusiveScrollbars } from '@scalar/themes'\nimport {\n apiReferenceConfigurationSchema,\n type AnyApiReferenceConfiguration,\n type ApiReferenceConfiguration,\n type ApiReferenceConfigurationRaw,\n} from '@scalar/types/api-reference'\nimport { useBreakpoints } from '@scalar/use-hooks/useBreakpoints'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { useColorMode } from '@scalar/use-hooks/useColorMode'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport { createWorkspaceStore } from '@scalar/workspace-store/client'\nimport { createWorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n TraversedEntry,\n TraversedTag,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { useScrollLock } from '@vueuse/core'\nimport diff from 'microdiff'\nimport {\n computed,\n onBeforeMount,\n onBeforeUnmount,\n onMounted,\n onServerPrefetch,\n provide,\n ref,\n useId,\n useTemplateRef,\n watch,\n} from 'vue'\n\nimport {\n AgentScalarButton,\n AgentScalarDrawer,\n OpenMCPButton,\n} from '@/components/AgentScalar'\nimport ClassicHeader from '@/components/ClassicHeader.vue'\nimport Content from '@/components/Content/Content.vue'\nimport MobileHeader from '@/components/MobileHeader.vue'\nimport { DeveloperTools } from '@/features/developer-tools'\nimport DocumentSelector from '@/features/multiple-documents/DocumentSelector.vue'\nimport SearchButton from '@/features/Search/components/SearchButton.vue'\nimport { getSystemModePreference } from '@/helpers/color-mode'\nimport { downloadDocument } from '@/helpers/download'\nimport {\n getIdFromUrl,\n makeUrlFromId,\n matchesBasePath,\n} from '@/helpers/id-routing'\nimport {\n scrollToLazy as _scrollToLazy,\n addToPriorityQueue,\n blockIntersection,\n intersectionEnabled,\n} from '@/helpers/lazy-bus'\nimport {\n loadAuthFromStorage,\n loadClientFromStorage,\n} from '@/helpers/load-from-perssistance'\nimport { mapConfigPlugins } from '@/helpers/map-config-plugins'\nimport { mapConfigToWorkspaceStore } from '@/helpers/map-config-to-workspace-store'\nimport {\n normalizeConfigurations,\n type NormalizedConfiguration,\n} from '@/helpers/normalize-configurations'\nimport { AGENT_CONTEXT_SYMBOL, useAgent } from '@/hooks/use-agent'\nimport { useIntersection } from '@/hooks/use-intersection'\nimport { createPluginManager, PLUGIN_MANAGER_SYMBOL } from '@/plugins'\nimport { persistencePlugin } from '@/plugins/persistance-plugin'\n\nconst props = defineProps<{\n /**\n * Configuration for the API reference.\n * Can be a single configuration or an array of configurations for multiple documents.\n */\n configuration?: AnyApiReferenceConfiguration\n}>()\n\ndefineSlots<{\n 'content-start'?(): { breadcrumb: string }\n 'content-end'?(): { breadcrumb: string }\n 'sidebar-start'?(): { breadcrumb: string }\n 'sidebar-end'?(): { breadcrumb: string }\n 'editor-placeholder'?(): { breadcrumb: string }\n footer?(): { breadcrumb: string }\n}>()\n\nconst { mediaQueries } = useBreakpoints()\nconst { copyToClipboard } = useClipboard()\n\n/**\n * Used to inject the environment into built packages\n *\n * Primary use case is the open-in-client button\n */\nconst isDevelopment = import.meta.env.DEV\n\nconst obtrusiveScrollbars = computed(hasObtrusiveScrollbars)\n\nconst eventBus = createWorkspaceEventBus({ debug: isDevelopment })\nconst isSidebarOpen = ref(false)\n\nwatch(\n () => mediaQueries?.lg?.value,\n (newValue, oldValue) => {\n // Close the drawer when we go from desktop to mobile\n if (oldValue && !newValue) {\n isSidebarOpen.value = false\n }\n },\n)\n\n/**\n * Due to a bug in headless UI, we need to set an ID here that can be shared across server/client\n * TODO remove this once the bug is fixed\n *\n * @see https://github.com/tailwindlabs/headlessui/issues/2979\n */\nprovideUseId(() => useId())\n\n// ---------------------------------------------------------------------------\n/**\n * Configuration Handling\n *\n * We will normalize the configurations and store them in a computed property.\n * The active configuration will be associated with the active document.\n */\nconst configList = computed(() => normalizeConfigurations(props.configuration))\n\nconst isMultiDocument = computed(() => Object.keys(configList.value).length > 1)\n\n/** Search for the source with a default attribute or use the first one */\nconst activeSlug = ref<string>(\n Object.values(configList.value).find((c) => c.default)?.slug ??\n configList.value[Object.keys(configList.value)?.[0] ?? '']?.slug ??\n '',\n)\n\n/**\n * On initial page load we need to determine if there is a valid document slug in the URL\n *\n * If there is we set the active slug to the document slug\n */\nif (typeof window !== 'undefined') {\n const url = new URL(window.location.href)\n\n // To handle legacy query parameter multi-document support we redirect\n // to the new path routing format\n const apiParam = url.searchParams.get('api')\n if (apiParam && configList.value[apiParam]) {\n activeSlug.value = apiParam\n const idFromUrl = getIdFromUrl(\n url,\n configList.value[apiParam].config.pathRouting?.basePath,\n apiParam,\n )\n const newUrl = makeUrlFromId(\n idFromUrl,\n configList.value[apiParam].config.pathRouting?.basePath,\n isMultiDocument.value,\n )\n if (newUrl) {\n newUrl.searchParams.delete('api')\n window.history.replaceState({}, '', newUrl.toString())\n }\n }\n\n /**\n * For path routing on initial load we do not know which basePath to check for\n * we need to search the configs to see if any of the base paths match the URL\n * and then use that basePath to get the initial id\n *\n * With this approach we cannot support multi-document mode with one of configs having\n * an empty basePath\n *\n * Other conflicts are possible.\n */\n const basePaths = Object.values(configList.value).map(\n (c) => c.config.pathRouting?.basePath,\n )\n\n const initialId = getIdFromUrl(\n url,\n basePaths.find((p) => (p ? matchesBasePath(url, p) : false)),\n isMultiDocument.value ? undefined : activeSlug.value,\n )\n const documentSlug = initialId.split('/')[0]\n\n if (documentSlug && configList.value[documentSlug]) {\n activeSlug.value = documentSlug\n }\n}\n\n/** Computed document options list for the selector logic */\nconst documentOptionList = computed(() =>\n Object.values(configList.value).map((c) => ({\n label: c.title,\n id: c.slug,\n })),\n)\n\n/** Configuration overrides to apply to the selected document (from the localhost toolbar) */\nconst configurationOverrides = ref<\n Partial<Omit<ApiReferenceConfiguration, 'slug' | 'title' | ''>>\n>({})\n\n/** Any dev toolbar modifications are merged with the active configuration */\nconst mergedConfig = computed<ApiReferenceConfigurationRaw>(() => ({\n // Provides a default set of values when the lookup fails\n ...apiReferenceConfigurationSchema.parse({}),\n // The active configuration based on the slug\n ...configList.value[activeSlug.value]?.config,\n // Any overrides from the localhost toolbar\n ...configurationOverrides.value,\n}))\n\n/** Convenience break out var to determine which routing mode we are using */\nconst basePath = computed(() => mergedConfig.value.pathRouting?.basePath)\n\nconst themeStyle = computed(() =>\n getThemeStyles(mergedConfig.value.theme, {\n fonts: mergedConfig.value.withDefaultFonts,\n }),\n)\n\n/** Plugin injection is not reactive. All plugins must be provided at first render */\nprovide(\n PLUGIN_MANAGER_SYMBOL,\n createPluginManager({\n plugins: Object.values(configList.value).flatMap(\n (c) => c.config.plugins ?? [],\n ),\n }),\n)\n// ---------------------------------------------------------------------------\n/** Navigation State Handling */\n\n// Front-end redirect\nif (mergedConfig.value.redirect && typeof window !== 'undefined') {\n const newPath = mergedConfig.value.redirect(\n (mergedConfig.value.pathRouting ? window.location.pathname : '') +\n window.location.hash,\n )\n if (newPath) {\n window.history.replaceState({}, '', newPath)\n }\n}\n\n/**\n * Sets the active slug and updates the URL with the selected document slug\n *\n * If an element ID is passed in we will configure the path or hash routing\n */\nfunction syncSlugAndUrlWithDocument(\n slug: string,\n elementId: string | undefined,\n config: ApiReferenceConfigurationRaw,\n) {\n // We create a new URL and go to the root element if an ID is not provided\n const url = makeUrlFromId(\n elementId || slug,\n config.pathRouting?.basePath,\n isMultiDocument.value,\n )\n\n if (url) {\n window.history.replaceState({}, '', url.toString())\n }\n\n // Update the active slug\n activeSlug.value = slug\n}\n\n// ---------------------------------------------------------------------------\n/** Workspace Store Initialization */\n\n/**\n * Initializes the new client workspace store.\n */\nconst workspaceStore = createWorkspaceStore({\n verbose: isDevelopment,\n plugins: [\n persistencePlugin({\n prefix: () => activeSlug.value,\n persistAuth: () => mergedConfig.value.persistAuth ?? false,\n }),\n ],\n})\n\n// TODO: persistence should be hoisted into standalone\n// Client side integrations will want to handle dark mode externally\nconst { toggleColorMode, isDarkMode } = useColorMode({\n initialColorMode: {\n true: 'dark' as const,\n false: 'light' as const,\n undefined: 'system' as const,\n }[String(mergedConfig.value.darkMode)],\n overrideColorMode: mergedConfig.value.forceDarkModeState,\n})\n\n/**\n * Create top level sidebar entries for each document\n * This allows sharing a single sidebar state for across the workspace\n */\nconst itemsFromWorkspace = computed<TraversedEntry[]>(() => {\n return Object.entries(workspaceStore.workspace.documents).map(\n ([slug, document]) => ({\n id: slug,\n type: 'document',\n description: document.info.description,\n name: document.info.title ?? slug,\n title: document.info.title ?? slug,\n children: document?.['x-scalar-navigation']?.children ?? [],\n }),\n )\n})\n\n/** Initialize the sidebar */\nconst sidebarState = createSidebarState<TraversedEntry>(itemsFromWorkspace, {\n hooks: {},\n})\n\n/** Recursively set all children of the given items to open */\nconst setChildrenOpen = (items: TraversedEntry[]): void => {\n items.forEach((item) => {\n if (item.type === 'tag' || item.type === 'models') {\n sidebarState.setExpanded(item.id, true)\n }\n if ('children' in item && item.children) {\n setChildrenOpen(item.children)\n }\n })\n}\n\n/** We get the sub items for the sidebar based on the configuration/document slug */\nconst sidebarItems = computed<TraversedEntry[]>(() => {\n const config = mergedConfig.value\n\n if (!config) {\n return []\n }\n\n const docItems =\n sidebarState.items.value.find(\n (item): item is TraversedTag => item.id === activeSlug.value,\n )?.children ?? []\n\n // When the default open all tags configuration is enabled we open all the children of the document\n if (config.defaultOpenAllTags) {\n setChildrenOpen(docItems)\n }\n\n // When the expand all model sections configuration is enabled we open all the children of the models tag\n if (config.expandAllModelSections) {\n const models = docItems.find(\n (item): item is TraversedTag => item.type === 'models',\n )\n if (models) {\n sidebarState.setExpanded(models.id, true)\n models.children?.forEach((child) => {\n sidebarState.setExpanded(child.id, true)\n })\n }\n }\n\n return docItems\n})\n\n/** Find the sidebar entry that represents the introduction section */\nconst infoSectionId = computed(\n () =>\n sidebarItems.value.find(\n (item) => item.type === 'text' && item.title === 'Introduction',\n )?.id,\n)\n\n/** User for mobile navigation */\nconst breadcrumb = ref('')\n\nconst slotProps = computed(() => ({\n breadcrumb: breadcrumb.value,\n}))\n\nconst setBreadcrumb = (id: string) => {\n const item = sidebarState.getEntryById(id)\n\n if (!item || item.type === 'document') {\n breadcrumb.value = ''\n } else {\n breadcrumb.value = item.title\n }\n}\n\nconst scrollToLazyElement = (id: string) => {\n setBreadcrumb(id)\n sidebarState.setSelected(id)\n _scrollToLazy(id, sidebarState.setExpanded, sidebarState.getEntryById)\n}\n\n/** Maps some config values to the workspace store to keep it reactive */\nmapConfigToWorkspaceStore({\n config: () => mergedConfig.value,\n store: workspaceStore,\n isDarkMode,\n})\n\n/** Merged environment variables from workspace and document levels */\nconst environment = computed(() =>\n getActiveEnvironment(\n workspaceStore,\n workspaceStore.workspace.activeDocument ?? null,\n ),\n)\n\nif (typeof window !== 'undefined') {\n // @ts-expect-error - For debugging purposes expose the store\n window.dataDumpWorkspace = () => workspaceStore\n}\n\n// For testing\ndefineExpose({\n eventBus,\n workspaceStore,\n sidebarItems,\n})\n\n// ---------------------------------------------------------------------------\n// Document Management\n\n/**\n * Handle changing the active document\n *\n * 1. If the document has not be loaded to the workspace store we set it to empty and asynchronously load it\n * 2. If the document has been loaded to the workspace store we just set it to active\n * 3. If the content from the configuration has changes we need to update the document in the workspace store\n */\nconst changeSelectedDocument = async (\n slug: string,\n elementId?: string | undefined,\n) => {\n const normalized = configList.value[slug]\n\n if (!normalized) {\n console.warn(`Document ${slug} not found in configList`)\n return\n }\n\n const config = {\n ...normalized.config,\n ...configurationOverrides.value,\n }\n\n // Store `onDocumentSelect` result to await its execution later, before calling `onLoaded`\n const onDocumentSelectPromise = config.onDocumentSelect?.()\n\n // Set the active slug and update any routing\n syncSlugAndUrlWithDocument(slug, elementId, config)\n\n // Update the document on the route as well, the method and path don't matter as we update them before opening\n apiClient.value?.route({\n documentSlug: slug,\n method: 'get',\n path: '/',\n })\n\n const isFirstLoad = !workspaceStore.workspace.documents[slug]\n\n // If the document is not in the store, we asynchronously load it\n if (isFirstLoad) {\n const result = await workspaceStore.addDocument(\n normalized.source.url\n ? {\n name: slug,\n url: normalized.source.url,\n fetch: config.fetch,\n }\n : {\n name: slug,\n document: normalized.source.content ?? {},\n },\n config,\n )\n\n const document = workspaceStore.workspace.documents[slug]\n\n // If the document does not have a selected server we set it to the first server\n if (\n result === true &&\n document !== undefined &&\n document['x-scalar-selected-server'] === undefined\n ) {\n // Set the active server if the document is loaded successfully\n const servers = getServers(\n normalized.config.servers ?? document.servers,\n {\n baseServerUrl: mergedConfig.value.baseServerURL,\n documentUrl: normalized.source.url,\n },\n )\n if (servers.length > 0) {\n workspaceStore.updateDocument(\n slug,\n 'x-scalar-selected-server',\n servers[0]!.url,\n )\n }\n }\n }\n\n // Always set it to active; if the document is null we show a loading state\n workspaceStore.update('x-scalar-active-document', slug)\n\n // If the document has persistence enabled we load the auth schemes from storage\n if (config.persistAuth) {\n loadAuthFromStorage(workspaceStore, slug)\n }\n\n // ensure that `onLoaded` hook doesn't block execution but is executed after `onDocumentSelect`\n void (async () => {\n await onDocumentSelectPromise\n void config.onLoaded?.(slug)\n })()\n\n // When loading to a specified element we need to freeze and scroll\n if (elementId && elementId !== slug) {\n scrollToLazyElement(elementId)\n }\n // If there is no child element of the document specified and defaultOpenFirstTag is enabled, we expand the first tag\n else if (config.defaultOpenFirstTag) {\n const firstTag = sidebarItems.value.find((item) => item.type === 'tag')\n if (firstTag) {\n sidebarState.setExpanded(firstTag.id, true)\n }\n }\n}\n\n/**\n * TODO:Move this to a dedicated updateDocument function in the future and\n * away from vue-reactivity based updates\n */\nwatch(\n () => Object.values(configList.value),\n async (newConfigList, oldConfigList) => {\n /**\n * Handles replacing and updating documents within the workspace store\n * when we detect configuration changes.\n */\n const updateSource = async (\n updated: NormalizedConfiguration,\n previous: NormalizedConfiguration | undefined,\n ) => {\n /** If we have not loaded the document previously we don't need to handle any updates to store */\n if (!workspaceStore.workspace.documents[updated.slug]) {\n return\n }\n /** If the URL has changed we fetch and rebase */\n if (updated.source.url && updated.source.url !== previous?.source.url) {\n await workspaceStore.addDocument(\n {\n name: updated.slug,\n url: updated.source.url,\n fetch: updated.config.fetch,\n },\n updated.config,\n )\n\n return\n }\n\n // If the was not a URL change then we require a document to continue\n if (!updated.source.content) {\n return\n }\n\n /**\n * We need to deeply check for document changes. Parse documents and then only rebase\n * if we detect deep changes in the two sources\n */\n if (\n diff(\n updated.source.content,\n previous && 'content' in previous.source\n ? (previous.source.content ?? {})\n : {},\n ).length\n ) {\n await workspaceStore.addDocument(\n {\n name: updated.slug,\n document: updated.source.content,\n },\n updated.config,\n )\n }\n }\n\n newConfigList.forEach((newConfig, index) =>\n updateSource(newConfig, oldConfigList[index]),\n )\n\n const newSlugs = newConfigList.map((c) => c.slug)\n const oldSlugs = oldConfigList.map((c) => c.slug)\n\n // If the slugs have changed, we need to update the active document and the URL query param\n if (\n newSlugs.length !== oldSlugs.length ||\n !newSlugs.every((slug, index) => slug === oldSlugs[index])\n ) {\n await changeSelectedDocument(newSlugs[0] ?? '')\n }\n },\n {\n deep: true,\n },\n)\n\n/** Preload the first document during SSR */\nonServerPrefetch(() => changeSelectedDocument(activeSlug.value))\n\n/** Load the first document on page load */\nonBeforeMount(async () => {\n loadClientFromStorage(workspaceStore)\n\n await changeSelectedDocument(\n activeSlug.value,\n getIdFromUrl(\n window.location.href,\n configList.value[activeSlug.value]?.config.pathRouting?.basePath,\n isMultiDocument.value ? undefined : activeSlug.value,\n ),\n )\n})\n\nconst documentUrl = computed(() => {\n return configList.value[activeSlug.value]?.source?.url\n})\n\n// --------------------------------------------------------------------------- */\n// Agent Scalar\n\n/**\n * Determines if Agent Scalar should be enabled based on the configuration and the current URL\n *\n * - If the agent is disabled in the configuration, it should not be enabled\n * - If the current URL is a local URL, it should be enabled\n * - If the agent key is set, it should be enabled\n */\nconst agent = useAgent({\n agentEnabled: computed(() => {\n const currentConfiguration = configList.value[activeSlug.value]\n\n if (currentConfiguration?.agent?.disabled) {\n return false\n }\n\n if (typeof window !== 'undefined' && isLocalUrl(window.location.href)) {\n return true\n }\n\n return Boolean(configList.value[activeSlug.value]?.agent?.key)\n }),\n})\nprovide(AGENT_CONTEXT_SYMBOL, agent)\n\n// --------------------------------------------------------------------------- */\n// Api Client Modal\n\n// Setup the ApiClient on mount\nconst modal = useTemplateRef<HTMLElement>('modal')\nconst apiClient = ref<ApiClientModal | null>(null)\nonMounted(() => {\n if (!modal.value) {\n return\n }\n\n apiClient.value = createApiClientModal({\n el: modal.value,\n eventBus,\n workspaceStore,\n options: mergedConfig,\n plugins: mapConfigPlugins(mergedConfig),\n })\n})\nonBeforeUnmount(() => {\n apiClient.value?.app.unmount()\n})\n\n// ---------------------------------------------------------------------------\n// Top level event handlers and user specified callbacks\n\n/** Ensure we call the onServerChange callback */\neventBus.on('server:update:selected', ({ url }) =>\n mergedConfig.value.onServerChange?.(url),\n)\n\n/** Download the document from the store */\neventBus.on('ui:download:document', async ({ format }) => {\n const document = await workspaceStore.exportActiveDocument(format)\n\n if (!document) {\n console.error('No document found to download')\n return\n }\n\n downloadDocument(document, activeSlug.value ?? 'openapi', format)\n})\n\n// ---------------------------------------------------------------------------\n// Local event and scroll handling\n\n/**\n * Handler for a direct navigation event such as a sidebar or search click\n *\n * Depending on the item type we handle a selection event differently:\n *\n * - Tag: If a tag is closed we open it and all its parents and scroll to it\n * If a tag is open we just close the tag\n * - Operation:\n * Open all parents and scroll to the operation\n */\nconst handleSelectSidebarEntry = (id: string, caller?: 'sidebar') => {\n const item = sidebarState.getEntryById(id)\n\n if (\n (item?.type === 'tag' ||\n item?.type === 'models' ||\n item?.type === 'text') &&\n sidebarState.isExpanded(id) && // Only close if the item is expanded\n sidebarState.selectedItem.value === id // Only close if the item is not the currently selected item\n ) {\n // hack until we fix intersection logic\n const unblock = blockIntersection()\n\n sidebarState.setExpanded(id, false)\n\n unblock()\n\n return\n }\n\n // Close the mobile menu upon selecting any item that's not a tag or model\n if (item?.type !== 'tag' && item?.type !== 'models') {\n isSidebarOpen.value = false\n }\n\n scrollToLazyElement(id)\n\n const url = makeUrlFromId(id, basePath.value, isMultiDocument.value)\n if (url) {\n window.history.pushState({}, '', url)\n\n // Trigger the onSidebarClick callback if the caller is sidebar\n if (caller === 'sidebar') {\n mergedConfig.value.onSidebarClick?.(url.toString())\n }\n }\n\n if (agent.showAgent.value) {\n agent.closeAgent()\n }\n}\n\n/** Handle a navigation item selection event */\neventBus.on('select:nav-item', ({ id }) => handleSelectSidebarEntry(id))\n\n/** Handle a scroll to navigation item event */\neventBus.on('scroll-to:nav-item', ({ id }) => handleSelectSidebarEntry(id))\n\n/** Handle an intersecting navigation item event */\neventBus.on('intersecting:nav-item', ({ id }) => {\n if (!intersectionEnabled.value) {\n return\n }\n\n sidebarState.setSelected(id)\n setBreadcrumb(id)\n\n // Scroll the sidebar to keep the selected element near the top\n scrollSidebarToTop(id)\n\n const url = makeUrlFromId(id, basePath.value, isMultiDocument.value)\n if (url && workspaceStore.workspace.activeDocument) {\n window.history.replaceState({}, '', url.toString())\n }\n})\n\neventBus.on('toggle:nav-item', ({ id, open }) => {\n if (open) {\n mergedConfig.value.onShowMore?.(id)\n\n // Pre-queue first child so it renders immediately when the tag expands\n const entry = sidebarState.getEntryById(id)\n if (entry && 'children' in entry && entry.children) {\n const first = entry.children[0]\n\n if (first) {\n addToPriorityQueue(first.id)\n }\n }\n }\n sidebarState.setExpanded(id, open ?? !sidebarState.isExpanded(id))\n})\n\neventBus.on('copy-url:nav-item', ({ id }) => {\n const url = makeUrlFromId(\n id,\n basePath.value,\n isMultiDocument.value,\n )?.toString()\n return url && copyToClipboard(url)\n})\n\n// ---------------------------------------------------------------------------\n// History and scroll restoration\n\nonBeforeMount(() => {\n window.history.scrollRestoration = 'manual'\n // Ensure we add our scalar wrapper class to the headless ui root, mounted is too late\n addScalarClassesToHeadless()\n\n // When we detect a back button press we scroll to the new id\n window.addEventListener('popstate', () => {\n const id = getIdFromUrl(\n window.location.href,\n mergedConfig.value.pathRouting?.basePath,\n isMultiDocument.value ? undefined : activeSlug.value,\n )\n if (id) {\n scrollToLazyElement(id)\n }\n })\n})\n\n// ---------------------------------------------------------------------------\n// Document start intersection observer\n\nconst documentStartRef = useTemplateRef<HTMLElement>('documentStartRef')\n\nuseIntersection(documentStartRef, () => {\n eventBus.emit('intersecting:nav-item', { id: activeSlug.value })\n})\n\nconst colorMode = computed(() => {\n const mode = workspaceStore.workspace['x-scalar-color-mode']\n\n if (mode === 'system') {\n return getSystemModePreference()\n }\n\n return mode\n})\n\nconst bodyScrollLocked = useScrollLock(\n typeof document !== 'undefined' ? document.body : null,\n)\n\nwatch(agent.showAgent, () => (bodyScrollLocked.value = agent.showAgent.value))\n\nconst showMCPButton = computed(() => {\n if (mergedConfig.value.mcp?.disabled) {\n return false\n }\n\n if (typeof window !== 'undefined' && isLocalUrl(window.location.href)) {\n return true\n }\n\n if (mergedConfig.value.mcp) {\n return true\n }\n\n return false\n})\n</script>\n\n<template>\n <!-- SingleApiReference -->\n <div>\n <!-- Inject any custom CSS directly into a style tag -->\n <component :is=\"'style'\">\n {{ mergedConfig.customCss }}\n {{ themeStyle }}\n </component>\n <div\n ref=\"documentEl\"\n class=\"scalar-app scalar-api-reference references-layout\"\n :class=\"[\n {\n 'scalar-api-references-standalone-mobile': mergedConfig.showSidebar,\n 'scalar-scrollbars-obtrusive': obtrusiveScrollbars,\n 'references-editable': mergedConfig.isEditable,\n 'references-sidebar': mergedConfig.showSidebar,\n 'references-sidebar-mobile-open': isSidebarOpen,\n 'references-classic': mergedConfig.layout === 'classic',\n },\n $attrs.class,\n ]\">\n <!-- Agent Scalar -->\n <AgentScalarDrawer\n v-if=\"agent.agentEnabled.value\"\n :agentScalarConfiguration=\"configList[activeSlug]?.agent\"\n :eventBus\n :workspaceStore />\n\n <!-- Mobile Header and Sidebar when in modern layout -->\n\n <MobileHeader\n v-if=\"mergedConfig.layout === 'modern'\"\n :breadcrumb=\"breadcrumb\"\n :isSidebarOpen=\"isSidebarOpen\"\n :showSidebar=\"mergedConfig.showSidebar\"\n @toggleSidebar=\"() => (isSidebarOpen = !isSidebarOpen)\">\n <template #search>\n <SearchButton\n v-if=\"!mergedConfig.hideSearch\"\n class=\"my-2\"\n :document=\"workspaceStore.workspace.activeDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :searchHotKey=\"mergedConfig.searchHotKey\"\n :showSidebar=\"mergedConfig.showSidebar\" />\n </template>\n <template #sidebar=\"{ sidebarClasses }\">\n <ScalarSidebar\n v-if=\"mergedConfig.showSidebar && mergedConfig.layout === 'modern'\"\n :aria-label=\"`Sidebar for ${workspaceStore.workspace.activeDocument?.info?.title}`\"\n class=\"t-doc__sidebar\"\n :class=\"sidebarClasses\"\n :isExpanded=\"sidebarState.isExpanded\"\n :isSelected=\"sidebarState.isSelected\"\n :items=\"sidebarItems\"\n layout=\"reference\"\n :options=\"mergedConfig\"\n role=\"navigation\"\n @selectItem=\"(id) => handleSelectSidebarEntry(id, 'sidebar')\"\n @toggleGroup=\"\n (id: string) =>\n sidebarState.setExpanded(id, !sidebarState.isExpanded(id))\n \">\n <template #header>\n <!-- Wrap in a div when slot is filled -->\n <DocumentSelector\n v-if=\"documentOptionList.length > 1\"\n class=\"p-3 pb-0\"\n :modelValue=\"activeSlug\"\n :options=\"documentOptionList\"\n @update:modelValue=\"changeSelectedDocument\" />\n\n <!-- Search -->\n <div\n v-if=\"!mergedConfig.hideSearch\"\n class=\"flex gap-1.5 px-3 pt-3\">\n <SearchButton\n :document=\"workspaceStore.workspace.activeDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :searchHotKey=\"mergedConfig.searchHotKey\" />\n\n <AgentScalarButton v-if=\"agent.agentEnabled.value\" />\n </div>\n <!-- Sidebar Start -->\n <slot\n name=\"sidebar-start\"\n v-bind=\"slotProps\" />\n </template>\n <template #footer>\n <slot\n name=\"sidebar-end\"\n v-bind=\"slotProps\">\n <!-- We default the sidebar footer to the standard scalar elements -->\n <ScalarSidebarFooter class=\"darklight-reference\">\n <OpenApiClientButton\n v-if=\"!mergedConfig.hideClientButton && !showMCPButton\"\n buttonSource=\"sidebar\"\n :integration=\"mergedConfig._integration\"\n :isDevelopment=\"isDevelopment\"\n :url=\"documentUrl\" />\n <OpenMCPButton\n v-if=\"showMCPButton\"\n :config=\"mergedConfig.mcp\"\n :isDevelopment=\"isDevelopment\"\n :url=\"documentUrl\"\n :workspace=\"workspaceStore\" />\n <!-- Override the dark mode toggle slot to hide it -->\n <template #toggle>\n <ScalarColorModeToggleButton\n v-if=\"\n !mergedConfig.hideDarkModeToggle &&\n !mergedConfig.forceDarkModeState\n \"\n :modelValue=\"colorMode === 'dark'\"\n @update:modelValue=\"() => toggleColorMode()\" />\n <span v-else />\n </template>\n </ScalarSidebarFooter>\n </slot>\n </template>\n </ScalarSidebar>\n </template>\n </MobileHeader>\n\n <!-- Primary Content -->\n <main\n :aria-label=\"`Open API Documentation for ${workspaceStore.workspace.activeDocument?.info?.title}`\"\n class=\"references-rendered\"\n :inert=\"agent.showAgent.value\">\n <Content\n :authStore=\"workspaceStore.auth\"\n :document=\"workspaceStore.workspace.activeDocument\"\n :environment\n :eventBus\n :expandedItems=\"sidebarState.expandedItems.value\"\n :headingSlugGenerator=\"\n mergedConfig.generateHeadingSlug ??\n ((heading) => `${activeSlug}/description/${heading.slug}`)\n \"\n :infoSectionId=\"infoSectionId ?? 'description/introduction'\"\n :items=\"sidebarItems\"\n :options=\"mergedConfig\"\n :xScalarDefaultClient=\"\n workspaceStore.workspace['x-scalar-default-client']\n \">\n <template #start>\n <DeveloperTools\n v-if=\"\n workspaceStore.workspace.activeDocument && mediaQueries.lg.value\n \"\n v-model:overrides=\"configurationOverrides\"\n :configuration=\"mergedConfig\"\n :workspace=\"workspaceStore\" />\n\n <!-- Placeholder intersection observer that emits an empty string to clear the hash when scrolled to the top -->\n <div ref=\"documentStartRef\" />\n\n <ClassicHeader v-if=\"mergedConfig.layout === 'classic'\">\n <div class=\"w-64 empty:hidden\">\n <DocumentSelector\n v-if=\"documentOptionList.length > 1\"\n :modelValue=\"activeSlug\"\n :options=\"documentOptionList\"\n @update:modelValue=\"changeSelectedDocument\" />\n </div>\n <SearchButton\n v-if=\"!mergedConfig.hideSearch\"\n class=\"t-doc__sidebar max-w-64\"\n :document=\"workspaceStore.workspace.activeDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :searchHotKey=\"mergedConfig.searchHotKey\" />\n <template #dark-mode-toggle>\n <ScalarColorModeToggleIcon\n v-if=\"\n !mergedConfig.hideDarkModeToggle &&\n !mergedConfig.forceDarkModeState\n \"\n class=\"text-c-2 hover:text-c-1\"\n :mode=\"colorMode\"\n style=\"transform: scale(1.4)\"\n variant=\"icon\"\n @click=\"() => toggleColorMode()\" />\n </template>\n </ClassicHeader>\n <slot\n name=\"content-start\"\n v-bind=\"slotProps\" />\n </template>\n <!-- TODO: Remove this; we no longer directly support an inline editor -->\n <template\n v-if=\"mergedConfig.isEditable\"\n #empty-state>\n <slot\n name=\"editor-placeholder\"\n v-bind=\"slotProps\" />\n </template>\n <template #end>\n <slot\n name=\"content-end\"\n v-bind=\"slotProps\" />\n </template>\n </Content>\n </main>\n <!-- Optional Footer -->\n <div\n v-if=\"$slots.footer\"\n class=\"references-footer\">\n <slot\n name=\"footer\"\n v-bind=\"slotProps\" />\n </div>\n <!-- Client Modal mount point -->\n <div ref=\"modal\" />\n </div>\n <ScalarToasts />\n </div>\n</template>\n\n<style>\n@import '@/style.css';\n\n/* Add base styles to the body. Removed browser default margins for a better experience. */\n@layer scalar-base {\n body {\n margin: 0;\n background-color: var(--scalar-background-1);\n }\n}\n/** Used to check if css is loaded */\n:root {\n --scalar-loaded-api-reference: true;\n}\n</style>\n<style scoped>\n/* Configurable Layout Variables */\n@layer scalar-config {\n .scalar-api-reference {\n /* The header height */\n --refs-header-height: calc(\n var(--scalar-custom-header-height, 0px) + var(--scalar-header-height, 0px)\n );\n /* The offset of visible references content (minus headers) */\n --refs-viewport-offset: calc(\n var(--refs-header-height, 0px) + var(--refs-content-offset, 0px)\n );\n /* The calculated height of visible references content (minus headers) */\n --refs-viewport-height: calc(\n var(--full-height, 100dvh) - var(--refs-viewport-offset, 0px)\n );\n /* The width of the sidebar */\n --refs-sidebar-width: var(--scalar-sidebar-width, 0px);\n /* The height of the sidebar */\n --refs-sidebar-height: calc(\n var(--full-height, 100dvh) - var(--refs-header-height, 0px)\n );\n /* The maximum width of the content column */\n --refs-content-max-width: var(--scalar-content-max-width, 1540px);\n }\n\n .scalar-api-reference.references-classic {\n /* Classic layout is wider */\n --refs-content-max-width: var(--scalar-content-max-width, 1420px);\n min-height: 100dvh;\n --refs-sidebar-width: 0;\n }\n}\n.t-doc__sidebar {\n z-index: 10;\n}\n\n/* ----------------------------------------------------- */\n/* References Layout */\n.references-layout {\n /* Try to fill the container */\n min-height: 100dvh;\n min-width: 100%;\n max-width: 100%;\n flex: 1;\n\n /*\n Calculated by a resize observer and set in the style attribute\n Falls back to the viewport height\n */\n --full-height: 100dvh;\n\n /* Grid layout */\n display: grid;\n grid-template-rows: var(--scalar-header-height, 0px) repeat(2, auto);\n grid-template-columns: auto 1fr;\n grid-template-areas:\n 'header header'\n 'navigation rendered'\n 'footer footer';\n\n background: var(--scalar-background-1);\n}\n\n.references-editor {\n grid-area: editor;\n display: flex;\n min-width: 0;\n background: var(--scalar-background-1);\n}\n\n.references-rendered {\n position: relative;\n grid-area: rendered;\n min-width: 0;\n background: var(--scalar-background-1);\n}\n.scalar-api-reference.references-classic,\n.references-classic .references-rendered {\n height: initial !important;\n max-height: initial !important;\n}\n\n@layer scalar-config {\n .references-sidebar {\n /* Set a default width if references are enabled */\n --refs-sidebar-width: var(--scalar-sidebar-width, 288px);\n }\n}\n\n/* Footer */\n.references-footer {\n grid-area: footer;\n}\n/* ----------------------------------------------------- */\n/* Responsive / Mobile Layout */\n\n@media (max-width: 1000px) {\n /* Stack view on mobile */\n .references-layout {\n /* Adjust the sidebar height to the viewport height minus the header height */\n --refs-sidebar-height: calc(\n var(--full-height, 100dvh) - var(--scalar-custom-header-height, 0px)\n );\n\n grid-template-columns: 100%;\n grid-template-rows: var(--scalar-header-height, 0px) 0px auto auto;\n\n grid-template-areas:\n 'header'\n 'navigation'\n 'rendered'\n 'footer';\n }\n .references-editable {\n grid-template-areas:\n 'header'\n 'navigation'\n 'editor';\n }\n\n .references-rendered {\n position: static;\n }\n}\n</style>\n<style scoped>\n/**\n* Sidebar CSS for standalone\n* TODO: @brynn move this to the sidebar block OR the ApiReferenceStandalone component\n* when the new elements are available\n*/\n@media (max-width: 1000px) {\n .scalar-api-references-standalone-mobile:not(.references-classic) {\n --scalar-header-height: 50px;\n }\n}\n</style>\n<style scoped>\n.darklight-reference {\n width: 100%;\n margin-top: auto;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components'\nimport { themeLabels, type ThemeId } from '@scalar/themes'\n\ndefineProps<{\n theme: ThemeId\n}>()\n\nconst emits = defineEmits<{\n (e: 'changeTheme', { id, label }: { id: ThemeId; label: string }): void\n (e: 'loadSwaggerFile'): void\n (e: 'linkSwaggerFile'): void\n (e: 'updateContent', value: string): void\n}>()\n\nconst themeIds: ThemeId[] = [\n 'default',\n 'alternate',\n 'moon',\n 'purple',\n 'solarized',\n 'bluePlanet',\n 'saturn',\n 'kepler',\n 'mars',\n 'deepSpace',\n]\n\nasync function fetchExampleSpecification() {\n const response = await fetch(\n 'https://registry.scalar.com/@scalar/apis/galaxy?format=yaml',\n )\n\n emits('updateContent', await response.text())\n}\n</script>\n<template>\n <div class=\"custom-scroll start\">\n <div class=\"start-copy\">\n <div class=\"start-logo\">\n <svg\n height=\"36\"\n viewBox=\"0 0 36 36\"\n width=\"36\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M18 0a18 18 0 1 1 0 36 18 18 0 0 1 0-36Zm11.2 6.5c-3.3-3.3-11.1-1-17.4 5.3-6.2 6.3-8.6 14-5.3 17.4 3.3 3.3 11 .9 17.3-5.4 6.3-6.2 8.7-14 5.4-17.3ZM17.6 12a6.3 6.3 0 1 1 0 12.7 6.3 6.3 0 0 1 0-12.7Z\"\n fill=\"currentColor\"\n fill-rule=\"evenodd\" />\n </svg>\n </div>\n <h1 class=\"start-h1\">Swagger Editor</h1>\n <p class=\"start-p\">\n Welcome to the Scalar API References + Swagger Editor, a Free &\n Open-Source tool that takes your Swagger/OAS file and generates\n Beautiful API references.\n </p>\n <div class=\"start-cta\">\n <ScalarButton\n class=\"w-full\"\n @click=\"fetchExampleSpecification\">\n Show Example\n </ScalarButton>\n <ScalarButton\n class=\"w-full\"\n variant=\"outlined\"\n @click=\"$emit('loadSwaggerFile')\">\n Upload File\n </ScalarButton>\n </div>\n </div>\n <div class=\"start-row\">\n <div class=\"start-section start-section-integrations\">\n <div class=\"start-h2\">INTEGRATIONS</div>\n <a\n class=\"start-item\"\n href=\"https://github.com/scalar/scalar/tree/main/integrations/fastify#readme\"\n target=\"_blank\">\n <svg\n fill=\"currentColor\"\n height=\"16\"\n viewBox=\"0 0 19 16\"\n width=\"19\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"m18.2 3.1.8-2V.9l-4.7 1.3C15.2 1 15 0 15 0s-2.5 1.6-4.3 1.5c-2 0-3.6.8-4 1-1.8 1.2-2.5 3.3-3.2 3.8L0 8.9 2.3 8l-2 2.5c.2.3 1.2 1.6 2.1 1.3l.4-.1 1.6.5-.7-1 .2-.2.9.3-.1-.8.9.3-.1-.8.3-.1 1-3.5 3.7-2.6-.3.7A4 4 0 0 1 8 7l-.6.2c-.5.5-.7.7-.8 2.5a2 2 0 0 1 1 0c1.6.4 2.2 2.3 1.7 2.9l-.7.6H8v.6h-.7v.5l-.2.2c-.7 0-1.4-.6-1.4-.6 0 .5.4 1.3.4 1.3s1.7 1.1 2.7.7c1-.4.7-2.3 2.8-3.2l3.3-.9.8-2.2-1.7.5v-2l2.5-.6.9-2.2-3.4.9v-2l4.2-1.1Z\"\n fill=\"currentColor\"\n fill-rule=\"nonzero\" />\n </svg>\n <span>Fastify</span>\n </a>\n <a\n class=\"start-item\"\n href=\"https://github.com/scalar/scalar/blob/main/documentation/integrations/html-js.md#html\"\n target=\"_blank\">\n <svg\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g>\n <path\n d=\"M22.5 1.5h-21A1.5 1.5 0 0 0 0 3v3a1.5 1.5 0 0 0 1.5 1.5h21A1.5 1.5 0 0 0 24 6V3a1.5 1.5 0 0 0-1.5-1.5Zm-19.25 3A1.25 1.25 0 1 1 4.5 5.75 1.25 1.25 0 0 1 3.25 4.5ZM8.5 5.75A1.25 1.25 0 1 1 9.75 4.5 1.25 1.25 0 0 1 8.5 5.75Z\"\n fill=\"currentColor\" />\n <path\n d=\"M22.5 9h-21A1.5 1.5 0 0 0 0 10.5v3A1.5 1.5 0 0 0 1.5 15h21a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 22.5 9ZM3.25 12a1.25 1.25 0 1 1 1.25 1.25A1.25 1.25 0 0 1 3.25 12Zm5.25 1.25A1.25 1.25 0 1 1 9.75 12a1.25 1.25 0 0 1-1.25 1.25Z\"\n fill=\"currentColor\" />\n <path\n d=\"M22.5 16.5h-21A1.5 1.5 0 0 0 0 18v3a1.5 1.5 0 0 0 1.5 1.5h21A1.5 1.5 0 0 0 24 21v-3a1.5 1.5 0 0 0-1.5-1.5Zm-19.25 3a1.25 1.25 0 1 1 1.25 1.25 1.25 1.25 0 0 1-1.25-1.25Zm5.25 1.25a1.25 1.25 0 1 1 1.25-1.25 1.25 1.25 0 0 1-1.25 1.25Z\"\n fill=\"currentColor\" />\n </g>\n </svg>\n <span>CDN</span>\n </a>\n <a\n class=\"start-item\"\n href=\"https://github.com/scalar/scalar/blob/main/packages/api-reference/README.md#vuejs\"\n target=\"_blank\">\n <svg\n height=\"170\"\n viewBox=\"0 0 196.3 170\"\n width=\"196.3\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g\n fill=\"currentColor\"\n fill-rule=\"nonzero\">\n <polygon\n points=\"39.23 0 0 0 2.9450761 5.1010782 98.16 170.02 196.32 0 157.06 0 98.16 102.01 42.175701 5.0991171\" />\n <polygon\n points=\"75.5 2.009956e-14 0 2.009956e-14 2.94 5.1 78.44871 5.1 98.16 39.26 117.87937 5.1 193.38 5.1 196.325 0 120.82 7.8065636e-15 114.97322 2.009956e-14 98.16 29.037153 81.35 2.009956e-14\" />\n </g>\n </svg>\n <span>Vue</span>\n </a>\n <a\n class=\"start-item\"\n href=\"https://github.com/scalar/scalar/blob/main/packages/api-reference-react/README.md#usage\"\n target=\"_blank\">\n <svg\n height=\"23.3\"\n viewBox=\"0 0 22 23.3\"\n width=\"22\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g\n fill=\"none\"\n fill-rule=\"evenodd\">\n <circle\n cx=\"11\"\n cy=\"11.6\"\n fill=\"currentColor\"\n fill-rule=\"nonzero\"\n r=\"2\" />\n <g stroke=\"currentColor\">\n <ellipse\n cx=\"11\"\n cy=\"11.6\"\n rx=\"11\"\n ry=\"4.2\" />\n <ellipse\n cx=\"11\"\n cy=\"11.6\"\n rx=\"11\"\n ry=\"4.2\"\n transform=\"rotate(60 11 11.6)\" />\n <ellipse\n cx=\"11\"\n cy=\"11.6\"\n rx=\"11\"\n ry=\"4.2\"\n transform=\"rotate(120 11 11.6)\" />\n </g>\n </g>\n </svg>\n <span>React</span>\n </a>\n </div>\n <div class=\"start-section start-section-colors\">\n <p class=\"start-h2\">THEMING</p>\n <div\n v-for=\"themeId in themeIds\"\n :key=\"themeId\"\n class=\"start-item\"\n :class=\"{ 'start-item-active': themeId === theme }\"\n @click=\"\n $emit('changeTheme', { id: themeId, label: themeLabels[themeId] })\n \">\n {{ themeLabels[themeId] }}\n </div>\n </div>\n </div>\n <p class=\"start-h1\">Features</p>\n <ul class=\"start-ul\">\n <li>\n <p class=\"start-h3\">Customize</p>\n Bring your typography & color palettes, or use our themes!\n </li>\n <li>\n <p class=\"start-h3\">Testing</p>\n A deeply integrated Rest API Client (Also Free & Open-Source)\n </li>\n <li>\n <p class=\"start-h3\">Search</p>\n Fully integrated Search (Using fuse.js)\n </li>\n <li>\n <p class=\"start-h3\">Hosting</p>\n Free subdomain hosting on https://apidocumentation.com\n </li>\n <li>\n <p class=\"start-h3\">OpenAPI & Swagger</p>\n Support for OpenAPI 3.1, OpenAPI 3.0, and Swagger 2.0\n </li>\n <li>\n <p class=\"start-h3\">Code Samples</p>\n Code samples to show off your API in most popular languages\n </li>\n </ul>\n </div>\n</template>\n<style scoped>\n.start {\n padding: 24px;\n display: flex;\n flex-flow: wrap;\n justify-content: space-between;\n position: relative;\n z-index: 0;\n}\n.swagger-editor .start {\n padding-top: 24px;\n}\n.start-h1 {\n font-size: var(--scalar-heading-2);\n margin-top: 0;\n line-height: 1.45;\n margin-bottom: 0;\n font-weight: var(--scalar-bold);\n color: var(--scalar-color-1);\n width: 100%;\n position: relative;\n}\n.start-h3 {\n font-size: var(--scalar-paragraph);\n margin-top: 0;\n margin-bottom: 6px;\n display: block;\n line-height: 1.45;\n font-weight: var(--scalar-bold);\n color: var(--scalar-color-1);\n width: 100%;\n}\n.start-h1:not(:first-of-type) {\n margin-top: 24px;\n}\n.start-p {\n font-size: var(--scalar-paragraph);\n color: var(--scalar-color-2);\n line-height: 1.5;\n width: 100%;\n margin-top: 12px;\n}\n.start-ul {\n margin-top: 12px;\n font-size: var(--scalar-paragraph);\n line-height: 1.5;\n padding-left: 0;\n list-style: initial;\n display: flex;\n flex-flow: wrap;\n gap: 24px;\n}\n.start-ul li {\n margin: 0;\n padding: 0;\n list-style: none;\n width: calc(50% - 24px);\n color: var(--scalar-color-2);\n}\n.start-ul li:first-of-type {\n margin-top: 0;\n}\n.start-section {\n width: 100%;\n margin-bottom: 12px;\n display: flex;\n flex-flow: wrap;\n}\n.start-section:last-of-type {\n margin-bottom: 48px;\n}\n.start-h2 {\n background: var(--scalar-background-2);\n border-top-left-radius: var(--scalar-radius-lg);\n border-top-right-radius: var(--scalar-radius-lg);\n border: 1px solid var(--scalar-border-color);\n color: var(--scalar-color-3);\n font-size: var(--scalar-mini);\n font-weight: var(--scalar-semibold);\n padding: 9px;\n width: 100%;\n}\n.start-item {\n align-items: center;\n background: var(--scalar-background-2);\n border-right: 1px solid var(--scalar-border-color);\n border-bottom: 1px solid var(--scalar-border-color);\n color: var(--scalar-color-1);\n cursor: pointer;\n display: flex;\n flex: 1;\n font-size: var(--scalar-mini);\n font-weight: var(--scalar-semibold);\n padding: 9px;\n text-transform: capitalize;\n user-select: none;\n}\n.start-section-integrations .start-item:first-of-type {\n border-bottom-left-radius: var(--scalar-radius-lg);\n border-left: 1px solid var(--scalar-border-color);\n}\n.start-section-integrations .start-item:last-of-type {\n border-bottom-right-radius: var(--scalar-radius-lg);\n}\n.start-section-colors .start-item {\n min-width: 33.33%;\n}\n.start-section-colors .start-item:nth-child(3n + 2) {\n border-left: 1px solid var(--scalar-border-color);\n}\n.start-section-colors .start-item:last-of-type,\n.start-section-colors .start-item-active:last-of-type::before {\n border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n.start-item:empty {\n pointer-events: none;\n}\n.start-item svg {\n width: 14px;\n height: 14px;\n margin-right: 6px;\n}\n.start-item:hover {\n background: var(--scalar-background-3);\n}\n.start-item-active {\n z-index: 10;\n position: relative;\n color: var(--scalar-color-1);\n}\n.start-item-active::before {\n border: 1px solid var(--scalar-color-1);\n content: '';\n inset: -1px -1px -1px -1px;\n pointer-events: none;\n position: absolute;\n}\n.start-section-color .start-item {\n text-transform: capitalize;\n}\n.start-cta {\n display: flex;\n gap: 12px;\n width: 100%;\n margin-top: 24px;\n margin-bottom: 0;\n}\n.start-row {\n width: 100%;\n margin-top: 12px;\n overflow: hidden;\n}\n.start-hero-copy {\n background: var(--scalar-background-2);\n padding: 12px;\n border-radius: var(--scalar-radius-lg);\n}\n.start-p-small {\n font-weight: var(--scalar-semibold);\n font-size: var(--scalar-mini);\n color: var(--scalar-color-2);\n margin-bottom: 12px;\n line-height: 1.4;\n}\n.start-cta {\n margin-bottom: 12px;\n width: fit-content;\n white-space: nowrap;\n}\n.start-copy {\n padding: 76px 48px 48px 48px;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n text-align: center;\n}\n.start-logo {\n color: var(--scalar-color-1);\n margin-bottom: 24px;\n width: 72px;\n aspect-ratio: 1;\n position: relative;\n box-shadow: var(--scalar-shadow-2);\n border-radius: 50%;\n}\n.start-logo:before {\n content: '';\n width: 300%;\n aspect-ratio: 1;\n left: -100%;\n top: -100%;\n position: absolute;\n z-index: -1;\n border-radius: 50%;\n background-size: 24px 24px;\n box-shadow:\n inset 0 0 50px var(--scalar-background-1),\n inset 0 0 50px var(--scalar-background-1);\n background-image:\n linear-gradient(to right, var(--scalar-border-color) 1px, transparent 1px),\n linear-gradient(to bottom, var(--scalar-border-color) 1px, transparent 1px);\n}\n.start-logo svg {\n width: 100%;\n height: auto;\n background: var(--scalar-background-1);\n padding: 3px;\n border-radius: 50%;\n position: relative;\n}\n@media screen and (max-width: 600px) {\n .start-section-colors .start-item,\n .start-item {\n width: 100%;\n border-radius: 0;\n border-right: none;\n border-top: 1px solid var(--scalar-border-color);\n }\n .start-item:empty {\n display: none;\n }\n .start-h2 {\n border-bottom: none;\n }\n .start li {\n width: 100%;\n }\n .start-copy {\n padding: 48px 0 24px 0;\n }\n}\n@media screen and (max-width: 1000px) {\n .start {\n padding: 0;\n overflow: auto;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components'\nimport { themeLabels, type ThemeId } from '@scalar/themes'\n\ndefineProps<{\n theme: ThemeId\n}>()\n\nconst emits = defineEmits<{\n (e: 'changeTheme', { id, label }: { id: ThemeId; label: string }): void\n (e: 'loadSwaggerFile'): void\n (e: 'linkSwaggerFile'): void\n (e: 'updateContent', value: string): void\n}>()\n\nconst themeIds: ThemeId[] = [\n 'default',\n 'alternate',\n 'moon',\n 'purple',\n 'solarized',\n 'bluePlanet',\n 'saturn',\n 'kepler',\n 'mars',\n 'deepSpace',\n]\n\nasync function fetchExampleSpecification() {\n const response = await fetch(\n 'https://registry.scalar.com/@scalar/apis/galaxy?format=yaml',\n )\n\n emits('updateContent', await response.text())\n}\n</script>\n<template>\n <div class=\"custom-scroll start\">\n <div class=\"start-copy\">\n <div class=\"start-logo\">\n <svg\n height=\"36\"\n viewBox=\"0 0 36 36\"\n width=\"36\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M18 0a18 18 0 1 1 0 36 18 18 0 0 1 0-36Zm11.2 6.5c-3.3-3.3-11.1-1-17.4 5.3-6.2 6.3-8.6 14-5.3 17.4 3.3 3.3 11 .9 17.3-5.4 6.3-6.2 8.7-14 5.4-17.3ZM17.6 12a6.3 6.3 0 1 1 0 12.7 6.3 6.3 0 0 1 0-12.7Z\"\n fill=\"currentColor\"\n fill-rule=\"evenodd\" />\n </svg>\n </div>\n <h1 class=\"start-h1\">Swagger Editor</h1>\n <p class=\"start-p\">\n Welcome to the Scalar API References + Swagger Editor, a Free &\n Open-Source tool that takes your Swagger/OAS file and generates\n Beautiful API references.\n </p>\n <div class=\"start-cta\">\n <ScalarButton\n class=\"w-full\"\n @click=\"fetchExampleSpecification\">\n Show Example\n </ScalarButton>\n <ScalarButton\n class=\"w-full\"\n variant=\"outlined\"\n @click=\"$emit('loadSwaggerFile')\">\n Upload File\n </ScalarButton>\n </div>\n </div>\n <div class=\"start-row\">\n <div class=\"start-section start-section-integrations\">\n <div class=\"start-h2\">INTEGRATIONS</div>\n <a\n class=\"start-item\"\n href=\"https://github.com/scalar/scalar/tree/main/integrations/fastify#readme\"\n target=\"_blank\">\n <svg\n fill=\"currentColor\"\n height=\"16\"\n viewBox=\"0 0 19 16\"\n width=\"19\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"m18.2 3.1.8-2V.9l-4.7 1.3C15.2 1 15 0 15 0s-2.5 1.6-4.3 1.5c-2 0-3.6.8-4 1-1.8 1.2-2.5 3.3-3.2 3.8L0 8.9 2.3 8l-2 2.5c.2.3 1.2 1.6 2.1 1.3l.4-.1 1.6.5-.7-1 .2-.2.9.3-.1-.8.9.3-.1-.8.3-.1 1-3.5 3.7-2.6-.3.7A4 4 0 0 1 8 7l-.6.2c-.5.5-.7.7-.8 2.5a2 2 0 0 1 1 0c1.6.4 2.2 2.3 1.7 2.9l-.7.6H8v.6h-.7v.5l-.2.2c-.7 0-1.4-.6-1.4-.6 0 .5.4 1.3.4 1.3s1.7 1.1 2.7.7c1-.4.7-2.3 2.8-3.2l3.3-.9.8-2.2-1.7.5v-2l2.5-.6.9-2.2-3.4.9v-2l4.2-1.1Z\"\n fill=\"currentColor\"\n fill-rule=\"nonzero\" />\n </svg>\n <span>Fastify</span>\n </a>\n <a\n class=\"start-item\"\n href=\"https://github.com/scalar/scalar/blob/main/documentation/integrations/html-js.md#html\"\n target=\"_blank\">\n <svg\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g>\n <path\n d=\"M22.5 1.5h-21A1.5 1.5 0 0 0 0 3v3a1.5 1.5 0 0 0 1.5 1.5h21A1.5 1.5 0 0 0 24 6V3a1.5 1.5 0 0 0-1.5-1.5Zm-19.25 3A1.25 1.25 0 1 1 4.5 5.75 1.25 1.25 0 0 1 3.25 4.5ZM8.5 5.75A1.25 1.25 0 1 1 9.75 4.5 1.25 1.25 0 0 1 8.5 5.75Z\"\n fill=\"currentColor\" />\n <path\n d=\"M22.5 9h-21A1.5 1.5 0 0 0 0 10.5v3A1.5 1.5 0 0 0 1.5 15h21a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 22.5 9ZM3.25 12a1.25 1.25 0 1 1 1.25 1.25A1.25 1.25 0 0 1 3.25 12Zm5.25 1.25A1.25 1.25 0 1 1 9.75 12a1.25 1.25 0 0 1-1.25 1.25Z\"\n fill=\"currentColor\" />\n <path\n d=\"M22.5 16.5h-21A1.5 1.5 0 0 0 0 18v3a1.5 1.5 0 0 0 1.5 1.5h21A1.5 1.5 0 0 0 24 21v-3a1.5 1.5 0 0 0-1.5-1.5Zm-19.25 3a1.25 1.25 0 1 1 1.25 1.25 1.25 1.25 0 0 1-1.25-1.25Zm5.25 1.25a1.25 1.25 0 1 1 1.25-1.25 1.25 1.25 0 0 1-1.25 1.25Z\"\n fill=\"currentColor\" />\n </g>\n </svg>\n <span>CDN</span>\n </a>\n <a\n class=\"start-item\"\n href=\"https://github.com/scalar/scalar/blob/main/packages/api-reference/README.md#vuejs\"\n target=\"_blank\">\n <svg\n height=\"170\"\n viewBox=\"0 0 196.3 170\"\n width=\"196.3\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g\n fill=\"currentColor\"\n fill-rule=\"nonzero\">\n <polygon\n points=\"39.23 0 0 0 2.9450761 5.1010782 98.16 170.02 196.32 0 157.06 0 98.16 102.01 42.175701 5.0991171\" />\n <polygon\n points=\"75.5 2.009956e-14 0 2.009956e-14 2.94 5.1 78.44871 5.1 98.16 39.26 117.87937 5.1 193.38 5.1 196.325 0 120.82 7.8065636e-15 114.97322 2.009956e-14 98.16 29.037153 81.35 2.009956e-14\" />\n </g>\n </svg>\n <span>Vue</span>\n </a>\n <a\n class=\"start-item\"\n href=\"https://github.com/scalar/scalar/blob/main/packages/api-reference-react/README.md#usage\"\n target=\"_blank\">\n <svg\n height=\"23.3\"\n viewBox=\"0 0 22 23.3\"\n width=\"22\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g\n fill=\"none\"\n fill-rule=\"evenodd\">\n <circle\n cx=\"11\"\n cy=\"11.6\"\n fill=\"currentColor\"\n fill-rule=\"nonzero\"\n r=\"2\" />\n <g stroke=\"currentColor\">\n <ellipse\n cx=\"11\"\n cy=\"11.6\"\n rx=\"11\"\n ry=\"4.2\" />\n <ellipse\n cx=\"11\"\n cy=\"11.6\"\n rx=\"11\"\n ry=\"4.2\"\n transform=\"rotate(60 11 11.6)\" />\n <ellipse\n cx=\"11\"\n cy=\"11.6\"\n rx=\"11\"\n ry=\"4.2\"\n transform=\"rotate(120 11 11.6)\" />\n </g>\n </g>\n </svg>\n <span>React</span>\n </a>\n </div>\n <div class=\"start-section start-section-colors\">\n <p class=\"start-h2\">THEMING</p>\n <div\n v-for=\"themeId in themeIds\"\n :key=\"themeId\"\n class=\"start-item\"\n :class=\"{ 'start-item-active': themeId === theme }\"\n @click=\"\n $emit('changeTheme', { id: themeId, label: themeLabels[themeId] })\n \">\n {{ themeLabels[themeId] }}\n </div>\n </div>\n </div>\n <p class=\"start-h1\">Features</p>\n <ul class=\"start-ul\">\n <li>\n <p class=\"start-h3\">Customize</p>\n Bring your typography & color palettes, or use our themes!\n </li>\n <li>\n <p class=\"start-h3\">Testing</p>\n A deeply integrated Rest API Client (Also Free & Open-Source)\n </li>\n <li>\n <p class=\"start-h3\">Search</p>\n Fully integrated Search (Using fuse.js)\n </li>\n <li>\n <p class=\"start-h3\">Hosting</p>\n Free subdomain hosting on https://apidocumentation.com\n </li>\n <li>\n <p class=\"start-h3\">OpenAPI & Swagger</p>\n Support for OpenAPI 3.1, OpenAPI 3.0, and Swagger 2.0\n </li>\n <li>\n <p class=\"start-h3\">Code Samples</p>\n Code samples to show off your API in most popular languages\n </li>\n </ul>\n </div>\n</template>\n<style scoped>\n.start {\n padding: 24px;\n display: flex;\n flex-flow: wrap;\n justify-content: space-between;\n position: relative;\n z-index: 0;\n}\n.swagger-editor .start {\n padding-top: 24px;\n}\n.start-h1 {\n font-size: var(--scalar-heading-2);\n margin-top: 0;\n line-height: 1.45;\n margin-bottom: 0;\n font-weight: var(--scalar-bold);\n color: var(--scalar-color-1);\n width: 100%;\n position: relative;\n}\n.start-h3 {\n font-size: var(--scalar-paragraph);\n margin-top: 0;\n margin-bottom: 6px;\n display: block;\n line-height: 1.45;\n font-weight: var(--scalar-bold);\n color: var(--scalar-color-1);\n width: 100%;\n}\n.start-h1:not(:first-of-type) {\n margin-top: 24px;\n}\n.start-p {\n font-size: var(--scalar-paragraph);\n color: var(--scalar-color-2);\n line-height: 1.5;\n width: 100%;\n margin-top: 12px;\n}\n.start-ul {\n margin-top: 12px;\n font-size: var(--scalar-paragraph);\n line-height: 1.5;\n padding-left: 0;\n list-style: initial;\n display: flex;\n flex-flow: wrap;\n gap: 24px;\n}\n.start-ul li {\n margin: 0;\n padding: 0;\n list-style: none;\n width: calc(50% - 24px);\n color: var(--scalar-color-2);\n}\n.start-ul li:first-of-type {\n margin-top: 0;\n}\n.start-section {\n width: 100%;\n margin-bottom: 12px;\n display: flex;\n flex-flow: wrap;\n}\n.start-section:last-of-type {\n margin-bottom: 48px;\n}\n.start-h2 {\n background: var(--scalar-background-2);\n border-top-left-radius: var(--scalar-radius-lg);\n border-top-right-radius: var(--scalar-radius-lg);\n border: 1px solid var(--scalar-border-color);\n color: var(--scalar-color-3);\n font-size: var(--scalar-mini);\n font-weight: var(--scalar-semibold);\n padding: 9px;\n width: 100%;\n}\n.start-item {\n align-items: center;\n background: var(--scalar-background-2);\n border-right: 1px solid var(--scalar-border-color);\n border-bottom: 1px solid var(--scalar-border-color);\n color: var(--scalar-color-1);\n cursor: pointer;\n display: flex;\n flex: 1;\n font-size: var(--scalar-mini);\n font-weight: var(--scalar-semibold);\n padding: 9px;\n text-transform: capitalize;\n user-select: none;\n}\n.start-section-integrations .start-item:first-of-type {\n border-bottom-left-radius: var(--scalar-radius-lg);\n border-left: 1px solid var(--scalar-border-color);\n}\n.start-section-integrations .start-item:last-of-type {\n border-bottom-right-radius: var(--scalar-radius-lg);\n}\n.start-section-colors .start-item {\n min-width: 33.33%;\n}\n.start-section-colors .start-item:nth-child(3n + 2) {\n border-left: 1px solid var(--scalar-border-color);\n}\n.start-section-colors .start-item:last-of-type,\n.start-section-colors .start-item-active:last-of-type::before {\n border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n.start-item:empty {\n pointer-events: none;\n}\n.start-item svg {\n width: 14px;\n height: 14px;\n margin-right: 6px;\n}\n.start-item:hover {\n background: var(--scalar-background-3);\n}\n.start-item-active {\n z-index: 10;\n position: relative;\n color: var(--scalar-color-1);\n}\n.start-item-active::before {\n border: 1px solid var(--scalar-color-1);\n content: '';\n inset: -1px -1px -1px -1px;\n pointer-events: none;\n position: absolute;\n}\n.start-section-color .start-item {\n text-transform: capitalize;\n}\n.start-cta {\n display: flex;\n gap: 12px;\n width: 100%;\n margin-top: 24px;\n margin-bottom: 0;\n}\n.start-row {\n width: 100%;\n margin-top: 12px;\n overflow: hidden;\n}\n.start-hero-copy {\n background: var(--scalar-background-2);\n padding: 12px;\n border-radius: var(--scalar-radius-lg);\n}\n.start-p-small {\n font-weight: var(--scalar-semibold);\n font-size: var(--scalar-mini);\n color: var(--scalar-color-2);\n margin-bottom: 12px;\n line-height: 1.4;\n}\n.start-cta {\n margin-bottom: 12px;\n width: fit-content;\n white-space: nowrap;\n}\n.start-copy {\n padding: 76px 48px 48px 48px;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n text-align: center;\n}\n.start-logo {\n color: var(--scalar-color-1);\n margin-bottom: 24px;\n width: 72px;\n aspect-ratio: 1;\n position: relative;\n box-shadow: var(--scalar-shadow-2);\n border-radius: 50%;\n}\n.start-logo:before {\n content: '';\n width: 300%;\n aspect-ratio: 1;\n left: -100%;\n top: -100%;\n position: absolute;\n z-index: -1;\n border-radius: 50%;\n background-size: 24px 24px;\n box-shadow:\n inset 0 0 50px var(--scalar-background-1),\n inset 0 0 50px var(--scalar-background-1);\n background-image:\n linear-gradient(to right, var(--scalar-border-color) 1px, transparent 1px),\n linear-gradient(to bottom, var(--scalar-border-color) 1px, transparent 1px);\n}\n.start-logo svg {\n width: 100%;\n height: auto;\n background: var(--scalar-background-1);\n padding: 3px;\n border-radius: 50%;\n position: relative;\n}\n@media screen and (max-width: 600px) {\n .start-section-colors .start-item,\n .start-item {\n width: 100%;\n border-radius: 0;\n border-right: none;\n border-top: 1px solid var(--scalar-border-color);\n }\n .start-item:empty {\n display: none;\n }\n .start-h2 {\n border-bottom: none;\n }\n .start li {\n width: 100%;\n }\n .start-copy {\n padding: 48px 0 24px 0;\n }\n}\n@media screen and (max-width: 1000px) {\n .start {\n padding: 0;\n overflow: auto;\n }\n}\n</style>\n","import type {\n AnyApiReferenceConfiguration,\n ApiReferenceConfigurationWithSource,\n CreateApiReference,\n} from '@scalar/types/api-reference'\nimport { apiReferenceConfigurationWithSourceSchema } from '@scalar/types/api-reference'\nimport { createHead } from '@unhead/vue/client'\nimport { createApp, h, reactive } from 'vue'\n\nimport { default as ApiReference } from '@/components/ApiReference.vue'\n\nconst getSpecScriptTag = (doc: Document) => doc.getElementById('api-reference')\n\n/**\n * Reading the configuration from the data-attributes.\n */\nexport function getConfigurationFromDataAttributes(doc: Document): ApiReferenceConfigurationWithSource {\n const specElement = doc.querySelector('[data-spec]')\n const specUrlElement = doc.querySelector('[data-spec-url]')\n const configurationScriptElement = doc.querySelector('#api-reference[data-configuration]')\n\n const getConfiguration = () => {\n // <script data-configuration=\"{ … }\" />\n if (configurationScriptElement) {\n const configurationFromElement = configurationScriptElement.getAttribute('data-configuration')\n\n if (configurationFromElement) {\n return {\n _integration: 'html',\n ...JSON.parse(configurationFromElement.split('&quot;').join('\"')),\n }\n }\n }\n\n return apiReferenceConfigurationWithSourceSchema.parse({ _integration: 'html' })\n }\n\n const getUrl = () => {\n // Let's first check if the user passed a spec URL in the configuration.\n if (getConfiguration().url) {\n return getConfiguration().url\n }\n\n if (getConfiguration().spec?.url) {\n return getConfiguration().spec?.url\n }\n\n // <script id=\"api-reference\" data-url=\"/scalar.json\" />\n const specScriptTag = getSpecScriptTag(doc)\n if (specScriptTag) {\n const urlFromScriptTag = specScriptTag.getAttribute('data-url')?.trim()\n\n if (urlFromScriptTag) {\n return urlFromScriptTag\n }\n }\n\n // <div data-spec-url=\"/scalar.json\" />\n if (specUrlElement) {\n console.warn(\n '[@scalar/api-reference] The [data-spec-url] HTML API is deprecated. Use the new <script id=\"api-reference\" data-url=\"/scalar.json\" /> API instead.',\n )\n const urlFromSpecUrlElement = specUrlElement.getAttribute('data-spec-url')\n\n if (urlFromSpecUrlElement) {\n return urlFromSpecUrlElement\n }\n }\n\n return undefined\n }\n\n const getContent = (): string | undefined => {\n // <script id=\"api-reference\" type=\"application/json\">{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Example\"},\"paths\":{}}</script>\n const specScriptTag = getSpecScriptTag(doc)\n if (specScriptTag) {\n const specFromScriptTag = specScriptTag.innerHTML?.trim()\n\n if (specFromScriptTag) {\n return specFromScriptTag\n }\n }\n\n // <div data-spec='{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Example\"},\"paths\":{}}' />\n if (specElement) {\n console.warn(\n '[@scalar/api-reference] The [data-spec] HTML API is deprecated. Use the new <script id=\"api-reference\" type=\"application/json\">{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Example\"},\"paths\":{}}</script> API instead.',\n )\n const specFromSpecElement = specElement.getAttribute('data-spec')?.trim()\n\n if (specFromSpecElement) {\n return specFromSpecElement\n }\n }\n\n return undefined\n }\n\n const getProxyUrl = () => {\n // <script id=\"api-reference\" data-proxy-url=\"https://proxy.scalar.com\">…</script>\n const specScriptTag = getSpecScriptTag(doc)\n if (specScriptTag) {\n const proxyUrl = specScriptTag.getAttribute('data-proxy-url')\n\n if (proxyUrl) {\n return proxyUrl.trim()\n }\n }\n\n return undefined\n }\n\n // Ensure Reference Props are reactive\n if (!specUrlElement && !specElement && !getSpecScriptTag(doc)) {\n // Stay quiet.\n } else {\n const urlOrContent = getContent() ? { content: getContent() } : { url: getUrl() }\n\n return apiReferenceConfigurationWithSourceSchema.parse({\n _integration: 'html',\n proxyUrl: getProxyUrl(),\n ...getConfiguration(),\n ...urlOrContent,\n })\n }\n\n return apiReferenceConfigurationWithSourceSchema.parse({ _integration: 'html' })\n}\n\n/**\n * Mount the Scalar API Reference on a given document.\n * Read the HTML data-attributes for configuration.\n */\nexport function findDataAttributes(doc: Document, configuration: ApiReferenceConfigurationWithSource) {\n /** @deprecated Use the new <script id=\"api-reference\" data-url=\"/scalar.json\" /> API instead. */\n const specElement = doc.querySelector('[data-spec]')\n /** @deprecated Use the new <script id=\"api-reference\" data-url=\"/scalar.json\" /> API instead. */\n const specUrlElement = doc.querySelector('[data-spec-url]')\n\n if (configuration?.darkMode) {\n doc.body?.classList.add('dark-mode')\n } else {\n doc.body?.classList.add('light-mode')\n }\n\n const container = createContainer(doc, specElement || specUrlElement)\n\n if (container) {\n createApiReference(container, configuration)\n }\n}\n\n// If it's a script tag, we can't mount the Vue.js app inside that tag.\n// We need to add a new container element before the script tag.\nexport const createContainer = (doc: Document, element?: Element | null) => {\n let _container: Element | null = null\n\n const specScriptTag = getSpecScriptTag(doc)\n\n if (specScriptTag) {\n _container = doc.createElement('div')\n specScriptTag?.parentNode?.insertBefore(_container, specScriptTag)\n } else if (element) {\n _container = element\n }\n\n return _container\n}\n\n/**\n * Create (and mount) a new Scalar API Reference\n *\n * @example createApiReference({ url: '/scalar.json' }).mount('#app')\n * @example createApiReference('#app', { url: '/scalar.json' })\n * @example createApiReference(document.getElementById('app'), { url: '/scalar.json' })\n */\nexport const createApiReference: CreateApiReference = (\n elementOrSelectorOrConfig,\n optionalConfiguration?: AnyApiReferenceConfiguration,\n) => {\n // Create an id prefix for useId so we don't have collisions with other Vue apps\n const idPrefix = 'scalar-refs'\n\n const props = reactive<{ configuration: AnyApiReferenceConfiguration }>({\n // Either the configuration will be the second argument or it MUST be the first (configuration only)\n configuration: optionalConfiguration ?? (elementOrSelectorOrConfig as AnyApiReferenceConfiguration) ?? {},\n })\n\n // Create a new Vue app instance\n let app = createApp(() => h(ApiReference, props))\n\n // Meta tags, etc.\n app.use(createHead())\n\n app.config.idPrefix = idPrefix\n\n // If we have an optional config, then we must mount the element immediately (not sure why type is not narrowing)\n if (optionalConfiguration) {\n // If the element is a string, we need to find the actual DOM element\n const element =\n typeof elementOrSelectorOrConfig === 'string'\n ? document.querySelector(elementOrSelectorOrConfig)\n : (elementOrSelectorOrConfig as Element)\n\n if (element) {\n app.mount(element)\n } else {\n console.error('Could not find a mount point for API References:', elementOrSelectorOrConfig)\n }\n }\n\n /**\n * Reload the API Reference\n * @deprecated\n */\n document.addEventListener(\n 'scalar:reload-references',\n () => {\n console.warn(\n 'scalar:reload-references event has been deprecated, please use the scalarInstance.app.mount method instead.',\n )\n if (!props.configuration) {\n return\n }\n\n // Snag the current element\n const currentElement =\n typeof elementOrSelectorOrConfig === 'string'\n ? document.querySelector(elementOrSelectorOrConfig)\n : (elementOrSelectorOrConfig as Element)\n\n if (!currentElement) {\n return\n }\n\n // Ensure we re-attach the element if it was unmounted\n if (currentElement && !document.body.contains(currentElement)) {\n document.body.appendChild(currentElement)\n }\n\n // Create a new Vue app instance\n app.unmount()\n app = createApp(() => h(ApiReference, props))\n app.use(createHead())\n app.config.idPrefix = idPrefix\n app.mount(currentElement)\n },\n false,\n )\n\n /** Destroy the current API Reference instance */\n const destroy = () => {\n props.configuration = {}\n app.unmount()\n }\n\n /**\n * Allow user to destroy the API Reference\n * @deprecated\n */\n document.addEventListener(\n 'scalar:destroy-references',\n () => {\n console.warn('scalar:destroy-references event has been deprecated, please use scalarInstance.destroy instead.')\n destroy()\n },\n false,\n )\n\n /**\n * Allow user to update configuration\n * @deprecated\n */\n document.addEventListener(\n 'scalar:update-references-config',\n (ev) => {\n console.warn(\n 'scalar:update-references-config event has been deprecated, please use scalarInstance.updateConfiguration instead.',\n )\n if ('detail' in ev) {\n Object.assign(props, ev.detail)\n }\n },\n false,\n )\n\n const instance = {\n app,\n getConfiguration: () => props.configuration ?? {},\n updateConfiguration: (newConfig: AnyApiReferenceConfiguration) => {\n props.configuration = newConfig\n },\n destroy,\n }\n\n return instance\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECKA,MAAM,eAAe,iBAAgB;;uBAInC,mBAMS,UAAA;IALP,OA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AO,8BAA8B,WACjC,SAAS,cAAc,0BAA0B,GAChD;AAEP,MAAI,QACF,KAAI,MAAM,QAAQ;MAElB,SAAQ,MAAM,oDAAoD,0BAA0B;;;;;;AAQhG,UAAS,iBACP,kCACM;AACJ,UAAQ,KACN,8GACD;AACD,MAAI,CAAC,MAAM,cACT;EAIF,MAAM,iBACJ,OAAO,8BAA8B,WACjC,SAAS,cAAc,0BAA0B,GAChD;AAEP,MAAI,CAAC,eACH;AAIF,MAAI,kBAAkB,CAAC,SAAS,KAAK,SAAS,eAAe,CAC3D,UAAS,KAAK,YAAY,eAAe;AAI3C,MAAI,SAAS;AACb,QAAM,gBAAgB,EAAE,sBAAc,MAAM,CAAC;AAC7C,MAAI,IAAI,YAAY,CAAC;AACrB,MAAI,OAAO,WAAW;AACtB,MAAI,MAAM,eAAe;IAE3B,MACD;;CAGD,MAAM,gBAAgB;AACpB,QAAM,gBAAgB,EAAE;AACxB,MAAI,SAAS;;;;;;AAOf,UAAS,iBACP,mCACM;AACJ,UAAQ,KAAK,kGAAkG;AAC/G,WAAS;IAEX,MACD;;;;;AAMD,UAAS,iBACP,oCACC,OAAO;AACN,UAAQ,KACN,oHACD;AACD,MAAI,YAAY,GACd,QAAO,OAAO,OAAO,GAAG,OAAO;IAGnC,MACD;AAWD,QATiB;EACf;EACA,wBAAwB,MAAM,iBAAiB,EAAE;EACjD,sBAAsB,cAA4C;AAChE,SAAM,gBAAgB;;EAExB;EACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"storage--3JuzjCI.js","names":[],"sources":["../src/helpers/storage.ts"],"sourcesContent":["import { REFERENCE_LS_KEYS, safeLocalStorage } from '@scalar/helpers/object/local-storage'\nimport { type Auth, AuthSchema } from '@scalar/workspace-store/entities/auth'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\n\n// Local storage helper instance, safely wrapped.\nconst storage = safeLocalStorage()\n\n/**\n * Provides an interface to store and retrieve the selected client value\n * in local storage.\n */\nexport const clientStorage = () => {\n const key = REFERENCE_LS_KEYS.SELECTED_CLIENT\n return {\n /**\n * Gets the stored selected client from local storage.\n */\n get: () => {\n return storage.getItem(key)\n },\n /**\n * Stores the selected client value in local storage.\n * @param value The value to store\n */\n set: (value: string) => {\n storage.setItem(key, value as string)\n },\n }\n}\n\n/**\n * Provides an interface to store and retrieve authentication scheme\n * information in local storage, including both the available schemes and\n * the user's selected schemes.\n */\nexport const authStorage = () => {\n const getKey = (slug: string) => {\n return `${REFERENCE_LS_KEYS.AUTH}-${slug}`\n }\n\n return {\n /**\n * Retrieves and coerces the authentication schemes stored in local storage.\n */\n getAuth: (slug: string) => {\n const parsed = JSON.parse(storage.getItem(getKey(slug)) ?? '{}')\n return coerceValue(AuthSchema, parsed)\n },\n /**\n * Stores the authentication schemes in local storage.\n * @param value The Auth object to stringify and store.\n */\n setAuth: (slug: string, value: Auth) => {\n storage.setItem(getKey(slug), JSON.stringify(value))\n },\n }\n}\n"],"mappings":";;;;AAKA,IAAM,UAAU,kBAAkB;;;;;AAMlC,IAAa,sBAAsB;CACjC,MAAM,MAAM,kBAAkB;AAC9B,QAAO;EAIL,WAAW;AACT,UAAO,QAAQ,QAAQ,IAAI;;EAM7B,MAAM,UAAkB;AACtB,WAAQ,QAAQ,KAAK,MAAgB;;EAExC;;;;;;;AAQH,IAAa,oBAAoB;CAC/B,MAAM,UAAU,SAAiB;AAC/B,SAAO,GAAG,kBAAkB,KAAK,GAAG;;AAGtC,QAAO;EAIL,UAAU,SAAiB;AAEzB,UAAO,YAAY,YADJ,KAAK,MAAM,QAAQ,QAAQ,OAAO,KAAK,CAAC,IAAI,KAAK,CAC1B;;EAMxC,UAAU,MAAc,UAAgB;AACtC,WAAQ,QAAQ,OAAO,KAAK,EAAE,KAAK,UAAU,MAAM,CAAC;;EAEvD"}