@inkeep/open-knowledge 0.25.0-beta.10 → 0.25.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (360) hide show
  1. package/dist/alias-JE7RI5QX-DmHh8yog.mjs +1 -0
  2. package/dist/{architectureDiagram-Q4EWVU46-Dwlx8W7J.mjs → architectureDiagram-Q4EWVU46-C9cSuC8m.mjs} +2 -2
  3. package/dist/assets/skills/discovery/SKILL.md +1 -1
  4. package/dist/assets/skills/project/SKILL.md +1 -1
  5. package/dist/awk2-POPGKRAI-C7696e-z.mjs +1 -0
  6. package/dist/base64-4YMZCVJ5-BIHNwDj2.mjs +1 -0
  7. package/dist/basename-AA2KJYZQ-Dcz4Ls85.mjs +1 -0
  8. package/dist/bash-IJWYRKFO-DgruzS3i.mjs +1 -0
  9. package/dist/{blockDiagram-DXYQGD6D-D_l7RLVS.mjs → blockDiagram-DXYQGD6D-Dr7L7QsL.mjs} +2 -2
  10. package/dist/{build-CCNlCFyu.mjs → build-CN003PPg.mjs} +1 -1
  11. package/dist/build-Ca40rJCO.mjs +1 -0
  12. package/dist/{c4Diagram-AHTNJAMY-QadWjRVL.mjs → c4Diagram-AHTNJAMY-CPm6kKNR.mjs} +2 -2
  13. package/dist/cat-RDUMLXKC-BJJIS9lB.mjs +1 -0
  14. package/dist/channel-DE79NHCf.mjs +2 -0
  15. package/dist/chmod-SYMGL4JA-C1Ie7s0s.mjs +1 -0
  16. package/dist/{chokidar-D1eNAlbX.mjs → chokidar-oNPiNLWX.mjs} +3 -3
  17. package/dist/{chunk-24IMIIXA-BoP5OA93.mjs → chunk-24IMIIXA-DaS5XS55.mjs} +2 -2
  18. package/dist/{chunk-336JU56O-5giJrfiv.mjs → chunk-336JU56O-KTMEs5Wk.mjs} +2 -2
  19. package/dist/{chunk-3THT3N7L-CBWmNncQ.mjs → chunk-3THT3N7L-B1WzJUh4.mjs} +1 -1
  20. package/dist/{chunk-426QAEUC-BGn1TCpd.mjs → chunk-426QAEUC-DUpKwtVu.mjs} +2 -2
  21. package/dist/{chunk-44UOCSGV-B6GSHp1s.mjs → chunk-44UOCSGV-BZ6LfyW2.mjs} +1 -1
  22. package/dist/{chunk-4TB4RGXK-DWREoP49.mjs → chunk-4TB4RGXK-Ct6WjPoY.mjs} +2 -2
  23. package/dist/{chunk-5FUZZQ4R-DFR5eSi-.mjs → chunk-5FUZZQ4R-Bf6nbyQG.mjs} +2 -2
  24. package/dist/{chunk-5PVQY5BW-C5V4E1lO.mjs → chunk-5PVQY5BW-DUXm3tDu.mjs} +2 -2
  25. package/dist/{chunk-5QMZ5MUS-_0tQyQsf.mjs → chunk-5QMZ5MUS-BwpNU33k.mjs} +2 -2
  26. package/dist/{chunk-62RKD26F-K5NW6_Si.mjs → chunk-62RKD26F-DebCAz0V.mjs} +2 -2
  27. package/dist/{chunk-A4JSPFCI-BA544Kdp.mjs → chunk-A4JSPFCI-CQJoYugB.mjs} +2 -2
  28. package/dist/{chunk-A5O5YHGN-Kbs3GRxW.mjs → chunk-A5O5YHGN-DApqA6Ow.mjs} +2 -2
  29. package/dist/{chunk-BBXLRYSX-OVlWa2B-.mjs → chunk-BBXLRYSX-XWD4jM9A.mjs} +2 -2
  30. package/dist/{chunk-BRGMQKJV-DtyxDw61.mjs → chunk-BRGMQKJV-CZUkYGAZ.mjs} +3 -3
  31. package/dist/{chunk-CR5AFCPT-BD_awIEP.mjs → chunk-CR5AFCPT-DN7EAdus.mjs} +2 -2
  32. package/dist/{chunk-CWQS3NFK-DNm_iIwd.mjs → chunk-CWQS3NFK-BkE4vqrf.mjs} +1 -1
  33. package/dist/{chunk-D6CWQ5DW-CaV8X9is.mjs → chunk-D6CWQ5DW-CF9bBHyK.mjs} +2 -2
  34. package/dist/{chunk-DXB73IDG-Bx-Ikbnu.mjs → chunk-DXB73IDG-F_tmy-Lz.mjs} +1 -1
  35. package/dist/{chunk-EDXVE4YY-B_wA-KGy.mjs → chunk-EDXVE4YY-CI4s3JHP.mjs} +2 -2
  36. package/dist/{chunk-ENJZ2VHE-DwiyImt2.mjs → chunk-ENJZ2VHE-CQwjtY5A.mjs} +2 -2
  37. package/dist/{chunk-F55TLFGB-AEzanSfe.mjs → chunk-F55TLFGB-BZSRX-Vi.mjs} +2 -2
  38. package/dist/{chunk-FEIOJCZD-D6YUa1Xl.mjs → chunk-FEIOJCZD-NzTooVTc.mjs} +2 -2
  39. package/dist/{chunk-GFQRA5P5-DigWkxW2.mjs → chunk-GFQRA5P5-DbAN9IDm.mjs} +1 -1
  40. package/dist/{chunk-GOV5EKKI-x0jEbztj.mjs → chunk-GOV5EKKI-CDGzZWfT.mjs} +2 -2
  41. package/dist/{chunk-HWBSOZZR-DaPTwPxK.mjs → chunk-HWBSOZZR-DQTTl_pa.mjs} +3 -3
  42. package/dist/{chunk-I57KEIP3-DpiJySG6.mjs → chunk-I57KEIP3-DSoF8c_0.mjs} +2 -2
  43. package/dist/{chunk-ICPOFSXX-D0MVsm4H.mjs → chunk-ICPOFSXX-C--tVIY5.mjs} +2 -2
  44. package/dist/{chunk-IPJHKYVM-DlQCOz2c.mjs → chunk-IPJHKYVM-CUKythEA.mjs} +1 -1
  45. package/dist/{chunk-J642UCRS-C1PS8Hwf.mjs → chunk-J642UCRS-HjD8qpZD.mjs} +2 -2
  46. package/dist/{chunk-LPQPILI2-GOcK96AE.mjs → chunk-LPQPILI2-OoVL_l9j.mjs} +2 -2
  47. package/dist/{chunk-MDDMCKUK-CuQlmIio.mjs → chunk-MDDMCKUK-ChL1CU4m.mjs} +2 -2
  48. package/dist/{chunk-MIZPJHVH-Bo1j-3C3.mjs → chunk-MIZPJHVH-BD7tHmLL.mjs} +2 -2
  49. package/dist/{chunk-MLXIYONF-DRuy-_4a.mjs → chunk-MLXIYONF-CV7WHBm-.mjs} +2 -2
  50. package/dist/{chunk-NAERJDUW-0UrOIQ6q.mjs → chunk-NAERJDUW-Cyg2DAzO.mjs} +2 -2
  51. package/dist/{chunk-NUYSJFDK-BvwS54ju.mjs → chunk-NUYSJFDK-BH2DjyxF.mjs} +2 -2
  52. package/dist/{chunk-NYQYO467-KfHLMnUW.mjs → chunk-NYQYO467-CY88QCuT.mjs} +2 -2
  53. package/dist/{chunk-OARHFVLG-Csb_cJVS.mjs → chunk-OARHFVLG-dXiYYC4o.mjs} +2 -2
  54. package/dist/{chunk-OCLXQMOG-CCPg8vjW.mjs → chunk-OCLXQMOG-DOkdFgyf.mjs} +2 -2
  55. package/dist/{chunk-OCS6LSEM-DkbaohJu.mjs → chunk-OCS6LSEM-Bcx6uxmm.mjs} +2 -2
  56. package/dist/{chunk-OJDRYQWQ-LGuZyK6R.mjs → chunk-OJDRYQWQ-CmrD0Dg2.mjs} +1 -1
  57. package/dist/{chunk-OL3S66CO-CBdL6pp1.mjs → chunk-OL3S66CO-CWEDi2F_.mjs} +2 -2
  58. package/dist/{chunk-OYMX7WX6-BrOfVMt8.mjs → chunk-OYMX7WX6-Dvg98Zb-.mjs} +2 -2
  59. package/dist/{chunk-PBXLG62G-C7MEQojr.mjs → chunk-PBXLG62G-CpvczNyQ.mjs} +2 -2
  60. package/dist/{chunk-R6VWJ2ZL-XKIhMSUi.mjs → chunk-R6VWJ2ZL-BVeTwIsz.mjs} +1 -1
  61. package/dist/{chunk-SYMJJMQ4-DUF5hY-A.mjs → chunk-SYMJJMQ4-jdmKoBFb.mjs} +2 -2
  62. package/dist/{chunk-T56QNPHK-B6DfVzfs.mjs → chunk-T56QNPHK-DmDxJbbD.mjs} +2 -2
  63. package/dist/{chunk-TLSUDHID-SuIGgADo.mjs → chunk-TLSUDHID-CSDR438C.mjs} +2 -2
  64. package/dist/{chunk-TOMNU26N-Dw9Enq1O.mjs → chunk-TOMNU26N-CrDa7MpH.mjs} +2 -2
  65. package/dist/{chunk-U2HBQHQK-DB1SzWgs.mjs → chunk-U2HBQHQK-C1Q2DiEX.mjs} +2 -2
  66. package/dist/{chunk-UNYNJIFU-HSzsM3a6.mjs → chunk-UNYNJIFU-CZ2Mla0s.mjs} +3 -3
  67. package/dist/{chunk-VLGZJRPG-CHtdu0KZ.mjs → chunk-VLGZJRPG-DpYP_EVp.mjs} +2 -2
  68. package/dist/{chunk-X2U36JSP-CqOGcGN3.mjs → chunk-X2U36JSP-BiF0R9ys.mjs} +2 -2
  69. package/dist/{chunk-XHM67O4N-2lBQUjKO.mjs → chunk-XHM67O4N-D3pxE_Og.mjs} +1 -1
  70. package/dist/{chunk-XORM457F-CJbQLVgU.mjs → chunk-XORM457F-BuPOSqOe.mjs} +2 -2
  71. package/dist/{chunk-YCFVLTST-CKzPj8PR.mjs → chunk-YCFVLTST-DsF45PbT.mjs} +2 -2
  72. package/dist/{chunk-YFG2CMIF-DBRGs_rZ.mjs → chunk-YFG2CMIF-DjdwxBNc.mjs} +2 -2
  73. package/dist/{chunk-YNYSPYQ5-DHter9G3.mjs → chunk-YNYSPYQ5-gU4-j5DO.mjs} +1 -1
  74. package/dist/{chunk-YS3AZT3J-DwQ3GyQR.mjs → chunk-YS3AZT3J-CB0wWPLc.mjs} +2 -2
  75. package/dist/{chunk-YTNYSM6T-DcovOiF_.mjs → chunk-YTNYSM6T-DpkSVTln.mjs} +2 -2
  76. package/dist/{chunk-YZCP3GAM-CkC6DoBJ.mjs → chunk-YZCP3GAM-DRdMIQsB.mjs} +2 -2
  77. package/dist/{chunk-Z6LRHWXI-BLaYoFnT.mjs → chunk-Z6LRHWXI-EsbeaQ3V.mjs} +2 -2
  78. package/dist/{chunk-ZZ45TVLE-CXznFlWR.mjs → chunk-ZZ45TVLE-DwKS4e_N.mjs} +2 -2
  79. package/dist/classDiagram-6PBFFD2Q-BrpY9pLd.mjs +2 -0
  80. package/dist/classDiagram-v2-HSJHXN6E-DDV6mz7Y.mjs +2 -0
  81. package/dist/clear-5CZ5X4YR-CHSnzs8i.mjs +1 -0
  82. package/dist/cli.mjs +59 -71
  83. package/dist/clone-BD_JFVST.mjs +2 -0
  84. package/dist/column-WLPMMSTS-DTBoovzp.mjs +1 -0
  85. package/dist/comm-5SLSESQG-DT3SY7zS.mjs +1 -0
  86. package/dist/constants-B43V8fIN.mjs +2 -0
  87. package/dist/cp-XOYR4ABJ-Bs6Rpbb2.mjs +1 -0
  88. package/dist/{curl-47BFPSFW-ClMENMWY.mjs → curl-47BFPSFW-xgS5bDTx.mjs} +2 -2
  89. package/dist/cut-OPC3VAGB-Bm1HBn07.mjs +1 -0
  90. package/dist/{dagre-KV5264BT-C5SrnhX7.mjs → dagre-KV5264BT-Ci7CcQr4.mjs} +2 -2
  91. package/dist/{dagre-LJG-5J7U.mjs → dagre-L3rg9n9q.mjs} +2 -2
  92. package/dist/date-DD7FVA2V-Dv3os04S.mjs +1 -0
  93. package/dist/{diagram-5BDNPKRD-biBuhEzo.mjs → diagram-5BDNPKRD-BM3C88Zx.mjs} +2 -2
  94. package/dist/{diagram-G4DWMVQ6-CHhS5h96.mjs → diagram-G4DWMVQ6-Dt1Kt-mj.mjs} +2 -2
  95. package/dist/{diagram-MMDJMWI5-BgulNwvp.mjs → diagram-MMDJMWI5-DomPsk0L.mjs} +2 -2
  96. package/dist/{diagram-TYMM5635-DpmgERPD.mjs → diagram-TYMM5635-eOfCqwhs.mjs} +2 -2
  97. package/dist/diff-HJF2MPDN-Di-oK2tx.mjs +1 -0
  98. package/dist/dirname-LEMTZZFS-D-u8wJ0b.mjs +1 -0
  99. package/dist/{dist-H-OAf-7x.mjs → dist-CMJUtzX1.mjs} +1 -1
  100. package/dist/{dist-DyW0okj3.mjs → dist-CWHBXHzy.mjs} +16 -16
  101. package/dist/du-WO2ENHXQ-CO_jR0w6.mjs +1 -0
  102. package/dist/echo-O45JWWI2-RBT2dq5Y.mjs +1 -0
  103. package/dist/env-5EPCWSXR-DSwwgRF5.mjs +1 -0
  104. package/dist/{erDiagram-SMLLAGMA-BNISHenz.mjs → erDiagram-SMLLAGMA-CPcwhEue.mjs} +2 -2
  105. package/dist/{esm-CsQUg9js.mjs → esm-BLMtE3s6.mjs} +1 -1
  106. package/dist/{esm-BQ4-CT8p.mjs → esm-BS2W3Uzl.mjs} +1 -1
  107. package/dist/expand-DTNXU4LQ-CtzV8vlq.mjs +1 -0
  108. package/dist/expansion-ENLSRCXJ-CNi8PTVy.mjs +1 -0
  109. package/dist/expr-5T3UU5KE-BOXtVHu2.mjs +1 -0
  110. package/dist/file-ZIGAJ4YS-Bt-1Wusv.mjs +1 -0
  111. package/dist/find-TPUOAIUQ-CJd25AiD.mjs +1 -0
  112. package/dist/{flag-coverage-QT4N2Z44-BlPYKPtd.mjs → flag-coverage-QT4N2Z44-hqAAghSo.mjs} +2 -2
  113. package/dist/{flowDiagram-DWJPFMVM-CFu645eN.mjs → flowDiagram-DWJPFMVM-WnIxEgSt.mjs} +2 -2
  114. package/dist/fold-LDSORVYE-DZ2L21IZ.mjs +1 -0
  115. package/dist/{ganttDiagram-T4ZO3ILL-DhKUbpmR.mjs → ganttDiagram-T4ZO3ILL-BJEuIZ2X.mjs} +2 -2
  116. package/dist/{getMachineId-bsd-DC8LkcdK.mjs → getMachineId-bsd-B7ue3N1o.mjs} +2 -2
  117. package/dist/{getMachineId-bsd-Bt-frlcx.mjs → getMachineId-bsd-DYQqYqxN.mjs} +2 -2
  118. package/dist/{getMachineId-bsd-DFsE-K5i.mjs → getMachineId-bsd-ucL-2FoT.mjs} +2 -2
  119. package/dist/{getMachineId-darwin-B9GQUU0e.mjs → getMachineId-darwin-BNCkZc-0.mjs} +2 -2
  120. package/dist/{getMachineId-darwin-DMNBrKWp.mjs → getMachineId-darwin-CSTYV_Bd.mjs} +2 -2
  121. package/dist/{getMachineId-darwin-DRxpszyZ.mjs → getMachineId-darwin-DWmBOUuk.mjs} +2 -2
  122. package/dist/{getMachineId-linux-D9dNX75P.mjs → getMachineId-linux-BaNp1ZEm.mjs} +2 -2
  123. package/dist/{getMachineId-linux-DOv7iOg-.mjs → getMachineId-linux-Bv6oOXxT.mjs} +2 -2
  124. package/dist/{getMachineId-linux-B5vQV4C7.mjs → getMachineId-linux-tTgUzx-Z.mjs} +2 -2
  125. package/dist/{getMachineId-unsupported-D6sWFm_K.mjs → getMachineId-unsupported-Kf9p6LJQ.mjs} +2 -2
  126. package/dist/{getMachineId-unsupported-DdAD6gRb.mjs → getMachineId-unsupported-fh_7WYkB.mjs} +2 -2
  127. package/dist/{getMachineId-unsupported-BQ6KY9w-.mjs → getMachineId-unsupported-iDvWGFBk.mjs} +2 -2
  128. package/dist/{getMachineId-win-BZsHRo32.mjs → getMachineId-win-Bo1_B38N.mjs} +2 -2
  129. package/dist/{getMachineId-win-CpDtoa22.mjs → getMachineId-win-DHmdubaR.mjs} +2 -2
  130. package/dist/{getMachineId-win-BMQSc3Xj.mjs → getMachineId-win-DQ2s9Z1n.mjs} +2 -2
  131. package/dist/{gh-detect-Ck0zE5NU.mjs → gh-detect-BIaONQmT.mjs} +3 -3
  132. package/dist/{git-handle-DY9lXoT3-CfssnuIB.mjs → git-handle-DY9lXoT3-Cmzgvwd8.mjs} +4 -4
  133. package/dist/git-handle-DdgvPBh6-Dv4DjLoy.mjs +1 -0
  134. package/dist/{gitGraphDiagram-UUTBAWPF-Cwemn6Ch.mjs → gitGraphDiagram-UUTBAWPF-BqA8KMTw.mjs} +2 -2
  135. package/dist/{graphlib-5CpUx0Yq.mjs → graphlib-BI4uS4Lx.mjs} +2 -2
  136. package/dist/grep-3AIAIJVR-CzG01gPs.mjs +1 -0
  137. package/dist/gzip-AQXSGOVS-B_BV2fa3.mjs +1 -0
  138. package/dist/head-HT2B6D2J-CjBr6WQ1.mjs +1 -0
  139. package/dist/help-VVWX7SA5-C4HsVKec.mjs +1 -0
  140. package/dist/history-J4QRNGRO-1CYG7cs0.mjs +1 -0
  141. package/dist/hostname-BK6HG2DE-BLS00ZWn.mjs +1 -0
  142. package/dist/html-to-markdown-TFCECAGV-5Fopg2Q5.mjs +1 -0
  143. package/dist/index.d.mts +1 -40
  144. package/dist/index.mjs +1 -1
  145. package/dist/{infoDiagram-42DDH7IO-D0XeM9Mm.mjs → infoDiagram-42DDH7IO-0lM1lRCH.mjs} +2 -2
  146. package/dist/init-CTGKTybp.mjs +1 -0
  147. package/dist/init-VRZmGeiJ.mjs +317 -0
  148. package/dist/{ishikawaDiagram-UXIWVN3A-vTBTHzHj.mjs → ishikawaDiagram-UXIWVN3A-j-jlqjJX.mjs} +2 -2
  149. package/dist/join-GG2LDHE5-C_A2RnwJ.mjs +1 -0
  150. package/dist/{journeyDiagram-VCZTEJTY-Dq1fLo6N.mjs → journeyDiagram-VCZTEJTY-BDX_OcrR.mjs} +2 -2
  151. package/dist/jq-ODXZBPLY-hdWY1RUY.mjs +1 -0
  152. package/dist/{js-exec-M6UR76J5-ZESSNIAK.mjs → js-exec-M6UR76J5-Cu6NIWHE.mjs} +2 -2
  153. package/dist/{kanban-definition-6JOO6SKY-B03_bODj.mjs → kanban-definition-6JOO6SKY-C5XJUD3U.mjs} +2 -2
  154. package/dist/{katex-Bif7Db7V.mjs → katex-DEJL_MaU.mjs} +1 -1
  155. package/dist/{lib-CCQO9uWA.mjs → lib-CItGM3rN.mjs} +2 -2
  156. package/dist/{libesm-_Wi8iuGI.mjs → libesm-Ob3yvbRV.mjs} +1 -1
  157. package/dist/{line-C62ka-l9.mjs → line-C6RZPh4T.mjs} +2 -2
  158. package/dist/ln-4TRFBYAT-CMm4PFgi.mjs +1 -0
  159. package/dist/loader-CU_qX_as.mjs +1 -0
  160. package/dist/{loader-Z9weMUfL.mjs → loader-Ccwo98t7.mjs} +3 -3
  161. package/dist/ls-KSXFZCWH-Beyjypib.mjs +1 -0
  162. package/dist/{lzma-BSEvzrCT.mjs → lzma-DBkyKSY9.mjs} +2 -2
  163. package/dist/md5sum-INMIK4DX-C2RH1Ljb.mjs +1 -0
  164. package/dist/{mermaid.core-LrO0u_wA.mjs → mermaid.core-CcmmzbTt.mjs} +3 -3
  165. package/dist/{mindmap-definition-QFDTVHPH-b0aFdJAS.mjs → mindmap-definition-QFDTVHPH-WLdthwDy.mjs} +2 -2
  166. package/dist/mkdir-TDEMSB6C-BeLs_C7x.mjs +1 -0
  167. package/dist/mv-Z6MORUFL-BDAoI0Wd.mjs +1 -0
  168. package/dist/nl-U5YJDM32-SP99R3HJ.mjs +1 -0
  169. package/dist/od-VJEF2UR5-BR0Ho1t5.mjs +1 -0
  170. package/dist/paste-7N6AFSDS-Bz3kd4hU.mjs +1 -0
  171. package/dist/{pieDiagram-DEJITSTG-C77h8TOO.mjs → pieDiagram-DEJITSTG-7oeIAT-R.mjs} +2 -2
  172. package/dist/preview-CekBtuZU.mjs +1 -0
  173. package/dist/{preview-DlyUih8P.mjs → preview-DTcYw4sX.mjs} +2 -2
  174. package/dist/printf-CX64KX2P-GrZNCK4M.mjs +1 -0
  175. package/dist/public/assets/{ActivityModeContent-QvRIx_do.js → ActivityModeContent-CNxdYTCc.js} +1 -1
  176. package/dist/public/assets/{DocumentContext-zL3ZbwDo.js → DocumentContext-bNGvFuJS.js} +1 -1
  177. package/dist/public/assets/{GraphPanel-DiyMfzQg.js → GraphPanel-D5yxV_ez.js} +1 -1
  178. package/dist/public/assets/{ManagedArtifactProperties-OxkUY14x.js → ManagedArtifactProperties-CRYWYGK4.js} +1 -1
  179. package/dist/public/assets/McpConsentDialogBody-Dr_AIi2H.js +1 -0
  180. package/dist/public/assets/{PropertyPanel-D9A27c2E.js → PropertyPanel-DgbQo3wG.js} +1 -1
  181. package/dist/public/assets/{SettingsDialogBody-cotnwVMw.js → SettingsDialogBody-CU-nEwde.js} +1 -1
  182. package/dist/public/assets/{SkillEditorActions-BsGotb40.js → SkillEditorActions-Bfh-iuK_.js} +1 -1
  183. package/dist/public/assets/{SourceEditor-BZ3cbLjs.js → SourceEditor-CAUoNOTU.js} +1 -1
  184. package/dist/public/assets/{TerminalPanel-XlICQw5o.js → TerminalPanel-Ds-ev2-D.js} +1 -1
  185. package/dist/public/assets/{config-validation-events-yB2QWKKJ.js → config-validation-events-DiOTHiAz.js} +1 -1
  186. package/dist/public/assets/{dist-BRGUidv4.js → dist-GmorMgHF.js} +6 -8
  187. package/dist/public/assets/{documents-events-DA8Q5ICz.js → documents-events-CSQluyCM.js} +1 -1
  188. package/dist/public/assets/{file-tree-adapter-CP3Xa3us.js → file-tree-adapter-TDYabCI-.js} +1 -1
  189. package/dist/public/assets/{index-CzFOYplh.js → index-BeB8EEj0.js} +93 -93
  190. package/dist/public/assets/index-hY8weMMg.css +1 -0
  191. package/dist/public/assets/{keyboard-shortcuts-DOkzBlgc.js → keyboard-shortcuts-CZysvuV8.js} +1 -1
  192. package/dist/public/assets/{navigation-targets-DNRja8Z0.js → navigation-targets-CXdtVjj4.js} +1 -1
  193. package/dist/public/assets/{open-managed-artifact-tab-DBkxdYp_.js → open-managed-artifact-tab-CvsZjaW-.js} +1 -1
  194. package/dist/public/assets/{prop-types-C-aZftyS.js → prop-types-C_2IQGCC.js} +1 -1
  195. package/dist/public/assets/{selection-context-vh0MmCBb.js → selection-context-B6kAEK37.js} +1 -1
  196. package/dist/public/assets/{skill-actions-Sc4IN52j.js → skill-actions-CPoGr_7b.js} +1 -1
  197. package/dist/public/assets/{skills-api-ts3L80AV.js → skills-api-mcV6MiPo.js} +1 -1
  198. package/dist/public/assets/{target-navigation-intent-CIKQ1Hj-.js → target-navigation-intent-C4nLupIH.js} +1 -1
  199. package/dist/public/assets/{typing-burst-detector-BT98lJOb.js → typing-burst-detector-DEl5qeGr.js} +1 -1
  200. package/dist/public/index.html +17 -17
  201. package/dist/pwd-D4OZ7N27-DDRhZsId.mjs +1 -0
  202. package/dist/{python3-AUFTPCU6-B7_jrPM3.mjs → python3-AUFTPCU6-DmPp1QHj.mjs} +2 -2
  203. package/dist/{quadrantDiagram-34T5L4WZ-CLL-GTlz.mjs → quadrantDiagram-34T5L4WZ-DWVBhb1E.mjs} +2 -2
  204. package/dist/readlink-MI4GCHJF-mNeJ3km7.mjs +1 -0
  205. package/dist/{repair-launch-json-DgKo_ct3.mjs → repair-launch-json-CQi2Gb_O.mjs} +2 -2
  206. package/dist/repair-mcp-configs-C_aVjx-w.mjs +2 -0
  207. package/dist/repair-skills-BFe09bLm.mjs +1 -0
  208. package/dist/repair-skills-xrYOvyVd.mjs +3 -0
  209. package/dist/{requirementDiagram-MS252O5E-JIzm76n0.mjs → requirementDiagram-MS252O5E-Bneel37I.mjs} +2 -2
  210. package/dist/rev-XOSYPP45-KAKdorsx.mjs +1 -0
  211. package/dist/rg-FOQSCCX3-BWOdKDEd.mjs +1 -0
  212. package/dist/rm-RTZG23RL-D4Xj3X_m.mjs +1 -0
  213. package/dist/rmdir-XTQXT7RK-Bx-u3U5l.mjs +1 -0
  214. package/dist/{sankeyDiagram-XADWPNL6-Bpk8eTPe.mjs → sankeyDiagram-XADWPNL6-4f2f9-uf.mjs} +2 -2
  215. package/dist/sed-VFTTATXJ-DmL_7Y-J.mjs +1 -0
  216. package/dist/seq-RN5ZUASB-DeaNEJEM.mjs +1 -0
  217. package/dist/{sequenceDiagram-FGHM5R23-CHCigzvZ.mjs → sequenceDiagram-FGHM5R23-B1K4VtLp.mjs} +2 -2
  218. package/dist/server-lock-8Lv6A-Xa-B4jggKdG.mjs +1 -0
  219. package/dist/{server-lock-CN2YHwpP-BYuwTc93.mjs → server-lock-CN2YHwpP-Cwa4llpq.mjs} +73 -73
  220. package/dist/sha1sum-VJPNLNU6-DYUNX0rt.mjs +1 -0
  221. package/dist/sha256sum-PI32XWXY-BwDMGEnF.mjs +1 -0
  222. package/dist/sleep-VZFPZFWA-D3IG7CwN.mjs +1 -0
  223. package/dist/sort-DCNRDA7U-BfL8J8kf.mjs +1 -0
  224. package/dist/split-SITCSYCZ-Q5NIWguo.mjs +1 -0
  225. package/dist/sqlite3-56UMWEY3-DA8bw7DG.mjs +1 -0
  226. package/dist/src-B4ueRPSp.mjs +3 -0
  227. package/dist/start-2TGfkITh.mjs +3 -0
  228. package/dist/start-DzdUFQz6.mjs +1 -0
  229. package/dist/stat-BT5A227F-CYFqsI8W.mjs +1 -0
  230. package/dist/{stateDiagram-FHFEXIEX-CiIJxbDV.mjs → stateDiagram-FHFEXIEX-BREbMXiC.mjs} +2 -2
  231. package/dist/stateDiagram-v2-QKLJ7IA2-DQeH2s3K.mjs +2 -0
  232. package/dist/strings-7PLOGTPD-BLW4mXRs.mjs +1 -0
  233. package/dist/tac-SJGXQ4T2-BGR2Dq7O.mjs +1 -0
  234. package/dist/tail-S5ULNTJU-BOBd42y5.mjs +1 -0
  235. package/dist/tar-ANUBEFJY-DCUS8bvA.mjs +1 -0
  236. package/dist/tee-O7VXZDCO-Bg8MXC_K.mjs +1 -0
  237. package/dist/time-DEUO3QV2-CxVP9vXG.mjs +1 -0
  238. package/dist/{timeline-definition-GMOUNBTQ-BBhlpYO9.mjs → timeline-definition-GMOUNBTQ-Bd7XEw7o.mjs} +2 -2
  239. package/dist/timeout-VRKMCG72-CVG2Q30a.mjs +1 -0
  240. package/dist/touch-DX2IJOQ4-DmEja_Fu.mjs +1 -0
  241. package/dist/tr-2HXZRDSW-DWcyuCoi.mjs +1 -0
  242. package/dist/tree-LYXBS7DC-CFaeUWGI.mjs +1 -0
  243. package/dist/true-WHJNXCHG-CJH22fVg.mjs +1 -0
  244. package/dist/unexpand-RGTMIGZM-Uj1QzdPV.mjs +1 -0
  245. package/dist/uniq-SUNANL47-MRCnRrGo.mjs +1 -0
  246. package/dist/{vennDiagram-DHZGUBPP-CATweP9B.mjs → vennDiagram-DHZGUBPP-Bk-INjRY.mjs} +2 -2
  247. package/dist/{wardleyDiagram-NUSXRM2D-3qxY3I6a.mjs → wardleyDiagram-NUSXRM2D-DOD6wQla.mjs} +2 -2
  248. package/dist/wc-TQB3VNOX-JPk1lni-.mjs +1 -0
  249. package/dist/which-XZHEH76L-Cl63MOrV.mjs +1 -0
  250. package/dist/whoami-DGKU3D2X-CB3itqHE.mjs +1 -0
  251. package/dist/{wrapper-CGw3ogaz.mjs → wrapper-BZO_sIci.mjs} +1 -1
  252. package/dist/write-project-skill-CRxX-42S.mjs +12 -0
  253. package/dist/xan-BXDXYEIB-ZPqGVO90.mjs +1 -0
  254. package/dist/xan-view-ECQUO7AJ-C-WHEJiv.mjs +1 -0
  255. package/dist/xargs-I6EZUCYF-BvcSF5Y7.mjs +1 -0
  256. package/dist/{xychartDiagram-5P7HB3ND-BAWpa2N2.mjs → xychartDiagram-5P7HB3ND-B4AGYFQs.mjs} +2 -2
  257. package/dist/yazl-CQSNnbvt.mjs +1 -0
  258. package/dist/{yazl-DgCFuIuD.mjs → yazl-Docqgl6q.mjs} +1 -1
  259. package/dist/yq-MJMAR36V-_D_zdU3z.mjs +1 -0
  260. package/package.json +1 -1
  261. package/dist/alias-JE7RI5QX-DxvTrQH3.mjs +0 -1
  262. package/dist/awk2-POPGKRAI-6Q9HKhoL.mjs +0 -1
  263. package/dist/base64-4YMZCVJ5-bqN_UBX0.mjs +0 -1
  264. package/dist/basename-AA2KJYZQ-GWPOMupJ.mjs +0 -1
  265. package/dist/bash-IJWYRKFO-C7Yi9aK0.mjs +0 -1
  266. package/dist/build-gfyDk62R.mjs +0 -1
  267. package/dist/cat-RDUMLXKC-Cqi4_PjZ.mjs +0 -1
  268. package/dist/channel-Dq8ADXfq.mjs +0 -2
  269. package/dist/chmod-SYMGL4JA-C_dD-tNl.mjs +0 -1
  270. package/dist/classDiagram-6PBFFD2Q-cIblqhKe.mjs +0 -2
  271. package/dist/classDiagram-v2-HSJHXN6E-CnZ_g-6O.mjs +0 -2
  272. package/dist/clear-5CZ5X4YR-C4DTv-gF.mjs +0 -1
  273. package/dist/clone-s6xjJkoz.mjs +0 -2
  274. package/dist/column-WLPMMSTS-Bg1ZsVDm.mjs +0 -1
  275. package/dist/comm-5SLSESQG-CTh1BUfn.mjs +0 -1
  276. package/dist/constants-m4f9Gwpu.mjs +0 -2
  277. package/dist/cp-XOYR4ABJ-VqiK1WcH.mjs +0 -1
  278. package/dist/cut-OPC3VAGB-BDAM8WY8.mjs +0 -1
  279. package/dist/date-DD7FVA2V-nDqDn5ZQ.mjs +0 -1
  280. package/dist/diff-HJF2MPDN-DSY9AfjL.mjs +0 -1
  281. package/dist/dirname-LEMTZZFS-VsUIxZwx.mjs +0 -1
  282. package/dist/du-WO2ENHXQ-Cq3dzRFU.mjs +0 -1
  283. package/dist/echo-O45JWWI2-B99ElfBo.mjs +0 -1
  284. package/dist/env-5EPCWSXR-CsaomJHQ.mjs +0 -1
  285. package/dist/expand-DTNXU4LQ-Bp3M0RnL.mjs +0 -1
  286. package/dist/expansion-ENLSRCXJ-C5xjxYTl.mjs +0 -1
  287. package/dist/expr-5T3UU5KE-DrJUreFq.mjs +0 -1
  288. package/dist/file-ZIGAJ4YS-D07ChhI1.mjs +0 -1
  289. package/dist/find-TPUOAIUQ-ZPOxwUwf.mjs +0 -1
  290. package/dist/fold-LDSORVYE-Bx5XDGgK.mjs +0 -1
  291. package/dist/git-handle-DdgvPBh6-C80s8fFN.mjs +0 -1
  292. package/dist/grep-3AIAIJVR-Bh6KBg6d.mjs +0 -1
  293. package/dist/gzip-AQXSGOVS-BtiMTiZG.mjs +0 -1
  294. package/dist/head-HT2B6D2J-DSAed845.mjs +0 -1
  295. package/dist/help-VVWX7SA5-DCBusWam.mjs +0 -1
  296. package/dist/history-J4QRNGRO-BwBOMO5i.mjs +0 -1
  297. package/dist/hostname-BK6HG2DE-_qJ9gN13.mjs +0 -1
  298. package/dist/html-to-markdown-TFCECAGV-D7XdAo13.mjs +0 -1
  299. package/dist/init-BbVUxVGS.mjs +0 -321
  300. package/dist/init-Cxp98ROz.mjs +0 -1
  301. package/dist/join-GG2LDHE5-BMnXfCXQ.mjs +0 -1
  302. package/dist/jq-ODXZBPLY-D3tmTL1R.mjs +0 -1
  303. package/dist/ln-4TRFBYAT-Byit-TLI.mjs +0 -1
  304. package/dist/loader-UdRFiBKU.mjs +0 -1
  305. package/dist/ls-KSXFZCWH-CNZ_hN8P.mjs +0 -1
  306. package/dist/md5sum-INMIK4DX-pTX2tfQd.mjs +0 -1
  307. package/dist/mkdir-TDEMSB6C-Bl16kSBR.mjs +0 -1
  308. package/dist/mv-Z6MORUFL-D9pw6nb9.mjs +0 -1
  309. package/dist/nl-U5YJDM32-Bs_nMrMg.mjs +0 -1
  310. package/dist/od-VJEF2UR5-DwpkPMHp.mjs +0 -1
  311. package/dist/paste-7N6AFSDS-C8EyimeA.mjs +0 -1
  312. package/dist/preview-BUIvO8U0.mjs +0 -1
  313. package/dist/printf-CX64KX2P-2Mks7IIT.mjs +0 -1
  314. package/dist/public/assets/McpConsentDialogBody-ByCv3Eox.js +0 -1
  315. package/dist/public/assets/index-CG7gf_6X.css +0 -1
  316. package/dist/pwd-D4OZ7N27-m5fzqroZ.mjs +0 -1
  317. package/dist/readlink-MI4GCHJF-BMheCA1U.mjs +0 -1
  318. package/dist/repair-mcp-configs-DUZFjiWh.mjs +0 -2
  319. package/dist/repair-skills-BGQinwio.mjs +0 -3
  320. package/dist/repair-skills-BQP8U0AN.mjs +0 -1
  321. package/dist/rev-XOSYPP45-4azlKYu4.mjs +0 -1
  322. package/dist/rg-FOQSCCX3-ViKChHv5.mjs +0 -1
  323. package/dist/rm-RTZG23RL-F9g7gQHU.mjs +0 -1
  324. package/dist/rmdir-XTQXT7RK-CFMuhNvO.mjs +0 -1
  325. package/dist/sed-VFTTATXJ-BfHBQ11q.mjs +0 -1
  326. package/dist/seq-RN5ZUASB-BaUQfYSh.mjs +0 -1
  327. package/dist/server-lock-8Lv6A-Xa-xTK-ENFB.mjs +0 -1
  328. package/dist/sha1sum-VJPNLNU6-NRAU83Yg.mjs +0 -1
  329. package/dist/sha256sum-PI32XWXY-Cfe-w5CY.mjs +0 -1
  330. package/dist/sleep-VZFPZFWA-BgSOeH2N.mjs +0 -1
  331. package/dist/sort-DCNRDA7U-DqMg1dll.mjs +0 -1
  332. package/dist/split-SITCSYCZ-DqhMcIGL.mjs +0 -1
  333. package/dist/sqlite3-56UMWEY3-DNmhrHQv.mjs +0 -1
  334. package/dist/src-B8E2dBvX.mjs +0 -3
  335. package/dist/start-BbTUyYTc.mjs +0 -3
  336. package/dist/start-BoQjiYiU.mjs +0 -1
  337. package/dist/stat-BT5A227F-DOG39Ce5.mjs +0 -1
  338. package/dist/stateDiagram-v2-QKLJ7IA2-CTdt2FVd.mjs +0 -2
  339. package/dist/strings-7PLOGTPD-l9kho9ff.mjs +0 -1
  340. package/dist/tac-SJGXQ4T2-DMDGVNTy.mjs +0 -1
  341. package/dist/tail-S5ULNTJU-knoYRbXD.mjs +0 -1
  342. package/dist/tar-ANUBEFJY-Db9qg5B2.mjs +0 -1
  343. package/dist/tee-O7VXZDCO-BgHEibOy.mjs +0 -1
  344. package/dist/time-DEUO3QV2-CXWA3kJ0.mjs +0 -1
  345. package/dist/timeout-VRKMCG72-aaC7r4sX.mjs +0 -1
  346. package/dist/touch-DX2IJOQ4-DGiKr2c0.mjs +0 -1
  347. package/dist/tr-2HXZRDSW-BDNDgux2.mjs +0 -1
  348. package/dist/tree-LYXBS7DC-BK2c44-E.mjs +0 -1
  349. package/dist/true-WHJNXCHG-B6CZ-ZF1.mjs +0 -1
  350. package/dist/unexpand-RGTMIGZM-BWFllY1p.mjs +0 -1
  351. package/dist/uniq-SUNANL47-CiXMC2Qh.mjs +0 -1
  352. package/dist/wc-TQB3VNOX-Bof613yN.mjs +0 -1
  353. package/dist/which-XZHEH76L-DfnqWxtA.mjs +0 -1
  354. package/dist/whoami-DGKU3D2X-DhtD1OhF.mjs +0 -1
  355. package/dist/write-project-skill-DzjtpVMW.mjs +0 -36
  356. package/dist/xan-BXDXYEIB-I8yansvE.mjs +0 -1
  357. package/dist/xan-view-ECQUO7AJ-DJhdCPf3.mjs +0 -1
  358. package/dist/xargs-I6EZUCYF-CdKFilDT.mjs +0 -1
  359. package/dist/yazl-Clfc09F-.mjs +0 -1
  360. package/dist/yq-MJMAR36V-BXyMiYfX.mjs +0 -1
@@ -1,4 +1,4 @@
1
- import{s as e}from"./chunk-C94x7I9S.mjs";import{T as t,p as n,w as r}from"./src-BkCVz_TJ.mjs";import{L as i,R as a,b as o,h as s,j as c,k as l,w as u,y as d}from"./chunk-ICPOFSXX-D0MVsm4H.mjs";import{i as f,l as p,n as m}from"./chunk-5PVQY5BW-C5V4E1lO.mjs";import{n as h,r as g}from"./chunk-U2HBQHQK-DB1SzWgs.mjs";import{n as _,t as v}from"./chunk-ZZ45TVLE-CXznFlWR.mjs";import{a as y,i as b,r as x,t as S}from"./chunk-X2U36JSP-CqOGcGN3.mjs";import{t as C}from"./rough.cjs-C-63phNL.mjs";var w=e(C(),1),T=r(async(e,t,r)=>{let a,c=t.useHtmlLabels||s(o()?.htmlLabels);a=r||`node default`;let l=e.insert(`g`).attr(`class`,a).attr(`id`,t.domId||t.id),u=l.insert(`g`).attr(`class`,`label`).attr(`style`,p(t.labelStyle)),d;d=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let m=!!t.icon||!!t.img,g=t.labelType===`markdown`,_=await h(u,i(f(d),o()),{useHtmlLabels:c,width:t.width||o().flowchart?.wrappingWidth,classes:g?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:m,markdown:g},o()),y=_.getBBox(),b=(t?.padding??0)/2;if(c){let e=_.children[0],t=n(_);await v(e,d),y=e.getBoundingClientRect(),t.attr(`width`,y.width),t.attr(`height`,y.height)}return c?u.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`):u.attr(`transform`,`translate(0, `+-y.height/2+`)`),t.centerLabel&&u.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`),u.insert(`rect`,`:first-child`),{shapeSvg:l,bbox:y,halfPadding:b,label:u}},`labelHelper`),E=r(async(e,t,r)=>{let a=r.useHtmlLabels??u(o()),s=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),c=await h(s,i(f(t),o()),{useHtmlLabels:a,width:r.width||o()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),l=c.getBBox(),d=r.padding/2;if(u(o())){let e=c.children[0],t=n(c);l=e.getBoundingClientRect(),t.attr(`width`,l.width),t.attr(`height`,l.height)}return a?s.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):s.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&s.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:l,halfPadding:d,label:s}},`insertLabel`),D=r((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),O=r((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function k(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}r(k,`createPathFromPoints`);function A(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}r(A,`generateFullSineWavePoints`);function j(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}r(j,`generateCirclePoints`);function M(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,i);let a=t.find(e=>e.getAttribute(`fill`)!==`none`),o=t.find(e=>e.getAttribute(`stroke`)!==`none`),s=r((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(n),c}r(M,`mergePaths`);var N=r((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),P=r(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let s=o(),c=u(s);return await h(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`),F=r((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),I=r(async(e,r)=>{t.info(`Creating subgraph rect for `,r.id,r);let i=o(),{themeVariables:a,handDrawnSeed:s}=i,{clusterBkg:c,clusterBorder:l}=a,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:m}=b(r),g=e.insert(`g`).attr(`class`,`cluster `+r.cssClasses).attr(`id`,r.domId).attr(`data-look`,r.look),v=u(i),x=g.insert(`g`).attr(`class`,`cluster-label `),S;S=r.labelType===`markdown`?await h(x,r.label,{style:r.labelStyle,useHtmlLabels:v,isNode:!0,width:r.width}):await P(x,r.label,r.labelStyle||``,!1,!0);let C=S.getBBox();if(u(i)){let e=S.children[0],t=n(S);C=e.getBoundingClientRect(),t.attr(`width`,C.width),t.attr(`height`,C.height)}let T=r.width<=C.width+r.padding?C.width+r.padding:r.width;r.width<=C.width+r.padding?r.diff=(T-r.width)/2-r.padding:r.diff=-r.padding;let E=r.height,D=r.x-T/2,O=r.y-E/2;t.trace(`Data `,r,JSON.stringify(r));let k;if(r.look===`handDrawn`){let e=w.default.svg(g),n=y(r,{roughness:.7,fill:c,stroke:l,fillWeight:3,seed:s}),i=e.path(F(D,O,T,E,0),n);k=g.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,m.join(`;`).replace(`fill`,`stroke`))}else k=g.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,r.rx).attr(`ry`,r.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=_(i);if(x.attr(`transform`,`translate(${r.x-C.width/2}, ${r.y-r.height/2+A})`),d){let e=x.select(`span`);e&&e.attr(`style`,d)}let j=k.node().getBBox();return r.offsetX=0,r.width=j.width,r.height=j.height,r.offsetY=C.height-r.padding/2,r.intersect=function(e){return N(r,e)},{cluster:g,labelBBox:C}},`rect`),ee={rect:I,squareRect:I,roundedWithTitle:r(async(e,t)=>{let r=o(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:s,compositeBackground:c,compositeTitleBackground:l,nodeBorder:d}=i,f=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),p=f.insert(`g`,`:first-child`),m=f.insert(`g`).attr(`class`,`cluster-label`),h=f.append(`rect`),g=await P(m,t.label,t.labelStyle,void 0,!0),_=g.getBBox();if(u(r)){let e=g.children[0],t=n(g);_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}let v=0*t.padding,y=v/2,b=(t.width<=_.width+t.padding?_.width+t.padding:t.width)+v;t.width<=_.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height+v,S=t.height+v-_.height-6,C=t.x-b/2,T=t.y-x/2;t.width=b;let E=t.y-t.height/2-y+_.height+2,D;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=w.default.svg(f),r=t.rx||t.ry?n.path(F(C,T,b,x,10),{roughness:.7,fill:l,fillStyle:`solid`,stroke:d,seed:a}):n.rectangle(C,T,b,x,{seed:a});D=f.insert(()=>r,`:first-child`);let i=n.rectangle(C,E,b,S,{fill:e?s:c,fillStyle:e?`hachure`:`solid`,stroke:d,seed:a});D=f.insert(()=>r,`:first-child`),h=f.insert(()=>i)}else D=p.insert(`rect`,`:first-child`),D.attr(`class`,`outer`).attr(`x`,C).attr(`y`,T).attr(`width`,b).attr(`height`,x).attr(`data-look`,t.look),h.attr(`class`,`inner`).attr(`x`,C).attr(`y`,E).attr(`width`,b).attr(`height`,S);return m.attr(`transform`,`translate(${t.x-_.width/2}, ${T+1-(u(r)?0:3)})`),t.height=D.node().getBBox().height,t.offsetX=0,t.offsetY=_.height-t.padding/2,t.labelBBox=_,t.intersect=function(e){return N(t,e)},{cluster:f,labelBBox:_}},`roundedWithTitle`),noteGroup:r((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return N(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:r((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=o(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),s=a.insert(`g`,`:first-child`),c=0*t.padding,l=t.width+c;t.diff=-t.padding;let u=t.height+c,d=t.x-l/2,f=t.y-u/2;t.width=l;let p;if(t.look===`handDrawn`){let e=w.default.svg(a).rectangle(d,f,l,u,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});p=a.insert(()=>e,`:first-child`)}else{p=s.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),p.attr(`class`,e).attr(`x`,d).attr(`y`,f).attr(`width`,l).attr(`height`,u).attr(`data-look`,t.look)}return t.height=p.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return N(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:r(async(e,r)=>{t.info(`Creating subgraph rect for `,r.id,r);let i=o(),{themeVariables:a,handDrawnSeed:s}=i,{clusterBkg:c,clusterBorder:l}=a,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:m}=b(r),g=e.insert(`g`).attr(`class`,`cluster `+r.cssClasses).attr(`id`,r.domId).attr(`data-look`,r.look),v=u(i),x=g.insert(`g`).attr(`class`,`cluster-label `),S=await h(x,r.label,{style:r.labelStyle,useHtmlLabels:v,isNode:!0,width:r.width}),C=S.getBBox();if(u(i)){let e=S.children[0],t=n(S);C=e.getBoundingClientRect(),t.attr(`width`,C.width),t.attr(`height`,C.height)}let T=r.width<=C.width+r.padding?C.width+r.padding:r.width;r.width<=C.width+r.padding?r.diff=(T-r.width)/2-r.padding:r.diff=-r.padding;let E=r.height,D=r.x-T/2,O=r.y-E/2;t.trace(`Data `,r,JSON.stringify(r));let k;if(r.look===`handDrawn`){let e=w.default.svg(g),n=y(r,{roughness:.7,fill:c,stroke:l,fillWeight:4,seed:s}),i=e.path(F(D,O,T,E,r.rx),n);k=g.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,m.join(`;`).replace(`fill`,`stroke`))}else k=g.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,r.rx).attr(`ry`,r.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=_(i);if(x.attr(`transform`,`translate(${r.x-C.width/2}, ${r.y-r.height/2+A})`),d){let e=x.select(`span`);e&&e.attr(`style`,d)}let j=k.node().getBBox();return r.offsetX=0,r.width=j.width,r.height=j.height,r.offsetY=C.height-r.padding/2,r.intersect=function(e){return N(r,e)},{cluster:g,labelBBox:C}},`kanbanSection`)},te=new Map,L=r(async(e,t)=>{let n=await ee[t.shape||`rect`](e,t);return te.set(t.id,n),n},`insertCluster`),R=r(()=>{te=new Map},`clear`);function ne(e,t){return e.intersect(t)}r(ne,`intersectNode`);var z=ne;function B(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}r(B,`intersectEllipse`);var V=B;function H(e,t,n){return V(e,t,t,n)}r(H,`intersectCircle`);var re=H;function ie(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&U(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&U(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}r(ie,`intersectLine`);function U(e,t){return e*t>0}r(U,`sameSign`);var W=ie;function G(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=W(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}r(G,`intersectPolygon`);var K={node:z,circle:re,ellipse:V,polygon:G,rect:N};function ae(e,n){let{labelStyles:r}=b(n);n.labelStyle=r;let i=O(n),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),{cssStyles:s}=n,c=w.default.svg(o),l=y(n,{fill:`black`,stroke:`none`,fillStyle:`solid`});n.look!==`handDrawn`&&(l.roughness=0);let u=c.circle(0,0,2,l),d=o.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,p(s)),D(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),K.circle(n,1,e)},o}r(ae,`anchor`);function oe(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}r(oe,`generateArcPoints`);function se(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}r(se,`calculateArcSagitta`);async function ce(e,t){let{labelStyles:n,nodeStyles:i}=b(t);t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?16:a,s=t.look===`neo`?12:a,c=r(e=>e+s,`calcTotalHeight`),l=r(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await T(e,t,O(t)),f=c(t?.height?t?.height:d.height),[p,m]=l(f),h=se(f,p,m),g=(t?.width?t?.width:d.width)+o*2+h-h,_=f,{cssStyles:v}=t,x=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...oe(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...oe(g/2,_/2,g/2,-_/2,p,m,!0)],S=w.default.svg(u),C=y(t,{});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let E=k(x),A=S.path(E,C),j=u.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,v),i&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,i),j.attr(`transform`,`translate(${p/2}, 0)`),D(t,j),t.intersect=function(e){return K.polygon(t,x,e)},u}r(ce,`bowTieRect`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}r(q,`insertPolygonShape`);var le=12;async function ue(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+le),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+le,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+le},{x:0+le,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=w.default.svg(s),n=y(t,{}),r=k(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),D(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}r(ue,`card`);function de(e,t){let{nodeStyles:n}=b(t);t.label=``;let r=e.insert(`g`).attr(`class`,O(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=w.default.svg(r),c=y(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=k(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}r(de,`choice`);async function fe(e,n,r){let{labelStyles:i,nodeStyles:a}=b(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await T(e,n,O(n)),l=r?.padding??c,u=n.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=n;if(n.look===`handDrawn`){let e=w.default.svg(o),t=y(n,{}),r=e.circle(0,0,u*2,t);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,p(f))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return D(n,d),n.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,u,e),K.circle(n,u,e)},o}r(fe,`circle`);function pe(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
1
+ import{s as e}from"./chunk-C94x7I9S.mjs";import{T as t,p as n,w as r}from"./src-BkCVz_TJ.mjs";import{L as i,R as a,b as o,h as s,j as c,k as l,w as u,y as d}from"./chunk-ICPOFSXX-C--tVIY5.mjs";import{i as f,l as p,n as m}from"./chunk-5PVQY5BW-DUXm3tDu.mjs";import{n as h,r as g}from"./chunk-U2HBQHQK-C1Q2DiEX.mjs";import{n as _,t as v}from"./chunk-ZZ45TVLE-DwKS4e_N.mjs";import{a as y,i as b,r as x,t as S}from"./chunk-X2U36JSP-BiF0R9ys.mjs";import{t as C}from"./rough.cjs-C-63phNL.mjs";var w=e(C(),1),T=r(async(e,t,r)=>{let a,c=t.useHtmlLabels||s(o()?.htmlLabels);a=r||`node default`;let l=e.insert(`g`).attr(`class`,a).attr(`id`,t.domId||t.id),u=l.insert(`g`).attr(`class`,`label`).attr(`style`,p(t.labelStyle)),d;d=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let m=!!t.icon||!!t.img,g=t.labelType===`markdown`,_=await h(u,i(f(d),o()),{useHtmlLabels:c,width:t.width||o().flowchart?.wrappingWidth,classes:g?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:m,markdown:g},o()),y=_.getBBox(),b=(t?.padding??0)/2;if(c){let e=_.children[0],t=n(_);await v(e,d),y=e.getBoundingClientRect(),t.attr(`width`,y.width),t.attr(`height`,y.height)}return c?u.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`):u.attr(`transform`,`translate(0, `+-y.height/2+`)`),t.centerLabel&&u.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`),u.insert(`rect`,`:first-child`),{shapeSvg:l,bbox:y,halfPadding:b,label:u}},`labelHelper`),E=r(async(e,t,r)=>{let a=r.useHtmlLabels??u(o()),s=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),c=await h(s,i(f(t),o()),{useHtmlLabels:a,width:r.width||o()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),l=c.getBBox(),d=r.padding/2;if(u(o())){let e=c.children[0],t=n(c);l=e.getBoundingClientRect(),t.attr(`width`,l.width),t.attr(`height`,l.height)}return a?s.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):s.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&s.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:l,halfPadding:d,label:s}},`insertLabel`),D=r((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),O=r((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function k(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}r(k,`createPathFromPoints`);function A(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}r(A,`generateFullSineWavePoints`);function j(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}r(j,`generateCirclePoints`);function M(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,i);let a=t.find(e=>e.getAttribute(`fill`)!==`none`),o=t.find(e=>e.getAttribute(`stroke`)!==`none`),s=r((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(n),c}r(M,`mergePaths`);var N=r((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),P=r(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let s=o(),c=u(s);return await h(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`),F=r((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),I=r(async(e,r)=>{t.info(`Creating subgraph rect for `,r.id,r);let i=o(),{themeVariables:a,handDrawnSeed:s}=i,{clusterBkg:c,clusterBorder:l}=a,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:m}=b(r),g=e.insert(`g`).attr(`class`,`cluster `+r.cssClasses).attr(`id`,r.domId).attr(`data-look`,r.look),v=u(i),x=g.insert(`g`).attr(`class`,`cluster-label `),S;S=r.labelType===`markdown`?await h(x,r.label,{style:r.labelStyle,useHtmlLabels:v,isNode:!0,width:r.width}):await P(x,r.label,r.labelStyle||``,!1,!0);let C=S.getBBox();if(u(i)){let e=S.children[0],t=n(S);C=e.getBoundingClientRect(),t.attr(`width`,C.width),t.attr(`height`,C.height)}let T=r.width<=C.width+r.padding?C.width+r.padding:r.width;r.width<=C.width+r.padding?r.diff=(T-r.width)/2-r.padding:r.diff=-r.padding;let E=r.height,D=r.x-T/2,O=r.y-E/2;t.trace(`Data `,r,JSON.stringify(r));let k;if(r.look===`handDrawn`){let e=w.default.svg(g),n=y(r,{roughness:.7,fill:c,stroke:l,fillWeight:3,seed:s}),i=e.path(F(D,O,T,E,0),n);k=g.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,m.join(`;`).replace(`fill`,`stroke`))}else k=g.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,r.rx).attr(`ry`,r.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=_(i);if(x.attr(`transform`,`translate(${r.x-C.width/2}, ${r.y-r.height/2+A})`),d){let e=x.select(`span`);e&&e.attr(`style`,d)}let j=k.node().getBBox();return r.offsetX=0,r.width=j.width,r.height=j.height,r.offsetY=C.height-r.padding/2,r.intersect=function(e){return N(r,e)},{cluster:g,labelBBox:C}},`rect`),ee={rect:I,squareRect:I,roundedWithTitle:r(async(e,t)=>{let r=o(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:s,compositeBackground:c,compositeTitleBackground:l,nodeBorder:d}=i,f=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),p=f.insert(`g`,`:first-child`),m=f.insert(`g`).attr(`class`,`cluster-label`),h=f.append(`rect`),g=await P(m,t.label,t.labelStyle,void 0,!0),_=g.getBBox();if(u(r)){let e=g.children[0],t=n(g);_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}let v=0*t.padding,y=v/2,b=(t.width<=_.width+t.padding?_.width+t.padding:t.width)+v;t.width<=_.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height+v,S=t.height+v-_.height-6,C=t.x-b/2,T=t.y-x/2;t.width=b;let E=t.y-t.height/2-y+_.height+2,D;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=w.default.svg(f),r=t.rx||t.ry?n.path(F(C,T,b,x,10),{roughness:.7,fill:l,fillStyle:`solid`,stroke:d,seed:a}):n.rectangle(C,T,b,x,{seed:a});D=f.insert(()=>r,`:first-child`);let i=n.rectangle(C,E,b,S,{fill:e?s:c,fillStyle:e?`hachure`:`solid`,stroke:d,seed:a});D=f.insert(()=>r,`:first-child`),h=f.insert(()=>i)}else D=p.insert(`rect`,`:first-child`),D.attr(`class`,`outer`).attr(`x`,C).attr(`y`,T).attr(`width`,b).attr(`height`,x).attr(`data-look`,t.look),h.attr(`class`,`inner`).attr(`x`,C).attr(`y`,E).attr(`width`,b).attr(`height`,S);return m.attr(`transform`,`translate(${t.x-_.width/2}, ${T+1-(u(r)?0:3)})`),t.height=D.node().getBBox().height,t.offsetX=0,t.offsetY=_.height-t.padding/2,t.labelBBox=_,t.intersect=function(e){return N(t,e)},{cluster:f,labelBBox:_}},`roundedWithTitle`),noteGroup:r((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return N(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:r((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=o(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),s=a.insert(`g`,`:first-child`),c=0*t.padding,l=t.width+c;t.diff=-t.padding;let u=t.height+c,d=t.x-l/2,f=t.y-u/2;t.width=l;let p;if(t.look===`handDrawn`){let e=w.default.svg(a).rectangle(d,f,l,u,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});p=a.insert(()=>e,`:first-child`)}else{p=s.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),p.attr(`class`,e).attr(`x`,d).attr(`y`,f).attr(`width`,l).attr(`height`,u).attr(`data-look`,t.look)}return t.height=p.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return N(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:r(async(e,r)=>{t.info(`Creating subgraph rect for `,r.id,r);let i=o(),{themeVariables:a,handDrawnSeed:s}=i,{clusterBkg:c,clusterBorder:l}=a,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:m}=b(r),g=e.insert(`g`).attr(`class`,`cluster `+r.cssClasses).attr(`id`,r.domId).attr(`data-look`,r.look),v=u(i),x=g.insert(`g`).attr(`class`,`cluster-label `),S=await h(x,r.label,{style:r.labelStyle,useHtmlLabels:v,isNode:!0,width:r.width}),C=S.getBBox();if(u(i)){let e=S.children[0],t=n(S);C=e.getBoundingClientRect(),t.attr(`width`,C.width),t.attr(`height`,C.height)}let T=r.width<=C.width+r.padding?C.width+r.padding:r.width;r.width<=C.width+r.padding?r.diff=(T-r.width)/2-r.padding:r.diff=-r.padding;let E=r.height,D=r.x-T/2,O=r.y-E/2;t.trace(`Data `,r,JSON.stringify(r));let k;if(r.look===`handDrawn`){let e=w.default.svg(g),n=y(r,{roughness:.7,fill:c,stroke:l,fillWeight:4,seed:s}),i=e.path(F(D,O,T,E,r.rx),n);k=g.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,m.join(`;`).replace(`fill`,`stroke`))}else k=g.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,r.rx).attr(`ry`,r.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=_(i);if(x.attr(`transform`,`translate(${r.x-C.width/2}, ${r.y-r.height/2+A})`),d){let e=x.select(`span`);e&&e.attr(`style`,d)}let j=k.node().getBBox();return r.offsetX=0,r.width=j.width,r.height=j.height,r.offsetY=C.height-r.padding/2,r.intersect=function(e){return N(r,e)},{cluster:g,labelBBox:C}},`kanbanSection`)},te=new Map,L=r(async(e,t)=>{let n=await ee[t.shape||`rect`](e,t);return te.set(t.id,n),n},`insertCluster`),R=r(()=>{te=new Map},`clear`);function ne(e,t){return e.intersect(t)}r(ne,`intersectNode`);var z=ne;function B(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}r(B,`intersectEllipse`);var V=B;function H(e,t,n){return V(e,t,t,n)}r(H,`intersectCircle`);var re=H;function ie(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&U(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&U(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}r(ie,`intersectLine`);function U(e,t){return e*t>0}r(U,`sameSign`);var W=ie;function G(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=W(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}r(G,`intersectPolygon`);var K={node:z,circle:re,ellipse:V,polygon:G,rect:N};function ae(e,n){let{labelStyles:r}=b(n);n.labelStyle=r;let i=O(n),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),{cssStyles:s}=n,c=w.default.svg(o),l=y(n,{fill:`black`,stroke:`none`,fillStyle:`solid`});n.look!==`handDrawn`&&(l.roughness=0);let u=c.circle(0,0,2,l),d=o.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,p(s)),D(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),K.circle(n,1,e)},o}r(ae,`anchor`);function oe(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}r(oe,`generateArcPoints`);function se(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}r(se,`calculateArcSagitta`);async function ce(e,t){let{labelStyles:n,nodeStyles:i}=b(t);t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?16:a,s=t.look===`neo`?12:a,c=r(e=>e+s,`calcTotalHeight`),l=r(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await T(e,t,O(t)),f=c(t?.height?t?.height:d.height),[p,m]=l(f),h=se(f,p,m),g=(t?.width?t?.width:d.width)+o*2+h-h,_=f,{cssStyles:v}=t,x=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...oe(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...oe(g/2,_/2,g/2,-_/2,p,m,!0)],S=w.default.svg(u),C=y(t,{});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let E=k(x),A=S.path(E,C),j=u.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,v),i&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,i),j.attr(`transform`,`translate(${p/2}, 0)`),D(t,j),t.intersect=function(e){return K.polygon(t,x,e)},u}r(ce,`bowTieRect`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}r(q,`insertPolygonShape`);var le=12;async function ue(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+le),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+le,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+le},{x:0+le,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=w.default.svg(s),n=y(t,{}),r=k(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),D(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}r(ue,`card`);function de(e,t){let{nodeStyles:n}=b(t);t.label=``;let r=e.insert(`g`).attr(`class`,O(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=w.default.svg(r),c=y(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=k(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}r(de,`choice`);async function fe(e,n,r){let{labelStyles:i,nodeStyles:a}=b(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await T(e,n,O(n)),l=r?.padding??c,u=n.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=n;if(n.look===`handDrawn`){let e=w.default.svg(o),t=y(n,{}),r=e.circle(0,0,u*2,t);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,p(f))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return D(n,d),n.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,u,e),K.circle(n,u,e)},o}r(fe,`circle`);function pe(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
2
2
  M ${i.x},${i.y} L ${o.x},${o.y}`}r(pe,`createLine`);function me(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.labelStyle=r,n.label=``;let a=e.insert(`g`).attr(`class`,O(n)).attr(`id`,n.domId??n.id),o=Math.max(30,n?.width??0),{cssStyles:s}=n,c=w.default.svg(a),l=y(n,{});n.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=pe(o),f=c.path(d,l),p=a.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),i&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,i),D(n,p),n.intersect=function(e){return t.info(`crossedCircle intersect`,n,{radius:o,point:e}),K.circle(n,o,e)},a}r(me,`crossedCircle`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}r(J,`generateCirclePoints`);async function he(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await T(e,t,O(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+s,u=a.height+c,d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...J(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...J(l/2+d*2,-d,d,20,-180,-270),...J(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...J(l/2,u/2,d,20,0,90)],m=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...J(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...J(l/2+l*.1,-d,d,20,-180,-270),...J(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...J(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],h=w.default.svg(i),g=y(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=k(p).replace(`Z`,``),v=h.path(_,g),x=k(m),S=h.path(x,{...g}),C=i.insert(`g`,`:first-child`);return C.insert(()=>S,`:first-child`).attr(`stroke-opacity`,0),C.insert(()=>v,`:first-child`),C.attr(`class`,`text`),f&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),D(t,C),t.intersect=function(e){return K.polygon(t,m,e)},i}r(he,`curlyBraceLeft`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}r(Y,`generateCirclePoints`);async function ge(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await T(e,t,O(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=w.default.svg(i),g=y(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=k(p).replace(`Z`,``),v=h.path(_,g),x=k(m),S=h.path(x,{...g}),C=i.insert(`g`,`:first-child`);return C.insert(()=>S,`:first-child`).attr(`stroke-opacity`,0),C.insert(()=>v,`:first-child`),C.attr(`class`,`text`),f&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),D(t,C),t.intersect=function(e){return K.polygon(t,m,e)},i}r(ge,`curlyBraceRight`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}r(X,`generateCirclePoints`);async function _e(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await T(e,t,O(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...X(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...X(l/2,u/2,d,20,0,90)],m=[...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-l/2+d+d/2,u/2,d,30,-180,-270)],h=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...X(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...X(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2-d-d/2,y:u/2+d},...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-l/2+d+d/2,u/2,d,30,-180,-270)],g=w.default.svg(i),_=y(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=k(p).replace(`Z`,``),x=g.path(v,_),S=k(m).replace(`Z`,``),C=g.path(S,_),E=k(h),A=g.path(E,{..._}),j=i.insert(`g`,`:first-child`);return j.insert(()=>A,`:first-child`).attr(`stroke-opacity`,0),j.insert(()=>x,`:first-child`),j.insert(()=>C,`:first-child`),j.attr(`class`,`text`),f&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),D(t,j),t.intersect=function(e){return K.polygon(t,h,e)},i}r(_e,`curlyBraces`);async function ve(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=w.default.svg(s),m=y(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,g=u,_=h-d,v=g/4,x=[{x:_,y:0},{x:v,y:0},{x:0,y:g/2},{x:v,y:g},{x:_,y:g},...j(-_,-g/2,d,50,270,90)],S=k(x),C=p.path(S,m),E=s.insert(()=>C,`:first-child`);return E.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&E.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&E.selectChildren(`path`).attr(`style`,r),E.attr(`transform`,`translate(${-l/2}, ${-u/2})`),D(t,E),t.intersect=function(e){return K.polygon(t,x,e)},s}r(ve,`curvedTrapezoid`);var ye=r((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),be=r((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),xe=r((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Se=8,Ce=8;async function we(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-o,t.width<Ce&&(t.width=Ce);let n=e/2/(2.5+e/50);t.height=(t.height??0)-a-n*3,t.height<Se&&(t.height=Se)}let{shapeSvg:s,bbox:c,label:l}=await T(e,t,O(t)),u=(t.width?t.width:c.width)+o,d=u/2,f=d/(2.5+u/50),m=(t.height?t.height:c.height)+a+f,h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=w.default.svg(s),n=be(0,0,u,m,d,f),r=xe(0,f,u,m,d,f),i=y(t,{}),a=e.path(n,i),o=e.path(r,y(t,{fill:`none`}));h=s.insert(()=>o,`:first-child`),h=s.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=ye(0,0,u,m,d,f);h=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,p(g)).attr(`style`,r)}return h.attr(`label-offset-y`,f),h.attr(`transform`,`translate(${-u/2}, ${-(m/2+f)})`),D(t,h),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}r(we,`cylinder`);async function Te(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await T(e,t,O(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=w.default.svg(o),g=y(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],v=h.polygon(_.map(e=>[e.x,e.y]),g),x=o.insert(()=>v,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),D(t,x),t.intersect=function(e){return K.rect(t,e)},o}r(Te,`dividedRectangle`);async function Ee(e,n){let{labelStyles:r,nodeStyles:i}=b(n),a=n.look===`neo`?12:5;n.labelStyle=r;let o=n.padding??0,s=n.look===`neo`?16:o,{shapeSvg:c,bbox:l}=await T(e,n,O(n)),u=(n?.width?n?.width/2:l.width/2)+(s??0),d=u-a,f,{cssStyles:m}=n;if(n.look===`handDrawn`){let e=w.default.svg(c),t=y(n,{roughness:.2,strokeWidth:2.5}),r=y(n,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,u*2,t),a=e.circle(0,0,d*2,r);f=c.insert(`g`,`:first-child`),f.attr(`class`,p(n.cssClasses)).attr(`style`,p(m)),f.node()?.appendChild(i),f.node()?.appendChild(a)}else{f=c.insert(`g`,`:first-child`);let e=f.insert(`circle`,`:first-child`),t=f.insert(`circle`);f.attr(`class`,`basic label-container`).attr(`style`,i),e.attr(`class`,`outer-circle`).attr(`style`,i).attr(`r`,u).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,i).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return D(n,f),n.intersect=function(e){return t.info(`DoubleCircle intersect`,n,u,e),K.circle(n,u,e)},c}r(Ee,`doublecircle`);function De(e,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=b(n);n.label=``,n.labelStyle=i;let o=e.insert(`g`).attr(`class`,O(n)).attr(`id`,n.domId??n.id),{cssStyles:s}=n,c=w.default.svg(o),{nodeBorder:l}=r,u=y(n,{fillStyle:`solid`});n.look!==`handDrawn`&&(u.roughness=0);let d=c.circle(0,0,14,u),f=o.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),a&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,a),D(n,f),n.intersect=function(e){return t.info(`filledCircle intersect`,n,{radius:7,point:e}),K.circle(n,7,e)},o}r(De,`filledCircle`);var Oe=10,ke=10;async function Ae(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?a*2:a;(n.width||n.height)&&(n.height=n?.height??0,n.height<Oe&&(n.height=Oe),n.width=(n?.width??0)-o-o/2,n.width<ke&&(n.width=ke));let{shapeSvg:s,bbox:c,label:l}=await T(e,n,O(n)),u=(n?.width?n?.width:c.width)+(o??0),d=n?.height?n?.height:u+c.height,f=d,p=[{x:0,y:-d},{x:f,y:-d},{x:f/2,y:0}],{cssStyles:m}=n,h=w.default.svg(s),g=y(n,{});n.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=k(p),v=h.path(_,g),x=s.insert(()=>v,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,m),i&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,i),n.width=u,n.height=d,D(n,x),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(n.padding??0)/2+(c.y-(c.top??0))})`),n.intersect=function(e){return t.info(`Triangle intersect`,n,p,e),K.polygon(n,p,e)},s}r(Ae,`flippedTriangle`);function je(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=b(t);t.label=``;let o=e.insert(`g`).attr(`class`,O(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=w.default.svg(o),p=y(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),D(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/2||0),t.intersect=function(e){return K.rect(t,e)},o}r(je,`forkJoin`);async function Me(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.labelStyle=r;let a=n.look===`neo`?16:n.padding??0,o=n.look===`neo`?12:n.padding??0;(n.width||n.height)&&(n.height=(n?.height??0)-o*2,n.height<10&&(n.height=10),n.width=(n?.width??0)-a*2,n.width<15&&(n.width=15));let{shapeSvg:s,bbox:c}=await T(e,n,O(n)),l=(n?.width?n?.width:Math.max(15,c.width))+a*2,u=(n?.height?n?.height:Math.max(10,c.height))+o*2,d=u/2,{cssStyles:f}=n,p=w.default.svg(s),m=y(n,{});n.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...j(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],g=k(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&n.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),i&&n.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,i),D(n,v),n.intersect=function(e){return t.info(`Pill intersect`,n,{radius:d,point:e}),K.polygon(n,h,e)},s}r(Me,`halfRoundedRectangle`);var Ne=r((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function Pe(e,t){let{labelStyles:n,nodeStyles:r}=b(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await T(e,t,O(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=w.default.svg(c),n=y(t,{}),r=Ne(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,D(t,m),t.intersect=function(e){return K.polygon(t,p,e)},c}r(Pe,`hexagon`);async function Fe(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.label=``,n.labelStyle=r;let{shapeSvg:a}=await T(e,n,O(n)),o=Math.max(30,n?.width??0),s=Math.max(30,n?.height??0),{cssStyles:c}=n,l=w.default.svg(a),u=y(n,{});n.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],f=k(d),p=l.path(f,u),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),c&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),i&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,i),m.attr(`transform`,`translate(${-o/2}, ${-s/2})`),D(n,m),n.intersect=function(e){return t.info(`Pill intersect`,n,{points:d}),K.polygon(n,d,e)},a}r(Fe,`hourglass`);async function Ie(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await T(e,n,`icon-shape default`),p=n.pos===`t`,m=c,h=c,{nodeBorder:_}=r,{stylesMap:v}=S(n),x=-h/2,C=-m/2,E=n.label?8:0,O=w.default.svg(u),k=y(n,{stroke:`none`,fill:`none`});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`);let A=O.rectangle(x,C,h,m,k),j=Math.max(h,d.width),M=m+d.height+E,N=O.rectangle(-j/2,-M/2,j,M,{...k,fill:`transparent`,stroke:`none`}),P=u.insert(()=>A,`:first-child`),F=u.insert(()=>N);if(n.icon){let e=u.append(`g`);e.html(`<g>${await g(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+E/2-i/2-o:-d.height/2-E/2-i/2-o})`),e.attr(`style`,`color: ${v.get(`stroke`)??_};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-M/2:M/2-d.height})`),P.attr(`transform`,`translate(0,${p?d.height/2+E/2:-d.height/2-E/2})`),D(n,F),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=p?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+E},{x:r+h/2,y:i-a/2+d.height+E},{x:r+h/2,y:i+a/2},{x:r-h/2,y:i+a/2},{x:r-h/2,y:i-a/2+d.height+E},{x:r-d.width/2,y:i-a/2+d.height+E}]:[{x:r-h/2,y:i-a/2},{x:r+h/2,y:i-a/2},{x:r+h/2,y:i-a/2+m},{x:r+d.width/2,y:i-a/2+m},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+m},{x:r-h/2,y:i-a/2+m}],K.polygon(n,o,e)},u}r(Ie,`icon`);async function Le(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await T(e,n,`icon-shape default`),p=n.label?8:0,m=n.pos===`t`,{nodeBorder:h,mainBkg:_}=r,{stylesMap:v}=S(n),x=w.default.svg(u),C=y(n,{});n.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`),C.stroke=v.get(`fill`)??_;let E=u.append(`g`);n.icon&&E.html(`<g>${await g(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let O=E.node().getBBox(),k=O.width,A=O.height,j=O.x,M=O.y,N=Math.max(k,A)*Math.SQRT2+40,P=x.circle(0,0,N,C),F=Math.max(N,d.width),I=N+d.height+p,ee=x.rectangle(-F/2,-I/2,F,I,{...C,fill:`transparent`,stroke:`none`}),te=u.insert(()=>P,`:first-child`),L=u.insert(()=>ee);return E.attr(`transform`,`translate(${-k/2-j},${m?d.height/2+p/2-A/2-M:-d.height/2-p/2-A/2-M})`),E.attr(`style`,`color: ${v.get(`stroke`)??h};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-I/2:I/2-d.height})`),te.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),D(n,L),n.intersect=function(e){return t.info(`iconSquare intersect`,n,e),K.rect(n,e)},u}r(Le,`iconCircle`);async function Re(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await T(e,n,`icon-shape default`),m=n.pos===`t`,h=c+f*2,_=c+f*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:C}=S(n),E=-_/2,O=-h/2,k=n.label?8:0,A=w.default.svg(u),j=y(n,{});n.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=C.get(`fill`)??x;let M=A.path(F(E,O,_,h,5),j),N=Math.max(_,d.width),P=h+d.height+k,I=A.rectangle(-N/2,-P/2,N,P,{...j,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>M,`:first-child`).attr(`class`,`icon-shape2`),te=u.insert(()=>I);if(n.icon){let e=u.append(`g`);e.html(`<g>${await g(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${C.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),ee.attr(`transform`,`translate(0,${m?d.height/2+k/2:-d.height/2-k/2})`),D(n,te),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+k},{x:r+_/2,y:i-a/2+d.height+k},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+k},{x:r-d.width/2,y:i-a/2+d.height+k}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/2,y:i-a/2+h},{x:r+d.width/2,y:i-a/2+h},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+h},{x:r-_/2,y:i-a/2+h}],K.polygon(n,o,e)},u}r(Re,`iconRounded`);async function ze(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await T(e,n,`icon-shape default`),m=n.pos===`t`,h=c+f*2,_=c+f*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:C}=S(n),E=-_/2,O=-h/2,k=n.label?8:0,A=w.default.svg(u),j=y(n,{});n.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=C.get(`fill`)??x;let M=A.path(F(E,O,_,h,.1),j),N=Math.max(_,d.width),P=h+d.height+k,I=A.rectangle(-N/2,-P/2,N,P,{...j,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>M,`:first-child`),te=u.insert(()=>I);if(n.icon){let e=u.append(`g`);e.html(`<g>${await g(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${C.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),ee.attr(`transform`,`translate(0,${m?d.height/2+k/2:-d.height/2-k/2})`),D(n,te),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+k},{x:r+_/2,y:i-a/2+d.height+k},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+k},{x:r-d.width/2,y:i-a/2+d.height+k}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/2,y:i-a/2+h},{x:r+d.width/2,y:i-a/2+h},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+h},{x:r-_/2,y:i-a/2+h}],K.polygon(n,o,e)},u}r(ze,`iconSquare`);async function Be(e,n,{config:{flowchart:r}}){let i=new Image;i.src=n?.img??``,await i.decode();let a=Number(i.naturalWidth.toString().replace(`px`,``)),o=Number(i.naturalHeight.toString().replace(`px`,``));n.imageAspectRatio=a/o;let{labelStyles:s}=b(n);n.labelStyle=s;let c=r?.wrappingWidth;n.defaultWidth=r?.wrappingWidth;let l=Math.max(n.label?c??0:0,n?.assetWidth??a),u=n.constraint===`on`&&n?.assetHeight?n.assetHeight*n.imageAspectRatio:l,d=n.constraint===`on`?u/n.imageAspectRatio:n?.assetHeight??o;n.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:m}=await T(e,n,`image-shape default`),h=n.pos===`t`,g=-u/2,_=-d/2,v=n.label?8:0,x=w.default.svg(f),S=y(n,{});n.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let C=x.rectangle(g,_,u,d,S),E=Math.max(u,p.width),O=d+p.height+v,k=x.rectangle(-E/2,-O/2,E,O,{...S,fill:`none`,stroke:`none`}),A=f.insert(()=>C,`:first-child`),j=f.insert(()=>k);if(n.img){let e=f.append(`image`);e.attr(`href`,n.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?O/2-d:-O/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-v/2:d/2-p.height/2+v/2})`),A.attr(`transform`,`translate(0,${h?p.height/2+v/2:-p.height/2-v/2})`),D(n,j),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=h?[{x:r-p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2+p.height+v},{x:r+u/2,y:i-a/2+p.height+v},{x:r+u/2,y:i+a/2},{x:r-u/2,y:i+a/2},{x:r-u/2,y:i-a/2+p.height+v},{x:r-p.width/2,y:i-a/2+p.height+v}]:[{x:r-u/2,y:i-a/2},{x:r+u/2,y:i-a/2},{x:r+u/2,y:i-a/2+d},{x:r+p.width/2,y:i-a/2+d},{x:r+p.width/2/2,y:i+a/2},{x:r-p.width/2,y:i+a/2},{x:r-p.width/2,y:i-a/2+d},{x:r-u/2,y:i-a/2+d}],K.polygon(n,o,e)},f}r(Be,`imageSquare`);async function Ve(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=Math.max(c.width+(o??0)*2,t?.width??0),u=Math.max(c.height+(a??0)*2,t?.height??0),d=[{x:0,y:0},{x:l,y:0},{x:l+3*u/6,y:-u},{x:-3*u/6,y:-u}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=w.default.svg(s),n=y(t,{}),r=k(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),p&&f.attr(`style`,p)}else f=q(s,l,u,d);return r&&f.attr(`style`,r),t.width=l,t.height=u,D(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}r(Ve,`inv_trapezoid`);async function He(e,t,n){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await T(e,t,O(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,d,{rx:f,ry:m}=t,{cssStyles:h}=t;if(n?.rx&&n.ry&&(f=n.rx,m=n.ry),t.look===`handDrawn`){let e=w.default.svg(a),n=y(t,{}),r=f||m?e.path(F(l,u,s,c,f||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,p(h))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,p(f)).attr(`ry`,p(m)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return D(t,d),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},a}r(He,`drawRect`);async function Ue(e,t){let{shapeSvg:n,bbox:r,label:i}=await T(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),D(t,a),t.intersect=function(e){return K.rect(t,e)},n}r(Ue,`labelRect`);async function We(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=w.default.svg(s),n=y(t,{}),r=k(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,D(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}r(We,`lean_left`);async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=w.default.svg(s),n=y(t,{}),r=k(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,D(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}r(Ge,`lean_right`);function Ke(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.label=``,n.labelStyle=r;let a=e.insert(`g`).attr(`class`,O(n)).attr(`id`,n.domId??n.id),{cssStyles:o}=n,s=Math.max(35,n?.width??0),c=Math.max(35,n?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=w.default.svg(a),d=y(n,{});n.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=k(l),p=u.path(f,d),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),o&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,o),i&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,i),m.attr(`transform`,`translate(-${s/2},${-c})`),D(n,m),n.intersect=function(e){return t.info(`lightningBolt intersect`,n,e),K.polygon(n,l,e)},a}r(Ke,`lightningBolt`);var qe=r((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),Je=r((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),Ye=r((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Xe=10,Ze=10;async function Qe(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.width<Ze&&(t.width=Ze);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.height<Xe&&(t.height=Xe)}let{shapeSvg:s,bbox:c,label:l}=await T(e,t,O(t)),u=(t?.width?t?.width:c.width)+a*2,d=u/2,f=d/(2.5+u/50),m=(t?.height?t?.height:c.height)+f+o*2,h=m*.1,g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=w.default.svg(s),n=Je(0,0,u,m,d,f,h),r=Ye(0,f,u,m,d,f),i=y(t,{}),a=e.path(n,i),o=e.path(r,i);s.insert(()=>o,`:first-child`).attr(`class`,`line`),g=s.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=qe(0,0,u,m,d,f,h);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,p(_)).attr(`style`,r)}return g.attr(`label-offset-y`,f),g.attr(`transform`,`translate(${-u/2}, ${-(m/2+f)})`),D(t,g),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}r(Qe,`linedCylinder`);async function $e(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await T(e,t,O(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=w.default.svg(s),g=y(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...A(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],v=h.polygon(_.map(e=>[e.x,e.y]),g),x=s.insert(()=>v,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),D(t,x),t.intersect=function(e){return K.polygon(t,_,e)},s}r($e,`linedWaveEdgedRect`);async function et(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await T(e,t,O(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,g=-m/2,{cssStyles:_}=t,v=w.default.svg(c),x=y(t,{}),S=[{x:h-s,y:g+s},{x:h-s,y:g+m+s},{x:h+p-s,y:g+m+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g+m-s},{x:h+p+s,y:g+m-s},{x:h+p+s,y:g-s},{x:h+s,y:g-s},{x:h+s,y:g},{x:h,y:g},{x:h,y:g+s}],C=[{x:h,y:g+s},{x:h+p-s,y:g+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g},{x:h,y:g}];t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let E=k(S),A=v.path(E,x),j=k(C),N=v.path(j,x);t.look!==`handDrawn`&&(A=M(A),N=M(N));let P=c.insert(`g`,`:first-child`);return P.insert(()=>A),P.insert(()=>N),P.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),D(t,P),t.intersect=function(e){return K.polygon(t,S,e)},c}r(et,`multiRect`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await T(e,t,O(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,g=-m/2,{cssStyles:_}=t,v=A(h-10,g+m+10,h+d-10,g+m+10,p,.8),x=v?.[v.length-1],S=[{x:h-10,y:g+10},{x:h-10,y:g+m+10},...v,{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:x.y-20},{x:h+d+10,y:x.y-20},{x:h+d+10,y:g-10},{x:h+10,y:g-10},{x:h+10,y:g},{x:h,y:g},{x:h,y:g+10}],C=[{x:h,y:g+10},{x:h+d-10,y:g+10},{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:g},{x:h,y:g}],E=w.default.svg(i),j=y(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`);let M=k(S),N=E.path(M,j),P=k(C),F=E.path(P,j),I=i.insert(()=>N,`:first-child`);return I.insert(()=>F),I.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,r),I.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),D(t,I),t.intersect=function(e){return K.polygon(t,S,e)},i}r(tt,`multiWaveEdgedRectangle`);async function nt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r,t.useHtmlLabels||u(d())||(t.centerLabel=!0);let{shapeSvg:a,bbox:o,label:s}=await T(e,t,O(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),f=-c/2,p=-l/2,{cssStyles:m}=t,h=w.default.svg(a),g=y(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(f,p,c,l,g),v=a.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),s.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,i),s.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),D(t,v),t.intersect=function(e){return K.rect(t,e)},a}r(nt,`note`);var rt=r((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function it(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await T(e,t,O(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=w.default.svg(i),n=y(t,{}),r=rt(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=q(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),D(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=K.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}r(it,`question`);async function at(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await T(e,t,O(t)),u=(t?.width??c.width)+(t.look===`neo`?a*2:a),d=(t?.height??c.height)+(t.look===`neo`?o*2:o),f=-u/2,p=-d/2,m=p/2,h=[{x:f+m,y:p},{x:f,y:0},{x:f+m,y:-p},{x:-f,y:-p},{x:-f,y:p}],{cssStyles:g}=t,_=w.default.svg(s),v=y(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=k(h),S=_.path(x,v),C=s.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(${-m/2},0)`),l.attr(`transform`,`translate(${-m/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),D(t,C),t.intersect=function(e){return K.polygon(t,h,e)},s}r(at,`rect_left_inv_arrow`);async function ot(e,r){let{labelStyles:i,nodeStyles:a}=b(r);r.labelStyle=i;let s;s=r.cssClasses?`node `+r.cssClasses:`node default`;let c=e.insert(`g`).attr(`class`,s).attr(`id`,r.domId||r.id),l=c.insert(`g`),d=c.insert(`g`).attr(`class`,`label`).attr(`style`,a),f=r.description,p=r.label,m=await P(d,p,r.labelStyle,!0,!0),h={width:0,height:0};if(u(o())){let e=m.children[0],t=n(m);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}t.info(`Text 2`,f);let g=f||[],_=m.getBBox(),v=await P(d,Array.isArray(g)?g.join(`<br/>`):g,r.labelStyle,!0,!0),x=v.children[0],S=n(v);h=x.getBoundingClientRect(),S.attr(`width`,h.width),S.attr(`height`,h.height);let C=(r.padding||0)/2;n(v).attr(`transform`,`translate( `+(h.width>_.width?0:(_.width-h.width)/2)+`, `+(_.height+C+5)+`)`),n(m).attr(`transform`,`translate( `+(h.width<_.width?0:-(_.width-h.width)/2)+`, 0)`),h=d.node().getBBox(),d.attr(`transform`,`translate(`+-h.width/2+`, `+(-h.height/2-C+3)+`)`);let T=h.width+(r.padding||0),E=h.height+(r.padding||0),O=-h.width/2-C,k=-h.height/2-C,A,j;if(r.look===`handDrawn`){let e=w.default.svg(c),n=y(r,{}),i=e.path(F(O,k,T,E,r.rx||0),n),a=e.line(-h.width/2-C,-h.height/2-C+_.height+C,h.width/2+C,-h.height/2-C+_.height+C,n);j=c.insert(()=>(t.debug(`Rough node insert CXC`,i),a),`:first-child`),A=c.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`)}else A=l.insert(`rect`,`:first-child`),j=l.insert(`line`),A.attr(`class`,`outer title-state`).attr(`style`,a).attr(`x`,-h.width/2-C).attr(`y`,-h.height/2-C).attr(`width`,h.width+(r.padding||0)).attr(`height`,h.height+(r.padding||0)),j.attr(`class`,`divider`).attr(`x1`,-h.width/2-C).attr(`x2`,h.width/2+C).attr(`y1`,-h.height/2-C+_.height+C).attr(`y2`,-h.height/2-C+_.height+C);return D(r,A),r.intersect=function(e){return K.rect(r,e)},c}r(ot,`rectWithTitle`);async function st(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return He(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}r(st,`roundedRect`);var Z=8;async function ct(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await T(e,t,O(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?Z:Z*2),u=(t?.height??s.height)+a*2,d=l-Z,f=u,m=Z-l/2,h=-u/2,{cssStyles:g}=t,_=w.default.svg(o),v=y(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=[{x:m,y:h},{x:m+d,y:h},{x:m+d,y:h+f},{x:m-Z,y:h+f},{x:m-Z,y:h},{x:m,y:h},{x:m,y:h+f}],S=_.polygon(x.map(e=>[e.x,e.y]),v),C=o.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`).attr(`style`,p(g)),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),g&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${Z/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),D(t,C),t.intersect=function(e){return K.rect(t,e)},o}r(ct,`shadedProcess`);async function lt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await T(e,t,O(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:g}=t,_=w.default.svg(s),v=y(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],S=k(x),C=_.path(S,v),E=s.insert(()=>C,`:first-child`);return E.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&E.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&E.selectChildren(`path`).attr(`style`,r),E.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),D(t,E),t.intersect=function(e){return K.polygon(t,x,e)},s}r(lt,`slopedRect`);async function ut(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return He(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}r(ut,`squareRect`);async function dt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=w.default.svg(s),m=y(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...j(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...j(u/2-d,0,d,50,270,450)],g=k(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),D(t,v),t.intersect=function(e){return K.polygon(t,h,e)},s}r(dt,`stadium`);async function ft(e,t){return He(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}r(ft,`state`);function pt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=w.default.svg(u),f=y(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,g=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),_=u.insert(()=>p,`:first-child`);if(_.insert(()=>g),t.look!==`handDrawn`&&_.attr(`class`,`outer-path`),a&&_.selectAll(`path`).attr(`style`,a),i&&_.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;_.attr(`style`,`filter:url(#${n})`)}return D(t,_),t.intersect=function(e){return K.circle(t,(t.width??0)/2,e)},u}r(pt,`stateEnd`);function mt(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=w.default.svg(a).circle(0,0,t.width,x(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return D(t,o),t.intersect=function(e){return K.circle(t,(t.width??7)/2,e)},a}r(mt,`stateStart`);var ht=8;async function gt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=(t?.width??c.width)+2*ht+a,u=(t?.height??c.height)+o,d=l-2*ht,f=u,m=-l/2,h=-u/2,g=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=w.default.svg(s),n=y(t,{}),r=e.rectangle(m,h,d+16,f,n),i=e.line(m+ht,h,m+ht,h+f,n),a=e.line(m+ht+d,h,m+ht+d,h+f,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,p(c)),D(t,o)}else{let e=q(s,d,f,g);r&&e.attr(`style`,r),D(t,e)}return t.intersect=function(e){return K.polygon(t,g,e)},s}r(gt,`subroutine`);var _t=.2;async function vt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-_t*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await T(e,t,O(t)),l=(t?.height?t?.height:c.height)+o*2,u=_t*l,d=_t*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=w.default.svg(s),v=y(t,{}),x=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],S=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let C=k(x),E=_.path(C,v),A=k(S),j=_.path(A,{...v,fillStyle:`solid`}),M=s.insert(()=>j,`:first-child`);return M.insert(()=>E,`:first-child`),M.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),D(t,M),t.intersect=function(e){return K.polygon(t,x,e)},s}r(vt,`taggedRect`);async function yt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await T(e,t,O(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=w.default.svg(i),h=y(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...A(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],_=-s/2+s/2*.1,v=-f/2-d*.4,x=[{x:_+s-u,y:(v+c)*1.3},{x:_+s,y:v+c-d},{x:_+s,y:(v+c)*.9},...A(_+s,(v+c)*1.25,_+s-u,(v+c)*1.3,-c*.02,.5)],S=k(g),C=m.path(S,h),E=k(x),j=m.path(E,{...h,fillStyle:`solid`}),M=i.insert(()=>j,`:first-child`);return M.insert(()=>C,`:first-child`),M.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),D(t,M),t.intersect=function(e){return K.polygon(t,g,e)},i}r(yt,`taggedWaveEdgedRectangle`);async function bt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await T(e,t,O(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),D(t,u),t.intersect=function(e){return K.rect(t,e)},i}r(bt,`text`);var xt=r((e,t,n,r,i,a)=>`M${e},${t}
3
3
  a${i},${a} 0,0,1 0,${-r}
4
4
  l${n},0
@@ -60,4 +60,4 @@ import{s as e}from"./chunk-C94x7I9S.mjs";import{T as t,p as n,w as r}from"./src-
60
60
  q-5,0 -5,-5
61
61
  Z
62
62
  `;if(!t.domId)throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let d=i.append(`path`).attr(`id`,t.domId).attr(`class`,`node-bkg node-`+t.type).attr(`style`,r).attr(`d`,u);return i.append(`line`).attr(`class`,`node-line-`).attr(`x1`,-c/2).attr(`y1`,l/2).attr(`x2`,c/2).attr(`y2`,l/2),s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>s.node()),D(t,d),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},i}r(Jt,`defaultMindmapNode`);async function Yt(e,t){return fe(e,t,{padding:t.padding??0})}r(Yt,`mindmapCircle`);var Xt=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:ut},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:st},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:dt},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:gt},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:we},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:fe},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:Kt},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:qt},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:it},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:Pe},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:Ge},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:We},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:Dt},{semanticName:`Manual Operation`,name:`Trapezoid Base Top`,shortName:`trap-t`,description:`Represents a manual task`,aliases:[`manual`,`trapezoid-top`,`inv-trapezoid`],internalAliases:[`inv_trapezoid`],handler:Ve},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:Ee},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:bt},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:ue},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:ct},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:mt},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:pt},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:je},{semanticName:`Collate`,name:`Hourglass`,shortName:`hourglass`,description:`Represents a collate operation`,aliases:[`hourglass`,`collate`],handler:Fe},{semanticName:`Comment`,name:`Curly Brace`,shortName:`brace`,description:`Adds a comment`,aliases:[`comment`,`brace-l`],handler:he},{semanticName:`Comment Right`,name:`Curly Brace`,shortName:`brace-r`,description:`Adds a comment`,handler:ge},{semanticName:`Comment with braces on both sides`,name:`Curly Braces`,shortName:`braces`,description:`Adds a comment`,handler:_e},{semanticName:`Com Link`,name:`Lightning Bolt`,shortName:`bolt`,description:`Communication link`,aliases:[`com-link`,`lightning-bolt`],handler:Ke},{semanticName:`Document`,name:`Document`,shortName:`doc`,description:`Represents a document`,aliases:[`doc`,`document`],handler:Mt},{semanticName:`Delay`,name:`Half-Rounded Rectangle`,shortName:`delay`,description:`Represents a delay`,aliases:[`half-rounded-rectangle`],handler:Me},{semanticName:`Direct Access Storage`,name:`Horizontal Cylinder`,shortName:`h-cyl`,description:`Direct access storage`,aliases:[`das`,`horizontal-cylinder`],handler:Et},{semanticName:`Disk Storage`,name:`Lined Cylinder`,shortName:`lin-cyl`,description:`Disk storage`,aliases:[`disk`,`lined-cylinder`],handler:Qe},{semanticName:`Display`,name:`Curved Trapezoid`,shortName:`curv-trap`,description:`Represents a display`,aliases:[`curved-trapezoid`,`display`],handler:ve},{semanticName:`Divided Process`,name:`Divided Rectangle`,shortName:`div-rect`,description:`Divided process shape`,aliases:[`div-proc`,`divided-rectangle`,`divided-process`],handler:Te},{semanticName:`Extract`,name:`Triangle`,shortName:`tri`,description:`Extraction process`,aliases:[`extract`,`triangle`],handler:jt},{semanticName:`Internal Storage`,name:`Window Pane`,shortName:`win-pane`,description:`Internal storage`,aliases:[`internal-storage`,`window-pane`],handler:Pt},{semanticName:`Junction`,name:`Filled Circle`,shortName:`f-circ`,description:`Junction point`,aliases:[`junction`,`filled-circle`],handler:De},{semanticName:`Loop Limit`,name:`Trapezoidal Pentagon`,shortName:`notch-pent`,description:`Loop limit step`,aliases:[`loop-limit`,`notched-pentagon`],handler:Ot},{semanticName:`Manual File`,name:`Flipped Triangle`,shortName:`flip-tri`,description:`Manual file operation`,aliases:[`manual-file`,`flipped-triangle`],handler:Ae},{semanticName:`Manual Input`,name:`Sloped Rectangle`,shortName:`sl-rect`,description:`Manual input step`,aliases:[`manual-input`,`sloped-rectangle`],handler:lt},{semanticName:`Multi-Document`,name:`Stacked Document`,shortName:`docs`,description:`Multiple documents`,aliases:[`documents`,`st-doc`,`stacked-document`],handler:tt},{semanticName:`Multi-Process`,name:`Stacked Rectangle`,shortName:`st-rect`,description:`Multiple processes`,aliases:[`procs`,`processes`,`stacked-rectangle`],handler:et},{semanticName:`Stored Data`,name:`Bow Tie Rectangle`,shortName:`bow-rect`,description:`Stored data`,aliases:[`stored-data`,`bow-tie-rectangle`],handler:ce},{semanticName:`Summary`,name:`Crossed Circle`,shortName:`cross-circ`,description:`Summary`,aliases:[`summary`,`crossed-circle`],handler:me},{semanticName:`Tagged Document`,name:`Tagged Document`,shortName:`tag-doc`,description:`Tagged document`,aliases:[`tag-doc`,`tagged-document`],handler:yt},{semanticName:`Tagged Process`,name:`Tagged Rectangle`,shortName:`tag-rect`,description:`Tagged process`,aliases:[`tagged-rectangle`,`tag-proc`,`tagged-process`],handler:vt},{semanticName:`Paper Tape`,name:`Flag`,shortName:`flag`,description:`Paper tape`,aliases:[`paper-tape`],handler:Nt},{semanticName:`Odd`,name:`Odd`,shortName:`odd`,description:`Odd shape`,internalAliases:[`rect_left_inv_arrow`],handler:at},{semanticName:`Lined Document`,name:`Lined Document`,shortName:`lin-doc`,description:`Lined document`,aliases:[`lined-document`],handler:$e}],Zt=r(()=>{let e=[...Object.entries({state:ft,choice:de,note:nt,rectWithTitle:ot,labelRect:Ue,iconSquare:ze,iconCircle:Le,icon:Ie,iconRounded:Re,imageSquare:Be,anchor:ae,kanbanItem:Gt,mindmapCircle:Yt,defaultMindmapNode:Jt,classBox:Ht,erBox:Lt,requirementBox:Ut}),...Xt.flatMap(e=>[e.shortName,...`aliases`in e?e.aliases:[],...`internalAliases`in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(e)},`generateShapeMap`)();function Qt(e){return e in Zt}r(Qt,`isValidShape`);var $t=new Map;async function en(e,t,n){let r,i;t.shape===`rect`&&(t.rx&&t.ry?t.shape=`roundedRect`:t.shape=`squareRect`);let a=t.shape?Zt[t.shape]:void 0;if(!a)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;n.config.securityLevel===`sandbox`?o=`_top`:t.linkTarget&&(o=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,o??null),i=await a(r,t,n)}else i=await a(e,t,n),r=i;return r.attr(`data-look`,p(t.look)),t.tooltip&&i.attr(`title`,t.tooltip),$t.set(t.id,r),t.haveCallback&&r.attr(`class`,r.attr(`class`)+` clickable`),r}r(en,`insertNode`);var tn=r((e,t)=>{$t.set(t.id,e)},`setNodeElem`),nn=r(()=>{$t.clear()},`clear`),rn=r(e=>{let n=$t.get(e.id);t.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let r=e.diff||0;return e.clusterNode?n.attr(`transform`,`translate(`+(e.x+r-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):n.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),r},`positionNode`);export{en as a,rn as c,L as i,tn as l,nn as n,Qt as o,P as r,T as s,R as t,D as u};
63
- //# sourceMappingURL=chunk-5FUZZQ4R-DFR5eSi-.mjs.map
63
+ //# sourceMappingURL=chunk-5FUZZQ4R-Bf6nbyQG.mjs.map
@@ -1,3 +1,3 @@
1
- import{C as e,D as t,O as n,T as r,_ as i,a,c as o,f as s,g as c,h as l,i as u,m as ee,n as d,o as f,p as te,r as p,s as m,t as h,v as g,w as _,x as v}from"./_baseFor-m0TxKeb9.mjs";import{T as y,p as ne,w as b}from"./src-BkCVz_TJ.mjs";import{I as re,f as ie,m as x,r as ae,s as S}from"./chunk-ICPOFSXX-D0MVsm4H.mjs";import{t as oe}from"./dist-DZb_HoiN.mjs";function se(e){this._context=e}se.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ce(e){return new se(e)}var le=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function ue(e){return new le(e,!0)}function de(e){return new le(e,!1)}function C(){}function w(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function T(e){this._context=e}T.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:w(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:w(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function fe(e){return new T(e)}function pe(e){this._context=e}pe.prototype={areaStart:C,areaEnd:C,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:w(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function me(e){return new pe(e)}function he(e){this._context=e}he.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:w(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ge(e){return new he(e)}function _e(e,t){this._basis=new T(e),this._beta=t}_e.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var ve=(function e(t){function n(e){return t===1?new T(e):new _e(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function E(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function D(e,t){this._context=e,this._k=(1-t)/6}D.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:E(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:E(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ye=(function e(t){function n(e){return new D(e,t)}return n.tension=function(t){return e(+t)},n})(0);function O(e,t){this._context=e,this._k=(1-t)/6}O.prototype={areaStart:C,areaEnd:C,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:E(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var be=(function e(t){function n(e){return new O(e,t)}return n.tension=function(t){return e(+t)},n})(0);function k(e,t){this._context=e,this._k=(1-t)/6}k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:E(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var xe=(function e(t){function n(e){return new k(e,t)}return n.tension=function(t){return e(+t)},n})(0);function A(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function j(e,t){this._context=e,this._alpha=t}j.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:A(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var M=(function e(t){function n(e){return t?new j(e,t):new D(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function N(e,t){this._context=e,this._alpha=t}N.prototype={areaStart:C,areaEnd:C,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:A(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Se=(function e(t){function n(e){return t?new N(e,t):new O(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Ce(e,t){this._context=e,this._alpha=t}Ce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:A(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var we=(function e(t){function n(e){return t?new Ce(e,t):new k(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Te(e){this._context=e}Te.prototype={areaStart:C,areaEnd:C,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ee(e){return new Te(e)}function De(e){return e<0?-1:1}function Oe(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(De(a)+De(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ke(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function P(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function F(e){this._context=e}F.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:P(this,this._t0,ke(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,P(this,ke(this,n=Oe(this,e,t)),n);break;default:P(this,this._t0,n=Oe(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Ae(e){this._context=new je(e)}(Ae.prototype=Object.create(F.prototype)).point=function(e,t){F.prototype.point.call(this,t,e)};function je(e){this._context=e}je.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Me(e){return new F(e)}function Ne(e){return new Ae(e)}function Pe(e){this._context=e}Pe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Fe(e),i=Fe(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Fe(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Ie(e){return new Pe(e)}function I(e,t){this._context=e,this._t=t}I.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function Le(e){return new I(e,.5)}function Re(e){return new I(e,0)}function ze(e){return new I(e,1)}var L=function(){try{var e=v(Object,`defineProperty`);return e({},``,{}),e}catch{}}();function R(e,t,n){t==`__proto__`&&L?L(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function z(e,t,r){(r!==void 0&&!n(e[t],r)||r===void 0&&!(t in e))&&R(e,t,r)}var B=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Be=B&&typeof module==`object`&&module&&!module.nodeType&&module,Ve=Be&&Be.exports===B?t.Buffer:void 0,He=Ve?Ve.allocUnsafe:void 0;function Ue(e,t){if(t)return e.slice();var n=e.length,r=He?He(n):new e.constructor(n);return e.copy(r),r}function We(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}function Ge(e,t){var n=t?We(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ke(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var qe=Object.create,Je=function(){function e(){}return function(t){if(!_(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),V=a(Object.getPrototypeOf,Object);function Ye(e){return typeof e.constructor==`function`&&!f(e)?Je(V(e)):{}}function Xe(e){return l(e)&&u(e)}var Ze=`[object Object]`,Qe=Function.prototype,$e=Object.prototype,et=Qe.toString,tt=$e.hasOwnProperty,nt=et.call(Object);function rt(e){if(!l(e)||r(e)!=Ze)return!1;var t=V(e);if(t===null)return!0;var n=tt.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&et.call(n)==nt}function H(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}var it=Object.prototype.hasOwnProperty;function at(e,t,r){var i=e[t];(!(it.call(e,t)&&n(i,r))||r===void 0&&!(t in e))&&R(e,t,r)}function ot(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?R(n,s,c):at(n,s,c)}return n}function st(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var ct=Object.prototype.hasOwnProperty;function lt(e){if(!_(e))return st(e);var t=f(e),n=[];for(var r in e)r==`constructor`&&(t||!ct.call(e,r))||n.push(r);return n}function U(e){return u(e)?m(e,!0):lt(e)}function ut(e){return ot(e,U(e))}function dt(t,n,r,i,a,s,l){var u=H(t,r),d=H(n,r),f=l.get(d);if(f){z(t,r,f);return}var p=s?s(u,d,r+``,t,n,l):void 0,m=p===void 0;if(m){var h=c(d),g=!h&&te(d),v=!h&&!g&&o(d);p=d,h||g||v?c(u)?p=u:Xe(u)?p=Ke(u):g?(m=!1,p=Ue(d,!0)):v?(m=!1,p=Ge(d,!0)):p=[]:rt(d)||ee(d)?(p=u,ee(u)?p=ut(u):(!_(u)||e(u))&&(p=Ye(d))):m=!1}m&&(l.set(d,p),a(p,d,i,s,l),l.delete(d)),z(t,r,p)}function ft(e,t,n,r,i){e!==t&&h(t,function(a,o){if(i||=new g,_(a))dt(e,t,o,n,ft,r,i);else{var s=r?r(H(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),z(e,o,s)}},U)}function pt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var mt=Math.max;function ht(e,t,n){return t=mt(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=mt(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),pt(e,this,s)}}function gt(e){return function(){return e}}var _t=L?function(e,t){return L(e,`toString`,{configurable:!0,enumerable:!1,value:gt(t),writable:!0})}:d,vt=800,yt=16,bt=Date.now;function xt(e){var t=0,n=0;return function(){var r=bt(),i=yt-(r-n);if(n=r,i>0){if(++t>=vt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var St=xt(_t);function Ct(e,t){return St(ht(e,t,d),e+``)}function wt(e,t,r){if(!_(r))return!1;var i=typeof t;return(i==`number`?u(r)&&s(t,r.length):i==`string`&&t in r)?n(r[t],e):!1}function Tt(e){return Ct(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&wt(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var Et=Tt(function(e,t,n){ft(e,t,n)}),Dt=oe(),Ot={curveBasis:fe,curveBasisClosed:me,curveBasisOpen:ge,curveBumpX:ue,curveBumpY:de,curveBundle:ve,curveCardinalClosed:be,curveCardinalOpen:xe,curveCardinal:ye,curveCatmullRomClosed:Se,curveCatmullRomOpen:we,curveCatmullRom:M,curveLinear:ce,curveLinearClosed:Ee,curveMonotoneX:Me,curveMonotoneY:Ne,curveNatural:Ie,curveStep:Le,curveStepAfter:ze,curveStepBefore:Re},kt=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,At=b(function(e,t){let n=jt(e,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){let e=n.map(e=>e.args);re(e),r=ae(r,[...e])}else r=n.args;if(!r)return;let i=ie(e,t),a=`config`;return r[a]!==void 0&&(i===`flowchart-v2`&&(i=`flowchart`),r[i]=r[a],delete r[a]),r},`detectInit`),jt=b(function(e,t=null){try{let n=RegExp(`[%]{2}(?![{]${kt.source})(?=[}][%]{2}).*
1
+ import{C as e,D as t,O as n,T as r,_ as i,a,c as o,f as s,g as c,h as l,i as u,m as ee,n as d,o as f,p as te,r as p,s as m,t as h,v as g,w as _,x as v}from"./_baseFor-m0TxKeb9.mjs";import{T as y,p as ne,w as b}from"./src-BkCVz_TJ.mjs";import{I as re,f as ie,m as x,r as ae,s as S}from"./chunk-ICPOFSXX-C--tVIY5.mjs";import{t as oe}from"./dist-DZb_HoiN.mjs";function se(e){this._context=e}se.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ce(e){return new se(e)}var le=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function ue(e){return new le(e,!0)}function de(e){return new le(e,!1)}function C(){}function w(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function T(e){this._context=e}T.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:w(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:w(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function fe(e){return new T(e)}function pe(e){this._context=e}pe.prototype={areaStart:C,areaEnd:C,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:w(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function me(e){return new pe(e)}function he(e){this._context=e}he.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:w(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ge(e){return new he(e)}function _e(e,t){this._basis=new T(e),this._beta=t}_e.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var ve=(function e(t){function n(e){return t===1?new T(e):new _e(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function E(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function D(e,t){this._context=e,this._k=(1-t)/6}D.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:E(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:E(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ye=(function e(t){function n(e){return new D(e,t)}return n.tension=function(t){return e(+t)},n})(0);function O(e,t){this._context=e,this._k=(1-t)/6}O.prototype={areaStart:C,areaEnd:C,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:E(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var be=(function e(t){function n(e){return new O(e,t)}return n.tension=function(t){return e(+t)},n})(0);function k(e,t){this._context=e,this._k=(1-t)/6}k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:E(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var xe=(function e(t){function n(e){return new k(e,t)}return n.tension=function(t){return e(+t)},n})(0);function A(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function j(e,t){this._context=e,this._alpha=t}j.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:A(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var M=(function e(t){function n(e){return t?new j(e,t):new D(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function N(e,t){this._context=e,this._alpha=t}N.prototype={areaStart:C,areaEnd:C,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:A(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Se=(function e(t){function n(e){return t?new N(e,t):new O(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Ce(e,t){this._context=e,this._alpha=t}Ce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:A(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var we=(function e(t){function n(e){return t?new Ce(e,t):new k(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Te(e){this._context=e}Te.prototype={areaStart:C,areaEnd:C,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ee(e){return new Te(e)}function De(e){return e<0?-1:1}function Oe(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(De(a)+De(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ke(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function P(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function F(e){this._context=e}F.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:P(this,this._t0,ke(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,P(this,ke(this,n=Oe(this,e,t)),n);break;default:P(this,this._t0,n=Oe(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Ae(e){this._context=new je(e)}(Ae.prototype=Object.create(F.prototype)).point=function(e,t){F.prototype.point.call(this,t,e)};function je(e){this._context=e}je.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Me(e){return new F(e)}function Ne(e){return new Ae(e)}function Pe(e){this._context=e}Pe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Fe(e),i=Fe(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Fe(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Ie(e){return new Pe(e)}function I(e,t){this._context=e,this._t=t}I.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function Le(e){return new I(e,.5)}function Re(e){return new I(e,0)}function ze(e){return new I(e,1)}var L=function(){try{var e=v(Object,`defineProperty`);return e({},``,{}),e}catch{}}();function R(e,t,n){t==`__proto__`&&L?L(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function z(e,t,r){(r!==void 0&&!n(e[t],r)||r===void 0&&!(t in e))&&R(e,t,r)}var B=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Be=B&&typeof module==`object`&&module&&!module.nodeType&&module,Ve=Be&&Be.exports===B?t.Buffer:void 0,He=Ve?Ve.allocUnsafe:void 0;function Ue(e,t){if(t)return e.slice();var n=e.length,r=He?He(n):new e.constructor(n);return e.copy(r),r}function We(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}function Ge(e,t){var n=t?We(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ke(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var qe=Object.create,Je=function(){function e(){}return function(t){if(!_(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),V=a(Object.getPrototypeOf,Object);function Ye(e){return typeof e.constructor==`function`&&!f(e)?Je(V(e)):{}}function Xe(e){return l(e)&&u(e)}var Ze=`[object Object]`,Qe=Function.prototype,$e=Object.prototype,et=Qe.toString,tt=$e.hasOwnProperty,nt=et.call(Object);function rt(e){if(!l(e)||r(e)!=Ze)return!1;var t=V(e);if(t===null)return!0;var n=tt.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&et.call(n)==nt}function H(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}var it=Object.prototype.hasOwnProperty;function at(e,t,r){var i=e[t];(!(it.call(e,t)&&n(i,r))||r===void 0&&!(t in e))&&R(e,t,r)}function ot(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?R(n,s,c):at(n,s,c)}return n}function st(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var ct=Object.prototype.hasOwnProperty;function lt(e){if(!_(e))return st(e);var t=f(e),n=[];for(var r in e)r==`constructor`&&(t||!ct.call(e,r))||n.push(r);return n}function U(e){return u(e)?m(e,!0):lt(e)}function ut(e){return ot(e,U(e))}function dt(t,n,r,i,a,s,l){var u=H(t,r),d=H(n,r),f=l.get(d);if(f){z(t,r,f);return}var p=s?s(u,d,r+``,t,n,l):void 0,m=p===void 0;if(m){var h=c(d),g=!h&&te(d),v=!h&&!g&&o(d);p=d,h||g||v?c(u)?p=u:Xe(u)?p=Ke(u):g?(m=!1,p=Ue(d,!0)):v?(m=!1,p=Ge(d,!0)):p=[]:rt(d)||ee(d)?(p=u,ee(u)?p=ut(u):(!_(u)||e(u))&&(p=Ye(d))):m=!1}m&&(l.set(d,p),a(p,d,i,s,l),l.delete(d)),z(t,r,p)}function ft(e,t,n,r,i){e!==t&&h(t,function(a,o){if(i||=new g,_(a))dt(e,t,o,n,ft,r,i);else{var s=r?r(H(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),z(e,o,s)}},U)}function pt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var mt=Math.max;function ht(e,t,n){return t=mt(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=mt(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),pt(e,this,s)}}function gt(e){return function(){return e}}var _t=L?function(e,t){return L(e,`toString`,{configurable:!0,enumerable:!1,value:gt(t),writable:!0})}:d,vt=800,yt=16,bt=Date.now;function xt(e){var t=0,n=0;return function(){var r=bt(),i=yt-(r-n);if(n=r,i>0){if(++t>=vt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var St=xt(_t);function Ct(e,t){return St(ht(e,t,d),e+``)}function wt(e,t,r){if(!_(r))return!1;var i=typeof t;return(i==`number`?u(r)&&s(t,r.length):i==`string`&&t in r)?n(r[t],e):!1}function Tt(e){return Ct(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&wt(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var Et=Tt(function(e,t,n){ft(e,t,n)}),Dt=oe(),Ot={curveBasis:fe,curveBasisClosed:me,curveBasisOpen:ge,curveBumpX:ue,curveBumpY:de,curveBundle:ve,curveCardinalClosed:be,curveCardinalOpen:xe,curveCardinal:ye,curveCatmullRomClosed:Se,curveCatmullRomOpen:we,curveCatmullRom:M,curveLinear:ce,curveLinearClosed:Ee,curveMonotoneX:Me,curveMonotoneY:Ne,curveNatural:Ie,curveStep:Le,curveStepAfter:ze,curveStepBefore:Re},kt=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,At=b(function(e,t){let n=jt(e,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){let e=n.map(e=>e.args);re(e),r=ae(r,[...e])}else r=n.args;if(!r)return;let i=ie(e,t),a=`config`;return r[a]!==void 0&&(i===`flowchart-v2`&&(i=`flowchart`),r[i]=r[a],delete r[a]),r},`detectInit`),jt=b(function(e,t=null){try{let n=RegExp(`[%]{2}(?![{]${kt.source})(?=[}][%]{2}).*
2
2
  `,`ig`);e=e.trim().replace(n,``).replace(/'/gm,`"`),y.debug(`Detecting diagram directive${t===null?``:` type:`+t} based on the text:${e}`);let r,i=[];for(;(r=x.exec(e))!==null;)if(r.index===x.lastIndex&&x.lastIndex++,r&&!t||t&&r[1]?.match(t)||t&&r[2]?.match(t)){let e=r[1]?r[1]:r[2],t=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:e,args:t})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(n){return y.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),Mt=b(function(e){return e.replace(x,``)},`removeDirectives`),Nt=b(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function W(e,t){return e?Ot[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}b(W,`interpolateToCurve`);function Pt(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,Dt.sanitizeUrl)(n)}b(Pt,`formatUrl`);var Ft=b((e,...t)=>{let n=e.split(`.`),r=n.length-1,i=n[r],a=window;for(let t=0;t<r;t++)if(a=a[n[t]],!a){y.error(`Function name: ${e} not found in window`);return}a[i](...t)},`runFunc`);function G(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}b(G,`distance`);function It(e){let t,n=0;return e.forEach(e=>{n+=G(e,t),t=e}),K(e,n/2)}b(It,`traverseEdge`);function Lt(e){return e.length===1?e[0]:It(e)}b(Lt,`calcLabelPosition`);var Rt=b((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),K=b((e,t)=>{let n,r=t;for(let t of e){if(n){let e=G(t,n);if(e===0)return n;if(e<r)r-=e;else{let i=r/e;if(i<=0)return n;if(i>=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:Rt((1-i)*n.x+i*t.x,5),y:Rt((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),zt=b((e,t,n)=>{y.info(`our points ${JSON.stringify(t)}`),t[0]!==n&&(t=t.reverse());let r=K(t,25),i=e?10:5,a=Math.atan2(t[0].y-r.y,t[0].x-r.x),o={x:0,y:0};return o.x=Math.sin(a)*i+(t[0].x+r.x)/2,o.y=-Math.cos(a)*i+(t[0].y+r.y)/2,o},`calcCardinalityPosition`);function Bt(e,t,n){let r=structuredClone(n);y.info(`our points`,r),t!==`start_left`&&t!==`start_right`&&r.reverse();let i=K(r,25+e),a=10+e*.5,o=Math.atan2(r[0].y-i.y,r[0].x-i.x),s={x:0,y:0};return t===`start_left`?(s.x=Math.sin(o+Math.PI)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o+Math.PI)*a+(r[0].y+i.y)/2):t===`end_right`?(s.x=Math.sin(o-Math.PI)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o-Math.PI)*a+(r[0].y+i.y)/2-5):t===`end_left`?(s.x=Math.sin(o)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2-5):(s.x=Math.sin(o)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2),s}b(Bt,`calcTerminalLabelPosition`);function q(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}b(q,`getStylesFromArray`);var Vt=0,Ht=b(()=>(Vt++,`id-`+Math.random().toString(36).substr(2,12)+`-`+Vt),`generateId`);function Ut(e){let t=``;for(let n=0;n<e;n++)t+=`0123456789abcdef`.charAt(Math.floor(Math.random()*16));return t}b(Ut,`makeRandomHex`);var Wt=b(e=>Ut(e.length),`random`),Gt=b(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),Kt=b(function(e,t){let n=t.text.replace(S.lineBreakRegex,` `),[,r]=Q(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),qt=p((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`<br/>`},n),S.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=Y(`${e} `,n),c=Y(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=Jt(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),Jt=p((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(Y(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function J(e,t){return X(e,t).height}b(J,`calculateTextHeight`);function Y(e,t){return X(e,t).width}b(Y,`calculateTextWidth`);var X=p((e,t)=>{let{fontSize:n=12,fontFamily:r=`Arial`,fontWeight:i=400}=t;if(!e)return{width:0,height:0};let[,a]=Q(n),o=[`sans-serif`,r],s=e.split(S.lineBreakRegex),c=[],l=ne(`body`);if(!l.remove)return{width:0,height:0,lineHeight:0};let u=l.append(`svg`);for(let e of o){let t=0,n={width:0,height:0,lineHeight:0};for(let r of s){let o=Gt();o.text=r||`​`;let s=Kt(u,o).style(`font-size`,a).style(`font-weight`,i).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}c.push(n)}return u.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Yt=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{b(this,`InitIDGenerator`)}},Z,Xt=b(function(e){return Z||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),Z.innerHTML=e,unescape(Z.textContent)},`entityDecode`);function Zt(e){return`str`in e}b(Zt,`isDetailedError`);var Qt=b((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Q=b(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function $(e,t){return Et({},e,t)}b($,`cleanAndMerge`);var $t={assignWithDepth:ae,wrapLabel:qt,calculateTextHeight:J,calculateTextWidth:Y,calculateTextDimensions:X,cleanAndMerge:$,detectInit:At,detectDirective:jt,isSubstringInArray:Nt,interpolateToCurve:W,calcLabelPosition:Lt,calcCardinalityPosition:zt,calcTerminalLabelPosition:Bt,formatUrl:Pt,getStylesFromArray:q,generateId:Ht,random:Wt,runFunc:Ft,entityDecode:Xt,insertTitle:Qt,isLabelCoordinateInPath:an,parseFontSize:Q,InitIDGenerator:Yt},en=b(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),tn=b(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),nn=b((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function rn(e){return e??null}b(rn,`handleUndefinedAttr`);function an(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}b(an,`isLabelCoordinateInPath`);export{Ge as A,M as B,U as C,Ye as D,Xe as E,Re as F,ce as G,fe as H,Le as I,Ie as L,Ue as M,R as N,V as O,ze as P,Me as R,ht as S,at as T,ue as U,ye as V,de as W,Et as _,en as a,St as b,q as c,Zt as d,Q as f,qt as g,$t as h,tn as i,We as j,Ke as k,rn as l,Mt as m,Y as n,Ht as o,Wt as p,$ as r,nn as s,J as t,W as u,wt as v,ot as w,gt as x,Ct as y,Ne as z};
3
- //# sourceMappingURL=chunk-5PVQY5BW-C5V4E1lO.mjs.map
3
+ //# sourceMappingURL=chunk-5PVQY5BW-DUXm3tDu.mjs.map
@@ -1,5 +1,5 @@
1
- import{t as e}from"./chunk-DXB73IDG-Bx-Ikbnu.mjs";function t(){let e=[{prop:`Function`,target:globalThis,violationType:`function_constructor`,strategy:`throw`,reason:`Function constructor allows arbitrary code execution`},{prop:`eval`,target:globalThis,violationType:`eval`,strategy:`throw`,reason:`eval() allows arbitrary code execution`},{prop:`setTimeout`,target:globalThis,violationType:`setTimeout`,strategy:`throw`,reason:`setTimeout with string argument allows code execution`},{prop:`setInterval`,target:globalThis,violationType:`setInterval`,strategy:`throw`,reason:`setInterval with string argument allows code execution`},{prop:`setImmediate`,target:globalThis,violationType:`setImmediate`,strategy:`throw`,reason:`setImmediate could be used to escape sandbox context`},{prop:`env`,target:process,violationType:`process_env`,strategy:`throw`,reason:`process.env could leak sensitive environment variables`,allowedKeys:new Set([`NODE_V8_COVERAGE`,`NODE_DEBUG`,`NODE_DEBUG_NATIVE`,`NODE_COMPILE_CACHE`,`WATCH_REPORT_DEPENDENCIES`,`FORCE_COLOR`,`DEBUG`,`UNDICI_NO_FG`,`JEST_WORKER_ID`,`__MINIMATCH_TESTING_PLATFORM__`,`LOG_TOKENS`,`LOG_STREAM`])},{prop:`binding`,target:process,violationType:`process_binding`,strategy:`throw`,reason:`process.binding provides access to native Node.js modules`},{prop:`_linkedBinding`,target:process,violationType:`process_binding`,strategy:`throw`,reason:`process._linkedBinding provides access to native Node.js modules`},{prop:`dlopen`,target:process,violationType:`process_dlopen`,strategy:`throw`,reason:`process.dlopen allows loading native addons`},{prop:`getBuiltinModule`,target:process,violationType:`process_get_builtin_module`,strategy:`throw`,reason:`process.getBuiltinModule allows loading native Node.js modules (fs, child_process, vm)`},{prop:`exit`,target:process,violationType:`process_exit`,strategy:`throw`,reason:`process.exit could terminate the interpreter`},{prop:`abort`,target:process,violationType:`process_exit`,strategy:`throw`,reason:`process.abort could crash the interpreter`},{prop:`kill`,target:process,violationType:`process_kill`,strategy:`throw`,reason:`process.kill could signal other processes`},{prop:`setuid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setuid could escalate privileges`},{prop:`setgid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setgid could escalate privileges`},{prop:`seteuid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.seteuid could escalate effective user privileges`},{prop:`setegid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setegid could escalate effective group privileges`},{prop:`initgroups`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.initgroups could modify supplementary group IDs`},{prop:`setgroups`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setgroups could modify supplementary group IDs`},{prop:`umask`,target:process,violationType:`process_umask`,strategy:`throw`,reason:`process.umask could modify file creation permissions`},{prop:`argv`,target:process,violationType:`process_argv`,strategy:`throw`,reason:`process.argv may contain secrets in CLI arguments`},{prop:`cwd`,target:process,violationType:`process_chdir`,strategy:`throw`,reason:`process.cwd could disclose real host working directory path`},{prop:`chdir`,target:process,violationType:`process_chdir`,strategy:`throw`,reason:`process.chdir could confuse the interpreter's CWD tracking`},{prop:`report`,target:process,violationType:`process_report`,strategy:`throw`,reason:`process.report could disclose full environment, host paths, and system info`},{prop:`loadEnvFile`,target:process,violationType:`process_env`,strategy:`throw`,reason:`process.loadEnvFile could load env files bypassing env proxy`},{prop:`setUncaughtExceptionCaptureCallback`,target:process,violationType:`process_exception_handler`,strategy:`throw`,reason:`setUncaughtExceptionCaptureCallback could intercept security errors`},{prop:`send`,target:process,violationType:`process_send`,strategy:`throw`,reason:`process.send could communicate with parent process in IPC contexts`},{prop:`channel`,target:process,violationType:`process_channel`,strategy:`throw`,reason:`process.channel could access IPC channel to parent process`},{prop:`cpuUsage`,target:process,violationType:`process_timing`,strategy:`throw`,reason:`process.cpuUsage could enable timing side-channel attacks`},{prop:`memoryUsage`,target:process,violationType:`process_timing`,strategy:`throw`,reason:`process.memoryUsage could enable timing side-channel attacks`},{prop:`hrtime`,target:process,violationType:`process_timing`,strategy:`throw`,reason:`process.hrtime could enable timing side-channel attacks`},{prop:`WeakRef`,target:globalThis,violationType:`weak_ref`,strategy:`throw`,reason:`WeakRef could be used to leak references outside sandbox`},{prop:`FinalizationRegistry`,target:globalThis,violationType:`finalization_registry`,strategy:`throw`,reason:`FinalizationRegistry could be used to leak references outside sandbox`},{prop:`Reflect`,target:globalThis,violationType:`reflect`,strategy:`freeze`,reason:`Reflect provides introspection capabilities`},{prop:`Proxy`,target:globalThis,violationType:`proxy`,strategy:`throw`,reason:`Proxy allows intercepting and modifying object behavior`},{prop:`WebAssembly`,target:globalThis,violationType:`webassembly`,strategy:`throw`,reason:`WebAssembly allows executing arbitrary compiled code`},{prop:`SharedArrayBuffer`,target:globalThis,violationType:`shared_array_buffer`,strategy:`throw`,reason:`SharedArrayBuffer could enable side-channel communication or timing attacks`},{prop:`Atomics`,target:globalThis,violationType:`atomics`,strategy:`throw`,reason:`Atomics could enable side-channel communication or timing attacks`},{prop:`performance`,target:globalThis,violationType:`performance_timing`,strategy:`throw`,reason:`performance.now() provides sub-millisecond timing for side-channel attacks`},{prop:`stdout`,target:process,violationType:`process_stdout`,strategy:`throw`,reason:`process.stdout could bypass interpreter output to write to host stdout`},{prop:`stderr`,target:process,violationType:`process_stderr`,strategy:`throw`,reason:`process.stderr could bypass interpreter output to write to host stderr`},{prop:`__defineGetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__defineGetter__ allows prototype pollution via getter injection`},{prop:`__defineSetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__defineSetter__ allows prototype pollution via setter injection`},{prop:`__lookupGetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__lookupGetter__ enables introspection for prototype pollution attacks`},{prop:`__lookupSetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__lookupSetter__ enables introspection for prototype pollution attacks`},{prop:`JSON`,target:globalThis,violationType:`json_mutation`,strategy:`freeze`,reason:`Freeze JSON to prevent mutation of parsing/serialization`},{prop:`Math`,target:globalThis,violationType:`math_mutation`,strategy:`freeze`,reason:`Freeze Math to prevent mutation of math utilities`}];try{let t=Object.getPrototypeOf(async()=>{}).constructor;t&&t!==Function&&e.push({prop:`constructor`,target:Object.getPrototypeOf(async()=>{}),violationType:`async_function_constructor`,strategy:`throw`,reason:`AsyncFunction constructor allows arbitrary async code execution`})}catch{}try{let t=Object.getPrototypeOf(function*(){}).constructor;t&&t!==Function&&e.push({prop:`constructor`,target:Object.getPrototypeOf(function*(){}),violationType:`generator_function_constructor`,strategy:`throw`,reason:`GeneratorFunction constructor allows arbitrary generator code execution`})}catch{}try{let t=Object.getPrototypeOf(async function*(){}).constructor;t&&t!==Function&&t!==Object.getPrototypeOf(async()=>{}).constructor&&e.push({prop:`constructor`,target:Object.getPrototypeOf(async function*(){}),violationType:`async_generator_function_constructor`,strategy:`throw`,reason:`AsyncGeneratorFunction constructor allows arbitrary async generator code execution`})}catch{}return e.filter(e=>{try{return e.target[e.prop]!==void 0}catch{return!1}})}var n=typeof __BROWSER__<`u`&&__BROWSER__;function r(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var i=null;if(!n)try{let{AsyncLocalStorage:t}=e(`node:async_hooks`);i=t}catch{}var a=`
1
+ import{t as e}from"./chunk-DXB73IDG-F_tmy-Lz.mjs";function t(){let e=[{prop:`Function`,target:globalThis,violationType:`function_constructor`,strategy:`throw`,reason:`Function constructor allows arbitrary code execution`},{prop:`eval`,target:globalThis,violationType:`eval`,strategy:`throw`,reason:`eval() allows arbitrary code execution`},{prop:`setTimeout`,target:globalThis,violationType:`setTimeout`,strategy:`throw`,reason:`setTimeout with string argument allows code execution`},{prop:`setInterval`,target:globalThis,violationType:`setInterval`,strategy:`throw`,reason:`setInterval with string argument allows code execution`},{prop:`setImmediate`,target:globalThis,violationType:`setImmediate`,strategy:`throw`,reason:`setImmediate could be used to escape sandbox context`},{prop:`env`,target:process,violationType:`process_env`,strategy:`throw`,reason:`process.env could leak sensitive environment variables`,allowedKeys:new Set([`NODE_V8_COVERAGE`,`NODE_DEBUG`,`NODE_DEBUG_NATIVE`,`NODE_COMPILE_CACHE`,`WATCH_REPORT_DEPENDENCIES`,`FORCE_COLOR`,`DEBUG`,`UNDICI_NO_FG`,`JEST_WORKER_ID`,`__MINIMATCH_TESTING_PLATFORM__`,`LOG_TOKENS`,`LOG_STREAM`])},{prop:`binding`,target:process,violationType:`process_binding`,strategy:`throw`,reason:`process.binding provides access to native Node.js modules`},{prop:`_linkedBinding`,target:process,violationType:`process_binding`,strategy:`throw`,reason:`process._linkedBinding provides access to native Node.js modules`},{prop:`dlopen`,target:process,violationType:`process_dlopen`,strategy:`throw`,reason:`process.dlopen allows loading native addons`},{prop:`getBuiltinModule`,target:process,violationType:`process_get_builtin_module`,strategy:`throw`,reason:`process.getBuiltinModule allows loading native Node.js modules (fs, child_process, vm)`},{prop:`exit`,target:process,violationType:`process_exit`,strategy:`throw`,reason:`process.exit could terminate the interpreter`},{prop:`abort`,target:process,violationType:`process_exit`,strategy:`throw`,reason:`process.abort could crash the interpreter`},{prop:`kill`,target:process,violationType:`process_kill`,strategy:`throw`,reason:`process.kill could signal other processes`},{prop:`setuid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setuid could escalate privileges`},{prop:`setgid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setgid could escalate privileges`},{prop:`seteuid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.seteuid could escalate effective user privileges`},{prop:`setegid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setegid could escalate effective group privileges`},{prop:`initgroups`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.initgroups could modify supplementary group IDs`},{prop:`setgroups`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setgroups could modify supplementary group IDs`},{prop:`umask`,target:process,violationType:`process_umask`,strategy:`throw`,reason:`process.umask could modify file creation permissions`},{prop:`argv`,target:process,violationType:`process_argv`,strategy:`throw`,reason:`process.argv may contain secrets in CLI arguments`},{prop:`cwd`,target:process,violationType:`process_chdir`,strategy:`throw`,reason:`process.cwd could disclose real host working directory path`},{prop:`chdir`,target:process,violationType:`process_chdir`,strategy:`throw`,reason:`process.chdir could confuse the interpreter's CWD tracking`},{prop:`report`,target:process,violationType:`process_report`,strategy:`throw`,reason:`process.report could disclose full environment, host paths, and system info`},{prop:`loadEnvFile`,target:process,violationType:`process_env`,strategy:`throw`,reason:`process.loadEnvFile could load env files bypassing env proxy`},{prop:`setUncaughtExceptionCaptureCallback`,target:process,violationType:`process_exception_handler`,strategy:`throw`,reason:`setUncaughtExceptionCaptureCallback could intercept security errors`},{prop:`send`,target:process,violationType:`process_send`,strategy:`throw`,reason:`process.send could communicate with parent process in IPC contexts`},{prop:`channel`,target:process,violationType:`process_channel`,strategy:`throw`,reason:`process.channel could access IPC channel to parent process`},{prop:`cpuUsage`,target:process,violationType:`process_timing`,strategy:`throw`,reason:`process.cpuUsage could enable timing side-channel attacks`},{prop:`memoryUsage`,target:process,violationType:`process_timing`,strategy:`throw`,reason:`process.memoryUsage could enable timing side-channel attacks`},{prop:`hrtime`,target:process,violationType:`process_timing`,strategy:`throw`,reason:`process.hrtime could enable timing side-channel attacks`},{prop:`WeakRef`,target:globalThis,violationType:`weak_ref`,strategy:`throw`,reason:`WeakRef could be used to leak references outside sandbox`},{prop:`FinalizationRegistry`,target:globalThis,violationType:`finalization_registry`,strategy:`throw`,reason:`FinalizationRegistry could be used to leak references outside sandbox`},{prop:`Reflect`,target:globalThis,violationType:`reflect`,strategy:`freeze`,reason:`Reflect provides introspection capabilities`},{prop:`Proxy`,target:globalThis,violationType:`proxy`,strategy:`throw`,reason:`Proxy allows intercepting and modifying object behavior`},{prop:`WebAssembly`,target:globalThis,violationType:`webassembly`,strategy:`throw`,reason:`WebAssembly allows executing arbitrary compiled code`},{prop:`SharedArrayBuffer`,target:globalThis,violationType:`shared_array_buffer`,strategy:`throw`,reason:`SharedArrayBuffer could enable side-channel communication or timing attacks`},{prop:`Atomics`,target:globalThis,violationType:`atomics`,strategy:`throw`,reason:`Atomics could enable side-channel communication or timing attacks`},{prop:`performance`,target:globalThis,violationType:`performance_timing`,strategy:`throw`,reason:`performance.now() provides sub-millisecond timing for side-channel attacks`},{prop:`stdout`,target:process,violationType:`process_stdout`,strategy:`throw`,reason:`process.stdout could bypass interpreter output to write to host stdout`},{prop:`stderr`,target:process,violationType:`process_stderr`,strategy:`throw`,reason:`process.stderr could bypass interpreter output to write to host stderr`},{prop:`__defineGetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__defineGetter__ allows prototype pollution via getter injection`},{prop:`__defineSetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__defineSetter__ allows prototype pollution via setter injection`},{prop:`__lookupGetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__lookupGetter__ enables introspection for prototype pollution attacks`},{prop:`__lookupSetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__lookupSetter__ enables introspection for prototype pollution attacks`},{prop:`JSON`,target:globalThis,violationType:`json_mutation`,strategy:`freeze`,reason:`Freeze JSON to prevent mutation of parsing/serialization`},{prop:`Math`,target:globalThis,violationType:`math_mutation`,strategy:`freeze`,reason:`Freeze Math to prevent mutation of math utilities`}];try{let t=Object.getPrototypeOf(async()=>{}).constructor;t&&t!==Function&&e.push({prop:`constructor`,target:Object.getPrototypeOf(async()=>{}),violationType:`async_function_constructor`,strategy:`throw`,reason:`AsyncFunction constructor allows arbitrary async code execution`})}catch{}try{let t=Object.getPrototypeOf(function*(){}).constructor;t&&t!==Function&&e.push({prop:`constructor`,target:Object.getPrototypeOf(function*(){}),violationType:`generator_function_constructor`,strategy:`throw`,reason:`GeneratorFunction constructor allows arbitrary generator code execution`})}catch{}try{let t=Object.getPrototypeOf(async function*(){}).constructor;t&&t!==Function&&t!==Object.getPrototypeOf(async()=>{}).constructor&&e.push({prop:`constructor`,target:Object.getPrototypeOf(async function*(){}),violationType:`async_generator_function_constructor`,strategy:`throw`,reason:`AsyncGeneratorFunction constructor allows arbitrary async generator code execution`})}catch{}return e.filter(e=>{try{return e.target[e.prop]!==void 0}catch{return!1}})}var n=typeof __BROWSER__<`u`&&__BROWSER__;function r(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var i=null;if(!n)try{let{AsyncLocalStorage:t}=e(`node:async_hooks`);i=t}catch{}var a=`
2
2
 
3
3
  This is a defense-in-depth measure and indicates a bug in just-bash. Please report this at security@vercel.com`,o=class extends Error{violation;constructor(e,t){super(e+a),this.violation=t,this.name=`SecurityViolationError`}},s=!n&&i?new i:null,c=1e3;function l(e,t,...n){return s.run(e,()=>t(...n))}var u={enabled:!0,auditMode:!1};function d(e){return e===void 0?{...u,enabled:!1}:typeof e==`boolean`?{...u,enabled:e}:{...u,...e}}var f=class i{static instance=null;static importHooksRegistered=!1;static trustedExecutionDepth=new Map;config;refCount=0;patchFailures=[];activeExecutionIds=new Set;contextCache=new Map;originalDescriptors=[];violations=[];activationTime=0;totalActiveTimeMs=0;constructor(e){this.config=e}static getInstance(e){let t=d(e);if(!i.instance)i.instance=new i(t);else{let e=i.instance.config;if(t.enabled!==e.enabled||t.auditMode!==e.auditMode)throw Error(`DefenseInDepthBox config conflict: requested {enabled: ${t.enabled}, auditMode: ${t.auditMode}} but singleton already has {enabled: ${e.enabled}, auditMode: ${e.auditMode}}. All Bash instances must use the same defense-in-depth security settings, or call DefenseInDepthBox.resetInstance() between incompatible configurations.`)}return i.instance}static resetInstance(){i.instance&&=(i.instance.forceDeactivate(),null),i.trustedExecutionDepth.clear()}static isInSandboxedContext(){return s?s?.getStore()?.sandboxActive===!0:!1}static getCurrentExecutionId(){if(s)return s?.getStore()?.executionId}static enterTrustedScope(e){let t=i.trustedExecutionDepth.get(e)??0;i.trustedExecutionDepth.set(e,t+1)}static leaveTrustedScope(e){let t=i.trustedExecutionDepth.get(e);if(t){if(t===1){i.trustedExecutionDepth.delete(e);return}i.trustedExecutionDepth.set(e,t-1)}}static isTrustedScopeActive(e){return e?(i.trustedExecutionDepth.get(e)??0)>0:!1}isExecutionIdActive(e){return this.activeExecutionIds.has(e)}getCachedContext(e){let t=this.contextCache.get(e);return t||(t={sandboxActive:!0,executionId:e},this.contextCache.set(e,t)),t}getPreferredActiveExecutionId(){if(this.activeExecutionIds.size!==0)for(let e of this.activeExecutionIds)return e}static bindCurrentContext(e){if(!s)return e;let t=i.instance,n=s.getStore(),r=n?.sandboxActive===!0?n.executionId:t?.getPreferredActiveExecutionId();if(!r)return e;let a=t?.getCachedContext(r)??{sandboxActive:!0,executionId:r};return((...t)=>{let n=i.instance;if(!(n&&!n.isExecutionIdActive(r)&&(n.recordViolation(`bound_callback_after_deactivate`,`bound callback`,`Bound callback blocked after originating execution was deactivated`),!n.config.auditMode)))return l(a,e,...t)})}isEnabled(){return this.config.enabled===!0&&s!==null&&!n}updateConfig(e){this.config={...this.config,...e}}activate(){if(n||!this.config.enabled||!s){let e=r(),t=!1;return{run:e=>t?Promise.reject(Error(`DefenseInDepthBox handle is deactivated and cannot run new work`)):e(),deactivate:()=>{t=!0},executionId:e}}this.refCount++,this.refCount===1&&(this.applyPatches(),this.activationTime=Date.now());let e=r(),t=!1;return{run:n=>t?Promise.reject(Error(`DefenseInDepthBox handle is deactivated and cannot run new work`)):(this.activeExecutionIds.add(e),s.run({sandboxActive:!0,executionId:e},n)),deactivate:()=>{t||(t=!0,this.activeExecutionIds.delete(e),this.contextCache.delete(e),this.refCount--,this.refCount===0&&(this.restorePatches(),this.totalActiveTimeMs+=Date.now()-this.activationTime),this.refCount<0&&(this.refCount=0))},executionId:e}}forceDeactivate(){this.refCount>0&&(this.restorePatches(),this.totalActiveTimeMs+=Date.now()-this.activationTime),this.activeExecutionIds.clear(),this.contextCache.clear(),this.refCount=0}isActive(){return this.refCount>0}getStats(){return{violationsBlocked:this.violations.length,violations:[...this.violations],activeTimeMs:this.totalActiveTimeMs+(this.refCount>0?Date.now()-this.activationTime:0),refCount:this.refCount}}getPatchFailures(){return[...this.patchFailures]}clearViolations(){this.violations=[]}getPathForTarget(e,t){return e===globalThis?`globalThis.${t}`:e===process?`process.${t}`:e===Error?`Error.${t}`:e===Function.prototype?`Function.prototype.${t}`:e===Object.prototype?`Object.prototype.${t}`:`<object>.${t}`}static runTrusted(e){if(!s)return e();let t=s.getStore();if(!t)return e();let{executionId:n}=t;return s.run({...t,trusted:!0},()=>{i.enterTrustedScope(n);try{let t=e();return typeof t==`object`&&t&&`finally`in t&&typeof t.finally==`function`?t.finally(()=>{i.leaveTrustedScope(n)}):(i.leaveTrustedScope(n),t)}catch(e){throw i.leaveTrustedScope(n),e}})}static async runTrustedAsync(e){if(!s)return e();let t=s.getStore();if(!t)return e();let{executionId:n}=t;return s.run({...t,trusted:!0},async()=>{i.enterTrustedScope(n);try{return await e()}finally{i.leaveTrustedScope(n)}})}shouldBlock(){if(n||this.config.auditMode||!s)return!1;let e=s?.getStore();return!(e?.sandboxActive!==!0||e.trusted||i.isTrustedScopeActive(e.executionId))}recordViolation(e,t,n){let r={timestamp:Date.now(),type:e,message:n,path:t,stack:Error().stack,executionId:s?.getStore()?.executionId};if(this.violations.length<c&&this.violations.push(r),this.config.onViolation)try{this.config.onViolation(r)}catch(e){console.debug(`[DefenseInDepthBox] onViolation callback threw:`,e instanceof Error?e.message:e)}return r}createBlockingProxy(e,t,n){let r=this;return new Proxy(e,{apply(e,i,a){if(r.shouldBlock()){let e=`${t} is blocked during script execution`;throw new o(e,r.recordViolation(n,t,e))}return r.config.auditMode&&s?.getStore()?.sandboxActive===!0&&r.recordViolation(n,t,`${t} called (audit mode)`),Reflect.apply(e,i,a)},construct(e,i,a){if(r.shouldBlock()){let e=`${t} constructor is blocked during script execution`;throw new o(e,r.recordViolation(n,t,e))}return r.config.auditMode&&s?.getStore()?.sandboxActive===!0&&r.recordViolation(n,t,`${t} constructor called (audit mode)`),Reflect.construct(e,i,a)}})}createBlockingObjectProxy(e,t,n,r){let i=this;return new Proxy(e,{get(e,a,c){if(i.shouldBlock()){if(r&&typeof a==`string`&&r.has(a))return Reflect.get(e,a,c);let s=`${t}.${String(a)}`,l=`${s} is blocked during script execution`;throw new o(l,i.recordViolation(n,s,l))}if(i.config.auditMode&&s?.getStore()?.sandboxActive===!0){let e=`${t}.${String(a)}`;i.recordViolation(n,e,`${e} accessed (audit mode)`)}return Reflect.get(e,a,c)},set(e,r,a,s){if(i.shouldBlock()){let e=`${t}.${String(r)}`,a=`${e} modification is blocked during script execution`;throw new o(a,i.recordViolation(n,e,a))}return Reflect.set(e,r,a,s)},ownKeys(e){if(i.shouldBlock()){let e=`${t} enumeration is blocked during script execution`;throw new o(e,i.recordViolation(n,t,e))}return Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,r){if(i.shouldBlock()){let e=`${t}.${String(r)}`,a=`${e} descriptor access is blocked during script execution`;throw new o(a,i.recordViolation(n,e,a))}return Reflect.getOwnPropertyDescriptor(e,r)},has(e,r){if(i.shouldBlock()){let e=`${t}.${String(r)}`,a=`${e} existence check is blocked during script execution`;throw new o(a,i.recordViolation(n,e,a))}return Reflect.has(e,r)},deleteProperty(e,r){if(i.shouldBlock()){let e=`${t}.${String(r)}`,a=`${e} deletion is blocked during script execution`;throw new o(a,i.recordViolation(n,e,a))}return Reflect.deleteProperty(e,r)},setPrototypeOf(e,r){if(i.shouldBlock()){let e=`${t} setPrototypeOf is blocked during script execution`;throw new o(e,i.recordViolation(n,t,e))}return Reflect.setPrototypeOf(e,r)},defineProperty(e,r,a){if(i.shouldBlock()){let e=`${t}.${String(r)}`,a=`${e} defineProperty is blocked during script execution`;throw new o(a,i.recordViolation(n,e,a))}return Reflect.defineProperty(e,r,a)}})}applyPatches(){this.patchFailures=[];let e=t(),n=new Set([`process_send`,`process_channel`,`process_stdout`,`process_stderr`]);for(let t of e)n.has(t.violationType)||this.applyPatch(t);this.protectConstructorChain(),this.protectErrorPrepareStackTrace(),this.protectPromiseThen(),this.protectDynamicImport(),this.protectModuleLoad(),this.protectModuleResolveFilename(),this.protectProcessMainModule(),this.protectProcessExecPath(),this.lockWellKnownSymbols(),this.protectProxyRevocable();let r=[`Function.prototype.constructor`,`Module._load`],i=this.patchFailures.filter(e=>r.includes(e));if(i.length>0)throw this.restorePatches(),Error(`DefenseInDepthBox: critical patches failed: ${i.join(`, `)}`)}protectConstructorChain(){this.patchPrototypeConstructor(Function.prototype,`Function.prototype.constructor`,`function_constructor`);try{let e=Object.getPrototypeOf(async()=>{}).constructor;e&&e!==Function&&this.patchPrototypeConstructor(e.prototype,`AsyncFunction.prototype.constructor`,`async_function_constructor`)}catch(e){this.patchFailures.push(`AsyncFunction.prototype.constructor`),console.debug(`[DefenseInDepthBox] Could not patch AsyncFunction.prototype.constructor:`,e instanceof Error?e.message:e)}try{let e=Object.getPrototypeOf(function*(){}).constructor;e&&e!==Function&&this.patchPrototypeConstructor(e.prototype,`GeneratorFunction.prototype.constructor`,`generator_function_constructor`)}catch(e){this.patchFailures.push(`GeneratorFunction.prototype.constructor`),console.debug(`[DefenseInDepthBox] Could not patch GeneratorFunction.prototype.constructor:`,e instanceof Error?e.message:e)}try{let e=Object.getPrototypeOf(async function*(){}).constructor,t=Object.getPrototypeOf(async()=>{}).constructor;e&&e!==Function&&e!==t&&this.patchPrototypeConstructor(e.prototype,`AsyncGeneratorFunction.prototype.constructor`,`async_generator_function_constructor`)}catch(e){this.patchFailures.push(`AsyncGeneratorFunction.prototype.constructor`),console.debug(`[DefenseInDepthBox] Could not patch AsyncGeneratorFunction.prototype.constructor:`,e instanceof Error?e.message:e)}}protectErrorPrepareStackTrace(){let e=this;try{let t=Object.getOwnPropertyDescriptor(Error,`prepareStackTrace`);this.originalDescriptors.push({target:Error,prop:`prepareStackTrace`,descriptor:t});let n=t?.value;Object.defineProperty(Error,`prepareStackTrace`,{get(){return n},set(t){if(e.shouldBlock()){let t=`Error.prepareStackTrace modification is blocked during script execution`;throw new o(t,e.recordViolation(`error_prepare_stack_trace`,`Error.prepareStackTrace`,t))}e.config.auditMode&&s?.getStore()?.sandboxActive===!0&&e.recordViolation(`error_prepare_stack_trace`,`Error.prepareStackTrace`,`Error.prepareStackTrace set (audit mode)`),n=t},configurable:!0})}catch(e){this.patchFailures.push(`Error.prepareStackTrace`),console.debug(`[DefenseInDepthBox] Could not protect Error.prepareStackTrace:`,e instanceof Error?e.message:e)}}protectPromiseThen(){let e=this;try{let t=function(...e){return s.run(this.captured,()=>{if(!this.box.isExecutionIdActive(this.executionId)){if(this.box.recordViolation(`promise_then_after_deactivate`,`Promise.then`,`Promise.then callback is blocked after defense deactivation`),this.box.config.auditMode)return Reflect.apply(this.cb,void 0,e);if(this.kind===`fulfilled`)return e[0];throw e[0]}return Reflect.apply(this.cb,void 0,e)})},n=Object.getOwnPropertyDescriptor(Promise.prototype,`then`);this.originalDescriptors.push({target:Promise.prototype,prop:`then`,descriptor:n});let r=n?.value;if(typeof r!=`function`)return;Object.defineProperty(Promise.prototype,`then`,{value:function(n,i){if(!s)return Reflect.apply(r,this,[n,i]);let a=s.getStore(),o=a?.sandboxActive===!0&&a.trusted!==!0?a.executionId:void 0;if(!o)return Reflect.apply(r,this,[n,i]);let c=e.getCachedContext(o),l=(n,r)=>typeof n==`function`?t.bind({box:e,executionId:o,captured:c,cb:n,kind:r}):n;return Reflect.apply(r,this,[l(n,`fulfilled`),l(i,`rejected`)])},writable:!0,configurable:!0})}catch(e){this.patchFailures.push(`Promise.prototype.then`),console.debug(`[DefenseInDepthBox] Could not protect Promise.prototype.then:`,e instanceof Error?e.message:e)}}patchPrototypeConstructor(e,t,n){let r=this;try{let i=Object.getOwnPropertyDescriptor(e,`constructor`);this.originalDescriptors.push({target:e,prop:`constructor`,descriptor:i});let a=i?.value;Object.defineProperty(e,`constructor`,{get(){if(r.shouldBlock()){let e=`${t} access is blocked during script execution`;throw new o(e,r.recordViolation(n,t,e))}return r.config.auditMode&&s?.getStore()?.sandboxActive===!0&&r.recordViolation(n,t,`${t} accessed (audit mode)`),a},set(e){if(r.shouldBlock()){let e=`${t} modification is blocked during script execution`;throw new o(e,r.recordViolation(n,t,e))}Object.defineProperty(this,`constructor`,{value:e,writable:!0,configurable:!0})},configurable:!0})}catch(e){this.patchFailures.push(t),console.debug(`[DefenseInDepthBox] Could not patch ${t}:`,e instanceof Error?e.message:e)}}protectProcessMainModule(){if(typeof process>`u`)return;let e=this;try{let t=Object.getOwnPropertyDescriptor(process,`mainModule`);this.originalDescriptors.push({target:process,prop:`mainModule`,descriptor:t});let n=t?.value;n!==void 0&&Object.defineProperty(process,`mainModule`,{get(){if(e.shouldBlock()){let t=`process.mainModule access is blocked during script execution`;throw new o(t,e.recordViolation(`process_main_module`,`process.mainModule`,t))}return e.config.auditMode&&s?.getStore()?.sandboxActive===!0&&e.recordViolation(`process_main_module`,`process.mainModule`,`process.mainModule accessed (audit mode)`),n},set(t){if(e.shouldBlock()){let t=`process.mainModule modification is blocked during script execution`;throw new o(t,e.recordViolation(`process_main_module`,`process.mainModule`,t))}Object.defineProperty(process,`mainModule`,{value:t,writable:!0,configurable:!0})},configurable:!0})}catch(e){this.patchFailures.push(`process.mainModule`),console.debug(`[DefenseInDepthBox] Could not protect process.mainModule:`,e instanceof Error?e.message:e)}}protectProcessExecPath(){if(typeof process>`u`)return;let e=this;try{let t=Object.getOwnPropertyDescriptor(process,`execPath`);this.originalDescriptors.push({target:process,prop:`execPath`,descriptor:t});let n=t?.value??process.execPath;Object.defineProperty(process,`execPath`,{get(){if(e.shouldBlock()){let t=`process.execPath access is blocked during script execution`;throw new o(t,e.recordViolation(`process_exec_path`,`process.execPath`,t))}return e.config.auditMode&&s?.getStore()?.sandboxActive===!0&&e.recordViolation(`process_exec_path`,`process.execPath`,`process.execPath accessed (audit mode)`),n},set(t){if(e.shouldBlock()){let t=`process.execPath modification is blocked during script execution`;throw new o(t,e.recordViolation(`process_exec_path`,`process.execPath`,t))}Object.defineProperty(process,`execPath`,{value:t,writable:!0,configurable:!0})},configurable:!0})}catch(e){this.patchFailures.push(`process.execPath`),console.debug(`[DefenseInDepthBox] Could not protect process.execPath:`,e instanceof Error?e.message:e)}}lockWellKnownSymbols(){let e=(e,t)=>{try{let n=Object.getOwnPropertyDescriptor(e,t);if(n?.configurable){if(`value`in n){Object.defineProperty(e,t,{...n,configurable:!1,writable:!1});return}Object.defineProperty(e,t,{...n,configurable:!1})}}catch{}};for(let t of[Array,Map,Set,RegExp,Promise])e(t,Symbol.species);for(let t of[Array.prototype,String.prototype,Map.prototype,Set.prototype])e(t,Symbol.iterator);e(Symbol.prototype,Symbol.toPrimitive),e(Date.prototype,Symbol.toPrimitive);for(let t of[Symbol.match,Symbol.matchAll,Symbol.replace,Symbol.search,Symbol.split])e(RegExp.prototype,t);e(Function.prototype,Symbol.hasInstance),e(Array.prototype,Symbol.unscopables);for(let t of[Map.prototype,Set.prototype,Promise.prototype,ArrayBuffer.prototype])e(t,Symbol.toStringTag);try{let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);this.originalDescriptors.push({target:Error,prop:`stackTraceLimit`,descriptor:e}),Object.defineProperty(Error,`stackTraceLimit`,{value:Error.stackTraceLimit,writable:!1,configurable:!0})}catch{}}protectProxyRevocable(){let e=this;try{let t=Proxy.revocable;if(typeof t!=`function`)return;let n=Object.getOwnPropertyDescriptor(Proxy,`revocable`);this.originalDescriptors.push({target:Proxy,prop:`revocable`,descriptor:n}),Object.defineProperty(Proxy,`revocable`,{value:function(n,r){if(e.shouldBlock()){let t=`Proxy.revocable is blocked during script execution`;throw new o(t,e.recordViolation(`proxy`,`Proxy.revocable`,t))}return e.config.auditMode&&s?.getStore()?.sandboxActive===!0&&e.recordViolation(`proxy`,`Proxy.revocable`,`Proxy.revocable called (audit mode)`),t(n,r)},writable:!1,configurable:!0})}catch(e){this.patchFailures.push(`Proxy.revocable`),console.debug(`[DefenseInDepthBox] Could not protect Proxy.revocable:`,e instanceof Error?e.message:e)}}protectDynamicImport(){if(!(n||i.importHooksRegistered))try{let t=this,n=e(`node:module`),r=new Set;for(let e of n.builtinModules??[]){let t=e.startsWith(`node:`)?e.slice(5):e;r.add(t);let n=t.indexOf(`/`);n>0&&r.add(t.slice(0,n))}let a=e=>{if(e.startsWith(`./`)||e.startsWith(`../`)||e.startsWith(`/`)||e.startsWith(`file:`)||e.startsWith(`data:`)||e.startsWith(`blob:`)||e.startsWith(`http:`)||e.startsWith(`https:`))return!1;let t=e.startsWith(`node:`)?e.slice(5):e;if(!t)return!1;if(typeof n.isBuiltin==`function`&&n.isBuiltin(t)||r.has(t))return!0;let i=t.indexOf(`/`);return i>0&&r.has(t.slice(0,i))},c=()=>{let e=s?.getStore();return t.config.auditMode===!0&&e?.sandboxActive===!0&&e.trusted!==!0&&!i.isTrustedScopeActive(e.executionId)};if(typeof n.registerHooks==`function`){n.registerHooks({resolve(e,n,r){if(e.startsWith(`data:`)||e.startsWith(`blob:`))throw Error(`dynamic import of ${e.startsWith(`data:`)?`data:`:`blob:`} URLs is blocked by defense-in-depth`);if(a(e)){let n=`import(${e})`,r=`dynamic import of Node.js builtin '${e}' is blocked during script execution`;if(t.shouldBlock())throw new o(r,t.recordViolation(`dynamic_import_builtin`,n,r));c()&&t.recordViolation(`dynamic_import_builtin`,n,`dynamic import of Node.js builtin '${e}' called (audit mode)`)}return r(e,n)}}),i.importHooksRegistered=!0;return}if(typeof n.register==`function`){let e=[`export async function resolve(specifier, context, nextResolve) {`,` if (specifier.startsWith("data:") || specifier.startsWith("blob:")) {`,` throw new Error("dynamic import of " + (specifier.startsWith("data:") ? "data:" : "blob:") + " URLs is blocked by defense-in-depth");`,` }`,` return nextResolve(specifier, context);`,`}`].join(`
4
4
  `);n.register(`data:text/javascript,${encodeURIComponent(e)}`),i.importHooksRegistered=!0}}catch(e){console.debug(`[DefenseInDepthBox] Could not register import() hooks:`,e instanceof Error?e.message:e)}}protectModuleLoad(){if(!n)try{let t=null;if(typeof process<`u`){let e=process.mainModule;e&&typeof e==`object`&&(t=e.constructor)}if(!t&&typeof e<`u`&&typeof e.main<`u`&&(t=e.main.constructor),!t||typeof t._load!=`function`)return;let n=t._load,r=Object.getOwnPropertyDescriptor(t,`_load`);this.originalDescriptors.push({target:t,prop:`_load`,descriptor:r});let i=this.createBlockingProxy(n,`Module._load`,`module_load`);Object.defineProperty(t,`_load`,{value:i,writable:!0,configurable:!0})}catch(e){this.patchFailures.push(`Module._load`),console.debug(`[DefenseInDepthBox] Could not protect Module._load:`,e instanceof Error?e.message:e)}}protectModuleResolveFilename(){if(!n)try{let t=null;if(typeof process<`u`){let e=process.mainModule;e&&typeof e==`object`&&(t=e.constructor)}if(!t&&typeof e<`u`&&typeof e.main<`u`&&(t=e.main.constructor),!t||typeof t._resolveFilename!=`function`)return;let n=t._resolveFilename,r=Object.getOwnPropertyDescriptor(t,`_resolveFilename`);this.originalDescriptors.push({target:t,prop:`_resolveFilename`,descriptor:r});let i=this.createBlockingProxy(n,`Module._resolveFilename`,`module_resolve_filename`);Object.defineProperty(t,`_resolveFilename`,{value:i,writable:!0,configurable:!0})}catch(e){this.patchFailures.push(`Module._resolveFilename`),console.debug(`[DefenseInDepthBox] Could not protect Module._resolveFilename:`,e instanceof Error?e.message:e)}}applyPatch(e){let{target:t,prop:n,violationType:r,strategy:i}=e;try{let a=t[n];if(a===void 0)return;let o=Object.getOwnPropertyDescriptor(t,n);if(this.originalDescriptors.push({target:t,prop:n,descriptor:o}),i===`freeze`)typeof a==`object`&&a&&Object.freeze(a);else{let i=this.getPathForTarget(t,n),o=typeof a==`function`?this.createBlockingProxy(a,i,r):this.createBlockingObjectProxy(a,i,r,e.allowedKeys);Object.defineProperty(t,n,{value:o,writable:!0,configurable:!0})}}catch(e){let r=this.getPathForTarget(t,n);this.patchFailures.push(r),console.debug(`[DefenseInDepthBox] Could not patch ${r}:`,e instanceof Error?e.message:e)}}restorePatches(){for(let e=this.originalDescriptors.length-1;e>=0;e--){let{target:t,prop:n,descriptor:r}=this.originalDescriptors[e];try{r?Object.defineProperty(t,n,r):delete t[n]}catch(e){let r=this.getPathForTarget(t,n);console.debug(`[DefenseInDepthBox] Could not restore ${r}:`,e instanceof Error?e.message:e)}}this.originalDescriptors=[]}};export{o as n,f as t};
5
- //# sourceMappingURL=chunk-5QMZ5MUS-_0tQyQsf.mjs.map
5
+ //# sourceMappingURL=chunk-5QMZ5MUS-BwpNU33k.mjs.map
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-3THT3N7L-CBWmNncQ.mjs";import{r as t,t as n}from"./chunk-74CEPOFO-V0JXh91S.mjs";import{t as r}from"./chunk-HWKDQ44K-BJxdK4fT.mjs";var i={name:`tr`,summary:`translate or delete characters`,usage:`tr [OPTION]... SET1 [SET2]`,options:[`-c, -C, --complement use the complement of SET1`,`-d, --delete delete characters in SET1`,`-s, --squeeze-repeats squeeze repeated characters`,` --help display this help and exit`],description:`SET syntax:
1
+ import{n as e}from"./chunk-3THT3N7L-B1WzJUh4.mjs";import{r as t,t as n}from"./chunk-74CEPOFO-V0JXh91S.mjs";import{t as r}from"./chunk-HWKDQ44K-BJxdK4fT.mjs";var i={name:`tr`,summary:`translate or delete characters`,usage:`tr [OPTION]... SET1 [SET2]`,options:[`-c, -C, --complement use the complement of SET1`,`-d, --delete delete characters in SET1`,`-s, --squeeze-repeats squeeze repeated characters`,` --help display this help and exit`],description:`SET syntax:
2
2
  a-z character range
3
3
  [:alnum:] all letters and digits
4
4
  [:alpha:] all letters
@@ -18,4 +18,4 @@ import{n as e}from"./chunk-3THT3N7L-CBWmNncQ.mjs";import{r as t,t as n}from"./ch
18
18
  `,exitCode:1};if(!d&&!f&&p.length<2)return{stdout:``,stderr:`tr: missing operand after SET1
19
19
  `,exitCode:1};let m,h;try{m=o(p[0]),h=p.length>1?o(p[1]):``}catch(t){return{stdout:``,stderr:`${e(t.message)}
20
20
  `,exitCode:1}}let g=c.stdin,_=e=>{let t=m.includes(e);return u?!t:t},v=``;if(d)for(let e of g)_(e)||(v+=e);else if(f&&p.length===1){let e=``;for(let t of g)_(t)&&t===e||(v+=t,e=t)}else{if(u){let e=h.length>0?h[h.length-1]:``;for(let t of g)m.includes(t)?v+=t:v+=e}else{let e=new Map;for(let t=0;t<m.length;t++){let n=t<h.length?h[t]:h[h.length-1];e.set(m[t],n)}for(let t of g)v+=e.get(t)??t}if(f){let e=``,t=``;for(let n of v)h.includes(n)&&n===t||(e+=n,t=n);v=e}}return{stdout:v,stderr:``,exitCode:0}}},l={name:`tr`,flags:[{flag:`-c`,type:`boolean`},{flag:`-C`,type:`boolean`},{flag:`-d`,type:`boolean`},{flag:`-s`,type:`boolean`}],stdinType:`text`,needsArgs:!0};export{c as n,l as t};
21
- //# sourceMappingURL=chunk-62RKD26F-K5NW6_Si.mjs.map
21
+ //# sourceMappingURL=chunk-62RKD26F-DebCAz0V.mjs.map
@@ -1,7 +1,7 @@
1
- import{t as e}from"./chunk-44UOCSGV-B6GSHp1s.mjs";import{r as t,t as n}from"./chunk-74CEPOFO-V0JXh91S.mjs";import{t as r}from"./chunk-HWKDQ44K-BJxdK4fT.mjs";var i={name:`mv`,summary:`move (rename) files`,usage:`mv [OPTION]... SOURCE... DEST`,options:[`-f, --force do not prompt before overwriting`,`-n, --no-clobber do not overwrite an existing file`,`-v, --verbose explain what is being done`,` --help display this help and exit`]},a={force:{short:`f`,long:`force`,type:`boolean`},noClobber:{short:`n`,long:`no-clobber`,type:`boolean`},verbose:{short:`v`,long:`verbose`,type:`boolean`}},o={name:`mv`,async execute(o,s){if(n(o))return t(i);let c=r(`mv`,o,a);if(!c.ok)return c.error;c.result.flags.force;let l=c.result.flags.noClobber,u=c.result.flags.verbose,d=c.result.positional;if(d.length<2)return{stdout:``,stderr:`mv: missing destination file operand
1
+ import{t as e}from"./chunk-44UOCSGV-BZ6LfyW2.mjs";import{r as t,t as n}from"./chunk-74CEPOFO-V0JXh91S.mjs";import{t as r}from"./chunk-HWKDQ44K-BJxdK4fT.mjs";var i={name:`mv`,summary:`move (rename) files`,usage:`mv [OPTION]... SOURCE... DEST`,options:[`-f, --force do not prompt before overwriting`,`-n, --no-clobber do not overwrite an existing file`,`-v, --verbose explain what is being done`,` --help display this help and exit`]},a={force:{short:`f`,long:`force`,type:`boolean`},noClobber:{short:`n`,long:`no-clobber`,type:`boolean`},verbose:{short:`v`,long:`verbose`,type:`boolean`}},o={name:`mv`,async execute(o,s){if(n(o))return t(i);let c=r(`mv`,o,a);if(!c.ok)return c.error;c.result.flags.force;let l=c.result.flags.noClobber,u=c.result.flags.verbose,d=c.result.positional;if(d.length<2)return{stdout:``,stderr:`mv: missing destination file operand
2
2
  `,exitCode:1};let f=d.pop()??``,p=d,m=s.fs.resolvePath(s.cwd,f),h=``,g=``,_=0,v=!1;try{v=(await s.fs.stat(m)).isDirectory}catch{}if(p.length>1&&!v)return{stdout:``,stderr:`mv: target '${f}' is not a directory
3
3
  `,exitCode:1};for(let t of p)try{let e=s.fs.resolvePath(s.cwd,t),n=m;if(v){let e=t.split(`/`).pop()||t;n=m===`/`?`/${e}`:`${m}/${e}`}if(l)try{await s.fs.stat(n);continue}catch{}if(await s.fs.mv(e,n),u){let e=v?`${f}/${t.split(`/`).pop()||t}`:f;h+=`renamed '${t}' -> '${e}'
4
4
  `}}catch(n){let r=e(n);r.includes(`ENOENT`)||r.includes(`no such file`)?g+=`mv: cannot stat '${t}': No such file or directory
5
5
  `:g+=`mv: cannot move '${t}': ${r}
6
6
  `,_=1}return{stdout:h,stderr:g,exitCode:_}}},s={name:`mv`,flags:[{flag:`-f`,type:`boolean`},{flag:`-n`,type:`boolean`},{flag:`-v`,type:`boolean`}],needsArgs:!0,minArgs:2};export{s as n,o as t};
7
- //# sourceMappingURL=chunk-A4JSPFCI-BA544Kdp.mjs.map
7
+ //# sourceMappingURL=chunk-A4JSPFCI-CQJoYugB.mjs.map
@@ -1,2 +1,2 @@
1
- import{t as e}from"./chunk-5QMZ5MUS-_0tQyQsf.mjs";var t=globalThis.setTimeout.bind(globalThis),n=globalThis.clearTimeout.bind(globalThis);globalThis.setInterval.bind(globalThis),globalThis.clearInterval.bind(globalThis);function r(t){return typeof t==`function`?e.bindCurrentContext(t):t}var i=((e,n,...i)=>t(r(e),n,...i)),a=n;export{a as n,i as t};
2
- //# sourceMappingURL=chunk-A5O5YHGN-Kbs3GRxW.mjs.map
1
+ import{t as e}from"./chunk-5QMZ5MUS-BwpNU33k.mjs";var t=globalThis.setTimeout.bind(globalThis),n=globalThis.clearTimeout.bind(globalThis);globalThis.setInterval.bind(globalThis),globalThis.clearInterval.bind(globalThis);function r(t){return typeof t==`function`?e.bindCurrentContext(t):t}var i=((e,n,...i)=>t(r(e),n,...i)),a=n;export{a as n,i as t};
2
+ //# sourceMappingURL=chunk-A5O5YHGN-DApqA6Ow.mjs.map