@rpamis/comet 0.4.0-beta.13 → 0.4.0-beta.15

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 (361) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +13 -1
  3. package/assets/manifest.json +1 -1
  4. package/assets/skills/comet/SKILL.md +6 -5
  5. package/assets/skills/comet/reference/subagent-dispatch.md +2 -4
  6. package/assets/skills/comet/rules/comet-phase-guard.en.md +4 -3
  7. package/assets/skills/comet/rules/comet-phase-guard.md +4 -3
  8. package/assets/skills/comet/rules/comet-workflow-guard.en.md +1 -1
  9. package/assets/skills/comet/rules/comet-workflow-guard.md +1 -1
  10. package/assets/skills/comet/scripts/comet-archive.mjs +85 -85
  11. package/assets/skills/comet/scripts/comet-entry-runtime.mjs +1 -1
  12. package/assets/skills/comet/scripts/comet-guard.mjs +111 -111
  13. package/assets/skills/comet/scripts/comet-handoff.mjs +85 -85
  14. package/assets/skills/comet/scripts/comet-hook-guard.mjs +91 -89
  15. package/assets/skills/comet/scripts/comet-hook-router.mjs +124 -116
  16. package/assets/skills/comet/scripts/comet-resume-probe.mjs +77 -77
  17. package/assets/skills/comet/scripts/comet-runtime.mjs +188 -185
  18. package/assets/skills/comet/scripts/comet-state.mjs +108 -107
  19. package/assets/skills/comet/scripts/comet-yaml-validate.mjs +95 -95
  20. package/assets/skills/comet-any/SKILL.md +1 -1
  21. package/assets/skills/comet-any/reference/authoring-subagents.md +3 -11
  22. package/assets/skills/comet-any/reference/subagents/pause-points-author.md +1 -4
  23. package/assets/skills/comet-any/reference/subagents/reference-author.md +1 -4
  24. package/assets/skills/comet-any/reference/subagents/script-author.md +1 -4
  25. package/assets/skills/comet-any/reference/subagents/skill-core-author.md +1 -4
  26. package/assets/skills/comet-any/reference/subagents/skill-reviewer.md +1 -4
  27. package/assets/skills/comet-any/reference/subagents/workflow-entry-author.md +1 -4
  28. package/assets/skills/comet-build/SKILL.md +2 -2
  29. package/assets/skills/comet-native/SKILL.md +85 -11
  30. package/assets/skills/comet-native/reference/artifacts.md +3 -1
  31. package/assets/skills/comet-native/reference/commands.md +15 -6
  32. package/assets/skills/comet-native/reference/recovery.md +12 -1
  33. package/assets/skills/comet-native/scripts/comet-native-archive.mjs +124 -118
  34. package/assets/skills/comet-native/scripts/comet-native-check.mjs +116 -110
  35. package/assets/skills/comet-native/scripts/comet-native-checkpoint.mjs +110 -110
  36. package/assets/skills/comet-native/scripts/comet-native-doctor.mjs +121 -121
  37. package/assets/skills/comet-native/scripts/comet-native-evidence.mjs +83 -83
  38. package/assets/skills/comet-native/scripts/comet-native-hook-guard.mjs +88 -82
  39. package/assets/skills/comet-native/scripts/comet-native-init.mjs +85 -85
  40. package/assets/skills/comet-native/scripts/comet-native-new.mjs +114 -114
  41. package/assets/skills/comet-native/scripts/comet-native-next.mjs +122 -122
  42. package/assets/skills/comet-native/scripts/comet-native-receipt.mjs +124 -116
  43. package/assets/skills/comet-native/scripts/comet-native-root.mjs +110 -110
  44. package/assets/skills/comet-native/scripts/comet-native-runtime.mjs +154 -152
  45. package/assets/skills/comet-native/scripts/comet-native-select.mjs +110 -110
  46. package/assets/skills/comet-native/scripts/comet-native-show.mjs +80 -80
  47. package/assets/skills/comet-native/scripts/comet-native-spec.mjs +112 -112
  48. package/assets/skills/comet-native/scripts/comet-native-status.mjs +107 -107
  49. package/assets/skills-zh/comet/SKILL.md +3 -3
  50. package/assets/skills-zh/comet/reference/subagent-dispatch.md +2 -4
  51. package/assets/skills-zh/comet-any/SKILL.md +1 -1
  52. package/assets/skills-zh/comet-any/reference/authoring-subagents.md +3 -14
  53. package/assets/skills-zh/comet-any/reference/subagents/pause-points-author.md +1 -4
  54. package/assets/skills-zh/comet-any/reference/subagents/reference-author.md +1 -4
  55. package/assets/skills-zh/comet-any/reference/subagents/script-author.md +1 -4
  56. package/assets/skills-zh/comet-any/reference/subagents/skill-core-author.md +1 -4
  57. package/assets/skills-zh/comet-any/reference/subagents/skill-reviewer.md +1 -4
  58. package/assets/skills-zh/comet-any/reference/subagents/workflow-entry-author.md +1 -4
  59. package/assets/skills-zh/comet-build/SKILL.md +2 -2
  60. package/assets/skills-zh/comet-native/SKILL.md +86 -12
  61. package/assets/skills-zh/comet-native/reference/artifacts.md +3 -1
  62. package/assets/skills-zh/comet-native/reference/commands.md +17 -8
  63. package/assets/skills-zh/comet-native/reference/recovery.md +14 -3
  64. package/bin/fast-runtime-router.js +1 -0
  65. package/dist/app/cli/index.js +1 -0
  66. package/dist/app/cli/index.js.map +1 -1
  67. package/dist/app/commands/doctor.d.ts.map +1 -1
  68. package/dist/app/commands/doctor.js +138 -37
  69. package/dist/app/commands/doctor.js.map +1 -1
  70. package/dist/app/commands/i18n.d.ts +1 -1
  71. package/dist/app/commands/i18n.d.ts.map +1 -1
  72. package/dist/app/commands/i18n.js +90 -0
  73. package/dist/app/commands/i18n.js.map +1 -1
  74. package/dist/app/commands/init.d.ts.map +1 -1
  75. package/dist/app/commands/init.js +45 -12
  76. package/dist/app/commands/init.js.map +1 -1
  77. package/dist/app/commands/project-scope-selection.d.ts +2 -1
  78. package/dist/app/commands/project-scope-selection.d.ts.map +1 -1
  79. package/dist/app/commands/project-scope-selection.js +5 -7
  80. package/dist/app/commands/project-scope-selection.js.map +1 -1
  81. package/dist/app/commands/uninstall.d.ts +6 -0
  82. package/dist/app/commands/uninstall.d.ts.map +1 -1
  83. package/dist/app/commands/uninstall.js +197 -110
  84. package/dist/app/commands/uninstall.js.map +1 -1
  85. package/dist/app/commands/update.d.ts.map +1 -1
  86. package/dist/app/commands/update.js +81 -10
  87. package/dist/app/commands/update.js.map +1 -1
  88. package/dist/app/commands/workflow.d.ts +1 -0
  89. package/dist/app/commands/workflow.d.ts.map +1 -1
  90. package/dist/app/commands/workflow.js +9 -2
  91. package/dist/app/commands/workflow.js.map +1 -1
  92. package/dist/domains/comet-classic/classic-hook-guard.d.ts +5 -1
  93. package/dist/domains/comet-classic/classic-hook-guard.d.ts.map +1 -1
  94. package/dist/domains/comet-classic/classic-hook-guard.js +104 -20
  95. package/dist/domains/comet-classic/classic-hook-guard.js.map +1 -1
  96. package/dist/domains/comet-classic/classic-layout-initialization.d.ts.map +1 -1
  97. package/dist/domains/comet-classic/classic-layout-initialization.js +8 -4
  98. package/dist/domains/comet-classic/classic-layout-initialization.js.map +1 -1
  99. package/dist/domains/comet-classic/classic-layout.d.ts.map +1 -1
  100. package/dist/domains/comet-classic/classic-layout.js +1 -0
  101. package/dist/domains/comet-classic/classic-layout.js.map +1 -1
  102. package/dist/domains/comet-classic/classic-plan-readiness.d.ts +12 -0
  103. package/dist/domains/comet-classic/classic-plan-readiness.d.ts.map +1 -0
  104. package/dist/domains/comet-classic/classic-plan-readiness.js +26 -0
  105. package/dist/domains/comet-classic/classic-plan-readiness.js.map +1 -0
  106. package/dist/domains/comet-classic/classic-project-config.d.ts +1 -0
  107. package/dist/domains/comet-classic/classic-project-config.d.ts.map +1 -1
  108. package/dist/domains/comet-classic/classic-project-config.js +13 -7
  109. package/dist/domains/comet-classic/classic-project-config.js.map +1 -1
  110. package/dist/domains/comet-classic/classic-state-command.d.ts.map +1 -1
  111. package/dist/domains/comet-classic/classic-state-command.js +58 -7
  112. package/dist/domains/comet-classic/classic-state-command.js.map +1 -1
  113. package/dist/domains/comet-entry/hook-adapter.d.ts.map +1 -1
  114. package/dist/domains/comet-entry/hook-adapter.js +15 -2
  115. package/dist/domains/comet-entry/hook-adapter.js.map +1 -1
  116. package/dist/domains/comet-entry/hook-project-root.d.ts +3 -0
  117. package/dist/domains/comet-entry/hook-project-root.d.ts.map +1 -0
  118. package/dist/domains/comet-entry/hook-project-root.js +62 -0
  119. package/dist/domains/comet-entry/hook-project-root.js.map +1 -0
  120. package/dist/domains/comet-entry/hook-router-entry.d.ts +2 -1
  121. package/dist/domains/comet-entry/hook-router-entry.d.ts.map +1 -1
  122. package/dist/domains/comet-entry/hook-router-entry.js +6 -4
  123. package/dist/domains/comet-entry/hook-router-entry.js.map +1 -1
  124. package/dist/domains/comet-entry/hook-router.d.ts +2 -0
  125. package/dist/domains/comet-entry/hook-router.d.ts.map +1 -1
  126. package/dist/domains/comet-entry/hook-router.js +45 -9
  127. package/dist/domains/comet-entry/hook-router.js.map +1 -1
  128. package/dist/domains/comet-entry/hook-types.d.ts +1 -0
  129. package/dist/domains/comet-entry/hook-types.d.ts.map +1 -1
  130. package/dist/domains/comet-entry/init-workflow.d.ts.map +1 -1
  131. package/dist/domains/comet-entry/init-workflow.js +2 -3
  132. package/dist/domains/comet-entry/init-workflow.js.map +1 -1
  133. package/dist/domains/comet-entry/project-activation.d.ts +12 -0
  134. package/dist/domains/comet-entry/project-activation.d.ts.map +1 -0
  135. package/dist/domains/comet-entry/project-activation.js +109 -0
  136. package/dist/domains/comet-entry/project-activation.js.map +1 -0
  137. package/dist/domains/comet-entry/resume-probe.d.ts.map +1 -1
  138. package/dist/domains/comet-entry/resume-probe.js +47 -26
  139. package/dist/domains/comet-entry/resume-probe.js.map +1 -1
  140. package/dist/domains/comet-entry/types.d.ts +1 -1
  141. package/dist/domains/comet-entry/types.d.ts.map +1 -1
  142. package/dist/domains/comet-native/native-archive-command.d.ts.map +1 -1
  143. package/dist/domains/comet-native/native-archive-command.js +43 -1
  144. package/dist/domains/comet-native/native-archive-command.js.map +1 -1
  145. package/dist/domains/comet-native/native-archive-inspection.d.ts.map +1 -1
  146. package/dist/domains/comet-native/native-archive-inspection.js +11 -0
  147. package/dist/domains/comet-native/native-archive-inspection.js.map +1 -1
  148. package/dist/domains/comet-native/native-archive-preflight.d.ts +10 -0
  149. package/dist/domains/comet-native/native-archive-preflight.d.ts.map +1 -1
  150. package/dist/domains/comet-native/native-archive-preflight.js +44 -0
  151. package/dist/domains/comet-native/native-archive-preflight.js.map +1 -1
  152. package/dist/domains/comet-native/native-change.d.ts +18 -1
  153. package/dist/domains/comet-native/native-change.d.ts.map +1 -1
  154. package/dist/domains/comet-native/native-change.js +72 -3
  155. package/dist/domains/comet-native/native-change.js.map +1 -1
  156. package/dist/domains/comet-native/native-check.d.ts.map +1 -1
  157. package/dist/domains/comet-native/native-check.js +13 -1
  158. package/dist/domains/comet-native/native-check.js.map +1 -1
  159. package/dist/domains/comet-native/native-cli-shared.d.ts +2 -2
  160. package/dist/domains/comet-native/native-cli-shared.d.ts.map +1 -1
  161. package/dist/domains/comet-native/native-cli-shared.js +24 -3
  162. package/dist/domains/comet-native/native-cli-shared.js.map +1 -1
  163. package/dist/domains/comet-native/native-conflict-inspection.d.ts +3 -1
  164. package/dist/domains/comet-native/native-conflict-inspection.d.ts.map +1 -1
  165. package/dist/domains/comet-native/native-conflict-inspection.js +20 -10
  166. package/dist/domains/comet-native/native-conflict-inspection.js.map +1 -1
  167. package/dist/domains/comet-native/native-continuation.d.ts.map +1 -1
  168. package/dist/domains/comet-native/native-continuation.js +16 -0
  169. package/dist/domains/comet-native/native-continuation.js.map +1 -1
  170. package/dist/domains/comet-native/native-diagnostics.d.ts +2 -0
  171. package/dist/domains/comet-native/native-diagnostics.d.ts.map +1 -1
  172. package/dist/domains/comet-native/native-diagnostics.js +43 -32
  173. package/dist/domains/comet-native/native-diagnostics.js.map +1 -1
  174. package/dist/domains/comet-native/native-evidence-storage.d.ts +6 -0
  175. package/dist/domains/comet-native/native-evidence-storage.d.ts.map +1 -1
  176. package/dist/domains/comet-native/native-evidence-storage.js +24 -0
  177. package/dist/domains/comet-native/native-evidence-storage.js.map +1 -1
  178. package/dist/domains/comet-native/native-findings.d.ts.map +1 -1
  179. package/dist/domains/comet-native/native-findings.js +36 -0
  180. package/dist/domains/comet-native/native-findings.js.map +1 -1
  181. package/dist/domains/comet-native/native-hook-guard.js +2 -2
  182. package/dist/domains/comet-native/native-hook-guard.js.map +1 -1
  183. package/dist/domains/comet-native/native-new-command.d.ts.map +1 -1
  184. package/dist/domains/comet-native/native-new-command.js +22 -7
  185. package/dist/domains/comet-native/native-new-command.js.map +1 -1
  186. package/dist/domains/comet-native/native-receipt-command.d.ts.map +1 -1
  187. package/dist/domains/comet-native/native-receipt-command.js +14 -1
  188. package/dist/domains/comet-native/native-receipt-command.js.map +1 -1
  189. package/dist/domains/comet-native/native-receipt-errors.d.ts +23 -0
  190. package/dist/domains/comet-native/native-receipt-errors.d.ts.map +1 -0
  191. package/dist/domains/comet-native/native-receipt-errors.js +9 -0
  192. package/dist/domains/comet-native/native-receipt-errors.js.map +1 -0
  193. package/dist/domains/comet-native/native-receipt-refresh.d.ts +3 -0
  194. package/dist/domains/comet-native/native-receipt-refresh.d.ts.map +1 -1
  195. package/dist/domains/comet-native/native-receipt-refresh.js +13 -2
  196. package/dist/domains/comet-native/native-receipt-refresh.js.map +1 -1
  197. package/dist/domains/comet-native/native-root-move.d.ts.map +1 -1
  198. package/dist/domains/comet-native/native-root-move.js +54 -1
  199. package/dist/domains/comet-native/native-root-move.js.map +1 -1
  200. package/dist/domains/comet-native/native-snapshot.d.ts.map +1 -1
  201. package/dist/domains/comet-native/native-snapshot.js +71 -14
  202. package/dist/domains/comet-native/native-snapshot.js.map +1 -1
  203. package/dist/domains/comet-native/native-transitions.d.ts.map +1 -1
  204. package/dist/domains/comet-native/native-transitions.js +74 -42
  205. package/dist/domains/comet-native/native-transitions.js.map +1 -1
  206. package/dist/domains/comet-native/native-verification-receipt-runtime.d.ts +37 -4
  207. package/dist/domains/comet-native/native-verification-receipt-runtime.d.ts.map +1 -1
  208. package/dist/domains/comet-native/native-verification-receipt-runtime.js +192 -4
  209. package/dist/domains/comet-native/native-verification-receipt-runtime.js.map +1 -1
  210. package/dist/domains/comet-native/native-verification-runtime.d.ts +27 -1
  211. package/dist/domains/comet-native/native-verification-runtime.d.ts.map +1 -1
  212. package/dist/domains/comet-native/native-verification-runtime.js +29 -6
  213. package/dist/domains/comet-native/native-verification-runtime.js.map +1 -1
  214. package/dist/domains/comet-native/native-workspace.d.ts +39 -3
  215. package/dist/domains/comet-native/native-workspace.d.ts.map +1 -1
  216. package/dist/domains/comet-native/native-workspace.js +200 -8
  217. package/dist/domains/comet-native/native-workspace.js.map +1 -1
  218. package/dist/domains/dashboard/collector.d.ts +26 -1
  219. package/dist/domains/dashboard/collector.d.ts.map +1 -1
  220. package/dist/domains/dashboard/collector.js +381 -1
  221. package/dist/domains/dashboard/collector.js.map +1 -1
  222. package/dist/domains/dashboard/native-adapter.d.ts +15 -0
  223. package/dist/domains/dashboard/native-adapter.d.ts.map +1 -1
  224. package/dist/domains/dashboard/native-adapter.js +1 -1
  225. package/dist/domains/dashboard/native-adapter.js.map +1 -1
  226. package/dist/domains/dashboard/native-collector.d.ts +26 -1
  227. package/dist/domains/dashboard/native-collector.d.ts.map +1 -1
  228. package/dist/domains/dashboard/native-collector.js +284 -5
  229. package/dist/domains/dashboard/native-collector.js.map +1 -1
  230. package/dist/domains/dashboard/server.d.ts.map +1 -1
  231. package/dist/domains/dashboard/server.js +92 -3
  232. package/dist/domains/dashboard/server.js.map +1 -1
  233. package/dist/domains/dashboard/types.d.ts +41 -1
  234. package/dist/domains/dashboard/types.d.ts.map +1 -1
  235. package/dist/domains/dashboard/verify-parser.d.ts +1 -0
  236. package/dist/domains/dashboard/verify-parser.d.ts.map +1 -1
  237. package/dist/domains/dashboard/verify-parser.js +8 -4
  238. package/dist/domains/dashboard/verify-parser.js.map +1 -1
  239. package/dist/domains/dashboard/web/assets/{arc-mNt_SS1l.js → arc-ClrSujVb.js} +1 -1
  240. package/dist/domains/dashboard/web/assets/{architectureDiagram-3BPJPVTR-Bc5akVD6.js → architectureDiagram-3BPJPVTR-B4A_t84A.js} +1 -1
  241. package/dist/domains/dashboard/web/assets/{blockDiagram-GPEHLZMM-C43zhVBe.js → blockDiagram-GPEHLZMM-D72u2953.js} +1 -1
  242. package/dist/domains/dashboard/web/assets/{c4Diagram-AAUBKEIU-dToETarK.js → c4Diagram-AAUBKEIU-Ca5zba3N.js} +1 -1
  243. package/dist/domains/dashboard/web/assets/channel-B_u-_i2t.js +1 -0
  244. package/dist/domains/dashboard/web/assets/{chunk-2J33WTMH-C0oO137R.js → chunk-2J33WTMH-CCVPBm0J.js} +1 -1
  245. package/dist/domains/dashboard/web/assets/{chunk-4BX2VUAB-CGms1fgI.js → chunk-4BX2VUAB-JYluRsP-.js} +1 -1
  246. package/dist/domains/dashboard/web/assets/{chunk-55IACEB6-Bugl8v6f.js → chunk-55IACEB6-DfYm7pN7.js} +1 -1
  247. package/dist/domains/dashboard/web/assets/{chunk-727SXJPM-8ATNMlBG.js → chunk-727SXJPM-CwghIMO9.js} +1 -1
  248. package/dist/domains/dashboard/web/assets/{chunk-AQP2D5EJ-BNYjSSqU.js → chunk-AQP2D5EJ-BA_zgMXZ.js} +1 -1
  249. package/dist/domains/dashboard/web/assets/{chunk-FMBD7UC4-_nJAqSbe.js → chunk-FMBD7UC4-BAJLB5V6.js} +1 -1
  250. package/dist/domains/dashboard/web/assets/{chunk-ND2GUHAM-lyxYm5NX.js → chunk-ND2GUHAM-Bj6HWRwi.js} +1 -1
  251. package/dist/domains/dashboard/web/assets/{chunk-QZHKN3VN-PUMVeWpd.js → chunk-QZHKN3VN-B1kXfg5N.js} +1 -1
  252. package/dist/domains/dashboard/web/assets/classDiagram-4FO5ZUOK-BpA7BPgX.js +1 -0
  253. package/dist/domains/dashboard/web/assets/classDiagram-v2-Q7XG4LA2-BpA7BPgX.js +1 -0
  254. package/dist/domains/dashboard/web/assets/{cose-bilkent-S5V4N54A-DzMqjexn.js → cose-bilkent-S5V4N54A-BBrkuiAU.js} +1 -1
  255. package/dist/domains/dashboard/web/assets/{cynefin-VYW2F7L2-B67ET0eq.js → cynefin-VYW2F7L2-DlFhgQHt.js} +1 -1
  256. package/dist/domains/dashboard/web/assets/{dagre-BM42HDAG-CQPMvRLK.js → dagre-BM42HDAG-B0Bk5oiP.js} +1 -1
  257. package/dist/domains/dashboard/web/assets/{demo-BuVau32v.js → demo-DZYPLZpF.js} +2 -2
  258. package/dist/domains/dashboard/web/assets/{diagram-2AECGRRQ-BRpLrFHM.js → diagram-2AECGRRQ-tvTUiBA2.js} +1 -1
  259. package/dist/domains/dashboard/web/assets/{diagram-5GNKFQAL-CPGWuGrE.js → diagram-5GNKFQAL-BZfcK29q.js} +1 -1
  260. package/dist/domains/dashboard/web/assets/{diagram-KO2AKTUF-D2wpX2iO.js → diagram-KO2AKTUF-BQahyP-C.js} +1 -1
  261. package/dist/domains/dashboard/web/assets/{diagram-LMA3HP47-D54mAbDu.js → diagram-LMA3HP47-D5bJnW2C.js} +1 -1
  262. package/dist/domains/dashboard/web/assets/{diagram-OG6HWLK6-ZGQDpSs_.js → diagram-OG6HWLK6-DTwWdzWJ.js} +1 -1
  263. package/dist/domains/dashboard/web/assets/{erDiagram-TEJ5UH35-C3qDo7sd.js → erDiagram-TEJ5UH35-BbvrdCp9.js} +1 -1
  264. package/dist/domains/dashboard/web/assets/{flowDiagram-I6XJVG4X-B7hStPd9.js → flowDiagram-I6XJVG4X-DgbR7Tcc.js} +1 -1
  265. package/dist/domains/dashboard/web/assets/{ganttDiagram-6RSMTGT7-IqcLFbTK.js → ganttDiagram-6RSMTGT7-wWMOA7F4.js} +1 -1
  266. package/dist/domains/dashboard/web/assets/{gitGraphDiagram-PVQCEYII-YrMZpzUu.js → gitGraphDiagram-PVQCEYII-DCxvMAUJ.js} +1 -1
  267. package/dist/domains/dashboard/web/assets/index-Bk1o-4VO.css +1 -0
  268. package/dist/domains/dashboard/web/assets/{index-icxk8_BP.js → index-Blit0P5Z.js} +1 -1
  269. package/dist/domains/dashboard/web/assets/index-g8vyW0R_.js +257 -0
  270. package/dist/domains/dashboard/web/assets/{infoDiagram-5YYISTIA-CcIgGK_7.js → infoDiagram-5YYISTIA-9qXEkzDe.js} +1 -1
  271. package/dist/domains/dashboard/web/assets/{ishikawaDiagram-YF4QCWOH-1x3rNjGP.js → ishikawaDiagram-YF4QCWOH-Dkf5othW.js} +1 -1
  272. package/dist/domains/dashboard/web/assets/{journeyDiagram-JHISSGLW-B2XiqMNP.js → journeyDiagram-JHISSGLW-C2_IkO4s.js} +1 -1
  273. package/dist/domains/dashboard/web/assets/{kanban-definition-UN3LZRKU-x46cGuo3.js → kanban-definition-UN3LZRKU-BxWgu4DL.js} +1 -1
  274. package/dist/domains/dashboard/web/assets/{linear-DFLqGZWl.js → linear-Dkr6p-Ro.js} +1 -1
  275. package/dist/domains/dashboard/web/assets/{mermaid.core-g3J6BACc.js → mermaid.core-DZUcsoG4.js} +4 -4
  276. package/dist/domains/dashboard/web/assets/{mindmap-definition-RKZ34NQL-CTdeKmcX.js → mindmap-definition-RKZ34NQL-C9xyxGfa.js} +1 -1
  277. package/dist/domains/dashboard/web/assets/{pieDiagram-4H26LBE5-C_obwjIf.js → pieDiagram-4H26LBE5-Dn67tdOF.js} +1 -1
  278. package/dist/domains/dashboard/web/assets/{quadrantDiagram-W4KKPZXB-B6Gnfz9M.js → quadrantDiagram-W4KKPZXB-Cy6iOcxc.js} +1 -1
  279. package/dist/domains/dashboard/web/assets/{requirementDiagram-4Y6WPE33-nX4PObnB.js → requirementDiagram-4Y6WPE33-B_gZONhx.js} +1 -1
  280. package/dist/domains/dashboard/web/assets/{sankeyDiagram-5OEKKPKP-QjDwwHgl.js → sankeyDiagram-5OEKKPKP-C3u-4dOk.js} +1 -1
  281. package/dist/domains/dashboard/web/assets/{sequenceDiagram-3UESZ5HK-BEEe0j6B.js → sequenceDiagram-3UESZ5HK-Xd3ByTVF.js} +1 -1
  282. package/dist/domains/dashboard/web/assets/{stateDiagram-AJRCARHV-CXfAaBgM.js → stateDiagram-AJRCARHV-CJGHL7Up.js} +1 -1
  283. package/dist/domains/dashboard/web/assets/stateDiagram-v2-BHNVJYJU-rKvBgr6I.js +1 -0
  284. package/dist/domains/dashboard/web/assets/{timeline-definition-PNZ67QCA-BOzX2EnD.js → timeline-definition-PNZ67QCA-DvONX2YQ.js} +1 -1
  285. package/dist/domains/dashboard/web/assets/{vennDiagram-CIIHVFJN-C40vhXRq.js → vennDiagram-CIIHVFJN-B-L4qWy4.js} +1 -1
  286. package/dist/domains/dashboard/web/assets/{wardleyDiagram-YWT4CUSO-B1rm89JH.js → wardleyDiagram-YWT4CUSO-cf39WX2o.js} +1 -1
  287. package/dist/domains/dashboard/web/assets/{xychartDiagram-2RQKCTM6-BlMr59qK.js → xychartDiagram-2RQKCTM6-Dk1vcm3u.js} +1 -1
  288. package/dist/domains/dashboard/web/index.html +16 -16
  289. package/dist/domains/integrations/openspec.d.ts.map +1 -1
  290. package/dist/domains/integrations/openspec.js +5 -2
  291. package/dist/domains/integrations/openspec.js.map +1 -1
  292. package/dist/domains/skill/hook-lifecycle.d.ts +9 -0
  293. package/dist/domains/skill/hook-lifecycle.d.ts.map +1 -0
  294. package/dist/domains/skill/hook-lifecycle.js +48 -0
  295. package/dist/domains/skill/hook-lifecycle.js.map +1 -0
  296. package/dist/domains/skill/platform-inspect.d.ts +2 -0
  297. package/dist/domains/skill/platform-inspect.d.ts.map +1 -1
  298. package/dist/domains/skill/platform-inspect.js +170 -32
  299. package/dist/domains/skill/platform-inspect.js.map +1 -1
  300. package/dist/domains/skill/platform-install.d.ts +21 -1
  301. package/dist/domains/skill/platform-install.d.ts.map +1 -1
  302. package/dist/domains/skill/platform-install.js +174 -31
  303. package/dist/domains/skill/platform-install.js.map +1 -1
  304. package/dist/domains/skill/project-hook-projection.d.ts +14 -0
  305. package/dist/domains/skill/project-hook-projection.d.ts.map +1 -0
  306. package/dist/domains/skill/project-hook-projection.js +41 -0
  307. package/dist/domains/skill/project-hook-projection.js.map +1 -0
  308. package/dist/domains/skill/project-instructions.d.ts +3 -0
  309. package/dist/domains/skill/project-instructions.d.ts.map +1 -1
  310. package/dist/domains/skill/project-instructions.js +8 -0
  311. package/dist/domains/skill/project-instructions.js.map +1 -1
  312. package/dist/domains/skill/uninstall.d.ts +6 -2
  313. package/dist/domains/skill/uninstall.d.ts.map +1 -1
  314. package/dist/domains/skill/uninstall.js +192 -29
  315. package/dist/domains/skill/uninstall.js.map +1 -1
  316. package/dist/domains/workflow-contract/contained-atomic-write.d.ts +3 -0
  317. package/dist/domains/workflow-contract/contained-atomic-write.d.ts.map +1 -1
  318. package/dist/domains/workflow-contract/contained-atomic-write.js +15 -2
  319. package/dist/domains/workflow-contract/contained-atomic-write.js.map +1 -1
  320. package/dist/domains/workflow-contract/global-config.d.ts +10 -0
  321. package/dist/domains/workflow-contract/global-config.d.ts.map +1 -0
  322. package/dist/domains/workflow-contract/global-config.js +117 -0
  323. package/dist/domains/workflow-contract/global-config.js.map +1 -0
  324. package/dist/domains/workflow-contract/hook-target-scope.d.ts +6 -0
  325. package/dist/domains/workflow-contract/hook-target-scope.d.ts.map +1 -0
  326. package/dist/domains/workflow-contract/hook-target-scope.js +51 -0
  327. package/dist/domains/workflow-contract/hook-target-scope.js.map +1 -0
  328. package/dist/domains/workflow-contract/index.d.ts +2 -1
  329. package/dist/domains/workflow-contract/index.d.ts.map +1 -1
  330. package/dist/domains/workflow-contract/index.js +2 -1
  331. package/dist/domains/workflow-contract/index.js.map +1 -1
  332. package/dist/domains/workflow-contract/project-config-reader.d.ts +2 -0
  333. package/dist/domains/workflow-contract/project-config-reader.d.ts.map +1 -1
  334. package/dist/domains/workflow-contract/project-config-reader.js.map +1 -1
  335. package/dist/domains/workflow-contract/project-config-writer.d.ts.map +1 -1
  336. package/dist/domains/workflow-contract/project-config-writer.js +3 -2
  337. package/dist/domains/workflow-contract/project-config-writer.js.map +1 -1
  338. package/dist/domains/workflow-contract/project-config.d.ts +1 -0
  339. package/dist/domains/workflow-contract/project-config.d.ts.map +1 -1
  340. package/dist/domains/workflow-contract/project-config.js +9 -4
  341. package/dist/domains/workflow-contract/project-config.js.map +1 -1
  342. package/dist/domains/workflow-contract/types.d.ts +3 -0
  343. package/dist/domains/workflow-contract/types.d.ts.map +1 -1
  344. package/dist/platform/install/platforms.d.ts +2 -0
  345. package/dist/platform/install/platforms.d.ts.map +1 -1
  346. package/dist/platform/install/platforms.js +1 -0
  347. package/dist/platform/install/platforms.js.map +1 -1
  348. package/dist/platform/paths/git-worktree.d.ts +4 -1
  349. package/dist/platform/paths/git-worktree.d.ts.map +1 -1
  350. package/dist/platform/paths/git-worktree.js +34 -1
  351. package/dist/platform/paths/git-worktree.js.map +1 -1
  352. package/eval/local/tests/scaffold/test_utils.py +74 -0
  353. package/eval/pyproject.toml +4 -4
  354. package/eval/scaffold/shell/docker.sh +5 -0
  355. package/package.json +1 -1
  356. package/dist/domains/dashboard/web/assets/channel-b2wWDG4F.js +0 -1
  357. package/dist/domains/dashboard/web/assets/classDiagram-4FO5ZUOK-B9SWZywo.js +0 -1
  358. package/dist/domains/dashboard/web/assets/classDiagram-v2-Q7XG4LA2-B9SWZywo.js +0 -1
  359. package/dist/domains/dashboard/web/assets/index-DhtBssCt.js +0 -257
  360. package/dist/domains/dashboard/web/assets/index-pr3axVDI.css +0 -1
  361. package/dist/domains/dashboard/web/assets/stateDiagram-v2-BHNVJYJU-CD3nS4cC.js +0 -1
@@ -1,77 +1,77 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __cometCreateRequire } from 'module';
3
3
  const require = __cometCreateRequire(import.meta.url);
4
- var $a=Object.create;var Sr=Object.defineProperty;var Ma=Object.getOwnPropertyDescriptor;var Wa=Object.getOwnPropertyNames;var Fa=Object.getPrototypeOf,Ba=Object.prototype.hasOwnProperty;var gt=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var y=(i,e)=>()=>{try{return e||i((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var Ka=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Wa(e))!Ba.call(i,r)&&r!==t&&Sr(i,r,{get:()=>e[r],enumerable:!(n=Ma(e,r))||n.enumerable});return i};var Cr=(i,e,t)=>(t=i!=null?$a(Fa(i)):{},Ka(e||!i||!i.__esModule?Sr(t,"default",{value:i,enumerable:!0}):t,i));var _=y(j=>{"use strict";var _i=Symbol.for("yaml.alias"),Er=Symbol.for("yaml.document"),wt=Symbol.for("yaml.map"),_r=Symbol.for("yaml.pair"),Pi=Symbol.for("yaml.scalar"),yt=Symbol.for("yaml.seq"),B=Symbol.for("yaml.node.type"),Ya=i=>!!i&&typeof i=="object"&&i[B]===_i,Ua=i=>!!i&&typeof i=="object"&&i[B]===Er,Va=i=>!!i&&typeof i=="object"&&i[B]===wt,Ja=i=>!!i&&typeof i=="object"&&i[B]===_r,Pr=i=>!!i&&typeof i=="object"&&i[B]===Pi,Ha=i=>!!i&&typeof i=="object"&&i[B]===yt;function Nr(i){if(i&&typeof i=="object")switch(i[B]){case wt:case yt:return!0}return!1}function za(i){if(i&&typeof i=="object")switch(i[B]){case _i:case wt:case Pi:case yt:return!0}return!1}var Ga=i=>(Pr(i)||Nr(i))&&!!i.anchor;j.ALIAS=_i;j.DOC=Er;j.MAP=wt;j.NODE_TYPE=B;j.PAIR=_r;j.SCALAR=Pi;j.SEQ=yt;j.hasAnchor=Ga;j.isAlias=Ya;j.isCollection=Nr;j.isDocument=Ua;j.isMap=Va;j.isNode=za;j.isPair=Ja;j.isScalar=Pr;j.isSeq=Ha});var Ne=y(Ni=>{"use strict";var R=_(),T=Symbol("break visit"),Or=Symbol("skip children"),W=Symbol("remove node");function vt(i,e){let t=xr(e);R.isDocument(i)?ge(null,i.contents,t,Object.freeze([i]))===W&&(i.contents=null):ge(null,i,t,Object.freeze([]))}vt.BREAK=T;vt.SKIP=Or;vt.REMOVE=W;function ge(i,e,t,n){let r=Ar(i,e,t,n);if(R.isNode(r)||R.isPair(r))return Ir(i,n,r),ge(i,r,t,n);if(typeof r!="symbol"){if(R.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let o=ge(s,e.items[s],t,n);if(typeof o=="number")s=o-1;else{if(o===T)return T;o===W&&(e.items.splice(s,1),s-=1)}}}else if(R.isPair(e)){n=Object.freeze(n.concat(e));let s=ge("key",e.key,t,n);if(s===T)return T;s===W&&(e.key=null);let o=ge("value",e.value,t,n);if(o===T)return T;o===W&&(e.value=null)}}return r}async function bt(i,e){let t=xr(e);R.isDocument(i)?await we(null,i.contents,t,Object.freeze([i]))===W&&(i.contents=null):await we(null,i,t,Object.freeze([]))}bt.BREAK=T;bt.SKIP=Or;bt.REMOVE=W;async function we(i,e,t,n){let r=await Ar(i,e,t,n);if(R.isNode(r)||R.isPair(r))return Ir(i,n,r),we(i,r,t,n);if(typeof r!="symbol"){if(R.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let o=await we(s,e.items[s],t,n);if(typeof o=="number")s=o-1;else{if(o===T)return T;o===W&&(e.items.splice(s,1),s-=1)}}}else if(R.isPair(e)){n=Object.freeze(n.concat(e));let s=await we("key",e.key,t,n);if(s===T)return T;s===W&&(e.key=null);let o=await we("value",e.value,t,n);if(o===T)return T;o===W&&(e.value=null)}}return r}function xr(i){return typeof i=="object"&&(i.Collection||i.Node||i.Value)?Object.assign({Alias:i.Node,Map:i.Node,Scalar:i.Node,Seq:i.Node},i.Value&&{Map:i.Value,Scalar:i.Value,Seq:i.Value},i.Collection&&{Map:i.Collection,Seq:i.Collection},i):i}function Ar(i,e,t,n){if(typeof t=="function")return t(i,e,n);if(R.isMap(e))return t.Map?.(i,e,n);if(R.isSeq(e))return t.Seq?.(i,e,n);if(R.isPair(e))return t.Pair?.(i,e,n);if(R.isScalar(e))return t.Scalar?.(i,e,n);if(R.isAlias(e))return t.Alias?.(i,e,n)}function Ir(i,e,t){let n=e[e.length-1];if(R.isCollection(n))n.items[i]=t;else if(R.isPair(n))i==="key"?n.key=t:n.value=t;else if(R.isDocument(n))n.contents=t;else{let r=R.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${r} parent`)}}Ni.visit=vt;Ni.visitAsync=bt});var Oi=y(jr=>{"use strict";var Rr=_(),Qa=Ne(),Xa={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Za=i=>i.replace(/[!,[\]{}]/g,e=>Xa[e]),Oe=class i{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},i.defaultYaml,e),this.tags=Object.assign({},i.defaultTags,t)}clone(){let e=new i(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new i(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:i.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},i.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:i.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},i.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[s,o]=n;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[s]=n;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let o=/^\d+\.\d+$/.test(s);return t(6,`Unsupported YAML version ${s}`,o),!1}}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let s=this.tags[n];if(s)try{return s+decodeURIComponent(r)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Za(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&Rr.isNode(e.contents)){let s={};Qa.visit(e.contents,(o,a)=>{Rr.isNode(a)&&a.tag&&(s[a.tag]=!0)}),r=Object.keys(s)}else r=[];for(let[s,o]of n)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||r.some(a=>a.startsWith(o)))&&t.push(`%TAG ${s} ${o}`);return t.join(`
5
- `)}};Oe.defaultYaml={explicit:!1,version:"1.2"};Oe.defaultTags={"!!":"tag:yaml.org,2002:"};jr.Directives=Oe});var kt=y(xe=>{"use strict";var Tr=_(),ec=Ne();function tc(i){if(/[\x00-\x19\s,[\]{}]/.test(i)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(i)}`;throw new Error(t)}return!0}function qr(i){let e=new Set;return ec.visit(i,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function Lr(i,e){for(let t=1;;++t){let n=`${i}${t}`;if(!e.has(n))return n}}function ic(i,e){let t=[],n=new Map,r=null;return{onAnchor:s=>{t.push(s),r??(r=qr(i));let o=Lr(e,r);return r.add(o),o},setAnchors:()=>{for(let s of t){let o=n.get(s);if(typeof o=="object"&&o.anchor&&(Tr.isScalar(o.node)||Tr.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:n}}xe.anchorIsValid=tc;xe.anchorNames=qr;xe.createNodeAnchors=ic;xe.findNewAnchor=Lr});var xi=y(Dr=>{"use strict";function Ae(i,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let r=0,s=n.length;r<s;++r){let o=n[r],a=Ae(i,n,String(r),o);a===void 0?delete n[r]:a!==o&&(n[r]=a)}else if(n instanceof Map)for(let r of Array.from(n.keys())){let s=n.get(r),o=Ae(i,n,r,s);o===void 0?n.delete(r):o!==s&&n.set(r,o)}else if(n instanceof Set)for(let r of Array.from(n)){let s=Ae(i,n,r,r);s===void 0?n.delete(r):s!==r&&(n.delete(r),n.add(s))}else for(let[r,s]of Object.entries(n)){let o=Ae(i,n,r,s);o===void 0?delete n[r]:o!==s&&(n[r]=o)}return i.call(e,t,n)}Dr.applyReviver=Ae});var J=y(Mr=>{"use strict";var nc=_();function $r(i,e,t){if(Array.isArray(i))return i.map((n,r)=>$r(n,String(r),t));if(i&&typeof i.toJSON=="function"){if(!t||!nc.hasAnchor(i))return i.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(i,n),t.onCreate=s=>{n.res=s,delete t.onCreate};let r=i.toJSON(e,t);return t.onCreate&&t.onCreate(r),r}return typeof i=="bigint"&&!t?.keep?Number(i):i}Mr.toJS=$r});var St=y(Fr=>{"use strict";var rc=xi(),Wr=_(),sc=J(),Ai=class{constructor(e){Object.defineProperty(this,Wr.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:s}={}){if(!Wr.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=sc.toJS(this,"",o);if(typeof r=="function")for(let{count:c,res:l}of o.anchors.values())r(l,c);return typeof s=="function"?rc.applyReviver(s,{"":a},"",a):a}};Fr.NodeBase=Ai});var Ie=y(Br=>{"use strict";var oc=kt(),ac=Ne(),ye=_(),cc=St(),lc=J(),Ii=class extends cc.NodeBase{constructor(e){super(ye.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],ac.visit(e,{Node:(s,o)=>{(ye.isAlias(o)||ye.hasAnchor(o))&&n.push(o)}}),t&&(t.aliasResolveCache=n));let r;for(let s of n){if(s===this)break;s.anchor===this.source&&(r=s)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:s}=t,o=this.resolve(r,t);if(!o){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=n.get(o);if(a||(lc.toJS(o,null,t),a=n.get(o)),a?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Ct(r,o,n)),a.count*a.aliasCount>s)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(oc.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${r} `}return r}};function Ct(i,e,t){if(ye.isAlias(e)){let n=e.resolve(i),r=t&&n&&t.get(n);return r?r.count*r.aliasCount:0}else if(ye.isCollection(e)){let n=0;for(let r of e.items){let s=Ct(i,r,t);s>n&&(n=s)}return n}else if(ye.isPair(e)){let n=Ct(i,e.key,t),r=Ct(i,e.value,t);return Math.max(n,r)}return 1}Br.Alias=Ii});var O=y(Ri=>{"use strict";var uc=_(),fc=St(),dc=J(),pc=i=>!i||typeof i!="function"&&typeof i!="object",H=class extends fc.NodeBase{constructor(e){super(uc.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:dc.toJS(this.value,e,t)}toString(){return String(this.value)}};H.BLOCK_FOLDED="BLOCK_FOLDED";H.BLOCK_LITERAL="BLOCK_LITERAL";H.PLAIN="PLAIN";H.QUOTE_DOUBLE="QUOTE_DOUBLE";H.QUOTE_SINGLE="QUOTE_SINGLE";Ri.Scalar=H;Ri.isScalarValue=pc});var Re=y(Yr=>{"use strict";var mc=Ie(),ae=_(),Kr=O(),hc="tag:yaml.org,2002:";function gc(i,e,t){if(e){let n=t.filter(s=>s.tag===e),r=n.find(s=>!s.format)??n[0];if(!r)throw new Error(`Tag ${e} not found`);return r}return t.find(n=>n.identify?.(i)&&!n.format)}function wc(i,e,t){if(ae.isDocument(i)&&(i=i.contents),ae.isNode(i))return i;if(ae.isPair(i)){let u=t.schema[ae.MAP].createNode?.(t.schema,null,t);return u.items.push(i),u}(i instanceof String||i instanceof Number||i instanceof Boolean||typeof BigInt<"u"&&i instanceof BigInt)&&(i=i.valueOf());let{aliasDuplicateObjects:n,onAnchor:r,onTagObj:s,schema:o,sourceObjects:a}=t,c;if(n&&i&&typeof i=="object"){if(c=a.get(i),c)return c.anchor??(c.anchor=r(i)),new mc.Alias(c.anchor);c={anchor:null,node:null},a.set(i,c)}e?.startsWith("!!")&&(e=hc+e.slice(2));let l=gc(i,e,o.tags);if(!l){if(i&&typeof i.toJSON=="function"&&(i=i.toJSON()),!i||typeof i!="object"){let u=new Kr.Scalar(i);return c&&(c.node=u),u}l=i instanceof Map?o[ae.MAP]:Symbol.iterator in Object(i)?o[ae.SEQ]:o[ae.MAP]}s&&(s(l),delete t.onTagObj);let m=l?.createNode?l.createNode(t.schema,i,t):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(t.schema,i,t):new Kr.Scalar(i);return e?m.tag=e:l.default||(m.tag=l.tag),c&&(c.node=m),m}Yr.createNode=wc});var _t=y(Et=>{"use strict";var yc=Re(),F=_(),vc=St();function ji(i,e,t){let n=t;for(let r=e.length-1;r>=0;--r){let s=e[r];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let o=[];o[s]=n,n=o}else n=new Map([[s,n]])}return yc.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:i,sourceObjects:new Map})}var Ur=i=>i==null||typeof i=="object"&&!!i[Symbol.iterator]().next().done,Ti=class extends vc.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>F.isNode(n)||F.isPair(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ur(e))this.add(t);else{let[n,...r]=e,s=this.get(n,!0);if(F.isCollection(s))s.addIn(r,t);else if(s===void 0&&this.schema)this.set(n,ji(this.schema,r,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(F.isCollection(r))return r.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,s=this.get(n,!0);return r.length===0?!t&&F.isScalar(s)?s.value:s:F.isCollection(s)?s.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!F.isPair(t))return!1;let n=t.value;return n==null||e&&F.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return F.isCollection(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let s=this.get(n,!0);if(F.isCollection(s))s.setIn(r,t);else if(s===void 0&&this.schema)this.set(n,ji(this.schema,r,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}};Et.Collection=Ti;Et.collectionFromPath=ji;Et.isEmptyPath=Ur});var je=y(Pt=>{"use strict";var bc=i=>i.replace(/^(?!$)(?: $)?/gm,"#");function qi(i,e){return/^\n+$/.test(i)?i.substring(1):e?i.replace(/^(?! *$)/gm,e):i}var kc=(i,e,t)=>i.endsWith(`
6
- `)?qi(t,e):t.includes(`
4
+ var Wa=Object.create;var Er=Object.defineProperty;var Ma=Object.getOwnPropertyDescriptor;var Fa=Object.getOwnPropertyNames;var Ba=Object.getPrototypeOf,Ka=Object.prototype.hasOwnProperty;var yt=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var y=(n,e)=>()=>{try{return e||n((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var Ya=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Fa(e))!Ka.call(n,r)&&r!==t&&Er(n,r,{get:()=>e[r],enumerable:!(i=Ma(e,r))||i.enumerable});return n};var Nn=(n,e,t)=>(t=n!=null?Wa(Ba(n)):{},Ya(e||!n||!n.__esModule?Er(t,"default",{value:n,enumerable:!0}):t,n));var _=y(j=>{"use strict";var On=Symbol.for("yaml.alias"),_r=Symbol.for("yaml.document"),vt=Symbol.for("yaml.map"),Pr=Symbol.for("yaml.pair"),xn=Symbol.for("yaml.scalar"),bt=Symbol.for("yaml.seq"),B=Symbol.for("yaml.node.type"),Ua=n=>!!n&&typeof n=="object"&&n[B]===On,Ja=n=>!!n&&typeof n=="object"&&n[B]===_r,Va=n=>!!n&&typeof n=="object"&&n[B]===vt,Ha=n=>!!n&&typeof n=="object"&&n[B]===Pr,Nr=n=>!!n&&typeof n=="object"&&n[B]===xn,Ga=n=>!!n&&typeof n=="object"&&n[B]===bt;function Or(n){if(n&&typeof n=="object")switch(n[B]){case vt:case bt:return!0}return!1}function za(n){if(n&&typeof n=="object")switch(n[B]){case On:case vt:case xn:case bt:return!0}return!1}var Qa=n=>(Nr(n)||Or(n))&&!!n.anchor;j.ALIAS=On;j.DOC=_r;j.MAP=vt;j.NODE_TYPE=B;j.PAIR=Pr;j.SCALAR=xn;j.SEQ=bt;j.hasAnchor=Qa;j.isAlias=Ua;j.isCollection=Or;j.isDocument=Ja;j.isMap=Va;j.isNode=za;j.isPair=Ha;j.isScalar=Nr;j.isSeq=Ga});var Oe=y(An=>{"use strict";var R=_(),T=Symbol("break visit"),xr=Symbol("skip children"),M=Symbol("remove node");function kt(n,e){let t=Ar(e);R.isDocument(n)?ge(null,n.contents,t,Object.freeze([n]))===M&&(n.contents=null):ge(null,n,t,Object.freeze([]))}kt.BREAK=T;kt.SKIP=xr;kt.REMOVE=M;function ge(n,e,t,i){let r=Ir(n,e,t,i);if(R.isNode(r)||R.isPair(r))return Rr(n,i,r),ge(n,r,t,i);if(typeof r!="symbol"){if(R.isCollection(e)){i=Object.freeze(i.concat(e));for(let s=0;s<e.items.length;++s){let o=ge(s,e.items[s],t,i);if(typeof o=="number")s=o-1;else{if(o===T)return T;o===M&&(e.items.splice(s,1),s-=1)}}}else if(R.isPair(e)){i=Object.freeze(i.concat(e));let s=ge("key",e.key,t,i);if(s===T)return T;s===M&&(e.key=null);let o=ge("value",e.value,t,i);if(o===T)return T;o===M&&(e.value=null)}}return r}async function St(n,e){let t=Ar(e);R.isDocument(n)?await we(null,n.contents,t,Object.freeze([n]))===M&&(n.contents=null):await we(null,n,t,Object.freeze([]))}St.BREAK=T;St.SKIP=xr;St.REMOVE=M;async function we(n,e,t,i){let r=await Ir(n,e,t,i);if(R.isNode(r)||R.isPair(r))return Rr(n,i,r),we(n,r,t,i);if(typeof r!="symbol"){if(R.isCollection(e)){i=Object.freeze(i.concat(e));for(let s=0;s<e.items.length;++s){let o=await we(s,e.items[s],t,i);if(typeof o=="number")s=o-1;else{if(o===T)return T;o===M&&(e.items.splice(s,1),s-=1)}}}else if(R.isPair(e)){i=Object.freeze(i.concat(e));let s=await we("key",e.key,t,i);if(s===T)return T;s===M&&(e.key=null);let o=await we("value",e.value,t,i);if(o===T)return T;o===M&&(e.value=null)}}return r}function Ar(n){return typeof n=="object"&&(n.Collection||n.Node||n.Value)?Object.assign({Alias:n.Node,Map:n.Node,Scalar:n.Node,Seq:n.Node},n.Value&&{Map:n.Value,Scalar:n.Value,Seq:n.Value},n.Collection&&{Map:n.Collection,Seq:n.Collection},n):n}function Ir(n,e,t,i){if(typeof t=="function")return t(n,e,i);if(R.isMap(e))return t.Map?.(n,e,i);if(R.isSeq(e))return t.Seq?.(n,e,i);if(R.isPair(e))return t.Pair?.(n,e,i);if(R.isScalar(e))return t.Scalar?.(n,e,i);if(R.isAlias(e))return t.Alias?.(n,e,i)}function Rr(n,e,t){let i=e[e.length-1];if(R.isCollection(i))i.items[n]=t;else if(R.isPair(i))n==="key"?i.key=t:i.value=t;else if(R.isDocument(i))i.contents=t;else{let r=R.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${r} parent`)}}An.visit=kt;An.visitAsync=St});var In=y(Tr=>{"use strict";var jr=_(),Xa=Oe(),Za={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},ec=n=>n.replace(/[!,[\]{}]/g,e=>Za[e]),xe=class n{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},n.defaultYaml,e),this.tags=Object.assign({},n.defaultTags,t)}clone(){let e=new n(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new n(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:n.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},n.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:n.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},n.defaultTags),this.atNextDocument=!1);let i=e.trim().split(/[ \t]+/),r=i.shift();switch(r){case"%TAG":{if(i.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;let[s,o]=i;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[s]=i;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let o=/^\d+\.\d+$/.test(s);return t(6,`Unsupported YAML version ${s}`,o),!1}}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,i,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let s=this.tags[i];if(s)try{return s+decodeURIComponent(r)}catch(o){return t(String(o)),null}return i==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,i]of Object.entries(this.tags))if(e.startsWith(i))return t+ec(e.substring(i.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),r;if(e&&i.length>0&&jr.isNode(e.contents)){let s={};Xa.visit(e.contents,(o,a)=>{jr.isNode(a)&&a.tag&&(s[a.tag]=!0)}),r=Object.keys(s)}else r=[];for(let[s,o]of i)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||r.some(a=>a.startsWith(o)))&&t.push(`%TAG ${s} ${o}`);return t.join(`
5
+ `)}};xe.defaultYaml={explicit:!1,version:"1.2"};xe.defaultTags={"!!":"tag:yaml.org,2002:"};Tr.Directives=xe});var Ct=y(Ae=>{"use strict";var qr=_(),tc=Oe();function nc(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(t)}return!0}function Lr(n){let e=new Set;return tc.visit(n,{Value(t,i){i.anchor&&e.add(i.anchor)}}),e}function Dr(n,e){for(let t=1;;++t){let i=`${n}${t}`;if(!e.has(i))return i}}function ic(n,e){let t=[],i=new Map,r=null;return{onAnchor:s=>{t.push(s),r??(r=Lr(n));let o=Dr(e,r);return r.add(o),o},setAnchors:()=>{for(let s of t){let o=i.get(s);if(typeof o=="object"&&o.anchor&&(qr.isScalar(o.node)||qr.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:i}}Ae.anchorIsValid=nc;Ae.anchorNames=Lr;Ae.createNodeAnchors=ic;Ae.findNewAnchor=Dr});var Rn=y($r=>{"use strict";function Ie(n,e,t,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let r=0,s=i.length;r<s;++r){let o=i[r],a=Ie(n,i,String(r),o);a===void 0?delete i[r]:a!==o&&(i[r]=a)}else if(i instanceof Map)for(let r of Array.from(i.keys())){let s=i.get(r),o=Ie(n,i,r,s);o===void 0?i.delete(r):o!==s&&i.set(r,o)}else if(i instanceof Set)for(let r of Array.from(i)){let s=Ie(n,i,r,r);s===void 0?i.delete(r):s!==r&&(i.delete(r),i.add(s))}else for(let[r,s]of Object.entries(i)){let o=Ie(n,i,r,s);o===void 0?delete i[r]:o!==s&&(i[r]=o)}return n.call(e,t,i)}$r.applyReviver=Ie});var H=y(Mr=>{"use strict";var rc=_();function Wr(n,e,t){if(Array.isArray(n))return n.map((i,r)=>Wr(i,String(r),t));if(n&&typeof n.toJSON=="function"){if(!t||!rc.hasAnchor(n))return n.toJSON(e,t);let i={aliasCount:0,count:1,res:void 0};t.anchors.set(n,i),t.onCreate=s=>{i.res=s,delete t.onCreate};let r=n.toJSON(e,t);return t.onCreate&&t.onCreate(r),r}return typeof n=="bigint"&&!t?.keep?Number(n):n}Mr.toJS=Wr});var Et=y(Br=>{"use strict";var sc=Rn(),Fr=_(),oc=H(),jn=class{constructor(e){Object.defineProperty(this,Fr.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:i,onAnchor:r,reviver:s}={}){if(!Fr.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=oc.toJS(this,"",o);if(typeof r=="function")for(let{count:c,res:l}of o.anchors.values())r(l,c);return typeof s=="function"?sc.applyReviver(s,{"":a},"",a):a}};Br.NodeBase=jn});var Re=y(Kr=>{"use strict";var ac=Ct(),cc=Oe(),ye=_(),lc=Et(),uc=H(),Tn=class extends lc.NodeBase{constructor(e){super(ye.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let i;t?.aliasResolveCache?i=t.aliasResolveCache:(i=[],cc.visit(e,{Node:(s,o)=>{(ye.isAlias(o)||ye.hasAnchor(o))&&i.push(o)}}),t&&(t.aliasResolveCache=i));let r;for(let s of i){if(s===this)break;s.anchor===this.source&&(r=s)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:i,doc:r,maxAliasCount:s}=t,o=this.resolve(r,t);if(!o){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=i.get(o);if(a||(uc.toJS(o,null,t),a=i.get(o)),a?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=_t(r,o,i)),a.count*a.aliasCount>s)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(e,t,i){let r=`*${this.source}`;if(e){if(ac.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${r} `}return r}};function _t(n,e,t){if(ye.isAlias(e)){let i=e.resolve(n),r=t&&i&&t.get(i);return r?r.count*r.aliasCount:0}else if(ye.isCollection(e)){let i=0;for(let r of e.items){let s=_t(n,r,t);s>i&&(i=s)}return i}else if(ye.isPair(e)){let i=_t(n,e.key,t),r=_t(n,e.value,t);return Math.max(i,r)}return 1}Kr.Alias=Tn});var O=y(qn=>{"use strict";var fc=_(),dc=Et(),pc=H(),mc=n=>!n||typeof n!="function"&&typeof n!="object",G=class extends dc.NodeBase{constructor(e){super(fc.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:pc.toJS(this.value,e,t)}toString(){return String(this.value)}};G.BLOCK_FOLDED="BLOCK_FOLDED";G.BLOCK_LITERAL="BLOCK_LITERAL";G.PLAIN="PLAIN";G.QUOTE_DOUBLE="QUOTE_DOUBLE";G.QUOTE_SINGLE="QUOTE_SINGLE";qn.Scalar=G;qn.isScalarValue=mc});var je=y(Ur=>{"use strict";var hc=Re(),ae=_(),Yr=O(),gc="tag:yaml.org,2002:";function wc(n,e,t){if(e){let i=t.filter(s=>s.tag===e),r=i.find(s=>!s.format)??i[0];if(!r)throw new Error(`Tag ${e} not found`);return r}return t.find(i=>i.identify?.(n)&&!i.format)}function yc(n,e,t){if(ae.isDocument(n)&&(n=n.contents),ae.isNode(n))return n;if(ae.isPair(n)){let u=t.schema[ae.MAP].createNode?.(t.schema,null,t);return u.items.push(n),u}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt<"u"&&n instanceof BigInt)&&(n=n.valueOf());let{aliasDuplicateObjects:i,onAnchor:r,onTagObj:s,schema:o,sourceObjects:a}=t,c;if(i&&n&&typeof n=="object"){if(c=a.get(n),c)return c.anchor??(c.anchor=r(n)),new hc.Alias(c.anchor);c={anchor:null,node:null},a.set(n,c)}e?.startsWith("!!")&&(e=gc+e.slice(2));let l=wc(n,e,o.tags);if(!l){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){let u=new Yr.Scalar(n);return c&&(c.node=u),u}l=n instanceof Map?o[ae.MAP]:Symbol.iterator in Object(n)?o[ae.SEQ]:o[ae.MAP]}s&&(s(l),delete t.onTagObj);let m=l?.createNode?l.createNode(t.schema,n,t):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(t.schema,n,t):new Yr.Scalar(n);return e?m.tag=e:l.default||(m.tag=l.tag),c&&(c.node=m),m}Ur.createNode=yc});var Nt=y(Pt=>{"use strict";var vc=je(),F=_(),bc=Et();function Ln(n,e,t){let i=t;for(let r=e.length-1;r>=0;--r){let s=e[r];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let o=[];o[s]=i,i=o}else i=new Map([[s,i]])}return vc.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}var Jr=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done,Dn=class extends bc.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(i=>F.isNode(i)||F.isPair(i)?i.clone(e):i),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Jr(e))this.add(t);else{let[i,...r]=e,s=this.get(i,!0);if(F.isCollection(s))s.addIn(r,t);else if(s===void 0&&this.schema)this.set(i,Ln(this.schema,r,t));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}}deleteIn(e){let[t,...i]=e;if(i.length===0)return this.delete(t);let r=this.get(t,!0);if(F.isCollection(r))return r.deleteIn(i);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${i}`)}getIn(e,t){let[i,...r]=e,s=this.get(i,!0);return r.length===0?!t&&F.isScalar(s)?s.value:s:F.isCollection(s)?s.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!F.isPair(t))return!1;let i=t.value;return i==null||e&&F.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(e){let[t,...i]=e;if(i.length===0)return this.has(t);let r=this.get(t,!0);return F.isCollection(r)?r.hasIn(i):!1}setIn(e,t){let[i,...r]=e;if(r.length===0)this.set(i,t);else{let s=this.get(i,!0);if(F.isCollection(s))s.setIn(r,t);else if(s===void 0&&this.schema)this.set(i,Ln(this.schema,r,t));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}}};Pt.Collection=Dn;Pt.collectionFromPath=Ln;Pt.isEmptyPath=Jr});var Te=y(Ot=>{"use strict";var kc=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function $n(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}var Sc=(n,e,t)=>n.endsWith(`
6
+ `)?$n(t,e):t.includes(`
7
7
  `)?`
8
- `+qi(t,e):(i.endsWith(" ")?"":" ")+t;Pt.indentComment=qi;Pt.lineComment=kc;Pt.stringifyComment=bc});var Jr=y(Te=>{"use strict";var Sc="flow",Li="block",Nt="quoted";function Cc(i,e,t="flow",{indentAtStart:n,lineWidth:r=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!r||r<0)return i;r<s&&(s=0);let c=Math.max(1+s,1+r-e.length);if(i.length<=c)return i;let l=[],m={},u=r-e.length;typeof n=="number"&&(n>r-Math.max(2,s)?l.push(0):u=r-n);let d,h,w=!1,f=-1,p=-1,g=-1;t===Li&&(f=Vr(i,f,e.length),f!==-1&&(u=f+c));for(let k;k=i[f+=1];){if(t===Nt&&k==="\\"){switch(p=f,i[f+1]){case"x":f+=3;break;case"u":f+=5;break;case"U":f+=9;break;default:f+=1}g=f}if(k===`
9
- `)t===Li&&(f=Vr(i,f,e.length)),u=f+e.length+c,d=void 0;else{if(k===" "&&h&&h!==" "&&h!==`
10
- `&&h!==" "){let S=i[f+1];S&&S!==" "&&S!==`
11
- `&&S!==" "&&(d=f)}if(f>=u)if(d)l.push(d),u=d+c,d=void 0;else if(t===Nt){for(;h===" "||h===" ";)h=k,k=i[f+=1],w=!0;let S=f>g+1?f-2:p-1;if(m[S])return i;l.push(S),m[S]=!0,u=S+c,d=void 0}else w=!0}h=k}if(w&&a&&a(),l.length===0)return i;o&&o();let v=i.slice(0,l[0]);for(let k=0;k<l.length;++k){let S=l[k],C=l[k+1]||i.length;S===0?v=`
12
- ${e}${i.slice(0,C)}`:(t===Nt&&m[S]&&(v+=`${i[S]}\\`),v+=`
13
- ${e}${i.slice(S+1,C)}`)}return v}function Vr(i,e,t){let n=e,r=e+1,s=i[r];for(;s===" "||s===" ";)if(e<r+t)s=i[++e];else{do s=i[++e];while(s&&s!==`
14
- `);n=e,r=e+1,s=i[r]}return n}Te.FOLD_BLOCK=Li;Te.FOLD_FLOW=Sc;Te.FOLD_QUOTED=Nt;Te.foldFlowLines=Cc});var Le=y(Hr=>{"use strict";var $=O(),z=Jr(),xt=(i,e)=>({indentAtStart:e?i.indent.length:i.indentAtStart,lineWidth:i.options.lineWidth,minContentWidth:i.options.minContentWidth}),At=i=>/^(%|---|\.\.\.)/m.test(i);function Ec(i,e,t){if(!e||e<0)return!1;let n=e-t,r=i.length;if(r<=n)return!1;for(let s=0,o=0;s<r;++s)if(i[s]===`
15
- `){if(s-o>n)return!0;if(o=s+1,r-o<=n)return!1}return!0}function qe(i,e){let t=JSON.stringify(i);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:n}=e,r=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(At(i)?" ":""),o="",a=0;for(let c=0,l=t[c];l;l=t[++c])if(l===" "&&t[c+1]==="\\"&&t[c+2]==="n"&&(o+=t.slice(a,c)+"\\ ",c+=1,a=c,l="\\"),l==="\\")switch(t[c+1]){case"u":{o+=t.slice(a,c);let m=t.substr(c+2,4);switch(m){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:m.substr(0,2)==="00"?o+="\\x"+m.substr(2):o+=t.substr(c,6)}c+=5,a=c+1}break;case"n":if(n||t[c+2]==='"'||t.length<r)c+=1;else{for(o+=t.slice(a,c)+`
8
+ `+$n(t,e):(n.endsWith(" ")?"":" ")+t;Ot.indentComment=$n;Ot.lineComment=Sc;Ot.stringifyComment=kc});var Hr=y(qe=>{"use strict";var Cc="flow",Wn="block",xt="quoted";function Ec(n,e,t="flow",{indentAtStart:i,lineWidth:r=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!r||r<0)return n;r<s&&(s=0);let c=Math.max(1+s,1+r-e.length);if(n.length<=c)return n;let l=[],m={},u=r-e.length;typeof i=="number"&&(i>r-Math.max(2,s)?l.push(0):u=r-i);let d,h,w=!1,f=-1,p=-1,g=-1;t===Wn&&(f=Vr(n,f,e.length),f!==-1&&(u=f+c));for(let k;k=n[f+=1];){if(t===xt&&k==="\\"){switch(p=f,n[f+1]){case"x":f+=3;break;case"u":f+=5;break;case"U":f+=9;break;default:f+=1}g=f}if(k===`
9
+ `)t===Wn&&(f=Vr(n,f,e.length)),u=f+e.length+c,d=void 0;else{if(k===" "&&h&&h!==" "&&h!==`
10
+ `&&h!==" "){let S=n[f+1];S&&S!==" "&&S!==`
11
+ `&&S!==" "&&(d=f)}if(f>=u)if(d)l.push(d),u=d+c,d=void 0;else if(t===xt){for(;h===" "||h===" ";)h=k,k=n[f+=1],w=!0;let S=f>g+1?f-2:p-1;if(m[S])return n;l.push(S),m[S]=!0,u=S+c,d=void 0}else w=!0}h=k}if(w&&a&&a(),l.length===0)return n;o&&o();let v=n.slice(0,l[0]);for(let k=0;k<l.length;++k){let S=l[k],C=l[k+1]||n.length;S===0?v=`
12
+ ${e}${n.slice(0,C)}`:(t===xt&&m[S]&&(v+=`${n[S]}\\`),v+=`
13
+ ${e}${n.slice(S+1,C)}`)}return v}function Vr(n,e,t){let i=e,r=e+1,s=n[r];for(;s===" "||s===" ";)if(e<r+t)s=n[++e];else{do s=n[++e];while(s&&s!==`
14
+ `);i=e,r=e+1,s=n[r]}return i}qe.FOLD_BLOCK=Wn;qe.FOLD_FLOW=Cc;qe.FOLD_QUOTED=xt;qe.foldFlowLines=Ec});var De=y(Gr=>{"use strict";var $=O(),z=Hr(),It=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),Rt=n=>/^(%|---|\.\.\.)/m.test(n);function _c(n,e,t){if(!e||e<0)return!1;let i=e-t,r=n.length;if(r<=i)return!1;for(let s=0,o=0;s<r;++s)if(n[s]===`
15
+ `){if(s-o>i)return!0;if(o=s+1,r-o<=i)return!1}return!0}function Le(n,e){let t=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:i}=e,r=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Rt(n)?" ":""),o="",a=0;for(let c=0,l=t[c];l;l=t[++c])if(l===" "&&t[c+1]==="\\"&&t[c+2]==="n"&&(o+=t.slice(a,c)+"\\ ",c+=1,a=c,l="\\"),l==="\\")switch(t[c+1]){case"u":{o+=t.slice(a,c);let m=t.substr(c+2,4);switch(m){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:m.substr(0,2)==="00"?o+="\\x"+m.substr(2):o+=t.substr(c,6)}c+=5,a=c+1}break;case"n":if(i||t[c+2]==='"'||t.length<r)c+=1;else{for(o+=t.slice(a,c)+`
16
16
 
17
17
  `;t[c+2]==="\\"&&t[c+3]==="n"&&t[c+4]!=='"';)o+=`
18
- `,c+=2;o+=s,t[c+2]===" "&&(o+="\\"),c+=1,a=c+1}break;default:c+=1}return o=a?o+t.slice(a):t,n?o:z.foldFlowLines(o,s,z.FOLD_QUOTED,xt(e,!1))}function Di(i,e){if(e.options.singleQuote===!1||e.implicitKey&&i.includes(`
19
- `)||/[ \t]\n|\n[ \t]/.test(i))return qe(i,e);let t=e.indent||(At(i)?" ":""),n="'"+i.replace(/'/g,"''").replace(/\n+/g,`$&
20
- ${t}`)+"'";return e.implicitKey?n:z.foldFlowLines(n,t,z.FOLD_FLOW,xt(e,!1))}function ve(i,e){let{singleQuote:t}=e.options,n;if(t===!1)n=qe;else{let r=i.includes('"'),s=i.includes("'");r&&!s?n=Di:s&&!r?n=qe:n=t?Di:qe}return n(i,e)}var $i;try{$i=new RegExp(`(^|(?<!
18
+ `,c+=2;o+=s,t[c+2]===" "&&(o+="\\"),c+=1,a=c+1}break;default:c+=1}return o=a?o+t.slice(a):t,i?o:z.foldFlowLines(o,s,z.FOLD_QUOTED,It(e,!1))}function Mn(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
19
+ `)||/[ \t]\n|\n[ \t]/.test(n))return Le(n,e);let t=e.indent||(Rt(n)?" ":""),i="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
20
+ ${t}`)+"'";return e.implicitKey?i:z.foldFlowLines(i,t,z.FOLD_FLOW,It(e,!1))}function ve(n,e){let{singleQuote:t}=e.options,i;if(t===!1)i=Le;else{let r=n.includes('"'),s=n.includes("'");r&&!s?i=Mn:s&&!r?i=Le:i=t?Mn:Le}return i(n,e)}var Fn;try{Fn=new RegExp(`(^|(?<!
21
21
  ))
22
22
  +(?!
23
- |$)`,"g")}catch{$i=/\n+(?!\n|$)/g}function Ot({comment:i,type:e,value:t},n,r,s){let{blockQuote:o,commentString:a,lineWidth:c}=n.options;if(!o||/\n[\t ]+$/.test(t))return ve(t,n);let l=n.indent||(n.forceBlockIndent||At(t)?" ":""),m=o==="literal"?!0:o==="folded"||e===$.Scalar.BLOCK_FOLDED?!1:e===$.Scalar.BLOCK_LITERAL?!0:!Ec(t,c,l.length);if(!t)return m?`|
23
+ |$)`,"g")}catch{Fn=/\n+(?!\n|$)/g}function At({comment:n,type:e,value:t},i,r,s){let{blockQuote:o,commentString:a,lineWidth:c}=i.options;if(!o||/\n[\t ]+$/.test(t))return ve(t,i);let l=i.indent||(i.forceBlockIndent||Rt(t)?" ":""),m=o==="literal"?!0:o==="folded"||e===$.Scalar.BLOCK_FOLDED?!1:e===$.Scalar.BLOCK_LITERAL?!0:!_c(t,c,l.length);if(!t)return m?`|
24
24
  `:`>
25
25
  `;let u,d;for(d=t.length;d>0;--d){let C=t[d-1];if(C!==`
26
26
  `&&C!==" "&&C!==" ")break}let h=t.substring(d),w=h.indexOf(`
27
27
  `);w===-1?u="-":t===h||w!==h.length-1?(u="+",s&&s()):u="",h&&(t=t.slice(0,-h.length),h[h.length-1]===`
28
- `&&(h=h.slice(0,-1)),h=h.replace($i,`$&${l}`));let f=!1,p,g=-1;for(p=0;p<t.length;++p){let C=t[p];if(C===" ")f=!0;else if(C===`
29
- `)g=p;else break}let v=t.substring(0,g<p?g+1:p);v&&(t=t.substring(v.length),v=v.replace(/\n+/g,`$&${l}`));let S=(f?l?"2":"1":"")+u;if(i&&(S+=" "+a(i.replace(/ ?[\r\n]+/g," ")),r&&r()),!m){let C=t.replace(/\n+/g,`
30
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),E=!1,N=xt(n,!0);o!=="folded"&&e!==$.Scalar.BLOCK_FOLDED&&(N.onOverflow=()=>{E=!0});let b=z.foldFlowLines(`${v}${C}${h}`,l,z.FOLD_BLOCK,N);if(!E)return`>${S}
28
+ `&&(h=h.slice(0,-1)),h=h.replace(Fn,`$&${l}`));let f=!1,p,g=-1;for(p=0;p<t.length;++p){let C=t[p];if(C===" ")f=!0;else if(C===`
29
+ `)g=p;else break}let v=t.substring(0,g<p?g+1:p);v&&(t=t.substring(v.length),v=v.replace(/\n+/g,`$&${l}`));let S=(f?l?"2":"1":"")+u;if(n&&(S+=" "+a(n.replace(/ ?[\r\n]+/g," ")),r&&r()),!m){let C=t.replace(/\n+/g,`
30
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),E=!1,N=It(i,!0);o!=="folded"&&e!==$.Scalar.BLOCK_FOLDED&&(N.onOverflow=()=>{E=!0});let b=z.foldFlowLines(`${v}${C}${h}`,l,z.FOLD_BLOCK,N);if(!E)return`>${S}
31
31
  ${l}${b}`}return t=t.replace(/\n+/g,`$&${l}`),`|${S}
32
- ${l}${v}${t}${h}`}function _c(i,e,t,n){let{type:r,value:s}=i,{actualString:o,implicitKey:a,indent:c,indentStep:l,inFlow:m}=e;if(a&&s.includes(`
32
+ ${l}${v}${t}${h}`}function Pc(n,e,t,i){let{type:r,value:s}=n,{actualString:o,implicitKey:a,indent:c,indentStep:l,inFlow:m}=e;if(a&&s.includes(`
33
33
  `)||m&&/[[\]{},]/.test(s))return ve(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||m||!s.includes(`
34
- `)?ve(s,e):Ot(i,e,t,n);if(!a&&!m&&r!==$.Scalar.PLAIN&&s.includes(`
35
- `))return Ot(i,e,t,n);if(At(s)){if(c==="")return e.forceBlockIndent=!0,Ot(i,e,t,n);if(a&&c===l)return ve(s,e)}let u=s.replace(/\n+/g,`$&
36
- ${c}`);if(o){let d=f=>f.default&&f.tag!=="tag:yaml.org,2002:str"&&f.test?.test(u),{compat:h,tags:w}=e.doc.schema;if(w.some(d)||h?.some(d))return ve(s,e)}return a?u:z.foldFlowLines(u,c,z.FOLD_FLOW,xt(e,!1))}function Pc(i,e,t,n){let{implicitKey:r,inFlow:s}=e,o=typeof i.value=="string"?i:Object.assign({},i,{value:String(i.value)}),{type:a}=i;a!==$.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=$.Scalar.QUOTE_DOUBLE);let c=m=>{switch(m){case $.Scalar.BLOCK_FOLDED:case $.Scalar.BLOCK_LITERAL:return r||s?ve(o.value,e):Ot(o,e,t,n);case $.Scalar.QUOTE_DOUBLE:return qe(o.value,e);case $.Scalar.QUOTE_SINGLE:return Di(o.value,e);case $.Scalar.PLAIN:return _c(o,e,t,n);default:return null}},l=c(a);if(l===null){let{defaultKeyType:m,defaultStringType:u}=e.options,d=r&&m||u;if(l=c(d),l===null)throw new Error(`Unsupported default string type ${d}`)}return l}Hr.stringifyString=Pc});var De=y(Mi=>{"use strict";var Nc=kt(),G=_(),Oc=je(),xc=Le();function Ac(i,e){let t=Object.assign({blockQuote:!0,commentString:Oc.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},i.schema.toStringOptions,e),n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:i,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function Ic(i,e){if(e.tag){let r=i.filter(s=>s.tag===e.tag);if(r.length>0)return r.find(s=>s.format===e.format)??r[0]}let t,n;if(G.isScalar(e)){n=e.value;let r=i.filter(s=>s.identify?.(n));if(r.length>1){let s=r.filter(o=>o.test);s.length>0&&(r=s)}t=r.find(s=>s.format===e.format)??r.find(s=>!s.format)}else n=e,t=i.find(r=>r.nodeClass&&n instanceof r.nodeClass);if(!t){let r=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${r} value`)}return t}function Rc(i,e,{anchors:t,doc:n}){if(!n.directives)return"";let r=[],s=(G.isScalar(i)||G.isCollection(i))&&i.anchor;s&&Nc.anchorIsValid(s)&&(t.add(s),r.push(`&${s}`));let o=i.tag??(e.default?null:e.tag);return o&&r.push(n.directives.tagString(o)),r.join(" ")}function jc(i,e,t,n){if(G.isPair(i))return i.toString(e,t,n);if(G.isAlias(i)){if(e.doc.directives)return i.toString(e);if(e.resolvedAliases?.has(i))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(i):e.resolvedAliases=new Set([i]),i=i.resolve(e.doc)}let r,s=G.isNode(i)?i:e.doc.createNode(i,{onTagObj:c=>r=c});r??(r=Ic(e.doc.schema.tags,s));let o=Rc(s,r,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let a=typeof r.stringify=="function"?r.stringify(s,e,t,n):G.isScalar(s)?xc.stringifyString(s,e,t,n):s.toString(e,t,n);return o?G.isScalar(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
37
- ${e.indent}${a}`:a}Mi.createStringifyContext=Ac;Mi.stringify=jc});var Xr=y(Qr=>{"use strict";var K=_(),zr=O(),Gr=De(),$e=je();function Tc({key:i,value:e},t,n,r){let{allNullValues:s,doc:o,indent:a,indentStep:c,options:{commentString:l,indentSeq:m,simpleKeys:u}}=t,d=K.isNode(i)&&i.comment||null;if(u){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(K.isCollection(i)||!K.isNode(i)&&typeof i=="object"){let N="With simple keys, collection cannot be used as a key value";throw new Error(N)}}let h=!u&&(!i||d&&e==null&&!t.inFlow||K.isCollection(i)||(K.isScalar(i)?i.type===zr.Scalar.BLOCK_FOLDED||i.type===zr.Scalar.BLOCK_LITERAL:typeof i=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!h&&(u||!s),indent:a+c});let w=!1,f=!1,p=Gr.stringify(i,t,()=>w=!0,()=>f=!0);if(!h&&!t.inFlow&&p.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(t.inFlow){if(s||e==null)return w&&n&&n(),p===""?"?":h?`? ${p}`:p}else if(s&&!u||e==null&&h)return p=`? ${p}`,d&&!w?p+=$e.lineComment(p,t.indent,l(d)):f&&r&&r(),p;w&&(d=null),h?(d&&(p+=$e.lineComment(p,t.indent,l(d))),p=`? ${p}
38
- ${a}:`):(p=`${p}:`,d&&(p+=$e.lineComment(p,t.indent,l(d))));let g,v,k;K.isNode(e)?(g=!!e.spaceBefore,v=e.commentBefore,k=e.comment):(g=!1,v=null,k=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!h&&!d&&K.isScalar(e)&&(t.indentAtStart=p.length+1),f=!1,!m&&c.length>=2&&!t.inFlow&&!h&&K.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let S=!1,C=Gr.stringify(e,t,()=>S=!0,()=>f=!0),E=" ";if(d||g||v){if(E=g?`
34
+ `)?ve(s,e):At(n,e,t,i);if(!a&&!m&&r!==$.Scalar.PLAIN&&s.includes(`
35
+ `))return At(n,e,t,i);if(Rt(s)){if(c==="")return e.forceBlockIndent=!0,At(n,e,t,i);if(a&&c===l)return ve(s,e)}let u=s.replace(/\n+/g,`$&
36
+ ${c}`);if(o){let d=f=>f.default&&f.tag!=="tag:yaml.org,2002:str"&&f.test?.test(u),{compat:h,tags:w}=e.doc.schema;if(w.some(d)||h?.some(d))return ve(s,e)}return a?u:z.foldFlowLines(u,c,z.FOLD_FLOW,It(e,!1))}function Nc(n,e,t,i){let{implicitKey:r,inFlow:s}=e,o=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)}),{type:a}=n;a!==$.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=$.Scalar.QUOTE_DOUBLE);let c=m=>{switch(m){case $.Scalar.BLOCK_FOLDED:case $.Scalar.BLOCK_LITERAL:return r||s?ve(o.value,e):At(o,e,t,i);case $.Scalar.QUOTE_DOUBLE:return Le(o.value,e);case $.Scalar.QUOTE_SINGLE:return Mn(o.value,e);case $.Scalar.PLAIN:return Pc(o,e,t,i);default:return null}},l=c(a);if(l===null){let{defaultKeyType:m,defaultStringType:u}=e.options,d=r&&m||u;if(l=c(d),l===null)throw new Error(`Unsupported default string type ${d}`)}return l}Gr.stringifyString=Nc});var $e=y(Bn=>{"use strict";var Oc=Ct(),Q=_(),xc=Te(),Ac=De();function Ic(n,e){let t=Object.assign({blockQuote:!0,commentString:xc.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e),i;switch(t.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:n,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:i,options:t}}function Rc(n,e){if(e.tag){let r=n.filter(s=>s.tag===e.tag);if(r.length>0)return r.find(s=>s.format===e.format)??r[0]}let t,i;if(Q.isScalar(e)){i=e.value;let r=n.filter(s=>s.identify?.(i));if(r.length>1){let s=r.filter(o=>o.test);s.length>0&&(r=s)}t=r.find(s=>s.format===e.format)??r.find(s=>!s.format)}else i=e,t=n.find(r=>r.nodeClass&&i instanceof r.nodeClass);if(!t){let r=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${r} value`)}return t}function jc(n,e,{anchors:t,doc:i}){if(!i.directives)return"";let r=[],s=(Q.isScalar(n)||Q.isCollection(n))&&n.anchor;s&&Oc.anchorIsValid(s)&&(t.add(s),r.push(`&${s}`));let o=n.tag??(e.default?null:e.tag);return o&&r.push(i.directives.tagString(o)),r.join(" ")}function Tc(n,e,t,i){if(Q.isPair(n))return n.toString(e,t,i);if(Q.isAlias(n)){if(e.doc.directives)return n.toString(e);if(e.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let r,s=Q.isNode(n)?n:e.doc.createNode(n,{onTagObj:c=>r=c});r??(r=Rc(e.doc.schema.tags,s));let o=jc(s,r,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let a=typeof r.stringify=="function"?r.stringify(s,e,t,i):Q.isScalar(s)?Ac.stringifyString(s,e,t,i):s.toString(e,t,i);return o?Q.isScalar(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
37
+ ${e.indent}${a}`:a}Bn.createStringifyContext=Ic;Bn.stringify=Tc});var Zr=y(Xr=>{"use strict";var K=_(),zr=O(),Qr=$e(),We=Te();function qc({key:n,value:e},t,i,r){let{allNullValues:s,doc:o,indent:a,indentStep:c,options:{commentString:l,indentSeq:m,simpleKeys:u}}=t,d=K.isNode(n)&&n.comment||null;if(u){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(K.isCollection(n)||!K.isNode(n)&&typeof n=="object"){let N="With simple keys, collection cannot be used as a key value";throw new Error(N)}}let h=!u&&(!n||d&&e==null&&!t.inFlow||K.isCollection(n)||(K.isScalar(n)?n.type===zr.Scalar.BLOCK_FOLDED||n.type===zr.Scalar.BLOCK_LITERAL:typeof n=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!h&&(u||!s),indent:a+c});let w=!1,f=!1,p=Qr.stringify(n,t,()=>w=!0,()=>f=!0);if(!h&&!t.inFlow&&p.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(t.inFlow){if(s||e==null)return w&&i&&i(),p===""?"?":h?`? ${p}`:p}else if(s&&!u||e==null&&h)return p=`? ${p}`,d&&!w?p+=We.lineComment(p,t.indent,l(d)):f&&r&&r(),p;w&&(d=null),h?(d&&(p+=We.lineComment(p,t.indent,l(d))),p=`? ${p}
38
+ ${a}:`):(p=`${p}:`,d&&(p+=We.lineComment(p,t.indent,l(d))));let g,v,k;K.isNode(e)?(g=!!e.spaceBefore,v=e.commentBefore,k=e.comment):(g=!1,v=null,k=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!h&&!d&&K.isScalar(e)&&(t.indentAtStart=p.length+1),f=!1,!m&&c.length>=2&&!t.inFlow&&!h&&K.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let S=!1,C=Qr.stringify(e,t,()=>S=!0,()=>f=!0),E=" ";if(d||g||v){if(E=g?`
39
39
  `:"",v){let N=l(v);E+=`
40
- ${$e.indentComment(N,t.indent)}`}C===""&&!t.inFlow?E===`
40
+ ${We.indentComment(N,t.indent)}`}C===""&&!t.inFlow?E===`
41
41
  `&&k&&(E=`
42
42
 
43
43
  `):E+=`
44
44
  ${t.indent}`}else if(!h&&K.isCollection(e)){let N=C[0],b=C.indexOf(`
45
45
  `),A=b!==-1,V=t.inFlow??e.flow??e.items.length===0;if(A||!V){let he=!1;if(A&&(N==="&"||N==="!")){let I=C.indexOf(" ");N==="&"&&I!==-1&&I<b&&C[I+1]==="!"&&(I=C.indexOf(" ",I+1)),(I===-1||b<I)&&(he=!0)}he||(E=`
46
46
  ${t.indent}`)}}else(C===""||C[0]===`
47
- `)&&(E="");return p+=E+C,t.inFlow?S&&n&&n():k&&!S?p+=$e.lineComment(p,t.indent,l(k)):f&&r&&r(),p}Qr.stringifyPair=Tc});var Fi=y(Wi=>{"use strict";var Zr=gt("process");function qc(i,...e){i==="debug"&&console.log(...e)}function Lc(i,e){(i==="debug"||i==="warn")&&(typeof Zr.emitWarning=="function"?Zr.emitWarning(e):console.warn(e))}Wi.debug=qc;Wi.warn=Lc});var qt=y(Tt=>{"use strict";var jt=_(),es=O(),It="<<",Rt={identify:i=>i===It||typeof i=="symbol"&&i.description===It,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new es.Scalar(Symbol(It)),{addToJSMap:ts}),stringify:()=>It},Dc=(i,e)=>(Rt.identify(e)||jt.isScalar(e)&&(!e.type||e.type===es.Scalar.PLAIN)&&Rt.identify(e.value))&&i?.doc.schema.tags.some(t=>t.tag===Rt.tag&&t.default);function ts(i,e,t){let n=is(i,t);if(jt.isSeq(n))for(let r of n.items)Bi(i,e,r);else if(Array.isArray(n))for(let r of n)Bi(i,e,r);else Bi(i,e,n)}function Bi(i,e,t){let n=is(i,t);if(!jt.isMap(n))throw new Error("Merge sources must be maps or map aliases");let r=n.toJSON(null,i,Map);for(let[s,o]of r)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function is(i,e){return i&&jt.isAlias(e)?e.resolve(i.doc,i):e}Tt.addMergeToJSMap=ts;Tt.isMergeKey=Dc;Tt.merge=Rt});var Yi=y(ss=>{"use strict";var $c=Fi(),ns=qt(),Mc=De(),rs=_(),Ki=J();function Wc(i,e,{key:t,value:n}){if(rs.isNode(t)&&t.addToJSMap)t.addToJSMap(i,e,n);else if(ns.isMergeKey(i,t))ns.addMergeToJSMap(i,e,n);else{let r=Ki.toJS(t,"",i);if(e instanceof Map)e.set(r,Ki.toJS(n,r,i));else if(e instanceof Set)e.add(r);else{let s=Fc(t,r,i),o=Ki.toJS(n,s,i);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function Fc(i,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(rs.isNode(i)&&t?.doc){let n=Mc.createStringifyContext(t.doc,{});n.anchors=new Set;for(let s of t.anchors.keys())n.anchors.add(s.anchor);n.inFlow=!0,n.inStringifyKey=!0;let r=i.toString(n);if(!t.mapKeyWarned){let s=JSON.stringify(r);s.length>40&&(s=s.substring(0,36)+'..."'),$c.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return r}return JSON.stringify(e)}ss.addPairToJSMap=Wc});var Q=y(Ui=>{"use strict";var os=Re(),Bc=Xr(),Kc=Yi(),Lt=_();function Yc(i,e,t){let n=os.createNode(i,void 0,t),r=os.createNode(e,void 0,t);return new Dt(n,r)}var Dt=class i{constructor(e,t=null){Object.defineProperty(this,Lt.NODE_TYPE,{value:Lt.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return Lt.isNode(t)&&(t=t.clone(e)),Lt.isNode(n)&&(n=n.clone(e)),new i(t,n)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return Kc.addPairToJSMap(t,n,this)}toString(e,t,n){return e?.doc?Bc.stringifyPair(this,e,t,n):JSON.stringify(this)}};Ui.Pair=Dt;Ui.createPair=Yc});var Vi=y(cs=>{"use strict";var ce=_(),as=De(),$t=je();function Uc(i,e,t){return(e.inFlow??i.flow?Jc:Vc)(i,e,t)}function Vc({comment:i,items:e},t,{blockItemPrefix:n,flowChars:r,itemIndent:s,onChompKeep:o,onComment:a}){let{indent:c,options:{commentString:l}}=t,m=Object.assign({},t,{indent:s,type:null}),u=!1,d=[];for(let w=0;w<e.length;++w){let f=e[w],p=null;if(ce.isNode(f))!u&&f.spaceBefore&&d.push(""),Mt(t,d,f.commentBefore,u),f.comment&&(p=f.comment);else if(ce.isPair(f)){let v=ce.isNode(f.key)?f.key:null;v&&(!u&&v.spaceBefore&&d.push(""),Mt(t,d,v.commentBefore,u))}u=!1;let g=as.stringify(f,m,()=>p=null,()=>u=!0);p&&(g+=$t.lineComment(g,s,l(p))),u&&p&&(u=!1),d.push(n+g)}let h;if(d.length===0)h=r.start+r.end;else{h=d[0];for(let w=1;w<d.length;++w){let f=d[w];h+=f?`
47
+ `)&&(E="");return p+=E+C,t.inFlow?S&&i&&i():k&&!S?p+=We.lineComment(p,t.indent,l(k)):f&&r&&r(),p}Xr.stringifyPair=qc});var Yn=y(Kn=>{"use strict";var es=yt("process");function Lc(n,...e){n==="debug"&&console.log(...e)}function Dc(n,e){(n==="debug"||n==="warn")&&(typeof es.emitWarning=="function"?es.emitWarning(e):console.warn(e))}Kn.debug=Lc;Kn.warn=Dc});var Dt=y(Lt=>{"use strict";var qt=_(),ts=O(),jt="<<",Tt={identify:n=>n===jt||typeof n=="symbol"&&n.description===jt,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ts.Scalar(Symbol(jt)),{addToJSMap:ns}),stringify:()=>jt},$c=(n,e)=>(Tt.identify(e)||qt.isScalar(e)&&(!e.type||e.type===ts.Scalar.PLAIN)&&Tt.identify(e.value))&&n?.doc.schema.tags.some(t=>t.tag===Tt.tag&&t.default);function ns(n,e,t){let i=is(n,t);if(qt.isSeq(i))for(let r of i.items)Un(n,e,r);else if(Array.isArray(i))for(let r of i)Un(n,e,r);else Un(n,e,i)}function Un(n,e,t){let i=is(n,t);if(!qt.isMap(i))throw new Error("Merge sources must be maps or map aliases");let r=i.toJSON(null,n,Map);for(let[s,o]of r)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function is(n,e){return n&&qt.isAlias(e)?e.resolve(n.doc,n):e}Lt.addMergeToJSMap=ns;Lt.isMergeKey=$c;Lt.merge=Tt});var Vn=y(os=>{"use strict";var Wc=Yn(),rs=Dt(),Mc=$e(),ss=_(),Jn=H();function Fc(n,e,{key:t,value:i}){if(ss.isNode(t)&&t.addToJSMap)t.addToJSMap(n,e,i);else if(rs.isMergeKey(n,t))rs.addMergeToJSMap(n,e,i);else{let r=Jn.toJS(t,"",n);if(e instanceof Map)e.set(r,Jn.toJS(i,r,n));else if(e instanceof Set)e.add(r);else{let s=Bc(t,r,n),o=Jn.toJS(i,s,n);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function Bc(n,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(ss.isNode(n)&&t?.doc){let i=Mc.createStringifyContext(t.doc,{});i.anchors=new Set;for(let s of t.anchors.keys())i.anchors.add(s.anchor);i.inFlow=!0,i.inStringifyKey=!0;let r=n.toString(i);if(!t.mapKeyWarned){let s=JSON.stringify(r);s.length>40&&(s=s.substring(0,36)+'..."'),Wc.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return r}return JSON.stringify(e)}os.addPairToJSMap=Fc});var X=y(Hn=>{"use strict";var as=je(),Kc=Zr(),Yc=Vn(),$t=_();function Uc(n,e,t){let i=as.createNode(n,void 0,t),r=as.createNode(e,void 0,t);return new Wt(i,r)}var Wt=class n{constructor(e,t=null){Object.defineProperty(this,$t.NODE_TYPE,{value:$t.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:i}=this;return $t.isNode(t)&&(t=t.clone(e)),$t.isNode(i)&&(i=i.clone(e)),new n(t,i)}toJSON(e,t){let i=t?.mapAsMap?new Map:{};return Yc.addPairToJSMap(t,i,this)}toString(e,t,i){return e?.doc?Kc.stringifyPair(this,e,t,i):JSON.stringify(this)}};Hn.Pair=Wt;Hn.createPair=Uc});var Gn=y(ls=>{"use strict";var ce=_(),cs=$e(),Mt=Te();function Jc(n,e,t){return(e.inFlow??n.flow?Hc:Vc)(n,e,t)}function Vc({comment:n,items:e},t,{blockItemPrefix:i,flowChars:r,itemIndent:s,onChompKeep:o,onComment:a}){let{indent:c,options:{commentString:l}}=t,m=Object.assign({},t,{indent:s,type:null}),u=!1,d=[];for(let w=0;w<e.length;++w){let f=e[w],p=null;if(ce.isNode(f))!u&&f.spaceBefore&&d.push(""),Ft(t,d,f.commentBefore,u),f.comment&&(p=f.comment);else if(ce.isPair(f)){let v=ce.isNode(f.key)?f.key:null;v&&(!u&&v.spaceBefore&&d.push(""),Ft(t,d,v.commentBefore,u))}u=!1;let g=cs.stringify(f,m,()=>p=null,()=>u=!0);p&&(g+=Mt.lineComment(g,s,l(p))),u&&p&&(u=!1),d.push(i+g)}let h;if(d.length===0)h=r.start+r.end;else{h=d[0];for(let w=1;w<d.length;++w){let f=d[w];h+=f?`
48
48
  ${c}${f}`:`
49
- `}}return i?(h+=`
50
- `+$t.indentComment(l(i),c),a&&a()):u&&o&&o(),h}function Jc({items:i},e,{flowChars:t,itemIndent:n}){let{indent:r,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;n+=s;let c=Object.assign({},e,{indent:n,inFlow:!0,type:null}),l=!1,m=0,u=[];for(let w=0;w<i.length;++w){let f=i[w],p=null;if(ce.isNode(f))f.spaceBefore&&u.push(""),Mt(e,u,f.commentBefore,!1),f.comment&&(p=f.comment);else if(ce.isPair(f)){let v=ce.isNode(f.key)?f.key:null;v&&(v.spaceBefore&&u.push(""),Mt(e,u,v.commentBefore,!1),v.comment&&(l=!0));let k=ce.isNode(f.value)?f.value:null;k?(k.comment&&(p=k.comment),k.commentBefore&&(l=!0)):f.value==null&&v?.comment&&(p=v.comment)}p&&(l=!0);let g=as.stringify(f,c,()=>p=null);l||(l=u.length>m||g.includes(`
51
- `)),w<i.length-1?g+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(l||(l=u.reduce((v,k)=>v+k.length+2,2)+(g.length+2)>e.options.lineWidth)),l&&(g+=",")),p&&(g+=$t.lineComment(g,n,a(p))),u.push(g),m=u.length}let{start:d,end:h}=t;if(u.length===0)return d+h;if(!l){let w=u.reduce((f,p)=>f+p.length+2,2);l=e.options.lineWidth>0&&w>e.options.lineWidth}if(l){let w=d;for(let f of u)w+=f?`
49
+ `}}return n?(h+=`
50
+ `+Mt.indentComment(l(n),c),a&&a()):u&&o&&o(),h}function Hc({items:n},e,{flowChars:t,itemIndent:i}){let{indent:r,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;i+=s;let c=Object.assign({},e,{indent:i,inFlow:!0,type:null}),l=!1,m=0,u=[];for(let w=0;w<n.length;++w){let f=n[w],p=null;if(ce.isNode(f))f.spaceBefore&&u.push(""),Ft(e,u,f.commentBefore,!1),f.comment&&(p=f.comment);else if(ce.isPair(f)){let v=ce.isNode(f.key)?f.key:null;v&&(v.spaceBefore&&u.push(""),Ft(e,u,v.commentBefore,!1),v.comment&&(l=!0));let k=ce.isNode(f.value)?f.value:null;k?(k.comment&&(p=k.comment),k.commentBefore&&(l=!0)):f.value==null&&v?.comment&&(p=v.comment)}p&&(l=!0);let g=cs.stringify(f,c,()=>p=null);l||(l=u.length>m||g.includes(`
51
+ `)),w<n.length-1?g+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(l||(l=u.reduce((v,k)=>v+k.length+2,2)+(g.length+2)>e.options.lineWidth)),l&&(g+=",")),p&&(g+=Mt.lineComment(g,i,a(p))),u.push(g),m=u.length}let{start:d,end:h}=t;if(u.length===0)return d+h;if(!l){let w=u.reduce((f,p)=>f+p.length+2,2);l=e.options.lineWidth>0&&w>e.options.lineWidth}if(l){let w=d;for(let f of u)w+=f?`
52
52
  ${s}${r}${f}`:`
53
53
  `;return`${w}
54
- ${r}${h}`}else return`${d}${o}${u.join(" ")}${o}${h}`}function Mt({indent:i,options:{commentString:e}},t,n,r){if(n&&r&&(n=n.replace(/^\n+/,"")),n){let s=$t.indentComment(e(n),i);t.push(s.trimStart())}}cs.stringifyCollection=Uc});var Z=y(Hi=>{"use strict";var Hc=Vi(),zc=Yi(),Gc=_t(),X=_(),Wt=Q(),Qc=O();function Me(i,e){let t=X.isScalar(e)?e.value:e;for(let n of i)if(X.isPair(n)&&(n.key===e||n.key===t||X.isScalar(n.key)&&n.key.value===t))return n}var Ji=class extends Gc.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(X.MAP,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:s}=n,o=new this(e),a=(c,l)=>{if(typeof s=="function")l=s.call(t,c,l);else if(Array.isArray(s)&&!s.includes(c))return;(l!==void 0||r)&&o.items.push(Wt.createPair(c,l,n))};if(t instanceof Map)for(let[c,l]of t)a(c,l);else if(t&&typeof t=="object")for(let c of Object.keys(t))a(c,t[c]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;X.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new Wt.Pair(e,e?.value):n=new Wt.Pair(e.key,e.value);let r=Me(this.items,n.key),s=this.schema?.sortMapEntries;if(r){if(!t)throw new Error(`Key ${n.key} already set`);X.isScalar(r.value)&&Qc.isScalarValue(n.value)?r.value.value=n.value:r.value=n.value}else if(s){let o=this.items.findIndex(a=>s(n,a)<0);o===-1?this.items.push(n):this.items.splice(o,0,n)}else this.items.push(n)}delete(e){let t=Me(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let r=Me(this.items,e)?.value;return(!t&&X.isScalar(r)?r.value:r)??void 0}has(e){return!!Me(this.items,e)}set(e,t){this.add(new Wt.Pair(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let s of this.items)zc.addPairToJSMap(t,r,s);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let r of this.items)if(!X.isPair(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Hc.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}};Hi.YAMLMap=Ji;Hi.findPair=Me});var be=y(us=>{"use strict";var Xc=_(),ls=Z(),Zc={collection:"map",default:!0,nodeClass:ls.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(i,e){return Xc.isMap(i)||e("Expected a mapping for this tag"),i},createNode:(i,e,t)=>ls.YAMLMap.from(i,e,t)};us.map=Zc});var ee=y(fs=>{"use strict";var el=Re(),tl=Vi(),il=_t(),Bt=_(),nl=O(),rl=J(),zi=class extends il.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Bt.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Ft(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let n=Ft(e);if(typeof n!="number")return;let r=this.items[n];return!t&&Bt.isScalar(r)?r.value:r}has(e){let t=Ft(e);return typeof t=="number"&&t<this.items.length}set(e,t){let n=Ft(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let r=this.items[n];Bt.isScalar(r)&&nl.isScalarValue(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let s of this.items)n.push(rl.toJS(s,String(r++),t));return n}toString(e,t,n){return e?tl.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,s=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof r=="function"){let c=t instanceof Set?a:String(o++);a=r.call(t,c,a)}s.items.push(el.createNode(a,void 0,n))}}return s}};function Ft(i){let e=Bt.isScalar(i)?i.value:i;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}fs.YAMLSeq=zi});var ke=y(ps=>{"use strict";var sl=_(),ds=ee(),ol={collection:"seq",default:!0,nodeClass:ds.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(i,e){return sl.isSeq(i)||e("Expected a sequence for this tag"),i},createNode:(i,e,t)=>ds.YAMLSeq.from(i,e,t)};ps.seq=ol});var We=y(ms=>{"use strict";var al=Le(),cl={identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify(i,e,t,n){return e=Object.assign({actualString:!0},e),al.stringifyString(i,e,t,n)}};ms.string=cl});var Kt=y(ws=>{"use strict";var hs=O(),gs={identify:i=>i==null,createNode:()=>new hs.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new hs.Scalar(null),stringify:({source:i},e)=>typeof i=="string"&&gs.test.test(i)?i:e.options.nullStr};ws.nullTag=gs});var Gi=y(vs=>{"use strict";var ll=O(),ys={identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:i=>new ll.Scalar(i[0]==="t"||i[0]==="T"),stringify({source:i,value:e},t){if(i&&ys.test.test(i)){let n=i[0]==="t"||i[0]==="T";if(e===n)return i}return e?t.options.trueStr:t.options.falseStr}};vs.boolTag=ys});var Se=y(bs=>{"use strict";function ul({format:i,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);let r=typeof n=="number"?n:Number(n);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=Object.is(n,-0)?"-0":JSON.stringify(n);if(!i&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^-?\d/.test(s)&&!s.includes("e")){let o=s.indexOf(".");o<0&&(o=s.length,s+=".");let a=e-(s.length-o-1);for(;a-- >0;)s+="0"}return s}bs.stringifyNumber=ul});var Xi=y(Yt=>{"use strict";var fl=O(),Qi=Se(),dl={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Qi.stringifyNumber},pl={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i),stringify(i){let e=Number(i.value);return isFinite(e)?e.toExponential():Qi.stringifyNumber(i)}},ml={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(i){let e=new fl.Scalar(parseFloat(i)),t=i.indexOf(".");return t!==-1&&i[i.length-1]==="0"&&(e.minFractionDigits=i.length-t-1),e},stringify:Qi.stringifyNumber};Yt.float=ml;Yt.floatExp=pl;Yt.floatNaN=dl});var en=y(Vt=>{"use strict";var ks=Se(),Ut=i=>typeof i=="bigint"||Number.isInteger(i),Zi=(i,e,t,{intAsBigInt:n})=>n?BigInt(i):parseInt(i.substring(e),t);function Ss(i,e,t){let{value:n}=i;return Ut(n)&&n>=0?t+n.toString(e):ks.stringifyNumber(i)}var hl={identify:i=>Ut(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(i,e,t)=>Zi(i,2,8,t),stringify:i=>Ss(i,8,"0o")},gl={identify:Ut,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(i,e,t)=>Zi(i,0,10,t),stringify:ks.stringifyNumber},wl={identify:i=>Ut(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(i,e,t)=>Zi(i,2,16,t),stringify:i=>Ss(i,16,"0x")};Vt.int=gl;Vt.intHex=wl;Vt.intOct=hl});var Es=y(Cs=>{"use strict";var yl=be(),vl=Kt(),bl=ke(),kl=We(),Sl=Gi(),tn=Xi(),nn=en(),Cl=[yl.map,bl.seq,kl.string,vl.nullTag,Sl.boolTag,nn.intOct,nn.int,nn.intHex,tn.floatNaN,tn.floatExp,tn.float];Cs.schema=Cl});var Ns=y(Ps=>{"use strict";var El=O(),_l=be(),Pl=ke();function _s(i){return typeof i=="bigint"||Number.isInteger(i)}var Jt=({value:i})=>JSON.stringify(i),Nl=[{identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify:Jt},{identify:i=>i==null,createNode:()=>new El.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Jt},{identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:i=>i==="true",stringify:Jt},{identify:_s,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(i,e,{intAsBigInt:t})=>t?BigInt(i):parseInt(i,10),stringify:({value:i})=>_s(i)?i.toString():JSON.stringify(i)},{identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:i=>parseFloat(i),stringify:Jt}],Ol={default:!0,tag:"",test:/^/,resolve(i,e){return e(`Unresolved plain scalar ${JSON.stringify(i)}`),i}},xl=[_l.map,Pl.seq].concat(Nl,Ol);Ps.schema=xl});var sn=y(Os=>{"use strict";var Fe=gt("buffer"),rn=O(),Al=Le(),Il={identify:i=>i instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(i,e){if(typeof Fe.Buffer=="function")return Fe.Buffer.from(i,"base64");if(typeof atob=="function"){let t=atob(i.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),i},stringify({comment:i,type:e,value:t},n,r,s){if(!t)return"";let o=t,a;if(typeof Fe.Buffer=="function")a=o instanceof Fe.Buffer?o.toString("base64"):Fe.Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let l=0;l<o.length;++l)c+=String.fromCharCode(o[l]);a=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=rn.Scalar.BLOCK_LITERAL),e!==rn.Scalar.QUOTE_DOUBLE){let c=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),l=Math.ceil(a.length/c),m=new Array(l);for(let u=0,d=0;u<l;++u,d+=c)m[u]=a.substr(d,c);a=m.join(e===rn.Scalar.BLOCK_LITERAL?`
55
- `:" ")}return Al.stringifyString({comment:i,type:e,value:a},n,r,s)}};Os.binary=Il});var Gt=y(zt=>{"use strict";var Ht=_(),on=Q(),Rl=O(),jl=ee();function xs(i,e){if(Ht.isSeq(i))for(let t=0;t<i.items.length;++t){let n=i.items[t];if(!Ht.isPair(n)){if(Ht.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let r=n.items[0]||new on.Pair(new Rl.Scalar(null));if(n.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${n.commentBefore}
56
- ${r.key.commentBefore}`:n.commentBefore),n.comment){let s=r.value??r.key;s.comment=s.comment?`${n.comment}
57
- ${s.comment}`:n.comment}n=r}i.items[t]=Ht.isPair(n)?n:new on.Pair(n)}}else e("Expected a sequence for this tag");return i}function As(i,e,t){let{replacer:n}=t,r=new jl.YAMLSeq(i);r.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(s++),o));let a,c;if(Array.isArray(o))if(o.length===2)a=o[0],c=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let l=Object.keys(o);if(l.length===1)a=l[0],c=o[a];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else a=o;r.items.push(on.createPair(a,c,t))}return r}var Tl={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:xs,createNode:As};zt.createPairs=As;zt.pairs=Tl;zt.resolvePairs=xs});var ln=y(cn=>{"use strict";var Is=_(),an=J(),Be=Z(),ql=ee(),Rs=Gt(),le=class i extends ql.YAMLSeq{constructor(){super(),this.add=Be.YAMLMap.prototype.add.bind(this),this.delete=Be.YAMLMap.prototype.delete.bind(this),this.get=Be.YAMLMap.prototype.get.bind(this),this.has=Be.YAMLMap.prototype.has.bind(this),this.set=Be.YAMLMap.prototype.set.bind(this),this.tag=i.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let r of this.items){let s,o;if(Is.isPair(r)?(s=an.toJS(r.key,"",t),o=an.toJS(r.value,s,t)):s=an.toJS(r,"",t),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,o)}return n}static from(e,t,n){let r=Rs.createPairs(e,t,n),s=new this;return s.items=r.items,s}};le.tag="tag:yaml.org,2002:omap";var Ll={collection:"seq",identify:i=>i instanceof Map,nodeClass:le,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,e){let t=Rs.resolvePairs(i,e),n=[];for(let{key:r}of t.items)Is.isScalar(r)&&(n.includes(r.value)?e(`Ordered maps must not include duplicate keys: ${r.value}`):n.push(r.value));return Object.assign(new le,t)},createNode:(i,e,t)=>le.from(i,e,t)};cn.YAMLOMap=le;cn.omap=Ll});var Ds=y(un=>{"use strict";var js=O();function Ts({value:i,source:e},t){return e&&(i?qs:Ls).test.test(e)?e:i?t.options.trueStr:t.options.falseStr}var qs={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new js.Scalar(!0),stringify:Ts},Ls={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new js.Scalar(!1),stringify:Ts};un.falseTag=Ls;un.trueTag=qs});var $s=y(Qt=>{"use strict";var Dl=O(),fn=Se(),$l={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:fn.stringifyNumber},Ml={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i.replace(/_/g,"")),stringify(i){let e=Number(i.value);return isFinite(e)?e.toExponential():fn.stringifyNumber(i)}},Wl={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(i){let e=new Dl.Scalar(parseFloat(i.replace(/_/g,""))),t=i.indexOf(".");if(t!==-1){let n=i.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:fn.stringifyNumber};Qt.float=Wl;Qt.floatExp=Ml;Qt.floatNaN=$l});var Ws=y(Ye=>{"use strict";var Ms=Se(),Ke=i=>typeof i=="bigint"||Number.isInteger(i);function Xt(i,e,t,{intAsBigInt:n}){let r=i[0];if((r==="-"||r==="+")&&(e+=1),i=i.substring(e).replace(/_/g,""),n){switch(t){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}let o=BigInt(i);return r==="-"?BigInt(-1)*o:o}let s=parseInt(i,t);return r==="-"?-1*s:s}function dn(i,e,t){let{value:n}=i;if(Ke(n)){let r=n.toString(e);return n<0?"-"+t+r.substr(1):t+r}return Ms.stringifyNumber(i)}var Fl={identify:Ke,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(i,e,t)=>Xt(i,2,2,t),stringify:i=>dn(i,2,"0b")},Bl={identify:Ke,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(i,e,t)=>Xt(i,1,8,t),stringify:i=>dn(i,8,"0")},Kl={identify:Ke,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(i,e,t)=>Xt(i,0,10,t),stringify:Ms.stringifyNumber},Yl={identify:Ke,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(i,e,t)=>Xt(i,2,16,t),stringify:i=>dn(i,16,"0x")};Ye.int=Kl;Ye.intBin=Fl;Ye.intHex=Yl;Ye.intOct=Bl});var mn=y(pn=>{"use strict";var ti=_(),Zt=Q(),ei=Z(),ue=class i extends ei.YAMLMap{constructor(e){super(e),this.tag=i.tag}add(e){let t;ti.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Zt.Pair(e.key,null):t=new Zt.Pair(e,null),ei.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let n=ei.findPair(this.items,e);return!t&&ti.isPair(n)?ti.isScalar(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=ei.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Zt.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){let{replacer:r}=n,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof r=="function"&&(o=r.call(t,o,o)),s.items.push(Zt.createPair(o,null,n));return s}};ue.tag="tag:yaml.org,2002:set";var Ul={collection:"map",identify:i=>i instanceof Set,nodeClass:ue,default:!1,tag:"tag:yaml.org,2002:set",createNode:(i,e,t)=>ue.from(i,e,t),resolve(i,e){if(ti.isMap(i)){if(i.hasAllNullValues(!0))return Object.assign(new ue,i);e("Set items must all have null values")}else e("Expected a mapping for this tag");return i}};pn.YAMLSet=ue;pn.set=Ul});var gn=y(ii=>{"use strict";var Vl=Se();function hn(i,e){let t=i[0],n=t==="-"||t==="+"?i.substring(1):i,r=o=>e?BigInt(o):Number(o),s=n.replace(/_/g,"").split(":").reduce((o,a)=>o*r(60)+r(a),r(0));return t==="-"?r(-1)*s:s}function Fs(i){let{value:e}=i,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Vl.stringifyNumber(i);let n="";e<0&&(n="-",e*=t(-1));let r=t(60),s=[e%r];return e<60?s.unshift(0):(e=(e-s[0])/r,s.unshift(e%r),e>=60&&(e=(e-s[0])/r,s.unshift(e))),n+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Jl={identify:i=>typeof i=="bigint"||Number.isInteger(i),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(i,e,{intAsBigInt:t})=>hn(i,t),stringify:Fs},Hl={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:i=>hn(i,!1),stringify:Fs},Bs={identify:i=>i instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(i){let e=i.match(Bs.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,n,r,s,o,a]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,l=Date.UTC(t,n-1,r,s||0,o||0,a||0,c),m=e[8];if(m&&m!=="Z"){let u=hn(m,!1);Math.abs(u)<30&&(u*=60),l-=6e4*u}return new Date(l)},stringify:({value:i})=>i?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};ii.floatTime=Hl;ii.intTime=Jl;ii.timestamp=Bs});var Us=y(Ys=>{"use strict";var zl=be(),Gl=Kt(),Ql=ke(),Xl=We(),Zl=sn(),Ks=Ds(),wn=$s(),ni=Ws(),eu=qt(),tu=ln(),iu=Gt(),nu=mn(),yn=gn(),ru=[zl.map,Ql.seq,Xl.string,Gl.nullTag,Ks.trueTag,Ks.falseTag,ni.intBin,ni.intOct,ni.int,ni.intHex,wn.floatNaN,wn.floatExp,wn.float,Zl.binary,eu.merge,tu.omap,iu.pairs,nu.set,yn.intTime,yn.floatTime,yn.timestamp];Ys.schema=ru});var to=y(kn=>{"use strict";var zs=be(),su=Kt(),Gs=ke(),ou=We(),au=Gi(),vn=Xi(),bn=en(),cu=Es(),lu=Ns(),Qs=sn(),Ue=qt(),Xs=ln(),Zs=Gt(),Vs=Us(),eo=mn(),ri=gn(),Js=new Map([["core",cu.schema],["failsafe",[zs.map,Gs.seq,ou.string]],["json",lu.schema],["yaml11",Vs.schema],["yaml-1.1",Vs.schema]]),Hs={binary:Qs.binary,bool:au.boolTag,float:vn.float,floatExp:vn.floatExp,floatNaN:vn.floatNaN,floatTime:ri.floatTime,int:bn.int,intHex:bn.intHex,intOct:bn.intOct,intTime:ri.intTime,map:zs.map,merge:Ue.merge,null:su.nullTag,omap:Xs.omap,pairs:Zs.pairs,seq:Gs.seq,set:eo.set,timestamp:ri.timestamp},uu={"tag:yaml.org,2002:binary":Qs.binary,"tag:yaml.org,2002:merge":Ue.merge,"tag:yaml.org,2002:omap":Xs.omap,"tag:yaml.org,2002:pairs":Zs.pairs,"tag:yaml.org,2002:set":eo.set,"tag:yaml.org,2002:timestamp":ri.timestamp};function fu(i,e,t){let n=Js.get(e);if(n&&!i)return t&&!n.includes(Ue.merge)?n.concat(Ue.merge):n.slice();let r=n;if(!r)if(Array.isArray(i))r=[];else{let s=Array.from(Js.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(i))for(let s of i)r=r.concat(s);else typeof i=="function"&&(r=i(r.slice()));return t&&(r=r.concat(Ue.merge)),r.reduce((s,o)=>{let a=typeof o=="string"?Hs[o]:o;if(!a){let c=JSON.stringify(o),l=Object.keys(Hs).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${l}`)}return s.includes(a)||s.push(a),s},[])}kn.coreKnownTags=uu;kn.getTags=fu});var En=y(io=>{"use strict";var Sn=_(),du=be(),pu=ke(),mu=We(),si=to(),hu=(i,e)=>i.key<e.key?-1:i.key>e.key?1:0,Cn=class i{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?si.getTags(e,"compat"):e?si.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=r?si.coreKnownTags:{},this.tags=si.getTags(t,this.name,n),this.toStringOptions=a??null,Object.defineProperty(this,Sn.MAP,{value:du.map}),Object.defineProperty(this,Sn.SCALAR,{value:mu.string}),Object.defineProperty(this,Sn.SEQ,{value:pu.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?hu:null}clone(){let e=Object.create(i.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};io.Schema=Cn});var ro=y(no=>{"use strict";var gu=_(),_n=De(),Ve=je();function wu(i,e){let t=[],n=e.directives===!0;if(e.directives!==!1&&i.directives){let c=i.directives.toString(i);c?(t.push(c),n=!0):i.directives.docStart&&(n=!0)}n&&t.push("---");let r=_n.createStringifyContext(i,e),{commentString:s}=r.options;if(i.commentBefore){t.length!==1&&t.unshift("");let c=s(i.commentBefore);t.unshift(Ve.indentComment(c,""))}let o=!1,a=null;if(i.contents){if(gu.isNode(i.contents)){if(i.contents.spaceBefore&&n&&t.push(""),i.contents.commentBefore){let m=s(i.contents.commentBefore);t.push(Ve.indentComment(m,""))}r.forceBlockIndent=!!i.comment,a=i.contents.comment}let c=a?void 0:()=>o=!0,l=_n.stringify(i.contents,r,()=>a=null,c);a&&(l+=Ve.lineComment(l,"",s(a))),(l[0]==="|"||l[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${l}`:t.push(l)}else t.push(_n.stringify(i.contents,r));if(i.directives?.docEnd)if(i.comment){let c=s(i.comment);c.includes(`
58
- `)?(t.push("..."),t.push(Ve.indentComment(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=i.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(Ve.indentComment(s(c),"")))}return t.join(`
54
+ ${r}${h}`}else return`${d}${o}${u.join(" ")}${o}${h}`}function Ft({indent:n,options:{commentString:e}},t,i,r){if(i&&r&&(i=i.replace(/^\n+/,"")),i){let s=Mt.indentComment(e(i),n);t.push(s.trimStart())}}ls.stringifyCollection=Jc});var ee=y(Qn=>{"use strict";var Gc=Gn(),zc=Vn(),Qc=Nt(),Z=_(),Bt=X(),Xc=O();function Me(n,e){let t=Z.isScalar(e)?e.value:e;for(let i of n)if(Z.isPair(i)&&(i.key===e||i.key===t||Z.isScalar(i.key)&&i.key.value===t))return i}var zn=class extends Qc.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Z.MAP,e),this.items=[]}static from(e,t,i){let{keepUndefined:r,replacer:s}=i,o=new this(e),a=(c,l)=>{if(typeof s=="function")l=s.call(t,c,l);else if(Array.isArray(s)&&!s.includes(c))return;(l!==void 0||r)&&o.items.push(Bt.createPair(c,l,i))};if(t instanceof Map)for(let[c,l]of t)a(c,l);else if(t&&typeof t=="object")for(let c of Object.keys(t))a(c,t[c]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let i;Z.isPair(e)?i=e:!e||typeof e!="object"||!("key"in e)?i=new Bt.Pair(e,e?.value):i=new Bt.Pair(e.key,e.value);let r=Me(this.items,i.key),s=this.schema?.sortMapEntries;if(r){if(!t)throw new Error(`Key ${i.key} already set`);Z.isScalar(r.value)&&Xc.isScalarValue(i.value)?r.value.value=i.value:r.value=i.value}else if(s){let o=this.items.findIndex(a=>s(i,a)<0);o===-1?this.items.push(i):this.items.splice(o,0,i)}else this.items.push(i)}delete(e){let t=Me(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let r=Me(this.items,e)?.value;return(!t&&Z.isScalar(r)?r.value:r)??void 0}has(e){return!!Me(this.items,e)}set(e,t){this.add(new Bt.Pair(e,t),!0)}toJSON(e,t,i){let r=i?new i:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let s of this.items)zc.addPairToJSMap(t,r,s);return r}toString(e,t,i){if(!e)return JSON.stringify(this);for(let r of this.items)if(!Z.isPair(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Gc.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:t})}};Qn.YAMLMap=zn;Qn.findPair=Me});var be=y(fs=>{"use strict";var Zc=_(),us=ee(),el={collection:"map",default:!0,nodeClass:us.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(n,e){return Zc.isMap(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,t)=>us.YAMLMap.from(n,e,t)};fs.map=el});var te=y(ds=>{"use strict";var tl=je(),nl=Gn(),il=Nt(),Yt=_(),rl=O(),sl=H(),Xn=class extends il.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Yt.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Kt(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let i=Kt(e);if(typeof i!="number")return;let r=this.items[i];return!t&&Yt.isScalar(r)?r.value:r}has(e){let t=Kt(e);return typeof t=="number"&&t<this.items.length}set(e,t){let i=Kt(e);if(typeof i!="number")throw new Error(`Expected a valid index, not ${e}.`);let r=this.items[i];Yt.isScalar(r)&&rl.isScalarValue(t)?r.value=t:this.items[i]=t}toJSON(e,t){let i=[];t?.onCreate&&t.onCreate(i);let r=0;for(let s of this.items)i.push(sl.toJS(s,String(r++),t));return i}toString(e,t,i){return e?nl.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:i,onComment:t}):JSON.stringify(this)}static from(e,t,i){let{replacer:r}=i,s=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof r=="function"){let c=t instanceof Set?a:String(o++);a=r.call(t,c,a)}s.items.push(tl.createNode(a,void 0,i))}}return s}};function Kt(n){let e=Yt.isScalar(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}ds.YAMLSeq=Xn});var ke=y(ms=>{"use strict";var ol=_(),ps=te(),al={collection:"seq",default:!0,nodeClass:ps.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(n,e){return ol.isSeq(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,t)=>ps.YAMLSeq.from(n,e,t)};ms.seq=al});var Fe=y(hs=>{"use strict";var cl=De(),ll={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,t,i){return e=Object.assign({actualString:!0},e),cl.stringifyString(n,e,t,i)}};hs.string=ll});var Ut=y(ys=>{"use strict";var gs=O(),ws={identify:n=>n==null,createNode:()=>new gs.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new gs.Scalar(null),stringify:({source:n},e)=>typeof n=="string"&&ws.test.test(n)?n:e.options.nullStr};ys.nullTag=ws});var Zn=y(bs=>{"use strict";var ul=O(),vs={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new ul.Scalar(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},t){if(n&&vs.test.test(n)){let i=n[0]==="t"||n[0]==="T";if(e===i)return n}return e?t.options.trueStr:t.options.falseStr}};bs.boolTag=vs});var Se=y(ks=>{"use strict";function fl({format:n,minFractionDigits:e,tag:t,value:i}){if(typeof i=="bigint")return String(i);let r=typeof i=="number"?i:Number(i);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=Object.is(i,-0)?"-0":JSON.stringify(i);if(!n&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^-?\d/.test(s)&&!s.includes("e")){let o=s.indexOf(".");o<0&&(o=s.length,s+=".");let a=e-(s.length-o-1);for(;a-- >0;)s+="0"}return s}ks.stringifyNumber=fl});var ti=y(Jt=>{"use strict";var dl=O(),ei=Se(),pl={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ei.stringifyNumber},ml={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n),stringify(n){let e=Number(n.value);return isFinite(e)?e.toExponential():ei.stringifyNumber(n)}},hl={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(n){let e=new dl.Scalar(parseFloat(n)),t=n.indexOf(".");return t!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-t-1),e},stringify:ei.stringifyNumber};Jt.float=hl;Jt.floatExp=ml;Jt.floatNaN=pl});var ii=y(Ht=>{"use strict";var Ss=Se(),Vt=n=>typeof n=="bigint"||Number.isInteger(n),ni=(n,e,t,{intAsBigInt:i})=>i?BigInt(n):parseInt(n.substring(e),t);function Cs(n,e,t){let{value:i}=n;return Vt(i)&&i>=0?t+i.toString(e):Ss.stringifyNumber(n)}var gl={identify:n=>Vt(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,t)=>ni(n,2,8,t),stringify:n=>Cs(n,8,"0o")},wl={identify:Vt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,t)=>ni(n,0,10,t),stringify:Ss.stringifyNumber},yl={identify:n=>Vt(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,t)=>ni(n,2,16,t),stringify:n=>Cs(n,16,"0x")};Ht.int=wl;Ht.intHex=yl;Ht.intOct=gl});var _s=y(Es=>{"use strict";var vl=be(),bl=Ut(),kl=ke(),Sl=Fe(),Cl=Zn(),ri=ti(),si=ii(),El=[vl.map,kl.seq,Sl.string,bl.nullTag,Cl.boolTag,si.intOct,si.int,si.intHex,ri.floatNaN,ri.floatExp,ri.float];Es.schema=El});var Os=y(Ns=>{"use strict";var _l=O(),Pl=be(),Nl=ke();function Ps(n){return typeof n=="bigint"||Number.isInteger(n)}var Gt=({value:n})=>JSON.stringify(n),Ol=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:Gt},{identify:n=>n==null,createNode:()=>new _l.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Gt},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:n=>n==="true",stringify:Gt},{identify:Ps,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(n,e,{intAsBigInt:t})=>t?BigInt(n):parseInt(n,10),stringify:({value:n})=>Ps(n)?n.toString():JSON.stringify(n)},{identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:n=>parseFloat(n),stringify:Gt}],xl={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},Al=[Pl.map,Nl.seq].concat(Ol,xl);Ns.schema=Al});var ai=y(xs=>{"use strict";var Be=yt("buffer"),oi=O(),Il=De(),Rl={identify:n=>n instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(n,e){if(typeof Be.Buffer=="function")return Be.Buffer.from(n,"base64");if(typeof atob=="function"){let t=atob(n.replace(/[\n\r]/g,"")),i=new Uint8Array(t.length);for(let r=0;r<t.length;++r)i[r]=t.charCodeAt(r);return i}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),n},stringify({comment:n,type:e,value:t},i,r,s){if(!t)return"";let o=t,a;if(typeof Be.Buffer=="function")a=o instanceof Be.Buffer?o.toString("base64"):Be.Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let l=0;l<o.length;++l)c+=String.fromCharCode(o[l]);a=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=oi.Scalar.BLOCK_LITERAL),e!==oi.Scalar.QUOTE_DOUBLE){let c=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),l=Math.ceil(a.length/c),m=new Array(l);for(let u=0,d=0;u<l;++u,d+=c)m[u]=a.substr(d,c);a=m.join(e===oi.Scalar.BLOCK_LITERAL?`
55
+ `:" ")}return Il.stringifyString({comment:n,type:e,value:a},i,r,s)}};xs.binary=Rl});var Xt=y(Qt=>{"use strict";var zt=_(),ci=X(),jl=O(),Tl=te();function As(n,e){if(zt.isSeq(n))for(let t=0;t<n.items.length;++t){let i=n.items[t];if(!zt.isPair(i)){if(zt.isMap(i)){i.items.length>1&&e("Each pair must have its own sequence indicator");let r=i.items[0]||new ci.Pair(new jl.Scalar(null));if(i.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${i.commentBefore}
56
+ ${r.key.commentBefore}`:i.commentBefore),i.comment){let s=r.value??r.key;s.comment=s.comment?`${i.comment}
57
+ ${s.comment}`:i.comment}i=r}n.items[t]=zt.isPair(i)?i:new ci.Pair(i)}}else e("Expected a sequence for this tag");return n}function Is(n,e,t){let{replacer:i}=t,r=new Tl.YAMLSeq(n);r.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof i=="function"&&(o=i.call(e,String(s++),o));let a,c;if(Array.isArray(o))if(o.length===2)a=o[0],c=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let l=Object.keys(o);if(l.length===1)a=l[0],c=o[a];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else a=o;r.items.push(ci.createPair(a,c,t))}return r}var ql={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:As,createNode:Is};Qt.createPairs=Is;Qt.pairs=ql;Qt.resolvePairs=As});var fi=y(ui=>{"use strict";var Rs=_(),li=H(),Ke=ee(),Ll=te(),js=Xt(),le=class n extends Ll.YAMLSeq{constructor(){super(),this.add=Ke.YAMLMap.prototype.add.bind(this),this.delete=Ke.YAMLMap.prototype.delete.bind(this),this.get=Ke.YAMLMap.prototype.get.bind(this),this.has=Ke.YAMLMap.prototype.has.bind(this),this.set=Ke.YAMLMap.prototype.set.bind(this),this.tag=n.tag}toJSON(e,t){if(!t)return super.toJSON(e);let i=new Map;t?.onCreate&&t.onCreate(i);for(let r of this.items){let s,o;if(Rs.isPair(r)?(s=li.toJS(r.key,"",t),o=li.toJS(r.value,s,t)):s=li.toJS(r,"",t),i.has(s))throw new Error("Ordered maps must not include duplicate keys");i.set(s,o)}return i}static from(e,t,i){let r=js.createPairs(e,t,i),s=new this;return s.items=r.items,s}};le.tag="tag:yaml.org,2002:omap";var Dl={collection:"seq",identify:n=>n instanceof Map,nodeClass:le,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){let t=js.resolvePairs(n,e),i=[];for(let{key:r}of t.items)Rs.isScalar(r)&&(i.includes(r.value)?e(`Ordered maps must not include duplicate keys: ${r.value}`):i.push(r.value));return Object.assign(new le,t)},createNode:(n,e,t)=>le.from(n,e,t)};ui.YAMLOMap=le;ui.omap=Dl});var $s=y(di=>{"use strict";var Ts=O();function qs({value:n,source:e},t){return e&&(n?Ls:Ds).test.test(e)?e:n?t.options.trueStr:t.options.falseStr}var Ls={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Ts.Scalar(!0),stringify:qs},Ds={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Ts.Scalar(!1),stringify:qs};di.falseTag=Ds;di.trueTag=Ls});var Ws=y(Zt=>{"use strict";var $l=O(),pi=Se(),Wl={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:pi.stringifyNumber},Ml={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){let e=Number(n.value);return isFinite(e)?e.toExponential():pi.stringifyNumber(n)}},Fl={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){let e=new $l.Scalar(parseFloat(n.replace(/_/g,""))),t=n.indexOf(".");if(t!==-1){let i=n.substring(t+1).replace(/_/g,"");i[i.length-1]==="0"&&(e.minFractionDigits=i.length)}return e},stringify:pi.stringifyNumber};Zt.float=Fl;Zt.floatExp=Ml;Zt.floatNaN=Wl});var Fs=y(Ue=>{"use strict";var Ms=Se(),Ye=n=>typeof n=="bigint"||Number.isInteger(n);function en(n,e,t,{intAsBigInt:i}){let r=n[0];if((r==="-"||r==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),i){switch(t){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}let o=BigInt(n);return r==="-"?BigInt(-1)*o:o}let s=parseInt(n,t);return r==="-"?-1*s:s}function mi(n,e,t){let{value:i}=n;if(Ye(i)){let r=i.toString(e);return i<0?"-"+t+r.substr(1):t+r}return Ms.stringifyNumber(n)}var Bl={identify:Ye,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,t)=>en(n,2,2,t),stringify:n=>mi(n,2,"0b")},Kl={identify:Ye,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,t)=>en(n,1,8,t),stringify:n=>mi(n,8,"0")},Yl={identify:Ye,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,t)=>en(n,0,10,t),stringify:Ms.stringifyNumber},Ul={identify:Ye,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,t)=>en(n,2,16,t),stringify:n=>mi(n,16,"0x")};Ue.int=Yl;Ue.intBin=Bl;Ue.intHex=Ul;Ue.intOct=Kl});var gi=y(hi=>{"use strict";var rn=_(),tn=X(),nn=ee(),ue=class n extends nn.YAMLMap{constructor(e){super(e),this.tag=n.tag}add(e){let t;rn.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new tn.Pair(e.key,null):t=new tn.Pair(e,null),nn.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let i=nn.findPair(this.items,e);return!t&&rn.isPair(i)?rn.isScalar(i.key)?i.key.value:i.key:i}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let i=nn.findPair(this.items,e);i&&!t?this.items.splice(this.items.indexOf(i),1):!i&&t&&this.items.push(new tn.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,i);throw new Error("Set items must all have null values")}static from(e,t,i){let{replacer:r}=i,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof r=="function"&&(o=r.call(t,o,o)),s.items.push(tn.createPair(o,null,i));return s}};ue.tag="tag:yaml.org,2002:set";var Jl={collection:"map",identify:n=>n instanceof Set,nodeClass:ue,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,t)=>ue.from(n,e,t),resolve(n,e){if(rn.isMap(n)){if(n.hasAllNullValues(!0))return Object.assign(new ue,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};hi.YAMLSet=ue;hi.set=Jl});var yi=y(sn=>{"use strict";var Vl=Se();function wi(n,e){let t=n[0],i=t==="-"||t==="+"?n.substring(1):n,r=o=>e?BigInt(o):Number(o),s=i.replace(/_/g,"").split(":").reduce((o,a)=>o*r(60)+r(a),r(0));return t==="-"?r(-1)*s:s}function Bs(n){let{value:e}=n,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Vl.stringifyNumber(n);let i="";e<0&&(i="-",e*=t(-1));let r=t(60),s=[e%r];return e<60?s.unshift(0):(e=(e-s[0])/r,s.unshift(e%r),e>=60&&(e=(e-s[0])/r,s.unshift(e))),i+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Hl={identify:n=>typeof n=="bigint"||Number.isInteger(n),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(n,e,{intAsBigInt:t})=>wi(n,t),stringify:Bs},Gl={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:n=>wi(n,!1),stringify:Bs},Ks={identify:n=>n instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(n){let e=n.match(Ks.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,i,r,s,o,a]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,l=Date.UTC(t,i-1,r,s||0,o||0,a||0,c),m=e[8];if(m&&m!=="Z"){let u=wi(m,!1);Math.abs(u)<30&&(u*=60),l-=6e4*u}return new Date(l)},stringify:({value:n})=>n?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};sn.floatTime=Gl;sn.intTime=Hl;sn.timestamp=Ks});var Js=y(Us=>{"use strict";var zl=be(),Ql=Ut(),Xl=ke(),Zl=Fe(),eu=ai(),Ys=$s(),vi=Ws(),on=Fs(),tu=Dt(),nu=fi(),iu=Xt(),ru=gi(),bi=yi(),su=[zl.map,Xl.seq,Zl.string,Ql.nullTag,Ys.trueTag,Ys.falseTag,on.intBin,on.intOct,on.int,on.intHex,vi.floatNaN,vi.floatExp,vi.float,eu.binary,tu.merge,nu.omap,iu.pairs,ru.set,bi.intTime,bi.floatTime,bi.timestamp];Us.schema=su});var no=y(Ci=>{"use strict";var zs=be(),ou=Ut(),Qs=ke(),au=Fe(),cu=Zn(),ki=ti(),Si=ii(),lu=_s(),uu=Os(),Xs=ai(),Je=Dt(),Zs=fi(),eo=Xt(),Vs=Js(),to=gi(),an=yi(),Hs=new Map([["core",lu.schema],["failsafe",[zs.map,Qs.seq,au.string]],["json",uu.schema],["yaml11",Vs.schema],["yaml-1.1",Vs.schema]]),Gs={binary:Xs.binary,bool:cu.boolTag,float:ki.float,floatExp:ki.floatExp,floatNaN:ki.floatNaN,floatTime:an.floatTime,int:Si.int,intHex:Si.intHex,intOct:Si.intOct,intTime:an.intTime,map:zs.map,merge:Je.merge,null:ou.nullTag,omap:Zs.omap,pairs:eo.pairs,seq:Qs.seq,set:to.set,timestamp:an.timestamp},fu={"tag:yaml.org,2002:binary":Xs.binary,"tag:yaml.org,2002:merge":Je.merge,"tag:yaml.org,2002:omap":Zs.omap,"tag:yaml.org,2002:pairs":eo.pairs,"tag:yaml.org,2002:set":to.set,"tag:yaml.org,2002:timestamp":an.timestamp};function du(n,e,t){let i=Hs.get(e);if(i&&!n)return t&&!i.includes(Je.merge)?i.concat(Je.merge):i.slice();let r=i;if(!r)if(Array.isArray(n))r=[];else{let s=Array.from(Hs.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(n))for(let s of n)r=r.concat(s);else typeof n=="function"&&(r=n(r.slice()));return t&&(r=r.concat(Je.merge)),r.reduce((s,o)=>{let a=typeof o=="string"?Gs[o]:o;if(!a){let c=JSON.stringify(o),l=Object.keys(Gs).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${l}`)}return s.includes(a)||s.push(a),s},[])}Ci.coreKnownTags=fu;Ci.getTags=du});var Pi=y(io=>{"use strict";var Ei=_(),pu=be(),mu=ke(),hu=Fe(),cn=no(),gu=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0,_i=class n{constructor({compat:e,customTags:t,merge:i,resolveKnownTags:r,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?cn.getTags(e,"compat"):e?cn.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=r?cn.coreKnownTags:{},this.tags=cn.getTags(t,this.name,i),this.toStringOptions=a??null,Object.defineProperty(this,Ei.MAP,{value:pu.map}),Object.defineProperty(this,Ei.SCALAR,{value:hu.string}),Object.defineProperty(this,Ei.SEQ,{value:mu.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?gu:null}clone(){let e=Object.create(n.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};io.Schema=_i});var so=y(ro=>{"use strict";var wu=_(),Ni=$e(),Ve=Te();function yu(n,e){let t=[],i=e.directives===!0;if(e.directives!==!1&&n.directives){let c=n.directives.toString(n);c?(t.push(c),i=!0):n.directives.docStart&&(i=!0)}i&&t.push("---");let r=Ni.createStringifyContext(n,e),{commentString:s}=r.options;if(n.commentBefore){t.length!==1&&t.unshift("");let c=s(n.commentBefore);t.unshift(Ve.indentComment(c,""))}let o=!1,a=null;if(n.contents){if(wu.isNode(n.contents)){if(n.contents.spaceBefore&&i&&t.push(""),n.contents.commentBefore){let m=s(n.contents.commentBefore);t.push(Ve.indentComment(m,""))}r.forceBlockIndent=!!n.comment,a=n.contents.comment}let c=a?void 0:()=>o=!0,l=Ni.stringify(n.contents,r,()=>a=null,c);a&&(l+=Ve.lineComment(l,"",s(a))),(l[0]==="|"||l[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${l}`:t.push(l)}else t.push(Ni.stringify(n.contents,r));if(n.directives?.docEnd)if(n.comment){let c=s(n.comment);c.includes(`
58
+ `)?(t.push("..."),t.push(Ve.indentComment(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=n.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(Ve.indentComment(s(c),"")))}return t.join(`
59
59
  `)+`
60
- `}no.stringifyDocument=wu});var Je=y(so=>{"use strict";var yu=Ie(),Ce=_t(),L=_(),vu=Q(),bu=J(),ku=En(),Su=ro(),Pn=kt(),Cu=xi(),Eu=Re(),Nn=Oi(),On=class i{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,L.NODE_TYPE,{value:L.DOC});let r=null;typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=s;let{version:o}=s;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Nn.Directives({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let e=Object.create(i.prototype,{[L.NODE_TYPE]:{value:L.DOC}});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=L.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Ee(this.contents)&&this.contents.add(e)}addIn(e,t){Ee(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=Pn.anchorNames(this);e.anchor=!t||n.has(t)?Pn.findNewAnchor(t||"a",n):t}return new yu.Alias(e.anchor)}createNode(e,t,n){let r;if(typeof t=="function")e=t.call({"":e},"",e),r=t;else if(Array.isArray(t)){let p=v=>typeof v=="number"||v instanceof String||v instanceof Number,g=t.filter(p).map(String);g.length>0&&(t=t.concat(g)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:c,onTagObj:l,tag:m}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:h}=Pn.createNodeAnchors(this,o||"a"),w={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:u,onTagObj:l,replacer:r,schema:this.schema,sourceObjects:h},f=Eu.createNode(e,m,w);return a&&L.isCollection(f)&&(f.flow=!0),d(),f}createPair(e,t,n={}){let r=this.createNode(e,null,n),s=this.createNode(t,null,n);return new vu.Pair(r,s)}delete(e){return Ee(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ce.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):Ee(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return L.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Ce.isEmptyPath(e)?!t&&L.isScalar(this.contents)?this.contents.value:this.contents:L.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return L.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return Ce.isEmptyPath(e)?this.contents!==void 0:L.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Ce.collectionFromPath(this.schema,[e],t):Ee(this.contents)&&this.contents.set(e,t)}setIn(e,t){Ce.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=Ce.collectionFromPath(this.schema,Array.from(e),t):Ee(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Nn.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Nn.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let r=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new ku.Schema(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:s,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},c=bu.toJS(this.contents,t??"",a);if(typeof s=="function")for(let{count:l,res:m}of a.anchors.values())s(m,l);return typeof o=="function"?Cu.applyReviver(o,{"":c},"",c):c}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return Su.stringifyDocument(this,e)}};function Ee(i){if(L.isCollection(i))return!0;throw new Error("Expected a YAML collection as document contents")}so.Document=On});var Ge=y(ze=>{"use strict";var He=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},xn=class extends He{constructor(e,t,n){super("YAMLParseError",e,t,n)}},An=class extends He{constructor(e,t,n){super("YAMLWarning",e,t,n)}},_u=(i,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(a=>e.linePos(a));let{line:n,col:r}=t.linePos[0];t.message+=` at line ${n}, column ${r}`;let s=r-1,o=i.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){let a=Math.min(s-39,o.length-79);o="…"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),n>1&&/^ *$/.test(o.substring(0,s))){let a=i.substring(e.lineStarts[n-2],e.lineStarts[n-1]);a.length>80&&(a=a.substring(0,79)+`…
61
- `),o=a+o}if(/[^ ]/.test(o)){let a=1,c=t.linePos[1];c?.line===n&&c.col>r&&(a=Math.max(1,Math.min(c.col-r,80-s)));let l=" ".repeat(s)+"^".repeat(a);t.message+=`:
60
+ `}ro.stringifyDocument=yu});var He=y(oo=>{"use strict";var vu=Re(),Ce=Nt(),L=_(),bu=X(),ku=H(),Su=Pi(),Cu=so(),Oi=Ct(),Eu=Rn(),_u=je(),xi=In(),Ai=class n{constructor(e,t,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,L.NODE_TYPE,{value:L.DOC});let r=null;typeof t=="function"||Array.isArray(t)?r=t:i===void 0&&t&&(i=t,t=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=s;let{version:o}=s;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new xi.Directives({version:o}),this.setSchema(o,i),this.contents=e===void 0?null:this.createNode(e,r,i)}clone(){let e=Object.create(n.prototype,{[L.NODE_TYPE]:{value:L.DOC}});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=L.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Ee(this.contents)&&this.contents.add(e)}addIn(e,t){Ee(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let i=Oi.anchorNames(this);e.anchor=!t||i.has(t)?Oi.findNewAnchor(t||"a",i):t}return new vu.Alias(e.anchor)}createNode(e,t,i){let r;if(typeof t=="function")e=t.call({"":e},"",e),r=t;else if(Array.isArray(t)){let p=v=>typeof v=="number"||v instanceof String||v instanceof Number,g=t.filter(p).map(String);g.length>0&&(t=t.concat(g)),r=t}else i===void 0&&t&&(i=t,t=void 0);let{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:c,onTagObj:l,tag:m}=i??{},{onAnchor:u,setAnchors:d,sourceObjects:h}=Oi.createNodeAnchors(this,o||"a"),w={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:u,onTagObj:l,replacer:r,schema:this.schema,sourceObjects:h},f=_u.createNode(e,m,w);return a&&L.isCollection(f)&&(f.flow=!0),d(),f}createPair(e,t,i={}){let r=this.createNode(e,null,i),s=this.createNode(t,null,i);return new bu.Pair(r,s)}delete(e){return Ee(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ce.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):Ee(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return L.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Ce.isEmptyPath(e)?!t&&L.isScalar(this.contents)?this.contents.value:this.contents:L.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return L.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return Ce.isEmptyPath(e)?this.contents!==void 0:L.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Ce.collectionFromPath(this.schema,[e],t):Ee(this.contents)&&this.contents.set(e,t)}setIn(e,t){Ce.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=Ce.collectionFromPath(this.schema,Array.from(e),t):Ee(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let i;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new xi.Directives({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new xi.Directives({version:e}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let r=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(i)this.schema=new Su.Schema(Object.assign(i,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:i,maxAliasCount:r,onAnchor:s,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},c=ku.toJS(this.contents,t??"",a);if(typeof s=="function")for(let{count:l,res:m}of a.anchors.values())s(m,l);return typeof o=="function"?Eu.applyReviver(o,{"":c},"",c):c}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return Cu.stringifyDocument(this,e)}};function Ee(n){if(L.isCollection(n))return!0;throw new Error("Expected a YAML collection as document contents")}oo.Document=Ai});var Qe=y(ze=>{"use strict";var Ge=class extends Error{constructor(e,t,i,r){super(),this.name=e,this.code=i,this.message=r,this.pos=t}},Ii=class extends Ge{constructor(e,t,i){super("YAMLParseError",e,t,i)}},Ri=class extends Ge{constructor(e,t,i){super("YAMLWarning",e,t,i)}},Pu=(n,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(a=>e.linePos(a));let{line:i,col:r}=t.linePos[0];t.message+=` at line ${i}, column ${r}`;let s=r-1,o=n.substring(e.lineStarts[i-1],e.lineStarts[i]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){let a=Math.min(s-39,o.length-79);o="…"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),i>1&&/^ *$/.test(o.substring(0,s))){let a=n.substring(e.lineStarts[i-2],e.lineStarts[i-1]);a.length>80&&(a=a.substring(0,79)+`…
61
+ `),o=a+o}if(/[^ ]/.test(o)){let a=1,c=t.linePos[1];c?.line===i&&c.col>r&&(a=Math.max(1,Math.min(c.col-r,80-s)));let l=" ".repeat(s)+"^".repeat(a);t.message+=`:
62
62
 
63
63
  ${o}
64
64
  ${l}
65
- `}};ze.YAMLError=He;ze.YAMLParseError=xn;ze.YAMLWarning=An;ze.prettifyError=_u});var Qe=y(oo=>{"use strict";function Pu(i,{flow:e,indicator:t,next:n,offset:r,onError:s,parentIndent:o,startOnNewline:a}){let c=!1,l=a,m=a,u="",d="",h=!1,w=!1,f=null,p=null,g=null,v=null,k=null,S=null,C=null;for(let b of i)switch(w&&(b.type!=="space"&&b.type!=="newline"&&b.type!=="comma"&&s(b.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w=!1),f&&(l&&b.type!=="comment"&&b.type!=="newline"&&s(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),f=null),b.type){case"space":!e&&(t!=="doc-start"||n?.type!=="flow-collection")&&b.source.includes(" ")&&(f=b),m=!0;break;case"comment":{m||s(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let A=b.source.substring(1)||" ";u?u+=d+A:u=A,d="",l=!1;break}case"newline":l?u?u+=b.source:(!S||t!=="seq-item-ind")&&(c=!0):d+=b.source,l=!0,h=!0,(p||g)&&(v=b),m=!0;break;case"anchor":p&&s(b,"MULTIPLE_ANCHORS","A node can have at most one anchor"),b.source.endsWith(":")&&s(b.offset+b.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),p=b,C??(C=b.offset),l=!1,m=!1,w=!0;break;case"tag":{g&&s(b,"MULTIPLE_TAGS","A node can have at most one tag"),g=b,C??(C=b.offset),l=!1,m=!1,w=!0;break}case t:(p||g)&&s(b,"BAD_PROP_ORDER",`Anchors and tags must be after the ${b.source} indicator`),S&&s(b,"UNEXPECTED_TOKEN",`Unexpected ${b.source} in ${e??"collection"}`),S=b,l=t==="seq-item-ind"||t==="explicit-key-ind",m=!1;break;case"comma":if(e){k&&s(b,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),k=b,l=!1,m=!1;break}default:s(b,"UNEXPECTED_TOKEN",`Unexpected ${b.type} token`),l=!1,m=!1}let E=i[i.length-1],N=E?E.offset+E.source.length:r;return w&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&s(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f&&(l&&f.indent<=o||n?.type==="block-map"||n?.type==="block-seq")&&s(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:k,found:S,spaceBefore:c,comment:u,hasNewline:h,anchor:p,tag:g,newlineAfterProp:v,end:N,start:C??N}}oo.resolveProps=Pu});var oi=y(ao=>{"use strict";function In(i){if(!i)return null;switch(i.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(i.source.includes(`
66
- `))return!0;if(i.end){for(let e of i.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of i.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(In(e.key)||In(e.value))return!0}return!1;default:return!0}}ao.containsNewline=In});var Rn=y(co=>{"use strict";var Nu=oi();function Ou(i,e,t){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===i&&(n.source==="]"||n.source==="}")&&Nu.containsNewline(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}co.flowIndentCheck=Ou});var jn=y(uo=>{"use strict";var lo=_();function xu(i,e,t){let{uniqueKeys:n}=i.options;if(n===!1)return!1;let r=typeof n=="function"?n:(s,o)=>s===o||lo.isScalar(s)&&lo.isScalar(o)&&s.value===o.value;return e.some(s=>r(s.key,t))}uo.mapIncludes=xu});var wo=y(go=>{"use strict";var fo=Q(),Au=Z(),po=Qe(),Iu=oi(),mo=Rn(),Ru=jn(),ho="All mapping items must start at the same column";function ju({composeNode:i,composeEmptyNode:e},t,n,r,s){let o=s?.nodeClass??Au.YAMLMap,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let c=n.offset,l=null;for(let m of n.items){let{start:u,key:d,sep:h,value:w}=m,f=po.resolveProps(u,{indicator:"explicit-key-ind",next:d??h?.[0],offset:c,onError:r,parentIndent:n.indent,startOnNewline:!0}),p=!f.found;if(p){if(d&&(d.type==="block-seq"?r(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==n.indent&&r(c,"BAD_INDENT",ho)),!f.anchor&&!f.tag&&!h){l=f.end,f.comment&&(a.comment?a.comment+=`
67
- `+f.comment:a.comment=f.comment);continue}(f.newlineAfterProp||Iu.containsNewline(d))&&r(d??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else f.found?.indent!==n.indent&&r(c,"BAD_INDENT",ho);t.atKey=!0;let g=f.end,v=d?i(t,d,f,r):e(t,g,u,null,f,r);t.schema.compat&&mo.flowIndentCheck(n.indent,d,r),t.atKey=!1,Ru.mapIncludes(t,a.items,v)&&r(g,"DUPLICATE_KEY","Map keys must be unique");let k=po.resolveProps(h??[],{indicator:"map-value-ind",next:w,offset:v.range[2],onError:r,parentIndent:n.indent,startOnNewline:!d||d.type==="block-scalar"});if(c=k.end,k.found){p&&(w?.type==="block-map"&&!k.hasNewline&&r(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&f.start<k.found.offset-1024&&r(v.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let S=w?i(t,w,k,r):e(t,c,h,null,k,r);t.schema.compat&&mo.flowIndentCheck(n.indent,w,r),c=S.range[2];let C=new fo.Pair(v,S);t.options.keepSourceTokens&&(C.srcToken=m),a.items.push(C)}else{p&&r(v.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),k.comment&&(v.comment?v.comment+=`
68
- `+k.comment:v.comment=k.comment);let S=new fo.Pair(v);t.options.keepSourceTokens&&(S.srcToken=m),a.items.push(S)}}return l&&l<c&&r(l,"IMPOSSIBLE","Map comment with trailing content"),a.range=[n.offset,c,l??c],a}go.resolveBlockMap=ju});var vo=y(yo=>{"use strict";var Tu=ee(),qu=Qe(),Lu=Rn();function Du({composeNode:i,composeEmptyNode:e},t,n,r,s){let o=s?.nodeClass??Tu.YAMLSeq,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let c=n.offset,l=null;for(let{start:m,value:u}of n.items){let d=qu.resolveProps(m,{indicator:"seq-item-ind",next:u,offset:c,onError:r,parentIndent:n.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||u)u?.type==="block-seq"?r(d.end,"BAD_INDENT","All sequence items must start at the same column"):r(c,"MISSING_CHAR","Sequence item without - indicator");else{l=d.end,d.comment&&(a.comment=d.comment);continue}let h=u?i(t,u,d,r):e(t,d.end,m,null,d,r);t.schema.compat&&Lu.flowIndentCheck(n.indent,u,r),c=h.range[2],a.items.push(h)}return a.range=[n.offset,c,l??c],a}yo.resolveBlockSeq=Du});var _e=y(bo=>{"use strict";function $u(i,e,t,n){let r="";if(i){let s=!1,o="";for(let a of i){let{source:c,type:l}=a;switch(l){case"space":s=!0;break;case"comment":{t&&!s&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let m=c.substring(1)||" ";r?r+=o+m:r=m,o="";break}case"newline":r&&(o+=c),s=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}e+=c.length}}return{comment:r,offset:e}}bo.resolveEnd=$u});var Eo=y(Co=>{"use strict";var Mu=_(),Wu=Q(),ko=Z(),Fu=ee(),Bu=_e(),So=Qe(),Ku=oi(),Yu=jn(),Tn="Block collections are not allowed within flow collections",qn=i=>i&&(i.type==="block-map"||i.type==="block-seq");function Uu({composeNode:i,composeEmptyNode:e},t,n,r,s){let o=n.start.source==="{",a=o?"flow map":"flow sequence",c=s?.nodeClass??(o?ko.YAMLMap:Fu.YAMLSeq),l=new c(t.schema);l.flow=!0;let m=t.atRoot;m&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let u=n.offset+n.start.source.length;for(let p=0;p<n.items.length;++p){let g=n.items[p],{start:v,key:k,sep:S,value:C}=g,E=So.resolveProps(v,{flow:a,indicator:"explicit-key-ind",next:k??S?.[0],offset:u,onError:r,parentIndent:n.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!S&&!C){p===0&&E.comma?r(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):p<n.items.length-1&&r(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),E.comment&&(l.comment?l.comment+=`
69
- `+E.comment:l.comment=E.comment),u=E.end;continue}!o&&t.options.strict&&Ku.containsNewline(k)&&r(k,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(p===0)E.comma&&r(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(E.comma||r(E.start,"MISSING_CHAR",`Missing , between ${a} items`),E.comment){let N="";e:for(let b of v)switch(b.type){case"comma":case"space":break;case"comment":N=b.source.substring(1);break e;default:break e}if(N){let b=l.items[l.items.length-1];Mu.isPair(b)&&(b=b.value??b.key),b.comment?b.comment+=`
70
- `+N:b.comment=N,E.comment=E.comment.substring(N.length+1)}}if(!o&&!S&&!E.found){let N=C?i(t,C,E,r):e(t,E.end,S,null,E,r);l.items.push(N),u=N.range[2],qn(C)&&r(N.range,"BLOCK_IN_FLOW",Tn)}else{t.atKey=!0;let N=E.end,b=k?i(t,k,E,r):e(t,N,v,null,E,r);qn(k)&&r(b.range,"BLOCK_IN_FLOW",Tn),t.atKey=!1;let A=So.resolveProps(S??[],{flow:a,indicator:"map-value-ind",next:C,offset:b.range[2],onError:r,parentIndent:n.indent,startOnNewline:!1});if(A.found){if(!o&&!E.found&&t.options.strict){if(S)for(let I of S){if(I===A.found)break;if(I.type==="newline"){r(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<A.found.offset-1024&&r(A.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else C&&("source"in C&&C.source?.[0]===":"?r(C,"MISSING_CHAR",`Missing space after : in ${a}`):r(A.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let V=C?i(t,C,A,r):A.found?e(t,A.end,S,null,A,r):null;V?qn(C)&&r(V.range,"BLOCK_IN_FLOW",Tn):A.comment&&(b.comment?b.comment+=`
71
- `+A.comment:b.comment=A.comment);let he=new Wu.Pair(b,V);if(t.options.keepSourceTokens&&(he.srcToken=g),o){let I=l;Yu.mapIncludes(t,I.items,b)&&r(N,"DUPLICATE_KEY","Map keys must be unique"),I.items.push(he)}else{let I=new ko.YAMLMap(t.schema);I.flow=!0,I.items.push(he);let kr=(V??b).range;I.range=[b.range[0],kr[1],kr[2]],l.items.push(I)}u=V?V.range[2]:A.end}}let d=o?"}":"]",[h,...w]=n.end,f=u;if(h?.source===d)f=h.offset+h.source.length;else{let p=a[0].toUpperCase()+a.substring(1),g=m?`${p} must end with a ${d}`:`${p} in block collection must be sufficiently indented and end with a ${d}`;r(u,m?"MISSING_CHAR":"BAD_INDENT",g),h&&h.source.length!==1&&w.unshift(h)}if(w.length>0){let p=Bu.resolveEnd(w,f,t.options.strict,r);p.comment&&(l.comment?l.comment+=`
72
- `+p.comment:l.comment=p.comment),l.range=[n.offset,f,p.offset]}else l.range=[n.offset,f,f];return l}Co.resolveFlowCollection=Uu});var Po=y(_o=>{"use strict";var Vu=_(),Ju=O(),Hu=Z(),zu=ee(),Gu=wo(),Qu=vo(),Xu=Eo();function Ln(i,e,t,n,r,s){let o=t.type==="block-map"?Gu.resolveBlockMap(i,e,t,n,s):t.type==="block-seq"?Qu.resolveBlockSeq(i,e,t,n,s):Xu.resolveFlowCollection(i,e,t,n,s),a=o.constructor;return r==="!"||r===a.tagName?(o.tag=a.tagName,o):(r&&(o.tag=r),o)}function Zu(i,e,t,n,r){let s=n.tag,o=s?e.directives.tagName(s.source,d=>r(s,"TAG_RESOLVE_FAILED",d)):null;if(t.type==="block-seq"){let{anchor:d,newlineAfterProp:h}=n,w=d&&s?d.offset>s.offset?d:s:d??s;w&&(!h||h.offset<w.offset)&&r(w,"MISSING_CHAR","Missing newline after block sequence props")}let a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===Hu.YAMLMap.tagName&&a==="map"||o===zu.YAMLSeq.tagName&&a==="seq")return Ln(i,e,t,r,o);let c=e.schema.tags.find(d=>d.tag===o&&d.collection===a);if(!c){let d=e.schema.knownTags[o];if(d?.collection===a)e.schema.tags.push(Object.assign({},d,{default:!1})),c=d;else return d?r(s,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection??"scalar"}`,!0):r(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Ln(i,e,t,r,o)}let l=Ln(i,e,t,r,o,c),m=c.resolve?.(l,d=>r(s,"TAG_RESOLVE_FAILED",d),e.options)??l,u=Vu.isNode(m)?m:new Ju.Scalar(m);return u.range=l.range,u.tag=o,c?.format&&(u.format=c.format),u}_o.composeCollection=Zu});var $n=y(No=>{"use strict";var Dn=O();function ef(i,e,t){let n=e.offset,r=tf(e,i.options.strict,t);if(!r)return{value:"",type:null,comment:"",range:[n,n,n]};let s=r.mode===">"?Dn.Scalar.BLOCK_FOLDED:Dn.Scalar.BLOCK_LITERAL,o=e.source?nf(e.source):[],a=o.length;for(let f=o.length-1;f>=0;--f){let p=o[f][1];if(p===""||p==="\r")a=f;else break}if(a===0){let f=r.chomp==="+"&&o.length>0?`
73
- `.repeat(Math.max(1,o.length-1)):"",p=n+r.length;return e.source&&(p+=e.source.length),{value:f,type:s,comment:r.comment,range:[n,p,p]}}let c=e.indent+r.indent,l=e.offset+r.length,m=0;for(let f=0;f<a;++f){let[p,g]=o[f];if(g===""||g==="\r")r.indent===0&&p.length>c&&(c=p.length);else{p.length<c&&t(l+p.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),r.indent===0&&(c=p.length),m=f,c===0&&!i.atRoot&&t(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=p.length+g.length+1}for(let f=o.length-1;f>=a;--f)o[f][0].length>c&&(a=f+1);let u="",d="",h=!1;for(let f=0;f<m;++f)u+=o[f][0].slice(c)+`
74
- `;for(let f=m;f<a;++f){let[p,g]=o[f];l+=p.length+g.length+1;let v=g[g.length-1]==="\r";if(v&&(g=g.slice(0,-1)),g&&p.length<c){let S=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;t(l-g.length-(v?2:1),"BAD_INDENT",S),p=""}s===Dn.Scalar.BLOCK_LITERAL?(u+=d+p.slice(c)+g,d=`
65
+ `}};ze.YAMLError=Ge;ze.YAMLParseError=Ii;ze.YAMLWarning=Ri;ze.prettifyError=Pu});var Xe=y(ao=>{"use strict";function Nu(n,{flow:e,indicator:t,next:i,offset:r,onError:s,parentIndent:o,startOnNewline:a}){let c=!1,l=a,m=a,u="",d="",h=!1,w=!1,f=null,p=null,g=null,v=null,k=null,S=null,C=null;for(let b of n)switch(w&&(b.type!=="space"&&b.type!=="newline"&&b.type!=="comma"&&s(b.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w=!1),f&&(l&&b.type!=="comment"&&b.type!=="newline"&&s(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),f=null),b.type){case"space":!e&&(t!=="doc-start"||i?.type!=="flow-collection")&&b.source.includes(" ")&&(f=b),m=!0;break;case"comment":{m||s(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let A=b.source.substring(1)||" ";u?u+=d+A:u=A,d="",l=!1;break}case"newline":l?u?u+=b.source:(!S||t!=="seq-item-ind")&&(c=!0):d+=b.source,l=!0,h=!0,(p||g)&&(v=b),m=!0;break;case"anchor":p&&s(b,"MULTIPLE_ANCHORS","A node can have at most one anchor"),b.source.endsWith(":")&&s(b.offset+b.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),p=b,C??(C=b.offset),l=!1,m=!1,w=!0;break;case"tag":{g&&s(b,"MULTIPLE_TAGS","A node can have at most one tag"),g=b,C??(C=b.offset),l=!1,m=!1,w=!0;break}case t:(p||g)&&s(b,"BAD_PROP_ORDER",`Anchors and tags must be after the ${b.source} indicator`),S&&s(b,"UNEXPECTED_TOKEN",`Unexpected ${b.source} in ${e??"collection"}`),S=b,l=t==="seq-item-ind"||t==="explicit-key-ind",m=!1;break;case"comma":if(e){k&&s(b,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),k=b,l=!1,m=!1;break}default:s(b,"UNEXPECTED_TOKEN",`Unexpected ${b.type} token`),l=!1,m=!1}let E=n[n.length-1],N=E?E.offset+E.source.length:r;return w&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&s(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f&&(l&&f.indent<=o||i?.type==="block-map"||i?.type==="block-seq")&&s(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:k,found:S,spaceBefore:c,comment:u,hasNewline:h,anchor:p,tag:g,newlineAfterProp:v,end:N,start:C??N}}ao.resolveProps=Nu});var ln=y(co=>{"use strict";function ji(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
66
+ `))return!0;if(n.end){for(let e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of n.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(ji(e.key)||ji(e.value))return!0}return!1;default:return!0}}co.containsNewline=ji});var Ti=y(lo=>{"use strict";var Ou=ln();function xu(n,e,t){if(e?.type==="flow-collection"){let i=e.end[0];i.indent===n&&(i.source==="]"||i.source==="}")&&Ou.containsNewline(e)&&t(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}lo.flowIndentCheck=xu});var qi=y(fo=>{"use strict";var uo=_();function Au(n,e,t){let{uniqueKeys:i}=n.options;if(i===!1)return!1;let r=typeof i=="function"?i:(s,o)=>s===o||uo.isScalar(s)&&uo.isScalar(o)&&s.value===o.value;return e.some(s=>r(s.key,t))}fo.mapIncludes=Au});var yo=y(wo=>{"use strict";var po=X(),Iu=ee(),mo=Xe(),Ru=ln(),ho=Ti(),ju=qi(),go="All mapping items must start at the same column";function Tu({composeNode:n,composeEmptyNode:e},t,i,r,s){let o=s?.nodeClass??Iu.YAMLMap,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let c=i.offset,l=null;for(let m of i.items){let{start:u,key:d,sep:h,value:w}=m,f=mo.resolveProps(u,{indicator:"explicit-key-ind",next:d??h?.[0],offset:c,onError:r,parentIndent:i.indent,startOnNewline:!0}),p=!f.found;if(p){if(d&&(d.type==="block-seq"?r(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==i.indent&&r(c,"BAD_INDENT",go)),!f.anchor&&!f.tag&&!h){l=f.end,f.comment&&(a.comment?a.comment+=`
67
+ `+f.comment:a.comment=f.comment);continue}(f.newlineAfterProp||Ru.containsNewline(d))&&r(d??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else f.found?.indent!==i.indent&&r(c,"BAD_INDENT",go);t.atKey=!0;let g=f.end,v=d?n(t,d,f,r):e(t,g,u,null,f,r);t.schema.compat&&ho.flowIndentCheck(i.indent,d,r),t.atKey=!1,ju.mapIncludes(t,a.items,v)&&r(g,"DUPLICATE_KEY","Map keys must be unique");let k=mo.resolveProps(h??[],{indicator:"map-value-ind",next:w,offset:v.range[2],onError:r,parentIndent:i.indent,startOnNewline:!d||d.type==="block-scalar"});if(c=k.end,k.found){p&&(w?.type==="block-map"&&!k.hasNewline&&r(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&f.start<k.found.offset-1024&&r(v.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let S=w?n(t,w,k,r):e(t,c,h,null,k,r);t.schema.compat&&ho.flowIndentCheck(i.indent,w,r),c=S.range[2];let C=new po.Pair(v,S);t.options.keepSourceTokens&&(C.srcToken=m),a.items.push(C)}else{p&&r(v.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),k.comment&&(v.comment?v.comment+=`
68
+ `+k.comment:v.comment=k.comment);let S=new po.Pair(v);t.options.keepSourceTokens&&(S.srcToken=m),a.items.push(S)}}return l&&l<c&&r(l,"IMPOSSIBLE","Map comment with trailing content"),a.range=[i.offset,c,l??c],a}wo.resolveBlockMap=Tu});var bo=y(vo=>{"use strict";var qu=te(),Lu=Xe(),Du=Ti();function $u({composeNode:n,composeEmptyNode:e},t,i,r,s){let o=s?.nodeClass??qu.YAMLSeq,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let c=i.offset,l=null;for(let{start:m,value:u}of i.items){let d=Lu.resolveProps(m,{indicator:"seq-item-ind",next:u,offset:c,onError:r,parentIndent:i.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||u)u?.type==="block-seq"?r(d.end,"BAD_INDENT","All sequence items must start at the same column"):r(c,"MISSING_CHAR","Sequence item without - indicator");else{l=d.end,d.comment&&(a.comment=d.comment);continue}let h=u?n(t,u,d,r):e(t,d.end,m,null,d,r);t.schema.compat&&Du.flowIndentCheck(i.indent,u,r),c=h.range[2],a.items.push(h)}return a.range=[i.offset,c,l??c],a}vo.resolveBlockSeq=$u});var _e=y(ko=>{"use strict";function Wu(n,e,t,i){let r="";if(n){let s=!1,o="";for(let a of n){let{source:c,type:l}=a;switch(l){case"space":s=!0;break;case"comment":{t&&!s&&i(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let m=c.substring(1)||" ";r?r+=o+m:r=m,o="";break}case"newline":r&&(o+=c),s=!0;break;default:i(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}e+=c.length}}return{comment:r,offset:e}}ko.resolveEnd=Wu});var _o=y(Eo=>{"use strict";var Mu=_(),Fu=X(),So=ee(),Bu=te(),Ku=_e(),Co=Xe(),Yu=ln(),Uu=qi(),Li="Block collections are not allowed within flow collections",Di=n=>n&&(n.type==="block-map"||n.type==="block-seq");function Ju({composeNode:n,composeEmptyNode:e},t,i,r,s){let o=i.start.source==="{",a=o?"flow map":"flow sequence",c=s?.nodeClass??(o?So.YAMLMap:Bu.YAMLSeq),l=new c(t.schema);l.flow=!0;let m=t.atRoot;m&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let u=i.offset+i.start.source.length;for(let p=0;p<i.items.length;++p){let g=i.items[p],{start:v,key:k,sep:S,value:C}=g,E=Co.resolveProps(v,{flow:a,indicator:"explicit-key-ind",next:k??S?.[0],offset:u,onError:r,parentIndent:i.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!S&&!C){p===0&&E.comma?r(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):p<i.items.length-1&&r(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),E.comment&&(l.comment?l.comment+=`
69
+ `+E.comment:l.comment=E.comment),u=E.end;continue}!o&&t.options.strict&&Yu.containsNewline(k)&&r(k,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(p===0)E.comma&&r(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(E.comma||r(E.start,"MISSING_CHAR",`Missing , between ${a} items`),E.comment){let N="";e:for(let b of v)switch(b.type){case"comma":case"space":break;case"comment":N=b.source.substring(1);break e;default:break e}if(N){let b=l.items[l.items.length-1];Mu.isPair(b)&&(b=b.value??b.key),b.comment?b.comment+=`
70
+ `+N:b.comment=N,E.comment=E.comment.substring(N.length+1)}}if(!o&&!S&&!E.found){let N=C?n(t,C,E,r):e(t,E.end,S,null,E,r);l.items.push(N),u=N.range[2],Di(C)&&r(N.range,"BLOCK_IN_FLOW",Li)}else{t.atKey=!0;let N=E.end,b=k?n(t,k,E,r):e(t,N,v,null,E,r);Di(k)&&r(b.range,"BLOCK_IN_FLOW",Li),t.atKey=!1;let A=Co.resolveProps(S??[],{flow:a,indicator:"map-value-ind",next:C,offset:b.range[2],onError:r,parentIndent:i.indent,startOnNewline:!1});if(A.found){if(!o&&!E.found&&t.options.strict){if(S)for(let I of S){if(I===A.found)break;if(I.type==="newline"){r(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<A.found.offset-1024&&r(A.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else C&&("source"in C&&C.source?.[0]===":"?r(C,"MISSING_CHAR",`Missing space after : in ${a}`):r(A.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let V=C?n(t,C,A,r):A.found?e(t,A.end,S,null,A,r):null;V?Di(C)&&r(V.range,"BLOCK_IN_FLOW",Li):A.comment&&(b.comment?b.comment+=`
71
+ `+A.comment:b.comment=A.comment);let he=new Fu.Pair(b,V);if(t.options.keepSourceTokens&&(he.srcToken=g),o){let I=l;Uu.mapIncludes(t,I.items,b)&&r(N,"DUPLICATE_KEY","Map keys must be unique"),I.items.push(he)}else{let I=new So.YAMLMap(t.schema);I.flow=!0,I.items.push(he);let Cr=(V??b).range;I.range=[b.range[0],Cr[1],Cr[2]],l.items.push(I)}u=V?V.range[2]:A.end}}let d=o?"}":"]",[h,...w]=i.end,f=u;if(h?.source===d)f=h.offset+h.source.length;else{let p=a[0].toUpperCase()+a.substring(1),g=m?`${p} must end with a ${d}`:`${p} in block collection must be sufficiently indented and end with a ${d}`;r(u,m?"MISSING_CHAR":"BAD_INDENT",g),h&&h.source.length!==1&&w.unshift(h)}if(w.length>0){let p=Ku.resolveEnd(w,f,t.options.strict,r);p.comment&&(l.comment?l.comment+=`
72
+ `+p.comment:l.comment=p.comment),l.range=[i.offset,f,p.offset]}else l.range=[i.offset,f,f];return l}Eo.resolveFlowCollection=Ju});var No=y(Po=>{"use strict";var Vu=_(),Hu=O(),Gu=ee(),zu=te(),Qu=yo(),Xu=bo(),Zu=_o();function $i(n,e,t,i,r,s){let o=t.type==="block-map"?Qu.resolveBlockMap(n,e,t,i,s):t.type==="block-seq"?Xu.resolveBlockSeq(n,e,t,i,s):Zu.resolveFlowCollection(n,e,t,i,s),a=o.constructor;return r==="!"||r===a.tagName?(o.tag=a.tagName,o):(r&&(o.tag=r),o)}function ef(n,e,t,i,r){let s=i.tag,o=s?e.directives.tagName(s.source,d=>r(s,"TAG_RESOLVE_FAILED",d)):null;if(t.type==="block-seq"){let{anchor:d,newlineAfterProp:h}=i,w=d&&s?d.offset>s.offset?d:s:d??s;w&&(!h||h.offset<w.offset)&&r(w,"MISSING_CHAR","Missing newline after block sequence props")}let a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===Gu.YAMLMap.tagName&&a==="map"||o===zu.YAMLSeq.tagName&&a==="seq")return $i(n,e,t,r,o);let c=e.schema.tags.find(d=>d.tag===o&&d.collection===a);if(!c){let d=e.schema.knownTags[o];if(d?.collection===a)e.schema.tags.push(Object.assign({},d,{default:!1})),c=d;else return d?r(s,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection??"scalar"}`,!0):r(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),$i(n,e,t,r,o)}let l=$i(n,e,t,r,o,c),m=c.resolve?.(l,d=>r(s,"TAG_RESOLVE_FAILED",d),e.options)??l,u=Vu.isNode(m)?m:new Hu.Scalar(m);return u.range=l.range,u.tag=o,c?.format&&(u.format=c.format),u}Po.composeCollection=ef});var Mi=y(Oo=>{"use strict";var Wi=O();function tf(n,e,t){let i=e.offset,r=nf(e,n.options.strict,t);if(!r)return{value:"",type:null,comment:"",range:[i,i,i]};let s=r.mode===">"?Wi.Scalar.BLOCK_FOLDED:Wi.Scalar.BLOCK_LITERAL,o=e.source?rf(e.source):[],a=o.length;for(let f=o.length-1;f>=0;--f){let p=o[f][1];if(p===""||p==="\r")a=f;else break}if(a===0){let f=r.chomp==="+"&&o.length>0?`
73
+ `.repeat(Math.max(1,o.length-1)):"",p=i+r.length;return e.source&&(p+=e.source.length),{value:f,type:s,comment:r.comment,range:[i,p,p]}}let c=e.indent+r.indent,l=e.offset+r.length,m=0;for(let f=0;f<a;++f){let[p,g]=o[f];if(g===""||g==="\r")r.indent===0&&p.length>c&&(c=p.length);else{p.length<c&&t(l+p.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),r.indent===0&&(c=p.length),m=f,c===0&&!n.atRoot&&t(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=p.length+g.length+1}for(let f=o.length-1;f>=a;--f)o[f][0].length>c&&(a=f+1);let u="",d="",h=!1;for(let f=0;f<m;++f)u+=o[f][0].slice(c)+`
74
+ `;for(let f=m;f<a;++f){let[p,g]=o[f];l+=p.length+g.length+1;let v=g[g.length-1]==="\r";if(v&&(g=g.slice(0,-1)),g&&p.length<c){let S=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;t(l-g.length-(v?2:1),"BAD_INDENT",S),p=""}s===Wi.Scalar.BLOCK_LITERAL?(u+=d+p.slice(c)+g,d=`
75
75
  `):p.length>c||g[0]===" "?(d===" "?d=`
76
76
  `:!h&&d===`
77
77
  `&&(d=`
@@ -84,67 +84,67 @@ ${l}
84
84
  `+o[f][0].slice(c);u[u.length-1]!==`
85
85
  `&&(u+=`
86
86
  `);break;default:u+=`
87
- `}let w=n+r.length+e.source.length;return{value:u,type:s,comment:r.comment,range:[n,w,w]}}function tf({offset:i,props:e},t,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:r}=e[0],s=r[0],o=0,a="",c=-1;for(let d=1;d<r.length;++d){let h=r[d];if(!a&&(h==="-"||h==="+"))a=h;else{let w=Number(h);!o&&w?o=w:c===-1&&(c=i+d)}}c!==-1&&n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let l=!1,m="",u=r.length;for(let d=1;d<e.length;++d){let h=e[d];switch(h.type){case"space":l=!0;case"newline":u+=h.source.length;break;case"comment":t&&!l&&n(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=h.source.length,m=h.source.substring(1);break;case"error":n(h,"UNEXPECTED_TOKEN",h.message),u+=h.source.length;break;default:{let w=`Unexpected token in block scalar header: ${h.type}`;n(h,"UNEXPECTED_TOKEN",w);let f=h.source;f&&typeof f=="string"&&(u+=f.length)}}}return{mode:s,indent:o,chomp:a,comment:m,length:u}}function nf(i){let e=i.split(/\n( *)/),t=e[0],n=t.match(/^( *)/),s=[n?.[1]?[n[1],t.slice(n[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}No.resolveBlockScalar=ef});var Wn=y(xo=>{"use strict";var Mn=O(),rf=_e();function sf(i,e,t){let{offset:n,type:r,source:s,end:o}=i,a,c,l=(d,h,w)=>t(n+d,h,w);switch(r){case"scalar":a=Mn.Scalar.PLAIN,c=of(s,l);break;case"single-quoted-scalar":a=Mn.Scalar.QUOTE_SINGLE,c=af(s,l);break;case"double-quoted-scalar":a=Mn.Scalar.QUOTE_DOUBLE,c=cf(s,l);break;default:return t(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[n,n+s.length,n+s.length]}}let m=n+s.length,u=rf.resolveEnd(o,m,e,t);return{value:c,type:a,comment:u.comment,range:[n,m,u.offset]}}function of(i,e){let t="";switch(i[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${i[0]}`;break}case"@":case"`":{t=`reserved character ${i[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Oo(i)}function af(i,e){return(i[i.length-1]!=="'"||i.length===1)&&e(i.length,"MISSING_CHAR","Missing closing 'quote"),Oo(i.slice(1,-1)).replace(/''/g,"'")}function Oo(i){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
87
+ `}let w=i+r.length+e.source.length;return{value:u,type:s,comment:r.comment,range:[i,w,w]}}function nf({offset:n,props:e},t,i){if(e[0].type!=="block-scalar-header")return i(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:r}=e[0],s=r[0],o=0,a="",c=-1;for(let d=1;d<r.length;++d){let h=r[d];if(!a&&(h==="-"||h==="+"))a=h;else{let w=Number(h);!o&&w?o=w:c===-1&&(c=n+d)}}c!==-1&&i(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let l=!1,m="",u=r.length;for(let d=1;d<e.length;++d){let h=e[d];switch(h.type){case"space":l=!0;case"newline":u+=h.source.length;break;case"comment":t&&!l&&i(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=h.source.length,m=h.source.substring(1);break;case"error":i(h,"UNEXPECTED_TOKEN",h.message),u+=h.source.length;break;default:{let w=`Unexpected token in block scalar header: ${h.type}`;i(h,"UNEXPECTED_TOKEN",w);let f=h.source;f&&typeof f=="string"&&(u+=f.length)}}}return{mode:s,indent:o,chomp:a,comment:m,length:u}}function rf(n){let e=n.split(/\n( *)/),t=e[0],i=t.match(/^( *)/),s=[i?.[1]?[i[1],t.slice(i[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}Oo.resolveBlockScalar=tf});var Bi=y(Ao=>{"use strict";var Fi=O(),sf=_e();function of(n,e,t){let{offset:i,type:r,source:s,end:o}=n,a,c,l=(d,h,w)=>t(i+d,h,w);switch(r){case"scalar":a=Fi.Scalar.PLAIN,c=af(s,l);break;case"single-quoted-scalar":a=Fi.Scalar.QUOTE_SINGLE,c=cf(s,l);break;case"double-quoted-scalar":a=Fi.Scalar.QUOTE_DOUBLE,c=lf(s,l);break;default:return t(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[i,i+s.length,i+s.length]}}let m=i+s.length,u=sf.resolveEnd(o,m,e,t);return{value:c,type:a,comment:u.comment,range:[i,m,u.offset]}}function af(n,e){let t="";switch(n[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${n[0]}`;break}case"@":case"`":{t=`reserved character ${n[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),xo(n)}function cf(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),xo(n.slice(1,-1)).replace(/''/g,"'")}function xo(n){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
88
88
  `,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
89
- `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=e.exec(i);if(!n)return i;let r=n[1],s=" ",o=e.lastIndex;for(t.lastIndex=o;n=t.exec(i);)n[1]===""?s===`
89
+ `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=e.exec(n);if(!i)return n;let r=i[1],s=" ",o=e.lastIndex;for(t.lastIndex=o;i=t.exec(n);)i[1]===""?s===`
90
90
  `?r+=s:s=`
91
- `:(r+=s+n[1],s=" "),o=t.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,n=a.exec(i),r+s+(n?.[1]??"")}function cf(i,e){let t="";for(let n=1;n<i.length-1;++n){let r=i[n];if(!(r==="\r"&&i[n+1]===`
91
+ `:(r+=s+i[1],s=" "),o=t.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,i=a.exec(n),r+s+(i?.[1]??"")}function lf(n,e){let t="";for(let i=1;i<n.length-1;++i){let r=n[i];if(!(r==="\r"&&n[i+1]===`
92
92
  `))if(r===`
93
- `){let{fold:s,offset:o}=lf(i,n);t+=s,n=o}else if(r==="\\"){let s=i[++n],o=uf[s];if(o)t+=o;else if(s===`
94
- `)for(s=i[n+1];s===" "||s===" ";)s=i[++n+1];else if(s==="\r"&&i[n+1]===`
95
- `)for(s=i[++n+1];s===" "||s===" ";)s=i[++n+1];else if(s==="x"||s==="u"||s==="U"){let a=s==="x"?2:s==="u"?4:8;t+=ff(i,n+1,a,e),n+=a}else{let a=i.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(r===" "||r===" "){let s=n,o=i[n+1];for(;o===" "||o===" ";)o=i[++n+1];o!==`
96
- `&&!(o==="\r"&&i[n+2]===`
97
- `)&&(t+=n>s?i.slice(s,n+1):r)}else t+=r}return(i[i.length-1]!=='"'||i.length===1)&&e(i.length,"MISSING_CHAR",'Missing closing "quote'),t}function lf(i,e){let t="",n=i[e+1];for(;(n===" "||n===" "||n===`
98
- `||n==="\r")&&!(n==="\r"&&i[e+2]!==`
99
- `);)n===`
93
+ `){let{fold:s,offset:o}=uf(n,i);t+=s,i=o}else if(r==="\\"){let s=n[++i],o=ff[s];if(o)t+=o;else if(s===`
94
+ `)for(s=n[i+1];s===" "||s===" ";)s=n[++i+1];else if(s==="\r"&&n[i+1]===`
95
+ `)for(s=n[++i+1];s===" "||s===" ";)s=n[++i+1];else if(s==="x"||s==="u"||s==="U"){let a=s==="x"?2:s==="u"?4:8;t+=df(n,i+1,a,e),i+=a}else{let a=n.substr(i-1,2);e(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(r===" "||r===" "){let s=i,o=n[i+1];for(;o===" "||o===" ";)o=n[++i+1];o!==`
96
+ `&&!(o==="\r"&&n[i+2]===`
97
+ `)&&(t+=i>s?n.slice(s,i+1):r)}else t+=r}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),t}function uf(n,e){let t="",i=n[e+1];for(;(i===" "||i===" "||i===`
98
+ `||i==="\r")&&!(i==="\r"&&n[e+2]!==`
99
+ `);)i===`
100
100
  `&&(t+=`
101
- `),e+=1,n=i[e+1];return t||(t=" "),{fold:t,offset:e}}var uf={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
102
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function ff(i,e,t,n){let r=i.substr(e,t),o=r.length===t&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;try{return String.fromCodePoint(o)}catch{let a=i.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}xo.resolveFlowScalar=sf});var Ro=y(Io=>{"use strict";var fe=_(),Ao=O(),df=$n(),pf=Wn();function mf(i,e,t,n){let{value:r,type:s,comment:o,range:a}=e.type==="block-scalar"?df.resolveBlockScalar(i,e,n):pf.resolveFlowScalar(e,i.options.strict,n),c=t?i.directives.tagName(t.source,u=>n(t,"TAG_RESOLVE_FAILED",u)):null,l;i.options.stringKeys&&i.atKey?l=i.schema[fe.SCALAR]:c?l=hf(i.schema,r,c,t,n):e.type==="scalar"?l=gf(i,r,e,n):l=i.schema[fe.SCALAR];let m;try{let u=l.resolve(r,d=>n(t??e,"TAG_RESOLVE_FAILED",d),i.options);m=fe.isScalar(u)?u:new Ao.Scalar(u)}catch(u){let d=u instanceof Error?u.message:String(u);n(t??e,"TAG_RESOLVE_FAILED",d),m=new Ao.Scalar(r)}return m.range=a,m.source=r,s&&(m.type=s),c&&(m.tag=c),l.format&&(m.format=l.format),o&&(m.comment=o),m}function hf(i,e,t,n,r){if(t==="!")return i[fe.SCALAR];let s=[];for(let a of i.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)s.push(a);else return a;for(let a of s)if(a.test?.test(e))return a;let o=i.knownTags[t];return o&&!o.collection?(i.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(r(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),i[fe.SCALAR])}function gf({atKey:i,directives:e,schema:t},n,r,s){let o=t.tags.find(a=>(a.default===!0||i&&a.default==="key")&&a.test?.test(n))||t[fe.SCALAR];if(t.compat){let a=t.compat.find(c=>c.default&&c.test?.test(n))??t[fe.SCALAR];if(o.tag!==a.tag){let c=e.tagString(o.tag),l=e.tagString(a.tag),m=`Value may be parsed as either ${c} or ${l}`;s(r,"TAG_RESOLVE_FAILED",m,!0)}}return o}Io.composeScalar=mf});var To=y(jo=>{"use strict";function wf(i,e,t){if(e){t??(t=e.length);for(let n=t-1;n>=0;--n){let r=e[n];switch(r.type){case"space":case"comment":case"newline":i-=r.source.length;continue}for(r=e[++n];r?.type==="space";)i+=r.source.length,r=e[++n];break}}return i}jo.emptyScalarPosition=wf});var Do=y(Bn=>{"use strict";var yf=Ie(),vf=_(),bf=Po(),qo=Ro(),kf=_e(),Sf=To(),Cf={composeNode:Lo,composeEmptyNode:Fn};function Lo(i,e,t,n){let r=i.atKey,{spaceBefore:s,comment:o,anchor:a,tag:c}=t,l,m=!0;switch(e.type){case"alias":l=Ef(i,e,n),(a||c)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=qo.composeScalar(i,e,c,n),a&&(l.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=bf.composeCollection(Cf,i,e,t,n),a&&(l.anchor=a.source.substring(1))}catch(u){let d=u instanceof Error?u.message:String(u);n(e,"RESOURCE_EXHAUSTION",d)}break;default:{let u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",u),m=!1}}return l??(l=Fn(i,e.offset,void 0,null,t,n)),a&&l.anchor===""&&n(a,"BAD_ALIAS","Anchor cannot be an empty string"),r&&i.options.stringKeys&&(!vf.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&n(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(l.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?l.comment=o:l.commentBefore=o),i.options.keepSourceTokens&&m&&(l.srcToken=e),l}function Fn(i,e,t,n,{spaceBefore:r,comment:s,anchor:o,tag:a,end:c},l){let m={type:"scalar",offset:Sf.emptyScalarPosition(e,t,n),indent:-1,source:""},u=qo.composeScalar(i,m,a,l);return o&&(u.anchor=o.source.substring(1),u.anchor===""&&l(o,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(u.spaceBefore=!0),s&&(u.comment=s,u.range[2]=c),u}function Ef({options:i},{offset:e,source:t,end:n},r){let s=new yf.Alias(t.substring(1));s.source===""&&r(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&r(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,a=kf.resolveEnd(n,o,i.strict,r);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}Bn.composeEmptyNode=Fn;Bn.composeNode=Lo});var Wo=y(Mo=>{"use strict";var _f=Je(),$o=Do(),Pf=_e(),Nf=Qe();function Of(i,e,{offset:t,start:n,value:r,end:s},o){let a=Object.assign({_directives:e},i),c=new _f.Document(void 0,a),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},m=Nf.resolveProps(n,{indicator:"doc-start",next:r??s?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});m.found&&(c.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!m.hasNewline&&o(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=r?$o.composeNode(l,r,m,o):$o.composeEmptyNode(l,m.end,n,null,m,o);let u=c.contents.range[2],d=Pf.resolveEnd(s,u,!1,o);return d.comment&&(c.comment=d.comment),c.range=[t,u,d.offset],c}Mo.composeDoc=Of});var Yn=y(Ko=>{"use strict";var xf=gt("process"),Af=Oi(),If=Je(),Xe=Ge(),Fo=_(),Rf=Wo(),jf=_e();function Ze(i){if(typeof i=="number")return[i,i+1];if(Array.isArray(i))return i.length===2?i:[i[0],i[1]];let{offset:e,source:t}=i;return[e,e+(typeof t=="string"?t.length:1)]}function Bo(i){let e="",t=!1,n=!1;for(let r=0;r<i.length;++r){let s=i[r];switch(s[0]){case"#":e+=(e===""?"":n?`
101
+ `),e+=1,i=n[e+1];return t||(t=" "),{fold:t,offset:e}}var ff={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
102
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function df(n,e,t,i){let r=n.substr(e,t),o=r.length===t&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;try{return String.fromCodePoint(o)}catch{let a=n.substr(e-2,t+2);return i(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}Ao.resolveFlowScalar=of});var jo=y(Ro=>{"use strict";var fe=_(),Io=O(),pf=Mi(),mf=Bi();function hf(n,e,t,i){let{value:r,type:s,comment:o,range:a}=e.type==="block-scalar"?pf.resolveBlockScalar(n,e,i):mf.resolveFlowScalar(e,n.options.strict,i),c=t?n.directives.tagName(t.source,u=>i(t,"TAG_RESOLVE_FAILED",u)):null,l;n.options.stringKeys&&n.atKey?l=n.schema[fe.SCALAR]:c?l=gf(n.schema,r,c,t,i):e.type==="scalar"?l=wf(n,r,e,i):l=n.schema[fe.SCALAR];let m;try{let u=l.resolve(r,d=>i(t??e,"TAG_RESOLVE_FAILED",d),n.options);m=fe.isScalar(u)?u:new Io.Scalar(u)}catch(u){let d=u instanceof Error?u.message:String(u);i(t??e,"TAG_RESOLVE_FAILED",d),m=new Io.Scalar(r)}return m.range=a,m.source=r,s&&(m.type=s),c&&(m.tag=c),l.format&&(m.format=l.format),o&&(m.comment=o),m}function gf(n,e,t,i,r){if(t==="!")return n[fe.SCALAR];let s=[];for(let a of n.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)s.push(a);else return a;for(let a of s)if(a.test?.test(e))return a;let o=n.knownTags[t];return o&&!o.collection?(n.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),n[fe.SCALAR])}function wf({atKey:n,directives:e,schema:t},i,r,s){let o=t.tags.find(a=>(a.default===!0||n&&a.default==="key")&&a.test?.test(i))||t[fe.SCALAR];if(t.compat){let a=t.compat.find(c=>c.default&&c.test?.test(i))??t[fe.SCALAR];if(o.tag!==a.tag){let c=e.tagString(o.tag),l=e.tagString(a.tag),m=`Value may be parsed as either ${c} or ${l}`;s(r,"TAG_RESOLVE_FAILED",m,!0)}}return o}Ro.composeScalar=hf});var qo=y(To=>{"use strict";function yf(n,e,t){if(e){t??(t=e.length);for(let i=t-1;i>=0;--i){let r=e[i];switch(r.type){case"space":case"comment":case"newline":n-=r.source.length;continue}for(r=e[++i];r?.type==="space";)n+=r.source.length,r=e[++i];break}}return n}To.emptyScalarPosition=yf});var $o=y(Yi=>{"use strict";var vf=Re(),bf=_(),kf=No(),Lo=jo(),Sf=_e(),Cf=qo(),Ef={composeNode:Do,composeEmptyNode:Ki};function Do(n,e,t,i){let r=n.atKey,{spaceBefore:s,comment:o,anchor:a,tag:c}=t,l,m=!0;switch(e.type){case"alias":l=_f(n,e,i),(a||c)&&i(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=Lo.composeScalar(n,e,c,i),a&&(l.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=kf.composeCollection(Ef,n,e,t,i),a&&(l.anchor=a.source.substring(1))}catch(u){let d=u instanceof Error?u.message:String(u);i(e,"RESOURCE_EXHAUSTION",d)}break;default:{let u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;i(e,"UNEXPECTED_TOKEN",u),m=!1}}return l??(l=Ki(n,e.offset,void 0,null,t,i)),a&&l.anchor===""&&i(a,"BAD_ALIAS","Anchor cannot be an empty string"),r&&n.options.stringKeys&&(!bf.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&i(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(l.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?l.comment=o:l.commentBefore=o),n.options.keepSourceTokens&&m&&(l.srcToken=e),l}function Ki(n,e,t,i,{spaceBefore:r,comment:s,anchor:o,tag:a,end:c},l){let m={type:"scalar",offset:Cf.emptyScalarPosition(e,t,i),indent:-1,source:""},u=Lo.composeScalar(n,m,a,l);return o&&(u.anchor=o.source.substring(1),u.anchor===""&&l(o,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(u.spaceBefore=!0),s&&(u.comment=s,u.range[2]=c),u}function _f({options:n},{offset:e,source:t,end:i},r){let s=new vf.Alias(t.substring(1));s.source===""&&r(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&r(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,a=Sf.resolveEnd(i,o,n.strict,r);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}Yi.composeEmptyNode=Ki;Yi.composeNode=Do});var Fo=y(Mo=>{"use strict";var Pf=He(),Wo=$o(),Nf=_e(),Of=Xe();function xf(n,e,{offset:t,start:i,value:r,end:s},o){let a=Object.assign({_directives:e},n),c=new Pf.Document(void 0,a),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},m=Of.resolveProps(i,{indicator:"doc-start",next:r??s?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});m.found&&(c.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!m.hasNewline&&o(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=r?Wo.composeNode(l,r,m,o):Wo.composeEmptyNode(l,m.end,i,null,m,o);let u=c.contents.range[2],d=Nf.resolveEnd(s,u,!1,o);return d.comment&&(c.comment=d.comment),c.range=[t,u,d.offset],c}Mo.composeDoc=xf});var Ji=y(Yo=>{"use strict";var Af=yt("process"),If=In(),Rf=He(),Ze=Qe(),Bo=_(),jf=Fo(),Tf=_e();function et(n){if(typeof n=="number")return[n,n+1];if(Array.isArray(n))return n.length===2?n:[n[0],n[1]];let{offset:e,source:t}=n;return[e,e+(typeof t=="string"?t.length:1)]}function Ko(n){let e="",t=!1,i=!1;for(let r=0;r<n.length;++r){let s=n[r];switch(s[0]){case"#":e+=(e===""?"":i?`
103
103
 
104
104
  `:`
105
- `)+(s.substring(1)||" "),t=!0,n=!1;break;case"%":i[r+1]?.[0]!=="#"&&(r+=1),t=!1;break;default:t||(n=!0),t=!1}}return{comment:e,afterEmptyLine:n}}var Kn=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,r,s)=>{let o=Ze(t);s?this.warnings.push(new Xe.YAMLWarning(o,n,r)):this.errors.push(new Xe.YAMLParseError(o,n,r))},this.directives=new Af.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=Bo(this.prelude);if(n){let s=e.contents;if(t)e.comment=e.comment?`${e.comment}
106
- ${n}`:n;else if(r||e.directives.docStart||!s)e.commentBefore=n;else if(Fo.isCollection(s)&&!s.flow&&s.items.length>0){let o=s.items[0];Fo.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${n}
107
- ${a}`:n}else{let o=s.commentBefore;s.commentBefore=o?`${n}
108
- ${o}`:n}}if(t){for(let s=0;s<this.errors.length;++s)e.errors.push(this.errors[s]);for(let s=0;s<this.warnings.length;++s)e.warnings.push(this.warnings[s])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Bo(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let r of e)yield*this.next(r);yield*this.end(t,n)}*next(e){switch(xf.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,n,r)=>{let s=Ze(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=Rf.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new Xe.YAMLParseError(Ze(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new Xe.YAMLParseError(Ze(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let t=jf.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let n=this.doc.comment;this.doc.comment=n?`${n}
109
- ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Xe.YAMLParseError(Ze(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),r=new If.Document(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}};Ko.Composer=Kn});var Vo=y(ai=>{"use strict";var Tf=$n(),qf=Wn(),Lf=Ge(),Yo=Le();function Df(i,e=!0,t){if(i){let n=(r,s,o)=>{let a=typeof r=="number"?r:Array.isArray(r)?r[0]:r.offset;if(t)t(a,s,o);else throw new Lf.YAMLParseError([a,a+1],s,o)};switch(i.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return qf.resolveFlowScalar(i,e,n);case"block-scalar":return Tf.resolveBlockScalar({options:{strict:e}},i,n)}}return null}function $f(i,e){let{implicitKey:t=!1,indent:n,inFlow:r=!1,offset:s=-1,type:o="PLAIN"}=e,a=Yo.stringifyString({type:o,value:i},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:n,source:`
105
+ `)+(s.substring(1)||" "),t=!0,i=!1;break;case"%":n[r+1]?.[0]!=="#"&&(r+=1),t=!1;break;default:t||(i=!0),t=!1}}return{comment:e,afterEmptyLine:i}}var Ui=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,i,r,s)=>{let o=et(t);s?this.warnings.push(new Ze.YAMLWarning(o,i,r)):this.errors.push(new Ze.YAMLParseError(o,i,r))},this.directives=new If.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:i,afterEmptyLine:r}=Ko(this.prelude);if(i){let s=e.contents;if(t)e.comment=e.comment?`${e.comment}
106
+ ${i}`:i;else if(r||e.directives.docStart||!s)e.commentBefore=i;else if(Bo.isCollection(s)&&!s.flow&&s.items.length>0){let o=s.items[0];Bo.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${i}
107
+ ${a}`:i}else{let o=s.commentBefore;s.commentBefore=o?`${i}
108
+ ${o}`:i}}if(t){for(let s=0;s<this.errors.length;++s)e.errors.push(this.errors[s]);for(let s=0;s<this.warnings.length;++s)e.warnings.push(this.warnings[s])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Ko(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,i=-1){for(let r of e)yield*this.next(r);yield*this.end(t,i)}*next(e){switch(Af.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,i,r)=>{let s=et(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",i,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=jf.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,i=new Ze.YAMLParseError(et(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new Ze.YAMLParseError(et(e),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let t=Tf.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
109
+ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Ze.YAMLParseError(et(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let i=Object.assign({_directives:this.directives},this.options),r=new Rf.Document(void 0,i);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}};Yo.Composer=Ui});var Vo=y(un=>{"use strict";var qf=Mi(),Lf=Bi(),Df=Qe(),Uo=De();function $f(n,e=!0,t){if(n){let i=(r,s,o)=>{let a=typeof r=="number"?r:Array.isArray(r)?r[0]:r.offset;if(t)t(a,s,o);else throw new Df.YAMLParseError([a,a+1],s,o)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Lf.resolveFlowScalar(n,e,i);case"block-scalar":return qf.resolveBlockScalar({options:{strict:e}},n,i)}}return null}function Wf(n,e){let{implicitKey:t=!1,indent:i,inFlow:r=!1,offset:s=-1,type:o="PLAIN"}=e,a=Uo.stringifyString({type:o,value:n},{implicitKey:t,indent:i>0?" ".repeat(i):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:i,source:`
110
110
  `}];switch(a[0]){case"|":case">":{let l=a.indexOf(`
111
111
  `),m=a.substring(0,l),u=a.substring(l+1)+`
112
- `,d=[{type:"block-scalar-header",offset:s,indent:n,source:m}];return Uo(d,c)||d.push({type:"newline",offset:-1,indent:n,source:`
113
- `}),{type:"block-scalar",offset:s,indent:n,props:d,source:u}}case'"':return{type:"double-quoted-scalar",offset:s,indent:n,source:a,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:n,source:a,end:c};default:return{type:"scalar",offset:s,indent:n,source:a,end:c}}}function Mf(i,e,t={}){let{afterKey:n=!1,implicitKey:r=!1,inFlow:s=!1,type:o}=t,a="indent"in i?i.indent:null;if(n&&typeof a=="number"&&(a+=2),!o)switch(i.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let l=i.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=l.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let c=Yo.stringifyString({type:o,value:e},{implicitKey:r||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":Wf(i,c);break;case'"':Un(i,c,"double-quoted-scalar");break;case"'":Un(i,c,"single-quoted-scalar");break;default:Un(i,c,"scalar")}}function Wf(i,e){let t=e.indexOf(`
114
- `),n=e.substring(0,t),r=e.substring(t+1)+`
115
- `;if(i.type==="block-scalar"){let s=i.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=n,i.source=r}else{let{offset:s}=i,o="indent"in i?i.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:n}];Uo(a,"end"in i?i.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
116
- `});for(let c of Object.keys(i))c!=="type"&&c!=="offset"&&delete i[c];Object.assign(i,{type:"block-scalar",indent:o,props:a,source:r})}}function Uo(i,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":i.push(t);break;case"newline":return i.push(t),!0}return!1}function Un(i,e,t){switch(i.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":i.type=t,i.source=e;break;case"block-scalar":{let n=i.props.slice(1),r=e.length;i.props[0].type==="block-scalar-header"&&(r-=i.props[0].source.length);for(let s of n)s.offset+=r;delete i.props,Object.assign(i,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{let r={type:"newline",offset:i.offset+e.length,indent:i.indent,source:`
117
- `};delete i.items,Object.assign(i,{type:t,source:e,end:[r]});break}default:{let n="indent"in i?i.indent:-1,r="end"in i&&Array.isArray(i.end)?i.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(i))s!=="type"&&s!=="offset"&&delete i[s];Object.assign(i,{type:t,indent:n,source:e,end:r})}}}ai.createScalarToken=$f;ai.resolveAsScalar=Df;ai.setScalarValue=Mf});var Ho=y(Jo=>{"use strict";var Ff=i=>"type"in i?li(i):ci(i);function li(i){switch(i.type){case"block-scalar":{let e="";for(let t of i.props)e+=li(t);return e+i.source}case"block-map":case"block-seq":{let e="";for(let t of i.items)e+=ci(t);return e}case"flow-collection":{let e=i.start.source;for(let t of i.items)e+=ci(t);for(let t of i.end)e+=t.source;return e}case"document":{let e=ci(i);if(i.end)for(let t of i.end)e+=t.source;return e}default:{let e=i.source;if("end"in i&&i.end)for(let t of i.end)e+=t.source;return e}}}function ci({start:i,key:e,sep:t,value:n}){let r="";for(let s of i)r+=s.source;if(e&&(r+=li(e)),t)for(let s of t)r+=s.source;return n&&(r+=li(n)),r}Jo.stringify=Ff});var Xo=y(Qo=>{"use strict";var Vn=Symbol("break visit"),Bf=Symbol("skip children"),zo=Symbol("remove item");function de(i,e){"type"in i&&i.type==="document"&&(i={start:i.start,value:i.value}),Go(Object.freeze([]),i,e)}de.BREAK=Vn;de.SKIP=Bf;de.REMOVE=zo;de.itemAtPath=(i,e)=>{let t=i;for(let[n,r]of e){let s=t?.[n];if(s&&"items"in s)t=s.items[r];else return}return t};de.parentCollection=(i,e)=>{let t=de.itemAtPath(i,e.slice(0,-1)),n=e[e.length-1][0],r=t?.[n];if(r&&"items"in r)return r;throw new Error("Parent collection not found")};function Go(i,e,t){let n=t(e,i);if(typeof n=="symbol")return n;for(let r of["key","value"]){let s=e[r];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){let a=Go(Object.freeze(i.concat([[r,o]])),s.items[o],t);if(typeof a=="number")o=a-1;else{if(a===Vn)return Vn;a===zo&&(s.items.splice(o,1),o-=1)}}typeof n=="function"&&r==="key"&&(n=n(e,i))}}return typeof n=="function"?n(e,i):n}Qo.visit=de});var ui=y(q=>{"use strict";var Jn=Vo(),Kf=Ho(),Yf=Xo(),Hn="\uFEFF",zn="",Gn="",Qn="",Uf=i=>!!i&&"items"in i,Vf=i=>!!i&&(i.type==="scalar"||i.type==="single-quoted-scalar"||i.type==="double-quoted-scalar"||i.type==="block-scalar");function Jf(i){switch(i){case Hn:return"<BOM>";case zn:return"<DOC>";case Gn:return"<FLOW_END>";case Qn:return"<SCALAR>";default:return JSON.stringify(i)}}function Hf(i){switch(i){case Hn:return"byte-order-mark";case zn:return"doc-mode";case Gn:return"flow-error-end";case Qn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
112
+ `,d=[{type:"block-scalar-header",offset:s,indent:i,source:m}];return Jo(d,c)||d.push({type:"newline",offset:-1,indent:i,source:`
113
+ `}),{type:"block-scalar",offset:s,indent:i,props:d,source:u}}case'"':return{type:"double-quoted-scalar",offset:s,indent:i,source:a,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:i,source:a,end:c};default:return{type:"scalar",offset:s,indent:i,source:a,end:c}}}function Mf(n,e,t={}){let{afterKey:i=!1,implicitKey:r=!1,inFlow:s=!1,type:o}=t,a="indent"in n?n.indent:null;if(i&&typeof a=="number"&&(a+=2),!o)switch(n.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let l=n.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=l.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let c=Uo.stringifyString({type:o,value:e},{implicitKey:r||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":Ff(n,c);break;case'"':Vi(n,c,"double-quoted-scalar");break;case"'":Vi(n,c,"single-quoted-scalar");break;default:Vi(n,c,"scalar")}}function Ff(n,e){let t=e.indexOf(`
114
+ `),i=e.substring(0,t),r=e.substring(t+1)+`
115
+ `;if(n.type==="block-scalar"){let s=n.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=i,n.source=r}else{let{offset:s}=n,o="indent"in n?n.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:i}];Jo(a,"end"in n?n.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
116
+ `});for(let c of Object.keys(n))c!=="type"&&c!=="offset"&&delete n[c];Object.assign(n,{type:"block-scalar",indent:o,props:a,source:r})}}function Jo(n,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":n.push(t);break;case"newline":return n.push(t),!0}return!1}function Vi(n,e,t){switch(n.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":n.type=t,n.source=e;break;case"block-scalar":{let i=n.props.slice(1),r=e.length;n.props[0].type==="block-scalar-header"&&(r-=n.props[0].source.length);for(let s of i)s.offset+=r;delete n.props,Object.assign(n,{type:t,source:e,end:i});break}case"block-map":case"block-seq":{let r={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
117
+ `};delete n.items,Object.assign(n,{type:t,source:e,end:[r]});break}default:{let i="indent"in n?n.indent:-1,r="end"in n&&Array.isArray(n.end)?n.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(n))s!=="type"&&s!=="offset"&&delete n[s];Object.assign(n,{type:t,indent:i,source:e,end:r})}}}un.createScalarToken=Wf;un.resolveAsScalar=$f;un.setScalarValue=Mf});var Go=y(Ho=>{"use strict";var Bf=n=>"type"in n?dn(n):fn(n);function dn(n){switch(n.type){case"block-scalar":{let e="";for(let t of n.props)e+=dn(t);return e+n.source}case"block-map":case"block-seq":{let e="";for(let t of n.items)e+=fn(t);return e}case"flow-collection":{let e=n.start.source;for(let t of n.items)e+=fn(t);for(let t of n.end)e+=t.source;return e}case"document":{let e=fn(n);if(n.end)for(let t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(let t of n.end)e+=t.source;return e}}}function fn({start:n,key:e,sep:t,value:i}){let r="";for(let s of n)r+=s.source;if(e&&(r+=dn(e)),t)for(let s of t)r+=s.source;return i&&(r+=dn(i)),r}Ho.stringify=Bf});var Zo=y(Xo=>{"use strict";var Hi=Symbol("break visit"),Kf=Symbol("skip children"),zo=Symbol("remove item");function de(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),Qo(Object.freeze([]),n,e)}de.BREAK=Hi;de.SKIP=Kf;de.REMOVE=zo;de.itemAtPath=(n,e)=>{let t=n;for(let[i,r]of e){let s=t?.[i];if(s&&"items"in s)t=s.items[r];else return}return t};de.parentCollection=(n,e)=>{let t=de.itemAtPath(n,e.slice(0,-1)),i=e[e.length-1][0],r=t?.[i];if(r&&"items"in r)return r;throw new Error("Parent collection not found")};function Qo(n,e,t){let i=t(e,n);if(typeof i=="symbol")return i;for(let r of["key","value"]){let s=e[r];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){let a=Qo(Object.freeze(n.concat([[r,o]])),s.items[o],t);if(typeof a=="number")o=a-1;else{if(a===Hi)return Hi;a===zo&&(s.items.splice(o,1),o-=1)}}typeof i=="function"&&r==="key"&&(i=i(e,n))}}return typeof i=="function"?i(e,n):i}Xo.visit=de});var pn=y(q=>{"use strict";var Gi=Vo(),Yf=Go(),Uf=Zo(),zi="\uFEFF",Qi="",Xi="",Zi="",Jf=n=>!!n&&"items"in n,Vf=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function Hf(n){switch(n){case zi:return"<BOM>";case Qi:return"<DOC>";case Xi:return"<FLOW_END>";case Zi:return"<SCALAR>";default:return JSON.stringify(n)}}function Gf(n){switch(n){case zi:return"byte-order-mark";case Qi:return"doc-mode";case Xi:return"flow-error-end";case Zi:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
118
118
  `:case`\r
119
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(i[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}q.createScalarToken=Jn.createScalarToken;q.resolveAsScalar=Jn.resolveAsScalar;q.setScalarValue=Jn.setScalarValue;q.stringify=Kf.stringify;q.visit=Yf.visit;q.BOM=Hn;q.DOCUMENT=zn;q.FLOW_END=Gn;q.SCALAR=Qn;q.isCollection=Uf;q.isScalar=Vf;q.prettyToken=Jf;q.tokenType=Hf});var er=y(ea=>{"use strict";var et=ui();function M(i){switch(i){case void 0:case" ":case`
120
- `:case"\r":case" ":return!0;default:return!1}}var Zo=new Set("0123456789ABCDEFabcdef"),zf=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),fi=new Set(",[]{}"),Gf=new Set(` ,[]{}
121
- \r `),Xn=i=>!i||Gf.has(i),Zn=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
119
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(n[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}q.createScalarToken=Gi.createScalarToken;q.resolveAsScalar=Gi.resolveAsScalar;q.setScalarValue=Gi.setScalarValue;q.stringify=Yf.stringify;q.visit=Uf.visit;q.BOM=zi;q.DOCUMENT=Qi;q.FLOW_END=Xi;q.SCALAR=Zi;q.isCollection=Jf;q.isScalar=Vf;q.prettyToken=Hf;q.tokenType=Gf});var nr=y(ta=>{"use strict";var tt=pn();function W(n){switch(n){case void 0:case" ":case`
120
+ `:case"\r":case" ":return!0;default:return!1}}var ea=new Set("0123456789ABCDEFabcdef"),zf=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),mn=new Set(",[]{}"),Qf=new Set(` ,[]{}
121
+ \r `),er=n=>!n||Qf.has(n),tr=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let i=this.next??"stream";for(;i&&(t||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
122
122
  `?!0:t==="\r"?this.buffer[e+1]===`
123
- `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){let r=this.buffer[n+e+1];if(r===`
124
- `||!r&&!this.atEnd)return e+n+1}return t===`
125
- `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&M(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
126
- `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===et.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,n=e.indexOf("#");for(;n!==-1;){let s=e[n-1];if(s===" "||s===" "){t=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let s=e[t-1];if(s===" "||s===" ")t-=1;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield et.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&M(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!M(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&M(t)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Xn),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&r[0]!=="#"||n===0&&(r.startsWith("---")||r.startsWith("..."))&&M(r[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield et.FLOW_END,yield*this.parseLineStart();let s=0;for(;r[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),r[s]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Xn),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||M(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let s=0;for(;this.buffer[t-1-s]==="\\";)s+=1;if(s%2===0)break;t=this.buffer.indexOf('"',t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
127
- `,this.pos);if(r!==-1){for(;r!==-1;){let s=this.continueScalar(r+1);if(s===-1)break;r=n.indexOf(`
128
- `,s)}r!==-1&&(t=r-(n[r-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>M(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let s=this.pos;n=this.buffer[s];++s)switch(n){case" ":t+=1;break;case`
123
+ `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let i=0;for(;t===" ";)t=this.buffer[++i+e];if(t==="\r"){let r=this.buffer[i+e+1];if(r===`
124
+ `||!r&&!this.atEnd)return e+i+1}return t===`
125
+ `||i>=this.indentNext||!t&&!this.atEnd?e+i:-1}if(t==="-"||t==="."){let i=this.buffer.substr(e,3);if((i==="---"||i==="...")&&W(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
126
+ `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===tt.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,i=e.indexOf("#");for(;i!==-1;){let s=e[i-1];if(s===" "||s===" "){t=i-1;break}else i=e.indexOf("#",i+1)}for(;;){let s=e[t-1];if(s===" "||s===" ")t-=1;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield tt.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&W(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!W(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&W(t)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(er),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,i=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=i=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&r[0]!=="#"||i===0&&(r.startsWith("---")||r.startsWith("..."))&&W(r[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield tt.FLOW_END,yield*this.parseLineStart();let s=0;for(;r[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),r[s]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(er),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||W(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let s=0;for(;this.buffer[t-1-s]==="\\";)s+=1;if(s%2===0)break;t=this.buffer.indexOf('"',t+1)}let i=this.buffer.substring(0,t),r=i.indexOf(`
127
+ `,this.pos);if(r!==-1){for(;r!==-1;){let s=this.continueScalar(r+1);if(s===-1)break;r=i.indexOf(`
128
+ `,s)}r!==-1&&(t=r-(i[r-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>W(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,i;e:for(let s=this.pos;i=this.buffer[s];++s)switch(i){case" ":t+=1;break;case`
129
129
  `:e=s,t=0;break;case"\r":{let o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
130
- `)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
131
- `,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===" ";)n=this.buffer[++r];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
132
- `;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let s=e-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);let a=s;for(;o===" ";)o=this.buffer[--s];if(o===`
133
- `&&s>=this.pos&&s+1+t>a)e=s;else break}while(!0);return yield et.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===":"){let s=this.buffer[n+1];if(M(s)||e&&fi.has(s))break;t=n}else if(M(r)){let s=this.buffer[n+1];if(r==="\r"&&(s===`
134
- `?(n+=1,r=`
135
- `,s=this.buffer[n+1]):t=n),s==="#"||e&&fi.has(s))break;if(r===`
136
- `){let o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&fi.has(r))break;t=n}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield et.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(Xn),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,n=this.charAt(1);if(M(n)||t&&fi.has(n)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!M(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(zf.has(t))t=this.buffer[++e];else if(t==="%"&&Zo.has(this.buffer[e+1])&&Zo.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
130
+ `)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
131
+ `,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let r=e+1;for(i=this.buffer[r];i===" ";)i=this.buffer[++r];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
132
+ `;)i=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let s=e-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);let a=s;for(;o===" ";)o=this.buffer[--s];if(o===`
133
+ `&&s>=this.pos&&s+1+t>a)e=s;else break}while(!0);return yield tt.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,i=this.pos-1,r;for(;r=this.buffer[++i];)if(r===":"){let s=this.buffer[i+1];if(W(s)||e&&mn.has(s))break;t=i}else if(W(r)){let s=this.buffer[i+1];if(r==="\r"&&(s===`
134
+ `?(i+=1,r=`
135
+ `,s=this.buffer[i+1]):t=i),s==="#"||e&&mn.has(s))break;if(r===`
136
+ `){let o=this.continueScalar(i+1);if(o===-1)break;i=Math.max(i,o-2)}}else{if(e&&mn.has(r))break;t=i}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield tt.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let i=this.buffer.slice(this.pos,e);return i?(yield i,this.pos+=i.length,i.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(er),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,i=this.charAt(1);if(W(i)||t&&mn.has(i)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!W(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(zf.has(t))t=this.buffer[++e];else if(t==="%"&&ea.has(this.buffer[e+1])&&ea.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
137
137
  `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
138
- `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};ea.Lexer=Zn});var ir=y(ta=>{"use strict";var tr=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let s=t+n>>1;this.lineStarts[s]<e?t=s+1:n=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};ta.LineCounter=tr});var rr=y(oa=>{"use strict";var Qf=gt("process"),ia=ui(),Xf=er();function te(i,e){for(let t=0;t<i.length;++t)if(i[t].type===e)return!0;return!1}function na(i){for(let e=0;e<i.length;++e)switch(i[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function sa(i){switch(i?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function di(i){switch(i.type){case"document":return i.start;case"block-map":{let e=i.items[i.items.length-1];return e.sep??e.start}case"block-seq":return i.items[i.items.length-1].start;default:return[]}}function Pe(i){if(i.length===0)return[];let e=i.length;e:for(;--e>=0;)switch(i[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;i[++e]?.type==="space";);return i.splice(e,i.length)}function pi(i,e){if(e.length<1e5)Array.prototype.push.apply(i,e);else for(let t=0;t<e.length;++t)i.push(e[t])}function ra(i){if(i.start.type==="flow-seq-start")for(let e of i.items)e.sep&&!e.value&&!te(e.start,"explicit-key-ind")&&!te(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,sa(e.value)?e.value.end?pi(e.value.end,e.sep):e.value.end=e.sep:pi(e.start,e.sep),delete e.sep)}var nr=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Xf.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,Qf.env.LOG_TOKENS&&console.log("|",ia.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=ia.tokenType(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let n=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in n?n.indent:0:t.type==="flow-collection"&&n.type==="document"&&(t.indent=0),t.type==="flow-collection"&&ra(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{let r=n.items[n.items.length-1];if(r.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=t;else{Object.assign(r,{key:t,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=n.items[n.items.length-1];r.value?n.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{let r=n.items[n.items.length-1];!r||r.value?n.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&na(r.start)===-1&&(t.indent===0||r.start.every(s=>s.type!=="comment"||s.indent<t.indent))&&(n.type==="document"?n.end=r.start:n.items.push({start:r.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{na(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=di(this.peek(2)),n=Pe(t),r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
138
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,i;do i=this.buffer[++t];while(i===" "||e&&i===" ");let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,i=this.buffer[t];for(;!e(i);)i=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};ta.Lexer=tr});var rr=y(na=>{"use strict";var ir=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,i=this.lineStarts.length;for(;t<i;){let s=t+i>>1;this.lineStarts[s]<e?t=s+1:i=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};na.LineCounter=ir});var or=y(aa=>{"use strict";var Xf=yt("process"),ia=pn(),Zf=nr();function ne(n,e){for(let t=0;t<n.length;++t)if(n[t].type===e)return!0;return!1}function ra(n){for(let e=0;e<n.length;++e)switch(n[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function oa(n){switch(n?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function hn(n){switch(n.type){case"document":return n.start;case"block-map":{let e=n.items[n.items.length-1];return e.sep??e.start}case"block-seq":return n.items[n.items.length-1].start;default:return[]}}function Pe(n){if(n.length===0)return[];let e=n.length;e:for(;--e>=0;)switch(n[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;n[++e]?.type==="space";);return n.splice(e,n.length)}function gn(n,e){if(e.length<1e5)Array.prototype.push.apply(n,e);else for(let t=0;t<e.length;++t)n.push(e[t])}function sa(n){if(n.start.type==="flow-seq-start")for(let e of n.items)e.sep&&!e.value&&!ne(e.start,"explicit-key-ind")&&!ne(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,oa(e.value)?e.value.end?gn(e.value.end,e.sep):e.value.end=e.sep:gn(e.start,e.sep),delete e.sep)}var sr=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Zf.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(e,t))yield*this.next(i);t||(yield*this.end())}*next(e){if(this.source=e,Xf.env.LOG_TOKENS&&console.log("|",ia.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=ia.tokenType(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let i=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let i=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in i?i.indent:0:t.type==="flow-collection"&&i.type==="document"&&(t.indent=0),t.type==="flow-collection"&&sa(t),i.type){case"document":i.value=t;break;case"block-scalar":i.props.push(t);break;case"block-map":{let r=i.items[i.items.length-1];if(r.value){i.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=t;else{Object.assign(r,{key:t,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=i.items[i.items.length-1];r.value?i.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{let r=i.items[i.items.length-1];!r||r.value?i.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&ra(r.start)===-1&&(t.indent===0||r.start.every(s=>s.type!=="comment"||s.indent<t.indent))&&(i.type==="document"?i.end=r.start:i.items.push({start:r.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{ra(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=hn(this.peek(2)),i=Pe(t),r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
139
139
  `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
140
- `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){pi(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",s=[];if(r&&t.sep&&!t.value){let o=[];for(let a=0;a<t.sep.length;++a){let c=t.sep[a];switch(c.type){case"newline":o.push(a);break;case"space":break;case"comment":c.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(s=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":r||t.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(te(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(sa(t.key)&&!te(t.sep,"newline")){let o=Pe(t.start),a=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:c}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(te(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=Pe(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||r?e.items.push({start:s,key:null,sep:[this.sourceToken]}):te(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);r||t.value?(e.items.push({start:s,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!te(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:s});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){pi(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||te(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let r=di(n),s=Pe(r);ra(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
140
+ `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let i="end"in t.value?t.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){gn(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let i=!this.onKeyLine&&this.indent===e.indent,r=i&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",s=[];if(r&&t.sep&&!t.value){let o=[];for(let a=0;a<t.sep.length;++a){let c=t.sep[a];switch(c.type){case"newline":o.push(a);break;case"space":break;case"comment":c.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(s=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":r||t.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ne(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(oa(t.key)&&!ne(t.sep,"newline")){let o=Pe(t.start),a=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:c}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(ne(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=Pe(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||r?e.items.push({start:s,key:null,sep:[this.sourceToken]}):ne(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);r||t.value?(e.items.push({start:s,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!ne(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else i&&e.items.push({start:s});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let i="end"in t.value?t.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){gn(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||ne(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let i=this.startBlockValue(e);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{let i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===e.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){let r=hn(i),s=Pe(r);sa(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
141
141
  `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
142
- `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=di(e),n=Pe(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=di(e),n=Pe(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};oa.Parser=nr});var fa=y(it=>{"use strict";var aa=Yn(),Zf=Je(),tt=Ge(),ed=Fi(),td=_(),id=ir(),ca=rr();function la(i){let e=i.prettyErrors!==!1;return{lineCounter:i.lineCounter||e&&new id.LineCounter||null,prettyErrors:e}}function nd(i,e={}){let{lineCounter:t,prettyErrors:n}=la(e),r=new ca.Parser(t?.addNewLine),s=new aa.Composer(e),o=Array.from(s.compose(r.parse(i)));if(n&&t)for(let a of o)a.errors.forEach(tt.prettifyError(i,t)),a.warnings.forEach(tt.prettifyError(i,t));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function ua(i,e={}){let{lineCounter:t,prettyErrors:n}=la(e),r=new ca.Parser(t?.addNewLine),s=new aa.Composer(e),o=null;for(let a of s.compose(r.parse(i),!0,i.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new tt.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(o.errors.forEach(tt.prettifyError(i,t)),o.warnings.forEach(tt.prettifyError(i,t))),o}function rd(i,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);let r=ua(i,t);if(!r)return null;if(r.warnings.forEach(s=>ed.warn(r.options.logLevel,s)),r.errors.length>0){if(r.options.logLevel!=="silent")throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:n},t))}function sd(i,e,t){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let r=Math.round(t);t=r<1?void 0:r>8?{indent:8}:{indent:r}}if(i===void 0){let{keepUndefined:r}=t??e??{};if(!r)return}return td.isDocument(i)&&!n?i.toString(t):new Zf.Document(i,n,t).toString(t)}it.parse=rd;it.parseAllDocuments=nd;it.parseDocument=ua;it.stringify=sd});var or=y(P=>{"use strict";var od=Yn(),ad=Je(),cd=En(),sr=Ge(),ld=Ie(),ie=_(),ud=Q(),fd=O(),dd=Z(),pd=ee(),md=ui(),hd=er(),gd=ir(),wd=rr(),mi=fa(),da=Ne();P.Composer=od.Composer;P.Document=ad.Document;P.Schema=cd.Schema;P.YAMLError=sr.YAMLError;P.YAMLParseError=sr.YAMLParseError;P.YAMLWarning=sr.YAMLWarning;P.Alias=ld.Alias;P.isAlias=ie.isAlias;P.isCollection=ie.isCollection;P.isDocument=ie.isDocument;P.isMap=ie.isMap;P.isNode=ie.isNode;P.isPair=ie.isPair;P.isScalar=ie.isScalar;P.isSeq=ie.isSeq;P.Pair=ud.Pair;P.Scalar=fd.Scalar;P.YAMLMap=dd.YAMLMap;P.YAMLSeq=pd.YAMLSeq;P.CST=md;P.Lexer=hd.Lexer;P.LineCounter=gd.LineCounter;P.Parser=wd.Parser;P.parse=mi.parse;P.parseAllDocuments=mi.parseAllDocuments;P.parseDocument=mi.parseDocument;P.stringify=mi.stringify;P.visit=da.visit;P.visitAsync=da.visitAsync});var ht=Cr(or(),1);import qa from"path";import{promises as Hd}from"fs";import Ei from"path";import{promises as Md}from"fs";import x from"path";import{promises as yd}from"fs";async function ar(i){try{return await yd.access(i),!0}catch(e){if(vd(e))return!1;throw e}}function vd(i){let e=i?.code;return e==="ENOENT"||e==="ENOTDIR"}var fr=Cr(or(),1);import hi from"path";var wi=64*1024,lr=1024,ur=64,bd=5,kd=[".agents/skills/**",".amazonq/skills/**",".augment/skills/**",".bob/skills/**",".claude/skills/**",".cline/skills/**",".codebuddy/skills/**",".continue/skills/**",".cospec/skills/**",".crush/skills/**",".cursor/skills/**",".factory/skills/**",".forge/skills/**",".gemini/skills/**",".github/skills/**",".iflow/skills/**",".junie/skills/**",".kilocode/skills/**",".kimi-code/skills/**",".kiro/skills/**",".lingma/skills/**",".mimocode/skills/**",".opencode/skills/**",".pi/skills/**",".qoder/skills/**",".qwen/skills/**",".roo/skills/**",".trae-cn/skills/**",".trae/skills/**",".windsurf/skills/**",".zcode/skills/**"],Y={include:["**/*"],exclude:[...kd],max_files:1e4,max_total_bytes:256*1024*1024,max_duration_ms:6e4};function Sd(i,e){if(typeof i!="string")throw new Error(`${e} must be a string`);let t=i.trim();if(t.length===0||hi.posix.isAbsolute(t)||hi.win32.isAbsolute(t)||/^(?:~|[\\/])/u.test(t))throw new Error(`${e} must be a project-relative path`);if(t===".")return[];let n=t.replaceAll("\\","/").split("/");if(n.some(r=>r===".."))throw new Error(`${e} must stay inside the project root`);if(n.some(r=>r===""||r==="."))throw new Error(`${e} must not contain empty or dot path segments`);return n}function gi(i){let e=Sd(i,"native.artifact_root");return e.length===0?".":e.join("/")}function ma(i,e="docs"){let t=i??e;if(t!=="legacy"&&t!=="docs")throw new Error("classic.artifact_layout must be legacy or docs");return t}function rt(i,e,t=!1){if(typeof i!="string")throw new Error(`${e} must be a string`);let n=i.trim().replaceAll("\\","/");if(n.length===0||hi.posix.isAbsolute(n)||hi.win32.isAbsolute(n)||/^(?:~|[\\/])/u.test(n))throw new Error(`${e} must be relative to its declared path base`);let r=n.split("/");if(r.some(s=>s===".."))throw new Error(`${e} must stay inside its declared path base`);if(r.some(s=>s===""||s==="."))throw new Error(`${e} must not contain empty or dot path segments`);if(!t&&/[*?]/u.test(n))throw new Error(`${e} cannot contain wildcards`);return r.join("/")}function nt(i,e){if(!i||typeof i!="object"||Array.isArray(i))throw new Error(`${e} must be a mapping`);return i}function ha(i,e,t){let n=i??e;if(n!=="en"&&n!=="zh-CN")throw new Error(`${t} must be en or zh-CN`);return n}function ga(i,e){if(typeof i!="string"||i.length===0||i.includes("\\")||i.includes("\0")||i.startsWith("/")||i.split("/").includes(".."))throw new Error(`${e} contains an unsafe pattern`);if(i.length>lr)throw new Error(`${e} exceeds ${lr} characters`);let t=0;for(let n=0;n<i.length;n+=1)i[n]==="?"?t+=1:i[n]==="*"&&(t+=1,i[n+1]==="*"&&(n+=1));if(t>ur)throw new Error(`${e} contains more than ${ur} wildcard tokens`);return i}function pa(i,e,t){if(i===void 0)return[...t];if(!Array.isArray(i))throw new Error(`${e} contains an unsafe pattern`);return[...new Set(i.map(n=>ga(n,e)))].sort((n,r)=>n.localeCompare(r,"en"))}function cr(i,e,t){let n=i??e;if(!Number.isSafeInteger(n)||n<1)throw new Error(`${t} must be a positive integer`);return n}function Cd(i){if(i===void 0)return{...Y,include:[...Y.include],exclude:[...Y.exclude]};let e=nt(i,"native.snapshot");return{include:pa(e.include,"native.snapshot.include",Y.include),exclude:pa(e.exclude,"native.snapshot.exclude",Y.exclude),max_files:cr(e.max_files,Y.max_files,"native.snapshot.max_files"),max_total_bytes:cr(e.max_total_bytes,Y.max_total_bytes,"native.snapshot.max_total_bytes"),max_duration_ms:cr(e.max_duration_ms,Y.max_duration_ms,"native.snapshot.max_duration_ms")}}function Ed(i){if(i===void 0)return;let e=nt(i,"native.pending_root_move"),t=e.id,n=e.from_artifact_root,r=e.to_artifact_root,s=e.stage;if(typeof t!="string"||!/^[a-f0-9-]{8,}$/u.test(t))throw new Error("native.pending_root_move.id is invalid");if(typeof n!="string"||typeof r!="string")throw new Error("native.pending_root_move roots must be strings");if(s!=="copying"&&s!=="ready"&&s!=="switched")throw new Error("native.pending_root_move.stage is invalid");let o;if(e.cleanup!==void 0){let a=nt(e.cleanup,"native.pending_root_move.cleanup"),c=a.kind,l=a.state,m=a.manifest_hash;if(c!=="forward-source"&&c!=="restart-staging"&&c!=="rollback-destination"&&c!=="rollback-staging")throw new Error("native.pending_root_move.cleanup.kind is invalid");if(l!=="prepared"&&l!=="quarantined"&&l!=="deleting")throw new Error("native.pending_root_move.cleanup.state is invalid");if(typeof m!="string"||!/^[a-f0-9]{64}$/u.test(m))throw new Error("native.pending_root_move.cleanup.manifest_hash is invalid");o={kind:c,state:l,manifestHash:m}}return{id:t,fromArtifactRoot:gi(n),toArtifactRoot:gi(r),stage:s,...o?{cleanup:o}:{}}}function _d(i){let e=nt(i,"native");if(typeof e.artifact_root!="string")throw new Error("native.artifact_root must be a string");let t=e.clarification_mode??"sequential";if(t!=="sequential"&&t!=="batch")throw new Error("native.clarification_mode must be sequential or batch");let n=e.archive_confirmation??"automatic";if(n!=="automatic"&&n!=="required")throw new Error("native.archive_confirmation must be automatic or required");let r=e.max_verify_failures??bd;if(!Number.isSafeInteger(r)||r<1)throw new Error("native.max_verify_failures must be a positive integer");let s=Ed(e.pending_root_move);return{artifact_root:gi(e.artifact_root),language:ha(e.language,"en","native.language"),clarification_mode:t,archive_confirmation:n,max_verify_failures:r,snapshot:Cd(e.snapshot),...s?{pending_root_move:s}:{}}}function Pd(i){let e=nt(i,"classic"),t=e.context_compression??"off";if(t!=="off"&&t!=="beta")throw new Error("classic.context_compression must be off or beta");let n=e.review_mode??"standard";if(n!=="off"&&n!=="standard"&&n!=="thorough")throw new Error("classic.review_mode must be off, standard, or thorough");let r=e.auto_transition??!0;if(typeof r!="boolean")throw new Error("classic.auto_transition must be true or false");return{artifact_layout:ma(e.artifact_layout),language:ha(e.language,"zh-CN","classic.language"),context_compression:t,review_mode:n,auto_transition:r}}function Nd(i){let e=i??!0;if(typeof e!="boolean")throw new Error("ambient_resume must be true or false");return e}function Od(i,e,t,n,r){let s=i.schema!==void 0;if(!(s||i.default_workflow!==void 0||i.workflows!==void 0||!r.allowPartialProject&&i.native!==void 0)||r.allowPartialProject&&!s)return null;if(i.schema!=="comet.project.v1")throw new Error("Unsupported Comet project schema");if(i.default_workflow!=="native"&&i.default_workflow!=="classic")throw new Error("default_workflow must be native or classic");let a=i.workflows??[i.default_workflow];if(!Array.isArray(a)||a.length===0||a.some(l=>l!=="native"&&l!=="classic"))throw new Error("workflows must contain native and/or classic");let c=[...new Set(a)];if(!c.includes(i.default_workflow))throw new Error("workflows must include default_workflow");if(c.includes("native")&&!e)throw new Error("native must be a mapping");return{schema:"comet.project.v1",default_workflow:i.default_workflow,workflows:c,ambient_resume:n,...e?{native:e}:{},...t?{classic:t}:{}}}function st(i,e={}){let t=(0,fr.parseDocument)(i,{uniqueKeys:!0});if(t.errors.length>0)throw new Error(`Invalid .comet/config.yaml: ${t.errors[0].message}`);let n=t.toJS();if(n==null)return{value:{},config:null,ambient_resume:!0};if(typeof n!="object"||Array.isArray(n))throw new Error("Invalid .comet/config.yaml: root must be a mapping");let r=n,s=Nd(r.ambient_resume),o=r.native===void 0?void 0:_d(r.native),a=r.classic===void 0?void 0:Pd(r.classic),c=Od(r,o,a,s,{allowPartialProject:e.allowPartialProject??!1});return{value:r,config:c,ambient_resume:s,...o?{native:o}:{},...a?{classic:a}:{}}}import{createHash as Ad}from"crypto";import{promises as bi}from"fs";import se from"path";import{constants as yi,promises as pe}from"fs";function ne(i){return i!==0&&i!==0n&&i!=="0"}function dr(i,e){return ne(i.dev)&&ne(e.dev)&&ne(i.ino)&&ne(e.ino)}function ot(i,e){let t=ne(i.dev)&&ne(e.dev);if(t&&i.dev!==e.dev)return!1;let n=ne(i.ino)&&ne(e.ino);return n&&i.ino!==e.ino?!1:t&&n?!0:i.birthtime===e.birthtime}var re=class extends Error{reason;constructor(e,t,n){super(t,n),this.name="RaceSafeReadError",this.reason=e}};function pr(i){return"birthtimeNs"in i&&typeof i.birthtimeNs=="bigint"?i.birthtimeNs:i.birthtimeMs}function wa(i){return"ctimeNs"in i&&typeof i.ctimeNs=="bigint"?i.ctimeNs:i.ctimeMs}function at(i){return{dev:i.dev,ino:i.ino,birthtime:pr(i)}}function vi(i,e){let t=at(i),n=at(e);return dr(t,n)?ot(t,n):ot(t,n)&&pr(i)===pr(e)&&wa(i)===wa(e)&&i.size===e.size}async function ya(i,e,t={}){if(!Number.isSafeInteger(e)||e<1)throw new Error("race-safe read byte limit must be a positive integer");let n=t.label??"file",r=t.bigint===!0,s=await pe.lstat(i,{bigint:r});if(!s.isFile()||s.isSymbolicLink())throw new re("not-regular-file",`${n} must be a regular file`);if(BigInt(s.size)>BigInt(e))throw new re("too-large",`${n} exceeds ${e} bytes`);let o=await pe.realpath(i);await t.verify?.("pre-open",{realPath:o,identity:at(s)});let a=process.platform==="win32"?yi.O_RDONLY:yi.O_RDONLY|yi.O_NOFOLLOW|yi.O_NONBLOCK,c;try{c=await pe.open(i,a)}catch(l){throw l.code==="ELOOP"?new re("not-regular-file",`${n} must be a regular file`,{cause:l}):l}try{let[l,m,u]=await Promise.all([c.stat({bigint:r}),pe.lstat(i,{bigint:r}),pe.realpath(i)]);if(!l.isFile()||!m.isFile()||m.isSymbolicLink()||u!==o||!vi(s,l)||!vi(s,m))throw new re("changed",`${n} changed while opening`);await t.verify?.("post-open",{realPath:u,identity:at(l)}),await t.hooks?.afterOpen?.();let d=[],h=0,w=Buffer.allocUnsafe(Math.min(64*1024,e+1));for(;;){let v=e+1-h,{bytesRead:k}=await c.read(w,0,Math.min(w.length,v),null);if(k===0)break;if(h+=k,h>e)throw new re("too-large",`${n} exceeds ${e} bytes`);d.push(Buffer.from(w.subarray(0,k)))}await t.hooks?.beforeFinalCheck?.();let[f,p,g]=await Promise.all([c.stat({bigint:r}),pe.lstat(i,{bigint:r}),pe.realpath(i)]);if(!p.isFile()||p.isSymbolicLink()||g!==o||!vi(s,f)||!vi(s,p))throw new re("changed",`${n} changed while reading`);return await t.verify?.("post-read",{realPath:g,identity:at(f)}),{bytes:Buffer.concat(d,h),stat:f,realPath:g}}finally{await c.close()}}function xd(i){let e=i?.code;return e==="ENOENT"||e==="ENOTDIR"}function mr(i,e){let t=se.relative(i,e);return t===""||!se.isAbsolute(t)&&t!==".."&&!t.startsWith(`..${se.sep}`)}async function va(i,e){let t=se.resolve(i),n=await bi.lstat(t);if(!n.isDirectory()||n.isSymbolicLink())throw new Error(`${e} project root must be a real directory`);return bi.realpath(t)}async function ba(i,e,t,n){let r=i;for(let s=0;s<t.length;s++){r=se.join(r,t[s]);let o;try{o=await bi.lstat(r)}catch(m){if(xd(m))return{exists:!1,kind:"missing"};throw m}let a=se.relative(i,r).replaceAll("\\","/");if(o.isSymbolicLink())throw new Error(`${n.label} crosses a symbolic link or junction at ${a}`);let c=s===t.length-1;if(!c&&!o.isDirectory())throw new Error(`${n.label} ancestor ${a} must be a real directory`);if(c&&(n.expected==="file"&&!o.isFile()||n.expected==="directory"&&!o.isDirectory()||n.expected==="any"&&!o.isFile()&&!o.isDirectory()))throw new Error(`${n.label} must be a real ${n.expected}`);let l=await bi.realpath(r);if(!mr(e,l))throw new Error(`${n.label} resolves outside the project root`);if(c)return{exists:!0,kind:o.isFile()?"file":o.isDirectory()?"directory":"missing"}}return{exists:!0,kind:"directory"}}async function D(i,e,t){let n=rt(e,t.label),r=se.resolve(i),s=await va(r,t.label),o=n.split("/"),a=se.resolve(r,...o);if(!mr(r,a))throw new Error(`${t.label} must stay inside the project root`);let c=await ba(r,s,o,t);return{projectRoot:r,target:a,relative:n,exists:c.exists,kind:c.kind}}async function oe(i,e,t,n){let r=await D(i,e,{label:n.label,expected:"file"});if(!r.exists){let o=new Error(`${n.label} does not exist`);throw o.code="ENOENT",o}let s=await va(r.projectRoot,n.label);return ya(r.target,t,{...n,verify:async(o,a)=>{if(!mr(s,a.realPath))throw new Error(`${n.label} resolves outside the project root`);await ba(r.projectRoot,s,r.relative.split("/"),{label:n.label,expected:"file"})}})}var ct=".comet/config.yaml";function Id(i){let e=i?.code;return e==="ENOENT"||e==="ENOTDIR"}async function ki(i,e={}){return(await Si(i,e)).document}async function Rd(i){try{return(await oe(i,ct,wi,{label:ct})).bytes}catch(e){if(Id(e))return null;throw e}}function jd(i){return i?{exists:!0,sha256:Ad("sha256").update(i).digest("hex")}:{exists:!1,sha256:null}}async function Si(i,e={}){let t=await Rd(i);return{document:t?st(t.toString("utf8"),e):null,identity:jd(t)}}var ih=16*1024;var lt=class extends Error{code="classic-layout-unavailable";constructor(e="Classic artifact layout is unavailable from .comet/config.yaml"){super(e),this.name="ClassicLayoutUnavailableError"}},hr=class extends Error{constructor(t,n,r){let s=U(r,t),o=U(r,n);super(`Classic layout conflict: both ${s}/ and ${o}/ exist; run comet doctor and resolve the conflict before writing`);this.configuredRoot=t;this.alternateRoot=n;this.name="ClassicLayoutConflictError"}configuredRoot;alternateRoot;code="classic-layout-conflict"},Ca=".comet/config.yaml";function Wd(i){let e=i?.code;return e==="ENOENT"||e==="ENOTDIR"}async function Ea(i){await D(i,Ca,{label:Ca,expected:"file"})}function _a(i,e){let t=x.resolve(i),n=e==="docs"?x.join(t,"docs"):t,r=x.join(n,"openspec"),s=x.join(t,"docs","superpowers");return{projectRoot:t,artifactLayout:e,openSpecBase:n,openSpecRoot:r,changesDir:x.join(r,"changes"),archiveDir:x.join(r,"changes","archive"),specsDir:x.join(r,"specs"),superpowersRoot:s,superpowersSpecsDir:x.join(s,"specs"),superpowersPlansDir:x.join(s,"plans"),superpowersReportsDir:x.join(s,"reports")}}async function Fd(i){await Ea(i);let e=await ki(i,{allowPartialProject:!0});if(!e?.config)throw new lt;if(!(e.config.workflows??[e.config.default_workflow]).includes("classic"))throw new lt("Classic artifact layout is unavailable because Classic is not enabled");return e.classic?.artifact_layout??"legacy"}async function Bd(i,e){return _a(i,e??await Fd(i))}async function Kd(i,e){let t=await Bd(i,e),n=t.artifactLayout==="legacy"?"docs":"legacy",r=_a(i,n).openSpecRoot,[s,o]=await Promise.all([D(t.projectRoot,U(t.projectRoot,t.openSpecRoot),{label:"Configured Classic OpenSpec root",expected:"directory"}),D(t.projectRoot,U(t.projectRoot,r),{label:"Alternate Classic OpenSpec root",expected:"directory"})]),a=s.exists,c=o.exists;return{paths:t,configuredRootExists:a,alternateRoot:r,alternateRootExists:c,dualRoots:a&&c}}async function Yd(i,e){let t=[i.openSpecRoot,i.changesDir,i.archiveDir,i.specsDir,e,i.superpowersRoot,i.superpowersSpecsDir,i.superpowersPlansDir,i.superpowersReportsDir];for(let n of t){let r=U(i.projectRoot,n);await D(i.projectRoot,r,{label:`Classic managed physical path ${r}`,expected:"directory"})}}async function Pa(i,e,t={}){let n=await Kd(i,e);if(await Yd(n.paths,n.alternateRoot),n.dualRoots&&!t.allowAlternateRoot)throw new hr(n.paths.openSpecRoot,n.alternateRoot,n.paths.projectRoot);if(!n.configuredRootExists){let r=U(n.paths.projectRoot,n.paths.openSpecRoot),s=U(n.paths.projectRoot,n.alternateRoot);throw new lt(`Configured Classic OpenSpec root is missing: ${r} (alternate ${s} is ${n.alternateRootExists?"present":"missing"})`)}return n.paths}async function Na(i){let e=x.resolve(i),t=null;try{(await Md.lstat(e)).isDirectory()||(e=x.dirname(e))}catch(n){if(!Wd(n))throw n}for(;;){x.basename(e)==="openspec"&&(t=x.dirname(e));let n=x.join(e,".comet","config.yaml"),r=!1;if(await ar(n))try{await Ea(e);let o=(await ki(e))?.value;r=!!o&&typeof o=="object"&&!Array.isArray(o)&&(o.schema==="comet.project.v1"||o.default_workflow!==void 0||o.native!==void 0)}catch{}if(r||await ar(x.join(e,".git")))return e;let s=x.dirname(e);if(s===e)return t??x.resolve(i);e=s}}function U(i,e){return x.relative(x.resolve(i),e).replaceAll("\\","/")}import ut from"path";var Vd=2*1024*1024;function Oa(i,e,t){let n=ut.resolve(i),r=ut.isAbsolute(e)?ut.resolve(e):ut.resolve(n,e),s=ut.relative(n,r).replaceAll("\\","/");return{root:n,relative:rt(s,t),target:r}}async function ft(i,e,t){let n=Oa(i,e,t.label);return D(n.root,n.relative,t)}async function xa(i,e,t){return(await ft(i,e,{label:t.label,expected:t.expected??"any"})).exists}async function Aa(i,e,t){return(await Jd(i,e,t)).toString("utf8")}async function Jd(i,e,t){let n=Oa(i,e,t.label);return(await oe(n.root,n.relative,t.maxBytes??Vd,{label:t.label,hooks:t.hooks})).bytes}function wr(i){return i?/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/u.test(i)?i.includes("..")?"Change name cannot contain '..' (path traversal not allowed)":null:`Invalid change name: '${i}'
143
- Valid format: lowercase kebab-case (a-z, 0-9, single hyphens)`:"Change name cannot be empty"}function zd(i){let e=wr(i);if(e)throw new Error(e)}function Gd(i,e){return{label:U(i,e),directory:e}}async function gr(i,e,t){let n=Gd(i,e);if(!(await ft(i,e,{label:t,expected:"directory"})).exists)return{change:n,exists:!1,stateExists:!1};let s=await ft(i,Ei.join(e,".comet.yaml"),{label:`${t} state`,expected:"file"});return{change:n,exists:!0,stateExists:s.exists}}function Qd(i,e){let t=e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&");return new RegExp(`^\\d{4}-\\d{2}-\\d{2}-${t}$`,"u").test(i)}async function Xd(i,e,t,n={}){if(!n.skipExactCompatibility){let o=await gr(i,Ei.join(e,t),`Classic archived change ${t}`);if(o.exists)return o.change}if(!(await ft(i,e,{label:"Classic archive directory",expected:"directory"})).exists)return null;let s=[];for(let o of await Hd.readdir(e,{withFileTypes:!0})){if(!Qd(o.name,t))continue;let a=await gr(i,Ei.join(e,o.name),`Classic archived change ${o.name}`);a.exists&&a.stateExists&&s.push(a.change)}return s.sort((o,a)=>a.directory.localeCompare(o.directory))[0]??null}async function Ia(i,e=process.cwd()){zd(i);let t=await Pa(e),n=await gr(t.projectRoot,Ei.join(t.changesDir,i),`Classic active change ${i}`);if(n.exists)return n.change;let r=await Xd(t.projectRoot,t.archiveDir,i);return r||n.change}var bg=256*1024;var yr=["workflow","language","phase","context_compression","build_mode","build_pause","subagent_dispatch","tdd_mode","review_mode","isolation","bound_branch","verify_mode","auto_transition","base_ref","design_doc","plan","verify_result","verify_failures","verification_report","branch_status","created_at","verified_at","archive_confirmation","archived","direct_override","handoff_context","handoff_hash","classic_profile","classic_migration"],vr=["run_id"],Eg=new Set([...yr,...vr]);import{AsyncLocalStorage as sp}from"async_hooks";import{promises as Ra}from"fs";import dt from"path";var br=new sp;function op(i,e){let t=dt.relative(i,e);return t===""||!dt.isAbsolute(t)&&t!==".."&&!t.startsWith(`..${dt.sep}`)}async function ap(i){let e=dt.resolve(i.invocationCwd??process.cwd()),t=dt.resolve(i.projectRoot??await Na(e)),[n,r]=await Promise.all([Ra.realpath(e),Ra.realpath(t)]);if(!op(r,n))throw new Error(`Classic command invocation cwd is outside the discovered project: ${e}`);return{invocationCwd:e,projectRoot:t}}async function ja(i,e){let t=br.getStore();if(t)return e(t);let n=await ap(i);return br.run(n,()=>e(n))}function Ta(){let i=br.getStore();if(!i)throw new Error("Classic command project context is unavailable");return i.projectRoot}var cp="\x1B[32m",pt="\x1B[31m",lp="\x1B[33m",up="\x1B[0m",fp=["workflow","phase","design_doc","plan","build_mode","isolation","verify_mode","verify_result","verified_at","archived"],dp={workflow:["full","hotfix","tweak"],language:["en","zh-CN"],phase:["open","design","build","verify","archive"],context_compression:["off","beta"],build_mode:["subagent-driven-development","executing-plans","direct"],build_pause:["plan-ready"],subagent_dispatch:["confirmed"],tdd_mode:["tdd","direct"],review_mode:["off","standard","thorough"],isolation:["current","branch","worktree"],verify_mode:["light","full"],auto_transition:["true","false"],verify_result:["pending","pass","fail"],branch_status:["pending","handled"],archive_confirmation:["pending","confirmed"],archived:["true","false"],direct_override:["true","false"],classic_profile:["full","hotfix","tweak"],classic_migration:["1"]},pp=new Set([...yr,...vr,"classic_profile","classic_migration"]);function me(i,e){return`${i}${e}${up}`}function mt(i){return i==null?"":typeof i=="object"?JSON.stringify(i):String(i)}var La=async(i,e)=>ja(e,async()=>{let t=i[0],n=wr(t);if(n)return{exitCode:1,stderr:me(pt,`ERROR: ${n}`)};let r=Ta(),{directory:s,label:o}=await Ia(t,r),a=qa.join(s,".comet.yaml"),c=[`[VALIDATE] ${o}/.comet.yaml`],l=0,m=0,u=p=>{l+=1,c.push(me(pt,` FAIL: ${p}`))},d=p=>{m+=1,c.push(me(lp,` WARN: ${p}`))},h;try{h=await Aa(r,a,{label:`Classic state ${o}/.comet.yaml`})}catch(p){if(p.code==="ENOENT")return u(".comet.yaml does not exist"),c.push("",me(pt,`${l} error(s), ${m} warning(s) — validation FAILED`)),{exitCode:1,stderr:c.join(`
144
- `)};throw p}let w=(0,ht.parseDocument)(h);if(w.errors.length>0||!(0,ht.isMap)(w.contents)){for(let p of w.errors)u(p.message);return(0,ht.isMap)(w.contents)||u("document root must be a mapping"),c.push("",me(pt,`${l} error(s), ${m} warning(s) — validation FAILED`)),{exitCode:1,stderr:c.join(`
145
- `)}}let f=w.toJS();for(let p of fp)Object.prototype.hasOwnProperty.call(f,p)||u(`missing required field '${p}'`);for(let[p,g]of Object.entries(dp)){if(!Object.prototype.hasOwnProperty.call(f,p))continue;let v=mt(f[p]);if(!v){p==="auto_transition"&&u(`${p}='' is not valid. Expected: ${g.join(" ")}`);continue}g.includes(v)||u(`${p}='${v}' is not valid. Expected: ${g.join(" ")}`)}if(Object.prototype.hasOwnProperty.call(f,"bound_branch")){let p=f.bound_branch;p!==null&&typeof p!="string"&&u(`bound_branch='${mt(p)}' is not a string or null`)}if(Object.prototype.hasOwnProperty.call(f,"verify_failures")){let p=f.verify_failures;(typeof p!="number"||!Number.isInteger(p)||p<0)&&u(`verify_failures='${mt(p)}' is not a non-negative integer`)}for(let p of["design_doc","plan","handoff_context","verification_report"]){let g=mt(f[p]);if(g){if(/^(?:[A-Za-z]:|[\\/]|~)/u.test(g)||g.split(/[\\/]/u).includes("..")){u(`${p}='${g}' must be a relative repository path`);continue}try{await xa(r,qa.resolve(r,g),{label:`${p} artifact pointer`,expected:"file"})||u(`${p}='${g}' does not exist on disk`)}catch(v){u(`${p}='${g}' is unsafe: ${v instanceof Error?v.message:String(v)}`)}}}for(let p of["handoff_hash"]){let g=mt(f[p]);g&&!/^[a-f0-9]{64}$/u.test(g)&&u(`${p}='${g}' is not a sha256 hex digest`)}for(let p of Object.keys(f))pp.has(p)||d(`unknown field '${p}' found`);return c.push(""),l>0?(c.push(me(pt,`${l} error(s), ${m} warning(s) — validation FAILED`)),{exitCode:1,stderr:c.join(`
146
- `)}):(c.push(me(cp,`0 errors, ${m} warning(s) — validation PASSED`)),{exitCode:0,stderr:c.join(`
147
- `)})});function mp(i,e){return{exitCode:e.exitCode,stdout:JSON.stringify({command:i,exitCode:e.exitCode,...e.stdout===void 0?{}:{stdout:e.stdout},...e.stderr===void 0?{}:{stderr:e.stderr}})+`
148
- `}}async function Da(i,e,t=process.argv.slice(2)){let n=t.includes("--json"),r=t.filter(a=>a!=="--json"),s;try{s=await e(r,{json:n})}catch(a){s={exitCode:70,stderr:a instanceof Error?a.message:String(a)}}let o=n?mp(i,s):s;return o.stdout&&process.stdout.write(o.stdout),o.stderr&&process.stderr.write(o.stderr+(o.stderr.endsWith(`
142
+ `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=hn(e),i=Pe(t);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=hn(e),i=Pe(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};aa.Parser=sr});var da=y(it=>{"use strict";var ca=Ji(),ed=He(),nt=Qe(),td=Yn(),nd=_(),id=rr(),la=or();function ua(n){let e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new id.LineCounter||null,prettyErrors:e}}function rd(n,e={}){let{lineCounter:t,prettyErrors:i}=ua(e),r=new la.Parser(t?.addNewLine),s=new ca.Composer(e),o=Array.from(s.compose(r.parse(n)));if(i&&t)for(let a of o)a.errors.forEach(nt.prettifyError(n,t)),a.warnings.forEach(nt.prettifyError(n,t));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function fa(n,e={}){let{lineCounter:t,prettyErrors:i}=ua(e),r=new la.Parser(t?.addNewLine),s=new ca.Composer(e),o=null;for(let a of s.compose(r.parse(n),!0,n.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new nt.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&t&&(o.errors.forEach(nt.prettifyError(n,t)),o.warnings.forEach(nt.prettifyError(n,t))),o}function sd(n,e,t){let i;typeof e=="function"?i=e:t===void 0&&e&&typeof e=="object"&&(t=e);let r=fa(n,t);if(!r)return null;if(r.warnings.forEach(s=>td.warn(r.options.logLevel,s)),r.errors.length>0){if(r.options.logLevel!=="silent")throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:i},t))}function od(n,e,t){let i=null;if(typeof e=="function"||Array.isArray(e)?i=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let r=Math.round(t);t=r<1?void 0:r>8?{indent:8}:{indent:r}}if(n===void 0){let{keepUndefined:r}=t??e??{};if(!r)return}return nd.isDocument(n)&&!i?n.toString(t):new ed.Document(n,i,t).toString(t)}it.parse=sd;it.parseAllDocuments=rd;it.parseDocument=fa;it.stringify=od});var yn=y(P=>{"use strict";var ad=Ji(),cd=He(),ld=Pi(),ar=Qe(),ud=Re(),ie=_(),fd=X(),dd=O(),pd=ee(),md=te(),hd=pn(),gd=nr(),wd=rr(),yd=or(),wn=da(),pa=Oe();P.Composer=ad.Composer;P.Document=cd.Document;P.Schema=ld.Schema;P.YAMLError=ar.YAMLError;P.YAMLParseError=ar.YAMLParseError;P.YAMLWarning=ar.YAMLWarning;P.Alias=ud.Alias;P.isAlias=ie.isAlias;P.isCollection=ie.isCollection;P.isDocument=ie.isDocument;P.isMap=ie.isMap;P.isNode=ie.isNode;P.isPair=ie.isPair;P.isScalar=ie.isScalar;P.isSeq=ie.isSeq;P.Pair=fd.Pair;P.Scalar=dd.Scalar;P.YAMLMap=pd.YAMLMap;P.YAMLSeq=md.YAMLSeq;P.CST=hd;P.Lexer=gd.Lexer;P.LineCounter=wd.LineCounter;P.Parser=yd.Parser;P.parse=wn.parse;P.parseAllDocuments=wn.parseAllDocuments;P.parseDocument=wn.parseDocument;P.stringify=wn.stringify;P.visit=pa.visit;P.visitAsync=pa.visitAsync});var wt=Nn(yn(),1);import La from"path";import{promises as Gd}from"fs";import Pn from"path";import{promises as Md}from"fs";import x from"path";import{promises as vd}from"fs";async function cr(n){try{return await vd.access(n),!0}catch(e){if(bd(e))return!1;throw e}}function bd(n){let e=n?.code;return e==="ENOENT"||e==="ENOTDIR"}var dr=Nn(yn(),1);import vn from"path";var st=64*1024,ur=1024,fr=64,kd=5,Sd=[".agents/skills/**",".amazonq/skills/**",".augment/skills/**",".bob/skills/**",".claude/skills/**",".cline/skills/**",".codebuddy/skills/**",".continue/skills/**",".cospec/skills/**",".crush/skills/**",".cursor/skills/**",".factory/skills/**",".forge/skills/**",".gemini/skills/**",".github/skills/**",".iflow/skills/**",".junie/skills/**",".kilocode/skills/**",".kimi-code/skills/**",".kiro/skills/**",".lingma/skills/**",".mimocode/skills/**",".opencode/skills/**",".pi/skills/**",".qoder/skills/**",".qwen/skills/**",".roo/skills/**",".trae-cn/skills/**",".trae/skills/**",".windsurf/skills/**",".zcode/skills/**"],Y={include:["**/*"],exclude:[...Sd],max_files:1e4,max_total_bytes:256*1024*1024,max_duration_ms:6e4};function Cd(n,e){if(typeof n!="string")throw new Error(`${e} must be a string`);let t=n.trim();if(t.length===0||vn.posix.isAbsolute(t)||vn.win32.isAbsolute(t)||/^(?:~|[\\/])/u.test(t))throw new Error(`${e} must be a project-relative path`);if(t===".")return[];let i=t.replaceAll("\\","/").split("/");if(i.some(r=>r===".."))throw new Error(`${e} must stay inside the project root`);if(i.some(r=>r===""||r==="."))throw new Error(`${e} must not contain empty or dot path segments`);return i}function bn(n){let e=Cd(n,"native.artifact_root");return e.length===0?".":e.join("/")}function ha(n,e="docs"){let t=n??e;if(t!=="legacy"&&t!=="docs")throw new Error("classic.artifact_layout must be legacy or docs");return t}function ot(n,e,t=!1){if(typeof n!="string")throw new Error(`${e} must be a string`);let i=n.trim().replaceAll("\\","/");if(i.length===0||vn.posix.isAbsolute(i)||vn.win32.isAbsolute(i)||/^(?:~|[\\/])/u.test(i))throw new Error(`${e} must be relative to its declared path base`);let r=i.split("/");if(r.some(s=>s===".."))throw new Error(`${e} must stay inside its declared path base`);if(r.some(s=>s===""||s==="."))throw new Error(`${e} must not contain empty or dot path segments`);if(!t&&/[*?]/u.test(i))throw new Error(`${e} cannot contain wildcards`);return r.join("/")}function rt(n,e){if(!n||typeof n!="object"||Array.isArray(n))throw new Error(`${e} must be a mapping`);return n}function ga(n,e,t){let i=n??e;if(i!=="en"&&i!=="zh-CN")throw new Error(`${t} must be en or zh-CN`);return i}function wa(n,e){if(typeof n!="string"||n.length===0||n.includes("\\")||n.includes("\0")||n.startsWith("/")||n.split("/").includes(".."))throw new Error(`${e} contains an unsafe pattern`);if(n.length>ur)throw new Error(`${e} exceeds ${ur} characters`);let t=0;for(let i=0;i<n.length;i+=1)n[i]==="?"?t+=1:n[i]==="*"&&(t+=1,n[i+1]==="*"&&(i+=1));if(t>fr)throw new Error(`${e} contains more than ${fr} wildcard tokens`);return n}function ma(n,e,t){if(n===void 0)return[...t];if(!Array.isArray(n))throw new Error(`${e} contains an unsafe pattern`);return[...new Set(n.map(i=>wa(i,e)))].sort((i,r)=>i.localeCompare(r,"en"))}function lr(n,e,t){let i=n??e;if(!Number.isSafeInteger(i)||i<1)throw new Error(`${t} must be a positive integer`);return i}function Ed(n){if(n===void 0)return{...Y,include:[...Y.include],exclude:[...Y.exclude]};let e=rt(n,"native.snapshot");return{include:ma(e.include,"native.snapshot.include",Y.include),exclude:ma(e.exclude,"native.snapshot.exclude",Y.exclude),max_files:lr(e.max_files,Y.max_files,"native.snapshot.max_files"),max_total_bytes:lr(e.max_total_bytes,Y.max_total_bytes,"native.snapshot.max_total_bytes"),max_duration_ms:lr(e.max_duration_ms,Y.max_duration_ms,"native.snapshot.max_duration_ms")}}function _d(n){if(n===void 0)return;let e=rt(n,"native.pending_root_move"),t=e.id,i=e.from_artifact_root,r=e.to_artifact_root,s=e.stage;if(typeof t!="string"||!/^[a-f0-9-]{8,}$/u.test(t))throw new Error("native.pending_root_move.id is invalid");if(typeof i!="string"||typeof r!="string")throw new Error("native.pending_root_move roots must be strings");if(s!=="copying"&&s!=="ready"&&s!=="switched")throw new Error("native.pending_root_move.stage is invalid");let o;if(e.cleanup!==void 0){let a=rt(e.cleanup,"native.pending_root_move.cleanup"),c=a.kind,l=a.state,m=a.manifest_hash;if(c!=="forward-source"&&c!=="restart-staging"&&c!=="rollback-destination"&&c!=="rollback-staging")throw new Error("native.pending_root_move.cleanup.kind is invalid");if(l!=="prepared"&&l!=="quarantined"&&l!=="deleting")throw new Error("native.pending_root_move.cleanup.state is invalid");if(typeof m!="string"||!/^[a-f0-9]{64}$/u.test(m))throw new Error("native.pending_root_move.cleanup.manifest_hash is invalid");o={kind:c,state:l,manifestHash:m}}return{id:t,fromArtifactRoot:bn(i),toArtifactRoot:bn(r),stage:s,...o?{cleanup:o}:{}}}function Pd(n,e={}){let t=rt(n,"native"),i=t.artifact_root??(e.allowMissingArtifactRoot?"docs":void 0);if(typeof i!="string")throw new Error("native.artifact_root must be a string");let r=t.clarification_mode??"sequential";if(r!=="sequential"&&r!=="batch")throw new Error("native.clarification_mode must be sequential or batch");let s=t.archive_confirmation??"automatic";if(s!=="automatic"&&s!=="required")throw new Error("native.archive_confirmation must be automatic or required");let o=t.max_verify_failures??kd;if(!Number.isSafeInteger(o)||o<1)throw new Error("native.max_verify_failures must be a positive integer");let a=_d(t.pending_root_move);return{artifact_root:bn(i),language:ga(t.language,"en","native.language"),clarification_mode:r,archive_confirmation:s,max_verify_failures:o,snapshot:Ed(t.snapshot),...a?{pending_root_move:a}:{}}}function Nd(n){let e=rt(n,"classic"),t=e.context_compression??"off";if(t!=="off"&&t!=="beta")throw new Error("classic.context_compression must be off or beta");let i=e.review_mode??"standard";if(i!=="off"&&i!=="standard"&&i!=="thorough")throw new Error("classic.review_mode must be off, standard, or thorough");let r=e.auto_transition??!0;if(typeof r!="boolean")throw new Error("classic.auto_transition must be true or false");return{artifact_layout:ha(e.artifact_layout),language:ga(e.language,"zh-CN","classic.language"),context_compression:t,review_mode:i,auto_transition:r}}function Od(n){let e=n??!0;if(typeof e!="boolean")throw new Error("ambient_resume must be true or false");return e}function xd(n,e,t,i,r){let s=n.schema!==void 0;if(!(s||n.default_workflow!==void 0||n.workflows!==void 0||!r.allowPartialProject&&n.native!==void 0)||r.allowPartialProject&&!s)return null;if(n.schema!=="comet.project.v1")throw new Error("Unsupported Comet project schema");if(n.default_workflow!=="native"&&n.default_workflow!=="classic")throw new Error("default_workflow must be native or classic");let a=n.workflows??[n.default_workflow];if(!Array.isArray(a)||a.length===0||a.some(l=>l!=="native"&&l!=="classic"))throw new Error("workflows must contain native and/or classic");let c=[...new Set(a)];if(!c.includes(n.default_workflow))throw new Error("workflows must include default_workflow");if(c.includes("native")&&!e)throw new Error("native must be a mapping");return{schema:"comet.project.v1",default_workflow:n.default_workflow,workflows:c,ambient_resume:i,...e?{native:e}:{},...t?{classic:t}:{}}}function Ne(n,e={}){let t=(0,dr.parseDocument)(n,{uniqueKeys:!0});if(t.errors.length>0)throw new Error(`Invalid .comet/config.yaml: ${t.errors[0].message}`);let i=t.toJS();if(i==null)return{value:{},config:null,ambient_resume:!0};if(typeof i!="object"||Array.isArray(i))throw new Error("Invalid .comet/config.yaml: root must be a mapping");let r=i,s=Od(r.ambient_resume),o=r.native===void 0?void 0:Pd(r.native,{allowMissingArtifactRoot:e.allowMissingNativeFields}),a=r.classic===void 0?void 0:Nd(r.classic),c=xd(r,o,a,s,{allowPartialProject:e.allowPartialProject??!1});return{value:r,config:c,ambient_resume:s,...o?{native:o}:{},...a?{classic:a}:{}}}import{createHash as Id}from"crypto";import{promises as Cn}from"fs";import oe from"path";import{constants as kn,promises as pe}from"fs";function re(n){return n!==0&&n!==0n&&n!=="0"}function pr(n,e){return re(n.dev)&&re(e.dev)&&re(n.ino)&&re(e.ino)}function at(n,e){let t=re(n.dev)&&re(e.dev);if(t&&n.dev!==e.dev)return!1;let i=re(n.ino)&&re(e.ino);return i&&n.ino!==e.ino?!1:t&&i?!0:n.birthtime===e.birthtime}var se=class extends Error{reason;constructor(e,t,i){super(t,i),this.name="RaceSafeReadError",this.reason=e}};function mr(n){return"birthtimeNs"in n&&typeof n.birthtimeNs=="bigint"?n.birthtimeNs:n.birthtimeMs}function ya(n){return"ctimeNs"in n&&typeof n.ctimeNs=="bigint"?n.ctimeNs:n.ctimeMs}function ct(n){return{dev:n.dev,ino:n.ino,birthtime:mr(n)}}function Sn(n,e){let t=ct(n),i=ct(e);return pr(t,i)?at(t,i):at(t,i)&&mr(n)===mr(e)&&ya(n)===ya(e)&&n.size===e.size}async function va(n,e,t={}){if(!Number.isSafeInteger(e)||e<1)throw new Error("race-safe read byte limit must be a positive integer");let i=t.label??"file",r=t.bigint===!0,s=await pe.lstat(n,{bigint:r});if(!s.isFile()||s.isSymbolicLink())throw new se("not-regular-file",`${i} must be a regular file`);if(BigInt(s.size)>BigInt(e))throw new se("too-large",`${i} exceeds ${e} bytes`);let o=await pe.realpath(n);await t.verify?.("pre-open",{realPath:o,identity:ct(s)});let a=process.platform==="win32"?kn.O_RDONLY:kn.O_RDONLY|kn.O_NOFOLLOW|kn.O_NONBLOCK,c;try{c=await pe.open(n,a)}catch(l){throw l.code==="ELOOP"?new se("not-regular-file",`${i} must be a regular file`,{cause:l}):l}try{let[l,m,u]=await Promise.all([c.stat({bigint:r}),pe.lstat(n,{bigint:r}),pe.realpath(n)]);if(!l.isFile()||!m.isFile()||m.isSymbolicLink()||u!==o||!Sn(s,l)||!Sn(s,m))throw new se("changed",`${i} changed while opening`);await t.verify?.("post-open",{realPath:u,identity:ct(l)}),await t.hooks?.afterOpen?.();let d=[],h=0,w=Buffer.allocUnsafe(Math.min(64*1024,e+1));for(;;){let v=e+1-h,{bytesRead:k}=await c.read(w,0,Math.min(w.length,v),null);if(k===0)break;if(h+=k,h>e)throw new se("too-large",`${i} exceeds ${e} bytes`);d.push(Buffer.from(w.subarray(0,k)))}await t.hooks?.beforeFinalCheck?.();let[f,p,g]=await Promise.all([c.stat({bigint:r}),pe.lstat(n,{bigint:r}),pe.realpath(n)]);if(!p.isFile()||p.isSymbolicLink()||g!==o||!Sn(s,f)||!Sn(s,p))throw new se("changed",`${i} changed while reading`);return await t.verify?.("post-read",{realPath:g,identity:ct(f)}),{bytes:Buffer.concat(d,h),stat:f,realPath:g}}finally{await c.close()}}function Ad(n){let e=n?.code;return e==="ENOENT"||e==="ENOTDIR"}function hr(n,e){let t=oe.relative(n,e);return t===""||!oe.isAbsolute(t)&&t!==".."&&!t.startsWith(`..${oe.sep}`)}async function ba(n,e){let t=oe.resolve(n),i=await Cn.lstat(t);if(!i.isDirectory()||i.isSymbolicLink())throw new Error(`${e} project root must be a real directory`);return Cn.realpath(t)}async function ka(n,e,t,i){let r=n;for(let s=0;s<t.length;s++){r=oe.join(r,t[s]);let o;try{o=await Cn.lstat(r)}catch(m){if(Ad(m))return{exists:!1,kind:"missing"};throw m}let a=oe.relative(n,r).replaceAll("\\","/");if(o.isSymbolicLink())throw new Error(`${i.label} crosses a symbolic link or junction at ${a}`);let c=s===t.length-1;if(!c&&!o.isDirectory())throw new Error(`${i.label} ancestor ${a} must be a real directory`);if(c&&(i.expected==="file"&&!o.isFile()||i.expected==="directory"&&!o.isDirectory()||i.expected==="any"&&!o.isFile()&&!o.isDirectory()))throw new Error(`${i.label} must be a real ${i.expected}`);let l=await Cn.realpath(r);if(!hr(e,l))throw new Error(`${i.label} resolves outside the project root`);if(c)return{exists:!0,kind:o.isFile()?"file":o.isDirectory()?"directory":"missing"}}return{exists:!0,kind:"directory"}}async function D(n,e,t){let i=ot(e,t.label),r=oe.resolve(n),s=await ba(r,t.label),o=i.split("/"),a=oe.resolve(r,...o);if(!hr(r,a))throw new Error(`${t.label} must stay inside the project root`);let c=await ka(r,s,o,t);return{projectRoot:r,target:a,relative:i,exists:c.exists,kind:c.kind}}async function U(n,e,t,i){let r=await D(n,e,{label:i.label,expected:"file"});if(!r.exists){let o=new Error(`${i.label} does not exist`);throw o.code="ENOENT",o}let s=await ba(r.projectRoot,i.label);return va(r.target,t,{...i,verify:async(o,a)=>{if(!hr(s,a.realPath))throw new Error(`${i.label} resolves outside the project root`);await ka(r.projectRoot,s,r.relative.split("/"),{label:i.label,expected:"file"})}})}var lt=".comet/config.yaml";function Rd(n){let e=n?.code;return e==="ENOENT"||e==="ENOTDIR"}async function En(n,e={}){return(await _n(n,e)).document}async function jd(n){try{return(await U(n,lt,st,{label:lt})).bytes}catch(e){if(Rd(e))return null;throw e}}function Td(n){return n?{exists:!0,sha256:Id("sha256").update(n).digest("hex")}:{exists:!1,sha256:null}}async function _n(n,e={}){let t=await jd(n);return{document:t?Ne(t.toString("utf8"),e):null,identity:Td(t)}}var sh=16*1024;var ft=class extends Error{code="classic-layout-unavailable";constructor(e="Classic artifact layout is unavailable from .comet/config.yaml"){super(e),this.name="ClassicLayoutUnavailableError"}},wr=class extends Error{constructor(t,i,r){let s=J(r,t),o=J(r,i);super(`Classic layout conflict: both ${s}/ and ${o}/ exist; run comet doctor and resolve the conflict before writing`);this.configuredRoot=t;this.alternateRoot=i;this.name="ClassicLayoutConflictError"}configuredRoot;alternateRoot;code="classic-layout-conflict"},Ea=".comet/config.yaml";function Fd(n){let e=n?.code;return e==="ENOENT"||e==="ENOTDIR"}async function _a(n){await D(n,Ea,{label:Ea,expected:"file"})}function Pa(n,e){let t=x.resolve(n),i=e==="docs"?x.join(t,"docs"):t,r=x.join(i,"openspec"),s=x.join(t,"docs","superpowers");return{projectRoot:t,artifactLayout:e,openSpecBase:i,openSpecRoot:r,changesDir:x.join(r,"changes"),archiveDir:x.join(r,"changes","archive"),specsDir:x.join(r,"specs"),superpowersRoot:s,superpowersSpecsDir:x.join(s,"specs"),superpowersPlansDir:x.join(s,"plans"),superpowersReportsDir:x.join(s,"reports")}}async function Bd(n){await _a(n);let e=await En(n,{allowPartialProject:!0,allowMissingNativeFields:!0});if(!e?.config)throw new ft;if(!(e.config.workflows??[e.config.default_workflow]).includes("classic"))throw new ft("Classic artifact layout is unavailable because Classic is not enabled");return e.classic?.artifact_layout??"legacy"}async function Kd(n,e){return Pa(n,e??await Bd(n))}async function Yd(n,e){let t=await Kd(n,e),i=t.artifactLayout==="legacy"?"docs":"legacy",r=Pa(n,i).openSpecRoot,[s,o]=await Promise.all([D(t.projectRoot,J(t.projectRoot,t.openSpecRoot),{label:"Configured Classic OpenSpec root",expected:"directory"}),D(t.projectRoot,J(t.projectRoot,r),{label:"Alternate Classic OpenSpec root",expected:"directory"})]),a=s.exists,c=o.exists;return{paths:t,configuredRootExists:a,alternateRoot:r,alternateRootExists:c,dualRoots:a&&c}}async function Ud(n,e){let t=[n.openSpecRoot,n.changesDir,n.archiveDir,n.specsDir,e,n.superpowersRoot,n.superpowersSpecsDir,n.superpowersPlansDir,n.superpowersReportsDir];for(let i of t){let r=J(n.projectRoot,i);await D(n.projectRoot,r,{label:`Classic managed physical path ${r}`,expected:"directory"})}}async function Na(n,e,t={}){let i=await Yd(n,e);if(await Ud(i.paths,i.alternateRoot),i.dualRoots&&!t.allowAlternateRoot)throw new wr(i.paths.openSpecRoot,i.alternateRoot,i.paths.projectRoot);if(!i.configuredRootExists){let r=J(i.paths.projectRoot,i.paths.openSpecRoot),s=J(i.paths.projectRoot,i.alternateRoot);throw new ft(`Configured Classic OpenSpec root is missing: ${r} (alternate ${s} is ${i.alternateRootExists?"present":"missing"})`)}return i.paths}async function Oa(n){let e=x.resolve(n),t=null;try{(await Md.lstat(e)).isDirectory()||(e=x.dirname(e))}catch(i){if(!Fd(i))throw i}for(;;){x.basename(e)==="openspec"&&(t=x.dirname(e));let i=x.join(e,".comet","config.yaml"),r=!1;if(await cr(i))try{await _a(e);let o=(await En(e))?.value;r=!!o&&typeof o=="object"&&!Array.isArray(o)&&(o.schema==="comet.project.v1"||o.default_workflow!==void 0||o.native!==void 0)}catch{}if(r||await cr(x.join(e,".git")))return e;let s=x.dirname(e);if(s===e)return t??x.resolve(n);e=s}}function J(n,e){return x.relative(x.resolve(n),e).replaceAll("\\","/")}import dt from"path";var Vd=2*1024*1024;function xa(n,e,t){let i=dt.resolve(n),r=dt.isAbsolute(e)?dt.resolve(e):dt.resolve(i,e),s=dt.relative(i,r).replaceAll("\\","/");return{root:i,relative:ot(s,t),target:r}}async function pt(n,e,t){let i=xa(n,e,t.label);return D(i.root,i.relative,t)}async function Aa(n,e,t){return(await pt(n,e,{label:t.label,expected:t.expected??"any"})).exists}async function Ia(n,e,t){return(await Hd(n,e,t)).toString("utf8")}async function Hd(n,e,t){let i=xa(n,e,t.label);return(await U(i.root,i.relative,t.maxBytes??Vd,{label:t.label,hooks:t.hooks})).bytes}function vr(n){return n?/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/u.test(n)?n.includes("..")?"Change name cannot contain '..' (path traversal not allowed)":null:`Invalid change name: '${n}'
143
+ Valid format: lowercase kebab-case (a-z, 0-9, single hyphens)`:"Change name cannot be empty"}function zd(n){let e=vr(n);if(e)throw new Error(e)}function Qd(n,e){return{label:J(n,e),directory:e}}async function yr(n,e,t){let i=Qd(n,e);if(!(await pt(n,e,{label:t,expected:"directory"})).exists)return{change:i,exists:!1,stateExists:!1};let s=await pt(n,Pn.join(e,".comet.yaml"),{label:`${t} state`,expected:"file"});return{change:i,exists:!0,stateExists:s.exists}}function Xd(n,e){let t=e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&");return new RegExp(`^\\d{4}-\\d{2}-\\d{2}-${t}$`,"u").test(n)}async function Zd(n,e,t,i={}){if(!i.skipExactCompatibility){let o=await yr(n,Pn.join(e,t),`Classic archived change ${t}`);if(o.exists)return o.change}if(!(await pt(n,e,{label:"Classic archive directory",expected:"directory"})).exists)return null;let s=[];for(let o of await Gd.readdir(e,{withFileTypes:!0})){if(!Xd(o.name,t))continue;let a=await yr(n,Pn.join(e,o.name),`Classic archived change ${o.name}`);a.exists&&a.stateExists&&s.push(a.change)}return s.sort((o,a)=>a.directory.localeCompare(o.directory))[0]??null}async function Ra(n,e=process.cwd()){zd(n);let t=await Na(e),i=await yr(t.projectRoot,Pn.join(t.changesDir,n),`Classic active change ${n}`);if(i.exists)return i.change;let r=await Zd(t.projectRoot,t.archiveDir,n);return r||i.change}var op=Nn(yn(),1);var jg=256*1024;var br=["workflow","language","phase","context_compression","build_mode","build_pause","subagent_dispatch","tdd_mode","review_mode","isolation","bound_branch","verify_mode","auto_transition","base_ref","design_doc","plan","verify_result","verify_failures","verification_report","branch_status","created_at","verified_at","archive_confirmation","archived","direct_override","handoff_context","handoff_hash","classic_profile","classic_migration"],kr=["run_id"],Dg=new Set([...br,...kr]);import{AsyncLocalStorage as cp}from"async_hooks";import{promises as ja}from"fs";import mt from"path";var Sr=new cp;function lp(n,e){let t=mt.relative(n,e);return t===""||!mt.isAbsolute(t)&&t!==".."&&!t.startsWith(`..${mt.sep}`)}async function up(n){let e=mt.resolve(n.invocationCwd??process.cwd()),t=mt.resolve(n.projectRoot??await Oa(e)),[i,r]=await Promise.all([ja.realpath(e),ja.realpath(t)]);if(!lp(r,i))throw new Error(`Classic command invocation cwd is outside the discovered project: ${e}`);return{invocationCwd:e,projectRoot:t}}async function Ta(n,e){let t=Sr.getStore();if(t)return e(t);let i=await up(n);return Sr.run(i,()=>e(i))}function qa(){let n=Sr.getStore();if(!n)throw new Error("Classic command project context is unavailable");return n.projectRoot}var fp="\x1B[32m",ht="\x1B[31m",dp="\x1B[33m",pp="\x1B[0m",mp=["workflow","phase","design_doc","plan","build_mode","isolation","verify_mode","verify_result","verified_at","archived"],hp={workflow:["full","hotfix","tweak"],language:["en","zh-CN"],phase:["open","design","build","verify","archive"],context_compression:["off","beta"],build_mode:["subagent-driven-development","executing-plans","direct"],build_pause:["plan-ready"],subagent_dispatch:["confirmed"],tdd_mode:["tdd","direct"],review_mode:["off","standard","thorough"],isolation:["current","branch","worktree"],verify_mode:["light","full"],auto_transition:["true","false"],verify_result:["pending","pass","fail"],branch_status:["pending","handled"],archive_confirmation:["pending","confirmed"],archived:["true","false"],direct_override:["true","false"],classic_profile:["full","hotfix","tweak"],classic_migration:["1"]},gp=new Set([...br,...kr,"classic_profile","classic_migration"]);function me(n,e){return`${n}${e}${pp}`}function gt(n){return n==null?"":typeof n=="object"?JSON.stringify(n):String(n)}var Da=async(n,e)=>Ta(e,async()=>{let t=n[0],i=vr(t);if(i)return{exitCode:1,stderr:me(ht,`ERROR: ${i}`)};let r=qa(),{directory:s,label:o}=await Ra(t,r),a=La.join(s,".comet.yaml"),c=[`[VALIDATE] ${o}/.comet.yaml`],l=0,m=0,u=p=>{l+=1,c.push(me(ht,` FAIL: ${p}`))},d=p=>{m+=1,c.push(me(dp,` WARN: ${p}`))},h;try{h=await Ia(r,a,{label:`Classic state ${o}/.comet.yaml`})}catch(p){if(p.code==="ENOENT")return u(".comet.yaml does not exist"),c.push("",me(ht,`${l} error(s), ${m} warning(s) — validation FAILED`)),{exitCode:1,stderr:c.join(`
144
+ `)};throw p}let w=(0,wt.parseDocument)(h);if(w.errors.length>0||!(0,wt.isMap)(w.contents)){for(let p of w.errors)u(p.message);return(0,wt.isMap)(w.contents)||u("document root must be a mapping"),c.push("",me(ht,`${l} error(s), ${m} warning(s) — validation FAILED`)),{exitCode:1,stderr:c.join(`
145
+ `)}}let f=w.toJS();for(let p of mp)Object.prototype.hasOwnProperty.call(f,p)||u(`missing required field '${p}'`);for(let[p,g]of Object.entries(hp)){if(!Object.prototype.hasOwnProperty.call(f,p))continue;let v=gt(f[p]);if(!v){p==="auto_transition"&&u(`${p}='' is not valid. Expected: ${g.join(" ")}`);continue}g.includes(v)||u(`${p}='${v}' is not valid. Expected: ${g.join(" ")}`)}if(Object.prototype.hasOwnProperty.call(f,"bound_branch")){let p=f.bound_branch;p!==null&&typeof p!="string"&&u(`bound_branch='${gt(p)}' is not a string or null`)}if(Object.prototype.hasOwnProperty.call(f,"verify_failures")){let p=f.verify_failures;(typeof p!="number"||!Number.isInteger(p)||p<0)&&u(`verify_failures='${gt(p)}' is not a non-negative integer`)}for(let p of["design_doc","plan","handoff_context","verification_report"]){let g=gt(f[p]);if(g){if(/^(?:[A-Za-z]:|[\\/]|~)/u.test(g)||g.split(/[\\/]/u).includes("..")){u(`${p}='${g}' must be a relative repository path`);continue}try{await Aa(r,La.resolve(r,g),{label:`${p} artifact pointer`,expected:"file"})||u(`${p}='${g}' does not exist on disk`)}catch(v){u(`${p}='${g}' is unsafe: ${v instanceof Error?v.message:String(v)}`)}}}for(let p of["handoff_hash"]){let g=gt(f[p]);g&&!/^[a-f0-9]{64}$/u.test(g)&&u(`${p}='${g}' is not a sha256 hex digest`)}for(let p of Object.keys(f))gp.has(p)||d(`unknown field '${p}' found`);return c.push(""),l>0?(c.push(me(ht,`${l} error(s), ${m} warning(s) — validation FAILED`)),{exitCode:1,stderr:c.join(`
146
+ `)}):(c.push(me(fp,`0 errors, ${m} warning(s) — validation PASSED`)),{exitCode:0,stderr:c.join(`
147
+ `)})});function wp(n,e){return{exitCode:e.exitCode,stdout:JSON.stringify({command:n,exitCode:e.exitCode,...e.stdout===void 0?{}:{stdout:e.stdout},...e.stderr===void 0?{}:{stderr:e.stderr}})+`
148
+ `}}async function $a(n,e,t=process.argv.slice(2)){let i=t.includes("--json"),r=t.filter(a=>a!=="--json"),s;try{s=await e(r,{json:i})}catch(a){s={exitCode:70,stderr:a instanceof Error?a.message:String(a)}}let o=i?wp(n,s):s;return o.stdout&&process.stdout.write(o.stdout),o.stderr&&process.stderr.write(o.stderr+(o.stderr.endsWith(`
149
149
  `)?"":`
150
- `)),o.exitCode}process.exitCode=await Da("validate",La);
150
+ `)),o.exitCode}process.exitCode=await $a("validate",Da);