@kong-ui-public/documentation 1.5.77 → 1.6.0

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 (63) hide show
  1. package/dist/{arc-DZdQjcG8-C_2Dx6GQ.js → arc-DZdQjcG8-CduayE88.js} +2 -2
  2. package/dist/{architectureDiagram-3BPJPVTR-By_DXDyu-DTj86bUZ.js → architectureDiagram-3BPJPVTR-By_DXDyu-U3MSLbOU.js} +1506 -1513
  3. package/dist/blockDiagram-GPEHLZMM-9Cp9Hbl7-CKP-SiVG.js +3268 -0
  4. package/dist/{c4Diagram-AAUBKEIU-ftdwlfdB-CYiERTWJ.js → c4Diagram-AAUBKEIU-ftdwlfdB-D3A61SdV.js} +11 -12
  5. package/dist/{channel-DM9j7IFL-CjNPz4Hd.js → channel-DM9j7IFL-DxqBUxfY.js} +1 -1
  6. package/dist/{chunk-2J33WTMH-CBbjVzWb-BAAd-TK5.js → chunk-2J33WTMH-CBbjVzWb-0og4LHQ-.js} +7 -8
  7. package/dist/chunk-4BX2VUAB-C_NnimAy--QQ0Db2V.js +8 -0
  8. package/dist/{chunk-55IACEB6-DZn1aNO0-_bs5ibIB.js → chunk-55IACEB6-DZn1aNO0-A3zOZ7dT.js} +1 -1
  9. package/dist/{chunk-727SXJPM-B2_6_WLv-CzbzsbtK.js → chunk-727SXJPM-B2_6_WLv-Bs3CxHaX.js} +548 -549
  10. package/dist/{chunk-AQP2D5EJ-DEAEiJjW-BPr5JvkB.js → chunk-AQP2D5EJ-DEAEiJjW-DTbwZT8N.js} +446 -458
  11. package/dist/{chunk-FMBD7UC4-D_tZ4Dxg-BUygZnCT.js → chunk-FMBD7UC4-D_tZ4Dxg-DwjoPGUH.js} +1 -1
  12. package/dist/{chunk-ND2GUHAM-Duw3k8MU-Dr8SD23L.js → chunk-ND2GUHAM-Duw3k8MU-HmrdHLJ9.js} +1 -1
  13. package/dist/{chunk-QZHKN3VN-DN6nBdn0-DxWE5zsM.js → chunk-QZHKN3VN-DN6nBdn0-BvQOETVz.js} +1 -1
  14. package/dist/classDiagram-4FO5ZUOK-Du5qFrfN-BqXc0etQ.js +17 -0
  15. package/dist/classDiagram-v2-Q7XG4LA2-DM6zutfc-BqXc0etQ.js +17 -0
  16. package/dist/{cose-bilkent-S5V4N54A-0ZumbVgj-BKcFQWbE.js → cose-bilkent-S5V4N54A-0ZumbVgj-0z7CQbIH.js} +465 -465
  17. package/dist/{cytoscape.esm-BDIiOYYO-BbddfVIJ.js → cytoscape.esm-BDIiOYYO-C1jMBhD8.js} +356 -371
  18. package/dist/dagre-BM42HDAG-qMWMsyLb-DGMrq3i3.js +288 -0
  19. package/dist/{dagre-DJxg_nfI-BzVw7cNP.js → dagre-DJxg_nfI-hVOVexz-.js} +9 -9
  20. package/dist/{diagram-2AECGRRQ-B2gF_dHe-DCRSlKG-.js → diagram-2AECGRRQ-B2gF_dHe-Bv_EpxRz.js} +10 -14
  21. package/dist/{diagram-5GNKFQAL-DJ9WwRrD-DtSWJY6-.js → diagram-5GNKFQAL-DJ9WwRrD-WVvm0Icu.js} +4 -4
  22. package/dist/{diagram-KO2AKTUF-RfkqD-VW-ZR9mxccc.js → diagram-KO2AKTUF-RfkqD-VW-yyAds1Qq.js} +153 -156
  23. package/dist/{diagram-LMA3HP47-Ct7s9hIt-DXtPBRn4.js → diagram-LMA3HP47-Ct7s9hIt-Dy6f9BAO.js} +21 -22
  24. package/dist/{diagram-OG6HWLK6-BSYJ2CoI-DX1BfXw6.js → diagram-OG6HWLK6-BSYJ2CoI-ckmfat-L.js} +79 -81
  25. package/dist/documentation.es.js +1 -1
  26. package/dist/documentation.umd.js +374 -374
  27. package/dist/{erDiagram-TEJ5UH35-BudwiSYX-BPA5-1u6.js → erDiagram-TEJ5UH35-BudwiSYX-bVzp1Kjr.js} +134 -135
  28. package/dist/{flowDiagram-I6XJVG4X-B23Smlxp-Cb24VZnb.js → flowDiagram-I6XJVG4X-B23Smlxp-ClHvdCdJ.js} +842 -849
  29. package/dist/{ganttDiagram-6RSMTGT7-C-i89z_P-DEdTFlTH.js → ganttDiagram-6RSMTGT7-C-i89z_P-t5UAyRM5.js} +46 -46
  30. package/dist/gitGraphDiagram-PVQCEYII-DpVfXnUD-Cg3smOdz.js +734 -0
  31. package/dist/{graphlib-D2YdGpuK-CM8PX5pf.js → graphlib-D2YdGpuK-CnQPmzkS.js} +17 -17
  32. package/dist/{index-Dpyqhws4.js → index-DfVKdDwj.js} +16258 -16515
  33. package/dist/{infoDiagram-5YYISTIA-CDUwzFql-BsbTK2Me.js → infoDiagram-5YYISTIA-CDUwzFql-Bmthmcp4.js} +2 -2
  34. package/dist/{ishikawaDiagram-YF4QCWOH-MfYdx0rK-DsWP0O6d.js → ishikawaDiagram-YF4QCWOH-MfYdx0rK-cbltssua.js} +137 -138
  35. package/dist/{journeyDiagram-JHISSGLW-C_udOPtJ-BkIf9B4Q.js → journeyDiagram-JHISSGLW-C_udOPtJ-BjAvgSAR.js} +13 -13
  36. package/dist/{kanban-definition-UN3LZRKU-C1Su-UOY-6sw-wDwK.js → kanban-definition-UN3LZRKU-C1Su-UOY-DZ93dsWZ.js} +334 -336
  37. package/dist/{katex-D7tFlpqA-B7yKriH4.js → katex-D7tFlpqA-BOSQxXe1.js} +254 -256
  38. package/dist/{linear-1MXhYum8-CfR5ywK4.js → linear-1MXhYum8-9C1jno9G.js} +5 -5
  39. package/dist/{mindmap-definition-RKZ34NQL-MuSV765K-Cv2rDIFS.js → mindmap-definition-RKZ34NQL-MuSV765K-Kub1iXFv.js} +94 -97
  40. package/dist/{ordinal-D9ksOc8y-CrGveXkB.js → ordinal-D9ksOc8y-2hZwLyEk.js} +1 -1
  41. package/dist/{pieDiagram-4H26LBE5-TgFp7J6_-C8m2xJbj.js → pieDiagram-4H26LBE5-TgFp7J6_-i6NxP3Xz.js} +43 -44
  42. package/dist/{quadrantDiagram-W4KKPZXB-DKPne3o_-D0Tfl8NQ.js → quadrantDiagram-W4KKPZXB-DKPne3o_-DXLHqRuR.js} +351 -353
  43. package/dist/{requirementDiagram-4Y6WPE33-vh8uUAp_-C5zLx-_o.js → requirementDiagram-4Y6WPE33-vh8uUAp_-CHtsISxP.js} +384 -386
  44. package/dist/{sankeyDiagram-5OEKKPKP-Cgs6W_El-DBrv4QL_.js → sankeyDiagram-5OEKKPKP-Cgs6W_El-D7GZyd8n.js} +178 -178
  45. package/dist/{sequenceDiagram-3UESZ5HK-C5F57Dkt-D6DqZiJP.js → sequenceDiagram-3UESZ5HK-C5F57Dkt-BW1Hb7UW.js} +643 -653
  46. package/dist/{stateDiagram-AJRCARHV-09dUKG6Y-9QhAIhCk.js → stateDiagram-AJRCARHV-09dUKG6Y-Dm2a1vNu.js} +5 -5
  47. package/dist/stateDiagram-v2-BHNVJYJU-CWqmRt12-DbWzZ-j-.js +16 -0
  48. package/dist/style.css +1 -1
  49. package/dist/timeline-definition-PNZ67QCA-CCndyx0V-B5CT96H-.js +1095 -0
  50. package/dist/{vennDiagram-CIIHVFJN-DQfKxM3L-086u82L3.js → vennDiagram-CIIHVFJN-DQfKxM3L-qUaKEl7l.js} +596 -603
  51. package/dist/{wardley-L42UT6IY-BjAkE_cs-li1xYed9.js → wardley-L42UT6IY-BjAkE_cs-C-giFqos.js} +5760 -5809
  52. package/dist/wardleyDiagram-YWT4CUSO-Bf9L2NsL-DXPF2Ee9.js +639 -0
  53. package/dist/{xychartDiagram-2RQKCTM6-ChNH3q1U--vbcTXH5.js → xychartDiagram-2RQKCTM6-ChNH3q1U-a59DsJDA.js} +10 -10
  54. package/package.json +4 -4
  55. package/dist/blockDiagram-GPEHLZMM-9Cp9Hbl7-CSQRWfog.js +0 -3278
  56. package/dist/chunk-4BX2VUAB-C_NnimAy-B-8x_g6K.js +0 -9
  57. package/dist/classDiagram-4FO5ZUOK-Du5qFrfN-DLmqgbj1.js +0 -17
  58. package/dist/classDiagram-v2-Q7XG4LA2-DM6zutfc-DLmqgbj1.js +0 -17
  59. package/dist/dagre-BM42HDAG-qMWMsyLb-BzK2-5zM.js +0 -291
  60. package/dist/gitGraphDiagram-PVQCEYII-DpVfXnUD-BtfdBLxW.js +0 -747
  61. package/dist/stateDiagram-v2-BHNVJYJU-CWqmRt12-Br5eF-5b.js +0 -16
  62. package/dist/timeline-definition-PNZ67QCA-CCndyx0V-CkhwKYjQ.js +0 -1106
  63. package/dist/wardleyDiagram-YWT4CUSO-Bf9L2NsL-CCMCDU5F.js +0 -647
@@ -0,0 +1,1095 @@
1
+ import { p as o, o as pt, ar as At, as as Dt, at as Ot, Z as gt, g as k, a0 as Bt, a1 as Rt, au as ft, q as U, n as Pt, av as Wt, H as jt } from "./index-DfVKdDwj.js";
2
+ import { x as ot } from "./arc-DZdQjcG8-CduayE88.js";
3
+ var K = (function() {
4
+ var e = /* @__PURE__ */ o(function(n, p, c, u) {
5
+ for (c ||= {}, u = n.length; u--; c[n[u]] = p) ;
6
+ return c;
7
+ }, "o"), t = [
8
+ 6,
9
+ 11,
10
+ 13,
11
+ 14,
12
+ 15,
13
+ 17,
14
+ 19,
15
+ 20,
16
+ 23,
17
+ 24
18
+ ], r = [1, 12], s = [1, 13], i = [1, 14], h = [1, 15], a = [1, 16], d = [1, 19], m = [1, 20], y = {
19
+ trace: /* @__PURE__ */ o(function() {
20
+ }, "trace"),
21
+ yy: {},
22
+ symbols_: {
23
+ error: 2,
24
+ start: 3,
25
+ timeline_header: 4,
26
+ document: 5,
27
+ EOF: 6,
28
+ timeline: 7,
29
+ timeline_lr: 8,
30
+ timeline_td: 9,
31
+ line: 10,
32
+ SPACE: 11,
33
+ statement: 12,
34
+ NEWLINE: 13,
35
+ title: 14,
36
+ acc_title: 15,
37
+ acc_title_value: 16,
38
+ acc_descr: 17,
39
+ acc_descr_value: 18,
40
+ acc_descr_multiline_value: 19,
41
+ section: 20,
42
+ period_statement: 21,
43
+ event_statement: 22,
44
+ period: 23,
45
+ event: 24,
46
+ $accept: 0,
47
+ $end: 1
48
+ },
49
+ terminals_: {
50
+ 2: "error",
51
+ 6: "EOF",
52
+ 7: "timeline",
53
+ 8: "timeline_lr",
54
+ 9: "timeline_td",
55
+ 11: "SPACE",
56
+ 13: "NEWLINE",
57
+ 14: "title",
58
+ 15: "acc_title",
59
+ 16: "acc_title_value",
60
+ 17: "acc_descr",
61
+ 18: "acc_descr_value",
62
+ 19: "acc_descr_multiline_value",
63
+ 20: "section",
64
+ 23: "period",
65
+ 24: "event"
66
+ },
67
+ productions_: [
68
+ 0,
69
+ [3, 3],
70
+ [4, 1],
71
+ [4, 1],
72
+ [4, 1],
73
+ [5, 0],
74
+ [5, 2],
75
+ [10, 2],
76
+ [10, 1],
77
+ [10, 1],
78
+ [10, 1],
79
+ [12, 1],
80
+ [12, 2],
81
+ [12, 2],
82
+ [12, 1],
83
+ [12, 1],
84
+ [12, 1],
85
+ [12, 1],
86
+ [21, 1],
87
+ [22, 1]
88
+ ],
89
+ performAction: /* @__PURE__ */ o(function(n, p, c, u, g, l, S) {
90
+ var x = l.length - 1;
91
+ switch (g) {
92
+ case 1:
93
+ return l[x - 1];
94
+ case 3:
95
+ u.setDirection("LR");
96
+ break;
97
+ case 4:
98
+ u.setDirection("TD");
99
+ break;
100
+ case 5:
101
+ this.$ = [];
102
+ break;
103
+ case 6:
104
+ l[x - 1].push(l[x]), this.$ = l[x - 1];
105
+ break;
106
+ case 7:
107
+ case 8:
108
+ this.$ = l[x];
109
+ break;
110
+ case 9:
111
+ case 10:
112
+ this.$ = [];
113
+ break;
114
+ case 11:
115
+ u.getCommonDb().setDiagramTitle(l[x].substr(6)), this.$ = l[x].substr(6);
116
+ break;
117
+ case 12:
118
+ this.$ = l[x].trim(), u.getCommonDb().setAccTitle(this.$);
119
+ break;
120
+ case 13:
121
+ case 14:
122
+ this.$ = l[x].trim(), u.getCommonDb().setAccDescription(this.$);
123
+ break;
124
+ case 15:
125
+ u.addSection(l[x].substr(8)), this.$ = l[x].substr(8);
126
+ break;
127
+ case 18:
128
+ u.addTask(l[x], 0, ""), this.$ = l[x];
129
+ break;
130
+ case 19:
131
+ u.addEvent(l[x].substr(2)), this.$ = l[x];
132
+ break;
133
+ }
134
+ }, "anonymous"),
135
+ table: [
136
+ {
137
+ 3: 1,
138
+ 4: 2,
139
+ 7: [1, 3],
140
+ 8: [1, 4],
141
+ 9: [1, 5]
142
+ },
143
+ { 1: [3] },
144
+ e(t, [2, 5], { 5: 6 }),
145
+ e(t, [2, 2]),
146
+ e(t, [2, 3]),
147
+ e(t, [2, 4]),
148
+ {
149
+ 6: [1, 7],
150
+ 10: 8,
151
+ 11: [1, 9],
152
+ 12: 10,
153
+ 13: [1, 11],
154
+ 14: r,
155
+ 15: s,
156
+ 17: i,
157
+ 19: h,
158
+ 20: a,
159
+ 21: 17,
160
+ 22: 18,
161
+ 23: d,
162
+ 24: m
163
+ },
164
+ e(t, [2, 10], { 1: [2, 1] }),
165
+ e(t, [2, 6]),
166
+ {
167
+ 12: 21,
168
+ 14: r,
169
+ 15: s,
170
+ 17: i,
171
+ 19: h,
172
+ 20: a,
173
+ 21: 17,
174
+ 22: 18,
175
+ 23: d,
176
+ 24: m
177
+ },
178
+ e(t, [2, 8]),
179
+ e(t, [2, 9]),
180
+ e(t, [2, 11]),
181
+ { 16: [1, 22] },
182
+ { 18: [1, 23] },
183
+ e(t, [2, 14]),
184
+ e(t, [2, 15]),
185
+ e(t, [2, 16]),
186
+ e(t, [2, 17]),
187
+ e(t, [2, 18]),
188
+ e(t, [2, 19]),
189
+ e(t, [2, 7]),
190
+ e(t, [2, 12]),
191
+ e(t, [2, 13])
192
+ ],
193
+ defaultActions: {},
194
+ parseError: /* @__PURE__ */ o(function(n, p) {
195
+ if (p.recoverable) this.trace(n);
196
+ else {
197
+ var c = Error(n);
198
+ throw c.hash = p, c;
199
+ }
200
+ }, "parseError"),
201
+ parse: /* @__PURE__ */ o(function(n) {
202
+ var p = this, c = [0], u = [], g = [null], l = [], S = this.table, x = "", $ = 0, P = 0, A = 0, W = 2, D = 1, H = l.slice.call(arguments, 1), b = Object.create(this.lexer), M = { yy: {} };
203
+ for (var B in this.yy) Object.prototype.hasOwnProperty.call(this.yy, B) && (M.yy[B] = this.yy[B]);
204
+ b.setInput(n, M.yy), M.yy.lexer = b, M.yy.parser = this, b.yylloc === void 0 && (b.yylloc = {});
205
+ var R = b.yylloc;
206
+ l.push(R);
207
+ var L = b.options && b.options.ranges;
208
+ typeof M.yy.parseError == "function" ? this.parseError = M.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
209
+ function _(C) {
210
+ c.length -= 2 * C, g.length -= C, l.length -= C;
211
+ }
212
+ o(_, "popStack");
213
+ function v() {
214
+ var C = u.pop() || b.lex() || D;
215
+ return typeof C != "number" && (C instanceof Array && (u = C, C = u.pop()), C = p.symbols_[C] || C), C;
216
+ }
217
+ o(v, "lex");
218
+ for (var w, T, E, I, z, j = {}, V, O, at, q; ; ) {
219
+ if (E = c[c.length - 1], this.defaultActions[E] ? I = this.defaultActions[E] : (w ??= v(), I = S[E] && S[E][w]), I === void 0 || !I.length || !I[0]) {
220
+ var st = "";
221
+ for (V in q = [], S[E]) this.terminals_[V] && V > W && q.push("'" + this.terminals_[V] + "'");
222
+ st = b.showPosition ? "Parse error on line " + ($ + 1) + `:
223
+ ` + b.showPosition() + `
224
+ Expecting ` + q.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : "Parse error on line " + ($ + 1) + ": Unexpected " + (w == D ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(st, {
225
+ text: b.match,
226
+ token: this.terminals_[w] || w,
227
+ line: b.yylineno,
228
+ loc: R,
229
+ expected: q
230
+ });
231
+ }
232
+ if (I[0] instanceof Array && I.length > 1) throw Error("Parse Error: multiple actions possible at state: " + E + ", token: " + w);
233
+ switch (I[0]) {
234
+ case 1:
235
+ c.push(w), g.push(b.yytext), l.push(b.yylloc), c.push(I[1]), w = null, T ? (w = T, T = null) : (P = b.yyleng, x = b.yytext, $ = b.yylineno, R = b.yylloc, A > 0);
236
+ break;
237
+ case 2:
238
+ if (O = this.productions_[I[1]][1], j.$ = g[g.length - O], j._$ = {
239
+ first_line: l[l.length - (O || 1)].first_line,
240
+ last_line: l[l.length - 1].last_line,
241
+ first_column: l[l.length - (O || 1)].first_column,
242
+ last_column: l[l.length - 1].last_column
243
+ }, L && (j._$.range = [l[l.length - (O || 1)].range[0], l[l.length - 1].range[1]]), z = this.performAction.apply(j, [
244
+ x,
245
+ P,
246
+ $,
247
+ M.yy,
248
+ I[1],
249
+ g,
250
+ l
251
+ ].concat(H)), z !== void 0) return z;
252
+ O && (c = c.slice(0, -1 * O * 2), g = g.slice(0, -1 * O), l = l.slice(0, -1 * O)), c.push(this.productions_[I[1]][0]), g.push(j.$), l.push(j._$), at = S[c[c.length - 2]][c[c.length - 1]], c.push(at);
253
+ break;
254
+ case 3:
255
+ return !0;
256
+ }
257
+ }
258
+ return !0;
259
+ }, "parse")
260
+ };
261
+ y.lexer = /* @__PURE__ */ (function() {
262
+ return {
263
+ EOF: 1,
264
+ parseError: /* @__PURE__ */ o(function(n, p) {
265
+ if (this.yy.parser) this.yy.parser.parseError(n, p);
266
+ else throw Error(n);
267
+ }, "parseError"),
268
+ setInput: /* @__PURE__ */ o(function(n, p) {
269
+ return this.yy = p || this.yy || {}, this._input = n, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
270
+ first_line: 1,
271
+ first_column: 0,
272
+ last_line: 1,
273
+ last_column: 0
274
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
275
+ }, "setInput"),
276
+ input: /* @__PURE__ */ o(function() {
277
+ var n = this._input[0];
278
+ return this.yytext += n, this.yyleng++, this.offset++, this.match += n, this.matched += n, n.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), n;
279
+ }, "input"),
280
+ unput: /* @__PURE__ */ o(function(n) {
281
+ var p = n.length, c = n.split(/(?:\r\n?|\n)/g);
282
+ this._input = n + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - p), this.offset -= p;
283
+ var u = this.match.split(/(?:\r\n?|\n)/g);
284
+ 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);
285
+ var g = this.yylloc.range;
286
+ return this.yylloc = {
287
+ first_line: this.yylloc.first_line,
288
+ last_line: this.yylineno + 1,
289
+ first_column: this.yylloc.first_column,
290
+ 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 - p
291
+ }, this.options.ranges && (this.yylloc.range = [g[0], g[0] + this.yyleng - p]), this.yyleng = this.yytext.length, this;
292
+ }, "unput"),
293
+ more: /* @__PURE__ */ o(function() {
294
+ return this._more = !0, this;
295
+ }, "more"),
296
+ reject: /* @__PURE__ */ o(function() {
297
+ if (this.options.backtrack_lexer) this._backtrack = !0;
298
+ else 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).
299
+ ` + this.showPosition(), {
300
+ text: "",
301
+ token: null,
302
+ line: this.yylineno
303
+ });
304
+ return this;
305
+ }, "reject"),
306
+ less: /* @__PURE__ */ o(function(n) {
307
+ this.unput(this.match.slice(n));
308
+ }, "less"),
309
+ pastInput: /* @__PURE__ */ o(function() {
310
+ var n = this.matched.substr(0, this.matched.length - this.match.length);
311
+ return (n.length > 20 ? "..." : "") + n.substr(-20).replace(/\n/g, "");
312
+ }, "pastInput"),
313
+ upcomingInput: /* @__PURE__ */ o(function() {
314
+ var n = this.match;
315
+ return n.length < 20 && (n += this._input.substr(0, 20 - n.length)), (n.substr(0, 20) + (n.length > 20 ? "..." : "")).replace(/\n/g, "");
316
+ }, "upcomingInput"),
317
+ showPosition: /* @__PURE__ */ o(function() {
318
+ var n = this.pastInput(), p = Array(n.length + 1).join("-");
319
+ return n + this.upcomingInput() + `
320
+ ` + p + "^";
321
+ }, "showPosition"),
322
+ test_match: /* @__PURE__ */ o(function(n, p) {
323
+ var c, u, g;
324
+ if (this.options.backtrack_lexer && (g = {
325
+ yylineno: this.yylineno,
326
+ yylloc: {
327
+ first_line: this.yylloc.first_line,
328
+ last_line: this.last_line,
329
+ first_column: this.yylloc.first_column,
330
+ last_column: this.yylloc.last_column
331
+ },
332
+ yytext: this.yytext,
333
+ match: this.match,
334
+ matches: this.matches,
335
+ matched: this.matched,
336
+ yyleng: this.yyleng,
337
+ offset: this.offset,
338
+ _more: this._more,
339
+ _input: this._input,
340
+ yy: this.yy,
341
+ conditionStack: this.conditionStack.slice(0),
342
+ done: this.done
343
+ }, this.options.ranges && (g.yylloc.range = this.yylloc.range.slice(0))), u = n[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
344
+ first_line: this.yylloc.last_line,
345
+ last_line: this.yylineno + 1,
346
+ first_column: this.yylloc.last_column,
347
+ last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + n[0].length
348
+ }, this.yytext += n[0], this.match += n[0], this.matches = n, 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(n[0].length), this.matched += n[0], c = this.performAction.call(this, this.yy, this, p, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c) return c;
349
+ if (this._backtrack) {
350
+ for (var l in g) this[l] = g[l];
351
+ return !1;
352
+ }
353
+ return !1;
354
+ }, "test_match"),
355
+ next: /* @__PURE__ */ o(function() {
356
+ if (this.done) return this.EOF;
357
+ this._input || (this.done = !0);
358
+ var n, p, c, u;
359
+ this._more || (this.yytext = "", this.match = "");
360
+ for (var g = this._currentRules(), l = 0; l < g.length; l++) if (c = this._input.match(this.rules[g[l]]), c && (!p || c[0].length > p[0].length)) {
361
+ if (p = c, u = l, this.options.backtrack_lexer) {
362
+ if (n = this.test_match(c, g[l]), n !== !1) return n;
363
+ if (this._backtrack) {
364
+ p = !1;
365
+ continue;
366
+ } else return !1;
367
+ } else if (!this.options.flex) break;
368
+ }
369
+ return p ? (n = this.test_match(p, g[u]), n === !1 ? !1 : n) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
370
+ ` + this.showPosition(), {
371
+ text: "",
372
+ token: null,
373
+ line: this.yylineno
374
+ });
375
+ }, "next"),
376
+ lex: /* @__PURE__ */ o(function() {
377
+ return this.next() || this.lex();
378
+ }, "lex"),
379
+ begin: /* @__PURE__ */ o(function(n) {
380
+ this.conditionStack.push(n);
381
+ }, "begin"),
382
+ popState: /* @__PURE__ */ o(function() {
383
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
384
+ }, "popState"),
385
+ _currentRules: /* @__PURE__ */ o(function() {
386
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
387
+ }, "_currentRules"),
388
+ topState: /* @__PURE__ */ o(function(n) {
389
+ return n = this.conditionStack.length - 1 - Math.abs(n || 0), n >= 0 ? this.conditionStack[n] : "INITIAL";
390
+ }, "topState"),
391
+ pushState: /* @__PURE__ */ o(function(n) {
392
+ this.begin(n);
393
+ }, "pushState"),
394
+ stateStackSize: /* @__PURE__ */ o(function() {
395
+ return this.conditionStack.length;
396
+ }, "stateStackSize"),
397
+ options: { "case-insensitive": !0 },
398
+ performAction: /* @__PURE__ */ o(function(n, p, c, u) {
399
+ switch (c) {
400
+ case 0:
401
+ break;
402
+ case 1:
403
+ break;
404
+ case 2:
405
+ return 13;
406
+ case 3:
407
+ break;
408
+ case 4:
409
+ break;
410
+ case 5:
411
+ return 8;
412
+ case 6:
413
+ return 9;
414
+ case 7:
415
+ return 7;
416
+ case 8:
417
+ return 14;
418
+ case 9:
419
+ return this.begin("acc_title"), 15;
420
+ case 10:
421
+ return this.popState(), "acc_title_value";
422
+ case 11:
423
+ return this.begin("acc_descr"), 17;
424
+ case 12:
425
+ return this.popState(), "acc_descr_value";
426
+ case 13:
427
+ this.begin("acc_descr_multiline");
428
+ break;
429
+ case 14:
430
+ this.popState();
431
+ break;
432
+ case 15:
433
+ return "acc_descr_multiline_value";
434
+ case 16:
435
+ return 20;
436
+ case 17:
437
+ return 24;
438
+ case 18:
439
+ return 23;
440
+ case 19:
441
+ return 6;
442
+ case 20:
443
+ return "INVALID";
444
+ }
445
+ }, "anonymous"),
446
+ rules: [
447
+ /^(?:%(?!\{)[^\n]*)/i,
448
+ /^(?:[^\}]%%[^\n]*)/i,
449
+ /^(?:[\n]+)/i,
450
+ /^(?:\s+)/i,
451
+ /^(?:#[^\n]*)/i,
452
+ /^(?:timeline[ \t]+LR\b)/i,
453
+ /^(?:timeline[ \t]+TD\b)/i,
454
+ /^(?:timeline\b)/i,
455
+ /^(?:title\s[^\n]+)/i,
456
+ /^(?:accTitle\s*:\s*)/i,
457
+ /^(?:(?!\n||)*[^\n]*)/i,
458
+ /^(?:accDescr\s*:\s*)/i,
459
+ /^(?:(?!\n||)*[^\n]*)/i,
460
+ /^(?:accDescr\s*\{\s*)/i,
461
+ /^(?:[\}])/i,
462
+ /^(?:[^\}]*)/i,
463
+ /^(?:section\s[^:\n]+)/i,
464
+ /^(?::\s(?:[^:\n]|:(?!\s))+)/i,
465
+ /^(?:[^#:\n]+)/i,
466
+ /^(?:$)/i,
467
+ /^(?:.)/i
468
+ ],
469
+ conditions: {
470
+ acc_descr_multiline: {
471
+ rules: [14, 15],
472
+ inclusive: !1
473
+ },
474
+ acc_descr: {
475
+ rules: [12],
476
+ inclusive: !1
477
+ },
478
+ acc_title: {
479
+ rules: [10],
480
+ inclusive: !1
481
+ },
482
+ INITIAL: {
483
+ rules: [
484
+ 0,
485
+ 1,
486
+ 2,
487
+ 3,
488
+ 4,
489
+ 5,
490
+ 6,
491
+ 7,
492
+ 8,
493
+ 9,
494
+ 11,
495
+ 13,
496
+ 16,
497
+ 17,
498
+ 18,
499
+ 19,
500
+ 20
501
+ ],
502
+ inclusive: !0
503
+ }
504
+ }
505
+ };
506
+ })();
507
+ function f() {
508
+ this.yy = {};
509
+ }
510
+ return o(f, "Parser"), f.prototype = y, y.Parser = f, new f();
511
+ })();
512
+ K.parser = K;
513
+ var Ft = K, yt = {};
514
+ Pt(yt, {
515
+ addEvent: () => Et,
516
+ addSection: () => wt,
517
+ addTask: () => St,
518
+ addTaskOrg: () => It,
519
+ clear: () => bt,
520
+ default: () => zt,
521
+ getCommonDb: () => xt,
522
+ getDirection: () => _t,
523
+ getSections: () => $t,
524
+ getTasks: () => vt,
525
+ setDirection: () => kt
526
+ });
527
+ var G = "", mt = 0, tt = "LR", et = [], Y = [], Z = [], xt = /* @__PURE__ */ o(() => Wt, "getCommonDb"), bt = /* @__PURE__ */ o(function() {
528
+ et.length = 0, Y.length = 0, G = "", Z.length = 0, tt = "LR", jt();
529
+ }, "clear"), kt = /* @__PURE__ */ o(function(e) {
530
+ tt = e;
531
+ }, "setDirection"), _t = /* @__PURE__ */ o(function() {
532
+ return tt;
533
+ }, "getDirection"), wt = /* @__PURE__ */ o(function(e) {
534
+ G = e, et.push(e);
535
+ }, "addSection"), $t = /* @__PURE__ */ o(function() {
536
+ return et;
537
+ }, "getSections"), vt = /* @__PURE__ */ o(function() {
538
+ let e = lt(), t = 0;
539
+ for (; !e && t < 100; ) e = lt(), t++;
540
+ return Y.push(...Z), Y;
541
+ }, "getTasks"), St = /* @__PURE__ */ o(function(e, t, r) {
542
+ let s = {
543
+ id: mt++,
544
+ section: G,
545
+ type: G,
546
+ task: e,
547
+ score: t || 0,
548
+ events: r ? [r] : []
549
+ };
550
+ Z.push(s);
551
+ }, "addTask"), Et = /* @__PURE__ */ o(function(e) {
552
+ Z.find((t) => t.id === mt - 1).events.push(e);
553
+ }, "addEvent"), It = /* @__PURE__ */ o(function(e) {
554
+ let t = {
555
+ section: G,
556
+ type: G,
557
+ description: e,
558
+ task: e,
559
+ classes: []
560
+ };
561
+ Y.push(t);
562
+ }, "addTaskOrg"), lt = /* @__PURE__ */ o(function() {
563
+ let e = /* @__PURE__ */ o(function(r) {
564
+ return Z[r].processed;
565
+ }, "compileTask"), t = !0;
566
+ for (let [r, s] of Z.entries()) e(r), t &&= s.processed;
567
+ return t;
568
+ }, "compileTasks"), zt = {
569
+ clear: bt,
570
+ getCommonDb: xt,
571
+ getDirection: _t,
572
+ setDirection: kt,
573
+ addSection: wt,
574
+ getSections: $t,
575
+ getTasks: vt,
576
+ addTask: St,
577
+ addTaskOrg: It,
578
+ addEvent: Et
579
+ }, Mt = 0, X = /* @__PURE__ */ o(function(e, t) {
580
+ let r = e.append("rect");
581
+ return r.attr("x", t.x), r.attr("y", t.y), r.attr("fill", t.fill), r.attr("stroke", t.stroke), r.attr("width", t.width), r.attr("height", t.height), r.attr("rx", t.rx), r.attr("ry", t.ry), t.class !== void 0 && r.attr("class", t.class), r;
582
+ }, "drawRect"), Vt = /* @__PURE__ */ o(function(e, t) {
583
+ let r = e.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), s = e.append("g");
584
+ s.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"), s.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");
585
+ function i(d) {
586
+ let m = ot().startAngle(Math.PI / 2).endAngle(Math.PI / 2 * 3).innerRadius(7.5).outerRadius(6.8181818181818175);
587
+ d.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
588
+ }
589
+ o(i, "smile");
590
+ function h(d) {
591
+ let m = ot().startAngle(3 * Math.PI / 2).endAngle(Math.PI / 2 * 5).innerRadius(7.5).outerRadius(6.8181818181818175);
592
+ d.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
593
+ }
594
+ o(h, "sad");
595
+ function a(d) {
596
+ d.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");
597
+ }
598
+ return o(a, "ambivalent"), t.score > 3 ? i(s) : t.score < 3 ? h(s) : a(s), r;
599
+ }, "drawFace"), Gt = /* @__PURE__ */ o(function(e, t) {
600
+ let r = e.append("circle");
601
+ return r.attr("cx", t.cx), r.attr("cy", t.cy), r.attr("class", "actor-" + t.pos), r.attr("fill", t.fill), r.attr("stroke", t.stroke), r.attr("r", t.r), r.class !== void 0 && r.attr("class", r.class), t.title !== void 0 && r.append("title").text(t.title), r;
602
+ }, "drawCircle"), Tt = /* @__PURE__ */ o(function(e, t) {
603
+ let r = t.text.replace(/<br\s*\/?>/gi, " "), s = e.append("text");
604
+ 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);
605
+ let i = s.append("tspan");
606
+ return i.attr("x", t.x + t.textMargin * 2), i.text(r), s;
607
+ }, "drawText"), Zt = /* @__PURE__ */ o(function(e, t) {
608
+ function r(i, h, a, d, m) {
609
+ return i + "," + h + " " + (i + a) + "," + h + " " + (i + a) + "," + (h + d - m) + " " + (i + a - m * 1.2) + "," + (h + d) + " " + i + "," + (h + d);
610
+ }
611
+ o(r, "genPoints");
612
+ let s = e.append("polygon");
613
+ s.attr("points", r(t.x, t.y, 50, 20, 7)), s.attr("class", "labelBox"), t.y += t.labelMargin, t.x += 0.5 * t.labelMargin, Tt(e, t);
614
+ }, "drawLabel"), qt = /* @__PURE__ */ o(function(e, t, r) {
615
+ let s = e.append("g"), i = rt();
616
+ i.x = t.x, i.y = t.y, i.fill = t.fill, i.width = r.width, i.height = r.height, i.class = "journey-section section-type-" + t.num, i.rx = 3, i.ry = 3, X(s, i), Ht(r)(t.text, s, i.x, i.y, i.width, i.height, { class: "journey-section section-type-" + t.num }, r, t.colour);
617
+ }, "drawSection"), Q = -1, Ut = /* @__PURE__ */ o(function(e, t, r, s) {
618
+ let i = t.x + r.width / 2, h = e.append("g");
619
+ Q++, h.append("line").attr("id", s + "-task" + Q).attr("x1", i).attr("y1", t.y).attr("x2", i).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Vt(h, {
620
+ cx: i,
621
+ cy: 300 + (5 - t.score) * 30,
622
+ score: t.score
623
+ });
624
+ let a = rt();
625
+ a.x = t.x, a.y = t.y, a.fill = t.fill, a.width = r.width, a.height = r.height, a.class = "task task-type-" + t.num, a.rx = 3, a.ry = 3, X(h, a), Ht(r)(t.task, h, a.x, a.y, a.width, a.height, { class: "task" }, r, t.colour);
626
+ }, "drawTask"), Yt = /* @__PURE__ */ o(function(e, t) {
627
+ X(e, {
628
+ x: t.startx,
629
+ y: t.starty,
630
+ width: t.stopx - t.startx,
631
+ height: t.stopy - t.starty,
632
+ fill: t.fill,
633
+ class: "rect"
634
+ }).lower();
635
+ }, "drawBackgroundRect"), Xt = /* @__PURE__ */ o(function() {
636
+ return {
637
+ x: 0,
638
+ y: 0,
639
+ fill: void 0,
640
+ "text-anchor": "start",
641
+ width: 100,
642
+ height: 100,
643
+ textMargin: 0,
644
+ rx: 0,
645
+ ry: 0
646
+ };
647
+ }, "getTextObj"), rt = /* @__PURE__ */ o(function() {
648
+ return {
649
+ x: 0,
650
+ y: 0,
651
+ width: 100,
652
+ anchor: "start",
653
+ height: 100,
654
+ rx: 0,
655
+ ry: 0
656
+ };
657
+ }, "getNoteRect"), Ht = /* @__PURE__ */ (function() {
658
+ function e(i, h, a, d, m, y, f, n) {
659
+ s(h.append("text").attr("x", a + m / 2).attr("y", d + y / 2 + 5).style("font-color", n).style("text-anchor", "middle").text(i), f);
660
+ }
661
+ o(e, "byText");
662
+ function t(i, h, a, d, m, y, f, n, p) {
663
+ let { taskFontSize: c, taskFontFamily: u } = n, g = i.split(/<br\s*\/?>/gi);
664
+ for (let l = 0; l < g.length; l++) {
665
+ let S = l * c - c * (g.length - 1) / 2, x = h.append("text").attr("x", a + m / 2).attr("y", d).attr("fill", p).style("text-anchor", "middle").style("font-size", c).style("font-family", u);
666
+ x.append("tspan").attr("x", a + m / 2).attr("dy", S).text(g[l]), x.attr("y", d + y / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), s(x, f);
667
+ }
668
+ }
669
+ o(t, "byTspan");
670
+ function r(i, h, a, d, m, y, f, n) {
671
+ let p = h.append("switch"), c = p.append("foreignObject").attr("x", a).attr("y", d).attr("width", m).attr("height", y).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
672
+ c.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), t(i, p, a, d, m, y, f, n), s(c, f);
673
+ }
674
+ o(r, "byFo");
675
+ function s(i, h) {
676
+ for (let a in h) a in h && i.attr(a, h[a]);
677
+ }
678
+ return o(s, "_setTextAttrs"), function(i) {
679
+ return i.textPlacement === "fo" ? r : i.textPlacement === "old" ? e : t;
680
+ };
681
+ })(), Jt = /* @__PURE__ */ o(function(e, t) {
682
+ Mt = 0, Q = -1, e.append("defs").append("marker").attr("id", t + "-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");
683
+ }, "initGraphics");
684
+ function it(e, t) {
685
+ e.each(function() {
686
+ var r = U(this), s = r.text().split(/(\s+|<br>)/).reverse(), i, h = [], a = 1.1, d = r.attr("y"), m = parseFloat(r.attr("dy")), y = r.text(null).append("tspan").attr("x", 0).attr("y", d).attr("dy", m + "em");
687
+ for (let f = 0; f < s.length; f++) i = s[s.length - 1 - f], h.push(i), y.text(h.join(" ").trim()), (y.node().getComputedTextLength() > t || i === "<br>") && (h.pop(), y.text(h.join(" ").trim()), h = i === "<br>" ? [""] : [i], y = r.append("tspan").attr("x", 0).attr("y", d).attr("dy", a + "em").text(i));
688
+ });
689
+ }
690
+ o(it, "wrap");
691
+ var Kt = /* @__PURE__ */ o(function(e, t, r, s, i, h = !1) {
692
+ let { theme: a, look: d } = s, m = a?.includes("redux"), y = r % (s?.themeVariables?.THEME_COLOR_LIMIT ?? 12) - 1, f = e.append("g");
693
+ t.section = y, f.attr("class", (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + y));
694
+ let n = f.append("g"), p = f.append("g"), c = p.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(it, t.width).node().getBBox(), u = s.fontSize?.replace ? s.fontSize.replace("px", "") : s.fontSize;
695
+ if (t.height = c.height + u * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width += 2 * t.padding, p.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), m && p.attr("transform", `translate(${t.width / 2}, ${h ? t.padding / 2 + 3 : t.padding})`), te(n, t, y, i, s), d === "neo" && (f.attr("data-look", "neo"), m)) {
696
+ let g = a.includes("dark"), l = U(e.node()?.ownerSVGElement ?? e.node()), S = l.attr("id") ?? "", x = S ? `${S}-drop-shadow` : "drop-shadow";
697
+ if (l.select(`#${x}`).empty()) {
698
+ let $ = l.select("defs");
699
+ ($.empty() ? l.append("defs") : $).append("filter").attr("id", x).attr("height", "130%").attr("width", "130%").append("feDropShadow").attr("dx", "4").attr("dy", "4").attr("stdDeviation", 0).attr("flood-opacity", g ? "0.2" : "0.06").attr("flood-color", g ? "#FFFFFF" : "#000000");
700
+ }
701
+ }
702
+ return t;
703
+ }, "drawNode"), Qt = /* @__PURE__ */ o(function(e, t, r) {
704
+ let s = e.append("g"), i = s.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(it, t.width).node().getBBox(), h = r.fontSize?.replace ? r.fontSize.replace("px", "") : r.fontSize;
705
+ return s.remove(), i.height + h * 1.1 * 0.5 + t.padding;
706
+ }, "getVirtualNodeHeight"), te = /* @__PURE__ */ o(function(e, t, r, s, i) {
707
+ let { theme: h } = i, a = h?.includes("redux") ? 0 : 5, d = a > 0 ? `M0 ${t.height - 5} v${-t.height + 10} q0,-${a},${a},-${a} h${t.width - 10} q${a},0,${a},${a} v${t.height - 5} H0 Z` : `M0 ${t.height - 5} v${-(t.height - 5)} h${t.width} v${t.height} H0 Z`;
708
+ e.append("path").attr("id", s + "-node-" + Mt++).attr("class", "node-bkg node-" + t.type).attr("d", d), h?.includes("redux") || e.append("line").attr("class", "node-line-" + r).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
709
+ }, "defaultBkg"), N = {
710
+ drawRect: X,
711
+ drawCircle: Gt,
712
+ drawSection: qt,
713
+ drawText: Tt,
714
+ drawLabel: Zt,
715
+ drawTask: Ut,
716
+ drawBackgroundRect: Yt,
717
+ getTextObj: Xt,
718
+ getNoteRect: rt,
719
+ initGraphics: Jt,
720
+ drawNode: Kt,
721
+ getVirtualNodeHeight: Qt
722
+ }, ee = /* @__PURE__ */ o(function(e, t, r, s) {
723
+ let i = gt(), { look: h, theme: a, themeVariables: d } = i, { useGradient: m, gradientStart: y, gradientStop: f } = d, n = i.timeline?.leftMargin ?? 50;
724
+ k.debug("timeline", s.db);
725
+ let p = i.securityLevel, c;
726
+ p === "sandbox" && (c = U("#i" + t));
727
+ let u = U(p === "sandbox" ? c.nodes()[0].contentDocument.body : "body").select("#" + t);
728
+ u.append("g");
729
+ let g = s.db.getTasks(), l = s.db.getCommonDb().getDiagramTitle();
730
+ k.debug("task", g), N.initGraphics(u, t);
731
+ let S = s.db.getSections();
732
+ k.debug("sections", S);
733
+ let x = 0, $ = 0, P = 0, A = 0, W = 50 + n, D = 50;
734
+ A = 50;
735
+ let H = 0, b = !0;
736
+ S.forEach(function(L) {
737
+ let _ = {
738
+ number: H,
739
+ descr: L,
740
+ section: H,
741
+ width: 150,
742
+ padding: 20,
743
+ maxHeight: x
744
+ }, v = N.getVirtualNodeHeight(u, _, i);
745
+ k.debug("sectionHeight before draw", v), x = Math.max(x, v + 20);
746
+ });
747
+ let M = 0, B = 0;
748
+ k.debug("tasks.length", g.length);
749
+ for (let [L, _] of g.entries()) {
750
+ let v = {
751
+ number: L,
752
+ descr: _,
753
+ section: _.section,
754
+ width: 150,
755
+ padding: 20,
756
+ maxHeight: $
757
+ }, w = N.getVirtualNodeHeight(u, v, i);
758
+ k.debug("taskHeight before draw", w), $ = Math.max($, w + 20), M = Math.max(M, _.events.length);
759
+ let T = 0;
760
+ for (let E of _.events) {
761
+ let I = {
762
+ descr: E,
763
+ section: _.section,
764
+ number: _.section,
765
+ width: 150,
766
+ padding: 20,
767
+ maxHeight: 50
768
+ };
769
+ T += N.getVirtualNodeHeight(u, I, i);
770
+ }
771
+ _.events.length > 0 && (T += (_.events.length - 1) * 10), B = Math.max(B, T);
772
+ }
773
+ k.debug("maxSectionHeight before draw", x), k.debug("maxTaskHeight before draw", $), S && S.length > 0 ? S.forEach((L) => {
774
+ let _ = g.filter((E) => E.section === L), v = {
775
+ number: H,
776
+ descr: L,
777
+ section: H,
778
+ width: 200 * Math.max(_.length, 1) - 50,
779
+ padding: 20,
780
+ maxHeight: x
781
+ };
782
+ k.debug("sectionNode", v);
783
+ let w = u.append("g"), T = N.drawNode(w, v, H, i, t);
784
+ k.debug("sectionNode output", T), w.attr("transform", `translate(${W}, ${A})`), D += x + 50, _.length > 0 && ct(u, _, H, W, D, $, i, M, B, x, !1, t), W += 200 * Math.max(_.length, 1), D = A, H++;
785
+ }) : (b = !1, ct(u, g, H, W, D, $, i, M, B, x, !0, t));
786
+ let R = u.node().getBBox();
787
+ if (k.debug("bounds", R), l && u.append("text").text(l).attr("x", h === "neo" ? R.x * 2 + n : R.width / 2 - n).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), P = b ? x + $ + 150 : $ + 100, u.append("g").attr("class", "lineWrapper").append("line").attr("x1", n).attr("y1", P).attr("x2", R.width + 3 * n).attr("y2", P).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", `url(#${t}-arrowhead)`), h === "neo" && m && a !== "neutral") {
788
+ let L = u.select("defs"), _ = (L.empty() ? u.append("defs") : L).append("linearGradient").attr("id", u.attr("id") + "-gradient").attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
789
+ _.append("stop").attr("offset", "0%").attr("stop-color", y).attr("stop-opacity", 1), _.append("stop").attr("offset", "100%").attr("stop-color", f).attr("stop-opacity", 1);
790
+ }
791
+ ft(void 0, u, i.timeline?.padding ?? 50, i.timeline?.useMaxWidth ?? !1);
792
+ }, "draw"), ct = /* @__PURE__ */ o(function(e, t, r, s, i, h, a, d, m, y, f, n) {
793
+ for (let p of t) {
794
+ let c = {
795
+ descr: p.task,
796
+ section: r,
797
+ number: r,
798
+ width: 150,
799
+ padding: 20,
800
+ maxHeight: h
801
+ };
802
+ k.debug("taskNode", c);
803
+ let u = e.append("g").attr("class", "taskWrapper"), g = N.drawNode(u, c, r, a, n).height;
804
+ if (k.debug("taskHeight after draw", g), u.attr("transform", `translate(${s}, ${i})`), h = Math.max(h, g), p.events) {
805
+ let l = e.append("g").attr("class", "lineWrapper"), S = h;
806
+ i += 100, S += re(e, p.events, r, s, i, a, n), i -= 100, l.append("line").attr("x1", s + 190 / 2).attr("y1", i + h).attr("x2", s + 190 / 2).attr("y2", i + h + 100 + m + 100).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", `url(#${n}-arrowhead)`).attr("stroke-dasharray", "5,5");
807
+ }
808
+ s += 200, f && !a.timeline?.disableMulticolor && r++;
809
+ }
810
+ i -= 10;
811
+ }, "drawTasks"), re = /* @__PURE__ */ o(function(e, t, r, s, i, h, a) {
812
+ let d = 0, m = i;
813
+ i += 100;
814
+ for (let y of t) {
815
+ let f = {
816
+ descr: y,
817
+ section: r,
818
+ number: r,
819
+ width: 150,
820
+ padding: 20,
821
+ maxHeight: 50
822
+ };
823
+ k.debug("eventNode", f);
824
+ let n = e.append("g").attr("class", "eventWrapper"), p = N.drawNode(n, f, r, h, a, !0).height;
825
+ d += p, n.attr("transform", `translate(${s}, ${i})`), i = i + 10 + p;
826
+ }
827
+ return i = m, d;
828
+ }, "drawEvents"), ie = {
829
+ setConf: /* @__PURE__ */ o(() => {
830
+ }, "setConf"),
831
+ draw: ee
832
+ }, J = 200, F = 5, ne = J + F * 2, nt = J + 100, ae = nt + F * 2, Lt = 10, se = 0, ht = 20, Nt = 20, dt = 30, Ct = 50, oe = /* @__PURE__ */ o(function(e, t, r, s) {
833
+ let i = gt(), h = i.timeline?.leftMargin ?? 50;
834
+ k.debug("timeline", s.db);
835
+ let a = Bt(t);
836
+ a.append("g");
837
+ let d = s.db.getTasks(), m = s.db.getCommonDb().getDiagramTitle();
838
+ k.debug("task", d), N.initGraphics(a);
839
+ let y = s.db.getSections();
840
+ k.debug("sections", y);
841
+ let f = 0, n = 0, p = 50 + h, c = 50, u = c, g = p, l = ne + Nt, S = ae + Ct, x = g + l, $ = 0, P = y && y.length > 0, A = P ? x : p + l, W = Math.max(50, l + S - F * 2);
842
+ y.forEach(function(_) {
843
+ let v = {
844
+ number: $,
845
+ descr: _,
846
+ section: $,
847
+ width: W,
848
+ padding: F,
849
+ maxHeight: f
850
+ }, w = N.getVirtualNodeHeight(a, v, i);
851
+ k.debug("sectionHeight before draw", w), f = Math.max(f, w);
852
+ });
853
+ let D = 0;
854
+ k.debug("tasks.length", d.length);
855
+ for (let [_, v] of d.entries()) {
856
+ let w = {
857
+ number: _,
858
+ descr: v,
859
+ section: v.section,
860
+ width: J,
861
+ padding: F,
862
+ maxHeight: n
863
+ }, T = N.getVirtualNodeHeight(a, w, i);
864
+ k.debug("taskHeight before draw", T), n = Math.max(n, T);
865
+ let E = 0;
866
+ for (let I of v.events) {
867
+ let z = {
868
+ descr: I,
869
+ section: v.section,
870
+ number: v.section,
871
+ width: nt,
872
+ padding: F,
873
+ maxHeight: 50
874
+ };
875
+ E += N.getVirtualNodeHeight(a, z, i);
876
+ }
877
+ v.events.length > 0 && (E += (v.events.length - 1) * Lt), D = Math.max(D, E) + se;
878
+ }
879
+ k.debug("maxSectionHeight before draw", f), k.debug("maxTaskHeight before draw", n);
880
+ let H = Math.max(n, D) + dt;
881
+ P ? y.forEach((_) => {
882
+ let v = d.filter((O) => O.section === _), w = {
883
+ number: $,
884
+ descr: _,
885
+ section: $,
886
+ width: W,
887
+ padding: F,
888
+ maxHeight: f
889
+ };
890
+ k.debug("sectionNode", w);
891
+ let T = a.append("g"), E = N.drawNode(T, w, $, i);
892
+ k.debug("sectionNode output", E);
893
+ let I = A - l;
894
+ T.attr("transform", `translate(${I}, ${c})`);
895
+ let z = c + E.height + ht;
896
+ v.length > 0 && ut(a, v, $, A, z, n, i, H, !1);
897
+ let j = v.length, V = E.height + ht + H * Math.max(j, 1) - (j > 0 ? dt * 2 : 0);
898
+ c += V, $++;
899
+ }) : ut(a, d, $, A, c, n, i, H, !0);
900
+ let b = a.node()?.getBBox();
901
+ if (!b) throw Error("bbox not found");
902
+ if (k.debug("bounds", b), m) {
903
+ if (a.append("text").text(m).attr("x", b.width / 2 - h).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), b = a.node()?.getBBox(), !b) throw Error("bbox not found");
904
+ k.debug("bounds after title", b);
905
+ }
906
+ let [M] = Rt(i.fontSize), B = (M ?? 16) * 2, R = (M ?? 16) * 0.5 + 20, L = a.append("g").attr("class", "lineWrapper");
907
+ L.append("line").attr("x1", A).attr("y1", u - B).attr("x2", A).attr("y2", b.y + b.height + R).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), L.lower(), ft(void 0, a, i.timeline?.padding ?? 50, i.timeline?.useMaxWidth ?? !1);
908
+ }, "draw"), ut = /* @__PURE__ */ o(function(e, t, r, s, i, h, a, d, m) {
909
+ for (let y of t) {
910
+ let f = {
911
+ descr: y.task,
912
+ section: r,
913
+ number: r,
914
+ width: J,
915
+ padding: F,
916
+ maxHeight: h
917
+ };
918
+ k.debug("taskNode", f);
919
+ let n = e.append("g").attr("class", "taskWrapper"), p = N.drawNode(n, f, r, a), c = p.height;
920
+ k.debug("taskHeight after draw", c);
921
+ let u = s - Nt - p.width;
922
+ if (n.attr("transform", `translate(${u}, ${i})`), h = Math.max(h, c), y.events && y.events.length > 0) {
923
+ let g = i, l = s + Ct;
924
+ le(e, y.events, r, s, l, g, a);
925
+ }
926
+ i += d, m && !a.timeline?.disableMulticolor && r++;
927
+ }
928
+ }, "drawTasks"), le = /* @__PURE__ */ o(function(e, t, r, s, i, h, a) {
929
+ let d = h;
930
+ for (let m of t) {
931
+ let y = {
932
+ descr: m,
933
+ section: r,
934
+ number: r,
935
+ width: nt,
936
+ padding: F,
937
+ maxHeight: 0
938
+ };
939
+ k.debug("eventNode", y);
940
+ let f = e.append("g").attr("class", "eventWrapper"), n = N.drawNode(f, y, r, a).height;
941
+ f.attr("transform", `translate(${i}, ${d})`);
942
+ let p = e.append("g").attr("class", "lineWrapper"), c = d + n / 2;
943
+ p.append("line").attr("x1", s).attr("y1", c).attr("x2", i).attr("y2", c).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5"), d = d + n + Lt;
944
+ }
945
+ return d - h;
946
+ }, "drawEvents"), ce = {
947
+ setConf: /* @__PURE__ */ o(() => {
948
+ }, "setConf"),
949
+ draw: oe
950
+ }, he = /* @__PURE__ */ o((e) => {
951
+ let { theme: t } = pt(), r = t?.includes("dark"), s = t?.includes("color"), i = e.svgId?.replace(/^#/, "") ?? "", h = i ? `url(#${i}-drop-shadow)` : e.dropShadow ?? "none", a = "";
952
+ for (let d = 0; d < e.THEME_COLOR_LIMIT; d++) {
953
+ let m = `${17 - 3 * d}`, y = s ? e.borderColorArray[d] : e.mainBkg, f = s ? e.borderColorArray[d] : e.nodeBorder;
954
+ a += `
955
+ .section-${d - 1} rect,
956
+ .section-${d - 1} path,
957
+ .section-${d - 1} circle {
958
+ fill: ${r && s ? e.mainBkg : y};
959
+ stroke: ${f};
960
+ stroke-width: ${e.strokeWidth};
961
+ filter: ${h};
962
+ }
963
+
964
+ .section-${d - 1} text {
965
+ fill: ${e.nodeBorder};
966
+ font-weight: ${e.fontWeight}
967
+ }
968
+
969
+ .node-icon-${d - 1} {
970
+ font-size: 40px;
971
+ color: ${e["cScaleLabel" + d]};
972
+ }
973
+
974
+ .section-edge-${d - 1} {
975
+ stroke: ${e["cScale" + d]};
976
+ }
977
+
978
+ .edge-depth-${d - 1} {
979
+ stroke-width: ${m};
980
+ }
981
+
982
+ .section-${d - 1} line {
983
+ stroke: ${e["cScaleInv" + d]};
984
+ stroke-width: 3;
985
+ }
986
+
987
+ .lineWrapper line {
988
+ stroke: ${e.nodeBorder};
989
+ stroke-width:${e.strokeWidth}
990
+ }
991
+
992
+ .disabled,
993
+ .disabled circle,
994
+ .disabled text {
995
+ fill: ${e.tertiaryColor ?? "lightgray"};
996
+ }
997
+
998
+ .disabled text {
999
+ fill: ${e.clusterBorder ?? "#efefef"};
1000
+ }
1001
+ `;
1002
+ }
1003
+ return a;
1004
+ }, "genReduxSections"), de = /* @__PURE__ */ o((e) => {
1005
+ let t = "";
1006
+ for (let r = 0; r < e.THEME_COLOR_LIMIT; r++) e["lineColor" + r] = e["lineColor" + r] || e["cScaleInv" + r], At(e["lineColor" + r]) ? e["lineColor" + r] = Dt(e["lineColor" + r], 20) : e["lineColor" + r] = Ot(e["lineColor" + r], 20);
1007
+ for (let r = 0; r < e.THEME_COLOR_LIMIT; r++) {
1008
+ let s = "" + (17 - 3 * r);
1009
+ t += `
1010
+ .section-${r - 1} rect, .section-${r - 1} path, .section-${r - 1} circle, .section-${r - 1} path {
1011
+ fill: ${e["cScale" + r]};
1012
+ }
1013
+ .section-${r - 1} text {
1014
+ fill: ${e["cScaleLabel" + r]};
1015
+ }
1016
+ .node-icon-${r - 1} {
1017
+ font-size: 40px;
1018
+ color: ${e["cScaleLabel" + r]};
1019
+ }
1020
+ .section-edge-${r - 1}{
1021
+ stroke: ${e["cScale" + r]};
1022
+ }
1023
+ .edge-depth-${r - 1}{
1024
+ stroke-width: ${s};
1025
+ }
1026
+ .section-${r - 1} line {
1027
+ stroke: ${e["cScaleInv" + r]} ;
1028
+ stroke-width: 3;
1029
+ }
1030
+
1031
+ .lineWrapper line{
1032
+ stroke: ${e["cScaleLabel" + r]} ;
1033
+ }
1034
+
1035
+ .disabled, .disabled circle, .disabled text {
1036
+ fill: ${e.tertiaryColor ?? "lightgray"};
1037
+ }
1038
+ .disabled text {
1039
+ fill: ${e.clusterBorder ?? "#efefef"};
1040
+ }
1041
+ `;
1042
+ }
1043
+ return t;
1044
+ }, "genSections"), ge = {
1045
+ db: yt,
1046
+ renderer: {
1047
+ setConf: /* @__PURE__ */ o(() => {
1048
+ }, "setConf"),
1049
+ draw: /* @__PURE__ */ o((e, t, r, s) => (s?.db?.getDirection?.() ?? "LR") === "TD" ? ce.draw(e, t, r, s) : ie.draw(e, t, r, s), "draw")
1050
+ },
1051
+ parser: Ft,
1052
+ styles: /* @__PURE__ */ o((e) => {
1053
+ let { theme: t } = pt(), r = t?.includes("redux"), s = t === "neutral", i = e.svgId?.replace(/^#/, "") ?? "", h = "";
1054
+ if (e.useGradient && i && e.THEME_COLOR_LIMIT && !s) for (let a = 0; a < e.THEME_COLOR_LIMIT; a++) h += `
1055
+ .section-${a - 1}[data-look="neo"] rect,
1056
+ .section-${a - 1}[data-look="neo"] path,
1057
+ .section-${a - 1}[data-look="neo"] circle {
1058
+ fill: ${e.mainBkg};
1059
+ stroke: url(#${i}-gradient);
1060
+ stroke-width: 2;
1061
+ }
1062
+ .section-${a - 1}[data-look="neo"] line {
1063
+ stroke: url(#${i}-gradient);
1064
+ stroke-width: 2;
1065
+ }`;
1066
+ return `
1067
+ .edge {
1068
+ stroke-width: 3;
1069
+ }
1070
+ ${r ? he(e) : de(e)}
1071
+ ${h}
1072
+ .section-root rect, .section-root path, .section-root circle {
1073
+ fill: ${e.git0};
1074
+ }
1075
+ .section-root text {
1076
+ fill: ${e.gitBranchLabel0};
1077
+ }
1078
+ .icon-container {
1079
+ height:100%;
1080
+ display: flex;
1081
+ justify-content: center;
1082
+ align-items: center;
1083
+ }
1084
+ .edge {
1085
+ fill: none;
1086
+ }
1087
+ .eventWrapper {
1088
+ filter: brightness(120%);
1089
+ }
1090
+ `;
1091
+ }, "getStyles")
1092
+ };
1093
+ export {
1094
+ ge as diagram
1095
+ };