@rpamis/comet 0.4.0-rc.2 → 0.4.0-rc.3

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 (353) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +1 -1
  3. package/assets/manifest.json +1 -1
  4. package/assets/skills/comet/scripts/comet-archive.mjs +55 -55
  5. package/assets/skills/comet/scripts/comet-entry-runtime.mjs +1 -1
  6. package/assets/skills/comet/scripts/comet-guard.mjs +79 -79
  7. package/assets/skills/comet/scripts/comet-handoff.mjs +64 -64
  8. package/assets/skills/comet/scripts/comet-hook-guard.mjs +51 -51
  9. package/assets/skills/comet/scripts/comet-hook-router.mjs +123 -123
  10. package/assets/skills/comet/scripts/comet-resume-probe.mjs +48 -48
  11. package/assets/skills/comet/scripts/comet-runtime.mjs +128 -128
  12. package/assets/skills/comet/scripts/comet-state.mjs +60 -60
  13. package/assets/skills/comet/scripts/comet-yaml-validate.mjs +15 -15
  14. package/assets/skills/comet-native/SKILL.md +2 -2
  15. package/assets/skills/comet-native/reference/commands.md +3 -2
  16. package/assets/skills/comet-native/scripts/comet-native-archive.mjs +120 -120
  17. package/assets/skills/comet-native/scripts/comet-native-doctor.mjs +126 -126
  18. package/assets/skills/comet-native/scripts/comet-native-hook-guard.mjs +62 -62
  19. package/assets/skills/comet-native/scripts/comet-native-init.mjs +57 -57
  20. package/assets/skills/comet-native/scripts/comet-native-new.mjs +87 -87
  21. package/assets/skills/comet-native/scripts/comet-native-next.mjs +129 -129
  22. package/assets/skills/comet-native/scripts/comet-native-root.mjs +67 -67
  23. package/assets/skills/comet-native/scripts/comet-native-runtime.mjs +157 -157
  24. package/assets/skills/comet-native/scripts/comet-native-select.mjs +98 -98
  25. package/assets/skills/comet-native/scripts/comet-native-show.mjs +88 -88
  26. package/assets/skills/comet-native/scripts/comet-native-spec.mjs +94 -94
  27. package/assets/skills/comet-native/scripts/comet-native-status.mjs +91 -91
  28. package/assets/skills-zh/comet-native/SKILL.md +2 -2
  29. package/assets/skills-zh/comet-native/reference/commands.md +3 -2
  30. package/dist/app/commands/bundle.d.ts.map +1 -1
  31. package/dist/app/commands/bundle.js.map +1 -1
  32. package/dist/app/commands/dashboard.d.ts +1 -1
  33. package/dist/app/commands/dashboard.js +1 -1
  34. package/dist/app/commands/doctor.d.ts.map +1 -1
  35. package/dist/app/commands/doctor.js +1 -1
  36. package/dist/app/commands/doctor.js.map +1 -1
  37. package/dist/app/commands/init.js +2 -2
  38. package/dist/app/commands/init.js.map +1 -1
  39. package/dist/app/commands/platform-select-prompt.d.ts.map +1 -1
  40. package/dist/app/commands/platform-select-prompt.js +1 -0
  41. package/dist/app/commands/platform-select-prompt.js.map +1 -1
  42. package/dist/app/commands/update.d.ts.map +1 -1
  43. package/dist/app/commands/update.js +12 -5
  44. package/dist/app/commands/update.js.map +1 -1
  45. package/dist/domains/agent-learning/policy-compiler.d.ts.map +1 -1
  46. package/dist/domains/agent-learning/policy-compiler.js.map +1 -1
  47. package/dist/domains/agent-learning/types.d.ts.map +1 -1
  48. package/dist/domains/agent-learning/types.js.map +1 -1
  49. package/dist/domains/bundle/authoring.d.ts.map +1 -1
  50. package/dist/domains/bundle/authoring.js.map +1 -1
  51. package/dist/domains/bundle/next-action.d.ts.map +1 -1
  52. package/dist/domains/bundle/next-action.js.map +1 -1
  53. package/dist/domains/bundle/readiness-user-summary.d.ts.map +1 -1
  54. package/dist/domains/bundle/readiness-user-summary.js.map +1 -1
  55. package/dist/domains/bundle/types.d.ts.map +1 -1
  56. package/dist/domains/comet-classic/classic-layout-initialization.d.ts.map +1 -1
  57. package/dist/domains/comet-classic/classic-layout-initialization.js.map +1 -1
  58. package/dist/domains/comet-entry/current-selection.d.ts.map +1 -1
  59. package/dist/domains/comet-entry/current-selection.js.map +1 -1
  60. package/dist/domains/comet-entry/init-workflow.d.ts.map +1 -1
  61. package/dist/domains/comet-entry/init-workflow.js.map +1 -1
  62. package/dist/domains/comet-entry/types.d.ts.map +1 -1
  63. package/dist/domains/comet-memory/personal-memory.d.ts.map +1 -1
  64. package/dist/domains/comet-memory/personal-memory.js.map +1 -1
  65. package/dist/domains/comet-memory/types.d.ts.map +1 -1
  66. package/dist/domains/comet-memory/types.js.map +1 -1
  67. package/dist/domains/comet-native/native-atomic-file.d.ts +1 -0
  68. package/dist/domains/comet-native/native-atomic-file.d.ts.map +1 -1
  69. package/dist/domains/comet-native/native-atomic-file.js +19 -0
  70. package/dist/domains/comet-native/native-atomic-file.js.map +1 -1
  71. package/dist/domains/comet-native/native-children.d.ts +1 -0
  72. package/dist/domains/comet-native/native-children.d.ts.map +1 -1
  73. package/dist/domains/comet-native/native-children.js +15 -4
  74. package/dist/domains/comet-native/native-children.js.map +1 -1
  75. package/dist/domains/comet-native/native-cli-help.js +1 -1
  76. package/dist/domains/comet-native/native-cli-help.js.map +1 -1
  77. package/dist/domains/comet-native/native-cli-shared.js.map +1 -1
  78. package/dist/domains/comet-native/native-evidence-storage.d.ts.map +1 -1
  79. package/dist/domains/comet-native/native-evidence-storage.js.map +1 -1
  80. package/dist/domains/comet-native/native-lock.d.ts.map +1 -1
  81. package/dist/domains/comet-native/native-lock.js +10 -1
  82. package/dist/domains/comet-native/native-lock.js.map +1 -1
  83. package/dist/domains/comet-native/native-loop-runtime.d.ts.map +1 -1
  84. package/dist/domains/comet-native/native-loop-runtime.js +21 -3
  85. package/dist/domains/comet-native/native-loop-runtime.js.map +1 -1
  86. package/dist/domains/comet-native/native-next-command.d.ts.map +1 -1
  87. package/dist/domains/comet-native/native-next-command.js +35 -2
  88. package/dist/domains/comet-native/native-next-command.js.map +1 -1
  89. package/dist/domains/comet-native/native-output-language.d.ts.map +1 -1
  90. package/dist/domains/comet-native/native-output-language.js.map +1 -1
  91. package/dist/domains/comet-native/native-portable-archive.d.ts.map +1 -1
  92. package/dist/domains/comet-native/native-portable-archive.js +17 -1
  93. package/dist/domains/comet-native/native-portable-archive.js.map +1 -1
  94. package/dist/domains/comet-native/native-portable-continuation.d.ts.map +1 -1
  95. package/dist/domains/comet-native/native-portable-continuation.js +28 -29
  96. package/dist/domains/comet-native/native-portable-continuation.js.map +1 -1
  97. package/dist/domains/comet-native/native-portable-migration.d.ts.map +1 -1
  98. package/dist/domains/comet-native/native-portable-migration.js.map +1 -1
  99. package/dist/domains/comet-native/native-portable-recovery.d.ts +1 -0
  100. package/dist/domains/comet-native/native-portable-recovery.d.ts.map +1 -1
  101. package/dist/domains/comet-native/native-portable-recovery.js +2 -2
  102. package/dist/domains/comet-native/native-portable-recovery.js.map +1 -1
  103. package/dist/domains/comet-native/native-portable-runtime.d.ts +21 -0
  104. package/dist/domains/comet-native/native-portable-runtime.d.ts.map +1 -1
  105. package/dist/domains/comet-native/native-portable-runtime.js +113 -3
  106. package/dist/domains/comet-native/native-portable-runtime.js.map +1 -1
  107. package/dist/domains/comet-native/native-portable-types.d.ts.map +1 -1
  108. package/dist/domains/comet-native/native-portable-types.js.map +1 -1
  109. package/dist/domains/comet-native/native-runner-input.d.ts.map +1 -1
  110. package/dist/domains/comet-native/native-runner-input.js +14 -27
  111. package/dist/domains/comet-native/native-runner-input.js.map +1 -1
  112. package/dist/domains/comet-native/native-schema-migration.d.ts.map +1 -1
  113. package/dist/domains/comet-native/native-schema-migration.js.map +1 -1
  114. package/dist/domains/comet-native/native-supervisor.d.ts +11 -1
  115. package/dist/domains/comet-native/native-supervisor.d.ts.map +1 -1
  116. package/dist/domains/comet-native/native-supervisor.js +61 -0
  117. package/dist/domains/comet-native/native-supervisor.js.map +1 -1
  118. package/dist/domains/comet-native/native-types.d.ts.map +1 -1
  119. package/dist/domains/comet-native/native-verification-receipt.d.ts.map +1 -1
  120. package/dist/domains/comet-native/native-verification-receipt.js.map +1 -1
  121. package/dist/domains/comet-native/native-workspace.d.ts.map +1 -1
  122. package/dist/domains/comet-native/native-workspace.js.map +1 -1
  123. package/dist/domains/comet-plugin/integration.d.ts +2 -0
  124. package/dist/domains/comet-plugin/integration.d.ts.map +1 -1
  125. package/dist/domains/comet-plugin/integration.js +10 -6
  126. package/dist/domains/comet-plugin/integration.js.map +1 -1
  127. package/dist/domains/dashboard/collector.js +1 -1
  128. package/dist/domains/dashboard/default-plugin-host.d.ts +3 -0
  129. package/dist/domains/dashboard/default-plugin-host.d.ts.map +1 -1
  130. package/dist/domains/dashboard/default-plugin-host.js +38 -4
  131. package/dist/domains/dashboard/default-plugin-host.js.map +1 -1
  132. package/dist/domains/dashboard/native-adapter.d.ts.map +1 -1
  133. package/dist/domains/dashboard/native-adapter.js.map +1 -1
  134. package/dist/domains/dashboard/web/assets/abnfDiagram-VCTEODGH-UcCx24DV.js +1 -0
  135. package/dist/domains/dashboard/web/assets/arc-n8qsRq7W.js +1 -0
  136. package/dist/domains/dashboard/web/assets/architecture-7GRP2DOG-B5p4GzJf.js +1 -0
  137. package/dist/domains/dashboard/web/assets/architectureDiagram-5GKGNRK7-D4pJ8CU0.js +36 -0
  138. package/dist/domains/dashboard/web/assets/array-BifhSqXX.js +1 -0
  139. package/dist/domains/dashboard/web/assets/blockDiagram-I7D4REHJ-C7n-qrSQ.js +129 -0
  140. package/dist/domains/dashboard/web/assets/browser-CgwPGwaV.js +107 -0
  141. package/dist/domains/dashboard/web/assets/c4Diagram-7LVT6UL2-cMVrWYOm.js +38 -0
  142. package/dist/domains/dashboard/web/assets/channel-BZeSeXVb.js +1 -0
  143. package/dist/domains/dashboard/web/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
  144. package/dist/domains/dashboard/web/assets/chunk-4HAMMTFA-CE5QrCQd.js +62 -0
  145. package/dist/domains/dashboard/web/assets/{chunk-5VM5RSS4-CopXcnFA.js → chunk-5VM5RSS4-ZNzvKenW.js} +2 -2
  146. package/dist/domains/dashboard/web/assets/chunk-75Z2AOVW-BtZqN-pM.js +2 -0
  147. package/dist/domains/dashboard/web/assets/chunk-DU6HZSFF-CChv0huc.js +125 -0
  148. package/dist/domains/dashboard/web/assets/chunk-F27PBJKO-CDT1ttJ8.js +1 -0
  149. package/dist/domains/dashboard/web/assets/chunk-FOHPRMQF-DHwB1DNv.js +161 -0
  150. package/dist/domains/dashboard/web/assets/chunk-GMAD6QVW-y5m6LMR7.js +72 -0
  151. package/dist/domains/dashboard/web/assets/chunk-GVQU2GXP-DkhKkaHd.js +1 -0
  152. package/dist/domains/dashboard/web/assets/chunk-IMKFNOWR-BaDSh7Jp.js +231 -0
  153. package/dist/domains/dashboard/web/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
  154. package/dist/domains/dashboard/web/assets/chunk-L3NEJ4N5-B4ztH2fV.js +1 -0
  155. package/dist/domains/dashboard/web/assets/chunk-OSK3NFVY-BhX6NVzA.js +10 -0
  156. package/dist/domains/dashboard/web/assets/chunk-P2QGCYS3-BCNdGJkX.js +1 -0
  157. package/dist/domains/dashboard/web/assets/chunk-POPQ4Y6H-DwYVuiXw.js +1 -0
  158. package/dist/domains/dashboard/web/assets/chunk-PWAF6VOD-Cyg0IO0R.js +1 -0
  159. package/dist/domains/dashboard/web/assets/chunk-SHT3W25Y-BZ6skx8I.js +168 -0
  160. package/dist/domains/dashboard/web/assets/chunk-SVP7TREG-CLIGmSO0.js +88 -0
  161. package/dist/domains/dashboard/web/assets/chunk-TICWLB2K-BAQBbsn9.js +206 -0
  162. package/dist/domains/dashboard/web/assets/chunk-XXDRQBXY-D07UbEpV.js +1 -0
  163. package/dist/domains/dashboard/web/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
  164. package/dist/domains/dashboard/web/assets/classDiagram-ZZMXUADV-2fcinal6.js +1 -0
  165. package/dist/domains/dashboard/web/assets/classDiagram-v2-VYDZK3BY-2fcinal6.js +1 -0
  166. package/dist/domains/dashboard/web/assets/cose-bilkent-JH36ORCC-wIi0mUih.js +1 -0
  167. package/dist/domains/dashboard/web/assets/cynefin-OW5HDTMX-DBdxyuTN.js +1 -0
  168. package/dist/domains/dashboard/web/assets/cynefinDiagram-5FMLGOSQ-DzO3jXxV.js +62 -0
  169. package/dist/domains/dashboard/web/assets/cytoscape.esm-CGd-uY3x.js +321 -0
  170. package/dist/domains/dashboard/web/assets/dagre-GXQ25YYZ-CE7H_hZS.js +4 -0
  171. package/dist/domains/dashboard/web/assets/dagre-PrKaheQc.js +1 -0
  172. package/dist/domains/dashboard/web/assets/defaultLocale-BFoDCU3G.js +1 -0
  173. package/dist/domains/dashboard/web/assets/demo-DrJ2uuUL.js +456 -0
  174. package/dist/domains/dashboard/web/assets/diagram-S7CK7UJ4-jUGQk5n-.js +30 -0
  175. package/dist/domains/dashboard/web/assets/diagram-UQ7AKVKN-DaH_zW8T.js +41 -0
  176. package/dist/domains/dashboard/web/assets/diagram-VSXAHHWV-DmG80db0.js +3 -0
  177. package/dist/domains/dashboard/web/assets/diagram-VX7I27RA-ltQ6niKn.js +24 -0
  178. package/dist/domains/dashboard/web/assets/diagram-Z3DM3KII-x92ex4lK.js +24 -0
  179. package/dist/domains/dashboard/web/assets/dist-Cf0h0n6i.js +1 -0
  180. package/dist/domains/dashboard/web/assets/ebnfDiagram-PWID7BFC-CI2u976k.js +1 -0
  181. package/dist/domains/dashboard/web/assets/erDiagram-RLTQ6QDP-DKs90SRd.js +99 -0
  182. package/dist/domains/dashboard/web/assets/es-D7xGlyQk.js +10 -0
  183. package/dist/domains/dashboard/web/assets/eventmodeling-NTZA5JFV-uARcGZPD.js +1 -0
  184. package/dist/domains/dashboard/web/assets/flowDiagram-HODETNUW-DXL1E4Bl.js +1 -0
  185. package/dist/domains/dashboard/web/assets/ganttDiagram-EL5Y4UJY-D3z6G60S.js +292 -0
  186. package/dist/domains/dashboard/web/assets/gitGraph-4MIJSDKK-vT1UnORT.js +1 -0
  187. package/dist/domains/dashboard/web/assets/gitGraphDiagram-WWUBYQGX-BJmJ96jv.js +106 -0
  188. package/dist/domains/dashboard/web/assets/graphlib-DS17s2tU.js +1 -0
  189. package/dist/domains/dashboard/web/assets/index-BG3MF8re.js +261 -0
  190. package/dist/domains/dashboard/web/assets/index-C2Hlo7VZ.css +1 -0
  191. package/dist/domains/dashboard/web/assets/info-A6RAGUB7-DFeLqqen.js +1 -0
  192. package/dist/domains/dashboard/web/assets/infoDiagram-27XIBGKW-DxuY43XD.js +2 -0
  193. package/dist/domains/dashboard/web/assets/init-C-OQMol4.js +1 -0
  194. package/dist/domains/dashboard/web/assets/ishikawaDiagram-5VMMS53U-DxillfWQ.js +70 -0
  195. package/dist/domains/dashboard/web/assets/journeyDiagram-3NMN7TZE-BPngQ3ag.js +139 -0
  196. package/dist/domains/dashboard/web/assets/kanban-definition-UXKFOSKX-DHMLEGD4.js +89 -0
  197. package/dist/domains/dashboard/web/assets/katex-CXMH3UgJ.js +257 -0
  198. package/dist/domains/dashboard/web/assets/line-D31peBjo.js +1 -0
  199. package/dist/domains/dashboard/web/assets/linear-B7X50T2m.js +1 -0
  200. package/dist/domains/dashboard/web/assets/marked.esm-BtJme7Pf.js +65 -0
  201. package/dist/domains/dashboard/web/assets/mermaid-parser.core-CX3Pzygh.js +7 -0
  202. package/dist/domains/dashboard/web/assets/mermaid.core-DlMjBFb6.js +44 -0
  203. package/dist/domains/dashboard/web/assets/mindmap-definition-YA3MSWOX-BKuSGF75.js +96 -0
  204. package/dist/domains/dashboard/web/assets/ordinal-BDEzSJ7C.js +1 -0
  205. package/dist/domains/dashboard/web/assets/packet-AYTQ26CC-B1T8Bds9.js +1 -0
  206. package/dist/domains/dashboard/web/assets/path-fybaL0A-.js +1 -0
  207. package/dist/domains/dashboard/web/assets/pegDiagram-XKGWAZYB-BYgTNxLw.js +1 -0
  208. package/dist/domains/dashboard/web/assets/pie-WAS4IAKB-fqAjmoQw.js +1 -0
  209. package/dist/domains/dashboard/web/assets/pieDiagram-E7YTZNPT-BAO0Ufky.js +39 -0
  210. package/dist/domains/dashboard/web/assets/purify.es-ChwZkWde.js +3 -0
  211. package/dist/domains/dashboard/web/assets/quadrantDiagram-AXDQQJYC-SA_1-7DT.js +7 -0
  212. package/dist/domains/dashboard/web/assets/radar-RG4KPBEZ-Bl_UfUle.js +1 -0
  213. package/dist/domains/dashboard/web/assets/railroad-74A4TZTK-yj6dkiSy.js +1 -0
  214. package/dist/domains/dashboard/web/assets/railroad-abnf-HS5TGJTU-CvouMciM.js +1 -0
  215. package/dist/domains/dashboard/web/assets/railroad-ebnf-LZEXJU2U-CkYQEX72.js +1 -0
  216. package/dist/domains/dashboard/web/assets/railroad-peg-WCYAUIDC-B0uYr48F.js +1 -0
  217. package/dist/domains/dashboard/web/assets/railroadDiagram-O6MQD6OU-DqV18Y46.js +1 -0
  218. package/dist/domains/dashboard/web/assets/requirementDiagram-BXWQKSXE-Ca2K5LuT.js +84 -0
  219. package/dist/domains/dashboard/web/assets/rough.esm-Dy-Kn_BL.js +1 -0
  220. package/dist/domains/dashboard/web/assets/sankeyDiagram-P5KCCOFB-D9MKl-Nr.js +40 -0
  221. package/dist/domains/dashboard/web/assets/sequenceDiagram-WJ2MYXX4-CXfvIzRx.js +162 -0
  222. package/dist/domains/dashboard/web/assets/sizeCapture-INFHLROL-B0uUizjq.js +1 -0
  223. package/dist/domains/dashboard/web/assets/src-CquUPIQx.js +1 -0
  224. package/dist/domains/dashboard/web/assets/stateDiagram-D77RDMKH-B7iaZHW7.js +1 -0
  225. package/dist/domains/dashboard/web/assets/stateDiagram-v2-MP3YSRHH-B6KoHQVe.js +1 -0
  226. package/dist/domains/dashboard/web/assets/swimlanes-42K2YHIH-OK-62yZl.js +1 -0
  227. package/dist/domains/dashboard/web/assets/swimlanesDiagram-VR7AAH4N-CjdOls9K.js +8 -0
  228. package/dist/domains/dashboard/web/assets/timeline-definition-24CTP7MA-D0l01B1h.js +120 -0
  229. package/dist/domains/dashboard/web/assets/treeView-Q6P3EWNA-Bg5u_o3A.js +1 -0
  230. package/dist/domains/dashboard/web/assets/treemap-WGGIJYW6-x89ccozk.js +1 -0
  231. package/dist/domains/dashboard/web/assets/vennDiagram-4TSXK5OY-DV19Cqhv.js +34 -0
  232. package/dist/domains/dashboard/web/assets/wardley-WFR3VGLG-BWoeoVk5.js +1 -0
  233. package/dist/domains/dashboard/web/assets/wardleyDiagram-VM6X3IG4-D4fCpoIP.js +78 -0
  234. package/dist/domains/dashboard/web/assets/xychartDiagram-S5SC5T6Z-DALnOMLb.js +7 -0
  235. package/dist/domains/dashboard/web/index.html +16 -16
  236. package/dist/domains/factory/artifacts.d.ts.map +1 -1
  237. package/dist/domains/factory/artifacts.js.map +1 -1
  238. package/dist/domains/factory/types.d.ts.map +1 -1
  239. package/dist/domains/integrations/codegraph.d.ts.map +1 -1
  240. package/dist/domains/integrations/codegraph.js.map +1 -1
  241. package/dist/domains/project-knowledge/local-store.d.ts +21 -0
  242. package/dist/domains/project-knowledge/local-store.d.ts.map +1 -1
  243. package/dist/domains/project-knowledge/local-store.js +97 -0
  244. package/dist/domains/project-knowledge/local-store.js.map +1 -1
  245. package/dist/domains/project-knowledge/types.d.ts.map +1 -1
  246. package/dist/domains/skill/platform-inspect.d.ts +1 -1
  247. package/dist/domains/skill/platform-inspect.d.ts.map +1 -1
  248. package/dist/domains/skill/platform-inspect.js +50 -10
  249. package/dist/domains/skill/platform-inspect.js.map +1 -1
  250. package/dist/domains/skill/platform-install.d.ts +10 -5
  251. package/dist/domains/skill/platform-install.d.ts.map +1 -1
  252. package/dist/domains/skill/platform-install.js +107 -17
  253. package/dist/domains/skill/platform-install.js.map +1 -1
  254. package/dist/domains/skill/uninstall.d.ts.map +1 -1
  255. package/dist/domains/skill/uninstall.js +38 -61
  256. package/dist/domains/skill/uninstall.js.map +1 -1
  257. package/dist/domains/workflow-contract/contained-atomic-write.d.ts +1 -0
  258. package/dist/domains/workflow-contract/contained-atomic-write.d.ts.map +1 -1
  259. package/dist/domains/workflow-contract/contained-atomic-write.js +19 -0
  260. package/dist/domains/workflow-contract/contained-atomic-write.js.map +1 -1
  261. package/dist/domains/workflow-contract/global-config.d.ts +8 -0
  262. package/dist/domains/workflow-contract/global-config.d.ts.map +1 -1
  263. package/dist/domains/workflow-contract/global-config.js +25 -0
  264. package/dist/domains/workflow-contract/global-config.js.map +1 -1
  265. package/dist/domains/workflow-contract/index.d.ts +1 -1
  266. package/dist/domains/workflow-contract/index.d.ts.map +1 -1
  267. package/dist/domains/workflow-contract/index.js +1 -1
  268. package/dist/domains/workflow-contract/index.js.map +1 -1
  269. package/dist/domains/workflow-contract/project-config.d.ts +1 -1
  270. package/dist/domains/workflow-contract/project-config.d.ts.map +1 -1
  271. package/dist/domains/workflow-contract/project-config.js +1 -0
  272. package/dist/domains/workflow-contract/project-config.js.map +1 -1
  273. package/dist/domains/workflow-contract/types.d.ts.map +1 -1
  274. package/dist/platform/install/platforms.d.ts +4 -0
  275. package/dist/platform/install/platforms.d.ts.map +1 -1
  276. package/dist/platform/install/platforms.js +15 -3
  277. package/dist/platform/install/platforms.js.map +1 -1
  278. package/dist/platform/paths/project-knowledge-storage.d.ts +1 -1
  279. package/dist/platform/paths/project-knowledge-storage.d.ts.map +1 -1
  280. package/dist/platform/paths/project-knowledge-storage.js +9 -4
  281. package/dist/platform/paths/project-knowledge-storage.js.map +1 -1
  282. package/eval/local/tasks/comet-classic-layout-lifecycle/environment/current-comet-package.json +13 -13
  283. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/environment/current-comet-package.json +13 -13
  284. package/package.json +24 -24
  285. package/dist/domains/dashboard/web/assets/abnfDiagram-N423BO3Z-BkUJc7LK.js +0 -1
  286. package/dist/domains/dashboard/web/assets/arc-DY4Y9tSO.js +0 -1
  287. package/dist/domains/dashboard/web/assets/architectureDiagram-T3A2C74G-7wC9YZS-.js +0 -36
  288. package/dist/domains/dashboard/web/assets/blockDiagram-VBNYF7ZC-Biqe-SaL.js +0 -132
  289. package/dist/domains/dashboard/web/assets/c4Diagram-5PPSVZJV-CccUFD1S.js +0 -10
  290. package/dist/domains/dashboard/web/assets/channel-DnRvSkOm.js +0 -1
  291. package/dist/domains/dashboard/web/assets/chunk-2GRJ4B5K-BUL4dDxo.js +0 -1
  292. package/dist/domains/dashboard/web/assets/chunk-2Q5K7J3B-BnKtDH9O.js +0 -1
  293. package/dist/domains/dashboard/web/assets/chunk-5RXB4S5H-C9pHQ1n3.js +0 -231
  294. package/dist/domains/dashboard/web/assets/chunk-6Q2QTUOP-CxrbngCi.js +0 -88
  295. package/dist/domains/dashboard/web/assets/chunk-GF5L2VYU-01mzgCUh.js +0 -206
  296. package/dist/domains/dashboard/web/assets/chunk-JWPE2WC7-wTiZVDvw.js +0 -1
  297. package/dist/domains/dashboard/web/assets/chunk-KBJHAD2P-Bxdv5bl-.js +0 -1
  298. package/dist/domains/dashboard/web/assets/chunk-RYQCIY6F-B5vF9l9A.js +0 -1
  299. package/dist/domains/dashboard/web/assets/chunk-XXDRQBXY-Dra3NnDp.js +0 -1
  300. package/dist/domains/dashboard/web/assets/classDiagram-JCYQIIEL-D3E-rgaQ.js +0 -1
  301. package/dist/domains/dashboard/web/assets/classDiagram-v2-OCEON4UE-D3E-rgaQ.js +0 -1
  302. package/dist/domains/dashboard/web/assets/cose-bilkent-JH36ORCC-DC96ge-n.js +0 -1
  303. package/dist/domains/dashboard/web/assets/cynefin-VYW2F7L2-Tt_NiopT.js +0 -166
  304. package/dist/domains/dashboard/web/assets/cynefinDiagram-MW4NZA55-BQ5__1hv.js +0 -62
  305. package/dist/domains/dashboard/web/assets/cytoscape.esm-D3_iZ_3b.js +0 -321
  306. package/dist/domains/dashboard/web/assets/dagre-VZM6K2ZE-Cr2zq3ro.js +0 -4
  307. package/dist/domains/dashboard/web/assets/defaultLocale-DX6XiGOO.js +0 -1
  308. package/dist/domains/dashboard/web/assets/demo-lxXhgJ9-.js +0 -456
  309. package/dist/domains/dashboard/web/assets/diagram-7IWD3JNH-BRpYDwPl.js +0 -30
  310. package/dist/domains/dashboard/web/assets/diagram-B4RE2ZJO-D7u-VBxW.js +0 -3
  311. package/dist/domains/dashboard/web/assets/diagram-LBJQPF4R-CHYuv2JD.js +0 -24
  312. package/dist/domains/dashboard/web/assets/diagram-Q27KOJAE-CV3ZE8Q3.js +0 -24
  313. package/dist/domains/dashboard/web/assets/diagram-UB23O5K3-co_OsTiQ.js +0 -41
  314. package/dist/domains/dashboard/web/assets/ebnfDiagram-BXEA7PRR-CETcWswS.js +0 -1
  315. package/dist/domains/dashboard/web/assets/erDiagram-JOGREHBK-edkItb7Z.js +0 -85
  316. package/dist/domains/dashboard/web/assets/flowDiagram-UKHOOZJN-D_oFJtSf.js +0 -156
  317. package/dist/domains/dashboard/web/assets/ganttDiagram-PKOTCBZU-CFjLVoA1.js +0 -292
  318. package/dist/domains/dashboard/web/assets/gitGraphDiagram-DS77QQ5N-BfD0tiKH.js +0 -106
  319. package/dist/domains/dashboard/web/assets/graph-DOmOIIwC.js +0 -1
  320. package/dist/domains/dashboard/web/assets/index-BzyqCfMb.css +0 -1
  321. package/dist/domains/dashboard/web/assets/index-CCKHH_A9.js +0 -10
  322. package/dist/domains/dashboard/web/assets/index-D8dxsTJY.js +0 -271
  323. package/dist/domains/dashboard/web/assets/index-DlSYK56b.js +0 -139
  324. package/dist/domains/dashboard/web/assets/infoDiagram-6WML65LV-Cx6xa9DS.js +0 -2
  325. package/dist/domains/dashboard/web/assets/init-Gi6I4Gst.js +0 -1
  326. package/dist/domains/dashboard/web/assets/ishikawaDiagram-WSZJBQD7-BjNLyyv_.js +0 -70
  327. package/dist/domains/dashboard/web/assets/journeyDiagram-NVQOT4AX-D2n9vrhx.js +0 -139
  328. package/dist/domains/dashboard/web/assets/kanban-definition-27J2QSJJ-kJL7v018.js +0 -89
  329. package/dist/domains/dashboard/web/assets/katex-HP8lGamR.js +0 -257
  330. package/dist/domains/dashboard/web/assets/layout-D-LzfAck.js +0 -1
  331. package/dist/domains/dashboard/web/assets/linear-CeHtd5-l.js +0 -1
  332. package/dist/domains/dashboard/web/assets/map-DxJ2ADlA.js +0 -1
  333. package/dist/domains/dashboard/web/assets/marked.esm-DECB3bxB.js +0 -64
  334. package/dist/domains/dashboard/web/assets/mermaid.core-B0EPSHs2.js +0 -306
  335. package/dist/domains/dashboard/web/assets/mindmap-definition-FAOFIHXS-bQQWINF4.js +0 -96
  336. package/dist/domains/dashboard/web/assets/ordinal-Cboi1Yqb.js +0 -1
  337. package/dist/domains/dashboard/web/assets/pegDiagram-VL7TDLO6-LxLY1W7W.js +0 -1
  338. package/dist/domains/dashboard/web/assets/pieDiagram-7S7Q4E2Y-BMDQqvuT.js +0 -39
  339. package/dist/domains/dashboard/web/assets/purify.es-Cz4mVeUR.js +0 -3
  340. package/dist/domains/dashboard/web/assets/quadrantDiagram-CIZ2JOQS-XWYjcuZN.js +0 -7
  341. package/dist/domains/dashboard/web/assets/railroadDiagram-AXF67PYL-p-OlQTa7.js +0 -1
  342. package/dist/domains/dashboard/web/assets/requirementDiagram-LRYGKXZP-BL4N8Vsl.js +0 -84
  343. package/dist/domains/dashboard/web/assets/sankeyDiagram-W5VNT64P-Btu-o6LN.js +0 -40
  344. package/dist/domains/dashboard/web/assets/sequenceDiagram-SI44F4Z6-9HpdQQ47.js +0 -162
  345. package/dist/domains/dashboard/web/assets/sizeCapture-X5ZJPWSS-5AnBiBHD.js +0 -1
  346. package/dist/domains/dashboard/web/assets/stateDiagram-OKZ733FA-Dv8IDsai.js +0 -1
  347. package/dist/domains/dashboard/web/assets/stateDiagram-v2-UEYNNEHI-DxOMyFOm.js +0 -1
  348. package/dist/domains/dashboard/web/assets/swimlanes-SLNWSIFB-BfJcN7dK.js +0 -2
  349. package/dist/domains/dashboard/web/assets/swimlanesDiagram-ULZ7WXOC-BnHRSbDk.js +0 -8
  350. package/dist/domains/dashboard/web/assets/timeline-definition-Z64GVDOM-DEOuEHi5.js +0 -120
  351. package/dist/domains/dashboard/web/assets/vennDiagram-T6HMQDX7-BqsGpwgo.js +0 -34
  352. package/dist/domains/dashboard/web/assets/wardleyDiagram-T6FBY63Y-CXlOp9so.js +0 -78
  353. package/dist/domains/dashboard/web/assets/xychartDiagram-ELKLHX3M-DyqqtC9X.js +0 -7
@@ -1,139 +0,0 @@
1
- const pt=Symbol.for("yaml.alias"),at=Symbol.for("yaml.document"),G=Symbol.for("yaml.map"),Rt=Symbol.for("yaml.pair"),U=Symbol.for("yaml.scalar"),he=Symbol.for("yaml.seq"),P=Symbol.for("yaml.node.type"),Z=s=>!!s&&typeof s=="object"&&s[P]===pt,x=s=>!!s&&typeof s=="object"&&s[P]===at,de=s=>!!s&&typeof s=="object"&&s[P]===G,I=s=>!!s&&typeof s=="object"&&s[P]===Rt,E=s=>!!s&&typeof s=="object"&&s[P]===U,pe=s=>!!s&&typeof s=="object"&&s[P]===he;function L(s){if(s&&typeof s=="object")switch(s[P]){case G:case he:return!0}return!1}function $(s){if(s&&typeof s=="object")switch(s[P]){case pt:case G:case U:case he:return!0}return!1}const Ut=s=>(E(s)||L(s))&&!!s.anchor,M=Symbol("break visit"),Ft=Symbol("skip children"),R=Symbol("remove node");function ee(s,e){const t=Vt(e);x(s)?ie(null,s.contents,t,Object.freeze([s]))===R&&(s.contents=null):ie(null,s,t,Object.freeze([]))}ee.BREAK=M;ee.SKIP=Ft;ee.REMOVE=R;function ie(s,e,t,n){const i=Jt(s,e,t,n);if($(i)||I(i))return Yt(s,n,i),ie(s,i,t,n);if(typeof i!="symbol"){if(L(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){const o=ie(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===M)return M;o===R&&(e.items.splice(r,1),r-=1)}}}else if(I(e)){n=Object.freeze(n.concat(e));const r=ie("key",e.key,t,n);if(r===M)return M;r===R&&(e.key=null);const o=ie("value",e.value,t,n);if(o===M)return M;o===R&&(e.value=null)}}return i}async function Ue(s,e){const t=Vt(e);x(s)?await re(null,s.contents,t,Object.freeze([s]))===R&&(s.contents=null):await re(null,s,t,Object.freeze([]))}Ue.BREAK=M;Ue.SKIP=Ft;Ue.REMOVE=R;async function re(s,e,t,n){const i=await Jt(s,e,t,n);if($(i)||I(i))return Yt(s,n,i),re(s,i,t,n);if(typeof i!="symbol"){if(L(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){const o=await re(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===M)return M;o===R&&(e.items.splice(r,1),r-=1)}}}else if(I(e)){n=Object.freeze(n.concat(e));const r=await re("key",e.key,t,n);if(r===M)return M;r===R&&(e.key=null);const o=await re("value",e.value,t,n);if(o===M)return M;o===R&&(e.value=null)}}return i}function Vt(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function Jt(s,e,t,n){if(typeof t=="function")return t(s,e,n);if(de(e))return t.Map?.(s,e,n);if(pe(e))return t.Seq?.(s,e,n);if(I(e))return t.Pair?.(s,e,n);if(E(e))return t.Scalar?.(s,e,n);if(Z(e))return t.Alias?.(s,e,n)}function Yt(s,e,t){const n=e[e.length-1];if(L(n))n.items[s]=t;else if(I(n))s==="key"?n.key=t:n.value=t;else if(x(n))n.contents=t;else{const i=Z(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const Ks={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},js=s=>s.replace(/[!,[\]{}]/g,e=>Ks[e]);class B{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},B.defaultYaml,e),this.tags=Object.assign({},B.defaultTags,t)}clone(){const e=new B(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new B(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:B.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},B.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:B.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},B.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{const o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const 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)}const[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);const r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+js(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let i;if(e&&n.length>0&&$(e.contents)){const r={};ee(e.contents,(o,l)=>{$(l)&&l.tag&&(r[l.tag]=!0)}),i=Object.keys(r)}else i=[];for(const[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(l=>l.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
2
- `)}}B.defaultYaml={explicit:!1,version:"1.2"};B.defaultTags={"!!":"tag:yaml.org,2002:"};function Gt(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function Qt(s){const e=new Set;return ee(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function Wt(s,e){for(let t=1;;++t){const n=`${s}${t}`;if(!e.has(n))return n}}function Ps(s,e){const t=[],n=new Map;let i=null;return{onAnchor:r=>{t.push(r),i??(i=Qt(s));const o=Wt(e,i);return i.add(o),o},setAnchors:()=>{for(const r of t){const o=n.get(r);if(typeof o=="object"&&o.anchor&&(E(o.node)||L(o.node)))o.node.anchor=o.anchor;else{const l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=r,l}}},sourceObjects:n}}function oe(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){const o=n[i],l=oe(s,n,String(i),o);l===void 0?delete n[i]:l!==o&&(n[i]=l)}else if(n instanceof Map)for(const i of Array.from(n.keys())){const r=n.get(i),o=oe(s,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(const i of Array.from(n)){const r=oe(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(const[i,r]of Object.entries(n)){const o=oe(s,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return s.call(e,t,n)}function j(s,e,t){if(Array.isArray(s))return s.map((n,i)=>j(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!Ut(s))return s.toJSON(e,t);const n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};const i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!t?.keep?Number(s):s}class mt{constructor(e){Object.defineProperty(this,P,{value:e})}clone(){const 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:i,reviver:r}={}){if(!x(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=j(this,"",o);if(typeof i=="function")for(const{count:a,res:c}of o.anchors.values())i(c,a);return typeof r=="function"?oe(r,{"":l},"",l):l}}class Fe extends mt{constructor(e){super(pt),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=[],ee(e,{Node:(r,o)=>{(Z(o)||Ut(o))&&n.push(o)}}),t&&(t.aliasResolveCache=n));let i;for(const r of n){if(r===this)break;r.anchor===this.source&&(i=r)}return i}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:i,maxAliasCount:r}=t,o=this.resolve(i,t);if(!o){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(a)}let l=n.get(o);if(l||(j(o,null,t),l=n.get(o)),l?.res===void 0){const a="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(a)}if(r>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=ve(i,o,n)),l.count*l.aliasCount>r)){const a="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(a)}return l.res}toString(e,t,n){const i=`*${this.source}`;if(e){if(Gt(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}}function ve(s,e,t){if(Z(e)){const n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(L(e)){let n=0;for(const i of e.items){const r=ve(s,i,t);r>n&&(n=r)}return n}else if(I(e)){const n=ve(s,e.key,t),i=ve(s,e.value,t);return Math.max(n,i)}return 1}const Ht=s=>!s||typeof s!="function"&&typeof s!="object";class N extends mt{constructor(e){super(U),this.value=e}toJSON(e,t){return t?.keep?this.value:j(this.value,e,t)}toString(){return String(this.value)}}N.BLOCK_FOLDED="BLOCK_FOLDED";N.BLOCK_LITERAL="BLOCK_LITERAL";N.PLAIN="PLAIN";N.QUOTE_DOUBLE="QUOTE_DOUBLE";N.QUOTE_SINGLE="QUOTE_SINGLE";const Ds="tag:yaml.org,2002:";function qs(s,e,t){if(e){const n=t.filter(r=>r.tag===e),i=n.find(r=>!r.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>n.identify?.(s)&&!n.format)}function ke(s,e,t){if(x(s)&&(s=s.contents),$(s))return s;if(I(s)){const f=t.schema[G].createNode?.(t.schema,null,t);return f.items.push(s),f}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:l}=t;let a;if(n&&s&&typeof s=="object"){if(a=l.get(s),a)return a.anchor??(a.anchor=i(s)),new Fe(a.anchor);a={anchor:null,node:null},l.set(s,a)}e?.startsWith("!!")&&(e=Ds+e.slice(2));let c=qs(s,e,o.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){const f=new N(s);return a&&(a.node=f),f}c=s instanceof Map?o[G]:Symbol.iterator in Object(s)?o[he]:o[G]}r&&(r(c),delete t.onTagObj);const d=c?.createNode?c.createNode(t.schema,s,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,s,t):new N(s);return e?d.tag=e:c.default||(d.tag=c.tag),a&&(a.node=d),d}function je(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){const r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){const o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return ke(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}const we=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done;class Xt extends mt{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>$(n)||I(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(we(e))this.add(t);else{const[n,...i]=e,r=this.get(n,!0);if(L(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,je(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const i=this.get(t,!0);if(L(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&E(r)?r.value:r:L(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!I(t))return!1;const n=t.value;return n==null||e&&E(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const i=this.get(t,!0);return L(i)?i.hasIn(n):!1}setIn(e,t){const[n,...i]=e;if(i.length===0)this.set(n,t);else{const r=this.get(n,!0);if(L(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,je(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}}const Rs=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function F(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}const W=(s,e,t)=>s.endsWith(`
3
- `)?F(t,e):t.includes(`
4
- `)?`
5
- `+F(t,e):(s.endsWith(" ")?"":" ")+t,zt="flow",ct="block",Be="quoted";function Ve(s,e,t="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:l}={}){if(!i||i<0)return s;i<r&&(r=0);const a=Math.max(1+r,1+i-e.length);if(s.length<=a)return s;const c=[],d={};let f=i-e.length;typeof n=="number"&&(n>i-Math.max(2,r)?c.push(0):f=i-n);let u,m,g=!1,h=-1,p=-1,b=-1;t===ct&&(h=Ct(s,h,e.length),h!==-1&&(f=h+a));for(let S;S=s[h+=1];){if(t===Be&&S==="\\"){switch(p=h,s[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}b=h}if(S===`
6
- `)t===ct&&(h=Ct(s,h,e.length)),f=h+e.length+a,u=void 0;else{if(S===" "&&m&&m!==" "&&m!==`
7
- `&&m!==" "){const k=s[h+1];k&&k!==" "&&k!==`
8
- `&&k!==" "&&(u=h)}if(h>=f)if(u)c.push(u),f=u+a,u=void 0;else if(t===Be){for(;m===" "||m===" ";)m=S,S=s[h+=1],g=!0;const k=h>b+1?h-2:p-1;if(d[k])return s;c.push(k),d[k]=!0,f=k+a,u=void 0}else g=!0}m=S}if(g&&l&&l(),c.length===0)return s;o&&o();let w=s.slice(0,c[0]);for(let S=0;S<c.length;++S){const k=c[S],O=c[S+1]||s.length;k===0?w=`
9
- ${e}${s.slice(0,O)}`:(t===Be&&d[k]&&(w+=`${s[k]}\\`),w+=`
10
- ${e}${s.slice(k+1,O)}`)}return w}function Ct(s,e,t){let n=e,i=e+1,r=s[i];for(;r===" "||r===" ";)if(e<i+t)r=s[++e];else{do r=s[++e];while(r&&r!==`
11
- `);n=e,i=e+1,r=s[i]}return n}const Je=(s,e)=>({indentAtStart:e?s.indent.length:s.indentAtStart,lineWidth:s.options.lineWidth,minContentWidth:s.options.minContentWidth}),Ye=s=>/^(%|---|\.\.\.)/m.test(s);function Us(s,e,t){if(!e||e<0)return!1;const n=e-t,i=s.length;if(i<=n)return!1;for(let r=0,o=0;r<i;++r)if(s[r]===`
12
- `){if(r-o>n)return!0;if(o=r+1,i-o<=n)return!1}return!0}function Se(s,e){const t=JSON.stringify(s);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(Ye(s)?" ":"");let o="",l=0;for(let a=0,c=t[a];c;c=t[++a])if(c===" "&&t[a+1]==="\\"&&t[a+2]==="n"&&(o+=t.slice(l,a)+"\\ ",a+=1,l=a,c="\\"),c==="\\")switch(t[a+1]){case"u":{o+=t.slice(l,a);const d=t.substr(a+2,4);switch(d){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:d.substr(0,2)==="00"?o+="\\x"+d.substr(2):o+=t.substr(a,6)}a+=5,l=a+1}break;case"n":if(n||t[a+2]==='"'||t.length<i)a+=1;else{for(o+=t.slice(l,a)+`
13
-
14
- `;t[a+2]==="\\"&&t[a+3]==="n"&&t[a+4]!=='"';)o+=`
15
- `,a+=2;o+=r,t[a+2]===" "&&(o+="\\"),a+=1,l=a+1}break;default:a+=1}return o=l?o+t.slice(l):t,n?o:Ve(o,r,Be,Je(e,!1))}function ft(s,e){if(e.options.singleQuote===!1||e.implicitKey&&s.includes(`
16
- `)||/[ \t]\n|\n[ \t]/.test(s))return Se(s,e);const t=e.indent||(Ye(s)?" ":""),n="'"+s.replace(/'/g,"''").replace(/\n+/g,`$&
17
- ${t}`)+"'";return e.implicitKey?n:Ve(n,t,zt,Je(e,!1))}function le(s,e){const{singleQuote:t}=e.options;let n;if(t===!1)n=Se;else{const i=s.includes('"'),r=s.includes("'");i&&!r?n=ft:r&&!i?n=Se:n=t?ft:Se}return n(s,e)}let ut;try{ut=new RegExp(`(^|(?<!
18
- ))
19
- +(?!
20
- |$)`,"g")}catch{ut=/\n+(?!\n|$)/g}function Me({comment:s,type:e,value:t},n,i,r){const{blockQuote:o,commentString:l,lineWidth:a}=n.options;if(!o||/\n[\t ]+$/.test(t))return le(t,n);const c=n.indent||(n.forceBlockIndent||Ye(t)?" ":""),d=o==="literal"?!0:o==="folded"||e===N.BLOCK_FOLDED?!1:e===N.BLOCK_LITERAL?!0:!Us(t,a,c.length);if(!t)return d?`|
21
- `:`>
22
- `;let f,u;for(u=t.length;u>0;--u){const O=t[u-1];if(O!==`
23
- `&&O!==" "&&O!==" ")break}let m=t.substring(u);const g=m.indexOf(`
24
- `);g===-1?f="-":t===m||g!==m.length-1?(f="+",r&&r()):f="",m&&(t=t.slice(0,-m.length),m[m.length-1]===`
25
- `&&(m=m.slice(0,-1)),m=m.replace(ut,`$&${c}`));let h=!1,p,b=-1;for(p=0;p<t.length;++p){const O=t[p];if(O===" ")h=!0;else if(O===`
26
- `)b=p;else break}let w=t.substring(0,b<p?b+1:p);w&&(t=t.substring(w.length),w=w.replace(/\n+/g,`$&${c}`));let k=(h?c?"2":"1":"")+f;if(s&&(k+=" "+l(s.replace(/ ?[\r\n]+/g," ")),i&&i()),!d){const O=t.replace(/\n+/g,`
27
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let A=!1;const T=Je(n,!0);o!=="folded"&&e!==N.BLOCK_FOLDED&&(T.onOverflow=()=>{A=!0});const y=Ve(`${w}${O}${m}`,c,ct,T);if(!A)return`>${k}
28
- ${c}${y}`}return t=t.replace(/\n+/g,`$&${c}`),`|${k}
29
- ${c}${w}${t}${m}`}function Fs(s,e,t,n){const{type:i,value:r}=s,{actualString:o,implicitKey:l,indent:a,indentStep:c,inFlow:d}=e;if(l&&r.includes(`
30
- `)||d&&/[[\]{},]/.test(r))return le(r,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return l||d||!r.includes(`
31
- `)?le(r,e):Me(s,e,t,n);if(!l&&!d&&i!==N.PLAIN&&r.includes(`
32
- `))return Me(s,e,t,n);if(Ye(r)){if(a==="")return e.forceBlockIndent=!0,Me(s,e,t,n);if(l&&a===c)return le(r,e)}const f=r.replace(/\n+/g,`$&
33
- ${a}`);if(o){const u=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(f),{compat:m,tags:g}=e.doc.schema;if(g.some(u)||m?.some(u))return le(r,e)}return l?f:Ve(f,a,zt,Je(e,!1))}function Ae(s,e,t,n){const{implicitKey:i,inFlow:r}=e,o=typeof s.value=="string"?s:Object.assign({},s,{value:String(s.value)});let{type:l}=s;l!==N.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(l=N.QUOTE_DOUBLE);const a=d=>{switch(d){case N.BLOCK_FOLDED:case N.BLOCK_LITERAL:return i||r?le(o.value,e):Me(o,e,t,n);case N.QUOTE_DOUBLE:return Se(o.value,e);case N.QUOTE_SINGLE:return ft(o.value,e);case N.PLAIN:return Fs(o,e,t,n);default:return null}};let c=a(l);if(c===null){const{defaultKeyType:d,defaultStringType:f}=e.options,u=i&&d||f;if(c=a(u),c===null)throw new Error(`Unsupported default string type ${u}`)}return c}function Zt(s,e){const t=Object.assign({blockQuote:!0,commentString:Rs,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},s.schema.toStringOptions,e);let n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:s,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function Vs(s,e){if(e.tag){const i=s.filter(r=>r.tag===e.tag);if(i.length>0)return i.find(r=>r.format===e.format)??i[0]}let t,n;if(E(e)){n=e.value;let i=s.filter(r=>r.identify?.(n));if(i.length>1){const r=i.filter(o=>o.test);r.length>0&&(i=r)}t=i.find(r=>r.format===e.format)??i.find(r=>!r.format)}else n=e,t=s.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!t){const i=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return t}function Js(s,e,{anchors:t,doc:n}){if(!n.directives)return"";const i=[],r=(E(s)||L(s))&&s.anchor;r&&Gt(r)&&(t.add(r),i.push(`&${r}`));const o=s.tag??(e.default?null:e.tag);return o&&i.push(n.directives.tagString(o)),i.join(" ")}function fe(s,e,t,n){if(I(s))return s.toString(e,t,n);if(Z(s)){if(e.doc.directives)return s.toString(e);if(e.resolvedAliases?.has(s))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(s):e.resolvedAliases=new Set([s]),s=s.resolve(e.doc)}let i;const r=$(s)?s:e.doc.createNode(s,{onTagObj:a=>i=a});i??(i=Vs(e.doc.schema.tags,r));const o=Js(r,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const l=typeof i.stringify=="function"?i.stringify(r,e,t,n):E(r)?Ae(r,e,t,n):r.toString(e,t,n);return o?E(r)||l[0]==="{"||l[0]==="["?`${o} ${l}`:`${o}
34
- ${e.indent}${l}`:l}function Ys({key:s,value:e},t,n,i){const{allNullValues:r,doc:o,indent:l,indentStep:a,options:{commentString:c,indentSeq:d,simpleKeys:f}}=t;let u=$(s)&&s.comment||null;if(f){if(u)throw new Error("With simple keys, key nodes cannot have comments");if(L(s)||!$(s)&&typeof s=="object"){const T="With simple keys, collection cannot be used as a key value";throw new Error(T)}}let m=!f&&(!s||u&&e==null&&!t.inFlow||L(s)||(E(s)?s.type===N.BLOCK_FOLDED||s.type===N.BLOCK_LITERAL:typeof s=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!m&&(f||!r),indent:l+a});let g=!1,h=!1,p=fe(s,t,()=>g=!0,()=>h=!0);if(!m&&!t.inFlow&&p.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(t.inFlow){if(r||e==null)return g&&n&&n(),p===""?"?":m?`? ${p}`:p}else if(r&&!f||e==null&&m)return p=`? ${p}`,u&&!g?p+=W(p,t.indent,c(u)):h&&i&&i(),p;g&&(u=null),m?(u&&(p+=W(p,t.indent,c(u))),p=`? ${p}
35
- ${l}:`):(p=`${p}:`,u&&(p+=W(p,t.indent,c(u))));let b,w,S;$(e)?(b=!!e.spaceBefore,w=e.commentBefore,S=e.comment):(b=!1,w=null,S=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!m&&!u&&E(e)&&(t.indentAtStart=p.length+1),h=!1,!d&&a.length>=2&&!t.inFlow&&!m&&pe(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let k=!1;const O=fe(e,t,()=>k=!0,()=>h=!0);let A=" ";if(u||b||w){if(A=b?`
36
- `:"",w){const T=c(w);A+=`
37
- ${F(T,t.indent)}`}O===""&&!t.inFlow?A===`
38
- `&&S&&(A=`
39
-
40
- `):A+=`
41
- ${t.indent}`}else if(!m&&L(e)){const T=O[0],y=O.indexOf(`
42
- `),C=y!==-1,J=t.inFlow??e.flow??e.items.length===0;if(C||!J){let te=!1;if(C&&(T==="&"||T==="!")){let _=O.indexOf(" ");T==="&"&&_!==-1&&_<y&&O[_+1]==="!"&&(_=O.indexOf(" ",_+1)),(_===-1||y<_)&&(te=!0)}te||(A=`
43
- ${t.indent}`)}}else(O===""||O[0]===`
44
- `)&&(A="");return p+=A+O,t.inFlow?k&&n&&n():S&&!k?p+=W(p,t.indent,c(S)):h&&i&&i(),p}function xt(s,e){(s==="debug"||s==="warn")&&console.warn(e)}const Ie="<<",V={identify:s=>s===Ie||typeof s=="symbol"&&s.description===Ie,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new N(Symbol(Ie)),{addToJSMap:es}),stringify:()=>Ie},Gs=(s,e)=>(V.identify(e)||E(e)&&(!e.type||e.type===N.PLAIN)&&V.identify(e.value))&&s?.doc.schema.tags.some(t=>t.tag===V.tag&&t.default);function es(s,e,t){const n=ts(s,t);if(pe(n))for(const i of n.items)tt(s,e,i);else if(Array.isArray(n))for(const i of n)tt(s,e,i);else tt(s,e,n)}function tt(s,e,t){const n=ts(s,t);if(!de(n))throw new Error("Merge sources must be maps or map aliases");const i=n.toJSON(null,s,Map);for(const[r,o]of i)e instanceof Map?e.has(r)||e.set(r,o):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function ts(s,e){return s&&Z(e)?e.resolve(s.doc,s):e}function ss(s,e,{key:t,value:n}){if($(t)&&t.addToJSMap)t.addToJSMap(s,e,n);else if(Gs(s,t))es(s,e,n);else{const i=j(t,"",s);if(e instanceof Map)e.set(i,j(n,i,s));else if(e instanceof Set)e.add(i);else{const r=Qs(t,i,s),o=j(n,r,s);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}function Qs(s,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if($(s)&&t?.doc){const n=Zt(t.doc,{});n.anchors=new Set;for(const r of t.anchors.keys())n.anchors.add(r.anchor);n.inFlow=!0,n.inStringifyKey=!0;const i=s.toString(n);if(!t.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),xt(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}function gt(s,e,t){const n=ke(s,void 0,t),i=ke(e,void 0,t);return new v(n,i)}class v{constructor(e,t=null){Object.defineProperty(this,P,{value:Rt}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return $(t)&&(t=t.clone(e)),$(n)&&(n=n.clone(e)),new v(t,n)}toJSON(e,t){const n=t?.mapAsMap?new Map:{};return ss(t,n,this)}toString(e,t,n){return e?.doc?Ys(this,e,t,n):JSON.stringify(this)}}function ns(s,e,t){return(e.inFlow??s.flow?Hs:Ws)(s,e,t)}function Ws({comment:s,items:e},t,{blockItemPrefix:n,flowChars:i,itemIndent:r,onChompKeep:o,onComment:l}){const{indent:a,options:{commentString:c}}=t,d=Object.assign({},t,{indent:r,type:null});let f=!1;const u=[];for(let g=0;g<e.length;++g){const h=e[g];let p=null;if($(h))!f&&h.spaceBefore&&u.push(""),Pe(t,u,h.commentBefore,f),h.comment&&(p=h.comment);else if(I(h)){const w=$(h.key)?h.key:null;w&&(!f&&w.spaceBefore&&u.push(""),Pe(t,u,w.commentBefore,f))}f=!1;let b=fe(h,d,()=>p=null,()=>f=!0);p&&(b+=W(b,r,c(p))),f&&p&&(f=!1),u.push(n+b)}let m;if(u.length===0)m=i.start+i.end;else{m=u[0];for(let g=1;g<u.length;++g){const h=u[g];m+=h?`
45
- ${a}${h}`:`
46
- `}}return s?(m+=`
47
- `+F(c(s),a),l&&l()):f&&o&&o(),m}function Hs({items:s},e,{flowChars:t,itemIndent:n}){const{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:l}}=e;n+=r;const a=Object.assign({},e,{indent:n,inFlow:!0,type:null});let c=!1,d=0;const f=[];for(let g=0;g<s.length;++g){const h=s[g];let p=null;if($(h))h.spaceBefore&&f.push(""),Pe(e,f,h.commentBefore,!1),h.comment&&(p=h.comment);else if(I(h)){const w=$(h.key)?h.key:null;w&&(w.spaceBefore&&f.push(""),Pe(e,f,w.commentBefore,!1),w.comment&&(c=!0));const S=$(h.value)?h.value:null;S?(S.comment&&(p=S.comment),S.commentBefore&&(c=!0)):h.value==null&&w?.comment&&(p=w.comment)}p&&(c=!0);let b=fe(h,a,()=>p=null);c||(c=f.length>d||b.includes(`
48
- `)),g<s.length-1?b+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=f.reduce((w,S)=>w+S.length+2,2)+(b.length+2)>e.options.lineWidth)),c&&(b+=",")),p&&(b+=W(b,n,l(p))),f.push(b),d=f.length}const{start:u,end:m}=t;if(f.length===0)return u+m;if(!c){const g=f.reduce((h,p)=>h+p.length+2,2);c=e.options.lineWidth>0&&g>e.options.lineWidth}if(c){let g=u;for(const h of f)g+=h?`
49
- ${r}${i}${h}`:`
50
- `;return`${g}
51
- ${i}${m}`}else return`${u}${o}${f.join(" ")}${o}${m}`}function Pe({indent:s,options:{commentString:e}},t,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){const r=F(e(n),s);t.push(r.trimStart())}}function H(s,e){const t=E(e)?e.value:e;for(const n of s)if(I(n)&&(n.key===e||n.key===t||E(n.key)&&n.key.value===t))return n}class K extends Xt{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(G,e),this.items=[]}static from(e,t,n){const{keepUndefined:i,replacer:r}=n,o=new this(e),l=(a,c)=>{if(typeof r=="function")c=r.call(t,a,c);else if(Array.isArray(r)&&!r.includes(a))return;(c!==void 0||i)&&o.items.push(gt(a,c,n))};if(t instanceof Map)for(const[a,c]of t)l(a,c);else if(t&&typeof t=="object")for(const a of Object.keys(t))l(a,t[a]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;I(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new v(e,e?.value):n=new v(e.key,e.value);const i=H(this.items,n.key),r=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${n.key} already set`);E(i.value)&&Ht(n.value)?i.value.value=n.value:i.value=n.value}else if(r){const o=this.items.findIndex(l=>r(n,l)<0);o===-1?this.items.push(n):this.items.splice(o,0,n)}else this.items.push(n)}delete(e){const t=H(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const i=H(this.items,e)?.value;return(!t&&E(i)?i.value:i)??void 0}has(e){return!!H(this.items,e)}set(e,t){this.add(new v(e,t),!0)}toJSON(e,t,n){const i=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(const r of this.items)ss(t,i,r);return i}toString(e,t,n){if(!e)return JSON.stringify(this);for(const i of this.items)if(!I(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ns(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}const me={collection:"map",default:!0,nodeClass:K,tag:"tag:yaml.org,2002:map",resolve(s,e){return de(s)||e("Expected a mapping for this tag"),s},createNode:(s,e,t)=>K.from(s,e,t)};class Q extends Xt{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(he,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Le(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const n=Le(e);if(typeof n!="number")return;const i=this.items[n];return!t&&E(i)?i.value:i}has(e){const t=Le(e);return typeof t=="number"&&t<this.items.length}set(e,t){const n=Le(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[n];E(i)&&Ht(t)?i.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let i=0;for(const r of this.items)n.push(j(r,String(i++),t));return n}toString(e,t,n){return e?ns(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){const{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let l of t){if(typeof i=="function"){const a=t instanceof Set?l:String(o++);l=i.call(t,a,l)}r.items.push(ke(l,void 0,n))}}return r}}function Le(s){let e=E(s)?s.value:s;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const ge={collection:"seq",default:!0,nodeClass:Q,tag:"tag:yaml.org,2002:seq",resolve(s,e){return pe(s)||e("Expected a sequence for this tag"),s},createNode:(s,e,t)=>Q.from(s,e,t)},Ge={identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify(s,e,t,n){return e=Object.assign({actualString:!0},e),Ae(s,e,t,n)}},Qe={identify:s=>s==null,createNode:()=>new N(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new N(null),stringify:({source:s},e)=>typeof s=="string"&&Qe.test.test(s)?s:e.options.nullStr},yt={identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:s=>new N(s[0]==="t"||s[0]==="T"),stringify({source:s,value:e},t){if(s&&yt.test.test(s)){const n=s[0]==="t"||s[0]==="T";if(e===n)return s}return e?t.options.trueStr:t.options.falseStr}};function q({format:s,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);const i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=Object.is(n,-0)?"-0":JSON.stringify(n);if(!s&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^-?\d/.test(r)&&!r.includes("e")){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let l=e-(r.length-o-1);for(;l-- >0;)r+="0"}return r}const is={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:q},rs={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s),stringify(s){const e=Number(s.value);return isFinite(e)?e.toExponential():q(s)}},os={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(s){const e=new N(parseFloat(s)),t=s.indexOf(".");return t!==-1&&s[s.length-1]==="0"&&(e.minFractionDigits=s.length-t-1),e},stringify:q},We=s=>typeof s=="bigint"||Number.isInteger(s),bt=(s,e,t,{intAsBigInt:n})=>n?BigInt(s):parseInt(s.substring(e),t);function ls(s,e,t){const{value:n}=s;return We(n)&&n>=0?t+n.toString(e):q(s)}const as={identify:s=>We(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(s,e,t)=>bt(s,2,8,t),stringify:s=>ls(s,8,"0o")},cs={identify:We,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(s,e,t)=>bt(s,0,10,t),stringify:q},fs={identify:s=>We(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(s,e,t)=>bt(s,2,16,t),stringify:s=>ls(s,16,"0x")},Xs=[me,ge,Ge,Qe,yt,as,cs,fs,is,rs,os];function _t(s){return typeof s=="bigint"||Number.isInteger(s)}const $e=({value:s})=>JSON.stringify(s),zs=[{identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify:$e},{identify:s=>s==null,createNode:()=>new N(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:$e},{identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:s=>s==="true",stringify:$e},{identify:_t,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(s,e,{intAsBigInt:t})=>t?BigInt(s):parseInt(s,10),stringify:({value:s})=>_t(s)?s.toString():JSON.stringify(s)},{identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:s=>parseFloat(s),stringify:$e}],Zs={default:!0,tag:"",test:/^/,resolve(s,e){return e(`Unresolved plain scalar ${JSON.stringify(s)}`),s}},xs=[me,ge].concat(zs,Zs),wt={identify:s=>s instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(s,e){if(typeof atob=="function"){const t=atob(s.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),s},stringify({comment:s,type:e,value:t},n,i,r){if(!t)return"";const o=t;let l;if(typeof btoa=="function"){let a="";for(let c=0;c<o.length;++c)a+=String.fromCharCode(o[c]);l=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=N.BLOCK_LITERAL),e!==N.QUOTE_DOUBLE){const a=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),c=Math.ceil(l.length/a),d=new Array(c);for(let f=0,u=0;f<c;++f,u+=a)d[f]=l.substr(u,a);l=d.join(e===N.BLOCK_LITERAL?`
52
- `:" ")}return Ae({comment:s,type:e,value:l},n,i,r)}};function us(s,e){if(pe(s))for(let t=0;t<s.items.length;++t){let n=s.items[t];if(!I(n)){if(de(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");const i=n.items[0]||new v(new N(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
53
- ${i.key.commentBefore}`:n.commentBefore),n.comment){const r=i.value??i.key;r.comment=r.comment?`${n.comment}
54
- ${r.comment}`:n.comment}n=i}s.items[t]=I(n)?n:new v(n)}}else e("Expected a sequence for this tag");return s}function hs(s,e,t){const{replacer:n}=t,i=new Q(s);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(r++),o));let l,a;if(Array.isArray(o))if(o.length===2)l=o[0],a=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const c=Object.keys(o);if(c.length===1)l=c[0],a=o[l];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else l=o;i.items.push(gt(l,a,t))}return i}const St={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:us,createNode:hs};class ae extends Q{constructor(){super(),this.add=K.prototype.add.bind(this),this.delete=K.prototype.delete.bind(this),this.get=K.prototype.get.bind(this),this.has=K.prototype.has.bind(this),this.set=K.prototype.set.bind(this),this.tag=ae.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t?.onCreate&&t.onCreate(n);for(const i of this.items){let r,o;if(I(i)?(r=j(i.key,"",t),o=j(i.value,r,t)):r=j(i,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,o)}return n}static from(e,t,n){const i=hs(e,t,n),r=new this;return r.items=i.items,r}}ae.tag="tag:yaml.org,2002:omap";const kt={collection:"seq",identify:s=>s instanceof Map,nodeClass:ae,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,e){const t=us(s,e),n=[];for(const{key:i}of t.items)E(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new ae,t)},createNode:(s,e,t)=>ae.from(s,e,t)};function ds({value:s,source:e},t){return e&&(s?ps:ms).test.test(e)?e:s?t.options.trueStr:t.options.falseStr}const ps={identify:s=>s===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new N(!0),stringify:ds},ms={identify:s=>s===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new N(!1),stringify:ds},en={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:q},tn={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s.replace(/_/g,"")),stringify(s){const e=Number(s.value);return isFinite(e)?e.toExponential():q(s)}},sn={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(s){const e=new N(parseFloat(s.replace(/_/g,""))),t=s.indexOf(".");if(t!==-1){const n=s.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:q},Ee=s=>typeof s=="bigint"||Number.isInteger(s);function He(s,e,t,{intAsBigInt:n}){const i=s[0];if((i==="-"||i==="+")&&(e+=1),s=s.substring(e).replace(/_/g,""),n){switch(t){case 2:s=`0b${s}`;break;case 8:s=`0o${s}`;break;case 16:s=`0x${s}`;break}const o=BigInt(s);return i==="-"?BigInt(-1)*o:o}const r=parseInt(s,t);return i==="-"?-1*r:r}function Nt(s,e,t){const{value:n}=s;if(Ee(n)){const i=n.toString(e);return n<0?"-"+t+i.substr(1):t+i}return q(s)}const nn={identify:Ee,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(s,e,t)=>He(s,2,2,t),stringify:s=>Nt(s,2,"0b")},rn={identify:Ee,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(s,e,t)=>He(s,1,8,t),stringify:s=>Nt(s,8,"0")},on={identify:Ee,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(s,e,t)=>He(s,0,10,t),stringify:q},ln={identify:Ee,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(s,e,t)=>He(s,2,16,t),stringify:s=>Nt(s,16,"0x")};class ce extends K{constructor(e){super(e),this.tag=ce.tag}add(e){let t;I(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new v(e.key,null):t=new v(e,null),H(this.items,t.key)||this.items.push(t)}get(e,t){const n=H(this.items,e);return!t&&I(n)?E(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}`);const n=H(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new v(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){const{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),r.items.push(gt(o,null,n));return r}}ce.tag="tag:yaml.org,2002:set";const Ot={collection:"map",identify:s=>s instanceof Set,nodeClass:ce,default:!1,tag:"tag:yaml.org,2002:set",createNode:(s,e,t)=>ce.from(s,e,t),resolve(s,e){if(de(s)){if(s.hasAllNullValues(!0))return Object.assign(new ce,s);e("Set items must all have null values")}else e("Expected a mapping for this tag");return s}};function At(s,e){const t=s[0],n=t==="-"||t==="+"?s.substring(1):s,i=o=>e?BigInt(o):Number(o),r=n.replace(/_/g,"").split(":").reduce((o,l)=>o*i(60)+i(l),i(0));return t==="-"?i(-1)*r:r}function gs(s){let{value:e}=s,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return q(s);let n="";e<0&&(n="-",e*=t(-1));const i=t(60),r=[e%i];return e<60?r.unshift(0):(e=(e-r[0])/i,r.unshift(e%i),e>=60&&(e=(e-r[0])/i,r.unshift(e))),n+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const ys={identify:s=>typeof s=="bigint"||Number.isInteger(s),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(s,e,{intAsBigInt:t})=>At(s,t),stringify:gs},bs={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:s=>At(s,!1),stringify:gs},Xe={identify:s=>s 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(s){const e=s.match(Xe.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,n,i,r,o,l]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0;let c=Date.UTC(t,n-1,i,r||0,o||0,l||0,a);const d=e[8];if(d&&d!=="Z"){let f=At(d,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:s})=>s?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},vt=[me,ge,Ge,Qe,ps,ms,nn,rn,on,ln,en,tn,sn,wt,V,kt,St,Ot,ys,bs,Xe],Bt=new Map([["core",Xs],["failsafe",[me,ge,Ge]],["json",xs],["yaml11",vt],["yaml-1.1",vt]]),Mt={binary:wt,bool:yt,float:os,floatExp:rs,floatNaN:is,floatTime:bs,int:cs,intHex:fs,intOct:as,intTime:ys,map:me,merge:V,null:Qe,omap:kt,pairs:St,seq:ge,set:Ot,timestamp:Xe},an={"tag:yaml.org,2002:binary":wt,"tag:yaml.org,2002:merge":V,"tag:yaml.org,2002:omap":kt,"tag:yaml.org,2002:pairs":St,"tag:yaml.org,2002:set":Ot,"tag:yaml.org,2002:timestamp":Xe};function st(s,e,t){const n=Bt.get(e);if(n&&!s)return t&&!n.includes(V)?n.concat(V):n.slice();let i=n;if(!i)if(Array.isArray(s))i=[];else{const r=Array.from(Bt.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(s))for(const r of s)i=i.concat(r);else typeof s=="function"&&(i=s(i.slice()));return t&&(i=i.concat(V)),i.reduce((r,o)=>{const l=typeof o=="string"?Mt[o]:o;if(!l){const a=JSON.stringify(o),c=Object.keys(Mt).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${a}; use one of ${c}`)}return r.includes(l)||r.push(l),r},[])}const cn=(s,e)=>s.key<e.key?-1:s.key>e.key?1:0;class ze{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:l}){this.compat=Array.isArray(e)?st(e,"compat"):e?st(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=i?an:{},this.tags=st(t,this.name,n),this.toStringOptions=l??null,Object.defineProperty(this,G,{value:me}),Object.defineProperty(this,U,{value:Ge}),Object.defineProperty(this,he,{value:ge}),this.sortMapEntries=typeof o=="function"?o:o===!0?cn:null}clone(){const e=Object.create(ze.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function fn(s,e){const t=[];let n=e.directives===!0;if(e.directives!==!1&&s.directives){const a=s.directives.toString(s);a?(t.push(a),n=!0):s.directives.docStart&&(n=!0)}n&&t.push("---");const i=Zt(s,e),{commentString:r}=i.options;if(s.commentBefore){t.length!==1&&t.unshift("");const a=r(s.commentBefore);t.unshift(F(a,""))}let o=!1,l=null;if(s.contents){if($(s.contents)){if(s.contents.spaceBefore&&n&&t.push(""),s.contents.commentBefore){const d=r(s.contents.commentBefore);t.push(F(d,""))}i.forceBlockIndent=!!s.comment,l=s.contents.comment}const a=l?void 0:()=>o=!0;let c=fe(s.contents,i,()=>l=null,a);l&&(c+=W(c,"",r(l))),(c[0]==="|"||c[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${c}`:t.push(c)}else t.push(fe(s.contents,i));if(s.directives?.docEnd)if(s.comment){const a=r(s.comment);a.includes(`
55
- `)?(t.push("..."),t.push(F(a,""))):t.push(`... ${a}`)}else t.push("...");else{let a=s.comment;a&&o&&(a=a.replace(/^\n+/,"")),a&&((!o||l)&&t[t.length-1]!==""&&t.push(""),t.push(F(r(a),"")))}return t.join(`
56
- `)+`
57
- `}class ye{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,P,{value:at});let i=null;typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=t,t=void 0);const r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=r;let{version:o}=r;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new B({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){const e=Object.create(ye.prototype,{[P]:{value:at}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=$(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){se(this.contents)&&this.contents.add(e)}addIn(e,t){se(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=Qt(this);e.anchor=!t||n.has(t)?Wt(t||"a",n):t}return new Fe(e.anchor)}createNode(e,t,n){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){const p=w=>typeof w=="number"||w instanceof String||w instanceof Number,b=t.filter(p).map(String);b.length>0&&(t=t.concat(b)),i=t}else n===void 0&&t&&(n=t,t=void 0);const{aliasDuplicateObjects:r,anchorPrefix:o,flow:l,keepUndefined:a,onTagObj:c,tag:d}=n??{},{onAnchor:f,setAnchors:u,sourceObjects:m}=Ps(this,o||"a"),g={aliasDuplicateObjects:r??!0,keepUndefined:a??!1,onAnchor:f,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:m},h=ke(e,d,g);return l&&L(h)&&(h.flow=!0),u(),h}createPair(e,t,n={}){const i=this.createNode(e,null,n),r=this.createNode(t,null,n);return new v(i,r)}delete(e){return se(this.contents)?this.contents.delete(e):!1}deleteIn(e){return we(e)?this.contents==null?!1:(this.contents=null,!0):se(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return L(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return we(e)?!t&&E(this.contents)?this.contents.value:this.contents:L(this.contents)?this.contents.getIn(e,t):void 0}has(e){return L(this.contents)?this.contents.has(e):!1}hasIn(e){return we(e)?this.contents!==void 0:L(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=je(this.schema,[e],t):se(this.contents)&&this.contents.set(e,t)}setIn(e,t){we(e)?this.contents=t:this.contents==null?this.contents=je(this.schema,Array.from(e),t):se(this.contents)&&this.contents.setIn(e,t)}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 B({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 B({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new ze(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:i,onAnchor:r,reviver:o}={}){const l={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=j(this.contents,t??"",l);if(typeof r=="function")for(const{count:c,res:d}of l.anchors.values())r(d,c);return typeof o=="function"?oe(o,{"":a},"",a):a}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)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return fn(this,e)}}function se(s){if(L(s))return!0;throw new Error("Expected a YAML collection as document contents")}class Et extends Error{constructor(e,t,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=t}}class X extends Et{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class ws extends Et{constructor(e,t,n){super("YAMLWarning",e,t,n)}}const De=(s,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(l=>e.linePos(l));const{line:n,col:i}=t.linePos[0];t.message+=` at line ${n}, column ${i}`;let r=i-1,o=s.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){const l=Math.min(r-39,o.length-79);o="…"+o.substring(l),r-=l-1}if(o.length>80&&(o=o.substring(0,79)+"…"),n>1&&/^ *$/.test(o.substring(0,r))){let l=s.substring(e.lineStarts[n-2],e.lineStarts[n-1]);l.length>80&&(l=l.substring(0,79)+`…
58
- `),o=l+o}if(/[^ ]/.test(o)){let l=1;const a=t.linePos[1];a?.line===n&&a.col>i&&(l=Math.max(1,Math.min(a.col-i,80-r)));const c=" ".repeat(r)+"^".repeat(l);t.message+=`:
59
-
60
- ${o}
61
- ${c}
62
- `}};function ue(s,{flow:e,indicator:t,next:n,offset:i,onError:r,parentIndent:o,startOnNewline:l}){let a=!1,c=l,d=l,f="",u="",m=!1,g=!1,h=null,p=null,b=null,w=null,S=null,k=null,O=null;for(const y of s)switch(g&&(y.type!=="space"&&y.type!=="newline"&&y.type!=="comma"&&r(y.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),h&&(c&&y.type!=="comment"&&y.type!=="newline"&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),y.type){case"space":!e&&(t!=="doc-start"||n?.type!=="flow-collection")&&y.source.includes(" ")&&(h=y),d=!0;break;case"comment":{d||r(y,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const C=y.source.substring(1)||" ";f?f+=u+C:f=C,u="",c=!1;break}case"newline":c?f?f+=y.source:(!k||t!=="seq-item-ind")&&(a=!0):u+=y.source,c=!0,m=!0,(p||b)&&(w=y),d=!0;break;case"anchor":p&&r(y,"MULTIPLE_ANCHORS","A node can have at most one anchor"),y.source.endsWith(":")&&r(y.offset+y.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),p=y,O??(O=y.offset),c=!1,d=!1,g=!0;break;case"tag":{b&&r(y,"MULTIPLE_TAGS","A node can have at most one tag"),b=y,O??(O=y.offset),c=!1,d=!1,g=!0;break}case t:(p||b)&&r(y,"BAD_PROP_ORDER",`Anchors and tags must be after the ${y.source} indicator`),k&&r(y,"UNEXPECTED_TOKEN",`Unexpected ${y.source} in ${e??"collection"}`),k=y,c=t==="seq-item-ind"||t==="explicit-key-ind",d=!1;break;case"comma":if(e){S&&r(y,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),S=y,c=!1,d=!1;break}default:r(y,"UNEXPECTED_TOKEN",`Unexpected ${y.type} token`),c=!1,d=!1}const A=s[s.length-1],T=A?A.offset+A.source.length:i;return g&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&r(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(c&&h.indent<=o||n?.type==="block-map"||n?.type==="block-seq")&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:S,found:k,spaceBefore:a,comment:f,hasNewline:m,anchor:p,tag:b,newlineAfterProp:w,end:T,start:O??T}}function Ne(s){if(!s)return null;switch(s.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(s.source.includes(`
63
- `))return!0;if(s.end){for(const e of s.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of s.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(Ne(e.key)||Ne(e.value))return!0}return!1;default:return!0}}function ht(s,e,t){if(e?.type==="flow-collection"){const n=e.end[0];n.indent===s&&(n.source==="]"||n.source==="}")&&Ne(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Ss(s,e,t){const{uniqueKeys:n}=s.options;if(n===!1)return!1;const i=typeof n=="function"?n:(r,o)=>r===o||E(r)&&E(o)&&r.value===o.value;return e.some(r=>i(r.key,t))}const Kt="All mapping items must start at the same column";function un({composeNode:s,composeEmptyNode:e},t,n,i,r){const o=r?.nodeClass??K,l=new o(t.schema);t.atRoot&&(t.atRoot=!1);let a=n.offset,c=null;for(const d of n.items){const{start:f,key:u,sep:m,value:g}=d,h=ue(f,{indicator:"explicit-key-ind",next:u??m?.[0],offset:a,onError:i,parentIndent:n.indent,startOnNewline:!0}),p=!h.found;if(p){if(u&&(u.type==="block-seq"?i(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in u&&u.indent!==n.indent&&i(a,"BAD_INDENT",Kt)),!h.anchor&&!h.tag&&!m){c=h.end,h.comment&&(l.comment?l.comment+=`
64
- `+h.comment:l.comment=h.comment);continue}(h.newlineAfterProp||Ne(u))&&i(u??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==n.indent&&i(a,"BAD_INDENT",Kt);t.atKey=!0;const b=h.end,w=u?s(t,u,h,i):e(t,b,f,null,h,i);t.schema.compat&&ht(n.indent,u,i),t.atKey=!1,Ss(t,l.items,w)&&i(b,"DUPLICATE_KEY","Map keys must be unique");const S=ue(m??[],{indicator:"map-value-ind",next:g,offset:w.range[2],onError:i,parentIndent:n.indent,startOnNewline:!u||u.type==="block-scalar"});if(a=S.end,S.found){p&&(g?.type==="block-map"&&!S.hasNewline&&i(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&h.start<S.found.offset-1024&&i(w.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const k=g?s(t,g,S,i):e(t,a,m,null,S,i);t.schema.compat&&ht(n.indent,g,i),a=k.range[2];const O=new v(w,k);t.options.keepSourceTokens&&(O.srcToken=d),l.items.push(O)}else{p&&i(w.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),S.comment&&(w.comment?w.comment+=`
65
- `+S.comment:w.comment=S.comment);const k=new v(w);t.options.keepSourceTokens&&(k.srcToken=d),l.items.push(k)}}return c&&c<a&&i(c,"IMPOSSIBLE","Map comment with trailing content"),l.range=[n.offset,a,c??a],l}function hn({composeNode:s,composeEmptyNode:e},t,n,i,r){const o=r?.nodeClass??Q,l=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let a=n.offset,c=null;for(const{start:d,value:f}of n.items){const u=ue(d,{indicator:"seq-item-ind",next:f,offset:a,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||f)f?.type==="block-seq"?i(u.end,"BAD_INDENT","All sequence items must start at the same column"):i(a,"MISSING_CHAR","Sequence item without - indicator");else{c=u.end,u.comment&&(l.comment=u.comment);continue}const m=f?s(t,f,u,i):e(t,u.end,d,null,u,i);t.schema.compat&&ht(n.indent,f,i),a=m.range[2],l.items.push(m)}return l.range=[n.offset,a,c??a],l}function Te(s,e,t,n){let i="";if(s){let r=!1,o="";for(const l of s){const{source:a,type:c}=l;switch(c){case"space":r=!0;break;case"comment":{t&&!r&&n(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const d=a.substring(1)||" ";i?i+=o+d:i=d,o="";break}case"newline":i&&(o+=a),r=!0;break;default:n(l,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=a.length}}return{comment:i,offset:e}}const nt="Block collections are not allowed within flow collections",it=s=>s&&(s.type==="block-map"||s.type==="block-seq");function dn({composeNode:s,composeEmptyNode:e},t,n,i,r){const o=n.start.source==="{",l=o?"flow map":"flow sequence",a=r?.nodeClass??(o?K:Q),c=new a(t.schema);c.flow=!0;const d=t.atRoot;d&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=n.offset+n.start.source.length;for(let p=0;p<n.items.length;++p){const b=n.items[p],{start:w,key:S,sep:k,value:O}=b,A=ue(w,{flow:l,indicator:"explicit-key-ind",next:S??k?.[0],offset:f,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!k&&!O){p===0&&A.comma?i(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):p<n.items.length-1&&i(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),A.comment&&(c.comment?c.comment+=`
66
- `+A.comment:c.comment=A.comment),f=A.end;continue}!o&&t.options.strict&&Ne(S)&&i(S,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(p===0)A.comma&&i(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(A.comma||i(A.start,"MISSING_CHAR",`Missing , between ${l} items`),A.comment){let T="";e:for(const y of w)switch(y.type){case"comma":case"space":break;case"comment":T=y.source.substring(1);break e;default:break e}if(T){let y=c.items[c.items.length-1];I(y)&&(y=y.value??y.key),y.comment?y.comment+=`
67
- `+T:y.comment=T,A.comment=A.comment.substring(T.length+1)}}if(!o&&!k&&!A.found){const T=O?s(t,O,A,i):e(t,A.end,k,null,A,i);c.items.push(T),f=T.range[2],it(O)&&i(T.range,"BLOCK_IN_FLOW",nt)}else{t.atKey=!0;const T=A.end,y=S?s(t,S,A,i):e(t,T,w,null,A,i);it(S)&&i(y.range,"BLOCK_IN_FLOW",nt),t.atKey=!1;const C=ue(k??[],{flow:l,indicator:"map-value-ind",next:O,offset:y.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(C.found){if(!o&&!A.found&&t.options.strict){if(k)for(const _ of k){if(_===C.found)break;if(_.type==="newline"){i(_,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<C.found.offset-1024&&i(C.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else O&&("source"in O&&O.source?.[0]===":"?i(O,"MISSING_CHAR",`Missing space after : in ${l}`):i(C.start,"MISSING_CHAR",`Missing , or : between ${l} items`));const J=O?s(t,O,C,i):C.found?e(t,C.end,k,null,C,i):null;J?it(O)&&i(J.range,"BLOCK_IN_FLOW",nt):C.comment&&(y.comment?y.comment+=`
68
- `+C.comment:y.comment=C.comment);const te=new v(y,J);if(t.options.keepSourceTokens&&(te.srcToken=b),o){const _=c;Ss(t,_.items,y)&&i(T,"DUPLICATE_KEY","Map keys must be unique"),_.items.push(te)}else{const _=new K(t.schema);_.flow=!0,_.items.push(te);const $t=(J??y).range;_.range=[y.range[0],$t[1],$t[2]],c.items.push(_)}f=J?J.range[2]:C.end}}const u=o?"}":"]",[m,...g]=n.end;let h=f;if(m?.source===u)h=m.offset+m.source.length;else{const p=l[0].toUpperCase()+l.substring(1),b=d?`${p} must end with a ${u}`:`${p} in block collection must be sufficiently indented and end with a ${u}`;i(f,d?"MISSING_CHAR":"BAD_INDENT",b),m&&m.source.length!==1&&g.unshift(m)}if(g.length>0){const p=Te(g,h,t.options.strict,i);p.comment&&(c.comment?c.comment+=`
69
- `+p.comment:c.comment=p.comment),c.range=[n.offset,h,p.offset]}else c.range=[n.offset,h,h];return c}function rt(s,e,t,n,i,r){const o=t.type==="block-map"?un(s,e,t,n,r):t.type==="block-seq"?hn(s,e,t,n,r):dn(s,e,t,n,r),l=o.constructor;return i==="!"||i===l.tagName?(o.tag=l.tagName,o):(i&&(o.tag=i),o)}function pn(s,e,t,n,i){const r=n.tag,o=r?e.directives.tagName(r.source,u=>i(r,"TAG_RESOLVE_FAILED",u)):null;if(t.type==="block-seq"){const{anchor:u,newlineAfterProp:m}=n,g=u&&r?u.offset>r.offset?u:r:u??r;g&&(!m||m.offset<g.offset)&&i(g,"MISSING_CHAR","Missing newline after block sequence props")}const l=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!r||!o||o==="!"||o===K.tagName&&l==="map"||o===Q.tagName&&l==="seq")return rt(s,e,t,i,o);let a=e.schema.tags.find(u=>u.tag===o&&u.collection===l);if(!a){const u=e.schema.knownTags[o];if(u?.collection===l)e.schema.tags.push(Object.assign({},u,{default:!1})),a=u;else return u?i(r,"BAD_COLLECTION_TYPE",`${u.tag} used for ${l} collection, but expects ${u.collection??"scalar"}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),rt(s,e,t,i,o)}const c=rt(s,e,t,i,o,a),d=a.resolve?.(c,u=>i(r,"TAG_RESOLVE_FAILED",u),e.options)??c,f=$(d)?d:new N(d);return f.range=c.range,f.tag=o,a?.format&&(f.format=a.format),f}function ks(s,e,t){const n=e.offset,i=mn(e,s.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};const r=i.mode===">"?N.BLOCK_FOLDED:N.BLOCK_LITERAL,o=e.source?gn(e.source):[];let l=o.length;for(let h=o.length-1;h>=0;--h){const p=o[h][1];if(p===""||p==="\r")l=h;else break}if(l===0){const h=i.chomp==="+"&&o.length>0?`
70
- `.repeat(Math.max(1,o.length-1)):"";let p=n+i.length;return e.source&&(p+=e.source.length),{value:h,type:r,comment:i.comment,range:[n,p,p]}}let a=e.indent+i.indent,c=e.offset+i.length,d=0;for(let h=0;h<l;++h){const[p,b]=o[h];if(b===""||b==="\r")i.indent===0&&p.length>a&&(a=p.length);else{p.length<a&&t(c+p.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(a=p.length),d=h,a===0&&!s.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=p.length+b.length+1}for(let h=o.length-1;h>=l;--h)o[h][0].length>a&&(l=h+1);let f="",u="",m=!1;for(let h=0;h<d;++h)f+=o[h][0].slice(a)+`
71
- `;for(let h=d;h<l;++h){let[p,b]=o[h];c+=p.length+b.length+1;const w=b[b.length-1]==="\r";if(w&&(b=b.slice(0,-1)),b&&p.length<a){const k=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;t(c-b.length-(w?2:1),"BAD_INDENT",k),p=""}r===N.BLOCK_LITERAL?(f+=u+p.slice(a)+b,u=`
72
- `):p.length>a||b[0]===" "?(u===" "?u=`
73
- `:!m&&u===`
74
- `&&(u=`
75
-
76
- `),f+=u+p.slice(a)+b,u=`
77
- `,m=!0):b===""?u===`
78
- `?f+=`
79
- `:u=`
80
- `:(f+=u+b,u=" ",m=!1)}switch(i.chomp){case"-":break;case"+":for(let h=l;h<o.length;++h)f+=`
81
- `+o[h][0].slice(a);f[f.length-1]!==`
82
- `&&(f+=`
83
- `);break;default:f+=`
84
- `}const g=n+i.length+e.source.length;return{value:f,type:r,comment:i.comment,range:[n,g,g]}}function mn({offset:s,props:e},t,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=e[0],r=i[0];let o=0,l="",a=-1;for(let u=1;u<i.length;++u){const m=i[u];if(!l&&(m==="-"||m==="+"))l=m;else{const g=Number(m);!o&&g?o=g:a===-1&&(a=s+u)}}a!==-1&&n(a,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,d="",f=i.length;for(let u=1;u<e.length;++u){const m=e[u];switch(m.type){case"space":c=!0;case"newline":f+=m.source.length;break;case"comment":t&&!c&&n(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=m.source.length,d=m.source.substring(1);break;case"error":n(m,"UNEXPECTED_TOKEN",m.message),f+=m.source.length;break;default:{const g=`Unexpected token in block scalar header: ${m.type}`;n(m,"UNEXPECTED_TOKEN",g);const h=m.source;h&&typeof h=="string"&&(f+=h.length)}}}return{mode:r,indent:o,chomp:l,comment:d,length:f}}function gn(s){const e=s.split(/\n( *)/),t=e[0],n=t.match(/^( *)/),r=[n?.[1]?[n[1],t.slice(n[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)r.push([e[o],e[o+1]]);return r}function Ns(s,e,t){const{offset:n,type:i,source:r,end:o}=s;let l,a;const c=(u,m,g)=>t(n+u,m,g);switch(i){case"scalar":l=N.PLAIN,a=yn(r,c);break;case"single-quoted-scalar":l=N.QUOTE_SINGLE,a=bn(r,c);break;case"double-quoted-scalar":l=N.QUOTE_DOUBLE,a=wn(r,c);break;default:return t(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+r.length,n+r.length]}}const d=n+r.length,f=Te(o,d,e,t);return{value:a,type:l,comment:f.comment,range:[n,d,f.offset]}}function yn(s,e){let t="";switch(s[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 ${s[0]}`;break}case"@":case"`":{t=`reserved character ${s[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Os(s)}function bn(s,e){return(s[s.length-1]!=="'"||s.length===1)&&e(s.length,"MISSING_CHAR","Missing closing 'quote"),Os(s.slice(1,-1)).replace(/''/g,"'")}function Os(s){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
85
- `,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
86
- `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=e.exec(s);if(!n)return s;let i=n[1],r=" ",o=e.lastIndex;for(t.lastIndex=o;n=t.exec(s);)n[1]===""?r===`
87
- `?i+=r:r=`
88
- `:(i+=r+n[1],r=" "),o=t.lastIndex;const l=/[ \t]*(.*)/sy;return l.lastIndex=o,n=l.exec(s),i+r+(n?.[1]??"")}function wn(s,e){let t="";for(let n=1;n<s.length-1;++n){const i=s[n];if(!(i==="\r"&&s[n+1]===`
89
- `))if(i===`
90
- `){const{fold:r,offset:o}=Sn(s,n);t+=r,n=o}else if(i==="\\"){let r=s[++n];const o=kn[r];if(o)t+=o;else if(r===`
91
- `)for(r=s[n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="\r"&&s[n+1]===`
92
- `)for(r=s[++n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="x"||r==="u"||r==="U"){const l=r==="x"?2:r==="u"?4:8;t+=Nn(s,n+1,l,e),n+=l}else{const l=s.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),t+=l}}else if(i===" "||i===" "){const r=n;let o=s[n+1];for(;o===" "||o===" ";)o=s[++n+1];o!==`
93
- `&&!(o==="\r"&&s[n+2]===`
94
- `)&&(t+=n>r?s.slice(r,n+1):i)}else t+=i}return(s[s.length-1]!=='"'||s.length===1)&&e(s.length,"MISSING_CHAR",'Missing closing "quote'),t}function Sn(s,e){let t="",n=s[e+1];for(;(n===" "||n===" "||n===`
95
- `||n==="\r")&&!(n==="\r"&&s[e+2]!==`
96
- `);)n===`
97
- `&&(t+=`
98
- `),e+=1,n=s[e+1];return t||(t=" "),{fold:t,offset:e}}const kn={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
99
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Nn(s,e,t,n){const i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(o)}catch{const l=s.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}}function As(s,e,t,n){const{value:i,type:r,comment:o,range:l}=e.type==="block-scalar"?ks(s,e,n):Ns(e,s.options.strict,n),a=t?s.directives.tagName(t.source,f=>n(t,"TAG_RESOLVE_FAILED",f)):null;let c;s.options.stringKeys&&s.atKey?c=s.schema[U]:a?c=On(s.schema,i,a,t,n):e.type==="scalar"?c=An(s,i,e,n):c=s.schema[U];let d;try{const f=c.resolve(i,u=>n(t??e,"TAG_RESOLVE_FAILED",u),s.options);d=E(f)?f:new N(f)}catch(f){const u=f instanceof Error?f.message:String(f);n(t??e,"TAG_RESOLVE_FAILED",u),d=new N(i)}return d.range=l,d.source=i,r&&(d.type=r),a&&(d.tag=a),c.format&&(d.format=c.format),o&&(d.comment=o),d}function On(s,e,t,n,i){if(t==="!")return s[U];const r=[];for(const l of s.tags)if(!l.collection&&l.tag===t)if(l.default&&l.test)r.push(l);else return l;for(const l of r)if(l.test?.test(e))return l;const o=s.knownTags[t];return o&&!o.collection?(s.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),s[U])}function An({atKey:s,directives:e,schema:t},n,i,r){const o=t.tags.find(l=>(l.default===!0||s&&l.default==="key")&&l.test?.test(n))||t[U];if(t.compat){const l=t.compat.find(a=>a.default&&a.test?.test(n))??t[U];if(o.tag!==l.tag){const a=e.tagString(o.tag),c=e.tagString(l.tag),d=`Value may be parsed as either ${a} or ${c}`;r(i,"TAG_RESOLVE_FAILED",d,!0)}}return o}function En(s,e,t){if(e){t??(t=e.length);for(let n=t-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":s-=i.source.length;continue}for(i=e[++n];i?.type==="space";)s+=i.source.length,i=e[++n];break}}return s}const Tn={composeNode:Es,composeEmptyNode:Tt};function Es(s,e,t,n){const i=s.atKey,{spaceBefore:r,comment:o,anchor:l,tag:a}=t;let c,d=!0;switch(e.type){case"alias":c=In(s,e,n),(l||a)&&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":c=As(s,e,a,n),l&&(c.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=pn(Tn,s,e,t,n),l&&(c.anchor=l.source.substring(1))}catch(f){const u=f instanceof Error?f.message:String(f);n(e,"RESOURCE_EXHAUSTION",u)}break;default:{const f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",f),d=!1}}return c??(c=Tt(s,e.offset,void 0,null,t,n)),l&&c.anchor===""&&n(l,"BAD_ALIAS","Anchor cannot be an empty string"),i&&s.options.stringKeys&&(!E(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&n(a??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),r&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),s.options.keepSourceTokens&&d&&(c.srcToken=e),c}function Tt(s,e,t,n,{spaceBefore:i,comment:r,anchor:o,tag:l,end:a},c){const d={type:"scalar",offset:En(e,t,n),indent:-1,source:""},f=As(s,d,l,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(f.spaceBefore=!0),r&&(f.comment=r,f.range[2]=a),f}function In({options:s},{offset:e,source:t,end:n},i){const r=new Fe(t.substring(1));r.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&i(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+t.length,l=Te(n,o,s.strict,i);return r.range=[e,o,l.offset],l.comment&&(r.comment=l.comment),r}function Ln(s,e,{offset:t,start:n,value:i,end:r},o){const l=Object.assign({_directives:e},s),a=new ye(void 0,l),c={atKey:!1,atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},d=ue(n,{indicator:"doc-start",next:i??r?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});d.found&&(a.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!d.hasNewline&&o(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=i?Es(c,i,d,o):Tt(c,d.end,n,null,d,o);const f=a.contents.range[2],u=Te(r,f,!1,o);return u.comment&&(a.comment=u.comment),a.range=[t,f,u.offset],a}function be(s){if(typeof s=="number")return[s,s+1];if(Array.isArray(s))return s.length===2?s:[s[0],s[1]];const{offset:e,source:t}=s;return[e,e+(typeof t=="string"?t.length:1)]}function jt(s){let e="",t=!1,n=!1;for(let i=0;i<s.length;++i){const r=s[i];switch(r[0]){case"#":e+=(e===""?"":n?`
100
-
101
- `:`
102
- `)+(r.substring(1)||" "),t=!0,n=!1;break;case"%":s[i+1]?.[0]!=="#"&&(i+=1),t=!1;break;default:t||(n=!0),t=!1}}return{comment:e,afterEmptyLine:n}}class It{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,i,r)=>{const o=be(t);r?this.warnings.push(new ws(o,n,i)):this.errors.push(new X(o,n,i))},this.directives=new B({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:i}=jt(this.prelude);if(n){const r=e.contents;if(t)e.comment=e.comment?`${e.comment}
103
- ${n}`:n;else if(i||e.directives.docStart||!r)e.commentBefore=n;else if(L(r)&&!r.flow&&r.items.length>0){let o=r.items[0];I(o)&&(o=o.key);const l=o.commentBefore;o.commentBefore=l?`${n}
104
- ${l}`:n}else{const o=r.commentBefore;r.commentBefore=o?`${n}
105
- ${o}`:n}}if(t){for(let r=0;r<this.errors.length;++r)e.errors.push(this.errors[r]);for(let r=0;r<this.warnings.length;++r)e.warnings.push(this.warnings[r])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:jt(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const i of e)yield*this.next(i);yield*this.end(t,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,n,i)=>{const r=be(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=Ln(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":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new X(be(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const n="Unexpected doc-end without preceding document";this.errors.push(new X(be(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;const t=Te(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const n=this.doc.comment;this.doc.comment=n?`${n}
106
- ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new X(be(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){const n=Object.assign({_directives:this.directives},this.options),i=new ye(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}}function $n(s,e=!0,t){if(s){const n=(i,r,o)=>{const l=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(l,r,o);else throw new X([l,l+1],r,o)};switch(s.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Ns(s,e,n);case"block-scalar":return ks({options:{strict:e}},s,n)}}return null}function Cn(s,e){const{implicitKey:t=!1,indent:n,inFlow:i=!1,offset:r=-1,type:o="PLAIN"}=e,l=Ae({type:o,value:s},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),a=e.end??[{type:"newline",offset:-1,indent:n,source:`
107
- `}];switch(l[0]){case"|":case">":{const c=l.indexOf(`
108
- `),d=l.substring(0,c),f=l.substring(c+1)+`
109
- `,u=[{type:"block-scalar-header",offset:r,indent:n,source:d}];return Ts(u,a)||u.push({type:"newline",offset:-1,indent:n,source:`
110
- `}),{type:"block-scalar",offset:r,indent:n,props:u,source:f}}case'"':return{type:"double-quoted-scalar",offset:r,indent:n,source:l,end:a};case"'":return{type:"single-quoted-scalar",offset:r,indent:n,source:l,end:a};default:return{type:"scalar",offset:r,indent:n,source:l,end:a}}}function _n(s,e,t={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:r=!1,type:o}=t,l="indent"in s?s.indent:null;if(n&&typeof l=="number"&&(l+=2),!o)switch(s.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{const c=s.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}const a=Ae({type:o,value:e},{implicitKey:i||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(a[0]){case"|":case">":vn(s,a);break;case'"':ot(s,a,"double-quoted-scalar");break;case"'":ot(s,a,"single-quoted-scalar");break;default:ot(s,a,"scalar")}}function vn(s,e){const t=e.indexOf(`
111
- `),n=e.substring(0,t),i=e.substring(t+1)+`
112
- `;if(s.type==="block-scalar"){const r=s.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=n,s.source=i}else{const{offset:r}=s,o="indent"in s?s.indent:-1,l=[{type:"block-scalar-header",offset:r,indent:o,source:n}];Ts(l,"end"in s?s.end:void 0)||l.push({type:"newline",offset:-1,indent:o,source:`
113
- `});for(const a of Object.keys(s))a!=="type"&&a!=="offset"&&delete s[a];Object.assign(s,{type:"block-scalar",indent:o,props:l,source:i})}}function Ts(s,e){if(e)for(const t of e)switch(t.type){case"space":case"comment":s.push(t);break;case"newline":return s.push(t),!0}return!1}function ot(s,e,t){switch(s.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":s.type=t,s.source=e;break;case"block-scalar":{const n=s.props.slice(1);let i=e.length;s.props[0].type==="block-scalar-header"&&(i-=s.props[0].source.length);for(const r of n)r.offset+=i;delete s.props,Object.assign(s,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{const i={type:"newline",offset:s.offset+e.length,indent:s.indent,source:`
114
- `};delete s.items,Object.assign(s,{type:t,source:e,end:[i]});break}default:{const n="indent"in s?s.indent:-1,i="end"in s&&Array.isArray(s.end)?s.end.filter(r=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(const r of Object.keys(s))r!=="type"&&r!=="offset"&&delete s[r];Object.assign(s,{type:t,indent:n,source:e,end:i})}}}const Bn=s=>"type"in s?qe(s):Ke(s);function qe(s){switch(s.type){case"block-scalar":{let e="";for(const t of s.props)e+=qe(t);return e+s.source}case"block-map":case"block-seq":{let e="";for(const t of s.items)e+=Ke(t);return e}case"flow-collection":{let e=s.start.source;for(const t of s.items)e+=Ke(t);for(const t of s.end)e+=t.source;return e}case"document":{let e=Ke(s);if(s.end)for(const t of s.end)e+=t.source;return e}default:{let e=s.source;if("end"in s&&s.end)for(const t of s.end)e+=t.source;return e}}}function Ke({start:s,key:e,sep:t,value:n}){let i="";for(const r of s)i+=r.source;if(e&&(i+=qe(e)),t)for(const r of t)i+=r.source;return n&&(i+=qe(n)),i}const dt=Symbol("break visit"),Mn=Symbol("skip children"),Is=Symbol("remove item");function z(s,e){"type"in s&&s.type==="document"&&(s={start:s.start,value:s.value}),Ls(Object.freeze([]),s,e)}z.BREAK=dt;z.SKIP=Mn;z.REMOVE=Is;z.itemAtPath=(s,e)=>{let t=s;for(const[n,i]of e){const r=t?.[n];if(r&&"items"in r)t=r.items[i];else return}return t};z.parentCollection=(s,e)=>{const t=z.itemAtPath(s,e.slice(0,-1)),n=e[e.length-1][0],i=t?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function Ls(s,e,t){let n=t(e,s);if(typeof n=="symbol")return n;for(const i of["key","value"]){const r=e[i];if(r&&"items"in r){for(let o=0;o<r.items.length;++o){const l=Ls(Object.freeze(s.concat([[i,o]])),r.items[o],t);if(typeof l=="number")o=l-1;else{if(l===dt)return dt;l===Is&&(r.items.splice(o,1),o-=1)}}typeof n=="function"&&i==="key"&&(n=n(e,s))}}return typeof n=="function"?n(e,s):n}const Ze="\uFEFF",xe="",et="",Oe="",Kn=s=>!!s&&"items"in s,jn=s=>!!s&&(s.type==="scalar"||s.type==="single-quoted-scalar"||s.type==="double-quoted-scalar"||s.type==="block-scalar");function Pn(s){switch(s){case Ze:return"<BOM>";case xe:return"<DOC>";case et:return"<FLOW_END>";case Oe:return"<SCALAR>";default:return JSON.stringify(s)}}function $s(s){switch(s){case Ze:return"byte-order-mark";case xe:return"doc-mode";case et:return"flow-error-end";case Oe:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
115
- `:case`\r
116
- `: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(s[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}const Dn=Object.freeze(Object.defineProperty({__proto__:null,BOM:Ze,DOCUMENT:xe,FLOW_END:et,SCALAR:Oe,createScalarToken:Cn,isCollection:Kn,isScalar:jn,prettyToken:Pn,resolveAsScalar:$n,setScalarValue:_n,stringify:Bn,tokenType:$s,visit:z},Symbol.toStringTag,{value:"Module"}));function D(s){switch(s){case void 0:case" ":case`
117
- `:case"\r":case" ":return!0;default:return!1}}const Pt=new Set("0123456789ABCDEFabcdef"),qn=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ce=new Set(",[]{}"),Rn=new Set(` ,[]{}
118
- \r `),lt=s=>!s||Rn.has(s);class Cs{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
- `?!0:t==="\r"?this.buffer[e+1]===`
120
- `:!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"){const i=this.buffer[n+e+1];if(i===`
121
- `||!i&&!this.atEnd)return e+n+1}return t===`
122
- `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){const n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&D(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(`
123
- `,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]===Ze&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,n=e.indexOf("#");for(;n!==-1;){const r=e[n-1];if(r===" "||r===" "){t=n-1;break}else n=e.indexOf("#",n+1)}for(;;){const r=e[t-1];if(r===" "||r===" ")t-=1;else break}const i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield xe,yield*this.parseLineStart()}*parseLineStart(){const 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");const t=this.peek(3);if((t==="---"||t==="...")&&D(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&&!D(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&D(t)){const 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);const 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(lt),"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);const i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&D(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield et,yield*this.parseLineStart();let r=0;for(;i[r]===",";)r+=yield*this.pushCount(1),r+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r+=yield*this.pushIndicators(),i[r]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-r),"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(lt),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const o=this.charAt(1);if(this.flowKey||D(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let 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 r=0;for(;this.buffer[t-1-r]==="\\";)r+=1;if(r%2===0)break;t=this.buffer.indexOf('"',t+1)}const n=this.buffer.substring(0,t);let i=n.indexOf(`
124
- `,this.pos);if(i!==-1){for(;i!==-1;){const r=this.continueScalar(i+1);if(r===-1)break;i=n.indexOf(`
125
- `,r)}i!==-1&&(t=i-(n[i-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(;;){const 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=>D(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case" ":t+=1;break;case`
126
- `:e=r,t=0;break;case"\r":{const o=this.buffer[r+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
127
- `)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{const r=this.continueScalar(e+1);if(r===-1)break;e=this.buffer.indexOf(`
128
- `,r)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
129
- `;)n=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let r=e-1,o=this.buffer[r];o==="\r"&&(o=this.buffer[--r]);const l=r;for(;o===" ";)o=this.buffer[--r];if(o===`
130
- `&&r>=this.pos&&r+1+t>l)e=r;else break}while(!0);return yield Oe,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){const r=this.buffer[n+1];if(D(r)||e&&Ce.has(r))break;t=n}else if(D(i)){let r=this.buffer[n+1];if(i==="\r"&&(r===`
131
- `?(n+=1,i=`
132
- `,r=this.buffer[n+1]):t=n),r==="#"||e&&Ce.has(r))break;if(i===`
133
- `){const o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&Ce.has(i))break;t=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Oe,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){const 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(lt),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(D(n)||t&&Ce.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(;!D(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(qn.has(t))t=this.buffer[++e];else if(t==="%"&&Pt.has(this.buffer[e+1])&&Pt.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
134
- `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
135
- `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");const i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class _s{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};const i=this.lineStarts[t-1];return{line:t,col:e-i+1}}}}function Y(s,e){for(let t=0;t<s.length;++t)if(s[t].type===e)return!0;return!1}function Dt(s){for(let e=0;e<s.length;++e)switch(s[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function vs(s){switch(s?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function _e(s){switch(s.type){case"document":return s.start;case"block-map":{const e=s.items[s.items.length-1];return e.sep??e.start}case"block-seq":return s.items[s.items.length-1].start;default:return[]}}function ne(s){if(s.length===0)return[];let e=s.length;e:for(;--e>=0;)switch(s[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;s[++e]?.type==="space";);return s.splice(e,s.length)}function Re(s,e){if(e.length<1e5)Array.prototype.push.apply(s,e);else for(let t=0;t<e.length;++t)s.push(e[t])}function qt(s){if(s.start.type==="flow-seq-start")for(const e of s.items)e.sep&&!e.value&&!Y(e.start,"explicit-key-ind")&&!Y(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,vs(e.value)?e.value.end?Re(e.value.end,e.sep):e.value.end=e.sep:Re(e.start,e.sep),delete e.sep)}class Lt{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 Cs,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=$s(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{const 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(){const 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){const 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{const 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"&&qt(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{const i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=t;else{Object.assign(i,{key:t,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{const i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{const i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{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")){const i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&Dt(i.start)===-1&&(t.indent===0||i.start.every(r=>r.type!=="comment"||r.indent<t.indent))&&(n.type==="document"?n.end=i.start:n.items.push({start:i.start}),t.items.splice(-1,1))}}}*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":{const 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":{Dt(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}const 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"){const t=_e(this.peek(2)),n=ne(t);let i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}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(`
136
- `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
137
- `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const 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)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Re(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,i=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let r=[];if(i&&t.sep&&!t.value){const o=[];for(let l=0;l<t.sep.length;++l){const a=t.sep[l];switch(a.type){case"newline":o.push(l);break;case"space":break;case"comment":a.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({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(Y(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(vs(t.key)&&!Y(t.sep,"newline")){const o=ne(t.start),l=t.key,a=t.sep;a.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:l,sep:a}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(Y(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const o=ne(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||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):Y(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":{const o=this.flowScalar(this.type);i||t.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!Y(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:r});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const 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)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Re(i,t.start),i.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||Y(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){const n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const 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":{const i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const 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"){const i=_e(n),r=ne(i);qt(e);const o=e.end.splice(1,e.end.length);o.push(this.sourceToken);const l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
138
- `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
139
- `,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;const t=_e(e),n=ne(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;const t=_e(e),n=ne(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())}}}function Bs(s){const e=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||e&&new _s||null,prettyErrors:e}}function Un(s,e={}){const{lineCounter:t,prettyErrors:n}=Bs(e),i=new Lt(t?.addNewLine),r=new It(e),o=Array.from(r.compose(i.parse(s)));if(n&&t)for(const l of o)l.errors.forEach(De(s,t)),l.warnings.forEach(De(s,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function Ms(s,e={}){const{lineCounter:t,prettyErrors:n}=Bs(e),i=new Lt(t?.addNewLine),r=new It(e);let o=null;for(const l of r.compose(i.parse(s),!0,s.length))if(!o)o=l;else if(o.options.logLevel!=="silent"){o.errors.push(new X(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(o.errors.forEach(De(s,t)),o.warnings.forEach(De(s,t))),o}function Fn(s,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);const i=Ms(s,t);if(!i)return null;if(i.warnings.forEach(r=>xt(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},t))}function Vn(s,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"){const i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(s===void 0){const{keepUndefined:i}=t??e??{};if(!i)return}return x(s)&&!n?s.toString(t):new ye(s,n,t).toString(t)}const Jn=Object.freeze(Object.defineProperty({__proto__:null,Alias:Fe,CST:Dn,Composer:It,Document:ye,Lexer:Cs,LineCounter:_s,Pair:v,Parser:Lt,Scalar:N,Schema:ze,YAMLError:Et,YAMLMap:K,YAMLParseError:X,YAMLSeq:Q,YAMLWarning:ws,isAlias:Z,isCollection:L,isDocument:x,isMap:de,isNode:$,isPair:I,isScalar:E,isSeq:pe,parse:Fn,parseAllDocuments:Un,parseDocument:Ms,stringify:Vn,visit:ee,visitAsync:Ue},Symbol.toStringTag,{value:"Module"}));export{Fe as Alias,Dn as CST,It as Composer,ye as Document,Cs as Lexer,_s as LineCounter,v as Pair,Lt as Parser,N as Scalar,ze as Schema,Et as YAMLError,K as YAMLMap,X as YAMLParseError,Q as YAMLSeq,ws as YAMLWarning,Jn as default,Z as isAlias,L as isCollection,x as isDocument,de as isMap,$ as isNode,I as isPair,E as isScalar,pe as isSeq,Fn as parse,Un as parseAllDocuments,Ms as parseDocument,Vn as stringify,ee as visit,Ue as visitAsync};
@@ -1,2 +0,0 @@
1
- import{_ as a,l as s,D as n,e as i}from"./mermaid.core-B0EPSHs2.js";import{p}from"./cynefin-VYW2F7L2-Tt_NiopT.js";import"./index-D8dxsTJY.js";import"./purify.es-Cz4mVeUR.js";var g={parse:a(async r=>{const e=await p("info",r);s.debug(e)},"parse")},v={version:"11.16.1"},d=a(()=>v.version,"getVersion"),m={getVersion:d},c=a((r,e,o)=>{s.debug(`rendering info diagram
2
- `+r);const t=n(e);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),l={draw:c},w={parser:g,db:m,renderer:l};export{w as diagram};
@@ -1 +0,0 @@
1
- function t(e,a){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(a).domain(e);break}return this}export{t as i};
@@ -1,70 +0,0 @@
1
- import{_ as o,c as ot,K as ut,D as dt,ak as yt,p as ft,k as pt,n as it,a as gt,b as kt,g as mt,s as wt,o as _t,e as bt}from"./mermaid.core-B0EPSHs2.js";import"./index-D8dxsTJY.js";import"./purify.es-Cz4mVeUR.js";var J=(function(){var e=o(function(T,t,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],f=[1,20],d=[1,18],m=[1,19],u=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],D={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:o(function(t,s,i,c,p,n,v){var w=n.length-1;switch(p){case 6:case 7:return c;case 15:c.addNode(n[w-1].length,n[w].trim());break;case 16:c.addNode(0,n[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:f,7:d,10:17,11:m},e(u,[2,18],{14:[1,21]}),e(u,[2,16]),e(u,[2,17]),{6:f,7:d,10:22,11:m},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(u,[2,15]),e(k,[2,13],{7:g,11:_}),e(x,[2,11]),e(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:o(function(t){var s=this,i=[0],c=[],p=[null],n=[],v=this.table,w="",I=0,$=0,L=2,A=1,C=n.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(S.yy[P]=this.yy[P]);b.setInput(t,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;n.push(R);var G=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(B){i.length=i.length-2*B,p.length=p.length-B,n.length=n.length-B}o(X,"popStack");function tt(){var B;return B=c.pop()||b.lex()||A,typeof B!="number"&&(B instanceof Array&&(c=B,B=c.pop()),B=s.symbols_[B]||B),B}o(tt,"lex");for(var M,W,N,Y,F={},U,V,et,Z;;){if(W=i[i.length-1],this.defaultActions[W]?N=this.defaultActions[W]:((M===null||typeof M>"u")&&(M=tt()),N=v[W]&&v[W][M]),typeof N>"u"||!N.length||!N[0]){var q="";Z=[];for(U in v[W])this.terminals_[U]&&U>L&&Z.push("'"+this.terminals_[U]+"'");b.showPosition?q="Parse error on line "+(I+1)+`:
2
- `+b.showPosition()+`
3
- Expecting `+Z.join(", ")+", got '"+(this.terminals_[M]||M)+"'":q="Parse error on line "+(I+1)+": Unexpected "+(M==A?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(q,{text:b.match,token:this.terminals_[M]||M,line:b.yylineno,loc:R,expected:Z})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+M);switch(N[0]){case 1:i.push(M),p.push(b.yytext),n.push(b.yylloc),i.push(N[1]),M=null,$=b.yyleng,w=b.yytext,I=b.yylineno,R=b.yylloc;break;case 2:if(V=this.productions_[N[1]][1],F.$=p[p.length-V],F._$={first_line:n[n.length-(V||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(V||1)].first_column,last_column:n[n.length-1].last_column},G&&(F._$.range=[n[n.length-(V||1)].range[0],n[n.length-1].range[1]]),Y=this.performAction.apply(F,[w,$,I,S.yy,N[1],p,n].concat(C)),typeof Y<"u")return Y;V&&(i=i.slice(0,-1*V*2),p=p.slice(0,-1*V),n=n.slice(0,-1*V)),i.push(this.productions_[N[1]][0]),p.push(F.$),n.push(F._$),et=v[i[i.length-2]][i[i.length-1]],i.push(et);break;case 3:return!0}}return!0},"parse")},O=(function(){var T={EOF:1,parseError:o(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:o(function(t,s){return this.yy=s||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var s=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===c.length?this.yylloc.first_column:0)+c[c.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
5
- `+s+"^"},"showPosition"),test_match:o(function(t,s){var i,c,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(p.yylloc.range=this.yylloc.range.slice(0))),c=t[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,s,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var n in p)this[n]=p[n];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,s,i,c;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),n=0;n<p.length;n++)if(i=this._input.match(this.rules[p[n]]),i&&(!s||i[0].length>s[0].length)){if(s=i,c=n,this.options.backtrack_lexer){if(t=this.test_match(i,p[n]),t!==!1)return t;if(this._backtrack){s=!1;continue}else return!1}else if(!this.options.flex)break}return s?(t=this.test_match(s,p[c]),t!==!1?t:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var s=this.next();return s||this.lex()},"lex"),begin:o(function(s){this.conditionStack.push(s)},"begin"),popState:o(function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:o(function(s){this.begin(s)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(s,i,c,p){switch(c){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return T})();D.lexer=O;function E(){this.yy={}}return o(E,"Parser"),E.prototype=D,D.Parser=E,new E})();J.parser=J;var xt=J,H,vt=(H=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,ft()}getRoot(){return this.root}addNode(h,r){const a=pt.sanitizeText(r,ot());if(!this.root){this.root={text:a,children:[]},this.stack=[{level:0,node:this.root}],it(a);return}this.baseLevel??=h;let l=h-this.baseLevel+1;for(l<=0&&(l=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=l;)this.stack.pop();const y=this.stack[this.stack.length-1].node,f={text:a,children:[]};y.children.push(f),this.stack.push({level:l,node:f})}getAccTitle(){return gt()}setAccTitle(h){kt(h)}getAccDescription(){return mt()}setAccDescription(h){wt(h)}getDiagramTitle(){return _t()}setDiagramTitle(h){it(h)}},o(H,"IshikawaDB"),H),St=14,j=250,$t=30,Et=60,At=5,ht=82*Math.PI/180,st=Math.cos(ht),nt=Math.sin(ht),at=o((e,h,r)=>{const a=e.node().getBBox(),l=a.width+h*2,y=a.height+h*2;bt(e,y,l,r),e.attr("viewBox",`${a.x-h} ${a.y-h} ${l} ${y}`)},"applyPaddedViewBox"),It=o((e,h,r,a)=>{const y=a.db.getRoot();if(!y)return;const f=ot(),{look:d,handDrawnSeed:m,themeVariables:u}=f,k=ut(f.fontSize)[0]??St,g=d==="handDrawn",_=y.children??[],x=f.ishikawa?.diagramPadding??20,D=f.ishikawa?.useMaxWidth??!1,O=dt(h),E=O.append("g").attr("class","ishikawa"),T=g?yt.svg(O.node()):void 0,t=T?{roughSvg:T,seed:m??0,lineColor:u?.lineColor??"#333",fillColor:u?.mainBkg??"#fff"}:void 0,s=`ishikawa-arrow-${h}`;g||E.append("defs").append("marker").attr("id",s).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let i=0,c=j;const p=g?void 0:z(E,i,c,i,c,"ishikawa-spine");if(Lt(E,i,c,y.text,k,t),!_.length){g&&z(E,i,c,i,c,"ishikawa-spine",t),at(O,x,D);return}i-=20;const n=_.filter((S,P)=>P%2===0),v=_.filter((S,P)=>P%2===1),w=rt(n),I=rt(v),$=w.total+I.total;let L=j,A=j;if($>0){const S=j*2,P=j*.3;L=Math.max(P,S*(w.total/$)),A=Math.max(P,S*(I.total/$))}const C=k*2;L=Math.max(L,w.max*C),A=Math.max(A,I.max*C),c=Math.max(L,j),p&&p.attr("y1",c).attr("y2",c),E.select(".ishikawa-head-group").attr("transform",`translate(0,${c})`);const b=Math.ceil(_.length/2);for(let S=0;S<b;S++){const P=E.append("g").attr("class","ishikawa-pair");for(const[R,G,X]of[[_[S*2],-1,L],[_[S*2+1],1,A]])R&&Pt(P,R,i,c,G,X,k,t);i=P.selectAll("text").nodes().reduce((R,G)=>Math.min(R,G.getBBox().x),1/0)}if(g)z(E,i,c,0,c,"ishikawa-spine",t);else{p.attr("x1",i);const S=`url(#${s})`;E.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",S)}at(O,x,D)},"draw"),rt=o(e=>{const h=o(r=>r.children.reduce((a,l)=>a+1+h(l),0),"countDescendants");return e.reduce((r,a)=>{const l=h(a);return r.total+=l,r.max=Math.max(r.max,l),r},{total:0,max:0})},"sideStats"),Lt=o((e,h,r,a,l,y)=>{const f=Math.max(6,Math.floor(110/(l*.6))),d=e.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${h},${r})`),m=K(d,ct(a,f),0,0,"ishikawa-head-label","start",l),u=m.node().getBBox(),k=Math.max(60,u.width+6),g=Math.max(40,u.height*2+40),_=`M 0 ${-g/2} L 0 ${g/2} Q ${k*2.4} 0 0 ${-g/2} Z`;if(y){const x=y.roughSvg.path(_,{roughness:1.5,seed:y.seed,fill:y.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:y.lineColor,strokeWidth:2});d.insert(()=>x,":first-child").attr("class","ishikawa-head")}else d.insert("path",":first-child").attr("class","ishikawa-head").attr("d",_);m.attr("transform",`translate(${(k-u.width)/2-u.x+3},${-u.y-u.height/2})`)},"drawHead"),Tt=o((e,h)=>{const r=[],a=[],l=o((y,f,d)=>{const m=h===-1?[...y].reverse():y;for(const u of m){const k=r.length,g=u.children??[];r.push({depth:d,text:ct(u.text,15),parentIndex:f,childCount:g.length}),d%2===0?(a.push(k),g.length&&l(g,k,d+1)):(g.length&&l(g,k,d+1),a.push(k))}},"walk");return l(e,-1,2),{entries:r,yOrder:a}},"flattenTree"),Mt=o((e,h,r,a,l,y,f)=>{const d=e.append("g").attr("class","ishikawa-label-group"),u=K(d,h,r,a+11*l,"ishikawa-label cause","middle",y).node().getBBox();if(f){const k=f.roughSvg.rectangle(u.x-20,u.y-2,u.width+40,u.height+4,{roughness:1.5,seed:f.seed,fill:f.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:f.lineColor,strokeWidth:2});d.insert(()=>k,":first-child").attr("class","ishikawa-label-box")}else d.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",u.x-20).attr("y",u.y-2).attr("width",u.width+40).attr("height",u.height+4)},"drawCauseLabel"),Q=o((e,h,r,a,l,y)=>{const f=Math.sqrt(a*a+l*l);if(f===0)return;const d=a/f,m=l/f,u=6,k=-m*u,g=d*u,_=h,x=r,D=`M ${_} ${x} L ${_-d*u*2+k} ${x-m*u*2+g} L ${_-d*u*2-k} ${x-m*u*2-g} Z`,O=y.roughSvg.path(D,{roughness:1,seed:y.seed,fill:y.lineColor,fillStyle:"solid",stroke:y.lineColor,strokeWidth:1});e.append(()=>O)},"drawArrowMarker"),Pt=o((e,h,r,a,l,y,f,d)=>{const m=h.children??[],u=y*(m.length?1:.2),k=-st*u,g=nt*u*l,_=r+k,x=a+g;if(z(e,r,a,_,x,"ishikawa-branch",d),d&&Q(e,r,a,r-_,a-x,d),Mt(e,h.text,_,x,l,f,d),!m.length)return;const{entries:D,yOrder:O}=Tt(m,l),E=D.length,T=new Array(E);for(const[p,n]of O.entries())T[n]=a+g*((p+1)/(E+1));const t=new Map;t.set(-1,{x0:r,y0:a,x1:_,y1:x,childCount:m.length,childrenDrawn:0});const s=-st,i=nt*l,c=l<0?"ishikawa-label up":"ishikawa-label down";for(const[p,n]of D.entries()){const v=T[p],w=t.get(n.parentIndex),I=e.append("g").attr("class","ishikawa-sub-group");let $=0,L=0,A=0;if(n.depth%2===0){const C=w.y1-w.y0;$=lt(w.x0,w.x1,C?(v-w.y0)/C:.5),L=v,A=$-(n.childCount>0?Et+n.childCount*At:$t),z(I,$,v,A,v,"ishikawa-sub-branch",d),d&&Q(I,$,v,1,0,d),K(I,n.text,A,v,"ishikawa-label align","end",f)}else{const C=w.childrenDrawn++;$=lt(w.x0,w.x1,(w.childCount-C)/(w.childCount+1)),L=w.y0,A=$+s*((v-L)/i),z(I,$,L,A,v,"ishikawa-sub-branch",d),d&&Q(I,$,L,$-A,L-v,d),K(I,n.text,A,v,c,"end",f)}n.childCount>0&&t.set(p,{x0:$,y0:L,x1:A,y1:v,childCount:n.childCount,childrenDrawn:0})}},"drawBranch"),Bt=o(e=>e.split(/<br\s*\/?>|\n/),"splitLines"),ct=o((e,h)=>{if(e.length<=h)return e;const r=[];for(const a of e.split(/\s+/)){const l=r.length-1;l>=0&&r[l].length+1+a.length<=h?r[l]+=" "+a:r.push(a)}return r.join(`
7
- `)},"wrapText"),K=o((e,h,r,a,l,y,f)=>{const d=Bt(h),m=f*1.05,u=e.append("text").attr("class",l).attr("text-anchor",y).attr("x",r).attr("y",a-(d.length-1)*m/2);for(const[k,g]of d.entries())u.append("tspan").attr("x",r).attr("dy",k===0?0:m).text(g);return u},"drawMultilineText"),lt=o((e,h,r)=>e+(h-e)*r,"lerp"),z=o((e,h,r,a,l,y,f)=>{if(f){const d=f.roughSvg.line(h,r,a,l,{roughness:1.5,seed:f.seed,stroke:f.lineColor,strokeWidth:2});e.append(()=>d).attr("class",y);return}return e.append("line").attr("class",y).attr("x1",h).attr("y1",r).attr("x2",a).attr("y2",l)},"drawLine"),Nt={draw:It},Dt=o(e=>`
8
- .ishikawa .ishikawa-spine,
9
- .ishikawa .ishikawa-branch,
10
- .ishikawa .ishikawa-sub-branch {
11
- stroke: ${e.lineColor};
12
- stroke-width: 2;
13
- fill: none;
14
- }
15
-
16
- .ishikawa .ishikawa-sub-branch {
17
- stroke-width: 1;
18
- }
19
-
20
- .ishikawa .ishikawa-arrow {
21
- fill: ${e.lineColor};
22
- }
23
-
24
- .ishikawa .ishikawa-head {
25
- fill: ${e.mainBkg};
26
- stroke: ${e.lineColor};
27
- stroke-width: 2;
28
- }
29
-
30
- .ishikawa .ishikawa-label-box {
31
- fill: ${e.mainBkg};
32
- stroke: ${e.lineColor};
33
- stroke-width: 2;
34
- }
35
-
36
- .ishikawa text {
37
- font-family: ${e.fontFamily};
38
- font-size: ${e.fontSize};
39
- fill: ${e.textColor};
40
- }
41
-
42
- .ishikawa .ishikawa-head-label {
43
- font-weight: 600;
44
- text-anchor: middle;
45
- dominant-baseline: middle;
46
- font-size: 14px;
47
- }
48
-
49
- .ishikawa .ishikawa-label {
50
- text-anchor: end;
51
- }
52
-
53
- .ishikawa .ishikawa-label.cause {
54
- text-anchor: middle;
55
- dominant-baseline: middle;
56
- }
57
-
58
- .ishikawa .ishikawa-label.align {
59
- text-anchor: end;
60
- dominant-baseline: middle;
61
- }
62
-
63
- .ishikawa .ishikawa-label.up {
64
- dominant-baseline: baseline;
65
- }
66
-
67
- .ishikawa .ishikawa-label.down {
68
- dominant-baseline: hanging;
69
- }
70
- `,"getStyles"),Ot=Dt,Wt={parser:xt,get db(){return new vt},renderer:Nt,styles:Ot};export{Wt as diagram};