@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,805 @@
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.DudnxBYL.js";
2
+ import { a as _t, g as it, f as bt, d as vt } from "./layers.DYhtNvuX.js";
3
+ import "./layers.HxXfnDxz.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.B3gbBlxh.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
+ };