@layers-app/editor 0.0.21 → 0.0.23

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 (242) hide show
  1. package/README.md +47 -2
  2. package/dist/index.cjs +2 -2
  3. package/dist/index.d.ts +195 -2
  4. package/dist/index.js +2 -2
  5. package/dist/layers.-RxAm5pH.js +795 -0
  6. package/dist/layers.-rS-aTo2.js +33 -0
  7. package/dist/layers.2ODaB2Pd.js +8 -0
  8. package/dist/layers.5BbX0Xoz.js +769 -0
  9. package/dist/layers.7JqFgE4-.js +15 -0
  10. package/dist/layers.9QK1wiQj.js +1 -0
  11. package/dist/layers.9pNaFvaX.js +1 -0
  12. package/dist/layers.B-6oGNjd.js +40 -0
  13. package/dist/layers.B-ie1_cm.js +6 -0
  14. package/dist/layers.B0EkntbT.js +32 -0
  15. package/dist/layers.B0pdr1hX.js +1619 -0
  16. package/dist/layers.B19hGmey.js +1 -0
  17. package/dist/layers.B39TZ2WV.js +11 -0
  18. package/dist/layers.B3odqoHb.js +9 -0
  19. package/dist/layers.B64g6Zx2.js +1 -0
  20. package/dist/layers.B6UkAKu5.js +434 -0
  21. package/dist/layers.B8i9d7Qz.js +192 -0
  22. package/dist/layers.B9NSFeaj.js +35 -0
  23. package/dist/layers.B9zrmkst.js +11 -0
  24. package/dist/layers.BAtv1CM7.js +1 -0
  25. package/dist/layers.BBB7YGK1.js +3 -0
  26. package/dist/layers.BBU3ik5q.js +51 -0
  27. package/dist/layers.BBwDvE6l.js +9122 -0
  28. package/dist/layers.BCFHxkpM.js +6 -0
  29. package/dist/layers.BD5uUnI2.js +1265 -0
  30. package/dist/layers.BDhuxbhX.js +44 -0
  31. package/dist/layers.BDxQSquK.js +10 -0
  32. package/dist/layers.BEE5yqs5.js +9 -0
  33. package/dist/layers.BFLg4UGe.js +8 -0
  34. package/dist/layers.BFOl7cA-.js +41 -0
  35. package/dist/layers.BHDiP2sq.js +21836 -0
  36. package/dist/layers.BIDnkNut.js +1510 -0
  37. package/dist/layers.BIVmclKv.js +41 -0
  38. package/dist/layers.BIeVwYKL.js +1 -0
  39. package/dist/layers.BJMMuP5r.js +9 -0
  40. package/dist/layers.BK01wvsE.js +10 -0
  41. package/dist/layers.BLB-feoT.js +8 -0
  42. package/dist/layers.BLSqqbWP.js +207 -0
  43. package/dist/layers.BO3dqWyO.js +10 -0
  44. package/dist/layers.BPe9NQzP.js +2963 -0
  45. package/dist/layers.BPnpanwd.js +39 -0
  46. package/dist/layers.BQLZhz6B.js +6 -0
  47. package/dist/layers.BST6tR9a.js +4 -0
  48. package/dist/layers.BSTBZrFn.js +1 -0
  49. package/dist/layers.BUSnd1Ro.js +5 -0
  50. package/dist/layers.BUkDq4ln.js +84 -0
  51. package/dist/layers.BUsBCyiL.js +202 -0
  52. package/dist/layers.BXGiOI1Z.js +7 -0
  53. package/dist/layers.BYVHkqLR.js +39 -0
  54. package/dist/layers.BYzN4Zxz.js +7 -0
  55. package/dist/layers.BZcZF6Ct.js +41 -0
  56. package/dist/layers.B_Hf0SF-.js +1359 -0
  57. package/dist/{layers.BYmCD0mp.js → layers.Ba97nTEK.js} +1 -1
  58. package/dist/layers.Bbl6qitU.js +40 -0
  59. package/dist/layers.BdanmQPF.js +11 -0
  60. package/dist/layers.Bfd5bOAD.js +37 -0
  61. package/dist/layers.BhM2iCwB.js +5 -0
  62. package/dist/layers.BjZInKjA.js +2 -0
  63. package/dist/layers.Bk2PdkMX.js +10 -0
  64. package/dist/layers.BkMfeJ9R.js +41 -0
  65. package/dist/layers.BkjjkAwW.js +2 -0
  66. package/dist/layers.Blho0qwc.js +1 -0
  67. package/dist/layers.BoabOlrX.js +36 -0
  68. package/dist/layers.BpXiFzvR.js +36 -0
  69. package/dist/layers.BpilXLfW.js +6 -0
  70. package/dist/layers.BuQ1nJmP.js +1 -0
  71. package/dist/layers.Bv0tGvGl.js +40 -0
  72. package/dist/layers.BvZFIFgz.js +9 -0
  73. package/dist/layers.BwfB_nzW.js +8 -0
  74. package/dist/layers.Bwpn7zKE.js +9 -0
  75. package/dist/layers.Bz0ApNUe.js +70 -0
  76. package/dist/layers.C-G7-Jg3.js +7 -0
  77. package/dist/layers.C0bumYdC.js +7 -0
  78. package/dist/layers.C1KhBpGU.js +7 -0
  79. package/dist/layers.C3K_Whht.js +42 -0
  80. package/dist/layers.C51kZnWr.js +37 -0
  81. package/dist/layers.C5rttXXy.js +10 -0
  82. package/dist/{layers.CKC0lJDn.js → layers.C5uR7AiN.js} +1 -1
  83. package/dist/layers.C6Rn8zoI.js +42 -0
  84. package/dist/layers.C7lIplJU.js +247 -0
  85. package/dist/layers.CBXpUMze.js +96 -0
  86. package/dist/layers.CCRe_IA7.js +36 -0
  87. package/dist/{layers.CFJiIrku.js → layers.CClfR9Rs.js} +14180 -12682
  88. package/dist/layers.CDLdte-o.js +9 -0
  89. package/dist/layers.CDzPpnhN.js +52 -0
  90. package/dist/layers.CEXVJbhn.js +8 -0
  91. package/dist/layers.CGX7Piy7.js +1 -0
  92. package/dist/layers.CGc04km7.js +42 -0
  93. package/dist/layers.CH23k4XD.js +6 -0
  94. package/dist/layers.CHHqQlm1.js +9 -0
  95. package/dist/layers.CHZsXQcr.js +1 -0
  96. package/dist/layers.CMS1o_sE.js +40 -0
  97. package/dist/layers.CO4NHmK3.js +40 -0
  98. package/dist/layers.COAF7f8g.js +1 -0
  99. package/dist/layers.CPV5PaJ7.js +33 -0
  100. package/dist/layers.CPqqkX8Z.js +23 -0
  101. package/dist/layers.CQXDzk5h.js +1 -0
  102. package/dist/layers.CQv0GMRl.js +1 -0
  103. package/dist/layers.CR10RAJi.js +116 -0
  104. package/dist/layers.CR4riLSc.js +2235 -0
  105. package/dist/layers.CSjWzlk9.js +1 -0
  106. package/dist/layers.CTmkjIN6.js +5 -0
  107. package/dist/layers.CZMy0ug4.js +6 -0
  108. package/dist/layers.CZh7NZyl.js +42 -0
  109. package/dist/layers.C_dOgKfE.js +10 -0
  110. package/dist/layers.CcJ28sUd.js +9 -0
  111. package/dist/layers.CeMe5scF.js +1 -0
  112. package/dist/layers.CeVpKhli.js +122 -0
  113. package/dist/layers.Ch7C0MR9.js +39 -0
  114. package/dist/layers.ChAMqLmE.js +160 -0
  115. package/dist/layers.ChJyurjQ.js +7 -0
  116. package/dist/layers.ChPHYv68.js +41 -0
  117. package/dist/layers.ChykDTOy.js +11 -0
  118. package/dist/layers.Ci0QS82_.js +1 -0
  119. package/dist/layers.Ci0x4aAi.js +139 -0
  120. package/dist/layers.CiNAQOA-.js +50 -0
  121. package/dist/layers.Ck0iJfoW.js +39 -0
  122. package/dist/layers.Ckbp-T9r.js +32 -0
  123. package/dist/layers.Cl9Tl2nd.js +1 -0
  124. package/dist/layers.ClQj75nc.js +11 -0
  125. package/dist/layers.ClaqpFnu.js +233 -0
  126. package/dist/layers.CmHSmrZm.js +40 -0
  127. package/dist/layers.Cn6OfRlw.js +40 -0
  128. package/dist/layers.CnD3z0eZ.js +8 -0
  129. package/dist/layers.CnloMtKN.js +268 -0
  130. package/dist/layers.Cp82yltX.js +32 -0
  131. package/dist/layers.CphCG076.js +6 -0
  132. package/dist/layers.CqM3rL4-.js +5 -0
  133. package/dist/layers.CqVTtuYm.js +6 -0
  134. package/dist/layers.CvJxfPxo.js +9 -0
  135. package/dist/layers.CwPFdFUT.js +34 -0
  136. package/dist/layers.Cx14IKzN.js +4 -0
  137. package/dist/layers.Cxmncz59.js +32 -0
  138. package/dist/layers.D-ZYFolm.js +1 -0
  139. package/dist/layers.D0zn4_Mx.js +1 -0
  140. package/dist/layers.D18RSmmQ.js +7 -0
  141. package/dist/layers.D1cZq8tq.js +373 -0
  142. package/dist/layers.D2q8ZYi2.js +425 -0
  143. package/dist/layers.D2vOkfMK.js +38 -0
  144. package/dist/layers.D3Hkinja.js +5 -0
  145. package/dist/layers.D4fGb2cV.js +1272 -0
  146. package/dist/layers.D68FZk66.js +39 -0
  147. package/dist/layers.D7HvMBb6.js +39 -0
  148. package/dist/layers.D7jGxypv.js +8 -0
  149. package/dist/layers.D90-hSDT.js +4 -0
  150. package/dist/layers.D9A031XO.js +803 -0
  151. package/dist/layers.DARK07JA.js +42 -0
  152. package/dist/layers.DAx0hT2g.js +32 -0
  153. package/dist/layers.DCvUAfE1.js +40 -0
  154. package/dist/layers.DDRgaMwu.js +10 -0
  155. package/dist/layers.DEfJs03Z.js +1 -0
  156. package/dist/layers.DElpVOY-.js +8 -0
  157. package/dist/layers.DFd9A85i.js +14 -0
  158. package/dist/layers.DGZUGztZ.js +220 -0
  159. package/dist/layers.DHbdkCCU.js +38 -0
  160. package/dist/layers.DIrkcLlA.js +790 -0
  161. package/dist/layers.DKPzrygv.js +1 -0
  162. package/dist/layers.DK_t52oS.js +1126 -0
  163. package/dist/layers.DLwuMfdd.js +84 -0
  164. package/dist/layers.DMkBISW1.js +1 -0
  165. package/dist/layers.DMvWe0pJ.js +7 -0
  166. package/dist/layers.DN9HoVxI.js +18 -0
  167. package/dist/layers.DO-G3uLL.js +8 -0
  168. package/dist/layers.DOrgOHBr.js +1 -0
  169. package/dist/layers.DQCPMqIN.js +9 -0
  170. package/dist/layers.DTDpNGfk.js +1 -0
  171. package/dist/layers.DXTPaWjN.js +37 -0
  172. package/dist/layers.DXaSAlDN.js +13 -0
  173. package/dist/layers.DYx3Ot6h.js +139 -0
  174. package/dist/layers.D_MU5WlI.js +40 -0
  175. package/dist/layers.DalYdEkL.js +19 -0
  176. package/dist/layers.DbaKVP5e.js +1 -0
  177. package/dist/layers.Dbuivk7d.js +36 -0
  178. package/dist/layers.DdTLZZKb.js +48146 -0
  179. package/dist/layers.DeB3waPT.js +8 -0
  180. package/dist/layers.Dg8Wbn90.js +35 -0
  181. package/dist/layers.DhiFm4jW.js +10 -0
  182. package/dist/layers.DhzTwBn5.js +37 -0
  183. package/dist/layers.DjUOC4st.js +16 -0
  184. package/dist/layers.Dk9dbz6F.js +118 -0
  185. package/dist/layers.Dklz2JqP.js +41 -0
  186. package/dist/layers.Dol0x5Jd.js +61 -0
  187. package/dist/layers.DrtkQKK7.js +1 -0
  188. package/dist/layers.Ds95POLS.js +1 -0
  189. package/dist/layers.DsAtBUs-.js +1283 -0
  190. package/dist/layers.DtoCH9Nn.js +1 -0
  191. package/dist/layers.DwLw5o0M.js +38 -0
  192. package/dist/layers.DxA6ocdw.js +70 -0
  193. package/dist/layers.DxGDxkXA.js +164 -0
  194. package/dist/layers.Dxrm0nEM.js +2479 -0
  195. package/dist/layers.Dy1naDTQ.js +14 -0
  196. package/dist/layers.Dyor8Hot.js +186 -0
  197. package/dist/layers.Dyqg_e4P.js +41 -0
  198. package/dist/layers.DzaH7mDC.js +65 -0
  199. package/dist/layers.Dzc83sE7.js +1 -0
  200. package/dist/layers.FstVqdQC.js +804 -0
  201. package/dist/layers.HcI9cOEd.js +1089 -0
  202. package/dist/layers.I-MG0ir4.js +21461 -0
  203. package/dist/layers.I5-pSyca.js +1 -0
  204. package/dist/layers.JWCLFILJ.js +1 -0
  205. package/dist/layers.LOjND5R4.js +320 -0
  206. package/dist/{layers.BKFthpnI.js → layers.L_XjkGw6.js} +24 -24
  207. package/dist/layers.Lhl12ohc.js +1 -0
  208. package/dist/layers.N4wL2Xyj.js +1083 -0
  209. package/dist/layers.OEP2K3db.js +4 -0
  210. package/dist/layers.PO65UmTA.js +10 -0
  211. package/dist/layers.PhLwHKUM.js +40 -0
  212. package/dist/layers.Tatx7z0m.js +55 -0
  213. package/dist/layers.UbqG2dp_.js +10 -0
  214. package/dist/layers.WsdOSV4y.js +2 -0
  215. package/dist/{layers.C99LCymA.js → layers.Y41CVpLS.js} +70 -70
  216. package/dist/layers.Ym7pRGM7.js +84 -0
  217. package/dist/layers.b0h5ZBmD.js +61 -0
  218. package/dist/layers.c_QDfgff.js +257 -0
  219. package/dist/layers.cp645rbn.js +7 -0
  220. package/dist/layers.dqI-yLmM.js +41 -0
  221. package/dist/layers.fTcEk1do.js +261 -0
  222. package/dist/layers.gRKbOYG-.js +960 -0
  223. package/dist/layers.gaT5_-NN.js +32 -0
  224. package/dist/layers.gzGcAwbO.js +904 -0
  225. package/dist/layers.h0tSRttU.js +1 -0
  226. package/dist/layers.hkFN-BS0.js +39 -0
  227. package/dist/layers.iw01AOuQ.js +931 -0
  228. package/dist/layers.k2UyvrHI.js +35 -0
  229. package/dist/layers.kY3ZYtED.js +1 -0
  230. package/dist/layers.kthR742N.js +39 -0
  231. package/dist/layers.lCpg7dOn.js +21 -0
  232. package/dist/layers.lLRqycMO.js +39 -0
  233. package/dist/layers.oFAtdeQ1.js +501 -0
  234. package/dist/layers.p9hSNB6N.js +1 -0
  235. package/dist/layers.paz6tc0L.js +1034 -0
  236. package/dist/layers.rRMBW9ET.js +1580 -0
  237. package/dist/layers.tbRLuldN.js +1 -0
  238. package/dist/layers.x6Qk2Mwl.js +8 -0
  239. package/dist/layers.x6ioP3u0.js +423 -0
  240. package/dist/layers.za1sylgg.js +11692 -0
  241. package/package.json +6 -5
  242. package/dist/layers.F7W7VvW1.js +0 -164
@@ -0,0 +1,795 @@
1
+ import { a2 as ft, a3 as gt, a4 as mt, g as xt, l as E, d as G, Y as _t, a5 as bt, q as kt } from "./layers.BBwDvE6l.js";
2
+ import "./layers.I-MG0ir4.js";
3
+ import { a as D } from "./layers.BUkDq4ln.js";
4
+ var K = function() {
5
+ var n = function(g, i, r, c) {
6
+ for (r = r || {}, c = g.length; c--; r[g[c]] = i)
7
+ ;
8
+ return r;
9
+ }, t = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], e = [1, 9], a = [1, 10], s = [1, 11], h = [1, 12], l = [1, 13], p = [1, 16], y = [1, 17], f = {
10
+ trace: function() {
11
+ },
12
+ yy: {},
13
+ 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 },
14
+ 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" },
15
+ 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]],
16
+ performAction: function(i, r, c, d, u, o, $) {
17
+ var x = o.length - 1;
18
+ switch (u) {
19
+ case 1:
20
+ return o[x - 1];
21
+ case 2:
22
+ this.$ = [];
23
+ break;
24
+ case 3:
25
+ o[x - 1].push(o[x]), this.$ = o[x - 1];
26
+ break;
27
+ case 4:
28
+ case 5:
29
+ this.$ = o[x];
30
+ break;
31
+ case 6:
32
+ case 7:
33
+ this.$ = [];
34
+ break;
35
+ case 8:
36
+ d.getCommonDb().setDiagramTitle(o[x].substr(6)), this.$ = o[x].substr(6);
37
+ break;
38
+ case 9:
39
+ this.$ = o[x].trim(), d.getCommonDb().setAccTitle(this.$);
40
+ break;
41
+ case 10:
42
+ case 11:
43
+ this.$ = o[x].trim(), d.getCommonDb().setAccDescription(this.$);
44
+ break;
45
+ case 12:
46
+ d.addSection(o[x].substr(8)), this.$ = o[x].substr(8);
47
+ break;
48
+ case 15:
49
+ d.addTask(o[x], 0, ""), this.$ = o[x];
50
+ break;
51
+ case 16:
52
+ d.addEvent(o[x].substr(2)), this.$ = o[x];
53
+ break;
54
+ }
55
+ },
56
+ 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: a, 14: s, 16: h, 17: l, 18: 14, 19: 15, 20: p, 21: y }, n(t, [2, 7], { 1: [2, 1] }), n(t, [2, 3]), { 9: 18, 11: e, 12: a, 14: s, 16: h, 17: l, 18: 14, 19: 15, 20: p, 21: y }, 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])],
57
+ defaultActions: {},
58
+ parseError: function(i, r) {
59
+ if (r.recoverable)
60
+ this.trace(i);
61
+ else {
62
+ var c = new Error(i);
63
+ throw c.hash = r, c;
64
+ }
65
+ },
66
+ parse: function(i) {
67
+ var r = this, c = [0], d = [], u = [null], o = [], $ = this.table, x = "", T = 0, W = 0, C = 2, A = 1, B = o.slice.call(arguments, 1), k = Object.create(this.lexer), w = { yy: {} };
68
+ for (var v in this.yy)
69
+ Object.prototype.hasOwnProperty.call(this.yy, v) && (w.yy[v] = this.yy[v]);
70
+ k.setInput(i, w.yy), w.yy.lexer = k, w.yy.parser = this, typeof k.yylloc > "u" && (k.yylloc = {});
71
+ var I = k.yylloc;
72
+ o.push(I);
73
+ var P = k.options && k.options.ranges;
74
+ typeof w.yy.parseError == "function" ? this.parseError = w.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
75
+ function z() {
76
+ var M;
77
+ return M = d.pop() || k.lex() || A, typeof M != "number" && (M instanceof Array && (d = M, M = d.pop()), M = r.symbols_[M] || M), M;
78
+ }
79
+ for (var b, L, S, Z, R = {}, O, N, Y, j; ; ) {
80
+ if (L = c[c.length - 1], this.defaultActions[L] ? S = this.defaultActions[L] : ((b === null || typeof b > "u") && (b = z()), S = $[L] && $[L][b]), typeof S > "u" || !S.length || !S[0]) {
81
+ var J = "";
82
+ j = [];
83
+ for (O in $[L])
84
+ this.terminals_[O] && O > C && j.push("'" + this.terminals_[O] + "'");
85
+ k.showPosition ? J = "Parse error on line " + (T + 1) + `:
86
+ ` + k.showPosition() + `
87
+ Expecting ` + j.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : J = "Parse error on line " + (T + 1) + ": Unexpected " + (b == A ? "end of input" : "'" + (this.terminals_[b] || b) + "'"), this.parseError(J, {
88
+ text: k.match,
89
+ token: this.terminals_[b] || b,
90
+ line: k.yylineno,
91
+ loc: I,
92
+ expected: j
93
+ });
94
+ }
95
+ if (S[0] instanceof Array && S.length > 1)
96
+ throw new Error("Parse Error: multiple actions possible at state: " + L + ", token: " + b);
97
+ switch (S[0]) {
98
+ case 1:
99
+ c.push(b), u.push(k.yytext), o.push(k.yylloc), c.push(S[1]), b = null, W = k.yyleng, x = k.yytext, T = k.yylineno, I = k.yylloc;
100
+ break;
101
+ case 2:
102
+ if (N = this.productions_[S[1]][1], R.$ = u[u.length - N], R._$ = {
103
+ first_line: o[o.length - (N || 1)].first_line,
104
+ last_line: o[o.length - 1].last_line,
105
+ first_column: o[o.length - (N || 1)].first_column,
106
+ last_column: o[o.length - 1].last_column
107
+ }, P && (R._$.range = [
108
+ o[o.length - (N || 1)].range[0],
109
+ o[o.length - 1].range[1]
110
+ ]), Z = this.performAction.apply(R, [
111
+ x,
112
+ W,
113
+ T,
114
+ w.yy,
115
+ S[1],
116
+ u,
117
+ o
118
+ ].concat(B)), typeof Z < "u")
119
+ return Z;
120
+ N && (c = c.slice(0, -1 * N * 2), u = u.slice(0, -1 * N), o = o.slice(0, -1 * N)), c.push(this.productions_[S[1]][0]), u.push(R.$), o.push(R._$), Y = $[c[c.length - 2]][c[c.length - 1]], c.push(Y);
121
+ break;
122
+ case 3:
123
+ return !0;
124
+ }
125
+ }
126
+ return !0;
127
+ }
128
+ }, _ = /* @__PURE__ */ function() {
129
+ var g = {
130
+ EOF: 1,
131
+ parseError: function(r, c) {
132
+ if (this.yy.parser)
133
+ this.yy.parser.parseError(r, c);
134
+ else
135
+ throw new Error(r);
136
+ },
137
+ // resets the lexer, sets new input
138
+ setInput: function(i, r) {
139
+ return this.yy = r || 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 = {
140
+ first_line: 1,
141
+ first_column: 0,
142
+ last_line: 1,
143
+ last_column: 0
144
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
145
+ },
146
+ // consumes and returns one char from the input
147
+ input: function() {
148
+ var i = this._input[0];
149
+ this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
150
+ var r = i.match(/(?:\r\n?|\n).*/g);
151
+ return r ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
152
+ },
153
+ // unshifts one char (or a string) into the input
154
+ unput: function(i) {
155
+ var r = i.length, c = i.split(/(?:\r\n?|\n)/g);
156
+ this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r;
157
+ var d = this.match.split(/(?:\r\n?|\n)/g);
158
+ 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);
159
+ var u = this.yylloc.range;
160
+ return this.yylloc = {
161
+ first_line: this.yylloc.first_line,
162
+ last_line: this.yylineno + 1,
163
+ first_column: this.yylloc.first_column,
164
+ last_column: c ? (c.length === d.length ? this.yylloc.first_column : 0) + d[d.length - c.length].length - c[0].length : this.yylloc.first_column - r
165
+ }, this.options.ranges && (this.yylloc.range = [u[0], u[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this;
166
+ },
167
+ // When called from action, caches matched text and appends it on next action
168
+ more: function() {
169
+ return this._more = !0, this;
170
+ },
171
+ // 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.
172
+ reject: function() {
173
+ if (this.options.backtrack_lexer)
174
+ this._backtrack = !0;
175
+ else
176
+ 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).
177
+ ` + this.showPosition(), {
178
+ text: "",
179
+ token: null,
180
+ line: this.yylineno
181
+ });
182
+ return this;
183
+ },
184
+ // retain first n characters of the match
185
+ less: function(i) {
186
+ this.unput(this.match.slice(i));
187
+ },
188
+ // displays already matched input, i.e. for error messages
189
+ pastInput: function() {
190
+ var i = this.matched.substr(0, this.matched.length - this.match.length);
191
+ return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
192
+ },
193
+ // displays upcoming input, i.e. for error messages
194
+ upcomingInput: function() {
195
+ var i = this.match;
196
+ return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
197
+ },
198
+ // displays the character position where the lexing error occurred, i.e. for error messages
199
+ showPosition: function() {
200
+ var i = this.pastInput(), r = new Array(i.length + 1).join("-");
201
+ return i + this.upcomingInput() + `
202
+ ` + r + "^";
203
+ },
204
+ // test the lexed token: return FALSE when not a match, otherwise return token
205
+ test_match: function(i, r) {
206
+ var c, d, u;
207
+ if (this.options.backtrack_lexer && (u = {
208
+ yylineno: this.yylineno,
209
+ yylloc: {
210
+ first_line: this.yylloc.first_line,
211
+ last_line: this.last_line,
212
+ first_column: this.yylloc.first_column,
213
+ last_column: this.yylloc.last_column
214
+ },
215
+ yytext: this.yytext,
216
+ match: this.match,
217
+ matches: this.matches,
218
+ matched: this.matched,
219
+ yyleng: this.yyleng,
220
+ offset: this.offset,
221
+ _more: this._more,
222
+ _input: this._input,
223
+ yy: this.yy,
224
+ conditionStack: this.conditionStack.slice(0),
225
+ done: this.done
226
+ }, this.options.ranges && (u.yylloc.range = this.yylloc.range.slice(0))), d = i[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
227
+ first_line: this.yylloc.last_line,
228
+ last_line: this.yylineno + 1,
229
+ first_column: this.yylloc.last_column,
230
+ last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
231
+ }, 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, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
232
+ return c;
233
+ if (this._backtrack) {
234
+ for (var o in u)
235
+ this[o] = u[o];
236
+ return !1;
237
+ }
238
+ return !1;
239
+ },
240
+ // return next match in input
241
+ next: function() {
242
+ if (this.done)
243
+ return this.EOF;
244
+ this._input || (this.done = !0);
245
+ var i, r, c, d;
246
+ this._more || (this.yytext = "", this.match = "");
247
+ for (var u = this._currentRules(), o = 0; o < u.length; o++)
248
+ if (c = this._input.match(this.rules[u[o]]), c && (!r || c[0].length > r[0].length)) {
249
+ if (r = c, d = o, this.options.backtrack_lexer) {
250
+ if (i = this.test_match(c, u[o]), i !== !1)
251
+ return i;
252
+ if (this._backtrack) {
253
+ r = !1;
254
+ continue;
255
+ } else
256
+ return !1;
257
+ } else if (!this.options.flex)
258
+ break;
259
+ }
260
+ return r ? (i = this.test_match(r, u[d]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
261
+ ` + this.showPosition(), {
262
+ text: "",
263
+ token: null,
264
+ line: this.yylineno
265
+ });
266
+ },
267
+ // return next match that has a token
268
+ lex: function() {
269
+ var r = this.next();
270
+ return r || this.lex();
271
+ },
272
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
273
+ begin: function(r) {
274
+ this.conditionStack.push(r);
275
+ },
276
+ // pop the previously active lexer condition state off the condition stack
277
+ popState: function() {
278
+ var r = this.conditionStack.length - 1;
279
+ return r > 0 ? this.conditionStack.pop() : this.conditionStack[0];
280
+ },
281
+ // produce the lexer rule set which is active for the currently active lexer condition state
282
+ _currentRules: function() {
283
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
284
+ },
285
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
286
+ topState: function(r) {
287
+ return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL";
288
+ },
289
+ // alias for begin(condition)
290
+ pushState: function(r) {
291
+ this.begin(r);
292
+ },
293
+ // return the number of states currently on the stack
294
+ stateStackSize: function() {
295
+ return this.conditionStack.length;
296
+ },
297
+ options: { "case-insensitive": !0 },
298
+ performAction: function(r, c, d, u) {
299
+ switch (d) {
300
+ case 0:
301
+ break;
302
+ case 1:
303
+ break;
304
+ case 2:
305
+ return 10;
306
+ case 3:
307
+ break;
308
+ case 4:
309
+ break;
310
+ case 5:
311
+ return 4;
312
+ case 6:
313
+ return 11;
314
+ case 7:
315
+ return this.begin("acc_title"), 12;
316
+ case 8:
317
+ return this.popState(), "acc_title_value";
318
+ case 9:
319
+ return this.begin("acc_descr"), 14;
320
+ case 10:
321
+ return this.popState(), "acc_descr_value";
322
+ case 11:
323
+ this.begin("acc_descr_multiline");
324
+ break;
325
+ case 12:
326
+ this.popState();
327
+ break;
328
+ case 13:
329
+ return "acc_descr_multiline_value";
330
+ case 14:
331
+ return 17;
332
+ case 15:
333
+ return 21;
334
+ case 16:
335
+ return 20;
336
+ case 17:
337
+ return 6;
338
+ case 18:
339
+ return "INVALID";
340
+ }
341
+ },
342
+ 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;]+)/i, /^(?:[^#:\n;]+)/i, /^(?:$)/i, /^(?:.)/i],
343
+ 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 } }
344
+ };
345
+ return g;
346
+ }();
347
+ f.lexer = _;
348
+ function m() {
349
+ this.yy = {};
350
+ }
351
+ return m.prototype = f, f.Parser = m, new m();
352
+ }();
353
+ K.parser = K;
354
+ const vt = K;
355
+ let F = "", st = 0;
356
+ const Q = [], q = [], V = [], it = () => bt, rt = function() {
357
+ Q.length = 0, q.length = 0, F = "", V.length = 0, kt();
358
+ }, at = function(n) {
359
+ F = n, Q.push(n);
360
+ }, lt = function() {
361
+ return Q;
362
+ }, ot = function() {
363
+ let n = tt();
364
+ const t = 100;
365
+ let e = 0;
366
+ for (; !n && e < t; )
367
+ n = tt(), e++;
368
+ return q.push(...V), q;
369
+ }, ct = function(n, t, e) {
370
+ const a = {
371
+ id: st++,
372
+ section: F,
373
+ type: F,
374
+ task: n,
375
+ score: t || 0,
376
+ //if event is defined, then add it the events array
377
+ events: e ? [e] : []
378
+ };
379
+ V.push(a);
380
+ }, ht = function(n) {
381
+ V.find((e) => e.id === st - 1).events.push(n);
382
+ }, dt = function(n) {
383
+ const t = {
384
+ section: F,
385
+ type: F,
386
+ description: n,
387
+ task: n,
388
+ classes: []
389
+ };
390
+ q.push(t);
391
+ }, tt = function() {
392
+ const n = function(e) {
393
+ return V[e].processed;
394
+ };
395
+ let t = !0;
396
+ for (const [e, a] of V.entries())
397
+ n(e), t = t && a.processed;
398
+ return t;
399
+ }, wt = {
400
+ clear: rt,
401
+ getCommonDb: it,
402
+ addSection: at,
403
+ getSections: lt,
404
+ getTasks: ot,
405
+ addTask: ct,
406
+ addTaskOrg: dt,
407
+ addEvent: ht
408
+ }, St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
409
+ __proto__: null,
410
+ addEvent: ht,
411
+ addSection: at,
412
+ addTask: ct,
413
+ addTaskOrg: dt,
414
+ clear: rt,
415
+ default: wt,
416
+ getCommonDb: it,
417
+ getSections: lt,
418
+ getTasks: ot
419
+ }, Symbol.toStringTag, { value: "Module" })), Et = 12, U = function(n, t) {
420
+ const e = n.append("rect");
421
+ 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;
422
+ }, Tt = function(n, t) {
423
+ const a = n.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), s = n.append("g");
424
+ 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");
425
+ function h(y) {
426
+ const f = D().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
427
+ y.append("path").attr("class", "mouth").attr("d", f).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
428
+ }
429
+ function l(y) {
430
+ const f = D().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
431
+ y.append("path").attr("class", "mouth").attr("d", f).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
432
+ }
433
+ function p(y) {
434
+ y.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");
435
+ }
436
+ return t.score > 3 ? h(s) : t.score < 3 ? l(s) : p(s), a;
437
+ }, It = function(n, t) {
438
+ const e = n.append("circle");
439
+ 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;
440
+ }, ut = function(n, t) {
441
+ const e = t.text.replace(/<br\s*\/?>/gi, " "), a = n.append("text");
442
+ a.attr("x", t.x), a.attr("y", t.y), a.attr("class", "legend"), a.style("text-anchor", t.anchor), t.class !== void 0 && a.attr("class", t.class);
443
+ const s = a.append("tspan");
444
+ return s.attr("x", t.x + t.textMargin * 2), s.text(e), a;
445
+ }, $t = function(n, t) {
446
+ function e(s, h, l, p, y) {
447
+ return s + "," + h + " " + (s + l) + "," + h + " " + (s + l) + "," + (h + p - y) + " " + (s + l - y * 1.2) + "," + (h + p) + " " + s + "," + (h + p);
448
+ }
449
+ const a = n.append("polygon");
450
+ a.attr("points", e(t.x, t.y, 50, 20, 7)), a.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, ut(n, t);
451
+ }, Nt = function(n, t, e) {
452
+ const a = n.append("g"), s = X();
453
+ s.x = t.x, s.y = t.y, s.fill = t.fill, s.width = e.width, s.height = e.height, s.class = "journey-section section-type-" + t.num, s.rx = 3, s.ry = 3, U(a, s), pt(e)(
454
+ t.text,
455
+ a,
456
+ s.x,
457
+ s.y,
458
+ s.width,
459
+ s.height,
460
+ { class: "journey-section section-type-" + t.num },
461
+ e,
462
+ t.colour
463
+ );
464
+ };
465
+ let et = -1;
466
+ const Mt = function(n, t, e) {
467
+ const a = t.x + e.width / 2, s = n.append("g");
468
+ et++;
469
+ const h = 300 + 5 * 30;
470
+ s.append("line").attr("id", "task" + et).attr("x1", a).attr("y1", t.y).attr("x2", a).attr("y2", h).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Tt(s, {
471
+ cx: a,
472
+ cy: 300 + (5 - t.score) * 30,
473
+ score: t.score
474
+ });
475
+ const l = X();
476
+ l.x = t.x, l.y = t.y, l.fill = t.fill, l.width = e.width, l.height = e.height, l.class = "task task-type-" + t.num, l.rx = 3, l.ry = 3, U(s, l), t.x + 14, pt(e)(
477
+ t.task,
478
+ s,
479
+ l.x,
480
+ l.y,
481
+ l.width,
482
+ l.height,
483
+ { class: "task" },
484
+ e,
485
+ t.colour
486
+ );
487
+ }, Lt = function(n, t) {
488
+ U(n, {
489
+ x: t.startx,
490
+ y: t.starty,
491
+ width: t.stopx - t.startx,
492
+ height: t.stopy - t.starty,
493
+ fill: t.fill,
494
+ class: "rect"
495
+ }).lower();
496
+ }, At = function() {
497
+ return {
498
+ x: 0,
499
+ y: 0,
500
+ fill: void 0,
501
+ "text-anchor": "start",
502
+ width: 100,
503
+ height: 100,
504
+ textMargin: 0,
505
+ rx: 0,
506
+ ry: 0
507
+ };
508
+ }, X = function() {
509
+ return {
510
+ x: 0,
511
+ y: 0,
512
+ width: 100,
513
+ anchor: "start",
514
+ height: 100,
515
+ rx: 0,
516
+ ry: 0
517
+ };
518
+ }, pt = /* @__PURE__ */ function() {
519
+ function n(s, h, l, p, y, f, _, m) {
520
+ const g = h.append("text").attr("x", l + y / 2).attr("y", p + f / 2 + 5).style("font-color", m).style("text-anchor", "middle").text(s);
521
+ a(g, _);
522
+ }
523
+ function t(s, h, l, p, y, f, _, m, g) {
524
+ const { taskFontSize: i, taskFontFamily: r } = m, c = s.split(/<br\s*\/?>/gi);
525
+ for (let d = 0; d < c.length; d++) {
526
+ const u = d * i - i * (c.length - 1) / 2, o = h.append("text").attr("x", l + y / 2).attr("y", p).attr("fill", g).style("text-anchor", "middle").style("font-size", i).style("font-family", r);
527
+ o.append("tspan").attr("x", l + y / 2).attr("dy", u).text(c[d]), o.attr("y", p + f / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(o, _);
528
+ }
529
+ }
530
+ function e(s, h, l, p, y, f, _, m) {
531
+ const g = h.append("switch"), r = g.append("foreignObject").attr("x", l).attr("y", p).attr("width", y).attr("height", f).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
532
+ r.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), t(s, g, l, p, y, f, _, m), a(r, _);
533
+ }
534
+ function a(s, h) {
535
+ for (const l in h)
536
+ l in h && s.attr(l, h[l]);
537
+ }
538
+ return function(s) {
539
+ return s.textPlacement === "fo" ? e : s.textPlacement === "old" ? n : t;
540
+ };
541
+ }(), Pt = function(n) {
542
+ 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");
543
+ };
544
+ function yt(n, t) {
545
+ n.each(function() {
546
+ var e = G(this), a = e.text().split(/(\s+|<br>)/).reverse(), s, h = [], l = 1.1, p = e.attr("y"), y = parseFloat(e.attr("dy")), f = e.text(null).append("tspan").attr("x", 0).attr("y", p).attr("dy", y + "em");
547
+ for (let _ = 0; _ < a.length; _++)
548
+ s = a[a.length - 1 - _], h.push(s), f.text(h.join(" ").trim()), (f.node().getComputedTextLength() > t || s === "<br>") && (h.pop(), f.text(h.join(" ").trim()), s === "<br>" ? h = [""] : h = [s], f = e.append("tspan").attr("x", 0).attr("y", p).attr("dy", l + "em").text(s));
549
+ });
550
+ }
551
+ const Ht = function(n, t, e, a) {
552
+ const s = e % Et - 1, h = n.append("g");
553
+ t.section = s, h.attr(
554
+ "class",
555
+ (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + s)
556
+ );
557
+ const l = h.append("g"), p = h.append("g"), f = p.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(yt, t.width).node().getBBox(), _ = a.fontSize && a.fontSize.replace ? a.fontSize.replace("px", "") : a.fontSize;
558
+ return t.height = f.height + _ * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, p.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), zt(l, t, s), t;
559
+ }, Ct = function(n, t, e) {
560
+ const a = n.append("g"), h = a.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(yt, t.width).node().getBBox(), l = e.fontSize && e.fontSize.replace ? e.fontSize.replace("px", "") : e.fontSize;
561
+ return a.remove(), h.height + l * 1.1 * 0.5 + t.padding;
562
+ }, zt = function(n, t, e) {
563
+ n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr(
564
+ "d",
565
+ `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`
566
+ ), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
567
+ }, H = {
568
+ drawRect: U,
569
+ drawCircle: It,
570
+ drawSection: Nt,
571
+ drawText: ut,
572
+ drawLabel: $t,
573
+ drawTask: Mt,
574
+ drawBackgroundRect: Lt,
575
+ getTextObj: At,
576
+ getNoteRect: X,
577
+ initGraphics: Pt,
578
+ drawNode: Ht,
579
+ getVirtualNodeHeight: Ct
580
+ }, Rt = function(n, t, e, a) {
581
+ var s, h;
582
+ const l = xt(), p = l.leftMargin ?? 50;
583
+ E.debug("timeline", a.db);
584
+ const y = l.securityLevel;
585
+ let f;
586
+ y === "sandbox" && (f = G("#i" + t));
587
+ const m = (y === "sandbox" ? G(f.nodes()[0].contentDocument.body) : G("body")).select("#" + t);
588
+ m.append("g");
589
+ const g = a.db.getTasks(), i = a.db.getCommonDb().getDiagramTitle();
590
+ E.debug("task", g), H.initGraphics(m);
591
+ const r = a.db.getSections();
592
+ E.debug("sections", r);
593
+ let c = 0, d = 0, u = 0, o = 0, $ = 50 + p, x = 50;
594
+ o = 50;
595
+ let T = 0, W = !0;
596
+ r.forEach(function(w) {
597
+ const v = {
598
+ number: T,
599
+ descr: w,
600
+ section: T,
601
+ width: 150,
602
+ padding: 20,
603
+ maxHeight: c
604
+ }, I = H.getVirtualNodeHeight(m, v, l);
605
+ E.debug("sectionHeight before draw", I), c = Math.max(c, I + 20);
606
+ });
607
+ let C = 0, A = 0;
608
+ E.debug("tasks.length", g.length);
609
+ for (const [w, v] of g.entries()) {
610
+ const I = {
611
+ number: w,
612
+ descr: v,
613
+ section: v.section,
614
+ width: 150,
615
+ padding: 20,
616
+ maxHeight: d
617
+ }, P = H.getVirtualNodeHeight(m, I, l);
618
+ E.debug("taskHeight before draw", P), d = Math.max(d, P + 20), C = Math.max(C, v.events.length);
619
+ let z = 0;
620
+ for (let b = 0; b < v.events.length; b++) {
621
+ const S = {
622
+ descr: v.events[b],
623
+ section: v.section,
624
+ number: v.section,
625
+ width: 150,
626
+ padding: 20,
627
+ maxHeight: 50
628
+ };
629
+ z += H.getVirtualNodeHeight(m, S, l);
630
+ }
631
+ A = Math.max(A, z);
632
+ }
633
+ E.debug("maxSectionHeight before draw", c), E.debug("maxTaskHeight before draw", d), r && r.length > 0 ? r.forEach((w) => {
634
+ const v = g.filter((b) => b.section === w), I = {
635
+ number: T,
636
+ descr: w,
637
+ section: T,
638
+ width: 200 * Math.max(v.length, 1) - 50,
639
+ padding: 20,
640
+ maxHeight: c
641
+ };
642
+ E.debug("sectionNode", I);
643
+ const P = m.append("g"), z = H.drawNode(P, I, T, l);
644
+ E.debug("sectionNode output", z), P.attr("transform", `translate(${$}, ${o})`), x += c + 50, v.length > 0 && nt(
645
+ m,
646
+ v,
647
+ T,
648
+ $,
649
+ x,
650
+ d,
651
+ l,
652
+ C,
653
+ A,
654
+ c,
655
+ !1
656
+ ), $ += 200 * Math.max(v.length, 1), x = o, T++;
657
+ }) : (W = !1, nt(
658
+ m,
659
+ g,
660
+ T,
661
+ $,
662
+ x,
663
+ d,
664
+ l,
665
+ C,
666
+ A,
667
+ c,
668
+ !0
669
+ ));
670
+ const B = m.node().getBBox();
671
+ E.debug("bounds", B), i && m.append("text").text(i).attr("x", B.width / 2 - p).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), u = W ? c + d + 150 : d + 100, m.append("g").attr("class", "lineWrapper").append("line").attr("x1", p).attr("y1", u).attr("x2", B.width + 3 * p).attr("y2", u).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), _t(
672
+ void 0,
673
+ m,
674
+ ((s = l.timeline) == null ? void 0 : s.padding) ?? 50,
675
+ ((h = l.timeline) == null ? void 0 : h.useMaxWidth) ?? !1
676
+ );
677
+ }, nt = function(n, t, e, a, s, h, l, p, y, f, _) {
678
+ var m;
679
+ for (const g of t) {
680
+ const i = {
681
+ descr: g.task,
682
+ section: e,
683
+ number: e,
684
+ width: 150,
685
+ padding: 20,
686
+ maxHeight: h
687
+ };
688
+ E.debug("taskNode", i);
689
+ const r = n.append("g").attr("class", "taskWrapper"), d = H.drawNode(r, i, e, l).height;
690
+ if (E.debug("taskHeight after draw", d), r.attr("transform", `translate(${a}, ${s})`), h = Math.max(h, d), g.events) {
691
+ const u = n.append("g").attr("class", "lineWrapper");
692
+ let o = h;
693
+ s += 100, o = o + Ft(n, g.events, e, a, s, l), s -= 100, u.append("line").attr("x1", a + 190 / 2).attr("y1", s + h).attr("x2", a + 190 / 2).attr(
694
+ "y2",
695
+ s + h + (_ ? h : f) + y + 120
696
+ ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
697
+ }
698
+ a = a + 200, _ && !((m = l.timeline) != null && m.disableMulticolor) && e++;
699
+ }
700
+ s = s - 10;
701
+ }, Ft = function(n, t, e, a, s, h) {
702
+ let l = 0;
703
+ const p = s;
704
+ s = s + 100;
705
+ for (const y of t) {
706
+ const f = {
707
+ descr: y,
708
+ section: e,
709
+ number: e,
710
+ width: 150,
711
+ padding: 20,
712
+ maxHeight: 50
713
+ };
714
+ E.debug("eventNode", f);
715
+ const _ = n.append("g").attr("class", "eventWrapper"), g = H.drawNode(_, f, e, h).height;
716
+ l = l + g, _.attr("transform", `translate(${a}, ${s})`), s = s + 10 + g;
717
+ }
718
+ return s = p, l;
719
+ }, Vt = {
720
+ setConf: () => {
721
+ },
722
+ draw: Rt
723
+ }, Wt = (n) => {
724
+ let t = "";
725
+ for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
726
+ n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], ft(n["lineColor" + e]) ? n["lineColor" + e] = gt(n["lineColor" + e], 20) : n["lineColor" + e] = mt(n["lineColor" + e], 20);
727
+ for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) {
728
+ const a = "" + (17 - 3 * e);
729
+ t += `
730
+ .section-${e - 1} rect, .section-${e - 1} path, .section-${e - 1} circle, .section-${e - 1} path {
731
+ fill: ${n["cScale" + e]};
732
+ }
733
+ .section-${e - 1} text {
734
+ fill: ${n["cScaleLabel" + e]};
735
+ }
736
+ .node-icon-${e - 1} {
737
+ font-size: 40px;
738
+ color: ${n["cScaleLabel" + e]};
739
+ }
740
+ .section-edge-${e - 1}{
741
+ stroke: ${n["cScale" + e]};
742
+ }
743
+ .edge-depth-${e - 1}{
744
+ stroke-width: ${a};
745
+ }
746
+ .section-${e - 1} line {
747
+ stroke: ${n["cScaleInv" + e]} ;
748
+ stroke-width: 3;
749
+ }
750
+
751
+ .lineWrapper line{
752
+ stroke: ${n["cScaleLabel" + e]} ;
753
+ }
754
+
755
+ .disabled, .disabled circle, .disabled text {
756
+ fill: lightgray;
757
+ }
758
+ .disabled text {
759
+ fill: #efefef;
760
+ }
761
+ `;
762
+ }
763
+ return t;
764
+ }, Bt = (n) => `
765
+ .edge {
766
+ stroke-width: 3;
767
+ }
768
+ ${Wt(n)}
769
+ .section-root rect, .section-root path, .section-root circle {
770
+ fill: ${n.git0};
771
+ }
772
+ .section-root text {
773
+ fill: ${n.gitBranchLabel0};
774
+ }
775
+ .icon-container {
776
+ height:100%;
777
+ display: flex;
778
+ justify-content: center;
779
+ align-items: center;
780
+ }
781
+ .edge {
782
+ fill: none;
783
+ }
784
+ .eventWrapper {
785
+ filter: brightness(120%);
786
+ }
787
+ `, Ot = Bt, Ut = {
788
+ db: St,
789
+ renderer: Vt,
790
+ parser: vt,
791
+ styles: Ot
792
+ };
793
+ export {
794
+ Ut as diagram
795
+ };