@antdv-next/x 1.1.3-beta.5 → 1.2.1-beta.1

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 (140) hide show
  1. package/dist/actions/ActionsFeedback.js +1 -1
  2. package/dist/actions/ActionsItem.js +1 -1
  3. package/dist/bubble/hooks/useCompatibleScroll.js +1 -1
  4. package/dist/code-highlighter/CodeHighlighter.js +2 -1
  5. package/dist/code-highlighter/shiki.js +1 -1
  6. package/dist/code-highlighter/style/index.d.ts +40 -0
  7. package/dist/code-highlighter/style/index.js +25 -13
  8. package/dist/folder/Folder.js +2 -1
  9. package/dist/index.umd.js +91 -51
  10. package/dist/mermaid/Mermaid.js +1 -1
  11. package/dist/package.js +1 -1
  12. package/dist/sender/components/SlotTextArea.js +5 -4
  13. package/dist/sender/components/SpeechButton/RecordingIcon.js +1 -1
  14. package/dist/sender/hooks/use-speech.js +2 -1
  15. package/dist/suggestion/style/index.js +5 -1
  16. package/dist/suggestion/useActive.js +0 -2
  17. package/dist/theme/themes/seed.js +3 -0
  18. package/dist/theme/util/alias.js +5 -5
  19. package/dist/think/Think.d.ts +9 -0
  20. package/dist/think/Think.js +18 -9
  21. package/dist/think/interface.d.ts +6 -0
  22. package/dist/thought-chain/Node.js +11 -5
  23. package/dist/thought-chain/ThoughtChain.js +2 -2
  24. package/dist/thought-chain/interface.d.ts +6 -0
  25. package/dist/x-provider/index.js +3 -2
  26. package/es/Serializer-Sc9uEpQk.js +262 -0
  27. package/es/{_basePickBy-DFHEGO2M.js → _basePickBy-CrbncDqR.js} +2 -2
  28. package/es/{_baseUniq-BlS7rXTs.js → _baseUniq-B-qU_Imh.js} +9 -9
  29. package/es/antdv-next-x.esm.js +2910 -2885
  30. package/es/{arc-BuXEd18J.js → arc-NI3ROx5X.js} +2 -2
  31. package/es/architecture-PBZL5I3N-BRGGaMu3.js +3 -0
  32. package/es/{architectureDiagram-2XIMDMQ5-CmfsCwJk.js → architectureDiagram-2XIMDMQ5-OvuktNfv.js} +100 -110
  33. package/es/{blockDiagram-WCTKOSBZ-lJAan65A.js → blockDiagram-WCTKOSBZ-CS-kh74L.js} +42 -43
  34. package/es/{c4Diagram-IC4MRINW-B1c2x_1Q.js → c4Diagram-IC4MRINW-BZGIF4Dk.js} +17 -25
  35. package/es/{channel-DFgF_2F7.js → channel-DrSSYyxp.js} +1 -1
  36. package/es/{chunk-4BX2VUAB-J2N81Fpp.js → chunk-4BX2VUAB-Rm8-te6i.js} +1 -1
  37. package/es/{chunk-55IACEB6-DGtfGRgi.js → chunk-55IACEB6-Tre45n-8.js} +1 -1
  38. package/es/{chunk-7R4GIKGN-QT6IorJ_.js → chunk-7R4GIKGN-scch4dXY.js} +10 -10
  39. package/es/{chunk-FMBD7UC4-DCcRjunY.js → chunk-FMBD7UC4-JmekSPZP.js} +1 -1
  40. package/es/{chunk-GEFDOKGD-BWpC-zoH.js → chunk-GEFDOKGD-BEzc6NZw.js} +31 -71
  41. package/es/{chunk-JSJVCQXG-D8_heHOp.js → chunk-JSJVCQXG-_l_UVbaa.js} +3 -3
  42. package/es/{chunk-KX2RTZJC-D5cc4rj6.js → chunk-KX2RTZJC-BUWM8pJz.js} +2 -2
  43. package/es/{chunk-KYZI473N-BHJ3T5Zv.js → chunk-KYZI473N-BSgb_E0Q.js} +11 -11
  44. package/es/{chunk-MX3YWQON-BxE-Aq9c.js → chunk-MX3YWQON-D602L8pU.js} +1 -1
  45. package/es/{chunk-NQ4KR5QH-EYQBXkqP.js → chunk-NQ4KR5QH-BPQV0i93.js} +41 -45
  46. package/es/{chunk-O4XLMI2P-qjOoGpnx.js → chunk-O4XLMI2P-BMqc3iYa.js} +15 -14
  47. package/es/{chunk-PQ6SQG4A-D3jtNCWN.js → chunk-PQ6SQG4A-DcYrzB1X.js} +2 -2
  48. package/es/{chunk-PU5JKC2W-DdP8BS-S.js → chunk-PU5JKC2W-TuGY6X1n.js} +28 -24
  49. package/es/{chunk-QZHKN3VN-CW3cFN-h.js → chunk-QZHKN3VN-CKbD02cl.js} +1 -1
  50. package/es/{chunk-WL4C6EOR-BDbxJyGk.js → chunk-WL4C6EOR-B31ErTFp.js} +19 -17
  51. package/es/{chunk-XZSTWKYB-CucN1XvM.js → chunk-XZSTWKYB-DYKLwCEy.js} +1888 -1785
  52. package/es/{chunk-YBOYWFTD-CvaddD9G.js → chunk-YBOYWFTD-CRiKEIiS.js} +5 -5
  53. package/es/classDiagram-VBA2DB6C-BDqwxUdU.js +29 -0
  54. package/es/classDiagram-v2-RAHNMMFH-DdmOjeUb.js +29 -0
  55. package/es/{clone-r3YukIBB.js → clone-yzFtXY5G.js} +1 -1
  56. package/es/{cose-bilkent-S5V4N54A-B5OQuIhl.js → cose-bilkent-S5V4N54A-BM90wTBk.js} +43 -48
  57. package/es/css-CRY9BUqw.js +2 -0
  58. package/es/{cytoscape.esm-i2CZcWd-.js → cytoscape.esm-B_-hKv4-.js} +276 -321
  59. package/es/{dagre-5aGJFKmT.js → dagre-DCYVBij1.js} +25 -27
  60. package/es/{dagre-KLK3FWXG-BI5QQMXo.js → dagre-KLK3FWXG-Ced70SgJ.js} +21 -17
  61. package/es/{defaultLocale-bckJcYh1.js → defaultLocale-yzzuPw6P.js} +1 -4
  62. package/es/{diagram-E7M64L7V-Dz62Vz_a.js → diagram-E7M64L7V-xZCloH_i.js} +72 -70
  63. package/es/{diagram-IFDJBPK2-9fjvFkSc.js → diagram-IFDJBPK2-BTmFZhvz.js} +21 -21
  64. package/es/{diagram-P4PSJMXO-BlX6jFjZ.js → diagram-P4PSJMXO-DX_3B0LB.js} +16 -16
  65. package/es/{dist-BX_roQzC.js → dist-h4ggShny.js} +1 -1
  66. package/es/{erDiagram-INFDFZHY-BcRXu8Cp.js → erDiagram-INFDFZHY-MJ_HVY-7.js} +22 -22
  67. package/es/{flowDiagram-PKNHOUZH-UeyfgU8z.js → flowDiagram-PKNHOUZH-CQIRy1sx.js} +35 -42
  68. package/es/{ganttDiagram-A5KZAMGK-txCzqgQ5.js → ganttDiagram-A5KZAMGK-Dw9bjWjx.js} +39 -52
  69. package/es/gitGraph-HDMCJU4V-oForq_Vw.js +3 -0
  70. package/es/{gitGraphDiagram-K3NZZRJ6-DghWYaFU.js → gitGraphDiagram-K3NZZRJ6-Gk6FiGbZ.js} +21 -21
  71. package/es/{graphlib-dRkI1OCL.js → graphlib-BMvIh7N7.js} +4 -4
  72. package/es/{html-CWvNBSxv.js → html-C4rrmxbP.js} +2 -2
  73. package/es/info-3K5VOQVL-0F-ZLEMx.js +3 -0
  74. package/es/{infoDiagram-LFFYTUFH-CA-vlAvP.js → infoDiagram-LFFYTUFH-CS64-uil.js} +9 -9
  75. package/es/{init-B75p2clj.js → init-sjaVZO3f.js} +1 -3
  76. package/es/{isArrayLikeObject-jl2bjkAJ.js → isArrayLikeObject-Dqk_yOP-.js} +5 -4
  77. package/es/{ishikawaDiagram-PHBUUO56-DjdpS9Lb.js → ishikawaDiagram-PHBUUO56-C_Hw5UnV.js} +13 -13
  78. package/es/javascript--0qAxhnA.js +2 -0
  79. package/es/{journeyDiagram-4ABVD52K-CIJfC1fp.js → journeyDiagram-4ABVD52K-CFFyM4Ar.js} +16 -16
  80. package/es/{kanban-definition-K7BYSVSG-CC2vwGck.js → kanban-definition-K7BYSVSG-B_R-mA10.js} +27 -28
  81. package/es/{katex-DCMiIo1z.js → katex-C-qdUNlg.js} +78 -68
  82. package/es/{line-Cu9NTacD.js → line-D05MESIS.js} +3 -3
  83. package/es/{linear-C0rAYYmp.js → linear-B8tPH2Pw.js} +4 -6
  84. package/es/mermaid-parser.core-C_69nk7j.js +259 -0
  85. package/es/mermaid.core-BVGVwWcu.js +1914 -0
  86. package/es/{mindmap-definition-YRQLILUH-BzTYDYmK.js → mindmap-definition-YRQLILUH-qgGUYYe3.js} +26 -28
  87. package/es/{ordinal-F3U6aXtP.js → ordinal-CNQzPcrr.js} +1 -1
  88. package/es/packet-RMMSAZCW-CeqtQQ_e.js +3 -0
  89. package/es/{path-Dm3C8WEs.js → path-CqWAdh69.js} +4 -7
  90. package/es/pie-UPGHQEXC-BI60FhK4.js +3 -0
  91. package/es/{pieDiagram-SKSYHLDU-COvqE_C6.js → pieDiagram-SKSYHLDU-B8-AVOmP.js} +47 -47
  92. package/es/{quadrantDiagram-337W2JSQ-Dgv8ccjt.js → quadrantDiagram-337W2JSQ-C2Z0CN4Z.js} +10 -10
  93. package/es/radar-KQ55EAFF-CRwOOFw0.js +3 -0
  94. package/es/{requirementDiagram-Z7DCOOCP-B2NyhxO-.js → requirementDiagram-Z7DCOOCP-Cdj7PwWC.js} +19 -19
  95. package/es/{chunk-WQLz0Won.js → rolldown-runtime-CEY2VRuR.js} +10 -3
  96. package/es/{rough.esm-BhGP2Udb.js → rough.esm-D1ibUQD-.js} +1 -1
  97. package/es/{sankeyDiagram-WA2Y5GQK-BfnH_gpl.js → sankeyDiagram-WA2Y5GQK-BNmU-dM1.js} +10 -10
  98. package/es/{sequenceDiagram-2WXFIKYE-DXssVQOF.js → sequenceDiagram-2WXFIKYE-pj0uPf22.js} +114 -126
  99. package/es/{shiki-runtime-D0MO6er5.js → shiki-runtime-7QG17np_.js} +978 -983
  100. package/es/{src-CUQ6oOYk.js → src-Dynw_Lub.js} +26 -26
  101. package/es/{stateDiagram-RAJIS63D-DvDLfupV.js → stateDiagram-RAJIS63D-BgCfMnGb.js} +18 -18
  102. package/es/stateDiagram-v2-FVOUBMTO-ByMhP6Xo.js +27 -0
  103. package/es/{timeline-definition-YZTLITO2-ErcRjbZf.js → timeline-definition-YZTLITO2-Bj5QKnBI.js} +10 -10
  104. package/es/treemap-KZPCXAKY-BlOAFUbR.js +3 -0
  105. package/es/{vennDiagram-LZ73GAT5-CDTZUtc8.js → vennDiagram-LZ73GAT5-lpWcIvN6.js} +16 -16
  106. package/es/{xychartDiagram-JWTSCODW-Y21jBOTg.js → xychartDiagram-JWTSCODW-De1M-7Yz.js} +26 -30
  107. package/package.json +1 -1
  108. package/es/Serializer-D1JYN1kI.js +0 -262
  109. package/es/architecture-PBZL5I3N-D7tS55xM.js +0 -3
  110. package/es/chunk-7E7YKBS2-CL2d4WAf.js +0 -23
  111. package/es/chunk-C72U2L5F-OHTVpS-m.js +0 -23
  112. package/es/chunk-EGIJ26TM-DyMPGYrB.js +0 -23
  113. package/es/chunk-GLR3WWYH-DiXcKb5Y.js +0 -41
  114. package/es/chunk-HHEYEP7N-Cxc7E4dX.js +0 -9
  115. package/es/chunk-L3YUKLVL-7oGaUOdc.js +0 -23
  116. package/es/chunk-OZEHJAEY-D82nx27s.js +0 -64
  117. package/es/chunk-R5LLSJPH-CreI2kO9.js +0 -35
  118. package/es/chunk-XIRO2GV7-S5KkbVnN.js +0 -30
  119. package/es/chunk-XPW4576I-B0KVSHwE.js +0 -1146
  120. package/es/classDiagram-VBA2DB6C-Co3LMmg8.js +0 -29
  121. package/es/classDiagram-v2-RAHNMMFH-BZscgdF2.js +0 -29
  122. package/es/css-Bi5OTYo2.js +0 -2
  123. package/es/gitGraph-HDMCJU4V-CxsS0Qr1.js +0 -3
  124. package/es/info-3K5VOQVL-COqdvM99.js +0 -3
  125. package/es/isEmpty-CmA-HYrg.js +0 -35
  126. package/es/javascript-CjdDmufJ.js +0 -2
  127. package/es/mermaid-parser.core-7Wn2L29P.js +0 -59
  128. package/es/mermaid.core-Bvy_Q6Hu.js +0 -680
  129. package/es/packet-RMMSAZCW-2PTjWKLd.js +0 -3
  130. package/es/pie-UPGHQEXC-Du8-k-EA.js +0 -3
  131. package/es/radar-KQ55EAFF-jJOhyjxC.js +0 -3
  132. package/es/stateDiagram-v2-FVOUBMTO-DIXyaX9W.js +0 -27
  133. package/es/treemap-KZPCXAKY-CvZAIYVa.js +0 -3
  134. /package/es/{array-CWNufkl9.js → array-CApNbSU9.js} +0 -0
  135. /package/es/{css-v5r4VtJ6.js → css-DVAQAvTD.js} +0 -0
  136. /package/es/{javascript-o_jd8Ivw.js → javascript-Bk0bJ4nQ.js} +0 -0
  137. /package/es/{json-DqMXJlo0.js → json-CAwkMa5O.js} +0 -0
  138. /package/es/{math-CoDOuve-.js → math-BZ_bUCIA.js} +0 -0
  139. /package/es/{python-CQPNJfOt.js → python-D0AaDoWC.js} +0 -0
  140. /package/es/{typescript-Ck7Pr_E3.js → typescript-DWy2KXvB.js} +0 -0
@@ -1,5 +1,5 @@
1
- import { n as e, t } from "./path-Dm3C8WEs.js";
2
- import { a as n, c as r, d as i, f as a, i as o, l as s, n as c, p as l, r as u, s as d, t as f, u as p } from "./math-CoDOuve-.js";
1
+ import { n as e, t } from "./path-CqWAdh69.js";
2
+ import { a as n, c as r, d as i, f as a, i as o, l as s, n as c, p as l, r as u, s as d, t as f, u as p } from "./math-BZ_bUCIA.js";
3
3
  //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/arc.js
4
4
  function m(e) {
5
5
  return e.innerRadius;
@@ -0,0 +1,3 @@
1
+ import "./chunk-XZSTWKYB-DYKLwCEy.js";
2
+ import { h as e } from "./mermaid-parser.core-C_69nk7j.js";
3
+ export { e as createArchitectureServices };
@@ -1,12 +1,12 @@
1
- import { o as e, t } from "./chunk-WQLz0Won.js";
2
- import { g as n, h as r, p as i } from "./src-CUQ6oOYk.js";
3
- import { r as a, s as o } from "./chunk-GEFDOKGD-BWpC-zoH.js";
4
- import { B as s, C as c, K as l, L as u, V as d, W as f, _ as p, a as m, b as h, d as g, v as _, y as v } from "./chunk-7R4GIKGN-QT6IorJ_.js";
5
- import { t as y } from "./chunk-HHEYEP7N-Cxc7E4dX.js";
6
- import { a as b, i as x, n as S, r as C } from "./chunk-PU5JKC2W-DdP8BS-S.js";
7
- import { t as w } from "./chunk-4BX2VUAB-J2N81Fpp.js";
8
- import { t as T } from "./mermaid-parser.core-7Wn2L29P.js";
9
- import { t as E } from "./cytoscape.esm-i2CZcWd-.js";
1
+ import { o as e, t } from "./rolldown-runtime-CEY2VRuR.js";
2
+ import { g as n, h as r, p as i } from "./src-Dynw_Lub.js";
3
+ import { r as a, s as o } from "./chunk-GEFDOKGD-BEzc6NZw.js";
4
+ import { t as s } from "./mermaid-parser.core-C_69nk7j.js";
5
+ import { B as c, C as l, K as u, L as d, V as f, W as p, _ as m, a as h, b as g, d as _, v, y } from "./chunk-7R4GIKGN-scch4dXY.js";
6
+ import { a as b, i as x, n as S, r as C } from "./chunk-PU5JKC2W-TuGY6X1n.js";
7
+ import { t as w } from "./chunk-4BX2VUAB-Rm8-te6i.js";
8
+ import { t as T } from "./cytoscape.esm-B_-hKv4-.js";
9
+ import { a as E } from "./mermaid.core-BVGVwWcu.js";
10
10
  //#region ../../node_modules/.pnpm/layout-base@2.0.1/node_modules/layout-base/layout-base.js
11
11
  var D = /* @__PURE__ */ t(((e, t) => {
12
12
  (function(n, r) {
@@ -102,7 +102,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
102
102
  (function(e, t, n) {
103
103
  var r = n(2), i = n(10), a = n(13), o = n(0), s = n(16), c = n(5);
104
104
  function l(e, t, n, o) {
105
- n == null && o == null && (o = t), r.call(this, o), e.graphManager != null && (e = e.graphManager), this.estimatedSize = i.MIN_VALUE, this.inclusionTreeDepth = i.MAX_VALUE, this.vGraphObject = o, this.edges = [], this.graphManager = e, n != null && t != null ? this.rect = new a(t.x, t.y, n.width, n.height) : this.rect = new a();
105
+ n == null && o == null && (o = t), r.call(this, o), e.graphManager != null && (e = e.graphManager), this.estimatedSize = i.MIN_VALUE, this.inclusionTreeDepth = i.MAX_VALUE, this.vGraphObject = o, this.edges = [], this.graphManager = e, this.rect = n != null && t != null ? new a(t.x, t.y, n.width, n.height) : new a();
106
106
  }
107
107
  for (var u in l.prototype = Object.create(r.prototype), r) l[u] = r[u];
108
108
  l.prototype.getEdges = function() {
@@ -152,7 +152,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
152
152
  }, l.prototype.getEdgesBetween = function(e) {
153
153
  var t = [], n = this;
154
154
  return n.edges.forEach(function(r) {
155
- if (!(r.source == n || r.target == n)) throw "Incorrect edge source and/or target";
155
+ if (r.source != n && r.target != n) throw "Incorrect edge source and/or target";
156
156
  (r.target == e || r.source == e) && t.push(r);
157
157
  }), t;
158
158
  }, l.prototype.getNeighborsList = function() {
@@ -272,17 +272,16 @@ var D = /* @__PURE__ */ t(((e, t) => {
272
272
  if (this.graphManager == null) throw "Graph has no graph mgr!";
273
273
  if (this.getNodes().indexOf(r) > -1) throw "Node already in graph!";
274
274
  return r.owner = this, this.getNodes().push(r), r;
275
- } else {
276
- var i = e;
277
- if (!(this.getNodes().indexOf(t) > -1 && this.getNodes().indexOf(n) > -1)) throw "Source or target not in graph!";
278
- if (!(t.owner == n.owner && t.owner == this)) throw "Both owners must be this graph!";
279
- return t.owner == n.owner ? (i.source = t, i.target = n, i.isInterGraph = !1, this.getEdges().push(i), t.edges.push(i), n != t && n.edges.push(i), i) : null;
280
275
  }
276
+ var i = e;
277
+ if (!(this.getNodes().indexOf(t) > -1 && this.getNodes().indexOf(n) > -1)) throw "Source or target not in graph!";
278
+ if (t.owner != n.owner || t.owner != this) throw "Both owners must be this graph!";
279
+ return t.owner == n.owner ? (i.source = t, i.target = n, i.isInterGraph = !1, this.getEdges().push(i), t.edges.push(i), n != t && n.edges.push(i), i) : null;
281
280
  }, f.prototype.remove = function(e) {
282
281
  var t = e;
283
282
  if (e instanceof s) {
284
283
  if (t == null) throw "Node is null!";
285
- if (!(t.owner != null && t.owner == this)) throw "Owner graph is invalid!";
284
+ if (t.owner == null || t.owner != this) throw "Owner graph is invalid!";
286
285
  if (this.graphManager == null) throw "Owner graph manager is invalid!";
287
286
  for (var n = t.edges.slice(), r, i = n.length, a = 0; a < i; a++) r = n[a], r.isInterGraph ? this.graphManager.remove(r) : r.source.owner.remove(r);
288
287
  var o = this.nodes.indexOf(t);
@@ -291,8 +290,8 @@ var D = /* @__PURE__ */ t(((e, t) => {
291
290
  } else if (e instanceof c) {
292
291
  var r = e;
293
292
  if (r == null) throw "Edge is null!";
294
- if (!(r.source != null && r.target != null)) throw "Source and/or target is null!";
295
- if (!(r.source.owner != null && r.target.owner != null && r.source.owner == this && r.target.owner == this)) throw "Source and/or target owner is invalid!";
293
+ if (r.source == null || r.target == null) throw "Source and/or target is null!";
294
+ if (r.source.owner == null || r.target.owner == null || r.source.owner != this || r.target.owner != this) throw "Source and/or target owner is invalid!";
296
295
  var l = r.source.edges.indexOf(r), u = r.target.edges.indexOf(r);
297
296
  if (!(l > -1 && u > -1)) throw "Source and/or target doesn't know this edge!";
298
297
  r.source.edges.splice(l, 1), r.target != r.source && r.target.edges.splice(u, 1);
@@ -329,7 +328,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
329
328
  var i = t[r];
330
329
  e += i.calcEstimatedSize();
331
330
  }
332
- return e == 0 ? this.estimatedSize = a.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = e / Math.sqrt(this.nodes.length), this.estimatedSize;
331
+ return this.estimatedSize = e == 0 ? a.EMPTY_COMPOUND_NODE_SIZE : e / Math.sqrt(this.nodes.length), this.estimatedSize;
333
332
  }, f.prototype.updateConnected = function() {
334
333
  var e = this;
335
334
  if (this.nodes.length == 0) {
@@ -369,17 +368,16 @@ var D = /* @__PURE__ */ t(((e, t) => {
369
368
  if (this.graphs.push(e), e.parent != null) throw "Already has a parent!";
370
369
  if (t.child != null) throw "Already has a child!";
371
370
  return e.parent = t, t.child = e, e;
372
- } else {
373
- i = n, r = t, n = e;
374
- var a = r.getOwner(), o = i.getOwner();
375
- if (!(a != null && a.getGraphManager() == this)) throw "Source not in this graph mgr!";
376
- if (!(o != null && o.getGraphManager() == this)) throw "Target not in this graph mgr!";
377
- if (a == o) return n.isInterGraph = !1, a.add(n, r, i);
378
- if (n.isInterGraph = !0, n.source = r, n.target = i, this.edges.indexOf(n) > -1) throw "Edge already in inter-graph edge list!";
379
- if (this.edges.push(n), !(n.source != null && n.target != null)) throw "Edge source and/or target is null!";
380
- if (!(n.source.edges.indexOf(n) == -1 && n.target.edges.indexOf(n) == -1)) throw "Edge already in source and/or target incidency list!";
381
- return n.source.edges.push(n), n.target.edges.push(n), n;
382
371
  }
372
+ i = n, r = t, n = e;
373
+ var a = r.getOwner(), o = i.getOwner();
374
+ if (a == null || a.getGraphManager() != this) throw "Source not in this graph mgr!";
375
+ if (o == null || o.getGraphManager() != this) throw "Target not in this graph mgr!";
376
+ if (a == o) return n.isInterGraph = !1, a.add(n, r, i);
377
+ if (n.isInterGraph = !0, n.source = r, n.target = i, this.edges.indexOf(n) > -1) throw "Edge already in inter-graph edge list!";
378
+ if (this.edges.push(n), n.source == null || n.target == null) throw "Edge source and/or target is null!";
379
+ if (n.source.edges.indexOf(n) != -1 || n.target.edges.indexOf(n) != -1) throw "Edge already in source and/or target incidency list!";
380
+ return n.source.edges.push(n), n.target.edges.push(n), n;
383
381
  }, a.prototype.remove = function(e) {
384
382
  if (e instanceof r) {
385
383
  var t = e;
@@ -399,10 +397,10 @@ var D = /* @__PURE__ */ t(((e, t) => {
399
397
  } else if (e instanceof i) {
400
398
  if (a = e, a == null) throw "Edge is null!";
401
399
  if (!a.isInterGraph) throw "Not an inter-graph edge!";
402
- if (!(a.source != null && a.target != null)) throw "Source and/or target is null!";
403
- if (!(a.source.edges.indexOf(a) != -1 && a.target.edges.indexOf(a) != -1)) throw "Source and/or target doesn't know this edge!";
400
+ if (a.source == null || a.target == null) throw "Source and/or target is null!";
401
+ if (a.source.edges.indexOf(a) == -1 || a.target.edges.indexOf(a) == -1) throw "Source and/or target doesn't know this edge!";
404
402
  var u = a.source.edges.indexOf(a);
405
- if (a.source.edges.splice(u, 1), u = a.target.edges.indexOf(a), a.target.edges.splice(u, 1), !(a.source.owner != null && a.source.owner.getGraphManager() != null)) throw "Edge owner graph or owner graph manager is null!";
403
+ if (a.source.edges.splice(u, 1), u = a.target.edges.indexOf(a), a.target.edges.splice(u, 1), a.source.owner == null || a.source.owner.getGraphManager() == null) throw "Edge owner graph or owner graph manager is null!";
406
404
  if (a.source.owner.getGraphManager().edges.indexOf(a) == -1) throw "Not in owner graph manager's edge list!";
407
405
  var u = a.source.owner.getGraphManager().edges.indexOf(a);
408
406
  a.source.owner.getGraphManager().edges.splice(u, 1);
@@ -444,7 +442,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
444
442
  }, a.prototype.getLayout = function() {
445
443
  return this.layout;
446
444
  }, a.prototype.isOneAncestorOfOther = function(e, t) {
447
- if (!(e != null && t != null)) throw "assert failed";
445
+ if (e == null || t == null) throw "assert failed";
448
446
  if (e == t) return !0;
449
447
  var n = e.getOwner(), r;
450
448
  do {
@@ -515,7 +513,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
515
513
  var o = a * n[0], s = n[1] / a;
516
514
  n[0] < s ? s = n[0] : o = n[1], n[0] = -1 * i[0] * (s / 2 + r), n[1] = -1 * i[1] * (o / 2 + r);
517
515
  }, i.decideDirectionsForOverlappingNodes = function(e, t, n) {
518
- e.getCenterX() < t.getCenterX() ? n[0] = -1 : n[0] = 1, e.getCenterY() < t.getCenterY() ? n[1] = -1 : n[1] = 1;
516
+ n[0] = e.getCenterX() < t.getCenterX() ? -1 : 1, n[1] = e.getCenterY() < t.getCenterY() ? -1 : 1;
519
517
  }, i.getIntersection2 = function(e, t, n) {
520
518
  var r = e.getCenterX(), i = e.getCenterY(), a = t.getCenterX(), o = t.getCenterY();
521
519
  if (e.intersects(t)) return n[0] = r, n[1] = i, n[2] = a, n[3] = o, !0;
@@ -539,9 +537,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
539
537
  case 3:
540
538
  j = d, A = r + m / D, n[0] = A, n[1] = j;
541
539
  break;
542
- case 4:
543
- A = u, j = i + -p * D, n[0] = A, n[1] = j;
544
- break;
540
+ case 4: A = u, j = i + -p * D, n[0] = A, n[1] = j;
545
541
  }
546
542
  if (!w) switch (k) {
547
543
  case 1:
@@ -553,9 +549,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
553
549
  case 3:
554
550
  N = y, M = a + S / D, n[2] = M, n[3] = N;
555
551
  break;
556
- case 4:
557
- M = v, N = o + -x * D, n[2] = M, n[3] = N;
558
- break;
552
+ case 4: M = v, N = o + -x * D, n[2] = M, n[3] = N;
559
553
  }
560
554
  }
561
555
  return !1;
@@ -578,7 +572,8 @@ var D = /* @__PURE__ */ t(((e, t) => {
578
572
  if (c * c - 4 * s * l >= 0) {
579
573
  var u = (-c + Math.sqrt(c * c - 4 * s * l)) / (2 * s), d = (-c - Math.sqrt(c * c - 4 * s * l)) / (2 * s);
580
574
  return u >= 0 && u <= 1 ? [u] : d >= 0 && d <= 1 ? [d] : null;
581
- } else return null;
575
+ }
576
+ return null;
582
577
  }, i.HALF_PI = .5 * Math.PI, i.ONE_AND_HALF_PI = 1.5 * Math.PI, i.TWO_PI = 2 * Math.PI, i.THREE_PI = 3 * Math.PI, e.exports = i;
583
578
  }),
584
579
  (function(e, t, n) {
@@ -814,7 +809,8 @@ var D = /* @__PURE__ */ t(((e, t) => {
814
809
  if (Array.isArray(e)) {
815
810
  for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
816
811
  return n;
817
- } else return Array.from(e);
812
+ }
813
+ return Array.from(e);
818
814
  }
819
815
  var i = n(0), a = n(7), o = n(3), s = n(1), c = n(6), l = n(5), u = n(17), d = n(29);
820
816
  function f(e) {
@@ -841,8 +837,8 @@ var D = /* @__PURE__ */ t(((e, t) => {
841
837
  return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
842
838
  }, f.prototype.runLayout = function() {
843
839
  this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
844
- var e = this.checkLayoutSuccess() ? !1 : this.layout();
845
- return i.ANIMATE === "during" ? !1 : (e && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, e);
840
+ var e = !this.checkLayoutSuccess() && this.layout();
841
+ return i.ANIMATE !== "during" && (e && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, e);
846
842
  }, f.prototype.doPostLayout = function() {
847
843
  this.incremental || this.transform(), this.update();
848
844
  }, f.prototype.update2 = function() {
@@ -940,10 +936,9 @@ var D = /* @__PURE__ */ t(((e, t) => {
940
936
  i += (o - t) / 50 * (e - 50);
941
937
  }
942
938
  return i;
943
- } else {
944
- var s, c;
945
- return e <= 50 ? (s = 9 * t / 500, c = t / 10) : (s = 9 * t / 50, c = -8 * t), s * e + c;
946
939
  }
940
+ var s, c;
941
+ return e <= 50 ? (s = 9 * t / 500, c = t / 10) : (s = 9 * t / 50, c = -8 * t), s * e + c;
947
942
  }, f.findCenterOfTree = function(e) {
948
943
  var t = [];
949
944
  t = t.concat(e);
@@ -1037,7 +1032,8 @@ var D = /* @__PURE__ */ t(((e, t) => {
1037
1032
  if (Array.isArray(e)) {
1038
1033
  for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
1039
1034
  return n;
1040
- } else return Array.from(e);
1035
+ }
1036
+ return Array.from(e);
1041
1037
  }
1042
1038
  var i = n(15), a = n(4), o = n(0), s = n(8), c = n(9);
1043
1039
  function l() {
@@ -1050,11 +1046,11 @@ var D = /* @__PURE__ */ t(((e, t) => {
1050
1046
  for (var e, t, n, r, i, s, c, l = this.getGraphManager().getAllEdges(), u = 0; u < l.length; u++) e = l[u], t = e.idealLength, e.isInterGraph && (r = e.getSource(), i = e.getTarget(), s = e.getSourceInLca().getEstimatedSize(), c = e.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (e.idealLength += s + c - 2 * o.SIMPLE_NODE_SIZE), n = e.getLca().getInclusionTreeDepth(), e.idealLength += t * a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (r.getInclusionTreeDepth() + i.getInclusionTreeDepth() - 2 * n));
1051
1047
  }, l.prototype.initSpringEmbedder = function() {
1052
1048
  var e = this.getAllNodes().length;
1053
- this.incremental ? (e > a.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * a.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - a.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (e > a.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(a.COOLING_ADAPTATION_FACTOR, 1 - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * (1 - a.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.displacementThresholdPerNode = 3 * a.DEFAULT_EDGE_LENGTH / 100, this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1049
+ this.incremental ? (e > a.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * a.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - a.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (this.coolingFactor = e > a.ADAPTATION_LOWER_NODE_LIMIT ? Math.max(a.COOLING_ADAPTATION_FACTOR, 1 - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * (1 - a.COOLING_ADAPTATION_FACTOR)) : 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.displacementThresholdPerNode = 3 * a.DEFAULT_EDGE_LENGTH / 100, this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1054
1050
  }, l.prototype.calcSpringForces = function() {
1055
1051
  for (var e = this.getAllEdges(), t, n = 0; n < e.length; n++) t = e[n], this.calcSpringForce(t, t.idealLength);
1056
1052
  }, l.prototype.calcRepulsionForces = function() {
1057
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n, r, i, o, s = this.getAllNodes(), c;
1053
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], n, r, i, o, s = this.getAllNodes(), c;
1058
1054
  if (this.useFRGridVariant) for (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && e && this.updateGrid(), c = /* @__PURE__ */ new Set(), n = 0; n < s.length; n++) i = s[n], this.calculateRepulsionForceOfANode(i, c, e, t), c.add(i);
1059
1055
  else for (n = 0; n < s.length; n++) for (i = s[n], r = n + 1; r < s.length; r++) o = s[r], i.getOwner() == o.getOwner() && this.calcRepulsionForce(i, o);
1060
1056
  }, l.prototype.calcGravitationalForces = function() {
@@ -1106,7 +1102,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
1106
1102
  var o = /* @__PURE__ */ new Set();
1107
1103
  e.surrounding = [];
1108
1104
  for (var s, c = this.grid, l = e.startX - 1; l < e.finishX + 2; l++) for (var u = e.startY - 1; u < e.finishY + 2; u++) if (!(l < 0 || u < 0 || l >= c.length || u >= c[0].length)) {
1109
- for (var d = 0; d < c[l][u].length; d++) if (s = c[l][u][d], !(e.getOwner() != s.getOwner() || e == s) && !t.has(s) && !o.has(s)) {
1105
+ for (var d = 0; d < c[l][u].length; d++) if (s = c[l][u][d], e.getOwner() == s.getOwner() && e != s && !t.has(s) && !o.has(s)) {
1110
1106
  var f = Math.abs(e.getCenterX() - s.getCenterX()) - (e.getWidth() / 2 + s.getWidth() / 2), p = Math.abs(e.getCenterY() - s.getCenterY()) - (e.getHeight() / 2 + s.getHeight() / 2);
1111
1107
  f <= this.repulsionRange && p <= this.repulsionRange && o.add(s);
1112
1108
  }
@@ -1475,7 +1471,6 @@ var D = /* @__PURE__ */ t(((e, t) => {
1475
1471
  U++;
1476
1472
  }
1477
1473
  H = 0, E--;
1478
- break;
1479
1474
  }
1480
1475
  }
1481
1476
  return {
@@ -1695,7 +1690,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
1695
1690
  }, x.prototype.newEdge = function(e) {
1696
1691
  return new s(null, null, e);
1697
1692
  }, x.prototype.initParameters = function() {
1698
- r.prototype.initParameters.call(this, arguments), this.isSubLayout || (c.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = c.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = u.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = u.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = u.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1);
1693
+ r.prototype.initParameters.call(this, arguments), this.isSubLayout || (this.idealEdgeLength = c.DEFAULT_EDGE_LENGTH < 10 ? 10 : c.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = u.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = u.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = u.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1);
1699
1694
  }, x.prototype.initSpringEmbedder = function() {
1700
1695
  r.prototype.initSpringEmbedder.call(this), this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / u.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = .04, this.coolingAdjuster = 1;
1701
1696
  }, x.prototype.layout = function() {
@@ -1733,13 +1728,13 @@ var D = /* @__PURE__ */ t(((e, t) => {
1733
1728
  var e = new Set(this.getAllNodes()), t = this.nodesWithGravity.filter(function(t) {
1734
1729
  return e.has(t);
1735
1730
  });
1736
- this.graphManager.setAllNodesToApplyGravitation(t), this.graphManager.updateBounds(), this.updateGrid(), c.PURE_INCREMENTAL ? this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 : this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1731
+ this.graphManager.setAllNodesToApplyGravitation(t), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = c.PURE_INCREMENTAL ? u.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 : u.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1737
1732
  } else this.isTreeGrowing = !1, this.isGrowthFinished = !0;
1738
1733
  this.growTreeIterations++;
1739
1734
  }
1740
1735
  if (this.isGrowthFinished) {
1741
1736
  if (this.isConverged()) return !0;
1742
- this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), c.PURE_INCREMENTAL ? this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100) : this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1737
+ this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = c.PURE_INCREMENTAL ? u.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100) : u.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1743
1738
  }
1744
1739
  var n = !this.isTreeGrowing && !this.isGrowthFinished, r = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
1745
1740
  return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(n, r), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
@@ -2318,7 +2313,8 @@ var D = /* @__PURE__ */ t(((e, t) => {
2318
2313
  if (Array.isArray(e)) {
2319
2314
  for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
2320
2315
  return n;
2321
- } else return Array.from(e);
2316
+ }
2317
+ return Array.from(e);
2322
2318
  }
2323
2319
  var i = n(806), a = n(551).LinkedList, o = n(551).Matrix, s = n(551).SVD;
2324
2320
  function c() {}
@@ -2330,7 +2326,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
2330
2326
  m.getChild() ?? (c.set(m.id, f++), l.push(m.getCenterX()), u.push(m.getCenterY()), n.set(m.id, m));
2331
2327
  }
2332
2328
  t.relativePlacementConstraint && t.relativePlacementConstraint.forEach(function(e) {
2333
- !e.gap && e.gap != 0 && (e.left ? e.gap = i.DEFAULT_EDGE_LENGTH + n.get(e.left).getWidth() / 2 + n.get(e.right).getWidth() / 2 : e.gap = i.DEFAULT_EDGE_LENGTH + n.get(e.top).getHeight() / 2 + n.get(e.bottom).getHeight() / 2);
2329
+ !e.gap && e.gap != 0 && (e.gap = e.left ? i.DEFAULT_EDGE_LENGTH + n.get(e.left).getWidth() / 2 + n.get(e.right).getWidth() / 2 : i.DEFAULT_EDGE_LENGTH + n.get(e.top).getHeight() / 2 + n.get(e.bottom).getHeight() / 2);
2334
2330
  });
2335
2331
  var h = function(e, t) {
2336
2332
  return {
@@ -2374,7 +2370,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
2374
2370
  });
2375
2371
  var f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), m = new a();
2376
2372
  d.forEach(function(e, r) {
2377
- e == 0 ? (m.push(r), n || (t == "horizontal" ? f.set(r, c.has(r) ? l[c.get(r)] : i.get(r)) : f.set(r, c.has(r) ? u[c.get(r)] : i.get(r)))) : f.set(r, -Infinity), n && p.set(r, new Set([r]));
2373
+ e == 0 ? (m.push(r), n || (t == "horizontal" ? f.set(r, c.has(r) ? l[c.get(r)] : i.get(r)) : f.set(r, c.has(r) ? u[c.get(r)] : i.get(r)))) : f.set(r, -Infinity), n && p.set(r, /* @__PURE__ */ new Set([r]));
2378
2374
  }), n && o.forEach(function(e) {
2379
2375
  var r = [];
2380
2376
  if (e.forEach(function(e) {
@@ -2389,7 +2385,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
2389
2385
  } else {
2390
2386
  var o = 0;
2391
2387
  e.forEach(function(e) {
2392
- t == "horizontal" ? o += c.has(e) ? l[c.get(e)] : i.get(e) : o += c.has(e) ? u[c.get(e)] : i.get(e);
2388
+ o += t == "horizontal" ? c.has(e) ? l[c.get(e)] : i.get(e) : c.has(e) ? u[c.get(e)] : i.get(e);
2393
2389
  }), o /= e.length, e.forEach(function(e) {
2394
2390
  f.set(e, o);
2395
2391
  });
@@ -2960,11 +2956,11 @@ var D = /* @__PURE__ */ t(((e, t) => {
2960
2956
  f.id = s.id(), f.idealLength = y(e.idealEdgeLength, s), f.edgeElasticity = y(e.edgeElasticity, s), i += f.idealLength, a++;
2961
2957
  }
2962
2958
  }
2963
- e.idealEdgeLength != null && (a > 0 ? u.DEFAULT_EDGE_LENGTH = l.DEFAULT_EDGE_LENGTH = i / a : v(e.idealEdgeLength) ? u.DEFAULT_EDGE_LENGTH = l.DEFAULT_EDGE_LENGTH = 50 : u.DEFAULT_EDGE_LENGTH = l.DEFAULT_EDGE_LENGTH = e.idealEdgeLength, u.MIN_REPULSION_DIST = l.MIN_REPULSION_DIST = l.DEFAULT_EDGE_LENGTH / 10, u.DEFAULT_RADIAL_SEPARATION = l.DEFAULT_EDGE_LENGTH);
2959
+ e.idealEdgeLength != null && (u.DEFAULT_EDGE_LENGTH = l.DEFAULT_EDGE_LENGTH = a > 0 ? i / a : v(e.idealEdgeLength) ? 50 : e.idealEdgeLength, u.MIN_REPULSION_DIST = l.MIN_REPULSION_DIST = l.DEFAULT_EDGE_LENGTH / 10, u.DEFAULT_RADIAL_SEPARATION = l.DEFAULT_EDGE_LENGTH);
2964
2960
  }, C = function(e, t) {
2965
2961
  t.fixedNodeConstraint && (e.constraints.fixedNodeConstraint = t.fixedNodeConstraint), t.alignmentConstraint && (e.constraints.alignmentConstraint = t.alignmentConstraint), t.relativePlacementConstraint && (e.constraints.relativePlacementConstraint = t.relativePlacementConstraint);
2966
2962
  };
2967
- e.nestingFactor != null && (u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.nestingFactor), e.gravity != null && (u.DEFAULT_GRAVITY_STRENGTH = l.DEFAULT_GRAVITY_STRENGTH = e.gravity), e.numIter != null && (u.MAX_ITERATIONS = l.MAX_ITERATIONS = e.numIter), e.gravityRange != null && (u.DEFAULT_GRAVITY_RANGE_FACTOR = l.DEFAULT_GRAVITY_RANGE_FACTOR = e.gravityRange), e.gravityCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_STRENGTH = l.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.gravityCompound), e.gravityRangeCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.gravityRangeCompound), e.initialEnergyOnIncremental != null && (u.DEFAULT_COOLING_FACTOR_INCREMENTAL = l.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.initialEnergyOnIncremental), e.tilingCompareBy != null && (u.TILING_COMPARE_BY = e.tilingCompareBy), e.quality == "proof" ? c.QUALITY = 2 : c.QUALITY = 0, u.NODE_DIMENSIONS_INCLUDE_LABELS = l.NODE_DIMENSIONS_INCLUDE_LABELS = c.NODE_DIMENSIONS_INCLUDE_LABELS = e.nodeDimensionsIncludeLabels, u.DEFAULT_INCREMENTAL = l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = !e.randomize, u.ANIMATE = l.ANIMATE = c.ANIMATE = e.animate, u.TILE = e.tile, u.TILING_PADDING_VERTICAL = typeof e.tilingPaddingVertical == "function" ? e.tilingPaddingVertical.call() : e.tilingPaddingVertical, u.TILING_PADDING_HORIZONTAL = typeof e.tilingPaddingHorizontal == "function" ? e.tilingPaddingHorizontal.call() : e.tilingPaddingHorizontal, u.DEFAULT_INCREMENTAL = l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = !0, u.PURE_INCREMENTAL = !e.randomize, c.DEFAULT_UNIFORM_LEAF_NODE_SIZES = e.uniformNodeDimensions, e.step == "transformed" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, u.ENFORCE_CONSTRAINTS = !1, u.APPLY_LAYOUT = !1), e.step == "enforced" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !0, u.APPLY_LAYOUT = !1), e.step == "cose" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !1, u.APPLY_LAYOUT = !0), e.step == "all" && (e.randomize ? u.TRANSFORM_ON_CONSTRAINT_HANDLING = !0 : u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !0, u.APPLY_LAYOUT = !0), e.fixedNodeConstraint || e.alignmentConstraint || e.relativePlacementConstraint ? u.TREE_REDUCTION_ON_INCREMENTAL = !1 : u.TREE_REDUCTION_ON_INCREMENTAL = !0;
2963
+ e.nestingFactor != null && (u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.nestingFactor), e.gravity != null && (u.DEFAULT_GRAVITY_STRENGTH = l.DEFAULT_GRAVITY_STRENGTH = e.gravity), e.numIter != null && (u.MAX_ITERATIONS = l.MAX_ITERATIONS = e.numIter), e.gravityRange != null && (u.DEFAULT_GRAVITY_RANGE_FACTOR = l.DEFAULT_GRAVITY_RANGE_FACTOR = e.gravityRange), e.gravityCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_STRENGTH = l.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.gravityCompound), e.gravityRangeCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.gravityRangeCompound), e.initialEnergyOnIncremental != null && (u.DEFAULT_COOLING_FACTOR_INCREMENTAL = l.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.initialEnergyOnIncremental), e.tilingCompareBy != null && (u.TILING_COMPARE_BY = e.tilingCompareBy), c.QUALITY = e.quality == "proof" ? 2 : 0, u.NODE_DIMENSIONS_INCLUDE_LABELS = l.NODE_DIMENSIONS_INCLUDE_LABELS = c.NODE_DIMENSIONS_INCLUDE_LABELS = e.nodeDimensionsIncludeLabels, u.DEFAULT_INCREMENTAL = l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = !e.randomize, u.ANIMATE = l.ANIMATE = c.ANIMATE = e.animate, u.TILE = e.tile, u.TILING_PADDING_VERTICAL = typeof e.tilingPaddingVertical == "function" ? e.tilingPaddingVertical.call() : e.tilingPaddingVertical, u.TILING_PADDING_HORIZONTAL = typeof e.tilingPaddingHorizontal == "function" ? e.tilingPaddingHorizontal.call() : e.tilingPaddingHorizontal, u.DEFAULT_INCREMENTAL = l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = !0, u.PURE_INCREMENTAL = !e.randomize, c.DEFAULT_UNIFORM_LEAF_NODE_SIZES = e.uniformNodeDimensions, e.step == "transformed" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, u.ENFORCE_CONSTRAINTS = !1, u.APPLY_LAYOUT = !1), e.step == "enforced" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !0, u.APPLY_LAYOUT = !1), e.step == "cose" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !1, u.APPLY_LAYOUT = !0), e.step == "all" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !!e.randomize, u.ENFORCE_CONSTRAINTS = !0, u.APPLY_LAYOUT = !0), u.TREE_REDUCTION_ON_INCREMENTAL = !(e.fixedNodeConstraint || e.alignmentConstraint || e.relativePlacementConstraint);
2968
2964
  var w = new i(), T = w.newGraphManager();
2969
2965
  return x(T.addRoot(), r.getTopMostNodes(f), w, e), S(w, T, p), C(w, e), w.runLayout(), _;
2970
2966
  } };
@@ -3179,22 +3175,21 @@ var D = /* @__PURE__ */ t(((e, t) => {
3179
3175
  x: r.x,
3180
3176
  y: r.y
3181
3177
  };
3182
- } else {
3183
- var c = void 0;
3184
- return i.forEach(function(t) {
3185
- var n = t.nodeIndexes.get(e.id());
3186
- n != null && (c = {
3187
- x: t.xCoords[n],
3188
- y: t.yCoords[n]
3189
- });
3190
- }), c ??= {
3191
- x: e.position("x"),
3192
- y: e.position("y")
3193
- }, {
3194
- x: c.x,
3195
- y: c.y
3196
- };
3197
3178
  }
3179
+ var c = void 0;
3180
+ return i.forEach(function(t) {
3181
+ var n = t.nodeIndexes.get(e.id());
3182
+ n != null && (c = {
3183
+ x: t.xCoords[n],
3184
+ y: t.yCoords[n]
3185
+ });
3186
+ }), c ??= {
3187
+ x: e.position("x"),
3188
+ y: e.position("y")
3189
+ }, {
3190
+ x: c.x,
3191
+ y: c.y
3192
+ };
3198
3193
  };
3199
3194
  if (t.quality == "default" || t.quality == "proof" || t.randomize) {
3200
3195
  var j = o.calcParentsWithoutChildren(n, r), M = r.filter(function(e) {
@@ -3340,18 +3335,17 @@ var D = /* @__PURE__ */ t(((e, t) => {
3340
3335
  xCoords: f,
3341
3336
  yCoords: p
3342
3337
  }), U;
3343
- } else {
3344
- var ie = l.keys(), K = t.getElementById(ie.next().value), q = K.position(), J = K.outerWidth();
3345
- if (f.push(q.x), p.push(q.y), y == 2) {
3346
- var Y = t.getElementById(ie.next().value).outerWidth();
3347
- f.push(q.x + J / 2 + Y / 2 + e.idealEdgeLength), p.push(q.y);
3348
- }
3349
- return U = {
3350
- nodeIndexes: l,
3351
- xCoords: f,
3352
- yCoords: p
3353
- }, U;
3354
3338
  }
3339
+ var ie = l.keys(), K = t.getElementById(ie.next().value), q = K.position(), J = K.outerWidth();
3340
+ if (f.push(q.x), p.push(q.y), y == 2) {
3341
+ var Y = t.getElementById(ie.next().value).outerWidth();
3342
+ f.push(q.x + J / 2 + Y / 2 + e.idealEdgeLength), p.push(q.y);
3343
+ }
3344
+ return U = {
3345
+ nodeIndexes: l,
3346
+ xCoords: f,
3347
+ yCoords: p
3348
+ }, U;
3355
3349
  } };
3356
3350
  }),
3357
3351
  579: ((e, t, n) => {
@@ -3421,15 +3415,15 @@ var D = /* @__PURE__ */ t(((e, t) => {
3421
3415
  return e.type === "service";
3422
3416
  }, "isArchitectureService"), ne = /* @__PURE__ */ r(function(e) {
3423
3417
  return e.type === "junction";
3424
- }, "isArchitectureJunction"), re = /* @__PURE__ */ r((e) => e.data(), "edgeData"), U = /* @__PURE__ */ r((e) => e.data(), "nodeData"), W = g.architecture, G = class {
3418
+ }, "isArchitectureJunction"), re = /* @__PURE__ */ r((e) => e.data(), "edgeData"), U = /* @__PURE__ */ r((e) => e.data(), "nodeData"), W = _.architecture, G = class {
3425
3419
  constructor() {
3426
- this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.elements = {}, this.setAccTitle = d, this.getAccTitle = _, this.setDiagramTitle = f, this.getDiagramTitle = c, this.getAccDescription = p, this.setAccDescription = s, this.clear();
3420
+ this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.elements = {}, this.setAccTitle = f, this.getAccTitle = v, this.setDiagramTitle = p, this.getDiagramTitle = l, this.getAccDescription = m, this.setAccDescription = c, this.clear();
3427
3421
  }
3428
3422
  static {
3429
3423
  r(this, "ArchitectureDB");
3430
3424
  }
3431
3425
  clear() {
3432
- this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.dataStructures = void 0, this.elements = {}, m();
3426
+ this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.dataStructures = void 0, this.elements = {}, h();
3433
3427
  }
3434
3428
  addService({ id: e, icon: t, in: n, title: r, iconText: i }) {
3435
3429
  if (this.registeredIds[e] !== void 0) throw Error(`The service id [${e}] is already in use by another ${this.registeredIds[e]}`);
@@ -3566,7 +3560,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
3566
3560
  getConfig() {
3567
3561
  return a({
3568
3562
  ...W,
3569
- ...v().architecture
3563
+ ...y().architecture
3570
3564
  });
3571
3565
  }
3572
3566
  getConfigField(e) {
@@ -3583,7 +3577,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
3583
3577
  }, "populateDb"), K = {
3584
3578
  parser: { yy: void 0 },
3585
3579
  parse: /* @__PURE__ */ r(async (e) => {
3586
- let t = await T("architecture", e);
3580
+ let t = await s("architecture", e);
3587
3581
  n.debug(t);
3588
3582
  let r = K.parser?.yy;
3589
3583
  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.");
@@ -3636,8 +3630,8 @@ var D = /* @__PURE__ */ t(((e, t) => {
3636
3630
  }, ae = /* @__PURE__ */ r(async function(e, t, n) {
3637
3631
  let r = n.getConfigField("padding"), i = n.getConfigField("iconSize"), a = i / 2, s = i / 6, c = s / 2;
3638
3632
  await Promise.all(t.edges().map(async (t) => {
3639
- let { source: i, sourceDir: l, sourceArrow: u, sourceGroup: d, target: f, targetDir: p, targetArrow: m, targetGroup: g, label: _ } = re(t), { x: v, y } = t[0].sourceEndpoint(), { x: b, y: x } = t[0].midpoint(), { x: C, y: w } = t[0].targetEndpoint(), T = r + 4;
3640
- if (d && (F(l) ? v += l === "L" ? -T : T : y += l === "T" ? -T : T + 18), g && (F(p) ? C += p === "L" ? -T : T : w += p === "T" ? -T : T + 18), !d && n.getNode(i)?.type === "junction" && (F(l) ? v += l === "L" ? a : -a : y += l === "T" ? a : -a), !g && n.getNode(f)?.type === "junction" && (F(p) ? C += p === "L" ? a : -a : w += p === "T" ? a : -a), t[0]._private.rscratch) {
3633
+ let { source: i, sourceDir: l, sourceArrow: u, sourceGroup: d, target: f, targetDir: p, targetArrow: m, targetGroup: h, label: _ } = re(t), { x: v, y } = t[0].sourceEndpoint(), { x: b, y: x } = t[0].midpoint(), { x: C, y: w } = t[0].targetEndpoint(), T = r + 4;
3634
+ if (d && (F(l) ? v += l === "L" ? -T : T : y += l === "T" ? -T : T + 18), h && (F(p) ? C += p === "L" ? -T : T : w += p === "T" ? -T : T + 18), !d && n.getNode(i)?.type === "junction" && (F(l) ? v += l === "L" ? a : -a : y += l === "T" ? a : -a), !h && n.getNode(f)?.type === "junction" && (F(p) ? C += p === "L" ? a : -a : w += p === "T" ? a : -a), t[0]._private.rscratch) {
3641
3635
  let t = e.insert("g");
3642
3636
  if (t.insert("path").attr("d", `M ${v},${y} L ${b},${x} L${C},${w} `).attr("class", "edge").attr("id", o(i, f, { prefix: "L" })), u) {
3643
3637
  let e = F(l) ? M[l](v, s) : v - c, n = I(l) ? M[l](y, s) : y - c;
@@ -3655,7 +3649,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
3655
3649
  useHtmlLabels: !1,
3656
3650
  width: n,
3657
3651
  classes: "architecture-service-label"
3658
- }, h()), r.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e === "X") r.attr("transform", "translate(" + b + ", " + x + ")");
3652
+ }, g()), r.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e === "X") r.attr("transform", "translate(" + b + ", " + x + ")");
3659
3653
  else if (e === "Y") r.attr("transform", "translate(" + b + ", " + x + ") rotate(-90)");
3660
3654
  else if (e === "XY") {
3661
3655
  let e = B(l, p);
@@ -3695,13 +3689,13 @@ var D = /* @__PURE__ */ t(((e, t) => {
3695
3689
  useHtmlLabels: !1,
3696
3690
  width: c,
3697
3691
  classes: "architecture-service-label"
3698
- }, h()), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "start").attr("text-anchor", "start"), e.attr("transform", "translate(" + (p + a + 4) + ", " + (m + a + 2) + ")");
3692
+ }, g()), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "start").attr("text-anchor", "start"), e.attr("transform", "translate(" + (p + a + 4) + ", " + (m + a + 2) + ")");
3699
3693
  }
3700
3694
  n.setElementForId(o.id, d);
3701
3695
  }
3702
3696
  }));
3703
3697
  }, "drawGroups"), oe = /* @__PURE__ */ r(async function(e, t, n) {
3704
- let r = h();
3698
+ let r = g();
3705
3699
  for (let i of n) {
3706
3700
  let n = t.append("g"), a = e.getConfigField("iconSize");
3707
3701
  if (i.title) {
@@ -3724,7 +3718,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
3724
3718
  width: a,
3725
3719
  fallbackPrefix: Y.prefix
3726
3720
  })}</g>`);
3727
- let e = o.append("g").append("foreignObject").attr("width", a).attr("height", a).append("div").attr("class", "node-icon-text").attr("style", `height: ${a}px;`).append("div").html(u(i.iconText, r)), t = parseInt(window.getComputedStyle(e.node(), null).getPropertyValue("font-size").replace(/\D/g, "")) ?? 16;
3721
+ let e = o.append("g").append("foreignObject").attr("width", a).attr("height", a).append("div").attr("class", "node-icon-text").attr("style", `height: ${a}px;`).append("div").html(d(i.iconText, r)), t = parseInt(window.getComputedStyle(e.node(), null).getPropertyValue("font-size").replace(/\D/g, "")) ?? 16;
3728
3722
  e.attr("style", `-webkit-line-clamp: ${Math.floor((a - 2) / t)};`);
3729
3723
  } else o.append("path").attr("class", "node-bkg").attr("id", "node-" + i.id).attr("d", `M0,${a} V5 Q0,0 5,0 H${a - 5} Q${a},0 ${a},5 V${a} Z`);
3730
3724
  n.attr("id", `service-${i.id}`).attr("class", "architecture-service");
@@ -3743,7 +3737,7 @@ var D = /* @__PURE__ */ t(((e, t) => {
3743
3737
  x([{
3744
3738
  name: Y.prefix,
3745
3739
  icons: Y
3746
- }]), E.use(k.default);
3740
+ }]), T.use(k.default);
3747
3741
  function se(e, t, n) {
3748
3742
  e.forEach((e) => {
3749
3743
  t.add({
@@ -3897,7 +3891,7 @@ function pe(e, t) {
3897
3891
  r(pe, "getRelativeConstraints");
3898
3892
  function me(e, t, a, o, s, { spatialMaps: c, groupAlignments: l }) {
3899
3893
  return new Promise((u) => {
3900
- let d = i("body").append("div").attr("id", "cy").attr("style", "display:none"), f = E({
3894
+ let d = i("body").append("div").attr("id", "cy").attr("style", "display:none"), f = T({
3901
3895
  container: document.getElementById("cy"),
3902
3896
  style: [
3903
3897
  {
@@ -3991,18 +3985,14 @@ function me(e, t, a, o, s, { spatialMaps: c, groupAlignments: l }) {
3991
3985
  case d >= 0:
3992
3986
  d = 1;
3993
3987
  break;
3994
- case d < 0:
3995
- d = -1;
3996
- break;
3988
+ case d < 0: d = -1;
3997
3989
  }
3998
3990
  let f = (c - o) * (n - o) + (l - s) * (r - s);
3999
3991
  switch (!0) {
4000
3992
  case f >= 0:
4001
3993
  f = 1;
4002
3994
  break;
4003
- case f < 0:
4004
- f = -1;
4005
- break;
3995
+ case f < 0: f = -1;
4006
3996
  }
4007
3997
  return a = Math.abs(a) * d, i *= f, {
4008
3998
  distances: a,
@@ -4030,14 +4020,14 @@ var he = {
4030
4020
  return new G();
4031
4021
  },
4032
4022
  renderer: { draw: /* @__PURE__ */ r(async (e, t, n, r) => {
4033
- let i = r.db, a = i.getServices(), o = i.getJunctions(), s = i.getGroups(), c = i.getEdges(), u = i.getDataStructures(), d = y(t), f = d.append("g");
4023
+ let i = r.db, a = i.getServices(), o = i.getJunctions(), s = i.getGroups(), c = i.getEdges(), l = i.getDataStructures(), d = E(t), f = d.append("g");
4034
4024
  f.attr("class", "architecture-edges");
4035
4025
  let p = d.append("g");
4036
4026
  p.attr("class", "architecture-services");
4037
4027
  let m = d.append("g");
4038
4028
  m.attr("class", "architecture-groups"), await oe(i, p, a), Z(i, p, o);
4039
- let h = await me(a, o, s, c, i, u);
4040
- await ae(f, h, i), await X(m, h, i), le(i, h), l(void 0, d, i.getConfigField("padding"), i.getConfigField("useMaxWidth"));
4029
+ let h = await me(a, o, s, c, i, l);
4030
+ await ae(f, h, i), await X(m, h, i), le(i, h), u(void 0, d, i.getConfigField("padding"), i.getConfigField("useMaxWidth"));
4041
4031
  }, "draw") },
4042
4032
  styles: q
4043
4033
  };