@layers-app/editor 0.7.18 → 0.7.21

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 (249) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +77 -1
  3. package/dist/index.js +15 -9
  4. package/dist/layers.-s__T3tP.js +1 -0
  5. package/dist/layers.04i4fkj7.js +6 -0
  6. package/dist/layers.1SzEqGRR.js +41 -0
  7. package/dist/layers.2dTBEhuc.js +2 -0
  8. package/dist/layers.52famHy6.js +1 -0
  9. package/dist/layers.58bCw_aL.js +4 -0
  10. package/dist/layers.5RtCiK8q.js +9 -0
  11. package/dist/layers.69cwQogW.js +40 -0
  12. package/dist/layers.6QD9G4kN.js +3 -0
  13. package/dist/layers.7JqFgE4-.js +15 -0
  14. package/dist/layers.86s2RIyn.js +8 -0
  15. package/dist/layers.8Sq63dkZ.js +27040 -0
  16. package/dist/layers.9j1NNMqz.js +22 -0
  17. package/dist/layers.9pNaFvaX.js +1 -0
  18. package/dist/layers.AYn1Jxgj.js +8 -0
  19. package/dist/layers.B-Fl_3EP.js +32 -0
  20. package/dist/layers.B0Xg4d5i.js +7 -0
  21. package/dist/layers.B0lSXbHP.js +10 -0
  22. package/dist/layers.B19hGmey.js +1 -0
  23. package/dist/layers.B3-xvp4C.js +39 -0
  24. package/dist/layers.B3D4g2HH.js +1 -0
  25. package/dist/layers.B3JU7UM6.js +2 -0
  26. package/dist/layers.B3gbBlxh.js +84 -0
  27. package/dist/layers.B4y9a-82.js +1 -0
  28. package/dist/layers.B5HBOY_H.js +37 -0
  29. package/dist/layers.B5gZXeOB.js +960 -0
  30. package/dist/layers.B7K7JjK6.js +1510 -0
  31. package/dist/layers.B7OVZYzM.js +1 -0
  32. package/dist/layers.B7a0NihO.js +32 -0
  33. package/dist/layers.B9bIdW-1.js +8 -0
  34. package/dist/layers.BAbr267F.js +8 -0
  35. package/dist/layers.BAtv1CM7.js +1 -0
  36. package/dist/layers.BE3zY9BD.js +7 -0
  37. package/dist/layers.BENQ0QOR.js +37 -0
  38. package/dist/layers.BEsv0Vnh.js +10 -0
  39. package/dist/layers.BGVB62eh.js +10 -0
  40. package/dist/layers.BHbCCtHz.js +41 -0
  41. package/dist/layers.BHnnpXsE.js +794 -0
  42. package/dist/layers.BIeVwYKL.js +1 -0
  43. package/dist/layers.BJDrjORS.js +244 -0
  44. package/dist/layers.BKP1mQ8Z.js +11 -0
  45. package/dist/layers.BLUIfQT4.js +11 -0
  46. package/dist/layers.BLd2spTm.js +1 -0
  47. package/dist/layers.BLwsSbt1.js +5 -0
  48. package/dist/layers.BPo1StNd.js +10 -0
  49. package/dist/layers.BQOvCWpV.js +2966 -0
  50. package/dist/layers.BRj7WXSC.js +1268 -0
  51. package/dist/layers.BSOcI_W1.js +271 -0
  52. package/dist/layers.BSTBZrFn.js +1 -0
  53. package/dist/layers.BU7Z5I9s.js +38 -0
  54. package/dist/layers.BVP5J-o1.js +257 -0
  55. package/dist/layers.BW2tS16y.js +9 -0
  56. package/dist/layers.BWg0ESYB.js +10 -0
  57. package/dist/layers.BXK1dt1S.js +38 -0
  58. package/dist/layers.BXTk_2Zm.js +118 -0
  59. package/dist/layers.BXe_WrOI.js +223 -0
  60. package/dist/layers.BXqUT1rh.js +1 -0
  61. package/dist/layers.Ba2h-Mfy.js +8 -0
  62. package/dist/layers.BbCfEXyj.js +55 -0
  63. package/dist/layers.Bc0qQQCc.js +1089 -0
  64. package/dist/layers.Bci9vDR2.js +6 -0
  65. package/dist/layers.Bcv8luEU.js +40 -0
  66. package/dist/layers.BearaZFa.js +1 -0
  67. package/dist/layers.Bfe4gpo5.js +41 -0
  68. package/dist/layers.BjO63vzU.js +4 -0
  69. package/dist/layers.Bl2p9wCy.js +10 -0
  70. package/dist/layers.BoVXqWbw.js +7 -0
  71. package/dist/layers.BpilXLfW.js +6 -0
  72. package/dist/layers.BqD_vPBO.js +32 -0
  73. package/dist/layers.BqG-mFfW.js +129 -0
  74. package/dist/layers.BrEfKAWB.js +8 -0
  75. package/dist/layers.BtA2IPBg.js +2482 -0
  76. package/dist/layers.BuCZq_Yw.js +1088 -0
  77. package/dist/layers.BuidC-N0.js +7 -0
  78. package/dist/layers.BwCq95j_.js +323 -0
  79. package/dist/layers.BxlM82Ik.js +42 -0
  80. package/dist/layers.BzuIw3LZ.js +1 -0
  81. package/dist/layers.C14GGmi8.js +1034 -0
  82. package/dist/layers.C2-FVR7k.js +40 -0
  83. package/dist/layers.C7dDGsdF.js +42 -0
  84. package/dist/layers.C8_lu5UH.js +23 -0
  85. package/dist/layers.C8bZft3d.js +1 -0
  86. package/dist/layers.CAGUssIj.js +39 -0
  87. package/dist/layers.CBhcfmKp.js +5 -0
  88. package/dist/layers.CBpxlm8J.js +1 -0
  89. package/dist/layers.CCi4tZEO.js +40 -0
  90. package/dist/layers.CCoKyGC6.js +423 -0
  91. package/dist/layers.CCyL2a0C.js +32 -0
  92. package/dist/layers.CHPa6_hS.js +1 -0
  93. package/dist/layers.CHZsXQcr.js +1 -0
  94. package/dist/layers.CLe82baP.js +38 -0
  95. package/dist/layers.CPMeVdt2.js +41 -0
  96. package/dist/layers.CQu2Kko1.js +139 -0
  97. package/dist/layers.CU-OGZof.js +41 -0
  98. package/dist/layers.CUP8yh26.js +9 -0
  99. package/dist/layers.CW0o_41a.js +36 -0
  100. package/dist/layers.CXxqYC1P.js +32 -0
  101. package/dist/layers.CYc8mNrI.js +8 -0
  102. package/dist/layers.CYotqhj5.js +1 -0
  103. package/dist/layers.C_IvrzZ3.js +7 -0
  104. package/dist/layers.C_nzdIcU.js +796 -0
  105. package/dist/layers.CaZtZB64.js +52 -0
  106. package/dist/layers.Ca_1CfOY.js +37 -0
  107. package/dist/layers.CanwFigF.js +11 -0
  108. package/dist/layers.Cb3j9TFj.js +198 -0
  109. package/dist/layers.CcPt099-.js +2238 -0
  110. package/dist/layers.CcbyELpn.js +39 -0
  111. package/dist/layers.Cd4iO7WE.js +437 -0
  112. package/dist/layers.Ce-Nta51.js +122 -0
  113. package/dist/layers.Cf67WsyM.js +116 -0
  114. package/dist/layers.CfwLs1b3.js +37 -0
  115. package/dist/layers.CgY2NiOs.js +76 -0
  116. package/dist/layers.Cgh_u2i4.js +96 -0
  117. package/dist/layers.CguGzf0B.js +48149 -0
  118. package/dist/layers.CjQa4sdf.js +1 -0
  119. package/dist/layers.Cl5Z_Igi.js +1 -0
  120. package/dist/layers.Cl6FTJOT.js +61 -0
  121. package/dist/layers.ClqPdhw8.js +10 -0
  122. package/dist/layers.CltSFkYd.js +9 -0
  123. package/dist/{layers.D99OBX9u.js → layers.CmSzOG_o.js} +88 -86
  124. package/dist/layers.CmknWZiw.js +41 -0
  125. package/dist/layers.CnEOgwwC.js +39 -0
  126. package/dist/layers.CoGQvGYd.js +1 -0
  127. package/dist/layers.CpUEfi8o.js +36 -0
  128. package/dist/layers.CqVTtuYm.js +6 -0
  129. package/dist/layers.CusQc89U.js +4 -0
  130. package/dist/layers.Cv99Mgzq.js +11 -0
  131. package/dist/layers.CvsQlQrZ.js +295 -0
  132. package/dist/layers.Cxwmnhaz.js +13 -0
  133. package/dist/layers.Cyzu9PKQ.js +1 -0
  134. package/dist/layers.D-0SV7pN.js +39 -0
  135. package/dist/layers.D-Igy3Ua.js +40 -0
  136. package/dist/layers.D0zn4_Mx.js +1 -0
  137. package/dist/layers.D1LcBaAa.js +8 -0
  138. package/dist/layers.D1uJtsEg.js +41 -0
  139. package/dist/layers.D2zC70FX.js +2 -0
  140. package/dist/layers.D3bZoMx9.js +160 -0
  141. package/dist/layers.D4MKjja_.js +14 -0
  142. package/dist/layers.D4T8fTcj.js +1223 -0
  143. package/dist/layers.D6RxNPR2.js +1 -0
  144. package/dist/layers.D7jGxypv.js +8 -0
  145. package/dist/layers.D7kC0dCu.js +40 -0
  146. package/dist/layers.DCXvGSyA.js +271 -0
  147. package/dist/layers.DFQczRzZ.js +1286 -0
  148. package/dist/layers.DFQlsoOR.js +934 -0
  149. package/dist/layers.DHLN2SKV.js +213 -0
  150. package/dist/layers.DI1Px4LZ.js +1583 -0
  151. package/dist/layers.DIBXDI6n.js +11 -0
  152. package/dist/layers.DIZ_l0f6.js +1619 -0
  153. package/dist/layers.DIv8Ha88.js +6 -0
  154. package/dist/layers.DJ4l6yZ3.js +1 -0
  155. package/dist/layers.DJBIRB9P.js +40 -0
  156. package/dist/layers.DJO_9mJR.js +4 -0
  157. package/dist/layers.DJPr9JJL.js +806 -0
  158. package/dist/layers.DLa3syby.js +10 -0
  159. package/dist/layers.DLwuMfdd.js +84 -0
  160. package/dist/layers.DMkBISW1.js +1 -0
  161. package/dist/layers.DN-DRFO4.js +33 -0
  162. package/dist/layers.DN9HoVxI.js +18 -0
  163. package/dist/layers.DOIO1344.js +42 -0
  164. package/dist/layers.DOrgOHBr.js +1 -0
  165. package/dist/layers.DR0_dy2n.js +772 -0
  166. package/dist/layers.DS-UxTef.js +205 -0
  167. package/dist/layers.DSKXf25Y.js +51 -0
  168. package/dist/layers.DSnFA-e0.js +36 -0
  169. package/dist/layers.DV8OLPia.js +35 -0
  170. package/dist/layers.DV9x_QzT.js +42 -0
  171. package/dist/layers.DXSbtNid.js +84 -0
  172. package/dist/layers.DYYItiu_.js +7 -0
  173. package/dist/layers.DYhtNvuX.js +65 -0
  174. package/dist/layers.DYiXaBMd.js +5 -0
  175. package/dist/layers.D_dfc6vG.js +139 -0
  176. package/dist/layers.D_zh-C-v.js +44 -0
  177. package/dist/layers.DbaKVP5e.js +1 -0
  178. package/dist/layers.Dfi_IB-0.js +1 -0
  179. package/dist/layers.Dj5SqV0K.js +1126 -0
  180. package/dist/layers.DjUOC4st.js +16 -0
  181. package/dist/layers.Dl7SEeb9.js +373 -0
  182. package/dist/layers.DlaGxCQI.js +6 -0
  183. package/dist/layers.DlseyPwp.js +9 -0
  184. package/dist/layers.DmxpB0Ld.js +39 -0
  185. package/dist/layers.Dn9sJSEy.js +1 -0
  186. package/dist/layers.DoTYGKth.js +9 -0
  187. package/dist/layers.Dof3PZvm.js +1 -0
  188. package/dist/layers.Doi5KI9F.js +1 -0
  189. package/dist/layers.Dq4zYIfC.js +7 -0
  190. package/dist/layers.DqHBlOg-.js +21941 -0
  191. package/dist/layers.DqpUYYTt.js +6 -0
  192. package/dist/layers.DrXdyG3Q.js +805 -0
  193. package/dist/layers.DrY_iQOk.js +70 -0
  194. package/dist/layers.Dtfu1_0i.js +35 -0
  195. package/dist/layers.DudnxBYL.js +8583 -0
  196. package/dist/layers.Dur5__LU.js +5 -0
  197. package/dist/layers.DwbZ0BBM.js +8 -0
  198. package/dist/layers.DxA6ocdw.js +70 -0
  199. package/dist/layers.Dy1naDTQ.js +14 -0
  200. package/dist/layers.DyswrxrZ.js +41 -0
  201. package/dist/layers.FxMjbkmf.js +34 -0
  202. package/dist/layers.HxXfnDxz.js +21336 -0
  203. package/dist/layers.JWCLFILJ.js +1 -0
  204. package/dist/layers.JdaN319C.js +1 -0
  205. package/dist/layers.JfY-At5A.js +7 -0
  206. package/dist/layers.MKp36N_b.js +36 -0
  207. package/dist/layers.OGmEyOFd.js +9 -0
  208. package/dist/layers.P0VXEM5n.js +9 -0
  209. package/dist/layers.PY5vr5EY.js +1 -0
  210. package/dist/layers.QfqvN0di.js +33 -0
  211. package/dist/layers.R8mPlCA0.js +261 -0
  212. package/dist/layers.Tp_UAZiz.js +5 -0
  213. package/dist/layers.UmFryx8m.js +1 -0
  214. package/dist/layers.VIA8sOZr.js +207 -0
  215. package/dist/layers.W54fHbsH.js +9 -0
  216. package/dist/layers.XQKBFj8F.js +40 -0
  217. package/dist/layers.Xuid21m7.js +10 -0
  218. package/dist/layers.YTXUQK8S.js +39 -0
  219. package/dist/layers.b0h5ZBmD.js +61 -0
  220. package/dist/layers.b9B2NY7n.js +11690 -0
  221. package/dist/layers.bgNJ7rmI.js +7 -0
  222. package/dist/layers.cxMp5Xa0.js +40 -0
  223. package/dist/layers.fV5OYtz9.js +32 -0
  224. package/dist/layers.goR33Dn9.js +907 -0
  225. package/dist/layers.hHZAR7op.js +10 -0
  226. package/dist/layers.iD1IDlF-.js +8 -0
  227. package/dist/layers.icLvHK2o.js +504 -0
  228. package/dist/layers.jk1Y4Qup.js +6 -0
  229. package/dist/layers.lCpg7dOn.js +21 -0
  230. package/dist/layers.lW1mE-6u.js +1 -0
  231. package/dist/layers.lgiOeULL.js +39 -0
  232. package/dist/layers.mzdQbLys.js +40 -0
  233. package/dist/layers.nVLjsNoD.js +425 -0
  234. package/dist/layers.nf66LION.js +39 -0
  235. package/dist/layers.qLka9pGz.js +189 -0
  236. package/dist/layers.sP6EpGSd.js +1 -0
  237. package/dist/layers.uXNouSNW.js +1 -0
  238. package/dist/layers.uiGbxBln.js +42 -0
  239. package/dist/layers.wYs3Gn-e.js +9 -0
  240. package/dist/layers.ysXw42a5.js +35 -0
  241. package/dist/layers.z25N8Ql-.js +1225 -0
  242. package/package.json +2 -2
  243. package/dist/layers.94hwidA2.js +0 -198
  244. package/dist/layers.B4l6ta1Q.js +0 -1
  245. package/dist/layers.BMrOAD_P.js +0 -1
  246. package/dist/layers.DOzLBYZr.js +0 -304
  247. package/dist/layers.YRyXopy_.js +0 -151
  248. package/dist/layers.usKC_Id5.js +0 -1
  249. package/dist/layers.zu-IYGYU.js +0 -47463
@@ -0,0 +1,796 @@
1
+ import { a2 as gt, a3 as ft, a4 as mt, g as xt, l as E, d as G, Y as _t, a5 as bt, q as kt } from "./layers.DudnxBYL.js";
2
+ import "./layers.HxXfnDxz.js";
3
+ import "lodash-es/memoize.js";
4
+ import "lodash-es/merge.js";
5
+ import "lodash-es/isEmpty.js";
6
+ import { a as D } from "./layers.B3gbBlxh.js";
7
+ var K = (function() {
8
+ var n = function(f, i, r, c) {
9
+ for (r = r || {}, c = f.length; c--; r[f[c]] = i)
10
+ ;
11
+ return r;
12
+ }, t = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], e = [1, 9], a = [1, 10], s = [1, 11], h = [1, 12], o = [1, 13], p = [1, 16], y = [1, 17], g = {
13
+ trace: function() {
14
+ },
15
+ yy: {},
16
+ 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 },
17
+ 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" },
18
+ 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]],
19
+ performAction: function(i, r, c, d, u, l, $) {
20
+ var x = l.length - 1;
21
+ switch (u) {
22
+ case 1:
23
+ return l[x - 1];
24
+ case 2:
25
+ this.$ = [];
26
+ break;
27
+ case 3:
28
+ l[x - 1].push(l[x]), this.$ = l[x - 1];
29
+ break;
30
+ case 4:
31
+ case 5:
32
+ this.$ = l[x];
33
+ break;
34
+ case 6:
35
+ case 7:
36
+ this.$ = [];
37
+ break;
38
+ case 8:
39
+ d.getCommonDb().setDiagramTitle(l[x].substr(6)), this.$ = l[x].substr(6);
40
+ break;
41
+ case 9:
42
+ this.$ = l[x].trim(), d.getCommonDb().setAccTitle(this.$);
43
+ break;
44
+ case 10:
45
+ case 11:
46
+ this.$ = l[x].trim(), d.getCommonDb().setAccDescription(this.$);
47
+ break;
48
+ case 12:
49
+ d.addSection(l[x].substr(8)), this.$ = l[x].substr(8);
50
+ break;
51
+ case 15:
52
+ d.addTask(l[x], 0, ""), this.$ = l[x];
53
+ break;
54
+ case 16:
55
+ d.addEvent(l[x].substr(2)), this.$ = l[x];
56
+ break;
57
+ }
58
+ },
59
+ 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: o, 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: o, 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])],
60
+ defaultActions: {},
61
+ parseError: function(i, r) {
62
+ if (r.recoverable)
63
+ this.trace(i);
64
+ else {
65
+ var c = new Error(i);
66
+ throw c.hash = r, c;
67
+ }
68
+ },
69
+ parse: function(i) {
70
+ var r = this, c = [0], d = [], u = [null], l = [], $ = this.table, x = "", T = 0, W = 0, C = 2, A = 1, B = l.slice.call(arguments, 1), k = Object.create(this.lexer), w = { yy: {} };
71
+ for (var v in this.yy)
72
+ Object.prototype.hasOwnProperty.call(this.yy, v) && (w.yy[v] = this.yy[v]);
73
+ k.setInput(i, w.yy), w.yy.lexer = k, w.yy.parser = this, typeof k.yylloc > "u" && (k.yylloc = {});
74
+ var I = k.yylloc;
75
+ l.push(I);
76
+ var H = k.options && k.options.ranges;
77
+ typeof w.yy.parseError == "function" ? this.parseError = w.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
78
+ function z() {
79
+ var M;
80
+ return M = d.pop() || k.lex() || A, typeof M != "number" && (M instanceof Array && (d = M, M = d.pop()), M = r.symbols_[M] || M), M;
81
+ }
82
+ for (var b, L, S, Z, R = {}, O, N, Y, j; ; ) {
83
+ 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]) {
84
+ var J = "";
85
+ j = [];
86
+ for (O in $[L])
87
+ this.terminals_[O] && O > C && j.push("'" + this.terminals_[O] + "'");
88
+ k.showPosition ? J = "Parse error on line " + (T + 1) + `:
89
+ ` + k.showPosition() + `
90
+ 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, {
91
+ text: k.match,
92
+ token: this.terminals_[b] || b,
93
+ line: k.yylineno,
94
+ loc: I,
95
+ expected: j
96
+ });
97
+ }
98
+ if (S[0] instanceof Array && S.length > 1)
99
+ throw new Error("Parse Error: multiple actions possible at state: " + L + ", token: " + b);
100
+ switch (S[0]) {
101
+ case 1:
102
+ c.push(b), u.push(k.yytext), l.push(k.yylloc), c.push(S[1]), b = null, W = k.yyleng, x = k.yytext, T = k.yylineno, I = k.yylloc;
103
+ break;
104
+ case 2:
105
+ if (N = this.productions_[S[1]][1], R.$ = u[u.length - N], R._$ = {
106
+ first_line: l[l.length - (N || 1)].first_line,
107
+ last_line: l[l.length - 1].last_line,
108
+ first_column: l[l.length - (N || 1)].first_column,
109
+ last_column: l[l.length - 1].last_column
110
+ }, H && (R._$.range = [
111
+ l[l.length - (N || 1)].range[0],
112
+ l[l.length - 1].range[1]
113
+ ]), Z = this.performAction.apply(R, [
114
+ x,
115
+ W,
116
+ T,
117
+ w.yy,
118
+ S[1],
119
+ u,
120
+ l
121
+ ].concat(B)), typeof Z < "u")
122
+ return Z;
123
+ N && (c = c.slice(0, -1 * N * 2), u = u.slice(0, -1 * N), l = l.slice(0, -1 * N)), c.push(this.productions_[S[1]][0]), u.push(R.$), l.push(R._$), Y = $[c[c.length - 2]][c[c.length - 1]], c.push(Y);
124
+ break;
125
+ case 3:
126
+ return !0;
127
+ }
128
+ }
129
+ return !0;
130
+ }
131
+ }, _ = /* @__PURE__ */ (function() {
132
+ var f = {
133
+ EOF: 1,
134
+ parseError: function(r, c) {
135
+ if (this.yy.parser)
136
+ this.yy.parser.parseError(r, c);
137
+ else
138
+ throw new Error(r);
139
+ },
140
+ // resets the lexer, sets new input
141
+ setInput: function(i, r) {
142
+ 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 = {
143
+ first_line: 1,
144
+ first_column: 0,
145
+ last_line: 1,
146
+ last_column: 0
147
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
148
+ },
149
+ // consumes and returns one char from the input
150
+ input: function() {
151
+ var i = this._input[0];
152
+ this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
153
+ var r = i.match(/(?:\r\n?|\n).*/g);
154
+ 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;
155
+ },
156
+ // unshifts one char (or a string) into the input
157
+ unput: function(i) {
158
+ var r = i.length, c = i.split(/(?:\r\n?|\n)/g);
159
+ this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r;
160
+ var d = this.match.split(/(?:\r\n?|\n)/g);
161
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), c.length - 1 && (this.yylineno -= c.length - 1);
162
+ var u = this.yylloc.range;
163
+ return this.yylloc = {
164
+ first_line: this.yylloc.first_line,
165
+ last_line: this.yylineno + 1,
166
+ first_column: this.yylloc.first_column,
167
+ last_column: c ? (c.length === d.length ? this.yylloc.first_column : 0) + d[d.length - c.length].length - c[0].length : this.yylloc.first_column - r
168
+ }, this.options.ranges && (this.yylloc.range = [u[0], u[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this;
169
+ },
170
+ // When called from action, caches matched text and appends it on next action
171
+ more: function() {
172
+ return this._more = !0, this;
173
+ },
174
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
175
+ reject: function() {
176
+ if (this.options.backtrack_lexer)
177
+ this._backtrack = !0;
178
+ else
179
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
180
+ ` + this.showPosition(), {
181
+ text: "",
182
+ token: null,
183
+ line: this.yylineno
184
+ });
185
+ return this;
186
+ },
187
+ // retain first n characters of the match
188
+ less: function(i) {
189
+ this.unput(this.match.slice(i));
190
+ },
191
+ // displays already matched input, i.e. for error messages
192
+ pastInput: function() {
193
+ var i = this.matched.substr(0, this.matched.length - this.match.length);
194
+ return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
195
+ },
196
+ // displays upcoming input, i.e. for error messages
197
+ upcomingInput: function() {
198
+ var i = this.match;
199
+ return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
200
+ },
201
+ // displays the character position where the lexing error occurred, i.e. for error messages
202
+ showPosition: function() {
203
+ var i = this.pastInput(), r = new Array(i.length + 1).join("-");
204
+ return i + this.upcomingInput() + `
205
+ ` + r + "^";
206
+ },
207
+ // test the lexed token: return FALSE when not a match, otherwise return token
208
+ test_match: function(i, r) {
209
+ var c, d, u;
210
+ if (this.options.backtrack_lexer && (u = {
211
+ yylineno: this.yylineno,
212
+ yylloc: {
213
+ first_line: this.yylloc.first_line,
214
+ last_line: this.last_line,
215
+ first_column: this.yylloc.first_column,
216
+ last_column: this.yylloc.last_column
217
+ },
218
+ yytext: this.yytext,
219
+ match: this.match,
220
+ matches: this.matches,
221
+ matched: this.matched,
222
+ yyleng: this.yyleng,
223
+ offset: this.offset,
224
+ _more: this._more,
225
+ _input: this._input,
226
+ yy: this.yy,
227
+ conditionStack: this.conditionStack.slice(0),
228
+ done: this.done
229
+ }, this.options.ranges && (u.yylloc.range = this.yylloc.range.slice(0))), d = i[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
230
+ first_line: this.yylloc.last_line,
231
+ last_line: this.yylineno + 1,
232
+ first_column: this.yylloc.last_column,
233
+ last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
234
+ }, this.yytext += i[0], this.match += i[0], this.matches = i, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(i[0].length), this.matched += i[0], c = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
235
+ return c;
236
+ if (this._backtrack) {
237
+ for (var l in u)
238
+ this[l] = u[l];
239
+ return !1;
240
+ }
241
+ return !1;
242
+ },
243
+ // return next match in input
244
+ next: function() {
245
+ if (this.done)
246
+ return this.EOF;
247
+ this._input || (this.done = !0);
248
+ var i, r, c, d;
249
+ this._more || (this.yytext = "", this.match = "");
250
+ for (var u = this._currentRules(), l = 0; l < u.length; l++)
251
+ if (c = this._input.match(this.rules[u[l]]), c && (!r || c[0].length > r[0].length)) {
252
+ if (r = c, d = l, this.options.backtrack_lexer) {
253
+ if (i = this.test_match(c, u[l]), i !== !1)
254
+ return i;
255
+ if (this._backtrack) {
256
+ r = !1;
257
+ continue;
258
+ } else
259
+ return !1;
260
+ } else if (!this.options.flex)
261
+ break;
262
+ }
263
+ 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.
264
+ ` + this.showPosition(), {
265
+ text: "",
266
+ token: null,
267
+ line: this.yylineno
268
+ });
269
+ },
270
+ // return next match that has a token
271
+ lex: function() {
272
+ var r = this.next();
273
+ return r || this.lex();
274
+ },
275
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
276
+ begin: function(r) {
277
+ this.conditionStack.push(r);
278
+ },
279
+ // pop the previously active lexer condition state off the condition stack
280
+ popState: function() {
281
+ var r = this.conditionStack.length - 1;
282
+ return r > 0 ? this.conditionStack.pop() : this.conditionStack[0];
283
+ },
284
+ // produce the lexer rule set which is active for the currently active lexer condition state
285
+ _currentRules: function() {
286
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
287
+ },
288
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
289
+ topState: function(r) {
290
+ return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL";
291
+ },
292
+ // alias for begin(condition)
293
+ pushState: function(r) {
294
+ this.begin(r);
295
+ },
296
+ // return the number of states currently on the stack
297
+ stateStackSize: function() {
298
+ return this.conditionStack.length;
299
+ },
300
+ options: { "case-insensitive": !0 },
301
+ performAction: function(r, c, d, u) {
302
+ switch (d) {
303
+ case 0:
304
+ break;
305
+ case 1:
306
+ break;
307
+ case 2:
308
+ return 10;
309
+ case 3:
310
+ break;
311
+ case 4:
312
+ break;
313
+ case 5:
314
+ return 4;
315
+ case 6:
316
+ return 11;
317
+ case 7:
318
+ return this.begin("acc_title"), 12;
319
+ case 8:
320
+ return this.popState(), "acc_title_value";
321
+ case 9:
322
+ return this.begin("acc_descr"), 14;
323
+ case 10:
324
+ return this.popState(), "acc_descr_value";
325
+ case 11:
326
+ this.begin("acc_descr_multiline");
327
+ break;
328
+ case 12:
329
+ this.popState();
330
+ break;
331
+ case 13:
332
+ return "acc_descr_multiline_value";
333
+ case 14:
334
+ return 17;
335
+ case 15:
336
+ return 21;
337
+ case 16:
338
+ return 20;
339
+ case 17:
340
+ return 6;
341
+ case 18:
342
+ return "INVALID";
343
+ }
344
+ },
345
+ rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?::\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?:$)/i, /^(?:.)/i],
346
+ conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18], inclusive: !0 } }
347
+ };
348
+ return f;
349
+ })();
350
+ g.lexer = _;
351
+ function m() {
352
+ this.yy = {};
353
+ }
354
+ return m.prototype = g, g.Parser = m, new m();
355
+ })();
356
+ K.parser = K;
357
+ const vt = K;
358
+ let F = "", st = 0;
359
+ const Q = [], q = [], V = [], it = () => bt, rt = function() {
360
+ Q.length = 0, q.length = 0, F = "", V.length = 0, kt();
361
+ }, at = function(n) {
362
+ F = n, Q.push(n);
363
+ }, ot = function() {
364
+ return Q;
365
+ }, lt = function() {
366
+ let n = tt();
367
+ const t = 100;
368
+ let e = 0;
369
+ for (; !n && e < t; )
370
+ n = tt(), e++;
371
+ return q.push(...V), q;
372
+ }, ct = function(n, t, e) {
373
+ const a = {
374
+ id: st++,
375
+ section: F,
376
+ type: F,
377
+ task: n,
378
+ score: t || 0,
379
+ //if event is defined, then add it the events array
380
+ events: e ? [e] : []
381
+ };
382
+ V.push(a);
383
+ }, ht = function(n) {
384
+ V.find((e) => e.id === st - 1).events.push(n);
385
+ }, dt = function(n) {
386
+ const t = {
387
+ section: F,
388
+ type: F,
389
+ description: n,
390
+ task: n,
391
+ classes: []
392
+ };
393
+ q.push(t);
394
+ }, tt = function() {
395
+ const n = function(e) {
396
+ return V[e].processed;
397
+ };
398
+ let t = !0;
399
+ for (const [e, a] of V.entries())
400
+ n(e), t = t && a.processed;
401
+ return t;
402
+ }, wt = {
403
+ clear: rt,
404
+ getCommonDb: it,
405
+ addSection: at,
406
+ getSections: ot,
407
+ getTasks: lt,
408
+ addTask: ct,
409
+ addTaskOrg: dt,
410
+ addEvent: ht
411
+ }, St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
412
+ __proto__: null,
413
+ addEvent: ht,
414
+ addSection: at,
415
+ addTask: ct,
416
+ addTaskOrg: dt,
417
+ clear: rt,
418
+ default: wt,
419
+ getCommonDb: it,
420
+ getSections: ot,
421
+ getTasks: lt
422
+ }, Symbol.toStringTag, { value: "Module" })), Et = 12, U = function(n, t) {
423
+ const e = n.append("rect");
424
+ return e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), e.attr("rx", t.rx), e.attr("ry", t.ry), t.class !== void 0 && e.attr("class", t.class), e;
425
+ }, Tt = function(n, t) {
426
+ 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");
427
+ 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");
428
+ function h(y) {
429
+ const g = D().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
430
+ y.append("path").attr("class", "mouth").attr("d", g).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
431
+ }
432
+ function o(y) {
433
+ const g = D().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
434
+ y.append("path").attr("class", "mouth").attr("d", g).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
435
+ }
436
+ function p(y) {
437
+ 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");
438
+ }
439
+ return t.score > 3 ? h(s) : t.score < 3 ? o(s) : p(s), a;
440
+ }, It = function(n, t) {
441
+ const e = n.append("circle");
442
+ 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;
443
+ }, ut = function(n, t) {
444
+ const e = t.text.replace(/<br\s*\/?>/gi, " "), a = n.append("text");
445
+ 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);
446
+ const s = a.append("tspan");
447
+ return s.attr("x", t.x + t.textMargin * 2), s.text(e), a;
448
+ }, $t = function(n, t) {
449
+ function e(s, h, o, p, y) {
450
+ return s + "," + h + " " + (s + o) + "," + h + " " + (s + o) + "," + (h + p - y) + " " + (s + o - y * 1.2) + "," + (h + p) + " " + s + "," + (h + p);
451
+ }
452
+ const a = n.append("polygon");
453
+ 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);
454
+ }, Nt = function(n, t, e) {
455
+ const a = n.append("g"), s = X();
456
+ 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)(
457
+ t.text,
458
+ a,
459
+ s.x,
460
+ s.y,
461
+ s.width,
462
+ s.height,
463
+ { class: "journey-section section-type-" + t.num },
464
+ e,
465
+ t.colour
466
+ );
467
+ };
468
+ let et = -1;
469
+ const Mt = function(n, t, e) {
470
+ const a = t.x + e.width / 2, s = n.append("g");
471
+ et++, s.append("line").attr("id", "task" + et).attr("x1", a).attr("y1", t.y).attr("x2", a).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Tt(s, {
472
+ cx: a,
473
+ cy: 300 + (5 - t.score) * 30,
474
+ score: t.score
475
+ });
476
+ const o = X();
477
+ o.x = t.x, o.y = t.y, o.fill = t.fill, o.width = e.width, o.height = e.height, o.class = "task task-type-" + t.num, o.rx = 3, o.ry = 3, U(s, o), t.x + 14, pt(e)(
478
+ t.task,
479
+ s,
480
+ o.x,
481
+ o.y,
482
+ o.width,
483
+ o.height,
484
+ { class: "task" },
485
+ e,
486
+ t.colour
487
+ );
488
+ }, Lt = function(n, t) {
489
+ U(n, {
490
+ x: t.startx,
491
+ y: t.starty,
492
+ width: t.stopx - t.startx,
493
+ height: t.stopy - t.starty,
494
+ fill: t.fill,
495
+ class: "rect"
496
+ }).lower();
497
+ }, At = function() {
498
+ return {
499
+ x: 0,
500
+ y: 0,
501
+ fill: void 0,
502
+ "text-anchor": "start",
503
+ width: 100,
504
+ height: 100,
505
+ textMargin: 0,
506
+ rx: 0,
507
+ ry: 0
508
+ };
509
+ }, X = function() {
510
+ return {
511
+ x: 0,
512
+ y: 0,
513
+ width: 100,
514
+ anchor: "start",
515
+ height: 100,
516
+ rx: 0,
517
+ ry: 0
518
+ };
519
+ }, pt = /* @__PURE__ */ (function() {
520
+ function n(s, h, o, p, y, g, _, m) {
521
+ const f = h.append("text").attr("x", o + y / 2).attr("y", p + g / 2 + 5).style("font-color", m).style("text-anchor", "middle").text(s);
522
+ a(f, _);
523
+ }
524
+ function t(s, h, o, p, y, g, _, m, f) {
525
+ const { taskFontSize: i, taskFontFamily: r } = m, c = s.split(/<br\s*\/?>/gi);
526
+ for (let d = 0; d < c.length; d++) {
527
+ const u = d * i - i * (c.length - 1) / 2, l = h.append("text").attr("x", o + y / 2).attr("y", p).attr("fill", f).style("text-anchor", "middle").style("font-size", i).style("font-family", r);
528
+ l.append("tspan").attr("x", o + y / 2).attr("dy", u).text(c[d]), l.attr("y", p + g / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(l, _);
529
+ }
530
+ }
531
+ function e(s, h, o, p, y, g, _, m) {
532
+ const f = h.append("switch"), r = f.append("foreignObject").attr("x", o).attr("y", p).attr("width", y).attr("height", g).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
533
+ r.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), t(s, f, o, p, y, g, _, m), a(r, _);
534
+ }
535
+ function a(s, h) {
536
+ for (const o in h)
537
+ o in h && s.attr(o, h[o]);
538
+ }
539
+ return function(s) {
540
+ return s.textPlacement === "fo" ? e : s.textPlacement === "old" ? n : t;
541
+ };
542
+ })(), Ht = function(n) {
543
+ 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");
544
+ };
545
+ function yt(n, t) {
546
+ n.each(function() {
547
+ var e = G(this), a = e.text().split(/(\s+|<br>)/).reverse(), s, h = [], o = 1.1, p = e.attr("y"), y = parseFloat(e.attr("dy")), g = e.text(null).append("tspan").attr("x", 0).attr("y", p).attr("dy", y + "em");
548
+ for (let _ = 0; _ < a.length; _++)
549
+ s = a[a.length - 1 - _], h.push(s), g.text(h.join(" ").trim()), (g.node().getComputedTextLength() > t || s === "<br>") && (h.pop(), g.text(h.join(" ").trim()), s === "<br>" ? h = [""] : h = [s], g = e.append("tspan").attr("x", 0).attr("y", p).attr("dy", o + "em").text(s));
550
+ });
551
+ }
552
+ const Pt = function(n, t, e, a) {
553
+ const s = e % Et - 1, h = n.append("g");
554
+ t.section = s, h.attr(
555
+ "class",
556
+ (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + s)
557
+ );
558
+ const o = h.append("g"), p = h.append("g"), g = 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;
559
+ return t.height = g.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(o, t, s), t;
560
+ }, Ct = function(n, t, e) {
561
+ 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(), o = e.fontSize && e.fontSize.replace ? e.fontSize.replace("px", "") : e.fontSize;
562
+ return a.remove(), h.height + o * 1.1 * 0.5 + t.padding;
563
+ }, zt = function(n, t, e) {
564
+ n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr(
565
+ "d",
566
+ `M0 ${t.height - 5} v${-t.height + 10} q0,-5 5,-5 h${t.width - 10} q5,0 5,5 v${t.height - 5} H0 Z`
567
+ ), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
568
+ }, P = {
569
+ drawRect: U,
570
+ drawCircle: It,
571
+ drawSection: Nt,
572
+ drawText: ut,
573
+ drawLabel: $t,
574
+ drawTask: Mt,
575
+ drawBackgroundRect: Lt,
576
+ getTextObj: At,
577
+ getNoteRect: X,
578
+ initGraphics: Ht,
579
+ drawNode: Pt,
580
+ getVirtualNodeHeight: Ct
581
+ }, Rt = function(n, t, e, a) {
582
+ var s, h;
583
+ const o = xt(), p = o.leftMargin ?? 50;
584
+ E.debug("timeline", a.db);
585
+ const y = o.securityLevel;
586
+ let g;
587
+ y === "sandbox" && (g = G("#i" + t));
588
+ const m = (y === "sandbox" ? G(g.nodes()[0].contentDocument.body) : G("body")).select("#" + t);
589
+ m.append("g");
590
+ const f = a.db.getTasks(), i = a.db.getCommonDb().getDiagramTitle();
591
+ E.debug("task", f), P.initGraphics(m);
592
+ const r = a.db.getSections();
593
+ E.debug("sections", r);
594
+ let c = 0, d = 0, u = 0, l = 0, $ = 50 + p, x = 50;
595
+ l = 50;
596
+ let T = 0, W = !0;
597
+ r.forEach(function(w) {
598
+ const v = {
599
+ number: T,
600
+ descr: w,
601
+ section: T,
602
+ width: 150,
603
+ padding: 20,
604
+ maxHeight: c
605
+ }, I = P.getVirtualNodeHeight(m, v, o);
606
+ E.debug("sectionHeight before draw", I), c = Math.max(c, I + 20);
607
+ });
608
+ let C = 0, A = 0;
609
+ E.debug("tasks.length", f.length);
610
+ for (const [w, v] of f.entries()) {
611
+ const I = {
612
+ number: w,
613
+ descr: v,
614
+ section: v.section,
615
+ width: 150,
616
+ padding: 20,
617
+ maxHeight: d
618
+ }, H = P.getVirtualNodeHeight(m, I, o);
619
+ E.debug("taskHeight before draw", H), d = Math.max(d, H + 20), C = Math.max(C, v.events.length);
620
+ let z = 0;
621
+ for (let b = 0; b < v.events.length; b++) {
622
+ const S = {
623
+ descr: v.events[b],
624
+ section: v.section,
625
+ number: v.section,
626
+ width: 150,
627
+ padding: 20,
628
+ maxHeight: 50
629
+ };
630
+ z += P.getVirtualNodeHeight(m, S, o);
631
+ }
632
+ A = Math.max(A, z);
633
+ }
634
+ E.debug("maxSectionHeight before draw", c), E.debug("maxTaskHeight before draw", d), r && r.length > 0 ? r.forEach((w) => {
635
+ const v = f.filter((b) => b.section === w), I = {
636
+ number: T,
637
+ descr: w,
638
+ section: T,
639
+ width: 200 * Math.max(v.length, 1) - 50,
640
+ padding: 20,
641
+ maxHeight: c
642
+ };
643
+ E.debug("sectionNode", I);
644
+ const H = m.append("g"), z = P.drawNode(H, I, T, o);
645
+ E.debug("sectionNode output", z), H.attr("transform", `translate(${$}, ${l})`), x += c + 50, v.length > 0 && nt(
646
+ m,
647
+ v,
648
+ T,
649
+ $,
650
+ x,
651
+ d,
652
+ o,
653
+ C,
654
+ A,
655
+ c,
656
+ !1
657
+ ), $ += 200 * Math.max(v.length, 1), x = l, T++;
658
+ }) : (W = !1, nt(
659
+ m,
660
+ f,
661
+ T,
662
+ $,
663
+ x,
664
+ d,
665
+ o,
666
+ C,
667
+ A,
668
+ c,
669
+ !0
670
+ ));
671
+ const B = m.node().getBBox();
672
+ 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(
673
+ void 0,
674
+ m,
675
+ ((s = o.timeline) == null ? void 0 : s.padding) ?? 50,
676
+ ((h = o.timeline) == null ? void 0 : h.useMaxWidth) ?? !1
677
+ );
678
+ }, nt = function(n, t, e, a, s, h, o, p, y, g, _) {
679
+ var m;
680
+ for (const f of t) {
681
+ const i = {
682
+ descr: f.task,
683
+ section: e,
684
+ number: e,
685
+ width: 150,
686
+ padding: 20,
687
+ maxHeight: h
688
+ };
689
+ E.debug("taskNode", i);
690
+ const r = n.append("g").attr("class", "taskWrapper"), d = P.drawNode(r, i, e, o).height;
691
+ if (E.debug("taskHeight after draw", d), r.attr("transform", `translate(${a}, ${s})`), h = Math.max(h, d), f.events) {
692
+ const u = n.append("g").attr("class", "lineWrapper");
693
+ let l = h;
694
+ s += 100, l = l + Ft(n, f.events, e, a, s, o), s -= 100, u.append("line").attr("x1", a + 190 / 2).attr("y1", s + h).attr("x2", a + 190 / 2).attr(
695
+ "y2",
696
+ s + h + (_ ? h : g) + y + 120
697
+ ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
698
+ }
699
+ a = a + 200, _ && !((m = o.timeline) != null && m.disableMulticolor) && e++;
700
+ }
701
+ s = s - 10;
702
+ }, Ft = function(n, t, e, a, s, h) {
703
+ let o = 0;
704
+ const p = s;
705
+ s = s + 100;
706
+ for (const y of t) {
707
+ const g = {
708
+ descr: y,
709
+ section: e,
710
+ number: e,
711
+ width: 150,
712
+ padding: 20,
713
+ maxHeight: 50
714
+ };
715
+ E.debug("eventNode", g);
716
+ const _ = n.append("g").attr("class", "eventWrapper"), f = P.drawNode(_, g, e, h).height;
717
+ o = o + f, _.attr("transform", `translate(${a}, ${s})`), s = s + 10 + f;
718
+ }
719
+ return s = p, o;
720
+ }, Vt = {
721
+ setConf: () => {
722
+ },
723
+ draw: Rt
724
+ }, Wt = (n) => {
725
+ let t = "";
726
+ for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
727
+ n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], gt(n["lineColor" + e]) ? n["lineColor" + e] = ft(n["lineColor" + e], 20) : n["lineColor" + e] = mt(n["lineColor" + e], 20);
728
+ for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) {
729
+ const a = "" + (17 - 3 * e);
730
+ t += `
731
+ .section-${e - 1} rect, .section-${e - 1} path, .section-${e - 1} circle, .section-${e - 1} path {
732
+ fill: ${n["cScale" + e]};
733
+ }
734
+ .section-${e - 1} text {
735
+ fill: ${n["cScaleLabel" + e]};
736
+ }
737
+ .node-icon-${e - 1} {
738
+ font-size: 40px;
739
+ color: ${n["cScaleLabel" + e]};
740
+ }
741
+ .section-edge-${e - 1}{
742
+ stroke: ${n["cScale" + e]};
743
+ }
744
+ .edge-depth-${e - 1}{
745
+ stroke-width: ${a};
746
+ }
747
+ .section-${e - 1} line {
748
+ stroke: ${n["cScaleInv" + e]} ;
749
+ stroke-width: 3;
750
+ }
751
+
752
+ .lineWrapper line{
753
+ stroke: ${n["cScaleLabel" + e]} ;
754
+ }
755
+
756
+ .disabled, .disabled circle, .disabled text {
757
+ fill: lightgray;
758
+ }
759
+ .disabled text {
760
+ fill: #efefef;
761
+ }
762
+ `;
763
+ }
764
+ return t;
765
+ }, Bt = (n) => `
766
+ .edge {
767
+ stroke-width: 3;
768
+ }
769
+ ${Wt(n)}
770
+ .section-root rect, .section-root path, .section-root circle {
771
+ fill: ${n.git0};
772
+ }
773
+ .section-root text {
774
+ fill: ${n.gitBranchLabel0};
775
+ }
776
+ .icon-container {
777
+ height:100%;
778
+ display: flex;
779
+ justify-content: center;
780
+ align-items: center;
781
+ }
782
+ .edge {
783
+ fill: none;
784
+ }
785
+ .eventWrapper {
786
+ filter: brightness(120%);
787
+ }
788
+ `, Ot = Bt, Kt = {
789
+ db: St,
790
+ renderer: Vt,
791
+ parser: vt,
792
+ styles: Ot
793
+ };
794
+ export {
795
+ Kt as diagram
796
+ };