zudoku 0.0.0-feda542 → 0.0.0-ff27e7ea

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 (2034) hide show
  1. package/README.md +33 -13
  2. package/cli.js +9 -2
  3. package/dist/app/ZuploBuildConfig.d.ts +45 -0
  4. package/dist/app/ZuploBuildConfig.js +29 -0
  5. package/dist/app/ZuploBuildConfig.js.map +1 -0
  6. package/dist/app/demo.js +22 -6
  7. package/dist/app/demo.js.map +1 -1
  8. package/dist/app/entry.client.d.ts +0 -2
  9. package/dist/app/entry.client.js +39 -4
  10. package/dist/app/entry.client.js.map +1 -1
  11. package/dist/app/entry.server.d.ts +0 -2
  12. package/dist/app/entry.server.js +17 -6
  13. package/dist/app/entry.server.js.map +1 -1
  14. package/dist/app/env.d.ts +33 -0
  15. package/dist/app/env.js +37 -0
  16. package/dist/app/env.js.map +1 -0
  17. package/dist/app/main.d.ts +93 -2
  18. package/dist/app/main.js +45 -47
  19. package/dist/app/main.js.map +1 -1
  20. package/dist/app/standalone.js +11 -7
  21. package/dist/app/standalone.js.map +1 -1
  22. package/dist/cli/build/handler.js +9 -1
  23. package/dist/cli/build/handler.js.map +1 -1
  24. package/dist/cli/cli.d.ts +9 -0
  25. package/dist/cli/cli.js +17 -11
  26. package/dist/cli/cli.js.map +1 -1
  27. package/dist/cli/cmds/build.d.ts +1 -1
  28. package/dist/cli/cmds/dev.d.ts +1 -1
  29. package/dist/cli/cmds/preview.d.ts +1 -1
  30. package/dist/cli/common/analytics/lib.js +1 -1
  31. package/dist/cli/common/analytics/lib.js.map +1 -1
  32. package/dist/cli/common/logger.js +0 -1
  33. package/dist/cli/common/logger.js.map +1 -1
  34. package/dist/cli/common/machine-id/lib.js +3 -1
  35. package/dist/cli/common/machine-id/lib.js.map +1 -1
  36. package/dist/cli/common/outdated.js +2 -1
  37. package/dist/cli/common/outdated.js.map +1 -1
  38. package/dist/cli/common/output.js +2 -3
  39. package/dist/cli/common/output.js.map +1 -1
  40. package/dist/cli/common/utils/box.js +2 -2
  41. package/dist/cli/common/utils/box.js.map +1 -1
  42. package/dist/cli/common/validators/lib.js +1 -1
  43. package/dist/cli/common/validators/lib.js.map +1 -1
  44. package/dist/cli/common/version-check.d.ts +2 -0
  45. package/dist/cli/common/version-check.js +58 -0
  46. package/dist/cli/common/version-check.js.map +1 -0
  47. package/dist/cli/dev/handler.js +0 -4
  48. package/dist/cli/dev/handler.js.map +1 -1
  49. package/dist/codegen.js +2 -2
  50. package/dist/codegen.js.map +1 -1
  51. package/dist/config/config.d.ts +18 -32
  52. package/dist/config/file-exists.d.ts +1 -0
  53. package/dist/config/file-exists.js +5 -0
  54. package/dist/config/file-exists.js.map +1 -0
  55. package/dist/config/loader.d.ts +18 -18
  56. package/dist/config/loader.js +95 -103
  57. package/dist/config/loader.js.map +1 -1
  58. package/dist/config/validators/BuildSchema.d.ts +31 -46
  59. package/dist/config/validators/BuildSchema.js +29 -18
  60. package/dist/config/validators/BuildSchema.js.map +1 -1
  61. package/dist/config/validators/InputNavigationSchema.d.ts +7646 -0
  62. package/dist/config/validators/InputNavigationSchema.js +78 -0
  63. package/dist/config/validators/InputNavigationSchema.js.map +1 -0
  64. package/dist/config/validators/InputNavigationSchema.test-d.js +146 -0
  65. package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -0
  66. package/dist/config/validators/NavigationSchema.d.ts +44 -0
  67. package/dist/config/validators/NavigationSchema.js +98 -0
  68. package/dist/config/validators/NavigationSchema.js.map +1 -0
  69. package/dist/config/validators/ProtectedRoutesSchema.d.ts +13 -0
  70. package/dist/config/validators/ProtectedRoutesSchema.js +10 -0
  71. package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -0
  72. package/dist/config/validators/auth.d.ts +2 -2
  73. package/dist/config/validators/auth.js +1 -1
  74. package/dist/config/validators/auth.js.map +1 -1
  75. package/dist/config/validators/icon-types.d.ts +2 -1
  76. package/dist/config/validators/icon-types.js +1872 -1
  77. package/dist/config/validators/icon-types.js.map +1 -1
  78. package/dist/config/validators/validate.d.ts +775 -2744
  79. package/dist/config/validators/validate.js +501 -18
  80. package/dist/config/validators/validate.js.map +1 -1
  81. package/dist/config/validators/validate.test.d.ts +1 -0
  82. package/dist/config/validators/validate.test.js +183 -0
  83. package/dist/config/validators/validate.test.js.map +1 -0
  84. package/dist/flat-config.d.ts +379 -0
  85. package/dist/index.d.ts +9 -5
  86. package/dist/index.js +4 -0
  87. package/dist/index.js.map +1 -1
  88. package/dist/lib/MissingIcon.d.ts +1 -1
  89. package/dist/lib/MissingIcon.js.map +1 -1
  90. package/dist/lib/assets/language-icons/c.d.ts +3 -0
  91. package/dist/lib/assets/language-icons/c.js +4 -0
  92. package/dist/lib/assets/language-icons/c.js.map +1 -0
  93. package/dist/lib/assets/language-icons/commonlisp.d.ts +3 -0
  94. package/dist/lib/assets/language-icons/commonlisp.js +4 -0
  95. package/dist/lib/assets/language-icons/commonlisp.js.map +1 -0
  96. package/dist/lib/assets/language-icons/cpp.d.ts +3 -0
  97. package/dist/lib/assets/language-icons/cpp.js +4 -0
  98. package/dist/lib/assets/language-icons/cpp.js.map +1 -0
  99. package/dist/lib/assets/language-icons/csharp.d.ts +3 -0
  100. package/dist/lib/assets/language-icons/csharp.js +4 -0
  101. package/dist/lib/assets/language-icons/csharp.js.map +1 -0
  102. package/dist/lib/assets/language-icons/css.d.ts +3 -0
  103. package/dist/lib/assets/language-icons/css.js +4 -0
  104. package/dist/lib/assets/language-icons/css.js.map +1 -0
  105. package/dist/lib/assets/language-icons/dart.d.ts +3 -0
  106. package/dist/lib/assets/language-icons/dart.js +4 -0
  107. package/dist/lib/assets/language-icons/dart.js.map +1 -0
  108. package/dist/lib/assets/language-icons/elixir.d.ts +3 -0
  109. package/dist/lib/assets/language-icons/elixir.js +4 -0
  110. package/dist/lib/assets/language-icons/elixir.js.map +1 -0
  111. package/dist/lib/assets/language-icons/go.d.ts +3 -0
  112. package/dist/lib/assets/language-icons/go.js +4 -0
  113. package/dist/lib/assets/language-icons/go.js.map +1 -0
  114. package/dist/lib/assets/language-icons/graphql.d.ts +3 -0
  115. package/dist/lib/assets/language-icons/graphql.js +4 -0
  116. package/dist/lib/assets/language-icons/graphql.js.map +1 -0
  117. package/dist/lib/assets/language-icons/html.d.ts +3 -0
  118. package/dist/lib/assets/language-icons/html.js +4 -0
  119. package/dist/lib/assets/language-icons/html.js.map +1 -0
  120. package/dist/lib/assets/language-icons/java.d.ts +3 -0
  121. package/dist/lib/assets/language-icons/java.js +4 -0
  122. package/dist/lib/assets/language-icons/java.js.map +1 -0
  123. package/dist/lib/assets/language-icons/javascript.d.ts +3 -0
  124. package/dist/lib/assets/language-icons/javascript.js +4 -0
  125. package/dist/lib/assets/language-icons/javascript.js.map +1 -0
  126. package/dist/lib/assets/language-icons/json.d.ts +3 -0
  127. package/dist/lib/assets/language-icons/json.js +4 -0
  128. package/dist/lib/assets/language-icons/json.js.map +1 -0
  129. package/dist/lib/assets/language-icons/kotlin.d.ts +3 -0
  130. package/dist/lib/assets/language-icons/kotlin.js +4 -0
  131. package/dist/lib/assets/language-icons/kotlin.js.map +1 -0
  132. package/dist/lib/assets/language-icons/markdown.d.ts +3 -0
  133. package/dist/lib/assets/language-icons/markdown.js +4 -0
  134. package/dist/lib/assets/language-icons/markdown.js.map +1 -0
  135. package/dist/lib/assets/language-icons/mdx.d.ts +3 -0
  136. package/dist/lib/assets/language-icons/mdx.js +4 -0
  137. package/dist/lib/assets/language-icons/mdx.js.map +1 -0
  138. package/dist/lib/assets/language-icons/objectivec.d.ts +3 -0
  139. package/dist/lib/assets/language-icons/objectivec.js +4 -0
  140. package/dist/lib/assets/language-icons/objectivec.js.map +1 -0
  141. package/dist/lib/assets/language-icons/ocaml.d.ts +3 -0
  142. package/dist/lib/assets/language-icons/ocaml.js +4 -0
  143. package/dist/lib/assets/language-icons/ocaml.js.map +1 -0
  144. package/dist/lib/assets/language-icons/php.d.ts +3 -0
  145. package/dist/lib/assets/language-icons/php.js +4 -0
  146. package/dist/lib/assets/language-icons/php.js.map +1 -0
  147. package/dist/lib/assets/language-icons/powershell.d.ts +3 -0
  148. package/dist/lib/assets/language-icons/powershell.js +4 -0
  149. package/dist/lib/assets/language-icons/powershell.js.map +1 -0
  150. package/dist/lib/assets/language-icons/python.d.ts +3 -0
  151. package/dist/lib/assets/language-icons/python.js +4 -0
  152. package/dist/lib/assets/language-icons/python.js.map +1 -0
  153. package/dist/lib/assets/language-icons/react.d.ts +3 -0
  154. package/dist/lib/assets/language-icons/react.js +4 -0
  155. package/dist/lib/assets/language-icons/react.js.map +1 -0
  156. package/dist/lib/assets/language-icons/ruby.d.ts +3 -0
  157. package/dist/lib/assets/language-icons/ruby.js +4 -0
  158. package/dist/lib/assets/language-icons/ruby.js.map +1 -0
  159. package/dist/lib/assets/language-icons/rust.d.ts +3 -0
  160. package/dist/lib/assets/language-icons/rust.js +4 -0
  161. package/dist/lib/assets/language-icons/rust.js.map +1 -0
  162. package/dist/lib/assets/language-icons/scala.d.ts +3 -0
  163. package/dist/lib/assets/language-icons/scala.js +4 -0
  164. package/dist/lib/assets/language-icons/scala.js.map +1 -0
  165. package/dist/lib/assets/language-icons/shell.d.ts +3 -0
  166. package/dist/lib/assets/language-icons/shell.js +4 -0
  167. package/dist/lib/assets/language-icons/shell.js.map +1 -0
  168. package/dist/lib/assets/language-icons/swift.d.ts +3 -0
  169. package/dist/lib/assets/language-icons/swift.js +4 -0
  170. package/dist/lib/assets/language-icons/swift.js.map +1 -0
  171. package/dist/lib/assets/language-icons/toml.d.ts +3 -0
  172. package/dist/lib/assets/language-icons/toml.js +4 -0
  173. package/dist/lib/assets/language-icons/toml.js.map +1 -0
  174. package/dist/lib/assets/language-icons/typescript.d.ts +3 -0
  175. package/dist/lib/assets/language-icons/typescript.js +4 -0
  176. package/dist/lib/assets/language-icons/typescript.js.map +1 -0
  177. package/dist/lib/assets/language-icons/xml.d.ts +3 -0
  178. package/dist/lib/assets/language-icons/xml.js +4 -0
  179. package/dist/lib/assets/language-icons/xml.js.map +1 -0
  180. package/dist/lib/assets/language-icons/yaml.d.ts +3 -0
  181. package/dist/lib/assets/language-icons/yaml.js +4 -0
  182. package/dist/lib/assets/language-icons/yaml.js.map +1 -0
  183. package/dist/lib/assets/language-icons/zig.d.ts +3 -0
  184. package/dist/lib/assets/language-icons/zig.js +4 -0
  185. package/dist/lib/assets/language-icons/zig.js.map +1 -0
  186. package/dist/lib/auth/issuer.d.ts +2 -0
  187. package/dist/lib/auth/issuer.js +40 -0
  188. package/dist/lib/auth/issuer.js.map +1 -0
  189. package/dist/lib/auth/issuer.test.d.ts +1 -0
  190. package/dist/lib/auth/issuer.test.js +95 -0
  191. package/dist/lib/auth/issuer.test.js.map +1 -0
  192. package/dist/lib/authentication/AuthenticationPlugin.d.ts +2 -2
  193. package/dist/lib/authentication/AuthenticationPlugin.js +1 -1
  194. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
  195. package/dist/lib/authentication/authentication.d.ts +20 -14
  196. package/dist/lib/authentication/components/CallbackHandler.js +16 -10
  197. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  198. package/dist/lib/authentication/components/OAuthErrorPage.d.ts +3 -0
  199. package/dist/lib/authentication/components/OAuthErrorPage.js +99 -0
  200. package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -0
  201. package/dist/lib/authentication/components/SignIn.d.ts +1 -1
  202. package/dist/lib/authentication/components/SignIn.js +11 -6
  203. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  204. package/dist/lib/authentication/components/SignOut.js +6 -6
  205. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  206. package/dist/lib/authentication/components/SignUp.d.ts +1 -1
  207. package/dist/lib/authentication/components/SignUp.js +8 -5
  208. package/dist/lib/authentication/components/SignUp.js.map +1 -1
  209. package/dist/lib/authentication/errors.d.ts +6 -12
  210. package/dist/lib/authentication/errors.js +2 -1
  211. package/dist/lib/authentication/errors.js.map +1 -1
  212. package/dist/lib/authentication/hook.d.ts +10 -2
  213. package/dist/lib/authentication/hook.js +12 -8
  214. package/dist/lib/authentication/hook.js.map +1 -1
  215. package/dist/lib/authentication/providers/auth0.d.ts +2 -2
  216. package/dist/lib/authentication/providers/auth0.js +16 -7
  217. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  218. package/dist/lib/authentication/providers/azureb2c.d.ts +28 -0
  219. package/dist/lib/authentication/providers/azureb2c.js +147 -0
  220. package/dist/lib/authentication/providers/azureb2c.js.map +1 -0
  221. package/dist/lib/authentication/providers/clerk.d.ts +2 -2
  222. package/dist/lib/authentication/providers/clerk.js +80 -60
  223. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  224. package/dist/lib/authentication/providers/firebase.d.ts +4 -0
  225. package/dist/lib/authentication/providers/firebase.js +215 -0
  226. package/dist/lib/authentication/providers/firebase.js.map +1 -0
  227. package/dist/lib/authentication/providers/openid.d.ts +20 -23
  228. package/dist/lib/authentication/providers/openid.js +76 -45
  229. package/dist/lib/authentication/providers/openid.js.map +1 -1
  230. package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.d.ts +8 -0
  231. package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js +39 -0
  232. package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js.map +1 -0
  233. package/dist/lib/authentication/providers/supabase.d.ts +2 -2
  234. package/dist/lib/authentication/providers/supabase.js +35 -44
  235. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  236. package/dist/lib/authentication/state.d.ts +11 -12
  237. package/dist/lib/authentication/state.js +21 -20
  238. package/dist/lib/authentication/state.js.map +1 -1
  239. package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +24 -0
  240. package/dist/lib/authentication/ui/ZudokuAuthUi.js +124 -0
  241. package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -0
  242. package/dist/lib/authentication/ui/icons/Apple.d.ts +3 -0
  243. package/dist/lib/authentication/ui/icons/Apple.js +4 -0
  244. package/dist/lib/authentication/ui/icons/Apple.js.map +1 -0
  245. package/dist/lib/authentication/ui/icons/Facebook.d.ts +3 -0
  246. package/dist/lib/authentication/ui/icons/Facebook.js +4 -0
  247. package/dist/lib/authentication/ui/icons/Facebook.js.map +1 -0
  248. package/dist/lib/authentication/ui/icons/Github.d.ts +3 -0
  249. package/dist/lib/authentication/ui/icons/Github.js +4 -0
  250. package/dist/lib/authentication/ui/icons/Github.js.map +1 -0
  251. package/dist/lib/authentication/ui/icons/Google.d.ts +3 -0
  252. package/dist/lib/authentication/ui/icons/Google.js +4 -0
  253. package/dist/lib/authentication/ui/icons/Google.js.map +1 -0
  254. package/dist/lib/authentication/ui/icons/Microsoft.d.ts +3 -0
  255. package/dist/lib/authentication/ui/icons/Microsoft.js +4 -0
  256. package/dist/lib/authentication/ui/icons/Microsoft.js.map +1 -0
  257. package/dist/lib/authentication/ui/icons/X.d.ts +3 -0
  258. package/dist/lib/authentication/ui/icons/X.js +4 -0
  259. package/dist/lib/authentication/ui/icons/X.js.map +1 -0
  260. package/dist/lib/authentication/use-broadcast/shared.d.ts +1 -1
  261. package/dist/lib/authentication/use-broadcast/shared.js +3 -3
  262. package/dist/lib/authentication/use-broadcast/shared.js.map +1 -1
  263. package/dist/lib/authentication/use-broadcast/useBroadcast.js +2 -2
  264. package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -1
  265. package/dist/lib/components/Autocomplete.d.ts +3 -1
  266. package/dist/lib/components/Autocomplete.js +8 -4
  267. package/dist/lib/components/Autocomplete.js.map +1 -1
  268. package/dist/lib/components/Banner.js +2 -2
  269. package/dist/lib/components/Banner.js.map +1 -1
  270. package/dist/lib/components/Bootstrap.js.map +1 -1
  271. package/dist/lib/components/BuildCheck.d.ts +5 -0
  272. package/dist/lib/components/BuildCheck.js +45 -0
  273. package/dist/lib/components/BuildCheck.js.map +1 -0
  274. package/dist/lib/components/CategoryHeading.js +1 -1
  275. package/dist/lib/components/CategoryHeading.js.map +1 -1
  276. package/dist/lib/components/ErrorPage.js +2 -2
  277. package/dist/lib/components/ErrorPage.js.map +1 -1
  278. package/dist/lib/components/Footer.js +6 -6
  279. package/dist/lib/components/Footer.js.map +1 -1
  280. package/dist/lib/components/Framed.d.ts +7 -0
  281. package/dist/lib/components/Framed.js +26 -0
  282. package/dist/lib/components/Framed.js.map +1 -0
  283. package/dist/lib/components/Header.js +25 -18
  284. package/dist/lib/components/Header.js.map +1 -1
  285. package/dist/lib/components/Heading.d.ts +9 -5
  286. package/dist/lib/components/Heading.js +4 -3
  287. package/dist/lib/components/Heading.js.map +1 -1
  288. package/dist/lib/components/InlineCode.js +1 -1
  289. package/dist/lib/components/InlineCode.js.map +1 -1
  290. package/dist/lib/components/LanguageIcon.d.ts +3 -0
  291. package/dist/lib/components/LanguageIcon.js +163 -0
  292. package/dist/lib/components/LanguageIcon.js.map +1 -0
  293. package/dist/lib/components/Layout.js +6 -8
  294. package/dist/lib/components/Layout.js.map +1 -1
  295. package/dist/lib/components/Main.js +7 -6
  296. package/dist/lib/components/Main.js.map +1 -1
  297. package/dist/lib/components/Markdown.d.ts +3 -2
  298. package/dist/lib/components/Markdown.js +14 -16
  299. package/dist/lib/components/Markdown.js.map +1 -1
  300. package/dist/lib/components/Meta.d.ts +2 -0
  301. package/dist/lib/components/Meta.js +11 -0
  302. package/dist/lib/components/Meta.js.map +1 -0
  303. package/dist/lib/components/MobileTopNavigation.js +13 -6
  304. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  305. package/dist/lib/components/NotFoundPage.js +2 -2
  306. package/dist/lib/components/NotFoundPage.js.map +1 -1
  307. package/dist/lib/components/PageProgress.d.ts +1 -0
  308. package/dist/lib/components/PageProgress.js +20 -0
  309. package/dist/lib/components/PageProgress.js.map +1 -0
  310. package/dist/lib/components/Pagination.js +2 -2
  311. package/dist/lib/components/Pagination.js.map +1 -1
  312. package/dist/lib/components/PathRenderer.js +1 -1
  313. package/dist/lib/components/PathRenderer.js.map +1 -1
  314. package/dist/lib/components/Search.js +3 -3
  315. package/dist/lib/components/Search.js.map +1 -1
  316. package/dist/lib/components/Slot.d.ts +17 -0
  317. package/dist/lib/components/Slot.js +24 -0
  318. package/dist/lib/components/Slot.js.map +1 -0
  319. package/dist/lib/components/Slot.test.d.ts +1 -0
  320. package/dist/lib/components/Slot.test.js +172 -0
  321. package/dist/lib/components/Slot.test.js.map +1 -0
  322. package/dist/lib/components/StatusPage.js +4 -0
  323. package/dist/lib/components/StatusPage.js.map +1 -1
  324. package/dist/lib/components/TopNavigation.d.ts +7 -6
  325. package/dist/lib/components/TopNavigation.js +53 -55
  326. package/dist/lib/components/TopNavigation.js.map +1 -1
  327. package/dist/lib/components/Typography.d.ts +5 -0
  328. package/dist/lib/components/Typography.js +8 -0
  329. package/dist/lib/components/Typography.js.map +1 -0
  330. package/dist/lib/components/Zudoku.js +8 -10
  331. package/dist/lib/components/Zudoku.js.map +1 -1
  332. package/dist/lib/components/cache.d.ts +3 -1
  333. package/dist/lib/components/cache.js +3 -5
  334. package/dist/lib/components/cache.js.map +1 -1
  335. package/dist/lib/components/context/ComponentsContext.js.map +1 -1
  336. package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -1
  337. package/dist/lib/components/context/SlotProvider.d.ts +26 -0
  338. package/dist/lib/components/context/SlotProvider.js +83 -0
  339. package/dist/lib/components/context/SlotProvider.js.map +1 -0
  340. package/dist/lib/components/context/ViewportAnchorContext.js +9 -10
  341. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  342. package/dist/lib/components/context/ZudokuContext.d.ts +3 -7
  343. package/dist/lib/components/context/ZudokuContext.js +66 -33
  344. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  345. package/dist/lib/components/context/ZudokuProvider.d.ts +1 -1
  346. package/dist/lib/components/context/ZudokuProvider.js +2 -1
  347. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  348. package/dist/lib/components/index.d.ts +51 -47
  349. package/dist/lib/components/index.js +17 -20
  350. package/dist/lib/components/index.js.map +1 -1
  351. package/dist/lib/components/navigation/Navigation.d.ts +5 -0
  352. package/dist/lib/components/navigation/Navigation.js +12 -0
  353. package/dist/lib/components/navigation/Navigation.js.map +1 -0
  354. package/dist/lib/components/navigation/NavigationBadge.d.ts +26 -0
  355. package/dist/lib/components/navigation/NavigationBadge.js +26 -0
  356. package/dist/lib/components/navigation/NavigationBadge.js.map +1 -0
  357. package/dist/lib/components/navigation/NavigationCategory.d.ts +5 -0
  358. package/dist/lib/components/navigation/NavigationCategory.js +66 -0
  359. package/dist/lib/components/navigation/NavigationCategory.js.map +1 -0
  360. package/dist/lib/components/navigation/NavigationItem.d.ts +6 -0
  361. package/dist/lib/components/navigation/NavigationItem.js +55 -0
  362. package/dist/lib/components/navigation/NavigationItem.js.map +1 -0
  363. package/dist/lib/components/navigation/NavigationWrapper.d.ts +7 -0
  364. package/dist/lib/components/navigation/NavigationWrapper.js +21 -0
  365. package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -0
  366. package/dist/lib/components/navigation/PoweredByZudoku.js +2 -1
  367. package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -1
  368. package/dist/lib/components/navigation/Toc.js +2 -2
  369. package/dist/lib/components/navigation/Toc.js.map +1 -1
  370. package/dist/lib/components/navigation/ZudokuLogo.d.ts +1 -1
  371. package/dist/lib/components/navigation/ZuploLogo.d.ts +3 -0
  372. package/dist/lib/components/navigation/ZuploLogo.js +4 -0
  373. package/dist/lib/components/navigation/ZuploLogo.js.map +1 -0
  374. package/dist/lib/components/navigation/utils.d.ts +16 -8
  375. package/dist/lib/components/navigation/utils.js +58 -27
  376. package/dist/lib/components/navigation/utils.js.map +1 -1
  377. package/dist/lib/core/RouteGuard.d.ts +1 -1
  378. package/dist/lib/core/RouteGuard.js +19 -27
  379. package/dist/lib/core/RouteGuard.js.map +1 -1
  380. package/dist/lib/core/ZudokuContext.d.ts +38 -21
  381. package/dist/lib/core/ZudokuContext.js +51 -14
  382. package/dist/lib/core/ZudokuContext.js.map +1 -1
  383. package/dist/lib/core/__internal.d.ts +37 -0
  384. package/dist/lib/core/__internal.js +26 -0
  385. package/dist/lib/core/__internal.js.map +1 -0
  386. package/dist/lib/core/plugins.d.ts +8 -4
  387. package/dist/lib/core/plugins.js +1 -0
  388. package/dist/lib/core/plugins.js.map +1 -1
  389. package/dist/lib/core/router.d.ts +1 -0
  390. package/dist/lib/core/router.js +2 -0
  391. package/dist/lib/core/router.js.map +1 -0
  392. package/dist/lib/errors/ErrorAlert.js +2 -4
  393. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  394. package/dist/lib/errors/RouterError.d.ts +3 -1
  395. package/dist/lib/errors/RouterError.js +3 -2
  396. package/dist/lib/errors/RouterError.js.map +1 -1
  397. package/dist/lib/errors/TopLevelError.d.ts +2 -2
  398. package/dist/lib/errors/TopLevelError.js +1 -2
  399. package/dist/lib/errors/TopLevelError.js.map +1 -1
  400. package/dist/lib/hooks/index.d.ts +25 -0
  401. package/dist/lib/hooks/index.js +11 -0
  402. package/dist/lib/hooks/index.js.map +1 -1
  403. package/dist/lib/hooks/useEvent.test.js +5 -3
  404. package/dist/lib/hooks/useEvent.test.js.map +1 -1
  405. package/dist/lib/hooks/useHotkey.d.ts +4 -0
  406. package/dist/lib/hooks/useHotkey.js +58 -0
  407. package/dist/lib/hooks/useHotkey.js.map +1 -0
  408. package/dist/lib/oas/graphql/circular.js +24 -19
  409. package/dist/lib/oas/graphql/circular.js.map +1 -1
  410. package/dist/lib/oas/graphql/index.js +39 -3
  411. package/dist/lib/oas/graphql/index.js.map +1 -1
  412. package/dist/lib/oas/parser/dereference/index.js +2 -1
  413. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  414. package/dist/lib/oas/parser/dereference/resolveRef.js +3 -3
  415. package/dist/lib/oas/parser/dereference/resolveRef.js.map +1 -1
  416. package/dist/lib/oas/parser/index.d.ts +3 -0
  417. package/dist/lib/oas/parser/index.js +12 -2
  418. package/dist/lib/oas/parser/index.js.map +1 -1
  419. package/dist/lib/oas/parser/upgrade/index.d.ts +1 -0
  420. package/dist/lib/oas/parser/upgrade/index.js +79 -26
  421. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  422. package/dist/lib/plugins/api-catalog/Catalog.d.ts +1 -1
  423. package/dist/lib/plugins/api-catalog/Catalog.js +8 -2
  424. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
  425. package/dist/lib/plugins/api-catalog/index.d.ts +6 -6
  426. package/dist/lib/plugins/api-catalog/index.js +10 -10
  427. package/dist/lib/plugins/api-catalog/index.js.map +1 -1
  428. package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +3 -2
  429. package/dist/lib/plugins/api-keys/CreateApiKey.js +18 -4
  430. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  431. package/dist/lib/plugins/api-keys/CreateApiKeyDialog.d.ts +11 -0
  432. package/dist/lib/plugins/api-keys/CreateApiKeyDialog.js +9 -0
  433. package/dist/lib/plugins/api-keys/CreateApiKeyDialog.js.map +1 -0
  434. package/dist/lib/plugins/api-keys/ProtectedRoute.js +4 -1
  435. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
  436. package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
  437. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +146 -27
  438. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  439. package/dist/lib/plugins/api-keys/index.d.ts +29 -15
  440. package/dist/lib/plugins/api-keys/index.js +63 -33
  441. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  442. package/dist/lib/plugins/custom-pages/index.d.ts +4 -6
  443. package/dist/lib/plugins/custom-pages/index.js +18 -10
  444. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  445. package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -3
  446. package/dist/lib/plugins/markdown/MdxPage.js +56 -12
  447. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  448. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.d.ts +2 -0
  449. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js +3 -0
  450. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js.map +1 -0
  451. package/dist/lib/plugins/markdown/assets/ClaudeLogo.d.ts +2 -0
  452. package/dist/lib/plugins/markdown/assets/ClaudeLogo.js +3 -0
  453. package/dist/lib/plugins/markdown/assets/ClaudeLogo.js.map +1 -0
  454. package/dist/lib/plugins/markdown/index.d.ts +14 -4
  455. package/dist/lib/plugins/markdown/index.js +9 -26
  456. package/dist/lib/plugins/markdown/index.js.map +1 -1
  457. package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +1 -0
  458. package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
  459. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  460. package/dist/lib/plugins/openapi/ColorizedParam.js +5 -2
  461. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  462. package/dist/lib/plugins/openapi/Endpoint.js +2 -2
  463. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  464. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.d.ts +5 -0
  465. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +10 -0
  466. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js.map +1 -0
  467. package/dist/lib/plugins/openapi/MCPEndpoint.d.ts +5 -0
  468. package/dist/lib/plugins/openapi/MCPEndpoint.js +56 -0
  469. package/dist/lib/plugins/openapi/MCPEndpoint.js.map +1 -0
  470. package/dist/lib/plugins/openapi/OasProvider.d.ts +1 -1
  471. package/dist/lib/plugins/openapi/OasProvider.js +1 -0
  472. package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
  473. package/dist/lib/plugins/openapi/OperationList.d.ts +1 -3
  474. package/dist/lib/plugins/openapi/OperationList.js +39 -13
  475. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  476. package/dist/lib/plugins/openapi/OperationListItem.d.ts +4 -3
  477. package/dist/lib/plugins/openapi/OperationListItem.js +16 -7
  478. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  479. package/dist/lib/plugins/openapi/ParamInfos.d.ts +1 -1
  480. package/dist/lib/plugins/openapi/ParamInfos.js +15 -10
  481. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
  482. package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -2
  483. package/dist/lib/plugins/openapi/ParameterList.js +8 -5
  484. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  485. package/dist/lib/plugins/openapi/ParameterListItem.d.ts +2 -3
  486. package/dist/lib/plugins/openapi/ParameterListItem.js +25 -7
  487. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  488. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -4
  489. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +8 -6
  490. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  491. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +11 -4
  492. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +5 -2
  493. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  494. package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +5 -6
  495. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +25 -7
  496. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  497. package/dist/lib/plugins/openapi/SchemaList.js +7 -7
  498. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
  499. package/dist/lib/plugins/openapi/Sidecar.d.ts +5 -4
  500. package/dist/lib/plugins/openapi/Sidecar.js +64 -88
  501. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  502. package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
  503. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  504. package/dist/lib/plugins/openapi/SidecarExamples.d.ts +11 -6
  505. package/dist/lib/plugins/openapi/SidecarExamples.js +32 -43
  506. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  507. package/dist/lib/plugins/openapi/StaggeredRender.d.ts +1 -1
  508. package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +1 -1
  509. package/dist/lib/plugins/openapi/client/createServer.js +1 -2
  510. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
  511. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +5 -0
  512. package/dist/lib/plugins/openapi/client/useCreateQuery.js +10 -4
  513. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  514. package/dist/lib/plugins/openapi/components/ConstValue.d.ts +5 -0
  515. package/dist/lib/plugins/openapi/components/ConstValue.js +6 -0
  516. package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -0
  517. package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
  518. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
  519. package/dist/lib/plugins/openapi/components/NonHighlightedCode.d.ts +4 -0
  520. package/dist/lib/plugins/openapi/components/NonHighlightedCode.js +5 -0
  521. package/dist/lib/plugins/openapi/components/NonHighlightedCode.js.map +1 -0
  522. package/dist/lib/plugins/openapi/components/ResponseContent.d.ts +12 -0
  523. package/dist/lib/plugins/openapi/components/ResponseContent.js +20 -0
  524. package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -0
  525. package/dist/lib/plugins/openapi/context.d.ts +1 -1
  526. package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +1 -1
  527. package/dist/lib/plugins/openapi/graphql/gql.d.ts +3 -3
  528. package/dist/lib/plugins/openapi/graphql/gql.js +3 -3
  529. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  530. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +15 -5
  531. package/dist/lib/plugins/openapi/graphql/graphql.js +14 -2
  532. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  533. package/dist/lib/plugins/openapi/index.d.ts +5 -6
  534. package/dist/lib/plugins/openapi/index.js +61 -31
  535. package/dist/lib/plugins/openapi/index.js.map +1 -1
  536. package/dist/lib/plugins/openapi/interfaces.d.ts +22 -7
  537. package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +5 -0
  538. package/dist/lib/plugins/openapi/playground/BodyPanel.js +78 -0
  539. package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -0
  540. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
  541. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
  542. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
  543. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +3 -3
  544. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -1
  545. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  546. package/dist/lib/plugins/openapi/playground/Headers.d.ts +5 -4
  547. package/dist/lib/plugins/openapi/playground/Headers.js +42 -80
  548. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  549. package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +1 -1
  550. package/dist/lib/plugins/openapi/playground/IdentityDialog.js +2 -1
  551. package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -1
  552. package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +1 -1
  553. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -4
  554. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
  555. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +10 -2
  556. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +9 -2
  557. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
  558. package/dist/lib/plugins/openapi/playground/PathParams.js +2 -4
  559. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  560. package/dist/lib/plugins/openapi/playground/Playground.d.ts +12 -10
  561. package/dist/lib/plugins/openapi/playground/Playground.js +166 -106
  562. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  563. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +5 -2
  564. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  565. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +4 -4
  566. package/dist/lib/plugins/openapi/playground/QueryParams.js +20 -29
  567. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  568. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +2 -1
  569. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +10 -2
  570. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -1
  571. package/dist/lib/plugins/openapi/playground/Spinner.d.ts +2 -0
  572. package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
  573. package/dist/lib/plugins/openapi/playground/Spinner.js.map +1 -0
  574. package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +2 -0
  575. package/dist/lib/plugins/openapi/playground/fileUtils.js +22 -0
  576. package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -0
  577. package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +5 -3
  578. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.d.ts +8 -0
  579. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js +19 -0
  580. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js.map +1 -0
  581. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.d.ts +3 -0
  582. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
  583. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
  584. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
  585. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
  586. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
  587. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.d.ts +1 -0
  588. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js +540 -0
  589. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js.map +1 -0
  590. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.d.ts +40 -0
  591. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js +205 -0
  592. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js.map +1 -0
  593. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
  594. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
  595. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
  596. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +8 -0
  597. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +71 -0
  598. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
  599. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +10 -4
  600. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +55 -39
  601. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  602. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +6 -4
  603. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +8 -10
  604. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  605. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +1 -1
  606. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +1 -1
  607. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -1
  608. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.d.ts +18 -0
  609. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +12 -0
  610. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -0
  611. package/dist/lib/plugins/openapi/processors/removeExtensions.d.ts +3 -2
  612. package/dist/lib/plugins/openapi/processors/removeExtensions.js +1 -1
  613. package/dist/lib/plugins/openapi/processors/removeExtensions.js.map +1 -1
  614. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js +27 -6
  615. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js.map +1 -1
  616. package/dist/lib/plugins/openapi/processors/removeParameters.d.ts +3 -1
  617. package/dist/lib/plugins/openapi/processors/removeParameters.js +1 -1
  618. package/dist/lib/plugins/openapi/processors/removeParameters.js.map +1 -1
  619. package/dist/lib/plugins/openapi/processors/removeParameters.test.js +54 -25
  620. package/dist/lib/plugins/openapi/processors/removeParameters.test.js.map +1 -1
  621. package/dist/lib/plugins/openapi/processors/removePaths.d.ts +3 -1
  622. package/dist/lib/plugins/openapi/processors/removePaths.js +1 -1
  623. package/dist/lib/plugins/openapi/processors/removePaths.js.map +1 -1
  624. package/dist/lib/plugins/openapi/processors/removePaths.test.js +75 -35
  625. package/dist/lib/plugins/openapi/processors/removePaths.test.js.map +1 -1
  626. package/dist/lib/plugins/openapi/processors/traverse.d.ts +1 -1
  627. package/dist/lib/plugins/openapi/processors/traverse.js.map +1 -1
  628. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +5 -2
  629. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
  630. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +0 -3
  631. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +29 -26
  632. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  633. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +4 -2
  634. package/dist/lib/plugins/openapi/schema/SchemaView.js +33 -19
  635. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  636. package/dist/lib/plugins/openapi/schema/UnionView.d.ts +5 -0
  637. package/dist/lib/plugins/openapi/schema/UnionView.js +33 -0
  638. package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -0
  639. package/dist/lib/plugins/openapi/schema/union-helpers.d.ts +28 -0
  640. package/dist/lib/plugins/openapi/schema/union-helpers.js +71 -0
  641. package/dist/lib/plugins/openapi/schema/union-helpers.js.map +1 -0
  642. package/dist/lib/plugins/openapi/schema/utils.d.ts +6 -8
  643. package/dist/lib/plugins/openapi/schema/utils.js +15 -13
  644. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  645. package/dist/lib/plugins/openapi/state.d.ts +5 -3
  646. package/dist/lib/plugins/openapi/util/createHttpSnippet.d.ts +11 -0
  647. package/dist/lib/plugins/openapi/util/createHttpSnippet.js +89 -0
  648. package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -0
  649. package/dist/lib/plugins/openapi/util/createNavigationCategory.d.ts +9 -0
  650. package/dist/lib/plugins/openapi/util/createNavigationCategory.js +25 -0
  651. package/dist/lib/plugins/openapi/util/createNavigationCategory.js.map +1 -0
  652. package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +2 -2
  653. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +43 -2
  654. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  655. package/dist/lib/plugins/openapi/util/getRoutes.js +52 -15
  656. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  657. package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +1 -1
  658. package/dist/lib/plugins/redirect/index.d.ts +1 -1
  659. package/dist/lib/plugins/search-inkeep/index.d.ts +5 -22
  660. package/dist/lib/plugins/search-inkeep/index.js +35 -29
  661. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  662. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +5 -21
  663. package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
  664. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
  665. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +2 -2
  666. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  667. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +2 -2
  668. package/dist/lib/plugins/search-pagefind/ResultList.js +15 -5
  669. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  670. package/dist/lib/plugins/search-pagefind/get-results.js +0 -1
  671. package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -1
  672. package/dist/lib/shiki.d.ts +32 -0
  673. package/dist/lib/shiki.js +124 -0
  674. package/dist/lib/shiki.js.map +1 -0
  675. package/dist/lib/ui/ActionButton.js +1 -1
  676. package/dist/lib/ui/ActionButton.js.map +1 -1
  677. package/dist/lib/ui/Alert.d.ts +6 -5
  678. package/dist/lib/ui/Alert.js +12 -10
  679. package/dist/lib/ui/Alert.js.map +1 -1
  680. package/dist/lib/ui/Badge.d.ts +5 -5
  681. package/dist/lib/ui/Badge.js +9 -7
  682. package/dist/lib/ui/Badge.js.map +1 -1
  683. package/dist/lib/ui/Breadcrumb.js +1 -1
  684. package/dist/lib/ui/Breadcrumb.js.map +1 -1
  685. package/dist/lib/ui/Button.d.ts +2 -2
  686. package/dist/lib/ui/Button.js +9 -6
  687. package/dist/lib/ui/Button.js.map +1 -1
  688. package/dist/lib/ui/Callout.d.ts +5 -5
  689. package/dist/lib/ui/Callout.js +6 -6
  690. package/dist/lib/ui/Callout.js.map +1 -1
  691. package/dist/lib/ui/Card.js +1 -1
  692. package/dist/lib/ui/Checkbox.d.ts +2 -2
  693. package/dist/lib/ui/Checkbox.js +4 -4
  694. package/dist/lib/ui/Checkbox.js.map +1 -1
  695. package/dist/lib/ui/CodeBlock.d.ts +14 -0
  696. package/dist/lib/ui/CodeBlock.js +18 -0
  697. package/dist/lib/ui/CodeBlock.js.map +1 -0
  698. package/dist/lib/ui/Collapsible.d.ts +4 -4
  699. package/dist/lib/ui/Collapsible.js +11 -4
  700. package/dist/lib/ui/Collapsible.js.map +1 -1
  701. package/dist/lib/ui/Command.d.ts +5 -5
  702. package/dist/lib/ui/Command.js +3 -7
  703. package/dist/lib/ui/Command.js.map +1 -1
  704. package/dist/lib/ui/Dialog.d.ts +13 -17
  705. package/dist/lib/ui/Dialog.js +31 -18
  706. package/dist/lib/ui/Dialog.js.map +1 -1
  707. package/dist/lib/ui/DropdownMenu.js +4 -4
  708. package/dist/lib/ui/DropdownMenu.js.map +1 -1
  709. package/dist/lib/ui/EmbeddedCodeBlock.d.ts +16 -0
  710. package/dist/lib/ui/EmbeddedCodeBlock.js +19 -0
  711. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -0
  712. package/dist/lib/ui/Form.d.ts +3 -3
  713. package/dist/lib/ui/Frame.d.ts +8 -0
  714. package/dist/lib/ui/Frame.js +22 -0
  715. package/dist/lib/ui/Frame.js.map +1 -0
  716. package/dist/lib/ui/HoverCard.js +1 -1
  717. package/dist/lib/ui/HoverCard.js.map +1 -1
  718. package/dist/lib/ui/Input.js +1 -1
  719. package/dist/lib/ui/Input.js.map +1 -1
  720. package/dist/lib/ui/Item.d.ts +23 -0
  721. package/dist/lib/ui/Item.js +67 -0
  722. package/dist/lib/ui/Item.js.map +1 -0
  723. package/dist/lib/ui/NativeSelect.d.ts +5 -0
  724. package/dist/lib/ui/NativeSelect.js +14 -0
  725. package/dist/lib/ui/NativeSelect.js.map +1 -0
  726. package/dist/lib/ui/Pagination.d.ts +1 -1
  727. package/dist/lib/ui/Pagination.js +1 -1
  728. package/dist/lib/ui/Pagination.js.map +1 -1
  729. package/dist/lib/ui/Popover.js +1 -1
  730. package/dist/lib/ui/Popover.js.map +1 -1
  731. package/dist/lib/ui/RadioGroup.js +1 -1
  732. package/dist/lib/ui/RadioGroup.js.map +1 -1
  733. package/dist/lib/ui/ReactComponentDoc.d.ts +20 -0
  734. package/dist/lib/ui/ReactComponentDoc.js +10 -0
  735. package/dist/lib/ui/ReactComponentDoc.js.map +1 -0
  736. package/dist/lib/ui/Secret.d.ts +18 -0
  737. package/dist/lib/ui/Secret.js +26 -0
  738. package/dist/lib/ui/Secret.js.map +1 -0
  739. package/dist/lib/ui/Select.d.ts +13 -11
  740. package/dist/lib/ui/Select.js +34 -23
  741. package/dist/lib/ui/Select.js.map +1 -1
  742. package/dist/lib/ui/Separator.d.ts +4 -0
  743. package/dist/lib/ui/Separator.js +8 -0
  744. package/dist/lib/ui/Separator.js.map +1 -0
  745. package/dist/lib/ui/Slider.js +1 -1
  746. package/dist/lib/ui/Slider.js.map +1 -1
  747. package/dist/lib/ui/Switch.js +1 -1
  748. package/dist/lib/ui/Switch.js.map +1 -1
  749. package/dist/lib/ui/SyntaxHighlight.d.ts +13 -15
  750. package/dist/lib/ui/SyntaxHighlight.js +13 -60
  751. package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
  752. package/dist/lib/ui/Tabs.js +2 -2
  753. package/dist/lib/ui/Tabs.js.map +1 -1
  754. package/dist/lib/ui/Textarea.js +1 -1
  755. package/dist/lib/ui/Textarea.js.map +1 -1
  756. package/dist/lib/ui/Toggle.js +1 -1
  757. package/dist/lib/ui/Toggle.js.map +1 -1
  758. package/dist/lib/ui/ToggleGroup.d.ts +1 -1
  759. package/dist/lib/ui/Tooltip.d.ts +7 -6
  760. package/dist/lib/ui/Tooltip.js +16 -9
  761. package/dist/lib/ui/Tooltip.js.map +1 -1
  762. package/dist/lib/ui/Value.d.ts +5 -0
  763. package/dist/lib/ui/Value.js +13 -0
  764. package/dist/lib/ui/Value.js.map +1 -0
  765. package/dist/lib/util/MdxComponents.d.ts +19 -4
  766. package/dist/lib/util/MdxComponents.js +16 -12
  767. package/dist/lib/util/MdxComponents.js.map +1 -1
  768. package/dist/lib/util/cn.js.map +1 -1
  769. package/dist/lib/util/createVariantComponent.d.ts +7 -4
  770. package/dist/lib/util/createVariantComponent.js +5 -2
  771. package/dist/lib/util/createVariantComponent.js.map +1 -1
  772. package/dist/lib/util/ensureArray.d.ts +1 -0
  773. package/dist/lib/util/ensureArray.js +2 -0
  774. package/dist/lib/util/ensureArray.js.map +1 -0
  775. package/dist/lib/util/flattenAllOf.d.ts +4 -0
  776. package/dist/lib/util/flattenAllOf.js +65 -0
  777. package/dist/lib/util/flattenAllOf.js.map +1 -0
  778. package/dist/lib/util/flattenAllOf.test.d.ts +1 -0
  779. package/dist/lib/util/flattenAllOf.test.js +532 -0
  780. package/dist/lib/util/flattenAllOf.test.js.map +1 -0
  781. package/dist/lib/util/groupBy.js +1 -0
  782. package/dist/lib/util/groupBy.js.map +1 -1
  783. package/dist/lib/util/humanFileSize.d.ts +6 -0
  784. package/dist/lib/util/humanFileSize.js +14 -0
  785. package/dist/lib/util/humanFileSize.js.map +1 -0
  786. package/dist/lib/util/humanFileSize.test.d.ts +1 -0
  787. package/dist/lib/util/humanFileSize.test.js +22 -0
  788. package/dist/lib/util/humanFileSize.test.js.map +1 -0
  789. package/dist/lib/util/invariant.d.ts +6 -5
  790. package/dist/lib/util/invariant.js +4 -2
  791. package/dist/lib/util/invariant.js.map +1 -1
  792. package/dist/lib/util/os.d.ts +2 -0
  793. package/dist/lib/util/os.js +21 -0
  794. package/dist/lib/util/os.js.map +1 -0
  795. package/dist/lib/util/pastellize.js +4 -4
  796. package/dist/lib/util/pastellize.js.map +1 -1
  797. package/dist/lib/util/syncZustandState.d.ts +5 -0
  798. package/dist/lib/util/syncZustandState.js +14 -0
  799. package/dist/lib/util/syncZustandState.js.map +1 -0
  800. package/dist/lib/util/traverse.d.ts +2 -1
  801. package/dist/lib/util/traverse.js +31 -5
  802. package/dist/lib/util/traverse.js.map +1 -1
  803. package/dist/lib/util/url.d.ts +4 -0
  804. package/dist/lib/util/url.js +13 -0
  805. package/dist/lib/util/url.js.map +1 -0
  806. package/dist/lib/util/url.test.d.ts +1 -0
  807. package/dist/lib/util/url.test.js +26 -0
  808. package/dist/lib/util/url.test.js.map +1 -0
  809. package/dist/lib/util/useCopyToClipboard.d.ts +1 -0
  810. package/dist/lib/util/useCopyToClipboard.js +11 -0
  811. package/dist/lib/util/useCopyToClipboard.js.map +1 -0
  812. package/dist/lib/util/useExposedProps.d.ts +8 -1
  813. package/dist/lib/util/useExposedProps.js.map +1 -1
  814. package/dist/lib/util/useIsomorphicLayoutEffect.js.map +1 -1
  815. package/dist/lib/util/useScrollToAnchor.js +5 -3
  816. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  817. package/dist/ts.js +3 -3
  818. package/dist/ts.js.map +1 -1
  819. package/dist/vite/api/SchemaManager.d.ts +38 -0
  820. package/dist/vite/api/SchemaManager.js +152 -0
  821. package/dist/vite/api/SchemaManager.js.map +1 -0
  822. package/dist/vite/api/SchemaManager.test.d.ts +1 -0
  823. package/dist/vite/api/SchemaManager.test.js +106 -0
  824. package/dist/vite/api/SchemaManager.test.js.map +1 -0
  825. package/dist/vite/api/schema-codegen.js +71 -22
  826. package/dist/vite/api/schema-codegen.js.map +1 -1
  827. package/dist/vite/api/schema-codegen.test.js +156 -1
  828. package/dist/vite/api/schema-codegen.test.js.map +1 -1
  829. package/dist/vite/build.js +22 -7
  830. package/dist/vite/build.js.map +1 -1
  831. package/dist/vite/config.d.ts +2 -9
  832. package/dist/vite/config.js +61 -97
  833. package/dist/vite/config.js.map +1 -1
  834. package/dist/vite/config.test.js +1 -1
  835. package/dist/vite/config.test.js.map +1 -1
  836. package/dist/vite/css/plugin.d.ts +1 -2
  837. package/dist/vite/css/plugin.js +14 -2
  838. package/dist/vite/css/plugin.js.map +1 -1
  839. package/dist/vite/dev-server.d.ts +0 -1
  840. package/dist/vite/dev-server.js +25 -16
  841. package/dist/vite/dev-server.js.map +1 -1
  842. package/dist/vite/error-handler.d.ts +2 -2
  843. package/dist/vite/error-handler.js.map +1 -1
  844. package/dist/vite/html.d.ts +7 -3
  845. package/dist/vite/html.js +15 -9
  846. package/dist/vite/html.js.map +1 -1
  847. package/dist/vite/llms.d.ts +12 -0
  848. package/dist/vite/llms.js +66 -0
  849. package/dist/vite/llms.js.map +1 -0
  850. package/dist/vite/mdx/remark-inject-filepath.d.ts +3 -0
  851. package/dist/vite/mdx/remark-inject-filepath.js +6 -0
  852. package/dist/vite/mdx/remark-inject-filepath.js.map +1 -0
  853. package/dist/vite/mdx/remark-last-modified.d.ts +3 -0
  854. package/dist/vite/mdx/remark-last-modified.js +82 -0
  855. package/dist/vite/mdx/remark-last-modified.js.map +1 -0
  856. package/dist/vite/mdx/remark-link-rewrite.d.ts +2 -0
  857. package/dist/vite/mdx/remark-link-rewrite.js +20 -0
  858. package/dist/vite/mdx/remark-link-rewrite.js.map +1 -0
  859. package/dist/vite/mdx/remark-normalize-image-url.d.ts +2 -0
  860. package/dist/vite/mdx/remark-normalize-image-url.js +12 -0
  861. package/dist/vite/mdx/remark-normalize-image-url.js.map +1 -0
  862. package/dist/vite/mdx/remark-static-generation.d.ts +3 -0
  863. package/dist/vite/mdx/remark-static-generation.js +125 -0
  864. package/dist/vite/mdx/remark-static-generation.js.map +1 -0
  865. package/dist/vite/mdx/utils.d.ts +2 -0
  866. package/dist/vite/mdx/utils.js +31 -0
  867. package/dist/vite/mdx/utils.js.map +1 -0
  868. package/dist/vite/output.d.ts +1 -1
  869. package/dist/vite/output.js +1 -1
  870. package/dist/vite/output.js.map +1 -1
  871. package/dist/vite/plugin-api-keys.d.ts +2 -3
  872. package/dist/vite/plugin-api-keys.js +10 -4
  873. package/dist/vite/plugin-api-keys.js.map +1 -1
  874. package/dist/vite/plugin-api.d.ts +1 -2
  875. package/dist/vite/plugin-api.js +59 -135
  876. package/dist/vite/plugin-api.js.map +1 -1
  877. package/dist/vite/plugin-auth.d.ts +2 -3
  878. package/dist/vite/plugin-auth.js +4 -3
  879. package/dist/vite/plugin-auth.js.map +1 -1
  880. package/dist/vite/plugin-component.d.ts +2 -3
  881. package/dist/vite/plugin-component.js +3 -2
  882. package/dist/vite/plugin-component.js.map +1 -1
  883. package/dist/vite/plugin-config-reload.d.ts +2 -3
  884. package/dist/vite/plugin-config-reload.js +23 -22
  885. package/dist/vite/plugin-config-reload.js.map +1 -1
  886. package/dist/vite/plugin-config.d.ts +2 -3
  887. package/dist/vite/plugin-config.js +6 -4
  888. package/dist/vite/plugin-config.js.map +1 -1
  889. package/dist/vite/plugin-custom-pages.d.ts +2 -3
  890. package/dist/vite/plugin-custom-pages.js +6 -5
  891. package/dist/vite/plugin-custom-pages.js.map +1 -1
  892. package/dist/vite/plugin-docs.d.ts +10 -2
  893. package/dist/vite/plugin-docs.js +95 -64
  894. package/dist/vite/plugin-docs.js.map +1 -1
  895. package/dist/vite/plugin-frontmatter.d.ts +1 -2
  896. package/dist/vite/plugin-frontmatter.js +10 -5
  897. package/dist/vite/plugin-frontmatter.js.map +1 -1
  898. package/dist/vite/plugin-markdown-export.d.ts +21 -0
  899. package/dist/vite/plugin-markdown-export.js +141 -0
  900. package/dist/vite/plugin-markdown-export.js.map +1 -0
  901. package/dist/vite/plugin-mdx.d.ts +2 -3
  902. package/dist/vite/plugin-mdx.js +60 -94
  903. package/dist/vite/plugin-mdx.js.map +1 -1
  904. package/dist/vite/plugin-metadata.d.ts +1 -1
  905. package/dist/vite/plugin-navigation.d.ts +4 -0
  906. package/dist/vite/plugin-navigation.js +67 -0
  907. package/dist/vite/plugin-navigation.js.map +1 -0
  908. package/dist/vite/plugin-redirect.d.ts +2 -3
  909. package/dist/vite/plugin-redirect.js +4 -3
  910. package/dist/vite/plugin-redirect.js.map +1 -1
  911. package/dist/vite/plugin-search.d.ts +2 -3
  912. package/dist/vite/plugin-search.js +4 -3
  913. package/dist/vite/plugin-search.js.map +1 -1
  914. package/dist/vite/plugin-shiki-register.d.ts +2 -0
  915. package/dist/vite/plugin-shiki-register.js +39 -0
  916. package/dist/vite/plugin-shiki-register.js.map +1 -0
  917. package/dist/vite/plugin-theme.d.ts +8 -0
  918. package/dist/vite/plugin-theme.js +283 -0
  919. package/dist/vite/plugin-theme.js.map +1 -0
  920. package/dist/vite/plugin-theme.test.d.ts +1 -0
  921. package/dist/vite/plugin-theme.test.js +314 -0
  922. package/dist/vite/plugin-theme.test.js.map +1 -0
  923. package/dist/vite/plugin.d.ts +2 -3
  924. package/dist/vite/plugin.js +26 -23
  925. package/dist/vite/plugin.js.map +1 -1
  926. package/dist/vite/prerender/FileWritingResponse.js +5 -3
  927. package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
  928. package/dist/vite/prerender/InMemoryResponse.js +3 -1
  929. package/dist/vite/prerender/InMemoryResponse.js.map +1 -1
  930. package/dist/vite/prerender/prerender.js +38 -5
  931. package/dist/vite/prerender/prerender.js.map +1 -1
  932. package/dist/vite/prerender/worker.d.ts +1 -1
  933. package/dist/vite/prerender/worker.js +5 -1
  934. package/dist/vite/prerender/worker.js.map +1 -1
  935. package/dist/vite/reporter.js +2 -2
  936. package/dist/vite/reporter.js.map +1 -1
  937. package/dist/vite/shadcn-registry.d.ts +20 -0
  938. package/dist/vite/shadcn-registry.js +29 -0
  939. package/dist/vite/shadcn-registry.js.map +1 -0
  940. package/dist/vite/sitemap.d.ts +1 -1
  941. package/dist/vite/sitemap.js +14 -13
  942. package/dist/vite/sitemap.js.map +1 -1
  943. package/dist/zuplo/enrich-with-zuplo-mcp.d.ts +4 -0
  944. package/dist/zuplo/enrich-with-zuplo-mcp.js +117 -0
  945. package/dist/zuplo/enrich-with-zuplo-mcp.js.map +1 -0
  946. package/dist/zuplo/enrich-with-zuplo.d.ts +4 -3
  947. package/dist/zuplo/enrich-with-zuplo.js +22 -21
  948. package/dist/zuplo/enrich-with-zuplo.js.map +1 -1
  949. package/dist/zuplo/policy-types.js +0 -1
  950. package/dist/zuplo/policy-types.js.map +1 -1
  951. package/dist/zuplo/with-zuplo-processors.d.ts +2 -2
  952. package/dist/zuplo/with-zuplo-processors.js +6 -4
  953. package/dist/zuplo/with-zuplo-processors.js.map +1 -1
  954. package/dist/zuplo/with-zuplo.d.ts +5 -2
  955. package/dist/zuplo/with-zuplo.js +6 -9
  956. package/dist/zuplo/with-zuplo.js.map +1 -1
  957. package/lib/Button-B3ucvvQw.js +52 -0
  958. package/lib/Button-B3ucvvQw.js.map +1 -0
  959. package/lib/Card-KFniaZn5.js +61 -0
  960. package/lib/Card-KFniaZn5.js.map +1 -0
  961. package/lib/CategoryHeading-DhmodDcq.js +17 -0
  962. package/lib/CategoryHeading-DhmodDcq.js.map +1 -0
  963. package/lib/ClientOnly-E7hGysn1.js.map +1 -1
  964. package/lib/Command-CUcrW3qs.js +134 -0
  965. package/lib/Command-CUcrW3qs.js.map +1 -0
  966. package/lib/Dialog-BQciPiHN.js +144 -0
  967. package/lib/Dialog-BQciPiHN.js.map +1 -0
  968. package/lib/Drawer-Ci7XwhqT.js +1133 -0
  969. package/lib/Drawer-Ci7XwhqT.js.map +1 -0
  970. package/lib/DropdownMenu-BZ2NKQ3K.js +126 -0
  971. package/lib/DropdownMenu-BZ2NKQ3K.js.map +1 -0
  972. package/lib/ErrorAlert-_1Zmhr68.js +15475 -0
  973. package/lib/ErrorAlert-_1Zmhr68.js.map +1 -0
  974. package/lib/MdxPage-B2t1EShN.js +240 -0
  975. package/lib/MdxPage-B2t1EShN.js.map +1 -0
  976. package/lib/OAuthErrorPage-DnKnq4xK.js +150 -0
  977. package/lib/OAuthErrorPage-DnKnq4xK.js.map +1 -0
  978. package/lib/OasProvider-Df8i4LN9.js +36 -0
  979. package/lib/OasProvider-Df8i4LN9.js.map +1 -0
  980. package/lib/OperationList-BGhUll5h.js +5688 -0
  981. package/lib/OperationList-BGhUll5h.js.map +1 -0
  982. package/lib/Pagination-hk-llhpw.js +37 -0
  983. package/lib/Pagination-hk-llhpw.js.map +1 -0
  984. package/lib/RouteGuard-Brz95MSt.js +77 -0
  985. package/lib/RouteGuard-Brz95MSt.js.map +1 -0
  986. package/lib/RouterError-CMaIfdjb.js +42 -0
  987. package/lib/RouterError-CMaIfdjb.js.map +1 -0
  988. package/lib/SchemaList-1BwTDYj4.js +150 -0
  989. package/lib/SchemaList-1BwTDYj4.js.map +1 -0
  990. package/lib/SchemaView-iAxsr0Pr.js +572 -0
  991. package/lib/SchemaView-iAxsr0Pr.js.map +1 -0
  992. package/lib/Select-DFRCS31-.js +399 -0
  993. package/lib/Select-DFRCS31-.js.map +1 -0
  994. package/lib/SignUp-sGYAsj2K.js +50 -0
  995. package/lib/SignUp-sGYAsj2K.js.map +1 -0
  996. package/lib/Spinner-CI6bRyZw.js +7 -0
  997. package/lib/Spinner-CI6bRyZw.js.map +1 -0
  998. package/lib/SyntaxHighlight-C19vH0V_.js +10352 -0
  999. package/lib/SyntaxHighlight-C19vH0V_.js.map +1 -0
  1000. package/lib/Toc-DbWS75JZ.js +92 -0
  1001. package/lib/Toc-DbWS75JZ.js.map +1 -0
  1002. package/lib/ZudokuContext-BUZ5hkWB.js +1508 -0
  1003. package/lib/ZudokuContext-BUZ5hkWB.js.map +1 -0
  1004. package/lib/c-B-NUhs61.js +46 -0
  1005. package/lib/c-B-NUhs61.js.map +1 -0
  1006. package/lib/chunk-PVWAREVJ-BMhpCH5D.js +7965 -0
  1007. package/lib/chunk-PVWAREVJ-BMhpCH5D.js.map +1 -0
  1008. package/lib/circular-KI-MGwIg.js +15341 -0
  1009. package/lib/circular-KI-MGwIg.js.map +1 -0
  1010. package/lib/clsx-OuTLNxxd.js +17 -0
  1011. package/lib/clsx-OuTLNxxd.js.map +1 -0
  1012. package/lib/cn-dYga0KKN.js +2731 -0
  1013. package/lib/cn-dYga0KKN.js.map +1 -0
  1014. package/lib/commonlisp-De080z23.js +28 -0
  1015. package/lib/commonlisp-De080z23.js.map +1 -0
  1016. package/lib/cpp-79Paht7T.js +53 -0
  1017. package/lib/cpp-79Paht7T.js.map +1 -0
  1018. package/lib/createServer-CBgHAqRV.js +13018 -0
  1019. package/lib/createServer-CBgHAqRV.js.map +1 -0
  1020. package/lib/csharp-D8MIL50B.js +53 -0
  1021. package/lib/csharp-D8MIL50B.js.map +1 -0
  1022. package/lib/css-Bt6hr1td.js +54 -0
  1023. package/lib/css-Bt6hr1td.js.map +1 -0
  1024. package/lib/dart-B0vy1jWB.js +60 -0
  1025. package/lib/dart-B0vy1jWB.js.map +1 -0
  1026. package/lib/elixir-Ds8r0sF8.js +25 -0
  1027. package/lib/elixir-Ds8r0sF8.js.map +1 -0
  1028. package/lib/errors-CD873hrG.js +45 -0
  1029. package/lib/errors-CD873hrG.js.map +1 -0
  1030. package/lib/go-D2VsmIOS.js +25 -0
  1031. package/lib/go-D2VsmIOS.js.map +1 -0
  1032. package/lib/graphql-BtA6M4m5.js +25 -0
  1033. package/lib/graphql-BtA6M4m5.js.map +1 -0
  1034. package/lib/hook-CMeoxziF.js +40 -0
  1035. package/lib/hook-CMeoxziF.js.map +1 -0
  1036. package/lib/html-MGnI2uzP.js +33 -0
  1037. package/lib/html-MGnI2uzP.js.map +1 -0
  1038. package/lib/index-BK0jKRrX.js +2210 -0
  1039. package/lib/index-BK0jKRrX.js.map +1 -0
  1040. package/lib/index-CrcNWbel.js +316 -0
  1041. package/lib/index-CrcNWbel.js.map +1 -0
  1042. package/lib/index-CscynaXA.js +3680 -0
  1043. package/lib/index-CscynaXA.js.map +1 -0
  1044. package/lib/index-DI5SPFK9.js +36 -0
  1045. package/lib/index-DI5SPFK9.js.map +1 -0
  1046. package/lib/index-nGbmHh_A.js +4827 -0
  1047. package/lib/index-nGbmHh_A.js.map +1 -0
  1048. package/lib/index-pMMX55GH.js +1059 -0
  1049. package/lib/index-pMMX55GH.js.map +1 -0
  1050. package/lib/index.esm-BYObtETB.js +1294 -0
  1051. package/lib/index.esm-BYObtETB.js.map +1 -0
  1052. package/lib/index.esm-BnYHxCYC.js +683 -0
  1053. package/lib/index.esm-BnYHxCYC.js.map +1 -0
  1054. package/lib/invariant-Bm-FVUQE.js +44 -0
  1055. package/lib/invariant-Bm-FVUQE.js.map +1 -0
  1056. package/lib/java-CVLzHfb1.js +53 -0
  1057. package/lib/java-CVLzHfb1.js.map +1 -0
  1058. package/lib/javascript-CcmIpL4G.js +10 -0
  1059. package/lib/javascript-CcmIpL4G.js.map +1 -0
  1060. package/lib/json-4AyP4uiY.js +25 -0
  1061. package/lib/json-4AyP4uiY.js.map +1 -0
  1062. package/lib/jsx-runtime-BzflLqGi.js +283 -0
  1063. package/lib/jsx-runtime-BzflLqGi.js.map +1 -0
  1064. package/lib/kotlin-v2plddBQ.js +37 -0
  1065. package/lib/kotlin-v2plddBQ.js.map +1 -0
  1066. package/lib/markdown-DYGWCmGQ.js +25 -0
  1067. package/lib/markdown-DYGWCmGQ.js.map +1 -0
  1068. package/lib/mdx-CHwYvXd4.js +32 -0
  1069. package/lib/mdx-CHwYvXd4.js.map +1 -0
  1070. package/lib/mutation-BSU0xu4m.js +196 -0
  1071. package/lib/mutation-BSU0xu4m.js.map +1 -0
  1072. package/lib/objectivec-HZY8shkd.js +32 -0
  1073. package/lib/objectivec-HZY8shkd.js.map +1 -0
  1074. package/lib/ocaml-DqsdDdwb.js +52 -0
  1075. package/lib/ocaml-DqsdDdwb.js.map +1 -0
  1076. package/lib/php-rQXzo7K_.js +25 -0
  1077. package/lib/php-rQXzo7K_.js.map +1 -0
  1078. package/lib/powershell-CQje9pm1.js +39 -0
  1079. package/lib/powershell-CQje9pm1.js.map +1 -0
  1080. package/lib/processors/removeExtensions.js +1 -1
  1081. package/lib/processors/removeExtensions.js.map +1 -1
  1082. package/lib/processors/removeParameters.js +27 -28
  1083. package/lib/processors/removeParameters.js.map +1 -1
  1084. package/lib/processors/removePaths.js +17 -17
  1085. package/lib/processors/removePaths.js.map +1 -1
  1086. package/lib/processors/traverse.js +9 -7
  1087. package/lib/processors/traverse.js.map +1 -1
  1088. package/lib/python-QIQAE5Ei.js +32 -0
  1089. package/lib/python-QIQAE5Ei.js.map +1 -0
  1090. package/lib/react-DHpVpxRv.js +24 -0
  1091. package/lib/react-DHpVpxRv.js.map +1 -0
  1092. package/lib/ruby-B2dU8Ny5.js +25 -0
  1093. package/lib/ruby-B2dU8Ny5.js.map +1 -0
  1094. package/lib/rust-DYnLHAi2.js +25 -0
  1095. package/lib/rust-DYnLHAi2.js.map +1 -0
  1096. package/lib/scala-CeKInBR8.js +25 -0
  1097. package/lib/scala-CeKInBR8.js.map +1 -0
  1098. package/lib/shell-HUv9oVtp.js +25 -0
  1099. package/lib/shell-HUv9oVtp.js.map +1 -0
  1100. package/lib/swift-B4z6ig1Z.js +25 -0
  1101. package/lib/swift-B4z6ig1Z.js.map +1 -0
  1102. package/lib/toml-Co9mpdct.js +32 -0
  1103. package/lib/toml-Co9mpdct.js.map +1 -0
  1104. package/lib/typescript-C26xdBDC.js +32 -0
  1105. package/lib/typescript-C26xdBDC.js.map +1 -0
  1106. package/lib/ui/Accordion.js +2 -2
  1107. package/lib/ui/Accordion.js.map +1 -1
  1108. package/lib/ui/ActionButton.js +11 -11
  1109. package/lib/ui/ActionButton.js.map +1 -1
  1110. package/lib/ui/Alert.js +55 -39
  1111. package/lib/ui/Alert.js.map +1 -1
  1112. package/lib/ui/AlertDialog.js +2 -2
  1113. package/lib/ui/AlertDialog.js.map +1 -1
  1114. package/lib/ui/Badge.js +28 -14
  1115. package/lib/ui/Badge.js.map +1 -1
  1116. package/lib/ui/Breadcrumb.js +24 -23
  1117. package/lib/ui/Breadcrumb.js.map +1 -1
  1118. package/lib/ui/Button.js +20 -17
  1119. package/lib/ui/Button.js.map +1 -1
  1120. package/lib/ui/Callout.js +18 -17
  1121. package/lib/ui/Callout.js.map +1 -1
  1122. package/lib/ui/Card.js +9 -9
  1123. package/lib/ui/Card.js.map +1 -1
  1124. package/lib/ui/Carousel.js +348 -348
  1125. package/lib/ui/Carousel.js.map +1 -1
  1126. package/lib/ui/Checkbox.js +29 -26
  1127. package/lib/ui/Checkbox.js.map +1 -1
  1128. package/lib/ui/CodeBlock.js +220 -0
  1129. package/lib/ui/CodeBlock.js.map +1 -0
  1130. package/lib/ui/Collapsible.js +32 -5
  1131. package/lib/ui/Collapsible.js.map +1 -1
  1132. package/lib/ui/Command.js +67 -73
  1133. package/lib/ui/Command.js.map +1 -1
  1134. package/lib/ui/Dialog.js +140 -95
  1135. package/lib/ui/Dialog.js.map +1 -1
  1136. package/lib/ui/Drawer.js +3 -3
  1137. package/lib/ui/DropdownMenu.js +35 -35
  1138. package/lib/ui/DropdownMenu.js.map +1 -1
  1139. package/lib/ui/EmbeddedCodeBlock.js +84 -0
  1140. package/lib/ui/EmbeddedCodeBlock.js.map +1 -0
  1141. package/lib/ui/Form.js +3 -3
  1142. package/lib/ui/Form.js.map +1 -1
  1143. package/lib/ui/Frame.js +81 -0
  1144. package/lib/ui/Frame.js.map +1 -0
  1145. package/lib/ui/HoverCard.js +6 -6
  1146. package/lib/ui/HoverCard.js.map +1 -1
  1147. package/lib/ui/Input.js +3 -3
  1148. package/lib/ui/Input.js.map +1 -1
  1149. package/lib/ui/Item.js +188 -0
  1150. package/lib/ui/Item.js.map +1 -0
  1151. package/lib/ui/Label.js +3 -3
  1152. package/lib/ui/Label.js.map +1 -1
  1153. package/lib/ui/NativeSelect.js +57 -0
  1154. package/lib/ui/NativeSelect.js.map +1 -0
  1155. package/lib/ui/Pagination.js +29 -30
  1156. package/lib/ui/Pagination.js.map +1 -1
  1157. package/lib/ui/Popover.js +3 -3
  1158. package/lib/ui/Popover.js.map +1 -1
  1159. package/lib/ui/Progress.js +2 -2
  1160. package/lib/ui/Progress.js.map +1 -1
  1161. package/lib/ui/RadioGroup.js +11 -11
  1162. package/lib/ui/RadioGroup.js.map +1 -1
  1163. package/lib/ui/ReactComponentDoc.js +28 -0
  1164. package/lib/ui/ReactComponentDoc.js.map +1 -0
  1165. package/lib/ui/ScrollArea.js +2 -2
  1166. package/lib/ui/ScrollArea.js.map +1 -1
  1167. package/lib/ui/Secret.js +106 -0
  1168. package/lib/ui/Secret.js.map +1 -0
  1169. package/lib/ui/Select.js +166 -116
  1170. package/lib/ui/Select.js.map +1 -1
  1171. package/lib/ui/Separator.js +27 -0
  1172. package/lib/ui/Separator.js.map +1 -0
  1173. package/lib/ui/Skeleton.js +2 -2
  1174. package/lib/ui/Skeleton.js.map +1 -1
  1175. package/lib/ui/Slider.js +6 -6
  1176. package/lib/ui/Slider.js.map +1 -1
  1177. package/lib/ui/Stepper.js +1 -1
  1178. package/lib/ui/Stepper.js.map +1 -1
  1179. package/lib/ui/Switch.js +6 -6
  1180. package/lib/ui/Switch.js.map +1 -1
  1181. package/lib/ui/SyntaxHighlight.js +6 -6
  1182. package/lib/ui/Tabs.js +12 -12
  1183. package/lib/ui/Tabs.js.map +1 -1
  1184. package/lib/ui/Textarea.js +6 -6
  1185. package/lib/ui/Textarea.js.map +1 -1
  1186. package/lib/ui/Toggle.js +8 -8
  1187. package/lib/ui/Toggle.js.map +1 -1
  1188. package/lib/ui/ToggleGroup.js +2 -2
  1189. package/lib/ui/ToggleGroup.js.map +1 -1
  1190. package/lib/ui/Tooltip.js +55 -21
  1191. package/lib/ui/Tooltip.js.map +1 -1
  1192. package/lib/ui/Value.js +39 -0
  1193. package/lib/ui/Value.js.map +1 -0
  1194. package/lib/ui/util.js +1 -1
  1195. package/lib/useCopyToClipboard-B_085nfO.js +14 -0
  1196. package/lib/useCopyToClipboard-B_085nfO.js.map +1 -0
  1197. package/lib/useExposedProps-U3pmsHaG.js +113 -0
  1198. package/lib/useExposedProps-U3pmsHaG.js.map +1 -0
  1199. package/lib/useLatest-hmRS46UF.js.map +1 -1
  1200. package/lib/xml-BQOOC04j.js +25 -0
  1201. package/lib/xml-BQOOC04j.js.map +1 -0
  1202. package/lib/yaml-BGsJItKv.js +32 -0
  1203. package/lib/yaml-BGsJItKv.js.map +1 -0
  1204. package/lib/zig-CUV2sTct.js +35 -0
  1205. package/lib/zig-CUV2sTct.js.map +1 -0
  1206. package/lib/zudoku.__internal.js +3084 -0
  1207. package/lib/zudoku.__internal.js.map +1 -0
  1208. package/lib/zudoku.auth-auth0.js +36 -38
  1209. package/lib/zudoku.auth-auth0.js.map +1 -1
  1210. package/lib/zudoku.auth-azureb2c.js +136 -0
  1211. package/lib/zudoku.auth-azureb2c.js.map +1 -0
  1212. package/lib/zudoku.auth-clerk.js +94 -89
  1213. package/lib/zudoku.auth-clerk.js.map +1 -1
  1214. package/lib/zudoku.auth-openid.js +558 -549
  1215. package/lib/zudoku.auth-openid.js.map +1 -1
  1216. package/lib/zudoku.auth-supabase.js +154 -0
  1217. package/lib/zudoku.auth-supabase.js.map +1 -0
  1218. package/lib/zudoku.components.js +24 -29
  1219. package/lib/zudoku.hooks.js +21 -13
  1220. package/lib/zudoku.hooks.js.map +1 -1
  1221. package/lib/zudoku.icons.js +1 -1
  1222. package/lib/zudoku.icons.js.map +1 -1
  1223. package/lib/zudoku.plugin-api-catalog.js +74 -67
  1224. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  1225. package/lib/zudoku.plugin-api-keys.js +632 -193
  1226. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  1227. package/lib/zudoku.plugin-custom-pages.js +15 -18
  1228. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  1229. package/lib/zudoku.plugin-markdown.js +21 -73
  1230. package/lib/zudoku.plugin-markdown.js.map +1 -1
  1231. package/lib/zudoku.plugin-openapi.js +7 -6
  1232. package/lib/zudoku.plugin-redirect.js +1 -1
  1233. package/lib/zudoku.plugin-redirect.js.map +1 -1
  1234. package/lib/zudoku.plugin-search-inkeep.js +55 -59
  1235. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  1236. package/lib/zudoku.plugin-search-pagefind.js +216 -125
  1237. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  1238. package/lib/zudoku.plugins.js +7 -6
  1239. package/lib/zudoku.plugins.js.map +1 -1
  1240. package/lib/zudoku.router.js +2507 -0
  1241. package/lib/zudoku.router.js.map +1 -0
  1242. package/package.json +156 -115
  1243. package/src/app/ZuploBuildConfig.ts +33 -0
  1244. package/src/app/defaultTheme.css +73 -0
  1245. package/src/app/demo.html +1 -1
  1246. package/src/app/demo.tsx +25 -7
  1247. package/src/app/entry.client.tsx +47 -5
  1248. package/src/app/entry.server.tsx +20 -12
  1249. package/src/app/env.ts +43 -0
  1250. package/src/app/font.geist.css +73 -0
  1251. package/src/app/main.css +186 -152
  1252. package/src/app/main.tsx +67 -58
  1253. package/src/app/standalone.tsx +14 -8
  1254. package/src/lib/MissingIcon.tsx +1 -1
  1255. package/src/lib/assets/language-icons/c.tsx +31 -0
  1256. package/src/lib/assets/language-icons/commonlisp.tsx +22 -0
  1257. package/src/lib/assets/language-icons/cpp.tsx +35 -0
  1258. package/src/lib/assets/language-icons/csharp.tsx +35 -0
  1259. package/src/lib/assets/language-icons/css.tsx +36 -0
  1260. package/src/lib/assets/language-icons/dart.tsx +39 -0
  1261. package/src/lib/assets/language-icons/elixir.tsx +19 -0
  1262. package/src/lib/assets/language-icons/go.tsx +19 -0
  1263. package/src/lib/assets/language-icons/graphql.tsx +19 -0
  1264. package/src/lib/assets/language-icons/html.tsx +24 -0
  1265. package/src/lib/assets/language-icons/java.tsx +35 -0
  1266. package/src/lib/assets/language-icons/javascript.tsx +11 -0
  1267. package/src/lib/assets/language-icons/json.tsx +19 -0
  1268. package/src/lib/assets/language-icons/kotlin.tsx +30 -0
  1269. package/src/lib/assets/language-icons/markdown.tsx +19 -0
  1270. package/src/lib/assets/language-icons/mdx.tsx +23 -0
  1271. package/src/lib/assets/language-icons/objectivec.tsx +23 -0
  1272. package/src/lib/assets/language-icons/ocaml.tsx +34 -0
  1273. package/src/lib/assets/language-icons/php.tsx +19 -0
  1274. package/src/lib/assets/language-icons/powershell.tsx +27 -0
  1275. package/src/lib/assets/language-icons/python.tsx +23 -0
  1276. package/src/lib/assets/language-icons/react.tsx +21 -0
  1277. package/src/lib/assets/language-icons/ruby.tsx +19 -0
  1278. package/src/lib/assets/language-icons/rust.tsx +19 -0
  1279. package/src/lib/assets/language-icons/scala.tsx +19 -0
  1280. package/src/lib/assets/language-icons/shell.tsx +19 -0
  1281. package/src/lib/assets/language-icons/swift.tsx +19 -0
  1282. package/src/lib/assets/language-icons/toml.tsx +23 -0
  1283. package/src/lib/assets/language-icons/typescript.tsx +23 -0
  1284. package/src/lib/assets/language-icons/xml.tsx +19 -0
  1285. package/src/lib/assets/language-icons/yaml.tsx +23 -0
  1286. package/src/lib/assets/language-icons/zig.tsx +32 -0
  1287. package/src/lib/auth/issuer.test.ts +121 -0
  1288. package/src/lib/auth/issuer.ts +44 -0
  1289. package/src/lib/authentication/AuthenticationPlugin.tsx +2 -2
  1290. package/src/lib/authentication/authentication.ts +26 -11
  1291. package/src/lib/authentication/components/CallbackHandler.tsx +28 -11
  1292. package/src/lib/authentication/components/OAuthErrorPage.tsx +171 -0
  1293. package/src/lib/authentication/components/SignIn.tsx +34 -6
  1294. package/src/lib/authentication/components/SignOut.tsx +7 -6
  1295. package/src/lib/authentication/components/SignUp.tsx +36 -5
  1296. package/src/lib/authentication/errors.ts +27 -13
  1297. package/src/lib/authentication/hook.ts +23 -10
  1298. package/src/lib/authentication/providers/auth0.tsx +26 -10
  1299. package/src/lib/authentication/providers/azureb2c.tsx +208 -0
  1300. package/src/lib/authentication/providers/clerk.tsx +100 -71
  1301. package/src/lib/authentication/providers/firebase.tsx +284 -0
  1302. package/src/lib/authentication/providers/openid.tsx +127 -58
  1303. package/src/lib/authentication/providers/supabase/SupabaseAuthUI.tsx +75 -0
  1304. package/src/lib/authentication/providers/supabase.tsx +68 -63
  1305. package/src/lib/authentication/state.ts +40 -30
  1306. package/src/lib/authentication/ui/ZudokuAuthUi.tsx +335 -0
  1307. package/src/lib/authentication/ui/icons/Apple.tsx +10 -0
  1308. package/src/lib/authentication/ui/icons/Facebook.tsx +15 -0
  1309. package/src/lib/authentication/ui/icons/Github.tsx +16 -0
  1310. package/src/lib/authentication/ui/icons/Google.tsx +16 -0
  1311. package/src/lib/authentication/ui/icons/Microsoft.tsx +12 -0
  1312. package/src/lib/authentication/ui/icons/X.tsx +10 -0
  1313. package/src/lib/authentication/use-broadcast/LICENSE.md +12 -3
  1314. package/src/lib/authentication/use-broadcast/shared.ts +4 -4
  1315. package/src/lib/authentication/use-broadcast/useBroadcast.ts +2 -2
  1316. package/src/lib/components/AnchorLink.tsx +1 -1
  1317. package/src/lib/components/Autocomplete.tsx +15 -5
  1318. package/src/lib/components/Banner.tsx +3 -4
  1319. package/src/lib/components/Bootstrap.tsx +1 -0
  1320. package/src/lib/components/BuildCheck.tsx +88 -0
  1321. package/src/lib/components/CategoryHeading.tsx +4 -1
  1322. package/src/lib/components/ErrorPage.tsx +3 -3
  1323. package/src/lib/components/Footer.tsx +8 -11
  1324. package/src/lib/components/Framed.tsx +51 -0
  1325. package/src/lib/components/Header.tsx +46 -43
  1326. package/src/lib/components/Heading.tsx +14 -11
  1327. package/src/lib/components/InlineCode.tsx +1 -1
  1328. package/src/lib/components/LanguageIcon.tsx +181 -0
  1329. package/src/lib/components/Layout.tsx +10 -31
  1330. package/src/lib/components/Main.tsx +15 -14
  1331. package/src/lib/components/Markdown.tsx +43 -27
  1332. package/src/lib/components/Meta.tsx +45 -0
  1333. package/src/lib/components/MobileTopNavigation.tsx +72 -16
  1334. package/src/lib/components/NotFoundPage.tsx +6 -5
  1335. package/src/lib/components/PageProgress.tsx +28 -0
  1336. package/src/lib/components/Pagination.tsx +6 -11
  1337. package/src/lib/components/PathRenderer.tsx +2 -2
  1338. package/src/lib/components/Search.tsx +3 -3
  1339. package/src/lib/components/Slot.test.tsx +465 -0
  1340. package/src/lib/components/Slot.tsx +64 -0
  1341. package/src/lib/components/StatusPage.tsx +5 -0
  1342. package/src/lib/components/TopNavigation.tsx +81 -86
  1343. package/src/lib/components/Typography.tsx +14 -0
  1344. package/src/lib/components/Zudoku.tsx +15 -17
  1345. package/src/lib/components/cache.ts +9 -5
  1346. package/src/lib/components/context/ComponentsContext.tsx +2 -2
  1347. package/src/lib/components/context/RouterEventsEmitter.tsx +1 -1
  1348. package/src/lib/components/context/SlotProvider.tsx +149 -0
  1349. package/src/lib/components/context/ViewportAnchorContext.tsx +10 -17
  1350. package/src/lib/components/context/ZudokuContext.ts +77 -44
  1351. package/src/lib/components/context/ZudokuProvider.tsx +3 -2
  1352. package/src/lib/components/index.ts +18 -26
  1353. package/src/lib/components/navigation/Navigation.tsx +50 -0
  1354. package/src/lib/components/navigation/NavigationBadge.tsx +48 -0
  1355. package/src/lib/components/navigation/NavigationCategory.tsx +153 -0
  1356. package/src/lib/components/navigation/NavigationItem.tsx +148 -0
  1357. package/src/lib/components/navigation/NavigationWrapper.tsx +49 -0
  1358. package/src/lib/components/navigation/PoweredByZudoku.tsx +15 -5
  1359. package/src/lib/components/navigation/Toc.tsx +8 -8
  1360. package/src/lib/components/navigation/ZudokuLogo.tsx +1 -1
  1361. package/src/lib/components/navigation/ZuploLogo.tsx +14 -0
  1362. package/src/lib/components/navigation/utils.ts +82 -42
  1363. package/src/lib/core/RouteGuard.tsx +52 -32
  1364. package/src/lib/core/ZudokuContext.ts +99 -30
  1365. package/src/lib/core/__internal.tsx +30 -0
  1366. package/src/lib/core/plugins.ts +13 -4
  1367. package/src/lib/core/router.ts +1 -0
  1368. package/src/lib/errors/ErrorAlert.tsx +8 -17
  1369. package/src/lib/errors/RouterError.tsx +7 -2
  1370. package/src/lib/errors/TopLevelError.tsx +2 -4
  1371. package/src/lib/hooks/index.ts +11 -0
  1372. package/src/lib/hooks/useEvent.test.tsx +9 -7
  1373. package/src/lib/hooks/useHotkey.ts +70 -0
  1374. package/src/lib/oas/graphql/circular.ts +28 -20
  1375. package/src/lib/oas/graphql/index.ts +39 -3
  1376. package/src/lib/oas/parser/dereference/index.ts +2 -1
  1377. package/src/lib/oas/parser/dereference/resolveRef.ts +4 -4
  1378. package/src/lib/oas/parser/index.ts +14 -3
  1379. package/src/lib/oas/parser/upgrade/index.ts +100 -29
  1380. package/src/lib/plugins/api-catalog/Catalog.tsx +9 -2
  1381. package/src/lib/plugins/api-catalog/index.tsx +19 -19
  1382. package/src/lib/plugins/api-keys/CreateApiKey.tsx +70 -44
  1383. package/src/lib/plugins/api-keys/CreateApiKeyDialog.tsx +49 -0
  1384. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +11 -7
  1385. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +441 -122
  1386. package/src/lib/plugins/api-keys/index.tsx +143 -65
  1387. package/src/lib/plugins/custom-pages/index.tsx +24 -16
  1388. package/src/lib/plugins/markdown/MdxPage.tsx +205 -33
  1389. package/src/lib/plugins/markdown/assets/ChatGPTLogo.tsx +11 -0
  1390. package/src/lib/plugins/markdown/assets/ClaudeLogo.tsx +19 -0
  1391. package/src/lib/plugins/markdown/index.tsx +28 -43
  1392. package/src/lib/plugins/openapi/CollapsibleCode.tsx +12 -7
  1393. package/src/lib/plugins/openapi/ColorizedParam.tsx +5 -3
  1394. package/src/lib/plugins/openapi/Endpoint.tsx +2 -2
  1395. package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +52 -0
  1396. package/src/lib/plugins/openapi/MCPEndpoint.tsx +273 -0
  1397. package/src/lib/plugins/openapi/OasProvider.tsx +2 -1
  1398. package/src/lib/plugins/openapi/OperationList.tsx +68 -36
  1399. package/src/lib/plugins/openapi/OperationListItem.tsx +113 -105
  1400. package/src/lib/plugins/openapi/ParamInfos.tsx +14 -10
  1401. package/src/lib/plugins/openapi/ParameterList.tsx +40 -28
  1402. package/src/lib/plugins/openapi/ParameterListItem.tsx +128 -47
  1403. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +15 -14
  1404. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +51 -9
  1405. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +76 -41
  1406. package/src/lib/plugins/openapi/SchemaList.tsx +25 -19
  1407. package/src/lib/plugins/openapi/Sidecar.tsx +145 -132
  1408. package/src/lib/plugins/openapi/SidecarBox.tsx +26 -4
  1409. package/src/lib/plugins/openapi/SidecarExamples.tsx +99 -87
  1410. package/src/lib/plugins/openapi/StaggeredRender.tsx +1 -1
  1411. package/src/lib/plugins/openapi/client/GraphQLContext.tsx +1 -1
  1412. package/src/lib/plugins/openapi/client/createServer.ts +1 -2
  1413. package/src/lib/plugins/openapi/client/useCreateQuery.ts +24 -4
  1414. package/src/lib/plugins/openapi/components/ConstValue.tsx +24 -0
  1415. package/src/lib/plugins/openapi/components/EnumValues.tsx +3 -3
  1416. package/src/lib/plugins/openapi/components/NonHighlightedCode.tsx +22 -0
  1417. package/src/lib/plugins/openapi/components/ResponseContent.tsx +114 -0
  1418. package/src/lib/plugins/openapi/context.tsx +1 -1
  1419. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +1 -1
  1420. package/src/lib/plugins/openapi/graphql/gql.ts +11 -11
  1421. package/src/lib/plugins/openapi/graphql/graphql.ts +33 -9
  1422. package/src/lib/plugins/openapi/index.tsx +94 -62
  1423. package/src/lib/plugins/openapi/interfaces.ts +23 -7
  1424. package/src/lib/plugins/openapi/playground/BodyPanel.tsx +271 -0
  1425. package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +51 -0
  1426. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +12 -4
  1427. package/src/lib/plugins/openapi/playground/Headers.tsx +158 -172
  1428. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +4 -3
  1429. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +20 -36
  1430. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +34 -2
  1431. package/src/lib/plugins/openapi/playground/PathParams.tsx +26 -35
  1432. package/src/lib/plugins/openapi/playground/Playground.tsx +327 -301
  1433. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +23 -32
  1434. package/src/lib/plugins/openapi/playground/QueryParams.tsx +92 -100
  1435. package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +20 -1
  1436. package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
  1437. package/src/lib/plugins/openapi/playground/fileUtils.ts +32 -0
  1438. package/src/lib/plugins/openapi/playground/request-panel/MultipartField.tsx +91 -0
  1439. package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
  1440. package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
  1441. package/src/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.tsx +872 -0
  1442. package/src/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.ts +349 -0
  1443. package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
  1444. package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +117 -0
  1445. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +228 -119
  1446. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +70 -91
  1447. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +1 -1
  1448. package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +23 -0
  1449. package/src/lib/plugins/openapi/processors/removeExtensions.test.ts +30 -9
  1450. package/src/lib/plugins/openapi/processors/removeExtensions.ts +5 -3
  1451. package/src/lib/plugins/openapi/processors/removeParameters.test.ts +68 -33
  1452. package/src/lib/plugins/openapi/processors/removeParameters.ts +5 -3
  1453. package/src/lib/plugins/openapi/processors/removePaths.test.ts +85 -44
  1454. package/src/lib/plugins/openapi/processors/removePaths.ts +5 -3
  1455. package/src/lib/plugins/openapi/processors/traverse.ts +1 -1
  1456. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +11 -8
  1457. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +114 -87
  1458. package/src/lib/plugins/openapi/schema/SchemaView.tsx +113 -64
  1459. package/src/lib/plugins/openapi/schema/UnionView.tsx +132 -0
  1460. package/src/lib/plugins/openapi/schema/union-helpers.ts +123 -0
  1461. package/src/lib/plugins/openapi/schema/utils.ts +24 -17
  1462. package/src/lib/plugins/openapi/util/createHttpSnippet.ts +107 -0
  1463. package/src/lib/plugins/openapi/util/createNavigationCategory.tsx +39 -0
  1464. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +54 -5
  1465. package/src/lib/plugins/openapi/util/getRoutes.tsx +87 -15
  1466. package/src/lib/plugins/openapi/util/methodColorMap.tsx +1 -1
  1467. package/src/lib/plugins/redirect/index.tsx +1 -1
  1468. package/src/lib/plugins/search-inkeep/index.tsx +54 -58
  1469. package/src/lib/plugins/search-inkeep/inkeep.ts +19 -21
  1470. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +3 -4
  1471. package/src/lib/plugins/search-pagefind/ResultList.tsx +16 -8
  1472. package/src/lib/plugins/search-pagefind/get-results.tsx +0 -1
  1473. package/src/lib/shiki.ts +161 -0
  1474. package/src/lib/ui/ActionButton.tsx +3 -1
  1475. package/src/lib/ui/Alert.tsx +45 -39
  1476. package/src/lib/ui/Badge.tsx +22 -13
  1477. package/src/lib/ui/Breadcrumb.tsx +1 -0
  1478. package/src/lib/ui/Button.tsx +10 -6
  1479. package/src/lib/ui/Callout.tsx +12 -6
  1480. package/src/lib/ui/Card.tsx +1 -1
  1481. package/src/lib/ui/Checkbox.tsx +23 -24
  1482. package/src/lib/ui/CodeBlock.tsx +79 -0
  1483. package/src/lib/ui/Collapsible.tsx +26 -4
  1484. package/src/lib/ui/Command.tsx +6 -8
  1485. package/src/lib/ui/Dialog.tsx +114 -96
  1486. package/src/lib/ui/DropdownMenu.tsx +4 -4
  1487. package/src/lib/ui/EmbeddedCodeBlock.tsx +99 -0
  1488. package/src/lib/ui/Form.tsx +4 -4
  1489. package/src/lib/ui/Frame.tsx +81 -0
  1490. package/src/lib/ui/HoverCard.tsx +1 -1
  1491. package/src/lib/ui/Input.tsx +1 -1
  1492. package/src/lib/ui/Item.tsx +192 -0
  1493. package/src/lib/ui/NativeSelect.tsx +47 -0
  1494. package/src/lib/ui/Pagination.tsx +1 -2
  1495. package/src/lib/ui/Popover.tsx +1 -1
  1496. package/src/lib/ui/RadioGroup.tsx +1 -1
  1497. package/src/lib/ui/ReactComponentDoc.tsx +68 -0
  1498. package/src/lib/ui/Secret.tsx +123 -0
  1499. package/src/lib/ui/Select.tsx +153 -126
  1500. package/src/lib/ui/Separator.tsx +25 -0
  1501. package/src/lib/ui/Slider.tsx +1 -1
  1502. package/src/lib/ui/Switch.tsx +1 -1
  1503. package/src/lib/ui/SyntaxHighlight.tsx +33 -179
  1504. package/src/lib/ui/Tabs.tsx +2 -2
  1505. package/src/lib/ui/Textarea.tsx +1 -1
  1506. package/src/lib/ui/Toggle.tsx +1 -1
  1507. package/src/lib/ui/ToggleGroup.tsx +1 -1
  1508. package/src/lib/ui/Tooltip.tsx +59 -22
  1509. package/src/lib/ui/Value.tsx +42 -0
  1510. package/src/lib/util/MdxComponents.tsx +49 -17
  1511. package/src/lib/util/cn.ts +1 -1
  1512. package/src/lib/util/createVariantComponent.tsx +33 -7
  1513. package/src/lib/util/ensureArray.ts +3 -0
  1514. package/src/lib/util/flattenAllOf.test.ts +637 -0
  1515. package/src/lib/util/flattenAllOf.ts +101 -0
  1516. package/src/lib/util/groupBy.ts +1 -0
  1517. package/src/lib/util/humanFileSize.test.ts +24 -0
  1518. package/src/lib/util/humanFileSize.ts +15 -0
  1519. package/src/lib/util/invariant.ts +8 -5
  1520. package/src/lib/util/os.ts +18 -0
  1521. package/src/lib/util/pastellize.ts +4 -4
  1522. package/src/lib/util/syncZustandState.ts +22 -0
  1523. package/src/lib/util/traverse.ts +44 -5
  1524. package/src/lib/util/types.ts +1 -1
  1525. package/src/lib/util/url.test.ts +51 -0
  1526. package/src/lib/util/url.ts +18 -0
  1527. package/src/lib/util/useCopyToClipboard.ts +17 -0
  1528. package/src/lib/util/useExposedProps.tsx +12 -1
  1529. package/src/lib/util/useIsomorphicLayoutEffect.ts +1 -0
  1530. package/src/lib/util/useScrollToAnchor.ts +6 -4
  1531. package/src/shiki/langs/abap.js +1 -0
  1532. package/src/shiki/langs/actionscript-3.js +1 -0
  1533. package/src/shiki/langs/ada.js +1 -0
  1534. package/src/shiki/langs/angular-expression.js +1 -0
  1535. package/src/shiki/langs/angular-html.js +1 -0
  1536. package/src/shiki/langs/angular-inline-style.js +1 -0
  1537. package/src/shiki/langs/angular-inline-template.js +1 -0
  1538. package/src/shiki/langs/angular-let-declaration.js +1 -0
  1539. package/src/shiki/langs/angular-template-blocks.js +1 -0
  1540. package/src/shiki/langs/angular-template.js +1 -0
  1541. package/src/shiki/langs/angular-ts.js +1 -0
  1542. package/src/shiki/langs/apache.js +1 -0
  1543. package/src/shiki/langs/apex.js +1 -0
  1544. package/src/shiki/langs/apl.js +1 -0
  1545. package/src/shiki/langs/applescript.js +1 -0
  1546. package/src/shiki/langs/ara.js +1 -0
  1547. package/src/shiki/langs/asciidoc.js +1 -0
  1548. package/src/shiki/langs/asm.js +1 -0
  1549. package/src/shiki/langs/astro.js +1 -0
  1550. package/src/shiki/langs/awk.js +1 -0
  1551. package/src/shiki/langs/ballerina.js +1 -0
  1552. package/src/shiki/langs/bat.js +1 -0
  1553. package/src/shiki/langs/beancount.js +1 -0
  1554. package/src/shiki/langs/berry.js +1 -0
  1555. package/src/shiki/langs/bibtex.js +1 -0
  1556. package/src/shiki/langs/bicep.js +1 -0
  1557. package/src/shiki/langs/blade.js +1 -0
  1558. package/src/shiki/langs/bsl.js +1 -0
  1559. package/src/shiki/langs/c.js +1 -0
  1560. package/src/shiki/langs/cadence.js +1 -0
  1561. package/src/shiki/langs/cairo.js +1 -0
  1562. package/src/shiki/langs/clarity.js +1 -0
  1563. package/src/shiki/langs/clojure.js +1 -0
  1564. package/src/shiki/langs/cmake.js +1 -0
  1565. package/src/shiki/langs/cobol.js +1 -0
  1566. package/src/shiki/langs/codeowners.js +1 -0
  1567. package/src/shiki/langs/codeql.js +1 -0
  1568. package/src/shiki/langs/coffee.js +1 -0
  1569. package/src/shiki/langs/common-lisp.js +1 -0
  1570. package/src/shiki/langs/coq.js +1 -0
  1571. package/src/shiki/langs/cpp-macro.js +1 -0
  1572. package/src/shiki/langs/cpp.js +1 -0
  1573. package/src/shiki/langs/crystal.js +1 -0
  1574. package/src/shiki/langs/csharp.js +1 -0
  1575. package/src/shiki/langs/css.js +1 -0
  1576. package/src/shiki/langs/csv.js +1 -0
  1577. package/src/shiki/langs/cue.js +1 -0
  1578. package/src/shiki/langs/cypher.js +1 -0
  1579. package/src/shiki/langs/d.js +1 -0
  1580. package/src/shiki/langs/dart.js +1 -0
  1581. package/src/shiki/langs/dax.js +1 -0
  1582. package/src/shiki/langs/desktop.js +1 -0
  1583. package/src/shiki/langs/diff.js +1 -0
  1584. package/src/shiki/langs/docker.js +1 -0
  1585. package/src/shiki/langs/dotenv.js +1 -0
  1586. package/src/shiki/langs/dream-maker.js +1 -0
  1587. package/src/shiki/langs/edge.js +1 -0
  1588. package/src/shiki/langs/elixir.js +1 -0
  1589. package/src/shiki/langs/elm.js +1 -0
  1590. package/src/shiki/langs/emacs-lisp.js +1 -0
  1591. package/src/shiki/langs/erb.js +1 -0
  1592. package/src/shiki/langs/erlang.js +1 -0
  1593. package/src/shiki/langs/es-tag-css.js +1 -0
  1594. package/src/shiki/langs/es-tag-glsl.js +1 -0
  1595. package/src/shiki/langs/es-tag-html.js +1 -0
  1596. package/src/shiki/langs/es-tag-sql.js +1 -0
  1597. package/src/shiki/langs/es-tag-xml.js +1 -0
  1598. package/src/shiki/langs/fennel.js +1 -0
  1599. package/src/shiki/langs/fish.js +1 -0
  1600. package/src/shiki/langs/fluent.js +1 -0
  1601. package/src/shiki/langs/fortran-fixed-form.js +1 -0
  1602. package/src/shiki/langs/fortran-free-form.js +1 -0
  1603. package/src/shiki/langs/fsharp.js +1 -0
  1604. package/src/shiki/langs/gdresource.js +1 -0
  1605. package/src/shiki/langs/gdscript.js +1 -0
  1606. package/src/shiki/langs/gdshader.js +1 -0
  1607. package/src/shiki/langs/genie.js +1 -0
  1608. package/src/shiki/langs/gherkin.js +1 -0
  1609. package/src/shiki/langs/git-commit.js +1 -0
  1610. package/src/shiki/langs/git-rebase.js +1 -0
  1611. package/src/shiki/langs/gleam.js +1 -0
  1612. package/src/shiki/langs/glimmer-js.js +1 -0
  1613. package/src/shiki/langs/glimmer-ts.js +1 -0
  1614. package/src/shiki/langs/glsl.js +1 -0
  1615. package/src/shiki/langs/gnuplot.js +1 -0
  1616. package/src/shiki/langs/go.js +1 -0
  1617. package/src/shiki/langs/graphql.js +1 -0
  1618. package/src/shiki/langs/groovy.js +1 -0
  1619. package/src/shiki/langs/hack.js +1 -0
  1620. package/src/shiki/langs/haml.js +1 -0
  1621. package/src/shiki/langs/handlebars.js +1 -0
  1622. package/src/shiki/langs/haskell.js +1 -0
  1623. package/src/shiki/langs/haxe.js +1 -0
  1624. package/src/shiki/langs/hcl.js +1 -0
  1625. package/src/shiki/langs/hjson.js +1 -0
  1626. package/src/shiki/langs/hlsl.js +1 -0
  1627. package/src/shiki/langs/html-derivative.js +1 -0
  1628. package/src/shiki/langs/html.js +1 -0
  1629. package/src/shiki/langs/http.js +1 -0
  1630. package/src/shiki/langs/hurl.js +1 -0
  1631. package/src/shiki/langs/hxml.js +1 -0
  1632. package/src/shiki/langs/hy.js +1 -0
  1633. package/src/shiki/langs/imba.js +1 -0
  1634. package/src/shiki/langs/ini.js +1 -0
  1635. package/src/shiki/langs/java.js +1 -0
  1636. package/src/shiki/langs/javascript.js +1 -0
  1637. package/src/shiki/langs/jinja-html.js +1 -0
  1638. package/src/shiki/langs/jinja.js +1 -0
  1639. package/src/shiki/langs/jison.js +1 -0
  1640. package/src/shiki/langs/json.js +1 -0
  1641. package/src/shiki/langs/json5.js +1 -0
  1642. package/src/shiki/langs/jsonc.js +1 -0
  1643. package/src/shiki/langs/jsonl.js +1 -0
  1644. package/src/shiki/langs/jsonnet.js +1 -0
  1645. package/src/shiki/langs/jssm.js +1 -0
  1646. package/src/shiki/langs/jsx.js +1 -0
  1647. package/src/shiki/langs/julia.js +1 -0
  1648. package/src/shiki/langs/kdl.js +1 -0
  1649. package/src/shiki/langs/kotlin.js +1 -0
  1650. package/src/shiki/langs/kusto.js +1 -0
  1651. package/src/shiki/langs/latex.js +1 -0
  1652. package/src/shiki/langs/lean.js +1 -0
  1653. package/src/shiki/langs/less.js +1 -0
  1654. package/src/shiki/langs/liquid.js +1 -0
  1655. package/src/shiki/langs/llvm.js +1 -0
  1656. package/src/shiki/langs/log.js +1 -0
  1657. package/src/shiki/langs/logo.js +1 -0
  1658. package/src/shiki/langs/lua.js +1 -0
  1659. package/src/shiki/langs/luau.js +1 -0
  1660. package/src/shiki/langs/make.js +1 -0
  1661. package/src/shiki/langs/markdown-vue.js +1 -0
  1662. package/src/shiki/langs/markdown.js +1 -0
  1663. package/src/shiki/langs/marko.js +1 -0
  1664. package/src/shiki/langs/matlab.js +1 -0
  1665. package/src/shiki/langs/mdc.js +1 -0
  1666. package/src/shiki/langs/mdx.js +1 -0
  1667. package/src/shiki/langs/mermaid.js +1 -0
  1668. package/src/shiki/langs/mipsasm.js +1 -0
  1669. package/src/shiki/langs/mojo.js +1 -0
  1670. package/src/shiki/langs/move.js +1 -0
  1671. package/src/shiki/langs/narrat.js +1 -0
  1672. package/src/shiki/langs/nextflow.js +1 -0
  1673. package/src/shiki/langs/nginx.js +1 -0
  1674. package/src/shiki/langs/nim.js +1 -0
  1675. package/src/shiki/langs/nix.js +1 -0
  1676. package/src/shiki/langs/nushell.js +1 -0
  1677. package/src/shiki/langs/objective-c.js +1 -0
  1678. package/src/shiki/langs/objective-cpp.js +1 -0
  1679. package/src/shiki/langs/ocaml.js +1 -0
  1680. package/src/shiki/langs/pascal.js +1 -0
  1681. package/src/shiki/langs/perl.js +1 -0
  1682. package/src/shiki/langs/php.js +1 -0
  1683. package/src/shiki/langs/pkl.js +1 -0
  1684. package/src/shiki/langs/plsql.js +1 -0
  1685. package/src/shiki/langs/po.js +1 -0
  1686. package/src/shiki/langs/polar.js +1 -0
  1687. package/src/shiki/langs/postcss.js +1 -0
  1688. package/src/shiki/langs/powerquery.js +1 -0
  1689. package/src/shiki/langs/powershell.js +1 -0
  1690. package/src/shiki/langs/prisma.js +1 -0
  1691. package/src/shiki/langs/prolog.js +1 -0
  1692. package/src/shiki/langs/proto.js +1 -0
  1693. package/src/shiki/langs/pug.js +1 -0
  1694. package/src/shiki/langs/puppet.js +1 -0
  1695. package/src/shiki/langs/purescript.js +1 -0
  1696. package/src/shiki/langs/python.js +1 -0
  1697. package/src/shiki/langs/qml.js +1 -0
  1698. package/src/shiki/langs/qmldir.js +1 -0
  1699. package/src/shiki/langs/qss.js +1 -0
  1700. package/src/shiki/langs/r.js +1 -0
  1701. package/src/shiki/langs/racket.js +1 -0
  1702. package/src/shiki/langs/raku.js +1 -0
  1703. package/src/shiki/langs/razor.js +1 -0
  1704. package/src/shiki/langs/reg.js +1 -0
  1705. package/src/shiki/langs/regexp.js +1 -0
  1706. package/src/shiki/langs/rel.js +1 -0
  1707. package/src/shiki/langs/riscv.js +1 -0
  1708. package/src/shiki/langs/rosmsg.js +1 -0
  1709. package/src/shiki/langs/rst.js +1 -0
  1710. package/src/shiki/langs/ruby.js +1 -0
  1711. package/src/shiki/langs/rust.js +1 -0
  1712. package/src/shiki/langs/sas.js +1 -0
  1713. package/src/shiki/langs/sass.js +1 -0
  1714. package/src/shiki/langs/scala.js +1 -0
  1715. package/src/shiki/langs/scheme.js +1 -0
  1716. package/src/shiki/langs/scss.js +1 -0
  1717. package/src/shiki/langs/sdbl.js +1 -0
  1718. package/src/shiki/langs/shaderlab.js +1 -0
  1719. package/src/shiki/langs/shellscript.js +1 -0
  1720. package/src/shiki/langs/shellsession.js +1 -0
  1721. package/src/shiki/langs/smalltalk.js +1 -0
  1722. package/src/shiki/langs/solidity.js +1 -0
  1723. package/src/shiki/langs/soy.js +1 -0
  1724. package/src/shiki/langs/sparql.js +1 -0
  1725. package/src/shiki/langs/splunk.js +1 -0
  1726. package/src/shiki/langs/sql.js +1 -0
  1727. package/src/shiki/langs/ssh-config.js +1 -0
  1728. package/src/shiki/langs/stata.js +1 -0
  1729. package/src/shiki/langs/stylus.js +1 -0
  1730. package/src/shiki/langs/svelte.js +1 -0
  1731. package/src/shiki/langs/swift.js +1 -0
  1732. package/src/shiki/langs/system-verilog.js +1 -0
  1733. package/src/shiki/langs/systemd.js +1 -0
  1734. package/src/shiki/langs/talonscript.js +1 -0
  1735. package/src/shiki/langs/tasl.js +1 -0
  1736. package/src/shiki/langs/tcl.js +1 -0
  1737. package/src/shiki/langs/templ.js +1 -0
  1738. package/src/shiki/langs/terraform.js +1 -0
  1739. package/src/shiki/langs/tex.js +1 -0
  1740. package/src/shiki/langs/toml.js +1 -0
  1741. package/src/shiki/langs/ts-tags.js +1 -0
  1742. package/src/shiki/langs/tsv.js +1 -0
  1743. package/src/shiki/langs/tsx.js +1 -0
  1744. package/src/shiki/langs/turtle.js +1 -0
  1745. package/src/shiki/langs/twig.js +1 -0
  1746. package/src/shiki/langs/typescript.js +1 -0
  1747. package/src/shiki/langs/typespec.js +1 -0
  1748. package/src/shiki/langs/typst.js +1 -0
  1749. package/src/shiki/langs/v.js +1 -0
  1750. package/src/shiki/langs/vala.js +1 -0
  1751. package/src/shiki/langs/vb.js +1 -0
  1752. package/src/shiki/langs/verilog.js +1 -0
  1753. package/src/shiki/langs/vhdl.js +1 -0
  1754. package/src/shiki/langs/viml.js +1 -0
  1755. package/src/shiki/langs/vue-directives.js +1 -0
  1756. package/src/shiki/langs/vue-html.js +1 -0
  1757. package/src/shiki/langs/vue-interpolations.js +1 -0
  1758. package/src/shiki/langs/vue-sfc-style-variable-injection.js +1 -0
  1759. package/src/shiki/langs/vue-vine.js +1 -0
  1760. package/src/shiki/langs/vue.js +1 -0
  1761. package/src/shiki/langs/vyper.js +1 -0
  1762. package/src/shiki/langs/wasm.js +1 -0
  1763. package/src/shiki/langs/wenyan.js +1 -0
  1764. package/src/shiki/langs/wgsl.js +1 -0
  1765. package/src/shiki/langs/wikitext.js +1 -0
  1766. package/src/shiki/langs/wit.js +1 -0
  1767. package/src/shiki/langs/wolfram.js +1 -0
  1768. package/src/shiki/langs/xml.js +1 -0
  1769. package/src/shiki/langs/xsl.js +1 -0
  1770. package/src/shiki/langs/yaml.js +1 -0
  1771. package/src/shiki/langs/zenscript.js +1 -0
  1772. package/src/shiki/langs/zig.js +1 -0
  1773. package/src/shiki/themes/andromeeda.js +1 -0
  1774. package/src/shiki/themes/aurora-x.js +1 -0
  1775. package/src/shiki/themes/ayu-dark.js +1 -0
  1776. package/src/shiki/themes/catppuccin-frappe.js +1 -0
  1777. package/src/shiki/themes/catppuccin-latte.js +1 -0
  1778. package/src/shiki/themes/catppuccin-macchiato.js +1 -0
  1779. package/src/shiki/themes/catppuccin-mocha.js +1 -0
  1780. package/src/shiki/themes/dark-plus.js +1 -0
  1781. package/src/shiki/themes/dracula-soft.js +1 -0
  1782. package/src/shiki/themes/dracula.js +1 -0
  1783. package/src/shiki/themes/everforest-dark.js +1 -0
  1784. package/src/shiki/themes/everforest-light.js +1 -0
  1785. package/src/shiki/themes/github-dark-default.js +1 -0
  1786. package/src/shiki/themes/github-dark-dimmed.js +1 -0
  1787. package/src/shiki/themes/github-dark-high-contrast.js +1 -0
  1788. package/src/shiki/themes/github-dark.js +1 -0
  1789. package/src/shiki/themes/github-light-default.js +1 -0
  1790. package/src/shiki/themes/github-light-high-contrast.js +1 -0
  1791. package/src/shiki/themes/github-light.js +1 -0
  1792. package/src/shiki/themes/gruvbox-dark-hard.js +1 -0
  1793. package/src/shiki/themes/gruvbox-dark-medium.js +1 -0
  1794. package/src/shiki/themes/gruvbox-dark-soft.js +1 -0
  1795. package/src/shiki/themes/gruvbox-light-hard.js +1 -0
  1796. package/src/shiki/themes/gruvbox-light-medium.js +1 -0
  1797. package/src/shiki/themes/gruvbox-light-soft.js +1 -0
  1798. package/src/shiki/themes/houston.js +1 -0
  1799. package/src/shiki/themes/kanagawa-dragon.js +1 -0
  1800. package/src/shiki/themes/kanagawa-lotus.js +1 -0
  1801. package/src/shiki/themes/kanagawa-wave.js +1 -0
  1802. package/src/shiki/themes/laserwave.js +1 -0
  1803. package/src/shiki/themes/light-plus.js +1 -0
  1804. package/src/shiki/themes/material-theme-darker.js +1 -0
  1805. package/src/shiki/themes/material-theme-lighter.js +1 -0
  1806. package/src/shiki/themes/material-theme-ocean.js +1 -0
  1807. package/src/shiki/themes/material-theme-palenight.js +1 -0
  1808. package/src/shiki/themes/material-theme.js +1 -0
  1809. package/src/shiki/themes/min-dark.js +1 -0
  1810. package/src/shiki/themes/min-light.js +1 -0
  1811. package/src/shiki/themes/monokai.js +1 -0
  1812. package/src/shiki/themes/night-owl.js +1 -0
  1813. package/src/shiki/themes/nord.js +1 -0
  1814. package/src/shiki/themes/one-dark-pro.js +1 -0
  1815. package/src/shiki/themes/one-light.js +1 -0
  1816. package/src/shiki/themes/plastic.js +1 -0
  1817. package/src/shiki/themes/poimandres.js +1 -0
  1818. package/src/shiki/themes/red.js +1 -0
  1819. package/src/shiki/themes/rose-pine-dawn.js +1 -0
  1820. package/src/shiki/themes/rose-pine-moon.js +1 -0
  1821. package/src/shiki/themes/rose-pine.js +1 -0
  1822. package/src/shiki/themes/slack-dark.js +1 -0
  1823. package/src/shiki/themes/slack-ochin.js +1 -0
  1824. package/src/shiki/themes/snazzy-light.js +1 -0
  1825. package/src/shiki/themes/solarized-dark.js +1 -0
  1826. package/src/shiki/themes/solarized-light.js +1 -0
  1827. package/src/shiki/themes/synthwave-84.js +1 -0
  1828. package/src/shiki/themes/tokyo-night.js +1 -0
  1829. package/src/shiki/themes/vesper.js +1 -0
  1830. package/src/shiki/themes/vitesse-black.js +1 -0
  1831. package/src/shiki/themes/vitesse-dark.js +1 -0
  1832. package/src/shiki/themes/vitesse-light.js +1 -0
  1833. package/dist/app/tailwind.d.ts +0 -4
  1834. package/dist/app/tailwind.js +0 -97
  1835. package/dist/app/tailwind.js.map +0 -1
  1836. package/dist/config/common.d.ts +0 -10
  1837. package/dist/config/common.js +0 -2
  1838. package/dist/config/common.js.map +0 -1
  1839. package/dist/config/validators/InputSidebarSchema.d.ts +0 -217
  1840. package/dist/config/validators/InputSidebarSchema.js +0 -62
  1841. package/dist/config/validators/InputSidebarSchema.js.map +0 -1
  1842. package/dist/config/validators/SidebarSchema.d.ts +0 -46
  1843. package/dist/config/validators/SidebarSchema.js +0 -118
  1844. package/dist/config/validators/SidebarSchema.js.map +0 -1
  1845. package/dist/config/validators/common.d.ts +0 -7670
  1846. package/dist/config/validators/common.js +0 -402
  1847. package/dist/config/validators/common.js.map +0 -1
  1848. package/dist/lib/components/ReactMarkdown.d.ts +0 -29
  1849. package/dist/lib/components/ReactMarkdown.js +0 -182
  1850. package/dist/lib/components/ReactMarkdown.js.map +0 -1
  1851. package/dist/lib/components/SlotletProvider.d.ts +0 -17
  1852. package/dist/lib/components/SlotletProvider.js +0 -18
  1853. package/dist/lib/components/SlotletProvider.js.map +0 -1
  1854. package/dist/lib/components/navigation/Sidebar.d.ts +0 -5
  1855. package/dist/lib/components/navigation/Sidebar.js +0 -10
  1856. package/dist/lib/components/navigation/Sidebar.js.map +0 -1
  1857. package/dist/lib/components/navigation/SidebarBadge.d.ts +0 -26
  1858. package/dist/lib/components/navigation/SidebarBadge.js +0 -26
  1859. package/dist/lib/components/navigation/SidebarBadge.js.map +0 -1
  1860. package/dist/lib/components/navigation/SidebarCategory.d.ts +0 -5
  1861. package/dist/lib/components/navigation/SidebarCategory.js +0 -55
  1862. package/dist/lib/components/navigation/SidebarCategory.js.map +0 -1
  1863. package/dist/lib/components/navigation/SidebarItem.d.ts +0 -11
  1864. package/dist/lib/components/navigation/SidebarItem.js +0 -50
  1865. package/dist/lib/components/navigation/SidebarItem.js.map +0 -1
  1866. package/dist/lib/components/navigation/SidebarWrapper.d.ts +0 -7
  1867. package/dist/lib/components/navigation/SidebarWrapper.js +0 -21
  1868. package/dist/lib/components/navigation/SidebarWrapper.js.map +0 -1
  1869. package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
  1870. package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
  1871. package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
  1872. package/dist/lib/plugins/markdown/resolver.d.ts +0 -32
  1873. package/dist/lib/plugins/markdown/resolver.js +0 -46
  1874. package/dist/lib/plugins/markdown/resolver.js.map +0 -1
  1875. package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +0 -4
  1876. package/dist/lib/plugins/openapi/playground/InlineInput.js +0 -3
  1877. package/dist/lib/plugins/openapi/playground/InlineInput.js.map +0 -1
  1878. package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +0 -7
  1879. package/dist/lib/plugins/openapi/playground/SubmitButton.js +0 -22
  1880. package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +0 -1
  1881. package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
  1882. package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
  1883. package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
  1884. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +0 -7
  1885. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +0 -11
  1886. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +0 -1
  1887. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +0 -8
  1888. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +0 -14
  1889. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +0 -1
  1890. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +0 -7
  1891. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +0 -17
  1892. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +0 -1
  1893. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -6
  1894. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +0 -10
  1895. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +0 -1
  1896. package/dist/lib/plugins/openapi/util/createSidebarCategory.d.ts +0 -9
  1897. package/dist/lib/plugins/openapi/util/createSidebarCategory.js +0 -23
  1898. package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +0 -1
  1899. package/dist/vite/plugin-docs.test.js +0 -22
  1900. package/dist/vite/plugin-docs.test.js.map +0 -1
  1901. package/dist/vite/plugin-sidebar.d.ts +0 -3
  1902. package/dist/vite/plugin-sidebar.js +0 -56
  1903. package/dist/vite/plugin-sidebar.js.map +0 -1
  1904. package/dist/vite/plugin-theme-css.d.ts +0 -6
  1905. package/dist/vite/plugin-theme-css.js +0 -117
  1906. package/dist/vite/plugin-theme-css.js.map +0 -1
  1907. package/dist/vite/remarkStaticGeneration.d.ts +0 -3
  1908. package/dist/vite/remarkStaticGeneration.js +0 -125
  1909. package/dist/vite/remarkStaticGeneration.js.map +0 -1
  1910. package/dist/zuplo/env.d.ts +0 -7
  1911. package/dist/zuplo/env.js +0 -12
  1912. package/dist/zuplo/env.js.map +0 -1
  1913. package/lib/AuthenticationPlugin-foqdvvkf.js +0 -58
  1914. package/lib/AuthenticationPlugin-foqdvvkf.js.map +0 -1
  1915. package/lib/Button-Fp19CMUr.js +0 -49
  1916. package/lib/Button-Fp19CMUr.js.map +0 -1
  1917. package/lib/Callout-Boqdgl-z.js +0 -230
  1918. package/lib/Callout-Boqdgl-z.js.map +0 -1
  1919. package/lib/CategoryHeading-DpB47wvk.js +0 -10
  1920. package/lib/CategoryHeading-DpB47wvk.js.map +0 -1
  1921. package/lib/Dialog-sbgekbjb.js +0 -98
  1922. package/lib/Dialog-sbgekbjb.js.map +0 -1
  1923. package/lib/Drawer-kDAfOq_2.js +0 -1133
  1924. package/lib/Drawer-kDAfOq_2.js.map +0 -1
  1925. package/lib/Markdown-CKXePgqR.js +0 -16962
  1926. package/lib/Markdown-CKXePgqR.js.map +0 -1
  1927. package/lib/MdxPage-DzpRK-fu.js +0 -85
  1928. package/lib/MdxPage-DzpRK-fu.js.map +0 -1
  1929. package/lib/OasProvider-Dw2mP5VZ.js +0 -34
  1930. package/lib/OasProvider-Dw2mP5VZ.js.map +0 -1
  1931. package/lib/OperationList-Cr_NA4e2.js +0 -5069
  1932. package/lib/OperationList-Cr_NA4e2.js.map +0 -1
  1933. package/lib/Pagination-DT6eKg_U.js +0 -48
  1934. package/lib/Pagination-DT6eKg_U.js.map +0 -1
  1935. package/lib/RouteGuard-CqZPoZYJ.js +0 -744
  1936. package/lib/RouteGuard-CqZPoZYJ.js.map +0 -1
  1937. package/lib/SchemaList-DNvUJgwI.js +0 -148
  1938. package/lib/SchemaList-DNvUJgwI.js.map +0 -1
  1939. package/lib/SchemaView-Cxh_msLc.js +0 -357
  1940. package/lib/SchemaView-Cxh_msLc.js.map +0 -1
  1941. package/lib/Select-DVFRKf1R.js +0 -223
  1942. package/lib/Select-DVFRKf1R.js.map +0 -1
  1943. package/lib/SlotletProvider-BV1xrg-l.js +0 -338
  1944. package/lib/SlotletProvider-BV1xrg-l.js.map +0 -1
  1945. package/lib/Spinner-CE68iCm0.js +0 -7
  1946. package/lib/Spinner-CE68iCm0.js.map +0 -1
  1947. package/lib/SyntaxHighlight-BEoSoPEo.js +0 -2890
  1948. package/lib/SyntaxHighlight-BEoSoPEo.js.map +0 -1
  1949. package/lib/Toc-D40bDl5J.js +0 -92
  1950. package/lib/Toc-D40bDl5J.js.map +0 -1
  1951. package/lib/_commonjsHelpers-BkfeUUK-.js +0 -29
  1952. package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
  1953. package/lib/chunk-HA7DTUK3-C4gP41vD.js +0 -1821
  1954. package/lib/chunk-HA7DTUK3-C4gP41vD.js.map +0 -1
  1955. package/lib/circular-ByJI6Mci.js +0 -15877
  1956. package/lib/circular-ByJI6Mci.js.map +0 -1
  1957. package/lib/cn-qaFjX9_3.js +0 -2279
  1958. package/lib/cn-qaFjX9_3.js.map +0 -1
  1959. package/lib/context-DLCwaMXN.js +0 -22
  1960. package/lib/context-DLCwaMXN.js.map +0 -1
  1961. package/lib/createServer-Cq73y9Kv.js +0 -12454
  1962. package/lib/createServer-Cq73y9Kv.js.map +0 -1
  1963. package/lib/hook-CqpVYDqN.js +0 -1483
  1964. package/lib/hook-CqpVYDqN.js.map +0 -1
  1965. package/lib/index-Bn6Lc9tq.js +0 -9
  1966. package/lib/index-Bn6Lc9tq.js.map +0 -1
  1967. package/lib/index-CN3TIw7H.js +0 -2009
  1968. package/lib/index-CN3TIw7H.js.map +0 -1
  1969. package/lib/index-CPNSgwSb.js +0 -36
  1970. package/lib/index-CPNSgwSb.js.map +0 -1
  1971. package/lib/index-Dl3Yl0yb.js +0 -4837
  1972. package/lib/index-Dl3Yl0yb.js.map +0 -1
  1973. package/lib/index-DwT-v3zK.js +0 -86
  1974. package/lib/index-DwT-v3zK.js.map +0 -1
  1975. package/lib/index-LNp6rxyU.js +0 -2094
  1976. package/lib/index-LNp6rxyU.js.map +0 -1
  1977. package/lib/index-dQecW8K5.js +0 -2227
  1978. package/lib/index-dQecW8K5.js.map +0 -1
  1979. package/lib/index-gQD2h1wX.js +0 -447
  1980. package/lib/index-gQD2h1wX.js.map +0 -1
  1981. package/lib/index.esm--gIChbWs.js +0 -1207
  1982. package/lib/index.esm--gIChbWs.js.map +0 -1
  1983. package/lib/invariant-Caa8-XvF.js +0 -26
  1984. package/lib/invariant-Caa8-XvF.js.map +0 -1
  1985. package/lib/jsx-runtime-CYK1ROHF.js +0 -446
  1986. package/lib/jsx-runtime-CYK1ROHF.js.map +0 -1
  1987. package/lib/mutation-8LjrN7uz.js +0 -208
  1988. package/lib/mutation-8LjrN7uz.js.map +0 -1
  1989. package/lib/objectEntries-yMIkr2mI.js +0 -5
  1990. package/lib/objectEntries-yMIkr2mI.js.map +0 -1
  1991. package/lib/prism-bash.min-HHIMdNJ_.js +0 -7
  1992. package/lib/prism-bash.min-HHIMdNJ_.js.map +0 -1
  1993. package/lib/prism-csharp.min-bQAo2pmx.js +0 -63
  1994. package/lib/prism-csharp.min-bQAo2pmx.js.map +0 -1
  1995. package/lib/prism-java.min-BpvsOuIa.js +0 -35
  1996. package/lib/prism-java.min-BpvsOuIa.js.map +0 -1
  1997. package/lib/prism-javascript.min-CEqHqgbm.js +0 -9
  1998. package/lib/prism-javascript.min-CEqHqgbm.js.map +0 -1
  1999. package/lib/prism-json.min-B1GJqK1k.js +0 -2
  2000. package/lib/prism-json.min-B1GJqK1k.js.map +0 -1
  2001. package/lib/prism-jsstacktrace.min-BfobCF2F.js +0 -2
  2002. package/lib/prism-jsstacktrace.min-BfobCF2F.js.map +0 -1
  2003. package/lib/prism-markdown.min-C0Qn0m-5.js +0 -61
  2004. package/lib/prism-markdown.min-C0Qn0m-5.js.map +0 -1
  2005. package/lib/prism-markup-BNGj0Tvm.js +0 -174
  2006. package/lib/prism-markup-BNGj0Tvm.js.map +0 -1
  2007. package/lib/prism-objectivec.min-BXSWqpJJ.js +0 -2
  2008. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +0 -1
  2009. package/lib/prism-ruby.min-Dx9KO9ds.js +0 -38
  2010. package/lib/prism-ruby.min-Dx9KO9ds.js.map +0 -1
  2011. package/lib/prism-typescript.min-CD7H2IYQ.js +0 -34
  2012. package/lib/prism-typescript.min-CD7H2IYQ.js.map +0 -1
  2013. package/lib/useExposedProps-B9qXJedG.js +0 -9
  2014. package/lib/useExposedProps-B9qXJedG.js.map +0 -1
  2015. package/src/app/tailwind.ts +0 -103
  2016. package/src/lib/components/ReactMarkdown.license.txt +0 -21
  2017. package/src/lib/components/ReactMarkdown.tsx +0 -264
  2018. package/src/lib/components/SlotletProvider.tsx +0 -55
  2019. package/src/lib/components/navigation/Sidebar.tsx +0 -48
  2020. package/src/lib/components/navigation/SidebarBadge.tsx +0 -48
  2021. package/src/lib/components/navigation/SidebarCategory.tsx +0 -140
  2022. package/src/lib/components/navigation/SidebarItem.tsx +0 -118
  2023. package/src/lib/components/navigation/SidebarWrapper.tsx +0 -46
  2024. package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
  2025. package/src/lib/plugins/markdown/resolver.ts +0 -57
  2026. package/src/lib/plugins/openapi/playground/InlineInput.tsx +0 -6
  2027. package/src/lib/plugins/openapi/playground/SubmitButton.tsx +0 -75
  2028. package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
  2029. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
  2030. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +0 -40
  2031. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +0 -57
  2032. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +0 -33
  2033. package/src/lib/plugins/openapi/util/createSidebarCategory.tsx +0 -37
  2034. /package/dist/{vite/plugin-docs.test.d.ts → config/validators/InputNavigationSchema.test-d.d.ts} +0 -0
@@ -1,4837 +0,0 @@
1
- const dt = Symbol.for("yaml.alias"), lt = Symbol.for("yaml.document"), Y = Symbol.for("yaml.map"), qt = Symbol.for("yaml.pair"), R = Symbol.for("yaml.scalar"), he = Symbol.for("yaml.seq"), j = Symbol.for("yaml.node.type"), x = (s) => !!s && typeof s == "object" && s[j] === dt, ee = (s) => !!s && typeof s == "object" && s[j] === lt, de = (s) => !!s && typeof s == "object" && s[j] === Y, T = (s) => !!s && typeof s == "object" && s[j] === qt, E = (s) => !!s && typeof s == "object" && s[j] === R, pe = (s) => !!s && typeof s == "object" && s[j] === he;
2
- function L(s) {
3
- if (s && typeof s == "object")
4
- switch (s[j]) {
5
- case Y:
6
- case he:
7
- return !0;
8
- }
9
- return !1;
10
- }
11
- function $(s) {
12
- if (s && typeof s == "object")
13
- switch (s[j]) {
14
- case dt:
15
- case Y:
16
- case R:
17
- case he:
18
- return !0;
19
- }
20
- return !1;
21
- }
22
- const vs = (s) => (E(s) || L(s)) && !!s.anchor, M = Symbol("break visit"), Ft = Symbol("skip children"), F = Symbol("remove node");
23
- function G(s, e) {
24
- const t = Rt(e);
25
- ee(s) ? ie(null, s.contents, t, Object.freeze([s])) === F && (s.contents = null) : ie(null, s, t, Object.freeze([]));
26
- }
27
- G.BREAK = M;
28
- G.SKIP = Ft;
29
- G.REMOVE = F;
30
- function ie(s, e, t, n) {
31
- const i = Ut(s, e, t, n);
32
- if ($(i) || T(i))
33
- return Vt(s, n, i), ie(s, i, t, n);
34
- if (typeof i != "symbol") {
35
- if (L(e)) {
36
- n = Object.freeze(n.concat(e));
37
- for (let r = 0; r < e.items.length; ++r) {
38
- const o = ie(r, e.items[r], t, n);
39
- if (typeof o == "number")
40
- r = o - 1;
41
- else {
42
- if (o === M)
43
- return M;
44
- o === F && (e.items.splice(r, 1), r -= 1);
45
- }
46
- }
47
- } else if (T(e)) {
48
- n = Object.freeze(n.concat(e));
49
- const r = ie("key", e.key, t, n);
50
- if (r === M)
51
- return M;
52
- r === F && (e.key = null);
53
- const o = ie("value", e.value, t, n);
54
- if (o === M)
55
- return M;
56
- o === F && (e.value = null);
57
- }
58
- }
59
- return i;
60
- }
61
- async function Fe(s, e) {
62
- const t = Rt(e);
63
- ee(s) ? await re(null, s.contents, t, Object.freeze([s])) === F && (s.contents = null) : await re(null, s, t, Object.freeze([]));
64
- }
65
- Fe.BREAK = M;
66
- Fe.SKIP = Ft;
67
- Fe.REMOVE = F;
68
- async function re(s, e, t, n) {
69
- const i = await Ut(s, e, t, n);
70
- if ($(i) || T(i))
71
- return Vt(s, n, i), re(s, i, t, n);
72
- if (typeof i != "symbol") {
73
- if (L(e)) {
74
- n = Object.freeze(n.concat(e));
75
- for (let r = 0; r < e.items.length; ++r) {
76
- const o = await re(r, e.items[r], t, n);
77
- if (typeof o == "number")
78
- r = o - 1;
79
- else {
80
- if (o === M)
81
- return M;
82
- o === F && (e.items.splice(r, 1), r -= 1);
83
- }
84
- }
85
- } else if (T(e)) {
86
- n = Object.freeze(n.concat(e));
87
- const r = await re("key", e.key, t, n);
88
- if (r === M)
89
- return M;
90
- r === F && (e.key = null);
91
- const o = await re("value", e.value, t, n);
92
- if (o === M)
93
- return M;
94
- o === F && (e.value = null);
95
- }
96
- }
97
- return i;
98
- }
99
- function Rt(s) {
100
- return typeof s == "object" && (s.Collection || s.Node || s.Value) ? Object.assign({
101
- Alias: s.Node,
102
- Map: s.Node,
103
- Scalar: s.Node,
104
- Seq: s.Node
105
- }, s.Value && {
106
- Map: s.Value,
107
- Scalar: s.Value,
108
- Seq: s.Value
109
- }, s.Collection && {
110
- Map: s.Collection,
111
- Seq: s.Collection
112
- }, s) : s;
113
- }
114
- function Ut(s, e, t, n) {
115
- var i, r, o, l, a;
116
- if (typeof t == "function")
117
- return t(s, e, n);
118
- if (de(e))
119
- return (i = t.Map) == null ? void 0 : i.call(t, s, e, n);
120
- if (pe(e))
121
- return (r = t.Seq) == null ? void 0 : r.call(t, s, e, n);
122
- if (T(e))
123
- return (o = t.Pair) == null ? void 0 : o.call(t, s, e, n);
124
- if (E(e))
125
- return (l = t.Scalar) == null ? void 0 : l.call(t, s, e, n);
126
- if (x(e))
127
- return (a = t.Alias) == null ? void 0 : a.call(t, s, e, n);
128
- }
129
- function Vt(s, e, t) {
130
- const n = e[e.length - 1];
131
- if (L(n))
132
- n.items[s] = t;
133
- else if (T(n))
134
- s === "key" ? n.key = t : n.value = t;
135
- else if (ee(n))
136
- n.contents = t;
137
- else {
138
- const i = x(n) ? "alias" : "scalar";
139
- throw new Error(`Cannot replace node with ${i} parent`);
140
- }
141
- }
142
- const Bs = {
143
- "!": "%21",
144
- ",": "%2C",
145
- "[": "%5B",
146
- "]": "%5D",
147
- "{": "%7B",
148
- "}": "%7D"
149
- }, Ms = (s) => s.replace(/[!,[\]{}]/g, (e) => Bs[e]);
150
- class B {
151
- constructor(e, t) {
152
- this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, B.defaultYaml, e), this.tags = Object.assign({}, B.defaultTags, t);
153
- }
154
- clone() {
155
- const e = new B(this.yaml, this.tags);
156
- return e.docStart = this.docStart, e;
157
- }
158
- /**
159
- * During parsing, get a Directives instance for the current document and
160
- * update the stream state according to the current version's spec.
161
- */
162
- atDocument() {
163
- const e = new B(this.yaml, this.tags);
164
- switch (this.yaml.version) {
165
- case "1.1":
166
- this.atNextDocument = !0;
167
- break;
168
- case "1.2":
169
- this.atNextDocument = !1, this.yaml = {
170
- explicit: B.defaultYaml.explicit,
171
- version: "1.2"
172
- }, this.tags = Object.assign({}, B.defaultTags);
173
- break;
174
- }
175
- return e;
176
- }
177
- /**
178
- * @param onError - May be called even if the action was successful
179
- * @returns `true` on success
180
- */
181
- add(e, t) {
182
- this.atNextDocument && (this.yaml = { explicit: B.defaultYaml.explicit, version: "1.1" }, this.tags = Object.assign({}, B.defaultTags), this.atNextDocument = !1);
183
- const n = e.trim().split(/[ \t]+/), i = n.shift();
184
- switch (i) {
185
- case "%TAG": {
186
- if (n.length !== 2 && (t(0, "%TAG directive should contain exactly two parts"), n.length < 2))
187
- return !1;
188
- const [r, o] = n;
189
- return this.tags[r] = o, !0;
190
- }
191
- case "%YAML": {
192
- if (this.yaml.explicit = !0, n.length !== 1)
193
- return t(0, "%YAML directive should contain exactly one part"), !1;
194
- const [r] = n;
195
- if (r === "1.1" || r === "1.2")
196
- return this.yaml.version = r, !0;
197
- {
198
- const o = /^\d+\.\d+$/.test(r);
199
- return t(6, `Unsupported YAML version ${r}`, o), !1;
200
- }
201
- }
202
- default:
203
- return t(0, `Unknown directive ${i}`, !0), !1;
204
- }
205
- }
206
- /**
207
- * Resolves a tag, matching handles to those defined in %TAG directives.
208
- *
209
- * @returns Resolved tag, which may also be the non-specific tag `'!'` or a
210
- * `'!local'` tag, or `null` if unresolvable.
211
- */
212
- tagName(e, t) {
213
- if (e === "!")
214
- return "!";
215
- if (e[0] !== "!")
216
- return t(`Not a valid tag: ${e}`), null;
217
- if (e[1] === "<") {
218
- const o = e.slice(2, -1);
219
- return o === "!" || o === "!!" ? (t(`Verbatim tags aren't resolved, so ${e} is invalid.`), null) : (e[e.length - 1] !== ">" && t("Verbatim tags must end with a >"), o);
220
- }
221
- const [, n, i] = e.match(/^(.*!)([^!]*)$/s);
222
- i || t(`The ${e} tag has no suffix`);
223
- const r = this.tags[n];
224
- if (r)
225
- try {
226
- return r + decodeURIComponent(i);
227
- } catch (o) {
228
- return t(String(o)), null;
229
- }
230
- return n === "!" ? e : (t(`Could not resolve tag: ${e}`), null);
231
- }
232
- /**
233
- * Given a fully resolved tag, returns its printable string form,
234
- * taking into account current tag prefixes and defaults.
235
- */
236
- tagString(e) {
237
- for (const [t, n] of Object.entries(this.tags))
238
- if (e.startsWith(n))
239
- return t + Ms(e.substring(n.length));
240
- return e[0] === "!" ? e : `!<${e}>`;
241
- }
242
- toString(e) {
243
- const t = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [], n = Object.entries(this.tags);
244
- let i;
245
- if (e && n.length > 0 && $(e.contents)) {
246
- const r = {};
247
- G(e.contents, (o, l) => {
248
- $(l) && l.tag && (r[l.tag] = !0);
249
- }), i = Object.keys(r);
250
- } else
251
- i = [];
252
- for (const [r, o] of n)
253
- r === "!!" && o === "tag:yaml.org,2002:" || (!e || i.some((l) => l.startsWith(o))) && t.push(`%TAG ${r} ${o}`);
254
- return t.join(`
255
- `);
256
- }
257
- }
258
- B.defaultYaml = { explicit: !1, version: "1.2" };
259
- B.defaultTags = { "!!": "tag:yaml.org,2002:" };
260
- function Jt(s) {
261
- if (/[\x00-\x19\s,[\]{}]/.test(s)) {
262
- const t = `Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;
263
- throw new Error(t);
264
- }
265
- return !0;
266
- }
267
- function Yt(s) {
268
- const e = /* @__PURE__ */ new Set();
269
- return G(s, {
270
- Value(t, n) {
271
- n.anchor && e.add(n.anchor);
272
- }
273
- }), e;
274
- }
275
- function Gt(s, e) {
276
- for (let t = 1; ; ++t) {
277
- const n = `${s}${t}`;
278
- if (!e.has(n))
279
- return n;
280
- }
281
- }
282
- function Ks(s, e) {
283
- const t = [], n = /* @__PURE__ */ new Map();
284
- let i = null;
285
- return {
286
- onAnchor: (r) => {
287
- t.push(r), i || (i = Yt(s));
288
- const o = Gt(e, i);
289
- return i.add(o), o;
290
- },
291
- /**
292
- * With circular references, the source node is only resolved after all
293
- * of its child nodes are. This is why anchors are set only after all of
294
- * the nodes have been created.
295
- */
296
- setAnchors: () => {
297
- for (const r of t) {
298
- const o = n.get(r);
299
- if (typeof o == "object" && o.anchor && (E(o.node) || L(o.node)))
300
- o.node.anchor = o.anchor;
301
- else {
302
- const l = new Error("Failed to resolve repeated object (this should not happen)");
303
- throw l.source = r, l;
304
- }
305
- }
306
- },
307
- sourceObjects: n
308
- };
309
- }
310
- function oe(s, e, t, n) {
311
- if (n && typeof n == "object")
312
- if (Array.isArray(n))
313
- for (let i = 0, r = n.length; i < r; ++i) {
314
- const o = n[i], l = oe(s, n, String(i), o);
315
- l === void 0 ? delete n[i] : l !== o && (n[i] = l);
316
- }
317
- else if (n instanceof Map)
318
- for (const i of Array.from(n.keys())) {
319
- const r = n.get(i), o = oe(s, n, i, r);
320
- o === void 0 ? n.delete(i) : o !== r && n.set(i, o);
321
- }
322
- else if (n instanceof Set)
323
- for (const i of Array.from(n)) {
324
- const r = oe(s, n, i, i);
325
- r === void 0 ? n.delete(i) : r !== i && (n.delete(i), n.add(r));
326
- }
327
- else
328
- for (const [i, r] of Object.entries(n)) {
329
- const o = oe(s, n, i, r);
330
- o === void 0 ? delete n[i] : o !== r && (n[i] = o);
331
- }
332
- return s.call(e, t, n);
333
- }
334
- function P(s, e, t) {
335
- if (Array.isArray(s))
336
- return s.map((n, i) => P(n, String(i), t));
337
- if (s && typeof s.toJSON == "function") {
338
- if (!t || !vs(s))
339
- return s.toJSON(e, t);
340
- const n = { aliasCount: 0, count: 1, res: void 0 };
341
- t.anchors.set(s, n), t.onCreate = (r) => {
342
- n.res = r, delete t.onCreate;
343
- };
344
- const i = s.toJSON(e, t);
345
- return t.onCreate && t.onCreate(i), i;
346
- }
347
- return typeof s == "bigint" && !(t != null && t.keep) ? Number(s) : s;
348
- }
349
- class pt {
350
- constructor(e) {
351
- Object.defineProperty(this, j, { value: e });
352
- }
353
- /** Create a copy of this node. */
354
- clone() {
355
- const e = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
356
- return this.range && (e.range = this.range.slice()), e;
357
- }
358
- /** A plain JavaScript representation of this node. */
359
- toJS(e, { mapAsMap: t, maxAliasCount: n, onAnchor: i, reviver: r } = {}) {
360
- if (!ee(e))
361
- throw new TypeError("A document argument is required");
362
- const o = {
363
- anchors: /* @__PURE__ */ new Map(),
364
- doc: e,
365
- keep: !0,
366
- mapAsMap: t === !0,
367
- mapKeyWarned: !1,
368
- maxAliasCount: typeof n == "number" ? n : 100
369
- }, l = P(this, "", o);
370
- if (typeof i == "function")
371
- for (const { count: a, res: c } of o.anchors.values())
372
- i(c, a);
373
- return typeof r == "function" ? oe(r, { "": l }, "", l) : l;
374
- }
375
- }
376
- class Re extends pt {
377
- constructor(e) {
378
- super(dt), this.source = e, Object.defineProperty(this, "tag", {
379
- set() {
380
- throw new Error("Alias nodes cannot have tags");
381
- }
382
- });
383
- }
384
- /**
385
- * Resolve the value of this alias within `doc`, finding the last
386
- * instance of the `source` anchor before this node.
387
- */
388
- resolve(e) {
389
- let t;
390
- return G(e, {
391
- Node: (n, i) => {
392
- if (i === this)
393
- return G.BREAK;
394
- i.anchor === this.source && (t = i);
395
- }
396
- }), t;
397
- }
398
- toJSON(e, t) {
399
- if (!t)
400
- return { source: this.source };
401
- const { anchors: n, doc: i, maxAliasCount: r } = t, o = this.resolve(i);
402
- if (!o) {
403
- const a = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
404
- throw new ReferenceError(a);
405
- }
406
- let l = n.get(o);
407
- if (l || (P(o, null, t), l = n.get(o)), !l || l.res === void 0) {
408
- const a = "This should not happen: Alias anchor was not resolved?";
409
- throw new ReferenceError(a);
410
- }
411
- if (r >= 0 && (l.count += 1, l.aliasCount === 0 && (l.aliasCount = ve(i, o, n)), l.count * l.aliasCount > r)) {
412
- const a = "Excessive alias count indicates a resource exhaustion attack";
413
- throw new ReferenceError(a);
414
- }
415
- return l.res;
416
- }
417
- toString(e, t, n) {
418
- const i = `*${this.source}`;
419
- if (e) {
420
- if (Jt(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
421
- const r = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
422
- throw new Error(r);
423
- }
424
- if (e.implicitKey)
425
- return `${i} `;
426
- }
427
- return i;
428
- }
429
- }
430
- function ve(s, e, t) {
431
- if (x(e)) {
432
- const n = e.resolve(s), i = t && n && t.get(n);
433
- return i ? i.count * i.aliasCount : 0;
434
- } else if (L(e)) {
435
- let n = 0;
436
- for (const i of e.items) {
437
- const r = ve(s, i, t);
438
- r > n && (n = r);
439
- }
440
- return n;
441
- } else if (T(e)) {
442
- const n = ve(s, e.key, t), i = ve(s, e.value, t);
443
- return Math.max(n, i);
444
- }
445
- return 1;
446
- }
447
- const Qt = (s) => !s || typeof s != "function" && typeof s != "object";
448
- class A extends pt {
449
- constructor(e) {
450
- super(R), this.value = e;
451
- }
452
- toJSON(e, t) {
453
- return t != null && t.keep ? this.value : P(this.value, e, t);
454
- }
455
- toString() {
456
- return String(this.value);
457
- }
458
- }
459
- A.BLOCK_FOLDED = "BLOCK_FOLDED";
460
- A.BLOCK_LITERAL = "BLOCK_LITERAL";
461
- A.PLAIN = "PLAIN";
462
- A.QUOTE_DOUBLE = "QUOTE_DOUBLE";
463
- A.QUOTE_SINGLE = "QUOTE_SINGLE";
464
- const Ps = "tag:yaml.org,2002:";
465
- function js(s, e, t) {
466
- if (e) {
467
- const n = t.filter((r) => r.tag === e), i = n.find((r) => !r.format) ?? n[0];
468
- if (!i)
469
- throw new Error(`Tag ${e} not found`);
470
- return i;
471
- }
472
- return t.find((n) => {
473
- var i;
474
- return ((i = n.identify) == null ? void 0 : i.call(n, s)) && !n.format;
475
- });
476
- }
477
- function ke(s, e, t) {
478
- var f, d, h;
479
- if (ee(s) && (s = s.contents), $(s))
480
- return s;
481
- if (T(s)) {
482
- const y = (d = (f = t.schema[Y]).createNode) == null ? void 0 : d.call(f, t.schema, null, t);
483
- return y.items.push(s), y;
484
- }
485
- (s instanceof String || s instanceof Number || s instanceof Boolean || typeof BigInt < "u" && s instanceof BigInt) && (s = s.valueOf());
486
- const { aliasDuplicateObjects: n, onAnchor: i, onTagObj: r, schema: o, sourceObjects: l } = t;
487
- let a;
488
- if (n && s && typeof s == "object") {
489
- if (a = l.get(s), a)
490
- return a.anchor || (a.anchor = i(s)), new Re(a.anchor);
491
- a = { anchor: null, node: null }, l.set(s, a);
492
- }
493
- e != null && e.startsWith("!!") && (e = Ps + e.slice(2));
494
- let c = js(s, e, o.tags);
495
- if (!c) {
496
- if (s && typeof s.toJSON == "function" && (s = s.toJSON()), !s || typeof s != "object") {
497
- const y = new A(s);
498
- return a && (a.node = y), y;
499
- }
500
- c = s instanceof Map ? o[Y] : Symbol.iterator in Object(s) ? o[he] : o[Y];
501
- }
502
- r && (r(c), delete t.onTagObj);
503
- const p = c != null && c.createNode ? c.createNode(t.schema, s, t) : typeof ((h = c == null ? void 0 : c.nodeClass) == null ? void 0 : h.from) == "function" ? c.nodeClass.from(t.schema, s, t) : new A(s);
504
- return e ? p.tag = e : c.default || (p.tag = c.tag), a && (a.node = p), p;
505
- }
506
- function Pe(s, e, t) {
507
- let n = t;
508
- for (let i = e.length - 1; i >= 0; --i) {
509
- const r = e[i];
510
- if (typeof r == "number" && Number.isInteger(r) && r >= 0) {
511
- const o = [];
512
- o[r] = n, n = o;
513
- } else
514
- n = /* @__PURE__ */ new Map([[r, n]]);
515
- }
516
- return ke(n, void 0, {
517
- aliasDuplicateObjects: !1,
518
- keepUndefined: !1,
519
- onAnchor: () => {
520
- throw new Error("This should not happen, please report a bug.");
521
- },
522
- schema: s,
523
- sourceObjects: /* @__PURE__ */ new Map()
524
- });
525
- }
526
- const we = (s) => s == null || typeof s == "object" && !!s[Symbol.iterator]().next().done;
527
- class Wt extends pt {
528
- constructor(e, t) {
529
- super(e), Object.defineProperty(this, "schema", {
530
- value: t,
531
- configurable: !0,
532
- enumerable: !1,
533
- writable: !0
534
- });
535
- }
536
- /**
537
- * Create a copy of this collection.
538
- *
539
- * @param schema - If defined, overwrites the original's schema
540
- */
541
- clone(e) {
542
- const t = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
543
- return e && (t.schema = e), t.items = t.items.map((n) => $(n) || T(n) ? n.clone(e) : n), this.range && (t.range = this.range.slice()), t;
544
- }
545
- /**
546
- * Adds a value to the collection. For `!!map` and `!!omap` the value must
547
- * be a Pair instance or a `{ key, value }` object, which may not have a key
548
- * that already exists in the map.
549
- */
550
- addIn(e, t) {
551
- if (we(e))
552
- this.add(t);
553
- else {
554
- const [n, ...i] = e, r = this.get(n, !0);
555
- if (L(r))
556
- r.addIn(i, t);
557
- else if (r === void 0 && this.schema)
558
- this.set(n, Pe(this.schema, i, t));
559
- else
560
- throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`);
561
- }
562
- }
563
- /**
564
- * Removes a value from the collection.
565
- * @returns `true` if the item was found and removed.
566
- */
567
- deleteIn(e) {
568
- const [t, ...n] = e;
569
- if (n.length === 0)
570
- return this.delete(t);
571
- const i = this.get(t, !0);
572
- if (L(i))
573
- return i.deleteIn(n);
574
- throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`);
575
- }
576
- /**
577
- * Returns item at `key`, or `undefined` if not found. By default unwraps
578
- * scalar values from their surrounding node; to disable set `keepScalar` to
579
- * `true` (collections are always returned intact).
580
- */
581
- getIn(e, t) {
582
- const [n, ...i] = e, r = this.get(n, !0);
583
- return i.length === 0 ? !t && E(r) ? r.value : r : L(r) ? r.getIn(i, t) : void 0;
584
- }
585
- hasAllNullValues(e) {
586
- return this.items.every((t) => {
587
- if (!T(t))
588
- return !1;
589
- const n = t.value;
590
- return n == null || e && E(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
591
- });
592
- }
593
- /**
594
- * Checks if the collection includes a value with the key `key`.
595
- */
596
- hasIn(e) {
597
- const [t, ...n] = e;
598
- if (n.length === 0)
599
- return this.has(t);
600
- const i = this.get(t, !0);
601
- return L(i) ? i.hasIn(n) : !1;
602
- }
603
- /**
604
- * Sets a value in this collection. For `!!set`, `value` needs to be a
605
- * boolean to add/remove the item from the set.
606
- */
607
- setIn(e, t) {
608
- const [n, ...i] = e;
609
- if (i.length === 0)
610
- this.set(n, t);
611
- else {
612
- const r = this.get(n, !0);
613
- if (L(r))
614
- r.setIn(i, t);
615
- else if (r === void 0 && this.schema)
616
- this.set(n, Pe(this.schema, i, t));
617
- else
618
- throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`);
619
- }
620
- }
621
- }
622
- const Ds = (s) => s.replace(/^(?!$)(?: $)?/gm, "#");
623
- function U(s, e) {
624
- return /^\n+$/.test(s) ? s.substring(1) : e ? s.replace(/^(?! *$)/gm, e) : s;
625
- }
626
- const H = (s, e, t) => s.endsWith(`
627
- `) ? U(t, e) : t.includes(`
628
- `) ? `
629
- ` + U(t, e) : (s.endsWith(" ") ? "" : " ") + t, Ht = "flow", at = "block", Be = "quoted";
630
- function Ue(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentWidth: r = 20, onFold: o, onOverflow: l } = {}) {
631
- if (!i || i < 0)
632
- return s;
633
- i < r && (r = 0);
634
- const a = Math.max(1 + r, 1 + i - e.length);
635
- if (s.length <= a)
636
- return s;
637
- const c = [], p = {};
638
- let f = i - e.length;
639
- typeof n == "number" && (n > i - Math.max(2, r) ? c.push(0) : f = i - n);
640
- let d, h, y = !1, u = -1, m = -1, b = -1;
641
- t === at && (u = $t(s, u, e.length), u !== -1 && (f = u + a));
642
- for (let N; N = s[u += 1]; ) {
643
- if (t === Be && N === "\\") {
644
- switch (m = u, s[u + 1]) {
645
- case "x":
646
- u += 3;
647
- break;
648
- case "u":
649
- u += 5;
650
- break;
651
- case "U":
652
- u += 9;
653
- break;
654
- default:
655
- u += 1;
656
- }
657
- b = u;
658
- }
659
- if (N === `
660
- `)
661
- t === at && (u = $t(s, u, e.length)), f = u + e.length + a, d = void 0;
662
- else {
663
- if (N === " " && h && h !== " " && h !== `
664
- ` && h !== " ") {
665
- const w = s[u + 1];
666
- w && w !== " " && w !== `
667
- ` && w !== " " && (d = u);
668
- }
669
- if (u >= f)
670
- if (d)
671
- c.push(d), f = d + a, d = void 0;
672
- else if (t === Be) {
673
- for (; h === " " || h === " "; )
674
- h = N, N = s[u += 1], y = !0;
675
- const w = u > b + 1 ? u - 2 : m - 1;
676
- if (p[w])
677
- return s;
678
- c.push(w), p[w] = !0, f = w + a, d = void 0;
679
- } else
680
- y = !0;
681
- }
682
- h = N;
683
- }
684
- if (y && l && l(), c.length === 0)
685
- return s;
686
- o && o();
687
- let S = s.slice(0, c[0]);
688
- for (let N = 0; N < c.length; ++N) {
689
- const w = c[N], k = c[N + 1] || s.length;
690
- w === 0 ? S = `
691
- ${e}${s.slice(0, k)}` : (t === Be && p[w] && (S += `${s[w]}\\`), S += `
692
- ${e}${s.slice(w + 1, k)}`);
693
- }
694
- return S;
695
- }
696
- function $t(s, e, t) {
697
- let n = e, i = e + 1, r = s[i];
698
- for (; r === " " || r === " "; )
699
- if (e < i + t)
700
- r = s[++e];
701
- else {
702
- do
703
- r = s[++e];
704
- while (r && r !== `
705
- `);
706
- n = e, i = e + 1, r = s[i];
707
- }
708
- return n;
709
- }
710
- const Ve = (s, e) => ({
711
- indentAtStart: e ? s.indent.length : s.indentAtStart,
712
- lineWidth: s.options.lineWidth,
713
- minContentWidth: s.options.minContentWidth
714
- }), Je = (s) => /^(%|---|\.\.\.)/m.test(s);
715
- function qs(s, e, t) {
716
- if (!e || e < 0)
717
- return !1;
718
- const n = e - t, i = s.length;
719
- if (i <= n)
720
- return !1;
721
- for (let r = 0, o = 0; r < i; ++r)
722
- if (s[r] === `
723
- `) {
724
- if (r - o > n)
725
- return !0;
726
- if (o = r + 1, i - o <= n)
727
- return !1;
728
- }
729
- return !0;
730
- }
731
- function Se(s, e) {
732
- const t = JSON.stringify(s);
733
- if (e.options.doubleQuotedAsJSON)
734
- return t;
735
- const { implicitKey: n } = e, i = e.options.doubleQuotedMinMultiLineLength, r = e.indent || (Je(s) ? " " : "");
736
- let o = "", l = 0;
737
- for (let a = 0, c = t[a]; c; c = t[++a])
738
- if (c === " " && t[a + 1] === "\\" && t[a + 2] === "n" && (o += t.slice(l, a) + "\\ ", a += 1, l = a, c = "\\"), c === "\\")
739
- switch (t[a + 1]) {
740
- case "u":
741
- {
742
- o += t.slice(l, a);
743
- const p = t.substr(a + 2, 4);
744
- switch (p) {
745
- case "0000":
746
- o += "\\0";
747
- break;
748
- case "0007":
749
- o += "\\a";
750
- break;
751
- case "000b":
752
- o += "\\v";
753
- break;
754
- case "001b":
755
- o += "\\e";
756
- break;
757
- case "0085":
758
- o += "\\N";
759
- break;
760
- case "00a0":
761
- o += "\\_";
762
- break;
763
- case "2028":
764
- o += "\\L";
765
- break;
766
- case "2029":
767
- o += "\\P";
768
- break;
769
- default:
770
- p.substr(0, 2) === "00" ? o += "\\x" + p.substr(2) : o += t.substr(a, 6);
771
- }
772
- a += 5, l = a + 1;
773
- }
774
- break;
775
- case "n":
776
- if (n || t[a + 2] === '"' || t.length < i)
777
- a += 1;
778
- else {
779
- for (o += t.slice(l, a) + `
780
-
781
- `; t[a + 2] === "\\" && t[a + 3] === "n" && t[a + 4] !== '"'; )
782
- o += `
783
- `, a += 2;
784
- o += r, t[a + 2] === " " && (o += "\\"), a += 1, l = a + 1;
785
- }
786
- break;
787
- default:
788
- a += 1;
789
- }
790
- return o = l ? o + t.slice(l) : t, n ? o : Ue(o, r, Be, Ve(e, !1));
791
- }
792
- function ct(s, e) {
793
- if (e.options.singleQuote === !1 || e.implicitKey && s.includes(`
794
- `) || /[ \t]\n|\n[ \t]/.test(s))
795
- return Se(s, e);
796
- const t = e.indent || (Je(s) ? " " : ""), n = "'" + s.replace(/'/g, "''").replace(/\n+/g, `$&
797
- ${t}`) + "'";
798
- return e.implicitKey ? n : Ue(n, t, Ht, Ve(e, !1));
799
- }
800
- function le(s, e) {
801
- const { singleQuote: t } = e.options;
802
- let n;
803
- if (t === !1)
804
- n = Se;
805
- else {
806
- const i = s.includes('"'), r = s.includes("'");
807
- i && !r ? n = ct : r && !i ? n = Se : n = t ? ct : Se;
808
- }
809
- return n(s, e);
810
- }
811
- let ft;
812
- try {
813
- ft = new RegExp(`(^|(?<!
814
- ))
815
- +(?!
816
- |$)`, "g");
817
- } catch {
818
- ft = /\n+(?!\n|$)/g;
819
- }
820
- function Me({ comment: s, type: e, value: t }, n, i, r) {
821
- const { blockQuote: o, commentString: l, lineWidth: a } = n.options;
822
- if (!o || /\n[\t ]+$/.test(t) || /^\s*$/.test(t))
823
- return le(t, n);
824
- const c = n.indent || (n.forceBlockIndent || Je(t) ? " " : ""), p = o === "literal" ? !0 : o === "folded" || e === A.BLOCK_FOLDED ? !1 : e === A.BLOCK_LITERAL ? !0 : !qs(t, a, c.length);
825
- if (!t)
826
- return p ? `|
827
- ` : `>
828
- `;
829
- let f, d;
830
- for (d = t.length; d > 0; --d) {
831
- const k = t[d - 1];
832
- if (k !== `
833
- ` && k !== " " && k !== " ")
834
- break;
835
- }
836
- let h = t.substring(d);
837
- const y = h.indexOf(`
838
- `);
839
- y === -1 ? f = "-" : t === h || y !== h.length - 1 ? (f = "+", r && r()) : f = "", h && (t = t.slice(0, -h.length), h[h.length - 1] === `
840
- ` && (h = h.slice(0, -1)), h = h.replace(ft, `$&${c}`));
841
- let u = !1, m, b = -1;
842
- for (m = 0; m < t.length; ++m) {
843
- const k = t[m];
844
- if (k === " ")
845
- u = !0;
846
- else if (k === `
847
- `)
848
- b = m;
849
- else
850
- break;
851
- }
852
- let S = t.substring(0, b < m ? b + 1 : m);
853
- S && (t = t.substring(S.length), S = S.replace(/\n+/g, `$&${c}`));
854
- let w = (u ? c ? "2" : "1" : "") + f;
855
- if (s && (w += " " + l(s.replace(/ ?[\r\n]+/g, " ")), i && i()), !p) {
856
- const k = t.replace(/\n+/g, `
857
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${c}`);
858
- let O = !1;
859
- const I = Ve(n, !0);
860
- o !== "folded" && e !== A.BLOCK_FOLDED && (I.onOverflow = () => {
861
- O = !0;
862
- });
863
- const g = Ue(`${S}${k}${h}`, c, at, I);
864
- if (!O)
865
- return `>${w}
866
- ${c}${g}`;
867
- }
868
- return t = t.replace(/\n+/g, `$&${c}`), `|${w}
869
- ${c}${S}${t}${h}`;
870
- }
871
- function Fs(s, e, t, n) {
872
- const { type: i, value: r } = s, { actualString: o, implicitKey: l, indent: a, indentStep: c, inFlow: p } = e;
873
- if (l && r.includes(`
874
- `) || p && /[[\]{},]/.test(r))
875
- return le(r, e);
876
- if (!r || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))
877
- return l || p || !r.includes(`
878
- `) ? le(r, e) : Me(s, e, t, n);
879
- if (!l && !p && i !== A.PLAIN && r.includes(`
880
- `))
881
- return Me(s, e, t, n);
882
- if (Je(r)) {
883
- if (a === "")
884
- return e.forceBlockIndent = !0, Me(s, e, t, n);
885
- if (l && a === c)
886
- return le(r, e);
887
- }
888
- const f = r.replace(/\n+/g, `$&
889
- ${a}`);
890
- if (o) {
891
- const d = (u) => {
892
- var m;
893
- return u.default && u.tag !== "tag:yaml.org,2002:str" && ((m = u.test) == null ? void 0 : m.test(f));
894
- }, { compat: h, tags: y } = e.doc.schema;
895
- if (y.some(d) || h != null && h.some(d))
896
- return le(r, e);
897
- }
898
- return l ? f : Ue(f, a, Ht, Ve(e, !1));
899
- }
900
- function Ae(s, e, t, n) {
901
- const { implicitKey: i, inFlow: r } = e, o = typeof s.value == "string" ? s : Object.assign({}, s, { value: String(s.value) });
902
- let { type: l } = s;
903
- l !== A.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (l = A.QUOTE_DOUBLE);
904
- const a = (p) => {
905
- switch (p) {
906
- case A.BLOCK_FOLDED:
907
- case A.BLOCK_LITERAL:
908
- return i || r ? le(o.value, e) : Me(o, e, t, n);
909
- case A.QUOTE_DOUBLE:
910
- return Se(o.value, e);
911
- case A.QUOTE_SINGLE:
912
- return ct(o.value, e);
913
- case A.PLAIN:
914
- return Fs(o, e, t, n);
915
- default:
916
- return null;
917
- }
918
- };
919
- let c = a(l);
920
- if (c === null) {
921
- const { defaultKeyType: p, defaultStringType: f } = e.options, d = i && p || f;
922
- if (c = a(d), c === null)
923
- throw new Error(`Unsupported default string type ${d}`);
924
- }
925
- return c;
926
- }
927
- function Xt(s, e) {
928
- const t = Object.assign({
929
- blockQuote: !0,
930
- commentString: Ds,
931
- defaultKeyType: null,
932
- defaultStringType: "PLAIN",
933
- directives: null,
934
- doubleQuotedAsJSON: !1,
935
- doubleQuotedMinMultiLineLength: 40,
936
- falseStr: "false",
937
- flowCollectionPadding: !0,
938
- indentSeq: !0,
939
- lineWidth: 80,
940
- minContentWidth: 20,
941
- nullStr: "null",
942
- simpleKeys: !1,
943
- singleQuote: null,
944
- trueStr: "true",
945
- verifyAliasOrder: !0
946
- }, s.schema.toStringOptions, e);
947
- let n;
948
- switch (t.collectionStyle) {
949
- case "block":
950
- n = !1;
951
- break;
952
- case "flow":
953
- n = !0;
954
- break;
955
- default:
956
- n = null;
957
- }
958
- return {
959
- anchors: /* @__PURE__ */ new Set(),
960
- doc: s,
961
- flowCollectionPadding: t.flowCollectionPadding ? " " : "",
962
- indent: "",
963
- indentStep: typeof t.indent == "number" ? " ".repeat(t.indent) : " ",
964
- inFlow: n,
965
- options: t
966
- };
967
- }
968
- function Rs(s, e) {
969
- var i;
970
- if (e.tag) {
971
- const r = s.filter((o) => o.tag === e.tag);
972
- if (r.length > 0)
973
- return r.find((o) => o.format === e.format) ?? r[0];
974
- }
975
- let t, n;
976
- if (E(e)) {
977
- n = e.value;
978
- let r = s.filter((o) => {
979
- var l;
980
- return (l = o.identify) == null ? void 0 : l.call(o, n);
981
- });
982
- if (r.length > 1) {
983
- const o = r.filter((l) => l.test);
984
- o.length > 0 && (r = o);
985
- }
986
- t = r.find((o) => o.format === e.format) ?? r.find((o) => !o.format);
987
- } else
988
- n = e, t = s.find((r) => r.nodeClass && n instanceof r.nodeClass);
989
- if (!t) {
990
- const r = ((i = n == null ? void 0 : n.constructor) == null ? void 0 : i.name) ?? typeof n;
991
- throw new Error(`Tag not resolved for ${r} value`);
992
- }
993
- return t;
994
- }
995
- function Us(s, e, { anchors: t, doc: n }) {
996
- if (!n.directives)
997
- return "";
998
- const i = [], r = (E(s) || L(s)) && s.anchor;
999
- r && Jt(r) && (t.add(r), i.push(`&${r}`));
1000
- const o = s.tag ? s.tag : e.default ? null : e.tag;
1001
- return o && i.push(n.directives.tagString(o)), i.join(" ");
1002
- }
1003
- function fe(s, e, t, n) {
1004
- var a;
1005
- if (T(s))
1006
- return s.toString(e, t, n);
1007
- if (x(s)) {
1008
- if (e.doc.directives)
1009
- return s.toString(e);
1010
- if ((a = e.resolvedAliases) != null && a.has(s))
1011
- throw new TypeError("Cannot stringify circular structure without alias nodes");
1012
- e.resolvedAliases ? e.resolvedAliases.add(s) : e.resolvedAliases = /* @__PURE__ */ new Set([s]), s = s.resolve(e.doc);
1013
- }
1014
- let i;
1015
- const r = $(s) ? s : e.doc.createNode(s, { onTagObj: (c) => i = c });
1016
- i || (i = Rs(e.doc.schema.tags, r));
1017
- const o = Us(r, i, e);
1018
- o.length > 0 && (e.indentAtStart = (e.indentAtStart ?? 0) + o.length + 1);
1019
- const l = typeof i.stringify == "function" ? i.stringify(r, e, t, n) : E(r) ? Ae(r, e, t, n) : r.toString(e, t, n);
1020
- return o ? E(r) || l[0] === "{" || l[0] === "[" ? `${o} ${l}` : `${o}
1021
- ${e.indent}${l}` : l;
1022
- }
1023
- function Vs({ key: s, value: e }, t, n, i) {
1024
- const { allNullValues: r, doc: o, indent: l, indentStep: a, options: { commentString: c, indentSeq: p, simpleKeys: f } } = t;
1025
- let d = $(s) && s.comment || null;
1026
- if (f) {
1027
- if (d)
1028
- throw new Error("With simple keys, key nodes cannot have comments");
1029
- if (L(s) || !$(s) && typeof s == "object") {
1030
- const I = "With simple keys, collection cannot be used as a key value";
1031
- throw new Error(I);
1032
- }
1033
- }
1034
- let h = !f && (!s || d && e == null && !t.inFlow || L(s) || (E(s) ? s.type === A.BLOCK_FOLDED || s.type === A.BLOCK_LITERAL : typeof s == "object"));
1035
- t = Object.assign({}, t, {
1036
- allNullValues: !1,
1037
- implicitKey: !h && (f || !r),
1038
- indent: l + a
1039
- });
1040
- let y = !1, u = !1, m = fe(s, t, () => y = !0, () => u = !0);
1041
- if (!h && !t.inFlow && m.length > 1024) {
1042
- if (f)
1043
- throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
1044
- h = !0;
1045
- }
1046
- if (t.inFlow) {
1047
- if (r || e == null)
1048
- return y && n && n(), m === "" ? "?" : h ? `? ${m}` : m;
1049
- } else if (r && !f || e == null && h)
1050
- return m = `? ${m}`, d && !y ? m += H(m, t.indent, c(d)) : u && i && i(), m;
1051
- y && (d = null), h ? (d && (m += H(m, t.indent, c(d))), m = `? ${m}
1052
- ${l}:`) : (m = `${m}:`, d && (m += H(m, t.indent, c(d))));
1053
- let b, S, N;
1054
- $(e) ? (b = !!e.spaceBefore, S = e.commentBefore, N = e.comment) : (b = !1, S = null, N = null, e && typeof e == "object" && (e = o.createNode(e))), t.implicitKey = !1, !h && !d && E(e) && (t.indentAtStart = m.length + 1), u = !1, !p && a.length >= 2 && !t.inFlow && !h && pe(e) && !e.flow && !e.tag && !e.anchor && (t.indent = t.indent.substring(2));
1055
- let w = !1;
1056
- const k = fe(e, t, () => w = !0, () => u = !0);
1057
- let O = " ";
1058
- if (d || b || S) {
1059
- if (O = b ? `
1060
- ` : "", S) {
1061
- const I = c(S);
1062
- O += `
1063
- ${U(I, t.indent)}`;
1064
- }
1065
- k === "" && !t.inFlow ? O === `
1066
- ` && (O = `
1067
-
1068
- `) : O += `
1069
- ${t.indent}`;
1070
- } else if (!h && L(e)) {
1071
- const I = k[0], g = k.indexOf(`
1072
- `), _ = g !== -1, J = t.inFlow ?? e.flow ?? e.items.length === 0;
1073
- if (_ || !J) {
1074
- let te = !1;
1075
- if (_ && (I === "&" || I === "!")) {
1076
- let C = k.indexOf(" ");
1077
- I === "&" && C !== -1 && C < g && k[C + 1] === "!" && (C = k.indexOf(" ", C + 1)), (C === -1 || g < C) && (te = !0);
1078
- }
1079
- te || (O = `
1080
- ${t.indent}`);
1081
- }
1082
- } else (k === "" || k[0] === `
1083
- `) && (O = "");
1084
- return m += O + k, t.inFlow ? w && n && n() : N && !w ? m += H(m, t.indent, c(N)) : u && i && i(), m;
1085
- }
1086
- function zt(s, e) {
1087
- (s === "debug" || s === "warn") && console.warn(e);
1088
- }
1089
- const Te = "<<", V = {
1090
- identify: (s) => s === Te || typeof s == "symbol" && s.description === Te,
1091
- default: "key",
1092
- tag: "tag:yaml.org,2002:merge",
1093
- test: /^<<$/,
1094
- resolve: () => Object.assign(new A(Symbol(Te)), {
1095
- addToJSMap: Zt
1096
- }),
1097
- stringify: () => Te
1098
- }, Js = (s, e) => (V.identify(e) || E(e) && (!e.type || e.type === A.PLAIN) && V.identify(e.value)) && (s == null ? void 0 : s.doc.schema.tags.some((t) => t.tag === V.tag && t.default));
1099
- function Zt(s, e, t) {
1100
- if (t = s && x(t) ? t.resolve(s.doc) : t, pe(t))
1101
- for (const n of t.items)
1102
- et(s, e, n);
1103
- else if (Array.isArray(t))
1104
- for (const n of t)
1105
- et(s, e, n);
1106
- else
1107
- et(s, e, t);
1108
- }
1109
- function et(s, e, t) {
1110
- const n = s && x(t) ? t.resolve(s.doc) : t;
1111
- if (!de(n))
1112
- throw new Error("Merge sources must be maps or map aliases");
1113
- const i = n.toJSON(null, s, Map);
1114
- for (const [r, o] of i)
1115
- e instanceof Map ? e.has(r) || e.set(r, o) : e instanceof Set ? e.add(r) : Object.prototype.hasOwnProperty.call(e, r) || Object.defineProperty(e, r, {
1116
- value: o,
1117
- writable: !0,
1118
- enumerable: !0,
1119
- configurable: !0
1120
- });
1121
- return e;
1122
- }
1123
- function xt(s, e, { key: t, value: n }) {
1124
- if ($(t) && t.addToJSMap)
1125
- t.addToJSMap(s, e, n);
1126
- else if (Js(s, t))
1127
- Zt(s, e, n);
1128
- else {
1129
- const i = P(t, "", s);
1130
- if (e instanceof Map)
1131
- e.set(i, P(n, i, s));
1132
- else if (e instanceof Set)
1133
- e.add(i);
1134
- else {
1135
- const r = Ys(t, i, s), o = P(n, r, s);
1136
- r in e ? Object.defineProperty(e, r, {
1137
- value: o,
1138
- writable: !0,
1139
- enumerable: !0,
1140
- configurable: !0
1141
- }) : e[r] = o;
1142
- }
1143
- }
1144
- return e;
1145
- }
1146
- function Ys(s, e, t) {
1147
- if (e === null)
1148
- return "";
1149
- if (typeof e != "object")
1150
- return String(e);
1151
- if ($(s) && (t != null && t.doc)) {
1152
- const n = Xt(t.doc, {});
1153
- n.anchors = /* @__PURE__ */ new Set();
1154
- for (const r of t.anchors.keys())
1155
- n.anchors.add(r.anchor);
1156
- n.inFlow = !0, n.inStringifyKey = !0;
1157
- const i = s.toString(n);
1158
- if (!t.mapKeyWarned) {
1159
- let r = JSON.stringify(i);
1160
- r.length > 40 && (r = r.substring(0, 36) + '..."'), zt(t.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`), t.mapKeyWarned = !0;
1161
- }
1162
- return i;
1163
- }
1164
- return JSON.stringify(e);
1165
- }
1166
- function mt(s, e, t) {
1167
- const n = ke(s, void 0, t), i = ke(e, void 0, t);
1168
- return new v(n, i);
1169
- }
1170
- class v {
1171
- constructor(e, t = null) {
1172
- Object.defineProperty(this, j, { value: qt }), this.key = e, this.value = t;
1173
- }
1174
- clone(e) {
1175
- let { key: t, value: n } = this;
1176
- return $(t) && (t = t.clone(e)), $(n) && (n = n.clone(e)), new v(t, n);
1177
- }
1178
- toJSON(e, t) {
1179
- const n = t != null && t.mapAsMap ? /* @__PURE__ */ new Map() : {};
1180
- return xt(t, n, this);
1181
- }
1182
- toString(e, t, n) {
1183
- return e != null && e.doc ? Vs(this, e, t, n) : JSON.stringify(this);
1184
- }
1185
- }
1186
- function es(s, e, t) {
1187
- return (e.inFlow ?? s.flow ? Qs : Gs)(s, e, t);
1188
- }
1189
- function Gs({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, itemIndent: r, onChompKeep: o, onComment: l }) {
1190
- const { indent: a, options: { commentString: c } } = t, p = Object.assign({}, t, { indent: r, type: null });
1191
- let f = !1;
1192
- const d = [];
1193
- for (let y = 0; y < e.length; ++y) {
1194
- const u = e[y];
1195
- let m = null;
1196
- if ($(u))
1197
- !f && u.spaceBefore && d.push(""), je(t, d, u.commentBefore, f), u.comment && (m = u.comment);
1198
- else if (T(u)) {
1199
- const S = $(u.key) ? u.key : null;
1200
- S && (!f && S.spaceBefore && d.push(""), je(t, d, S.commentBefore, f));
1201
- }
1202
- f = !1;
1203
- let b = fe(u, p, () => m = null, () => f = !0);
1204
- m && (b += H(b, r, c(m))), f && m && (f = !1), d.push(n + b);
1205
- }
1206
- let h;
1207
- if (d.length === 0)
1208
- h = i.start + i.end;
1209
- else {
1210
- h = d[0];
1211
- for (let y = 1; y < d.length; ++y) {
1212
- const u = d[y];
1213
- h += u ? `
1214
- ${a}${u}` : `
1215
- `;
1216
- }
1217
- }
1218
- return s ? (h += `
1219
- ` + U(c(s), a), l && l()) : f && o && o(), h;
1220
- }
1221
- function Qs({ items: s }, e, { flowChars: t, itemIndent: n }) {
1222
- const { indent: i, indentStep: r, flowCollectionPadding: o, options: { commentString: l } } = e;
1223
- n += r;
1224
- const a = Object.assign({}, e, {
1225
- indent: n,
1226
- inFlow: !0,
1227
- type: null
1228
- });
1229
- let c = !1, p = 0;
1230
- const f = [];
1231
- for (let y = 0; y < s.length; ++y) {
1232
- const u = s[y];
1233
- let m = null;
1234
- if ($(u))
1235
- u.spaceBefore && f.push(""), je(e, f, u.commentBefore, !1), u.comment && (m = u.comment);
1236
- else if (T(u)) {
1237
- const S = $(u.key) ? u.key : null;
1238
- S && (S.spaceBefore && f.push(""), je(e, f, S.commentBefore, !1), S.comment && (c = !0));
1239
- const N = $(u.value) ? u.value : null;
1240
- N ? (N.comment && (m = N.comment), N.commentBefore && (c = !0)) : u.value == null && (S != null && S.comment) && (m = S.comment);
1241
- }
1242
- m && (c = !0);
1243
- let b = fe(u, a, () => m = null);
1244
- y < s.length - 1 && (b += ","), m && (b += H(b, n, l(m))), !c && (f.length > p || b.includes(`
1245
- `)) && (c = !0), f.push(b), p = f.length;
1246
- }
1247
- const { start: d, end: h } = t;
1248
- if (f.length === 0)
1249
- return d + h;
1250
- if (!c) {
1251
- const y = f.reduce((u, m) => u + m.length + 2, 2);
1252
- c = e.options.lineWidth > 0 && y > e.options.lineWidth;
1253
- }
1254
- if (c) {
1255
- let y = d;
1256
- for (const u of f)
1257
- y += u ? `
1258
- ${r}${i}${u}` : `
1259
- `;
1260
- return `${y}
1261
- ${i}${h}`;
1262
- } else
1263
- return `${d}${o}${f.join(" ")}${o}${h}`;
1264
- }
1265
- function je({ indent: s, options: { commentString: e } }, t, n, i) {
1266
- if (n && i && (n = n.replace(/^\n+/, "")), n) {
1267
- const r = U(e(n), s);
1268
- t.push(r.trimStart());
1269
- }
1270
- }
1271
- function X(s, e) {
1272
- const t = E(e) ? e.value : e;
1273
- for (const n of s)
1274
- if (T(n) && (n.key === e || n.key === t || E(n.key) && n.key.value === t))
1275
- return n;
1276
- }
1277
- class K extends Wt {
1278
- static get tagName() {
1279
- return "tag:yaml.org,2002:map";
1280
- }
1281
- constructor(e) {
1282
- super(Y, e), this.items = [];
1283
- }
1284
- /**
1285
- * A generic collection parsing method that can be extended
1286
- * to other node classes that inherit from YAMLMap
1287
- */
1288
- static from(e, t, n) {
1289
- const { keepUndefined: i, replacer: r } = n, o = new this(e), l = (a, c) => {
1290
- if (typeof r == "function")
1291
- c = r.call(t, a, c);
1292
- else if (Array.isArray(r) && !r.includes(a))
1293
- return;
1294
- (c !== void 0 || i) && o.items.push(mt(a, c, n));
1295
- };
1296
- if (t instanceof Map)
1297
- for (const [a, c] of t)
1298
- l(a, c);
1299
- else if (t && typeof t == "object")
1300
- for (const a of Object.keys(t))
1301
- l(a, t[a]);
1302
- return typeof e.sortMapEntries == "function" && o.items.sort(e.sortMapEntries), o;
1303
- }
1304
- /**
1305
- * Adds a value to the collection.
1306
- *
1307
- * @param overwrite - If not set `true`, using a key that is already in the
1308
- * collection will throw. Otherwise, overwrites the previous value.
1309
- */
1310
- add(e, t) {
1311
- var o;
1312
- let n;
1313
- T(e) ? n = e : !e || typeof e != "object" || !("key" in e) ? n = new v(e, e == null ? void 0 : e.value) : n = new v(e.key, e.value);
1314
- const i = X(this.items, n.key), r = (o = this.schema) == null ? void 0 : o.sortMapEntries;
1315
- if (i) {
1316
- if (!t)
1317
- throw new Error(`Key ${n.key} already set`);
1318
- E(i.value) && Qt(n.value) ? i.value.value = n.value : i.value = n.value;
1319
- } else if (r) {
1320
- const l = this.items.findIndex((a) => r(n, a) < 0);
1321
- l === -1 ? this.items.push(n) : this.items.splice(l, 0, n);
1322
- } else
1323
- this.items.push(n);
1324
- }
1325
- delete(e) {
1326
- const t = X(this.items, e);
1327
- return t ? this.items.splice(this.items.indexOf(t), 1).length > 0 : !1;
1328
- }
1329
- get(e, t) {
1330
- const n = X(this.items, e), i = n == null ? void 0 : n.value;
1331
- return (!t && E(i) ? i.value : i) ?? void 0;
1332
- }
1333
- has(e) {
1334
- return !!X(this.items, e);
1335
- }
1336
- set(e, t) {
1337
- this.add(new v(e, t), !0);
1338
- }
1339
- /**
1340
- * @param ctx - Conversion context, originally set in Document#toJS()
1341
- * @param {Class} Type - If set, forces the returned collection type
1342
- * @returns Instance of Type, Map, or Object
1343
- */
1344
- toJSON(e, t, n) {
1345
- const i = n ? new n() : t != null && t.mapAsMap ? /* @__PURE__ */ new Map() : {};
1346
- t != null && t.onCreate && t.onCreate(i);
1347
- for (const r of this.items)
1348
- xt(t, i, r);
1349
- return i;
1350
- }
1351
- toString(e, t, n) {
1352
- if (!e)
1353
- return JSON.stringify(this);
1354
- for (const i of this.items)
1355
- if (!T(i))
1356
- throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);
1357
- return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), es(this, e, {
1358
- blockItemPrefix: "",
1359
- flowChars: { start: "{", end: "}" },
1360
- itemIndent: e.indent || "",
1361
- onChompKeep: n,
1362
- onComment: t
1363
- });
1364
- }
1365
- }
1366
- const me = {
1367
- collection: "map",
1368
- default: !0,
1369
- nodeClass: K,
1370
- tag: "tag:yaml.org,2002:map",
1371
- resolve(s, e) {
1372
- return de(s) || e("Expected a mapping for this tag"), s;
1373
- },
1374
- createNode: (s, e, t) => K.from(s, e, t)
1375
- };
1376
- class Q extends Wt {
1377
- static get tagName() {
1378
- return "tag:yaml.org,2002:seq";
1379
- }
1380
- constructor(e) {
1381
- super(he, e), this.items = [];
1382
- }
1383
- add(e) {
1384
- this.items.push(e);
1385
- }
1386
- /**
1387
- * Removes a value from the collection.
1388
- *
1389
- * `key` must contain a representation of an integer for this to succeed.
1390
- * It may be wrapped in a `Scalar`.
1391
- *
1392
- * @returns `true` if the item was found and removed.
1393
- */
1394
- delete(e) {
1395
- const t = Le(e);
1396
- return typeof t != "number" ? !1 : this.items.splice(t, 1).length > 0;
1397
- }
1398
- get(e, t) {
1399
- const n = Le(e);
1400
- if (typeof n != "number")
1401
- return;
1402
- const i = this.items[n];
1403
- return !t && E(i) ? i.value : i;
1404
- }
1405
- /**
1406
- * Checks if the collection includes a value with the key `key`.
1407
- *
1408
- * `key` must contain a representation of an integer for this to succeed.
1409
- * It may be wrapped in a `Scalar`.
1410
- */
1411
- has(e) {
1412
- const t = Le(e);
1413
- return typeof t == "number" && t < this.items.length;
1414
- }
1415
- /**
1416
- * Sets a value in this collection. For `!!set`, `value` needs to be a
1417
- * boolean to add/remove the item from the set.
1418
- *
1419
- * If `key` does not contain a representation of an integer, this will throw.
1420
- * It may be wrapped in a `Scalar`.
1421
- */
1422
- set(e, t) {
1423
- const n = Le(e);
1424
- if (typeof n != "number")
1425
- throw new Error(`Expected a valid index, not ${e}.`);
1426
- const i = this.items[n];
1427
- E(i) && Qt(t) ? i.value = t : this.items[n] = t;
1428
- }
1429
- toJSON(e, t) {
1430
- const n = [];
1431
- t != null && t.onCreate && t.onCreate(n);
1432
- let i = 0;
1433
- for (const r of this.items)
1434
- n.push(P(r, String(i++), t));
1435
- return n;
1436
- }
1437
- toString(e, t, n) {
1438
- return e ? es(this, e, {
1439
- blockItemPrefix: "- ",
1440
- flowChars: { start: "[", end: "]" },
1441
- itemIndent: (e.indent || "") + " ",
1442
- onChompKeep: n,
1443
- onComment: t
1444
- }) : JSON.stringify(this);
1445
- }
1446
- static from(e, t, n) {
1447
- const { replacer: i } = n, r = new this(e);
1448
- if (t && Symbol.iterator in Object(t)) {
1449
- let o = 0;
1450
- for (let l of t) {
1451
- if (typeof i == "function") {
1452
- const a = t instanceof Set ? l : String(o++);
1453
- l = i.call(t, a, l);
1454
- }
1455
- r.items.push(ke(l, void 0, n));
1456
- }
1457
- }
1458
- return r;
1459
- }
1460
- }
1461
- function Le(s) {
1462
- let e = E(s) ? s.value : s;
1463
- return e && typeof e == "string" && (e = Number(e)), typeof e == "number" && Number.isInteger(e) && e >= 0 ? e : null;
1464
- }
1465
- const ye = {
1466
- collection: "seq",
1467
- default: !0,
1468
- nodeClass: Q,
1469
- tag: "tag:yaml.org,2002:seq",
1470
- resolve(s, e) {
1471
- return pe(s) || e("Expected a sequence for this tag"), s;
1472
- },
1473
- createNode: (s, e, t) => Q.from(s, e, t)
1474
- }, Ye = {
1475
- identify: (s) => typeof s == "string",
1476
- default: !0,
1477
- tag: "tag:yaml.org,2002:str",
1478
- resolve: (s) => s,
1479
- stringify(s, e, t, n) {
1480
- return e = Object.assign({ actualString: !0 }, e), Ae(s, e, t, n);
1481
- }
1482
- }, Ge = {
1483
- identify: (s) => s == null,
1484
- createNode: () => new A(null),
1485
- default: !0,
1486
- tag: "tag:yaml.org,2002:null",
1487
- test: /^(?:~|[Nn]ull|NULL)?$/,
1488
- resolve: () => new A(null),
1489
- stringify: ({ source: s }, e) => typeof s == "string" && Ge.test.test(s) ? s : e.options.nullStr
1490
- }, yt = {
1491
- identify: (s) => typeof s == "boolean",
1492
- default: !0,
1493
- tag: "tag:yaml.org,2002:bool",
1494
- test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
1495
- resolve: (s) => new A(s[0] === "t" || s[0] === "T"),
1496
- stringify({ source: s, value: e }, t) {
1497
- if (s && yt.test.test(s)) {
1498
- const n = s[0] === "t" || s[0] === "T";
1499
- if (e === n)
1500
- return s;
1501
- }
1502
- return e ? t.options.trueStr : t.options.falseStr;
1503
- }
1504
- };
1505
- function q({ format: s, minFractionDigits: e, tag: t, value: n }) {
1506
- if (typeof n == "bigint")
1507
- return String(n);
1508
- const i = typeof n == "number" ? n : Number(n);
1509
- if (!isFinite(i))
1510
- return isNaN(i) ? ".nan" : i < 0 ? "-.inf" : ".inf";
1511
- let r = JSON.stringify(n);
1512
- if (!s && e && (!t || t === "tag:yaml.org,2002:float") && /^\d/.test(r)) {
1513
- let o = r.indexOf(".");
1514
- o < 0 && (o = r.length, r += ".");
1515
- let l = e - (r.length - o - 1);
1516
- for (; l-- > 0; )
1517
- r += "0";
1518
- }
1519
- return r;
1520
- }
1521
- const ts = {
1522
- identify: (s) => typeof s == "number",
1523
- default: !0,
1524
- tag: "tag:yaml.org,2002:float",
1525
- test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1526
- resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
1527
- stringify: q
1528
- }, ss = {
1529
- identify: (s) => typeof s == "number",
1530
- default: !0,
1531
- tag: "tag:yaml.org,2002:float",
1532
- format: "EXP",
1533
- test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
1534
- resolve: (s) => parseFloat(s),
1535
- stringify(s) {
1536
- const e = Number(s.value);
1537
- return isFinite(e) ? e.toExponential() : q(s);
1538
- }
1539
- }, ns = {
1540
- identify: (s) => typeof s == "number",
1541
- default: !0,
1542
- tag: "tag:yaml.org,2002:float",
1543
- test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
1544
- resolve(s) {
1545
- const e = new A(parseFloat(s)), t = s.indexOf(".");
1546
- return t !== -1 && s[s.length - 1] === "0" && (e.minFractionDigits = s.length - t - 1), e;
1547
- },
1548
- stringify: q
1549
- }, Qe = (s) => typeof s == "bigint" || Number.isInteger(s), gt = (s, e, t, { intAsBigInt: n }) => n ? BigInt(s) : parseInt(s.substring(e), t);
1550
- function is(s, e, t) {
1551
- const { value: n } = s;
1552
- return Qe(n) && n >= 0 ? t + n.toString(e) : q(s);
1553
- }
1554
- const rs = {
1555
- identify: (s) => Qe(s) && s >= 0,
1556
- default: !0,
1557
- tag: "tag:yaml.org,2002:int",
1558
- format: "OCT",
1559
- test: /^0o[0-7]+$/,
1560
- resolve: (s, e, t) => gt(s, 2, 8, t),
1561
- stringify: (s) => is(s, 8, "0o")
1562
- }, os = {
1563
- identify: Qe,
1564
- default: !0,
1565
- tag: "tag:yaml.org,2002:int",
1566
- test: /^[-+]?[0-9]+$/,
1567
- resolve: (s, e, t) => gt(s, 0, 10, t),
1568
- stringify: q
1569
- }, ls = {
1570
- identify: (s) => Qe(s) && s >= 0,
1571
- default: !0,
1572
- tag: "tag:yaml.org,2002:int",
1573
- format: "HEX",
1574
- test: /^0x[0-9a-fA-F]+$/,
1575
- resolve: (s, e, t) => gt(s, 2, 16, t),
1576
- stringify: (s) => is(s, 16, "0x")
1577
- }, Ws = [
1578
- me,
1579
- ye,
1580
- Ye,
1581
- Ge,
1582
- yt,
1583
- rs,
1584
- os,
1585
- ls,
1586
- ts,
1587
- ss,
1588
- ns
1589
- ];
1590
- function _t(s) {
1591
- return typeof s == "bigint" || Number.isInteger(s);
1592
- }
1593
- const $e = ({ value: s }) => JSON.stringify(s), Hs = [
1594
- {
1595
- identify: (s) => typeof s == "string",
1596
- default: !0,
1597
- tag: "tag:yaml.org,2002:str",
1598
- resolve: (s) => s,
1599
- stringify: $e
1600
- },
1601
- {
1602
- identify: (s) => s == null,
1603
- createNode: () => new A(null),
1604
- default: !0,
1605
- tag: "tag:yaml.org,2002:null",
1606
- test: /^null$/,
1607
- resolve: () => null,
1608
- stringify: $e
1609
- },
1610
- {
1611
- identify: (s) => typeof s == "boolean",
1612
- default: !0,
1613
- tag: "tag:yaml.org,2002:bool",
1614
- test: /^true$|^false$/,
1615
- resolve: (s) => s === "true",
1616
- stringify: $e
1617
- },
1618
- {
1619
- identify: _t,
1620
- default: !0,
1621
- tag: "tag:yaml.org,2002:int",
1622
- test: /^-?(?:0|[1-9][0-9]*)$/,
1623
- resolve: (s, e, { intAsBigInt: t }) => t ? BigInt(s) : parseInt(s, 10),
1624
- stringify: ({ value: s }) => _t(s) ? s.toString() : JSON.stringify(s)
1625
- },
1626
- {
1627
- identify: (s) => typeof s == "number",
1628
- default: !0,
1629
- tag: "tag:yaml.org,2002:float",
1630
- test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
1631
- resolve: (s) => parseFloat(s),
1632
- stringify: $e
1633
- }
1634
- ], Xs = {
1635
- default: !0,
1636
- tag: "",
1637
- test: /^/,
1638
- resolve(s, e) {
1639
- return e(`Unresolved plain scalar ${JSON.stringify(s)}`), s;
1640
- }
1641
- }, zs = [me, ye].concat(Hs, Xs), bt = {
1642
- identify: (s) => s instanceof Uint8Array,
1643
- // Buffer inherits from Uint8Array
1644
- default: !1,
1645
- tag: "tag:yaml.org,2002:binary",
1646
- /**
1647
- * Returns a Buffer in node and an Uint8Array in browsers
1648
- *
1649
- * To use the resulting buffer as an image, you'll want to do something like:
1650
- *
1651
- * const blob = new Blob([buffer], { type: 'image/jpeg' })
1652
- * document.querySelector('#photo').src = URL.createObjectURL(blob)
1653
- */
1654
- resolve(s, e) {
1655
- if (typeof atob == "function") {
1656
- const t = atob(s.replace(/[\n\r]/g, "")), n = new Uint8Array(t.length);
1657
- for (let i = 0; i < t.length; ++i)
1658
- n[i] = t.charCodeAt(i);
1659
- return n;
1660
- } else
1661
- return e("This environment does not support reading binary tags; either Buffer or atob is required"), s;
1662
- },
1663
- stringify({ comment: s, type: e, value: t }, n, i, r) {
1664
- const o = t;
1665
- let l;
1666
- if (typeof btoa == "function") {
1667
- let a = "";
1668
- for (let c = 0; c < o.length; ++c)
1669
- a += String.fromCharCode(o[c]);
1670
- l = btoa(a);
1671
- } else
1672
- throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
1673
- if (e || (e = A.BLOCK_LITERAL), e !== A.QUOTE_DOUBLE) {
1674
- const a = Math.max(n.options.lineWidth - n.indent.length, n.options.minContentWidth), c = Math.ceil(l.length / a), p = new Array(c);
1675
- for (let f = 0, d = 0; f < c; ++f, d += a)
1676
- p[f] = l.substr(d, a);
1677
- l = p.join(e === A.BLOCK_LITERAL ? `
1678
- ` : " ");
1679
- }
1680
- return Ae({ comment: s, type: e, value: l }, n, i, r);
1681
- }
1682
- };
1683
- function as(s, e) {
1684
- if (pe(s))
1685
- for (let t = 0; t < s.items.length; ++t) {
1686
- let n = s.items[t];
1687
- if (!T(n)) {
1688
- if (de(n)) {
1689
- n.items.length > 1 && e("Each pair must have its own sequence indicator");
1690
- const i = n.items[0] || new v(new A(null));
1691
- if (n.commentBefore && (i.key.commentBefore = i.key.commentBefore ? `${n.commentBefore}
1692
- ${i.key.commentBefore}` : n.commentBefore), n.comment) {
1693
- const r = i.value ?? i.key;
1694
- r.comment = r.comment ? `${n.comment}
1695
- ${r.comment}` : n.comment;
1696
- }
1697
- n = i;
1698
- }
1699
- s.items[t] = T(n) ? n : new v(n);
1700
- }
1701
- }
1702
- else
1703
- e("Expected a sequence for this tag");
1704
- return s;
1705
- }
1706
- function cs(s, e, t) {
1707
- const { replacer: n } = t, i = new Q(s);
1708
- i.tag = "tag:yaml.org,2002:pairs";
1709
- let r = 0;
1710
- if (e && Symbol.iterator in Object(e))
1711
- for (let o of e) {
1712
- typeof n == "function" && (o = n.call(e, String(r++), o));
1713
- let l, a;
1714
- if (Array.isArray(o))
1715
- if (o.length === 2)
1716
- l = o[0], a = o[1];
1717
- else
1718
- throw new TypeError(`Expected [key, value] tuple: ${o}`);
1719
- else if (o && o instanceof Object) {
1720
- const c = Object.keys(o);
1721
- if (c.length === 1)
1722
- l = c[0], a = o[l];
1723
- else
1724
- throw new TypeError(`Expected tuple with one key, not ${c.length} keys`);
1725
- } else
1726
- l = o;
1727
- i.items.push(mt(l, a, t));
1728
- }
1729
- return i;
1730
- }
1731
- const wt = {
1732
- collection: "seq",
1733
- default: !1,
1734
- tag: "tag:yaml.org,2002:pairs",
1735
- resolve: as,
1736
- createNode: cs
1737
- };
1738
- class ae extends Q {
1739
- constructor() {
1740
- super(), this.add = K.prototype.add.bind(this), this.delete = K.prototype.delete.bind(this), this.get = K.prototype.get.bind(this), this.has = K.prototype.has.bind(this), this.set = K.prototype.set.bind(this), this.tag = ae.tag;
1741
- }
1742
- /**
1743
- * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
1744
- * but TypeScript won't allow widening the signature of a child method.
1745
- */
1746
- toJSON(e, t) {
1747
- if (!t)
1748
- return super.toJSON(e);
1749
- const n = /* @__PURE__ */ new Map();
1750
- t != null && t.onCreate && t.onCreate(n);
1751
- for (const i of this.items) {
1752
- let r, o;
1753
- if (T(i) ? (r = P(i.key, "", t), o = P(i.value, r, t)) : r = P(i, "", t), n.has(r))
1754
- throw new Error("Ordered maps must not include duplicate keys");
1755
- n.set(r, o);
1756
- }
1757
- return n;
1758
- }
1759
- static from(e, t, n) {
1760
- const i = cs(e, t, n), r = new this();
1761
- return r.items = i.items, r;
1762
- }
1763
- }
1764
- ae.tag = "tag:yaml.org,2002:omap";
1765
- const St = {
1766
- collection: "seq",
1767
- identify: (s) => s instanceof Map,
1768
- nodeClass: ae,
1769
- default: !1,
1770
- tag: "tag:yaml.org,2002:omap",
1771
- resolve(s, e) {
1772
- const t = as(s, e), n = [];
1773
- for (const { key: i } of t.items)
1774
- E(i) && (n.includes(i.value) ? e(`Ordered maps must not include duplicate keys: ${i.value}`) : n.push(i.value));
1775
- return Object.assign(new ae(), t);
1776
- },
1777
- createNode: (s, e, t) => ae.from(s, e, t)
1778
- };
1779
- function fs({ value: s, source: e }, t) {
1780
- return e && (s ? us : hs).test.test(e) ? e : s ? t.options.trueStr : t.options.falseStr;
1781
- }
1782
- const us = {
1783
- identify: (s) => s === !0,
1784
- default: !0,
1785
- tag: "tag:yaml.org,2002:bool",
1786
- test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
1787
- resolve: () => new A(!0),
1788
- stringify: fs
1789
- }, hs = {
1790
- identify: (s) => s === !1,
1791
- default: !0,
1792
- tag: "tag:yaml.org,2002:bool",
1793
- test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
1794
- resolve: () => new A(!1),
1795
- stringify: fs
1796
- }, Zs = {
1797
- identify: (s) => typeof s == "number",
1798
- default: !0,
1799
- tag: "tag:yaml.org,2002:float",
1800
- test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1801
- resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
1802
- stringify: q
1803
- }, xs = {
1804
- identify: (s) => typeof s == "number",
1805
- default: !0,
1806
- tag: "tag:yaml.org,2002:float",
1807
- format: "EXP",
1808
- test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,
1809
- resolve: (s) => parseFloat(s.replace(/_/g, "")),
1810
- stringify(s) {
1811
- const e = Number(s.value);
1812
- return isFinite(e) ? e.toExponential() : q(s);
1813
- }
1814
- }, en = {
1815
- identify: (s) => typeof s == "number",
1816
- default: !0,
1817
- tag: "tag:yaml.org,2002:float",
1818
- test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
1819
- resolve(s) {
1820
- const e = new A(parseFloat(s.replace(/_/g, ""))), t = s.indexOf(".");
1821
- if (t !== -1) {
1822
- const n = s.substring(t + 1).replace(/_/g, "");
1823
- n[n.length - 1] === "0" && (e.minFractionDigits = n.length);
1824
- }
1825
- return e;
1826
- },
1827
- stringify: q
1828
- }, Ee = (s) => typeof s == "bigint" || Number.isInteger(s);
1829
- function We(s, e, t, { intAsBigInt: n }) {
1830
- const i = s[0];
1831
- if ((i === "-" || i === "+") && (e += 1), s = s.substring(e).replace(/_/g, ""), n) {
1832
- switch (t) {
1833
- case 2:
1834
- s = `0b${s}`;
1835
- break;
1836
- case 8:
1837
- s = `0o${s}`;
1838
- break;
1839
- case 16:
1840
- s = `0x${s}`;
1841
- break;
1842
- }
1843
- const o = BigInt(s);
1844
- return i === "-" ? BigInt(-1) * o : o;
1845
- }
1846
- const r = parseInt(s, t);
1847
- return i === "-" ? -1 * r : r;
1848
- }
1849
- function kt(s, e, t) {
1850
- const { value: n } = s;
1851
- if (Ee(n)) {
1852
- const i = n.toString(e);
1853
- return n < 0 ? "-" + t + i.substr(1) : t + i;
1854
- }
1855
- return q(s);
1856
- }
1857
- const tn = {
1858
- identify: Ee,
1859
- default: !0,
1860
- tag: "tag:yaml.org,2002:int",
1861
- format: "BIN",
1862
- test: /^[-+]?0b[0-1_]+$/,
1863
- resolve: (s, e, t) => We(s, 2, 2, t),
1864
- stringify: (s) => kt(s, 2, "0b")
1865
- }, sn = {
1866
- identify: Ee,
1867
- default: !0,
1868
- tag: "tag:yaml.org,2002:int",
1869
- format: "OCT",
1870
- test: /^[-+]?0[0-7_]+$/,
1871
- resolve: (s, e, t) => We(s, 1, 8, t),
1872
- stringify: (s) => kt(s, 8, "0")
1873
- }, nn = {
1874
- identify: Ee,
1875
- default: !0,
1876
- tag: "tag:yaml.org,2002:int",
1877
- test: /^[-+]?[0-9][0-9_]*$/,
1878
- resolve: (s, e, t) => We(s, 0, 10, t),
1879
- stringify: q
1880
- }, rn = {
1881
- identify: Ee,
1882
- default: !0,
1883
- tag: "tag:yaml.org,2002:int",
1884
- format: "HEX",
1885
- test: /^[-+]?0x[0-9a-fA-F_]+$/,
1886
- resolve: (s, e, t) => We(s, 2, 16, t),
1887
- stringify: (s) => kt(s, 16, "0x")
1888
- };
1889
- class ce extends K {
1890
- constructor(e) {
1891
- super(e), this.tag = ce.tag;
1892
- }
1893
- add(e) {
1894
- let t;
1895
- T(e) ? t = e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? t = new v(e.key, null) : t = new v(e, null), X(this.items, t.key) || this.items.push(t);
1896
- }
1897
- /**
1898
- * If `keepPair` is `true`, returns the Pair matching `key`.
1899
- * Otherwise, returns the value of that Pair's key.
1900
- */
1901
- get(e, t) {
1902
- const n = X(this.items, e);
1903
- return !t && T(n) ? E(n.key) ? n.key.value : n.key : n;
1904
- }
1905
- set(e, t) {
1906
- if (typeof t != "boolean")
1907
- throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);
1908
- const n = X(this.items, e);
1909
- n && !t ? this.items.splice(this.items.indexOf(n), 1) : !n && t && this.items.push(new v(e));
1910
- }
1911
- toJSON(e, t) {
1912
- return super.toJSON(e, t, Set);
1913
- }
1914
- toString(e, t, n) {
1915
- if (!e)
1916
- return JSON.stringify(this);
1917
- if (this.hasAllNullValues(!0))
1918
- return super.toString(Object.assign({}, e, { allNullValues: !0 }), t, n);
1919
- throw new Error("Set items must all have null values");
1920
- }
1921
- static from(e, t, n) {
1922
- const { replacer: i } = n, r = new this(e);
1923
- if (t && Symbol.iterator in Object(t))
1924
- for (let o of t)
1925
- typeof i == "function" && (o = i.call(t, o, o)), r.items.push(mt(o, null, n));
1926
- return r;
1927
- }
1928
- }
1929
- ce.tag = "tag:yaml.org,2002:set";
1930
- const Nt = {
1931
- collection: "map",
1932
- identify: (s) => s instanceof Set,
1933
- nodeClass: ce,
1934
- default: !1,
1935
- tag: "tag:yaml.org,2002:set",
1936
- createNode: (s, e, t) => ce.from(s, e, t),
1937
- resolve(s, e) {
1938
- if (de(s)) {
1939
- if (s.hasAllNullValues(!0))
1940
- return Object.assign(new ce(), s);
1941
- e("Set items must all have null values");
1942
- } else
1943
- e("Expected a mapping for this tag");
1944
- return s;
1945
- }
1946
- };
1947
- function Ot(s, e) {
1948
- const t = s[0], n = t === "-" || t === "+" ? s.substring(1) : s, i = (o) => e ? BigInt(o) : Number(o), r = n.replace(/_/g, "").split(":").reduce((o, l) => o * i(60) + i(l), i(0));
1949
- return t === "-" ? i(-1) * r : r;
1950
- }
1951
- function ds(s) {
1952
- let { value: e } = s, t = (o) => o;
1953
- if (typeof e == "bigint")
1954
- t = (o) => BigInt(o);
1955
- else if (isNaN(e) || !isFinite(e))
1956
- return q(s);
1957
- let n = "";
1958
- e < 0 && (n = "-", e *= t(-1));
1959
- const i = t(60), r = [e % i];
1960
- return e < 60 ? r.unshift(0) : (e = (e - r[0]) / i, r.unshift(e % i), e >= 60 && (e = (e - r[0]) / i, r.unshift(e))), n + r.map((o) => String(o).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
1961
- }
1962
- const ps = {
1963
- identify: (s) => typeof s == "bigint" || Number.isInteger(s),
1964
- default: !0,
1965
- tag: "tag:yaml.org,2002:int",
1966
- format: "TIME",
1967
- test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
1968
- resolve: (s, e, { intAsBigInt: t }) => Ot(s, t),
1969
- stringify: ds
1970
- }, ms = {
1971
- identify: (s) => typeof s == "number",
1972
- default: !0,
1973
- tag: "tag:yaml.org,2002:float",
1974
- format: "TIME",
1975
- test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
1976
- resolve: (s) => Ot(s, !1),
1977
- stringify: ds
1978
- }, He = {
1979
- identify: (s) => s instanceof Date,
1980
- default: !0,
1981
- tag: "tag:yaml.org,2002:timestamp",
1982
- // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part
1983
- // may be omitted altogether, resulting in a date format. In such a case, the time part is
1984
- // assumed to be 00:00:00Z (start of day, UTC).
1985
- test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
1986
- resolve(s) {
1987
- const e = s.match(He.test);
1988
- if (!e)
1989
- throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
1990
- const [, t, n, i, r, o, l] = e.map(Number), a = e[7] ? Number((e[7] + "00").substr(1, 3)) : 0;
1991
- let c = Date.UTC(t, n - 1, i, r || 0, o || 0, l || 0, a);
1992
- const p = e[8];
1993
- if (p && p !== "Z") {
1994
- let f = Ot(p, !1);
1995
- Math.abs(f) < 30 && (f *= 60), c -= 6e4 * f;
1996
- }
1997
- return new Date(c);
1998
- },
1999
- stringify: ({ value: s }) => s.toISOString().replace(/(T00:00:00)?\.000Z$/, "")
2000
- }, Ct = [
2001
- me,
2002
- ye,
2003
- Ye,
2004
- Ge,
2005
- us,
2006
- hs,
2007
- tn,
2008
- sn,
2009
- nn,
2010
- rn,
2011
- Zs,
2012
- xs,
2013
- en,
2014
- bt,
2015
- V,
2016
- St,
2017
- wt,
2018
- Nt,
2019
- ps,
2020
- ms,
2021
- He
2022
- ], vt = /* @__PURE__ */ new Map([
2023
- ["core", Ws],
2024
- ["failsafe", [me, ye, Ye]],
2025
- ["json", zs],
2026
- ["yaml11", Ct],
2027
- ["yaml-1.1", Ct]
2028
- ]), Bt = {
2029
- binary: bt,
2030
- bool: yt,
2031
- float: ns,
2032
- floatExp: ss,
2033
- floatNaN: ts,
2034
- floatTime: ms,
2035
- int: os,
2036
- intHex: ls,
2037
- intOct: rs,
2038
- intTime: ps,
2039
- map: me,
2040
- merge: V,
2041
- null: Ge,
2042
- omap: St,
2043
- pairs: wt,
2044
- seq: ye,
2045
- set: Nt,
2046
- timestamp: He
2047
- }, on = {
2048
- "tag:yaml.org,2002:binary": bt,
2049
- "tag:yaml.org,2002:merge": V,
2050
- "tag:yaml.org,2002:omap": St,
2051
- "tag:yaml.org,2002:pairs": wt,
2052
- "tag:yaml.org,2002:set": Nt,
2053
- "tag:yaml.org,2002:timestamp": He
2054
- };
2055
- function tt(s, e, t) {
2056
- const n = vt.get(e);
2057
- if (n && !s)
2058
- return t && !n.includes(V) ? n.concat(V) : n.slice();
2059
- let i = n;
2060
- if (!i)
2061
- if (Array.isArray(s))
2062
- i = [];
2063
- else {
2064
- const r = Array.from(vt.keys()).filter((o) => o !== "yaml11").map((o) => JSON.stringify(o)).join(", ");
2065
- throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`);
2066
- }
2067
- if (Array.isArray(s))
2068
- for (const r of s)
2069
- i = i.concat(r);
2070
- else typeof s == "function" && (i = s(i.slice()));
2071
- return t && (i = i.concat(V)), i.reduce((r, o) => {
2072
- const l = typeof o == "string" ? Bt[o] : o;
2073
- if (!l) {
2074
- const a = JSON.stringify(o), c = Object.keys(Bt).map((p) => JSON.stringify(p)).join(", ");
2075
- throw new Error(`Unknown custom tag ${a}; use one of ${c}`);
2076
- }
2077
- return r.includes(l) || r.push(l), r;
2078
- }, []);
2079
- }
2080
- const ln = (s, e) => s.key < e.key ? -1 : s.key > e.key ? 1 : 0;
2081
- class Xe {
2082
- constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: i, schema: r, sortMapEntries: o, toStringDefaults: l }) {
2083
- this.compat = Array.isArray(e) ? tt(e, "compat") : e ? tt(null, e) : null, this.name = typeof r == "string" && r || "core", this.knownTags = i ? on : {}, this.tags = tt(t, this.name, n), this.toStringOptions = l ?? null, Object.defineProperty(this, Y, { value: me }), Object.defineProperty(this, R, { value: Ye }), Object.defineProperty(this, he, { value: ye }), this.sortMapEntries = typeof o == "function" ? o : o === !0 ? ln : null;
2084
- }
2085
- clone() {
2086
- const e = Object.create(Xe.prototype, Object.getOwnPropertyDescriptors(this));
2087
- return e.tags = this.tags.slice(), e;
2088
- }
2089
- }
2090
- function an(s, e) {
2091
- var a;
2092
- const t = [];
2093
- let n = e.directives === !0;
2094
- if (e.directives !== !1 && s.directives) {
2095
- const c = s.directives.toString(s);
2096
- c ? (t.push(c), n = !0) : s.directives.docStart && (n = !0);
2097
- }
2098
- n && t.push("---");
2099
- const i = Xt(s, e), { commentString: r } = i.options;
2100
- if (s.commentBefore) {
2101
- t.length !== 1 && t.unshift("");
2102
- const c = r(s.commentBefore);
2103
- t.unshift(U(c, ""));
2104
- }
2105
- let o = !1, l = null;
2106
- if (s.contents) {
2107
- if ($(s.contents)) {
2108
- if (s.contents.spaceBefore && n && t.push(""), s.contents.commentBefore) {
2109
- const f = r(s.contents.commentBefore);
2110
- t.push(U(f, ""));
2111
- }
2112
- i.forceBlockIndent = !!s.comment, l = s.contents.comment;
2113
- }
2114
- const c = l ? void 0 : () => o = !0;
2115
- let p = fe(s.contents, i, () => l = null, c);
2116
- l && (p += H(p, "", r(l))), (p[0] === "|" || p[0] === ">") && t[t.length - 1] === "---" ? t[t.length - 1] = `--- ${p}` : t.push(p);
2117
- } else
2118
- t.push(fe(s.contents, i));
2119
- if ((a = s.directives) != null && a.docEnd)
2120
- if (s.comment) {
2121
- const c = r(s.comment);
2122
- c.includes(`
2123
- `) ? (t.push("..."), t.push(U(c, ""))) : t.push(`... ${c}`);
2124
- } else
2125
- t.push("...");
2126
- else {
2127
- let c = s.comment;
2128
- c && o && (c = c.replace(/^\n+/, "")), c && ((!o || l) && t[t.length - 1] !== "" && t.push(""), t.push(U(r(c), "")));
2129
- }
2130
- return t.join(`
2131
- `) + `
2132
- `;
2133
- }
2134
- class ge {
2135
- constructor(e, t, n) {
2136
- this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, j, { value: lt });
2137
- let i = null;
2138
- typeof t == "function" || Array.isArray(t) ? i = t : n === void 0 && t && (n = t, t = void 0);
2139
- const r = Object.assign({
2140
- intAsBigInt: !1,
2141
- keepSourceTokens: !1,
2142
- logLevel: "warn",
2143
- prettyErrors: !0,
2144
- strict: !0,
2145
- stringKeys: !1,
2146
- uniqueKeys: !0,
2147
- version: "1.2"
2148
- }, n);
2149
- this.options = r;
2150
- let { version: o } = r;
2151
- n != null && n._directives ? (this.directives = n._directives.atDocument(), this.directives.yaml.explicit && (o = this.directives.yaml.version)) : this.directives = new B({ version: o }), this.setSchema(o, n), this.contents = e === void 0 ? null : this.createNode(e, i, n);
2152
- }
2153
- /**
2154
- * Create a deep copy of this Document and its contents.
2155
- *
2156
- * Custom Node values that inherit from `Object` still refer to their original instances.
2157
- */
2158
- clone() {
2159
- const e = Object.create(ge.prototype, {
2160
- [j]: { value: lt }
2161
- });
2162
- return e.commentBefore = this.commentBefore, e.comment = this.comment, e.errors = this.errors.slice(), e.warnings = this.warnings.slice(), e.options = Object.assign({}, this.options), this.directives && (e.directives = this.directives.clone()), e.schema = this.schema.clone(), e.contents = $(this.contents) ? this.contents.clone(e.schema) : this.contents, this.range && (e.range = this.range.slice()), e;
2163
- }
2164
- /** Adds a value to the document. */
2165
- add(e) {
2166
- se(this.contents) && this.contents.add(e);
2167
- }
2168
- /** Adds a value to the document. */
2169
- addIn(e, t) {
2170
- se(this.contents) && this.contents.addIn(e, t);
2171
- }
2172
- /**
2173
- * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
2174
- *
2175
- * If `node` already has an anchor, `name` is ignored.
2176
- * Otherwise, the `node.anchor` value will be set to `name`,
2177
- * or if an anchor with that name is already present in the document,
2178
- * `name` will be used as a prefix for a new unique anchor.
2179
- * If `name` is undefined, the generated anchor will use 'a' as a prefix.
2180
- */
2181
- createAlias(e, t) {
2182
- if (!e.anchor) {
2183
- const n = Yt(this);
2184
- e.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2185
- !t || n.has(t) ? Gt(t || "a", n) : t;
2186
- }
2187
- return new Re(e.anchor);
2188
- }
2189
- createNode(e, t, n) {
2190
- let i;
2191
- if (typeof t == "function")
2192
- e = t.call({ "": e }, "", e), i = t;
2193
- else if (Array.isArray(t)) {
2194
- const m = (S) => typeof S == "number" || S instanceof String || S instanceof Number, b = t.filter(m).map(String);
2195
- b.length > 0 && (t = t.concat(b)), i = t;
2196
- } else n === void 0 && t && (n = t, t = void 0);
2197
- const { aliasDuplicateObjects: r, anchorPrefix: o, flow: l, keepUndefined: a, onTagObj: c, tag: p } = n ?? {}, { onAnchor: f, setAnchors: d, sourceObjects: h } = Ks(
2198
- this,
2199
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2200
- o || "a"
2201
- ), y = {
2202
- aliasDuplicateObjects: r ?? !0,
2203
- keepUndefined: a ?? !1,
2204
- onAnchor: f,
2205
- onTagObj: c,
2206
- replacer: i,
2207
- schema: this.schema,
2208
- sourceObjects: h
2209
- }, u = ke(e, p, y);
2210
- return l && L(u) && (u.flow = !0), d(), u;
2211
- }
2212
- /**
2213
- * Convert a key and a value into a `Pair` using the current schema,
2214
- * recursively wrapping all values as `Scalar` or `Collection` nodes.
2215
- */
2216
- createPair(e, t, n = {}) {
2217
- const i = this.createNode(e, null, n), r = this.createNode(t, null, n);
2218
- return new v(i, r);
2219
- }
2220
- /**
2221
- * Removes a value from the document.
2222
- * @returns `true` if the item was found and removed.
2223
- */
2224
- delete(e) {
2225
- return se(this.contents) ? this.contents.delete(e) : !1;
2226
- }
2227
- /**
2228
- * Removes a value from the document.
2229
- * @returns `true` if the item was found and removed.
2230
- */
2231
- deleteIn(e) {
2232
- return we(e) ? this.contents == null ? !1 : (this.contents = null, !0) : se(this.contents) ? this.contents.deleteIn(e) : !1;
2233
- }
2234
- /**
2235
- * Returns item at `key`, or `undefined` if not found. By default unwraps
2236
- * scalar values from their surrounding node; to disable set `keepScalar` to
2237
- * `true` (collections are always returned intact).
2238
- */
2239
- get(e, t) {
2240
- return L(this.contents) ? this.contents.get(e, t) : void 0;
2241
- }
2242
- /**
2243
- * Returns item at `path`, or `undefined` if not found. By default unwraps
2244
- * scalar values from their surrounding node; to disable set `keepScalar` to
2245
- * `true` (collections are always returned intact).
2246
- */
2247
- getIn(e, t) {
2248
- return we(e) ? !t && E(this.contents) ? this.contents.value : this.contents : L(this.contents) ? this.contents.getIn(e, t) : void 0;
2249
- }
2250
- /**
2251
- * Checks if the document includes a value with the key `key`.
2252
- */
2253
- has(e) {
2254
- return L(this.contents) ? this.contents.has(e) : !1;
2255
- }
2256
- /**
2257
- * Checks if the document includes a value at `path`.
2258
- */
2259
- hasIn(e) {
2260
- return we(e) ? this.contents !== void 0 : L(this.contents) ? this.contents.hasIn(e) : !1;
2261
- }
2262
- /**
2263
- * Sets a value in this document. For `!!set`, `value` needs to be a
2264
- * boolean to add/remove the item from the set.
2265
- */
2266
- set(e, t) {
2267
- this.contents == null ? this.contents = Pe(this.schema, [e], t) : se(this.contents) && this.contents.set(e, t);
2268
- }
2269
- /**
2270
- * Sets a value in this document. For `!!set`, `value` needs to be a
2271
- * boolean to add/remove the item from the set.
2272
- */
2273
- setIn(e, t) {
2274
- we(e) ? this.contents = t : this.contents == null ? this.contents = Pe(this.schema, Array.from(e), t) : se(this.contents) && this.contents.setIn(e, t);
2275
- }
2276
- /**
2277
- * Change the YAML version and schema used by the document.
2278
- * A `null` version disables support for directives, explicit tags, anchors, and aliases.
2279
- * It also requires the `schema` option to be given as a `Schema` instance value.
2280
- *
2281
- * Overrides all previously set schema options.
2282
- */
2283
- setSchema(e, t = {}) {
2284
- typeof e == "number" && (e = String(e));
2285
- let n;
2286
- switch (e) {
2287
- case "1.1":
2288
- this.directives ? this.directives.yaml.version = "1.1" : this.directives = new B({ version: "1.1" }), n = { resolveKnownTags: !1, schema: "yaml-1.1" };
2289
- break;
2290
- case "1.2":
2291
- case "next":
2292
- this.directives ? this.directives.yaml.version = e : this.directives = new B({ version: e }), n = { resolveKnownTags: !0, schema: "core" };
2293
- break;
2294
- case null:
2295
- this.directives && delete this.directives, n = null;
2296
- break;
2297
- default: {
2298
- const i = JSON.stringify(e);
2299
- throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`);
2300
- }
2301
- }
2302
- if (t.schema instanceof Object)
2303
- this.schema = t.schema;
2304
- else if (n)
2305
- this.schema = new Xe(Object.assign(n, t));
2306
- else
2307
- throw new Error("With a null YAML version, the { schema: Schema } option is required");
2308
- }
2309
- // json & jsonArg are only used from toJSON()
2310
- toJS({ json: e, jsonArg: t, mapAsMap: n, maxAliasCount: i, onAnchor: r, reviver: o } = {}) {
2311
- const l = {
2312
- anchors: /* @__PURE__ */ new Map(),
2313
- doc: this,
2314
- keep: !e,
2315
- mapAsMap: n === !0,
2316
- mapKeyWarned: !1,
2317
- maxAliasCount: typeof i == "number" ? i : 100
2318
- }, a = P(this.contents, t ?? "", l);
2319
- if (typeof r == "function")
2320
- for (const { count: c, res: p } of l.anchors.values())
2321
- r(p, c);
2322
- return typeof o == "function" ? oe(o, { "": a }, "", a) : a;
2323
- }
2324
- /**
2325
- * A JSON representation of the document `contents`.
2326
- *
2327
- * @param jsonArg Used by `JSON.stringify` to indicate the array index or
2328
- * property name.
2329
- */
2330
- toJSON(e, t) {
2331
- return this.toJS({ json: !0, jsonArg: e, mapAsMap: !1, onAnchor: t });
2332
- }
2333
- /** A YAML representation of the document. */
2334
- toString(e = {}) {
2335
- if (this.errors.length > 0)
2336
- throw new Error("Document with errors cannot be stringified");
2337
- if ("indent" in e && (!Number.isInteger(e.indent) || Number(e.indent) <= 0)) {
2338
- const t = JSON.stringify(e.indent);
2339
- throw new Error(`"indent" option must be a positive integer, not ${t}`);
2340
- }
2341
- return an(this, e);
2342
- }
2343
- }
2344
- function se(s) {
2345
- if (L(s))
2346
- return !0;
2347
- throw new Error("Expected a YAML collection as document contents");
2348
- }
2349
- class At extends Error {
2350
- constructor(e, t, n, i) {
2351
- super(), this.name = e, this.code = n, this.message = i, this.pos = t;
2352
- }
2353
- }
2354
- class z extends At {
2355
- constructor(e, t, n) {
2356
- super("YAMLParseError", e, t, n);
2357
- }
2358
- }
2359
- class ys extends At {
2360
- constructor(e, t, n) {
2361
- super("YAMLWarning", e, t, n);
2362
- }
2363
- }
2364
- const De = (s, e) => (t) => {
2365
- if (t.pos[0] === -1)
2366
- return;
2367
- t.linePos = t.pos.map((l) => e.linePos(l));
2368
- const { line: n, col: i } = t.linePos[0];
2369
- t.message += ` at line ${n}, column ${i}`;
2370
- let r = i - 1, o = s.substring(e.lineStarts[n - 1], e.lineStarts[n]).replace(/[\n\r]+$/, "");
2371
- if (r >= 60 && o.length > 80) {
2372
- const l = Math.min(r - 39, o.length - 79);
2373
- o = "…" + o.substring(l), r -= l - 1;
2374
- }
2375
- if (o.length > 80 && (o = o.substring(0, 79) + "…"), n > 1 && /^ *$/.test(o.substring(0, r))) {
2376
- let l = s.substring(e.lineStarts[n - 2], e.lineStarts[n - 1]);
2377
- l.length > 80 && (l = l.substring(0, 79) + `…
2378
- `), o = l + o;
2379
- }
2380
- if (/[^ ]/.test(o)) {
2381
- let l = 1;
2382
- const a = t.linePos[1];
2383
- a && a.line === n && a.col > i && (l = Math.max(1, Math.min(a.col - i, 80 - r)));
2384
- const c = " ".repeat(r) + "^".repeat(l);
2385
- t.message += `:
2386
-
2387
- ${o}
2388
- ${c}
2389
- `;
2390
- }
2391
- };
2392
- function ue(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIndent: o, startOnNewline: l }) {
2393
- let a = !1, c = l, p = l, f = "", d = "", h = !1, y = !1, u = null, m = null, b = null, S = null, N = null, w = null, k = null;
2394
- for (const g of s)
2395
- switch (y && (g.type !== "space" && g.type !== "newline" && g.type !== "comma" && r(g.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), y = !1), u && (c && g.type !== "comment" && g.type !== "newline" && r(u, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), u = null), g.type) {
2396
- case "space":
2397
- !e && (t !== "doc-start" || (n == null ? void 0 : n.type) !== "flow-collection") && g.source.includes(" ") && (u = g), p = !0;
2398
- break;
2399
- case "comment": {
2400
- p || r(g, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2401
- const _ = g.source.substring(1) || " ";
2402
- f ? f += d + _ : f = _, d = "", c = !1;
2403
- break;
2404
- }
2405
- case "newline":
2406
- c ? f ? f += g.source : (!w || t !== "seq-item-ind") && (a = !0) : d += g.source, c = !0, h = !0, (m || b) && (S = g), p = !0;
2407
- break;
2408
- case "anchor":
2409
- m && r(g, "MULTIPLE_ANCHORS", "A node can have at most one anchor"), g.source.endsWith(":") && r(g.offset + g.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", !0), m = g, k === null && (k = g.offset), c = !1, p = !1, y = !0;
2410
- break;
2411
- case "tag": {
2412
- b && r(g, "MULTIPLE_TAGS", "A node can have at most one tag"), b = g, k === null && (k = g.offset), c = !1, p = !1, y = !0;
2413
- break;
2414
- }
2415
- case t:
2416
- (m || b) && r(g, "BAD_PROP_ORDER", `Anchors and tags must be after the ${g.source} indicator`), w && r(g, "UNEXPECTED_TOKEN", `Unexpected ${g.source} in ${e ?? "collection"}`), w = g, c = t === "seq-item-ind" || t === "explicit-key-ind", p = !1;
2417
- break;
2418
- case "comma":
2419
- if (e) {
2420
- N && r(g, "UNEXPECTED_TOKEN", `Unexpected , in ${e}`), N = g, c = !1, p = !1;
2421
- break;
2422
- }
2423
- // else fallthrough
2424
- default:
2425
- r(g, "UNEXPECTED_TOKEN", `Unexpected ${g.type} token`), c = !1, p = !1;
2426
- }
2427
- const O = s[s.length - 1], I = O ? O.offset + O.source.length : i;
2428
- return y && n && n.type !== "space" && n.type !== "newline" && n.type !== "comma" && (n.type !== "scalar" || n.source !== "") && r(n.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), u && (c && u.indent <= o || (n == null ? void 0 : n.type) === "block-map" || (n == null ? void 0 : n.type) === "block-seq") && r(u, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), {
2429
- comma: N,
2430
- found: w,
2431
- spaceBefore: a,
2432
- comment: f,
2433
- hasNewline: h,
2434
- anchor: m,
2435
- tag: b,
2436
- newlineAfterProp: S,
2437
- end: I,
2438
- start: k ?? I
2439
- };
2440
- }
2441
- function Ne(s) {
2442
- if (!s)
2443
- return null;
2444
- switch (s.type) {
2445
- case "alias":
2446
- case "scalar":
2447
- case "double-quoted-scalar":
2448
- case "single-quoted-scalar":
2449
- if (s.source.includes(`
2450
- `))
2451
- return !0;
2452
- if (s.end) {
2453
- for (const e of s.end)
2454
- if (e.type === "newline")
2455
- return !0;
2456
- }
2457
- return !1;
2458
- case "flow-collection":
2459
- for (const e of s.items) {
2460
- for (const t of e.start)
2461
- if (t.type === "newline")
2462
- return !0;
2463
- if (e.sep) {
2464
- for (const t of e.sep)
2465
- if (t.type === "newline")
2466
- return !0;
2467
- }
2468
- if (Ne(e.key) || Ne(e.value))
2469
- return !0;
2470
- }
2471
- return !1;
2472
- default:
2473
- return !0;
2474
- }
2475
- }
2476
- function ut(s, e, t) {
2477
- if ((e == null ? void 0 : e.type) === "flow-collection") {
2478
- const n = e.end[0];
2479
- n.indent === s && (n.source === "]" || n.source === "}") && Ne(e) && t(n, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
2480
- }
2481
- }
2482
- function gs(s, e, t) {
2483
- const { uniqueKeys: n } = s.options;
2484
- if (n === !1)
2485
- return !1;
2486
- const i = typeof n == "function" ? n : (r, o) => r === o || E(r) && E(o) && r.value === o.value;
2487
- return e.some((r) => i(r.key, t));
2488
- }
2489
- const Mt = "All mapping items must start at the same column";
2490
- function cn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2491
- var p;
2492
- const o = (r == null ? void 0 : r.nodeClass) ?? K, l = new o(t.schema);
2493
- t.atRoot && (t.atRoot = !1);
2494
- let a = n.offset, c = null;
2495
- for (const f of n.items) {
2496
- const { start: d, key: h, sep: y, value: u } = f, m = ue(d, {
2497
- indicator: "explicit-key-ind",
2498
- next: h ?? (y == null ? void 0 : y[0]),
2499
- offset: a,
2500
- onError: i,
2501
- parentIndent: n.indent,
2502
- startOnNewline: !0
2503
- }), b = !m.found;
2504
- if (b) {
2505
- if (h && (h.type === "block-seq" ? i(a, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in h && h.indent !== n.indent && i(a, "BAD_INDENT", Mt)), !m.anchor && !m.tag && !y) {
2506
- c = m.end, m.comment && (l.comment ? l.comment += `
2507
- ` + m.comment : l.comment = m.comment);
2508
- continue;
2509
- }
2510
- (m.newlineAfterProp || Ne(h)) && i(h ?? d[d.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
2511
- } else ((p = m.found) == null ? void 0 : p.indent) !== n.indent && i(a, "BAD_INDENT", Mt);
2512
- t.atKey = !0;
2513
- const S = m.end, N = h ? s(t, h, m, i) : e(t, S, d, null, m, i);
2514
- t.schema.compat && ut(n.indent, h, i), t.atKey = !1, gs(t, l.items, N) && i(S, "DUPLICATE_KEY", "Map keys must be unique");
2515
- const w = ue(y ?? [], {
2516
- indicator: "map-value-ind",
2517
- next: u,
2518
- offset: N.range[2],
2519
- onError: i,
2520
- parentIndent: n.indent,
2521
- startOnNewline: !h || h.type === "block-scalar"
2522
- });
2523
- if (a = w.end, w.found) {
2524
- b && ((u == null ? void 0 : u.type) === "block-map" && !w.hasNewline && i(a, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), t.options.strict && m.start < w.found.offset - 1024 && i(N.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
2525
- const k = u ? s(t, u, w, i) : e(t, a, y, null, w, i);
2526
- t.schema.compat && ut(n.indent, u, i), a = k.range[2];
2527
- const O = new v(N, k);
2528
- t.options.keepSourceTokens && (O.srcToken = f), l.items.push(O);
2529
- } else {
2530
- b && i(N.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), w.comment && (N.comment ? N.comment += `
2531
- ` + w.comment : N.comment = w.comment);
2532
- const k = new v(N);
2533
- t.options.keepSourceTokens && (k.srcToken = f), l.items.push(k);
2534
- }
2535
- }
2536
- return c && c < a && i(c, "IMPOSSIBLE", "Map comment with trailing content"), l.range = [n.offset, a, c ?? a], l;
2537
- }
2538
- function fn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2539
- const o = (r == null ? void 0 : r.nodeClass) ?? Q, l = new o(t.schema);
2540
- t.atRoot && (t.atRoot = !1), t.atKey && (t.atKey = !1);
2541
- let a = n.offset, c = null;
2542
- for (const { start: p, value: f } of n.items) {
2543
- const d = ue(p, {
2544
- indicator: "seq-item-ind",
2545
- next: f,
2546
- offset: a,
2547
- onError: i,
2548
- parentIndent: n.indent,
2549
- startOnNewline: !0
2550
- });
2551
- if (!d.found)
2552
- if (d.anchor || d.tag || f)
2553
- f && f.type === "block-seq" ? i(d.end, "BAD_INDENT", "All sequence items must start at the same column") : i(a, "MISSING_CHAR", "Sequence item without - indicator");
2554
- else {
2555
- c = d.end, d.comment && (l.comment = d.comment);
2556
- continue;
2557
- }
2558
- const h = f ? s(t, f, d, i) : e(t, d.end, p, null, d, i);
2559
- t.schema.compat && ut(n.indent, f, i), a = h.range[2], l.items.push(h);
2560
- }
2561
- return l.range = [n.offset, a, c ?? a], l;
2562
- }
2563
- function Ie(s, e, t, n) {
2564
- let i = "";
2565
- if (s) {
2566
- let r = !1, o = "";
2567
- for (const l of s) {
2568
- const { source: a, type: c } = l;
2569
- switch (c) {
2570
- case "space":
2571
- r = !0;
2572
- break;
2573
- case "comment": {
2574
- t && !r && n(l, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2575
- const p = a.substring(1) || " ";
2576
- i ? i += o + p : i = p, o = "";
2577
- break;
2578
- }
2579
- case "newline":
2580
- i && (o += a), r = !0;
2581
- break;
2582
- default:
2583
- n(l, "UNEXPECTED_TOKEN", `Unexpected ${c} at node end`);
2584
- }
2585
- e += a.length;
2586
- }
2587
- }
2588
- return { comment: i, offset: e };
2589
- }
2590
- const st = "Block collections are not allowed within flow collections", nt = (s) => s && (s.type === "block-map" || s.type === "block-seq");
2591
- function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2592
- const o = n.start.source === "{", l = o ? "flow map" : "flow sequence", a = (r == null ? void 0 : r.nodeClass) ?? (o ? K : Q), c = new a(t.schema);
2593
- c.flow = !0;
2594
- const p = t.atRoot;
2595
- p && (t.atRoot = !1), t.atKey && (t.atKey = !1);
2596
- let f = n.offset + n.start.source.length;
2597
- for (let m = 0; m < n.items.length; ++m) {
2598
- const b = n.items[m], { start: S, key: N, sep: w, value: k } = b, O = ue(S, {
2599
- flow: l,
2600
- indicator: "explicit-key-ind",
2601
- next: N ?? (w == null ? void 0 : w[0]),
2602
- offset: f,
2603
- onError: i,
2604
- parentIndent: n.indent,
2605
- startOnNewline: !1
2606
- });
2607
- if (!O.found) {
2608
- if (!O.anchor && !O.tag && !w && !k) {
2609
- m === 0 && O.comma ? i(O.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${l}`) : m < n.items.length - 1 && i(O.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${l}`), O.comment && (c.comment ? c.comment += `
2610
- ` + O.comment : c.comment = O.comment), f = O.end;
2611
- continue;
2612
- }
2613
- !o && t.options.strict && Ne(N) && i(
2614
- N,
2615
- // checked by containsNewline()
2616
- "MULTILINE_IMPLICIT_KEY",
2617
- "Implicit keys of flow sequence pairs need to be on a single line"
2618
- );
2619
- }
2620
- if (m === 0)
2621
- O.comma && i(O.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${l}`);
2622
- else if (O.comma || i(O.start, "MISSING_CHAR", `Missing , between ${l} items`), O.comment) {
2623
- let I = "";
2624
- e: for (const g of S)
2625
- switch (g.type) {
2626
- case "comma":
2627
- case "space":
2628
- break;
2629
- case "comment":
2630
- I = g.source.substring(1);
2631
- break e;
2632
- default:
2633
- break e;
2634
- }
2635
- if (I) {
2636
- let g = c.items[c.items.length - 1];
2637
- T(g) && (g = g.value ?? g.key), g.comment ? g.comment += `
2638
- ` + I : g.comment = I, O.comment = O.comment.substring(I.length + 1);
2639
- }
2640
- }
2641
- if (!o && !w && !O.found) {
2642
- const I = k ? s(t, k, O, i) : e(t, O.end, w, null, O, i);
2643
- c.items.push(I), f = I.range[2], nt(k) && i(I.range, "BLOCK_IN_FLOW", st);
2644
- } else {
2645
- t.atKey = !0;
2646
- const I = O.end, g = N ? s(t, N, O, i) : e(t, I, S, null, O, i);
2647
- nt(N) && i(g.range, "BLOCK_IN_FLOW", st), t.atKey = !1;
2648
- const _ = ue(w ?? [], {
2649
- flow: l,
2650
- indicator: "map-value-ind",
2651
- next: k,
2652
- offset: g.range[2],
2653
- onError: i,
2654
- parentIndent: n.indent,
2655
- startOnNewline: !1
2656
- });
2657
- if (_.found) {
2658
- if (!o && !O.found && t.options.strict) {
2659
- if (w)
2660
- for (const C of w) {
2661
- if (C === _.found)
2662
- break;
2663
- if (C.type === "newline") {
2664
- i(C, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
2665
- break;
2666
- }
2667
- }
2668
- O.start < _.found.offset - 1024 && i(_.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
2669
- }
2670
- } else k && ("source" in k && k.source && k.source[0] === ":" ? i(k, "MISSING_CHAR", `Missing space after : in ${l}`) : i(_.start, "MISSING_CHAR", `Missing , or : between ${l} items`));
2671
- const J = k ? s(t, k, _, i) : _.found ? e(t, _.end, w, null, _, i) : null;
2672
- J ? nt(k) && i(J.range, "BLOCK_IN_FLOW", st) : _.comment && (g.comment ? g.comment += `
2673
- ` + _.comment : g.comment = _.comment);
2674
- const te = new v(g, J);
2675
- if (t.options.keepSourceTokens && (te.srcToken = b), o) {
2676
- const C = c;
2677
- gs(t, C.items, g) && i(I, "DUPLICATE_KEY", "Map keys must be unique"), C.items.push(te);
2678
- } else {
2679
- const C = new K(t.schema);
2680
- C.flow = !0, C.items.push(te);
2681
- const Lt = (J ?? g).range;
2682
- C.range = [g.range[0], Lt[1], Lt[2]], c.items.push(C);
2683
- }
2684
- f = J ? J.range[2] : _.end;
2685
- }
2686
- }
2687
- const d = o ? "}" : "]", [h, ...y] = n.end;
2688
- let u = f;
2689
- if (h && h.source === d)
2690
- u = h.offset + h.source.length;
2691
- else {
2692
- const m = l[0].toUpperCase() + l.substring(1), b = p ? `${m} must end with a ${d}` : `${m} in block collection must be sufficiently indented and end with a ${d}`;
2693
- i(f, p ? "MISSING_CHAR" : "BAD_INDENT", b), h && h.source.length !== 1 && y.unshift(h);
2694
- }
2695
- if (y.length > 0) {
2696
- const m = Ie(y, u, t.options.strict, i);
2697
- m.comment && (c.comment ? c.comment += `
2698
- ` + m.comment : c.comment = m.comment), c.range = [n.offset, u, m.offset];
2699
- } else
2700
- c.range = [n.offset, u, u];
2701
- return c;
2702
- }
2703
- function it(s, e, t, n, i, r) {
2704
- const o = t.type === "block-map" ? cn(s, e, t, n, r) : t.type === "block-seq" ? fn(s, e, t, n, r) : un(s, e, t, n, r), l = o.constructor;
2705
- return i === "!" || i === l.tagName ? (o.tag = l.tagName, o) : (i && (o.tag = i), o);
2706
- }
2707
- function hn(s, e, t, n, i) {
2708
- var d;
2709
- const r = n.tag, o = r ? e.directives.tagName(r.source, (h) => i(r, "TAG_RESOLVE_FAILED", h)) : null;
2710
- if (t.type === "block-seq") {
2711
- const { anchor: h, newlineAfterProp: y } = n, u = h && r ? h.offset > r.offset ? h : r : h ?? r;
2712
- u && (!y || y.offset < u.offset) && i(u, "MISSING_CHAR", "Missing newline after block sequence props");
2713
- }
2714
- const l = t.type === "block-map" ? "map" : t.type === "block-seq" ? "seq" : t.start.source === "{" ? "map" : "seq";
2715
- if (!r || !o || o === "!" || o === K.tagName && l === "map" || o === Q.tagName && l === "seq")
2716
- return it(s, e, t, i, o);
2717
- let a = e.schema.tags.find((h) => h.tag === o && h.collection === l);
2718
- if (!a) {
2719
- const h = e.schema.knownTags[o];
2720
- if (h && h.collection === l)
2721
- e.schema.tags.push(Object.assign({}, h, { default: !1 })), a = h;
2722
- else
2723
- return h != null && h.collection ? i(r, "BAD_COLLECTION_TYPE", `${h.tag} used for ${l} collection, but expects ${h.collection}`, !0) : i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), it(s, e, t, i, o);
2724
- }
2725
- const c = it(s, e, t, i, o, a), p = ((d = a.resolve) == null ? void 0 : d.call(a, c, (h) => i(r, "TAG_RESOLVE_FAILED", h), e.options)) ?? c, f = $(p) ? p : new A(p);
2726
- return f.range = c.range, f.tag = o, a != null && a.format && (f.format = a.format), f;
2727
- }
2728
- function bs(s, e, t) {
2729
- const n = e.offset, i = dn(e, s.options.strict, t);
2730
- if (!i)
2731
- return { value: "", type: null, comment: "", range: [n, n, n] };
2732
- const r = i.mode === ">" ? A.BLOCK_FOLDED : A.BLOCK_LITERAL, o = e.source ? pn(e.source) : [];
2733
- let l = o.length;
2734
- for (let u = o.length - 1; u >= 0; --u) {
2735
- const m = o[u][1];
2736
- if (m === "" || m === "\r")
2737
- l = u;
2738
- else
2739
- break;
2740
- }
2741
- if (l === 0) {
2742
- const u = i.chomp === "+" && o.length > 0 ? `
2743
- `.repeat(Math.max(1, o.length - 1)) : "";
2744
- let m = n + i.length;
2745
- return e.source && (m += e.source.length), { value: u, type: r, comment: i.comment, range: [n, m, m] };
2746
- }
2747
- let a = e.indent + i.indent, c = e.offset + i.length, p = 0;
2748
- for (let u = 0; u < l; ++u) {
2749
- const [m, b] = o[u];
2750
- if (b === "" || b === "\r")
2751
- i.indent === 0 && m.length > a && (a = m.length);
2752
- else {
2753
- m.length < a && t(c + m.length, "MISSING_CHAR", "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"), i.indent === 0 && (a = m.length), p = u, a === 0 && !s.atRoot && t(c, "BAD_INDENT", "Block scalar values in collections must be indented");
2754
- break;
2755
- }
2756
- c += m.length + b.length + 1;
2757
- }
2758
- for (let u = o.length - 1; u >= l; --u)
2759
- o[u][0].length > a && (l = u + 1);
2760
- let f = "", d = "", h = !1;
2761
- for (let u = 0; u < p; ++u)
2762
- f += o[u][0].slice(a) + `
2763
- `;
2764
- for (let u = p; u < l; ++u) {
2765
- let [m, b] = o[u];
2766
- c += m.length + b.length + 1;
2767
- const S = b[b.length - 1] === "\r";
2768
- if (S && (b = b.slice(0, -1)), b && m.length < a) {
2769
- const w = `Block scalar lines must not be less indented than their ${i.indent ? "explicit indentation indicator" : "first line"}`;
2770
- t(c - b.length - (S ? 2 : 1), "BAD_INDENT", w), m = "";
2771
- }
2772
- r === A.BLOCK_LITERAL ? (f += d + m.slice(a) + b, d = `
2773
- `) : m.length > a || b[0] === " " ? (d === " " ? d = `
2774
- ` : !h && d === `
2775
- ` && (d = `
2776
-
2777
- `), f += d + m.slice(a) + b, d = `
2778
- `, h = !0) : b === "" ? d === `
2779
- ` ? f += `
2780
- ` : d = `
2781
- ` : (f += d + b, d = " ", h = !1);
2782
- }
2783
- switch (i.chomp) {
2784
- case "-":
2785
- break;
2786
- case "+":
2787
- for (let u = l; u < o.length; ++u)
2788
- f += `
2789
- ` + o[u][0].slice(a);
2790
- f[f.length - 1] !== `
2791
- ` && (f += `
2792
- `);
2793
- break;
2794
- default:
2795
- f += `
2796
- `;
2797
- }
2798
- const y = n + i.length + e.source.length;
2799
- return { value: f, type: r, comment: i.comment, range: [n, y, y] };
2800
- }
2801
- function dn({ offset: s, props: e }, t, n) {
2802
- if (e[0].type !== "block-scalar-header")
2803
- return n(e[0], "IMPOSSIBLE", "Block scalar header not found"), null;
2804
- const { source: i } = e[0], r = i[0];
2805
- let o = 0, l = "", a = -1;
2806
- for (let d = 1; d < i.length; ++d) {
2807
- const h = i[d];
2808
- if (!l && (h === "-" || h === "+"))
2809
- l = h;
2810
- else {
2811
- const y = Number(h);
2812
- !o && y ? o = y : a === -1 && (a = s + d);
2813
- }
2814
- }
2815
- a !== -1 && n(a, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${i}`);
2816
- let c = !1, p = "", f = i.length;
2817
- for (let d = 1; d < e.length; ++d) {
2818
- const h = e[d];
2819
- switch (h.type) {
2820
- case "space":
2821
- c = !0;
2822
- // fallthrough
2823
- case "newline":
2824
- f += h.source.length;
2825
- break;
2826
- case "comment":
2827
- t && !c && n(h, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"), f += h.source.length, p = h.source.substring(1);
2828
- break;
2829
- case "error":
2830
- n(h, "UNEXPECTED_TOKEN", h.message), f += h.source.length;
2831
- break;
2832
- /* istanbul ignore next should not happen */
2833
- default: {
2834
- const y = `Unexpected token in block scalar header: ${h.type}`;
2835
- n(h, "UNEXPECTED_TOKEN", y);
2836
- const u = h.source;
2837
- u && typeof u == "string" && (f += u.length);
2838
- }
2839
- }
2840
- }
2841
- return { mode: r, indent: o, chomp: l, comment: p, length: f };
2842
- }
2843
- function pn(s) {
2844
- const e = s.split(/\n( *)/), t = e[0], n = t.match(/^( *)/), r = [n != null && n[1] ? [n[1], t.slice(n[1].length)] : ["", t]];
2845
- for (let o = 1; o < e.length; o += 2)
2846
- r.push([e[o], e[o + 1]]);
2847
- return r;
2848
- }
2849
- function ws(s, e, t) {
2850
- const { offset: n, type: i, source: r, end: o } = s;
2851
- let l, a;
2852
- const c = (d, h, y) => t(n + d, h, y);
2853
- switch (i) {
2854
- case "scalar":
2855
- l = A.PLAIN, a = mn(r, c);
2856
- break;
2857
- case "single-quoted-scalar":
2858
- l = A.QUOTE_SINGLE, a = yn(r, c);
2859
- break;
2860
- case "double-quoted-scalar":
2861
- l = A.QUOTE_DOUBLE, a = gn(r, c);
2862
- break;
2863
- /* istanbul ignore next should not happen */
2864
- default:
2865
- return t(s, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
2866
- value: "",
2867
- type: null,
2868
- comment: "",
2869
- range: [n, n + r.length, n + r.length]
2870
- };
2871
- }
2872
- const p = n + r.length, f = Ie(o, p, e, t);
2873
- return {
2874
- value: a,
2875
- type: l,
2876
- comment: f.comment,
2877
- range: [n, p, f.offset]
2878
- };
2879
- }
2880
- function mn(s, e) {
2881
- let t = "";
2882
- switch (s[0]) {
2883
- /* istanbul ignore next should not happen */
2884
- case " ":
2885
- t = "a tab character";
2886
- break;
2887
- case ",":
2888
- t = "flow indicator character ,";
2889
- break;
2890
- case "%":
2891
- t = "directive indicator character %";
2892
- break;
2893
- case "|":
2894
- case ">": {
2895
- t = `block scalar indicator ${s[0]}`;
2896
- break;
2897
- }
2898
- case "@":
2899
- case "`": {
2900
- t = `reserved character ${s[0]}`;
2901
- break;
2902
- }
2903
- }
2904
- return t && e(0, "BAD_SCALAR_START", `Plain value cannot start with ${t}`), Ss(s);
2905
- }
2906
- function yn(s, e) {
2907
- return (s[s.length - 1] !== "'" || s.length === 1) && e(s.length, "MISSING_CHAR", "Missing closing 'quote"), Ss(s.slice(1, -1)).replace(/''/g, "'");
2908
- }
2909
- function Ss(s) {
2910
- let e, t;
2911
- try {
2912
- e = new RegExp(`(.*?)(?<![ ])[ ]*\r?
2913
- `, "sy"), t = new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
2914
- `, "sy");
2915
- } catch {
2916
- e = /(.*?)[ \t]*\r?\n/sy, t = /[ \t]*(.*?)[ \t]*\r?\n/sy;
2917
- }
2918
- let n = e.exec(s);
2919
- if (!n)
2920
- return s;
2921
- let i = n[1], r = " ", o = e.lastIndex;
2922
- for (t.lastIndex = o; n = t.exec(s); )
2923
- n[1] === "" ? r === `
2924
- ` ? i += r : r = `
2925
- ` : (i += r + n[1], r = " "), o = t.lastIndex;
2926
- const l = /[ \t]*(.*)/sy;
2927
- return l.lastIndex = o, n = l.exec(s), i + r + ((n == null ? void 0 : n[1]) ?? "");
2928
- }
2929
- function gn(s, e) {
2930
- let t = "";
2931
- for (let n = 1; n < s.length - 1; ++n) {
2932
- const i = s[n];
2933
- if (!(i === "\r" && s[n + 1] === `
2934
- `))
2935
- if (i === `
2936
- `) {
2937
- const { fold: r, offset: o } = bn(s, n);
2938
- t += r, n = o;
2939
- } else if (i === "\\") {
2940
- let r = s[++n];
2941
- const o = wn[r];
2942
- if (o)
2943
- t += o;
2944
- else if (r === `
2945
- `)
2946
- for (r = s[n + 1]; r === " " || r === " "; )
2947
- r = s[++n + 1];
2948
- else if (r === "\r" && s[n + 1] === `
2949
- `)
2950
- for (r = s[++n + 1]; r === " " || r === " "; )
2951
- r = s[++n + 1];
2952
- else if (r === "x" || r === "u" || r === "U") {
2953
- const l = { x: 2, u: 4, U: 8 }[r];
2954
- t += Sn(s, n + 1, l, e), n += l;
2955
- } else {
2956
- const l = s.substr(n - 1, 2);
2957
- e(n - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${l}`), t += l;
2958
- }
2959
- } else if (i === " " || i === " ") {
2960
- const r = n;
2961
- let o = s[n + 1];
2962
- for (; o === " " || o === " "; )
2963
- o = s[++n + 1];
2964
- o !== `
2965
- ` && !(o === "\r" && s[n + 2] === `
2966
- `) && (t += n > r ? s.slice(r, n + 1) : i);
2967
- } else
2968
- t += i;
2969
- }
2970
- return (s[s.length - 1] !== '"' || s.length === 1) && e(s.length, "MISSING_CHAR", 'Missing closing "quote'), t;
2971
- }
2972
- function bn(s, e) {
2973
- let t = "", n = s[e + 1];
2974
- for (; (n === " " || n === " " || n === `
2975
- ` || n === "\r") && !(n === "\r" && s[e + 2] !== `
2976
- `); )
2977
- n === `
2978
- ` && (t += `
2979
- `), e += 1, n = s[e + 1];
2980
- return t || (t = " "), { fold: t, offset: e };
2981
- }
2982
- const wn = {
2983
- 0: "\0",
2984
- // null character
2985
- a: "\x07",
2986
- // bell character
2987
- b: "\b",
2988
- // backspace
2989
- e: "\x1B",
2990
- // escape character
2991
- f: "\f",
2992
- // form feed
2993
- n: `
2994
- `,
2995
- // line feed
2996
- r: "\r",
2997
- // carriage return
2998
- t: " ",
2999
- // horizontal tab
3000
- v: "\v",
3001
- // vertical tab
3002
- N: "…",
3003
- // Unicode next line
3004
- _: " ",
3005
- // Unicode non-breaking space
3006
- L: "\u2028",
3007
- // Unicode line separator
3008
- P: "\u2029",
3009
- // Unicode paragraph separator
3010
- " ": " ",
3011
- '"': '"',
3012
- "/": "/",
3013
- "\\": "\\",
3014
- " ": " "
3015
- };
3016
- function Sn(s, e, t, n) {
3017
- const i = s.substr(e, t), o = i.length === t && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
3018
- if (isNaN(o)) {
3019
- const l = s.substr(e - 2, t + 2);
3020
- return n(e - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${l}`), l;
3021
- }
3022
- return String.fromCodePoint(o);
3023
- }
3024
- function ks(s, e, t, n) {
3025
- const { value: i, type: r, comment: o, range: l } = e.type === "block-scalar" ? bs(s, e, n) : ws(e, s.options.strict, n), a = t ? s.directives.tagName(t.source, (f) => n(t, "TAG_RESOLVE_FAILED", f)) : null;
3026
- let c;
3027
- s.options.stringKeys && s.atKey ? c = s.schema[R] : a ? c = kn(s.schema, i, a, t, n) : e.type === "scalar" ? c = Nn(s, i, e, n) : c = s.schema[R];
3028
- let p;
3029
- try {
3030
- const f = c.resolve(i, (d) => n(t ?? e, "TAG_RESOLVE_FAILED", d), s.options);
3031
- p = E(f) ? f : new A(f);
3032
- } catch (f) {
3033
- const d = f instanceof Error ? f.message : String(f);
3034
- n(t ?? e, "TAG_RESOLVE_FAILED", d), p = new A(i);
3035
- }
3036
- return p.range = l, p.source = i, r && (p.type = r), a && (p.tag = a), c.format && (p.format = c.format), o && (p.comment = o), p;
3037
- }
3038
- function kn(s, e, t, n, i) {
3039
- var l;
3040
- if (t === "!")
3041
- return s[R];
3042
- const r = [];
3043
- for (const a of s.tags)
3044
- if (!a.collection && a.tag === t)
3045
- if (a.default && a.test)
3046
- r.push(a);
3047
- else
3048
- return a;
3049
- for (const a of r)
3050
- if ((l = a.test) != null && l.test(e))
3051
- return a;
3052
- const o = s.knownTags[t];
3053
- return o && !o.collection ? (s.tags.push(Object.assign({}, o, { default: !1, test: void 0 })), o) : (i(n, "TAG_RESOLVE_FAILED", `Unresolved tag: ${t}`, t !== "tag:yaml.org,2002:str"), s[R]);
3054
- }
3055
- function Nn({ atKey: s, directives: e, schema: t }, n, i, r) {
3056
- const o = t.tags.find((l) => {
3057
- var a;
3058
- return (l.default === !0 || s && l.default === "key") && ((a = l.test) == null ? void 0 : a.test(n));
3059
- }) || t[R];
3060
- if (t.compat) {
3061
- const l = t.compat.find((a) => {
3062
- var c;
3063
- return a.default && ((c = a.test) == null ? void 0 : c.test(n));
3064
- }) ?? t[R];
3065
- if (o.tag !== l.tag) {
3066
- const a = e.tagString(o.tag), c = e.tagString(l.tag), p = `Value may be parsed as either ${a} or ${c}`;
3067
- r(i, "TAG_RESOLVE_FAILED", p, !0);
3068
- }
3069
- }
3070
- return o;
3071
- }
3072
- function On(s, e, t) {
3073
- if (e) {
3074
- t === null && (t = e.length);
3075
- for (let n = t - 1; n >= 0; --n) {
3076
- let i = e[n];
3077
- switch (i.type) {
3078
- case "space":
3079
- case "comment":
3080
- case "newline":
3081
- s -= i.source.length;
3082
- continue;
3083
- }
3084
- for (i = e[++n]; (i == null ? void 0 : i.type) === "space"; )
3085
- s += i.source.length, i = e[++n];
3086
- break;
3087
- }
3088
- }
3089
- return s;
3090
- }
3091
- const An = { composeNode: Ns, composeEmptyNode: Et };
3092
- function Ns(s, e, t, n) {
3093
- const i = s.atKey, { spaceBefore: r, comment: o, anchor: l, tag: a } = t;
3094
- let c, p = !0;
3095
- switch (e.type) {
3096
- case "alias":
3097
- c = En(s, e, n), (l || a) && n(e, "ALIAS_PROPS", "An alias node must not specify any properties");
3098
- break;
3099
- case "scalar":
3100
- case "single-quoted-scalar":
3101
- case "double-quoted-scalar":
3102
- case "block-scalar":
3103
- c = ks(s, e, a, n), l && (c.anchor = l.source.substring(1));
3104
- break;
3105
- case "block-map":
3106
- case "block-seq":
3107
- case "flow-collection":
3108
- c = hn(An, s, e, t, n), l && (c.anchor = l.source.substring(1));
3109
- break;
3110
- default: {
3111
- const f = e.type === "error" ? e.message : `Unsupported token (type: ${e.type})`;
3112
- n(e, "UNEXPECTED_TOKEN", f), c = Et(s, e.offset, void 0, null, t, n), p = !1;
3113
- }
3114
- }
3115
- return l && c.anchor === "" && n(l, "BAD_ALIAS", "Anchor cannot be an empty string"), i && s.options.stringKeys && (!E(c) || typeof c.value != "string" || c.tag && c.tag !== "tag:yaml.org,2002:str") && n(a ?? e, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), r && (c.spaceBefore = !0), o && (e.type === "scalar" && e.source === "" ? c.comment = o : c.commentBefore = o), s.options.keepSourceTokens && p && (c.srcToken = e), c;
3116
- }
3117
- function Et(s, e, t, n, { spaceBefore: i, comment: r, anchor: o, tag: l, end: a }, c) {
3118
- const p = {
3119
- type: "scalar",
3120
- offset: On(e, t, n),
3121
- indent: -1,
3122
- source: ""
3123
- }, f = ks(s, p, l, c);
3124
- return o && (f.anchor = o.source.substring(1), f.anchor === "" && c(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (f.spaceBefore = !0), r && (f.comment = r, f.range[2] = a), f;
3125
- }
3126
- function En({ options: s }, { offset: e, source: t, end: n }, i) {
3127
- const r = new Re(t.substring(1));
3128
- r.source === "" && i(e, "BAD_ALIAS", "Alias cannot be an empty string"), r.source.endsWith(":") && i(e + t.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
3129
- const o = e + t.length, l = Ie(n, o, s.strict, i);
3130
- return r.range = [e, o, l.offset], l.comment && (r.comment = l.comment), r;
3131
- }
3132
- function In(s, e, { offset: t, start: n, value: i, end: r }, o) {
3133
- const l = Object.assign({ _directives: e }, s), a = new ge(void 0, l), c = {
3134
- atKey: !1,
3135
- atRoot: !0,
3136
- directives: a.directives,
3137
- options: a.options,
3138
- schema: a.schema
3139
- }, p = ue(n, {
3140
- indicator: "doc-start",
3141
- next: i ?? (r == null ? void 0 : r[0]),
3142
- offset: t,
3143
- onError: o,
3144
- parentIndent: 0,
3145
- startOnNewline: !0
3146
- });
3147
- p.found && (a.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !p.hasNewline && o(p.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), a.contents = i ? Ns(c, i, p, o) : Et(c, p.end, n, null, p, o);
3148
- const f = a.contents.range[2], d = Ie(r, f, !1, o);
3149
- return d.comment && (a.comment = d.comment), a.range = [t, f, d.offset], a;
3150
- }
3151
- function be(s) {
3152
- if (typeof s == "number")
3153
- return [s, s + 1];
3154
- if (Array.isArray(s))
3155
- return s.length === 2 ? s : [s[0], s[1]];
3156
- const { offset: e, source: t } = s;
3157
- return [e, e + (typeof t == "string" ? t.length : 1)];
3158
- }
3159
- function Kt(s) {
3160
- var i;
3161
- let e = "", t = !1, n = !1;
3162
- for (let r = 0; r < s.length; ++r) {
3163
- const o = s[r];
3164
- switch (o[0]) {
3165
- case "#":
3166
- e += (e === "" ? "" : n ? `
3167
-
3168
- ` : `
3169
- `) + (o.substring(1) || " "), t = !0, n = !1;
3170
- break;
3171
- case "%":
3172
- ((i = s[r + 1]) == null ? void 0 : i[0]) !== "#" && (r += 1), t = !1;
3173
- break;
3174
- default:
3175
- t || (n = !0), t = !1;
3176
- }
3177
- }
3178
- return { comment: e, afterEmptyLine: n };
3179
- }
3180
- class It {
3181
- constructor(e = {}) {
3182
- this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (t, n, i, r) => {
3183
- const o = be(t);
3184
- r ? this.warnings.push(new ys(o, n, i)) : this.errors.push(new z(o, n, i));
3185
- }, this.directives = new B({ version: e.version || "1.2" }), this.options = e;
3186
- }
3187
- decorate(e, t) {
3188
- const { comment: n, afterEmptyLine: i } = Kt(this.prelude);
3189
- if (n) {
3190
- const r = e.contents;
3191
- if (t)
3192
- e.comment = e.comment ? `${e.comment}
3193
- ${n}` : n;
3194
- else if (i || e.directives.docStart || !r)
3195
- e.commentBefore = n;
3196
- else if (L(r) && !r.flow && r.items.length > 0) {
3197
- let o = r.items[0];
3198
- T(o) && (o = o.key);
3199
- const l = o.commentBefore;
3200
- o.commentBefore = l ? `${n}
3201
- ${l}` : n;
3202
- } else {
3203
- const o = r.commentBefore;
3204
- r.commentBefore = o ? `${n}
3205
- ${o}` : n;
3206
- }
3207
- }
3208
- t ? (Array.prototype.push.apply(e.errors, this.errors), Array.prototype.push.apply(e.warnings, this.warnings)) : (e.errors = this.errors, e.warnings = this.warnings), this.prelude = [], this.errors = [], this.warnings = [];
3209
- }
3210
- /**
3211
- * Current stream status information.
3212
- *
3213
- * Mostly useful at the end of input for an empty stream.
3214
- */
3215
- streamInfo() {
3216
- return {
3217
- comment: Kt(this.prelude).comment,
3218
- directives: this.directives,
3219
- errors: this.errors,
3220
- warnings: this.warnings
3221
- };
3222
- }
3223
- /**
3224
- * Compose tokens into documents.
3225
- *
3226
- * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
3227
- * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
3228
- */
3229
- *compose(e, t = !1, n = -1) {
3230
- for (const i of e)
3231
- yield* this.next(i);
3232
- yield* this.end(t, n);
3233
- }
3234
- /** Advance the composer by one CST token. */
3235
- *next(e) {
3236
- switch (e.type) {
3237
- case "directive":
3238
- this.directives.add(e.source, (t, n, i) => {
3239
- const r = be(e);
3240
- r[0] += t, this.onError(r, "BAD_DIRECTIVE", n, i);
3241
- }), this.prelude.push(e.source), this.atDirectives = !0;
3242
- break;
3243
- case "document": {
3244
- const t = In(this.options, this.directives, e, this.onError);
3245
- this.atDirectives && !t.directives.docStart && this.onError(e, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"), this.decorate(t, !1), this.doc && (yield this.doc), this.doc = t, this.atDirectives = !1;
3246
- break;
3247
- }
3248
- case "byte-order-mark":
3249
- case "space":
3250
- break;
3251
- case "comment":
3252
- case "newline":
3253
- this.prelude.push(e.source);
3254
- break;
3255
- case "error": {
3256
- const t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new z(be(e), "UNEXPECTED_TOKEN", t);
3257
- this.atDirectives || !this.doc ? this.errors.push(n) : this.doc.errors.push(n);
3258
- break;
3259
- }
3260
- case "doc-end": {
3261
- if (!this.doc) {
3262
- const n = "Unexpected doc-end without preceding document";
3263
- this.errors.push(new z(be(e), "UNEXPECTED_TOKEN", n));
3264
- break;
3265
- }
3266
- this.doc.directives.docEnd = !0;
3267
- const t = Ie(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
3268
- if (this.decorate(this.doc, !0), t.comment) {
3269
- const n = this.doc.comment;
3270
- this.doc.comment = n ? `${n}
3271
- ${t.comment}` : t.comment;
3272
- }
3273
- this.doc.range[2] = t.offset;
3274
- break;
3275
- }
3276
- default:
3277
- this.errors.push(new z(be(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
3278
- }
3279
- }
3280
- /**
3281
- * Call at end of input to yield any remaining document.
3282
- *
3283
- * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
3284
- * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
3285
- */
3286
- *end(e = !1, t = -1) {
3287
- if (this.doc)
3288
- this.decorate(this.doc, !0), yield this.doc, this.doc = null;
3289
- else if (e) {
3290
- const n = Object.assign({ _directives: this.directives }, this.options), i = new ge(void 0, n);
3291
- this.atDirectives && this.onError(t, "MISSING_CHAR", "Missing directives-end indicator line"), i.range = [0, t, t], this.decorate(i, !1), yield i;
3292
- }
3293
- }
3294
- }
3295
- function Tn(s, e = !0, t) {
3296
- if (s) {
3297
- const n = (i, r, o) => {
3298
- const l = typeof i == "number" ? i : Array.isArray(i) ? i[0] : i.offset;
3299
- if (t)
3300
- t(l, r, o);
3301
- else
3302
- throw new z([l, l + 1], r, o);
3303
- };
3304
- switch (s.type) {
3305
- case "scalar":
3306
- case "single-quoted-scalar":
3307
- case "double-quoted-scalar":
3308
- return ws(s, e, n);
3309
- case "block-scalar":
3310
- return bs({ options: { strict: e } }, s, n);
3311
- }
3312
- }
3313
- return null;
3314
- }
3315
- function Ln(s, e) {
3316
- const { implicitKey: t = !1, indent: n, inFlow: i = !1, offset: r = -1, type: o = "PLAIN" } = e, l = Ae({ type: o, value: s }, {
3317
- implicitKey: t,
3318
- indent: n > 0 ? " ".repeat(n) : "",
3319
- inFlow: i,
3320
- options: { blockQuote: !0, lineWidth: -1 }
3321
- }), a = e.end ?? [
3322
- { type: "newline", offset: -1, indent: n, source: `
3323
- ` }
3324
- ];
3325
- switch (l[0]) {
3326
- case "|":
3327
- case ">": {
3328
- const c = l.indexOf(`
3329
- `), p = l.substring(0, c), f = l.substring(c + 1) + `
3330
- `, d = [
3331
- { type: "block-scalar-header", offset: r, indent: n, source: p }
3332
- ];
3333
- return Os(d, a) || d.push({ type: "newline", offset: -1, indent: n, source: `
3334
- ` }), { type: "block-scalar", offset: r, indent: n, props: d, source: f };
3335
- }
3336
- case '"':
3337
- return { type: "double-quoted-scalar", offset: r, indent: n, source: l, end: a };
3338
- case "'":
3339
- return { type: "single-quoted-scalar", offset: r, indent: n, source: l, end: a };
3340
- default:
3341
- return { type: "scalar", offset: r, indent: n, source: l, end: a };
3342
- }
3343
- }
3344
- function $n(s, e, t = {}) {
3345
- let { afterKey: n = !1, implicitKey: i = !1, inFlow: r = !1, type: o } = t, l = "indent" in s ? s.indent : null;
3346
- if (n && typeof l == "number" && (l += 2), !o)
3347
- switch (s.type) {
3348
- case "single-quoted-scalar":
3349
- o = "QUOTE_SINGLE";
3350
- break;
3351
- case "double-quoted-scalar":
3352
- o = "QUOTE_DOUBLE";
3353
- break;
3354
- case "block-scalar": {
3355
- const c = s.props[0];
3356
- if (c.type !== "block-scalar-header")
3357
- throw new Error("Invalid block scalar header");
3358
- o = c.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL";
3359
- break;
3360
- }
3361
- default:
3362
- o = "PLAIN";
3363
- }
3364
- const a = Ae({ type: o, value: e }, {
3365
- implicitKey: i || l === null,
3366
- indent: l !== null && l > 0 ? " ".repeat(l) : "",
3367
- inFlow: r,
3368
- options: { blockQuote: !0, lineWidth: -1 }
3369
- });
3370
- switch (a[0]) {
3371
- case "|":
3372
- case ">":
3373
- _n(s, a);
3374
- break;
3375
- case '"':
3376
- rt(s, a, "double-quoted-scalar");
3377
- break;
3378
- case "'":
3379
- rt(s, a, "single-quoted-scalar");
3380
- break;
3381
- default:
3382
- rt(s, a, "scalar");
3383
- }
3384
- }
3385
- function _n(s, e) {
3386
- const t = e.indexOf(`
3387
- `), n = e.substring(0, t), i = e.substring(t + 1) + `
3388
- `;
3389
- if (s.type === "block-scalar") {
3390
- const r = s.props[0];
3391
- if (r.type !== "block-scalar-header")
3392
- throw new Error("Invalid block scalar header");
3393
- r.source = n, s.source = i;
3394
- } else {
3395
- const { offset: r } = s, o = "indent" in s ? s.indent : -1, l = [
3396
- { type: "block-scalar-header", offset: r, indent: o, source: n }
3397
- ];
3398
- Os(l, "end" in s ? s.end : void 0) || l.push({ type: "newline", offset: -1, indent: o, source: `
3399
- ` });
3400
- for (const a of Object.keys(s))
3401
- a !== "type" && a !== "offset" && delete s[a];
3402
- Object.assign(s, { type: "block-scalar", indent: o, props: l, source: i });
3403
- }
3404
- }
3405
- function Os(s, e) {
3406
- if (e)
3407
- for (const t of e)
3408
- switch (t.type) {
3409
- case "space":
3410
- case "comment":
3411
- s.push(t);
3412
- break;
3413
- case "newline":
3414
- return s.push(t), !0;
3415
- }
3416
- return !1;
3417
- }
3418
- function rt(s, e, t) {
3419
- switch (s.type) {
3420
- case "scalar":
3421
- case "double-quoted-scalar":
3422
- case "single-quoted-scalar":
3423
- s.type = t, s.source = e;
3424
- break;
3425
- case "block-scalar": {
3426
- const n = s.props.slice(1);
3427
- let i = e.length;
3428
- s.props[0].type === "block-scalar-header" && (i -= s.props[0].source.length);
3429
- for (const r of n)
3430
- r.offset += i;
3431
- delete s.props, Object.assign(s, { type: t, source: e, end: n });
3432
- break;
3433
- }
3434
- case "block-map":
3435
- case "block-seq": {
3436
- const i = { type: "newline", offset: s.offset + e.length, indent: s.indent, source: `
3437
- ` };
3438
- delete s.items, Object.assign(s, { type: t, source: e, end: [i] });
3439
- break;
3440
- }
3441
- default: {
3442
- const n = "indent" in s ? s.indent : -1, i = "end" in s && Array.isArray(s.end) ? s.end.filter((r) => r.type === "space" || r.type === "comment" || r.type === "newline") : [];
3443
- for (const r of Object.keys(s))
3444
- r !== "type" && r !== "offset" && delete s[r];
3445
- Object.assign(s, { type: t, indent: n, source: e, end: i });
3446
- }
3447
- }
3448
- }
3449
- const Cn = (s) => "type" in s ? qe(s) : Ke(s);
3450
- function qe(s) {
3451
- switch (s.type) {
3452
- case "block-scalar": {
3453
- let e = "";
3454
- for (const t of s.props)
3455
- e += qe(t);
3456
- return e + s.source;
3457
- }
3458
- case "block-map":
3459
- case "block-seq": {
3460
- let e = "";
3461
- for (const t of s.items)
3462
- e += Ke(t);
3463
- return e;
3464
- }
3465
- case "flow-collection": {
3466
- let e = s.start.source;
3467
- for (const t of s.items)
3468
- e += Ke(t);
3469
- for (const t of s.end)
3470
- e += t.source;
3471
- return e;
3472
- }
3473
- case "document": {
3474
- let e = Ke(s);
3475
- if (s.end)
3476
- for (const t of s.end)
3477
- e += t.source;
3478
- return e;
3479
- }
3480
- default: {
3481
- let e = s.source;
3482
- if ("end" in s && s.end)
3483
- for (const t of s.end)
3484
- e += t.source;
3485
- return e;
3486
- }
3487
- }
3488
- }
3489
- function Ke({ start: s, key: e, sep: t, value: n }) {
3490
- let i = "";
3491
- for (const r of s)
3492
- i += r.source;
3493
- if (e && (i += qe(e)), t)
3494
- for (const r of t)
3495
- i += r.source;
3496
- return n && (i += qe(n)), i;
3497
- }
3498
- const ht = Symbol("break visit"), vn = Symbol("skip children"), As = Symbol("remove item");
3499
- function Z(s, e) {
3500
- "type" in s && s.type === "document" && (s = { start: s.start, value: s.value }), Es(Object.freeze([]), s, e);
3501
- }
3502
- Z.BREAK = ht;
3503
- Z.SKIP = vn;
3504
- Z.REMOVE = As;
3505
- Z.itemAtPath = (s, e) => {
3506
- let t = s;
3507
- for (const [n, i] of e) {
3508
- const r = t == null ? void 0 : t[n];
3509
- if (r && "items" in r)
3510
- t = r.items[i];
3511
- else
3512
- return;
3513
- }
3514
- return t;
3515
- };
3516
- Z.parentCollection = (s, e) => {
3517
- const t = Z.itemAtPath(s, e.slice(0, -1)), n = e[e.length - 1][0], i = t == null ? void 0 : t[n];
3518
- if (i && "items" in i)
3519
- return i;
3520
- throw new Error("Parent collection not found");
3521
- };
3522
- function Es(s, e, t) {
3523
- let n = t(e, s);
3524
- if (typeof n == "symbol")
3525
- return n;
3526
- for (const i of ["key", "value"]) {
3527
- const r = e[i];
3528
- if (r && "items" in r) {
3529
- for (let o = 0; o < r.items.length; ++o) {
3530
- const l = Es(Object.freeze(s.concat([[i, o]])), r.items[o], t);
3531
- if (typeof l == "number")
3532
- o = l - 1;
3533
- else {
3534
- if (l === ht)
3535
- return ht;
3536
- l === As && (r.items.splice(o, 1), o -= 1);
3537
- }
3538
- }
3539
- typeof n == "function" && i === "key" && (n = n(e, s));
3540
- }
3541
- }
3542
- return typeof n == "function" ? n(e, s) : n;
3543
- }
3544
- const ze = "\uFEFF", Ze = "", xe = "", Oe = "", Bn = (s) => !!s && "items" in s, Mn = (s) => !!s && (s.type === "scalar" || s.type === "single-quoted-scalar" || s.type === "double-quoted-scalar" || s.type === "block-scalar");
3545
- function Kn(s) {
3546
- switch (s) {
3547
- case ze:
3548
- return "<BOM>";
3549
- case Ze:
3550
- return "<DOC>";
3551
- case xe:
3552
- return "<FLOW_END>";
3553
- case Oe:
3554
- return "<SCALAR>";
3555
- default:
3556
- return JSON.stringify(s);
3557
- }
3558
- }
3559
- function Is(s) {
3560
- switch (s) {
3561
- case ze:
3562
- return "byte-order-mark";
3563
- case Ze:
3564
- return "doc-mode";
3565
- case xe:
3566
- return "flow-error-end";
3567
- case Oe:
3568
- return "scalar";
3569
- case "---":
3570
- return "doc-start";
3571
- case "...":
3572
- return "doc-end";
3573
- case "":
3574
- case `
3575
- `:
3576
- case `\r
3577
- `:
3578
- return "newline";
3579
- case "-":
3580
- return "seq-item-ind";
3581
- case "?":
3582
- return "explicit-key-ind";
3583
- case ":":
3584
- return "map-value-ind";
3585
- case "{":
3586
- return "flow-map-start";
3587
- case "}":
3588
- return "flow-map-end";
3589
- case "[":
3590
- return "flow-seq-start";
3591
- case "]":
3592
- return "flow-seq-end";
3593
- case ",":
3594
- return "comma";
3595
- }
3596
- switch (s[0]) {
3597
- case " ":
3598
- case " ":
3599
- return "space";
3600
- case "#":
3601
- return "comment";
3602
- case "%":
3603
- return "directive-line";
3604
- case "*":
3605
- return "alias";
3606
- case "&":
3607
- return "anchor";
3608
- case "!":
3609
- return "tag";
3610
- case "'":
3611
- return "single-quoted-scalar";
3612
- case '"':
3613
- return "double-quoted-scalar";
3614
- case "|":
3615
- case ">":
3616
- return "block-scalar-header";
3617
- }
3618
- return null;
3619
- }
3620
- const Pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3621
- __proto__: null,
3622
- BOM: ze,
3623
- DOCUMENT: Ze,
3624
- FLOW_END: xe,
3625
- SCALAR: Oe,
3626
- createScalarToken: Ln,
3627
- isCollection: Bn,
3628
- isScalar: Mn,
3629
- prettyToken: Kn,
3630
- resolveAsScalar: Tn,
3631
- setScalarValue: $n,
3632
- stringify: Cn,
3633
- tokenType: Is,
3634
- visit: Z
3635
- }, Symbol.toStringTag, { value: "Module" }));
3636
- function D(s) {
3637
- switch (s) {
3638
- case void 0:
3639
- case " ":
3640
- case `
3641
- `:
3642
- case "\r":
3643
- case " ":
3644
- return !0;
3645
- default:
3646
- return !1;
3647
- }
3648
- }
3649
- const Pt = new Set("0123456789ABCDEFabcdef"), jn = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), _e = new Set(",[]{}"), Dn = new Set(` ,[]{}
3650
- \r `), ot = (s) => !s || Dn.has(s);
3651
- class Ts {
3652
- constructor() {
3653
- this.atEnd = !1, this.blockScalarIndent = -1, this.blockScalarKeep = !1, this.buffer = "", this.flowKey = !1, this.flowLevel = 0, this.indentNext = 0, this.indentValue = 0, this.lineEndPos = null, this.next = null, this.pos = 0;
3654
- }
3655
- /**
3656
- * Generate YAML tokens from the `source` string. If `incomplete`,
3657
- * a part of the last line may be left as a buffer for the next call.
3658
- *
3659
- * @returns A generator of lexical tokens
3660
- */
3661
- *lex(e, t = !1) {
3662
- if (e) {
3663
- if (typeof e != "string")
3664
- throw TypeError("source is not a string");
3665
- this.buffer = this.buffer ? this.buffer + e : e, this.lineEndPos = null;
3666
- }
3667
- this.atEnd = !t;
3668
- let n = this.next ?? "stream";
3669
- for (; n && (t || this.hasChars(1)); )
3670
- n = yield* this.parseNext(n);
3671
- }
3672
- atLineEnd() {
3673
- let e = this.pos, t = this.buffer[e];
3674
- for (; t === " " || t === " "; )
3675
- t = this.buffer[++e];
3676
- return !t || t === "#" || t === `
3677
- ` ? !0 : t === "\r" ? this.buffer[e + 1] === `
3678
- ` : !1;
3679
- }
3680
- charAt(e) {
3681
- return this.buffer[this.pos + e];
3682
- }
3683
- continueScalar(e) {
3684
- let t = this.buffer[e];
3685
- if (this.indentNext > 0) {
3686
- let n = 0;
3687
- for (; t === " "; )
3688
- t = this.buffer[++n + e];
3689
- if (t === "\r") {
3690
- const i = this.buffer[n + e + 1];
3691
- if (i === `
3692
- ` || !i && !this.atEnd)
3693
- return e + n + 1;
3694
- }
3695
- return t === `
3696
- ` || n >= this.indentNext || !t && !this.atEnd ? e + n : -1;
3697
- }
3698
- if (t === "-" || t === ".") {
3699
- const n = this.buffer.substr(e, 3);
3700
- if ((n === "---" || n === "...") && D(this.buffer[e + 3]))
3701
- return -1;
3702
- }
3703
- return e;
3704
- }
3705
- getLine() {
3706
- let e = this.lineEndPos;
3707
- return (typeof e != "number" || e !== -1 && e < this.pos) && (e = this.buffer.indexOf(`
3708
- `, this.pos), this.lineEndPos = e), e === -1 ? this.atEnd ? this.buffer.substring(this.pos) : null : (this.buffer[e - 1] === "\r" && (e -= 1), this.buffer.substring(this.pos, e));
3709
- }
3710
- hasChars(e) {
3711
- return this.pos + e <= this.buffer.length;
3712
- }
3713
- setNext(e) {
3714
- return this.buffer = this.buffer.substring(this.pos), this.pos = 0, this.lineEndPos = null, this.next = e, null;
3715
- }
3716
- peek(e) {
3717
- return this.buffer.substr(this.pos, e);
3718
- }
3719
- *parseNext(e) {
3720
- switch (e) {
3721
- case "stream":
3722
- return yield* this.parseStream();
3723
- case "line-start":
3724
- return yield* this.parseLineStart();
3725
- case "block-start":
3726
- return yield* this.parseBlockStart();
3727
- case "doc":
3728
- return yield* this.parseDocument();
3729
- case "flow":
3730
- return yield* this.parseFlowCollection();
3731
- case "quoted-scalar":
3732
- return yield* this.parseQuotedScalar();
3733
- case "block-scalar":
3734
- return yield* this.parseBlockScalar();
3735
- case "plain-scalar":
3736
- return yield* this.parsePlainScalar();
3737
- }
3738
- }
3739
- *parseStream() {
3740
- let e = this.getLine();
3741
- if (e === null)
3742
- return this.setNext("stream");
3743
- if (e[0] === ze && (yield* this.pushCount(1), e = e.substring(1)), e[0] === "%") {
3744
- let t = e.length, n = e.indexOf("#");
3745
- for (; n !== -1; ) {
3746
- const r = e[n - 1];
3747
- if (r === " " || r === " ") {
3748
- t = n - 1;
3749
- break;
3750
- } else
3751
- n = e.indexOf("#", n + 1);
3752
- }
3753
- for (; ; ) {
3754
- const r = e[t - 1];
3755
- if (r === " " || r === " ")
3756
- t -= 1;
3757
- else
3758
- break;
3759
- }
3760
- const i = (yield* this.pushCount(t)) + (yield* this.pushSpaces(!0));
3761
- return yield* this.pushCount(e.length - i), this.pushNewline(), "stream";
3762
- }
3763
- if (this.atLineEnd()) {
3764
- const t = yield* this.pushSpaces(!0);
3765
- return yield* this.pushCount(e.length - t), yield* this.pushNewline(), "stream";
3766
- }
3767
- return yield Ze, yield* this.parseLineStart();
3768
- }
3769
- *parseLineStart() {
3770
- const e = this.charAt(0);
3771
- if (!e && !this.atEnd)
3772
- return this.setNext("line-start");
3773
- if (e === "-" || e === ".") {
3774
- if (!this.atEnd && !this.hasChars(4))
3775
- return this.setNext("line-start");
3776
- const t = this.peek(3);
3777
- if ((t === "---" || t === "...") && D(this.charAt(3)))
3778
- return yield* this.pushCount(3), this.indentValue = 0, this.indentNext = 0, t === "---" ? "doc" : "stream";
3779
- }
3780
- return this.indentValue = yield* this.pushSpaces(!1), this.indentNext > this.indentValue && !D(this.charAt(1)) && (this.indentNext = this.indentValue), yield* this.parseBlockStart();
3781
- }
3782
- *parseBlockStart() {
3783
- const [e, t] = this.peek(2);
3784
- if (!t && !this.atEnd)
3785
- return this.setNext("block-start");
3786
- if ((e === "-" || e === "?" || e === ":") && D(t)) {
3787
- const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0));
3788
- return this.indentNext = this.indentValue + 1, this.indentValue += n, yield* this.parseBlockStart();
3789
- }
3790
- return "doc";
3791
- }
3792
- *parseDocument() {
3793
- yield* this.pushSpaces(!0);
3794
- const e = this.getLine();
3795
- if (e === null)
3796
- return this.setNext("doc");
3797
- let t = yield* this.pushIndicators();
3798
- switch (e[t]) {
3799
- case "#":
3800
- yield* this.pushCount(e.length - t);
3801
- // fallthrough
3802
- case void 0:
3803
- return yield* this.pushNewline(), yield* this.parseLineStart();
3804
- case "{":
3805
- case "[":
3806
- return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel = 1, "flow";
3807
- case "}":
3808
- case "]":
3809
- return yield* this.pushCount(1), "doc";
3810
- case "*":
3811
- return yield* this.pushUntil(ot), "doc";
3812
- case '"':
3813
- case "'":
3814
- return yield* this.parseQuotedScalar();
3815
- case "|":
3816
- case ">":
3817
- return t += yield* this.parseBlockScalarHeader(), t += yield* this.pushSpaces(!0), yield* this.pushCount(e.length - t), yield* this.pushNewline(), yield* this.parseBlockScalar();
3818
- default:
3819
- return yield* this.parsePlainScalar();
3820
- }
3821
- }
3822
- *parseFlowCollection() {
3823
- let e, t, n = -1;
3824
- do
3825
- e = yield* this.pushNewline(), e > 0 ? (t = yield* this.pushSpaces(!1), this.indentValue = n = t) : t = 0, t += yield* this.pushSpaces(!0);
3826
- while (e + t > 0);
3827
- const i = this.getLine();
3828
- if (i === null)
3829
- return this.setNext("flow");
3830
- if ((n !== -1 && n < this.indentNext && i[0] !== "#" || n === 0 && (i.startsWith("---") || i.startsWith("...")) && D(i[3])) && !(n === this.indentNext - 1 && this.flowLevel === 1 && (i[0] === "]" || i[0] === "}")))
3831
- return this.flowLevel = 0, yield xe, yield* this.parseLineStart();
3832
- let r = 0;
3833
- for (; i[r] === ","; )
3834
- r += yield* this.pushCount(1), r += yield* this.pushSpaces(!0), this.flowKey = !1;
3835
- switch (r += yield* this.pushIndicators(), i[r]) {
3836
- case void 0:
3837
- return "flow";
3838
- case "#":
3839
- return yield* this.pushCount(i.length - r), "flow";
3840
- case "{":
3841
- case "[":
3842
- return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel += 1, "flow";
3843
- case "}":
3844
- case "]":
3845
- return yield* this.pushCount(1), this.flowKey = !0, this.flowLevel -= 1, this.flowLevel ? "flow" : "doc";
3846
- case "*":
3847
- return yield* this.pushUntil(ot), "flow";
3848
- case '"':
3849
- case "'":
3850
- return this.flowKey = !0, yield* this.parseQuotedScalar();
3851
- case ":": {
3852
- const o = this.charAt(1);
3853
- if (this.flowKey || D(o) || o === ",")
3854
- return this.flowKey = !1, yield* this.pushCount(1), yield* this.pushSpaces(!0), "flow";
3855
- }
3856
- // fallthrough
3857
- default:
3858
- return this.flowKey = !1, yield* this.parsePlainScalar();
3859
- }
3860
- }
3861
- *parseQuotedScalar() {
3862
- const e = this.charAt(0);
3863
- let t = this.buffer.indexOf(e, this.pos + 1);
3864
- if (e === "'")
3865
- for (; t !== -1 && this.buffer[t + 1] === "'"; )
3866
- t = this.buffer.indexOf("'", t + 2);
3867
- else
3868
- for (; t !== -1; ) {
3869
- let r = 0;
3870
- for (; this.buffer[t - 1 - r] === "\\"; )
3871
- r += 1;
3872
- if (r % 2 === 0)
3873
- break;
3874
- t = this.buffer.indexOf('"', t + 1);
3875
- }
3876
- const n = this.buffer.substring(0, t);
3877
- let i = n.indexOf(`
3878
- `, this.pos);
3879
- if (i !== -1) {
3880
- for (; i !== -1; ) {
3881
- const r = this.continueScalar(i + 1);
3882
- if (r === -1)
3883
- break;
3884
- i = n.indexOf(`
3885
- `, r);
3886
- }
3887
- i !== -1 && (t = i - (n[i - 1] === "\r" ? 2 : 1));
3888
- }
3889
- if (t === -1) {
3890
- if (!this.atEnd)
3891
- return this.setNext("quoted-scalar");
3892
- t = this.buffer.length;
3893
- }
3894
- return yield* this.pushToIndex(t + 1, !1), this.flowLevel ? "flow" : "doc";
3895
- }
3896
- *parseBlockScalarHeader() {
3897
- this.blockScalarIndent = -1, this.blockScalarKeep = !1;
3898
- let e = this.pos;
3899
- for (; ; ) {
3900
- const t = this.buffer[++e];
3901
- if (t === "+")
3902
- this.blockScalarKeep = !0;
3903
- else if (t > "0" && t <= "9")
3904
- this.blockScalarIndent = Number(t) - 1;
3905
- else if (t !== "-")
3906
- break;
3907
- }
3908
- return yield* this.pushUntil((t) => D(t) || t === "#");
3909
- }
3910
- *parseBlockScalar() {
3911
- let e = this.pos - 1, t = 0, n;
3912
- e: for (let r = this.pos; n = this.buffer[r]; ++r)
3913
- switch (n) {
3914
- case " ":
3915
- t += 1;
3916
- break;
3917
- case `
3918
- `:
3919
- e = r, t = 0;
3920
- break;
3921
- case "\r": {
3922
- const o = this.buffer[r + 1];
3923
- if (!o && !this.atEnd)
3924
- return this.setNext("block-scalar");
3925
- if (o === `
3926
- `)
3927
- break;
3928
- }
3929
- // fallthrough
3930
- default:
3931
- break e;
3932
- }
3933
- if (!n && !this.atEnd)
3934
- return this.setNext("block-scalar");
3935
- if (t >= this.indentNext) {
3936
- this.blockScalarIndent === -1 ? this.indentNext = t : this.indentNext = this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);
3937
- do {
3938
- const r = this.continueScalar(e + 1);
3939
- if (r === -1)
3940
- break;
3941
- e = this.buffer.indexOf(`
3942
- `, r);
3943
- } while (e !== -1);
3944
- if (e === -1) {
3945
- if (!this.atEnd)
3946
- return this.setNext("block-scalar");
3947
- e = this.buffer.length;
3948
- }
3949
- }
3950
- let i = e + 1;
3951
- for (n = this.buffer[i]; n === " "; )
3952
- n = this.buffer[++i];
3953
- if (n === " ") {
3954
- for (; n === " " || n === " " || n === "\r" || n === `
3955
- `; )
3956
- n = this.buffer[++i];
3957
- e = i - 1;
3958
- } else if (!this.blockScalarKeep)
3959
- do {
3960
- let r = e - 1, o = this.buffer[r];
3961
- o === "\r" && (o = this.buffer[--r]);
3962
- const l = r;
3963
- for (; o === " "; )
3964
- o = this.buffer[--r];
3965
- if (o === `
3966
- ` && r >= this.pos && r + 1 + t > l)
3967
- e = r;
3968
- else
3969
- break;
3970
- } while (!0);
3971
- return yield Oe, yield* this.pushToIndex(e + 1, !0), yield* this.parseLineStart();
3972
- }
3973
- *parsePlainScalar() {
3974
- const e = this.flowLevel > 0;
3975
- let t = this.pos - 1, n = this.pos - 1, i;
3976
- for (; i = this.buffer[++n]; )
3977
- if (i === ":") {
3978
- const r = this.buffer[n + 1];
3979
- if (D(r) || e && _e.has(r))
3980
- break;
3981
- t = n;
3982
- } else if (D(i)) {
3983
- let r = this.buffer[n + 1];
3984
- if (i === "\r" && (r === `
3985
- ` ? (n += 1, i = `
3986
- `, r = this.buffer[n + 1]) : t = n), r === "#" || e && _e.has(r))
3987
- break;
3988
- if (i === `
3989
- `) {
3990
- const o = this.continueScalar(n + 1);
3991
- if (o === -1)
3992
- break;
3993
- n = Math.max(n, o - 2);
3994
- }
3995
- } else {
3996
- if (e && _e.has(i))
3997
- break;
3998
- t = n;
3999
- }
4000
- return !i && !this.atEnd ? this.setNext("plain-scalar") : (yield Oe, yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
4001
- }
4002
- *pushCount(e) {
4003
- return e > 0 ? (yield this.buffer.substr(this.pos, e), this.pos += e, e) : 0;
4004
- }
4005
- *pushToIndex(e, t) {
4006
- const n = this.buffer.slice(this.pos, e);
4007
- return n ? (yield n, this.pos += n.length, n.length) : (t && (yield ""), 0);
4008
- }
4009
- *pushIndicators() {
4010
- switch (this.charAt(0)) {
4011
- case "!":
4012
- return (yield* this.pushTag()) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
4013
- case "&":
4014
- return (yield* this.pushUntil(ot)) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
4015
- case "-":
4016
- // this is an error
4017
- case "?":
4018
- // this is an error outside flow collections
4019
- case ":": {
4020
- const e = this.flowLevel > 0, t = this.charAt(1);
4021
- if (D(t) || e && _e.has(t))
4022
- return e ? this.flowKey && (this.flowKey = !1) : this.indentNext = this.indentValue + 1, (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
4023
- }
4024
- }
4025
- return 0;
4026
- }
4027
- *pushTag() {
4028
- if (this.charAt(1) === "<") {
4029
- let e = this.pos + 2, t = this.buffer[e];
4030
- for (; !D(t) && t !== ">"; )
4031
- t = this.buffer[++e];
4032
- return yield* this.pushToIndex(t === ">" ? e + 1 : e, !1);
4033
- } else {
4034
- let e = this.pos + 1, t = this.buffer[e];
4035
- for (; t; )
4036
- if (jn.has(t))
4037
- t = this.buffer[++e];
4038
- else if (t === "%" && Pt.has(this.buffer[e + 1]) && Pt.has(this.buffer[e + 2]))
4039
- t = this.buffer[e += 3];
4040
- else
4041
- break;
4042
- return yield* this.pushToIndex(e, !1);
4043
- }
4044
- }
4045
- *pushNewline() {
4046
- const e = this.buffer[this.pos];
4047
- return e === `
4048
- ` ? yield* this.pushCount(1) : e === "\r" && this.charAt(1) === `
4049
- ` ? yield* this.pushCount(2) : 0;
4050
- }
4051
- *pushSpaces(e) {
4052
- let t = this.pos - 1, n;
4053
- do
4054
- n = this.buffer[++t];
4055
- while (n === " " || e && n === " ");
4056
- const i = t - this.pos;
4057
- return i > 0 && (yield this.buffer.substr(this.pos, i), this.pos = t), i;
4058
- }
4059
- *pushUntil(e) {
4060
- let t = this.pos, n = this.buffer[t];
4061
- for (; !e(n); )
4062
- n = this.buffer[++t];
4063
- return yield* this.pushToIndex(t, !1);
4064
- }
4065
- }
4066
- class Ls {
4067
- constructor() {
4068
- this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
4069
- let t = 0, n = this.lineStarts.length;
4070
- for (; t < n; ) {
4071
- const r = t + n >> 1;
4072
- this.lineStarts[r] < e ? t = r + 1 : n = r;
4073
- }
4074
- if (this.lineStarts[t] === e)
4075
- return { line: t + 1, col: 1 };
4076
- if (t === 0)
4077
- return { line: 0, col: e };
4078
- const i = this.lineStarts[t - 1];
4079
- return { line: t, col: e - i + 1 };
4080
- };
4081
- }
4082
- }
4083
- function W(s, e) {
4084
- for (let t = 0; t < s.length; ++t)
4085
- if (s[t].type === e)
4086
- return !0;
4087
- return !1;
4088
- }
4089
- function jt(s) {
4090
- for (let e = 0; e < s.length; ++e)
4091
- switch (s[e].type) {
4092
- case "space":
4093
- case "comment":
4094
- case "newline":
4095
- break;
4096
- default:
4097
- return e;
4098
- }
4099
- return -1;
4100
- }
4101
- function $s(s) {
4102
- switch (s == null ? void 0 : s.type) {
4103
- case "alias":
4104
- case "scalar":
4105
- case "single-quoted-scalar":
4106
- case "double-quoted-scalar":
4107
- case "flow-collection":
4108
- return !0;
4109
- default:
4110
- return !1;
4111
- }
4112
- }
4113
- function Ce(s) {
4114
- switch (s.type) {
4115
- case "document":
4116
- return s.start;
4117
- case "block-map": {
4118
- const e = s.items[s.items.length - 1];
4119
- return e.sep ?? e.start;
4120
- }
4121
- case "block-seq":
4122
- return s.items[s.items.length - 1].start;
4123
- /* istanbul ignore next should not happen */
4124
- default:
4125
- return [];
4126
- }
4127
- }
4128
- function ne(s) {
4129
- var t;
4130
- if (s.length === 0)
4131
- return [];
4132
- let e = s.length;
4133
- e: for (; --e >= 0; )
4134
- switch (s[e].type) {
4135
- case "doc-start":
4136
- case "explicit-key-ind":
4137
- case "map-value-ind":
4138
- case "seq-item-ind":
4139
- case "newline":
4140
- break e;
4141
- }
4142
- for (; ((t = s[++e]) == null ? void 0 : t.type) === "space"; )
4143
- ;
4144
- return s.splice(e, s.length);
4145
- }
4146
- function Dt(s) {
4147
- if (s.start.type === "flow-seq-start")
4148
- for (const e of s.items)
4149
- e.sep && !e.value && !W(e.start, "explicit-key-ind") && !W(e.sep, "map-value-ind") && (e.key && (e.value = e.key), delete e.key, $s(e.value) ? e.value.end ? Array.prototype.push.apply(e.value.end, e.sep) : e.value.end = e.sep : Array.prototype.push.apply(e.start, e.sep), delete e.sep);
4150
- }
4151
- class Tt {
4152
- /**
4153
- * @param onNewLine - If defined, called separately with the start position of
4154
- * each new line (in `parse()`, including the start of input).
4155
- */
4156
- constructor(e) {
4157
- this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new Ts(), this.onNewLine = e;
4158
- }
4159
- /**
4160
- * Parse `source` as a YAML stream.
4161
- * If `incomplete`, a part of the last line may be left as a buffer for the next call.
4162
- *
4163
- * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens.
4164
- *
4165
- * @returns A generator of tokens representing each directive, document, and other structure.
4166
- */
4167
- *parse(e, t = !1) {
4168
- this.onNewLine && this.offset === 0 && this.onNewLine(0);
4169
- for (const n of this.lexer.lex(e, t))
4170
- yield* this.next(n);
4171
- t || (yield* this.end());
4172
- }
4173
- /**
4174
- * Advance the parser by the `source` of one lexical token.
4175
- */
4176
- *next(e) {
4177
- if (this.source = e, this.atScalar) {
4178
- this.atScalar = !1, yield* this.step(), this.offset += e.length;
4179
- return;
4180
- }
4181
- const t = Is(e);
4182
- if (t)
4183
- if (t === "scalar")
4184
- this.atNewLine = !1, this.atScalar = !0, this.type = "scalar";
4185
- else {
4186
- switch (this.type = t, yield* this.step(), t) {
4187
- case "newline":
4188
- this.atNewLine = !0, this.indent = 0, this.onNewLine && this.onNewLine(this.offset + e.length);
4189
- break;
4190
- case "space":
4191
- this.atNewLine && e[0] === " " && (this.indent += e.length);
4192
- break;
4193
- case "explicit-key-ind":
4194
- case "map-value-ind":
4195
- case "seq-item-ind":
4196
- this.atNewLine && (this.indent += e.length);
4197
- break;
4198
- case "doc-mode":
4199
- case "flow-error-end":
4200
- return;
4201
- default:
4202
- this.atNewLine = !1;
4203
- }
4204
- this.offset += e.length;
4205
- }
4206
- else {
4207
- const n = `Not a YAML token: ${e}`;
4208
- yield* this.pop({ type: "error", offset: this.offset, message: n, source: e }), this.offset += e.length;
4209
- }
4210
- }
4211
- /** Call at end of input to push out any remaining constructions */
4212
- *end() {
4213
- for (; this.stack.length > 0; )
4214
- yield* this.pop();
4215
- }
4216
- get sourceToken() {
4217
- return {
4218
- type: this.type,
4219
- offset: this.offset,
4220
- indent: this.indent,
4221
- source: this.source
4222
- };
4223
- }
4224
- *step() {
4225
- const e = this.peek(1);
4226
- if (this.type === "doc-end" && (!e || e.type !== "doc-end")) {
4227
- for (; this.stack.length > 0; )
4228
- yield* this.pop();
4229
- this.stack.push({
4230
- type: "doc-end",
4231
- offset: this.offset,
4232
- source: this.source
4233
- });
4234
- return;
4235
- }
4236
- if (!e)
4237
- return yield* this.stream();
4238
- switch (e.type) {
4239
- case "document":
4240
- return yield* this.document(e);
4241
- case "alias":
4242
- case "scalar":
4243
- case "single-quoted-scalar":
4244
- case "double-quoted-scalar":
4245
- return yield* this.scalar(e);
4246
- case "block-scalar":
4247
- return yield* this.blockScalar(e);
4248
- case "block-map":
4249
- return yield* this.blockMap(e);
4250
- case "block-seq":
4251
- return yield* this.blockSequence(e);
4252
- case "flow-collection":
4253
- return yield* this.flowCollection(e);
4254
- case "doc-end":
4255
- return yield* this.documentEnd(e);
4256
- }
4257
- yield* this.pop();
4258
- }
4259
- peek(e) {
4260
- return this.stack[this.stack.length - e];
4261
- }
4262
- *pop(e) {
4263
- const t = e ?? this.stack.pop();
4264
- if (!t)
4265
- yield { type: "error", offset: this.offset, source: "", message: "Tried to pop an empty stack" };
4266
- else if (this.stack.length === 0)
4267
- yield t;
4268
- else {
4269
- const n = this.peek(1);
4270
- switch (t.type === "block-scalar" ? t.indent = "indent" in n ? n.indent : 0 : t.type === "flow-collection" && n.type === "document" && (t.indent = 0), t.type === "flow-collection" && Dt(t), n.type) {
4271
- case "document":
4272
- n.value = t;
4273
- break;
4274
- case "block-scalar":
4275
- n.props.push(t);
4276
- break;
4277
- case "block-map": {
4278
- const i = n.items[n.items.length - 1];
4279
- if (i.value) {
4280
- n.items.push({ start: [], key: t, sep: [] }), this.onKeyLine = !0;
4281
- return;
4282
- } else if (i.sep)
4283
- i.value = t;
4284
- else {
4285
- Object.assign(i, { key: t, sep: [] }), this.onKeyLine = !i.explicitKey;
4286
- return;
4287
- }
4288
- break;
4289
- }
4290
- case "block-seq": {
4291
- const i = n.items[n.items.length - 1];
4292
- i.value ? n.items.push({ start: [], value: t }) : i.value = t;
4293
- break;
4294
- }
4295
- case "flow-collection": {
4296
- const i = n.items[n.items.length - 1];
4297
- !i || i.value ? n.items.push({ start: [], key: t, sep: [] }) : i.sep ? i.value = t : Object.assign(i, { key: t, sep: [] });
4298
- return;
4299
- }
4300
- /* istanbul ignore next should not happen */
4301
- default:
4302
- yield* this.pop(), yield* this.pop(t);
4303
- }
4304
- if ((n.type === "document" || n.type === "block-map" || n.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
4305
- const i = t.items[t.items.length - 1];
4306
- i && !i.sep && !i.value && i.start.length > 0 && jt(i.start) === -1 && (t.indent === 0 || i.start.every((r) => r.type !== "comment" || r.indent < t.indent)) && (n.type === "document" ? n.end = i.start : n.items.push({ start: i.start }), t.items.splice(-1, 1));
4307
- }
4308
- }
4309
- }
4310
- *stream() {
4311
- switch (this.type) {
4312
- case "directive-line":
4313
- yield { type: "directive", offset: this.offset, source: this.source };
4314
- return;
4315
- case "byte-order-mark":
4316
- case "space":
4317
- case "comment":
4318
- case "newline":
4319
- yield this.sourceToken;
4320
- return;
4321
- case "doc-mode":
4322
- case "doc-start": {
4323
- const e = {
4324
- type: "document",
4325
- offset: this.offset,
4326
- start: []
4327
- };
4328
- this.type === "doc-start" && e.start.push(this.sourceToken), this.stack.push(e);
4329
- return;
4330
- }
4331
- }
4332
- yield {
4333
- type: "error",
4334
- offset: this.offset,
4335
- message: `Unexpected ${this.type} token in YAML stream`,
4336
- source: this.source
4337
- };
4338
- }
4339
- *document(e) {
4340
- if (e.value)
4341
- return yield* this.lineEnd(e);
4342
- switch (this.type) {
4343
- case "doc-start": {
4344
- jt(e.start) !== -1 ? (yield* this.pop(), yield* this.step()) : e.start.push(this.sourceToken);
4345
- return;
4346
- }
4347
- case "anchor":
4348
- case "tag":
4349
- case "space":
4350
- case "comment":
4351
- case "newline":
4352
- e.start.push(this.sourceToken);
4353
- return;
4354
- }
4355
- const t = this.startBlockValue(e);
4356
- t ? this.stack.push(t) : yield {
4357
- type: "error",
4358
- offset: this.offset,
4359
- message: `Unexpected ${this.type} token in YAML document`,
4360
- source: this.source
4361
- };
4362
- }
4363
- *scalar(e) {
4364
- if (this.type === "map-value-ind") {
4365
- const t = Ce(this.peek(2)), n = ne(t);
4366
- let i;
4367
- e.end ? (i = e.end, i.push(this.sourceToken), delete e.end) : i = [this.sourceToken];
4368
- const r = {
4369
- type: "block-map",
4370
- offset: e.offset,
4371
- indent: e.indent,
4372
- items: [{ start: n, key: e, sep: i }]
4373
- };
4374
- this.onKeyLine = !0, this.stack[this.stack.length - 1] = r;
4375
- } else
4376
- yield* this.lineEnd(e);
4377
- }
4378
- *blockScalar(e) {
4379
- switch (this.type) {
4380
- case "space":
4381
- case "comment":
4382
- case "newline":
4383
- e.props.push(this.sourceToken);
4384
- return;
4385
- case "scalar":
4386
- if (e.source = this.source, this.atNewLine = !0, this.indent = 0, this.onNewLine) {
4387
- let t = this.source.indexOf(`
4388
- `) + 1;
4389
- for (; t !== 0; )
4390
- this.onNewLine(this.offset + t), t = this.source.indexOf(`
4391
- `, t) + 1;
4392
- }
4393
- yield* this.pop();
4394
- break;
4395
- /* istanbul ignore next should not happen */
4396
- default:
4397
- yield* this.pop(), yield* this.step();
4398
- }
4399
- }
4400
- *blockMap(e) {
4401
- var n;
4402
- const t = e.items[e.items.length - 1];
4403
- switch (this.type) {
4404
- case "newline":
4405
- if (this.onKeyLine = !1, t.value) {
4406
- const i = "end" in t.value ? t.value.end : void 0, r = Array.isArray(i) ? i[i.length - 1] : void 0;
4407
- (r == null ? void 0 : r.type) === "comment" ? i == null || i.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
4408
- } else t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
4409
- return;
4410
- case "space":
4411
- case "comment":
4412
- if (t.value)
4413
- e.items.push({ start: [this.sourceToken] });
4414
- else if (t.sep)
4415
- t.sep.push(this.sourceToken);
4416
- else {
4417
- if (this.atIndentedComment(t.start, e.indent)) {
4418
- const i = e.items[e.items.length - 2], r = (n = i == null ? void 0 : i.value) == null ? void 0 : n.end;
4419
- if (Array.isArray(r)) {
4420
- Array.prototype.push.apply(r, t.start), r.push(this.sourceToken), e.items.pop();
4421
- return;
4422
- }
4423
- }
4424
- t.start.push(this.sourceToken);
4425
- }
4426
- return;
4427
- }
4428
- if (this.indent >= e.indent) {
4429
- const i = !this.onKeyLine && this.indent === e.indent, r = i && (t.sep || t.explicitKey) && this.type !== "seq-item-ind";
4430
- let o = [];
4431
- if (r && t.sep && !t.value) {
4432
- const l = [];
4433
- for (let a = 0; a < t.sep.length; ++a) {
4434
- const c = t.sep[a];
4435
- switch (c.type) {
4436
- case "newline":
4437
- l.push(a);
4438
- break;
4439
- case "space":
4440
- break;
4441
- case "comment":
4442
- c.indent > e.indent && (l.length = 0);
4443
- break;
4444
- default:
4445
- l.length = 0;
4446
- }
4447
- }
4448
- l.length >= 2 && (o = t.sep.splice(l[1]));
4449
- }
4450
- switch (this.type) {
4451
- case "anchor":
4452
- case "tag":
4453
- r || t.value ? (o.push(this.sourceToken), e.items.push({ start: o }), this.onKeyLine = !0) : t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
4454
- return;
4455
- case "explicit-key-ind":
4456
- !t.sep && !t.explicitKey ? (t.start.push(this.sourceToken), t.explicitKey = !0) : r || t.value ? (o.push(this.sourceToken), e.items.push({ start: o, explicitKey: !0 })) : this.stack.push({
4457
- type: "block-map",
4458
- offset: this.offset,
4459
- indent: this.indent,
4460
- items: [{ start: [this.sourceToken], explicitKey: !0 }]
4461
- }), this.onKeyLine = !0;
4462
- return;
4463
- case "map-value-ind":
4464
- if (t.explicitKey)
4465
- if (t.sep)
4466
- if (t.value)
4467
- e.items.push({ start: [], key: null, sep: [this.sourceToken] });
4468
- else if (W(t.sep, "map-value-ind"))
4469
- this.stack.push({
4470
- type: "block-map",
4471
- offset: this.offset,
4472
- indent: this.indent,
4473
- items: [{ start: o, key: null, sep: [this.sourceToken] }]
4474
- });
4475
- else if ($s(t.key) && !W(t.sep, "newline")) {
4476
- const l = ne(t.start), a = t.key, c = t.sep;
4477
- c.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
4478
- type: "block-map",
4479
- offset: this.offset,
4480
- indent: this.indent,
4481
- items: [{ start: l, key: a, sep: c }]
4482
- });
4483
- } else o.length > 0 ? t.sep = t.sep.concat(o, this.sourceToken) : t.sep.push(this.sourceToken);
4484
- else if (W(t.start, "newline"))
4485
- Object.assign(t, { key: null, sep: [this.sourceToken] });
4486
- else {
4487
- const l = ne(t.start);
4488
- this.stack.push({
4489
- type: "block-map",
4490
- offset: this.offset,
4491
- indent: this.indent,
4492
- items: [{ start: l, key: null, sep: [this.sourceToken] }]
4493
- });
4494
- }
4495
- else
4496
- t.sep ? t.value || r ? e.items.push({ start: o, key: null, sep: [this.sourceToken] }) : W(t.sep, "map-value-ind") ? this.stack.push({
4497
- type: "block-map",
4498
- offset: this.offset,
4499
- indent: this.indent,
4500
- items: [{ start: [], key: null, sep: [this.sourceToken] }]
4501
- }) : t.sep.push(this.sourceToken) : Object.assign(t, { key: null, sep: [this.sourceToken] });
4502
- this.onKeyLine = !0;
4503
- return;
4504
- case "alias":
4505
- case "scalar":
4506
- case "single-quoted-scalar":
4507
- case "double-quoted-scalar": {
4508
- const l = this.flowScalar(this.type);
4509
- r || t.value ? (e.items.push({ start: o, key: l, sep: [] }), this.onKeyLine = !0) : t.sep ? this.stack.push(l) : (Object.assign(t, { key: l, sep: [] }), this.onKeyLine = !0);
4510
- return;
4511
- }
4512
- default: {
4513
- const l = this.startBlockValue(e);
4514
- if (l) {
4515
- i && l.type !== "block-seq" && e.items.push({ start: o }), this.stack.push(l);
4516
- return;
4517
- }
4518
- }
4519
- }
4520
- }
4521
- yield* this.pop(), yield* this.step();
4522
- }
4523
- *blockSequence(e) {
4524
- var n;
4525
- const t = e.items[e.items.length - 1];
4526
- switch (this.type) {
4527
- case "newline":
4528
- if (t.value) {
4529
- const i = "end" in t.value ? t.value.end : void 0, r = Array.isArray(i) ? i[i.length - 1] : void 0;
4530
- (r == null ? void 0 : r.type) === "comment" ? i == null || i.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
4531
- } else
4532
- t.start.push(this.sourceToken);
4533
- return;
4534
- case "space":
4535
- case "comment":
4536
- if (t.value)
4537
- e.items.push({ start: [this.sourceToken] });
4538
- else {
4539
- if (this.atIndentedComment(t.start, e.indent)) {
4540
- const i = e.items[e.items.length - 2], r = (n = i == null ? void 0 : i.value) == null ? void 0 : n.end;
4541
- if (Array.isArray(r)) {
4542
- Array.prototype.push.apply(r, t.start), r.push(this.sourceToken), e.items.pop();
4543
- return;
4544
- }
4545
- }
4546
- t.start.push(this.sourceToken);
4547
- }
4548
- return;
4549
- case "anchor":
4550
- case "tag":
4551
- if (t.value || this.indent <= e.indent)
4552
- break;
4553
- t.start.push(this.sourceToken);
4554
- return;
4555
- case "seq-item-ind":
4556
- if (this.indent !== e.indent)
4557
- break;
4558
- t.value || W(t.start, "seq-item-ind") ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
4559
- return;
4560
- }
4561
- if (this.indent > e.indent) {
4562
- const i = this.startBlockValue(e);
4563
- if (i) {
4564
- this.stack.push(i);
4565
- return;
4566
- }
4567
- }
4568
- yield* this.pop(), yield* this.step();
4569
- }
4570
- *flowCollection(e) {
4571
- const t = e.items[e.items.length - 1];
4572
- if (this.type === "flow-error-end") {
4573
- let n;
4574
- do
4575
- yield* this.pop(), n = this.peek(1);
4576
- while (n && n.type === "flow-collection");
4577
- } else if (e.end.length === 0) {
4578
- switch (this.type) {
4579
- case "comma":
4580
- case "explicit-key-ind":
4581
- !t || t.sep ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
4582
- return;
4583
- case "map-value-ind":
4584
- !t || t.value ? e.items.push({ start: [], key: null, sep: [this.sourceToken] }) : t.sep ? t.sep.push(this.sourceToken) : Object.assign(t, { key: null, sep: [this.sourceToken] });
4585
- return;
4586
- case "space":
4587
- case "comment":
4588
- case "newline":
4589
- case "anchor":
4590
- case "tag":
4591
- !t || t.value ? e.items.push({ start: [this.sourceToken] }) : t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
4592
- return;
4593
- case "alias":
4594
- case "scalar":
4595
- case "single-quoted-scalar":
4596
- case "double-quoted-scalar": {
4597
- const i = this.flowScalar(this.type);
4598
- !t || t.value ? e.items.push({ start: [], key: i, sep: [] }) : t.sep ? this.stack.push(i) : Object.assign(t, { key: i, sep: [] });
4599
- return;
4600
- }
4601
- case "flow-map-end":
4602
- case "flow-seq-end":
4603
- e.end.push(this.sourceToken);
4604
- return;
4605
- }
4606
- const n = this.startBlockValue(e);
4607
- n ? this.stack.push(n) : (yield* this.pop(), yield* this.step());
4608
- } else {
4609
- const n = this.peek(2);
4610
- if (n.type === "block-map" && (this.type === "map-value-ind" && n.indent === e.indent || this.type === "newline" && !n.items[n.items.length - 1].sep))
4611
- yield* this.pop(), yield* this.step();
4612
- else if (this.type === "map-value-ind" && n.type !== "flow-collection") {
4613
- const i = Ce(n), r = ne(i);
4614
- Dt(e);
4615
- const o = e.end.splice(1, e.end.length);
4616
- o.push(this.sourceToken);
4617
- const l = {
4618
- type: "block-map",
4619
- offset: e.offset,
4620
- indent: e.indent,
4621
- items: [{ start: r, key: e, sep: o }]
4622
- };
4623
- this.onKeyLine = !0, this.stack[this.stack.length - 1] = l;
4624
- } else
4625
- yield* this.lineEnd(e);
4626
- }
4627
- }
4628
- flowScalar(e) {
4629
- if (this.onNewLine) {
4630
- let t = this.source.indexOf(`
4631
- `) + 1;
4632
- for (; t !== 0; )
4633
- this.onNewLine(this.offset + t), t = this.source.indexOf(`
4634
- `, t) + 1;
4635
- }
4636
- return {
4637
- type: e,
4638
- offset: this.offset,
4639
- indent: this.indent,
4640
- source: this.source
4641
- };
4642
- }
4643
- startBlockValue(e) {
4644
- switch (this.type) {
4645
- case "alias":
4646
- case "scalar":
4647
- case "single-quoted-scalar":
4648
- case "double-quoted-scalar":
4649
- return this.flowScalar(this.type);
4650
- case "block-scalar-header":
4651
- return {
4652
- type: "block-scalar",
4653
- offset: this.offset,
4654
- indent: this.indent,
4655
- props: [this.sourceToken],
4656
- source: ""
4657
- };
4658
- case "flow-map-start":
4659
- case "flow-seq-start":
4660
- return {
4661
- type: "flow-collection",
4662
- offset: this.offset,
4663
- indent: this.indent,
4664
- start: this.sourceToken,
4665
- items: [],
4666
- end: []
4667
- };
4668
- case "seq-item-ind":
4669
- return {
4670
- type: "block-seq",
4671
- offset: this.offset,
4672
- indent: this.indent,
4673
- items: [{ start: [this.sourceToken] }]
4674
- };
4675
- case "explicit-key-ind": {
4676
- this.onKeyLine = !0;
4677
- const t = Ce(e), n = ne(t);
4678
- return n.push(this.sourceToken), {
4679
- type: "block-map",
4680
- offset: this.offset,
4681
- indent: this.indent,
4682
- items: [{ start: n, explicitKey: !0 }]
4683
- };
4684
- }
4685
- case "map-value-ind": {
4686
- this.onKeyLine = !0;
4687
- const t = Ce(e), n = ne(t);
4688
- return {
4689
- type: "block-map",
4690
- offset: this.offset,
4691
- indent: this.indent,
4692
- items: [{ start: n, key: null, sep: [this.sourceToken] }]
4693
- };
4694
- }
4695
- }
4696
- return null;
4697
- }
4698
- atIndentedComment(e, t) {
4699
- return this.type !== "comment" || this.indent <= t ? !1 : e.every((n) => n.type === "newline" || n.type === "space");
4700
- }
4701
- *documentEnd(e) {
4702
- this.type !== "doc-mode" && (e.end ? e.end.push(this.sourceToken) : e.end = [this.sourceToken], this.type === "newline" && (yield* this.pop()));
4703
- }
4704
- *lineEnd(e) {
4705
- switch (this.type) {
4706
- case "comma":
4707
- case "doc-start":
4708
- case "doc-end":
4709
- case "flow-seq-end":
4710
- case "flow-map-end":
4711
- case "map-value-ind":
4712
- yield* this.pop(), yield* this.step();
4713
- break;
4714
- case "newline":
4715
- this.onKeyLine = !1;
4716
- // fallthrough
4717
- case "space":
4718
- case "comment":
4719
- default:
4720
- e.end ? e.end.push(this.sourceToken) : e.end = [this.sourceToken], this.type === "newline" && (yield* this.pop());
4721
- }
4722
- }
4723
- }
4724
- function _s(s) {
4725
- const e = s.prettyErrors !== !1;
4726
- return { lineCounter: s.lineCounter || e && new Ls() || null, prettyErrors: e };
4727
- }
4728
- function qn(s, e = {}) {
4729
- const { lineCounter: t, prettyErrors: n } = _s(e), i = new Tt(t == null ? void 0 : t.addNewLine), r = new It(e), o = Array.from(r.compose(i.parse(s)));
4730
- if (n && t)
4731
- for (const l of o)
4732
- l.errors.forEach(De(s, t)), l.warnings.forEach(De(s, t));
4733
- return o.length > 0 ? o : Object.assign([], { empty: !0 }, r.streamInfo());
4734
- }
4735
- function Cs(s, e = {}) {
4736
- const { lineCounter: t, prettyErrors: n } = _s(e), i = new Tt(t == null ? void 0 : t.addNewLine), r = new It(e);
4737
- let o = null;
4738
- for (const l of r.compose(i.parse(s), !0, s.length))
4739
- if (!o)
4740
- o = l;
4741
- else if (o.options.logLevel !== "silent") {
4742
- o.errors.push(new z(l.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
4743
- break;
4744
- }
4745
- return n && t && (o.errors.forEach(De(s, t)), o.warnings.forEach(De(s, t))), o;
4746
- }
4747
- function Fn(s, e, t) {
4748
- let n;
4749
- typeof e == "function" ? n = e : t === void 0 && e && typeof e == "object" && (t = e);
4750
- const i = Cs(s, t);
4751
- if (!i)
4752
- return null;
4753
- if (i.warnings.forEach((r) => zt(i.options.logLevel, r)), i.errors.length > 0) {
4754
- if (i.options.logLevel !== "silent")
4755
- throw i.errors[0];
4756
- i.errors = [];
4757
- }
4758
- return i.toJS(Object.assign({ reviver: n }, t));
4759
- }
4760
- function Rn(s, e, t) {
4761
- let n = null;
4762
- if (typeof e == "function" || Array.isArray(e) ? n = e : t === void 0 && e && (t = e), typeof t == "string" && (t = t.length), typeof t == "number") {
4763
- const i = Math.round(t);
4764
- t = i < 1 ? void 0 : i > 8 ? { indent: 8 } : { indent: i };
4765
- }
4766
- if (s === void 0) {
4767
- const { keepUndefined: i } = t ?? e ?? {};
4768
- if (!i)
4769
- return;
4770
- }
4771
- return ee(s) && !n ? s.toString(t) : new ge(s, n, t).toString(t);
4772
- }
4773
- const Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4774
- __proto__: null,
4775
- Alias: Re,
4776
- CST: Pn,
4777
- Composer: It,
4778
- Document: ge,
4779
- Lexer: Ts,
4780
- LineCounter: Ls,
4781
- Pair: v,
4782
- Parser: Tt,
4783
- Scalar: A,
4784
- Schema: Xe,
4785
- YAMLError: At,
4786
- YAMLMap: K,
4787
- YAMLParseError: z,
4788
- YAMLSeq: Q,
4789
- YAMLWarning: ys,
4790
- isAlias: x,
4791
- isCollection: L,
4792
- isDocument: ee,
4793
- isMap: de,
4794
- isNode: $,
4795
- isPair: T,
4796
- isScalar: E,
4797
- isSeq: pe,
4798
- parse: Fn,
4799
- parseAllDocuments: qn,
4800
- parseDocument: Cs,
4801
- stringify: Rn,
4802
- visit: G,
4803
- visitAsync: Fe
4804
- }, Symbol.toStringTag, { value: "Module" }));
4805
- export {
4806
- Re as Alias,
4807
- Pn as CST,
4808
- It as Composer,
4809
- ge as Document,
4810
- Ts as Lexer,
4811
- Ls as LineCounter,
4812
- v as Pair,
4813
- Tt as Parser,
4814
- A as Scalar,
4815
- Xe as Schema,
4816
- At as YAMLError,
4817
- K as YAMLMap,
4818
- z as YAMLParseError,
4819
- Q as YAMLSeq,
4820
- ys as YAMLWarning,
4821
- Un as default,
4822
- x as isAlias,
4823
- L as isCollection,
4824
- ee as isDocument,
4825
- de as isMap,
4826
- $ as isNode,
4827
- T as isPair,
4828
- E as isScalar,
4829
- pe as isSeq,
4830
- Fn as parse,
4831
- qn as parseAllDocuments,
4832
- Cs as parseDocument,
4833
- Rn as stringify,
4834
- G as visit,
4835
- Fe as visitAsync
4836
- };
4837
- //# sourceMappingURL=index-Dl3Yl0yb.js.map