@altimateai/ui-components 0.0.58-beta.1 → 0.0.59
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/CoachForm.js +23701 -37056
- package/dist/Stack.js +7 -7
- package/dist/Switch.js +1 -1
- package/dist/TagsInput.js +493 -495
- package/dist/_basePickBy.js +151 -0
- package/dist/_baseUniq.js +615 -0
- package/dist/arc.js +83 -0
- package/dist/architecture-U656AL7Q.js +5 -0
- package/dist/architectureDiagram-VXUJARFQ.js +4666 -0
- package/dist/assets/icons/index.js +1 -1
- package/dist/blockDiagram-VD42YOAC.js +2266 -0
- package/dist/c4Diagram-YG6GDRKO.js +1582 -0
- package/dist/channel.js +5 -0
- package/dist/chunk-4BX2VUAB.js +9 -0
- package/dist/chunk-55IACEB6.js +9 -0
- package/dist/chunk-B4BG7PRW.js +1377 -0
- package/dist/chunk-DI55MBZ5.js +1382 -0
- package/dist/chunk-FMBD7UC4.js +19 -0
- package/dist/chunk-QN33PNHL.js +20 -0
- package/dist/chunk-QZHKN3VN.js +15 -0
- package/dist/chunk-TZMSLE5B.js +64 -0
- package/dist/classDiagram-2ON5EDUG.js +17 -0
- package/dist/classDiagram-v2-WZHVMYZB.js +17 -0
- package/dist/clone.js +8 -0
- package/dist/cose-bilkent-S5V4N54A.js +2606 -0
- package/dist/cytoscape.esm.js +18731 -0
- package/dist/dagre-6UL2VRFP.js +447 -0
- package/dist/dayjs.min.js +302 -0
- package/dist/defaultLocale.js +171 -0
- package/dist/diagram-PSM6KHXK.js +535 -0
- package/dist/diagram-QEK2KX5R.js +221 -0
- package/dist/diagram-S2PKOQOG.js +143 -0
- package/dist/erDiagram-Q2GNP2WA.js +843 -0
- package/dist/flowDiagram-NV44I4VS.js +1628 -0
- package/dist/ganttDiagram-LVOFAZNH.js +2500 -0
- package/dist/gitGraph-F6HP7TQM.js +5 -0
- package/dist/gitGraphDiagram-NY62KEGX.js +713 -0
- package/dist/graph.js +247 -0
- package/dist/index.js +30 -30
- package/dist/index2.js +36 -36
- package/dist/info-NVLQJR56.js +5 -0
- package/dist/infoDiagram-F6ZHWCRC.js +24 -0
- package/dist/init.js +16 -0
- package/dist/journeyDiagram-XKPGCS4Q.js +837 -0
- package/dist/kanban-definition-3W4ZIXB7.js +720 -0
- package/dist/katex.js +11691 -0
- package/dist/layout.js +1324 -0
- package/dist/lineage/index.js +13 -13
- package/dist/linear.js +259 -0
- package/dist/main.js +4 -4
- package/dist/mermaid-parser.core.js +12921 -0
- package/dist/mindmap-definition-VGOIOE7T.js +786 -0
- package/dist/ordinal.js +61 -0
- package/dist/packet-BFZMPI3H.js +5 -0
- package/dist/pie-7BOR55EZ.js +5 -0
- package/dist/pieDiagram-ADFJNKIX.js +163 -0
- package/dist/quadrantDiagram-AYHSOK5B.js +1025 -0
- package/dist/radar-NHE76QYJ.js +5 -0
- package/dist/redux-toolkit.modern.js +1138 -1420
- package/dist/requirementDiagram-UZGBJVZJ.js +852 -0
- package/dist/sankeyDiagram-TZEHDZUN.js +811 -0
- package/dist/sequenceDiagram-WL72ISMW.js +2523 -0
- package/dist/shadcn/index.d.ts +1 -0
- package/dist/shadcn/index.js +2 -2
- package/dist/stateDiagram-FKZM4ZOC.js +264 -0
- package/dist/stateDiagram-v2-4FDKWEC3.js +17 -0
- package/dist/timeline-definition-IT6M3QCI.js +802 -0
- package/dist/treemap-KMMF4GRG.js +5 -0
- package/dist/xychartDiagram-PRI3JC2R.js +1341 -0
- package/package.json +1 -1
- package/dist/Table.js +0 -22
- package/dist/flowchart-elk-definition-170a3958.js +0 -46393
- package/dist/is_dark.js +0 -8
- package/dist/mindmap-definition-44684416.js +0 -20514
- package/dist/timeline-definition-8e5a9bc6.js +0 -825
|
@@ -1,825 +0,0 @@
|
|
|
1
|
-
import { _ as kt, $ as vt, a0 as wt, a1 as rt, a2 as I, a3 as St, a4 as Et, a5 as Tt, a6 as et } from "./CoachForm.js";
|
|
2
|
-
import { s as q } from "./redux-toolkit.modern.js";
|
|
3
|
-
import { i as It } from "./is_dark.js";
|
|
4
|
-
var X = function() {
|
|
5
|
-
var n = function(k, r, a, h) {
|
|
6
|
-
for (a = a || {}, h = k.length; h--; a[k[h]] = r)
|
|
7
|
-
;
|
|
8
|
-
return a;
|
|
9
|
-
}, t = [1, 2], e = [1, 5], s = [6, 9, 11, 17, 18, 20, 22, 23, 26, 27, 28], i = [1, 15], o = [1, 16], l = [1, 17], p = [1, 18], g = [1, 19], d = [1, 23], f = [1, 24], v = [1, 27], _ = [4, 6, 9, 11, 17, 18, 20, 22, 23, 26, 27, 28], b = {
|
|
10
|
-
trace: function() {
|
|
11
|
-
},
|
|
12
|
-
yy: {},
|
|
13
|
-
symbols_: { error: 2, start: 3, timeline: 4, document: 5, EOF: 6, directive: 7, line: 8, SPACE: 9, statement: 10, NEWLINE: 11, openDirective: 12, typeDirective: 13, closeDirective: 14, ":": 15, argDirective: 16, title: 17, acc_title: 18, acc_title_value: 19, acc_descr: 20, acc_descr_value: 21, acc_descr_multiline_value: 22, section: 23, period_statement: 24, event_statement: 25, period: 26, event: 27, open_directive: 28, type_directive: 29, arg_directive: 30, close_directive: 31, $accept: 0, $end: 1 },
|
|
14
|
-
terminals_: { 2: "error", 4: "timeline", 6: "EOF", 9: "SPACE", 11: "NEWLINE", 15: ":", 17: "title", 18: "acc_title", 19: "acc_title_value", 20: "acc_descr", 21: "acc_descr_value", 22: "acc_descr_multiline_value", 23: "section", 26: "period", 27: "event", 28: "open_directive", 29: "type_directive", 30: "arg_directive", 31: "close_directive" },
|
|
15
|
-
productions_: [0, [3, 3], [3, 2], [5, 0], [5, 2], [8, 2], [8, 1], [8, 1], [8, 1], [7, 4], [7, 6], [10, 1], [10, 2], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [24, 1], [25, 1], [12, 1], [13, 1], [16, 1], [14, 1]],
|
|
16
|
-
performAction: function(r, a, h, u, y, c, M) {
|
|
17
|
-
var x = c.length - 1;
|
|
18
|
-
switch (y) {
|
|
19
|
-
case 1:
|
|
20
|
-
return c[x - 1];
|
|
21
|
-
case 3:
|
|
22
|
-
this.$ = [];
|
|
23
|
-
break;
|
|
24
|
-
case 4:
|
|
25
|
-
c[x - 1].push(c[x]), this.$ = c[x - 1];
|
|
26
|
-
break;
|
|
27
|
-
case 5:
|
|
28
|
-
case 6:
|
|
29
|
-
this.$ = c[x];
|
|
30
|
-
break;
|
|
31
|
-
case 7:
|
|
32
|
-
case 8:
|
|
33
|
-
this.$ = [];
|
|
34
|
-
break;
|
|
35
|
-
case 11:
|
|
36
|
-
u.getCommonDb().setDiagramTitle(c[x].substr(6)), this.$ = c[x].substr(6);
|
|
37
|
-
break;
|
|
38
|
-
case 12:
|
|
39
|
-
this.$ = c[x].trim(), u.getCommonDb().setAccTitle(this.$);
|
|
40
|
-
break;
|
|
41
|
-
case 13:
|
|
42
|
-
case 14:
|
|
43
|
-
this.$ = c[x].trim(), u.getCommonDb().setAccDescription(this.$);
|
|
44
|
-
break;
|
|
45
|
-
case 15:
|
|
46
|
-
u.addSection(c[x].substr(8)), this.$ = c[x].substr(8);
|
|
47
|
-
break;
|
|
48
|
-
case 19:
|
|
49
|
-
u.addTask(c[x], 0, ""), this.$ = c[x];
|
|
50
|
-
break;
|
|
51
|
-
case 20:
|
|
52
|
-
u.addEvent(c[x].substr(2)), this.$ = c[x];
|
|
53
|
-
break;
|
|
54
|
-
case 21:
|
|
55
|
-
u.parseDirective("%%{", "open_directive");
|
|
56
|
-
break;
|
|
57
|
-
case 22:
|
|
58
|
-
u.parseDirective(c[x], "type_directive");
|
|
59
|
-
break;
|
|
60
|
-
case 23:
|
|
61
|
-
c[x] = c[x].trim().replace(/'/g, '"'), u.parseDirective(c[x], "arg_directive");
|
|
62
|
-
break;
|
|
63
|
-
case 24:
|
|
64
|
-
u.parseDirective("}%%", "close_directive", "timeline");
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
table: [{ 3: 1, 4: t, 7: 3, 12: 4, 28: e }, { 1: [3] }, n(s, [2, 3], { 5: 6 }), { 3: 7, 4: t, 7: 3, 12: 4, 28: e }, { 13: 8, 29: [1, 9] }, { 29: [2, 21] }, { 6: [1, 10], 7: 22, 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: 4, 17: i, 18: o, 20: l, 22: p, 23: g, 24: 20, 25: 21, 26: d, 27: f, 28: e }, { 1: [2, 2] }, { 14: 25, 15: [1, 26], 31: v }, n([15, 31], [2, 22]), n(s, [2, 8], { 1: [2, 1] }), n(s, [2, 4]), { 7: 22, 10: 28, 12: 4, 17: i, 18: o, 20: l, 22: p, 23: g, 24: 20, 25: 21, 26: d, 27: f, 28: e }, n(s, [2, 6]), n(s, [2, 7]), n(s, [2, 11]), { 19: [1, 29] }, { 21: [1, 30] }, n(s, [2, 14]), n(s, [2, 15]), n(s, [2, 16]), n(s, [2, 17]), n(s, [2, 18]), n(s, [2, 19]), n(s, [2, 20]), { 11: [1, 31] }, { 16: 32, 30: [1, 33] }, { 11: [2, 24] }, n(s, [2, 5]), n(s, [2, 12]), n(s, [2, 13]), n(_, [2, 9]), { 14: 34, 31: v }, { 31: [2, 23] }, { 11: [1, 35] }, n(_, [2, 10])],
|
|
69
|
-
defaultActions: { 5: [2, 21], 7: [2, 2], 27: [2, 24], 33: [2, 23] },
|
|
70
|
-
parseError: function(r, a) {
|
|
71
|
-
if (a.recoverable)
|
|
72
|
-
this.trace(r);
|
|
73
|
-
else {
|
|
74
|
-
var h = new Error(r);
|
|
75
|
-
throw h.hash = a, h;
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
parse: function(r) {
|
|
79
|
-
var a = this, h = [0], u = [], y = [null], c = [], M = this.table, x = "", N = 0, S = 0, L = 2, V = 1, H = c.slice.call(arguments, 1), m = Object.create(this.lexer), C = { yy: {} };
|
|
80
|
-
for (var O in this.yy)
|
|
81
|
-
Object.prototype.hasOwnProperty.call(this.yy, O) && (C.yy[O] = this.yy[O]);
|
|
82
|
-
m.setInput(r, C.yy), C.yy.lexer = m, C.yy.parser = this, typeof m.yylloc > "u" && (m.yylloc = {});
|
|
83
|
-
var J = m.yylloc;
|
|
84
|
-
c.push(J);
|
|
85
|
-
var _t = m.options && m.options.ranges;
|
|
86
|
-
typeof C.yy.parseError == "function" ? this.parseError = C.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
87
|
-
function bt() {
|
|
88
|
-
var P;
|
|
89
|
-
return P = u.pop() || m.lex() || V, typeof P != "number" && (P instanceof Array && (u = P, P = u.pop()), P = a.symbols_[P] || P), P;
|
|
90
|
-
}
|
|
91
|
-
for (var T, z, $, K, W = {}, j, A, tt, G; ; ) {
|
|
92
|
-
if (z = h[h.length - 1], this.defaultActions[z] ? $ = this.defaultActions[z] : ((T === null || typeof T > "u") && (T = bt()), $ = M[z] && M[z][T]), typeof $ > "u" || !$.length || !$[0]) {
|
|
93
|
-
var Q = "";
|
|
94
|
-
G = [];
|
|
95
|
-
for (j in M[z])
|
|
96
|
-
this.terminals_[j] && j > L && G.push("'" + this.terminals_[j] + "'");
|
|
97
|
-
m.showPosition ? Q = "Parse error on line " + (N + 1) + `:
|
|
98
|
-
` + m.showPosition() + `
|
|
99
|
-
Expecting ` + G.join(", ") + ", got '" + (this.terminals_[T] || T) + "'" : Q = "Parse error on line " + (N + 1) + ": Unexpected " + (T == V ? "end of input" : "'" + (this.terminals_[T] || T) + "'"), this.parseError(Q, {
|
|
100
|
-
text: m.match,
|
|
101
|
-
token: this.terminals_[T] || T,
|
|
102
|
-
line: m.yylineno,
|
|
103
|
-
loc: J,
|
|
104
|
-
expected: G
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
if ($[0] instanceof Array && $.length > 1)
|
|
108
|
-
throw new Error("Parse Error: multiple actions possible at state: " + z + ", token: " + T);
|
|
109
|
-
switch ($[0]) {
|
|
110
|
-
case 1:
|
|
111
|
-
h.push(T), y.push(m.yytext), c.push(m.yylloc), h.push($[1]), T = null, S = m.yyleng, x = m.yytext, N = m.yylineno, J = m.yylloc;
|
|
112
|
-
break;
|
|
113
|
-
case 2:
|
|
114
|
-
if (A = this.productions_[$[1]][1], W.$ = y[y.length - A], W._$ = {
|
|
115
|
-
first_line: c[c.length - (A || 1)].first_line,
|
|
116
|
-
last_line: c[c.length - 1].last_line,
|
|
117
|
-
first_column: c[c.length - (A || 1)].first_column,
|
|
118
|
-
last_column: c[c.length - 1].last_column
|
|
119
|
-
}, _t && (W._$.range = [
|
|
120
|
-
c[c.length - (A || 1)].range[0],
|
|
121
|
-
c[c.length - 1].range[1]
|
|
122
|
-
]), K = this.performAction.apply(W, [
|
|
123
|
-
x,
|
|
124
|
-
S,
|
|
125
|
-
N,
|
|
126
|
-
C.yy,
|
|
127
|
-
$[1],
|
|
128
|
-
y,
|
|
129
|
-
c
|
|
130
|
-
].concat(H)), typeof K < "u")
|
|
131
|
-
return K;
|
|
132
|
-
A && (h = h.slice(0, -1 * A * 2), y = y.slice(0, -1 * A), c = c.slice(0, -1 * A)), h.push(this.productions_[$[1]][0]), y.push(W.$), c.push(W._$), tt = M[h[h.length - 2]][h[h.length - 1]], h.push(tt);
|
|
133
|
-
break;
|
|
134
|
-
case 3:
|
|
135
|
-
return !0;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return !0;
|
|
139
|
-
}
|
|
140
|
-
}, w = /* @__PURE__ */ function() {
|
|
141
|
-
var k = {
|
|
142
|
-
EOF: 1,
|
|
143
|
-
parseError: function(a, h) {
|
|
144
|
-
if (this.yy.parser)
|
|
145
|
-
this.yy.parser.parseError(a, h);
|
|
146
|
-
else
|
|
147
|
-
throw new Error(a);
|
|
148
|
-
},
|
|
149
|
-
// resets the lexer, sets new input
|
|
150
|
-
setInput: function(r, a) {
|
|
151
|
-
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 = {
|
|
152
|
-
first_line: 1,
|
|
153
|
-
first_column: 0,
|
|
154
|
-
last_line: 1,
|
|
155
|
-
last_column: 0
|
|
156
|
-
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
157
|
-
},
|
|
158
|
-
// consumes and returns one char from the input
|
|
159
|
-
input: function() {
|
|
160
|
-
var r = this._input[0];
|
|
161
|
-
this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
|
|
162
|
-
var a = r.match(/(?:\r\n?|\n).*/g);
|
|
163
|
-
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;
|
|
164
|
-
},
|
|
165
|
-
// unshifts one char (or a string) into the input
|
|
166
|
-
unput: function(r) {
|
|
167
|
-
var a = r.length, h = r.split(/(?:\r\n?|\n)/g);
|
|
168
|
-
this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
|
|
169
|
-
var u = this.match.split(/(?:\r\n?|\n)/g);
|
|
170
|
-
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), h.length - 1 && (this.yylineno -= h.length - 1);
|
|
171
|
-
var y = this.yylloc.range;
|
|
172
|
-
return this.yylloc = {
|
|
173
|
-
first_line: this.yylloc.first_line,
|
|
174
|
-
last_line: this.yylineno + 1,
|
|
175
|
-
first_column: this.yylloc.first_column,
|
|
176
|
-
last_column: h ? (h.length === u.length ? this.yylloc.first_column : 0) + u[u.length - h.length].length - h[0].length : this.yylloc.first_column - a
|
|
177
|
-
}, this.options.ranges && (this.yylloc.range = [y[0], y[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
|
|
178
|
-
},
|
|
179
|
-
// When called from action, caches matched text and appends it on next action
|
|
180
|
-
more: function() {
|
|
181
|
-
return this._more = !0, this;
|
|
182
|
-
},
|
|
183
|
-
// 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.
|
|
184
|
-
reject: function() {
|
|
185
|
-
if (this.options.backtrack_lexer)
|
|
186
|
-
this._backtrack = !0;
|
|
187
|
-
else
|
|
188
|
-
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).
|
|
189
|
-
` + this.showPosition(), {
|
|
190
|
-
text: "",
|
|
191
|
-
token: null,
|
|
192
|
-
line: this.yylineno
|
|
193
|
-
});
|
|
194
|
-
return this;
|
|
195
|
-
},
|
|
196
|
-
// retain first n characters of the match
|
|
197
|
-
less: function(r) {
|
|
198
|
-
this.unput(this.match.slice(r));
|
|
199
|
-
},
|
|
200
|
-
// displays already matched input, i.e. for error messages
|
|
201
|
-
pastInput: function() {
|
|
202
|
-
var r = this.matched.substr(0, this.matched.length - this.match.length);
|
|
203
|
-
return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
|
|
204
|
-
},
|
|
205
|
-
// displays upcoming input, i.e. for error messages
|
|
206
|
-
upcomingInput: function() {
|
|
207
|
-
var r = this.match;
|
|
208
|
-
return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
209
|
-
},
|
|
210
|
-
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
211
|
-
showPosition: function() {
|
|
212
|
-
var r = this.pastInput(), a = new Array(r.length + 1).join("-");
|
|
213
|
-
return r + this.upcomingInput() + `
|
|
214
|
-
` + a + "^";
|
|
215
|
-
},
|
|
216
|
-
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
217
|
-
test_match: function(r, a) {
|
|
218
|
-
var h, u, y;
|
|
219
|
-
if (this.options.backtrack_lexer && (y = {
|
|
220
|
-
yylineno: this.yylineno,
|
|
221
|
-
yylloc: {
|
|
222
|
-
first_line: this.yylloc.first_line,
|
|
223
|
-
last_line: this.last_line,
|
|
224
|
-
first_column: this.yylloc.first_column,
|
|
225
|
-
last_column: this.yylloc.last_column
|
|
226
|
-
},
|
|
227
|
-
yytext: this.yytext,
|
|
228
|
-
match: this.match,
|
|
229
|
-
matches: this.matches,
|
|
230
|
-
matched: this.matched,
|
|
231
|
-
yyleng: this.yyleng,
|
|
232
|
-
offset: this.offset,
|
|
233
|
-
_more: this._more,
|
|
234
|
-
_input: this._input,
|
|
235
|
-
yy: this.yy,
|
|
236
|
-
conditionStack: this.conditionStack.slice(0),
|
|
237
|
-
done: this.done
|
|
238
|
-
}, this.options.ranges && (y.yylloc.range = this.yylloc.range.slice(0))), u = r[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
|
|
239
|
-
first_line: this.yylloc.last_line,
|
|
240
|
-
last_line: this.yylineno + 1,
|
|
241
|
-
first_column: this.yylloc.last_column,
|
|
242
|
-
last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
|
|
243
|
-
}, 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], h = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), h)
|
|
244
|
-
return h;
|
|
245
|
-
if (this._backtrack) {
|
|
246
|
-
for (var c in y)
|
|
247
|
-
this[c] = y[c];
|
|
248
|
-
return !1;
|
|
249
|
-
}
|
|
250
|
-
return !1;
|
|
251
|
-
},
|
|
252
|
-
// return next match in input
|
|
253
|
-
next: function() {
|
|
254
|
-
if (this.done)
|
|
255
|
-
return this.EOF;
|
|
256
|
-
this._input || (this.done = !0);
|
|
257
|
-
var r, a, h, u;
|
|
258
|
-
this._more || (this.yytext = "", this.match = "");
|
|
259
|
-
for (var y = this._currentRules(), c = 0; c < y.length; c++)
|
|
260
|
-
if (h = this._input.match(this.rules[y[c]]), h && (!a || h[0].length > a[0].length)) {
|
|
261
|
-
if (a = h, u = c, this.options.backtrack_lexer) {
|
|
262
|
-
if (r = this.test_match(h, y[c]), r !== !1)
|
|
263
|
-
return r;
|
|
264
|
-
if (this._backtrack) {
|
|
265
|
-
a = !1;
|
|
266
|
-
continue;
|
|
267
|
-
} else
|
|
268
|
-
return !1;
|
|
269
|
-
} else if (!this.options.flex)
|
|
270
|
-
break;
|
|
271
|
-
}
|
|
272
|
-
return a ? (r = this.test_match(a, y[u]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
273
|
-
` + this.showPosition(), {
|
|
274
|
-
text: "",
|
|
275
|
-
token: null,
|
|
276
|
-
line: this.yylineno
|
|
277
|
-
});
|
|
278
|
-
},
|
|
279
|
-
// return next match that has a token
|
|
280
|
-
lex: function() {
|
|
281
|
-
var a = this.next();
|
|
282
|
-
return a || this.lex();
|
|
283
|
-
},
|
|
284
|
-
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
285
|
-
begin: function(a) {
|
|
286
|
-
this.conditionStack.push(a);
|
|
287
|
-
},
|
|
288
|
-
// pop the previously active lexer condition state off the condition stack
|
|
289
|
-
popState: function() {
|
|
290
|
-
var a = this.conditionStack.length - 1;
|
|
291
|
-
return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
292
|
-
},
|
|
293
|
-
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
294
|
-
_currentRules: function() {
|
|
295
|
-
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
296
|
-
},
|
|
297
|
-
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
298
|
-
topState: function(a) {
|
|
299
|
-
return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
|
|
300
|
-
},
|
|
301
|
-
// alias for begin(condition)
|
|
302
|
-
pushState: function(a) {
|
|
303
|
-
this.begin(a);
|
|
304
|
-
},
|
|
305
|
-
// return the number of states currently on the stack
|
|
306
|
-
stateStackSize: function() {
|
|
307
|
-
return this.conditionStack.length;
|
|
308
|
-
},
|
|
309
|
-
options: { "case-insensitive": !0 },
|
|
310
|
-
performAction: function(a, h, u, y) {
|
|
311
|
-
switch (u) {
|
|
312
|
-
case 0:
|
|
313
|
-
return this.begin("open_directive"), 28;
|
|
314
|
-
case 1:
|
|
315
|
-
return this.begin("type_directive"), 29;
|
|
316
|
-
case 2:
|
|
317
|
-
return this.popState(), this.begin("arg_directive"), 15;
|
|
318
|
-
case 3:
|
|
319
|
-
return this.popState(), this.popState(), 31;
|
|
320
|
-
case 4:
|
|
321
|
-
return 30;
|
|
322
|
-
case 5:
|
|
323
|
-
break;
|
|
324
|
-
case 6:
|
|
325
|
-
break;
|
|
326
|
-
case 7:
|
|
327
|
-
return 11;
|
|
328
|
-
case 8:
|
|
329
|
-
break;
|
|
330
|
-
case 9:
|
|
331
|
-
break;
|
|
332
|
-
case 10:
|
|
333
|
-
return 4;
|
|
334
|
-
case 11:
|
|
335
|
-
return 17;
|
|
336
|
-
case 12:
|
|
337
|
-
return this.begin("acc_title"), 18;
|
|
338
|
-
case 13:
|
|
339
|
-
return this.popState(), "acc_title_value";
|
|
340
|
-
case 14:
|
|
341
|
-
return this.begin("acc_descr"), 20;
|
|
342
|
-
case 15:
|
|
343
|
-
return this.popState(), "acc_descr_value";
|
|
344
|
-
case 16:
|
|
345
|
-
this.begin("acc_descr_multiline");
|
|
346
|
-
break;
|
|
347
|
-
case 17:
|
|
348
|
-
this.popState();
|
|
349
|
-
break;
|
|
350
|
-
case 18:
|
|
351
|
-
return "acc_descr_multiline_value";
|
|
352
|
-
case 19:
|
|
353
|
-
return 23;
|
|
354
|
-
case 20:
|
|
355
|
-
return 27;
|
|
356
|
-
case 21:
|
|
357
|
-
return 26;
|
|
358
|
-
case 22:
|
|
359
|
-
return 6;
|
|
360
|
-
case 23:
|
|
361
|
-
return "INVALID";
|
|
362
|
-
}
|
|
363
|
-
},
|
|
364
|
-
rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\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, /^(?::\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?:$)/i, /^(?:.)/i],
|
|
365
|
-
conditions: { open_directive: { rules: [1], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, acc_descr_multiline: { rules: [17, 18], inclusive: !1 }, acc_descr: { rules: [15], inclusive: !1 }, acc_title: { rules: [13], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 19, 20, 21, 22, 23], inclusive: !0 } }
|
|
366
|
-
};
|
|
367
|
-
return k;
|
|
368
|
-
}();
|
|
369
|
-
b.lexer = w;
|
|
370
|
-
function E() {
|
|
371
|
-
this.yy = {};
|
|
372
|
-
}
|
|
373
|
-
return E.prototype = b, b.Parser = E, new E();
|
|
374
|
-
}();
|
|
375
|
-
X.parser = X;
|
|
376
|
-
const $t = X;
|
|
377
|
-
let F = "", at = 0;
|
|
378
|
-
const Y = [], U = [], B = [], ct = () => kt, ot = (n, t, e) => {
|
|
379
|
-
vt(globalThis, n, t, e);
|
|
380
|
-
}, lt = function() {
|
|
381
|
-
Y.length = 0, U.length = 0, F = "", B.length = 0, wt();
|
|
382
|
-
}, ht = function(n) {
|
|
383
|
-
F = n, Y.push(n);
|
|
384
|
-
}, dt = function() {
|
|
385
|
-
return Y;
|
|
386
|
-
}, ut = function() {
|
|
387
|
-
let n = nt();
|
|
388
|
-
const t = 100;
|
|
389
|
-
let e = 0;
|
|
390
|
-
for (; !n && e < t; )
|
|
391
|
-
n = nt(), e++;
|
|
392
|
-
return U.push(...B), U;
|
|
393
|
-
}, pt = function(n, t, e) {
|
|
394
|
-
const s = {
|
|
395
|
-
id: at++,
|
|
396
|
-
section: F,
|
|
397
|
-
type: F,
|
|
398
|
-
task: n,
|
|
399
|
-
score: t || 0,
|
|
400
|
-
//if event is defined, then add it the events array
|
|
401
|
-
events: e ? [e] : []
|
|
402
|
-
};
|
|
403
|
-
B.push(s);
|
|
404
|
-
}, yt = function(n) {
|
|
405
|
-
B.find((e) => e.id === at - 1).events.push(n);
|
|
406
|
-
}, gt = function(n) {
|
|
407
|
-
const t = {
|
|
408
|
-
section: F,
|
|
409
|
-
type: F,
|
|
410
|
-
description: n,
|
|
411
|
-
task: n,
|
|
412
|
-
classes: []
|
|
413
|
-
};
|
|
414
|
-
U.push(t);
|
|
415
|
-
}, nt = function() {
|
|
416
|
-
const n = function(e) {
|
|
417
|
-
return B[e].processed;
|
|
418
|
-
};
|
|
419
|
-
let t = !0;
|
|
420
|
-
for (const [e, s] of B.entries())
|
|
421
|
-
n(e), t = t && s.processed;
|
|
422
|
-
return t;
|
|
423
|
-
}, Nt = {
|
|
424
|
-
clear: lt,
|
|
425
|
-
getCommonDb: ct,
|
|
426
|
-
addSection: ht,
|
|
427
|
-
getSections: dt,
|
|
428
|
-
getTasks: ut,
|
|
429
|
-
addTask: pt,
|
|
430
|
-
addTaskOrg: gt,
|
|
431
|
-
addEvent: yt,
|
|
432
|
-
parseDirective: ot
|
|
433
|
-
}, Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
434
|
-
__proto__: null,
|
|
435
|
-
addEvent: yt,
|
|
436
|
-
addSection: ht,
|
|
437
|
-
addTask: pt,
|
|
438
|
-
addTaskOrg: gt,
|
|
439
|
-
clear: lt,
|
|
440
|
-
default: Nt,
|
|
441
|
-
getCommonDb: ct,
|
|
442
|
-
getSections: dt,
|
|
443
|
-
getTasks: ut,
|
|
444
|
-
parseDirective: ot
|
|
445
|
-
}, Symbol.toStringTag, { value: "Module" })), Lt = 12, Z = function(n, t) {
|
|
446
|
-
const e = n.append("rect");
|
|
447
|
-
return e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), e.attr("rx", t.rx), e.attr("ry", t.ry), t.class !== void 0 && e.attr("class", t.class), e;
|
|
448
|
-
}, At = function(n, t) {
|
|
449
|
-
const s = n.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), i = n.append("g");
|
|
450
|
-
i.append("circle").attr("cx", t.cx - 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), i.append("circle").attr("cx", t.cx + 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
|
|
451
|
-
function o(g) {
|
|
452
|
-
const d = et().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
|
|
453
|
-
g.append("path").attr("class", "mouth").attr("d", d).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
|
|
454
|
-
}
|
|
455
|
-
function l(g) {
|
|
456
|
-
const d = et().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
|
|
457
|
-
g.append("path").attr("class", "mouth").attr("d", d).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
|
|
458
|
-
}
|
|
459
|
-
function p(g) {
|
|
460
|
-
g.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", t.cx - 5).attr("y1", t.cy + 7).attr("x2", t.cx + 5).attr("y2", t.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
|
|
461
|
-
}
|
|
462
|
-
return t.score > 3 ? o(i) : t.score < 3 ? l(i) : p(i), s;
|
|
463
|
-
}, Pt = function(n, t) {
|
|
464
|
-
const e = n.append("circle");
|
|
465
|
-
return e.attr("cx", t.cx), e.attr("cy", t.cy), e.attr("class", "actor-" + t.pos), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("r", t.r), e.class !== void 0 && e.attr("class", e.class), t.title !== void 0 && e.append("title").text(t.title), e;
|
|
466
|
-
}, ft = function(n, t) {
|
|
467
|
-
const e = t.text.replace(/<br\s*\/?>/gi, " "), s = n.append("text");
|
|
468
|
-
s.attr("x", t.x), s.attr("y", t.y), s.attr("class", "legend"), s.style("text-anchor", t.anchor), t.class !== void 0 && s.attr("class", t.class);
|
|
469
|
-
const i = s.append("tspan");
|
|
470
|
-
return i.attr("x", t.x + t.textMargin * 2), i.text(e), s;
|
|
471
|
-
}, Ht = function(n, t) {
|
|
472
|
-
function e(i, o, l, p, g) {
|
|
473
|
-
return i + "," + o + " " + (i + l) + "," + o + " " + (i + l) + "," + (o + p - g) + " " + (i + l - g * 1.2) + "," + (o + p) + " " + i + "," + (o + p);
|
|
474
|
-
}
|
|
475
|
-
const s = n.append("polygon");
|
|
476
|
-
s.attr("points", e(t.x, t.y, 50, 20, 7)), s.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, ft(n, t);
|
|
477
|
-
}, Ct = function(n, t, e) {
|
|
478
|
-
const s = n.append("g"), i = D();
|
|
479
|
-
i.x = t.x, i.y = t.y, i.fill = t.fill, i.width = e.width, i.height = e.height, i.class = "journey-section section-type-" + t.num, i.rx = 3, i.ry = 3, Z(s, i), mt(e)(
|
|
480
|
-
t.text,
|
|
481
|
-
s,
|
|
482
|
-
i.x,
|
|
483
|
-
i.y,
|
|
484
|
-
i.width,
|
|
485
|
-
i.height,
|
|
486
|
-
{ class: "journey-section section-type-" + t.num },
|
|
487
|
-
e,
|
|
488
|
-
t.colour
|
|
489
|
-
);
|
|
490
|
-
};
|
|
491
|
-
let it = -1;
|
|
492
|
-
const Vt = function(n, t, e) {
|
|
493
|
-
const s = t.x + e.width / 2, i = n.append("g");
|
|
494
|
-
it++;
|
|
495
|
-
const o = 300 + 5 * 30;
|
|
496
|
-
i.append("line").attr("id", "task" + it).attr("x1", s).attr("y1", t.y).attr("x2", s).attr("y2", o).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), At(i, {
|
|
497
|
-
cx: s,
|
|
498
|
-
cy: 300 + (5 - t.score) * 30,
|
|
499
|
-
score: t.score
|
|
500
|
-
});
|
|
501
|
-
const l = D();
|
|
502
|
-
l.x = t.x, l.y = t.y, l.fill = t.fill, l.width = e.width, l.height = e.height, l.class = "task task-type-" + t.num, l.rx = 3, l.ry = 3, Z(i, l), t.x + 14, mt(e)(
|
|
503
|
-
t.task,
|
|
504
|
-
i,
|
|
505
|
-
l.x,
|
|
506
|
-
l.y,
|
|
507
|
-
l.width,
|
|
508
|
-
l.height,
|
|
509
|
-
{ class: "task" },
|
|
510
|
-
e,
|
|
511
|
-
t.colour
|
|
512
|
-
);
|
|
513
|
-
}, zt = function(n, t) {
|
|
514
|
-
Z(n, {
|
|
515
|
-
x: t.startx,
|
|
516
|
-
y: t.starty,
|
|
517
|
-
width: t.stopx - t.startx,
|
|
518
|
-
height: t.stopy - t.starty,
|
|
519
|
-
fill: t.fill,
|
|
520
|
-
class: "rect"
|
|
521
|
-
}).lower();
|
|
522
|
-
}, Rt = function() {
|
|
523
|
-
return {
|
|
524
|
-
x: 0,
|
|
525
|
-
y: 0,
|
|
526
|
-
fill: void 0,
|
|
527
|
-
"text-anchor": "start",
|
|
528
|
-
width: 100,
|
|
529
|
-
height: 100,
|
|
530
|
-
textMargin: 0,
|
|
531
|
-
rx: 0,
|
|
532
|
-
ry: 0
|
|
533
|
-
};
|
|
534
|
-
}, D = function() {
|
|
535
|
-
return {
|
|
536
|
-
x: 0,
|
|
537
|
-
y: 0,
|
|
538
|
-
width: 100,
|
|
539
|
-
anchor: "start",
|
|
540
|
-
height: 100,
|
|
541
|
-
rx: 0,
|
|
542
|
-
ry: 0
|
|
543
|
-
};
|
|
544
|
-
}, mt = /* @__PURE__ */ function() {
|
|
545
|
-
function n(i, o, l, p, g, d, f, v) {
|
|
546
|
-
const _ = o.append("text").attr("x", l + g / 2).attr("y", p + d / 2 + 5).style("font-color", v).style("text-anchor", "middle").text(i);
|
|
547
|
-
s(_, f);
|
|
548
|
-
}
|
|
549
|
-
function t(i, o, l, p, g, d, f, v, _) {
|
|
550
|
-
const { taskFontSize: b, taskFontFamily: w } = v, E = i.split(/<br\s*\/?>/gi);
|
|
551
|
-
for (let k = 0; k < E.length; k++) {
|
|
552
|
-
const r = k * b - b * (E.length - 1) / 2, a = o.append("text").attr("x", l + g / 2).attr("y", p).attr("fill", _).style("text-anchor", "middle").style("font-size", b).style("font-family", w);
|
|
553
|
-
a.append("tspan").attr("x", l + g / 2).attr("dy", r).text(E[k]), a.attr("y", p + d / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), s(a, f);
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
function e(i, o, l, p, g, d, f, v) {
|
|
557
|
-
const _ = o.append("switch"), w = _.append("foreignObject").attr("x", l).attr("y", p).attr("width", g).attr("height", d).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
558
|
-
w.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), t(i, _, l, p, g, d, f, v), s(w, f);
|
|
559
|
-
}
|
|
560
|
-
function s(i, o) {
|
|
561
|
-
for (const l in o)
|
|
562
|
-
l in o && i.attr(l, o[l]);
|
|
563
|
-
}
|
|
564
|
-
return function(i) {
|
|
565
|
-
return i.textPlacement === "fo" ? e : i.textPlacement === "old" ? n : t;
|
|
566
|
-
};
|
|
567
|
-
}(), Wt = function(n) {
|
|
568
|
-
n.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");
|
|
569
|
-
};
|
|
570
|
-
function xt(n, t) {
|
|
571
|
-
n.each(function() {
|
|
572
|
-
var e = q(this), s = e.text().split(/(\s+|<br>)/).reverse(), i, o = [], l = 1.1, p = e.attr("y"), g = parseFloat(e.attr("dy")), d = e.text(null).append("tspan").attr("x", 0).attr("y", p).attr("dy", g + "em");
|
|
573
|
-
for (let f = 0; f < s.length; f++)
|
|
574
|
-
i = s[s.length - 1 - f], o.push(i), d.text(o.join(" ").trim()), (d.node().getComputedTextLength() > t || i === "<br>") && (o.pop(), d.text(o.join(" ").trim()), i === "<br>" ? o = [""] : o = [i], d = e.append("tspan").attr("x", 0).attr("y", p).attr("dy", l + "em").text(i));
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
const Ft = function(n, t, e, s) {
|
|
578
|
-
const i = e % Lt - 1, o = n.append("g");
|
|
579
|
-
t.section = i, o.attr(
|
|
580
|
-
"class",
|
|
581
|
-
(t.class ? t.class + " " : "") + "timeline-node " + ("section-" + i)
|
|
582
|
-
);
|
|
583
|
-
const l = o.append("g"), p = o.append("g"), d = p.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(xt, t.width).node().getBBox(), f = s.fontSize && s.fontSize.replace ? s.fontSize.replace("px", "") : s.fontSize;
|
|
584
|
-
return t.height = d.height + f * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, p.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), Ot(l, t, i), t;
|
|
585
|
-
}, Bt = function(n, t, e) {
|
|
586
|
-
const s = n.append("g"), o = s.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(xt, t.width).node().getBBox(), l = e.fontSize && e.fontSize.replace ? e.fontSize.replace("px", "") : e.fontSize;
|
|
587
|
-
return s.remove(), o.height + l * 1.1 * 0.5 + t.padding;
|
|
588
|
-
}, Ot = function(n, t, e) {
|
|
589
|
-
n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr(
|
|
590
|
-
"d",
|
|
591
|
-
`M0 ${t.height - 5} v${-t.height + 2 * 5} q0,-5 5,-5 h${t.width - 2 * 5} q5,0 5,5 v${t.height - 5} H0 Z`
|
|
592
|
-
), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
|
|
593
|
-
}, R = {
|
|
594
|
-
drawRect: Z,
|
|
595
|
-
drawCircle: Pt,
|
|
596
|
-
drawSection: Ct,
|
|
597
|
-
drawText: ft,
|
|
598
|
-
drawLabel: Ht,
|
|
599
|
-
drawTask: Vt,
|
|
600
|
-
drawBackgroundRect: zt,
|
|
601
|
-
getTextObj: Rt,
|
|
602
|
-
getNoteRect: D,
|
|
603
|
-
initGraphics: Wt,
|
|
604
|
-
drawNode: Ft,
|
|
605
|
-
getVirtualNodeHeight: Bt
|
|
606
|
-
}, jt = function(n) {
|
|
607
|
-
Object.keys(n).forEach(function(e) {
|
|
608
|
-
conf[e] = n[e];
|
|
609
|
-
});
|
|
610
|
-
}, Gt = function(n, t, e, s) {
|
|
611
|
-
const i = rt(), o = i.leftMargin ? i.leftMargin : 50;
|
|
612
|
-
s.db.clear(), s.parser.parse(n + `
|
|
613
|
-
`), I.debug("timeline", s.db);
|
|
614
|
-
const l = i.securityLevel;
|
|
615
|
-
let p;
|
|
616
|
-
l === "sandbox" && (p = q("#i" + t));
|
|
617
|
-
const d = (l === "sandbox" ? q(p.nodes()[0].contentDocument.body) : q("body")).select("#" + t);
|
|
618
|
-
d.append("g");
|
|
619
|
-
const f = s.db.getTasks(), v = s.db.getCommonDb().getDiagramTitle();
|
|
620
|
-
I.debug("task", f), R.initGraphics(d);
|
|
621
|
-
const _ = s.db.getSections();
|
|
622
|
-
I.debug("sections", _);
|
|
623
|
-
let b = 0, w = 0, E = 0, k = 0, r = 50 + o, a = 50;
|
|
624
|
-
k = 50;
|
|
625
|
-
let h = 0, u = !0;
|
|
626
|
-
_.forEach(function(N) {
|
|
627
|
-
const S = {
|
|
628
|
-
number: h,
|
|
629
|
-
descr: N,
|
|
630
|
-
section: h,
|
|
631
|
-
width: 150,
|
|
632
|
-
padding: 20,
|
|
633
|
-
maxHeight: b
|
|
634
|
-
}, L = R.getVirtualNodeHeight(d, S, i);
|
|
635
|
-
I.debug("sectionHeight before draw", L), b = Math.max(b, L + 20);
|
|
636
|
-
});
|
|
637
|
-
let y = 0, c = 0;
|
|
638
|
-
I.debug("tasks.length", f.length);
|
|
639
|
-
for (const [N, S] of f.entries()) {
|
|
640
|
-
const L = {
|
|
641
|
-
number: N,
|
|
642
|
-
descr: S,
|
|
643
|
-
section: S.section,
|
|
644
|
-
width: 150,
|
|
645
|
-
padding: 20,
|
|
646
|
-
maxHeight: w
|
|
647
|
-
}, V = R.getVirtualNodeHeight(d, L, i);
|
|
648
|
-
I.debug("taskHeight before draw", V), w = Math.max(w, V + 20), y = Math.max(y, S.events.length);
|
|
649
|
-
let H = 0;
|
|
650
|
-
for (let m = 0; m < S.events.length; m++) {
|
|
651
|
-
const O = {
|
|
652
|
-
descr: S.events[m],
|
|
653
|
-
section: S.section,
|
|
654
|
-
number: S.section,
|
|
655
|
-
width: 150,
|
|
656
|
-
padding: 20,
|
|
657
|
-
maxHeight: 50
|
|
658
|
-
};
|
|
659
|
-
H += R.getVirtualNodeHeight(d, O, i);
|
|
660
|
-
}
|
|
661
|
-
c = Math.max(c, H);
|
|
662
|
-
}
|
|
663
|
-
I.debug("maxSectionHeight before draw", b), I.debug("maxTaskHeight before draw", w), _ && _.length > 0 ? _.forEach((N) => {
|
|
664
|
-
const S = {
|
|
665
|
-
number: h,
|
|
666
|
-
descr: N,
|
|
667
|
-
section: h,
|
|
668
|
-
width: 150,
|
|
669
|
-
padding: 20,
|
|
670
|
-
maxHeight: b
|
|
671
|
-
};
|
|
672
|
-
I.debug("sectionNode", S);
|
|
673
|
-
const L = d.append("g"), V = R.drawNode(L, S, h, i);
|
|
674
|
-
I.debug("sectionNode output", V), L.attr("transform", `translate(${r}, ${k})`), a += b + 50;
|
|
675
|
-
const H = f.filter((m) => m.section === N);
|
|
676
|
-
H.length > 0 && st(
|
|
677
|
-
d,
|
|
678
|
-
H,
|
|
679
|
-
h,
|
|
680
|
-
r,
|
|
681
|
-
a,
|
|
682
|
-
w,
|
|
683
|
-
i,
|
|
684
|
-
y,
|
|
685
|
-
c,
|
|
686
|
-
b,
|
|
687
|
-
!1
|
|
688
|
-
), r += 200 * Math.max(H.length, 1), a = k, h++;
|
|
689
|
-
}) : (u = !1, st(
|
|
690
|
-
d,
|
|
691
|
-
f,
|
|
692
|
-
h,
|
|
693
|
-
r,
|
|
694
|
-
a,
|
|
695
|
-
w,
|
|
696
|
-
i,
|
|
697
|
-
y,
|
|
698
|
-
c,
|
|
699
|
-
b,
|
|
700
|
-
!0
|
|
701
|
-
));
|
|
702
|
-
const M = d.node().getBBox();
|
|
703
|
-
I.debug("bounds", M), v && d.append("text").text(v).attr("x", M.width / 2 - o).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), E = u ? b + w + 150 : w + 100, d.append("g").attr("class", "lineWrapper").append("line").attr("x1", o).attr("y1", E).attr("x2", M.width + 3 * o).attr("y2", E).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), St(
|
|
704
|
-
void 0,
|
|
705
|
-
d,
|
|
706
|
-
i.timeline.padding ? i.timeline.padding : 50,
|
|
707
|
-
i.timeline.useMaxWidth ? i.timeline.useMaxWidth : !1
|
|
708
|
-
);
|
|
709
|
-
}, st = function(n, t, e, s, i, o, l, p, g, d, f) {
|
|
710
|
-
for (const v of t) {
|
|
711
|
-
const _ = {
|
|
712
|
-
descr: v.task,
|
|
713
|
-
section: e,
|
|
714
|
-
number: e,
|
|
715
|
-
width: 150,
|
|
716
|
-
padding: 20,
|
|
717
|
-
maxHeight: o
|
|
718
|
-
};
|
|
719
|
-
I.debug("taskNode", _);
|
|
720
|
-
const b = n.append("g").attr("class", "taskWrapper"), E = R.drawNode(b, _, e, l).height;
|
|
721
|
-
if (I.debug("taskHeight after draw", E), b.attr("transform", `translate(${s}, ${i})`), o = Math.max(o, E), v.events) {
|
|
722
|
-
const k = n.append("g").attr("class", "lineWrapper");
|
|
723
|
-
let r = o;
|
|
724
|
-
i += 100, r = r + qt(n, v.events, e, s, i, l), i -= 100, k.append("line").attr("x1", s + 190 / 2).attr("y1", i + o).attr("x2", s + 190 / 2).attr(
|
|
725
|
-
"y2",
|
|
726
|
-
i + o + (f ? o : d) + g + 120
|
|
727
|
-
).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
|
|
728
|
-
}
|
|
729
|
-
s = s + 200, f && !rt().timeline.disableMulticolor && e++;
|
|
730
|
-
}
|
|
731
|
-
i = i - 10;
|
|
732
|
-
}, qt = function(n, t, e, s, i, o) {
|
|
733
|
-
let l = 0;
|
|
734
|
-
const p = i;
|
|
735
|
-
i = i + 100;
|
|
736
|
-
for (const g of t) {
|
|
737
|
-
const d = {
|
|
738
|
-
descr: g,
|
|
739
|
-
section: e,
|
|
740
|
-
number: e,
|
|
741
|
-
width: 150,
|
|
742
|
-
padding: 20,
|
|
743
|
-
maxHeight: 50
|
|
744
|
-
};
|
|
745
|
-
I.debug("eventNode", d);
|
|
746
|
-
const f = n.append("g").attr("class", "eventWrapper"), _ = R.drawNode(f, d, e, o).height;
|
|
747
|
-
l = l + _, f.attr("transform", `translate(${s}, ${i})`), i = i + 10 + _;
|
|
748
|
-
}
|
|
749
|
-
return i = p, l;
|
|
750
|
-
}, Ut = {
|
|
751
|
-
setConf: jt,
|
|
752
|
-
draw: Gt
|
|
753
|
-
}, Zt = (n) => {
|
|
754
|
-
let t = "";
|
|
755
|
-
for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
|
|
756
|
-
n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], It(n["lineColor" + e]) ? n["lineColor" + e] = Et(n["lineColor" + e], 20) : n["lineColor" + e] = Tt(n["lineColor" + e], 20);
|
|
757
|
-
for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) {
|
|
758
|
-
const s = "" + (17 - 3 * e);
|
|
759
|
-
t += `
|
|
760
|
-
.section-${e - 1} rect, .section-${e - 1} path, .section-${e - 1} circle, .section-${e - 1} path {
|
|
761
|
-
fill: ${n["cScale" + e]};
|
|
762
|
-
}
|
|
763
|
-
.section-${e - 1} text {
|
|
764
|
-
fill: ${n["cScaleLabel" + e]};
|
|
765
|
-
}
|
|
766
|
-
.node-icon-${e - 1} {
|
|
767
|
-
font-size: 40px;
|
|
768
|
-
color: ${n["cScaleLabel" + e]};
|
|
769
|
-
}
|
|
770
|
-
.section-edge-${e - 1}{
|
|
771
|
-
stroke: ${n["cScale" + e]};
|
|
772
|
-
}
|
|
773
|
-
.edge-depth-${e - 1}{
|
|
774
|
-
stroke-width: ${s};
|
|
775
|
-
}
|
|
776
|
-
.section-${e - 1} line {
|
|
777
|
-
stroke: ${n["cScaleInv" + e]} ;
|
|
778
|
-
stroke-width: 3;
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
.lineWrapper line{
|
|
782
|
-
stroke: ${n["cScaleLabel" + e]} ;
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
.disabled, .disabled circle, .disabled text {
|
|
786
|
-
fill: lightgray;
|
|
787
|
-
}
|
|
788
|
-
.disabled text {
|
|
789
|
-
fill: #efefef;
|
|
790
|
-
}
|
|
791
|
-
`;
|
|
792
|
-
}
|
|
793
|
-
return t;
|
|
794
|
-
}, Jt = (n) => `
|
|
795
|
-
.edge {
|
|
796
|
-
stroke-width: 3;
|
|
797
|
-
}
|
|
798
|
-
${Zt(n)}
|
|
799
|
-
.section-root rect, .section-root path, .section-root circle {
|
|
800
|
-
fill: ${n.git0};
|
|
801
|
-
}
|
|
802
|
-
.section-root text {
|
|
803
|
-
fill: ${n.gitBranchLabel0};
|
|
804
|
-
}
|
|
805
|
-
.icon-container {
|
|
806
|
-
height:100%;
|
|
807
|
-
display: flex;
|
|
808
|
-
justify-content: center;
|
|
809
|
-
align-items: center;
|
|
810
|
-
}
|
|
811
|
-
.edge {
|
|
812
|
-
fill: none;
|
|
813
|
-
}
|
|
814
|
-
.eventWrapper {
|
|
815
|
-
filter: brightness(120%);
|
|
816
|
-
}
|
|
817
|
-
`, Kt = Jt, Dt = {
|
|
818
|
-
db: Mt,
|
|
819
|
-
renderer: Ut,
|
|
820
|
-
parser: $t,
|
|
821
|
-
styles: Kt
|
|
822
|
-
};
|
|
823
|
-
export {
|
|
824
|
-
Dt as diagram
|
|
825
|
-
};
|