gradio-leaderboard 0.0.13__py3-none-any.whl → 0.0.14__py3-none-any.whl
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.
- gradio_leaderboard/leaderboard.pyi +26 -9
- gradio_leaderboard/templates/component/Index-CzS_eGV6.js +34210 -0
- gradio_leaderboard/templates/component/_basePickBy-CPQEc5fh.js +151 -0
- gradio_leaderboard/templates/component/_baseUniq-DlEwemC3.js +615 -0
- gradio_leaderboard/templates/component/arc-4UNMf6Jv.js +83 -0
- gradio_leaderboard/templates/component/architectureDiagram-NQ2NVSRB-ClVp_eQQ.js +4629 -0
- gradio_leaderboard/templates/component/blockDiagram-PHRCVELO-CBZHEIQE.js +2255 -0
- gradio_leaderboard/templates/component/c4Diagram-6F6E4RAY-BcEP_NdH.js +1586 -0
- gradio_leaderboard/templates/component/channel-BK2Jce3b.js +5 -0
- gradio_leaderboard/templates/component/chunk-353BL4L5-D4dVjjbU.js +8 -0
- gradio_leaderboard/templates/component/chunk-67H74DCK-Dd9cOxfN.js +64 -0
- gradio_leaderboard/templates/component/chunk-6OLS64BW-CfumlcA2.js +1376 -0
- gradio_leaderboard/templates/component/chunk-AACKK3MU-4CpiDhxa.js +18 -0
- gradio_leaderboard/templates/component/chunk-BFAMUDN2-C6YyJRb4.js +8 -0
- gradio_leaderboard/templates/component/chunk-E2GYISFI-CbYUJnri.js +19 -0
- gradio_leaderboard/templates/component/chunk-QEP2MXWD-BYLoFCys.js +1380 -0
- gradio_leaderboard/templates/component/chunk-SKB7J2MH-DNiBnZKZ.js +19 -0
- gradio_leaderboard/templates/component/classDiagram-BGRH5UQR-BrG1RRX8.js +16 -0
- gradio_leaderboard/templates/component/classDiagram-v2-O24JOBDK-BrG1RRX8.js +16 -0
- gradio_leaderboard/templates/component/clone-BA6MvtJ3.js +8 -0
- gradio_leaderboard/templates/component/cytoscape.esm-Bdz5CrXX.js +18629 -0
- gradio_leaderboard/templates/component/dagre-FFZHY6LT-6RahWHGr.js +444 -0
- gradio_leaderboard/templates/component/defaultLocale-D7EN2tov.js +171 -0
- gradio_leaderboard/templates/component/diagram-3EMPZRKU-DtoOVTDy.js +526 -0
- gradio_leaderboard/templates/component/diagram-5UYTHUR4-MEp0H-U7.js +137 -0
- gradio_leaderboard/templates/component/diagram-ZTM2IBQH-22c5YuUh.js +217 -0
- gradio_leaderboard/templates/component/erDiagram-R3QVA2FD-DZp2MeDc.js +844 -0
- gradio_leaderboard/templates/component/flowDiagram-PKI6S5ZS-CfK9UZi3.js +1623 -0
- gradio_leaderboard/templates/component/ganttDiagram-EK5VF46D-waaD2Kup.js +2502 -0
- gradio_leaderboard/templates/component/gitGraphDiagram-GW3U2K7C-DJCAxNvz.js +699 -0
- gradio_leaderboard/templates/component/graph-CXm5uxKj.js +247 -0
- gradio_leaderboard/templates/component/index.js +2 -33755
- gradio_leaderboard/templates/component/infoDiagram-RLU2ROGC-_Rx9wF6U.js +24 -0
- gradio_leaderboard/templates/component/init-DjUOC4st.js +16 -0
- gradio_leaderboard/templates/component/journeyDiagram-EWQZEKCU-G-tt0noJ.js +836 -0
- gradio_leaderboard/templates/component/kanban-definition-ILFWEQ3N-2aHifLFR.js +718 -0
- gradio_leaderboard/templates/component/layout-DiZ88ySr.js +1324 -0
- gradio_leaderboard/templates/component/linear-D4M9Dm-w.js +259 -0
- gradio_leaderboard/templates/component/mermaid.core-D36e06XD.js +14941 -0
- gradio_leaderboard/templates/component/mindmap-definition-CZNETY7S-1Jow2c7r.js +3215 -0
- gradio_leaderboard/templates/component/ordinal-DfAQgscy.js +61 -0
- gradio_leaderboard/templates/component/pieDiagram-NIOCPIFQ-DU7jHSoi.js +162 -0
- gradio_leaderboard/templates/component/quadrantDiagram-2OG54O6I-GcojS_If.js +1028 -0
- gradio_leaderboard/templates/component/requirementDiagram-SO3GGRV7-CBRyajan.js +853 -0
- gradio_leaderboard/templates/component/sankeyDiagram-4UZDY2LN-CeZji6oR.js +820 -0
- gradio_leaderboard/templates/component/sequenceDiagram-ZIKVLSP4-DMygkr3Y.js +2284 -0
- gradio_leaderboard/templates/component/stateDiagram-XX37X6EN-DK2vsx2r.js +263 -0
- gradio_leaderboard/templates/component/stateDiagram-v2-GD6S3NHB-BoIkPrjk.js +16 -0
- gradio_leaderboard/templates/component/style.css +1 -1
- gradio_leaderboard/templates/component/timeline-definition-RI47OAVP-BQ_Jr8hZ.js +797 -0
- gradio_leaderboard/templates/component/treemap-FKARHQ26-2Ty0RcZX.js +12981 -0
- gradio_leaderboard/templates/component/xychartDiagram-H2YORKM3--C9dwTwV.js +1368 -0
- {gradio_leaderboard-0.0.13.dist-info → gradio_leaderboard-0.0.14.dist-info}/METADATA +2 -2
- gradio_leaderboard-0.0.14.dist-info/RECORD +59 -0
- {gradio_leaderboard-0.0.13.dist-info → gradio_leaderboard-0.0.14.dist-info}/WHEEL +1 -1
- gradio_leaderboard-0.0.13.dist-info/RECORD +0 -10
@@ -0,0 +1,797 @@
|
|
1
|
+
import { _ as s, B as xt, V as kt, t as vt, j, d as _t, l as E, W as bt, X as wt, Y as St, $ as Et } from "./mermaid.core-D36e06XD.js";
|
2
|
+
import { d as nt } from "./arc-4UNMf6Jv.js";
|
3
|
+
var Q = function() {
|
4
|
+
var n = /* @__PURE__ */ s(function(x, i, a, c) {
|
5
|
+
for (a = a || {}, c = x.length; c--; a[x[c]] = i) ;
|
6
|
+
return a;
|
7
|
+
}, "o"), t = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], e = [1, 9], l = [1, 10], r = [1, 11], d = [1, 12], h = [1, 13], f = [1, 16], m = [1, 17], p = {
|
8
|
+
trace: /* @__PURE__ */ s(function() {
|
9
|
+
}, "trace"),
|
10
|
+
yy: {},
|
11
|
+
symbols_: { error: 2, start: 3, timeline: 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, period_statement: 18, event_statement: 19, period: 20, event: 21, $accept: 0, $end: 1 },
|
12
|
+
terminals_: { 2: "error", 4: "timeline", 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", 20: "period", 21: "event" },
|
13
|
+
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, 1], [9, 1], [18, 1], [19, 1]],
|
14
|
+
performAction: /* @__PURE__ */ s(function(i, a, c, u, y, o, w) {
|
15
|
+
var v = o.length - 1;
|
16
|
+
switch (y) {
|
17
|
+
case 1:
|
18
|
+
return o[v - 1];
|
19
|
+
case 2:
|
20
|
+
this.$ = [];
|
21
|
+
break;
|
22
|
+
case 3:
|
23
|
+
o[v - 1].push(o[v]), this.$ = o[v - 1];
|
24
|
+
break;
|
25
|
+
case 4:
|
26
|
+
case 5:
|
27
|
+
this.$ = o[v];
|
28
|
+
break;
|
29
|
+
case 6:
|
30
|
+
case 7:
|
31
|
+
this.$ = [];
|
32
|
+
break;
|
33
|
+
case 8:
|
34
|
+
u.getCommonDb().setDiagramTitle(o[v].substr(6)), this.$ = o[v].substr(6);
|
35
|
+
break;
|
36
|
+
case 9:
|
37
|
+
this.$ = o[v].trim(), u.getCommonDb().setAccTitle(this.$);
|
38
|
+
break;
|
39
|
+
case 10:
|
40
|
+
case 11:
|
41
|
+
this.$ = o[v].trim(), u.getCommonDb().setAccDescription(this.$);
|
42
|
+
break;
|
43
|
+
case 12:
|
44
|
+
u.addSection(o[v].substr(8)), this.$ = o[v].substr(8);
|
45
|
+
break;
|
46
|
+
case 15:
|
47
|
+
u.addTask(o[v], 0, ""), this.$ = o[v];
|
48
|
+
break;
|
49
|
+
case 16:
|
50
|
+
u.addEvent(o[v].substr(2)), this.$ = o[v];
|
51
|
+
break;
|
52
|
+
}
|
53
|
+
}, "anonymous"),
|
54
|
+
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, n(t, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: e, 12: l, 14: r, 16: d, 17: h, 18: 14, 19: 15, 20: f, 21: m }, n(t, [2, 7], { 1: [2, 1] }), n(t, [2, 3]), { 9: 18, 11: e, 12: l, 14: r, 16: d, 17: h, 18: 14, 19: 15, 20: f, 21: m }, n(t, [2, 5]), n(t, [2, 6]), n(t, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, n(t, [2, 11]), n(t, [2, 12]), n(t, [2, 13]), n(t, [2, 14]), n(t, [2, 15]), n(t, [2, 16]), n(t, [2, 4]), n(t, [2, 9]), n(t, [2, 10])],
|
55
|
+
defaultActions: {},
|
56
|
+
parseError: /* @__PURE__ */ s(function(i, a) {
|
57
|
+
if (a.recoverable)
|
58
|
+
this.trace(i);
|
59
|
+
else {
|
60
|
+
var c = new Error(i);
|
61
|
+
throw c.hash = a, c;
|
62
|
+
}
|
63
|
+
}, "parseError"),
|
64
|
+
parse: /* @__PURE__ */ s(function(i) {
|
65
|
+
var a = this, c = [0], u = [], y = [null], o = [], w = this.table, v = "", N = 0, P = 0, W = 2, U = 1, H = o.slice.call(arguments, 1), g = Object.create(this.lexer), b = { yy: {} };
|
66
|
+
for (var L in this.yy)
|
67
|
+
Object.prototype.hasOwnProperty.call(this.yy, L) && (b.yy[L] = this.yy[L]);
|
68
|
+
g.setInput(i, b.yy), b.yy.lexer = g, b.yy.parser = this, typeof g.yylloc > "u" && (g.yylloc = {});
|
69
|
+
var $ = g.yylloc;
|
70
|
+
o.push($);
|
71
|
+
var z = g.options && g.options.ranges;
|
72
|
+
typeof b.yy.parseError == "function" ? this.parseError = b.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
73
|
+
function Z(T) {
|
74
|
+
c.length = c.length - 2 * T, y.length = y.length - T, o.length = o.length - T;
|
75
|
+
}
|
76
|
+
s(Z, "popStack");
|
77
|
+
function tt() {
|
78
|
+
var T;
|
79
|
+
return T = u.pop() || g.lex() || U, typeof T != "number" && (T instanceof Array && (u = T, T = u.pop()), T = a.symbols_[T] || T), T;
|
80
|
+
}
|
81
|
+
s(tt, "lex");
|
82
|
+
for (var S, A, I, J, R = {}, B, M, et, O; ; ) {
|
83
|
+
if (A = c[c.length - 1], this.defaultActions[A] ? I = this.defaultActions[A] : ((S === null || typeof S > "u") && (S = tt()), I = w[A] && w[A][S]), typeof I > "u" || !I.length || !I[0]) {
|
84
|
+
var K = "";
|
85
|
+
O = [];
|
86
|
+
for (B in w[A])
|
87
|
+
this.terminals_[B] && B > W && O.push("'" + this.terminals_[B] + "'");
|
88
|
+
g.showPosition ? K = "Parse error on line " + (N + 1) + `:
|
89
|
+
` + g.showPosition() + `
|
90
|
+
Expecting ` + O.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : K = "Parse error on line " + (N + 1) + ": Unexpected " + (S == U ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(K, {
|
91
|
+
text: g.match,
|
92
|
+
token: this.terminals_[S] || S,
|
93
|
+
line: g.yylineno,
|
94
|
+
loc: $,
|
95
|
+
expected: O
|
96
|
+
});
|
97
|
+
}
|
98
|
+
if (I[0] instanceof Array && I.length > 1)
|
99
|
+
throw new Error("Parse Error: multiple actions possible at state: " + A + ", token: " + S);
|
100
|
+
switch (I[0]) {
|
101
|
+
case 1:
|
102
|
+
c.push(S), y.push(g.yytext), o.push(g.yylloc), c.push(I[1]), S = null, P = g.yyleng, v = g.yytext, N = g.yylineno, $ = g.yylloc;
|
103
|
+
break;
|
104
|
+
case 2:
|
105
|
+
if (M = this.productions_[I[1]][1], R.$ = y[y.length - M], R._$ = {
|
106
|
+
first_line: o[o.length - (M || 1)].first_line,
|
107
|
+
last_line: o[o.length - 1].last_line,
|
108
|
+
first_column: o[o.length - (M || 1)].first_column,
|
109
|
+
last_column: o[o.length - 1].last_column
|
110
|
+
}, z && (R._$.range = [
|
111
|
+
o[o.length - (M || 1)].range[0],
|
112
|
+
o[o.length - 1].range[1]
|
113
|
+
]), J = this.performAction.apply(R, [
|
114
|
+
v,
|
115
|
+
P,
|
116
|
+
N,
|
117
|
+
b.yy,
|
118
|
+
I[1],
|
119
|
+
y,
|
120
|
+
o
|
121
|
+
].concat(H)), typeof J < "u")
|
122
|
+
return J;
|
123
|
+
M && (c = c.slice(0, -1 * M * 2), y = y.slice(0, -1 * M), o = o.slice(0, -1 * M)), c.push(this.productions_[I[1]][0]), y.push(R.$), o.push(R._$), et = w[c[c.length - 2]][c[c.length - 1]], c.push(et);
|
124
|
+
break;
|
125
|
+
case 3:
|
126
|
+
return !0;
|
127
|
+
}
|
128
|
+
}
|
129
|
+
return !0;
|
130
|
+
}, "parse")
|
131
|
+
}, k = /* @__PURE__ */ function() {
|
132
|
+
var x = {
|
133
|
+
EOF: 1,
|
134
|
+
parseError: /* @__PURE__ */ s(function(a, c) {
|
135
|
+
if (this.yy.parser)
|
136
|
+
this.yy.parser.parseError(a, c);
|
137
|
+
else
|
138
|
+
throw new Error(a);
|
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, c = 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 u = 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), c.length - 1 && (this.yylineno -= c.length - 1);
|
162
|
+
var y = 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: c ? (c.length === u.length ? this.yylloc.first_column : 0) + u[u.length - c.length].length - c[0].length : this.yylloc.first_column - a
|
168
|
+
}, this.options.ranges && (this.yylloc.range = [y[0], y[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 c, u, y;
|
210
|
+
if (this.options.backtrack_lexer && (y = {
|
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 && (y.yylloc.range = this.yylloc.range.slice(0))), u = i[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.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: u ? u[u.length - 1].length - u[u.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], c = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
|
235
|
+
return c;
|
236
|
+
if (this._backtrack) {
|
237
|
+
for (var o in y)
|
238
|
+
this[o] = y[o];
|
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, c, u;
|
249
|
+
this._more || (this.yytext = "", this.match = "");
|
250
|
+
for (var y = this._currentRules(), o = 0; o < y.length; o++)
|
251
|
+
if (c = this._input.match(this.rules[y[o]]), c && (!a || c[0].length > a[0].length)) {
|
252
|
+
if (a = c, u = o, this.options.backtrack_lexer) {
|
253
|
+
if (i = this.test_match(c, y[o]), 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, y[u]), 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 a = this.next();
|
273
|
+
return a || 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(a) {
|
277
|
+
this.conditionStack.push(a);
|
278
|
+
}, "begin"),
|
279
|
+
// pop the previously active lexer condition state off the condition stack
|
280
|
+
popState: /* @__PURE__ */ s(function() {
|
281
|
+
var a = this.conditionStack.length - 1;
|
282
|
+
return a > 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(a) {
|
290
|
+
return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
|
291
|
+
}, "topState"),
|
292
|
+
// alias for begin(condition)
|
293
|
+
pushState: /* @__PURE__ */ s(function(a) {
|
294
|
+
this.begin(a);
|
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(a, c, u, y) {
|
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 21;
|
337
|
+
case 16:
|
338
|
+
return 20;
|
339
|
+
case 17:
|
340
|
+
return 6;
|
341
|
+
case 18:
|
342
|
+
return "INVALID";
|
343
|
+
}
|
344
|
+
}, "anonymous"),
|
345
|
+
rules: [/^(?:%(?!\{)[^\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]|:(?!\s))+)/i, /^(?:[^#:\n]+)/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], inclusive: !0 } }
|
347
|
+
};
|
348
|
+
return x;
|
349
|
+
}();
|
350
|
+
p.lexer = k;
|
351
|
+
function _() {
|
352
|
+
this.yy = {};
|
353
|
+
}
|
354
|
+
return s(_, "Parser"), _.prototype = p, p.Parser = _, new _();
|
355
|
+
}();
|
356
|
+
Q.parser = Q;
|
357
|
+
var Tt = Q, at = {};
|
358
|
+
xt(at, {
|
359
|
+
addEvent: () => yt,
|
360
|
+
addSection: () => ht,
|
361
|
+
addTask: () => pt,
|
362
|
+
addTaskOrg: () => gt,
|
363
|
+
clear: () => ct,
|
364
|
+
default: () => It,
|
365
|
+
getCommonDb: () => ot,
|
366
|
+
getSections: () => dt,
|
367
|
+
getTasks: () => ut
|
368
|
+
});
|
369
|
+
var F = "", lt = 0, X = [], G = [], V = [], ot = /* @__PURE__ */ s(() => kt, "getCommonDb"), ct = /* @__PURE__ */ s(function() {
|
370
|
+
X.length = 0, G.length = 0, F = "", V.length = 0, vt();
|
371
|
+
}, "clear"), ht = /* @__PURE__ */ s(function(n) {
|
372
|
+
F = n, X.push(n);
|
373
|
+
}, "addSection"), dt = /* @__PURE__ */ s(function() {
|
374
|
+
return X;
|
375
|
+
}, "getSections"), ut = /* @__PURE__ */ s(function() {
|
376
|
+
let n = rt();
|
377
|
+
const t = 100;
|
378
|
+
let e = 0;
|
379
|
+
for (; !n && e < t; )
|
380
|
+
n = rt(), e++;
|
381
|
+
return G.push(...V), G;
|
382
|
+
}, "getTasks"), pt = /* @__PURE__ */ s(function(n, t, e) {
|
383
|
+
const l = {
|
384
|
+
id: lt++,
|
385
|
+
section: F,
|
386
|
+
type: F,
|
387
|
+
task: n,
|
388
|
+
score: t || 0,
|
389
|
+
//if event is defined, then add it the events array
|
390
|
+
events: e ? [e] : []
|
391
|
+
};
|
392
|
+
V.push(l);
|
393
|
+
}, "addTask"), yt = /* @__PURE__ */ s(function(n) {
|
394
|
+
V.find((e) => e.id === lt - 1).events.push(n);
|
395
|
+
}, "addEvent"), gt = /* @__PURE__ */ s(function(n) {
|
396
|
+
const t = {
|
397
|
+
section: F,
|
398
|
+
type: F,
|
399
|
+
description: n,
|
400
|
+
task: n,
|
401
|
+
classes: []
|
402
|
+
};
|
403
|
+
G.push(t);
|
404
|
+
}, "addTaskOrg"), rt = /* @__PURE__ */ s(function() {
|
405
|
+
const n = /* @__PURE__ */ s(function(e) {
|
406
|
+
return V[e].processed;
|
407
|
+
}, "compileTask");
|
408
|
+
let t = !0;
|
409
|
+
for (const [e, l] of V.entries())
|
410
|
+
n(e), t = t && l.processed;
|
411
|
+
return t;
|
412
|
+
}, "compileTasks"), It = {
|
413
|
+
clear: ct,
|
414
|
+
getCommonDb: ot,
|
415
|
+
addSection: ht,
|
416
|
+
getSections: dt,
|
417
|
+
getTasks: ut,
|
418
|
+
addTask: pt,
|
419
|
+
addTaskOrg: gt,
|
420
|
+
addEvent: yt
|
421
|
+
}, Nt = 12, q = /* @__PURE__ */ s(function(n, t) {
|
422
|
+
const e = n.append("rect");
|
423
|
+
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;
|
424
|
+
}, "drawRect"), Lt = /* @__PURE__ */ s(function(n, t) {
|
425
|
+
const l = n.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), r = n.append("g");
|
426
|
+
r.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"), r.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");
|
427
|
+
function d(m) {
|
428
|
+
const p = nt().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
|
429
|
+
m.append("path").attr("class", "mouth").attr("d", p).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
|
430
|
+
}
|
431
|
+
s(d, "smile");
|
432
|
+
function h(m) {
|
433
|
+
const p = nt().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
|
434
|
+
m.append("path").attr("class", "mouth").attr("d", p).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
|
435
|
+
}
|
436
|
+
s(h, "sad");
|
437
|
+
function f(m) {
|
438
|
+
m.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");
|
439
|
+
}
|
440
|
+
return s(f, "ambivalent"), t.score > 3 ? d(r) : t.score < 3 ? h(r) : f(r), l;
|
441
|
+
}, "drawFace"), $t = /* @__PURE__ */ s(function(n, t) {
|
442
|
+
const e = n.append("circle");
|
443
|
+
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;
|
444
|
+
}, "drawCircle"), ft = /* @__PURE__ */ s(function(n, t) {
|
445
|
+
const e = t.text.replace(/<br\s*\/?>/gi, " "), l = n.append("text");
|
446
|
+
l.attr("x", t.x), l.attr("y", t.y), l.attr("class", "legend"), l.style("text-anchor", t.anchor), t.class !== void 0 && l.attr("class", t.class);
|
447
|
+
const r = l.append("tspan");
|
448
|
+
return r.attr("x", t.x + t.textMargin * 2), r.text(e), l;
|
449
|
+
}, "drawText"), Mt = /* @__PURE__ */ s(function(n, t) {
|
450
|
+
function e(r, d, h, f, m) {
|
451
|
+
return r + "," + d + " " + (r + h) + "," + d + " " + (r + h) + "," + (d + f - m) + " " + (r + h - m * 1.2) + "," + (d + f) + " " + r + "," + (d + f);
|
452
|
+
}
|
453
|
+
s(e, "genPoints");
|
454
|
+
const l = n.append("polygon");
|
455
|
+
l.attr("points", e(t.x, t.y, 50, 20, 7)), l.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, ft(n, t);
|
456
|
+
}, "drawLabel"), Ht = /* @__PURE__ */ s(function(n, t, e) {
|
457
|
+
const l = n.append("g"), r = Y();
|
458
|
+
r.x = t.x, r.y = t.y, r.fill = t.fill, r.width = e.width, r.height = e.height, r.class = "journey-section section-type-" + t.num, r.rx = 3, r.ry = 3, q(l, r), mt(e)(
|
459
|
+
t.text,
|
460
|
+
l,
|
461
|
+
r.x,
|
462
|
+
r.y,
|
463
|
+
r.width,
|
464
|
+
r.height,
|
465
|
+
{ class: "journey-section section-type-" + t.num },
|
466
|
+
e,
|
467
|
+
t.colour
|
468
|
+
);
|
469
|
+
}, "drawSection"), it = -1, Pt = /* @__PURE__ */ s(function(n, t, e) {
|
470
|
+
const l = t.x + e.width / 2, r = n.append("g");
|
471
|
+
it++;
|
472
|
+
const d = 300 + 5 * 30;
|
473
|
+
r.append("line").attr("id", "task" + it).attr("x1", l).attr("y1", t.y).attr("x2", l).attr("y2", d).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Lt(r, {
|
474
|
+
cx: l,
|
475
|
+
cy: 300 + (5 - t.score) * 30,
|
476
|
+
score: t.score
|
477
|
+
});
|
478
|
+
const h = Y();
|
479
|
+
h.x = t.x, h.y = t.y, h.fill = t.fill, h.width = e.width, h.height = e.height, h.class = "task task-type-" + t.num, h.rx = 3, h.ry = 3, q(r, h), mt(e)(
|
480
|
+
t.task,
|
481
|
+
r,
|
482
|
+
h.x,
|
483
|
+
h.y,
|
484
|
+
h.width,
|
485
|
+
h.height,
|
486
|
+
{ class: "task" },
|
487
|
+
e,
|
488
|
+
t.colour
|
489
|
+
);
|
490
|
+
}, "drawTask"), At = /* @__PURE__ */ s(function(n, t) {
|
491
|
+
q(n, {
|
492
|
+
x: t.startx,
|
493
|
+
y: t.starty,
|
494
|
+
width: t.stopx - t.startx,
|
495
|
+
height: t.stopy - t.starty,
|
496
|
+
fill: t.fill,
|
497
|
+
class: "rect"
|
498
|
+
}).lower();
|
499
|
+
}, "drawBackgroundRect"), Ct = /* @__PURE__ */ s(function() {
|
500
|
+
return {
|
501
|
+
x: 0,
|
502
|
+
y: 0,
|
503
|
+
fill: void 0,
|
504
|
+
"text-anchor": "start",
|
505
|
+
width: 100,
|
506
|
+
height: 100,
|
507
|
+
textMargin: 0,
|
508
|
+
rx: 0,
|
509
|
+
ry: 0
|
510
|
+
};
|
511
|
+
}, "getTextObj"), Y = /* @__PURE__ */ s(function() {
|
512
|
+
return {
|
513
|
+
x: 0,
|
514
|
+
y: 0,
|
515
|
+
width: 100,
|
516
|
+
anchor: "start",
|
517
|
+
height: 100,
|
518
|
+
rx: 0,
|
519
|
+
ry: 0
|
520
|
+
};
|
521
|
+
}, "getNoteRect"), mt = /* @__PURE__ */ function() {
|
522
|
+
function n(r, d, h, f, m, p, k, _) {
|
523
|
+
const x = d.append("text").attr("x", h + m / 2).attr("y", f + p / 2 + 5).style("font-color", _).style("text-anchor", "middle").text(r);
|
524
|
+
l(x, k);
|
525
|
+
}
|
526
|
+
s(n, "byText");
|
527
|
+
function t(r, d, h, f, m, p, k, _, x) {
|
528
|
+
const { taskFontSize: i, taskFontFamily: a } = _, c = r.split(/<br\s*\/?>/gi);
|
529
|
+
for (let u = 0; u < c.length; u++) {
|
530
|
+
const y = u * i - i * (c.length - 1) / 2, o = d.append("text").attr("x", h + m / 2).attr("y", f).attr("fill", x).style("text-anchor", "middle").style("font-size", i).style("font-family", a);
|
531
|
+
o.append("tspan").attr("x", h + m / 2).attr("dy", y).text(c[u]), o.attr("y", f + p / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), l(o, k);
|
532
|
+
}
|
533
|
+
}
|
534
|
+
s(t, "byTspan");
|
535
|
+
function e(r, d, h, f, m, p, k, _) {
|
536
|
+
const x = d.append("switch"), a = x.append("foreignObject").attr("x", h).attr("y", f).attr("width", m).attr("height", p).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
537
|
+
a.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(r), t(r, x, h, f, m, p, k, _), l(a, k);
|
538
|
+
}
|
539
|
+
s(e, "byFo");
|
540
|
+
function l(r, d) {
|
541
|
+
for (const h in d)
|
542
|
+
h in d && r.attr(h, d[h]);
|
543
|
+
}
|
544
|
+
return s(l, "_setTextAttrs"), function(r) {
|
545
|
+
return r.textPlacement === "fo" ? e : r.textPlacement === "old" ? n : t;
|
546
|
+
};
|
547
|
+
}(), Rt = /* @__PURE__ */ s(function(n) {
|
548
|
+
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");
|
549
|
+
}, "initGraphics");
|
550
|
+
function D(n, t) {
|
551
|
+
n.each(function() {
|
552
|
+
var e = j(this), l = e.text().split(/(\s+|<br>)/).reverse(), r, d = [], h = 1.1, f = e.attr("y"), m = parseFloat(e.attr("dy")), p = e.text(null).append("tspan").attr("x", 0).attr("y", f).attr("dy", m + "em");
|
553
|
+
for (let k = 0; k < l.length; k++)
|
554
|
+
r = l[l.length - 1 - k], d.push(r), p.text(d.join(" ").trim()), (p.node().getComputedTextLength() > t || r === "<br>") && (d.pop(), p.text(d.join(" ").trim()), r === "<br>" ? d = [""] : d = [r], p = e.append("tspan").attr("x", 0).attr("y", f).attr("dy", h + "em").text(r));
|
555
|
+
});
|
556
|
+
}
|
557
|
+
s(D, "wrap");
|
558
|
+
var Ft = /* @__PURE__ */ s(function(n, t, e, l) {
|
559
|
+
const r = e % Nt - 1, d = n.append("g");
|
560
|
+
t.section = r, d.attr(
|
561
|
+
"class",
|
562
|
+
(t.class ? t.class + " " : "") + "timeline-node " + ("section-" + r)
|
563
|
+
);
|
564
|
+
const h = d.append("g"), f = d.append("g"), p = f.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(D, t.width).node().getBBox(), k = l.fontSize?.replace ? l.fontSize.replace("px", "") : l.fontSize;
|
565
|
+
return t.height = p.height + k * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, f.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), Wt(h, t, r, l), t;
|
566
|
+
}, "drawNode"), Vt = /* @__PURE__ */ s(function(n, t, e) {
|
567
|
+
const l = n.append("g"), d = l.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(D, t.width).node().getBBox(), h = e.fontSize?.replace ? e.fontSize.replace("px", "") : e.fontSize;
|
568
|
+
return l.remove(), d.height + h * 1.1 * 0.5 + t.padding;
|
569
|
+
}, "getVirtualNodeHeight"), Wt = /* @__PURE__ */ s(function(n, t, e) {
|
570
|
+
n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr(
|
571
|
+
"d",
|
572
|
+
`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`
|
573
|
+
), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
|
574
|
+
}, "defaultBkg"), C = {
|
575
|
+
drawRect: q,
|
576
|
+
drawCircle: $t,
|
577
|
+
drawSection: Ht,
|
578
|
+
drawText: ft,
|
579
|
+
drawLabel: Mt,
|
580
|
+
drawTask: Pt,
|
581
|
+
drawBackgroundRect: At,
|
582
|
+
getTextObj: Ct,
|
583
|
+
getNoteRect: Y,
|
584
|
+
initGraphics: Rt,
|
585
|
+
drawNode: Ft,
|
586
|
+
getVirtualNodeHeight: Vt
|
587
|
+
}, zt = /* @__PURE__ */ s(function(n, t, e, l) {
|
588
|
+
const r = _t(), d = r.leftMargin ?? 50;
|
589
|
+
E.debug("timeline", l.db);
|
590
|
+
const h = r.securityLevel;
|
591
|
+
let f;
|
592
|
+
h === "sandbox" && (f = j("#i" + t));
|
593
|
+
const p = (h === "sandbox" ? j(f.nodes()[0].contentDocument.body) : j("body")).select("#" + t);
|
594
|
+
p.append("g");
|
595
|
+
const k = l.db.getTasks(), _ = l.db.getCommonDb().getDiagramTitle();
|
596
|
+
E.debug("task", k), C.initGraphics(p);
|
597
|
+
const x = l.db.getSections();
|
598
|
+
E.debug("sections", x);
|
599
|
+
let i = 0, a = 0, c = 0, u = 0, y = 50 + d, o = 50;
|
600
|
+
u = 50;
|
601
|
+
let w = 0, v = !0;
|
602
|
+
x.forEach(function(H) {
|
603
|
+
const g = {
|
604
|
+
number: w,
|
605
|
+
descr: H,
|
606
|
+
section: w,
|
607
|
+
width: 150,
|
608
|
+
padding: 20,
|
609
|
+
maxHeight: i
|
610
|
+
}, b = C.getVirtualNodeHeight(p, g, r);
|
611
|
+
E.debug("sectionHeight before draw", b), i = Math.max(i, b + 20);
|
612
|
+
});
|
613
|
+
let N = 0, P = 0;
|
614
|
+
E.debug("tasks.length", k.length);
|
615
|
+
for (const [H, g] of k.entries()) {
|
616
|
+
const b = {
|
617
|
+
number: H,
|
618
|
+
descr: g,
|
619
|
+
section: g.section,
|
620
|
+
width: 150,
|
621
|
+
padding: 20,
|
622
|
+
maxHeight: a
|
623
|
+
}, L = C.getVirtualNodeHeight(p, b, r);
|
624
|
+
E.debug("taskHeight before draw", L), a = Math.max(a, L + 20), N = Math.max(N, g.events.length);
|
625
|
+
let $ = 0;
|
626
|
+
for (const z of g.events) {
|
627
|
+
const Z = {
|
628
|
+
descr: z,
|
629
|
+
section: g.section,
|
630
|
+
number: g.section,
|
631
|
+
width: 150,
|
632
|
+
padding: 20,
|
633
|
+
maxHeight: 50
|
634
|
+
};
|
635
|
+
$ += C.getVirtualNodeHeight(p, Z, r);
|
636
|
+
}
|
637
|
+
g.events.length > 0 && ($ += (g.events.length - 1) * 10), P = Math.max(P, $);
|
638
|
+
}
|
639
|
+
E.debug("maxSectionHeight before draw", i), E.debug("maxTaskHeight before draw", a), x && x.length > 0 ? x.forEach((H) => {
|
640
|
+
const g = k.filter((z) => z.section === H), b = {
|
641
|
+
number: w,
|
642
|
+
descr: H,
|
643
|
+
section: w,
|
644
|
+
width: 200 * Math.max(g.length, 1) - 50,
|
645
|
+
padding: 20,
|
646
|
+
maxHeight: i
|
647
|
+
};
|
648
|
+
E.debug("sectionNode", b);
|
649
|
+
const L = p.append("g"), $ = C.drawNode(L, b, w, r);
|
650
|
+
E.debug("sectionNode output", $), L.attr("transform", `translate(${y}, ${u})`), o += i + 50, g.length > 0 && st(
|
651
|
+
p,
|
652
|
+
g,
|
653
|
+
w,
|
654
|
+
y,
|
655
|
+
o,
|
656
|
+
a,
|
657
|
+
r,
|
658
|
+
N,
|
659
|
+
P,
|
660
|
+
i,
|
661
|
+
!1
|
662
|
+
), y += 200 * Math.max(g.length, 1), o = u, w++;
|
663
|
+
}) : (v = !1, st(
|
664
|
+
p,
|
665
|
+
k,
|
666
|
+
w,
|
667
|
+
y,
|
668
|
+
o,
|
669
|
+
a,
|
670
|
+
r,
|
671
|
+
N,
|
672
|
+
P,
|
673
|
+
i,
|
674
|
+
!0
|
675
|
+
));
|
676
|
+
const W = p.node().getBBox();
|
677
|
+
E.debug("bounds", W), _ && p.append("text").text(_).attr("x", W.width / 2 - d).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), c = v ? i + a + 150 : a + 100, p.append("g").attr("class", "lineWrapper").append("line").attr("x1", d).attr("y1", c).attr("x2", W.width + 3 * d).attr("y2", c).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), bt(
|
678
|
+
void 0,
|
679
|
+
p,
|
680
|
+
r.timeline?.padding ?? 50,
|
681
|
+
r.timeline?.useMaxWidth ?? !1
|
682
|
+
);
|
683
|
+
}, "draw"), st = /* @__PURE__ */ s(function(n, t, e, l, r, d, h, f, m, p, k) {
|
684
|
+
for (const _ of t) {
|
685
|
+
const x = {
|
686
|
+
descr: _.task,
|
687
|
+
section: e,
|
688
|
+
number: e,
|
689
|
+
width: 150,
|
690
|
+
padding: 20,
|
691
|
+
maxHeight: d
|
692
|
+
};
|
693
|
+
E.debug("taskNode", x);
|
694
|
+
const i = n.append("g").attr("class", "taskWrapper"), c = C.drawNode(i, x, e, h).height;
|
695
|
+
if (E.debug("taskHeight after draw", c), i.attr("transform", `translate(${l}, ${r})`), d = Math.max(d, c), _.events) {
|
696
|
+
const u = n.append("g").attr("class", "lineWrapper");
|
697
|
+
let y = d;
|
698
|
+
r += 100, y = y + Bt(n, _.events, e, l, r, h), r -= 100, u.append("line").attr("x1", l + 190 / 2).attr("y1", r + d).attr("x2", l + 190 / 2).attr("y2", r + d + 100 + m + 100).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
|
699
|
+
}
|
700
|
+
l = l + 200, k && !h.timeline?.disableMulticolor && e++;
|
701
|
+
}
|
702
|
+
r = r - 10;
|
703
|
+
}, "drawTasks"), Bt = /* @__PURE__ */ s(function(n, t, e, l, r, d) {
|
704
|
+
let h = 0;
|
705
|
+
const f = r;
|
706
|
+
r = r + 100;
|
707
|
+
for (const m of t) {
|
708
|
+
const p = {
|
709
|
+
descr: m,
|
710
|
+
section: e,
|
711
|
+
number: e,
|
712
|
+
width: 150,
|
713
|
+
padding: 20,
|
714
|
+
maxHeight: 50
|
715
|
+
};
|
716
|
+
E.debug("eventNode", p);
|
717
|
+
const k = n.append("g").attr("class", "eventWrapper"), x = C.drawNode(k, p, e, d).height;
|
718
|
+
h = h + x, k.attr("transform", `translate(${l}, ${r})`), r = r + 10 + x;
|
719
|
+
}
|
720
|
+
return r = f, h;
|
721
|
+
}, "drawEvents"), Ot = {
|
722
|
+
setConf: /* @__PURE__ */ s(() => {
|
723
|
+
}, "setConf"),
|
724
|
+
draw: zt
|
725
|
+
}, jt = /* @__PURE__ */ s((n) => {
|
726
|
+
let t = "";
|
727
|
+
for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
|
728
|
+
n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], wt(n["lineColor" + e]) ? n["lineColor" + e] = St(n["lineColor" + e], 20) : n["lineColor" + e] = Et(n["lineColor" + e], 20);
|
729
|
+
for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) {
|
730
|
+
const l = "" + (17 - 3 * e);
|
731
|
+
t += `
|
732
|
+
.section-${e - 1} rect, .section-${e - 1} path, .section-${e - 1} circle, .section-${e - 1} path {
|
733
|
+
fill: ${n["cScale" + e]};
|
734
|
+
}
|
735
|
+
.section-${e - 1} text {
|
736
|
+
fill: ${n["cScaleLabel" + e]};
|
737
|
+
}
|
738
|
+
.node-icon-${e - 1} {
|
739
|
+
font-size: 40px;
|
740
|
+
color: ${n["cScaleLabel" + e]};
|
741
|
+
}
|
742
|
+
.section-edge-${e - 1}{
|
743
|
+
stroke: ${n["cScale" + e]};
|
744
|
+
}
|
745
|
+
.edge-depth-${e - 1}{
|
746
|
+
stroke-width: ${l};
|
747
|
+
}
|
748
|
+
.section-${e - 1} line {
|
749
|
+
stroke: ${n["cScaleInv" + e]} ;
|
750
|
+
stroke-width: 3;
|
751
|
+
}
|
752
|
+
|
753
|
+
.lineWrapper line{
|
754
|
+
stroke: ${n["cScaleLabel" + e]} ;
|
755
|
+
}
|
756
|
+
|
757
|
+
.disabled, .disabled circle, .disabled text {
|
758
|
+
fill: lightgray;
|
759
|
+
}
|
760
|
+
.disabled text {
|
761
|
+
fill: #efefef;
|
762
|
+
}
|
763
|
+
`;
|
764
|
+
}
|
765
|
+
return t;
|
766
|
+
}, "genSections"), Gt = /* @__PURE__ */ s((n) => `
|
767
|
+
.edge {
|
768
|
+
stroke-width: 3;
|
769
|
+
}
|
770
|
+
${jt(n)}
|
771
|
+
.section-root rect, .section-root path, .section-root circle {
|
772
|
+
fill: ${n.git0};
|
773
|
+
}
|
774
|
+
.section-root text {
|
775
|
+
fill: ${n.gitBranchLabel0};
|
776
|
+
}
|
777
|
+
.icon-container {
|
778
|
+
height:100%;
|
779
|
+
display: flex;
|
780
|
+
justify-content: center;
|
781
|
+
align-items: center;
|
782
|
+
}
|
783
|
+
.edge {
|
784
|
+
fill: none;
|
785
|
+
}
|
786
|
+
.eventWrapper {
|
787
|
+
filter: brightness(120%);
|
788
|
+
}
|
789
|
+
`, "getStyles"), qt = Gt, Jt = {
|
790
|
+
db: at,
|
791
|
+
renderer: Ot,
|
792
|
+
parser: Tt,
|
793
|
+
styles: qt
|
794
|
+
};
|
795
|
+
export {
|
796
|
+
Jt as diagram
|
797
|
+
};
|