@tequila99/githuman 0.10.0 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/README.md +10 -0
  2. package/dist/server/app.js +2 -0
  3. package/dist/server/routes/project-files.js +90 -0
  4. package/dist/server/services/notes-external-assets.service.js +5 -5
  5. package/dist/server/services/notes-identity.service.js +4 -2
  6. package/dist/server/services/project-files.service.js +144 -0
  7. package/dist/server/services/terminal/tokens.js +1 -1
  8. package/dist/server/utils/remote-asset-request.js +9 -2
  9. package/dist/shared/git/constants.js +2 -0
  10. package/dist/shared/project-files/constants.js +18 -0
  11. package/dist/shared/project-files/schemas.js +35 -0
  12. package/dist/shared/project-files/types.js +1 -0
  13. package/dist/shared/utils/markdown-path.js +4 -0
  14. package/dist/shared/utils/pdf-path.js +4 -0
  15. package/dist/web/assets/AccessPage-CX3w30zw.js +1 -0
  16. package/dist/web/assets/AccessPage-l5Yiiw9T.css +1 -0
  17. package/dist/web/assets/AppPage-PFJG281y.js +1 -0
  18. package/dist/web/assets/CreateButton-Ch0b7juj.js +1 -0
  19. package/dist/web/assets/CreateReviewFabButton-B2Td8Wno.css +1 -0
  20. package/dist/web/assets/CreateReviewFabButton-DTuJzw3q.js +1 -0
  21. package/dist/web/assets/ErrorNotFound-DucDzOUJ.js +1 -0
  22. package/dist/web/assets/IndexPage-D5PvyGrX.css +1 -0
  23. package/dist/web/assets/IndexPage-tgW07Qvs.js +1 -0
  24. package/dist/web/assets/{MainLayout-vDaYlRjL.css → MainLayout-C6yBhQnf.css} +1 -1
  25. package/dist/web/assets/MainLayout-Cw4jpB1x.js +8 -0
  26. package/dist/web/assets/{NoteVisualEditor-IH3s3d3W.css → NoteVisualEditor-CawpxEFB.css} +1 -1
  27. package/dist/web/assets/NoteVisualEditor-DiGhLhQg.js +1054 -0
  28. package/dist/web/assets/NotesPage-CVyVr9tl.js +4 -0
  29. package/dist/web/assets/NotesPage-CxGnZuVQ.css +1 -0
  30. package/dist/web/assets/PanelResize-B6FP9ZVB.js +1 -0
  31. package/dist/web/assets/PanelResize-XjrbOj2S.css +1 -0
  32. package/dist/web/assets/PdfPreview-l_xzsLJ_.css +1 -0
  33. package/dist/web/assets/{PdfPreview-DIgRK8Vh.js → PdfPreview-rlkcqoMF.js} +2 -2
  34. package/dist/web/assets/ProjectFilePage-CkxfX9b1.js +1 -0
  35. package/dist/web/assets/QBtn-CyyV1Bx_.js +1 -0
  36. package/dist/web/assets/QExpansionItem-Dp9lbdVb.js +4 -0
  37. package/dist/web/assets/QFab-LOmZ9rev.js +1 -0
  38. package/dist/web/assets/QForm-Be8-ucuJ.js +1 -0
  39. package/dist/web/assets/QInput-Dq6131uz.js +1 -0
  40. package/dist/web/assets/QSelect-B34OqtIH.js +1 -0
  41. package/dist/web/assets/QSpace-BhOVGpQh.js +1 -0
  42. package/dist/web/assets/QVirtualScroll-BYgJ1Kh2.js +1 -0
  43. package/dist/web/assets/ReviewDetailPage-GNjBa4X0.js +1 -0
  44. package/dist/web/assets/ReviewsPage-An5fRS92.js +1 -0
  45. package/dist/web/assets/{StatusSwitcher-BCv_9MtI.css → StatusSwitcher-D6i8_OfR.css} +1 -1
  46. package/dist/web/assets/StatusSwitcher-DrFHHwGm.js +1 -0
  47. package/dist/web/assets/{TerminalView-C1jFlfLH.css → TerminalView-617DZuPt.css} +1 -1
  48. package/dist/web/assets/TerminalView-D4elkzN4.js +19 -0
  49. package/dist/web/assets/{abnfDiagram-O67JEVCF-BMF1j0ZS.js → abnfDiagram-O67JEVCF-Cugru96L.js} +1 -1
  50. package/dist/web/assets/{access-store-Y2QO4AK-.js → access-store-Cdg8oRAM.js} +1 -1
  51. package/dist/web/assets/agent-store-D_W7iD_B.js +113 -0
  52. package/dist/web/assets/architecture-7GRP2DOG-BPCNj4lR.js +1 -0
  53. package/dist/web/assets/{architectureDiagram-NJMV4G6O-Bz4u-gZC.js → architectureDiagram-NJMV4G6O-7rMsE4Wt.js} +1 -1
  54. package/dist/web/assets/{blockDiagram-BEXU5L5S-qQW37qVK.js → blockDiagram-BEXU5L5S-BvSnwUrI.js} +1 -1
  55. package/dist/web/assets/{c4Diagram-YGBWAQC7-BBwd76CZ.js → c4Diagram-YGBWAQC7-CgmQlCVx.js} +1 -1
  56. package/dist/web/assets/channel-CzRYxuLe.js +1 -0
  57. package/dist/web/assets/{chunk-3FUC2YCW-BnhnfUz2.js → chunk-3FUC2YCW-_i8udThz.js} +1 -1
  58. package/dist/web/assets/{chunk-5DYCD2WN-DdK6RzN0.js → chunk-5DYCD2WN-Mhk2LlLk.js} +1 -1
  59. package/dist/web/assets/{chunk-742MDFTN-e_JaY6d5.js → chunk-742MDFTN-CDVcwgEp.js} +1 -1
  60. package/dist/web/assets/{chunk-7INBJB4K-CQjEZWay.js → chunk-7INBJB4K-C2c1fi9s.js} +1 -1
  61. package/dist/web/assets/{chunk-7M6MHVWA-Dhx8Ycf8.js → chunk-7M6MHVWA-BeGkoIBL.js} +1 -1
  62. package/dist/web/assets/{chunk-7PRAP22T-DDWxOzU1.js → chunk-7PRAP22T-BVWTh9sT.js} +1 -1
  63. package/dist/web/assets/{chunk-GTNCS2PH-B-ZscolZ.js → chunk-GTNCS2PH-gVhX7NZP.js} +1 -1
  64. package/dist/web/assets/{chunk-GWA4HPMP-CboS0KEV.js → chunk-GWA4HPMP-BPdnIcQH.js} +1 -1
  65. package/dist/web/assets/{chunk-MBY4JIJT-CiI_FkjG.js → chunk-MBY4JIJT-B2VfO_06.js} +1 -1
  66. package/dist/web/assets/{chunk-NETBCI7D-D9ennL0_.js → chunk-NETBCI7D-DZF_gITO.js} +1 -1
  67. package/dist/web/assets/{chunk-O7XYJQB3-y25ZXdWk.js → chunk-O7XYJQB3-CDpBWiLq.js} +1 -1
  68. package/dist/web/assets/{chunk-UA2S7LBM-BRHq7OMm.js → chunk-UA2S7LBM-Iv7TSRE_.js} +1 -1
  69. package/dist/web/assets/{chunk-WEXAMYUT-CQu7edQh.js → chunk-WEXAMYUT-Ce6goZ2Y.js} +1 -1
  70. package/dist/web/assets/{chunk-Z7XXMR3K-B3dBNvo3.js → chunk-Z7XXMR3K-CY6E6_Ux.js} +1 -1
  71. package/dist/web/assets/{chunk-ZIGJFQKS-CbyA33sL.js → chunk-ZIGJFQKS-BLzsXZBc.js} +1 -1
  72. package/dist/web/assets/{classDiagram-v2-NBCMYWYE-CgFqOQ8k.js → classDiagram-v2-NBCMYWYE-Dz0kD9P6.js} +1 -1
  73. package/dist/web/assets/create-B9Tn5Xvi.js +1 -0
  74. package/dist/web/assets/{cynefin-OW5HDTMX-DJ9N0QYa.js → cynefin-OW5HDTMX-DWIx3wRm.js} +1 -1
  75. package/dist/web/assets/{cynefinDiagram-VND7K2PF-DIWysrbV.js → cynefinDiagram-VND7K2PF-2D80uocv.js} +1 -1
  76. package/dist/web/assets/{dagre-6A5THRUB-Dt2w_dKa.js → dagre-6A5THRUB-BLBhukn-.js} +1 -1
  77. package/dist/web/assets/devices-store-BfZKPOhg.js +1 -0
  78. package/dist/web/assets/{diagram-22UHCM2B-DYd638CD.js → diagram-22UHCM2B-DY8dMLZ3.js} +1 -1
  79. package/dist/web/assets/{diagram-3UASUU5V-B0a-K-41.js → diagram-3UASUU5V-Bf6Od1NH.js} +1 -1
  80. package/dist/web/assets/{diagram-ATOU4E4O-oH2KoPKR.js → diagram-ATOU4E4O-CjLGcYD5.js} +1 -1
  81. package/dist/web/assets/{diagram-CDSNMT55-B5DGBpGB.js → diagram-CDSNMT55-gIvaVNvs.js} +1 -1
  82. package/dist/web/assets/{diagram-MLGK6HIB-C-bsgsc0.js → diagram-MLGK6HIB-VR5kiCi5.js} +1 -1
  83. package/dist/web/assets/{diagram-MPIPVDR6-BrlKNYLc.js → diagram-MPIPVDR6-CdAdj25I.js} +1 -1
  84. package/dist/web/assets/diff-store-B4adGxC2.js +93 -0
  85. package/dist/web/assets/{dist-Bi2OWZ35.js → dist-BU8erXQF.js} +1 -1
  86. package/dist/web/assets/{dist-B9umI5Mp.js → dist-C54FrSb8.js} +1 -1
  87. package/dist/web/assets/{dist-CxiJzNsC.js → dist-C85t5q3z.js} +1 -1
  88. package/dist/web/assets/{dist-CfIeEdHm.js → dist-CBGyhCYv.js} +1 -1
  89. package/dist/web/assets/{dist-C-lnpukg.js → dist-CEl-Ko94.js} +1 -1
  90. package/dist/web/assets/{dist-B8irqXQ_.js → dist-CIMEaJAX.js} +1 -1
  91. package/dist/web/assets/{dist-Dz9Y2yQi.js → dist-CTd7Kuqx.js} +1 -1
  92. package/dist/web/assets/{dist-DMe9nqcB.js → dist-DLuI1PxH.js} +1 -1
  93. package/dist/web/assets/{dist-Bf4bAu7y.js → dist-joQDFmfy.js} +1 -1
  94. package/dist/web/assets/{dist-Bso6nKGK.js → dist-lgw4kcVA.js} +1 -1
  95. package/dist/web/assets/{dist-CNHlSxJl.js → dist-yzAhvE-V.js} +1 -1
  96. package/dist/web/assets/{ebnfDiagram-ZINNZB2B-BEpTgssQ.js → ebnfDiagram-ZINNZB2B-irTAlMFO.js} +1 -1
  97. package/dist/web/assets/{elk-276RUBZZ-lzj6IMyM.js → elk-276RUBZZ-Dj5ligvC.js} +1 -1
  98. package/dist/web/assets/{erDiagram-OPXOYQCR-CHOMf2bq.js → erDiagram-OPXOYQCR-Bvn6rbL1.js} +1 -1
  99. package/dist/web/assets/eventmodeling-NTZA5JFV-BJsTZ_nG.js +1 -0
  100. package/dist/web/assets/flowDiagram-KWPJA3E3-CvXh1Df7.js +1 -0
  101. package/dist/web/assets/{ganttDiagram-FUAMR5RP-TumKIsrB.js → ganttDiagram-FUAMR5RP-BNGAUF5H.js} +1 -1
  102. package/dist/web/assets/{gitGraph-4MIJSDKK-H-1qnbZy.js → gitGraph-4MIJSDKK-DYSHOl72.js} +1 -1
  103. package/dist/web/assets/{gitGraphDiagram-X574FWY7-DRIXoFhM.js → gitGraphDiagram-X574FWY7-BGwRHrPq.js} +1 -1
  104. package/dist/web/assets/i18n-DnlAcIbT.js +1 -0
  105. package/dist/web/assets/index-Cw7GJi3K.js +2 -0
  106. package/dist/web/assets/index-wsOPzloa.css +1 -0
  107. package/dist/web/assets/{info-A6RAGUB7-W0vgdn7h.js → info-A6RAGUB7-DNWR20pW.js} +1 -1
  108. package/dist/web/assets/{infoDiagram-VRGFBTTK-Dkb5juPW.js → infoDiagram-VRGFBTTK-BhNwJLY5.js} +1 -1
  109. package/dist/web/assets/init-app-cg-B_TFN.js +1 -0
  110. package/dist/web/assets/{is-CE4jkrGQ.js → is-D0waCELe.js} +1 -1
  111. package/dist/web/assets/{ishikawaDiagram-OU5B5YK6-BHH8nvlH.js → ishikawaDiagram-OU5B5YK6-CSkDpn64.js} +1 -1
  112. package/dist/web/assets/{journeyDiagram-ZHPQQLJL-DDyceAFf.js → journeyDiagram-ZHPQQLJL-D2CEecC3.js} +1 -1
  113. package/dist/web/assets/{kanban-definition-PNTS6WVX-DKE8pxuA.js → kanban-definition-PNTS6WVX-CQHlo4Hh.js} +1 -1
  114. package/dist/web/assets/{line-Cw6FtNmb.js → line-C-izH1ks.js} +1 -1
  115. package/dist/web/assets/{markdown-CIA-pqWB.js → markdown-CvtLTiBZ.js} +11 -10
  116. package/dist/web/assets/{mermaid-parser.core-CWHLi3M4.js → mermaid-parser.core-CAGwq6D-.js} +3 -3
  117. package/dist/web/assets/{mermaid.core-DbTjxMTH.js → mermaid.core--xlI_0tK.js} +4 -4
  118. package/dist/web/assets/{mindmap-definition-NLK3R4M7-B3MzGWwm.js → mindmap-definition-NLK3R4M7-BuCxhlwy.js} +1 -1
  119. package/dist/web/assets/{packet-AYTQ26CC-B5qqn_tj.js → packet-AYTQ26CC-Bi7x5lJK.js} +1 -1
  120. package/dist/web/assets/{pegDiagram-GJSIUBJH-DtcoRpgi.js → pegDiagram-GJSIUBJH-qWzBPkCQ.js} +1 -1
  121. package/dist/web/assets/{pie-WAS4IAKB-BP-vRsnM.js → pie-WAS4IAKB-Di0wC4XB.js} +1 -1
  122. package/dist/web/assets/{pieDiagram-5QR66LMP-CYy6L6IC.js → pieDiagram-5QR66LMP-BCDVY9q2.js} +1 -1
  123. package/dist/web/assets/pinia-DO0AdKGg.js +1 -0
  124. package/dist/web/assets/pinia-uOZCmBi-.js +1 -0
  125. package/dist/web/assets/preview-store-DyO8G-ox.js +1 -0
  126. package/dist/web/assets/project-files-store-byqyG2ts.js +1 -0
  127. package/dist/web/assets/{quadrantDiagram-O4NWA36T-Hi2aHxKi.js → quadrantDiagram-O4NWA36T-CpFObUjT.js} +1 -1
  128. package/dist/web/assets/{radar-RG4KPBEZ-BumlhyD5.js → radar-RG4KPBEZ-Br8yH8rq.js} +1 -1
  129. package/dist/web/assets/{railroad-74A4TZTK-CROMzUe6.js → railroad-74A4TZTK-CACSqhA-.js} +1 -1
  130. package/dist/web/assets/railroad-abnf-HS5TGJTU-DTBsRB1c.js +1 -0
  131. package/dist/web/assets/railroad-ebnf-LZEXJU2U-D3mrY4ar.js +1 -0
  132. package/dist/web/assets/railroad-peg-WCYAUIDC-33ZjWX0u.js +1 -0
  133. package/dist/web/assets/{railroadDiagram-XR7U4H2S-De5-oSrU.js → railroadDiagram-XR7U4H2S-sYXRKGK1.js} +1 -1
  134. package/dist/web/assets/render-C7fu7uYY.js +1 -0
  135. package/dist/web/assets/repository-store-DtRDth1L.js +1 -0
  136. package/dist/web/assets/{requirementDiagram-PLB6GJNP-CBqteg6M.js → requirementDiagram-PLB6GJNP-C9I1JbQc.js} +1 -1
  137. package/dist/web/assets/runtime-core.esm-bundler-CAvPiMpd.js +1 -0
  138. package/dist/web/assets/{safe-storage-BACMX75F.js → safe-storage-C76bPypO.js} +1 -1
  139. package/dist/web/assets/{sankeyDiagram-IPEJSGJF-DfKF1Ck-.js → sankeyDiagram-IPEJSGJF-CuvFQhPh.js} +1 -1
  140. package/dist/web/assets/{sequenceDiagram-PO4LG4MO-D-sVWt3S.js → sequenceDiagram-PO4LG4MO-CaVb9Y6e.js} +1 -1
  141. package/dist/web/assets/single-flight-fPyIy7h5.js +1 -0
  142. package/dist/web/assets/{stateDiagram-v2-GCMORJYK-DruoQvcn.js → stateDiagram-v2-GCMORJYK-Dp_APryr.js} +1 -1
  143. package/dist/web/assets/{swimlanes-2SLR337P-BxFZLbJA.js → swimlanes-2SLR337P-FclUI-k0.js} +1 -1
  144. package/dist/web/assets/swimlanesDiagram-TC7HE7FX-CuUvsn0e.js +8 -0
  145. package/dist/web/assets/terminal-store-BnEkXuBj.js +1 -0
  146. package/dist/web/assets/theme-CnbaLamF.js +1 -0
  147. package/dist/web/assets/{timeline-definition-EJHVYXUP-BixIZZx_.js → timeline-definition-EJHVYXUP-BAqwqj3c.js} +1 -1
  148. package/dist/web/assets/{treeView-Q6P3EWNA-Nzi6VzwD.js → treeView-Q6P3EWNA-D87jJbUQ.js} +1 -1
  149. package/dist/web/assets/{treemap-WGGIJYW6-DmAPjB44.js → treemap-WGGIJYW6-B6nhGhRc.js} +1 -1
  150. package/dist/web/assets/uid-B1JNhznI.js +1 -0
  151. package/dist/web/assets/use-add-agent-context-xHAjjOf1.js +1 -0
  152. package/dist/web/assets/use-app-theme-DEowpWRR.js +1 -0
  153. package/dist/web/assets/use-countdown-DlcwwJrs.js +1 -0
  154. package/dist/web/assets/{use-panel-width-DFOmK5Az.js → use-panel-width-CjSWCFr4.js} +1 -1
  155. package/dist/web/assets/use-router-link-CUoYaYUw.js +1 -0
  156. package/dist/web/assets/use-row-height-BsE9-rO2.js +1 -0
  157. package/dist/web/assets/{use-server-events-BrBCbeHu.js → use-server-events-C2X4Xz00.js} +1 -1
  158. package/dist/web/assets/use-virtual-scroll-BAZGswHv.js +1 -0
  159. package/dist/web/assets/use-workspace-navigation-CnebLvBV.js +1 -0
  160. package/dist/web/assets/{usecaseDiagram-POWQR4AR-BlNkvrZH.js → usecaseDiagram-POWQR4AR-7YcIKxAb.js} +1 -1
  161. package/dist/web/assets/{vennDiagram-UO4OBE2U-BFjSeLM4.js → vennDiagram-UO4OBE2U-BZq5cFC4.js} +1 -1
  162. package/dist/web/assets/viewport-store-CCHiY2QG.js +1 -0
  163. package/dist/web/assets/{vue-i18n.runtime-BpRrzZrT.js → vue-i18n.runtime-CEtihHHL.js} +2 -2
  164. package/dist/web/assets/{wardley-WFR3VGLG-DTs7R1tQ.js → wardley-WFR3VGLG-BT8YO9H4.js} +1 -1
  165. package/dist/web/assets/{wardleyDiagram-VNRHLVJA-BNMmP3TU.js → wardleyDiagram-VNRHLVJA-rDpXFf6D.js} +1 -1
  166. package/dist/web/assets/weighted-lru-BGovtJ2a.js +1 -0
  167. package/dist/web/assets/workspace-navigation-DdW0rSGz.js +1 -0
  168. package/dist/web/assets/{xychartDiagram-PMCCYNJV-Bi24Uotp.js → xychartDiagram-PMCCYNJV-ClniUuZc.js} +1 -1
  169. package/dist/web/index.html +10 -8
  170. package/package.json +1 -1
  171. package/dist/web/assets/AccessPage-CAjilkAc.js +0 -1
  172. package/dist/web/assets/AccessPage-DntcW7f8.css +0 -1
  173. package/dist/web/assets/AppPage-DdmqiV2R.js +0 -1
  174. package/dist/web/assets/ClosePopup-p9VBZw3j.js +0 -1
  175. package/dist/web/assets/CreateButton-B7-yiqQx.js +0 -93
  176. package/dist/web/assets/CreateReviewFabButton-BJOAdPG1.js +0 -1
  177. package/dist/web/assets/CreateReviewFabButton-Cufd8hVJ.css +0 -1
  178. package/dist/web/assets/ErrorNotFound-Cq0wNQMu.js +0 -1
  179. package/dist/web/assets/IndexPage-B0itnrts.js +0 -1
  180. package/dist/web/assets/IndexPage-F8MMAAkn.css +0 -1
  181. package/dist/web/assets/MainLayout-CP6Bz7DA.js +0 -6
  182. package/dist/web/assets/NoteVisualEditor-oWUBSuDR.js +0 -1054
  183. package/dist/web/assets/NotesPage-KaCEnfdz.css +0 -1
  184. package/dist/web/assets/NotesPage-Ou5XG64h.js +0 -4
  185. package/dist/web/assets/PanelResize-C51WwwLD.css +0 -1
  186. package/dist/web/assets/PanelResize-D1cRotAi.js +0 -1
  187. package/dist/web/assets/PdfPreview-Cb0xawi0.css +0 -1
  188. package/dist/web/assets/QBtn-DoggJe1Q.js +0 -1
  189. package/dist/web/assets/QExpansionItem-BouBPgdb.js +0 -4
  190. package/dist/web/assets/QFab-B5iz2kQR.js +0 -1
  191. package/dist/web/assets/QForm-tsecXm87.js +0 -1
  192. package/dist/web/assets/QInput-DJgTh2Qy.js +0 -1
  193. package/dist/web/assets/QResizeObserver-gIKjGVQ7.js +0 -1
  194. package/dist/web/assets/QScrollArea-BrOkfO1I.js +0 -1
  195. package/dist/web/assets/QSelect-B5EBNlJ4.js +0 -1
  196. package/dist/web/assets/QSpace-CqqgY-zX.js +0 -1
  197. package/dist/web/assets/QVirtualScroll-BoXSHM25.js +0 -1
  198. package/dist/web/assets/ReviewDetailPage-C3NBR_xR.js +0 -1
  199. package/dist/web/assets/ReviewsPage-Bkinx_Bm.js +0 -1
  200. package/dist/web/assets/StatusSwitcher-8QUHj5Rq.js +0 -1
  201. package/dist/web/assets/TerminalView-elu1dIYU.js +0 -19
  202. package/dist/web/assets/agent-store-1i-UjEzZ.js +0 -113
  203. package/dist/web/assets/architecture-7GRP2DOG-DcZ4-ijA.js +0 -1
  204. package/dist/web/assets/channel-Cgf35HIt.js +0 -1
  205. package/dist/web/assets/create-BSmXD9Zr.js +0 -1
  206. package/dist/web/assets/devices-store-CtEl_8An.js +0 -1
  207. package/dist/web/assets/eventmodeling-NTZA5JFV-CyXHXiX_.js +0 -1
  208. package/dist/web/assets/flowDiagram-KWPJA3E3-C4espOge.js +0 -1
  209. package/dist/web/assets/i18n-xttkoi4H.js +0 -1
  210. package/dist/web/assets/index-BQi8n0xV.js +0 -2
  211. package/dist/web/assets/index-Dma-RXBR.css +0 -1
  212. package/dist/web/assets/init-app-DlPQG9dK.js +0 -1
  213. package/dist/web/assets/pinia-CJGnEjj3.js +0 -1
  214. package/dist/web/assets/pinia-DCsnCHsH.js +0 -1
  215. package/dist/web/assets/railroad-abnf-HS5TGJTU-C5G3FxcO.js +0 -1
  216. package/dist/web/assets/railroad-ebnf-LZEXJU2U-BrTMLAtv.js +0 -1
  217. package/dist/web/assets/railroad-peg-WCYAUIDC-CXVDExl0.js +0 -1
  218. package/dist/web/assets/runtime-core.esm-bundler-BKFI1w28.js +0 -1
  219. package/dist/web/assets/single-flight-DLCbzLI3.js +0 -1
  220. package/dist/web/assets/swimlanesDiagram-TC7HE7FX-C3zKO6Gm.js +0 -8
  221. package/dist/web/assets/theme-B01ZDSW1.js +0 -1
  222. package/dist/web/assets/use-add-agent-context-BE_z8acF.js +0 -1
  223. package/dist/web/assets/use-app-theme-C1KrIJLx.js +0 -1
  224. package/dist/web/assets/use-countdown-2uTxlnFE.js +0 -1
  225. package/dist/web/assets/use-router-link-BGc0noIO.js +0 -1
  226. package/dist/web/assets/use-virtual-scroll-BSXYZjZ5.js +0 -1
  227. package/dist/web/assets/window-store-CIFm3O3S.js +0 -1
@@ -1,113 +0,0 @@
1
- import{it as e,ot as t,rt as n,s as r}from"./runtime-core.esm-bundler-BKFI1w28.js";import{t as i}from"./debounce-rZaFFwsz.js";import{n as a}from"./pinia-DCsnCHsH.js";import{a as o,c as s,f as c,i as l,l as u,m as d,n as f,r as p,s as m,t as h,u as g}from"./single-flight-DLCbzLI3.js";import{t as _}from"./safe-storage-BACMX75F.js";import{n as v}from"./use-server-events-BrBCbeHu.js";function y(e){return e.split(`/`).at(-1)??``}function b(e){return e.split(`/`).slice(0,-1).join(`/`)}function x(e,t){return e?e+`/`+t:t}function S(e){return y(e).replace(/\.md$/i,``)}var C=1e7,w=1e8,ee=2e8,T={inspectExternalAsset:(e,t)=>s(`/api/notes/assets/inspect`,{url:e},t),importExternalAsset:(e,t)=>s(`/api/notes/assets/import`,e,t),previewExternalAsset:(e,t)=>u(`/api/notes/assets/preview`,{url:e},t),delete:(e,t)=>s(`/api/notes/delete`,{id:e,storageId:t}),uploadAsset:async e=>{if(e.size>1e7)throw Error(`Image must be under 10 MB`);let t=new FormData;return t.append(`file`,e),g(`/api/notes/assets`,t)},resolvePath:e=>o(`/api/notes/path?path=`+encodeURIComponent(e)),index:()=>o(`/api/notes`),read:e=>o(`/api/notes/document?path=`+encodeURIComponent(e)),create:(e,t)=>s(`/api/notes/document`,{path:e,text:t}),save:(e,t,n,r,i)=>m(`/api/notes/document`,{path:e,text:t,version:n,id:r,storageId:i}),readId:(e,t)=>o(`/api/notes/by-id?id=`+encodeURIComponent(e)+`&storageId=`+encodeURIComponent(t)),descriptor:(e,t)=>o(`/api/notes/identity?id=`+encodeURIComponent(e)+`&storageId=`+encodeURIComponent(t)),resolve:(e,t,n,r,i)=>s(`/api/notes/resolve`,{sourceId:e,storageId:t,text:n,href:r,occurrence:i}),resolveIdentity:(e,t,n)=>s(`/api/notes/identity/resolve`,{issueId:e,restore:t,candidateId:n}),repair:()=>s(`/api/notes/repair`,{}),rename:(e,t,n,r,i,a)=>s(`/api/notes/rename`,{path:e,name:t,folder:n,target:r,id:i,revision:a}),folder:e=>s(`/api/notes/folder`,{path:e})};function te(e,t,n=Object.is){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function ne(e,t){let n=new Map(e.map(e=>[e.path,e])),r=t.map(e=>{let t=n.get(e.path);return t&&t.folder===e.folder&&t.id===e.id&&t.presence===e.presence&&t.error===e.error&&te(t.tags,e.tags)?t:e});return te(e,r)?e:r}var E=Symbol.for(`yaml.alias`),D=Symbol.for(`yaml.document`),O=Symbol.for(`yaml.map`),re=Symbol.for(`yaml.pair`),k=Symbol.for(`yaml.scalar`),A=Symbol.for(`yaml.seq`),j=Symbol.for(`yaml.node.type`),M=e=>!!e&&typeof e==`object`&&e[j]===E,N=e=>!!e&&typeof e==`object`&&e[j]===D,P=e=>!!e&&typeof e==`object`&&e[j]===O,F=e=>!!e&&typeof e==`object`&&e[j]===re,I=e=>!!e&&typeof e==`object`&&e[j]===k,ie=e=>!!e&&typeof e==`object`&&e[j]===A;function L(e){if(e&&typeof e==`object`)switch(e[j]){case O:case A:return!0}return!1}function R(e){if(e&&typeof e==`object`)switch(e[j]){case E:case O:case k:case A:return!0}return!1}var ae=e=>(I(e)||L(e))&&!!e.anchor,z=Symbol(`break visit`),oe=Symbol(`skip children`),se=Symbol(`remove node`);function B(e,t){let n=ce(t);N(e)?V(null,e.contents,n,Object.freeze([e]))===se&&(e.contents=null):V(null,e,n,Object.freeze([]))}B.BREAK=z,B.SKIP=oe,B.REMOVE=se;function V(e,t,n,r){let i=le(e,t,n,r);if(R(i)||F(i))return ue(e,r,i),V(e,i,n,r);if(typeof i!=`symbol`){if(L(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=V(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===z)return z;else i===se&&(t.items.splice(e,1),--e)}}else if(F(t)){r=Object.freeze(r.concat(t));let e=V(`key`,t.key,n,r);if(e===z)return z;e===se&&(t.key=null);let i=V(`value`,t.value,n,r);if(i===z)return z;i===se&&(t.value=null)}}return i}function ce(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function le(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(P(t))return n.Map?.(e,t,r);if(ie(t))return n.Seq?.(e,t,r);if(F(t))return n.Pair?.(e,t,r);if(I(t))return n.Scalar?.(e,t,r);if(M(t))return n.Alias?.(e,t,r)}function ue(e,t,n){let r=t[t.length-1];if(L(r))r.items[e]=n;else if(F(r))e===`key`?r.key=n:r.value=n;else if(N(r))r.contents=n;else{let e=M(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var de={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},fe=e=>e.replace(/[!,[\]{}]/g,e=>de[e]),H=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(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]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+fe(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&R(e.contents)){let t={};B(e.contents,(e,n)=>{R(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
2
- `)}};H.defaultYaml={explicit:!1,version:`1.2`},H.defaultTags={"!!":`tag:yaml.org,2002:`};function pe(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function me(e){let t=new Set;return B(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function he(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function ge(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=me(e);let a=he(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(I(t.node)||L(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function _e(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=_e(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=_e(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=_e(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=_e(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function U(e,t,n){if(Array.isArray(e))return e.map((e,t)=>U(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!ae(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var ve=class{constructor(e){Object.defineProperty(this,j,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!N(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=U(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?_e(i,{"":o},``,o):o}},ye=class extends ve{constructor(e){super(E),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],B(e,{Node:(e,t)=>{(M(t)||ae(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(U(a,null,t),n.get(a)),!o||o.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=be(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(pe(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function be(e,t,n){if(M(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(L(t)){let r=0;for(let i of t.items){let t=be(e,i,n);t>r&&(r=t)}return r}if(F(t)){let r=be(e,t.key,n),i=be(e,t.value,n);return Math.max(r,i)}return 1}var xe=e=>!e||typeof e!=`function`&&typeof e!=`object`,W=class extends ve{constructor(e){super(k),this.value=e}toJSON(e,t){return t?.keep?this.value:U(this.value,e,t)}toString(){return String(this.value)}};W.BLOCK_FOLDED=`BLOCK_FOLDED`,W.BLOCK_LITERAL=`BLOCK_LITERAL`,W.PLAIN=`PLAIN`,W.QUOTE_DOUBLE=`QUOTE_DOUBLE`,W.QUOTE_SINGLE=`QUOTE_SINGLE`;var Se=`tag:yaml.org,2002:`;function Ce(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function we(e,t,n){if(N(e)&&(e=e.contents),R(e))return e;if(F(e)){let t=n.schema[O].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new ye(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=Se+t.slice(2));let l=Ce(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new W(e);return c&&(c.node=t),t}l=e instanceof Map?o[O]:Symbol.iterator in Object(e)?o[A]:o[O]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new W(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function Te(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return we(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var Ee=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,De=class extends ve{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>R(t)||F(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ee(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(L(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Te(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(L(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&I(i)?i.value:i:L(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!F(t))return!1;let n=t.value;return n==null||e&&I(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return L(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(L(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Te(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},Oe=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function G(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var K=(e,t,n)=>e.endsWith(`
3
- `)?G(n,t):n.includes(`
4
- `)?`
5
- `+G(n,t):(e.endsWith(` `)?``:` `)+n,ke=`flow`,Ae=`block`,je=`quoted`;function Me(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=Ne(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
6
- `)n===`block`&&(h=Ne(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
7
- `&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
8
- `&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function Ne(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
9
- `);r=t,i=t+1,a=e[i]}return r}var Pe=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Fe=e=>/^(%|---|\.\.\.)/m.test(e);function Ie(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
10
- `){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function Le(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(Fe(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){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:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
11
-
12
- `;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
13
- `,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:Me(o,a,je,Pe(t,!1))}function Re(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
14
- `)||/[ \t]\n|\n[ \t]/.test(e))return Le(e,t);let n=t.indent||(Fe(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:Me(r,n,ke,Pe(t,!1))}function ze(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=Le;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?Re:i&&!t?Le:n?Re:Le}return r(e,t)}var Be;try{Be=RegExp(`(^|(?<!
15
- ))
16
- +(?!
17
- |$)`,`g`)}catch{Be=/\n+(?!\n|$)/g}function Ve({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return ze(n,r);let l=r.indent||(r.forceBlockIndent||Fe(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===W.BLOCK_FOLDED?!1:t===W.BLOCK_LITERAL||!Ie(n,c,l.length);if(!n)return u?`|
18
- `:`>
19
- `;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
20
- `&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
21
- `);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
22
- `&&(p=p.slice(0,-1)),p.replace(Be,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
23
- `)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
24
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=Pe(r,!0);o!==`folded`&&t!==W.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=Me(`${v}${e}${p}`,l,Ae,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function He(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
25
- `)||u&&/[[\]{},]/.test(a))return ze(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
26
- `)?ze(a,t):Ve(e,t,n,r);if(!s&&!u&&i!==W.PLAIN&&a.includes(`
27
- `))return Ve(e,t,n,r);if(Fe(a)){if(c===``)return t.forceBlockIndent=!0,Ve(e,t,n,r);if(s&&c===l)return ze(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return ze(a,t)}return s?d:Me(d,c,ke,Pe(t,!1))}function Ue(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==W.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=W.QUOTE_DOUBLE);let c=e=>{switch(e){case W.BLOCK_FOLDED:case W.BLOCK_LITERAL:return i||a?ze(o.value,t):Ve(o,t,n,r);case W.QUOTE_DOUBLE:return Le(o.value,t);case W.QUOTE_SINGLE:return Re(o.value,t);case W.PLAIN:return He(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function We(e,t){let n=Object.assign({blockQuote:!0,commentString:Oe,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,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function Ge(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(I(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function Ke(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(I(e)||L(e))&&e.anchor;a&&pe(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function qe(e,t,n,r){if(F(e))return e.toString(t,n,r);if(M(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=R(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=Ge(t.doc.schema.tags,a);let o=Ke(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):I(a)?Ue(a,t,n,r):a.toString(t,n,r);return o?I(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function Je({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=R(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(L(e)||!R(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||L(e)||(I(e)?e.type===W.BLOCK_FOLDED||e.type===W.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=qe(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=K(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=K(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=K(g,n.indent,l(f))));let _,v,y;R(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&I(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&ie(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=qe(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
28
- `:``,v){let e=l(v);S+=`\n${G(e,n.indent)}`}x===``&&!n.inFlow?S===`
29
- `&&(S=`
30
-
31
- `):S+=`\n${n.indent}`}else if(!p&&L(t)){let e=x[0],r=x.indexOf(`
32
- `),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else(x===``||x[0]===`
33
- `)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=K(g,n.indent,l(y)):h&&i&&i(),g}function Ye(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var Xe=`<<`,q={identify:e=>e===Xe||typeof e==`symbol`&&e.description===Xe,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new W(Symbol(Xe)),{addToJSMap:Qe}),stringify:()=>Xe},Ze=(e,t)=>(q.identify(t)||I(t)&&(!t.type||t.type===W.PLAIN)&&q.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===q.tag&&e.default);function Qe(e,t,n){if(n=e&&M(n)?n.resolve(e.doc):n,ie(n))for(let r of n.items)$e(e,t,r);else if(Array.isArray(n))for(let r of n)$e(e,t,r);else $e(e,t,n)}function $e(e,t,n){let r=e&&M(n)?n.resolve(e.doc):n;if(!P(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function et(e,t,{key:n,value:r}){if(R(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(Ze(e,n))Qe(e,t,r);else{let i=U(n,``,e);if(t instanceof Map)t.set(i,U(r,i,e));else if(t instanceof Set)t.add(i);else{let a=tt(n,i,e),o=U(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function tt(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(R(e)&&n?.doc){let t=We(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),Ye(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function nt(e,t,n){return new J(we(e,void 0,n),we(t,void 0,n))}var J=class e{constructor(e,t=null){Object.defineProperty(this,j,{value:re}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return R(n)&&(n=n.clone(t)),R(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return et(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?Je(this,e,t,n):JSON.stringify(this)}};function rt(e,t,n){return(t.inFlow??e.flow?at:it)(e,t,n)}function it({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(R(i))!d&&i.spaceBefore&&f.push(``),ot(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(F(i)){let e=R(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),ot(n,f,e.commentBefore,d))}d=!1;let s=qe(i,u,()=>o=null,()=>d=!0);o&&(s+=K(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
34
- `}}return e?(p+=`
35
- `+G(l(e),c),s&&s()):d&&o&&o(),p}function at({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(R(i))i.spaceBefore&&d.push(``),ot(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(F(i)){let e=R(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),ot(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=R(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=qe(i,c,()=>a=null);n<e.length-1&&(o+=`,`),a&&(o+=K(o,r,s(a))),!l&&(d.length>u||o.includes(`
36
- `))&&(l=!0),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
37
- `;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function ot({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=G(t(r),e);n.push(i.trimStart())}}function Y(e,t){let n=I(t)?t.value:t;for(let r of e)if(F(r)&&(r.key===t||r.key===n||I(r.key)&&r.key.value===n))return r}var X=class extends De{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(O,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(nt(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=F(e)?e:!e||typeof e!=`object`||!(`key`in e)?new J(e,e?.value):new J(e.key,e.value);let r=Y(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);I(r.value)&&xe(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=Y(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=Y(this.items,e)?.value;return(!t&&I(n)?n.value:n)??void 0}has(e){return!!Y(this.items,e)}set(e,t){this.add(new J(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)et(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!F(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),rt(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},st={collection:`map`,default:!0,nodeClass:X,tag:`tag:yaml.org,2002:map`,resolve(e,t){return P(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>X.from(e,t,n)},ct=class extends De{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(A,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=lt(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=lt(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&I(r)?r.value:r}has(e){let t=lt(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=lt(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];I(r)&&xe(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(U(e,String(r++),t));return n}toString(e,t,n){return e?rt(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(we(a,void 0,n))}}return i}};function lt(e){let t=I(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var ut={collection:`seq`,default:!0,nodeClass:ct,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return ie(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>ct.from(e,t,n)},dt={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),Ue(e,t,n,r)}},ft={identify:e=>e==null,createNode:()=>new W(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new W(null),stringify:({source:e},t)=>typeof e==`string`&&ft.test.test(e)?e:t.options.nullStr},pt={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new W(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&pt.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function Z({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^\d/.test(a)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-->0;)a+=`0`}return a}var mt={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:Z},ht={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Z(e)}},gt={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new W(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:Z},_t=e=>typeof e==`bigint`||Number.isInteger(e),vt=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function yt(e,t,n){let{value:r}=e;return _t(r)&&r>=0?n+r.toString(t):Z(e)}var bt={identify:e=>_t(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>vt(e,2,8,n),stringify:e=>yt(e,8,`0o`)},xt={identify:_t,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>vt(e,0,10,n),stringify:Z},St={identify:e=>_t(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>vt(e,2,16,n),stringify:e=>yt(e,16,`0x`)},Ct=[st,ut,dt,ft,pt,bt,xt,St,mt,ht,gt];function wt(e){return typeof e==`bigint`||Number.isInteger(e)}var Tt=({value:e})=>JSON.stringify(e),Et=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:Tt},{identify:e=>e==null,createNode:()=>new W(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:Tt},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:Tt},{identify:wt,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>wt(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Tt}],Dt=[st,ut].concat(Et,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),Ot={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,t){if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return t(`This environment does not support reading binary tags; either Buffer or atob is required`),e},stringify({comment:e,type:t,value:n},r,i,a){if(!n)return``;let o=n,s;if(typeof btoa==`function`){let e=``;for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);s=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(t??=W.BLOCK_LITERAL,t!==W.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===W.BLOCK_LITERAL?`
38
- `:` `)}return Ue({comment:e,type:t,value:s},r,i,a)}};function kt(e,t){if(ie(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!F(r)){if(P(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new J(new W(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=F(r)?r:new J(r)}}else t(`Expected a sequence for this tag`);return e}function At(e,t,n){let{replacer:r}=n,i=new ct(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(nt(o,s,n))}return i}var jt={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:kt,createNode:At},Mt=class e extends ct{constructor(){super(),this.add=X.prototype.add.bind(this),this.delete=X.prototype.delete.bind(this),this.get=X.prototype.get.bind(this),this.has=X.prototype.has.bind(this),this.set=X.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(F(e)?(r=U(e.key,``,t),i=U(e.value,r,t)):r=U(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=At(e,t,n),i=new this;return i.items=r.items,i}};Mt.tag=`tag:yaml.org,2002:omap`;var Nt={collection:`seq`,identify:e=>e instanceof Map,nodeClass:Mt,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=kt(e,t),r=[];for(let{key:e}of n.items)I(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new Mt,n)},createNode:(e,t,n)=>Mt.from(e,t,n)};function Pt({value:e,source:t},n){return t&&(e?Ft:It).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var Ft={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new W(!0),stringify:Pt},It={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new W(!1),stringify:Pt},Lt={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:Z},Rt={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Z(e)}},zt={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new W(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:Z},Bt=e=>typeof e==`bigint`||Number.isInteger(e);function Vt(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function Ht(e,t,n){let{value:r}=e;if(Bt(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return Z(e)}var Ut={identify:Bt,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Vt(e,2,2,n),stringify:e=>Ht(e,2,`0b`)},Wt={identify:Bt,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Vt(e,1,8,n),stringify:e=>Ht(e,8,`0`)},Gt={identify:Bt,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Vt(e,0,10,n),stringify:Z},Kt={identify:Bt,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Vt(e,2,16,n),stringify:e=>Ht(e,16,`0x`)},qt=class e extends X{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=F(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new J(e.key,null):new J(e,null),Y(this.items,t.key)||this.items.push(t)}get(e,t){let n=Y(this.items,e);return!t&&F(n)?I(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=Y(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new J(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 Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(nt(e,null,n));return i}};qt.tag=`tag:yaml.org,2002:set`;var Jt={collection:`map`,identify:e=>e instanceof Set,nodeClass:qt,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>qt.from(e,t,n),resolve(e,t){if(P(e)){if(e.hasAllNullValues(!0))return Object.assign(new qt,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function Yt(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function Xt(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Z(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}var Zt={identify:e=>typeof e==`bigint`||Number.isInteger(e),default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>Yt(e,n),stringify:Xt},Qt={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>Yt(e,!1),stringify:Xt},$t={identify:e=>e 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(e){let t=e.match($t.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=Yt(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,``)??``},en=[st,ut,dt,ft,Ft,It,Ut,Wt,Gt,Kt,Lt,Rt,zt,Ot,q,Nt,jt,Jt,Zt,Qt,$t],tn=new Map([[`core`,Ct],[`failsafe`,[st,ut,dt]],[`json`,Dt],[`yaml11`,en],[`yaml-1.1`,en]]),nn={binary:Ot,bool:pt,float:gt,floatExp:ht,floatNaN:mt,floatTime:Qt,int:xt,intHex:St,intOct:bt,intTime:Zt,map:st,merge:q,null:ft,omap:Nt,pairs:jt,seq:ut,set:Jt,timestamp:$t},rn={"tag:yaml.org,2002:binary":Ot,"tag:yaml.org,2002:merge":q,"tag:yaml.org,2002:omap":Nt,"tag:yaml.org,2002:pairs":jt,"tag:yaml.org,2002:set":Jt,"tag:yaml.org,2002:timestamp":$t};function an(e,t,n){let r=tn.get(t);if(r&&!e)return n&&!r.includes(q)?r.concat(q):r.slice();let i=r;if(!i){if(Array.isArray(e))i=[];else{let e=Array.from(tn.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(q)),i.reduce((e,t)=>{let n=typeof t==`string`?nn[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(nn).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}var on=(e,t)=>e.key<t.key?-1:+(e.key>t.key),sn=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?an(e,`compat`):e?an(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?rn:{},this.tags=an(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,O,{value:st}),Object.defineProperty(this,k,{value:dt}),Object.defineProperty(this,A,{value:ut}),this.sortMapEntries=typeof a==`function`?a:a===!0?on:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function cn(e,t){let n=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push(`---`);let i=We(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(G(t,``))}let o=!1,s=null;if(e.contents){if(R(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(G(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=qe(e.contents,i,()=>s=null,t);s&&(c+=K(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(qe(e.contents,i));if(e.directives?.docEnd){if(e.comment){let t=a(e.comment);t.includes(`
39
- `)?(n.push(`...`),n.push(G(t,``))):n.push(`... ${t}`)}else n.push(`...`)}else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,``)),t&&((!o||s)&&n[n.length-1]!==``&&n.push(``),n.push(G(a(t),``)))}return n.join(`
40
- `)+`
41
- `}var ln=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,j,{value:D});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new H({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[j]:{value:D}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=R(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){un(this.contents)&&this.contents.add(e)}addIn(e,t){un(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=me(this);e.anchor=!t||n.has(t)?he(t||`a`,n):t}return new ye(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=ge(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=we(e,l,p);return o&&L(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new J(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return un(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ee(e)?this.contents!=null&&(this.contents=null,!0):un(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 Ee(e)?!t&&I(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 Ee(e)?this.contents!==void 0:L(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Te(this.schema,[e],t):un(this.contents)&&this.contents.set(e,t)}setIn(e,t){Ee(e)?this.contents=t:this.contents==null?this.contents=Te(this.schema,Array.from(e),t):un(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 H({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 H({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new sn(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=U(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?_e(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return cn(this,e)}};function un(e){if(L(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var dn=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},fn=class extends dn{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},pn=class extends dn{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},mn=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
42
- `),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t&&t.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function hn(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),!1),h&&=(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),null),i.type){case`space`:!t&&(n!==`doc-start`||r?.type!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||r?.type===`block-map`||r?.type===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function gn(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
43
- `))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(gn(t.key)||gn(t.value))return!0}return!1;default:return!0}}function _n(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&gn(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function vn(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||I(e)&&I(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var yn=`All mapping items must start at the same column`;function bn({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??X)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=hn(l,{indicator:`explicit-key-ind`,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in u&&u.indent!==r.indent&&i(s,`BAD_INDENT`,yn)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
44
- `+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||gn(u))&&i(u??l[l.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else p.found?.indent!==r.indent&&i(s,`BAD_INDENT`,yn);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&_n(r.indent,u,i),n.atKey=!1,vn(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=hn(d??[],{indicator:`map-value-ind`,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type===`block-scalar`});if(s=_.end,_.found){m&&(f?.type===`block-map`&&!_.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&p.start<_.found.offset-1024&&i(g.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&_n(r.indent,f,i),s=c.range[2];let l=new J(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),_.comment&&(g.comment?g.comment+=`
45
- `+_.comment:g.comment=_.comment);let e=new J(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function xn({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??ct)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=hn(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||l)l&&l.type===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&_n(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function Sn(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}var Cn=`Block collections are not allowed within flow collections`,wn=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function Tn({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a?.nodeClass)??(o?X:ct))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=hn(d,{flow:s,indicator:`explicit-key-ind`,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(h.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),h.comment&&(c.comment?c.comment+=`
46
- `+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&gn(f)&&i(f,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)h.comma&&i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(h.comma||i(h.start,`MISSING_CHAR`,`Missing , between ${s} items`),h.comment){let e=``;loop:for(let t of d)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];F(t)&&(t=t.value??t.key),t.comment?t.comment+=`
47
- `+e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],wn(m)&&i(r.range,`BLOCK_IN_FLOW`,Cn)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);wn(f)&&i(g.range,`BLOCK_IN_FLOW`,Cn),n.atKey=!1;let _=hn(p??[],{flow:s,indicator:`map-value-ind`,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}h.start<_.found.offset-1024&&i(_.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else m&&(`source`in m&&m.source&&m.source[0]===`:`?i(m,`MISSING_CHAR`,`Missing space after : in ${s}`):i(_.start,`MISSING_CHAR`,`Missing , or : between ${s} items`));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?wn(m)&&i(v.range,`BLOCK_IN_FLOW`,Cn):_.comment&&(g.comment?g.comment+=`
48
- `+_.comment:g.comment=_.comment);let y=new J(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;vn(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new X(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o?`}`:`]`,[f,...p]=r.end,m=u;if(f&&f.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=Sn(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
49
- `+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function En(e,t,n,r,i,a){let o=n.type===`block-map`?bn(e,t,n,r,a):n.type===`block-seq`?xn(e,t,n,r,a):Tn(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function Dn(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let s=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!a||!o||o===`!`||o===X.tagName&&s===`map`||o===ct.tagName&&s===`seq`)return En(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r&&r.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${s} collection, but expects ${r.collection??`scalar`}`,!0):i(a,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${o}`,!0),En(e,t,n,i,o)}let l=En(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=R(u)?u:new W(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function On(e,t,n){let r=t.offset,i=kn(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?W.BLOCK_FOLDED:W.BLOCK_LITERAL,o=t.source?An(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
50
- `.repeat(Math.max(1,o.length-1)):``,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a===``||a===`\r`)i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d=``,f=``,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+`
51
- `;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===W.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
52
- `):t.length>c||r[0]===` `?(f===` `?f=`
53
- `:!p&&f===`
54
- `&&(f=`
55
-
56
- `),d+=f+t.slice(c)+r,f=`
57
- `,p=!0):r===``?f===`
58
- `?d+=`
59
- `:f=`
60
- `:(d+=f+r,f=` `,p=!1)}switch(i.chomp){case`-`:break;case`+`:for(let e=s;e<o.length;++e)d+=`
61
- `+o[e][0].slice(c);d[d.length-1]!==`
62
- `&&(d+=`
63
- `);break;default:d+=`
64
- `}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function kn({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function An(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function jn(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=W.PLAIN,c=Mn(a,l);break;case`single-quoted-scalar`:s=W.QUOTE_SINGLE,c=Nn(a,l);break;case`double-quoted-scalar`:s=W.QUOTE_DOUBLE,c=Fn(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=Sn(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function Mn(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),Pn(e)}function Nn(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),Pn(e.slice(1,-1)).replace(/''/g,`'`)}function Pn(e){let t,n;try{t=RegExp(`(.*?)(?<![ ])[ ]*\r?
65
- `,`sy`),n=RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
66
- `,`sy`)}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],a=` `,o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)r[1]===``?a===`
67
- `?i+=a:a=`
68
- `:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+(r?.[1]??``)}function Fn(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!==`\r`||e[r+1]!==`
69
- `){if(i===`
70
- `){let{fold:t,offset:i}=In(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=Ln[i];if(a)n+=a;else if(i===`
71
- `)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
72
- `)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a={x:2,u:4,U:8}[i];n+=Rn(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
73
- `&&(a!==`\r`||e[r+2]!==`
74
- `)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function In(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
75
- `||r===`\r`)&&(r!==`\r`||e[t+2]===`
76
- `);)r===`
77
- `&&(n+=`
78
- `),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}var Ln={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
79
- `,r:`\r`,t:` `,v:`\v`,N:`…`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function Rn(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(a)){let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}return String.fromCodePoint(a)}function zn(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?On(e,t,r):jn(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[k]:c?Bn(e.schema,i,c,n,r):t.type===`scalar`?Vn(e,i,t,r):e.schema[k];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=I(a)?a:new W(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new W(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function Bn(e,t,n,r,i){if(n===`!`)return e[k];let a=[];for(let t of e.tags)if(!t.collection&&t.tag===n){if(t.default&&t.test)a.push(t);else return t}for(let e of a)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[k])}function Vn({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>(t.default===!0||e&&t.default===`key`)&&t.test?.test(r))||n[k];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[k];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function Hn(e,t,n){if(t){n??=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];n?.type===`space`;)e+=n.source.length,n=t[++r];break}}return e}var Un={composeNode:Wn,composeEmptyNode:Gn};function Wn(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=Kn(e,t,r),(s||c)&&r(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:l=zn(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:l=Dn(Un,e,t,n,r),s&&(l.anchor=s.source.substring(1));break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),l=Gn(e,t.offset,void 0,null,n,r),u=!1}return s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!I(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function Gn(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=zn(e,{type:`scalar`,offset:Hn(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function Kn({options:e},{offset:t,source:n,end:r},i){let a=new ye(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=Sn(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function qn(e,t,{offset:n,start:r,value:i,end:a},o){let s=new ln(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=hn(r,{indicator:`doc-start`,next:i??a?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?Wn(c,i,l,o):Gn(c,l.end,r,null,l,o);let u=s.contents.range[2],d=Sn(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function Jn(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function Yn(e){let t=``,n=!1,r=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case`#`:t+=(t===``?``:r?`
80
-
81
- `:`
82
- `)+(a.substring(1)||` `),n=!0,r=!1;break;case`%`:e[i+1]?.[0]!==`#`&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var Xn=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=Jn(e);r?this.warnings.push(new pn(i,t,n)):this.errors.push(new fn(i,t,n))},this.directives=new H({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=Yn(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(L(i)&&!i.flow&&i.items.length>0){let e=i.items[0];F(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Yn(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=Jn(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=qn(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new fn(Jn(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new fn(Jn(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=Sn(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new fn(Jn(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new ln(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}},Zn=Symbol(`break visit`),Qn=Symbol(`skip children`),$n=Symbol(`remove item`);function er(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),tr(Object.freeze([]),e,t)}er.BREAK=Zn,er.SKIP=Qn,er.REMOVE=$n,er.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},er.parentCollection=(e,t)=>{let n=er.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function tr(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=tr(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===Zn)return Zn;else r===$n&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function nr(e){switch(e){case``:return`byte-order-mark`;case``:return`doc-mode`;case``:return`flow-error-end`;case``:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
83
- `:case`\r
84
- `: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(e[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}function Q(e){switch(e){case void 0:case` `:case`
85
- `:case`\r`:case` `:return!0;default:return!1}}var rr=new Set(`0123456789ABCDEFabcdef`),ir=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),ar=new Set(`,[]{}`),or=new Set(` ,[]{}
86
- \r `),sr=e=>!e||or.has(e),cr=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
87
- `||t===`\r`&&this.buffer[e+1]===`
88
- `}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
89
- `||!t&&!this.atEnd)return e+n+1}return t===`
90
- `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&Q(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(`
91
- `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,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]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&Q(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Q(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&Q(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil(sr),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&Q(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield``,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`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,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(sr),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||Q(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
92
- `,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
93
- `,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>Q(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
94
- `:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
95
- `)break}default:break loop}if(!n&&!this.atEnd)return this.setNext(`block-scalar`);if(t>=this.indentNext){this.indentNext=this.blockScalarIndent===-1?t:this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
96
- `,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===` `;)n=this.buffer[++r];if(n===` `){for(;n===` `||n===` `||n===`\r`||n===`
97
- `;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r===`\r`&&(r=this.buffer[--n]);let i=n;for(;r===` `;)r=this.buffer[--n];if(r===`
98
- `&&n>=this.pos&&n+1+t>i)e=n;else break}while(1);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(Q(r)||e&&ar.has(r))break;t=n}else if(Q(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
99
- `?(n+=1,r=`
100
- `,i=this.buffer[n+1]):t=n),i===`#`||e&&ar.has(i))break;if(r===`
101
- `){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&ar.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield``,yield*this.pushToIndex(t+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){switch(this.charAt(0)){case`!`:return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case`&`:return(yield*this.pushUntil(sr))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case`-`:case`?`:case`:`:{let e=this.flowLevel>0,t=this.charAt(1);if(Q(t)||e&&ar.has(t))return e?this.flowKey&&=!1:this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!Q(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(ir.has(t))t=this.buffer[++e];else if(t===`%`&&rr.has(this.buffer[e+1])&&rr.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
102
- `?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
103
- `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},lr=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let 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};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function $(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function ur(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function dr(e){switch(e?.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function fr(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function pr(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break loop}for(;e[++t]?.type===`space`;);return e.splice(t,e.length)}function mr(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!$(t.start,`explicit-key-ind`)&&!$(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,dr(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}var hr=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new cr,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=nr(e);if(!t){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else 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}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&(!e||e.type!==`doc-end`)){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&mr(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&ur(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case`directive-line`:yield{type:`directive`,offset:this.offset,source:this.source};return;case`byte-order-mark`:case`space`:case`comment`:case`newline`:yield this.sourceToken;return;case`doc-mode`:case`doc-start`:{let e={type:`document`,offset:this.offset,start:[]};this.type===`doc-start`&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case`doc-start`:ur(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case`anchor`:case`tag`:case`space`:case`comment`:case`newline`:e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type===`map-value-ind`){let t=pr(fr(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};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 e=this.source.indexOf(`
104
- `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
105
- `,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,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.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=pr(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if($(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(dr(t.key)&&!$(t.sep,`newline`)){let e=pr(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken)}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):$(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!$(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:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start),n.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||$(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e&&e.type===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=pr(fr(t));mr(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
106
- `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
107
- `,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=pr(fr(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=pr(fr(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.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 gr(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new lr||null,prettyErrors:t}}function _r(e,t={}){let{lineCounter:n,prettyErrors:r}=gr(t),i=new hr(n?.addNewLine),a=new Xn(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new fn(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(mn(e,n)),o.warnings.forEach(mn(e,n))),o}function vr(e){let t=e.startsWith(``)?``:``,n=e.slice(t.length);if(!/^---\r?\n/.test(n))return{head:t,body:n,yaml:``,eol:e.includes(`\r
108
- `)?`\r
109
- `:`
110
- `};let r=n.match(/^---\r?\n([\s\S]*?)(?:^---[ \t]*(?:\r?\n|$))/m);if(!r)throw Error(`Unclosed YAML frontmatter`);return{head:t+r[0],body:n.slice(r[0].length),yaml:r[1]??``,eol:r[0].includes(`\r
111
- `)?`\r
112
- `:`
113
- `}}function yr(e){try{let{doc:t}=Sr(e),n=t.get(`tags`);if(n===void 0)return{tags:[],error:null};if(!ie(n)||n.items.some(e=>!I(e)||typeof e.value!=`string`))throw Error(`tags must be a list of strings`);return{tags:br(n.items.map(e=>I(e)?String(e.value):``)),error:null}}catch(e){return{tags:[],error:f(e)}}}function br(e){return[...new Set(e.map(e=>e.trim()).filter(Boolean))]}function xr(e,t){let n=yr(e);if(n.error)throw Error(n.error);let r=br(t);if(JSON.stringify(r)===JSON.stringify(n.tags))return e;let{parts:i,doc:a}=Sr(e);return a.set(`tags`,r),wr(e,i,a.toString())}function Sr(e){let t=vr(e),n=_r(t.yaml);if(n.errors.length)throw Error(n.errors[0]?.message);if(n.contents&&!P(n.contents))throw Error(`Frontmatter must be a YAML mapping`);return{parts:t,doc:n}}function Cr(e){let{doc:t}=Sr(e);if(!P(t.contents))return[];let n=t.toJS({maxAliasCount:100});return d(n)?t.contents.items.map(e=>{if(!I(e.key)||typeof e.key.value!=`string`)throw Error(`Property names must be strings`);let t=e.key.value;return{key:t,value:n[t]}}):[]}function wr(e,t,n){return(e.startsWith(``)?``:``)+`---`+t.eol+n.replace(/\n/g,t.eol)+`---`+t.eol+t.body}function Tr(e,t,n){if(!t.trim())throw Error(`Property name must not be empty`);if(t===`tags`){if(!Array.isArray(n))throw Error(`tags must be a list of strings`);return xr(e,n)}let{parts:r,doc:i}=Sr(e),a=Cr(e).find(e=>e.key===t);return a&&JSON.stringify(a.value)===JSON.stringify(n)?e:(i.set(t,n),wr(e,r,i.toString()))}function Er(e,t){let{parts:n,doc:r}=Sr(e);return r.has(t)?(r.delete(t),wr(e,n,r.toString())):e}function Dr(e){return e.id&&e.storageId?T.readId(e.id,e.storageId):T.read(e.path)}var Or=a(`notes`,()=>{let n=t({entries:[],storage:``,warning:null}),i=t(``),a=t(``),o=t(null),s=e({}),c=t(``),l=t(!1),u=r(()=>s[i.value]),d=r(()=>u.value?.path??o.value?.note.path??``),m=new Map,g=0;function _(e){let t=e.id??e.path,n=s[t];s[t]={...e,saved:e.text,status:`saved`,error:``,disk:null,revision:(n?.revision??0)+1}}function v(e){return s[e]?e:Object.keys(s).find(t=>s[t]?.path===e)??e}function y(e,t){let n=s[v(e)];n&&n.text!==t&&(n.text=t,n.status!==`conflict`&&(n.status=t===n.saved?`saved`:`dirty`,n.error=``))}async function S(e){let t=s[e];if(!t||t.deleted)return!0;for(;t.text!==t.saved;){if(t.status===`conflict`)return!1;let e=yr(t.text);if(e.error)return t.status=`error`,t.error=e.error,!1;let n=t.text;t.status=`saving`;try{let e=await T.save(t.path,n,t.version,t.id,t.storageId);t.path=e.path,t.saved=e.text,t.version=e.version,t.error=``}catch(e){return t.status=e instanceof p&&e.status===409?`conflict`:`error`,t.error=f(e),t.status===`conflict`&&(t.disk=await Dr(t).catch(()=>null)),!1}}return t.status=`saved`,!0}async function C(e=i.value){e=v(e);let t=m.get(e);if(t)return await t?C(e):!1;let n=S(e);m.set(e,n);try{return await n}finally{m.delete(e)}}let w=h(async()=>{try{let e=await T.index(),t=ne(n.value.entries,e.entries);(t!==n.value.entries||e.storage!==n.value.storage||e.warning!==n.value.warning||e.storageId!==n.value.storageId||e.revision!==n.value.revision||JSON.stringify(e.issues)!==JSON.stringify(n.value.issues))&&(n.value={...e,entries:t});let r=i.value;m.has(r)&&await m.get(r);let a=s[r];if(a)try{let e=a.version,t=await Dr(a);if(i.value!==r||s[r]!==a||a.version!==e)return;if(a.path=t.path,t.id&&t.id!==a.id&&a.text===a.saved){_(t),i.value=t.id,delete s[r];return}t.version!==a.version&&(a.text===a.saved?_(t):(a.status=`conflict`,a.disk=t,a.error=`The note changed on disk.`))}catch(e){a.status=e instanceof p&&e.status===404?`conflict`:`error`,a.disk=null,a.error=f(e)}if(o.value&&n.value.storageId){o.value=await T.descriptor(o.value.note.id,n.value.storageId);let e=s[o.value.note.id];o.value.note.presence===`deleted`&&e&&(e.deleted=!0)}c.value=``}catch(e){c.value=f(e)}});async function ee(e){let t=++g;if(!await C())return!1;l.value=!0;try{let n=await T.read(e);return t===g&&(_(n),i.value=n.id??n.path,o.value=null,c.value=``,!0)}catch(e){return c.value=f(e),!1}finally{t===g&&(l.value=!1)}}async function te(e,t=``){if(!await C())return!1;try{let n=await T.create(e,t);return _(n),a.value=n.id??n.path,await w(),!0}catch(e){return c.value=f(e),!1}}async function E(e,t,r,a,o){let l=t=>t===e||r&&t.startsWith(e+`/`);for(let e of Object.keys(s))if(!await C(e))return c.value=s[e]?.error||`Save the note before renaming.`,!1;try{await w();let c=n.value.entries.find(t=>t.path===e&&!t.folder)?.id;if(o&&c!==o)throw Error(`The note moved or changed. Try again.`);await T.rename(e,t,r,a,c,n.value.revision);let u=a??x(b(e),t),d=t=>u+t.slice(e.length);for(let e of Object.keys(s)){if(!l(s[e].path))continue;let t=s[e],n=t.path;t.path=d(n),t.id||(delete s[e],s[t.path]=t,i.value===e&&(i.value=t.path))}return await w(),!0}catch(e){return c.value=f(e),!1}}async function D(e){let t=n.value.entries.find(t=>t.path===e&&!t.folder),r=n.value.storageId;if(!t?.id||!r)return c.value=`The note is no longer available.`,!1;if(!await C(e))return c.value=s[v(e)]?.error||`Save the note before deleting.`,!1;try{return await T.delete(t.id,r),delete s[t.id],delete s[e],(i.value===t.id||i.value===e)&&j(),await w(),!0}catch(e){return c.value=f(e),!1}}async function O(e){try{await T.folder(e),await w()}catch(e){c.value=f(e)}}async function re(){let e=i.value;await m.get(e);try{let t=s[e];return t?(_(await Dr(t)),!0):!1}catch(e){return c.value=f(e),!1}}async function k(e){let t=u.value;if(!t)return!1;try{let n=await T.create(e,t.text);return _(n),a.value=n.id??n.path,delete s[t.id??t.path],await w(),!0}catch(e){return c.value=f(e),!1}}async function A(e,t){let n=++g;if(!await C())return!1;l.value=!0;try{let r=await T.descriptor(e,t),a=r.note.presence===`present`?await T.readId(r.note.id,t):null;return n===g&&(o.value=r,i.value=r.note.id,a&&_(a),c.value=``,!0)}catch(e){return n===g&&(i.value=``,o.value=null,c.value=f(e)),!1}finally{n===g&&(l.value=!1)}}function j(){i.value=``,o.value=null}async function M(e,t,n){if(!await C())return!1;try{return await T.resolveIdentity(e,t,n),await w(),!0}catch(e){return c.value=f(e),!1}}async function N(){if(await C())try{await T.repair(),await w()}catch(e){c.value=f(e)}}return{createdId:a,selectedId:i,descriptor:o,selectId:A,clearSelection:j,resolveIdentity:M,repair:N,index:n,selected:d,drafts:s,current:u,error:c,loading:l,edit:y,save:C,refresh:w,select:ee,create:te,folder:O,reloadDisk:re,saveCopy:k,remove:D,rename:E}}),kr=10485760;function Ar(e){return`tool:${e}`}function jr(){return{items:[],permissions:[],status:`starting`,usage:null,config:[],autoApprove:!1,lastEventId:0,lastStopReason:null}}function Mr(e,t){if(t.id<=e.lastEventId)return;e.lastEventId=t.id;let{event:n}=t,r=`ev:${t.id}`;switch(n.type){case`status`:e.status=n.status;break;case`config`:e.config=n.options;break;case`user`:e.items.push({kind:`user`,id:r,text:n.text,context:n.context});break;case`message`:{let t=e.items.at(-1),i=n.role;t&&t.kind===i?t.text+=n.text:e.items.push({kind:i,id:r,text:n.text});break}case`tool`:{let t=e.items.find(e=>e.kind===`tool`&&e.id===Ar(n.toolCallId));t?(n.title&&(t.title=n.title),n.kind&&(t.toolKind=n.kind),n.status&&(t.status=n.status),n.locations&&(t.locations=n.locations),n.diffs&&(t.diffs=n.diffs),n.output!==void 0&&(t.output=n.output)):e.items.push({kind:`tool`,id:Ar(n.toolCallId),title:n.title??``,toolKind:n.kind,status:n.status??`pending`,locations:n.locations??[],diffs:n.diffs??[],output:n.output});break}case`permission`:e.permissions.some(e=>e.requestId===n.requestId)||e.permissions.push({requestId:n.requestId,toolCallId:n.toolCallId,title:n.title,options:n.options,diffs:n.diffs});break;case`permission-resolved`:e.permissions=e.permissions.filter(e=>e.requestId!==n.requestId);break;case`auto-approve`:e.autoApprove=n.enabled;break;case`auto-approved`:e.items.push({kind:`auto-approved`,id:r,title:n.title});break;case`usage`:e.usage={used:n.used,size:n.size,cost:n.cost};break;case`stop`:e.lastStopReason=n.stopReason;break;case`error`:e.items.push({kind:`error`,id:r,text:n.message})}}function Nr(e,t){e.status=t.status,e.autoApprove=t.autoApprove,e.config=t.config,e.permissions=t.permissions.map(({requestId:e,toolCallId:t,title:n,options:r,diffs:i})=>({requestId:e,toolCallId:t,title:n,options:r,diffs:i}))}function Pr(e){let t;try{t=JSON.parse(e)}catch{return null}return d(t)&&typeof t.sessionId==`string`&&typeof t.status==`string`&&typeof t.autoApprove==`boolean`&&Array.isArray(t.config)&&Array.isArray(t.permissions)?t:null}function Fr(e){return e.kind===`note`?JSON.stringify([e.kind,e.storageId,e.noteId]):JSON.stringify(e)}function Ir(e,t){let n=new Set,r=[];for(let i of[...e,...t]){let e=Fr(i);n.has(e)||(n.add(e),r.push(i))}return r}function Lr(e){return e.some(e=>e.kind===`user`&&e.context.some(e=>e.kind===`review`))}function Rr(e){let t=zr(e);if(!t)return null;let{sessionId:n}=t;return typeof n==`string`&&n!==``?{...t,sessionId:n}:null}function zr(e){let t;try{t=JSON.parse(e)}catch{return null}return d(t)&&typeof t.id==`number`&&d(t.event)&&typeof t.event.type==`string`?t:null}var Br=`githuman.agent.activeChat`,Vr=2e3,Hr=2e3,Ur=a(`agent`,()=>{let e=t([]),a=t(!1),u=t({}),m=t([]),g=t(null),y=t(!1),b=t(!1),x=t(null),S=t({open:!1,context:[]}),C=null,w=!1,ee=i(()=>{w=!1,R()},Vr),T=!1,te=!1,ne=0,E=new Set,D=new Map,O=new Map,re=r(()=>m.value.flatMap(e=>{let t=u.value[e];return t?[t]:[]})),k=r(()=>g.value===null?null:u.value[g.value]??null),A=r(()=>m.value.length<5);function j(e){let t=u.value[e.id];if(t)return t.info=e,t;let n=jr();n.status=e.status,n.autoApprove=e.autoApprove,u.value[e.id]={info:e,chat:n,pendingContext:[],error:null,reviewStale:!1,closing:!1,seq:++ne},m.value.push(e.id);let r=u.value[e.id];if(!r)throw Error(`unreachable: chat was just registered`);let i=O.get(e.id);i&&Nr(r.chat,i),O.delete(e.id);for(let t of D.get(e.id)??[])Mr(r.chat,t);return D.delete(e.id),r}function M(e){let t=m.value.indexOf(e);t!==-1&&(m.value.splice(t,1),delete u.value[e],D.delete(e),O.delete(e),g.value===e&&N(m.value[t]??m.value[t-1]??null))}function N(e){g.value=e,e===null?_.remove(Br):_.set(Br,e)}function P(e){u.value[e]&&(N(e),y.value=!0)}let F=h(async()=>{let e=ne,t;try{t=await o(`/api/agent/sessions`)}catch(e){x.value=f(e);return}let n=new Set(t.map(e=>e.id));for(let e of t)E.has(e.id)||j(e);let r=m.value.filter(t=>!n.has(t)&&(u.value[t]?.seq??0)<=e);for(let e of r)M(e);for(let e of D.keys())n.has(e)||D.delete(e);for(let e of O.keys())n.has(e)||O.delete(e);if(g.value===null||!u.value[g.value]){let e=_.get(Br);N((e!==null&&u.value[e]?e:null)??m.value[0]??null)}});function I(e){let t=u.value[e.sessionId];if(t){Mr(t.chat,e);return}if(E.has(e.sessionId))return;let n=D.get(e.sessionId)??[];n.length<Hr&&n.push(e),D.set(e.sessionId,n),F()}function ie(){T||w||(w=!0,ee())}function L(){T=!0,ee.cancel(),w=!1,C?.close(),C=null}function R(){if(T||C)return;ee.cancel(),w=!1;let e=new EventSource(`/api/agent/events`);e.addEventListener(`agent`,t=>{if(C!==e||!(t instanceof MessageEvent))return;let n=Rr(String(t.data));n&&I(n)}),e.addEventListener(`gap`,t=>{if(C===e&&t instanceof MessageEvent)try{let e=JSON.parse(String(t.data)),n=d(e)&&typeof e.sessionId==`string`?e.sessionId:null,r=n===null?void 0:u.value[n];r?Object.assign(r.chat,jr()):n!==null&&D.delete(n)}catch{}}),e.addEventListener(`state`,t=>{if(C!==e||!(t instanceof MessageEvent))return;let n=Pr(String(t.data));if(!n)return;let r=u.value[n.sessionId];r?Nr(r.chat,n):E.has(n.sessionId)||O.set(n.sessionId,n)}),e.addEventListener(`sessions`,()=>{C===e&&F()}),e.addEventListener(`open`,()=>{C===e&&F()}),e.addEventListener(`error`,()=>{C===e&&e.readyState===EventSource.CLOSED&&(C=null,c(),ie())}),C=e}async function ae(){try{e.value=await o(`/api/agent/presets`)}catch(e){if(T)return;a.value=!1,e instanceof p&&e.status===404||(x.value=f(e));return}T||(a.value=!0,await F(),!T&&(R(),te||(te=!0,v([`files:changed`],pe))))}function z(e=[]){return A.value?(S.value={open:!0,context:e},!0):!1}function oe(){S.value={open:!1,context:[]}}async function se(e,t,n=[]){if(b.value)throw Error(`A chat is already being created`);b.value=!0,x.value=null;try{let r=await s(`/api/agent/sessions`,{presetId:e,name:t}),i=j(r);return i.pendingContext=Ir(i.pendingContext,n),P(r.id),r.id}catch(e){throw x.value=f(e),e}finally{b.value=!1}}async function B(e){let t=u.value[e];if(t&&!t.closing){t.closing=!0;try{await l(`/api/agent/sessions/${e}`)}catch(e){if(!(e instanceof p&&e.status===404))throw t.closing=!1,t.error=f(e),e}E.add(e),M(e)}}async function V(e,t=[],n=g.value){let r=n===null?void 0:u.value[n],i=e.trim();if(!r||i===``||r.chat.status!==`ready`)return!1;r.error=null;let a=Ir(r.pendingContext,t),o={text:i,context:a};try{let e=Or();for(let t of a){if(t.kind!==`note`)continue;let n=e.drafts[t.noteId];if(n&&n.storageId===t.storageId&&!await e.save(t.noteId))throw Error(n.error||`Could not save the note`)}await s(`/api/agent/sessions/${r.info.id}/prompt`,o);let t=new Set(a.map(Fr));return r.pendingContext=r.pendingContext.filter(e=>!t.has(Fr(e))),!0}catch(e){throw r.error=f(e),e}}async function ce(e=g.value){let t=e===null?void 0:u.value[e];t&&t.chat.status===`busy`&&await s(`/api/agent/sessions/${t.info.id}/cancel`)}async function le(e,t,n=g.value){let r=n===null?void 0:u.value[n];if(!r)return;let i=t===void 0?{}:{optionId:t};await s(`/api/agent/sessions/${r.info.id}/permissions/${e}`,i)}async function ue(e,t,n=g.value){let r=n===null?void 0:u.value[n];if(!r||r.chat.status!==`ready`)return;r.error=null;let i={configId:e,value:t};try{await s(`/api/agent/sessions/${r.info.id}/config`,i)}catch(e){throw r.error=f(e),e}}async function de(e,t=g.value){let n=t===null?void 0:u.value[t];if(!n)return;let r={enabled:e};await s(`/api/agent/sessions/${n.info.id}/auto-approve`,r)}function fe(e,t){let n=t===void 0?k.value:u.value[t];if(t!==void 0&&!n)return`missing`;if(!n)return z([e])?`dialog`:`limit`;let r=Fr(e);return n.pendingContext.some(e=>Fr(e)===r)||n.pendingContext.push(e),y.value=!0,`added`}function H(e,t=g.value){(t===null?void 0:u.value[t])?.pendingContext.splice(e,1)}function pe(){for(let e of Object.values(u.value))Lr(e.chat.items)&&(e.reviewStale=!0)}return n(L),{presets:e,enabled:a,chats:u,order:m,list:re,activeId:g,activeChat:k,canAddChat:A,panelOpen:y,creating:b,error:x,newChatDialog:S,init:ae,refreshSessions:F,openNewChatDialog:z,closeNewChatDialog:oe,createChat:se,closeChat:B,selectChat:N,openChat:P,send:V,cancel:ce,answerPermission:le,setConfig:ue,setAutoApprove:de,addContext:fe,removeContext:H,markWorktreeChanged:pe}});export{y as _,Cr as a,S as b,xr as c,I as d,te as f,w as g,ee as h,yr as i,vr as l,C as m,kr as n,Er as o,T as p,Or as r,Tr as s,Ur as t,_r as u,x as v,b as y};
@@ -1 +0,0 @@
1
- import"./chunk-FOHPRMQF-CoA4358r.js";import{M as e}from"./mermaid-parser.core-CWHLi3M4.js";export{e as createArchitectureServices};
@@ -1 +0,0 @@
1
- import{at as e,ot as t}from"./chunk-O7XYJQB3-y25ZXdWk.js";var n=(n,r)=>t.lang.round(e.parse(n)[r]);export{n as t};
@@ -1 +0,0 @@
1
- import{_ as e,it as t,nt as n}from"./runtime-core.esm-bundler-BKFI1w28.js";import{d as r}from"./event-rR76ioXz.js";function i(t){return n(e(t))}function a(e){return n(e)}var o=(e,n)=>{let i=t(e);for(let t in e)r(n,t,()=>i[t],e=>{i[t]=e});return n};export{a as n,o as r,i as t};
@@ -1 +0,0 @@
1
- import{K as e,ot as t,rt as n,s as r}from"./runtime-core.esm-bundler-BKFI1w28.js";import{n as i}from"./pinia-DCsnCHsH.js";import{a,c as o,i as s,m as c,n as l,p as u,s as d,t as f}from"./single-flight-DLCbzLI3.js";import{d as p,g as m,t as h}from"./window-store-CIFm3O3S.js";import{t as g}from"./safe-storage-BACMX75F.js";import{i as _,n as v}from"./use-server-events-BrBCbeHu.js";var y=i(`repository`,()=>{let e=t(null),n=t(!1),r=t(null);return{info:e,loading:n,error:r,fetchInfo:f(async()=>{n.value=!0,r.value=null;try{e.value=await a(`/api/git/info`)}catch(t){e.value=null,r.value=l(t)}finally{n.value=!1}})}}),b=5e3,x=class{socket=null;stopped=!1;generation=0;retry;attempts=0;messages=new Set;states=new Set;token;socketFactory;origin;constructor(e=()=>o(`/api/terminal/token`),t=e=>new WebSocket(e),n=()=>window.location.origin){this.token=e,this.socketFactory=t,this.origin=n}onMessage(e){return this.messages.add(e),()=>this.messages.delete(e)}onState(e){return this.states.add(e),()=>this.states.delete(e)}state(e,t){for(let n of this.states)n(e,t)}connect(){if(this.stopped||this.socket)return;let e=++this.generation;this.state(`connecting`),this.token().then(({token:t})=>{if(this.stopped||e!==this.generation)return;let n=new URL(`/api/terminal/ws`,this.origin());n.protocol=n.protocol===`https:`?`wss:`:`ws:`,n.searchParams.set(`token`,t);let r=this.socketFactory(n.href);this.socket=r,r.addEventListener(`open`,()=>{this.attempts=0,this.state(`connected`)}),r.addEventListener(`message`,e=>{try{let t=JSON.parse(String(e.data));for(let e of this.messages)e(t)}catch{r.close()}}),r.addEventListener(`close`,()=>{this.socket===r&&(this.socket=null,this.reconnect())}),r.addEventListener(`error`,()=>{r.close()})}).catch(t=>{e===this.generation&&this.reconnect(l(t))})}reconnect(e){this.state(`disconnected`,e),!this.stopped&&(clearTimeout(this.retry),this.retry=setTimeout(()=>this.connect(),Math.min(1e4,500*2**this.attempts++)+Math.random()*250))}send(e){return this.socket?.readyState===WebSocket.OPEN?this.socket.bufferedAmount>131072?(this.socket.close(),!1):(this.socket.send(JSON.stringify(e)),!0):!1}close(){this.stopped=!0,this.generation++,clearTimeout(this.retry),this.socket?.close(),this.socket=null,this.messages.clear(),this.states.clear()}},S=900,C=520,w=24,T=80,{between:E}=_;function D(e){return{width:e.width,height:Math.max(0,e.height-50)}}function O(e,t){let n=D(e);return{width:Math.min(t.width,n.width),height:Math.min(t.height,n.height)}}function k(e,t){let n=e??{width:E(t.width-w,240,S),height:E(t.height-T,180,C)},r=D(t);return{width:Math.min(n.width,r.width),height:Math.min(n.height,r.height)}}function A(e,t,n){return{x:E(e.x,0,Math.max(0,n.width-t.width)),y:E(e.y,50,Math.max(50,n.height-t.height))}}function j(e,t,n,r,i={width:240,height:180}){let a=O(r,i),o=e.x,s=e.y,c=e.x+e.width,l=e.y+e.height;return t.includes(`w`)&&(o=E(o+n.x,0,c-a.width)),t.includes(`e`)&&(c=E(c+n.x,o+a.width,r.width)),t.includes(`n`)&&(s=E(s+n.y,50,l-a.height)),t.includes(`s`)&&(l=E(l+n.y,s+a.height,r.height)),{x:o,y:s,width:c-o,height:l-s}}function M(e,t){if(e.mode===`maximized`)return{x:0,y:0,...t};if(e.mode===`left`||e.mode===`right`)return{x:e.mode===`right`?t.width/2:0,y:0,width:t.width/2,height:t.height};let n=k(e.windowSize,t);return{...A(e.position,n,t),...n}}function N(e){let t=e.trim().replace(/\s*[$#%>]\s*$/,``),n=t.match(/^[^\s/]+@[^:]+:\s*(.+)$/)?.[1]??t;return n.replace(/\/+$/,``).split(`/`).at(-1)||n}var P=`githuman:terminal-window`;function F(e){if(!c(e))return null;let{x:t,y:n}=e;return u(t)&&u(n)?{x:t,y:n}:null}function I(e){if(!c(e))return null;let{width:t,height:n}=e;return u(t)&&u(n)&&t>=240&&n>=180?{width:t,height:n}:null}var L=i(`terminal`,()=>{let i=h(),a=Object.hasOwn(i.windows,m),o=i.ensure(m),s=t(!1),l=t([]),u=t(null),d=r({get:()=>o.minimized,set:e=>{o.minimized=e}}),f=r({get:()=>o.open,set:e=>{o.open=e}}),_=t(`disconnected`),v=t(null),y=t(!1),b=r({get:()=>o.position,set:e=>{o.position=e}}),S=t(!1),C=r({get:()=>o.windowSize,set:e=>{o.windowSize=e}}),w=r({get:()=>o.maximized,set:e=>{o.maximized=e}}),T=null,E=null,D=0,O=!1,k=new Set,A=new Map,j=new Set;function M(){i.remember(),g.set(P,JSON.stringify({activeId:u.value,originalColors:S.value}))}function N(e,t){if(!e){i.close(m);return}if(!T){s.value=!0;try{let e=JSON.parse(g.get(P)??`null`);c(e)&&(a||(b.value=F(e.position)??b.value,C.value=I(e.windowSize)??C.value),!a&&typeof e.minimized==`boolean`&&(d.value=e.minimized),typeof e.originalColors==`boolean`&&(S.value=e.originalColors),typeof e.activeId==`string`&&(u.value=e.activeId))}catch{}T=t??new x,T.onState((e,t)=>{_.value=e,v.value=t?{text:t}:null,e!==`connected`&&(k.clear(),j.clear(),y.value=!1,E=null)}),T.onMessage(B),T.connect()}}function L(e){let t=T?.send(e)??!1;return t||(v.value={key:`unavailable`}),t}function R(e){let t=u.value;l.value=e;let n=new Set(e.map(e=>e.id));for(let e of k)n.has(e)||k.delete(e);(!u.value||!n.has(u.value))&&(u.value=e[0]?.id??null);let r=()=>{e.length?(f.value=!0,i.order.includes(`terminal`)||i.order.unshift(m)):i.close(m)};O?r():p(m,r),O=!0;for(let t of e)k.has(t.id)||(k.add(t.id),L({type:`subscribe`,terminalId:t.id}));u.value!==t&&M()}function z(e){let t=A.get(e.terminalId);e.type===`snapshot`?(j.delete(e.terminalId),t?.(e),H(e.terminalId,e.sequence)):t&&!j.has(e.terminalId)?t(e):H(e.terminalId,e.sequence)}function B(e){switch(e.type){case`list`:R(e.sessions);break;case`created`:if(e.requestId!==E)break;u.value=e.terminalId,y.value=!1,E=null,f.value=!0,d.value=!1,i.focus(m),M();break;case`error`:v.value={text:e.message},e.requestId===E&&(y.value=!1,E=null,l.value.length||i.close(m));break;case`title`:{let t=l.value.find(t=>t.id===e.terminalId);t&&(t.title=e.title);break}case`snapshot`:case`output`:z(e);break;case`exit`:l.value.length===1&&l.value[0]?.id===e.terminalId&&i.close(m),l.value=l.value.filter(t=>t.id!==e.terminalId),k.delete(e.terminalId),A.delete(e.terminalId),j.delete(e.terminalId)}}function V(e,t){return A.set(e,t),j.add(e),_.value===`connected`&&L({type:`snapshot`,terminalId:e}),()=>{A.get(e)===t&&A.delete(e),j.delete(e)}}function H(e,t){L({type:`ack`,terminalId:e,sequence:t})}function U(){y.value||_.value!==`connected`||l.value.length>=8||(i.focus(m),y.value=!0,E=`create-${++D}`,L({type:`create`,requestId:E,cols:100,rows:28})||(y.value=!1,E=null))}function W(){s.value&&(f.value=!0,d.value=!1,i.focus(m),l.value.length||U(),M())}function G(){i.minimize(m)}function K(e){u.value=e,M()}function q(e){L({type:`close`,terminalId:e,requestId:`close-${++D}`})}return e(S,M),n(()=>{T?.close(),A.clear()}),{enabled:s,sessions:l,activeId:u,minimized:d,open:f,state:_,error:v,creating:y,position:b,originalColors:S,windowSize:C,maximized:w,init:N,send:L,show:W,minimize:G,activate:K,close:q,create:U,attachView:V,acknowledge:H,remember:M}}),R=i(`appInfo`,()=>{let e=t(null),n=t(!1),r=t(null);async function i(){n.value=!0,r.value=null;try{let t=await a(`/api/app-info`);e.value=t.version,L().init(t.terminal?.available)}catch(t){e.value=null,r.value=l(t)}finally{n.value=!1}}return{version:e,loading:n,error:r,fetchInfo:i}}),z=i(`devices`,()=>{let e=t([]),n=t([]),i=t(null),c=null,u=r(()=>e.value.filter(e=>e.state===`pending`)),p=r(()=>e.value.filter(e=>e.state===`trusted`)),m=f(async()=>{try{e.value=await a(`/api/devices`),i.value=null}catch(e){i.value=l(e)}});function h(){c||(c=v([`devices:changed`],()=>void m()),m())}async function g(){n.value=await a(`/api/devices/lan-addresses`)}async function _(e,t){try{await o(`/api/devices/${encodeURIComponent(e.id)}/approve`,{code:t})}finally{await m()}}async function y(e){try{await s(`/api/devices/${encodeURIComponent(e)}`)}finally{await m()}}async function b(e,t){try{await d(`/api/devices/${encodeURIComponent(e)}`,{name:t})}finally{await m()}}return{devices:e,lanAddresses:n,error:i,pending:u,trusted:p,refresh:m,start:h,loadLanAddresses:g,approve:_,revoke:y,rename:b}});export{A as a,b as c,N as i,y as l,R as n,j as o,L as r,M as s,z as t};
@@ -1 +0,0 @@
1
- import"./chunk-FOHPRMQF-CoA4358r.js";import{O as e}from"./mermaid-parser.core-CWHLi3M4.js";export{e as createEventModelingServices};
@@ -1 +0,0 @@
1
- import"./src-oBChb5qS.js";import"./chunk-O7XYJQB3-y25ZXdWk.js";import"./chunk-ZIGJFQKS-CbyA33sL.js";import"./chunk-742MDFTN-e_JaY6d5.js";import"./chunk-MBY4JIJT-CiI_FkjG.js";import"./chunk-7PRAP22T-DDWxOzU1.js";import"./chunk-7INBJB4K-CQjEZWay.js";import"./chunk-5DYCD2WN-DdK6RzN0.js";import"./chunk-Z7XXMR3K-B3dBNvo3.js";import"./chunk-GWA4HPMP-CboS0KEV.js";import"./chunk-XXDRQBXY-BvKO0v-W.js";import"./chunk-WEXAMYUT-CQu7edQh.js";import"./chunk-UA2S7LBM-BRHq7OMm.js";import{n as e}from"./chunk-7M6MHVWA-Dhx8Ycf8.js";import"./mermaid.core-DbTjxMTH.js";export{e as diagram};
@@ -1 +0,0 @@
1
- import{k as e}from"./index-BQi8n0xV.js";import{t}from"./vue-i18n.runtime-BpRrzZrT.js";var n={"en-US":{notes:{externalAssets:{title:`Download external attachments`,empty:`Document contains no external attachments`,unknownSize:`Size unknown`,size:`{size} MB`,occurrences:`{count} occurrences`,limits:`Images: up to 10 MB. PDFs: up to 50 MB, or 100 MB with confirmation. Up to 200 MB per operation.`,selectAll:`Select all`,selectNone:`Deselect all`,download:`Download selected`,close:`Close`,stop:`Stop and keep completed downloads`,restore:`Restore external links`,result:`Replaced {count} links`,largeWarning:`This PDF exceeds 50 MB. Download it with a 100 MB limit?`,confirmLarge:`Download large PDF`,skip:`Skip`,previewFailed:`Preview is unavailable. It loads again when you scroll back.`,states:{pending:`Ready`,loading:`Downloading…`,confirmation:`Confirmation required`,stored:`Downloaded`,done:`Link replaced`,error:`Failed`,skipped:`Skipped`},errors:{"operation-limit":`The operation exceeds its 200 MB budget.`,"file-too-large":`The file exceeds its size limit.`}},delete:`Delete`,deleteFailed:`Could not delete the note`,moveFailed:`Could not move the note`,parentFolder:`Parent folder`,noteNameHint:`Create in {folder}. Enter a file name; .md is added automatically.`,folderNameHint:`Create in {folder}. Enter a folder name without a path.`,addToAgent:`Add to agent`,back:`Back`,forward:`Forward`,absentNote:`The file is missing. It may have been deleted or moved.`,deletedNote:`This note was deleted.`,backlinks:`Linked from`,previousNote:`This is the previous note`,newIdentity:`This is a new note`,repairLinks:`Retry link repairs`,later:`Later`,selectedHidden:`The selected note is hidden by the current filter.`,movedFile:`Moved file`,confirmDeletion:`Confirm deletion`,moreIssues:`More issues`,moveFolder:`Move to another folder`,destinationFolder:`Destination folder (empty for root)`,rename:`Rename`,cancelRename:`Cancel`,newName:`New name`,invalidName:`Enter a name without slashes or a leading dot.`,title:`Notes`,unsupported:`This note uses Markdown that is not supported by the visual editor. Edit the source to keep its content.`,tags:`Tags`,properties:`Properties`,addProperty:`Add property`,propertyName:`Property name`,propertyType:`Type`,removeProperty:`Remove property`,removePropertyValue:`Remove {value}`,editProperty:`Edit property`,propertyEmpty:`Empty`,propertySource:`Edit in Markdown source`,propertyTypes:{text:`Text`,list:`List`,number:`Number`,boolean:`Checkbox`,date:`Date`},filter:`Filter`,tagMode:`Match tags`,allTags:`All`,anyTag:`Any`,resetFilter:`Reset filter`,noTags:`No tags yet.`,done:`Done`,newNote:`New note`,newFolder:`New folder`,root:`Notes root`,folderEmpty:`This folder is empty. Create a note or folder to get started.`,search:`Find a note`,noMatches:`No matching notes`,empty:`No notes yet. Create a note to get started.`,choose:`Choose a note or create a new one.`,loading:`Loading…`,findLink:`Find a note to link`,insertLink:`Link to note`,view:`View`,visual:`Edit`,source:`Markdown source`,retry:`Retry`,loadDisk:`Load disk version`,saveCopy:`Save draft as a new note`,compare:`Compare versions`,draft:`Your draft`,disk:`On disk`,missing:`The disk version is unavailable.`,pathHint:`Path relative to notes, for example: plans/next.md`,discard:`Discard your draft and load the current file from disk?`,status:{saved:`Saved`,dirty:`Unsaved changes`,saving:`Saving…`,error:`Save failed`,conflict:`Conflict`}},windows:{fileLinkFailed:`Cannot open this link. Choose a Markdown file inside the current repository.`,panel:`Window panel`,newTerminalShortcut:`New terminal tab: Ctrl+Win+T`,layoutShortcuts:`Window layout: Ctrl+Win+← / → / ↑ / ↓`,minimizeAllShortcut:`Minimize all: Ctrl+Win+M`,movePanel:`Move window panel`,preview:`Preview`,minimize:`Minimize window`,closeAll:`Close all previews`,closeTab:`Close preview`,closeAllTitle:`Close all previews?`,closeAllMessage:`Are you sure you want to close all preview tabs?`,closeTitle:`Close this preview?`,closeMessage:`Are you sure you want to close this preview tab?`,cancel:`Cancel`,empty:`Open a Markdown file, image or PDF.`,openFile:`Open file`,dropFiles:`Drop Markdown, images or PDF files here`,unsupportedFile:`Unsupported file: {name}. Choose Markdown, an image or PDF.`,imageFailed:`Could not display this image. Choose a browser-supported image format.`,pdfPrevious:`Previous page`,pdfNext:`Next page`,pdfPage:`Page {page}`,retry:`Retry`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,diagram:`diagram`,missing:{file:`The file was deleted or moved.`,message:`The original message is no longer available.`,attachment:`The attachment is no longer available.`,diagram:`The diagram is no longer available.`,binary:`This file cannot be previewed.`}},terminal:{maximize:`Maximize`,restore:`Restore window`,menu:`Terminal menu`,closeAll:`Close all terminals`,closeAllTitle:`Close all terminals?`,closeAllMessage:`All terminal sessions and their running processes will be stopped.`,title:`Terminal`,command:`Command (limited mode)`,send:`Send command`,closeTab:`Close terminal`,add:`New terminal`,closeTitle:`Close this terminal?`,closeMessage:`The shell and its running commands will be stopped.`,cancel:`Cancel`,minimize:`Minimize terminal`,originalColors:`Use original colors (disable minimum contrast)`,unavailable:`Terminal connection is unavailable.`,reconnecting:`Reconnecting… Input is disabled until the connection returns.`,limited:`Limited mode: interactive programs are unavailable. Enter commands in the field below; Ctrl+C interrupts, Ctrl+D closes the shell.`},failed:`Action failed`,success:`Action was successful`,common:{copyPath:`Copy file path`},app:{title:`GitHuman`},nav:{agent:`Agent chat`,menu:`Toggle menu`,changes:`Changes`,reviews:`Reviews`},theme:{switchToLight:`Light theme`,switchToDark:`Dark theme`},access:{title:`Access from the local network`,noAccess:`This device has no access to GitHuman on this computer.`,nameLabel:`Device name (optional)`,request:`Request access`,pending:`Approve this device on the computer, in a GitHuman tab opened on localhost. Check that the code there is the same:`,expiresIn:`The request expires in {time}.`,ended:`The request was rejected or expired. Keep a GitHuman tab open on localhost on the computer, then request access again.`,unavailable:`The server is not available.`,retry:`Retry`,requestFailed:`Could not request access`,httpWarning:`The connection uses plain HTTP. Use it only in a network that you trust.`},devices:{menu:`Devices`,title:`Devices`,connect:`Connect a device`,connectHint:`Open this address on the device, or scan the code. The server must listen on the network: githuman serve --host 0.0.0.0`,noAddresses:`This computer has no network address.`,address:`Network address`,trusted:`Trusted devices`,none:`No trusted devices.`,lastSeen:`Last activity {time}, {address}`,rename:`Rename`,renameTitle:`Rename device`,revoke:`Revoke access`,revokeTitle:`Revoke access?`,revokeMessage:`{name} loses access at once. Its open terminal and chats close.`,cancel:`Cancel`,save:`Save`,actionFailed:`Could not change the device`,request:{title:`A device requests access`,from:`{name} — {address}, opened as {host}`,code:`Code shown on the device`,expiresIn:`Expires in {time}`,expired:`The request has expired.`,warning:`A trusted device can use the terminal and the agents of this computer. The connection uses plain HTTP.`,approve:`Approve`,reject:`Reject`,failed:`Could not answer the request`,postponed:`The request from {name} waits for an answer.`,answer:`Answer`}},changes:{listMode:{tree:`Tree view`,folder:`Folder {path}`},staged:`Staged`,unstaged:`Unstaged`,filterPlaceholder:`Filter files...`,emptyFileList:`No changed files`,emptyDiffPanel:`No changes to display`,filesChanged:`{count} files changed`,additions:`additions`,deletions:`deletions`,added:`added`,modified:`modified`,deletedPlural:`deleted`,renamed:`renamed`,expandAll:`Expand all`,expandAllHint:`Double-click to expand all files. Keyboard: Enter or Space.`,collapseAllHint:`Double-click to collapse all files. Keyboard: Enter or Space.`,collapseAll:`Collapse all`,binaryFile:`Binary file not shown`,fullFileDeleted:`The file no longer exists on disk`,fullFileLoadError:`Could not read the file from disk`,noTextChanges:`No text changes`,hunksLoading:`Loading the changes of this file`,hunksLoadError:`Could not load the changes of this file`,showFullFile:`Show full file`,fileActions:`File actions`,previewMarkdown:`Preview markdown`,closePreview:`Close preview`,previewBinary:`This file cannot be previewed.`,wrapLines:`Wrap long lines`,loadError:`Could not load changes`,retry:`Retry`,fileStatus:{added:`Added`,modified:`Modified`,deleted:`Deleted`,renamed:`Renamed`},actions:{stage:`Stage file`,unstage:`Unstage file`,discard:`Discard changes`,stageUnresolvedTitle:`Unresolved comments`,stageUnresolvedMessage:`{path} has {count} unresolved comment(s) in the active review. Stage it anyway?`,stageUnresolvedOk:`Stage anyway`,discardConfirmTitle:`Discard changes?`,discardConfirmMessage:`This will permanently discard changes to "{path}". This cannot be undone.`,discardConfirmOk:`Discard`,discardConfirmCancel:`Cancel`,stageError:`Failed to stage file`,unstageError:`Failed to unstage file`,discardError:`Failed to discard changes`}},browse:{toggle:`Browse full codebase`,allFiles:`All files`,searchPlaceholder:`Search files...`,noFiles:`No files to display`,treeLoadError:`Could not load the file tree`,noMatchingFiles:`No matching files`,selectFile:`Select a file to view its contents`},reviews:{startReview:`New review`,status:{in_progress:`In progress`,approved:`Approved`,changes_requested:`Changes requested`},confirmStatusChange:{title:`Change review status?`,message:`Do you really want to change the review status to "{status}"?`,ok:`Change`,cancel:`Cancel`},list:{unnamed:`Unnamed review`,unknownBranch:`Unknown branch`,empty:`No reviews yet on this branch.`,emptyAction:`Go to Changes to start one`},filters:{searchPlaceholder:`Search by name...`,from:`From`,to:`To`,files:`Files`,filesHint:`Type a file path and press Enter`},create:{title:`New review`,nameLabel:`Name (optional)`,nameHint:`Auto-generated from the source and current time if left blank`,submit:`Create`},detail:{notFound:`Review not found`,noComments:`No commented files in this review yet`,download:`Download review`,downloadError:`Failed to download review`},comments:{count:`{count} comments`,line:`Line {line}`,lineRange:`Lines {start}-{end}`,placeholder:`Leave a comment...`,submit:`Comment`,save:`Save`,cancel:`Cancel`,edit:`Edit`,delete:`Delete`,deleteConfirmTitle:`Delete comment?`,deleteConfirmMessage:`This will permanently delete this comment. This cannot be undone.`,deleteConfirmOk:`Delete`,deleteConfirmCancel:`Cancel`,resolve:`Resolve`,unresolve:`Unresolve`,resolved:`Resolved`,error:`Failed to save comment`}},agent:{title:`Agent`,unavailable:`not installed`,placeholder:`Message the agent… (Enter to send, {'@'} for files and folders)`,send:`Send`,cancel:`Stop`,thinking:`Thinking`,continue:`Continue`,status:{starting:`starting`,ready:`ready`,busy:`working`,closed:`closed`},autoApprovesEdits:`This agent edits files without asking for confirmation.`,reviewStale:`Files changed after the review was attached — line numbers in its comments may no longer match.`,sessionClosed:`This chat has ended. Close its tab and start a new chat to continue.`,startFailed:`Could not start the chat`,sendFailed:`Could not send the message`,resize:`Resize the agent panel`,modeHint:`Shift+Tab switches the mode`,diagram:{title:`Mermaid diagram`,close:`Close`,failed:`Could not draw the diagram`},code:{copy:`Copy`,copied:`Copied`,copyFailed:`Could not copy to the clipboard`},config:{failed:`Could not change "{name}"`,noMatch:`No matches`,filter:`Filter`},attach:{menu:`Add`,uploadFile:`Upload file`,mentionFile:`Mention a file or folder`,download:`Download`,downloadTitle:`Download this file?`,downloadMessage:`"{name}" will be saved to your computer.`,tooLarge:`"{name}" is larger than {mb} MB`,readFailed:`Could not read the file`},voice:{hold:`Hold to talk`,privacy:`The browser's speech service processes the audio.`,screenReader:`Hold Space or Enter to talk. In screen reader browse mode, activate once to start and once to stop.`,listening:`Listening`,finishing:`Finishing voice input`,shortcut:`Hold Win+Alt+Space for voice input`,inserted:`Inserted: {text}`,busy:`Voice input is busy. Try again in a moment.`,language:`Voice input language: {name}`,error:{"not-allowed":`Microphone access is blocked. Allow it in the browser and hold the button again.`,"service-not-allowed":`The browser does not allow speech recognition here.`,"audio-capture":`No microphone was found.`,network:`The browser's speech service is not available.`,"language-not-supported":`The speech service does not support this language.`,other:`Voice input failed.`}},mention:{list:`Files and folders`,noFiles:`No matching files or folders`,remove:`Remove {name}`},permission:{title:`Permission requested`,cancel:`Cancel`,showChanges:`Show changes`},autoApprove:{tooltipOff:`Approve the agent’s requests automatically`,tooltipOn:`Approving automatically — click to ask again`,confirmTitle:`Stop asking for confirmation?`,confirmMessage:`The agent will edit files and run commands in this repository without waiting for your answer. Instructions hidden in the code or diff it reads can steer it. Only do this for work you are ready to review and revert.`,confirmOk:`Approve automatically`,banner:`This chat approves every request without asking.`,turnOff:`Ask again`,approved:`Approved automatically: {title}`,failed:`Could not change the confirmation setting`},emptyState:{title:`Add a new chat with an agent`,hint:`Attach a diff, a file or a review and ask the agent to act on it.`,add:`Add chat`},newChat:{title:`New chat`,name:`Chat name`,agent:`Agent`,context:`Will be attached to the first message`,create:`Create`,cancel:`Cancel`},chats:{title:`Chats`,add:`New chat`,empty:`No chats yet`,limitReached:`At most {max} chats can be open at once. Close one to add another.`,close:`Close chat`,closeTitle:`Close this chat?`,closeMessage:`"{name}" will be closed and its agent stopped. The conversation cannot be restored.`,closeBusy:`"{name}" is still working. Closing it stops the agent and discards the answer in progress.`,keep:`Keep open`,closeFailed:`Could not close the chat`,needsAnswer:`waiting for your answer`},context:{add:`Add to agent chat`,file:`File: {path}`,directory:`Folder: {path}/`,diff:`Diff: {source}`,diffFile:`Diff ({source}): {path}`,review:`Review with comments`,attachment:`File: {name}`,addFile:`Add file to chat`,addDiff:`Add diff to chat`,addReview:`Add review to chat`,remove:`Remove`},tool:{failed:`failed`,output:`Output`,diffTruncated:`The diff is cut here: the file is larger than the chat shows.`},source:{staged:`staged`,unstaged:`unstaged`}}}},r=e(({app:e})=>{let r=t({locale:`en-US`,legacy:!1,messages:n});e.use(r)});export{r as default};