@layers-app/editor 0.7.44 → 0.7.46

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 (248) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +5 -4
  3. package/dist/index.js +3 -3
  4. package/dist/{layers.Bt5BEQ6h.js → layers.B88sQYuh.js} +1 -1
  5. package/dist/layers.BgMykHnn.js +154 -0
  6. package/dist/{layers.CsTbIH2o.js → layers.BtvuN20E.js} +8988 -9641
  7. package/dist/{layers.8AV9TJ5y.js → layers.Cfvta__C.js} +1 -1
  8. package/dist/{layers.b9B2NY7n.js → layers.CsQlovyR.js} +2191 -1950
  9. package/dist/layers.Ct1ojjl3.js +1 -0
  10. package/dist/{layers.BPwGnx6H.js → layers.Hq0pIRX3.js} +24 -24
  11. package/dist/layers.JT_kEFH5.js +129 -0
  12. package/dist/{layers.D5EnJuSD.js → layers.NW1lST7i.js} +1 -1
  13. package/dist/layers.pwc3O6Es.js +261 -0
  14. package/package.json +1 -1
  15. package/dist/layers.03rOzGz6.js +0 -1
  16. package/dist/layers.2ki87-LU.js +0 -5
  17. package/dist/layers.2o06iRgp.js +0 -504
  18. package/dist/layers.52famHy6.js +0 -1
  19. package/dist/layers.5oOWOsbG.js +0 -39
  20. package/dist/layers.7JqFgE4-.js +0 -15
  21. package/dist/layers.8KaGKAU3.js +0 -271
  22. package/dist/layers.9URcRock.js +0 -1
  23. package/dist/layers.9pNaFvaX.js +0 -1
  24. package/dist/layers.B-dneuft.js +0 -373
  25. package/dist/layers.B19hGmey.js +0 -1
  26. package/dist/layers.B1fchoGW.js +0 -1
  27. package/dist/layers.B2cspFhx.js +0 -1034
  28. package/dist/layers.B3D4g2HH.js +0 -1
  29. package/dist/layers.B6soS223.js +0 -8
  30. package/dist/layers.B780IvgC.js +0 -84
  31. package/dist/layers.B7K7JjK6.js +0 -1510
  32. package/dist/layers.B9UunCzG.js +0 -39
  33. package/dist/layers.B9rQcczY.js +0 -14
  34. package/dist/layers.BAtv1CM7.js +0 -1
  35. package/dist/layers.BBcDfITy.js +0 -40
  36. package/dist/layers.BBhmfZot.js +0 -39
  37. package/dist/layers.BDqHBDOj.js +0 -9
  38. package/dist/layers.BFRbDTjY.js +0 -160
  39. package/dist/layers.BIUiVID4.js +0 -10
  40. package/dist/layers.BIeVwYKL.js +0 -1
  41. package/dist/layers.BJDrjORS.js +0 -244
  42. package/dist/layers.BKamPs3H.js +0 -1
  43. package/dist/layers.BLd2spTm.js +0 -1
  44. package/dist/layers.BMWMvKH-.js +0 -806
  45. package/dist/layers.BMxAun-L.js +0 -6
  46. package/dist/layers.BOMgDmQW.js +0 -1
  47. package/dist/layers.BQX_W7-N.js +0 -41
  48. package/dist/layers.BRBbDnyO.js +0 -32
  49. package/dist/layers.BRU1WOyl.js +0 -65
  50. package/dist/layers.BSTBZrFn.js +0 -1
  51. package/dist/layers.BUP7J0N1.js +0 -198
  52. package/dist/layers.BWYHKKSc.js +0 -9
  53. package/dist/layers.B_5Gf5vh.js +0 -7
  54. package/dist/layers.BbCfEXyj.js +0 -55
  55. package/dist/layers.Be7sKoi1.js +0 -36
  56. package/dist/layers.BewWHVmc.js +0 -10
  57. package/dist/layers.Bhbf4Voy.js +0 -1286
  58. package/dist/layers.BhgyYcry.js +0 -2966
  59. package/dist/layers.BjqXvHbh.js +0 -38
  60. package/dist/layers.Bl153Elb.js +0 -772
  61. package/dist/layers.BlVr0EB6.js +0 -35
  62. package/dist/layers.BmBx-JQP.js +0 -9
  63. package/dist/layers.BnDdlKo4.js +0 -39
  64. package/dist/layers.BnWlIV7l.js +0 -9
  65. package/dist/layers.BpilXLfW.js +0 -6
  66. package/dist/layers.BpxcN2Id.js +0 -118
  67. package/dist/layers.Bva7u9LH.js +0 -41
  68. package/dist/layers.Bw9PyPP3.js +0 -40
  69. package/dist/layers.BxxWjVSm.js +0 -7
  70. package/dist/layers.ByfnxHEU.js +0 -11
  71. package/dist/layers.BzrUktHE.js +0 -40
  72. package/dist/layers.Bzx6XYuC.js +0 -1
  73. package/dist/layers.C-oUoVP8.js +0 -11
  74. package/dist/layers.C-v8184a.js +0 -10
  75. package/dist/layers.C2DLU3k6.js +0 -205
  76. package/dist/layers.C4n-fEss.js +0 -9
  77. package/dist/layers.C8LHt7Vy.js +0 -35
  78. package/dist/layers.C8_lu5UH.js +0 -23
  79. package/dist/layers.C8i9MTMT.js +0 -1089
  80. package/dist/layers.C8sUTigy.js +0 -1
  81. package/dist/layers.C9xAxi33.js +0 -2
  82. package/dist/layers.CBBwxyeE.js +0 -36
  83. package/dist/layers.CD1cqEz5.js +0 -40
  84. package/dist/layers.CDMZWhfy.js +0 -61
  85. package/dist/layers.CEGoZtyz.js +0 -42
  86. package/dist/layers.CF5fav1y.js +0 -42
  87. package/dist/layers.CHZsXQcr.js +0 -1
  88. package/dist/layers.CL2zU9v_.js +0 -8
  89. package/dist/layers.CMF1lFeu.js +0 -2482
  90. package/dist/layers.CN4h4dWv.js +0 -40
  91. package/dist/layers.COskFe6S.js +0 -39
  92. package/dist/layers.CPYfnqn5.js +0 -37
  93. package/dist/layers.CQGa02SB.js +0 -8
  94. package/dist/layers.CS1a09mB.js +0 -2
  95. package/dist/layers.CSABgVEk.js +0 -13
  96. package/dist/layers.CSPqTpuh.js +0 -1
  97. package/dist/layers.CUJquY9u.js +0 -40
  98. package/dist/layers.CVpmcvSk.js +0 -425
  99. package/dist/layers.CXNwKrxy.js +0 -2
  100. package/dist/layers.CXbg7PbM.js +0 -32
  101. package/dist/layers.CXtLmfFd.js +0 -4
  102. package/dist/layers.CYQ-eDkR.js +0 -36
  103. package/dist/layers.CYlMzZJI.js +0 -223
  104. package/dist/layers.C_6t44t9.js +0 -7
  105. package/dist/layers.C_AqJZgj.js +0 -1
  106. package/dist/layers.C_IvrzZ3.js +0 -7
  107. package/dist/layers.C_JAqhrY.js +0 -76
  108. package/dist/layers.C_l6mWJZ.js +0 -3
  109. package/dist/layers.Cbn9kFtP.js +0 -22
  110. package/dist/layers.CdC2YLb3.js +0 -189
  111. package/dist/layers.Ce68IynP.js +0 -8
  112. package/dist/layers.Ced46X3q.js +0 -6
  113. package/dist/layers.CgAndu8u.js +0 -437
  114. package/dist/layers.CgKZ3PQQ.js +0 -1
  115. package/dist/layers.CjF61D9D.js +0 -32
  116. package/dist/layers.Ck_mYNSX.js +0 -38
  117. package/dist/layers.Ckb_FqEw.js +0 -9
  118. package/dist/layers.ClK-YSEj.js +0 -10
  119. package/dist/layers.ClPMD0vL.js +0 -1619
  120. package/dist/layers.Cq3WhnzE.js +0 -41
  121. package/dist/layers.CqVTtuYm.js +0 -6
  122. package/dist/layers.CrM-3BQr.js +0 -4
  123. package/dist/layers.CsJQzt0K.js +0 -805
  124. package/dist/layers.Cux05MKl.js +0 -8
  125. package/dist/layers.CwZFs1PA.js +0 -10
  126. package/dist/layers.Cxlebi7D.js +0 -122
  127. package/dist/layers.Cy9EF2DN.js +0 -8
  128. package/dist/layers.Cyzu9PKQ.js +0 -1
  129. package/dist/layers.D0zn4_Mx.js +0 -1
  130. package/dist/layers.D1hB76Bq.js +0 -11
  131. package/dist/layers.D3RHWYgt.js +0 -8
  132. package/dist/layers.D3qdetie.js +0 -9
  133. package/dist/layers.D3xtqcGm.js +0 -42
  134. package/dist/layers.D4T8fTcj.js +0 -1223
  135. package/dist/layers.D54e-Khu.js +0 -9
  136. package/dist/layers.D661e9Xc.js +0 -1225
  137. package/dist/layers.D7cIx_9y.js +0 -7
  138. package/dist/layers.D7jGxypv.js +0 -8
  139. package/dist/layers.D7v-bI_M.js +0 -796
  140. package/dist/layers.DA37YYAX.js +0 -1
  141. package/dist/layers.DBFtWsLd.js +0 -32
  142. package/dist/layers.DBspJRLt.js +0 -9
  143. package/dist/layers.DCYPhLVi.js +0 -139
  144. package/dist/layers.DCeGyOw0.js +0 -32
  145. package/dist/layers.DDBS2bZp.js +0 -10
  146. package/dist/layers.DEV2RzXF.js +0 -35
  147. package/dist/layers.DFOzrTFb.js +0 -6
  148. package/dist/layers.DGbx9JE5.js +0 -70
  149. package/dist/layers.DH1xK3c2.js +0 -48149
  150. package/dist/layers.DH2Fx227.js +0 -38
  151. package/dist/layers.DH7NXYKd.js +0 -21941
  152. package/dist/layers.DHOsMTqa.js +0 -41
  153. package/dist/layers.DJIT4Yuh.js +0 -1
  154. package/dist/layers.DJteL1WD.js +0 -33
  155. package/dist/layers.DLwuMfdd.js +0 -84
  156. package/dist/layers.DMkBISW1.js +0 -1
  157. package/dist/layers.DN58BT2N.js +0 -129
  158. package/dist/layers.DN9HoVxI.js +0 -18
  159. package/dist/layers.DNRniJ59.js +0 -33
  160. package/dist/layers.DOZhGFQj.js +0 -40
  161. package/dist/layers.DOrgOHBr.js +0 -1
  162. package/dist/layers.DP6Pb86W.js +0 -4
  163. package/dist/layers.DQpfAS9_.js +0 -84
  164. package/dist/layers.DSBfJxui.js +0 -2238
  165. package/dist/layers.DUulRicy.js +0 -213
  166. package/dist/layers.DXLQ2q0o.js +0 -794
  167. package/dist/layers.DXqg60IE.js +0 -1
  168. package/dist/layers.DZkyqPUI.js +0 -41
  169. package/dist/layers.D_MAZnF5.js +0 -11
  170. package/dist/layers.DbMx76Zo.js +0 -1
  171. package/dist/layers.DbaKVP5e.js +0 -1
  172. package/dist/layers.DcYYTMWk.js +0 -5
  173. package/dist/layers.DenHSAM-.js +0 -423
  174. package/dist/layers.Dfg_GwXo.js +0 -41
  175. package/dist/layers.Dfv6IVuG.js +0 -39
  176. package/dist/layers.Di5XQ7RG.js +0 -5
  177. package/dist/layers.DiLG4f1T.js +0 -41
  178. package/dist/layers.DjUOC4st.js +0 -16
  179. package/dist/layers.Dksb8xWL.js +0 -21620
  180. package/dist/layers.DnTHkHku.js +0 -1
  181. package/dist/layers.DnbGJb7n.js +0 -10
  182. package/dist/layers.Dp8hIITu.js +0 -39
  183. package/dist/layers.DrGILrJe.js +0 -1
  184. package/dist/layers.DrPZhd4b.js +0 -8
  185. package/dist/layers.DsCDPcQF.js +0 -52
  186. package/dist/layers.DsLXYKq7.js +0 -139
  187. package/dist/layers.DssLE6Ze.js +0 -42
  188. package/dist/layers.DtK0Svqg.js +0 -36
  189. package/dist/layers.DtNKNbtb.js +0 -1268
  190. package/dist/layers.DuuzgAVb.js +0 -7
  191. package/dist/layers.DuyNXGEO.js +0 -5
  192. package/dist/layers.DvSwjIBG.js +0 -37
  193. package/dist/layers.DwPc2_v9.js +0 -1088
  194. package/dist/layers.DxA6ocdw.js +0 -70
  195. package/dist/layers.Dy1naDTQ.js +0 -14
  196. package/dist/layers.DyK8xvHc.js +0 -1
  197. package/dist/layers.G5fXkV2g.js +0 -40
  198. package/dist/layers.GRwgnZ0K.js +0 -1126
  199. package/dist/layers.H9GbooLl.js +0 -11
  200. package/dist/layers.Ii0kosET.js +0 -10
  201. package/dist/layers.IsBK41F6.js +0 -960
  202. package/dist/layers.JFRyjmr3.js +0 -295
  203. package/dist/layers.JWCLFILJ.js +0 -1
  204. package/dist/layers.L1EEfd1U.js +0 -323
  205. package/dist/layers.LgOKQKa4.js +0 -39
  206. package/dist/layers.NsxwBYck.js +0 -907
  207. package/dist/layers.OqunHjml.js +0 -51
  208. package/dist/layers.OziSx6JY.js +0 -8583
  209. package/dist/layers.PW9J5Jxo.js +0 -37
  210. package/dist/layers.R8mPlCA0.js +0 -261
  211. package/dist/layers.S2akqscS.js +0 -1
  212. package/dist/layers.SGT8YAPE.js +0 -7
  213. package/dist/layers.TD8A7YjM.js +0 -44
  214. package/dist/layers.UtIqQK19.js +0 -276
  215. package/dist/layers.VIZ2Xa30.js +0 -1
  216. package/dist/layers.WAvmJfLV.js +0 -7
  217. package/dist/layers.XQpyNRW5.js +0 -116
  218. package/dist/layers.Xco5GVBh.js +0 -40
  219. package/dist/layers.Y0BjACCI.js +0 -39
  220. package/dist/layers.YTMr1YyH.js +0 -42
  221. package/dist/layers._bAvXI7Q.js +0 -934
  222. package/dist/layers._mqWoKOG.js +0 -1
  223. package/dist/layers.al8Vg6zt.js +0 -6
  224. package/dist/layers.b0h5ZBmD.js +0 -61
  225. package/dist/layers.dyRJvH-s.js +0 -6
  226. package/dist/layers.eB1U5Jl6.js +0 -8
  227. package/dist/layers.euNtZlgm.js +0 -37
  228. package/dist/layers.fChmSQjC.js +0 -1
  229. package/dist/layers.feSI_7Kx.js +0 -1
  230. package/dist/layers.frthGoDK.js +0 -9
  231. package/dist/layers.gqLoI9xW.js +0 -5
  232. package/dist/layers.hpuqkyYN.js +0 -257
  233. package/dist/layers.iN3mYsr5.js +0 -34
  234. package/dist/layers.jjNsAaLS.js +0 -10
  235. package/dist/layers.l6EuAdoo.js +0 -7
  236. package/dist/layers.lCpg7dOn.js +0 -21
  237. package/dist/layers.lXs3RYd3.js +0 -10
  238. package/dist/layers.liB8aZ3C.js +0 -207
  239. package/dist/layers.qffllMmW.js +0 -41
  240. package/dist/layers.r1jKcKBb.js +0 -4
  241. package/dist/layers.rFy6_B28.js +0 -32
  242. package/dist/layers.rq1vUYAs.js +0 -6
  243. package/dist/layers.sIeIPQd4.js +0 -40
  244. package/dist/layers.sdxt2Nuu.js +0 -8
  245. package/dist/layers.t8MaTGN8.js +0 -1
  246. package/dist/layers.wKJ5yZVV.js +0 -96
  247. package/dist/layers.x9brO2TV.js +0 -1
  248. package/dist/layers.xQ1jNHSB.js +0 -1583
@@ -1,805 +0,0 @@
1
- import { a as yt, s as ft, b as dt, c as pt, n as gt, o as mt, g as I, d as H, e as xt, q as kt } from "./layers.OziSx6JY.js";
2
- import { a as _t, g as it, f as bt, d as vt } from "./layers.BRU1WOyl.js";
3
- import "./layers.Dksb8xWL.js";
4
- import "lodash-es/memoize.js";
5
- import "lodash-es/merge.js";
6
- import "lodash-es/isEmpty.js";
7
- import { a as Q } from "./layers.DQpfAS9_.js";
8
- var X = (function() {
9
- var t = function(p, s, r, a) {
10
- for (r = r || {}, a = p.length; a--; r[p[a]] = s)
11
- ;
12
- return r;
13
- }, e = [6, 8, 10, 11, 12, 14, 16, 17, 18], i = [1, 9], l = [1, 10], n = [1, 11], h = [1, 12], c = [1, 13], f = [1, 14], y = {
14
- trace: function() {
15
- },
16
- yy: {},
17
- symbols_: { error: 2, start: 3, journey: 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, taskName: 18, taskData: 19, $accept: 0, $end: 1 },
18
- terminals_: { 2: "error", 4: "journey", 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", 18: "taskName", 19: "taskData" },
19
- 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, 2]],
20
- performAction: function(s, r, a, u, d, o, w) {
21
- var k = o.length - 1;
22
- switch (d) {
23
- case 1:
24
- return o[k - 1];
25
- case 2:
26
- this.$ = [];
27
- break;
28
- case 3:
29
- o[k - 1].push(o[k]), this.$ = o[k - 1];
30
- break;
31
- case 4:
32
- case 5:
33
- this.$ = o[k];
34
- break;
35
- case 6:
36
- case 7:
37
- this.$ = [];
38
- break;
39
- case 8:
40
- u.setDiagramTitle(o[k].substr(6)), this.$ = o[k].substr(6);
41
- break;
42
- case 9:
43
- this.$ = o[k].trim(), u.setAccTitle(this.$);
44
- break;
45
- case 10:
46
- case 11:
47
- this.$ = o[k].trim(), u.setAccDescription(this.$);
48
- break;
49
- case 12:
50
- u.addSection(o[k].substr(8)), this.$ = o[k].substr(8);
51
- break;
52
- case 13:
53
- u.addTask(o[k - 1], o[k]), this.$ = "task";
54
- break;
55
- }
56
- },
57
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: i, 12: l, 14: n, 16: h, 17: c, 18: f }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 15, 11: i, 12: l, 14: n, 16: h, 17: c, 18: f }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, t(e, [2, 11]), t(e, [2, 12]), { 19: [1, 18] }, t(e, [2, 4]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 13])],
58
- defaultActions: {},
59
- parseError: function(s, r) {
60
- if (r.recoverable)
61
- this.trace(s);
62
- else {
63
- var a = new Error(s);
64
- throw a.hash = r, a;
65
- }
66
- },
67
- parse: function(s) {
68
- var r = this, a = [0], u = [], d = [null], o = [], w = this.table, k = "", R = 0, Z = 0, lt = 2, J = 1, ct = o.slice.call(arguments, 1), x = Object.create(this.lexer), S = { yy: {} };
69
- for (var z in this.yy)
70
- Object.prototype.hasOwnProperty.call(this.yy, z) && (S.yy[z] = this.yy[z]);
71
- x.setInput(s, S.yy), S.yy.lexer = x, S.yy.parser = this, typeof x.yylloc > "u" && (x.yylloc = {});
72
- var Y = x.yylloc;
73
- o.push(Y);
74
- var ht = x.options && x.options.ranges;
75
- typeof S.yy.parseError == "function" ? this.parseError = S.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
76
- function ut() {
77
- var T;
78
- return T = u.pop() || x.lex() || J, typeof T != "number" && (T instanceof Array && (u = T, T = u.pop()), T = r.symbols_[T] || T), T;
79
- }
80
- for (var _, E, b, q, A = {}, N, $, K, B; ; ) {
81
- if (E = a[a.length - 1], this.defaultActions[E] ? b = this.defaultActions[E] : ((_ === null || typeof _ > "u") && (_ = ut()), b = w[E] && w[E][_]), typeof b > "u" || !b.length || !b[0]) {
82
- var O = "";
83
- B = [];
84
- for (N in w[E])
85
- this.terminals_[N] && N > lt && B.push("'" + this.terminals_[N] + "'");
86
- x.showPosition ? O = "Parse error on line " + (R + 1) + `:
87
- ` + x.showPosition() + `
88
- Expecting ` + B.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : O = "Parse error on line " + (R + 1) + ": Unexpected " + (_ == J ? "end of input" : "'" + (this.terminals_[_] || _) + "'"), this.parseError(O, {
89
- text: x.match,
90
- token: this.terminals_[_] || _,
91
- line: x.yylineno,
92
- loc: Y,
93
- expected: B
94
- });
95
- }
96
- if (b[0] instanceof Array && b.length > 1)
97
- throw new Error("Parse Error: multiple actions possible at state: " + E + ", token: " + _);
98
- switch (b[0]) {
99
- case 1:
100
- a.push(_), d.push(x.yytext), o.push(x.yylloc), a.push(b[1]), _ = null, Z = x.yyleng, k = x.yytext, R = x.yylineno, Y = x.yylloc;
101
- break;
102
- case 2:
103
- if ($ = this.productions_[b[1]][1], A.$ = d[d.length - $], A._$ = {
104
- first_line: o[o.length - ($ || 1)].first_line,
105
- last_line: o[o.length - 1].last_line,
106
- first_column: o[o.length - ($ || 1)].first_column,
107
- last_column: o[o.length - 1].last_column
108
- }, ht && (A._$.range = [
109
- o[o.length - ($ || 1)].range[0],
110
- o[o.length - 1].range[1]
111
- ]), q = this.performAction.apply(A, [
112
- k,
113
- Z,
114
- R,
115
- S.yy,
116
- b[1],
117
- d,
118
- o
119
- ].concat(ct)), typeof q < "u")
120
- return q;
121
- $ && (a = a.slice(0, -1 * $ * 2), d = d.slice(0, -1 * $), o = o.slice(0, -1 * $)), a.push(this.productions_[b[1]][0]), d.push(A.$), o.push(A._$), K = w[a[a.length - 2]][a[a.length - 1]], a.push(K);
122
- break;
123
- case 3:
124
- return !0;
125
- }
126
- }
127
- return !0;
128
- }
129
- }, m = /* @__PURE__ */ (function() {
130
- var p = {
131
- EOF: 1,
132
- parseError: function(r, a) {
133
- if (this.yy.parser)
134
- this.yy.parser.parseError(r, a);
135
- else
136
- throw new Error(r);
137
- },
138
- // resets the lexer, sets new input
139
- setInput: function(s, r) {
140
- return this.yy = r || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
141
- first_line: 1,
142
- first_column: 0,
143
- last_line: 1,
144
- last_column: 0
145
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
146
- },
147
- // consumes and returns one char from the input
148
- input: function() {
149
- var s = this._input[0];
150
- this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
151
- var r = s.match(/(?:\r\n?|\n).*/g);
152
- 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), s;
153
- },
154
- // unshifts one char (or a string) into the input
155
- unput: function(s) {
156
- var r = s.length, a = s.split(/(?:\r\n?|\n)/g);
157
- this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r;
158
- var u = this.match.split(/(?:\r\n?|\n)/g);
159
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), a.length - 1 && (this.yylineno -= a.length - 1);
160
- var d = this.yylloc.range;
161
- return this.yylloc = {
162
- first_line: this.yylloc.first_line,
163
- last_line: this.yylineno + 1,
164
- first_column: this.yylloc.first_column,
165
- last_column: a ? (a.length === u.length ? this.yylloc.first_column : 0) + u[u.length - a.length].length - a[0].length : this.yylloc.first_column - r
166
- }, this.options.ranges && (this.yylloc.range = [d[0], d[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this;
167
- },
168
- // When called from action, caches matched text and appends it on next action
169
- more: function() {
170
- return this._more = !0, this;
171
- },
172
- // 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.
173
- reject: function() {
174
- if (this.options.backtrack_lexer)
175
- this._backtrack = !0;
176
- else
177
- 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).
178
- ` + this.showPosition(), {
179
- text: "",
180
- token: null,
181
- line: this.yylineno
182
- });
183
- return this;
184
- },
185
- // retain first n characters of the match
186
- less: function(s) {
187
- this.unput(this.match.slice(s));
188
- },
189
- // displays already matched input, i.e. for error messages
190
- pastInput: function() {
191
- var s = this.matched.substr(0, this.matched.length - this.match.length);
192
- return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
193
- },
194
- // displays upcoming input, i.e. for error messages
195
- upcomingInput: function() {
196
- var s = this.match;
197
- return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
198
- },
199
- // displays the character position where the lexing error occurred, i.e. for error messages
200
- showPosition: function() {
201
- var s = this.pastInput(), r = new Array(s.length + 1).join("-");
202
- return s + this.upcomingInput() + `
203
- ` + r + "^";
204
- },
205
- // test the lexed token: return FALSE when not a match, otherwise return token
206
- test_match: function(s, r) {
207
- var a, u, d;
208
- if (this.options.backtrack_lexer && (d = {
209
- yylineno: this.yylineno,
210
- yylloc: {
211
- first_line: this.yylloc.first_line,
212
- last_line: this.last_line,
213
- first_column: this.yylloc.first_column,
214
- last_column: this.yylloc.last_column
215
- },
216
- yytext: this.yytext,
217
- match: this.match,
218
- matches: this.matches,
219
- matched: this.matched,
220
- yyleng: this.yyleng,
221
- offset: this.offset,
222
- _more: this._more,
223
- _input: this._input,
224
- yy: this.yy,
225
- conditionStack: this.conditionStack.slice(0),
226
- done: this.done
227
- }, this.options.ranges && (d.yylloc.range = this.yylloc.range.slice(0))), u = s[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
228
- first_line: this.yylloc.last_line,
229
- last_line: this.yylineno + 1,
230
- first_column: this.yylloc.last_column,
231
- last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
232
- }, this.yytext += s[0], this.match += s[0], this.matches = s, 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(s[0].length), this.matched += s[0], a = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), a)
233
- return a;
234
- if (this._backtrack) {
235
- for (var o in d)
236
- this[o] = d[o];
237
- return !1;
238
- }
239
- return !1;
240
- },
241
- // return next match in input
242
- next: function() {
243
- if (this.done)
244
- return this.EOF;
245
- this._input || (this.done = !0);
246
- var s, r, a, u;
247
- this._more || (this.yytext = "", this.match = "");
248
- for (var d = this._currentRules(), o = 0; o < d.length; o++)
249
- if (a = this._input.match(this.rules[d[o]]), a && (!r || a[0].length > r[0].length)) {
250
- if (r = a, u = o, this.options.backtrack_lexer) {
251
- if (s = this.test_match(a, d[o]), s !== !1)
252
- return s;
253
- if (this._backtrack) {
254
- r = !1;
255
- continue;
256
- } else
257
- return !1;
258
- } else if (!this.options.flex)
259
- break;
260
- }
261
- return r ? (s = this.test_match(r, d[u]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
262
- ` + this.showPosition(), {
263
- text: "",
264
- token: null,
265
- line: this.yylineno
266
- });
267
- },
268
- // return next match that has a token
269
- lex: function() {
270
- var r = this.next();
271
- return r || this.lex();
272
- },
273
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
274
- begin: function(r) {
275
- this.conditionStack.push(r);
276
- },
277
- // pop the previously active lexer condition state off the condition stack
278
- popState: function() {
279
- var r = this.conditionStack.length - 1;
280
- return r > 0 ? this.conditionStack.pop() : this.conditionStack[0];
281
- },
282
- // produce the lexer rule set which is active for the currently active lexer condition state
283
- _currentRules: function() {
284
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
285
- },
286
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
287
- topState: function(r) {
288
- return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL";
289
- },
290
- // alias for begin(condition)
291
- pushState: function(r) {
292
- this.begin(r);
293
- },
294
- // return the number of states currently on the stack
295
- stateStackSize: function() {
296
- return this.conditionStack.length;
297
- },
298
- options: { "case-insensitive": !0 },
299
- performAction: function(r, a, u, d) {
300
- switch (u) {
301
- case 0:
302
- break;
303
- case 1:
304
- break;
305
- case 2:
306
- return 10;
307
- case 3:
308
- break;
309
- case 4:
310
- break;
311
- case 5:
312
- return 4;
313
- case 6:
314
- return 11;
315
- case 7:
316
- return this.begin("acc_title"), 12;
317
- case 8:
318
- return this.popState(), "acc_title_value";
319
- case 9:
320
- return this.begin("acc_descr"), 14;
321
- case 10:
322
- return this.popState(), "acc_descr_value";
323
- case 11:
324
- this.begin("acc_descr_multiline");
325
- break;
326
- case 12:
327
- this.popState();
328
- break;
329
- case 13:
330
- return "acc_descr_multiline_value";
331
- case 14:
332
- return 17;
333
- case 15:
334
- return 18;
335
- case 16:
336
- return 19;
337
- case 17:
338
- return ":";
339
- case 18:
340
- return 6;
341
- case 19:
342
- return "INVALID";
343
- }
344
- },
345
- rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\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, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/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, 19], inclusive: !0 } }
347
- };
348
- return p;
349
- })();
350
- y.lexer = m;
351
- function g() {
352
- this.yy = {};
353
- }
354
- return g.prototype = y, y.Parser = g, new g();
355
- })();
356
- X.parser = X;
357
- const wt = X;
358
- let C = "";
359
- const G = [], V = [], F = [], $t = function() {
360
- G.length = 0, V.length = 0, C = "", F.length = 0, kt();
361
- }, Tt = function(t) {
362
- C = t, G.push(t);
363
- }, Mt = function() {
364
- return G;
365
- }, St = function() {
366
- let t = D();
367
- const e = 100;
368
- let i = 0;
369
- for (; !t && i < e; )
370
- t = D(), i++;
371
- return V.push(...F), V;
372
- }, Et = function() {
373
- const t = [];
374
- return V.forEach((i) => {
375
- i.people && t.push(...i.people);
376
- }), [...new Set(t)].sort();
377
- }, Pt = function(t, e) {
378
- const i = e.substr(1).split(":");
379
- let l = 0, n = [];
380
- i.length === 1 ? (l = Number(i[0]), n = []) : (l = Number(i[0]), n = i[1].split(","));
381
- const h = n.map((f) => f.trim()), c = {
382
- section: C,
383
- type: C,
384
- people: h,
385
- task: t,
386
- score: l
387
- };
388
- F.push(c);
389
- }, It = function(t) {
390
- const e = {
391
- section: C,
392
- type: C,
393
- description: t,
394
- task: t,
395
- classes: []
396
- };
397
- V.push(e);
398
- }, D = function() {
399
- const t = function(i) {
400
- return F[i].processed;
401
- };
402
- let e = !0;
403
- for (const [i, l] of F.entries())
404
- t(i), e = e && l.processed;
405
- return e;
406
- }, At = function() {
407
- return Et();
408
- }, tt = {
409
- getConfig: () => I().journey,
410
- clear: $t,
411
- setDiagramTitle: mt,
412
- getDiagramTitle: gt,
413
- setAccTitle: pt,
414
- getAccTitle: dt,
415
- setAccDescription: ft,
416
- getAccDescription: yt,
417
- addSection: Tt,
418
- getSections: Mt,
419
- getTasks: St,
420
- addTask: Pt,
421
- addTaskOrg: It,
422
- getActors: At
423
- }, Ct = (t) => `.label {
424
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
425
- font-family: var(--mermaid-font-family);
426
- color: ${t.textColor};
427
- }
428
- .mouth {
429
- stroke: #666;
430
- }
431
-
432
- line {
433
- stroke: ${t.textColor}
434
- }
435
-
436
- .legend {
437
- fill: ${t.textColor};
438
- }
439
-
440
- .label text {
441
- fill: #333;
442
- }
443
- .label {
444
- color: ${t.textColor}
445
- }
446
-
447
- .face {
448
- ${t.faceColor ? `fill: ${t.faceColor}` : "fill: #FFF8DC"};
449
- stroke: #999;
450
- }
451
-
452
- .node rect,
453
- .node circle,
454
- .node ellipse,
455
- .node polygon,
456
- .node path {
457
- fill: ${t.mainBkg};
458
- stroke: ${t.nodeBorder};
459
- stroke-width: 1px;
460
- }
461
-
462
- .node .label {
463
- text-align: center;
464
- }
465
- .node.clickable {
466
- cursor: pointer;
467
- }
468
-
469
- .arrowheadPath {
470
- fill: ${t.arrowheadColor};
471
- }
472
-
473
- .edgePath .path {
474
- stroke: ${t.lineColor};
475
- stroke-width: 1.5px;
476
- }
477
-
478
- .flowchart-link {
479
- stroke: ${t.lineColor};
480
- fill: none;
481
- }
482
-
483
- .edgeLabel {
484
- background-color: ${t.edgeLabelBackground};
485
- rect {
486
- opacity: 0.5;
487
- }
488
- text-align: center;
489
- }
490
-
491
- .cluster rect {
492
- }
493
-
494
- .cluster text {
495
- fill: ${t.titleColor};
496
- }
497
-
498
- div.mermaidTooltip {
499
- position: absolute;
500
- text-align: center;
501
- max-width: 200px;
502
- padding: 2px;
503
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
504
- font-family: var(--mermaid-font-family);
505
- font-size: 12px;
506
- background: ${t.tertiaryColor};
507
- border: 1px solid ${t.border2};
508
- border-radius: 2px;
509
- pointer-events: none;
510
- z-index: 100;
511
- }
512
-
513
- .task-type-0, .section-type-0 {
514
- ${t.fillType0 ? `fill: ${t.fillType0}` : ""};
515
- }
516
- .task-type-1, .section-type-1 {
517
- ${t.fillType0 ? `fill: ${t.fillType1}` : ""};
518
- }
519
- .task-type-2, .section-type-2 {
520
- ${t.fillType0 ? `fill: ${t.fillType2}` : ""};
521
- }
522
- .task-type-3, .section-type-3 {
523
- ${t.fillType0 ? `fill: ${t.fillType3}` : ""};
524
- }
525
- .task-type-4, .section-type-4 {
526
- ${t.fillType0 ? `fill: ${t.fillType4}` : ""};
527
- }
528
- .task-type-5, .section-type-5 {
529
- ${t.fillType0 ? `fill: ${t.fillType5}` : ""};
530
- }
531
- .task-type-6, .section-type-6 {
532
- ${t.fillType0 ? `fill: ${t.fillType6}` : ""};
533
- }
534
- .task-type-7, .section-type-7 {
535
- ${t.fillType0 ? `fill: ${t.fillType7}` : ""};
536
- }
537
-
538
- .actor-0 {
539
- ${t.actor0 ? `fill: ${t.actor0}` : ""};
540
- }
541
- .actor-1 {
542
- ${t.actor1 ? `fill: ${t.actor1}` : ""};
543
- }
544
- .actor-2 {
545
- ${t.actor2 ? `fill: ${t.actor2}` : ""};
546
- }
547
- .actor-3 {
548
- ${t.actor3 ? `fill: ${t.actor3}` : ""};
549
- }
550
- .actor-4 {
551
- ${t.actor4 ? `fill: ${t.actor4}` : ""};
552
- }
553
- .actor-5 {
554
- ${t.actor5 ? `fill: ${t.actor5}` : ""};
555
- }
556
- `, Vt = Ct, U = function(t, e) {
557
- return vt(t, e);
558
- }, Ft = function(t, e) {
559
- const l = t.append("circle").attr("cx", e.cx).attr("cy", e.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), n = t.append("g");
560
- n.append("circle").attr("cx", e.cx - 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), n.append("circle").attr("cx", e.cx + 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
561
- function h(y) {
562
- const m = Q().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
563
- y.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 2) + ")");
564
- }
565
- function c(y) {
566
- const m = Q().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
567
- y.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 7) + ")");
568
- }
569
- function f(y) {
570
- y.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", e.cx - 5).attr("y1", e.cy + 7).attr("x2", e.cx + 5).attr("y2", e.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
571
- }
572
- return e.score > 3 ? h(n) : e.score < 3 ? c(n) : f(n), l;
573
- }, rt = function(t, e) {
574
- const i = t.append("circle");
575
- return i.attr("cx", e.cx), i.attr("cy", e.cy), i.attr("class", "actor-" + e.pos), i.attr("fill", e.fill), i.attr("stroke", e.stroke), i.attr("r", e.r), i.class !== void 0 && i.attr("class", i.class), e.title !== void 0 && i.append("title").text(e.title), i;
576
- }, at = function(t, e) {
577
- return bt(t, e);
578
- }, Lt = function(t, e) {
579
- function i(n, h, c, f, y) {
580
- return n + "," + h + " " + (n + c) + "," + h + " " + (n + c) + "," + (h + f - y) + " " + (n + c - y * 1.2) + "," + (h + f) + " " + n + "," + (h + f);
581
- }
582
- const l = t.append("polygon");
583
- l.attr("points", i(e.x, e.y, 50, 20, 7)), l.attr("class", "labelBox"), e.y = e.y + e.labelMargin, e.x = e.x + 0.5 * e.labelMargin, at(t, e);
584
- }, Rt = function(t, e, i) {
585
- const l = t.append("g"), n = it();
586
- n.x = e.x, n.y = e.y, n.fill = e.fill, n.width = i.width * e.taskCount + // width of the tasks
587
- i.diagramMarginX * (e.taskCount - 1), n.height = i.height, n.class = "journey-section section-type-" + e.num, n.rx = 3, n.ry = 3, U(l, n), ot(i)(
588
- e.text,
589
- l,
590
- n.x,
591
- n.y,
592
- n.width,
593
- n.height,
594
- { class: "journey-section section-type-" + e.num },
595
- i,
596
- e.colour
597
- );
598
- };
599
- let et = -1;
600
- const Nt = function(t, e, i) {
601
- const l = e.x + i.width / 2, n = t.append("g");
602
- et++, n.append("line").attr("id", "task" + et).attr("x1", l).attr("y1", e.y).attr("x2", l).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Ft(n, {
603
- cx: l,
604
- cy: 300 + (5 - e.score) * 30,
605
- score: e.score
606
- });
607
- const c = it();
608
- c.x = e.x, c.y = e.y, c.fill = e.fill, c.width = i.width, c.height = i.height, c.class = "task task-type-" + e.num, c.rx = 3, c.ry = 3, U(n, c);
609
- let f = e.x + 14;
610
- e.people.forEach((y) => {
611
- const m = e.actors[y].color, g = {
612
- cx: f,
613
- cy: e.y,
614
- r: 7,
615
- fill: m,
616
- stroke: "#000",
617
- title: y,
618
- pos: e.actors[y].position
619
- };
620
- rt(n, g), f += 10;
621
- }), ot(i)(
622
- e.task,
623
- n,
624
- c.x,
625
- c.y,
626
- c.width,
627
- c.height,
628
- { class: "task" },
629
- i,
630
- e.colour
631
- );
632
- }, Bt = function(t, e) {
633
- _t(t, e);
634
- }, ot = /* @__PURE__ */ (function() {
635
- function t(n, h, c, f, y, m, g, p) {
636
- const s = h.append("text").attr("x", c + y / 2).attr("y", f + m / 2 + 5).style("font-color", p).style("text-anchor", "middle").text(n);
637
- l(s, g);
638
- }
639
- function e(n, h, c, f, y, m, g, p, s) {
640
- const { taskFontSize: r, taskFontFamily: a } = p, u = n.split(/<br\s*\/?>/gi);
641
- for (let d = 0; d < u.length; d++) {
642
- const o = d * r - r * (u.length - 1) / 2, w = h.append("text").attr("x", c + y / 2).attr("y", f).attr("fill", s).style("text-anchor", "middle").style("font-size", r).style("font-family", a);
643
- w.append("tspan").attr("x", c + y / 2).attr("dy", o).text(u[d]), w.attr("y", f + m / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), l(w, g);
644
- }
645
- }
646
- function i(n, h, c, f, y, m, g, p) {
647
- const s = h.append("switch"), a = s.append("foreignObject").attr("x", c).attr("y", f).attr("width", y).attr("height", m).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
648
- a.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(n), e(n, s, c, f, y, m, g, p), l(a, g);
649
- }
650
- function l(n, h) {
651
- for (const c in h)
652
- c in h && n.attr(c, h[c]);
653
- }
654
- return function(n) {
655
- return n.textPlacement === "fo" ? i : n.textPlacement === "old" ? t : e;
656
- };
657
- })(), jt = function(t) {
658
- t.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");
659
- }, L = {
660
- drawRect: U,
661
- drawCircle: rt,
662
- drawSection: Rt,
663
- drawText: at,
664
- drawLabel: Lt,
665
- drawTask: Nt,
666
- drawBackgroundRect: Bt,
667
- initGraphics: jt
668
- }, zt = function(t) {
669
- Object.keys(t).forEach(function(i) {
670
- j[i] = t[i];
671
- });
672
- }, M = {};
673
- function Yt(t) {
674
- const e = I().journey;
675
- let i = 60;
676
- Object.keys(M).forEach((l) => {
677
- const n = M[l].color, h = {
678
- cx: 20,
679
- cy: i,
680
- r: 7,
681
- fill: n,
682
- stroke: "#000",
683
- pos: M[l].position
684
- };
685
- L.drawCircle(t, h);
686
- const c = {
687
- x: 40,
688
- y: i + 7,
689
- fill: "#666",
690
- text: l,
691
- textMargin: e.boxTextMargin | 5
692
- };
693
- L.drawText(t, c), i += 20;
694
- });
695
- }
696
- const j = I().journey, P = j.leftMargin, qt = function(t, e, i, l) {
697
- const n = I().journey, h = I().securityLevel;
698
- let c;
699
- h === "sandbox" && (c = H("#i" + e));
700
- const f = h === "sandbox" ? H(c.nodes()[0].contentDocument.body) : H("body");
701
- v.init();
702
- const y = f.select("#" + e);
703
- L.initGraphics(y);
704
- const m = l.db.getTasks(), g = l.db.getDiagramTitle(), p = l.db.getActors();
705
- for (const o in M)
706
- delete M[o];
707
- let s = 0;
708
- p.forEach((o) => {
709
- M[o] = {
710
- color: n.actorColours[s % n.actorColours.length],
711
- position: s
712
- }, s++;
713
- }), Yt(y), v.insert(0, 0, P, Object.keys(M).length * 50), Ot(y, m, 0);
714
- const r = v.getBounds();
715
- g && y.append("text").text(g).attr("x", P).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
716
- const a = r.stopy - r.starty + 2 * n.diagramMarginY, u = P + r.stopx + 2 * n.diagramMarginX;
717
- xt(y, a, u, n.useMaxWidth), y.append("line").attr("x1", P).attr("y1", n.height * 4).attr("x2", u - P - 4).attr("y2", n.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
718
- const d = g ? 70 : 0;
719
- y.attr("viewBox", `${r.startx} -25 ${u} ${a + d}`), y.attr("preserveAspectRatio", "xMinYMin meet"), y.attr("height", a + d + 25);
720
- }, v = {
721
- data: {
722
- startx: void 0,
723
- stopx: void 0,
724
- starty: void 0,
725
- stopy: void 0
726
- },
727
- verticalPos: 0,
728
- sequenceItems: [],
729
- init: function() {
730
- this.sequenceItems = [], this.data = {
731
- startx: void 0,
732
- stopx: void 0,
733
- starty: void 0,
734
- stopy: void 0
735
- }, this.verticalPos = 0;
736
- },
737
- updateVal: function(t, e, i, l) {
738
- t[e] === void 0 ? t[e] = i : t[e] = l(i, t[e]);
739
- },
740
- updateBounds: function(t, e, i, l) {
741
- const n = I().journey, h = this;
742
- let c = 0;
743
- function f(y) {
744
- return function(g) {
745
- c++;
746
- const p = h.sequenceItems.length - c + 1;
747
- h.updateVal(g, "starty", e - p * n.boxMargin, Math.min), h.updateVal(g, "stopy", l + p * n.boxMargin, Math.max), h.updateVal(v.data, "startx", t - p * n.boxMargin, Math.min), h.updateVal(v.data, "stopx", i + p * n.boxMargin, Math.max), h.updateVal(g, "startx", t - p * n.boxMargin, Math.min), h.updateVal(g, "stopx", i + p * n.boxMargin, Math.max), h.updateVal(v.data, "starty", e - p * n.boxMargin, Math.min), h.updateVal(v.data, "stopy", l + p * n.boxMargin, Math.max);
748
- };
749
- }
750
- this.sequenceItems.forEach(f());
751
- },
752
- insert: function(t, e, i, l) {
753
- const n = Math.min(t, i), h = Math.max(t, i), c = Math.min(e, l), f = Math.max(e, l);
754
- this.updateVal(v.data, "startx", n, Math.min), this.updateVal(v.data, "starty", c, Math.min), this.updateVal(v.data, "stopx", h, Math.max), this.updateVal(v.data, "stopy", f, Math.max), this.updateBounds(n, c, h, f);
755
- },
756
- bumpVerticalPos: function(t) {
757
- this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
758
- },
759
- getVerticalPos: function() {
760
- return this.verticalPos;
761
- },
762
- getBounds: function() {
763
- return this.data;
764
- }
765
- }, W = j.sectionFills, st = j.sectionColours, Ot = function(t, e, i) {
766
- const l = I().journey;
767
- let n = "";
768
- const h = l.height * 2 + l.diagramMarginY, c = i + h;
769
- let f = 0, y = "#CCC", m = "black", g = 0;
770
- for (const [p, s] of e.entries()) {
771
- if (n !== s.section) {
772
- y = W[f % W.length], g = f % W.length, m = st[f % st.length];
773
- let a = 0;
774
- const u = s.section;
775
- for (let o = p; o < e.length && e[o].section == u; o++)
776
- a = a + 1;
777
- const d = {
778
- x: p * l.taskMargin + p * l.width + P,
779
- y: 50,
780
- text: s.section,
781
- fill: y,
782
- num: g,
783
- colour: m,
784
- taskCount: a
785
- };
786
- L.drawSection(t, d, l), n = s.section, f++;
787
- }
788
- const r = s.people.reduce((a, u) => (M[u] && (a[u] = M[u]), a), {});
789
- s.x = p * l.taskMargin + p * l.width + P, s.y = c, s.width = l.diagramMarginX, s.height = l.diagramMarginY, s.colour = m, s.fill = y, s.num = g, s.actors = r, L.drawTask(t, s, l), v.insert(s.x, s.y, s.x + s.width + l.taskMargin, 450);
790
- }
791
- }, nt = {
792
- setConf: zt,
793
- draw: qt
794
- }, Kt = {
795
- parser: wt,
796
- db: tt,
797
- renderer: nt,
798
- styles: Vt,
799
- init: (t) => {
800
- nt.setConf(t.journey), tt.clear();
801
- }
802
- };
803
- export {
804
- Kt as diagram
805
- };