@pi-outpost/embed 0.6.4 → 0.6.6

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 (132) hide show
  1. package/dist/{abnfDiagram-VRR7QNED-BPTALLb_.cjs → abnfDiagram-N423BO3Z-DOZfbvMH.cjs} +1 -1
  2. package/dist/{abnfDiagram-VRR7QNED-DlAvVtuC.js → abnfDiagram-N423BO3Z-WMOVzCba.js} +4 -4
  3. package/dist/{architectureDiagram-ZJ3FMSHR-D7UsY5ua.js → architectureDiagram-T3A2C74G-BH-F8FzB.js} +190 -164
  4. package/dist/architectureDiagram-T3A2C74G-RJUsi-Sx.cjs +36 -0
  5. package/dist/{blockDiagram-677ZJIJ3-BrXgigdO.cjs → blockDiagram-VBNYF7ZC-Bz8oqXJQ.cjs} +1 -1
  6. package/dist/{blockDiagram-677ZJIJ3-s-fanRPN.js → blockDiagram-VBNYF7ZC-DYMmF9bV.js} +8 -8
  7. package/dist/{c4Diagram-LMCZKHZV-BbZFAi_K.js → c4Diagram-5PPSVZJV-Cfnl6tZM.js} +4 -4
  8. package/dist/{c4Diagram-LMCZKHZV-DFBVQ9Uo.cjs → c4Diagram-5PPSVZJV-DM6x-BYG.cjs} +1 -1
  9. package/dist/{channel-DV0ST12Z.js → channel-Bq-0ENlK.js} +1 -1
  10. package/dist/channel-DoxF0tZj.cjs +1 -0
  11. package/dist/{chunk-32BRIVSS-Byu3FrKX.js → chunk-2GRJ4B5K-DXwE-yr5.js} +2 -2
  12. package/dist/{chunk-32BRIVSS-oWSJWk-u.cjs → chunk-2GRJ4B5K-DzaxUd3W.cjs} +1 -1
  13. package/dist/{chunk-VAUOI2AC-CBXi4Di2.cjs → chunk-3NCLNEKW-CO28EZBG.cjs} +1 -1
  14. package/dist/{chunk-VAUOI2AC-05FwamOA.js → chunk-3NCLNEKW-dTH67Ne_.js} +2 -2
  15. package/dist/{chunk-HOUHSVGY-CtRCnz1G.js → chunk-4I5QYGJK-JZmvuONC.js} +2 -2
  16. package/dist/{chunk-HOUHSVGY-CgfXy94u.cjs → chunk-4I5QYGJK-LCSWSJfh.cjs} +1 -1
  17. package/dist/{chunk-EX3LRPZG-u-BKCEWO.cjs → chunk-5RXB4S5H-B5b3tdRl.cjs} +1 -1
  18. package/dist/{chunk-EX3LRPZG-BBldDxGh.js → chunk-5RXB4S5H-JthGygoA.js} +6 -6
  19. package/dist/{chunk-MOJQB5TN-H2vwz-oQ.cjs → chunk-6Q2QTUOP-C5n08EA-.cjs} +1 -1
  20. package/dist/{chunk-MOJQB5TN-D6YxvkUY.js → chunk-6Q2QTUOP-DvJxCxMM.js} +3 -3
  21. package/dist/{chunk-52WLFC77-C9zQbcGs.js → chunk-7Z6QIM7H-CIoK8R3m.js} +8 -8
  22. package/dist/{chunk-52WLFC77-D9PTsiCj.cjs → chunk-7Z6QIM7H-Ctljl7Vq.cjs} +1 -1
  23. package/dist/{chunk-V7JOEXUC-BROsdKzY.js → chunk-GF5L2VYU-BPBMCCz5.js} +6 -6
  24. package/dist/{chunk-V7JOEXUC-Cfrm5GQn.cjs → chunk-GF5L2VYU-DgG-wovM.cjs} +1 -1
  25. package/dist/chunk-I66GZJ75-CrpH-Rmq.cjs +127 -0
  26. package/dist/{chunk-WYO6CB5R-Y9HJHB3Q.js → chunk-I66GZJ75-DexfhZwA.js} +410 -362
  27. package/dist/{chunk-FWX5IMBZ-h3GfgkP2.js → chunk-J7OUQ5F2-DhMpZbAr.js} +7 -7
  28. package/dist/{chunk-FWX5IMBZ-nqBth1J9.cjs → chunk-J7OUQ5F2-b-MfW4O9.cjs} +1 -1
  29. package/dist/{chunk-PUDLZKDR-DtzwSdxX.cjs → chunk-JQJVKLGR-2AQwaWbm.cjs} +1 -1
  30. package/dist/{chunk-PUDLZKDR-C8jMDFq6.js → chunk-JQJVKLGR-CZorbEP3.js} +8 -8
  31. package/dist/{chunk-VR4S4FIN-Ci491c8N.js → chunk-KBJHAD2P-BlQyFndF.js} +2 -2
  32. package/dist/{chunk-VR4S4FIN-CSU_1xTZ.cjs → chunk-KBJHAD2P-CthZVYG5.cjs} +1 -1
  33. package/dist/{chunk-ICXQ74PX-BmEfYj-r.cjs → chunk-NSK5VX7P-D5CepZHI.cjs} +1 -1
  34. package/dist/{chunk-ICXQ74PX-CC59NQmW.js → chunk-NSK5VX7P-DPxIxDdV.js} +2 -2
  35. package/dist/{chunk-ZGVPDNZ5-CDTkXY1G.js → chunk-QR6OTTB3-CQ_jjYb-.js} +7 -7
  36. package/dist/{chunk-ZGVPDNZ5-COEQX4AZ.cjs → chunk-QR6OTTB3-DSg3ZWNW.cjs} +1 -1
  37. package/dist/{chunk-OGEWGWER-BGdqgMza.js → chunk-UBXNYLIW-BBncokef.js} +3 -3
  38. package/dist/{chunk-OGEWGWER-BP4o8A-v.cjs → chunk-UBXNYLIW-DlNyCWjj.cjs} +1 -1
  39. package/dist/{chunk-C7G6YPKG-GTlyrFFt.js → chunk-W5SLKNZC-Djmw_p6f.js} +2 -2
  40. package/dist/{chunk-C7G6YPKG-CDjkH_UW.cjs → chunk-W5SLKNZC-bHBkM2CL.cjs} +1 -1
  41. package/dist/{chunk-Q4XR5HBZ-COrrWZzi.cjs → chunk-WRU74C26-9KZxhHnn.cjs} +1 -1
  42. package/dist/{chunk-Q4XR5HBZ-Bk18cMuk.js → chunk-WRU74C26-D4huAZcy.js} +4 -4
  43. package/dist/classDiagram-JCYQIIEL-DeHc-x8i.cjs +1 -0
  44. package/dist/classDiagram-JCYQIIEL-DlHKjVPc.js +30 -0
  45. package/dist/classDiagram-v2-OCEON4UE-DeHc-x8i.cjs +1 -0
  46. package/dist/classDiagram-v2-OCEON4UE-DlhHN57j.js +30 -0
  47. package/dist/{cynefinDiagram-TSTJHNR4-rKPqxFde.cjs → cynefinDiagram-MW4NZA55-By102s5I.cjs} +1 -1
  48. package/dist/{cynefinDiagram-TSTJHNR4-BRUl09PN.js → cynefinDiagram-MW4NZA55-CB4ZzMEN.js} +4 -4
  49. package/dist/{dagre-VKFMJZFB-ChTkS14y.js → dagre-VZM6K2ZE-5zrH2LqV.js} +9 -9
  50. package/dist/{dagre-VKFMJZFB-BsfMZfPu.cjs → dagre-VZM6K2ZE-CNe7-jhy.cjs} +1 -1
  51. package/dist/{diagram-OA4YK3LP-Drq_GA6o.cjs → diagram-7IWD3JNH-CSzLXhRw.cjs} +1 -1
  52. package/dist/{diagram-OA4YK3LP-B7avlqjG.js → diagram-7IWD3JNH-Cschro8T.js} +5 -5
  53. package/dist/{diagram-FQU43EPY-BnAYoLDy.js → diagram-B4RE2ZJO-B94mhDmV.js} +3 -3
  54. package/dist/{diagram-FQU43EPY-CdbwLZpm.cjs → diagram-B4RE2ZJO-DKbKOwkP.cjs} +1 -1
  55. package/dist/{diagram-NH7WQ7WH-Be0KXo6w.js → diagram-LBJQPF4R-D0MEwBt6.js} +4 -4
  56. package/dist/{diagram-NH7WQ7WH-CG6VWVza.cjs → diagram-LBJQPF4R-DgD0a56I.cjs} +1 -1
  57. package/dist/{diagram-G47NLZAW-C1ZiELQG.js → diagram-Q27KOJAE-Cqn3IliP.js} +7 -7
  58. package/dist/{diagram-G47NLZAW-CtWKuxkf.cjs → diagram-Q27KOJAE-DNWfiaD5.cjs} +1 -1
  59. package/dist/{diagram-WEI45ONY-CoPX6-sx.js → diagram-UB23O5K3-D-yL2fvd.js} +54 -54
  60. package/dist/diagram-UB23O5K3-DguyM6v_.cjs +41 -0
  61. package/dist/{ebnfDiagram-CCIWWBDH-B-T4_JnX.js → ebnfDiagram-BXEA7PRR-B2HDWFYF.js} +4 -4
  62. package/dist/{ebnfDiagram-CCIWWBDH-BY7L3HVQ.cjs → ebnfDiagram-BXEA7PRR-DuJrkFn-.cjs} +1 -1
  63. package/dist/{erDiagram-Q63AITRT-DPgZpeaH.js → erDiagram-JOGREHBK-Badv_hu8.js} +12 -12
  64. package/dist/{erDiagram-Q63AITRT-w4C1PxYd.cjs → erDiagram-JOGREHBK-DtyaQROs.cjs} +1 -1
  65. package/dist/flowDiagram-UKHOOZJN-C7t5VpYH.js +17 -0
  66. package/dist/flowDiagram-UKHOOZJN-CdkElxh8.cjs +1 -0
  67. package/dist/{ganttDiagram-NO4QXBWP-Cf12fLfa.js → ganttDiagram-PKOTCBZU-By0w7TmO.js} +2 -2
  68. package/dist/{ganttDiagram-NO4QXBWP-BcBp028S.cjs → ganttDiagram-PKOTCBZU-CFgz4r57.cjs} +1 -1
  69. package/dist/{gitGraphDiagram-IHSO6WYX-13ahKewT.js → gitGraphDiagram-DS77QQ5N-B1uJYchG.js} +3 -3
  70. package/dist/{gitGraphDiagram-IHSO6WYX-BTtNkGkN.cjs → gitGraphDiagram-DS77QQ5N-Fw8a66di.cjs} +1 -1
  71. package/dist/{infoDiagram-FWYZ7A6U-20rh0VNL.cjs → infoDiagram-6WML65LV-CB6z_iKE.cjs} +1 -1
  72. package/dist/{infoDiagram-FWYZ7A6U-DcV-eSsb.js → infoDiagram-6WML65LV-CkWm_KTB.js} +4 -4
  73. package/dist/{ishikawaDiagram-FXEZZL3T-BUq5kcFI.cjs → ishikawaDiagram-WSZJBQD7-CQWHhozU.cjs} +1 -1
  74. package/dist/{ishikawaDiagram-FXEZZL3T-BTaBCHIG.js → ishikawaDiagram-WSZJBQD7-DTeFqC8L.js} +4 -4
  75. package/dist/{journeyDiagram-5HDEW3XC-Cl9Z4b58.js → journeyDiagram-NVQOT4AX-Cg6C3dFy.js} +3 -3
  76. package/dist/{journeyDiagram-5HDEW3XC-XQa-rhY_.cjs → journeyDiagram-NVQOT4AX-DLomv_vN.cjs} +1 -1
  77. package/dist/{kanban-definition-HUTT4EX6-DVHXUPOt.cjs → kanban-definition-27J2QSJJ-B9Fog3W7.cjs} +1 -1
  78. package/dist/{kanban-definition-HUTT4EX6-CtWnZ0nS.js → kanban-definition-27J2QSJJ-Bb7nb0gX.js} +9 -9
  79. package/dist/{line-Ca8dE_lT.cjs → line-pOZ7Sdj7.cjs} +1 -1
  80. package/dist/{line-O2xx2vVQ.js → line-yqcJYv29.js} +1 -1
  81. package/dist/{mermaid.core-BR-iKb2Q.js → mermaid.core-BIq27e0A.js} +55 -51
  82. package/dist/{mermaid.core-DQrbAA--.cjs → mermaid.core-DpsSj3iy.cjs} +4 -4
  83. package/dist/{mindmap-definition-LN4V7U3C-C0I9iWmq.cjs → mindmap-definition-FAOFIHXS-9wa1P9NT.cjs} +1 -1
  84. package/dist/{mindmap-definition-LN4V7U3C-lkSmRsIC.js → mindmap-definition-FAOFIHXS-DFG0Zs_1.js} +11 -11
  85. package/dist/{ordinal-CCTD6_le.js → ordinal-C1oQzsBn.js} +1 -1
  86. package/dist/{ordinal-CUPR-p0T.cjs → ordinal-D0iNZ43g.cjs} +1 -1
  87. package/dist/{pegDiagram-2B236MQR-hlmRl_PA.cjs → pegDiagram-VL7TDLO6-B4FslsmM.cjs} +1 -1
  88. package/dist/{pegDiagram-2B236MQR-BgRCQTZd.js → pegDiagram-VL7TDLO6-XOjprD-j.js} +4 -4
  89. package/dist/pi-outpost-embed.cjs +59 -56
  90. package/dist/pi-outpost-embed.js +6411 -6332
  91. package/dist/{pieDiagram-ENE6RG2P-Buuvrs-h.cjs → pieDiagram-7S7Q4E2Y-CNzUVS2d.cjs} +1 -1
  92. package/dist/{pieDiagram-ENE6RG2P-BVi7ck2I.js → pieDiagram-7S7Q4E2Y-Cwe7fXgJ.js} +5 -5
  93. package/dist/{quadrantDiagram-ABIIQ3AL-LCbC0LEt.cjs → quadrantDiagram-CIZ2JOQS-CDfrU0dm.cjs} +1 -1
  94. package/dist/{quadrantDiagram-ABIIQ3AL-DeU97c2B.js → quadrantDiagram-CIZ2JOQS-CbaMHmYB.js} +2 -2
  95. package/dist/{railroadDiagram-RFXS5EU6-DNSNpLmQ.js → railroadDiagram-AXF67PYL-CVXAv-Uu.js} +4 -4
  96. package/dist/{railroadDiagram-RFXS5EU6-CMTDNjsw.cjs → railroadDiagram-AXF67PYL-EO1cBHEj.cjs} +1 -1
  97. package/dist/{requirementDiagram-TGXJPOKE-irImpO8w.cjs → requirementDiagram-LRYGKXZP-BGlGCftH.cjs} +1 -1
  98. package/dist/{requirementDiagram-TGXJPOKE-CdspXMgv.js → requirementDiagram-LRYGKXZP-Bzik4kgS.js} +11 -11
  99. package/dist/{sankeyDiagram-HTMAVEWB-B0ZJBVpN.cjs → sankeyDiagram-W5VNT64P-OeLUMuT6.cjs} +1 -1
  100. package/dist/{sankeyDiagram-HTMAVEWB-BQcvUCMA.js → sankeyDiagram-W5VNT64P-_8xZpo45.js} +3 -3
  101. package/dist/{sequenceDiagram-DBY2YBRQ-C5WukkcA.cjs → sequenceDiagram-SI44F4Z6-CuaCFBtR.cjs} +1 -1
  102. package/dist/{sequenceDiagram-DBY2YBRQ-BQFP2DGs.js → sequenceDiagram-SI44F4Z6-X4mzY21C.js} +4 -4
  103. package/dist/{stateDiagram-2N3HPSRC-4aBQt5dk.js → stateDiagram-OKZ733FA-CMM1orC_.js} +14 -14
  104. package/dist/{stateDiagram-2N3HPSRC-YbRd67eD.cjs → stateDiagram-OKZ733FA-Dq6hI_pq.cjs} +1 -1
  105. package/dist/stateDiagram-v2-UEYNNEHI-BmWUstzl.js +30 -0
  106. package/dist/stateDiagram-v2-UEYNNEHI-DZULVhS9.cjs +1 -0
  107. package/dist/{swimlanes-5IMT3BWC-C8zkS7yx.cjs → swimlanes-SLNWSIFB-BMS6R0BK.cjs} +1 -1
  108. package/dist/{swimlanes-5IMT3BWC-aKH3Xgob.js → swimlanes-SLNWSIFB-C7LLK1V2.js} +9 -9
  109. package/dist/swimlanesDiagram-ULZ7WXOC-DxHKX_pj.cjs +8 -0
  110. package/dist/{swimlanesDiagram-G3AALYLV-BcgsG1in.js → swimlanesDiagram-ULZ7WXOC-uXMuqsao.js} +13 -13
  111. package/dist/{timeline-definition-FHXFAJF6-Lnag6wiw.js → timeline-definition-Z64GVDOM-Cgc-2OmU.js} +4 -4
  112. package/dist/{timeline-definition-FHXFAJF6-DS-X0FCl.cjs → timeline-definition-Z64GVDOM-PPJqDdOy.cjs} +1 -1
  113. package/dist/{vennDiagram-L72KCM5P-CF7lC7jn.js → vennDiagram-T6HMQDX7-BWj1BhMh.js} +4 -4
  114. package/dist/{vennDiagram-L72KCM5P-DYZP8jT_.cjs → vennDiagram-T6HMQDX7-DqY7YgNx.cjs} +1 -1
  115. package/dist/{wardleyDiagram-EHGQE667-Dxewrpeh.cjs → wardleyDiagram-T6FBY63Y-OomvVIFj.cjs} +1 -1
  116. package/dist/{wardleyDiagram-EHGQE667-CbtWlMOa.js → wardleyDiagram-T6FBY63Y-d_t4oVLE.js} +4 -4
  117. package/dist/{xychartDiagram-FW5EYKEG-BAnVfMdN.cjs → xychartDiagram-ELKLHX3M-BOSOdubI.cjs} +2 -2
  118. package/dist/{xychartDiagram-FW5EYKEG-DmdGPSi6.js → xychartDiagram-ELKLHX3M-Ce-ai3a8.js} +14 -11
  119. package/package.json +10 -2
  120. package/dist/architectureDiagram-ZJ3FMSHR-Bh5-VPPg.cjs +0 -36
  121. package/dist/channel-DkMGzfUR.cjs +0 -1
  122. package/dist/chunk-WYO6CB5R-BTvDzbWd.cjs +0 -127
  123. package/dist/classDiagram-OUVF2IWQ-Avsu6OKn.cjs +0 -1
  124. package/dist/classDiagram-OUVF2IWQ-eC72Wwol.js +0 -30
  125. package/dist/classDiagram-v2-EOCWNBFH-Avsu6OKn.cjs +0 -1
  126. package/dist/classDiagram-v2-EOCWNBFH-DsRoQgCt.js +0 -30
  127. package/dist/diagram-WEI45ONY-SJmgVL59.cjs +0 -41
  128. package/dist/flowDiagram-23GEKE2U-CQxPdUX4.cjs +0 -1
  129. package/dist/flowDiagram-23GEKE2U-ClCSBl2p.js +0 -17
  130. package/dist/stateDiagram-v2-6OUMAXLB-D-c6D5za.js +0 -30
  131. package/dist/stateDiagram-v2-6OUMAXLB-ciXN_270.cjs +0 -1
  132. package/dist/swimlanesDiagram-G3AALYLV-CBjVJdH0.cjs +0 -8
@@ -2,12 +2,12 @@ import { r as e, t } from "./rolldown-runtime-Dqa2HsxW.js";
2
2
  import { n } from "./mermaid-parser.core-B8DQcCaz.js";
3
3
  import { n as r } from "./chunk-Y2CYZVJY-CwsV_8W4.js";
4
4
  import { m as i, p as a } from "./src-DJ4x3y2O.js";
5
- import { H as o, J as s, K as c, U as l, a as u, b as d, f, v as p, w as m, x as h, y as g, z as _ } from "./chunk-WYO6CB5R-Y9HJHB3Q.js";
6
- import { c as v, i as y } from "./chunk-ICXQ74PX-CC59NQmW.js";
7
- import { t as b } from "./chunk-VAUOI2AC-05FwamOA.js";
5
+ import { H as o, J as s, K as c, U as l, a as u, b as d, f, v as p, w as m, x as h, y as g, z as _ } from "./chunk-I66GZJ75-DexfhZwA.js";
6
+ import { c as v, i as y } from "./chunk-NSK5VX7P-DPxIxDdV.js";
7
+ import { t as b } from "./chunk-3NCLNEKW-dTH67Ne_.js";
8
8
  import { t as x } from "./chunk-JWPE2WC7-B_J6qwQL.js";
9
- import { i as S, r as C, t as w } from "./chunk-HOUHSVGY-CtRCnz1G.js";
10
- import { n as T } from "./chunk-Q4XR5HBZ-Bk18cMuk.js";
9
+ import { i as S, r as C, t as w } from "./chunk-4I5QYGJK-JZmvuONC.js";
10
+ import { n as T } from "./chunk-WRU74C26-D4huAZcy.js";
11
11
  import { t as E } from "./cytoscape.esm-asYnbYTy.js";
12
12
  //#region ../node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.js
13
13
  var D = /* @__PURE__ */ t(((e, t) => {
@@ -1444,29 +1444,29 @@ var D = /* @__PURE__ */ t(((e, t) => {
1444
1444
  var K = n[E - 2];
1445
1445
  n[E - 2] = 0;
1446
1446
  for (var q = E - 2; q >= U; q--) {
1447
- var J = r.hypot(this.s[q], K), Y = this.s[q] / J, X = K / J;
1448
- if (this.s[q] = J, q !== U && (K = -X * n[q - 1], n[q - 1] = Y * n[q - 1]), o) for (var Z = 0; Z < this.n; Z++) J = Y * this.V[Z][q] + X * this.V[Z][E - 1], this.V[Z][E - 1] = -X * this.V[Z][q] + Y * this.V[Z][E - 1], this.V[Z][q] = J;
1447
+ var ae = r.hypot(this.s[q], K), J = this.s[q] / ae, Y = K / ae;
1448
+ if (this.s[q] = ae, q !== U && (K = -Y * n[q - 1], n[q - 1] = J * n[q - 1]), o) for (var X = 0; X < this.n; X++) ae = J * this.V[X][q] + Y * this.V[X][E - 1], this.V[X][E - 1] = -Y * this.V[X][q] + J * this.V[X][E - 1], this.V[X][q] = ae;
1449
1449
  }
1450
1450
  break;
1451
1451
  case 2:
1452
- var ae = n[U - 1];
1452
+ var oe = n[U - 1];
1453
1453
  n[U - 1] = 0;
1454
- for (var Q = U; Q < E; Q++) {
1455
- var oe = r.hypot(this.s[Q], ae), se = this.s[Q] / oe, ce = ae / oe;
1456
- if (this.s[Q] = oe, ae = -ce * n[Q], n[Q] = se * n[Q], a) for (var le = 0; le < this.m; le++) oe = se * this.U[le][Q] + ce * this.U[le][U - 1], this.U[le][U - 1] = -ce * this.U[le][Q] + se * this.U[le][U - 1], this.U[le][Q] = oe;
1454
+ for (var Z = U; Z < E; Z++) {
1455
+ var se = r.hypot(this.s[Z], oe), ce = this.s[Z] / se, le = oe / se;
1456
+ if (this.s[Z] = se, oe = -le * n[Z], n[Z] = ce * n[Z], a) for (var ue = 0; ue < this.m; ue++) se = ce * this.U[ue][Z] + le * this.U[ue][U - 1], this.U[ue][U - 1] = -le * this.U[ue][Z] + ce * this.U[ue][U - 1], this.U[ue][Z] = se;
1457
1457
  }
1458
1458
  break;
1459
1459
  case 3:
1460
- var ue = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[E - 1]), Math.abs(this.s[E - 2])), Math.abs(n[E - 2])), Math.abs(this.s[U])), Math.abs(n[U])), de = this.s[E - 1] / ue, fe = this.s[E - 2] / ue, pe = n[E - 2] / ue, me = this.s[U] / ue, he = n[U] / ue, ge = ((fe + de) * (fe - de) + pe * pe) / 2, _e = de * pe * (de * pe), ve = 0;
1460
+ var de = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[E - 1]), Math.abs(this.s[E - 2])), Math.abs(n[E - 2])), Math.abs(this.s[U])), Math.abs(n[U])), fe = this.s[E - 1] / de, pe = this.s[E - 2] / de, me = n[E - 2] / de, he = this.s[U] / de, ge = n[U] / de, _e = ((pe + fe) * (pe - fe) + me * me) / 2, ve = fe * me * (fe * me), ye = 0;
1461
1461
  (function(e, t) {
1462
1462
  return e || t;
1463
- })(ge !== 0, _e !== 0) && (ve = Math.sqrt(ge * ge + _e), ge < 0 && (ve = -ve), ve = _e / (ge + ve));
1464
- for (var ye = (me + de) * (me - de) + ve, be = me * he, $ = U; $ < E - 1; $++) {
1465
- var xe = r.hypot(ye, be), Se = ye / xe, Ce = be / xe;
1466
- if ($ !== U && (n[$ - 1] = xe), ye = Se * this.s[$] + Ce * n[$], n[$] = Se * n[$] - Ce * this.s[$], be = Ce * this.s[$ + 1], this.s[$ + 1] = Se * this.s[$ + 1], o) for (var we = 0; we < this.n; we++) xe = Se * this.V[we][$] + Ce * this.V[we][$ + 1], this.V[we][$ + 1] = -Ce * this.V[we][$] + Se * this.V[we][$ + 1], this.V[we][$] = xe;
1467
- if (xe = r.hypot(ye, be), Se = ye / xe, Ce = be / xe, this.s[$] = xe, ye = Se * n[$] + Ce * this.s[$ + 1], this.s[$ + 1] = -Ce * n[$] + Se * this.s[$ + 1], be = Ce * n[$ + 1], n[$ + 1] = Se * n[$ + 1], a && $ < this.m - 1) for (var Te = 0; Te < this.m; Te++) xe = Se * this.U[Te][$] + Ce * this.U[Te][$ + 1], this.U[Te][$ + 1] = -Ce * this.U[Te][$] + Se * this.U[Te][$ + 1], this.U[Te][$] = xe;
1463
+ })(_e !== 0, ve !== 0) && (ye = Math.sqrt(_e * _e + ve), _e < 0 && (ye = -ye), ye = ve / (_e + ye));
1464
+ for (var be = (he + fe) * (he - fe) + ye, xe = he * ge, Q = U; Q < E - 1; Q++) {
1465
+ var $ = r.hypot(be, xe), Se = be / $, Ce = xe / $;
1466
+ if (Q !== U && (n[Q - 1] = $), be = Se * this.s[Q] + Ce * n[Q], n[Q] = Se * n[Q] - Ce * this.s[Q], xe = Ce * this.s[Q + 1], this.s[Q + 1] = Se * this.s[Q + 1], o) for (var we = 0; we < this.n; we++) $ = Se * this.V[we][Q] + Ce * this.V[we][Q + 1], this.V[we][Q + 1] = -Ce * this.V[we][Q] + Se * this.V[we][Q + 1], this.V[we][Q] = $;
1467
+ if ($ = r.hypot(be, xe), Se = be / $, Ce = xe / $, this.s[Q] = $, be = Se * n[Q] + Ce * this.s[Q + 1], this.s[Q + 1] = -Ce * n[Q] + Se * this.s[Q + 1], xe = Ce * n[Q + 1], n[Q + 1] = Se * n[Q + 1], a && Q < this.m - 1) for (var Te = 0; Te < this.m; Te++) $ = Se * this.U[Te][Q] + Ce * this.U[Te][Q + 1], this.U[Te][Q + 1] = -Ce * this.U[Te][Q] + Se * this.U[Te][Q + 1], this.U[Te][Q] = $;
1468
1468
  }
1469
- n[E - 2] = ye, H += 1;
1469
+ n[E - 2] = be, H += 1;
1470
1470
  break;
1471
1471
  case 4:
1472
1472
  if (this.s[U] <= 0 && (this.s[U] = this.s[U] < 0 ? -this.s[U] : 0, o)) for (var Ee = 0; Ee <= te; Ee++) this.V[Ee][U] = -this.V[Ee][U];
@@ -2650,7 +2650,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
2650
2650
  E.has(e) || (l[c.get(e)] = i);
2651
2651
  });
2652
2652
  }, K = 0; K < G.length; K++) ie(K);
2653
- if (t.alignmentConstraint.horizontal) for (var q = t.alignmentConstraint.horizontal, J = function(e) {
2653
+ if (t.alignmentConstraint.horizontal) for (var q = t.alignmentConstraint.horizontal, ae = function(e) {
2654
2654
  var t = /* @__PURE__ */ new Set();
2655
2655
  q[e].forEach(function(e) {
2656
2656
  t.add(e);
@@ -2661,7 +2661,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
2661
2661
  i = n.size > 0 ? u[c.get(n.values().next().value)] : g(t).y, t.forEach(function(e) {
2662
2662
  E.has(e) || (u[c.get(e)] = i);
2663
2663
  });
2664
- }, Y = 0; Y < q.length; Y++) J(Y);
2664
+ }, J = 0; J < q.length; J++) ae(J);
2665
2665
  }
2666
2666
  t.relativePlacementConstraint && (function() {
2667
2667
  var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
@@ -2740,26 +2740,26 @@ var D = /* @__PURE__ */ t(((e, t) => {
2740
2740
  i.get(e) ? i.get(e).forEach(function(t) {
2741
2741
  u[c.get(t)] = ee.get(e);
2742
2742
  }) : u[c.get(e)] = ee.get(e);
2743
- }, K = !0, q = !1, J = void 0;
2743
+ }, K = !0, q = !1, ae = void 0;
2744
2744
  try {
2745
- for (var Y = ee.keys()[Symbol.iterator](), X; !(K = (X = Y.next()).done); K = !0) {
2746
- var G = X.value;
2745
+ for (var J = ee.keys()[Symbol.iterator](), Y; !(K = (Y = J.next()).done); K = !0) {
2746
+ var G = Y.value;
2747
2747
  ie(G);
2748
2748
  }
2749
2749
  } catch (e) {
2750
- q = !0, J = e;
2750
+ q = !0, ae = e;
2751
2751
  } finally {
2752
2752
  try {
2753
- !K && Y.return && Y.return();
2753
+ !K && J.return && J.return();
2754
2754
  } finally {
2755
- if (q) throw J;
2755
+ if (q) throw ae;
2756
2756
  }
2757
2757
  }
2758
2758
  })();
2759
2759
  }
2760
- for (var X = 0; X < d.length; X++) {
2761
- var Z = d[X];
2762
- Z.getChild() ?? Z.setCenter(l[c.get(Z.id)], u[c.get(Z.id)]);
2760
+ for (var Y = 0; Y < d.length; Y++) {
2761
+ var X = d[Y];
2762
+ X.getChild() ?? X.setCenter(l[c.get(X.id)], u[c.get(X.id)]);
2763
2763
  }
2764
2764
  }, e.exports = c;
2765
2765
  }),
@@ -3343,10 +3343,10 @@ var D = /* @__PURE__ */ t(((e, t) => {
3343
3343
  yCoords: p
3344
3344
  }), U;
3345
3345
  } else {
3346
- var ie = l.keys(), K = t.getElementById(ie.next().value), q = K.position(), J = K.outerWidth();
3346
+ var ie = l.keys(), K = t.getElementById(ie.next().value), q = K.position(), ae = K.outerWidth();
3347
3347
  if (f.push(q.x), p.push(q.y), y == 2) {
3348
- var Y = t.getElementById(ie.next().value).outerWidth();
3349
- f.push(q.x + J / 2 + Y / 2 + e.idealEdgeLength), p.push(q.y);
3348
+ var J = t.getElementById(ie.next().value).outerWidth();
3349
+ f.push(q.x + ae / 2 + J / 2 + e.idealEdgeLength), p.push(q.y);
3350
3350
  }
3351
3351
  return U = {
3352
3352
  nodeIndexes: l,
@@ -3423,9 +3423,12 @@ var D = /* @__PURE__ */ t(((e, t) => {
3423
3423
  return e.type === "service";
3424
3424
  }, "isArchitectureService"), ne = /* @__PURE__ */ r(function(e) {
3425
3425
  return e.type === "junction";
3426
- }, "isArchitectureJunction"), re = /* @__PURE__ */ r((e) => e.data(), "edgeData"), U = /* @__PURE__ */ r((e) => e.data(), "nodeData"), W = f.architecture, G = class {
3426
+ }, "isArchitectureJunction"), re = /* @__PURE__ */ r((e, t) => {
3427
+ let [n, r] = [e, t].sort();
3428
+ return `${JSON.stringify(n)}-${JSON.stringify(r)}`;
3429
+ }, "architectureGroupAlignmentKey"), U = /* @__PURE__ */ r((e) => e.data(), "edgeData"), W = /* @__PURE__ */ r((e) => e.data(), "nodeData"), G = f.architecture, ie = class {
3427
3430
  constructor() {
3428
- this.nodes = {}, this.groups = {}, this.edges = [], this.layoutHints = [], this.registeredIds = {}, this.elements = {}, this.diagramId = "", this.setAccTitle = l, this.getAccTitle = g, this.setDiagramTitle = c, this.getDiagramTitle = m, this.getAccDescription = p, this.setAccDescription = o, this.clear();
3431
+ this.nodes = /* @__PURE__ */ new Map(), this.groups = /* @__PURE__ */ new Map(), this.edges = [], this.layoutHints = [], this.registeredIds = /* @__PURE__ */ new Map(), this.elements = /* @__PURE__ */ new Map(), this.diagramId = "", this.setAccTitle = l, this.getAccTitle = g, this.setDiagramTitle = c, this.getDiagramTitle = m, this.getAccDescription = p, this.setAccDescription = o, this.clear();
3429
3432
  }
3430
3433
  static {
3431
3434
  r(this, "ArchitectureDB");
@@ -3437,16 +3440,16 @@ var D = /* @__PURE__ */ t(((e, t) => {
3437
3440
  return this.diagramId;
3438
3441
  }
3439
3442
  clear() {
3440
- this.nodes = {}, this.groups = {}, this.edges = [], this.layoutHints = [], this.registeredIds = {}, this.dataStructures = void 0, this.elements = {}, this.diagramId = "", u();
3443
+ this.nodes = /* @__PURE__ */ new Map(), this.groups = /* @__PURE__ */ new Map(), this.edges = [], this.layoutHints = [], this.registeredIds = /* @__PURE__ */ new Map(), this.dataStructures = void 0, this.elements = /* @__PURE__ */ new Map(), this.diagramId = "", u();
3441
3444
  }
3442
3445
  addService({ id: e, icon: t, in: n, title: r, iconText: i }) {
3443
- if (this.registeredIds[e] !== void 0) throw Error(`The service id [${e}] is already in use by another ${this.registeredIds[e]}`);
3446
+ if (this.registeredIds.has(e)) throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);
3444
3447
  if (n !== void 0) {
3445
3448
  if (e === n) throw Error(`The service [${e}] cannot be placed within itself`);
3446
- if (this.registeredIds[n] === void 0) throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);
3447
- if (this.registeredIds[n] === "node") throw Error(`The service [${e}]'s parent is not a group`);
3449
+ if (!this.registeredIds.has(n)) throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);
3450
+ if (this.registeredIds.get(n) === "node") throw Error(`The service [${e}]'s parent is not a group`);
3448
3451
  }
3449
- this.registeredIds[e] = "node", this.nodes[e] = {
3452
+ this.registeredIds.set(e, "node"), this.nodes.set(e, {
3450
3453
  id: e,
3451
3454
  type: "service",
3452
3455
  icon: t,
@@ -3454,57 +3457,57 @@ var D = /* @__PURE__ */ t(((e, t) => {
3454
3457
  title: r,
3455
3458
  edges: [],
3456
3459
  in: n
3457
- };
3460
+ });
3458
3461
  }
3459
3462
  getServices() {
3460
- return Object.values(this.nodes).filter(H);
3463
+ return [...this.nodes.values()].filter(H);
3461
3464
  }
3462
3465
  addJunction({ id: e, in: t }) {
3463
- if (this.registeredIds[e] !== void 0) throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds[e]}`);
3466
+ if (this.registeredIds.has(e)) throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);
3464
3467
  if (t !== void 0) {
3465
3468
  if (e === t) throw Error(`The junction [${e}] cannot be placed within itself`);
3466
- if (this.registeredIds[t] === void 0) throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);
3467
- if (this.registeredIds[t] === "node") throw Error(`The junction [${e}]'s parent is not a group`);
3469
+ if (!this.registeredIds.has(t)) throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);
3470
+ if (this.registeredIds.get(t) === "node") throw Error(`The junction [${e}]'s parent is not a group`);
3468
3471
  }
3469
- this.registeredIds[e] = "node", this.nodes[e] = {
3472
+ this.registeredIds.set(e, "node"), this.nodes.set(e, {
3470
3473
  id: e,
3471
3474
  type: "junction",
3472
3475
  edges: [],
3473
3476
  in: t
3474
- };
3477
+ });
3475
3478
  }
3476
3479
  getJunctions() {
3477
- return Object.values(this.nodes).filter(ne);
3480
+ return [...this.nodes.values()].filter(ne);
3478
3481
  }
3479
3482
  getNodes() {
3480
- return Object.values(this.nodes);
3483
+ return [...this.nodes.values()];
3481
3484
  }
3482
3485
  getNode(e) {
3483
- return this.nodes[e] ?? null;
3486
+ return this.nodes.get(e) ?? null;
3484
3487
  }
3485
3488
  addGroup({ id: e, icon: t, in: n, title: r }) {
3486
- if (this.registeredIds?.[e] !== void 0) throw Error(`The group id [${e}] is already in use by another ${this.registeredIds[e]}`);
3489
+ if (this.registeredIds.has(e)) throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);
3487
3490
  if (n !== void 0) {
3488
3491
  if (e === n) throw Error(`The group [${e}] cannot be placed within itself`);
3489
- if (this.registeredIds?.[n] === void 0) throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);
3490
- if (this.registeredIds?.[n] === "node") throw Error(`The group [${e}]'s parent is not a group`);
3492
+ if (!this.registeredIds.has(n)) throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);
3493
+ if (this.registeredIds.get(n) === "node") throw Error(`The group [${e}]'s parent is not a group`);
3491
3494
  }
3492
- this.registeredIds[e] = "group", this.groups[e] = {
3495
+ this.registeredIds.set(e, "group"), this.groups.set(e, {
3493
3496
  id: e,
3494
3497
  icon: t,
3495
3498
  title: r,
3496
3499
  in: n
3497
- };
3500
+ });
3498
3501
  }
3499
3502
  getGroups() {
3500
- return Object.values(this.groups);
3503
+ return [...this.groups.values()];
3501
3504
  }
3502
3505
  addEdge({ lhsId: e, rhsId: t, lhsDir: n, rhsDir: r, lhsInto: i, rhsInto: a, lhsGroup: o, rhsGroup: s, title: c }) {
3503
3506
  if (!P(n)) throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);
3504
3507
  if (!P(r)) throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);
3505
- if (this.nodes[e] === void 0 && this.groups[e] === void 0) throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);
3506
- if (this.nodes[t] === void 0 && this.groups[t] === void 0) throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);
3507
- let l = this.nodes[e].in, u = this.nodes[t].in;
3508
+ if (!this.nodes.has(e) && !this.groups.has(e)) throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);
3509
+ if (!this.nodes.has(t) && !this.groups.has(t)) throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);
3510
+ let l = this.nodes.get(e).in, u = this.nodes.get(t).in;
3508
3511
  if (o && l && u && l == u) throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
3509
3512
  if (s && l && u && l == u) throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
3510
3513
  let d = {
@@ -3518,7 +3521,9 @@ var D = /* @__PURE__ */ t(((e, t) => {
3518
3521
  rhsGroup: s,
3519
3522
  title: c
3520
3523
  };
3521
- this.edges.push(d), this.nodes[e] && this.nodes[t] && (this.nodes[e].edges.push(this.edges[this.edges.length - 1]), this.nodes[t].edges.push(this.edges[this.edges.length - 1]));
3524
+ this.edges.push(d);
3525
+ let f = this.nodes.get(e), p = this.nodes.get(t);
3526
+ f && p && (f.edges.push(this.edges[this.edges.length - 1]), p.edges.push(this.edges[this.edges.length - 1]));
3522
3527
  }
3523
3528
  getEdges() {
3524
3529
  return this.edges;
@@ -3527,7 +3532,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
3527
3532
  if (e.members.length < 2) throw Error(`An align directive requires at least two members; got ${e.members.length}`);
3528
3533
  let t = /* @__PURE__ */ new Set();
3529
3534
  e.members.forEach((n) => {
3530
- if (this.registeredIds[n] !== "node") throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);
3535
+ if (this.registeredIds.get(n) !== "node") throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);
3531
3536
  if (t.has(n)) throw Error(`align ${e.direction} lists [${n}] more than once`);
3532
3537
  t.add(n);
3533
3538
  }), this.layoutHints.push(e);
@@ -3537,62 +3542,71 @@ var D = /* @__PURE__ */ t(((e, t) => {
3537
3542
  }
3538
3543
  getDataStructures() {
3539
3544
  if (this.dataStructures === void 0) {
3540
- let e = {}, t = Object.entries(this.nodes).reduce((t, [n, r]) => (t[n] = r.edges.reduce((t, r) => {
3541
- let i = this.getNode(r.lhsId)?.in, a = this.getNode(r.rhsId)?.in;
3542
- if (i && a && i !== a) {
3543
- let t = te(r.lhsDir, r.rhsDir);
3544
- t !== "bend" && (e[i] ??= {}, e[i][a] = t, e[a] ??= {}, e[a][i] = t);
3545
- }
3546
- if (r.lhsId === n) {
3547
- let e = B(r.lhsDir, r.rhsDir);
3548
- e && (t[e] = r.rhsId);
3549
- } else {
3550
- let e = B(r.rhsDir, r.lhsDir);
3551
- e && (t[e] = r.lhsId);
3545
+ let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
3546
+ for (let [n, r] of this.nodes.entries()) {
3547
+ let i = /* @__PURE__ */ new Map();
3548
+ for (let t of r.edges) {
3549
+ let r = this.getNode(t.lhsId)?.in, a = this.getNode(t.rhsId)?.in;
3550
+ if (r && a && r !== a) {
3551
+ let n = te(t.lhsDir, t.rhsDir);
3552
+ n !== "bend" && e.set(re(r, a), n);
3553
+ }
3554
+ if (t.lhsId === n) {
3555
+ let e = B(t.lhsDir, t.rhsDir);
3556
+ e && i.set(e, t.rhsId);
3557
+ } else {
3558
+ let e = B(t.rhsDir, t.lhsDir);
3559
+ e && i.set(e, t.lhsId);
3560
+ }
3552
3561
  }
3553
- return t;
3554
- }, {}), t), {}), n = Object.keys(t)[0], i = { [n]: 1 }, a = Object.keys(t).reduce((e, t) => t === n ? e : {
3555
- ...e,
3556
- [t]: 1
3557
- }, {}), o = /* @__PURE__ */ r((e) => {
3558
- let n = { [e]: [0, 0] }, r = [e];
3559
- for (; r.length > 0;) {
3560
- let e = r.shift();
3562
+ t.set(n, i);
3563
+ }
3564
+ let n = /* @__PURE__ */ new Set(), i = new Set(t.keys()), a = /* @__PURE__ */ r((e) => {
3565
+ let r = /* @__PURE__ */ new Map([[e, [0, 0]]]), a = [e];
3566
+ for (; a.length > 0;) {
3567
+ let e = a.shift();
3561
3568
  if (e) {
3562
- i[e] = 1, delete a[e];
3563
- let o = t[e], [s, c] = n[e];
3564
- Object.entries(o).forEach(([e, t]) => {
3565
- i[t] || (n[t] = V([s, c], e), r.push(t));
3569
+ n.add(e), i.delete(e);
3570
+ let o = t.get(e);
3571
+ if (!o) throw Error(`BFS error: adjacency list for id ${e} not found. Please report this as a bug.`);
3572
+ let s = r.get(e);
3573
+ if (!s) throw Error(`BFS error: position for id ${e} not found in spatial map. Please report this as a bug.`);
3574
+ let [c, l] = s;
3575
+ o.forEach((e, t) => {
3576
+ n.has(e) || (r.set(e, V([c, l], t)), a.push(e));
3566
3577
  });
3567
3578
  }
3568
3579
  }
3569
- return n;
3570
- }, "BFS"), s = [o(n)];
3571
- for (; Object.keys(a).length > 0;) s.push(o(Object.keys(a)[0]));
3580
+ return r;
3581
+ }, "BFS"), o = [];
3582
+ for (; i.size > 0;) {
3583
+ let e = i.values().next().value;
3584
+ o.push(a(e));
3585
+ }
3572
3586
  this.dataStructures = {
3573
3587
  adjList: t,
3574
- spatialMaps: s,
3588
+ spatialMaps: o,
3575
3589
  groupAlignments: e
3576
3590
  };
3577
3591
  }
3578
3592
  return this.dataStructures;
3579
3593
  }
3580
3594
  setElementForId(e, t) {
3581
- this.elements[e] = t;
3595
+ this.elements.set(e, t);
3582
3596
  }
3583
3597
  getElementById(e) {
3584
- return this.elements[e];
3598
+ return this.elements.get(e);
3585
3599
  }
3586
3600
  getConfig() {
3587
3601
  return y({
3588
- ...W,
3602
+ ...G,
3589
3603
  ...d().architecture
3590
3604
  });
3591
3605
  }
3592
3606
  getConfigField(e) {
3593
3607
  return this.getConfig()[e];
3594
3608
  }
3595
- }, ie = /* @__PURE__ */ r((e, t) => {
3609
+ }, K = /* @__PURE__ */ r((e, t) => {
3596
3610
  x(e, t), e.groups.map((e) => t.addGroup(e)), e.services.map((e) => t.addService({
3597
3611
  ...e,
3598
3612
  type: "service"
@@ -3603,16 +3617,16 @@ var D = /* @__PURE__ */ t(((e, t) => {
3603
3617
  direction: e.direction,
3604
3618
  members: [...e.members]
3605
3619
  }));
3606
- }, "populateDb"), K = {
3620
+ }, "populateDb"), q = {
3607
3621
  parser: { yy: void 0 },
3608
3622
  parse: /* @__PURE__ */ r(async (e) => {
3609
3623
  let t = await n("architecture", e);
3610
3624
  i.debug(t);
3611
- let r = K.parser?.yy;
3612
- if (!(r instanceof G)) throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
3613
- ie(t, r);
3625
+ let r = q.parser?.yy;
3626
+ if (!(r instanceof ie)) throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
3627
+ K(t, r);
3614
3628
  }, "parse")
3615
- }, q = /* @__PURE__ */ r((e) => `
3629
+ }, ae = /* @__PURE__ */ r((e) => `
3616
3630
  .edge {
3617
3631
  stroke-width: ${e.archEdgeWidth};
3618
3632
  stroke: ${e.archEdgeColor};
@@ -3672,10 +3686,10 @@ var Y = /* @__PURE__ */ r((e) => `<g><rect width="80" height="80" style="fill: #
3672
3686
  unknown: S,
3673
3687
  blank: { body: Y("") }
3674
3688
  }
3675
- }, Z = /* @__PURE__ */ r(async function(e, t, n, r) {
3689
+ }, oe = /* @__PURE__ */ r(async function(e, t, n, r) {
3676
3690
  let i = n.getConfigField("padding"), a = n.getConfigField("iconSize"), o = a / 2, s = a / 6, c = s / 2;
3677
3691
  await Promise.all(t.edges().map(async (t) => {
3678
- let { source: a, sourceDir: l, sourceArrow: u, sourceGroup: d, target: f, targetDir: p, targetArrow: m, targetGroup: g, label: _ } = re(t), { x: y, y: b } = t[0].sourceEndpoint(), { x, y: S } = t[0].midpoint(), { x: C, y: w } = t[0].targetEndpoint(), E = i + 4;
3692
+ let { source: a, sourceDir: l, sourceArrow: u, sourceGroup: d, target: f, targetDir: p, targetArrow: m, targetGroup: g, label: _ } = U(t), { x: y, y: b } = t[0].sourceEndpoint(), { x, y: S } = t[0].midpoint(), { x: C, y: w } = t[0].targetEndpoint(), E = i + 4;
3679
3693
  if (d && (F(l) ? y += l === "L" ? -E : E : b += l === "T" ? -E : E + 18), g && (F(p) ? C += p === "L" ? -E : E : w += p === "T" ? -E : E + 18), !d && n.getNode(a)?.type === "junction" && (F(l) ? y += l === "L" ? o : -o : b += l === "T" ? o : -o), !g && n.getNode(f)?.type === "junction" && (F(p) ? C += p === "L" ? o : -o : w += p === "T" ? o : -o), t[0]._private.rscratch) {
3680
3694
  let t = e.insert("g");
3681
3695
  if (t.insert("path").attr("d", `M ${y},${b} L ${x},${S} L${C},${w} `).attr("class", "edge").attr("id", `${r}-${v(a, f, { prefix: "L" })}`), u) {
@@ -3712,10 +3726,10 @@ var Y = /* @__PURE__ */ r((e) => `<g><rect width="80" height="80" style="fill: #
3712
3726
  }
3713
3727
  }
3714
3728
  }));
3715
- }, "drawEdges"), ae = /* @__PURE__ */ r(async function(e, t, n, r) {
3729
+ }, "drawEdges"), Z = /* @__PURE__ */ r(async function(e, t, n, r) {
3716
3730
  let i = n.getConfigField("padding") * .75, a = n.getConfigField("fontSize"), o = n.getConfigField("iconSize") / 2;
3717
3731
  await Promise.all(t.nodes().map(async (t) => {
3718
- let s = U(t);
3732
+ let s = W(t);
3719
3733
  if (s.type === "group") {
3720
3734
  let { h: c, w: l, x1: u, y1: d } = t.boundingBox(), f = e.append("rect");
3721
3735
  f.attr("id", `${r}-group-${s.id}`).attr("x", u + o).attr("y", d + o).attr("width", l).attr("height", c).attr("class", "node-bkg");
@@ -3739,7 +3753,7 @@ var Y = /* @__PURE__ */ r((e) => `<g><rect width="80" height="80" style="fill: #
3739
3753
  n.setElementForId(s.id, f);
3740
3754
  }
3741
3755
  }));
3742
- }, "drawGroups"), Q = /* @__PURE__ */ r(async function(e, t, n, r) {
3756
+ }, "drawGroups"), se = /* @__PURE__ */ r(async function(e, t, n, r) {
3743
3757
  let i = h();
3744
3758
  for (let a of n) {
3745
3759
  let n = t.append("g"), o = e.getConfigField("iconSize");
@@ -3771,7 +3785,7 @@ var Y = /* @__PURE__ */ r((e) => `<g><rect width="80" height="80" style="fill: #
3771
3785
  a.width = c, a.height = l, e.setElementForId(a.id, n);
3772
3786
  }
3773
3787
  return 0;
3774
- }, "drawServices"), oe = /* @__PURE__ */ r(function(e, t, n, r) {
3788
+ }, "drawServices"), ce = /* @__PURE__ */ r(function(e, t, n, r) {
3775
3789
  n.forEach((n) => {
3776
3790
  let i = t.append("g"), a = e.getConfigField("iconSize");
3777
3791
  i.append("g").append("rect").attr("id", `${r}-node-${n.id}`).attr("fill-opacity", "0").attr("width", a).attr("height", a), i.attr("class", "architecture-junction");
@@ -3783,7 +3797,7 @@ C([{
3783
3797
  name: X.prefix,
3784
3798
  icons: X
3785
3799
  }]), E.use(k.default);
3786
- function se(e, t, n) {
3800
+ function le(e, t, n) {
3787
3801
  e.forEach((e) => {
3788
3802
  t.add({
3789
3803
  group: "nodes",
@@ -3800,8 +3814,8 @@ function se(e, t, n) {
3800
3814
  });
3801
3815
  });
3802
3816
  }
3803
- r(se, "addServices");
3804
- function ce(e, t, n) {
3817
+ r(le, "addServices");
3818
+ function ue(e, t, n) {
3805
3819
  e.forEach((e) => {
3806
3820
  t.add({
3807
3821
  group: "nodes",
@@ -3816,15 +3830,15 @@ function ce(e, t, n) {
3816
3830
  });
3817
3831
  });
3818
3832
  }
3819
- r(ce, "addJunctions");
3820
- function le(e, t) {
3833
+ r(ue, "addJunctions");
3834
+ function de(e, t) {
3821
3835
  t.nodes().map((t) => {
3822
- let n = U(t);
3836
+ let n = W(t);
3823
3837
  n.type !== "group" && (n.x = t.position().x, n.y = t.position().y, e.getElementById(n.id).attr("transform", "translate(" + (n.x || 0) + "," + (n.y || 0) + ")"));
3824
3838
  });
3825
3839
  }
3826
- r(le, "positionNodes");
3827
- function ue(e, t) {
3840
+ r(de, "positionNodes");
3841
+ function fe(e, t) {
3828
3842
  e.forEach((e) => {
3829
3843
  t.add({
3830
3844
  group: "nodes",
@@ -3839,8 +3853,8 @@ function ue(e, t) {
3839
3853
  });
3840
3854
  });
3841
3855
  }
3842
- r(ue, "addGroups");
3843
- function de(e, t) {
3856
+ r(fe, "addGroups");
3857
+ function pe(e, t) {
3844
3858
  e.forEach((e) => {
3845
3859
  let { lhsId: n, rhsId: r, lhsInto: i, lhsGroup: a, rhsInto: o, lhsDir: s, rhsDir: c, rhsGroup: l, title: u } = e, d = L(e.lhsDir, e.rhsDir) ? "segments" : "straight", f = {
3846
3860
  id: `${n}-${r}`,
@@ -3863,39 +3877,51 @@ function de(e, t) {
3863
3877
  });
3864
3878
  });
3865
3879
  }
3866
- r(de, "addEdges");
3867
- function fe(e, t, n, i = []) {
3868
- let a = /* @__PURE__ */ r((e, t) => Object.entries(e).reduce((e, [r, i]) => {
3869
- let a = 0, o = Object.entries(i);
3870
- if (o.length === 1) return e[r] = o[0][1], e;
3871
- for (let i = 0; i < o.length - 1; i++) for (let s = i + 1; s < o.length; s++) {
3872
- let [c, l] = o[i], [u, d] = o[s];
3873
- if (n[c]?.[u] === t) e[r] ??= [], e[r] = [
3874
- ...e[r],
3875
- ...l,
3876
- ...d
3877
- ];
3878
- else if (c === "default" || u === "default") e[r] ??= [], e[r] = [
3879
- ...e[r],
3880
- ...l,
3881
- ...d
3882
- ];
3883
- else {
3884
- let t = `${r}-${a++}`;
3885
- e[t] = l;
3886
- let n = `${r}-${a++}`;
3887
- e[n] = d;
3880
+ r(pe, "addEdges");
3881
+ function me(e, t, n, i = []) {
3882
+ let a = /* @__PURE__ */ r((e, t) => {
3883
+ let r = /* @__PURE__ */ new Map();
3884
+ for (let [i, a] of e.entries()) {
3885
+ let e = `${i}`, o = 0, s = [...a.entries()];
3886
+ if (s.length === 1) {
3887
+ r.set(e, s[0][1]);
3888
+ continue;
3889
+ }
3890
+ for (let i = 0; i < s.length - 1; i++) for (let a = i + 1; a < s.length; a++) {
3891
+ let [c, l] = s[i], [u, d] = s[a];
3892
+ if (n.get(re(c, u)) === t) r.set(e, [
3893
+ ...r.get(e) ?? [],
3894
+ ...l,
3895
+ ...d
3896
+ ]);
3897
+ else if (c === "default" || u === "default") r.set(e, [
3898
+ ...r.get(e) ?? [],
3899
+ ...l,
3900
+ ...d
3901
+ ]);
3902
+ else {
3903
+ let t = `${e}-${o++}`;
3904
+ r.set(t, l);
3905
+ let n = `${e}-${o++}`;
3906
+ r.set(n, d);
3907
+ }
3888
3908
  }
3889
3909
  }
3890
- return e;
3891
- }, {}), "flattenAlignments"), [o, s] = t.map((t) => {
3892
- let n = {}, r = {};
3893
- return Object.entries(t).forEach(([t, [i, a]]) => {
3894
- let o = e.getNode(t)?.in ?? "default";
3895
- n[a] ??= {}, n[a][o] ??= [], n[a][o].push(t), r[i] ??= {}, r[i][o] ??= [], r[i][o].push(t);
3910
+ return r;
3911
+ }, "flattenAlignments"), [o, s] = t.map((t) => {
3912
+ let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
3913
+ return t.forEach(([t, i], a) => {
3914
+ let o = e.getNode(a)?.in ?? "default", s = n.get(i) ?? /* @__PURE__ */ new Map();
3915
+ n.has(i) || n.set(i, s);
3916
+ let c = r.get(t) ?? /* @__PURE__ */ new Map();
3917
+ r.has(t) || r.set(t, c);
3918
+ for (let e of [s, c]) {
3919
+ let t = e.get(o) ?? [];
3920
+ e.has(o) || e.set(o, t), t.push(a);
3921
+ }
3896
3922
  }), {
3897
- horiz: Object.values(a(n, "horizontal")).filter((e) => e.length > 1),
3898
- vert: Object.values(a(r, "vertical")).filter((e) => e.length > 1)
3923
+ horiz: [...a(n, "horizontal").values()].filter((e) => e.length > 1),
3924
+ vert: [...a(r, "vertical").values()].filter((e) => e.length > 1)
3899
3925
  };
3900
3926
  }).reduce(([e, t], { horiz: n, vert: r }) => [[...e, ...n], [...t, ...r]], [[], []]), c = /* @__PURE__ */ new Set();
3901
3927
  i.forEach((e) => e.members.forEach((e) => c.add(e)));
@@ -3907,8 +3933,8 @@ function fe(e, t, n, i = []) {
3907
3933
  vertical: d
3908
3934
  };
3909
3935
  }
3910
- r(fe, "getAlignments");
3911
- function pe(e, t, n = []) {
3936
+ r(me, "getAlignments");
3937
+ function he(e, t, n = []) {
3912
3938
  let i = [], a = t.getConfigField("iconSize"), o = t.getConfigField("idealEdgeLengthMultiplier"), s = o * a, c = /* @__PURE__ */ new Set();
3913
3939
  n.forEach((e) => {
3914
3940
  for (let t = 0; t < e.members.length - 1; t++) {
@@ -3926,7 +3952,7 @@ function pe(e, t, n = []) {
3926
3952
  });
3927
3953
  let l = /* @__PURE__ */ r((e) => `${e[0]},${e[1]}`, "posToStr"), u = /* @__PURE__ */ r((e) => e.split(",").map((e) => parseInt(e)), "strToPos");
3928
3954
  return e.forEach((e) => {
3929
- let t = Object.fromEntries(Object.entries(e).map(([e, t]) => [l(t), e])), n = [l([0, 0])], r = {}, s = {
3955
+ let t = new Map([...e.entries()].map(([e, t]) => [l(t), e])), n = [l([0, 0])], r = {}, s = {
3930
3956
  L: [-1, 0],
3931
3957
  R: [1, 0],
3932
3958
  T: [0, 1],
@@ -3936,11 +3962,11 @@ function pe(e, t, n = []) {
3936
3962
  let e = n.shift();
3937
3963
  if (e) {
3938
3964
  r[e] = 1;
3939
- let d = t[e];
3965
+ let d = t.get(e);
3940
3966
  if (d) {
3941
3967
  let f = u(e);
3942
3968
  Object.entries(s).forEach(([e, s]) => {
3943
- let u = l([f[0] + s[0], f[1] + s[1]]), p = t[u];
3969
+ let u = l([f[0] + s[0], f[1] + s[1]]), p = t.get(u);
3944
3970
  if (p && !r[u]) {
3945
3971
  if (n.push(u), c.has(`${d}|${p}`)) return;
3946
3972
  i.push({
@@ -3955,8 +3981,8 @@ function pe(e, t, n = []) {
3955
3981
  }
3956
3982
  }), i;
3957
3983
  }
3958
- r(pe, "getRelativeConstraints");
3959
- function me(e, t, n, o, s, { spatialMaps: c, groupAlignments: l }) {
3984
+ r(he, "getRelativeConstraints");
3985
+ function ge(e, t, n, o, s, { spatialMaps: c, groupAlignments: l }) {
3960
3986
  return new Promise((u) => {
3961
3987
  let d = a("body").append("div").attr("id", "cy").attr("style", "display:none"), f = E({
3962
3988
  container: document.getElementById("cy"),
@@ -4026,8 +4052,8 @@ function me(e, t, n, o, s, { spatialMaps: c, groupAlignments: l }) {
4026
4052
  }
4027
4053
  }
4028
4054
  });
4029
- d.remove(), ue(n, f), se(e, f, s), ce(t, f, s), de(o, f);
4030
- let p = s.getLayoutHints(), m = fe(s, c, l, p), h = pe(c, s, p), g = s.getConfigField("iconSize"), _ = s.getConfigField("idealEdgeLengthMultiplier") * g, v = .5 * g, y = s.getConfigField("edgeElasticity"), b = s.getConfigField("seed"), x = f.layout({
4055
+ d.remove(), fe(n, f), le(e, f, s), ue(t, f, s), pe(o, f);
4056
+ let p = s.getLayoutHints(), m = me(s, c, l, p), h = he(c, s, p), g = s.getConfigField("iconSize"), _ = s.getConfigField("idealEdgeLengthMultiplier") * g, v = .5 * g, y = s.getConfigField("edgeElasticity"), b = s.getConfigField("seed"), x = f.layout({
4031
4057
  name: "fcose",
4032
4058
  quality: "proof",
4033
4059
  randomize: s.getConfigField("randomize"),
@@ -4037,11 +4063,11 @@ function me(e, t, n, o, s, { spatialMaps: c, groupAlignments: l }) {
4037
4063
  animate: !1,
4038
4064
  nodeDimensionsIncludeLabels: !1,
4039
4065
  idealEdgeLength(e) {
4040
- let [t, n] = e.connectedNodes(), { parent: r } = U(t), { parent: i } = U(n);
4066
+ let [t, n] = e.connectedNodes(), { parent: r } = W(t), { parent: i } = W(n);
4041
4067
  return r === i ? _ : v;
4042
4068
  },
4043
4069
  edgeElasticity(e) {
4044
- let [t, n] = e.connectedNodes(), { parent: r } = U(t), { parent: i } = U(n);
4070
+ let [t, n] = e.connectedNodes(), { parent: r } = W(t), { parent: i } = W(n);
4045
4071
  return r === i ? y : .001;
4046
4072
  },
4047
4073
  alignmentConstraint: m,
@@ -4080,7 +4106,7 @@ function me(e, t, n, o, s, { spatialMaps: c, groupAlignments: l }) {
4080
4106
  for (let t of Object.values(f.edges())) if (t.data?.()) {
4081
4107
  let { x: n, y: r } = t.source().position(), { x: i, y: a } = t.target().position();
4082
4108
  if (n !== i && r !== a) {
4083
- let n = t.sourceEndpoint(), r = t.targetEndpoint(), { sourceDir: i } = re(t), [a, o] = I(i) ? [n.x, r.y] : [r.x, n.y], { weights: s, distances: c } = e(n, r, a, o);
4109
+ let n = t.sourceEndpoint(), r = t.targetEndpoint(), { sourceDir: i } = U(t), [a, o] = I(i) ? [n.x, r.y] : [r.x, n.y], { weights: s, distances: c } = e(n, r, a, o);
4084
4110
  t.style("segment-distances", c), t.style("segment-weights", s);
4085
4111
  }
4086
4112
  }
@@ -4096,11 +4122,11 @@ function me(e, t, n, o, s, { spatialMaps: c, groupAlignments: l }) {
4096
4122
  });
4097
4123
  });
4098
4124
  }
4099
- r(me, "layoutArchitecture");
4100
- var he = {
4101
- parser: K,
4125
+ r(ge, "layoutArchitecture");
4126
+ var _e = {
4127
+ parser: q,
4102
4128
  get db() {
4103
- return new G();
4129
+ return new ie();
4104
4130
  },
4105
4131
  renderer: { draw: /* @__PURE__ */ r(async (e, t, n, r) => {
4106
4132
  let i = r.db;
@@ -4110,11 +4136,11 @@ var he = {
4110
4136
  let p = d.append("g");
4111
4137
  p.attr("class", "architecture-services");
4112
4138
  let m = d.append("g");
4113
- m.attr("class", "architecture-groups"), await Q(i, p, a, t), oe(i, p, o, t);
4114
- let h = await me(a, o, c, l, i, u);
4115
- await Z(f, h, i, t), await ae(m, h, i, t), le(i, h), s(void 0, d, i.getConfigField("padding"), i.getConfigField("useMaxWidth"));
4139
+ m.attr("class", "architecture-groups"), await se(i, p, a, t), ce(i, p, o, t);
4140
+ let h = await ge(a, o, c, l, i, u);
4141
+ await oe(f, h, i, t), await Z(m, h, i, t), de(i, h), s(void 0, d, i.getConfigField("padding"), i.getConfigField("useMaxWidth"));
4116
4142
  }, "draw") },
4117
- styles: q
4143
+ styles: ae
4118
4144
  };
4119
4145
  //#endregion
4120
- export { he as diagram };
4146
+ export { _e as diagram };