@layers-app/editor 0.7.16 → 0.7.18

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 +1 -77
  3. package/dist/index.js +9 -15
  4. package/dist/layers.94hwidA2.js +198 -0
  5. package/dist/layers.B4l6ta1Q.js +1 -0
  6. package/dist/layers.BMrOAD_P.js +1 -0
  7. package/dist/{layers.CfISeAkt.js → layers.D99OBX9u.js} +86 -88
  8. package/dist/layers.DOzLBYZr.js +304 -0
  9. package/dist/layers.YRyXopy_.js +151 -0
  10. package/dist/layers.usKC_Id5.js +1 -0
  11. package/dist/layers.zu-IYGYU.js +47463 -0
  12. package/package.json +1 -1
  13. package/dist/layers.-fM6L_z3.js +0 -1
  14. package/dist/layers.0KANPDnB.js +0 -9
  15. package/dist/layers.1Nv-nANB.js +0 -271
  16. package/dist/layers.1bdyQGVP.js +0 -8
  17. package/dist/layers.49H_5LNr.js +0 -41
  18. package/dist/layers.4HZb3jXk.js +0 -9
  19. package/dist/layers.4RmaHEsu.js +0 -36
  20. package/dist/layers.52famHy6.js +0 -1
  21. package/dist/layers.5WzirB7G.js +0 -960
  22. package/dist/layers.5bSjIKfg.js +0 -8
  23. package/dist/layers.7JqFgE4-.js +0 -15
  24. package/dist/layers.7oLFJZ8l.js +0 -36
  25. package/dist/layers.7xkZRnuM.js +0 -40
  26. package/dist/layers.9pNaFvaX.js +0 -1
  27. package/dist/layers.ABhWEnmQ.js +0 -37
  28. package/dist/layers.B-8gEV_E.js +0 -373
  29. package/dist/layers.B-9QQMGw.js +0 -9
  30. package/dist/layers.B0sBopW9.js +0 -10
  31. package/dist/layers.B19hGmey.js +0 -1
  32. package/dist/layers.B1ySJNCM.js +0 -40
  33. package/dist/layers.B2BhJZ0D.js +0 -42
  34. package/dist/layers.B2iVWMcm.js +0 -9
  35. package/dist/layers.B3D4g2HH.js +0 -1
  36. package/dist/layers.B6Va7v9s.js +0 -207
  37. package/dist/layers.B7K7JjK6.js +0 -1510
  38. package/dist/layers.B82wcYq0.js +0 -271
  39. package/dist/layers.BAU0IeY7.js +0 -1
  40. package/dist/layers.BAtv1CM7.js +0 -1
  41. package/dist/layers.BCD7sjs8.js +0 -1
  42. package/dist/layers.BEUJQJGq.js +0 -35
  43. package/dist/layers.BGDCJs-p.js +0 -1
  44. package/dist/layers.BHz2k1im.js +0 -7
  45. package/dist/layers.BIM8NeWS.js +0 -40
  46. package/dist/layers.BIbdMSbX.js +0 -772
  47. package/dist/layers.BIeVwYKL.js +0 -1
  48. package/dist/layers.BJDrjORS.js +0 -244
  49. package/dist/layers.BJhjIY5r.js +0 -37
  50. package/dist/layers.BJmaj5SY.js +0 -39
  51. package/dist/layers.BKy18lBk.js +0 -10
  52. package/dist/layers.BL3wEq7M.js +0 -32
  53. package/dist/layers.BLKD1Tiy.js +0 -39
  54. package/dist/layers.BLd2spTm.js +0 -1
  55. package/dist/layers.BNR6f37h.js +0 -160
  56. package/dist/layers.BNkwxNgt.js +0 -39
  57. package/dist/layers.BOMC5c1j.js +0 -2
  58. package/dist/layers.BQL01Vq6.js +0 -4
  59. package/dist/layers.BQm21WlP.js +0 -4
  60. package/dist/layers.BRGRJfuK.js +0 -41
  61. package/dist/layers.BSTBZrFn.js +0 -1
  62. package/dist/layers.BXDV2XaW.js +0 -425
  63. package/dist/layers.B_Vwa8Hx.js +0 -42
  64. package/dist/layers.B_jUVHTe.js +0 -32
  65. package/dist/layers.BakV9gnD.js +0 -42
  66. package/dist/layers.BbCfEXyj.js +0 -55
  67. package/dist/layers.BbbyE_Pc.js +0 -9
  68. package/dist/layers.Bd6ptC9U.js +0 -84
  69. package/dist/layers.BeCuix4V.js +0 -10
  70. package/dist/layers.BeFEsW5q.js +0 -1
  71. package/dist/layers.BfVGjstp.js +0 -42
  72. package/dist/layers.BgEbqAdb.js +0 -4
  73. package/dist/layers.Bk40urId.js +0 -1126
  74. package/dist/layers.Blc4R7F2.js +0 -41
  75. package/dist/layers.Bny7BWT9.js +0 -41
  76. package/dist/layers.BpilXLfW.js +0 -6
  77. package/dist/layers.Bpnbfq-r.js +0 -1
  78. package/dist/layers.BrbcqGdA.js +0 -48149
  79. package/dist/layers.BvGgfImM.js +0 -52
  80. package/dist/layers.BywviGiP.js +0 -11
  81. package/dist/layers.C-_ynqvr.js +0 -1
  82. package/dist/layers.C1actZbK.js +0 -11
  83. package/dist/layers.C3DRx9On.js +0 -10
  84. package/dist/layers.C3SAUwXb.js +0 -8
  85. package/dist/layers.C3yLkCio.js +0 -7
  86. package/dist/layers.C6fD5O8g.js +0 -6
  87. package/dist/layers.C8YD8pwl.js +0 -11
  88. package/dist/layers.C8_lu5UH.js +0 -23
  89. package/dist/layers.C92R-ENv.js +0 -39
  90. package/dist/layers.C9QCrDzm.js +0 -1
  91. package/dist/layers.C9_vX7IO.js +0 -139
  92. package/dist/layers.CA_fw2Dw.js +0 -32
  93. package/dist/layers.CB61rfHO.js +0 -1225
  94. package/dist/layers.CCur6VEj.js +0 -65
  95. package/dist/layers.CFLfRAu0.js +0 -14
  96. package/dist/layers.CFcHk-z5.js +0 -1268
  97. package/dist/layers.CFmNZSAJ.js +0 -1
  98. package/dist/layers.CGajZ1Yz.js +0 -42
  99. package/dist/layers.CHZsXQcr.js +0 -1
  100. package/dist/layers.CHhFVTiW.js +0 -10
  101. package/dist/layers.CJ1YRhUh.js +0 -6
  102. package/dist/layers.CJtE2LxP.js +0 -2482
  103. package/dist/layers.CJyO2xrs.js +0 -5
  104. package/dist/layers.CMyb9_FE.js +0 -40
  105. package/dist/layers.COjckA33.js +0 -10
  106. package/dist/layers.CPJSmpbw.js +0 -1
  107. package/dist/layers.CQvaw3yb.js +0 -5
  108. package/dist/layers.CRht5Nqq.js +0 -907
  109. package/dist/layers.CSXAHvGG.js +0 -33
  110. package/dist/layers.CTaitOnb.js +0 -11
  111. package/dist/layers.CV8UgwCq.js +0 -198
  112. package/dist/layers.CVJOismf.js +0 -6
  113. package/dist/layers.CXWtqfTe.js +0 -794
  114. package/dist/layers.CYPfnKfS.js +0 -96
  115. package/dist/layers.CYdP1IhC.js +0 -38
  116. package/dist/layers.CYneLciB.js +0 -1286
  117. package/dist/layers.CZLVHOh5.js +0 -8
  118. package/dist/layers.C_IvrzZ3.js +0 -7
  119. package/dist/layers.CbBTbZIx.js +0 -5
  120. package/dist/layers.CcP6Z-gZ.js +0 -118
  121. package/dist/layers.CcTyCqqv.js +0 -3
  122. package/dist/layers.Cd3kGFCJ.js +0 -32
  123. package/dist/layers.Ce7-wBOK.js +0 -11
  124. package/dist/layers.Cf5sVqJX.js +0 -39
  125. package/dist/layers.Cg3Hqyp6.js +0 -35
  126. package/dist/layers.Cg60w1Fn.js +0 -806
  127. package/dist/layers.Chd1p2rt.js +0 -26645
  128. package/dist/layers.CiTNX3uh.js +0 -32
  129. package/dist/layers.CkwenT1M.js +0 -8
  130. package/dist/layers.CnN8JfiX.js +0 -805
  131. package/dist/layers.Coh6z7rV.js +0 -8
  132. package/dist/layers.CpJSdiMb.js +0 -1
  133. package/dist/layers.CqVTtuYm.js +0 -6
  134. package/dist/layers.Cryqj610.js +0 -2238
  135. package/dist/layers.Cs-83js7.js +0 -1089
  136. package/dist/layers.CsivQuv1.js +0 -9
  137. package/dist/layers.Cud-IArB.js +0 -8
  138. package/dist/layers.CwL02t3J.js +0 -41
  139. package/dist/layers.CwsNJfmi.js +0 -10
  140. package/dist/layers.CxIhyFb7.js +0 -2966
  141. package/dist/layers.Cxh-oez0.js +0 -437
  142. package/dist/layers.Cyzu9PKQ.js +0 -1
  143. package/dist/layers.D-uio-rN.js +0 -423
  144. package/dist/layers.D0RX234F.js +0 -84
  145. package/dist/layers.D0zn4_Mx.js +0 -1
  146. package/dist/layers.D176Ljko.js +0 -116
  147. package/dist/layers.D2cVaX5z.js +0 -205
  148. package/dist/layers.D4Bw_BrO.js +0 -1
  149. package/dist/layers.D4T8fTcj.js +0 -1223
  150. package/dist/layers.D7jGxypv.js +0 -8
  151. package/dist/layers.D8fFj0P_.js +0 -34
  152. package/dist/layers.D9N3lSue.js +0 -7
  153. package/dist/layers.DAmxkO9p.js +0 -41
  154. package/dist/layers.DBwG7x-W.js +0 -8
  155. package/dist/layers.DDFbkCJT.js +0 -39
  156. package/dist/layers.DDnI7-13.js +0 -41
  157. package/dist/layers.DE6w34F3.js +0 -1
  158. package/dist/layers.DEaAvR_W.js +0 -189
  159. package/dist/layers.DEtMl_i3.js +0 -1034
  160. package/dist/layers.DHNIckw6.js +0 -39
  161. package/dist/layers.DHVcgZzL.js +0 -257
  162. package/dist/layers.DHcbExrH.js +0 -35
  163. package/dist/layers.DIpDvY-A.js +0 -40
  164. package/dist/layers.DJM_OF_R.js +0 -32
  165. package/dist/layers.DLJtS0JJ.js +0 -7
  166. package/dist/layers.DLwuMfdd.js +0 -84
  167. package/dist/layers.DMkBISW1.js +0 -1
  168. package/dist/layers.DN9HoVxI.js +0 -18
  169. package/dist/layers.DNJtYtN1.js +0 -9
  170. package/dist/layers.DOrgOHBr.js +0 -1
  171. package/dist/layers.DUlTmlus.js +0 -213
  172. package/dist/layers.DUutOP8h.js +0 -37
  173. package/dist/layers.DVWaIKgr.js +0 -21941
  174. package/dist/layers.D_WwW4Fn.js +0 -1
  175. package/dist/layers.D_fPGQ6i.js +0 -139
  176. package/dist/layers.D_faABvp.js +0 -21620
  177. package/dist/layers.DaIprEGs.js +0 -39
  178. package/dist/layers.Db0NyGA-.js +0 -1619
  179. package/dist/layers.DbaKVP5e.js +0 -1
  180. package/dist/layers.DdMy9cRx.js +0 -1088
  181. package/dist/layers.De35CioU.js +0 -44
  182. package/dist/layers.DgO3Q5mW.js +0 -4
  183. package/dist/layers.Di-PcJK6.js +0 -6
  184. package/dist/layers.DjCXWv2m.js +0 -38
  185. package/dist/layers.DjUOC4st.js +0 -16
  186. package/dist/layers.Dk2S8boy.js +0 -33
  187. package/dist/layers.DkBjWcDH.js +0 -504
  188. package/dist/layers.DnRaD217.js +0 -8583
  189. package/dist/layers.DnvnGxUC.js +0 -10
  190. package/dist/layers.DrarpmaN.js +0 -323
  191. package/dist/layers.DukGouVT.js +0 -39
  192. package/dist/layers.DvYYNhUp.js +0 -1
  193. package/dist/layers.Dv_6xN7s.js +0 -2
  194. package/dist/layers.DwWUZK6s.js +0 -129
  195. package/dist/layers.DwzO2zcv.js +0 -40
  196. package/dist/layers.DxA6ocdw.js +0 -70
  197. package/dist/layers.Dy1naDTQ.js +0 -14
  198. package/dist/layers.DzD-lWXV.js +0 -934
  199. package/dist/layers.E0TLXdrR.js +0 -40
  200. package/dist/layers.EcqLW9Mh.js +0 -1
  201. package/dist/layers.F4d4ILBH.js +0 -796
  202. package/dist/layers.G3enfHRT.js +0 -13
  203. package/dist/layers.HFONz6O9.js +0 -61
  204. package/dist/layers.IUqwmZRd.js +0 -122
  205. package/dist/layers.IbJq0D6U.js +0 -10
  206. package/dist/layers.Ic3KgoPg.js +0 -9
  207. package/dist/layers.JNgL8WWu.js +0 -10
  208. package/dist/layers.JWCLFILJ.js +0 -1
  209. package/dist/layers.KT-QFgdb.js +0 -7
  210. package/dist/layers.LCfVvo3T.js +0 -7
  211. package/dist/layers.LR-nMBU_.js +0 -1583
  212. package/dist/layers.Qt2qr0-t.js +0 -76
  213. package/dist/layers.R8mPlCA0.js +0 -261
  214. package/dist/layers.SCsPWeXb.js +0 -7
  215. package/dist/layers.U4NCf2-l.js +0 -70
  216. package/dist/layers.UewvnK33.js +0 -6
  217. package/dist/layers.VfVZmEbK.js +0 -8
  218. package/dist/layers.Vh-KvhZg.js +0 -1
  219. package/dist/layers.Y3D9xjCC.js +0 -9
  220. package/dist/layers.YT6D6D2x.js +0 -36
  221. package/dist/layers._y8hExIw.js +0 -223
  222. package/dist/layers.a8-4vDzD.js +0 -22
  223. package/dist/layers.aGzHUJ1W.js +0 -7
  224. package/dist/layers.b0h5ZBmD.js +0 -61
  225. package/dist/layers.b9B2NY7n.js +0 -11690
  226. package/dist/layers.ck9pUJ0W.js +0 -51
  227. package/dist/layers.d3HoUueQ.js +0 -2
  228. package/dist/layers.dWB4bggP.js +0 -1
  229. package/dist/layers.dh8xLSwh.js +0 -40
  230. package/dist/layers.eT_ZPmHS.js +0 -1
  231. package/dist/layers.fumrrA0i.js +0 -295
  232. package/dist/layers.gVfRcFrJ.js +0 -5
  233. package/dist/layers.js7-Kn9p.js +0 -36
  234. package/dist/layers.kW7XFPN_.js +0 -5
  235. package/dist/layers.lCpg7dOn.js +0 -21
  236. package/dist/layers.mobYTQXI.js +0 -1
  237. package/dist/layers.mvotlTNZ.js +0 -40
  238. package/dist/layers.n1dibO8I.js +0 -8
  239. package/dist/layers.nRPZ1e3g.js +0 -1
  240. package/dist/layers.o2u1uDM3.js +0 -1
  241. package/dist/layers.oJ31-KOl.js +0 -6
  242. package/dist/layers.ojcNGNgi.js +0 -1
  243. package/dist/layers.otxU0wtq.js +0 -40
  244. package/dist/layers.rE9xnPLC.js +0 -1
  245. package/dist/layers.s0KLXd5N.js +0 -41
  246. package/dist/layers.sqH5TpK8.js +0 -1
  247. package/dist/layers.t_MFWlU6.js +0 -9
  248. package/dist/layers.xrt74v23.js +0 -38
  249. package/dist/layers.zNb0110W.js +0 -37
@@ -1,796 +0,0 @@
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.DnRaD217.js";
2
- import "./layers.D_faABvp.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.D0RX234F.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
- };