schematex 0.3.0 → 0.3.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/ai/ai-sdk.cjs +25 -25
- package/dist/ai/ai-sdk.d.cts +1 -1
- package/dist/ai/ai-sdk.d.ts +1 -1
- package/dist/ai/ai-sdk.js +20 -20
- package/dist/ai/index.cjs +28 -28
- package/dist/ai/index.d.cts +1 -1
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +20 -20
- package/dist/browser.cjs +22 -22
- package/dist/browser.js +20 -20
- package/dist/{chunk-TYCHEOQX.js → chunk-2J2QWNGI.js} +26 -20
- package/dist/chunk-2J2QWNGI.js.map +1 -0
- package/dist/{chunk-MCFQAUQV.cjs → chunk-2UJAVPA4.cjs} +58 -39
- package/dist/chunk-2UJAVPA4.cjs.map +1 -0
- package/dist/{chunk-5AEN2PLB.cjs → chunk-3YXXZ4LT.cjs} +33 -33
- package/dist/{chunk-5AEN2PLB.cjs.map → chunk-3YXXZ4LT.cjs.map} +1 -1
- package/dist/{chunk-RP5UATRA.js → chunk-56LXBM45.js} +4 -4
- package/dist/{chunk-RP5UATRA.js.map → chunk-56LXBM45.js.map} +1 -1
- package/dist/{chunk-OC22GGQN.js → chunk-6BKUD5EJ.js} +54 -4
- package/dist/chunk-6BKUD5EJ.js.map +1 -0
- package/dist/{chunk-ULYRO2KY.cjs → chunk-75BMFCP5.cjs} +44 -44
- package/dist/{chunk-ULYRO2KY.cjs.map → chunk-75BMFCP5.cjs.map} +1 -1
- package/dist/{chunk-ZNDIGQJD.js → chunk-7BEJHG43.js} +3 -3
- package/dist/{chunk-ZNDIGQJD.js.map → chunk-7BEJHG43.js.map} +1 -1
- package/dist/{chunk-WYFXOXVK.cjs → chunk-7MVDN5UC.cjs} +35 -35
- package/dist/{chunk-WYFXOXVK.cjs.map → chunk-7MVDN5UC.cjs.map} +1 -1
- package/dist/{chunk-JDTB7IKL.js → chunk-BJ65PKDU.js} +3 -3
- package/dist/{chunk-JDTB7IKL.js.map → chunk-BJ65PKDU.js.map} +1 -1
- package/dist/{chunk-FE6GAUNW.js → chunk-BJWMPPEA.js} +5 -5
- package/dist/{chunk-FE6GAUNW.js.map → chunk-BJWMPPEA.js.map} +1 -1
- package/dist/{chunk-MJGDP3CS.cjs → chunk-BUN3CRMP.cjs} +488 -109
- package/dist/chunk-BUN3CRMP.cjs.map +1 -0
- package/dist/{chunk-COLTVQWR.cjs → chunk-C3IVD7DI.cjs} +25 -25
- package/dist/{chunk-COLTVQWR.cjs.map → chunk-C3IVD7DI.cjs.map} +1 -1
- package/dist/{chunk-3YZ6FPQW.cjs → chunk-EYHD7LV3.cjs} +131 -131
- package/dist/{chunk-3YZ6FPQW.cjs.map → chunk-EYHD7LV3.cjs.map} +1 -1
- package/dist/{chunk-UGCUNADI.js → chunk-F6OROIHS.js} +35 -16
- package/dist/chunk-F6OROIHS.js.map +1 -0
- package/dist/{chunk-3FKS4KQK.cjs → chunk-GYTWJ6VB.cjs} +65 -59
- package/dist/chunk-GYTWJ6VB.cjs.map +1 -0
- package/dist/{chunk-VLMK7MQK.js → chunk-H4CJTKEH.js} +23 -4
- package/dist/chunk-H4CJTKEH.js.map +1 -0
- package/dist/{chunk-45KP67RR.js → chunk-HIQPEAL7.js} +5 -5
- package/dist/chunk-HIQPEAL7.js.map +1 -0
- package/dist/{chunk-NB56L5QK.js → chunk-IT2TVXC7.js} +4 -4
- package/dist/{chunk-NB56L5QK.js.map → chunk-IT2TVXC7.js.map} +1 -1
- package/dist/{chunk-2JDVJRR3.cjs → chunk-K5QG53GT.cjs} +28 -28
- package/dist/chunk-K5QG53GT.cjs.map +1 -0
- package/dist/{chunk-B37IKTI7.cjs → chunk-KUXOHLGC.cjs} +97 -47
- package/dist/chunk-KUXOHLGC.cjs.map +1 -0
- package/dist/{chunk-A5D2IMOX.cjs → chunk-L2KUGWFR.cjs} +47 -47
- package/dist/{chunk-A5D2IMOX.cjs.map → chunk-L2KUGWFR.cjs.map} +1 -1
- package/dist/{chunk-HDKDQAEQ.cjs → chunk-LFZZ4NCP.cjs} +14 -2
- package/dist/chunk-LFZZ4NCP.cjs.map +1 -0
- package/dist/{chunk-U6L3FAML.js → chunk-M3R6RCXY.js} +3 -3
- package/dist/{chunk-U6L3FAML.js.map → chunk-M3R6RCXY.js.map} +1 -1
- package/dist/{chunk-5YYAYW67.js → chunk-M5ZC3LFJ.js} +3 -3
- package/dist/{chunk-5YYAYW67.js.map → chunk-M5ZC3LFJ.js.map} +1 -1
- package/dist/{chunk-B6INLQBU.cjs → chunk-MKKFIPKU.cjs} +46 -46
- package/dist/{chunk-B6INLQBU.cjs.map → chunk-MKKFIPKU.cjs.map} +1 -1
- package/dist/{chunk-M5B2UUNW.js → chunk-NFT6VW73.js} +4 -4
- package/dist/{chunk-M5B2UUNW.js.map → chunk-NFT6VW73.js.map} +1 -1
- package/dist/{chunk-X7RPFTTR.cjs → chunk-OK5RYX55.cjs} +26 -26
- package/dist/{chunk-X7RPFTTR.cjs.map → chunk-OK5RYX55.cjs.map} +1 -1
- package/dist/{chunk-NNU4RGT3.js → chunk-RNGYXGHS.js} +39 -27
- package/dist/chunk-RNGYXGHS.js.map +1 -0
- package/dist/{chunk-SQKLKBBK.cjs → chunk-RODV6PC4.cjs} +25 -6
- package/dist/chunk-RODV6PC4.cjs.map +1 -0
- package/dist/{chunk-H2OEUBPO.js → chunk-SE23X5OE.js} +441 -62
- package/dist/chunk-SE23X5OE.js.map +1 -0
- package/dist/{chunk-FCGHV6ZK.js → chunk-SFSZUOFT.js} +4 -4
- package/dist/{chunk-FCGHV6ZK.js.map → chunk-SFSZUOFT.js.map} +1 -1
- package/dist/{chunk-NZH4GWE6.cjs → chunk-UK7JF5QB.cjs} +37 -37
- package/dist/{chunk-NZH4GWE6.cjs.map → chunk-UK7JF5QB.cjs.map} +1 -1
- package/dist/{chunk-QSQX77S2.cjs → chunk-W7GIQTJV.cjs} +21 -21
- package/dist/{chunk-QSQX77S2.cjs.map → chunk-W7GIQTJV.cjs.map} +1 -1
- package/dist/{chunk-KLJEK547.js → chunk-WHJXRLFD.js} +14 -3
- package/dist/chunk-WHJXRLFD.js.map +1 -0
- package/dist/{chunk-YQANC7HQ.js → chunk-X4F6VVEJ.js} +3 -3
- package/dist/{chunk-YQANC7HQ.js.map → chunk-X4F6VVEJ.js.map} +1 -1
- package/dist/{chunk-ZNOD4VZT.cjs → chunk-XI6JOG76.cjs} +46 -46
- package/dist/{chunk-ZNOD4VZT.cjs.map → chunk-XI6JOG76.cjs.map} +1 -1
- package/dist/{chunk-K2SOC3XF.cjs → chunk-XUEROLSB.cjs} +70 -19
- package/dist/chunk-XUEROLSB.cjs.map +1 -0
- package/dist/{chunk-XTATRNUN.cjs → chunk-YTEEZV6J.cjs} +442 -430
- package/dist/chunk-YTEEZV6J.cjs.map +1 -0
- package/dist/{chunk-XZNPAD6E.js → chunk-ZNLEUL7T.js} +58 -7
- package/dist/chunk-ZNLEUL7T.js.map +1 -0
- package/dist/{chunk-DNZFOCV7.js → chunk-ZTSO3S4P.js} +3 -3
- package/dist/{chunk-DNZFOCV7.js.map → chunk-ZTSO3S4P.js.map} +1 -1
- package/dist/diagrams/blockdiagram/index.cjs +6 -6
- package/dist/diagrams/blockdiagram/index.d.cts +1 -1
- package/dist/diagrams/blockdiagram/index.d.ts +1 -1
- package/dist/diagrams/blockdiagram/index.js +2 -2
- package/dist/diagrams/circuit/index.cjs +8 -8
- package/dist/diagrams/circuit/index.d.cts +1 -1
- package/dist/diagrams/circuit/index.d.ts +1 -1
- package/dist/diagrams/circuit/index.js +2 -2
- package/dist/diagrams/ecomap/index.cjs +8 -8
- package/dist/diagrams/ecomap/index.d.cts +1 -1
- package/dist/diagrams/ecomap/index.d.ts +1 -1
- package/dist/diagrams/ecomap/index.js +3 -3
- package/dist/diagrams/entity/index.cjs +6 -6
- package/dist/diagrams/entity/index.d.cts +1 -1
- package/dist/diagrams/entity/index.d.ts +1 -1
- package/dist/diagrams/entity/index.js +2 -2
- package/dist/diagrams/fishbone/index.cjs +8 -8
- package/dist/diagrams/fishbone/index.d.cts +1 -1
- package/dist/diagrams/fishbone/index.d.ts +1 -1
- package/dist/diagrams/fishbone/index.js +2 -2
- package/dist/diagrams/flowchart/index.cjs +8 -8
- package/dist/diagrams/flowchart/index.d.cts +2 -2
- package/dist/diagrams/flowchart/index.d.ts +2 -2
- package/dist/diagrams/flowchart/index.js +2 -2
- package/dist/diagrams/genogram/index.cjs +10 -10
- package/dist/diagrams/genogram/index.d.cts +1 -1
- package/dist/diagrams/genogram/index.d.ts +1 -1
- package/dist/diagrams/genogram/index.js +3 -3
- package/dist/diagrams/ladder/index.cjs +6 -6
- package/dist/diagrams/ladder/index.d.cts +1 -1
- package/dist/diagrams/ladder/index.d.ts +1 -1
- package/dist/diagrams/ladder/index.js +2 -2
- package/dist/diagrams/logic/index.cjs +6 -6
- package/dist/diagrams/logic/index.d.cts +1 -1
- package/dist/diagrams/logic/index.d.ts +1 -1
- package/dist/diagrams/logic/index.js +2 -2
- package/dist/diagrams/orgchart/index.cjs +7 -7
- package/dist/diagrams/orgchart/index.d.cts +1 -1
- package/dist/diagrams/orgchart/index.d.ts +1 -1
- package/dist/diagrams/orgchart/index.js +2 -2
- package/dist/diagrams/pedigree/index.cjs +8 -8
- package/dist/diagrams/pedigree/index.d.cts +1 -1
- package/dist/diagrams/pedigree/index.d.ts +1 -1
- package/dist/diagrams/pedigree/index.js +3 -3
- package/dist/diagrams/phylo/index.cjs +7 -7
- package/dist/diagrams/phylo/index.d.cts +1 -1
- package/dist/diagrams/phylo/index.d.ts +1 -1
- package/dist/diagrams/phylo/index.js +2 -2
- package/dist/diagrams/sld/index.cjs +6 -6
- package/dist/diagrams/sld/index.d.cts +1 -1
- package/dist/diagrams/sld/index.d.ts +1 -1
- package/dist/diagrams/sld/index.js +2 -2
- package/dist/diagrams/sociogram/index.cjs +7 -7
- package/dist/diagrams/sociogram/index.d.cts +1 -1
- package/dist/diagrams/sociogram/index.d.ts +1 -1
- package/dist/diagrams/sociogram/index.js +3 -3
- package/dist/diagrams/timing/index.cjs +5 -5
- package/dist/diagrams/timing/index.d.cts +1 -1
- package/dist/diagrams/timing/index.d.ts +1 -1
- package/dist/diagrams/timing/index.js +2 -2
- package/dist/diagrams/venn/index.cjs +9 -9
- package/dist/diagrams/venn/index.d.cts +1 -1
- package/dist/diagrams/venn/index.d.ts +1 -1
- package/dist/diagrams/venn/index.js +2 -2
- package/dist/{index-ivhNGsyU.d.cts → index-BrLxEzSQ.d.cts} +1 -1
- package/dist/{index-CUwp4GXI.d.ts → index-dWDwG6BW.d.ts} +1 -1
- package/dist/index.cjs +41 -41
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +19 -19
- package/dist/react.cjs +20 -20
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +19 -19
- package/dist/react.js.map +1 -1
- package/dist/{types-Bl-Pn7Wj.d.cts → types-BtiUg7Gx.d.cts} +24 -3
- package/dist/{types-Bl-Pn7Wj.d.ts → types-BtiUg7Gx.d.ts} +24 -3
- package/package.json +1 -1
- package/dist/chunk-2JDVJRR3.cjs.map +0 -1
- package/dist/chunk-3FKS4KQK.cjs.map +0 -1
- package/dist/chunk-45KP67RR.js.map +0 -1
- package/dist/chunk-B37IKTI7.cjs.map +0 -1
- package/dist/chunk-H2OEUBPO.js.map +0 -1
- package/dist/chunk-HDKDQAEQ.cjs.map +0 -1
- package/dist/chunk-K2SOC3XF.cjs.map +0 -1
- package/dist/chunk-KLJEK547.js.map +0 -1
- package/dist/chunk-MCFQAUQV.cjs.map +0 -1
- package/dist/chunk-MJGDP3CS.cjs.map +0 -1
- package/dist/chunk-NNU4RGT3.js.map +0 -1
- package/dist/chunk-OC22GGQN.js.map +0 -1
- package/dist/chunk-SQKLKBBK.cjs.map +0 -1
- package/dist/chunk-TYCHEOQX.js.map +0 -1
- package/dist/chunk-UGCUNADI.js.map +0 -1
- package/dist/chunk-VLMK7MQK.js.map +0 -1
- package/dist/chunk-XTATRNUN.cjs.map +0 -1
- package/dist/chunk-XZNPAD6E.js.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
3
|
+
var chunkL2KUGWFR_cjs = require('./chunk-L2KUGWFR.cjs');
|
|
4
|
+
var chunkXUEROLSB_cjs = require('./chunk-XUEROLSB.cjs');
|
|
5
|
+
var chunk2UJAVPA4_cjs = require('./chunk-2UJAVPA4.cjs');
|
|
6
|
+
var chunkMKKFIPKU_cjs = require('./chunk-MKKFIPKU.cjs');
|
|
7
|
+
var chunkEYHD7LV3_cjs = require('./chunk-EYHD7LV3.cjs');
|
|
8
|
+
var chunkXI6JOG76_cjs = require('./chunk-XI6JOG76.cjs');
|
|
9
|
+
var chunk3YXXZ4LT_cjs = require('./chunk-3YXXZ4LT.cjs');
|
|
10
|
+
var chunkW7GIQTJV_cjs = require('./chunk-W7GIQTJV.cjs');
|
|
11
|
+
var chunkGYTWJ6VB_cjs = require('./chunk-GYTWJ6VB.cjs');
|
|
12
|
+
var chunkBUN3CRMP_cjs = require('./chunk-BUN3CRMP.cjs');
|
|
13
|
+
var chunkUK7JF5QB_cjs = require('./chunk-UK7JF5QB.cjs');
|
|
14
|
+
var chunkKUXOHLGC_cjs = require('./chunk-KUXOHLGC.cjs');
|
|
15
|
+
var chunkOK5RYX55_cjs = require('./chunk-OK5RYX55.cjs');
|
|
16
|
+
var chunkC3IVD7DI_cjs = require('./chunk-C3IVD7DI.cjs');
|
|
17
|
+
var chunkK5QG53GT_cjs = require('./chunk-K5QG53GT.cjs');
|
|
18
|
+
var chunk7MVDN5UC_cjs = require('./chunk-7MVDN5UC.cjs');
|
|
19
19
|
var chunkD7EHZFK4_cjs = require('./chunk-D7EHZFK4.cjs');
|
|
20
|
-
var
|
|
20
|
+
var chunkLFZZ4NCP_cjs = require('./chunk-LFZZ4NCP.cjs');
|
|
21
21
|
|
|
22
22
|
// src/diagrams/decisiontree/parser.ts
|
|
23
23
|
var DTreeParseError = class extends Error {
|
|
@@ -787,7 +787,7 @@ function renderDecisionNode(ln, layout) {
|
|
|
787
787
|
const parts = [];
|
|
788
788
|
const sibH = layout.direction === "top-down";
|
|
789
789
|
if (n.kind === "decision") {
|
|
790
|
-
parts.push(
|
|
790
|
+
parts.push(chunkLFZZ4NCP_cjs.rect({
|
|
791
791
|
x: ln.x - ln.width / 2,
|
|
792
792
|
y: ln.y - ln.height / 2,
|
|
793
793
|
width: ln.width,
|
|
@@ -798,14 +798,14 @@ function renderDecisionNode(ln, layout) {
|
|
|
798
798
|
}));
|
|
799
799
|
if (n.label) {
|
|
800
800
|
if (sibH) {
|
|
801
|
-
parts.push(
|
|
801
|
+
parts.push(chunkLFZZ4NCP_cjs.text({
|
|
802
802
|
x: ln.x,
|
|
803
803
|
y: ln.y - ln.height / 2 - 8,
|
|
804
804
|
class: "lt-dtree-node-label",
|
|
805
805
|
"text-anchor": "middle"
|
|
806
806
|
}, n.label));
|
|
807
807
|
} else {
|
|
808
|
-
parts.push(
|
|
808
|
+
parts.push(chunkLFZZ4NCP_cjs.text({
|
|
809
809
|
x: ln.x - ln.width / 2 - 8,
|
|
810
810
|
y: ln.y + 4,
|
|
811
811
|
class: "lt-dtree-node-label",
|
|
@@ -814,7 +814,7 @@ function renderDecisionNode(ln, layout) {
|
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
816
|
if (n.ev !== void 0) {
|
|
817
|
-
parts.push(
|
|
817
|
+
parts.push(chunkLFZZ4NCP_cjs.text({
|
|
818
818
|
x: ln.x,
|
|
819
819
|
y: ln.y + ln.height / 2 + 13,
|
|
820
820
|
class: "lt-dtree-ev",
|
|
@@ -822,7 +822,7 @@ function renderDecisionNode(ln, layout) {
|
|
|
822
822
|
}, `EV=${formatNum(n.ev)}`));
|
|
823
823
|
}
|
|
824
824
|
} else if (n.kind === "chance") {
|
|
825
|
-
parts.push(
|
|
825
|
+
parts.push(chunkLFZZ4NCP_cjs.circle({
|
|
826
826
|
cx: ln.x,
|
|
827
827
|
cy: ln.y,
|
|
828
828
|
r: ln.width / 2,
|
|
@@ -830,14 +830,14 @@ function renderDecisionNode(ln, layout) {
|
|
|
830
830
|
}));
|
|
831
831
|
if (n.label) {
|
|
832
832
|
if (sibH) {
|
|
833
|
-
parts.push(
|
|
833
|
+
parts.push(chunkLFZZ4NCP_cjs.text({
|
|
834
834
|
x: ln.x,
|
|
835
835
|
y: ln.y - ln.height / 2 - 8,
|
|
836
836
|
class: "lt-dtree-node-label",
|
|
837
837
|
"text-anchor": "middle"
|
|
838
838
|
}, n.label));
|
|
839
839
|
} else {
|
|
840
|
-
parts.push(
|
|
840
|
+
parts.push(chunkLFZZ4NCP_cjs.text({
|
|
841
841
|
x: ln.x,
|
|
842
842
|
y: ln.y - ln.height / 2 - 6,
|
|
843
843
|
class: "lt-dtree-node-label",
|
|
@@ -846,7 +846,7 @@ function renderDecisionNode(ln, layout) {
|
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
848
|
if (n.ev !== void 0) {
|
|
849
|
-
parts.push(
|
|
849
|
+
parts.push(chunkLFZZ4NCP_cjs.text({
|
|
850
850
|
x: ln.x,
|
|
851
851
|
y: ln.y + ln.height / 2 + 13,
|
|
852
852
|
class: n.optimal ? "lt-dtree-ev-optimal" : "lt-dtree-ev",
|
|
@@ -861,19 +861,19 @@ function renderDecisionNode(ln, layout) {
|
|
|
861
861
|
`${ln.x + halfW},${ln.y}`,
|
|
862
862
|
`${ln.x - halfW},${ln.y + halfH}`
|
|
863
863
|
].join(" ");
|
|
864
|
-
parts.push(
|
|
864
|
+
parts.push(chunkLFZZ4NCP_cjs.polygon({ points: pts, class: "lt-dtree-outcome" }));
|
|
865
865
|
const colX = layout.payoffColumnX;
|
|
866
866
|
const tipX = ln.x + halfW;
|
|
867
867
|
const textY = ln.y + 4;
|
|
868
868
|
const payoffCls = n.payoff !== void 0 && n.payoff < 0 ? "lt-dtree-payoff-neg" : "lt-dtree-payoff";
|
|
869
869
|
const payoffStr = n.payoff !== void 0 ? formatPayoff(n.payoff) : "";
|
|
870
870
|
if (colX !== void 0 && colX > tipX + 20) {
|
|
871
|
-
parts.push(
|
|
871
|
+
parts.push(chunkLFZZ4NCP_cjs.path({
|
|
872
872
|
d: `M ${tipX + 2} ${ln.y} L ${colX - 6} ${ln.y}`,
|
|
873
873
|
class: "lt-dtree-edge-leader"
|
|
874
874
|
}));
|
|
875
875
|
if (n.label) {
|
|
876
|
-
parts.push(
|
|
876
|
+
parts.push(chunkLFZZ4NCP_cjs.text({
|
|
877
877
|
x: (tipX + colX) / 2,
|
|
878
878
|
y: ln.y - 6,
|
|
879
879
|
class: "lt-dtree-edge-label",
|
|
@@ -881,7 +881,7 @@ function renderDecisionNode(ln, layout) {
|
|
|
881
881
|
}, n.label));
|
|
882
882
|
}
|
|
883
883
|
if (payoffStr) {
|
|
884
|
-
parts.push(
|
|
884
|
+
parts.push(chunkLFZZ4NCP_cjs.text({
|
|
885
885
|
x: colX,
|
|
886
886
|
y: textY,
|
|
887
887
|
class: payoffCls,
|
|
@@ -893,7 +893,7 @@ function renderDecisionNode(ln, layout) {
|
|
|
893
893
|
if (payoffStr) labelParts.push(payoffStr);
|
|
894
894
|
if (n.label) labelParts.push(n.label);
|
|
895
895
|
if (labelParts.length > 0) {
|
|
896
|
-
parts.push(
|
|
896
|
+
parts.push(chunkLFZZ4NCP_cjs.text({
|
|
897
897
|
x: tipX + 8,
|
|
898
898
|
y: textY,
|
|
899
899
|
class: payoffCls
|
|
@@ -901,7 +901,7 @@ function renderDecisionNode(ln, layout) {
|
|
|
901
901
|
}
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
|
-
return
|
|
904
|
+
return chunkLFZZ4NCP_cjs.group({
|
|
905
905
|
"data-node-id": n.id,
|
|
906
906
|
"data-node-kind": n.kind,
|
|
907
907
|
"data-ev": n.ev !== void 0 ? String(n.ev) : ""
|
|
@@ -944,7 +944,7 @@ function renderMlNode(ln, ast) {
|
|
|
944
944
|
const parts = [];
|
|
945
945
|
const x = ln.x - ln.width / 2;
|
|
946
946
|
const y = ln.y - ln.height / 2;
|
|
947
|
-
parts.push(
|
|
947
|
+
parts.push(chunkLFZZ4NCP_cjs.rect({
|
|
948
948
|
x,
|
|
949
949
|
y,
|
|
950
950
|
width: ln.width,
|
|
@@ -959,25 +959,25 @@ function renderMlNode(ln, ast) {
|
|
|
959
959
|
const lineH = 14;
|
|
960
960
|
if (n.kind === "split" && n.feature) {
|
|
961
961
|
const thresh = typeof n.threshold === "number" ? formatNum(n.threshold) : n.threshold ?? "";
|
|
962
|
-
parts.push(
|
|
962
|
+
parts.push(chunkLFZZ4NCP_cjs.text(
|
|
963
963
|
{ x: textX, y: textY, class: "lt-dtree-ml-line-1", "text-anchor": "middle" },
|
|
964
964
|
`${n.feature} ${n.op ?? ""} ${thresh}`
|
|
965
965
|
));
|
|
966
966
|
textY += lineH;
|
|
967
967
|
} else if (n.label) {
|
|
968
|
-
parts.push(
|
|
968
|
+
parts.push(chunkLFZZ4NCP_cjs.text({ x: textX, y: textY, class: "lt-dtree-ml-line-1", "text-anchor": "middle" }, n.label));
|
|
969
969
|
textY += lineH;
|
|
970
970
|
}
|
|
971
971
|
if (n.impurity !== void 0) {
|
|
972
972
|
const impName = ast.impurityName ?? "gini";
|
|
973
|
-
parts.push(
|
|
973
|
+
parts.push(chunkLFZZ4NCP_cjs.text(
|
|
974
974
|
{ x: textX, y: textY, class: "lt-dtree-ml-line-muted", "text-anchor": "middle" },
|
|
975
975
|
`${impName} = ${formatNum(n.impurity)}`
|
|
976
976
|
));
|
|
977
977
|
textY += lineH;
|
|
978
978
|
}
|
|
979
979
|
if (n.samples !== void 0) {
|
|
980
|
-
parts.push(
|
|
980
|
+
parts.push(chunkLFZZ4NCP_cjs.text(
|
|
981
981
|
{ x: textX, y: textY, class: "lt-dtree-ml-line-muted", "text-anchor": "middle" },
|
|
982
982
|
`samples = ${n.samples}`
|
|
983
983
|
));
|
|
@@ -985,7 +985,7 @@ function renderMlNode(ln, ast) {
|
|
|
985
985
|
}
|
|
986
986
|
if (n.value !== void 0) {
|
|
987
987
|
const vStr = Array.isArray(n.value) ? `value = [${n.value.join(", ")}]` : `value = ${formatNum(n.value)}`;
|
|
988
|
-
parts.push(
|
|
988
|
+
parts.push(chunkLFZZ4NCP_cjs.text({ x: textX, y: textY, class: "lt-dtree-ml-mono", "text-anchor": "middle" }, vStr));
|
|
989
989
|
textY += lineH;
|
|
990
990
|
}
|
|
991
991
|
if (n.className) {
|
|
@@ -994,13 +994,13 @@ function renderMlNode(ln, ast) {
|
|
|
994
994
|
const idx = ast.classes.indexOf(n.className);
|
|
995
995
|
if (idx >= 0) colorIdx = idx;
|
|
996
996
|
}
|
|
997
|
-
parts.push(
|
|
997
|
+
parts.push(chunkLFZZ4NCP_cjs.text(
|
|
998
998
|
{ x: textX, y: textY, class: "lt-dtree-ml-class", "text-anchor": "middle", fill: classColor(colorIdx) },
|
|
999
999
|
`class = ${n.className}`
|
|
1000
1000
|
));
|
|
1001
1001
|
textY += lineH;
|
|
1002
1002
|
} else if (typeof n.value === "number") {
|
|
1003
|
-
parts.push(
|
|
1003
|
+
parts.push(chunkLFZZ4NCP_cjs.text(
|
|
1004
1004
|
{ x: textX, y: textY, class: "lt-dtree-ml-class", "text-anchor": "middle", fill: "#0f172a" },
|
|
1005
1005
|
`predicted = ${formatNum(n.value)}`
|
|
1006
1006
|
));
|
|
@@ -1017,13 +1017,13 @@ function renderMlNode(ln, ast) {
|
|
|
1017
1017
|
for (let i = 0; i < arr.length; i++) {
|
|
1018
1018
|
const seg = arr[i] / sum * barW;
|
|
1019
1019
|
if (seg > 0) {
|
|
1020
|
-
parts.push(
|
|
1020
|
+
parts.push(chunkLFZZ4NCP_cjs.rect({ x: cursor, y: barY, width: seg, height: 5, fill: classColor(i), stroke: "none" }));
|
|
1021
1021
|
}
|
|
1022
1022
|
cursor += seg;
|
|
1023
1023
|
}
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
|
-
return
|
|
1026
|
+
return chunkLFZZ4NCP_cjs.group({
|
|
1027
1027
|
"data-node-id": n.id,
|
|
1028
1028
|
"data-node-kind": n.kind,
|
|
1029
1029
|
"data-samples": n.samples !== void 0 ? String(n.samples) : "",
|
|
@@ -1035,7 +1035,7 @@ function renderTaxonomyNode(ln) {
|
|
|
1035
1035
|
const isLeaf = n.kind === "answer" || n.children.length === 0;
|
|
1036
1036
|
const cls = isLeaf ? "lt-dtree-taxon-leaf" : "lt-dtree-taxon";
|
|
1037
1037
|
const parts = [];
|
|
1038
|
-
parts.push(
|
|
1038
|
+
parts.push(chunkLFZZ4NCP_cjs.rect({
|
|
1039
1039
|
x: ln.x - ln.width / 2,
|
|
1040
1040
|
y: ln.y - ln.height / 2,
|
|
1041
1041
|
width: ln.width,
|
|
@@ -1048,10 +1048,10 @@ function renderTaxonomyNode(ln) {
|
|
|
1048
1048
|
const totalH = lines.length * 14;
|
|
1049
1049
|
let ty = ln.y - totalH / 2 + 11;
|
|
1050
1050
|
for (const line2 of lines) {
|
|
1051
|
-
parts.push(
|
|
1051
|
+
parts.push(chunkLFZZ4NCP_cjs.text({ x: ln.x, y: ty, class: "lt-dtree-taxon-label" }, line2));
|
|
1052
1052
|
ty += 14;
|
|
1053
1053
|
}
|
|
1054
|
-
return
|
|
1054
|
+
return chunkLFZZ4NCP_cjs.group({
|
|
1055
1055
|
"data-node-id": n.id,
|
|
1056
1056
|
"data-node-kind": n.kind,
|
|
1057
1057
|
"data-leaf": isLeaf ? "true" : "false"
|
|
@@ -1084,18 +1084,18 @@ function renderDecisionTree(ast, config) {
|
|
|
1084
1084
|
const width = Math.ceil(layout.width);
|
|
1085
1085
|
const height = Math.ceil(layout.height + titleOffset);
|
|
1086
1086
|
const children = [];
|
|
1087
|
-
children.push(
|
|
1088
|
-
children.push(
|
|
1089
|
-
children.push(
|
|
1087
|
+
children.push(chunkLFZZ4NCP_cjs.title(ast.title ?? "Decision Tree"));
|
|
1088
|
+
children.push(chunkLFZZ4NCP_cjs.desc(`Decision tree (${ast.mode} mode) with ${layout.nodes.length} nodes and ${layout.edges.length} edges`));
|
|
1089
|
+
children.push(chunkLFZZ4NCP_cjs.el("style", {}, buildCss(t)));
|
|
1090
1090
|
if (ast.title) {
|
|
1091
|
-
children.push(
|
|
1091
|
+
children.push(chunkLFZZ4NCP_cjs.text({ x: 20, y: 24, class: "lt-dtree-title" }, ast.title));
|
|
1092
1092
|
}
|
|
1093
1093
|
const inner = [];
|
|
1094
1094
|
for (const e of layout.edges) {
|
|
1095
1095
|
const cls = e.isOptimal ? "lt-dtree-edge-optimal" : "lt-dtree-edge";
|
|
1096
1096
|
const attrs = { d: e.path, class: cls, "data-edge": `${e.from}->${e.to}` };
|
|
1097
1097
|
if (e.strokeWidth !== void 0 && !e.isOptimal) attrs["stroke-width"] = e.strokeWidth;
|
|
1098
|
-
inner.push(
|
|
1098
|
+
inner.push(chunkLFZZ4NCP_cjs.path(attrs));
|
|
1099
1099
|
}
|
|
1100
1100
|
const anchors = layout.labelAnchors ?? {};
|
|
1101
1101
|
for (const e of layout.edges) {
|
|
@@ -1119,7 +1119,7 @@ function renderDecisionTree(ast, config) {
|
|
|
1119
1119
|
const charW = isProb ? 5.5 : 6.2;
|
|
1120
1120
|
const w = Math.max(e.label.length * charW + 10, 18);
|
|
1121
1121
|
const h = 14;
|
|
1122
|
-
inner.push(
|
|
1122
|
+
inner.push(chunkLFZZ4NCP_cjs.rect({
|
|
1123
1123
|
x: lx - w / 2,
|
|
1124
1124
|
y: ly - h / 2,
|
|
1125
1125
|
width: w,
|
|
@@ -1128,18 +1128,18 @@ function renderDecisionTree(ast, config) {
|
|
|
1128
1128
|
rx: 3,
|
|
1129
1129
|
ry: 3
|
|
1130
1130
|
}));
|
|
1131
|
-
inner.push(
|
|
1131
|
+
inner.push(chunkLFZZ4NCP_cjs.text({ x: lx, y: ly, class: labelClass }, e.label));
|
|
1132
1132
|
}
|
|
1133
1133
|
for (const ln of layout.nodes) {
|
|
1134
1134
|
if (ast.mode === "decision") inner.push(renderDecisionNode(ln, layout));
|
|
1135
1135
|
else if (ast.mode === "ml") inner.push(renderMlNode(ln, ast));
|
|
1136
1136
|
else inner.push(renderTaxonomyNode(ln));
|
|
1137
1137
|
}
|
|
1138
|
-
children.push(
|
|
1139
|
-
return
|
|
1138
|
+
children.push(chunkLFZZ4NCP_cjs.group({ transform: `translate(0, ${titleOffset})`, "data-mode": ast.mode }, inner));
|
|
1139
|
+
return chunkLFZZ4NCP_cjs.svgRoot({
|
|
1140
1140
|
class: "lt-dtree",
|
|
1141
1141
|
role: "img",
|
|
1142
|
-
"aria-label":
|
|
1142
|
+
"aria-label": chunkLFZZ4NCP_cjs.escapeXml(ast.title ?? `Decision tree (${ast.mode})`),
|
|
1143
1143
|
width,
|
|
1144
1144
|
height,
|
|
1145
1145
|
viewBox: `0 0 ${width} ${height}`
|
|
@@ -1399,23 +1399,35 @@ function parseTimeline(src) {
|
|
|
1399
1399
|
i++;
|
|
1400
1400
|
continue;
|
|
1401
1401
|
}
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1402
|
+
const isTrack = /^track\b/i.test(text2);
|
|
1403
|
+
const isSection = /^section\b/i.test(text2);
|
|
1404
|
+
if (isTrack || isSection) {
|
|
1405
|
+
const keyword = isTrack ? "track" : "section";
|
|
1406
|
+
const body = text2.replace(new RegExp(`^${keyword}\\s+`, "i"), "");
|
|
1407
|
+
let name;
|
|
1408
|
+
if (body.startsWith('"')) {
|
|
1409
|
+
const [n] = readQuoted(body, L.line);
|
|
1410
|
+
name = n;
|
|
1411
|
+
} else {
|
|
1412
|
+
name = body.replace(/:\s*$/, "").trim();
|
|
1413
|
+
if (!name) {
|
|
1414
|
+
throw new TimelineParseError(`Expected name after '${keyword}'`, L.line);
|
|
1415
|
+
}
|
|
1407
1416
|
}
|
|
1408
1417
|
const trackId = nextId2("track");
|
|
1409
1418
|
ast.tracks.push({ id: trackId, label: name });
|
|
1410
1419
|
i++;
|
|
1411
|
-
|
|
1420
|
+
const baseIndent = L.indent;
|
|
1421
|
+
while (i < lines.length) {
|
|
1412
1422
|
const child = lines[i];
|
|
1423
|
+
if (child.indent <= baseIndent && /^(section|track)\b/i.test(child.text)) break;
|
|
1424
|
+
if (isTrack && child.indent <= baseIndent) break;
|
|
1413
1425
|
if (/^note\s*:/i.test(child.text)) {
|
|
1414
1426
|
i++;
|
|
1415
1427
|
continue;
|
|
1416
1428
|
}
|
|
1417
1429
|
const parsed2 = parseEventLine(child.text, child.line, nextId2);
|
|
1418
|
-
if (!parsed2) throw new TimelineParseError(`Unrecognized line in
|
|
1430
|
+
if (!parsed2) throw new TimelineParseError(`Unrecognized line in ${keyword}: ${child.text}`, child.line);
|
|
1419
1431
|
parsed2.event.trackId = trackId;
|
|
1420
1432
|
ast.events.push(parsed2.event);
|
|
1421
1433
|
i++;
|
|
@@ -2108,13 +2120,13 @@ function renderTimeline(src, config) {
|
|
|
2108
2120
|
const theme = chunkD7EHZFK4_cjs.resolveTimelineTheme(config?.theme ?? "default");
|
|
2109
2121
|
const styleBlock = styleForTheme(theme, config?.fontFamily);
|
|
2110
2122
|
const children = [
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2123
|
+
chunkLFZZ4NCP_cjs.title(ast.title ? `Timeline \u2014 ${ast.title}` : "Timeline"),
|
|
2124
|
+
chunkLFZZ4NCP_cjs.desc("Schematex timeline diagram"),
|
|
2125
|
+
chunkLFZZ4NCP_cjs.defs([`<style>${styleBlock}</style>`])
|
|
2114
2126
|
];
|
|
2115
2127
|
if (ast.title) {
|
|
2116
2128
|
children.push(
|
|
2117
|
-
|
|
2129
|
+
chunkLFZZ4NCP_cjs.text(
|
|
2118
2130
|
{ x: layout.width / 2, y: 26, "text-anchor": "middle", class: "st-title" },
|
|
2119
2131
|
ast.title
|
|
2120
2132
|
)
|
|
@@ -2134,7 +2146,7 @@ function renderTimeline(src, config) {
|
|
|
2134
2146
|
break;
|
|
2135
2147
|
}
|
|
2136
2148
|
children.push(renderAxis(layout));
|
|
2137
|
-
return
|
|
2149
|
+
return chunkLFZZ4NCP_cjs.svgRoot(
|
|
2138
2150
|
{
|
|
2139
2151
|
viewBox: `0 0 ${layout.width} ${layout.height}`,
|
|
2140
2152
|
width: layout.width,
|
|
@@ -2224,7 +2236,7 @@ function renderEras(layout, theme) {
|
|
|
2224
2236
|
const stripX = isLeftmost ? Math.min(e.x, layout.plotX) : e.x;
|
|
2225
2237
|
const stripEnd = isRightmost ? Math.max(e.x + e.width, plotEnd) : e.x + e.width;
|
|
2226
2238
|
return [
|
|
2227
|
-
|
|
2239
|
+
chunkLFZZ4NCP_cjs.rect({
|
|
2228
2240
|
x: e.x,
|
|
2229
2241
|
y,
|
|
2230
2242
|
width: e.width,
|
|
@@ -2233,7 +2245,7 @@ function renderEras(layout, theme) {
|
|
|
2233
2245
|
class: "st-era-rect",
|
|
2234
2246
|
"data-era-id": e.era.id
|
|
2235
2247
|
}),
|
|
2236
|
-
|
|
2248
|
+
chunkLFZZ4NCP_cjs.rect({
|
|
2237
2249
|
x: stripX,
|
|
2238
2250
|
y: layout.plotY,
|
|
2239
2251
|
width: stripEnd - stripX,
|
|
@@ -2241,24 +2253,24 @@ function renderEras(layout, theme) {
|
|
|
2241
2253
|
fill,
|
|
2242
2254
|
class: "st-era-strip"
|
|
2243
2255
|
}),
|
|
2244
|
-
|
|
2256
|
+
chunkLFZZ4NCP_cjs.text(
|
|
2245
2257
|
{ x: labelX, y: y + 12, class: "st-era-label" },
|
|
2246
2258
|
truncate(e.era.label, Math.max(4, Math.floor(e.width / 7)))
|
|
2247
2259
|
)
|
|
2248
2260
|
].join("");
|
|
2249
2261
|
});
|
|
2250
|
-
return
|
|
2262
|
+
return chunkLFZZ4NCP_cjs.group({ class: "st-eras" }, items);
|
|
2251
2263
|
}
|
|
2252
2264
|
function renderAxis(layout) {
|
|
2253
2265
|
const ax = layout.axisY;
|
|
2254
2266
|
const items = [
|
|
2255
|
-
|
|
2267
|
+
chunkLFZZ4NCP_cjs.line({ x1: layout.plotX, y1: ax, x2: layout.plotX + layout.plotW, y2: ax, class: "st-axis-line" })
|
|
2256
2268
|
];
|
|
2257
2269
|
for (const t of layout.ticks) {
|
|
2258
|
-
items.push(
|
|
2259
|
-
items.push(
|
|
2270
|
+
items.push(chunkLFZZ4NCP_cjs.line({ x1: t.x, y1: ax, x2: t.x, y2: ax + 5, class: "st-axis-tick" }));
|
|
2271
|
+
items.push(chunkLFZZ4NCP_cjs.text({ x: t.x, y: ax + 18, "text-anchor": "middle", class: "st-axis-label" }, t.label));
|
|
2260
2272
|
}
|
|
2261
|
-
return
|
|
2273
|
+
return chunkLFZZ4NCP_cjs.group({ class: "st-axis" }, items);
|
|
2262
2274
|
}
|
|
2263
2275
|
function renderSwimlane(layout, theme) {
|
|
2264
2276
|
const parts = [];
|
|
@@ -2271,16 +2283,16 @@ function renderSwimlane(layout, theme) {
|
|
|
2271
2283
|
return parts.join("");
|
|
2272
2284
|
}
|
|
2273
2285
|
function renderTrackLabels(layout) {
|
|
2274
|
-
const items = layout.lanes.filter((l) => l.label).map((l) =>
|
|
2286
|
+
const items = layout.lanes.filter((l) => l.label).map((l) => chunkLFZZ4NCP_cjs.text(
|
|
2275
2287
|
{ x: layout.plotX - 12, y: l.y + l.height / 2 + 4, "text-anchor": "end", class: "st-track-label" },
|
|
2276
2288
|
l.label
|
|
2277
2289
|
));
|
|
2278
|
-
return
|
|
2290
|
+
return chunkLFZZ4NCP_cjs.group({ class: "st-track-labels" }, items);
|
|
2279
2291
|
}
|
|
2280
2292
|
function renderLaneStripes(layout) {
|
|
2281
2293
|
const items = layout.lanes.map((l, i) => {
|
|
2282
2294
|
if (i % 2 !== 0) return "";
|
|
2283
|
-
return
|
|
2295
|
+
return chunkLFZZ4NCP_cjs.rect({
|
|
2284
2296
|
x: layout.plotX,
|
|
2285
2297
|
y: l.y,
|
|
2286
2298
|
width: layout.plotW,
|
|
@@ -2288,7 +2300,7 @@ function renderLaneStripes(layout) {
|
|
|
2288
2300
|
class: "st-lane-stripe"
|
|
2289
2301
|
});
|
|
2290
2302
|
}).filter(Boolean);
|
|
2291
|
-
return
|
|
2303
|
+
return chunkLFZZ4NCP_cjs.group({ class: "st-lanes" }, items);
|
|
2292
2304
|
}
|
|
2293
2305
|
function renderSwimlaneRanges(layout, theme) {
|
|
2294
2306
|
const items = [];
|
|
@@ -2298,7 +2310,7 @@ function renderSwimlaneRanges(layout, theme) {
|
|
|
2298
2310
|
if (ev.event.kind !== "range") continue;
|
|
2299
2311
|
const idx = trackOrder.indexOf(ev.event.trackId);
|
|
2300
2312
|
const fill = ev.event.color ?? palette[(idx < 0 ? 0 : idx) % palette.length];
|
|
2301
|
-
items.push(
|
|
2313
|
+
items.push(chunkLFZZ4NCP_cjs.rect({
|
|
2302
2314
|
x: ev.x,
|
|
2303
2315
|
y: ev.y,
|
|
2304
2316
|
width: ev.w ?? 4,
|
|
@@ -2311,18 +2323,18 @@ function renderSwimlaneRanges(layout, theme) {
|
|
|
2311
2323
|
}));
|
|
2312
2324
|
const w = ev.w ?? 0;
|
|
2313
2325
|
if (w >= 60) {
|
|
2314
|
-
items.push(
|
|
2326
|
+
items.push(chunkLFZZ4NCP_cjs.text(
|
|
2315
2327
|
{ x: ev.labelX, y: ev.labelY, "text-anchor": "middle", class: "st-range-label" },
|
|
2316
2328
|
truncate(ev.event.label, Math.floor(w / 6))
|
|
2317
2329
|
));
|
|
2318
2330
|
} else if (w > 0) {
|
|
2319
|
-
items.push(
|
|
2331
|
+
items.push(chunkLFZZ4NCP_cjs.text(
|
|
2320
2332
|
{ x: ev.x + w + 4, y: ev.labelY, "text-anchor": "start", class: "st-event-label" },
|
|
2321
2333
|
ev.event.label
|
|
2322
2334
|
));
|
|
2323
2335
|
}
|
|
2324
2336
|
}
|
|
2325
|
-
return
|
|
2337
|
+
return chunkLFZZ4NCP_cjs.group({ class: "st-ranges" }, items);
|
|
2326
2338
|
}
|
|
2327
2339
|
function renderSwimlanePoints(layout, theme) {
|
|
2328
2340
|
const items = [];
|
|
@@ -2333,7 +2345,7 @@ function renderSwimlanePoints(layout, theme) {
|
|
|
2333
2345
|
const shape = ev.event.shape ?? (isMilestone ? "star" : "circle");
|
|
2334
2346
|
items.push(renderMarker(ev, color, shape, isMilestone));
|
|
2335
2347
|
}
|
|
2336
|
-
return
|
|
2348
|
+
return chunkLFZZ4NCP_cjs.group({ class: "st-points" }, items);
|
|
2337
2349
|
}
|
|
2338
2350
|
function renderMarker(ev, color, shape, isMilestone) {
|
|
2339
2351
|
const x = ev.x;
|
|
@@ -2342,16 +2354,16 @@ function renderMarker(ev, color, shape, isMilestone) {
|
|
|
2342
2354
|
const klass = isMilestone ? "st-milestone" : "st-event-dot";
|
|
2343
2355
|
switch (shape) {
|
|
2344
2356
|
case "square":
|
|
2345
|
-
return
|
|
2357
|
+
return chunkLFZZ4NCP_cjs.rect({ x: x - r, y: y - r, width: r * 2, height: r * 2, fill: color, class: klass, "data-event-id": ev.event.id });
|
|
2346
2358
|
case "diamond":
|
|
2347
|
-
return
|
|
2359
|
+
return chunkLFZZ4NCP_cjs.path({ d: `M ${x},${y - r} L ${x + r},${y} L ${x},${y + r} L ${x - r},${y} Z`, fill: color, class: klass, "data-event-id": ev.event.id });
|
|
2348
2360
|
case "star":
|
|
2349
|
-
return
|
|
2361
|
+
return chunkLFZZ4NCP_cjs.path({ d: starPath(x, y, r + 2, (r + 2) / 2.5, 5), fill: color, class: klass, "data-event-id": ev.event.id });
|
|
2350
2362
|
case "flag":
|
|
2351
|
-
return
|
|
2363
|
+
return chunkLFZZ4NCP_cjs.path({ d: `M ${x - r},${y + r} L ${x - r},${y - r - 4} L ${x + r + 4},${y - r - 1} L ${x - r},${y + 2}`, fill: color, class: klass, "data-event-id": ev.event.id });
|
|
2352
2364
|
case "circle":
|
|
2353
2365
|
default:
|
|
2354
|
-
return
|
|
2366
|
+
return chunkLFZZ4NCP_cjs.circle({ cx: x, cy: y, r, fill: color, class: klass, "data-event-id": ev.event.id });
|
|
2355
2367
|
}
|
|
2356
2368
|
}
|
|
2357
2369
|
function renderLabels(layout) {
|
|
@@ -2364,14 +2376,14 @@ function renderLabels(layout) {
|
|
|
2364
2376
|
if (Math.abs(dy) > 22) {
|
|
2365
2377
|
const y1 = dy < 0 ? ev.y - 6 : ev.y + 6;
|
|
2366
2378
|
const y2 = dy < 0 ? ev.labelY + 3 : ev.labelY - 10;
|
|
2367
|
-
items.push(
|
|
2379
|
+
items.push(chunkLFZZ4NCP_cjs.line({ x1: ev.x, y1, x2: ev.x, y2, class: "st-label-leader" }));
|
|
2368
2380
|
}
|
|
2369
|
-
items.push(
|
|
2381
|
+
items.push(chunkLFZZ4NCP_cjs.text(
|
|
2370
2382
|
{ x: ev.labelX, y: ev.labelY, "text-anchor": ev.labelAnchor, class: cls },
|
|
2371
2383
|
text2
|
|
2372
2384
|
));
|
|
2373
2385
|
}
|
|
2374
|
-
return
|
|
2386
|
+
return chunkLFZZ4NCP_cjs.group({ class: "st-labels" }, items);
|
|
2375
2387
|
}
|
|
2376
2388
|
function renderNotes(layout) {
|
|
2377
2389
|
const items = [];
|
|
@@ -2381,15 +2393,15 @@ function renderNotes(layout) {
|
|
|
2381
2393
|
const ny = ev.noteY ?? ev.y + 18;
|
|
2382
2394
|
const nx = ev.noteX ?? x + 10;
|
|
2383
2395
|
const wrapped = wrapText2(ev.event.note, 46);
|
|
2384
|
-
items.push(
|
|
2396
|
+
items.push(chunkLFZZ4NCP_cjs.path({ d: `M ${x} ${ev.y + 6} Q ${x + 4} ${ny - 4} ${nx} ${ny}`, class: "st-callout-line" }));
|
|
2385
2397
|
wrapped.forEach((ln, i) => {
|
|
2386
|
-
items.push(
|
|
2398
|
+
items.push(chunkLFZZ4NCP_cjs.text(
|
|
2387
2399
|
{ x: nx, y: ny + i * 13, class: "st-callout-text" },
|
|
2388
2400
|
ln
|
|
2389
2401
|
));
|
|
2390
2402
|
});
|
|
2391
2403
|
}
|
|
2392
|
-
return
|
|
2404
|
+
return chunkLFZZ4NCP_cjs.group({ class: "st-notes" }, items);
|
|
2393
2405
|
}
|
|
2394
2406
|
function renderGantt(layout, theme) {
|
|
2395
2407
|
const parts = [];
|
|
@@ -2405,7 +2417,7 @@ function renderGanttLanes(layout) {
|
|
|
2405
2417
|
const items = [];
|
|
2406
2418
|
layout.lanes.forEach((l, i) => {
|
|
2407
2419
|
if (i % 2 === 0) {
|
|
2408
|
-
items.push(
|
|
2420
|
+
items.push(chunkLFZZ4NCP_cjs.rect({
|
|
2409
2421
|
x: layout.plotX,
|
|
2410
2422
|
y: l.y,
|
|
2411
2423
|
width: layout.plotW,
|
|
@@ -2413,14 +2425,14 @@ function renderGanttLanes(layout) {
|
|
|
2413
2425
|
class: "st-lane-stripe"
|
|
2414
2426
|
}));
|
|
2415
2427
|
}
|
|
2416
|
-
items.push(
|
|
2428
|
+
items.push(chunkLFZZ4NCP_cjs.text({
|
|
2417
2429
|
x: layout.plotX - 10,
|
|
2418
2430
|
y: l.y + l.height / 2 + 4,
|
|
2419
2431
|
"text-anchor": "end",
|
|
2420
2432
|
class: "st-lane-label"
|
|
2421
2433
|
}, l.label));
|
|
2422
2434
|
});
|
|
2423
|
-
return
|
|
2435
|
+
return chunkLFZZ4NCP_cjs.group({ class: "st-gantt-lanes" }, items);
|
|
2424
2436
|
}
|
|
2425
2437
|
function renderGanttBars(layout, theme) {
|
|
2426
2438
|
const items = [];
|
|
@@ -2431,7 +2443,7 @@ function renderGanttBars(layout, theme) {
|
|
|
2431
2443
|
const cat = ev.event.category ?? layout.lanes[0]?.label ?? "";
|
|
2432
2444
|
const color = ev.event.color ?? legendByLabel.get(cat) ?? theme.categoryPalette[0];
|
|
2433
2445
|
const w = ev.w ?? 4;
|
|
2434
|
-
items.push(
|
|
2446
|
+
items.push(chunkLFZZ4NCP_cjs.rect({
|
|
2435
2447
|
x: ev.x,
|
|
2436
2448
|
y: ev.y,
|
|
2437
2449
|
width: w,
|
|
@@ -2444,20 +2456,20 @@ function renderGanttBars(layout, theme) {
|
|
|
2444
2456
|
"data-category": cat
|
|
2445
2457
|
}));
|
|
2446
2458
|
if (w >= 60) {
|
|
2447
|
-
items.push(
|
|
2459
|
+
items.push(chunkLFZZ4NCP_cjs.text(
|
|
2448
2460
|
{ x: ev.labelX, y: ev.labelY, "text-anchor": "middle", class: "st-range-label" },
|
|
2449
2461
|
truncate(ev.event.label, Math.floor(w / 6))
|
|
2450
2462
|
));
|
|
2451
2463
|
} else if (w > 0) {
|
|
2452
2464
|
const lane = laneByCat.get(cat);
|
|
2453
2465
|
const ly = lane ? lane.y + lane.height / 2 + 4 : ev.labelY;
|
|
2454
|
-
items.push(
|
|
2466
|
+
items.push(chunkLFZZ4NCP_cjs.text(
|
|
2455
2467
|
{ x: ev.x + w + 4, y: ly, "text-anchor": "start", class: "st-event-label" },
|
|
2456
2468
|
ev.event.label
|
|
2457
2469
|
));
|
|
2458
2470
|
}
|
|
2459
2471
|
}
|
|
2460
|
-
return
|
|
2472
|
+
return chunkLFZZ4NCP_cjs.group({ class: "st-gantt-bars" }, items);
|
|
2461
2473
|
}
|
|
2462
2474
|
function renderGanttPins(layout) {
|
|
2463
2475
|
const pins = layout.pins ?? [];
|
|
@@ -2466,20 +2478,20 @@ function renderGanttPins(layout) {
|
|
|
2466
2478
|
for (const p of pins) {
|
|
2467
2479
|
items.push(renderPin(p));
|
|
2468
2480
|
}
|
|
2469
|
-
return
|
|
2481
|
+
return chunkLFZZ4NCP_cjs.group({ class: "st-gantt-pins" }, items);
|
|
2470
2482
|
}
|
|
2471
2483
|
function renderPin(p) {
|
|
2472
2484
|
const isMilestone = p.event.kind === "milestone";
|
|
2473
|
-
const shaft =
|
|
2485
|
+
const shaft = chunkLFZZ4NCP_cjs.path({
|
|
2474
2486
|
d: `M ${p.x} ${p.labelY + 2} L ${p.x} ${p.axisY - 4}`,
|
|
2475
2487
|
class: "st-pin-shaft"
|
|
2476
2488
|
});
|
|
2477
|
-
const head = isMilestone ?
|
|
2489
|
+
const head = isMilestone ? chunkLFZZ4NCP_cjs.path({
|
|
2478
2490
|
d: starPath(p.x, p.axisY - 6, 7, 3, 5),
|
|
2479
2491
|
fill: p.color,
|
|
2480
2492
|
class: "st-pin-head",
|
|
2481
2493
|
"data-event-id": p.event.id
|
|
2482
|
-
}) :
|
|
2494
|
+
}) : chunkLFZZ4NCP_cjs.circle({
|
|
2483
2495
|
cx: p.x,
|
|
2484
2496
|
cy: p.axisY - 6,
|
|
2485
2497
|
r: 5,
|
|
@@ -2488,7 +2500,7 @@ function renderPin(p) {
|
|
|
2488
2500
|
"data-event-id": p.event.id
|
|
2489
2501
|
});
|
|
2490
2502
|
const txt = p.event.icon ? `${p.event.icon} ${p.event.label}` : p.event.label;
|
|
2491
|
-
const label =
|
|
2503
|
+
const label = chunkLFZZ4NCP_cjs.text(
|
|
2492
2504
|
{ x: p.x, y: p.labelY, "text-anchor": "middle", class: "st-pin-label" },
|
|
2493
2505
|
txt
|
|
2494
2506
|
);
|
|
@@ -2504,15 +2516,15 @@ function renderLegend(layout) {
|
|
|
2504
2516
|
const x = layout.width - boxW - 16;
|
|
2505
2517
|
const y = layout.plotY;
|
|
2506
2518
|
const items = [
|
|
2507
|
-
|
|
2508
|
-
|
|
2519
|
+
chunkLFZZ4NCP_cjs.rect({ x, y, width: boxW, height: h, rx: 6, ry: 6, class: "st-legend-box" }),
|
|
2520
|
+
chunkLFZZ4NCP_cjs.text({ x: x + padding, y: y + padding + 12, class: "st-legend-title" }, "Teams")
|
|
2509
2521
|
];
|
|
2510
2522
|
legend.forEach((it, i) => {
|
|
2511
2523
|
const rowY = y + padding + 18 + i * rowH + 8;
|
|
2512
|
-
items.push(
|
|
2513
|
-
items.push(
|
|
2524
|
+
items.push(chunkLFZZ4NCP_cjs.rect({ x: x + padding, y: rowY - 7, width: 12, height: 12, rx: 2, ry: 2, fill: it.color }));
|
|
2525
|
+
items.push(chunkLFZZ4NCP_cjs.text({ x: x + padding + 20, y: rowY + 3, class: "st-legend-label" }, truncate(it.label, 14)));
|
|
2514
2526
|
});
|
|
2515
|
-
return
|
|
2527
|
+
return chunkLFZZ4NCP_cjs.group({ class: "st-legend" }, items);
|
|
2516
2528
|
}
|
|
2517
2529
|
function renderLollipop(layout, theme) {
|
|
2518
2530
|
const parts = [];
|
|
@@ -2525,7 +2537,7 @@ function renderLollipopRanges(layout, theme) {
|
|
|
2525
2537
|
for (const ev of layout.events) {
|
|
2526
2538
|
if (ev.event.kind !== "range") continue;
|
|
2527
2539
|
const color = ev.event.color ?? theme.categoryPalette[0];
|
|
2528
|
-
items.push(
|
|
2540
|
+
items.push(chunkLFZZ4NCP_cjs.rect({
|
|
2529
2541
|
x: ev.x,
|
|
2530
2542
|
y: ev.y,
|
|
2531
2543
|
width: ev.w ?? 4,
|
|
@@ -2537,7 +2549,7 @@ function renderLollipopRanges(layout, theme) {
|
|
|
2537
2549
|
"data-event-id": ev.event.id
|
|
2538
2550
|
}));
|
|
2539
2551
|
}
|
|
2540
|
-
return
|
|
2552
|
+
return chunkLFZZ4NCP_cjs.group({ class: "st-lp-ranges" }, items);
|
|
2541
2553
|
}
|
|
2542
2554
|
function renderLollipopCards(layout, theme) {
|
|
2543
2555
|
const cards = layout.cards ?? [];
|
|
@@ -2546,14 +2558,14 @@ function renderLollipopCards(layout, theme) {
|
|
|
2546
2558
|
for (const c of cards) {
|
|
2547
2559
|
items.push(renderLollipopCard(c, theme));
|
|
2548
2560
|
}
|
|
2549
|
-
return
|
|
2561
|
+
return chunkLFZZ4NCP_cjs.group({ class: "st-lp-cards" }, items);
|
|
2550
2562
|
}
|
|
2551
2563
|
function renderLollipopCard(c, theme) {
|
|
2552
2564
|
const parts = [];
|
|
2553
|
-
parts.push(
|
|
2554
|
-
parts.push(
|
|
2555
|
-
parts.push(
|
|
2556
|
-
parts.push(
|
|
2565
|
+
parts.push(chunkLFZZ4NCP_cjs.path({ d: `M ${c.x} ${c.stemY1} L ${c.x} ${c.stemY2}`, class: "st-stem" }));
|
|
2566
|
+
parts.push(chunkLFZZ4NCP_cjs.circle({ cx: c.x, cy: c.axisY, r: 7, fill: theme.markerFill, stroke: c.color, class: "st-lp-marker-ring" }));
|
|
2567
|
+
parts.push(chunkLFZZ4NCP_cjs.circle({ cx: c.x, cy: c.axisY, r: 3.2, fill: c.color, class: "st-lp-marker-core" }));
|
|
2568
|
+
parts.push(chunkLFZZ4NCP_cjs.rect({
|
|
2557
2569
|
x: c.cardX,
|
|
2558
2570
|
y: c.cardY,
|
|
2559
2571
|
width: c.cardW,
|
|
@@ -2562,7 +2574,7 @@ function renderLollipopCard(c, theme) {
|
|
|
2562
2574
|
ry: 8,
|
|
2563
2575
|
class: "st-card"
|
|
2564
2576
|
}));
|
|
2565
|
-
parts.push(
|
|
2577
|
+
parts.push(chunkLFZZ4NCP_cjs.rect({
|
|
2566
2578
|
x: c.cardX,
|
|
2567
2579
|
y: c.cardY,
|
|
2568
2580
|
width: 4,
|
|
@@ -2573,11 +2585,11 @@ function renderLollipopCard(c, theme) {
|
|
|
2573
2585
|
}));
|
|
2574
2586
|
const padX = c.cardX + 14;
|
|
2575
2587
|
const titleText = c.event.icon ? `${c.event.icon} ${c.event.label}` : c.event.label;
|
|
2576
|
-
parts.push(
|
|
2588
|
+
parts.push(chunkLFZZ4NCP_cjs.text(
|
|
2577
2589
|
{ x: padX, y: c.cardY + 22, class: "st-card-title" },
|
|
2578
2590
|
truncate(titleText, 26)
|
|
2579
2591
|
));
|
|
2580
|
-
parts.push(
|
|
2592
|
+
parts.push(chunkLFZZ4NCP_cjs.text(
|
|
2581
2593
|
{ x: padX, y: c.cardY + 40, class: "st-card-date" },
|
|
2582
2594
|
c.event.start.raw
|
|
2583
2595
|
));
|
|
@@ -3286,7 +3298,7 @@ function layoutStateDiagram(ast) {
|
|
|
3286
3298
|
}
|
|
3287
3299
|
return true;
|
|
3288
3300
|
});
|
|
3289
|
-
const fcResult =
|
|
3301
|
+
const fcResult = chunkGYTWJ6VB_cjs.layoutFlowchart(fcAst);
|
|
3290
3302
|
const stateById = /* @__PURE__ */ new Map();
|
|
3291
3303
|
const collectStates = (s) => {
|
|
3292
3304
|
stateById.set(s.id, s);
|
|
@@ -3615,7 +3627,7 @@ var STYLE = `
|
|
|
3615
3627
|
.lt-title { font: 600 14px system-ui, sans-serif; fill: #1a1a1a; }
|
|
3616
3628
|
`;
|
|
3617
3629
|
function renderArrowMarker() {
|
|
3618
|
-
return
|
|
3630
|
+
return chunkLFZZ4NCP_cjs.el(
|
|
3619
3631
|
"marker",
|
|
3620
3632
|
{
|
|
3621
3633
|
id: ARROW_MARKER_ID,
|
|
@@ -3626,7 +3638,7 @@ function renderArrowMarker() {
|
|
|
3626
3638
|
orient: "auto",
|
|
3627
3639
|
markerUnits: "strokeWidth"
|
|
3628
3640
|
},
|
|
3629
|
-
[
|
|
3641
|
+
[chunkLFZZ4NCP_cjs.polygon({ points: "0,0 10,3 0,6", fill: "#2a2a2a" })]
|
|
3630
3642
|
);
|
|
3631
3643
|
}
|
|
3632
3644
|
function activityText2(a) {
|
|
@@ -3643,33 +3655,33 @@ function activityText2(a) {
|
|
|
3643
3655
|
function renderSimple(node) {
|
|
3644
3656
|
const { x, y, width, height } = node;
|
|
3645
3657
|
const children = [
|
|
3646
|
-
|
|
3658
|
+
chunkLFZZ4NCP_cjs.rect({ x, y, width, height, rx: 8, ry: 8, class: "lt-state-body" })
|
|
3647
3659
|
];
|
|
3648
3660
|
const label = node.node.label || node.id;
|
|
3649
3661
|
if (node.node.activities.length === 0) {
|
|
3650
3662
|
children.push(
|
|
3651
|
-
|
|
3663
|
+
chunkLFZZ4NCP_cjs.text(
|
|
3652
3664
|
{ x: x + width / 2, y: y + height / 2 + 4, "text-anchor": "middle", class: "lt-state-name" },
|
|
3653
3665
|
label
|
|
3654
3666
|
)
|
|
3655
3667
|
);
|
|
3656
3668
|
} else {
|
|
3657
3669
|
children.push(
|
|
3658
|
-
|
|
3670
|
+
chunkLFZZ4NCP_cjs.text(
|
|
3659
3671
|
{ x: x + width / 2, y: y + 16, "text-anchor": "middle", class: "lt-state-name" },
|
|
3660
3672
|
label
|
|
3661
3673
|
)
|
|
3662
3674
|
);
|
|
3663
3675
|
children.push(
|
|
3664
|
-
|
|
3676
|
+
chunkLFZZ4NCP_cjs.line({ x1: x, y1: y + 22, x2: x + width, y2: y + 22, class: "lt-state-div" })
|
|
3665
3677
|
);
|
|
3666
3678
|
let cy = y + 36;
|
|
3667
3679
|
for (const a of node.node.activities) {
|
|
3668
|
-
children.push(
|
|
3680
|
+
children.push(chunkLFZZ4NCP_cjs.text({ x: x + 8, y: cy, class: "lt-state-activity" }, activityText2(a)));
|
|
3669
3681
|
cy += 14;
|
|
3670
3682
|
}
|
|
3671
3683
|
}
|
|
3672
|
-
return
|
|
3684
|
+
return chunkLFZZ4NCP_cjs.group({ class: "lt-state lt-simple", "data-id": node.id }, children);
|
|
3673
3685
|
}
|
|
3674
3686
|
function renderComposite(c) {
|
|
3675
3687
|
const { x, y, width, height } = c;
|
|
@@ -3677,13 +3689,13 @@ function renderComposite(c) {
|
|
|
3677
3689
|
const acts = c.state.activities;
|
|
3678
3690
|
const actsH = acts.length ? acts.length * 14 + 6 : 0;
|
|
3679
3691
|
const parts = [
|
|
3680
|
-
|
|
3692
|
+
chunkLFZZ4NCP_cjs.rect({ x, y, width, height, rx: 10, ry: 10, class: "lt-composite-body" }),
|
|
3681
3693
|
// Title bar background — only the top strip
|
|
3682
|
-
|
|
3694
|
+
chunkLFZZ4NCP_cjs.path({
|
|
3683
3695
|
d: `M ${x + 1} ${y + titleBarH} L ${x + width - 1} ${y + titleBarH}`,
|
|
3684
3696
|
class: "lt-state-div"
|
|
3685
3697
|
}),
|
|
3686
|
-
|
|
3698
|
+
chunkLFZZ4NCP_cjs.text(
|
|
3687
3699
|
{ x: x + 12, y: y + 16, class: "lt-composite-title" },
|
|
3688
3700
|
c.state.label || c.state.id
|
|
3689
3701
|
)
|
|
@@ -3691,11 +3703,11 @@ function renderComposite(c) {
|
|
|
3691
3703
|
if (acts.length) {
|
|
3692
3704
|
let cy = y + titleBarH + 14;
|
|
3693
3705
|
for (const a of acts) {
|
|
3694
|
-
parts.push(
|
|
3706
|
+
parts.push(chunkLFZZ4NCP_cjs.text({ x: x + 12, y: cy, class: "lt-state-activity" }, activityText2(a)));
|
|
3695
3707
|
cy += 14;
|
|
3696
3708
|
}
|
|
3697
3709
|
parts.push(
|
|
3698
|
-
|
|
3710
|
+
chunkLFZZ4NCP_cjs.path({
|
|
3699
3711
|
d: `M ${x + 1} ${y + titleBarH + actsH} L ${x + width - 1} ${y + titleBarH + actsH}`,
|
|
3700
3712
|
class: "lt-state-div"
|
|
3701
3713
|
})
|
|
@@ -3704,11 +3716,11 @@ function renderComposite(c) {
|
|
|
3704
3716
|
if (c.regionDividers) {
|
|
3705
3717
|
for (const yy of c.regionDividers) {
|
|
3706
3718
|
parts.push(
|
|
3707
|
-
|
|
3719
|
+
chunkLFZZ4NCP_cjs.line({ x1: x + 1, y1: yy, x2: x + width - 1, y2: yy, class: "lt-region-div" })
|
|
3708
3720
|
);
|
|
3709
3721
|
}
|
|
3710
3722
|
}
|
|
3711
|
-
return
|
|
3723
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
3712
3724
|
{ class: "lt-state lt-composite", "data-id": c.id },
|
|
3713
3725
|
parts
|
|
3714
3726
|
);
|
|
@@ -3719,24 +3731,24 @@ function renderPseudo(node) {
|
|
|
3719
3731
|
const k = node.node.pseudoKind;
|
|
3720
3732
|
switch (k) {
|
|
3721
3733
|
case "initial":
|
|
3722
|
-
return
|
|
3734
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
3723
3735
|
{ class: "lt-state lt-pseudo", "data-id": node.id, "data-kind": "initial" },
|
|
3724
|
-
[
|
|
3736
|
+
[chunkLFZZ4NCP_cjs.circle({ cx, cy, r: 8, class: "lt-ps-initial" })]
|
|
3725
3737
|
);
|
|
3726
3738
|
case "final":
|
|
3727
|
-
return
|
|
3739
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
3728
3740
|
{ class: "lt-state lt-pseudo", "data-id": node.id, "data-kind": "final" },
|
|
3729
3741
|
[
|
|
3730
|
-
|
|
3731
|
-
|
|
3742
|
+
chunkLFZZ4NCP_cjs.circle({ cx, cy, r: 11, class: "lt-ps-final-outer" }),
|
|
3743
|
+
chunkLFZZ4NCP_cjs.circle({ cx, cy, r: 6, class: "lt-ps-final-inner" })
|
|
3732
3744
|
]
|
|
3733
3745
|
);
|
|
3734
3746
|
case "choice": {
|
|
3735
3747
|
const r = 14;
|
|
3736
|
-
return
|
|
3748
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
3737
3749
|
{ class: "lt-state lt-pseudo", "data-id": node.id, "data-kind": "choice" },
|
|
3738
3750
|
[
|
|
3739
|
-
|
|
3751
|
+
chunkLFZZ4NCP_cjs.polygon({
|
|
3740
3752
|
points: `${cx},${cy - r} ${cx + r},${cy} ${cx},${cy + r} ${cx - r},${cy}`,
|
|
3741
3753
|
class: "lt-ps-choice"
|
|
3742
3754
|
})
|
|
@@ -3744,52 +3756,52 @@ function renderPseudo(node) {
|
|
|
3744
3756
|
);
|
|
3745
3757
|
}
|
|
3746
3758
|
case "junction":
|
|
3747
|
-
return
|
|
3759
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
3748
3760
|
{ class: "lt-state lt-pseudo", "data-id": node.id, "data-kind": "junction" },
|
|
3749
|
-
[
|
|
3761
|
+
[chunkLFZZ4NCP_cjs.circle({ cx, cy, r: 6, class: "lt-ps-junction" })]
|
|
3750
3762
|
);
|
|
3751
3763
|
case "fork":
|
|
3752
3764
|
case "join":
|
|
3753
|
-
return
|
|
3765
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
3754
3766
|
{ class: "lt-state lt-pseudo", "data-id": node.id, "data-kind": k },
|
|
3755
|
-
[
|
|
3767
|
+
[chunkLFZZ4NCP_cjs.rect({ x: node.x, y: node.y, width: node.width, height: node.height, rx: 2, ry: 2, class: "lt-ps-bar" })]
|
|
3756
3768
|
);
|
|
3757
3769
|
case "history":
|
|
3758
|
-
return
|
|
3770
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
3759
3771
|
{ class: "lt-state lt-pseudo", "data-id": node.id, "data-kind": "history" },
|
|
3760
3772
|
[
|
|
3761
|
-
|
|
3762
|
-
|
|
3773
|
+
chunkLFZZ4NCP_cjs.circle({ cx, cy, r: 12, class: "lt-ps-history-body" }),
|
|
3774
|
+
chunkLFZZ4NCP_cjs.text({ x: cx, y: cy + 4, "text-anchor": "middle", class: "lt-ps-history-text" }, "H")
|
|
3763
3775
|
]
|
|
3764
3776
|
);
|
|
3765
3777
|
case "dhistory":
|
|
3766
|
-
return
|
|
3778
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
3767
3779
|
{ class: "lt-state lt-pseudo", "data-id": node.id, "data-kind": "dhistory" },
|
|
3768
3780
|
[
|
|
3769
|
-
|
|
3770
|
-
|
|
3781
|
+
chunkLFZZ4NCP_cjs.circle({ cx, cy, r: 13, class: "lt-ps-history-body" }),
|
|
3782
|
+
chunkLFZZ4NCP_cjs.text({ x: cx, y: cy + 4, "text-anchor": "middle", class: "lt-ps-history-text" }, "H*")
|
|
3771
3783
|
]
|
|
3772
3784
|
);
|
|
3773
3785
|
case "terminate":
|
|
3774
|
-
return
|
|
3786
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
3775
3787
|
{ class: "lt-state lt-pseudo", "data-id": node.id, "data-kind": "terminate" },
|
|
3776
3788
|
[
|
|
3777
|
-
|
|
3778
|
-
|
|
3789
|
+
chunkLFZZ4NCP_cjs.line({ x1: cx - 8, y1: cy - 8, x2: cx + 8, y2: cy + 8, class: "lt-ps-terminate" }),
|
|
3790
|
+
chunkLFZZ4NCP_cjs.line({ x1: cx + 8, y1: cy - 8, x2: cx - 8, y2: cy + 8, class: "lt-ps-terminate" })
|
|
3779
3791
|
]
|
|
3780
3792
|
);
|
|
3781
3793
|
case "entry_point":
|
|
3782
|
-
return
|
|
3794
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
3783
3795
|
{ class: "lt-state lt-pseudo", "data-id": node.id, "data-kind": "entry_point" },
|
|
3784
|
-
[
|
|
3796
|
+
[chunkLFZZ4NCP_cjs.circle({ cx, cy, r: 7, class: "lt-ps-entrypoint" })]
|
|
3785
3797
|
);
|
|
3786
3798
|
case "exit_point":
|
|
3787
|
-
return
|
|
3799
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
3788
3800
|
{ class: "lt-state lt-pseudo", "data-id": node.id, "data-kind": "exit_point" },
|
|
3789
3801
|
[
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3802
|
+
chunkLFZZ4NCP_cjs.circle({ cx, cy, r: 7, class: "lt-ps-exitpoint" }),
|
|
3803
|
+
chunkLFZZ4NCP_cjs.line({ x1: cx - 4, y1: cy - 4, x2: cx + 4, y2: cy + 4, class: "lt-ps-terminate" }),
|
|
3804
|
+
chunkLFZZ4NCP_cjs.line({ x1: cx + 4, y1: cy - 4, x2: cx - 4, y2: cy + 4, class: "lt-ps-terminate" })
|
|
3793
3805
|
]
|
|
3794
3806
|
);
|
|
3795
3807
|
default:
|
|
@@ -3802,7 +3814,7 @@ function renderNode(node) {
|
|
|
3802
3814
|
}
|
|
3803
3815
|
function renderEdge(edge) {
|
|
3804
3816
|
const parts = [
|
|
3805
|
-
|
|
3817
|
+
chunkLFZZ4NCP_cjs.path({
|
|
3806
3818
|
d: edge.path,
|
|
3807
3819
|
class: "lt-transition",
|
|
3808
3820
|
"marker-end": `url(#${ARROW_MARKER_ID})`,
|
|
@@ -3815,7 +3827,7 @@ function renderEdge(edge) {
|
|
|
3815
3827
|
const anchor = edge.labelAnchor ?? "middle";
|
|
3816
3828
|
const dx = anchor === "start" ? 0 : anchor === "end" ? -w : -w / 2;
|
|
3817
3829
|
parts.push(
|
|
3818
|
-
|
|
3830
|
+
chunkLFZZ4NCP_cjs.rect({
|
|
3819
3831
|
x: edge.labelX + dx,
|
|
3820
3832
|
y: edge.labelY - 10,
|
|
3821
3833
|
width: w,
|
|
@@ -3826,7 +3838,7 @@ function renderEdge(edge) {
|
|
|
3826
3838
|
})
|
|
3827
3839
|
);
|
|
3828
3840
|
parts.push(
|
|
3829
|
-
|
|
3841
|
+
chunkLFZZ4NCP_cjs.text(
|
|
3830
3842
|
{
|
|
3831
3843
|
x: edge.labelX,
|
|
3832
3844
|
y: edge.labelY,
|
|
@@ -3837,33 +3849,33 @@ function renderEdge(edge) {
|
|
|
3837
3849
|
)
|
|
3838
3850
|
);
|
|
3839
3851
|
}
|
|
3840
|
-
return
|
|
3852
|
+
return chunkLFZZ4NCP_cjs.group({ class: "lt-edge", "data-edge-id": edge.id }, parts);
|
|
3841
3853
|
}
|
|
3842
3854
|
function renderNote(n) {
|
|
3843
3855
|
const parts = [
|
|
3844
|
-
|
|
3856
|
+
chunkLFZZ4NCP_cjs.line({
|
|
3845
3857
|
x1: n.leader.x1,
|
|
3846
3858
|
y1: n.leader.y1,
|
|
3847
3859
|
x2: n.leader.x2,
|
|
3848
3860
|
y2: n.leader.y2,
|
|
3849
3861
|
class: "lt-note-leader"
|
|
3850
3862
|
}),
|
|
3851
|
-
|
|
3863
|
+
chunkLFZZ4NCP_cjs.rect({ x: n.x, y: n.y, width: n.width, height: n.height, rx: 4, ry: 4, class: "lt-note-body" })
|
|
3852
3864
|
];
|
|
3853
3865
|
let yy = n.y + 14;
|
|
3854
3866
|
for (const ln of n.lines) {
|
|
3855
|
-
parts.push(
|
|
3867
|
+
parts.push(chunkLFZZ4NCP_cjs.text({ x: n.x + 8, y: yy, class: "lt-note-text" }, ln));
|
|
3856
3868
|
yy += 14;
|
|
3857
3869
|
}
|
|
3858
|
-
return
|
|
3870
|
+
return chunkLFZZ4NCP_cjs.group({ class: "lt-note", "data-target": n.note.target }, parts);
|
|
3859
3871
|
}
|
|
3860
3872
|
function renderStateDiagram(ast, _config) {
|
|
3861
3873
|
const layout = layoutStateDiagram(ast);
|
|
3862
3874
|
return renderLayout(layout);
|
|
3863
3875
|
}
|
|
3864
3876
|
function renderLayout(layout) {
|
|
3865
|
-
const titleNode = layout.title ?
|
|
3866
|
-
return
|
|
3877
|
+
const titleNode = layout.title ? chunkLFZZ4NCP_cjs.text({ x: 16, y: 22, class: "lt-title" }, layout.title) : "";
|
|
3878
|
+
return chunkLFZZ4NCP_cjs.svgRoot(
|
|
3867
3879
|
{
|
|
3868
3880
|
width: layout.width,
|
|
3869
3881
|
height: layout.height,
|
|
@@ -3872,15 +3884,15 @@ function renderLayout(layout) {
|
|
|
3872
3884
|
"data-diagram-type": "state"
|
|
3873
3885
|
},
|
|
3874
3886
|
[
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3887
|
+
chunkLFZZ4NCP_cjs.el("title", {}, chunkLFZZ4NCP_cjs.escapeXml(`State Diagram${layout.title ? " \u2014 " + layout.title : ""}`)),
|
|
3888
|
+
chunkLFZZ4NCP_cjs.el("desc", {}, "UML 2.5 / Harel statechart rendered by Schematex"),
|
|
3889
|
+
chunkLFZZ4NCP_cjs.defs([renderArrowMarker(), chunkLFZZ4NCP_cjs.el("style", {}, STYLE)]),
|
|
3878
3890
|
titleNode,
|
|
3879
3891
|
// Composite clusters first so simple-state bodies sit on top.
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3892
|
+
chunkLFZZ4NCP_cjs.group({ class: "lt-clusters" }, layout.clusters.map(renderComposite)),
|
|
3893
|
+
chunkLFZZ4NCP_cjs.group({ class: "lt-state-bodies" }, layout.nodes.map(renderNode)),
|
|
3894
|
+
chunkLFZZ4NCP_cjs.group({ class: "lt-edges" }, layout.edges.map(renderEdge)),
|
|
3895
|
+
chunkLFZZ4NCP_cjs.group({ class: "lt-notes" }, layout.notes.map(renderNote))
|
|
3884
3896
|
]
|
|
3885
3897
|
);
|
|
3886
3898
|
}
|
|
@@ -4396,7 +4408,7 @@ var GEOMETRY = {
|
|
|
4396
4408
|
var STROKE_BLACK = "#1d1d1d";
|
|
4397
4409
|
var FILL_WHITE = "#ffffff";
|
|
4398
4410
|
function bowtie() {
|
|
4399
|
-
return
|
|
4411
|
+
return chunkLFZZ4NCP_cjs.polygon({
|
|
4400
4412
|
points: "-18,-11 0,0 -18,11 18,11 0,0 18,-11",
|
|
4401
4413
|
class: "lt-pid-valve-body"
|
|
4402
4414
|
});
|
|
@@ -4409,12 +4421,12 @@ function renderEquip(type, label) {
|
|
|
4409
4421
|
const cylTop = -h / 2 + 14;
|
|
4410
4422
|
const parts = [
|
|
4411
4423
|
// dome top
|
|
4412
|
-
|
|
4424
|
+
chunkLFZZ4NCP_cjs.path({
|
|
4413
4425
|
d: `M ${-w / 2} ${cylTop} A ${w / 2} 14 0 0 1 ${w / 2} ${cylTop}`,
|
|
4414
4426
|
class: "lt-pid-equip"
|
|
4415
4427
|
}),
|
|
4416
4428
|
// body
|
|
4417
|
-
|
|
4429
|
+
chunkLFZZ4NCP_cjs.rect({
|
|
4418
4430
|
x: -w / 2,
|
|
4419
4431
|
y: cylTop,
|
|
4420
4432
|
width: w,
|
|
@@ -4422,31 +4434,31 @@ function renderEquip(type, label) {
|
|
|
4422
4434
|
class: "lt-pid-equip"
|
|
4423
4435
|
}),
|
|
4424
4436
|
// tag
|
|
4425
|
-
|
|
4437
|
+
chunkLFZZ4NCP_cjs.text(
|
|
4426
4438
|
{ x: 0, y: 4, "text-anchor": "middle", class: "lt-pid-equip-tag" },
|
|
4427
4439
|
label
|
|
4428
4440
|
)
|
|
4429
4441
|
];
|
|
4430
|
-
return
|
|
4442
|
+
return chunkLFZZ4NCP_cjs.group({ class: "lt-pid-equip-group" }, parts);
|
|
4431
4443
|
}
|
|
4432
4444
|
case "tank_cone_roof": {
|
|
4433
4445
|
const w = 90;
|
|
4434
4446
|
const h = 100;
|
|
4435
4447
|
const roofH = 18;
|
|
4436
4448
|
const top = -h / 2;
|
|
4437
|
-
return
|
|
4438
|
-
|
|
4449
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4450
|
+
chunkLFZZ4NCP_cjs.polygon({
|
|
4439
4451
|
points: `${-w / 2},${top + roofH} 0,${top} ${w / 2},${top + roofH}`,
|
|
4440
4452
|
class: "lt-pid-equip"
|
|
4441
4453
|
}),
|
|
4442
|
-
|
|
4454
|
+
chunkLFZZ4NCP_cjs.rect({
|
|
4443
4455
|
x: -w / 2,
|
|
4444
4456
|
y: top + roofH,
|
|
4445
4457
|
width: w,
|
|
4446
4458
|
height: h - roofH,
|
|
4447
4459
|
class: "lt-pid-equip"
|
|
4448
4460
|
}),
|
|
4449
|
-
|
|
4461
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: 4, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4450
4462
|
]);
|
|
4451
4463
|
}
|
|
4452
4464
|
case "vessel_v": {
|
|
@@ -4455,8 +4467,8 @@ function renderEquip(type, label) {
|
|
|
4455
4467
|
const headH = 16;
|
|
4456
4468
|
const top = -h / 2;
|
|
4457
4469
|
const bot = h / 2;
|
|
4458
|
-
return
|
|
4459
|
-
|
|
4470
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4471
|
+
chunkLFZZ4NCP_cjs.path({
|
|
4460
4472
|
d: `M ${-w / 2} ${top + headH}
|
|
4461
4473
|
A ${w / 2} ${headH} 0 0 1 ${w / 2} ${top + headH}
|
|
4462
4474
|
L ${w / 2} ${bot - headH}
|
|
@@ -4464,7 +4476,7 @@ function renderEquip(type, label) {
|
|
|
4464
4476
|
Z`,
|
|
4465
4477
|
class: "lt-pid-equip"
|
|
4466
4478
|
}),
|
|
4467
|
-
|
|
4479
|
+
chunkLFZZ4NCP_cjs.text(
|
|
4468
4480
|
{ x: 0, y: 4, "text-anchor": "middle", class: "lt-pid-equip-tag" },
|
|
4469
4481
|
label
|
|
4470
4482
|
)
|
|
@@ -4476,8 +4488,8 @@ function renderEquip(type, label) {
|
|
|
4476
4488
|
const headW = 14;
|
|
4477
4489
|
const left = -w / 2;
|
|
4478
4490
|
const right = w / 2;
|
|
4479
|
-
return
|
|
4480
|
-
|
|
4491
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4492
|
+
chunkLFZZ4NCP_cjs.path({
|
|
4481
4493
|
d: `M ${left + headW} ${-h / 2}
|
|
4482
4494
|
L ${right - headW} ${-h / 2}
|
|
4483
4495
|
A ${headW} ${h / 2} 0 0 1 ${right - headW} ${h / 2}
|
|
@@ -4486,16 +4498,16 @@ function renderEquip(type, label) {
|
|
|
4486
4498
|
Z`,
|
|
4487
4499
|
class: "lt-pid-equip"
|
|
4488
4500
|
}),
|
|
4489
|
-
|
|
4501
|
+
chunkLFZZ4NCP_cjs.text(
|
|
4490
4502
|
{ x: 0, y: 4, "text-anchor": "middle", class: "lt-pid-equip-tag" },
|
|
4491
4503
|
label
|
|
4492
4504
|
)
|
|
4493
4505
|
]);
|
|
4494
4506
|
}
|
|
4495
4507
|
case "sphere": {
|
|
4496
|
-
return
|
|
4497
|
-
|
|
4498
|
-
|
|
4508
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4509
|
+
chunkLFZZ4NCP_cjs.circle({ cx: 0, cy: 0, r: 45, class: "lt-pid-equip" }),
|
|
4510
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: 4, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4499
4511
|
]);
|
|
4500
4512
|
}
|
|
4501
4513
|
case "column_tray": {
|
|
@@ -4509,7 +4521,7 @@ function renderEquip(type, label) {
|
|
|
4509
4521
|
for (let i = 1; i <= trays; i++) {
|
|
4510
4522
|
const y = -h / 2 + headH + traySpacing * i;
|
|
4511
4523
|
trayLines.push(
|
|
4512
|
-
|
|
4524
|
+
chunkLFZZ4NCP_cjs.line({
|
|
4513
4525
|
x1: -w / 2 + 6,
|
|
4514
4526
|
y1: y,
|
|
4515
4527
|
x2: w / 2 - 6,
|
|
@@ -4518,8 +4530,8 @@ function renderEquip(type, label) {
|
|
|
4518
4530
|
})
|
|
4519
4531
|
);
|
|
4520
4532
|
}
|
|
4521
|
-
return
|
|
4522
|
-
|
|
4533
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4534
|
+
chunkLFZZ4NCP_cjs.path({
|
|
4523
4535
|
d: `M ${-w / 2} ${-h / 2 + headH}
|
|
4524
4536
|
A ${w / 2} ${headH} 0 0 1 ${w / 2} ${-h / 2 + headH}
|
|
4525
4537
|
L ${w / 2} ${h / 2 - headH}
|
|
@@ -4528,7 +4540,7 @@ function renderEquip(type, label) {
|
|
|
4528
4540
|
class: "lt-pid-equip"
|
|
4529
4541
|
}),
|
|
4530
4542
|
...trayLines,
|
|
4531
|
-
|
|
4543
|
+
chunkLFZZ4NCP_cjs.text(
|
|
4532
4544
|
{
|
|
4533
4545
|
x: 0,
|
|
4534
4546
|
y: -h / 2 - 6,
|
|
@@ -4543,15 +4555,15 @@ function renderEquip(type, label) {
|
|
|
4543
4555
|
const w = 60;
|
|
4544
4556
|
const h = 180;
|
|
4545
4557
|
const headH = 12;
|
|
4546
|
-
const packing =
|
|
4558
|
+
const packing = chunkLFZZ4NCP_cjs.path({
|
|
4547
4559
|
d: `M ${-w / 2 + 6} ${-h / 2 + headH + 6}
|
|
4548
4560
|
L ${w / 2 - 6} ${h / 2 - headH - 6}
|
|
4549
4561
|
M ${w / 2 - 6} ${-h / 2 + headH + 6}
|
|
4550
4562
|
L ${-w / 2 + 6} ${h / 2 - headH - 6}`,
|
|
4551
4563
|
class: "lt-pid-tray-line"
|
|
4552
4564
|
});
|
|
4553
|
-
return
|
|
4554
|
-
|
|
4565
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4566
|
+
chunkLFZZ4NCP_cjs.path({
|
|
4555
4567
|
d: `M ${-w / 2} ${-h / 2 + headH}
|
|
4556
4568
|
A ${w / 2} ${headH} 0 0 1 ${w / 2} ${-h / 2 + headH}
|
|
4557
4569
|
L ${w / 2} ${h / 2 - headH}
|
|
@@ -4560,7 +4572,7 @@ function renderEquip(type, label) {
|
|
|
4560
4572
|
class: "lt-pid-equip"
|
|
4561
4573
|
}),
|
|
4562
4574
|
packing,
|
|
4563
|
-
|
|
4575
|
+
chunkLFZZ4NCP_cjs.text(
|
|
4564
4576
|
{
|
|
4565
4577
|
x: 0,
|
|
4566
4578
|
y: -h / 2 - 6,
|
|
@@ -4580,7 +4592,7 @@ function renderEquip(type, label) {
|
|
|
4580
4592
|
const tubes = [];
|
|
4581
4593
|
for (let yy = -h / 2 + 12; yy <= h / 2 - 12; yy += 8) {
|
|
4582
4594
|
tubes.push(
|
|
4583
|
-
|
|
4595
|
+
chunkLFZZ4NCP_cjs.line({
|
|
4584
4596
|
x1: left + headW + 4,
|
|
4585
4597
|
y1: yy,
|
|
4586
4598
|
x2: right - headW - 4,
|
|
@@ -4589,8 +4601,8 @@ function renderEquip(type, label) {
|
|
|
4589
4601
|
})
|
|
4590
4602
|
);
|
|
4591
4603
|
}
|
|
4592
|
-
return
|
|
4593
|
-
|
|
4604
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4605
|
+
chunkLFZZ4NCP_cjs.path({
|
|
4594
4606
|
d: `M ${left + headW} ${-h / 2}
|
|
4595
4607
|
L ${right - headW} ${-h / 2}
|
|
4596
4608
|
A ${headW} ${h / 2} 0 0 1 ${right - headW} ${h / 2}
|
|
@@ -4600,7 +4612,7 @@ function renderEquip(type, label) {
|
|
|
4600
4612
|
class: "lt-pid-equip"
|
|
4601
4613
|
}),
|
|
4602
4614
|
...tubes,
|
|
4603
|
-
|
|
4615
|
+
chunkLFZZ4NCP_cjs.text(
|
|
4604
4616
|
{
|
|
4605
4617
|
x: 0,
|
|
4606
4618
|
y: h / 2 + 14,
|
|
@@ -4614,23 +4626,23 @@ function renderEquip(type, label) {
|
|
|
4614
4626
|
case "hx_air_cooled": {
|
|
4615
4627
|
const w = 130;
|
|
4616
4628
|
const h = 80;
|
|
4617
|
-
return
|
|
4618
|
-
|
|
4629
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4630
|
+
chunkLFZZ4NCP_cjs.rect({
|
|
4619
4631
|
x: -w / 2,
|
|
4620
4632
|
y: -h / 2 + 18,
|
|
4621
4633
|
width: w,
|
|
4622
4634
|
height: h - 18,
|
|
4623
4635
|
class: "lt-pid-equip"
|
|
4624
4636
|
}),
|
|
4625
|
-
|
|
4637
|
+
chunkLFZZ4NCP_cjs.circle({ cx: 0, cy: -h / 2 + 14, r: 18, class: "lt-pid-equip" }),
|
|
4626
4638
|
// 3-blade fan
|
|
4627
|
-
|
|
4639
|
+
chunkLFZZ4NCP_cjs.path({
|
|
4628
4640
|
d: `M 0 ${-h / 2 + 14} L 14 ${-h / 2 + 6}
|
|
4629
4641
|
M 0 ${-h / 2 + 14} L -14 ${-h / 2 + 6}
|
|
4630
4642
|
M 0 ${-h / 2 + 14} L 0 ${-h / 2 + 30}`,
|
|
4631
4643
|
class: "lt-pid-tray-line"
|
|
4632
4644
|
}),
|
|
4633
|
-
|
|
4645
|
+
chunkLFZZ4NCP_cjs.text(
|
|
4634
4646
|
{ x: 0, y: h / 2 + 14, "text-anchor": "middle", class: "lt-pid-equip-tag" },
|
|
4635
4647
|
label
|
|
4636
4648
|
)
|
|
@@ -4640,8 +4652,8 @@ function renderEquip(type, label) {
|
|
|
4640
4652
|
const w = 110;
|
|
4641
4653
|
const h = 60;
|
|
4642
4654
|
const headW = 14;
|
|
4643
|
-
return
|
|
4644
|
-
|
|
4655
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4656
|
+
chunkLFZZ4NCP_cjs.path({
|
|
4645
4657
|
d: `M ${-w / 2 + headW} ${-h / 2}
|
|
4646
4658
|
L ${w / 2 - headW} ${-h / 2}
|
|
4647
4659
|
A ${headW} ${h / 2} 0 0 1 ${w / 2 - headW} ${h / 2}
|
|
@@ -4650,28 +4662,28 @@ function renderEquip(type, label) {
|
|
|
4650
4662
|
Z`,
|
|
4651
4663
|
class: "lt-pid-equip"
|
|
4652
4664
|
}),
|
|
4653
|
-
|
|
4665
|
+
chunkLFZZ4NCP_cjs.line({
|
|
4654
4666
|
x1: -w / 2 + headW + 4,
|
|
4655
4667
|
y1: -10,
|
|
4656
4668
|
x2: w / 2 - headW - 4,
|
|
4657
4669
|
y2: -10,
|
|
4658
4670
|
class: "lt-pid-tray-line"
|
|
4659
4671
|
}),
|
|
4660
|
-
|
|
4672
|
+
chunkLFZZ4NCP_cjs.line({
|
|
4661
4673
|
x1: -w / 2 + headW + 4,
|
|
4662
4674
|
y1: 0,
|
|
4663
4675
|
x2: w / 2 - headW - 4,
|
|
4664
4676
|
y2: 0,
|
|
4665
4677
|
class: "lt-pid-tray-line"
|
|
4666
4678
|
}),
|
|
4667
|
-
|
|
4679
|
+
chunkLFZZ4NCP_cjs.line({
|
|
4668
4680
|
x1: -w / 2 + headW + 4,
|
|
4669
4681
|
y1: 10,
|
|
4670
4682
|
x2: w / 2 - headW - 4,
|
|
4671
4683
|
y2: 10,
|
|
4672
4684
|
class: "lt-pid-tray-line"
|
|
4673
4685
|
}),
|
|
4674
|
-
|
|
4686
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: h / 2 + 14, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4675
4687
|
]);
|
|
4676
4688
|
}
|
|
4677
4689
|
case "condenser": {
|
|
@@ -4683,7 +4695,7 @@ function renderEquip(type, label) {
|
|
|
4683
4695
|
const tubes = [];
|
|
4684
4696
|
for (let yy = -h / 2 + 12; yy <= h / 2 - 12; yy += 10) {
|
|
4685
4697
|
tubes.push(
|
|
4686
|
-
|
|
4698
|
+
chunkLFZZ4NCP_cjs.line({
|
|
4687
4699
|
x1: left + headW + 4,
|
|
4688
4700
|
y1: yy,
|
|
4689
4701
|
x2: right - headW - 4,
|
|
@@ -4692,8 +4704,8 @@ function renderEquip(type, label) {
|
|
|
4692
4704
|
})
|
|
4693
4705
|
);
|
|
4694
4706
|
}
|
|
4695
|
-
return
|
|
4696
|
-
|
|
4707
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4708
|
+
chunkLFZZ4NCP_cjs.path({
|
|
4697
4709
|
d: `M ${left + headW} ${-h / 2}
|
|
4698
4710
|
L ${right - headW} ${-h / 2}
|
|
4699
4711
|
A ${headW} ${h / 2} 0 0 1 ${right - headW} ${h / 2}
|
|
@@ -4703,18 +4715,18 @@ function renderEquip(type, label) {
|
|
|
4703
4715
|
class: "lt-pid-equip"
|
|
4704
4716
|
}),
|
|
4705
4717
|
...tubes,
|
|
4706
|
-
|
|
4718
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: h / 2 + 14, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4707
4719
|
]);
|
|
4708
4720
|
}
|
|
4709
4721
|
case "pump_centrifugal": {
|
|
4710
4722
|
const r = 22;
|
|
4711
|
-
return
|
|
4712
|
-
|
|
4713
|
-
|
|
4723
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4724
|
+
chunkLFZZ4NCP_cjs.circle({ cx: 0, cy: 0, r, class: "lt-pid-equip" }),
|
|
4725
|
+
chunkLFZZ4NCP_cjs.polygon({
|
|
4714
4726
|
points: `${r * 0.4},${-r * 0.9} ${r + 6},${-r * 0.9} ${r * 0.4},${0}`,
|
|
4715
4727
|
class: "lt-pid-equip"
|
|
4716
4728
|
}),
|
|
4717
|
-
|
|
4729
|
+
chunkLFZZ4NCP_cjs.text(
|
|
4718
4730
|
{ x: 0, y: r + 14, "text-anchor": "middle", class: "lt-pid-equip-tag" },
|
|
4719
4731
|
label
|
|
4720
4732
|
)
|
|
@@ -4722,34 +4734,34 @@ function renderEquip(type, label) {
|
|
|
4722
4734
|
}
|
|
4723
4735
|
case "pump_pd": {
|
|
4724
4736
|
const r = 22;
|
|
4725
|
-
return
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4737
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4738
|
+
chunkLFZZ4NCP_cjs.circle({ cx: 0, cy: 0, r, class: "lt-pid-equip" }),
|
|
4739
|
+
chunkLFZZ4NCP_cjs.circle({ cx: -8, cy: 0, r: 6, class: "lt-pid-tray-line", fill: "none" }),
|
|
4740
|
+
chunkLFZZ4NCP_cjs.circle({ cx: 8, cy: 0, r: 6, class: "lt-pid-tray-line", fill: "none" }),
|
|
4741
|
+
chunkLFZZ4NCP_cjs.text(
|
|
4730
4742
|
{ x: 0, y: r + 14, "text-anchor": "middle", class: "lt-pid-equip-tag" },
|
|
4731
4743
|
label
|
|
4732
4744
|
)
|
|
4733
4745
|
]);
|
|
4734
4746
|
}
|
|
4735
4747
|
case "compressor": {
|
|
4736
|
-
return
|
|
4737
|
-
|
|
4748
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4749
|
+
chunkLFZZ4NCP_cjs.polygon({
|
|
4738
4750
|
points: "-45,-20 45,-12 45,12 -45,20",
|
|
4739
4751
|
class: "lt-pid-equip"
|
|
4740
4752
|
}),
|
|
4741
|
-
|
|
4753
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: 36, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4742
4754
|
]);
|
|
4743
4755
|
}
|
|
4744
4756
|
case "blower": {
|
|
4745
4757
|
const r = 22;
|
|
4746
|
-
return
|
|
4747
|
-
|
|
4748
|
-
|
|
4758
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4759
|
+
chunkLFZZ4NCP_cjs.circle({ cx: 0, cy: 0, r, class: "lt-pid-equip" }),
|
|
4760
|
+
chunkLFZZ4NCP_cjs.path({
|
|
4749
4761
|
d: `M 0 0 L ${r * 0.8} ${-r * 0.5} M 0 0 L ${-r * 0.6} ${-r * 0.6} M 0 0 L 0 ${r * 0.8}`,
|
|
4750
4762
|
class: "lt-pid-tray-line"
|
|
4751
4763
|
}),
|
|
4752
|
-
|
|
4764
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: r + 14, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4753
4765
|
]);
|
|
4754
4766
|
}
|
|
4755
4767
|
case "reactor_cstr": {
|
|
@@ -4758,8 +4770,8 @@ function renderEquip(type, label) {
|
|
|
4758
4770
|
const headH = 14;
|
|
4759
4771
|
const top = -h / 2;
|
|
4760
4772
|
const bot = h / 2;
|
|
4761
|
-
return
|
|
4762
|
-
|
|
4773
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4774
|
+
chunkLFZZ4NCP_cjs.path({
|
|
4763
4775
|
d: `M ${-w / 2} ${top + headH}
|
|
4764
4776
|
A ${w / 2} ${headH} 0 0 1 ${w / 2} ${top + headH}
|
|
4765
4777
|
L ${w / 2} ${bot - headH}
|
|
@@ -4768,9 +4780,9 @@ function renderEquip(type, label) {
|
|
|
4768
4780
|
class: "lt-pid-equip"
|
|
4769
4781
|
}),
|
|
4770
4782
|
// agitator shaft + paddle
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4783
|
+
chunkLFZZ4NCP_cjs.line({ x1: 0, y1: top - 14, x2: 0, y2: 4, class: "lt-pid-tray-line" }),
|
|
4784
|
+
chunkLFZZ4NCP_cjs.rect({ x: -10, y: 4, width: 20, height: 4, class: "lt-pid-equip" }),
|
|
4785
|
+
chunkLFZZ4NCP_cjs.text(
|
|
4774
4786
|
{ x: 0, y: bot + 14, "text-anchor": "middle", class: "lt-pid-equip-tag" },
|
|
4775
4787
|
label
|
|
4776
4788
|
)
|
|
@@ -4785,11 +4797,11 @@ function renderEquip(type, label) {
|
|
|
4785
4797
|
const dots = [];
|
|
4786
4798
|
for (let xx = left + headW + 8; xx <= right - headW - 8; xx += 12) {
|
|
4787
4799
|
for (let yy = -h / 2 + 12; yy <= h / 2 - 8; yy += 10) {
|
|
4788
|
-
dots.push(
|
|
4800
|
+
dots.push(chunkLFZZ4NCP_cjs.circle({ cx: xx, cy: yy, r: 1.6, fill: STROKE_BLACK }));
|
|
4789
4801
|
}
|
|
4790
4802
|
}
|
|
4791
|
-
return
|
|
4792
|
-
|
|
4803
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4804
|
+
chunkLFZZ4NCP_cjs.path({
|
|
4793
4805
|
d: `M ${left + headW} ${-h / 2}
|
|
4794
4806
|
L ${right - headW} ${-h / 2}
|
|
4795
4807
|
A ${headW} ${h / 2} 0 0 1 ${right - headW} ${h / 2}
|
|
@@ -4799,26 +4811,26 @@ function renderEquip(type, label) {
|
|
|
4799
4811
|
class: "lt-pid-equip"
|
|
4800
4812
|
}),
|
|
4801
4813
|
...dots,
|
|
4802
|
-
|
|
4814
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: h / 2 + 14, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4803
4815
|
]);
|
|
4804
4816
|
}
|
|
4805
4817
|
case "filter": {
|
|
4806
4818
|
const w = 70;
|
|
4807
4819
|
const h = 70;
|
|
4808
|
-
return
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4820
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4821
|
+
chunkLFZZ4NCP_cjs.rect({ x: -w / 2, y: -h / 2, width: w, height: h, class: "lt-pid-equip" }),
|
|
4822
|
+
chunkLFZZ4NCP_cjs.line({ x1: -w / 2, y1: 0, x2: w / 2, y2: 0, class: "lt-pid-tray-line" }),
|
|
4823
|
+
chunkLFZZ4NCP_cjs.line({ x1: -w / 2 + 8, y1: -h / 2 + 8, x2: w / 2 - 8, y2: -8, class: "lt-pid-tray-line" }),
|
|
4824
|
+
chunkLFZZ4NCP_cjs.line({ x1: -w / 2 + 8, y1: 8, x2: w / 2 - 8, y2: h / 2 - 8, class: "lt-pid-tray-line" }),
|
|
4825
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: h / 2 + 14, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4814
4826
|
]);
|
|
4815
4827
|
}
|
|
4816
4828
|
case "cyclone": {
|
|
4817
4829
|
const w = 70;
|
|
4818
4830
|
const h = 100;
|
|
4819
4831
|
const cyl = 30;
|
|
4820
|
-
return
|
|
4821
|
-
|
|
4832
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4833
|
+
chunkLFZZ4NCP_cjs.path({
|
|
4822
4834
|
d: `M ${-w / 2} ${-h / 2}
|
|
4823
4835
|
L ${w / 2} ${-h / 2}
|
|
4824
4836
|
L ${w / 2} ${-h / 2 + cyl}
|
|
@@ -4827,27 +4839,27 @@ function renderEquip(type, label) {
|
|
|
4827
4839
|
Z`,
|
|
4828
4840
|
class: "lt-pid-equip"
|
|
4829
4841
|
}),
|
|
4830
|
-
|
|
4842
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: h / 2 + 14, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4831
4843
|
]);
|
|
4832
4844
|
}
|
|
4833
4845
|
case "flare": {
|
|
4834
4846
|
const w = 30;
|
|
4835
4847
|
const h = 110;
|
|
4836
|
-
return
|
|
4837
|
-
|
|
4838
|
-
|
|
4848
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4849
|
+
chunkLFZZ4NCP_cjs.rect({ x: -w / 2, y: -h / 2, width: w, height: h, class: "lt-pid-equip" }),
|
|
4850
|
+
chunkLFZZ4NCP_cjs.polygon({
|
|
4839
4851
|
points: `${ -8},${-h / 2 - 4} 0,${-h / 2 - 22} 8,${-h / 2 - 4}`,
|
|
4840
4852
|
fill: "#ff7755",
|
|
4841
4853
|
stroke: STROKE_BLACK
|
|
4842
4854
|
}),
|
|
4843
|
-
|
|
4855
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: h / 2 + 14, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4844
4856
|
]);
|
|
4845
4857
|
}
|
|
4846
4858
|
case "cooling_tower": {
|
|
4847
4859
|
const w = 100;
|
|
4848
4860
|
const h = 90;
|
|
4849
|
-
return
|
|
4850
|
-
|
|
4861
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4862
|
+
chunkLFZZ4NCP_cjs.path({
|
|
4851
4863
|
d: `M ${-w / 2} ${-h / 2}
|
|
4852
4864
|
L ${w / 2} ${-h / 2}
|
|
4853
4865
|
L ${w / 4} 0
|
|
@@ -4857,52 +4869,52 @@ function renderEquip(type, label) {
|
|
|
4857
4869
|
Z`,
|
|
4858
4870
|
class: "lt-pid-equip"
|
|
4859
4871
|
}),
|
|
4860
|
-
|
|
4872
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: h / 2 + 14, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4861
4873
|
]);
|
|
4862
4874
|
}
|
|
4863
4875
|
// ── Valves ──────────────────────────────────────────
|
|
4864
4876
|
case "valve_gate":
|
|
4865
|
-
return
|
|
4877
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4866
4878
|
bowtie(),
|
|
4867
|
-
|
|
4879
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: 22, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4868
4880
|
]);
|
|
4869
4881
|
case "valve_ball":
|
|
4870
|
-
return
|
|
4882
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4871
4883
|
bowtie(),
|
|
4872
|
-
|
|
4873
|
-
|
|
4884
|
+
chunkLFZZ4NCP_cjs.circle({ cx: 0, cy: 0, r: 4, fill: STROKE_BLACK }),
|
|
4885
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: 22, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4874
4886
|
]);
|
|
4875
4887
|
case "valve_globe":
|
|
4876
|
-
return
|
|
4888
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4877
4889
|
bowtie(),
|
|
4878
|
-
|
|
4879
|
-
|
|
4890
|
+
chunkLFZZ4NCP_cjs.circle({ cx: 0, cy: -5, r: 5, class: "lt-pid-valve-body", fill: FILL_WHITE }),
|
|
4891
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: 22, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4880
4892
|
]);
|
|
4881
4893
|
case "valve_butterfly":
|
|
4882
|
-
return
|
|
4894
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4883
4895
|
bowtie(),
|
|
4884
|
-
|
|
4885
|
-
|
|
4896
|
+
chunkLFZZ4NCP_cjs.line({ x1: 0, y1: -10, x2: 0, y2: 10, class: "lt-pid-tray-line" }),
|
|
4897
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: 22, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4886
4898
|
]);
|
|
4887
4899
|
case "valve_check":
|
|
4888
|
-
return
|
|
4900
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4889
4901
|
bowtie(),
|
|
4890
|
-
|
|
4891
|
-
|
|
4902
|
+
chunkLFZZ4NCP_cjs.path({ d: "M -10 -8 A 10 10 0 0 1 -10 8", class: "lt-pid-tray-line", fill: "none" }),
|
|
4903
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: 22, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4892
4904
|
]);
|
|
4893
4905
|
case "valve_control":
|
|
4894
|
-
return
|
|
4906
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4895
4907
|
bowtie(),
|
|
4896
4908
|
// actuator: diaphragm
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4909
|
+
chunkLFZZ4NCP_cjs.line({ x1: 0, y1: -11, x2: 0, y2: -22, class: "lt-pid-tray-line" }),
|
|
4910
|
+
chunkLFZZ4NCP_cjs.path({ d: "M -14 -22 A 14 8 0 0 1 14 -22 L -14 -22 Z", class: "lt-pid-equip" }),
|
|
4911
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: 24, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4900
4912
|
]);
|
|
4901
4913
|
case "valve_psv":
|
|
4902
|
-
return
|
|
4914
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4903
4915
|
bowtie(),
|
|
4904
4916
|
// diagonal outlet (45°)
|
|
4905
|
-
|
|
4917
|
+
chunkLFZZ4NCP_cjs.line({
|
|
4906
4918
|
x1: 18,
|
|
4907
4919
|
y1: -11,
|
|
4908
4920
|
x2: 26,
|
|
@@ -4910,17 +4922,17 @@ function renderEquip(type, label) {
|
|
|
4910
4922
|
class: "lt-pid-process"
|
|
4911
4923
|
}),
|
|
4912
4924
|
// spring stack
|
|
4913
|
-
|
|
4925
|
+
chunkLFZZ4NCP_cjs.path({
|
|
4914
4926
|
d: "M -6 -11 L -10 -16 L -2 -20 L -10 -24 L -2 -28",
|
|
4915
4927
|
class: "lt-pid-tray-line",
|
|
4916
4928
|
fill: "none"
|
|
4917
4929
|
}),
|
|
4918
|
-
|
|
4930
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: 24, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4919
4931
|
]);
|
|
4920
4932
|
default:
|
|
4921
|
-
return
|
|
4922
|
-
|
|
4923
|
-
|
|
4933
|
+
return chunkLFZZ4NCP_cjs.group({}, [
|
|
4934
|
+
chunkLFZZ4NCP_cjs.rect({ x: -30, y: -20, width: 60, height: 40, class: "lt-pid-equip" }),
|
|
4935
|
+
chunkLFZZ4NCP_cjs.text({ x: 0, y: 4, "text-anchor": "middle", class: "lt-pid-equip-tag" }, label)
|
|
4924
4936
|
]);
|
|
4925
4937
|
}
|
|
4926
4938
|
}
|
|
@@ -4933,19 +4945,19 @@ function renderInstrument(category, letterCode, loopNumber) {
|
|
|
4933
4945
|
const isLocal = category.startsWith("local_");
|
|
4934
4946
|
const parts = [];
|
|
4935
4947
|
if (isComputer) {
|
|
4936
|
-
parts.push(
|
|
4948
|
+
parts.push(chunkLFZZ4NCP_cjs.circle({ cx: 0, cy: 0, r, class: "lt-inst-body" }));
|
|
4937
4949
|
parts.push(
|
|
4938
|
-
|
|
4950
|
+
chunkLFZZ4NCP_cjs.polygon({
|
|
4939
4951
|
points: `0,${-r + 1} ${r - 1},0 0,${r - 1} ${ -13},0`,
|
|
4940
4952
|
class: "lt-inst-body",
|
|
4941
4953
|
fill: "none"
|
|
4942
4954
|
})
|
|
4943
4955
|
);
|
|
4944
4956
|
} else if (isPlc) {
|
|
4945
|
-
parts.push(
|
|
4957
|
+
parts.push(chunkLFZZ4NCP_cjs.circle({ cx: 0, cy: 0, r, class: "lt-inst-body" }));
|
|
4946
4958
|
const side = r * Math.SQRT1_2 * 2 - 2;
|
|
4947
4959
|
parts.push(
|
|
4948
|
-
|
|
4960
|
+
chunkLFZZ4NCP_cjs.rect({
|
|
4949
4961
|
x: -side / 2,
|
|
4950
4962
|
y: -side / 2,
|
|
4951
4963
|
width: side,
|
|
@@ -4955,29 +4967,29 @@ function renderInstrument(category, letterCode, loopNumber) {
|
|
|
4955
4967
|
})
|
|
4956
4968
|
);
|
|
4957
4969
|
} else if (isShared) {
|
|
4958
|
-
parts.push(
|
|
4970
|
+
parts.push(chunkLFZZ4NCP_cjs.circle({ cx: 0, cy: 0, r, class: "lt-inst-body" }));
|
|
4959
4971
|
const hex = [];
|
|
4960
4972
|
for (let i = 0; i < 6; i++) {
|
|
4961
4973
|
const a = Math.PI / 3 * i - Math.PI / 2;
|
|
4962
4974
|
hex.push(`${(r - 2) * Math.cos(a)},${(r - 2) * Math.sin(a)}`);
|
|
4963
4975
|
}
|
|
4964
4976
|
parts.push(
|
|
4965
|
-
|
|
4977
|
+
chunkLFZZ4NCP_cjs.polygon({
|
|
4966
4978
|
points: hex.join(" "),
|
|
4967
4979
|
class: "lt-inst-body",
|
|
4968
4980
|
fill: "none"
|
|
4969
4981
|
})
|
|
4970
4982
|
);
|
|
4971
4983
|
} else {
|
|
4972
|
-
parts.push(
|
|
4984
|
+
parts.push(chunkLFZZ4NCP_cjs.circle({ cx: 0, cy: 0, r, class: "lt-inst-body" }));
|
|
4973
4985
|
}
|
|
4974
4986
|
if (isControlRoom) {
|
|
4975
|
-
parts.push(
|
|
4987
|
+
parts.push(chunkLFZZ4NCP_cjs.line({ x1: -r, y1: 0, x2: r, y2: 0, class: "lt-inst-cr-line" }));
|
|
4976
4988
|
} else if (isLocal) {
|
|
4977
|
-
parts.push(
|
|
4989
|
+
parts.push(chunkLFZZ4NCP_cjs.line({ x1: -r, y1: 0, x2: r, y2: 0, class: "lt-inst-local-line" }));
|
|
4978
4990
|
}
|
|
4979
4991
|
parts.push(
|
|
4980
|
-
|
|
4992
|
+
chunkLFZZ4NCP_cjs.text(
|
|
4981
4993
|
{
|
|
4982
4994
|
x: 0,
|
|
4983
4995
|
y: -3,
|
|
@@ -4988,7 +5000,7 @@ function renderInstrument(category, letterCode, loopNumber) {
|
|
|
4988
5000
|
)
|
|
4989
5001
|
);
|
|
4990
5002
|
parts.push(
|
|
4991
|
-
|
|
5003
|
+
chunkLFZZ4NCP_cjs.text(
|
|
4992
5004
|
{
|
|
4993
5005
|
x: 0,
|
|
4994
5006
|
y: 9,
|
|
@@ -4998,7 +5010,7 @@ function renderInstrument(category, letterCode, loopNumber) {
|
|
|
4998
5010
|
loopNumber
|
|
4999
5011
|
)
|
|
5000
5012
|
);
|
|
5001
|
-
return
|
|
5013
|
+
return chunkLFZZ4NCP_cjs.group({ class: "lt-inst-symbol" }, parts);
|
|
5002
5014
|
}
|
|
5003
5015
|
|
|
5004
5016
|
// src/diagrams/pid/layout.ts
|
|
@@ -5236,7 +5248,7 @@ function lineClass(t) {
|
|
|
5236
5248
|
function renderLine(l) {
|
|
5237
5249
|
const cls = lineClass(l.line.lineType);
|
|
5238
5250
|
const parts = [
|
|
5239
|
-
|
|
5251
|
+
chunkLFZZ4NCP_cjs.path({
|
|
5240
5252
|
d: l.path,
|
|
5241
5253
|
class: cls,
|
|
5242
5254
|
"data-line-id": l.line.id,
|
|
@@ -5249,7 +5261,7 @@ function renderLine(l) {
|
|
|
5249
5261
|
if (l.line.tag) {
|
|
5250
5262
|
const w = Math.max(28, l.line.tag.length * 6);
|
|
5251
5263
|
parts.push(
|
|
5252
|
-
|
|
5264
|
+
chunkLFZZ4NCP_cjs.rect({
|
|
5253
5265
|
x: l.midX - w / 2,
|
|
5254
5266
|
y: l.midY - 8,
|
|
5255
5267
|
width: w,
|
|
@@ -5260,7 +5272,7 @@ function renderLine(l) {
|
|
|
5260
5272
|
})
|
|
5261
5273
|
);
|
|
5262
5274
|
parts.push(
|
|
5263
|
-
|
|
5275
|
+
chunkLFZZ4NCP_cjs.text(
|
|
5264
5276
|
{
|
|
5265
5277
|
x: l.midX,
|
|
5266
5278
|
y: l.midY + 3,
|
|
@@ -5271,7 +5283,7 @@ function renderLine(l) {
|
|
|
5271
5283
|
)
|
|
5272
5284
|
);
|
|
5273
5285
|
}
|
|
5274
|
-
return
|
|
5286
|
+
return chunkLFZZ4NCP_cjs.group({ class: "lt-pid-line", "data-id": l.line.id }, parts);
|
|
5275
5287
|
}
|
|
5276
5288
|
function pneumaticTicks(d) {
|
|
5277
5289
|
const tokens = d.match(/([MLC])\s+(-?\d+(?:\.\d+)?)\s+(-?\d+(?:\.\d+)?)/g) ?? [];
|
|
@@ -5297,7 +5309,7 @@ function pneumaticTicks(d) {
|
|
|
5297
5309
|
const cx = a.x + ux * s;
|
|
5298
5310
|
const cy = a.y + uy * s;
|
|
5299
5311
|
ticks.push(
|
|
5300
|
-
|
|
5312
|
+
chunkLFZZ4NCP_cjs.line({
|
|
5301
5313
|
x1: cx + px * 4 - ux * 4,
|
|
5302
5314
|
y1: cy + py * 4 - uy * 4,
|
|
5303
5315
|
x2: cx - px * 4 + ux * 4,
|
|
@@ -5316,7 +5328,7 @@ function renderPidAST(ast, _config) {
|
|
|
5316
5328
|
function renderLayout2(layout) {
|
|
5317
5329
|
const equipNodes = layout.equipment.map((eq) => {
|
|
5318
5330
|
const symbol = renderEquip(eq.equip.equipType, eq.equip.tag ?? eq.equip.id);
|
|
5319
|
-
return
|
|
5331
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
5320
5332
|
{
|
|
5321
5333
|
class: "lt-pid-equip-wrap",
|
|
5322
5334
|
"data-id": eq.equip.id,
|
|
@@ -5328,7 +5340,7 @@ function renderLayout2(layout) {
|
|
|
5328
5340
|
});
|
|
5329
5341
|
const instNodes = layout.instruments.map((i) => {
|
|
5330
5342
|
const { letter, number } = parseTag(i.inst.tag);
|
|
5331
|
-
return
|
|
5343
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
5332
5344
|
{
|
|
5333
5345
|
class: "lt-inst",
|
|
5334
5346
|
"data-tag": i.inst.tag,
|
|
@@ -5348,7 +5360,7 @@ function renderLayout2(layout) {
|
|
|
5348
5360
|
const bx = eq.cx;
|
|
5349
5361
|
const by = eq.cy + eq.height / 2;
|
|
5350
5362
|
autoSignals.push(
|
|
5351
|
-
|
|
5363
|
+
chunkLFZZ4NCP_cjs.path({
|
|
5352
5364
|
d: `M ${ax} ${ay} L ${ax} ${by + 8} L ${bx} ${by + 8} L ${bx} ${by}`,
|
|
5353
5365
|
class: "lt-pid-electric"
|
|
5354
5366
|
})
|
|
@@ -5363,7 +5375,7 @@ function renderLayout2(layout) {
|
|
|
5363
5375
|
const bx = eq.cx;
|
|
5364
5376
|
const by = eq.y;
|
|
5365
5377
|
autoSignals.push(
|
|
5366
|
-
|
|
5378
|
+
chunkLFZZ4NCP_cjs.path({
|
|
5367
5379
|
d: `M ${ax} ${ay} L ${bx} ${ay} L ${bx} ${by}`,
|
|
5368
5380
|
class: "lt-pid-pneumatic"
|
|
5369
5381
|
})
|
|
@@ -5371,8 +5383,8 @@ function renderLayout2(layout) {
|
|
|
5371
5383
|
}
|
|
5372
5384
|
}
|
|
5373
5385
|
}
|
|
5374
|
-
const titleNode = layout.title ?
|
|
5375
|
-
return
|
|
5386
|
+
const titleNode = layout.title ? chunkLFZZ4NCP_cjs.text({ x: 16, y: 22, class: "lt-pid-title" }, layout.title) : "";
|
|
5387
|
+
return chunkLFZZ4NCP_cjs.svgRoot(
|
|
5376
5388
|
{
|
|
5377
5389
|
width: layout.width,
|
|
5378
5390
|
height: layout.height,
|
|
@@ -5381,10 +5393,10 @@ function renderLayout2(layout) {
|
|
|
5381
5393
|
"data-diagram-type": "pid"
|
|
5382
5394
|
},
|
|
5383
5395
|
[
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5396
|
+
chunkLFZZ4NCP_cjs.el("title", {}, chunkLFZZ4NCP_cjs.escapeXml(`P&ID${layout.title ? " \u2014 " + layout.title : ""}`)),
|
|
5397
|
+
chunkLFZZ4NCP_cjs.el("desc", {}, "ISA-5.1 / ISO 10628 P&ID rendered by Schematex"),
|
|
5398
|
+
chunkLFZZ4NCP_cjs.defs([
|
|
5399
|
+
chunkLFZZ4NCP_cjs.el(
|
|
5388
5400
|
"marker",
|
|
5389
5401
|
{
|
|
5390
5402
|
id: ARROW_ID,
|
|
@@ -5395,15 +5407,15 @@ function renderLayout2(layout) {
|
|
|
5395
5407
|
orient: "auto",
|
|
5396
5408
|
markerUnits: "strokeWidth"
|
|
5397
5409
|
},
|
|
5398
|
-
[
|
|
5410
|
+
[chunkLFZZ4NCP_cjs.polygon({ points: "0,0 10,3 0,6", fill: "#1d1d1d" })]
|
|
5399
5411
|
),
|
|
5400
|
-
|
|
5412
|
+
chunkLFZZ4NCP_cjs.el("style", {}, STYLE2)
|
|
5401
5413
|
]),
|
|
5402
5414
|
titleNode,
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5415
|
+
chunkLFZZ4NCP_cjs.group({ class: "lt-pid-equipment" }, equipNodes),
|
|
5416
|
+
chunkLFZZ4NCP_cjs.group({ class: "lt-pid-lines" }, layout.lines.map(renderLine)),
|
|
5417
|
+
chunkLFZZ4NCP_cjs.group({ class: "lt-pid-signals" }, autoSignals),
|
|
5418
|
+
chunkLFZZ4NCP_cjs.group({ class: "lt-pid-instruments" }, instNodes)
|
|
5407
5419
|
]
|
|
5408
5420
|
);
|
|
5409
5421
|
}
|
|
@@ -6006,7 +6018,7 @@ function renderLine2(line2, leftX, cy, fontSize, fontFamily, fontWeight, theme)
|
|
|
6006
6018
|
}
|
|
6007
6019
|
case "code": {
|
|
6008
6020
|
const w = measureToken(tok, fontSize);
|
|
6009
|
-
decorations.push(
|
|
6021
|
+
decorations.push(chunkLFZZ4NCP_cjs.rect({
|
|
6010
6022
|
x: cursor,
|
|
6011
6023
|
y: cy - fontSize * 0.6,
|
|
6012
6024
|
width: w,
|
|
@@ -6028,7 +6040,7 @@ function renderLine2(line2, leftX, cy, fontSize, fontFamily, fontWeight, theme)
|
|
|
6028
6040
|
break;
|
|
6029
6041
|
}
|
|
6030
6042
|
case "link": {
|
|
6031
|
-
const aStart = `<a href="${
|
|
6043
|
+
const aStart = `<a href="${chunkLFZZ4NCP_cjs.escapeXml(tok.href)}" target="_blank" rel="noopener">`;
|
|
6032
6044
|
const innerStart = tspans.length;
|
|
6033
6045
|
for (const inner of tok.value) emit(inner, tok.href);
|
|
6034
6046
|
const innerTspans = tspans.splice(innerStart).join("");
|
|
@@ -6039,7 +6051,7 @@ function renderLine2(line2, leftX, cy, fontSize, fontFamily, fontWeight, theme)
|
|
|
6039
6051
|
const size = fontSize * 0.85;
|
|
6040
6052
|
const boxX = cursor;
|
|
6041
6053
|
const boxY = cy - size / 2;
|
|
6042
|
-
decorations.push(
|
|
6054
|
+
decorations.push(chunkLFZZ4NCP_cjs.rect({
|
|
6043
6055
|
x: boxX,
|
|
6044
6056
|
y: boxY,
|
|
6045
6057
|
width: size,
|
|
@@ -6052,7 +6064,7 @@ function renderLine2(line2, leftX, cy, fontSize, fontFamily, fontWeight, theme)
|
|
|
6052
6064
|
}));
|
|
6053
6065
|
if (tok.checked) {
|
|
6054
6066
|
const p = `M ${(boxX + size * 0.2).toFixed(1)} ${(boxY + size * 0.5).toFixed(1)} L ${(boxX + size * 0.42).toFixed(1)} ${(boxY + size * 0.72).toFixed(1)} L ${(boxX + size * 0.82).toFixed(1)} ${(boxY + size * 0.28).toFixed(1)}`;
|
|
6055
|
-
decorations.push(
|
|
6067
|
+
decorations.push(chunkLFZZ4NCP_cjs.path({
|
|
6056
6068
|
d: p,
|
|
6057
6069
|
fill: "none",
|
|
6058
6070
|
stroke: "#ffffff",
|
|
@@ -6067,7 +6079,7 @@ function renderLine2(line2, leftX, cy, fontSize, fontFamily, fontWeight, theme)
|
|
|
6067
6079
|
}
|
|
6068
6080
|
};
|
|
6069
6081
|
for (const tok of line2.tokens) emit(tok);
|
|
6070
|
-
const textElement =
|
|
6082
|
+
const textElement = chunkLFZZ4NCP_cjs.el("text", {
|
|
6071
6083
|
"font-family": fontFamily,
|
|
6072
6084
|
"font-size": fontSize,
|
|
6073
6085
|
"font-weight": fontWeight
|
|
@@ -6093,9 +6105,9 @@ function tspan(attrs, content) {
|
|
|
6093
6105
|
const pairs = [];
|
|
6094
6106
|
for (const [k, v] of Object.entries(attrs)) {
|
|
6095
6107
|
if (v === void 0) continue;
|
|
6096
|
-
pairs.push(`${k}="${typeof v === "number" ? String(v) :
|
|
6108
|
+
pairs.push(`${k}="${typeof v === "number" ? String(v) : chunkLFZZ4NCP_cjs.escapeXml(String(v))}"`);
|
|
6097
6109
|
}
|
|
6098
|
-
return `<tspan ${pairs.join(" ")}>${
|
|
6110
|
+
return `<tspan ${pairs.join(" ")}>${chunkLFZZ4NCP_cjs.escapeXml(content)}</tspan>`;
|
|
6099
6111
|
}
|
|
6100
6112
|
function renderNode2(n, color, theme, fontFamily) {
|
|
6101
6113
|
const isRoot = n.node.depth === 0;
|
|
@@ -6120,7 +6132,7 @@ function renderNode2(n, color, theme, fontFamily) {
|
|
|
6120
6132
|
const ux2 = n.x + n.labelWidth / 2;
|
|
6121
6133
|
const sw = underlineWidthFor(n.node.depth) * strokeScale(theme);
|
|
6122
6134
|
children.push(
|
|
6123
|
-
|
|
6135
|
+
chunkLFZZ4NCP_cjs.el("line", {
|
|
6124
6136
|
x1: ux1,
|
|
6125
6137
|
y1: underlineY2,
|
|
6126
6138
|
x2: ux2,
|
|
@@ -6131,7 +6143,7 @@ function renderNode2(n, color, theme, fontFamily) {
|
|
|
6131
6143
|
})
|
|
6132
6144
|
);
|
|
6133
6145
|
const cls = isRoot ? "schematex-mindmap-central" : isMain ? "schematex-mindmap-main" : "schematex-mindmap-leaf";
|
|
6134
|
-
return
|
|
6146
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
6135
6147
|
{
|
|
6136
6148
|
class: cls,
|
|
6137
6149
|
"data-node-id": n.node.id,
|
|
@@ -6151,7 +6163,7 @@ function renderMindmapAST(ast, themeName = "default", fontFamily = "system-ui, -
|
|
|
6151
6163
|
if (!target) continue;
|
|
6152
6164
|
const color = paletteColor(theme, target.branchIndex);
|
|
6153
6165
|
edgeSvgs.push(
|
|
6154
|
-
|
|
6166
|
+
chunkLFZZ4NCP_cjs.path({
|
|
6155
6167
|
d: e.path,
|
|
6156
6168
|
fill: "none",
|
|
6157
6169
|
stroke: color,
|
|
@@ -6166,20 +6178,20 @@ function renderMindmapAST(ast, themeName = "default", fontFamily = "system-ui, -
|
|
|
6166
6178
|
nodeSvgs.push(renderNode2(n, color, theme, fontFamily));
|
|
6167
6179
|
}
|
|
6168
6180
|
const title2 = ast.title ?? tokensToPlainText(ast.root.tokens);
|
|
6169
|
-
return
|
|
6181
|
+
return chunkLFZZ4NCP_cjs.svgRoot(
|
|
6170
6182
|
{
|
|
6171
6183
|
viewBox: `0 0 ${layout.width.toFixed(1)} ${layout.height.toFixed(1)}`,
|
|
6172
6184
|
width: layout.width.toFixed(1),
|
|
6173
6185
|
height: layout.height.toFixed(1),
|
|
6174
6186
|
role: "graphics-document",
|
|
6175
|
-
"aria-label": `Mindmap: ${
|
|
6187
|
+
"aria-label": `Mindmap: ${chunkLFZZ4NCP_cjs.escapeXml(title2)}`
|
|
6176
6188
|
},
|
|
6177
6189
|
[
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6190
|
+
chunkLFZZ4NCP_cjs.title(title2),
|
|
6191
|
+
chunkLFZZ4NCP_cjs.desc(`${layout.style} mindmap with ${layout.nodes.length} nodes`),
|
|
6192
|
+
chunkLFZZ4NCP_cjs.rect({ x: 0, y: 0, width: layout.width, height: layout.height, fill: theme.bg }),
|
|
6193
|
+
chunkLFZZ4NCP_cjs.group({ class: "schematex-mindmap-edges", "aria-hidden": "true" }, edgeSvgs),
|
|
6194
|
+
chunkLFZZ4NCP_cjs.group({ class: "schematex-mindmap-nodes" }, nodeSvgs)
|
|
6183
6195
|
]
|
|
6184
6196
|
);
|
|
6185
6197
|
}
|
|
@@ -6570,7 +6582,7 @@ function parseMatrix(text2) {
|
|
|
6570
6582
|
const lines = text2.split(/\r?\n/);
|
|
6571
6583
|
let templateName;
|
|
6572
6584
|
let inConfig = false;
|
|
6573
|
-
for (
|
|
6585
|
+
for (const raw of lines) {
|
|
6574
6586
|
let line2 = raw;
|
|
6575
6587
|
const hashIdx = findCommentStart(line2);
|
|
6576
6588
|
if (hashIdx >= 0) line2 = line2.slice(0, hashIdx);
|
|
@@ -6905,7 +6917,7 @@ var CSS = `
|
|
|
6905
6917
|
.sx-matrix-offchart { fill: #ea580c; }
|
|
6906
6918
|
`.trim();
|
|
6907
6919
|
function axisArrow() {
|
|
6908
|
-
return
|
|
6920
|
+
return chunkLFZZ4NCP_cjs.el(
|
|
6909
6921
|
"marker",
|
|
6910
6922
|
{
|
|
6911
6923
|
id: "sx-matrix-arrow",
|
|
@@ -6916,7 +6928,7 @@ function axisArrow() {
|
|
|
6916
6928
|
markerHeight: 8,
|
|
6917
6929
|
orient: "auto-start-reverse"
|
|
6918
6930
|
},
|
|
6919
|
-
[
|
|
6931
|
+
[chunkLFZZ4NCP_cjs.el("path", { d: "M0,0 L10,5 L0,10 z", fill: "#374151" })]
|
|
6920
6932
|
);
|
|
6921
6933
|
}
|
|
6922
6934
|
function bubbleFill(p, categories) {
|
|
@@ -6938,10 +6950,10 @@ function renderQuadrantBackground(ast, lay) {
|
|
|
6938
6950
|
{ x: plot.x0, y: plot.y0 + halfH, w: halfW, h: halfH, fill: QUADRANT_TINTS[2] },
|
|
6939
6951
|
{ x: plot.x0 + halfW, y: plot.y0 + halfH, w: halfW, h: halfH, fill: QUADRANT_TINTS[3] }
|
|
6940
6952
|
];
|
|
6941
|
-
return
|
|
6953
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
6942
6954
|
{ id: "sx-matrix-quad-bg" },
|
|
6943
6955
|
rects.map(
|
|
6944
|
-
(r) =>
|
|
6956
|
+
(r) => chunkLFZZ4NCP_cjs.rect({ x: r.x, y: r.y, width: r.w, height: r.h, fill: r.fill, "fill-opacity": 0.55 })
|
|
6945
6957
|
)
|
|
6946
6958
|
);
|
|
6947
6959
|
}
|
|
@@ -6955,15 +6967,15 @@ function renderGrid(ast, lay) {
|
|
|
6955
6967
|
for (let i = 1; i < cols; i++) {
|
|
6956
6968
|
const x = plot.x0 + plot.w * i / cols;
|
|
6957
6969
|
const cls = cols === 2 && i === 1 ? "sx-matrix-mid" : "sx-matrix-grid";
|
|
6958
|
-
lines.push(
|
|
6970
|
+
lines.push(chunkLFZZ4NCP_cjs.line({ x1: x, y1: plot.y0, x2: x, y2: plot.y0 + plot.h, class: cls }));
|
|
6959
6971
|
}
|
|
6960
6972
|
for (let j = 1; j < rows; j++) {
|
|
6961
6973
|
const y = plot.y0 + plot.h * j / rows;
|
|
6962
6974
|
const cls = rows === 2 && j === 1 ? "sx-matrix-mid" : "sx-matrix-grid";
|
|
6963
|
-
lines.push(
|
|
6975
|
+
lines.push(chunkLFZZ4NCP_cjs.line({ x1: plot.x0, y1: y, x2: plot.x0 + plot.w, y2: y, class: cls }));
|
|
6964
6976
|
}
|
|
6965
6977
|
lines.push(
|
|
6966
|
-
|
|
6978
|
+
chunkLFZZ4NCP_cjs.rect({
|
|
6967
6979
|
x: plot.x0,
|
|
6968
6980
|
y: plot.y0,
|
|
6969
6981
|
width: plot.w,
|
|
@@ -6972,7 +6984,7 @@ function renderGrid(ast, lay) {
|
|
|
6972
6984
|
fill: "none"
|
|
6973
6985
|
})
|
|
6974
6986
|
);
|
|
6975
|
-
return
|
|
6987
|
+
return chunkLFZZ4NCP_cjs.group({ id: "sx-matrix-grid" }, lines);
|
|
6976
6988
|
}
|
|
6977
6989
|
function shouldShowAxis(ast) {
|
|
6978
6990
|
if (ast.config.showAxis === "on") return true;
|
|
@@ -6987,7 +6999,7 @@ function renderAxes(ast, lay) {
|
|
|
6987
6999
|
const xy = plot.y0 + plot.h + 14;
|
|
6988
7000
|
const yx = plot.x0 - 14;
|
|
6989
7001
|
els.push(
|
|
6990
|
-
|
|
7002
|
+
chunkLFZZ4NCP_cjs.line({
|
|
6991
7003
|
x1: plot.x0,
|
|
6992
7004
|
y1: xy,
|
|
6993
7005
|
x2: plot.x0 + plot.w,
|
|
@@ -6998,7 +7010,7 @@ function renderAxes(ast, lay) {
|
|
|
6998
7010
|
})
|
|
6999
7011
|
);
|
|
7000
7012
|
els.push(
|
|
7001
|
-
|
|
7013
|
+
chunkLFZZ4NCP_cjs.line({
|
|
7002
7014
|
x1: yx,
|
|
7003
7015
|
y1: plot.y0 + plot.h,
|
|
7004
7016
|
x2: yx,
|
|
@@ -7010,7 +7022,7 @@ function renderAxes(ast, lay) {
|
|
|
7010
7022
|
);
|
|
7011
7023
|
if (ast.xAxis.low) {
|
|
7012
7024
|
els.push(
|
|
7013
|
-
|
|
7025
|
+
chunkLFZZ4NCP_cjs.text(
|
|
7014
7026
|
{ x: plot.x0, y: xy + 20, class: "sx-matrix-axis-end", "text-anchor": "start" },
|
|
7015
7027
|
ast.xAxis.low
|
|
7016
7028
|
)
|
|
@@ -7018,7 +7030,7 @@ function renderAxes(ast, lay) {
|
|
|
7018
7030
|
}
|
|
7019
7031
|
if (ast.xAxis.high) {
|
|
7020
7032
|
els.push(
|
|
7021
|
-
|
|
7033
|
+
chunkLFZZ4NCP_cjs.text(
|
|
7022
7034
|
{ x: plot.x0 + plot.w, y: xy + 20, class: "sx-matrix-axis-end", "text-anchor": "end" },
|
|
7023
7035
|
ast.xAxis.high
|
|
7024
7036
|
)
|
|
@@ -7026,7 +7038,7 @@ function renderAxes(ast, lay) {
|
|
|
7026
7038
|
}
|
|
7027
7039
|
if (ast.yAxis.low) {
|
|
7028
7040
|
els.push(
|
|
7029
|
-
|
|
7041
|
+
chunkLFZZ4NCP_cjs.text(
|
|
7030
7042
|
{
|
|
7031
7043
|
x: yx - 24,
|
|
7032
7044
|
y: plot.y0 + plot.h,
|
|
@@ -7040,7 +7052,7 @@ function renderAxes(ast, lay) {
|
|
|
7040
7052
|
}
|
|
7041
7053
|
if (ast.yAxis.high) {
|
|
7042
7054
|
els.push(
|
|
7043
|
-
|
|
7055
|
+
chunkLFZZ4NCP_cjs.text(
|
|
7044
7056
|
{
|
|
7045
7057
|
x: yx - 24,
|
|
7046
7058
|
y: plot.y0,
|
|
@@ -7052,7 +7064,7 @@ function renderAxes(ast, lay) {
|
|
|
7052
7064
|
)
|
|
7053
7065
|
);
|
|
7054
7066
|
}
|
|
7055
|
-
return
|
|
7067
|
+
return chunkLFZZ4NCP_cjs.group({ id: "sx-matrix-axes" }, els);
|
|
7056
7068
|
}
|
|
7057
7069
|
function renderQuadAnnotations(ast, lay) {
|
|
7058
7070
|
if (!ast.config.quadrantAnnotations || ast.grid !== "2x2" || ast.annotations.length === 0) return "";
|
|
@@ -7077,14 +7089,14 @@ function renderQuadAnnotations(ast, lay) {
|
|
|
7077
7089
|
const descLines = a.description ? wrapLabel(a.description, 28) : [];
|
|
7078
7090
|
const labelY = growsUp && descLines.length > 0 ? pos.y - descLines.length * 12 : pos.y;
|
|
7079
7091
|
nodes.push(
|
|
7080
|
-
|
|
7092
|
+
chunkLFZZ4NCP_cjs.text(
|
|
7081
7093
|
{ x: pos.x, y: labelY, class: "sx-matrix-quad-annot", "text-anchor": pos.anchor },
|
|
7082
7094
|
a.label
|
|
7083
7095
|
)
|
|
7084
7096
|
);
|
|
7085
7097
|
for (let i = 0; i < descLines.length; i++) {
|
|
7086
7098
|
nodes.push(
|
|
7087
|
-
|
|
7099
|
+
chunkLFZZ4NCP_cjs.text(
|
|
7088
7100
|
{
|
|
7089
7101
|
x: pos.x,
|
|
7090
7102
|
y: labelY + 14 + i * 12,
|
|
@@ -7096,7 +7108,7 @@ function renderQuadAnnotations(ast, lay) {
|
|
|
7096
7108
|
);
|
|
7097
7109
|
}
|
|
7098
7110
|
}
|
|
7099
|
-
return
|
|
7111
|
+
return chunkLFZZ4NCP_cjs.group({ id: "sx-matrix-quad-annot" }, nodes);
|
|
7100
7112
|
}
|
|
7101
7113
|
function wrapLabel(text2, maxChars) {
|
|
7102
7114
|
const words = text2.split(/\s+/);
|
|
@@ -7121,9 +7133,9 @@ function render3x3CellLabels(ast, lay) {
|
|
|
7121
7133
|
const nodes = ast.cellLabels.map((cl) => {
|
|
7122
7134
|
const cx = plot.x0 + cellW * (cl.col + 0.5);
|
|
7123
7135
|
const cy = plot.y0 + cellH * (ast.rows - 1 - cl.row + 0.5);
|
|
7124
|
-
return
|
|
7136
|
+
return chunkLFZZ4NCP_cjs.text({ x: cx, y: cy, class: "sx-matrix-cell-label" }, cl.label);
|
|
7125
7137
|
});
|
|
7126
|
-
return
|
|
7138
|
+
return chunkLFZZ4NCP_cjs.group({ id: "sx-matrix-cell-labels" }, nodes);
|
|
7127
7139
|
}
|
|
7128
7140
|
function renderHeatmap(ast, lay) {
|
|
7129
7141
|
if (ast.mode !== "heatmap") return "";
|
|
@@ -7145,7 +7157,7 @@ function renderHeatmap(ast, lay) {
|
|
|
7145
7157
|
const x = plot.x0 + col * cellW;
|
|
7146
7158
|
const y = plot.y0 + (ast.rows - 1 - row) * cellH;
|
|
7147
7159
|
cells.push(
|
|
7148
|
-
|
|
7160
|
+
chunkLFZZ4NCP_cjs.rect({
|
|
7149
7161
|
x,
|
|
7150
7162
|
y,
|
|
7151
7163
|
width: cellW,
|
|
@@ -7163,7 +7175,7 @@ function renderHeatmap(ast, lay) {
|
|
|
7163
7175
|
if (!lbl) continue;
|
|
7164
7176
|
const y = plot.y0 + (ast.rows - 1 - row + 0.5) * cellH;
|
|
7165
7177
|
cells.push(
|
|
7166
|
-
|
|
7178
|
+
chunkLFZZ4NCP_cjs.text(
|
|
7167
7179
|
{
|
|
7168
7180
|
x: plot.x0 - 8,
|
|
7169
7181
|
y,
|
|
@@ -7182,7 +7194,7 @@ function renderHeatmap(ast, lay) {
|
|
|
7182
7194
|
if (!lbl) continue;
|
|
7183
7195
|
const x = plot.x0 + (col + 0.5) * cellW;
|
|
7184
7196
|
cells.push(
|
|
7185
|
-
|
|
7197
|
+
chunkLFZZ4NCP_cjs.text(
|
|
7186
7198
|
{
|
|
7187
7199
|
x,
|
|
7188
7200
|
y: plot.y0 + plot.h + 16,
|
|
@@ -7213,7 +7225,7 @@ function renderHeatmap(ast, lay) {
|
|
|
7213
7225
|
const startY = cy - (lines.length - 1) * lineH / 2;
|
|
7214
7226
|
for (let i = 0; i < lines.length; i++) {
|
|
7215
7227
|
cells.push(
|
|
7216
|
-
|
|
7228
|
+
chunkLFZZ4NCP_cjs.text(
|
|
7217
7229
|
{
|
|
7218
7230
|
x: cx,
|
|
7219
7231
|
y: startY + i * lineH,
|
|
@@ -7225,7 +7237,7 @@ function renderHeatmap(ast, lay) {
|
|
|
7225
7237
|
);
|
|
7226
7238
|
}
|
|
7227
7239
|
}
|
|
7228
|
-
return
|
|
7240
|
+
return chunkLFZZ4NCP_cjs.group({ id: "sx-matrix-heatmap" }, cells);
|
|
7229
7241
|
}
|
|
7230
7242
|
var DOT_COLORS = {
|
|
7231
7243
|
strong: "#16a34a",
|
|
@@ -7250,7 +7262,7 @@ function renderCorrelation(ast, lay) {
|
|
|
7250
7262
|
for (let row = 0; row < ast.rows; row++) {
|
|
7251
7263
|
const y = plot.y0 + (ast.rows - 1 - row) * cellH;
|
|
7252
7264
|
nodes.push(
|
|
7253
|
-
|
|
7265
|
+
chunkLFZZ4NCP_cjs.rect({
|
|
7254
7266
|
x: plot.x0,
|
|
7255
7267
|
y,
|
|
7256
7268
|
width: gridW,
|
|
@@ -7261,11 +7273,11 @@ function renderCorrelation(ast, lay) {
|
|
|
7261
7273
|
}
|
|
7262
7274
|
for (let i = 0; i <= ast.cols; i++) {
|
|
7263
7275
|
const x = plot.x0 + i * cellW;
|
|
7264
|
-
nodes.push(
|
|
7276
|
+
nodes.push(chunkLFZZ4NCP_cjs.line({ x1: x, y1: plot.y0, x2: x, y2: plot.y0 + gridH, class: "sx-matrix-corr-grid" }));
|
|
7265
7277
|
}
|
|
7266
7278
|
for (let j = 0; j <= ast.rows; j++) {
|
|
7267
7279
|
const y = plot.y0 + j * cellH;
|
|
7268
|
-
nodes.push(
|
|
7280
|
+
nodes.push(chunkLFZZ4NCP_cjs.line({ x1: plot.x0, y1: y, x2: plot.x0 + gridW, y2: y, class: "sx-matrix-corr-grid" }));
|
|
7269
7281
|
}
|
|
7270
7282
|
const dotR = Math.max(4, Math.min(cellW, cellH) * 0.28);
|
|
7271
7283
|
const rowSums = new Array(ast.rows).fill(0);
|
|
@@ -7280,7 +7292,7 @@ function renderCorrelation(ast, lay) {
|
|
|
7280
7292
|
const cx = plot.x0 + (c.col + 0.5) * cellW;
|
|
7281
7293
|
const cy = plot.y0 + (ast.rows - 1 - c.row + 0.5) * cellH;
|
|
7282
7294
|
nodes.push(
|
|
7283
|
-
|
|
7295
|
+
chunkLFZZ4NCP_cjs.circle({
|
|
7284
7296
|
cx,
|
|
7285
7297
|
cy,
|
|
7286
7298
|
r: dotR,
|
|
@@ -7299,7 +7311,7 @@ function renderCorrelation(ast, lay) {
|
|
|
7299
7311
|
const startY = plot.y0 - 8 - (lines.length - 1) * 12;
|
|
7300
7312
|
for (let i = 0; i < lines.length; i++) {
|
|
7301
7313
|
nodes.push(
|
|
7302
|
-
|
|
7314
|
+
chunkLFZZ4NCP_cjs.text(
|
|
7303
7315
|
{ x: cx, y: startY + i * 12, class: "sx-matrix-corr-header" },
|
|
7304
7316
|
lines[i]
|
|
7305
7317
|
)
|
|
@@ -7313,7 +7325,7 @@ function renderCorrelation(ast, lay) {
|
|
|
7313
7325
|
if (!label) continue;
|
|
7314
7326
|
const y = plot.y0 + (ast.rows - 1 - row + 0.5) * cellH;
|
|
7315
7327
|
nodes.push(
|
|
7316
|
-
|
|
7328
|
+
chunkLFZZ4NCP_cjs.text({ x: plot.x0 - 8, y, class: "sx-matrix-corr-rowlabel" }, label)
|
|
7317
7329
|
);
|
|
7318
7330
|
}
|
|
7319
7331
|
}
|
|
@@ -7324,28 +7336,28 @@ function renderCorrelation(ast, lay) {
|
|
|
7324
7336
|
const bestCol = colSums.length > 0 ? Math.max(...colSums) : 0;
|
|
7325
7337
|
const scoreColX = plot.x0 + gridW + cellW * 0.5;
|
|
7326
7338
|
const rankColX = plot.x0 + gridW + cellW * 1.5;
|
|
7327
|
-
nodes.push(
|
|
7328
|
-
nodes.push(
|
|
7339
|
+
nodes.push(chunkLFZZ4NCP_cjs.text({ x: scoreColX, y: plot.y0 - 8, class: "sx-matrix-corr-header" }, "Score"));
|
|
7340
|
+
nodes.push(chunkLFZZ4NCP_cjs.text({ x: rankColX, y: plot.y0 - 8, class: "sx-matrix-corr-header" }, "Rank"));
|
|
7329
7341
|
for (let row = 0; row < ast.rows; row++) {
|
|
7330
7342
|
const y = plot.y0 + (ast.rows - 1 - row + 0.5) * cellH;
|
|
7331
7343
|
const sum = rowSums[row];
|
|
7332
7344
|
const rank = rowRanks[row];
|
|
7333
7345
|
const cls = sum === bestRow && sum > 0 ? "sx-matrix-corr-margin-best" : "sx-matrix-corr-margin";
|
|
7334
|
-
nodes.push(
|
|
7346
|
+
nodes.push(chunkLFZZ4NCP_cjs.text({ x: scoreColX, y, class: cls }, String(sum)));
|
|
7335
7347
|
nodes.push(
|
|
7336
|
-
|
|
7348
|
+
chunkLFZZ4NCP_cjs.text({ x: rankColX, y, class: rank === 1 ? "sx-matrix-corr-margin-best" : "sx-matrix-corr-margin" }, String(rank))
|
|
7337
7349
|
);
|
|
7338
7350
|
}
|
|
7339
7351
|
const scoreRowY = plot.y0 + gridH + cellH * 0.5;
|
|
7340
7352
|
const rankRowY = plot.y0 + gridH + cellH * 1.5;
|
|
7341
7353
|
nodes.push(
|
|
7342
|
-
|
|
7354
|
+
chunkLFZZ4NCP_cjs.text(
|
|
7343
7355
|
{ x: plot.x0 - 8, y: scoreRowY, class: "sx-matrix-corr-rowlabel" },
|
|
7344
7356
|
"Score"
|
|
7345
7357
|
)
|
|
7346
7358
|
);
|
|
7347
7359
|
nodes.push(
|
|
7348
|
-
|
|
7360
|
+
chunkLFZZ4NCP_cjs.text(
|
|
7349
7361
|
{ x: plot.x0 - 8, y: rankRowY, class: "sx-matrix-corr-rowlabel" },
|
|
7350
7362
|
"Rank"
|
|
7351
7363
|
)
|
|
@@ -7355,7 +7367,7 @@ function renderCorrelation(ast, lay) {
|
|
|
7355
7367
|
const sum = colSums[col];
|
|
7356
7368
|
const rank = colRanks[col];
|
|
7357
7369
|
nodes.push(
|
|
7358
|
-
|
|
7370
|
+
chunkLFZZ4NCP_cjs.text(
|
|
7359
7371
|
{
|
|
7360
7372
|
x: cx,
|
|
7361
7373
|
y: scoreRowY,
|
|
@@ -7365,7 +7377,7 @@ function renderCorrelation(ast, lay) {
|
|
|
7365
7377
|
)
|
|
7366
7378
|
);
|
|
7367
7379
|
nodes.push(
|
|
7368
|
-
|
|
7380
|
+
chunkLFZZ4NCP_cjs.text(
|
|
7369
7381
|
{
|
|
7370
7382
|
x: cx,
|
|
7371
7383
|
y: rankRowY,
|
|
@@ -7376,7 +7388,7 @@ function renderCorrelation(ast, lay) {
|
|
|
7376
7388
|
);
|
|
7377
7389
|
}
|
|
7378
7390
|
}
|
|
7379
|
-
return
|
|
7391
|
+
return chunkLFZZ4NCP_cjs.group({ id: "sx-matrix-correlation" }, nodes);
|
|
7380
7392
|
}
|
|
7381
7393
|
function rankOf(vals) {
|
|
7382
7394
|
const sorted = [...vals].map((v, i) => ({ v, i })).sort((a, b) => b.v - a.v);
|
|
@@ -7404,12 +7416,12 @@ function renderCorrelationLegend(ast, lay) {
|
|
|
7404
7416
|
["weak", "Weak (1)"]
|
|
7405
7417
|
];
|
|
7406
7418
|
const rows = items.map(
|
|
7407
|
-
(it, i) =>
|
|
7408
|
-
|
|
7409
|
-
|
|
7419
|
+
(it, i) => chunkLFZZ4NCP_cjs.group({ transform: `translate(${xBase}, ${yBase + i * 18})` }, [
|
|
7420
|
+
chunkLFZZ4NCP_cjs.circle({ cx: 6, cy: 6, r: 5, fill: DOT_COLORS[it[0]], stroke: DOT_COLORS[it[0]] }),
|
|
7421
|
+
chunkLFZZ4NCP_cjs.text({ x: 18, y: 10, class: "sx-matrix-legend-text" }, it[1])
|
|
7410
7422
|
])
|
|
7411
7423
|
);
|
|
7412
|
-
return
|
|
7424
|
+
return chunkLFZZ4NCP_cjs.group({ id: "sx-matrix-corr-legend" }, rows);
|
|
7413
7425
|
}
|
|
7414
7426
|
function renderPoints(ast, lay) {
|
|
7415
7427
|
if (ast.mode !== "quadrant") return "";
|
|
@@ -7417,7 +7429,7 @@ function renderPoints(ast, lay) {
|
|
|
7417
7429
|
for (const p of lay.points) {
|
|
7418
7430
|
nodes.push(renderOnePoint(p, lay.categories));
|
|
7419
7431
|
}
|
|
7420
|
-
return
|
|
7432
|
+
return chunkLFZZ4NCP_cjs.group({ id: "sx-matrix-points" }, nodes);
|
|
7421
7433
|
}
|
|
7422
7434
|
function renderOnePoint(pl, categories) {
|
|
7423
7435
|
const p = pl.point;
|
|
@@ -7428,7 +7440,7 @@ function renderOnePoint(pl, categories) {
|
|
|
7428
7440
|
const strokeWidth = p.highlight ? 2.2 : 1.5;
|
|
7429
7441
|
const fillOpacity = p.size !== void 0 ? 0.45 : 0.75;
|
|
7430
7442
|
if (shape === "circle") {
|
|
7431
|
-
shapeEl =
|
|
7443
|
+
shapeEl = chunkLFZZ4NCP_cjs.circle({
|
|
7432
7444
|
cx: pl.px,
|
|
7433
7445
|
cy: pl.py,
|
|
7434
7446
|
r: pl.r,
|
|
@@ -7439,7 +7451,7 @@ function renderOnePoint(pl, categories) {
|
|
|
7439
7451
|
class: "sx-matrix-bubble"
|
|
7440
7452
|
});
|
|
7441
7453
|
} else if (shape === "square") {
|
|
7442
|
-
shapeEl =
|
|
7454
|
+
shapeEl = chunkLFZZ4NCP_cjs.rect({
|
|
7443
7455
|
x: pl.px - pl.r,
|
|
7444
7456
|
y: pl.py - pl.r,
|
|
7445
7457
|
width: pl.r * 2,
|
|
@@ -7452,7 +7464,7 @@ function renderOnePoint(pl, categories) {
|
|
|
7452
7464
|
});
|
|
7453
7465
|
} else if (shape === "diamond") {
|
|
7454
7466
|
const r = pl.r;
|
|
7455
|
-
shapeEl =
|
|
7467
|
+
shapeEl = chunkLFZZ4NCP_cjs.polygon({
|
|
7456
7468
|
points: `${pl.px},${pl.py - r} ${pl.px + r},${pl.py} ${pl.px},${pl.py + r} ${pl.px - r},${pl.py}`,
|
|
7457
7469
|
fill: color,
|
|
7458
7470
|
"fill-opacity": fillOpacity,
|
|
@@ -7462,7 +7474,7 @@ function renderOnePoint(pl, categories) {
|
|
|
7462
7474
|
});
|
|
7463
7475
|
} else {
|
|
7464
7476
|
const r = pl.r;
|
|
7465
|
-
shapeEl =
|
|
7477
|
+
shapeEl = chunkLFZZ4NCP_cjs.polygon({
|
|
7466
7478
|
points: `${pl.px},${pl.py - r} ${pl.px + r},${pl.py + r * 0.8} ${pl.px - r},${pl.py + r * 0.8}`,
|
|
7467
7479
|
fill: color,
|
|
7468
7480
|
"fill-opacity": fillOpacity,
|
|
@@ -7471,14 +7483,14 @@ function renderOnePoint(pl, categories) {
|
|
|
7471
7483
|
class: "sx-matrix-bubble"
|
|
7472
7484
|
});
|
|
7473
7485
|
}
|
|
7474
|
-
const leader = pl.label.external ?
|
|
7486
|
+
const leader = pl.label.external ? chunkLFZZ4NCP_cjs.line({
|
|
7475
7487
|
x1: pl.px,
|
|
7476
7488
|
y1: pl.py,
|
|
7477
7489
|
x2: pl.label.lx,
|
|
7478
7490
|
y2: pl.label.ly,
|
|
7479
7491
|
class: "sx-matrix-leader"
|
|
7480
7492
|
}) : "";
|
|
7481
|
-
const label =
|
|
7493
|
+
const label = chunkLFZZ4NCP_cjs.text(
|
|
7482
7494
|
{ x: pl.label.lx, y: pl.label.ly, class: "sx-matrix-label" },
|
|
7483
7495
|
pl.label.text
|
|
7484
7496
|
);
|
|
@@ -7486,20 +7498,20 @@ function renderOnePoint(pl, categories) {
|
|
|
7486
7498
|
if (p.offChart) {
|
|
7487
7499
|
const bx = pl.px;
|
|
7488
7500
|
const by = pl.py;
|
|
7489
|
-
badge =
|
|
7501
|
+
badge = chunkLFZZ4NCP_cjs.text(
|
|
7490
7502
|
{ x: bx + pl.r + 4, y: by - pl.r - 2, class: "sx-matrix-offchart", "font-size": 14, "font-weight": 700 },
|
|
7491
7503
|
"\u2197"
|
|
7492
7504
|
);
|
|
7493
7505
|
}
|
|
7494
7506
|
const titleStr = p.note ? `${p.label} \xB7 (${p.origX ?? p.x}, ${p.origY ?? p.y}) \u2014 ${p.note}` : `${p.label} \xB7 (${(p.origX ?? p.x).toFixed(2)}, ${(p.origY ?? p.y).toFixed(2)})${p.size !== void 0 ? ` \xB7 size ${p.size}` : ""}`;
|
|
7495
|
-
return
|
|
7507
|
+
return chunkLFZZ4NCP_cjs.group(
|
|
7496
7508
|
{
|
|
7497
7509
|
class: "sx-matrix-point",
|
|
7498
7510
|
"data-point-id": p.id,
|
|
7499
7511
|
"data-label": p.label,
|
|
7500
7512
|
...p.category ? { "data-category": p.category } : {}
|
|
7501
7513
|
},
|
|
7502
|
-
[
|
|
7514
|
+
[chunkLFZZ4NCP_cjs.title(titleStr), shapeEl, leader, label, badge].filter((s) => s.length > 0)
|
|
7503
7515
|
);
|
|
7504
7516
|
}
|
|
7505
7517
|
function renderLegend2(ast, lay) {
|
|
@@ -7510,18 +7522,18 @@ function renderLegend2(ast, lay) {
|
|
|
7510
7522
|
const w = 210;
|
|
7511
7523
|
const h = 10;
|
|
7512
7524
|
const stops = HEAT_RAMP.map(
|
|
7513
|
-
(c, i) =>
|
|
7525
|
+
(c, i) => chunkLFZZ4NCP_cjs.el("stop", { offset: `${i / (HEAT_RAMP.length - 1) * 100}%`, "stop-color": c })
|
|
7514
7526
|
);
|
|
7515
|
-
const grad =
|
|
7527
|
+
const grad = chunkLFZZ4NCP_cjs.el(
|
|
7516
7528
|
"linearGradient",
|
|
7517
7529
|
{ id: "sx-matrix-heatgrad", x1: "0%", x2: "100%" },
|
|
7518
7530
|
stops
|
|
7519
7531
|
);
|
|
7520
|
-
return
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7532
|
+
return chunkLFZZ4NCP_cjs.group({ id: "sx-matrix-legend" }, [
|
|
7533
|
+
chunkLFZZ4NCP_cjs.el("defs", {}, [grad]),
|
|
7534
|
+
chunkLFZZ4NCP_cjs.rect({ x, y, width: w, height: h, fill: "url(#sx-matrix-heatgrad)", stroke: "#d1d5db" }),
|
|
7535
|
+
chunkLFZZ4NCP_cjs.text({ x, y: y - 4, class: "sx-matrix-legend-text", "text-anchor": "start" }, "Low"),
|
|
7536
|
+
chunkLFZZ4NCP_cjs.text(
|
|
7525
7537
|
{ x: x + w, y: y - 4, class: "sx-matrix-legend-text", "text-anchor": "end" },
|
|
7526
7538
|
"High"
|
|
7527
7539
|
)
|
|
@@ -7532,16 +7544,16 @@ function renderLegend2(ast, lay) {
|
|
|
7532
7544
|
const yBase = lay.plot.y0 + 8;
|
|
7533
7545
|
const rows = lay.categories.map((cat, i) => {
|
|
7534
7546
|
const color = CATEGORY_COLORS[i % CATEGORY_COLORS.length];
|
|
7535
|
-
return
|
|
7536
|
-
|
|
7537
|
-
|
|
7547
|
+
return chunkLFZZ4NCP_cjs.group({ transform: `translate(${xBase}, ${yBase + i * 18})` }, [
|
|
7548
|
+
chunkLFZZ4NCP_cjs.circle({ cx: 6, cy: 6, r: 5, fill: color, "fill-opacity": 0.7, stroke: color }),
|
|
7549
|
+
chunkLFZZ4NCP_cjs.text({ x: 18, y: 10, class: "sx-matrix-legend-text" }, cat)
|
|
7538
7550
|
]);
|
|
7539
7551
|
});
|
|
7540
|
-
return
|
|
7552
|
+
return chunkLFZZ4NCP_cjs.group({ id: "sx-matrix-legend" }, rows);
|
|
7541
7553
|
}
|
|
7542
7554
|
function renderTitle(ast, lay) {
|
|
7543
7555
|
if (!ast.title) return "";
|
|
7544
|
-
return
|
|
7556
|
+
return chunkLFZZ4NCP_cjs.text(
|
|
7545
7557
|
{ x: lay.canvasWidth / 2, y: 28, class: "sx-matrix-title", "text-anchor": "middle" },
|
|
7546
7558
|
ast.title
|
|
7547
7559
|
);
|
|
@@ -7564,7 +7576,7 @@ function renderMatrixAST(ast) {
|
|
|
7564
7576
|
renderLegend2(ast, lay),
|
|
7565
7577
|
renderCorrelationLegend(ast, lay)
|
|
7566
7578
|
].filter((s) => s.length > 0);
|
|
7567
|
-
return
|
|
7579
|
+
return chunkLFZZ4NCP_cjs.svgRoot(
|
|
7568
7580
|
{
|
|
7569
7581
|
class: "sx-matrix",
|
|
7570
7582
|
"data-diagram-type": "matrix",
|
|
@@ -7575,11 +7587,11 @@ function renderMatrixAST(ast) {
|
|
|
7575
7587
|
role: "graphics-document"
|
|
7576
7588
|
},
|
|
7577
7589
|
[
|
|
7578
|
-
|
|
7579
|
-
|
|
7590
|
+
chunkLFZZ4NCP_cjs.title(ast.title ? `Matrix \u2014 ${chunkLFZZ4NCP_cjs.escapeXml(ast.title)}` : "Matrix diagram"),
|
|
7591
|
+
chunkLFZZ4NCP_cjs.desc(
|
|
7580
7592
|
`Matrix diagram${ast.template ? ` (${ast.template} template)` : ""}, ${ast.mode} mode, ${ast.points.length} point(s)`
|
|
7581
7593
|
),
|
|
7582
|
-
|
|
7594
|
+
chunkLFZZ4NCP_cjs.defs([chunkLFZZ4NCP_cjs.el("style", {}, CSS), axisArrow()]),
|
|
7583
7595
|
...body
|
|
7584
7596
|
]
|
|
7585
7597
|
);
|
|
@@ -7604,24 +7616,24 @@ var matrix = {
|
|
|
7604
7616
|
|
|
7605
7617
|
// src/core/api.ts
|
|
7606
7618
|
var plugins = [
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7619
|
+
chunkBUN3CRMP_cjs.genogram,
|
|
7620
|
+
chunkUK7JF5QB_cjs.ecomap,
|
|
7621
|
+
chunkKUXOHLGC_cjs.pedigree,
|
|
7622
|
+
chunkOK5RYX55_cjs.phylo,
|
|
7623
|
+
chunkC3IVD7DI_cjs.sociogram,
|
|
7624
|
+
chunkK5QG53GT_cjs.timing,
|
|
7625
|
+
chunk7MVDN5UC_cjs.logic,
|
|
7626
|
+
chunkXUEROLSB_cjs.circuit,
|
|
7627
|
+
chunk2UJAVPA4_cjs.blockdiagram,
|
|
7628
|
+
chunkMKKFIPKU_cjs.ladder,
|
|
7629
|
+
chunkEYHD7LV3_cjs.sld,
|
|
7630
|
+
chunkXI6JOG76_cjs.entity,
|
|
7631
|
+
chunk3YXXZ4LT_cjs.fishbone,
|
|
7632
|
+
chunkW7GIQTJV_cjs.venn,
|
|
7633
|
+
chunkGYTWJ6VB_cjs.flowchart,
|
|
7622
7634
|
mindmap,
|
|
7623
7635
|
matrix,
|
|
7624
|
-
|
|
7636
|
+
chunkL2KUGWFR_cjs.orgchart,
|
|
7625
7637
|
decisiontree,
|
|
7626
7638
|
timeline,
|
|
7627
7639
|
state,
|
|
@@ -7663,5 +7675,5 @@ exports.pid = pid;
|
|
|
7663
7675
|
exports.render = render;
|
|
7664
7676
|
exports.state = state;
|
|
7665
7677
|
exports.timeline = timeline;
|
|
7666
|
-
//# sourceMappingURL=chunk-
|
|
7667
|
-
//# sourceMappingURL=chunk-
|
|
7678
|
+
//# sourceMappingURL=chunk-YTEEZV6J.cjs.map
|
|
7679
|
+
//# sourceMappingURL=chunk-YTEEZV6J.cjs.map
|