@ucap-llm/ai-ui 1.1.13 → 1.1.15

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 (111) hide show
  1. package/_basePickBy-DMehTBs0-8955b30b.mjs +151 -0
  2. package/_basePickBy-e7598e72.mjs +153 -0
  3. package/{_baseUniq-2bcae05e.mjs → _baseUniq-8cd7fbc4.mjs} +150 -150
  4. package/_baseUniq-DPnX6tpB-5eb6efbd.mjs +615 -0
  5. package/ai-ui.es.js +9 -8
  6. package/ai-ui.umd.js +3425 -923
  7. package/arc-8909f880.mjs +85 -0
  8. package/arc-qimaJRLH-591a6072.mjs +85 -0
  9. package/architecture-4AB2E3PP-DFmEpUnA-62fe65dd.mjs +10 -0
  10. package/architecture-4AB2E3PP-b04ae9dd.mjs +10 -0
  11. package/{architectureDiagram-IEHRJDOE-e4684ef3.mjs → architectureDiagram-IEHRJDOE-1ccc2c64.mjs} +123 -123
  12. package/architectureDiagram-IEHRJDOE-BRVAVUEE-c068faae.mjs +4641 -0
  13. package/{blockDiagram-JOT3LUYC-504ee31e.mjs → blockDiagram-JOT3LUYC-63569de5.mjs} +5 -5
  14. package/blockDiagram-JOT3LUYC-Cs4tSRey-54d8e29b.mjs +2251 -0
  15. package/{c4Diagram-VJAJSXHY-c5ba6af4.mjs → c4Diagram-VJAJSXHY-355a4170.mjs} +23 -23
  16. package/c4Diagram-VJAJSXHY-C3F9fO0L-0df97cd8.mjs +1583 -0
  17. package/channel-CuHzivgY-bb3d765a.mjs +5 -0
  18. package/channel-a1f4f18c.mjs +5 -0
  19. package/{chunk-4BMEZGHF-8d9a2e4f.mjs → chunk-4BMEZGHF-705995af.mjs} +1 -1
  20. package/chunk-4BMEZGHF-btTOjzEX-c9c5432c.mjs +9 -0
  21. package/{chunk-A2AXSNBT-41ae29f2.mjs → chunk-A2AXSNBT-3a857566.mjs} +10 -10
  22. package/chunk-A2AXSNBT-CPBZRsS7-a80df701.mjs +1373 -0
  23. package/{chunk-AEK57VVT-69e121d6.mjs → chunk-AEK57VVT-6c60e1ee.mjs} +45 -45
  24. package/chunk-AEK57VVT-D62Iwyam-238a3d85.mjs +1361 -0
  25. package/{chunk-D6G4REZN-472adc5b.mjs → chunk-D6G4REZN-11c52918.mjs} +5 -5
  26. package/chunk-D6G4REZN-HlFmQTJy-20704636.mjs +64 -0
  27. package/chunk-RZ5BOZE2-DIFgOqDt-495bec03.mjs +24 -0
  28. package/{chunk-RZ5BOZE2-b7d5d4f5.mjs → chunk-RZ5BOZE2-d6db8103.mjs} +9 -9
  29. package/chunk-XZIHB7SX-CCrbsG0u-f30e4124.mjs +15 -0
  30. package/{chunk-XZIHB7SX-56c08d07.mjs → chunk-XZIHB7SX-fafd3ca2.mjs} +1 -1
  31. package/classDiagram-GIVACNV2-Bv5U0XPL-622b22ed.mjs +18 -0
  32. package/{classDiagram-v2-COTLJTTW-1deea5cc.mjs → classDiagram-GIVACNV2-eca9aeb6.mjs} +5 -5
  33. package/classDiagram-v2-COTLJTTW-Bv5U0XPL-622b22ed.mjs +18 -0
  34. package/{classDiagram-GIVACNV2-1deea5cc.mjs → classDiagram-v2-COTLJTTW-eca9aeb6.mjs} +5 -5
  35. package/{clone-1f18a17f.mjs → clone-327a1426.mjs} +1 -1
  36. package/clone-Csc9uFbU-6c4f28bd.mjs +8 -0
  37. package/cytoscape.esm-Swd9B-1A-3101f241.mjs +18730 -0
  38. package/{dagre-OKDRZEBW-74e73dcf.mjs → dagre-OKDRZEBW-9059bb36.mjs} +81 -81
  39. package/dagre-OKDRZEBW-CoMQYlxF-96274fb0.mjs +448 -0
  40. package/{diagram-SSKATNLV-1a562cb0.mjs → diagram-SSKATNLV-70f68e72.mjs} +34 -34
  41. package/diagram-SSKATNLV-CPuZUaGP-50edcaa0.mjs +225 -0
  42. package/{diagram-VNBRO52H-b765e46f.mjs → diagram-VNBRO52H-39273710.mjs} +35 -35
  43. package/diagram-VNBRO52H-DIIZ-Sll-969266e6.mjs +130 -0
  44. package/{erDiagram-Q7BY3M3F-022c4343.mjs → erDiagram-Q7BY3M3F-96ba3906.mjs} +3 -3
  45. package/erDiagram-Q7BY3M3F-ZKWAM_uE-41c0350d.mjs +843 -0
  46. package/{flowDiagram-4HSFHLVR-6036e284.mjs → flowDiagram-4HSFHLVR-795e3830.mjs} +29 -29
  47. package/flowDiagram-4HSFHLVR-CUJXGEG3-801dde13.mjs +1624 -0
  48. package/{ganttDiagram-APWFNJXF-be871387.mjs → ganttDiagram-APWFNJXF-736e67b6.mjs} +398 -398
  49. package/ganttDiagram-APWFNJXF-C1pgubbs-20beffc3.mjs +2527 -0
  50. package/gitGraph-O2Q2CXLX-00465db9.mjs +10 -0
  51. package/gitGraph-O2Q2CXLX-BYavwGzs-e5f1990e.mjs +10 -0
  52. package/{gitGraphDiagram-7IBYFJ6S-da63c888.mjs → gitGraphDiagram-7IBYFJ6S-115329ab.mjs} +88 -88
  53. package/gitGraphDiagram-7IBYFJ6S-CndxirR4-b39d4089.mjs +716 -0
  54. package/{graph-e71f0e3e.mjs → graph-9e073c5f.mjs} +8 -8
  55. package/graph-DOmtxVvg-727f4e14.mjs +247 -0
  56. package/index-433e2395.mjs +168385 -0
  57. package/info-4N47QTOZ-688db415.mjs +10 -0
  58. package/info-4N47QTOZ-DPyDFN1Z-821cf2f7.mjs +10 -0
  59. package/{infoDiagram-PH2N3AL5-3e1c1c1f.mjs → infoDiagram-PH2N3AL5-29e9585a.mjs} +9 -9
  60. package/infoDiagram-PH2N3AL5-BkSS3vpU-ef4bf66d.mjs +26 -0
  61. package/init-DjUOC4st-87c930f1.mjs +16 -0
  62. package/{journeyDiagram-U35MCT3I-6d29748d.mjs → journeyDiagram-U35MCT3I-7c5644d1.mjs} +41 -41
  63. package/journeyDiagram-U35MCT3I-BN-kCDeJ-ac350902.mjs +811 -0
  64. package/{kanban-definition-NDS4AKOZ-c231ae4c.mjs → kanban-definition-NDS4AKOZ-eff441f9.mjs} +47 -47
  65. package/kanban-definition-NDS4AKOZ-gaDUOiKt-efdba942.mjs +720 -0
  66. package/{layout-b9b9e407.mjs → layout-501d22f0.mjs} +19 -19
  67. package/layout-8X5HiOVA-b6e13cf9.mjs +1323 -0
  68. package/linear-BgV5F0PU-8137edad.mjs +447 -0
  69. package/{linear-99040ddc.mjs → linear-fd3cd932.mjs} +56 -56
  70. package/{mermaid-parser.core-55f134dc.mjs → mermaid-parser.core-6eb44241.mjs} +160 -160
  71. package/mermaid-parser.core-BTS3sfcL-8c80284a.mjs +12810 -0
  72. package/{mindmap-definition-ALO5MXBD-938e2e65.mjs → mindmap-definition-ALO5MXBD-2fe3c748.mjs} +1 -1
  73. package/mindmap-definition-ALO5MXBD-B8q_1sIj-c3599d3c.mjs +3225 -0
  74. package/ordinal-DfAQgscy-1c8e46a9.mjs +65 -0
  75. package/package.json +2 -2
  76. package/packet-KVYON367-DcfdOX-U-afac932a.mjs +10 -0
  77. package/packet-KVYON367-c82af3fe.mjs +10 -0
  78. package/pie-R6RNRRYF-DKruFncB-d07f60c2.mjs +10 -0
  79. package/pie-R6RNRRYF-eb27797b.mjs +10 -0
  80. package/pieDiagram-IB7DONF6-Bijui6_Q-db9fdf3a.mjs +166 -0
  81. package/{pieDiagram-IB7DONF6-6a11673b.mjs → pieDiagram-IB7DONF6-e6863984.mjs} +36 -36
  82. package/{quadrantDiagram-7GDLP6J5-a4a4d9ac.mjs → quadrantDiagram-7GDLP6J5-88df12c2.mjs} +15 -15
  83. package/quadrantDiagram-7GDLP6J5-DzIzViUj-b13add98.mjs +1027 -0
  84. package/radar-MK3ICKWK-723229d0.mjs +10 -0
  85. package/radar-MK3ICKWK-D8wbkmr5-3165faf6.mjs +10 -0
  86. package/{requirementDiagram-KVF5MWMF-a7093c74.mjs → requirementDiagram-KVF5MWMF-7228051c.mjs} +50 -50
  87. package/requirementDiagram-KVF5MWMF-Hqsbdpfq-23374f24.mjs +853 -0
  88. package/{sankeyDiagram-QLVOVGJD-f4bcbb2d.mjs → sankeyDiagram-QLVOVGJD-00a31a99.mjs} +87 -87
  89. package/sankeyDiagram-QLVOVGJD-DGCeusqJ-8ca7e64d.mjs +826 -0
  90. package/{sequenceDiagram-X6HHIX6F-9071cfff.mjs → sequenceDiagram-X6HHIX6F-de203309.mjs} +3 -3
  91. package/sequenceDiagram-X6HHIX6F-kuEE9wSd-5f0ec5cd.mjs +2283 -0
  92. package/{stateDiagram-DGXRK772-fb22a7a5.mjs → stateDiagram-DGXRK772-2341237a.mjs} +48 -48
  93. package/stateDiagram-DGXRK772-Cq-Ce3WP-266efa7f.mjs +274 -0
  94. package/{stateDiagram-v2-YXO3MK2T-67326b76.mjs → stateDiagram-v2-YXO3MK2T-8c81deed.mjs} +5 -5
  95. package/stateDiagram-v2-YXO3MK2T-CplwFWn1-c0024e4e.mjs +18 -0
  96. package/style.css +10 -1
  97. package/timeline-definition-BDJGKUSR-USv5sZzx-22548912.mjs +806 -0
  98. package/{timeline-definition-BDJGKUSR-44f50d45.mjs → timeline-definition-BDJGKUSR-e615901b.mjs} +79 -79
  99. package/{xychartDiagram-VJFVF3MP-2df503f6.mjs → xychartDiagram-VJFVF3MP-9ad66a6b.mjs} +28 -28
  100. package/xychartDiagram-VJFVF3MP-CXCfFZBM-e5ca151e.mjs +1306 -0
  101. package/_basePickBy-12958109.mjs +0 -153
  102. package/arc-14f9a207.mjs +0 -85
  103. package/architecture-4AB2E3PP-bb512ddb.mjs +0 -10
  104. package/channel-7bd711b4.mjs +0 -5
  105. package/gitGraph-O2Q2CXLX-83cfcbef.mjs +0 -10
  106. package/index-f83d4b07.mjs +0 -97448
  107. package/info-4N47QTOZ-20cf90f5.mjs +0 -10
  108. package/katex-2e45926a.mjs +0 -11700
  109. package/packet-KVYON367-453a49e8.mjs +0 -10
  110. package/pie-R6RNRRYF-4d95c8dc.mjs +0 -10
  111. package/radar-MK3ICKWK-100e8fa4.mjs +0 -10
@@ -0,0 +1,448 @@
1
+ import { v, n as F, R as H, F as L, B as M, J as t, l as j, _ as z, I as Y, V, N as _, t as $, a as D, f as q, P as K, b as Q } from "./index-433e2395.mjs";
2
+ import { L as k } from "./graph-DOmtxVvg-727f4e14.mjs";
3
+ import { o as U } from "./layout-8X5HiOVA-b6e13cf9.mjs";
4
+ import { E as S } from "./_baseUniq-DPnX6tpB-5eb6efbd.mjs";
5
+ import { a as W } from "./clone-Csc9uFbU-6c4f28bd.mjs";
6
+ import { g as G } from "./_basePickBy-DMehTBs0-8955b30b.mjs";
7
+ import "vue";
8
+ function X(e) {
9
+ var n = {
10
+ options: {
11
+ directed: e.isDirected(),
12
+ multigraph: e.isMultigraph(),
13
+ compound: e.isCompound()
14
+ },
15
+ nodes: Z(e),
16
+ edges: ee(e)
17
+ };
18
+ return S(e.graph()) || (n.value = W(e.graph())), n;
19
+ }
20
+ function Z(e) {
21
+ return G(e.nodes(), function(n) {
22
+ var r = e.node(n), s = e.parent(n), d = { v: n };
23
+ return S(r) || (d.value = r), S(s) || (d.parent = s), d;
24
+ });
25
+ }
26
+ function ee(e) {
27
+ return G(e.edges(), function(n) {
28
+ var r = e.edge(n), s = { v: n.v, w: n.w };
29
+ return S(n.name) || (s.name = n.name), S(r) || (s.value = r), s;
30
+ });
31
+ }
32
+ var f = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), ne = /* @__PURE__ */ v(() => {
33
+ E.clear(), J.clear(), f.clear();
34
+ }, "clear"), I = /* @__PURE__ */ v((e, n) => {
35
+ const r = E.get(n) || [];
36
+ return t.trace("In isDescendant", n, " ", e, " = ", r.includes(e)), r.includes(e);
37
+ }, "isDescendant"), re = /* @__PURE__ */ v((e, n) => {
38
+ const r = E.get(n) || [];
39
+ return t.info("Descendants of ", n, " is ", r), t.info("Edge is ", e), e.v === n || e.w === n ? !1 : r ? r.includes(e.v) || I(e.v, n) || I(e.w, n) || r.includes(e.w) : (t.debug("Tilt, ", n, ",not in descendants"), !1);
40
+ }, "edgeInCluster"), P = /* @__PURE__ */ v((e, n, r, s) => {
41
+ t.warn(
42
+ "Copying children of ",
43
+ e,
44
+ "root",
45
+ s,
46
+ "data",
47
+ n.node(e),
48
+ s
49
+ );
50
+ const d = n.children(e) || [];
51
+ e !== s && d.push(e), t.warn("Copying (nodes) clusterId", e, "nodes", d), d.forEach((c) => {
52
+ if (n.children(c).length > 0)
53
+ P(c, n, r, s);
54
+ else {
55
+ const o = n.node(c);
56
+ t.info("cp ", c, " to ", s, " with parent ", e), r.setNode(c, o), s !== n.parent(c) && (t.warn("Setting parent", c, n.parent(c)), r.setParent(c, n.parent(c))), e !== s && c !== e ? (t.debug("Setting parent", c, e), r.setParent(c, e)) : (t.info("In copy ", e, "root", s, "data", n.node(e), s), t.debug(
57
+ "Not Setting parent for node=",
58
+ c,
59
+ "cluster!==rootId",
60
+ e !== s,
61
+ "node!==clusterId",
62
+ c !== e
63
+ ));
64
+ const l = n.edges(c);
65
+ t.debug("Copying Edges", l), l.forEach((u) => {
66
+ t.info("Edge", u);
67
+ const N = n.edge(u.v, u.w, u.name);
68
+ t.info("Edge data", N, s);
69
+ try {
70
+ re(u, s) ? (t.info("Copying as ", u.v, u.w, N, u.name), r.setEdge(u.v, u.w, N, u.name), t.info("newGraph edges ", r.edges(), r.edge(r.edges()[0]))) : t.info(
71
+ "Skipping copy of edge ",
72
+ u.v,
73
+ "-->",
74
+ u.w,
75
+ " rootId: ",
76
+ s,
77
+ " clusterId:",
78
+ e
79
+ );
80
+ } catch (C) {
81
+ t.error(C);
82
+ }
83
+ });
84
+ }
85
+ t.debug("Removing node", c), n.removeNode(c);
86
+ });
87
+ }, "copy"), B = /* @__PURE__ */ v((e, n) => {
88
+ const r = n.children(e);
89
+ let s = [...r];
90
+ for (const d of r)
91
+ J.set(d, e), s = [...s, ...B(d, n)];
92
+ return s;
93
+ }, "extractDescendants"), te = /* @__PURE__ */ v((e, n, r) => {
94
+ const s = e.edges().filter((l) => l.v === n || l.w === n), d = e.edges().filter((l) => l.v === r || l.w === r), c = s.map((l) => ({ v: l.v === n ? r : l.v, w: l.w === n ? n : l.w })), o = d.map((l) => ({ v: l.v, w: l.w }));
95
+ return c.filter((l) => o.some((u) => l.v === u.v && l.w === u.w));
96
+ }, "findCommonEdges"), x = /* @__PURE__ */ v((e, n, r) => {
97
+ const s = n.children(e);
98
+ if (t.trace("Searching children of id ", e, s), s.length < 1)
99
+ return e;
100
+ let d;
101
+ for (const c of s) {
102
+ const o = x(c, n, r), l = te(n, r, o);
103
+ if (o)
104
+ if (l.length > 0)
105
+ d = o;
106
+ else
107
+ return o;
108
+ }
109
+ return d;
110
+ }, "findNonClusterChild"), O = /* @__PURE__ */ v((e) => !f.has(e) || !f.get(e).externalConnections ? e : f.has(e) ? f.get(e).id : e, "getAnchorId"), ie = /* @__PURE__ */ v((e, n) => {
111
+ if (!e || n > 10) {
112
+ t.debug("Opting out, no graph ");
113
+ return;
114
+ } else
115
+ t.debug("Opting in, graph ");
116
+ e.nodes().forEach(function(r) {
117
+ e.children(r).length > 0 && (t.warn(
118
+ "Cluster identified",
119
+ r,
120
+ " Replacement id in edges: ",
121
+ x(r, e, r)
122
+ ), E.set(r, B(r, e)), f.set(r, { id: x(r, e, r), clusterData: e.node(r) }));
123
+ }), e.nodes().forEach(function(r) {
124
+ const s = e.children(r), d = e.edges();
125
+ s.length > 0 ? (t.debug("Cluster identified", r, E), d.forEach((c) => {
126
+ const o = I(c.v, r), l = I(c.w, r);
127
+ o ^ l && (t.warn("Edge: ", c, " leaves cluster ", r), t.warn("Descendants of XXX ", r, ": ", E.get(r)), f.get(r).externalConnections = !0);
128
+ })) : t.debug("Not a cluster ", r, E);
129
+ });
130
+ for (let r of f.keys()) {
131
+ const s = f.get(r).id, d = e.parent(s);
132
+ d !== r && f.has(d) && !f.get(d).externalConnections && (f.get(r).id = d);
133
+ }
134
+ e.edges().forEach(function(r) {
135
+ const s = e.edge(r);
136
+ t.warn("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(r)), t.warn("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(e.edge(r)));
137
+ let d = r.v, c = r.w;
138
+ if (t.warn(
139
+ "Fix XXX",
140
+ f,
141
+ "ids:",
142
+ r.v,
143
+ r.w,
144
+ "Translating: ",
145
+ f.get(r.v),
146
+ " --- ",
147
+ f.get(r.w)
148
+ ), f.get(r.v) || f.get(r.w)) {
149
+ if (t.warn("Fixing and trying - removing XXX", r.v, r.w, r.name), d = O(r.v), c = O(r.w), e.removeEdge(r.v, r.w, r.name), d !== r.v) {
150
+ const o = e.parent(d);
151
+ f.get(o).externalConnections = !0, s.fromCluster = r.v;
152
+ }
153
+ if (c !== r.w) {
154
+ const o = e.parent(c);
155
+ f.get(o).externalConnections = !0, s.toCluster = r.w;
156
+ }
157
+ t.warn("Fix Replacing with XXX", d, c, r.name), e.setEdge(d, c, s, r.name);
158
+ }
159
+ }), t.warn("Adjusted Graph", X(e)), R(e, 0), t.trace(f);
160
+ }, "adjustClustersAndEdges"), R = /* @__PURE__ */ v((e, n) => {
161
+ var r, s;
162
+ if (t.warn("extractor - ", n, X(e), e.children("D")), n > 10) {
163
+ t.error("Bailing out");
164
+ return;
165
+ }
166
+ let d = e.nodes(), c = !1;
167
+ for (const o of d) {
168
+ const l = e.children(o);
169
+ c = c || l.length > 0;
170
+ }
171
+ if (!c) {
172
+ t.debug("Done, no node has children", e.nodes());
173
+ return;
174
+ }
175
+ t.debug("Nodes = ", d, n);
176
+ for (const o of d)
177
+ if (t.debug(
178
+ "Extracting node",
179
+ o,
180
+ f,
181
+ f.has(o) && !f.get(o).externalConnections,
182
+ !e.parent(o),
183
+ e.node(o),
184
+ e.children("D"),
185
+ " Depth ",
186
+ n
187
+ ), !f.has(o))
188
+ t.debug("Not a cluster", o, n);
189
+ else if (!f.get(o).externalConnections && e.children(o) && e.children(o).length > 0) {
190
+ t.warn(
191
+ "Cluster without external connections, without a parent and with children",
192
+ o,
193
+ n
194
+ );
195
+ let l = e.graph().rankdir === "TB" ? "LR" : "TB";
196
+ (s = (r = f.get(o)) == null ? void 0 : r.clusterData) != null && s.dir && (l = f.get(o).clusterData.dir, t.warn("Fixing dir", f.get(o).clusterData.dir, l));
197
+ const u = new k({
198
+ multigraph: !0,
199
+ compound: !0
200
+ }).setGraph({
201
+ rankdir: l,
202
+ nodesep: 50,
203
+ ranksep: 50,
204
+ marginx: 8,
205
+ marginy: 8
206
+ }).setDefaultEdgeLabel(function() {
207
+ return {};
208
+ });
209
+ t.warn("Old graph before copy", X(e)), P(o, e, u, o), e.setNode(o, {
210
+ clusterNode: !0,
211
+ id: o,
212
+ clusterData: f.get(o).clusterData,
213
+ label: f.get(o).label,
214
+ graph: u
215
+ }), t.warn("New graph after copy node: (", o, ")", X(u)), t.debug("Old graph after copy", X(e));
216
+ } else
217
+ t.warn(
218
+ "Cluster ** ",
219
+ o,
220
+ " **not meeting the criteria !externalConnections:",
221
+ !f.get(o).externalConnections,
222
+ " no parent: ",
223
+ !e.parent(o),
224
+ " children ",
225
+ e.children(o) && e.children(o).length > 0,
226
+ e.children("D"),
227
+ n
228
+ ), t.debug(f);
229
+ d = e.nodes(), t.warn("New list of nodes", d);
230
+ for (const o of d) {
231
+ const l = e.node(o);
232
+ t.warn(" Now next level", o, l), l != null && l.clusterNode && R(l.graph, n + 1);
233
+ }
234
+ }, "extractor"), T = /* @__PURE__ */ v((e, n) => {
235
+ if (n.length === 0)
236
+ return [];
237
+ let r = Object.assign([], n);
238
+ return n.forEach((s) => {
239
+ const d = e.children(s), c = T(e, d);
240
+ r = [...r, ...c];
241
+ }), r;
242
+ }, "sorter"), oe = /* @__PURE__ */ v((e) => T(e, e.children()), "sortNodesByHierarchy"), A = /* @__PURE__ */ v(async (e, n, r, s, d, c) => {
243
+ t.warn("Graph in recursive render:XAX", X(n), d);
244
+ const o = n.graph().rankdir;
245
+ t.trace("Dir in recursive render - dir:", o);
246
+ const l = e.insert("g").attr("class", "root");
247
+ n.nodes() ? t.info("Recursive render XXX", n.nodes()) : t.info("No nodes found for", n), n.edges().length > 0 && t.info("Recursive edges", n.edge(n.edges()[0]));
248
+ const u = l.insert("g").attr("class", "clusters"), N = l.insert("g").attr("class", "edgePaths"), C = l.insert("g").attr("class", "edgeLabels"), h = l.insert("g").attr("class", "nodes");
249
+ await Promise.all(
250
+ n.nodes().map(async function(g) {
251
+ const a = n.node(g);
252
+ if (d !== void 0) {
253
+ const i = JSON.parse(JSON.stringify(d.clusterData));
254
+ t.trace(
255
+ `Setting data for parent cluster XXX
256
+ Node.id = `,
257
+ g,
258
+ `
259
+ data=`,
260
+ i.height,
261
+ `
262
+ Parent cluster`,
263
+ d.height
264
+ ), n.setNode(d.id, i), n.parent(g) || (t.trace("Setting parent", g, d.id), n.setParent(g, d.id, i));
265
+ }
266
+ if (t.info("(Insert) Node XXX" + g + ": " + JSON.stringify(n.node(g))), a != null && a.clusterNode) {
267
+ t.info("Cluster identified XBX", g, a.width, n.node(g));
268
+ const { ranksep: i, nodesep: w } = n.graph();
269
+ a.graph.setGraph({
270
+ ...a.graph.graph(),
271
+ ranksep: i + 25,
272
+ nodesep: w
273
+ });
274
+ const m = await A(
275
+ h,
276
+ a.graph,
277
+ r,
278
+ s,
279
+ n.node(g),
280
+ c
281
+ ), b = m.elem;
282
+ z(a, b), a.diff = m.diff || 0, t.info(
283
+ "New compound node after recursive render XAX",
284
+ g,
285
+ "width",
286
+ // node,
287
+ a.width,
288
+ "height",
289
+ a.height
290
+ // node.x,
291
+ // node.y
292
+ ), Y(b, a);
293
+ } else
294
+ n.children(g).length > 0 ? (t.trace(
295
+ "Cluster - the non recursive path XBX",
296
+ g,
297
+ a.id,
298
+ a,
299
+ a.width,
300
+ "Graph:",
301
+ n
302
+ ), t.trace(x(a.id, n)), f.set(a.id, { id: x(a.id, n), node: a })) : (t.trace("Node - the non recursive path XAX", g, h, n.node(g), o), await V(h, n.node(g), { config: c, dir: o }));
303
+ })
304
+ ), await (/* @__PURE__ */ v(async () => {
305
+ const g = n.edges().map(async function(a) {
306
+ const i = n.edge(a.v, a.w, a.name);
307
+ t.info("Edge " + a.v + " -> " + a.w + ": " + JSON.stringify(a)), t.info("Edge " + a.v + " -> " + a.w + ": ", a, " ", JSON.stringify(n.edge(a))), t.info(
308
+ "Fix",
309
+ f,
310
+ "ids:",
311
+ a.v,
312
+ a.w,
313
+ "Translating: ",
314
+ f.get(a.v),
315
+ f.get(a.w)
316
+ ), await _(C, i);
317
+ });
318
+ await Promise.all(g);
319
+ }, "processEdges"))(), t.info("Graph before layout:", JSON.stringify(X(n))), t.info("############################################# XXX"), t.info("### Layout ### XXX"), t.info("############################################# XXX"), U(n), t.info("Graph after layout:", JSON.stringify(X(n)));
320
+ let p = 0, { subGraphTitleTotalMargin: y } = $(c);
321
+ return await Promise.all(
322
+ oe(n).map(async function(g) {
323
+ var a;
324
+ const i = n.node(g);
325
+ if (t.info(
326
+ "Position XBX => " + g + ": (" + i.x,
327
+ "," + i.y,
328
+ ") width: ",
329
+ i.width,
330
+ " height: ",
331
+ i.height
332
+ ), i != null && i.clusterNode)
333
+ i.y += y, t.info(
334
+ "A tainted cluster node XBX1",
335
+ g,
336
+ i.id,
337
+ i.width,
338
+ i.height,
339
+ i.x,
340
+ i.y,
341
+ n.parent(g)
342
+ ), f.get(i.id).node = i, D(i);
343
+ else if (n.children(g).length > 0) {
344
+ t.info(
345
+ "A pure cluster node XBX1",
346
+ g,
347
+ i.id,
348
+ i.x,
349
+ i.y,
350
+ i.width,
351
+ i.height,
352
+ n.parent(g)
353
+ ), i.height += y, n.node(i.parentId);
354
+ const w = (i == null ? void 0 : i.padding) / 2 || 0, m = ((a = i == null ? void 0 : i.labelBBox) == null ? void 0 : a.height) || 0, b = m - w || 0;
355
+ t.debug("OffsetY", b, "labelHeight", m, "halfPadding", w), await q(u, i), f.get(i.id).node = i;
356
+ } else {
357
+ const w = n.node(i.parentId);
358
+ i.y += y / 2, t.info(
359
+ "A regular node XBX1 - using the padding",
360
+ i.id,
361
+ "parent",
362
+ i.parentId,
363
+ i.width,
364
+ i.height,
365
+ i.x,
366
+ i.y,
367
+ "offsetY",
368
+ i.offsetY,
369
+ "parent",
370
+ w,
371
+ w == null ? void 0 : w.offsetY,
372
+ i
373
+ ), D(i);
374
+ }
375
+ })
376
+ ), n.edges().forEach(function(g) {
377
+ const a = n.edge(g);
378
+ t.info("Edge " + g.v + " -> " + g.w + ": " + JSON.stringify(a), a), a.points.forEach((b) => b.y += y / 2);
379
+ const i = n.node(g.v);
380
+ var w = n.node(g.w);
381
+ const m = K(N, a, f, r, i, w, s);
382
+ Q(a, m);
383
+ }), n.nodes().forEach(function(g) {
384
+ const a = n.node(g);
385
+ t.info(g, a.type, a.diff), a.isGroup && (p = a.diff);
386
+ }), t.warn("Returning from recursive render XAX", l, p), { elem: l, diff: p };
387
+ }, "recursiveRender"), ue = /* @__PURE__ */ v(async (e, n) => {
388
+ var r, s, d, c, o, l;
389
+ const u = new k({
390
+ multigraph: !0,
391
+ compound: !0
392
+ }).setGraph({
393
+ rankdir: e.direction,
394
+ nodesep: ((r = e.config) == null ? void 0 : r.nodeSpacing) || ((d = (s = e.config) == null ? void 0 : s.flowchart) == null ? void 0 : d.nodeSpacing) || e.nodeSpacing,
395
+ ranksep: ((c = e.config) == null ? void 0 : c.rankSpacing) || ((l = (o = e.config) == null ? void 0 : o.flowchart) == null ? void 0 : l.rankSpacing) || e.rankSpacing,
396
+ marginx: 8,
397
+ marginy: 8
398
+ }).setDefaultEdgeLabel(function() {
399
+ return {};
400
+ }), N = n.select("g");
401
+ F(N, e.markers, e.type, e.diagramId), H(), L(), M(), ne(), e.nodes.forEach((h) => {
402
+ u.setNode(h.id, { ...h }), h.parentId && u.setParent(h.id, h.parentId);
403
+ }), t.debug("Edges:", e.edges), e.edges.forEach((h) => {
404
+ if (h.start === h.end) {
405
+ const p = h.start, y = p + "---" + p + "---1", g = p + "---" + p + "---2", a = u.node(p);
406
+ u.setNode(y, {
407
+ domId: y,
408
+ id: y,
409
+ parentId: a.parentId,
410
+ labelStyle: "",
411
+ label: "",
412
+ padding: 0,
413
+ shape: "labelRect",
414
+ // shape: 'rect',
415
+ style: "",
416
+ width: 10,
417
+ height: 10
418
+ }), u.setParent(y, a.parentId), u.setNode(g, {
419
+ domId: g,
420
+ id: g,
421
+ parentId: a.parentId,
422
+ labelStyle: "",
423
+ padding: 0,
424
+ // shape: 'rect',
425
+ shape: "labelRect",
426
+ label: "",
427
+ style: "",
428
+ width: 10,
429
+ height: 10
430
+ }), u.setParent(g, a.parentId);
431
+ const i = structuredClone(h), w = structuredClone(h), m = structuredClone(h);
432
+ i.label = "", i.arrowTypeEnd = "none", i.id = p + "-cyclic-special-1", w.arrowTypeStart = "none", w.arrowTypeEnd = "none", w.id = p + "-cyclic-special-mid", m.label = "", a.isGroup && (i.fromCluster = p, m.toCluster = p), m.id = p + "-cyclic-special-2", m.arrowTypeStart = "none", u.setEdge(p, y, i, p + "-cyclic-special-0"), u.setEdge(y, g, w, p + "-cyclic-special-1"), u.setEdge(g, p, m, p + "-cyc<lic-special-2");
433
+ } else
434
+ u.setEdge(h.start, h.end, { ...h }, h.id);
435
+ }), t.warn("Graph at first:", JSON.stringify(X(u))), ie(u), t.warn("Graph after XAX:", JSON.stringify(X(u)));
436
+ const C = j();
437
+ await A(
438
+ N,
439
+ u,
440
+ e.type,
441
+ e.diagramId,
442
+ void 0,
443
+ C
444
+ );
445
+ }, "render");
446
+ export {
447
+ ue as render
448
+ };
@@ -1,38 +1,38 @@
1
- import { p as k } from "./chunk-4BMEZGHF-8d9a2e4f.mjs";
2
- import { C as R, _ as l, s as E, g as I, n as _, o as D, b as F, c as G, l as P, D as y, E as C, t as z, H, K as V } from "./index-f83d4b07.mjs";
3
- import { p as W } from "./mermaid-parser.core-55f134dc.mjs";
1
+ import { p as k } from "./chunk-4BMEZGHF-705995af.mjs";
2
+ import { c1 as R, bz as l, bB as E, bC as I, bP as D, bQ as F, bD as _, bE as P, bM as z, c2 as y, c3 as b, bW as G, c6 as W, cq as B } from "./index-433e2395.mjs";
3
+ import { p as V } from "./mermaid-parser.core-6eb44241.mjs";
4
4
  import "vue";
5
- import "./_baseUniq-2bcae05e.mjs";
6
- import "./_basePickBy-12958109.mjs";
7
- import "./clone-1f18a17f.mjs";
5
+ import "./_baseUniq-8cd7fbc4.mjs";
6
+ import "./_basePickBy-e7598e72.mjs";
7
+ import "./clone-327a1426.mjs";
8
8
  var h = {
9
9
  showLegend: !0,
10
10
  ticks: 5,
11
11
  max: null,
12
12
  min: 0,
13
13
  graticule: "circle"
14
- }, w = {
14
+ }, C = {
15
15
  axes: [],
16
16
  curves: [],
17
17
  options: h
18
- }, m = structuredClone(w), B = R.radar, j = /* @__PURE__ */ l(() => y({
19
- ...B,
20
- ...C().radar
21
- }), "getConfig"), b = /* @__PURE__ */ l(() => m.axes, "getAxes"), K = /* @__PURE__ */ l(() => m.curves, "getCurves"), N = /* @__PURE__ */ l(() => m.options, "getOptions"), U = /* @__PURE__ */ l((a) => {
18
+ }, m = structuredClone(C), H = R.radar, j = /* @__PURE__ */ l(() => y({
19
+ ...H,
20
+ ...b().radar
21
+ }), "getConfig"), w = /* @__PURE__ */ l(() => m.axes, "getAxes"), q = /* @__PURE__ */ l(() => m.curves, "getCurves"), N = /* @__PURE__ */ l(() => m.options, "getOptions"), Q = /* @__PURE__ */ l((a) => {
22
22
  m.axes = a.map((t) => ({
23
23
  name: t.name,
24
24
  label: t.label ?? t.name
25
25
  }));
26
- }, "setAxes"), X = /* @__PURE__ */ l((a) => {
26
+ }, "setAxes"), U = /* @__PURE__ */ l((a) => {
27
27
  m.curves = a.map((t) => ({
28
28
  name: t.name,
29
29
  label: t.label ?? t.name,
30
- entries: Y(t.entries)
30
+ entries: X(t.entries)
31
31
  }));
32
- }, "setCurves"), Y = /* @__PURE__ */ l((a) => {
32
+ }, "setCurves"), X = /* @__PURE__ */ l((a) => {
33
33
  if (a[0].axis == null)
34
34
  return a.map((e) => e.value);
35
- const t = b();
35
+ const t = w();
36
36
  if (t.length === 0)
37
37
  throw new Error("Axes must be populated before curves for reference entries");
38
38
  return t.map((e) => {
@@ -44,7 +44,7 @@ var h = {
44
44
  throw new Error("Missing entry for axis " + e.label);
45
45
  return r.value;
46
46
  });
47
- }, "computeCurveEntries"), Z = /* @__PURE__ */ l((a) => {
47
+ }, "computeCurveEntries"), Y = /* @__PURE__ */ l((a) => {
48
48
  var e, r, s, o, i;
49
49
  const t = a.reduce(
50
50
  (n, c) => (n[c.name] = c, n),
@@ -57,34 +57,34 @@ var h = {
57
57
  min: ((o = t.min) == null ? void 0 : o.value) ?? h.min,
58
58
  graticule: ((i = t.graticule) == null ? void 0 : i.value) ?? h.graticule
59
59
  };
60
- }, "setOptions"), q = /* @__PURE__ */ l(() => {
61
- z(), m = structuredClone(w);
60
+ }, "setOptions"), Z = /* @__PURE__ */ l(() => {
61
+ G(), m = structuredClone(C);
62
62
  }, "clear"), $ = {
63
- getAxes: b,
64
- getCurves: K,
63
+ getAxes: w,
64
+ getCurves: q,
65
65
  getOptions: N,
66
- setAxes: U,
67
- setCurves: X,
68
- setOptions: Z,
66
+ setAxes: Q,
67
+ setCurves: U,
68
+ setOptions: Y,
69
69
  getConfig: j,
70
- clear: q,
70
+ clear: Z,
71
71
  setAccTitle: E,
72
72
  getAccTitle: I,
73
- setDiagramTitle: _,
74
- getDiagramTitle: D,
75
- getAccDescription: F,
76
- setAccDescription: G
73
+ setDiagramTitle: D,
74
+ getDiagramTitle: F,
75
+ getAccDescription: _,
76
+ setAccDescription: P
77
77
  }, J = /* @__PURE__ */ l((a) => {
78
78
  k(a, $);
79
79
  const { axes: t, curves: e, options: r } = a;
80
80
  $.setAxes(t), $.setCurves(e), $.setOptions(r);
81
- }, "populate"), Q = {
81
+ }, "populate"), K = {
82
82
  parse: /* @__PURE__ */ l(async (a) => {
83
- const t = await W("radar", a);
84
- P.debug(t), J(t);
83
+ const t = await V("radar", a);
84
+ z.debug(t), J(t);
85
85
  }, "parse")
86
86
  }, tt = /* @__PURE__ */ l((a, t, e, r) => {
87
- const s = r.db, o = s.getAxes(), i = s.getCurves(), n = s.getOptions(), c = s.getConfig(), d = s.getDiagramTitle(), u = H(t), p = et(u, c), g = n.max ?? Math.max(...i.map((f) => Math.max(...f.entries))), x = n.min, v = Math.min(c.width, c.height) / 2;
87
+ const s = r.db, o = s.getAxes(), i = s.getCurves(), n = s.getOptions(), c = s.getConfig(), d = s.getDiagramTitle(), u = W(t), p = et(u, c), g = n.max ?? Math.max(...i.map((f) => Math.max(...f.entries))), x = n.min, v = Math.min(c.width, c.height) / 2;
88
88
  at(p, o, v, n.ticks, n.graticule), rt(p, o, v, c), M(p, o, i, x, g, n.graticule, c), T(p, i, n.showLegend, c), p.append("text").attr("class", "radarTitle").text(d).attr("x", 0).attr("y", -c.height / 2 - c.marginTop);
89
89
  }, "draw"), et = /* @__PURE__ */ l((a, t) => {
90
90
  const e = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, s = {
@@ -180,7 +180,7 @@ var st = { draw: tt }, nt = /* @__PURE__ */ l((a, t) => {
180
180
  }
181
181
  return e;
182
182
  }, "genIndexStyles"), ot = /* @__PURE__ */ l((a) => {
183
- const t = V(), e = C(), r = y(t, e.themeVariables), s = y(r.radar, a);
183
+ const t = B(), e = b(), r = y(t, e.themeVariables), s = y(r.radar, a);
184
184
  return { themeVariables: r, radarOptions: s };
185
185
  }, "buildRadarStyleOptions"), it = /* @__PURE__ */ l(({ radar: a } = {}) => {
186
186
  const { themeVariables: t, radarOptions: e } = ot(a);
@@ -215,7 +215,7 @@ var st = { draw: tt }, nt = /* @__PURE__ */ l((a, t) => {
215
215
  ${nt(t, e)}
216
216
  `;
217
217
  }, "styles"), ht = {
218
- parser: Q,
218
+ parser: K,
219
219
  db: $,
220
220
  renderer: st,
221
221
  styles: it