bg-editor 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/_baseUniq-DtZISqda.js +473 -0
  2. package/dist/{arc-CNm23MW7.js → arc-BpOtYBpP.js} +1 -1
  3. package/dist/{architecture-U656AL7Q-Ww8rTIvv.js → architecture-U656AL7Q-BN22wDFh.js} +1 -1
  4. package/dist/{architectureDiagram-VXUJARFQ-DH2EEb-C.js → architectureDiagram-VXUJARFQ-D90AF2uK.js} +3 -3
  5. package/dist/{blockDiagram-VD42YOAC-CPmwRP5b.js → blockDiagram-VD42YOAC-DXQNldkG.js} +5 -5
  6. package/dist/{c4Diagram-YG6GDRKO-Jsc4hIGa.js → c4Diagram-YG6GDRKO-Bl1xCfsC.js} +2 -2
  7. package/dist/{channel-BfuwZbo4.js → channel-BiQYlsVc.js} +1 -1
  8. package/dist/{chunk-4BX2VUAB-4Zvho0Ds.js → chunk-4BX2VUAB-JnvgOgeI.js} +1 -1
  9. package/dist/{chunk-55IACEB6-BmOb908D.js → chunk-55IACEB6-DvzYdqd0.js} +1 -1
  10. package/dist/{chunk-B4BG7PRW-Dx9fTyv9.js → chunk-B4BG7PRW-D2zs0pMT.js} +4 -4
  11. package/dist/{chunk-DI55MBZ5-Dwa8xe-f.js → chunk-DI55MBZ5-IhCs2q12.js} +3 -3
  12. package/dist/{chunk-FMBD7UC4-DBAEvnpB.js → chunk-FMBD7UC4-CI7_2stl.js} +1 -1
  13. package/dist/{chunk-QN33PNHL-BFK0rIbg.js → chunk-QN33PNHL-D3gdmDbi.js} +1 -1
  14. package/dist/{chunk-QZHKN3VN-B5HHmgvT.js → chunk-QZHKN3VN-BaqG_46X.js} +1 -1
  15. package/dist/{chunk-TZMSLE5B-CYLAjMP8.js → chunk-TZMSLE5B-fUTKpgTY.js} +1 -1
  16. package/dist/{classDiagram-v2-WZHVMYZB-CQOOlc6C.js → classDiagram-2ON5EDUG-BbUC7jyd.js} +2 -2
  17. package/dist/{classDiagram-2ON5EDUG-CQOOlc6C.js → classDiagram-v2-WZHVMYZB-BbUC7jyd.js} +2 -2
  18. package/dist/{clone-CF1B7msQ.js → clone-CDwfUPH_.js} +1 -1
  19. package/dist/{cose-bilkent-S5V4N54A-DZx3YOg1.js → cose-bilkent-S5V4N54A-BfRx9IMy.js} +8 -8
  20. package/dist/{dagre-6UL2VRFP-sT9qv2gP.js → dagre-6UL2VRFP-pX_n00Op.js} +116 -117
  21. package/dist/{defaultLocale-C44w2ZBZ.js → defaultLocale-DEnRyJdC.js} +3 -3
  22. package/dist/diagram-PSM6KHXK-CwWsOtmB.js +396 -0
  23. package/dist/{diagram-QEK2KX5R-g5F_w0er.js → diagram-QEK2KX5R-Dxmoi6nm.js} +3 -3
  24. package/dist/{diagram-S2PKOQOG-CRelpUZk.js → diagram-S2PKOQOG-HSYMJfV1.js} +3 -3
  25. package/dist/{erDiagram-Q2GNP2WA-CfWWAKsy.js → erDiagram-Q2GNP2WA-DQP8lHpe.js} +4 -4
  26. package/dist/{flowDiagram-NV44I4VS-DuCCJQ8z.js → flowDiagram-NV44I4VS-Cl_9jtIL.js} +5 -5
  27. package/dist/{ganttDiagram-LVOFAZNH-DKb9FhvV.js → ganttDiagram-LVOFAZNH-CPmFv-yQ.js} +2 -2
  28. package/dist/{gitGraph-F6HP7TQM-Cg_TcdDS.js → gitGraph-F6HP7TQM-80sPVnm_.js} +1 -1
  29. package/dist/{gitGraphDiagram-NY62KEGX-CjO_i2YA.js → gitGraphDiagram-NY62KEGX-B-81Admd.js} +4 -4
  30. package/dist/graph-rMBrFJ2v.js +382 -0
  31. package/dist/index-D5tpgmxE.js +164793 -0
  32. package/dist/{info-NVLQJR56-D-AxJYeF.js → info-NVLQJR56-DBCgZtPg.js} +1 -1
  33. package/dist/{infoDiagram-ER5ION4S-9EH9zF_4.js → infoDiagram-ER5ION4S-CqZmP7Ed.js} +2 -2
  34. package/dist/{journeyDiagram-XKPGCS4Q-BaCrHQBZ.js → journeyDiagram-XKPGCS4Q-Stv9y4h1.js} +4 -4
  35. package/dist/{kanban-definition-3W4ZIXB7-BK9PMHrf.js → kanban-definition-3W4ZIXB7-C5R0pumf.js} +2 -2
  36. package/dist/layout-DHK3CzAK.js +1416 -0
  37. package/dist/{linear-edUYtIiO.js → linear-CD94DoB6.js} +6 -6
  38. package/dist/{mermaid-parser.core-BMy5yPs4.js → mermaid-parser.core-D1WCqkLE.js} +6707 -5486
  39. package/dist/min-CDOTJW1A.js +39 -0
  40. package/dist/{mindmap-definition-VGOIOE7T-bSEDOEZl.js → mindmap-definition-VGOIOE7T-BONuOB6H.js} +11 -11
  41. package/dist/{packet-BFZMPI3H-DHEklZAi.js → packet-BFZMPI3H-ByqiBqYS.js} +1 -1
  42. package/dist/{pie-7BOR55EZ-DDu5Qx9i.js → pie-7BOR55EZ-Bzv7npkH.js} +1 -1
  43. package/dist/{pieDiagram-ADFJNKIX-QEkPDMva.js → pieDiagram-ADFJNKIX-CQ6y-x9k.js} +9 -9
  44. package/dist/{quadrantDiagram-AYHSOK5B-zvs9JNV-.js → quadrantDiagram-AYHSOK5B-C4hTUyLY.js} +2 -2
  45. package/dist/{radar-NHE76QYJ-DEeIs6w7.js → radar-NHE76QYJ-OVSgPUhl.js} +1 -1
  46. package/dist/{requirementDiagram-UZGBJVZJ-PLEQdkam.js → requirementDiagram-UZGBJVZJ-CM3F7AET.js} +3 -3
  47. package/dist/{sankeyDiagram-TZEHDZUN-B9FpEfLk.js → sankeyDiagram-TZEHDZUN-F2yxFEnc.js} +1 -1
  48. package/dist/{sequenceDiagram-WL72ISMW-ClWHIEm8.js → sequenceDiagram-WL72ISMW-CZgiwPgi.js} +3 -3
  49. package/dist/{stateDiagram-FKZM4ZOC-CSNc1r0e.js → stateDiagram-FKZM4ZOC-Bxzbhi-m.js} +4 -4
  50. package/dist/{stateDiagram-v2-4FDKWEC3-BbDtuFwM.js → stateDiagram-v2-4FDKWEC3-DfVPJhMD.js} +2 -2
  51. package/dist/{timeline-definition-IT6M3QCI-Ddq-6bZx.js → timeline-definition-IT6M3QCI-_z700I-W.js} +2 -2
  52. package/dist/{treemap-KMMF4GRG-D3-cXS0o.js → treemap-KMMF4GRG-D5Tr-XRi.js} +1 -1
  53. package/dist/umo-editor.js +1 -1
  54. package/dist/{xychartDiagram-PRI3JC2R-BpMDi10C.js → xychartDiagram-PRI3JC2R-yKhqmxR_.js} +2 -2
  55. package/package.json +6 -1
  56. package/dist/_basePickBy-xii7lYdk.js +0 -152
  57. package/dist/_baseUniq-ltuhkD8D.js +0 -615
  58. package/dist/diagram-PSM6KHXK-CgyZu1Ty.js +0 -533
  59. package/dist/graph-IPeEmdRy.js +0 -248
  60. package/dist/index-DfWUTVm_.js +0 -122164
  61. package/dist/layout-C1dI-ZSJ.js +0 -1336
@@ -1,10 +1,9 @@
1
1
  import "./style.css";
2
- import { _ as w, ar as F, as as Y, at as _, au as H, l as r, c as V, av as z, aw as U, ag as $, al as q, ah as P, af as K, ax as Q, ay as W, az as Z } from "./index-DfWUTVm_.js";
3
- import { G as B } from "./graph-IPeEmdRy.js";
4
- import { l as I } from "./layout-C1dI-ZSJ.js";
5
- import { i as b } from "./_baseUniq-ltuhkD8D.js";
6
- import { c as L } from "./clone-CF1B7msQ.js";
7
- import { m as A } from "./_basePickBy-xii7lYdk.js";
2
+ import { _ as w, ar as F, as as Y, at as _, au as H, l as i, c as V, av as z, aw as U, ag as $, al as q, ah as P, af as K, ax as Q, ay as W, az as Z } from "./index-D5tpgmxE.js";
3
+ import { i as b, G as B } from "./graph-rMBrFJ2v.js";
4
+ import { l as I } from "./layout-DHK3CzAK.js";
5
+ import { c as L } from "./clone-CDwfUPH_.js";
6
+ import { m as A } from "./min-CDOTJW1A.js";
8
7
  function h(e) {
9
8
  var t = {
10
9
  options: {
@@ -19,8 +18,8 @@ function h(e) {
19
18
  }
20
19
  function ee(e) {
21
20
  return A(e.nodes(), function(t) {
22
- var n = e.node(t), a = e.parent(t), i = { v: t };
23
- return b(n) || (i.value = n), b(a) || (i.parent = a), i;
21
+ var n = e.node(t), a = e.parent(t), r = { v: t };
22
+ return b(n) || (r.value = n), b(a) || (r.parent = a), r;
24
23
  });
25
24
  }
26
25
  function ne(e) {
@@ -29,16 +28,16 @@ function ne(e) {
29
28
  return b(t.name) || (a.name = t.name), b(n) || (a.value = n), a;
30
29
  });
31
30
  }
32
- var d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ w(() => {
33
- p.clear(), J.clear(), d.clear();
31
+ var d = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ w(() => {
32
+ y.clear(), J.clear(), d.clear();
34
33
  }, "clear"), D = /* @__PURE__ */ w((e, t) => {
35
- const n = p.get(t) || [];
36
- return r.trace("In isDescendant", t, " ", e, " = ", n.includes(e)), n.includes(e);
34
+ const n = y.get(t) || [];
35
+ return i.trace("In isDescendant", t, " ", e, " = ", n.includes(e)), n.includes(e);
37
36
  }, "isDescendant"), se = /* @__PURE__ */ w((e, t) => {
38
- const n = p.get(t) || [];
39
- return r.info("Descendants of ", t, " is ", n), r.info("Edge is ", e), e.v === t || e.w === t ? !1 : n ? n.includes(e.v) || D(e.v, t) || D(e.w, t) || n.includes(e.w) : (r.debug("Tilt, ", t, ",not in descendants"), !1);
37
+ const n = y.get(t) || [];
38
+ return i.info("Descendants of ", t, " is ", n), i.info("Edge is ", e), e.v === t || e.w === t ? !1 : n ? n.includes(e.v) || D(e.v, t) || D(e.w, t) || n.includes(e.w) : (i.debug("Tilt, ", t, ",not in descendants"), !1);
40
39
  }, "edgeInCluster"), G = /* @__PURE__ */ w((e, t, n, a) => {
41
- r.warn(
40
+ i.warn(
42
41
  "Copying children of ",
43
42
  e,
44
43
  "root",
@@ -47,13 +46,13 @@ var d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), J = /* @__PURE
47
46
  t.node(e),
48
47
  a
49
48
  );
50
- const i = t.children(e) || [];
51
- e !== a && i.push(e), r.warn("Copying (nodes) clusterId", e, "nodes", i), i.forEach((o) => {
49
+ const r = t.children(e) || [];
50
+ e !== a && r.push(e), i.warn("Copying (nodes) clusterId", e, "nodes", r), r.forEach((o) => {
52
51
  if (t.children(o).length > 0)
53
52
  G(o, t, n, a);
54
53
  else {
55
54
  const l = t.node(o);
56
- r.info("cp ", o, " to ", a, " with parent ", e), n.setNode(o, l), a !== t.parent(o) && (r.warn("Setting parent", o, t.parent(o)), n.setParent(o, t.parent(o))), e !== a && o !== e ? (r.debug("Setting parent", o, e), n.setParent(o, e)) : (r.info("In copy ", e, "root", a, "data", t.node(e), a), r.debug(
55
+ i.info("cp ", o, " to ", a, " with parent ", e), n.setNode(o, l), a !== t.parent(o) && (i.warn("Setting parent", o, t.parent(o)), n.setParent(o, t.parent(o))), e !== a && o !== e ? (i.debug("Setting parent", o, e), n.setParent(o, e)) : (i.info("In copy ", e, "root", a, "data", t.node(e), a), i.debug(
57
56
  "Not Setting parent for node=",
58
57
  o,
59
58
  "cluster!==rootId",
@@ -62,12 +61,12 @@ var d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), J = /* @__PURE
62
61
  o !== e
63
62
  ));
64
63
  const u = t.edges(o);
65
- r.debug("Copying Edges", u), u.forEach((c) => {
66
- r.info("Edge", c);
64
+ i.debug("Copying Edges", u), u.forEach((c) => {
65
+ i.info("Edge", c);
67
66
  const m = t.edge(c.v, c.w, c.name);
68
- r.info("Edge data", m, a);
67
+ i.info("Edge data", m, a);
69
68
  try {
70
- se(c, a) ? (r.info("Copying as ", c.v, c.w, m, c.name), n.setEdge(c.v, c.w, m, c.name), r.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]))) : r.info(
69
+ se(c, a) ? (i.info("Copying as ", c.v, c.w, m, c.name), n.setEdge(c.v, c.w, m, c.name), i.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]))) : i.info(
71
70
  "Skipping copy of edge ",
72
71
  c.v,
73
72
  "-->",
@@ -78,64 +77,64 @@ var d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), J = /* @__PURE
78
77
  e
79
78
  );
80
79
  } catch (v) {
81
- r.error(v);
80
+ i.error(v);
82
81
  }
83
82
  });
84
83
  }
85
- r.debug("Removing node", o), t.removeNode(o);
84
+ i.debug("Removing node", o), t.removeNode(o);
86
85
  });
87
86
  }, "copy"), R = /* @__PURE__ */ w((e, t) => {
88
87
  const n = t.children(e);
89
88
  let a = [...n];
90
- for (const i of n)
91
- J.set(i, e), a = [...a, ...R(i, t)];
89
+ for (const r of n)
90
+ J.set(r, e), a = [...a, ...R(r, t)];
92
91
  return a;
93
- }, "extractDescendants"), re = /* @__PURE__ */ w((e, t, n) => {
94
- const a = e.edges().filter((c) => c.v === t || c.w === t), i = e.edges().filter((c) => c.v === n || c.w === n), o = a.map((c) => ({ v: c.v === t ? n : c.v, w: c.w === t ? t : c.w })), l = i.map((c) => ({ v: c.v, w: c.w }));
92
+ }, "extractDescendants"), ie = /* @__PURE__ */ w((e, t, n) => {
93
+ const a = e.edges().filter((c) => c.v === t || c.w === t), r = e.edges().filter((c) => c.v === n || c.w === n), o = a.map((c) => ({ v: c.v === t ? n : c.v, w: c.w === t ? t : c.w })), l = r.map((c) => ({ v: c.v, w: c.w }));
95
94
  return o.filter((c) => l.some((m) => c.v === m.v && c.w === m.w));
96
95
  }, "findCommonEdges"), C = /* @__PURE__ */ w((e, t, n) => {
97
96
  const a = t.children(e);
98
- if (r.trace("Searching children of id ", e, a), a.length < 1)
97
+ if (i.trace("Searching children of id ", e, a), a.length < 1)
99
98
  return e;
100
- let i;
99
+ let r;
101
100
  for (const o of a) {
102
- const l = C(o, t, n), u = re(t, n, l);
101
+ const l = C(o, t, n), u = ie(t, n, l);
103
102
  if (l)
104
103
  if (u.length > 0)
105
- i = l;
104
+ r = l;
106
105
  else
107
106
  return l;
108
107
  }
109
- return i;
110
- }, "findNonClusterChild"), k = /* @__PURE__ */ w((e) => !d.has(e) || !d.get(e).externalConnections ? e : d.has(e) ? d.get(e).id : e, "getAnchorId"), ie = /* @__PURE__ */ w((e, t) => {
108
+ return r;
109
+ }, "findNonClusterChild"), k = /* @__PURE__ */ w((e) => !d.has(e) || !d.get(e).externalConnections ? e : d.has(e) ? d.get(e).id : e, "getAnchorId"), re = /* @__PURE__ */ w((e, t) => {
111
110
  if (!e || t > 10) {
112
- r.debug("Opting out, no graph ");
111
+ i.debug("Opting out, no graph ");
113
112
  return;
114
113
  } else
115
- r.debug("Opting in, graph ");
114
+ i.debug("Opting in, graph ");
116
115
  e.nodes().forEach(function(n) {
117
- e.children(n).length > 0 && (r.warn(
116
+ e.children(n).length > 0 && (i.warn(
118
117
  "Cluster identified",
119
118
  n,
120
119
  " Replacement id in edges: ",
121
120
  C(n, e, n)
122
- ), p.set(n, R(n, e)), d.set(n, { id: C(n, e, n), clusterData: e.node(n) }));
121
+ ), y.set(n, R(n, e)), d.set(n, { id: C(n, e, n), clusterData: e.node(n) }));
123
122
  }), e.nodes().forEach(function(n) {
124
- const a = e.children(n), i = e.edges();
125
- a.length > 0 ? (r.debug("Cluster identified", n, p), i.forEach((o) => {
123
+ const a = e.children(n), r = e.edges();
124
+ a.length > 0 ? (i.debug("Cluster identified", n, y), r.forEach((o) => {
126
125
  const l = D(o.v, n), u = D(o.w, n);
127
- l ^ u && (r.warn("Edge: ", o, " leaves cluster ", n), r.warn("Descendants of XXX ", n, ": ", p.get(n)), d.get(n).externalConnections = !0);
128
- })) : r.debug("Not a cluster ", n, p);
126
+ l ^ u && (i.warn("Edge: ", o, " leaves cluster ", n), i.warn("Descendants of XXX ", n, ": ", y.get(n)), d.get(n).externalConnections = !0);
127
+ })) : i.debug("Not a cluster ", n, y);
129
128
  });
130
129
  for (let n of d.keys()) {
131
- const a = d.get(n).id, i = e.parent(a);
132
- i !== n && d.has(i) && !d.get(i).externalConnections && (d.get(n).id = i);
130
+ const a = d.get(n).id, r = e.parent(a);
131
+ r !== n && d.has(r) && !d.get(r).externalConnections && (d.get(n).id = r);
133
132
  }
134
133
  e.edges().forEach(function(n) {
135
134
  const a = e.edge(n);
136
- r.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), r.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(e.edge(n)));
137
- let i = n.v, o = n.w;
138
- if (r.warn(
135
+ i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(e.edge(n)));
136
+ let r = n.v, o = n.w;
137
+ if (i.warn(
139
138
  "Fix XXX",
140
139
  d,
141
140
  "ids:",
@@ -146,53 +145,53 @@ var d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), J = /* @__PURE
146
145
  " --- ",
147
146
  d.get(n.w)
148
147
  ), d.get(n.v) || d.get(n.w)) {
149
- if (r.warn("Fixing and trying - removing XXX", n.v, n.w, n.name), i = k(n.v), o = k(n.w), e.removeEdge(n.v, n.w, n.name), i !== n.v) {
150
- const l = e.parent(i);
148
+ if (i.warn("Fixing and trying - removing XXX", n.v, n.w, n.name), r = k(n.v), o = k(n.w), e.removeEdge(n.v, n.w, n.name), r !== n.v) {
149
+ const l = e.parent(r);
151
150
  d.get(l).externalConnections = !0, a.fromCluster = n.v;
152
151
  }
153
152
  if (o !== n.w) {
154
153
  const l = e.parent(o);
155
154
  d.get(l).externalConnections = !0, a.toCluster = n.w;
156
155
  }
157
- r.warn("Fix Replacing with XXX", i, o, n.name), e.setEdge(i, o, a, n.name);
156
+ i.warn("Fix Replacing with XXX", r, o, n.name), e.setEdge(r, o, a, n.name);
158
157
  }
159
- }), r.warn("Adjusted Graph", h(e)), T(e, 0), r.trace(d);
158
+ }), i.warn("Adjusted Graph", h(e)), T(e, 0), i.trace(d);
160
159
  }, "adjustClustersAndEdges"), T = /* @__PURE__ */ w((e, t) => {
161
- if (r.warn("extractor - ", t, h(e), e.children("D")), t > 10) {
162
- r.error("Bailing out");
160
+ if (i.warn("extractor - ", t, h(e), e.children("D")), t > 10) {
161
+ i.error("Bailing out");
163
162
  return;
164
163
  }
165
164
  let n = e.nodes(), a = !1;
166
- for (const i of n) {
167
- const o = e.children(i);
165
+ for (const r of n) {
166
+ const o = e.children(r);
168
167
  a = a || o.length > 0;
169
168
  }
170
169
  if (!a) {
171
- r.debug("Done, no node has children", e.nodes());
170
+ i.debug("Done, no node has children", e.nodes());
172
171
  return;
173
172
  }
174
- r.debug("Nodes = ", n, t);
175
- for (const i of n)
176
- if (r.debug(
173
+ i.debug("Nodes = ", n, t);
174
+ for (const r of n)
175
+ if (i.debug(
177
176
  "Extracting node",
178
- i,
177
+ r,
179
178
  d,
180
- d.has(i) && !d.get(i).externalConnections,
181
- !e.parent(i),
182
- e.node(i),
179
+ d.has(r) && !d.get(r).externalConnections,
180
+ !e.parent(r),
181
+ e.node(r),
183
182
  e.children("D"),
184
183
  " Depth ",
185
184
  t
186
- ), !d.has(i))
187
- r.debug("Not a cluster", i, t);
188
- else if (!d.get(i).externalConnections && e.children(i) && e.children(i).length > 0) {
189
- r.warn(
185
+ ), !d.has(r))
186
+ i.debug("Not a cluster", r, t);
187
+ else if (!d.get(r).externalConnections && e.children(r) && e.children(r).length > 0) {
188
+ i.warn(
190
189
  "Cluster without external connections, without a parent and with children",
191
- i,
190
+ r,
192
191
  t
193
192
  );
194
193
  let l = e.graph().rankdir === "TB" ? "LR" : "TB";
195
- d.get(i)?.clusterData?.dir && (l = d.get(i).clusterData.dir, r.warn("Fixing dir", d.get(i).clusterData.dir, l));
194
+ d.get(r)?.clusterData?.dir && (l = d.get(r).clusterData.dir, i.warn("Fixing dir", d.get(r).clusterData.dir, l));
196
195
  const u = new B({
197
196
  multigraph: !0,
198
197
  compound: !0
@@ -205,52 +204,52 @@ var d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), J = /* @__PURE
205
204
  }).setDefaultEdgeLabel(function() {
206
205
  return {};
207
206
  });
208
- r.warn("Old graph before copy", h(e)), G(i, e, u, i), e.setNode(i, {
207
+ i.warn("Old graph before copy", h(e)), G(r, e, u, r), e.setNode(r, {
209
208
  clusterNode: !0,
210
- id: i,
211
- clusterData: d.get(i).clusterData,
212
- label: d.get(i).label,
209
+ id: r,
210
+ clusterData: d.get(r).clusterData,
211
+ label: d.get(r).label,
213
212
  graph: u
214
- }), r.warn("New graph after copy node: (", i, ")", h(u)), r.debug("Old graph after copy", h(e));
213
+ }), i.warn("New graph after copy node: (", r, ")", h(u)), i.debug("Old graph after copy", h(e));
215
214
  } else
216
- r.warn(
215
+ i.warn(
217
216
  "Cluster ** ",
218
- i,
217
+ r,
219
218
  " **not meeting the criteria !externalConnections:",
220
- !d.get(i).externalConnections,
219
+ !d.get(r).externalConnections,
221
220
  " no parent: ",
222
- !e.parent(i),
221
+ !e.parent(r),
223
222
  " children ",
224
- e.children(i) && e.children(i).length > 0,
223
+ e.children(r) && e.children(r).length > 0,
225
224
  e.children("D"),
226
225
  t
227
- ), r.debug(d);
228
- n = e.nodes(), r.warn("New list of nodes", n);
229
- for (const i of n) {
230
- const o = e.node(i);
231
- r.warn(" Now next level", i, o), o?.clusterNode && T(o.graph, t + 1);
226
+ ), i.debug(d);
227
+ n = e.nodes(), i.warn("New list of nodes", n);
228
+ for (const r of n) {
229
+ const o = e.node(r);
230
+ i.warn(" Now next level", r, o), o?.clusterNode && T(o.graph, t + 1);
232
231
  }
233
232
  }, "extractor"), M = /* @__PURE__ */ w((e, t) => {
234
233
  if (t.length === 0)
235
234
  return [];
236
235
  let n = Object.assign([], t);
237
236
  return t.forEach((a) => {
238
- const i = e.children(a), o = M(e, i);
237
+ const r = e.children(a), o = M(e, r);
239
238
  n = [...n, ...o];
240
239
  }), n;
241
- }, "sorter"), oe = /* @__PURE__ */ w((e) => M(e, e.children()), "sortNodesByHierarchy"), j = /* @__PURE__ */ w(async (e, t, n, a, i, o) => {
242
- r.warn("Graph in recursive render:XAX", h(t), i);
240
+ }, "sorter"), oe = /* @__PURE__ */ w((e) => M(e, e.children()), "sortNodesByHierarchy"), j = /* @__PURE__ */ w(async (e, t, n, a, r, o) => {
241
+ i.warn("Graph in recursive render:XAX", h(t), r);
243
242
  const l = t.graph().rankdir;
244
- r.trace("Dir in recursive render - dir:", l);
243
+ i.trace("Dir in recursive render - dir:", l);
245
244
  const u = e.insert("g").attr("class", "root");
246
- t.nodes() ? r.info("Recursive render XXX", t.nodes()) : r.info("No nodes found for", t), t.edges().length > 0 && r.info("Recursive edges", t.edge(t.edges()[0]));
245
+ t.nodes() ? i.info("Recursive render XXX", t.nodes()) : i.info("No nodes found for", t), t.edges().length > 0 && i.info("Recursive edges", t.edge(t.edges()[0]));
247
246
  const c = u.insert("g").attr("class", "clusters"), m = u.insert("g").attr("class", "edgePaths"), v = u.insert("g").attr("class", "edgeLabels"), X = u.insert("g").attr("class", "nodes");
248
247
  await Promise.all(
249
248
  t.nodes().map(async function(f) {
250
249
  const s = t.node(f);
251
- if (i !== void 0) {
252
- const g = JSON.parse(JSON.stringify(i.clusterData));
253
- r.trace(
250
+ if (r !== void 0) {
251
+ const g = JSON.parse(JSON.stringify(r.clusterData));
252
+ i.trace(
254
253
  `Setting data for parent cluster XXX
255
254
  Node.id = `,
256
255
  f,
@@ -259,11 +258,11 @@ var d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), J = /* @__PURE
259
258
  g.height,
260
259
  `
261
260
  Parent cluster`,
262
- i.height
263
- ), t.setNode(i.id, g), t.parent(f) || (r.trace("Setting parent", f, i.id), t.setParent(f, i.id, g));
261
+ r.height
262
+ ), t.setNode(r.id, g), t.parent(f) || (i.trace("Setting parent", f, r.id), t.setParent(f, r.id, g));
264
263
  }
265
- if (r.info("(Insert) Node XXX" + f + ": " + JSON.stringify(t.node(f))), s?.clusterNode) {
266
- r.info("Cluster identified XBX", f, s.width, t.node(f));
264
+ if (i.info("(Insert) Node XXX" + f + ": " + JSON.stringify(t.node(f))), s?.clusterNode) {
265
+ i.info("Cluster identified XBX", f, s.width, t.node(f));
267
266
  const { ranksep: g, nodesep: E } = t.graph();
268
267
  s.graph.setGraph({
269
268
  ...s.graph.graph(),
@@ -278,7 +277,7 @@ Parent cluster`,
278
277
  t.node(f),
279
278
  o
280
279
  ), x = N.elem;
281
- z(s, x), s.diff = N.diff || 0, r.info(
280
+ z(s, x), s.diff = N.diff || 0, i.info(
282
281
  "New compound node after recursive render XAX",
283
282
  f,
284
283
  "width",
@@ -290,7 +289,7 @@ Parent cluster`,
290
289
  // node.y
291
290
  ), U(x, s);
292
291
  } else
293
- t.children(f).length > 0 ? (r.trace(
292
+ t.children(f).length > 0 ? (i.trace(
294
293
  "Cluster - the non recursive path XBX",
295
294
  f,
296
295
  s.id,
@@ -298,12 +297,12 @@ Parent cluster`,
298
297
  s.width,
299
298
  "Graph:",
300
299
  t
301
- ), r.trace(C(s.id, t)), d.set(s.id, { id: C(s.id, t), node: s })) : (r.trace("Node - the non recursive path XAX", f, X, t.node(f), l), await $(X, t.node(f), { config: o, dir: l }));
300
+ ), i.trace(C(s.id, t)), d.set(s.id, { id: C(s.id, t), node: s })) : (i.trace("Node - the non recursive path XAX", f, X, t.node(f), l), await $(X, t.node(f), { config: o, dir: l }));
302
301
  })
303
302
  ), await (/* @__PURE__ */ w(async () => {
304
303
  const f = t.edges().map(async function(s) {
305
304
  const g = t.edge(s.v, s.w, s.name);
306
- r.info("Edge " + s.v + " -> " + s.w + ": " + JSON.stringify(s)), r.info("Edge " + s.v + " -> " + s.w + ": ", s, " ", JSON.stringify(t.edge(s))), r.info(
305
+ i.info("Edge " + s.v + " -> " + s.w + ": " + JSON.stringify(s)), i.info("Edge " + s.v + " -> " + s.w + ": ", s, " ", JSON.stringify(t.edge(s))), i.info(
307
306
  "Fix",
308
307
  d,
309
308
  "ids:",
@@ -315,12 +314,12 @@ Parent cluster`,
315
314
  ), await Z(v, g);
316
315
  });
317
316
  await Promise.all(f);
318
- }, "processEdges"))(), r.info("Graph before layout:", JSON.stringify(h(t))), r.info("############################################# XXX"), r.info("### Layout ### XXX"), r.info("############################################# XXX"), I(t), r.info("Graph after layout:", JSON.stringify(h(t)));
317
+ }, "processEdges"))(), i.info("Graph before layout:", JSON.stringify(h(t))), i.info("############################################# XXX"), i.info("### Layout ### XXX"), i.info("############################################# XXX"), I(t), i.info("Graph after layout:", JSON.stringify(h(t)));
319
318
  let O = 0, { subGraphTitleTotalMargin: S } = q(o);
320
319
  return await Promise.all(
321
320
  oe(t).map(async function(f) {
322
321
  const s = t.node(f);
323
- if (r.info(
322
+ if (i.info(
324
323
  "Position XBX => " + f + ": (" + s.x,
325
324
  "," + s.y,
326
325
  ") width: ",
@@ -328,7 +327,7 @@ Parent cluster`,
328
327
  " height: ",
329
328
  s.height
330
329
  ), s?.clusterNode)
331
- s.y += S, r.info(
330
+ s.y += S, i.info(
332
331
  "A tainted cluster node XBX1",
333
332
  f,
334
333
  s.id,
@@ -339,7 +338,7 @@ Parent cluster`,
339
338
  t.parent(f)
340
339
  ), d.get(s.id).node = s, P(s);
341
340
  else if (t.children(f).length > 0) {
342
- r.info(
341
+ i.info(
343
342
  "A pure cluster node XBX1",
344
343
  f,
345
344
  s.id,
@@ -350,10 +349,10 @@ Parent cluster`,
350
349
  t.parent(f)
351
350
  ), s.height += S, t.node(s.parentId);
352
351
  const g = s?.padding / 2 || 0, E = s?.labelBBox?.height || 0, N = E - g || 0;
353
- r.debug("OffsetY", N, "labelHeight", E, "halfPadding", g), await K(c, s), d.get(s.id).node = s;
352
+ i.debug("OffsetY", N, "labelHeight", E, "halfPadding", g), await K(c, s), d.get(s.id).node = s;
354
353
  } else {
355
354
  const g = t.node(s.parentId);
356
- s.y += S / 2, r.info(
355
+ s.y += S / 2, i.info(
357
356
  "A regular node XBX1 - using the padding",
358
357
  s.id,
359
358
  "parent",
@@ -373,16 +372,16 @@ Parent cluster`,
373
372
  })
374
373
  ), t.edges().forEach(function(f) {
375
374
  const s = t.edge(f);
376
- r.info("Edge " + f.v + " -> " + f.w + ": " + JSON.stringify(s), s), s.points.forEach((x) => x.y += S / 2);
375
+ i.info("Edge " + f.v + " -> " + f.w + ": " + JSON.stringify(s), s), s.points.forEach((x) => x.y += S / 2);
377
376
  const g = t.node(f.v);
378
377
  var E = t.node(f.w);
379
378
  const N = Q(m, s, d, n, g, E, a);
380
379
  W(s, N);
381
380
  }), t.nodes().forEach(function(f) {
382
381
  const s = t.node(f);
383
- r.info(f, s.type, s.diff), s.isGroup && (O = s.diff);
384
- }), r.warn("Returning from recursive render XAX", u, O), { elem: u, diff: O };
385
- }, "recursiveRender"), we = /* @__PURE__ */ w(async (e, t) => {
382
+ i.info(f, s.type, s.diff), s.isGroup && (O = s.diff);
383
+ }), i.warn("Returning from recursive render XAX", u, O), { elem: u, diff: O };
384
+ }, "recursiveRender"), ge = /* @__PURE__ */ w(async (e, t) => {
386
385
  const n = new B({
387
386
  multigraph: !0,
388
387
  compound: !0
@@ -397,7 +396,7 @@ Parent cluster`,
397
396
  }), a = t.select("g");
398
397
  F(a, e.markers, e.type, e.diagramId), Y(), _(), H(), te(), e.nodes.forEach((o) => {
399
398
  n.setNode(o.id, { ...o }), o.parentId && n.setParent(o.id, o.parentId);
400
- }), r.debug("Edges:", e.edges), e.edges.forEach((o) => {
399
+ }), i.debug("Edges:", e.edges), e.edges.forEach((o) => {
401
400
  if (o.start === o.end) {
402
401
  const l = o.start, u = l + "---" + l + "---1", c = l + "---" + l + "---2", m = n.node(l);
403
402
  n.setNode(u, {
@@ -425,21 +424,21 @@ Parent cluster`,
425
424
  width: 10,
426
425
  height: 10
427
426
  }), n.setParent(c, m.parentId);
428
- const v = structuredClone(o), X = structuredClone(o), y = structuredClone(o);
429
- v.label = "", v.arrowTypeEnd = "none", v.id = l + "-cyclic-special-1", X.arrowTypeStart = "none", X.arrowTypeEnd = "none", X.id = l + "-cyclic-special-mid", y.label = "", m.isGroup && (v.fromCluster = l, y.toCluster = l), y.id = l + "-cyclic-special-2", y.arrowTypeStart = "none", n.setEdge(l, u, v, l + "-cyclic-special-0"), n.setEdge(u, c, X, l + "-cyclic-special-1"), n.setEdge(c, l, y, l + "-cyc<lic-special-2");
427
+ const v = structuredClone(o), X = structuredClone(o), p = structuredClone(o);
428
+ v.label = "", v.arrowTypeEnd = "none", v.id = l + "-cyclic-special-1", X.arrowTypeStart = "none", X.arrowTypeEnd = "none", X.id = l + "-cyclic-special-mid", p.label = "", m.isGroup && (v.fromCluster = l, p.toCluster = l), p.id = l + "-cyclic-special-2", p.arrowTypeStart = "none", n.setEdge(l, u, v, l + "-cyclic-special-0"), n.setEdge(u, c, X, l + "-cyclic-special-1"), n.setEdge(c, l, p, l + "-cyc<lic-special-2");
430
429
  } else
431
430
  n.setEdge(o.start, o.end, { ...o }, o.id);
432
- }), r.warn("Graph at first:", JSON.stringify(h(n))), ie(n), r.warn("Graph after XAX:", JSON.stringify(h(n)));
433
- const i = V();
431
+ }), i.warn("Graph at first:", JSON.stringify(h(n))), re(n), i.warn("Graph after XAX:", JSON.stringify(h(n)));
432
+ const r = V();
434
433
  await j(
435
434
  a,
436
435
  n,
437
436
  e.type,
438
437
  e.diagramId,
439
438
  void 0,
440
- i
439
+ r
441
440
  );
442
441
  }, "render");
443
442
  export {
444
- we as render
443
+ ge as render
445
444
  };
@@ -165,8 +165,8 @@ function rn(n) {
165
165
  return A = v(n), nn = A.format, tn = A.formatPrefix, A;
166
166
  }
167
167
  export {
168
- tn as a,
169
- nn as b,
168
+ N as a,
169
+ tn as b,
170
170
  J as e,
171
- N as f
171
+ nn as f
172
172
  };