@pi-outpost/embed 0.57.0 → 0.59.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 (139) hide show
  1. package/dist/{abnfDiagram-WEYOIA3C-B_dTFm2g.js → abnfDiagram-S7VZAUFO-BdOzCXh1.js} +4 -4
  2. package/dist/{abnfDiagram-WEYOIA3C-Dk2VD3Iw.cjs → abnfDiagram-S7VZAUFO-zyFnpqZ0.cjs} +1 -1
  3. package/dist/{architectureDiagram-ZHVYKT53-CslNYmQN.js → architectureDiagram-YGSQEFNW-DiYOcBqo.js} +5 -5
  4. package/dist/{architectureDiagram-ZHVYKT53-Bud-mHjo.cjs → architectureDiagram-YGSQEFNW-gEzRb5xY.cjs} +3 -3
  5. package/dist/{blockDiagram-RJAE7QA3-Dgm9J6pS.js → blockDiagram-APKKGZFW-CIX-8mpK.js} +106 -107
  6. package/dist/{blockDiagram-RJAE7QA3-lEBn-_Yn.cjs → blockDiagram-APKKGZFW-KL3nQT0s.cjs} +7 -7
  7. package/dist/bpmnIcons-APHXDYXF-BcsYKfS7.js +39 -0
  8. package/dist/bpmnIcons-APHXDYXF-DX8xcBUd.cjs +1 -0
  9. package/dist/{c4Diagram-XDPPPE54-rbzhqhW5.js → c4Diagram-KJ2TOQU5-BS_M90FN.js} +8 -8
  10. package/dist/{c4Diagram-XDPPPE54-BKNqVY-U.cjs → c4Diagram-KJ2TOQU5-D-dCJWvI.cjs} +1 -1
  11. package/dist/{chunk-7S6XSTFO-ejBVk-tI.cjs → chunk-6MUBBAK2-BTabKnTR.cjs} +1 -1
  12. package/dist/{chunk-7S6XSTFO-DrDRohsE.js → chunk-6MUBBAK2-DlUTxzYh.js} +2 -2
  13. package/dist/{chunk-HAGFOTED-BUPxFGdn.cjs → chunk-AXFCVDMN-B6dhmE32.cjs} +8 -8
  14. package/dist/{chunk-HAGFOTED-ceXO12G4.js → chunk-AXFCVDMN-DrVQa3gP.js} +1256 -1041
  15. package/dist/{chunk-DSNLSHJZ-BxQ7lMXY.cjs → chunk-BG4553SI-DFPUniBw.cjs} +1 -1
  16. package/dist/{chunk-DSNLSHJZ-DPpiuUZK.js → chunk-BG4553SI-j_gQs8M_.js} +2 -0
  17. package/dist/chunk-DQASFODM-BBkQ8gE7.cjs +10 -0
  18. package/dist/{chunk-WQQL4CDK-C3yDIFZ3.js → chunk-DQASFODM-DAaU7yoa.js} +520 -211
  19. package/dist/{chunk-55XCU76K-o8OgDLPD.js → chunk-HFQBQIA3-DqHSeXIz.js} +2 -2
  20. package/dist/{chunk-55XCU76K-IpMfjRYv.cjs → chunk-HFQBQIA3-lOxrhpos.cjs} +1 -1
  21. package/dist/{chunk-ZCHMQSOR-BbO7eY2w.js → chunk-KQLB2F66-C7twW9LJ.js} +30 -30
  22. package/dist/{chunk-ZCHMQSOR-Cg8zPt0w.cjs → chunk-KQLB2F66-Ec2IAtUR.cjs} +1 -1
  23. package/dist/{chunk-4EMNKR2T-CGAdq4EA.cjs → chunk-KS47KZWR-C7Yv0kfF.cjs} +1 -1
  24. package/dist/{chunk-4EMNKR2T-BIO9veC4.js → chunk-KS47KZWR-OD3AMBe8.js} +2 -2
  25. package/dist/{chunk-ZAUX2LTX-DIQkgUFr.cjs → chunk-LEVMRMFU-BFGXlIAt.cjs} +1 -1
  26. package/dist/{chunk-ZAUX2LTX-P8LAwm_U.js → chunk-LEVMRMFU-NLMudZfn.js} +3 -3
  27. package/dist/chunk-M57EVK23-BSZ7OEGY.cjs +1 -0
  28. package/dist/{chunk-HNE4Q36P-uON_vFhT.js → chunk-M57EVK23-C8-Jp43x.js} +55 -54
  29. package/dist/{chunk-2E7WHVMD-Vo-POJc_.js → chunk-OY52VR5R-B7NRk2-S.js} +3 -3
  30. package/dist/{chunk-2E7WHVMD-BNsJOdNP.cjs → chunk-OY52VR5R-CvyV3pJF.cjs} +1 -1
  31. package/dist/{chunk-NQOKRVIF-DmOxzSOQ.js → chunk-QB3YPZ4I-DPQ26dC9.js} +788 -730
  32. package/dist/chunk-QB3YPZ4I-DaIXN7QF.cjs +213 -0
  33. package/dist/{chunk-YZO67HFG-DCQIFG8j.cjs → chunk-R3KSYZAL-BQPJVcO7.cjs} +1 -1
  34. package/dist/{chunk-YZO67HFG-WF3jklBn.js → chunk-R3KSYZAL-DeNSy3X8.js} +8 -8
  35. package/dist/{chunk-AQDTSKZB-DUZx386i.js → chunk-STOXU5M4-0WKKmqbF.js} +4 -4
  36. package/dist/{chunk-AQDTSKZB-B-MpZ-y2.cjs → chunk-STOXU5M4-CmoaBap6.cjs} +1 -1
  37. package/dist/{chunk-VQ5W62QI-Dw9Kffnl.cjs → chunk-TU62E6Q5-CMbRLUnW.cjs} +1 -1
  38. package/dist/{chunk-VQ5W62QI-Bvcxpp51.js → chunk-TU62E6Q5-DPxNUFFP.js} +2 -2
  39. package/dist/{chunk-UHW7PFBP-BTk1ZC8L.js → chunk-X4PVCEUW-C80IBt-t.js} +2 -2
  40. package/dist/{chunk-UHW7PFBP-Bays5Zi8.cjs → chunk-X4PVCEUW-Djs21j48.cjs} +1 -1
  41. package/dist/{classDiagram-v2-4MYWR3UA-DyMM0DMP.cjs → classDiagram-v2-L25IHNXF-CAbdJ2_W.cjs} +1 -1
  42. package/dist/{classDiagram-v2-4MYWR3UA-DIjHIULx.js → classDiagram-v2-L25IHNXF-CAts0vNW.js} +13 -13
  43. package/dist/{conversationExport-DojQkOLk.js → conversationExport-BWbYNcNf.js} +3 -3
  44. package/dist/{conversationExport-CE0UTxEg.cjs → conversationExport-DuKpkQDn.cjs} +1 -1
  45. package/dist/{conversationHistory-DdjP3rjR.cjs → conversationHistory-DIGz_MD4.cjs} +1 -1
  46. package/dist/{conversationHistory-g6h0_Fjx.js → conversationHistory-DXpSCV87.js} +2 -2
  47. package/dist/{cynefinDiagram-WF24UDRP-DEFG-MNh.js → cynefinDiagram-L36ESFBY-ByHpHKCc.js} +4 -4
  48. package/dist/{cynefinDiagram-WF24UDRP-BC09SRT2.cjs → cynefinDiagram-L36ESFBY-CrsJmb7x.cjs} +1 -1
  49. package/dist/{dagre-NK4GIZVX-D6Xuc_Nw.js → dagre-SPEB5RXH-C01_UMxx.js} +51 -51
  50. package/dist/{dagre-NK4GIZVX-D0_oLrA9.cjs → dagre-SPEB5RXH-ExCiSqVu.cjs} +2 -2
  51. package/dist/{diagram-TYUNFSNR-Dy2nkVin.cjs → diagram-3B7GL73J-CRNoSH2i.cjs} +2 -2
  52. package/dist/{diagram-TYUNFSNR-BSq4ni3b.js → diagram-3B7GL73J-D7i6eGGQ.js} +14 -14
  53. package/dist/{diagram-I5XIIV2D-Dom9usNq.cjs → diagram-DNEMPZML-CkhkOJo2.cjs} +1 -1
  54. package/dist/{diagram-I5XIIV2D-DbwsxgDf.js → diagram-DNEMPZML-Di5RqN_h.js} +4 -4
  55. package/dist/{diagram-RJA3I4VV-Bt-BxYua.cjs → diagram-L3MUGCDN-B1vXsDB1.cjs} +1 -1
  56. package/dist/{diagram-RJA3I4VV-DCygetH_.js → diagram-L3MUGCDN-BtQkAzOD.js} +4 -4
  57. package/dist/{diagram-CBK3MWTC-CuUrHQAz.js → diagram-LA4NIPWU-Badv-tyU.js} +6 -6
  58. package/dist/{diagram-CBK3MWTC-DbXGbFMz.cjs → diagram-LA4NIPWU-DST6DvSP.cjs} +1 -1
  59. package/dist/{diagram-PFBEJUXE-DAIw33Bx.cjs → diagram-MHCOC4E2-BafwTqOD.cjs} +1 -1
  60. package/dist/{diagram-PFBEJUXE-ChA6KYWw.js → diagram-MHCOC4E2-DmA9ezb9.js} +3 -3
  61. package/dist/{diagram-ODIL2UCW-CSnuo9bJ.js → diagram-XPFHEONP-CZHt29x-.js} +5 -5
  62. package/dist/{diagram-ODIL2UCW-CLSAtgxG.cjs → diagram-XPFHEONP-DCm8Rjp8.cjs} +2 -2
  63. package/dist/{docxExport-CrsGZa8E.cjs → docxExport-BlPADe6b.cjs} +1 -1
  64. package/dist/{docxExport-9XrmWN9x.js → docxExport-Bwi2TlqP.js} +2 -2
  65. package/dist/{ebnfDiagram-V4P3TTPT-e4I3Otpa.js → ebnfDiagram-UZSYDL2S-DVGQga8g.js} +4 -4
  66. package/dist/{ebnfDiagram-V4P3TTPT-6xhHNshj.cjs → ebnfDiagram-UZSYDL2S-fO0plY-B.cjs} +1 -1
  67. package/dist/elk-XV6XMXQE-BkH0WNCd.js +48285 -0
  68. package/dist/elk-XV6XMXQE-CioXUob9.cjs +27 -0
  69. package/dist/{erDiagram-KYQIGQAA-BTNANm6p.js → erDiagram-EYBAPDEH-Byy0RKKe.js} +12 -13
  70. package/dist/{erDiagram-KYQIGQAA-DsqyoDOz.cjs → erDiagram-EYBAPDEH-CUgDxVam.cjs} +2 -2
  71. package/dist/flowDiagram-MALGAFMO-D2e4rl0I.js +15 -0
  72. package/dist/flowDiagram-MALGAFMO-ZfeGO5tQ.cjs +1 -0
  73. package/dist/{ganttDiagram-R7GPNTJY-B1juClwW.cjs → ganttDiagram-23REXITY-D82ogzPM.cjs} +1 -1
  74. package/dist/{ganttDiagram-R7GPNTJY-CEGQ6hzi.js → ganttDiagram-23REXITY-DAs5LGLL.js} +2 -2
  75. package/dist/{gitGraphDiagram-PDYL7XHY-6cCNinUi.cjs → gitGraphDiagram-STJD7YCW-B3zcpUUP.cjs} +1 -1
  76. package/dist/{gitGraphDiagram-PDYL7XHY-D_ADFBrL.js → gitGraphDiagram-STJD7YCW-BVa0DHTU.js} +3 -3
  77. package/dist/{infoDiagram-MVDRKAX5-Dkuw3h5s.js → infoDiagram-KBXO4MBG-BW7IcSQr.js} +4 -4
  78. package/dist/{infoDiagram-MVDRKAX5-CVeFOzof.cjs → infoDiagram-KBXO4MBG-DRQkxKbg.cjs} +1 -1
  79. package/dist/{ishikawaDiagram-HPEHV2GE-oTSoKUOA.js → ishikawaDiagram-M35NCXHK-BiLoyI1l.js} +4 -4
  80. package/dist/{ishikawaDiagram-HPEHV2GE-92CAbMpi.cjs → ishikawaDiagram-M35NCXHK-DBokYlS8.cjs} +1 -1
  81. package/dist/{journeyDiagram-BOSHW7O7-Cb_yTQWF.cjs → journeyDiagram-OPLOXDXO-CgabMAC2.cjs} +1 -1
  82. package/dist/{journeyDiagram-BOSHW7O7-CMbGxPLA.js → journeyDiagram-OPLOXDXO-DsyubZVY.js} +3 -3
  83. package/dist/{kanban-definition-FNSA4HC5-DlUMoAIT.cjs → kanban-definition-BZKZHSQY-CLi3J9cI.cjs} +1 -1
  84. package/dist/{kanban-definition-FNSA4HC5-DzEQcVPw.js → kanban-definition-BZKZHSQY-DU8sOWQd.js} +10 -10
  85. package/dist/{line-ZwhMGa3_.cjs → line-Bf0B129l.cjs} +1 -1
  86. package/dist/{line-0VTxwDiV.js → line-DRq00lCg.js} +1 -1
  87. package/dist/{loadReferencedImage-RUfxAG0o.cjs → loadReferencedImage-D47xCpa7.cjs} +1 -1
  88. package/dist/{loadReferencedImage-LF2DEOPa.js → loadReferencedImage-VNYxXIzB.js} +1 -1
  89. package/dist/{mermaid.core-73kk5oPm.cjs → mermaid.core-BL4WDqAH.cjs} +12 -12
  90. package/dist/{mermaid.core-C8dp1dnD.js → mermaid.core-DPCy8dJO.js} +511 -504
  91. package/dist/{mermaidToImage-Ckx06W6z.cjs → mermaidToImage-B7I6iJ9s.cjs} +1 -1
  92. package/dist/{mermaidToImage-knc9XzLd.js → mermaidToImage-CViP9wx2.js} +1 -1
  93. package/dist/{mindmap-definition-6OY57UG3-CXobmoZM.js → mindmap-definition-I2QAS2VK-C2KpoDqG.js} +38 -68
  94. package/dist/{mindmap-definition-6OY57UG3-DLx3d1V6.cjs → mindmap-definition-I2QAS2VK-GT8_r7or.cjs} +8 -8
  95. package/dist/{pegDiagram-ECIUJNBX-ODBWqs1V.js → pegDiagram-FD4XPPHP-CSA4sB83.js} +4 -4
  96. package/dist/{pegDiagram-ECIUJNBX-B-eSDSQK.cjs → pegDiagram-FD4XPPHP-D0OZoETj.cjs} +1 -1
  97. package/dist/pi-outpost-embed.cjs +25 -25
  98. package/dist/pi-outpost-embed.js +2799 -2405
  99. package/dist/{pieDiagram-GNMPY74T-DYDC5z2D.js → pieDiagram-J4AKIIQI-CNLlH6kK.js} +4 -4
  100. package/dist/{pieDiagram-GNMPY74T-BtYyKCrf.cjs → pieDiagram-J4AKIIQI-O870G6iX.cjs} +1 -1
  101. package/dist/{quadrantDiagram-D57K4MC3-BfQWcg-D.js → quadrantDiagram-XTYBLID2-BjaZuA3m.js} +2 -2
  102. package/dist/{quadrantDiagram-D57K4MC3-Cu6JmzPE.cjs → quadrantDiagram-XTYBLID2-CfdtTmYm.cjs} +1 -1
  103. package/dist/{railroadDiagram-Y72NRBL7-BdHmqKV_.cjs → railroadDiagram-MRQ6NCDL-DDOA_8gY.cjs} +1 -1
  104. package/dist/{railroadDiagram-Y72NRBL7-ChQwG3mZ.js → railroadDiagram-MRQ6NCDL-DgAKQKiD.js} +4 -4
  105. package/dist/{requirementDiagram-EQYSW5RA-Dj4E0fE3.js → requirementDiagram-Y7LWUY3S-Bhlk2ueA.js} +12 -12
  106. package/dist/{requirementDiagram-EQYSW5RA-CDQ6Nza1.cjs → requirementDiagram-Y7LWUY3S-nSr_pknl.cjs} +1 -1
  107. package/dist/{sankeyDiagram-SY24JHO5-luxVW4uf.js → sankeyDiagram-WGJFYUXA-DUYWd4HF.js} +2 -2
  108. package/dist/{sankeyDiagram-SY24JHO5-BPFkmPzT.cjs → sankeyDiagram-WGJFYUXA-x6J896b3.cjs} +1 -1
  109. package/dist/{sequenceDiagram-BLEHNHQU-DX51aIRY.cjs → sequenceDiagram-5NDRBG5M-BFgcr8MT.cjs} +1 -1
  110. package/dist/{sequenceDiagram-BLEHNHQU-H4rQDzp-.js → sequenceDiagram-5NDRBG5M-D1YS8Amk.js} +5 -5
  111. package/dist/{stateDiagram-v2-A6IESKWZ-DBJ11U2p.js → stateDiagram-v2-FJ4FJNEA-6j2vDdvl.js} +13 -13
  112. package/dist/{stateDiagram-v2-A6IESKWZ-Dbp783Hd.cjs → stateDiagram-v2-FJ4FJNEA-DOTmLAY2.cjs} +1 -1
  113. package/dist/swimlanes-UMQ2AFYF-BQLQzNLz.cjs +1 -0
  114. package/dist/{swimlanes-B3ENRKFQ-Bp3vZCmK.js → swimlanes-UMQ2AFYF-CNb1NF60.js} +1742 -1338
  115. package/dist/swimlanesDiagram-OMPLPG4O-BNDsO6gw.cjs +8 -0
  116. package/dist/swimlanesDiagram-OMPLPG4O-BOl138lS.js +27 -0
  117. package/dist/{timeline-definition-JXYKGLGB-BE6iAj4r.js → timeline-definition-SEUHKTQE-B_909Amn.js} +4 -4
  118. package/dist/{timeline-definition-JXYKGLGB-DKhMPFBi.cjs → timeline-definition-SEUHKTQE-Du5-RSsU.cjs} +1 -1
  119. package/dist/{usecaseDiagram-WPOLBNNX-BRWufOTq.cjs → usecaseDiagram-AFA6YXN4-BUs_YsqB.cjs} +2 -2
  120. package/dist/{usecaseDiagram-WPOLBNNX-DY9Md_AG.js → usecaseDiagram-AFA6YXN4-CiVGRP5X.js} +12 -12
  121. package/dist/{vennDiagram-Q3Y3IDCW-NYVHk5sI.cjs → vennDiagram-NNMJR3RB-CKxaec4G.cjs} +1 -1
  122. package/dist/{vennDiagram-Q3Y3IDCW-DbPGt27W.js → vennDiagram-NNMJR3RB-l3A_FZxZ.js} +4 -4
  123. package/dist/{wardleyDiagram-IVAIDKWA-BHkJFpfC.js → wardleyDiagram-S7YFUSEH-BMQf5dl9.js} +4 -4
  124. package/dist/{wardleyDiagram-IVAIDKWA-DsYJNlmX.cjs → wardleyDiagram-S7YFUSEH-Ctqri3T4.cjs} +1 -1
  125. package/dist/{xychartDiagram-4URNHDU4-B_g46bSg.cjs → xychartDiagram-GGNKY7IX-BUma86Wh.cjs} +1 -1
  126. package/dist/{xychartDiagram-4URNHDU4-IvFjWG-y.js → xychartDiagram-GGNKY7IX-CuFU4ynf.js} +7 -7
  127. package/package.json +2 -2
  128. package/dist/channel-AESWk0Yw.cjs +0 -1
  129. package/dist/channel-CEoRf1uz.js +0 -5
  130. package/dist/chunk-HNE4Q36P-CCHAgwa3.cjs +0 -1
  131. package/dist/chunk-NQOKRVIF-DcZqKWzv.cjs +0 -213
  132. package/dist/chunk-WQQL4CDK-DxEEyQzx.cjs +0 -10
  133. package/dist/elk-QONTBCTQ-B8RYU1Ay.js +0 -47505
  134. package/dist/elk-QONTBCTQ-hBYUI6Nr.cjs +0 -27
  135. package/dist/flowDiagram-IUGLLWBU-BJlVRCj8.js +0 -15
  136. package/dist/flowDiagram-IUGLLWBU-CsC_IEV_.cjs +0 -1
  137. package/dist/swimlanes-B3ENRKFQ-DY1V--Rq.cjs +0 -1
  138. package/dist/swimlanesDiagram-AYQRV4AK-COavJcG4.js +0 -27
  139. package/dist/swimlanesDiagram-AYQRV4AK-dUd5QjxZ.cjs +0 -8
@@ -1,18 +1,18 @@
1
1
  import { n as e } from "./chunk-Y2CYZVJY-CwsV_8W4.js";
2
2
  import { m as t, p as n } from "./src-65Lfw03T.js";
3
- import { B as r, M as i, b as a, f as o, g as s, k as c, w as l, y as u, z as d } from "./chunk-DSNLSHJZ-DPpiuUZK.js";
4
- import { a as f, d as p, m, r as h } from "./chunk-7S6XSTFO-DrDRohsE.js";
5
- import { n as g, t as _ } from "./chunk-YZO67HFG-WF3jklBn.js";
6
- import { n as v, r as y } from "./chunk-AQDTSKZB-DUZx386i.js";
7
- import { a as b, i as x, r as S, t as C } from "./chunk-UHW7PFBP-BTk1ZC8L.js";
8
- import { s as w } from "./chunk-J5ZVWO5B-DEP-pB-1.js";
9
- import { t as T } from "./rough.esm-D2JJJ0Ot.js";
10
- //#region ../node_modules/mermaid/dist/chunks/mermaid.core/chunk-HAGFOTED.mjs
11
- var E = 1, D = 3;
12
- async function O(t) {
3
+ import { B as r, M as i, b as a, f as o, g as s, k as c, w as l, y as u, z as d } from "./chunk-BG4553SI-j_gQs8M_.js";
4
+ import { a as f, d as p, m, r as h } from "./chunk-6MUBBAK2-DlUTxzYh.js";
5
+ import { i as g, n as _, r as v, t as y } from "./chunk-R3KSYZAL-DeNSy3X8.js";
6
+ import { n as b, r as x } from "./chunk-STOXU5M4-0WKKmqbF.js";
7
+ import { a as S, i as C, r as w, t as T } from "./chunk-X4PVCEUW-C80IBt-t.js";
8
+ import { s as E } from "./chunk-J5ZVWO5B-DEP-pB-1.js";
9
+ import { t as D } from "./rough.esm-D2JJJ0Ot.js";
10
+ //#region ../node_modules/mermaid/dist/chunks/mermaid.core/chunk-AXFCVDMN.mjs
11
+ var O = 1, k = 3;
12
+ async function A(t) {
13
13
  let n = t.getElementsByTagName("img");
14
14
  if (!n || n.length === 0) return;
15
- let r = !k(t);
15
+ let r = !j(t);
16
16
  await Promise.all([...n].map((t) => new Promise((n) => {
17
17
  function i() {
18
18
  if (t.style.display = "flex", t.style.flexDirection = "column", r) {
@@ -26,12 +26,12 @@ async function O(t) {
26
26
  }), t.addEventListener("error", i), t.addEventListener("load", i);
27
27
  })));
28
28
  }
29
- e(O, "configureLabelImages");
30
- function k(e) {
31
- return e.nodeType === D ? e.textContent?.trim() !== "" : e.nodeType !== E || e.tagName.toLowerCase() === "img" ? !1 : [...e.childNodes].some(k);
29
+ e(A, "configureLabelImages");
30
+ function j(e) {
31
+ return e.nodeType === k ? e.textContent?.trim() !== "" : e.nodeType !== O || e.tagName.toLowerCase() === "img" ? !1 : [...e.childNodes].some(j);
32
32
  }
33
- e(k, "hasTextBesidesImages");
34
- var A = 3, j = 32, M = /* @__PURE__ */ e(async (e, t, r) => {
33
+ e(j, "hasTextBesidesImages");
34
+ var M = 3, N = 32, P = /* @__PURE__ */ e(async (e, t, r) => {
35
35
  let i = a(), o = e.insert("g").attr("class", r ?? "node default").attr("id", t.domId || t.id), s = o.insert("g").attr("class", "label").attr("style", p(t.labelStyle)), c = [
36
36
  {
37
37
  text: typeof t.label == "string" ? t.label : t.label?.[0] ?? "",
@@ -45,8 +45,8 @@ var A = 3, j = 32, M = /* @__PURE__ */ e(async (e, t, r) => {
45
45
  text: e,
46
46
  cssClass: "c4-descr"
47
47
  }))
48
- ].filter((e) => e.text), l = t.width ? Math.max(t.width - 2 * (t.padding ?? 0), j) : a().flowchart?.wrappingWidth ?? 200, u = i.c4?.wrap ?? !0 ? l : Infinity, m = await Promise.all(c.map(async (e) => {
49
- let r = s.append("g").attr("class", e.cssClass), a = await v(r, d(f(e.text ?? ""), i), {
48
+ ].filter((e) => e.text), l = t.width ? Math.max(t.width - 2 * (t.padding ?? 0), N) : a().flowchart?.wrappingWidth ?? 200, u = i.c4?.wrap ?? !0 ? l : Infinity, m = await Promise.all(c.map(async (e) => {
49
+ let r = s.append("g").attr("class", e.cssClass), a = await b(r, d(f(e.text ?? ""), i), {
50
50
  useHtmlLabels: !1,
51
51
  markdown: !1,
52
52
  isNode: !0,
@@ -58,15 +58,15 @@ var A = 3, j = 32, M = /* @__PURE__ */ e(async (e, t, r) => {
58
58
  box: r.node().getBBox()
59
59
  };
60
60
  })), h = Math.max(...m.map(({ box: e }) => e.width), 0), g = 0;
61
- for (let { el: e, box: t } of m) e.attr("transform", `translate(${h / 2 - t.x - t.width / 2}, ${g - t.y})`), g += t.height + A;
62
- let _ = m.length > 0 ? g - A : 0;
61
+ for (let { el: e, box: t } of m) e.attr("transform", `translate(${h / 2 - t.x - t.width / 2}, ${g - t.y})`), g += t.height + M;
62
+ let _ = m.length > 0 ? g - M : 0;
63
63
  return s.insert("rect", ":first-child"), s.attr("transform", `translate(${-h / 2}, ${-_ / 2})`), {
64
64
  shapeSvg: o,
65
65
  bbox: s.node().getBBox(),
66
66
  halfPadding: (t.padding ?? 0) / 2,
67
67
  label: s
68
68
  };
69
- }, "c4LabelHelper"), N = /* @__PURE__ */ e((t, n) => {
69
+ }, "c4LabelHelper"), F = /* @__PURE__ */ e((t, n) => {
70
70
  let { x: r, y: i, width: a, height: o } = t;
71
71
  return a >= n ? t : "left" in t ? {
72
72
  x: r,
@@ -84,13 +84,13 @@ var A = 3, j = 32, M = /* @__PURE__ */ e(async (e, t, r) => {
84
84
  width: n,
85
85
  height: o
86
86
  };
87
- }, "withMinWidth"), P = /* @__PURE__ */ e(async (e, t, r, { ignoreMinWidth: i = !1 } = {}) => {
88
- if (t.stereotype !== void 0) return M(e, t, r);
87
+ }, "withMinWidth"), I = /* @__PURE__ */ e(async (e, t, r, { ignoreMinWidth: i = !1 } = {}) => {
88
+ if (t.stereotype !== void 0) return P(e, t, r);
89
89
  let o, c = t.useHtmlLabels || s(a()?.htmlLabels);
90
90
  o = r || "node default";
91
91
  let l = e.insert("g").attr("class", o).attr("id", t.domId || t.id), u = l.insert("g").attr("class", "label").attr("style", p(t.labelStyle)), m;
92
92
  m = t.label === void 0 ? "" : typeof t.label == "string" ? t.label : t.label[0];
93
- let h = !!t.icon || !!t.img, g = t.labelType === "markdown", _ = m && !t.width && !i ? t.minWidth ?? 0 : 0, b = await v(u, d(f(m), a()), {
93
+ let h = !!t.icon || !!t.img, g = t.labelType === "markdown", _ = m && !t.width && !i ? t.minWidth ?? 0 : 0, v = await b(u, d(f(m), a()), {
94
94
  useHtmlLabels: c,
95
95
  width: t.width || t.wrappingWidth || a().flowchart?.wrappingWidth,
96
96
  minWidth: _,
@@ -98,19 +98,19 @@ var A = 3, j = 32, M = /* @__PURE__ */ e(async (e, t, r) => {
98
98
  style: t.labelStyle,
99
99
  addSvgBackground: h,
100
100
  markdown: g
101
- }, a()), x = (t?.padding ?? 0) / 2, S;
101
+ }, a()), y = (t?.padding ?? 0) / 2, S;
102
102
  if (c) {
103
- let e = b.children[0], t = n(b);
104
- await O(e), S = await y.measure(() => e.getBoundingClientRect()), S = N(S, _), t.attr("width", S.width), t.attr("height", S.height);
105
- } else S = await y.measure(() => b.getBBox()), S = N(S, _);
103
+ let e = v.children[0], t = n(v);
104
+ await A(e), S = await x.measure(() => e.getBoundingClientRect()), S = F(S, _), t.attr("width", S.width), t.attr("height", S.height);
105
+ } else S = await x.measure(() => v.getBBox()), S = F(S, _);
106
106
  return c ? u.attr("transform", "translate(" + -S.width / 2 + ", " + -S.height / 2 + ")") : u.attr("transform", "translate(0, " + -S.height / 2 + ")"), t.centerLabel && u.attr("transform", "translate(" + -S.width / 2 + ", " + -S.height / 2 + ")"), u.insert("rect", ":first-child"), {
107
107
  shapeSvg: l,
108
108
  bbox: S,
109
- halfPadding: x,
109
+ halfPadding: y,
110
110
  label: u
111
111
  };
112
- }, "labelHelper"), F = /* @__PURE__ */ e(async (e, t, r) => {
113
- let i = r.useHtmlLabels ?? l(a()), o = e.insert("g").attr("class", "label").attr("style", r.labelStyle || ""), s = await v(o, d(f(t), a()), {
112
+ }, "labelHelper"), L = /* @__PURE__ */ e(async (e, t, r) => {
113
+ let i = r.useHtmlLabels ?? l(a()), o = e.insert("g").attr("class", "label").attr("style", r.labelStyle || ""), s = await b(o, d(f(t), a()), {
114
114
  useHtmlLabels: i,
115
115
  width: r.width || a()?.flowchart?.wrappingWidth,
116
116
  style: r.labelStyle,
@@ -118,28 +118,28 @@ var A = 3, j = 32, M = /* @__PURE__ */ e(async (e, t, r) => {
118
118
  }), c = r.padding / 2, u;
119
119
  if (l(a())) {
120
120
  let e = s.children[0], t = n(s);
121
- u = await y.measure(() => e.getBoundingClientRect()), t.attr("width", u.width), t.attr("height", u.height);
122
- } else u = await y.measure(() => s.getBBox());
121
+ u = await x.measure(() => e.getBoundingClientRect()), t.attr("width", u.width), t.attr("height", u.height);
122
+ } else u = await x.measure(() => s.getBBox());
123
123
  return i ? o.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")") : o.attr("transform", "translate(0, " + -u.height / 2 + ")"), r.centerLabel && o.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")"), o.insert("rect", ":first-child"), {
124
124
  shapeSvg: e,
125
125
  bbox: u,
126
126
  halfPadding: c,
127
127
  label: o
128
128
  };
129
- }, "insertLabel"), I = /* @__PURE__ */ e((e, t, n) => {
129
+ }, "insertLabel"), R = /* @__PURE__ */ e((e, t, n) => {
130
130
  if (n) {
131
131
  e.width = n.width, e.height = n.height;
132
132
  return;
133
133
  }
134
134
  let r = t.node().getBBox();
135
135
  e.width = r.width, e.height = r.height;
136
- }, "updateNodeBounds"), L = /* @__PURE__ */ e((e, t) => (e.look === "handDrawn" ? "rough-node" : "node") + " " + e.cssClasses + " " + (t || ""), "getNodeClasses");
137
- function R(e) {
136
+ }, "updateNodeBounds"), z = /* @__PURE__ */ e((e, t) => (e.look === "handDrawn" ? "rough-node" : "node") + " " + e.cssClasses + " " + (t || ""), "getNodeClasses");
137
+ function B(e) {
138
138
  let t = e.map((e, t) => `${t === 0 ? "M" : "L"}${e.x},${e.y}`);
139
139
  return t.push("Z"), t.join(" ");
140
140
  }
141
- e(R, "createPathFromPoints");
142
- function z(e, t, n, r, i, a) {
141
+ e(B, "createPathFromPoints");
142
+ function V(e, t, n, r, i, a) {
143
143
  let o = [], s = n - e, c = r - t, l = s / a, u = 2 * Math.PI / l, d = t + c / 2;
144
144
  for (let t = 0; t <= 50; t++) {
145
145
  let n = e + t / 50 * s, r = d + i * Math.sin(u * (n - e));
@@ -150,8 +150,8 @@ function z(e, t, n, r, i, a) {
150
150
  }
151
151
  return o;
152
152
  }
153
- e(z, "generateFullSineWavePoints");
154
- function B(e, t, n, r, i, a) {
153
+ e(V, "generateFullSineWavePoints");
154
+ function H(e, t, n, r, i, a) {
155
155
  let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
156
156
  for (let i = 0; i < r; i++) {
157
157
  let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
@@ -162,7 +162,7 @@ function B(e, t, n, r, i, a) {
162
162
  }
163
163
  return o;
164
164
  }
165
- e(B, "generateCirclePoints");
165
+ e(H, "generateCirclePoints");
166
166
  function ee(t) {
167
167
  let n = Array.from(t.childNodes).filter((e) => e.tagName === "path"), r = document.createElementNS("http://www.w3.org/2000/svg", "path"), i = n.map((e) => e.getAttribute("d")).filter((e) => e !== null).join(" ");
168
168
  r.setAttribute("d", i);
@@ -190,19 +190,19 @@ function ee(t) {
190
190
  return c.appendChild(r), c;
191
191
  }
192
192
  e(ee, "mergePaths");
193
- var V = /* @__PURE__ */ e((e, t) => {
193
+ var U = /* @__PURE__ */ e((e, t) => {
194
194
  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;
195
195
  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), {
196
196
  x: n + c,
197
197
  y: r + l
198
198
  };
199
199
  }, "intersectRect");
200
- function te(e, t) {
200
+ function W(e, t) {
201
201
  return e.intersect(t);
202
202
  }
203
- e(te, "intersectNode");
204
- var H = te;
205
- function U(e, t, n, r) {
203
+ e(W, "intersectNode");
204
+ var te = W;
205
+ function ne(e, t, n, r) {
206
206
  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);
207
207
  r.x < i && (l = -l);
208
208
  var u = Math.abs(t * n * s / c);
@@ -211,19 +211,19 @@ function U(e, t, n, r) {
211
211
  y: a + u
212
212
  };
213
213
  }
214
- e(U, "intersectEllipse");
215
- var ne = U;
216
- function re(e, t, n) {
217
- return ne(e, t, t, n);
214
+ e(ne, "intersectEllipse");
215
+ var re = ne;
216
+ function G(e, t, n) {
217
+ return re(e, t, t, n);
218
218
  }
219
- e(re, "intersectCircle");
220
- var ie = re;
221
- function W(e, t, n, r) {
219
+ e(G, "intersectCircle");
220
+ var K = G;
221
+ function ie(e, t, n, r) {
222
222
  {
223
223
  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;
224
- if (s !== 0 && c !== 0 && G(s, c)) return;
224
+ if (s !== 0 && c !== 0 && ae(s, c)) return;
225
225
  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;
226
- if (Math.abs(p) < l && Math.abs(m) < l && G(p, m)) return;
226
+ if (Math.abs(p) < l && Math.abs(m) < l && ae(p, m)) return;
227
227
  let h = i * d - u * a;
228
228
  return h === 0 ? void 0 : {
229
229
  x: (a * f - d * o) / h,
@@ -231,20 +231,20 @@ function W(e, t, n, r) {
231
231
  };
232
232
  }
233
233
  }
234
- e(W, "intersectLine");
235
- function G(e, t) {
234
+ e(ie, "intersectLine");
235
+ function ae(e, t) {
236
236
  return e * t > 0;
237
237
  }
238
- e(G, "sameSign");
239
- var ae = W;
240
- function oe(e, t, n) {
238
+ e(ae, "sameSign");
239
+ var oe = ie;
240
+ function se(e, t, n) {
241
241
  let r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
242
242
  typeof t.forEach == "function" ? t.forEach(function(e) {
243
243
  o = Math.min(o, e.x), s = Math.min(s, e.y);
244
244
  }) : (o = Math.min(o, t.x), s = Math.min(s, t.y));
245
245
  let c = r - e.width / 2 - o, l = i - e.height / 2 - s;
246
246
  for (let r = 0; r < t.length; r++) {
247
- let i = t[r], o = t[r < t.length - 1 ? r + 1 : 0], s = ae(e, n, {
247
+ let i = t[r], o = t[r < t.length - 1 ? r + 1 : 0], s = oe(e, n, {
248
248
  x: c + i.x,
249
249
  y: l + i.y
250
250
  }, {
@@ -258,14 +258,14 @@ function oe(e, t, n) {
258
258
  return a < c ? -1 : a === c ? 0 : 1;
259
259
  }), a[0]) : e;
260
260
  }
261
- e(oe, "intersectPolygon");
262
- var K = {
263
- node: H,
264
- circle: ie,
265
- ellipse: ne,
266
- polygon: oe,
267
- rect: V
268
- }, q = /* @__PURE__ */ e((e, t, n, r, i) => [
261
+ e(se, "intersectPolygon");
262
+ var q = {
263
+ node: te,
264
+ circle: K,
265
+ ellipse: re,
266
+ polygon: se,
267
+ rect: U
268
+ }, J = /* @__PURE__ */ e((e, t, n, r, i) => [
269
269
  "M",
270
270
  e + i,
271
271
  t,
@@ -310,11 +310,11 @@ var K = {
310
310
  e + i,
311
311
  t,
312
312
  "Z"
313
- ].join(" "), "createRoundedRectPathD"), se = /* @__PURE__ */ e(async (e, t, n, r = !1, i = !1) => {
313
+ ].join(" "), "createRoundedRectPathD"), ce = /* @__PURE__ */ e(async (e, t, n, r = !1, i = !1) => {
314
314
  let o = t || "";
315
315
  typeof o == "object" && (o = o[0]);
316
316
  let s = a(), c = l(s);
317
- return await v(e, o, {
317
+ return await b(e, o, {
318
318
  style: n,
319
319
  isTitle: r,
320
320
  useHtmlLabels: c,
@@ -323,24 +323,24 @@ var K = {
323
323
  width: Infinity
324
324
  }, s);
325
325
  }, "createLabel");
326
- function ce(e, n) {
327
- let { labelStyles: r } = x(n);
326
+ function le(e, n) {
327
+ let { labelStyles: r } = C(n);
328
328
  n.labelStyle = r;
329
- let i = L(n), a = i;
329
+ let i = z(n), a = i;
330
330
  i || (a = "anchor");
331
- let o = e.insert("g").attr("class", a).attr("id", n.domId || n.id), { cssStyles: s } = n, c = T.svg(o), l = b(n, {
331
+ let o = e.insert("g").attr("class", a).attr("id", n.domId || n.id), { cssStyles: s } = n, c = D.svg(o), l = S(n, {
332
332
  fill: "black",
333
333
  stroke: "none",
334
334
  fillStyle: "solid"
335
335
  });
336
336
  n.look !== "handDrawn" && (l.roughness = 0);
337
337
  let u = c.circle(0, 0, 2, l), d = o.insert(() => u, ":first-child");
338
- return d.attr("class", "anchor").attr("style", p(s)), I(n, d), n.intersect = function(e) {
339
- return t.info("Circle intersect", n, 1, e), K.circle(n, 1, e);
338
+ return d.attr("class", "anchor").attr("style", p(s)), R(n, d), n.intersect = function(e) {
339
+ return t.info("Circle intersect", n, 1, e), q.circle(n, 1, e);
340
340
  }, o;
341
341
  }
342
- e(ce, "anchor");
343
- function le(e, t, n, r, i, a, o) {
342
+ e(le, "anchor");
343
+ function ue(e, t, n, r, i, a, o) {
344
344
  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);
345
345
  if (m > 1) throw Error("The given radii are too small to create an arc between the points.");
346
346
  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;
@@ -355,19 +355,19 @@ function le(e, t, n, r, i, a, o) {
355
355
  }
356
356
  return b;
357
357
  }
358
- e(le, "generateArcPoints");
359
- function ue(e, t, n) {
358
+ e(ue, "generateArcPoints");
359
+ function de(e, t, n) {
360
360
  let [r, i] = [t, n].sort((e, t) => t - e);
361
361
  return i * (1 - Math.sqrt(1 - (e / r / 2) ** 2));
362
362
  }
363
- e(ue, "calculateArcSagitta");
364
- async function de(t, n) {
365
- let { labelStyles: r, nodeStyles: i } = x(n);
363
+ e(de, "calculateArcSagitta");
364
+ async function fe(t, n) {
365
+ let { labelStyles: r, nodeStyles: i } = C(n);
366
366
  n.labelStyle = r;
367
367
  let a = n.padding ?? 0, o = n.look === "neo" ? 16 : a, s = n.look === "neo" ? 12 : a, c = /* @__PURE__ */ e((e) => e + s, "calcTotalHeight"), l = /* @__PURE__ */ e((e) => {
368
368
  let t = e / 2;
369
369
  return [t / (2.5 + e / 50), t];
370
- }, "calcEllipseRadius"), { shapeSvg: u, bbox: d } = await P(t, n, L(n)), f = c(n?.height ? n?.height : d.height), [p, m] = l(f), h = ue(f, p, m), g = (n?.width ? n?.width : d.width) + o * 2 + h - h, _ = f, { cssStyles: v } = n, y = [
370
+ }, "calcEllipseRadius"), { shapeSvg: u, bbox: d } = await I(t, n, z(n)), f = c(n?.height ? n?.height : d.height), [p, m] = l(f), h = de(f, p, m), g = (n?.width ? n?.width : d.width) + o * 2 + h - h, _ = f, { cssStyles: v } = n, y = [
371
371
  {
372
372
  x: g / 2,
373
373
  y: -_ / 2
@@ -376,24 +376,24 @@ async function de(t, n) {
376
376
  x: -g / 2,
377
377
  y: -_ / 2
378
378
  },
379
- ...le(-g / 2, -_ / 2, -g / 2, _ / 2, p, m, !1),
379
+ ...ue(-g / 2, -_ / 2, -g / 2, _ / 2, p, m, !1),
380
380
  {
381
381
  x: g / 2,
382
382
  y: _ / 2
383
383
  },
384
- ...le(g / 2, _ / 2, g / 2, -_ / 2, p, m, !0)
385
- ], S = T.svg(u), C = b(n, {});
386
- n.look !== "handDrawn" && (C.roughness = 0, C.fillStyle = "solid");
387
- let w = R(y), E = S.path(w, C), D = u.insert(() => E, ":first-child");
388
- return D.attr("class", "basic label-container outer-path"), v && n.look !== "handDrawn" && D.selectAll("path").attr("style", v), i && n.look !== "handDrawn" && D.selectAll("path").attr("style", i), D.attr("transform", `translate(${p / 2}, 0)`), I(n, D), n.intersect = function(e) {
389
- return K.polygon(n, y, e);
384
+ ...ue(g / 2, _ / 2, g / 2, -_ / 2, p, m, !0)
385
+ ], b = D.svg(u), x = S(n, {});
386
+ n.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
387
+ let w = B(y), T = b.path(w, x), E = u.insert(() => T, ":first-child");
388
+ return E.attr("class", "basic label-container outer-path"), v && n.look !== "handDrawn" && E.selectAll("path").attr("style", v), i && n.look !== "handDrawn" && E.selectAll("path").attr("style", i), E.attr("transform", `translate(${p / 2}, 0)`), R(n, E), n.intersect = function(e) {
389
+ return q.polygon(n, y, e);
390
390
  }, u;
391
391
  }
392
- e(de, "bowTieRect");
393
- async function fe(t, n, { config: { themeVariables: r } }) {
394
- let { labelStyles: i, nodeStyles: a } = x(n);
392
+ e(fe, "bowTieRect");
393
+ async function pe(t, n, { config: { themeVariables: r } }) {
394
+ let { labelStyles: i, nodeStyles: a } = C(n);
395
395
  n.labelStyle = i;
396
- let { shapeSvg: o, bbox: s, label: c } = await P(t, n, L(n)), l = r?.nodeBorder ?? r?.lineColor ?? "currentColor", u = n.padding ?? 12, d = Math.max(s.width + u * 2, n.width ?? 0, 80), f = Math.max(Math.min(d * .08, 12), 5), p = Math.max(s.height + u * 2 + f, n.height ?? 0), m = -p / 2 + f, h = p / 2, g = d * .72, _ = [
396
+ let { shapeSvg: o, bbox: s, label: c } = await I(t, n, z(n)), l = r?.nodeBorder ?? r?.lineColor ?? "currentColor", u = n.padding ?? 12, d = Math.max(s.width + u * 2, n.width ?? 0, 80), f = Math.max(Math.min(d * .08, 12), 5), p = Math.max(s.height + u * 2 + f, n.height ?? 0), m = -p / 2 + f, h = p / 2, g = d * .72, _ = [
397
397
  `M${-d / 2},${m}`,
398
398
  `L${-g / 2},${h}`,
399
399
  `A${g / 2},${f} 0 0 0 ${g / 2},${h}`,
@@ -402,26 +402,26 @@ async function fe(t, n, { config: { themeVariables: r } }) {
402
402
  "Z"
403
403
  ].join(" "), { cssStyles: v } = n, y = o.insert("g", ":first-child").attr("class", "basic label-container");
404
404
  if (n.look === "handDrawn") {
405
- let e = T.svg(o).path(_, b(n, {}));
405
+ let e = D.svg(o).path(_, S(n, {}));
406
406
  y.node()?.appendChild(e), v && y.attr("style", v);
407
407
  } else y.append("path").attr("d", _).attr("style", a);
408
- y.append("ellipse").attr("cx", 0).attr("cy", m).attr("rx", d / 2).attr("ry", f).attr("style", `fill:none;stroke:${l};stroke-width:1px`), I(n, y);
409
- let S = m + (h - m) / 2;
410
- c.attr("transform", `translate(${-(s.width / 2) - (s.x - (s.left ?? 0))}, ${S - s.height / 2 - (s.y - (s.top ?? 0))})`);
411
- let C = /* @__PURE__ */ e((e, t, n) => Array.from({ length: 13 }, (r, i) => {
408
+ y.append("ellipse").attr("cx", 0).attr("cy", m).attr("rx", d / 2).attr("ry", f).attr("style", `fill:none;stroke:${l};stroke-width:1px`), R(n, y);
409
+ let b = m + (h - m) / 2;
410
+ c.attr("transform", `translate(${-(s.width / 2) - (s.x - (s.left ?? 0))}, ${b - s.height / 2 - (s.y - (s.top ?? 0))})`);
411
+ let x = /* @__PURE__ */ e((e, t, n) => Array.from({ length: 13 }, (r, i) => {
412
412
  let a = Math.PI - i * Math.PI / 12;
413
413
  return {
414
414
  x: e * Math.cos(a),
415
415
  y: t + n * f * Math.sin(a)
416
416
  };
417
- }), "arc"), w = [...C(d / 2, m, -1), ...C(g / 2, h, 1).reverse()];
417
+ }), "arc"), w = [...x(d / 2, m, -1), ...x(g / 2, h, 1).reverse()];
418
418
  return n.intersect = function(e) {
419
- return K.polygon(n, w, e);
419
+ return q.polygon(n, w, e);
420
420
  }, o;
421
421
  }
422
- e(fe, "bucket");
423
- var pe = 20, me = 8, he = 80, ge = 8;
424
- function _e(e) {
422
+ e(pe, "bucket");
423
+ var me = 20, he = 8, ge = 80, _e = 8;
424
+ function ve(e) {
425
425
  let { themeVariables: t } = a(), n = t.clusterBkg, r = t.clusterBorder;
426
426
  switch (e) {
427
427
  case "flow": return {
@@ -432,52 +432,52 @@ function _e(e) {
432
432
  cssClass: "flow-collapsed"
433
433
  };
434
434
  default: return {
435
- rx: ge,
435
+ rx: _e,
436
436
  fill: n,
437
437
  stroke: r,
438
438
  cssClass: "collapsed-group"
439
439
  };
440
440
  }
441
441
  }
442
- e(_e, "getCollapsedStyle");
443
- async function ve(e, t) {
444
- let n = _e(t.metadata?.containerType), { fill: r, stroke: i } = n, { nodeStyles: o } = x(t), { shapeSvg: s, bbox: c } = await P(e, t, L(t)), { theme: u, themeVariables: d } = a();
445
- w(s, t.colorIndex, u, d.borderColorArray);
446
- let f = t.padding ?? 8, m = c.height, h = Math.max(c.width + f * 2, he, t?.width ?? 0), g = Math.max(m + me + pe + f * 2, t?.height ?? 0), _ = -h / 2, v = -g / 2, y = -(me + pe) / 2, S = s.select(".label");
447
- S && (t.useHtmlLabels ?? l(a()) ? S.attr("transform", `translate(${-c.width / 2}, ${-c.height / 2 + y})`) : S.attr("transform", `translate(0, ${-c.height / 2 + y})`));
448
- let C;
442
+ e(ve, "getCollapsedStyle");
443
+ async function ye(e, t) {
444
+ let n = ve(t.metadata?.containerType), { fill: r, stroke: i } = n, { nodeStyles: o } = C(t), { shapeSvg: s, bbox: c } = await I(e, t, z(t)), { theme: u, themeVariables: d } = a();
445
+ E(s, t.colorIndex, u, d.borderColorArray);
446
+ let f = t.padding ?? 8, m = c.height, h = Math.max(c.width + f * 2, ge, t?.width ?? 0), g = Math.max(m + he + me + f * 2, t?.height ?? 0), _ = -h / 2, v = -g / 2, y = -(he + me) / 2, b = s.select(".label");
447
+ b && (t.useHtmlLabels ?? l(a()) ? b.attr("transform", `translate(${-c.width / 2}, ${-c.height / 2 + y})`) : b.attr("transform", `translate(0, ${-c.height / 2 + y})`));
448
+ let x;
449
449
  if (t.look === "handDrawn") {
450
- let e = T.svg(s), a = b(t, {
450
+ let e = D.svg(s), a = S(t, {
451
451
  fill: r,
452
452
  stroke: i,
453
453
  ...n.strokeWidth === void 0 ? {} : { strokeWidth: n.strokeWidth },
454
454
  ...r === "none" ? { fillWeight: 0 } : { fillStyle: "solid" }
455
- }), o = e.path(q(_, v, h, g, n.rx), a);
456
- C = s.insert(() => o, ":first-child"), C.attr("class", "basic label-container " + n.cssClass).attr("style", p(t.cssStyles));
457
- } else C = s.insert("rect", ":first-child"), C.attr("class", "basic label-container " + n.cssClass).attr("style", o).attr("rx", n.rx).attr("ry", n.rx).attr("x", _).attr("y", v).attr("width", h).attr("height", g).attr("fill", r).attr("stroke", i), n.strokeWidth !== void 0 && C.attr("stroke-width", n.strokeWidth + "px");
458
- let E = v + f + m + me;
459
- s.append("line").attr("class", "collapsed-separator").attr("x1", _ + 8).attr("y1", E).attr("x2", _ + h - 8).attr("y2", E).attr("stroke", i).attr("stroke-dasharray", "3, 3");
460
- let D = E + pe / 2;
461
- for (let e = -1; e <= 1; e++) s.append("circle").attr("class", "collapsed-indicator").attr("cx", e * 10).attr("cy", D).attr("r", 2.5).attr("fill", i);
462
- return I(t, C), t.calcIntersect = function(e, t) {
463
- return K.rect(e, t);
455
+ }), o = e.path(J(_, v, h, g, n.rx), a);
456
+ x = s.insert(() => o, ":first-child"), x.attr("class", "basic label-container " + n.cssClass).attr("style", p(t.cssStyles));
457
+ } else x = s.insert("rect", ":first-child"), x.attr("class", "basic label-container " + n.cssClass).attr("style", o).attr("rx", n.rx).attr("ry", n.rx).attr("x", _).attr("y", v).attr("width", h).attr("height", g).attr("fill", r).attr("stroke", i), n.strokeWidth !== void 0 && x.attr("stroke-width", n.strokeWidth + "px");
458
+ let w = v + f + m + he;
459
+ s.append("line").attr("class", "collapsed-separator").attr("x1", _ + 8).attr("y1", w).attr("x2", _ + h - 8).attr("y2", w).attr("stroke", i).attr("stroke-dasharray", "3, 3");
460
+ let T = w + me / 2;
461
+ for (let e = -1; e <= 1; e++) s.append("circle").attr("class", "collapsed-indicator").attr("cx", e * 10).attr("cy", T).attr("r", 2.5).attr("fill", i);
462
+ return R(t, x), t.calcIntersect = function(e, t) {
463
+ return q.rect(e, t);
464
464
  }, t.intersect = function(e) {
465
- return K.rect(t, e);
465
+ return q.rect(t, e);
466
466
  }, s;
467
467
  }
468
- e(ve, "collapsedGroup");
469
- function J(e, t, n, r) {
468
+ e(ye, "collapsedGroup");
469
+ function Y(e, t, n, r) {
470
470
  return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
471
471
  return e.x + "," + e.y;
472
472
  }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
473
473
  }
474
- e(J, "insertPolygonShape");
475
- var ye = [
474
+ e(Y, "insertPolygonShape");
475
+ var be = [
476
476
  "right",
477
477
  "left",
478
478
  "up",
479
479
  "down"
480
- ], be = "point", xe = /* @__PURE__ */ e((e) => {
480
+ ], xe = "point", Se = /* @__PURE__ */ e((e) => {
481
481
  let t = /* @__PURE__ */ new Set();
482
482
  for (let n of e) switch (n) {
483
483
  case "x":
@@ -489,7 +489,7 @@ var ye = [
489
489
  default: t.add(n);
490
490
  }
491
491
  return t;
492
- }, "expandAndDeduplicateDirections"), Se = /* @__PURE__ */ e((e) => ye.filter((t) => e.has(t)).join("|") || be, "getDirectionKey"), Ce = {
492
+ }, "expandAndDeduplicateDirections"), Ce = /* @__PURE__ */ e((e) => be.filter((t) => e.has(t)).join("|") || xe, "getDirectionKey"), we = {
493
493
  "right|left|up|down": /* @__PURE__ */ e(({ height: e, midpoint: t, padding: n, width: r }) => [
494
494
  {
495
495
  x: 0,
@@ -904,50 +904,50 @@ var ye = [
904
904
  y: -n
905
905
  }
906
906
  ], "down"),
907
- [be]: () => [{
907
+ [xe]: () => [{
908
908
  x: 0,
909
909
  y: 0
910
910
  }]
911
- }, we = /* @__PURE__ */ e((e, t, n, r) => {
912
- let i = xe(e), a = (n.padding ?? 0) / 2, o = t.height + 4 * a, s = o / 2, c = r ?? t.width + 2 * s + 2 * a;
913
- return (Ce[Se(i)] ?? Ce[be])({
911
+ }, Te = /* @__PURE__ */ e((e, t, n, r) => {
912
+ let i = Se(e), a = (n.padding ?? 0) / 2, o = t.height + 4 * a, s = o / 2, c = r ?? t.width + 2 * s + 2 * a;
913
+ return (we[Ce(i)] ?? we[xe])({
914
914
  height: o,
915
915
  midpoint: s,
916
916
  padding: a,
917
917
  width: c
918
918
  });
919
919
  }, "getArrowPoints");
920
- async function Te(e, t) {
921
- let n = t, { shapeSvg: r, bbox: i } = await P(e, n, L(n)), a = n.padding ?? 0, o = i.height + 2 * a, s = o / 2, c = i.width + 2 * s + a, l = n.width ?? 0, u = n.positioned && (n.widthInColumns ?? 1) > 1 && l > c ? l : c, d = we(n.directions ?? [], i, n, u), f = J(r, u, o, d);
922
- return f.attr("style", n.style ?? null), I(n, f), n.intersect = function(e) {
923
- return K.polygon(n, d, e);
920
+ async function Ee(e, t) {
921
+ let n = t, { shapeSvg: r, bbox: i } = await I(e, n, z(n)), a = n.padding ?? 0, o = i.height + 2 * a, s = o / 2, c = i.width + 2 * s + a, l = n.width ?? 0, u = n.positioned && (n.widthInColumns ?? 1) > 1 && l > c ? l : c, d = Te(n.directions ?? [], i, n, u), f = Y(r, u, o, d);
922
+ return f.attr("style", n.style ?? null), R(n, f), n.intersect = function(e) {
923
+ return q.polygon(n, d, e);
924
924
  }, r;
925
925
  }
926
- e(Te, "block_arrow");
927
- async function Ee(e, t, { config: { themeVariables: n } }) {
928
- let { labelStyles: r, nodeStyles: i } = x(t);
926
+ e(Ee, "block_arrow");
927
+ async function De(e, t, { config: { themeVariables: n } }) {
928
+ let { labelStyles: r, nodeStyles: i } = C(t);
929
929
  t.labelStyle = r;
930
- let { shapeSvg: a, bbox: o, label: s } = await P(e, t, L(t)), c = n?.nodeBorder ?? n?.lineColor ?? "currentColor", l = t.padding ?? 12, u = Math.max(o.width + l * 2, t.width ?? 0, 90), d = Math.max(o.height + l * 2 + 18, t.height ?? 0), f = -d / 2, { cssStyles: p } = t, m = a.insert("g", ":first-child").attr("class", "basic label-container");
930
+ let { shapeSvg: a, bbox: o, label: s } = await I(e, t, z(t)), c = n?.nodeBorder ?? n?.lineColor ?? "currentColor", l = t.padding ?? 12, u = Math.max(o.width + l * 2, t.width ?? 0, 90), d = Math.max(o.height + l * 2 + 18, t.height ?? 0), f = -d / 2, { cssStyles: p } = t, m = a.insert("g", ":first-child").attr("class", "basic label-container");
931
931
  if (t.look === "handDrawn") {
932
- let e = T.svg(a).path(q(-u / 2, f, u, d, 12), b(t, {}));
932
+ let e = D.svg(a).path(J(-u / 2, f, u, d, 12), S(t, {}));
933
933
  m.node()?.appendChild(e), p && m.attr("style", p);
934
934
  } else m.append("rect").attr("x", -u / 2).attr("y", f).attr("width", u).attr("height", d).attr("rx", 12).attr("ry", 12).attr("style", i);
935
935
  m.append("line").attr("x1", -u / 2).attr("y1", f + 18).attr("x2", u / 2).attr("y2", f + 18).attr("style", `stroke:${c};stroke-width:1px`);
936
936
  for (let e = 0; e < 3; e++) m.append("circle").attr("cx", -u / 2 + 12 + e * 9).attr("cy", f + 9).attr("r", 2.5).attr("style", `fill:${c};stroke:none`);
937
- m.append("rect").attr("class", "browser-address-bar").attr("x", -u / 2 + 44).attr("y", f + 4).attr("width", Math.max(u - 56, 10)).attr("height", 10).attr("rx", 3).attr("ry", 3).attr("style", `fill:none;stroke:${c};stroke-width:1px;opacity:0.6`), I(t, m);
937
+ m.append("rect").attr("class", "browser-address-bar").attr("x", -u / 2 + 44).attr("y", f + 4).attr("width", Math.max(u - 56, 10)).attr("height", 10).attr("rx", 3).attr("ry", 3).attr("style", `fill:none;stroke:${c};stroke-width:1px;opacity:0.6`), R(t, m);
938
938
  let h = f + 18 + (d - 18) / 2;
939
939
  return s.attr("transform", `translate(${-(o.width / 2) - (o.x - (o.left ?? 0))}, ${h - o.height / 2 - (o.y - (o.top ?? 0))})`), t.intersect = function(e) {
940
- return K.rect(t, e);
940
+ return q.rect(t, e);
941
941
  }, a;
942
942
  }
943
- e(Ee, "browser");
944
- var De = 12;
945
- async function Oe(e, t) {
946
- let { labelStyles: n, nodeStyles: r } = x(t);
943
+ e(De, "browser");
944
+ var Oe = 12;
945
+ async function ke(e, t) {
946
+ let { labelStyles: n, nodeStyles: r } = C(t);
947
947
  t.labelStyle = n;
948
- let i = t.padding ?? 0, a = t.look === "neo" ? 28 : i, o = t.look === "neo" ? 24 : i, { shapeSvg: s, bbox: c } = await P(e, t, L(t)), l = (t?.width ?? c.width) + (t.look === "neo" ? a * 2 : a + De), u = (t?.height ?? c.height) + (t.look === "neo" ? o * 2 : o), d = l, f = -u, p = [
948
+ let i = t.padding ?? 0, a = t.look === "neo" ? 28 : i, o = t.look === "neo" ? 24 : i, { shapeSvg: s, bbox: c } = await I(e, t, z(t)), l = (t?.width ?? c.width) + (t.look === "neo" ? a * 2 : a + Oe), u = (t?.height ?? c.height) + (t.look === "neo" ? o * 2 : o), d = l, f = -u, p = [
949
949
  {
950
- x: 0 + De,
950
+ x: 0 + Oe,
951
951
  y: f
952
952
  },
953
953
  {
@@ -964,26 +964,26 @@ async function Oe(e, t) {
964
964
  },
965
965
  {
966
966
  x: 0,
967
- y: f + De
967
+ y: f + Oe
968
968
  },
969
969
  {
970
- x: 0 + De,
970
+ x: 0 + Oe,
971
971
  y: f
972
972
  }
973
973
  ], m, { cssStyles: h } = t;
974
974
  if (t.look === "handDrawn") {
975
- let e = T.svg(s), n = b(t, {}), r = R(p), i = e.path(r, n);
975
+ let e = D.svg(s), n = S(t, {}), r = B(p), i = e.path(r, n);
976
976
  m = s.insert(() => i, ":first-child").attr("transform", `translate(${-l / 2}, ${u / 2})`), h && m.attr("style", h);
977
- } else m = J(s, l, u, p);
978
- return r && m.attr("style", r), I(t, m), t.intersect = function(e) {
979
- return K.polygon(t, p, e);
977
+ } else m = Y(s, l, u, p);
978
+ return r && m.attr("style", r), R(t, m), t.intersect = function(e) {
979
+ return q.polygon(t, p, e);
980
980
  }, s;
981
981
  }
982
- e(Oe, "card");
983
- function ke(e, t) {
984
- let { nodeStyles: n } = x(t);
982
+ e(ke, "card");
983
+ function Ae(e, t) {
984
+ let { nodeStyles: n } = C(t);
985
985
  t.label = "";
986
- let r = e.insert("g").attr("class", L(t)).attr("id", t.domId ?? t.id), { cssStyles: i } = t, a = Math.max(28, t.width ?? 0), o = [
986
+ let r = e.insert("g").attr("class", z(t)).attr("id", t.domId ?? t.id), { cssStyles: i } = t, a = Math.max(28, t.width ?? 0), o = [
987
987
  {
988
988
  x: 0,
989
989
  y: a / 2
@@ -1000,57 +1000,57 @@ function ke(e, t) {
1000
1000
  x: -a / 2,
1001
1001
  y: 0
1002
1002
  }
1003
- ], s = T.svg(r), c = b(t, {});
1003
+ ], s = D.svg(r), c = S(t, {});
1004
1004
  t.look !== "handDrawn" && (c.roughness = 0, c.fillStyle = "solid");
1005
- let l = R(o), u = s.path(l, c), d = r.insert(() => u, ":first-child");
1005
+ let l = B(o), u = s.path(l, c), d = r.insert(() => u, ":first-child");
1006
1006
  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) {
1007
- return K.polygon(t, o, e);
1007
+ return q.polygon(t, o, e);
1008
1008
  }, r;
1009
1009
  }
1010
- e(ke, "choice");
1011
- async function Ae(e, n, r) {
1012
- let { labelStyles: i, nodeStyles: a } = x(n);
1010
+ e(Ae, "choice");
1011
+ async function je(e, n, r) {
1012
+ let { labelStyles: i, nodeStyles: a } = C(n);
1013
1013
  n.labelStyle = i;
1014
- let { shapeSvg: o, bbox: s, halfPadding: c } = await P(e, n, L(n), { ignoreMinWidth: !0 }), l = r?.padding ?? c, u = Math.sqrt(s.width ** 2 + s.height ** 2) / 2, d = n.look === "neo" ? u + 16 : u + l, f, { cssStyles: m } = n;
1014
+ let { shapeSvg: o, bbox: s, halfPadding: c } = await I(e, n, z(n), { ignoreMinWidth: !0 }), l = r?.padding ?? c, u = Math.sqrt(s.width ** 2 + s.height ** 2) / 2, d = n.look === "neo" ? u + 16 : u + l, f, { cssStyles: m } = n;
1015
1015
  if (n.look === "handDrawn") {
1016
- let e = T.svg(o), t = b(n, {}), r = e.circle(0, 0, d * 2, t);
1016
+ let e = D.svg(o), t = S(n, {}), r = e.circle(0, 0, d * 2, t);
1017
1017
  f = o.insert(() => r, ":first-child"), f.attr("class", "basic label-container").attr("style", p(m));
1018
1018
  } else f = o.insert("circle", ":first-child").attr("class", "basic label-container").attr("style", a).attr("r", d).attr("cx", 0).attr("cy", 0);
1019
- return I(n, f), n.calcIntersect = function(e, t) {
1019
+ return R(n, f), n.calcIntersect = function(e, t) {
1020
1020
  let n = e.width / 2;
1021
- return K.circle(e, n, t);
1021
+ return q.circle(e, n, t);
1022
1022
  }, n.intersect = function(e) {
1023
- return t.info("Circle intersect", n, d, e), K.circle(n, d, e);
1023
+ return t.info("Circle intersect", n, d, e), q.circle(n, d, e);
1024
1024
  }, o;
1025
1025
  }
1026
- e(Ae, "circle");
1027
- async function je(e, t) {
1028
- let n = t, { shapeSvg: r, bbox: i, halfPadding: a } = await P(e, n, [
1026
+ e(je, "circle");
1027
+ async function Me(e, t) {
1028
+ let n = t, { shapeSvg: r, bbox: i, halfPadding: a } = await I(e, n, [
1029
1029
  "node",
1030
1030
  n.cssClasses,
1031
1031
  n.class
1032
1032
  ].filter(Boolean).join(" ")), o = r.insert("rect", ":first-child"), s = n.padding ?? 0, c = n.positioned ? n.width ?? 0 : i.width + s, l = n.positioned ? n.height ?? 0 : i.height + s, u = n.positioned ? -c / 2 : -i.width / 2 - a, d = n.positioned ? -l / 2 : -i.height / 2 - a;
1033
- return o.attr("class", "basic cluster composite label-container").attr("style", n.style ?? null).attr("rx", n.rx ?? null).attr("ry", n.ry ?? null).attr("x", u).attr("y", d).attr("width", c).attr("height", l), I(n, o), n.intersect = function(e) {
1034
- return K.rect(n, e);
1033
+ return o.attr("class", "basic cluster composite label-container").attr("style", n.style ?? null).attr("rx", n.rx ?? null).attr("ry", n.ry ?? null).attr("x", u).attr("y", d).attr("width", c).attr("height", l), R(n, o), n.intersect = function(e) {
1034
+ return q.rect(n, e);
1035
1035
  }, r;
1036
1036
  }
1037
- e(je, "composite");
1038
- async function Me(e, t, { config: { themeVariables: n } }) {
1039
- let { labelStyles: r, nodeStyles: i } = x(t);
1037
+ e(Me, "composite");
1038
+ async function Ne(e, t, { config: { themeVariables: n } }) {
1039
+ let { labelStyles: r, nodeStyles: i } = C(t);
1040
1040
  t.labelStyle = r;
1041
- let { shapeSvg: a, bbox: o, label: s } = await P(e, t, L(t)), c = n?.nodeBorder ?? n?.lineColor ?? "currentColor", l = t.padding ?? 12, u = Math.max(o.width + l * 2, t.width ?? 0, 90), d = Math.max(o.height + l * 2 + 20, t.height ?? 0), f = -d / 2, { cssStyles: p } = t, m = a.insert("g", ":first-child").attr("class", "basic label-container");
1041
+ let { shapeSvg: a, bbox: o, label: s } = await I(e, t, z(t)), c = n?.nodeBorder ?? n?.lineColor ?? "currentColor", l = t.padding ?? 12, u = Math.max(o.width + l * 2, t.width ?? 0, 90), d = Math.max(o.height + l * 2 + 20, t.height ?? 0), f = -d / 2, { cssStyles: p } = t, m = a.insert("g", ":first-child").attr("class", "basic label-container");
1042
1042
  if (t.look === "handDrawn") {
1043
- let e = T.svg(a).path(q(-u / 2, f, u, d, 12), b(t, {}));
1043
+ let e = D.svg(a).path(J(-u / 2, f, u, d, 12), S(t, {}));
1044
1044
  m.node()?.appendChild(e), p && m.attr("style", p);
1045
1045
  } else m.append("rect").attr("x", -u / 2).attr("y", f).attr("width", u).attr("height", d).attr("rx", 12).attr("ry", 12).attr("style", i);
1046
- m.append("text").attr("x", -u / 2 + 12).attr("y", f + 16).attr("class", "console-glyph").attr("style", `font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(">_"), I(t, m);
1046
+ m.append("text").attr("x", -u / 2 + 12).attr("y", f + 16).attr("class", "console-glyph").attr("style", `font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(">_"), R(t, m);
1047
1047
  let h = f + 20 + (d - 20) / 2;
1048
1048
  return s.attr("transform", `translate(${-(o.width / 2) - (o.x - (o.left ?? 0))}, ${h - o.height / 2 - (o.y - (o.top ?? 0))})`), t.intersect = function(e) {
1049
- return K.rect(t, e);
1049
+ return q.rect(t, e);
1050
1050
  }, a;
1051
1051
  }
1052
- e(Me, "consoleWindow");
1053
- function Ne(e) {
1052
+ e(Ne, "consoleWindow");
1053
+ function Pe(e) {
1054
1054
  let t = Math.cos(Math.PI / 4), n = Math.sin(Math.PI / 4), r = e * 2, i = {
1055
1055
  x: r / 2 * t,
1056
1056
  y: r / 2 * n
@@ -1067,22 +1067,22 @@ function Ne(e) {
1067
1067
  return `M ${a.x},${a.y} L ${s.x},${s.y}
1068
1068
  M ${i.x},${i.y} L ${o.x},${o.y}`;
1069
1069
  }
1070
- e(Ne, "createLine");
1071
- function Pe(e, n) {
1072
- let { labelStyles: r, nodeStyles: i } = x(n);
1070
+ e(Pe, "createLine");
1071
+ function Fe(e, n) {
1072
+ let { labelStyles: r, nodeStyles: i } = C(n);
1073
1073
  n.labelStyle = r, n.label = "";
1074
- let a = e.insert("g").attr("class", L(n)).attr("id", n.domId ?? n.id), o = Math.max(30, n?.width ?? 0), { cssStyles: s } = n, c = T.svg(a), l = b(n, {});
1074
+ let a = e.insert("g").attr("class", z(n)).attr("id", n.domId ?? n.id), o = Math.max(30, n?.width ?? 0), { cssStyles: s } = n, c = D.svg(a), l = S(n, {});
1075
1075
  n.look !== "handDrawn" && (l.roughness = 0, l.fillStyle = "solid");
1076
- let u = c.circle(0, 0, o * 2, l), d = Ne(o), f = c.path(d, l), p = a.insert(() => u, ":first-child");
1077
- 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), I(n, p), n.intersect = function(e) {
1076
+ let u = c.circle(0, 0, o * 2, l), d = Pe(o), f = c.path(d, l), p = a.insert(() => u, ":first-child");
1077
+ 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), R(n, p), n.intersect = function(e) {
1078
1078
  return t.info("crossedCircle intersect", n, {
1079
1079
  radius: o,
1080
1080
  point: e
1081
- }), K.circle(n, o, e);
1081
+ }), q.circle(n, o, e);
1082
1082
  }, a;
1083
1083
  }
1084
- e(Pe, "crossedCircle");
1085
- function Y(e, t, n, r = 100, i = 0, a = 180) {
1084
+ e(Fe, "crossedCircle");
1085
+ function Ie(e, t, n, r = 100, i = 0, a = 180) {
1086
1086
  let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
1087
1087
  for (let i = 0; i < r; i++) {
1088
1088
  let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
@@ -1093,23 +1093,23 @@ function Y(e, t, n, r = 100, i = 0, a = 180) {
1093
1093
  }
1094
1094
  return o;
1095
1095
  }
1096
- e(Y, "generateCirclePoints");
1097
- async function Fe(e, t) {
1098
- let { labelStyles: n, nodeStyles: r } = x(t);
1096
+ e(Ie, "generateCirclePoints");
1097
+ async function Le(e, t) {
1098
+ let { labelStyles: n, nodeStyles: r } = C(t);
1099
1099
  t.labelStyle = n;
1100
- let { shapeSvg: i, bbox: a, label: o } = await P(e, t, L(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 = [
1101
- ...Y(l / 2, -u / 2, d, 30, -90, 0),
1100
+ let { shapeSvg: i, bbox: a, label: o } = await I(e, t, z(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 = [
1101
+ ...Ie(l / 2, -u / 2, d, 30, -90, 0),
1102
1102
  {
1103
1103
  x: -l / 2 - d,
1104
1104
  y: d
1105
1105
  },
1106
- ...Y(l / 2 + d * 2, -d, d, 20, -180, -270),
1107
- ...Y(l / 2 + d * 2, d, d, 20, -90, -180),
1106
+ ...Ie(l / 2 + d * 2, -d, d, 20, -180, -270),
1107
+ ...Ie(l / 2 + d * 2, d, d, 20, -90, -180),
1108
1108
  {
1109
1109
  x: -l / 2 - d,
1110
1110
  y: -u / 2
1111
1111
  },
1112
- ...Y(l / 2, u / 2, d, 20, 0, 90)
1112
+ ...Ie(l / 2, u / 2, d, 20, 0, 90)
1113
1113
  ], m = [
1114
1114
  {
1115
1115
  x: l / 2,
@@ -1119,18 +1119,18 @@ async function Fe(e, t) {
1119
1119
  x: -l / 2,
1120
1120
  y: -u / 2 - d
1121
1121
  },
1122
- ...Y(l / 2, -u / 2, d, 20, -90, 0),
1122
+ ...Ie(l / 2, -u / 2, d, 20, -90, 0),
1123
1123
  {
1124
1124
  x: -l / 2 - d,
1125
1125
  y: -d
1126
1126
  },
1127
- ...Y(l / 2 + l * .1, -d, d, 20, -180, -270),
1128
- ...Y(l / 2 + l * .1, d, d, 20, -90, -180),
1127
+ ...Ie(l / 2 + l * .1, -d, d, 20, -180, -270),
1128
+ ...Ie(l / 2 + l * .1, d, d, 20, -90, -180),
1129
1129
  {
1130
1130
  x: -l / 2 - d,
1131
1131
  y: u / 2
1132
1132
  },
1133
- ...Y(l / 2, u / 2, d, 20, 0, 90),
1133
+ ...Ie(l / 2, u / 2, d, 20, 0, 90),
1134
1134
  {
1135
1135
  x: -l / 2,
1136
1136
  y: u / 2 + d
@@ -1139,15 +1139,15 @@ async function Fe(e, t) {
1139
1139
  x: l / 2,
1140
1140
  y: u / 2 + d
1141
1141
  }
1142
- ], h = T.svg(i), g = b(t, { fill: "none" });
1142
+ ], h = D.svg(i), g = S(t, { fill: "none" });
1143
1143
  t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
1144
- let _ = R(p).replace("Z", ""), v = h.path(_, g), y = R(m), S = h.path(y, { ...g }), C = i.insert("g", ":first-child");
1145
- 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))})`), I(t, C), t.intersect = function(e) {
1146
- return K.polygon(t, m, e);
1144
+ let _ = B(p).replace("Z", ""), v = h.path(_, g), y = B(m), b = h.path(y, { ...g }), x = i.insert("g", ":first-child");
1145
+ return x.insert(() => b, ":first-child").attr("stroke-opacity", 0), x.insert(() => v, ":first-child"), x.attr("class", "text"), f && t.look !== "handDrawn" && x.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), x.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))})`), R(t, x), t.intersect = function(e) {
1146
+ return q.polygon(t, m, e);
1147
1147
  }, i;
1148
1148
  }
1149
- e(Fe, "curlyBraceLeft");
1150
- function X(e, t, n, r = 100, i = 0, a = 180) {
1149
+ e(Le, "curlyBraceLeft");
1150
+ function Re(e, t, n, r = 100, i = 0, a = 180) {
1151
1151
  let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
1152
1152
  for (let i = 0; i < r; i++) {
1153
1153
  let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
@@ -1158,23 +1158,23 @@ function X(e, t, n, r = 100, i = 0, a = 180) {
1158
1158
  }
1159
1159
  return o;
1160
1160
  }
1161
- e(X, "generateCirclePoints");
1162
- async function Ie(e, t) {
1163
- let { labelStyles: n, nodeStyles: r } = x(t);
1161
+ e(Re, "generateCirclePoints");
1162
+ async function ze(e, t) {
1163
+ let { labelStyles: n, nodeStyles: r } = C(t);
1164
1164
  t.labelStyle = n;
1165
- let { shapeSvg: i, bbox: a, label: o } = await P(e, t, L(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 = [
1166
- ...X(l / 2, -u / 2, d, 20, -90, 0),
1165
+ let { shapeSvg: i, bbox: a, label: o } = await I(e, t, z(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 = [
1166
+ ...Re(l / 2, -u / 2, d, 20, -90, 0),
1167
1167
  {
1168
1168
  x: l / 2 + d,
1169
1169
  y: -d
1170
1170
  },
1171
- ...X(l / 2 + d * 2, -d, d, 20, -180, -270),
1172
- ...X(l / 2 + d * 2, d, d, 20, -90, -180),
1171
+ ...Re(l / 2 + d * 2, -d, d, 20, -180, -270),
1172
+ ...Re(l / 2 + d * 2, d, d, 20, -90, -180),
1173
1173
  {
1174
1174
  x: l / 2 + d,
1175
1175
  y: u / 2
1176
1176
  },
1177
- ...X(l / 2, u / 2, d, 20, 0, 90)
1177
+ ...Re(l / 2, u / 2, d, 20, 0, 90)
1178
1178
  ], m = [
1179
1179
  {
1180
1180
  x: -l / 2,
@@ -1184,18 +1184,18 @@ async function Ie(e, t) {
1184
1184
  x: l / 2,
1185
1185
  y: -u / 2 - d
1186
1186
  },
1187
- ...X(l / 2, -u / 2, d, 20, -90, 0),
1187
+ ...Re(l / 2, -u / 2, d, 20, -90, 0),
1188
1188
  {
1189
1189
  x: l / 2 + d,
1190
1190
  y: -d
1191
1191
  },
1192
- ...X(l / 2 + d * 2, -d, d, 20, -180, -270),
1193
- ...X(l / 2 + d * 2, d, d, 20, -90, -180),
1192
+ ...Re(l / 2 + d * 2, -d, d, 20, -180, -270),
1193
+ ...Re(l / 2 + d * 2, d, d, 20, -90, -180),
1194
1194
  {
1195
1195
  x: l / 2 + d,
1196
1196
  y: u / 2
1197
1197
  },
1198
- ...X(l / 2, u / 2, d, 20, 0, 90),
1198
+ ...Re(l / 2, u / 2, d, 20, 0, 90),
1199
1199
  {
1200
1200
  x: l / 2,
1201
1201
  y: u / 2 + d
@@ -1204,15 +1204,15 @@ async function Ie(e, t) {
1204
1204
  x: -l / 2,
1205
1205
  y: u / 2 + d
1206
1206
  }
1207
- ], h = T.svg(i), g = b(t, { fill: "none" });
1207
+ ], h = D.svg(i), g = S(t, { fill: "none" });
1208
1208
  t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
1209
- let _ = R(p).replace("Z", ""), v = h.path(_, g), y = R(m), S = h.path(y, { ...g }), C = i.insert("g", ":first-child");
1210
- 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))})`), I(t, C), t.intersect = function(e) {
1211
- return K.polygon(t, m, e);
1209
+ let _ = B(p).replace("Z", ""), v = h.path(_, g), y = B(m), b = h.path(y, { ...g }), x = i.insert("g", ":first-child");
1210
+ return x.insert(() => b, ":first-child").attr("stroke-opacity", 0), x.insert(() => v, ":first-child"), x.attr("class", "text"), f && t.look !== "handDrawn" && x.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), x.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))})`), R(t, x), t.intersect = function(e) {
1211
+ return q.polygon(t, m, e);
1212
1212
  }, i;
1213
1213
  }
1214
- e(Ie, "curlyBraceRight");
1215
- function Z(e, t, n, r = 100, i = 0, a = 180) {
1214
+ e(ze, "curlyBraceRight");
1215
+ function X(e, t, n, r = 100, i = 0, a = 180) {
1216
1216
  let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
1217
1217
  for (let i = 0; i < r; i++) {
1218
1218
  let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
@@ -1223,36 +1223,36 @@ function Z(e, t, n, r = 100, i = 0, a = 180) {
1223
1223
  }
1224
1224
  return o;
1225
1225
  }
1226
- e(Z, "generateCirclePoints");
1227
- async function Le(e, t) {
1228
- let { labelStyles: n, nodeStyles: r } = x(t);
1226
+ e(X, "generateCirclePoints");
1227
+ async function Be(e, t) {
1228
+ let { labelStyles: n, nodeStyles: r } = C(t);
1229
1229
  t.labelStyle = n;
1230
- let { shapeSvg: i, bbox: a, label: o } = await P(e, t, L(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 = [
1231
- ...Z(l / 2, -u / 2, d, 30, -90, 0),
1230
+ let { shapeSvg: i, bbox: a, label: o } = await I(e, t, z(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 = [
1231
+ ...X(l / 2, -u / 2, d, 30, -90, 0),
1232
1232
  {
1233
1233
  x: -l / 2 - d,
1234
1234
  y: d
1235
1235
  },
1236
- ...Z(l / 2 + d * 2, -d, d, 20, -180, -270),
1237
- ...Z(l / 2 + d * 2, d, d, 20, -90, -180),
1236
+ ...X(l / 2 + d * 2, -d, d, 20, -180, -270),
1237
+ ...X(l / 2 + d * 2, d, d, 20, -90, -180),
1238
1238
  {
1239
1239
  x: -l / 2 - d,
1240
1240
  y: -u / 2
1241
1241
  },
1242
- ...Z(l / 2, u / 2, d, 20, 0, 90)
1242
+ ...X(l / 2, u / 2, d, 20, 0, 90)
1243
1243
  ], m = [
1244
- ...Z(-l / 2 + d + d / 2, -u / 2, d, 20, -90, -180),
1244
+ ...X(-l / 2 + d + d / 2, -u / 2, d, 20, -90, -180),
1245
1245
  {
1246
1246
  x: l / 2 - d / 2,
1247
1247
  y: d
1248
1248
  },
1249
- ...Z(-l / 2 - d / 2, -d, d, 20, 0, 90),
1250
- ...Z(-l / 2 - d / 2, d, d, 20, -90, 0),
1249
+ ...X(-l / 2 - d / 2, -d, d, 20, 0, 90),
1250
+ ...X(-l / 2 - d / 2, d, d, 20, -90, 0),
1251
1251
  {
1252
1252
  x: l / 2 - d / 2,
1253
1253
  y: -d
1254
1254
  },
1255
- ...Z(-l / 2 + d + d / 2, u / 2, d, 30, -180, -270)
1255
+ ...X(-l / 2 + d + d / 2, u / 2, d, 30, -180, -270)
1256
1256
  ], h = [
1257
1257
  {
1258
1258
  x: l / 2,
@@ -1262,18 +1262,18 @@ async function Le(e, t) {
1262
1262
  x: -l / 2,
1263
1263
  y: -u / 2 - d
1264
1264
  },
1265
- ...Z(l / 2, -u / 2, d, 20, -90, 0),
1265
+ ...X(l / 2, -u / 2, d, 20, -90, 0),
1266
1266
  {
1267
1267
  x: -l / 2 - d,
1268
1268
  y: -d
1269
1269
  },
1270
- ...Z(l / 2 + d * 2, -d, d, 20, -180, -270),
1271
- ...Z(l / 2 + d * 2, d, d, 20, -90, -180),
1270
+ ...X(l / 2 + d * 2, -d, d, 20, -180, -270),
1271
+ ...X(l / 2 + d * 2, d, d, 20, -90, -180),
1272
1272
  {
1273
1273
  x: -l / 2 - d,
1274
1274
  y: u / 2
1275
1275
  },
1276
- ...Z(l / 2, u / 2, d, 20, 0, 90),
1276
+ ...X(l / 2, u / 2, d, 20, 0, 90),
1277
1277
  {
1278
1278
  x: -l / 2,
1279
1279
  y: u / 2 + d
@@ -1282,38 +1282,38 @@ async function Le(e, t) {
1282
1282
  x: l / 2 - d - d / 2,
1283
1283
  y: u / 2 + d
1284
1284
  },
1285
- ...Z(-l / 2 + d + d / 2, -u / 2, d, 20, -90, -180),
1285
+ ...X(-l / 2 + d + d / 2, -u / 2, d, 20, -90, -180),
1286
1286
  {
1287
1287
  x: l / 2 - d / 2,
1288
1288
  y: d
1289
1289
  },
1290
- ...Z(-l / 2 - d / 2, -d, d, 20, 0, 90),
1291
- ...Z(-l / 2 - d / 2, d, d, 20, -90, 0),
1290
+ ...X(-l / 2 - d / 2, -d, d, 20, 0, 90),
1291
+ ...X(-l / 2 - d / 2, d, d, 20, -90, 0),
1292
1292
  {
1293
1293
  x: l / 2 - d / 2,
1294
1294
  y: -d
1295
1295
  },
1296
- ...Z(-l / 2 + d + d / 2, u / 2, d, 30, -180, -270)
1297
- ], g = T.svg(i), _ = b(t, { fill: "none" });
1296
+ ...X(-l / 2 + d + d / 2, u / 2, d, 30, -180, -270)
1297
+ ], g = D.svg(i), _ = S(t, { fill: "none" });
1298
1298
  t.look !== "handDrawn" && (_.roughness = 0, _.fillStyle = "solid");
1299
- let v = R(p).replace("Z", ""), y = g.path(v, _), S = R(m).replace("Z", ""), C = g.path(S, _), w = R(h), E = g.path(w, { ..._ }), D = i.insert("g", ":first-child");
1300
- return D.insert(() => E, ":first-child").attr("stroke-opacity", 0), D.insert(() => y, ":first-child"), D.insert(() => C, ":first-child"), D.attr("class", "text"), f && t.look !== "handDrawn" && D.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), D.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))})`), I(t, D), t.intersect = function(e) {
1301
- return K.polygon(t, h, e);
1299
+ let v = B(p).replace("Z", ""), y = g.path(v, _), b = B(m).replace("Z", ""), x = g.path(b, _), w = B(h), T = g.path(w, { ..._ }), E = i.insert("g", ":first-child");
1300
+ return E.insert(() => T, ":first-child").attr("stroke-opacity", 0), E.insert(() => y, ":first-child"), E.insert(() => x, ":first-child"), E.attr("class", "text"), f && t.look !== "handDrawn" && E.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && E.selectAll("path").attr("style", r), E.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))})`), R(t, E), t.intersect = function(e) {
1301
+ return q.polygon(t, h, e);
1302
1302
  }, i;
1303
1303
  }
1304
- e(Le, "curlyBraces");
1305
- async function Re(e, t) {
1306
- let { labelStyles: n, nodeStyles: r } = x(t);
1304
+ e(Be, "curlyBraces");
1305
+ async function Ve(e, t) {
1306
+ let { labelStyles: n, nodeStyles: r } = C(t);
1307
1307
  t.labelStyle = n;
1308
- let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await P(e, t, L(t)), l = Math.max(5, c.height + o * 2, t?.height ?? 0), u = l / 2, d = u - Math.sqrt(Math.max(0, u ** 2 - (c.height / 2) ** 2)), f = Math.max(l / 4, d), p = Math.max(20, c.width + a * 2 + f * 2, (c.width + a * 2) * 1.25, t?.width ?? 0), { cssStyles: m } = t, h = T.svg(s), g = b(t, {});
1308
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await I(e, t, z(t)), l = Math.max(5, c.height + o * 2, t?.height ?? 0), u = l / 2, d = u - Math.sqrt(Math.max(0, u ** 2 - (c.height / 2) ** 2)), f = Math.max(l / 4, d), p = Math.max(20, c.width + a * 2 + f * 2, (c.width + a * 2) * 1.25, t?.width ?? 0), { cssStyles: m } = t, h = D.svg(s), g = S(t, {});
1309
1309
  t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
1310
- let _ = p, v = l, y = _ - u, S = v / 4, C = [
1310
+ let _ = p, v = l, y = _ - u, b = v / 4, x = [
1311
1311
  {
1312
1312
  x: y,
1313
1313
  y: 0
1314
1314
  },
1315
1315
  {
1316
- x: S,
1316
+ x: b,
1317
1317
  y: 0
1318
1318
  },
1319
1319
  {
@@ -1321,76 +1321,76 @@ async function Re(e, t) {
1321
1321
  y: v / 2
1322
1322
  },
1323
1323
  {
1324
- x: S,
1324
+ x: b,
1325
1325
  y: v
1326
1326
  },
1327
1327
  {
1328
1328
  x: y,
1329
1329
  y: v
1330
1330
  },
1331
- ...B(-y, -v / 2, u, 50, 270, 90)
1332
- ], w = R(C), E = h.path(w, g), D = s.insert(() => E, ":first-child");
1333
- return D.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && D.selectChildren("path").attr("style", m), r && t.look !== "handDrawn" && D.selectChildren("path").attr("style", r), D.attr("transform", `translate(${-p / 2}, ${-l / 2})`), I(t, D), t.intersect = function(e) {
1334
- return K.polygon(t, C, e);
1331
+ ...H(-y, -v / 2, u, 50, 270, 90)
1332
+ ], w = B(x), T = h.path(w, g), E = s.insert(() => T, ":first-child");
1333
+ return E.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && E.selectChildren("path").attr("style", m), r && t.look !== "handDrawn" && E.selectChildren("path").attr("style", r), E.attr("transform", `translate(${-p / 2}, ${-l / 2})`), R(t, E), t.intersect = function(e) {
1334
+ return q.polygon(t, x, e);
1335
1335
  }, s;
1336
1336
  }
1337
- e(Re, "curvedTrapezoid");
1338
- async function ze(e, t) {
1339
- let { labelStyles: n, nodeStyles: r } = x(t);
1337
+ e(Ve, "curvedTrapezoid");
1338
+ async function He(e, t) {
1339
+ let { labelStyles: n, nodeStyles: r } = C(t);
1340
1340
  t.labelStyle = n;
1341
- let { shapeSvg: i, bbox: a, label: o } = await P(e, t, L(t)), s = t.padding ?? 20, c = Math.max(a.width + s * 2, t.width ?? 0, 100), l = Math.min(Math.max(c * .23, 16), 56), u = l * .27, d = Math.max(a.height + s * 2, t.height ? t.height - (2 * l - u) : 0), f = Math.min(c * .177, d * .45), p = d + 2 * l - u, m = -p / 2, h = m + 2 * l - u, g = i.insert("g", ":first-child").attr("class", "basic label-container"), { cssStyles: _ } = t;
1341
+ let { shapeSvg: i, bbox: a, label: o } = await I(e, t, z(t)), s = t.padding ?? 20, c = Math.max(a.width + s * 2, t.width ?? 0, 100), l = Math.min(Math.max(c * .23, 16), 56), u = l * .27, d = Math.max(a.height + s * 2, t.height ? t.height - (2 * l - u) : 0), f = Math.min(c * .177, d * .45), p = d + 2 * l - u, m = -p / 2, h = m + 2 * l - u, g = i.insert("g", ":first-child").attr("class", "basic label-container"), { cssStyles: _ } = t;
1342
1342
  if (t.look === "handDrawn") {
1343
- let e = T.svg(i), n = b(t, {}), r = e.path(q(-c / 2, h, c, d, f), n), a = e.circle(0, m + l, l * 2, n);
1343
+ let e = D.svg(i), n = S(t, {}), r = e.path(J(-c / 2, h, c, d, f), n), a = e.circle(0, m + l, l * 2, n);
1344
1344
  g.insert(() => a, ":first-child"), g.insert(() => r, ":first-child"), _ && g.attr("style", _);
1345
1345
  } else g.append("rect").attr("x", -c / 2).attr("y", h).attr("width", c).attr("height", d).attr("rx", f).attr("ry", f).attr("style", r), g.append("circle").attr("cx", 0).attr("cy", m + l).attr("r", l).attr("style", r);
1346
- I(t, g);
1346
+ R(t, g);
1347
1347
  let v = h + d / 2;
1348
1348
  o.attr("transform", `translate(${-(a.width / 2) - (a.x - (a.left ?? 0))}, ${v - a.height / 2 - (a.y - (a.top ?? 0))})`);
1349
- let y = m + l, S = Math.asin(Math.min(1, (h - y) / l)) * 180 / Math.PI, C = [
1350
- ...B(0, -y, l, 24, 180 + S, -S),
1351
- ...B(-(-c / 2 + f), -(h + f), f, 12, 90, 0),
1352
- ...B(-(-c / 2 + f), -(p / 2 - f), f, 12, 360, 270),
1353
- ...B(-(c / 2 - f), -(p / 2 - f), f, 12, 270, 180),
1354
- ...B(-(c / 2 - f), -(h + f), f, 12, 180, 90)
1349
+ let y = m + l, b = Math.asin(Math.min(1, (h - y) / l)) * 180 / Math.PI, x = [
1350
+ ...H(0, -y, l, 24, 180 + b, -b),
1351
+ ...H(-(-c / 2 + f), -(h + f), f, 12, 90, 0),
1352
+ ...H(-(-c / 2 + f), -(p / 2 - f), f, 12, 360, 270),
1353
+ ...H(-(c / 2 - f), -(p / 2 - f), f, 12, 270, 180),
1354
+ ...H(-(c / 2 - f), -(h + f), f, 12, 180, 90)
1355
1355
  ];
1356
1356
  return t.intersect = function(e) {
1357
- return K.polygon(t, C, e);
1357
+ return q.polygon(t, x, e);
1358
1358
  }, i;
1359
1359
  }
1360
- e(ze, "person");
1361
- var Be = /* @__PURE__ */ e((e, t, n, r, i, a) => [
1360
+ e(He, "person");
1361
+ var Ue = /* @__PURE__ */ e((e, t, n, r, i, a) => [
1362
1362
  `M${e},${t + a}`,
1363
1363
  `a${i},${a} 0,0,0 ${n},0`,
1364
1364
  `a${i},${a} 0,0,0 ${-n},0`,
1365
1365
  `l0,${r}`,
1366
1366
  `a${i},${a} 0,0,0 ${n},0`,
1367
1367
  `l0,${-r}`
1368
- ].join(" "), "createCylinderPathD"), Ve = /* @__PURE__ */ e((e, t, n, r, i, a) => [
1368
+ ].join(" "), "createCylinderPathD"), We = /* @__PURE__ */ e((e, t, n, r, i, a) => [
1369
1369
  `M${e},${t + a}`,
1370
1370
  `M${e + n},${t + a}`,
1371
1371
  `a${i},${a} 0,0,0 ${-n},0`,
1372
1372
  `l0,${r}`,
1373
1373
  `a${i},${a} 0,0,0 ${n},0`,
1374
1374
  `l0,${-r}`
1375
- ].join(" "), "createOuterCylinderPathD"), He = /* @__PURE__ */ e((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), Ue = 8, We = 8;
1376
- async function Ge(e, t) {
1377
- let { labelStyles: n, nodeStyles: r } = x(t);
1375
+ ].join(" "), "createOuterCylinderPathD"), Ge = /* @__PURE__ */ e((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), Ke = 8, qe = 8;
1376
+ async function Je(e, t) {
1377
+ let { labelStyles: n, nodeStyles: r } = C(t);
1378
1378
  t.labelStyle = n;
1379
1379
  let i = t.padding ?? 0, a = t.look === "neo" ? 24 : i, o = t.look === "neo" ? 24 : i, s = t.width ?? 0;
1380
- if (t.width && (t.width -= o, t.width < We && (t.width = We)), t.height) {
1380
+ if (t.width && (t.width -= o, t.width < qe && (t.width = qe)), t.height) {
1381
1381
  let e = s / 2 / (2.5 + s / 50);
1382
- t.height = t.height - a - e * 3, t.height < Ue && (t.height = Ue);
1382
+ t.height = t.height - a - e * 3, t.height < Ke && (t.height = Ke);
1383
1383
  }
1384
- let { shapeSvg: c, bbox: l, label: u } = await P(e, t, L(t)), d = Math.max(t.width ?? 0, l.width) + o, f = d / 2, m = f / (2.5 + d / 50), h = Math.max(t.height ?? 0, l.height) + a + m, g, { cssStyles: _ } = t;
1384
+ let { shapeSvg: c, bbox: l, label: u } = await I(e, t, z(t)), d = Math.max(t.width ?? 0, l.width) + o, f = d / 2, m = f / (2.5 + d / 50), h = Math.max(t.height ?? 0, l.height) + a + m, g, { cssStyles: _ } = t;
1385
1385
  if (t.look === "handDrawn") {
1386
- let e = T.svg(c), n = Ve(0, 0, d, h, f, m), r = He(0, m, d, h, f, m), i = b(t, {}), a = e.path(n, i), o = e.path(r, b(t, { fill: "none" }));
1386
+ let e = D.svg(c), n = We(0, 0, d, h, f, m), r = Ge(0, m, d, h, f, m), i = S(t, {}), a = e.path(n, i), o = e.path(r, S(t, { fill: "none" }));
1387
1387
  g = c.insert(() => o, ":first-child"), g = c.insert(() => a, ":first-child"), g.attr("class", "basic label-container"), _ && g.attr("style", _);
1388
1388
  } else {
1389
- let e = Be(0, 0, d, h, f, m);
1389
+ let e = Ue(0, 0, d, h, f, m);
1390
1390
  g = c.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", p(_)).attr("style", r);
1391
1391
  }
1392
- return g.attr("label-offset-y", m), g.attr("transform", `translate(${-d / 2}, ${-(h / 2 + m)})`), I(t, g), u.attr("transform", `translate(${-(l.width / 2) - (l.x - (l.left ?? 0))}, ${-(l.height / 2) + (t.padding ?? 0) / 1.5 - (l.y - (l.top ?? 0))})`), t.intersect = function(e) {
1393
- let n = K.rect(t, e), r = n.x - (t.x ?? 0);
1392
+ return g.attr("label-offset-y", m), g.attr("transform", `translate(${-d / 2}, ${-(h / 2 + m)})`), R(t, g), u.attr("transform", `translate(${-(l.width / 2) - (l.x - (l.left ?? 0))}, ${-(l.height / 2) + (t.padding ?? 0) / 1.5 - (l.y - (l.top ?? 0))})`), t.intersect = function(e) {
1393
+ let n = q.rect(t, e), r = n.x - (t.x ?? 0);
1394
1394
  if (f != 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 - m)) {
1395
1395
  let i = m * m * (1 - r * r / (f * f));
1396
1396
  i > 0 && (i = Math.sqrt(i)), i = m - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
@@ -1398,27 +1398,27 @@ async function Ge(e, t) {
1398
1398
  return n;
1399
1399
  }, c;
1400
1400
  }
1401
- e(Ge, "cylinder");
1402
- async function Ke(e, t, n) {
1403
- let { labelStyles: r, nodeStyles: i } = x(t);
1401
+ e(Je, "cylinder");
1402
+ async function Ye(e, t, n) {
1403
+ let { labelStyles: r, nodeStyles: i } = C(t);
1404
1404
  t.labelStyle = r;
1405
- let { shapeSvg: a, bbox: o } = await P(e, t, L(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;
1405
+ let { shapeSvg: a, bbox: o } = await I(e, t, z(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;
1406
1406
  if (n?.rx && n.ry && (f = n.rx, m = n.ry), t.look === "handDrawn") {
1407
- let e = T.svg(a), n = b(t, {}), r = f || m ? e.path(q(l, u, s, c, f || 0), n) : e.rectangle(l, u, s, c, n);
1407
+ let e = D.svg(a), n = S(t, {}), r = f || m ? e.path(J(l, u, s, c, f || 0), n) : e.rectangle(l, u, s, c, n);
1408
1408
  d = a.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", p(h));
1409
1409
  } 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);
1410
- return I(t, d, t.look === "handDrawn" ? void 0 : {
1410
+ return R(t, d, t.look === "handDrawn" ? void 0 : {
1411
1411
  width: s,
1412
1412
  height: c
1413
1413
  }), t.calcIntersect = function(e, t) {
1414
- return K.rect(e, t);
1414
+ return q.rect(e, t);
1415
1415
  }, t.intersect = function(e) {
1416
- return K.rect(t, e);
1416
+ return q.rect(t, e);
1417
1417
  }, a;
1418
1418
  }
1419
- e(Ke, "drawRect");
1420
- async function qe(e, t) {
1421
- let { cssClasses: n, labelPaddingX: r, labelPaddingY: i, padding: a, width: o, height: s } = t, c = await Ke(e, t, {
1419
+ e(Ye, "drawRect");
1420
+ async function Xe(e, t) {
1421
+ let { cssClasses: n, labelPaddingX: r, labelPaddingY: i, padding: a, width: o, height: s } = t, c = await Ye(e, t, {
1422
1422
  rx: 0,
1423
1423
  ry: 0,
1424
1424
  classes: n ?? "",
@@ -1426,7 +1426,7 @@ async function qe(e, t) {
1426
1426
  labelPaddingY: i ?? a ?? 0
1427
1427
  });
1428
1428
  if (t.look === "handDrawn") {
1429
- let e = T.svg(c), n = b(t, {}), r = c.select(".basic.label-container > path:nth-child(2)"), i = r.node();
1429
+ let e = D.svg(c), n = S(t, {}), r = c.select(".basic.label-container > path:nth-child(2)"), i = r.node();
1430
1430
  if (!i) return c;
1431
1431
  let a = null;
1432
1432
  if (i instanceof SVGGraphicsElement) a = i.getBBox();
@@ -1436,11 +1436,11 @@ async function qe(e, t) {
1436
1436
  let l = c.select(".basic.label-container"), u = (Number(l.attr("width")) || o) ?? 0, d = (Number(l.attr("height")) || s) ?? 0;
1437
1437
  return u > 0 && d > 0 && l.attr("stroke-dasharray", `${u} ${d}`), c;
1438
1438
  }
1439
- e(qe, "datastore");
1440
- async function Je(e, t) {
1441
- let { labelStyles: n, nodeStyles: r } = x(t);
1439
+ e(Xe, "datastore");
1440
+ async function Ze(e, t) {
1441
+ let { labelStyles: n, nodeStyles: r } = C(t);
1442
1442
  t.labelStyle = n;
1443
- let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 16 : t.padding ?? 0, { shapeSvg: o, bbox: s, label: c } = await P(e, t, L(t)), l = s.width + i, u = s.height + a, d = u * .2, f = -l / 2, p = -u / 2 - d / 2, { cssStyles: m } = t, h = T.svg(o), g = b(t, {});
1443
+ let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 16 : t.padding ?? 0, { shapeSvg: o, bbox: s, label: c } = await I(e, t, z(t)), l = s.width + i, u = s.height + a, d = u * .2, f = -l / 2, p = -u / 2 - d / 2, { cssStyles: m } = t, h = D.svg(o), g = S(t, {});
1444
1444
  t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
1445
1445
  let _ = [
1446
1446
  {
@@ -1472,20 +1472,20 @@ async function Je(e, t) {
1472
1472
  y: p + d
1473
1473
  }
1474
1474
  ], v = h.polygon(_.map((e) => [e.x, e.y]), g), y = o.insert(() => v, ":first-child");
1475
- return y.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && y.selectAll("path").attr("style", m), r && t.look !== "handDrawn" && y.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))})`), I(t, y), t.intersect = function(e) {
1476
- return K.rect(t, e);
1475
+ return y.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && y.selectAll("path").attr("style", m), r && t.look !== "handDrawn" && y.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))})`), R(t, y), t.intersect = function(e) {
1476
+ return q.rect(t, e);
1477
1477
  }, o;
1478
1478
  }
1479
- e(Je, "dividedRectangle");
1480
- async function Ye(e, n) {
1481
- let { labelStyles: r, nodeStyles: i } = x(n), a = n.look === "neo" ? 12 : 5;
1479
+ e(Ze, "dividedRectangle");
1480
+ async function Qe(e, n) {
1481
+ let { labelStyles: r, nodeStyles: i } = C(n), a = n.look === "neo" ? 12 : 5;
1482
1482
  n.labelStyle = r;
1483
- let o = n.padding ?? 0, s = n.look === "neo" ? 16 : o, { shapeSvg: c, bbox: l } = await P(e, n, L(n), { ignoreMinWidth: !0 }), u = Math.sqrt(l.width ** 2 + l.height ** 2) / 2, d = (n?.width ? n?.width / 2 : u) + (s ?? 0), f = d + a, m, { cssStyles: h } = n;
1483
+ let o = n.padding ?? 0, s = n.look === "neo" ? 16 : o, { shapeSvg: c, bbox: l } = await I(e, n, z(n), { ignoreMinWidth: !0 }), u = Math.sqrt(l.width ** 2 + l.height ** 2) / 2, d = (n?.width ? n?.width / 2 : u) + (s ?? 0), f = d + a, m, { cssStyles: h } = n;
1484
1484
  if (n.look === "handDrawn") {
1485
- let e = T.svg(c), t = b(n, {
1485
+ let e = D.svg(c), t = S(n, {
1486
1486
  roughness: .2,
1487
1487
  strokeWidth: 2.5
1488
- }), r = b(n, {
1488
+ }), r = S(n, {
1489
1489
  roughness: .2,
1490
1490
  strokeWidth: 1.5
1491
1491
  }), i = e.circle(0, 0, f * 2, t), a = e.circle(0, 0, d * 2, r);
@@ -1495,50 +1495,50 @@ async function Ye(e, n) {
1495
1495
  let e = m.insert("circle", ":first-child"), t = m.insert("circle");
1496
1496
  m.attr("class", "basic label-container").attr("style", i), e.attr("class", "outer-circle").attr("style", i).attr("r", f).attr("cx", 0).attr("cy", 0), t.attr("class", "inner-circle").attr("style", i).attr("r", d).attr("cx", 0).attr("cy", 0);
1497
1497
  }
1498
- return I(n, m), n.intersect = function(e) {
1499
- return t.info("DoubleCircle intersect", n, f, e), K.circle(n, f, e);
1498
+ return R(n, m), n.intersect = function(e) {
1499
+ return t.info("DoubleCircle intersect", n, f, e), q.circle(n, f, e);
1500
1500
  }, c;
1501
1501
  }
1502
- e(Ye, "doublecircle");
1503
- async function Xe(e, t) {
1504
- let { labelStyles: n, nodeStyles: r } = x(t);
1502
+ e(Qe, "doublecircle");
1503
+ async function $e(e, t) {
1504
+ let { labelStyles: n, nodeStyles: r } = C(t);
1505
1505
  t.labelStyle = n;
1506
- let { shapeSvg: i, bbox: o, halfPadding: s } = await P(e, t, L(t)), { theme: c, themeVariables: l } = a();
1507
- w(i, t.colorIndex, c, l.borderColorArray);
1506
+ let { shapeSvg: i, bbox: o, halfPadding: s } = await I(e, t, z(t)), { theme: c, themeVariables: l } = a();
1507
+ E(i, t.colorIndex, c, l.borderColorArray);
1508
1508
  let u = s ?? 10, d = o.width / 2 + u * 2, f = o.height / 2 + u * 2, p, { cssStyles: m } = t;
1509
1509
  if (t.look === "handDrawn") {
1510
- let e = T.svg(i), n = b(t, {}), r = e.ellipse(0, 0, d * 2, f * 2, n);
1510
+ let e = D.svg(i), n = S(t, {}), r = e.ellipse(0, 0, d * 2, f * 2, n);
1511
1511
  p = i.insert(() => r, ":first-child"), p.attr("class", "basic label-container"), m && p.attr("style", m);
1512
1512
  } else p = i.insert("ellipse", ":first-child").attr("class", "basic label-container").attr("style", r).attr("rx", d).attr("ry", f).attr("cx", 0).attr("cy", 0);
1513
- return t.width = d * 2, t.height = f * 2, I(t, p), t.calcIntersect = function(e, t) {
1513
+ return t.width = d * 2, t.height = f * 2, R(t, p), t.calcIntersect = function(e, t) {
1514
1514
  let n = e.width / 2, r = e.height / 2;
1515
- return K.ellipse(e, n, r, t);
1515
+ return q.ellipse(e, n, r, t);
1516
1516
  }, t.intersect = function(e) {
1517
- return K.ellipse(t, d, f, e);
1517
+ return q.ellipse(t, d, f, e);
1518
1518
  }, i;
1519
1519
  }
1520
- e(Xe, "usecaseEllipse");
1521
- function Ze(e, n, { config: { themeVariables: r } }) {
1522
- let { labelStyles: i, nodeStyles: a } = x(n);
1520
+ e($e, "usecaseEllipse");
1521
+ function et(e, n, { config: { themeVariables: r } }) {
1522
+ let { labelStyles: i, nodeStyles: a } = C(n);
1523
1523
  n.label = "", n.labelStyle = i;
1524
- let o = e.insert("g").attr("class", L(n)).attr("id", n.domId ?? n.id), { cssStyles: s } = n, c = T.svg(o), { nodeBorder: l } = r, u = b(n, { fillStyle: "solid" });
1524
+ let o = e.insert("g").attr("class", z(n)).attr("id", n.domId ?? n.id), { cssStyles: s } = n, c = D.svg(o), { nodeBorder: l } = r, u = S(n, { fillStyle: "solid" });
1525
1525
  n.look !== "handDrawn" && (u.roughness = 0);
1526
1526
  let d = c.circle(0, 0, 14, u), f = o.insert(() => d, ":first-child");
1527
- 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), I(n, f), n.intersect = function(e) {
1527
+ 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), R(n, f), n.intersect = function(e) {
1528
1528
  return t.info("filledCircle intersect", n, {
1529
1529
  radius: 7,
1530
1530
  point: e
1531
- }), K.circle(n, 7, e);
1531
+ }), q.circle(n, 7, e);
1532
1532
  }, o;
1533
1533
  }
1534
- e(Ze, "filledCircle");
1535
- var Qe = 10, $e = 10;
1536
- async function et(e, n) {
1537
- let { labelStyles: r, nodeStyles: i } = x(n);
1534
+ e(et, "filledCircle");
1535
+ var tt = 10, nt = 10;
1536
+ async function rt(e, n) {
1537
+ let { labelStyles: r, nodeStyles: i } = C(n);
1538
1538
  n.labelStyle = r;
1539
1539
  let a = n.padding ?? 0, o = n.look === "neo" ? a * 2 : a;
1540
- (n.width || n.height) && (n.height = n?.height ?? 0, n.height < Qe && (n.height = Qe), n.width = (n?.width ?? 0) - o - o / 2, n.width < $e && (n.width = $e));
1541
- let { shapeSvg: s, bbox: c, label: l } = await P(e, n, L(n)), u = (n?.width ? n?.width : c.width) + (o ?? 0), d = n?.height ? n?.height : u + c.height, f = d, p = [
1540
+ (n.width || n.height) && (n.height = n?.height ?? 0, n.height < tt && (n.height = tt), n.width = (n?.width ?? 0) - o - o / 2, n.width < nt && (n.width = nt));
1541
+ let { shapeSvg: s, bbox: c, label: l } = await I(e, n, z(n)), u = (n?.width ? n?.width : c.width) + (o ?? 0), d = n?.height ? n?.height : u + c.height, f = d, p = [
1542
1542
  {
1543
1543
  x: 0,
1544
1544
  y: -d
@@ -1551,18 +1551,18 @@ async function et(e, n) {
1551
1551
  x: f / 2,
1552
1552
  y: 0
1553
1553
  }
1554
- ], { cssStyles: m } = n, h = T.svg(s), g = b(n, {});
1554
+ ], { cssStyles: m } = n, h = D.svg(s), g = S(n, {});
1555
1555
  n.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
1556
- let _ = R(p), v = h.path(_, g), y = s.insert(() => v, ":first-child").attr("transform", `translate(${-d / 2}, ${d / 2})`).attr("class", "outer-path");
1557
- return m && n.look !== "handDrawn" && y.selectChildren("path").attr("style", m), i && n.look !== "handDrawn" && y.selectChildren("path").attr("style", i), n.width = u, n.height = d, I(n, y), 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) {
1558
- return t.info("Triangle intersect", n, p, e), K.polygon(n, p, e);
1556
+ let _ = B(p), v = h.path(_, g), y = s.insert(() => v, ":first-child").attr("transform", `translate(${-d / 2}, ${d / 2})`).attr("class", "outer-path");
1557
+ return m && n.look !== "handDrawn" && y.selectChildren("path").attr("style", m), i && n.look !== "handDrawn" && y.selectChildren("path").attr("style", i), n.width = u, n.height = d, R(n, y), 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) {
1558
+ return t.info("Triangle intersect", n, p, e), q.polygon(n, p, e);
1559
1559
  }, s;
1560
1560
  }
1561
- e(et, "flippedTriangle");
1562
- async function tt(e, t) {
1563
- let { labelStyles: n, nodeStyles: r } = x(t);
1561
+ e(rt, "flippedTriangle");
1562
+ async function it(e, t) {
1563
+ let { labelStyles: n, nodeStyles: r } = C(t);
1564
1564
  t.labelStyle = n;
1565
- let { shapeSvg: i, bbox: a, label: o } = await P(e, t, L(t)), s = t.padding ?? 12, c = Math.max(a.width + s * 2, t.width ?? 0, 90), l = a.height + s * 2, u = Math.max(Math.min(l * .16, 14), 8), d = Math.max(l + u, t.height ?? 0), f = d - u, p = Math.max(c * .38, 28), m = -d / 2, h = [
1565
+ let { shapeSvg: i, bbox: a, label: o } = await I(e, t, z(t)), s = t.padding ?? 12, c = Math.max(a.width + s * 2, t.width ?? 0, 90), l = a.height + s * 2, u = Math.max(Math.min(l * .16, 14), 8), d = Math.max(l + u, t.height ?? 0), f = d - u, p = Math.max(c * .38, 28), m = -d / 2, h = [
1566
1566
  {
1567
1567
  x: -c / 2,
1568
1568
  y: m
@@ -1593,43 +1593,43 @@ async function tt(e, t) {
1593
1593
  "Z"
1594
1594
  ].join(" "), { cssStyles: _ } = t, v;
1595
1595
  if (t.look === "handDrawn") {
1596
- let e = T.svg(i).path(g, b(t, {}));
1596
+ let e = D.svg(i).path(g, S(t, {}));
1597
1597
  v = i.insert(() => e, ":first-child").attr("class", "basic label-container"), _ && v.attr("style", _);
1598
1598
  } else v = i.insert("path", ":first-child").attr("d", g).attr("class", "basic label-container").attr("style", r);
1599
- t.look === "handDrawn" ? I(t, v) : I(t, v, {
1599
+ t.look === "handDrawn" ? R(t, v) : R(t, v, {
1600
1600
  width: c,
1601
1601
  height: d
1602
1602
  });
1603
1603
  let y = m + u + f / 2;
1604
1604
  return o.attr("transform", `translate(${-(a.width / 2) - (a.x - (a.left ?? 0))}, ${y - a.height / 2 - (a.y - (a.top ?? 0))})`), t.intersect = function(e) {
1605
- return K.polygon(t, h, e);
1605
+ return q.polygon(t, h, e);
1606
1606
  }, i;
1607
1607
  }
1608
- e(tt, "folder");
1609
- function nt(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
1610
- let { nodeStyles: a } = x(t);
1608
+ e(it, "folder");
1609
+ function at(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
1610
+ let { nodeStyles: a } = C(t);
1611
1611
  t.label = "";
1612
- let o = e.insert("g").attr("class", L(t)).attr("id", t.domId ?? t.id), { cssStyles: s } = t, c = Math.max(70, t?.width ?? 0), l = Math.max(10, t?.height ?? 0);
1612
+ let o = e.insert("g").attr("class", z(t)).attr("id", t.domId ?? t.id), { cssStyles: s } = t, c = Math.max(70, t?.width ?? 0), l = Math.max(10, t?.height ?? 0);
1613
1613
  (n === "LR" || n === "RL") && (c = Math.max(10, t?.width ?? 0), l = Math.max(70, t?.height ?? 0));
1614
- let u = -1 * c / 2, d = -1 * l / 2, f = T.svg(o), p = b(t, {
1614
+ let u = -1 * c / 2, d = -1 * l / 2, f = D.svg(o), p = S(t, {
1615
1615
  stroke: i.lineColor,
1616
1616
  fill: i.lineColor
1617
1617
  });
1618
1618
  t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
1619
1619
  let m = f.rectangle(u, d, c, l, p), h = o.insert(() => m, ":first-child");
1620
- s && t.look !== "handDrawn" && h.selectAll("path").attr("style", s), a && t.look !== "handDrawn" && h.selectAll("path").attr("style", a), I(t, h);
1620
+ s && t.look !== "handDrawn" && h.selectAll("path").attr("style", s), a && t.look !== "handDrawn" && h.selectAll("path").attr("style", a), R(t, h);
1621
1621
  let g = r?.padding ?? 0;
1622
1622
  return t.width && t.height && (t.width += g / 2 || 0, t.height += g / 2 || 0), t.intersect = function(e) {
1623
- return K.rect(t, e);
1623
+ return q.rect(t, e);
1624
1624
  }, o;
1625
1625
  }
1626
- e(nt, "forkJoin");
1627
- async function rt(e, n) {
1628
- let { labelStyles: r, nodeStyles: i } = x(n);
1626
+ e(at, "forkJoin");
1627
+ async function ot(e, n) {
1628
+ let { labelStyles: r, nodeStyles: i } = C(n);
1629
1629
  n.labelStyle = r;
1630
1630
  let a = n.look === "neo" ? 16 : n.padding ?? 0, o = n.look === "neo" ? 12 : n.padding ?? 0;
1631
1631
  (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));
1632
- let { shapeSvg: s, bbox: c } = await P(e, n, L(n)), l = (n?.height ? n?.height : Math.max(10, c.height)) + o * 2, u = l / 2, d = u - Math.sqrt(Math.max(0, u ** 2 - (c.height / 2) ** 2)), f = (n?.width ? n?.width : Math.max(15, c.width) + d * 2) + a * 2, { cssStyles: p } = n, m = T.svg(s), h = b(n, {});
1632
+ let { shapeSvg: s, bbox: c } = await I(e, n, z(n)), l = (n?.height ? n?.height : Math.max(10, c.height)) + o * 2, u = l / 2, d = u - Math.sqrt(Math.max(0, u ** 2 - (c.height / 2) ** 2)), f = (n?.width ? n?.width : Math.max(15, c.width) + d * 2) + a * 2, { cssStyles: p } = n, m = D.svg(s), h = S(n, {});
1633
1633
  n.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
1634
1634
  let g = [
1635
1635
  {
@@ -1640,7 +1640,7 @@ async function rt(e, n) {
1640
1640
  x: f / 2 - u,
1641
1641
  y: -l / 2
1642
1642
  },
1643
- ...B(-f / 2 + u, 0, u, 50, 90, 270),
1643
+ ...H(-f / 2 + u, 0, u, 50, 90, 270),
1644
1644
  {
1645
1645
  x: f / 2 - u,
1646
1646
  y: l / 2
@@ -1649,16 +1649,16 @@ async function rt(e, n) {
1649
1649
  x: -f / 2,
1650
1650
  y: l / 2
1651
1651
  }
1652
- ], _ = R(g), v = m.path(_, h), y = s.insert(() => v, ":first-child");
1653
- return y.attr("class", "basic label-container outer-path"), p && n.look !== "handDrawn" && y.selectChildren("path").attr("style", p), i && n.look !== "handDrawn" && y.selectChildren("path").attr("style", i), I(n, y), n.intersect = function(e) {
1652
+ ], _ = B(g), v = m.path(_, h), y = s.insert(() => v, ":first-child");
1653
+ return y.attr("class", "basic label-container outer-path"), p && n.look !== "handDrawn" && y.selectChildren("path").attr("style", p), i && n.look !== "handDrawn" && y.selectChildren("path").attr("style", i), R(n, y), n.intersect = function(e) {
1654
1654
  return t.info("Pill intersect", n, {
1655
1655
  radius: u,
1656
1656
  point: e
1657
- }), K.polygon(n, g, e);
1657
+ }), q.polygon(n, g, e);
1658
1658
  }, s;
1659
1659
  }
1660
- e(rt, "halfRoundedRectangle");
1661
- var it = /* @__PURE__ */ e((e, t, n, r, i) => [
1660
+ e(ot, "halfRoundedRectangle");
1661
+ var st = /* @__PURE__ */ e((e, t, n, r, i) => [
1662
1662
  `M${e + i},${t}`,
1663
1663
  `L${e + n - i},${t}`,
1664
1664
  `L${e + n},${t - r / 2}`,
@@ -1667,15 +1667,15 @@ var it = /* @__PURE__ */ e((e, t, n, r, i) => [
1667
1667
  `L${e},${t - r / 2}`,
1668
1668
  "Z"
1669
1669
  ].join(" "), "createHexagonPathD");
1670
- async function at(e, t) {
1671
- let { labelStyles: n, nodeStyles: r } = x(t), i = t.look === "neo" ? 3.5 : 4;
1670
+ async function ct(e, t) {
1671
+ let { labelStyles: n, nodeStyles: r } = C(t), i = t.look === "neo" ? 3.5 : 4;
1672
1672
  t.labelStyle = n;
1673
1673
  let a = t.padding ?? 0, o = t.look === "neo" ? 70 : a, s = t.look === "neo" ? 32 : a;
1674
1674
  if (t.width || t.height) {
1675
1675
  let e = (t.height ?? 0) / i;
1676
1676
  t.width = (t?.width ?? 0) - 2 * e - s, t.height = (t.height ?? 0) - o;
1677
1677
  }
1678
- let { shapeSvg: c, bbox: l } = await P(e, t, L(t)), u = (t?.height ? t?.height : l.height) + o, d = u / i, f = (t?.width ? t?.width : l.width) + 2 * d + s, p = [
1678
+ let { shapeSvg: c, bbox: l } = await I(e, t, z(t)), u = (t?.height ? t?.height : l.height) + o, d = u / i, f = (t?.width ? t?.width : l.width) + 2 * d + s, p = [
1679
1679
  {
1680
1680
  x: d,
1681
1681
  y: 0
@@ -1702,18 +1702,18 @@ async function at(e, t) {
1702
1702
  }
1703
1703
  ], m, { cssStyles: h } = t;
1704
1704
  if (t.look === "handDrawn") {
1705
- let e = T.svg(c), n = b(t, {}), r = it(0, 0, f, u, d), i = e.path(r, n);
1705
+ let e = D.svg(c), n = S(t, {}), r = st(0, 0, f, u, d), i = e.path(r, n);
1706
1706
  m = c.insert(() => i, ":first-child").attr("transform", `translate(${-f / 2}, ${u / 2})`), h && m.attr("style", h);
1707
- } else m = J(c, f, u, p);
1708
- return r && m.attr("style", r), t.width = f, t.height = u, I(t, m), t.intersect = function(e) {
1709
- return K.polygon(t, p, e);
1707
+ } else m = Y(c, f, u, p);
1708
+ return r && m.attr("style", r), t.width = f, t.height = u, R(t, m), t.intersect = function(e) {
1709
+ return q.polygon(t, p, e);
1710
1710
  }, c;
1711
1711
  }
1712
- e(at, "hexagon");
1713
- async function ot(e, n) {
1714
- let { labelStyles: r, nodeStyles: i } = x(n);
1712
+ e(ct, "hexagon");
1713
+ async function lt(e, n) {
1714
+ let { labelStyles: r, nodeStyles: i } = C(n);
1715
1715
  n.label = "", n.labelStyle = r;
1716
- let { shapeSvg: a } = await P(e, n, L(n)), o = Math.max(30, n?.width ?? 0), s = Math.max(30, n?.height ?? 0), { cssStyles: c } = n, l = T.svg(a), u = b(n, {});
1716
+ let { shapeSvg: a } = await I(e, n, z(n)), o = Math.max(30, n?.width ?? 0), s = Math.max(30, n?.height ?? 0), { cssStyles: c } = n, l = D.svg(a), u = S(n, {});
1717
1717
  n.look !== "handDrawn" && (u.roughness = 0, u.fillStyle = "solid");
1718
1718
  let d = [
1719
1719
  {
@@ -1732,39 +1732,39 @@ async function ot(e, n) {
1732
1732
  x: o,
1733
1733
  y: s
1734
1734
  }
1735
- ], f = R(d), p = l.path(f, u), m = a.insert(() => p, ":first-child");
1736
- 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})`), I(n, m), n.intersect = function(e) {
1737
- return t.info("Pill intersect", n, { points: d }), K.polygon(n, d, e);
1735
+ ], f = B(d), p = l.path(f, u), m = a.insert(() => p, ":first-child");
1736
+ 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})`), R(n, m), n.intersect = function(e) {
1737
+ return t.info("Pill intersect", n, { points: d }), q.polygon(n, d, e);
1738
1738
  }, a;
1739
1739
  }
1740
- e(ot, "hourglass");
1741
- async function st(e, n, { config: { themeVariables: r, flowchart: i } }) {
1742
- let { labelStyles: a } = x(n);
1740
+ e(lt, "hourglass");
1741
+ async function ut(e, n, { config: { themeVariables: r, flowchart: i } }) {
1742
+ let { labelStyles: a } = C(n);
1743
1743
  n.labelStyle = a;
1744
1744
  let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1745
1745
  n.width = Math.max(c, l ?? 0);
1746
- let { shapeSvg: u, bbox: d, label: f } = await P(e, n, "icon-shape default"), p = n.pos === "t", m = c, h = c, { nodeBorder: g } = r, { stylesMap: v } = C(n), y = -h / 2, S = -m / 2, w = n.label ? 8 : 0, E = T.svg(u), D = b(n, {
1746
+ let { shapeSvg: u, bbox: d, label: f } = await I(e, n, "icon-shape default"), p = n.pos === "t", m = c, h = c, { nodeBorder: g } = r, { stylesMap: _ } = T(n), v = -h / 2, b = -m / 2, x = n.label ? 8 : 0, w = D.svg(u), E = S(n, {
1747
1747
  stroke: "none",
1748
1748
  fill: "none"
1749
1749
  });
1750
- n.look !== "handDrawn" && (D.roughness = 0, D.fillStyle = "solid");
1751
- let O = E.rectangle(y, S, h, m, D), k = Math.max(h, d.width), A = m + d.height + w, j = E.rectangle(-k / 2, -A / 2, k, A, {
1752
- ...D,
1750
+ n.look !== "handDrawn" && (E.roughness = 0, E.fillStyle = "solid");
1751
+ let O = w.rectangle(v, b, h, m, E), k = Math.max(h, d.width), A = m + d.height + x, j = w.rectangle(-k / 2, -A / 2, k, A, {
1752
+ ...E,
1753
1753
  fill: "transparent",
1754
1754
  stroke: "none"
1755
1755
  }), M = u.insert(() => O, ":first-child"), N = u.insert(() => j);
1756
1756
  if (n.icon) {
1757
1757
  let e = u.append("g");
1758
- e.html(`<g>${await _(n.icon, {
1758
+ e.html(`<g>${await y(n.icon, {
1759
1759
  height: c,
1760
1760
  width: c,
1761
1761
  fallbackPrefix: ""
1762
1762
  })}</g>`);
1763
1763
  let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
1764
- e.attr("transform", `translate(${-r / 2 - a},${p ? d.height / 2 + w / 2 - i / 2 - o : -d.height / 2 - w / 2 - i / 2 - o})`), e.attr("style", `color: ${v.get("stroke") ?? g};`);
1764
+ e.attr("transform", `translate(${-r / 2 - a},${p ? d.height / 2 + x / 2 - i / 2 - o : -d.height / 2 - x / 2 - i / 2 - o})`), e.attr("style", `color: ${_.get("stroke") ?? g};`);
1765
1765
  }
1766
- return f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${p ? -A / 2 : A / 2 - d.height})`), M.attr("transform", `translate(0,${p ? d.height / 2 + w / 2 : -d.height / 2 - w / 2})`), I(n, N), n.intersect = function(e) {
1767
- if (t.info("iconSquare intersect", n, e), !n.label) return K.rect(n, e);
1766
+ return f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${p ? -A / 2 : A / 2 - d.height})`), M.attr("transform", `translate(0,${p ? d.height / 2 + x / 2 : -d.height / 2 - x / 2})`), R(n, N), n.intersect = function(e) {
1767
+ if (t.info("iconSquare intersect", n, e), !n.label) return q.rect(n, e);
1768
1768
  let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1769
1769
  return o = p ? [
1770
1770
  {
@@ -1777,11 +1777,11 @@ async function st(e, n, { config: { themeVariables: r, flowchart: i } }) {
1777
1777
  },
1778
1778
  {
1779
1779
  x: r + d.width / 2,
1780
- y: i - a / 2 + d.height + w
1780
+ y: i - a / 2 + d.height + x
1781
1781
  },
1782
1782
  {
1783
1783
  x: r + h / 2,
1784
- y: i - a / 2 + d.height + w
1784
+ y: i - a / 2 + d.height + x
1785
1785
  },
1786
1786
  {
1787
1787
  x: r + h / 2,
@@ -1793,11 +1793,11 @@ async function st(e, n, { config: { themeVariables: r, flowchart: i } }) {
1793
1793
  },
1794
1794
  {
1795
1795
  x: r - h / 2,
1796
- y: i - a / 2 + d.height + w
1796
+ y: i - a / 2 + d.height + x
1797
1797
  },
1798
1798
  {
1799
1799
  x: r - d.width / 2,
1800
- y: i - a / 2 + d.height + w
1800
+ y: i - a / 2 + d.height + x
1801
1801
  }
1802
1802
  ] : [
1803
1803
  {
@@ -1832,57 +1832,57 @@ async function st(e, n, { config: { themeVariables: r, flowchart: i } }) {
1832
1832
  x: r - h / 2,
1833
1833
  y: i - a / 2 + m
1834
1834
  }
1835
- ], K.polygon(n, o, e);
1835
+ ], q.polygon(n, o, e);
1836
1836
  }, u;
1837
1837
  }
1838
- e(st, "icon");
1839
- async function ct(e, n, { config: { themeVariables: r, flowchart: i } }) {
1840
- let { labelStyles: a } = x(n);
1838
+ e(ut, "icon");
1839
+ async function dt(e, n, { config: { themeVariables: r, flowchart: i } }) {
1840
+ let { labelStyles: a } = C(n);
1841
1841
  n.labelStyle = a;
1842
1842
  let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1843
1843
  n.width = Math.max(c, l ?? 0);
1844
- let { shapeSvg: u, bbox: d, label: f } = await P(e, n, "icon-shape default"), p = n.label ? 8 : 0, m = n.pos === "t", { nodeBorder: h, mainBkg: g } = r, { stylesMap: v } = C(n), y = T.svg(u), S = b(n, {});
1845
- n.look !== "handDrawn" && (S.roughness = 0, S.fillStyle = "solid"), S.stroke = v.get("fill") ?? g;
1846
- let w = u.append("g");
1847
- n.icon && w.html(`<g>${await _(n.icon, {
1844
+ let { shapeSvg: u, bbox: d, label: f } = await I(e, n, "icon-shape default"), p = n.label ? 8 : 0, m = n.pos === "t", { nodeBorder: h, mainBkg: g } = r, { stylesMap: _ } = T(n), v = D.svg(u), b = S(n, {});
1845
+ n.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid"), b.stroke = _.get("fill") ?? g;
1846
+ let x = u.append("g");
1847
+ n.icon && x.html(`<g>${await y(n.icon, {
1848
1848
  height: c,
1849
1849
  width: c,
1850
1850
  fallbackPrefix: ""
1851
1851
  })}</g>`);
1852
- let E = w.node().getBBox(), D = E.width, O = E.height, k = E.x, A = E.y, j = Math.max(D, O) * Math.SQRT2 + 40, M = y.circle(0, 0, j, S), N = Math.max(j, d.width), F = j + d.height + p, L = y.rectangle(-N / 2, -F / 2, N, F, {
1853
- ...S,
1852
+ let w = x.node().getBBox(), E = w.width, O = w.height, k = w.x, A = w.y, j = Math.max(E, O) * Math.SQRT2 + 40, M = v.circle(0, 0, j, b), N = Math.max(j, d.width), P = j + d.height + p, F = v.rectangle(-N / 2, -P / 2, N, P, {
1853
+ ...b,
1854
1854
  fill: "transparent",
1855
1855
  stroke: "none"
1856
- }), R = u.insert(() => M, ":first-child"), z = u.insert(() => L);
1857
- return w.attr("transform", `translate(${-D / 2 - k},${m ? d.height / 2 + p / 2 - O / 2 - A : -d.height / 2 - p / 2 - O / 2 - A})`), w.attr("style", `color: ${v.get("stroke") ?? h};`), f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), R.attr("transform", `translate(0,${m ? d.height / 2 + p / 2 : -d.height / 2 - p / 2})`), I(n, z), n.intersect = function(e) {
1858
- return t.info("iconSquare intersect", n, e), K.rect(n, e);
1856
+ }), L = u.insert(() => M, ":first-child"), z = u.insert(() => F);
1857
+ return x.attr("transform", `translate(${-E / 2 - k},${m ? d.height / 2 + p / 2 - O / 2 - A : -d.height / 2 - p / 2 - O / 2 - A})`), x.attr("style", `color: ${_.get("stroke") ?? h};`), f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -P / 2 : P / 2 - d.height})`), L.attr("transform", `translate(0,${m ? d.height / 2 + p / 2 : -d.height / 2 - p / 2})`), R(n, z), n.intersect = function(e) {
1858
+ return t.info("iconSquare intersect", n, e), q.rect(n, e);
1859
1859
  }, u;
1860
1860
  }
1861
- e(ct, "iconCircle");
1862
- async function lt(e, n, { config: { themeVariables: r, flowchart: i } }) {
1863
- let { labelStyles: a } = x(n);
1861
+ e(dt, "iconCircle");
1862
+ async function ft(e, n, { config: { themeVariables: r, flowchart: i } }) {
1863
+ let { labelStyles: a } = C(n);
1864
1864
  n.labelStyle = a;
1865
1865
  let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1866
1866
  n.width = Math.max(c, l ?? 0);
1867
- let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await P(e, n, "icon-shape default"), m = n.pos === "t", h = c + f * 2, g = c + f * 2, { nodeBorder: v, mainBkg: y } = r, { stylesMap: S } = C(n), w = -g / 2, E = -h / 2, D = n.label ? 8 : 0, O = T.svg(u), k = b(n, {});
1868
- n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid"), k.stroke = S.get("fill") ?? y;
1869
- let A = O.path(q(w, E, g, h, 5), k), j = Math.max(g, d.width), M = h + d.height + D, N = O.rectangle(-j / 2, -M / 2, j, M, {
1867
+ let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await I(e, n, "icon-shape default"), m = n.pos === "t", h = c + f * 2, g = c + f * 2, { nodeBorder: _, mainBkg: v } = r, { stylesMap: b } = T(n), x = -g / 2, w = -h / 2, E = n.label ? 8 : 0, O = D.svg(u), k = S(n, {});
1868
+ n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid"), k.stroke = b.get("fill") ?? v;
1869
+ let A = O.path(J(x, w, g, h, 5), k), j = Math.max(g, d.width), M = h + d.height + E, N = O.rectangle(-j / 2, -M / 2, j, M, {
1870
1870
  ...k,
1871
1871
  fill: "transparent",
1872
1872
  stroke: "none"
1873
- }), F = u.insert(() => A, ":first-child").attr("class", "icon-shape2"), L = u.insert(() => N);
1873
+ }), P = u.insert(() => A, ":first-child").attr("class", "icon-shape2"), F = u.insert(() => N);
1874
1874
  if (n.icon) {
1875
1875
  let e = u.append("g");
1876
- e.html(`<g>${await _(n.icon, {
1876
+ e.html(`<g>${await y(n.icon, {
1877
1877
  height: c,
1878
1878
  width: c,
1879
1879
  fallbackPrefix: ""
1880
1880
  })}</g>`);
1881
1881
  let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
1882
- e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + D / 2 - i / 2 - o : -d.height / 2 - D / 2 - i / 2 - o})`), e.attr("style", `color: ${S.get("stroke") ?? v};`);
1882
+ e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + E / 2 - i / 2 - o : -d.height / 2 - E / 2 - i / 2 - o})`), e.attr("style", `color: ${b.get("stroke") ?? _};`);
1883
1883
  }
1884
- return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -M / 2 : M / 2 - d.height})`), F.attr("transform", `translate(0,${m ? d.height / 2 + D / 2 : -d.height / 2 - D / 2})`), I(n, L), n.intersect = function(e) {
1885
- if (t.info("iconSquare intersect", n, e), !n.label) return K.rect(n, e);
1884
+ return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -M / 2 : M / 2 - d.height})`), P.attr("transform", `translate(0,${m ? d.height / 2 + E / 2 : -d.height / 2 - E / 2})`), R(n, F), n.intersect = function(e) {
1885
+ if (t.info("iconSquare intersect", n, e), !n.label) return q.rect(n, e);
1886
1886
  let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1887
1887
  return o = m ? [
1888
1888
  {
@@ -1895,11 +1895,11 @@ async function lt(e, n, { config: { themeVariables: r, flowchart: i } }) {
1895
1895
  },
1896
1896
  {
1897
1897
  x: r + d.width / 2,
1898
- y: i - a / 2 + d.height + D
1898
+ y: i - a / 2 + d.height + E
1899
1899
  },
1900
1900
  {
1901
1901
  x: r + g / 2,
1902
- y: i - a / 2 + d.height + D
1902
+ y: i - a / 2 + d.height + E
1903
1903
  },
1904
1904
  {
1905
1905
  x: r + g / 2,
@@ -1911,11 +1911,11 @@ async function lt(e, n, { config: { themeVariables: r, flowchart: i } }) {
1911
1911
  },
1912
1912
  {
1913
1913
  x: r - g / 2,
1914
- y: i - a / 2 + d.height + D
1914
+ y: i - a / 2 + d.height + E
1915
1915
  },
1916
1916
  {
1917
1917
  x: r - d.width / 2,
1918
- y: i - a / 2 + d.height + D
1918
+ y: i - a / 2 + d.height + E
1919
1919
  }
1920
1920
  ] : [
1921
1921
  {
@@ -1950,34 +1950,34 @@ async function lt(e, n, { config: { themeVariables: r, flowchart: i } }) {
1950
1950
  x: r - g / 2,
1951
1951
  y: i - a / 2 + h
1952
1952
  }
1953
- ], K.polygon(n, o, e);
1953
+ ], q.polygon(n, o, e);
1954
1954
  }, u;
1955
1955
  }
1956
- e(lt, "iconRounded");
1957
- async function ut(e, n, { config: { themeVariables: r, flowchart: i } }) {
1958
- let { labelStyles: a } = x(n);
1956
+ e(ft, "iconRounded");
1957
+ async function pt(e, n, { config: { themeVariables: r, flowchart: i } }) {
1958
+ let { labelStyles: a } = C(n);
1959
1959
  n.labelStyle = a;
1960
1960
  let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1961
1961
  n.width = Math.max(c, l ?? 0);
1962
- let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await P(e, n, "icon-shape default"), m = n.pos === "t", h = c + f * 2, g = c + f * 2, { nodeBorder: v, mainBkg: y } = r, { stylesMap: S } = C(n), w = -g / 2, E = -h / 2, D = n.label ? 8 : 0, O = T.svg(u), k = b(n, {});
1963
- n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid"), k.stroke = S.get("fill") ?? y;
1964
- let A = O.path(q(w, E, g, h, .1), k), j = Math.max(g, d.width), M = h + d.height + D, N = O.rectangle(-j / 2, -M / 2, j, M, {
1962
+ let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await I(e, n, "icon-shape default"), m = n.pos === "t", h = c + f * 2, g = c + f * 2, { nodeBorder: _, mainBkg: v } = r, { stylesMap: b } = T(n), x = -g / 2, w = -h / 2, E = n.label ? 8 : 0, O = D.svg(u), k = S(n, {});
1963
+ n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid"), k.stroke = b.get("fill") ?? v;
1964
+ let A = O.path(J(x, w, g, h, .1), k), j = Math.max(g, d.width), M = h + d.height + E, N = O.rectangle(-j / 2, -M / 2, j, M, {
1965
1965
  ...k,
1966
1966
  fill: "transparent",
1967
1967
  stroke: "none"
1968
- }), F = u.insert(() => A, ":first-child"), L = u.insert(() => N);
1968
+ }), P = u.insert(() => A, ":first-child"), F = u.insert(() => N);
1969
1969
  if (n.icon) {
1970
1970
  let e = u.append("g");
1971
- e.html(`<g>${await _(n.icon, {
1971
+ e.html(`<g>${await y(n.icon, {
1972
1972
  height: c,
1973
1973
  width: c,
1974
1974
  fallbackPrefix: ""
1975
1975
  })}</g>`);
1976
1976
  let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
1977
- e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + D / 2 - i / 2 - o : -d.height / 2 - D / 2 - i / 2 - o})`), e.attr("style", `color: ${S.get("stroke") ?? v};`);
1977
+ e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + E / 2 - i / 2 - o : -d.height / 2 - E / 2 - i / 2 - o})`), e.attr("style", `color: ${b.get("stroke") ?? _};`);
1978
1978
  }
1979
- return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -M / 2 : M / 2 - d.height})`), F.attr("transform", `translate(0,${m ? d.height / 2 + D / 2 : -d.height / 2 - D / 2})`), I(n, L), n.intersect = function(e) {
1980
- if (t.info("iconSquare intersect", n, e), !n.label) return K.rect(n, e);
1979
+ return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -M / 2 : M / 2 - d.height})`), P.attr("transform", `translate(0,${m ? d.height / 2 + E / 2 : -d.height / 2 - E / 2})`), R(n, F), n.intersect = function(e) {
1980
+ if (t.info("iconSquare intersect", n, e), !n.label) return q.rect(n, e);
1981
1981
  let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1982
1982
  return o = m ? [
1983
1983
  {
@@ -1990,11 +1990,11 @@ async function ut(e, n, { config: { themeVariables: r, flowchart: i } }) {
1990
1990
  },
1991
1991
  {
1992
1992
  x: r + d.width / 2,
1993
- y: i - a / 2 + d.height + D
1993
+ y: i - a / 2 + d.height + E
1994
1994
  },
1995
1995
  {
1996
1996
  x: r + g / 2,
1997
- y: i - a / 2 + d.height + D
1997
+ y: i - a / 2 + d.height + E
1998
1998
  },
1999
1999
  {
2000
2000
  x: r + g / 2,
@@ -2006,11 +2006,11 @@ async function ut(e, n, { config: { themeVariables: r, flowchart: i } }) {
2006
2006
  },
2007
2007
  {
2008
2008
  x: r - g / 2,
2009
- y: i - a / 2 + d.height + D
2009
+ y: i - a / 2 + d.height + E
2010
2010
  },
2011
2011
  {
2012
2012
  x: r - d.width / 2,
2013
- y: i - a / 2 + d.height + D
2013
+ y: i - a / 2 + d.height + E
2014
2014
  }
2015
2015
  ] : [
2016
2016
  {
@@ -2045,34 +2045,34 @@ async function ut(e, n, { config: { themeVariables: r, flowchart: i } }) {
2045
2045
  x: r - g / 2,
2046
2046
  y: i - a / 2 + h
2047
2047
  }
2048
- ], K.polygon(n, o, e);
2048
+ ], q.polygon(n, o, e);
2049
2049
  }, u;
2050
2050
  }
2051
- e(ut, "iconSquare");
2052
- async function dt(e, n, { config: { flowchart: r } }) {
2051
+ e(pt, "iconSquare");
2052
+ async function mt(e, n, { config: { flowchart: r } }) {
2053
2053
  let i = new Image();
2054
2054
  i.src = n?.img ?? "", await i.decode();
2055
2055
  let a = Number(i.naturalWidth.toString().replace("px", "")), o = Number(i.naturalHeight.toString().replace("px", ""));
2056
2056
  n.imageAspectRatio = a / o;
2057
- let { labelStyles: s } = x(n);
2057
+ let { labelStyles: s } = C(n);
2058
2058
  n.labelStyle = s;
2059
2059
  let c = r?.wrappingWidth;
2060
2060
  n.defaultWidth = r?.wrappingWidth;
2061
2061
  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;
2062
2062
  n.width = Math.max(u, c ?? 0);
2063
- let { shapeSvg: f, bbox: p, label: m } = await P(e, n, "image-shape default"), h = n.pos === "t", g = -u / 2, _ = -d / 2, v = n.label ? 8 : 0, y = T.svg(f), S = b(n, {});
2064
- n.look !== "handDrawn" && (S.roughness = 0, S.fillStyle = "solid");
2065
- let C = y.rectangle(g, _, u, d, S), w = Math.max(u, p.width), E = d + p.height + v, D = y.rectangle(-w / 2, -E / 2, w, E, {
2066
- ...S,
2063
+ let { shapeSvg: f, bbox: p, label: m } = await I(e, n, "image-shape default"), h = n.pos === "t", g = -u / 2, _ = -d / 2, v = n.label ? 8 : 0, y = D.svg(f), b = S(n, {});
2064
+ n.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2065
+ let x = y.rectangle(g, _, u, d, b), w = Math.max(u, p.width), T = d + p.height + v, E = y.rectangle(-w / 2, -T / 2, w, T, {
2066
+ ...b,
2067
2067
  fill: "none",
2068
2068
  stroke: "none"
2069
- }), O = f.insert(() => C, ":first-child"), k = f.insert(() => D);
2069
+ }), O = f.insert(() => x, ":first-child"), k = f.insert(() => E);
2070
2070
  if (n.img) {
2071
2071
  let e = f.append("image");
2072
- e.attr("href", n.img), e.attr("width", u), e.attr("height", d), e.attr("preserveAspectRatio", "none"), e.attr("transform", `translate(${-u / 2},${h ? E / 2 - d : -E / 2})`);
2072
+ e.attr("href", n.img), e.attr("width", u), e.attr("height", d), e.attr("preserveAspectRatio", "none"), e.attr("transform", `translate(${-u / 2},${h ? T / 2 - d : -T / 2})`);
2073
2073
  }
2074
- 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})`), O.attr("transform", `translate(0,${h ? p.height / 2 + v / 2 : -p.height / 2 - v / 2})`), I(n, k), n.intersect = function(e) {
2075
- if (t.info("iconSquare intersect", n, e), !n.label) return K.rect(n, e);
2074
+ 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})`), O.attr("transform", `translate(0,${h ? p.height / 2 + v / 2 : -p.height / 2 - v / 2})`), R(n, k), n.intersect = function(e) {
2075
+ if (t.info("iconSquare intersect", n, e), !n.label) return q.rect(n, e);
2076
2076
  let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
2077
2077
  return o = h ? [
2078
2078
  {
@@ -2140,14 +2140,14 @@ async function dt(e, n, { config: { flowchart: r } }) {
2140
2140
  x: r - u / 2,
2141
2141
  y: i - a / 2 + d
2142
2142
  }
2143
- ], K.polygon(n, o, e);
2143
+ ], q.polygon(n, o, e);
2144
2144
  }, f;
2145
2145
  }
2146
- e(dt, "imageSquare");
2147
- async function ft(e, t) {
2148
- let { labelStyles: n, nodeStyles: r } = x(t);
2146
+ e(mt, "imageSquare");
2147
+ async function ht(e, t) {
2148
+ let { labelStyles: n, nodeStyles: r } = C(t);
2149
2149
  t.labelStyle = n;
2150
- let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await P(e, t, L(t)), l = Math.max(c.height + a * 2, t.height ?? 0), u = Math.max(c.width + o * 2, (t.width ?? 0) - l), d = [
2150
+ let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await I(e, t, z(t)), l = Math.max(c.height + a * 2, t.height ?? 0), u = Math.max(c.width + o * 2, (t.width ?? 0) - l), d = [
2151
2151
  {
2152
2152
  x: 0,
2153
2153
  y: 0
@@ -2166,25 +2166,25 @@ async function ft(e, t) {
2166
2166
  }
2167
2167
  ], f, { cssStyles: p } = t;
2168
2168
  if (t.look === "handDrawn") {
2169
- let e = T.svg(s), n = b(t, {}), r = R(d), i = e.path(r, n);
2169
+ let e = D.svg(s), n = S(t, {}), r = B(d), i = e.path(r, n);
2170
2170
  f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
2171
- } else f = J(s, u, l, d);
2172
- return r && f.attr("style", r), t.width = u, t.height = l, I(t, f), t.intersect = function(e) {
2173
- return K.polygon(t, d, e);
2171
+ } else f = Y(s, u, l, d);
2172
+ return r && f.attr("style", r), t.width = u, t.height = l, R(t, f), t.intersect = function(e) {
2173
+ return q.polygon(t, d, e);
2174
2174
  }, s;
2175
2175
  }
2176
- e(ft, "inv_trapezoid");
2177
- async function pt(e, t) {
2178
- let { shapeSvg: n, bbox: r, label: i } = await P(e, t, "label"), a = n.insert("rect", ":first-child");
2179
- 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))})`), I(t, a), t.intersect = function(e) {
2180
- return K.rect(t, e);
2176
+ e(ht, "inv_trapezoid");
2177
+ async function gt(e, t) {
2178
+ let { shapeSvg: n, bbox: r, label: i } = await I(e, t, "label"), a = n.insert("rect", ":first-child");
2179
+ 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))})`), R(t, a), t.intersect = function(e) {
2180
+ return q.rect(t, e);
2181
2181
  }, n;
2182
2182
  }
2183
- e(pt, "labelRect");
2184
- async function mt(e, t) {
2185
- let { labelStyles: n, nodeStyles: r } = x(t);
2183
+ e(gt, "labelRect");
2184
+ async function _t(e, t) {
2185
+ let { labelStyles: n, nodeStyles: r } = C(t);
2186
2186
  t.labelStyle = n;
2187
- let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await P(e, t, L(t)), l = Math.max(c.height + a, t.height ?? 0), u = Math.max(c.width + o, (t.width ?? 0) - l), d = [
2187
+ let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await I(e, t, z(t)), l = Math.max(c.height + a, t.height ?? 0), u = Math.max(c.width + o, (t.width ?? 0) - l), d = [
2188
2188
  {
2189
2189
  x: 0,
2190
2190
  y: 0
@@ -2203,18 +2203,18 @@ async function mt(e, t) {
2203
2203
  }
2204
2204
  ], f, { cssStyles: p } = t;
2205
2205
  if (t.look === "handDrawn") {
2206
- let e = T.svg(s), n = b(t, {}), r = R(d), i = e.path(r, n);
2206
+ let e = D.svg(s), n = S(t, {}), r = B(d), i = e.path(r, n);
2207
2207
  f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
2208
- } else f = J(s, u, l, d);
2209
- return r && f.attr("style", r), t.width = u, t.height = l, I(t, f), t.intersect = function(e) {
2210
- return K.polygon(t, d, e);
2208
+ } else f = Y(s, u, l, d);
2209
+ return r && f.attr("style", r), t.width = u, t.height = l, R(t, f), t.intersect = function(e) {
2210
+ return q.polygon(t, d, e);
2211
2211
  }, s;
2212
2212
  }
2213
- e(mt, "lean_left");
2214
- async function ht(e, t) {
2215
- let { labelStyles: n, nodeStyles: r } = x(t);
2213
+ e(_t, "lean_left");
2214
+ async function vt(e, t) {
2215
+ let { labelStyles: n, nodeStyles: r } = C(t);
2216
2216
  t.labelStyle = n;
2217
- let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await P(e, t, L(t)), l = Math.max(c.height + a, t.height ?? 0), u = Math.max(c.width + o, (t.width ?? 0) - l), d = [
2217
+ let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await I(e, t, z(t)), l = Math.max(c.height + a, t.height ?? 0), u = Math.max(c.width + o, (t.width ?? 0) - l), d = [
2218
2218
  {
2219
2219
  x: -3 * l / 6,
2220
2220
  y: 0
@@ -2233,18 +2233,18 @@ async function ht(e, t) {
2233
2233
  }
2234
2234
  ], f, { cssStyles: p } = t;
2235
2235
  if (t.look === "handDrawn") {
2236
- let e = T.svg(s), n = b(t, {}), r = R(d), i = e.path(r, n);
2236
+ let e = D.svg(s), n = S(t, {}), r = B(d), i = e.path(r, n);
2237
2237
  f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
2238
- } else f = J(s, u, l, d);
2239
- return r && f.attr("style", r), t.width = u, t.height = l, I(t, f), t.intersect = function(e) {
2240
- return K.polygon(t, d, e);
2238
+ } else f = Y(s, u, l, d);
2239
+ return r && f.attr("style", r), t.width = u, t.height = l, R(t, f), t.intersect = function(e) {
2240
+ return q.polygon(t, d, e);
2241
2241
  }, s;
2242
2242
  }
2243
- e(ht, "lean_right");
2244
- function gt(e, n) {
2245
- let { labelStyles: r, nodeStyles: i } = x(n);
2243
+ e(vt, "lean_right");
2244
+ function yt(e, n) {
2245
+ let { labelStyles: r, nodeStyles: i } = C(n);
2246
2246
  n.label = "", n.labelStyle = r;
2247
- let a = e.insert("g").attr("class", L(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 = [
2247
+ let a = e.insert("g").attr("class", z(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 = [
2248
2248
  {
2249
2249
  x: s,
2250
2250
  y: 0
@@ -2269,15 +2269,15 @@ function gt(e, n) {
2269
2269
  x: 14,
2270
2270
  y: c - 7 / 2
2271
2271
  }
2272
- ], u = T.svg(a), d = b(n, {});
2272
+ ], u = D.svg(a), d = S(n, {});
2273
2273
  n.look !== "handDrawn" && (d.roughness = 0, d.fillStyle = "solid");
2274
- let f = R(l), p = u.path(f, d), m = a.insert(() => p, ":first-child");
2275
- 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})`), I(n, m), n.intersect = function(e) {
2276
- return t.info("lightningBolt intersect", n, e), K.polygon(n, l, e);
2274
+ let f = B(l), p = u.path(f, d), m = a.insert(() => p, ":first-child");
2275
+ 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})`), R(n, m), n.intersect = function(e) {
2276
+ return t.info("lightningBolt intersect", n, e), q.polygon(n, l, e);
2277
2277
  }, a;
2278
2278
  }
2279
- e(gt, "lightningBolt");
2280
- var _t = /* @__PURE__ */ e((e, t, n, r, i, a, o) => [
2279
+ e(yt, "lightningBolt");
2280
+ var bt = /* @__PURE__ */ e((e, t, n, r, i, a, o) => [
2281
2281
  `M${e},${t + a}`,
2282
2282
  `a${i},${a} 0,0,0 ${n},0`,
2283
2283
  `a${i},${a} 0,0,0 ${-n},0`,
@@ -2286,7 +2286,7 @@ var _t = /* @__PURE__ */ e((e, t, n, r, i, a, o) => [
2286
2286
  `l0,${-r}`,
2287
2287
  `M${e},${t + a + o}`,
2288
2288
  `a${i},${a} 0,0,0 ${n},0`
2289
- ].join(" "), "createCylinderPathD"), vt = /* @__PURE__ */ e((e, t, n, r, i, a, o) => [
2289
+ ].join(" "), "createCylinderPathD"), xt = /* @__PURE__ */ e((e, t, n, r, i, a, o) => [
2290
2290
  `M${e},${t + a}`,
2291
2291
  `M${e + n},${t + a}`,
2292
2292
  `a${i},${a} 0,0,0 ${-n},0`,
@@ -2295,27 +2295,27 @@ var _t = /* @__PURE__ */ e((e, t, n, r, i, a, o) => [
2295
2295
  `l0,${-r}`,
2296
2296
  `M${e},${t + a + o}`,
2297
2297
  `a${i},${a} 0,0,0 ${n},0`
2298
- ].join(" "), "createOuterCylinderPathD"), yt = /* @__PURE__ */ e((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), bt = 10, xt = 10;
2299
- async function St(e, t) {
2300
- let { labelStyles: n, nodeStyles: r } = x(t);
2298
+ ].join(" "), "createOuterCylinderPathD"), St = /* @__PURE__ */ e((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), Ct = 10, wt = 10;
2299
+ async function Tt(e, t) {
2300
+ let { labelStyles: n, nodeStyles: r } = C(t);
2301
2301
  t.labelStyle = n;
2302
2302
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 24 : i;
2303
2303
  if (t.width || t.height) {
2304
2304
  let e = t.width ?? 0;
2305
- t.width = (t.width ?? 0) - a, t.width < xt && (t.width = xt);
2305
+ t.width = (t.width ?? 0) - a, t.width < wt && (t.width = wt);
2306
2306
  let n = e / 2 / (2.5 + e / 50);
2307
- t.height = (t.height ?? 0) - o - n * 3, t.height < bt && (t.height = bt);
2307
+ t.height = (t.height ?? 0) - o - n * 3, t.height < Ct && (t.height = Ct);
2308
2308
  }
2309
- let { shapeSvg: s, bbox: c, label: l } = await P(e, t, L(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;
2309
+ let { shapeSvg: s, bbox: c, label: l } = await I(e, t, z(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;
2310
2310
  if (t.look === "handDrawn") {
2311
- let e = T.svg(s), n = vt(0, 0, u, m, d, f, h), r = yt(0, f, u, m, d, f), i = b(t, {}), a = e.path(n, i), o = e.path(r, i);
2311
+ let e = D.svg(s), n = xt(0, 0, u, m, d, f, h), r = St(0, f, u, m, d, f), i = S(t, {}), a = e.path(n, i), o = e.path(r, i);
2312
2312
  s.insert(() => o, ":first-child").attr("class", "line"), g = s.insert(() => a, ":first-child"), g.attr("class", "basic label-container"), _ && g.attr("style", _);
2313
2313
  } else {
2314
- let e = _t(0, 0, u, m, d, f, h);
2314
+ let e = bt(0, 0, u, m, d, f, h);
2315
2315
  g = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", p(_)).attr("style", r);
2316
2316
  }
2317
- return g.attr("label-offset-y", f), g.attr("transform", `translate(${-u / 2}, ${-(m / 2 + f)})`), I(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) {
2318
- let n = K.rect(t, e), r = n.x - (t.x ?? 0);
2317
+ return g.attr("label-offset-y", f), g.attr("transform", `translate(${-u / 2}, ${-(m / 2 + f)})`), R(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) {
2318
+ let n = q.rect(t, e), r = n.x - (t.x ?? 0);
2319
2319
  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)) {
2320
2320
  let i = f * f * (1 - r * r / (d * d));
2321
2321
  i > 0 && (i = Math.sqrt(i)), i = f - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
@@ -2323,13 +2323,13 @@ async function St(e, t) {
2323
2323
  return n;
2324
2324
  }, s;
2325
2325
  }
2326
- e(St, "linedCylinder");
2327
- async function Ct(e, t) {
2328
- let { labelStyles: n, nodeStyles: r } = x(t);
2326
+ e(Tt, "linedCylinder");
2327
+ async function Et(e, t) {
2328
+ let { labelStyles: n, nodeStyles: r } = C(t);
2329
2329
  t.labelStyle = n;
2330
2330
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2331
2331
  (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));
2332
- let { shapeSvg: s, bbox: c, label: l } = await P(e, t, L(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 = T.svg(s), g = b(t, {});
2332
+ let { shapeSvg: s, bbox: c, label: l } = await I(e, t, z(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 = D.svg(s), g = S(t, {});
2333
2333
  t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
2334
2334
  let _ = [
2335
2335
  {
@@ -2340,7 +2340,7 @@ async function Ct(e, t) {
2340
2340
  x: -u / 2 - u / 2 * .1,
2341
2341
  y: p / 2
2342
2342
  },
2343
- ...z(-u / 2 - u / 2 * .1, p / 2, u / 2 + u / 2 * .1, p / 2, f, .8),
2343
+ ...V(-u / 2 - u / 2 * .1, p / 2, u / 2 + u / 2 * .1, p / 2, f, .8),
2344
2344
  {
2345
2345
  x: u / 2 + u / 2 * .1,
2346
2346
  y: -p / 2
@@ -2362,58 +2362,58 @@ async function Ct(e, t) {
2362
2362
  y: -p / 2
2363
2363
  }
2364
2364
  ], v = h.polygon(_.map((e) => [e.x, e.y]), g), y = s.insert(() => v, ":first-child");
2365
- return y.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && y.selectAll("path").attr("style", m), r && t.look !== "handDrawn" && y.selectAll("path").attr("style", r), y.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 - (c.y - (c.top ?? 0))})`), I(t, y), t.intersect = function(e) {
2366
- return K.polygon(t, _, e);
2365
+ return y.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && y.selectAll("path").attr("style", m), r && t.look !== "handDrawn" && y.selectAll("path").attr("style", r), y.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 - (c.y - (c.top ?? 0))})`), R(t, y), t.intersect = function(e) {
2366
+ return q.polygon(t, _, e);
2367
2367
  }, s;
2368
2368
  }
2369
- e(Ct, "linedWaveEdgedRect");
2370
- var wt = 56, Tt = 72, Et = 8, Dt = 2, Ot = 8, kt = {
2369
+ e(Et, "linedWaveEdgedRect");
2370
+ var Dt = 56, Ot = 72, kt = 8, At = 2, jt = 8, Mt = {
2371
2371
  normal: "usecase-actor-shape usecase-actor-normal",
2372
2372
  hollow: "usecase-actor-hollow",
2373
2373
  awesome: "usecase-actor-awesome",
2374
2374
  icon: "usecase-actor-icon"
2375
- }, At = Math.PI / 3, jt = .6, Mt = /* @__PURE__ */ e((e, t) => {
2376
- let n = t * jt, r = t * Math.sqrt(1 - jt ** 2), i = Math.cos(At), a = -Math.sin(At), o = n * -a, s = e + n * i, c = r * i, l = r * a;
2375
+ }, Nt = Math.PI / 3, Pt = .6, Ft = /* @__PURE__ */ e((e, t) => {
2376
+ let n = t * Pt, r = t * Math.sqrt(1 - Pt ** 2), i = Math.cos(Nt), a = -Math.sin(Nt), o = n * -a, s = e + n * i, c = r * i, l = r * a;
2377
2377
  return `M ${o - c} ${s - l} L ${o + c} ${s + l}`;
2378
- }, "businessMarkerPathForCircle"), Nt = {
2379
- normal: Mt(-24, 12),
2380
- hollow: Mt(-23, 9),
2381
- awesome: Mt(-21, 13),
2378
+ }, "businessMarkerPathForCircle"), It = {
2379
+ normal: Ft(-24, 12),
2380
+ hollow: Ft(-23, 9),
2381
+ awesome: Ft(-21, 13),
2382
2382
  icon: "M 12 -8 L 26 -26"
2383
- }, Pt = /* @__PURE__ */ e((e, t, n) => {
2383
+ }, Lt = /* @__PURE__ */ e((e, t, n) => {
2384
2384
  let r = (t.x ?? 0) - (t.left ?? 0), i = (t.y ?? 0) - (t.top ?? 0);
2385
2385
  e.attr("transform", `translate(${-t.width / 2 - r},${n - t.height / 2 - i})`);
2386
- }, "positionLabel"), Ft = /* @__PURE__ */ e((e, t, n, r, i = !1) => {
2386
+ }, "positionLabel"), Rt = /* @__PURE__ */ e((e, t, n, r, i = !1) => {
2387
2387
  if (t.look === "handDrawn") {
2388
- let a = T.svg(e).path(n, b(t, i ? { fill: "none" } : {}));
2388
+ let a = D.svg(e).path(n, S(t, i ? { fill: "none" } : {}));
2389
2389
  return e.insert(() => a, ":first-child").attr("class", r);
2390
2390
  }
2391
2391
  let a = e.append("path").attr("class", r).attr("d", n);
2392
2392
  return i && a.attr("fill", "none"), a;
2393
- }, "appendActorPath"), It = /* @__PURE__ */ e((e, t, n, r, i, a, o = !1) => {
2393
+ }, "appendActorPath"), zt = /* @__PURE__ */ e((e, t, n, r, i, a, o = !1) => {
2394
2394
  if (t.look === "handDrawn") {
2395
- let s = T.svg(e).circle(n, r, i * 2, b(t, o ? { fill: "none" } : {}));
2395
+ let s = D.svg(e).circle(n, r, i * 2, S(t, o ? { fill: "none" } : {}));
2396
2396
  return e.insert(() => s, ":first-child").attr("class", a);
2397
2397
  }
2398
2398
  let s = e.append("circle").attr("class", a).attr("cx", n).attr("cy", r).attr("r", i);
2399
2399
  return o && s.attr("fill", "none"), s;
2400
- }, "appendActorCircle"), Lt = /* @__PURE__ */ e((e, t, n) => {
2401
- t.business && e.append("path").attr("class", "usecase-business-marker usecase-actor-business-marker").attr("d", Nt[n]).attr("fill", "none").attr("style", "stroke: inherit !important; stroke-width: inherit !important");
2400
+ }, "appendActorCircle"), Bt = /* @__PURE__ */ e((e, t, n) => {
2401
+ t.business && e.append("path").attr("class", "usecase-business-marker usecase-actor-business-marker").attr("d", It[n]).attr("fill", "none").attr("style", "stroke: inherit !important; stroke-width: inherit !important");
2402
2402
  }, "appendBusinessActorMarker");
2403
- async function Rt(e, t, n, r) {
2404
- let { labelStyles: i, nodeStyles: o } = x(t);
2403
+ async function Vt(e, t, n, r) {
2404
+ let { labelStyles: i, nodeStyles: o } = C(t);
2405
2405
  t.labelStyle = i;
2406
- let { shapeSvg: s, bbox: c, label: l } = await P(e, n === "icon" || t.stereotype !== void 0 ? {
2406
+ let { shapeSvg: s, bbox: c, label: l } = await I(e, n === "icon" || t.stereotype !== void 0 ? {
2407
2407
  ...t,
2408
2408
  icon: n === "icon" ? void 0 : t.icon,
2409
2409
  stereotype: void 0
2410
- } : t, L(t, `usecase-actor-variant usecase-actor-${n}`)), u = t.accessibleName ?? t.label;
2410
+ } : t, z(t, `usecase-actor-variant usecase-actor-${n}`)), u = t.accessibleName ?? t.label;
2411
2411
  u && s.attr("role", "img").attr("aria-label", u), l.attr("class", "label actor-label usecase-actor-label");
2412
2412
  let { theme: d, themeVariables: f } = a();
2413
- w(s, t.colorIndex, d, f.borderColorArray);
2413
+ E(s, t.colorIndex, d, f.borderColorArray);
2414
2414
  let p, m;
2415
2415
  if (t.stereotype) {
2416
- let e = await F(s, `\xAB${t.stereotype}\xBB`, {
2416
+ let e = await L(s, `\xAB${t.stereotype}\xBB`, {
2417
2417
  labelStyle: i,
2418
2418
  useHtmlLabels: t.useHtmlLabels,
2419
2419
  padding: 0,
@@ -2422,15 +2422,15 @@ async function Rt(e, t, n, r) {
2422
2422
  });
2423
2423
  p = e.label.attr("class", "label usecase-stereotype"), m = e.bbox;
2424
2424
  }
2425
- let h = s.append("g").attr("class", `usecase-actor-glyph ${kt[n]}`).attr("style", o || null);
2426
- await r(h, t), Lt(h, t, n);
2427
- let g = t.padding ?? Ot, _ = m?.height ?? 0, v = Tt + Et + c.height + (m ? _ + Dt : 0), y = Math.max(wt, c.width, m?.width ?? 0) + g * 2, b = v + g * 2, S = -v / 2;
2428
- h.attr("transform", `translate(0,${S + Tt / 2})`);
2429
- let C = S + Tt + Et;
2430
- return p && m && (C += _ / 2, Pt(p, m, C), C += _ / 2 + Dt), Pt(l, c, C + c.height / 2), I(t, s.insert("rect", ":first-child").attr("class", "usecase-actor-outline").attr("x", -y / 2).attr("y", -b / 2).attr("width", y).attr("height", b).attr("opacity", 0).attr("aria-hidden", "true")), t.intersect = (e) => K.rect(t, e), s;
2425
+ let h = s.append("g").attr("class", `usecase-actor-glyph ${Mt[n]}`).attr("style", o || null);
2426
+ await r(h, t), Bt(h, t, n);
2427
+ let g = t.padding ?? jt, _ = m?.height ?? 0, v = Ot + kt + c.height + (m ? _ + At : 0), y = Math.max(Dt, c.width, m?.width ?? 0) + g * 2, b = v + g * 2, x = -v / 2;
2428
+ h.attr("transform", `translate(0,${x + Ot / 2})`);
2429
+ let S = x + Ot + kt;
2430
+ return p && m && (S += _ / 2, Lt(p, m, S), S += _ / 2 + At), Lt(l, c, S + c.height / 2), R(t, s.insert("rect", ":first-child").attr("class", "usecase-actor-outline").attr("x", -y / 2).attr("y", -b / 2).attr("width", y).attr("height", b).attr("opacity", 0).attr("aria-hidden", "true")), t.intersect = (e) => q.rect(t, e), s;
2431
2431
  }
2432
- e(Rt, "renderUsecaseActor");
2433
- var zt = [
2432
+ e(Vt, "renderUsecaseActor");
2433
+ var Ht = [
2434
2434
  "M 0 -12",
2435
2435
  "C 6.627 -12 12 -17.373 12 -24",
2436
2436
  "C 12 -30.627 6.627 -36 0 -36",
@@ -2441,13 +2441,13 @@ var zt = [
2441
2441
  "M 0 8 L -15 28",
2442
2442
  "M 0 8 L 15 28"
2443
2443
  ].join(" ");
2444
- async function Bt(e, t) {
2445
- return Rt(e, t, "normal", (e, t) => {
2446
- Ft(e, t, zt, "usecase-actor-stick");
2444
+ async function Ut(e, t) {
2445
+ return Vt(e, t, "normal", (e, t) => {
2446
+ Rt(e, t, Ht, "usecase-actor-stick");
2447
2447
  });
2448
2448
  }
2449
- e(Bt, "usecaseActor");
2450
- var Vt = [
2449
+ e(Ut, "usecaseActor");
2450
+ var Wt = [
2451
2451
  "M 0 -34",
2452
2452
  "C 7.18 -34 13 -28.18 13 -21",
2453
2453
  "C 13 -13.82 7.18 -8 0 -8",
@@ -2460,13 +2460,13 @@ var Vt = [
2460
2460
  "H -18",
2461
2461
  "C -21 30 -24 28 -24 25 Z"
2462
2462
  ].join(" ");
2463
- async function Ht(e, t) {
2464
- return Rt(e, t, "awesome", (e, t) => {
2465
- Ft(e, t, Vt, "usecase-actor-awesome-silhouette");
2463
+ async function Gt(e, t) {
2464
+ return Vt(e, t, "awesome", (e, t) => {
2465
+ Rt(e, t, Wt, "usecase-actor-awesome-silhouette");
2466
2466
  });
2467
2467
  }
2468
- e(Ht, "usecaseActorAwesome");
2469
- var Ut = [
2468
+ e(Gt, "usecaseActorAwesome");
2469
+ var Kt = [
2470
2470
  "M -22 -10",
2471
2471
  "H 22",
2472
2472
  "V 0",
@@ -2480,46 +2480,46 @@ var Ut = [
2480
2480
  "H -22",
2481
2481
  "Z"
2482
2482
  ].join(" ");
2483
- async function Wt(e, t) {
2484
- return Rt(e, t, "hollow", (e, t) => {
2485
- It(e, t, 0, -23, 9, "usecase-actor-hollow-head", !0), Ft(e, t, Ut, "usecase-actor-hollow-body", !0);
2483
+ async function qt(e, t) {
2484
+ return Vt(e, t, "hollow", (e, t) => {
2485
+ zt(e, t, 0, -23, 9, "usecase-actor-hollow-head", !0), Rt(e, t, Kt, "usecase-actor-hollow-body", !0);
2486
2486
  });
2487
2487
  }
2488
- e(Wt, "usecaseActorHollow");
2489
- var Gt = 52, Kt = 42, qt = -2, Jt = /* @__PURE__ */ e(async (e, t) => {
2490
- let n = -Gt / 2, r = qt - Gt / 2;
2488
+ e(qt, "usecaseActorHollow");
2489
+ var Jt = 52, Yt = 42, Xt = -2, Zt = /* @__PURE__ */ e(async (e, t) => {
2490
+ let n = -Jt / 2, r = Xt - Jt / 2;
2491
2491
  if (t.look === "handDrawn") {
2492
- let i = T.svg(e).rectangle(n, r, Gt, Gt, b(t, {}));
2492
+ let i = D.svg(e).rectangle(n, r, Jt, Jt, S(t, {}));
2493
2493
  e.insert(() => i, ":first-child").attr("class", "usecase-actor-icon-frame");
2494
- } else e.append("rect").attr("class", "usecase-actor-icon-frame").attr("x", n).attr("y", r).attr("width", Gt).attr("height", Gt).attr("rx", 4).attr("ry", 4);
2495
- let i = t.icon ?? "", a = await g(i.includes(":") ? i : `fa:${i}`), o = await _(i, {
2496
- height: Kt,
2497
- width: Kt,
2494
+ } else e.append("rect").attr("class", "usecase-actor-icon-frame").attr("x", n).attr("y", r).attr("width", Jt).attr("height", Jt).attr("rx", 4).attr("ry", 4);
2495
+ let i = t.icon ?? "", a = await _(i.includes(":") ? i : `fa:${i}`), o = await y(i, {
2496
+ height: Yt,
2497
+ width: Yt,
2498
2498
  fallbackPrefix: "fa"
2499
2499
  }), s = e.append("g").attr("class", `usecase-actor-icon-symbol${a ? "" : " usecase-actor-icon-fallback"}`).attr("aria-hidden", "true").html(`<g>${o}</g>`), c = s.node()?.getBBox();
2500
- c && s.attr("transform", `translate(${-c.width / 2 - c.x},${qt - c.height / 2 - c.y})`);
2500
+ c && s.attr("transform", `translate(${-c.width / 2 - c.x},${Xt - c.height / 2 - c.y})`);
2501
2501
  }, "drawIconActor");
2502
- async function Yt(e, t) {
2503
- return Rt(e, t, "icon", Jt);
2502
+ async function Qt(e, t) {
2503
+ return Vt(e, t, "icon", Zt);
2504
2504
  }
2505
- e(Yt, "usecaseActorIcon");
2506
- var Xt = /* @__PURE__ */ e((e, t, n) => {
2505
+ e(Qt, "usecaseActorIcon");
2506
+ var $t = /* @__PURE__ */ e((e, t, n) => {
2507
2507
  let r = (t.x ?? 0) - (t.left ?? 0), i = (t.y ?? 0) - (t.top ?? 0);
2508
2508
  e.attr("transform", `translate(${-t.width / 2 - r},${n - t.height / 2 - i})`);
2509
2509
  }, "positionLabel");
2510
- async function Zt(e, t) {
2511
- let n = t, { labelStyles: r, nodeStyles: i } = x(t);
2510
+ async function en(e, t) {
2511
+ let n = t, { labelStyles: r, nodeStyles: i } = C(t);
2512
2512
  t.labelStyle = r;
2513
- let { shapeSvg: o, bbox: s, halfPadding: c, label: l } = await P(e, n.stereotype ? {
2513
+ let { shapeSvg: o, bbox: s, halfPadding: c, label: l } = await I(e, n.stereotype ? {
2514
2514
  ...t,
2515
2515
  stereotype: void 0
2516
- } : t, L(t, "usecase-business-shape"));
2516
+ } : t, z(t, "usecase-business-shape"));
2517
2517
  l.attr("class", "label usecase-label");
2518
2518
  let { theme: u, themeVariables: d } = a();
2519
- w(o, t.colorIndex, u, d.borderColorArray);
2519
+ E(o, t.colorIndex, u, d.borderColorArray);
2520
2520
  let f, p;
2521
2521
  if (n.stereotype) {
2522
- let e = await F(o, `\xAB${n.stereotype}\xBB`, {
2522
+ let e = await L(o, `\xAB${n.stereotype}\xBB`, {
2523
2523
  labelStyle: r,
2524
2524
  useHtmlLabels: t.useHtmlLabels,
2525
2525
  padding: 0,
@@ -2528,38 +2528,38 @@ async function Zt(e, t) {
2528
2528
  });
2529
2529
  f = e.label.attr("class", "label usecase-stereotype"), p = e.bbox;
2530
2530
  }
2531
- let m = p ? 2 : 0, h = s.height + (p?.height ?? 0) + m, g = Math.max(s.width, p?.width ?? 0), _ = c ?? 10, v = g / 2 + _ * 2, y = h / 2 + _ * 2, S = Math.min(Math.max(_ / 5, 1), _ / 2), C = g / 2 + S, E = v - S, D = C / v, O = E / v, k = y * Math.sqrt(Math.max(0, 1 - D * D)), A = -y * Math.sqrt(Math.max(0, 1 - O * O));
2532
- f && p && Xt(f, p, -h / 2 + p.height / 2), Xt(l, s, h / 2 - s.height / 2);
2531
+ let m = p ? 2 : 0, h = s.height + (p?.height ?? 0) + m, g = Math.max(s.width, p?.width ?? 0), _ = c ?? 10, v = g / 2 + _ * 2, y = h / 2 + _ * 2, b = Math.min(Math.max(_ / 5, 1), _ / 2), x = g / 2 + b, w = v - b, T = x / v, O = w / v, k = y * Math.sqrt(Math.max(0, 1 - T * T)), A = -y * Math.sqrt(Math.max(0, 1 - O * O));
2532
+ f && p && $t(f, p, -h / 2 + p.height / 2), $t(l, s, h / 2 - s.height / 2);
2533
2533
  let j;
2534
2534
  if (t.look === "handDrawn") {
2535
- let e = T.svg(o).ellipse(0, 0, v * 2, y * 2, b(t, {}));
2535
+ let e = D.svg(o).ellipse(0, 0, v * 2, y * 2, S(t, {}));
2536
2536
  j = o.insert(() => e, ":first-child").attr("class", "basic label-container usecase-business-ellipse");
2537
2537
  } else j = o.insert("ellipse", ":first-child").attr("class", "basic label-container usecase-business-ellipse").attr("style", i).attr("rx", v).attr("ry", y).attr("cx", 0).attr("cy", 0);
2538
- o.append("path").attr("class", "usecase-business-marker").attr("d", `M ${C} ${k} L ${E} ${A}`).attr("fill", "none").attr("style", i || null);
2538
+ o.append("path").attr("class", "usecase-business-marker").attr("d", `M ${x} ${k} L ${w} ${A}`).attr("fill", "none").attr("style", i || null);
2539
2539
  let M = n.accessibleName ?? n.label;
2540
- return M && o.attr("role", "img").attr("aria-label", M), I(t, j), t.calcIntersect = (e, t) => K.ellipse(e, e.width / 2, e.height / 2, t), t.intersect = (e) => K.ellipse(t, v, y, e), o;
2540
+ return M && o.attr("role", "img").attr("aria-label", M), R(t, j), t.calcIntersect = (e, t) => q.ellipse(e, e.width / 2, e.height / 2, t), t.intersect = (e) => q.ellipse(t, v, y, e), o;
2541
2541
  }
2542
- e(Zt, "usecaseBusiness");
2543
- var Qt = 8, $t = 4, en = 1, tn = /* @__PURE__ */ e((e, t, n, r) => {
2542
+ e(en, "usecaseBusiness");
2543
+ var tn = 8, nn = 4, rn = 1, an = /* @__PURE__ */ e((e, t, n, r) => {
2544
2544
  let i = (t.x ?? 0) - (t.left ?? 0), a = (t.y ?? 0) - (t.top ?? 0);
2545
2545
  e.attr("transform", `translate(${n - t.width / 2 - i},${r - t.height / 2 - a})`);
2546
- }, "positionLabel"), nn = /* @__PURE__ */ e((e) => {
2546
+ }, "positionLabel"), on = /* @__PURE__ */ e((e) => {
2547
2547
  let t = Number.parseFloat(e ?? "");
2548
- return Number.isFinite(t) && t >= 0 ? t : en;
2548
+ return Number.isFinite(t) && t >= 0 ? t : rn;
2549
2549
  }, "numericStrokeWidth");
2550
- async function rn(t, n) {
2551
- let r = n, { labelStyles: i, nodeStyles: a } = x(n), { stylesMap: o } = C(n);
2550
+ async function sn(t, n) {
2551
+ let r = n, { labelStyles: i, nodeStyles: a } = C(n), { stylesMap: o } = T(n);
2552
2552
  n.labelStyle = i;
2553
- let { shapeSvg: s, bbox: c, label: l } = await P(t, n, L(n, "usecase-json-table"));
2553
+ let { shapeSvg: s, bbox: c, label: l } = await I(t, n, z(n, "usecase-json-table"));
2554
2554
  s.attr("role", "img"), r.accessibleName && s.attr("aria-label", r.accessibleName), l.attr("class", "label usecase-json-title");
2555
2555
  let u = s.append("g").attr("class", "usecase-json-table-grid"), d = [];
2556
2556
  for (let e of r.jsonRows ?? []) {
2557
- let t = await F(u, e.key, {
2557
+ let t = await L(u, e.key, {
2558
2558
  labelStyle: i,
2559
2559
  useHtmlLabels: n.useHtmlLabels,
2560
2560
  padding: 0,
2561
2561
  centerLabel: !0
2562
- }), r = await F(u, e.value, {
2562
+ }), r = await L(u, e.value, {
2563
2563
  labelStyle: i,
2564
2564
  useHtmlLabels: n.useHtmlLabels,
2565
2565
  padding: 0,
@@ -2576,27 +2576,27 @@ async function rn(t, n) {
2576
2576
  }
2577
2577
  });
2578
2578
  }
2579
- let f = Math.max(0, ...d.map(({ key: e }) => e.bbox.width)) + Qt * 2, p = Math.max(0, ...d.map(({ value: e }) => e.bbox.width)) + Qt * 2, m = c.width + Qt * 2, h = Math.max(m, f + p), g = p + Math.max(0, h - f - p), _ = c.height + $t * 2, v = d.map(({ key: e, value: t }) => Math.max(e.bbox.height, t.bbox.height) + $t * 2), y = _ + v.reduce((e, t) => e + t, 0), S = nn(o.get("stroke-width")), w = h + S * 2, E = y + S * 2, D = -h / 2, O = -y / 2, k = n.look === "handDrawn" ? T.svg(s) : void 0, A = k ? b(n, {}) : void 0, j = /* @__PURE__ */ e((e, t, n, r, i, o) => {
2579
+ let f = Math.max(0, ...d.map(({ key: e }) => e.bbox.width)) + tn * 2, p = Math.max(0, ...d.map(({ value: e }) => e.bbox.width)) + tn * 2, m = c.width + tn * 2, h = Math.max(m, f + p), g = p + Math.max(0, h - f - p), _ = c.height + nn * 2, v = d.map(({ key: e, value: t }) => Math.max(e.bbox.height, t.bbox.height) + nn * 2), y = _ + v.reduce((e, t) => e + t, 0), b = on(o.get("stroke-width")), x = h + b * 2, w = y + b * 2, E = -h / 2, O = -y / 2, k = n.look === "handDrawn" ? D.svg(s) : void 0, A = k ? S(n, {}) : void 0, j = /* @__PURE__ */ e((e, t, n, r, i, o) => {
2580
2580
  if (k && A) {
2581
2581
  let a = k.rectangle(n, r, i, o, A);
2582
2582
  return e.insert(() => a, ":first-child").attr("class", t);
2583
2583
  }
2584
2584
  return e.insert("rect", ":first-child").attr("class", t).attr("x", n).attr("y", r).attr("width", i).attr("height", o).attr("style", a);
2585
- }, "insertCell"), M = j(s, "label-container usecase-json-border", -w / 2, -E / 2, w, E);
2586
- j(u, "usecase-json-cell usecase-json-title-cell", D, O, h, _), u.node()?.append(l.node()), tn(l, c, 0, O + _ / 2);
2585
+ }, "insertCell"), M = j(s, "label-container usecase-json-border", -x / 2, -w / 2, x, w);
2586
+ j(u, "usecase-json-cell usecase-json-title-cell", E, O, h, _), u.node()?.append(l.node()), an(l, c, 0, O + _ / 2);
2587
2587
  let N = O + _;
2588
2588
  return d.forEach(({ key: e, value: t }, n) => {
2589
2589
  let r = v[n], i = u.append("g").attr("class", "usecase-json-row").attr("data-row-index", n).attr("transform", `translate(0,${N})`);
2590
- j(i, "usecase-json-cell usecase-json-key-cell", D, 0, f, r), j(i, "usecase-json-cell usecase-json-value-cell", D + f, 0, g, r), i.node()?.append(e.label.node(), t.label.node()), tn(e.label, e.bbox, D + f / 2, r / 2), tn(t.label, t.bbox, D + f + g / 2, r / 2), N += r;
2591
- }), I(n, M), n.intersect = (e) => K.rect(n, e), s;
2590
+ j(i, "usecase-json-cell usecase-json-key-cell", E, 0, f, r), j(i, "usecase-json-cell usecase-json-value-cell", E + f, 0, g, r), i.node()?.append(e.label.node(), t.label.node()), an(e.label, e.bbox, E + f / 2, r / 2), an(t.label, t.bbox, E + f + g / 2, r / 2), N += r;
2591
+ }), R(n, M), n.intersect = (e) => q.rect(n, e), s;
2592
2592
  }
2593
- e(rn, "usecaseJsonTable");
2594
- async function an(e, t) {
2595
- let { labelStyles: n, nodeStyles: r } = x(t);
2593
+ e(sn, "usecaseJsonTable");
2594
+ async function cn(e, t) {
2595
+ let { labelStyles: n, nodeStyles: r } = C(t);
2596
2596
  t.labelStyle = n;
2597
2597
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = t.look === "neo" ? 10 : 5;
2598
2598
  (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));
2599
- let { shapeSvg: c, bbox: l, label: u } = await P(e, t, L(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 = T.svg(c), y = b(t, {}), S = [
2599
+ let { shapeSvg: c, bbox: l, label: u } = await I(e, t, z(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 = D.svg(c), y = S(t, {}), b = [
2600
2600
  {
2601
2601
  x: h - s,
2602
2602
  y: g + s
@@ -2645,7 +2645,7 @@ async function an(e, t) {
2645
2645
  x: h,
2646
2646
  y: g + s
2647
2647
  }
2648
- ], C = [
2648
+ ], x = [
2649
2649
  {
2650
2650
  x: h,
2651
2651
  y: g + s
@@ -2672,20 +2672,20 @@ async function an(e, t) {
2672
2672
  }
2673
2673
  ];
2674
2674
  t.look !== "handDrawn" && (y.roughness = 0, y.fillStyle = "solid");
2675
- let w = R(S), E = v.path(w, y), D = R(C), O = v.path(D, y);
2676
- t.look !== "handDrawn" && (E = ee(E), O = ee(O));
2675
+ let w = B(b), T = v.path(w, y), E = B(x), O = v.path(E, y);
2676
+ t.look !== "handDrawn" && (T = ee(T), O = ee(O));
2677
2677
  let k = c.insert("g", ":first-child");
2678
- return k.insert(() => E), k.insert(() => O), k.attr("class", "basic label-container outer-path"), _ && t.look !== "handDrawn" && k.selectAll("path").attr("style", _), r && t.look !== "handDrawn" && k.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))})`), I(t, k), t.intersect = function(e) {
2679
- return K.polygon(t, S, e);
2678
+ return k.insert(() => T), k.insert(() => O), k.attr("class", "basic label-container outer-path"), _ && t.look !== "handDrawn" && k.selectAll("path").attr("style", _), r && t.look !== "handDrawn" && k.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))})`), R(t, k), t.intersect = function(e) {
2679
+ return q.polygon(t, b, e);
2680
2680
  }, c;
2681
2681
  }
2682
- e(an, "multiRect");
2683
- async function on(e, t) {
2684
- let { labelStyles: n, nodeStyles: r } = x(t);
2682
+ e(cn, "multiRect");
2683
+ async function ln(e, t) {
2684
+ let { labelStyles: n, nodeStyles: r } = C(t);
2685
2685
  t.labelStyle = n;
2686
- let { shapeSvg: i, bbox: a, label: o } = await P(e, t, L(t)), s = t.padding ?? 0, c = t.look === "neo" ? 16 : s, l = t.look === "neo" ? 12 : s, u = !0;
2686
+ let { shapeSvg: i, bbox: a, label: o } = await I(e, t, z(t)), s = t.padding ?? 0, c = t.look === "neo" ? 16 : s, l = t.look === "neo" ? 12 : s, u = !0;
2687
2687
  (t.width || t.height) && (u = !1, t.width = (t?.width ?? 0) - c * 2, t.height = (t?.height ?? 0) - l * 3);
2688
- 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 = z(h - 10, g + m + 10, h + d - 10, g + m + 10, p, .8), y = v?.[v.length - 1], S = [
2688
+ 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 = V(h - 10, g + m + 10, h + d - 10, g + m + 10, p, .8), y = v?.[v.length - 1], b = [
2689
2689
  {
2690
2690
  x: h - 10,
2691
2691
  y: g + 10
@@ -2731,7 +2731,7 @@ async function on(e, t) {
2731
2731
  x: h,
2732
2732
  y: g + 10
2733
2733
  }
2734
- ], C = [
2734
+ ], x = [
2735
2735
  {
2736
2736
  x: h,
2737
2737
  y: g + 10
@@ -2756,39 +2756,39 @@ async function on(e, t) {
2756
2756
  x: h,
2757
2757
  y: g
2758
2758
  }
2759
- ], w = T.svg(i), E = b(t, {});
2760
- t.look !== "handDrawn" && (E.roughness = 0, E.fillStyle = "solid");
2761
- let D = R(S), O = w.path(D, E), k = R(C), A = w.path(k, E), j = i.insert(() => O, ":first-child");
2762
- return j.insert(() => A), j.attr("class", "basic label-container outer-path"), _ && t.look !== "handDrawn" && j.selectAll("path").attr("style", _), r && t.look !== "handDrawn" && j.selectAll("path").attr("style", r), j.attr("transform", `translate(0,${-p / 2})`), o.attr("transform", `translate(${-(a.width / 2) - 10 - (a.x - (a.left ?? 0))}, ${-(a.height / 2) + 10 - p - (a.y - (a.top ?? 0))})`), I(t, j), t.intersect = function(e) {
2763
- return K.polygon(t, S, e);
2759
+ ], w = D.svg(i), T = S(t, {});
2760
+ t.look !== "handDrawn" && (T.roughness = 0, T.fillStyle = "solid");
2761
+ let E = B(b), O = w.path(E, T), k = B(x), A = w.path(k, T), j = i.insert(() => O, ":first-child");
2762
+ return j.insert(() => A), j.attr("class", "basic label-container outer-path"), _ && t.look !== "handDrawn" && j.selectAll("path").attr("style", _), r && t.look !== "handDrawn" && j.selectAll("path").attr("style", r), j.attr("transform", `translate(0,${-p / 2})`), o.attr("transform", `translate(${-(a.width / 2) - 10 - (a.x - (a.left ?? 0))}, ${-(a.height / 2) + 10 - p - (a.y - (a.top ?? 0))})`), R(t, j), t.intersect = function(e) {
2763
+ return q.polygon(t, b, e);
2764
2764
  }, i;
2765
2765
  }
2766
- e(on, "multiWaveEdgedRectangle");
2767
- async function sn(e, t, { config: { themeVariables: n } }) {
2768
- let { labelStyles: r, nodeStyles: i } = x(t);
2766
+ e(ln, "multiWaveEdgedRectangle");
2767
+ async function un(e, t, { config: { themeVariables: n } }) {
2768
+ let { labelStyles: r, nodeStyles: i } = C(t);
2769
2769
  t.labelStyle = r, t.useHtmlLabels || l(u()) || (t.centerLabel = !0);
2770
- let { shapeSvg: a, bbox: o, label: s } = await P(e, t, L(t)), c = Math.max(o.width + (t.padding ?? 0) * 2, t?.width ?? 0), d = Math.max(o.height + (t.padding ?? 0) * 2, t?.height ?? 0), f = -c / 2, p = -d / 2, { cssStyles: m } = t, h = T.svg(a), g = b(t, {
2770
+ let { shapeSvg: a, bbox: o, label: s } = await I(e, t, z(t)), c = Math.max(o.width + (t.padding ?? 0) * 2, t?.width ?? 0), d = Math.max(o.height + (t.padding ?? 0) * 2, t?.height ?? 0), f = -c / 2, p = -d / 2, { cssStyles: m } = t, h = D.svg(a), g = S(t, {
2771
2771
  fill: n.noteBkgColor,
2772
2772
  stroke: n.noteBorderColor
2773
2773
  });
2774
2774
  t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
2775
2775
  let _ = h.rectangle(f, p, c, d, g), v = a.insert(() => _, ":first-child");
2776
- 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))})`), I(t, v), t.intersect = function(e) {
2777
- return K.rect(t, e);
2776
+ 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))})`), R(t, v), t.intersect = function(e) {
2777
+ return q.rect(t, e);
2778
2778
  }, a;
2779
2779
  }
2780
- e(sn, "note");
2781
- var cn = /* @__PURE__ */ e((e, t, n) => [
2780
+ e(un, "note");
2781
+ var dn = /* @__PURE__ */ e((e, t, n) => [
2782
2782
  `M${e + n / 2},${t}`,
2783
2783
  `L${e + n},${t - n / 2}`,
2784
2784
  `L${e + n / 2},${t - n}`,
2785
2785
  `L${e},${t - n / 2}`,
2786
2786
  "Z"
2787
2787
  ].join(" "), "createDecisionBoxPathD");
2788
- async function ln(e, t) {
2789
- let { labelStyles: n, nodeStyles: r } = x(t);
2788
+ async function fn(e, t) {
2789
+ let { labelStyles: n, nodeStyles: r } = C(t);
2790
2790
  t.labelStyle = n;
2791
- let { shapeSvg: i, bbox: a } = await P(e, t, L(t)), o = a.width + (t.padding ?? 0) + (a.height + (t.padding ?? 0)), s = .5, c = [
2791
+ let { shapeSvg: i, bbox: a } = await I(e, t, z(t)), o = a.width + (t.padding ?? 0) + (a.height + (t.padding ?? 0)), s = .5, c = [
2792
2792
  {
2793
2793
  x: o / 2,
2794
2794
  y: 0
@@ -2807,10 +2807,10 @@ async function ln(e, t) {
2807
2807
  }
2808
2808
  ], l, { cssStyles: u } = t;
2809
2809
  if (t.look === "handDrawn") {
2810
- let e = T.svg(i), n = b(t, {}), r = cn(0, 0, o), a = e.path(r, n);
2810
+ let e = D.svg(i), n = S(t, {}), r = dn(0, 0, o), a = e.path(r, n);
2811
2811
  l = i.insert(() => a, ":first-child").attr("transform", `translate(${-o / 2 + s}, ${o / 2})`), u && l.attr("style", u);
2812
- } else l = J(i, o, o, c), l.attr("transform", `translate(${-o / 2 + s}, ${o / 2})`);
2813
- return r && l.attr("style", r), I(t, l), t.calcIntersect = function(e, t) {
2812
+ } else l = Y(i, o, o, c), l.attr("transform", `translate(${-o / 2 + s}, ${o / 2})`);
2813
+ return r && l.attr("style", r), R(t, l), t.calcIntersect = function(e, t) {
2814
2814
  let n = e.width, r = [
2815
2815
  {
2816
2816
  x: n / 2,
@@ -2829,16 +2829,16 @@ async function ln(e, t) {
2829
2829
  y: -n / 2
2830
2830
  }
2831
2831
  ];
2832
- return K.polygon(e, r, t);
2832
+ return q.polygon(e, r, t);
2833
2833
  }, t.intersect = function(e) {
2834
2834
  return this.calcIntersect(t, e);
2835
2835
  }, i;
2836
2836
  }
2837
- e(ln, "question");
2838
- async function un(e, t) {
2839
- let { labelStyles: n, nodeStyles: r } = x(t);
2837
+ e(fn, "question");
2838
+ async function pn(e, t) {
2839
+ let { labelStyles: n, nodeStyles: r } = C(t);
2840
2840
  t.labelStyle = n;
2841
- 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 P(e, t, L(t)), u = c.width + (t.look === "neo" ? a * 2 : a), d = Math.max(c.height + (t.look === "neo" ? o * 2 : o), t.height ?? 0), f = d / 4, p = -Math.max(u, (t.width ?? 0) - f) / 2, m = -d / 2, h = m / 2, g = [
2841
+ 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 I(e, t, z(t)), u = c.width + (t.look === "neo" ? a * 2 : a), d = Math.max(c.height + (t.look === "neo" ? o * 2 : o), t.height ?? 0), f = d / 4, p = -Math.max(u, (t.width ?? 0) - f) / 2, m = -d / 2, h = m / 2, g = [
2842
2842
  {
2843
2843
  x: p + h,
2844
2844
  y: m
@@ -2859,20 +2859,20 @@ async function un(e, t) {
2859
2859
  x: -p,
2860
2860
  y: m
2861
2861
  }
2862
- ], { cssStyles: _ } = t, v = T.svg(s), y = b(t, {});
2862
+ ], { cssStyles: _ } = t, v = D.svg(s), y = S(t, {});
2863
2863
  t.look !== "handDrawn" && (y.roughness = 0, y.fillStyle = "solid");
2864
- let S = R(g), C = v.path(S, y), w = s.insert(() => C, ":first-child");
2865
- return w.attr("class", "basic label-container outer-path"), _ && t.look !== "handDrawn" && w.selectAll("path").attr("style", _), r && t.look !== "handDrawn" && w.selectAll("path").attr("style", r), w.attr("transform", `translate(${-h / 2},0)`), l.attr("transform", `translate(${-h / 2 - c.width / 2 - (c.x - (c.left ?? 0))}, ${-(c.height / 2) - (c.y - (c.top ?? 0))})`), I(t, w), t.intersect = function(e) {
2866
- return K.polygon(t, g, e);
2864
+ let b = B(g), x = v.path(b, y), w = s.insert(() => x, ":first-child");
2865
+ return w.attr("class", "basic label-container outer-path"), _ && t.look !== "handDrawn" && w.selectAll("path").attr("style", _), r && t.look !== "handDrawn" && w.selectAll("path").attr("style", r), w.attr("transform", `translate(${-h / 2},0)`), l.attr("transform", `translate(${-h / 2 - c.width / 2 - (c.x - (c.left ?? 0))}, ${-(c.height / 2) - (c.y - (c.top ?? 0))})`), R(t, w), t.intersect = function(e) {
2866
+ return q.polygon(t, g, e);
2867
2867
  }, s;
2868
2868
  }
2869
- e(un, "rect_left_inv_arrow");
2870
- async function dn(e, r) {
2871
- let { labelStyles: i, nodeStyles: o } = x(r);
2869
+ e(pn, "rect_left_inv_arrow");
2870
+ async function mn(e, r) {
2871
+ let { labelStyles: i, nodeStyles: o } = C(r);
2872
2872
  r.labelStyle = i;
2873
2873
  let s;
2874
2874
  s = r.cssClasses ? "node " + r.cssClasses : "node default";
2875
- let c = e.insert("g").attr("class", s).attr("id", r.domId || r.id), u = c.insert("g"), d = c.insert("g").attr("class", "label").attr("style", o), f = r.description, p = r.label, m = await se(d, p, r.labelStyle, !0, !0), h = {
2875
+ let c = e.insert("g").attr("class", s).attr("id", r.domId || r.id), u = c.insert("g"), d = c.insert("g").attr("class", "label").attr("style", o), f = r.description, p = r.label, m = await ce(d, p, r.labelStyle, !0, !0), h = {
2876
2876
  width: 0,
2877
2877
  height: 0
2878
2878
  };
@@ -2881,23 +2881,23 @@ async function dn(e, r) {
2881
2881
  h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
2882
2882
  }
2883
2883
  t.info("Text 2", f);
2884
- let g = f || [], _ = m.getBBox(), v = await se(d, Array.isArray(g) ? g.join("<br/>") : g, r.labelStyle, !0, !0), y = v.children[0], S = n(v);
2885
- h = y.getBoundingClientRect(), S.attr("width", h.width), S.attr("height", h.height);
2886
- let C = (r.padding || 0) / 2;
2887
- 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) + ")");
2888
- let w = h.width + (r.padding || 0), E = h.height + (r.padding || 0), D = -h.width / 2 - C, O = -h.height / 2 - C, k, A;
2884
+ let g = f || [], _ = m.getBBox(), v = await ce(d, Array.isArray(g) ? g.join("<br/>") : g, r.labelStyle, !0, !0), y = v.children[0], b = n(v);
2885
+ h = y.getBoundingClientRect(), b.attr("width", h.width), b.attr("height", h.height);
2886
+ let x = (r.padding || 0) / 2;
2887
+ n(v).attr("transform", "translate( " + (h.width > _.width ? 0 : (_.width - h.width) / 2) + ", " + (_.height + x + 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 - x + 3) + ")");
2888
+ let w = h.width + (r.padding || 0), T = h.height + (r.padding || 0), E = -h.width / 2 - x, O = -h.height / 2 - x, k, A;
2889
2889
  if (r.look === "handDrawn") {
2890
- let e = T.svg(c), n = b(r, {}), i = e.path(q(D, O, w, 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);
2890
+ let e = D.svg(c), n = S(r, {}), i = e.path(J(E, O, w, T, r.rx || 0), n), a = e.line(-h.width / 2 - x, -h.height / 2 - x + _.height + x, h.width / 2 + x, -h.height / 2 - x + _.height + x, n);
2891
2891
  A = c.insert(() => (t.debug("Rough node insert CXC", i), a), ":first-child"), k = c.insert(() => (t.debug("Rough node insert CXC", i), i), ":first-child");
2892
- } else k = u.insert("rect", ":first-child"), A = u.insert("line"), k.attr("class", "outer title-state").attr("style", o).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)), A.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);
2893
- return I(r, k), r.intersect = function(e) {
2894
- return K.rect(r, e);
2892
+ } else k = u.insert("rect", ":first-child"), A = u.insert("line"), k.attr("class", "outer title-state").attr("style", o).attr("x", -h.width / 2 - x).attr("y", -h.height / 2 - x).attr("width", h.width + (r.padding || 0)).attr("height", h.height + (r.padding || 0)), A.attr("class", "divider").attr("x1", -h.width / 2 - x).attr("x2", h.width / 2 + x).attr("y1", -h.height / 2 - x + _.height + x).attr("y2", -h.height / 2 - x + _.height + x);
2893
+ return R(r, k), r.intersect = function(e) {
2894
+ return q.rect(r, e);
2895
2895
  }, c;
2896
2896
  }
2897
- e(dn, "rectWithTitle");
2898
- async function fn(e, t, { config: { themeVariables: n } }) {
2897
+ e(mn, "rectWithTitle");
2898
+ async function hn(e, t, { config: { themeVariables: n } }) {
2899
2899
  let r = n?.radius ?? 5;
2900
- return Ke(e, t, {
2900
+ return Ye(e, t, {
2901
2901
  rx: r,
2902
2902
  ry: r,
2903
2903
  classes: "",
@@ -2905,12 +2905,12 @@ async function fn(e, t, { config: { themeVariables: n } }) {
2905
2905
  labelPaddingY: (t?.padding ?? 0) * 1
2906
2906
  });
2907
2907
  }
2908
- e(fn, "roundedRect");
2909
- var pn = 8;
2910
- async function mn(e, t) {
2911
- let { labelStyles: n, nodeStyles: r } = x(t);
2908
+ e(hn, "roundedRect");
2909
+ var gn = 8;
2910
+ async function _n(e, t) {
2911
+ let { labelStyles: n, nodeStyles: r } = C(t);
2912
2912
  t.labelStyle = n;
2913
- let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0, { shapeSvg: o, bbox: s, label: c } = await P(e, t, L(t)), l = (t?.width ?? s.width) + i * 2 + (t.look === "neo" ? pn : pn * 2), u = (t?.height ?? s.height) + a * 2, d = l - pn, f = u, m = pn - l / 2, h = -u / 2, { cssStyles: g } = t, _ = T.svg(o), v = b(t, {});
2913
+ let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0, { shapeSvg: o, bbox: s, label: c } = await I(e, t, z(t)), l = (t?.width ?? s.width) + i * 2 + (t.look === "neo" ? gn : gn * 2), u = (t?.height ?? s.height) + a * 2, d = l - gn, f = u, m = gn - l / 2, h = -u / 2, { cssStyles: g } = t, _ = D.svg(o), v = S(t, {});
2914
2914
  t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
2915
2915
  let y = [
2916
2916
  {
@@ -2926,11 +2926,11 @@ async function mn(e, t) {
2926
2926
  y: h + f
2927
2927
  },
2928
2928
  {
2929
- x: m - pn,
2929
+ x: m - gn,
2930
2930
  y: h + f
2931
2931
  },
2932
2932
  {
2933
- x: m - pn,
2933
+ x: m - gn,
2934
2934
  y: h
2935
2935
  },
2936
2936
  {
@@ -2941,18 +2941,18 @@ async function mn(e, t) {
2941
2941
  x: m,
2942
2942
  y: h + f
2943
2943
  }
2944
- ], S = _.polygon(y.map((e) => [e.x, e.y]), v), C = o.insert(() => S, ":first-child");
2945
- 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(${pn / 2 - s.width / 2 - (s.x - (s.left ?? 0))}, ${-(s.height / 2) - (s.y - (s.top ?? 0))})`), I(t, C), t.intersect = function(e) {
2946
- return K.rect(t, e);
2944
+ ], b = _.polygon(y.map((e) => [e.x, e.y]), v), x = o.insert(() => b, ":first-child");
2945
+ return x.attr("class", "basic label-container outer-path").attr("style", p(g)), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), g && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), c.attr("transform", `translate(${gn / 2 - s.width / 2 - (s.x - (s.left ?? 0))}, ${-(s.height / 2) - (s.y - (s.top ?? 0))})`), R(t, x), t.intersect = function(e) {
2946
+ return q.rect(t, e);
2947
2947
  }, o;
2948
2948
  }
2949
- e(mn, "shadedProcess");
2950
- async function hn(e, t) {
2951
- let { labelStyles: n, nodeStyles: r } = x(t);
2949
+ e(_n, "shadedProcess");
2950
+ async function vn(e, t) {
2951
+ let { labelStyles: n, nodeStyles: r } = C(t);
2952
2952
  t.labelStyle = n;
2953
2953
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2954
2954
  (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));
2955
- let { shapeSvg: s, bbox: c, label: l } = await P(e, t, L(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, _ = T.svg(s), v = b(t, {});
2955
+ let { shapeSvg: s, bbox: c, label: l } = await I(e, t, z(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, _ = D.svg(s), v = S(t, {});
2956
2956
  t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
2957
2957
  let y = [
2958
2958
  {
@@ -2971,14 +2971,14 @@ async function hn(e, t) {
2971
2971
  x: m + f,
2972
2972
  y: h - p / 2
2973
2973
  }
2974
- ], S = R(y), C = _.path(S, v), w = s.insert(() => C, ":first-child");
2975
- return w.attr("class", "basic label-container outer-path"), g && t.look !== "handDrawn" && w.selectChildren("path").attr("style", g), r && t.look !== "handDrawn" && w.selectChildren("path").attr("style", r), w.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))})`), I(t, w), t.intersect = function(e) {
2976
- return K.polygon(t, y, e);
2974
+ ], b = B(y), x = _.path(b, v), w = s.insert(() => x, ":first-child");
2975
+ return w.attr("class", "basic label-container outer-path"), g && t.look !== "handDrawn" && w.selectChildren("path").attr("style", g), r && t.look !== "handDrawn" && w.selectChildren("path").attr("style", r), w.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))})`), R(t, w), t.intersect = function(e) {
2976
+ return q.polygon(t, y, e);
2977
2977
  }, s;
2978
2978
  }
2979
- e(hn, "slopedRect");
2980
- async function gn(e, t) {
2981
- let n = t.padding ?? 0, r = t.look === "neo" ? 16 : n * 2, i = t.look === "neo" ? 12 : n, o = await Ke(e, t, {
2979
+ e(vn, "slopedRect");
2980
+ async function yn(e, t) {
2981
+ let n = t.padding ?? 0, r = t.look === "neo" ? 16 : n * 2, i = t.look === "neo" ? 12 : n, o = await Ye(e, t, {
2982
2982
  rx: 0,
2983
2983
  ry: 0,
2984
2984
  classes: "",
@@ -2987,22 +2987,22 @@ async function gn(e, t) {
2987
2987
  });
2988
2988
  if (t.colorIndex !== void 0) {
2989
2989
  let { theme: e, themeVariables: n } = a();
2990
- w(o, t.colorIndex, e, n.borderColorArray);
2990
+ E(o, t.colorIndex, e, n.borderColorArray);
2991
2991
  }
2992
2992
  return o;
2993
2993
  }
2994
- e(gn, "squareRect");
2995
- var _n = 50, vn = /* @__PURE__ */ e((e, t, n) => {
2996
- let r = e.height + n, i = r * Math.cos(Math.PI / (2 * (_n - 1))), a = Math.sqrt(Math.max(0, i ** 2 - e.height ** 2));
2994
+ e(yn, "squareRect");
2995
+ var bn = 50, xn = /* @__PURE__ */ e((e, t, n) => {
2996
+ let r = e.height + n, i = r * Math.cos(Math.PI / (2 * (bn - 1))), a = Math.sqrt(Math.max(0, i ** 2 - e.height ** 2));
2997
2997
  return {
2998
2998
  w: Math.max(e.width + r / 4 + t, 1.5 * r + (r - i), e.width + t + r - a),
2999
2999
  h: r
3000
3000
  };
3001
3001
  }, "stadiumDimensions");
3002
- async function yn(e, t) {
3003
- let { labelStyles: n, nodeStyles: r } = x(t);
3002
+ async function Sn(e, t) {
3003
+ let { labelStyles: n, nodeStyles: r } = C(t);
3004
3004
  t.labelStyle = n;
3005
- let i = t.padding ?? 0, a = t.look === "neo" ? 40 : i, o = t.look === "neo" ? 24 : i, { shapeSvg: s, bbox: c } = await P(e, t, L(t)), { w: l, h: u } = vn(c, a, o), d = u / 2, { cssStyles: f } = t, p = T.svg(s), m = b(t, {});
3005
+ let i = t.padding ?? 0, a = t.look === "neo" ? 40 : i, o = t.look === "neo" ? 24 : i, { shapeSvg: s, bbox: c } = await I(e, t, z(t)), { w: l, h: u } = xn(c, a, o), d = u / 2, { cssStyles: f } = t, p = D.svg(s), m = S(t, {});
3006
3006
  t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
3007
3007
  let h = [
3008
3008
  {
@@ -3013,32 +3013,32 @@ async function yn(e, t) {
3013
3013
  x: l / 2 - d,
3014
3014
  y: -u / 2
3015
3015
  },
3016
- ...B(-l / 2 + d, 0, d, _n, 90, 270),
3016
+ ...H(-l / 2 + d, 0, d, bn, 90, 270),
3017
3017
  {
3018
3018
  x: l / 2 - d,
3019
3019
  y: u / 2
3020
3020
  },
3021
- ...B(l / 2 - d, 0, d, _n, 270, 450)
3022
- ], g = R(h), _ = p.path(g, m), v = s.insert(() => _, ":first-child");
3023
- 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), I(t, v), t.intersect = function(e) {
3024
- return K.polygon(t, h, e);
3021
+ ...H(l / 2 - d, 0, d, bn, 270, 450)
3022
+ ], g = B(h), _ = p.path(g, m), v = s.insert(() => _, ":first-child");
3023
+ 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), R(t, v), t.intersect = function(e) {
3024
+ return q.polygon(t, h, e);
3025
3025
  }, s;
3026
3026
  }
3027
- e(yn, "stadium");
3028
- async function bn(e, t) {
3029
- return Ke(e, t, {
3027
+ e(Sn, "stadium");
3028
+ async function Cn(e, t) {
3029
+ return Ye(e, t, {
3030
3030
  rx: t.look === "neo" ? 3 : 5,
3031
3031
  ry: t.look === "neo" ? 3 : 5,
3032
3032
  classes: "flowchart-node"
3033
3033
  });
3034
3034
  }
3035
- e(bn, "state");
3036
- function xn(e, t, { config: { themeVariables: n } }) {
3037
- let { labelStyles: r, nodeStyles: i } = x(t);
3035
+ e(Cn, "state");
3036
+ function wn(e, t, { config: { themeVariables: n } }) {
3037
+ let { labelStyles: r, nodeStyles: i } = C(t);
3038
3038
  t.labelStyle = r;
3039
3039
  let { cssStyles: a } = t, { lineColor: o, stateBorder: s, nodeBorder: c, nodeShadow: l } = n;
3040
3040
  (t.width || t.height) && ((t.width ?? 0) < 14 && (t.width = 14), (t.height ?? 0) < 14 && (t.height = 14)), t.width ||= 14, t.height ||= 14;
3041
- let u = e.insert("g").attr("class", "node default").attr("id", t.domId ?? t.id), d = T.svg(u), f = b(t, {});
3041
+ let u = e.insert("g").attr("class", "node default").attr("id", t.domId ?? t.id), d = D.svg(u), f = S(t, {});
3042
3042
  t.look !== "handDrawn" && (f.roughness = 0, f.fillStyle = "solid");
3043
3043
  let p = d.circle(0, 0, t.width, {
3044
3044
  ...f,
@@ -3055,33 +3055,33 @@ function xn(e, t, { config: { themeVariables: n } }) {
3055
3055
  let t = e.node()?.ownerSVGElement?.id ?? "", n = t ? `${t}-drop-shadow-small` : "drop-shadow-small";
3056
3056
  _.attr("style", `filter:url(#${n})`);
3057
3057
  }
3058
- return I(t, _), t.intersect = function(e) {
3059
- return K.circle(t, (t.width ?? 0) / 2, e);
3058
+ return R(t, _), t.intersect = function(e) {
3059
+ return q.circle(t, (t.width ?? 0) / 2, e);
3060
3060
  }, u;
3061
3061
  }
3062
- e(xn, "stateEnd");
3063
- function Sn(e, t, { config: { themeVariables: n } }) {
3062
+ e(wn, "stateEnd");
3063
+ function Tn(e, t, { config: { themeVariables: n } }) {
3064
3064
  let { lineColor: r, nodeShadow: i } = n;
3065
3065
  (t.width || t.height) && ((t.width ?? 0) < 14 && (t.width = 14), (t.height ?? 0) < 14 && (t.height = 14)), t.width ||= 14, t.height ||= 14;
3066
3066
  let a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), o;
3067
3067
  if (t.look === "handDrawn") {
3068
- let e = T.svg(a).circle(0, 0, t.width, S(r));
3068
+ let e = D.svg(a).circle(0, 0, t.width, w(r));
3069
3069
  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);
3070
3070
  } 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);
3071
3071
  if (t.width < 25 && i && t.look !== "handDrawn") {
3072
3072
  let t = e.node()?.ownerSVGElement?.id ?? "", n = t ? `${t}-drop-shadow-small` : "drop-shadow-small";
3073
3073
  o.attr("style", `filter:url(#${n})`);
3074
3074
  }
3075
- return I(t, o), t.intersect = function(e) {
3076
- return K.circle(t, (t.width ?? 7) / 2, e);
3075
+ return R(t, o), t.intersect = function(e) {
3076
+ return q.circle(t, (t.width ?? 7) / 2, e);
3077
3077
  }, a;
3078
3078
  }
3079
- e(Sn, "stateStart");
3080
- var Cn = 8;
3081
- async function wn(e, t) {
3082
- let { labelStyles: n, nodeStyles: r } = x(t);
3079
+ e(Tn, "stateStart");
3080
+ var En = 8;
3081
+ async function Dn(e, t) {
3082
+ let { labelStyles: n, nodeStyles: r } = C(t);
3083
3083
  t.labelStyle = n;
3084
- let i = t?.padding ?? 8, a = t.look === "neo" ? 28 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await P(e, t, L(t)), l = Math.max(c.width + 2 * Cn + a, t.width ?? 0), u = Math.max(c.height + o, t.height ?? 0), d = l - 2 * Cn, f = u, m = -l / 2, h = -u / 2, g = [
3084
+ let i = t?.padding ?? 8, a = t.look === "neo" ? 28 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await I(e, t, z(t)), l = Math.max(c.width + 2 * En + a, t.width ?? 0), u = Math.max(c.height + o, t.height ?? 0), d = l - 2 * En, f = u, m = -l / 2, h = -u / 2, g = [
3085
3085
  {
3086
3086
  x: 0,
3087
3087
  y: 0
@@ -3124,26 +3124,26 @@ async function wn(e, t) {
3124
3124
  }
3125
3125
  ];
3126
3126
  if (t.look === "handDrawn") {
3127
- let e = T.svg(s), n = b(t, {}), r = e.rectangle(m, h, d + 16, f, n), i = e.line(m + Cn, h, m + Cn, h + f, n), a = e.line(m + Cn + d, h, m + Cn + d, h + f, n);
3127
+ let e = D.svg(s), n = S(t, {}), r = e.rectangle(m, h, d + 16, f, n), i = e.line(m + En, h, m + En, h + f, n), a = e.line(m + En + d, h, m + En + d, h + f, n);
3128
3128
  s.insert(() => i, ":first-child"), s.insert(() => a, ":first-child");
3129
3129
  let o = s.insert(() => r, ":first-child"), { cssStyles: c } = t;
3130
- o.attr("class", "basic label-container").attr("style", p(c)), I(t, o);
3130
+ o.attr("class", "basic label-container").attr("style", p(c)), R(t, o);
3131
3131
  } else {
3132
- let e = J(s, d, f, g);
3133
- r && e.attr("style", r), I(t, e);
3132
+ let e = Y(s, d, f, g);
3133
+ r && e.attr("style", r), R(t, e);
3134
3134
  }
3135
3135
  return t.intersect = function(e) {
3136
- return K.polygon(t, g, e);
3136
+ return q.polygon(t, g, e);
3137
3137
  }, s;
3138
3138
  }
3139
- e(wn, "subroutine");
3140
- var Tn = .2;
3141
- async function En(e, t) {
3142
- let { labelStyles: n, nodeStyles: r } = x(t);
3139
+ e(Dn, "subroutine");
3140
+ var On = .2;
3141
+ async function kn(e, t) {
3142
+ let { labelStyles: n, nodeStyles: r } = C(t);
3143
3143
  t.labelStyle = n;
3144
3144
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
3145
- (t.width || t.height) && (t.height = Math.max((t?.height ?? 0) - o * 2, 10), t.width = Math.max((t?.width ?? 0) - a * 2 - Tn * (t.height + o * 2), 10));
3146
- let { shapeSvg: s, bbox: c } = await P(e, t, L(t)), l = (t?.height ? t?.height : c.height) + o * 2, u = Tn * l, d = Tn * l, f = (t?.width ? t?.width : c.width) + a * 2 + u - u, p = l, m = -f / 2, h = -p / 2, { cssStyles: g } = t, _ = T.svg(s), v = b(t, {}), y = [
3145
+ (t.width || t.height) && (t.height = Math.max((t?.height ?? 0) - o * 2, 10), t.width = Math.max((t?.width ?? 0) - a * 2 - On * (t.height + o * 2), 10));
3146
+ let { shapeSvg: s, bbox: c } = await I(e, t, z(t)), l = (t?.height ? t?.height : c.height) + o * 2, u = On * l, d = On * l, f = (t?.width ? t?.width : c.width) + a * 2 + u - u, p = l, m = -f / 2, h = -p / 2, { cssStyles: g } = t, _ = D.svg(s), v = S(t, {}), y = [
3147
3147
  {
3148
3148
  x: m - u / 2,
3149
3149
  y: h
@@ -3160,7 +3160,7 @@ async function En(e, t) {
3160
3160
  x: m - u / 2,
3161
3161
  y: h + p
3162
3162
  }
3163
- ], S = [
3163
+ ], b = [
3164
3164
  {
3165
3165
  x: m + f - u / 2,
3166
3166
  y: h + p
@@ -3175,26 +3175,26 @@ async function En(e, t) {
3175
3175
  }
3176
3176
  ];
3177
3177
  t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
3178
- let C = R(y), w = _.path(C, v), E = R(S), D = _.path(E, {
3178
+ let x = B(y), w = _.path(x, v), T = B(b), E = _.path(T, {
3179
3179
  ...v,
3180
3180
  fillStyle: "solid"
3181
- }), O = s.insert(() => D, ":first-child");
3182
- return O.insert(() => w, ":first-child"), O.attr("class", "basic label-container outer-path"), g && t.look !== "handDrawn" && O.selectAll("path").attr("style", g), r && t.look !== "handDrawn" && O.selectAll("path").attr("style", r), I(t, O), t.intersect = function(e) {
3183
- return K.polygon(t, y, e);
3181
+ }), O = s.insert(() => E, ":first-child");
3182
+ return O.insert(() => w, ":first-child"), O.attr("class", "basic label-container outer-path"), g && t.look !== "handDrawn" && O.selectAll("path").attr("style", g), r && t.look !== "handDrawn" && O.selectAll("path").attr("style", r), R(t, O), t.intersect = function(e) {
3183
+ return q.polygon(t, y, e);
3184
3184
  }, s;
3185
3185
  }
3186
- e(En, "taggedRect");
3187
- async function Dn(e, t) {
3188
- let { labelStyles: n, nodeStyles: r } = x(t);
3186
+ e(kn, "taggedRect");
3187
+ async function An(e, t) {
3188
+ let { labelStyles: n, nodeStyles: r } = C(t);
3189
3189
  t.labelStyle = n;
3190
- let { shapeSvg: i, bbox: a, label: o } = await P(e, t, L(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 = T.svg(i), h = b(t, {});
3190
+ let { shapeSvg: i, bbox: a, label: o } = await I(e, t, z(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 = D.svg(i), h = S(t, {});
3191
3191
  t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
3192
3192
  let g = [
3193
3193
  {
3194
3194
  x: -s / 2 - s / 2 * .1,
3195
3195
  y: f / 2
3196
3196
  },
3197
- ...z(-s / 2 - s / 2 * .1, f / 2, s / 2 + s / 2 * .1, f / 2, l, .8),
3197
+ ...V(-s / 2 - s / 2 * .1, f / 2, s / 2 + s / 2 * .1, f / 2, l, .8),
3198
3198
  {
3199
3199
  x: s / 2 + s / 2 * .1,
3200
3200
  y: -f / 2
@@ -3216,57 +3216,57 @@ async function Dn(e, t) {
3216
3216
  x: _ + s,
3217
3217
  y: (v + c) * .9
3218
3218
  },
3219
- ...z(_ + s, (v + c) * 1.25, _ + s - u, (v + c) * 1.3, -c * .02, .5)
3220
- ], S = R(g), C = m.path(S, h), w = R(y), E = m.path(w, {
3219
+ ...V(_ + s, (v + c) * 1.25, _ + s - u, (v + c) * 1.3, -c * .02, .5)
3220
+ ], b = B(g), x = m.path(b, h), w = B(y), T = m.path(w, {
3221
3221
  ...h,
3222
3222
  fillStyle: "solid"
3223
- }), D = i.insert(() => E, ":first-child");
3224
- return D.insert(() => C, ":first-child"), D.attr("class", "basic label-container outer-path"), p && t.look !== "handDrawn" && D.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), D.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))})`), I(t, D), t.intersect = function(e) {
3225
- return K.polygon(t, g, e);
3223
+ }), E = i.insert(() => T, ":first-child");
3224
+ return E.insert(() => x, ":first-child"), E.attr("class", "basic label-container outer-path"), p && t.look !== "handDrawn" && E.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && E.selectAll("path").attr("style", r), E.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))})`), R(t, E), t.intersect = function(e) {
3225
+ return q.polygon(t, g, e);
3226
3226
  }, i;
3227
3227
  }
3228
- e(Dn, "taggedWaveEdgedRectangle");
3229
- async function On(e, t) {
3230
- let { labelStyles: n, nodeStyles: r } = x(t);
3228
+ e(An, "taggedWaveEdgedRectangle");
3229
+ async function jn(e, t) {
3230
+ let { labelStyles: n, nodeStyles: r } = C(t);
3231
3231
  t.labelStyle = n;
3232
- let { shapeSvg: i, bbox: a } = await P(e, t, L(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");
3233
- 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), I(t, u), t.intersect = function(e) {
3234
- return K.rect(t, e);
3232
+ let { shapeSvg: i, bbox: a } = await I(e, t, z(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");
3233
+ 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), R(t, u), t.intersect = function(e) {
3234
+ return q.rect(t, e);
3235
3235
  }, i;
3236
3236
  }
3237
- e(On, "text");
3238
- var kn = /* @__PURE__ */ e((e, t, n, r, i, a) => `M${e},${t}
3237
+ e(jn, "text");
3238
+ var Mn = /* @__PURE__ */ e((e, t, n, r, i, a) => `M${e},${t}
3239
3239
  a${i},${a} 0,0,1 0,${-r}
3240
3240
  l${n},0
3241
3241
  a${i},${a} 0,0,1 0,${r}
3242
3242
  M${n},${-r}
3243
3243
  a${i},${a} 0,0,0 0,${r}
3244
- l${-n},0`, "createCylinderPathD"), An = /* @__PURE__ */ e((e, t, n, r, i, a) => [
3244
+ l${-n},0`, "createCylinderPathD"), Nn = /* @__PURE__ */ e((e, t, n, r, i, a) => [
3245
3245
  `M${e},${t}`,
3246
3246
  `M${e + n},${t}`,
3247
3247
  `a${i},${a} 0,0,0 0,${-r}`,
3248
3248
  `l${-n},0`,
3249
3249
  `a${i},${a} 0,0,0 0,${r}`,
3250
3250
  `l${n},0`
3251
- ].join(" "), "createOuterCylinderPathD"), jn = /* @__PURE__ */ e((e, t, n, r, i, a) => [`M${e + n / 2},${-r / 2}`, `a${i},${a} 0,0,0 0,${r}`].join(" "), "createInnerCylinderPathD"), Mn = 5, Nn = 10;
3252
- async function Pn(e, t) {
3253
- let { labelStyles: n, nodeStyles: r } = x(t);
3251
+ ].join(" "), "createOuterCylinderPathD"), Pn = /* @__PURE__ */ e((e, t, n, r, i, a) => [`M${e + n / 2},${-r / 2}`, `a${i},${a} 0,0,0 0,${r}`].join(" "), "createInnerCylinderPathD"), Fn = 5, In = 10;
3252
+ async function Ln(e, t) {
3253
+ let { labelStyles: n, nodeStyles: r } = C(t);
3254
3254
  t.labelStyle = n;
3255
3255
  let i = t.padding ?? 0, a = t.look === "neo" ? 12 : i / 2, o = t.height ?? 0;
3256
- if (t.height && (t.height -= a, t.height < Mn && (t.height = Mn)), t.width) {
3256
+ if (t.height && (t.height -= a, t.height < Fn && (t.height = Fn)), t.width) {
3257
3257
  let e = o / 2 / (2.5 + o / 50);
3258
- t.width = t.width - a - e * 3, t.width < Nn && (t.width = Nn);
3258
+ t.width = t.width - a - e * 3, t.width < In && (t.width = In);
3259
3259
  }
3260
- let { shapeSvg: s, bbox: c, label: l } = await P(e, t, L(t)), u = Math.max(t.height ?? 0, c.height) + a, d = u / 2, f = d / (2.5 + u / 50), m = Math.max(t.width ?? 0, c.width) + f + a, { cssStyles: h } = t, g;
3260
+ let { shapeSvg: s, bbox: c, label: l } = await I(e, t, z(t)), u = Math.max(t.height ?? 0, c.height) + a, d = u / 2, f = d / (2.5 + u / 50), m = Math.max(t.width ?? 0, c.width) + f + a, { cssStyles: h } = t, g;
3261
3261
  if (t.look === "handDrawn") {
3262
- let e = T.svg(s), n = An(0, 0, m, u, f, d), r = jn(0, 0, m, u, f, d), i = e.path(n, b(t, {})), a = e.path(r, b(t, { fill: "none" }));
3262
+ let e = D.svg(s), n = Nn(0, 0, m, u, f, d), r = Pn(0, 0, m, u, f, d), i = e.path(n, S(t, {})), a = e.path(r, S(t, { fill: "none" }));
3263
3263
  g = s.insert(() => a, ":first-child"), g = s.insert(() => i, ":first-child"), g.attr("class", "basic label-container"), h && g.attr("style", h);
3264
3264
  } else {
3265
- let e = kn(0, 0, m, u, f, d);
3265
+ let e = Mn(0, 0, m, u, f, d);
3266
3266
  g = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", p(h)).attr("style", r), g.attr("class", "basic label-container outer-path"), h && g.selectAll("path").attr("style", h), r && g.selectAll("path").attr("style", r);
3267
3267
  }
3268
- return g.attr("label-offset-x", f), g.attr("transform", `translate(${-m / 2}, ${u / 2} )`), l.attr("transform", `translate(${-(c.width / 2) - f - (c.x - (c.left ?? 0))}, ${-(c.height / 2) - (c.y - (c.top ?? 0))})`), I(t, g), t.intersect = function(e) {
3269
- let n = K.rect(t, e), r = n.y - (t.y ?? 0);
3268
+ return g.attr("label-offset-x", f), g.attr("transform", `translate(${-m / 2}, ${u / 2} )`), l.attr("transform", `translate(${-(c.width / 2) - f - (c.x - (c.left ?? 0))}, ${-(c.height / 2) - (c.y - (c.top ?? 0))})`), R(t, g), t.intersect = function(e) {
3269
+ let n = q.rect(t, e), r = n.y - (t.y ?? 0);
3270
3270
  if (d != 0 && (Math.abs(r) < (t.height ?? 0) / 2 || Math.abs(r) == (t.height ?? 0) / 2 && Math.abs(n.x - (t.x ?? 0)) > (t.width ?? 0) / 2 - f)) {
3271
3271
  let i = f * f * (1 - r * r / (d * d));
3272
3272
  i != 0 && (i = Math.sqrt(Math.abs(i))), i = f - i, e.x - (t.x ?? 0) > 0 && (i = -i), n.x += i;
@@ -3274,11 +3274,11 @@ async function Pn(e, t) {
3274
3274
  return n;
3275
3275
  }, s;
3276
3276
  }
3277
- e(Pn, "tiltedCylinder");
3278
- async function Fn(e, t) {
3279
- let { labelStyles: n, nodeStyles: r } = x(t);
3277
+ e(Ln, "tiltedCylinder");
3278
+ async function Rn(e, t) {
3279
+ let { labelStyles: n, nodeStyles: r } = C(t);
3280
3280
  t.labelStyle = n;
3281
- let i = t.padding ?? 0, a = (t.look, i), o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await P(e, t, L(t)), l = Math.max(c.height + a, t.height ?? 0), u = Math.max(c.width + o, (t.width ?? 0) - l), d = [
3281
+ let i = t.padding ?? 0, a = (t.look, i), o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await I(e, t, z(t)), l = Math.max(c.height + a, t.height ?? 0), u = Math.max(c.width + o, (t.width ?? 0) - l), d = [
3282
3282
  {
3283
3283
  x: -3 * l / 6,
3284
3284
  y: 0
@@ -3297,20 +3297,20 @@ async function Fn(e, t) {
3297
3297
  }
3298
3298
  ], f, { cssStyles: p } = t;
3299
3299
  if (t.look === "handDrawn") {
3300
- let e = T.svg(s), n = b(t, {}), r = R(d), i = e.path(r, n);
3300
+ let e = D.svg(s), n = S(t, {}), r = B(d), i = e.path(r, n);
3301
3301
  f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
3302
- } else f = J(s, u, l, d);
3303
- return r && f.attr("style", r), t.width = u, t.height = l, I(t, f), t.intersect = function(e) {
3304
- return K.polygon(t, d, e);
3302
+ } else f = Y(s, u, l, d);
3303
+ return r && f.attr("style", r), t.width = u, t.height = l, R(t, f), t.intersect = function(e) {
3304
+ return q.polygon(t, d, e);
3305
3305
  }, s;
3306
3306
  }
3307
- e(Fn, "trapezoid");
3308
- async function In(e, t) {
3309
- let { labelStyles: n, nodeStyles: r } = x(t);
3307
+ e(Rn, "trapezoid");
3308
+ async function zn(e, t) {
3309
+ let { labelStyles: n, nodeStyles: r } = C(t);
3310
3310
  t.labelStyle = n;
3311
3311
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
3312
3312
  (t.width || t.height) && (t.height = (t.height ?? 0) - o * 2, t.height < 5 && (t.height = 5), t.width = (t.width ?? 0) - a * 2, t.width < 15 && (t.width = 15));
3313
- let { shapeSvg: s, bbox: c } = await P(e, t, L(t)), l = (t?.width ? t?.width : c.width) + a * 2, u = (t?.height ? t?.height : c.height) + o * 2, { cssStyles: d } = t, f = T.svg(s), p = b(t, {});
3313
+ let { shapeSvg: s, bbox: c } = await I(e, t, z(t)), l = (t?.width ? t?.width : c.width) + a * 2, u = (t?.height ? t?.height : c.height) + o * 2, { cssStyles: d } = t, f = D.svg(s), p = S(t, {});
3314
3314
  t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
3315
3315
  let m = [
3316
3316
  {
@@ -3337,19 +3337,19 @@ async function In(e, t) {
3337
3337
  x: -l / 2,
3338
3338
  y: -u / 2 * .6
3339
3339
  }
3340
- ], h = R(m), g = f.path(h, p), _ = s.insert(() => g, ":first-child");
3341
- return _.attr("class", "basic label-container outer-path"), d && t.look !== "handDrawn" && _.selectChildren("path").attr("style", d), r && t.look !== "handDrawn" && _.selectChildren("path").attr("style", r), I(t, _), t.intersect = function(e) {
3342
- return K.polygon(t, m, e);
3340
+ ], h = B(m), g = f.path(h, p), _ = s.insert(() => g, ":first-child");
3341
+ return _.attr("class", "basic label-container outer-path"), d && t.look !== "handDrawn" && _.selectChildren("path").attr("style", d), r && t.look !== "handDrawn" && _.selectChildren("path").attr("style", r), R(t, _), t.intersect = function(e) {
3342
+ return q.polygon(t, m, e);
3343
3343
  }, s;
3344
3344
  }
3345
- e(In, "trapezoidalPentagon");
3346
- var Ln = 10, Rn = 10;
3347
- async function zn(e, n) {
3348
- let { labelStyles: r, nodeStyles: i } = x(n);
3345
+ e(zn, "trapezoidalPentagon");
3346
+ var Bn = 10, Vn = 10;
3347
+ async function Hn(e, n) {
3348
+ let { labelStyles: r, nodeStyles: i } = C(n);
3349
3349
  n.labelStyle = r;
3350
3350
  let o = n.padding ?? 0, c = n.look === "neo" ? o * 2 : o;
3351
- (n.width || n.height) && (n.width = ((n?.width ?? 0) - c) / 2, n.width < Rn && (n.width = Rn), n.height = n?.height ?? 0, n.height < Ln && (n.height = Ln));
3352
- let { shapeSvg: l, bbox: u, label: d } = await P(e, n, L(n)), f = s(a().flowchart?.htmlLabels), p = (n?.width ? n?.width : u.width) + c, m = n?.height ? n?.height : p + u.height, h = m, g = [
3351
+ (n.width || n.height) && (n.width = ((n?.width ?? 0) - c) / 2, n.width < Vn && (n.width = Vn), n.height = n?.height ?? 0, n.height < Bn && (n.height = Bn));
3352
+ let { shapeSvg: l, bbox: u, label: d } = await I(e, n, z(n)), f = s(a().flowchart?.htmlLabels), p = (n?.width ? n?.width : u.width) + c, m = n?.height ? n?.height : p + u.height, h = m, g = [
3353
3353
  {
3354
3354
  x: 0,
3355
3355
  y: 0
@@ -3362,27 +3362,27 @@ async function zn(e, n) {
3362
3362
  x: h / 2,
3363
3363
  y: -m
3364
3364
  }
3365
- ], { cssStyles: _ } = n, v = T.svg(l), y = b(n, {});
3365
+ ], { cssStyles: _ } = n, v = D.svg(l), y = S(n, {});
3366
3366
  n.look !== "handDrawn" && (y.roughness = 0, y.fillStyle = "solid");
3367
- let S = R(g), C = v.path(S, y), w = l.insert(() => C, ":first-child").attr("transform", `translate(${-m / 2}, ${m / 2})`).attr("class", "outer-path");
3368
- return _ && n.look !== "handDrawn" && w.selectChildren("path").attr("style", _), i && n.look !== "handDrawn" && w.selectChildren("path").attr("style", i), n.width = p, n.height = m, I(n, w), d.attr("transform", `translate(${-u.width / 2 - (u.x - (u.left ?? 0))}, ${m / 2 - (u.height + (n.padding ?? 0) / (f ? 2 : 1) - (u.y - (u.top ?? 0)))})`), n.intersect = function(e) {
3369
- return t.info("Triangle intersect", n, g, e), K.polygon(n, g, e);
3367
+ let b = B(g), x = v.path(b, y), w = l.insert(() => x, ":first-child").attr("transform", `translate(${-m / 2}, ${m / 2})`).attr("class", "outer-path");
3368
+ return _ && n.look !== "handDrawn" && w.selectChildren("path").attr("style", _), i && n.look !== "handDrawn" && w.selectChildren("path").attr("style", i), n.width = p, n.height = m, R(n, w), d.attr("transform", `translate(${-u.width / 2 - (u.x - (u.left ?? 0))}, ${m / 2 - (u.height + (n.padding ?? 0) / (f ? 2 : 1) - (u.y - (u.top ?? 0)))})`), n.intersect = function(e) {
3369
+ return t.info("Triangle intersect", n, g, e), q.polygon(n, g, e);
3370
3370
  }, l;
3371
3371
  }
3372
- e(zn, "triangle");
3373
- async function Bn(e, t) {
3374
- let { labelStyles: n, nodeStyles: r } = x(t);
3372
+ e(Hn, "triangle");
3373
+ async function Un(e, t) {
3374
+ let { labelStyles: n, nodeStyles: r } = C(t);
3375
3375
  t.labelStyle = n;
3376
3376
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = !0;
3377
3377
  (t.width || t.height) && (s = !1, t.width = (t?.width ?? 0) - a * 2, t.width < 10 && (t.width = 10), t.height = (t?.height ?? 0) - o * 2, t.height < 10 && (t.height = 10));
3378
- let { shapeSvg: c, bbox: l, label: u } = await P(e, t, L(t)), d = (t?.width ? t?.width : l.width) + (a ?? 0) * 2, f = (t?.height ? t?.height : l.height) + (o ?? 0) * 2, p = t.look === "neo" ? f / 4 : f / 8, m = f + (s ? p : -p), { cssStyles: h } = t, g = 14 - d, _ = g > 0 ? g / 2 : 0, v = T.svg(c), y = b(t, {});
3378
+ let { shapeSvg: c, bbox: l, label: u } = await I(e, t, z(t)), d = (t?.width ? t?.width : l.width) + (a ?? 0) * 2, f = (t?.height ? t?.height : l.height) + (o ?? 0) * 2, p = t.look === "neo" ? f / 4 : f / 8, m = f + (s ? p : -p), { cssStyles: h } = t, g = 14 - d, _ = g > 0 ? g / 2 : 0, v = D.svg(c), y = S(t, {});
3379
3379
  t.look !== "handDrawn" && (y.roughness = 0, y.fillStyle = "solid");
3380
- let S = [
3380
+ let b = [
3381
3381
  {
3382
3382
  x: -d / 2 - _,
3383
3383
  y: m / 2
3384
3384
  },
3385
- ...z(-d / 2 - _, m / 2, d / 2 + _, m / 2, p, .8),
3385
+ ...V(-d / 2 - _, m / 2, d / 2 + _, m / 2, p, .8),
3386
3386
  {
3387
3387
  x: d / 2 + _,
3388
3388
  y: -m / 2
@@ -3391,14 +3391,14 @@ async function Bn(e, t) {
3391
3391
  x: -d / 2 - _,
3392
3392
  y: -m / 2
3393
3393
  }
3394
- ], C = R(S), w = v.path(C, y), E = c.insert(() => w, ":first-child");
3395
- return E.attr("class", "basic label-container outer-path"), h && t.look !== "handDrawn" && E.selectAll("path").attr("style", h), r && t.look !== "handDrawn" && E.selectAll("path").attr("style", r), E.attr("transform", `translate(0,${-p / 2})`), u.attr("transform", `translate(${-d / 2 + (t.padding ?? 0) - (l.x - (l.left ?? 0))},${-f / 2 + (t.padding ?? 0) - p - (l.y - (l.top ?? 0))})`), I(t, E), t.intersect = function(e) {
3396
- return K.polygon(t, S, e);
3394
+ ], x = B(b), w = v.path(x, y), T = c.insert(() => w, ":first-child");
3395
+ return T.attr("class", "basic label-container outer-path"), h && t.look !== "handDrawn" && T.selectAll("path").attr("style", h), r && t.look !== "handDrawn" && T.selectAll("path").attr("style", r), T.attr("transform", `translate(0,${-p / 2})`), u.attr("transform", `translate(${-d / 2 + (t.padding ?? 0) - (l.x - (l.left ?? 0))},${-f / 2 + (t.padding ?? 0) - p - (l.y - (l.top ?? 0))})`), R(t, T), t.intersect = function(e) {
3396
+ return q.polygon(t, b, e);
3397
3397
  }, c;
3398
3398
  }
3399
- e(Bn, "waveEdgedRectangle");
3400
- async function Vn(e, t) {
3401
- let { labelStyles: n, nodeStyles: r } = x(t);
3399
+ e(Un, "waveEdgedRectangle");
3400
+ async function Wn(e, t) {
3401
+ let { labelStyles: n, nodeStyles: r } = C(t);
3402
3402
  t.labelStyle = n;
3403
3403
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 20 : i;
3404
3404
  if (t.width || t.height) {
@@ -3406,38 +3406,38 @@ async function Vn(e, t) {
3406
3406
  let e = Math.min(t.height * .2, t.height / 4);
3407
3407
  t.height = Math.ceil(t.height - o - 20 / 9 * e), t.width -= a * 2;
3408
3408
  }
3409
- let { shapeSvg: s, bbox: c } = await P(e, t, L(t)), l = (t?.width ? t?.width : c.width) + a * 2, u = (t?.height ? t?.height : c.height) + o, d = u / 8, f = u + d * 2, { cssStyles: p } = t, m = T.svg(s), h = b(t, {});
3409
+ let { shapeSvg: s, bbox: c } = await I(e, t, z(t)), l = (t?.width ? t?.width : c.width) + a * 2, u = (t?.height ? t?.height : c.height) + o, d = u / 8, f = u + d * 2, { cssStyles: p } = t, m = D.svg(s), h = S(t, {});
3410
3410
  t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
3411
3411
  let g = [
3412
3412
  {
3413
3413
  x: -l / 2,
3414
3414
  y: f / 2
3415
3415
  },
3416
- ...z(-l / 2, f / 2, l / 2, f / 2, d, 1),
3416
+ ...V(-l / 2, f / 2, l / 2, f / 2, d, 1),
3417
3417
  {
3418
3418
  x: l / 2,
3419
3419
  y: -f / 2
3420
3420
  },
3421
- ...z(l / 2, -f / 2, -l / 2, -f / 2, d, -1)
3422
- ], _ = R(g), v = m.path(_, h), y = s.insert(() => v, ":first-child");
3423
- return y.attr("class", "basic label-container"), p && t.look !== "handDrawn" && y.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && y.selectAll("path").attr("style", r), I(t, y), t.intersect = function(e) {
3424
- return K.polygon(t, g, e);
3421
+ ...V(l / 2, -f / 2, -l / 2, -f / 2, d, -1)
3422
+ ], _ = B(g), v = m.path(_, h), y = s.insert(() => v, ":first-child");
3423
+ return y.attr("class", "basic label-container"), p && t.look !== "handDrawn" && y.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && y.selectAll("path").attr("style", r), R(t, y), t.intersect = function(e) {
3424
+ return q.polygon(t, g, e);
3425
3425
  }, s;
3426
3426
  }
3427
- e(Vn, "waveRectangle");
3428
- var Q = 10;
3429
- async function Hn(e, t) {
3430
- let { labelStyles: n, nodeStyles: r } = x(t);
3427
+ e(Wn, "waveRectangle");
3428
+ var Z = 10;
3429
+ async function Gn(e, t) {
3430
+ let { labelStyles: n, nodeStyles: r } = C(t);
3431
3431
  t.labelStyle = n;
3432
3432
  let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0;
3433
- (t.width || t.height) && (t.width = Math.max((t?.width ?? 0) - i * 2 - Q, 10), t.height = Math.max((t?.height ?? 0) - a * 2 - Q, 10));
3434
- let { shapeSvg: o, bbox: s, label: c } = await P(e, t, L(t)), l = (t?.width ? t?.width : s.width) + i * 2 + Q, u = (t?.height ? t?.height : s.height) + a * 2 + Q, d = l - Q, f = u - Q, p = -d / 2, m = -f / 2, { cssStyles: h } = t, g = T.svg(o), _ = b(t, {}), v = [
3433
+ (t.width || t.height) && (t.width = Math.max((t?.width ?? 0) - i * 2 - Z, 10), t.height = Math.max((t?.height ?? 0) - a * 2 - Z, 10));
3434
+ let { shapeSvg: o, bbox: s, label: c } = await I(e, t, z(t)), l = (t?.width ? t?.width : s.width) + i * 2 + Z, u = (t?.height ? t?.height : s.height) + a * 2 + Z, d = l - Z, f = u - Z, p = -d / 2, m = -f / 2, { cssStyles: h } = t, g = D.svg(o), _ = S(t, {}), v = [
3435
3435
  {
3436
- x: p - Q,
3437
- y: m - Q
3436
+ x: p - Z,
3437
+ y: m - Z
3438
3438
  },
3439
3439
  {
3440
- x: p - Q,
3440
+ x: p - Z,
3441
3441
  y: m + f
3442
3442
  },
3443
3443
  {
@@ -3446,31 +3446,31 @@ async function Hn(e, t) {
3446
3446
  },
3447
3447
  {
3448
3448
  x: p + d,
3449
- y: m - Q
3449
+ y: m - Z
3450
3450
  }
3451
- ], y = `M${p - Q},${m - Q} L${p + d},${m - Q} L${p + d},${m + f} L${p - Q},${m + f} L${p - Q},${m - Q}
3452
- M${p - Q},${m} L${p + d},${m}
3453
- M${p},${m - Q} L${p},${m + f}`;
3451
+ ], y = `M${p - Z},${m - Z} L${p + d},${m - Z} L${p + d},${m + f} L${p - Z},${m + f} L${p - Z},${m - Z}
3452
+ M${p - Z},${m} L${p + d},${m}
3453
+ M${p},${m - Z} L${p},${m + f}`;
3454
3454
  t.look !== "handDrawn" && (_.roughness = 0, _.fillStyle = "solid");
3455
- let S = g.path(y, _), C = o.insert(() => S, ":first-child");
3456
- return C.attr("transform", `translate(${Q / 2}, ${Q / 2})`), C.attr("class", "basic label-container outer-path"), h && t.look !== "handDrawn" && C.selectAll("path").attr("style", h), r && t.look !== "handDrawn" && C.selectAll("path").attr("style", r), c.attr("transform", `translate(${-(s.width / 2) + Q / 2 - (s.x - (s.left ?? 0))}, ${-(s.height / 2) + Q / 2 - (s.y - (s.top ?? 0))})`), I(t, C), t.intersect = function(e) {
3457
- return K.polygon(t, v, e);
3455
+ let b = g.path(y, _), x = o.insert(() => b, ":first-child");
3456
+ return x.attr("transform", `translate(${Z / 2}, ${Z / 2})`), x.attr("class", "basic label-container outer-path"), h && t.look !== "handDrawn" && x.selectAll("path").attr("style", h), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), c.attr("transform", `translate(${-(s.width / 2) + Z / 2 - (s.x - (s.left ?? 0))}, ${-(s.height / 2) + Z / 2 - (s.y - (s.top ?? 0))})`), R(t, x), t.intersect = function(e) {
3457
+ return q.polygon(t, v, e);
3458
3458
  }, o;
3459
3459
  }
3460
- e(Hn, "windowPane");
3461
- var Un = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), Wn = /* @__PURE__ */ new Set([
3460
+ e(Gn, "windowPane");
3461
+ var Kn = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), qn = /* @__PURE__ */ new Set([
3462
3462
  "redux",
3463
3463
  "redux-dark",
3464
3464
  "redux-color",
3465
3465
  "redux-dark-color"
3466
3466
  ]);
3467
- async function Gn(e, t) {
3467
+ async function Jn(e, t) {
3468
3468
  let r = t;
3469
3469
  r.alias && (t.label = r.alias);
3470
3470
  let { theme: i, themeVariables: a } = u(), { rowEven: o, rowOdd: c, nodeBorder: l, borderColorArray: d } = a;
3471
3471
  if (t.look === "handDrawn") {
3472
3472
  let { themeVariables: n } = u(), { background: r } = n;
3473
- await Gn(e, {
3473
+ await Jn(e, {
3474
3474
  ...t,
3475
3475
  id: t.id + "-background",
3476
3476
  domId: (t.domId || t.id) + "-background",
@@ -3480,7 +3480,7 @@ async function Gn(e, t) {
3480
3480
  }
3481
3481
  let f = u();
3482
3482
  t.useHtmlLabels = f.htmlLabels;
3483
- let p = f.er?.diagramPadding ?? 10, m = f.er?.entityPadding ?? 6, { cssStyles: g } = t, { labelStyles: _, nodeStyles: v } = x(t);
3483
+ let p = f.er?.diagramPadding ?? 10, m = f.er?.entityPadding ?? 6, { cssStyles: g } = t, { labelStyles: _, nodeStyles: v } = C(t);
3484
3484
  if (r.attributes.length === 0 && t.label) {
3485
3485
  let n = {
3486
3486
  rx: 0,
@@ -3490,8 +3490,8 @@ async function Gn(e, t) {
3490
3490
  classes: ""
3491
3491
  };
3492
3492
  h(t.label, f) + n.labelPaddingX * 2 < f.er.minEntityWidth && (t.width = f.er.minEntityWidth);
3493
- let a = await Ke(e, t, n);
3494
- if (i != null && Un.has(i)) {
3493
+ let a = await Ye(e, t, n);
3494
+ if (i != null && Kn.has(i)) {
3495
3495
  let e = r.colorIndex ?? 0;
3496
3496
  a.attr("data-color-id", `color-${e % d.length}`);
3497
3497
  }
@@ -3502,88 +3502,88 @@ async function Gn(e, t) {
3502
3502
  return a;
3503
3503
  }
3504
3504
  f.htmlLabels || (p *= 1.25, m *= 1.25);
3505
- let y = L(t);
3505
+ let y = z(t);
3506
3506
  y ||= "node default";
3507
- let S = e.insert("g").attr("class", y).attr("id", t.domId || t.id), C = await Kn(S, t.label ?? "", f, 0, 0, ["name"], _);
3508
- C.height += m;
3509
- let w = 0, E = [], D = [], O = 0, k = 0, A = 0, j = 0, M = !0, N = !0;
3507
+ let b = e.insert("g").attr("class", y).attr("id", t.domId || t.id), x = await Yn(b, t.label ?? "", f, 0, 0, ["name"], _);
3508
+ x.height += m;
3509
+ let w = 0, T = [], E = [], O = 0, k = 0, A = 0, j = 0, M = !0, N = !0;
3510
3510
  for (let e of r.attributes) {
3511
- let t = await Kn(S, e.type, f, 0, w, ["attribute-type"], _);
3511
+ let t = await Yn(b, e.type, f, 0, w, ["attribute-type"], _);
3512
3512
  O = Math.max(O, t.width + p);
3513
- let n = await Kn(S, e.name, f, 0, w, ["attribute-name"], _);
3513
+ let n = await Yn(b, e.name, f, 0, w, ["attribute-name"], _);
3514
3514
  k = Math.max(k, n.width + p);
3515
- let r = await Kn(S, e.keys.join(), f, 0, w, ["attribute-keys"], _);
3515
+ let r = await Yn(b, e.keys.join(), f, 0, w, ["attribute-keys"], _);
3516
3516
  A = Math.max(A, r.width + p);
3517
- let i = await Kn(S, e.comment, f, 0, w, ["attribute-comment"], _);
3517
+ let i = await Yn(b, e.comment, f, 0, w, ["attribute-comment"], _);
3518
3518
  j = Math.max(j, i.width + p);
3519
3519
  let a = Math.max(t.height, n.height, r.height, i.height) + m;
3520
- D.push({
3520
+ E.push({
3521
3521
  yOffset: w,
3522
3522
  rowHeight: a
3523
3523
  }), w += a;
3524
3524
  }
3525
3525
  let P = 4;
3526
3526
  A <= p && (M = !1, A = 0, P--), j <= p && (N = !1, j = 0, P--);
3527
- let F = S.node().getBBox();
3528
- if (C.width + p * 2 - (O + k + A + j) > 0) {
3529
- let e = C.width + p * 2 - (O + k + A + j);
3527
+ let F = b.node().getBBox();
3528
+ if (x.width + p * 2 - (O + k + A + j) > 0) {
3529
+ let e = x.width + p * 2 - (O + k + A + j);
3530
3530
  O += e / P, k += e / P, A > 0 && (A += e / P), j > 0 && (j += e / P);
3531
3531
  }
3532
- let R = O + k + A + j, z = T.svg(S), B = b(t, {});
3532
+ let I = O + k + A + j, L = D.svg(b), B = S(t, {});
3533
3533
  t.look !== "handDrawn" && (B.roughness = 0, B.fillStyle = "solid");
3534
- let ee = 0;
3535
- D.length > 0 && (ee = D.reduce((e, t) => e + (t?.rowHeight ?? 0), 0));
3536
- let V = Math.max(F.width + p * 2, t?.width || 0, R), te = Math.max((ee ?? 0) + C.height, t?.height || 0), H = -V / 2, U = -te / 2;
3537
- if (S.selectAll("g:not(:first-child)").each((e, t, r) => {
3534
+ let V = 0;
3535
+ E.length > 0 && (V = E.reduce((e, t) => e + (t?.rowHeight ?? 0), 0));
3536
+ let H = Math.max(F.width + p * 2, t?.width || 0, I), ee = Math.max((V ?? 0) + x.height, t?.height || 0), U = -H / 2, W = -ee / 2;
3537
+ if (b.selectAll("g:not(:first-child)").each((e, t, r) => {
3538
3538
  let i = n(r[t]), a = i.attr("transform"), o = 0, s = 0;
3539
3539
  if (a) {
3540
3540
  let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
3541
3541
  e && (o = parseFloat(e[1]), s = parseFloat(e[2]), i.attr("class").includes("attribute-name") ? o += O : i.attr("class").includes("attribute-keys") ? o += O + k : i.attr("class").includes("attribute-comment") && (o += O + k + A));
3542
3542
  }
3543
- i.attr("transform", `translate(${H + p / 2 + o}, ${s + U + C.height + m / 2})`);
3544
- }), S.select(".name").attr("transform", "translate(" + -C.width / 2 + ", " + (U + m / 2) + ")"), i != null && Un.has(i)) {
3543
+ i.attr("transform", `translate(${U + p / 2 + o}, ${s + W + x.height + m / 2})`);
3544
+ }), b.select(".name").attr("transform", "translate(" + -x.width / 2 + ", " + (W + m / 2) + ")"), i != null && Kn.has(i)) {
3545
3545
  let e = r.colorIndex ?? 0;
3546
- S.attr("data-color-id", `color-${e % d.length}`);
3546
+ b.attr("data-color-id", `color-${e % d.length}`);
3547
3547
  }
3548
- let ne = z.rectangle(H, U, V, te, B), re = S.insert(() => ne, ":first-child").attr("class", "outer-path").attr("style", g.join(""));
3549
- E.push(0);
3550
- for (let [e, t] of D.entries()) {
3551
- let n = (e + 1) % 2 == 0 && t.yOffset !== 0, r = z.rectangle(H, C.height + U + t?.yOffset, V, t?.rowHeight, {
3548
+ let te = L.rectangle(U, W, H, ee, B), ne = b.insert(() => te, ":first-child").attr("class", "outer-path").attr("style", g.join(""));
3549
+ T.push(0);
3550
+ for (let [e, t] of E.entries()) {
3551
+ let n = (e + 1) % 2 == 0 && t.yOffset !== 0, r = L.rectangle(U, x.height + W + t?.yOffset, H, t?.rowHeight, {
3552
3552
  ...B,
3553
3553
  fill: n ? o : c,
3554
3554
  stroke: l
3555
3555
  });
3556
- S.insert(() => r, "g.label").attr("style", g.join("")).attr("class", `row-rect-${n ? "even" : "odd"}`);
3556
+ b.insert(() => r, "g.label").attr("style", g.join("")).attr("class", `row-rect-${n ? "even" : "odd"}`);
3557
3557
  }
3558
- let ie = 1e-4, W = qn(H, C.height + U, V + H, C.height + U, ie), G = z.polygon(W.map((e) => [e.x, e.y]), B);
3559
- if (S.insert(() => G).attr("class", "divider"), W = qn(O + H, C.height + U, O + H, te + U, ie), G = z.polygon(W.map((e) => [e.x, e.y]), B), S.insert(() => G).attr("class", "divider"), M) {
3560
- let e = O + k + H;
3561
- W = qn(e, C.height + U, e, te + U, ie), G = z.polygon(W.map((e) => [e.x, e.y]), B), S.insert(() => G).attr("class", "divider");
3558
+ let re = 1e-4, G = Xn(U, x.height + W, H + U, x.height + W, re), K = L.polygon(G.map((e) => [e.x, e.y]), B);
3559
+ if (b.insert(() => K).attr("class", "divider"), G = Xn(O + U, x.height + W, O + U, ee + W, re), K = L.polygon(G.map((e) => [e.x, e.y]), B), b.insert(() => K).attr("class", "divider"), M) {
3560
+ let e = O + k + U;
3561
+ G = Xn(e, x.height + W, e, ee + W, re), K = L.polygon(G.map((e) => [e.x, e.y]), B), b.insert(() => K).attr("class", "divider");
3562
3562
  }
3563
3563
  if (N) {
3564
- let e = O + k + A + H;
3565
- W = qn(e, C.height + U, e, te + U, ie), G = z.polygon(W.map((e) => [e.x, e.y]), B), S.insert(() => G).attr("class", "divider");
3564
+ let e = O + k + A + U;
3565
+ G = Xn(e, x.height + W, e, ee + W, re), K = L.polygon(G.map((e) => [e.x, e.y]), B), b.insert(() => K).attr("class", "divider");
3566
3566
  }
3567
- for (let e of E) {
3568
- let t = C.height + U + e;
3569
- W = qn(H, t, V + H, t, ie), G = z.polygon(W.map((e) => [e.x, e.y]), B), S.insert(() => G).attr("class", "divider");
3567
+ for (let e of T) {
3568
+ let t = x.height + W + e;
3569
+ G = Xn(U, t, H + U, t, re), K = L.polygon(G.map((e) => [e.x, e.y]), B), b.insert(() => K).attr("class", "divider");
3570
3570
  }
3571
- if (I(t, re), v && t.look !== "handDrawn") {
3572
- if (i != null && Wn.has(i)) S.selectAll("path").attr("style", v);
3571
+ if (R(t, ne), v && t.look !== "handDrawn") {
3572
+ if (i != null && qn.has(i)) b.selectAll("path").attr("style", v);
3573
3573
  else {
3574
3574
  let e = v.split(";")?.filter((e) => e.includes("stroke"))?.map((e) => `${e}`).join("; ");
3575
- S.selectAll("path").attr("style", e ?? ""), S.selectAll(".row-rect-even path").attr("style", v);
3575
+ b.selectAll("path").attr("style", e ?? ""), b.selectAll(".row-rect-even path").attr("style", v);
3576
3576
  }
3577
3577
  }
3578
3578
  return t.intersect = function(e) {
3579
- return K.rect(t, e);
3580
- }, S;
3579
+ return q.rect(t, e);
3580
+ }, b;
3581
3581
  }
3582
- e(Gn, "erBox");
3583
- async function Kn(e, t, r, a = 0, o = 0, c = [], l = "") {
3582
+ e(Jn, "erBox");
3583
+ async function Yn(e, t, r, a = 0, o = 0, c = [], l = "") {
3584
3584
  let u = e.insert("g").attr("class", `label ${c.join(" ")}`).attr("transform", `translate(${a}, ${o})`).attr("style", l);
3585
3585
  t !== i(t) && (t = i(t), t = t.replaceAll("<", "&lt;").replaceAll(">", "&gt;"));
3586
- let d = u.node().appendChild(await v(u, t, {
3586
+ let d = u.node().appendChild(await b(u, t, {
3587
3587
  width: h(t, r) + 100,
3588
3588
  style: l,
3589
3589
  useHtmlLabels: r.htmlLabels
@@ -3601,8 +3601,8 @@ async function Kn(e, t, r, a = 0, o = 0, c = [], l = "") {
3601
3601
  }
3602
3602
  return f;
3603
3603
  }
3604
- e(Kn, "addText");
3605
- function qn(e, t, n, r, i) {
3604
+ e(Yn, "addText");
3605
+ function Xn(e, t, n, r, i) {
3606
3606
  return e === n ? [
3607
3607
  {
3608
3608
  x: e - i / 2,
@@ -3639,25 +3639,25 @@ function qn(e, t, n, r, i) {
3639
3639
  }
3640
3640
  ];
3641
3641
  }
3642
- e(qn, "lineToPolygon");
3643
- async function Jn(e, t, n, r, i = n.class.padding ?? 12) {
3644
- let a = r ? 0 : 3, o = e.insert("g").attr("class", L(t)).attr("id", t.domId || t.id), s = null, c = null, l = null, u = null, d = 0, f = 0, p = 0;
3642
+ e(Xn, "lineToPolygon");
3643
+ async function Zn(e, t, n, r, i = n.class.padding ?? 12) {
3644
+ let a = r ? 0 : 3, o = e.insert("g").attr("class", z(t)).attr("id", t.domId || t.id), s = null, c = null, l = null, u = null, d = 0, f = 0, p = 0;
3645
3645
  if (s = o.insert("g").attr("class", "annotation-group text"), t.annotations.length > 0) {
3646
3646
  let e = t.annotations[0];
3647
- await Yn(s, { text: `\xAB${e}\xBB` }, 0), d = s.node().getBBox().height;
3647
+ await Qn(s, { text: `\xAB${e}\xBB` }, 0), d = s.node().getBBox().height;
3648
3648
  }
3649
- c = o.insert("g").attr("class", "label-group text"), await Yn(c, t, 0, ["font-weight: bolder"]);
3649
+ c = o.insert("g").attr("class", "label-group text"), await Qn(c, t, 0, ["font-weight: bolder"]);
3650
3650
  let m = c.node().getBBox();
3651
3651
  f = m.height, l = o.insert("g").attr("class", "members-group text");
3652
3652
  let h = 0;
3653
3653
  for (let e of t.members) {
3654
- let t = await Yn(l, e, h, [e.parseClassifier()]);
3654
+ let t = await Qn(l, e, h, [e.parseClassifier()]);
3655
3655
  h += t + a;
3656
3656
  }
3657
3657
  p = l.node().getBBox().height, p <= 0 && (p = i / 2), u = o.insert("g").attr("class", "methods-group text");
3658
3658
  let g = 0;
3659
3659
  for (let e of t.methods) {
3660
- let t = await Yn(u, e, g, [e.parseClassifier()]);
3660
+ let t = await Qn(u, e, g, [e.parseClassifier()]);
3661
3661
  g += t + a;
3662
3662
  }
3663
3663
  let _ = o.node().getBBox();
@@ -3670,18 +3670,18 @@ async function Jn(e, t, n, r, i = n.class.padding ?? 12) {
3670
3670
  bbox: _
3671
3671
  };
3672
3672
  }
3673
- e(Jn, "textHelper");
3674
- async function Yn(e, t, i, a = []) {
3673
+ e(Zn, "textHelper");
3674
+ async function Qn(e, t, i, a = []) {
3675
3675
  let o = e.insert("g").attr("class", "label").attr("style", a.join("; ")), l = u(), d = "useHtmlLabels" in t ? t.useHtmlLabels : s(l.htmlLabels) ?? !0, p = "";
3676
3676
  p = "text" in t ? t.text : t.label, !d && p.startsWith("\\") && (p = p.substring(1)), c(p) && (d = !0);
3677
- let m = await v(o, r(f(p)), {
3677
+ let m = await b(o, r(f(p)), {
3678
3678
  width: h(p, l) + 50,
3679
3679
  classes: "markdown-node-label",
3680
3680
  useHtmlLabels: d
3681
3681
  }, l), g, _ = 1;
3682
3682
  if (d) {
3683
3683
  let e = m.children[0], t = n(m);
3684
- _ = e.innerHTML.split("<br>").length, e.innerHTML.includes("</math>") && (_ += e.innerHTML.split("<mrow>").length - 1), await O(e), g = e.getBoundingClientRect(), t.attr("width", g.width), t.attr("height", g.height);
3684
+ _ = e.innerHTML.split("<br>").length, e.innerHTML.includes("</math>") && (_ += e.innerHTML.split("<mrow>").length - 1), await A(e), g = e.getBoundingClientRect(), t.attr("width", g.width), t.attr("height", g.height);
3685
3685
  } else {
3686
3686
  a.includes("font-weight: bolder") && n(m).selectAll("tspan").attr("font-weight", ""), _ = m.children.length;
3687
3687
  let e = m.children[0];
@@ -3689,25 +3689,25 @@ async function Yn(e, t, i, a = []) {
3689
3689
  }
3690
3690
  return o.attr("transform", "translate(0," + (-g.height / (2 * _) + i) + ")"), g.height;
3691
3691
  }
3692
- e(Yn, "addText");
3693
- async function Xn(e, t) {
3692
+ e(Qn, "addText");
3693
+ async function $n(e, t) {
3694
3694
  let r = a(), { theme: i, themeVariables: o } = r, { useGradient: c, borderColorArray: l } = o, u = r.class.padding ?? 12, d = u, f = t.useHtmlLabels ?? s(r.htmlLabels) ?? !0, p = t;
3695
3695
  p.annotations = p.annotations ?? [], p.members = p.members ?? [], p.methods = p.methods ?? [];
3696
- let { shapeSvg: m, bbox: h } = await Jn(e, t, r, f, d);
3697
- w(m, t.colorIndex, i, l);
3698
- let { labelStyles: g, nodeStyles: _ } = x(t);
3696
+ let { shapeSvg: m, bbox: h } = await Zn(e, t, r, f, d);
3697
+ E(m, t.colorIndex, i, l);
3698
+ let { labelStyles: g, nodeStyles: _ } = C(t);
3699
3699
  t.labelStyle = g, t.cssStyles = p.styles || "";
3700
3700
  let v = p.styles?.join(";") || _ || "";
3701
3701
  t.cssStyles ||= v.replaceAll("!important", "").split(";");
3702
- let y = p.members.length === 0 && p.methods.length === 0 && !r.class?.hideEmptyMembersBox, S = T.svg(m), C = b(t, {});
3703
- t.look !== "handDrawn" && (C.roughness = 0, C.fillStyle = "solid");
3704
- let E = Math.max(t.width ?? 0, h.width), D = Math.max(t.height ?? 0, h.height), O = (t.height ?? 0) > h.height;
3705
- p.members.length === 0 && p.methods.length === 0 ? D += d : p.members.length > 0 && p.methods.length === 0 && (D += d * 2);
3706
- let k = -E / 2, A = -D / 2, j = y ? u * 2 : p.members.length === 0 && p.methods.length === 0 ? -u : 0;
3702
+ let y = p.members.length === 0 && p.methods.length === 0 && !r.class?.hideEmptyMembersBox, b = D.svg(m), x = S(t, {});
3703
+ t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
3704
+ let w = Math.max(t.width ?? 0, h.width), T = Math.max(t.height ?? 0, h.height), O = (t.height ?? 0) > h.height;
3705
+ p.members.length === 0 && p.methods.length === 0 ? T += d : p.members.length > 0 && p.methods.length === 0 && (T += d * 2);
3706
+ let k = -w / 2, A = -T / 2, j = y ? u * 2 : p.members.length === 0 && p.methods.length === 0 ? -u : 0;
3707
3707
  O && (j = u * 2);
3708
- let M = S.rectangle(k - u, A - u - (y ? u : p.members.length === 0 && p.methods.length === 0 ? -u / 2 : 0), E + 2 * u, D + 2 * u + j, C), N = m.insert(() => M, ":first-child");
3708
+ let M = b.rectangle(k - u, A - u - (y ? u : p.members.length === 0 && p.methods.length === 0 ? -u / 2 : 0), w + 2 * u, T + 2 * u + j, x), N = m.insert(() => M, ":first-child");
3709
3709
  N.attr("class", "basic label-container outer-path");
3710
- let P = N.node().getBBox(), F = m.select(".annotation-group").node().getBBox().height - (y ? u / 2 : 0) || 0, L = m.select(".label-group").node().getBBox().height - (y ? u / 2 : 0) || 0, R = m.select(".members-group").node().getBBox().height - (y ? u / 2 : 0) || 0, z = (F + L + A + u - (A - u - (y ? u : p.members.length === 0 && p.methods.length === 0 ? -u / 2 : 0))) / 2;
3710
+ let P = N.node().getBBox(), F = m.select(".annotation-group").node().getBBox().height - (y ? u / 2 : 0) || 0, I = m.select(".label-group").node().getBBox().height - (y ? u / 2 : 0) || 0, L = m.select(".members-group").node().getBBox().height - (y ? u / 2 : 0) || 0, z = (F + I + A + u - (A - u - (y ? u : p.members.length === 0 && p.methods.length === 0 ? -u / 2 : 0))) / 2;
3711
3711
  if (m.selectAll(".text").each((e, t, i) => {
3712
3712
  let a = n(i[t]), o = a.attr("transform"), s = 0;
3713
3713
  if (o) {
@@ -3716,8 +3716,8 @@ async function Xn(e, t) {
3716
3716
  }
3717
3717
  let c = s + A + u - (y ? u : p.members.length === 0 && p.methods.length === 0 ? -u / 2 : 0);
3718
3718
  if (a.attr("class").includes("methods-group")) {
3719
- let e = Math.max(R, d / 2);
3720
- c = O ? Math.max(z, F + L + e + A + d * 2 + u) + d * 2 : F + L + e + A + d * 4 + u;
3719
+ let e = Math.max(L, d / 2);
3720
+ c = O ? Math.max(z, F + I + e + A + d * 2 + u) + d * 2 : F + I + e + A + d * 4 + u;
3721
3721
  }
3722
3722
  p.members.length === 0 && p.methods.length === 0 && r.class?.hideEmptyMembersBox && (c = p.annotations.length > 0 ? s - d : s), f || (c -= 4);
3723
3723
  let l = k;
@@ -3725,11 +3725,11 @@ async function Xn(e, t) {
3725
3725
  window.getComputedStyle(n[t]).textAnchor === "middle" && (l = 0);
3726
3726
  })), a.attr("transform", `translate(${l}, ${c})`);
3727
3727
  }), p.members.length > 0 || p.methods.length > 0 || y) {
3728
- let e = F + L + A + u, n = S.line(P.x, e, P.x + P.width, e + .001, C);
3728
+ let e = F + I + A + u, n = b.line(P.x, e, P.x + P.width, e + .001, x);
3729
3729
  m.insert(() => n).attr("class", `divider${t.look === "neo" && !c ? " neo-line" : ""}`).attr("style", v);
3730
3730
  }
3731
3731
  if (y || p.members.length > 0 || p.methods.length > 0) {
3732
- let e = F + L + R + A + d * 2 + u, n = S.line(P.x, O ? Math.max(z, e) : e, P.x + P.width, (O ? Math.max(z, e) : e) + .001, C);
3732
+ let e = F + I + L + A + d * 2 + u, n = b.line(P.x, O ? Math.max(z, e) : e, P.x + P.width, (O ? Math.max(z, e) : e) + .001, x);
3733
3733
  m.insert(() => n).attr("class", `divider${t.look === "neo" && !c ? " neo-line" : ""}`).attr("style", v);
3734
3734
  }
3735
3735
  if (p.look !== "handDrawn" && m.selectAll("path").attr("style", v), N.select(":nth-child(2)").attr("style", v), m.selectAll(".divider").select("path").attr("style", v), t.labelStyle ? m.selectAll("span").attr("style", t.labelStyle) : m.selectAll("span").attr("style", v), !f) {
@@ -3745,31 +3745,31 @@ async function Xn(e, t) {
3745
3745
  }
3746
3746
  }
3747
3747
  }
3748
- return I(t, N), t.intersect = function(e) {
3749
- return K.rect(t, e);
3748
+ return R(t, N), t.intersect = function(e) {
3749
+ return q.rect(t, e);
3750
3750
  }, m;
3751
3751
  }
3752
- e(Xn, "classBox");
3753
- async function Zn(e, t) {
3754
- let { labelStyles: r, nodeStyles: i } = x(t);
3752
+ e($n, "classBox");
3753
+ async function er(e, t) {
3754
+ let { labelStyles: r, nodeStyles: i } = C(t);
3755
3755
  t.labelStyle = r;
3756
- let o = t, s = t, c = "verifyMethod" in t, l = L(t), u = a(), { themeVariables: d } = u, { borderColorArray: f, requirementEdgeLabelBackground: p } = d, m = u.layout === "elk" ? "start" : "center", h = e.insert("g").attr("class", l).attr("id", t.domId ?? t.id), g;
3757
- g = c ? await $(h, `&lt;&lt;${o.type}&gt;&gt;`, 0, t.labelStyle) : await $(h, "&lt;&lt;Element&gt;&gt;", 0, t.labelStyle);
3758
- let _ = g, v = await $(h, o.name, _, t.labelStyle + "; font-weight: bold;");
3756
+ let o = t, s = t, c = "verifyMethod" in t, l = z(t), u = a(), { themeVariables: d } = u, { borderColorArray: f, requirementEdgeLabelBackground: p } = d, m = u.layout === "elk" ? "start" : "center", h = e.insert("g").attr("class", l).attr("id", t.domId ?? t.id), g;
3757
+ g = c ? await Q(h, `&lt;&lt;${o.type}&gt;&gt;`, 0, t.labelStyle) : await Q(h, "&lt;&lt;Element&gt;&gt;", 0, t.labelStyle);
3758
+ let _ = g, v = await Q(h, o.name, _, t.labelStyle + "; font-weight: bold;");
3759
3759
  if (_ += v + 20, c) {
3760
- let e = await $(h, `${o.requirementId ? `ID: ${o.requirementId}` : ""}`, _, t.labelStyle, m);
3760
+ let e = await Q(h, `${o.requirementId ? `ID: ${o.requirementId}` : ""}`, _, t.labelStyle, m);
3761
3761
  _ += e;
3762
- let n = await $(h, `${o.text ? `Text: ${o.text}` : ""}`, _, t.labelStyle, m);
3762
+ let n = await Q(h, `${o.text ? `Text: ${o.text}` : ""}`, _, t.labelStyle, m);
3763
3763
  _ += n;
3764
- let r = await $(h, `${o.risk ? `Risk: ${o.risk}` : ""}`, _, t.labelStyle, m);
3765
- _ += r, await $(h, `${o.verifyMethod ? `Verification: ${o.verifyMethod}` : ""}`, _, t.labelStyle, m);
3764
+ let r = await Q(h, `${o.risk ? `Risk: ${o.risk}` : ""}`, _, t.labelStyle, m);
3765
+ _ += r, await Q(h, `${o.verifyMethod ? `Verification: ${o.verifyMethod}` : ""}`, _, t.labelStyle, m);
3766
3766
  } else {
3767
- let e = await $(h, `${s.type ? `Type: ${s.type}` : ""}`, _, t.labelStyle, m);
3768
- _ += e, await $(h, `${s.docRef ? `Doc Ref: ${s.docRef}` : ""}`, _, t.labelStyle, m);
3767
+ let e = await Q(h, `${s.type ? `Type: ${s.type}` : ""}`, _, t.labelStyle, m);
3768
+ _ += e, await Q(h, `${s.docRef ? `Doc Ref: ${s.docRef}` : ""}`, _, t.labelStyle, m);
3769
3769
  }
3770
- let y = (h.node()?.getBBox().width ?? 200) + 20, S = (h.node()?.getBBox().height ?? 200) + 20, C = -y / 2, w = -S / 2, E = T.svg(h), D = b(t, {});
3771
- t.look !== "handDrawn" && (D.roughness = 0, D.fillStyle = "solid");
3772
- let O = E.rectangle(C, w, y, S, D), k = h.insert(() => O, ":first-child");
3770
+ let y = (h.node()?.getBBox().width ?? 200) + 20, b = (h.node()?.getBBox().height ?? 200) + 20, x = -y / 2, w = -b / 2, T = D.svg(h), E = S(t, {});
3771
+ t.look !== "handDrawn" && (E.roughness = 0, E.fillStyle = "solid");
3772
+ let O = T.rectangle(x, w, y, b, E), k = h.insert(() => O, ":first-child");
3773
3773
  if (k.attr("class", "basic label-container outer-path").attr("style", i), f?.length) {
3774
3774
  let e = t.colorIndex ?? 0;
3775
3775
  h.attr("data-color-id", `color-${e % f.length}`);
@@ -3780,29 +3780,29 @@ async function Zn(e, t) {
3780
3780
  let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
3781
3781
  e && (o = parseFloat(e[1]), s = parseFloat(e[2]));
3782
3782
  }
3783
- let c = s - S / 2, l = C + 10;
3783
+ let c = s - b / 2, l = x + 10;
3784
3784
  (t === 0 || t === 1) && (l = o), i.attr("transform", `translate(${l}, ${c + 20})`);
3785
3785
  }), _ > g + v + 20) {
3786
3786
  let e = w + g + v + 20, n;
3787
3787
  if (t.look === "neo") {
3788
3788
  let t = .001, r = [
3789
- [C, e],
3790
- [C + y, e],
3791
- [C + y, e + t],
3792
- [C, e + t]
3789
+ [x, e],
3790
+ [x + y, e],
3791
+ [x + y, e + t],
3792
+ [x, e + t]
3793
3793
  ];
3794
- n = E.polygon(r, D);
3795
- } else n = E.line(C, e, C + y, e, D);
3794
+ n = T.polygon(r, E);
3795
+ } else n = T.line(x, e, x + y, e, E);
3796
3796
  h.insert(() => n).attr("class", "divider");
3797
3797
  }
3798
- return I(t, k), t.intersect = function(e) {
3799
- return K.rect(t, e);
3798
+ return R(t, k), t.intersect = function(e) {
3799
+ return q.rect(t, e);
3800
3800
  }, i && t.look !== "handDrawn" && (p || f?.length) && h.selectAll("path").attr("style", i), h;
3801
3801
  }
3802
- e(Zn, "requirementBox");
3803
- async function $(e, t, i, o = "", s = "center") {
3802
+ e(er, "requirementBox");
3803
+ async function Q(e, t, i, o = "", s = "center") {
3804
3804
  if (t === "") return 0;
3805
- let c = e.insert("g").attr("class", "label").attr("style", o), l = a(), u = l.htmlLabels ?? !0, d = await v(c, r(f(t)), {
3805
+ let c = e.insert("g").attr("class", "label").attr("style", o), l = a(), u = l.htmlLabels ?? !0, d = await b(c, r(f(t)), {
3806
3806
  width: h(t, l) + 50,
3807
3807
  classes: "markdown-node-label",
3808
3808
  useHtmlLabels: u,
@@ -3822,8 +3822,8 @@ async function $(e, t, i, o = "", s = "center") {
3822
3822
  }
3823
3823
  return c.attr("transform", `translate(${-p.width / 2},${-p.height / 2 + i})`), p.height;
3824
3824
  }
3825
- e($, "addText");
3826
- var Qn = /* @__PURE__ */ e((e) => {
3825
+ e(Q, "addText");
3826
+ var tr = /* @__PURE__ */ e((e) => {
3827
3827
  switch (e) {
3828
3828
  case "Very High": return "red";
3829
3829
  case "High": return "orange";
@@ -3832,12 +3832,12 @@ var Qn = /* @__PURE__ */ e((e) => {
3832
3832
  case "Very Low": return "lightblue";
3833
3833
  }
3834
3834
  }, "colorFromPriority");
3835
- async function $n(e, t, { config: n }) {
3836
- let { labelStyles: r, nodeStyles: i } = x(t);
3835
+ async function nr(e, t, { config: n }) {
3836
+ let { labelStyles: r, nodeStyles: i } = C(t);
3837
3837
  t.labelStyle = r || "";
3838
3838
  let a = t.width;
3839
3839
  t.width = (t.width ?? 200) - 10;
3840
- let { shapeSvg: o, bbox: s, label: c } = await P(e, t, L(t)), l = t.padding || 10, u = "", d;
3840
+ let { shapeSvg: o, bbox: s, label: c } = await I(e, t, z(t)), l = t.padding || 10, u = "", d;
3841
3841
  "ticket" in t && t.ticket && n?.kanban?.ticketBaseUrl && (u = n?.kanban?.ticketBaseUrl.replace("#TICKET#", t.ticket), d = o.insert("svg:a", ":first-child").attr("class", "kanban-ticket-link").attr("xlink:href", u).attr("target", "_blank"));
3842
3842
  let f = {
3843
3843
  useHtmlLabels: t.useHtmlLabels,
@@ -3847,32 +3847,32 @@ async function $n(e, t, { config: n }) {
3847
3847
  padding: t.padding || 8,
3848
3848
  centerLabel: !1
3849
3849
  }, p, m;
3850
- d ? {label: p, bbox: m} = await F(d, "ticket" in t && t.ticket || "", f) : {label: p, bbox: m} = await F(o, "ticket" in t && t.ticket || "", f);
3851
- let { label: h, bbox: g } = await F(o, "assigned" in t && t.assigned || "", f);
3850
+ d ? {label: p, bbox: m} = await L(d, "ticket" in t && t.ticket || "", f) : {label: p, bbox: m} = await L(o, "ticket" in t && t.ticket || "", f);
3851
+ let { label: h, bbox: g } = await L(o, "assigned" in t && t.assigned || "", f);
3852
3852
  t.width = a;
3853
- let _ = t?.width || 0, v = Math.max(m.height, g.height) / 2, y = Math.max(s.height + 20, t?.height || 0) + v, S = -_ / 2, C = -y / 2;
3853
+ let _ = t?.width || 0, v = Math.max(m.height, g.height) / 2, y = Math.max(s.height + 20, t?.height || 0) + v, b = -_ / 2, x = -y / 2;
3854
3854
  c.attr("transform", "translate(" + (l - _ / 2) + ", " + (-v - s.height / 2) + ")"), p.attr("transform", "translate(" + (l - _ / 2) + ", " + (-v + s.height / 2) + ")"), h.attr("transform", "translate(" + (l + _ / 2 - g.width - 20) + ", " + (-v + s.height / 2) + ")");
3855
- let w, { rx: E, ry: D } = t, { cssStyles: O } = t;
3855
+ let w, { rx: T, ry: E } = t, { cssStyles: O } = t;
3856
3856
  if (t.look === "handDrawn") {
3857
- let e = T.svg(o), n = b(t, {}), r = E || D ? e.path(q(S, C, _, y, E || 0), n) : e.rectangle(S, C, _, y, n);
3857
+ let e = D.svg(o), n = S(t, {}), r = T || E ? e.path(J(b, x, _, y, T || 0), n) : e.rectangle(b, x, _, y, n);
3858
3858
  w = o.insert(() => r, ":first-child"), w.attr("class", "basic label-container").attr("style", O || null);
3859
3859
  } else {
3860
- w = o.insert("rect", ":first-child"), w.attr("class", "basic label-container __APA__").attr("style", i).attr("rx", E ?? 5).attr("ry", D ?? 5).attr("x", S).attr("y", C).attr("width", _).attr("height", y);
3860
+ w = o.insert("rect", ":first-child"), w.attr("class", "basic label-container __APA__").attr("style", i).attr("rx", T ?? 5).attr("ry", E ?? 5).attr("x", b).attr("y", x).attr("width", _).attr("height", y);
3861
3861
  let e = "priority" in t && t.priority;
3862
3862
  if (e) {
3863
- let t = o.append("line"), n = S + 2, r = C + Math.floor((E ?? 0) / 2), i = C + y - Math.floor((E ?? 0) / 2);
3864
- t.attr("x1", n).attr("y1", r).attr("x2", n).attr("y2", i).attr("stroke-width", "4").attr("stroke", Qn(e));
3863
+ let t = o.append("line"), n = b + 2, r = x + Math.floor((T ?? 0) / 2), i = x + y - Math.floor((T ?? 0) / 2);
3864
+ t.attr("x1", n).attr("y1", r).attr("x2", n).attr("y2", i).attr("stroke-width", "4").attr("stroke", tr(e));
3865
3865
  }
3866
3866
  }
3867
- return I(t, w), t.height = y, t.intersect = function(e) {
3868
- return K.rect(t, e);
3867
+ return R(t, w), t.height = y, t.intersect = function(e) {
3868
+ return q.rect(t, e);
3869
3869
  }, o;
3870
3870
  }
3871
- e($n, "kanbanItem");
3872
- async function er(e, n) {
3873
- let { labelStyles: r, nodeStyles: i } = x(n);
3871
+ e(nr, "kanbanItem");
3872
+ async function rr(e, n) {
3873
+ let { labelStyles: r, nodeStyles: i } = C(n);
3874
3874
  n.labelStyle = r;
3875
- let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await P(e, n, L(n)), l = o.width + 10 * s, u = o.height + 8 * s, d = .15 * l, { cssStyles: f } = n, m = o.width + 20, h = o.height + 20, g = Math.max(l, m), _ = Math.max(u, h);
3875
+ let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await I(e, n, z(n)), l = o.width + 10 * s, u = o.height + 8 * s, d = .15 * l, { cssStyles: f } = n, m = o.width + 20, h = o.height + 20, g = Math.max(l, m), _ = Math.max(u, h);
3876
3876
  c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`);
3877
3877
  let v, y = `M0 0
3878
3878
  a${d},${d} 1 0,0 ${g * .25},${-1 * _ * .1}
@@ -3894,20 +3894,20 @@ async function er(e, n) {
3894
3894
  a${d},${d} 1 0,0 ${g * .1},${-1 * _ * .33}
3895
3895
  H0 V0 Z`;
3896
3896
  if (n.look === "handDrawn") {
3897
- let e = T.svg(a), t = b(n, {}), r = e.path(y, t);
3897
+ let e = D.svg(a), t = S(n, {}), r = e.path(y, t);
3898
3898
  v = a.insert(() => r, ":first-child"), v.attr("class", "basic label-container").attr("style", p(f));
3899
3899
  } else v = a.insert("path", ":first-child").attr("class", "basic label-container").attr("style", i).attr("d", y);
3900
- return v.attr("transform", `translate(${-g / 2}, ${-_ / 2})`), I(n, v), n.calcIntersect = function(e, t) {
3901
- return K.rect(e, t);
3900
+ return v.attr("transform", `translate(${-g / 2}, ${-_ / 2})`), R(n, v), n.calcIntersect = function(e, t) {
3901
+ return q.rect(e, t);
3902
3902
  }, n.intersect = function(e) {
3903
- return t.info("Bang intersect", n, e), K.rect(n, e);
3903
+ return t.info("Bang intersect", n, e), q.rect(n, e);
3904
3904
  }, a;
3905
3905
  }
3906
- e(er, "bang");
3907
- async function tr(e, n) {
3908
- let { labelStyles: r, nodeStyles: i } = x(n);
3906
+ e(rr, "bang");
3907
+ async function ir(e, n) {
3908
+ let { labelStyles: r, nodeStyles: i } = C(n);
3909
3909
  n.labelStyle = r;
3910
- let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await P(e, n, L(n)), l = o.width + 2 * s, u = o.height + 2 * s, d = .15 * l, f = .25 * l, m = .35 * l, h = .2 * l, { cssStyles: g } = n, _, v = `M0 0
3910
+ let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await I(e, n, z(n)), l = o.width + 2 * s, u = o.height + 2 * s, d = .15 * l, f = .25 * l, m = .35 * l, h = .2 * l, { cssStyles: g } = n, _, v = `M0 0
3911
3911
  a${d},${d} 0 0,1 ${l * .25},${-1 * l * .1}
3912
3912
  a${m},${m} 1 0,1 ${l * .4},${-1 * l * .1}
3913
3913
  a${f},${f} 1 0,1 ${l * .35},${l * .2}
@@ -3923,20 +3923,20 @@ async function tr(e, n) {
3923
3923
  a${h},${h} 1 0,1 ${l * .1},${-1 * u * .65}
3924
3924
  H0 V0 Z`;
3925
3925
  if (n.look === "handDrawn") {
3926
- let e = T.svg(a), t = b(n, {}), r = e.path(v, t);
3926
+ let e = D.svg(a), t = S(n, {}), r = e.path(v, t);
3927
3927
  _ = a.insert(() => r, ":first-child"), _.attr("class", "basic label-container").attr("style", p(g));
3928
3928
  } else _ = a.insert("path", ":first-child").attr("class", "basic label-container").attr("style", i).attr("d", v);
3929
- return c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`), _.attr("transform", `translate(${-l / 2}, ${-u / 2})`), I(n, _), n.calcIntersect = function(e, t) {
3930
- return K.rect(e, t);
3929
+ return c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`), _.attr("transform", `translate(${-l / 2}, ${-u / 2})`), R(n, _), n.calcIntersect = function(e, t) {
3930
+ return q.rect(e, t);
3931
3931
  }, n.intersect = function(e) {
3932
- return t.info("Cloud intersect", n, e), K.rect(n, e);
3932
+ return t.info("Cloud intersect", n, e), q.rect(n, e);
3933
3933
  }, a;
3934
3934
  }
3935
- e(tr, "cloud");
3936
- async function nr(e, t) {
3937
- let { labelStyles: n, nodeStyles: r } = x(t);
3935
+ e(ir, "cloud");
3936
+ async function ar(e, t) {
3937
+ let { labelStyles: n, nodeStyles: r } = C(t);
3938
3938
  t.labelStyle = n;
3939
- let { shapeSvg: i, bbox: a, halfPadding: o, label: s } = await P(e, t, L(t)), c = a.width + 8 * o, l = a.height + 2 * o, u = t.look === "neo" ? `
3939
+ let { shapeSvg: i, bbox: a, halfPadding: o, label: s } = await I(e, t, z(t)), c = a.width + 8 * o, l = a.height + 2 * o, u = t.look === "neo" ? `
3940
3940
  M${-c / 2} ${l / 2 - 5}
3941
3941
  v${-l + 10}
3942
3942
  q0,-5 5,-5
@@ -3959,18 +3959,224 @@ async function nr(e, t) {
3959
3959
  `;
3960
3960
  if (!t.domId) throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);
3961
3961
  let d = i.append("path").attr("id", t.domId).attr("class", "node-bkg node-" + t.type).attr("style", r).attr("d", u);
3962
- 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()), I(t, d), t.calcIntersect = function(e, t) {
3963
- return K.rect(e, t);
3962
+ 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()), R(t, d), t.calcIntersect = function(e, t) {
3963
+ return q.rect(e, t);
3964
3964
  }, t.intersect = function(e) {
3965
- return K.rect(t, e);
3965
+ return q.rect(t, e);
3966
+ }, i;
3967
+ }
3968
+ e(ar, "defaultMindmapNode");
3969
+ async function or(e, t) {
3970
+ return je(e, t, { padding: t.padding ?? 0 });
3971
+ }
3972
+ e(or, "mindmapCircle");
3973
+ var sr = 36, cr = 50, lr = 100, ur = 80, dr = 6, fr = 16, pr = "bpmn", mr = {
3974
+ start: {
3975
+ rings: 1,
3976
+ strokeWidth: 1.6
3977
+ },
3978
+ intermediate: {
3979
+ rings: 2,
3980
+ strokeWidth: 1.4
3981
+ },
3982
+ boundary: {
3983
+ rings: 2,
3984
+ strokeWidth: 1.4
3985
+ },
3986
+ end: {
3987
+ rings: 1,
3988
+ strokeWidth: 3.4
3989
+ }
3990
+ }, hr;
3991
+ async function gr() {
3992
+ return hr ??= import("./bpmnIcons-APHXDYXF-BcsYKfS7.js").then(({ bpmnIcons: e }) => {
3993
+ v(e.prefix) || g([{
3994
+ name: e.prefix,
3995
+ icons: e
3996
+ }]);
3997
+ }), hr;
3998
+ }
3999
+ e(gr, "ensureBpmnIcons");
4000
+ function _r(e) {
4001
+ let t = e.metadata?.dataDirection;
4002
+ return t === "input" || t === "output" ? t : void 0;
4003
+ }
4004
+ e(_r, "dataDirectionOf");
4005
+ function vr(e) {
4006
+ return e.metadata?.isCollection === !0;
4007
+ }
4008
+ e(vr, "isCollectionData");
4009
+ async function yr(e, t) {
4010
+ return await gr(), y(e, {
4011
+ height: t,
4012
+ width: t,
4013
+ fallbackPrefix: pr
4014
+ });
4015
+ }
4016
+ e(yr, "glyphSvg");
4017
+ var br = /* @__PURE__ */ e((e, t, n) => {
4018
+ let r = (t.x ?? 0) - (t.left ?? 0), i = (t.y ?? 0) - (t.top ?? 0);
4019
+ e.attr("transform", `translate(${-t.width / 2 - r},${n - t.height / 2 - i})`);
4020
+ }, "positionLabelBelow"), xr = /* @__PURE__ */ e(async (e, t, n) => {
4021
+ if (!t) return;
4022
+ let r = e.append("g").attr("class", "bpmn-glyph");
4023
+ r.html(`<g>${await yr(t, n)}</g>`), r.attr("transform", `translate(${-n / 2}, ${-n / 2})`);
4024
+ }, "appendGlyph"), Sr = /* @__PURE__ */ e((e, t, n, r, i) => {
4025
+ i && (t.metadata = {
4026
+ ...t.metadata ?? {},
4027
+ drawnExtent: i
4028
+ });
4029
+ let a = e.insert("rect", ":first-child").attr("class", "bpmn-bounds").attr("x", -n / 2).attr("y", -r / 2).attr("width", n).attr("height", r).attr("opacity", 0).attr("aria-hidden", "true");
4030
+ return R(t, a), a;
4031
+ }, "reserveBounds"), Cr = 8, wr = /* @__PURE__ */ e((e, t, n) => Math.min(Math.max(e, t), n), "clamp"), Tr = /* @__PURE__ */ e((t, n, r, i, a) => {
4032
+ let o = t.x ?? 0, s = t.y ?? 0, c = n / 2, l = r / 2, u = i.x - o, d = i.y - s, f = a ?? (Math.abs(u) * l > Math.abs(d) * c ? u >= 0 ? "right" : "left" : d >= 0 ? "bottom" : "top"), p = /* @__PURE__ */ e((e) => Math.max(0, e - Math.min(Cr, e / 2)), "reach");
4033
+ return f === "left" || f === "right" ? {
4034
+ x: o + (f === "right" ? c : -c),
4035
+ y: wr(i.y, s - p(l), s + p(l))
4036
+ } : {
4037
+ x: wr(i.x, o - p(c), o + p(c)),
4038
+ y: s + (f === "bottom" ? l : -l)
4039
+ };
4040
+ }, "faceProjectIntersect"), Er = /* @__PURE__ */ e((e, t, n) => {
4041
+ let r = e.x ?? 0, i = e.y ?? 0, a = t / 2, o = n.x - r, s = n.y - i, c = a * .85;
4042
+ if (Math.abs(s) >= Math.abs(o)) {
4043
+ let e = wr(o, -c, c);
4044
+ return {
4045
+ x: r + e,
4046
+ y: i + Math.sign(s || 1) * Math.sqrt(a * a - e * e)
4047
+ };
4048
+ }
4049
+ let l = wr(s, -c, c);
4050
+ return {
4051
+ x: r + Math.sign(o || 1) * Math.sqrt(a * a - l * l),
4052
+ y: i + l
4053
+ };
4054
+ }, "ringIntersect"), Dr = /* @__PURE__ */ e((e, t, n, r) => {
4055
+ let i = e.x ?? 0, a = e.y ?? 0, o = t / 2, s = n / 2, c = r.x - i, l = r.y - a;
4056
+ return Math.abs(c) * s > Math.abs(l) * o ? {
4057
+ x: i + Math.sign(c) * o,
4058
+ y: a
4059
+ } : {
4060
+ x: i,
4061
+ y: a + Math.sign(l || 1) * s
4062
+ };
4063
+ }, "faceCentreIntersect");
4064
+ async function Or(e, t, n) {
4065
+ let r = t, { labelStyles: i, nodeStyles: a } = C(t);
4066
+ t.labelStyle = i;
4067
+ let { rings: o, strokeWidth: s } = mr[n], c = sr / 2, { shapeSvg: l, bbox: u, label: d } = await I(e, t, z(t, `bpmn-event bpmn-event-${n}`)), f = l.insert("g", ":first-child").attr("class", "bpmn-event-body");
4068
+ f.attr("style", a);
4069
+ for (let e = 0; e < o; e++) f.append("circle").attr("class", e === 0 ? "bpmn-event-ring" : "bpmn-event-ring bpmn-event-ring-inner").attr("r", c - e * 3).style("stroke-width", `${s}px`);
4070
+ await xr(f, r.icon, fr);
4071
+ let p = u.height > 0 && !!t.label, m = sr + 2 * (p ? dr + u.height : 0), h = Math.max(sr, p ? u.width : 0);
4072
+ return p && br(d, u, c + dr + u.height / 2), Sr(l, t, h, m, {
4073
+ width: sr,
4074
+ height: sr
4075
+ }), t.intersect = function(e) {
4076
+ return Er(t, sr, e);
4077
+ }, l;
4078
+ }
4079
+ e(Or, "renderBpmnEvent");
4080
+ async function kr(e, t) {
4081
+ return Or(e, t, "start");
4082
+ }
4083
+ e(kr, "bpmnStart");
4084
+ async function Ar(e, t) {
4085
+ return Or(e, t, "intermediate");
4086
+ }
4087
+ e(Ar, "bpmnIntermediate");
4088
+ async function jr(e, t) {
4089
+ return Or(e, t, "boundary");
4090
+ }
4091
+ e(jr, "bpmnBoundary");
4092
+ async function Mr(e, t) {
4093
+ return Or(e, t, "end");
4094
+ }
4095
+ e(Mr, "bpmnEnd");
4096
+ async function Nr(e, t) {
4097
+ let n = t, { labelStyles: r, nodeStyles: i } = C(t);
4098
+ t.labelStyle = r;
4099
+ let a = cr / 2, { shapeSvg: o, bbox: s, label: c } = await I(e, t, z(t, "bpmn-gateway")), l = o.insert("g", ":first-child").attr("class", "bpmn-gateway-body");
4100
+ l.append("polygon").attr("class", "bpmn-gateway-diamond").attr("points", `0,${-a} ${a},0 0,${a} ${-a},0`).attr("style", i), await xr(l, n.icon, fr + 2);
4101
+ let u = s.height > 0 && !!t.label, d = cr + 2 * (u ? dr + s.height : 0), f = Math.max(cr, u ? s.width : 0);
4102
+ return u && br(c, s, a + dr + s.height / 2), Sr(o, t, f, d, {
4103
+ width: cr,
4104
+ height: cr
4105
+ }), t.intersect = function(e) {
4106
+ return Dr(t, cr, cr, e);
4107
+ }, o;
4108
+ }
4109
+ e(Nr, "bpmnGateway");
4110
+ async function Pr(e, t) {
4111
+ let n = t, { labelStyles: r, nodeStyles: i } = C(t);
4112
+ t.labelStyle = r;
4113
+ let { shapeSvg: a, bbox: o, label: s } = await I(e, t, z(t, "bpmn-activity")), c = n.markers ?? [], l = n.icon, u = l ? fr + 6 : 10, d = c.length > 0 ? fr + 4 : 10, f = Math.max(lr, o.width + 16), p = Math.max(ur, o.height + u + d), m = a.insert("g", ":first-child").attr("class", "bpmn-activity-body");
4114
+ if (m.append("rect").attr("class", "bpmn-activity-rect").attr("x", -f / 2).attr("y", -p / 2).attr("width", f).attr("height", p).attr("rx", 10).attr("ry", 10).attr("style", i), l) {
4115
+ let e = m.append("g").attr("class", "bpmn-activity-icon");
4116
+ e.html(`<g>${await yr(l, fr)}</g>`), e.attr("transform", `translate(${-f / 2 + 6}, ${-p / 2 + 6})`);
4117
+ }
4118
+ if (c.length > 0) {
4119
+ let e = m.append("g").attr("class", "bpmn-activity-markers"), t = fr - 2, n = c.length * t;
4120
+ for (let [r, i] of c.entries()) {
4121
+ let a = e.append("g");
4122
+ a.html(`<g>${await yr(i, t)}</g>`), a.attr("transform", `translate(${-n / 2 + r * t}, 0)`);
4123
+ }
4124
+ e.attr("transform", `translate(0, ${p / 2 - t - 3})`);
4125
+ }
4126
+ return o.height > 0 && br(s, o, (-p / 2 + u + (p / 2 - d)) / 2), R(t, m), t.intersect = function(e) {
4127
+ return Tr(t, f, p, e);
4128
+ }, a;
4129
+ }
4130
+ e(Pr, "bpmnActivity");
4131
+ var Fr = 36, Ir = 50, Lr = 10;
4132
+ async function Rr(e, t) {
4133
+ let { labelStyles: n, nodeStyles: r } = C(t);
4134
+ t.labelStyle = n;
4135
+ let { shapeSvg: i, bbox: a, label: o } = await I(e, t, z(t, "bpmn-data-object")), s = i.insert("g", ":first-child").attr("class", "bpmn-data-body"), c = -Fr / 2, l = -Ir / 2, u = Fr / 2, d = Ir / 2;
4136
+ s.append("path").attr("class", "bpmn-data-page").attr("d", `M${c},${l} H${u - Lr} L${u},${l + Lr} V${d} H${c} Z`).attr("style", r), s.append("path").attr("class", "bpmn-data-fold").attr("d", `M${u - Lr},${l} V${l + Lr} H${u}`);
4137
+ let f = _r(t);
4138
+ f && s.append("path").attr("class", `bpmn-data-arrow bpmn-data-arrow-${f}`).attr("d", `M${c + 4},${l + 9} h7 v-3 l5,4.5 -5,4.5 v-3 h-7 Z`), vr(t) && s.append("path").attr("class", "bpmn-data-collection").attr("d", `M-4,${d - 11} v9 M0,${d - 11} v9 M4,${d - 11} v9`);
4139
+ let p = a.height > 0 && !!t.label, m = Ir + 2 * (p ? dr + a.height : 0), h = Math.max(Fr, p ? a.width : 0);
4140
+ return p && br(o, a, Ir / 2 + dr + a.height / 2), Sr(i, t, h, m, {
4141
+ width: Fr,
4142
+ height: Ir
4143
+ }), t.intersect = function(e) {
4144
+ return Tr(t, Fr, Ir, e);
4145
+ }, i;
4146
+ }
4147
+ e(Rr, "bpmnDataObject");
4148
+ var $ = 50;
4149
+ async function zr(e, t) {
4150
+ let { labelStyles: n, nodeStyles: r } = C(t);
4151
+ t.labelStyle = n;
4152
+ let { shapeSvg: i, bbox: a, label: o } = await I(e, t, z(t, "bpmn-data-store")), s = i.insert("g", ":first-child").attr("class", "bpmn-data-body"), c = $ / 2;
4153
+ s.append("path").attr("class", "bpmn-store-body").attr("d", `M${-c},${-c + 6} a${c},6 0 0 1 ${$},0 V${c - 6} a${c},6 0 0 1 ${-$},0 Z`).attr("style", r);
4154
+ for (let e of [
4155
+ 0,
4156
+ 5,
4157
+ 10
4158
+ ]) s.append("path").attr("class", "bpmn-store-rings").attr("d", `M${-c},${-c + 6 + e} a${c},6 0 0 0 ${$},0`);
4159
+ let l = a.height > 0 && !!t.label, u = $ + 2 * (l ? dr + a.height : 0), d = Math.max($, l ? a.width : 0);
4160
+ return l && br(o, a, c + dr + a.height / 2), Sr(i, t, d, u, {
4161
+ width: $,
4162
+ height: $
4163
+ }), t.intersect = function(e) {
4164
+ return Tr(t, $, $, e);
3966
4165
  }, i;
3967
4166
  }
3968
- e(nr, "defaultMindmapNode");
3969
- async function rr(e, t) {
3970
- return Ae(e, t, { padding: t.padding ?? 0 });
4167
+ e(zr, "bpmnDataStore");
4168
+ async function Br(e, t) {
4169
+ let { labelStyles: n } = C(t);
4170
+ t.labelStyle = n, t.wrappingWidth = 160;
4171
+ let { shapeSvg: r, bbox: i, label: a } = await I(e, t, z(t, "bpmn-annotation")), o = Math.max(28, i.height + 16), s = i.width + 16 + 6, c = t.metadata?.attachFace === "right" ? "right" : "left";
4172
+ r.insert("g", ":first-child").attr("class", "bpmn-annotation-body").append("path").attr("class", "bpmn-annotation-bracket").attr("d", c === "right" ? `M${s / 2 - 6},${-o / 2} h6 V${o / 2} h-6` : `M${-s / 2 + 6},${-o / 2} h-6 V${o / 2} h6`);
4173
+ let l = c === "right" ? -s / 2 + 8 : -s / 2 + 8 + 6;
4174
+ return a.attr("transform", `translate(${l - (i.x ?? 0) + (i.left ?? 0)},${-i.height / 2 - ((i.y ?? 0) - (i.top ?? 0))})`), Sr(r, t, s, o), t.intersect = function(e) {
4175
+ return Tr(t, s, o, e, c);
4176
+ }, r;
3971
4177
  }
3972
- e(rr, "mindmapCircle");
3973
- var ir = [
4178
+ e(Br, "bpmnAnnotation");
4179
+ var Vr = [
3974
4180
  {
3975
4181
  semanticName: "Process",
3976
4182
  name: "Rectangle",
@@ -3982,7 +4188,7 @@ var ir = [
3982
4188
  "rectangle"
3983
4189
  ],
3984
4190
  internalAliases: ["squareRect"],
3985
- handler: gn
4191
+ handler: yn
3986
4192
  },
3987
4193
  {
3988
4194
  semanticName: "Event",
@@ -3991,7 +4197,7 @@ var ir = [
3991
4197
  description: "Represents an event",
3992
4198
  aliases: ["event"],
3993
4199
  internalAliases: ["roundedRect"],
3994
- handler: fn
4200
+ handler: hn
3995
4201
  },
3996
4202
  {
3997
4203
  semanticName: "Terminal Point",
@@ -3999,7 +4205,7 @@ var ir = [
3999
4205
  shortName: "stadium",
4000
4206
  description: "Terminal point",
4001
4207
  aliases: ["terminal", "pill"],
4002
- handler: yn
4208
+ handler: Sn
4003
4209
  },
4004
4210
  {
4005
4211
  semanticName: "Subprocess",
@@ -4012,7 +4218,7 @@ var ir = [
4012
4218
  "framed-rectangle",
4013
4219
  "subroutine"
4014
4220
  ],
4015
- handler: wn
4221
+ handler: Dn
4016
4222
  },
4017
4223
  {
4018
4224
  semanticName: "Database",
@@ -4024,7 +4230,7 @@ var ir = [
4024
4230
  "database",
4025
4231
  "cylinder"
4026
4232
  ],
4027
- handler: Ge
4233
+ handler: Je
4028
4234
  },
4029
4235
  {
4030
4236
  semanticName: "Data Store",
@@ -4032,7 +4238,7 @@ var ir = [
4032
4238
  shortName: "datastore",
4033
4239
  description: "Data flow diagram data store",
4034
4240
  aliases: ["data-store"],
4035
- handler: qe
4241
+ handler: Xe
4036
4242
  },
4037
4243
  {
4038
4244
  semanticName: "Folder",
@@ -4040,35 +4246,35 @@ var ir = [
4040
4246
  shortName: "folder",
4041
4247
  description: "Folder or directory",
4042
4248
  aliases: ["directory"],
4043
- handler: tt
4249
+ handler: it
4044
4250
  },
4045
4251
  {
4046
4252
  semanticName: "Bucket",
4047
4253
  name: "Bucket",
4048
4254
  shortName: "bucket",
4049
4255
  description: "Object storage bucket",
4050
- handler: fe
4256
+ handler: pe
4051
4257
  },
4052
4258
  {
4053
4259
  semanticName: "Console",
4054
4260
  name: "Console (terminal window)",
4055
4261
  shortName: "console",
4056
4262
  description: "Terminal or console window",
4057
- handler: Me
4263
+ handler: Ne
4058
4264
  },
4059
4265
  {
4060
4266
  semanticName: "Browser",
4061
4267
  name: "Browser",
4062
4268
  shortName: "browser",
4063
4269
  description: "Browser window",
4064
- handler: Ee
4270
+ handler: De
4065
4271
  },
4066
4272
  {
4067
4273
  semanticName: "Person",
4068
4274
  name: "Person",
4069
4275
  shortName: "person",
4070
4276
  description: "Person (circular head above a rounded body)",
4071
- handler: ze
4277
+ handler: He
4072
4278
  },
4073
4279
  {
4074
4280
  semanticName: "Start",
@@ -4076,7 +4282,7 @@ var ir = [
4076
4282
  shortName: "circle",
4077
4283
  description: "Starting point",
4078
4284
  aliases: ["circ"],
4079
- handler: Ae
4285
+ handler: je
4080
4286
  },
4081
4287
  {
4082
4288
  semanticName: "Bang",
@@ -4084,7 +4290,7 @@ var ir = [
4084
4290
  shortName: "bang",
4085
4291
  description: "Bang",
4086
4292
  aliases: ["bang"],
4087
- handler: er
4293
+ handler: rr
4088
4294
  },
4089
4295
  {
4090
4296
  semanticName: "Cloud",
@@ -4092,7 +4298,7 @@ var ir = [
4092
4298
  shortName: "cloud",
4093
4299
  description: "cloud",
4094
4300
  aliases: ["cloud"],
4095
- handler: tr
4301
+ handler: ir
4096
4302
  },
4097
4303
  {
4098
4304
  semanticName: "Decision",
@@ -4104,7 +4310,7 @@ var ir = [
4104
4310
  "diamond",
4105
4311
  "question"
4106
4312
  ],
4107
- handler: ln
4313
+ handler: fn
4108
4314
  },
4109
4315
  {
4110
4316
  semanticName: "Prepare Conditional",
@@ -4112,7 +4318,7 @@ var ir = [
4112
4318
  shortName: "hex",
4113
4319
  description: "Preparation or condition step",
4114
4320
  aliases: ["hexagon", "prepare"],
4115
- handler: at
4321
+ handler: ct
4116
4322
  },
4117
4323
  {
4118
4324
  semanticName: "Data Input/Output",
@@ -4121,7 +4327,7 @@ var ir = [
4121
4327
  description: "Represents input or output",
4122
4328
  aliases: ["lean-right", "in-out"],
4123
4329
  internalAliases: ["lean_right"],
4124
- handler: ht
4330
+ handler: vt
4125
4331
  },
4126
4332
  {
4127
4333
  semanticName: "Data Input/Output",
@@ -4130,7 +4336,7 @@ var ir = [
4130
4336
  description: "Represents output or input",
4131
4337
  aliases: ["lean-left", "out-in"],
4132
4338
  internalAliases: ["lean_left"],
4133
- handler: mt
4339
+ handler: _t
4134
4340
  },
4135
4341
  {
4136
4342
  semanticName: "Priority Action",
@@ -4142,7 +4348,7 @@ var ir = [
4142
4348
  "trapezoid-bottom",
4143
4349
  "trapezoid"
4144
4350
  ],
4145
- handler: Fn
4351
+ handler: Rn
4146
4352
  },
4147
4353
  {
4148
4354
  semanticName: "Manual Operation",
@@ -4155,7 +4361,7 @@ var ir = [
4155
4361
  "inv-trapezoid"
4156
4362
  ],
4157
4363
  internalAliases: ["inv_trapezoid"],
4158
- handler: ft
4364
+ handler: ht
4159
4365
  },
4160
4366
  {
4161
4367
  semanticName: "Stop",
@@ -4164,14 +4370,14 @@ var ir = [
4164
4370
  description: "Represents a stop point",
4165
4371
  aliases: ["double-circle"],
4166
4372
  internalAliases: ["doublecircle"],
4167
- handler: Ye
4373
+ handler: Qe
4168
4374
  },
4169
4375
  {
4170
4376
  semanticName: "Text Block",
4171
4377
  name: "Text Block",
4172
4378
  shortName: "text",
4173
4379
  description: "Text block",
4174
- handler: On
4380
+ handler: jn
4175
4381
  },
4176
4382
  {
4177
4383
  semanticName: "Card",
@@ -4179,7 +4385,7 @@ var ir = [
4179
4385
  shortName: "notch-rect",
4180
4386
  description: "Represents a card",
4181
4387
  aliases: ["card", "notched-rectangle"],
4182
- handler: Oe
4388
+ handler: ke
4183
4389
  },
4184
4390
  {
4185
4391
  semanticName: "Lined/Shaded Process",
@@ -4192,7 +4398,7 @@ var ir = [
4192
4398
  "lin-proc",
4193
4399
  "shaded-process"
4194
4400
  ],
4195
- handler: mn
4401
+ handler: _n
4196
4402
  },
4197
4403
  {
4198
4404
  semanticName: "Start",
@@ -4201,7 +4407,7 @@ var ir = [
4201
4407
  description: "Small starting point",
4202
4408
  aliases: ["start", "small-circle"],
4203
4409
  internalAliases: ["stateStart"],
4204
- handler: Sn
4410
+ handler: Tn
4205
4411
  },
4206
4412
  {
4207
4413
  semanticName: "Stop",
@@ -4210,7 +4416,7 @@ var ir = [
4210
4416
  description: "Stop point",
4211
4417
  aliases: ["stop", "framed-circle"],
4212
4418
  internalAliases: ["stateEnd"],
4213
- handler: xn
4419
+ handler: wn
4214
4420
  },
4215
4421
  {
4216
4422
  semanticName: "Fork/Join",
@@ -4219,7 +4425,7 @@ var ir = [
4219
4425
  description: "Fork or join in process flow",
4220
4426
  aliases: ["join"],
4221
4427
  internalAliases: ["forkJoin"],
4222
- handler: nt
4428
+ handler: at
4223
4429
  },
4224
4430
  {
4225
4431
  semanticName: "Collate",
@@ -4227,7 +4433,7 @@ var ir = [
4227
4433
  shortName: "hourglass",
4228
4434
  description: "Represents a collate operation",
4229
4435
  aliases: ["hourglass", "collate"],
4230
- handler: ot
4436
+ handler: lt
4231
4437
  },
4232
4438
  {
4233
4439
  semanticName: "Comment",
@@ -4235,21 +4441,21 @@ var ir = [
4235
4441
  shortName: "brace",
4236
4442
  description: "Adds a comment",
4237
4443
  aliases: ["comment", "brace-l"],
4238
- handler: Fe
4444
+ handler: Le
4239
4445
  },
4240
4446
  {
4241
4447
  semanticName: "Comment Right",
4242
4448
  name: "Curly Brace",
4243
4449
  shortName: "brace-r",
4244
4450
  description: "Adds a comment",
4245
- handler: Ie
4451
+ handler: ze
4246
4452
  },
4247
4453
  {
4248
4454
  semanticName: "Comment with braces on both sides",
4249
4455
  name: "Curly Braces",
4250
4456
  shortName: "braces",
4251
4457
  description: "Adds a comment",
4252
- handler: Le
4458
+ handler: Be
4253
4459
  },
4254
4460
  {
4255
4461
  semanticName: "Com Link",
@@ -4257,7 +4463,7 @@ var ir = [
4257
4463
  shortName: "bolt",
4258
4464
  description: "Communication link",
4259
4465
  aliases: ["com-link", "lightning-bolt"],
4260
- handler: gt
4466
+ handler: yt
4261
4467
  },
4262
4468
  {
4263
4469
  semanticName: "Document",
@@ -4265,7 +4471,7 @@ var ir = [
4265
4471
  shortName: "doc",
4266
4472
  description: "Represents a document",
4267
4473
  aliases: ["doc", "document"],
4268
- handler: Bn
4474
+ handler: Un
4269
4475
  },
4270
4476
  {
4271
4477
  semanticName: "Delay",
@@ -4273,7 +4479,7 @@ var ir = [
4273
4479
  shortName: "delay",
4274
4480
  description: "Represents a delay",
4275
4481
  aliases: ["half-rounded-rectangle"],
4276
- handler: rt
4482
+ handler: ot
4277
4483
  },
4278
4484
  {
4279
4485
  semanticName: "Direct Access Storage",
@@ -4281,7 +4487,7 @@ var ir = [
4281
4487
  shortName: "h-cyl",
4282
4488
  description: "Direct access storage",
4283
4489
  aliases: ["das", "horizontal-cylinder"],
4284
- handler: Pn
4490
+ handler: Ln
4285
4491
  },
4286
4492
  {
4287
4493
  semanticName: "Disk Storage",
@@ -4289,7 +4495,7 @@ var ir = [
4289
4495
  shortName: "lin-cyl",
4290
4496
  description: "Disk storage",
4291
4497
  aliases: ["disk", "lined-cylinder"],
4292
- handler: St
4498
+ handler: Tt
4293
4499
  },
4294
4500
  {
4295
4501
  semanticName: "Display",
@@ -4297,7 +4503,7 @@ var ir = [
4297
4503
  shortName: "curv-trap",
4298
4504
  description: "Represents a display",
4299
4505
  aliases: ["curved-trapezoid", "display"],
4300
- handler: Re
4506
+ handler: Ve
4301
4507
  },
4302
4508
  {
4303
4509
  semanticName: "Divided Process",
@@ -4309,7 +4515,7 @@ var ir = [
4309
4515
  "divided-rectangle",
4310
4516
  "divided-process"
4311
4517
  ],
4312
- handler: Je
4518
+ handler: Ze
4313
4519
  },
4314
4520
  {
4315
4521
  semanticName: "Extract",
@@ -4317,7 +4523,7 @@ var ir = [
4317
4523
  shortName: "tri",
4318
4524
  description: "Extraction process",
4319
4525
  aliases: ["extract", "triangle"],
4320
- handler: zn
4526
+ handler: Hn
4321
4527
  },
4322
4528
  {
4323
4529
  semanticName: "Internal Storage",
@@ -4325,7 +4531,7 @@ var ir = [
4325
4531
  shortName: "win-pane",
4326
4532
  description: "Internal storage",
4327
4533
  aliases: ["internal-storage", "window-pane"],
4328
- handler: Hn
4534
+ handler: Gn
4329
4535
  },
4330
4536
  {
4331
4537
  semanticName: "Junction",
@@ -4333,7 +4539,7 @@ var ir = [
4333
4539
  shortName: "f-circ",
4334
4540
  description: "Junction point",
4335
4541
  aliases: ["junction", "filled-circle"],
4336
- handler: Ze
4542
+ handler: et
4337
4543
  },
4338
4544
  {
4339
4545
  semanticName: "Loop Limit",
@@ -4341,7 +4547,7 @@ var ir = [
4341
4547
  shortName: "notch-pent",
4342
4548
  description: "Loop limit step",
4343
4549
  aliases: ["loop-limit", "notched-pentagon"],
4344
- handler: In
4550
+ handler: zn
4345
4551
  },
4346
4552
  {
4347
4553
  semanticName: "Manual File",
@@ -4349,7 +4555,7 @@ var ir = [
4349
4555
  shortName: "flip-tri",
4350
4556
  description: "Manual file operation",
4351
4557
  aliases: ["manual-file", "flipped-triangle"],
4352
- handler: et
4558
+ handler: rt
4353
4559
  },
4354
4560
  {
4355
4561
  semanticName: "Manual Input",
@@ -4357,7 +4563,7 @@ var ir = [
4357
4563
  shortName: "sl-rect",
4358
4564
  description: "Manual input step",
4359
4565
  aliases: ["manual-input", "sloped-rectangle"],
4360
- handler: hn
4566
+ handler: vn
4361
4567
  },
4362
4568
  {
4363
4569
  semanticName: "Multi-Document",
@@ -4369,7 +4575,7 @@ var ir = [
4369
4575
  "st-doc",
4370
4576
  "stacked-document"
4371
4577
  ],
4372
- handler: on
4578
+ handler: ln
4373
4579
  },
4374
4580
  {
4375
4581
  semanticName: "Multi-Process",
@@ -4381,7 +4587,7 @@ var ir = [
4381
4587
  "processes",
4382
4588
  "stacked-rectangle"
4383
4589
  ],
4384
- handler: an
4590
+ handler: cn
4385
4591
  },
4386
4592
  {
4387
4593
  semanticName: "Stored Data",
@@ -4389,7 +4595,7 @@ var ir = [
4389
4595
  shortName: "bow-rect",
4390
4596
  description: "Stored data",
4391
4597
  aliases: ["stored-data", "bow-tie-rectangle"],
4392
- handler: de
4598
+ handler: fe
4393
4599
  },
4394
4600
  {
4395
4601
  semanticName: "Summary",
@@ -4397,7 +4603,7 @@ var ir = [
4397
4603
  shortName: "cross-circ",
4398
4604
  description: "Summary",
4399
4605
  aliases: ["summary", "crossed-circle"],
4400
- handler: Pe
4606
+ handler: Fe
4401
4607
  },
4402
4608
  {
4403
4609
  semanticName: "Tagged Document",
@@ -4405,7 +4611,7 @@ var ir = [
4405
4611
  shortName: "tag-doc",
4406
4612
  description: "Tagged document",
4407
4613
  aliases: ["tag-doc", "tagged-document"],
4408
- handler: Dn
4614
+ handler: An
4409
4615
  },
4410
4616
  {
4411
4617
  semanticName: "Tagged Process",
@@ -4417,7 +4623,7 @@ var ir = [
4417
4623
  "tag-proc",
4418
4624
  "tagged-process"
4419
4625
  ],
4420
- handler: En
4626
+ handler: kn
4421
4627
  },
4422
4628
  {
4423
4629
  semanticName: "Paper Tape",
@@ -4425,7 +4631,7 @@ var ir = [
4425
4631
  shortName: "flag",
4426
4632
  description: "Paper tape",
4427
4633
  aliases: ["paper-tape"],
4428
- handler: Vn
4634
+ handler: Wn
4429
4635
  },
4430
4636
  {
4431
4637
  semanticName: "Odd",
@@ -4433,7 +4639,7 @@ var ir = [
4433
4639
  shortName: "odd",
4434
4640
  description: "Odd shape",
4435
4641
  internalAliases: ["rect_left_inv_arrow"],
4436
- handler: un
4642
+ handler: pn
4437
4643
  },
4438
4644
  {
4439
4645
  semanticName: "Lined Document",
@@ -4441,47 +4647,56 @@ var ir = [
4441
4647
  shortName: "lin-doc",
4442
4648
  description: "Lined document",
4443
4649
  aliases: ["lined-document"],
4444
- handler: Ct
4650
+ handler: Et
4445
4651
  }
4446
- ], ar = (/* @__PURE__ */ e(() => {
4652
+ ], Hr = (/* @__PURE__ */ e(() => {
4447
4653
  let e = [...Object.entries({
4448
- state: bn,
4449
- choice: ke,
4450
- note: sn,
4451
- composite: je,
4452
- rectWithTitle: dn,
4453
- labelRect: pt,
4454
- block_arrow: Te,
4455
- collapsedGroup: ve,
4456
- iconSquare: ut,
4457
- iconCircle: ct,
4458
- icon: st,
4459
- iconRounded: lt,
4460
- imageSquare: dt,
4461
- anchor: ce,
4462
- kanbanItem: $n,
4463
- mindmapCircle: rr,
4464
- defaultMindmapNode: nr,
4465
- classBox: Xn,
4466
- erBox: Gn,
4467
- requirementBox: Zn,
4468
- usecaseActor: Bt,
4469
- usecaseActorHollow: Wt,
4470
- usecaseActorAwesome: Ht,
4471
- usecaseActorIcon: Yt,
4472
- usecaseBusiness: Zt,
4473
- usecaseEllipse: Xe,
4474
- usecaseJsonTable: rn
4475
- }), ...ir.flatMap((e) => [
4654
+ state: Cn,
4655
+ choice: Ae,
4656
+ note: un,
4657
+ composite: Me,
4658
+ rectWithTitle: mn,
4659
+ labelRect: gt,
4660
+ block_arrow: Ee,
4661
+ collapsedGroup: ye,
4662
+ iconSquare: pt,
4663
+ iconCircle: dt,
4664
+ icon: ut,
4665
+ iconRounded: ft,
4666
+ imageSquare: mt,
4667
+ anchor: le,
4668
+ kanbanItem: nr,
4669
+ mindmapCircle: or,
4670
+ defaultMindmapNode: ar,
4671
+ classBox: $n,
4672
+ erBox: Jn,
4673
+ requirementBox: er,
4674
+ usecaseActor: Ut,
4675
+ usecaseActorHollow: qt,
4676
+ usecaseActorAwesome: Gt,
4677
+ usecaseActorIcon: Qt,
4678
+ usecaseBusiness: en,
4679
+ usecaseEllipse: $e,
4680
+ usecaseJsonTable: sn,
4681
+ "bpmn-start": kr,
4682
+ "bpmn-intermediate": Ar,
4683
+ "bpmn-boundary": jr,
4684
+ "bpmn-end": Mr,
4685
+ "bpmn-gateway": Nr,
4686
+ "bpmn-activity": Pr,
4687
+ "bpmn-data": Rr,
4688
+ "bpmn-data-store": zr,
4689
+ "bpmn-annotation": Br
4690
+ }), ...Vr.flatMap((e) => [
4476
4691
  e.shortName,
4477
4692
  ..."aliases" in e ? e.aliases : [],
4478
4693
  ..."internalAliases" in e ? e.internalAliases : []
4479
4694
  ].map((t) => [t, e.handler]))];
4480
4695
  return Object.fromEntries(e);
4481
4696
  }, "generateShapeMap"))();
4482
- function or(e) {
4483
- return e in ar;
4697
+ function Ur(e) {
4698
+ return e in Hr;
4484
4699
  }
4485
- e(or, "isValidShape");
4700
+ e(Ur, "isValidShape");
4486
4701
  //#endregion
4487
- export { or as a, I as c, V as i, q as n, P as o, K as r, ar as s, se as t };
4702
+ export { Ur as a, R as c, U as i, J as n, I as o, q as r, Hr as s, ce as t };