@layers-app/editor 0.0.23 → 0.0.27

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 (223) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +6 -44
  3. package/dist/index.js +2 -2
  4. package/dist/{layers.CGX7Piy7.js → layers.-XqzPqyO.js} +1 -1
  5. package/dist/{layers.D_MU5WlI.js → layers.-pZJVtr2.js} +1 -1
  6. package/dist/{layers.DXTPaWjN.js → layers.3JS7Upj0.js} +1 -1
  7. package/dist/{layers.CQv0GMRl.js → layers.44ZDFWK7.js} +1 -1
  8. package/dist/{layers.BBwDvE6l.js → layers.4utgKYyK.js} +1820 -1814
  9. package/dist/{layers.Dyqg_e4P.js → layers.5Z-wFY6j.js} +1 -1
  10. package/dist/{layers.CcJ28sUd.js → layers.5xC3et_d.js} +1 -1
  11. package/dist/{layers.Bv0tGvGl.js → layers.6JCbFAj6.js} +1 -1
  12. package/dist/{layers.CClfR9Rs.js → layers.6h3bxK1a.js} +10346 -11483
  13. package/dist/{layers.BUSnd1Ro.js → layers.77-S3nTe.js} +1 -1
  14. package/dist/{layers.CDzPpnhN.js → layers.7M4UNyUU.js} +5 -5
  15. package/dist/{layers.za1sylgg.js → layers.9tX9hjoM.js} +758 -758
  16. package/dist/{layers.Lhl12ohc.js → layers.B-9i7OJs.js} +1 -1
  17. package/dist/{layers.Dklz2JqP.js → layers.B0aPUUi4.js} +1 -1
  18. package/dist/{layers.N4wL2Xyj.js → layers.B2ffo7VT.js} +85 -85
  19. package/dist/{layers.DdTLZZKb.js → layers.B4b_0r0_.js} +6 -6
  20. package/dist/{layers.Ckbp-T9r.js → layers.B5W9KS-1.js} +1 -1
  21. package/dist/{layers.Cl9Tl2nd.js → layers.B8VoPWTl.js} +1 -1
  22. package/dist/{layers.B9zrmkst.js → layers.B8xcwXZK.js} +1 -1
  23. package/dist/{layers.gaT5_-NN.js → layers.B8z2WMpW.js} +1 -1
  24. package/dist/{layers.DHbdkCCU.js → layers.B9r2ZtSh.js} +1 -1
  25. package/dist/{layers.-rS-aTo2.js → layers.BF9fE7C8.js} +1 -1
  26. package/dist/{layers.ClQj75nc.js → layers.BFUqtCtE.js} +1 -1
  27. package/dist/{layers.D1cZq8tq.js → layers.BHT7hu0K.js} +3 -3
  28. package/dist/{layers.B-6oGNjd.js → layers.BJvR0g9w.js} +1 -1
  29. package/dist/{layers.Blho0qwc.js → layers.BKes9zCG.js} +1 -1
  30. package/dist/{layers.D3Hkinja.js → layers.BM9aR6Wc.js} +1 -1
  31. package/dist/{layers.D2q8ZYi2.js → layers.BNClpYmo.js} +15 -15
  32. package/dist/{layers.BO3dqWyO.js → layers.BPRzsxsG.js} +1 -1
  33. package/dist/{layers.C6Rn8zoI.js → layers.BPUdwzAa.js} +1 -1
  34. package/dist/{layers.DwLw5o0M.js → layers.BPku3sr2.js} +1 -1
  35. package/dist/{layers.gzGcAwbO.js → layers.BQZvK7Ld.js} +3 -3
  36. package/dist/{layers.C0bumYdC.js → layers.BSE8QsGw.js} +1 -1
  37. package/dist/{layers.lLRqycMO.js → layers.BSd-2_I0.js} +1 -1
  38. package/dist/{layers.Dbuivk7d.js → layers.BTI5U3cj.js} +1 -1
  39. package/dist/{layers.BYVHkqLR.js → layers.BTSxIBNW.js} +1 -1
  40. package/dist/{layers.CBXpUMze.js → layers.BTczMT9O.js} +35 -35
  41. package/dist/{layers.BEE5yqs5.js → layers.BWjXKJlb.js} +1 -1
  42. package/dist/{layers.BIVmclKv.js → layers.BXQIrASO.js} +1 -1
  43. package/dist/{layers.B9NSFeaj.js → layers.BXf1B1fk.js} +1 -1
  44. package/dist/{layers.D7HvMBb6.js → layers.BYlHLDae.js} +1 -1
  45. package/dist/{layers.2ODaB2Pd.js → layers.BZ2OjyG_.js} +1 -1
  46. package/dist/{layers.B_Hf0SF-.js → layers.BZGMS_YL.js} +517 -517
  47. package/dist/{layers.Ym7pRGM7.js → layers.B_Ifrq8A.js} +3 -3
  48. package/dist/{layers.DElpVOY-.js → layers.B_bguWvG.js} +1 -1
  49. package/dist/{layers.B39TZ2WV.js → layers.BaDLTNuw.js} +1 -1
  50. package/dist/{layers.B3odqoHb.js → layers.BbNPJK3G.js} +1 -1
  51. package/dist/{layers.BFLg4UGe.js → layers.BbX2Gt06.js} +1 -1
  52. package/dist/{layers.DCvUAfE1.js → layers.BcC4jCYQ.js} +1 -1
  53. package/dist/{layers.B64g6Zx2.js → layers.BcND7kmj.js} +1 -1
  54. package/dist/{layers.L_XjkGw6.js → layers.BcsSvL4N.js} +16 -16
  55. package/dist/layers.Bdma-bi1.js +1 -0
  56. package/dist/{layers.CPV5PaJ7.js → layers.BgH53BCx.js} +1 -1
  57. package/dist/{layers.C5rttXXy.js → layers.Bg_eB6d4.js} +4 -4
  58. package/dist/{layers.CvJxfPxo.js → layers.BhbIzB4V.js} +1 -1
  59. package/dist/{layers.k2UyvrHI.js → layers.BiFjyQe_.js} +1 -1
  60. package/dist/{layers.D9A031XO.js → layers.Bk2R9iWo.js} +2 -2
  61. package/dist/{layers.CTmkjIN6.js → layers.Bo8XWCDb.js} +1 -1
  62. package/dist/{layers.hkFN-BS0.js → layers.BoOJNRFl.js} +1 -1
  63. package/dist/{layers.CR10RAJi.js → layers.Bpk4Ctcr.js} +2 -2
  64. package/dist/{layers.UbqG2dp_.js → layers.BrNJ0Pz_.js} +1 -1
  65. package/dist/{layers.BUkDq4ln.js → layers.Brul_6T5.js} +1 -1
  66. package/dist/{layers.LOjND5R4.js → layers.Bsu1AT8z.js} +2 -2
  67. package/dist/{layers.CmHSmrZm.js → layers.BthCFGNg.js} +1 -1
  68. package/dist/{layers.CHHqQlm1.js → layers.Bti2UxbF.js} +1 -1
  69. package/dist/{layers.CMS1o_sE.js → layers.BuhxW9HQ.js} +1 -1
  70. package/dist/{layers.C3K_Whht.js → layers.BwnZ1xpT.js} +1 -1
  71. package/dist/{layers.C1KhBpGU.js → layers.C-B2iYxw.js} +1 -1
  72. package/dist/{layers.DMvWe0pJ.js → layers.C-PLaaW1.js} +2 -2
  73. package/dist/{layers.Bbl6qitU.js → layers.C1I8OftT.js} +1 -1
  74. package/dist/{layers.Cn6OfRlw.js → layers.C2Tygpbi.js} +1 -1
  75. package/dist/{layers.B8i9d7Qz.js → layers.C4DqDLg-.js} +38 -32
  76. package/dist/{layers.DrtkQKK7.js → layers.C5aZwGJ8.js} +1 -1
  77. package/dist/{layers.oFAtdeQ1.js → layers.C5htK5yR.js} +3 -3
  78. package/dist/{layers.D90-hSDT.js → layers.C6CCN2wS.js} +2 -2
  79. package/dist/{layers.CH23k4XD.js → layers.C76T9ib9.js} +1 -1
  80. package/dist/{layers.OEP2K3db.js → layers.C8KErGD4.js} +1 -1
  81. package/dist/{layers.BCFHxkpM.js → layers.C9-yhnQ_.js} +1 -1
  82. package/dist/{layers.Dol0x5Jd.js → layers.CA01MCW7.js} +1 -1
  83. package/dist/{layers.Ba97nTEK.js → layers.CBAr-ccc.js} +1 -1
  84. package/dist/{layers.BST6tR9a.js → layers.CBHnRD32.js} +1 -1
  85. package/dist/{layers.BDxQSquK.js → layers.CHRstlUi.js} +1 -1
  86. package/dist/{layers.DQCPMqIN.js → layers.CHyEShQb.js} +1 -1
  87. package/dist/layers.CHzF8aN-.js +118 -0
  88. package/dist/{layers.Y41CVpLS.js → layers.CL0btCq5.js} +33 -33
  89. package/dist/layers.CLPJWTr_.js +1 -0
  90. package/dist/{layers.DKPzrygv.js → layers.CNohXvTM.js} +1 -1
  91. package/dist/{layers.HcI9cOEd.js → layers.COVT50CF.js} +47 -47
  92. package/dist/{layers.B6UkAKu5.js → layers.CP74FqYL.js} +78 -78
  93. package/dist/{layers.CnD3z0eZ.js → layers.CPIGYQzV.js} +1 -1
  94. package/dist/{layers.DIrkcLlA.js → layers.CVJ3dtpa.js} +63 -63
  95. package/dist/{layers.CEXVJbhn.js → layers.CVJGf_dS.js} +1 -1
  96. package/dist/{layers.BZcZF6Ct.js → layers.CXyre7fi.js} +1 -1
  97. package/dist/{layers.CDLdte-o.js → layers.CYAKjsCY.js} +1 -1
  98. package/dist/{layers.BPnpanwd.js → layers.CZuNERKr.js} +1 -1
  99. package/dist/{layers.ClaqpFnu.js → layers.C_0V8gfT.js} +2 -2
  100. package/dist/layers.C_LpHycI.js +122 -0
  101. package/dist/{layers.C_dOgKfE.js → layers.CcUrvj1L.js} +1 -1
  102. package/dist/{layers.BD5uUnI2.js → layers.CewW7kYw.js} +279 -279
  103. package/dist/{layers.CnloMtKN.js → layers.CgEWPiYB.js} +14 -14
  104. package/dist/{layers.C-G7-Jg3.js → layers.Ch4JHkKx.js} +1 -1
  105. package/dist/{layers.CSjWzlk9.js → layers.Cj303CSV.js} +1 -1
  106. package/dist/{layers.Dg8Wbn90.js → layers.Cju8Sa_Q.js} +1 -1
  107. package/dist/{layers.DxGDxkXA.js → layers.Cjxt8nIg.js} +47 -47
  108. package/dist/{layers.D2vOkfMK.js → layers.Cllpx3ld.js} +1 -1
  109. package/dist/{layers.DDRgaMwu.js → layers.Cpo4EON4.js} +1 -1
  110. package/dist/layers.CrLpnenG.js +1 -0
  111. package/dist/{layers.BXGiOI1Z.js → layers.CruBr5KJ.js} +1 -1
  112. package/dist/{layers.FstVqdQC.js → layers.Cs3lCndw.js} +151 -151
  113. package/dist/{layers.Bfd5bOAD.js → layers.Csx06TKa.js} +1 -1
  114. package/dist/{layers.Cx14IKzN.js → layers.CtNxT4bX.js} +1 -1
  115. package/dist/{layers.BDhuxbhX.js → layers.Ctkab7zE.js} +1 -1
  116. package/dist/{layers.DARK07JA.js → layers.CtyUp91J.js} +1 -1
  117. package/dist/{layers.BjZInKjA.js → layers.CwbKR3tp.js} +2 -2
  118. package/dist/{layers.gRKbOYG-.js → layers.CxEkiqDR.js} +26 -26
  119. package/dist/{layers.DGZUGztZ.js → layers.D-pR7pmV.js} +29 -29
  120. package/dist/{layers.ChykDTOy.js → layers.D0tiOhqA.js} +1 -1
  121. package/dist/{layers.CGc04km7.js → layers.D3LfwBOp.js} +1 -1
  122. package/dist/{layers.cp645rbn.js → layers.D3Mywbyx.js} +1 -1
  123. package/dist/{layers.I5-pSyca.js → layers.D4qPD37W.js} +1 -1
  124. package/dist/{layers.BhM2iCwB.js → layers.D5_CFDU_.js} +1 -1
  125. package/dist/{layers.DhiFm4jW.js → layers.D63Vq18T.js} +1 -1
  126. package/dist/{layers.BdanmQPF.js → layers.D6IcbDJa.js} +1 -1
  127. package/dist/{layers.B0pdr1hX.js → layers.D6_cQf9O.js} +33 -33
  128. package/dist/{layers.kthR742N.js → layers.D6a6qxmr.js} +1 -1
  129. package/dist/layers.D7xAhxaO.js +6 -0
  130. package/dist/{layers.BuQ1nJmP.js → layers.D8qe0Siv.js} +1 -1
  131. package/dist/{layers.PO65UmTA.js → layers.DAUJf380.js} +1 -1
  132. package/dist/{layers.Bwpn7zKE.js → layers.DBBjhYox.js} +1 -1
  133. package/dist/{layers.5BbX0Xoz.js → layers.DBZ4nt4A.js} +57 -57
  134. package/dist/{layers.BJMMuP5r.js → layers.DBb6ZTQb.js} +1 -1
  135. package/dist/{layers.B0EkntbT.js → layers.DCZZx-_I.js} +1 -1
  136. package/dist/{layers.CphCG076.js → layers.DCpKUlgF.js} +1 -1
  137. package/dist/{layers.rRMBW9ET.js → layers.DDkR5Ts6.js} +251 -251
  138. package/dist/{layers.BPe9NQzP.js → layers.DEcSY6CT.js} +1 -1
  139. package/dist/{layers.DYx3Ot6h.js → layers.DFHjT2lH.js} +1 -1
  140. package/dist/{layers.DXaSAlDN.js → layers.DGECi3uy.js} +1 -1
  141. package/dist/{layers.PhLwHKUM.js → layers.DHeN0kJF.js} +1 -1
  142. package/dist/{layers.C5uR7AiN.js → layers.DIHGOC7q.js} +1 -1
  143. package/dist/{layers.ChPHYv68.js → layers.DIisKDqA.js} +1 -1
  144. package/dist/{layers.tbRLuldN.js → layers.DKAO_t2e.js} +1 -1
  145. package/dist/layers.DKDhSm3W.js +1 -0
  146. package/dist/{layers.CwPFdFUT.js → layers.DL7GcZkM.js} +1 -1
  147. package/dist/{layers.I-MG0ir4.js → layers.DLBoqOPY.js} +7051 -7014
  148. package/dist/{layers.iw01AOuQ.js → layers.DMKRtGOO.js} +96 -96
  149. package/dist/{layers.BLB-feoT.js → layers.DOxdGhXS.js} +1 -1
  150. package/dist/{layers.DeB3waPT.js → layers.DQ2Xcr60.js} +1 -1
  151. package/dist/layers.DRJbljY3.js +2 -0
  152. package/dist/{layers.Bk2PdkMX.js → layers.DSv_J9bL.js} +1 -1
  153. package/dist/{layers.DAx0hT2g.js → layers.DUrMIw9R.js} +1 -1
  154. package/dist/{layers.fTcEk1do.js → layers.DUt_7Rf9.js} +7 -7
  155. package/dist/{layers.D18RSmmQ.js → layers.DV-7KP2x.js} +1 -1
  156. package/dist/layers.DWAHzpeJ.js +65 -0
  157. package/dist/{layers.Ck0iJfoW.js → layers.D_Wzp8Cn.js} +1 -1
  158. package/dist/{layers.BFOl7cA-.js → layers.DakFhu3n.js} +1 -1
  159. package/dist/{layers.BBU3ik5q.js → layers.DdfiL5kD.js} +3 -3
  160. package/dist/{layers.DEfJs03Z.js → layers.DeDtDGVu.js} +1 -1
  161. package/dist/{layers.DalYdEkL.js → layers.DfaL2q8R.js} +4 -4
  162. package/dist/{layers.D68FZk66.js → layers.DfnEKrUj.js} +1 -1
  163. package/dist/{layers.BkMfeJ9R.js → layers.DixGTGe2.js} +1 -1
  164. package/dist/{layers.Dyor8Hot.js → layers.Dj9C8dFr.js} +28 -28
  165. package/dist/{layers.Ci0x4aAi.js → layers.DlsG5gru.js} +5 -5
  166. package/dist/{layers.DFd9A85i.js → layers.Dp-Xbgxy.js} +4 -4
  167. package/dist/{layers.BLSqqbWP.js → layers.DpFjxIHM.js} +4 -4
  168. package/dist/{layers.x6Qk2Mwl.js → layers.DrLqWw04.js} +1 -1
  169. package/dist/{layers.Dxrm0nEM.js → layers.DsT1BxXu.js} +140 -140
  170. package/dist/{layers.Ci0QS82_.js → layers.Dt7NdfDn.js} +1 -1
  171. package/dist/{layers.BoabOlrX.js → layers.Duxds2E7.js} +1 -1
  172. package/dist/{layers.DsAtBUs-.js → layers.DxXZMHl1.js} +5 -5
  173. package/dist/{layers.BvZFIFgz.js → layers.Dz0pDzZ2.js} +1 -1
  174. package/dist/{layers.Cp82yltX.js → layers.DzSwrBkm.js} +1 -1
  175. package/dist/{layers.DO-G3uLL.js → layers.DzXwulE9.js} +1 -1
  176. package/dist/layers.E0TqyNY6.js +202 -0
  177. package/dist/{layers.CiNAQOA-.js → layers.EdniTKSB.js} +2 -2
  178. package/dist/{layers.Bz0ApNUe.js → layers.IYUvfd4q.js} +14 -14
  179. package/dist/{layers.ChAMqLmE.js → layers.JIqu3EuS.js} +1 -1
  180. package/dist/{layers.CCRe_IA7.js → layers.JoXvoQtK.js} +1 -1
  181. package/dist/{layers.CeMe5scF.js → layers.LKsuEHeo.js} +1 -1
  182. package/dist/{layers.Cxmncz59.js → layers.LW-EdoNU.js} +1 -1
  183. package/dist/{layers.p9hSNB6N.js → layers.NLUe-Zd7.js} +1 -1
  184. package/dist/{layers.x6ioP3u0.js → layers.OG2GCG5d.js} +1 -1
  185. package/dist/layers.O_QfH9Tw.js +55 -0
  186. package/dist/{layers.B-ie1_cm.js → layers.Q61rVzjQ.js} +1 -1
  187. package/dist/{layers.ChJyurjQ.js → layers.QMSF2I3x.js} +1 -1
  188. package/dist/{layers.C51kZnWr.js → layers.RC04NTdF.js} +1 -1
  189. package/dist/{layers.D-ZYFolm.js → layers.X2Q_jYIN.js} +1 -1
  190. package/dist/{layers.CZh7NZyl.js → layers.Y9024OPf.js} +1 -1
  191. package/dist/{layers.-RxAm5pH.js → layers.Zcvgtj43.js} +47 -47
  192. package/dist/{layers.DK_t52oS.js → layers.dE10rGCq.js} +390 -390
  193. package/dist/{layers.c_QDfgff.js → layers.dJ7Y_uj4.js} +4 -4
  194. package/dist/layers.dbGRsALw.js +10 -0
  195. package/dist/{layers.kY3ZYtED.js → layers.gQj2seW8.js} +1 -1
  196. package/dist/{layers.BpXiFzvR.js → layers.gnhLHWor.js} +1 -1
  197. package/dist/{layers.CO4NHmK3.js → layers.iZHGKF34.js} +1 -1
  198. package/dist/{layers.CZMy0ug4.js → layers.k9xSs9fH.js} +1 -1
  199. package/dist/{layers.BBB7YGK1.js → layers.kuAa_osE.js} +1 -1
  200. package/dist/{layers.CR4riLSc.js → layers.nK8yMUfw.js} +639 -639
  201. package/dist/{layers.BHDiP2sq.js → layers.oeHNlcSJ.js} +1482 -1482
  202. package/dist/{layers.WsdOSV4y.js → layers.oyFM1DlU.js} +1 -1
  203. package/dist/{layers.DhzTwBn5.js → layers.sctyB8h-.js} +1 -1
  204. package/dist/{layers.Ch7C0MR9.js → layers.uim2_WMD.js} +1 -1
  205. package/dist/layers.wKm27PFc.js +8 -0
  206. package/dist/{layers.dqI-yLmM.js → layers.wQvpu0z-.js} +1 -1
  207. package/dist/{layers.paz6tc0L.js → layers.wpRKShXC.js} +1 -1
  208. package/dist/{layers.Dzc83sE7.js → layers.y6ChlfJ8.js} +1 -1
  209. package/dist/{layers.CqM3rL4-.js → layers.zOav7lS3.js} +1 -1
  210. package/package.json +1 -4
  211. package/dist/layers.BK01wvsE.js +0 -10
  212. package/dist/layers.BQLZhz6B.js +0 -6
  213. package/dist/layers.BUsBCyiL.js +0 -202
  214. package/dist/layers.BkjjkAwW.js +0 -2
  215. package/dist/layers.BwfB_nzW.js +0 -8
  216. package/dist/layers.CQXDzk5h.js +0 -1
  217. package/dist/layers.CeVpKhli.js +0 -122
  218. package/dist/layers.DTDpNGfk.js +0 -1
  219. package/dist/layers.Dk9dbz6F.js +0 -118
  220. package/dist/layers.DtoCH9Nn.js +0 -1
  221. package/dist/layers.DzaH7mDC.js +0 -65
  222. package/dist/layers.Tatx7z0m.js +0 -55
  223. package/dist/layers.h0tSRttU.js +0 -1
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./layers.ChAMqLmE.js"),t=require("./layers.CBXpUMze.js"),_=require("./layers.9QK1wiQj.js"),N=require("./layers.kY3ZYtED.js");require("./layers.B8i9d7Qz.js");require("lodash-es");require("./layers.COAF7f8g.js");const S=s=>t.common$1.sanitizeText(s,t.getConfig());let k={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const D=function(s,n,f,i){const e=Object.keys(s);t.log$1.info("keys:",e),t.log$1.info(s),e.forEach(function(r){var l,c;const o=s[r],d={shape:"rect",id:o.id,domId:o.domId,labelText:S(o.id),labelStyle:"",style:"fill: none; stroke: black",padding:((l=t.getConfig().flowchart)==null?void 0:l.padding)??((c=t.getConfig().class)==null?void 0:c.padding)};n.setNode(o.id,d),$(o.classes,n,f,i,o.id),t.log$1.info("setNode",d)})},$=function(s,n,f,i,e){const r=Object.keys(s);t.log$1.info("keys:",r),t.log$1.info(s),r.filter(l=>s[l].parent==e).forEach(function(l){var c,o;const a=s[l],d=a.cssClasses.join(" "),u=t.getStylesFromArray(a.styles),p=a.label??a.id,y=0,g={labelStyle:u.labelStyle,shape:"class_box",labelText:S(p),classData:a,rx:y,ry:y,class:d,style:u.style,id:a.id,domId:a.domId,tooltip:i.db.getTooltip(a.id,e)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:((c=t.getConfig().flowchart)==null?void 0:c.padding)??((o=t.getConfig().class)==null?void 0:o.padding)};n.setNode(a.id,g),e&&n.setParent(a.id,e),t.log$1.info("setNode",g)})},E=function(s,n,f,i){t.log$1.info(s),s.forEach(function(e,r){var l,c;const o=e,a="",d={labelStyle:"",style:""},u=o.text,p=0,b={labelStyle:d.labelStyle,shape:"note",labelText:S(u),noteData:o,rx:p,ry:p,class:a,style:d.style,id:o.id,domId:o.id,tooltip:"",type:"note",padding:((l=t.getConfig().flowchart)==null?void 0:l.padding)??((c=t.getConfig().class)==null?void 0:c.padding)};if(n.setNode(o.id,b),t.log$1.info("setNode",b),!o.class||!(o.class in i))return;const g=f+r,m={id:`edgeNote${g}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:t.interpolateToCurve(k.curve,t.curveLinear)};n.setEdge(o.id,o.class,m,g)})},A=function(s,n){const f=t.getConfig().flowchart;let i=0;s.forEach(function(e){var r;i++;const l={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:`id_${e.id1}_${e.id2}_${i}`,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:C(e.relation.type1),arrowTypeEnd:C(e.relation.type2),style:"fill:none",labelStyle:"",curve:t.interpolateToCurve(f==null?void 0:f.curve,t.curveLinear)};if(t.log$1.info(l,e),e.style!==void 0){const c=t.getStylesFromArray(e.style);l.style=c.style,l.labelStyle=c.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",((r=t.getConfig().flowchart)==null?void 0:r.htmlLabels)??t.getConfig().htmlLabels?(l.labelType="html",l.label='<span class="edgeLabel">'+e.text+"</span>"):(l.labelType="text",l.label=e.text.replace(t.common$1.lineBreakRegex,`
2
- `),e.style===void 0&&(l.style=l.style||"stroke: #333; stroke-width: 1.5px;fill:none"),l.labelStyle=l.labelStyle.replace("color:","fill:"))),n.setEdge(e.id1,e.id2,l,i)})},q=function(s){k={...k,...s}},M=async function(s,n,f,i){t.log$1.info("Drawing class - ",n);const e=t.getConfig().flowchart??t.getConfig().class,r=t.getConfig().securityLevel;t.log$1.info("config:",e);const l=(e==null?void 0:e.nodeSpacing)??50,c=(e==null?void 0:e.rankSpacing)??50,o=new _.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:l,ranksep:c,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=i.db.getNamespaces(),d=i.db.getClasses(),u=i.db.getRelations(),p=i.db.getNotes();t.log$1.info(u),D(a,o,n,i),$(d,o,n,i),A(u,o),E(p,o,u.length+1,d);let y;r==="sandbox"&&(y=t.select("#i"+n));const b=r==="sandbox"?t.select(y.nodes()[0].contentDocument.body):t.select("body"),g=b.select(`[id="${n}"]`),m=b.select("#"+n+" g");if(await N.render(m,o,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",n),t.utils.insertTitle(g,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,i.db.getDiagramTitle()),t.setupGraphViewbox$1(o,g,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const v=r==="sandbox"?y.nodes()[0].contentDocument:document,L=v.querySelectorAll('[id="'+n+'"] .edgeLabel .label');for(const w of L){const T=w.getBBox(),h=v.createElementNS("http://www.w3.org/2000/svg","rect");h.setAttribute("rx",0),h.setAttribute("ry",0),h.setAttribute("width",T.width),h.setAttribute("height",T.height),w.insertBefore(h,w.firstChild)}}};function C(s){let n;switch(s){case 0:n="aggregation";break;case 1:n="extension";break;case 2:n="composition";break;case 3:n="dependency";break;case 4:n="lollipop";break;default:n="none"}return n}const I={setConf:q,draw:M},R={parser:x.parser$1,db:x.db,renderer:I,styles:x.styles,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,x.db.clear()}};exports.diagram=R;
@@ -1,8 +0,0 @@
1
- import { C as e, Q as t, N as m, A as r } from "./layers.B0pdr1hX.js";
2
- import "./layers.I-MG0ir4.js";
3
- export {
4
- e as Commands,
5
- t as subsetToBase64,
6
- m as subsetToBinary,
7
- r as toBase64
8
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./layers.Ym7pRGM7.js");require("./layers.B8i9d7Qz.js");exports.Commands=e.CB;exports.subsetToBase64=e.QB;exports.subsetToBinary=e.NQ;exports.toBase64=e.AI;
@@ -1,122 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./layers.CBXpUMze.js"),et=require("./layers.DTDpNGfk.js"),Ht=require("./layers.B8i9d7Qz.js");var vt=function(){var t=function(ct,_,P,I){for(P=P||{},I=ct.length;I--;P[ct[I]]=_);return P},e=[1,2],o=[1,3],n=[1,4],i=[2,4],r=[1,9],c=[1,11],l=[1,13],p=[1,14],s=[1,16],m=[1,17],T=[1,18],f=[1,24],x=[1,25],w=[1,26],k=[1,27],A=[1,28],O=[1,29],v=[1,30],V=[1,31],R=[1,32],W=[1,33],q=[1,34],G=[1,35],Q=[1,36],z=[1,37],H=[1,38],Y=[1,39],F=[1,41],X=[1,42],K=[1,43],J=[1,44],$=[1,45],S=[1,46],y=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],L=[4,5,16,50,52,53],Z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],tt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],N=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],Bt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],ot=[68,69,70],it=[1,120],Pt={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,DOTTED_ARROW:74,SOLID_CROSS:75,DOTTED_CROSS:76,SOLID_POINT:77,DOTTED_POINT:78,TXT:79,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"DOTTED_ARROW",75:"SOLID_CROSS",76:"DOTTED_CROSS",77:"SOLID_POINT",78:"DOTTED_POINT",79:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:function(_,P,I,b,M,d,mt){var h=d.length-1;switch(M){case 3:return b.apply(d[h]),d[h];case 4:case 9:this.$=[];break;case 5:case 10:d[h-1].push(d[h]),this.$=d[h-1];break;case 6:case 7:case 11:case 12:this.$=d[h];break;case 8:case 13:this.$=[];break;case 15:d[h].type="createParticipant",this.$=d[h];break;case 16:d[h-1].unshift({type:"boxStart",boxData:b.parseBoxData(d[h-2])}),d[h-1].push({type:"boxEnd",boxText:d[h-2]}),this.$=d[h-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(d[h-2]),sequenceIndexStep:Number(d[h-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(d[h-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:d[h-1]};break;case 23:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:d[h-1]};break;case 29:b.setDiagramTitle(d[h].substring(6)),this.$=d[h].substring(6);break;case 30:b.setDiagramTitle(d[h].substring(7)),this.$=d[h].substring(7);break;case 31:this.$=d[h].trim(),b.setAccTitle(this.$);break;case 32:case 33:this.$=d[h].trim(),b.setAccDescription(this.$);break;case 34:d[h-1].unshift({type:"loopStart",loopText:b.parseMessage(d[h-2]),signalType:b.LINETYPE.LOOP_START}),d[h-1].push({type:"loopEnd",loopText:d[h-2],signalType:b.LINETYPE.LOOP_END}),this.$=d[h-1];break;case 35:d[h-1].unshift({type:"rectStart",color:b.parseMessage(d[h-2]),signalType:b.LINETYPE.RECT_START}),d[h-1].push({type:"rectEnd",color:b.parseMessage(d[h-2]),signalType:b.LINETYPE.RECT_END}),this.$=d[h-1];break;case 36:d[h-1].unshift({type:"optStart",optText:b.parseMessage(d[h-2]),signalType:b.LINETYPE.OPT_START}),d[h-1].push({type:"optEnd",optText:b.parseMessage(d[h-2]),signalType:b.LINETYPE.OPT_END}),this.$=d[h-1];break;case 37:d[h-1].unshift({type:"altStart",altText:b.parseMessage(d[h-2]),signalType:b.LINETYPE.ALT_START}),d[h-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=d[h-1];break;case 38:d[h-1].unshift({type:"parStart",parText:b.parseMessage(d[h-2]),signalType:b.LINETYPE.PAR_START}),d[h-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=d[h-1];break;case 39:d[h-1].unshift({type:"parStart",parText:b.parseMessage(d[h-2]),signalType:b.LINETYPE.PAR_OVER_START}),d[h-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=d[h-1];break;case 40:d[h-1].unshift({type:"criticalStart",criticalText:b.parseMessage(d[h-2]),signalType:b.LINETYPE.CRITICAL_START}),d[h-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=d[h-1];break;case 41:d[h-1].unshift({type:"breakStart",breakText:b.parseMessage(d[h-2]),signalType:b.LINETYPE.BREAK_START}),d[h-1].push({type:"breakEnd",optText:b.parseMessage(d[h-2]),signalType:b.LINETYPE.BREAK_END}),this.$=d[h-1];break;case 43:this.$=d[h-3].concat([{type:"option",optionText:b.parseMessage(d[h-1]),signalType:b.LINETYPE.CRITICAL_OPTION},d[h]]);break;case 45:this.$=d[h-3].concat([{type:"and",parText:b.parseMessage(d[h-1]),signalType:b.LINETYPE.PAR_AND},d[h]]);break;case 47:this.$=d[h-3].concat([{type:"else",altText:b.parseMessage(d[h-1]),signalType:b.LINETYPE.ALT_ELSE},d[h]]);break;case 48:d[h-3].draw="participant",d[h-3].type="addParticipant",d[h-3].description=b.parseMessage(d[h-1]),this.$=d[h-3];break;case 49:d[h-1].draw="participant",d[h-1].type="addParticipant",this.$=d[h-1];break;case 50:d[h-3].draw="actor",d[h-3].type="addParticipant",d[h-3].description=b.parseMessage(d[h-1]),this.$=d[h-3];break;case 51:d[h-1].draw="actor",d[h-1].type="addParticipant",this.$=d[h-1];break;case 52:d[h-1].type="destroyParticipant",this.$=d[h-1];break;case 53:this.$=[d[h-1],{type:"addNote",placement:d[h-2],actor:d[h-1].actor,text:d[h]}];break;case 54:d[h-2]=[].concat(d[h-1],d[h-1]).slice(0,2),d[h-2][0]=d[h-2][0].actor,d[h-2][1]=d[h-2][1].actor,this.$=[d[h-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:d[h-2].slice(0,2),text:d[h]}];break;case 55:this.$=[d[h-1],{type:"addLinks",actor:d[h-1].actor,text:d[h]}];break;case 56:this.$=[d[h-1],{type:"addALink",actor:d[h-1].actor,text:d[h]}];break;case 57:this.$=[d[h-1],{type:"addProperties",actor:d[h-1].actor,text:d[h]}];break;case 58:this.$=[d[h-1],{type:"addDetails",actor:d[h-1].actor,text:d[h]}];break;case 61:this.$=[d[h-2],d[h]];break;case 62:this.$=d[h];break;case 63:this.$=b.PLACEMENT.LEFTOF;break;case 64:this.$=b.PLACEMENT.RIGHTOF;break;case 65:this.$=[d[h-4],d[h-1],{type:"addMessage",from:d[h-4].actor,to:d[h-1].actor,signalType:d[h-3],msg:d[h],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:d[h-1]}];break;case 66:this.$=[d[h-4],d[h-1],{type:"addMessage",from:d[h-4].actor,to:d[h-1].actor,signalType:d[h-3],msg:d[h]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:d[h-4]}];break;case 67:this.$=[d[h-3],d[h-1],{type:"addMessage",from:d[h-3].actor,to:d[h-1].actor,signalType:d[h-2],msg:d[h]}];break;case 68:this.$={type:"addParticipant",actor:d[h]};break;case 69:this.$=b.LINETYPE.SOLID_OPEN;break;case 70:this.$=b.LINETYPE.DOTTED_OPEN;break;case 71:this.$=b.LINETYPE.SOLID;break;case 72:this.$=b.LINETYPE.DOTTED;break;case 73:this.$=b.LINETYPE.SOLID_CROSS;break;case 74:this.$=b.LINETYPE.DOTTED_CROSS;break;case 75:this.$=b.LINETYPE.SOLID_POINT;break;case 76:this.$=b.LINETYPE.DOTTED_POINT;break;case 77:this.$=b.parseMessage(d[h].trim().substring(1));break}},table:[{3:1,4:e,5:o,6:n},{1:[3]},{3:5,4:e,5:o,6:n},{3:6,4:e,5:o,6:n},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:r,5:c,8:8,9:10,12:12,13:l,14:p,17:15,18:s,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:x,31:w,33:k,35:A,36:O,37:v,38:V,39:R,41:W,43:q,44:G,46:Q,50:z,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:S},t(y,[2,5]),{9:47,12:12,13:l,14:p,17:15,18:s,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:x,31:w,33:k,35:A,36:O,37:v,38:V,39:R,41:W,43:q,44:G,46:Q,50:z,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:S},t(y,[2,7]),t(y,[2,8]),t(y,[2,14]),{12:48,50:z,52:H,53:Y},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:S},{22:55,70:S},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(y,[2,29]),t(y,[2,30]),{32:[1,61]},{34:[1,62]},t(y,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:S},{22:72,70:S},{22:73,70:S},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82]},{55:83,57:[1,84],65:[1,85],66:[1,86]},{22:87,70:S},{22:88,70:S},{22:89,70:S},{22:90,70:S},t([5,51,64,71,72,73,74,75,76,77,78,79],[2,68]),t(y,[2,6]),t(y,[2,15]),t(L,[2,9],{10:91}),t(y,[2,17]),{5:[1,93],19:[1,92]},{5:[1,94]},t(y,[2,21]),{5:[1,95]},{5:[1,96]},t(y,[2,24]),t(y,[2,25]),t(y,[2,26]),t(y,[2,27]),t(y,[2,28]),t(y,[2,31]),t(y,[2,32]),t(Z,i,{7:97}),t(Z,i,{7:98}),t(Z,i,{7:99}),t(tt,i,{40:100,7:101}),t(N,i,{42:102,7:103}),t(N,i,{7:103,42:104}),t(Bt,i,{45:105,7:106}),t(Z,i,{7:107}),{5:[1,109],51:[1,108]},{5:[1,111],51:[1,110]},{5:[1,112]},{22:115,68:[1,113],69:[1,114],70:S},t(ot,[2,69]),t(ot,[2,70]),t(ot,[2,71]),t(ot,[2,72]),t(ot,[2,73]),t(ot,[2,74]),t(ot,[2,75]),t(ot,[2,76]),{22:116,70:S},{22:118,58:117,70:S},{70:[2,63]},{70:[2,64]},{56:119,79:it},{56:121,79:it},{56:122,79:it},{56:123,79:it},{4:[1,126],5:[1,128],11:125,12:127,16:[1,124],50:z,52:H,53:Y},{5:[1,129]},t(y,[2,19]),t(y,[2,20]),t(y,[2,22]),t(y,[2,23]),{4:r,5:c,8:8,9:10,12:12,13:l,14:p,16:[1,130],17:15,18:s,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:x,31:w,33:k,35:A,36:O,37:v,38:V,39:R,41:W,43:q,44:G,46:Q,50:z,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:S},{4:r,5:c,8:8,9:10,12:12,13:l,14:p,16:[1,131],17:15,18:s,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:x,31:w,33:k,35:A,36:O,37:v,38:V,39:R,41:W,43:q,44:G,46:Q,50:z,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:S},{4:r,5:c,8:8,9:10,12:12,13:l,14:p,16:[1,132],17:15,18:s,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:x,31:w,33:k,35:A,36:O,37:v,38:V,39:R,41:W,43:q,44:G,46:Q,50:z,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:S},{16:[1,133]},{4:r,5:c,8:8,9:10,12:12,13:l,14:p,16:[2,46],17:15,18:s,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:x,31:w,33:k,35:A,36:O,37:v,38:V,39:R,41:W,43:q,44:G,46:Q,49:[1,134],50:z,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:S},{16:[1,135]},{4:r,5:c,8:8,9:10,12:12,13:l,14:p,16:[2,44],17:15,18:s,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:x,31:w,33:k,35:A,36:O,37:v,38:V,39:R,41:W,43:q,44:G,46:Q,48:[1,136],50:z,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:S},{16:[1,137]},{16:[1,138]},{4:r,5:c,8:8,9:10,12:12,13:l,14:p,16:[2,42],17:15,18:s,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:x,31:w,33:k,35:A,36:O,37:v,38:V,39:R,41:W,43:q,44:G,46:Q,47:[1,139],50:z,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:S},{4:r,5:c,8:8,9:10,12:12,13:l,14:p,16:[1,140],17:15,18:s,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:x,31:w,33:k,35:A,36:O,37:v,38:V,39:R,41:W,43:q,44:G,46:Q,50:z,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:S},{15:[1,141]},t(y,[2,49]),{15:[1,142]},t(y,[2,51]),t(y,[2,52]),{22:143,70:S},{22:144,70:S},{56:145,79:it},{56:146,79:it},{56:147,79:it},{64:[1,148],79:[2,62]},{5:[2,55]},{5:[2,77]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(y,[2,16]),t(L,[2,10]),{12:149,50:z,52:H,53:Y},t(L,[2,12]),t(L,[2,13]),t(y,[2,18]),t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),{15:[1,150]},t(y,[2,38]),{15:[1,151]},t(y,[2,39]),t(y,[2,40]),{15:[1,152]},t(y,[2,41]),{5:[1,153]},{5:[1,154]},{56:155,79:it},{56:156,79:it},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:157,70:S},t(L,[2,11]),t(tt,i,{7:101,40:158}),t(N,i,{7:103,42:159}),t(Bt,i,{7:106,45:160}),t(y,[2,48]),t(y,[2,50]),{5:[2,65]},{5:[2,66]},{79:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],85:[2,63],86:[2,64],119:[2,55],120:[2,77],121:[2,56],122:[2,57],123:[2,58],145:[2,67],146:[2,53],147:[2,54],155:[2,65],156:[2,66],157:[2,61],158:[2,47],159:[2,45],160:[2,43]},parseError:function(_,P){if(P.recoverable)this.trace(_);else{var I=new Error(_);throw I.hash=P,I}},parse:function(_){var P=this,I=[0],b=[],M=[null],d=[],mt=this.table,h="",bt=0,Yt=0,ae=2,Ft=1,oe=d.slice.call(arguments,1),B=Object.create(this.lexer),lt={yy:{}};for(var It in this.yy)Object.prototype.hasOwnProperty.call(this.yy,It)&&(lt.yy[It]=this.yy[It]);B.setInput(_,lt.yy),lt.yy.lexer=B,lt.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var At=B.yylloc;d.push(At);var ce=B.options&&B.options.ranges;typeof lt.yy.parseError=="function"?this.parseError=lt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function le(){var at;return at=b.pop()||B.lex()||Ft,typeof at!="number"&&(at instanceof Array&&(b=at,at=b.pop()),at=P.symbols_[at]||at),at}for(var U,dt,j,Nt,ft={},Et,rt,Wt,wt;;){if(dt=I[I.length-1],this.defaultActions[dt]?j=this.defaultActions[dt]:((U===null||typeof U>"u")&&(U=le()),j=mt[dt]&&mt[dt][U]),typeof j>"u"||!j.length||!j[0]){var St="";wt=[];for(Et in mt[dt])this.terminals_[Et]&&Et>ae&&wt.push("'"+this.terminals_[Et]+"'");B.showPosition?St="Parse error on line "+(bt+1)+`:
2
- `+B.showPosition()+`
3
- Expecting `+wt.join(", ")+", got '"+(this.terminals_[U]||U)+"'":St="Parse error on line "+(bt+1)+": Unexpected "+(U==Ft?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(St,{text:B.match,token:this.terminals_[U]||U,line:B.yylineno,loc:At,expected:wt})}if(j[0]instanceof Array&&j.length>1)throw new Error("Parse Error: multiple actions possible at state: "+dt+", token: "+U);switch(j[0]){case 1:I.push(U),M.push(B.yytext),d.push(B.yylloc),I.push(j[1]),U=null,Yt=B.yyleng,h=B.yytext,bt=B.yylineno,At=B.yylloc;break;case 2:if(rt=this.productions_[j[1]][1],ft.$=M[M.length-rt],ft._$={first_line:d[d.length-(rt||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(rt||1)].first_column,last_column:d[d.length-1].last_column},ce&&(ft._$.range=[d[d.length-(rt||1)].range[0],d[d.length-1].range[1]]),Nt=this.performAction.apply(ft,[h,Yt,bt,lt.yy,j[1],M,d].concat(oe)),typeof Nt<"u")return Nt;rt&&(I=I.slice(0,-1*rt*2),M=M.slice(0,-1*rt),d=d.slice(0,-1*rt)),I.push(this.productions_[j[1]][0]),M.push(ft.$),d.push(ft._$),Wt=mt[I[I.length-2]][I[I.length-1]],I.push(Wt);break;case 3:return!0}}return!0}},re=function(){var ct={EOF:1,parseError:function(P,I){if(this.yy.parser)this.yy.parser.parseError(P,I);else throw new Error(P)},setInput:function(_,P){return this.yy=P||this.yy||{},this._input=_,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var P=_.match(/(?:\r\n?|\n).*/g);return P?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_},unput:function(_){var P=_.length,I=_.split(/(?:\r\n?|\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-P),this.offset-=P;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),I.length-1&&(this.yylineno-=I.length-1);var M=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:I?(I.length===b.length?this.yylloc.first_column:0)+b[b.length-I.length].length-I[0].length:this.yylloc.first_column-P},this.options.ranges&&(this.yylloc.range=[M[0],M[0]+this.yyleng-P]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(_){this.unput(this.match.slice(_))},pastInput:function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var _=this.pastInput(),P=new Array(_.length+1).join("-");return _+this.upcomingInput()+`
5
- `+P+"^"},test_match:function(_,P){var I,b,M;if(this.options.backtrack_lexer&&(M={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(M.yylloc.range=this.yylloc.range.slice(0))),b=_[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+_[0].length},this.yytext+=_[0],this.match+=_[0],this.matches=_,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(_[0].length),this.matched+=_[0],I=this.performAction.call(this,this.yy,this,P,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),I)return I;if(this._backtrack){for(var d in M)this[d]=M[d];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var _,P,I,b;this._more||(this.yytext="",this.match="");for(var M=this._currentRules(),d=0;d<M.length;d++)if(I=this._input.match(this.rules[M[d]]),I&&(!P||I[0].length>P[0].length)){if(P=I,b=d,this.options.backtrack_lexer){if(_=this.test_match(I,M[d]),_!==!1)return _;if(this._backtrack){P=!1;continue}else return!1}else if(!this.options.flex)break}return P?(_=this.test_match(P,M[b]),_!==!1?_:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var P=this.next();return P||this.lex()},begin:function(P){this.conditionStack.push(P)},popState:function(){var P=this.conditionStack.length-1;return P>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(P){return P=this.conditionStack.length-1-Math.abs(P||0),P>=0?this.conditionStack[P]:"INITIAL"},pushState:function(P){this.begin(P)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(P,I,b,M){switch(b){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return I.yytext=I.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return I.yytext=I.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 71;case 56:return 72;case 57:return 75;case 58:return 76;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 68;case 63:return 69;case 64:return 5;case 65:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/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,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65],inclusive:!0}}};return ct}();Pt.lexer=re;function Lt(){this.yy={}}return Lt.prototype=Pt,Pt.Parser=Lt,new Lt}();vt.parser=vt;const de=vt;class he{constructor(e){this.init=e,this.records=this.init()}reset(){this.records=this.init()}}const E=new he(()=>({prevActor:void 0,actors:{},createdActors:{},destroyedActors:{},boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),ue=function(t){E.records.boxes.push({name:t.text,wrap:t.wrap===void 0&&ut()||!!t.wrap,fill:t.color,actorKeys:[]}),E.records.currentBox=E.records.boxes.slice(-1)[0]},Mt=function(t,e,o,n){let i=E.records.currentBox;const r=E.records.actors[t];if(r){if(E.records.currentBox&&r.box&&E.records.currentBox!==r.box)throw new Error("A same participant should only be defined in one Box: "+r.name+" can't be in '"+r.box.name+"' and in '"+E.records.currentBox.name+"' at the same time.");if(i=r.box?r.box:E.records.currentBox,r.box=i,r&&e===r.name&&o==null)return}(o==null||o.text==null)&&(o={text:e,wrap:null,type:n}),(n==null||o.text==null)&&(o={text:e,wrap:null,type:n}),E.records.actors[t]={box:i,name:e,description:o.text,wrap:o.wrap===void 0&&ut()||!!o.wrap,prevActor:E.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n||"participant"},E.records.prevActor&&E.records.actors[E.records.prevActor]&&(E.records.actors[E.records.prevActor].nextActor=t),E.records.currentBox&&E.records.currentBox.actorKeys.push(t),E.records.prevActor=t},pe=t=>{let e,o=0;for(e=0;e<E.records.messages.length;e++)E.records.messages[e].type===yt.ACTIVE_START&&E.records.messages[e].from.actor===t&&o++,E.records.messages[e].type===yt.ACTIVE_END&&E.records.messages[e].from.actor===t&&o--;return o},fe=function(t,e,o,n){E.records.messages.push({from:t,to:e,message:o.text,wrap:o.wrap===void 0&&ut()||!!o.wrap,answer:n})},C=function(t,e,o={text:void 0,wrap:void 0},n,i=!1){if(n===yt.ACTIVE_END&&pe(t.actor)<1){let c=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw c.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},c}return E.records.messages.push({from:t,to:e,message:o.text,wrap:o.wrap===void 0&&ut()||!!o.wrap,type:n,activate:i}),!0},ge=function(){return E.records.boxes.length>0},xe=function(){return E.records.boxes.some(t=>t.name)},me=function(){return E.records.messages},ye=function(){return E.records.boxes},Te=function(){return E.records.actors},be=function(){return E.records.createdActors},Ee=function(){return E.records.destroyedActors},Tt=function(t){return E.records.actors[t]},we=function(){return Object.keys(E.records.actors)},_e=function(){E.records.sequenceNumbersEnabled=!0},ke=function(){E.records.sequenceNumbersEnabled=!1},Pe=()=>E.records.sequenceNumbersEnabled,Le=function(t){E.records.wrapEnabled=t},ut=()=>E.records.wrapEnabled!==void 0?E.records.wrapEnabled:u.getConfig().sequence.wrap,Ie=function(){E.reset(),u.clear()},Ae=function(t){const e=t.trim(),o={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:e.match(/^:?wrap:/)!==null?!0:e.match(/^:?nowrap:/)!==null?!1:void 0};return u.log$1.debug("parseMessage:",o),o},Ne=function(t){const e=t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);let o=e!=null&&e[1]?e[1].trim():"transparent",n=e!=null&&e[2]?e[2].trim():void 0;if(window&&window.CSS)window.CSS.supports("color",o)||(o="transparent",n=t.trim());else{const i=new Option().style;i.color=o,i.color!==o&&(o="transparent",n=t.trim())}return{color:o,text:n!==void 0?u.sanitizeText$2(n.replace(/^:?(?:no)?wrap:/,""),u.getConfig()):void 0,wrap:n!==void 0?n.match(/^:?wrap:/)!==null?!0:n.match(/^:?nowrap:/)!==null?!1:void 0:void 0}},yt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32},Se={FILLED:0,OPEN:1},ve={LEFTOF:0,RIGHTOF:1,OVER:2},Kt=function(t,e,o){const n={actor:t,placement:e,message:o.text,wrap:o.wrap===void 0&&ut()||!!o.wrap},i=[].concat(t,t);E.records.notes.push(n),E.records.messages.push({from:i[0],to:i[1],message:o.text,wrap:o.wrap===void 0&&ut()||!!o.wrap,type:yt.NOTE,placement:e})},Ut=function(t,e){const o=Tt(t);try{let n=u.sanitizeText$2(e.text,u.getConfig());n=n.replace(/&amp;/g,"&"),n=n.replace(/&equals;/g,"=");const i=JSON.parse(n);Dt(o,i)}catch(n){u.log$1.error("error while parsing actor link text",n)}},Me=function(t,e){const o=Tt(t);try{const c={};let l=u.sanitizeText$2(e.text,u.getConfig());var n=l.indexOf("@");l=l.replace(/&amp;/g,"&"),l=l.replace(/&equals;/g,"=");var i=l.slice(0,n-1).trim(),r=l.slice(n+1).trim();c[i]=r,Dt(o,c)}catch(c){u.log$1.error("error while parsing actor link text",c)}};function Dt(t,e){if(t.links==null)t.links=e;else for(let o in e)t.links[o]=e[o]}const Gt=function(t,e){const o=Tt(t);try{let n=u.sanitizeText$2(e.text,u.getConfig());const i=JSON.parse(n);Xt(o,i)}catch(n){u.log$1.error("error while parsing actor properties text",n)}};function Xt(t,e){if(t.properties==null)t.properties=e;else for(let o in e)t.properties[o]=e[o]}function Re(){E.records.currentBox=void 0}const Jt=function(t,e){const o=Tt(t),n=document.getElementById(e.text);try{const i=n.innerHTML,r=JSON.parse(i);r.properties&&Xt(o,r.properties),r.links&&Dt(o,r.links)}catch(i){u.log$1.error("error while parsing actor details text",i)}},Ce=function(t,e){if(t!==void 0&&t.properties!==void 0)return t.properties[e]},Zt=function(t){if(Array.isArray(t))t.forEach(function(e){Zt(e)});else switch(t.type){case"sequenceIndex":E.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":Mt(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(E.records.actors[t.actor])throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");E.records.lastCreated=t.actor,Mt(t.actor,t.actor,t.description,t.draw),E.records.createdActors[t.actor]=E.records.messages.length;break;case"destroyParticipant":E.records.lastDestroyed=t.actor,E.records.destroyedActors[t.actor]=E.records.messages.length;break;case"activeStart":C(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":C(t.actor,void 0,void 0,t.signalType);break;case"addNote":Kt(t.actor,t.placement,t.text);break;case"addLinks":Ut(t.actor,t.text);break;case"addALink":Me(t.actor,t.text);break;case"addProperties":Gt(t.actor,t.text);break;case"addDetails":Jt(t.actor,t.text);break;case"addMessage":if(E.records.lastCreated){if(t.to!==E.records.lastCreated)throw new Error("The created participant "+E.records.lastCreated+" does not have an associated creating message after its declaration. Please check the sequence diagram.");E.records.lastCreated=void 0}else if(E.records.lastDestroyed){if(t.to!==E.records.lastDestroyed&&t.from!==E.records.lastDestroyed)throw new Error("The destroyed participant "+E.records.lastDestroyed+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");E.records.lastDestroyed=void 0}C(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":ue(t.boxData);break;case"boxEnd":Re();break;case"loopStart":C(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":C(void 0,void 0,void 0,t.signalType);break;case"rectStart":C(void 0,void 0,t.color,t.signalType);break;case"rectEnd":C(void 0,void 0,void 0,t.signalType);break;case"optStart":C(void 0,void 0,t.optText,t.signalType);break;case"optEnd":C(void 0,void 0,void 0,t.signalType);break;case"altStart":C(void 0,void 0,t.altText,t.signalType);break;case"else":C(void 0,void 0,t.altText,t.signalType);break;case"altEnd":C(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":u.setAccTitle(t.text);break;case"parStart":C(void 0,void 0,t.parText,t.signalType);break;case"and":C(void 0,void 0,t.parText,t.signalType);break;case"parEnd":C(void 0,void 0,void 0,t.signalType);break;case"criticalStart":C(void 0,void 0,t.criticalText,t.signalType);break;case"option":C(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":C(void 0,void 0,void 0,t.signalType);break;case"breakStart":C(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":C(void 0,void 0,void 0,t.signalType);break}},qt={addActor:Mt,addMessage:fe,addSignal:C,addLinks:Ut,addDetails:Jt,addProperties:Gt,autoWrap:ut,setWrap:Le,enableSequenceNumbers:_e,disableSequenceNumbers:ke,showSequenceNumbers:Pe,getMessages:me,getActors:Te,getCreatedActors:be,getDestroyedActors:Ee,getActor:Tt,getActorKeys:we,getActorProperty:Ce,getAccTitle:u.getAccTitle,getBoxes:ye,getDiagramTitle:u.getDiagramTitle,setDiagramTitle:u.setDiagramTitle,getConfig:()=>u.getConfig().sequence,clear:Ie,parseMessage:Ae,parseBoxData:Ne,LINETYPE:yt,ARROWTYPE:Se,PLACEMENT:ve,addNote:Kt,setAccTitle:u.setAccTitle,apply:Zt,setAccDescription:u.setAccDescription,getAccDescription:u.getAccDescription,hasAtLeastOneBox:ge,hasAtLeastOneBoxWithTitle:xe},De=t=>`.actor {
7
- stroke: ${t.actorBorder};
8
- fill: ${t.actorBkg};
9
- }
10
-
11
- text.actor > tspan {
12
- fill: ${t.actorTextColor};
13
- stroke: none;
14
- }
15
-
16
- .actor-line {
17
- stroke: ${t.actorLineColor};
18
- }
19
-
20
- .messageLine0 {
21
- stroke-width: 1.5;
22
- stroke-dasharray: none;
23
- stroke: ${t.signalColor};
24
- }
25
-
26
- .messageLine1 {
27
- stroke-width: 1.5;
28
- stroke-dasharray: 2, 2;
29
- stroke: ${t.signalColor};
30
- }
31
-
32
- #arrowhead path {
33
- fill: ${t.signalColor};
34
- stroke: ${t.signalColor};
35
- }
36
-
37
- .sequenceNumber {
38
- fill: ${t.sequenceNumberColor};
39
- }
40
-
41
- #sequencenumber {
42
- fill: ${t.signalColor};
43
- }
44
-
45
- #crosshead path {
46
- fill: ${t.signalColor};
47
- stroke: ${t.signalColor};
48
- }
49
-
50
- .messageText {
51
- fill: ${t.signalTextColor};
52
- stroke: none;
53
- }
54
-
55
- .labelBox {
56
- stroke: ${t.labelBoxBorderColor};
57
- fill: ${t.labelBoxBkgColor};
58
- }
59
-
60
- .labelText, .labelText > tspan {
61
- fill: ${t.labelTextColor};
62
- stroke: none;
63
- }
64
-
65
- .loopText, .loopText > tspan {
66
- fill: ${t.loopTextColor};
67
- stroke: none;
68
- }
69
-
70
- .loopLine {
71
- stroke-width: 2px;
72
- stroke-dasharray: 2, 2;
73
- stroke: ${t.labelBoxBorderColor};
74
- fill: ${t.labelBoxBorderColor};
75
- }
76
-
77
- .note {
78
- //stroke: #decc93;
79
- stroke: ${t.noteBorderColor};
80
- fill: ${t.noteBkgColor};
81
- }
82
-
83
- .noteText, .noteText > tspan {
84
- fill: ${t.noteTextColor};
85
- stroke: none;
86
- }
87
-
88
- .activation0 {
89
- fill: ${t.activationBkgColor};
90
- stroke: ${t.activationBorderColor};
91
- }
92
-
93
- .activation1 {
94
- fill: ${t.activationBkgColor};
95
- stroke: ${t.activationBorderColor};
96
- }
97
-
98
- .activation2 {
99
- fill: ${t.activationBkgColor};
100
- stroke: ${t.activationBorderColor};
101
- }
102
-
103
- .actorPopupMenu {
104
- position: absolute;
105
- }
106
-
107
- .actorPopupMenuPanel {
108
- position: absolute;
109
- fill: ${t.actorBkg};
110
- box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
111
- filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
112
- }
113
- .actor-man line {
114
- stroke: ${t.actorBorder};
115
- fill: ${t.actorBkg};
116
- }
117
- .actor-man circle, line {
118
- stroke: ${t.actorBorder};
119
- fill: ${t.actorBkg};
120
- stroke-width: 2px;
121
- }
122
- `,Oe=De,ht=18*2,Qt="actor-top",$t="actor-bottom",Ot=function(t,e){return et.drawRect(t,e)},Ve=function(t,e,o,n,i){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const r=e.links,c=e.actorCnt,l=e.rectData;var p="none";i&&(p="block !important");const s=t.append("g");s.attr("id","actor"+c+"_popup"),s.attr("class","actorPopupMenu"),s.attr("display",p);var m="";l.class!==void 0&&(m=" "+l.class);let T=l.width>o?l.width:o;const f=s.append("rect");if(f.attr("class","actorPopupMenuPanel"+m),f.attr("x",l.x),f.attr("y",l.height),f.attr("fill",l.fill),f.attr("stroke",l.stroke),f.attr("width",T),f.attr("height",l.height),f.attr("rx",l.rx),f.attr("ry",l.ry),r!=null){var x=20;for(let A in r){var w=s.append("a"),k=Ht.distExports.sanitizeUrl(r[A]);w.attr("xlink:href",k),w.attr("target","_blank"),t0(n)(A,w,l.x+10,l.height+x,T,20,{class:"actor"},n),x+=30}}return f.attr("height",x),{height:l.height+x,width:T}},Be=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},_t=async function(t,e,o=null){let n=t.append("foreignObject");const i=await u.renderKatex(e.text,u.getConfig$1()),c=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(c.height)).attr("width",Math.round(c.width)),e.class==="noteText"){const l=t.node().firstChild;l.setAttribute("height",c.height+2*e.textMargin);const p=l.getBBox();n.attr("x",Math.round(p.x+p.width/2-c.width/2)).attr("y",Math.round(p.y+p.height/2-c.height/2))}else if(o){let{startx:l,stopx:p,starty:s}=o;if(l>p){const m=l;l=p,p=m}n.attr("x",Math.round(l+Math.abs(l-p)/2-c.width/2)),e.class==="loopText"?n.attr("y",Math.round(s)):n.attr("y",Math.round(s-c.height))}return[n]},xt=function(t,e){let o=0,n=0;const i=e.text.split(u.common$1.lineBreakRegex),[r,c]=u.parseFontSize(e.fontSize);let l=[],p=0,s=()=>e.y;if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":s=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":s=()=>Math.round(e.y+(o+n+e.textMargin)/2);break;case"bottom":case"end":s=()=>Math.round(e.y+(o+n+2*e.textMargin)-e.textMargin);break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[m,T]of i.entries()){e.textMargin!==void 0&&e.textMargin===0&&r!==void 0&&(p=m*r);const f=t.append("text");f.attr("x",e.x),f.attr("y",s()),e.anchor!==void 0&&f.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&f.style("font-family",e.fontFamily),c!==void 0&&f.style("font-size",c),e.fontWeight!==void 0&&f.style("font-weight",e.fontWeight),e.fill!==void 0&&f.attr("fill",e.fill),e.class!==void 0&&f.attr("class",e.class),e.dy!==void 0?f.attr("dy",e.dy):p!==0&&f.attr("dy",p);const x=T||u.ZERO_WIDTH_SPACE;if(e.tspan){const w=f.append("tspan");w.attr("x",e.x),e.fill!==void 0&&w.attr("fill",e.fill),w.text(x)}else f.text(x);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(n+=(f._groups||f)[0][0].getBBox().height,o=n),l.push(f)}return l},jt=function(t,e){function o(i,r,c,l,p){return i+","+r+" "+(i+c)+","+r+" "+(i+c)+","+(r+l-p)+" "+(i+c-p*1.2)+","+(r+l)+" "+i+","+(r+l)}const n=t.append("polygon");return n.attr("points",o(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,xt(t,e),n};let st=-1;const te=(t,e,o,n)=>{t.select&&o.forEach(i=>{const r=e[i],c=t.select("#actor"+r.actorCnt);!n.mirrorActors&&r.stopy?c.attr("y2",r.stopy+r.height/2):n.mirrorActors&&c.attr("y2",r.stopy)})},Ye=async function(t,e,o,n){const i=n?e.stopy:e.starty,r=e.x+e.width/2,c=i+5,l=t.append("g").lower();var p=l;n||(st++,Object.keys(e.links||{}).length&&!o.forceMenus&&p.attr("onclick",Be(`actor${st}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+st).attr("x1",r).attr("y1",c).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),p=l.append("g"),e.actorCnt=st,e.links!=null&&p.attr("id","root-"+st));const s=et.getNoteRect();var m="actor";e.properties!=null&&e.properties.class?m=e.properties.class:s.fill="#eaeaea",n?m+=` ${$t}`:m+=` ${Qt}`,s.x=e.x,s.y=i,s.width=e.width,s.height=e.height,s.class=m,s.rx=3,s.ry=3,s.name=e.name;const T=Ot(p,s);if(e.rectData=s,e.properties!=null&&e.properties.icon){const x=e.properties.icon.trim();x.charAt(0)==="@"?et.drawEmbeddedImage(p,s.x+s.width-20,s.y+10,x.substr(1)):et.drawImage(p,s.x+s.width-20,s.y+10,x)}await Vt(o,u.hasKatex(e.description))(e.description,p,s.x,s.y,s.width,s.height,{class:"actor"},o);let f=e.height;if(T.node){const x=T.node().getBBox();e.height=x.height,f=x.height}return f},Fe=async function(t,e,o,n){const i=n?e.stopy:e.starty,r=e.x+e.width/2,c=i+80;t.lower(),n||(st++,t.append("line").attr("id","actor"+st).attr("x1",r).attr("y1",c).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),e.actorCnt=st);const l=t.append("g");let p="actor-man";n?p+=` ${$t}`:p+=` ${Qt}`,l.attr("class",p),l.attr("name",e.name);const s=et.getNoteRect();s.x=e.x,s.y=i,s.fill="#eaeaea",s.width=e.width,s.height=e.height,s.class="actor",s.rx=3,s.ry=3,l.append("line").attr("id","actor-man-torso"+st).attr("x1",r).attr("y1",i+25).attr("x2",r).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+st).attr("x1",r-ht/2).attr("y1",i+33).attr("x2",r+ht/2).attr("y2",i+33),l.append("line").attr("x1",r-ht/2).attr("y1",i+60).attr("x2",r).attr("y2",i+45),l.append("line").attr("x1",r).attr("y1",i+45).attr("x2",r+ht/2-2).attr("y2",i+60);const m=l.append("circle");m.attr("cx",e.x+e.width/2),m.attr("cy",i+10),m.attr("r",15),m.attr("width",e.width),m.attr("height",e.height);const T=l.node().getBBox();return e.height=T.height,await Vt(o,u.hasKatex(e.description))(e.description,l,s.x,s.y+35,s.width,s.height,{class:"actor"},o),e.height},We=async function(t,e,o,n){switch(e.type){case"actor":return await Fe(t,e,o,n);case"participant":return await Ye(t,e,o,n)}},qe=async function(t,e,o){const i=t.append("g");ee(i,e),e.name&&await Vt(o)(e.name,i,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},o),i.lower()},ze=function(t){return t.append("g")},He=function(t,e,o,n,i){const r=et.getNoteRect(),c=e.anchored;r.x=e.startx,r.y=e.starty,r.class="activation"+i%3,r.width=e.stopx-e.startx,r.height=o-e.starty,Ot(c,r)},Ke=async function(t,e,o,n){const{boxMargin:i,boxTextMargin:r,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:p,messageFontSize:s,messageFontWeight:m}=n,T=t.append("g"),f=function(k,A,O,v){return T.append("line").attr("x1",k).attr("y1",A).attr("x2",O).attr("y2",v).attr("class","loopLine")};f(e.startx,e.starty,e.stopx,e.starty),f(e.stopx,e.starty,e.stopx,e.stopy),f(e.startx,e.stopy,e.stopx,e.stopy),f(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(k){f(e.startx,k.y,e.stopx,k.y).style("stroke-dasharray","3, 3")});let x=et.getTextObj();x.text=o,x.x=e.startx,x.y=e.starty,x.fontFamily=p,x.fontSize=s,x.fontWeight=m,x.anchor="middle",x.valign="middle",x.tspan=!1,x.width=l||50,x.height=c||20,x.textMargin=r,x.class="labelText",jt(T,x),x=ne(),x.text=e.title,x.x=e.startx+l/2+(e.stopx-e.startx)/2,x.y=e.starty+i+r,x.anchor="middle",x.valign="middle",x.textMargin=r,x.class="loopText",x.fontFamily=p,x.fontSize=s,x.fontWeight=m,x.wrap=!0;let w=u.hasKatex(x.text)?await _t(T,x,e):xt(T,x);if(e.sectionTitles!==void 0){for(const[k,A]of Object.entries(e.sectionTitles))if(A.message){x.text=A.message,x.x=e.startx+(e.stopx-e.startx)/2,x.y=e.sections[k].y+i+r,x.class="loopText",x.anchor="middle",x.valign="middle",x.tspan=!1,x.fontFamily=p,x.fontSize=s,x.fontWeight=m,x.wrap=e.wrap,u.hasKatex(x.text)?(e.starty=e.sections[k].y,await _t(T,x,e)):xt(T,x);let O=Math.round(w.map(v=>(v._groups||v)[0][0].getBBox().height).reduce((v,V)=>v+V));e.sections[k].height+=O-(i+r)}}return e.height=Math.round(e.stopy-e.starty),T},ee=function(t,e){et.drawBackgroundRect(t,e)},Ue=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},Ge=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},Xe=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},Je=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},Ze=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},Qe=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},$e=function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},ne=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},je=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Vt=function(){function t(r,c,l,p,s,m,T){const f=c.append("text").attr("x",l+s/2).attr("y",p+m/2+5).style("text-anchor","middle").text(r);i(f,T)}function e(r,c,l,p,s,m,T,f){const{actorFontSize:x,actorFontFamily:w,actorFontWeight:k}=f,[A,O]=u.parseFontSize(x),v=r.split(u.common$1.lineBreakRegex);for(let V=0;V<v.length;V++){const R=V*A-A*(v.length-1)/2,W=c.append("text").attr("x",l+s/2).attr("y",p).style("text-anchor","middle").style("font-size",O).style("font-weight",k).style("font-family",w);W.append("tspan").attr("x",l+s/2).attr("dy",R).text(v[V]),W.attr("y",p+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(W,T)}}function o(r,c,l,p,s,m,T,f){const x=c.append("switch"),k=x.append("foreignObject").attr("x",l).attr("y",p).attr("width",s).attr("height",m).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");k.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(r),e(r,x,l,p,s,m,T,f),i(k,T)}async function n(r,c,l,p,s,m,T,f){const x=await u.calculateMathMLDimensions(r,u.getConfig$1()),w=c.append("switch"),A=w.append("foreignObject").attr("x",l+s/2-x.width/2).attr("y",p+m/2-x.height/2).attr("width",x.width).attr("height",x.height).append("xhtml:div").style("height","100%").style("width","100%");A.append("div").style("text-align","center").style("vertical-align","middle").html(await u.renderKatex(r,u.getConfig$1())),e(r,w,l,p,s,m,T,f),i(A,T)}function i(r,c){for(const l in c)c.hasOwnProperty(l)&&r.attr(l,c[l])}return function(r,c=!1){return c?n:r.textPlacement==="fo"?o:r.textPlacement==="old"?t:e}}(),t0=function(){function t(i,r,c,l,p,s,m){const T=r.append("text").attr("x",c).attr("y",l).style("text-anchor","start").text(i);n(T,m)}function e(i,r,c,l,p,s,m,T){const{actorFontSize:f,actorFontFamily:x,actorFontWeight:w}=T,k=i.split(u.common$1.lineBreakRegex);for(let A=0;A<k.length;A++){const O=A*f-f*(k.length-1)/2,v=r.append("text").attr("x",c).attr("y",l).style("text-anchor","start").style("font-size",f).style("font-weight",w).style("font-family",x);v.append("tspan").attr("x",c).attr("dy",O).text(k[A]),v.attr("y",l+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(v,m)}}function o(i,r,c,l,p,s,m,T){const f=r.append("switch"),w=f.append("foreignObject").attr("x",c).attr("y",l).attr("width",p).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");w.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,f,c,l,p,s,m,T),n(w,m)}function n(i,r){for(const c in r)r.hasOwnProperty(c)&&i.attr(c,r[c])}return function(i){return i.textPlacement==="fo"?o:i.textPlacement==="old"?t:e}}(),D={drawRect:Ot,drawText:xt,drawLabel:jt,drawActor:We,drawBox:qe,drawPopup:Ve,anchorElement:ze,drawActivation:He,drawLoop:Ke,drawBackgroundRect:ee,insertArrowHead:Je,insertArrowFilledHead:Ze,insertSequenceNumber:Qe,insertArrowCrossHead:$e,insertDatabaseIcon:Ue,insertComputerIcon:Ge,insertClockIcon:Xe,getTextObj:ne,getNoteRect:je,fixLifeLineHeights:te,sanitizeUrl:Ht.distExports.sanitizeUrl};let a={};const g={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(t=>t.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(t){this.boxes.push(t)},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,ie(u.getConfig())},updateVal:function(t,e,o,n){t[e]===void 0?t[e]=o:t[e]=n(o,t[e])},updateBounds:function(t,e,o,n){const i=this;let r=0;function c(l){return function(s){r++;const m=i.sequenceItems.length-r+1;i.updateVal(s,"starty",e-m*a.boxMargin,Math.min),i.updateVal(s,"stopy",n+m*a.boxMargin,Math.max),i.updateVal(g.data,"startx",t-m*a.boxMargin,Math.min),i.updateVal(g.data,"stopx",o+m*a.boxMargin,Math.max),l!=="activation"&&(i.updateVal(s,"startx",t-m*a.boxMargin,Math.min),i.updateVal(s,"stopx",o+m*a.boxMargin,Math.max),i.updateVal(g.data,"starty",e-m*a.boxMargin,Math.min),i.updateVal(g.data,"stopy",n+m*a.boxMargin,Math.max))}}this.sequenceItems.forEach(c()),this.activations.forEach(c("activation"))},insert:function(t,e,o,n){const i=u.common$1.getMin(t,o),r=u.common$1.getMax(t,o),c=u.common$1.getMin(e,n),l=u.common$1.getMax(e,n);this.updateVal(g.data,"startx",i,Math.min),this.updateVal(g.data,"starty",c,Math.min),this.updateVal(g.data,"stopx",r,Math.max),this.updateVal(g.data,"stopy",l,Math.max),this.updateBounds(i,c,r,l)},newActivation:function(t,e,o){const n=o[t.from.actor],i=kt(t.from.actor).length||0,r=n.x+n.width/2+(i-1)*a.activationWidth/2;this.activations.push({startx:r,starty:this.verticalPos+2,stopx:r+a.activationWidth,stopy:void 0,actor:t.from.actor,anchored:D.anchorElement(e)})},endActivation:function(t){const e=this.activations.map(function(o){return o.actor}).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},isLoopOverlap:function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:g.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},saveVerticalPos:function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},resetVerticalPos:function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=u.common$1.getMax(this.data.stopy,this.verticalPos)},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},e0=async function(t,e){g.bumpVerticalPos(a.boxMargin),e.height=a.boxMargin,e.starty=g.getVerticalPos();const o=et.getNoteRect();o.x=e.startx,o.y=e.starty,o.width=e.width||a.width,o.class="note";const n=t.append("g"),i=D.drawRect(n,o),r=et.getTextObj();r.x=e.startx,r.y=e.starty,r.width=o.width,r.dy="1em",r.text=e.message,r.class="noteText",r.fontFamily=a.noteFontFamily,r.fontSize=a.noteFontSize,r.fontWeight=a.noteFontWeight,r.anchor=a.noteAlign,r.textMargin=a.noteMargin,r.valign="center";const c=u.hasKatex(r.text)?await _t(n,r):xt(n,r),l=Math.round(c.map(p=>(p._groups||p)[0][0].getBBox().height).reduce((p,s)=>p+s));i.attr("height",l+2*a.noteMargin),e.height+=l+2*a.noteMargin,g.bumpVerticalPos(l+2*a.noteMargin),e.stopy=e.starty+l+2*a.noteMargin,e.stopx=e.startx+o.width,g.insert(e.startx,e.starty,e.stopx,e.stopy),g.models.addNote(e)},pt=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),gt=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),Rt=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});async function n0(t,e){g.bumpVerticalPos(10);const{startx:o,stopx:n,message:i}=e,r=u.common$1.splitBreaks(i).length,c=u.hasKatex(i),l=c?await u.calculateMathMLDimensions(i,u.getConfig()):u.utils.calculateTextDimensions(i,pt(a));if(!c){const T=l.height/r;e.height+=T,g.bumpVerticalPos(T)}let p,s=l.height-10;const m=l.width;if(o===n){p=g.getVerticalPos()+s,a.rightAngles||(s+=a.boxMargin,p=g.getVerticalPos()+s),s+=30;const T=u.common$1.getMax(m/2,a.width/2);g.insert(o-T,g.getVerticalPos()-10+s,n+T,g.getVerticalPos()+30+s)}else s+=a.boxMargin,p=g.getVerticalPos()+s,g.insert(o,p-10,n,p);return g.bumpVerticalPos(s),e.height+=s,e.stopy=e.starty+e.height,g.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),p}const s0=async function(t,e,o,n){const{startx:i,stopx:r,starty:c,message:l,type:p,sequenceIndex:s,sequenceVisible:m}=e,T=u.utils.calculateTextDimensions(l,pt(a)),f=et.getTextObj();f.x=i,f.y=c+10,f.width=r-i,f.class="messageText",f.dy="1em",f.text=l,f.fontFamily=a.messageFontFamily,f.fontSize=a.messageFontSize,f.fontWeight=a.messageFontWeight,f.anchor=a.messageAlign,f.valign="center",f.textMargin=a.wrapPadding,f.tspan=!1,u.hasKatex(f.text)?await _t(t,f,{startx:i,stopx:r,starty:o}):xt(t,f);const x=T.width;let w;i===r?a.rightAngles?w=t.append("path").attr("d",`M ${i},${o} H ${i+u.common$1.getMax(a.width/2,x/2)} V ${o+25} H ${i}`):w=t.append("path").attr("d","M "+i+","+o+" C "+(i+60)+","+(o-10)+" "+(i+60)+","+(o+30)+" "+i+","+(o+20)):(w=t.append("line"),w.attr("x1",i),w.attr("y1",o),w.attr("x2",r),w.attr("y2",o)),p===n.db.LINETYPE.DOTTED||p===n.db.LINETYPE.DOTTED_CROSS||p===n.db.LINETYPE.DOTTED_POINT||p===n.db.LINETYPE.DOTTED_OPEN?(w.style("stroke-dasharray","3, 3"),w.attr("class","messageLine1")):w.attr("class","messageLine0");let k="";a.arrowMarkerAbsolute&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),w.attr("stroke-width",2),w.attr("stroke","none"),w.style("fill","none"),(p===n.db.LINETYPE.SOLID||p===n.db.LINETYPE.DOTTED)&&w.attr("marker-end","url("+k+"#arrowhead)"),(p===n.db.LINETYPE.SOLID_POINT||p===n.db.LINETYPE.DOTTED_POINT)&&w.attr("marker-end","url("+k+"#filled-head)"),(p===n.db.LINETYPE.SOLID_CROSS||p===n.db.LINETYPE.DOTTED_CROSS)&&w.attr("marker-end","url("+k+"#crosshead)"),(m||a.showSequenceNumbers)&&(w.attr("marker-start","url("+k+"#sequencenumber)"),t.append("text").attr("x",i).attr("y",o+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(s))},i0=async function(t,e,o,n,i,r,c){let l=0,p=0,s,m=0;for(const T of n){const f=e[T],x=f.box;s&&s!=x&&(g.models.addBox(s),p+=a.boxMargin+s.margin),x&&x!=s&&(x.x=l+p,x.y=i,p+=x.margin),f.width=f.width||a.width,f.height=u.common$1.getMax(f.height||a.height,a.height),f.margin=f.margin||a.actorMargin,m=u.common$1.getMax(m,f.height),o[f.name]&&(p+=f.width/2),f.x=l+p,f.starty=g.getVerticalPos(),g.insert(f.x,i,f.x+f.width,f.height),l+=f.width+p,f.box&&(f.box.width=l+x.margin-f.box.x),p=f.margin,s=f.box,g.models.addActor(f)}s&&g.models.addBox(s),g.bumpVerticalPos(m)},Ct=async function(t,e,o,n){if(n){let i=0;g.bumpVerticalPos(a.boxMargin*2);for(const r of o){const c=e[r];c.stopy||(c.stopy=g.getVerticalPos());const l=await D.drawActor(t,c,a,!0);i=u.common$1.getMax(i,l)}g.bumpVerticalPos(i+a.boxMargin)}else for(const i of o){const r=e[i];await D.drawActor(t,r,a,!1)}},se=function(t,e,o,n){let i=0,r=0;for(const c of o){const l=e[c],p=c0(l),s=D.drawPopup(t,l,p,a,a.forceMenus,n);s.height>i&&(i=s.height),s.width+l.x>r&&(r=s.width+l.x)}return{maxHeight:i,maxWidth:r}},ie=function(t){u.assignWithDepth$1(a,t),t.fontFamily&&(a.actorFontFamily=a.noteFontFamily=a.messageFontFamily=t.fontFamily),t.fontSize&&(a.actorFontSize=a.noteFontSize=a.messageFontSize=t.fontSize),t.fontWeight&&(a.actorFontWeight=a.noteFontWeight=a.messageFontWeight=t.fontWeight)},kt=function(t){return g.activations.filter(function(e){return e.actor===t})},zt=function(t,e){const o=e[t],n=kt(t),i=n.reduce(function(c,l){return u.common$1.getMin(c,l.startx)},o.x+o.width/2-1),r=n.reduce(function(c,l){return u.common$1.getMax(c,l.stopx)},o.x+o.width/2+1);return[i,r]};function nt(t,e,o,n,i){g.bumpVerticalPos(o);let r=n;if(e.id&&e.message&&t[e.id]){const c=t[e.id].width,l=pt(a);e.message=u.utils.wrapLabel(`[${e.message}]`,c-2*a.wrapPadding,l),e.width=c,e.wrap=!0;const p=u.utils.calculateTextDimensions(e.message,l),s=u.common$1.getMax(p.height,a.labelBoxHeight);r=n+s,u.log$1.debug(`${s} - ${e.message}`)}i(e),g.bumpVerticalPos(r)}function r0(t,e,o,n,i,r,c){function l(s,m){s.x<i[t.from].x?(g.insert(e.stopx-m,e.starty,e.startx,e.stopy+s.height/2+a.noteMargin),e.stopx=e.stopx+m):(g.insert(e.startx,e.starty,e.stopx+m,e.stopy+s.height/2+a.noteMargin),e.stopx=e.stopx-m)}function p(s,m){s.x<i[t.to].x?(g.insert(e.startx-m,e.starty,e.stopx,e.stopy+s.height/2+a.noteMargin),e.startx=e.startx+m):(g.insert(e.stopx,e.starty,e.startx+m,e.stopy+s.height/2+a.noteMargin),e.startx=e.startx-m)}if(r[t.to]==n){const s=i[t.to],m=s.type=="actor"?ht/2+3:s.width/2+3;l(s,m),s.starty=o-s.height/2,g.bumpVerticalPos(s.height/2)}else if(c[t.from]==n){const s=i[t.from];if(a.mirrorActors){const m=s.type=="actor"?ht/2:s.width/2;p(s,m)}s.stopy=o-s.height/2,g.bumpVerticalPos(s.height/2)}else if(c[t.to]==n){const s=i[t.to];if(a.mirrorActors){const m=s.type=="actor"?ht/2+3:s.width/2+3;l(s,m)}s.stopy=o-s.height/2,g.bumpVerticalPos(s.height/2)}}const a0=async function(t,e,o,n){const{securityLevel:i,sequence:r}=u.getConfig();a=r;let c;i==="sandbox"&&(c=u.select("#i"+e));const l=i==="sandbox"?u.select(c.nodes()[0].contentDocument.body):u.select("body"),p=i==="sandbox"?c.nodes()[0].contentDocument:document;g.init(),u.log$1.debug(n.db);const s=i==="sandbox"?l.select(`[id="${e}"]`):u.select(`[id="${e}"]`),m=n.db.getActors(),T=n.db.getCreatedActors(),f=n.db.getDestroyedActors(),x=n.db.getBoxes();let w=n.db.getActorKeys();const k=n.db.getMessages(),A=n.db.getDiagramTitle(),O=n.db.hasAtLeastOneBox(),v=n.db.hasAtLeastOneBoxWithTitle(),V=await o0(m,k,n);if(a.height=await l0(m,V,x),D.insertComputerIcon(s),D.insertDatabaseIcon(s),D.insertClockIcon(s),O&&(g.bumpVerticalPos(a.boxMargin),v&&g.bumpVerticalPos(x[0].textMaxHeight)),a.hideUnusedParticipants===!0){const y=new Set;k.forEach(L=>{y.add(L.from),y.add(L.to)}),w=w.filter(L=>y.has(L))}await i0(s,m,T,w,0);const R=await u0(k,m,V,n);D.insertArrowHead(s),D.insertArrowCrossHead(s),D.insertArrowFilledHead(s),D.insertSequenceNumber(s);function W(y,L){const Z=g.endActivation(y);Z.starty+18>L&&(Z.starty=L-6,L+=12),D.drawActivation(s,Z,L,a,kt(y.from.actor).length),g.insert(Z.startx,L-10,Z.stopx,L)}let q=1,G=1;const Q=[],z=[];let H=0;for(const y of k){let L,Z,tt;switch(y.type){case n.db.LINETYPE.NOTE:g.resetVerticalPos(),Z=y.noteModel,await e0(s,Z);break;case n.db.LINETYPE.ACTIVE_START:g.newActivation(y,s,m);break;case n.db.LINETYPE.ACTIVE_END:W(y,g.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:nt(R,y,a.boxMargin,a.boxMargin+a.boxTextMargin,N=>g.newLoop(N));break;case n.db.LINETYPE.LOOP_END:L=g.endLoop(),await D.drawLoop(s,L,"loop",a),g.bumpVerticalPos(L.stopy-g.getVerticalPos()),g.models.addLoop(L);break;case n.db.LINETYPE.RECT_START:nt(R,y,a.boxMargin,a.boxMargin,N=>g.newLoop(void 0,N.message));break;case n.db.LINETYPE.RECT_END:L=g.endLoop(),z.push(L),g.models.addLoop(L),g.bumpVerticalPos(L.stopy-g.getVerticalPos());break;case n.db.LINETYPE.OPT_START:nt(R,y,a.boxMargin,a.boxMargin+a.boxTextMargin,N=>g.newLoop(N));break;case n.db.LINETYPE.OPT_END:L=g.endLoop(),await D.drawLoop(s,L,"opt",a),g.bumpVerticalPos(L.stopy-g.getVerticalPos()),g.models.addLoop(L);break;case n.db.LINETYPE.ALT_START:nt(R,y,a.boxMargin,a.boxMargin+a.boxTextMargin,N=>g.newLoop(N));break;case n.db.LINETYPE.ALT_ELSE:nt(R,y,a.boxMargin+a.boxTextMargin,a.boxMargin,N=>g.addSectionToLoop(N));break;case n.db.LINETYPE.ALT_END:L=g.endLoop(),await D.drawLoop(s,L,"alt",a),g.bumpVerticalPos(L.stopy-g.getVerticalPos()),g.models.addLoop(L);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:nt(R,y,a.boxMargin,a.boxMargin+a.boxTextMargin,N=>g.newLoop(N)),g.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:nt(R,y,a.boxMargin+a.boxTextMargin,a.boxMargin,N=>g.addSectionToLoop(N));break;case n.db.LINETYPE.PAR_END:L=g.endLoop(),await D.drawLoop(s,L,"par",a),g.bumpVerticalPos(L.stopy-g.getVerticalPos()),g.models.addLoop(L);break;case n.db.LINETYPE.AUTONUMBER:q=y.message.start||q,G=y.message.step||G,y.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:nt(R,y,a.boxMargin,a.boxMargin+a.boxTextMargin,N=>g.newLoop(N));break;case n.db.LINETYPE.CRITICAL_OPTION:nt(R,y,a.boxMargin+a.boxTextMargin,a.boxMargin,N=>g.addSectionToLoop(N));break;case n.db.LINETYPE.CRITICAL_END:L=g.endLoop(),await D.drawLoop(s,L,"critical",a),g.bumpVerticalPos(L.stopy-g.getVerticalPos()),g.models.addLoop(L);break;case n.db.LINETYPE.BREAK_START:nt(R,y,a.boxMargin,a.boxMargin+a.boxTextMargin,N=>g.newLoop(N));break;case n.db.LINETYPE.BREAK_END:L=g.endLoop(),await D.drawLoop(s,L,"break",a),g.bumpVerticalPos(L.stopy-g.getVerticalPos()),g.models.addLoop(L);break;default:try{tt=y.msgModel,tt.starty=g.getVerticalPos(),tt.sequenceIndex=q,tt.sequenceVisible=n.db.showSequenceNumbers();const N=await n0(s,tt);r0(y,tt,N,H,m,T,f),Q.push({messageModel:tt,lineStartY:N}),g.models.addMessage(tt)}catch(N){u.log$1.error("error while drawing message",N)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT].includes(y.type)&&(q=q+G),H++}u.log$1.debug("createdActors",T),u.log$1.debug("destroyedActors",f),await Ct(s,m,w,!1);for(const y of Q)await s0(s,y.messageModel,y.lineStartY,n);a.mirrorActors&&await Ct(s,m,w,!0),z.forEach(y=>D.drawBackgroundRect(s,y)),te(s,m,w,a);for(const y of g.models.boxes)y.height=g.getVerticalPos()-y.y,g.insert(y.x,y.y,y.x+y.width,y.height),y.startx=y.x,y.starty=y.y,y.stopx=y.startx+y.width,y.stopy=y.starty+y.height,y.stroke="rgb(0,0,0, 0.5)",await D.drawBox(s,y,a);O&&g.bumpVerticalPos(a.boxMargin);const Y=se(s,m,w,p),{bounds:F}=g.getBounds();let X=F.stopy-F.starty;X<Y.maxHeight&&(X=Y.maxHeight);let K=X+2*a.diagramMarginY;a.mirrorActors&&(K=K-a.boxMargin+a.bottomMarginAdj);let J=F.stopx-F.startx;J<Y.maxWidth&&(J=Y.maxWidth);const $=J+2*a.diagramMarginX;A&&s.append("text").text(A).attr("x",(F.stopx-F.startx)/2-2*a.diagramMarginX).attr("y",-25),u.configureSvgSize(s,K,$,a.useMaxWidth);const S=A?40:0;s.attr("viewBox",F.startx-a.diagramMarginX+" -"+(a.diagramMarginY+S)+" "+$+" "+(K+S)),u.log$1.debug("models:",g.models)};async function o0(t,e,o){const n={};for(const i of e)if(t[i.to]&&t[i.from]){const r=t[i.to];if(i.placement===o.db.PLACEMENT.LEFTOF&&!r.prevActor||i.placement===o.db.PLACEMENT.RIGHTOF&&!r.nextActor)continue;const c=i.placement!==void 0,l=!c,p=c?gt(a):pt(a),s=i.wrap?u.utils.wrapLabel(i.message,a.width-2*a.wrapPadding,p):i.message,T=(u.hasKatex(s)?await u.calculateMathMLDimensions(i.message,u.getConfig()):u.utils.calculateTextDimensions(s,p)).width+2*a.wrapPadding;l&&i.from===r.nextActor?n[i.to]=u.common$1.getMax(n[i.to]||0,T):l&&i.from===r.prevActor?n[i.from]=u.common$1.getMax(n[i.from]||0,T):l&&i.from===i.to?(n[i.from]=u.common$1.getMax(n[i.from]||0,T/2),n[i.to]=u.common$1.getMax(n[i.to]||0,T/2)):i.placement===o.db.PLACEMENT.RIGHTOF?n[i.from]=u.common$1.getMax(n[i.from]||0,T):i.placement===o.db.PLACEMENT.LEFTOF?n[r.prevActor]=u.common$1.getMax(n[r.prevActor]||0,T):i.placement===o.db.PLACEMENT.OVER&&(r.prevActor&&(n[r.prevActor]=u.common$1.getMax(n[r.prevActor]||0,T/2)),r.nextActor&&(n[i.from]=u.common$1.getMax(n[i.from]||0,T/2)))}return u.log$1.debug("maxMessageWidthPerActor:",n),n}const c0=function(t){let e=0;const o=Rt(a);for(const n in t.links){const r=u.utils.calculateTextDimensions(n,o).width+2*a.wrapPadding+2*a.boxMargin;e<r&&(e=r)}return e};async function l0(t,e,o){let n=0;for(const r of Object.keys(t)){const c=t[r];c.wrap&&(c.description=u.utils.wrapLabel(c.description,a.width-2*a.wrapPadding,Rt(a)));const l=u.hasKatex(c.description)?await u.calculateMathMLDimensions(c.description,u.getConfig()):u.utils.calculateTextDimensions(c.description,Rt(a));c.width=c.wrap?a.width:u.common$1.getMax(a.width,l.width+2*a.wrapPadding),c.height=c.wrap?u.common$1.getMax(l.height,a.height):a.height,n=u.common$1.getMax(n,c.height)}for(const r in e){const c=t[r];if(!c)continue;const l=t[c.nextActor];if(!l){const T=e[r]+a.actorMargin-c.width/2;c.margin=u.common$1.getMax(T,a.actorMargin);continue}const s=e[r]+a.actorMargin-c.width/2-l.width/2;c.margin=u.common$1.getMax(s,a.actorMargin)}let i=0;return o.forEach(r=>{const c=pt(a);let l=r.actorKeys.reduce((m,T)=>m+=t[T].width+(t[T].margin||0),0);l-=2*a.boxTextMargin,r.wrap&&(r.name=u.utils.wrapLabel(r.name,l-2*a.wrapPadding,c));const p=u.utils.calculateTextDimensions(r.name,c);i=u.common$1.getMax(p.height,i);const s=u.common$1.getMax(l,p.width+2*a.wrapPadding);if(r.margin=a.boxTextMargin,l<s){const m=(s-l)/2;r.margin+=m}}),o.forEach(r=>r.textMaxHeight=i),u.common$1.getMax(n,a.height)}const d0=async function(t,e,o){const n=e[t.from].x,i=e[t.to].x,r=t.wrap&&t.message;let c=u.hasKatex(t.message)?await u.calculateMathMLDimensions(t.message,u.getConfig()):u.utils.calculateTextDimensions(r?u.utils.wrapLabel(t.message,a.width,gt(a)):t.message,gt(a));const l={width:r?a.width:u.common$1.getMax(a.width,c.width+2*a.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===o.db.PLACEMENT.RIGHTOF?(l.width=r?u.common$1.getMax(a.width,c.width):u.common$1.getMax(e[t.from].width/2+e[t.to].width/2,c.width+2*a.noteMargin),l.startx=n+(e[t.from].width+a.actorMargin)/2):t.placement===o.db.PLACEMENT.LEFTOF?(l.width=r?u.common$1.getMax(a.width,c.width+2*a.noteMargin):u.common$1.getMax(e[t.from].width/2+e[t.to].width/2,c.width+2*a.noteMargin),l.startx=n-l.width+(e[t.from].width-a.actorMargin)/2):t.to===t.from?(c=u.utils.calculateTextDimensions(r?u.utils.wrapLabel(t.message,u.common$1.getMax(a.width,e[t.from].width),gt(a)):t.message,gt(a)),l.width=r?u.common$1.getMax(a.width,e[t.from].width):u.common$1.getMax(e[t.from].width,a.width,c.width+2*a.noteMargin),l.startx=n+(e[t.from].width-l.width)/2):(l.width=Math.abs(n+e[t.from].width/2-(i+e[t.to].width/2))+a.actorMargin,l.startx=n<i?n+e[t.from].width/2-a.actorMargin/2:i+e[t.to].width/2-a.actorMargin/2),r&&(l.message=u.utils.wrapLabel(t.message,l.width-2*a.wrapPadding,gt(a))),u.log$1.debug(`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${t.message}]`),l},h0=function(t,e,o){if(![o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN,o.db.LINETYPE.SOLID,o.db.LINETYPE.DOTTED,o.db.LINETYPE.SOLID_CROSS,o.db.LINETYPE.DOTTED_CROSS,o.db.LINETYPE.SOLID_POINT,o.db.LINETYPE.DOTTED_POINT].includes(t.type))return{};const[n,i]=zt(t.from,e),[r,c]=zt(t.to,e),l=n<=r,p=l?i:n;let s=l?r:c;const m=Math.abs(r-c)>2,T=k=>l?-k:k;t.from===t.to?s=p:(t.activate&&!m&&(s+=T(a.activationWidth/2-1)),[o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(s+=T(3)));const f=[n,i,r,c],x=Math.abs(p-s);t.wrap&&t.message&&(t.message=u.utils.wrapLabel(t.message,u.common$1.getMax(x+2*a.wrapPadding,a.width),pt(a)));const w=u.utils.calculateTextDimensions(t.message,pt(a));return{width:u.common$1.getMax(t.wrap?0:w.width+2*a.wrapPadding,x+2*a.wrapPadding,a.width),height:0,startx:p,stopx:s,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,f),toBounds:Math.max.apply(null,f)}},u0=async function(t,e,o,n){const i={},r=[];let c,l,p;for(const s of t){switch(s.id=u.utils.random({length:10}),s.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:r.push({id:s.id,msg:s.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:s.message&&(c=r.pop(),i[c.id]=c,i[s.id]=c,r.push(c));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:c=r.pop(),i[c.id]=c;break;case n.db.LINETYPE.ACTIVE_START:{const T=e[s.from?s.from.actor:s.to.actor],f=kt(s.from?s.from.actor:s.to.actor).length,x=T.x+T.width/2+(f-1)*a.activationWidth/2,w={startx:x,stopx:x+a.activationWidth,actor:s.from.actor,enabled:!0};g.activations.push(w)}break;case n.db.LINETYPE.ACTIVE_END:{const T=g.activations.map(f=>f.actor).lastIndexOf(s.from.actor);delete g.activations.splice(T,1)[0]}break}s.placement!==void 0?(l=await d0(s,e,n),s.noteModel=l,r.forEach(T=>{c=T,c.from=u.common$1.getMin(c.from,l.startx),c.to=u.common$1.getMax(c.to,l.startx+l.width),c.width=u.common$1.getMax(c.width,Math.abs(c.from-c.to))-a.labelBoxWidth})):(p=h0(s,e,n),s.msgModel=p,p.startx&&p.stopx&&r.length>0&&r.forEach(T=>{if(c=T,p.startx===p.stopx){const f=e[s.from],x=e[s.to];c.from=u.common$1.getMin(f.x-p.width/2,f.x-f.width/2,c.from),c.to=u.common$1.getMax(x.x+p.width/2,x.x+f.width/2,c.to),c.width=u.common$1.getMax(c.width,Math.abs(c.to-c.from))-a.labelBoxWidth}else c.from=u.common$1.getMin(p.startx,c.from),c.to=u.common$1.getMax(p.stopx,c.to),c.width=u.common$1.getMax(c.width,p.width)-a.labelBoxWidth}))}return g.activations=[],u.log$1.debug("Loop type widths:",i),i},p0={bounds:g,drawActors:Ct,drawActorsPopup:se,setConf:ie,draw:a0},f0={parser:de,db:qt,renderer:p0,styles:Oe,init:({wrap:t})=>{qt.setWrap(t)}};exports.diagram=f0;
@@ -1 +0,0 @@
1
- "use strict";const a=require("./layers.B8i9d7Qz.js"),d=require("./layers.CBXpUMze.js"),c=(n,t)=>{const e=n.append("rect");if(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),t.name&&e.attr("name",t.name),t.rx!==void 0&&e.attr("rx",t.rx),t.ry!==void 0&&e.attr("ry",t.ry),t.attrs!==void 0)for(const r in t.attrs)e.attr(r,t.attrs[r]);return t.class!==void 0&&e.attr("class",t.class),e},o=(n,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};c(n,e).lower()},l=(n,t)=>{const e=t.text.replace(d.lineBreakRegex," "),r=n.append("text");r.attr("x",t.x),r.attr("y",t.y),r.attr("class","legend"),r.style("text-anchor",t.anchor),t.class!==void 0&&r.attr("class",t.class);const s=r.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.text(e),r},x=(n,t,e,r)=>{const s=n.append("image");s.attr("x",t),s.attr("y",e);const i=a.distExports.sanitizeUrl(r);s.attr("xlink:href",i)},g=(n,t,e,r)=>{const s=n.append("use");s.attr("x",t),s.attr("y",e);const i=a.distExports.sanitizeUrl(r);s.attr("xlink:href",`#${i}`)},h=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),y=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0});exports.drawBackgroundRect=o;exports.drawEmbeddedImage=g;exports.drawImage=x;exports.drawRect=c;exports.drawText=l;exports.getNoteRect=h;exports.getTextObj=y;
@@ -1,118 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./layers.CBXpUMze.js"),U=require("./layers.D90-hSDT.js"),Ae=require("./layers.9QK1wiQj.js");require("./layers.B8i9d7Qz.js");const Ce=require("./layers.DtoCH9Nn.js"),ze=require("./layers.B19hGmey.js"),ve=require("./layers.BIeVwYKL.js");function Re(e,s){for(var l=-1,c=e==null?0:e.length;++l<c&&s(e[l],l,e)!==!1;);return e}function xe(e){return u.isArrayLike(e)?u.arrayLikeKeys(e):u.baseKeys(e)}function Be(e,s){return e&&u.copyObject(s,xe(s),e)}function je(e,s){for(var l=-1,c=e==null?0:e.length,r=0,h=[];++l<c;){var o=e[l];s(o,l,e)&&(h[r++]=o)}return h}function Pe(){return[]}var Fe=Object.prototype,Ke=Fe.propertyIsEnumerable,oe=Object.getOwnPropertySymbols,Le=oe?function(e){return e==null?[]:(e=Object(e),je(oe(e),function(s){return Ke.call(e,s)}))}:Pe;function Me(e,s){return u.copyObject(e,Le(e),s)}function Ue(e,s){for(var l=-1,c=s.length,r=e.length;++l<c;)e[r+l]=s[l];return e}function Ye(e,s,l){var c=s(e);return u.isArray(e)?c:Ue(c,l(e))}function We(e){return Ye(e,xe,Le)}var Ve=Object.prototype,Ge=Ve.hasOwnProperty;function qe(e){var s=e.length,l=new e.constructor(s);return s&&typeof e[0]=="string"&&Ge.call(e,"index")&&(l.index=e.index,l.input=e.input),l}function Xe(e,s){var l=e.buffer;return new e.constructor(l,e.byteOffset,e.byteLength)}var He=/\w*$/;function $e(e){var s=new e.constructor(e.source,He.exec(e));return s.lastIndex=e.lastIndex,s}var ce=u.Symbol?u.Symbol.prototype:void 0,ue=ce?ce.valueOf:void 0;function Ze(e){return ue?Object(ue.call(e)):{}}var Je="[object Boolean]",Qe="[object Date]",et="[object Map]",tt="[object Number]",nt="[object RegExp]",st="[object Set]",rt="[object String]",it="[object Symbol]",at="[object ArrayBuffer]",lt="[object DataView]",ot="[object Float32Array]",ct="[object Float64Array]",ut="[object Int8Array]",dt="[object Int16Array]",gt="[object Int32Array]",ht="[object Uint8Array]",ft="[object Uint8ClampedArray]",pt="[object Uint16Array]",bt="[object Uint32Array]";function St(e,s,l){var c=e.constructor;switch(s){case at:return u.cloneArrayBuffer(e);case Je:case Qe:return new c(+e);case lt:return Xe(e);case ot:case ct:case ut:case dt:case gt:case ht:case ft:case pt:case bt:return u.cloneTypedArray(e,l);case et:return new c;case tt:case rt:return new c(e);case nt:return $e(e);case st:return new c;case it:return Ze(e)}}var xt="[object Map]";function Lt(e){return u.isObjectLike(e)&&u.getTag(e)==xt}var de=u.nodeUtil&&u.nodeUtil.isMap,yt=de?u.baseUnary(de):Lt,mt="[object Set]";function _t(e){return u.isObjectLike(e)&&u.getTag(e)==mt}var ge=u.nodeUtil&&u.nodeUtil.isSet,Et=ge?u.baseUnary(ge):_t,wt=1,ye="[object Arguments]",Dt="[object Array]",Tt="[object Boolean]",Nt="[object Date]",Ot="[object Error]",me="[object Function]",kt="[object GeneratorFunction]",It="[object Map]",At="[object Number]",_e="[object Object]",Ct="[object RegExp]",zt="[object Set]",vt="[object String]",Rt="[object Symbol]",Bt="[object WeakMap]",jt="[object ArrayBuffer]",Pt="[object DataView]",Ft="[object Float32Array]",Kt="[object Float64Array]",Mt="[object Int8Array]",Ut="[object Int16Array]",Yt="[object Int32Array]",Wt="[object Uint8Array]",Vt="[object Uint8ClampedArray]",Gt="[object Uint16Array]",qt="[object Uint32Array]",y={};y[ye]=y[Dt]=y[jt]=y[Pt]=y[Tt]=y[Nt]=y[Ft]=y[Kt]=y[Mt]=y[Ut]=y[Yt]=y[It]=y[At]=y[_e]=y[Ct]=y[zt]=y[vt]=y[Rt]=y[Wt]=y[Vt]=y[Gt]=y[qt]=!0;y[Ot]=y[me]=y[Bt]=!1;function Z(e,s,l,c,r,h){var o,b=s&wt;if(o!==void 0)return o;if(!u.isObject(e))return e;var S=u.isArray(e);if(S)return o=qe(e),u.copyArray(e,o);var p=u.getTag(e),x=p==me||p==kt;if(u.isBuffer(e))return u.cloneBuffer(e,b);if(p==_e||p==ye||x&&!r)return o=x?{}:u.initCloneObject(e),Me(e,Be(o,e));if(!y[p])return r?e:{};o=St(e,p,b),h||(h=new u.Stack);var w=h.get(e);if(w)return w;h.set(e,o),Et(e)?e.forEach(function(_){o.add(Z(_,s,l,_,e,h))}):yt(e)&&e.forEach(function(_,L){o.set(L,Z(_,s,l,L,e,h))});var I=We,T=S?void 0:I(e);return Re(T||e,function(_,L){T&&(L=_,_=e[L]),u.assignValue(o,L,Z(_,s,l,L,e,h))}),o}var Xt=4;function Ht(e){return Z(e,Xt)}var he,fe,ne=function(){var e=function(O,d,n,i){for(n=n||{},i=O.length;i--;n[O[i]]=d);return n},s=[1,7],l=[1,13],c=[1,14],r=[1,15],h=[1,19],o=[1,16],b=[1,17],S=[1,18],p=[8,30],x=[8,21,28,29,30,31,32,40,44,47],w=[1,23],I=[1,24],T=[8,15,16,21,28,29,30,31,32,40,44,47],_=[8,15,16,21,27,28,29,30,31,32,40,44,47],L=[1,49],m={trace:function(){},yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:function(d,n,i,g,f,t,E){var a=t.length-1;switch(f){case 4:g.getLogger().debug("Rule: separator (NL) ");break;case 5:g.getLogger().debug("Rule: separator (Space) ");break;case 6:g.getLogger().debug("Rule: separator (EOF) ");break;case 7:g.getLogger().debug("Rule: hierarchy: ",t[a-1]),g.setHierarchy(t[a-1]);break;case 8:g.getLogger().debug("Stop NL ");break;case 9:g.getLogger().debug("Stop EOF ");break;case 10:g.getLogger().debug("Stop NL2 ");break;case 11:g.getLogger().debug("Stop EOF2 ");break;case 12:g.getLogger().debug("Rule: statement: ",t[a]),typeof t[a].length=="number"?this.$=t[a]:this.$=[t[a]];break;case 13:g.getLogger().debug("Rule: statement #2: ",t[a-1]),this.$=[t[a-1]].concat(t[a]);break;case 14:g.getLogger().debug("Rule: link: ",t[a],d),this.$={edgeTypeStr:t[a],label:""};break;case 15:g.getLogger().debug("Rule: LABEL link: ",t[a-3],t[a-1],t[a]),this.$={edgeTypeStr:t[a],label:t[a-1]};break;case 18:const B=parseInt(t[a]),Y=g.generateId();this.$={id:Y,type:"space",label:"",width:B,children:[]};break;case 23:g.getLogger().debug("Rule: (nodeStatement link node) ",t[a-2],t[a-1],t[a]," typestr: ",t[a-1].edgeTypeStr);const F=g.edgeStrToEdgeData(t[a-1].edgeTypeStr);this.$=[{id:t[a-2].id,label:t[a-2].label,type:t[a-2].type,directions:t[a-2].directions},{id:t[a-2].id+"-"+t[a].id,start:t[a-2].id,end:t[a].id,label:t[a-1].label,type:"edge",directions:t[a].directions,arrowTypeEnd:F,arrowTypeStart:"arrow_open"},{id:t[a].id,label:t[a].label,type:g.typeStr2Type(t[a].typeStr),directions:t[a].directions}];break;case 24:g.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[a-1],t[a]),this.$={id:t[a-1].id,label:t[a-1].label,type:g.typeStr2Type(t[a-1].typeStr),directions:t[a-1].directions,widthInColumns:parseInt(t[a],10)};break;case 25:g.getLogger().debug("Rule: nodeStatement (node) ",t[a]),this.$={id:t[a].id,label:t[a].label,type:g.typeStr2Type(t[a].typeStr),directions:t[a].directions,widthInColumns:1};break;case 26:g.getLogger().debug("APA123",this?this:"na"),g.getLogger().debug("COLUMNS: ",t[a]),this.$={type:"column-setting",columns:t[a]==="auto"?-1:parseInt(t[a])};break;case 27:g.getLogger().debug("Rule: id-block statement : ",t[a-2],t[a-1]),g.generateId(),this.$={...t[a-2],type:"composite",children:t[a-1]};break;case 28:g.getLogger().debug("Rule: blockStatement : ",t[a-2],t[a-1],t[a]);const v=g.generateId();this.$={id:v,type:"composite",label:"",children:t[a-1]};break;case 29:g.getLogger().debug("Rule: node (NODE_ID separator): ",t[a]),this.$={id:t[a]};break;case 30:g.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[a-1],t[a]),this.$={id:t[a-1],label:t[a].label,typeStr:t[a].typeStr,directions:t[a].directions};break;case 31:g.getLogger().debug("Rule: dirList: ",t[a]),this.$=[t[a]];break;case 32:g.getLogger().debug("Rule: dirList: ",t[a-1],t[a]),this.$=[t[a-1]].concat(t[a]);break;case 33:g.getLogger().debug("Rule: nodeShapeNLabel: ",t[a-2],t[a-1],t[a]),this.$={typeStr:t[a-2]+t[a],label:t[a-1]};break;case 34:g.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[a-3],t[a-2]," #3:",t[a-1],t[a]),this.$={typeStr:t[a-3]+t[a],label:t[a-2],directions:t[a-1]};break;case 35:case 36:this.$={type:"classDef",id:t[a-1].trim(),css:t[a].trim()};break;case 37:this.$={type:"applyClass",id:t[a-1].trim(),styleClass:t[a].trim()};break;case 38:this.$={type:"applyStyles",id:t[a-1].trim(),stylesStr:t[a].trim()};break}},table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:l,29:c,31:r,32:h,40:o,44:b,47:S},{8:[1,20]},e(p,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:s,28:l,29:c,31:r,32:h,40:o,44:b,47:S}),e(x,[2,16],{14:22,15:w,16:I}),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),e(x,[2,21]),e(x,[2,22]),e(T,[2,25],{27:[1,25]}),e(x,[2,26]),{19:26,26:12,32:h},{11:27,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:l,29:c,31:r,32:h,40:o,44:b,47:S},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(_,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(p,[2,13]),{26:35,32:h},{32:[2,14]},{17:[1,36]},e(T,[2,24]),{11:37,13:4,14:22,15:w,16:I,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:l,29:c,31:r,32:h,40:o,44:b,47:S},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(_,[2,30]),{18:[1,43]},{18:[1,44]},e(T,[2,23]),{18:[1,45]},{30:[1,46]},e(x,[2,28]),e(x,[2,35]),e(x,[2,36]),e(x,[2,37]),e(x,[2,38]),{37:[1,47]},{34:48,35:L},{15:[1,50]},e(x,[2,27]),e(_,[2,33]),{39:[1,51]},{34:52,35:L,39:[2,31]},{32:[2,15]},e(_,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:function(d,n){if(n.recoverable)this.trace(d);else{var i=new Error(d);throw i.hash=n,i}},parse:function(d){var n=this,i=[0],g=[],f=[null],t=[],E=this.table,a="",B=0,Y=0,F=2,v=1,Oe=t.slice.call(arguments,1),N=Object.create(this.lexer),K={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(K.yy[J]=this.yy[J]);N.setInput(d,K.yy),K.yy.lexer=N,K.yy.parser=this,typeof N.yylloc>"u"&&(N.yylloc={});var Q=N.yylloc;t.push(Q);var ke=N.options&&N.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ie(){var P;return P=g.pop()||N.lex()||v,typeof P!="number"&&(P instanceof Array&&(g=P,P=g.pop()),P=n.symbols_[P]||P),P}for(var A,M,z,ee,W={},X,j,le,H;;){if(M=i[i.length-1],this.defaultActions[M]?z=this.defaultActions[M]:((A===null||typeof A>"u")&&(A=Ie()),z=E[M]&&E[M][A]),typeof z>"u"||!z.length||!z[0]){var te="";H=[];for(X in E[M])this.terminals_[X]&&X>F&&H.push("'"+this.terminals_[X]+"'");N.showPosition?te="Parse error on line "+(B+1)+`:
2
- `+N.showPosition()+`
3
- Expecting `+H.join(", ")+", got '"+(this.terminals_[A]||A)+"'":te="Parse error on line "+(B+1)+": Unexpected "+(A==v?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(te,{text:N.match,token:this.terminals_[A]||A,line:N.yylineno,loc:Q,expected:H})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+A);switch(z[0]){case 1:i.push(A),f.push(N.yytext),t.push(N.yylloc),i.push(z[1]),A=null,Y=N.yyleng,a=N.yytext,B=N.yylineno,Q=N.yylloc;break;case 2:if(j=this.productions_[z[1]][1],W.$=f[f.length-j],W._$={first_line:t[t.length-(j||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(j||1)].first_column,last_column:t[t.length-1].last_column},ke&&(W._$.range=[t[t.length-(j||1)].range[0],t[t.length-1].range[1]]),ee=this.performAction.apply(W,[a,Y,B,K.yy,z[1],f,t].concat(Oe)),typeof ee<"u")return ee;j&&(i=i.slice(0,-1*j*2),f=f.slice(0,-1*j),t=t.slice(0,-1*j)),i.push(this.productions_[z[1]][0]),f.push(W.$),t.push(W._$),le=E[i[i.length-2]][i[i.length-1]],i.push(le);break;case 3:return!0}}return!0}},R=function(){var O={EOF:1,parseError:function(n,i){if(this.yy.parser)this.yy.parser.parseError(n,i);else throw new Error(n)},setInput:function(d,n){return this.yy=n||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var n=d.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},unput:function(d){var n=d.length,i=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===g.length?this.yylloc.first_column:0)+g[g.length-i.length].length-i[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(d){this.unput(this.match.slice(d))},pastInput:function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var d=this.pastInput(),n=new Array(d.length+1).join("-");return d+this.upcomingInput()+`
5
- `+n+"^"},test_match:function(d,n){var i,g,f;if(this.options.backtrack_lexer&&(f={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(f.yylloc.range=this.yylloc.range.slice(0))),g=d[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,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(d[0].length),this.matched+=d[0],i=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var t in f)this[t]=f[t];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var d,n,i,g;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),t=0;t<f.length;t++)if(i=this._input.match(this.rules[f[t]]),i&&(!n||i[0].length>n[0].length)){if(n=i,g=t,this.options.backtrack_lexer){if(d=this.test_match(i,f[t]),d!==!1)return d;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(d=this.test_match(n,f[g]),d!==!1?d:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var n=this.next();return n||this.lex()},begin:function(n){this.conditionStack.push(n)},popState:function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},pushState:function(n){this.begin(n)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(n,i,g,f){switch(g){case 0:return 10;case 1:return n.getLogger().debug("Found space-block"),31;case 2:return n.getLogger().debug("Found nl-block"),31;case 3:return n.getLogger().debug("Found space-block"),29;case 4:n.getLogger().debug(".",i.yytext);break;case 5:n.getLogger().debug("_",i.yytext);break;case 6:return 5;case 7:return i.yytext=-1,28;case 8:return i.yytext=i.yytext.replace(/columns\s+/,""),n.getLogger().debug("COLUMNS (LEX)",i.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:n.getLogger().debug("LEX: POPPING STR:",i.yytext),this.popState();break;case 14:return n.getLogger().debug("LEX: STR end:",i.yytext),"STR";case 15:return i.yytext=i.yytext.replace(/space\:/,""),n.getLogger().debug("SPACE NUM (LEX)",i.yytext),21;case 16:return i.yytext="1",n.getLogger().debug("COLUMNS (LEX)",i.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),n.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),n.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),n.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),n.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),n.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),n.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:return this.popState(),n.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),n.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),n.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),n.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),n.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),n.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return n.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return n.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return n.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return n.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 61:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 62:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return n.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return n.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:return this.pushState("NODE"),36;case 67:return this.pushState("NODE"),36;case 68:return this.pushState("NODE"),36;case 69:return this.pushState("NODE"),36;case 70:return this.pushState("NODE"),36;case 71:return this.pushState("NODE"),36;case 72:return this.pushState("NODE"),36;case 73:return n.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),n.getLogger().debug("LEX ARR START"),38;case 75:return n.getLogger().debug("Lex: NODE_ID",i.yytext),32;case 76:return n.getLogger().debug("Lex: EOF",i.yytext),8;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:n.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:n.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return n.getLogger().debug("LEX: NODE_DESCR:",i.yytext),"NODE_DESCR";case 84:n.getLogger().debug("LEX POPPING"),this.popState();break;case 85:n.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return i.yytext=i.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (right): dir:",i.yytext),"DIR";case 87:return i.yytext=i.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (left):",i.yytext),"DIR";case 88:return i.yytext=i.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (x):",i.yytext),"DIR";case 89:return i.yytext=i.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (y):",i.yytext),"DIR";case 90:return i.yytext=i.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (up):",i.yytext),"DIR";case 91:return i.yytext=i.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (down):",i.yytext),"DIR";case 92:return i.yytext="]>",n.getLogger().debug("Lex (ARROW_DIR end):",i.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return n.getLogger().debug("Lex: LINK","#"+i.yytext+"#"),15;case 94:return n.getLogger().debug("Lex: LINK",i.yytext),15;case 95:return n.getLogger().debug("Lex: LINK",i.yytext),15;case 96:return n.getLogger().debug("Lex: LINK",i.yytext),15;case 97:return n.getLogger().debug("Lex: START_LINK",i.yytext),this.pushState("LLABEL"),16;case 98:return n.getLogger().debug("Lex: START_LINK",i.yytext),this.pushState("LLABEL"),16;case 99:return n.getLogger().debug("Lex: START_LINK",i.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return n.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),n.getLogger().debug("Lex: LINK","#"+i.yytext+"#"),15;case 103:return this.popState(),n.getLogger().debug("Lex: LINK",i.yytext),15;case 104:return this.popState(),n.getLogger().debug("Lex: LINK",i.yytext),15;case 105:return n.getLogger().debug("Lex: COLON",i.yytext),i.yytext=i.yytext.slice(1),27}},rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return O}();m.lexer=R;function k(){this.yy={}}return k.prototype=m,m.Parser=k,new k}();ne.parser=ne;const $t=ne;let C={},re=[],V={};const pe="color",be="fill",Zt="bgFill",Ee=",",Jt=u.getConfig();let G={};const Qt=e=>u.common$1.sanitizeText(e,Jt),en=function(e,s=""){G[e]===void 0&&(G[e]={id:e,styles:[],textStyles:[]});const l=G[e];s!=null&&s.split(Ee).forEach(c=>{const r=c.replace(/([^;]*);/,"$1").trim();if(c.match(pe)){const o=r.replace(be,Zt).replace(pe,be);l.textStyles.push(o)}l.styles.push(r)})},tn=function(e,s=""){const l=C[e];s!=null&&(l.styles=s.split(Ee))},nn=function(e,s){e.split(",").forEach(function(l){let c=C[l];if(c===void 0){const r=l.trim();C[r]={id:r,type:"na",children:[]},c=C[r]}c.classes||(c.classes=[]),c.classes.push(s)})},we=(e,s)=>{const l=e.flat(),c=[];for(const r of l){if(r.label&&(r.label=Qt(r.label)),r.type==="classDef"){en(r.id,r.css);continue}if(r.type==="applyClass"){nn(r.id,(r==null?void 0:r.styleClass)||"");continue}if(r.type==="applyStyles"){r!=null&&r.stylesStr&&tn(r.id,r==null?void 0:r.stylesStr);continue}if(r.type==="column-setting")s.columns=r.columns||-1;else if(r.type==="edge")V[r.id]?V[r.id]++:V[r.id]=1,r.id=V[r.id]+"-"+r.id,re.push(r);else{r.label||(r.type==="composite"?r.label="":r.label=r.id);const h=!C[r.id];if(h?C[r.id]=r:(r.type!=="na"&&(C[r.id].type=r.type),r.label!==r.id&&(C[r.id].label=r.label)),r.children&&we(r.children,r),r.type==="space"){const o=r.width||1;for(let b=0;b<o;b++){const S=Ht(r);S.id=S.id+"-"+b,C[S.id]=S,c.push(S)}}else h&&c.push(r)}}s.children=c};let ie=[],q={id:"root",type:"composite",children:[],columns:-1};const sn=()=>{u.log$1.debug("Clear called"),u.clear(),q={id:"root",type:"composite",children:[],columns:-1},C={root:q},ie=[],G={},re=[],V={}};function rn(e){switch(u.log$1.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return u.log$1.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function an(e){switch(u.log$1.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}function ln(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}let Se=0;const on=()=>(Se++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Se),cn=e=>{q.children=e,we(e,q),ie=q.children},un=e=>{const s=C[e];return s?s.columns?s.columns:s.children?s.children.length:-1:-1},dn=()=>[...Object.values(C)],gn=()=>ie||[],hn=()=>re,fn=e=>C[e],pn=e=>{C[e.id]=e},bn=()=>console,Sn=function(){return G},xn={getConfig:()=>u.getConfig$1().block,typeStr2Type:rn,edgeTypeStr2Type:an,edgeStrToEdgeData:ln,getLogger:bn,getBlocksFlat:dn,getBlocks:gn,getEdges:hn,setHierarchy:cn,getBlock:fn,setBlock:pn,getColumns:un,getClasses:Sn,clear:sn,generateId:on},Ln=xn,$=(e,s)=>{const l=Ce.channel,c=l(e,"r"),r=l(e,"g"),h=l(e,"b");return u.rgba(c,r,h,s)},yn=e=>`.label {
7
- font-family: ${e.fontFamily};
8
- color: ${e.nodeTextColor||e.textColor};
9
- }
10
- .cluster-label text {
11
- fill: ${e.titleColor};
12
- }
13
- .cluster-label span,p {
14
- color: ${e.titleColor};
15
- }
16
-
17
-
18
-
19
- .label text,span,p {
20
- fill: ${e.nodeTextColor||e.textColor};
21
- color: ${e.nodeTextColor||e.textColor};
22
- }
23
-
24
- .node rect,
25
- .node circle,
26
- .node ellipse,
27
- .node polygon,
28
- .node path {
29
- fill: ${e.mainBkg};
30
- stroke: ${e.nodeBorder};
31
- stroke-width: 1px;
32
- }
33
- .flowchart-label text {
34
- text-anchor: middle;
35
- }
36
- // .flowchart-label .text-outer-tspan {
37
- // text-anchor: middle;
38
- // }
39
- // .flowchart-label .text-inner-tspan {
40
- // text-anchor: start;
41
- // }
42
-
43
- .node .label {
44
- text-align: center;
45
- }
46
- .node.clickable {
47
- cursor: pointer;
48
- }
49
-
50
- .arrowheadPath {
51
- fill: ${e.arrowheadColor};
52
- }
53
-
54
- .edgePath .path {
55
- stroke: ${e.lineColor};
56
- stroke-width: 2.0px;
57
- }
58
-
59
- .flowchart-link {
60
- stroke: ${e.lineColor};
61
- fill: none;
62
- }
63
-
64
- .edgeLabel {
65
- background-color: ${e.edgeLabelBackground};
66
- rect {
67
- opacity: 0.5;
68
- background-color: ${e.edgeLabelBackground};
69
- fill: ${e.edgeLabelBackground};
70
- }
71
- text-align: center;
72
- }
73
-
74
- /* For html labels only */
75
- .labelBkg {
76
- background-color: ${$(e.edgeLabelBackground,.5)};
77
- // background-color:
78
- }
79
-
80
- .node .cluster {
81
- // fill: ${$(e.mainBkg,.5)};
82
- fill: ${$(e.clusterBkg,.5)};
83
- stroke: ${$(e.clusterBorder,.2)};
84
- box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
85
- stroke-width: 1px;
86
- }
87
-
88
- .cluster text {
89
- fill: ${e.titleColor};
90
- }
91
-
92
- .cluster span,p {
93
- color: ${e.titleColor};
94
- }
95
- /* .cluster div {
96
- color: ${e.titleColor};
97
- } */
98
-
99
- div.mermaidTooltip {
100
- position: absolute;
101
- text-align: center;
102
- max-width: 200px;
103
- padding: 2px;
104
- font-family: ${e.fontFamily};
105
- font-size: 12px;
106
- background: ${e.tertiaryColor};
107
- border: 1px solid ${e.border2};
108
- border-radius: 2px;
109
- pointer-events: none;
110
- z-index: 100;
111
- }
112
-
113
- .flowchartTitleText {
114
- text-anchor: middle;
115
- font-size: 18px;
116
- fill: ${e.textColor};
117
- }
118
- `,mn=yn;function De(e,s,l=!1){var c,r,h;const o=e;let b="default";(((c=o==null?void 0:o.classes)==null?void 0:c.length)||0)>0&&(b=((o==null?void 0:o.classes)||[]).join(" ")),b=b+" flowchart-label";let S=0,p="",x;switch(o.type){case"round":S=5,p="rect";break;case"composite":S=0,p="composite",x=0;break;case"square":p="rect";break;case"diamond":p="question";break;case"hexagon":p="hexagon";break;case"block_arrow":p="block_arrow";break;case"odd":p="rect_left_inv_arrow";break;case"lean_right":p="lean_right";break;case"lean_left":p="lean_left";break;case"trapezoid":p="trapezoid";break;case"inv_trapezoid":p="inv_trapezoid";break;case"rect_left_inv_arrow":p="rect_left_inv_arrow";break;case"circle":p="circle";break;case"ellipse":p="ellipse";break;case"stadium":p="stadium";break;case"subroutine":p="subroutine";break;case"cylinder":p="cylinder";break;case"group":p="rect";break;case"doublecircle":p="doublecircle";break;default:p="rect"}const w=u.getStylesFromArray((o==null?void 0:o.styles)||[]),I=o.label,T=o.size||{width:0,height:0,x:0,y:0};return{labelStyle:w.labelStyle,shape:p,labelText:I,rx:S,ry:S,class:b,style:w.style,id:o.id,directions:o.directions,width:T.width,height:T.height,x:T.x,y:T.y,positioned:l,intersect:void 0,type:o.type,padding:x??(((h=(r=u.getConfig$1())==null?void 0:r.block)==null?void 0:h.padding)||0)}}async function _n(e,s,l){const c=De(s,l,!1);if(c.type==="group")return;const r=await U.insertNode(e,c),h=r.node().getBBox(),o=l.getBlock(c.id);o.size={width:h.width,height:h.height,x:0,y:0,node:r},l.setBlock(o),r.remove()}async function En(e,s,l){const c=De(s,l,!0);l.getBlock(c.id).type!=="space"&&(await U.insertNode(e,c),s.intersect=c==null?void 0:c.intersect,U.positionNode(c))}async function ae(e,s,l,c){for(const r of s)await c(e,r,l),r.children&&await ae(e,r.children,l,c)}async function wn(e,s,l){await ae(e,s,l,_n)}async function Dn(e,s,l){await ae(e,s,l,En)}async function Tn(e,s,l,c,r){const h=new Ae.Graph({multigraph:!0,compound:!0});h.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const o of l)o.size&&h.setNode(o.id,{width:o.size.width,height:o.size.height,intersect:o.intersect});for(const o of s)if(o.start&&o.end){const b=c.getBlock(o.start),S=c.getBlock(o.end);if(b!=null&&b.size&&(S!=null&&S.size)){const p=b.size,x=S.size,w=[{x:p.x,y:p.y},{x:p.x+(x.x-p.x)/2,y:p.y+(x.y-p.y)/2},{x:x.x,y:x.y}];await U.insertEdge(e,{v:o.start,w:o.end,name:o.id},{...o,arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:w,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",h,r),o.label&&(await U.insertEdgeLabel(e,{...o,label:o.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart}),await U.positionEdgeLabel({...o,x:w[1].x,y:w[1].y},{originalPath:w}))}}}const D=((fe=(he=u.getConfig())==null?void 0:he.block)==null?void 0:fe.padding)||8;function Nn(e,s){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(s<0||!Number.isInteger(s))throw new Error("Position must be a non-negative integer."+s);if(e<0)return{px:s,py:0};if(e===1)return{px:0,py:s};const l=s%e,c=Math.floor(s/e);return{px:l,py:c}}const On=e=>{let s=0,l=0;for(const c of e.children){const{width:r,height:h,x:o,y:b}=c.size||{width:0,height:0,x:0,y:0};u.log$1.debug("getMaxChildSize abc95 child:",c.id,"width:",r,"height:",h,"x:",o,"y:",b,c.type),c.type!=="space"&&(r>s&&(s=r/(e.widthInColumns||1)),h>l&&(l=h))}return{width:s,height:l}};function se(e,s,l=0,c=0){var r,h,o,b,S,p,x,w,I,T,_;u.log$1.debug("setBlockSizes abc95 (start)",e.id,(r=e==null?void 0:e.size)==null?void 0:r.x,"block width =",e==null?void 0:e.size,"sieblingWidth",l),(h=e==null?void 0:e.size)!=null&&h.width||(e.size={width:l,height:c,x:0,y:0});let L=0,m=0;if(((o=e.children)==null?void 0:o.length)>0){for(const f of e.children)se(f,s);const R=On(e);L=R.width,m=R.height,u.log$1.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",L,m);for(const f of e.children)f.size&&(u.log$1.debug(`abc95 Setting size of children of ${e.id} id=${f.id} ${L} ${m} ${f.size}`),f.size.width=L*(f.widthInColumns||1)+D*((f.widthInColumns||1)-1),f.size.height=m,f.size.x=0,f.size.y=0,u.log$1.debug(`abc95 updating size of ${e.id} children child:${f.id} maxWidth:${L} maxHeight:${m}`));for(const f of e.children)se(f,s,L,m);const k=e.columns||-1;let O=0;for(const f of e.children)O+=f.widthInColumns||1;let d=e.children.length;k>0&&k<O&&(d=k),e.widthInColumns;const n=Math.ceil(O/d);let i=d*(L+D)+D,g=n*(m+D)+D;if(i<l){u.log$1.debug(`Detected to small siebling: abc95 ${e.id} sieblingWidth ${l} sieblingHeight ${c} width ${i}`),i=l,g=c;const f=(l-d*D-D)/d,t=(c-n*D-D)/n;u.log$1.debug("Size indata abc88",e.id,"childWidth",f,"maxWidth",L),u.log$1.debug("Size indata abc88",e.id,"childHeight",t,"maxHeight",m),u.log$1.debug("Size indata abc88 xSize",d,"padding",D);for(const E of e.children)E.size&&(E.size.width=f,E.size.height=t,E.size.x=0,E.size.y=0)}if(u.log$1.debug(`abc95 (finale calc) ${e.id} xSize ${d} ySize ${n} columns ${k}${e.children.length} width=${Math.max(i,((b=e.size)==null?void 0:b.width)||0)}`),i<(((S=e==null?void 0:e.size)==null?void 0:S.width)||0)){i=((p=e==null?void 0:e.size)==null?void 0:p.width)||0;const f=k>0?Math.min(e.children.length,k):e.children.length;if(f>0){const t=(i-f*D-D)/f;u.log$1.debug("abc95 (growing to fit) width",e.id,i,(x=e.size)==null?void 0:x.width,t);for(const E of e.children)E.size&&(E.size.width=t)}}e.size={width:i,height:g,x:0,y:0}}u.log$1.debug("setBlockSizes abc94 (done)",e.id,(w=e==null?void 0:e.size)==null?void 0:w.x,(I=e==null?void 0:e.size)==null?void 0:I.width,(T=e==null?void 0:e.size)==null?void 0:T.y,(_=e==null?void 0:e.size)==null?void 0:_.height)}function Te(e,s){var l,c,r,h,o,b,S,p,x,w,I,T,_,L,m,R,k;u.log$1.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(l=e==null?void 0:e.size)==null?void 0:l.x} y: ${(c=e==null?void 0:e.size)==null?void 0:c.y} width: ${(r=e==null?void 0:e.size)==null?void 0:r.width}`);const O=e.columns||-1;if(u.log$1.debug("layoutBlocks columns abc95",e.id,"=>",O,e),e.children&&e.children.length>0){const d=((o=(h=e==null?void 0:e.children[0])==null?void 0:h.size)==null?void 0:o.width)||0,n=e.children.length*d+(e.children.length-1)*D;u.log$1.debug("widthOfChildren 88",n,"posX");let i=0;u.log$1.debug("abc91 block?.size?.x",e.id,(b=e==null?void 0:e.size)==null?void 0:b.x);let g=(S=e==null?void 0:e.size)!=null&&S.x?((p=e==null?void 0:e.size)==null?void 0:p.x)+(-((x=e==null?void 0:e.size)==null?void 0:x.width)/2||0):-D,f=0;for(const t of e.children){const E=e;if(!t.size)continue;const{width:a,height:B}=t.size,{px:Y,py:F}=Nn(O,i);if(F!=f&&(f=F,g=(w=e==null?void 0:e.size)!=null&&w.x?((I=e==null?void 0:e.size)==null?void 0:I.x)+(-((T=e==null?void 0:e.size)==null?void 0:T.width)/2||0):-D,u.log$1.debug("New row in layout for block",e.id," and child ",t.id,f)),u.log$1.debug(`abc89 layout blocks (child) id: ${t.id} Pos: ${i} (px, py) ${Y},${F} (${(_=E==null?void 0:E.size)==null?void 0:_.x},${(L=E==null?void 0:E.size)==null?void 0:L.y}) parent: ${E.id} width: ${a}${D}`),E.size){const v=a/2;t.size.x=g+D+v,u.log$1.debug(`abc91 layout blocks (calc) px, pyid:${t.id} startingPos=X${g} new startingPosX${t.size.x} ${v} padding=${D} width=${a} halfWidth=${v} => x:${t.size.x} y:${t.size.y} ${t.widthInColumns} (width * (child?.w || 1)) / 2 ${a*((t==null?void 0:t.widthInColumns)||1)/2}`),g=t.size.x+v,t.size.y=E.size.y-E.size.height/2+F*(B+D)+B/2+D,u.log$1.debug(`abc88 layout blocks (calc) px, pyid:${t.id}startingPosX${g}${D}${v}=>x:${t.size.x}y:${t.size.y}${t.widthInColumns}(width * (child?.w || 1)) / 2${a*((t==null?void 0:t.widthInColumns)||1)/2}`)}t.children&&Te(t),i+=(t==null?void 0:t.widthInColumns)||1,u.log$1.debug("abc88 columnsPos",t,i)}}u.log$1.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(m=e==null?void 0:e.size)==null?void 0:m.x} y: ${(R=e==null?void 0:e.size)==null?void 0:R.y} width: ${(k=e==null?void 0:e.size)==null?void 0:k.width}`)}function Ne(e,{minX:s,minY:l,maxX:c,maxY:r}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:h,y:o,width:b,height:S}=e.size;h-b/2<s&&(s=h-b/2),o-S/2<l&&(l=o-S/2),h+b/2>c&&(c=h+b/2),o+S/2>r&&(r=o+S/2)}if(e.children)for(const h of e.children)({minX:s,minY:l,maxX:c,maxY:r}=Ne(h,{minX:s,minY:l,maxX:c,maxY:r}));return{minX:s,minY:l,maxX:c,maxY:r}}function kn(e){const s=e.getBlock("root");if(!s)return;se(s,e,0,0),Te(s),u.log$1.debug("getBlocks",JSON.stringify(s,null,2));const{minX:l,minY:c,maxX:r,maxY:h}=Ne(s),o=h-c,b=r-l;return{x:l,y:c,width:b,height:o}}const In=function(e,s){return s.db.getClasses()},An=async function(e,s,l,c){const{securityLevel:r,block:h}=u.getConfig$1(),o=c.db;let b;r==="sandbox"&&(b=u.select("#i"+s));const S=r==="sandbox"?u.select(b.nodes()[0].contentDocument.body):u.select("body"),p=r==="sandbox"?S.select(`[id="${s}"]`):u.select(`[id="${s}"]`),x=["point","circle","cross"];U.insertMarkers$1(p,x,c.type,s);const w=o.getBlocks(),I=o.getBlocksFlat(),T=o.getEdges(),_=p.insert("g").attr("class","block");await wn(_,w,o);const L=kn(o);if(await Dn(_,w,o),await Tn(_,T,I,o,s),L){const m=L,R=Math.max(1,Math.round(.125*(m.width/m.height))),k=m.height+R+10,O=m.width+10,{useMaxWidth:d}=h;u.configureSvgSize(p,k,O,!!d),u.log$1.debug("Here Bounds",L,m),p.attr("viewBox",`${m.x-5} ${m.y-5} ${m.width+10} ${m.height+10}`)}ze.ordinal(ve.schemeTableau10)},Cn={draw:An,getClasses:In},zn={parser:$t,db:Ln,renderer:Cn,styles:mn};exports.diagram=zn;
@@ -1 +0,0 @@
1
- "use strict";const n=require("./layers.CBXpUMze.js"),s=(e,r)=>n.Utils.lang.round(n.Color.parse(e)[r]);exports.channel=s;