bg-editor 0.0.7 → 0.0.9

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