@elmethis/core 1.0.0-alpha.134 → 1.0.0-alpha.136
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/{Bash-CH5FqaYP.js → Bash-BGUPOZp7.js} +1 -1
- package/dist/{Css-CIfznlc_.js → Css-BCZOJ9TO.js} +1 -1
- package/dist/{Rust-CZSAfuWF.js → Rust-BwvKtYCc.js} +1 -1
- package/dist/_basePickBy-BjVOtBbf.js +152 -0
- package/dist/_baseUniq-DBXEmOed.js +583 -0
- package/dist/arc-CpOtc53l.js +83 -0
- package/dist/architecture-I3QFYML2-B3piHlUx.js +5 -0
- package/dist/architectureDiagram-UYN6MBPD-CIvqBNYd.js +4595 -0
- package/dist/blockDiagram-ZHA2E4KO-BJHIBwi6.js +2247 -0
- package/dist/c4Diagram-6F5ED5ID-DxXqw6e0.js +1581 -0
- package/dist/channel-BgZSmjvA.js +5 -0
- package/dist/chunk-5HRBRIJM-CvhBPtHu.js +24 -0
- package/dist/chunk-7U56Z5CX-CaWvnXle.js +1215 -0
- package/dist/chunk-ASOPGD6M-CQjrO8hd.js +64 -0
- package/dist/chunk-KFBOBJHC-DWru5GNu.js +15 -0
- package/dist/chunk-T2TOU4HS-DqpYO7rW.js +1303 -0
- package/dist/chunk-TMUBEWPD-LmMMNIqt.js +9 -0
- package/dist/classDiagram-LNE6IOMH-D5GoOZTJ.js +14 -0
- package/dist/classDiagram-v2-MQ7JQ4JX-D5GoOZTJ.js +14 -0
- package/dist/clone-DMQ2a__4.js +8 -0
- package/dist/{cobol-DZ3yq6J9.js → cobol-DMssKNmC.js} +1 -1
- package/dist/components/code/ElmMermaid.stories.d.ts +7 -0
- package/dist/components/code/ElmMermaid.vue.d.ts +8 -0
- package/dist/cytoscape.esm-CsRvAgYT.js +17639 -0
- package/dist/dagre-4EVJKHTY-C7YsHY3S.js +447 -0
- package/dist/diagram-QW4FP2JN-iDbrW_yI.js +126 -0
- package/dist/elmethis.js +36 -35
- package/dist/elmethis.umd.cjs +2272 -41
- package/dist/erDiagram-6RL3IURR-LYq0WEw3.js +937 -0
- package/dist/flowDiagram-7ASYPVHJ-DRPtjs2_.js +1484 -0
- package/dist/ganttDiagram-NTVNEXSI-C-hO_7Lp.js +2494 -0
- package/dist/gitGraph-YCYPL57B-BaVhg8eu.js +5 -0
- package/dist/gitGraphDiagram-NRZ2UAAF-u52k9qsq.js +712 -0
- package/dist/graph-CKV5wesZ.js +247 -0
- package/dist/{index-B_eGv85A.js → index-DQdUr-_f.js} +4349 -4241
- package/dist/index.d.ts +3 -2
- package/dist/info-46DW6VJ7-D5JUpHK_.js +5 -0
- package/dist/infoDiagram-A4XQUW5V-D5IcjWQu.js +22 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/journeyDiagram-G5WM74LC-XHcEaxXL.js +810 -0
- package/dist/kanban-definition-QRCXZQQD-BFgu8zXi.js +718 -0
- package/dist/layout-Cycesmdu.js +1324 -0
- package/dist/linear-CjRkwbhR.js +423 -0
- package/dist/mermaid-parser.core-CL_REaxY.js +12479 -0
- package/dist/mermaid.core-gtllNrzr.js +14852 -0
- package/dist/mindmap-definition-GWI6TPTV-yPOhYeCo.js +3220 -0
- package/dist/ordinal-DfAQgscy.js +61 -0
- package/dist/packet-W2GHVCYJ-D1drjM5q.js +5 -0
- package/dist/pie-BEWT4RHE-B2xFs62T.js +5 -0
- package/dist/pieDiagram-YF2LJOPJ-Cnvx0DvF.js +162 -0
- package/dist/quadrantDiagram-OS5C2QUG-DBWy6UVd.js +1024 -0
- package/dist/{razor-Dl6rcHmj.js → razor-CeqqNtyB.js} +1 -1
- package/dist/requirementDiagram-MIRIMTAZ-CfHcsBsO.js +768 -0
- package/dist/sankeyDiagram-Y46BX6SQ-C_60tCtv.js +805 -0
- package/dist/sass-eCUyDs9S.js +6 -0
- package/dist/scala-Cly-fENF.js +6 -0
- package/dist/sequenceDiagram-G6AWOVSC-XvgYpHvJ.js +2274 -0
- package/dist/stateDiagram-MAYHULR4-Bx48BKG3.js +268 -0
- package/dist/stateDiagram-v2-4JROLMXI-pDuBzVSZ.js +14 -0
- package/dist/swift-BAWqNR8A.js +6 -0
- package/dist/timeline-definition-U7ZMHBDA-EGhtku4S.js +804 -0
- package/dist/xychartDiagram-6QU3TZC5-B_OmutYz.js +1304 -0
- package/package.json +13 -12
- package/dist/sass-iCyS6eP9.js +0 -6
- package/dist/scala-BQHTnvwx.js +0 -6
- package/dist/swift-OL4r9IGP.js +0 -6
|
@@ -0,0 +1,810 @@
|
|
|
1
|
+
import { d as pt, f as gt, g as at, b as mt } from "./chunk-ASOPGD6M-CQjrO8hd.js";
|
|
2
|
+
import { _ as s, d as A, q as xt, r as kt, s as _t, g as bt, c as vt, b as wt, x as Tt, j as W, k as St } from "./mermaid.core-gtllNrzr.js";
|
|
3
|
+
import { d as tt } from "./arc-CpOtc53l.js";
|
|
4
|
+
var H = function() {
|
|
5
|
+
var t = /* @__PURE__ */ s(function(g, r, a, l) {
|
|
6
|
+
for (a = a || {}, l = g.length; l--; a[g[l]] = r) ;
|
|
7
|
+
return a;
|
|
8
|
+
}, "o"), e = [6, 8, 10, 11, 12, 14, 16, 17, 18], i = [1, 9], c = [1, 10], n = [1, 11], u = [1, 12], h = [1, 13], f = [1, 14], y = {
|
|
9
|
+
trace: /* @__PURE__ */ s(function() {
|
|
10
|
+
}, "trace"),
|
|
11
|
+
yy: {},
|
|
12
|
+
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 },
|
|
13
|
+
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" },
|
|
14
|
+
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]],
|
|
15
|
+
performAction: /* @__PURE__ */ s(function(r, a, l, d, p, o, S) {
|
|
16
|
+
var _ = o.length - 1;
|
|
17
|
+
switch (p) {
|
|
18
|
+
case 1:
|
|
19
|
+
return o[_ - 1];
|
|
20
|
+
case 2:
|
|
21
|
+
this.$ = [];
|
|
22
|
+
break;
|
|
23
|
+
case 3:
|
|
24
|
+
o[_ - 1].push(o[_]), this.$ = o[_ - 1];
|
|
25
|
+
break;
|
|
26
|
+
case 4:
|
|
27
|
+
case 5:
|
|
28
|
+
this.$ = o[_];
|
|
29
|
+
break;
|
|
30
|
+
case 6:
|
|
31
|
+
case 7:
|
|
32
|
+
this.$ = [];
|
|
33
|
+
break;
|
|
34
|
+
case 8:
|
|
35
|
+
d.setDiagramTitle(o[_].substr(6)), this.$ = o[_].substr(6);
|
|
36
|
+
break;
|
|
37
|
+
case 9:
|
|
38
|
+
this.$ = o[_].trim(), d.setAccTitle(this.$);
|
|
39
|
+
break;
|
|
40
|
+
case 10:
|
|
41
|
+
case 11:
|
|
42
|
+
this.$ = o[_].trim(), d.setAccDescription(this.$);
|
|
43
|
+
break;
|
|
44
|
+
case 12:
|
|
45
|
+
d.addSection(o[_].substr(8)), this.$ = o[_].substr(8);
|
|
46
|
+
break;
|
|
47
|
+
case 13:
|
|
48
|
+
d.addTask(o[_ - 1], o[_]), this.$ = "task";
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
}, "anonymous"),
|
|
52
|
+
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: i, 12: c, 14: n, 16: u, 17: h, 18: f }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 15, 11: i, 12: c, 14: n, 16: u, 17: h, 18: f }, 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])],
|
|
53
|
+
defaultActions: {},
|
|
54
|
+
parseError: /* @__PURE__ */ s(function(r, a) {
|
|
55
|
+
if (a.recoverable)
|
|
56
|
+
this.trace(r);
|
|
57
|
+
else {
|
|
58
|
+
var l = new Error(r);
|
|
59
|
+
throw l.hash = a, l;
|
|
60
|
+
}
|
|
61
|
+
}, "parseError"),
|
|
62
|
+
parse: /* @__PURE__ */ s(function(r) {
|
|
63
|
+
var a = this, l = [0], d = [], p = [null], o = [], S = this.table, _ = "", B = 0, J = 0, ut = 2, K = 1, dt = o.slice.call(arguments, 1), k = Object.create(this.lexer), E = { yy: {} };
|
|
64
|
+
for (var O in this.yy)
|
|
65
|
+
Object.prototype.hasOwnProperty.call(this.yy, O) && (E.yy[O] = this.yy[O]);
|
|
66
|
+
k.setInput(r, E.yy), E.yy.lexer = k, E.yy.parser = this, typeof k.yylloc > "u" && (k.yylloc = {});
|
|
67
|
+
var Y = k.yylloc;
|
|
68
|
+
o.push(Y);
|
|
69
|
+
var yt = k.options && k.options.ranges;
|
|
70
|
+
typeof E.yy.parseError == "function" ? this.parseError = E.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
71
|
+
function ft(v) {
|
|
72
|
+
l.length = l.length - 2 * v, p.length = p.length - v, o.length = o.length - v;
|
|
73
|
+
}
|
|
74
|
+
s(ft, "popStack");
|
|
75
|
+
function Q() {
|
|
76
|
+
var v;
|
|
77
|
+
return v = d.pop() || k.lex() || K, typeof v != "number" && (v instanceof Array && (d = v, v = d.pop()), v = a.symbols_[v] || v), v;
|
|
78
|
+
}
|
|
79
|
+
s(Q, "lex");
|
|
80
|
+
for (var b, P, w, q, C = {}, j, M, D, N; ; ) {
|
|
81
|
+
if (P = l[l.length - 1], this.defaultActions[P] ? w = this.defaultActions[P] : ((b === null || typeof b > "u") && (b = Q()), w = S[P] && S[P][b]), typeof w > "u" || !w.length || !w[0]) {
|
|
82
|
+
var G = "";
|
|
83
|
+
N = [];
|
|
84
|
+
for (j in S[P])
|
|
85
|
+
this.terminals_[j] && j > ut && N.push("'" + this.terminals_[j] + "'");
|
|
86
|
+
k.showPosition ? G = "Parse error on line " + (B + 1) + `:
|
|
87
|
+
` + k.showPosition() + `
|
|
88
|
+
Expecting ` + N.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : G = "Parse error on line " + (B + 1) + ": Unexpected " + (b == K ? "end of input" : "'" + (this.terminals_[b] || b) + "'"), this.parseError(G, {
|
|
89
|
+
text: k.match,
|
|
90
|
+
token: this.terminals_[b] || b,
|
|
91
|
+
line: k.yylineno,
|
|
92
|
+
loc: Y,
|
|
93
|
+
expected: N
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
if (w[0] instanceof Array && w.length > 1)
|
|
97
|
+
throw new Error("Parse Error: multiple actions possible at state: " + P + ", token: " + b);
|
|
98
|
+
switch (w[0]) {
|
|
99
|
+
case 1:
|
|
100
|
+
l.push(b), p.push(k.yytext), o.push(k.yylloc), l.push(w[1]), b = null, J = k.yyleng, _ = k.yytext, B = k.yylineno, Y = k.yylloc;
|
|
101
|
+
break;
|
|
102
|
+
case 2:
|
|
103
|
+
if (M = this.productions_[w[1]][1], C.$ = p[p.length - M], C._$ = {
|
|
104
|
+
first_line: o[o.length - (M || 1)].first_line,
|
|
105
|
+
last_line: o[o.length - 1].last_line,
|
|
106
|
+
first_column: o[o.length - (M || 1)].first_column,
|
|
107
|
+
last_column: o[o.length - 1].last_column
|
|
108
|
+
}, yt && (C._$.range = [
|
|
109
|
+
o[o.length - (M || 1)].range[0],
|
|
110
|
+
o[o.length - 1].range[1]
|
|
111
|
+
]), q = this.performAction.apply(C, [
|
|
112
|
+
_,
|
|
113
|
+
J,
|
|
114
|
+
B,
|
|
115
|
+
E.yy,
|
|
116
|
+
w[1],
|
|
117
|
+
p,
|
|
118
|
+
o
|
|
119
|
+
].concat(dt)), typeof q < "u")
|
|
120
|
+
return q;
|
|
121
|
+
M && (l = l.slice(0, -1 * M * 2), p = p.slice(0, -1 * M), o = o.slice(0, -1 * M)), l.push(this.productions_[w[1]][0]), p.push(C.$), o.push(C._$), D = S[l[l.length - 2]][l[l.length - 1]], l.push(D);
|
|
122
|
+
break;
|
|
123
|
+
case 3:
|
|
124
|
+
return !0;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return !0;
|
|
128
|
+
}, "parse")
|
|
129
|
+
}, x = /* @__PURE__ */ function() {
|
|
130
|
+
var g = {
|
|
131
|
+
EOF: 1,
|
|
132
|
+
parseError: /* @__PURE__ */ s(function(a, l) {
|
|
133
|
+
if (this.yy.parser)
|
|
134
|
+
this.yy.parser.parseError(a, l);
|
|
135
|
+
else
|
|
136
|
+
throw new Error(a);
|
|
137
|
+
}, "parseError"),
|
|
138
|
+
// resets the lexer, sets new input
|
|
139
|
+
setInput: /* @__PURE__ */ s(function(r, a) {
|
|
140
|
+
return this.yy = a || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
141
|
+
first_line: 1,
|
|
142
|
+
first_column: 0,
|
|
143
|
+
last_line: 1,
|
|
144
|
+
last_column: 0
|
|
145
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
146
|
+
}, "setInput"),
|
|
147
|
+
// consumes and returns one char from the input
|
|
148
|
+
input: /* @__PURE__ */ s(function() {
|
|
149
|
+
var r = this._input[0];
|
|
150
|
+
this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
|
|
151
|
+
var a = r.match(/(?:\r\n?|\n).*/g);
|
|
152
|
+
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), r;
|
|
153
|
+
}, "input"),
|
|
154
|
+
// unshifts one char (or a string) into the input
|
|
155
|
+
unput: /* @__PURE__ */ s(function(r) {
|
|
156
|
+
var a = r.length, l = r.split(/(?:\r\n?|\n)/g);
|
|
157
|
+
this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
|
|
158
|
+
var d = this.match.split(/(?:\r\n?|\n)/g);
|
|
159
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
|
|
160
|
+
var p = this.yylloc.range;
|
|
161
|
+
return this.yylloc = {
|
|
162
|
+
first_line: this.yylloc.first_line,
|
|
163
|
+
last_line: this.yylineno + 1,
|
|
164
|
+
first_column: this.yylloc.first_column,
|
|
165
|
+
last_column: l ? (l.length === d.length ? this.yylloc.first_column : 0) + d[d.length - l.length].length - l[0].length : this.yylloc.first_column - a
|
|
166
|
+
}, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
|
|
167
|
+
}, "unput"),
|
|
168
|
+
// When called from action, caches matched text and appends it on next action
|
|
169
|
+
more: /* @__PURE__ */ s(function() {
|
|
170
|
+
return this._more = !0, this;
|
|
171
|
+
}, "more"),
|
|
172
|
+
// 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.
|
|
173
|
+
reject: /* @__PURE__ */ s(function() {
|
|
174
|
+
if (this.options.backtrack_lexer)
|
|
175
|
+
this._backtrack = !0;
|
|
176
|
+
else
|
|
177
|
+
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).
|
|
178
|
+
` + this.showPosition(), {
|
|
179
|
+
text: "",
|
|
180
|
+
token: null,
|
|
181
|
+
line: this.yylineno
|
|
182
|
+
});
|
|
183
|
+
return this;
|
|
184
|
+
}, "reject"),
|
|
185
|
+
// retain first n characters of the match
|
|
186
|
+
less: /* @__PURE__ */ s(function(r) {
|
|
187
|
+
this.unput(this.match.slice(r));
|
|
188
|
+
}, "less"),
|
|
189
|
+
// displays already matched input, i.e. for error messages
|
|
190
|
+
pastInput: /* @__PURE__ */ s(function() {
|
|
191
|
+
var r = this.matched.substr(0, this.matched.length - this.match.length);
|
|
192
|
+
return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
|
|
193
|
+
}, "pastInput"),
|
|
194
|
+
// displays upcoming input, i.e. for error messages
|
|
195
|
+
upcomingInput: /* @__PURE__ */ s(function() {
|
|
196
|
+
var r = this.match;
|
|
197
|
+
return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
198
|
+
}, "upcomingInput"),
|
|
199
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
200
|
+
showPosition: /* @__PURE__ */ s(function() {
|
|
201
|
+
var r = this.pastInput(), a = new Array(r.length + 1).join("-");
|
|
202
|
+
return r + this.upcomingInput() + `
|
|
203
|
+
` + a + "^";
|
|
204
|
+
}, "showPosition"),
|
|
205
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
206
|
+
test_match: /* @__PURE__ */ s(function(r, a) {
|
|
207
|
+
var l, d, p;
|
|
208
|
+
if (this.options.backtrack_lexer && (p = {
|
|
209
|
+
yylineno: this.yylineno,
|
|
210
|
+
yylloc: {
|
|
211
|
+
first_line: this.yylloc.first_line,
|
|
212
|
+
last_line: this.last_line,
|
|
213
|
+
first_column: this.yylloc.first_column,
|
|
214
|
+
last_column: this.yylloc.last_column
|
|
215
|
+
},
|
|
216
|
+
yytext: this.yytext,
|
|
217
|
+
match: this.match,
|
|
218
|
+
matches: this.matches,
|
|
219
|
+
matched: this.matched,
|
|
220
|
+
yyleng: this.yyleng,
|
|
221
|
+
offset: this.offset,
|
|
222
|
+
_more: this._more,
|
|
223
|
+
_input: this._input,
|
|
224
|
+
yy: this.yy,
|
|
225
|
+
conditionStack: this.conditionStack.slice(0),
|
|
226
|
+
done: this.done
|
|
227
|
+
}, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), d = r[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
|
|
228
|
+
first_line: this.yylloc.last_line,
|
|
229
|
+
last_line: this.yylineno + 1,
|
|
230
|
+
first_column: this.yylloc.last_column,
|
|
231
|
+
last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
|
|
232
|
+
}, this.yytext += r[0], this.match += r[0], this.matches = r, 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(r[0].length), this.matched += r[0], l = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
|
|
233
|
+
return l;
|
|
234
|
+
if (this._backtrack) {
|
|
235
|
+
for (var o in p)
|
|
236
|
+
this[o] = p[o];
|
|
237
|
+
return !1;
|
|
238
|
+
}
|
|
239
|
+
return !1;
|
|
240
|
+
}, "test_match"),
|
|
241
|
+
// return next match in input
|
|
242
|
+
next: /* @__PURE__ */ s(function() {
|
|
243
|
+
if (this.done)
|
|
244
|
+
return this.EOF;
|
|
245
|
+
this._input || (this.done = !0);
|
|
246
|
+
var r, a, l, d;
|
|
247
|
+
this._more || (this.yytext = "", this.match = "");
|
|
248
|
+
for (var p = this._currentRules(), o = 0; o < p.length; o++)
|
|
249
|
+
if (l = this._input.match(this.rules[p[o]]), l && (!a || l[0].length > a[0].length)) {
|
|
250
|
+
if (a = l, d = o, this.options.backtrack_lexer) {
|
|
251
|
+
if (r = this.test_match(l, p[o]), r !== !1)
|
|
252
|
+
return r;
|
|
253
|
+
if (this._backtrack) {
|
|
254
|
+
a = !1;
|
|
255
|
+
continue;
|
|
256
|
+
} else
|
|
257
|
+
return !1;
|
|
258
|
+
} else if (!this.options.flex)
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
return a ? (r = this.test_match(a, p[d]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
262
|
+
` + this.showPosition(), {
|
|
263
|
+
text: "",
|
|
264
|
+
token: null,
|
|
265
|
+
line: this.yylineno
|
|
266
|
+
});
|
|
267
|
+
}, "next"),
|
|
268
|
+
// return next match that has a token
|
|
269
|
+
lex: /* @__PURE__ */ s(function() {
|
|
270
|
+
var a = this.next();
|
|
271
|
+
return a || this.lex();
|
|
272
|
+
}, "lex"),
|
|
273
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
274
|
+
begin: /* @__PURE__ */ s(function(a) {
|
|
275
|
+
this.conditionStack.push(a);
|
|
276
|
+
}, "begin"),
|
|
277
|
+
// pop the previously active lexer condition state off the condition stack
|
|
278
|
+
popState: /* @__PURE__ */ s(function() {
|
|
279
|
+
var a = this.conditionStack.length - 1;
|
|
280
|
+
return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
281
|
+
}, "popState"),
|
|
282
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
283
|
+
_currentRules: /* @__PURE__ */ s(function() {
|
|
284
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
285
|
+
}, "_currentRules"),
|
|
286
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
287
|
+
topState: /* @__PURE__ */ s(function(a) {
|
|
288
|
+
return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
|
|
289
|
+
}, "topState"),
|
|
290
|
+
// alias for begin(condition)
|
|
291
|
+
pushState: /* @__PURE__ */ s(function(a) {
|
|
292
|
+
this.begin(a);
|
|
293
|
+
}, "pushState"),
|
|
294
|
+
// return the number of states currently on the stack
|
|
295
|
+
stateStackSize: /* @__PURE__ */ s(function() {
|
|
296
|
+
return this.conditionStack.length;
|
|
297
|
+
}, "stateStackSize"),
|
|
298
|
+
options: { "case-insensitive": !0 },
|
|
299
|
+
performAction: /* @__PURE__ */ s(function(a, l, d, p) {
|
|
300
|
+
switch (d) {
|
|
301
|
+
case 0:
|
|
302
|
+
break;
|
|
303
|
+
case 1:
|
|
304
|
+
break;
|
|
305
|
+
case 2:
|
|
306
|
+
return 10;
|
|
307
|
+
case 3:
|
|
308
|
+
break;
|
|
309
|
+
case 4:
|
|
310
|
+
break;
|
|
311
|
+
case 5:
|
|
312
|
+
return 4;
|
|
313
|
+
case 6:
|
|
314
|
+
return 11;
|
|
315
|
+
case 7:
|
|
316
|
+
return this.begin("acc_title"), 12;
|
|
317
|
+
case 8:
|
|
318
|
+
return this.popState(), "acc_title_value";
|
|
319
|
+
case 9:
|
|
320
|
+
return this.begin("acc_descr"), 14;
|
|
321
|
+
case 10:
|
|
322
|
+
return this.popState(), "acc_descr_value";
|
|
323
|
+
case 11:
|
|
324
|
+
this.begin("acc_descr_multiline");
|
|
325
|
+
break;
|
|
326
|
+
case 12:
|
|
327
|
+
this.popState();
|
|
328
|
+
break;
|
|
329
|
+
case 13:
|
|
330
|
+
return "acc_descr_multiline_value";
|
|
331
|
+
case 14:
|
|
332
|
+
return 17;
|
|
333
|
+
case 15:
|
|
334
|
+
return 18;
|
|
335
|
+
case 16:
|
|
336
|
+
return 19;
|
|
337
|
+
case 17:
|
|
338
|
+
return ":";
|
|
339
|
+
case 18:
|
|
340
|
+
return 6;
|
|
341
|
+
case 19:
|
|
342
|
+
return "INVALID";
|
|
343
|
+
}
|
|
344
|
+
}, "anonymous"),
|
|
345
|
+
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],
|
|
346
|
+
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 } }
|
|
347
|
+
};
|
|
348
|
+
return g;
|
|
349
|
+
}();
|
|
350
|
+
y.lexer = x;
|
|
351
|
+
function m() {
|
|
352
|
+
this.yy = {};
|
|
353
|
+
}
|
|
354
|
+
return s(m, "Parser"), m.prototype = y, y.Parser = m, new m();
|
|
355
|
+
}();
|
|
356
|
+
H.parser = H;
|
|
357
|
+
var Mt = H, V = "", U = [], R = [], F = [], $t = /* @__PURE__ */ s(function() {
|
|
358
|
+
U.length = 0, R.length = 0, V = "", F.length = 0, Tt();
|
|
359
|
+
}, "clear"), Et = /* @__PURE__ */ s(function(t) {
|
|
360
|
+
V = t, U.push(t);
|
|
361
|
+
}, "addSection"), Pt = /* @__PURE__ */ s(function() {
|
|
362
|
+
return U;
|
|
363
|
+
}, "getSections"), It = /* @__PURE__ */ s(function() {
|
|
364
|
+
let t = et();
|
|
365
|
+
const e = 100;
|
|
366
|
+
let i = 0;
|
|
367
|
+
for (; !t && i < e; )
|
|
368
|
+
t = et(), i++;
|
|
369
|
+
return R.push(...F), R;
|
|
370
|
+
}, "getTasks"), At = /* @__PURE__ */ s(function() {
|
|
371
|
+
const t = [];
|
|
372
|
+
return R.forEach((i) => {
|
|
373
|
+
i.people && t.push(...i.people);
|
|
374
|
+
}), [...new Set(t)].sort();
|
|
375
|
+
}, "updateActors"), Ct = /* @__PURE__ */ s(function(t, e) {
|
|
376
|
+
const i = e.substr(1).split(":");
|
|
377
|
+
let c = 0, n = [];
|
|
378
|
+
i.length === 1 ? (c = Number(i[0]), n = []) : (c = Number(i[0]), n = i[1].split(","));
|
|
379
|
+
const u = n.map((f) => f.trim()), h = {
|
|
380
|
+
section: V,
|
|
381
|
+
type: V,
|
|
382
|
+
people: u,
|
|
383
|
+
task: t,
|
|
384
|
+
score: c
|
|
385
|
+
};
|
|
386
|
+
F.push(h);
|
|
387
|
+
}, "addTask"), Vt = /* @__PURE__ */ s(function(t) {
|
|
388
|
+
const e = {
|
|
389
|
+
section: V,
|
|
390
|
+
type: V,
|
|
391
|
+
description: t,
|
|
392
|
+
task: t,
|
|
393
|
+
classes: []
|
|
394
|
+
};
|
|
395
|
+
R.push(e);
|
|
396
|
+
}, "addTaskOrg"), et = /* @__PURE__ */ s(function() {
|
|
397
|
+
const t = /* @__PURE__ */ s(function(i) {
|
|
398
|
+
return F[i].processed;
|
|
399
|
+
}, "compileTask");
|
|
400
|
+
let e = !0;
|
|
401
|
+
for (const [i, c] of F.entries())
|
|
402
|
+
t(i), e = e && c.processed;
|
|
403
|
+
return e;
|
|
404
|
+
}, "compileTasks"), Rt = /* @__PURE__ */ s(function() {
|
|
405
|
+
return At();
|
|
406
|
+
}, "getActors"), rt = {
|
|
407
|
+
getConfig: /* @__PURE__ */ s(() => A().journey, "getConfig"),
|
|
408
|
+
clear: $t,
|
|
409
|
+
setDiagramTitle: xt,
|
|
410
|
+
getDiagramTitle: kt,
|
|
411
|
+
setAccTitle: _t,
|
|
412
|
+
getAccTitle: bt,
|
|
413
|
+
setAccDescription: vt,
|
|
414
|
+
getAccDescription: wt,
|
|
415
|
+
addSection: Et,
|
|
416
|
+
getSections: Pt,
|
|
417
|
+
getTasks: It,
|
|
418
|
+
addTask: Ct,
|
|
419
|
+
addTaskOrg: Vt,
|
|
420
|
+
getActors: Rt
|
|
421
|
+
}, Ft = /* @__PURE__ */ s((t) => `.label {
|
|
422
|
+
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
423
|
+
font-family: var(--mermaid-font-family);
|
|
424
|
+
color: ${t.textColor};
|
|
425
|
+
}
|
|
426
|
+
.mouth {
|
|
427
|
+
stroke: #666;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
line {
|
|
431
|
+
stroke: ${t.textColor}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.legend {
|
|
435
|
+
fill: ${t.textColor};
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.label text {
|
|
439
|
+
fill: #333;
|
|
440
|
+
}
|
|
441
|
+
.label {
|
|
442
|
+
color: ${t.textColor}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.face {
|
|
446
|
+
${t.faceColor ? `fill: ${t.faceColor}` : "fill: #FFF8DC"};
|
|
447
|
+
stroke: #999;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.node rect,
|
|
451
|
+
.node circle,
|
|
452
|
+
.node ellipse,
|
|
453
|
+
.node polygon,
|
|
454
|
+
.node path {
|
|
455
|
+
fill: ${t.mainBkg};
|
|
456
|
+
stroke: ${t.nodeBorder};
|
|
457
|
+
stroke-width: 1px;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.node .label {
|
|
461
|
+
text-align: center;
|
|
462
|
+
}
|
|
463
|
+
.node.clickable {
|
|
464
|
+
cursor: pointer;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.arrowheadPath {
|
|
468
|
+
fill: ${t.arrowheadColor};
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.edgePath .path {
|
|
472
|
+
stroke: ${t.lineColor};
|
|
473
|
+
stroke-width: 1.5px;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.flowchart-link {
|
|
477
|
+
stroke: ${t.lineColor};
|
|
478
|
+
fill: none;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.edgeLabel {
|
|
482
|
+
background-color: ${t.edgeLabelBackground};
|
|
483
|
+
rect {
|
|
484
|
+
opacity: 0.5;
|
|
485
|
+
}
|
|
486
|
+
text-align: center;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.cluster rect {
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.cluster text {
|
|
493
|
+
fill: ${t.titleColor};
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
div.mermaidTooltip {
|
|
497
|
+
position: absolute;
|
|
498
|
+
text-align: center;
|
|
499
|
+
max-width: 200px;
|
|
500
|
+
padding: 2px;
|
|
501
|
+
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
502
|
+
font-family: var(--mermaid-font-family);
|
|
503
|
+
font-size: 12px;
|
|
504
|
+
background: ${t.tertiaryColor};
|
|
505
|
+
border: 1px solid ${t.border2};
|
|
506
|
+
border-radius: 2px;
|
|
507
|
+
pointer-events: none;
|
|
508
|
+
z-index: 100;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.task-type-0, .section-type-0 {
|
|
512
|
+
${t.fillType0 ? `fill: ${t.fillType0}` : ""};
|
|
513
|
+
}
|
|
514
|
+
.task-type-1, .section-type-1 {
|
|
515
|
+
${t.fillType0 ? `fill: ${t.fillType1}` : ""};
|
|
516
|
+
}
|
|
517
|
+
.task-type-2, .section-type-2 {
|
|
518
|
+
${t.fillType0 ? `fill: ${t.fillType2}` : ""};
|
|
519
|
+
}
|
|
520
|
+
.task-type-3, .section-type-3 {
|
|
521
|
+
${t.fillType0 ? `fill: ${t.fillType3}` : ""};
|
|
522
|
+
}
|
|
523
|
+
.task-type-4, .section-type-4 {
|
|
524
|
+
${t.fillType0 ? `fill: ${t.fillType4}` : ""};
|
|
525
|
+
}
|
|
526
|
+
.task-type-5, .section-type-5 {
|
|
527
|
+
${t.fillType0 ? `fill: ${t.fillType5}` : ""};
|
|
528
|
+
}
|
|
529
|
+
.task-type-6, .section-type-6 {
|
|
530
|
+
${t.fillType0 ? `fill: ${t.fillType6}` : ""};
|
|
531
|
+
}
|
|
532
|
+
.task-type-7, .section-type-7 {
|
|
533
|
+
${t.fillType0 ? `fill: ${t.fillType7}` : ""};
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.actor-0 {
|
|
537
|
+
${t.actor0 ? `fill: ${t.actor0}` : ""};
|
|
538
|
+
}
|
|
539
|
+
.actor-1 {
|
|
540
|
+
${t.actor1 ? `fill: ${t.actor1}` : ""};
|
|
541
|
+
}
|
|
542
|
+
.actor-2 {
|
|
543
|
+
${t.actor2 ? `fill: ${t.actor2}` : ""};
|
|
544
|
+
}
|
|
545
|
+
.actor-3 {
|
|
546
|
+
${t.actor3 ? `fill: ${t.actor3}` : ""};
|
|
547
|
+
}
|
|
548
|
+
.actor-4 {
|
|
549
|
+
${t.actor4 ? `fill: ${t.actor4}` : ""};
|
|
550
|
+
}
|
|
551
|
+
.actor-5 {
|
|
552
|
+
${t.actor5 ? `fill: ${t.actor5}` : ""};
|
|
553
|
+
}
|
|
554
|
+
`, "getStyles"), Lt = Ft, Z = /* @__PURE__ */ s(function(t, e) {
|
|
555
|
+
return pt(t, e);
|
|
556
|
+
}, "drawRect"), Bt = /* @__PURE__ */ s(function(t, e) {
|
|
557
|
+
const c = t.append("circle").attr("cx", e.cx).attr("cy", e.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), n = t.append("g");
|
|
558
|
+
n.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"), n.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");
|
|
559
|
+
function u(y) {
|
|
560
|
+
const x = tt().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
|
|
561
|
+
y.append("path").attr("class", "mouth").attr("d", x).attr("transform", "translate(" + e.cx + "," + (e.cy + 2) + ")");
|
|
562
|
+
}
|
|
563
|
+
s(u, "smile");
|
|
564
|
+
function h(y) {
|
|
565
|
+
const x = tt().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
|
|
566
|
+
y.append("path").attr("class", "mouth").attr("d", x).attr("transform", "translate(" + e.cx + "," + (e.cy + 7) + ")");
|
|
567
|
+
}
|
|
568
|
+
s(h, "sad");
|
|
569
|
+
function f(y) {
|
|
570
|
+
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");
|
|
571
|
+
}
|
|
572
|
+
return s(f, "ambivalent"), e.score > 3 ? u(n) : e.score < 3 ? h(n) : f(n), c;
|
|
573
|
+
}, "drawFace"), lt = /* @__PURE__ */ s(function(t, e) {
|
|
574
|
+
const i = t.append("circle");
|
|
575
|
+
return i.attr("cx", e.cx), i.attr("cy", e.cy), i.attr("class", "actor-" + e.pos), i.attr("fill", e.fill), i.attr("stroke", e.stroke), i.attr("r", e.r), i.class !== void 0 && i.attr("class", i.class), e.title !== void 0 && i.append("title").text(e.title), i;
|
|
576
|
+
}, "drawCircle"), ot = /* @__PURE__ */ s(function(t, e) {
|
|
577
|
+
return gt(t, e);
|
|
578
|
+
}, "drawText"), jt = /* @__PURE__ */ s(function(t, e) {
|
|
579
|
+
function i(n, u, h, f, y) {
|
|
580
|
+
return n + "," + u + " " + (n + h) + "," + u + " " + (n + h) + "," + (u + f - y) + " " + (n + h - y * 1.2) + "," + (u + f) + " " + n + "," + (u + f);
|
|
581
|
+
}
|
|
582
|
+
s(i, "genPoints");
|
|
583
|
+
const c = t.append("polygon");
|
|
584
|
+
c.attr("points", i(e.x, e.y, 50, 20, 7)), c.attr("class", "labelBox"), e.y = e.y + e.labelMargin, e.x = e.x + 0.5 * e.labelMargin, ot(t, e);
|
|
585
|
+
}, "drawLabel"), Nt = /* @__PURE__ */ s(function(t, e, i) {
|
|
586
|
+
const c = t.append("g"), n = at();
|
|
587
|
+
n.x = e.x, n.y = e.y, n.fill = e.fill, n.width = i.width * e.taskCount + // width of the tasks
|
|
588
|
+
i.diagramMarginX * (e.taskCount - 1), n.height = i.height, n.class = "journey-section section-type-" + e.num, n.rx = 3, n.ry = 3, Z(c, n), ct(i)(
|
|
589
|
+
e.text,
|
|
590
|
+
c,
|
|
591
|
+
n.x,
|
|
592
|
+
n.y,
|
|
593
|
+
n.width,
|
|
594
|
+
n.height,
|
|
595
|
+
{ class: "journey-section section-type-" + e.num },
|
|
596
|
+
i,
|
|
597
|
+
e.colour
|
|
598
|
+
);
|
|
599
|
+
}, "drawSection"), nt = -1, zt = /* @__PURE__ */ s(function(t, e, i) {
|
|
600
|
+
const c = e.x + i.width / 2, n = t.append("g");
|
|
601
|
+
nt++;
|
|
602
|
+
const u = 300 + 5 * 30;
|
|
603
|
+
n.append("line").attr("id", "task" + nt).attr("x1", c).attr("y1", e.y).attr("x2", c).attr("y2", u).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Bt(n, {
|
|
604
|
+
cx: c,
|
|
605
|
+
cy: 300 + (5 - e.score) * 30,
|
|
606
|
+
score: e.score
|
|
607
|
+
});
|
|
608
|
+
const h = at();
|
|
609
|
+
h.x = e.x, h.y = e.y, h.fill = e.fill, h.width = i.width, h.height = i.height, h.class = "task task-type-" + e.num, h.rx = 3, h.ry = 3, Z(n, h);
|
|
610
|
+
let f = e.x + 14;
|
|
611
|
+
e.people.forEach((y) => {
|
|
612
|
+
const x = e.actors[y].color, m = {
|
|
613
|
+
cx: f,
|
|
614
|
+
cy: e.y,
|
|
615
|
+
r: 7,
|
|
616
|
+
fill: x,
|
|
617
|
+
stroke: "#000",
|
|
618
|
+
title: y,
|
|
619
|
+
pos: e.actors[y].position
|
|
620
|
+
};
|
|
621
|
+
lt(n, m), f += 10;
|
|
622
|
+
}), ct(i)(
|
|
623
|
+
e.task,
|
|
624
|
+
n,
|
|
625
|
+
h.x,
|
|
626
|
+
h.y,
|
|
627
|
+
h.width,
|
|
628
|
+
h.height,
|
|
629
|
+
{ class: "task" },
|
|
630
|
+
i,
|
|
631
|
+
e.colour
|
|
632
|
+
);
|
|
633
|
+
}, "drawTask"), Ot = /* @__PURE__ */ s(function(t, e) {
|
|
634
|
+
mt(t, e);
|
|
635
|
+
}, "drawBackgroundRect"), ct = /* @__PURE__ */ function() {
|
|
636
|
+
function t(n, u, h, f, y, x, m, g) {
|
|
637
|
+
const r = u.append("text").attr("x", h + y / 2).attr("y", f + x / 2 + 5).style("font-color", g).style("text-anchor", "middle").text(n);
|
|
638
|
+
c(r, m);
|
|
639
|
+
}
|
|
640
|
+
s(t, "byText");
|
|
641
|
+
function e(n, u, h, f, y, x, m, g, r) {
|
|
642
|
+
const { taskFontSize: a, taskFontFamily: l } = g, d = n.split(/<br\s*\/?>/gi);
|
|
643
|
+
for (let p = 0; p < d.length; p++) {
|
|
644
|
+
const o = p * a - a * (d.length - 1) / 2, S = u.append("text").attr("x", h + y / 2).attr("y", f).attr("fill", r).style("text-anchor", "middle").style("font-size", a).style("font-family", l);
|
|
645
|
+
S.append("tspan").attr("x", h + y / 2).attr("dy", o).text(d[p]), S.attr("y", f + x / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), c(S, m);
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
s(e, "byTspan");
|
|
649
|
+
function i(n, u, h, f, y, x, m, g) {
|
|
650
|
+
const r = u.append("switch"), l = r.append("foreignObject").attr("x", h).attr("y", f).attr("width", y).attr("height", x).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
651
|
+
l.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(n), e(n, r, h, f, y, x, m, g), c(l, m);
|
|
652
|
+
}
|
|
653
|
+
s(i, "byFo");
|
|
654
|
+
function c(n, u) {
|
|
655
|
+
for (const h in u)
|
|
656
|
+
h in u && n.attr(h, u[h]);
|
|
657
|
+
}
|
|
658
|
+
return s(c, "_setTextAttrs"), function(n) {
|
|
659
|
+
return n.textPlacement === "fo" ? i : n.textPlacement === "old" ? t : e;
|
|
660
|
+
};
|
|
661
|
+
}(), Yt = /* @__PURE__ */ s(function(t) {
|
|
662
|
+
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");
|
|
663
|
+
}, "initGraphics"), L = {
|
|
664
|
+
drawRect: Z,
|
|
665
|
+
drawCircle: lt,
|
|
666
|
+
drawSection: Nt,
|
|
667
|
+
drawText: ot,
|
|
668
|
+
drawLabel: jt,
|
|
669
|
+
drawTask: zt,
|
|
670
|
+
drawBackgroundRect: Ot,
|
|
671
|
+
initGraphics: Yt
|
|
672
|
+
}, qt = /* @__PURE__ */ s(function(t) {
|
|
673
|
+
Object.keys(t).forEach(function(i) {
|
|
674
|
+
z[i] = t[i];
|
|
675
|
+
});
|
|
676
|
+
}, "setConf"), $ = {};
|
|
677
|
+
function ht(t) {
|
|
678
|
+
const e = A().journey;
|
|
679
|
+
let i = 60;
|
|
680
|
+
Object.keys($).forEach((c) => {
|
|
681
|
+
const n = $[c].color, u = {
|
|
682
|
+
cx: 20,
|
|
683
|
+
cy: i,
|
|
684
|
+
r: 7,
|
|
685
|
+
fill: n,
|
|
686
|
+
stroke: "#000",
|
|
687
|
+
pos: $[c].position
|
|
688
|
+
};
|
|
689
|
+
L.drawCircle(t, u);
|
|
690
|
+
const h = {
|
|
691
|
+
x: 40,
|
|
692
|
+
y: i + 7,
|
|
693
|
+
fill: "#666",
|
|
694
|
+
text: c,
|
|
695
|
+
textMargin: e.boxTextMargin | 5
|
|
696
|
+
};
|
|
697
|
+
L.drawText(t, h), i += 20;
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
s(ht, "drawActorLegend");
|
|
701
|
+
var z = A().journey, I = z.leftMargin, Gt = /* @__PURE__ */ s(function(t, e, i, c) {
|
|
702
|
+
const n = A().journey, u = A().securityLevel;
|
|
703
|
+
let h;
|
|
704
|
+
u === "sandbox" && (h = W("#i" + e));
|
|
705
|
+
const f = u === "sandbox" ? W(h.nodes()[0].contentDocument.body) : W("body");
|
|
706
|
+
T.init();
|
|
707
|
+
const y = f.select("#" + e);
|
|
708
|
+
L.initGraphics(y);
|
|
709
|
+
const x = c.db.getTasks(), m = c.db.getDiagramTitle(), g = c.db.getActors();
|
|
710
|
+
for (const o in $)
|
|
711
|
+
delete $[o];
|
|
712
|
+
let r = 0;
|
|
713
|
+
g.forEach((o) => {
|
|
714
|
+
$[o] = {
|
|
715
|
+
color: n.actorColours[r % n.actorColours.length],
|
|
716
|
+
position: r
|
|
717
|
+
}, r++;
|
|
718
|
+
}), ht(y), T.insert(0, 0, I, Object.keys($).length * 50), Wt(y, x, 0);
|
|
719
|
+
const a = T.getBounds();
|
|
720
|
+
m && y.append("text").text(m).attr("x", I).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
|
|
721
|
+
const l = a.stopy - a.starty + 2 * n.diagramMarginY, d = I + a.stopx + 2 * n.diagramMarginX;
|
|
722
|
+
St(y, l, d, n.useMaxWidth), y.append("line").attr("x1", I).attr("y1", n.height * 4).attr("x2", d - I - 4).attr("y2", n.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
|
|
723
|
+
const p = m ? 70 : 0;
|
|
724
|
+
y.attr("viewBox", `${a.startx} -25 ${d} ${l + p}`), y.attr("preserveAspectRatio", "xMinYMin meet"), y.attr("height", l + p + 25);
|
|
725
|
+
}, "draw"), T = {
|
|
726
|
+
data: {
|
|
727
|
+
startx: void 0,
|
|
728
|
+
stopx: void 0,
|
|
729
|
+
starty: void 0,
|
|
730
|
+
stopy: void 0
|
|
731
|
+
},
|
|
732
|
+
verticalPos: 0,
|
|
733
|
+
sequenceItems: [],
|
|
734
|
+
init: /* @__PURE__ */ s(function() {
|
|
735
|
+
this.sequenceItems = [], this.data = {
|
|
736
|
+
startx: void 0,
|
|
737
|
+
stopx: void 0,
|
|
738
|
+
starty: void 0,
|
|
739
|
+
stopy: void 0
|
|
740
|
+
}, this.verticalPos = 0;
|
|
741
|
+
}, "init"),
|
|
742
|
+
updateVal: /* @__PURE__ */ s(function(t, e, i, c) {
|
|
743
|
+
t[e] === void 0 ? t[e] = i : t[e] = c(i, t[e]);
|
|
744
|
+
}, "updateVal"),
|
|
745
|
+
updateBounds: /* @__PURE__ */ s(function(t, e, i, c) {
|
|
746
|
+
const n = A().journey, u = this;
|
|
747
|
+
let h = 0;
|
|
748
|
+
function f(y) {
|
|
749
|
+
return /* @__PURE__ */ s(function(m) {
|
|
750
|
+
h++;
|
|
751
|
+
const g = u.sequenceItems.length - h + 1;
|
|
752
|
+
u.updateVal(m, "starty", e - g * n.boxMargin, Math.min), u.updateVal(m, "stopy", c + g * n.boxMargin, Math.max), u.updateVal(T.data, "startx", t - g * n.boxMargin, Math.min), u.updateVal(T.data, "stopx", i + g * n.boxMargin, Math.max), y !== "activation" && (u.updateVal(m, "startx", t - g * n.boxMargin, Math.min), u.updateVal(m, "stopx", i + g * n.boxMargin, Math.max), u.updateVal(T.data, "starty", e - g * n.boxMargin, Math.min), u.updateVal(T.data, "stopy", c + g * n.boxMargin, Math.max));
|
|
753
|
+
}, "updateItemBounds");
|
|
754
|
+
}
|
|
755
|
+
s(f, "updateFn"), this.sequenceItems.forEach(f());
|
|
756
|
+
}, "updateBounds"),
|
|
757
|
+
insert: /* @__PURE__ */ s(function(t, e, i, c) {
|
|
758
|
+
const n = Math.min(t, i), u = Math.max(t, i), h = Math.min(e, c), f = Math.max(e, c);
|
|
759
|
+
this.updateVal(T.data, "startx", n, Math.min), this.updateVal(T.data, "starty", h, Math.min), this.updateVal(T.data, "stopx", u, Math.max), this.updateVal(T.data, "stopy", f, Math.max), this.updateBounds(n, h, u, f);
|
|
760
|
+
}, "insert"),
|
|
761
|
+
bumpVerticalPos: /* @__PURE__ */ s(function(t) {
|
|
762
|
+
this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
|
|
763
|
+
}, "bumpVerticalPos"),
|
|
764
|
+
getVerticalPos: /* @__PURE__ */ s(function() {
|
|
765
|
+
return this.verticalPos;
|
|
766
|
+
}, "getVerticalPos"),
|
|
767
|
+
getBounds: /* @__PURE__ */ s(function() {
|
|
768
|
+
return this.data;
|
|
769
|
+
}, "getBounds")
|
|
770
|
+
}, X = z.sectionFills, st = z.sectionColours, Wt = /* @__PURE__ */ s(function(t, e, i) {
|
|
771
|
+
const c = A().journey;
|
|
772
|
+
let n = "";
|
|
773
|
+
const u = c.height * 2 + c.diagramMarginY, h = i + u;
|
|
774
|
+
let f = 0, y = "#CCC", x = "black", m = 0;
|
|
775
|
+
for (const [g, r] of e.entries()) {
|
|
776
|
+
if (n !== r.section) {
|
|
777
|
+
y = X[f % X.length], m = f % X.length, x = st[f % st.length];
|
|
778
|
+
let l = 0;
|
|
779
|
+
const d = r.section;
|
|
780
|
+
for (let o = g; o < e.length && e[o].section == d; o++)
|
|
781
|
+
l = l + 1;
|
|
782
|
+
const p = {
|
|
783
|
+
x: g * c.taskMargin + g * c.width + I,
|
|
784
|
+
y: 50,
|
|
785
|
+
text: r.section,
|
|
786
|
+
fill: y,
|
|
787
|
+
num: m,
|
|
788
|
+
colour: x,
|
|
789
|
+
taskCount: l
|
|
790
|
+
};
|
|
791
|
+
L.drawSection(t, p, c), n = r.section, f++;
|
|
792
|
+
}
|
|
793
|
+
const a = r.people.reduce((l, d) => ($[d] && (l[d] = $[d]), l), {});
|
|
794
|
+
r.x = g * c.taskMargin + g * c.width + I, r.y = h, r.width = c.diagramMarginX, r.height = c.diagramMarginY, r.colour = x, r.fill = y, r.num = m, r.actors = a, L.drawTask(t, r, c), T.insert(r.x, r.y, r.x + r.width + c.taskMargin, 300 + 5 * 30);
|
|
795
|
+
}
|
|
796
|
+
}, "drawTasks"), it = {
|
|
797
|
+
setConf: qt,
|
|
798
|
+
draw: Gt
|
|
799
|
+
}, Zt = {
|
|
800
|
+
parser: Mt,
|
|
801
|
+
db: rt,
|
|
802
|
+
renderer: it,
|
|
803
|
+
styles: Lt,
|
|
804
|
+
init: /* @__PURE__ */ s((t) => {
|
|
805
|
+
it.setConf(t.journey), rt.clear();
|
|
806
|
+
}, "init")
|
|
807
|
+
};
|
|
808
|
+
export {
|
|
809
|
+
Zt as diagram
|
|
810
|
+
};
|