@krelborn/markdown-review 0.3.0 → 0.4.0

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 (164) hide show
  1. package/README.md +92 -44
  2. package/dist/cli.js +774 -116
  3. package/dist/web/assets/{abnfDiagram-YUKMZFIV-CWLXy0p2.js → abnfDiagram-YUKMZFIV-5p3lK0ml.js} +1 -1
  4. package/dist/web/assets/{angular-html-BqCk3qPO.js → angular-html-DtTOKQVF.js} +1 -1
  5. package/dist/web/assets/{angular-ts-BdHZzt5V.js → angular-ts-DSZF2tmF.js} +1 -1
  6. package/dist/web/assets/{apl-BmM0OXqx.js → apl-BI5mQaXa.js} +1 -1
  7. package/dist/web/assets/{arc-BxwVCTrB.js → arc-BrfkN3mA.js} +1 -1
  8. package/dist/web/assets/{architecture-WOLXFQ4H-B01ykpUW.js → architecture-WOLXFQ4H-CB2TejI2.js} +1 -1
  9. package/dist/web/assets/{architectureDiagram-47P4ROYG-BtFKs1qG.js → architectureDiagram-47P4ROYG-YLfruAdT.js} +1 -1
  10. package/dist/web/assets/{astro-CNT5ujVQ.js → astro-Bx0B2FVT.js} +1 -1
  11. package/dist/web/assets/{blade-DhAlvV-v.js → blade-BWTzueMP.js} +1 -1
  12. package/dist/web/assets/{blockDiagram-E7TT5TSB-gMFCKFl5.js → blockDiagram-E7TT5TSB-DzKCvOwD.js} +1 -1
  13. package/dist/web/assets/{c-y1bwwswS.js → c-DdobnT6K.js} +1 -1
  14. package/dist/web/assets/{c4Diagram-CRA5TL53-BE6g7Cy0.js → c4Diagram-CRA5TL53-p1ftijoG.js} +1 -1
  15. package/dist/web/assets/channel-B7Y79uhb.js +1 -0
  16. package/dist/web/assets/{chapel-O4iWcSUf.js → chapel-D6rLpKo0.js} +1 -1
  17. package/dist/web/assets/{chunk-2BW5OAIV-C7oyR3U5.js → chunk-2BW5OAIV-DT1zLa9q.js} +1 -1
  18. package/dist/web/assets/{chunk-3YJQHVM4-B137wuGG.js → chunk-3YJQHVM4-nLx0WWI4.js} +1 -1
  19. package/dist/web/assets/{chunk-4EA7E6EY-DDeWWnul.js → chunk-4EA7E6EY-C_YyuzUS.js} +1 -1
  20. package/dist/web/assets/{chunk-7TKQ45FW-CF0k8Zaz.js → chunk-7TKQ45FW-BZ15X6vU.js} +1 -1
  21. package/dist/web/assets/{chunk-AW2ZBBNX-LgaoN3H2.js → chunk-AW2ZBBNX-Ck9cAmev.js} +1 -1
  22. package/dist/web/assets/{chunk-DBDB3WZW-Cpb8IX_Y.js → chunk-DBDB3WZW-9vMgzi8H.js} +1 -1
  23. package/dist/web/assets/{chunk-E2ZNV5FY-kQ1CHQVU.js → chunk-E2ZNV5FY-CyMQFbua.js} +1 -1
  24. package/dist/web/assets/{chunk-EU5HNXII-DiRYopKP.js → chunk-EU5HNXII-CWPCfQmx.js} +1 -1
  25. package/dist/web/assets/{chunk-FVRAUYC3-BtTST9-u.js → chunk-FVRAUYC3-jyBnY8AQ.js} +1 -1
  26. package/dist/web/assets/{chunk-HJ2JQQFS-BMWLpO22.js → chunk-HJ2JQQFS-Cj_rp1Qw.js} +1 -1
  27. package/dist/web/assets/{chunk-HTAEGDNF-Ds6Ktllz.js → chunk-HTAEGDNF-pClFnSXR.js} +1 -1
  28. package/dist/web/assets/{chunk-KQW6MTUR-Cs61KkID.js → chunk-KQW6MTUR-C2m9qy9v.js} +1 -1
  29. package/dist/web/assets/{chunk-NTY3LDVX-Cb4zKiDj.js → chunk-NTY3LDVX-CnUW73mn.js} +1 -1
  30. package/dist/web/assets/{chunk-VPRB5NB3-DWCkoa9b.js → chunk-VPRB5NB3-BuB50_Ze.js} +1 -1
  31. package/dist/web/assets/{chunk-XC4XBNZT-wUQj4Qqz.js → chunk-XC4XBNZT-BsgxISHC.js} +1 -1
  32. package/dist/web/assets/{chunk-XXDRQBXY-G5J92hEr.js → chunk-XXDRQBXY-jqsHjX2T.js} +1 -1
  33. package/dist/web/assets/{classDiagram-v2-K4WV4PDN-BCF0112R.js → classDiagram-v2-K4WV4PDN-B0EG_ZZt.js} +1 -1
  34. package/dist/web/assets/{cobol-B9yyG1N7.js → cobol-B_XRwpIg.js} +1 -1
  35. package/dist/web/assets/{coffee-CNQY9j_z.js → coffee-C4eMlpSe.js} +1 -1
  36. package/dist/web/assets/{cose-bilkent-JH36ORCC-xUhaa1rU.js → cose-bilkent-JH36ORCC-CrM0VDy4.js} +1 -1
  37. package/dist/web/assets/{cpp-syZ-JK5F.js → cpp-BE8dVz2Y.js} +1 -1
  38. package/dist/web/assets/{crystal-DNtPOvR4.js → crystal-EaFwVcbb.js} +1 -1
  39. package/dist/web/assets/{css-D5aJMOgO.js → css-oYmBq-By.js} +1 -1
  40. package/dist/web/assets/{cynefin-EF2NZ3EQ-DV3XOKzu.js → cynefin-EF2NZ3EQ-34vs3gIf.js} +1 -1
  41. package/dist/web/assets/{cynefinDiagram-3GCD6N5R-DgURBFKo.js → cynefinDiagram-3GCD6N5R-BknEauUi.js} +1 -1
  42. package/dist/web/assets/{dagre-W4DXFKR2-DF0-xqBq.js → dagre-W4DXFKR2-DZ5C0vE9.js} +1 -1
  43. package/dist/web/assets/{diagram-2UJZ2QOL-BoK-arBq.js → diagram-2UJZ2QOL-7gEGibdm.js} +1 -1
  44. package/dist/web/assets/{diagram-OVF4WLC6-2PnqW9FF.js → diagram-OVF4WLC6-CUXH1cbU.js} +1 -1
  45. package/dist/web/assets/{diagram-PFPMY2P6-D61RpAS8.js → diagram-PFPMY2P6-BOuoN7y0.js} +1 -1
  46. package/dist/web/assets/{diagram-UMYRVEAY-Bn2VK8cA.js → diagram-UMYRVEAY-C3xUjk3B.js} +1 -1
  47. package/dist/web/assets/{diagram-YEKJPTXX-BliOVg-N.js → diagram-YEKJPTXX-CmV-UftY.js} +1 -1
  48. package/dist/web/assets/{diagram-ZIFT7M5P-BUSVx-wF.js → diagram-ZIFT7M5P-DgGdZ1Kl.js} +1 -1
  49. package/dist/web/assets/{dist-B63Xpf6L.js → dist-CN4oxUZG.js} +1 -1
  50. package/dist/web/assets/{ebnfDiagram-VR2GEFS7-BMP6ofKl.js → ebnfDiagram-VR2GEFS7-CgqYKMMK.js} +1 -1
  51. package/dist/web/assets/{edge-nYjgtyX1.js → edge-D6C5szlZ.js} +1 -1
  52. package/dist/web/assets/{elixir-NJaeMcC6.js → elixir-D6PdZkcK.js} +1 -1
  53. package/dist/web/assets/{elk-IJKZMXRS-oJ77omRc.js → elk-IJKZMXRS-CaNtLBYi.js} +1 -1
  54. package/dist/web/assets/{elm-8b_rvSJ8.js → elm-B8heN2jE.js} +1 -1
  55. package/dist/web/assets/{erDiagram-O2IAPWRE-oV_Xnl5q.js → erDiagram-O2IAPWRE-B_Ztqgv4.js} +1 -1
  56. package/dist/web/assets/{erb-BXTZOHPR.js → erb-CvxZym2t.js} +1 -1
  57. package/dist/web/assets/{eventmodeling-K75KTNOO-B4uCS7Wp.js → eventmodeling-K75KTNOO-rIyIwA17.js} +1 -1
  58. package/dist/web/assets/flowDiagram-OXPTDLAJ-BuRr7k3B.js +1 -0
  59. package/dist/web/assets/{ganttDiagram-R7TSEDQI-DCrgwH20.js → ganttDiagram-R7TSEDQI-CZHQ2b2p.js} +1 -1
  60. package/dist/web/assets/{git-rebase-Bemc6KvD.js → git-rebase-BQpmx8Pr.js} +1 -1
  61. package/dist/web/assets/{gitGraph-VSP46ZUC-xNJeVHYy.js → gitGraph-VSP46ZUC-BaI5oVFE.js} +1 -1
  62. package/dist/web/assets/{gitGraphDiagram-XJZIOB7I-BynhGjx_.js → gitGraphDiagram-XJZIOB7I-D019lpA0.js} +1 -1
  63. package/dist/web/assets/{glimmer-js-BbleNzr7.js → glimmer-js-Q0lvksee.js} +1 -1
  64. package/dist/web/assets/{glimmer-ts-yg6t7MXH.js → glimmer-ts-BlwILAHu.js} +1 -1
  65. package/dist/web/assets/{glsl-BaZn8BHQ.js → glsl-C2XhxW29.js} +1 -1
  66. package/dist/web/assets/{graphql-BmqnhkT8.js → graphql-CQpawWlW.js} +1 -1
  67. package/dist/web/assets/{hack-J8sb5uai.js → hack-D8CL9Px1.js} +1 -1
  68. package/dist/web/assets/{haml-FiKLxaeo.js → haml-DZZoeC01.js} +1 -1
  69. package/dist/web/assets/{handlebars-dyXAlfF8.js → handlebars-CnQuZzNH.js} +1 -1
  70. package/dist/web/assets/{html-Bo4E06VK.js → html-CvIoDHKR.js} +1 -1
  71. package/dist/web/assets/{html-derivative-C3RqHwed.js → html-derivative-CGk6QFDb.js} +1 -1
  72. package/dist/web/assets/{http-B8IbeSRs.js → http-Dziu_Xj5.js} +1 -1
  73. package/dist/web/assets/{hurl-CckaloOY.js → hurl-DythJo9n.js} +1 -1
  74. package/dist/web/assets/{index-CGwy-QNW.css → index-CiOT786B.css} +1 -1
  75. package/dist/web/assets/index-Cm7ENbyj.js +256 -0
  76. package/dist/web/assets/{info-OHQRW6UA-D7G_G-1L.js → info-OHQRW6UA-CbxEII--.js} +1 -1
  77. package/dist/web/assets/{infoDiagram-5W2HQ5XZ-fPny1Cf_.js → infoDiagram-5W2HQ5XZ-uncvednK.js} +1 -1
  78. package/dist/web/assets/{ishikawaDiagram-K3B6WC7H-BjipzgOy.js → ishikawaDiagram-K3B6WC7H-DGe07IXX.js} +1 -1
  79. package/dist/web/assets/{java-CUToMvYb.js → java-CZZLsDD_.js} +1 -1
  80. package/dist/web/assets/{javascript-BfEm08nL.js → javascript-BcaihfgA.js} +1 -1
  81. package/dist/web/assets/{jinja-CoCPe0su.js → jinja-v6gp7mmJ.js} +1 -1
  82. package/dist/web/assets/{jison-D8YLHyhZ.js → jison-D2SC7D3U.js} +1 -1
  83. package/dist/web/assets/{journeyDiagram-COXZFDF6-DlfiwZbw.js → journeyDiagram-COXZFDF6-DAIUzadY.js} +1 -1
  84. package/dist/web/assets/{json-B5ImZt8b.js → json-BTX5Muj-.js} +1 -1
  85. package/dist/web/assets/{jsx-BEuHYNcK.js → jsx-sOd5Zb96.js} +1 -1
  86. package/dist/web/assets/{julia-CGDZSSyh.js → julia-BFKK12Cy.js} +1 -1
  87. package/dist/web/assets/{just-k89lTjF_.js → just-5EOII5bf.js} +1 -1
  88. package/dist/web/assets/{kanban-definition-P3RFRI5V-DWtn18JL.js → kanban-definition-P3RFRI5V-CRJ_qKDi.js} +1 -1
  89. package/dist/web/assets/{latex-B2BLRmCh.js → latex-DlpyBAwB.js} +1 -1
  90. package/dist/web/assets/{line-OgG0zNYZ.js → line-DDtZbOq6.js} +1 -1
  91. package/dist/web/assets/{linear-CwKyvaxX.js → linear-DiXfgJNJ.js} +1 -1
  92. package/dist/web/assets/{liquid-DCm9svrE.js → liquid-i0LOb-_p.js} +1 -1
  93. package/dist/web/assets/{lua-D2PZUpll.js → lua-egAglmJR.js} +1 -1
  94. package/dist/web/assets/{marko-BHlW2bwI.js → marko-pexQ6dyw.js} +1 -1
  95. package/dist/web/assets/{mdc-D3qSZtcb.js → mdc-2zx6wVZ1.js} +1 -1
  96. package/dist/web/assets/{mermaid-parser.core-BB3FI1zz.js → mermaid-parser.core-ChhS34Wq.js} +3 -3
  97. package/dist/web/assets/{mermaid.core-COMOGmN5.js → mermaid.core-BLtM-FUH.js} +4 -4
  98. package/dist/web/assets/{mindmap-definition-LZFPQGKD-FVI5kbuu.js → mindmap-definition-LZFPQGKD-qHBfvVvR.js} +1 -1
  99. package/dist/web/assets/{nginx-DE318eQE.js → nginx-BJBqsQfY.js} +1 -1
  100. package/dist/web/assets/{nim-CLxdlaX6.js → nim-BaA50oZ-.js} +1 -1
  101. package/dist/web/assets/{org-BrPnEEho.js → org-B-ByT2Q_.js} +1 -1
  102. package/dist/web/assets/{packet-JDAUHWVQ-Fpkjmnjn.js → packet-JDAUHWVQ-uLD5sbY4.js} +1 -1
  103. package/dist/web/assets/{pegDiagram-BGZESJAR-BKaoWoq7.js → pegDiagram-BGZESJAR-BRNG5qXG.js} +1 -1
  104. package/dist/web/assets/{perl-DHsiEDUm.js → perl-DxoQS1Oz.js} +1 -1
  105. package/dist/web/assets/{php-DQjV-d8l.js → php-DAdurunP.js} +1 -1
  106. package/dist/web/assets/{pie-XZMESJXO-CY04iMLk.js → pie-XZMESJXO-rle9Hab0.js} +1 -1
  107. package/dist/web/assets/{pieDiagram-CAPJLFHJ-BeEngp4p.js → pieDiagram-CAPJLFHJ-CsLaTTZ4.js} +1 -1
  108. package/dist/web/assets/{pug-Dh8JM0fV.js → pug-CGqTuVm8.js} +1 -1
  109. package/dist/web/assets/{qml-B6jp0Ezu.js → qml-qo_XuOpa.js} +1 -1
  110. package/dist/web/assets/{quadrantDiagram-GDMTTRAM-BvJZEJlt.js → quadrantDiagram-GDMTTRAM-CcM5DEH6.js} +1 -1
  111. package/dist/web/assets/{r-6SqhsqXp.js → r-CKiLSGzc.js} +1 -1
  112. package/dist/web/assets/{radar-ABXABTNO-CbPpIJEV.js → radar-ABXABTNO-CC4F4_aS.js} +1 -1
  113. package/dist/web/assets/{railroad-I3PHUGI6-6byRvbF6.js → railroad-I3PHUGI6-EiUjcaSq.js} +1 -1
  114. package/dist/web/assets/{railroad-abnf-LNEFI6M7-Bo-qX1HQ.js → railroad-abnf-LNEFI6M7-BZzYZu7G.js} +1 -1
  115. package/dist/web/assets/{railroad-ebnf-DWYD2UWJ-C4u9WTRa.js → railroad-ebnf-DWYD2UWJ-DGihz-hz.js} +1 -1
  116. package/dist/web/assets/{railroad-peg-JR7BVNR7-EriE5s4B.js → railroad-peg-JR7BVNR7-D9Youaz5.js} +1 -1
  117. package/dist/web/assets/{railroadDiagram-SM67HX2B-DSWmFhHh.js → railroadDiagram-SM67HX2B-ljs2FnSo.js} +1 -1
  118. package/dist/web/assets/{razor-DUvaBJHt.js → razor-DjN9S-r_.js} +1 -1
  119. package/dist/web/assets/{regexp-DQVjJ1C9.js → regexp-yRPnlhcx.js} +1 -1
  120. package/dist/web/assets/{requirementDiagram-X7JNWC4A-DSputoF-.js → requirementDiagram-X7JNWC4A-BJ877Yny.js} +1 -1
  121. package/dist/web/assets/{rst-CimOXJkT.js → rst-NbJF2fMO.js} +1 -1
  122. package/dist/web/assets/{ruby-CkT4UUsu.js → ruby-ZoVZdf-0.js} +1 -1
  123. package/dist/web/assets/{sankeyDiagram-UM26HJRW-CoyT7S1x.js → sankeyDiagram-UM26HJRW-BPwhixv8.js} +1 -1
  124. package/dist/web/assets/{sas-jhGZfw8z.js → sas-CnTL8nFG.js} +1 -1
  125. package/dist/web/assets/{scss-COq5RYby.js → scss-BAnH3m1c.js} +1 -1
  126. package/dist/web/assets/{sequenceDiagram-ZO4K6R2Y-bH6JrL79.js → sequenceDiagram-ZO4K6R2Y-xhx_vaZj.js} +1 -1
  127. package/dist/web/assets/{shellscript-fPSuoebA.js → shellscript-ChY3GVRw.js} +1 -1
  128. package/dist/web/assets/{shellsession-CEOzWFWz.js → shellsession-G4IamFTN.js} +1 -1
  129. package/dist/web/assets/{soy-CoaFeLPp.js → soy-DHZYlzcJ.js} +1 -1
  130. package/dist/web/assets/{sql-CqYtiF66.js → sql-BLAJpvko.js} +1 -1
  131. package/dist/web/assets/{src-Yh046HvT.js → src-CneWU0V7.js} +1 -1
  132. package/dist/web/assets/{stata-4SdpmCwi.js → stata-BF2DeqJI.js} +1 -1
  133. package/dist/web/assets/{stateDiagram-v2-TBUQTH76-Ce-gceoA.js → stateDiagram-v2-TBUQTH76-DYEIdXmD.js} +1 -1
  134. package/dist/web/assets/{surrealql-C2Q1e9ZL.js → surrealql-CjuctJtE.js} +1 -1
  135. package/dist/web/assets/{svelte-CDy8bfpZ.js → svelte-CAAipNMl.js} +1 -1
  136. package/dist/web/assets/{swimlanes-N4OXWK64-XZo3QwsQ.js → swimlanes-N4OXWK64-DaNmUIcz.js} +1 -1
  137. package/dist/web/assets/swimlanesDiagram-K3J5GTZL-Cc_r8_vm.js +8 -0
  138. package/dist/web/assets/{templ-B5OSUAC6.js → templ-B-6t84-k.js} +1 -1
  139. package/dist/web/assets/{tex-0wXDlVyM.js → tex-DsSWxSFa.js} +1 -1
  140. package/dist/web/assets/{timeline-definition-YOQAKGHF-B7Bs6DE5.js → timeline-definition-YOQAKGHF-CmA5uuSJ.js} +1 -1
  141. package/dist/web/assets/{treeView-D4JQ5SDB-DhelC15L.js → treeView-D4JQ5SDB-L8cwVgaN.js} +1 -1
  142. package/dist/web/assets/{treemap-SAJKECNS-CzGjtoOh.js → treemap-SAJKECNS-Cb56YgJH.js} +1 -1
  143. package/dist/web/assets/{ts-tags-tg6YwKan.js → ts-tags-2bkGTXWr.js} +1 -1
  144. package/dist/web/assets/{tsx-CEeuRXvQ.js → tsx-BD6V4u7j.js} +1 -1
  145. package/dist/web/assets/{twig-CWajHX0R.js → twig-BRdwPHsd.js} +1 -1
  146. package/dist/web/assets/{typescript-RFkfgRav.js → typescript-CE43_TcG.js} +1 -1
  147. package/dist/web/assets/{typst-iYtNFWi1.js → typst-Oj4lknbm.js} +1 -1
  148. package/dist/web/assets/{usecaseDiagram-VIAY4XPW-BdnNYShz.js → usecaseDiagram-VIAY4XPW-RzU3uMX7.js} +1 -1
  149. package/dist/web/assets/{vennDiagram-BLWOH2XV-CgGZe_xP.js → vennDiagram-BLWOH2XV-RBYC_TER.js} +1 -1
  150. package/dist/web/assets/{vue-DG85Ls7m.js → vue-DohRCbuk.js} +1 -1
  151. package/dist/web/assets/{vue-html-CHmfKQdN.js → vue-html-CUm-vXDJ.js} +1 -1
  152. package/dist/web/assets/{vue-vine-nZRQ_9Xq.js → vue-vine-CSJNVT6g.js} +1 -1
  153. package/dist/web/assets/{wardley-7MLQ67FV-6V8v9HhV.js → wardley-7MLQ67FV-BSCtc6D6.js} +1 -1
  154. package/dist/web/assets/{wardleyDiagram-YMQ3BMBF-CNjJiy1q.js → wardleyDiagram-YMQ3BMBF-DiJSX_eB.js} +1 -1
  155. package/dist/web/assets/{xml-Cf2rIYfH.js → xml-CRGrymgs.js} +1 -1
  156. package/dist/web/assets/{xsl-BtZjiXjY.js → xsl-5ujj8eCf.js} +1 -1
  157. package/dist/web/assets/{xychartDiagram-TAQBALBS-BRYVq9Me.js → xychartDiagram-TAQBALBS-BmlAXIhs.js} +1 -1
  158. package/dist/web/assets/{yaml-ok1XkEbE.js → yaml-DYq2KMMJ.js} +1 -1
  159. package/dist/web/index.html +2 -2
  160. package/package.json +3 -3
  161. package/dist/web/assets/channel-Bv6xif17.js +0 -1
  162. package/dist/web/assets/flowDiagram-OXPTDLAJ-xE1Htm9m.js +0 -1
  163. package/dist/web/assets/index-CEXlg15b.js +0 -256
  164. package/dist/web/assets/swimlanesDiagram-K3J5GTZL-BuztLICr.js +0 -8
@@ -1 +1 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Yh046HvT.js";import{y as n,z as r}from"./chunk-VPRB5NB3-DWCkoa9b.js";var i=Object.freeze({left:0,top:0,width:16,height:16}),a=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),o=Object.freeze({...i,...a}),s=Object.freeze({...o,body:``,hidden:!1}),c=Object.freeze({width:null,height:null}),l=Object.freeze({...c,...a}),u=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!d(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!d(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!d(e,n)?null:e}return null},d=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function f(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function p(e,t){let n=f(e,t);for(let r in s)r in a?r in e&&!(r in n)&&(n[r]=a[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function m(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function h(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=p(r[e]||i[e],a)}return o(t),n.forEach(o),p(e,a)}function g(e,t){if(e.icons[t])return h(e,t,[]);let n=m(e,[t])[t];return n?h(e,t,n):null}var _=/(-?[0-9.]*[0-9]+[0-9.]*)/g,v=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(_);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=v.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function b(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function x(e,t){return e?`<defs>`+e+`</defs>`+t:t}function S(e,t,n){let r=b(e);return x(r.defs,t+r.content+n)}var C=e=>e===`unset`||e===`undefined`||e===`none`;function w(e,t){let n={...o,...e},r={...l,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=S(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let s=r.width,c=r.height,u=i.width,d=i.height,f,p;s===null?(p=c===null?`1em`:c===`auto`?d:c,f=y(p,u/d)):(f=s===`auto`?u:s,p=c===null?y(f,d/u):c===`auto`?d:c);let m={},h=(e,t)=>{C(t)||(m[e]=t.toString())};h(`width`,f),h(`height`,p);let g=[i.left,i.top,u,d];return m.viewBox=g.join(` `),{attributes:m,viewBox:g,body:a}}var T=/\sid="(\S+)"/g,E=new Map;function D(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=E.get(e)||0;return E.set(e,t+1),t?`${e}${t}`:e}function O(e){let t=[],n;for(;n=T.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=D(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}function k(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}var A={body:`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>`,height:80,width:80},j=new Map,M=new Map,N=e(e=>{for(let n of e){if(!n.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(t.debug(`Registering icon pack:`,n.name),`loader`in n)M.set(n.name,n.loader);else if(`icons`in n)j.set(n.name,n.icons);else throw t.error(`Invalid icon loader:`,n),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),P=e(async(e,n)=>{let r=u(e,!0,n!==void 0);if(!r)throw Error(`Invalid icon name: ${e}`);let i=r.prefix||n;if(!i)throw Error(`Icon name must contain a prefix: ${e}`);let a=j.get(i);if(!a){let e=M.get(i);if(!e)throw Error(`Icon set not found: ${r.prefix}`);try{a={...await e(),prefix:i},j.set(i,a)}catch(e){throw t.error(e),Error(`Failed to load icon set: ${r.prefix}`)}}let o=g(a,r.name);if(!o)throw Error(`Icon not found: ${e}`);return o},`getRegisteredIconData`),F=e(async e=>{try{return await P(e),!0}catch{return!1}},`isIconAvailable`),I=e(async(e,i,a)=>{let o;try{o=await P(e,i?.fallbackPrefix)}catch(e){t.error(e),o=A}let s=w(o,i),c=k(O(s.body),{...s.attributes,...a});return r(c,n())},`getIconSVG`);export{A as i,F as n,N as r,I as t};
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-CneWU0V7.js";import{y as n,z as r}from"./chunk-VPRB5NB3-BuB50_Ze.js";var i=Object.freeze({left:0,top:0,width:16,height:16}),a=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),o=Object.freeze({...i,...a}),s=Object.freeze({...o,body:``,hidden:!1}),c=Object.freeze({width:null,height:null}),l=Object.freeze({...c,...a}),u=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!d(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!d(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!d(e,n)?null:e}return null},d=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function f(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function p(e,t){let n=f(e,t);for(let r in s)r in a?r in e&&!(r in n)&&(n[r]=a[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function m(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function h(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=p(r[e]||i[e],a)}return o(t),n.forEach(o),p(e,a)}function g(e,t){if(e.icons[t])return h(e,t,[]);let n=m(e,[t])[t];return n?h(e,t,n):null}var _=/(-?[0-9.]*[0-9]+[0-9.]*)/g,v=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(_);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=v.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function b(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function x(e,t){return e?`<defs>`+e+`</defs>`+t:t}function S(e,t,n){let r=b(e);return x(r.defs,t+r.content+n)}var C=e=>e===`unset`||e===`undefined`||e===`none`;function w(e,t){let n={...o,...e},r={...l,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=S(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let s=r.width,c=r.height,u=i.width,d=i.height,f,p;s===null?(p=c===null?`1em`:c===`auto`?d:c,f=y(p,u/d)):(f=s===`auto`?u:s,p=c===null?y(f,d/u):c===`auto`?d:c);let m={},h=(e,t)=>{C(t)||(m[e]=t.toString())};h(`width`,f),h(`height`,p);let g=[i.left,i.top,u,d];return m.viewBox=g.join(` `),{attributes:m,viewBox:g,body:a}}var T=/\sid="(\S+)"/g,E=new Map;function D(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=E.get(e)||0;return E.set(e,t+1),t?`${e}${t}`:e}function O(e){let t=[],n;for(;n=T.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=D(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}function k(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}var A={body:`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>`,height:80,width:80},j=new Map,M=new Map,N=e(e=>{for(let n of e){if(!n.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(t.debug(`Registering icon pack:`,n.name),`loader`in n)M.set(n.name,n.loader);else if(`icons`in n)j.set(n.name,n.icons);else throw t.error(`Invalid icon loader:`,n),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),P=e(async(e,n)=>{let r=u(e,!0,n!==void 0);if(!r)throw Error(`Invalid icon name: ${e}`);let i=r.prefix||n;if(!i)throw Error(`Icon name must contain a prefix: ${e}`);let a=j.get(i);if(!a){let e=M.get(i);if(!e)throw Error(`Icon set not found: ${r.prefix}`);try{a={...await e(),prefix:i},j.set(i,a)}catch(e){throw t.error(e),Error(`Failed to load icon set: ${r.prefix}`)}}let o=g(a,r.name);if(!o)throw Error(`Icon not found: ${e}`);return o},`getRegisteredIconData`),F=e(async e=>{try{return await P(e),!0}catch{return!1}},`isIconAvailable`),I=e(async(e,i,a)=>{let o;try{o=await P(e,i?.fallbackPrefix)}catch(e){t.error(e),o=A}let s=w(o,i),c=k(O(s.body),{...s.attributes,...a});return r(c,n())},`getIconSVG`);export{A as i,F as n,N as r,I as t};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{o as t}from"./chunk-2BW5OAIV-C7oyR3U5.js";var n=5,r=1e-5,i=2,a=.6,o=1e-6;function s(e){let t=[];for(let n=0;n<e.length-1;n++)t.push({a:e[n],b:e[n+1]});return t}e(s,`buildSegmentList`);function c(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,s=r.x-n.x,c=r.y-n.y,l=i*c-a*s;if(l===0)return null;let u=n.x-e.x,d=n.y-e.y,f=(u*c-d*s)/l,p=(u*a-d*i)/l;return f<=o||f>=1-o||p<=o||p>=1-o?null:{point:{x:e.x+f*i,y:e.y+f*a},tA:f,tB:p}}e(c,`segmentIntersection`);function l(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}e(l,`isHorizontalSeg`);function u(e,t,r){if(e.curve!==`rounded`)return!1;let i=e.points,a=i[t],o=i[t+1];if(!a||!o)return!1;let s=Math.hypot(o.x-a.x,o.y-a.y),c=r*s,l=t>0?_(i[t-1],a,o,n):null;if(l&&c<l.cutLen)return!0;let u=t+2<i.length?_(a,o,i[t+2],n):null;return u!==null&&s-c<u.cutLen}e(u,`crossingSitsInRoundedCorner`);function d(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=s(r.points);for(let a=n+1;a<e.length;a++){let n=e[a],o=s(n.points);for(let[e,a]of i.entries())for(let[i,s]of o.entries()){let o=c(a.a,a.b,s.a,s.b);if(!o||u(r,e,o.tA)||u(n,i,o.tB))continue;let d=l(a);d!==l(s)&&d?t.push({jumpEdgeId:r.id,otherEdgeId:n.id,segIndex:e,t:o.tA,point:o.point}):t.push({jumpEdgeId:n.id,otherEdgeId:r.id,segIndex:i,t:o.tB,point:o.point})}}}return t}e(d,`findEdgeIntersections`);function f(e){return`${Math.round(e*1e3)/1e3}`}e(f,`fmt`);function p(e){return`${f(e.x)},${f(e.y)}`}e(p,`pointToString`);function m(e){let t=e.b.x-e.a.x,n=e.b.y-e.a.y;return Math.abs(t)>=Math.abs(n)?+(t>=0):+(n>=0)}e(m,`getArcSweepFlag`);function h(e,n){if(e.length<2)return e.map(e=>({...e}));let r=e.map(e=>({...e})),i=n.arrowTypeStart&&t[n.arrowTypeStart];if(i){let t=e[0],n=e[1],a=Math.atan2(n.y-t.y,n.x-t.x);r[0].x=t.x+i*Math.cos(a),r[0].y=t.y+i*Math.sin(a)}let a=n.arrowTypeEnd&&t[n.arrowTypeEnd];if(a){let t=e.length,n=e[t-2],i=e[t-1],o=Math.atan2(i.y-n.y,i.x-n.x);r[t-1].x=i.x-a*Math.cos(o),r[t-1].y=i.y-a*Math.sin(o)}return r}e(h,`applyMarkerOffsets`);function g(e,t,n,r,i){let a=e.point.x,o=e.point.y,s={x:a-t*e.r,y:o-n*e.r},c={x:a+t*e.r,y:o+n*e.r},l=[`L${p(s)}`];return i===`arc`?l.push(`A${f(e.r)},${f(e.r)} 0 0 ${r} ${p(c)}`):l.push(`M${p(c)}`),l}e(g,`emitJump`);function _(e,t,n,i){let a=t.x-e.x,o=t.y-e.y,s=n.x-t.x,c=n.y-t.y,l=Math.hypot(a,o),u=Math.hypot(s,c);if(l<r||u<r)return null;let d=a/l,f=o/l,p=s/u,m=c/u,h=d*p+f*m,g=Math.acos(Math.max(-1,Math.min(1,h)));if(g<r||Math.abs(Math.PI-g)<r)return null;let _=Math.min(i/Math.sin(g/2),l/2,u/2);return{startX:t.x-d*_,startY:t.y-f*_,endX:t.x+p*_,endY:t.y+m*_,ctrlX:t.x,ctrlY:t.y,cutLen:_}}e(_,`computeRoundedCorner`);function v(e,t,r){let o=e.points;if(o.length<2)return``;let c=h(o,e),l=e.curve===`rounded`,u=s(c),d=new Map;for(let e of t){let t=u[e.segIndex];if(!t)continue;let n=Math.hypot(t.b.x-t.a.x,t.b.y-t.a.y),i=d.get(e.segIndex)??[];i.push({t:e.t,point:e.point,d:e.t*n,r:r.jumpRadius}),d.set(e.segIndex,i)}let v=[`M${p(c[0])}`];for(let e=0;e<u.length;e++){let t=u[e],o=Math.hypot(t.b.x-t.a.x,t.b.y-t.a.y),s=o===0?0:(t.b.x-t.a.x)/o,h=o===0?0:(t.b.y-t.a.y)/o,y=m(t),b=0;if(l&&e>0){let t=_(c[e-1],c[e],c[e+1]??c[e],n);t&&(b=t.cutLen)}let x=o,S=null;l&&e<u.length-1&&(S=_(c[e],c[e+1],c[e+2]??c[e+1],n),S&&(x=o-S.cutLen));let C=r.jumpRadius*a,w=[...d.get(e)??[]].sort((e,t)=>e.t-t.t).filter(e=>{let t=Math.min(e.d-b,x-e.d)-i;return e.r=Math.min(e.r,t),e.r>=C});for(let e=0;e<w.length-1;e++){let t=w[e+1].d-w[e].d;if(w[e].r+w[e+1].r>t){let n=t/2;w[e].r=Math.min(w[e].r,n),w[e+1].r=Math.min(w[e+1].r,n)}}for(let e of w)e.r<C||v.push(...g(e,s,h,y,r.jumpStyle));l&&S?(v.push(`L${f(S.startX)},${f(S.startY)}`),v.push(`Q${f(S.ctrlX)},${f(S.ctrlY)} ${f(S.endX)},${f(S.endY)}`)):v.push(`L${p(t.b)}`)}return v.join(` `)}e(v,`rewriteEdgePath`);function y(e){return/^[\d\s+,.LMelm-]*$/.test(e)}e(y,`isStraightPath`);function b(e){return!e||e===`linear`||e===`rounded`||e===`step`||e===`stepBefore`||e===`stepAfter`}e(b,`curveSupportsLineHops`);function x(e){if(!e)return null;try{let t=typeof atob==`function`?atob(e):Buffer.from(e,`base64`).toString(),n=JSON.parse(t);if(!Array.isArray(n))return null;let r=[];for(let e of n)e&&typeof e.x==`number`&&typeof e.y==`number`&&r.push({x:e.x,y:e.y});return r.length>=2?r:null}catch{return null}}e(x,`decodeDataPoints`);function S(e,t,n){if(!n.enabled)return;let r=e.node();if(!r)return;let i=new Map;for(let e of t)i.set(e.id,e);let a=new Map;for(let e of r.querySelectorAll(`path[data-id]`)){let t=e.getAttribute(`data-id`);t!==null&&!a.has(t)&&a.set(t,e)}let o=[];for(let e of t){let t=a.get(e.id);if(!t)continue;let n=x(t.getAttribute(`data-points`))??e.points;o.push({...e,points:n})}let s=d(o);if(s.length===0)return;let c=new Map;for(let e of s){let t=c.get(e.jumpEdgeId)??[];t.push(e),c.set(e.jumpEdgeId,t)}for(let e of o){let t=c.get(e.id);if(!t||t.length===0)continue;let r=i.get(e.id)?.curve;if(r!==void 0&&!b(r))continue;let o=a.get(e.id);if(!o||r===void 0&&!y(o.getAttribute(`d`)??``))continue;let s=o.getAttribute(`style`)??``,l=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(s),u=l?Number.parseFloat(l[1]):null,d=l?Number.parseFloat(l[2]):null,f=v(e,t,n);if(o.setAttribute(`d`,f),u!==null&&d!==null&&typeof o.getTotalLength==`function`){let e=o.getTotalLength(),t=`0 ${u} ${Math.max(0,e-u-d)} ${d}`,n=s.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${t};`).replace(/;\s*;+/g,`;`);o.setAttribute(`style`,n)}}}e(S,`applyLineJumpsToSvg`);export{S as t};
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{o as t}from"./chunk-2BW5OAIV-DT1zLa9q.js";var n=5,r=1e-5,i=2,a=.6,o=1e-6;function s(e){let t=[];for(let n=0;n<e.length-1;n++)t.push({a:e[n],b:e[n+1]});return t}e(s,`buildSegmentList`);function c(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,s=r.x-n.x,c=r.y-n.y,l=i*c-a*s;if(l===0)return null;let u=n.x-e.x,d=n.y-e.y,f=(u*c-d*s)/l,p=(u*a-d*i)/l;return f<=o||f>=1-o||p<=o||p>=1-o?null:{point:{x:e.x+f*i,y:e.y+f*a},tA:f,tB:p}}e(c,`segmentIntersection`);function l(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}e(l,`isHorizontalSeg`);function u(e,t,r){if(e.curve!==`rounded`)return!1;let i=e.points,a=i[t],o=i[t+1];if(!a||!o)return!1;let s=Math.hypot(o.x-a.x,o.y-a.y),c=r*s,l=t>0?_(i[t-1],a,o,n):null;if(l&&c<l.cutLen)return!0;let u=t+2<i.length?_(a,o,i[t+2],n):null;return u!==null&&s-c<u.cutLen}e(u,`crossingSitsInRoundedCorner`);function d(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=s(r.points);for(let a=n+1;a<e.length;a++){let n=e[a],o=s(n.points);for(let[e,a]of i.entries())for(let[i,s]of o.entries()){let o=c(a.a,a.b,s.a,s.b);if(!o||u(r,e,o.tA)||u(n,i,o.tB))continue;let d=l(a);d!==l(s)&&d?t.push({jumpEdgeId:r.id,otherEdgeId:n.id,segIndex:e,t:o.tA,point:o.point}):t.push({jumpEdgeId:n.id,otherEdgeId:r.id,segIndex:i,t:o.tB,point:o.point})}}}return t}e(d,`findEdgeIntersections`);function f(e){return`${Math.round(e*1e3)/1e3}`}e(f,`fmt`);function p(e){return`${f(e.x)},${f(e.y)}`}e(p,`pointToString`);function m(e){let t=e.b.x-e.a.x,n=e.b.y-e.a.y;return Math.abs(t)>=Math.abs(n)?+(t>=0):+(n>=0)}e(m,`getArcSweepFlag`);function h(e,n){if(e.length<2)return e.map(e=>({...e}));let r=e.map(e=>({...e})),i=n.arrowTypeStart&&t[n.arrowTypeStart];if(i){let t=e[0],n=e[1],a=Math.atan2(n.y-t.y,n.x-t.x);r[0].x=t.x+i*Math.cos(a),r[0].y=t.y+i*Math.sin(a)}let a=n.arrowTypeEnd&&t[n.arrowTypeEnd];if(a){let t=e.length,n=e[t-2],i=e[t-1],o=Math.atan2(i.y-n.y,i.x-n.x);r[t-1].x=i.x-a*Math.cos(o),r[t-1].y=i.y-a*Math.sin(o)}return r}e(h,`applyMarkerOffsets`);function g(e,t,n,r,i){let a=e.point.x,o=e.point.y,s={x:a-t*e.r,y:o-n*e.r},c={x:a+t*e.r,y:o+n*e.r},l=[`L${p(s)}`];return i===`arc`?l.push(`A${f(e.r)},${f(e.r)} 0 0 ${r} ${p(c)}`):l.push(`M${p(c)}`),l}e(g,`emitJump`);function _(e,t,n,i){let a=t.x-e.x,o=t.y-e.y,s=n.x-t.x,c=n.y-t.y,l=Math.hypot(a,o),u=Math.hypot(s,c);if(l<r||u<r)return null;let d=a/l,f=o/l,p=s/u,m=c/u,h=d*p+f*m,g=Math.acos(Math.max(-1,Math.min(1,h)));if(g<r||Math.abs(Math.PI-g)<r)return null;let _=Math.min(i/Math.sin(g/2),l/2,u/2);return{startX:t.x-d*_,startY:t.y-f*_,endX:t.x+p*_,endY:t.y+m*_,ctrlX:t.x,ctrlY:t.y,cutLen:_}}e(_,`computeRoundedCorner`);function v(e,t,r){let o=e.points;if(o.length<2)return``;let c=h(o,e),l=e.curve===`rounded`,u=s(c),d=new Map;for(let e of t){let t=u[e.segIndex];if(!t)continue;let n=Math.hypot(t.b.x-t.a.x,t.b.y-t.a.y),i=d.get(e.segIndex)??[];i.push({t:e.t,point:e.point,d:e.t*n,r:r.jumpRadius}),d.set(e.segIndex,i)}let v=[`M${p(c[0])}`];for(let e=0;e<u.length;e++){let t=u[e],o=Math.hypot(t.b.x-t.a.x,t.b.y-t.a.y),s=o===0?0:(t.b.x-t.a.x)/o,h=o===0?0:(t.b.y-t.a.y)/o,y=m(t),b=0;if(l&&e>0){let t=_(c[e-1],c[e],c[e+1]??c[e],n);t&&(b=t.cutLen)}let x=o,S=null;l&&e<u.length-1&&(S=_(c[e],c[e+1],c[e+2]??c[e+1],n),S&&(x=o-S.cutLen));let C=r.jumpRadius*a,w=[...d.get(e)??[]].sort((e,t)=>e.t-t.t).filter(e=>{let t=Math.min(e.d-b,x-e.d)-i;return e.r=Math.min(e.r,t),e.r>=C});for(let e=0;e<w.length-1;e++){let t=w[e+1].d-w[e].d;if(w[e].r+w[e+1].r>t){let n=t/2;w[e].r=Math.min(w[e].r,n),w[e+1].r=Math.min(w[e+1].r,n)}}for(let e of w)e.r<C||v.push(...g(e,s,h,y,r.jumpStyle));l&&S?(v.push(`L${f(S.startX)},${f(S.startY)}`),v.push(`Q${f(S.ctrlX)},${f(S.ctrlY)} ${f(S.endX)},${f(S.endY)}`)):v.push(`L${p(t.b)}`)}return v.join(` `)}e(v,`rewriteEdgePath`);function y(e){return/^[\d\s+,.LMelm-]*$/.test(e)}e(y,`isStraightPath`);function b(e){return!e||e===`linear`||e===`rounded`||e===`step`||e===`stepBefore`||e===`stepAfter`}e(b,`curveSupportsLineHops`);function x(e){if(!e)return null;try{let t=typeof atob==`function`?atob(e):Buffer.from(e,`base64`).toString(),n=JSON.parse(t);if(!Array.isArray(n))return null;let r=[];for(let e of n)e&&typeof e.x==`number`&&typeof e.y==`number`&&r.push({x:e.x,y:e.y});return r.length>=2?r:null}catch{return null}}e(x,`decodeDataPoints`);function S(e,t,n){if(!n.enabled)return;let r=e.node();if(!r)return;let i=new Map;for(let e of t)i.set(e.id,e);let a=new Map;for(let e of r.querySelectorAll(`path[data-id]`)){let t=e.getAttribute(`data-id`);t!==null&&!a.has(t)&&a.set(t,e)}let o=[];for(let e of t){let t=a.get(e.id);if(!t)continue;let n=x(t.getAttribute(`data-points`))??e.points;o.push({...e,points:n})}let s=d(o);if(s.length===0)return;let c=new Map;for(let e of s){let t=c.get(e.jumpEdgeId)??[];t.push(e),c.set(e.jumpEdgeId,t)}for(let e of o){let t=c.get(e.id);if(!t||t.length===0)continue;let r=i.get(e.id)?.curve;if(r!==void 0&&!b(r))continue;let o=a.get(e.id);if(!o||r===void 0&&!y(o.getAttribute(`d`)??``))continue;let s=o.getAttribute(`style`)??``,l=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(s),u=l?Number.parseFloat(l[1]):null,d=l?Number.parseFloat(l[2]):null,f=v(e,t,n);if(o.setAttribute(`d`,f),u!==null&&d!==null&&typeof o.getTotalLength==`function`){let e=o.getTotalLength(),t=`0 ${u} ${Math.max(0,e-u-d)} ${d}`,n=s.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${t};`).replace(/;\s*;+/g,`;`);o.setAttribute(`style`,n)}}}e(S,`applyLineJumpsToSvg`);export{S as t};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Yh046HvT.js";import{c as n}from"./chunk-VPRB5NB3-DWCkoa9b.js";var r=e((e,r,o,s)=>{e.attr(`class`,o);let{width:c,height:l,x:u,y:d}=i(e,r);n(e,l,c,s);let f=a(u,d,c,l,r);e.attr(`viewBox`,f),t.debug(`viewBox configured: ${f} with padding: ${r}`)},`setupViewPortForSVG`),i=e((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}},`calculateDimensionsWithPadding`),a=e((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`);export{r as t};
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-CneWU0V7.js";import{c as n}from"./chunk-VPRB5NB3-BuB50_Ze.js";var r=e((e,r,o,s)=>{e.attr(`class`,o);let{width:c,height:l,x:u,y:d}=i(e,r);n(e,l,c,s);let f=a(u,d,c,l,r);e.attr(`viewBox`,f),t.debug(`viewBox configured: ${f} with padding: ${r}`)},`setupViewPortForSVG`),i=e((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}},`calculateDimensionsWithPadding`),a=e((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`);export{r as t};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Yh046HvT.js";import{b as r,g as i,w as a}from"./chunk-VPRB5NB3-DWCkoa9b.js";import{n as o}from"./chunk-E2ZNV5FY-kQ1CHQVU.js";import{a as s,i as c,t as l}from"./chunk-4EA7E6EY-DDeWWnul.js";import{s as u}from"./chunk-J5ZVWO5B-oDCd-gWO.js";import{t as d}from"./rough.esm-Dy-Kn_BL.js";import{i as f,n as p,t as m}from"./chunk-XC4XBNZT-wUQj4Qqz.js";import{n as h}from"./chunk-DBDB3WZW-Cpb8IX_Y.js";var g=e(async(e,a)=>{let l=r(),{theme:p,themeVariables:m,handDrawnSeed:h}=l,{clusterBkg:g,clusterBorder:_,borderColorArray:v}=m,y=_,{labelStyles:b,nodeStyles:x,borderStyles:S,backgroundStyles:C}=c(a),w=e.insert(`g`).attr(`class`,`cluster swimlane `+(a.cssClasses||``)).attr(`id`,a.id).attr(`data-id`,a.id).attr(`data-et`,`cluster`).attr(`data-look`,a.look);u(w,a.colorIndex,p,v);let T=i(l.flowchart.htmlLabels),E=a.direction===`LR`,D=w.insert(`g`).attr(`class`,`cluster-label swimlane-label`),O=await o(D,a.label,{style:a.labelStyle,useHtmlLabels:T,isNode:!0,width:a.width}),k=O.getBBox();if(T){let e=O.children[0],t=n(O);k=e.getBoundingClientRect(),t.attr(`width`,k.width),t.attr(`height`,k.height)}let A=a.padding??0,j=a.width<=k.width+A?k.width+A:a.width;a.diff=a.width<=k.width+A?(j-a.width)/2-A:-A;let M=a.height,N=a.y-M/2,P=a.y+M/2,F=a.x-j/2,I=a.swimlaneContentTop===void 0?N+M/3:a.swimlaneContentTop,L=E?4:0,R=k.height+2*L,z,B;if(E){let e=Math.max(R,k.height+2*L),t=F+e,n=Math.max(0,j-e);if(a.look===`handDrawn`){let r=d.svg(w),i=s(a,{roughness:.7,fill:g,stroke:y,seed:h}),o=s(a,{roughness:.7,fill:`none`,stroke:y,seed:h}),c=r.rectangle(F,N,e,M,i);z=w.insert(()=>c,`:first-child`).attr(`class`,`swimlane-title`);let l=r.rectangle(t,N,n,M,o);B=w.insert(()=>l,`:first-child`).attr(`class`,`swimlane-body`),z.select(`path:nth-child(2)`).attr(`style`,S.join(`;`)),z.select(`path`).attr(`style`,C.join(`;`).replace(`fill`,`stroke`))}else z=w.insert(`rect`,`:first-child`),B=w.insert(`rect`,`:first-child`),z.attr(`class`,`swimlane-title`).attr(`style`,x).attr(`x`,F).attr(`y`,N).attr(`width`,e).attr(`height`,M).attr(`fill`,g).attr(`stroke`,y),B.attr(`class`,`swimlane-body`).attr(`style`,x).attr(`x`,t).attr(`y`,N).attr(`width`,n).attr(`height`,M).attr(`fill`,`none`).attr(`stroke`,y);let r=F+e/2,i=a.y;D.attr(`transform`,`translate(${r}, ${i}) rotate(-90) translate(${-k.width/2}, ${-k.height/2})`)}else{let e=Math.max(0,I-N),t=Math.min(R,e),n=N+t,r=Math.max(0,P-n),i=a.x-j/2;if(a.look===`handDrawn`){let e=d.svg(w),o=s(a,{roughness:.7,fill:g,stroke:y,fillWeight:3,seed:h}),c=s(a,{roughness:.7,fill:`none`,stroke:y,seed:h}),l=e.rectangle(i,N,j,t,o);z=w.insert(()=>l,`:first-child`).attr(`class`,`swimlane-title`);let u=e.rectangle(i,n,j,r,c);B=w.insert(()=>u,`:first-child`).attr(`class`,`swimlane-body`),z.select(`path:nth-child(2)`).attr(`style`,S.join(`;`)),z.select(`path`).attr(`style`,C.join(`;`).replace(`fill`,`stroke`))}else z=w.insert(`rect`,`:first-child`),B=w.insert(`rect`,`:first-child`),z.attr(`class`,`swimlane-title`).attr(`style`,x).attr(`x`,i).attr(`y`,N).attr(`width`,j).attr(`height`,t).attr(`fill`,g).attr(`stroke`,y),B.attr(`class`,`swimlane-body`).attr(`style`,x).attr(`x`,i).attr(`y`,n).attr(`width`,j).attr(`height`,r).attr(`fill`,`none`).attr(`stroke`,y);let o=a.x-k.width/2,c=N+(t-k.height)/2;D.attr(`transform`,`translate(${o}, ${c})`)}if(t.trace(`Swimlane data `,a,JSON.stringify(a)),b){let e=D.select(`span`);e&&e.attr(`style`,b)}return a.offsetX=0,a.width=j,a.height=M,a.offsetY=k.height-A/2,a.intersect=function(e){return f(a,e)},{cluster:w,labelBBox:k}},`swimlane`),_=e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let l=r(),{theme:g,themeVariables:_,handDrawnSeed:v}=l,{clusterBkg:y,clusterBorder:b,borderColorArray:x}=_,{labelStyles:S,nodeStyles:C,borderStyles:w,backgroundStyles:T}=c(i),E=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look);u(E,i.colorIndex,g,x);let D=a(l),O=E.insert(`g`).attr(`class`,`cluster-label `),k;k=i.labelType===`markdown`?await o(O,i.label,{style:i.labelStyle,useHtmlLabels:D,isNode:!0,width:i.width}):await m(O,i.label,i.labelStyle||``,!1,!0);let A=k.getBBox();if(a(l)){let e=k.children[0],t=n(k);A=e.getBoundingClientRect(),t.attr(`width`,A.width),t.attr(`height`,A.height)}let j=i.width<=A.width+i.padding?A.width+i.padding:i.width;i.diff=i.width<=A.width+i.padding?(j-i.width)/2-i.padding:-i.padding;let M=i.height,N=i.x-j/2,P=i.y-M/2;t.trace(`Data `,i,JSON.stringify(i));let F;if(i.look===`handDrawn`){let e=d.svg(E),n=s(i,{roughness:.7,fill:y,stroke:b,fillWeight:3,seed:v}),r=e.path(p(N,P,j,M,0),n);F=E.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),F.select(`path:nth-child(2)`).attr(`style`,w.join(`;`)),F.select(`path`).attr(`style`,T.join(`;`).replace(`fill`,`stroke`))}else F=E.insert(`rect`,`:first-child`),F.attr(`style`,C).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,N).attr(`y`,P).attr(`width`,j).attr(`height`,M);let{subGraphTitleTopMargin:I}=h(l);if(O.attr(`transform`,`translate(${i.x-A.width/2}, ${i.y-i.height/2+I})`),S){let e=O.select(`span`);e&&e.attr(`style`,S)}let L=F.node().getBBox();return i.offsetX=0,i.width=L.width,i.height=L.height,i.offsetY=A.height-i.padding/2,i.intersect=function(e){return f(i,e)},{cluster:E,labelBBox:A}},`rect`),v=e((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 f(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),y=e(async(e,t)=>{let i=r(),{theme:o,themeVariables:s,handDrawnSeed:c}=i,{altBackground:l,borderColorArray:h,compositeBackground:g,compositeTitleBackground:_,nodeBorder:v}=s,y=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look);u(y,t.colorIndex,o,h);let b=y.insert(`g`,`:first-child`),x=y.insert(`g`).attr(`class`,`cluster-label`),S=y.append(`rect`),C=await m(x,t.label,t.labelStyle,void 0,!0),w=C.getBBox();if(a(i)){let e=C.children[0],t=n(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=0*t.padding,E=T/2,D=(t.width<=w.width+t.padding?w.width+t.padding:t.width)+T;t.diff=t.width<=w.width+t.padding?(D-t.width)/2-t.padding:-t.padding;let O=t.height+T,k=t.height+T-w.height-6,A=t.x-D/2,j=t.y-O/2;t.width=D;let M=t.y-t.height/2-E+w.height+2,N;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=d.svg(y),r=t.rx||t.ry?n.path(p(A,j,D,O,10),{roughness:.7,fill:_,fillStyle:`solid`,stroke:v,seed:c}):n.rectangle(A,j,D,O,{seed:c});N=y.insert(()=>r,`:first-child`);let i=n.rectangle(A,M,D,k,{fill:e?l:g,fillStyle:e?`hachure`:`solid`,stroke:v,seed:c});N=y.insert(()=>r,`:first-child`),S=y.insert(()=>i),N.attr(`class`,`outer`),S.attr(`class`,`inner`)}else N=b.insert(`rect`,`:first-child`),N.attr(`class`,`outer`).attr(`x`,A).attr(`y`,j).attr(`width`,D).attr(`height`,O).attr(`data-look`,t.look),S.attr(`class`,`inner`).attr(`x`,A).attr(`y`,M).attr(`width`,D).attr(`height`,k);return x.attr(`transform`,`translate(${t.x-w.width/2}, ${j+1-(a(i)?0:3)})`),t.height=N.node().getBBox().height,t.offsetX=0,t.offsetY=w.height-t.padding/2,t.labelBBox=w,t.intersect=function(e){return f(t,e)},{cluster:y,labelBBox:w}},`roundedWithTitle`),b=e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let l=r(),{themeVariables:u,handDrawnSeed:m}=l,{clusterBkg:g,clusterBorder:_}=u,{labelStyles:v,nodeStyles:y,borderStyles:b,backgroundStyles:x}=c(i),S=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look),C=a(l),w=S.insert(`g`).attr(`class`,`cluster-label `),T=await o(w,i.label,{style:i.labelStyle,useHtmlLabels:C,isNode:!0,width:i.width}),E=T.getBBox();if(a(l)){let e=T.children[0],t=n(T);E=e.getBoundingClientRect(),t.attr(`width`,E.width),t.attr(`height`,E.height)}let D=i.width<=E.width+i.padding?E.width+i.padding:i.width;i.diff=i.width<=E.width+i.padding?(D-i.width)/2-i.padding:-i.padding;let O=i.height,k=i.x-D/2,A=i.y-O/2;t.trace(`Data `,i,JSON.stringify(i));let j;if(i.look===`handDrawn`){let e=d.svg(S),n=s(i,{roughness:.7,fill:g,stroke:_,fillWeight:4,seed:m}),r=e.path(p(k,A,D,O,i.rx),n);j=S.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),j.select(`path:nth-child(2)`).attr(`style`,b.join(`;`)),j.select(`path`).attr(`style`,x.join(`;`).replace(`fill`,`stroke`))}else j=S.insert(`rect`,`:first-child`),j.attr(`style`,y).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,k).attr(`y`,A).attr(`width`,D).attr(`height`,O);let{subGraphTitleTopMargin:M}=h(l);if(w.attr(`transform`,`translate(${i.x-E.width/2}, ${i.y-i.height/2+M})`),v){let e=w.select(`span`);e&&e.attr(`style`,v)}let N=j.node().getBBox();return i.offsetX=0,i.width=N.width,i.height=N.height,i.offsetY=E.height-i.padding/2,i.intersect=function(e){return f(i,e)},{cluster:S,labelBBox:E}},`kanbanSection`),x=e((e,t)=>{let{theme:n,themeVariables:i,handDrawnSeed:a}=r(),{altBackground:o,nodeBorder:s,borderColorArray:c}=i,l=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look);u(l,t.colorIndex,n,c);let p=l.insert(`g`,`:first-child`),m=0*t.padding,h=t.width+m;t.diff=-t.padding;let g=t.height+m,_=t.x-h/2,v=t.y-g/2;t.width=h;let y;if(t.look===`handDrawn`){let e=d.svg(l).rectangle(_,v,h,g,{fill:o??`#efefef`,fillStyle:`solid`,roughness:.5,strokeLineDash:[5],stroke:s,seed:a});y=l.insert(()=>e,`:first-child`).attr(`class`,`divider`)}else{y=p.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),y.attr(`class`,e).attr(`x`,_).attr(`y`,v).attr(`width`,h).attr(`height`,g).attr(`data-look`,t.look)}return t.height=y.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return f(t,e)},{cluster:l,labelBBox:{}}},`divider`),S=e(async(e,i,l)=>{t.info(`Creating ${l.cssClass} for `,i.id,i);let g=r(),{theme:_,themeVariables:v,handDrawnSeed:y}=g,{borderColorArray:b}=v,{labelStyles:x,borderStyles:S}=c(i),C=e.insert(`g`).attr(`class`,`cluster `+l.cssClass+` `+i.cssClasses).attr(`id`,i.domId??i.id).attr(`data-look`,i.look);u(C,i.colorIndex,_,b);let w=a(g),T=C.insert(`g`).attr(`class`,`cluster-label`),E={width:0,height:0},D=i.label?.trim();if(D){let e;if(e=i.labelType===`markdown`?await o(T,i.label,{style:i.labelStyle,useHtmlLabels:w,isNode:!0,width:i.width}):await m(T,i.label,i.labelStyle||``,!1,!0),E=e.getBBox(),w){let t=e.children[0],r=n(e);E=t.getBoundingClientRect(),r.attr(`width`,E.width),r.attr(`height`,E.height)}}let O=i.width<=E.width+i.padding?E.width+i.padding:i.width;i.diff=i.width<=E.width+i.padding?(O-i.width)/2-i.padding:-i.padding;let k=i.height,A=i.x-O/2,j=i.y-k/2,M;if(i.look===`handDrawn`){let e=d.svg(C),t=s(i,{roughness:l.roughness,fill:l.fill,stroke:l.stroke,strokeWidth:l.strokeWidth,seed:y,...l.fill===`none`?{fillWeight:0}:{fillStyle:`solid`},...l.strokeDash?{strokeLineDash:l.strokeDash}:{}}),n=e.path(p(A,j,O,k,l.rx),t);M=C.insert(()=>n,`:first-child`),M.select(`path:nth-child(2)`).attr(`style`,S.join(`;`))}else M=C.insert(`rect`,`:first-child`),M.attr(`rx`,l.rx).attr(`ry`,l.rx).attr(`x`,A).attr(`y`,j).attr(`width`,O).attr(`height`,k).attr(`fill`,l.fill).attr(`stroke`,l.stroke).attr(`stroke-width`,l.strokeWidth+`px`),l.strokeDash&&M.attr(`stroke-dasharray`,l.strokeDash.join(`, `));if(D){let{subGraphTitleTopMargin:e}=h(g);if(T.attr(`transform`,`translate(${i.x-E.width/2}, ${i.y-i.height/2+e})`),x){let e=T.select(`span`);e&&e.attr(`style`,x)}}let N=M.node().getBBox();return i.offsetX=0,i.width=N.width,i.height=N.height,i.offsetY=E.height-i.padding/2,i.intersect=function(e){return f(i,e)},{cluster:C,labelBBox:E}},`createContainerGroup`),C=e(async(e,t)=>{let{themeVariables:n}=r();return S(e,t,{cssClass:`flow-cluster`,rx:10,fill:`none`,stroke:n.flowContainerStroke||n.secondaryBorderColor,strokeWidth:.75,roughness:.7})},`flowGroup`),w=e((e,t)=>{let n=e.boundaryType||`rect`,r=n===`package`?20:e.padding,i=n===`package`?t.height+10:0,a=Math.max(e.width,t.width+r),o=n===`package`?Math.max(e.height,i+e.padding*2):e.height,s=e.x-a/2,c=e.y-o/2;return{boundaryType:n,width:a,height:o,x:s,y:c,bodyY:c+i,bodyHeight:o-i,tabHeight:i,tabWidth:n===`package`?Math.min(a,Math.max(80,t.width+20)):0}},`getUsecaseSystemBoundaryGeometry`),T={rect:_,squareRect:_,roundedWithTitle:y,noteGroup:v,divider:x,kanbanSection:b,flowGroup:C,usecaseSystemBoundary:e(async(e,i)=>{t.info(`Creating usecase system boundary for `,i.id,i);let p=r(),{theme:m,themeVariables:g,handDrawnSeed:_}=p,{clusterBkg:v,clusterBorder:y,borderColorArray:b}=g,{labelStyles:x,nodeStyles:S}=c(i),{stylesMap:C}=l(i),T=i.boundaryType||`rect`,E=e.insert(`g`).attr(`class`,`cluster usecase-system-boundary usecase-system-boundary-${T} ${i.cssClasses}`).attr(`id`,typeof i.domId==`string`?i.domId:i.id).attr(`data-boundary-type`,T).attr(`data-look`,i.look);u(E,i.colorIndex,m,b);let D=a(p),O=E.insert(`g`).attr(`class`,`cluster-label system-boundary-title`),k=await o(O,i.label,{style:x,useHtmlLabels:D,isNode:!0}),A=k.getBBox();if(D){let e=k.children[0],t=n(k);A=e.getBoundingClientRect(),t.attr(`width`,A.width),t.attr(`height`,A.height)}let{width:j,height:M,x:N,y:P,bodyY:F,bodyHeight:I,tabHeight:L,tabWidth:R}=w(i,A);i.diff=i.width<=A.width+i.padding?(j-i.width)/2-i.padding:-i.padding;let z=s(i,{fill:C.get(`fill`)||v,stroke:C.get(`stroke`)||y,strokeWidth:C.get(`stroke-width`)?.replace(`px`,``)||1,seed:_});if(i.look===`handDrawn`){let e=d.svg(E),t=e.rectangle(N,F,j,I,z);if(E.insert(()=>t,`:first-child`).attr(`class`,`boundary-body label-container`),T===`package`){let t=e.rectangle(N,P,R,L,z);E.insert(()=>t,`:first-child`).attr(`class`,`boundary-tab system-boundary-package-tab label-container`)}}else E.insert(`rect`,`:first-child`).attr(`class`,`boundary-body label-container`).attr(`style`,S).attr(`x`,N).attr(`y`,F).attr(`width`,j).attr(`height`,I),T===`package`&&E.insert(`rect`,`:first-child`).attr(`class`,`boundary-tab system-boundary-package-tab label-container`).attr(`style`,S).attr(`x`,N).attr(`y`,P).attr(`width`,R).attr(`height`,L);let{subGraphTitleTopMargin:B}=h(p);return T===`package`?O.attr(`transform`,`translate(${N+(R-A.width)/2}, ${P+(L-A.height)/2})`):O.attr(`transform`,`translate(${i.x-A.width/2}, ${P+B})`),x&&(O.attr(`style`,x),O.select(`span`).attr(`style`,x)),i.offsetX=0,i.width=j,i.height=M,i.offsetY=A.height-i.padding/2,i.labelBBox=A,i.intersect=function(e){return f(i,e)},{cluster:E,labelBBox:A}},`usecaseSystemBoundary`),swimlane:g},E=new Set([`noteGroup`,`divider`]),D=e(e=>!E.has(e??`rect`),`clusterPaintsTitle`),O=new Map,k=e(async(e,t)=>{let n=await T[t.shape||`rect`](e,t);return O.set(t.id,n),n},`insertCluster`),A=e(()=>{O=new Map},`clear`);export{D as n,k as r,A as t};
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-CneWU0V7.js";import{b as r,g as i,w as a}from"./chunk-VPRB5NB3-BuB50_Ze.js";import{n as o}from"./chunk-E2ZNV5FY-CyMQFbua.js";import{a as s,i as c,t as l}from"./chunk-4EA7E6EY-C_YyuzUS.js";import{s as u}from"./chunk-J5ZVWO5B-oDCd-gWO.js";import{t as d}from"./rough.esm-Dy-Kn_BL.js";import{i as f,n as p,t as m}from"./chunk-XC4XBNZT-BsgxISHC.js";import{n as h}from"./chunk-DBDB3WZW-9vMgzi8H.js";var g=e(async(e,a)=>{let l=r(),{theme:p,themeVariables:m,handDrawnSeed:h}=l,{clusterBkg:g,clusterBorder:_,borderColorArray:v}=m,y=_,{labelStyles:b,nodeStyles:x,borderStyles:S,backgroundStyles:C}=c(a),w=e.insert(`g`).attr(`class`,`cluster swimlane `+(a.cssClasses||``)).attr(`id`,a.id).attr(`data-id`,a.id).attr(`data-et`,`cluster`).attr(`data-look`,a.look);u(w,a.colorIndex,p,v);let T=i(l.flowchart.htmlLabels),E=a.direction===`LR`,D=w.insert(`g`).attr(`class`,`cluster-label swimlane-label`),O=await o(D,a.label,{style:a.labelStyle,useHtmlLabels:T,isNode:!0,width:a.width}),k=O.getBBox();if(T){let e=O.children[0],t=n(O);k=e.getBoundingClientRect(),t.attr(`width`,k.width),t.attr(`height`,k.height)}let A=a.padding??0,j=a.width<=k.width+A?k.width+A:a.width;a.diff=a.width<=k.width+A?(j-a.width)/2-A:-A;let M=a.height,N=a.y-M/2,P=a.y+M/2,F=a.x-j/2,I=a.swimlaneContentTop===void 0?N+M/3:a.swimlaneContentTop,L=E?4:0,R=k.height+2*L,z,B;if(E){let e=Math.max(R,k.height+2*L),t=F+e,n=Math.max(0,j-e);if(a.look===`handDrawn`){let r=d.svg(w),i=s(a,{roughness:.7,fill:g,stroke:y,seed:h}),o=s(a,{roughness:.7,fill:`none`,stroke:y,seed:h}),c=r.rectangle(F,N,e,M,i);z=w.insert(()=>c,`:first-child`).attr(`class`,`swimlane-title`);let l=r.rectangle(t,N,n,M,o);B=w.insert(()=>l,`:first-child`).attr(`class`,`swimlane-body`),z.select(`path:nth-child(2)`).attr(`style`,S.join(`;`)),z.select(`path`).attr(`style`,C.join(`;`).replace(`fill`,`stroke`))}else z=w.insert(`rect`,`:first-child`),B=w.insert(`rect`,`:first-child`),z.attr(`class`,`swimlane-title`).attr(`style`,x).attr(`x`,F).attr(`y`,N).attr(`width`,e).attr(`height`,M).attr(`fill`,g).attr(`stroke`,y),B.attr(`class`,`swimlane-body`).attr(`style`,x).attr(`x`,t).attr(`y`,N).attr(`width`,n).attr(`height`,M).attr(`fill`,`none`).attr(`stroke`,y);let r=F+e/2,i=a.y;D.attr(`transform`,`translate(${r}, ${i}) rotate(-90) translate(${-k.width/2}, ${-k.height/2})`)}else{let e=Math.max(0,I-N),t=Math.min(R,e),n=N+t,r=Math.max(0,P-n),i=a.x-j/2;if(a.look===`handDrawn`){let e=d.svg(w),o=s(a,{roughness:.7,fill:g,stroke:y,fillWeight:3,seed:h}),c=s(a,{roughness:.7,fill:`none`,stroke:y,seed:h}),l=e.rectangle(i,N,j,t,o);z=w.insert(()=>l,`:first-child`).attr(`class`,`swimlane-title`);let u=e.rectangle(i,n,j,r,c);B=w.insert(()=>u,`:first-child`).attr(`class`,`swimlane-body`),z.select(`path:nth-child(2)`).attr(`style`,S.join(`;`)),z.select(`path`).attr(`style`,C.join(`;`).replace(`fill`,`stroke`))}else z=w.insert(`rect`,`:first-child`),B=w.insert(`rect`,`:first-child`),z.attr(`class`,`swimlane-title`).attr(`style`,x).attr(`x`,i).attr(`y`,N).attr(`width`,j).attr(`height`,t).attr(`fill`,g).attr(`stroke`,y),B.attr(`class`,`swimlane-body`).attr(`style`,x).attr(`x`,i).attr(`y`,n).attr(`width`,j).attr(`height`,r).attr(`fill`,`none`).attr(`stroke`,y);let o=a.x-k.width/2,c=N+(t-k.height)/2;D.attr(`transform`,`translate(${o}, ${c})`)}if(t.trace(`Swimlane data `,a,JSON.stringify(a)),b){let e=D.select(`span`);e&&e.attr(`style`,b)}return a.offsetX=0,a.width=j,a.height=M,a.offsetY=k.height-A/2,a.intersect=function(e){return f(a,e)},{cluster:w,labelBBox:k}},`swimlane`),_=e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let l=r(),{theme:g,themeVariables:_,handDrawnSeed:v}=l,{clusterBkg:y,clusterBorder:b,borderColorArray:x}=_,{labelStyles:S,nodeStyles:C,borderStyles:w,backgroundStyles:T}=c(i),E=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look);u(E,i.colorIndex,g,x);let D=a(l),O=E.insert(`g`).attr(`class`,`cluster-label `),k;k=i.labelType===`markdown`?await o(O,i.label,{style:i.labelStyle,useHtmlLabels:D,isNode:!0,width:i.width}):await m(O,i.label,i.labelStyle||``,!1,!0);let A=k.getBBox();if(a(l)){let e=k.children[0],t=n(k);A=e.getBoundingClientRect(),t.attr(`width`,A.width),t.attr(`height`,A.height)}let j=i.width<=A.width+i.padding?A.width+i.padding:i.width;i.diff=i.width<=A.width+i.padding?(j-i.width)/2-i.padding:-i.padding;let M=i.height,N=i.x-j/2,P=i.y-M/2;t.trace(`Data `,i,JSON.stringify(i));let F;if(i.look===`handDrawn`){let e=d.svg(E),n=s(i,{roughness:.7,fill:y,stroke:b,fillWeight:3,seed:v}),r=e.path(p(N,P,j,M,0),n);F=E.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),F.select(`path:nth-child(2)`).attr(`style`,w.join(`;`)),F.select(`path`).attr(`style`,T.join(`;`).replace(`fill`,`stroke`))}else F=E.insert(`rect`,`:first-child`),F.attr(`style`,C).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,N).attr(`y`,P).attr(`width`,j).attr(`height`,M);let{subGraphTitleTopMargin:I}=h(l);if(O.attr(`transform`,`translate(${i.x-A.width/2}, ${i.y-i.height/2+I})`),S){let e=O.select(`span`);e&&e.attr(`style`,S)}let L=F.node().getBBox();return i.offsetX=0,i.width=L.width,i.height=L.height,i.offsetY=A.height-i.padding/2,i.intersect=function(e){return f(i,e)},{cluster:E,labelBBox:A}},`rect`),v=e((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 f(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),y=e(async(e,t)=>{let i=r(),{theme:o,themeVariables:s,handDrawnSeed:c}=i,{altBackground:l,borderColorArray:h,compositeBackground:g,compositeTitleBackground:_,nodeBorder:v}=s,y=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look);u(y,t.colorIndex,o,h);let b=y.insert(`g`,`:first-child`),x=y.insert(`g`).attr(`class`,`cluster-label`),S=y.append(`rect`),C=await m(x,t.label,t.labelStyle,void 0,!0),w=C.getBBox();if(a(i)){let e=C.children[0],t=n(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=0*t.padding,E=T/2,D=(t.width<=w.width+t.padding?w.width+t.padding:t.width)+T;t.diff=t.width<=w.width+t.padding?(D-t.width)/2-t.padding:-t.padding;let O=t.height+T,k=t.height+T-w.height-6,A=t.x-D/2,j=t.y-O/2;t.width=D;let M=t.y-t.height/2-E+w.height+2,N;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=d.svg(y),r=t.rx||t.ry?n.path(p(A,j,D,O,10),{roughness:.7,fill:_,fillStyle:`solid`,stroke:v,seed:c}):n.rectangle(A,j,D,O,{seed:c});N=y.insert(()=>r,`:first-child`);let i=n.rectangle(A,M,D,k,{fill:e?l:g,fillStyle:e?`hachure`:`solid`,stroke:v,seed:c});N=y.insert(()=>r,`:first-child`),S=y.insert(()=>i),N.attr(`class`,`outer`),S.attr(`class`,`inner`)}else N=b.insert(`rect`,`:first-child`),N.attr(`class`,`outer`).attr(`x`,A).attr(`y`,j).attr(`width`,D).attr(`height`,O).attr(`data-look`,t.look),S.attr(`class`,`inner`).attr(`x`,A).attr(`y`,M).attr(`width`,D).attr(`height`,k);return x.attr(`transform`,`translate(${t.x-w.width/2}, ${j+1-(a(i)?0:3)})`),t.height=N.node().getBBox().height,t.offsetX=0,t.offsetY=w.height-t.padding/2,t.labelBBox=w,t.intersect=function(e){return f(t,e)},{cluster:y,labelBBox:w}},`roundedWithTitle`),b=e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let l=r(),{themeVariables:u,handDrawnSeed:m}=l,{clusterBkg:g,clusterBorder:_}=u,{labelStyles:v,nodeStyles:y,borderStyles:b,backgroundStyles:x}=c(i),S=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look),C=a(l),w=S.insert(`g`).attr(`class`,`cluster-label `),T=await o(w,i.label,{style:i.labelStyle,useHtmlLabels:C,isNode:!0,width:i.width}),E=T.getBBox();if(a(l)){let e=T.children[0],t=n(T);E=e.getBoundingClientRect(),t.attr(`width`,E.width),t.attr(`height`,E.height)}let D=i.width<=E.width+i.padding?E.width+i.padding:i.width;i.diff=i.width<=E.width+i.padding?(D-i.width)/2-i.padding:-i.padding;let O=i.height,k=i.x-D/2,A=i.y-O/2;t.trace(`Data `,i,JSON.stringify(i));let j;if(i.look===`handDrawn`){let e=d.svg(S),n=s(i,{roughness:.7,fill:g,stroke:_,fillWeight:4,seed:m}),r=e.path(p(k,A,D,O,i.rx),n);j=S.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),j.select(`path:nth-child(2)`).attr(`style`,b.join(`;`)),j.select(`path`).attr(`style`,x.join(`;`).replace(`fill`,`stroke`))}else j=S.insert(`rect`,`:first-child`),j.attr(`style`,y).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,k).attr(`y`,A).attr(`width`,D).attr(`height`,O);let{subGraphTitleTopMargin:M}=h(l);if(w.attr(`transform`,`translate(${i.x-E.width/2}, ${i.y-i.height/2+M})`),v){let e=w.select(`span`);e&&e.attr(`style`,v)}let N=j.node().getBBox();return i.offsetX=0,i.width=N.width,i.height=N.height,i.offsetY=E.height-i.padding/2,i.intersect=function(e){return f(i,e)},{cluster:S,labelBBox:E}},`kanbanSection`),x=e((e,t)=>{let{theme:n,themeVariables:i,handDrawnSeed:a}=r(),{altBackground:o,nodeBorder:s,borderColorArray:c}=i,l=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look);u(l,t.colorIndex,n,c);let p=l.insert(`g`,`:first-child`),m=0*t.padding,h=t.width+m;t.diff=-t.padding;let g=t.height+m,_=t.x-h/2,v=t.y-g/2;t.width=h;let y;if(t.look===`handDrawn`){let e=d.svg(l).rectangle(_,v,h,g,{fill:o??`#efefef`,fillStyle:`solid`,roughness:.5,strokeLineDash:[5],stroke:s,seed:a});y=l.insert(()=>e,`:first-child`).attr(`class`,`divider`)}else{y=p.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),y.attr(`class`,e).attr(`x`,_).attr(`y`,v).attr(`width`,h).attr(`height`,g).attr(`data-look`,t.look)}return t.height=y.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return f(t,e)},{cluster:l,labelBBox:{}}},`divider`),S=e(async(e,i,l)=>{t.info(`Creating ${l.cssClass} for `,i.id,i);let g=r(),{theme:_,themeVariables:v,handDrawnSeed:y}=g,{borderColorArray:b}=v,{labelStyles:x,borderStyles:S}=c(i),C=e.insert(`g`).attr(`class`,`cluster `+l.cssClass+` `+i.cssClasses).attr(`id`,i.domId??i.id).attr(`data-look`,i.look);u(C,i.colorIndex,_,b);let w=a(g),T=C.insert(`g`).attr(`class`,`cluster-label`),E={width:0,height:0},D=i.label?.trim();if(D){let e;if(e=i.labelType===`markdown`?await o(T,i.label,{style:i.labelStyle,useHtmlLabels:w,isNode:!0,width:i.width}):await m(T,i.label,i.labelStyle||``,!1,!0),E=e.getBBox(),w){let t=e.children[0],r=n(e);E=t.getBoundingClientRect(),r.attr(`width`,E.width),r.attr(`height`,E.height)}}let O=i.width<=E.width+i.padding?E.width+i.padding:i.width;i.diff=i.width<=E.width+i.padding?(O-i.width)/2-i.padding:-i.padding;let k=i.height,A=i.x-O/2,j=i.y-k/2,M;if(i.look===`handDrawn`){let e=d.svg(C),t=s(i,{roughness:l.roughness,fill:l.fill,stroke:l.stroke,strokeWidth:l.strokeWidth,seed:y,...l.fill===`none`?{fillWeight:0}:{fillStyle:`solid`},...l.strokeDash?{strokeLineDash:l.strokeDash}:{}}),n=e.path(p(A,j,O,k,l.rx),t);M=C.insert(()=>n,`:first-child`),M.select(`path:nth-child(2)`).attr(`style`,S.join(`;`))}else M=C.insert(`rect`,`:first-child`),M.attr(`rx`,l.rx).attr(`ry`,l.rx).attr(`x`,A).attr(`y`,j).attr(`width`,O).attr(`height`,k).attr(`fill`,l.fill).attr(`stroke`,l.stroke).attr(`stroke-width`,l.strokeWidth+`px`),l.strokeDash&&M.attr(`stroke-dasharray`,l.strokeDash.join(`, `));if(D){let{subGraphTitleTopMargin:e}=h(g);if(T.attr(`transform`,`translate(${i.x-E.width/2}, ${i.y-i.height/2+e})`),x){let e=T.select(`span`);e&&e.attr(`style`,x)}}let N=M.node().getBBox();return i.offsetX=0,i.width=N.width,i.height=N.height,i.offsetY=E.height-i.padding/2,i.intersect=function(e){return f(i,e)},{cluster:C,labelBBox:E}},`createContainerGroup`),C=e(async(e,t)=>{let{themeVariables:n}=r();return S(e,t,{cssClass:`flow-cluster`,rx:10,fill:`none`,stroke:n.flowContainerStroke||n.secondaryBorderColor,strokeWidth:.75,roughness:.7})},`flowGroup`),w=e((e,t)=>{let n=e.boundaryType||`rect`,r=n===`package`?20:e.padding,i=n===`package`?t.height+10:0,a=Math.max(e.width,t.width+r),o=n===`package`?Math.max(e.height,i+e.padding*2):e.height,s=e.x-a/2,c=e.y-o/2;return{boundaryType:n,width:a,height:o,x:s,y:c,bodyY:c+i,bodyHeight:o-i,tabHeight:i,tabWidth:n===`package`?Math.min(a,Math.max(80,t.width+20)):0}},`getUsecaseSystemBoundaryGeometry`),T={rect:_,squareRect:_,roundedWithTitle:y,noteGroup:v,divider:x,kanbanSection:b,flowGroup:C,usecaseSystemBoundary:e(async(e,i)=>{t.info(`Creating usecase system boundary for `,i.id,i);let p=r(),{theme:m,themeVariables:g,handDrawnSeed:_}=p,{clusterBkg:v,clusterBorder:y,borderColorArray:b}=g,{labelStyles:x,nodeStyles:S}=c(i),{stylesMap:C}=l(i),T=i.boundaryType||`rect`,E=e.insert(`g`).attr(`class`,`cluster usecase-system-boundary usecase-system-boundary-${T} ${i.cssClasses}`).attr(`id`,typeof i.domId==`string`?i.domId:i.id).attr(`data-boundary-type`,T).attr(`data-look`,i.look);u(E,i.colorIndex,m,b);let D=a(p),O=E.insert(`g`).attr(`class`,`cluster-label system-boundary-title`),k=await o(O,i.label,{style:x,useHtmlLabels:D,isNode:!0}),A=k.getBBox();if(D){let e=k.children[0],t=n(k);A=e.getBoundingClientRect(),t.attr(`width`,A.width),t.attr(`height`,A.height)}let{width:j,height:M,x:N,y:P,bodyY:F,bodyHeight:I,tabHeight:L,tabWidth:R}=w(i,A);i.diff=i.width<=A.width+i.padding?(j-i.width)/2-i.padding:-i.padding;let z=s(i,{fill:C.get(`fill`)||v,stroke:C.get(`stroke`)||y,strokeWidth:C.get(`stroke-width`)?.replace(`px`,``)||1,seed:_});if(i.look===`handDrawn`){let e=d.svg(E),t=e.rectangle(N,F,j,I,z);if(E.insert(()=>t,`:first-child`).attr(`class`,`boundary-body label-container`),T===`package`){let t=e.rectangle(N,P,R,L,z);E.insert(()=>t,`:first-child`).attr(`class`,`boundary-tab system-boundary-package-tab label-container`)}}else E.insert(`rect`,`:first-child`).attr(`class`,`boundary-body label-container`).attr(`style`,S).attr(`x`,N).attr(`y`,F).attr(`width`,j).attr(`height`,I),T===`package`&&E.insert(`rect`,`:first-child`).attr(`class`,`boundary-tab system-boundary-package-tab label-container`).attr(`style`,S).attr(`x`,N).attr(`y`,P).attr(`width`,R).attr(`height`,L);let{subGraphTitleTopMargin:B}=h(p);return T===`package`?O.attr(`transform`,`translate(${N+(R-A.width)/2}, ${P+(L-A.height)/2})`):O.attr(`transform`,`translate(${i.x-A.width/2}, ${P+B})`),x&&(O.attr(`style`,x),O.select(`span`).attr(`style`,x)),i.offsetX=0,i.width=j,i.height=M,i.offsetY=A.height-i.padding/2,i.labelBBox=A,i.intersect=function(e){return f(i,e)},{cluster:E,labelBBox:A}},`usecaseSystemBoundary`),swimlane:g},E=new Set([`noteGroup`,`divider`]),D=e(e=>!E.has(e??`rect`),`clusterPaintsTitle`),O=new Map,k=e(async(e,t)=>{let n=await T[t.shape||`rect`](e,t);return O.set(t.id,n),n},`insertCluster`),A=e(()=>{O=new Map},`clear`);export{D as n,k as r,A as t};