@inkeep/open-knowledge 0.33.0-beta.0 → 0.33.0-beta.10

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 (511) hide show
  1. package/dist/{_baseFor-DgUmPvii.mjs → _baseFor-CMmZqlg4.mjs} +1 -1
  2. package/dist/alias-JE7RI5QX-DUBvIpa7.mjs +1 -0
  3. package/dist/{arc-DeCRbT14.mjs → arc-CQLjZPEs.mjs} +2 -2
  4. package/dist/architecture-YZFGNWBL-BGsYftSC.mjs +1 -0
  5. package/dist/{architectureDiagram-Q4EWVU46-Ddeiwqm4.mjs → architectureDiagram-Q4EWVU46-DGG0IyfP.mjs} +2 -2
  6. package/dist/{array-CB05KhfS.mjs → array-BNmwzyCf.mjs} +1 -1
  7. package/dist/assets/skills/discovery/SKILL.md +1 -1
  8. package/dist/assets/skills/project/SKILL.md +1 -1
  9. package/dist/awk2-BBAGSFUB-BSXvsYKE.mjs +1 -0
  10. package/dist/{banner-BeBA-IMp.mjs → banner-DsGpC-o3.mjs} +2 -2
  11. package/dist/base64-4YMZCVJ5-r5zsLj5P.mjs +1 -0
  12. package/dist/basename-AA2KJYZQ-DlSFPnLd.mjs +1 -0
  13. package/dist/bash-IJWYRKFO-CMwhRejZ.mjs +1 -0
  14. package/dist/{blockDiagram-DXYQGD6D-Cym5AJGx.mjs → blockDiagram-DXYQGD6D-DO_ZPiei.mjs} +2 -2
  15. package/dist/{build-CN003PPg.mjs → build-BGRQ9c88.mjs} +1 -1
  16. package/dist/build-C__Nqi6T.mjs +1 -0
  17. package/dist/{c4Diagram-AHTNJAMY-B7HMnVPk.mjs → c4Diagram-AHTNJAMY-CYnXxcYe.mjs} +2 -2
  18. package/dist/cat-RDUMLXKC-CBoLzbAA.mjs +1 -0
  19. package/dist/channel-Dz_kn09_.mjs +2 -0
  20. package/dist/chmod-SYMGL4JA-L3CtA8Q4.mjs +1 -0
  21. package/dist/{chokidar-C-Jds_Bg.mjs → chokidar-CrFRJt-7.mjs} +1 -1
  22. package/dist/{chunk-24IMIIXA-DaS5XS55.mjs → chunk-24IMIIXA-ByE3n7F5.mjs} +2 -2
  23. package/dist/{chunk-2KRD3SAO-Ci0JL9ng.mjs → chunk-2KRD3SAO-CC8_tMR3.mjs} +2 -2
  24. package/dist/{chunk-2TRDZQLB-Kqh0farN.mjs → chunk-2TRDZQLB-DJYfX1DB.mjs} +2 -2
  25. package/dist/{chunk-336JU56O-MOsDPDtl.mjs → chunk-336JU56O-D5mJPHrS.mjs} +2 -2
  26. package/dist/{chunk-3BS5SKQH-Chc9fv52.mjs → chunk-3BS5SKQH-C7siUFvi.mjs} +3 -3
  27. package/dist/{chunk-3H6UQG3A-B7zoJt1R.mjs → chunk-3H6UQG3A-jehz9Mov.mjs} +2 -2
  28. package/dist/{chunk-3THT3N7L-B1WzJUh4.mjs → chunk-3THT3N7L-DNeAafDi.mjs} +1 -1
  29. package/dist/{chunk-3ZUFRYJ4-DQB4hWDy.mjs → chunk-3ZUFRYJ4-5tUBEJiQ.mjs} +1 -1
  30. package/dist/chunk-426QAEUC-C79-xu4k.mjs +2 -0
  31. package/dist/{chunk-44UOCSGV-BZ6LfyW2.mjs → chunk-44UOCSGV-C07LY83n.mjs} +1 -1
  32. package/dist/{chunk-4BX2VUAB-BXGPfnwm.mjs → chunk-4BX2VUAB-CeLVr99T.mjs} +2 -2
  33. package/dist/{chunk-4GTNDTRF-CexF8C0H.mjs → chunk-4GTNDTRF-C79jHZPW.mjs} +2 -2
  34. package/dist/{chunk-4HHKTUW3-CewYv3NE.mjs → chunk-4HHKTUW3-C9w0lckj.mjs} +1 -1
  35. package/dist/{chunk-4Q4SM6WR-D6TVzfh2.mjs → chunk-4Q4SM6WR-BBf5_ewP.mjs} +2 -2
  36. package/dist/{chunk-4TB4RGXK-B0uHEnHn.mjs → chunk-4TB4RGXK-n_iVg8hq.mjs} +2 -2
  37. package/dist/{chunk-55IACEB6-CWM_Woee.mjs → chunk-55IACEB6-DnxgLkXS.mjs} +2 -2
  38. package/dist/{chunk-55VFSPNA-BoFmUszu.mjs → chunk-55VFSPNA-BI1ZlfMG.mjs} +2 -2
  39. package/dist/{chunk-5FUZZQ4R-BSIWed9s.mjs → chunk-5FUZZQ4R-D0CI_lA3.mjs} +2 -2
  40. package/dist/{chunk-5PVQY5BW-_JlgOiAb.mjs → chunk-5PVQY5BW-CM3DDgan.mjs} +2 -2
  41. package/dist/{chunk-5QMZ5MUS-BwpNU33k.mjs → chunk-5QMZ5MUS-DvwGjmAW.mjs} +2 -2
  42. package/dist/{chunk-5QVNJEHU-DJjin--s.mjs → chunk-5QVNJEHU-BwcO0gX-.mjs} +2 -2
  43. package/dist/{chunk-5V6VZH6T-BEpcJpsv.mjs → chunk-5V6VZH6T-CsG6wUhk.mjs} +2 -2
  44. package/dist/{chunk-62RKD26F-uqVDf3rA.mjs → chunk-62RKD26F-CgKazjAi.mjs} +2 -2
  45. package/dist/{chunk-64BAICW3-BlKhhT3-.mjs → chunk-64BAICW3-DZxI2NVA.mjs} +2 -2
  46. package/dist/{chunk-67CJDMHE-CADkctrU.mjs → chunk-67CJDMHE-CrUJnyQp.mjs} +2 -2
  47. package/dist/{chunk-6Z5SFZXK-DuXsHt84.mjs → chunk-6Z5SFZXK-CqxoPFbR.mjs} +2 -2
  48. package/dist/{chunk-74CEPOFO-CciWp7CZ.mjs → chunk-74CEPOFO-smMq6g2B.mjs} +1 -1
  49. package/dist/{chunk-7L36YK2X-Cok_Mfzv.mjs → chunk-7L36YK2X-BEYeMppm.mjs} +1 -1
  50. package/dist/{chunk-7N4EOEYR-D0VnhW8C.mjs → chunk-7N4EOEYR-qv4-7fqt.mjs} +2 -2
  51. package/dist/{chunk-7TSDKFEO-9ACIOuIO.mjs → chunk-7TSDKFEO-B7rhvhjt.mjs} +1 -1
  52. package/dist/{chunk-A4HU7SVR-DPxgapmK.mjs → chunk-A4HU7SVR-BReRiEUm.mjs} +1 -1
  53. package/dist/{chunk-A4JSPFCI-B_-pySix.mjs → chunk-A4JSPFCI-CzC3HvcT.mjs} +2 -2
  54. package/dist/{chunk-A5O5YHGN-DApqA6Ow.mjs → chunk-A5O5YHGN-0FmmnDn4.mjs} +2 -2
  55. package/dist/{chunk-A65PWWJC-DRkFYIUZ.mjs → chunk-A65PWWJC-DDcfQP9l.mjs} +2 -2
  56. package/dist/{chunk-A7A2DBEE-DGJklf-9.mjs → chunk-A7A2DBEE-DxoLZwYW.mjs} +1 -1
  57. package/dist/{chunk-A7ICOL4V-BSbI3udS.mjs → chunk-A7ICOL4V-DLpBcLKS.mjs} +2 -2
  58. package/dist/{chunk-AA7GKIK3-DiBKA6eA.mjs → chunk-AA7GKIK3-hv3Reau6.mjs} +2 -2
  59. package/dist/{chunk-ALLTKNUZ-B1s5GUUO.mjs → chunk-ALLTKNUZ-8gj-zLqF.mjs} +2 -2
  60. package/dist/{chunk-APT7OOP2-CgGkczFr.mjs → chunk-APT7OOP2-Ba0TjHQy.mjs} +2 -2
  61. package/dist/{chunk-B74TABJS-CM6MrFZT.mjs → chunk-B74TABJS-D6QwMpPz.mjs} +1 -1
  62. package/dist/{chunk-BGSUD5R5-B-rczZvK.mjs → chunk-BGSUD5R5-BfmoQDUK.mjs} +2 -2
  63. package/dist/{chunk-BSJP7CBP-BWUAQGWN.mjs → chunk-BSJP7CBP-C-rdyWiE.mjs} +2 -2
  64. package/dist/{chunk-CIAEETIT-4Fu0r4oG.mjs → chunk-CIAEETIT-B4zNm8L4.mjs} +2 -2
  65. package/dist/{chunk-CWQS3NFK-BkE4vqrf.mjs → chunk-CWQS3NFK-BvSpDizp.mjs} +1 -1
  66. package/dist/{chunk-D4J545R4-DfBhjppa.mjs → chunk-D4J545R4-B2EJq2_m.mjs} +2 -2
  67. package/dist/{chunk-D6CWQ5DW-BEkstiuo.mjs → chunk-D6CWQ5DW-DTkNWXQB.mjs} +2 -2
  68. package/dist/{chunk-D7MEQ3VN-CAw29uK1.mjs → chunk-D7MEQ3VN-Cgm5u94B.mjs} +2 -2
  69. package/dist/{chunk-DBKNVD4L-DMfzef_7.mjs → chunk-DBKNVD4L-UVpSZ5HO.mjs} +2 -2
  70. package/dist/{chunk-DCAAORBQ-3VCdH2yi.mjs → chunk-DCAAORBQ-Dy6elY3j.mjs} +2 -2
  71. package/dist/{chunk-DXB73IDG-F_tmy-Lz.mjs → chunk-DXB73IDG-ByieFnhr.mjs} +1 -1
  72. package/dist/{chunk-EDXVE4YY-COyPi8-X.mjs → chunk-EDXVE4YY-B7-wXBzK.mjs} +2 -2
  73. package/dist/{chunk-EEXR5ZDP-VxEPFle_.mjs → chunk-EEXR5ZDP-Bot_s1lf.mjs} +1 -1
  74. package/dist/{chunk-EIZGF4BS-Dz3f1URh.mjs → chunk-EIZGF4BS-Cce76mbX.mjs} +2 -2
  75. package/dist/{chunk-ENJZ2VHE-DgpEksO3.mjs → chunk-ENJZ2VHE-DswEO8kN.mjs} +2 -2
  76. package/dist/{chunk-F23WWYKW-tJnOwArx.mjs → chunk-F23WWYKW-YV2Ziyrt.mjs} +2 -2
  77. package/dist/{chunk-FMBD7UC4-CFP8EClM.mjs → chunk-FMBD7UC4-DyW29ls9.mjs} +2 -2
  78. package/dist/{chunk-FOC6F5B3-BfuMxJA0.mjs → chunk-FOC6F5B3-Bc3GvhQ3.mjs} +2 -2
  79. package/dist/{chunk-GCTKCWKD-C5P_ff9C.mjs → chunk-GCTKCWKD-DBnk7jcA.mjs} +1 -1
  80. package/dist/{chunk-GFQRA5P5-DbAN9IDm.mjs → chunk-GFQRA5P5-DuNfOQls.mjs} +1 -1
  81. package/dist/{chunk-GOV5EKKI-CnqfYKLU.mjs → chunk-GOV5EKKI-BFLTyBpR.mjs} +2 -2
  82. package/dist/{chunk-GXVXFKBA-BZ5qwuS5.mjs → chunk-GXVXFKBA-C3l1H1PT.mjs} +2 -2
  83. package/dist/{chunk-HDQ56CKY-C2858kAN.mjs → chunk-HDQ56CKY-Cy6yVra7.mjs} +2 -2
  84. package/dist/{chunk-HJQJAYMS-BhX1qT1n.mjs → chunk-HJQJAYMS-yqfBcYOx.mjs} +1 -1
  85. package/dist/{chunk-HJWBQKYG-D9DjORFc.mjs → chunk-HJWBQKYG-C1cifXhx.mjs} +2 -2
  86. package/dist/{chunk-HKLCLINH-DiTtKPWB.mjs → chunk-HKLCLINH-Ch0mauLy.mjs} +3 -3
  87. package/dist/{chunk-HL6NGDO2-FvmjxcsK.mjs → chunk-HL6NGDO2-D41r2_6L.mjs} +2 -2
  88. package/dist/{chunk-HWKDQ44K-Cd9c0ujm.mjs → chunk-HWKDQ44K-CRAflooW.mjs} +2 -2
  89. package/dist/{chunk-I57KEIP3-BsA-zv3k.mjs → chunk-I57KEIP3-BW7G5kxf.mjs} +2 -2
  90. package/dist/{chunk-ICPOFSXX-C2hDlKD_.mjs → chunk-ICPOFSXX-BF2fcu67.mjs} +2 -2
  91. package/dist/{chunk-IPJHKYVM-CUKythEA.mjs → chunk-IPJHKYVM-DDc9WF57.mjs} +1 -1
  92. package/dist/{chunk-JVPRLUMK-D72YT6bi.mjs → chunk-JVPRLUMK-C9zEHB9M.mjs} +2 -2
  93. package/dist/{chunk-K5T4RW27-ChGdeubA.mjs → chunk-K5T4RW27-DLjwaibC.mjs} +2 -2
  94. package/dist/{chunk-K6LIBGJA-CtwqXONG.mjs → chunk-K6LIBGJA-CSZVB574.mjs} +2 -2
  95. package/dist/{chunk-KGLVRYIC-BYA7AJ2g.mjs → chunk-KGLVRYIC-BNQzuSOt.mjs} +2 -2
  96. package/dist/{chunk-KMEYNNUA-C311YB2Q.mjs → chunk-KMEYNNUA-maIN40sk.mjs} +2 -2
  97. package/dist/{chunk-KRBPSX3W-DsaeH-hY.mjs → chunk-KRBPSX3W-CzvY8ZXk.mjs} +2 -2
  98. package/dist/{chunk-KX3P26DQ-D2yWAYlk.mjs → chunk-KX3P26DQ-76goBn6H.mjs} +1 -1
  99. package/dist/{chunk-LIHQZDEY-Du6TmMJL.mjs → chunk-LIHQZDEY-C1QAwaiM.mjs} +2 -2
  100. package/dist/{chunk-LL3S3NLB-xjImIR4A.mjs → chunk-LL3S3NLB-DbugMv6o.mjs} +2 -2
  101. package/dist/{chunk-LTZRCH7N-DQ58So-F.mjs → chunk-LTZRCH7N-BKI5S2SB.mjs} +2 -2
  102. package/dist/{chunk-LWEGUNWT-B1OcC6RH.mjs → chunk-LWEGUNWT-GnqRCIV_.mjs} +2 -2
  103. package/dist/{chunk-MDDMCKUK-CP6l42wf.mjs → chunk-MDDMCKUK-b-Mvbq7g.mjs} +2 -2
  104. package/dist/{chunk-MDLLFABN-DDKgmYs5.mjs → chunk-MDLLFABN-CySM5qrq.mjs} +2 -2
  105. package/dist/{chunk-MHTUABJP-D8l1TTsc.mjs → chunk-MHTUABJP-t1OLW57X.mjs} +1 -1
  106. package/dist/{chunk-MIZPJHVH-BLEhGmNy.mjs → chunk-MIZPJHVH-D-ZDkLZF.mjs} +2 -2
  107. package/dist/{chunk-MLXIYONF-MXi1NN3K.mjs → chunk-MLXIYONF-2Q4Ybi7x.mjs} +2 -2
  108. package/dist/{chunk-MYE6AGBJ-BkwmDIR4.mjs → chunk-MYE6AGBJ-BejewWl1.mjs} +2 -2
  109. package/dist/{chunk-NAERJDUW-Bv2VeaZc.mjs → chunk-NAERJDUW-BeJI_Ack.mjs} +2 -2
  110. package/dist/{chunk-NCNPKYJZ-14dRI8Qm.mjs → chunk-NCNPKYJZ-BjePegaZ.mjs} +2 -2
  111. package/dist/{chunk-NUYSJFDK-BiYXRcxZ.mjs → chunk-NUYSJFDK-DDVtplw1.mjs} +2 -2
  112. package/dist/{chunk-OCLXQMOG-B_jLzNZV.mjs → chunk-OCLXQMOG-DZx1830_.mjs} +2 -2
  113. package/dist/{chunk-OCS6LSEM-D4VLThbM.mjs → chunk-OCS6LSEM-DGnWZEcL.mjs} +2 -2
  114. package/dist/{chunk-OJDRYQWQ-CmrD0Dg2.mjs → chunk-OJDRYQWQ-69O4zmKR.mjs} +1 -1
  115. package/dist/{chunk-ORNJ4GCN-CO4Fc0LT.mjs → chunk-ORNJ4GCN-R61lu8Cm.mjs} +2 -2
  116. package/dist/{chunk-OYMX7WX6-CjnWmW_n.mjs → chunk-OYMX7WX6-BShEu1pf.mjs} +2 -2
  117. package/dist/{chunk-PBXLG62G-aMLWXguv.mjs → chunk-PBXLG62G-DdXtiydY.mjs} +2 -2
  118. package/dist/{chunk-PP6PSHAB-B3XXGg2T.mjs → chunk-PP6PSHAB-B7OGLVba.mjs} +1 -1
  119. package/dist/{chunk-PXTK5WE2-CguJFePc.mjs → chunk-PXTK5WE2-BeCOtT1d.mjs} +2 -2
  120. package/dist/{chunk-PYSFUGCK-BszfAqRG.mjs → chunk-PYSFUGCK-CoGoOEDp.mjs} +2 -2
  121. package/dist/{chunk-QCDB2VPH-D3ULCm4b.mjs → chunk-QCDB2VPH-z4xw9VKe.mjs} +2 -2
  122. package/dist/{chunk-QJ7O6ZN3-Dzcm83Kv.mjs → chunk-QJ7O6ZN3-Dsx1L-CX.mjs} +2 -2
  123. package/dist/{chunk-QZHKN3VN-CczpYV_w.mjs → chunk-QZHKN3VN-4LgLml-S.mjs} +2 -2
  124. package/dist/{chunk-R6QSAL5T-nrEeDNrG.mjs → chunk-R6QSAL5T-CXXlslcl.mjs} +1 -1
  125. package/dist/{chunk-R6VWJ2ZL-BVeTwIsz.mjs → chunk-R6VWJ2ZL-FXX1AKea.mjs} +1 -1
  126. package/dist/{chunk-RPNGRAAP-CajOz2i0.mjs → chunk-RPNGRAAP-D-txoG-N.mjs} +2 -2
  127. package/dist/{chunk-SDNKECQQ-CA2LWAo7.mjs → chunk-SDNKECQQ-sntIQEvc.mjs} +2 -2
  128. package/dist/{chunk-SNN4IESC-D8LPcAwE.mjs → chunk-SNN4IESC-2iQ8MDN3.mjs} +2 -2
  129. package/dist/{chunk-T56QNPHK-CKzBdBMk.mjs → chunk-T56QNPHK-0UWUTTk9.mjs} +2 -2
  130. package/dist/{chunk-TLSUDHID-rdis5pZn.mjs → chunk-TLSUDHID-CbxrNaLS.mjs} +2 -2
  131. package/dist/{chunk-TOMNU26N-BxDnjGjc.mjs → chunk-TOMNU26N-aWRPfXR1.mjs} +2 -2
  132. package/dist/{chunk-TP4BZANS-ClzIzpWm.mjs → chunk-TP4BZANS-DFORxqE5.mjs} +2 -2
  133. package/dist/{chunk-TXBZCHCQ-DnSXwySk.mjs → chunk-TXBZCHCQ-COSdckz7.mjs} +2 -2
  134. package/dist/{chunk-U2HBQHQK-DMRf50i8.mjs → chunk-U2HBQHQK-B6QvDsYx.mjs} +2 -2
  135. package/dist/{chunk-V5MWI2OL-Cjq6zFOH.mjs → chunk-V5MWI2OL-CDs_rm9r.mjs} +2 -2
  136. package/dist/{chunk-V7TAPXDL-BaVJN6c-.mjs → chunk-V7TAPXDL-DbTOoM_I.mjs} +2 -2
  137. package/dist/{chunk-VJFXDYWH-BJjeOIUB.mjs → chunk-VJFXDYWH-oT0f9NSa.mjs} +2 -2
  138. package/dist/{chunk-VOBGTVA6-CLvo1DrK.mjs → chunk-VOBGTVA6-D6oyYm45.mjs} +2 -2
  139. package/dist/{chunk-VYOJP4TV-ySo4pvxO.mjs → chunk-VYOJP4TV-Dh2zBxKQ.mjs} +2 -2
  140. package/dist/{chunk-WKFATFPP-jr5eyHAR.mjs → chunk-WKFATFPP-CoNouDAR.mjs} +2 -2
  141. package/dist/{chunk-X2AJGDEF-Bpyh-CYM.mjs → chunk-X2AJGDEF-13z4tBy7.mjs} +1 -1
  142. package/dist/{chunk-X2U36JSP-B09HbTgU.mjs → chunk-X2U36JSP-BlsQfR26.mjs} +2 -2
  143. package/dist/{chunk-XKQRETAK-CG272cRl.mjs → chunk-XKQRETAK-EkIIjUUl.mjs} +2 -2
  144. package/dist/{chunk-XKWWSDBF-EI7W96Bb.mjs → chunk-XKWWSDBF-B1eAKd2w.mjs} +2 -2
  145. package/dist/{chunk-XPW4576I-B-qTm_Z3.mjs → chunk-XPW4576I-bLLZgym8.mjs} +2 -2
  146. package/dist/{chunk-XVDPCNWR-DDtsDoBd.mjs → chunk-XVDPCNWR-BAt7NxwA.mjs} +2 -2
  147. package/dist/{chunk-YMMW5UAP-jiH3wEeU.mjs → chunk-YMMW5UAP-Bm5rv4x6.mjs} +2 -2
  148. package/dist/{chunk-YTNYSM6T-D6z7D3pz.mjs → chunk-YTNYSM6T-igBSh3M-.mjs} +2 -2
  149. package/dist/{chunk-YULBWSET-sJ_UPhUx.mjs → chunk-YULBWSET-x9ev2Mf1.mjs} +2 -2
  150. package/dist/{chunk-YZCP3GAM-C2dMi590.mjs → chunk-YZCP3GAM-dFAdRCa8.mjs} +2 -2
  151. package/dist/{chunk-Z6LRHWXI-CFEq3s_2.mjs → chunk-Z6LRHWXI-CQxrFjqd.mjs} +2 -2
  152. package/dist/{chunk-Z7JVV2SM-XK1154v3.mjs → chunk-Z7JVV2SM-C7YBwi4Z.mjs} +2 -2
  153. package/dist/{chunk-ZZ45TVLE-DmKznbd-.mjs → chunk-ZZ45TVLE-2q1aFSGq.mjs} +2 -2
  154. package/dist/{chunk-ZZO3UDB3-Jw0Ocy-R.mjs → chunk-ZZO3UDB3-rEua5jnw.mjs} +2 -2
  155. package/dist/classDiagram-6PBFFD2Q-CcylKUUy.mjs +2 -0
  156. package/dist/classDiagram-v2-HSJHXN6E-BuitxA8E.mjs +2 -0
  157. package/dist/clear-5CZ5X4YR-B1WFGbrj.mjs +1 -0
  158. package/dist/cli.mjs +51 -51
  159. package/dist/clone-FnWO_tLO.mjs +2 -0
  160. package/dist/colors-Ct4sdRvQ.mjs +1 -0
  161. package/dist/{colors-DugpbXz6.mjs → colors-DWZN3WbY.mjs} +1 -1
  162. package/dist/column-WLPMMSTS-DkwMR9G7.mjs +1 -0
  163. package/dist/comm-5SLSESQG-CXlq0ETw.mjs +1 -0
  164. package/dist/config-schema.json +3 -3
  165. package/dist/config.project-local.schema.json +3 -3
  166. package/dist/constants-p-XvThBy.mjs +2 -0
  167. package/dist/{cose-bilkent-S5V4N54A-BNALZCF0.mjs → cose-bilkent-S5V4N54A-x0sjol1e.mjs} +2 -2
  168. package/dist/cp-XOYR4ABJ-DSmenFoy.mjs +1 -0
  169. package/dist/{curl-47BFPSFW-DU0Jc2rS.mjs → curl-47BFPSFW-CLzIjKiW.mjs} +2 -2
  170. package/dist/cut-OPC3VAGB-Bem4Z9r_.mjs +1 -0
  171. package/dist/{cytoscape.esm-5XrS6n0F.mjs → cytoscape.esm-D1nqsWCf.mjs} +1 -1
  172. package/dist/{dagre-C04vaGU3.mjs → dagre-BTsqj5N3.mjs} +2 -2
  173. package/dist/{dagre-KV5264BT-Cbu_HfO4.mjs → dagre-KV5264BT-qU8auIl8.mjs} +2 -2
  174. package/dist/date-DD7FVA2V-BIqG8vnM.mjs +1 -0
  175. package/dist/{defaultLocale-0qNBj5q-.mjs → defaultLocale-DMqLGTir.mjs} +1 -1
  176. package/dist/{diagram-5BDNPKRD--yFFNenY.mjs → diagram-5BDNPKRD-BfaCThqw.mjs} +2 -2
  177. package/dist/{diagram-G4DWMVQ6-DEe2UaOJ.mjs → diagram-G4DWMVQ6-GD__kOTo.mjs} +2 -2
  178. package/dist/{diagram-MMDJMWI5-BEgEPDUN.mjs → diagram-MMDJMWI5-eK_WgeFb.mjs} +2 -2
  179. package/dist/{diagram-TYMM5635-WdKiO0-q.mjs → diagram-TYMM5635-Cw9FE8Ou.mjs} +2 -2
  180. package/dist/diff-HJF2MPDN-QbElik15.mjs +1 -0
  181. package/dist/dirname-LEMTZZFS-DjJGD8wW.mjs +1 -0
  182. package/dist/{dist-Co98vmuK.mjs → dist-B9rR197c.mjs} +1 -1
  183. package/dist/{server-lock-iLcBw_q0-DrtDFuEH.mjs → dist-BB07_fNU.mjs} +117 -117
  184. package/dist/{dist-Bd-iJOOK.mjs → dist-C_-7dTgR.mjs} +46 -41
  185. package/dist/dist-DH3x1SI7.mjs +1 -0
  186. package/dist/{dist-bundle-tsI-uq-K.mjs → dist-bundle-CfcllBeA.mjs} +1 -1
  187. package/dist/dist-bundle-Dnt-gLG8.mjs +1 -0
  188. package/dist/du-WO2ENHXQ-gLn1L6An.mjs +1 -0
  189. package/dist/echo-O45JWWI2-CHeEVRD-.mjs +1 -0
  190. package/dist/env-5EPCWSXR-nB7iGA4U.mjs +1 -0
  191. package/dist/{erDiagram-SMLLAGMA-BD_bZ9y8.mjs → erDiagram-SMLLAGMA-BQ28NjyR.mjs} +2 -2
  192. package/dist/{esm-BNIW0EH8.mjs → esm-PWRRAk-U.mjs} +1 -1
  193. package/dist/{execAsync-BAuTynbH.mjs → execAsync-Clg2-3AB.mjs} +1 -1
  194. package/dist/{execAsync-CBkkI2Ek.mjs → execAsync-DCzaEYgw.mjs} +1 -1
  195. package/dist/{execAsync-DVDfm08O.mjs → execAsync-Dyv9tAFE.mjs} +1 -1
  196. package/dist/expand-DTNXU4LQ--1KdtI8I.mjs +1 -0
  197. package/dist/expansion-VBDYWVZR-Br5lbiFS.mjs +1 -0
  198. package/dist/expr-YYCVMXE3-D_Mgl3lg.mjs +1 -0
  199. package/dist/file-IGDTDPLG-DJz2lDmW.mjs +1 -0
  200. package/dist/find-DH2ALKQS-BCfNRHeq.mjs +1 -0
  201. package/dist/flag-coverage-6JEX67RU-dAJxSkKl.mjs +2 -0
  202. package/dist/{flatten-DsfHsK9p.mjs → flatten-CMuDMFOE.mjs} +2 -2
  203. package/dist/{flowDiagram-DWJPFMVM-DZgEsdRZ.mjs → flowDiagram-DWJPFMVM-BRXMLmIm.mjs} +2 -2
  204. package/dist/fold-LDSORVYE-X07YByBI.mjs +1 -0
  205. package/dist/{ganttDiagram-T4ZO3ILL-Csm0cHYU.mjs → ganttDiagram-T4ZO3ILL-BkishNK-.mjs} +2 -2
  206. package/dist/{getMachineId-bsd-Bd_aCdAJ.mjs → getMachineId-bsd-BfKl40ww.mjs} +2 -2
  207. package/dist/{getMachineId-bsd-CmfyCGp_.mjs → getMachineId-bsd-CfcvKJtS.mjs} +2 -2
  208. package/dist/{getMachineId-bsd-D_lpr65O.mjs → getMachineId-bsd-DHr_3v7C.mjs} +2 -2
  209. package/dist/{getMachineId-darwin-CFeqXDM9.mjs → getMachineId-darwin-BGSat_hq.mjs} +2 -2
  210. package/dist/{getMachineId-darwin-Ch6Y3434.mjs → getMachineId-darwin-ClWJDgsl.mjs} +2 -2
  211. package/dist/{getMachineId-darwin-DRbP6ZXo.mjs → getMachineId-darwin-kUGmbM-E.mjs} +2 -2
  212. package/dist/{getMachineId-linux-CsnocidZ.mjs → getMachineId-linux-Cb6TG9LG.mjs} +1 -1
  213. package/dist/{getMachineId-linux-n9GZPwcR.mjs → getMachineId-linux-D_xXWtEw.mjs} +1 -1
  214. package/dist/{getMachineId-linux-CbD1lCp_.mjs → getMachineId-linux-vXwObLy3.mjs} +1 -1
  215. package/dist/{getMachineId-unsupported-Bsi0aVMm.mjs → getMachineId-unsupported-B4ElBmKF.mjs} +1 -1
  216. package/dist/{getMachineId-unsupported-D6zswC3_.mjs → getMachineId-unsupported-BALaAmcO.mjs} +1 -1
  217. package/dist/{getMachineId-unsupported-BQuHcTqF.mjs → getMachineId-unsupported-CechcDdc.mjs} +1 -1
  218. package/dist/{getMachineId-win-BsR1lQcH.mjs → getMachineId-win-CwyWxlQ-.mjs} +2 -2
  219. package/dist/{getMachineId-win-Bvo8aUso.mjs → getMachineId-win-D-OyleV_.mjs} +2 -2
  220. package/dist/{getMachineId-win-BpALY-6t.mjs → getMachineId-win-Div5qJyL.mjs} +2 -2
  221. package/dist/gh-detect-C0TUrJxp.mjs +3 -0
  222. package/dist/git-handle-CetHWc5A-6X5OgagE.mjs +1 -0
  223. package/dist/git-handle-dKyep_oZ-vn8B9Tc8.mjs +10 -0
  224. package/dist/gitGraph-7Q5UKJZL-Cb6AI0gQ.mjs +1 -0
  225. package/dist/{gitGraphDiagram-UUTBAWPF-dC1IPshv.mjs → gitGraphDiagram-UUTBAWPF-LYEX-Up5.mjs} +2 -2
  226. package/dist/{graphlib-ZUByR7Z1.mjs → graphlib-C8GlDNIO.mjs} +2 -2
  227. package/dist/grep-2HUTXO5U-DF5bN210.mjs +1 -0
  228. package/dist/gzip-AQXSGOVS-Ld4whXAz.mjs +1 -0
  229. package/dist/head-HT2B6D2J-Y8QWoury.mjs +1 -0
  230. package/dist/help-VVWX7SA5-DNTZaSb5.mjs +1 -0
  231. package/dist/history-J4QRNGRO-D8QHmWq3.mjs +1 -0
  232. package/dist/hostname-BK6HG2DE-C229q8IA.mjs +1 -0
  233. package/dist/html-to-markdown-TFCECAGV-EEqkh5Fp.mjs +1 -0
  234. package/dist/index.d.mts +11 -3
  235. package/dist/index.mjs +1 -1
  236. package/dist/info-OMHHGYJF-DY6XVLHA.mjs +1 -0
  237. package/dist/{infoDiagram-42DDH7IO-HjNjWo06.mjs → infoDiagram-42DDH7IO-BVXbYOHQ.mjs} +2 -2
  238. package/dist/init-CNb23nGn.mjs +1 -0
  239. package/dist/init-CXlRbgEZ.mjs +639 -0
  240. package/dist/{init-BQKkPl4l.mjs → init-D9nHWIP2.mjs} +1 -1
  241. package/dist/{is-object-DAC-mmwo.mjs → is-object-DhiFit5j.mjs} +1 -1
  242. package/dist/{isEmpty-jdQphHPa.mjs → isEmpty-B_hy4b7A.mjs} +2 -2
  243. package/dist/{ishikawaDiagram-UXIWVN3A-BlrokJRv.mjs → ishikawaDiagram-UXIWVN3A-Diodefny.mjs} +2 -2
  244. package/dist/join-GG2LDHE5-DJ1L_Ka6.mjs +1 -0
  245. package/dist/{journeyDiagram-VCZTEJTY-Bt5CmS_f.mjs → journeyDiagram-VCZTEJTY-CMQp-Rx9.mjs} +2 -2
  246. package/dist/jq-LYZFFBZB-BItVI6BJ.mjs +1 -0
  247. package/dist/{js-exec-VXN6TZ7U-B_mKz_np.mjs → js-exec-VXN6TZ7U-Bnv5xh7r.mjs} +2 -2
  248. package/dist/{kanban-definition-6JOO6SKY-BH015AU8.mjs → kanban-definition-6JOO6SKY-DhbBoKko.mjs} +2 -2
  249. package/dist/{launch-json-removal-kq5Dt0Gk.mjs → launch-json-removal-6s0g2-Dm.mjs} +2 -2
  250. package/dist/{lib-BWyT_i83.mjs → lib-BFgxfC0m.mjs} +2 -2
  251. package/dist/{lib-BKCY8vrL.mjs → lib-DOas6HiH.mjs} +1 -1
  252. package/dist/{libesm-Ob3yvbRV.mjs → libesm-bRpdkHYn.mjs} +1 -1
  253. package/dist/{line-DiVg83mo.mjs → line-CNrllbcq.mjs} +2 -2
  254. package/dist/{linear-C06cViLu.mjs → linear-CUrVtEYu.mjs} +2 -2
  255. package/dist/ln-4TRFBYAT-1vbMtGss.mjs +1 -0
  256. package/dist/loader-DZ60wqGI.mjs +4 -0
  257. package/dist/loader-GV9JFQfo.mjs +1 -0
  258. package/dist/ls-KSXFZCWH-D7XChuCb.mjs +1 -0
  259. package/dist/{lzma-NI_6IIcm.mjs → lzma-kz900pzb.mjs} +1 -1
  260. package/dist/{mcp-migrate-event-BNoOQpLB.mjs → mcp-migrate-event-H4uBxZps.mjs} +1 -1
  261. package/dist/md5sum-INMIK4DX-DebFzK7Y.mjs +1 -0
  262. package/dist/{mermaid-parser.core-DqKkkvo5.mjs → mermaid-parser.core-C4HPipkF.mjs} +2 -2
  263. package/dist/{mermaid.core-BzIdCd91.mjs → mermaid.core-BjaX3aDk.mjs} +3 -3
  264. package/dist/{mindmap-definition-QFDTVHPH-BOkRtwWA.mjs → mindmap-definition-QFDTVHPH-aTvmjjWw.mjs} +2 -2
  265. package/dist/mkdir-TDEMSB6C-yKujfJwH.mjs +1 -0
  266. package/dist/mv-Z6MORUFL-DefDwgs3.mjs +1 -0
  267. package/dist/native/native-config.linux-x64-gnu.node +0 -0
  268. package/dist/nl-U5YJDM32-C4WnOB_Q.mjs +1 -0
  269. package/dist/od-VJEF2UR5-w1NlCkUs.mjs +1 -0
  270. package/dist/{open-browser-DZUdqNsP.mjs → open-browser-9FuRJjpP.mjs} +2 -2
  271. package/dist/{ordinal-BuFKVuSx.mjs → ordinal-CwNJ0kWp.mjs} +2 -2
  272. package/dist/packet-4T2RLAQJ-Bf6ng-Cf.mjs +1 -0
  273. package/dist/paste-7N6AFSDS-C1xZzPgC.mjs +1 -0
  274. package/dist/{path-Dmj-XcQ6.mjs → path-v4_sOSY9.mjs} +1 -1
  275. package/dist/pie-ZZUOXDRM-B2TN5yZH.mjs +1 -0
  276. package/dist/{pieDiagram-DEJITSTG-Bho_Qp6H.mjs → pieDiagram-DEJITSTG-Bwxzwykf.mjs} +2 -2
  277. package/dist/{preview-CGoJaoXU.mjs → preview-Ch5Z_ly3.mjs} +2 -2
  278. package/dist/preview-DZuLRNVg.mjs +1 -0
  279. package/dist/printf-CX64KX2P-mlOOn_9v.mjs +1 -0
  280. package/dist/public/assets/{ActivityModeContent-BhjZd4ih.js → ActivityModeContent-jsCTPiun.js} +1 -1
  281. package/dist/public/assets/CodeMirrorPropInput-cmSiPzan.js +3 -0
  282. package/dist/public/assets/DocumentContext-CNzSFsI-.js +36 -0
  283. package/dist/public/assets/{EnableSyncConfirmDialog-WW7JP--8.js → EnableSyncConfirmDialog-D_NbuJ59.js} +1 -1
  284. package/dist/public/assets/{GraphPanel-ykpjTMSi.js → GraphPanel-BrqHgLjs.js} +1 -1
  285. package/dist/public/assets/{ManagedArtifactProperties-B2BQrtZM.js → ManagedArtifactProperties-DqTT5fPT.js} +1 -1
  286. package/dist/public/assets/{McpConsentDialogBody-onnJGUtF.js → McpConsentDialogBody-BrfdQb16.js} +1 -1
  287. package/dist/public/assets/{MermaidDocEditor-BqGd0qfH.js → MermaidDocEditor-B_dNhePY.js} +1 -1
  288. package/dist/public/assets/{PropertyPanel-DttU8Udw.js → PropertyPanel-Dkz1gPoU.js} +1 -1
  289. package/dist/public/assets/ReportBugDialogBody-CCKV6nZY.js +2 -0
  290. package/dist/public/assets/SettingsDialogBody-BxTayjY8.js +7 -0
  291. package/dist/public/assets/ShareBranchSwitchDialog-BhekOXUp.js +1 -0
  292. package/dist/public/assets/{ShareReceiveDialog-DZDGHPPI.js → ShareReceiveDialog-o5dNBk6Q.js} +1 -1
  293. package/dist/public/assets/{ShareReceiveMissDialog-Xhuw-myx.js → ShareReceiveMissDialog-UODMw9si.js} +1 -1
  294. package/dist/public/assets/{SkillEditorActions-Bwdh1Cf-.js → SkillEditorActions-euGEb-E6.js} +1 -1
  295. package/dist/public/assets/{SourceEditor-BxbaznDP.js → SourceEditor-CORtf1FY.js} +1 -1
  296. package/dist/public/assets/{TerminalPanel-DQ0dcqkQ.js → TerminalPanel-g64JYtbc.js} +1 -1
  297. package/dist/public/assets/{agent-presence-CqgjG_1n.js → agent-presence-D3uA1hrz.js} +1 -1
  298. package/dist/public/assets/{auth-state-cache-ClzBZ7Ym.js → auth-state-cache-DCv4Whjc.js} +3 -3
  299. package/dist/public/assets/{config-provider-BAZc28q7.js → config-provider-DVy-GqC5.js} +1 -1
  300. package/dist/public/assets/{dist-6XgTb6IH.js → dist-DkRtDyLN.js} +39 -39
  301. package/dist/public/assets/{dist-Dol8Q1cO.js → dist-Dl_HewkW.js} +1 -1
  302. package/dist/public/assets/{doc-hash-BiliQUlA.js → doc-hash-BDRwCcvB.js} +1 -1
  303. package/dist/public/assets/{documents-events-u9inGgjg.js → documents-events-CJpJUM_N.js} +1 -1
  304. package/dist/public/assets/{file-tree-adapter-DqUi4Yv0.js → file-tree-adapter-_1h6_EGw.js} +1 -1
  305. package/dist/public/assets/index-Dyz0LlrR.css +1 -0
  306. package/dist/public/assets/{index-C3-m6mEi.js → index-FValh7LC.js} +102 -102
  307. package/dist/public/assets/{lint-config-client-D8iMCwfL.js → lint-config-client-CX_cssoL.js} +1 -1
  308. package/dist/public/assets/{navigation-targets-CKcxoAuN.js → navigation-targets-S-8o5DE_.js} +1 -1
  309. package/dist/public/assets/open-managed-artifact-tab-tiXawScj.js +5 -0
  310. package/dist/public/assets/{pending-receive-nav-store-jeeaEovU.js → pending-receive-nav-store-BUhyCKTL.js} +1 -1
  311. package/dist/public/assets/{prop-types-sQ-6_M35.js → prop-types-Cr0Uib4q.js} +1 -1
  312. package/dist/public/assets/{receive-store-BGw3Wb65.js → receive-store-DYDEnyEg.js} +1 -1
  313. package/dist/public/assets/{selection-context-W2zA2_u8.js → selection-context-BjmeTT0v.js} +1 -1
  314. package/dist/public/assets/skill-actions-32qU2dgG.js +1 -0
  315. package/dist/public/assets/{skills-api-B9bExOgu.js → skills-api-UJqRM51N.js} +1 -1
  316. package/dist/public/assets/{src-DcaAGY7P.js → src-CBkac3Ms.js} +1 -1
  317. package/dist/public/assets/{target-navigation-intent-B1GFMD9p.js → target-navigation-intent-BFsJN8Kr.js} +1 -1
  318. package/dist/public/assets/{typing-burst-detector-BBVTllDg.js → typing-burst-detector-CekoPsaO.js} +1 -1
  319. package/dist/public/assets/{use-apply-config-color-theme-DJmOs4Mx.js → use-apply-config-color-theme-CUJwxTbn.js} +1 -1
  320. package/dist/public/assets/{workspace-paths-4LdXG6d2.js → workspace-paths-r1tSwfOd.js} +1 -1
  321. package/dist/public/index.html +27 -27
  322. package/dist/pwd-D4OZ7N27-CT87C-5L.mjs +1 -0
  323. package/dist/{python3-DNGS4G3E-mSuL-4Sg.mjs → python3-DNGS4G3E-CvPRspn0.mjs} +2 -2
  324. package/dist/{quadrantDiagram-34T5L4WZ-Bd7jb1rn.mjs → quadrantDiagram-34T5L4WZ-DNT3MD_9.mjs} +2 -2
  325. package/dist/radar-PYXPWWZC-COiIo4-V.mjs +1 -0
  326. package/dist/readlink-MI4GCHJF-yD7ZCo6I.mjs +1 -0
  327. package/dist/{reduce-CKdE5ppn.mjs → reduce-KkqmWdsg.mjs} +2 -2
  328. package/dist/{repair-launch-json-F3MZs-IY.mjs → repair-launch-json-B8-siIVG.mjs} +2 -2
  329. package/dist/{repair-mcp-configs-DeF097He.mjs → repair-mcp-configs-iuxXR-U-.mjs} +2 -2
  330. package/dist/repair-skills-CZkLkOIF.mjs +1 -0
  331. package/dist/repair-skills-DTChn2Mf.mjs +3 -0
  332. package/dist/{requirementDiagram-MS252O5E-B74qjBRN.mjs → requirementDiagram-MS252O5E-25Z7WGN_.mjs} +2 -2
  333. package/dist/rev-XOSYPP45-DXeN2c_L.mjs +1 -0
  334. package/dist/rg-XNF3R3II-CSW8tOjh.mjs +1 -0
  335. package/dist/rm-RTZG23RL-CdPHUz_A.mjs +1 -0
  336. package/dist/rmdir-XTQXT7RK-B-Hcy2_M.mjs +1 -0
  337. package/dist/{rough.cjs-D5rEDIRO.mjs → rough.cjs-CjMW0p0V.mjs} +1 -1
  338. package/dist/{sankeyDiagram-XADWPNL6-CsDd_Lum.mjs → sankeyDiagram-XADWPNL6-CaXOTYx7.mjs} +2 -2
  339. package/dist/schemas/v0/config.project-local.schema.json +3 -3
  340. package/dist/sed-JAPPVBEU-CcOukRYN.mjs +1 -0
  341. package/dist/seq-RN5ZUASB-s6ShRZlK.mjs +1 -0
  342. package/dist/{sequenceDiagram-FGHM5R23-C88m3ajK.mjs → sequenceDiagram-FGHM5R23-BgVYdPUE.mjs} +2 -2
  343. package/dist/server-lock-GuuouVft-BjWZinGq.mjs +1 -0
  344. package/dist/server-lock-iLcBw_q0-DWu5z2Sp.mjs +2 -0
  345. package/dist/sha1sum-VJPNLNU6-DypLzN_7.mjs +1 -0
  346. package/dist/sha256sum-PI32XWXY-DGVRMju7.mjs +1 -0
  347. package/dist/sleep-VZFPZFWA-B9Y3_tNd.mjs +1 -0
  348. package/dist/sort-DCNRDA7U-hsloabcm.mjs +1 -0
  349. package/dist/split-SITCSYCZ-BDulNHyK.mjs +1 -0
  350. package/dist/sqlite3-TE5AIOTF-DjHl_aWc.mjs +1 -0
  351. package/dist/src-4JZrrUEE.mjs +21 -0
  352. package/dist/{src-DC_BCes_.mjs → src-BGL-MlNN.mjs} +1 -1
  353. package/dist/start-B9AbQt7f.mjs +1 -0
  354. package/dist/start-DX8hoO29.mjs +3 -0
  355. package/dist/stat-BT5A227F-Bo3rQCLg.mjs +1 -0
  356. package/dist/{stateDiagram-FHFEXIEX-va6AVA_z.mjs → stateDiagram-FHFEXIEX-DQ2iT5iQ.mjs} +2 -2
  357. package/dist/stateDiagram-v2-QKLJ7IA2-BN2cDF-I.mjs +2 -0
  358. package/dist/strings-7PLOGTPD-DzlKcmS-.mjs +1 -0
  359. package/dist/tac-SJGXQ4T2-ByklUqCu.mjs +1 -0
  360. package/dist/tail-S5ULNTJU-4htchzH3.mjs +1 -0
  361. package/dist/tar-MZQD7NO4-BbDCO35a.mjs +1 -0
  362. package/dist/tee-O7VXZDCO-C4h94T7n.mjs +1 -0
  363. package/dist/time-DEUO3QV2-DgbA26hb.mjs +1 -0
  364. package/dist/{timeline-definition-GMOUNBTQ-TPAmdwnH.mjs → timeline-definition-GMOUNBTQ-CN-kJjLP.mjs} +2 -2
  365. package/dist/timeout-VRKMCG72-QNsmkGY4.mjs +1 -0
  366. package/dist/touch-DX2IJOQ4-DCSWORMR.mjs +1 -0
  367. package/dist/tr-2HXZRDSW-ClAtG6KK.mjs +1 -0
  368. package/dist/tree-LYXBS7DC-DY3rkdQ5.mjs +1 -0
  369. package/dist/treeView-SZITEDCU-IxD8BwiZ.mjs +1 -0
  370. package/dist/treemap-W4RFUUIX-Bi83ji26.mjs +1 -0
  371. package/dist/true-WHJNXCHG-D1oYWVZ5.mjs +1 -0
  372. package/dist/unexpand-RGTMIGZM-MOepJcp7.mjs +1 -0
  373. package/dist/uniq-SUNANL47-BTfKD4-0.mjs +1 -0
  374. package/dist/{vennDiagram-DHZGUBPP-CVntpCfR.mjs → vennDiagram-DHZGUBPP-BJ8_Sz54.mjs} +2 -2
  375. package/dist/wardley-RL74JXVD-DxHrvQhH.mjs +1 -0
  376. package/dist/{wardleyDiagram-NUSXRM2D-DlYkmDFQ.mjs → wardleyDiagram-NUSXRM2D-j56ncYAi.mjs} +2 -2
  377. package/dist/wc-TQB3VNOX-CMqYcRvH.mjs +1 -0
  378. package/dist/which-XZHEH76L-CAv7Efsx.mjs +1 -0
  379. package/dist/whoami-DGKU3D2X-CpvaE3LM.mjs +1 -0
  380. package/dist/{wrapper-BZO_sIci.mjs → wrapper-C8gJQl5z.mjs} +1 -1
  381. package/dist/write-project-skill-BwRqNV9s.mjs +36 -0
  382. package/dist/xan-UD7JYIL2-DLOcZDYa.mjs +1 -0
  383. package/dist/xan-view-OW2TB7Z3-dHhPo_bJ.mjs +1 -0
  384. package/dist/xargs-I6EZUCYF-HR9_4d9i.mjs +1 -0
  385. package/dist/{xychartDiagram-5P7HB3ND-CFd6z4Gb.mjs → xychartDiagram-5P7HB3ND-CcUb_B_R.mjs} +2 -2
  386. package/dist/yazl-B1RwDQQs.mjs +1 -0
  387. package/dist/{yazl-Docqgl6q.mjs → yazl-DFMxUgKn.mjs} +1 -1
  388. package/dist/yq-OAKYHSXH-CJLBfTXv.mjs +1 -0
  389. package/package.json +1 -1
  390. package/dist/alias-JE7RI5QX-BODj4Gfj.mjs +0 -1
  391. package/dist/architecture-YZFGNWBL-BJvTzYI9.mjs +0 -1
  392. package/dist/awk2-BBAGSFUB-lHnSCbc-.mjs +0 -1
  393. package/dist/base64-4YMZCVJ5-BTMj5dqF.mjs +0 -1
  394. package/dist/basename-AA2KJYZQ-B1wvwZXV.mjs +0 -1
  395. package/dist/bash-IJWYRKFO-CCnjwjWe.mjs +0 -1
  396. package/dist/build-Ca40rJCO.mjs +0 -1
  397. package/dist/cat-RDUMLXKC-JY2w4DEE.mjs +0 -1
  398. package/dist/channel-BQl_ktPZ.mjs +0 -2
  399. package/dist/chmod-SYMGL4JA-3Hk_1ELN.mjs +0 -1
  400. package/dist/chunk-426QAEUC-B_MzMc_U.mjs +0 -2
  401. package/dist/classDiagram-6PBFFD2Q-L301VcDG.mjs +0 -2
  402. package/dist/classDiagram-v2-HSJHXN6E-CeSqnnqg.mjs +0 -2
  403. package/dist/clear-5CZ5X4YR-BDbutb2U.mjs +0 -1
  404. package/dist/clone-DETmm2Pe.mjs +0 -2
  405. package/dist/colors-C2Tw16G0.mjs +0 -1
  406. package/dist/column-WLPMMSTS-CV6fCKBB.mjs +0 -1
  407. package/dist/comm-5SLSESQG-c_QNAuoh.mjs +0 -1
  408. package/dist/constants-CLnYEWN_.mjs +0 -2
  409. package/dist/cp-XOYR4ABJ-Dy7On9-M.mjs +0 -1
  410. package/dist/cut-OPC3VAGB-BuR9R75Y.mjs +0 -1
  411. package/dist/date-DD7FVA2V-ClXjwml9.mjs +0 -1
  412. package/dist/diff-HJF2MPDN-C0H4yjXW.mjs +0 -1
  413. package/dist/dirname-LEMTZZFS-4AT-pFX0.mjs +0 -1
  414. package/dist/dist-Lt66otPU.mjs +0 -1
  415. package/dist/dist-bundle-BA0EtAC7.mjs +0 -1
  416. package/dist/du-WO2ENHXQ-Do-4VQ3V.mjs +0 -1
  417. package/dist/echo-O45JWWI2-DdI80aCx.mjs +0 -1
  418. package/dist/env-5EPCWSXR-CDfcyvrs.mjs +0 -1
  419. package/dist/expand-DTNXU4LQ-D-zXh5CC.mjs +0 -1
  420. package/dist/expansion-VBDYWVZR-DTjZRtii.mjs +0 -1
  421. package/dist/expr-YYCVMXE3-C9dGgUU3.mjs +0 -1
  422. package/dist/file-IGDTDPLG-BEwb4MXq.mjs +0 -1
  423. package/dist/find-DH2ALKQS-Dni7700t.mjs +0 -1
  424. package/dist/flag-coverage-6JEX67RU-CMw4W0rs.mjs +0 -2
  425. package/dist/fold-LDSORVYE-g18Hkyqy.mjs +0 -1
  426. package/dist/gh-detect-DNx3-c1-.mjs +0 -3
  427. package/dist/git-handle-BMLM1Bxa-Bic5A31t.mjs +0 -1
  428. package/dist/git-handle-XXj9bu6B-DY30-mw9.mjs +0 -10
  429. package/dist/gitGraph-7Q5UKJZL-D8oR6R4c.mjs +0 -1
  430. package/dist/grep-2HUTXO5U-Dq78Al2p.mjs +0 -1
  431. package/dist/gzip-AQXSGOVS-C9_JolVc.mjs +0 -1
  432. package/dist/head-HT2B6D2J-CdrKE_Tc.mjs +0 -1
  433. package/dist/help-VVWX7SA5-DdmujeOs.mjs +0 -1
  434. package/dist/history-J4QRNGRO-Bm3N_FkO.mjs +0 -1
  435. package/dist/hostname-BK6HG2DE-DdT-PlzJ.mjs +0 -1
  436. package/dist/html-to-markdown-TFCECAGV-D2mzPMGY.mjs +0 -1
  437. package/dist/info-OMHHGYJF-pWbeXW42.mjs +0 -1
  438. package/dist/init-B95G78xI.mjs +0 -1
  439. package/dist/init-Cv8r5418.mjs +0 -639
  440. package/dist/join-GG2LDHE5-DV7ilddy.mjs +0 -1
  441. package/dist/jq-LYZFFBZB-DhEnecL2.mjs +0 -1
  442. package/dist/ln-4TRFBYAT-Cg_-SGIL.mjs +0 -1
  443. package/dist/loader-DmyBlNAH.mjs +0 -1
  444. package/dist/loader-LweoGzIS.mjs +0 -4
  445. package/dist/ls-KSXFZCWH-RlHCZlxm.mjs +0 -1
  446. package/dist/md5sum-INMIK4DX-BXlXL3Ru.mjs +0 -1
  447. package/dist/mkdir-TDEMSB6C-Cu2DJyfB.mjs +0 -1
  448. package/dist/mv-Z6MORUFL-BsEWL09Z.mjs +0 -1
  449. package/dist/nl-U5YJDM32-BybO7Epu.mjs +0 -1
  450. package/dist/od-VJEF2UR5-OIZrgjg0.mjs +0 -1
  451. package/dist/packet-4T2RLAQJ-BizdrxBC.mjs +0 -1
  452. package/dist/paste-7N6AFSDS-Ch72F0D2.mjs +0 -1
  453. package/dist/pie-ZZUOXDRM-BSULk3pW.mjs +0 -1
  454. package/dist/preview-DxyaYzYn.mjs +0 -1
  455. package/dist/printf-CX64KX2P-DS9NCBYX.mjs +0 -1
  456. package/dist/public/assets/CodeMirrorPropInput-BTKAJRoj.js +0 -3
  457. package/dist/public/assets/DocumentContext-GpXOb1VS.js +0 -36
  458. package/dist/public/assets/ReportBugDialogBody-Doy_5VwI.js +0 -2
  459. package/dist/public/assets/SettingsDialogBody-CTxuhPRl.js +0 -7
  460. package/dist/public/assets/ShareBranchSwitchDialog-BFGW5yvV.js +0 -1
  461. package/dist/public/assets/index-Cs4DTKOK.css +0 -1
  462. package/dist/public/assets/open-managed-artifact-tab-CHfy6RsF.js +0 -5
  463. package/dist/public/assets/skill-actions-1nHLmqUS.js +0 -1
  464. package/dist/pwd-D4OZ7N27-PztYFitl.mjs +0 -1
  465. package/dist/radar-PYXPWWZC-BPIU1oIT.mjs +0 -1
  466. package/dist/readlink-MI4GCHJF-B72qVA05.mjs +0 -1
  467. package/dist/repair-skills-C2X3d1Py.mjs +0 -3
  468. package/dist/repair-skills-DL9nbwfk.mjs +0 -1
  469. package/dist/rev-XOSYPP45-ByX-mrLe.mjs +0 -1
  470. package/dist/rg-XNF3R3II-CnMv6YV-.mjs +0 -1
  471. package/dist/rm-RTZG23RL-CEw97Zb0.mjs +0 -1
  472. package/dist/rmdir-XTQXT7RK-BFdmBJEt.mjs +0 -1
  473. package/dist/sed-JAPPVBEU-2bqT53N-.mjs +0 -1
  474. package/dist/seq-RN5ZUASB-DxG4OIr9.mjs +0 -1
  475. package/dist/server-lock-GuuouVft-Xcm8kgmF.mjs +0 -1
  476. package/dist/sha1sum-VJPNLNU6-4-wvJ2xb.mjs +0 -1
  477. package/dist/sha256sum-PI32XWXY-BaaxN7Tl.mjs +0 -1
  478. package/dist/sleep-VZFPZFWA-BllHeqyP.mjs +0 -1
  479. package/dist/sort-DCNRDA7U-CuZyvLiY.mjs +0 -1
  480. package/dist/split-SITCSYCZ-_ZnwVuas.mjs +0 -1
  481. package/dist/sqlite3-TE5AIOTF-CNPF-saV.mjs +0 -1
  482. package/dist/src-ClCLBBac.mjs +0 -21
  483. package/dist/start-Bip4i7l5.mjs +0 -1
  484. package/dist/start-Oqkv042N.mjs +0 -3
  485. package/dist/stat-BT5A227F-D9HiKzDi.mjs +0 -1
  486. package/dist/stateDiagram-v2-QKLJ7IA2-Cu9wyPTl.mjs +0 -2
  487. package/dist/strings-7PLOGTPD-kZJh53lS.mjs +0 -1
  488. package/dist/tac-SJGXQ4T2-Eo9pASuo.mjs +0 -1
  489. package/dist/tail-S5ULNTJU-PpwHAjse.mjs +0 -1
  490. package/dist/tar-MZQD7NO4-9e7UblLx.mjs +0 -1
  491. package/dist/tee-O7VXZDCO-CBU43Hsm.mjs +0 -1
  492. package/dist/time-DEUO3QV2-BpiPEFvF.mjs +0 -1
  493. package/dist/timeout-VRKMCG72-COJoI5YN.mjs +0 -1
  494. package/dist/touch-DX2IJOQ4-C4-z30TF.mjs +0 -1
  495. package/dist/tr-2HXZRDSW-C9BbHiUE.mjs +0 -1
  496. package/dist/tree-LYXBS7DC-BSj-bS3l.mjs +0 -1
  497. package/dist/treeView-SZITEDCU-CxDAshOW.mjs +0 -1
  498. package/dist/treemap-W4RFUUIX-Akln3RQv.mjs +0 -1
  499. package/dist/true-WHJNXCHG-BkJIzmUI.mjs +0 -1
  500. package/dist/unexpand-RGTMIGZM-C-to2fwU.mjs +0 -1
  501. package/dist/uniq-SUNANL47-o1tLcwbX.mjs +0 -1
  502. package/dist/wardley-RL74JXVD-Djy_JGGm.mjs +0 -1
  503. package/dist/wc-TQB3VNOX-B-lPuWMt.mjs +0 -1
  504. package/dist/which-XZHEH76L-a4M_VoGw.mjs +0 -1
  505. package/dist/whoami-DGKU3D2X-DJ9OZDEX.mjs +0 -1
  506. package/dist/write-project-skill-B0sRkegU.mjs +0 -36
  507. package/dist/xan-UD7JYIL2-DqVUhpbk.mjs +0 -1
  508. package/dist/xan-view-OW2TB7Z3-BmNMcZHM.mjs +0 -1
  509. package/dist/xargs-I6EZUCYF-DphRNePs.mjs +0 -1
  510. package/dist/yazl-CQSNnbvt.mjs +0 -1
  511. package/dist/yq-OAKYHSXH-BBrPVcxh.mjs +0 -1
@@ -1,4 +1,4 @@
1
- import{T as e,p as t,w as n}from"./src-DC_BCes_.mjs";import{B as r,C as i,D as a,L as o,P as s,U as c,V as l,W as u,_ as d,a as f,b as p,c as m,i as h,k as g,r as _,s as v,v as y,y as b}from"./chunk-ICPOFSXX-C2hDlKD_.mjs";import{t as x}from"./dist-Co98vmuK.mjs";import{f as S,h as C}from"./chunk-5PVQY5BW-_JlgOiAb.mjs";import{a as w,c as T,i as E,n as D,r as O,s as k}from"./chunk-YZCP3GAM-C2dMi590.mjs";import{t as A}from"./chunk-QZHKN3VN-CczpYV_w.mjs";import{n as j,t as M}from"./chunk-XPW4576I-B-qTm_Z3.mjs";var N=x(),P=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],L=[1,74],ee=[1,80],R=[1,81],te=[1,82],ne=[1,83],z=[1,84],B=[1,85],V=[1,86],re=[1,87],H=[1,88],U=[1,89],W=[1,90],ie=[1,91],ae=[1,92],oe=[1,93],G=[1,94],se=[1,95],K=[1,96],ce=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1));break}},`anonymous`),table:[{3:1,4:t,5:r,6:i},{1:[3]},{3:5,4:t,5:r,6:i},{3:6,4:t,5:r,6:i},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(I,[2,30]),e(I,[2,31]),{33:[1,62]},{35:[1,63]},e(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:L},{23:75,55:76,73:L},{23:77,73:F},{69:78,72:[1,79],78:ee,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],_e),e(I,[2,6]),e(I,[2,16]),e(ve,[2,10],{11:114}),e(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(I,[2,22]),{5:[1,118]},{5:[1,119]},e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,32]),e(I,[2,33]),e(ye,a,{7:120}),e(ye,a,{7:121}),e(ye,a,{7:122}),e(be,a,{41:123,7:124}),e(xe,a,{43:125,7:126}),e(xe,a,{7:126,43:127}),e(Se,a,{46:128,7:129}),e(ye,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Ce,_e,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:ee,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},e(q,[2,79]),e(q,[2,80]),e(q,[2,81]),e(q,[2,82]),e(q,[2,83]),e(q,[2,84]),e(q,[2,85]),e(q,[2,86]),e(q,[2,87]),e(q,[2,88]),e(q,[2,89]),e(q,[2,90]),e(q,[2,91]),e(q,[2,92]),e(q,[2,93]),e(q,[2,94]),e(q,[2,95]),e(q,[2,96]),e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e(q,[2,101]),e(q,[2,102]),e(q,[2,103]),e(q,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:J},{58:152,104:J},{58:153,104:J},{58:154,104:J},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},e(I,[2,20]),e(I,[2,21]),e(I,[2,23]),e(I,[2,24]),{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},e(I,[2,50]),{16:[1,173]},e(I,[2,55]),e(Ce,[2,76]),{76:[1,174]},{16:[1,175]},e(I,[2,52]),{16:[1,176]},e(I,[2,57]),e(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:J},{23:181,72:[1,182],73:F},{58:183,104:J},{58:184,104:J},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(I,[2,17]),e(ve,[2,11]),{13:186,51:D,53:O,54:k},e(ve,[2,13]),e(ve,[2,14]),e(I,[2,19]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),{16:[1,187]},e(I,[2,39]),{16:[1,188]},e(I,[2,40]),e(I,[2,41]),{16:[1,189]},e(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:J},{58:196,104:J},{58:197,104:J},{5:[2,75]},{58:198,104:J},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},e(ve,[2,12]),e(be,a,{7:124,41:201}),e(xe,a,{7:126,43:202}),e(Se,a,{7:129,46:203}),e(I,[2,49]),e(I,[2,54]),e(Ce,[2,77]),e(I,[2,51]),e(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:J},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{T as e,p as t,w as n}from"./src-BGL-MlNN.mjs";import{B as r,C as i,D as a,L as o,P as s,U as c,V as l,W as u,_ as d,a as f,b as p,c as m,i as h,k as g,r as _,s as v,v as y,y as b}from"./chunk-ICPOFSXX-BF2fcu67.mjs";import{t as x}from"./dist-B9rR197c.mjs";import{f as S,h as C}from"./chunk-5PVQY5BW-CM3DDgan.mjs";import{a as w,c as T,i as E,n as D,r as O,s as k}from"./chunk-YZCP3GAM-dFAdRCa8.mjs";import{t as A}from"./chunk-QZHKN3VN-4LgLml-S.mjs";import{n as j,t as M}from"./chunk-XPW4576I-bLLZgym8.mjs";var N=x(),P=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],L=[1,74],ee=[1,80],R=[1,81],te=[1,82],ne=[1,83],z=[1,84],B=[1,85],V=[1,86],re=[1,87],H=[1,88],U=[1,89],W=[1,90],ie=[1,91],ae=[1,92],oe=[1,93],G=[1,94],se=[1,95],K=[1,96],ce=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1));break}},`anonymous`),table:[{3:1,4:t,5:r,6:i},{1:[3]},{3:5,4:t,5:r,6:i},{3:6,4:t,5:r,6:i},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(I,[2,30]),e(I,[2,31]),{33:[1,62]},{35:[1,63]},e(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:L},{23:75,55:76,73:L},{23:77,73:F},{69:78,72:[1,79],78:ee,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],_e),e(I,[2,6]),e(I,[2,16]),e(ve,[2,10],{11:114}),e(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(I,[2,22]),{5:[1,118]},{5:[1,119]},e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,32]),e(I,[2,33]),e(ye,a,{7:120}),e(ye,a,{7:121}),e(ye,a,{7:122}),e(be,a,{41:123,7:124}),e(xe,a,{43:125,7:126}),e(xe,a,{7:126,43:127}),e(Se,a,{46:128,7:129}),e(ye,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Ce,_e,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:ee,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},e(q,[2,79]),e(q,[2,80]),e(q,[2,81]),e(q,[2,82]),e(q,[2,83]),e(q,[2,84]),e(q,[2,85]),e(q,[2,86]),e(q,[2,87]),e(q,[2,88]),e(q,[2,89]),e(q,[2,90]),e(q,[2,91]),e(q,[2,92]),e(q,[2,93]),e(q,[2,94]),e(q,[2,95]),e(q,[2,96]),e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e(q,[2,101]),e(q,[2,102]),e(q,[2,103]),e(q,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:J},{58:152,104:J},{58:153,104:J},{58:154,104:J},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},e(I,[2,20]),e(I,[2,21]),e(I,[2,23]),e(I,[2,24]),{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},e(I,[2,50]),{16:[1,173]},e(I,[2,55]),e(Ce,[2,76]),{76:[1,174]},{16:[1,175]},e(I,[2,52]),{16:[1,176]},e(I,[2,57]),e(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:J},{23:181,72:[1,182],73:F},{58:183,104:J},{58:184,104:J},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(I,[2,17]),e(ve,[2,11]),{13:186,51:D,53:O,54:k},e(ve,[2,13]),e(ve,[2,14]),e(I,[2,19]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),{16:[1,187]},e(I,[2,39]),{16:[1,188]},e(I,[2,40]),e(I,[2,41]),{16:[1,189]},e(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:J},{58:196,104:J},{58:197,104:J},{5:[2,75]},{58:198,104:J},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},e(ve,[2,12]),e(be,a,{7:124,41:201}),e(xe,a,{7:126,43:202}),e(Se,a,{7:129,46:203}),e(I,[2,49]),e(I,[2,54]),e(Ce,[2,77]),e(I,[2,51]),e(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:J},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};we.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:n(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:n(function(){return this._more=!0,this},`more`),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -155,4 +155,4 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l
155
155
  a ${x},${S} 0 0 0 ${y},0
156
156
  l 0,-${b-2*S}
157
157
  `;C.append(`path`).attr(`d`,w),u===`neo`&&C.attr(`filter`,`url(#drop-shadow)`);let T=i.get(t.name)??0;U.has(c)?(C.style(`stroke`,f[T%f.length]),C.style(`fill`,d[T%f.length])):C.style(`stroke`,p),C.attr(`transform`,`translate(${y}, ${S})`),t.rectData=_,Y(n,g(t.description))(t.description,h,_.x,_.y+35,_.width,_.height,{class:`actor ${re}`},n);let E=C.select(`path:last-child`);return E.node()&&(t.height=E.node().getBBox().height+(n.sequence.labelBoxHeight??0)),r||(h.attr(`data-et`,`participant`),h.attr(`data-type`,`database`),h.attr(`data-id`,t.name)),t.height},`drawActorTypeDatabase`),he=n(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+80,c=e.append(`g`).lower(),{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=d;r||(K++,c.append(`line`).attr(`id`,`actor`+K).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let h=e.append(`g`),_=H;r?_+=` ${V}`:_+=` ${B}`,h.attr(`class`,_),h.attr(`name`,t.name);let v=k();v.x=t.x,v.y=a,v.fill=`#eaeaea`,v.width=t.width,v.height=t.height,v.class=`actor`,h.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,t.x+t.width/2-22*2.5).attr(`y1`,a+12).attr(`x2`,t.x+t.width/2-15).attr(`y2`,a+12),h.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,t.x+t.width/2-22*2.5).attr(`y1`,a+2).attr(`x2`,t.x+t.width/2-22*2.5).attr(`y2`,a+22),h.append(`circle`).attr(`cx`,t.x+t.width/2).attr(`cy`,a+12).attr(`r`,22),l===`neo`&&h.attr(`filter`,`url(#drop-shadow)`);let y=i.get(t.name)??0;return U.has(u)?(h.style(`stroke`,p[y%p.length]),h.style(`fill`,f[y%p.length])):h.style(`stroke`,m),t.height=h.node().getBBox().height+(n.sequence.labelBoxHeight??0),Y(n,g(t.description))(t.description,h,v.x,v.y+15,v.width,v.height,{class:`actor ${H}`},n),h.attr(`transform`,`translate(0,21)`),r||(h.attr(`data-et`,`participant`),h.attr(`data-type`,`boundary`),h.attr(`data-id`,t.name)),t.height},`drawActorTypeBoundary`),ge=n(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+80,{look:c,theme:l,themeVariables:u}=n,{bkgColorArray:d,borderColorArray:f,actorBorder:p}=u,m=e.append(`g`).lower();r||(K++,m.append(`line`).attr(`id`,`actor`+K).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let h=e.append(`g`),_=H;r?_+=` ${V}`:_+=` ${B}`,h.attr(`class`,_),h.attr(`name`,t.name),r||h.attr(`data-et`,`participant`).attr(`data-type`,`actor`).attr(`data-id`,t.name);let v=c===`neo`?.5:1,y=c===`neo`?a+(1-v)*30:a;h.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,o).attr(`y1`,y+25*v).attr(`x2`,o).attr(`y2`,y+45*v),h.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,o-z/2*v).attr(`y1`,y+33*v).attr(`x2`,o+z/2*v).attr(`y2`,y+33*v),h.append(`line`).attr(`x1`,o-z/2*v).attr(`y1`,y+60*v).attr(`x2`,o).attr(`y2`,y+45*v),h.append(`line`).attr(`x1`,o).attr(`y1`,y+45*v).attr(`x2`,o+(z/2-2)*v).attr(`y2`,y+60*v);let b=h.append(`circle`);b.attr(`cx`,t.x+t.width/2),b.attr(`cy`,y+10*v),b.attr(`r`,15*v),b.attr(`width`,t.width*v),b.attr(`height`,t.height*v),t.height=h.node().getBBox().height;let x=k();x.x=t.x,x.y=y,x.fill=`#eaeaea`,x.width=t.width,x.height=t.height/v,x.class=`actor`,x.rx=3,x.ry=3;let S=i.get(t.name)??0;return U.has(l)?(h.style(`stroke`,f[S%f.length]),h.style(`fill`,d[S%f.length])):h.style(`stroke`,p),Y(n,g(t.description))(t.description,h,x.x,y+35*v-(c===`neo`?10:0),x.width,x.height,{class:`actor ${H}`},n),t.height},`drawActorTypeActor`),_e=n(async function(e,t,n,r,i,a,o){let s=o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]));switch(t.type){case`actor`:return await ge(e,t,n,r,s);case`participant`:return await le(e,t,n,r,s);case`boundary`:return await he(e,t,n,r,s);case`control`:return await fe(e,t,n,r,i,s);case`entity`:return await pe(e,t,n,r,s);case`database`:return await me(e,t,n,r,s);case`collections`:return await ue(e,t,n,r,s);case`queue`:return await de(e,t,n,r,s)}},`drawActor`),ve=n(function(e,t,n){let r=e.append(`g`);Se(r,t),t.name&&Y(n)(t.name,r,t.x,t.y+n.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:`text`},n),r.lower()},`drawBox`),ye=n(function(e){return e.append(`g`)},`anchorElement`),be=n(function(e,t,n,r,i,a,o){let{theme:s,themeVariables:c}=r,{bkgColorArray:l,borderColorArray:u,mainBkg:d}=c,f=k(),p=t.anchored,m=t.actor;f.x=t.startx,f.y=t.starty,f.class=`activation`+i%3,f.width=t.stopx-t.startx,f.height=n-t.starty;let h=W(p,f),g=(o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]))).get(m)??0;U.has(s)&&(h.style(`stroke`,u[g%u.length]),h.style(`fill`,l[g%u.length]??d))},`drawActivation`),xe=n(async function(e,t,r,i,a){let{boxMargin:o,boxTextMargin:s,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:u,messageFontSize:d,messageFontWeight:f}=i,p=e.append(`g`).attr(`data-et`,`control-structure`).attr(`data-id`,`i`+a.id),m=n(function(e,t,n,r){return p.append(`line`).attr(`x1`,e).attr(`y1`,t).attr(`x2`,n).attr(`y2`,r).attr(`class`,`loopLine`)},`drawLoopLine`);m(t.startx,t.starty,t.stopx,t.starty),m(t.stopx,t.starty,t.stopx,t.stopy),m(t.startx,t.stopy,t.stopx,t.stopy),m(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(e){m(t.startx,e.y,t.stopx,e.y).style(`stroke-dasharray`,`3, 3`)});let h=T();h.text=r,h.x=t.startx,h.y=t.starty,h.fontFamily=u,h.fontSize=d,h.fontWeight=f,h.anchor=`middle`,h.valign=`middle`,h.tspan=!1,h.width=Math.max(l??0,50),h.height=c+(i.look===`neo`?15:0)||20,h.textMargin=s,h.class=`labelText`,se(p,h),h=ke(),h.text=t.title,h.x=t.startx+l/2+(t.stopx-t.startx)/2,h.y=t.starty+o+s,h.anchor=`middle`,h.valign=`middle`,h.textMargin=s,h.class=`loopText`,h.fontFamily=u,h.fontSize=d,h.fontWeight=f,h.wrap=!0;let _=g(h.text)?await oe(p,h,t):G(p,h);if(t.sectionTitles!==void 0){for(let[e,n]of Object.entries(t.sectionTitles))if(n.message){h.text=n.message,h.x=t.startx+(t.stopx-t.startx)/2,h.y=t.sections[e].y+o+s,h.class=`loopText`,h.anchor=`middle`,h.valign=`middle`,h.tspan=!1,h.fontFamily=u,h.fontSize=d,h.fontWeight=f,h.wrap=t.wrap,g(h.text)?(t.starty=t.sections[e].y,await oe(p,h,t)):G(p,h);let r=Math.round(_.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));t.sections[e].height+=r-(o+s)}}return t.height=Math.round(t.stopy-t.starty),p},`drawLoop`),Se=n(function(e,t){D(e,t)},`drawBackgroundRect`),Ce=n(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-database`).attr(`fill-rule`,`evenodd`).attr(`clip-rule`,`evenodd`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z`)},`insertDatabaseIcon`),q=n(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-computer`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z`)},`insertComputerIcon`),J=n(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-clock`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z`)},`insertClockIcon`),we=n(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,7.9).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M -1 0 L 10 5 L 0 10 z`)},`insertArrowHead`),Te=n(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-filled-head`).attr(`refX`,15.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`insertArrowFilledHead`),Ee=n(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-sequencenumber`).attr(`refX`,15).attr(`refY`,15).attr(`markerWidth`,60).attr(`markerHeight`,40).attr(`orient`,`auto`).append(`circle`).attr(`cx`,15).attr(`cy`,15).attr(`r`,6)},`insertSequenceNumber`),De=n(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,4).attr(`refY`,4.5).append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1pt`).attr(`d`,`M 1,2 L 6,7 M 6,2 L 1,7`)},`insertArrowCrossHead`),Oe=n(function(e,t){let{theme:n}=t;e.append(`defs`).append(`filter`).attr(`id`,`drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${n===`redux`||n===`redux-color`?`#000000`:`#FFFFFF`}`)},`insertDropShadow`),ke=n(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:`#666`,width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},`getTextObj`),Ae=n(function(){return{x:0,y:0,fill:`#EDF2AE`,stroke:`#666`,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),Y=(function(){function e(e,t,n,r,i,o,s){a(t.append(`text`).attr(`x`,n+i/2).attr(`y`,r+o/2+5).style(`text-anchor`,`middle`).text(e),s)}n(e,`byText`);function t(e,t,n,r,i,o,s,c){let{actorFontSize:l,actorFontFamily:u,actorFontWeight:d}=c,[f,p]=S(l),m=e.split(v.lineBreakRegex);for(let e=0;e<m.length;e++){let c=e*f-f*(m.length-1)/2,l=t.append(`text`).attr(`x`,n+i/2).attr(`y`,r).style(`text-anchor`,`middle`).style(`font-size`,p).style(`font-weight`,d).style(`font-family`,u);l.append(`tspan`).attr(`x`,n+i/2).attr(`dy`,c).text(m[e]),l.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),a(l,s)}}n(t,`byTspan`);function r(e,n,r,i,o,s,c,l){let u=n.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,i).attr(`width`,o).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),t(e,u,r,i,o,s,c,l),a(d,c)}n(r,`byFo`);async function i(e,n,r,i,o,c,l,u){let d=await h(e,b()),f=n.append(`switch`),p=f.append(`foreignObject`).attr(`x`,r+o/2-d.width/2).attr(`y`,i+c/2-d.height/2).attr(`width`,d.width).attr(`height`,d.height).append(`xhtml:div`).style(`height`,`100%`).style(`width`,`100%`);p.append(`div`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(await s(e,b())),t(e,f,r,i,o,c,l,u),a(p,l)}n(i,`byKatex`);function a(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return n(a,`_setTextAttrs`),function(n,a=!1){return a?i:n.textPlacement===`fo`?r:n.textPlacement===`old`?e:t}})(),je=(function(){function e(e,t,n,r,a,o,s){i(t.append(`text`).attr(`x`,n).attr(`y`,r).style(`text-anchor`,`start`).text(e),s)}n(e,`byText`);function t(e,t,n,r,a,o,s,c){let{actorFontSize:l,actorFontFamily:u,actorFontWeight:d}=c,f=e.split(v.lineBreakRegex);for(let e=0;e<f.length;e++){let a=e*l-l*(f.length-1)/2,c=t.append(`text`).attr(`x`,n).attr(`y`,r).style(`text-anchor`,`start`).style(`font-size`,l).style(`font-weight`,d).style(`font-family`,u);c.append(`tspan`).attr(`x`,n).attr(`dy`,a).text(f[e]),c.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),i(c,s)}}n(t,`byTspan`);function r(e,n,r,a,o,s,c,l){let u=n.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,a).attr(`width`,o).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),t(e,u,r,a,o,s,c,l),i(d,c)}n(r,`byFo`);function i(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return n(i,`_setTextAttrs`),function(n){return n.textPlacement===`fo`?r:n.textPlacement===`old`?e:t}})(),X={drawRect:W,drawText:G,drawLabel:se,drawActor:_e,drawBox:ve,drawPopup:ie,anchorElement:ye,drawActivation:be,drawLoop:xe,drawBackgroundRect:Se,insertArrowHead:we,insertArrowFilledHead:Te,insertSequenceNumber:Ee,insertArrowCrossHead:De,insertDatabaseIcon:Ce,insertComputerIcon:q,insertClockIcon:J,getTextObj:ke,getNoteRect:Ae,fixLifeLineHeights:ce,sanitizeUrl:N.sanitizeUrl,insertDropShadow:Oe,insertSolidTopArrowHead:n(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-solidTopArrowHead`).attr(`refX`,7.9).attr(`refY`,7.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 8 L 0 8 z`)},`insertSolidTopArrowHead`),insertSolidBottomArrowHead:n(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-solidBottomArrowHead`).attr(`refX`,7.9).attr(`refY`,.75).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 0 L 0 8 z`)},`insertSolidBottomArrowHead`),insertStickTopArrowHead:n(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-stickTopArrowHead`).attr(`refX`,7.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 7 7`).attr(`stroke`,`black`).attr(`stroke-width`,1.5).attr(`fill`,`none`)},`insertStickTopArrowHead`),insertStickBottomArrowHead:n(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-stickBottomArrowHead`).attr(`refX`,7.5).attr(`refY`,0).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 7 L 7 0`).attr(`stroke`,`black`).attr(`stroke-width`,1.5).attr(`fill`,`none`)},`insertStickBottomArrowHead`)},Z={},Q={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:n(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},`getHeight`),clear:n(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},`clear`),addBox:n(function(e){this.boxes.push(e)},`addBox`),addActor:n(function(e){this.actors.push(e)},`addActor`),addLoop:n(function(e){this.loops.push(e)},`addLoop`),addMessage:n(function(e){this.messages.push(e)},`addMessage`),addNote:n(function(e){this.notes.push(e)},`addNote`),lastActor:n(function(){return this.actors[this.actors.length-1]},`lastActor`),lastLoop:n(function(){return this.loops[this.loops.length-1]},`lastLoop`),lastMessage:n(function(){return this.messages[this.messages.length-1]},`lastMessage`),lastNote:n(function(){return this.notes[this.notes.length-1]},`lastNote`),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:n(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,He(p())},`init`),updateVal:n(function(e,t,n,r){e[t]===void 0?e[t]=n:e[t]=r(n,e[t])},`updateVal`),updateBounds:n(function(e,t,r,i){let a=this,o=0;function s(s){return n(function(n){o++;let c=a.sequenceItems.length-o+1;a.updateVal(n,`starty`,t-c*Z.boxMargin,Math.min),a.updateVal(n,`stopy`,i+c*Z.boxMargin,Math.max),a.updateVal(Q.data,`startx`,e-c*Z.boxMargin,Math.min),a.updateVal(Q.data,`stopx`,r+c*Z.boxMargin,Math.max),s!==`activation`&&(a.updateVal(n,`startx`,e-c*Z.boxMargin,Math.min),a.updateVal(n,`stopx`,r+c*Z.boxMargin,Math.max),a.updateVal(Q.data,`starty`,t-c*Z.boxMargin,Math.min),a.updateVal(Q.data,`stopy`,i+c*Z.boxMargin,Math.max))},`updateItemBounds`)}n(s,`updateFn`),this.sequenceItems.forEach(s()),this.activations.forEach(s(`activation`))},`updateBounds`),insert:n(function(e,t,n,r){let i=v.getMin(e,n),a=v.getMax(e,n),o=v.getMin(t,r),s=v.getMax(t,r);this.updateVal(Q.data,`startx`,i,Math.min),this.updateVal(Q.data,`starty`,o,Math.min),this.updateVal(Q.data,`stopx`,a,Math.max),this.updateVal(Q.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),newActivation:n(function(e,t,n){let r=n.get(e.from),i=Ue(e.from).length||0,a=r.x+r.width/2+(i-1)*Z.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Z.activationWidth,stopy:void 0,actor:e.from,anchored:X.anchorElement(t)})},`newActivation`),endActivation:n(function(e){let t=this.activations.map(function(e){return e.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},`endActivation`),createLoop:n(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},`createLoop`),newLoop:n(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},`newLoop`),endLoop:n(function(){return this.sequenceItems.pop()},`endLoop`),isLoopOverlap:n(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},`isLoopOverlap`),addSectionToLoop:n(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:Q.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},`addSectionToLoop`),saveVerticalPos:n(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},`saveVerticalPos`),resetVerticalPos:n(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},`resetVerticalPos`),bumpVerticalPos:n(function(e){this.verticalPos+=e,this.data.stopy=v.getMax(this.data.stopy,this.verticalPos)},`bumpVerticalPos`),getVerticalPos:n(function(){return this.verticalPos},`getVerticalPos`),getBounds:n(function(){return{bounds:this.data,models:this.models}},`getBounds`)},Me=n(async function(e,t,n){Q.bumpVerticalPos(Z.boxMargin),t.height=Z.boxMargin,t.starty=Q.getVerticalPos();let r=k();r.x=t.startx,r.y=t.starty,r.width=t.width||Z.width,r.class=`note`;let i=e.append(`g`);i.attr(`data-et`,`note`),i.attr(`data-id`,`i`+n);let a=X.drawRect(i,r),o=T();o.x=t.startx,o.y=t.starty,o.width=r.width,o.dy=`1em`,o.text=t.message,o.class=`noteText`,o.fontFamily=Z.noteFontFamily,o.fontSize=Z.noteFontSize,o.fontWeight=Z.noteFontWeight,o.anchor=Z.noteAlign,o.textMargin=Z.noteMargin,o.valign=`center`;let s=g(o.text)?await oe(i,o):G(i,o),c=Math.round(s.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));a.attr(`height`,c+2*Z.noteMargin),t.height+=c+2*Z.noteMargin,Q.bumpVerticalPos(c+2*Z.noteMargin),t.stopy=t.starty+c+2*Z.noteMargin,t.stopx=t.startx+r.width,Q.insert(t.startx,t.starty,t.stopx,t.stopy),Q.models.addNote(t)},`drawNote`),Ne=n(function(e,t,r,i,a,o,s){let c=i.db.getActors(),l=c.get(t.from),u=c.get(t.to),d=r.sequenceVisible,f=l.x+l.width/2,p=u.x+u.width/2,m=f<=p,h=tt(t,i),g=e.append(`g`),_=16.5,v=n((e,t)=>{let n=e?_:-_;return t?-n:n},`getCircleOffset`),y=n(e=>{g.append(`circle`).attr(`cx`,e).attr(`cy`,s).attr(`r`,5).attr(`width`,10).attr(`height`,10)},`drawCircle`),{CENTRAL_CONNECTION:b,CENTRAL_CONNECTION_REVERSE:x,CENTRAL_CONNECTION_DUAL:S}=i.db.LINETYPE;if(d)switch(t.centralConnection){case b:h&&(p+=v(m,!0));break;case x:h||(f+=v(m,!1));break;case S:h?p+=v(m,!0):f+=v(m,!1);break}switch(t.centralConnection){case b:y(p);break;case x:y(f);break;case S:y(f),y(p);break}},`drawCentralConnection`),Pe=n(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`),Fe=n(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),`noteFont`),Ie=n(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),`actorFont`);async function Le(e,t){Q.bumpVerticalPos(10);let{startx:n,stopx:r,message:i}=t,a=v.splitBreaks(i).length,o=g(i),s=o?await h(i,p()):C.calculateTextDimensions(i,Pe(Z));if(!o){let e=s.height/a;t.height+=e,Q.bumpVerticalPos(e)}let c,l=s.height-10,u=s.width;if(n===r){c=Q.getVerticalPos()+l,Z.rightAngles||(l+=Z.boxMargin,c=Q.getVerticalPos()+l),l+=30;let e=v.getMax(u/2,Z.width/2);Q.insert(n-e,Q.getVerticalPos()-10+l,r+e,Q.getVerticalPos()+30+l)}else l+=Z.boxMargin,c=Q.getVerticalPos()+l,Q.insert(n,c-10,r,c);return Q.bumpVerticalPos(l),t.height+=l,t.stopy=t.starty+t.height,Q.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),c}n(Le,`boundMessage`);var Re=n(async function(e,t,n,r,i,o){let{startx:s,stopx:c,starty:l,message:u,type:d,sequenceIndex:f,sequenceVisible:p}=t,m=C.calculateTextDimensions(u,Pe(Z)),h=T();h.x=s,h.y=l+10,h.width=c-s,h.class=`messageText`,h.dy=`1em`,h.text=u,h.fontFamily=Z.messageFontFamily,h.fontSize=Z.messageFontSize,h.fontWeight=Z.messageFontWeight,h.anchor=Z.messageAlign,h.valign=`center`,h.textMargin=Z.wrapPadding,h.tspan=!1,g(h.text)?await oe(e,h,{startx:s,stopx:c,starty:n}):G(e,h);let _=m.width,y;if(s===c){let a=p||Z.showSequenceNumbers,o=tt(i,r),l=nt(i,r),u=s+(a&&(o||l)?10:0);y=Z.rightAngles?e.append(`path`).attr(`d`,`M ${u},${n} H ${s+v.getMax(Z.width/2,_/2)} V ${n+25} H ${s}`):e.append(`path`).attr(`d`,`M `+u+`,`+n+` C `+(u+60)+`,`+(n-10)+` `+(s+60)+`,`+(n+30)+` `+s+`,`+(n+20)),$e(i,r)&&Ne(e,i,t,r,s,c,n)}else y=e.append(`line`),y.attr(`x1`,s),y.attr(`y1`,n),y.attr(`x2`,c),y.attr(`y2`,n),$e(i,r)&&Ne(e,i,t,r,s,c,n);d===r.db.LINETYPE.DOTTED||d===r.db.LINETYPE.DOTTED_CROSS||d===r.db.LINETYPE.DOTTED_POINT||d===r.db.LINETYPE.DOTTED_OPEN||d===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||d===r.db.LINETYPE.SOLID_TOP_DOTTED||d===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||d===r.db.LINETYPE.STICK_TOP_DOTTED||d===r.db.LINETYPE.STICK_BOTTOM_DOTTED||d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(y.style(`stroke-dasharray`,`3, 3`),y.attr(`class`,`messageLine1`)):y.attr(`class`,`messageLine0`),y.attr(`data-et`,`message`),y.attr(`data-id`,`i`+t.id),y.attr(`data-from`,t.from),y.attr(`data-to`,t.to);let b=``;if(Z.arrowMarkerAbsolute&&(b=a(!0)),y.attr(`stroke-width`,2),y.attr(`stroke`,`none`),y.style(`fill`,`none`),(d===r.db.LINETYPE.SOLID_TOP||d===r.db.LINETYPE.SOLID_TOP_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-solidTopArrowHead)`),(d===r.db.LINETYPE.SOLID_BOTTOM||d===r.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-solidBottomArrowHead)`),(d===r.db.LINETYPE.STICK_TOP||d===r.db.LINETYPE.STICK_TOP_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-stickTopArrowHead)`),(d===r.db.LINETYPE.STICK_BOTTOM||d===r.db.LINETYPE.STICK_BOTTOM_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-stickBottomArrowHead)`),(d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-solidBottomArrowHead)`),(d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-solidTopArrowHead)`),(d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-stickBottomArrowHead)`),(d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-stickTopArrowHead)`),(d===r.db.LINETYPE.SOLID||d===r.db.LINETYPE.DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-arrowhead)`),(d===r.db.LINETYPE.BIDIRECTIONAL_SOLID||d===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(y.attr(`marker-start`,`url(`+b+`#`+o+`-arrowhead)`),y.attr(`marker-end`,`url(`+b+`#`+o+`-arrowhead)`)),(d===r.db.LINETYPE.SOLID_POINT||d===r.db.LINETYPE.DOTTED_POINT)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-filled-head)`),(d===r.db.LINETYPE.SOLID_CROSS||d===r.db.LINETYPE.DOTTED_CROSS)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-crosshead)`),p||Z.showSequenceNumbers){let a=d===r.db.LINETYPE.BIDIRECTIONAL_SOLID||d===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,l=d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,u=$e(i,r),p=s,m=c;a?(s<c?p=s+12:(p=s-6+(u?-5:0),p+=i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),y.attr(`x1`,p)):l?(c>s?m=c-12:(m=c-6,p+=i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),m+=u?15:0,y.attr(`x2`,m),y.attr(`x1`,p)):y.attr(`x1`,s+6);let h=0,g=s===c,_=s<=c;h=g?t.fromBounds+1:l?_?t.toBounds-1:t.fromBounds+1:_?t.fromBounds+1:t.toBounds-1,e.append(`line`).attr(`x1`,h).attr(`y1`,n).attr(`x2`,h).attr(`y2`,n).attr(`stroke-width`,0).attr(`marker-start`,`url(`+b+`#`+o+`-sequencenumber)`),e.append(`text`).attr(`x`,h).attr(`y`,n+4).attr(`font-family`,`sans-serif`).attr(`font-size`,`12px`).attr(`text-anchor`,`middle`).attr(`class`,`sequenceNumber`).text(f)}},`drawMessage`),ze=n(function(e,t,n,r,i,a,o){let s=0,c=0,l,u=0;for(let e of r){let r=t.get(e),a=r.box;l&&l!=a&&(o||Q.models.addBox(l),c+=Z.boxMargin+l.margin),a&&a!=l&&(o||(a.x=s+c,a.y=i),c+=a.margin),r.width=v.getMax(r.width||Z.width,Z.width),r.height=v.getMax(r.height||Z.height,Z.height),r.margin=r.margin||Z.actorMargin,u=v.getMax(u,r.height),n.get(r.name)&&(c+=r.width/2),r.x=s+c,r.starty=Q.getVerticalPos(),Q.insert(r.x,i,r.x+r.width,r.height),s+=r.width+c,r.box&&(r.box.width=s+a.margin-r.box.x),c=r.margin,l=r.box,Q.models.addActor(r)}l&&!o&&Q.models.addBox(l),Q.bumpVerticalPos(u)},`addActorRenderingData`),Be=n(async function(e,t,n,r,i,a,o){if(r){let r=0;Q.bumpVerticalPos(Z.boxMargin*2);for(let s of n){let n=t.get(s);n.stopy||=Q.getVerticalPos();let c=await X.drawActor(e,n,Z,!0,i,a,o);r=v.getMax(r,c)}Q.bumpVerticalPos(r+Z.boxMargin)}else for(let r of n){let n=t.get(r);await X.drawActor(e,n,Z,!1,i,a,o)}},`drawActors`),Ve=n(function(e,t,n,r){let i=0,a=0;for(let o of n){let n=t.get(o),s=Je(n),c=X.drawPopup(e,n,s,Z,Z.forceMenus,r);c.height>i&&(i=c.height),c.width+n.x>a&&(a=c.width+n.x)}return{maxHeight:i,maxWidth:a}},`drawActorsPopup`),He=n(function(e){_(Z,e),e.fontFamily&&(Z.actorFontFamily=Z.noteFontFamily=Z.messageFontFamily=e.fontFamily),e.fontSize&&(Z.actorFontSize=Z.noteFontSize=Z.messageFontSize=e.fontSize),e.fontWeight&&(Z.actorFontWeight=Z.noteFontWeight=Z.messageFontWeight=e.fontWeight)},`setConf`),Ue=n(function(e){return Q.activations.filter(function(t){return t.actor===e})},`actorActivations`),We=n(function(e,t){let n=t.get(e),r=Ue(e);return[r.reduce(function(e,t){return v.getMin(e,t.startx)},n.x+n.width/2-1),r.reduce(function(e,t){return v.getMax(e,t.stopx)},n.x+n.width/2+1)]},`activationBounds`);function $(t,n,r,i,a){Q.bumpVerticalPos(r);let o=i;if(n.id&&n.message&&t[n.id]){let r=t[n.id].width,a=Pe(Z);n.message=C.wrapLabel(`[${n.message}]`,r-2*Z.wrapPadding,a),n.width=r,n.wrap=!0;let s=C.calculateTextDimensions(n.message,a),c=v.getMax(s.height,Z.labelBoxHeight);o=i+c,e.debug(`${c} - ${n.message}`)}a(n),Q.bumpVerticalPos(o)}n($,`adjustLoopHeightForWrap`);function Ge(e,t,r,i,a,o,s){function c(n,r){n.x<a.get(e.from).x?(Q.insert(t.stopx-r,t.starty,t.startx,t.stopy+n.height/2+Z.noteMargin),t.stopx+=r):(Q.insert(t.startx,t.starty,t.stopx+r,t.stopy+n.height/2+Z.noteMargin),t.stopx-=r)}n(c,`receiverAdjustment`);function l(n,r){n.x<a.get(e.to).x?(Q.insert(t.startx-r,t.starty,t.stopx,t.stopy+n.height/2+Z.noteMargin),t.startx+=r):(Q.insert(t.stopx,t.starty,t.startx+r,t.stopy+n.height/2+Z.noteMargin),t.startx-=r)}n(l,`senderAdjustment`);let u=[R.ACTOR,R.CONTROL,R.ENTITY,R.DATABASE];if(o.get(e.to)==i){let t=a.get(e.to);c(t,u.includes(t.type)?z/2+3:t.width/2+3),t.starty=r-t.height/2,Q.bumpVerticalPos(t.height/2)}else if(s.get(e.from)==i){let t=a.get(e.from);Z.mirrorActors&&l(t,u.includes(t.type)?z/2:t.width/2),t.stopy=r-t.height/2,Q.bumpVerticalPos(t.height/2)}else if(s.get(e.to)==i){let t=a.get(e.to);Z.mirrorActors&&c(t,u.includes(t.type)?z/2+3:t.width/2+3),t.stopy=r-t.height/2,Q.bumpVerticalPos(t.height/2)}}n(Ge,`adjustCreatedDestroyedData`);var Ke=n(async function(r,i,a,o){let{securityLevel:s,sequence:c,look:l}=p();Z=c;let u;s===`sandbox`&&(u=t(`#i`+i));let d=t(s===`sandbox`?u.nodes()[0].contentDocument.body:`body`),f=s===`sandbox`?u.nodes()[0].contentDocument:document;Q.init(),e.debug(o.db);let h=s===`sandbox`?d.select(`[id="${i}"]`):t(`[id="${i}"]`),g=o.db.getActors(),_=o.db.getCreatedActors(),v=o.db.getDestroyedActors(),y=o.db.getBoxes(),b=o.db.getActorKeys(),x=o.db.getMessages(),S=o.db.getDiagramTitle(),C=o.db.hasAtLeastOneBox(),w=o.db.hasAtLeastOneBoxWithTitle(),T=await qe(g,x,o);if(Z.height=await Ye(g,T,y),X.insertComputerIcon(h,i),X.insertDatabaseIcon(h,i),X.insertClockIcon(h,i),C&&(Q.bumpVerticalPos(Z.boxMargin),w&&Q.bumpVerticalPos(y[0].textMaxHeight)),Z.hideUnusedParticipants===!0){let e=new Set;x.forEach(t=>{e.add(t.from),e.add(t.to)}),b=b.filter(t=>e.has(t))}let E=new Map(b.map((e,t)=>[g.get(e)?.name??e,t]));ze(h,g,_,b,0,x,!1);let D=await it(x,g,T,o);X.insertArrowHead(h,i),X.insertArrowCrossHead(h,i),X.insertArrowFilledHead(h,i),X.insertSequenceNumber(h,i),X.insertSolidTopArrowHead(h,i),X.insertSolidBottomArrowHead(h,i),X.insertStickTopArrowHead(h,i),X.insertStickBottomArrowHead(h,i),l===`neo`&&X.insertDropShadow(h,Z);function O(e,t){let n=Q.endActivation(e);n.starty+18>t&&(n.starty=t-6,t+=12),X.drawActivation(h,n,t,Z,Ue(e.from).length,o,E),Q.insert(n.startx,t-10,n.stopx,t)}n(O,`activeEnd`);let k=1,A=1,j=[],M=[],N=0;for(let t of x){let n,r,i;switch(t.type){case o.db.LINETYPE.NOTE:Q.resetVerticalPos(),r=t.noteModel,await Me(h,r,t.id);break;case o.db.LINETYPE.ACTIVE_START:Q.newActivation(t,h,g);break;case o.db.LINETYPE.CENTRAL_CONNECTION:Q.newActivation(t,h,g);break;case o.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:Q.newActivation(t,h,g);break;case o.db.LINETYPE.ACTIVE_END:O(t,Q.getVerticalPos());break;case o.db.LINETYPE.LOOP_START:$(D,t,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.LOOP_END:n=Q.endLoop(),await X.drawLoop(h,n,`loop`,Z,t),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.RECT_START:$(D,t,Z.boxMargin,Z.boxMargin,e=>Q.newLoop(void 0,e.message));break;case o.db.LINETYPE.RECT_END:n=Q.endLoop(),M.push(n),Q.models.addLoop(n),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos());break;case o.db.LINETYPE.OPT_START:$(D,t,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.OPT_END:n=Q.endLoop(),await X.drawLoop(h,n,`opt`,Z,t),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.ALT_START:$(D,t,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.ALT_ELSE:$(D,t,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case o.db.LINETYPE.ALT_END:n=Q.endLoop(),await X.drawLoop(h,n,`alt`,Z,t),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.PAR_START:case o.db.LINETYPE.PAR_OVER_START:$(D,t,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e)),Q.saveVerticalPos();break;case o.db.LINETYPE.PAR_AND:$(D,t,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case o.db.LINETYPE.PAR_END:n=Q.endLoop(),await X.drawLoop(h,n,`par`,Z,t),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.AUTONUMBER:k=t.message.start||k,A=t.message.step||A,t.message.visible?o.db.enableSequenceNumbers():o.db.disableSequenceNumbers();break;case o.db.LINETYPE.CRITICAL_START:$(D,t,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.CRITICAL_OPTION:$(D,t,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case o.db.LINETYPE.CRITICAL_END:n=Q.endLoop(),await X.drawLoop(h,n,`critical`,Z,t),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.BREAK_START:$(D,t,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.BREAK_END:n=Q.endLoop(),await X.drawLoop(h,n,`break`,Z,t),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;default:try{i=t.msgModel,i.starty=Q.getVerticalPos(),i.sequenceIndex=k,i.sequenceVisible=o.db.showSequenceNumbers(),i.id=t.id,i.from=t.from,i.to=t.to;let e=await Le(h,i);Ge(t,i,e,N,g,_,v),j.push({messageModel:i,lineStartY:e,msg:t}),Q.models.addMessage(i)}catch(t){e.error(`error while drawing message`,t)}}[o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN,o.db.LINETYPE.SOLID,o.db.LINETYPE.SOLID_TOP,o.db.LINETYPE.SOLID_BOTTOM,o.db.LINETYPE.STICK_TOP,o.db.LINETYPE.STICK_BOTTOM,o.db.LINETYPE.SOLID_TOP_DOTTED,o.db.LINETYPE.SOLID_BOTTOM_DOTTED,o.db.LINETYPE.STICK_TOP_DOTTED,o.db.LINETYPE.STICK_BOTTOM_DOTTED,o.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,o.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,o.db.LINETYPE.STICK_ARROW_TOP_REVERSE,o.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,o.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,o.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,o.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,o.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,o.db.LINETYPE.DOTTED,o.db.LINETYPE.SOLID_CROSS,o.db.LINETYPE.DOTTED_CROSS,o.db.LINETYPE.SOLID_POINT,o.db.LINETYPE.DOTTED_POINT,o.db.LINETYPE.BIDIRECTIONAL_SOLID,o.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(k+=A),N++}e.debug(`createdActors`,_),e.debug(`destroyedActors`,v),await Be(h,g,b,!1,i,o,E);for(let e of j)await Re(h,e.messageModel,e.lineStartY,o,e.msg,i);Z.mirrorActors&&await Be(h,g,b,!0,i,o,E),M.forEach(e=>X.drawBackgroundRect(h,e)),ce(h,g,b,Z);for(let e of Q.models.boxes){e.height=Q.getVerticalPos()-e.y,Q.insert(e.x,e.y,e.x+e.width,e.height);let t=Z.boxMargin*2;e.startx=e.x-t,e.starty=e.y-t*.25,e.stopx=e.startx+e.width+2*t,e.stopy=e.starty+e.height+t*.75,e.stroke=`rgb(0,0,0, 0.5)`,X.drawBox(h,e,Z)}C&&Q.bumpVerticalPos(Z.boxMargin);let P=Ve(h,g,b,f),{bounds:F}=Q.getBounds();F.startx===void 0&&(F.startx=0),F.starty===void 0&&(F.starty=0),F.stopx===void 0&&(F.stopx=0),F.stopy===void 0&&(F.stopy=0);let I=F.stopy-F.starty;I<P.maxHeight&&(I=P.maxHeight);let L=I+2*Z.diagramMarginY;Z.mirrorActors&&(L=L-Z.boxMargin+Z.bottomMarginAdj);let ee=F.stopx-F.startx;ee<P.maxWidth&&(ee=P.maxWidth);let R=ee+2*Z.diagramMarginX;S&&h.append(`text`).text(S).attr(`x`,(F.stopx-F.startx)/2-2*Z.diagramMarginX).attr(`y`,-25),m(h,L,R,Z.useMaxWidth);let te=S?40:0,ne=g.size&&l===`neo`?30:0;h.attr(`viewBox`,F.startx-Z.diagramMarginX+` -`+(Z.diagramMarginY+te)+` `+R+` `+(L+te+ne)),e.debug(`models:`,Q.models)},`draw`);async function qe(t,n,r){let i={};for(let e of n)if(t.get(e.to)&&t.get(e.from)){let n=t.get(e.to);if(e.placement===r.db.PLACEMENT.LEFTOF&&!n.prevActor||e.placement===r.db.PLACEMENT.RIGHTOF&&!n.nextActor)continue;let a=e.placement!==void 0,o=!a,s=a?Fe(Z):Pe(Z),c=e.wrap?C.wrapLabel(e.message,Z.width-2*Z.wrapPadding,s):e.message,l=(g(c)?await h(e.message,p()):C.calculateTextDimensions(c,s)).width+2*Z.wrapPadding;o&&e.from===n.nextActor?i[e.to]=v.getMax(i[e.to]||0,l):o&&e.from===n.prevActor?i[e.from]=v.getMax(i[e.from]||0,l):o&&e.from===e.to?(i[e.from]=v.getMax(i[e.from]||0,l/2),i[e.to]=v.getMax(i[e.to]||0,l/2)):e.placement===r.db.PLACEMENT.RIGHTOF?i[e.from]=v.getMax(i[e.from]||0,l):e.placement===r.db.PLACEMENT.LEFTOF?i[n.prevActor]=v.getMax(i[n.prevActor]||0,l):e.placement===r.db.PLACEMENT.OVER&&(n.prevActor&&(i[n.prevActor]=v.getMax(i[n.prevActor]||0,l/2)),n.nextActor&&(i[e.from]=v.getMax(i[e.from]||0,l/2)))}return e.debug(`maxMessageWidthPerActor:`,i),i}n(qe,`getMaxMessageWidthPerActor`);var Je=n(function(e){let t=0,n=Ie(Z);for(let r in e.links){let e=C.calculateTextDimensions(r,n).width+2*Z.wrapPadding+2*Z.boxMargin;t<e&&(t=e)}return t},`getRequiredPopupWidth`);async function Ye(e,t,n){let r=0;for(let t of e.keys()){let n=e.get(t);n.wrap&&(n.description=C.wrapLabel(n.description,Z.width-2*Z.wrapPadding,Ie(Z)));let i=g(n.description)?await h(n.description,p()):C.calculateTextDimensions(n.description,Ie(Z));n.width=n.wrap?Z.width:v.getMax(Z.width,i.width+2*Z.wrapPadding),n.height=n.wrap?v.getMax(i.height,Z.height):Z.height,r=v.getMax(r,n.height)}for(let n in t){let r=e.get(n);if(!r)continue;let i=e.get(r.nextActor);if(!i){let e=t[n]+Z.actorMargin-r.width/2;r.margin=v.getMax(e,Z.actorMargin);continue}let a=t[n]+Z.actorMargin-r.width/2-i.width/2;r.margin=v.getMax(a,Z.actorMargin)}let i=0;return n.forEach(t=>{let n=Pe(Z),r=t.actorKeys.reduce((t,n)=>t+=e.get(n).width+(e.get(n).margin||0),0),a=Z.boxMargin*8;r+=a,r-=2*Z.boxTextMargin,t.wrap&&(t.name=C.wrapLabel(t.name,r-2*Z.wrapPadding,n));let o=C.calculateTextDimensions(t.name,n);i=v.getMax(o.height,i);let s=v.getMax(r,o.width+2*Z.wrapPadding);if(t.margin=Z.boxTextMargin,r<s){let e=(s-r)/2;t.margin+=e}}),n.forEach(e=>e.textMaxHeight=i),v.getMax(r,Z.height)}n(Ye,`calculateActorMargins`);var Xe=n(async function(t,n,r){let i=n.get(t.from),a=n.get(t.to),o=i.x,s=a.x,c=t.wrap&&t.message,l=g(t.message)?await h(t.message,p()):C.calculateTextDimensions(c?C.wrapLabel(t.message,Z.width,Fe(Z)):t.message,Fe(Z)),u={width:c?Z.width:v.getMax(Z.width,l.width+2*Z.noteMargin),height:0,startx:i.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(u.width=c?v.getMax(Z.width,l.width):v.getMax(i.width/2+a.width/2,l.width+2*Z.noteMargin),u.startx=o+(i.width+Z.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(u.width=c?v.getMax(Z.width,l.width+2*Z.noteMargin):v.getMax(i.width/2+a.width/2,l.width+2*Z.noteMargin),u.startx=o-u.width+(i.width-Z.actorMargin)/2):t.to===t.from?(l=C.calculateTextDimensions(c?C.wrapLabel(t.message,v.getMax(Z.width,i.width),Fe(Z)):t.message,Fe(Z)),u.width=c?v.getMax(Z.width,i.width):v.getMax(i.width,Z.width,l.width+2*Z.noteMargin),u.startx=o+(i.width-u.width)/2):(u.width=Math.abs(o+i.width/2-(s+a.width/2))+Z.actorMargin,u.startx=o<s?o+i.width/2-Z.actorMargin/2:s+a.width/2-Z.actorMargin/2),c&&(u.message=C.wrapLabel(t.message,u.width-2*Z.wrapPadding,Fe(Z))),e.debug(`NM:[${u.startx},${u.stopx},${u.starty},${u.stopy}:${u.width},${u.height}=${t.message}]`),u},`buildNoteModel`),Ze=4,Qe=6,$e=n(function(e,t){let{CENTRAL_CONNECTION:n,CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i}=t.db.LINETYPE;return[n,r,i].includes(e.centralConnection)},`hasCentralConnection`),et=n(function(e,t,n){let{CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i,BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:o}=t.db.LINETYPE,s=0;return(e.centralConnection===r||e.centralConnection===i)&&(s+=Ze),(e.centralConnection===r||e.centralConnection===i)&&(e.type===a||e.type===o)&&(s+=n?0:-Qe),s},`calculateCentralConnectionOffset`),tt=n(function(e,t){let{SOLID_ARROW_TOP_REVERSE:n,SOLID_ARROW_TOP_REVERSE_DOTTED:r,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:a,STICK_ARROW_TOP_REVERSE:o,STICK_ARROW_TOP_REVERSE_DOTTED:s,STICK_ARROW_BOTTOM_REVERSE:c,STICK_ARROW_BOTTOM_REVERSE_DOTTED:l}=t.db.LINETYPE;return[n,r,i,a,o,s,c,l].includes(e.type)},`isReverseArrowType`),nt=n(function(e,t){let{BIDIRECTIONAL_SOLID:n,BIDIRECTIONAL_DOTTED:r}=t.db.LINETYPE;return[n,r].includes(e.type)},`isBidirectionalArrowType`),rt=n(function(e,t,r){let{look:i}=p();if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};let[a,o]=We(e.from,t),[s,c]=We(e.to,t),l=a<=s,u=l?o:a,d=l?s:c;i===`neo`&&(e.type!==r.db.LINETYPE.SOLID_OPEN&&(d+=l?-3:3),(e.type===r.db.LINETYPE.BIDIRECTIONAL_SOLID||e.type===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(u+=l?3:-3)),u+=et(e,r,l);let f=Math.abs(s-c)>2,m=n(e=>l?-e:e,`adjustValue`);e.from===e.to?d=u:(e.activate&&!f&&(d+=m(Z.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(d+=m(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(u-=m(3)));let h=[a,o,s,c],g=Math.abs(u-d);e.wrap&&e.message&&(e.message=C.wrapLabel(e.message,v.getMax(g+2*Z.wrapPadding,Z.width),Pe(Z)));let _=C.calculateTextDimensions(e.message,Pe(Z));return{width:v.getMax(e.wrap?0:_.width+2*Z.wrapPadding,g+2*Z.wrapPadding,Z.width),height:0,startx:u,stopx:d,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,h),toBounds:Math.max.apply(null,h)}},`buildMessageModel`),it=n(async function(t,n,r,i){let a={},o=[],s,c,l;for(let e of t){switch(e.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:o.push({id:e.id,msg:e.message,from:2**53-1,to:-(2**53-1),width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:e.message&&(s=o.pop(),a[s.id]=s,a[e.id]=s,o.push(s));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:s=o.pop(),a[s.id]=s;break;case i.db.LINETYPE.ACTIVE_START:{let t=n.get(e.from?e.from:e.to.actor),r=Ue(e.from?e.from:e.to.actor).length,i=t.x+t.width/2+(r-1)*Z.activationWidth/2,a={startx:i,stopx:i+Z.activationWidth,actor:e.from,enabled:!0};Q.activations.push(a)}break;case i.db.LINETYPE.ACTIVE_END:{let t=Q.activations.map(e=>e.actor).lastIndexOf(e.from);Q.activations.splice(t,1).splice(0,1)}break}e.placement===void 0?(l=rt(e,n,i),e.msgModel=l,l.startx&&l.stopx&&o.length>0&&o.forEach(t=>{if(s=t,l.startx===l.stopx){let t=n.get(e.from),r=n.get(e.to);s.from=v.getMin(t.x-l.width/2,t.x-t.width/2,s.from),s.to=v.getMax(r.x+l.width/2,r.x+t.width/2,s.to),s.width=v.getMax(s.width,Math.abs(s.to-s.from))-Z.labelBoxWidth}else s.from=v.getMin(l.startx,s.from),s.to=v.getMax(l.stopx,s.to),s.width=v.getMax(s.width,l.width)-Z.labelBoxWidth})):(c=await Xe(e,n,i),e.noteModel=c,o.forEach(e=>{s=e,s.from=v.getMin(s.from,c.startx),s.to=v.getMax(s.to,c.startx+c.width),s.width=v.getMax(s.width,Math.abs(s.from-s.to))-Z.labelBoxWidth}))}return Q.activations=[],e.debug(`Loop type widths:`,a),a},`calculateLoopBounds`),at={parser:F,get db(){return new te},renderer:{bounds:Q,drawActors:Be,drawActorsPopup:Ve,setConf:He,draw:Ke},styles:ne,init:n(e=>{e.sequence||={},e.wrap&&(e.sequence.wrap=e.wrap,c({sequence:{wrap:e.wrap}}))},`init`)};export{at as diagram};
158
- //# sourceMappingURL=sequenceDiagram-FGHM5R23-C88m3ajK.mjs.map
158
+ //# sourceMappingURL=sequenceDiagram-FGHM5R23-BgVYdPUE.mjs.map
@@ -0,0 +1 @@
1
+ import{_ as e,f as t,y as n}from"./server-lock-iLcBw_q0-DWu5z2Sp.mjs";export{t as markServerLockDraining,e as releaseServerLock,n as updateServerLockPort};
@@ -0,0 +1,2 @@
1
+ import"./dist-BB07_fNU.mjs";import{dirname as e,join as t,resolve as n}from"node:path";import{fileURLToPath as r}from"node:url";import{closeSync as i,existsSync as a,mkdirSync as o,openSync as s,readFileSync as c,unlinkSync as l,writeFileSync as u,writeSync as d}from"node:fs";import{homedir as f,hostname as p}from"node:os";import{randomUUID as m}from"node:crypto";function h(e){try{return process.kill(e,0),!0}catch(e){return!!(e&&typeof e==`object`&&`code`in e&&e.code===`EPERM`)}}function g(e){return!(typeof e!=`number`||!Number.isInteger(e)||e<2||e>2147483647)}const _=/^[A-Za-z0-9-]{8,64}$/;let v=null;function y(e){return t(e??f(),`.ok`,`machine-id`)}function b(t){if(t===void 0&&v!==null)return v;let n=y(t),r=null;try{let e=c(n,`utf-8`).trim();_.test(e)&&(r=e)}catch{}if(r===null){r=m();try{o(e(n),{recursive:!0}),u(n,`${r}\n`,{encoding:`utf-8`,mode:384})}catch(e){console.warn(`[machine-id] Failed to persist ${n} — using an ephemeral per-process id; lock ownership checks will fail closed (collision) instead of recognizing this machine: ${e instanceof Error?e.message:String(e)}`)}}return t===void 0&&(v=r),r}function x(){try{let t=n(e(r(import.meta.url)),`..`,`package.json`),i=JSON.parse(c(t,`utf-8`));if(typeof i.version==`string`&&i.version.length>0)return i.version}catch{}return`0.0.0-unknown`}const S=x(),C=1;var w=class extends Error{existing;lockPath;lockName;constructor(e,t,n){super(`OpenKnowledge ${n} already running on port ${e.port} (pid ${e.pid}, started ${e.startedAt}). Stop it first or use a different directory. Lock: ${t}`),this.name=`ProcessLockCollisionError`,this.existing=e,this.lockPath=t,this.lockName=n}};function T(e,t){return n(e,`${t}.lock`)}const E=new Map;function D(e){E.set(e,(E.get(e)??0)+1)}function O(e){let t=E.get(e);return t===void 0||t<=1?(E.delete(e),!0):(E.set(e,t-1),!1)}function k(e){return typeof e.machineId==`string`?e.machineId===b():e.hostname===p()}const A=new Set;let j=!1;function M(e){A.add(e),!j&&(j=!0,process.on(`exit`,()=>{for(let e of A)try{let t=JSON.parse(c(e,`utf-8`));if(t?.pid!==process.pid||typeof t.machineId==`string`&&t.machineId!==b()||t.machineId===void 0&&typeof t.hostname==`string`&&t.hostname!==p())continue;l(e)}catch{}}))}function N(e,t){try{let n=JSON.parse(c(e,`utf-8`));return n&&typeof n==`object`&&g(n.pid)?n:(console.warn(`${t} Corrupt lock file at ${e} — replacing`),null)}catch{return console.warn(`${t} Corrupt lock file at ${e} — replacing`),null}}function P(e){let{lockName:t,lockDir:n,metadata:r}=e,c=`[${t}-lock]`;o(n,{recursive:!0});let f=T(n,t),m={pid:process.pid,hostname:p(),port:r.port,startedAt:new Date().toISOString(),worktreeRoot:r.worktreeRoot,machineId:b(),...r.kind!==void 0&&{kind:r.kind},...r.parentPid!==void 0&&{parentPid:r.parentPid},...r.capabilities!==void 0&&{capabilities:r.capabilities},protocolVersion:r.protocolVersion??1,runtimeVersion:r.runtimeVersion??S},g=JSON.stringify(m,null,2);for(let e=0;e<3;e++){if(!a(f))try{let e=s(f,`wx`,384);try{d(e,g)}finally{i(e)}return D(f),M(f),F({lockName:t,lockDir:n,lockPath:f})}catch(e){if(e.code!==`EEXIST`)throw e}let e=N(f,c);if(e){if(k(e)&&e.pid===process.pid)return u(f,g,{encoding:`utf-8`,mode:384}),D(f),M(f),F({lockName:t,lockDir:n,lockPath:f});if(h(e.pid))throw new w(e,f,t);console.warn(`${c} Stale lock detected (pid=${e.pid}, host=${e.hostname}) — replacing`)}try{l(f)}catch{}}throw Error(`${c} Failed to acquire ${f} after 3 attempts (concurrent acquire contention).`)}function F(e){let{lockName:t,lockDir:n,lockPath:r}=e;return{lockPath:r,release:()=>V({lockName:t,lockDir:n}),updatePort:e=>I({lockName:t,lockDir:n,port:e})}}function I(e){let{lockName:t,lockDir:n,port:r}=e,i=`[${t}-lock]`,o=T(n,t);if(!a(o)){console.warn(`${i} Lock file missing at ${o} during port update — skipping`);return}let s;try{let e=JSON.parse(c(o,`utf-8`));if(!e||typeof e!=`object`||!g(e.pid)){console.warn(`${i} Corrupt lock at ${o} during port update — skipping`);return}s=e}catch{console.warn(`${i} Unreadable lock at ${o} during port update — skipping`);return}if(s.pid===process.pid&&k(s)){s.port=r;try{u(o,JSON.stringify(s,null,2),{encoding:`utf-8`,mode:384})}catch(e){console.warn(`${i} Failed to update port in ${o}: ${e instanceof Error?e.message:String(e)}`)}}}function L(e){let{lockName:t,lockDir:n}=e,r=`[${t}-lock]`,i=T(n,t);if((E.get(i)??0)>1)return;let a;try{let e=JSON.parse(c(i,`utf-8`));if(!e||typeof e!=`object`||!g(e.pid)){console.warn(`${r} Corrupt lock at ${i} during draining mark — skipping`);return}a=e}catch(e){e.code!==`ENOENT`&&console.warn(`${r} Unreadable lock at ${i} during draining mark — skipping: ${e instanceof Error?e.message:String(e)}`);return}if(a.pid===process.pid&&k(a)&&a.draining!==!0){a.draining=!0;try{u(i,JSON.stringify(a,null,2),{encoding:`utf-8`,mode:384})}catch(e){console.warn(`${r} Failed to mark ${i} draining: ${e instanceof Error?e.message:String(e)}`)}}}function R(e){let{lockName:t,lockDir:n}=e,r=T(n,t);if(!a(r))return null;let i;try{let e=JSON.parse(c(r,`utf-8`));if(!e||typeof e!=`object`||!g(e.pid))return null;i=e}catch{return null}if(!k(i))return null;if(!h(i.pid)){try{l(r)}catch{}return null}return i}function z(e){let{lockName:t,lockDir:n}=e,r=T(n,t);if(!a(r))return{status:`absent`};let i;try{i=JSON.parse(c(r,`utf-8`))}catch{return{status:`incompatible`,reason:`corrupt`,raw:void 0}}if(!i||typeof i!=`object`)return{status:`incompatible`,reason:`corrupt`,raw:i};let o=i;if(!g(o.pid)||typeof o.hostname!=`string`||typeof o.port!=`number`||typeof o.startedAt!=`string`||typeof o.worktreeRoot!=`string`)return{status:`incompatible`,reason:`corrupt`,raw:i};let s={pid:o.pid,hostname:o.hostname,port:o.port,startedAt:o.startedAt,worktreeRoot:o.worktreeRoot,machineId:typeof o.machineId==`string`?o.machineId:void 0,draining:o.draining===!0?!0:void 0,protocolVersion:typeof o.protocolVersion==`number`?o.protocolVersion:void 0,runtimeVersion:typeof o.runtimeVersion==`string`?o.runtimeVersion:void 0};if(!k(s))return{status:`stale`,lock:s};if(!h(s.pid)){try{l(r)}catch{}return{status:`stale`,lock:s}}return s.protocolVersion===void 0||s.runtimeVersion===void 0?{status:`incompatible`,reason:`missing-fields`,raw:i}:{status:`live`,lock:s}}async function B(e){let{lockName:t,lockDir:n}=e,r=e.timeoutMs??1e4,i=e.pollIntervalMs??100,a=e.readLock??(()=>R({lockName:t,lockDir:n})),o=e.sleep??(e=>new Promise(t=>setTimeout(t,e))),s=a();if(s===null||s.draining!==!0)return`no-drain`;let c=Date.now()+r;for(;Date.now()<c;){await o(i);let e=a();if(e===null)return`released`;if(e.draining!==!0)return`no-drain`}return`timeout`}function V(e){let{lockName:t,lockDir:n,deferUnlinkToExit:r=!1}=e,i=`[${t}-lock]`,o=T(n,t);if(O(o)){if(r){L({lockName:t,lockDir:n});return}if(a(o))try{let e=JSON.parse(c(o,`utf-8`));if(!e||typeof e!=`object`||typeof e.pid!=`number`||e.pid!==process.pid||!k(e))return;l(o),A.delete(o)}catch(e){console.warn(`${i} Failed to release ${o}: ${e instanceof Error?e.message:String(e)}`)}}}var H=class extends w{constructor(e,t){super(e,t,`server`),this.name=`ServerLockCollisionError`}};function U(e,t){try{return P({lockName:`server`,lockDir:e,metadata:t}).lockPath}catch(e){throw e instanceof w&&e.lockName===`server`?new H(e.existing,e.lockPath):e}}function W(e,t){I({lockName:`server`,lockDir:e,port:t})}function G(e){return R({lockName:`server`,lockDir:e})}function K(e,t){V({lockName:`server`,lockDir:e,...t})}function q(e){L({lockName:`server`,lockDir:e})}function J(e,t){return B({lockName:`server`,lockDir:e,...t})}export{K as _,P as a,J as b,h as c,L as d,q as f,V as g,G as h,H as i,g as l,z as m,S as n,U as o,R as p,C as r,b as s,w as t,T as u,I as v,W as y};
2
+ //# sourceMappingURL=server-lock-iLcBw_q0-DWu5z2Sp.mjs.map
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-ByieFnhr.mjs";import{t as e}from"./chunk-XKQRETAK-EkIIjUUl.mjs";export{e as sha1sumCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-ByieFnhr.mjs";import{t as e}from"./chunk-5V6VZH6T-CsG6wUhk.mjs";export{e as sha256sumCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-ByieFnhr.mjs";import"./chunk-5QMZ5MUS-DvwGjmAW.mjs";import"./chunk-A5O5YHGN-0FmmnDn4.mjs";import{n as e}from"./chunk-GOV5EKKI-BFLTyBpR.mjs";export{e as sleepCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-ByieFnhr.mjs";import{n as e}from"./chunk-KMEYNNUA-maIN40sk.mjs";export{e as sortCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-ByieFnhr.mjs";import{n as e}from"./chunk-MYE6AGBJ-BejewWl1.mjs";export{e as split};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-ByieFnhr.mjs";import"./chunk-5QMZ5MUS-DvwGjmAW.mjs";import"./chunk-A5O5YHGN-0FmmnDn4.mjs";import"./chunk-24IMIIXA-ByE3n7F5.mjs";import{t as e}from"./chunk-XKWWSDBF-B1eAKd2w.mjs";export{e as sqlite3Command};
@@ -0,0 +1,21 @@
1
+ import{s as e}from"./chunk-C94x7I9S.mjs";import{Yo as t,bn as n}from"./dist-BB07_fNU.mjs";import{c as r,l as i,s as a,u as o}from"./server-lock-iLcBw_q0-DWu5z2Sp.mjs";import{Aa as s,Fr as c,Oa as l,Pr as u,Tn as d,dn as f,sa as p,si as m,xn as h}from"./dist-C_-7dTgR.mjs";import{t as g}from"./yazl-DFMxUgKn.mjs";import{t as _}from"./esm-PWRRAk-U.mjs";import"./gh-detect-C0TUrJxp.mjs";import{E as v,S as y,T as b,_ as ee,b as te,o as x,v as S,w as C}from"./init-CXlRbgEZ.mjs";import{n as ne}from"./constants-p-XvThBy.mjs";import{t as w}from"./is-object-DhiFit5j.mjs";import{_ as T,d as E,i as D,v as O}from"./write-project-skill-BwRqNV9s.mjs";import"./loader-DZ60wqGI.mjs";import{c as re}from"./colors-DWZN3WbY.mjs";import"./preview-Ch5Z_ly3.mjs";import{execSync as ie,spawnSync as ae}from"node:child_process";import{basename as k,dirname as A,isAbsolute as oe,join as j,relative as se,resolve as M,sep as ce}from"node:path";import{cpSync as le,createWriteStream as ue,existsSync as N,lstatSync as de,mkdirSync as P,mkdtempSync as fe,readFileSync as F,readdirSync as I,readlinkSync as pe,rmSync as L,statSync as me,writeFileSync as R}from"node:fs";import{arch as he,freemem as ge,homedir as _e,hostname as ve,platform as ye,release as be,tmpdir as xe,totalmem as Se,type as Ce,uptime as we}from"node:os";import{createHash as z}from"node:crypto";import{readFile as B,realpath as V}from"node:fs/promises";const Te=[{name:`macos-home-path`,regex:/\/Users\/[^/]+\//g,replacement:`~/`},{name:`linux-home-path`,regex:/\/home\/[^/]+\//g,replacement:`~/`},{name:`github-pat`,regex:/\b(ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9]{36,}\b/g,replacement:`[REDACTED-GH-PAT]`},{name:`aws-access-key`,regex:/\b(AKIA|ASIA|ABIA)[A-Z2-7]{16}\b/g,replacement:`[REDACTED-AWS-KEY]`},{name:`anthropic-key`,regex:/\bsk-ant-api03-[A-Za-z0-9_-]{20,}\b/g,replacement:`[REDACTED-ANTHROPIC]`},{name:`openai-key`,regex:/\bsk-[A-Za-z0-9]{20,}\b/g,replacement:`[REDACTED-OPENAI]`},{name:`bearer-token`,regex:/([Aa]uthorization:\s*[Bb]earer\s+)\S+/g,replacement:`$1[REDACTED]`},{name:`jwt`,regex:/eyJ[A-Za-z0-9_-]{8,}\.eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g,replacement:`[REDACTED-JWT]`},{name:`url-credentials`,regex:/:\/\/[^/\s:@]+:[^/\s:@]+@/g,replacement:`://[REDACTED]@`}],Ee=Te.map(e=>e.name);function H(e){let t=new Set,n=0;return{redacted:e.split(`
2
+ `).map(e=>{let r=e;for(let{name:e,regex:i,replacement:a}of Te)i.lastIndex=0,i.test(r)&&(t.add(e),n++,i.lastIndex=0,r=r.replace(i,a));return r}).join(`
3
+ `),patterns:[...t],lineCount:n}}function De(){return j(_e(),`.ok`,`bug-reports`)}function Oe(e=new Date){let t=e.toISOString().replace(/[:.]/g,`-`);return j(De(),`${t}-bugreport.zip`)}function ke(e,t){let n=j(e,`.ok`,`config.yml`);if(N(n))try{let e=F(n,`utf8`).match(/^\s*name:\s*['"]?(.+?)['"]?\s*$/m);if(e?.[1])return e[1]}catch(e){t?.warn({configPath:n,err:e instanceof Error?e.message:String(e)},`bug-report: failed to read .ok/config.yml for project slug; using path-hash fallback`)}return N(j(e,`.ok`))?z(`sha256`).update(M(e)).digest(`hex`).slice(0,12):null}function Ae(){let e={timestamp:new Date().toISOString(),platform:ye(),osType:Ce(),osRelease:be(),hostname:`[redacted]`,uptime:we(),freeMem:ge(),totalMem:Se(),nodeVersion:process.version,bunVersion:process.versions.bun??null,v8Version:process.versions.v8??null,pid:process.pid};try{e.macosVersion=ie(`sw_vers -productVersion 2>/dev/null`,p({encoding:`utf8`})).trim()}catch{}try{let t=j(__dirname,`..`,`..`,`package.json`);N(t)&&(e.okVersion=JSON.parse(F(t,`utf8`)).version)}catch{}return e}function je(e,t){if(!N(t))return{files:[]};let n=I(t).filter(e=>e.endsWith(`.log`)||/\.log\.\d+$/.test(e)).map(e=>j(t,e));if(e&&n.length>0){let t=n.filter(t=>{try{return F(t,`utf8`).includes(`"project":"${e}"`)}catch{return!0}});t.length>0&&(n=t)}return{files:n}}function Me(e){let t=j(e,`.ok`,`local`);return N(t)?{files:[`server.lock`,`last-spawn-error.log`].map(e=>j(t,e)).filter(e=>N(e))}:{files:[]}}function Ne(e){let t=j(e,`.ok`,`local`,`logs`);return N(t)?{files:[`server-current.jsonl`,`server-prev.jsonl`].map(e=>j(t,e)).filter(e=>N(e))}:{files:[]}}function Pe(e){if(e.redact){let{redacted:t,patterns:n,lineCount:r}=H(e.content);e.zipfile.addBuffer(Buffer.from(t,`utf8`),e.name),e.bundleFiles.push(e.name),n.length>0&&e.redactions.push({file:e.name,lineCount:r,patterns:n})}else e.zipfile.addBuffer(Buffer.from(e.content,`utf8`),e.name),e.bundleFiles.push(e.name)}function U(e){for(let t of e.files)try{Pe({zipfile:e.zipfile,name:`${e.prefix}/${k(t)}`,content:F(t,`utf8`),redact:e.redact,bundleFiles:e.bundleFiles,redactions:e.redactions})}catch(n){e.logger?.warn({file:t,prefix:e.prefix,err:n instanceof Error?n.message:String(n)},`bug-report: skipped unreadable file`)}}async function Fe(t){let{redact:n,outputPath:r,logger:i}=t,a=t.userLogsDir??j(_e(),`.ok`,`logs`),o=t.projectDir?ke(t.projectDir,i):null;P(A(r),{recursive:!0}),i?.info({projectSlug:o},`gathering diagnostic data`);let s=Ae();s.desktop=t.desktop??null;let{files:c}=je(o,a),{files:l}=t.projectDir?Me(t.projectDir):{files:[]},{files:u}=t.projectDir?Ne(t.projectDir):{files:[]};i?.info({logFileCount:c.length,lockFileCount:l.length,localSinkFileCount:u.length},`files collected`);let d=[],f=[],{ZipFile:p}=await import(`./yazl-B1RwDQQs.mjs`).then(t=>e(t.default,1)),m=new p;U({zipfile:m,files:c,prefix:`logs`,redact:n,bundleFiles:f,redactions:d,logger:i}),U({zipfile:m,files:l,prefix:`lockdir`,redact:n,bundleFiles:f,redactions:d,logger:i}),U({zipfile:m,files:u,prefix:`local-logs`,redact:n,bundleFiles:f,redactions:d,logger:i});for(let e of t.extraFiles??[])try{let t=F(e.sourcePath),n=`extra/${e.zipName??k(e.sourcePath)}`;m.addBuffer(t,n),f.push(n)}catch(t){i?.warn({sourcePath:e.sourcePath,err:t},`extra file unreadable; omitted from bundle`)}t.note&&Pe({zipfile:m,name:`note.txt`,content:t.note,redact:n,bundleFiles:f,redactions:d});let h=JSON.stringify(s,null,2);m.addBuffer(Buffer.from(h,`utf8`),`sysinfo.json`),f.push(`sysinfo.json`);let g={generatedAt:new Date().toISOString(),disciplineVersion:`1.0.0`,projectSlug:o,files:f,redactions:d,sysinfo:s};m.addBuffer(Buffer.from(JSON.stringify(g,null,2),`utf8`),`MANIFEST.json`);let _=d.reduce((e,t)=>e+t.lineCount,0),v=[`# Bug Report Bundle`,``,`Generated: ${g.generatedAt}`,`Project: ${o??`(unscoped)`}`,`Discipline version: ${g.disciplineVersion}`,``,`## Contents`,``,...f.map(e=>`- ${e}`),``,`## Privacy`,``,...n?[`This bundle was auto-redacted before packaging.`,`Patterns checked: ${Ee.join(`, `)}`,_>0?`${_} line(s) were scrubbed across ${d.length} file(s).`:`No redactions were needed.`,`See MANIFEST.json for the full redaction audit report.`,``,`This bundle is safe to attach to a GitHub issue.`]:[`Redaction was disabled for this bundle; file contents are unmodified.`]].join(`
4
+ `);m.addBuffer(Buffer.from(v,`utf8`),`README.md`),m.end();let y=ue(r);return m.outputStream.pipe(y),await new Promise((e,t)=>{y.on(`close`,e),y.on(`error`,t)}),i?.info({bundlePath:r,fileCount:f.length,redactionCount:_},`bundle written`),{zipPath:r,summary:{projectSlug:o,files:f,redactions:d,redactedLineCount:_,generatedAt:g.generatedAt}}}const Ie=new Set([`doc.name`]);function Le(e){return`doc:${z(`blake2b512`,{outputLength:32}).update(e).digest(`hex`).slice(0,8)}`}function Re(e,t,n){let r=e.docNameMap[n];if(r===void 0){e.docNameMap[n]=t;return}if(r===t)return;let i=e.docNameCollisions[n];i?i.includes(t)||i.push(t):e.docNameCollisions[n]=[t]}function ze(e,t){let n=t.originalToHashed.get(e);if(n!==void 0)return n;let r=Le(e);return t.originalToHashed.set(e,r),Re(t,e,r),r}function W(e,t){return t.length===0||!e.includes(t)?e:e.split(t).join(`<CONTENT_DIR>`)}function G(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function K(e,t){if(typeof e==`string`)return W(e,t.contentDir);if(Array.isArray(e))return e.map(e=>K(e,t));if(!G(e))return e;let n=typeof e.key==`string`&&Ie.has(e.key)&&G(e.value)&&typeof e.value.stringValue==`string`?e.value.stringValue:null,r={};for(let[i,a]of Object.entries(e))if(n!==null&&i===`value`&&G(a)){let e=ze(n,t);r[i]={...a,stringValue:e}}else Ie.has(i)&&typeof a==`string`?r[i]=ze(a,t):r[i]=K(a,t);return r}function Be(e,t){if(t.originalToHashed.size===0)return e;let n=Array.from(t.originalToHashed.entries()).sort(([e],[t])=>t.length-e.length),r=e;for(let[e,t]of n)e.length!==0&&r.includes(e)&&(r=r.split(e).join(t));return r}function Ve(e,t){let n=F(e,`utf-8`);if(n.length===0)return;let r=n.endsWith(`
5
+ `),i=n.split(`
6
+ `),a=[];for(let e=0;e<i.length;e++){let n=i[e]??``;if(!(e===i.length-1&&n===``)){if(n.length===0){a.push(``);continue}try{let e=K(JSON.parse(n),t);a.push(JSON.stringify(e))}catch{a.push(n)}}}R(e,r?`${a.join(`
7
+ `)}\n`:a.join(`
8
+ `))}function He(e,t){let n=F(e,`utf-8`);if(n.trim().length!==0)try{let r=K(JSON.parse(n),t),i=n.endsWith(`
9
+ `)?`
10
+ `:``;R(e,`${JSON.stringify(r,null,2)}${i}`)}catch{let r=Be(W(n,t.contentDir),t);r!==n&&R(e,r)}}function Ue(e,t){let n=F(e,`utf-8`),r=W(n,t.contentDir);r!==n&&R(e,r)}function We(e){try{return I(e,{withFileTypes:!0}).filter(e=>e.isFile()).map(t=>j(e,t.name))}catch{return[]}}const Ge=new Set([`agent-presence.json`,`runtime.json`]);function Ke(e){let t={contentDir:e.contentDir,docNameMap:{},originalToHashed:new Map,docNameCollisions:{}};for(let n of[`telemetry`,`logs`,`process`])for(let r of We(j(e.stagingDir,n)))r.endsWith(`.jsonl`)?Ve(r,t):r.endsWith(`.json`)?He(r,t):Ue(r,t);for(let n of We(j(e.stagingDir,`state`))){let e=k(n);Ge.has(e)?He(n,t):Ue(n,t)}return{docNameMap:t.docNameMap,docNameCollisions:t.docNameCollisions}}var qe=t(),Je=e(g(),1);const Ye=[`.ok`,`local`,`telemetry`],Xe=[`.ok`,`local`,`logs`],Ze=`spans-current.jsonl`,Qe=`spans-prev.jsonl`,$e=`server-current.jsonl`,et=`server-prev.jsonl`;function tt(e){return j(e,...Ye,Ze)}function nt(e){return j(e,...Ye,Qe)}function rt(e){return j(e,...Xe,$e)}function it(e){return j(e,...Xe,et)}async function at(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-presence`,{signal:AbortSignal.timeout(1e3)});return t.ok?await t.text():null}catch{return null}}function ot(e){let t=j(e,`.git`,`ok`);if(!N(t))return null;let n=ae(`git`,[`-C`,t,`log`,`--oneline`,`-50`],p({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function st(){let e=process.env.OK_DESKTOP_VERSION,t=process.env.OK_DESKTOP_PACKAGED,n=process.env.OK_DESKTOP_CHANNEL;return e===void 0||t===void 0||n===void 0?null:{electronVersion:e,packaged:t===`1`||t.toLowerCase()===`true`,channel:n}}function ct(){return{nodeVersion:process.version,platform:ye(),arch:he()}}function lt(){return process.env.OTEL_SDK_DISABLED===`false`}function q(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ut(e){if(!N(e))return{};let t;try{t=(0,qe.parse)(F(e,`utf-8`))}catch(t){return console.warn(`[ok diagnose bundle] failed to parse ${e} for manifest config; manifest will report schema defaults. Reason: ${t instanceof Error?t.message:String(t)}`),{}}if(!q(t))return{};let n=t.telemetry;if(!q(n))return{};let r=n.localSink;return q(r)?r:{}}function dt(e){return typeof e==`boolean`?e:void 0}function ft(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function J(e){if(q(e))return ft(e.maxBytes)}function pt(e){let t=ut(s(`project`,e)),n=ut(s(`project-local`,e));return{enabled:dt(n.enabled)??dt(t.enabled)??!0,spansMaxBytes:J(n.spans)??J(t.spans)??52428800,logsMaxBytes:J(n.logs)??J(t.logs)??26214400}}function mt(e){return z(`sha256`).update(e).digest(`hex`)}function ht(e){let t=F(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}function gt(e){let t=F(e,`utf-8`),n=`"doc.name"`,r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+10);return r}function Y(e,t){return N(e)?(P(A(t),{recursive:!0}),le(e,t),!0):!1}function _t(e){let t=[],n=e=>{let r=I(e,{withFileTypes:!0});for(let i of r){let r=j(e,i.name);i.isDirectory()?n(r):i.isFile()&&t.push(r)}};return n(e),t.sort()}const vt=new Set([`.jsonl`]);function yt(e){let t=e.lastIndexOf(`.`);return t===-1?!1:vt.has(e.slice(t))}const bt=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`]);function xt(e){let t=e.lastIndexOf(`.`);return t===-1?!1:bt.has(e.slice(t))}function St(e){let t=[];for(let n of _t(e)){let r=Ct(e,n);if(!xt(r))continue;let{redacted:i,patterns:a,lineCount:o}=H(F(n,`utf-8`));a.length!==0&&(R(n,i),t.push({file:r,lineCount:o,patterns:a}))}return{redactions:t,redactedLineCount:t.reduce((e,t)=>e+t.lineCount,0)}}function Ct(e,t){return se(e,t).split(ce).join(`/`)}async function wt(e){let t=M(e.contentDir),r=M(e.projectDir??e.contentDir),i=e.deps??{},a=i.fetchAgentPresence??at,o=i.readShadowHead??ot,s=i.now??(()=>new Date),c=i.okVersion??(()=>ne),l=i.readDesktopEnv??st,u=i.readRuntime??ct,d=i.isOtlpPushEnabled??lt,f=fe(j(xe(),`ok-bundle-`));try{P(j(f,`telemetry`),{recursive:!0}),P(j(f,`logs`),{recursive:!0}),P(j(f,`state`),{recursive:!0}),Y(tt(r),j(f,`telemetry`,Ze)),Y(nt(r),j(f,`telemetry`,Qe)),Y(rt(r),j(f,`logs`,$e)),Y(it(r),j(f,`logs`,et));let p=j(r,`.ok`,`local`),m=j(p,`server.lock`),h=`not-running`,g=`no server.lock`,_=null;if(N(m)){Y(m,j(f,`state`,`server.lock`));try{let e=F(m,`utf-8`),t=JSON.parse(e);typeof t.port==`number`?_=t.port:g=`lock present but no port`}catch{g=`lock present but unparseable`}}if(_!==null){let e=await a(_);e===null?g=`agent-presence endpoint at :${_} unreachable`:(R(j(f,`state`,`agent-presence.json`),e),h=`running`,g=``)}let v=o(t);v!==null&&R(j(f,`state`,`shadow-head.txt`),v),Y(j(p,`last-spawn-error.log`),j(f,`state`,`last-spawn-error.log`)),Y(j(p,n),j(f,`state`,n));let y=u(),b=l(),ee={ok:{version:c(),nodeVersion:y.nodeVersion,platform:y.platform,arch:y.arch},host:{desktop:b}};R(j(f,`state`,`runtime.json`),`${JSON.stringify(ee,null,2)}\n`);let te=h===`running`?`running
11
+ `:`not-running (${g})\n`;if(R(j(f,`state`,`server-status.txt`),te),e.processDir&&N(e.processDir)){let t=j(f,`process`);P(t,{recursive:!0}),le(e.processDir,t,{recursive:!0})}let x=null;e.redact===!0&&(x=Ke({stagingDir:f,contentDir:t})),e.note&&R(j(f,`note.txt`),e.note);let S=null;e.scrubSecrets===!0&&(S=St(f));for(let t of e.extraFiles??[])Y(t.sourcePath,j(f,`extra`,t.zipName??k(t.sourcePath)))||i.logger?.warn({sourcePath:t.sourcePath},`extra file missing; omitted from bundle`);let C=pt(r),ne=_t(f),w=[],T=0,E=0;for(let e of ne){let t=Ct(f,e),n=me(e).size,r=yt(t)?ht(e):0;w.push({path:t,bytes:n,lines:r}),T+=n,t.startsWith(`telemetry/`)&&yt(t)&&(E+=gt(e))}let D=x===null?{applied:!1,docNameMapSidecar:null}:Object.keys(x.docNameCollisions).length>0?{applied:!0,docNameMapSidecar:null,docNameCollisions:x.docNameCollisions}:{applied:!0,docNameMapSidecar:null};S!==null&&(D.secretScrub=S);let O={schemaVersion:1,createdAt:s().toISOString(),ok:{version:c(),nodeVersion:y.nodeVersion,platform:y.platform,arch:y.arch},host:{desktop:b},contentDir:{pathSha256:mt(t),absolutePath:x===null?t:`<CONTENT_DIR>`},telemetry:{localSink:C,otlpPushEnabled:d()},redaction:D,serverStatus:h,files:w};R(j(f,`manifest.json`),`${JSON.stringify(O,null,2)}\n`);let re=ne.some(e=>{try{return F(e,`utf-8`).includes(t)}catch{return!1}}),ie={totalBytes:T,fileCount:w.length,docNameCount:E,contentDirVisible:re,redacted:x!==null},ae=!1;return{stagingDir:f,manifest:O,summary:ie,redactionMapPayload:x===null?null:{docNameMap:x.docNameMap,docNameCollisions:x.docNameCollisions},cleanup:()=>{ae||(ae=!0,L(f,{recursive:!0,force:!0}))}}}catch(e){throw L(f,{recursive:!0,force:!0}),e}}async function Tt(e){let{collected:t,outputPath:n}=e,r=A(n);if(!N(r))throw Error(`ok diagnose bundle: parent directory does not exist: ${r}. Create it or pass --out with an existing parent.`);if(t.redactionMapPayload!==null){let e=`${k(n,`.zip`)}.docnames.json`,r={...t.manifest,redaction:{...t.manifest.redaction,applied:!0,docNameMapSidecar:e}};R(j(t.stagingDir,`manifest.json`),`${JSON.stringify(r,null,2)}\n`)}let i=new Je.ZipFile,a=_t(t.stagingDir);for(let e of a){let n=Ct(t.stagingDir,e);i.addFile(e,n)}i.end(),t.redactionMapPayload!==null&&R(j(r,`${k(n,`.zip`)}.docnames.json`),`${JSON.stringify({docNameMap:t.redactionMapPayload.docNameMap,docNameCollisions:t.redactionMapPayload.docNameCollisions},null,2)}\n`,{mode:384});let o=ue(n);return i.outputStream.pipe(o),await new Promise((e,t)=>{o.on(`close`,e),o.on(`error`,t),i.outputStream.on(`error`,t)}),n}function Et(e,t){let n=j(e,`.ok`,`config.yml`);if(N(n))try{let t=(0,qe.parse)(F(n,`utf-8`)),r=w(t)?t.content:void 0,i=w(r)?r.dir:void 0;if(typeof i==`string`&&i.length>0)return M(e,i)}catch(e){t?.warn({configPath:n,err:e instanceof Error?e.message:String(e)},`bug-report: failed to read .ok/config.yml; falling back to project root as content dir`)}return M(e)}async function Dt(e,t,n){let r=await wt({contentDir:Et(t,e.logger),projectDir:t,redact:e.redact,scrubSecrets:e.redact,note:e.note,extraFiles:e.extraFiles,deps:{readDesktopEnv:n,logger:e.logger}});try{P(A(e.outputPath),{recursive:!0}),await Tt({collected:r,outputPath:e.outputPath});let n=r.manifest.redaction.secretScrub;return{zipPath:e.outputPath,summary:{level:`full`,systemWide:!1,projectSlug:ke(t,e.logger),files:r.manifest.files.map(e=>e.path),redactions:n?.redactions??[],redactedLineCount:n?.redactedLineCount??0,generatedAt:r.manifest.createdAt}}}finally{r.cleanup()}}async function Ot(e){let{projectDir:t}=e,n=e.readDesktopEnv??st;if(e.level===`full`&&t!==void 0)return Dt(e,t,n);let{zipPath:r,summary:i}=await Fe({projectDir:t,redact:e.redact,outputPath:e.outputPath,userLogsDir:e.userLogsDir,logger:e.logger,note:e.note,extraFiles:e.extraFiles,desktop:n()});return{zipPath:r,summary:{level:e.level,systemWide:t===void 0,projectSlug:i.projectSlug,files:i.files,redactions:i.redactions,redactedLineCount:i.redactedLineCount,generatedAt:i.generatedAt}}}function X(e,t,n={}){let s=o(e,t);if(!N(s))return{status:`missing`,lockPath:s};let c;try{c=JSON.parse(F(s,`utf-8`))}catch{return{status:`corrupt`,lockPath:s}}if(!c||typeof c!=`object`||!i(c.pid))return{status:`corrupt`,lockPath:s};let l=c;if(!(n.isAlive??r)(l.pid))return{status:`dead-pid`,lockPath:s,lock:l};if(typeof l.machineId==`string`)return l.machineId===(n.machineId??a())?{status:`alive`,lockPath:s,lock:l}:{status:`foreign-host`,lockPath:s,lock:l};let u=n.host??ve();return l.hostname===u?{status:`alive`,lockPath:s,lock:l}:{status:`foreign-host`,lockPath:s,lock:l}}function kt(e){return e.replace(/:\d+$/,``)}function At(e){let t=e.trim();if(!t)return null;{let e=/^https?:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`https`,hostname:kt(e[1]),owner:e[2],name:e[3]}}{let e=/^ssh:\/\/(?:[\w.-]+@)?([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`ssh`,hostname:kt(e[1]),owner:e[2],name:e[3]}}{let e=/^git:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:kt(e[1]),owner:e[2],name:e[3]}}{let e=/^(?:[\w.-]+@)?([\w.-]+):([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e?.[1].includes(`.`)||e&&t.startsWith(`git@`))return{protocol:`ssh`,hostname:e[1],owner:e[2],name:e[3]}}{let e=/^git:([\w.-]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:e[1],owner:e[2],name:e[3]}}if(!t.includes(`://`)&&!t.includes(`@`)&&!t.startsWith(`/`)){let e=/^([\w.-]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e)return{protocol:`https`,hostname:`github.com`,owner:e[1],name:e[2]}}return null}function jt(e){let t;try{t=new URL(e)}catch{return null}if(t.hostname!==`github.com`&&t.hostname!==`www.github.com`)return null;let n=t.pathname.split(`/`).filter(e=>e.length>0);if(n.length<5||n[2]!==`blob`)return null;let r,i,a,o;try{r=decodeURIComponent(n[0]),i=decodeURIComponent(n[1]),a=decodeURIComponent(n[3]),o=n.slice(4).map(e=>decodeURIComponent(e))}catch{return null}return!r||!i||!a||o.length===0||o.some(e=>e.length===0)?null:{owner:r,repo:i,branch:a,path:o.join(`/`)}}function Mt(e){let t;try{t=new URL(e)}catch{return null}if(t.hostname!==`github.com`&&t.hostname!==`www.github.com`)return null;let n=t.pathname.split(`/`);if(n.length<5||n[0]!==``||n[3]!==`tree`)return null;let r=n.slice(5);r.length===1&&r[0]===``&&r.pop();let i,a,o,s;try{i=decodeURIComponent(n[1]),a=decodeURIComponent(n[2]),o=decodeURIComponent(n[4]),s=r.map(e=>decodeURIComponent(e))}catch{return null}return!i||!a||!o||s.some(e=>e.length===0)?null:{owner:i,repo:a,branch:o,path:s.join(`/`)}}function Nt(e){let t=jt(e);if(t)return{kind:`doc`,...t};let n=Mt(e);return n?{kind:`folder`,...n}:null}const Pt=`# >>> open-knowledge cli >>>`,Ft=`# <<< open-knowledge cli <<<`,It=/^# >>> open-knowledge cli >>>\n[\s\S]*?^# <<< open-knowledge cli <<<\n?/m;function Lt(e){return j(e,`Library`,`Application Support`,`OpenKnowledge`,`path-install.json`)}const Rt={existsSync:e=>N(e),readFileSync:(e,t)=>F(e,t),lstatSync:e=>de(e),readlinkSync:e=>pe(e)};function zt(e,t=Rt){let n=Lt(e);if(!t.existsSync(n))return null;try{let e=JSON.parse(t.readFileSync(n,`utf8`));return e?.version===1?e:null}catch{return null}}function Bt(e){let t=e.replace(It,``);return{text:t,changed:t!==e,emptyAfter:t.trim()===``}}function Vt(e,t,n=Rt){try{return n.lstatSync(e).isSymbolicLink()?n.readlinkSync(e)===t:!1}catch{return!1}}function Ht(e){return T(e)||O(e)||y(e)}const Ut=10*1024*1024;function Wt(e,t,n,r){let i=x(e,t,n,r);if(i.kind===`absent`||i.kind===`no-entry`)return{kind:`not-present`};if(i.kind===`decline`)return{kind:`declined`,reason:i.reason};if(!Ht(i.entry))return{kind:`left-foreign`};let a;try{a=r??e.configPath(t,n)}catch{return{kind:`not-present`}}let o=e.serverName(t);return e.format===`file`?(L(a,{force:!0}),{kind:`removed`}):e.format===`toml`?qt(a,o):e.format===`yaml`?Kt(a,e.topLevelKey,o):Gt(a,e.topLevelKey,e.serverMapSubKey,o)}function Gt(e,t,n,r){let i;try{i=F(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(i,`utf-8`)>Ut)return{kind:`declined`,reason:`oversize`};let{text:a,changed:o}=v(i,ee(t,n,r));return o?(l(e,a,{mode:C(e)}),{kind:`removed`}):{kind:`not-present`}}function Kt(e,t,n){let r;try{r=F(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(r,`utf-8`)>Ut)return{kind:`declined`,reason:`oversize`};let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=(0,qe.parseDocument)(a);if(o.errors.length>0)return{kind:`declined`,reason:`unparseable`};let s=[t,n];if(!o.hasIn(s))return{kind:`not-present`};o.deleteIn(s);let c=o.toString(),u=b(a);a.trim()===``||a.endsWith(`
12
+ `)?c.endsWith(`
13
+ `)||(c=`${c}\n`):c=c.replace(/\n+$/,``),u&&(c=c.replace(/\r\n/g,`
14
+ `).replace(/\n/g,`\r
15
+ `));let d=`${i?``:``}${c}`;return d!==r&&l(e,d,{mode:C(e)}),{kind:`removed`}}function qt(e,t){let n=te();if(n.backend===`fallback`)return{kind:`declined`,reason:`no-native-writer`};let r;try{r=F(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=b(a),s=a.trim()===``||a.endsWith(`
16
+ `),c;try{c=n.removeEntry(a,t)}catch{return{kind:`declined`,reason:`unparseable`}}if(!c.existed)return{kind:`not-present`};let u=c.text;s?u.endsWith(`
17
+ `)||(u=`${u}\n`):u=u.replace(/\n+$/,``),o&&(u=u.replace(/\r\n/g,`
18
+ `).replace(/\n/g,`\r
19
+ `));let d=`${i?``:``}${u}`;return d!==r&&l(e,d,{mode:C(e)}),{kind:`removed`}}const Jt=new Set([`start`,`stop`,`status`,`clean`,`ui`,`mcp`,`preview`,`lint`,`deinit`,`auth`]);function Yt(e,t,n=d){if(e!==void 0&&!Jt.has(e))return null;let r=n(t);return r===null||r.distance===0?null:r.rootPath}let Xt=null;function Zt(e){Xt=e}function Qt(){return Xt??process.cwd()}var Z=e(re(),1);function $t(e){return e==null?!1:e.includes(`--type=utility`)&&e.includes(`--utility-sub-type=node.mojom.NodeService`)}function en(e,t=Date.now()){let n=new Date(e).getTime();if(Number.isNaN(n))return`—`;let r=t-n,i=Math.floor(r/1e3);if(i<60)return`${i}s`;let a=Math.floor(i/60);if(a<60)return`${a}m ago`;let o=Math.floor(a/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function tn(e,t,n,r,i,a){if(t.status===`missing`||t.status===`corrupt`)return null;let o=t.lock,s=null;if(n.status!==`missing`&&n.status!==`corrupt`){let e=n.lock;s={port:e.port,status:n.status,pid:e.pid,startedAt:e.startedAt,usage:a}}return{directory:o.worktreeRoot,server:{port:o.port,status:t.status,pid:o.pid,startedAt:o.startedAt,usage:i},ui:s,hostname:o.hostname,lockPath:t.lockPath,binary:r==null?null:h(r),command:r,isDesktop:$t(r)}}function nn(e){return e.ui==null?!1:e.ui.status===`alive`||e.ui.status===`foreign-host`}function Q(e){let t=e.server.status;return t===`alive`||t===`foreign-host`?e.isDesktop?`desktop`:t===`alive`?`running`:`foreign`:t===`dead-pid`&&nn(e)?`ui-orphan`:`stale`}const rn=new Set([`running`,`desktop`,`foreign`,`ui-orphan`]);function an(e){switch(e){case`running`:return Z.default.green(e);case`desktop`:return Z.default.blue(e);case`foreign`:return Z.default.cyan(e);case`ui-orphan`:return Z.default.magenta(e);case`stale`:return Z.default.yellow(e)}}function on(e){return e==null?`—`:`${e.cpuPercent.toFixed(1)}% / ${e.memPercent.toFixed(1)}%`}function sn(e){return`${on(e.server.usage)} | ${on(e.ui?.usage??null)}`}function cn(e){return`${e.server.port===0?`(starting)`:String(e.server.port)} / ${e.ui==null||e.ui.status===`dead-pid`?`—`:String(e.ui.port)}`}function ln(e){if(e.length===0)return`No open-knowledge servers found.`;let t=[`DIRECTORY`,`PORTS (API/UI)`,`CPU/MEM (API | UI)`,`STATUS`,`PID`,`STARTED`,`BINARY`],n=e.map(e=>{let t=Q(e),n=t===`ui-orphan`&&e.ui!=null?e.ui.pid:e.server.pid;return[e.directory,cn(e),sn(e),t,String(n),en(e.server.startedAt),e.binary??`—`]}),r=t.length,i=t.map(e=>e.length);for(let e of n)for(let t=0;t<r;t++)i[t]=Math.max(i[t]??0,(e[t]??``).length);let a=t.map((e,t)=>e.padEnd(i[t]??0)).join(` `).trimEnd(),o=e.map((e,t)=>{let a=n[t]??[],o=[];for(let t=0;t<r;t++){let n=(a[t]??``).padEnd(i[t]??0);if(t===3){let r=a[t]??``;n=an(Q(e))+` `.repeat(Math.max(0,(i[t]??0)-r.length))}o.push(n)}return o.join(` `).trimEnd()}),s=Z.default.dim(`To stop a server: ok stop <port|pid|directory|all>`);return[a,...o,``,s].join(`
20
+ `)}async function un(e={}){let t=e.discover??f,n=e.inspect??X,r=e.log??(e=>console.log(e)),i=e.resolveCommand??u,a=e.resolveUsage??c,o=await t(),s=[];for(let e of o){let t=n(e,`server`),r=n(e,`ui`),o=tn(e,t,r,t.status===`missing`||t.status===`corrupt`?null:i(t.lock.pid),t.status===`missing`||t.status===`corrupt`?null:a(t.lock.pid),r.status===`missing`||r.status===`corrupt`?null:a(r.lock.pid));o!=null&&s.push(o)}if(e.json){let e=s.map(e=>({...e,displayStatus:Q(e)}));r(JSON.stringify(e,null,2));return}r(ln(e.all?s:s.filter(e=>rn.has(Q(e)))))}function dn(){return new _(`ps`).description(`List all running open-knowledge servers`).argument(`[modifier]`,`"all" to include stale (dead-pid) entries`).option(`--all`,`Include stale (dead-pid) entries (foreign-host shows by default)`).option(`--json`,`Emit structured JSON (always includes all statuses)`).action(async(e,t)=>{await un({all:t.all===!0||e===`all`,json:t.json===!0})})}function fn(e,t,n={}){let i=n.isAlive??r,a=[];for(let[n,r]of[[`server`,e],[`ui`,t]])(r.status===`alive`||r.status===`foreign-host`&&i(r.lock.pid))&&a.push({name:n,pid:r.lock.pid,port:r.lock.port});return{targets:a}}function pn(e){let t=e.inspect??(t=>X(e.lockDir,t)),n=e.kill??((e,t)=>process.kill(e,t)),r=e.log??(e=>console.log(e)),i=e.error??(e=>console.error(e)),a=fn(t(`server`),t(`ui`),{isAlive:e.isAlive});if(a.targets.length===0)return r(`No running open-knowledge processes.`),{stopped:[],failed:[],hadTargets:!1};let o=[],s=[];for(let e of a.targets)try{n(e.pid,`SIGTERM`),o.push(e)}catch(t){s.push({target:e,error:t instanceof Error?t.message:String(t)})}return o.length>0&&r(`Stopped: ${o.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `)}`),s.length>0&&i(`Failed to stop: ${s.map(({target:e,error:t})=>`${e.name} (pid=${e.pid}): ${t}`).join(`; `)}`),{stopped:o,failed:s,hadTargets:!0}}function $(e,t){return e.status===`alive`?!0:e.status===`foreign-host`?t(e.lock.pid):!1}async function mn(e,t=r){let n=await f(),i=null;for(let r of n){let n=X(r,`server`),a=X(r,`ui`);if($(n,t)&&n.lock.port===e||$(a,t)&&a.lock.port===e)return r;i===null&&($(n,t)&&n.lock.pid===e||$(a,t)&&a.lock.pid===e)&&(i=r)}return i}function hn(e){let t=pn({lockDir:e});return t.failed.length>0&&(process.exitCode=1),t}function gn(e){return new _(`stop`).description(`Stop open-knowledge server(s). With no argument: stops the server for the current directory. Pass a port number, a directory path, or "all" to target globally.`).argument(`[target...]`,`port number, directory path (spaces OK), or "all"`).action(async t=>{let n=t.length===0?void 0:t.join(` `);if(n===void 0){e();let t=pn({lockDir:m(process.cwd()),log:()=>{}});if(t.hadTargets){if(t.stopped.length>0){let e=t.stopped.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `);console.log(`Stopped: ${e}`)}t.failed.length>0&&(process.exitCode=1)}else await un({});return}if(n===`all`){let e=await f();if(e.length===0){console.log(`No running open-knowledge servers found.`);return}let t=0;for(let n of e){let e=X(n,`server`),i=X(n,`ui`);!$(e,r)&&!$(i,r)||(hn(n),t++)}t===0&&console.log(`No running open-knowledge servers found.`);return}if(/^\d+$/.test(n)){let e=Number.parseInt(n,10),t=await mn(e);if(t===null){console.log(`No running open-knowledge server found with port or PID ${e}.`);return}hn(t);return}hn(m(M(Qt(),n)))})}function _n(e){return{event:`mcp-config-decline`,scope:e.scope,surface:e.surface,editorId:e.editorId,reason:e.reason}}async function vn(e,t){let n,r;try{n=await V(M(e)),r=await V(M(A(e)))}catch{return{kind:`not-git`}}if(!bn(n,r))return{kind:`symlink-escape`};let i=j(n,`.git`),a;try{a=me(i)}catch{return{kind:`not-git`}}let o;if(a.isDirectory()){let e;try{e=await V(i)}catch{return{kind:`not-git`}}if(!bn(e,n))return{kind:`symlink-escape`};o=e}else if(a.isFile()){let e;try{e=await B(i,`utf-8`)}catch{return{kind:`not-git`}}let t=/^gitdir:\s*(.+)$/m.exec(e.trim());if(!t)return{kind:`not-git`};let r=t[1].trim(),a=oe(r)?r:M(n,r);try{o=await V(a)}catch{return{kind:`not-git`}}}else return{kind:`not-git`};let s=j(await yn(o),`config`),c;try{c=await B(s,`utf-8`)}catch{return{kind:`not-git`}}let l=Sn(c);if(l===null)return{kind:`no-origin`};let u=At(l);if(u===null||u.hostname!==`github.com`)return{kind:`non-github`};let d=u.owner.toLowerCase()===t.owner.toLowerCase(),f=u.name.toLowerCase()===t.repo.toLowerCase();return!d||!f?{kind:`wrong-repo`,actualOwner:u.owner,actualRepo:u.name}:{kind:`ok`,gitRemoteUrl:`https://github.com/${u.owner}/${u.name}.git`}}async function yn(e){let t;try{t=(await B(j(e,`commondir`),`utf-8`)).trim()}catch{return e}if(t.length===0)return e;let n=oe(t)?t:M(e,t);try{return await V(n)}catch{return n}}function bn(e,t){if(e===t)return!0;let n=se(t,e);return n.length>0&&!n.startsWith(`..`)&&!oe(n)}function xn(e){let t=e.indexOf(`#`),n=e.indexOf(`;`),r=-1;return t>=0&&n>=0?r=Math.min(t,n):t>=0?r=t:n>=0&&(r=n),(r===-1?e:e.slice(0,r)).trim()}function Sn(e){let t=!1;for(let n of e.split(/\r?\n/)){let e=xn(n);if(e.length===0)continue;if(e.startsWith(`[`)){t=/^\[\s*remote\s+["']origin["']\s*\]$/.test(e);continue}if(!t)continue;let r=/^url\s*=\s*(.+)$/.exec(e);if(r)return Cn(r[1])}return null}function Cn(e){let t=e.trim();return t.startsWith(`"`)&&t.endsWith(`"`)||t.startsWith(`'`)&&t.endsWith(`'`)?t.slice(1,-1):t}const wn=[{id:`mcp-config`,write(e,t,n){let r=e.projectConfigPath?.(t);if(!r)return{integration:`mcp-config`,editorId:e.id,action:`skipped-unsupported`};try{let i=S(e,t,n,void 0,r);return i.action===`written`||i.action===`overwritten`?{integration:`mcp-config`,editorId:e.id,action:i.action,path:i.configPath}:i.action===`failed`?{integration:`mcp-config`,editorId:e.id,action:`failed`,path:i.configPath,error:i.error??`unknown failure`}:i.action===`declined`?{integration:`mcp-config`,editorId:e.id,action:`declined`,path:i.configPath,...i.declineReason===void 0?{}:{reason:i.declineReason}}:{integration:`mcp-config`,editorId:e.id,action:`failed`,path:i.configPath,error:`unexpected project-scope action: ${i.action}`}}catch(t){return{integration:`mcp-config`,editorId:e.id,action:`failed`,path:r,error:t instanceof Error?t.message:String(t)}}}},{id:`project-skill`,write(e,t,n){try{let r=D(e,t,{home:n.home});return{integration:`project-skill`,editorId:e.id,action:r.action,...r.path?{path:r.path}:{},...r.error?{error:r.error}:{}}}catch(t){return{integration:`project-skill`,editorId:e.id,action:`failed`,error:t instanceof Error?t.message:String(t)}}}}];function Tn(e,t,n={},r=wn){let i=[];for(let a of t){let t=E[a];for(let a of r)i.push(a.write(t,e,n))}return i}function En(e,t,n={}){return{integrations:Tn(e,t,n)}}export{Ot as C,H as D,Oe as E,X as S,Tt as T,Bt as _,gn as a,Mt as b,Zt as c,Pt as d,It as f,zt as g,Lt as h,pn as i,Yt as l,Vt as m,vn as n,dn as o,Ft as p,_n as r,Qt as s,En as t,Wt as u,jt as v,wt as w,At as x,Nt as y};
21
+ //# sourceMappingURL=src-4JZrrUEE.mjs.map
@@ -1,2 +1,2 @@
1
1
  import{s as e,t}from"./chunk-C94x7I9S.mjs";var n=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var ee=`$isDayjsObject`,x=function(e){return e instanceof T||!(!e||!e[ee])},S=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},C=function(e,t){if(x(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new T(n)},w=v;w.l=S,w.i=x,w.w=function(e,t){return C(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var T=function(){function g(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[ee]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(w.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return w},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=C(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return C(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<C(e)},_.$g=function(e,t,n){return w.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!w.u(t)||t,u=w.p(e),p=function(e,t){var i=w.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return w.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=w.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[w.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=w.p(u),h=function(e){var t=C(p);return w.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return w.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=w.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return w.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return w.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return w.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return w.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return w.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return w.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return w.s(t.$s,2,`0`);case`SSS`:return w.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=w.p(f),_=C(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return w.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:w.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=S(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return w.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),te=T.prototype;return C.prototype=te,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){te[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),C.extend=function(e,t){return e.$i||=(e(t,T,C),!0),C},C.locale=S,C.isDayjs=x,C.unix=function(e){return C(1e3*e)},C.en=b[y],C.Ls=b,C.p={},C}))})),r=e(n(),1),i=Object.defineProperty,a=(e,t)=>i(e,`name`,{value:t,configurable:!0}),o=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},s={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},c={trace:a((...e)=>{},`trace`),debug:a((...e)=>{},`debug`),info:a((...e)=>{},`info`),warn:a((...e)=>{},`warn`),error:a((...e)=>{},`error`),fatal:a((...e)=>{},`fatal`)},l=a(function(e=`fatal`){let t=s.fatal;typeof e==`string`?e.toLowerCase()in s&&(t=s[e]):typeof e==`number`&&(t=e),c.trace=()=>{},c.debug=()=>{},c.info=()=>{},c.warn=()=>{},c.error=()=>{},c.fatal=()=>{},t<=s.fatal&&(c.fatal=console.error?console.error.bind(console,u(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,u(`FATAL`))),t<=s.error&&(c.error=console.error?console.error.bind(console,u(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,u(`ERROR`))),t<=s.warn&&(c.warn=console.warn?console.warn.bind(console,u(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,u(`WARN`))),t<=s.info&&(c.info=console.info?console.info.bind(console,u(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,u(`INFO`))),t<=s.debug&&(c.debug=console.debug?console.debug.bind(console,u(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,u(`DEBUG`))),t<=s.trace&&(c.trace=console.debug?console.debug.bind(console,u(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,u(`TRACE`)))},`setLogLevel`),u=a(e=>`%c${(0,r.default)().format(`ss.SSS`)} : ${e} : `,`format`);function d(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function f(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function p(e){let t,n,r;e.length===2?(t=e===d||e===f?e:m,n=e,r=e):(t=d,n=(t,n)=>d(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function m(){return 0}function h(e){return e===null?NaN:+e}const g=p(d),_=g.right;g.left,p(h).center;var v=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.internmap={}))})(e,(function(e){class t extends Map{constructor(e,t=o){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(r(this,e))}has(e){return super.has(r(this,e))}set(e,t){return super.set(i(this,e),t)}delete(e){return super.delete(a(this,e))}}class n extends Set{constructor(e,t=o){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let t of e)this.add(t)}has(e){return super.has(r(this,e))}add(e){return super.add(i(this,e))}delete(e){return super.delete(a(this,e))}}function r({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function i({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function a({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(n),e.delete(r)),n}function o(e){return typeof e==`object`&&e?e.valueOf():e}e.InternMap=t,e.InternSet=n,Object.defineProperty(e,`__esModule`,{value:!0})}))}));const y=Math.sqrt(50),b=Math.sqrt(10),ee=Math.sqrt(2);function x(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=y?10:a>=b?5:a>=ee?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?x(e,t,n*2):[s,c,l]}function S(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?x(t,e,n):x(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function C(e,t,n){return t=+t,e=+e,n=+n,x(e,t,n)[2]}function w(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?C(t,e,n):C(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function T(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function te(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ne(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}var re=v(),ie={value:()=>{}};function ae(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new E(n)}function E(e){this._=e}function oe(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}E.prototype=ae.prototype={constructor:E,on:function(e,t){var n=this._,r=oe(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=se(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=ce(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ce(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new E(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function se(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function ce(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=ie,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var le={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function ue(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),le.hasOwnProperty(t)?{space:le[t],local:e}:e}function de(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function fe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function pe(e){var t=ue(e);return(t.local?fe:de)(t)}function me(){}function he(e){return e==null?me:function(){return this.querySelector(e)}}function ge(e){typeof e!=`function`&&(e=he(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new k(r,this._parents)}function _e(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ve(){return[]}function ye(e){return e==null?ve:function(){return this.querySelectorAll(e)}}function be(e){return function(){return _e(e.apply(this,arguments))}}function xe(e){e=typeof e==`function`?be(e):ye(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new k(r,i)}function Se(e){return function(){return this.matches(e)}}function Ce(e){return function(t){return t.matches(e)}}var we=Array.prototype.find;function Te(e){return function(){return we.call(this.children,e)}}function Ee(){return this.firstElementChild}function De(e){return this.select(e==null?Ee:Te(typeof e==`function`?e:Ce(e)))}var Oe=Array.prototype.filter;function ke(){return Array.from(this.children)}function Ae(e){return function(){return Oe.call(this.children,e)}}function je(e){return this.selectAll(e==null?ke:Ae(typeof e==`function`?e:Ce(e)))}function Me(e){typeof e!=`function`&&(e=Se(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new k(r,this._parents)}function Ne(e){return Array(e.length)}function Pe(){return new k(this._enter||this._groups.map(Ne),this._parents)}function D(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}D.prototype={constructor:D,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Fe(e){return function(){return e}}function Ie(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new D(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function Le(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new D(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function Re(e){return e.__data__}function ze(e,t){if(!arguments.length)return Array.from(this,Re);var n=t?Le:Ie,r=this._parents,i=this._groups;typeof e!=`function`&&(e=Fe(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=Be(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new k(o,r),o._enter=s,o._exit=c,o}function Be(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Ve(){return new k(this._exit||this._groups.map(Ne),this._parents)}function He(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Ue(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new k(s,this._parents)}function We(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Ge(e){e||=Ke;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new k(i,this._parents).order()}function Ke(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function qe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Je(){return Array.from(this)}function Ye(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Xe(){let e=0;for(let t of this)++e;return e}function Ze(){return!this.node()}function Qe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function $e(e){return function(){this.removeAttribute(e)}}function et(e){return function(){this.removeAttributeNS(e.space,e.local)}}function tt(e,t){return function(){this.setAttribute(e,t)}}function nt(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function rt(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function it(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function at(e,t){var n=ue(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?et:$e:typeof t==`function`?n.local?it:rt:n.local?nt:tt)(n,t))}function ot(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function st(e){return function(){this.style.removeProperty(e)}}function ct(e,t,n){return function(){this.style.setProperty(e,t,n)}}function lt(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ut(e,t,n){return arguments.length>1?this.each((t==null?st:typeof t==`function`?lt:ct)(e,t,n??``)):O(this.node(),e)}function O(e,t){return e.style.getPropertyValue(t)||ot(e).getComputedStyle(e,null).getPropertyValue(t)}function dt(e){return function(){delete this[e]}}function ft(e,t){return function(){this[e]=t}}function pt(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function mt(e,t){return arguments.length>1?this.each((t==null?dt:typeof t==`function`?pt:ft)(e,t)):this.node()[e]}function ht(e){return e.trim().split(/^|\s+/)}function gt(e){return e.classList||new _t(e)}function _t(e){this._node=e,this._names=ht(e.getAttribute(`class`)||``)}_t.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function vt(e,t){for(var n=gt(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function yt(e,t){for(var n=gt(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function bt(e){return function(){vt(this,e)}}function xt(e){return function(){yt(this,e)}}function St(e,t){return function(){(t.apply(this,arguments)?vt:yt)(this,e)}}function Ct(e,t){var n=ht(e+``);if(arguments.length<2){for(var r=gt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?St:t?bt:xt)(n,t))}function wt(){this.textContent=``}function Tt(e){return function(){this.textContent=e}}function Et(e){return function(){this.textContent=e.apply(this,arguments)??``}}function Dt(e){return arguments.length?this.each(e==null?wt:(typeof e==`function`?Et:Tt)(e)):this.node().textContent}function Ot(){this.innerHTML=``}function kt(e){return function(){this.innerHTML=e}}function At(e){return function(){this.innerHTML=e.apply(this,arguments)??``}}function jt(e){return arguments.length?this.each(e==null?Ot:(typeof e==`function`?At:kt)(e)):this.node().innerHTML}function Mt(){this.nextSibling&&this.parentNode.appendChild(this)}function Nt(){return this.each(Mt)}function Pt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ft(){return this.each(Pt)}function It(e){var t=typeof e==`function`?e:pe(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Lt(){return null}function Rt(e,t){var n=typeof e==`function`?e:pe(e),r=t==null?Lt:typeof t==`function`?t:he(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function zt(){var e=this.parentNode;e&&e.removeChild(this)}function Bt(){return this.each(zt)}function Vt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ht(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ut(e){return this.select(e?Ht:Vt)}function Wt(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function Gt(e){return function(t){e.call(this,t,this.__data__)}}function Kt(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function qt(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Jt(e,t,n){return function(){var r=this.__on,i,a=Gt(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Yt(e,t,n){var r=Kt(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?Jt:qt,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function Xt(e,t,n){var r=ot(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Zt(e,t){return function(){return Xt(this,e,t)}}function Qt(e,t){return function(){return Xt(this,e,t.apply(this,arguments))}}function $t(e,t){return this.each((typeof t==`function`?Qt:Zt)(e,t))}function*en(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var tn=[null];function k(e,t){this._groups=e,this._parents=t}function A(){return new k([[document.documentElement]],tn)}function nn(){return this}k.prototype=A.prototype={constructor:k,select:ge,selectAll:xe,selectChild:De,selectChildren:je,filter:Me,data:ze,enter:Pe,exit:Ve,join:He,merge:Ue,selection:nn,order:We,sort:Ge,call:qe,nodes:Je,node:Ye,size:Xe,empty:Ze,each:Qe,attr:at,style:ut,property:mt,classed:Ct,text:Dt,html:jt,raise:Nt,lower:Ft,append:It,insert:Rt,remove:Bt,clone:Ut,datum:Wt,on:Yt,dispatch:$t,[Symbol.iterator]:en};function rn(e){return typeof e==`string`?new k([[document.querySelector(e)]],[document.documentElement]):new k([[e]],tn)}function j(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function an(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function M(){}var N=.7,P=1/N,F=`\\s*([+-]?\\d+)\\s*`,I=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,L=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,on=/^#([0-9a-f]{3,8})$/,sn=RegExp(`^rgb\\(${F},${F},${F}\\)$`),cn=RegExp(`^rgb\\(${L},${L},${L}\\)$`),ln=RegExp(`^rgba\\(${F},${F},${F},${I}\\)$`),un=RegExp(`^rgba\\(${L},${L},${L},${I}\\)$`),dn=RegExp(`^hsl\\(${I},${L},${L}\\)$`),fn=RegExp(`^hsla\\(${I},${L},${L},${I}\\)$`),pn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};j(M,R,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:mn,formatHex:mn,formatHex8:hn,formatHsl:gn,formatRgb:_n,toString:_n});function mn(){return this.rgb().formatHex()}function hn(){return this.rgb().formatHex8()}function gn(){return Dn(this).formatHsl()}function _n(){return this.rgb().formatRgb()}function R(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=on.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?vn(t):n===3?new z(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?yn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?yn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=sn.exec(e))?new z(t[1],t[2],t[3],1):(t=cn.exec(e))?new z(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ln.exec(e))?yn(t[1],t[2],t[3],t[4]):(t=un.exec(e))?yn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=dn.exec(e))?En(t[1],t[2]/100,t[3]/100,1):(t=fn.exec(e))?En(t[1],t[2]/100,t[3]/100,t[4]):pn.hasOwnProperty(e)?vn(pn[e]):e===`transparent`?new z(NaN,NaN,NaN,0):null}function vn(e){return new z(e>>16&255,e>>8&255,e&255,1)}function yn(e,t,n,r){return r<=0&&(e=t=n=NaN),new z(e,t,n,r)}function bn(e){return e instanceof M||(e=R(e)),e?(e=e.rgb(),new z(e.r,e.g,e.b,e.opacity)):new z}function xn(e,t,n,r){return arguments.length===1?bn(e):new z(e,t,n,r??1)}function z(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}j(z,xn,an(M,{brighter(e){return e=e==null?P:P**+e,new z(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?N:N**+e,new z(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new z(B(this.r),B(this.g),B(this.b),Tn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Sn,formatHex:Sn,formatHex8:Cn,formatRgb:wn,toString:wn}));function Sn(){return`#${V(this.r)}${V(this.g)}${V(this.b)}`}function Cn(){return`#${V(this.r)}${V(this.g)}${V(this.b)}${V((isNaN(this.opacity)?1:this.opacity)*255)}`}function wn(){let e=Tn(this.opacity);return`${e===1?`rgb(`:`rgba(`}${B(this.r)}, ${B(this.g)}, ${B(this.b)}${e===1?`)`:`, ${e})`}`}function Tn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function B(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function V(e){return e=B(e),(e<16?`0`:``)+e.toString(16)}function En(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new H(e,t,n,r)}function Dn(e){if(e instanceof H)return new H(e.h,e.s,e.l,e.opacity);if(e instanceof M||(e=R(e)),!e)return new H;if(e instanceof H)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new H(o,s,c,e.opacity)}function On(e,t,n,r){return arguments.length===1?Dn(e):new H(e,t,n,r??1)}function H(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}j(H,On,an(M,{brighter(e){return e=e==null?P:P**+e,new H(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?N:N**+e,new H(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new z(An(e>=240?e-240:e+120,i,r),An(e,i,r),An(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new H(kn(this.h),U(this.s),U(this.l),Tn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Tn(this.opacity);return`${e===1?`hsl(`:`hsla(`}${kn(this.h)}, ${U(this.s)*100}%, ${U(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function kn(e){return e=(e||0)%360,e<0?e+360:e}function U(e){return Math.max(0,Math.min(1,e||0))}function An(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var jn=e=>()=>e;function Mn(e,t){return function(n){return e+n*t}}function Nn(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Pn(e,t){var n=t-e;return n?Mn(e,n>180||n<-180?n-360*Math.round(n/360):n):jn(isNaN(e)?t:e)}function Fn(e){return(e=+e)==1?In:function(t,n){return n-t?Nn(t,n,e):jn(isNaN(t)?n:t)}}function In(e,t){var n=t-e;return n?Mn(e,n):jn(isNaN(e)?t:e)}var Ln=(function e(t){var n=Fn(t);function r(e,t){var r=n((e=xn(e)).r,(t=xn(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=In(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function W(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Rn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zn=new RegExp(Rn.source,`g`);function Bn(e){return function(){return e}}function Vn(e){return function(t){return e(t)+``}}function Hn(e,t){var n=Rn.lastIndex=zn.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=Rn.exec(e))&&(i=zn.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:W(r,i)})),n=zn.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Vn(c[0].x):Bn(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}var Un=180/Math.PI,Wn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Gn(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Un,skewX:Math.atan(c)*Un,scaleX:o,scaleY:s}}var Kn;function qn(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Wn:Gn(t.a,t.b,t.c,t.d,t.e,t.f)}function Jn(e){return e==null||(Kn||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Kn.setAttribute(`transform`,e),!(e=Kn.transform.baseVal.consolidate()))?Wn:(e=e.matrix,Gn(e.a,e.b,e.c,e.d,e.e,e.f))}function Yn(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:W(e,i)},{i:c-2,x:W(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:W(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:W(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:W(e,n)},{i:s-2,x:W(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Xn=Yn(qn,`px, `,`px)`,`deg)`),Zn=Yn(Jn,`, `,`)`,`)`),G=0,Qn=0,$n=0,er=1e3,tr,K,nr=0,q=0,rr=0,J=typeof performance==`object`&&performance.now?performance:Date,ir=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ar(){return q||=(ir(or),J.now()+rr)}function or(){q=0}function sr(){this._call=this._time=this._next=null}sr.prototype=cr.prototype={constructor:sr,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?ar():+n)+(t==null?0:+t),!this._next&&K!==this&&(K?K._next=this:tr=this,K=this),this._call=e,this._time=n,pr()},stop:function(){this._call&&(this._call=null,this._time=1/0,pr())}};function cr(e,t,n){var r=new sr;return r.restart(e,t,n),r}function lr(){ar(),++G;for(var e=tr,t;e;)(t=q-e._time)>=0&&e._call.call(void 0,t),e=e._next;--G}function ur(){q=(nr=J.now())+rr,G=Qn=0;try{lr()}finally{G=0,fr(),q=0}}function dr(){var e=J.now(),t=e-nr;t>er&&(rr-=t,nr=e)}function fr(){for(var e,t=tr,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:tr=n);K=e,pr(r)}function pr(e){G||(Qn&&=clearTimeout(Qn),e-q>24?(e<1/0&&(Qn=setTimeout(ur,e-J.now()-rr)),$n&&=clearInterval($n)):($n||=(nr=J.now(),setInterval(dr,er)),G=1,ir(ur)))}function mr(e,t,n){var r=new sr;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var hr=ae(`start`,`end`,`cancel`,`interrupt`),gr=[];function _r(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;yr(e,n,{name:t,index:r,group:i,on:hr,tween:gr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function vr(e,t){var n=X(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function Y(e,t){var n=X(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function X(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function yr(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=cr(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return mr(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(mr(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function br(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function xr(e){return this.each(function(){br(this,e)})}function Sr(e,t){var n,r;return function(){var i=Y(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Cr(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=Y(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function wr(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=X(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Sr:Cr)(n,e,t))}function Tr(e,t,n){var r=e._id;return e.each(function(){var e=Y(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return X(e,r).value[t]}}function Er(e,t){var n;return(typeof t==`number`?W:t instanceof R?Ln:(n=R(t))?(t=n,Ln):Hn)(e,t)}function Dr(e){return function(){this.removeAttribute(e)}}function Or(e){return function(){this.removeAttributeNS(e.space,e.local)}}function kr(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Ar(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function jr(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Mr(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Nr(e,t){var n=ue(e),r=n===`transform`?Zn:Er;return this.attrTween(e,typeof t==`function`?(n.local?Mr:jr)(n,r,Tr(this,`attr.`+e,t)):t==null?(n.local?Or:Dr)(n):(n.local?Ar:kr)(n,r,t))}function Pr(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Fr(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Ir(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Fr(e,i)),n}return i._value=t,i}function Lr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Pr(e,i)),n}return i._value=t,i}function Rr(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=ue(e);return this.tween(n,(r.local?Ir:Lr)(r,t))}function zr(e,t){return function(){vr(this,e).delay=+t.apply(this,arguments)}}function Br(e,t){return t=+t,function(){vr(this,e).delay=t}}function Vr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?zr:Br)(t,e)):X(this.node(),t).delay}function Hr(e,t){return function(){Y(this,e).duration=+t.apply(this,arguments)}}function Ur(e,t){return t=+t,function(){Y(this,e).duration=t}}function Wr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Hr:Ur)(t,e)):X(this.node(),t).duration}function Gr(e,t){if(typeof t!=`function`)throw Error();return function(){Y(this,e).ease=t}}function Kr(e){var t=this._id;return arguments.length?this.each(Gr(t,e)):X(this.node(),t).ease}function qr(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();Y(this,e).ease=n}}function Jr(e){if(typeof e!=`function`)throw Error();return this.each(qr(this._id,e))}function Yr(e){typeof e!=`function`&&(e=Se(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Z(r,this._parents,this._name,this._id)}function Xr(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new Z(o,this._parents,this._name,this._id)}function Zr(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function Qr(e,t,n){var r,i,a=Zr(t)?vr:Y;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function $r(e,t){var n=this._id;return arguments.length<2?X(this.node(),n).on.on(e):this.each(Qr(n,e,t))}function ei(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ti(){return this.on(`end.remove`,ei(this._id))}function ni(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=he(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,_r(l[f],t,n,f,l,X(u,n)));return new Z(a,this._parents,t,n)}function ri(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=ye(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=X(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&_r(p,t,n,h,f,m);a.push(f),o.push(u)}return new Z(a,o,t,n)}var ii=A.prototype.constructor;function ai(){return new ii(this._groups,this._parents)}function oi(e,t){var n,r,i;return function(){var a=O(this,e),o=(this.style.removeProperty(e),O(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function si(e){return function(){this.style.removeProperty(e)}}function ci(e,t,n){var r,i=n+``,a;return function(){var o=O(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function li(e,t,n){var r,i,a;return function(){var o=O(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),O(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function ui(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=Y(this,e),l=c.on,u=c.value[a]==null?s||=si(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function di(e,t,n){var r=(e+=``)==`transform`?Xn:Er;return t==null?this.styleTween(e,oi(e,r)).on(`end.style.`+e,si(e)):typeof t==`function`?this.styleTween(e,li(e,r,Tr(this,`style.`+e,t))).each(ui(this._id,e)):this.styleTween(e,ci(e,r,t),n).on(`end.style.`+e,null)}function fi(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function pi(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&fi(e,a,n)),r}return a._value=t,a}function mi(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,pi(e,t,n??``))}function hi(e){return function(){this.textContent=e}}function gi(e){return function(){this.textContent=e(this)??``}}function _i(e){return this.tween(`text`,typeof e==`function`?gi(Tr(this,`text`,e)):hi(e==null?``:e+``))}function vi(e){return function(t){this.textContent=e.call(this,t)}}function yi(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&vi(r)),t}return r._value=e,r}function bi(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,yi(e))}function xi(){for(var e=this._name,t=this._id,n=Ti(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=X(c,t);_r(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Z(r,this._parents,e,n)}function Si(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=Y(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Ci=0;function Z(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function wi(e){return A().transition(e)}function Ti(){return++Ci}var Q=A.prototype;Z.prototype=wi.prototype={constructor:Z,select:ni,selectAll:ri,selectChild:Q.selectChild,selectChildren:Q.selectChildren,filter:Yr,merge:Xr,selection:ai,transition:xi,call:Q.call,nodes:Q.nodes,node:Q.node,size:Q.size,empty:Q.empty,each:Q.each,on:$r,attr:Nr,attrTween:Rr,style:di,styleTween:mi,text:_i,textTween:bi,remove:ti,tween:wr,delay:Vr,duration:Wr,ease:Kr,easeVarying:Jr,end:Si,[Symbol.iterator]:Q[Symbol.iterator]};function Ei(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Di={time:null,delay:0,duration:250,ease:Ei};function Oi(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function ki(e){var t,n;e instanceof Z?(t=e._id,e=e._name):(t=Ti(),(n=Di).time=ar(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&_r(c,e,t,l,o,n||Oi(c,t));return new Z(r,this._parents,e,t)}A.prototype.interrupt=xr,A.prototype.transition=ki;const{abs:Ai,max:ji,min:Mi}=Math;[`w`,`e`].map(Ni),[`n`,`s`].map(Ni),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(Ni);function Ni(e){return{type:e}}function $(e,t,n){this.k=e,this.x=t,this.y=n}$.prototype={constructor:$,scale:function(e){return e===1?this:new $(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new $(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var Pi=new $(1,0,0);Fi.prototype=$.prototype;function Fi(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Pi;return e.__zoom}export{o as C,n as D,l as E,p as S,c as T,T as _,In as a,S as b,z as c,j as d,an as f,te as g,ne as h,Pn as i,R as l,re as m,W as n,jn as o,rn as p,Ln as r,M as s,Hn as t,bn as u,C as v,a as w,_ as x,w as y};
2
- //# sourceMappingURL=src-DC_BCes_.mjs.map
2
+ //# sourceMappingURL=src-BGL-MlNN.mjs.map
@@ -0,0 +1 @@
1
+ import{_ as e,f as t,r as n}from"./start-DX8hoO29.mjs";export{n as bootStartServer,t as resolveHost,e as startCommand};
@@ -0,0 +1,3 @@
1
+ import{Dn as e,Z as t}from"./dist-BB07_fNU.mjs";import{Nr as n,Sr as r,lr as i}from"./dist-C_-7dTgR.mjs";import{n as a,t as o}from"./esm-PWRRAk-U.mjs";import{i as s,t as c}from"./gh-detect-C0TUrJxp.mjs";import{n as l}from"./constants-p-XvThBy.mjs";import{spawn as u}from"node:child_process";import{basename as d,dirname as f,join as p}from"node:path";import{closeSync as m,existsSync as h,mkdirSync as g,openSync as _,statSync as v}from"node:fs";import{homedir as y}from"node:os";import{rm as b}from"node:fs/promises";import{setTimeout as x}from"node:timers/promises";const S=`OpenKnowledge.app`,C=`/Applications/${S}`;function w(){return{platform:process.platform,env:process.env,execPath:process.execPath,isTTY:process.stdout.isTTY,statSync:e=>{try{return v(e,{throwIfNoEntry:!1})??null}catch{return null}}}}function T(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let t=/(.+?\.app)\/Contents\/MacOS\//.exec(e.execPath);if(t?.[1])return t[1]}if(E(e,C))return C;let t=p(e.homeDir??y(),`Applications`,S);return E(e,t)?t:null}function E(e,t){try{let n=p(t,`Contents`,`MacOS`,`OpenKnowledge`),r=e.statSync(n);return r&&typeof r.isFile==`function`?r.isFile():!1}catch{return!1}}function D(e){if(e.env.OK_FORCE_BROWSER===`1`)return{available:!1,reason:`force-browser`};if(e.platform!==`darwin`)return{available:!1,reason:`darwin-only`};let t;try{t=T(e)}catch{return{available:!1,reason:`stat-error`}}return t?e.env.OK_FORCE_DESKTOP===`1`?{available:!0,reason:`available`,bundlePath:t}:e.isTTY!==!0||e.env.SSH_CONNECTION||e.env.SSH_TTY?{available:!1,reason:`headless`,bundlePath:t}:{available:!0,reason:`available`,bundlePath:t}:{available:!1,reason:`no-bundle`}}function O(e){(e.log??(e=>console.error(e)))("Launching OpenKnowledge desktop (use `ok start` for the browser server, or `OK_FORCE_BROWSER=1` to always skip)");let t={...process.env};delete t.ELECTRON_RUN_AS_NODE,e.spawn(`open`,[`-b`,`com.inkeep.open-knowledge`],{detached:!0,stdio:`ignore`,env:t}).unref()}function k(e=`no-bundle`){switch(e){case`no-bundle`:return`Desktop app not found at ${C}. Install via DMG, or omit --mode for browser mode.`;case`darwin-only`:return`Desktop app is macOS-only on this release. Use --mode=browser, or omit --mode for the server fallback.`;case`headless`:return`Desktop launch is gated in headless contexts (CI, SSH, non-TTY stdout). Set OK_FORCE_DESKTOP=1 to override, or use --mode=browser.`;case`force-browser`:return`OK_FORCE_BROWSER=1 is set — desktop dispatch is disabled. Unset it to use --mode=app.`;case`stat-error`:return`Failed to inspect desktop bundle at ${C} (filesystem error). Check permissions or use --mode=browser.`;case`available`:return`Desktop app appears available at ${C} but launch dispatch did not fire (caller bug).`}}function A(e){return p(f(e),`..`,`Frameworks`,`OpenKnowledge Server.app`,`Contents`,`MacOS`,`OpenKnowledge Helper`)}const j=/\/[^/]+\.app\/Contents\/MacOS\/[^/]+$/;function M(e){if(e.platform!==`darwin`||!j.test(e.execPath))return null;let t=A(e.execPath);return e.exists(t)?t:null}function N(e={}){let t=e.execPath??process.execPath,n=e.platform??process.platform,r=e.argv??process.argv,i=e.exists??h,a=r[1];return a?{command:M({execPath:t,platform:n,exists:i})??t,prefixArgs:[a]}:(console.warn(`[self-spawn] process.argv[1] is empty — falling back to \`npx -y @inkeep/open-knowledge@latest\`. This re-introduces the registry-fetch surface that re-exec was fixing. Observed argv: ${JSON.stringify(r)}`),{command:`npx`,prefixArgs:[`-y`,`@inkeep/open-knowledge@latest`]})}function P(e,t){return e.host??t.HOST??`127.0.0.1`}function F(e){let t=d(e).replace(/[^\x20-\x7E]/g,``).trim().slice(0,64);return`open-knowledge-server ${t.length>0?t:`unknown`}`}var I=class extends Error{cwd;constructor(e){super("This directory isn't set up yet. Run `ok init` first, then `ok start` again."),this.name=`OkDirMissingError`,this.cwd=e}};function L(e){return e.uiLock?e.isAlive(e.uiLock.pid)?{action:`skip`,reason:`alive`,pid:e.uiLock.pid,port:e.uiLock.port}:{action:`spawn`,reason:`stale`,stalePid:e.uiLock.pid}:{action:`spawn`,reason:`absent`}}function R(t){h(t.lockDir)||g(t.lockDir,{recursive:!0});let n=_(p(t.lockDir,e),`w`),r=t.spawn??u,{PORT:i,...a}=process.env,o=N();try{let e=r(o.command,[...o.prefixArgs,...t.args??[`ui`]],{detached:!0,stdio:[`ignore`,`ignore`,n],windowsHide:!0,cwd:t.cwd,env:{...a,ELECTRON_RUN_AS_NODE:`1`}});return e.unref(),e}finally{try{m(n)}catch{}}}function z(e,t,n){return e??(n===void 0?t:void 0)}function B(e,t){return e!==void 0&&t!==null&&t.port>0&&t.draining!==!0}function V(e,t,n){return e??(t!=null&&!n?1:0)}async function H(e){let t=e.spawn??u,n=N(),{PORT:r,...i}=process.env,a=t(n.command,[...n.prefixArgs,`ui`,`--port`,String(e.uiPort)],{cwd:e.cwd,stdio:`inherit`,windowsHide:!0,env:{...i,ELECTRON_RUN_AS_NODE:`1`}}),o=!1,s=e=>{o=!0;try{a.kill(e)}catch{}},c=()=>s(`SIGINT`),l=()=>s(`SIGTERM`);process.once(`SIGINT`,c),process.once(`SIGTERM`,l),await new Promise(e=>{a.on(`exit`,(t,n)=>{process.exitCode=V(t,n,o),e()}),a.on(`error`,t=>{console.error(`[start] connect fallback: failed to spawn ok ui — ${t instanceof Error?t.message:String(t)}`),process.exitCode=1,e()})}),process.removeListener(`SIGINT`,c),process.removeListener(`SIGTERM`,l)}async function U(e){let t=e.now()+e.timeoutMs;for(;e.now()<t;){let t=e.readUiLock();if(t&&t.port>0)return t.port;await e.sleep(e.pollIntervalMs)}let n=e.readUiLock();return n&&n.port>0?n.port:null}const W=t;function G(e,t,n=e=>b(e,{recursive:!0,force:!0})){return async()=>{try{await e()}finally{try{await n(t)}catch(e){process.stderr.write(`[start] ephemeral temp dir reap failed for ${t}: ${e instanceof Error?e.message:String(e)}\n`)}}}}function K(e,t={}){let n=t.exit??(e=>process.exit(e)),r=t.getActiveHandles??(()=>{let e=process._getActiveHandles;return e?e.call(process):null});return async()=>{let i=!1;try{await e()}catch(e){i=!0,t.log?.error({err:e},`idle-shutdown: destroy failed — exiting anyway`)}finally{let e=null;try{let t=r();if(t!==null){e={};for(let n of t){let t=n?.constructor?.name??`unknown`;e[t]=(e[t]??0)+1}}}catch{e=null}t.log?.info({event:`idle-shutdown-exit`,exitCode:i?1:0,openHandles:e??{},handlesAvailable:e!==null},`idle-shutdown: teardown finished — exiting process`),n(i?1:0)}}}function q(e){let t=e.sigtermGraceMs??W,n=e.sigtermPollIntervalMs??200,r=e.sleep??(e=>x(e));return async()=>{try{let i=e.readUiLock();if(i&&e.isAlive(i.pid))try{e.killPid(i.pid,`SIGTERM`),e.log?.info({pid:i.pid,port:i.port},`idle-shutdown: SIGTERM UI sibling`);let a=Date.now()+t;for(;Date.now()<a&&e.isAlive(i.pid);)await r(n);if(e.isAlive(i.pid))try{e.killPid(i.pid,`SIGKILL`),e.log?.warn({pid:i.pid,graceMs:t},`idle-shutdown: SIGTERM grace expired — escalated to SIGKILL`)}catch(t){e.log?.error({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: SIGKILL failed`)}}catch(t){e.log?.warn({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: failed to SIGTERM UI sibling`)}}catch(t){e.log?.warn({err:t instanceof Error?t.message:String(t)},`idle-shutdown: UI lookup failed; proceeding with destroy`)}await e.destroy()}}async function J(e){let{config:t,cwd:a,host:o}=e,l=e.skipAutoInit??!1,u=e.skipUiAutoSpawn??!1,d=e.idleThresholdMs??18e5,{existsSync:f,mkdirSync:p}=await import(`node:fs`),{basename:m,dirname:h}=await import(`node:path`),{bootServer:g,getLogger:_,isProcessAlive:v,readUiLock:y,resolveContentDir:b,resolveLockDir:S,waitForServerLockDrain:C}=await import(`./dist-DH3x1SI7.mjs`),w=e.log??_(`start`),T=e.singleFile!==void 0,E=e.projectDir??a,D=T?n(e.singleFile).canonicalFilePath:void 0,O=D?h(D):void 0,k=D?m(D):void 0;if(!T){if(!l&&!i(a))throw new I(a);let t=process.env.OK_RECLAIM_DISABLE??null,n=e=>{let t=typeof e.event==`string`?e.event:``;(t.endsWith(`-failed`)||t.endsWith(`-error`)||t.endsWith(`-missing`))&&w.warn({event:e},`[start] reclaim sweep reported a problem`)};try{(e.repairMcpConfigsFn??(await import(`./repair-mcp-configs-iuxXR-U-.mjs`)).repairMcpConfigs)({projectDir:a,reclaimDisableEnv:t,logger:n})}catch(e){w.warn({err:e},`[start] mcp-config repair sweep failed; continuing`)}try{(e.repairLaunchJsonFn??(await import(`./repair-launch-json-B8-siIVG.mjs`)).repairLaunchJson)({projectDir:a,reclaimDisableEnv:t,logger:n})}catch(e){w.warn({err:e},`[start] launch.json repair sweep failed; continuing`)}try{await(e.repairSkillsFn??(await import(`./repair-skills-CZkLkOIF.mjs`)).repairSkills)({projectDir:a,reclaimDisableEnv:t,logger:n})}catch(e){w.warn({err:e},`[start] skill repair sweep failed; continuing`)}}let A=O??b(t,a);!T&&!f(A)&&(p(A,{recursive:!0}),w.info({contentDir:A},`Created content directory`));let j=null,M=async({lockDir:t})=>{if(j=L({uiLock:y(t),isAlive:v}),j.action===`spawn`&&!u)try{let n=e.uiPort===void 0?void 0:[`ui`,`--port`,String(e.uiPort)];R({lockDir:t,cwd:a,spawn:e.spawn,args:n}),w.info({reason:j.reason,uiPort:e.uiPort},`[start] auto-spawned ok ui sibling`)}catch(e){console.warn(`[start] failed to auto-spawn ok ui: ${e instanceof Error?e.message:String(e)}`)}else j.action===`skip`&&w.info({port:j.port,pid:j.pid},`UI already running at port ${j.port}`)},N=e.reactShellDistDir===void 0,P=s(),F=r();{let e=S(T?E:a),t=Date.now(),n=await C(e);n!==`no-drain`&&w.info({event:`start-waited-for-draining-predecessor`,outcome:n,waitedMs:Date.now()-t,drainLockDir:e},n===`released`?`[start] predecessor server finished draining — proceeding`:`[start] predecessor server still draining after wait — proceeding to collide`)}let z=await g({config:t,contentDir:A,projectDir:T?E:a,contentRoot:T?void 0:t.content.dir,port:e.port,host:o,quiet:!1,detectGh:c,tokenStore:P,embeddingsKeyStore:F,...T?{ephemeral:!0,singleDocRelPath:k,gitEnabled:!1,gitPreflight:()=>({ok:!0,version:`0.0.0`,resolvedPath:`git`,source:`PATH`})}:{},localOpCliArgs:[process.execPath,process.argv[1]],attachUiSibling:N,idleShutdownMs:d,skipAutoInit:!0,...N?{spawnUiSiblingFn:M}:{},idleShutdownHandler:t=>{let n=q({readUiLock:()=>y(z.lockDir),isAlive:v,killPid:(e,t)=>{process.kill(e,t)},destroy:t,log:w});return K(T?G(n,E):n,{log:w,exit:e.idleExit})},log:w,...e.serveContentAssets===void 0?{}:{serveContentAssets:e.serveContentAssets},...e.reactShellDistDir?{reactShellDistDir:e.reactShellDistDir}:{}});j||={action:`skip`,reason:`alive`,pid:0,port:0};let B=j,V=null;if(B.action===`skip`)V=B.port>0?B.port:null;else if(!u){let t=e.uiBindTimeoutMs??3e3;V=await U({readUiLock:()=>y(z.lockDir),now:Date.now,sleep:e=>x(e),timeoutMs:t,pollIntervalMs:50}),V===null&&w.warn({timeoutMs:t},`[start] ok ui did not bind within timeout — banner falls back to API URL`)}return{httpServer:z.httpServer,destroy:z.destroy,lockDir:z.lockDir,contentDir:A,port:z.port,ready:z.ready,degraded:z.degraded,uiSpawnDecision:j,resolvedUiPort:V}}function ee(e){if(e===`browser`||e===`app`)return e;throw new a(`--mode must be 'browser' or 'app'`)}function te(e){let t=Number.parseInt(e,10);if(Number.isNaN(t)||t<1||t>65535)throw new a(`--ui-port must be a port number between 1 and 65535`);return t}function Y(e){return e.OK_CONSOLE_LEVEL!==void 0||e.LOG_LEVEL!==void 0?null:`warn`}function X(e){let t=[`Stopping OpenKnowledge…`,`Saving pending changes and releasing the server lock — this can take a few seconds.`];return e===`SIGINT`&&t.push(`Press Ctrl+C again to force quit.`),t}async function Z(e,t){let n=Y(process.env);n!==null&&(process.env.OK_CONSOLE_LEVEL=n);let{renderBanner:r}=await import(`./banner-DsGpC-o3.mjs`),{accent:i,dim:a,error:o,warning:s}=await import(`./colors-Ct4sdRvQ.mjs`),c=process.cwd(),u=e;process.title=F(c);let d=P(t,process.env),f=t.port===void 0?void 0:Number(t.port),p=process.env.PORT?Number(process.env.PORT):void 0,m=t.uiPort===void 0?void 0:Number(t.uiPort),h=z(f,p,m);if(m!==void 0){let{readServerLock:e,resolveLockDir:t}=await import(`./dist-DH3x1SI7.mjs`);if(B(m,e(t(c)))){await H({cwd:c,uiPort:m});return}}let g;try{g=await J({config:u,cwd:c,host:d,port:h,...m===void 0?{}:{uiPort:m},...t.serveContentAssets===void 0?{}:{serveContentAssets:t.serveContentAssets},...t.reactShellDistDir?{reactShellDistDir:t.reactShellDistDir}:{},...t.singleFile?{singleFile:t.singleFile}:{},...t.projectDir?{projectDir:t.projectDir}:{}})}catch(e){e instanceof I&&(console.error(o(e.message)),process.exit(1));let t=await import(`./dist-DH3x1SI7.mjs`);if((e instanceof t.GitNotAvailableError||e instanceof t.GitTooOldError)&&process.exit(78),(e instanceof t.SingleFileNotFoundError||e instanceof t.SingleFileNotAFileError||e instanceof t.SingleFileNotMarkdownError)&&(console.error(o(e.message)),process.exit(1)),m!==void 0&&Q(e,t)){await H({cwd:c,uiPort:m});return}let n=$(e,c,t);n!==null&&(console.error(o(n)),process.exit(1)),console.error(`${o(`Failed to start:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exit(1)}let _=!1,v=async e=>{if(_)return;_=!0;let[t,...n]=X(e);console.log(i(`\n${t}`));for(let e of n)console.log(a(` ${e}`));try{await g.destroy()}catch(e){console.error(`${o(`destroy() failed:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exitCode=1}process.exit(process.exitCode??0)};process.once(`SIGINT`,()=>{v(`SIGINT`)}),process.once(`SIGTERM`,()=>{v(`SIGTERM`)});let y=`http://${d}:${g.port}`,b=d===`0.0.0.0`||d===`::`?`http://0.0.0.0:${g.port}`:void 0,x=g.resolvedUiPort,S=x!==null&&x>0?`http://${d}:${x}`:y;console.log(r({name:`open-knowledge`,version:l,localUrl:S,apiUrl:S===y?void 0:y,networkUrl:b,nextSteps:[`Open the Editor URL in your browser to start editing.`]}));let C={"shadow-repo":`Version history and branch-switch safety unavailable`,"file-watcher":`External file changes will not sync to the editor`,"head-watcher":`Git branch switches may cause document inconsistency`};g.ready.then(async()=>{if(g.degraded.length>0){console.log();for(let e of g.degraded){let t=C[e]??`${e} (check server logs for details)`;console.warn(` ${s(`⚠`)} ${s(e)}: ${a(t)}`)}console.log()}if(t.open){let{openBrowser:e}=await import(`./open-browser-9FuRJjpP.mjs`);e(S)}}).catch(e=>{console.error(` ${o(`Server initialization failed:`)} ${e instanceof Error?e.message:String(e)}`)})}function Q(e,t){let n=t.ServerLockCollisionError;return n!==void 0&&e instanceof n}function $(e,t,n){let r=n.ServerLockCollisionError;if(r===void 0||!(e instanceof r))return null;try{let e=p(t,`.ok`),r=n.readServerLock(e);return r?r.kind===`interactive`?`OpenKnowledge desktop is currently running on this project. Quit it or use --cwd to point elsewhere.`:r.kind===`mcp-spawned`?"An MCP-spawned server holds this lock; it should release on idle-shutdown (~30 min). Or run `ok stop`.":"OpenKnowledge server is already running on this project — check `ok status` or `ok stop`.":"OpenKnowledge server is already running on this project — check `ok status` or `ok stop`."}catch{return null}}function ne(e){return new o(`start`).description(`Start the knowledge base collab server`).option(`-p, --port <port>`,`Server port`,void 0).option(`--ui-port <port>`,`Pin the ok ui sibling to <port> and connect (not exit) if a server already runs here — the worktree-preview recipe path`,te).option(`-H, --host <host>`,`Server host`,void 0).option(`--open`,`Open browser after start`).option(`--mode <mode>`,`Force dispatch mode: 'browser' or 'app'`,ee).option(`--serve-content-assets`,`Serve content assets from this server (now the default; kept for compatibility)`).option(`--react-shell-dist-dir <path>`,`Serve React shell from <path> (suppresses ok ui sibling)`).option(`--single-file <path>`,`No-project ephemeral single-file mode: scope the server to one markdown file (git + MCP off)`).option(`--project-dir <dir>`,`Throwaway project root for --single-file (where ephemeral .ok/ state lives)`).action(async t=>{let n=e();if(t.mode===`app`){t.open&&(process.stderr.write(`error: option '--mode=app' cannot be combined with '--open' (--open opens a browser tab against the local server, which app mode does not boot)
2
+ `),process.exit(2));let e=[];if(t.port!==void 0&&e.push(`--port`),t.uiPort!==void 0&&e.push(`--ui-port`),t.host!==void 0&&e.push(`--host`),e.length>0){let t=process.env.OK_LOG_LEVEL??`info`;(t===`debug`||t===`trace`)&&console.error(`--mode=app: ignoring ${e.join(`, `)}`)}let n=D(w());if(n.available){O({spawn:u});return}console.error(k(n.reason)),process.exit(1)}await Z(n,t)})}export{D as C,w as S,ne as _,V as a,K as b,F as c,z as d,P as f,R as g,B as h,q as i,X as l,Z as m,U as n,H as o,Y as p,J as r,L as s,I as t,Q as u,$ as v,O as w,N as x,G as y};
3
+ //# sourceMappingURL=start-DX8hoO29.mjs.map
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-ByieFnhr.mjs";import{t as e}from"./chunk-5QVNJEHU-BwcO0gX-.mjs";export{e as statCommand};