zudoku 0.42.0 → 0.42.2

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 (552) hide show
  1. package/dist/app/main.js +0 -6
  2. package/dist/app/main.js.map +1 -1
  3. package/dist/config/validators/common.d.ts +288 -420
  4. package/dist/config/validators/common.js +0 -10
  5. package/dist/config/validators/common.js.map +1 -1
  6. package/dist/config/validators/validate.d.ts +108 -161
  7. package/dist/index.d.ts +0 -1
  8. package/dist/index.js +0 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/lib/authentication/components/SignIn.d.ts +1 -1
  11. package/dist/lib/authentication/components/SignIn.js +5 -2
  12. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  13. package/dist/lib/authentication/components/SignUp.d.ts +1 -1
  14. package/dist/lib/authentication/components/SignUp.js +4 -1
  15. package/dist/lib/authentication/components/SignUp.js.map +1 -1
  16. package/dist/lib/components/Markdown.d.ts +1 -3
  17. package/dist/lib/components/Markdown.js +14 -8
  18. package/dist/lib/components/Markdown.js.map +1 -1
  19. package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
  20. package/dist/lib/components/index.d.ts +1 -2
  21. package/dist/lib/core/ZudokuContext.d.ts +0 -7
  22. package/dist/lib/core/ZudokuContext.js.map +1 -1
  23. package/dist/lib/errors/ErrorAlert.js +1 -1
  24. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  25. package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
  26. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  27. package/dist/lib/plugins/openapi/ParameterListItem.js +8 -1
  28. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  29. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  30. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  31. package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
  32. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  33. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +5 -3
  34. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  35. package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
  36. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  37. package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
  38. package/dist/lib/plugins/openapi/schema/utils.js +3 -0
  39. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  40. package/dist/lib/ui/Callout.js +1 -1
  41. package/dist/lib/ui/Callout.js.map +1 -1
  42. package/dist/lib/ui/SyntaxHighlight.d.ts +15 -10
  43. package/dist/lib/ui/SyntaxHighlight.js +60 -10
  44. package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
  45. package/dist/lib/util/MdxComponents.d.ts +3 -9
  46. package/dist/lib/util/MdxComponents.js +10 -9
  47. package/dist/lib/util/MdxComponents.js.map +1 -1
  48. package/dist/vite/config.js +0 -34
  49. package/dist/vite/config.js.map +1 -1
  50. package/dist/vite/plugin-mdx.js +11 -4
  51. package/dist/vite/plugin-mdx.js.map +1 -1
  52. package/dist/vite/plugin.js +0 -2
  53. package/dist/vite/plugin.js.map +1 -1
  54. package/lib/AuthenticationPlugin-ByDF051g.js +99 -0
  55. package/lib/AuthenticationPlugin-ByDF051g.js.map +1 -0
  56. package/lib/{Button-Bdk_Ij3U.js → Button-BBNrKpQd.js} +3 -3
  57. package/lib/{Button-Bdk_Ij3U.js.map → Button-BBNrKpQd.js.map} +1 -1
  58. package/lib/{Callout-XadUe37J.js → Callout-D3Ja4OPX.js} +12 -12
  59. package/lib/{Callout-XadUe37J.js.map → Callout-D3Ja4OPX.js.map} +1 -1
  60. package/lib/Card-BtheiD7j.js +61 -0
  61. package/lib/Card-BtheiD7j.js.map +1 -0
  62. package/lib/{CategoryHeading-DZi-Szor.js → CategoryHeading-D06WK_Wo.js} +2 -2
  63. package/lib/{CategoryHeading-DZi-Szor.js.map → CategoryHeading-D06WK_Wo.js.map} +1 -1
  64. package/lib/{Dialog-CNf2oWXG.js → Dialog-ByYz4ABw.js} +2 -2
  65. package/lib/{Dialog-CNf2oWXG.js.map → Dialog-ByYz4ABw.js.map} +1 -1
  66. package/lib/{Drawer-BPBxzel2.js → Drawer-CEwbkLDb.js} +25 -25
  67. package/lib/{Drawer-BPBxzel2.js.map → Drawer-CEwbkLDb.js.map} +1 -1
  68. package/lib/Markdown-mFpg_n9p.js +17125 -0
  69. package/lib/Markdown-mFpg_n9p.js.map +1 -0
  70. package/lib/MdxPage-Cm7atiW3.js +85 -0
  71. package/lib/{MdxPage-Dxbq6lFr.js.map → MdxPage-Cm7atiW3.js.map} +1 -1
  72. package/lib/{OasProvider-DKpTJMH2.js → OasProvider-CDtbrUG_.js} +4 -4
  73. package/lib/{OasProvider-DKpTJMH2.js.map → OasProvider-CDtbrUG_.js.map} +1 -1
  74. package/lib/{OperationList-DVOyNeno.js → OperationList-DTyJIxKW.js} +1967 -1914
  75. package/lib/OperationList-DTyJIxKW.js.map +1 -0
  76. package/lib/{Pagination-COMmV-g9.js → Pagination-DLPL5z77.js} +4 -4
  77. package/lib/{Pagination-COMmV-g9.js.map → Pagination-DLPL5z77.js.map} +1 -1
  78. package/lib/RouteGuard-DRtEu9nh.js +744 -0
  79. package/lib/{RouteGuard-CGqivwrh.js.map → RouteGuard-DRtEu9nh.js.map} +1 -1
  80. package/lib/{SchemaList-BTWzXyYQ.js → SchemaList-B9lvArDe.js} +44 -43
  81. package/lib/{SchemaList-BTWzXyYQ.js.map → SchemaList-B9lvArDe.js.map} +1 -1
  82. package/lib/{SchemaView-DNKKW3nB.js → SchemaView-DXjql-Bl.js} +111 -108
  83. package/lib/SchemaView-DXjql-Bl.js.map +1 -0
  84. package/lib/Select-CT64Ou40.js +223 -0
  85. package/lib/{Select-m-ITdvFa.js.map → Select-CT64Ou40.js.map} +1 -1
  86. package/lib/SlotletProvider-CS_nO-XT.js +340 -0
  87. package/lib/SlotletProvider-CS_nO-XT.js.map +1 -0
  88. package/lib/SyntaxHighlight-CxhyyMkF.js +2890 -0
  89. package/lib/SyntaxHighlight-CxhyyMkF.js.map +1 -0
  90. package/lib/{Toc-CzMOgcPS.js → Toc-D_tV8_Ri.js} +3 -3
  91. package/lib/{Toc-CzMOgcPS.js.map → Toc-D_tV8_Ri.js.map} +1 -1
  92. package/lib/{chunk-BAXFHI7N-CFrZQ7Oh.js → chunk-BAXFHI7N-BVBOl9s0.js} +264 -257
  93. package/lib/{chunk-BAXFHI7N-CFrZQ7Oh.js.map → chunk-BAXFHI7N-BVBOl9s0.js.map} +1 -1
  94. package/lib/{circular-D__GEK2G.js → circular-ByJI6Mci.js} +47 -47
  95. package/lib/{circular-D__GEK2G.js.map → circular-ByJI6Mci.js.map} +1 -1
  96. package/lib/{cn-CwJPJKOE.js → cn-qaFjX9_3.js} +29 -28
  97. package/lib/{cn-CwJPJKOE.js.map → cn-qaFjX9_3.js.map} +1 -1
  98. package/lib/{createServer-B4l2NSkt.js → createServer-IW7v5hWm.js} +3868 -3724
  99. package/lib/{createServer-B4l2NSkt.js.map → createServer-IW7v5hWm.js.map} +1 -1
  100. package/lib/hook-CldJlP5c.js +1478 -0
  101. package/lib/{hook-CyNmcNr8.js.map → hook-CldJlP5c.js.map} +1 -1
  102. package/lib/{index-Z13x6tPX.js → index-CPNSgwSb.js} +5 -5
  103. package/lib/{index-Z13x6tPX.js.map → index-CPNSgwSb.js.map} +1 -1
  104. package/lib/{index-CCS3ifKs.js → index-Ckl3s_w-.js} +763 -769
  105. package/lib/index-Ckl3s_w-.js.map +1 -0
  106. package/lib/{index-CrcNWbel.js → index-CuBIgTKC.js} +9 -9
  107. package/lib/{index-CrcNWbel.js.map → index-CuBIgTKC.js.map} +1 -1
  108. package/lib/{index-zddirpDj.js → index-DcHeSvkE.js} +609 -581
  109. package/lib/{index-zddirpDj.js.map → index-DcHeSvkE.js.map} +1 -1
  110. package/lib/index-DnQftvP4.js +5031 -0
  111. package/lib/{index-BcMPFdRU.js.map → index-DnQftvP4.js.map} +1 -1
  112. package/lib/{index--oeBayMa.js → index-DwT-v3zK.js} +2 -2
  113. package/lib/{index--oeBayMa.js.map → index-DwT-v3zK.js.map} +1 -1
  114. package/lib/{index-BvvmIczU.js → index-LNp6rxyU.js} +2 -2
  115. package/lib/{index-BvvmIczU.js.map → index-LNp6rxyU.js.map} +1 -1
  116. package/lib/invariant-Caa8-XvF.js +26 -0
  117. package/lib/{invariant-D3QcI9fa.js.map → invariant-Caa8-XvF.js.map} +1 -1
  118. package/lib/mutation-DBQh7AOZ.js +211 -0
  119. package/lib/{mutation-narTVsCe.js.map → mutation-DBQh7AOZ.js.map} +1 -1
  120. package/lib/prism-bash.min-HHIMdNJ_.js +7 -0
  121. package/lib/prism-bash.min-HHIMdNJ_.js.map +1 -0
  122. package/lib/prism-csharp.min-C43x1RY2.js +63 -0
  123. package/lib/prism-csharp.min-C43x1RY2.js.map +1 -0
  124. package/lib/prism-java.min-CQzr40NQ.js +35 -0
  125. package/lib/prism-java.min-CQzr40NQ.js.map +1 -0
  126. package/lib/prism-javascript.min-CEqHqgbm.js +9 -0
  127. package/lib/prism-javascript.min-CEqHqgbm.js.map +1 -0
  128. package/lib/prism-json.min-B1GJqK1k.js +2 -0
  129. package/lib/prism-json.min-B1GJqK1k.js.map +1 -0
  130. package/lib/prism-jsstacktrace.min-BfobCF2F.js +2 -0
  131. package/lib/prism-jsstacktrace.min-BfobCF2F.js.map +1 -0
  132. package/lib/prism-markdown.min-C0Qn0m-5.js +61 -0
  133. package/lib/prism-markdown.min-C0Qn0m-5.js.map +1 -0
  134. package/lib/prism-markup-BNGj0Tvm.js +174 -0
  135. package/lib/prism-markup-BNGj0Tvm.js.map +1 -0
  136. package/lib/prism-objectivec.min-BXSWqpJJ.js +2 -0
  137. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -0
  138. package/lib/prism-ruby.min-L9OdQ6tU.js +38 -0
  139. package/lib/prism-ruby.min-L9OdQ6tU.js.map +1 -0
  140. package/lib/prism-typescript.min-qTySPvCh.js +34 -0
  141. package/lib/prism-typescript.min-qTySPvCh.js.map +1 -0
  142. package/lib/processors/removeParameters.js +28 -27
  143. package/lib/processors/removeParameters.js.map +1 -1
  144. package/lib/processors/removePaths.js +17 -17
  145. package/lib/processors/removePaths.js.map +1 -1
  146. package/lib/ui/Accordion.js +1 -1
  147. package/lib/ui/ActionButton.js +2 -2
  148. package/lib/ui/Alert.js +2 -2
  149. package/lib/ui/AlertDialog.js +1 -1
  150. package/lib/ui/Badge.js +2 -2
  151. package/lib/ui/Breadcrumb.js +1 -1
  152. package/lib/ui/Button.js +2 -2
  153. package/lib/ui/Callout.js +7 -7
  154. package/lib/ui/Callout.js.map +1 -1
  155. package/lib/ui/Card.js +1 -1
  156. package/lib/ui/Carousel.js +175 -175
  157. package/lib/ui/Carousel.js.map +1 -1
  158. package/lib/ui/Checkbox.js +1 -1
  159. package/lib/ui/Command.js +58 -58
  160. package/lib/ui/Command.js.map +1 -1
  161. package/lib/ui/Dialog.js +1 -1
  162. package/lib/ui/Drawer.js +2 -2
  163. package/lib/ui/DropdownMenu.js +1 -1
  164. package/lib/ui/Form.js +1 -1
  165. package/lib/ui/HoverCard.js +1 -1
  166. package/lib/ui/Input.js +1 -1
  167. package/lib/ui/Label.js +2 -2
  168. package/lib/ui/Pagination.js +1 -1
  169. package/lib/ui/Popover.js +1 -1
  170. package/lib/ui/Progress.js +1 -1
  171. package/lib/ui/RadioGroup.js +1 -1
  172. package/lib/ui/ScrollArea.js +1 -1
  173. package/lib/ui/Select.js +1 -1
  174. package/lib/ui/Skeleton.js +1 -1
  175. package/lib/ui/Slider.js +1 -1
  176. package/lib/ui/Switch.js +1 -1
  177. package/lib/ui/SyntaxHighlight.js +6 -4
  178. package/lib/ui/SyntaxHighlight.js.map +1 -1
  179. package/lib/ui/Tabs.js +1 -1
  180. package/lib/ui/Textarea.js +1 -1
  181. package/lib/ui/Toggle.js +2 -2
  182. package/lib/ui/ToggleGroup.js +1 -1
  183. package/lib/ui/Tooltip.js +1 -1
  184. package/lib/ui/util.js +1 -1
  185. package/lib/{useExposedProps-n1u49409.js → useExposedProps-DbIZXspi.js} +2 -2
  186. package/lib/{useExposedProps-n1u49409.js.map → useExposedProps-DbIZXspi.js.map} +1 -1
  187. package/lib/zudoku.auth-auth0.js +31 -28
  188. package/lib/zudoku.auth-auth0.js.map +1 -1
  189. package/lib/zudoku.auth-clerk.js +68 -62
  190. package/lib/zudoku.auth-clerk.js.map +1 -1
  191. package/lib/zudoku.auth-openid.js +483 -475
  192. package/lib/zudoku.auth-openid.js.map +1 -1
  193. package/lib/zudoku.components.js +7 -7
  194. package/lib/zudoku.hooks.js +2 -2
  195. package/lib/zudoku.plugin-api-catalog.js +45 -45
  196. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  197. package/lib/zudoku.plugin-api-keys.js +6 -6
  198. package/lib/zudoku.plugin-custom-pages.js +3 -3
  199. package/lib/zudoku.plugin-markdown.js +28 -25
  200. package/lib/zudoku.plugin-markdown.js.map +1 -1
  201. package/lib/zudoku.plugin-openapi.js +3 -3
  202. package/lib/zudoku.plugin-redirect.js +1 -1
  203. package/lib/zudoku.plugin-search-inkeep.js +27 -26
  204. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  205. package/lib/zudoku.plugin-search-pagefind.js +110 -107
  206. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  207. package/package.json +7 -17
  208. package/src/app/main.css +3 -53
  209. package/src/app/main.tsx +0 -7
  210. package/src/lib/authentication/components/SignIn.tsx +35 -2
  211. package/src/lib/authentication/components/SignUp.tsx +35 -1
  212. package/src/lib/components/Markdown.tsx +24 -29
  213. package/src/lib/core/ZudokuContext.ts +0 -4
  214. package/src/lib/errors/ErrorAlert.tsx +1 -1
  215. package/src/lib/plugins/openapi/CollapsibleCode.tsx +2 -5
  216. package/src/lib/plugins/openapi/ParameterListItem.tsx +30 -0
  217. package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
  218. package/src/lib/plugins/openapi/SidecarExamples.tsx +2 -2
  219. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +7 -4
  220. package/src/lib/plugins/openapi/schema/SchemaView.tsx +1 -6
  221. package/src/lib/plugins/openapi/schema/utils.ts +5 -0
  222. package/src/lib/ui/Callout.tsx +1 -1
  223. package/src/lib/ui/SyntaxHighlight.tsx +182 -18
  224. package/src/lib/util/MdxComponents.tsx +14 -27
  225. package/dist/lib/shiki.d.ts +0 -35
  226. package/dist/lib/shiki.js +0 -103
  227. package/dist/lib/shiki.js.map +0 -1
  228. package/dist/lib/ui/CodeBlock.d.ts +0 -16
  229. package/dist/lib/ui/CodeBlock.js +0 -18
  230. package/dist/lib/ui/CodeBlock.js.map +0 -1
  231. package/dist/vite/plugin-shiki-register.d.ts +0 -3
  232. package/dist/vite/plugin-shiki-register.js +0 -38
  233. package/dist/vite/plugin-shiki-register.js.map +0 -1
  234. package/lib/AuthenticationPlugin-EeQpQI3D.js +0 -55
  235. package/lib/AuthenticationPlugin-EeQpQI3D.js.map +0 -1
  236. package/lib/Markdown-1l-DtDbF.js +0 -7688
  237. package/lib/Markdown-1l-DtDbF.js.map +0 -1
  238. package/lib/MdxPage-Dxbq6lFr.js +0 -84
  239. package/lib/OperationList-DVOyNeno.js.map +0 -1
  240. package/lib/RouteGuard-CGqivwrh.js +0 -733
  241. package/lib/SchemaView-DNKKW3nB.js.map +0 -1
  242. package/lib/Select-m-ITdvFa.js +0 -211
  243. package/lib/SlotletProvider-DhK1Fmm9.js +0 -254
  244. package/lib/SlotletProvider-DhK1Fmm9.js.map +0 -1
  245. package/lib/SyntaxHighlight-CJ6FoYvt.js +0 -9104
  246. package/lib/SyntaxHighlight-CJ6FoYvt.js.map +0 -1
  247. package/lib/hook-CyNmcNr8.js +0 -1443
  248. package/lib/index-BcMPFdRU.js +0 -4975
  249. package/lib/index-CCS3ifKs.js.map +0 -1
  250. package/lib/invariant-D3QcI9fa.js +0 -22
  251. package/lib/mutation-narTVsCe.js +0 -196
  252. package/lib/ui/CodeBlock.js +0 -83
  253. package/lib/ui/CodeBlock.js.map +0 -1
  254. package/src/lib/shiki.ts +0 -129
  255. package/src/lib/ui/CodeBlock.tsx +0 -102
  256. package/src/shiki/langs/abap.js +0 -1
  257. package/src/shiki/langs/actionscript-3.js +0 -1
  258. package/src/shiki/langs/ada.js +0 -1
  259. package/src/shiki/langs/angular-expression.js +0 -1
  260. package/src/shiki/langs/angular-html.js +0 -1
  261. package/src/shiki/langs/angular-inline-style.js +0 -1
  262. package/src/shiki/langs/angular-inline-template.js +0 -1
  263. package/src/shiki/langs/angular-let-declaration.js +0 -1
  264. package/src/shiki/langs/angular-template-blocks.js +0 -1
  265. package/src/shiki/langs/angular-template.js +0 -1
  266. package/src/shiki/langs/angular-ts.js +0 -1
  267. package/src/shiki/langs/apache.js +0 -1
  268. package/src/shiki/langs/apex.js +0 -1
  269. package/src/shiki/langs/apl.js +0 -1
  270. package/src/shiki/langs/applescript.js +0 -1
  271. package/src/shiki/langs/ara.js +0 -1
  272. package/src/shiki/langs/asciidoc.js +0 -1
  273. package/src/shiki/langs/asm.js +0 -1
  274. package/src/shiki/langs/astro.js +0 -1
  275. package/src/shiki/langs/awk.js +0 -1
  276. package/src/shiki/langs/ballerina.js +0 -1
  277. package/src/shiki/langs/bat.js +0 -1
  278. package/src/shiki/langs/beancount.js +0 -1
  279. package/src/shiki/langs/berry.js +0 -1
  280. package/src/shiki/langs/bibtex.js +0 -1
  281. package/src/shiki/langs/bicep.js +0 -1
  282. package/src/shiki/langs/blade.js +0 -1
  283. package/src/shiki/langs/bsl.js +0 -1
  284. package/src/shiki/langs/c.js +0 -1
  285. package/src/shiki/langs/cadence.js +0 -1
  286. package/src/shiki/langs/cairo.js +0 -1
  287. package/src/shiki/langs/clarity.js +0 -1
  288. package/src/shiki/langs/clojure.js +0 -1
  289. package/src/shiki/langs/cmake.js +0 -1
  290. package/src/shiki/langs/cobol.js +0 -1
  291. package/src/shiki/langs/codeowners.js +0 -1
  292. package/src/shiki/langs/codeql.js +0 -1
  293. package/src/shiki/langs/coffee.js +0 -1
  294. package/src/shiki/langs/common-lisp.js +0 -1
  295. package/src/shiki/langs/coq.js +0 -1
  296. package/src/shiki/langs/cpp-macro.js +0 -1
  297. package/src/shiki/langs/cpp.js +0 -1
  298. package/src/shiki/langs/crystal.js +0 -1
  299. package/src/shiki/langs/csharp.js +0 -1
  300. package/src/shiki/langs/css.js +0 -1
  301. package/src/shiki/langs/csv.js +0 -1
  302. package/src/shiki/langs/cue.js +0 -1
  303. package/src/shiki/langs/cypher.js +0 -1
  304. package/src/shiki/langs/d.js +0 -1
  305. package/src/shiki/langs/dart.js +0 -1
  306. package/src/shiki/langs/dax.js +0 -1
  307. package/src/shiki/langs/desktop.js +0 -1
  308. package/src/shiki/langs/diff.js +0 -1
  309. package/src/shiki/langs/docker.js +0 -1
  310. package/src/shiki/langs/dotenv.js +0 -1
  311. package/src/shiki/langs/dream-maker.js +0 -1
  312. package/src/shiki/langs/edge.js +0 -1
  313. package/src/shiki/langs/elixir.js +0 -1
  314. package/src/shiki/langs/elm.js +0 -1
  315. package/src/shiki/langs/emacs-lisp.js +0 -1
  316. package/src/shiki/langs/erb.js +0 -1
  317. package/src/shiki/langs/erlang.js +0 -1
  318. package/src/shiki/langs/es-tag-css.js +0 -1
  319. package/src/shiki/langs/es-tag-glsl.js +0 -1
  320. package/src/shiki/langs/es-tag-html.js +0 -1
  321. package/src/shiki/langs/es-tag-sql.js +0 -1
  322. package/src/shiki/langs/es-tag-xml.js +0 -1
  323. package/src/shiki/langs/fennel.js +0 -1
  324. package/src/shiki/langs/fish.js +0 -1
  325. package/src/shiki/langs/fluent.js +0 -1
  326. package/src/shiki/langs/fortran-fixed-form.js +0 -1
  327. package/src/shiki/langs/fortran-free-form.js +0 -1
  328. package/src/shiki/langs/fsharp.js +0 -1
  329. package/src/shiki/langs/gdresource.js +0 -1
  330. package/src/shiki/langs/gdscript.js +0 -1
  331. package/src/shiki/langs/gdshader.js +0 -1
  332. package/src/shiki/langs/genie.js +0 -1
  333. package/src/shiki/langs/gherkin.js +0 -1
  334. package/src/shiki/langs/git-commit.js +0 -1
  335. package/src/shiki/langs/git-rebase.js +0 -1
  336. package/src/shiki/langs/gleam.js +0 -1
  337. package/src/shiki/langs/glimmer-js.js +0 -1
  338. package/src/shiki/langs/glimmer-ts.js +0 -1
  339. package/src/shiki/langs/glsl.js +0 -1
  340. package/src/shiki/langs/gnuplot.js +0 -1
  341. package/src/shiki/langs/go.js +0 -1
  342. package/src/shiki/langs/graphql.js +0 -1
  343. package/src/shiki/langs/groovy.js +0 -1
  344. package/src/shiki/langs/hack.js +0 -1
  345. package/src/shiki/langs/haml.js +0 -1
  346. package/src/shiki/langs/handlebars.js +0 -1
  347. package/src/shiki/langs/haskell.js +0 -1
  348. package/src/shiki/langs/haxe.js +0 -1
  349. package/src/shiki/langs/hcl.js +0 -1
  350. package/src/shiki/langs/hjson.js +0 -1
  351. package/src/shiki/langs/hlsl.js +0 -1
  352. package/src/shiki/langs/html-derivative.js +0 -1
  353. package/src/shiki/langs/html.js +0 -1
  354. package/src/shiki/langs/http.js +0 -1
  355. package/src/shiki/langs/hxml.js +0 -1
  356. package/src/shiki/langs/hy.js +0 -1
  357. package/src/shiki/langs/imba.js +0 -1
  358. package/src/shiki/langs/ini.js +0 -1
  359. package/src/shiki/langs/java.js +0 -1
  360. package/src/shiki/langs/javascript.js +0 -1
  361. package/src/shiki/langs/jinja-html.js +0 -1
  362. package/src/shiki/langs/jinja.js +0 -1
  363. package/src/shiki/langs/jison.js +0 -1
  364. package/src/shiki/langs/json.js +0 -1
  365. package/src/shiki/langs/json5.js +0 -1
  366. package/src/shiki/langs/jsonc.js +0 -1
  367. package/src/shiki/langs/jsonl.js +0 -1
  368. package/src/shiki/langs/jsonnet.js +0 -1
  369. package/src/shiki/langs/jssm.js +0 -1
  370. package/src/shiki/langs/jsx.js +0 -1
  371. package/src/shiki/langs/julia.js +0 -1
  372. package/src/shiki/langs/kotlin.js +0 -1
  373. package/src/shiki/langs/kusto.js +0 -1
  374. package/src/shiki/langs/latex.js +0 -1
  375. package/src/shiki/langs/lean.js +0 -1
  376. package/src/shiki/langs/less.js +0 -1
  377. package/src/shiki/langs/liquid.js +0 -1
  378. package/src/shiki/langs/llvm.js +0 -1
  379. package/src/shiki/langs/log.js +0 -1
  380. package/src/shiki/langs/logo.js +0 -1
  381. package/src/shiki/langs/lua.js +0 -1
  382. package/src/shiki/langs/luau.js +0 -1
  383. package/src/shiki/langs/make.js +0 -1
  384. package/src/shiki/langs/markdown-vue.js +0 -1
  385. package/src/shiki/langs/markdown.js +0 -1
  386. package/src/shiki/langs/marko.js +0 -1
  387. package/src/shiki/langs/matlab.js +0 -1
  388. package/src/shiki/langs/mdc.js +0 -1
  389. package/src/shiki/langs/mdx.js +0 -1
  390. package/src/shiki/langs/mermaid.js +0 -1
  391. package/src/shiki/langs/mipsasm.js +0 -1
  392. package/src/shiki/langs/mojo.js +0 -1
  393. package/src/shiki/langs/move.js +0 -1
  394. package/src/shiki/langs/narrat.js +0 -1
  395. package/src/shiki/langs/nextflow.js +0 -1
  396. package/src/shiki/langs/nginx.js +0 -1
  397. package/src/shiki/langs/nim.js +0 -1
  398. package/src/shiki/langs/nix.js +0 -1
  399. package/src/shiki/langs/nushell.js +0 -1
  400. package/src/shiki/langs/objective-c.js +0 -1
  401. package/src/shiki/langs/objective-cpp.js +0 -1
  402. package/src/shiki/langs/ocaml.js +0 -1
  403. package/src/shiki/langs/pascal.js +0 -1
  404. package/src/shiki/langs/perl.js +0 -1
  405. package/src/shiki/langs/php.js +0 -1
  406. package/src/shiki/langs/plsql.js +0 -1
  407. package/src/shiki/langs/po.js +0 -1
  408. package/src/shiki/langs/polar.js +0 -1
  409. package/src/shiki/langs/postcss.js +0 -1
  410. package/src/shiki/langs/powerquery.js +0 -1
  411. package/src/shiki/langs/powershell.js +0 -1
  412. package/src/shiki/langs/prisma.js +0 -1
  413. package/src/shiki/langs/prolog.js +0 -1
  414. package/src/shiki/langs/proto.js +0 -1
  415. package/src/shiki/langs/pug.js +0 -1
  416. package/src/shiki/langs/puppet.js +0 -1
  417. package/src/shiki/langs/purescript.js +0 -1
  418. package/src/shiki/langs/python.js +0 -1
  419. package/src/shiki/langs/qml.js +0 -1
  420. package/src/shiki/langs/qmldir.js +0 -1
  421. package/src/shiki/langs/qss.js +0 -1
  422. package/src/shiki/langs/r.js +0 -1
  423. package/src/shiki/langs/racket.js +0 -1
  424. package/src/shiki/langs/raku.js +0 -1
  425. package/src/shiki/langs/razor.js +0 -1
  426. package/src/shiki/langs/reg.js +0 -1
  427. package/src/shiki/langs/regexp.js +0 -1
  428. package/src/shiki/langs/rel.js +0 -1
  429. package/src/shiki/langs/riscv.js +0 -1
  430. package/src/shiki/langs/rst.js +0 -1
  431. package/src/shiki/langs/ruby.js +0 -1
  432. package/src/shiki/langs/rust.js +0 -1
  433. package/src/shiki/langs/sas.js +0 -1
  434. package/src/shiki/langs/sass.js +0 -1
  435. package/src/shiki/langs/scala.js +0 -1
  436. package/src/shiki/langs/scheme.js +0 -1
  437. package/src/shiki/langs/scss.js +0 -1
  438. package/src/shiki/langs/sdbl.js +0 -1
  439. package/src/shiki/langs/shaderlab.js +0 -1
  440. package/src/shiki/langs/shellscript.js +0 -1
  441. package/src/shiki/langs/shellsession.js +0 -1
  442. package/src/shiki/langs/smalltalk.js +0 -1
  443. package/src/shiki/langs/solidity.js +0 -1
  444. package/src/shiki/langs/soy.js +0 -1
  445. package/src/shiki/langs/sparql.js +0 -1
  446. package/src/shiki/langs/splunk.js +0 -1
  447. package/src/shiki/langs/sql.js +0 -1
  448. package/src/shiki/langs/ssh-config.js +0 -1
  449. package/src/shiki/langs/stata.js +0 -1
  450. package/src/shiki/langs/stylus.js +0 -1
  451. package/src/shiki/langs/svelte.js +0 -1
  452. package/src/shiki/langs/swift.js +0 -1
  453. package/src/shiki/langs/system-verilog.js +0 -1
  454. package/src/shiki/langs/systemd.js +0 -1
  455. package/src/shiki/langs/talonscript.js +0 -1
  456. package/src/shiki/langs/tasl.js +0 -1
  457. package/src/shiki/langs/tcl.js +0 -1
  458. package/src/shiki/langs/templ.js +0 -1
  459. package/src/shiki/langs/terraform.js +0 -1
  460. package/src/shiki/langs/tex.js +0 -1
  461. package/src/shiki/langs/toml.js +0 -1
  462. package/src/shiki/langs/ts-tags.js +0 -1
  463. package/src/shiki/langs/tsv.js +0 -1
  464. package/src/shiki/langs/tsx.js +0 -1
  465. package/src/shiki/langs/turtle.js +0 -1
  466. package/src/shiki/langs/twig.js +0 -1
  467. package/src/shiki/langs/typescript.js +0 -1
  468. package/src/shiki/langs/typespec.js +0 -1
  469. package/src/shiki/langs/typst.js +0 -1
  470. package/src/shiki/langs/v.js +0 -1
  471. package/src/shiki/langs/vala.js +0 -1
  472. package/src/shiki/langs/vb.js +0 -1
  473. package/src/shiki/langs/verilog.js +0 -1
  474. package/src/shiki/langs/vhdl.js +0 -1
  475. package/src/shiki/langs/viml.js +0 -1
  476. package/src/shiki/langs/vue-directives.js +0 -1
  477. package/src/shiki/langs/vue-html.js +0 -1
  478. package/src/shiki/langs/vue-interpolations.js +0 -1
  479. package/src/shiki/langs/vue-sfc-style-variable-injection.js +0 -1
  480. package/src/shiki/langs/vue.js +0 -1
  481. package/src/shiki/langs/vyper.js +0 -1
  482. package/src/shiki/langs/wasm.js +0 -1
  483. package/src/shiki/langs/wenyan.js +0 -1
  484. package/src/shiki/langs/wgsl.js +0 -1
  485. package/src/shiki/langs/wikitext.js +0 -1
  486. package/src/shiki/langs/wit.js +0 -1
  487. package/src/shiki/langs/wolfram.js +0 -1
  488. package/src/shiki/langs/xml.js +0 -1
  489. package/src/shiki/langs/xsl.js +0 -1
  490. package/src/shiki/langs/yaml.js +0 -1
  491. package/src/shiki/langs/zenscript.js +0 -1
  492. package/src/shiki/langs/zig.js +0 -1
  493. package/src/shiki/themes/andromeeda.js +0 -1
  494. package/src/shiki/themes/aurora-x.js +0 -1
  495. package/src/shiki/themes/ayu-dark.js +0 -1
  496. package/src/shiki/themes/catppuccin-frappe.js +0 -1
  497. package/src/shiki/themes/catppuccin-latte.js +0 -1
  498. package/src/shiki/themes/catppuccin-macchiato.js +0 -1
  499. package/src/shiki/themes/catppuccin-mocha.js +0 -1
  500. package/src/shiki/themes/dark-plus.js +0 -1
  501. package/src/shiki/themes/dracula-soft.js +0 -1
  502. package/src/shiki/themes/dracula.js +0 -1
  503. package/src/shiki/themes/everforest-dark.js +0 -1
  504. package/src/shiki/themes/everforest-light.js +0 -1
  505. package/src/shiki/themes/github-dark-default.js +0 -1
  506. package/src/shiki/themes/github-dark-dimmed.js +0 -1
  507. package/src/shiki/themes/github-dark-high-contrast.js +0 -1
  508. package/src/shiki/themes/github-dark.js +0 -1
  509. package/src/shiki/themes/github-light-default.js +0 -1
  510. package/src/shiki/themes/github-light-high-contrast.js +0 -1
  511. package/src/shiki/themes/github-light.js +0 -1
  512. package/src/shiki/themes/gruvbox-dark-hard.js +0 -1
  513. package/src/shiki/themes/gruvbox-dark-medium.js +0 -1
  514. package/src/shiki/themes/gruvbox-dark-soft.js +0 -1
  515. package/src/shiki/themes/gruvbox-light-hard.js +0 -1
  516. package/src/shiki/themes/gruvbox-light-medium.js +0 -1
  517. package/src/shiki/themes/gruvbox-light-soft.js +0 -1
  518. package/src/shiki/themes/houston.js +0 -1
  519. package/src/shiki/themes/kanagawa-dragon.js +0 -1
  520. package/src/shiki/themes/kanagawa-lotus.js +0 -1
  521. package/src/shiki/themes/kanagawa-wave.js +0 -1
  522. package/src/shiki/themes/laserwave.js +0 -1
  523. package/src/shiki/themes/light-plus.js +0 -1
  524. package/src/shiki/themes/material-theme-darker.js +0 -1
  525. package/src/shiki/themes/material-theme-lighter.js +0 -1
  526. package/src/shiki/themes/material-theme-ocean.js +0 -1
  527. package/src/shiki/themes/material-theme-palenight.js +0 -1
  528. package/src/shiki/themes/material-theme.js +0 -1
  529. package/src/shiki/themes/min-dark.js +0 -1
  530. package/src/shiki/themes/min-light.js +0 -1
  531. package/src/shiki/themes/monokai.js +0 -1
  532. package/src/shiki/themes/night-owl.js +0 -1
  533. package/src/shiki/themes/nord.js +0 -1
  534. package/src/shiki/themes/one-dark-pro.js +0 -1
  535. package/src/shiki/themes/one-light.js +0 -1
  536. package/src/shiki/themes/plastic.js +0 -1
  537. package/src/shiki/themes/poimandres.js +0 -1
  538. package/src/shiki/themes/red.js +0 -1
  539. package/src/shiki/themes/rose-pine-dawn.js +0 -1
  540. package/src/shiki/themes/rose-pine-moon.js +0 -1
  541. package/src/shiki/themes/rose-pine.js +0 -1
  542. package/src/shiki/themes/slack-dark.js +0 -1
  543. package/src/shiki/themes/slack-ochin.js +0 -1
  544. package/src/shiki/themes/snazzy-light.js +0 -1
  545. package/src/shiki/themes/solarized-dark.js +0 -1
  546. package/src/shiki/themes/solarized-light.js +0 -1
  547. package/src/shiki/themes/synthwave-84.js +0 -1
  548. package/src/shiki/themes/tokyo-night.js +0 -1
  549. package/src/shiki/themes/vesper.js +0 -1
  550. package/src/shiki/themes/vitesse-black.js +0 -1
  551. package/src/shiki/themes/vitesse-dark.js +0 -1
  552. package/src/shiki/themes/vitesse-light.js +0 -1
@@ -1,7 +1,7 @@
1
- const dt = Symbol.for("yaml.alias"), lt = Symbol.for("yaml.document"), G = Symbol.for("yaml.map"), qt = Symbol.for("yaml.pair"), R = Symbol.for("yaml.scalar"), he = Symbol.for("yaml.seq"), P = Symbol.for("yaml.node.type"), Z = (s) => !!s && typeof s == "object" && s[P] === dt, ee = (s) => !!s && typeof s == "object" && s[P] === lt, de = (s) => !!s && typeof s == "object" && s[P] === G, T = (s) => !!s && typeof s == "object" && s[P] === qt, E = (s) => !!s && typeof s == "object" && s[P] === R, pe = (s) => !!s && typeof s == "object" && s[P] === he;
1
+ const dt = Symbol.for("yaml.alias"), lt = Symbol.for("yaml.document"), G = 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] === G, 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
2
  function L(s) {
3
3
  if (s && typeof s == "object")
4
- switch (s[P]) {
4
+ switch (s[j]) {
5
5
  case G:
6
6
  case he:
7
7
  return !0;
@@ -10,7 +10,7 @@ function L(s) {
10
10
  }
11
11
  function $(s) {
12
12
  if (s && typeof s == "object")
13
- switch (s[P]) {
13
+ switch (s[j]) {
14
14
  case dt:
15
15
  case G:
16
16
  case R:
@@ -112,18 +112,19 @@ function Rt(s) {
112
112
  }, s) : s;
113
113
  }
114
114
  function Ut(s, e, t, n) {
115
+ var i, r, o, l, a;
115
116
  if (typeof t == "function")
116
117
  return t(s, e, n);
117
118
  if (de(e))
118
- return t.Map?.(s, e, n);
119
+ return (i = t.Map) == null ? void 0 : i.call(t, s, e, n);
119
120
  if (pe(e))
120
- return t.Seq?.(s, e, n);
121
+ return (r = t.Seq) == null ? void 0 : r.call(t, s, e, n);
121
122
  if (T(e))
122
- return t.Pair?.(s, e, n);
123
+ return (o = t.Pair) == null ? void 0 : o.call(t, s, e, n);
123
124
  if (E(e))
124
- return t.Scalar?.(s, e, n);
125
- if (Z(e))
126
- return t.Alias?.(s, e, n);
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);
127
128
  }
128
129
  function Vt(s, e, t) {
129
130
  const n = e[e.length - 1];
@@ -134,7 +135,7 @@ function Vt(s, e, t) {
134
135
  else if (ee(n))
135
136
  n.contents = t;
136
137
  else {
137
- const i = Z(n) ? "alias" : "scalar";
138
+ const i = x(n) ? "alias" : "scalar";
138
139
  throw new Error(`Cannot replace node with ${i} parent`);
139
140
  }
140
141
  }
@@ -330,9 +331,9 @@ function oe(s, e, t, n) {
330
331
  }
331
332
  return s.call(e, t, n);
332
333
  }
333
- function j(s, e, t) {
334
+ function P(s, e, t) {
334
335
  if (Array.isArray(s))
335
- return s.map((n, i) => j(n, String(i), t));
336
+ return s.map((n, i) => P(n, String(i), t));
336
337
  if (s && typeof s.toJSON == "function") {
337
338
  if (!t || !vs(s))
338
339
  return s.toJSON(e, t);
@@ -343,11 +344,11 @@ function j(s, e, t) {
343
344
  const i = s.toJSON(e, t);
344
345
  return t.onCreate && t.onCreate(i), i;
345
346
  }
346
- return typeof s == "bigint" && !t?.keep ? Number(s) : s;
347
+ return typeof s == "bigint" && !(t != null && t.keep) ? Number(s) : s;
347
348
  }
348
349
  class pt {
349
350
  constructor(e) {
350
- Object.defineProperty(this, P, { value: e });
351
+ Object.defineProperty(this, j, { value: e });
351
352
  }
352
353
  /** Create a copy of this node. */
353
354
  clone() {
@@ -365,7 +366,7 @@ class pt {
365
366
  mapAsMap: t === !0,
366
367
  mapKeyWarned: !1,
367
368
  maxAliasCount: typeof n == "number" ? n : 100
368
- }, l = j(this, "", o);
369
+ }, l = P(this, "", o);
369
370
  if (typeof i == "function")
370
371
  for (const { count: a, res: c } of o.anchors.values())
371
372
  i(c, a);
@@ -403,7 +404,7 @@ class Re extends pt {
403
404
  throw new ReferenceError(a);
404
405
  }
405
406
  let l = n.get(o);
406
- if (l || (j(o, null, t), l = n.get(o)), !l || l.res === void 0) {
407
+ if (l || (P(o, null, t), l = n.get(o)), !l || l.res === void 0) {
407
408
  const a = "This should not happen: Alias anchor was not resolved?";
408
409
  throw new ReferenceError(a);
409
410
  }
@@ -427,7 +428,7 @@ class Re extends pt {
427
428
  }
428
429
  }
429
430
  function ve(s, e, t) {
430
- if (Z(e)) {
431
+ if (x(e)) {
431
432
  const n = e.resolve(s), i = t && n && t.get(n);
432
433
  return i ? i.count * i.aliasCount : 0;
433
434
  } else if (L(e)) {
@@ -444,38 +445,42 @@ function ve(s, e, t) {
444
445
  return 1;
445
446
  }
446
447
  const Qt = (s) => !s || typeof s != "function" && typeof s != "object";
447
- class O extends pt {
448
+ class A extends pt {
448
449
  constructor(e) {
449
450
  super(R), this.value = e;
450
451
  }
451
452
  toJSON(e, t) {
452
- return t?.keep ? this.value : j(this.value, e, t);
453
+ return t != null && t.keep ? this.value : P(this.value, e, t);
453
454
  }
454
455
  toString() {
455
456
  return String(this.value);
456
457
  }
457
458
  }
458
- O.BLOCK_FOLDED = "BLOCK_FOLDED";
459
- O.BLOCK_LITERAL = "BLOCK_LITERAL";
460
- O.PLAIN = "PLAIN";
461
- O.QUOTE_DOUBLE = "QUOTE_DOUBLE";
462
- O.QUOTE_SINGLE = "QUOTE_SINGLE";
463
- const js = "tag:yaml.org,2002:";
464
- function Ps(s, e, t) {
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) {
465
466
  if (e) {
466
467
  const n = t.filter((r) => r.tag === e), i = n.find((r) => !r.format) ?? n[0];
467
468
  if (!i)
468
469
  throw new Error(`Tag ${e} not found`);
469
470
  return i;
470
471
  }
471
- return t.find((n) => n.identify?.(s) && !n.format);
472
+ return t.find((n) => {
473
+ var i;
474
+ return ((i = n.identify) == null ? void 0 : i.call(n, s)) && !n.format;
475
+ });
472
476
  }
473
477
  function ke(s, e, t) {
478
+ var f, d, h;
474
479
  if (ee(s) && (s = s.contents), $(s))
475
480
  return s;
476
481
  if (T(s)) {
477
- const f = t.schema[G].createNode?.(t.schema, null, t);
478
- return f.items.push(s), f;
482
+ const y = (d = (f = t.schema[G]).createNode) == null ? void 0 : d.call(f, t.schema, null, t);
483
+ return y.items.push(s), y;
479
484
  }
480
485
  (s instanceof String || s instanceof Number || s instanceof Boolean || typeof BigInt < "u" && s instanceof BigInt) && (s = s.valueOf());
481
486
  const { aliasDuplicateObjects: n, onAnchor: i, onTagObj: r, schema: o, sourceObjects: l } = t;
@@ -485,20 +490,20 @@ function ke(s, e, t) {
485
490
  return a.anchor || (a.anchor = i(s)), new Re(a.anchor);
486
491
  a = { anchor: null, node: null }, l.set(s, a);
487
492
  }
488
- e?.startsWith("!!") && (e = js + e.slice(2));
489
- let c = Ps(s, e, o.tags);
493
+ e != null && e.startsWith("!!") && (e = Ps + e.slice(2));
494
+ let c = js(s, e, o.tags);
490
495
  if (!c) {
491
496
  if (s && typeof s.toJSON == "function" && (s = s.toJSON()), !s || typeof s != "object") {
492
- const f = new O(s);
493
- return a && (a.node = f), f;
497
+ const y = new A(s);
498
+ return a && (a.node = y), y;
494
499
  }
495
500
  c = s instanceof Map ? o[G] : Symbol.iterator in Object(s) ? o[he] : o[G];
496
501
  }
497
502
  r && (r(c), delete t.onTagObj);
498
- const d = c?.createNode ? c.createNode(t.schema, s, t) : typeof c?.nodeClass?.from == "function" ? c.nodeClass.from(t.schema, s, t) : new O(s);
499
- return e ? d.tag = e : c.default || (d.tag = c.tag), a && (a.node = d), d;
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;
500
505
  }
501
- function je(s, e, t) {
506
+ function Pe(s, e, t) {
502
507
  let n = t;
503
508
  for (let i = e.length - 1; i >= 0; --i) {
504
509
  const r = e[i];
@@ -550,7 +555,7 @@ class Wt extends pt {
550
555
  if (L(r))
551
556
  r.addIn(i, t);
552
557
  else if (r === void 0 && this.schema)
553
- this.set(n, je(this.schema, i, t));
558
+ this.set(n, Pe(this.schema, i, t));
554
559
  else
555
560
  throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`);
556
561
  }
@@ -608,7 +613,7 @@ class Wt extends pt {
608
613
  if (L(r))
609
614
  r.setIn(i, t);
610
615
  else if (r === void 0 && this.schema)
611
- this.set(n, je(this.schema, i, t));
616
+ this.set(n, Pe(this.schema, i, t));
612
617
  else
613
618
  throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`);
614
619
  }
@@ -629,64 +634,64 @@ function Ue(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
629
634
  const a = Math.max(1 + r, 1 + i - e.length);
630
635
  if (s.length <= a)
631
636
  return s;
632
- const c = [], d = {};
637
+ const c = [], p = {};
633
638
  let f = i - e.length;
634
639
  typeof n == "number" && (n > i - Math.max(2, r) ? c.push(0) : f = i - n);
635
- let u, m, y = !1, h = -1, p = -1, b = -1;
636
- t === at && (h = $t(s, h, e.length), h !== -1 && (f = h + a));
637
- for (let S; S = s[h += 1]; ) {
638
- if (t === Be && S === "\\") {
639
- switch (p = h, s[h + 1]) {
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]) {
640
645
  case "x":
641
- h += 3;
646
+ u += 3;
642
647
  break;
643
648
  case "u":
644
- h += 5;
649
+ u += 5;
645
650
  break;
646
651
  case "U":
647
- h += 9;
652
+ u += 9;
648
653
  break;
649
654
  default:
650
- h += 1;
655
+ u += 1;
651
656
  }
652
- b = h;
657
+ b = u;
653
658
  }
654
- if (S === `
659
+ if (N === `
655
660
  `)
656
- t === at && (h = $t(s, h, e.length)), f = h + e.length + a, u = void 0;
661
+ t === at && (u = $t(s, u, e.length)), f = u + e.length + a, d = void 0;
657
662
  else {
658
- if (S === " " && m && m !== " " && m !== `
659
- ` && m !== " ") {
660
- const k = s[h + 1];
661
- k && k !== " " && k !== `
662
- ` && k !== " " && (u = h);
663
+ if (N === " " && h && h !== " " && h !== `
664
+ ` && h !== " ") {
665
+ const w = s[u + 1];
666
+ w && w !== " " && w !== `
667
+ ` && w !== " " && (d = u);
663
668
  }
664
- if (h >= f)
665
- if (u)
666
- c.push(u), f = u + a, u = void 0;
669
+ if (u >= f)
670
+ if (d)
671
+ c.push(d), f = d + a, d = void 0;
667
672
  else if (t === Be) {
668
- for (; m === " " || m === " "; )
669
- m = S, S = s[h += 1], y = !0;
670
- const k = h > b + 1 ? h - 2 : p - 1;
671
- if (d[k])
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])
672
677
  return s;
673
- c.push(k), d[k] = !0, f = k + a, u = void 0;
678
+ c.push(w), p[w] = !0, f = w + a, d = void 0;
674
679
  } else
675
680
  y = !0;
676
681
  }
677
- m = S;
682
+ h = N;
678
683
  }
679
684
  if (y && l && l(), c.length === 0)
680
685
  return s;
681
686
  o && o();
682
- let w = s.slice(0, c[0]);
683
- for (let S = 0; S < c.length; ++S) {
684
- const k = c[S], N = c[S + 1] || s.length;
685
- k === 0 ? w = `
686
- ${e}${s.slice(0, N)}` : (t === Be && d[k] && (w += `${s[k]}\\`), w += `
687
- ${e}${s.slice(k + 1, N)}`);
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)}`);
688
693
  }
689
- return w;
694
+ return S;
690
695
  }
691
696
  function $t(s, e, t) {
692
697
  let n = e, i = e + 1, r = s[i];
@@ -735,8 +740,8 @@ function Se(s, e) {
735
740
  case "u":
736
741
  {
737
742
  o += t.slice(l, a);
738
- const d = t.substr(a + 2, 4);
739
- switch (d) {
743
+ const p = t.substr(a + 2, 4);
744
+ switch (p) {
740
745
  case "0000":
741
746
  o += "\\0";
742
747
  break;
@@ -762,7 +767,7 @@ function Se(s, e) {
762
767
  o += "\\P";
763
768
  break;
764
769
  default:
765
- d.substr(0, 2) === "00" ? o += "\\x" + d.substr(2) : o += t.substr(a, 6);
770
+ p.substr(0, 2) === "00" ? o += "\\x" + p.substr(2) : o += t.substr(a, 6);
766
771
  }
767
772
  a += 5, l = a + 1;
768
773
  }
@@ -816,62 +821,62 @@ function Me({ comment: s, type: e, value: t }, n, i, r) {
816
821
  const { blockQuote: o, commentString: l, lineWidth: a } = n.options;
817
822
  if (!o || /\n[\t ]+$/.test(t) || /^\s*$/.test(t))
818
823
  return le(t, n);
819
- const c = n.indent || (n.forceBlockIndent || Je(t) ? " " : ""), d = o === "literal" ? !0 : o === "folded" || e === O.BLOCK_FOLDED ? !1 : e === O.BLOCK_LITERAL ? !0 : !qs(t, a, c.length);
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);
820
825
  if (!t)
821
- return d ? `|
826
+ return p ? `|
822
827
  ` : `>
823
828
  `;
824
- let f, u;
825
- for (u = t.length; u > 0; --u) {
826
- const N = t[u - 1];
827
- if (N !== `
828
- ` && N !== " " && N !== " ")
829
+ let f, d;
830
+ for (d = t.length; d > 0; --d) {
831
+ const k = t[d - 1];
832
+ if (k !== `
833
+ ` && k !== " " && k !== " ")
829
834
  break;
830
835
  }
831
- let m = t.substring(u);
832
- const y = m.indexOf(`
836
+ let h = t.substring(d);
837
+ const y = h.indexOf(`
833
838
  `);
834
- y === -1 ? f = "-" : t === m || y !== m.length - 1 ? (f = "+", r && r()) : f = "", m && (t = t.slice(0, -m.length), m[m.length - 1] === `
835
- ` && (m = m.slice(0, -1)), m = m.replace(ft, `$&${c}`));
836
- let h = !1, p, b = -1;
837
- for (p = 0; p < t.length; ++p) {
838
- const N = t[p];
839
- if (N === " ")
840
- h = !0;
841
- else if (N === `
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 === `
842
847
  `)
843
- b = p;
848
+ b = m;
844
849
  else
845
850
  break;
846
851
  }
847
- let w = t.substring(0, b < p ? b + 1 : p);
848
- w && (t = t.substring(w.length), w = w.replace(/\n+/g, `$&${c}`));
849
- let k = (h ? c ? "2" : "1" : "") + f;
850
- if (s && (k += " " + l(s.replace(/ ?[\r\n]+/g, " ")), i && i()), !d) {
851
- const N = t.replace(/\n+/g, `
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, `
852
857
  $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${c}`);
853
- let A = !1;
858
+ let O = !1;
854
859
  const I = Ve(n, !0);
855
- o !== "folded" && e !== O.BLOCK_FOLDED && (I.onOverflow = () => {
856
- A = !0;
860
+ o !== "folded" && e !== A.BLOCK_FOLDED && (I.onOverflow = () => {
861
+ O = !0;
857
862
  });
858
- const g = Ue(`${w}${N}${m}`, c, at, I);
859
- if (!A)
860
- return `>${k}
863
+ const g = Ue(`${S}${k}${h}`, c, at, I);
864
+ if (!O)
865
+ return `>${w}
861
866
  ${c}${g}`;
862
867
  }
863
- return t = t.replace(/\n+/g, `$&${c}`), `|${k}
864
- ${c}${w}${t}${m}`;
868
+ return t = t.replace(/\n+/g, `$&${c}`), `|${w}
869
+ ${c}${S}${t}${h}`;
865
870
  }
866
871
  function Fs(s, e, t, n) {
867
- const { type: i, value: r } = s, { actualString: o, implicitKey: l, indent: a, indentStep: c, inFlow: d } = e;
872
+ const { type: i, value: r } = s, { actualString: o, implicitKey: l, indent: a, indentStep: c, inFlow: p } = e;
868
873
  if (l && r.includes(`
869
- `) || d && /[[\]{},]/.test(r))
874
+ `) || p && /[[\]{},]/.test(r))
870
875
  return le(r, e);
871
876
  if (!r || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))
872
- return l || d || !r.includes(`
877
+ return l || p || !r.includes(`
873
878
  `) ? le(r, e) : Me(s, e, t, n);
874
- if (!l && !d && i !== O.PLAIN && r.includes(`
879
+ if (!l && !p && i !== A.PLAIN && r.includes(`
875
880
  `))
876
881
  return Me(s, e, t, n);
877
882
  if (Je(r)) {
@@ -883,8 +888,11 @@ function Fs(s, e, t, n) {
883
888
  const f = r.replace(/\n+/g, `$&
884
889
  ${a}`);
885
890
  if (o) {
886
- const u = (h) => h.default && h.tag !== "tag:yaml.org,2002:str" && h.test?.test(f), { compat: m, tags: y } = e.doc.schema;
887
- if (y.some(u) || m?.some(u))
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))
888
896
  return le(r, e);
889
897
  }
890
898
  return l ? f : Ue(f, a, Ht, Ve(e, !1));
@@ -892,17 +900,17 @@ ${a}`);
892
900
  function Ae(s, e, t, n) {
893
901
  const { implicitKey: i, inFlow: r } = e, o = typeof s.value == "string" ? s : Object.assign({}, s, { value: String(s.value) });
894
902
  let { type: l } = s;
895
- l !== O.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (l = O.QUOTE_DOUBLE);
896
- const a = (d) => {
897
- switch (d) {
898
- case O.BLOCK_FOLDED:
899
- case O.BLOCK_LITERAL:
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:
900
908
  return i || r ? le(o.value, e) : Me(o, e, t, n);
901
- case O.QUOTE_DOUBLE:
909
+ case A.QUOTE_DOUBLE:
902
910
  return Se(o.value, e);
903
- case O.QUOTE_SINGLE:
911
+ case A.QUOTE_SINGLE:
904
912
  return ct(o.value, e);
905
- case O.PLAIN:
913
+ case A.PLAIN:
906
914
  return Fs(o, e, t, n);
907
915
  default:
908
916
  return null;
@@ -910,9 +918,9 @@ function Ae(s, e, t, n) {
910
918
  };
911
919
  let c = a(l);
912
920
  if (c === null) {
913
- const { defaultKeyType: d, defaultStringType: f } = e.options, u = i && d || f;
914
- if (c = a(u), c === null)
915
- throw new Error(`Unsupported default string type ${u}`);
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}`);
916
924
  }
917
925
  return c;
918
926
  }
@@ -958,25 +966,29 @@ function Xt(s, e) {
958
966
  };
959
967
  }
960
968
  function Rs(s, e) {
969
+ var i;
961
970
  if (e.tag) {
962
- const i = s.filter((r) => r.tag === e.tag);
963
- if (i.length > 0)
964
- return i.find((r) => r.format === e.format) ?? i[0];
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];
965
974
  }
966
975
  let t, n;
967
976
  if (E(e)) {
968
977
  n = e.value;
969
- let i = s.filter((r) => r.identify?.(n));
970
- if (i.length > 1) {
971
- const r = i.filter((o) => o.test);
972
- r.length > 0 && (i = r);
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);
973
985
  }
974
- t = i.find((r) => r.format === e.format) ?? i.find((r) => !r.format);
986
+ t = r.find((o) => o.format === e.format) ?? r.find((o) => !o.format);
975
987
  } else
976
- n = e, t = s.find((i) => i.nodeClass && n instanceof i.nodeClass);
988
+ n = e, t = s.find((r) => r.nodeClass && n instanceof r.nodeClass);
977
989
  if (!t) {
978
- const i = n?.constructor?.name ?? typeof n;
979
- throw new Error(`Tag not resolved for ${i} value`);
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`);
980
992
  }
981
993
  return t;
982
994
  }
@@ -989,17 +1001,18 @@ function Us(s, e, { anchors: t, doc: n }) {
989
1001
  return o && i.push(n.directives.tagString(o)), i.join(" ");
990
1002
  }
991
1003
  function fe(s, e, t, n) {
1004
+ var a;
992
1005
  if (T(s))
993
1006
  return s.toString(e, t, n);
994
- if (Z(s)) {
1007
+ if (x(s)) {
995
1008
  if (e.doc.directives)
996
1009
  return s.toString(e);
997
- if (e.resolvedAliases?.has(s))
1010
+ if ((a = e.resolvedAliases) != null && a.has(s))
998
1011
  throw new TypeError("Cannot stringify circular structure without alias nodes");
999
1012
  e.resolvedAliases ? e.resolvedAliases.add(s) : e.resolvedAliases = /* @__PURE__ */ new Set([s]), s = s.resolve(e.doc);
1000
1013
  }
1001
1014
  let i;
1002
- const r = $(s) ? s : e.doc.createNode(s, { onTagObj: (a) => i = a });
1015
+ const r = $(s) ? s : e.doc.createNode(s, { onTagObj: (c) => i = c });
1003
1016
  i || (i = Rs(e.doc.schema.tags, r));
1004
1017
  const o = Us(r, i, e);
1005
1018
  o.length > 0 && (e.indentAtStart = (e.indentAtStart ?? 0) + o.length + 1);
@@ -1008,67 +1021,67 @@ function fe(s, e, t, n) {
1008
1021
  ${e.indent}${l}` : l;
1009
1022
  }
1010
1023
  function Vs({ key: s, value: e }, t, n, i) {
1011
- const { allNullValues: r, doc: o, indent: l, indentStep: a, options: { commentString: c, indentSeq: d, simpleKeys: f } } = t;
1012
- let u = $(s) && s.comment || null;
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;
1013
1026
  if (f) {
1014
- if (u)
1027
+ if (d)
1015
1028
  throw new Error("With simple keys, key nodes cannot have comments");
1016
1029
  if (L(s) || !$(s) && typeof s == "object") {
1017
1030
  const I = "With simple keys, collection cannot be used as a key value";
1018
1031
  throw new Error(I);
1019
1032
  }
1020
1033
  }
1021
- let m = !f && (!s || u && e == null && !t.inFlow || L(s) || (E(s) ? s.type === O.BLOCK_FOLDED || s.type === O.BLOCK_LITERAL : typeof s == "object"));
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"));
1022
1035
  t = Object.assign({}, t, {
1023
1036
  allNullValues: !1,
1024
- implicitKey: !m && (f || !r),
1037
+ implicitKey: !h && (f || !r),
1025
1038
  indent: l + a
1026
1039
  });
1027
- let y = !1, h = !1, p = fe(s, t, () => y = !0, () => h = !0);
1028
- if (!m && !t.inFlow && p.length > 1024) {
1040
+ let y = !1, u = !1, m = fe(s, t, () => y = !0, () => u = !0);
1041
+ if (!h && !t.inFlow && m.length > 1024) {
1029
1042
  if (f)
1030
1043
  throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
1031
- m = !0;
1044
+ h = !0;
1032
1045
  }
1033
1046
  if (t.inFlow) {
1034
1047
  if (r || e == null)
1035
- return y && n && n(), p === "" ? "?" : m ? `? ${p}` : p;
1036
- } else if (r && !f || e == null && m)
1037
- return p = `? ${p}`, u && !y ? p += H(p, t.indent, c(u)) : h && i && i(), p;
1038
- y && (u = null), m ? (u && (p += H(p, t.indent, c(u))), p = `? ${p}
1039
- ${l}:`) : (p = `${p}:`, u && (p += H(p, t.indent, c(u))));
1040
- let b, w, S;
1041
- $(e) ? (b = !!e.spaceBefore, w = e.commentBefore, S = e.comment) : (b = !1, w = null, S = null, e && typeof e == "object" && (e = o.createNode(e))), t.implicitKey = !1, !m && !u && E(e) && (t.indentAtStart = p.length + 1), h = !1, !d && a.length >= 2 && !t.inFlow && !m && pe(e) && !e.flow && !e.tag && !e.anchor && (t.indent = t.indent.substring(2));
1042
- let k = !1;
1043
- const N = fe(e, t, () => k = !0, () => h = !0);
1044
- let A = " ";
1045
- if (u || b || w) {
1046
- if (A = b ? `
1047
- ` : "", w) {
1048
- const I = c(w);
1049
- A += `
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 += `
1050
1063
  ${U(I, t.indent)}`;
1051
1064
  }
1052
- N === "" && !t.inFlow ? A === `
1053
- ` && (A = `
1065
+ k === "" && !t.inFlow ? O === `
1066
+ ` && (O = `
1054
1067
 
1055
- `) : A += `
1068
+ `) : O += `
1056
1069
  ${t.indent}`;
1057
- } else if (!m && L(e)) {
1058
- const I = N[0], g = N.indexOf(`
1070
+ } else if (!h && L(e)) {
1071
+ const I = k[0], g = k.indexOf(`
1059
1072
  `), _ = g !== -1, J = t.inFlow ?? e.flow ?? e.items.length === 0;
1060
1073
  if (_ || !J) {
1061
1074
  let te = !1;
1062
1075
  if (_ && (I === "&" || I === "!")) {
1063
- let C = N.indexOf(" ");
1064
- I === "&" && C !== -1 && C < g && N[C + 1] === "!" && (C = N.indexOf(" ", C + 1)), (C === -1 || g < C) && (te = !0);
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);
1065
1078
  }
1066
- te || (A = `
1079
+ te || (O = `
1067
1080
  ${t.indent}`);
1068
1081
  }
1069
- } else (N === "" || N[0] === `
1070
- `) && (A = "");
1071
- return p += A + N, t.inFlow ? k && n && n() : S && !k ? p += H(p, t.indent, c(S)) : h && i && i(), p;
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;
1072
1085
  }
1073
1086
  function zt(s, e) {
1074
1087
  (s === "debug" || s === "warn") && console.warn(e);
@@ -1078,13 +1091,13 @@ const Te = "<<", V = {
1078
1091
  default: "key",
1079
1092
  tag: "tag:yaml.org,2002:merge",
1080
1093
  test: /^<<$/,
1081
- resolve: () => Object.assign(new O(Symbol(Te)), {
1082
- addToJSMap: xt
1094
+ resolve: () => Object.assign(new A(Symbol(Te)), {
1095
+ addToJSMap: Zt
1083
1096
  }),
1084
1097
  stringify: () => Te
1085
- }, Js = (s, e) => (V.identify(e) || E(e) && (!e.type || e.type === O.PLAIN) && V.identify(e.value)) && s?.doc.schema.tags.some((t) => t.tag === V.tag && t.default);
1086
- function xt(s, e, t) {
1087
- if (t = s && Z(t) ? t.resolve(s.doc) : t, pe(t))
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))
1088
1101
  for (const n of t.items)
1089
1102
  et(s, e, n);
1090
1103
  else if (Array.isArray(t))
@@ -1094,7 +1107,7 @@ function xt(s, e, t) {
1094
1107
  et(s, e, t);
1095
1108
  }
1096
1109
  function et(s, e, t) {
1097
- const n = s && Z(t) ? t.resolve(s.doc) : t;
1110
+ const n = s && x(t) ? t.resolve(s.doc) : t;
1098
1111
  if (!de(n))
1099
1112
  throw new Error("Merge sources must be maps or map aliases");
1100
1113
  const i = n.toJSON(null, s, Map);
@@ -1107,19 +1120,19 @@ function et(s, e, t) {
1107
1120
  });
1108
1121
  return e;
1109
1122
  }
1110
- function Zt(s, e, { key: t, value: n }) {
1123
+ function xt(s, e, { key: t, value: n }) {
1111
1124
  if ($(t) && t.addToJSMap)
1112
1125
  t.addToJSMap(s, e, n);
1113
1126
  else if (Js(s, t))
1114
- xt(s, e, n);
1127
+ Zt(s, e, n);
1115
1128
  else {
1116
- const i = j(t, "", s);
1129
+ const i = P(t, "", s);
1117
1130
  if (e instanceof Map)
1118
- e.set(i, j(n, i, s));
1131
+ e.set(i, P(n, i, s));
1119
1132
  else if (e instanceof Set)
1120
1133
  e.add(i);
1121
1134
  else {
1122
- const r = Ys(t, i, s), o = j(n, r, s);
1135
+ const r = Ys(t, i, s), o = P(n, r, s);
1123
1136
  r in e ? Object.defineProperty(e, r, {
1124
1137
  value: o,
1125
1138
  writable: !0,
@@ -1135,7 +1148,7 @@ function Ys(s, e, t) {
1135
1148
  return "";
1136
1149
  if (typeof e != "object")
1137
1150
  return String(e);
1138
- if ($(s) && t?.doc) {
1151
+ if ($(s) && (t != null && t.doc)) {
1139
1152
  const n = Xt(t.doc, {});
1140
1153
  n.anchors = /* @__PURE__ */ new Set();
1141
1154
  for (const r of t.anchors.keys())
@@ -1156,54 +1169,54 @@ function mt(s, e, t) {
1156
1169
  }
1157
1170
  class v {
1158
1171
  constructor(e, t = null) {
1159
- Object.defineProperty(this, P, { value: qt }), this.key = e, this.value = t;
1172
+ Object.defineProperty(this, j, { value: qt }), this.key = e, this.value = t;
1160
1173
  }
1161
1174
  clone(e) {
1162
1175
  let { key: t, value: n } = this;
1163
1176
  return $(t) && (t = t.clone(e)), $(n) && (n = n.clone(e)), new v(t, n);
1164
1177
  }
1165
1178
  toJSON(e, t) {
1166
- const n = t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
1167
- return Zt(t, n, this);
1179
+ const n = t != null && t.mapAsMap ? /* @__PURE__ */ new Map() : {};
1180
+ return xt(t, n, this);
1168
1181
  }
1169
1182
  toString(e, t, n) {
1170
- return e?.doc ? Vs(this, e, t, n) : JSON.stringify(this);
1183
+ return e != null && e.doc ? Vs(this, e, t, n) : JSON.stringify(this);
1171
1184
  }
1172
1185
  }
1173
1186
  function es(s, e, t) {
1174
1187
  return (e.inFlow ?? s.flow ? Qs : Gs)(s, e, t);
1175
1188
  }
1176
1189
  function Gs({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, itemIndent: r, onChompKeep: o, onComment: l }) {
1177
- const { indent: a, options: { commentString: c } } = t, d = Object.assign({}, t, { indent: r, type: null });
1190
+ const { indent: a, options: { commentString: c } } = t, p = Object.assign({}, t, { indent: r, type: null });
1178
1191
  let f = !1;
1179
- const u = [];
1192
+ const d = [];
1180
1193
  for (let y = 0; y < e.length; ++y) {
1181
- const h = e[y];
1182
- let p = null;
1183
- if ($(h))
1184
- !f && h.spaceBefore && u.push(""), Pe(t, u, h.commentBefore, f), h.comment && (p = h.comment);
1185
- else if (T(h)) {
1186
- const w = $(h.key) ? h.key : null;
1187
- w && (!f && w.spaceBefore && u.push(""), Pe(t, u, w.commentBefore, f));
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));
1188
1201
  }
1189
1202
  f = !1;
1190
- let b = fe(h, d, () => p = null, () => f = !0);
1191
- p && (b += H(b, r, c(p))), f && p && (f = !1), u.push(n + b);
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);
1192
1205
  }
1193
- let m;
1194
- if (u.length === 0)
1195
- m = i.start + i.end;
1206
+ let h;
1207
+ if (d.length === 0)
1208
+ h = i.start + i.end;
1196
1209
  else {
1197
- m = u[0];
1198
- for (let y = 1; y < u.length; ++y) {
1199
- const h = u[y];
1200
- m += h ? `
1201
- ${a}${h}` : `
1210
+ h = d[0];
1211
+ for (let y = 1; y < d.length; ++y) {
1212
+ const u = d[y];
1213
+ h += u ? `
1214
+ ${a}${u}` : `
1202
1215
  `;
1203
1216
  }
1204
1217
  }
1205
- return s ? (m += `
1206
- ` + U(c(s), a), l && l()) : f && o && o(), m;
1218
+ return s ? (h += `
1219
+ ` + U(c(s), a), l && l()) : f && o && o(), h;
1207
1220
  }
1208
1221
  function Qs({ items: s }, e, { flowChars: t, itemIndent: n }) {
1209
1222
  const { indent: i, indentStep: r, flowCollectionPadding: o, options: { commentString: l } } = e;
@@ -1213,43 +1226,43 @@ function Qs({ items: s }, e, { flowChars: t, itemIndent: n }) {
1213
1226
  inFlow: !0,
1214
1227
  type: null
1215
1228
  });
1216
- let c = !1, d = 0;
1229
+ let c = !1, p = 0;
1217
1230
  const f = [];
1218
1231
  for (let y = 0; y < s.length; ++y) {
1219
- const h = s[y];
1220
- let p = null;
1221
- if ($(h))
1222
- h.spaceBefore && f.push(""), Pe(e, f, h.commentBefore, !1), h.comment && (p = h.comment);
1223
- else if (T(h)) {
1224
- const w = $(h.key) ? h.key : null;
1225
- w && (w.spaceBefore && f.push(""), Pe(e, f, w.commentBefore, !1), w.comment && (c = !0));
1226
- const S = $(h.value) ? h.value : null;
1227
- S ? (S.comment && (p = S.comment), S.commentBefore && (c = !0)) : h.value == null && w?.comment && (p = w.comment);
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);
1228
1241
  }
1229
- p && (c = !0);
1230
- let b = fe(h, a, () => p = null);
1231
- y < s.length - 1 && (b += ","), p && (b += H(b, n, l(p))), !c && (f.length > d || b.includes(`
1232
- `)) && (c = !0), f.push(b), d = f.length;
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;
1233
1246
  }
1234
- const { start: u, end: m } = t;
1247
+ const { start: d, end: h } = t;
1235
1248
  if (f.length === 0)
1236
- return u + m;
1249
+ return d + h;
1237
1250
  if (!c) {
1238
- const y = f.reduce((h, p) => h + p.length + 2, 2);
1251
+ const y = f.reduce((u, m) => u + m.length + 2, 2);
1239
1252
  c = e.options.lineWidth > 0 && y > e.options.lineWidth;
1240
1253
  }
1241
1254
  if (c) {
1242
- let y = u;
1243
- for (const h of f)
1244
- y += h ? `
1245
- ${r}${i}${h}` : `
1255
+ let y = d;
1256
+ for (const u of f)
1257
+ y += u ? `
1258
+ ${r}${i}${u}` : `
1246
1259
  `;
1247
1260
  return `${y}
1248
- ${i}${m}`;
1261
+ ${i}${h}`;
1249
1262
  } else
1250
- return `${u}${o}${f.join(" ")}${o}${m}`;
1263
+ return `${d}${o}${f.join(" ")}${o}${h}`;
1251
1264
  }
1252
- function Pe({ indent: s, options: { commentString: e } }, t, n, i) {
1265
+ function je({ indent: s, options: { commentString: e } }, t, n, i) {
1253
1266
  if (n && i && (n = n.replace(/^\n+/, "")), n) {
1254
1267
  const r = U(e(n), s);
1255
1268
  t.push(r.trimStart());
@@ -1295,16 +1308,17 @@ class K extends Wt {
1295
1308
  * collection will throw. Otherwise, overwrites the previous value.
1296
1309
  */
1297
1310
  add(e, t) {
1311
+ var o;
1298
1312
  let n;
1299
- T(e) ? n = e : !e || typeof e != "object" || !("key" in e) ? n = new v(e, e?.value) : n = new v(e.key, e.value);
1300
- const i = X(this.items, n.key), r = this.schema?.sortMapEntries;
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;
1301
1315
  if (i) {
1302
1316
  if (!t)
1303
1317
  throw new Error(`Key ${n.key} already set`);
1304
1318
  E(i.value) && Qt(n.value) ? i.value.value = n.value : i.value = n.value;
1305
1319
  } else if (r) {
1306
- const o = this.items.findIndex((l) => r(n, l) < 0);
1307
- o === -1 ? this.items.push(n) : this.items.splice(o, 0, n);
1320
+ const l = this.items.findIndex((a) => r(n, a) < 0);
1321
+ l === -1 ? this.items.push(n) : this.items.splice(l, 0, n);
1308
1322
  } else
1309
1323
  this.items.push(n);
1310
1324
  }
@@ -1313,7 +1327,7 @@ class K extends Wt {
1313
1327
  return t ? this.items.splice(this.items.indexOf(t), 1).length > 0 : !1;
1314
1328
  }
1315
1329
  get(e, t) {
1316
- const i = X(this.items, e)?.value;
1330
+ const n = X(this.items, e), i = n == null ? void 0 : n.value;
1317
1331
  return (!t && E(i) ? i.value : i) ?? void 0;
1318
1332
  }
1319
1333
  has(e) {
@@ -1328,10 +1342,10 @@ class K extends Wt {
1328
1342
  * @returns Instance of Type, Map, or Object
1329
1343
  */
1330
1344
  toJSON(e, t, n) {
1331
- const i = n ? new n() : t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
1332
- t?.onCreate && t.onCreate(i);
1345
+ const i = n ? new n() : t != null && t.mapAsMap ? /* @__PURE__ */ new Map() : {};
1346
+ t != null && t.onCreate && t.onCreate(i);
1333
1347
  for (const r of this.items)
1334
- Zt(t, i, r);
1348
+ xt(t, i, r);
1335
1349
  return i;
1336
1350
  }
1337
1351
  toString(e, t, n) {
@@ -1414,10 +1428,10 @@ class W extends Wt {
1414
1428
  }
1415
1429
  toJSON(e, t) {
1416
1430
  const n = [];
1417
- t?.onCreate && t.onCreate(n);
1431
+ t != null && t.onCreate && t.onCreate(n);
1418
1432
  let i = 0;
1419
1433
  for (const r of this.items)
1420
- n.push(j(r, String(i++), t));
1434
+ n.push(P(r, String(i++), t));
1421
1435
  return n;
1422
1436
  }
1423
1437
  toString(e, t, n) {
@@ -1467,18 +1481,18 @@ const ye = {
1467
1481
  }
1468
1482
  }, Ge = {
1469
1483
  identify: (s) => s == null,
1470
- createNode: () => new O(null),
1484
+ createNode: () => new A(null),
1471
1485
  default: !0,
1472
1486
  tag: "tag:yaml.org,2002:null",
1473
1487
  test: /^(?:~|[Nn]ull|NULL)?$/,
1474
- resolve: () => new O(null),
1488
+ resolve: () => new A(null),
1475
1489
  stringify: ({ source: s }, e) => typeof s == "string" && Ge.test.test(s) ? s : e.options.nullStr
1476
1490
  }, yt = {
1477
1491
  identify: (s) => typeof s == "boolean",
1478
1492
  default: !0,
1479
1493
  tag: "tag:yaml.org,2002:bool",
1480
1494
  test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
1481
- resolve: (s) => new O(s[0] === "t" || s[0] === "T"),
1495
+ resolve: (s) => new A(s[0] === "t" || s[0] === "T"),
1482
1496
  stringify({ source: s, value: e }, t) {
1483
1497
  if (s && yt.test.test(s)) {
1484
1498
  const n = s[0] === "t" || s[0] === "T";
@@ -1528,7 +1542,7 @@ const ts = {
1528
1542
  tag: "tag:yaml.org,2002:float",
1529
1543
  test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
1530
1544
  resolve(s) {
1531
- const e = new O(parseFloat(s)), t = s.indexOf(".");
1545
+ const e = new A(parseFloat(s)), t = s.indexOf(".");
1532
1546
  return t !== -1 && s[s.length - 1] === "0" && (e.minFractionDigits = s.length - t - 1), e;
1533
1547
  },
1534
1548
  stringify: q
@@ -1586,7 +1600,7 @@ const $e = ({ value: s }) => JSON.stringify(s), Hs = [
1586
1600
  },
1587
1601
  {
1588
1602
  identify: (s) => s == null,
1589
- createNode: () => new O(null),
1603
+ createNode: () => new A(null),
1590
1604
  default: !0,
1591
1605
  tag: "tag:yaml.org,2002:null",
1592
1606
  test: /^null$/,
@@ -1658,11 +1672,11 @@ const $e = ({ value: s }) => JSON.stringify(s), Hs = [
1658
1672
  l = btoa(a);
1659
1673
  } else
1660
1674
  throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
1661
- if (e || (e = O.BLOCK_LITERAL), e !== O.QUOTE_DOUBLE) {
1662
- const a = Math.max(n.options.lineWidth - n.indent.length, n.options.minContentWidth), c = Math.ceil(l.length / a), d = new Array(c);
1663
- for (let f = 0, u = 0; f < c; ++f, u += a)
1664
- d[f] = l.substr(u, a);
1665
- l = d.join(e === O.BLOCK_LITERAL ? `
1675
+ if (e || (e = A.BLOCK_LITERAL), e !== A.QUOTE_DOUBLE) {
1676
+ const a = Math.max(n.options.lineWidth - n.indent.length, n.options.minContentWidth), c = Math.ceil(l.length / a), p = new Array(c);
1677
+ for (let f = 0, d = 0; f < c; ++f, d += a)
1678
+ p[f] = l.substr(d, a);
1679
+ l = p.join(e === A.BLOCK_LITERAL ? `
1666
1680
  ` : " ");
1667
1681
  }
1668
1682
  return Ae({ comment: s, type: e, value: l }, n, i, r);
@@ -1675,7 +1689,7 @@ function as(s, e) {
1675
1689
  if (!T(n)) {
1676
1690
  if (de(n)) {
1677
1691
  n.items.length > 1 && e("Each pair must have its own sequence indicator");
1678
- const i = n.items[0] || new v(new O(null));
1692
+ const i = n.items[0] || new v(new A(null));
1679
1693
  if (n.commentBefore && (i.key.commentBefore = i.key.commentBefore ? `${n.commentBefore}
1680
1694
  ${i.key.commentBefore}` : n.commentBefore), n.comment) {
1681
1695
  const r = i.value ?? i.key;
@@ -1735,10 +1749,10 @@ class ae extends W {
1735
1749
  if (!t)
1736
1750
  return super.toJSON(e);
1737
1751
  const n = /* @__PURE__ */ new Map();
1738
- t?.onCreate && t.onCreate(n);
1752
+ t != null && t.onCreate && t.onCreate(n);
1739
1753
  for (const i of this.items) {
1740
1754
  let r, o;
1741
- if (T(i) ? (r = j(i.key, "", t), o = j(i.value, r, t)) : r = j(i, "", t), n.has(r))
1755
+ if (T(i) ? (r = P(i.key, "", t), o = P(i.value, r, t)) : r = P(i, "", t), n.has(r))
1742
1756
  throw new Error("Ordered maps must not include duplicate keys");
1743
1757
  n.set(r, o);
1744
1758
  }
@@ -1772,23 +1786,23 @@ const us = {
1772
1786
  default: !0,
1773
1787
  tag: "tag:yaml.org,2002:bool",
1774
1788
  test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
1775
- resolve: () => new O(!0),
1789
+ resolve: () => new A(!0),
1776
1790
  stringify: fs
1777
1791
  }, hs = {
1778
1792
  identify: (s) => s === !1,
1779
1793
  default: !0,
1780
1794
  tag: "tag:yaml.org,2002:bool",
1781
1795
  test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
1782
- resolve: () => new O(!1),
1796
+ resolve: () => new A(!1),
1783
1797
  stringify: fs
1784
- }, xs = {
1798
+ }, Zs = {
1785
1799
  identify: (s) => typeof s == "number",
1786
1800
  default: !0,
1787
1801
  tag: "tag:yaml.org,2002:float",
1788
1802
  test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1789
1803
  resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
1790
1804
  stringify: q
1791
- }, Zs = {
1805
+ }, xs = {
1792
1806
  identify: (s) => typeof s == "number",
1793
1807
  default: !0,
1794
1808
  tag: "tag:yaml.org,2002:float",
@@ -1805,7 +1819,7 @@ const us = {
1805
1819
  tag: "tag:yaml.org,2002:float",
1806
1820
  test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
1807
1821
  resolve(s) {
1808
- const e = new O(parseFloat(s.replace(/_/g, ""))), t = s.indexOf(".");
1822
+ const e = new A(parseFloat(s.replace(/_/g, ""))), t = s.indexOf(".");
1809
1823
  if (t !== -1) {
1810
1824
  const n = s.substring(t + 1).replace(/_/g, "");
1811
1825
  n[n.length - 1] === "0" && (e.minFractionDigits = n.length);
@@ -1977,14 +1991,14 @@ const ps = {
1977
1991
  throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
1978
1992
  const [, t, n, i, r, o, l] = e.map(Number), a = e[7] ? Number((e[7] + "00").substr(1, 3)) : 0;
1979
1993
  let c = Date.UTC(t, n - 1, i, r || 0, o || 0, l || 0, a);
1980
- const d = e[8];
1981
- if (d && d !== "Z") {
1982
- let f = Ot(d, !1);
1994
+ const p = e[8];
1995
+ if (p && p !== "Z") {
1996
+ let f = Ot(p, !1);
1983
1997
  Math.abs(f) < 30 && (f *= 60), c -= 6e4 * f;
1984
1998
  }
1985
1999
  return new Date(c);
1986
2000
  },
1987
- stringify: ({ value: s }) => s?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
2001
+ stringify: ({ value: s }) => (s == null ? void 0 : s.toISOString().replace(/(T00:00:00)?\.000Z$/, "")) ?? ""
1988
2002
  }, Ct = [
1989
2003
  me,
1990
2004
  ye,
@@ -1996,8 +2010,8 @@ const ps = {
1996
2010
  sn,
1997
2011
  nn,
1998
2012
  rn,
1999
- xs,
2000
2013
  Zs,
2014
+ xs,
2001
2015
  en,
2002
2016
  bt,
2003
2017
  V,
@@ -2059,7 +2073,7 @@ function tt(s, e, t) {
2059
2073
  return t && (i = i.concat(V)), i.reduce((r, o) => {
2060
2074
  const l = typeof o == "string" ? Bt[o] : o;
2061
2075
  if (!l) {
2062
- const a = JSON.stringify(o), c = Object.keys(Bt).map((d) => JSON.stringify(d)).join(", ");
2076
+ const a = JSON.stringify(o), c = Object.keys(Bt).map((p) => JSON.stringify(p)).join(", ");
2063
2077
  throw new Error(`Unknown custom tag ${a}; use one of ${c}`);
2064
2078
  }
2065
2079
  return r.includes(l) || r.push(l), r;
@@ -2076,43 +2090,44 @@ class Xe {
2076
2090
  }
2077
2091
  }
2078
2092
  function an(s, e) {
2093
+ var a;
2079
2094
  const t = [];
2080
2095
  let n = e.directives === !0;
2081
2096
  if (e.directives !== !1 && s.directives) {
2082
- const a = s.directives.toString(s);
2083
- a ? (t.push(a), n = !0) : s.directives.docStart && (n = !0);
2097
+ const c = s.directives.toString(s);
2098
+ c ? (t.push(c), n = !0) : s.directives.docStart && (n = !0);
2084
2099
  }
2085
2100
  n && t.push("---");
2086
2101
  const i = Xt(s, e), { commentString: r } = i.options;
2087
2102
  if (s.commentBefore) {
2088
2103
  t.length !== 1 && t.unshift("");
2089
- const a = r(s.commentBefore);
2090
- t.unshift(U(a, ""));
2104
+ const c = r(s.commentBefore);
2105
+ t.unshift(U(c, ""));
2091
2106
  }
2092
2107
  let o = !1, l = null;
2093
2108
  if (s.contents) {
2094
2109
  if ($(s.contents)) {
2095
2110
  if (s.contents.spaceBefore && n && t.push(""), s.contents.commentBefore) {
2096
- const d = r(s.contents.commentBefore);
2097
- t.push(U(d, ""));
2111
+ const f = r(s.contents.commentBefore);
2112
+ t.push(U(f, ""));
2098
2113
  }
2099
2114
  i.forceBlockIndent = !!s.comment, l = s.contents.comment;
2100
2115
  }
2101
- const a = l ? void 0 : () => o = !0;
2102
- let c = fe(s.contents, i, () => l = null, a);
2103
- l && (c += H(c, "", r(l))), (c[0] === "|" || c[0] === ">") && t[t.length - 1] === "---" ? t[t.length - 1] = `--- ${c}` : t.push(c);
2116
+ const c = l ? void 0 : () => o = !0;
2117
+ let p = fe(s.contents, i, () => l = null, c);
2118
+ l && (p += H(p, "", r(l))), (p[0] === "|" || p[0] === ">") && t[t.length - 1] === "---" ? t[t.length - 1] = `--- ${p}` : t.push(p);
2104
2119
  } else
2105
2120
  t.push(fe(s.contents, i));
2106
- if (s.directives?.docEnd)
2121
+ if ((a = s.directives) != null && a.docEnd)
2107
2122
  if (s.comment) {
2108
- const a = r(s.comment);
2109
- a.includes(`
2110
- `) ? (t.push("..."), t.push(U(a, ""))) : t.push(`... ${a}`);
2123
+ const c = r(s.comment);
2124
+ c.includes(`
2125
+ `) ? (t.push("..."), t.push(U(c, ""))) : t.push(`... ${c}`);
2111
2126
  } else
2112
2127
  t.push("...");
2113
2128
  else {
2114
- let a = s.comment;
2115
- a && o && (a = a.replace(/^\n+/, "")), a && ((!o || l) && t[t.length - 1] !== "" && t.push(""), t.push(U(r(a), "")));
2129
+ let c = s.comment;
2130
+ c && o && (c = c.replace(/^\n+/, "")), c && ((!o || l) && t[t.length - 1] !== "" && t.push(""), t.push(U(r(c), "")));
2116
2131
  }
2117
2132
  return t.join(`
2118
2133
  `) + `
@@ -2120,7 +2135,7 @@ function an(s, e) {
2120
2135
  }
2121
2136
  class ge {
2122
2137
  constructor(e, t, n) {
2123
- this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, P, { value: lt });
2138
+ this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, j, { value: lt });
2124
2139
  let i = null;
2125
2140
  typeof t == "function" || Array.isArray(t) ? i = t : n === void 0 && t && (n = t, t = void 0);
2126
2141
  const r = Object.assign({
@@ -2135,7 +2150,7 @@ class ge {
2135
2150
  }, n);
2136
2151
  this.options = r;
2137
2152
  let { version: o } = r;
2138
- 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);
2153
+ 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);
2139
2154
  }
2140
2155
  /**
2141
2156
  * Create a deep copy of this Document and its contents.
@@ -2144,7 +2159,7 @@ class ge {
2144
2159
  */
2145
2160
  clone() {
2146
2161
  const e = Object.create(ge.prototype, {
2147
- [P]: { value: lt }
2162
+ [j]: { value: lt }
2148
2163
  });
2149
2164
  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;
2150
2165
  }
@@ -2178,10 +2193,10 @@ class ge {
2178
2193
  if (typeof t == "function")
2179
2194
  e = t.call({ "": e }, "", e), i = t;
2180
2195
  else if (Array.isArray(t)) {
2181
- const p = (w) => typeof w == "number" || w instanceof String || w instanceof Number, b = t.filter(p).map(String);
2196
+ const m = (S) => typeof S == "number" || S instanceof String || S instanceof Number, b = t.filter(m).map(String);
2182
2197
  b.length > 0 && (t = t.concat(b)), i = t;
2183
2198
  } else n === void 0 && t && (n = t, t = void 0);
2184
- const { aliasDuplicateObjects: r, anchorPrefix: o, flow: l, keepUndefined: a, onTagObj: c, tag: d } = n ?? {}, { onAnchor: f, setAnchors: u, sourceObjects: m } = Ks(
2199
+ const { aliasDuplicateObjects: r, anchorPrefix: o, flow: l, keepUndefined: a, onTagObj: c, tag: p } = n ?? {}, { onAnchor: f, setAnchors: d, sourceObjects: h } = Ks(
2185
2200
  this,
2186
2201
  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2187
2202
  o || "a"
@@ -2192,9 +2207,9 @@ class ge {
2192
2207
  onTagObj: c,
2193
2208
  replacer: i,
2194
2209
  schema: this.schema,
2195
- sourceObjects: m
2196
- }, h = ke(e, d, y);
2197
- return l && L(h) && (h.flow = !0), u(), h;
2210
+ sourceObjects: h
2211
+ }, u = ke(e, p, y);
2212
+ return l && L(u) && (u.flow = !0), d(), u;
2198
2213
  }
2199
2214
  /**
2200
2215
  * Convert a key and a value into a `Pair` using the current schema,
@@ -2251,14 +2266,14 @@ class ge {
2251
2266
  * boolean to add/remove the item from the set.
2252
2267
  */
2253
2268
  set(e, t) {
2254
- this.contents == null ? this.contents = je(this.schema, [e], t) : se(this.contents) && this.contents.set(e, t);
2269
+ this.contents == null ? this.contents = Pe(this.schema, [e], t) : se(this.contents) && this.contents.set(e, t);
2255
2270
  }
2256
2271
  /**
2257
2272
  * Sets a value in this document. For `!!set`, `value` needs to be a
2258
2273
  * boolean to add/remove the item from the set.
2259
2274
  */
2260
2275
  setIn(e, t) {
2261
- we(e) ? this.contents = t : this.contents == null ? this.contents = je(this.schema, Array.from(e), t) : se(this.contents) && this.contents.setIn(e, t);
2276
+ 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);
2262
2277
  }
2263
2278
  /**
2264
2279
  * Change the YAML version and schema used by the document.
@@ -2302,10 +2317,10 @@ class ge {
2302
2317
  mapAsMap: n === !0,
2303
2318
  mapKeyWarned: !1,
2304
2319
  maxAliasCount: typeof i == "number" ? i : 100
2305
- }, a = j(this.contents, t ?? "", l);
2320
+ }, a = P(this.contents, t ?? "", l);
2306
2321
  if (typeof r == "function")
2307
- for (const { count: c, res: d } of l.anchors.values())
2308
- r(d, c);
2322
+ for (const { count: c, res: p } of l.anchors.values())
2323
+ r(p, c);
2309
2324
  return typeof o == "function" ? oe(o, { "": a }, "", a) : a;
2310
2325
  }
2311
2326
  /**
@@ -2377,52 +2392,52 @@ ${c}
2377
2392
  }
2378
2393
  };
2379
2394
  function ue(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIndent: o, startOnNewline: l }) {
2380
- let a = !1, c = l, d = l, f = "", u = "", m = !1, y = !1, h = null, p = null, b = null, w = null, S = null, k = null, N = null;
2395
+ 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;
2381
2396
  for (const g of s)
2382
- 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), h && (c && g.type !== "comment" && g.type !== "newline" && r(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), h = null), g.type) {
2397
+ 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) {
2383
2398
  case "space":
2384
- !e && (t !== "doc-start" || n?.type !== "flow-collection") && g.source.includes(" ") && (h = g), d = !0;
2399
+ !e && (t !== "doc-start" || (n == null ? void 0 : n.type) !== "flow-collection") && g.source.includes(" ") && (u = g), p = !0;
2385
2400
  break;
2386
2401
  case "comment": {
2387
- d || r(g, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2402
+ p || r(g, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2388
2403
  const _ = g.source.substring(1) || " ";
2389
- f ? f += u + _ : f = _, u = "", c = !1;
2404
+ f ? f += d + _ : f = _, d = "", c = !1;
2390
2405
  break;
2391
2406
  }
2392
2407
  case "newline":
2393
- c ? f ? f += g.source : (!k || t !== "seq-item-ind") && (a = !0) : u += g.source, c = !0, m = !0, (p || b) && (w = g), d = !0;
2408
+ 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;
2394
2409
  break;
2395
2410
  case "anchor":
2396
- p && 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), p = g, N === null && (N = g.offset), c = !1, d = !1, y = !0;
2411
+ 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;
2397
2412
  break;
2398
2413
  case "tag": {
2399
- b && r(g, "MULTIPLE_TAGS", "A node can have at most one tag"), b = g, N === null && (N = g.offset), c = !1, d = !1, y = !0;
2414
+ 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;
2400
2415
  break;
2401
2416
  }
2402
2417
  case t:
2403
- (p || b) && r(g, "BAD_PROP_ORDER", `Anchors and tags must be after the ${g.source} indicator`), k && r(g, "UNEXPECTED_TOKEN", `Unexpected ${g.source} in ${e ?? "collection"}`), k = g, c = t === "seq-item-ind" || t === "explicit-key-ind", d = !1;
2418
+ (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;
2404
2419
  break;
2405
2420
  case "comma":
2406
2421
  if (e) {
2407
- S && r(g, "UNEXPECTED_TOKEN", `Unexpected , in ${e}`), S = g, c = !1, d = !1;
2422
+ N && r(g, "UNEXPECTED_TOKEN", `Unexpected , in ${e}`), N = g, c = !1, p = !1;
2408
2423
  break;
2409
2424
  }
2410
2425
  // else fallthrough
2411
2426
  default:
2412
- r(g, "UNEXPECTED_TOKEN", `Unexpected ${g.type} token`), c = !1, d = !1;
2427
+ r(g, "UNEXPECTED_TOKEN", `Unexpected ${g.type} token`), c = !1, p = !1;
2413
2428
  }
2414
- const A = s[s.length - 1], I = A ? A.offset + A.source.length : i;
2415
- 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"), h && (c && h.indent <= o || n?.type === "block-map" || n?.type === "block-seq") && r(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), {
2416
- comma: S,
2417
- found: k,
2429
+ const O = s[s.length - 1], I = O ? O.offset + O.source.length : i;
2430
+ 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"), {
2431
+ comma: N,
2432
+ found: w,
2418
2433
  spaceBefore: a,
2419
2434
  comment: f,
2420
- hasNewline: m,
2421
- anchor: p,
2435
+ hasNewline: h,
2436
+ anchor: m,
2422
2437
  tag: b,
2423
- newlineAfterProp: w,
2438
+ newlineAfterProp: S,
2424
2439
  end: I,
2425
- start: N ?? I
2440
+ start: k ?? I
2426
2441
  };
2427
2442
  }
2428
2443
  function Ne(s) {
@@ -2461,7 +2476,7 @@ function Ne(s) {
2461
2476
  }
2462
2477
  }
2463
2478
  function ut(s, e, t) {
2464
- if (e?.type === "flow-collection") {
2479
+ if ((e == null ? void 0 : e.type) === "flow-collection") {
2465
2480
  const n = e.end[0];
2466
2481
  n.indent === s && (n.source === "]" || n.source === "}") && Ne(e) && t(n, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
2467
2482
  }
@@ -2475,58 +2490,59 @@ function gs(s, e, t) {
2475
2490
  }
2476
2491
  const Mt = "All mapping items must start at the same column";
2477
2492
  function cn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2478
- const o = r?.nodeClass ?? K, l = new o(t.schema);
2493
+ var p;
2494
+ const o = (r == null ? void 0 : r.nodeClass) ?? K, l = new o(t.schema);
2479
2495
  t.atRoot && (t.atRoot = !1);
2480
2496
  let a = n.offset, c = null;
2481
- for (const d of n.items) {
2482
- const { start: f, key: u, sep: m, value: y } = d, h = ue(f, {
2497
+ for (const f of n.items) {
2498
+ const { start: d, key: h, sep: y, value: u } = f, m = ue(d, {
2483
2499
  indicator: "explicit-key-ind",
2484
- next: u ?? m?.[0],
2500
+ next: h ?? (y == null ? void 0 : y[0]),
2485
2501
  offset: a,
2486
2502
  onError: i,
2487
2503
  parentIndent: n.indent,
2488
2504
  startOnNewline: !0
2489
- }), p = !h.found;
2490
- if (p) {
2491
- if (u && (u.type === "block-seq" ? i(a, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in u && u.indent !== n.indent && i(a, "BAD_INDENT", Mt)), !h.anchor && !h.tag && !m) {
2492
- c = h.end, h.comment && (l.comment ? l.comment += `
2493
- ` + h.comment : l.comment = h.comment);
2505
+ }), b = !m.found;
2506
+ if (b) {
2507
+ 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) {
2508
+ c = m.end, m.comment && (l.comment ? l.comment += `
2509
+ ` + m.comment : l.comment = m.comment);
2494
2510
  continue;
2495
2511
  }
2496
- (h.newlineAfterProp || Ne(u)) && i(u ?? f[f.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
2497
- } else h.found?.indent !== n.indent && i(a, "BAD_INDENT", Mt);
2512
+ (m.newlineAfterProp || Ne(h)) && i(h ?? d[d.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
2513
+ } else ((p = m.found) == null ? void 0 : p.indent) !== n.indent && i(a, "BAD_INDENT", Mt);
2498
2514
  t.atKey = !0;
2499
- const b = h.end, w = u ? s(t, u, h, i) : e(t, b, f, null, h, i);
2500
- t.schema.compat && ut(n.indent, u, i), t.atKey = !1, gs(t, l.items, w) && i(b, "DUPLICATE_KEY", "Map keys must be unique");
2501
- const S = ue(m ?? [], {
2515
+ const S = m.end, N = h ? s(t, h, m, i) : e(t, S, d, null, m, i);
2516
+ 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");
2517
+ const w = ue(y ?? [], {
2502
2518
  indicator: "map-value-ind",
2503
- next: y,
2504
- offset: w.range[2],
2519
+ next: u,
2520
+ offset: N.range[2],
2505
2521
  onError: i,
2506
2522
  parentIndent: n.indent,
2507
- startOnNewline: !u || u.type === "block-scalar"
2523
+ startOnNewline: !h || h.type === "block-scalar"
2508
2524
  });
2509
- if (a = S.end, S.found) {
2510
- p && (y?.type === "block-map" && !S.hasNewline && i(a, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), t.options.strict && h.start < S.found.offset - 1024 && i(w.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
2511
- const k = y ? s(t, y, S, i) : e(t, a, m, null, S, i);
2512
- t.schema.compat && ut(n.indent, y, i), a = k.range[2];
2513
- const N = new v(w, k);
2514
- t.options.keepSourceTokens && (N.srcToken = d), l.items.push(N);
2525
+ if (a = w.end, w.found) {
2526
+ 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"));
2527
+ const k = u ? s(t, u, w, i) : e(t, a, y, null, w, i);
2528
+ t.schema.compat && ut(n.indent, u, i), a = k.range[2];
2529
+ const O = new v(N, k);
2530
+ t.options.keepSourceTokens && (O.srcToken = f), l.items.push(O);
2515
2531
  } else {
2516
- p && i(w.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), S.comment && (w.comment ? w.comment += `
2517
- ` + S.comment : w.comment = S.comment);
2518
- const k = new v(w);
2519
- t.options.keepSourceTokens && (k.srcToken = d), l.items.push(k);
2532
+ b && i(N.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), w.comment && (N.comment ? N.comment += `
2533
+ ` + w.comment : N.comment = w.comment);
2534
+ const k = new v(N);
2535
+ t.options.keepSourceTokens && (k.srcToken = f), l.items.push(k);
2520
2536
  }
2521
2537
  }
2522
2538
  return c && c < a && i(c, "IMPOSSIBLE", "Map comment with trailing content"), l.range = [n.offset, a, c ?? a], l;
2523
2539
  }
2524
2540
  function fn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2525
- const o = r?.nodeClass ?? W, l = new o(t.schema);
2541
+ const o = (r == null ? void 0 : r.nodeClass) ?? W, l = new o(t.schema);
2526
2542
  t.atRoot && (t.atRoot = !1), t.atKey && (t.atKey = !1);
2527
2543
  let a = n.offset, c = null;
2528
- for (const { start: d, value: f } of n.items) {
2529
- const u = ue(d, {
2544
+ for (const { start: p, value: f } of n.items) {
2545
+ const d = ue(p, {
2530
2546
  indicator: "seq-item-ind",
2531
2547
  next: f,
2532
2548
  offset: a,
@@ -2534,15 +2550,15 @@ function fn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2534
2550
  parentIndent: n.indent,
2535
2551
  startOnNewline: !0
2536
2552
  });
2537
- if (!u.found)
2538
- if (u.anchor || u.tag || f)
2539
- f && f.type === "block-seq" ? i(u.end, "BAD_INDENT", "All sequence items must start at the same column") : i(a, "MISSING_CHAR", "Sequence item without - indicator");
2553
+ if (!d.found)
2554
+ if (d.anchor || d.tag || f)
2555
+ 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");
2540
2556
  else {
2541
- c = u.end, u.comment && (l.comment = u.comment);
2557
+ c = d.end, d.comment && (l.comment = d.comment);
2542
2558
  continue;
2543
2559
  }
2544
- const m = f ? s(t, f, u, i) : e(t, u.end, d, null, u, i);
2545
- t.schema.compat && ut(n.indent, f, i), a = m.range[2], l.items.push(m);
2560
+ const h = f ? s(t, f, d, i) : e(t, d.end, p, null, d, i);
2561
+ t.schema.compat && ut(n.indent, f, i), a = h.range[2], l.items.push(h);
2546
2562
  }
2547
2563
  return l.range = [n.offset, a, c ?? a], l;
2548
2564
  }
@@ -2558,8 +2574,8 @@ function Ie(s, e, t, n) {
2558
2574
  break;
2559
2575
  case "comment": {
2560
2576
  t && !r && n(l, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2561
- const d = a.substring(1) || " ";
2562
- i ? i += o + d : i = d, o = "";
2577
+ const p = a.substring(1) || " ";
2578
+ i ? i += o + p : i = p, o = "";
2563
2579
  break;
2564
2580
  }
2565
2581
  case "newline":
@@ -2575,39 +2591,39 @@ function Ie(s, e, t, n) {
2575
2591
  }
2576
2592
  const st = "Block collections are not allowed within flow collections", nt = (s) => s && (s.type === "block-map" || s.type === "block-seq");
2577
2593
  function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2578
- const o = n.start.source === "{", l = o ? "flow map" : "flow sequence", a = r?.nodeClass ?? (o ? K : W), c = new a(t.schema);
2594
+ const o = n.start.source === "{", l = o ? "flow map" : "flow sequence", a = (r == null ? void 0 : r.nodeClass) ?? (o ? K : W), c = new a(t.schema);
2579
2595
  c.flow = !0;
2580
- const d = t.atRoot;
2581
- d && (t.atRoot = !1), t.atKey && (t.atKey = !1);
2596
+ const p = t.atRoot;
2597
+ p && (t.atRoot = !1), t.atKey && (t.atKey = !1);
2582
2598
  let f = n.offset + n.start.source.length;
2583
- for (let p = 0; p < n.items.length; ++p) {
2584
- const b = n.items[p], { start: w, key: S, sep: k, value: N } = b, A = ue(w, {
2599
+ for (let m = 0; m < n.items.length; ++m) {
2600
+ const b = n.items[m], { start: S, key: N, sep: w, value: k } = b, O = ue(S, {
2585
2601
  flow: l,
2586
2602
  indicator: "explicit-key-ind",
2587
- next: S ?? k?.[0],
2603
+ next: N ?? (w == null ? void 0 : w[0]),
2588
2604
  offset: f,
2589
2605
  onError: i,
2590
2606
  parentIndent: n.indent,
2591
2607
  startOnNewline: !1
2592
2608
  });
2593
- if (!A.found) {
2594
- if (!A.anchor && !A.tag && !k && !N) {
2595
- p === 0 && A.comma ? i(A.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${l}`) : p < n.items.length - 1 && i(A.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${l}`), A.comment && (c.comment ? c.comment += `
2596
- ` + A.comment : c.comment = A.comment), f = A.end;
2609
+ if (!O.found) {
2610
+ if (!O.anchor && !O.tag && !w && !k) {
2611
+ 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 += `
2612
+ ` + O.comment : c.comment = O.comment), f = O.end;
2597
2613
  continue;
2598
2614
  }
2599
- !o && t.options.strict && Ne(S) && i(
2600
- S,
2615
+ !o && t.options.strict && Ne(N) && i(
2616
+ N,
2601
2617
  // checked by containsNewline()
2602
2618
  "MULTILINE_IMPLICIT_KEY",
2603
2619
  "Implicit keys of flow sequence pairs need to be on a single line"
2604
2620
  );
2605
2621
  }
2606
- if (p === 0)
2607
- A.comma && i(A.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${l}`);
2608
- else if (A.comma || i(A.start, "MISSING_CHAR", `Missing , between ${l} items`), A.comment) {
2622
+ if (m === 0)
2623
+ O.comma && i(O.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${l}`);
2624
+ else if (O.comma || i(O.start, "MISSING_CHAR", `Missing , between ${l} items`), O.comment) {
2609
2625
  let I = "";
2610
- e: for (const g of w)
2626
+ e: for (const g of S)
2611
2627
  switch (g.type) {
2612
2628
  case "comma":
2613
2629
  case "space":
@@ -2621,29 +2637,29 @@ function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2621
2637
  if (I) {
2622
2638
  let g = c.items[c.items.length - 1];
2623
2639
  T(g) && (g = g.value ?? g.key), g.comment ? g.comment += `
2624
- ` + I : g.comment = I, A.comment = A.comment.substring(I.length + 1);
2640
+ ` + I : g.comment = I, O.comment = O.comment.substring(I.length + 1);
2625
2641
  }
2626
2642
  }
2627
- if (!o && !k && !A.found) {
2628
- const I = N ? s(t, N, A, i) : e(t, A.end, k, null, A, i);
2629
- c.items.push(I), f = I.range[2], nt(N) && i(I.range, "BLOCK_IN_FLOW", st);
2643
+ if (!o && !w && !O.found) {
2644
+ const I = k ? s(t, k, O, i) : e(t, O.end, w, null, O, i);
2645
+ c.items.push(I), f = I.range[2], nt(k) && i(I.range, "BLOCK_IN_FLOW", st);
2630
2646
  } else {
2631
2647
  t.atKey = !0;
2632
- const I = A.end, g = S ? s(t, S, A, i) : e(t, I, w, null, A, i);
2633
- nt(S) && i(g.range, "BLOCK_IN_FLOW", st), t.atKey = !1;
2634
- const _ = ue(k ?? [], {
2648
+ const I = O.end, g = N ? s(t, N, O, i) : e(t, I, S, null, O, i);
2649
+ nt(N) && i(g.range, "BLOCK_IN_FLOW", st), t.atKey = !1;
2650
+ const _ = ue(w ?? [], {
2635
2651
  flow: l,
2636
2652
  indicator: "map-value-ind",
2637
- next: N,
2653
+ next: k,
2638
2654
  offset: g.range[2],
2639
2655
  onError: i,
2640
2656
  parentIndent: n.indent,
2641
2657
  startOnNewline: !1
2642
2658
  });
2643
2659
  if (_.found) {
2644
- if (!o && !A.found && t.options.strict) {
2645
- if (k)
2646
- for (const C of k) {
2660
+ if (!o && !O.found && t.options.strict) {
2661
+ if (w)
2662
+ for (const C of w) {
2647
2663
  if (C === _.found)
2648
2664
  break;
2649
2665
  if (C.type === "newline") {
@@ -2651,11 +2667,11 @@ function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2651
2667
  break;
2652
2668
  }
2653
2669
  }
2654
- A.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");
2670
+ 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");
2655
2671
  }
2656
- } else N && ("source" in N && N.source && N.source[0] === ":" ? i(N, "MISSING_CHAR", `Missing space after : in ${l}`) : i(_.start, "MISSING_CHAR", `Missing , or : between ${l} items`));
2657
- const J = N ? s(t, N, _, i) : _.found ? e(t, _.end, k, null, _, i) : null;
2658
- J ? nt(N) && i(J.range, "BLOCK_IN_FLOW", st) : _.comment && (g.comment ? g.comment += `
2672
+ } 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`));
2673
+ const J = k ? s(t, k, _, i) : _.found ? e(t, _.end, w, null, _, i) : null;
2674
+ J ? nt(k) && i(J.range, "BLOCK_IN_FLOW", st) : _.comment && (g.comment ? g.comment += `
2659
2675
  ` + _.comment : g.comment = _.comment);
2660
2676
  const te = new v(g, J);
2661
2677
  if (t.options.keepSourceTokens && (te.srcToken = b), o) {
@@ -2670,20 +2686,20 @@ function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2670
2686
  f = J ? J.range[2] : _.end;
2671
2687
  }
2672
2688
  }
2673
- const u = o ? "}" : "]", [m, ...y] = n.end;
2674
- let h = f;
2675
- if (m && m.source === u)
2676
- h = m.offset + m.source.length;
2689
+ const d = o ? "}" : "]", [h, ...y] = n.end;
2690
+ let u = f;
2691
+ if (h && h.source === d)
2692
+ u = h.offset + h.source.length;
2677
2693
  else {
2678
- const p = l[0].toUpperCase() + l.substring(1), b = d ? `${p} must end with a ${u}` : `${p} in block collection must be sufficiently indented and end with a ${u}`;
2679
- i(f, d ? "MISSING_CHAR" : "BAD_INDENT", b), m && m.source.length !== 1 && y.unshift(m);
2694
+ 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}`;
2695
+ i(f, p ? "MISSING_CHAR" : "BAD_INDENT", b), h && h.source.length !== 1 && y.unshift(h);
2680
2696
  }
2681
2697
  if (y.length > 0) {
2682
- const p = Ie(y, h, t.options.strict, i);
2683
- p.comment && (c.comment ? c.comment += `
2684
- ` + p.comment : c.comment = p.comment), c.range = [n.offset, h, p.offset];
2698
+ const m = Ie(y, u, t.options.strict, i);
2699
+ m.comment && (c.comment ? c.comment += `
2700
+ ` + m.comment : c.comment = m.comment), c.range = [n.offset, u, m.offset];
2685
2701
  } else
2686
- c.range = [n.offset, h, h];
2702
+ c.range = [n.offset, u, u];
2687
2703
  return c;
2688
2704
  }
2689
2705
  function it(s, e, t, n, i, r) {
@@ -2691,87 +2707,88 @@ function it(s, e, t, n, i, r) {
2691
2707
  return i === "!" || i === l.tagName ? (o.tag = l.tagName, o) : (i && (o.tag = i), o);
2692
2708
  }
2693
2709
  function hn(s, e, t, n, i) {
2694
- const r = n.tag, o = r ? e.directives.tagName(r.source, (u) => i(r, "TAG_RESOLVE_FAILED", u)) : null;
2710
+ var d;
2711
+ const r = n.tag, o = r ? e.directives.tagName(r.source, (h) => i(r, "TAG_RESOLVE_FAILED", h)) : null;
2695
2712
  if (t.type === "block-seq") {
2696
- const { anchor: u, newlineAfterProp: m } = n, y = u && r ? u.offset > r.offset ? u : r : u ?? r;
2697
- y && (!m || m.offset < y.offset) && i(y, "MISSING_CHAR", "Missing newline after block sequence props");
2713
+ const { anchor: h, newlineAfterProp: y } = n, u = h && r ? h.offset > r.offset ? h : r : h ?? r;
2714
+ u && (!y || y.offset < u.offset) && i(u, "MISSING_CHAR", "Missing newline after block sequence props");
2698
2715
  }
2699
2716
  const l = t.type === "block-map" ? "map" : t.type === "block-seq" ? "seq" : t.start.source === "{" ? "map" : "seq";
2700
2717
  if (!r || !o || o === "!" || o === K.tagName && l === "map" || o === W.tagName && l === "seq")
2701
2718
  return it(s, e, t, i, o);
2702
- let a = e.schema.tags.find((u) => u.tag === o && u.collection === l);
2719
+ let a = e.schema.tags.find((h) => h.tag === o && h.collection === l);
2703
2720
  if (!a) {
2704
- const u = e.schema.knownTags[o];
2705
- if (u && u.collection === l)
2706
- e.schema.tags.push(Object.assign({}, u, { default: !1 })), a = u;
2721
+ const h = e.schema.knownTags[o];
2722
+ if (h && h.collection === l)
2723
+ e.schema.tags.push(Object.assign({}, h, { default: !1 })), a = h;
2707
2724
  else
2708
- return u ? i(r, "BAD_COLLECTION_TYPE", `${u.tag} used for ${l} collection, but expects ${u.collection ?? "scalar"}`, !0) : i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), it(s, e, t, i, o);
2725
+ return h ? i(r, "BAD_COLLECTION_TYPE", `${h.tag} used for ${l} collection, but expects ${h.collection ?? "scalar"}`, !0) : i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), it(s, e, t, i, o);
2709
2726
  }
2710
- const c = it(s, e, t, i, o, a), d = a.resolve?.(c, (u) => i(r, "TAG_RESOLVE_FAILED", u), e.options) ?? c, f = $(d) ? d : new O(d);
2711
- return f.range = c.range, f.tag = o, a?.format && (f.format = a.format), f;
2727
+ 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);
2728
+ return f.range = c.range, f.tag = o, a != null && a.format && (f.format = a.format), f;
2712
2729
  }
2713
2730
  function bs(s, e, t) {
2714
2731
  const n = e.offset, i = dn(e, s.options.strict, t);
2715
2732
  if (!i)
2716
2733
  return { value: "", type: null, comment: "", range: [n, n, n] };
2717
- const r = i.mode === ">" ? O.BLOCK_FOLDED : O.BLOCK_LITERAL, o = e.source ? pn(e.source) : [];
2734
+ const r = i.mode === ">" ? A.BLOCK_FOLDED : A.BLOCK_LITERAL, o = e.source ? pn(e.source) : [];
2718
2735
  let l = o.length;
2719
- for (let h = o.length - 1; h >= 0; --h) {
2720
- const p = o[h][1];
2721
- if (p === "" || p === "\r")
2722
- l = h;
2736
+ for (let u = o.length - 1; u >= 0; --u) {
2737
+ const m = o[u][1];
2738
+ if (m === "" || m === "\r")
2739
+ l = u;
2723
2740
  else
2724
2741
  break;
2725
2742
  }
2726
2743
  if (l === 0) {
2727
- const h = i.chomp === "+" && o.length > 0 ? `
2744
+ const u = i.chomp === "+" && o.length > 0 ? `
2728
2745
  `.repeat(Math.max(1, o.length - 1)) : "";
2729
- let p = n + i.length;
2730
- return e.source && (p += e.source.length), { value: h, type: r, comment: i.comment, range: [n, p, p] };
2746
+ let m = n + i.length;
2747
+ return e.source && (m += e.source.length), { value: u, type: r, comment: i.comment, range: [n, m, m] };
2731
2748
  }
2732
- let a = e.indent + i.indent, c = e.offset + i.length, d = 0;
2733
- for (let h = 0; h < l; ++h) {
2734
- const [p, b] = o[h];
2749
+ let a = e.indent + i.indent, c = e.offset + i.length, p = 0;
2750
+ for (let u = 0; u < l; ++u) {
2751
+ const [m, b] = o[u];
2735
2752
  if (b === "" || b === "\r")
2736
- i.indent === 0 && p.length > a && (a = p.length);
2753
+ i.indent === 0 && m.length > a && (a = m.length);
2737
2754
  else {
2738
- p.length < a && t(c + p.length, "MISSING_CHAR", "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"), i.indent === 0 && (a = p.length), d = h, a === 0 && !s.atRoot && t(c, "BAD_INDENT", "Block scalar values in collections must be indented");
2755
+ 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");
2739
2756
  break;
2740
2757
  }
2741
- c += p.length + b.length + 1;
2758
+ c += m.length + b.length + 1;
2742
2759
  }
2743
- for (let h = o.length - 1; h >= l; --h)
2744
- o[h][0].length > a && (l = h + 1);
2745
- let f = "", u = "", m = !1;
2746
- for (let h = 0; h < d; ++h)
2747
- f += o[h][0].slice(a) + `
2760
+ for (let u = o.length - 1; u >= l; --u)
2761
+ o[u][0].length > a && (l = u + 1);
2762
+ let f = "", d = "", h = !1;
2763
+ for (let u = 0; u < p; ++u)
2764
+ f += o[u][0].slice(a) + `
2748
2765
  `;
2749
- for (let h = d; h < l; ++h) {
2750
- let [p, b] = o[h];
2751
- c += p.length + b.length + 1;
2752
- const w = b[b.length - 1] === "\r";
2753
- if (w && (b = b.slice(0, -1)), b && p.length < a) {
2754
- const k = `Block scalar lines must not be less indented than their ${i.indent ? "explicit indentation indicator" : "first line"}`;
2755
- t(c - b.length - (w ? 2 : 1), "BAD_INDENT", k), p = "";
2766
+ for (let u = p; u < l; ++u) {
2767
+ let [m, b] = o[u];
2768
+ c += m.length + b.length + 1;
2769
+ const S = b[b.length - 1] === "\r";
2770
+ if (S && (b = b.slice(0, -1)), b && m.length < a) {
2771
+ const w = `Block scalar lines must not be less indented than their ${i.indent ? "explicit indentation indicator" : "first line"}`;
2772
+ t(c - b.length - (S ? 2 : 1), "BAD_INDENT", w), m = "";
2756
2773
  }
2757
- r === O.BLOCK_LITERAL ? (f += u + p.slice(a) + b, u = `
2758
- `) : p.length > a || b[0] === " " ? (u === " " ? u = `
2759
- ` : !m && u === `
2760
- ` && (u = `
2774
+ r === A.BLOCK_LITERAL ? (f += d + m.slice(a) + b, d = `
2775
+ `) : m.length > a || b[0] === " " ? (d === " " ? d = `
2776
+ ` : !h && d === `
2777
+ ` && (d = `
2761
2778
 
2762
- `), f += u + p.slice(a) + b, u = `
2763
- `, m = !0) : b === "" ? u === `
2779
+ `), f += d + m.slice(a) + b, d = `
2780
+ `, h = !0) : b === "" ? d === `
2764
2781
  ` ? f += `
2765
- ` : u = `
2766
- ` : (f += u + b, u = " ", m = !1);
2782
+ ` : d = `
2783
+ ` : (f += d + b, d = " ", h = !1);
2767
2784
  }
2768
2785
  switch (i.chomp) {
2769
2786
  case "-":
2770
2787
  break;
2771
2788
  case "+":
2772
- for (let h = l; h < o.length; ++h)
2789
+ for (let u = l; u < o.length; ++u)
2773
2790
  f += `
2774
- ` + o[h][0].slice(a);
2791
+ ` + o[u][0].slice(a);
2775
2792
  f[f.length - 1] !== `
2776
2793
  ` && (f += `
2777
2794
  `);
@@ -2788,45 +2805,45 @@ function dn({ offset: s, props: e }, t, n) {
2788
2805
  return n(e[0], "IMPOSSIBLE", "Block scalar header not found"), null;
2789
2806
  const { source: i } = e[0], r = i[0];
2790
2807
  let o = 0, l = "", a = -1;
2791
- for (let u = 1; u < i.length; ++u) {
2792
- const m = i[u];
2793
- if (!l && (m === "-" || m === "+"))
2794
- l = m;
2808
+ for (let d = 1; d < i.length; ++d) {
2809
+ const h = i[d];
2810
+ if (!l && (h === "-" || h === "+"))
2811
+ l = h;
2795
2812
  else {
2796
- const y = Number(m);
2797
- !o && y ? o = y : a === -1 && (a = s + u);
2813
+ const y = Number(h);
2814
+ !o && y ? o = y : a === -1 && (a = s + d);
2798
2815
  }
2799
2816
  }
2800
2817
  a !== -1 && n(a, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${i}`);
2801
- let c = !1, d = "", f = i.length;
2802
- for (let u = 1; u < e.length; ++u) {
2803
- const m = e[u];
2804
- switch (m.type) {
2818
+ let c = !1, p = "", f = i.length;
2819
+ for (let d = 1; d < e.length; ++d) {
2820
+ const h = e[d];
2821
+ switch (h.type) {
2805
2822
  case "space":
2806
2823
  c = !0;
2807
2824
  // fallthrough
2808
2825
  case "newline":
2809
- f += m.source.length;
2826
+ f += h.source.length;
2810
2827
  break;
2811
2828
  case "comment":
2812
- t && !c && n(m, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"), f += m.source.length, d = m.source.substring(1);
2829
+ 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);
2813
2830
  break;
2814
2831
  case "error":
2815
- n(m, "UNEXPECTED_TOKEN", m.message), f += m.source.length;
2832
+ n(h, "UNEXPECTED_TOKEN", h.message), f += h.source.length;
2816
2833
  break;
2817
2834
  /* istanbul ignore next should not happen */
2818
2835
  default: {
2819
- const y = `Unexpected token in block scalar header: ${m.type}`;
2820
- n(m, "UNEXPECTED_TOKEN", y);
2821
- const h = m.source;
2822
- h && typeof h == "string" && (f += h.length);
2836
+ const y = `Unexpected token in block scalar header: ${h.type}`;
2837
+ n(h, "UNEXPECTED_TOKEN", y);
2838
+ const u = h.source;
2839
+ u && typeof u == "string" && (f += u.length);
2823
2840
  }
2824
2841
  }
2825
2842
  }
2826
- return { mode: r, indent: o, chomp: l, comment: d, length: f };
2843
+ return { mode: r, indent: o, chomp: l, comment: p, length: f };
2827
2844
  }
2828
2845
  function pn(s) {
2829
- const e = s.split(/\n( *)/), t = e[0], n = t.match(/^( *)/), r = [n?.[1] ? [n[1], t.slice(n[1].length)] : ["", t]];
2846
+ const e = s.split(/\n( *)/), t = e[0], n = t.match(/^( *)/), r = [n != null && n[1] ? [n[1], t.slice(n[1].length)] : ["", t]];
2830
2847
  for (let o = 1; o < e.length; o += 2)
2831
2848
  r.push([e[o], e[o + 1]]);
2832
2849
  return r;
@@ -2834,16 +2851,16 @@ function pn(s) {
2834
2851
  function ws(s, e, t) {
2835
2852
  const { offset: n, type: i, source: r, end: o } = s;
2836
2853
  let l, a;
2837
- const c = (u, m, y) => t(n + u, m, y);
2854
+ const c = (d, h, y) => t(n + d, h, y);
2838
2855
  switch (i) {
2839
2856
  case "scalar":
2840
- l = O.PLAIN, a = mn(r, c);
2857
+ l = A.PLAIN, a = mn(r, c);
2841
2858
  break;
2842
2859
  case "single-quoted-scalar":
2843
- l = O.QUOTE_SINGLE, a = yn(r, c);
2860
+ l = A.QUOTE_SINGLE, a = yn(r, c);
2844
2861
  break;
2845
2862
  case "double-quoted-scalar":
2846
- l = O.QUOTE_DOUBLE, a = gn(r, c);
2863
+ l = A.QUOTE_DOUBLE, a = gn(r, c);
2847
2864
  break;
2848
2865
  /* istanbul ignore next should not happen */
2849
2866
  default:
@@ -2854,12 +2871,12 @@ function ws(s, e, t) {
2854
2871
  range: [n, n + r.length, n + r.length]
2855
2872
  };
2856
2873
  }
2857
- const d = n + r.length, f = Ie(o, d, e, t);
2874
+ const p = n + r.length, f = Ie(o, p, e, t);
2858
2875
  return {
2859
2876
  value: a,
2860
2877
  type: l,
2861
2878
  comment: f.comment,
2862
- range: [n, d, f.offset]
2879
+ range: [n, p, f.offset]
2863
2880
  };
2864
2881
  }
2865
2882
  function mn(s, e) {
@@ -2909,7 +2926,7 @@ function Ss(s) {
2909
2926
  ` ? i += r : r = `
2910
2927
  ` : (i += r + n[1], r = " "), o = t.lastIndex;
2911
2928
  const l = /[ \t]*(.*)/sy;
2912
- return l.lastIndex = o, n = l.exec(s), i + r + (n?.[1] ?? "");
2929
+ return l.lastIndex = o, n = l.exec(s), i + r + ((n == null ? void 0 : n[1]) ?? "");
2913
2930
  }
2914
2931
  function gn(s, e) {
2915
2932
  let t = "";
@@ -3010,39 +3027,46 @@ function ks(s, e, t, n) {
3010
3027
  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;
3011
3028
  let c;
3012
3029
  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];
3013
- let d;
3030
+ let p;
3014
3031
  try {
3015
- const f = c.resolve(i, (u) => n(t ?? e, "TAG_RESOLVE_FAILED", u), s.options);
3016
- d = E(f) ? f : new O(f);
3032
+ const f = c.resolve(i, (d) => n(t ?? e, "TAG_RESOLVE_FAILED", d), s.options);
3033
+ p = E(f) ? f : new A(f);
3017
3034
  } catch (f) {
3018
- const u = f instanceof Error ? f.message : String(f);
3019
- n(t ?? e, "TAG_RESOLVE_FAILED", u), d = new O(i);
3035
+ const d = f instanceof Error ? f.message : String(f);
3036
+ n(t ?? e, "TAG_RESOLVE_FAILED", d), p = new A(i);
3020
3037
  }
3021
- return d.range = l, d.source = i, r && (d.type = r), a && (d.tag = a), c.format && (d.format = c.format), o && (d.comment = o), d;
3038
+ 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;
3022
3039
  }
3023
3040
  function kn(s, e, t, n, i) {
3041
+ var l;
3024
3042
  if (t === "!")
3025
3043
  return s[R];
3026
3044
  const r = [];
3027
- for (const l of s.tags)
3028
- if (!l.collection && l.tag === t)
3029
- if (l.default && l.test)
3030
- r.push(l);
3045
+ for (const a of s.tags)
3046
+ if (!a.collection && a.tag === t)
3047
+ if (a.default && a.test)
3048
+ r.push(a);
3031
3049
  else
3032
- return l;
3033
- for (const l of r)
3034
- if (l.test?.test(e))
3035
- return l;
3050
+ return a;
3051
+ for (const a of r)
3052
+ if ((l = a.test) != null && l.test(e))
3053
+ return a;
3036
3054
  const o = s.knownTags[t];
3037
3055
  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]);
3038
3056
  }
3039
3057
  function Nn({ atKey: s, directives: e, schema: t }, n, i, r) {
3040
- const o = t.tags.find((l) => (l.default === !0 || s && l.default === "key") && l.test?.test(n)) || t[R];
3058
+ const o = t.tags.find((l) => {
3059
+ var a;
3060
+ return (l.default === !0 || s && l.default === "key") && ((a = l.test) == null ? void 0 : a.test(n));
3061
+ }) || t[R];
3041
3062
  if (t.compat) {
3042
- const l = t.compat.find((a) => a.default && a.test?.test(n)) ?? t[R];
3063
+ const l = t.compat.find((a) => {
3064
+ var c;
3065
+ return a.default && ((c = a.test) == null ? void 0 : c.test(n));
3066
+ }) ?? t[R];
3043
3067
  if (o.tag !== l.tag) {
3044
- const a = e.tagString(o.tag), c = e.tagString(l.tag), d = `Value may be parsed as either ${a} or ${c}`;
3045
- r(i, "TAG_RESOLVE_FAILED", d, !0);
3068
+ const a = e.tagString(o.tag), c = e.tagString(l.tag), p = `Value may be parsed as either ${a} or ${c}`;
3069
+ r(i, "TAG_RESOLVE_FAILED", p, !0);
3046
3070
  }
3047
3071
  }
3048
3072
  return o;
@@ -3059,7 +3083,7 @@ function On(s, e, t) {
3059
3083
  s -= i.source.length;
3060
3084
  continue;
3061
3085
  }
3062
- for (i = e[++n]; i?.type === "space"; )
3086
+ for (i = e[++n]; (i == null ? void 0 : i.type) === "space"; )
3063
3087
  s += i.source.length, i = e[++n];
3064
3088
  break;
3065
3089
  }
@@ -3069,7 +3093,7 @@ function On(s, e, t) {
3069
3093
  const An = { composeNode: Ns, composeEmptyNode: Et };
3070
3094
  function Ns(s, e, t, n) {
3071
3095
  const i = s.atKey, { spaceBefore: r, comment: o, anchor: l, tag: a } = t;
3072
- let c, d = !0;
3096
+ let c, p = !0;
3073
3097
  switch (e.type) {
3074
3098
  case "alias":
3075
3099
  c = En(s, e, n), (l || a) && n(e, "ALIAS_PROPS", "An alias node must not specify any properties");
@@ -3087,18 +3111,18 @@ function Ns(s, e, t, n) {
3087
3111
  break;
3088
3112
  default: {
3089
3113
  const f = e.type === "error" ? e.message : `Unsupported token (type: ${e.type})`;
3090
- n(e, "UNEXPECTED_TOKEN", f), c = Et(s, e.offset, void 0, null, t, n), d = !1;
3114
+ n(e, "UNEXPECTED_TOKEN", f), c = Et(s, e.offset, void 0, null, t, n), p = !1;
3091
3115
  }
3092
3116
  }
3093
- 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 && d && (c.srcToken = e), c;
3117
+ 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;
3094
3118
  }
3095
3119
  function Et(s, e, t, n, { spaceBefore: i, comment: r, anchor: o, tag: l, end: a }, c) {
3096
- const d = {
3120
+ const p = {
3097
3121
  type: "scalar",
3098
3122
  offset: On(e, t, n),
3099
3123
  indent: -1,
3100
3124
  source: ""
3101
- }, f = ks(s, d, l, c);
3125
+ }, f = ks(s, p, l, c);
3102
3126
  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;
3103
3127
  }
3104
3128
  function En({ options: s }, { offset: e, source: t, end: n }, i) {
@@ -3114,17 +3138,17 @@ function In(s, e, { offset: t, start: n, value: i, end: r }, o) {
3114
3138
  directives: a.directives,
3115
3139
  options: a.options,
3116
3140
  schema: a.schema
3117
- }, d = ue(n, {
3141
+ }, p = ue(n, {
3118
3142
  indicator: "doc-start",
3119
- next: i ?? r?.[0],
3143
+ next: i ?? (r == null ? void 0 : r[0]),
3120
3144
  offset: t,
3121
3145
  onError: o,
3122
3146
  parentIndent: 0,
3123
3147
  startOnNewline: !0
3124
3148
  });
3125
- d.found && (a.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !d.hasNewline && o(d.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), a.contents = i ? Ns(c, i, d, o) : Et(c, d.end, n, null, d, o);
3126
- const f = a.contents.range[2], u = Ie(r, f, !1, o);
3127
- return u.comment && (a.comment = u.comment), a.range = [t, f, u.offset], a;
3149
+ 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);
3150
+ const f = a.contents.range[2], d = Ie(r, f, !1, o);
3151
+ return d.comment && (a.comment = d.comment), a.range = [t, f, d.offset], a;
3128
3152
  }
3129
3153
  function be(s) {
3130
3154
  if (typeof s == "number")
@@ -3135,18 +3159,19 @@ function be(s) {
3135
3159
  return [e, e + (typeof t == "string" ? t.length : 1)];
3136
3160
  }
3137
3161
  function Kt(s) {
3162
+ var i;
3138
3163
  let e = "", t = !1, n = !1;
3139
- for (let i = 0; i < s.length; ++i) {
3140
- const r = s[i];
3141
- switch (r[0]) {
3164
+ for (let r = 0; r < s.length; ++r) {
3165
+ const o = s[r];
3166
+ switch (o[0]) {
3142
3167
  case "#":
3143
3168
  e += (e === "" ? "" : n ? `
3144
3169
 
3145
3170
  ` : `
3146
- `) + (r.substring(1) || " "), t = !0, n = !1;
3171
+ `) + (o.substring(1) || " "), t = !0, n = !1;
3147
3172
  break;
3148
3173
  case "%":
3149
- s[i + 1]?.[0] !== "#" && (i += 1), t = !1;
3174
+ ((i = s[r + 1]) == null ? void 0 : i[0]) !== "#" && (r += 1), t = !1;
3150
3175
  break;
3151
3176
  default:
3152
3177
  t || (n = !0), t = !1;
@@ -3303,12 +3328,12 @@ function Ln(s, e) {
3303
3328
  case "|":
3304
3329
  case ">": {
3305
3330
  const c = l.indexOf(`
3306
- `), d = l.substring(0, c), f = l.substring(c + 1) + `
3307
- `, u = [
3308
- { type: "block-scalar-header", offset: r, indent: n, source: d }
3331
+ `), p = l.substring(0, c), f = l.substring(c + 1) + `
3332
+ `, d = [
3333
+ { type: "block-scalar-header", offset: r, indent: n, source: p }
3309
3334
  ];
3310
- return Os(u, a) || u.push({ type: "newline", offset: -1, indent: n, source: `
3311
- ` }), { type: "block-scalar", offset: r, indent: n, props: u, source: f };
3335
+ return Os(d, a) || d.push({ type: "newline", offset: -1, indent: n, source: `
3336
+ ` }), { type: "block-scalar", offset: r, indent: n, props: d, source: f };
3312
3337
  }
3313
3338
  case '"':
3314
3339
  return { type: "double-quoted-scalar", offset: r, indent: n, source: l, end: a };
@@ -3473,16 +3498,16 @@ function Ke({ start: s, key: e, sep: t, value: n }) {
3473
3498
  return n && (i += qe(n)), i;
3474
3499
  }
3475
3500
  const ht = Symbol("break visit"), vn = Symbol("skip children"), As = Symbol("remove item");
3476
- function x(s, e) {
3501
+ function Z(s, e) {
3477
3502
  "type" in s && s.type === "document" && (s = { start: s.start, value: s.value }), Es(Object.freeze([]), s, e);
3478
3503
  }
3479
- x.BREAK = ht;
3480
- x.SKIP = vn;
3481
- x.REMOVE = As;
3482
- x.itemAtPath = (s, e) => {
3504
+ Z.BREAK = ht;
3505
+ Z.SKIP = vn;
3506
+ Z.REMOVE = As;
3507
+ Z.itemAtPath = (s, e) => {
3483
3508
  let t = s;
3484
3509
  for (const [n, i] of e) {
3485
- const r = t?.[n];
3510
+ const r = t == null ? void 0 : t[n];
3486
3511
  if (r && "items" in r)
3487
3512
  t = r.items[i];
3488
3513
  else
@@ -3490,8 +3515,8 @@ x.itemAtPath = (s, e) => {
3490
3515
  }
3491
3516
  return t;
3492
3517
  };
3493
- x.parentCollection = (s, e) => {
3494
- const t = x.itemAtPath(s, e.slice(0, -1)), n = e[e.length - 1][0], i = t?.[n];
3518
+ Z.parentCollection = (s, e) => {
3519
+ const t = Z.itemAtPath(s, e.slice(0, -1)), n = e[e.length - 1][0], i = t == null ? void 0 : t[n];
3495
3520
  if (i && "items" in i)
3496
3521
  return i;
3497
3522
  throw new Error("Parent collection not found");
@@ -3518,14 +3543,14 @@ function Es(s, e, t) {
3518
3543
  }
3519
3544
  return typeof n == "function" ? n(e, s) : n;
3520
3545
  }
3521
- const ze = "\uFEFF", xe = "", Ze = "", 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");
3546
+ 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");
3522
3547
  function Kn(s) {
3523
3548
  switch (s) {
3524
3549
  case ze:
3525
3550
  return "<BOM>";
3526
- case xe:
3527
- return "<DOC>";
3528
3551
  case Ze:
3552
+ return "<DOC>";
3553
+ case xe:
3529
3554
  return "<FLOW_END>";
3530
3555
  case Oe:
3531
3556
  return "<SCALAR>";
@@ -3537,9 +3562,9 @@ function Is(s) {
3537
3562
  switch (s) {
3538
3563
  case ze:
3539
3564
  return "byte-order-mark";
3540
- case xe:
3541
- return "doc-mode";
3542
3565
  case Ze:
3566
+ return "doc-mode";
3567
+ case xe:
3543
3568
  return "flow-error-end";
3544
3569
  case Oe:
3545
3570
  return "scalar";
@@ -3594,11 +3619,11 @@ function Is(s) {
3594
3619
  }
3595
3620
  return null;
3596
3621
  }
3597
- const jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3622
+ const Pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3598
3623
  __proto__: null,
3599
3624
  BOM: ze,
3600
- DOCUMENT: xe,
3601
- FLOW_END: Ze,
3625
+ DOCUMENT: Ze,
3626
+ FLOW_END: xe,
3602
3627
  SCALAR: Oe,
3603
3628
  createScalarToken: Ln,
3604
3629
  isCollection: Bn,
@@ -3608,7 +3633,7 @@ const jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3608
3633
  setScalarValue: $n,
3609
3634
  stringify: Cn,
3610
3635
  tokenType: Is,
3611
- visit: x
3636
+ visit: Z
3612
3637
  }, Symbol.toStringTag, { value: "Module" }));
3613
3638
  function D(s) {
3614
3639
  switch (s) {
@@ -3623,7 +3648,7 @@ function D(s) {
3623
3648
  return !1;
3624
3649
  }
3625
3650
  }
3626
- const jt = new Set("0123456789ABCDEFabcdef"), Pn = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), _e = new Set(",[]{}"), Dn = new Set(` ,[]{}
3651
+ const Pt = new Set("0123456789ABCDEFabcdef"), jn = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), _e = new Set(",[]{}"), Dn = new Set(` ,[]{}
3627
3652
  \r `), ot = (s) => !s || Dn.has(s);
3628
3653
  class Ts {
3629
3654
  constructor() {
@@ -3741,7 +3766,7 @@ class Ts {
3741
3766
  const t = yield* this.pushSpaces(!0);
3742
3767
  return yield* this.pushCount(e.length - t), yield* this.pushNewline(), "stream";
3743
3768
  }
3744
- return yield xe, yield* this.parseLineStart();
3769
+ return yield Ze, yield* this.parseLineStart();
3745
3770
  }
3746
3771
  *parseLineStart() {
3747
3772
  const e = this.charAt(0);
@@ -3805,7 +3830,7 @@ class Ts {
3805
3830
  if (i === null)
3806
3831
  return this.setNext("flow");
3807
3832
  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] === "}")))
3808
- return this.flowLevel = 0, yield Ze, yield* this.parseLineStart();
3833
+ return this.flowLevel = 0, yield xe, yield* this.parseLineStart();
3809
3834
  let r = 0;
3810
3835
  for (; i[r] === ","; )
3811
3836
  r += yield* this.pushCount(1), r += yield* this.pushSpaces(!0), this.flowKey = !1;
@@ -4010,9 +4035,9 @@ class Ts {
4010
4035
  } else {
4011
4036
  let e = this.pos + 1, t = this.buffer[e];
4012
4037
  for (; t; )
4013
- if (Pn.has(t))
4038
+ if (jn.has(t))
4014
4039
  t = this.buffer[++e];
4015
- else if (t === "%" && jt.has(this.buffer[e + 1]) && jt.has(this.buffer[e + 2]))
4040
+ else if (t === "%" && Pt.has(this.buffer[e + 1]) && Pt.has(this.buffer[e + 2]))
4016
4041
  t = this.buffer[e += 3];
4017
4042
  else
4018
4043
  break;
@@ -4063,7 +4088,7 @@ function Y(s, e) {
4063
4088
  return !0;
4064
4089
  return !1;
4065
4090
  }
4066
- function Pt(s) {
4091
+ function jt(s) {
4067
4092
  for (let e = 0; e < s.length; ++e)
4068
4093
  switch (s[e].type) {
4069
4094
  case "space":
@@ -4076,7 +4101,7 @@ function Pt(s) {
4076
4101
  return -1;
4077
4102
  }
4078
4103
  function $s(s) {
4079
- switch (s?.type) {
4104
+ switch (s == null ? void 0 : s.type) {
4080
4105
  case "alias":
4081
4106
  case "scalar":
4082
4107
  case "single-quoted-scalar":
@@ -4103,6 +4128,7 @@ function Ce(s) {
4103
4128
  }
4104
4129
  }
4105
4130
  function ne(s) {
4131
+ var t;
4106
4132
  if (s.length === 0)
4107
4133
  return [];
4108
4134
  let e = s.length;
@@ -4115,7 +4141,7 @@ function ne(s) {
4115
4141
  case "newline":
4116
4142
  break e;
4117
4143
  }
4118
- for (; s[++e]?.type === "space"; )
4144
+ for (; ((t = s[++e]) == null ? void 0 : t.type) === "space"; )
4119
4145
  ;
4120
4146
  return s.splice(e, s.length);
4121
4147
  }
@@ -4279,7 +4305,7 @@ class Tt {
4279
4305
  }
4280
4306
  if ((n.type === "document" || n.type === "block-map" || n.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
4281
4307
  const i = t.items[t.items.length - 1];
4282
- i && !i.sep && !i.value && i.start.length > 0 && Pt(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));
4308
+ 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));
4283
4309
  }
4284
4310
  }
4285
4311
  }
@@ -4317,7 +4343,7 @@ class Tt {
4317
4343
  return yield* this.lineEnd(e);
4318
4344
  switch (this.type) {
4319
4345
  case "doc-start": {
4320
- Pt(e.start) !== -1 ? (yield* this.pop(), yield* this.step()) : e.start.push(this.sourceToken);
4346
+ jt(e.start) !== -1 ? (yield* this.pop(), yield* this.step()) : e.start.push(this.sourceToken);
4321
4347
  return;
4322
4348
  }
4323
4349
  case "anchor":
@@ -4374,12 +4400,13 @@ class Tt {
4374
4400
  }
4375
4401
  }
4376
4402
  *blockMap(e) {
4403
+ var n;
4377
4404
  const t = e.items[e.items.length - 1];
4378
4405
  switch (this.type) {
4379
4406
  case "newline":
4380
4407
  if (this.onKeyLine = !1, t.value) {
4381
- const n = "end" in t.value ? t.value.end : void 0;
4382
- (Array.isArray(n) ? n[n.length - 1] : void 0)?.type === "comment" ? n?.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
4408
+ const i = "end" in t.value ? t.value.end : void 0, r = Array.isArray(i) ? i[i.length - 1] : void 0;
4409
+ (r == null ? void 0 : r.type) === "comment" ? i == null || i.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
4383
4410
  } else t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
4384
4411
  return;
4385
4412
  case "space":
@@ -4390,9 +4417,9 @@ class Tt {
4390
4417
  t.sep.push(this.sourceToken);
4391
4418
  else {
4392
4419
  if (this.atIndentedComment(t.start, e.indent)) {
4393
- const i = e.items[e.items.length - 2]?.value?.end;
4394
- if (Array.isArray(i)) {
4395
- Array.prototype.push.apply(i, t.start), i.push(this.sourceToken), e.items.pop();
4420
+ const i = e.items[e.items.length - 2], r = (n = i == null ? void 0 : i.value) == null ? void 0 : n.end;
4421
+ if (Array.isArray(r)) {
4422
+ Array.prototype.push.apply(r, t.start), r.push(this.sourceToken), e.items.pop();
4396
4423
  return;
4397
4424
  }
4398
4425
  }
@@ -4401,34 +4428,34 @@ class Tt {
4401
4428
  return;
4402
4429
  }
4403
4430
  if (this.indent >= e.indent) {
4404
- const n = !this.onKeyLine && this.indent === e.indent, i = n && (t.sep || t.explicitKey) && this.type !== "seq-item-ind";
4405
- let r = [];
4406
- if (i && t.sep && !t.value) {
4407
- const o = [];
4408
- for (let l = 0; l < t.sep.length; ++l) {
4409
- const a = t.sep[l];
4410
- switch (a.type) {
4431
+ const i = !this.onKeyLine && this.indent === e.indent, r = i && (t.sep || t.explicitKey) && this.type !== "seq-item-ind";
4432
+ let o = [];
4433
+ if (r && t.sep && !t.value) {
4434
+ const l = [];
4435
+ for (let a = 0; a < t.sep.length; ++a) {
4436
+ const c = t.sep[a];
4437
+ switch (c.type) {
4411
4438
  case "newline":
4412
- o.push(l);
4439
+ l.push(a);
4413
4440
  break;
4414
4441
  case "space":
4415
4442
  break;
4416
4443
  case "comment":
4417
- a.indent > e.indent && (o.length = 0);
4444
+ c.indent > e.indent && (l.length = 0);
4418
4445
  break;
4419
4446
  default:
4420
- o.length = 0;
4447
+ l.length = 0;
4421
4448
  }
4422
4449
  }
4423
- o.length >= 2 && (r = t.sep.splice(o[1]));
4450
+ l.length >= 2 && (o = t.sep.splice(l[1]));
4424
4451
  }
4425
4452
  switch (this.type) {
4426
4453
  case "anchor":
4427
4454
  case "tag":
4428
- i || t.value ? (r.push(this.sourceToken), e.items.push({ start: r }), this.onKeyLine = !0) : t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
4455
+ 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);
4429
4456
  return;
4430
4457
  case "explicit-key-ind":
4431
- !t.sep && !t.explicitKey ? (t.start.push(this.sourceToken), t.explicitKey = !0) : i || t.value ? (r.push(this.sourceToken), e.items.push({ start: r, explicitKey: !0 })) : this.stack.push({
4458
+ !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({
4432
4459
  type: "block-map",
4433
4460
  offset: this.offset,
4434
4461
  indent: this.indent,
@@ -4445,30 +4472,30 @@ class Tt {
4445
4472
  type: "block-map",
4446
4473
  offset: this.offset,
4447
4474
  indent: this.indent,
4448
- items: [{ start: r, key: null, sep: [this.sourceToken] }]
4475
+ items: [{ start: o, key: null, sep: [this.sourceToken] }]
4449
4476
  });
4450
4477
  else if ($s(t.key) && !Y(t.sep, "newline")) {
4451
- const o = ne(t.start), l = t.key, a = t.sep;
4452
- a.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
4478
+ const l = ne(t.start), a = t.key, c = t.sep;
4479
+ c.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
4453
4480
  type: "block-map",
4454
4481
  offset: this.offset,
4455
4482
  indent: this.indent,
4456
- items: [{ start: o, key: l, sep: a }]
4483
+ items: [{ start: l, key: a, sep: c }]
4457
4484
  });
4458
- } else r.length > 0 ? t.sep = t.sep.concat(r, this.sourceToken) : t.sep.push(this.sourceToken);
4485
+ } else o.length > 0 ? t.sep = t.sep.concat(o, this.sourceToken) : t.sep.push(this.sourceToken);
4459
4486
  else if (Y(t.start, "newline"))
4460
4487
  Object.assign(t, { key: null, sep: [this.sourceToken] });
4461
4488
  else {
4462
- const o = ne(t.start);
4489
+ const l = ne(t.start);
4463
4490
  this.stack.push({
4464
4491
  type: "block-map",
4465
4492
  offset: this.offset,
4466
4493
  indent: this.indent,
4467
- items: [{ start: o, key: null, sep: [this.sourceToken] }]
4494
+ items: [{ start: l, key: null, sep: [this.sourceToken] }]
4468
4495
  });
4469
4496
  }
4470
4497
  else
4471
- t.sep ? t.value || i ? e.items.push({ start: r, key: null, sep: [this.sourceToken] }) : Y(t.sep, "map-value-ind") ? this.stack.push({
4498
+ t.sep ? t.value || r ? e.items.push({ start: o, key: null, sep: [this.sourceToken] }) : Y(t.sep, "map-value-ind") ? this.stack.push({
4472
4499
  type: "block-map",
4473
4500
  offset: this.offset,
4474
4501
  indent: this.indent,
@@ -4480,14 +4507,14 @@ class Tt {
4480
4507
  case "scalar":
4481
4508
  case "single-quoted-scalar":
4482
4509
  case "double-quoted-scalar": {
4483
- const o = this.flowScalar(this.type);
4484
- i || t.value ? (e.items.push({ start: r, key: o, sep: [] }), this.onKeyLine = !0) : t.sep ? this.stack.push(o) : (Object.assign(t, { key: o, sep: [] }), this.onKeyLine = !0);
4510
+ const l = this.flowScalar(this.type);
4511
+ 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);
4485
4512
  return;
4486
4513
  }
4487
4514
  default: {
4488
- const o = this.startBlockValue(e);
4489
- if (o) {
4490
- if (o.type === "block-seq") {
4515
+ const l = this.startBlockValue(e);
4516
+ if (l) {
4517
+ if (l.type === "block-seq") {
4491
4518
  if (!t.explicitKey && t.sep && !Y(t.sep, "newline")) {
4492
4519
  yield* this.pop({
4493
4520
  type: "error",
@@ -4497,8 +4524,8 @@ class Tt {
4497
4524
  });
4498
4525
  return;
4499
4526
  }
4500
- } else n && e.items.push({ start: r });
4501
- this.stack.push(o);
4527
+ } else i && e.items.push({ start: o });
4528
+ this.stack.push(l);
4502
4529
  return;
4503
4530
  }
4504
4531
  }
@@ -4507,12 +4534,13 @@ class Tt {
4507
4534
  yield* this.pop(), yield* this.step();
4508
4535
  }
4509
4536
  *blockSequence(e) {
4537
+ var n;
4510
4538
  const t = e.items[e.items.length - 1];
4511
4539
  switch (this.type) {
4512
4540
  case "newline":
4513
4541
  if (t.value) {
4514
- const n = "end" in t.value ? t.value.end : void 0;
4515
- (Array.isArray(n) ? n[n.length - 1] : void 0)?.type === "comment" ? n?.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
4542
+ const i = "end" in t.value ? t.value.end : void 0, r = Array.isArray(i) ? i[i.length - 1] : void 0;
4543
+ (r == null ? void 0 : r.type) === "comment" ? i == null || i.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
4516
4544
  } else
4517
4545
  t.start.push(this.sourceToken);
4518
4546
  return;
@@ -4522,9 +4550,9 @@ class Tt {
4522
4550
  e.items.push({ start: [this.sourceToken] });
4523
4551
  else {
4524
4552
  if (this.atIndentedComment(t.start, e.indent)) {
4525
- const i = e.items[e.items.length - 2]?.value?.end;
4526
- if (Array.isArray(i)) {
4527
- Array.prototype.push.apply(i, t.start), i.push(this.sourceToken), e.items.pop();
4553
+ const i = e.items[e.items.length - 2], r = (n = i == null ? void 0 : i.value) == null ? void 0 : n.end;
4554
+ if (Array.isArray(r)) {
4555
+ Array.prototype.push.apply(r, t.start), r.push(this.sourceToken), e.items.pop();
4528
4556
  return;
4529
4557
  }
4530
4558
  }
@@ -4544,9 +4572,9 @@ class Tt {
4544
4572
  return;
4545
4573
  }
4546
4574
  if (this.indent > e.indent) {
4547
- const n = this.startBlockValue(e);
4548
- if (n) {
4549
- this.stack.push(n);
4575
+ const i = this.startBlockValue(e);
4576
+ if (i) {
4577
+ this.stack.push(i);
4550
4578
  return;
4551
4579
  }
4552
4580
  }
@@ -4711,14 +4739,14 @@ function _s(s) {
4711
4739
  return { lineCounter: s.lineCounter || e && new Ls() || null, prettyErrors: e };
4712
4740
  }
4713
4741
  function qn(s, e = {}) {
4714
- const { lineCounter: t, prettyErrors: n } = _s(e), i = new Tt(t?.addNewLine), r = new It(e), o = Array.from(r.compose(i.parse(s)));
4742
+ 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)));
4715
4743
  if (n && t)
4716
4744
  for (const l of o)
4717
4745
  l.errors.forEach(De(s, t)), l.warnings.forEach(De(s, t));
4718
4746
  return o.length > 0 ? o : Object.assign([], { empty: !0 }, r.streamInfo());
4719
4747
  }
4720
4748
  function Cs(s, e = {}) {
4721
- const { lineCounter: t, prettyErrors: n } = _s(e), i = new Tt(t?.addNewLine), r = new It(e);
4749
+ const { lineCounter: t, prettyErrors: n } = _s(e), i = new Tt(t == null ? void 0 : t.addNewLine), r = new It(e);
4722
4750
  let o = null;
4723
4751
  for (const l of r.compose(i.parse(s), !0, s.length))
4724
4752
  if (!o)
@@ -4758,21 +4786,21 @@ function Rn(s, e, t) {
4758
4786
  const Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4759
4787
  __proto__: null,
4760
4788
  Alias: Re,
4761
- CST: jn,
4789
+ CST: Pn,
4762
4790
  Composer: It,
4763
4791
  Document: ge,
4764
4792
  Lexer: Ts,
4765
4793
  LineCounter: Ls,
4766
4794
  Pair: v,
4767
4795
  Parser: Tt,
4768
- Scalar: O,
4796
+ Scalar: A,
4769
4797
  Schema: Xe,
4770
4798
  YAMLError: At,
4771
4799
  YAMLMap: K,
4772
4800
  YAMLParseError: z,
4773
4801
  YAMLSeq: W,
4774
4802
  YAMLWarning: ys,
4775
- isAlias: Z,
4803
+ isAlias: x,
4776
4804
  isCollection: L,
4777
4805
  isDocument: ee,
4778
4806
  isMap: de,
@@ -4789,14 +4817,14 @@ const Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4789
4817
  }, Symbol.toStringTag, { value: "Module" }));
4790
4818
  export {
4791
4819
  Re as Alias,
4792
- jn as CST,
4820
+ Pn as CST,
4793
4821
  It as Composer,
4794
4822
  ge as Document,
4795
4823
  Ts as Lexer,
4796
4824
  Ls as LineCounter,
4797
4825
  v as Pair,
4798
4826
  Tt as Parser,
4799
- O as Scalar,
4827
+ A as Scalar,
4800
4828
  Xe as Schema,
4801
4829
  At as YAMLError,
4802
4830
  K as YAMLMap,
@@ -4804,7 +4832,7 @@ export {
4804
4832
  W as YAMLSeq,
4805
4833
  ys as YAMLWarning,
4806
4834
  Un as default,
4807
- Z as isAlias,
4835
+ x as isAlias,
4808
4836
  L as isCollection,
4809
4837
  ee as isDocument,
4810
4838
  de as isMap,
@@ -4819,4 +4847,4 @@ export {
4819
4847
  Q as visit,
4820
4848
  Fe as visitAsync
4821
4849
  };
4822
- //# sourceMappingURL=index-zddirpDj.js.map
4850
+ //# sourceMappingURL=index-DcHeSvkE.js.map