@ucap-llm/ai-ui 1.1.13 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_basePickBy-DMehTBs0-8955b30b.mjs +151 -0
- package/_basePickBy-e7598e72.mjs +153 -0
- package/{_baseUniq-2bcae05e.mjs → _baseUniq-8cd7fbc4.mjs} +150 -150
- package/_baseUniq-DPnX6tpB-5eb6efbd.mjs +615 -0
- package/ai-ui.es.js +9 -8
- package/ai-ui.umd.js +3425 -923
- package/arc-8909f880.mjs +85 -0
- package/arc-qimaJRLH-591a6072.mjs +85 -0
- package/architecture-4AB2E3PP-DFmEpUnA-62fe65dd.mjs +10 -0
- package/architecture-4AB2E3PP-b04ae9dd.mjs +10 -0
- package/{architectureDiagram-IEHRJDOE-e4684ef3.mjs → architectureDiagram-IEHRJDOE-1ccc2c64.mjs} +123 -123
- package/architectureDiagram-IEHRJDOE-BRVAVUEE-c068faae.mjs +4641 -0
- package/{blockDiagram-JOT3LUYC-504ee31e.mjs → blockDiagram-JOT3LUYC-63569de5.mjs} +5 -5
- package/blockDiagram-JOT3LUYC-Cs4tSRey-54d8e29b.mjs +2251 -0
- package/{c4Diagram-VJAJSXHY-c5ba6af4.mjs → c4Diagram-VJAJSXHY-355a4170.mjs} +23 -23
- package/c4Diagram-VJAJSXHY-C3F9fO0L-0df97cd8.mjs +1583 -0
- package/channel-CuHzivgY-bb3d765a.mjs +5 -0
- package/channel-a1f4f18c.mjs +5 -0
- package/{chunk-4BMEZGHF-8d9a2e4f.mjs → chunk-4BMEZGHF-705995af.mjs} +1 -1
- package/chunk-4BMEZGHF-btTOjzEX-c9c5432c.mjs +9 -0
- package/{chunk-A2AXSNBT-41ae29f2.mjs → chunk-A2AXSNBT-3a857566.mjs} +10 -10
- package/chunk-A2AXSNBT-CPBZRsS7-a80df701.mjs +1373 -0
- package/{chunk-AEK57VVT-69e121d6.mjs → chunk-AEK57VVT-6c60e1ee.mjs} +45 -45
- package/chunk-AEK57VVT-D62Iwyam-238a3d85.mjs +1361 -0
- package/{chunk-D6G4REZN-472adc5b.mjs → chunk-D6G4REZN-11c52918.mjs} +5 -5
- package/chunk-D6G4REZN-HlFmQTJy-20704636.mjs +64 -0
- package/chunk-RZ5BOZE2-DIFgOqDt-495bec03.mjs +24 -0
- package/{chunk-RZ5BOZE2-b7d5d4f5.mjs → chunk-RZ5BOZE2-d6db8103.mjs} +9 -9
- package/chunk-XZIHB7SX-CCrbsG0u-f30e4124.mjs +15 -0
- package/{chunk-XZIHB7SX-56c08d07.mjs → chunk-XZIHB7SX-fafd3ca2.mjs} +1 -1
- package/classDiagram-GIVACNV2-Bv5U0XPL-622b22ed.mjs +18 -0
- package/{classDiagram-v2-COTLJTTW-1deea5cc.mjs → classDiagram-GIVACNV2-eca9aeb6.mjs} +5 -5
- package/classDiagram-v2-COTLJTTW-Bv5U0XPL-622b22ed.mjs +18 -0
- package/{classDiagram-GIVACNV2-1deea5cc.mjs → classDiagram-v2-COTLJTTW-eca9aeb6.mjs} +5 -5
- package/{clone-1f18a17f.mjs → clone-327a1426.mjs} +1 -1
- package/clone-Csc9uFbU-6c4f28bd.mjs +8 -0
- package/cytoscape.esm-Swd9B-1A-3101f241.mjs +18730 -0
- package/{dagre-OKDRZEBW-74e73dcf.mjs → dagre-OKDRZEBW-9059bb36.mjs} +81 -81
- package/dagre-OKDRZEBW-CoMQYlxF-96274fb0.mjs +448 -0
- package/{diagram-SSKATNLV-1a562cb0.mjs → diagram-SSKATNLV-70f68e72.mjs} +34 -34
- package/diagram-SSKATNLV-CPuZUaGP-50edcaa0.mjs +225 -0
- package/{diagram-VNBRO52H-b765e46f.mjs → diagram-VNBRO52H-39273710.mjs} +35 -35
- package/diagram-VNBRO52H-DIIZ-Sll-969266e6.mjs +130 -0
- package/{erDiagram-Q7BY3M3F-022c4343.mjs → erDiagram-Q7BY3M3F-96ba3906.mjs} +3 -3
- package/erDiagram-Q7BY3M3F-ZKWAM_uE-41c0350d.mjs +843 -0
- package/{flowDiagram-4HSFHLVR-6036e284.mjs → flowDiagram-4HSFHLVR-795e3830.mjs} +29 -29
- package/flowDiagram-4HSFHLVR-CUJXGEG3-801dde13.mjs +1624 -0
- package/{ganttDiagram-APWFNJXF-be871387.mjs → ganttDiagram-APWFNJXF-736e67b6.mjs} +398 -398
- package/ganttDiagram-APWFNJXF-C1pgubbs-20beffc3.mjs +2527 -0
- package/gitGraph-O2Q2CXLX-00465db9.mjs +10 -0
- package/gitGraph-O2Q2CXLX-BYavwGzs-e5f1990e.mjs +10 -0
- package/{gitGraphDiagram-7IBYFJ6S-da63c888.mjs → gitGraphDiagram-7IBYFJ6S-115329ab.mjs} +88 -88
- package/gitGraphDiagram-7IBYFJ6S-CndxirR4-b39d4089.mjs +716 -0
- package/{graph-e71f0e3e.mjs → graph-9e073c5f.mjs} +8 -8
- package/graph-DOmtxVvg-727f4e14.mjs +247 -0
- package/index-433e2395.mjs +168385 -0
- package/info-4N47QTOZ-688db415.mjs +10 -0
- package/info-4N47QTOZ-DPyDFN1Z-821cf2f7.mjs +10 -0
- package/{infoDiagram-PH2N3AL5-3e1c1c1f.mjs → infoDiagram-PH2N3AL5-29e9585a.mjs} +9 -9
- package/infoDiagram-PH2N3AL5-BkSS3vpU-ef4bf66d.mjs +26 -0
- package/init-DjUOC4st-87c930f1.mjs +16 -0
- package/{journeyDiagram-U35MCT3I-6d29748d.mjs → journeyDiagram-U35MCT3I-7c5644d1.mjs} +41 -41
- package/journeyDiagram-U35MCT3I-BN-kCDeJ-ac350902.mjs +811 -0
- package/{kanban-definition-NDS4AKOZ-c231ae4c.mjs → kanban-definition-NDS4AKOZ-eff441f9.mjs} +47 -47
- package/kanban-definition-NDS4AKOZ-gaDUOiKt-efdba942.mjs +720 -0
- package/{layout-b9b9e407.mjs → layout-501d22f0.mjs} +19 -19
- package/layout-8X5HiOVA-b6e13cf9.mjs +1323 -0
- package/linear-BgV5F0PU-8137edad.mjs +447 -0
- package/{linear-99040ddc.mjs → linear-fd3cd932.mjs} +56 -56
- package/{mermaid-parser.core-55f134dc.mjs → mermaid-parser.core-6eb44241.mjs} +160 -160
- package/mermaid-parser.core-BTS3sfcL-8c80284a.mjs +12810 -0
- package/{mindmap-definition-ALO5MXBD-938e2e65.mjs → mindmap-definition-ALO5MXBD-2fe3c748.mjs} +1 -1
- package/mindmap-definition-ALO5MXBD-B8q_1sIj-c3599d3c.mjs +3225 -0
- package/ordinal-DfAQgscy-1c8e46a9.mjs +65 -0
- package/package.json +2 -2
- package/packet-KVYON367-DcfdOX-U-afac932a.mjs +10 -0
- package/packet-KVYON367-c82af3fe.mjs +10 -0
- package/pie-R6RNRRYF-DKruFncB-d07f60c2.mjs +10 -0
- package/pie-R6RNRRYF-eb27797b.mjs +10 -0
- package/pieDiagram-IB7DONF6-Bijui6_Q-db9fdf3a.mjs +166 -0
- package/{pieDiagram-IB7DONF6-6a11673b.mjs → pieDiagram-IB7DONF6-e6863984.mjs} +36 -36
- package/{quadrantDiagram-7GDLP6J5-a4a4d9ac.mjs → quadrantDiagram-7GDLP6J5-88df12c2.mjs} +15 -15
- package/quadrantDiagram-7GDLP6J5-DzIzViUj-b13add98.mjs +1027 -0
- package/radar-MK3ICKWK-723229d0.mjs +10 -0
- package/radar-MK3ICKWK-D8wbkmr5-3165faf6.mjs +10 -0
- package/{requirementDiagram-KVF5MWMF-a7093c74.mjs → requirementDiagram-KVF5MWMF-7228051c.mjs} +50 -50
- package/requirementDiagram-KVF5MWMF-Hqsbdpfq-23374f24.mjs +853 -0
- package/{sankeyDiagram-QLVOVGJD-f4bcbb2d.mjs → sankeyDiagram-QLVOVGJD-00a31a99.mjs} +87 -87
- package/sankeyDiagram-QLVOVGJD-DGCeusqJ-8ca7e64d.mjs +826 -0
- package/{sequenceDiagram-X6HHIX6F-9071cfff.mjs → sequenceDiagram-X6HHIX6F-de203309.mjs} +3 -3
- package/sequenceDiagram-X6HHIX6F-kuEE9wSd-5f0ec5cd.mjs +2283 -0
- package/{stateDiagram-DGXRK772-fb22a7a5.mjs → stateDiagram-DGXRK772-2341237a.mjs} +48 -48
- package/stateDiagram-DGXRK772-Cq-Ce3WP-266efa7f.mjs +274 -0
- package/{stateDiagram-v2-YXO3MK2T-67326b76.mjs → stateDiagram-v2-YXO3MK2T-8c81deed.mjs} +5 -5
- package/stateDiagram-v2-YXO3MK2T-CplwFWn1-c0024e4e.mjs +18 -0
- package/style.css +10 -1
- package/timeline-definition-BDJGKUSR-USv5sZzx-22548912.mjs +806 -0
- package/{timeline-definition-BDJGKUSR-44f50d45.mjs → timeline-definition-BDJGKUSR-e615901b.mjs} +79 -79
- package/{xychartDiagram-VJFVF3MP-2df503f6.mjs → xychartDiagram-VJFVF3MP-9ad66a6b.mjs} +28 -28
- package/xychartDiagram-VJFVF3MP-CXCfFZBM-e5ca151e.mjs +1306 -0
- package/_basePickBy-12958109.mjs +0 -153
- package/arc-14f9a207.mjs +0 -85
- package/architecture-4AB2E3PP-bb512ddb.mjs +0 -10
- package/channel-7bd711b4.mjs +0 -5
- package/gitGraph-O2Q2CXLX-83cfcbef.mjs +0 -10
- package/index-f83d4b07.mjs +0 -97448
- package/info-4N47QTOZ-20cf90f5.mjs +0 -10
- package/katex-2e45926a.mjs +0 -11700
- package/packet-KVYON367-453a49e8.mjs +0 -10
- package/pie-R6RNRRYF-4d95c8dc.mjs +0 -10
- package/radar-MK3ICKWK-100e8fa4.mjs +0 -10
|
@@ -0,0 +1,811 @@
|
|
|
1
|
+
import { x as dt, g as ft, y as rt, d as gt } from "./chunk-D6G4REZN-HlFmQTJy-20704636.mjs";
|
|
2
|
+
import { v as s, l as I, i as mt, k as xt, j as kt, G as _t, Y as bt, K as wt, r as vt, e as X, X as Tt } from "./index-433e2395.mjs";
|
|
3
|
+
import { h as Q } from "./arc-qimaJRLH-591a6072.mjs";
|
|
4
|
+
import "vue";
|
|
5
|
+
var G = function() {
|
|
6
|
+
var t = /* @__PURE__ */ s(function(g, i, a, u) {
|
|
7
|
+
for (a = a || {}, u = g.length; u--; a[g[u]] = i)
|
|
8
|
+
;
|
|
9
|
+
return a;
|
|
10
|
+
}, "o"), e = [6, 8, 10, 11, 12, 14, 16, 17, 18], r = [1, 9], l = [1, 10], n = [1, 11], h = [1, 12], c = [1, 13], y = [1, 14], d = {
|
|
11
|
+
trace: /* @__PURE__ */ s(function() {
|
|
12
|
+
}, "trace"),
|
|
13
|
+
yy: {},
|
|
14
|
+
symbols_: { error: 2, start: 3, journey: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, title: 11, acc_title: 12, acc_title_value: 13, acc_descr: 14, acc_descr_value: 15, acc_descr_multiline_value: 16, section: 17, taskName: 18, taskData: 19, $accept: 0, $end: 1 },
|
|
15
|
+
terminals_: { 2: "error", 4: "journey", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 18: "taskName", 19: "taskData" },
|
|
16
|
+
productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2]],
|
|
17
|
+
performAction: /* @__PURE__ */ s(function(g, i, a, u, p, o, m) {
|
|
18
|
+
var k = o.length - 1;
|
|
19
|
+
switch (p) {
|
|
20
|
+
case 1:
|
|
21
|
+
return o[k - 1];
|
|
22
|
+
case 2:
|
|
23
|
+
this.$ = [];
|
|
24
|
+
break;
|
|
25
|
+
case 3:
|
|
26
|
+
o[k - 1].push(o[k]), this.$ = o[k - 1];
|
|
27
|
+
break;
|
|
28
|
+
case 4:
|
|
29
|
+
case 5:
|
|
30
|
+
this.$ = o[k];
|
|
31
|
+
break;
|
|
32
|
+
case 6:
|
|
33
|
+
case 7:
|
|
34
|
+
this.$ = [];
|
|
35
|
+
break;
|
|
36
|
+
case 8:
|
|
37
|
+
u.setDiagramTitle(o[k].substr(6)), this.$ = o[k].substr(6);
|
|
38
|
+
break;
|
|
39
|
+
case 9:
|
|
40
|
+
this.$ = o[k].trim(), u.setAccTitle(this.$);
|
|
41
|
+
break;
|
|
42
|
+
case 10:
|
|
43
|
+
case 11:
|
|
44
|
+
this.$ = o[k].trim(), u.setAccDescription(this.$);
|
|
45
|
+
break;
|
|
46
|
+
case 12:
|
|
47
|
+
u.addSection(o[k].substr(8)), this.$ = o[k].substr(8);
|
|
48
|
+
break;
|
|
49
|
+
case 13:
|
|
50
|
+
u.addTask(o[k - 1], o[k]), this.$ = "task";
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}, "anonymous"),
|
|
54
|
+
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: r, 12: l, 14: n, 16: h, 17: c, 18: y }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 15, 11: r, 12: l, 14: n, 16: h, 17: c, 18: y }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, t(e, [2, 11]), t(e, [2, 12]), { 19: [1, 18] }, t(e, [2, 4]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 13])],
|
|
55
|
+
defaultActions: {},
|
|
56
|
+
parseError: /* @__PURE__ */ s(function(g, i) {
|
|
57
|
+
if (i.recoverable)
|
|
58
|
+
this.trace(g);
|
|
59
|
+
else {
|
|
60
|
+
var a = new Error(g);
|
|
61
|
+
throw a.hash = i, a;
|
|
62
|
+
}
|
|
63
|
+
}, "parseError"),
|
|
64
|
+
parse: /* @__PURE__ */ s(function(g) {
|
|
65
|
+
var i = this, a = [0], u = [], p = [null], o = [], m = this.table, k = "", L = 0, K = 0, ht = 2, U = 1, ut = o.slice.call(arguments, 1), _ = Object.create(this.lexer), S = { yy: {} };
|
|
66
|
+
for (var D in this.yy)
|
|
67
|
+
Object.prototype.hasOwnProperty.call(this.yy, D) && (S.yy[D] = this.yy[D]);
|
|
68
|
+
_.setInput(g, S.yy), S.yy.lexer = _, S.yy.parser = this, typeof _.yylloc > "u" && (_.yylloc = {});
|
|
69
|
+
var N = _.yylloc;
|
|
70
|
+
o.push(N);
|
|
71
|
+
var pt = _.options && _.options.ranges;
|
|
72
|
+
typeof S.yy.parseError == "function" ? this.parseError = S.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
73
|
+
function yt(w) {
|
|
74
|
+
a.length = a.length - 2 * w, p.length = p.length - w, o.length = o.length - w;
|
|
75
|
+
}
|
|
76
|
+
s(yt, "popStack");
|
|
77
|
+
function H() {
|
|
78
|
+
var w;
|
|
79
|
+
return w = u.pop() || _.lex() || U, typeof w != "number" && (w instanceof Array && (u = w, w = u.pop()), w = i.symbols_[w] || w), w;
|
|
80
|
+
}
|
|
81
|
+
s(H, "lex");
|
|
82
|
+
for (var b, A, v, z, P = {}, B, $, J, O; ; ) {
|
|
83
|
+
if (A = a[a.length - 1], this.defaultActions[A] ? v = this.defaultActions[A] : ((b === null || typeof b > "u") && (b = H()), v = m[A] && m[A][b]), typeof v > "u" || !v.length || !v[0]) {
|
|
84
|
+
var Y = "";
|
|
85
|
+
O = [];
|
|
86
|
+
for (B in m[A])
|
|
87
|
+
this.terminals_[B] && B > ht && O.push("'" + this.terminals_[B] + "'");
|
|
88
|
+
_.showPosition ? Y = "Parse error on line " + (L + 1) + `:
|
|
89
|
+
` + _.showPosition() + `
|
|
90
|
+
Expecting ` + O.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : Y = "Parse error on line " + (L + 1) + ": Unexpected " + (b == U ? "end of input" : "'" + (this.terminals_[b] || b) + "'"), this.parseError(Y, {
|
|
91
|
+
text: _.match,
|
|
92
|
+
token: this.terminals_[b] || b,
|
|
93
|
+
line: _.yylineno,
|
|
94
|
+
loc: N,
|
|
95
|
+
expected: O
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
if (v[0] instanceof Array && v.length > 1)
|
|
99
|
+
throw new Error("Parse Error: multiple actions possible at state: " + A + ", token: " + b);
|
|
100
|
+
switch (v[0]) {
|
|
101
|
+
case 1:
|
|
102
|
+
a.push(b), p.push(_.yytext), o.push(_.yylloc), a.push(v[1]), b = null, K = _.yyleng, k = _.yytext, L = _.yylineno, N = _.yylloc;
|
|
103
|
+
break;
|
|
104
|
+
case 2:
|
|
105
|
+
if ($ = this.productions_[v[1]][1], P.$ = p[p.length - $], P._$ = {
|
|
106
|
+
first_line: o[o.length - ($ || 1)].first_line,
|
|
107
|
+
last_line: o[o.length - 1].last_line,
|
|
108
|
+
first_column: o[o.length - ($ || 1)].first_column,
|
|
109
|
+
last_column: o[o.length - 1].last_column
|
|
110
|
+
}, pt && (P._$.range = [
|
|
111
|
+
o[o.length - ($ || 1)].range[0],
|
|
112
|
+
o[o.length - 1].range[1]
|
|
113
|
+
]), z = this.performAction.apply(P, [
|
|
114
|
+
k,
|
|
115
|
+
K,
|
|
116
|
+
L,
|
|
117
|
+
S.yy,
|
|
118
|
+
v[1],
|
|
119
|
+
p,
|
|
120
|
+
o
|
|
121
|
+
].concat(ut)), typeof z < "u")
|
|
122
|
+
return z;
|
|
123
|
+
$ && (a = a.slice(0, -1 * $ * 2), p = p.slice(0, -1 * $), o = o.slice(0, -1 * $)), a.push(this.productions_[v[1]][0]), p.push(P.$), o.push(P._$), J = m[a[a.length - 2]][a[a.length - 1]], a.push(J);
|
|
124
|
+
break;
|
|
125
|
+
case 3:
|
|
126
|
+
return !0;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return !0;
|
|
130
|
+
}, "parse")
|
|
131
|
+
}, x = /* @__PURE__ */ function() {
|
|
132
|
+
var g = {
|
|
133
|
+
EOF: 1,
|
|
134
|
+
parseError: /* @__PURE__ */ s(function(i, a) {
|
|
135
|
+
if (this.yy.parser)
|
|
136
|
+
this.yy.parser.parseError(i, a);
|
|
137
|
+
else
|
|
138
|
+
throw new Error(i);
|
|
139
|
+
}, "parseError"),
|
|
140
|
+
// resets the lexer, sets new input
|
|
141
|
+
setInput: /* @__PURE__ */ s(function(i, a) {
|
|
142
|
+
return this.yy = a || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
143
|
+
first_line: 1,
|
|
144
|
+
first_column: 0,
|
|
145
|
+
last_line: 1,
|
|
146
|
+
last_column: 0
|
|
147
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
148
|
+
}, "setInput"),
|
|
149
|
+
// consumes and returns one char from the input
|
|
150
|
+
input: /* @__PURE__ */ s(function() {
|
|
151
|
+
var i = this._input[0];
|
|
152
|
+
this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
|
|
153
|
+
var a = i.match(/(?:\r\n?|\n).*/g);
|
|
154
|
+
return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
|
|
155
|
+
}, "input"),
|
|
156
|
+
// unshifts one char (or a string) into the input
|
|
157
|
+
unput: /* @__PURE__ */ s(function(i) {
|
|
158
|
+
var a = i.length, u = i.split(/(?:\r\n?|\n)/g);
|
|
159
|
+
this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
|
|
160
|
+
var p = this.match.split(/(?:\r\n?|\n)/g);
|
|
161
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), u.length - 1 && (this.yylineno -= u.length - 1);
|
|
162
|
+
var o = this.yylloc.range;
|
|
163
|
+
return this.yylloc = {
|
|
164
|
+
first_line: this.yylloc.first_line,
|
|
165
|
+
last_line: this.yylineno + 1,
|
|
166
|
+
first_column: this.yylloc.first_column,
|
|
167
|
+
last_column: u ? (u.length === p.length ? this.yylloc.first_column : 0) + p[p.length - u.length].length - u[0].length : this.yylloc.first_column - a
|
|
168
|
+
}, this.options.ranges && (this.yylloc.range = [o[0], o[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
|
|
169
|
+
}, "unput"),
|
|
170
|
+
// When called from action, caches matched text and appends it on next action
|
|
171
|
+
more: /* @__PURE__ */ s(function() {
|
|
172
|
+
return this._more = !0, this;
|
|
173
|
+
}, "more"),
|
|
174
|
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
175
|
+
reject: /* @__PURE__ */ s(function() {
|
|
176
|
+
if (this.options.backtrack_lexer)
|
|
177
|
+
this._backtrack = !0;
|
|
178
|
+
else
|
|
179
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
180
|
+
` + this.showPosition(), {
|
|
181
|
+
text: "",
|
|
182
|
+
token: null,
|
|
183
|
+
line: this.yylineno
|
|
184
|
+
});
|
|
185
|
+
return this;
|
|
186
|
+
}, "reject"),
|
|
187
|
+
// retain first n characters of the match
|
|
188
|
+
less: /* @__PURE__ */ s(function(i) {
|
|
189
|
+
this.unput(this.match.slice(i));
|
|
190
|
+
}, "less"),
|
|
191
|
+
// displays already matched input, i.e. for error messages
|
|
192
|
+
pastInput: /* @__PURE__ */ s(function() {
|
|
193
|
+
var i = this.matched.substr(0, this.matched.length - this.match.length);
|
|
194
|
+
return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
|
|
195
|
+
}, "pastInput"),
|
|
196
|
+
// displays upcoming input, i.e. for error messages
|
|
197
|
+
upcomingInput: /* @__PURE__ */ s(function() {
|
|
198
|
+
var i = this.match;
|
|
199
|
+
return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
200
|
+
}, "upcomingInput"),
|
|
201
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
202
|
+
showPosition: /* @__PURE__ */ s(function() {
|
|
203
|
+
var i = this.pastInput(), a = new Array(i.length + 1).join("-");
|
|
204
|
+
return i + this.upcomingInput() + `
|
|
205
|
+
` + a + "^";
|
|
206
|
+
}, "showPosition"),
|
|
207
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
208
|
+
test_match: /* @__PURE__ */ s(function(i, a) {
|
|
209
|
+
var u, p, o;
|
|
210
|
+
if (this.options.backtrack_lexer && (o = {
|
|
211
|
+
yylineno: this.yylineno,
|
|
212
|
+
yylloc: {
|
|
213
|
+
first_line: this.yylloc.first_line,
|
|
214
|
+
last_line: this.last_line,
|
|
215
|
+
first_column: this.yylloc.first_column,
|
|
216
|
+
last_column: this.yylloc.last_column
|
|
217
|
+
},
|
|
218
|
+
yytext: this.yytext,
|
|
219
|
+
match: this.match,
|
|
220
|
+
matches: this.matches,
|
|
221
|
+
matched: this.matched,
|
|
222
|
+
yyleng: this.yyleng,
|
|
223
|
+
offset: this.offset,
|
|
224
|
+
_more: this._more,
|
|
225
|
+
_input: this._input,
|
|
226
|
+
yy: this.yy,
|
|
227
|
+
conditionStack: this.conditionStack.slice(0),
|
|
228
|
+
done: this.done
|
|
229
|
+
}, this.options.ranges && (o.yylloc.range = this.yylloc.range.slice(0))), p = i[0].match(/(?:\r\n?|\n).*/g), p && (this.yylineno += p.length), this.yylloc = {
|
|
230
|
+
first_line: this.yylloc.last_line,
|
|
231
|
+
last_line: this.yylineno + 1,
|
|
232
|
+
first_column: this.yylloc.last_column,
|
|
233
|
+
last_column: p ? p[p.length - 1].length - p[p.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
|
|
234
|
+
}, this.yytext += i[0], this.match += i[0], this.matches = i, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(i[0].length), this.matched += i[0], u = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), u)
|
|
235
|
+
return u;
|
|
236
|
+
if (this._backtrack) {
|
|
237
|
+
for (var m in o)
|
|
238
|
+
this[m] = o[m];
|
|
239
|
+
return !1;
|
|
240
|
+
}
|
|
241
|
+
return !1;
|
|
242
|
+
}, "test_match"),
|
|
243
|
+
// return next match in input
|
|
244
|
+
next: /* @__PURE__ */ s(function() {
|
|
245
|
+
if (this.done)
|
|
246
|
+
return this.EOF;
|
|
247
|
+
this._input || (this.done = !0);
|
|
248
|
+
var i, a, u, p;
|
|
249
|
+
this._more || (this.yytext = "", this.match = "");
|
|
250
|
+
for (var o = this._currentRules(), m = 0; m < o.length; m++)
|
|
251
|
+
if (u = this._input.match(this.rules[o[m]]), u && (!a || u[0].length > a[0].length)) {
|
|
252
|
+
if (a = u, p = m, this.options.backtrack_lexer) {
|
|
253
|
+
if (i = this.test_match(u, o[m]), i !== !1)
|
|
254
|
+
return i;
|
|
255
|
+
if (this._backtrack) {
|
|
256
|
+
a = !1;
|
|
257
|
+
continue;
|
|
258
|
+
} else
|
|
259
|
+
return !1;
|
|
260
|
+
} else if (!this.options.flex)
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
return a ? (i = this.test_match(a, o[p]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
264
|
+
` + this.showPosition(), {
|
|
265
|
+
text: "",
|
|
266
|
+
token: null,
|
|
267
|
+
line: this.yylineno
|
|
268
|
+
});
|
|
269
|
+
}, "next"),
|
|
270
|
+
// return next match that has a token
|
|
271
|
+
lex: /* @__PURE__ */ s(function() {
|
|
272
|
+
var i = this.next();
|
|
273
|
+
return i || this.lex();
|
|
274
|
+
}, "lex"),
|
|
275
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
276
|
+
begin: /* @__PURE__ */ s(function(i) {
|
|
277
|
+
this.conditionStack.push(i);
|
|
278
|
+
}, "begin"),
|
|
279
|
+
// pop the previously active lexer condition state off the condition stack
|
|
280
|
+
popState: /* @__PURE__ */ s(function() {
|
|
281
|
+
var i = this.conditionStack.length - 1;
|
|
282
|
+
return i > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
283
|
+
}, "popState"),
|
|
284
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
285
|
+
_currentRules: /* @__PURE__ */ s(function() {
|
|
286
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
287
|
+
}, "_currentRules"),
|
|
288
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
289
|
+
topState: /* @__PURE__ */ s(function(i) {
|
|
290
|
+
return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
|
|
291
|
+
}, "topState"),
|
|
292
|
+
// alias for begin(condition)
|
|
293
|
+
pushState: /* @__PURE__ */ s(function(i) {
|
|
294
|
+
this.begin(i);
|
|
295
|
+
}, "pushState"),
|
|
296
|
+
// return the number of states currently on the stack
|
|
297
|
+
stateStackSize: /* @__PURE__ */ s(function() {
|
|
298
|
+
return this.conditionStack.length;
|
|
299
|
+
}, "stateStackSize"),
|
|
300
|
+
options: { "case-insensitive": !0 },
|
|
301
|
+
performAction: /* @__PURE__ */ s(function(i, a, u, p) {
|
|
302
|
+
switch (u) {
|
|
303
|
+
case 0:
|
|
304
|
+
break;
|
|
305
|
+
case 1:
|
|
306
|
+
break;
|
|
307
|
+
case 2:
|
|
308
|
+
return 10;
|
|
309
|
+
case 3:
|
|
310
|
+
break;
|
|
311
|
+
case 4:
|
|
312
|
+
break;
|
|
313
|
+
case 5:
|
|
314
|
+
return 4;
|
|
315
|
+
case 6:
|
|
316
|
+
return 11;
|
|
317
|
+
case 7:
|
|
318
|
+
return this.begin("acc_title"), 12;
|
|
319
|
+
case 8:
|
|
320
|
+
return this.popState(), "acc_title_value";
|
|
321
|
+
case 9:
|
|
322
|
+
return this.begin("acc_descr"), 14;
|
|
323
|
+
case 10:
|
|
324
|
+
return this.popState(), "acc_descr_value";
|
|
325
|
+
case 11:
|
|
326
|
+
this.begin("acc_descr_multiline");
|
|
327
|
+
break;
|
|
328
|
+
case 12:
|
|
329
|
+
this.popState();
|
|
330
|
+
break;
|
|
331
|
+
case 13:
|
|
332
|
+
return "acc_descr_multiline_value";
|
|
333
|
+
case 14:
|
|
334
|
+
return 17;
|
|
335
|
+
case 15:
|
|
336
|
+
return 18;
|
|
337
|
+
case 16:
|
|
338
|
+
return 19;
|
|
339
|
+
case 17:
|
|
340
|
+
return ":";
|
|
341
|
+
case 18:
|
|
342
|
+
return 6;
|
|
343
|
+
case 19:
|
|
344
|
+
return "INVALID";
|
|
345
|
+
}
|
|
346
|
+
}, "anonymous"),
|
|
347
|
+
rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
|
|
348
|
+
conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], inclusive: !0 } }
|
|
349
|
+
};
|
|
350
|
+
return g;
|
|
351
|
+
}();
|
|
352
|
+
d.lexer = x;
|
|
353
|
+
function f() {
|
|
354
|
+
this.yy = {};
|
|
355
|
+
}
|
|
356
|
+
return s(f, "Parser"), f.prototype = d, d.Parser = f, new f();
|
|
357
|
+
}();
|
|
358
|
+
G.parser = G;
|
|
359
|
+
var $t = G, C = "", Z = [], j = [], V = [], Mt = /* @__PURE__ */ s(function() {
|
|
360
|
+
Z.length = 0, j.length = 0, C = "", V.length = 0, vt();
|
|
361
|
+
}, "clear"), St = /* @__PURE__ */ s(function(t) {
|
|
362
|
+
C = t, Z.push(t);
|
|
363
|
+
}, "addSection"), At = /* @__PURE__ */ s(function() {
|
|
364
|
+
return Z;
|
|
365
|
+
}, "getSections"), Et = /* @__PURE__ */ s(function() {
|
|
366
|
+
let t = tt();
|
|
367
|
+
const e = 100;
|
|
368
|
+
let r = 0;
|
|
369
|
+
for (; !t && r < e; )
|
|
370
|
+
t = tt(), r++;
|
|
371
|
+
return j.push(...V), j;
|
|
372
|
+
}, "getTasks"), It = /* @__PURE__ */ s(function() {
|
|
373
|
+
const t = [];
|
|
374
|
+
return j.forEach((e) => {
|
|
375
|
+
e.people && t.push(...e.people);
|
|
376
|
+
}), [...new Set(t)].sort();
|
|
377
|
+
}, "updateActors"), Pt = /* @__PURE__ */ s(function(t, e) {
|
|
378
|
+
const r = e.substr(1).split(":");
|
|
379
|
+
let l = 0, n = [];
|
|
380
|
+
r.length === 1 ? (l = Number(r[0]), n = []) : (l = Number(r[0]), n = r[1].split(","));
|
|
381
|
+
const h = n.map((y) => y.trim()), c = {
|
|
382
|
+
section: C,
|
|
383
|
+
type: C,
|
|
384
|
+
people: h,
|
|
385
|
+
task: t,
|
|
386
|
+
score: l
|
|
387
|
+
};
|
|
388
|
+
V.push(c);
|
|
389
|
+
}, "addTask"), Ct = /* @__PURE__ */ s(function(t) {
|
|
390
|
+
const e = {
|
|
391
|
+
section: C,
|
|
392
|
+
type: C,
|
|
393
|
+
description: t,
|
|
394
|
+
task: t,
|
|
395
|
+
classes: []
|
|
396
|
+
};
|
|
397
|
+
j.push(e);
|
|
398
|
+
}, "addTaskOrg"), tt = /* @__PURE__ */ s(function() {
|
|
399
|
+
const t = /* @__PURE__ */ s(function(r) {
|
|
400
|
+
return V[r].processed;
|
|
401
|
+
}, "compileTask");
|
|
402
|
+
let e = !0;
|
|
403
|
+
for (const [r, l] of V.entries())
|
|
404
|
+
t(r), e = e && l.processed;
|
|
405
|
+
return e;
|
|
406
|
+
}, "compileTasks"), jt = /* @__PURE__ */ s(function() {
|
|
407
|
+
return It();
|
|
408
|
+
}, "getActors"), et = {
|
|
409
|
+
getConfig: /* @__PURE__ */ s(() => I().journey, "getConfig"),
|
|
410
|
+
clear: Mt,
|
|
411
|
+
setDiagramTitle: mt,
|
|
412
|
+
getDiagramTitle: xt,
|
|
413
|
+
setAccTitle: kt,
|
|
414
|
+
getAccTitle: _t,
|
|
415
|
+
setAccDescription: bt,
|
|
416
|
+
getAccDescription: wt,
|
|
417
|
+
addSection: St,
|
|
418
|
+
getSections: At,
|
|
419
|
+
getTasks: Et,
|
|
420
|
+
addTask: Pt,
|
|
421
|
+
addTaskOrg: Ct,
|
|
422
|
+
getActors: jt
|
|
423
|
+
}, Vt = /* @__PURE__ */ s((t) => `.label {
|
|
424
|
+
font-family: ${t.fontFamily};
|
|
425
|
+
color: ${t.textColor};
|
|
426
|
+
}
|
|
427
|
+
.mouth {
|
|
428
|
+
stroke: #666;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
line {
|
|
432
|
+
stroke: ${t.textColor}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.legend {
|
|
436
|
+
fill: ${t.textColor};
|
|
437
|
+
font-family: ${t.fontFamily};
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.label text {
|
|
441
|
+
fill: #333;
|
|
442
|
+
}
|
|
443
|
+
.label {
|
|
444
|
+
color: ${t.textColor}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.face {
|
|
448
|
+
${t.faceColor ? `fill: ${t.faceColor}` : "fill: #FFF8DC"};
|
|
449
|
+
stroke: #999;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.node rect,
|
|
453
|
+
.node circle,
|
|
454
|
+
.node ellipse,
|
|
455
|
+
.node polygon,
|
|
456
|
+
.node path {
|
|
457
|
+
fill: ${t.mainBkg};
|
|
458
|
+
stroke: ${t.nodeBorder};
|
|
459
|
+
stroke-width: 1px;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.node .label {
|
|
463
|
+
text-align: center;
|
|
464
|
+
}
|
|
465
|
+
.node.clickable {
|
|
466
|
+
cursor: pointer;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.arrowheadPath {
|
|
470
|
+
fill: ${t.arrowheadColor};
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.edgePath .path {
|
|
474
|
+
stroke: ${t.lineColor};
|
|
475
|
+
stroke-width: 1.5px;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.flowchart-link {
|
|
479
|
+
stroke: ${t.lineColor};
|
|
480
|
+
fill: none;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.edgeLabel {
|
|
484
|
+
background-color: ${t.edgeLabelBackground};
|
|
485
|
+
rect {
|
|
486
|
+
opacity: 0.5;
|
|
487
|
+
}
|
|
488
|
+
text-align: center;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.cluster rect {
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.cluster text {
|
|
495
|
+
fill: ${t.titleColor};
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
div.mermaidTooltip {
|
|
499
|
+
position: absolute;
|
|
500
|
+
text-align: center;
|
|
501
|
+
max-width: 200px;
|
|
502
|
+
padding: 2px;
|
|
503
|
+
font-family: ${t.fontFamily};
|
|
504
|
+
font-size: 12px;
|
|
505
|
+
background: ${t.tertiaryColor};
|
|
506
|
+
border: 1px solid ${t.border2};
|
|
507
|
+
border-radius: 2px;
|
|
508
|
+
pointer-events: none;
|
|
509
|
+
z-index: 100;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.task-type-0, .section-type-0 {
|
|
513
|
+
${t.fillType0 ? `fill: ${t.fillType0}` : ""};
|
|
514
|
+
}
|
|
515
|
+
.task-type-1, .section-type-1 {
|
|
516
|
+
${t.fillType0 ? `fill: ${t.fillType1}` : ""};
|
|
517
|
+
}
|
|
518
|
+
.task-type-2, .section-type-2 {
|
|
519
|
+
${t.fillType0 ? `fill: ${t.fillType2}` : ""};
|
|
520
|
+
}
|
|
521
|
+
.task-type-3, .section-type-3 {
|
|
522
|
+
${t.fillType0 ? `fill: ${t.fillType3}` : ""};
|
|
523
|
+
}
|
|
524
|
+
.task-type-4, .section-type-4 {
|
|
525
|
+
${t.fillType0 ? `fill: ${t.fillType4}` : ""};
|
|
526
|
+
}
|
|
527
|
+
.task-type-5, .section-type-5 {
|
|
528
|
+
${t.fillType0 ? `fill: ${t.fillType5}` : ""};
|
|
529
|
+
}
|
|
530
|
+
.task-type-6, .section-type-6 {
|
|
531
|
+
${t.fillType0 ? `fill: ${t.fillType6}` : ""};
|
|
532
|
+
}
|
|
533
|
+
.task-type-7, .section-type-7 {
|
|
534
|
+
${t.fillType0 ? `fill: ${t.fillType7}` : ""};
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.actor-0 {
|
|
538
|
+
${t.actor0 ? `fill: ${t.actor0}` : ""};
|
|
539
|
+
}
|
|
540
|
+
.actor-1 {
|
|
541
|
+
${t.actor1 ? `fill: ${t.actor1}` : ""};
|
|
542
|
+
}
|
|
543
|
+
.actor-2 {
|
|
544
|
+
${t.actor2 ? `fill: ${t.actor2}` : ""};
|
|
545
|
+
}
|
|
546
|
+
.actor-3 {
|
|
547
|
+
${t.actor3 ? `fill: ${t.actor3}` : ""};
|
|
548
|
+
}
|
|
549
|
+
.actor-4 {
|
|
550
|
+
${t.actor4 ? `fill: ${t.actor4}` : ""};
|
|
551
|
+
}
|
|
552
|
+
.actor-5 {
|
|
553
|
+
${t.actor5 ? `fill: ${t.actor5}` : ""};
|
|
554
|
+
}
|
|
555
|
+
`, "getStyles"), Ft = Vt, q = /* @__PURE__ */ s(function(t, e) {
|
|
556
|
+
return dt(t, e);
|
|
557
|
+
}, "drawRect"), Lt = /* @__PURE__ */ s(function(t, e) {
|
|
558
|
+
const r = t.append("circle").attr("cx", e.cx).attr("cy", e.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), l = t.append("g");
|
|
559
|
+
l.append("circle").attr("cx", e.cx - 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), l.append("circle").attr("cx", e.cx + 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
|
|
560
|
+
function n(y) {
|
|
561
|
+
const d = Q().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
|
|
562
|
+
y.append("path").attr("class", "mouth").attr("d", d).attr("transform", "translate(" + e.cx + "," + (e.cy + 2) + ")");
|
|
563
|
+
}
|
|
564
|
+
s(n, "smile");
|
|
565
|
+
function h(y) {
|
|
566
|
+
const d = Q().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
|
|
567
|
+
y.append("path").attr("class", "mouth").attr("d", d).attr("transform", "translate(" + e.cx + "," + (e.cy + 7) + ")");
|
|
568
|
+
}
|
|
569
|
+
s(h, "sad");
|
|
570
|
+
function c(y) {
|
|
571
|
+
y.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", e.cx - 5).attr("y1", e.cy + 7).attr("x2", e.cx + 5).attr("y2", e.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
|
|
572
|
+
}
|
|
573
|
+
return s(c, "ambivalent"), e.score > 3 ? n(l) : e.score < 3 ? h(l) : c(l), r;
|
|
574
|
+
}, "drawFace"), at = /* @__PURE__ */ s(function(t, e) {
|
|
575
|
+
const r = t.append("circle");
|
|
576
|
+
return r.attr("cx", e.cx), r.attr("cy", e.cy), r.attr("class", "actor-" + e.pos), r.attr("fill", e.fill), r.attr("stroke", e.stroke), r.attr("r", e.r), r.class !== void 0 && r.attr("class", r.class), e.title !== void 0 && r.append("title").text(e.title), r;
|
|
577
|
+
}, "drawCircle"), ot = /* @__PURE__ */ s(function(t, e) {
|
|
578
|
+
return ft(t, e);
|
|
579
|
+
}, "drawText"), Bt = /* @__PURE__ */ s(function(t, e) {
|
|
580
|
+
function r(n, h, c, y, d) {
|
|
581
|
+
return n + "," + h + " " + (n + c) + "," + h + " " + (n + c) + "," + (h + y - d) + " " + (n + c - d * 1.2) + "," + (h + y) + " " + n + "," + (h + y);
|
|
582
|
+
}
|
|
583
|
+
s(r, "genPoints");
|
|
584
|
+
const l = t.append("polygon");
|
|
585
|
+
l.attr("points", r(e.x, e.y, 50, 20, 7)), l.attr("class", "labelBox"), e.y = e.y + e.labelMargin, e.x = e.x + 0.5 * e.labelMargin, ot(t, e);
|
|
586
|
+
}, "drawLabel"), Ot = /* @__PURE__ */ s(function(t, e, r) {
|
|
587
|
+
const l = t.append("g"), n = rt();
|
|
588
|
+
n.x = e.x, n.y = e.y, n.fill = e.fill, n.width = r.width * e.taskCount + // width of the tasks
|
|
589
|
+
r.diagramMarginX * (e.taskCount - 1), n.height = r.height, n.class = "journey-section section-type-" + e.num, n.rx = 3, n.ry = 3, q(l, n), lt(r)(
|
|
590
|
+
e.text,
|
|
591
|
+
l,
|
|
592
|
+
n.x,
|
|
593
|
+
n.y,
|
|
594
|
+
n.width,
|
|
595
|
+
n.height,
|
|
596
|
+
{ class: "journey-section section-type-" + e.num },
|
|
597
|
+
r,
|
|
598
|
+
e.colour
|
|
599
|
+
);
|
|
600
|
+
}, "drawSection"), it = -1, Rt = /* @__PURE__ */ s(function(t, e, r) {
|
|
601
|
+
const l = e.x + r.width / 2, n = t.append("g");
|
|
602
|
+
it++;
|
|
603
|
+
const h = 300 + 5 * 30;
|
|
604
|
+
n.append("line").attr("id", "task" + it).attr("x1", l).attr("y1", e.y).attr("x2", l).attr("y2", h).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Lt(n, {
|
|
605
|
+
cx: l,
|
|
606
|
+
cy: 300 + (5 - e.score) * 30,
|
|
607
|
+
score: e.score
|
|
608
|
+
});
|
|
609
|
+
const c = rt();
|
|
610
|
+
c.x = e.x, c.y = e.y, c.fill = e.fill, c.width = r.width, c.height = r.height, c.class = "task task-type-" + e.num, c.rx = 3, c.ry = 3, q(n, c);
|
|
611
|
+
let y = e.x + 14;
|
|
612
|
+
e.people.forEach((d) => {
|
|
613
|
+
const x = e.actors[d].color, f = {
|
|
614
|
+
cx: y,
|
|
615
|
+
cy: e.y,
|
|
616
|
+
r: 7,
|
|
617
|
+
fill: x,
|
|
618
|
+
stroke: "#000",
|
|
619
|
+
title: d,
|
|
620
|
+
pos: e.actors[d].position
|
|
621
|
+
};
|
|
622
|
+
at(n, f), y += 10;
|
|
623
|
+
}), lt(r)(
|
|
624
|
+
e.task,
|
|
625
|
+
n,
|
|
626
|
+
c.x,
|
|
627
|
+
c.y,
|
|
628
|
+
c.width,
|
|
629
|
+
c.height,
|
|
630
|
+
{ class: "task" },
|
|
631
|
+
r,
|
|
632
|
+
e.colour
|
|
633
|
+
);
|
|
634
|
+
}, "drawTask"), Dt = /* @__PURE__ */ s(function(t, e) {
|
|
635
|
+
gt(t, e);
|
|
636
|
+
}, "drawBackgroundRect"), lt = /* @__PURE__ */ function() {
|
|
637
|
+
function t(n, h, c, y, d, x, f, g) {
|
|
638
|
+
const i = h.append("text").attr("x", c + d / 2).attr("y", y + x / 2 + 5).style("font-color", g).style("text-anchor", "middle").text(n);
|
|
639
|
+
l(i, f);
|
|
640
|
+
}
|
|
641
|
+
s(t, "byText");
|
|
642
|
+
function e(n, h, c, y, d, x, f, g, i) {
|
|
643
|
+
const { taskFontSize: a, taskFontFamily: u } = g, p = n.split(/<br\s*\/?>/gi);
|
|
644
|
+
for (let o = 0; o < p.length; o++) {
|
|
645
|
+
const m = o * a - a * (p.length - 1) / 2, k = h.append("text").attr("x", c + d / 2).attr("y", y).attr("fill", i).style("text-anchor", "middle").style("font-size", a).style("font-family", u);
|
|
646
|
+
k.append("tspan").attr("x", c + d / 2).attr("dy", m).text(p[o]), k.attr("y", y + x / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), l(k, f);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
s(e, "byTspan");
|
|
650
|
+
function r(n, h, c, y, d, x, f, g) {
|
|
651
|
+
const i = h.append("switch"), a = i.append("foreignObject").attr("x", c).attr("y", y).attr("width", d).attr("height", x).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
652
|
+
a.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(n), e(n, i, c, y, d, x, f, g), l(a, f);
|
|
653
|
+
}
|
|
654
|
+
s(r, "byFo");
|
|
655
|
+
function l(n, h) {
|
|
656
|
+
for (const c in h)
|
|
657
|
+
c in h && n.attr(c, h[c]);
|
|
658
|
+
}
|
|
659
|
+
return s(l, "_setTextAttrs"), function(n) {
|
|
660
|
+
return n.textPlacement === "fo" ? r : n.textPlacement === "old" ? t : e;
|
|
661
|
+
};
|
|
662
|
+
}(), Nt = /* @__PURE__ */ s(function(t) {
|
|
663
|
+
t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
|
|
664
|
+
}, "initGraphics"), F = {
|
|
665
|
+
drawRect: q,
|
|
666
|
+
drawCircle: at,
|
|
667
|
+
drawSection: Ot,
|
|
668
|
+
drawText: ot,
|
|
669
|
+
drawLabel: Bt,
|
|
670
|
+
drawTask: Rt,
|
|
671
|
+
drawBackgroundRect: Dt,
|
|
672
|
+
initGraphics: Nt
|
|
673
|
+
}, zt = /* @__PURE__ */ s(function(t) {
|
|
674
|
+
Object.keys(t).forEach(function(e) {
|
|
675
|
+
R[e] = t[e];
|
|
676
|
+
});
|
|
677
|
+
}, "setConf"), M = {};
|
|
678
|
+
function ct(t) {
|
|
679
|
+
const e = I().journey;
|
|
680
|
+
let r = 60;
|
|
681
|
+
Object.keys(M).forEach((l) => {
|
|
682
|
+
const n = M[l].color, h = {
|
|
683
|
+
cx: 20,
|
|
684
|
+
cy: r,
|
|
685
|
+
r: 7,
|
|
686
|
+
fill: n,
|
|
687
|
+
stroke: "#000",
|
|
688
|
+
pos: M[l].position
|
|
689
|
+
};
|
|
690
|
+
F.drawCircle(t, h);
|
|
691
|
+
const c = {
|
|
692
|
+
x: 40,
|
|
693
|
+
y: r + 7,
|
|
694
|
+
fill: "#666",
|
|
695
|
+
text: l,
|
|
696
|
+
textMargin: e.boxTextMargin | 5
|
|
697
|
+
};
|
|
698
|
+
F.drawText(t, c), r += 20;
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
s(ct, "drawActorLegend");
|
|
702
|
+
var R = I().journey, E = R.leftMargin, Yt = /* @__PURE__ */ s(function(t, e, r, l) {
|
|
703
|
+
const n = I().journey, h = I().securityLevel;
|
|
704
|
+
let c;
|
|
705
|
+
h === "sandbox" && (c = X("#i" + e));
|
|
706
|
+
const y = h === "sandbox" ? X(c.nodes()[0].contentDocument.body) : X("body");
|
|
707
|
+
T.init();
|
|
708
|
+
const d = y.select("#" + e);
|
|
709
|
+
F.initGraphics(d);
|
|
710
|
+
const x = l.db.getTasks(), f = l.db.getDiagramTitle(), g = l.db.getActors();
|
|
711
|
+
for (const m in M)
|
|
712
|
+
delete M[m];
|
|
713
|
+
let i = 0;
|
|
714
|
+
g.forEach((m) => {
|
|
715
|
+
M[m] = {
|
|
716
|
+
color: n.actorColours[i % n.actorColours.length],
|
|
717
|
+
position: i
|
|
718
|
+
}, i++;
|
|
719
|
+
}), ct(d), T.insert(0, 0, E, Object.keys(M).length * 50), Xt(d, x, 0);
|
|
720
|
+
const a = T.getBounds();
|
|
721
|
+
f && d.append("text").text(f).attr("x", E).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
|
|
722
|
+
const u = a.stopy - a.starty + 2 * n.diagramMarginY, p = E + a.stopx + 2 * n.diagramMarginX;
|
|
723
|
+
Tt(d, u, p, n.useMaxWidth), d.append("line").attr("x1", E).attr("y1", n.height * 4).attr("x2", p - E - 4).attr("y2", n.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
|
|
724
|
+
const o = f ? 70 : 0;
|
|
725
|
+
d.attr("viewBox", `${a.startx} -25 ${p} ${u + o}`), d.attr("preserveAspectRatio", "xMinYMin meet"), d.attr("height", u + o + 25);
|
|
726
|
+
}, "draw"), T = {
|
|
727
|
+
data: {
|
|
728
|
+
startx: void 0,
|
|
729
|
+
stopx: void 0,
|
|
730
|
+
starty: void 0,
|
|
731
|
+
stopy: void 0
|
|
732
|
+
},
|
|
733
|
+
verticalPos: 0,
|
|
734
|
+
sequenceItems: [],
|
|
735
|
+
init: /* @__PURE__ */ s(function() {
|
|
736
|
+
this.sequenceItems = [], this.data = {
|
|
737
|
+
startx: void 0,
|
|
738
|
+
stopx: void 0,
|
|
739
|
+
starty: void 0,
|
|
740
|
+
stopy: void 0
|
|
741
|
+
}, this.verticalPos = 0;
|
|
742
|
+
}, "init"),
|
|
743
|
+
updateVal: /* @__PURE__ */ s(function(t, e, r, l) {
|
|
744
|
+
t[e] === void 0 ? t[e] = r : t[e] = l(r, t[e]);
|
|
745
|
+
}, "updateVal"),
|
|
746
|
+
updateBounds: /* @__PURE__ */ s(function(t, e, r, l) {
|
|
747
|
+
const n = I().journey, h = this;
|
|
748
|
+
let c = 0;
|
|
749
|
+
function y(d) {
|
|
750
|
+
return /* @__PURE__ */ s(function(x) {
|
|
751
|
+
c++;
|
|
752
|
+
const f = h.sequenceItems.length - c + 1;
|
|
753
|
+
h.updateVal(x, "starty", e - f * n.boxMargin, Math.min), h.updateVal(x, "stopy", l + f * n.boxMargin, Math.max), h.updateVal(T.data, "startx", t - f * n.boxMargin, Math.min), h.updateVal(T.data, "stopx", r + f * n.boxMargin, Math.max), d !== "activation" && (h.updateVal(x, "startx", t - f * n.boxMargin, Math.min), h.updateVal(x, "stopx", r + f * n.boxMargin, Math.max), h.updateVal(T.data, "starty", e - f * n.boxMargin, Math.min), h.updateVal(T.data, "stopy", l + f * n.boxMargin, Math.max));
|
|
754
|
+
}, "updateItemBounds");
|
|
755
|
+
}
|
|
756
|
+
s(y, "updateFn"), this.sequenceItems.forEach(y());
|
|
757
|
+
}, "updateBounds"),
|
|
758
|
+
insert: /* @__PURE__ */ s(function(t, e, r, l) {
|
|
759
|
+
const n = Math.min(t, r), h = Math.max(t, r), c = Math.min(e, l), y = Math.max(e, l);
|
|
760
|
+
this.updateVal(T.data, "startx", n, Math.min), this.updateVal(T.data, "starty", c, Math.min), this.updateVal(T.data, "stopx", h, Math.max), this.updateVal(T.data, "stopy", y, Math.max), this.updateBounds(n, c, h, y);
|
|
761
|
+
}, "insert"),
|
|
762
|
+
bumpVerticalPos: /* @__PURE__ */ s(function(t) {
|
|
763
|
+
this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
|
|
764
|
+
}, "bumpVerticalPos"),
|
|
765
|
+
getVerticalPos: /* @__PURE__ */ s(function() {
|
|
766
|
+
return this.verticalPos;
|
|
767
|
+
}, "getVerticalPos"),
|
|
768
|
+
getBounds: /* @__PURE__ */ s(function() {
|
|
769
|
+
return this.data;
|
|
770
|
+
}, "getBounds")
|
|
771
|
+
}, W = R.sectionFills, nt = R.sectionColours, Xt = /* @__PURE__ */ s(function(t, e, r) {
|
|
772
|
+
const l = I().journey;
|
|
773
|
+
let n = "";
|
|
774
|
+
const h = l.height * 2 + l.diagramMarginY, c = r + h;
|
|
775
|
+
let y = 0, d = "#CCC", x = "black", f = 0;
|
|
776
|
+
for (const [g, i] of e.entries()) {
|
|
777
|
+
if (n !== i.section) {
|
|
778
|
+
d = W[y % W.length], f = y % W.length, x = nt[y % nt.length];
|
|
779
|
+
let u = 0;
|
|
780
|
+
const p = i.section;
|
|
781
|
+
for (let m = g; m < e.length && e[m].section == p; m++)
|
|
782
|
+
u = u + 1;
|
|
783
|
+
const o = {
|
|
784
|
+
x: g * l.taskMargin + g * l.width + E,
|
|
785
|
+
y: 50,
|
|
786
|
+
text: i.section,
|
|
787
|
+
fill: d,
|
|
788
|
+
num: f,
|
|
789
|
+
colour: x,
|
|
790
|
+
taskCount: u
|
|
791
|
+
};
|
|
792
|
+
F.drawSection(t, o, l), n = i.section, y++;
|
|
793
|
+
}
|
|
794
|
+
const a = i.people.reduce((u, p) => (M[p] && (u[p] = M[p]), u), {});
|
|
795
|
+
i.x = g * l.taskMargin + g * l.width + E, i.y = c, i.width = l.diagramMarginX, i.height = l.diagramMarginY, i.colour = x, i.fill = d, i.num = f, i.actors = a, F.drawTask(t, i, l), T.insert(i.x, i.y, i.x + i.width + l.taskMargin, 300 + 5 * 30);
|
|
796
|
+
}
|
|
797
|
+
}, "drawTasks"), st = {
|
|
798
|
+
setConf: zt,
|
|
799
|
+
draw: Yt
|
|
800
|
+
}, Kt = {
|
|
801
|
+
parser: $t,
|
|
802
|
+
db: et,
|
|
803
|
+
renderer: st,
|
|
804
|
+
styles: Ft,
|
|
805
|
+
init: /* @__PURE__ */ s((t) => {
|
|
806
|
+
st.setConf(t.journey), et.clear();
|
|
807
|
+
}, "init")
|
|
808
|
+
};
|
|
809
|
+
export {
|
|
810
|
+
Kt as diagram
|
|
811
|
+
};
|