@antdv-next/x 1.0.2-beta.1 → 1.0.2-beta.2
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.
- package/dist/code-highlighter/CodeHighlighter.js +24 -7
- package/dist/index.umd.js +49 -8
- package/dist/package.js +1 -1
- package/dist/x-provider/context.d.ts +5 -1
- package/dist/x-provider/index.d.ts +47 -0
- package/dist/x-provider/index.js +25 -0
- package/{dist-browser/_basePickBy-Cy7KVmkk.js → es/_basePickBy-DPqob0cQ.js} +2 -2
- package/{dist-browser/_baseUniq-Ch3HuHeT.js → es/_baseUniq-AMhRdOMz.js} +2 -2
- package/es/antdv-next-x.esm.js +22171 -0
- package/es/architecture-PBZL5I3N-CBmkTWjb.js +3 -0
- package/{dist-browser/architectureDiagram-2XIMDMQ5-D3IYLROv.js → es/architectureDiagram-2XIMDMQ5-ZOgJV9Kg.js} +84 -84
- package/{dist-browser/blockDiagram-WCTKOSBZ-nXanZ0sc.js → es/blockDiagram-WCTKOSBZ-8iZwAKBK.js} +529 -529
- package/{dist-browser/c4Diagram-IC4MRINW-C-gVp6th.js → es/c4Diagram-IC4MRINW-DrH9eRMR.js} +168 -168
- package/{dist-browser/channel-DoEe9DF9.js → es/channel-DIQFjdG3.js} +1 -1
- package/{dist-browser/chunk-4BX2VUAB-fLFD6XW0.js → es/chunk-4BX2VUAB-DUVpjbJi.js} +1 -1
- package/{dist-browser/chunk-55IACEB6-OtyKJzCH.js → es/chunk-55IACEB6-RlJ-J3tE.js} +1 -1
- package/{dist-browser/chunk-7E7YKBS2-C1dd36rm.js → es/chunk-7E7YKBS2-ChLFamzc.js} +1 -1
- package/{dist-browser/chunk-7R4GIKGN-DuTRhdsf.js → es/chunk-7R4GIKGN-B9vamSzt.js} +2 -2
- package/{dist-browser/chunk-C72U2L5F-ClmZGhFC.js → es/chunk-C72U2L5F-BV-rXau1.js} +1 -1
- package/{dist-browser/chunk-EGIJ26TM-Bar_u1MN.js → es/chunk-EGIJ26TM-GvsuORRL.js} +1 -1
- package/{dist-browser/chunk-FMBD7UC4-C_uJ_JJA.js → es/chunk-FMBD7UC4-D6ZlqqMC.js} +1 -1
- package/{dist-browser/chunk-GEFDOKGD-P7WhyrTU.js → es/chunk-GEFDOKGD-DM6dsEsk.js} +251 -251
- package/{dist-browser/chunk-GLR3WWYH-BvazRgdo.js → es/chunk-GLR3WWYH-CqFdLic9.js} +16 -16
- package/{dist-browser/chunk-HHEYEP7N-rv5s5WD4.js → es/chunk-HHEYEP7N-FVfYw94p.js} +2 -2
- package/{dist-browser/chunk-JSJVCQXG-89HUGe9V.js → es/chunk-JSJVCQXG-Wr9uPcCh.js} +2 -2
- package/{dist-browser/chunk-KX2RTZJC-pMHnNRQg.js → es/chunk-KX2RTZJC-BGffjoxB.js} +2 -2
- package/{dist-browser/chunk-KYZI473N-DJmSs1gK.js → es/chunk-KYZI473N-Bit5smNE.js} +571 -571
- package/{dist-browser/chunk-L3YUKLVL-Ck54qytQ.js → es/chunk-L3YUKLVL-DBuHDpQ2.js} +1 -1
- package/{dist-browser/chunk-MX3YWQON-MkpK3uBD.js → es/chunk-MX3YWQON-Cbj2WwUZ.js} +1 -1
- package/{dist-browser/chunk-NQ4KR5QH-DGshodQv.js → es/chunk-NQ4KR5QH-FPQ-IHJN.js} +119 -119
- package/{dist-browser/chunk-O4XLMI2P-e-ZzDQwg.js → es/chunk-O4XLMI2P-BCDk0ZIW.js} +237 -237
- package/{dist-browser/chunk-OZEHJAEY-DULNd43V.js → es/chunk-OZEHJAEY-BZ24IOgQ.js} +1 -1
- package/{dist-browser/chunk-PQ6SQG4A-CQ9Csv7s.js → es/chunk-PQ6SQG4A-DpwBx6Hx.js} +2 -2
- package/{dist-browser/chunk-PU5JKC2W-DkEFvrjH.js → es/chunk-PU5JKC2W-BNpJuXxn.js} +63 -63
- package/{dist-browser/chunk-QZHKN3VN-qww1plfw.js → es/chunk-QZHKN3VN-NEMwPryC.js} +1 -1
- package/{dist-browser/chunk-R5LLSJPH-BERXSDGJ.js → es/chunk-R5LLSJPH-g44vgerl.js} +1 -1
- package/{dist-browser/chunk-WL4C6EOR-C-d8WPS7.js → es/chunk-WL4C6EOR-B6l-Yy2t.js} +119 -119
- package/{dist-browser/chunk-XIRO2GV7-CFHofxVB.js → es/chunk-XIRO2GV7-CaFInIOW.js} +1 -1
- package/{dist-browser/chunk-XPW4576I-DgvoNZkW.js → es/chunk-XPW4576I-Cp1j6iTN.js} +1 -1
- package/{dist-browser/chunk-XZSTWKYB-k8_EXrSa.js → es/chunk-XZSTWKYB-CGk7ipHd.js} +5 -5
- package/{dist-browser/chunk-YBOYWFTD-BUW4AzEX.js → es/chunk-YBOYWFTD-dOTBpTYs.js} +7 -7
- package/es/classDiagram-VBA2DB6C-B3yBiQy3.js +29 -0
- package/es/classDiagram-v2-RAHNMMFH-jbFYm_Xj.js +29 -0
- package/{dist-browser/clone-BXDbKCDu.js → es/clone-DXVS0uSx.js} +1 -1
- package/{dist-browser/cose-bilkent-S5V4N54A-CnrS2OC1.js → es/cose-bilkent-S5V4N54A-DlmXyn6m.js} +1 -1
- package/{dist-browser/css-Dh17kjFY.js → es/css-DyS1hwc1.js} +1 -1
- package/es/css-HrHT_VUz.js +2 -0
- package/{dist-browser/dagre-BJOzGlhW.js → es/dagre-B1qTL793.js} +6 -6
- package/es/dagre-KLK3FWXG-CEhXRLVR.js +294 -0
- package/{dist-browser/diagram-E7M64L7V-DxuJj8ZG.js → es/diagram-E7M64L7V-Dnd8N74o.js} +59 -59
- package/{dist-browser/diagram-IFDJBPK2-BOpPZ6pu.js → es/diagram-IFDJBPK2-Dan7RsGr.js} +30 -30
- package/{dist-browser/diagram-P4PSJMXO--ChDmcya.js → es/diagram-P4PSJMXO-DwKJpttH.js} +31 -31
- package/{dist-browser/erDiagram-INFDFZHY-BA3m-v87.js → es/erDiagram-INFDFZHY-CGO6k23w.js} +127 -127
- package/{dist-browser/flowDiagram-PKNHOUZH-BCq6k3kr.js → es/flowDiagram-PKNHOUZH-DFN1GsRx.js} +155 -155
- package/{dist-browser/ganttDiagram-A5KZAMGK-DdMePS21.js → es/ganttDiagram-A5KZAMGK-Cf5NxH1w.js} +599 -602
- package/es/gitGraph-HDMCJU4V-CrEEHSZS.js +3 -0
- package/{dist-browser/gitGraphDiagram-K3NZZRJ6-CLbRwChG.js → es/gitGraphDiagram-K3NZZRJ6-BgE6aSZO.js} +175 -175
- package/{dist-browser/graphlib-C7ysKz4u.js → es/graphlib-DFxSohCv.js} +3 -3
- package/{dist-browser/html-BmZO1Eoo.js → es/html-C2-_98S6.js} +2 -2
- package/es/html-JbFqcNgP.js +2 -0
- package/es/info-3K5VOQVL-Dg3DCp4F.js +3 -0
- package/{dist-browser/infoDiagram-LFFYTUFH-DQAZ-vFk.js → es/infoDiagram-LFFYTUFH-WcApcdl5.js} +4 -4
- package/{dist-browser/isEmpty-2JxdWtc-.js → es/isEmpty-B1YrVV8B.js} +1 -1
- package/{dist-browser/ishikawaDiagram-PHBUUO56-B0r2IgGz.js → es/ishikawaDiagram-PHBUUO56-DwK7J31a.js} +65 -65
- package/{dist-browser/journeyDiagram-4ABVD52K-DnMUhOvg.js → es/journeyDiagram-4ABVD52K-CWuA57by.js} +4 -4
- package/{dist-browser/kanban-definition-K7BYSVSG-Da5Y-nJy.js → es/kanban-definition-K7BYSVSG-DBt3gYRQ.js} +10 -10
- package/{dist-browser/line-h2iCTGsE.js → es/line-zOBKZCP5.js} +1 -1
- package/{dist-browser/linear-Bv7XrZCH.js → es/linear-DttXWw4q.js} +1 -1
- package/{dist-browser/mermaid-parser.core-kTgpNO7M.js → es/mermaid-parser.core-CWNEdmZ_.js} +15 -15
- package/{dist-browser/mermaid.core-DRuUNxpC.js → es/mermaid.core-DPBXXViR.js} +206 -206
- package/{dist-browser/mindmap-definition-YRQLILUH-CYeqnCde.js → es/mindmap-definition-YRQLILUH-Bq2xqboX.js} +12 -12
- package/es/packet-RMMSAZCW-Dk7mKMJ4.js +3 -0
- package/es/pie-UPGHQEXC-CnM5YLNO.js +3 -0
- package/{dist-browser/pieDiagram-SKSYHLDU-DAsfTGvY.js → es/pieDiagram-SKSYHLDU-D4iMzwzH.js} +24 -24
- package/{dist-browser/quadrantDiagram-337W2JSQ-CZLbmQS4.js → es/quadrantDiagram-337W2JSQ-DSbXC0z6.js} +3 -3
- package/es/radar-KQ55EAFF-BwfADDx8.js +3 -0
- package/{dist-browser/requirementDiagram-Z7DCOOCP-Cb_Ygnfe.js → es/requirementDiagram-Z7DCOOCP-D7eLn3fs.js} +58 -58
- package/{dist-browser/sankeyDiagram-WA2Y5GQK-DBe5YfW4.js → es/sankeyDiagram-WA2Y5GQK-DN5ZPgWU.js} +2 -2
- package/{dist-browser/sequenceDiagram-2WXFIKYE-C_KUoojT.js → es/sequenceDiagram-2WXFIKYE-CRFEBP8-.js} +388 -388
- package/{dist-browser/stateDiagram-RAJIS63D-boG6DyfW.js → es/stateDiagram-RAJIS63D-CfO23QJX.js} +67 -67
- package/es/stateDiagram-v2-FVOUBMTO-BGWbXepL.js +27 -0
- package/{dist-browser/timeline-definition-YZTLITO2-pFt6rZ6S.js → es/timeline-definition-YZTLITO2-DmpPrD-3.js} +2 -2
- package/es/treemap-KZPCXAKY-BWfn7JxQ.js +3 -0
- package/{dist-browser/vennDiagram-LZ73GAT5-VaCO6k4H.js → es/vennDiagram-LZ73GAT5-B80Xr4jV.js} +104 -104
- package/{dist-browser/vue-BJ0ov2CZ.js → es/vue-DTiWrQBM.js} +3 -3
- package/{dist-browser/vue-html-D0gyDbfn.js → es/vue-html-BG3Xflut.js} +1 -1
- package/{dist-browser/xychartDiagram-JWTSCODW-xS5ybemA.js → es/xychartDiagram-JWTSCODW-DvQyPDr4.js} +98 -98
- package/package.json +13 -11
- package/dist/index.esm.js +0 -11377
- package/dist-browser/architecture-PBZL5I3N-DHfBr78A.js +0 -3
- package/dist-browser/classDiagram-VBA2DB6C-DWTAs0Zm.js +0 -29
- package/dist-browser/classDiagram-v2-RAHNMMFH-CoxCdmrt.js +0 -29
- package/dist-browser/css-D9vrnIUE.js +0 -2
- package/dist-browser/dagre-KLK3FWXG-CFC0naVr.js +0 -294
- package/dist-browser/gitGraph-HDMCJU4V-DbzpICZW.js +0 -3
- package/dist-browser/html-DnTYsv5k.js +0 -2
- package/dist-browser/index.es.js +0 -56150
- package/dist-browser/index.umd.js +0 -3281
- package/dist-browser/info-3K5VOQVL-CpUiQuel.js +0 -3
- package/dist-browser/packet-RMMSAZCW-UTFQ0FQx.js +0 -3
- package/dist-browser/pie-UPGHQEXC-CarAcBSi.js +0 -3
- package/dist-browser/radar-KQ55EAFF-NXK5PC9R.js +0 -3
- package/dist-browser/stateDiagram-v2-FVOUBMTO-DHCajhrN.js +0 -27
- package/dist-browser/treemap-KZPCXAKY-Cj9QakFB.js +0 -3
- /package/{dist-browser → es}/Serializer-y_SfSPKv.js +0 -0
- /package/{dist-browser → es}/arc-caEkbRYF.js +0 -0
- /package/{dist-browser → es}/array-CWNufkl9.js +0 -0
- /package/{dist-browser → es}/bash-CXEwhtGQ.js +0 -0
- /package/{dist-browser → es}/chunk-WQLz0Won.js +0 -0
- /package/{dist-browser → es}/cytoscape.esm-BY3wHcbp.js +0 -0
- /package/{dist-browser → es}/defaultLocale-BaPFSbai.js +0 -0
- /package/{dist-browser → es}/diff-BSu5dsa2.js +0 -0
- /package/{dist-browser → es}/dist-DltyvPj3.js +0 -0
- /package/{dist-browser → es}/init-PAs0hR-b.js +0 -0
- /package/{dist-browser/isArrayLikeObject-y3HlYDaX.js → es/isArrayLikeObject-BEG9p74d.js} +0 -0
- /package/{dist-browser → es}/javascript-BXHK_bZ2.js +0 -0
- /package/{dist-browser → es}/javascript-NV_FQBab.js +0 -0
- /package/{dist-browser → es}/json-C8Y9C4Ne.js +0 -0
- /package/{dist-browser → es}/json-DZ_9-j3Q.js +0 -0
- /package/{dist-browser → es}/jsx-CxlNNvOI.js +0 -0
- /package/{dist-browser/katex-b-xdokOf.js → es/katex-OR8z_f6I.js} +0 -0
- /package/{dist-browser → es}/markdown-BKwT7HWz.js +0 -0
- /package/{dist-browser → es}/math-DPzKeDKn.js +0 -0
- /package/{dist-browser → es}/mermaid-C1RUu_Iw.js +0 -0
- /package/{dist-browser → es}/ordinal-D8PKtxfM.js +0 -0
- /package/{dist-browser → es}/path-DZ-6AyWK.js +0 -0
- /package/{dist-browser → es}/python-BQM8giqx.js +0 -0
- /package/{dist-browser → es}/rough.esm-C_hJ3ICT.js +0 -0
- /package/{dist-browser/src-BukXhifV.js → es/src-BH16DVv0.js} +0 -0
- /package/{dist-browser → es}/tsx-DIYEV_g7.js +0 -0
- /package/{dist-browser → es}/typescript-B6MWEsBH.js +0 -0
- /package/{dist-browser → es}/typescript-CR48gG1F.js +0 -0
- /package/{dist-browser → es}/yaml-Y0CqUPTQ.js +0 -0
package/{dist-browser/blockDiagram-WCTKOSBZ-nXanZ0sc.js → es/blockDiagram-WCTKOSBZ-8iZwAKBK.js}
RENAMED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { D as l, L as u, a as d, b as f, c as p, nt as m, s as h, w as g, y as _ } from "./chunk-7R4GIKGN-
|
|
6
|
-
import { t as v } from "./channel-
|
|
7
|
-
import { t as y } from "./line-
|
|
8
|
-
import { n as b } from "./chunk-PU5JKC2W-
|
|
9
|
-
import { t as x } from "./chunk-FMBD7UC4-
|
|
10
|
-
import { n as S, t as C } from "./chunk-MX3YWQON-
|
|
11
|
-
import { n as w, t as T } from "./chunk-YBOYWFTD-
|
|
1
|
+
import { T as e, c as t, h as n, i as r } from "./chunk-GEFDOKGD-DM6dsEsk.js";
|
|
2
|
+
import { t as i } from "./clone-DXVS0uSx.js";
|
|
3
|
+
import { t as a } from "./graphlib-DFxSohCv.js";
|
|
4
|
+
import { g as o, h as s, p as c } from "./src-BH16DVv0.js";
|
|
5
|
+
import { D as l, L as u, a as d, b as f, c as p, nt as m, s as h, w as g, y as _ } from "./chunk-7R4GIKGN-B9vamSzt.js";
|
|
6
|
+
import { t as v } from "./channel-DIQFjdG3.js";
|
|
7
|
+
import { t as y } from "./line-zOBKZCP5.js";
|
|
8
|
+
import { n as b } from "./chunk-PU5JKC2W-BNpJuXxn.js";
|
|
9
|
+
import { t as x } from "./chunk-FMBD7UC4-D6ZlqqMC.js";
|
|
10
|
+
import { n as S, t as C } from "./chunk-MX3YWQON-Cbj2WwUZ.js";
|
|
11
|
+
import { n as w, t as T } from "./chunk-YBOYWFTD-dOTBpTYs.js";
|
|
12
12
|
//#region ../../node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-WCTKOSBZ.mjs
|
|
13
13
|
var E = (function() {
|
|
14
|
-
var e = /* @__PURE__ */
|
|
14
|
+
var e = /* @__PURE__ */ s(function(e, t, n, r) {
|
|
15
15
|
for (n ||= {}, r = e.length; r--; n[e[r]] = t);
|
|
16
16
|
return n;
|
|
17
|
-
}, "o"),
|
|
17
|
+
}, "o"), t = [1, 15], n = [1, 7], r = [1, 13], i = [1, 14], a = [1, 19], o = [1, 16], c = [1, 17], l = [1, 18], u = [8, 30], d = [
|
|
18
18
|
8,
|
|
19
19
|
10,
|
|
20
20
|
21,
|
|
@@ -53,7 +53,7 @@ var E = (function() {
|
|
|
53
53
|
43,
|
|
54
54
|
46
|
|
55
55
|
], g = [1, 49], _ = {
|
|
56
|
-
trace: /* @__PURE__ */
|
|
56
|
+
trace: /* @__PURE__ */ s(function() {}, "trace"),
|
|
57
57
|
yy: {},
|
|
58
58
|
symbols_: {
|
|
59
59
|
error: 2,
|
|
@@ -180,7 +180,7 @@ var E = (function() {
|
|
|
180
180
|
[24, 3],
|
|
181
181
|
[25, 3]
|
|
182
182
|
],
|
|
183
|
-
performAction: /* @__PURE__ */
|
|
183
|
+
performAction: /* @__PURE__ */ s(function(e, t, n, r, i, a, o) {
|
|
184
184
|
var s = a.length - 1;
|
|
185
185
|
switch (i) {
|
|
186
186
|
case 4:
|
|
@@ -363,21 +363,21 @@ var E = (function() {
|
|
|
363
363
|
},
|
|
364
364
|
{ 1: [3] },
|
|
365
365
|
{
|
|
366
|
-
10:
|
|
366
|
+
10: t,
|
|
367
367
|
11: 3,
|
|
368
368
|
13: 4,
|
|
369
369
|
19: 5,
|
|
370
370
|
20: 6,
|
|
371
|
-
21:
|
|
371
|
+
21: n,
|
|
372
372
|
22: 8,
|
|
373
373
|
23: 9,
|
|
374
374
|
24: 10,
|
|
375
375
|
25: 11,
|
|
376
376
|
26: 12,
|
|
377
|
-
28:
|
|
378
|
-
29:
|
|
379
|
-
31:
|
|
380
|
-
39:
|
|
377
|
+
28: r,
|
|
378
|
+
29: i,
|
|
379
|
+
31: a,
|
|
380
|
+
39: o,
|
|
381
381
|
43: c,
|
|
382
382
|
46: l
|
|
383
383
|
},
|
|
@@ -392,12 +392,12 @@ var E = (function() {
|
|
|
392
392
|
25: 11,
|
|
393
393
|
26: 12,
|
|
394
394
|
11: 21,
|
|
395
|
-
10:
|
|
396
|
-
21:
|
|
397
|
-
28:
|
|
398
|
-
29:
|
|
399
|
-
31:
|
|
400
|
-
39:
|
|
395
|
+
10: t,
|
|
396
|
+
21: n,
|
|
397
|
+
28: r,
|
|
398
|
+
29: i,
|
|
399
|
+
31: a,
|
|
400
|
+
39: o,
|
|
401
401
|
43: c,
|
|
402
402
|
46: l
|
|
403
403
|
}),
|
|
@@ -417,24 +417,24 @@ var E = (function() {
|
|
|
417
417
|
{
|
|
418
418
|
19: 26,
|
|
419
419
|
26: 12,
|
|
420
|
-
31:
|
|
420
|
+
31: a
|
|
421
421
|
},
|
|
422
422
|
{
|
|
423
|
-
10:
|
|
423
|
+
10: t,
|
|
424
424
|
11: 27,
|
|
425
425
|
13: 4,
|
|
426
426
|
19: 5,
|
|
427
427
|
20: 6,
|
|
428
|
-
21:
|
|
428
|
+
21: n,
|
|
429
429
|
22: 8,
|
|
430
430
|
23: 9,
|
|
431
431
|
24: 10,
|
|
432
432
|
25: 11,
|
|
433
433
|
26: 12,
|
|
434
|
-
28:
|
|
435
|
-
29:
|
|
436
|
-
31:
|
|
437
|
-
39:
|
|
434
|
+
28: r,
|
|
435
|
+
29: i,
|
|
436
|
+
31: a,
|
|
437
|
+
39: o,
|
|
438
438
|
43: c,
|
|
439
439
|
46: l
|
|
440
440
|
},
|
|
@@ -453,13 +453,13 @@ var E = (function() {
|
|
|
453
453
|
e(u, [2, 13]),
|
|
454
454
|
{
|
|
455
455
|
26: 35,
|
|
456
|
-
31:
|
|
456
|
+
31: a
|
|
457
457
|
},
|
|
458
458
|
{ 31: [2, 14] },
|
|
459
459
|
{ 17: [1, 36] },
|
|
460
460
|
e(m, [2, 24]),
|
|
461
461
|
{
|
|
462
|
-
10:
|
|
462
|
+
10: t,
|
|
463
463
|
11: 37,
|
|
464
464
|
13: 4,
|
|
465
465
|
14: 22,
|
|
@@ -467,16 +467,16 @@ var E = (function() {
|
|
|
467
467
|
16: p,
|
|
468
468
|
19: 5,
|
|
469
469
|
20: 6,
|
|
470
|
-
21:
|
|
470
|
+
21: n,
|
|
471
471
|
22: 8,
|
|
472
472
|
23: 9,
|
|
473
473
|
24: 10,
|
|
474
474
|
25: 11,
|
|
475
475
|
26: 12,
|
|
476
|
-
28:
|
|
477
|
-
29:
|
|
478
|
-
31:
|
|
479
|
-
39:
|
|
476
|
+
28: r,
|
|
477
|
+
29: i,
|
|
478
|
+
31: a,
|
|
479
|
+
39: o,
|
|
480
480
|
43: c,
|
|
481
481
|
46: l
|
|
482
482
|
},
|
|
@@ -520,34 +520,34 @@ var E = (function() {
|
|
|
520
520
|
50: [2, 15],
|
|
521
521
|
52: [2, 32]
|
|
522
522
|
},
|
|
523
|
-
parseError: /* @__PURE__ */
|
|
523
|
+
parseError: /* @__PURE__ */ s(function(e, t) {
|
|
524
524
|
if (t.recoverable) this.trace(e);
|
|
525
525
|
else {
|
|
526
526
|
var n = Error(e);
|
|
527
527
|
throw n.hash = t, n;
|
|
528
528
|
}
|
|
529
529
|
}, "parseError"),
|
|
530
|
-
parse: /* @__PURE__ */
|
|
531
|
-
var
|
|
530
|
+
parse: /* @__PURE__ */ s(function(e) {
|
|
531
|
+
var t = this, n = [0], r = [], i = [null], a = [], o = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = a.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
|
|
532
532
|
for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
|
|
533
533
|
h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
|
|
534
534
|
var v = h.yylloc;
|
|
535
|
-
|
|
535
|
+
a.push(v);
|
|
536
536
|
var y = h.options && h.options.ranges;
|
|
537
537
|
typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
538
538
|
function b(e) {
|
|
539
|
-
|
|
539
|
+
n.length -= 2 * e, i.length -= e, a.length -= e;
|
|
540
540
|
}
|
|
541
|
-
|
|
541
|
+
s(b, "popStack");
|
|
542
542
|
function x() {
|
|
543
|
-
var e =
|
|
544
|
-
return typeof e != "number" && (e instanceof Array && (
|
|
543
|
+
var e = r.pop() || h.lex() || p;
|
|
544
|
+
return typeof e != "number" && (e instanceof Array && (r = e, e = r.pop()), e = t.symbols_[e] || e), e;
|
|
545
545
|
}
|
|
546
|
-
|
|
546
|
+
s(x, "lex");
|
|
547
547
|
for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
|
|
548
|
-
if (w =
|
|
548
|
+
if (w = n[n.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = o[w] && o[w][S]), T === void 0 || !T.length || !T[0]) {
|
|
549
549
|
var M = "";
|
|
550
|
-
for (O in j = [],
|
|
550
|
+
for (O in j = [], o[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
|
|
551
551
|
M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
|
|
552
552
|
text: h.match,
|
|
553
553
|
token: this.terminals_[S] || S,
|
|
@@ -559,24 +559,24 @@ var E = (function() {
|
|
|
559
559
|
if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
|
|
560
560
|
switch (T[0]) {
|
|
561
561
|
case 1:
|
|
562
|
-
|
|
562
|
+
n.push(S), i.push(h.yytext), a.push(h.yylloc), n.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
|
|
563
563
|
break;
|
|
564
564
|
case 2:
|
|
565
|
-
if (k = this.productions_[T[1]][1], D.$ =
|
|
566
|
-
first_line:
|
|
567
|
-
last_line:
|
|
568
|
-
first_column:
|
|
569
|
-
last_column:
|
|
570
|
-
}, y && (D._$.range = [
|
|
565
|
+
if (k = this.productions_[T[1]][1], D.$ = i[i.length - k], D._$ = {
|
|
566
|
+
first_line: a[a.length - (k || 1)].first_line,
|
|
567
|
+
last_line: a[a.length - 1].last_line,
|
|
568
|
+
first_column: a[a.length - (k || 1)].first_column,
|
|
569
|
+
last_column: a[a.length - 1].last_column
|
|
570
|
+
}, y && (D._$.range = [a[a.length - (k || 1)].range[0], a[a.length - 1].range[1]]), E = this.performAction.apply(D, [
|
|
571
571
|
c,
|
|
572
572
|
u,
|
|
573
573
|
l,
|
|
574
574
|
g.yy,
|
|
575
575
|
T[1],
|
|
576
|
-
|
|
577
|
-
|
|
576
|
+
i,
|
|
577
|
+
a
|
|
578
578
|
].concat(m)), E !== void 0) return E;
|
|
579
|
-
k && (
|
|
579
|
+
k && (n = n.slice(0, -1 * k * 2), i = i.slice(0, -1 * k), a = a.slice(0, -1 * k)), n.push(this.productions_[T[1]][0]), i.push(D.$), a.push(D._$), A = o[n[n.length - 2]][n[n.length - 1]], n.push(A);
|
|
580
580
|
break;
|
|
581
581
|
case 3: return !0;
|
|
582
582
|
}
|
|
@@ -587,11 +587,11 @@ var E = (function() {
|
|
|
587
587
|
_.lexer = /* @__PURE__ */ (function() {
|
|
588
588
|
return {
|
|
589
589
|
EOF: 1,
|
|
590
|
-
parseError: /* @__PURE__ */
|
|
590
|
+
parseError: /* @__PURE__ */ s(function(e, t) {
|
|
591
591
|
if (this.yy.parser) this.yy.parser.parseError(e, t);
|
|
592
592
|
else throw Error(e);
|
|
593
593
|
}, "parseError"),
|
|
594
|
-
setInput: /* @__PURE__ */
|
|
594
|
+
setInput: /* @__PURE__ */ s(function(e, t) {
|
|
595
595
|
return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
596
596
|
first_line: 1,
|
|
597
597
|
first_column: 0,
|
|
@@ -599,11 +599,11 @@ var E = (function() {
|
|
|
599
599
|
last_column: 0
|
|
600
600
|
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
601
601
|
}, "setInput"),
|
|
602
|
-
input: /* @__PURE__ */
|
|
602
|
+
input: /* @__PURE__ */ s(function() {
|
|
603
603
|
var e = this._input[0];
|
|
604
604
|
return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
|
|
605
605
|
}, "input"),
|
|
606
|
-
unput: /* @__PURE__ */
|
|
606
|
+
unput: /* @__PURE__ */ s(function(e) {
|
|
607
607
|
var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
|
|
608
608
|
this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
|
|
609
609
|
var r = this.match.split(/(?:\r\n?|\n)/g);
|
|
@@ -616,10 +616,10 @@ var E = (function() {
|
|
|
616
616
|
last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
|
|
617
617
|
}, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
|
|
618
618
|
}, "unput"),
|
|
619
|
-
more: /* @__PURE__ */
|
|
619
|
+
more: /* @__PURE__ */ s(function() {
|
|
620
620
|
return this._more = !0, this;
|
|
621
621
|
}, "more"),
|
|
622
|
-
reject: /* @__PURE__ */
|
|
622
|
+
reject: /* @__PURE__ */ s(function() {
|
|
623
623
|
if (this.options.backtrack_lexer) this._backtrack = !0;
|
|
624
624
|
else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
|
|
625
625
|
text: "",
|
|
@@ -628,22 +628,22 @@ var E = (function() {
|
|
|
628
628
|
});
|
|
629
629
|
return this;
|
|
630
630
|
}, "reject"),
|
|
631
|
-
less: /* @__PURE__ */
|
|
631
|
+
less: /* @__PURE__ */ s(function(e) {
|
|
632
632
|
this.unput(this.match.slice(e));
|
|
633
633
|
}, "less"),
|
|
634
|
-
pastInput: /* @__PURE__ */
|
|
634
|
+
pastInput: /* @__PURE__ */ s(function() {
|
|
635
635
|
var e = this.matched.substr(0, this.matched.length - this.match.length);
|
|
636
636
|
return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
|
|
637
637
|
}, "pastInput"),
|
|
638
|
-
upcomingInput: /* @__PURE__ */
|
|
638
|
+
upcomingInput: /* @__PURE__ */ s(function() {
|
|
639
639
|
var e = this.match;
|
|
640
640
|
return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
641
641
|
}, "upcomingInput"),
|
|
642
|
-
showPosition: /* @__PURE__ */
|
|
642
|
+
showPosition: /* @__PURE__ */ s(function() {
|
|
643
643
|
var e = this.pastInput(), t = Array(e.length + 1).join("-");
|
|
644
644
|
return e + this.upcomingInput() + "\n" + t + "^";
|
|
645
645
|
}, "showPosition"),
|
|
646
|
-
test_match: /* @__PURE__ */
|
|
646
|
+
test_match: /* @__PURE__ */ s(function(e, t) {
|
|
647
647
|
var n, r, i;
|
|
648
648
|
if (this.options.backtrack_lexer && (i = {
|
|
649
649
|
yylineno: this.yylineno,
|
|
@@ -676,7 +676,7 @@ var E = (function() {
|
|
|
676
676
|
}
|
|
677
677
|
return !1;
|
|
678
678
|
}, "test_match"),
|
|
679
|
-
next: /* @__PURE__ */
|
|
679
|
+
next: /* @__PURE__ */ s(function() {
|
|
680
680
|
if (this.done) return this.EOF;
|
|
681
681
|
this._input || (this.done = !0);
|
|
682
682
|
var e, t, n, r;
|
|
@@ -696,29 +696,29 @@ var E = (function() {
|
|
|
696
696
|
line: this.yylineno
|
|
697
697
|
});
|
|
698
698
|
}, "next"),
|
|
699
|
-
lex: /* @__PURE__ */
|
|
699
|
+
lex: /* @__PURE__ */ s(function() {
|
|
700
700
|
return this.next() || this.lex();
|
|
701
701
|
}, "lex"),
|
|
702
|
-
begin: /* @__PURE__ */
|
|
702
|
+
begin: /* @__PURE__ */ s(function(e) {
|
|
703
703
|
this.conditionStack.push(e);
|
|
704
704
|
}, "begin"),
|
|
705
|
-
popState: /* @__PURE__ */
|
|
705
|
+
popState: /* @__PURE__ */ s(function() {
|
|
706
706
|
return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
707
707
|
}, "popState"),
|
|
708
|
-
_currentRules: /* @__PURE__ */
|
|
708
|
+
_currentRules: /* @__PURE__ */ s(function() {
|
|
709
709
|
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
710
710
|
}, "_currentRules"),
|
|
711
|
-
topState: /* @__PURE__ */
|
|
711
|
+
topState: /* @__PURE__ */ s(function(e) {
|
|
712
712
|
return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
|
|
713
713
|
}, "topState"),
|
|
714
|
-
pushState: /* @__PURE__ */
|
|
714
|
+
pushState: /* @__PURE__ */ s(function(e) {
|
|
715
715
|
this.begin(e);
|
|
716
716
|
}, "pushState"),
|
|
717
|
-
stateStackSize: /* @__PURE__ */
|
|
717
|
+
stateStackSize: /* @__PURE__ */ s(function() {
|
|
718
718
|
return this.conditionStack.length;
|
|
719
719
|
}, "stateStackSize"),
|
|
720
720
|
options: {},
|
|
721
|
-
performAction: /* @__PURE__ */
|
|
721
|
+
performAction: /* @__PURE__ */ s(function(e, t, n, r) {
|
|
722
722
|
switch (n) {
|
|
723
723
|
case 0: return e.getLogger().debug("Found block-beta"), 10;
|
|
724
724
|
case 1: return e.getLogger().debug("Found id-block"), 29;
|
|
@@ -1142,10 +1142,10 @@ var E = (function() {
|
|
|
1142
1142
|
function v() {
|
|
1143
1143
|
this.yy = {};
|
|
1144
1144
|
}
|
|
1145
|
-
return
|
|
1145
|
+
return s(v, "Parser"), v.prototype = _, _.Parser = v, new v();
|
|
1146
1146
|
})();
|
|
1147
1147
|
E.parser = E;
|
|
1148
|
-
var D = E, O = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(), j = "color", M = "fill", ee = "bgFill", te = ",", ne = f(), N = /* @__PURE__ */ new Map(), re = /* @__PURE__ */
|
|
1148
|
+
var D = E, O = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(), j = "color", M = "fill", ee = "bgFill", te = ",", ne = f(), N = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ s((e) => h.sanitizeText(e, ne), "sanitizeText"), ie = /* @__PURE__ */ s(function(e, t = "") {
|
|
1149
1149
|
let n = N.get(e);
|
|
1150
1150
|
n || (n = {
|
|
1151
1151
|
id: e,
|
|
@@ -1159,10 +1159,10 @@ var D = E, O = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(),
|
|
|
1159
1159
|
}
|
|
1160
1160
|
n.styles.push(t);
|
|
1161
1161
|
});
|
|
1162
|
-
}, "addStyleClass"), ae = /* @__PURE__ */
|
|
1162
|
+
}, "addStyleClass"), ae = /* @__PURE__ */ s(function(e, t = "") {
|
|
1163
1163
|
let n = O.get(e);
|
|
1164
1164
|
t != null && (n.styles = t.split(te));
|
|
1165
|
-
}, "addStyle2Node"), oe = /* @__PURE__ */
|
|
1165
|
+
}, "addStyle2Node"), oe = /* @__PURE__ */ s(function(e, t) {
|
|
1166
1166
|
e.split(",").forEach(function(e) {
|
|
1167
1167
|
let n = O.get(e);
|
|
1168
1168
|
if (n === void 0) {
|
|
@@ -1175,55 +1175,55 @@ var D = E, O = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(),
|
|
|
1175
1175
|
}
|
|
1176
1176
|
n.classes ||= [], n.classes.push(t);
|
|
1177
1177
|
});
|
|
1178
|
-
}, "setCssClass"), se = /* @__PURE__ */
|
|
1179
|
-
let
|
|
1180
|
-
for (let
|
|
1181
|
-
if (typeof a == "number" && a > 0 &&
|
|
1182
|
-
ie(
|
|
1178
|
+
}, "setCssClass"), se = /* @__PURE__ */ s((e, t) => {
|
|
1179
|
+
let n = e.flat(), r = [], a = n.find((e) => e?.type === "column-setting")?.columns ?? -1;
|
|
1180
|
+
for (let e of n) {
|
|
1181
|
+
if (typeof a == "number" && a > 0 && e.type !== "column-setting" && typeof e.widthInColumns == "number" && e.widthInColumns > a && o.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${a}`), e.label &&= re(e.label), e.type === "classDef") {
|
|
1182
|
+
ie(e.id, e.css);
|
|
1183
1183
|
continue;
|
|
1184
1184
|
}
|
|
1185
|
-
if (
|
|
1186
|
-
oe(
|
|
1185
|
+
if (e.type === "applyClass") {
|
|
1186
|
+
oe(e.id, e?.styleClass ?? "");
|
|
1187
1187
|
continue;
|
|
1188
1188
|
}
|
|
1189
|
-
if (
|
|
1190
|
-
|
|
1189
|
+
if (e.type === "applyStyles") {
|
|
1190
|
+
e?.stylesStr && ae(e.id, e?.stylesStr);
|
|
1191
1191
|
continue;
|
|
1192
1192
|
}
|
|
1193
|
-
if (
|
|
1194
|
-
else if (
|
|
1195
|
-
let
|
|
1196
|
-
A.set(
|
|
1193
|
+
if (e.type === "column-setting") t.columns = e.columns ?? -1;
|
|
1194
|
+
else if (e.type === "edge") {
|
|
1195
|
+
let t = (A.get(e.id) ?? 0) + 1;
|
|
1196
|
+
A.set(e.id, t), e.id = t + "-" + e.id, k.push(e);
|
|
1197
1197
|
} else {
|
|
1198
|
-
|
|
1199
|
-
let
|
|
1200
|
-
if (
|
|
1201
|
-
let
|
|
1202
|
-
for (let n = 0; n <
|
|
1203
|
-
let
|
|
1204
|
-
|
|
1198
|
+
e.label || (e.type === "composite" ? e.label = "" : e.label = e.id);
|
|
1199
|
+
let t = O.get(e.id);
|
|
1200
|
+
if (t === void 0 ? O.set(e.id, e) : (e.type !== "na" && (t.type = e.type), e.label !== e.id && (t.label = e.label)), e.children && se(e.children, e), e.type === "space") {
|
|
1201
|
+
let t = e.width ?? 1;
|
|
1202
|
+
for (let n = 0; n < t; n++) {
|
|
1203
|
+
let t = i(e);
|
|
1204
|
+
t.id = t.id + "-" + n, O.set(t.id, t), r.push(t);
|
|
1205
1205
|
}
|
|
1206
|
-
} else
|
|
1206
|
+
} else t === void 0 && r.push(e);
|
|
1207
1207
|
}
|
|
1208
1208
|
}
|
|
1209
|
-
|
|
1209
|
+
t.children = r;
|
|
1210
1210
|
}, "populateBlockDatabase"), P = [], F = {
|
|
1211
1211
|
id: "root",
|
|
1212
1212
|
type: "composite",
|
|
1213
1213
|
children: [],
|
|
1214
1214
|
columns: -1
|
|
1215
|
-
}, ce = /* @__PURE__ */
|
|
1216
|
-
|
|
1215
|
+
}, ce = /* @__PURE__ */ s(() => {
|
|
1216
|
+
o.debug("Clear called"), d(), F = {
|
|
1217
1217
|
id: "root",
|
|
1218
1218
|
type: "composite",
|
|
1219
1219
|
children: [],
|
|
1220
1220
|
columns: -1
|
|
1221
1221
|
}, O = /* @__PURE__ */ new Map([["root", F]]), P = [], N = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map();
|
|
1222
1222
|
}, "clear");
|
|
1223
|
-
function le(
|
|
1224
|
-
switch (
|
|
1223
|
+
function le(e) {
|
|
1224
|
+
switch (o.debug("typeStr2Type", e), e) {
|
|
1225
1225
|
case "[]": return "square";
|
|
1226
|
-
case "()": return
|
|
1226
|
+
case "()": return o.debug("we have a round"), "round";
|
|
1227
1227
|
case "(())": return "circle";
|
|
1228
1228
|
case ">]": return "rect_left_inv_arrow";
|
|
1229
1229
|
case "{}": return "diamond";
|
|
@@ -1240,14 +1240,14 @@ function le(t) {
|
|
|
1240
1240
|
default: return "na";
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
|
-
|
|
1244
|
-
function ue(
|
|
1245
|
-
switch (
|
|
1243
|
+
s(le, "typeStr2Type");
|
|
1244
|
+
function ue(e) {
|
|
1245
|
+
switch (o.debug("typeStr2Type", e), e) {
|
|
1246
1246
|
case "==": return "thick";
|
|
1247
1247
|
default: return "normal";
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
|
-
|
|
1250
|
+
s(ue, "edgeTypeStr2Type");
|
|
1251
1251
|
function de(e) {
|
|
1252
1252
|
switch (e.replace(/^[\s-]+|[\s-]+$/g, "")) {
|
|
1253
1253
|
case "x": return "arrow_cross";
|
|
@@ -1256,36 +1256,36 @@ function de(e) {
|
|
|
1256
1256
|
default: return "";
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
|
-
|
|
1259
|
+
s(de, "edgeStrToEdgeData");
|
|
1260
1260
|
var fe = 0, pe = {
|
|
1261
|
-
getConfig: /* @__PURE__ */
|
|
1261
|
+
getConfig: /* @__PURE__ */ s(() => _().block, "getConfig"),
|
|
1262
1262
|
typeStr2Type: le,
|
|
1263
1263
|
edgeTypeStr2Type: ue,
|
|
1264
1264
|
edgeStrToEdgeData: de,
|
|
1265
|
-
getLogger: /* @__PURE__ */
|
|
1266
|
-
getBlocksFlat: /* @__PURE__ */
|
|
1267
|
-
getBlocks: /* @__PURE__ */
|
|
1268
|
-
getEdges: /* @__PURE__ */
|
|
1269
|
-
setHierarchy: /* @__PURE__ */
|
|
1265
|
+
getLogger: /* @__PURE__ */ s(() => o, "getLogger"),
|
|
1266
|
+
getBlocksFlat: /* @__PURE__ */ s(() => [...O.values()], "getBlocksFlat"),
|
|
1267
|
+
getBlocks: /* @__PURE__ */ s(() => P || [], "getBlocks"),
|
|
1268
|
+
getEdges: /* @__PURE__ */ s(() => k, "getEdges"),
|
|
1269
|
+
setHierarchy: /* @__PURE__ */ s((e) => {
|
|
1270
1270
|
F.children = e, se(e, F), P = F.children;
|
|
1271
1271
|
}, "setHierarchy"),
|
|
1272
|
-
getBlock: /* @__PURE__ */
|
|
1273
|
-
setBlock: /* @__PURE__ */
|
|
1272
|
+
getBlock: /* @__PURE__ */ s((e) => O.get(e), "getBlock"),
|
|
1273
|
+
setBlock: /* @__PURE__ */ s((e) => {
|
|
1274
1274
|
O.set(e.id, e);
|
|
1275
1275
|
}, "setBlock"),
|
|
1276
|
-
getColumns: /* @__PURE__ */
|
|
1276
|
+
getColumns: /* @__PURE__ */ s((e) => {
|
|
1277
1277
|
let t = O.get(e);
|
|
1278
1278
|
return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
|
|
1279
1279
|
}, "getColumns"),
|
|
1280
|
-
getClasses: /* @__PURE__ */
|
|
1280
|
+
getClasses: /* @__PURE__ */ s(function() {
|
|
1281
1281
|
return N;
|
|
1282
1282
|
}, "getClasses"),
|
|
1283
1283
|
clear: ce,
|
|
1284
|
-
generateId: /* @__PURE__ */
|
|
1285
|
-
}, I = /* @__PURE__ */
|
|
1284
|
+
generateId: /* @__PURE__ */ s(() => (fe++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + fe), "generateId")
|
|
1285
|
+
}, I = /* @__PURE__ */ s((e, t) => {
|
|
1286
1286
|
let n = v;
|
|
1287
1287
|
return m(n(e, "r"), n(e, "g"), n(e, "b"), t);
|
|
1288
|
-
}, "fade"), me = /* @__PURE__ */
|
|
1288
|
+
}, "fade"), me = /* @__PURE__ */ s((e) => `.label {
|
|
1289
1289
|
font-family: ${e.fontFamily};
|
|
1290
1290
|
color: ${e.nodeTextColor || e.textColor};
|
|
1291
1291
|
}
|
|
@@ -1408,36 +1408,36 @@ var fe = 0, pe = {
|
|
|
1408
1408
|
fill: ${e.textColor};
|
|
1409
1409
|
}
|
|
1410
1410
|
${x()}
|
|
1411
|
-
`, "getStyles"), he = /* @__PURE__ */
|
|
1411
|
+
`, "getStyles"), he = /* @__PURE__ */ s((e, t, n, r) => {
|
|
1412
1412
|
t.forEach((t) => {
|
|
1413
1413
|
ge[t](e, n, r);
|
|
1414
1414
|
});
|
|
1415
1415
|
}, "insertMarkers"), ge = {
|
|
1416
|
-
extension: /* @__PURE__ */
|
|
1417
|
-
|
|
1416
|
+
extension: /* @__PURE__ */ s((e, t, n) => {
|
|
1417
|
+
o.trace("Making markers for ", n), e.append("defs").append("marker").attr("id", n + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
1418
1418
|
}, "extension"),
|
|
1419
|
-
composition: /* @__PURE__ */
|
|
1419
|
+
composition: /* @__PURE__ */ s((e, t, n) => {
|
|
1420
1420
|
e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
1421
1421
|
}, "composition"),
|
|
1422
|
-
aggregation: /* @__PURE__ */
|
|
1422
|
+
aggregation: /* @__PURE__ */ s((e, t, n) => {
|
|
1423
1423
|
e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
1424
1424
|
}, "aggregation"),
|
|
1425
|
-
dependency: /* @__PURE__ */
|
|
1425
|
+
dependency: /* @__PURE__ */ s((e, t, n) => {
|
|
1426
1426
|
e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
1427
1427
|
}, "dependency"),
|
|
1428
|
-
lollipop: /* @__PURE__ */
|
|
1428
|
+
lollipop: /* @__PURE__ */ s((e, t, n) => {
|
|
1429
1429
|
e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
1430
1430
|
}, "lollipop"),
|
|
1431
|
-
point: /* @__PURE__ */
|
|
1431
|
+
point: /* @__PURE__ */ s((e, t, n) => {
|
|
1432
1432
|
e.append("marker").attr("id", n + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
1433
1433
|
}, "point"),
|
|
1434
|
-
circle: /* @__PURE__ */
|
|
1434
|
+
circle: /* @__PURE__ */ s((e, t, n) => {
|
|
1435
1435
|
e.append("marker").attr("id", n + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
1436
1436
|
}, "circle"),
|
|
1437
|
-
cross: /* @__PURE__ */
|
|
1437
|
+
cross: /* @__PURE__ */ s((e, t, n) => {
|
|
1438
1438
|
e.append("marker").attr("id", n + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
1439
1439
|
}, "cross"),
|
|
1440
|
-
barb: /* @__PURE__ */
|
|
1440
|
+
barb: /* @__PURE__ */ s((e, t, n) => {
|
|
1441
1441
|
e.append("defs").append("marker").attr("id", n + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
1442
1442
|
}, "barb")
|
|
1443
1443
|
}, _e = he, L = f()?.block?.padding ?? 8;
|
|
@@ -1455,110 +1455,110 @@ function R(e, t) {
|
|
|
1455
1455
|
py: Math.floor(t / e)
|
|
1456
1456
|
};
|
|
1457
1457
|
}
|
|
1458
|
-
|
|
1459
|
-
var ve = /* @__PURE__ */
|
|
1460
|
-
let
|
|
1461
|
-
for (let
|
|
1462
|
-
let { width:
|
|
1458
|
+
s(R, "calculateBlockPosition");
|
|
1459
|
+
var ve = /* @__PURE__ */ s((e) => {
|
|
1460
|
+
let t = 0, n = 0;
|
|
1461
|
+
for (let r of e.children) {
|
|
1462
|
+
let { width: e, height: i, x: a, y: s } = r.size ?? {
|
|
1463
1463
|
width: 0,
|
|
1464
1464
|
height: 0,
|
|
1465
1465
|
x: 0,
|
|
1466
1466
|
y: 0
|
|
1467
1467
|
};
|
|
1468
|
-
|
|
1468
|
+
o.debug("getMaxChildSize abc95 child:", r.id, "width:", e, "height:", i, "x:", a, "y:", s, r.type), r.type !== "space" && (e > t && (t = e / (r.widthInColumns ?? 1)), i > n && (n = i));
|
|
1469
1469
|
}
|
|
1470
1470
|
return {
|
|
1471
|
-
width:
|
|
1472
|
-
height:
|
|
1471
|
+
width: t,
|
|
1472
|
+
height: n
|
|
1473
1473
|
};
|
|
1474
1474
|
}, "getMaxChildSize");
|
|
1475
|
-
function z(t, n
|
|
1476
|
-
|
|
1477
|
-
width:
|
|
1478
|
-
height:
|
|
1475
|
+
function z(e, t, n = 0, r = 0) {
|
|
1476
|
+
o.debug("setBlockSizes abc95 (start)", e.id, e?.size?.x, "block width =", e?.size, "siblingWidth", n), e?.size?.width || (e.size = {
|
|
1477
|
+
width: n,
|
|
1478
|
+
height: r,
|
|
1479
1479
|
x: 0,
|
|
1480
1480
|
y: 0
|
|
1481
1481
|
});
|
|
1482
|
-
let
|
|
1483
|
-
if (
|
|
1484
|
-
for (let
|
|
1485
|
-
let s = ve(
|
|
1486
|
-
|
|
1487
|
-
for (let
|
|
1488
|
-
for (let
|
|
1489
|
-
let c =
|
|
1490
|
-
for (let
|
|
1491
|
-
let u =
|
|
1482
|
+
let i = 0, a = 0;
|
|
1483
|
+
if (e.children?.length > 0) {
|
|
1484
|
+
for (let n of e.children) z(n, t);
|
|
1485
|
+
let s = ve(e);
|
|
1486
|
+
i = s.width, a = s.height, o.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", i, a);
|
|
1487
|
+
for (let t of e.children) t.size && (o.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${i} ${a} ${JSON.stringify(t.size)}`), t.size.width = i * (t.widthInColumns ?? 1) + L * ((t.widthInColumns ?? 1) - 1), t.size.height = a, t.size.x = 0, t.size.y = 0, o.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${i} maxHeight:${a}`));
|
|
1488
|
+
for (let n of e.children) z(n, t, i, a);
|
|
1489
|
+
let c = e.columns ?? -1, l = 0;
|
|
1490
|
+
for (let t of e.children) l += t.widthInColumns ?? 1;
|
|
1491
|
+
let u = e.children.length;
|
|
1492
1492
|
c > 0 && c < l && (u = c);
|
|
1493
|
-
let d = Math.ceil(l / u), f = u * (
|
|
1494
|
-
if (f <
|
|
1495
|
-
|
|
1496
|
-
let
|
|
1497
|
-
|
|
1498
|
-
for (let
|
|
1493
|
+
let d = Math.ceil(l / u), f = u * (i + L) + L, p = d * (a + L) + L;
|
|
1494
|
+
if (f < n) {
|
|
1495
|
+
o.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${n} siblingHeight ${r} width ${f}`), f = n, p = r;
|
|
1496
|
+
let t = (n - u * L - L) / u, s = (r - d * L - L) / d;
|
|
1497
|
+
o.debug("Size indata abc88", e.id, "childWidth", t, "maxWidth", i), o.debug("Size indata abc88", e.id, "childHeight", s, "maxHeight", a), o.debug("Size indata abc88 xSize", u, "padding", L);
|
|
1498
|
+
for (let n of e.children) n.size && (n.size.width = t, n.size.height = s, n.size.x = 0, n.size.y = 0);
|
|
1499
1499
|
}
|
|
1500
|
-
if (
|
|
1501
|
-
f =
|
|
1502
|
-
let
|
|
1503
|
-
if (
|
|
1504
|
-
let
|
|
1505
|
-
|
|
1506
|
-
for (let
|
|
1500
|
+
if (o.debug(`abc95 (finale calc) ${e.id} xSize ${u} ySize ${d} columns ${c}${e.children.length} width=${Math.max(f, e.size?.width || 0)}`), f < (e?.size?.width || 0)) {
|
|
1501
|
+
f = e?.size?.width || 0;
|
|
1502
|
+
let t = c > 0 ? Math.min(e.children.length, c) : e.children.length;
|
|
1503
|
+
if (t > 0) {
|
|
1504
|
+
let n = (f - t * L - L) / t;
|
|
1505
|
+
o.debug("abc95 (growing to fit) width", e.id, f, e.size?.width, n);
|
|
1506
|
+
for (let t of e.children) t.size && (t.size.width = n);
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
|
-
|
|
1509
|
+
e.size = {
|
|
1510
1510
|
width: f,
|
|
1511
1511
|
height: p,
|
|
1512
1512
|
x: 0,
|
|
1513
1513
|
y: 0
|
|
1514
1514
|
};
|
|
1515
1515
|
}
|
|
1516
|
-
|
|
1516
|
+
o.debug("setBlockSizes abc94 (done)", e.id, e?.size?.x, e?.size?.width, e?.size?.y, e?.size?.height);
|
|
1517
1517
|
}
|
|
1518
|
-
|
|
1519
|
-
function ye(
|
|
1520
|
-
|
|
1521
|
-
let
|
|
1522
|
-
if (
|
|
1523
|
-
let
|
|
1524
|
-
|
|
1525
|
-
let
|
|
1526
|
-
{
|
|
1527
|
-
let
|
|
1528
|
-
for (let
|
|
1529
|
-
if (!
|
|
1530
|
-
let { py:
|
|
1531
|
-
|
|
1532
|
-
let
|
|
1533
|
-
|
|
1518
|
+
s(z, "setBlockSizes");
|
|
1519
|
+
function ye(e, t) {
|
|
1520
|
+
o.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
|
|
1521
|
+
let n = e.columns ?? -1;
|
|
1522
|
+
if (o.debug("layoutBlocks columns abc95", e.id, "=>", n, e), e.children && e.children.length > 0) {
|
|
1523
|
+
let r = e?.children[0]?.size?.width ?? 0, i = e.children.length * r + (e.children.length - 1) * L;
|
|
1524
|
+
o.debug("widthOfChildren 88", i, "posX");
|
|
1525
|
+
let a = /* @__PURE__ */ new Map();
|
|
1526
|
+
{
|
|
1527
|
+
let t = 0;
|
|
1528
|
+
for (let r of e.children) {
|
|
1529
|
+
if (!r.size) continue;
|
|
1530
|
+
let { py: e } = R(n, t), i = a.get(e) ?? 0;
|
|
1531
|
+
r.size.height > i && a.set(e, r.size.height);
|
|
1532
|
+
let o = r?.widthInColumns ?? 1;
|
|
1533
|
+
n > 0 && (o = Math.min(o, n - t % n)), t += o;
|
|
1534
1534
|
}
|
|
1535
1535
|
}
|
|
1536
1536
|
let s = /* @__PURE__ */ new Map();
|
|
1537
1537
|
{
|
|
1538
|
-
let e = 0, t = [...
|
|
1539
|
-
for (let n of t) s.set(n, e), e += (
|
|
1538
|
+
let e = 0, t = [...a.keys()].sort((e, t) => e - t);
|
|
1539
|
+
for (let n of t) s.set(n, e), e += (a.get(n) ?? 0) + L;
|
|
1540
1540
|
}
|
|
1541
1541
|
let c = 0;
|
|
1542
|
-
|
|
1543
|
-
let l =
|
|
1544
|
-
for (let
|
|
1545
|
-
let
|
|
1546
|
-
if (!
|
|
1547
|
-
let { width: d, height: f } =
|
|
1548
|
-
if (m != u && (u = m, l =
|
|
1549
|
-
let
|
|
1550
|
-
|
|
1551
|
-
let
|
|
1552
|
-
|
|
1542
|
+
o.debug("abc91 block?.size?.x", e.id, e?.size?.x);
|
|
1543
|
+
let l = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -L, u = 0;
|
|
1544
|
+
for (let r of e.children) {
|
|
1545
|
+
let i = e;
|
|
1546
|
+
if (!r.size) continue;
|
|
1547
|
+
let { width: d, height: f } = r.size, { px: p, py: m } = R(n, c);
|
|
1548
|
+
if (m != u && (u = m, l = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -L, o.debug("New row in layout for block", e.id, " and child ", r.id, u)), o.debug(`abc89 layout blocks (child) id: ${r.id} Pos: ${c} (px, py) ${p},${m} (${i?.size?.x},${i?.size?.y}) parent: ${i.id} width: ${d}${L}`), i.size) {
|
|
1549
|
+
let e = d / 2;
|
|
1550
|
+
r.size.x = l + L + e, o.debug(`abc91 layout blocks (calc) px, pyid:${r.id} startingPos=X${l} new startingPosX${r.size.x} ${e} padding=${L} width=${d} halfWidth=${e} => x:${r.size.x} y:${r.size.y} ${r.widthInColumns} (width * (child?.w || 1)) / 2 ${d * (r?.widthInColumns ?? 1) / 2}`), l = r.size.x + e;
|
|
1551
|
+
let t = s.get(m) ?? 0, n = a.get(m) ?? f;
|
|
1552
|
+
r.size.y = i.size.y - i.size.height / 2 + t + n / 2 + L, o.debug(`abc88 layout blocks (calc) px, pyid:${r.id}startingPosX${l}${L}${e}=>x:${r.size.x}y:${r.size.y}${r.widthInColumns}(width * (child?.w || 1)) / 2${d * (r?.widthInColumns ?? 1) / 2}`);
|
|
1553
1553
|
}
|
|
1554
|
-
|
|
1555
|
-
let h =
|
|
1556
|
-
|
|
1554
|
+
r.children && ye(r, t);
|
|
1555
|
+
let h = r?.widthInColumns ?? 1;
|
|
1556
|
+
n > 0 && (h = Math.min(h, n - c % n)), c += h, o.debug("abc88 columnsPos", r, c);
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
|
-
|
|
1559
|
+
o.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
|
|
1560
1560
|
}
|
|
1561
|
-
|
|
1561
|
+
s(ye, "layoutBlocks");
|
|
1562
1562
|
function be(e, { minX: t, minY: n, maxX: r, maxY: i } = {
|
|
1563
1563
|
minX: 0,
|
|
1564
1564
|
minY: 0,
|
|
@@ -1582,21 +1582,21 @@ function be(e, { minX: t, minY: n, maxX: r, maxY: i } = {
|
|
|
1582
1582
|
maxY: i
|
|
1583
1583
|
};
|
|
1584
1584
|
}
|
|
1585
|
-
|
|
1586
|
-
function xe(
|
|
1587
|
-
let
|
|
1588
|
-
if (!
|
|
1589
|
-
z(
|
|
1590
|
-
let { minX:
|
|
1585
|
+
s(be, "findBounds");
|
|
1586
|
+
function xe(e) {
|
|
1587
|
+
let t = e.getBlock("root");
|
|
1588
|
+
if (!t) return;
|
|
1589
|
+
z(t, e, 0, 0), ye(t, e), o.debug("getBlocks", JSON.stringify(t, null, 2));
|
|
1590
|
+
let { minX: n, minY: r, maxX: i, maxY: a } = be(t), s = a - r;
|
|
1591
1591
|
return {
|
|
1592
|
-
x:
|
|
1593
|
-
y:
|
|
1594
|
-
width:
|
|
1592
|
+
x: n,
|
|
1593
|
+
y: r,
|
|
1594
|
+
width: i - n,
|
|
1595
1595
|
height: s
|
|
1596
1596
|
};
|
|
1597
1597
|
}
|
|
1598
|
-
|
|
1599
|
-
var B = /* @__PURE__ */
|
|
1598
|
+
s(xe, "layout");
|
|
1599
|
+
var B = /* @__PURE__ */ s(async (e, t, n, r = !1, i = !1) => {
|
|
1600
1600
|
let a = t || "";
|
|
1601
1601
|
typeof a == "object" && (a = a[0]);
|
|
1602
1602
|
let o = f(), s = g(o);
|
|
@@ -1608,7 +1608,7 @@ var B = /* @__PURE__ */ t(async (e, t, n, r = !1, i = !1) => {
|
|
|
1608
1608
|
isNode: i,
|
|
1609
1609
|
width: Infinity
|
|
1610
1610
|
}, o);
|
|
1611
|
-
}, "createLabel"), Se = /* @__PURE__ */
|
|
1611
|
+
}, "createLabel"), Se = /* @__PURE__ */ s((e, t, n, r, i) => {
|
|
1612
1612
|
t.arrowTypeStart && we(e, "start", t.arrowTypeStart, n, r, i), t.arrowTypeEnd && we(e, "end", t.arrowTypeEnd, n, r, i);
|
|
1613
1613
|
}, "addEdgeMarkers"), Ce = {
|
|
1614
1614
|
arrow_cross: "cross",
|
|
@@ -1620,172 +1620,172 @@ var B = /* @__PURE__ */ t(async (e, t, n, r = !1, i = !1) => {
|
|
|
1620
1620
|
composition: "composition",
|
|
1621
1621
|
dependency: "dependency",
|
|
1622
1622
|
lollipop: "lollipop"
|
|
1623
|
-
}, we = /* @__PURE__ */
|
|
1624
|
-
let s = Ce[
|
|
1623
|
+
}, we = /* @__PURE__ */ s((e, t, n, r, i, a) => {
|
|
1624
|
+
let s = Ce[n];
|
|
1625
1625
|
if (!s) {
|
|
1626
|
-
|
|
1626
|
+
o.warn(`Unknown arrow type: ${n}`);
|
|
1627
1627
|
return;
|
|
1628
1628
|
}
|
|
1629
|
-
let c =
|
|
1630
|
-
|
|
1631
|
-
}, "addEdgeMarker"), V = {}, H = {}, Te = /* @__PURE__ */
|
|
1632
|
-
let
|
|
1629
|
+
let c = t === "start" ? "Start" : "End";
|
|
1630
|
+
e.attr(`marker-${t}`, `url(${r}#${i}_${a}-${s}${c})`);
|
|
1631
|
+
}, "addEdgeMarker"), V = {}, H = {}, Te = /* @__PURE__ */ s(async (e, t) => {
|
|
1632
|
+
let n = f(), r = g(n), i = e.insert("g").attr("class", "edgeLabel"), a = i.insert("g").attr("class", "label"), o = t.labelType === "markdown", s = await b(e, t.label, {
|
|
1633
1633
|
style: t.labelStyle,
|
|
1634
|
-
useHtmlLabels:
|
|
1635
|
-
addSvgBackground:
|
|
1634
|
+
useHtmlLabels: r,
|
|
1635
|
+
addSvgBackground: o,
|
|
1636
1636
|
isNode: !1,
|
|
1637
|
-
markdown:
|
|
1638
|
-
width:
|
|
1639
|
-
},
|
|
1640
|
-
|
|
1641
|
-
let l =
|
|
1642
|
-
if (
|
|
1643
|
-
let e =
|
|
1637
|
+
markdown: o,
|
|
1638
|
+
width: o ? void 0 : Infinity
|
|
1639
|
+
}, n);
|
|
1640
|
+
a.node().appendChild(s);
|
|
1641
|
+
let l = s.getBBox(), u = l;
|
|
1642
|
+
if (r) {
|
|
1643
|
+
let e = s.children[0], t = c(s);
|
|
1644
1644
|
l = e.getBoundingClientRect(), u = l, t.attr("width", l.width), t.attr("height", l.height);
|
|
1645
1645
|
} else {
|
|
1646
|
-
let e =
|
|
1646
|
+
let e = c(s).select("text").node();
|
|
1647
1647
|
e && typeof e.getBBox == "function" && (u = e.getBBox());
|
|
1648
1648
|
}
|
|
1649
|
-
|
|
1649
|
+
a.attr("transform", C(u, r)), V[t.id] = i, t.width = l.width, t.height = l.height;
|
|
1650
1650
|
let d;
|
|
1651
1651
|
if (t.startLabelLeft) {
|
|
1652
|
-
let
|
|
1653
|
-
d =
|
|
1654
|
-
let
|
|
1655
|
-
if (
|
|
1656
|
-
let e =
|
|
1657
|
-
|
|
1652
|
+
let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = await B(i, t.startLabelLeft, t.labelStyle);
|
|
1653
|
+
d = a;
|
|
1654
|
+
let o = a.getBBox();
|
|
1655
|
+
if (r) {
|
|
1656
|
+
let e = a.children[0], t = c(a);
|
|
1657
|
+
o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
|
|
1658
1658
|
}
|
|
1659
|
-
|
|
1659
|
+
i.attr("transform", C(o, r)), H[t.id] || (H[t.id] = {}), H[t.id].startLeft = n, U(d, t.startLabelLeft);
|
|
1660
1660
|
}
|
|
1661
1661
|
if (t.startLabelRight) {
|
|
1662
|
-
let
|
|
1663
|
-
d =
|
|
1664
|
-
let
|
|
1665
|
-
if (
|
|
1666
|
-
let e =
|
|
1667
|
-
|
|
1662
|
+
let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = await B(n, t.startLabelRight, t.labelStyle);
|
|
1663
|
+
d = a, i.node().appendChild(a);
|
|
1664
|
+
let o = a.getBBox();
|
|
1665
|
+
if (r) {
|
|
1666
|
+
let e = a.children[0], t = c(a);
|
|
1667
|
+
o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
|
|
1668
1668
|
}
|
|
1669
|
-
|
|
1669
|
+
i.attr("transform", C(o, r)), H[t.id] || (H[t.id] = {}), H[t.id].startRight = n, U(d, t.startLabelRight);
|
|
1670
1670
|
}
|
|
1671
1671
|
if (t.endLabelLeft) {
|
|
1672
|
-
let
|
|
1673
|
-
d =
|
|
1674
|
-
let
|
|
1675
|
-
if (
|
|
1676
|
-
let e =
|
|
1677
|
-
|
|
1672
|
+
let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = await B(i, t.endLabelLeft, t.labelStyle);
|
|
1673
|
+
d = a;
|
|
1674
|
+
let o = a.getBBox();
|
|
1675
|
+
if (r) {
|
|
1676
|
+
let e = a.children[0], t = c(a);
|
|
1677
|
+
o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
|
|
1678
1678
|
}
|
|
1679
|
-
|
|
1679
|
+
i.attr("transform", C(o, r)), n.node().appendChild(a), H[t.id] || (H[t.id] = {}), H[t.id].endLeft = n, U(d, t.endLabelLeft);
|
|
1680
1680
|
}
|
|
1681
1681
|
if (t.endLabelRight) {
|
|
1682
|
-
let
|
|
1683
|
-
d =
|
|
1684
|
-
let
|
|
1685
|
-
if (
|
|
1686
|
-
let e =
|
|
1687
|
-
|
|
1682
|
+
let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = await B(i, t.endLabelRight, t.labelStyle);
|
|
1683
|
+
d = a;
|
|
1684
|
+
let o = a.getBBox();
|
|
1685
|
+
if (r) {
|
|
1686
|
+
let e = a.children[0], t = c(a);
|
|
1687
|
+
o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
|
|
1688
1688
|
}
|
|
1689
|
-
|
|
1689
|
+
i.attr("transform", C(o, r)), n.node().appendChild(a), H[t.id] || (H[t.id] = {}), H[t.id].endRight = n, U(d, t.endLabelRight);
|
|
1690
1690
|
}
|
|
1691
|
-
return
|
|
1691
|
+
return s;
|
|
1692
1692
|
}, "insertEdgeLabel");
|
|
1693
1693
|
function U(e, t) {
|
|
1694
1694
|
g(f()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
|
|
1695
1695
|
}
|
|
1696
|
-
|
|
1697
|
-
var Ee = /* @__PURE__ */
|
|
1698
|
-
|
|
1699
|
-
let r =
|
|
1700
|
-
if (
|
|
1701
|
-
let
|
|
1696
|
+
s(U, "setTerminalWidth");
|
|
1697
|
+
var Ee = /* @__PURE__ */ s((e, t) => {
|
|
1698
|
+
o.debug("Moving label abc88 ", e.id, e.label, V[e.id], t);
|
|
1699
|
+
let r = t.updatedPath ? t.updatedPath : t.originalPath, { subGraphTitleTotalMargin: i } = w(f());
|
|
1700
|
+
if (e.label) {
|
|
1701
|
+
let a = V[e.id], s = e.x, c = e.y;
|
|
1702
1702
|
if (r) {
|
|
1703
|
-
let i =
|
|
1704
|
-
|
|
1703
|
+
let i = n.calcLabelPosition(r);
|
|
1704
|
+
o.debug("Moving label " + e.label + " from (", s, ",", c, ") to (", i.x, ",", i.y, ") abc88"), t.updatedPath && (s = i.x, c = i.y);
|
|
1705
1705
|
}
|
|
1706
|
-
|
|
1706
|
+
a.attr("transform", `translate(${s}, ${c + i / 2})`);
|
|
1707
1707
|
}
|
|
1708
|
-
if (
|
|
1709
|
-
let
|
|
1708
|
+
if (e.startLabelLeft) {
|
|
1709
|
+
let t = H[e.id].startLeft, i = e.x, a = e.y;
|
|
1710
1710
|
if (r) {
|
|
1711
|
-
let
|
|
1712
|
-
|
|
1711
|
+
let t = n.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", r);
|
|
1712
|
+
i = t.x, a = t.y;
|
|
1713
1713
|
}
|
|
1714
|
-
|
|
1714
|
+
t.attr("transform", `translate(${i}, ${a})`);
|
|
1715
1715
|
}
|
|
1716
|
-
if (
|
|
1717
|
-
let
|
|
1716
|
+
if (e.startLabelRight) {
|
|
1717
|
+
let t = H[e.id].startRight, i = e.x, a = e.y;
|
|
1718
1718
|
if (r) {
|
|
1719
|
-
let
|
|
1720
|
-
|
|
1719
|
+
let t = n.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", r);
|
|
1720
|
+
i = t.x, a = t.y;
|
|
1721
1721
|
}
|
|
1722
|
-
|
|
1722
|
+
t.attr("transform", `translate(${i}, ${a})`);
|
|
1723
1723
|
}
|
|
1724
|
-
if (
|
|
1725
|
-
let
|
|
1724
|
+
if (e.endLabelLeft) {
|
|
1725
|
+
let t = H[e.id].endLeft, i = e.x, a = e.y;
|
|
1726
1726
|
if (r) {
|
|
1727
|
-
let
|
|
1728
|
-
|
|
1727
|
+
let t = n.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", r);
|
|
1728
|
+
i = t.x, a = t.y;
|
|
1729
1729
|
}
|
|
1730
|
-
|
|
1730
|
+
t.attr("transform", `translate(${i}, ${a})`);
|
|
1731
1731
|
}
|
|
1732
|
-
if (
|
|
1733
|
-
let
|
|
1732
|
+
if (e.endLabelRight) {
|
|
1733
|
+
let t = H[e.id].endRight, i = e.x, a = e.y;
|
|
1734
1734
|
if (r) {
|
|
1735
|
-
let
|
|
1736
|
-
|
|
1735
|
+
let t = n.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", r);
|
|
1736
|
+
i = t.x, a = t.y;
|
|
1737
1737
|
}
|
|
1738
|
-
|
|
1738
|
+
t.attr("transform", `translate(${i}, ${a})`);
|
|
1739
1739
|
}
|
|
1740
|
-
}, "positionEdgeLabel"), De = /* @__PURE__ */
|
|
1740
|
+
}, "positionEdgeLabel"), De = /* @__PURE__ */ s((e, t) => {
|
|
1741
1741
|
let n = e.x, r = e.y, i = Math.abs(t.x - n), a = Math.abs(t.y - r), o = e.width / 2, s = e.height / 2;
|
|
1742
1742
|
return i >= o || a >= s;
|
|
1743
|
-
}, "outsideNode"), Oe = /* @__PURE__ */
|
|
1744
|
-
|
|
1745
|
-
outsidePoint: ${JSON.stringify(
|
|
1746
|
-
insidePoint : ${JSON.stringify(
|
|
1747
|
-
node : x:${
|
|
1748
|
-
let
|
|
1749
|
-
if (Math.abs(
|
|
1750
|
-
let
|
|
1751
|
-
c = d *
|
|
1752
|
-
let
|
|
1753
|
-
x:
|
|
1754
|
-
y:
|
|
1743
|
+
}, "outsideNode"), Oe = /* @__PURE__ */ s((e, t, n) => {
|
|
1744
|
+
o.debug(`intersection calc abc89:
|
|
1745
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
1746
|
+
insidePoint : ${JSON.stringify(n)}
|
|
1747
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
|
|
1748
|
+
let r = e.x, i = e.y, a = Math.abs(r - n.x), s = e.width / 2, c = n.x < t.x ? s - a : s + a, l = e.height / 2, u = Math.abs(t.y - n.y), d = Math.abs(t.x - n.x);
|
|
1749
|
+
if (Math.abs(i - t.y) * s > Math.abs(r - t.x) * l) {
|
|
1750
|
+
let e = n.y < t.y ? t.y - l - i : i - l - t.y;
|
|
1751
|
+
c = d * e / u;
|
|
1752
|
+
let r = {
|
|
1753
|
+
x: n.x < t.x ? n.x + c : n.x - d + c,
|
|
1754
|
+
y: n.y < t.y ? n.y + u - e : n.y - u + e
|
|
1755
1755
|
};
|
|
1756
|
-
return c === 0 && (
|
|
1756
|
+
return c === 0 && (r.x = t.x, r.y = t.y), d === 0 && (r.x = t.x), u === 0 && (r.y = t.y), o.debug(`abc89 topp/bott calc, Q ${u}, q ${e}, R ${d}, r ${c}`, r), r;
|
|
1757
1757
|
} else {
|
|
1758
|
-
c =
|
|
1759
|
-
let
|
|
1760
|
-
return
|
|
1761
|
-
_x:
|
|
1762
|
-
_y:
|
|
1763
|
-
}), c === 0 && (
|
|
1764
|
-
x:
|
|
1765
|
-
y:
|
|
1758
|
+
c = n.x < t.x ? t.x - s - r : r - s - t.x;
|
|
1759
|
+
let e = u * c / d, i = n.x < t.x ? n.x + d - c : n.x - d + c, a = n.y < t.y ? n.y + e : n.y - e;
|
|
1760
|
+
return o.debug(`sides calc abc89, Q ${u}, q ${e}, R ${d}, r ${c}`, {
|
|
1761
|
+
_x: i,
|
|
1762
|
+
_y: a
|
|
1763
|
+
}), c === 0 && (i = t.x, a = t.y), d === 0 && (i = t.x), u === 0 && (a = t.y), {
|
|
1764
|
+
x: i,
|
|
1765
|
+
y: a
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
|
-
}, "intersection"), ke = /* @__PURE__ */
|
|
1769
|
-
|
|
1770
|
-
let
|
|
1771
|
-
return
|
|
1772
|
-
if (!De(
|
|
1773
|
-
let
|
|
1774
|
-
|
|
1775
|
-
o ||= e.x ===
|
|
1776
|
-
}),
|
|
1777
|
-
} else
|
|
1778
|
-
}),
|
|
1779
|
-
}, "cutPathAtIntersect"), Ae = /* @__PURE__ */
|
|
1780
|
-
let u =
|
|
1781
|
-
|
|
1768
|
+
}, "intersection"), ke = /* @__PURE__ */ s((e, t) => {
|
|
1769
|
+
o.debug("abc88 cutPathAtIntersect", e, t);
|
|
1770
|
+
let n = [], r = e[0], i = !1;
|
|
1771
|
+
return e.forEach((e) => {
|
|
1772
|
+
if (!De(t, e) && !i) {
|
|
1773
|
+
let a = Oe(t, r, e), o = !1;
|
|
1774
|
+
n.forEach((e) => {
|
|
1775
|
+
o ||= e.x === a.x && e.y === a.y;
|
|
1776
|
+
}), n.some((e) => e.x === a.x && e.y === a.y) || n.push(a), i = !0;
|
|
1777
|
+
} else r = e, i || n.push(e);
|
|
1778
|
+
}), n;
|
|
1779
|
+
}, "cutPathAtIntersect"), Ae = /* @__PURE__ */ s(function(t, n, r, i, a, s, c) {
|
|
1780
|
+
let u = r.points;
|
|
1781
|
+
o.debug("abc88 InsertEdge: edge=", r, "e=", n);
|
|
1782
1782
|
let d = !1, p = s.node(n.v);
|
|
1783
1783
|
var m = s.node(n.w);
|
|
1784
|
-
m?.intersect && p?.intersect && (u = u.slice(1,
|
|
1785
|
-
let h = u.filter((e) => !Number.isNaN(e.y)), g =
|
|
1786
|
-
|
|
1787
|
-
let { x: _, y: v } = S(
|
|
1788
|
-
switch (
|
|
1784
|
+
m?.intersect && p?.intersect && (u = u.slice(1, r.points.length - 1), u.unshift(p.intersect(u[0])), u.push(m.intersect(u[u.length - 1]))), r.toCluster && (o.debug("to cluster abc88", i[r.toCluster]), u = ke(r.points, i[r.toCluster].node), d = !0), r.fromCluster && (o.debug("from cluster abc88", i[r.fromCluster]), u = ke(u.reverse(), i[r.fromCluster].node).reverse(), d = !0);
|
|
1785
|
+
let h = u.filter((e) => !Number.isNaN(e.y)), g = e;
|
|
1786
|
+
r.curve && (a === "graph" || a === "flowchart") && (g = r.curve);
|
|
1787
|
+
let { x: _, y: v } = S(r), b = y().x(_).y(v).curve(g), x;
|
|
1788
|
+
switch (r.thickness) {
|
|
1789
1789
|
case "normal":
|
|
1790
1790
|
x = "edge-thickness-normal";
|
|
1791
1791
|
break;
|
|
@@ -1797,7 +1797,7 @@ var Ee = /* @__PURE__ */ t((t, n) => {
|
|
|
1797
1797
|
break;
|
|
1798
1798
|
default: x = "";
|
|
1799
1799
|
}
|
|
1800
|
-
switch (
|
|
1800
|
+
switch (r.pattern) {
|
|
1801
1801
|
case "solid":
|
|
1802
1802
|
x += " edge-pattern-solid";
|
|
1803
1803
|
break;
|
|
@@ -1808,11 +1808,11 @@ var Ee = /* @__PURE__ */ t((t, n) => {
|
|
|
1808
1808
|
x += " edge-pattern-dashed";
|
|
1809
1809
|
break;
|
|
1810
1810
|
}
|
|
1811
|
-
let C = t.append("path").attr("d", b(h)).attr("id",
|
|
1812
|
-
(f().flowchart.arrowMarkerAbsolute || f().state.arrowMarkerAbsolute) && (w = l(!0)), Se(C,
|
|
1811
|
+
let C = t.append("path").attr("d", b(h)).attr("id", r.id).attr("class", " " + x + (r.classes ? " " + r.classes : "")).attr("style", r.style), w = "";
|
|
1812
|
+
(f().flowchart.arrowMarkerAbsolute || f().state.arrowMarkerAbsolute) && (w = l(!0)), Se(C, r, w, c, a);
|
|
1813
1813
|
let T = {};
|
|
1814
|
-
return d && (T.updatedPath = u), T.originalPath =
|
|
1815
|
-
}, "insertEdge"), je = /* @__PURE__ */
|
|
1814
|
+
return d && (T.updatedPath = u), T.originalPath = r.points, T;
|
|
1815
|
+
}, "insertEdge"), je = /* @__PURE__ */ s((e) => {
|
|
1816
1816
|
let t = /* @__PURE__ */ new Set();
|
|
1817
1817
|
for (let n of e) switch (n) {
|
|
1818
1818
|
case "x":
|
|
@@ -1826,7 +1826,7 @@ var Ee = /* @__PURE__ */ t((t, n) => {
|
|
|
1826
1826
|
break;
|
|
1827
1827
|
}
|
|
1828
1828
|
return t;
|
|
1829
|
-
}, "expandAndDeduplicateDirections"), Me = /* @__PURE__ */
|
|
1829
|
+
}, "expandAndDeduplicateDirections"), Me = /* @__PURE__ */ s((e, t, n) => {
|
|
1830
1830
|
let r = je(e), i = t.height + 2 * n.padding, a = i / 2, o = t.width + 2 * a + n.padding, s = n.padding / 2;
|
|
1831
1831
|
return r.has("right") && r.has("left") && r.has("up") && r.has("down") ? [
|
|
1832
1832
|
{
|
|
@@ -2235,7 +2235,7 @@ var Ee = /* @__PURE__ */ t((t, n) => {
|
|
|
2235
2235
|
function Ne(e, t) {
|
|
2236
2236
|
return e.intersect(t);
|
|
2237
2237
|
}
|
|
2238
|
-
|
|
2238
|
+
s(Ne, "intersectNode");
|
|
2239
2239
|
var Pe = Ne;
|
|
2240
2240
|
function Fe(e, t, n, r) {
|
|
2241
2241
|
var i = e.x, a = e.y, o = i - r.x, s = a - r.y, c = Math.sqrt(t * t * s * s + n * n * o * o), l = Math.abs(t * n * o / c);
|
|
@@ -2246,12 +2246,12 @@ function Fe(e, t, n, r) {
|
|
|
2246
2246
|
y: a + u
|
|
2247
2247
|
};
|
|
2248
2248
|
}
|
|
2249
|
-
|
|
2249
|
+
s(Fe, "intersectEllipse");
|
|
2250
2250
|
var Ie = Fe;
|
|
2251
2251
|
function Le(e, t, n) {
|
|
2252
2252
|
return Ie(e, t, t, n);
|
|
2253
2253
|
}
|
|
2254
|
-
|
|
2254
|
+
s(Le, "intersectCircle");
|
|
2255
2255
|
var Re = Le;
|
|
2256
2256
|
function ze(e, t, n, r) {
|
|
2257
2257
|
var i = t.y - e.y, a, o = e.x - t.x, s, c = t.x * e.y - e.x * t.y, l, u, d, f = i * n.x + o * n.y + c, p = i * r.x + o * r.y + c, m, h, g, _, v;
|
|
@@ -2260,11 +2260,11 @@ function ze(e, t, n, r) {
|
|
|
2260
2260
|
y: v
|
|
2261
2261
|
};
|
|
2262
2262
|
}
|
|
2263
|
-
|
|
2263
|
+
s(ze, "intersectLine");
|
|
2264
2264
|
function W(e, t) {
|
|
2265
2265
|
return e * t > 0;
|
|
2266
2266
|
}
|
|
2267
|
-
|
|
2267
|
+
s(W, "sameSign");
|
|
2268
2268
|
var Be = ze, Ve = He;
|
|
2269
2269
|
function He(e, t, n) {
|
|
2270
2270
|
var r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
|
|
@@ -2286,42 +2286,42 @@ function He(e, t, n) {
|
|
|
2286
2286
|
return a < c ? -1 : a === c ? 0 : 1;
|
|
2287
2287
|
}), a[0]) : e;
|
|
2288
2288
|
}
|
|
2289
|
-
|
|
2289
|
+
s(He, "intersectPolygon");
|
|
2290
2290
|
var G = {
|
|
2291
2291
|
node: Pe,
|
|
2292
2292
|
circle: Re,
|
|
2293
2293
|
ellipse: Ie,
|
|
2294
2294
|
polygon: Ve,
|
|
2295
|
-
rect: /* @__PURE__ */
|
|
2295
|
+
rect: /* @__PURE__ */ s((e, t) => {
|
|
2296
2296
|
var n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2, c, l;
|
|
2297
2297
|
return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), c = a === 0 ? 0 : s * i / a, l = s) : (i < 0 && (o = -o), c = o, l = i === 0 ? 0 : o * a / i), {
|
|
2298
2298
|
x: n + c,
|
|
2299
2299
|
y: r + l
|
|
2300
2300
|
};
|
|
2301
2301
|
}, "intersectRect")
|
|
2302
|
-
}, K = /* @__PURE__ */
|
|
2303
|
-
let a = f(),
|
|
2304
|
-
|
|
2305
|
-
let l = e.insert("g").attr("class",
|
|
2302
|
+
}, K = /* @__PURE__ */ s(async (e, t, n, i) => {
|
|
2303
|
+
let a = f(), o, s = t.useHtmlLabels || g(a);
|
|
2304
|
+
o = n || "node default";
|
|
2305
|
+
let l = e.insert("g").attr("class", o).attr("id", t.domId || t.id), d = l.insert("g").attr("class", "label").attr("style", t.labelStyle), p;
|
|
2306
2306
|
p = t.labelText === void 0 ? "" : typeof t.labelText == "string" ? t.labelText : t.labelText[0];
|
|
2307
2307
|
let m;
|
|
2308
|
-
m = t.labelType === "markdown" ? b(d, u(
|
|
2309
|
-
useHtmlLabels:
|
|
2308
|
+
m = t.labelType === "markdown" ? b(d, u(r(p), a), {
|
|
2309
|
+
useHtmlLabels: s,
|
|
2310
2310
|
width: t.width || a.flowchart.wrappingWidth,
|
|
2311
2311
|
classes: "markdown-node-label"
|
|
2312
|
-
}, a) : await B(d, u(
|
|
2312
|
+
}, a) : await B(d, u(r(p), a), t.labelStyle, !1, i);
|
|
2313
2313
|
let h = m.getBBox(), _ = t.padding / 2;
|
|
2314
2314
|
if (g(a)) {
|
|
2315
|
-
let e = m.children[0], t =
|
|
2315
|
+
let e = m.children[0], t = c(m);
|
|
2316
2316
|
await T(e, p), h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
|
|
2317
2317
|
}
|
|
2318
|
-
return
|
|
2318
|
+
return s ? d.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")") : d.attr("transform", "translate(0, " + -h.height / 2 + ")"), t.centerLabel && d.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), d.insert("rect", ":first-child"), {
|
|
2319
2319
|
shapeSvg: l,
|
|
2320
2320
|
bbox: h,
|
|
2321
2321
|
halfPadding: _,
|
|
2322
2322
|
label: d
|
|
2323
2323
|
};
|
|
2324
|
-
}, "labelHelper"), q = /* @__PURE__ */
|
|
2324
|
+
}, "labelHelper"), q = /* @__PURE__ */ s((e, t) => {
|
|
2325
2325
|
let n = t.node().getBBox();
|
|
2326
2326
|
e.width = n.width, e.height = n.height;
|
|
2327
2327
|
}, "updateNodeBounds");
|
|
@@ -2330,40 +2330,40 @@ function J(e, t, n, r) {
|
|
|
2330
2330
|
return e.x + "," + e.y;
|
|
2331
2331
|
}).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
|
|
2332
2332
|
}
|
|
2333
|
-
|
|
2334
|
-
var Ue = /* @__PURE__ */
|
|
2335
|
-
|
|
2336
|
-
let { shapeSvg:
|
|
2337
|
-
|
|
2338
|
-
let
|
|
2339
|
-
return
|
|
2340
|
-
return G.rect(
|
|
2341
|
-
},
|
|
2342
|
-
}, "note"), We = /* @__PURE__ */
|
|
2343
|
-
let { shapeSvg:
|
|
2333
|
+
s(J, "insertPolygonShape");
|
|
2334
|
+
var Ue = /* @__PURE__ */ s(async (e, t) => {
|
|
2335
|
+
t.useHtmlLabels || g(f()) || (t.centerLabel = !0);
|
|
2336
|
+
let { shapeSvg: n, bbox: r, halfPadding: i } = await K(e, t, "node " + t.classes, !0);
|
|
2337
|
+
o.info("Classes = ", t.classes);
|
|
2338
|
+
let a = n.insert("rect", ":first-child");
|
|
2339
|
+
return a.attr("rx", t.rx).attr("ry", t.ry).attr("x", -r.width / 2 - i).attr("y", -r.height / 2 - i).attr("width", r.width + t.padding).attr("height", r.height + t.padding), q(t, a), t.intersect = function(e) {
|
|
2340
|
+
return G.rect(t, e);
|
|
2341
|
+
}, n;
|
|
2342
|
+
}, "note"), We = /* @__PURE__ */ s((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ s((e, t) => `${t || "node default"}${We(e.classes)} ${We(e.class)}`, "getClassesFromNode"), Ge = /* @__PURE__ */ s(async (e, t) => {
|
|
2343
|
+
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding + (r.height + t.padding), a = [
|
|
2344
2344
|
{
|
|
2345
|
-
x:
|
|
2345
|
+
x: i / 2,
|
|
2346
2346
|
y: 0
|
|
2347
2347
|
},
|
|
2348
2348
|
{
|
|
2349
|
-
x:
|
|
2350
|
-
y: -
|
|
2349
|
+
x: i,
|
|
2350
|
+
y: -i / 2
|
|
2351
2351
|
},
|
|
2352
2352
|
{
|
|
2353
|
-
x:
|
|
2354
|
-
y: -
|
|
2353
|
+
x: i / 2,
|
|
2354
|
+
y: -i
|
|
2355
2355
|
},
|
|
2356
2356
|
{
|
|
2357
2357
|
x: 0,
|
|
2358
|
-
y: -
|
|
2358
|
+
y: -i / 2
|
|
2359
2359
|
}
|
|
2360
2360
|
];
|
|
2361
|
-
|
|
2362
|
-
let s = J(
|
|
2363
|
-
return s.attr("style",
|
|
2364
|
-
return
|
|
2365
|
-
},
|
|
2366
|
-
}, "question"), Ke = /* @__PURE__ */
|
|
2361
|
+
o.info("Question main (Circle)");
|
|
2362
|
+
let s = J(n, i, i, a);
|
|
2363
|
+
return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
|
|
2364
|
+
return o.warn("Intersect called"), G.polygon(t, a, e);
|
|
2365
|
+
}, n;
|
|
2366
|
+
}, "question"), Ke = /* @__PURE__ */ s((e, t) => {
|
|
2367
2367
|
let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
|
|
2368
2368
|
return n.insert("polygon", ":first-child").attr("points", [
|
|
2369
2369
|
{
|
|
@@ -2387,7 +2387,7 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
|
|
|
2387
2387
|
}).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(e) {
|
|
2388
2388
|
return G.circle(t, 14, e);
|
|
2389
2389
|
}, n;
|
|
2390
|
-
}, "choice"), qe = /* @__PURE__ */
|
|
2390
|
+
}, "choice"), qe = /* @__PURE__ */ s(async (e, t) => {
|
|
2391
2391
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.height + t.padding, a = i / 4, o = r.width + 2 * a + t.padding, s = [
|
|
2392
2392
|
{
|
|
2393
2393
|
x: a,
|
|
@@ -2417,12 +2417,12 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
|
|
|
2417
2417
|
return c.attr("style", t.style), q(t, c), t.intersect = function(e) {
|
|
2418
2418
|
return G.polygon(t, s, e);
|
|
2419
2419
|
}, n;
|
|
2420
|
-
}, "hexagon"), Je = /* @__PURE__ */
|
|
2420
|
+
}, "hexagon"), Je = /* @__PURE__ */ s(async (e, t) => {
|
|
2421
2421
|
let { shapeSvg: n, bbox: r } = await K(e, t, void 0, !0), i = r.height + 2 * t.padding, a = i / 2, o = r.width + 2 * a + t.padding, s = Me(t.directions, r, t), c = J(n, o, i, s);
|
|
2422
2422
|
return c.attr("style", t.style), q(t, c), t.intersect = function(e) {
|
|
2423
2423
|
return G.polygon(t, s, e);
|
|
2424
2424
|
}, n;
|
|
2425
|
-
}, "block_arrow"), Ye = /* @__PURE__ */
|
|
2425
|
+
}, "block_arrow"), Ye = /* @__PURE__ */ s(async (e, t) => {
|
|
2426
2426
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2427
2427
|
{
|
|
2428
2428
|
x: -a / 2,
|
|
@@ -2448,7 +2448,7 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
|
|
|
2448
2448
|
return J(n, i, a, o).attr("style", t.style), t.width = i + a, t.height = a, t.intersect = function(e) {
|
|
2449
2449
|
return G.polygon(t, o, e);
|
|
2450
2450
|
}, n;
|
|
2451
|
-
}, "rect_left_inv_arrow"), Xe = /* @__PURE__ */
|
|
2451
|
+
}, "rect_left_inv_arrow"), Xe = /* @__PURE__ */ s(async (e, t) => {
|
|
2452
2452
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2453
2453
|
{
|
|
2454
2454
|
x: -2 * a / 6,
|
|
@@ -2470,7 +2470,7 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
|
|
|
2470
2470
|
return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
|
|
2471
2471
|
return G.polygon(t, o, e);
|
|
2472
2472
|
}, n;
|
|
2473
|
-
}, "lean_right"), Ze = /* @__PURE__ */
|
|
2473
|
+
}, "lean_right"), Ze = /* @__PURE__ */ s(async (e, t) => {
|
|
2474
2474
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2475
2475
|
{
|
|
2476
2476
|
x: 2 * a / 6,
|
|
@@ -2492,7 +2492,7 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
|
|
|
2492
2492
|
return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
|
|
2493
2493
|
return G.polygon(t, o, e);
|
|
2494
2494
|
}, n;
|
|
2495
|
-
}, "lean_left"), Qe = /* @__PURE__ */
|
|
2495
|
+
}, "lean_left"), Qe = /* @__PURE__ */ s(async (e, t) => {
|
|
2496
2496
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2497
2497
|
{
|
|
2498
2498
|
x: -2 * a / 6,
|
|
@@ -2514,7 +2514,7 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
|
|
|
2514
2514
|
return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
|
|
2515
2515
|
return G.polygon(t, o, e);
|
|
2516
2516
|
}, n;
|
|
2517
|
-
}, "trapezoid"), $e = /* @__PURE__ */
|
|
2517
|
+
}, "trapezoid"), $e = /* @__PURE__ */ s(async (e, t) => {
|
|
2518
2518
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2519
2519
|
{
|
|
2520
2520
|
x: a / 6,
|
|
@@ -2536,7 +2536,7 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
|
|
|
2536
2536
|
return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
|
|
2537
2537
|
return G.polygon(t, o, e);
|
|
2538
2538
|
}, n;
|
|
2539
|
-
}, "inv_trapezoid"), et = /* @__PURE__ */
|
|
2539
|
+
}, "inv_trapezoid"), et = /* @__PURE__ */ s(async (e, t) => {
|
|
2540
2540
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2541
2541
|
{
|
|
2542
2542
|
x: 0,
|
|
@@ -2562,7 +2562,7 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
|
|
|
2562
2562
|
return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
|
|
2563
2563
|
return G.polygon(t, o, e);
|
|
2564
2564
|
}, n;
|
|
2565
|
-
}, "rect_right_inv_arrow"), tt = /* @__PURE__ */
|
|
2565
|
+
}, "rect_right_inv_arrow"), tt = /* @__PURE__ */ s(async (e, t) => {
|
|
2566
2566
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = i / 2, o = a / (2.5 + i / 50), s = r.height + o + t.padding, c = "M 0," + o + " a " + a + "," + o + " 0,0,0 " + i + " 0 a " + a + "," + o + " 0,0,0 " + -i + " 0 l 0," + s + " a " + a + "," + o + " 0,0,0 " + i + " 0 l 0," + -s;
|
|
2567
2567
|
return q(t, n.attr("label-offset-y", o).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -i / 2 + "," + -(s / 2 + o) + ")")), t.intersect = function(e) {
|
|
2568
2568
|
let n = G.rect(t, e), r = n.x - t.x;
|
|
@@ -2572,90 +2572,90 @@ var Ue = /* @__PURE__ */ t(async (t, n) => {
|
|
|
2572
2572
|
}
|
|
2573
2573
|
return n;
|
|
2574
2574
|
}, n;
|
|
2575
|
-
}, "cylinder"), nt = /* @__PURE__ */
|
|
2576
|
-
let { shapeSvg:
|
|
2577
|
-
if (
|
|
2578
|
-
let
|
|
2579
|
-
|
|
2580
|
-
|
|
2575
|
+
}, "cylinder"), nt = /* @__PURE__ */ s(async (e, t) => {
|
|
2576
|
+
let { shapeSvg: n, bbox: r, halfPadding: i } = await K(e, t, "node " + t.classes + " " + t.class, !0), a = n.insert("rect", ":first-child"), s = t.positioned ? t.width : r.width + t.padding, c = t.positioned ? t.height : r.height + t.padding, l = t.positioned ? -s / 2 : -r.width / 2 - i, u = t.positioned ? -c / 2 : -r.height / 2 - i;
|
|
2577
|
+
if (a.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", u).attr("width", s).attr("height", c), t.props) {
|
|
2578
|
+
let e = new Set(Object.keys(t.props));
|
|
2579
|
+
t.props.borders && (X(a, t.props.borders, s, c), e.delete("borders")), e.forEach((e) => {
|
|
2580
|
+
o.warn(`Unknown node property ${e}`);
|
|
2581
2581
|
});
|
|
2582
2582
|
}
|
|
2583
|
-
return q(
|
|
2584
|
-
return G.rect(
|
|
2585
|
-
},
|
|
2586
|
-
}, "rect"), rt = /* @__PURE__ */
|
|
2587
|
-
let { shapeSvg:
|
|
2588
|
-
if (
|
|
2589
|
-
let
|
|
2590
|
-
|
|
2591
|
-
|
|
2583
|
+
return q(t, a), t.intersect = function(e) {
|
|
2584
|
+
return G.rect(t, e);
|
|
2585
|
+
}, n;
|
|
2586
|
+
}, "rect"), rt = /* @__PURE__ */ s(async (e, t) => {
|
|
2587
|
+
let { shapeSvg: n, bbox: r, halfPadding: i } = await K(e, t, "node " + t.classes, !0), a = n.insert("rect", ":first-child"), s = t.positioned ? t.width : r.width + t.padding, c = t.positioned ? t.height : r.height + t.padding, l = t.positioned ? -s / 2 : -r.width / 2 - i, u = t.positioned ? -c / 2 : -r.height / 2 - i;
|
|
2588
|
+
if (a.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", u).attr("width", s).attr("height", c), t.props) {
|
|
2589
|
+
let e = new Set(Object.keys(t.props));
|
|
2590
|
+
t.props.borders && (X(a, t.props.borders, s, c), e.delete("borders")), e.forEach((e) => {
|
|
2591
|
+
o.warn(`Unknown node property ${e}`);
|
|
2592
2592
|
});
|
|
2593
2593
|
}
|
|
2594
|
-
return q(
|
|
2595
|
-
return G.rect(
|
|
2596
|
-
},
|
|
2597
|
-
}, "composite"), it = /* @__PURE__ */
|
|
2598
|
-
let { shapeSvg:
|
|
2599
|
-
|
|
2600
|
-
let
|
|
2601
|
-
if (
|
|
2602
|
-
let
|
|
2603
|
-
|
|
2604
|
-
|
|
2594
|
+
return q(t, a), t.intersect = function(e) {
|
|
2595
|
+
return G.rect(t, e);
|
|
2596
|
+
}, n;
|
|
2597
|
+
}, "composite"), it = /* @__PURE__ */ s(async (e, t) => {
|
|
2598
|
+
let { shapeSvg: n } = await K(e, t, "label", !0);
|
|
2599
|
+
o.trace("Classes = ", t.class);
|
|
2600
|
+
let r = n.insert("rect", ":first-child");
|
|
2601
|
+
if (r.attr("width", 0).attr("height", 0), n.attr("class", "label edgeLabel"), t.props) {
|
|
2602
|
+
let e = new Set(Object.keys(t.props));
|
|
2603
|
+
t.props.borders && (X(r, t.props.borders, 0, 0), e.delete("borders")), e.forEach((e) => {
|
|
2604
|
+
o.warn(`Unknown node property ${e}`);
|
|
2605
2605
|
});
|
|
2606
2606
|
}
|
|
2607
|
-
return q(
|
|
2608
|
-
return G.rect(
|
|
2609
|
-
},
|
|
2607
|
+
return q(t, r), t.intersect = function(e) {
|
|
2608
|
+
return G.rect(t, e);
|
|
2609
|
+
}, n;
|
|
2610
2610
|
}, "labelRect");
|
|
2611
|
-
function X(
|
|
2612
|
-
let
|
|
2613
|
-
|
|
2614
|
-
}, "addBorder"), c = /* @__PURE__ */
|
|
2615
|
-
|
|
2611
|
+
function X(e, t, n, r) {
|
|
2612
|
+
let i = [], a = /* @__PURE__ */ s((e) => {
|
|
2613
|
+
i.push(e, 0);
|
|
2614
|
+
}, "addBorder"), c = /* @__PURE__ */ s((e) => {
|
|
2615
|
+
i.push(0, e);
|
|
2616
2616
|
}, "skipBorder");
|
|
2617
|
-
|
|
2617
|
+
t.includes("t") ? (o.debug("add top border"), a(n)) : c(n), t.includes("r") ? (o.debug("add right border"), a(r)) : c(r), t.includes("b") ? (o.debug("add bottom border"), a(n)) : c(n), t.includes("l") ? (o.debug("add left border"), a(r)) : c(r), e.attr("stroke-dasharray", i.join(" "));
|
|
2618
2618
|
}
|
|
2619
|
-
|
|
2620
|
-
var at = /* @__PURE__ */
|
|
2621
|
-
let
|
|
2622
|
-
|
|
2623
|
-
let
|
|
2624
|
-
u = typeof l == "object" ? l[0] : l,
|
|
2625
|
-
let d = await B(
|
|
2619
|
+
s(X, "applyNodePropertyBorders");
|
|
2620
|
+
var at = /* @__PURE__ */ s(async (e, t) => {
|
|
2621
|
+
let n;
|
|
2622
|
+
n = t.classes ? "node " + t.classes : "node default";
|
|
2623
|
+
let r = e.insert("g").attr("class", n).attr("id", t.domId || t.id), i = r.insert("rect", ":first-child"), a = r.insert("line"), s = r.insert("g").attr("class", "label"), l = t.labelText.flat ? t.labelText.flat() : t.labelText, u = "";
|
|
2624
|
+
u = typeof l == "object" ? l[0] : l, o.info("Label text abc79", u, l, typeof l == "object");
|
|
2625
|
+
let d = await B(s, u, t.labelStyle, !0, !0), p = {
|
|
2626
2626
|
width: 0,
|
|
2627
2627
|
height: 0
|
|
2628
2628
|
};
|
|
2629
2629
|
if (g(f())) {
|
|
2630
|
-
let e = d.children[0], t =
|
|
2630
|
+
let e = d.children[0], t = c(d);
|
|
2631
2631
|
p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
|
|
2632
2632
|
}
|
|
2633
|
-
|
|
2634
|
-
let m = l.slice(1, l.length), h = d.getBBox(), _ = await B(
|
|
2633
|
+
o.info("Text 2", l);
|
|
2634
|
+
let m = l.slice(1, l.length), h = d.getBBox(), _ = await B(s, m.join ? m.join("<br/>") : m, t.labelStyle, !0, !0);
|
|
2635
2635
|
if (g(f())) {
|
|
2636
|
-
let e = _.children[0], t =
|
|
2636
|
+
let e = _.children[0], t = c(_);
|
|
2637
2637
|
p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
|
|
2638
2638
|
}
|
|
2639
|
-
let v =
|
|
2640
|
-
return
|
|
2641
|
-
return G.rect(
|
|
2642
|
-
},
|
|
2643
|
-
}, "rectWithTitle"), ot = /* @__PURE__ */
|
|
2639
|
+
let v = t.padding / 2;
|
|
2640
|
+
return c(_).attr("transform", "translate( " + (p.width > h.width ? 0 : (h.width - p.width) / 2) + ", " + (h.height + v + 5) + ")"), c(d).attr("transform", "translate( " + (p.width < h.width ? 0 : -(h.width - p.width) / 2) + ", 0)"), p = s.node().getBBox(), s.attr("transform", "translate(" + -p.width / 2 + ", " + (-p.height / 2 - v + 3) + ")"), i.attr("class", "outer title-state").attr("x", -p.width / 2 - v).attr("y", -p.height / 2 - v).attr("width", p.width + t.padding).attr("height", p.height + t.padding), a.attr("class", "divider").attr("x1", -p.width / 2 - v).attr("x2", p.width / 2 + v).attr("y1", -p.height / 2 - v + h.height + v).attr("y2", -p.height / 2 - v + h.height + v), q(t, i), t.intersect = function(e) {
|
|
2641
|
+
return G.rect(t, e);
|
|
2642
|
+
}, r;
|
|
2643
|
+
}, "rectWithTitle"), ot = /* @__PURE__ */ s(async (e, t) => {
|
|
2644
2644
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.height + t.padding, a = r.width + i / 4 + t.padding;
|
|
2645
2645
|
return q(t, n.insert("rect", ":first-child").attr("style", t.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -a / 2).attr("y", -i / 2).attr("width", a).attr("height", i)), t.intersect = function(e) {
|
|
2646
2646
|
return G.rect(t, e);
|
|
2647
2647
|
}, n;
|
|
2648
|
-
}, "stadium"), st = /* @__PURE__ */
|
|
2649
|
-
let { shapeSvg:
|
|
2650
|
-
return
|
|
2651
|
-
return
|
|
2652
|
-
},
|
|
2653
|
-
}, "circle"), ct = /* @__PURE__ */
|
|
2654
|
-
let { shapeSvg:
|
|
2655
|
-
return
|
|
2656
|
-
return
|
|
2657
|
-
},
|
|
2658
|
-
}, "doublecircle"), lt = /* @__PURE__ */
|
|
2648
|
+
}, "stadium"), st = /* @__PURE__ */ s(async (e, t) => {
|
|
2649
|
+
let { shapeSvg: n, bbox: r, halfPadding: i } = await K(e, t, Y(t, void 0), !0), a = n.insert("circle", ":first-child");
|
|
2650
|
+
return a.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", r.width / 2 + i).attr("width", r.width + t.padding).attr("height", r.height + t.padding), o.info("Circle main"), q(t, a), t.intersect = function(e) {
|
|
2651
|
+
return o.info("Circle intersect", t, r.width / 2 + i, e), G.circle(t, r.width / 2 + i, e);
|
|
2652
|
+
}, n;
|
|
2653
|
+
}, "circle"), ct = /* @__PURE__ */ s(async (e, t) => {
|
|
2654
|
+
let { shapeSvg: n, bbox: r, halfPadding: i } = await K(e, t, Y(t, void 0), !0), a = n.insert("g", ":first-child"), s = a.insert("circle"), c = a.insert("circle");
|
|
2655
|
+
return a.attr("class", t.class), s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", r.width / 2 + i + 5).attr("width", r.width + t.padding + 10).attr("height", r.height + t.padding + 10), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", r.width / 2 + i).attr("width", r.width + t.padding).attr("height", r.height + t.padding), o.info("DoubleCircle main"), q(t, s), t.intersect = function(e) {
|
|
2656
|
+
return o.info("DoubleCircle intersect", t, r.width / 2 + i + 5, e), G.circle(t, r.width / 2 + i + 5, e);
|
|
2657
|
+
}, n;
|
|
2658
|
+
}, "doublecircle"), lt = /* @__PURE__ */ s(async (e, t) => {
|
|
2659
2659
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2660
2660
|
{
|
|
2661
2661
|
x: 0,
|
|
@@ -2701,12 +2701,12 @@ var at = /* @__PURE__ */ t(async (t, r) => {
|
|
|
2701
2701
|
return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
|
|
2702
2702
|
return G.polygon(t, o, e);
|
|
2703
2703
|
}, n;
|
|
2704
|
-
}, "subroutine"), ut = /* @__PURE__ */
|
|
2704
|
+
}, "subroutine"), ut = /* @__PURE__ */ s((e, t) => {
|
|
2705
2705
|
let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child");
|
|
2706
2706
|
return r.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), q(t, r), t.intersect = function(e) {
|
|
2707
2707
|
return G.circle(t, 7, e);
|
|
2708
2708
|
}, n;
|
|
2709
|
-
}, "start"), dt = /* @__PURE__ */
|
|
2709
|
+
}, "start"), dt = /* @__PURE__ */ s((e, t, n) => {
|
|
2710
2710
|
let r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 70, a = 10;
|
|
2711
2711
|
return n === "LR" && (i = 10, a = 70), q(t, r.append("rect").attr("x", -1 * i / 2).attr("y", -1 * a / 2).attr("width", i).attr("height", a).attr("class", "fork-join")), t.height += t.padding / 2, t.width += t.padding / 2, t.intersect = function(e) {
|
|
2712
2712
|
return G.rect(t, e);
|
|
@@ -2732,7 +2732,7 @@ var at = /* @__PURE__ */ t(async (t, r) => {
|
|
|
2732
2732
|
rect_right_inv_arrow: et,
|
|
2733
2733
|
cylinder: tt,
|
|
2734
2734
|
start: ut,
|
|
2735
|
-
end: /* @__PURE__ */
|
|
2735
|
+
end: /* @__PURE__ */ s((e, t) => {
|
|
2736
2736
|
let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child"), i = n.insert("circle", ":first-child");
|
|
2737
2737
|
return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), r.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), q(t, i), t.intersect = function(e) {
|
|
2738
2738
|
return G.circle(t, 7, e);
|
|
@@ -2742,81 +2742,81 @@ var at = /* @__PURE__ */ t(async (t, r) => {
|
|
|
2742
2742
|
subroutine: lt,
|
|
2743
2743
|
fork: dt,
|
|
2744
2744
|
join: dt,
|
|
2745
|
-
class_box: /* @__PURE__ */
|
|
2746
|
-
let
|
|
2747
|
-
|
|
2748
|
-
let
|
|
2745
|
+
class_box: /* @__PURE__ */ s(async (e, t) => {
|
|
2746
|
+
let n = t.padding / 2, r;
|
|
2747
|
+
r = t.classes ? "node " + t.classes : "node default";
|
|
2748
|
+
let i = e.insert("g").attr("class", r).attr("id", t.domId || t.id), a = i.insert("rect", ":first-child"), o = i.insert("line"), s = i.insert("line"), l = 0, u = 4, d = i.insert("g").attr("class", "label"), p = 0, m = t.classData.annotations?.[0], h = await B(d, t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", t.labelStyle, !0, !0), _ = h.getBBox();
|
|
2749
2749
|
if (g(f())) {
|
|
2750
|
-
let e = h.children[0], t =
|
|
2750
|
+
let e = h.children[0], t = c(h);
|
|
2751
2751
|
_ = e.getBoundingClientRect(), t.attr("width", _.width), t.attr("height", _.height);
|
|
2752
2752
|
}
|
|
2753
2753
|
t.classData.annotations[0] && (u += _.height + 4, l += _.width);
|
|
2754
2754
|
let v = t.classData.label;
|
|
2755
2755
|
t.classData.type !== void 0 && t.classData.type !== "" && (g(f()) ? v += "<" + t.classData.type + ">" : v += "<" + t.classData.type + ">");
|
|
2756
2756
|
let y = await B(d, v, t.labelStyle, !0, !0);
|
|
2757
|
-
|
|
2757
|
+
c(y).attr("class", "classTitle");
|
|
2758
2758
|
let b = y.getBBox();
|
|
2759
2759
|
if (g(f())) {
|
|
2760
|
-
let e = y.children[0], t =
|
|
2760
|
+
let e = y.children[0], t = c(y);
|
|
2761
2761
|
b = e.getBoundingClientRect(), t.attr("width", b.width), t.attr("height", b.height);
|
|
2762
2762
|
}
|
|
2763
2763
|
u += b.height + 4, b.width > l && (l = b.width);
|
|
2764
2764
|
let x = [];
|
|
2765
2765
|
t.classData.members.forEach(async (e) => {
|
|
2766
|
-
let
|
|
2767
|
-
g(f()) && (
|
|
2768
|
-
let
|
|
2766
|
+
let n = e.getDisplayDetails(), r = n.displayText;
|
|
2767
|
+
g(f()) && (r = r.replace(/</g, "<").replace(/>/g, ">"));
|
|
2768
|
+
let i = await B(d, r, n.cssStyle ? n.cssStyle : t.labelStyle, !0, !0), a = i.getBBox();
|
|
2769
2769
|
if (g(f())) {
|
|
2770
|
-
let e =
|
|
2771
|
-
|
|
2770
|
+
let e = i.children[0], t = c(i);
|
|
2771
|
+
a = e.getBoundingClientRect(), t.attr("width", a.width), t.attr("height", a.height);
|
|
2772
2772
|
}
|
|
2773
|
-
|
|
2773
|
+
a.width > l && (l = a.width), u += a.height + 4, x.push(i);
|
|
2774
2774
|
}), u += 8;
|
|
2775
2775
|
let S = [];
|
|
2776
2776
|
if (t.classData.methods.forEach(async (e) => {
|
|
2777
|
-
let
|
|
2778
|
-
g(f()) && (
|
|
2779
|
-
let
|
|
2777
|
+
let n = e.getDisplayDetails(), r = n.displayText;
|
|
2778
|
+
g(f()) && (r = r.replace(/</g, "<").replace(/>/g, ">"));
|
|
2779
|
+
let i = await B(d, r, n.cssStyle ? n.cssStyle : t.labelStyle, !0, !0), a = i.getBBox();
|
|
2780
2780
|
if (g(f())) {
|
|
2781
|
-
let e =
|
|
2782
|
-
|
|
2781
|
+
let e = i.children[0], t = c(i);
|
|
2782
|
+
a = e.getBoundingClientRect(), t.attr("width", a.width), t.attr("height", a.height);
|
|
2783
2783
|
}
|
|
2784
|
-
|
|
2784
|
+
a.width > l && (l = a.width), u += a.height + 4, S.push(i);
|
|
2785
2785
|
}), u += 8, m) {
|
|
2786
2786
|
let e = (l - _.width) / 2;
|
|
2787
|
-
|
|
2787
|
+
c(h).attr("transform", "translate( " + (-1 * l / 2 + e) + ", " + -1 * u / 2 + ")"), p = _.height + 4;
|
|
2788
2788
|
}
|
|
2789
2789
|
let C = (l - b.width) / 2;
|
|
2790
|
-
return
|
|
2791
|
-
|
|
2790
|
+
return c(y).attr("transform", "translate( " + (-1 * l / 2 + C) + ", " + (-1 * u / 2 + p) + ")"), p += b.height + 4, o.attr("class", "divider").attr("x1", -l / 2 - n).attr("x2", l / 2 + n).attr("y1", -u / 2 - n + 8 + p).attr("y2", -u / 2 - n + 8 + p), p += 8, x.forEach((e) => {
|
|
2791
|
+
c(e).attr("transform", "translate( " + -l / 2 + ", " + (-1 * u / 2 + p + 8 / 2) + ")");
|
|
2792
2792
|
let t = e?.getBBox();
|
|
2793
2793
|
p += (t?.height ?? 0) + 4;
|
|
2794
|
-
}), p += 8,
|
|
2795
|
-
|
|
2794
|
+
}), p += 8, s.attr("class", "divider").attr("x1", -l / 2 - n).attr("x2", l / 2 + n).attr("y1", -u / 2 - n + 8 + p).attr("y2", -u / 2 - n + 8 + p), p += 8, S.forEach((e) => {
|
|
2795
|
+
c(e).attr("transform", "translate( " + -l / 2 + ", " + (-1 * u / 2 + p) + ")");
|
|
2796
2796
|
let t = e?.getBBox();
|
|
2797
2797
|
p += (t?.height ?? 0) + 4;
|
|
2798
|
-
}),
|
|
2798
|
+
}), a.attr("style", t.style).attr("class", "outer title-state").attr("x", -l / 2 - n).attr("y", -(u / 2) - n).attr("width", l + t.padding).attr("height", u + t.padding), q(t, a), t.intersect = function(e) {
|
|
2799
2799
|
return G.rect(t, e);
|
|
2800
|
-
},
|
|
2800
|
+
}, i;
|
|
2801
2801
|
}, "class_box")
|
|
2802
|
-
}, Z = {}, pt = /* @__PURE__ */
|
|
2802
|
+
}, Z = {}, pt = /* @__PURE__ */ s(async (e, t, n) => {
|
|
2803
2803
|
let r, i;
|
|
2804
2804
|
if (t.link) {
|
|
2805
2805
|
let a;
|
|
2806
2806
|
f().securityLevel === "sandbox" ? a = "_top" : t.linkTarget && (a = t.linkTarget || "_blank"), r = e.insert("svg:a").attr("xlink:href", t.link).attr("target", a), i = await ft[t.shape](r, t, n);
|
|
2807
2807
|
} else i = await ft[t.shape](e, t, n), r = i;
|
|
2808
2808
|
return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), Z[t.id] = r, t.haveCallback && Z[t.id].attr("class", Z[t.id].attr("class") + " clickable"), r;
|
|
2809
|
-
}, "insertNode"), mt = /* @__PURE__ */
|
|
2810
|
-
let
|
|
2811
|
-
|
|
2812
|
-
let
|
|
2813
|
-
return
|
|
2809
|
+
}, "insertNode"), mt = /* @__PURE__ */ s((e) => {
|
|
2810
|
+
let t = Z[e.id];
|
|
2811
|
+
o.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
|
|
2812
|
+
let n = e.diff || 0;
|
|
2813
|
+
return e.clusterNode ? t.attr("transform", "translate(" + (e.x + n - e.width / 2) + ", " + (e.y - e.height / 2 - 8) + ")") : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), n;
|
|
2814
2814
|
}, "positionNode");
|
|
2815
|
-
function Q(e,
|
|
2816
|
-
let
|
|
2817
|
-
(
|
|
2815
|
+
function Q(e, n, r = !1) {
|
|
2816
|
+
let i = e, a = "default";
|
|
2817
|
+
(i?.classes?.length || 0) > 0 && (a = (i?.classes ?? []).join(" ")), a += " flowchart-label";
|
|
2818
2818
|
let o = 0, s = "", c;
|
|
2819
|
-
switch (
|
|
2819
|
+
switch (i.type) {
|
|
2820
2820
|
case "round":
|
|
2821
2821
|
o = 5, s = "rect";
|
|
2822
2822
|
break;
|
|
@@ -2876,7 +2876,7 @@ function Q(e, t, n = !1) {
|
|
|
2876
2876
|
break;
|
|
2877
2877
|
default: s = "rect";
|
|
2878
2878
|
}
|
|
2879
|
-
let l = i
|
|
2879
|
+
let l = t(i?.styles ?? []), u = i.label, d = i.size ?? {
|
|
2880
2880
|
width: 0,
|
|
2881
2881
|
height: 0,
|
|
2882
2882
|
x: 0,
|
|
@@ -2890,19 +2890,19 @@ function Q(e, t, n = !1) {
|
|
|
2890
2890
|
ry: o,
|
|
2891
2891
|
class: a,
|
|
2892
2892
|
style: l.style,
|
|
2893
|
-
id:
|
|
2894
|
-
directions:
|
|
2893
|
+
id: i.id,
|
|
2894
|
+
directions: i.directions,
|
|
2895
2895
|
width: d.width,
|
|
2896
2896
|
height: d.height,
|
|
2897
2897
|
x: d.x,
|
|
2898
2898
|
y: d.y,
|
|
2899
|
-
positioned:
|
|
2899
|
+
positioned: r,
|
|
2900
2900
|
intersect: void 0,
|
|
2901
|
-
type:
|
|
2901
|
+
type: i.type,
|
|
2902
2902
|
padding: c ?? _()?.block?.padding ?? 0
|
|
2903
2903
|
};
|
|
2904
2904
|
}
|
|
2905
|
-
|
|
2905
|
+
s(Q, "getNodeFromBlock");
|
|
2906
2906
|
async function ht(e, t, n) {
|
|
2907
2907
|
let r = Q(t, n, !1);
|
|
2908
2908
|
if (r.type === "group") return;
|
|
@@ -2915,45 +2915,45 @@ async function ht(e, t, n) {
|
|
|
2915
2915
|
node: i
|
|
2916
2916
|
}, n.setBlock(o), i.remove();
|
|
2917
2917
|
}
|
|
2918
|
-
|
|
2918
|
+
s(ht, "calculateBlockSize");
|
|
2919
2919
|
async function gt(e, t, n) {
|
|
2920
2920
|
let r = Q(t, n, !0);
|
|
2921
2921
|
n.getBlock(r.id).type !== "space" && (await pt(e, r, { config: _() }), t.intersect = r?.intersect, mt(r));
|
|
2922
2922
|
}
|
|
2923
|
-
|
|
2923
|
+
s(gt, "insertBlockPositioned");
|
|
2924
2924
|
async function $(e, t, n, r) {
|
|
2925
2925
|
for (let i of t) await r(e, i, n), i.children && await $(e, i.children, n, r);
|
|
2926
2926
|
}
|
|
2927
|
-
|
|
2927
|
+
s($, "performOperations");
|
|
2928
2928
|
async function _t(e, t, n) {
|
|
2929
2929
|
await $(e, t, n, ht);
|
|
2930
2930
|
}
|
|
2931
|
-
|
|
2931
|
+
s(_t, "calculateBlockSizes");
|
|
2932
2932
|
async function vt(e, t, n) {
|
|
2933
2933
|
await $(e, t, n, gt);
|
|
2934
2934
|
}
|
|
2935
|
-
|
|
2935
|
+
s(vt, "insertBlocks");
|
|
2936
2936
|
async function yt(e, t, n, r, i) {
|
|
2937
|
-
let
|
|
2937
|
+
let o = new a({
|
|
2938
2938
|
multigraph: !0,
|
|
2939
2939
|
compound: !0
|
|
2940
2940
|
});
|
|
2941
|
-
|
|
2941
|
+
o.setGraph({
|
|
2942
2942
|
rankdir: "TB",
|
|
2943
2943
|
nodesep: 10,
|
|
2944
2944
|
ranksep: 10,
|
|
2945
2945
|
marginx: 8,
|
|
2946
2946
|
marginy: 8
|
|
2947
2947
|
});
|
|
2948
|
-
for (let e of n) e.size &&
|
|
2948
|
+
for (let e of n) e.size && o.setNode(e.id, {
|
|
2949
2949
|
width: e.size.width,
|
|
2950
2950
|
height: e.size.height,
|
|
2951
2951
|
intersect: e.intersect
|
|
2952
2952
|
});
|
|
2953
2953
|
for (let n of t) if (n.start && n.end) {
|
|
2954
|
-
let t = r.getBlock(n.start),
|
|
2955
|
-
if (t?.size &&
|
|
2956
|
-
let r = t.size, s =
|
|
2954
|
+
let t = r.getBlock(n.start), a = r.getBlock(n.end);
|
|
2955
|
+
if (t?.size && a?.size) {
|
|
2956
|
+
let r = t.size, s = a.size, c = [
|
|
2957
2957
|
{
|
|
2958
2958
|
x: r.x,
|
|
2959
2959
|
y: r.y
|
|
@@ -2977,7 +2977,7 @@ async function yt(e, t, n, r, i) {
|
|
|
2977
2977
|
arrowTypeStart: n.arrowTypeStart,
|
|
2978
2978
|
points: c,
|
|
2979
2979
|
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
2980
|
-
}, void 0, "block",
|
|
2980
|
+
}, void 0, "block", o, i), n.label && (await Te(e, {
|
|
2981
2981
|
...n,
|
|
2982
2982
|
label: n.label,
|
|
2983
2983
|
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
@@ -2993,29 +2993,29 @@ async function yt(e, t, n, r, i) {
|
|
|
2993
2993
|
}
|
|
2994
2994
|
}
|
|
2995
2995
|
}
|
|
2996
|
-
|
|
2996
|
+
s(yt, "insertEdges");
|
|
2997
2997
|
var bt = {
|
|
2998
2998
|
parser: D,
|
|
2999
2999
|
db: pe,
|
|
3000
3000
|
renderer: {
|
|
3001
|
-
draw: /* @__PURE__ */
|
|
3002
|
-
let { securityLevel:
|
|
3003
|
-
|
|
3004
|
-
let u =
|
|
3001
|
+
draw: /* @__PURE__ */ s(async function(e, t, n, r) {
|
|
3002
|
+
let { securityLevel: i, block: a } = _(), s = r.db, l;
|
|
3003
|
+
i === "sandbox" && (l = c("#i" + t));
|
|
3004
|
+
let u = c(i === "sandbox" ? l.nodes()[0].contentDocument.body : "body"), d = i === "sandbox" ? u.select(`[id="${t}"]`) : c(`[id="${t}"]`);
|
|
3005
3005
|
_e(d, [
|
|
3006
3006
|
"point",
|
|
3007
3007
|
"circle",
|
|
3008
3008
|
"cross"
|
|
3009
|
-
],
|
|
3010
|
-
let f =
|
|
3011
|
-
await _t(g, f,
|
|
3012
|
-
let v = xe(
|
|
3013
|
-
if (await vt(g, f,
|
|
3014
|
-
let
|
|
3015
|
-
p(d,
|
|
3009
|
+
], r.type, t);
|
|
3010
|
+
let f = s.getBlocks(), m = s.getBlocksFlat(), h = s.getEdges(), g = d.insert("g").attr("class", "block");
|
|
3011
|
+
await _t(g, f, s);
|
|
3012
|
+
let v = xe(s);
|
|
3013
|
+
if (await vt(g, f, s), await yt(g, h, m, s, t), v) {
|
|
3014
|
+
let e = v, t = Math.max(1, Math.round(.125 * (e.width / e.height))), n = e.height + t + 10, r = e.width + 10, { useMaxWidth: i } = a;
|
|
3015
|
+
p(d, n, r, !!i), o.debug("Here Bounds", v, e), d.attr("viewBox", `${e.x - 5} ${e.y - 5} ${e.width + 10} ${e.height + 10}`);
|
|
3016
3016
|
}
|
|
3017
3017
|
}, "draw"),
|
|
3018
|
-
getClasses: /* @__PURE__ */
|
|
3018
|
+
getClasses: /* @__PURE__ */ s(function(e, t) {
|
|
3019
3019
|
return t.db.getClasses();
|
|
3020
3020
|
}, "getClasses")
|
|
3021
3021
|
},
|