@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.
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +6 -44
- package/dist/index.js +2 -2
- package/dist/{layers.CGX7Piy7.js → layers.-XqzPqyO.js} +1 -1
- package/dist/{layers.D_MU5WlI.js → layers.-pZJVtr2.js} +1 -1
- package/dist/{layers.DXTPaWjN.js → layers.3JS7Upj0.js} +1 -1
- package/dist/{layers.CQv0GMRl.js → layers.44ZDFWK7.js} +1 -1
- package/dist/{layers.BBwDvE6l.js → layers.4utgKYyK.js} +1820 -1814
- package/dist/{layers.Dyqg_e4P.js → layers.5Z-wFY6j.js} +1 -1
- package/dist/{layers.CcJ28sUd.js → layers.5xC3et_d.js} +1 -1
- package/dist/{layers.Bv0tGvGl.js → layers.6JCbFAj6.js} +1 -1
- package/dist/{layers.CClfR9Rs.js → layers.6h3bxK1a.js} +10346 -11483
- package/dist/{layers.BUSnd1Ro.js → layers.77-S3nTe.js} +1 -1
- package/dist/{layers.CDzPpnhN.js → layers.7M4UNyUU.js} +5 -5
- package/dist/{layers.za1sylgg.js → layers.9tX9hjoM.js} +758 -758
- package/dist/{layers.Lhl12ohc.js → layers.B-9i7OJs.js} +1 -1
- package/dist/{layers.Dklz2JqP.js → layers.B0aPUUi4.js} +1 -1
- package/dist/{layers.N4wL2Xyj.js → layers.B2ffo7VT.js} +85 -85
- package/dist/{layers.DdTLZZKb.js → layers.B4b_0r0_.js} +6 -6
- package/dist/{layers.Ckbp-T9r.js → layers.B5W9KS-1.js} +1 -1
- package/dist/{layers.Cl9Tl2nd.js → layers.B8VoPWTl.js} +1 -1
- package/dist/{layers.B9zrmkst.js → layers.B8xcwXZK.js} +1 -1
- package/dist/{layers.gaT5_-NN.js → layers.B8z2WMpW.js} +1 -1
- package/dist/{layers.DHbdkCCU.js → layers.B9r2ZtSh.js} +1 -1
- package/dist/{layers.-rS-aTo2.js → layers.BF9fE7C8.js} +1 -1
- package/dist/{layers.ClQj75nc.js → layers.BFUqtCtE.js} +1 -1
- package/dist/{layers.D1cZq8tq.js → layers.BHT7hu0K.js} +3 -3
- package/dist/{layers.B-6oGNjd.js → layers.BJvR0g9w.js} +1 -1
- package/dist/{layers.Blho0qwc.js → layers.BKes9zCG.js} +1 -1
- package/dist/{layers.D3Hkinja.js → layers.BM9aR6Wc.js} +1 -1
- package/dist/{layers.D2q8ZYi2.js → layers.BNClpYmo.js} +15 -15
- package/dist/{layers.BO3dqWyO.js → layers.BPRzsxsG.js} +1 -1
- package/dist/{layers.C6Rn8zoI.js → layers.BPUdwzAa.js} +1 -1
- package/dist/{layers.DwLw5o0M.js → layers.BPku3sr2.js} +1 -1
- package/dist/{layers.gzGcAwbO.js → layers.BQZvK7Ld.js} +3 -3
- package/dist/{layers.C0bumYdC.js → layers.BSE8QsGw.js} +1 -1
- package/dist/{layers.lLRqycMO.js → layers.BSd-2_I0.js} +1 -1
- package/dist/{layers.Dbuivk7d.js → layers.BTI5U3cj.js} +1 -1
- package/dist/{layers.BYVHkqLR.js → layers.BTSxIBNW.js} +1 -1
- package/dist/{layers.CBXpUMze.js → layers.BTczMT9O.js} +35 -35
- package/dist/{layers.BEE5yqs5.js → layers.BWjXKJlb.js} +1 -1
- package/dist/{layers.BIVmclKv.js → layers.BXQIrASO.js} +1 -1
- package/dist/{layers.B9NSFeaj.js → layers.BXf1B1fk.js} +1 -1
- package/dist/{layers.D7HvMBb6.js → layers.BYlHLDae.js} +1 -1
- package/dist/{layers.2ODaB2Pd.js → layers.BZ2OjyG_.js} +1 -1
- package/dist/{layers.B_Hf0SF-.js → layers.BZGMS_YL.js} +517 -517
- package/dist/{layers.Ym7pRGM7.js → layers.B_Ifrq8A.js} +3 -3
- package/dist/{layers.DElpVOY-.js → layers.B_bguWvG.js} +1 -1
- package/dist/{layers.B39TZ2WV.js → layers.BaDLTNuw.js} +1 -1
- package/dist/{layers.B3odqoHb.js → layers.BbNPJK3G.js} +1 -1
- package/dist/{layers.BFLg4UGe.js → layers.BbX2Gt06.js} +1 -1
- package/dist/{layers.DCvUAfE1.js → layers.BcC4jCYQ.js} +1 -1
- package/dist/{layers.B64g6Zx2.js → layers.BcND7kmj.js} +1 -1
- package/dist/{layers.L_XjkGw6.js → layers.BcsSvL4N.js} +16 -16
- package/dist/layers.Bdma-bi1.js +1 -0
- package/dist/{layers.CPV5PaJ7.js → layers.BgH53BCx.js} +1 -1
- package/dist/{layers.C5rttXXy.js → layers.Bg_eB6d4.js} +4 -4
- package/dist/{layers.CvJxfPxo.js → layers.BhbIzB4V.js} +1 -1
- package/dist/{layers.k2UyvrHI.js → layers.BiFjyQe_.js} +1 -1
- package/dist/{layers.D9A031XO.js → layers.Bk2R9iWo.js} +2 -2
- package/dist/{layers.CTmkjIN6.js → layers.Bo8XWCDb.js} +1 -1
- package/dist/{layers.hkFN-BS0.js → layers.BoOJNRFl.js} +1 -1
- package/dist/{layers.CR10RAJi.js → layers.Bpk4Ctcr.js} +2 -2
- package/dist/{layers.UbqG2dp_.js → layers.BrNJ0Pz_.js} +1 -1
- package/dist/{layers.BUkDq4ln.js → layers.Brul_6T5.js} +1 -1
- package/dist/{layers.LOjND5R4.js → layers.Bsu1AT8z.js} +2 -2
- package/dist/{layers.CmHSmrZm.js → layers.BthCFGNg.js} +1 -1
- package/dist/{layers.CHHqQlm1.js → layers.Bti2UxbF.js} +1 -1
- package/dist/{layers.CMS1o_sE.js → layers.BuhxW9HQ.js} +1 -1
- package/dist/{layers.C3K_Whht.js → layers.BwnZ1xpT.js} +1 -1
- package/dist/{layers.C1KhBpGU.js → layers.C-B2iYxw.js} +1 -1
- package/dist/{layers.DMvWe0pJ.js → layers.C-PLaaW1.js} +2 -2
- package/dist/{layers.Bbl6qitU.js → layers.C1I8OftT.js} +1 -1
- package/dist/{layers.Cn6OfRlw.js → layers.C2Tygpbi.js} +1 -1
- package/dist/{layers.B8i9d7Qz.js → layers.C4DqDLg-.js} +38 -32
- package/dist/{layers.DrtkQKK7.js → layers.C5aZwGJ8.js} +1 -1
- package/dist/{layers.oFAtdeQ1.js → layers.C5htK5yR.js} +3 -3
- package/dist/{layers.D90-hSDT.js → layers.C6CCN2wS.js} +2 -2
- package/dist/{layers.CH23k4XD.js → layers.C76T9ib9.js} +1 -1
- package/dist/{layers.OEP2K3db.js → layers.C8KErGD4.js} +1 -1
- package/dist/{layers.BCFHxkpM.js → layers.C9-yhnQ_.js} +1 -1
- package/dist/{layers.Dol0x5Jd.js → layers.CA01MCW7.js} +1 -1
- package/dist/{layers.Ba97nTEK.js → layers.CBAr-ccc.js} +1 -1
- package/dist/{layers.BST6tR9a.js → layers.CBHnRD32.js} +1 -1
- package/dist/{layers.BDxQSquK.js → layers.CHRstlUi.js} +1 -1
- package/dist/{layers.DQCPMqIN.js → layers.CHyEShQb.js} +1 -1
- package/dist/layers.CHzF8aN-.js +118 -0
- package/dist/{layers.Y41CVpLS.js → layers.CL0btCq5.js} +33 -33
- package/dist/layers.CLPJWTr_.js +1 -0
- package/dist/{layers.DKPzrygv.js → layers.CNohXvTM.js} +1 -1
- package/dist/{layers.HcI9cOEd.js → layers.COVT50CF.js} +47 -47
- package/dist/{layers.B6UkAKu5.js → layers.CP74FqYL.js} +78 -78
- package/dist/{layers.CnD3z0eZ.js → layers.CPIGYQzV.js} +1 -1
- package/dist/{layers.DIrkcLlA.js → layers.CVJ3dtpa.js} +63 -63
- package/dist/{layers.CEXVJbhn.js → layers.CVJGf_dS.js} +1 -1
- package/dist/{layers.BZcZF6Ct.js → layers.CXyre7fi.js} +1 -1
- package/dist/{layers.CDLdte-o.js → layers.CYAKjsCY.js} +1 -1
- package/dist/{layers.BPnpanwd.js → layers.CZuNERKr.js} +1 -1
- package/dist/{layers.ClaqpFnu.js → layers.C_0V8gfT.js} +2 -2
- package/dist/layers.C_LpHycI.js +122 -0
- package/dist/{layers.C_dOgKfE.js → layers.CcUrvj1L.js} +1 -1
- package/dist/{layers.BD5uUnI2.js → layers.CewW7kYw.js} +279 -279
- package/dist/{layers.CnloMtKN.js → layers.CgEWPiYB.js} +14 -14
- package/dist/{layers.C-G7-Jg3.js → layers.Ch4JHkKx.js} +1 -1
- package/dist/{layers.CSjWzlk9.js → layers.Cj303CSV.js} +1 -1
- package/dist/{layers.Dg8Wbn90.js → layers.Cju8Sa_Q.js} +1 -1
- package/dist/{layers.DxGDxkXA.js → layers.Cjxt8nIg.js} +47 -47
- package/dist/{layers.D2vOkfMK.js → layers.Cllpx3ld.js} +1 -1
- package/dist/{layers.DDRgaMwu.js → layers.Cpo4EON4.js} +1 -1
- package/dist/layers.CrLpnenG.js +1 -0
- package/dist/{layers.BXGiOI1Z.js → layers.CruBr5KJ.js} +1 -1
- package/dist/{layers.FstVqdQC.js → layers.Cs3lCndw.js} +151 -151
- package/dist/{layers.Bfd5bOAD.js → layers.Csx06TKa.js} +1 -1
- package/dist/{layers.Cx14IKzN.js → layers.CtNxT4bX.js} +1 -1
- package/dist/{layers.BDhuxbhX.js → layers.Ctkab7zE.js} +1 -1
- package/dist/{layers.DARK07JA.js → layers.CtyUp91J.js} +1 -1
- package/dist/{layers.BjZInKjA.js → layers.CwbKR3tp.js} +2 -2
- package/dist/{layers.gRKbOYG-.js → layers.CxEkiqDR.js} +26 -26
- package/dist/{layers.DGZUGztZ.js → layers.D-pR7pmV.js} +29 -29
- package/dist/{layers.ChykDTOy.js → layers.D0tiOhqA.js} +1 -1
- package/dist/{layers.CGc04km7.js → layers.D3LfwBOp.js} +1 -1
- package/dist/{layers.cp645rbn.js → layers.D3Mywbyx.js} +1 -1
- package/dist/{layers.I5-pSyca.js → layers.D4qPD37W.js} +1 -1
- package/dist/{layers.BhM2iCwB.js → layers.D5_CFDU_.js} +1 -1
- package/dist/{layers.DhiFm4jW.js → layers.D63Vq18T.js} +1 -1
- package/dist/{layers.BdanmQPF.js → layers.D6IcbDJa.js} +1 -1
- package/dist/{layers.B0pdr1hX.js → layers.D6_cQf9O.js} +33 -33
- package/dist/{layers.kthR742N.js → layers.D6a6qxmr.js} +1 -1
- package/dist/layers.D7xAhxaO.js +6 -0
- package/dist/{layers.BuQ1nJmP.js → layers.D8qe0Siv.js} +1 -1
- package/dist/{layers.PO65UmTA.js → layers.DAUJf380.js} +1 -1
- package/dist/{layers.Bwpn7zKE.js → layers.DBBjhYox.js} +1 -1
- package/dist/{layers.5BbX0Xoz.js → layers.DBZ4nt4A.js} +57 -57
- package/dist/{layers.BJMMuP5r.js → layers.DBb6ZTQb.js} +1 -1
- package/dist/{layers.B0EkntbT.js → layers.DCZZx-_I.js} +1 -1
- package/dist/{layers.CphCG076.js → layers.DCpKUlgF.js} +1 -1
- package/dist/{layers.rRMBW9ET.js → layers.DDkR5Ts6.js} +251 -251
- package/dist/{layers.BPe9NQzP.js → layers.DEcSY6CT.js} +1 -1
- package/dist/{layers.DYx3Ot6h.js → layers.DFHjT2lH.js} +1 -1
- package/dist/{layers.DXaSAlDN.js → layers.DGECi3uy.js} +1 -1
- package/dist/{layers.PhLwHKUM.js → layers.DHeN0kJF.js} +1 -1
- package/dist/{layers.C5uR7AiN.js → layers.DIHGOC7q.js} +1 -1
- package/dist/{layers.ChPHYv68.js → layers.DIisKDqA.js} +1 -1
- package/dist/{layers.tbRLuldN.js → layers.DKAO_t2e.js} +1 -1
- package/dist/layers.DKDhSm3W.js +1 -0
- package/dist/{layers.CwPFdFUT.js → layers.DL7GcZkM.js} +1 -1
- package/dist/{layers.I-MG0ir4.js → layers.DLBoqOPY.js} +7051 -7014
- package/dist/{layers.iw01AOuQ.js → layers.DMKRtGOO.js} +96 -96
- package/dist/{layers.BLB-feoT.js → layers.DOxdGhXS.js} +1 -1
- package/dist/{layers.DeB3waPT.js → layers.DQ2Xcr60.js} +1 -1
- package/dist/layers.DRJbljY3.js +2 -0
- package/dist/{layers.Bk2PdkMX.js → layers.DSv_J9bL.js} +1 -1
- package/dist/{layers.DAx0hT2g.js → layers.DUrMIw9R.js} +1 -1
- package/dist/{layers.fTcEk1do.js → layers.DUt_7Rf9.js} +7 -7
- package/dist/{layers.D18RSmmQ.js → layers.DV-7KP2x.js} +1 -1
- package/dist/layers.DWAHzpeJ.js +65 -0
- package/dist/{layers.Ck0iJfoW.js → layers.D_Wzp8Cn.js} +1 -1
- package/dist/{layers.BFOl7cA-.js → layers.DakFhu3n.js} +1 -1
- package/dist/{layers.BBU3ik5q.js → layers.DdfiL5kD.js} +3 -3
- package/dist/{layers.DEfJs03Z.js → layers.DeDtDGVu.js} +1 -1
- package/dist/{layers.DalYdEkL.js → layers.DfaL2q8R.js} +4 -4
- package/dist/{layers.D68FZk66.js → layers.DfnEKrUj.js} +1 -1
- package/dist/{layers.BkMfeJ9R.js → layers.DixGTGe2.js} +1 -1
- package/dist/{layers.Dyor8Hot.js → layers.Dj9C8dFr.js} +28 -28
- package/dist/{layers.Ci0x4aAi.js → layers.DlsG5gru.js} +5 -5
- package/dist/{layers.DFd9A85i.js → layers.Dp-Xbgxy.js} +4 -4
- package/dist/{layers.BLSqqbWP.js → layers.DpFjxIHM.js} +4 -4
- package/dist/{layers.x6Qk2Mwl.js → layers.DrLqWw04.js} +1 -1
- package/dist/{layers.Dxrm0nEM.js → layers.DsT1BxXu.js} +140 -140
- package/dist/{layers.Ci0QS82_.js → layers.Dt7NdfDn.js} +1 -1
- package/dist/{layers.BoabOlrX.js → layers.Duxds2E7.js} +1 -1
- package/dist/{layers.DsAtBUs-.js → layers.DxXZMHl1.js} +5 -5
- package/dist/{layers.BvZFIFgz.js → layers.Dz0pDzZ2.js} +1 -1
- package/dist/{layers.Cp82yltX.js → layers.DzSwrBkm.js} +1 -1
- package/dist/{layers.DO-G3uLL.js → layers.DzXwulE9.js} +1 -1
- package/dist/layers.E0TqyNY6.js +202 -0
- package/dist/{layers.CiNAQOA-.js → layers.EdniTKSB.js} +2 -2
- package/dist/{layers.Bz0ApNUe.js → layers.IYUvfd4q.js} +14 -14
- package/dist/{layers.ChAMqLmE.js → layers.JIqu3EuS.js} +1 -1
- package/dist/{layers.CCRe_IA7.js → layers.JoXvoQtK.js} +1 -1
- package/dist/{layers.CeMe5scF.js → layers.LKsuEHeo.js} +1 -1
- package/dist/{layers.Cxmncz59.js → layers.LW-EdoNU.js} +1 -1
- package/dist/{layers.p9hSNB6N.js → layers.NLUe-Zd7.js} +1 -1
- package/dist/{layers.x6ioP3u0.js → layers.OG2GCG5d.js} +1 -1
- package/dist/layers.O_QfH9Tw.js +55 -0
- package/dist/{layers.B-ie1_cm.js → layers.Q61rVzjQ.js} +1 -1
- package/dist/{layers.ChJyurjQ.js → layers.QMSF2I3x.js} +1 -1
- package/dist/{layers.C51kZnWr.js → layers.RC04NTdF.js} +1 -1
- package/dist/{layers.D-ZYFolm.js → layers.X2Q_jYIN.js} +1 -1
- package/dist/{layers.CZh7NZyl.js → layers.Y9024OPf.js} +1 -1
- package/dist/{layers.-RxAm5pH.js → layers.Zcvgtj43.js} +47 -47
- package/dist/{layers.DK_t52oS.js → layers.dE10rGCq.js} +390 -390
- package/dist/{layers.c_QDfgff.js → layers.dJ7Y_uj4.js} +4 -4
- package/dist/layers.dbGRsALw.js +10 -0
- package/dist/{layers.kY3ZYtED.js → layers.gQj2seW8.js} +1 -1
- package/dist/{layers.BpXiFzvR.js → layers.gnhLHWor.js} +1 -1
- package/dist/{layers.CO4NHmK3.js → layers.iZHGKF34.js} +1 -1
- package/dist/{layers.CZMy0ug4.js → layers.k9xSs9fH.js} +1 -1
- package/dist/{layers.BBB7YGK1.js → layers.kuAa_osE.js} +1 -1
- package/dist/{layers.CR4riLSc.js → layers.nK8yMUfw.js} +639 -639
- package/dist/{layers.BHDiP2sq.js → layers.oeHNlcSJ.js} +1482 -1482
- package/dist/{layers.WsdOSV4y.js → layers.oyFM1DlU.js} +1 -1
- package/dist/{layers.DhzTwBn5.js → layers.sctyB8h-.js} +1 -1
- package/dist/{layers.Ch7C0MR9.js → layers.uim2_WMD.js} +1 -1
- package/dist/layers.wKm27PFc.js +8 -0
- package/dist/{layers.dqI-yLmM.js → layers.wQvpu0z-.js} +1 -1
- package/dist/{layers.paz6tc0L.js → layers.wpRKShXC.js} +1 -1
- package/dist/{layers.Dzc83sE7.js → layers.y6ChlfJ8.js} +1 -1
- package/dist/{layers.CqM3rL4-.js → layers.zOav7lS3.js} +1 -1
- package/package.json +1 -4
- package/dist/layers.BK01wvsE.js +0 -10
- package/dist/layers.BQLZhz6B.js +0 -6
- package/dist/layers.BUsBCyiL.js +0 -202
- package/dist/layers.BkjjkAwW.js +0 -2
- package/dist/layers.BwfB_nzW.js +0 -8
- package/dist/layers.CQXDzk5h.js +0 -1
- package/dist/layers.CeVpKhli.js +0 -122
- package/dist/layers.DTDpNGfk.js +0 -1
- package/dist/layers.Dk9dbz6F.js +0 -118
- package/dist/layers.DtoCH9Nn.js +0 -1
- package/dist/layers.DzaH7mDC.js +0 -65
- package/dist/layers.Tatx7z0m.js +0 -55
- package/dist/layers.h0tSRttU.js +0 -1
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { a as we, s as
|
|
2
|
-
import { a as
|
|
3
|
-
import { K as se } from "./layers.
|
|
1
|
+
import { a as we, s as ve, c as $t, g as st, o as _e, n as ke, b as Pe, d as Lt, l as X, e as Le, f as Ie, j as v, i as At, q as Ae, u as B, R as nt, S as wt, T as te, Z as Ne, V as ee, W as Bt } from "./layers.4utgKYyK.js";
|
|
2
|
+
import { a as Se, b as zt, d as Me, g as Nt, c as Re, e as Ce } from "./layers.DWAHzpeJ.js";
|
|
3
|
+
import { K as se } from "./layers.DLBoqOPY.js";
|
|
4
4
|
var Yt = function() {
|
|
5
|
-
var t = function(
|
|
6
|
-
for (
|
|
5
|
+
var t = function(dt, w, k, L) {
|
|
6
|
+
for (k = k || {}, L = dt.length; L--; k[dt[L]] = w)
|
|
7
7
|
;
|
|
8
|
-
return
|
|
9
|
-
}, e = [1, 2], o = [1, 3], s = [1, 4],
|
|
8
|
+
return k;
|
|
9
|
+
}, e = [1, 2], o = [1, 3], s = [1, 4], i = [2, 4], a = [1, 9], c = [1, 11], l = [1, 13], p = [1, 14], r = [1, 16], x = [1, 17], T = [1, 18], u = [1, 24], g = [1, 25], m = [1, 26], _ = [1, 27], I = [1, 28], V = [1, 29], S = [1, 30], O = [1, 31], R = [1, 32], q = [1, 33], z = [1, 34], J = [1, 35], $ = [1, 36], H = [1, 37], K = [1, 38], F = [1, 39], W = [1, 41], Z = [1, 42], U = [1, 43], Q = [1, 44], tt = [1, 45], N = [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], P = [4, 5, 16, 50, 52, 53], j = [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], rt = [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], A = [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], Gt = [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], ht = [68, 69, 70], ot = [1, 120], Mt = {
|
|
10
10
|
trace: function() {
|
|
11
11
|
},
|
|
12
12
|
yy: {},
|
|
13
13
|
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 },
|
|
14
14
|
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" },
|
|
15
15
|
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]],
|
|
16
|
-
performAction: function(w,
|
|
17
|
-
var
|
|
16
|
+
performAction: function(w, k, L, b, M, h, Et) {
|
|
17
|
+
var d = h.length - 1;
|
|
18
18
|
switch (M) {
|
|
19
19
|
case 3:
|
|
20
|
-
return b.apply(d
|
|
20
|
+
return b.apply(h[d]), h[d];
|
|
21
21
|
case 4:
|
|
22
22
|
case 9:
|
|
23
23
|
this.$ = [];
|
|
24
24
|
break;
|
|
25
25
|
case 5:
|
|
26
26
|
case 10:
|
|
27
|
-
d
|
|
27
|
+
h[d - 1].push(h[d]), this.$ = h[d - 1];
|
|
28
28
|
break;
|
|
29
29
|
case 6:
|
|
30
30
|
case 7:
|
|
31
31
|
case 11:
|
|
32
32
|
case 12:
|
|
33
|
-
this.$ = d
|
|
33
|
+
this.$ = h[d];
|
|
34
34
|
break;
|
|
35
35
|
case 8:
|
|
36
36
|
case 13:
|
|
37
37
|
this.$ = [];
|
|
38
38
|
break;
|
|
39
39
|
case 15:
|
|
40
|
-
d
|
|
40
|
+
h[d].type = "createParticipant", this.$ = h[d];
|
|
41
41
|
break;
|
|
42
42
|
case 16:
|
|
43
|
-
d
|
|
43
|
+
h[d - 1].unshift({ type: "boxStart", boxData: b.parseBoxData(h[d - 2]) }), h[d - 1].push({ type: "boxEnd", boxText: h[d - 2] }), this.$ = h[d - 1];
|
|
44
44
|
break;
|
|
45
45
|
case 18:
|
|
46
|
-
this.$ = { type: "sequenceIndex", sequenceIndex: Number(d
|
|
46
|
+
this.$ = { type: "sequenceIndex", sequenceIndex: Number(h[d - 2]), sequenceIndexStep: Number(h[d - 1]), sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
|
|
47
47
|
break;
|
|
48
48
|
case 19:
|
|
49
|
-
this.$ = { type: "sequenceIndex", sequenceIndex: Number(d
|
|
49
|
+
this.$ = { type: "sequenceIndex", sequenceIndex: Number(h[d - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
|
|
50
50
|
break;
|
|
51
51
|
case 20:
|
|
52
52
|
this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: b.LINETYPE.AUTONUMBER };
|
|
@@ -55,95 +55,95 @@ var Yt = function() {
|
|
|
55
55
|
this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
|
|
56
56
|
break;
|
|
57
57
|
case 22:
|
|
58
|
-
this.$ = { type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: d
|
|
58
|
+
this.$ = { type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: h[d - 1] };
|
|
59
59
|
break;
|
|
60
60
|
case 23:
|
|
61
|
-
this.$ = { type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: d
|
|
61
|
+
this.$ = { type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: h[d - 1] };
|
|
62
62
|
break;
|
|
63
63
|
case 29:
|
|
64
|
-
b.setDiagramTitle(d
|
|
64
|
+
b.setDiagramTitle(h[d].substring(6)), this.$ = h[d].substring(6);
|
|
65
65
|
break;
|
|
66
66
|
case 30:
|
|
67
|
-
b.setDiagramTitle(d
|
|
67
|
+
b.setDiagramTitle(h[d].substring(7)), this.$ = h[d].substring(7);
|
|
68
68
|
break;
|
|
69
69
|
case 31:
|
|
70
|
-
this.$ = d
|
|
70
|
+
this.$ = h[d].trim(), b.setAccTitle(this.$);
|
|
71
71
|
break;
|
|
72
72
|
case 32:
|
|
73
73
|
case 33:
|
|
74
|
-
this.$ = d
|
|
74
|
+
this.$ = h[d].trim(), b.setAccDescription(this.$);
|
|
75
75
|
break;
|
|
76
76
|
case 34:
|
|
77
|
-
d
|
|
77
|
+
h[d - 1].unshift({ type: "loopStart", loopText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.LOOP_START }), h[d - 1].push({ type: "loopEnd", loopText: h[d - 2], signalType: b.LINETYPE.LOOP_END }), this.$ = h[d - 1];
|
|
78
78
|
break;
|
|
79
79
|
case 35:
|
|
80
|
-
d
|
|
80
|
+
h[d - 1].unshift({ type: "rectStart", color: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.RECT_START }), h[d - 1].push({ type: "rectEnd", color: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.RECT_END }), this.$ = h[d - 1];
|
|
81
81
|
break;
|
|
82
82
|
case 36:
|
|
83
|
-
d
|
|
83
|
+
h[d - 1].unshift({ type: "optStart", optText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.OPT_START }), h[d - 1].push({ type: "optEnd", optText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.OPT_END }), this.$ = h[d - 1];
|
|
84
84
|
break;
|
|
85
85
|
case 37:
|
|
86
|
-
d
|
|
86
|
+
h[d - 1].unshift({ type: "altStart", altText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.ALT_START }), h[d - 1].push({ type: "altEnd", signalType: b.LINETYPE.ALT_END }), this.$ = h[d - 1];
|
|
87
87
|
break;
|
|
88
88
|
case 38:
|
|
89
|
-
d
|
|
89
|
+
h[d - 1].unshift({ type: "parStart", parText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.PAR_START }), h[d - 1].push({ type: "parEnd", signalType: b.LINETYPE.PAR_END }), this.$ = h[d - 1];
|
|
90
90
|
break;
|
|
91
91
|
case 39:
|
|
92
|
-
d
|
|
92
|
+
h[d - 1].unshift({ type: "parStart", parText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.PAR_OVER_START }), h[d - 1].push({ type: "parEnd", signalType: b.LINETYPE.PAR_END }), this.$ = h[d - 1];
|
|
93
93
|
break;
|
|
94
94
|
case 40:
|
|
95
|
-
d
|
|
95
|
+
h[d - 1].unshift({ type: "criticalStart", criticalText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.CRITICAL_START }), h[d - 1].push({ type: "criticalEnd", signalType: b.LINETYPE.CRITICAL_END }), this.$ = h[d - 1];
|
|
96
96
|
break;
|
|
97
97
|
case 41:
|
|
98
|
-
d
|
|
98
|
+
h[d - 1].unshift({ type: "breakStart", breakText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.BREAK_START }), h[d - 1].push({ type: "breakEnd", optText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.BREAK_END }), this.$ = h[d - 1];
|
|
99
99
|
break;
|
|
100
100
|
case 43:
|
|
101
|
-
this.$ = d
|
|
101
|
+
this.$ = h[d - 3].concat([{ type: "option", optionText: b.parseMessage(h[d - 1]), signalType: b.LINETYPE.CRITICAL_OPTION }, h[d]]);
|
|
102
102
|
break;
|
|
103
103
|
case 45:
|
|
104
|
-
this.$ = d
|
|
104
|
+
this.$ = h[d - 3].concat([{ type: "and", parText: b.parseMessage(h[d - 1]), signalType: b.LINETYPE.PAR_AND }, h[d]]);
|
|
105
105
|
break;
|
|
106
106
|
case 47:
|
|
107
|
-
this.$ = d
|
|
107
|
+
this.$ = h[d - 3].concat([{ type: "else", altText: b.parseMessage(h[d - 1]), signalType: b.LINETYPE.ALT_ELSE }, h[d]]);
|
|
108
108
|
break;
|
|
109
109
|
case 48:
|
|
110
|
-
d
|
|
110
|
+
h[d - 3].draw = "participant", h[d - 3].type = "addParticipant", h[d - 3].description = b.parseMessage(h[d - 1]), this.$ = h[d - 3];
|
|
111
111
|
break;
|
|
112
112
|
case 49:
|
|
113
|
-
d
|
|
113
|
+
h[d - 1].draw = "participant", h[d - 1].type = "addParticipant", this.$ = h[d - 1];
|
|
114
114
|
break;
|
|
115
115
|
case 50:
|
|
116
|
-
d
|
|
116
|
+
h[d - 3].draw = "actor", h[d - 3].type = "addParticipant", h[d - 3].description = b.parseMessage(h[d - 1]), this.$ = h[d - 3];
|
|
117
117
|
break;
|
|
118
118
|
case 51:
|
|
119
|
-
d
|
|
119
|
+
h[d - 1].draw = "actor", h[d - 1].type = "addParticipant", this.$ = h[d - 1];
|
|
120
120
|
break;
|
|
121
121
|
case 52:
|
|
122
|
-
d
|
|
122
|
+
h[d - 1].type = "destroyParticipant", this.$ = h[d - 1];
|
|
123
123
|
break;
|
|
124
124
|
case 53:
|
|
125
|
-
this.$ = [d
|
|
125
|
+
this.$ = [h[d - 1], { type: "addNote", placement: h[d - 2], actor: h[d - 1].actor, text: h[d] }];
|
|
126
126
|
break;
|
|
127
127
|
case 54:
|
|
128
|
-
d
|
|
128
|
+
h[d - 2] = [].concat(h[d - 1], h[d - 1]).slice(0, 2), h[d - 2][0] = h[d - 2][0].actor, h[d - 2][1] = h[d - 2][1].actor, this.$ = [h[d - 1], { type: "addNote", placement: b.PLACEMENT.OVER, actor: h[d - 2].slice(0, 2), text: h[d] }];
|
|
129
129
|
break;
|
|
130
130
|
case 55:
|
|
131
|
-
this.$ = [d
|
|
131
|
+
this.$ = [h[d - 1], { type: "addLinks", actor: h[d - 1].actor, text: h[d] }];
|
|
132
132
|
break;
|
|
133
133
|
case 56:
|
|
134
|
-
this.$ = [d
|
|
134
|
+
this.$ = [h[d - 1], { type: "addALink", actor: h[d - 1].actor, text: h[d] }];
|
|
135
135
|
break;
|
|
136
136
|
case 57:
|
|
137
|
-
this.$ = [d
|
|
137
|
+
this.$ = [h[d - 1], { type: "addProperties", actor: h[d - 1].actor, text: h[d] }];
|
|
138
138
|
break;
|
|
139
139
|
case 58:
|
|
140
|
-
this.$ = [d
|
|
140
|
+
this.$ = [h[d - 1], { type: "addDetails", actor: h[d - 1].actor, text: h[d] }];
|
|
141
141
|
break;
|
|
142
142
|
case 61:
|
|
143
|
-
this.$ = [d
|
|
143
|
+
this.$ = [h[d - 2], h[d]];
|
|
144
144
|
break;
|
|
145
145
|
case 62:
|
|
146
|
-
this.$ = d
|
|
146
|
+
this.$ = h[d];
|
|
147
147
|
break;
|
|
148
148
|
case 63:
|
|
149
149
|
this.$ = b.PLACEMENT.LEFTOF;
|
|
@@ -153,25 +153,25 @@ var Yt = function() {
|
|
|
153
153
|
break;
|
|
154
154
|
case 65:
|
|
155
155
|
this.$ = [
|
|
156
|
-
d
|
|
157
|
-
d
|
|
158
|
-
{ type: "addMessage", from: d
|
|
159
|
-
{ type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: d
|
|
156
|
+
h[d - 4],
|
|
157
|
+
h[d - 1],
|
|
158
|
+
{ type: "addMessage", from: h[d - 4].actor, to: h[d - 1].actor, signalType: h[d - 3], msg: h[d], activate: !0 },
|
|
159
|
+
{ type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: h[d - 1] }
|
|
160
160
|
];
|
|
161
161
|
break;
|
|
162
162
|
case 66:
|
|
163
163
|
this.$ = [
|
|
164
|
-
d
|
|
165
|
-
d
|
|
166
|
-
{ type: "addMessage", from: d
|
|
167
|
-
{ type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: d
|
|
164
|
+
h[d - 4],
|
|
165
|
+
h[d - 1],
|
|
166
|
+
{ type: "addMessage", from: h[d - 4].actor, to: h[d - 1].actor, signalType: h[d - 3], msg: h[d] },
|
|
167
|
+
{ type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: h[d - 4] }
|
|
168
168
|
];
|
|
169
169
|
break;
|
|
170
170
|
case 67:
|
|
171
|
-
this.$ = [d
|
|
171
|
+
this.$ = [h[d - 3], h[d - 1], { type: "addMessage", from: h[d - 3].actor, to: h[d - 1].actor, signalType: h[d - 2], msg: h[d] }];
|
|
172
172
|
break;
|
|
173
173
|
case 68:
|
|
174
|
-
this.$ = { type: "addParticipant", actor: d
|
|
174
|
+
this.$ = { type: "addParticipant", actor: h[d] };
|
|
175
175
|
break;
|
|
176
176
|
case 69:
|
|
177
177
|
this.$ = b.LINETYPE.SOLID_OPEN;
|
|
@@ -198,75 +198,75 @@ var Yt = function() {
|
|
|
198
198
|
this.$ = b.LINETYPE.DOTTED_POINT;
|
|
199
199
|
break;
|
|
200
200
|
case 77:
|
|
201
|
-
this.$ = b.parseMessage(d
|
|
201
|
+
this.$ = b.parseMessage(h[d].trim().substring(1));
|
|
202
202
|
break;
|
|
203
203
|
}
|
|
204
204
|
},
|
|
205
|
-
table: [{ 3: 1, 4: e, 5: o, 6: s }, { 1: [3] }, { 3: 5, 4: e, 5: o, 6: s }, { 3: 6, 4: e, 5: o, 6: s }, 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],
|
|
205
|
+
table: [{ 3: 1, 4: e, 5: o, 6: s }, { 1: [3] }, { 3: 5, 4: e, 5: o, 6: s }, { 3: 6, 4: e, 5: o, 6: s }, 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: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 50: H, 52: K, 53: F, 54: W, 59: Z, 60: U, 61: Q, 62: tt, 70: N }, t(y, [2, 5]), { 9: 47, 12: 12, 13: l, 14: p, 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 50: H, 52: K, 53: F, 54: W, 59: Z, 60: U, 61: Q, 62: tt, 70: N }, t(y, [2, 7]), t(y, [2, 8]), t(y, [2, 14]), { 12: 48, 50: H, 52: K, 53: F }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: N }, { 22: 55, 70: N }, { 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: N }, { 22: 72, 70: N }, { 22: 73, 70: N }, { 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: N }, { 22: 88, 70: N }, { 22: 89, 70: N }, { 22: 90, 70: N }, t([5, 51, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79], [2, 68]), t(y, [2, 6]), t(y, [2, 15]), t(P, [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(j, i, { 7: 97 }), t(j, i, { 7: 98 }), t(j, i, { 7: 99 }), t(rt, i, { 40: 100, 7: 101 }), t(A, i, { 42: 102, 7: 103 }), t(A, i, { 7: 103, 42: 104 }), t(Gt, i, { 45: 105, 7: 106 }), t(j, 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: N }, t(ht, [2, 69]), t(ht, [2, 70]), t(ht, [2, 71]), t(ht, [2, 72]), t(ht, [2, 73]), t(ht, [2, 74]), t(ht, [2, 75]), t(ht, [2, 76]), { 22: 116, 70: N }, { 22: 118, 58: 117, 70: N }, { 70: [2, 63] }, { 70: [2, 64] }, { 56: 119, 79: ot }, { 56: 121, 79: ot }, { 56: 122, 79: ot }, { 56: 123, 79: ot }, { 4: [1, 126], 5: [1, 128], 11: 125, 12: 127, 16: [1, 124], 50: H, 52: K, 53: F }, { 5: [1, 129] }, t(y, [2, 19]), t(y, [2, 20]), t(y, [2, 22]), t(y, [2, 23]), { 4: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 16: [1, 130], 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 50: H, 52: K, 53: F, 54: W, 59: Z, 60: U, 61: Q, 62: tt, 70: N }, { 4: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 16: [1, 131], 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 50: H, 52: K, 53: F, 54: W, 59: Z, 60: U, 61: Q, 62: tt, 70: N }, { 4: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 16: [1, 132], 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 50: H, 52: K, 53: F, 54: W, 59: Z, 60: U, 61: Q, 62: tt, 70: N }, { 16: [1, 133] }, { 4: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 16: [2, 46], 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 49: [1, 134], 50: H, 52: K, 53: F, 54: W, 59: Z, 60: U, 61: Q, 62: tt, 70: N }, { 16: [1, 135] }, { 4: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 16: [2, 44], 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 48: [1, 136], 50: H, 52: K, 53: F, 54: W, 59: Z, 60: U, 61: Q, 62: tt, 70: N }, { 16: [1, 137] }, { 16: [1, 138] }, { 4: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 16: [2, 42], 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 47: [1, 139], 50: H, 52: K, 53: F, 54: W, 59: Z, 60: U, 61: Q, 62: tt, 70: N }, { 4: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 16: [1, 140], 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 50: H, 52: K, 53: F, 54: W, 59: Z, 60: U, 61: Q, 62: tt, 70: N }, { 15: [1, 141] }, t(y, [2, 49]), { 15: [1, 142] }, t(y, [2, 51]), t(y, [2, 52]), { 22: 143, 70: N }, { 22: 144, 70: N }, { 56: 145, 79: ot }, { 56: 146, 79: ot }, { 56: 147, 79: ot }, { 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(P, [2, 10]), { 12: 149, 50: H, 52: K, 53: F }, t(P, [2, 12]), t(P, [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: ot }, { 56: 156, 79: ot }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 157, 70: N }, t(P, [2, 11]), t(rt, i, { 7: 101, 40: 158 }), t(A, i, { 7: 103, 42: 159 }), t(Gt, 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] }],
|
|
206
206
|
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] },
|
|
207
|
-
parseError: function(w,
|
|
208
|
-
if (
|
|
207
|
+
parseError: function(w, k) {
|
|
208
|
+
if (k.recoverable)
|
|
209
209
|
this.trace(w);
|
|
210
210
|
else {
|
|
211
|
-
var
|
|
212
|
-
throw
|
|
211
|
+
var L = new Error(w);
|
|
212
|
+
throw L.hash = k, L;
|
|
213
213
|
}
|
|
214
214
|
},
|
|
215
215
|
parse: function(w) {
|
|
216
|
-
var
|
|
216
|
+
var k = this, L = [0], b = [], M = [null], h = [], Et = this.table, d = "", _t = 0, Xt = 0, Te = 2, Jt = 1, be = h.slice.call(arguments, 1), Y = Object.create(this.lexer), pt = { yy: {} };
|
|
217
217
|
for (var Ct in this.yy)
|
|
218
|
-
Object.prototype.hasOwnProperty.call(this.yy, Ct) && (
|
|
219
|
-
Y.setInput(w,
|
|
218
|
+
Object.prototype.hasOwnProperty.call(this.yy, Ct) && (pt.yy[Ct] = this.yy[Ct]);
|
|
219
|
+
Y.setInput(w, pt.yy), pt.yy.lexer = Y, pt.yy.parser = this, typeof Y.yylloc > "u" && (Y.yylloc = {});
|
|
220
220
|
var Dt = Y.yylloc;
|
|
221
|
-
|
|
221
|
+
h.push(Dt);
|
|
222
222
|
var Ee = Y.options && Y.options.ranges;
|
|
223
|
-
typeof
|
|
223
|
+
typeof pt.yy.parseError == "function" ? this.parseError = pt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
224
224
|
function me() {
|
|
225
225
|
var lt;
|
|
226
|
-
return lt = b.pop() || Y.lex() || Jt, typeof lt != "number" && (lt instanceof Array && (b = lt, lt = b.pop()), lt =
|
|
226
|
+
return lt = b.pop() || Y.lex() || Jt, typeof lt != "number" && (lt instanceof Array && (b = lt, lt = b.pop()), lt = k.symbols_[lt] || lt), lt;
|
|
227
227
|
}
|
|
228
|
-
for (var G,
|
|
229
|
-
if (
|
|
228
|
+
for (var G, ut, et, Vt, yt = {}, kt, ct, Zt, Pt; ; ) {
|
|
229
|
+
if (ut = L[L.length - 1], this.defaultActions[ut] ? et = this.defaultActions[ut] : ((G === null || typeof G > "u") && (G = me()), et = Et[ut] && Et[ut][G]), typeof et > "u" || !et.length || !et[0]) {
|
|
230
230
|
var Ot = "";
|
|
231
|
-
|
|
232
|
-
for (
|
|
233
|
-
this.terminals_[
|
|
234
|
-
Y.showPosition ? Ot = "Parse error on line " + (
|
|
231
|
+
Pt = [];
|
|
232
|
+
for (kt in Et[ut])
|
|
233
|
+
this.terminals_[kt] && kt > Te && Pt.push("'" + this.terminals_[kt] + "'");
|
|
234
|
+
Y.showPosition ? Ot = "Parse error on line " + (_t + 1) + `:
|
|
235
235
|
` + Y.showPosition() + `
|
|
236
|
-
Expecting ` +
|
|
236
|
+
Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[G] || G) + "'" : Ot = "Parse error on line " + (_t + 1) + ": Unexpected " + (G == Jt ? "end of input" : "'" + (this.terminals_[G] || G) + "'"), this.parseError(Ot, {
|
|
237
237
|
text: Y.match,
|
|
238
238
|
token: this.terminals_[G] || G,
|
|
239
239
|
line: Y.yylineno,
|
|
240
240
|
loc: Dt,
|
|
241
|
-
expected:
|
|
241
|
+
expected: Pt
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
244
|
if (et[0] instanceof Array && et.length > 1)
|
|
245
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
245
|
+
throw new Error("Parse Error: multiple actions possible at state: " + ut + ", token: " + G);
|
|
246
246
|
switch (et[0]) {
|
|
247
247
|
case 1:
|
|
248
|
-
|
|
248
|
+
L.push(G), M.push(Y.yytext), h.push(Y.yylloc), L.push(et[1]), G = null, Xt = Y.yyleng, d = Y.yytext, _t = Y.yylineno, Dt = Y.yylloc;
|
|
249
249
|
break;
|
|
250
250
|
case 2:
|
|
251
251
|
if (ct = this.productions_[et[1]][1], yt.$ = M[M.length - ct], yt._$ = {
|
|
252
|
-
first_line:
|
|
253
|
-
last_line:
|
|
254
|
-
first_column:
|
|
255
|
-
last_column:
|
|
252
|
+
first_line: h[h.length - (ct || 1)].first_line,
|
|
253
|
+
last_line: h[h.length - 1].last_line,
|
|
254
|
+
first_column: h[h.length - (ct || 1)].first_column,
|
|
255
|
+
last_column: h[h.length - 1].last_column
|
|
256
256
|
}, Ee && (yt._$.range = [
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
h[h.length - (ct || 1)].range[0],
|
|
258
|
+
h[h.length - 1].range[1]
|
|
259
259
|
]), Vt = this.performAction.apply(yt, [
|
|
260
|
-
|
|
260
|
+
d,
|
|
261
261
|
Xt,
|
|
262
|
-
|
|
263
|
-
|
|
262
|
+
_t,
|
|
263
|
+
pt.yy,
|
|
264
264
|
et[1],
|
|
265
265
|
M,
|
|
266
|
-
|
|
266
|
+
h
|
|
267
267
|
].concat(be)), typeof Vt < "u")
|
|
268
268
|
return Vt;
|
|
269
|
-
ct && (
|
|
269
|
+
ct && (L = L.slice(0, -1 * ct * 2), M = M.slice(0, -1 * ct), h = h.slice(0, -1 * ct)), L.push(this.productions_[et[1]][0]), M.push(yt.$), h.push(yt._$), Zt = Et[L[L.length - 2]][L[L.length - 1]], L.push(Zt);
|
|
270
270
|
break;
|
|
271
271
|
case 3:
|
|
272
272
|
return !0;
|
|
@@ -275,17 +275,17 @@ Expecting ` + Lt.join(", ") + ", got '" + (this.terminals_[G] || G) + "'" : Ot =
|
|
|
275
275
|
return !0;
|
|
276
276
|
}
|
|
277
277
|
}, ye = /* @__PURE__ */ function() {
|
|
278
|
-
var
|
|
278
|
+
var dt = {
|
|
279
279
|
EOF: 1,
|
|
280
|
-
parseError: function(
|
|
280
|
+
parseError: function(k, L) {
|
|
281
281
|
if (this.yy.parser)
|
|
282
|
-
this.yy.parser.parseError(
|
|
282
|
+
this.yy.parser.parseError(k, L);
|
|
283
283
|
else
|
|
284
|
-
throw new Error(
|
|
284
|
+
throw new Error(k);
|
|
285
285
|
},
|
|
286
286
|
// resets the lexer, sets new input
|
|
287
|
-
setInput: function(w,
|
|
288
|
-
return this.yy =
|
|
287
|
+
setInput: function(w, k) {
|
|
288
|
+
return this.yy = k || this.yy || {}, this._input = w, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
289
289
|
first_line: 1,
|
|
290
290
|
first_column: 0,
|
|
291
291
|
last_line: 1,
|
|
@@ -296,22 +296,22 @@ Expecting ` + Lt.join(", ") + ", got '" + (this.terminals_[G] || G) + "'" : Ot =
|
|
|
296
296
|
input: function() {
|
|
297
297
|
var w = this._input[0];
|
|
298
298
|
this.yytext += w, this.yyleng++, this.offset++, this.match += w, this.matched += w;
|
|
299
|
-
var
|
|
300
|
-
return
|
|
299
|
+
var k = w.match(/(?:\r\n?|\n).*/g);
|
|
300
|
+
return k ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), w;
|
|
301
301
|
},
|
|
302
302
|
// unshifts one char (or a string) into the input
|
|
303
303
|
unput: function(w) {
|
|
304
|
-
var
|
|
305
|
-
this._input = w + this._input, this.yytext = this.yytext.substr(0, this.yytext.length -
|
|
304
|
+
var k = w.length, L = w.split(/(?:\r\n?|\n)/g);
|
|
305
|
+
this._input = w + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - k), this.offset -= k;
|
|
306
306
|
var b = this.match.split(/(?:\r\n?|\n)/g);
|
|
307
|
-
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1),
|
|
307
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), L.length - 1 && (this.yylineno -= L.length - 1);
|
|
308
308
|
var M = this.yylloc.range;
|
|
309
309
|
return this.yylloc = {
|
|
310
310
|
first_line: this.yylloc.first_line,
|
|
311
311
|
last_line: this.yylineno + 1,
|
|
312
312
|
first_column: this.yylloc.first_column,
|
|
313
|
-
last_column:
|
|
314
|
-
}, this.options.ranges && (this.yylloc.range = [M[0], M[0] + this.yyleng -
|
|
313
|
+
last_column: L ? (L.length === b.length ? this.yylloc.first_column : 0) + b[b.length - L.length].length - L[0].length : this.yylloc.first_column - k
|
|
314
|
+
}, this.options.ranges && (this.yylloc.range = [M[0], M[0] + this.yyleng - k]), this.yyleng = this.yytext.length, this;
|
|
315
315
|
},
|
|
316
316
|
// When called from action, caches matched text and appends it on next action
|
|
317
317
|
more: function() {
|
|
@@ -346,13 +346,13 @@ Expecting ` + Lt.join(", ") + ", got '" + (this.terminals_[G] || G) + "'" : Ot =
|
|
|
346
346
|
},
|
|
347
347
|
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
348
348
|
showPosition: function() {
|
|
349
|
-
var w = this.pastInput(),
|
|
349
|
+
var w = this.pastInput(), k = new Array(w.length + 1).join("-");
|
|
350
350
|
return w + this.upcomingInput() + `
|
|
351
|
-
` +
|
|
351
|
+
` + k + "^";
|
|
352
352
|
},
|
|
353
353
|
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
354
|
-
test_match: function(w,
|
|
355
|
-
var
|
|
354
|
+
test_match: function(w, k) {
|
|
355
|
+
var L, b, M;
|
|
356
356
|
if (this.options.backtrack_lexer && (M = {
|
|
357
357
|
yylineno: this.yylineno,
|
|
358
358
|
yylloc: {
|
|
@@ -377,11 +377,11 @@ Expecting ` + Lt.join(", ") + ", got '" + (this.terminals_[G] || G) + "'" : Ot =
|
|
|
377
377
|
last_line: this.yylineno + 1,
|
|
378
378
|
first_column: this.yylloc.last_column,
|
|
379
379
|
last_column: b ? b[b.length - 1].length - b[b.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + w[0].length
|
|
380
|
-
}, this.yytext += w[0], this.match += w[0], this.matches = w, 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(w[0].length), this.matched += w[0],
|
|
381
|
-
return
|
|
380
|
+
}, this.yytext += w[0], this.match += w[0], this.matches = w, 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(w[0].length), this.matched += w[0], L = this.performAction.call(this, this.yy, this, k, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), L)
|
|
381
|
+
return L;
|
|
382
382
|
if (this._backtrack) {
|
|
383
|
-
for (var
|
|
384
|
-
this[
|
|
383
|
+
for (var h in M)
|
|
384
|
+
this[h] = M[h];
|
|
385
385
|
return !1;
|
|
386
386
|
}
|
|
387
387
|
return !1;
|
|
@@ -391,22 +391,22 @@ Expecting ` + Lt.join(", ") + ", got '" + (this.terminals_[G] || G) + "'" : Ot =
|
|
|
391
391
|
if (this.done)
|
|
392
392
|
return this.EOF;
|
|
393
393
|
this._input || (this.done = !0);
|
|
394
|
-
var w,
|
|
394
|
+
var w, k, L, b;
|
|
395
395
|
this._more || (this.yytext = "", this.match = "");
|
|
396
|
-
for (var M = this._currentRules(),
|
|
397
|
-
if (
|
|
398
|
-
if (
|
|
399
|
-
if (w = this.test_match(
|
|
396
|
+
for (var M = this._currentRules(), h = 0; h < M.length; h++)
|
|
397
|
+
if (L = this._input.match(this.rules[M[h]]), L && (!k || L[0].length > k[0].length)) {
|
|
398
|
+
if (k = L, b = h, this.options.backtrack_lexer) {
|
|
399
|
+
if (w = this.test_match(L, M[h]), w !== !1)
|
|
400
400
|
return w;
|
|
401
401
|
if (this._backtrack) {
|
|
402
|
-
|
|
402
|
+
k = !1;
|
|
403
403
|
continue;
|
|
404
404
|
} else
|
|
405
405
|
return !1;
|
|
406
406
|
} else if (!this.options.flex)
|
|
407
407
|
break;
|
|
408
408
|
}
|
|
409
|
-
return
|
|
409
|
+
return k ? (w = this.test_match(k, M[b]), w !== !1 ? w : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
410
410
|
` + this.showPosition(), {
|
|
411
411
|
text: "",
|
|
412
412
|
token: null,
|
|
@@ -415,36 +415,36 @@ Expecting ` + Lt.join(", ") + ", got '" + (this.terminals_[G] || G) + "'" : Ot =
|
|
|
415
415
|
},
|
|
416
416
|
// return next match that has a token
|
|
417
417
|
lex: function() {
|
|
418
|
-
var
|
|
419
|
-
return
|
|
418
|
+
var k = this.next();
|
|
419
|
+
return k || this.lex();
|
|
420
420
|
},
|
|
421
421
|
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
422
|
-
begin: function(
|
|
423
|
-
this.conditionStack.push(
|
|
422
|
+
begin: function(k) {
|
|
423
|
+
this.conditionStack.push(k);
|
|
424
424
|
},
|
|
425
425
|
// pop the previously active lexer condition state off the condition stack
|
|
426
426
|
popState: function() {
|
|
427
|
-
var
|
|
428
|
-
return
|
|
427
|
+
var k = this.conditionStack.length - 1;
|
|
428
|
+
return k > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
429
429
|
},
|
|
430
430
|
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
431
431
|
_currentRules: function() {
|
|
432
432
|
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
433
433
|
},
|
|
434
434
|
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
435
|
-
topState: function(
|
|
436
|
-
return
|
|
435
|
+
topState: function(k) {
|
|
436
|
+
return k = this.conditionStack.length - 1 - Math.abs(k || 0), k >= 0 ? this.conditionStack[k] : "INITIAL";
|
|
437
437
|
},
|
|
438
438
|
// alias for begin(condition)
|
|
439
|
-
pushState: function(
|
|
440
|
-
this.begin(
|
|
439
|
+
pushState: function(k) {
|
|
440
|
+
this.begin(k);
|
|
441
441
|
},
|
|
442
442
|
// return the number of states currently on the stack
|
|
443
443
|
stateStackSize: function() {
|
|
444
444
|
return this.conditionStack.length;
|
|
445
445
|
},
|
|
446
446
|
options: { "case-insensitive": !0 },
|
|
447
|
-
performAction: function(
|
|
447
|
+
performAction: function(k, L, b, M) {
|
|
448
448
|
switch (b) {
|
|
449
449
|
case 0:
|
|
450
450
|
return 5;
|
|
@@ -471,7 +471,7 @@ Expecting ` + Lt.join(", ") + ", got '" + (this.terminals_[G] || G) + "'" : Ot =
|
|
|
471
471
|
case 11:
|
|
472
472
|
return this.begin("ID"), 53;
|
|
473
473
|
case 12:
|
|
474
|
-
return
|
|
474
|
+
return L.yytext = L.yytext.trim(), this.begin("ALIAS"), 70;
|
|
475
475
|
case 13:
|
|
476
476
|
return this.popState(), this.popState(), this.begin("LINE"), 51;
|
|
477
477
|
case 14:
|
|
@@ -553,7 +553,7 @@ Expecting ` + Lt.join(", ") + ", got '" + (this.terminals_[G] || G) + "'" : Ot =
|
|
|
553
553
|
case 51:
|
|
554
554
|
return 5;
|
|
555
555
|
case 52:
|
|
556
|
-
return
|
|
556
|
+
return L.yytext = L.yytext.trim(), 70;
|
|
557
557
|
case 53:
|
|
558
558
|
return 73;
|
|
559
559
|
case 54:
|
|
@@ -585,7 +585,7 @@ Expecting ` + Lt.join(", ") + ", got '" + (this.terminals_[G] || G) + "'" : Ot =
|
|
|
585
585
|
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],
|
|
586
586
|
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 } }
|
|
587
587
|
};
|
|
588
|
-
return
|
|
588
|
+
return dt;
|
|
589
589
|
}();
|
|
590
590
|
Mt.lexer = ye;
|
|
591
591
|
function Rt() {
|
|
@@ -627,18 +627,18 @@ const E = new Ve(() => ({
|
|
|
627
627
|
actorKeys: []
|
|
628
628
|
}), E.records.currentBox = E.records.boxes.slice(-1)[0];
|
|
629
629
|
}, Ft = function(t, e, o, s) {
|
|
630
|
-
let
|
|
631
|
-
const
|
|
632
|
-
if (
|
|
633
|
-
if (E.records.currentBox &&
|
|
630
|
+
let i = E.records.currentBox;
|
|
631
|
+
const a = E.records.actors[t];
|
|
632
|
+
if (a) {
|
|
633
|
+
if (E.records.currentBox && a.box && E.records.currentBox !== a.box)
|
|
634
634
|
throw new Error(
|
|
635
|
-
"A same participant should only be defined in one Box: " +
|
|
635
|
+
"A same participant should only be defined in one Box: " + a.name + " can't be in '" + a.box.name + "' and in '" + E.records.currentBox.name + "' at the same time."
|
|
636
636
|
);
|
|
637
|
-
if (
|
|
637
|
+
if (i = a.box ? a.box : E.records.currentBox, a.box = i, a && e === a.name && o == null)
|
|
638
638
|
return;
|
|
639
639
|
}
|
|
640
640
|
(o == null || o.text == null) && (o = { text: e, wrap: null, type: s }), (s == null || o.text == null) && (o = { text: e, wrap: null, type: s }), E.records.actors[t] = {
|
|
641
|
-
box:
|
|
641
|
+
box: i,
|
|
642
642
|
name: e,
|
|
643
643
|
description: o.text,
|
|
644
644
|
wrap: o.wrap === void 0 && gt() || !!o.wrap,
|
|
@@ -662,7 +662,7 @@ const E = new Ve(() => ({
|
|
|
662
662
|
wrap: o.wrap === void 0 && gt() || !!o.wrap,
|
|
663
663
|
answer: s
|
|
664
664
|
});
|
|
665
|
-
}, C = function(t, e, o = { text: void 0, wrap: void 0 }, s,
|
|
665
|
+
}, C = function(t, e, o = { text: void 0, wrap: void 0 }, s, i = !1) {
|
|
666
666
|
if (s === mt.ACTIVE_END && Be(t.actor) < 1) {
|
|
667
667
|
let c = new Error("Trying to inactivate an inactive participant (" + t.actor + ")");
|
|
668
668
|
throw c.hash = {
|
|
@@ -679,7 +679,7 @@ const E = new Ve(() => ({
|
|
|
679
679
|
message: o.text,
|
|
680
680
|
wrap: o.wrap === void 0 && gt() || !!o.wrap,
|
|
681
681
|
type: s,
|
|
682
|
-
activate:
|
|
682
|
+
activate: i
|
|
683
683
|
}), !0;
|
|
684
684
|
}, Fe = function() {
|
|
685
685
|
return E.records.boxes.length > 0;
|
|
@@ -695,7 +695,7 @@ const E = new Ve(() => ({
|
|
|
695
695
|
return E.records.createdActors;
|
|
696
696
|
}, Ue = function() {
|
|
697
697
|
return E.records.destroyedActors;
|
|
698
|
-
},
|
|
698
|
+
}, vt = function(t) {
|
|
699
699
|
return E.records.actors[t];
|
|
700
700
|
}, Ge = function() {
|
|
701
701
|
return Object.keys(E.records.actors);
|
|
@@ -706,7 +706,7 @@ const E = new Ve(() => ({
|
|
|
706
706
|
}, Ze = () => E.records.sequenceNumbersEnabled, Qe = function(t) {
|
|
707
707
|
E.records.wrapEnabled = t;
|
|
708
708
|
}, gt = () => E.records.wrapEnabled !== void 0 ? E.records.wrapEnabled : st().sequence.wrap, je = function() {
|
|
709
|
-
E.reset(),
|
|
709
|
+
E.reset(), Ae();
|
|
710
710
|
}, $e = function(t) {
|
|
711
711
|
const e = t.trim(), o = {
|
|
712
712
|
text: e.replace(/^:?(?:no)?wrap:/, "").trim(),
|
|
@@ -719,12 +719,12 @@ const E = new Ve(() => ({
|
|
|
719
719
|
if (window && window.CSS)
|
|
720
720
|
window.CSS.supports("color", o) || (o = "transparent", s = t.trim());
|
|
721
721
|
else {
|
|
722
|
-
const
|
|
723
|
-
|
|
722
|
+
const i = new Option().style;
|
|
723
|
+
i.color = o, i.color !== o && (o = "transparent", s = t.trim());
|
|
724
724
|
}
|
|
725
725
|
return {
|
|
726
726
|
color: o,
|
|
727
|
-
text: s !== void 0 ?
|
|
727
|
+
text: s !== void 0 ? At(s.replace(/^:?(?:no)?wrap:/, ""), st()) : void 0,
|
|
728
728
|
wrap: s !== void 0 ? s.match(/^:?wrap:/) !== null ? !0 : s.match(/^:?nowrap:/) !== null ? !1 : void 0 : void 0
|
|
729
729
|
};
|
|
730
730
|
}, mt = {
|
|
@@ -765,40 +765,40 @@ const E = new Ve(() => ({
|
|
|
765
765
|
LEFTOF: 0,
|
|
766
766
|
RIGHTOF: 1,
|
|
767
767
|
OVER: 2
|
|
768
|
-
},
|
|
768
|
+
}, re = function(t, e, o) {
|
|
769
769
|
const s = {
|
|
770
770
|
actor: t,
|
|
771
771
|
placement: e,
|
|
772
772
|
message: o.text,
|
|
773
773
|
wrap: o.wrap === void 0 && gt() || !!o.wrap
|
|
774
|
-
},
|
|
774
|
+
}, i = [].concat(t, t);
|
|
775
775
|
E.records.notes.push(s), E.records.messages.push({
|
|
776
|
-
from:
|
|
777
|
-
to:
|
|
776
|
+
from: i[0],
|
|
777
|
+
to: i[1],
|
|
778
778
|
message: o.text,
|
|
779
779
|
wrap: o.wrap === void 0 && gt() || !!o.wrap,
|
|
780
780
|
type: mt.NOTE,
|
|
781
781
|
placement: e
|
|
782
782
|
});
|
|
783
|
-
},
|
|
784
|
-
const o =
|
|
783
|
+
}, ie = function(t, e) {
|
|
784
|
+
const o = vt(t);
|
|
785
785
|
try {
|
|
786
|
-
let s =
|
|
786
|
+
let s = At(e.text, st());
|
|
787
787
|
s = s.replace(/&/g, "&"), s = s.replace(/=/g, "=");
|
|
788
|
-
const
|
|
789
|
-
Ht(o,
|
|
788
|
+
const i = JSON.parse(s);
|
|
789
|
+
Ht(o, i);
|
|
790
790
|
} catch (s) {
|
|
791
791
|
X.error("error while parsing actor link text", s);
|
|
792
792
|
}
|
|
793
|
-
},
|
|
794
|
-
const o =
|
|
793
|
+
}, r0 = function(t, e) {
|
|
794
|
+
const o = vt(t);
|
|
795
795
|
try {
|
|
796
796
|
const c = {};
|
|
797
|
-
let l =
|
|
797
|
+
let l = At(e.text, st());
|
|
798
798
|
var s = l.indexOf("@");
|
|
799
799
|
l = l.replace(/&/g, "&"), l = l.replace(/=/g, "=");
|
|
800
|
-
var
|
|
801
|
-
c[
|
|
800
|
+
var i = l.slice(0, s - 1).trim(), a = l.slice(s + 1).trim();
|
|
801
|
+
c[i] = a, Ht(o, c);
|
|
802
802
|
} catch (c) {
|
|
803
803
|
X.error("error while parsing actor link text", c);
|
|
804
804
|
}
|
|
@@ -810,35 +810,35 @@ function Ht(t, e) {
|
|
|
810
810
|
for (let o in e)
|
|
811
811
|
t.links[o] = e[o];
|
|
812
812
|
}
|
|
813
|
-
const
|
|
814
|
-
const o =
|
|
813
|
+
const ae = function(t, e) {
|
|
814
|
+
const o = vt(t);
|
|
815
815
|
try {
|
|
816
|
-
let s =
|
|
817
|
-
const
|
|
818
|
-
|
|
816
|
+
let s = At(e.text, st());
|
|
817
|
+
const i = JSON.parse(s);
|
|
818
|
+
ne(o, i);
|
|
819
819
|
} catch (s) {
|
|
820
820
|
X.error("error while parsing actor properties text", s);
|
|
821
821
|
}
|
|
822
822
|
};
|
|
823
|
-
function
|
|
823
|
+
function ne(t, e) {
|
|
824
824
|
if (t.properties == null)
|
|
825
825
|
t.properties = e;
|
|
826
826
|
else
|
|
827
827
|
for (let o in e)
|
|
828
828
|
t.properties[o] = e[o];
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function i0() {
|
|
831
831
|
E.records.currentBox = void 0;
|
|
832
832
|
}
|
|
833
833
|
const oe = function(t, e) {
|
|
834
|
-
const o =
|
|
834
|
+
const o = vt(t), s = document.getElementById(e.text);
|
|
835
835
|
try {
|
|
836
|
-
const
|
|
837
|
-
|
|
838
|
-
} catch (
|
|
839
|
-
X.error("error while parsing actor details text",
|
|
836
|
+
const i = s.innerHTML, a = JSON.parse(i);
|
|
837
|
+
a.properties && ne(o, a.properties), a.links && Ht(o, a.links);
|
|
838
|
+
} catch (i) {
|
|
839
|
+
X.error("error while parsing actor details text", i);
|
|
840
840
|
}
|
|
841
|
-
},
|
|
841
|
+
}, a0 = function(t, e) {
|
|
842
842
|
if (t !== void 0 && t.properties !== void 0)
|
|
843
843
|
return t.properties[e];
|
|
844
844
|
}, ce = function(t) {
|
|
@@ -881,16 +881,16 @@ const oe = function(t, e) {
|
|
|
881
881
|
C(t.actor, void 0, void 0, t.signalType);
|
|
882
882
|
break;
|
|
883
883
|
case "addNote":
|
|
884
|
-
|
|
884
|
+
re(t.actor, t.placement, t.text);
|
|
885
885
|
break;
|
|
886
886
|
case "addLinks":
|
|
887
|
-
|
|
887
|
+
ie(t.actor, t.text);
|
|
888
888
|
break;
|
|
889
889
|
case "addALink":
|
|
890
|
-
|
|
890
|
+
r0(t.actor, t.text);
|
|
891
891
|
break;
|
|
892
892
|
case "addProperties":
|
|
893
|
-
|
|
893
|
+
ae(t.actor, t.text);
|
|
894
894
|
break;
|
|
895
895
|
case "addDetails":
|
|
896
896
|
oe(t.actor, t.text);
|
|
@@ -915,7 +915,7 @@ const oe = function(t, e) {
|
|
|
915
915
|
Oe(t.boxData);
|
|
916
916
|
break;
|
|
917
917
|
case "boxEnd":
|
|
918
|
-
|
|
918
|
+
i0();
|
|
919
919
|
break;
|
|
920
920
|
case "loopStart":
|
|
921
921
|
C(void 0, void 0, t.loopText, t.signalType);
|
|
@@ -976,9 +976,9 @@ const oe = function(t, e) {
|
|
|
976
976
|
addActor: Ft,
|
|
977
977
|
addMessage: Ye,
|
|
978
978
|
addSignal: C,
|
|
979
|
-
addLinks:
|
|
979
|
+
addLinks: ie,
|
|
980
980
|
addDetails: oe,
|
|
981
|
-
addProperties:
|
|
981
|
+
addProperties: ae,
|
|
982
982
|
autoWrap: gt,
|
|
983
983
|
setWrap: Qe,
|
|
984
984
|
enableSequenceNumbers: Xe,
|
|
@@ -988,13 +988,13 @@ const oe = function(t, e) {
|
|
|
988
988
|
getActors: He,
|
|
989
989
|
getCreatedActors: Ke,
|
|
990
990
|
getDestroyedActors: Ue,
|
|
991
|
-
getActor:
|
|
991
|
+
getActor: vt,
|
|
992
992
|
getActorKeys: Ge,
|
|
993
|
-
getActorProperty:
|
|
994
|
-
getAccTitle:
|
|
993
|
+
getActorProperty: a0,
|
|
994
|
+
getAccTitle: Pe,
|
|
995
995
|
getBoxes: ze,
|
|
996
|
-
getDiagramTitle:
|
|
997
|
-
setDiagramTitle:
|
|
996
|
+
getDiagramTitle: ke,
|
|
997
|
+
setDiagramTitle: _e,
|
|
998
998
|
getConfig: () => st().sequence,
|
|
999
999
|
clear: je,
|
|
1000
1000
|
parseMessage: $e,
|
|
@@ -1002,14 +1002,14 @@ const oe = function(t, e) {
|
|
|
1002
1002
|
LINETYPE: mt,
|
|
1003
1003
|
ARROWTYPE: e0,
|
|
1004
1004
|
PLACEMENT: s0,
|
|
1005
|
-
addNote:
|
|
1005
|
+
addNote: re,
|
|
1006
1006
|
setAccTitle: $t,
|
|
1007
1007
|
apply: ce,
|
|
1008
|
-
setAccDescription:
|
|
1008
|
+
setAccDescription: ve,
|
|
1009
1009
|
getAccDescription: we,
|
|
1010
1010
|
hasAtLeastOneBox: Fe,
|
|
1011
1011
|
hasAtLeastOneBoxWithTitle: We
|
|
1012
|
-
},
|
|
1012
|
+
}, n0 = (t) => `.actor {
|
|
1013
1013
|
stroke: ${t.actorBorder};
|
|
1014
1014
|
fill: ${t.actorBkg};
|
|
1015
1015
|
}
|
|
@@ -1125,26 +1125,26 @@ const oe = function(t, e) {
|
|
|
1125
1125
|
fill: ${t.actorBkg};
|
|
1126
1126
|
stroke-width: 2px;
|
|
1127
1127
|
}
|
|
1128
|
-
`, o0 =
|
|
1128
|
+
`, o0 = n0, ft = 18 * 2, le = "actor-top", he = "actor-bottom", Kt = function(t, e) {
|
|
1129
1129
|
return Me(t, e);
|
|
1130
|
-
}, c0 = function(t, e, o, s,
|
|
1130
|
+
}, c0 = function(t, e, o, s, i) {
|
|
1131
1131
|
if (e.links === void 0 || e.links === null || Object.keys(e.links).length === 0)
|
|
1132
1132
|
return { height: 0, width: 0 };
|
|
1133
|
-
const
|
|
1134
|
-
var
|
|
1135
|
-
|
|
1136
|
-
const
|
|
1137
|
-
|
|
1133
|
+
const a = e.links, c = e.actorCnt, l = e.rectData;
|
|
1134
|
+
var p = "none";
|
|
1135
|
+
i && (p = "block !important");
|
|
1136
|
+
const r = t.append("g");
|
|
1137
|
+
r.attr("id", "actor" + c + "_popup"), r.attr("class", "actorPopupMenu"), r.attr("display", p);
|
|
1138
1138
|
var x = "";
|
|
1139
1139
|
l.class !== void 0 && (x = " " + l.class);
|
|
1140
1140
|
let T = l.width > o ? l.width : o;
|
|
1141
|
-
const
|
|
1142
|
-
if (
|
|
1141
|
+
const u = r.append("rect");
|
|
1142
|
+
if (u.attr("class", "actorPopupMenuPanel" + x), u.attr("x", l.x), u.attr("y", l.height), u.attr("fill", l.fill), u.attr("stroke", l.stroke), u.attr("width", T), u.attr("height", l.height), u.attr("rx", l.rx), u.attr("ry", l.ry), a != null) {
|
|
1143
1143
|
var g = 20;
|
|
1144
|
-
for (let
|
|
1145
|
-
var m =
|
|
1146
|
-
m.attr("xlink:href",
|
|
1147
|
-
|
|
1144
|
+
for (let I in a) {
|
|
1145
|
+
var m = r.append("a"), _ = se.sanitizeUrl(a[I]);
|
|
1146
|
+
m.attr("xlink:href", _), m.attr("target", "_blank"), k0(s)(
|
|
1147
|
+
I,
|
|
1148
1148
|
m,
|
|
1149
1149
|
l.x + 10,
|
|
1150
1150
|
l.height + g,
|
|
@@ -1155,43 +1155,43 @@ const oe = function(t, e) {
|
|
|
1155
1155
|
), g += 30;
|
|
1156
1156
|
}
|
|
1157
1157
|
}
|
|
1158
|
-
return
|
|
1158
|
+
return u.attr("height", g), { height: l.height + g, width: T };
|
|
1159
1159
|
}, l0 = function(t) {
|
|
1160
1160
|
return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
|
|
1161
|
-
},
|
|
1161
|
+
}, It = async function(t, e, o = null) {
|
|
1162
1162
|
let s = t.append("foreignObject");
|
|
1163
|
-
const
|
|
1163
|
+
const i = await ee(e.text, Bt()), c = s.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();
|
|
1164
1164
|
if (s.attr("height", Math.round(c.height)).attr("width", Math.round(c.width)), e.class === "noteText") {
|
|
1165
1165
|
const l = t.node().firstChild;
|
|
1166
1166
|
l.setAttribute("height", c.height + 2 * e.textMargin);
|
|
1167
|
-
const
|
|
1168
|
-
s.attr("x", Math.round(
|
|
1167
|
+
const p = l.getBBox();
|
|
1168
|
+
s.attr("x", Math.round(p.x + p.width / 2 - c.width / 2)).attr("y", Math.round(p.y + p.height / 2 - c.height / 2));
|
|
1169
1169
|
} else if (o) {
|
|
1170
|
-
let { startx: l, stopx:
|
|
1171
|
-
if (l >
|
|
1170
|
+
let { startx: l, stopx: p, starty: r } = o;
|
|
1171
|
+
if (l > p) {
|
|
1172
1172
|
const x = l;
|
|
1173
|
-
l =
|
|
1173
|
+
l = p, p = x;
|
|
1174
1174
|
}
|
|
1175
|
-
s.attr("x", Math.round(l + Math.abs(l -
|
|
1175
|
+
s.attr("x", Math.round(l + Math.abs(l - p) / 2 - c.width / 2)), e.class === "loopText" ? s.attr("y", Math.round(r)) : s.attr("y", Math.round(r - c.height));
|
|
1176
1176
|
}
|
|
1177
1177
|
return [s];
|
|
1178
1178
|
}, bt = function(t, e) {
|
|
1179
1179
|
let o = 0, s = 0;
|
|
1180
|
-
const
|
|
1181
|
-
let l = [],
|
|
1180
|
+
const i = e.text.split(v.lineBreakRegex), [a, c] = te(e.fontSize);
|
|
1181
|
+
let l = [], p = 0, r = () => e.y;
|
|
1182
1182
|
if (e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0)
|
|
1183
1183
|
switch (e.valign) {
|
|
1184
1184
|
case "top":
|
|
1185
1185
|
case "start":
|
|
1186
|
-
|
|
1186
|
+
r = () => Math.round(e.y + e.textMargin);
|
|
1187
1187
|
break;
|
|
1188
1188
|
case "middle":
|
|
1189
1189
|
case "center":
|
|
1190
|
-
|
|
1190
|
+
r = () => Math.round(e.y + (o + s + e.textMargin) / 2);
|
|
1191
1191
|
break;
|
|
1192
1192
|
case "bottom":
|
|
1193
1193
|
case "end":
|
|
1194
|
-
|
|
1194
|
+
r = () => Math.round(
|
|
1195
1195
|
e.y + (o + s + 2 * e.textMargin) - e.textMargin
|
|
1196
1196
|
);
|
|
1197
1197
|
break;
|
|
@@ -1211,139 +1211,139 @@ const oe = function(t, e) {
|
|
|
1211
1211
|
e.x = Math.round(e.x + e.width - e.textMargin), e.anchor = "end", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
|
|
1212
1212
|
break;
|
|
1213
1213
|
}
|
|
1214
|
-
for (let [x, T] of
|
|
1215
|
-
e.textMargin !== void 0 && e.textMargin === 0 &&
|
|
1216
|
-
const
|
|
1217
|
-
|
|
1218
|
-
const g = T ||
|
|
1214
|
+
for (let [x, T] of i.entries()) {
|
|
1215
|
+
e.textMargin !== void 0 && e.textMargin === 0 && a !== void 0 && (p = x * a);
|
|
1216
|
+
const u = t.append("text");
|
|
1217
|
+
u.attr("x", e.x), u.attr("y", r()), e.anchor !== void 0 && u.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), e.fontFamily !== void 0 && u.style("font-family", e.fontFamily), c !== void 0 && u.style("font-size", c), e.fontWeight !== void 0 && u.style("font-weight", e.fontWeight), e.fill !== void 0 && u.attr("fill", e.fill), e.class !== void 0 && u.attr("class", e.class), e.dy !== void 0 ? u.attr("dy", e.dy) : p !== 0 && u.attr("dy", p);
|
|
1218
|
+
const g = T || Ne;
|
|
1219
1219
|
if (e.tspan) {
|
|
1220
|
-
const m =
|
|
1220
|
+
const m = u.append("tspan");
|
|
1221
1221
|
m.attr("x", e.x), e.fill !== void 0 && m.attr("fill", e.fill), m.text(g);
|
|
1222
1222
|
} else
|
|
1223
|
-
|
|
1224
|
-
e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (s += (
|
|
1223
|
+
u.text(g);
|
|
1224
|
+
e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (s += (u._groups || u)[0][0].getBBox().height, o = s), l.push(u);
|
|
1225
1225
|
}
|
|
1226
1226
|
return l;
|
|
1227
|
-
},
|
|
1228
|
-
function o(
|
|
1229
|
-
return
|
|
1227
|
+
}, de = function(t, e) {
|
|
1228
|
+
function o(i, a, c, l, p) {
|
|
1229
|
+
return i + "," + a + " " + (i + c) + "," + a + " " + (i + c) + "," + (a + l - p) + " " + (i + c - p * 1.2) + "," + (a + l) + " " + i + "," + (a + l);
|
|
1230
1230
|
}
|
|
1231
1231
|
const s = t.append("polygon");
|
|
1232
1232
|
return s.attr("points", o(e.x, e.y, e.width, e.height, 7)), s.attr("class", "labelBox"), e.y = e.y + e.height / 2, bt(t, e), s;
|
|
1233
1233
|
};
|
|
1234
|
-
let
|
|
1235
|
-
const
|
|
1236
|
-
t.select && o.forEach((
|
|
1237
|
-
const
|
|
1238
|
-
!s.mirrorActors &&
|
|
1234
|
+
let at = -1;
|
|
1235
|
+
const pe = (t, e, o, s) => {
|
|
1236
|
+
t.select && o.forEach((i) => {
|
|
1237
|
+
const a = e[i], c = t.select("#actor" + a.actorCnt);
|
|
1238
|
+
!s.mirrorActors && a.stopy ? c.attr("y2", a.stopy + a.height / 2) : s.mirrorActors && c.attr("y2", a.stopy);
|
|
1239
1239
|
});
|
|
1240
|
-
},
|
|
1241
|
-
const
|
|
1242
|
-
var
|
|
1243
|
-
s || (
|
|
1244
|
-
const
|
|
1240
|
+
}, h0 = async function(t, e, o, s) {
|
|
1241
|
+
const i = s ? e.stopy : e.starty, a = e.x + e.width / 2, c = i + 5, l = t.append("g").lower();
|
|
1242
|
+
var p = l;
|
|
1243
|
+
s || (at++, Object.keys(e.links || {}).length && !o.forceMenus && p.attr("onclick", l0(`actor${at}_popup`)).attr("cursor", "pointer"), p.append("line").attr("id", "actor" + at).attr("x1", a).attr("y1", c).attr("x2", a).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"), p = l.append("g"), e.actorCnt = at, e.links != null && p.attr("id", "root-" + at));
|
|
1244
|
+
const r = Nt();
|
|
1245
1245
|
var x = "actor";
|
|
1246
|
-
e.properties != null && e.properties.class ? x = e.properties.class :
|
|
1247
|
-
const T = Kt(
|
|
1248
|
-
if (e.rectData =
|
|
1246
|
+
e.properties != null && e.properties.class ? x = e.properties.class : r.fill = "#eaeaea", s ? x += ` ${he}` : x += ` ${le}`, r.x = e.x, r.y = i, r.width = e.width, r.height = e.height, r.class = x, r.rx = 3, r.ry = 3, r.name = e.name;
|
|
1247
|
+
const T = Kt(p, r);
|
|
1248
|
+
if (e.rectData = r, e.properties != null && e.properties.icon) {
|
|
1249
1249
|
const g = e.properties.icon.trim();
|
|
1250
|
-
g.charAt(0) === "@" ? Re(
|
|
1250
|
+
g.charAt(0) === "@" ? Re(p, r.x + r.width - 20, r.y + 10, g.substr(1)) : Ce(p, r.x + r.width - 20, r.y + 10, g);
|
|
1251
1251
|
}
|
|
1252
|
-
await Ut(o,
|
|
1252
|
+
await Ut(o, nt(e.description))(
|
|
1253
1253
|
e.description,
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1254
|
+
p,
|
|
1255
|
+
r.x,
|
|
1256
|
+
r.y,
|
|
1257
|
+
r.width,
|
|
1258
|
+
r.height,
|
|
1259
1259
|
{ class: "actor" },
|
|
1260
1260
|
o
|
|
1261
1261
|
);
|
|
1262
|
-
let
|
|
1262
|
+
let u = e.height;
|
|
1263
1263
|
if (T.node) {
|
|
1264
1264
|
const g = T.node().getBBox();
|
|
1265
|
-
e.height = g.height,
|
|
1265
|
+
e.height = g.height, u = g.height;
|
|
1266
1266
|
}
|
|
1267
|
-
return
|
|
1268
|
-
},
|
|
1269
|
-
const
|
|
1270
|
-
t.lower(), s || (
|
|
1267
|
+
return u;
|
|
1268
|
+
}, d0 = async function(t, e, o, s) {
|
|
1269
|
+
const i = s ? e.stopy : e.starty, a = e.x + e.width / 2, c = i + 80;
|
|
1270
|
+
t.lower(), s || (at++, t.append("line").attr("id", "actor" + at).attr("x1", a).attr("y1", c).attr("x2", a).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"), e.actorCnt = at);
|
|
1271
1271
|
const l = t.append("g");
|
|
1272
|
-
let
|
|
1273
|
-
s ?
|
|
1274
|
-
const
|
|
1275
|
-
|
|
1272
|
+
let p = "actor-man";
|
|
1273
|
+
s ? p += ` ${he}` : p += ` ${le}`, l.attr("class", p), l.attr("name", e.name);
|
|
1274
|
+
const r = Nt();
|
|
1275
|
+
r.x = e.x, r.y = i, r.fill = "#eaeaea", r.width = e.width, r.height = e.height, r.class = "actor", r.rx = 3, r.ry = 3, l.append("line").attr("id", "actor-man-torso" + at).attr("x1", a).attr("y1", i + 25).attr("x2", a).attr("y2", i + 45), l.append("line").attr("id", "actor-man-arms" + at).attr("x1", a - ft / 2).attr("y1", i + 33).attr("x2", a + ft / 2).attr("y2", i + 33), l.append("line").attr("x1", a - ft / 2).attr("y1", i + 60).attr("x2", a).attr("y2", i + 45), l.append("line").attr("x1", a).attr("y1", i + 45).attr("x2", a + ft / 2 - 2).attr("y2", i + 60);
|
|
1276
1276
|
const x = l.append("circle");
|
|
1277
|
-
x.attr("cx", e.x + e.width / 2), x.attr("cy",
|
|
1277
|
+
x.attr("cx", e.x + e.width / 2), x.attr("cy", i + 10), x.attr("r", 15), x.attr("width", e.width), x.attr("height", e.height);
|
|
1278
1278
|
const T = l.node().getBBox();
|
|
1279
|
-
return e.height = T.height, await Ut(o,
|
|
1279
|
+
return e.height = T.height, await Ut(o, nt(e.description))(
|
|
1280
1280
|
e.description,
|
|
1281
1281
|
l,
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1282
|
+
r.x,
|
|
1283
|
+
r.y + 35,
|
|
1284
|
+
r.width,
|
|
1285
|
+
r.height,
|
|
1286
1286
|
{ class: "actor" },
|
|
1287
1287
|
o
|
|
1288
1288
|
), e.height;
|
|
1289
|
-
},
|
|
1289
|
+
}, p0 = async function(t, e, o, s) {
|
|
1290
1290
|
switch (e.type) {
|
|
1291
1291
|
case "actor":
|
|
1292
|
-
return await h0(t, e, o, s);
|
|
1293
|
-
case "participant":
|
|
1294
1292
|
return await d0(t, e, o, s);
|
|
1293
|
+
case "participant":
|
|
1294
|
+
return await h0(t, e, o, s);
|
|
1295
1295
|
}
|
|
1296
|
-
},
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1296
|
+
}, u0 = async function(t, e, o) {
|
|
1297
|
+
const i = t.append("g");
|
|
1298
|
+
ue(i, e), e.name && await Ut(o)(
|
|
1299
1299
|
e.name,
|
|
1300
|
-
|
|
1300
|
+
i,
|
|
1301
1301
|
e.x,
|
|
1302
1302
|
e.y + (e.textMaxHeight || 0) / 2,
|
|
1303
1303
|
e.width,
|
|
1304
1304
|
0,
|
|
1305
1305
|
{ class: "text" },
|
|
1306
1306
|
o
|
|
1307
|
-
),
|
|
1307
|
+
), i.lower();
|
|
1308
1308
|
}, f0 = function(t) {
|
|
1309
1309
|
return t.append("g");
|
|
1310
|
-
}, g0 = function(t, e, o, s,
|
|
1311
|
-
const
|
|
1312
|
-
|
|
1310
|
+
}, g0 = function(t, e, o, s, i) {
|
|
1311
|
+
const a = Nt(), c = e.anchored;
|
|
1312
|
+
a.x = e.startx, a.y = e.starty, a.class = "activation" + i % 3, a.width = e.stopx - e.startx, a.height = o - e.starty, Kt(c, a);
|
|
1313
1313
|
}, x0 = async function(t, e, o, s) {
|
|
1314
1314
|
const {
|
|
1315
|
-
boxMargin:
|
|
1316
|
-
boxTextMargin:
|
|
1315
|
+
boxMargin: i,
|
|
1316
|
+
boxTextMargin: a,
|
|
1317
1317
|
labelBoxHeight: c,
|
|
1318
1318
|
labelBoxWidth: l,
|
|
1319
|
-
messageFontFamily:
|
|
1320
|
-
messageFontSize:
|
|
1319
|
+
messageFontFamily: p,
|
|
1320
|
+
messageFontSize: r,
|
|
1321
1321
|
messageFontWeight: x
|
|
1322
|
-
} = s, T = t.append("g"),
|
|
1323
|
-
return T.append("line").attr("x1",
|
|
1322
|
+
} = s, T = t.append("g"), u = function(_, I, V, S) {
|
|
1323
|
+
return T.append("line").attr("x1", _).attr("y1", I).attr("x2", V).attr("y2", S).attr("class", "loopLine");
|
|
1324
1324
|
};
|
|
1325
|
-
|
|
1326
|
-
|
|
1325
|
+
u(e.startx, e.starty, e.stopx, e.starty), u(e.stopx, e.starty, e.stopx, e.stopy), u(e.startx, e.stopy, e.stopx, e.stopy), u(e.startx, e.starty, e.startx, e.stopy), e.sections !== void 0 && e.sections.forEach(function(_) {
|
|
1326
|
+
u(e.startx, _.y, e.stopx, _.y).style(
|
|
1327
1327
|
"stroke-dasharray",
|
|
1328
1328
|
"3, 3"
|
|
1329
1329
|
);
|
|
1330
1330
|
});
|
|
1331
1331
|
let g = zt();
|
|
1332
|
-
g.text = o, g.x = e.startx, g.y = e.starty, g.fontFamily =
|
|
1333
|
-
let m =
|
|
1332
|
+
g.text = o, g.x = e.startx, g.y = e.starty, g.fontFamily = p, g.fontSize = r, g.fontWeight = x, g.anchor = "middle", g.valign = "middle", g.tspan = !1, g.width = l || 50, g.height = c || 20, g.textMargin = a, g.class = "labelText", de(T, g), g = fe(), g.text = e.title, g.x = e.startx + l / 2 + (e.stopx - e.startx) / 2, g.y = e.starty + i + a, g.anchor = "middle", g.valign = "middle", g.textMargin = a, g.class = "loopText", g.fontFamily = p, g.fontSize = r, g.fontWeight = x, g.wrap = !0;
|
|
1333
|
+
let m = nt(g.text) ? await It(T, g, e) : bt(T, g);
|
|
1334
1334
|
if (e.sectionTitles !== void 0) {
|
|
1335
|
-
for (const [
|
|
1336
|
-
if (
|
|
1337
|
-
g.text =
|
|
1335
|
+
for (const [_, I] of Object.entries(e.sectionTitles))
|
|
1336
|
+
if (I.message) {
|
|
1337
|
+
g.text = I.message, g.x = e.startx + (e.stopx - e.startx) / 2, g.y = e.sections[_].y + i + a, g.class = "loopText", g.anchor = "middle", g.valign = "middle", g.tspan = !1, g.fontFamily = p, g.fontSize = r, g.fontWeight = x, g.wrap = e.wrap, nt(g.text) ? (e.starty = e.sections[_].y, await It(T, g, e)) : bt(T, g);
|
|
1338
1338
|
let V = Math.round(
|
|
1339
|
-
m.map((
|
|
1339
|
+
m.map((S) => (S._groups || S)[0][0].getBBox().height).reduce((S, O) => S + O)
|
|
1340
1340
|
);
|
|
1341
|
-
e.sections[
|
|
1341
|
+
e.sections[_].height += V - (i + a);
|
|
1342
1342
|
}
|
|
1343
1343
|
}
|
|
1344
1344
|
return e.height = Math.round(e.stopy - e.starty), T;
|
|
1345
|
-
},
|
|
1346
|
-
|
|
1345
|
+
}, ue = function(t, e) {
|
|
1346
|
+
Se(t, e);
|
|
1347
1347
|
}, y0 = function(t) {
|
|
1348
1348
|
t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
|
|
1349
1349
|
"d",
|
|
@@ -1365,7 +1365,7 @@ const ue = (t, e, o, s) => {
|
|
|
1365
1365
|
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");
|
|
1366
1366
|
}, w0 = function(t) {
|
|
1367
1367
|
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);
|
|
1368
|
-
},
|
|
1368
|
+
}, v0 = function(t) {
|
|
1369
1369
|
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");
|
|
1370
1370
|
}, fe = function() {
|
|
1371
1371
|
return {
|
|
@@ -1382,7 +1382,7 @@ const ue = (t, e, o, s) => {
|
|
|
1382
1382
|
tspan: !0,
|
|
1383
1383
|
valign: void 0
|
|
1384
1384
|
};
|
|
1385
|
-
},
|
|
1385
|
+
}, _0 = function() {
|
|
1386
1386
|
return {
|
|
1387
1387
|
x: 0,
|
|
1388
1388
|
y: 0,
|
|
@@ -1395,79 +1395,79 @@ const ue = (t, e, o, s) => {
|
|
|
1395
1395
|
ry: 0
|
|
1396
1396
|
};
|
|
1397
1397
|
}, Ut = /* @__PURE__ */ function() {
|
|
1398
|
-
function t(
|
|
1399
|
-
const
|
|
1400
|
-
|
|
1401
|
-
}
|
|
1402
|
-
function e(
|
|
1403
|
-
const { actorFontSize: g, actorFontFamily: m, actorFontWeight:
|
|
1404
|
-
for (let O = 0; O <
|
|
1405
|
-
const R = O *
|
|
1406
|
-
q.append("tspan").attr("x", l +
|
|
1398
|
+
function t(a, c, l, p, r, x, T) {
|
|
1399
|
+
const u = c.append("text").attr("x", l + r / 2).attr("y", p + x / 2 + 5).style("text-anchor", "middle").text(a);
|
|
1400
|
+
i(u, T);
|
|
1401
|
+
}
|
|
1402
|
+
function e(a, c, l, p, r, x, T, u) {
|
|
1403
|
+
const { actorFontSize: g, actorFontFamily: m, actorFontWeight: _ } = u, [I, V] = te(g), S = a.split(v.lineBreakRegex);
|
|
1404
|
+
for (let O = 0; O < S.length; O++) {
|
|
1405
|
+
const R = O * I - I * (S.length - 1) / 2, q = c.append("text").attr("x", l + r / 2).attr("y", p).style("text-anchor", "middle").style("font-size", V).style("font-weight", _).style("font-family", m);
|
|
1406
|
+
q.append("tspan").attr("x", l + r / 2).attr("dy", R).text(S[O]), q.attr("y", p + x / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), i(q, T);
|
|
1407
1407
|
}
|
|
1408
1408
|
}
|
|
1409
|
-
function o(
|
|
1410
|
-
const g = c.append("switch"),
|
|
1411
|
-
|
|
1409
|
+
function o(a, c, l, p, r, x, T, u) {
|
|
1410
|
+
const g = c.append("switch"), _ = g.append("foreignObject").attr("x", l).attr("y", p).attr("width", r).attr("height", x).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1411
|
+
_.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(a), e(a, g, l, p, r, x, T, u), i(_, T);
|
|
1412
1412
|
}
|
|
1413
|
-
async function s(
|
|
1414
|
-
const g = await wt(
|
|
1415
|
-
|
|
1413
|
+
async function s(a, c, l, p, r, x, T, u) {
|
|
1414
|
+
const g = await wt(a, Bt()), m = c.append("switch"), I = m.append("foreignObject").attr("x", l + r / 2 - g.width / 2).attr("y", p + x / 2 - g.height / 2).attr("width", g.width).attr("height", g.height).append("xhtml:div").style("height", "100%").style("width", "100%");
|
|
1415
|
+
I.append("div").style("text-align", "center").style("vertical-align", "middle").html(await ee(a, Bt())), e(a, m, l, p, r, x, T, u), i(I, T);
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1417
|
+
function i(a, c) {
|
|
1418
1418
|
for (const l in c)
|
|
1419
|
-
c.hasOwnProperty(l) &&
|
|
1419
|
+
c.hasOwnProperty(l) && a.attr(l, c[l]);
|
|
1420
1420
|
}
|
|
1421
|
-
return function(
|
|
1422
|
-
return c ? s :
|
|
1421
|
+
return function(a, c = !1) {
|
|
1422
|
+
return c ? s : a.textPlacement === "fo" ? o : a.textPlacement === "old" ? t : e;
|
|
1423
1423
|
};
|
|
1424
|
-
}(),
|
|
1425
|
-
function t(
|
|
1426
|
-
const T =
|
|
1424
|
+
}(), k0 = /* @__PURE__ */ function() {
|
|
1425
|
+
function t(i, a, c, l, p, r, x) {
|
|
1426
|
+
const T = a.append("text").attr("x", c).attr("y", l).style("text-anchor", "start").text(i);
|
|
1427
1427
|
s(T, x);
|
|
1428
1428
|
}
|
|
1429
|
-
function e(
|
|
1430
|
-
const { actorFontSize:
|
|
1431
|
-
for (let
|
|
1432
|
-
const V =
|
|
1433
|
-
|
|
1429
|
+
function e(i, a, c, l, p, r, x, T) {
|
|
1430
|
+
const { actorFontSize: u, actorFontFamily: g, actorFontWeight: m } = T, _ = i.split(v.lineBreakRegex);
|
|
1431
|
+
for (let I = 0; I < _.length; I++) {
|
|
1432
|
+
const V = I * u - u * (_.length - 1) / 2, S = a.append("text").attr("x", c).attr("y", l).style("text-anchor", "start").style("font-size", u).style("font-weight", m).style("font-family", g);
|
|
1433
|
+
S.append("tspan").attr("x", c).attr("dy", V).text(_[I]), S.attr("y", l + r / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), s(S, x);
|
|
1434
1434
|
}
|
|
1435
1435
|
}
|
|
1436
|
-
function o(
|
|
1437
|
-
const
|
|
1438
|
-
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(
|
|
1436
|
+
function o(i, a, c, l, p, r, x, T) {
|
|
1437
|
+
const u = a.append("switch"), m = u.append("foreignObject").attr("x", c).attr("y", l).attr("width", p).attr("height", r).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1438
|
+
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, u, c, l, p, r, x, T), s(m, x);
|
|
1439
1439
|
}
|
|
1440
|
-
function s(
|
|
1441
|
-
for (const c in
|
|
1442
|
-
|
|
1440
|
+
function s(i, a) {
|
|
1441
|
+
for (const c in a)
|
|
1442
|
+
a.hasOwnProperty(c) && i.attr(c, a[c]);
|
|
1443
1443
|
}
|
|
1444
|
-
return function(
|
|
1445
|
-
return
|
|
1444
|
+
return function(i) {
|
|
1445
|
+
return i.textPlacement === "fo" ? o : i.textPlacement === "old" ? t : e;
|
|
1446
1446
|
};
|
|
1447
1447
|
}(), D = {
|
|
1448
1448
|
drawRect: Kt,
|
|
1449
1449
|
drawText: bt,
|
|
1450
|
-
drawLabel:
|
|
1451
|
-
drawActor:
|
|
1452
|
-
drawBox:
|
|
1450
|
+
drawLabel: de,
|
|
1451
|
+
drawActor: p0,
|
|
1452
|
+
drawBox: u0,
|
|
1453
1453
|
drawPopup: c0,
|
|
1454
1454
|
anchorElement: f0,
|
|
1455
1455
|
drawActivation: g0,
|
|
1456
1456
|
drawLoop: x0,
|
|
1457
|
-
drawBackgroundRect:
|
|
1457
|
+
drawBackgroundRect: ue,
|
|
1458
1458
|
insertArrowHead: E0,
|
|
1459
1459
|
insertArrowFilledHead: m0,
|
|
1460
1460
|
insertSequenceNumber: w0,
|
|
1461
|
-
insertArrowCrossHead:
|
|
1461
|
+
insertArrowCrossHead: v0,
|
|
1462
1462
|
insertDatabaseIcon: y0,
|
|
1463
1463
|
insertComputerIcon: T0,
|
|
1464
1464
|
insertClockIcon: b0,
|
|
1465
1465
|
getTextObj: fe,
|
|
1466
|
-
getNoteRect:
|
|
1467
|
-
fixLifeLineHeights:
|
|
1466
|
+
getNoteRect: _0,
|
|
1467
|
+
fixLifeLineHeights: pe,
|
|
1468
1468
|
sanitizeUrl: se.sanitizeUrl
|
|
1469
1469
|
};
|
|
1470
|
-
let
|
|
1470
|
+
let n = {};
|
|
1471
1471
|
const f = {
|
|
1472
1472
|
data: {
|
|
1473
1473
|
startx: void 0,
|
|
@@ -1533,27 +1533,27 @@ const f = {
|
|
|
1533
1533
|
t[e] === void 0 ? t[e] = o : t[e] = s(o, t[e]);
|
|
1534
1534
|
},
|
|
1535
1535
|
updateBounds: function(t, e, o, s) {
|
|
1536
|
-
const
|
|
1537
|
-
let
|
|
1536
|
+
const i = this;
|
|
1537
|
+
let a = 0;
|
|
1538
1538
|
function c(l) {
|
|
1539
|
-
return function(
|
|
1540
|
-
|
|
1541
|
-
const x =
|
|
1542
|
-
|
|
1539
|
+
return function(r) {
|
|
1540
|
+
a++;
|
|
1541
|
+
const x = i.sequenceItems.length - a + 1;
|
|
1542
|
+
i.updateVal(r, "starty", e - x * n.boxMargin, Math.min), i.updateVal(r, "stopy", s + x * n.boxMargin, Math.max), i.updateVal(f.data, "startx", t - x * n.boxMargin, Math.min), i.updateVal(f.data, "stopx", o + x * n.boxMargin, Math.max), l !== "activation" && (i.updateVal(r, "startx", t - x * n.boxMargin, Math.min), i.updateVal(r, "stopx", o + x * n.boxMargin, Math.max), i.updateVal(f.data, "starty", e - x * n.boxMargin, Math.min), i.updateVal(f.data, "stopy", s + x * n.boxMargin, Math.max));
|
|
1543
1543
|
};
|
|
1544
1544
|
}
|
|
1545
1545
|
this.sequenceItems.forEach(c()), this.activations.forEach(c("activation"));
|
|
1546
1546
|
},
|
|
1547
1547
|
insert: function(t, e, o, s) {
|
|
1548
|
-
const
|
|
1549
|
-
this.updateVal(f.data, "startx",
|
|
1548
|
+
const i = v.getMin(t, o), a = v.getMax(t, o), c = v.getMin(e, s), l = v.getMax(e, s);
|
|
1549
|
+
this.updateVal(f.data, "startx", i, Math.min), this.updateVal(f.data, "starty", c, Math.min), this.updateVal(f.data, "stopx", a, Math.max), this.updateVal(f.data, "stopy", l, Math.max), this.updateBounds(i, c, a, l);
|
|
1550
1550
|
},
|
|
1551
1551
|
newActivation: function(t, e, o) {
|
|
1552
|
-
const s = o[t.from.actor],
|
|
1552
|
+
const s = o[t.from.actor], i = St(t.from.actor).length || 0, a = s.x + s.width / 2 + (i - 1) * n.activationWidth / 2;
|
|
1553
1553
|
this.activations.push({
|
|
1554
|
-
startx:
|
|
1554
|
+
startx: a,
|
|
1555
1555
|
starty: this.verticalPos + 2,
|
|
1556
|
-
stopx:
|
|
1556
|
+
stopx: a + n.activationWidth,
|
|
1557
1557
|
stopy: void 0,
|
|
1558
1558
|
actor: t.from.actor,
|
|
1559
1559
|
anchored: D.anchorElement(e)
|
|
@@ -1598,7 +1598,7 @@ const f = {
|
|
|
1598
1598
|
this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
|
|
1599
1599
|
},
|
|
1600
1600
|
bumpVerticalPos: function(t) {
|
|
1601
|
-
this.verticalPos = this.verticalPos + t, this.data.stopy =
|
|
1601
|
+
this.verticalPos = this.verticalPos + t, this.data.stopy = v.getMax(this.data.stopy, this.verticalPos);
|
|
1602
1602
|
},
|
|
1603
1603
|
getVerticalPos: function() {
|
|
1604
1604
|
return this.verticalPos;
|
|
@@ -1606,16 +1606,16 @@ const f = {
|
|
|
1606
1606
|
getBounds: function() {
|
|
1607
1607
|
return { bounds: this.data, models: this.models };
|
|
1608
1608
|
}
|
|
1609
|
-
},
|
|
1610
|
-
f.bumpVerticalPos(
|
|
1611
|
-
const o =
|
|
1612
|
-
o.x = e.startx, o.y = e.starty, o.width = e.width ||
|
|
1613
|
-
const s = t.append("g"),
|
|
1614
|
-
|
|
1615
|
-
const c =
|
|
1616
|
-
c.map((
|
|
1609
|
+
}, P0 = async function(t, e) {
|
|
1610
|
+
f.bumpVerticalPos(n.boxMargin), e.height = n.boxMargin, e.starty = f.getVerticalPos();
|
|
1611
|
+
const o = Nt();
|
|
1612
|
+
o.x = e.startx, o.y = e.starty, o.width = e.width || n.width, o.class = "note";
|
|
1613
|
+
const s = t.append("g"), i = D.drawRect(s, o), a = zt();
|
|
1614
|
+
a.x = e.startx, a.y = e.starty, a.width = o.width, a.dy = "1em", a.text = e.message, a.class = "noteText", a.fontFamily = n.noteFontFamily, a.fontSize = n.noteFontSize, a.fontWeight = n.noteFontWeight, a.anchor = n.noteAlign, a.textMargin = n.noteMargin, a.valign = "center";
|
|
1615
|
+
const c = nt(a.text) ? await It(s, a) : bt(s, a), l = Math.round(
|
|
1616
|
+
c.map((p) => (p._groups || p)[0][0].getBBox().height).reduce((p, r) => p + r)
|
|
1617
1617
|
);
|
|
1618
|
-
|
|
1618
|
+
i.attr("height", l + 2 * n.noteMargin), e.height += l + 2 * n.noteMargin, f.bumpVerticalPos(l + 2 * n.noteMargin), e.stopy = e.starty + l + 2 * n.noteMargin, e.stopx = e.startx + o.width, f.insert(e.startx, e.starty, e.stopx, e.stopy), f.models.addNote(e);
|
|
1619
1619
|
}, xt = (t) => ({
|
|
1620
1620
|
fontFamily: t.messageFontFamily,
|
|
1621
1621
|
fontSize: t.messageFontSize,
|
|
@@ -1629,324 +1629,324 @@ const f = {
|
|
|
1629
1629
|
fontSize: t.actorFontSize,
|
|
1630
1630
|
fontWeight: t.actorFontWeight
|
|
1631
1631
|
});
|
|
1632
|
-
async function
|
|
1632
|
+
async function L0(t, e) {
|
|
1633
1633
|
f.bumpVerticalPos(10);
|
|
1634
|
-
const { startx: o, stopx: s, message:
|
|
1634
|
+
const { startx: o, stopx: s, message: i } = e, a = v.splitBreaks(i).length, c = nt(i), l = c ? await wt(i, st()) : B.calculateTextDimensions(i, xt(n));
|
|
1635
1635
|
if (!c) {
|
|
1636
|
-
const T = l.height /
|
|
1636
|
+
const T = l.height / a;
|
|
1637
1637
|
e.height += T, f.bumpVerticalPos(T);
|
|
1638
1638
|
}
|
|
1639
|
-
let
|
|
1639
|
+
let p, r = l.height - 10;
|
|
1640
1640
|
const x = l.width;
|
|
1641
1641
|
if (o === s) {
|
|
1642
|
-
|
|
1643
|
-
const T =
|
|
1642
|
+
p = f.getVerticalPos() + r, n.rightAngles || (r += n.boxMargin, p = f.getVerticalPos() + r), r += 30;
|
|
1643
|
+
const T = v.getMax(x / 2, n.width / 2);
|
|
1644
1644
|
f.insert(
|
|
1645
1645
|
o - T,
|
|
1646
|
-
f.getVerticalPos() - 10 +
|
|
1646
|
+
f.getVerticalPos() - 10 + r,
|
|
1647
1647
|
s + T,
|
|
1648
|
-
f.getVerticalPos() + 30 +
|
|
1648
|
+
f.getVerticalPos() + 30 + r
|
|
1649
1649
|
);
|
|
1650
1650
|
} else
|
|
1651
|
-
|
|
1652
|
-
return f.bumpVerticalPos(
|
|
1651
|
+
r += n.boxMargin, p = f.getVerticalPos() + r, f.insert(o, p - 10, s, p);
|
|
1652
|
+
return f.bumpVerticalPos(r), e.height += r, e.stopy = e.starty + e.height, f.insert(e.fromBounds, e.starty, e.toBounds, e.stopy), p;
|
|
1653
1653
|
}
|
|
1654
|
-
const
|
|
1655
|
-
const { startx:
|
|
1656
|
-
|
|
1654
|
+
const I0 = async function(t, e, o, s) {
|
|
1655
|
+
const { startx: i, stopx: a, starty: c, message: l, type: p, sequenceIndex: r, sequenceVisible: x } = e, T = B.calculateTextDimensions(l, xt(n)), u = zt();
|
|
1656
|
+
u.x = i, u.y = c + 10, u.width = a - i, u.class = "messageText", u.dy = "1em", u.text = l, u.fontFamily = n.messageFontFamily, u.fontSize = n.messageFontSize, u.fontWeight = n.messageFontWeight, u.anchor = n.messageAlign, u.valign = "center", u.textMargin = n.wrapPadding, u.tspan = !1, nt(u.text) ? await It(t, u, { startx: i, stopx: a, starty: o }) : bt(t, u);
|
|
1657
1657
|
const g = T.width;
|
|
1658
1658
|
let m;
|
|
1659
|
-
|
|
1659
|
+
i === a ? n.rightAngles ? m = t.append("path").attr(
|
|
1660
1660
|
"d",
|
|
1661
|
-
`M ${
|
|
1661
|
+
`M ${i},${o} H ${i + v.getMax(n.width / 2, g / 2)} V ${o + 25} H ${i}`
|
|
1662
1662
|
) : m = t.append("path").attr(
|
|
1663
1663
|
"d",
|
|
1664
|
-
"M " +
|
|
1665
|
-
) : (m = t.append("line"), m.attr("x1",
|
|
1666
|
-
let
|
|
1667
|
-
|
|
1668
|
-
},
|
|
1669
|
-
let l = 0,
|
|
1664
|
+
"M " + i + "," + o + " C " + (i + 60) + "," + (o - 10) + " " + (i + 60) + "," + (o + 30) + " " + i + "," + (o + 20)
|
|
1665
|
+
) : (m = t.append("line"), m.attr("x1", i), m.attr("y1", o), m.attr("x2", a), m.attr("y2", o)), p === s.db.LINETYPE.DOTTED || p === s.db.LINETYPE.DOTTED_CROSS || p === s.db.LINETYPE.DOTTED_POINT || p === s.db.LINETYPE.DOTTED_OPEN ? (m.style("stroke-dasharray", "3, 3"), m.attr("class", "messageLine1")) : m.attr("class", "messageLine0");
|
|
1666
|
+
let _ = "";
|
|
1667
|
+
n.arrowMarkerAbsolute && (_ = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, _ = _.replace(/\(/g, "\\("), _ = _.replace(/\)/g, "\\)")), m.attr("stroke-width", 2), m.attr("stroke", "none"), m.style("fill", "none"), (p === s.db.LINETYPE.SOLID || p === s.db.LINETYPE.DOTTED) && m.attr("marker-end", "url(" + _ + "#arrowhead)"), (p === s.db.LINETYPE.SOLID_POINT || p === s.db.LINETYPE.DOTTED_POINT) && m.attr("marker-end", "url(" + _ + "#filled-head)"), (p === s.db.LINETYPE.SOLID_CROSS || p === s.db.LINETYPE.DOTTED_CROSS) && m.attr("marker-end", "url(" + _ + "#crosshead)"), (x || n.showSequenceNumbers) && (m.attr("marker-start", "url(" + _ + "#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(r));
|
|
1668
|
+
}, A0 = async function(t, e, o, s, i, a, c) {
|
|
1669
|
+
let l = 0, p = 0, r, x = 0;
|
|
1670
1670
|
for (const T of s) {
|
|
1671
|
-
const
|
|
1672
|
-
|
|
1671
|
+
const u = e[T], g = u.box;
|
|
1672
|
+
r && r != g && (f.models.addBox(r), p += n.boxMargin + r.margin), g && g != r && (g.x = l + p, g.y = i, p += g.margin), u.width = u.width || n.width, u.height = v.getMax(u.height || n.height, n.height), u.margin = u.margin || n.actorMargin, x = v.getMax(x, u.height), o[u.name] && (p += u.width / 2), u.x = l + p, u.starty = f.getVerticalPos(), f.insert(u.x, i, u.x + u.width, u.height), l += u.width + p, u.box && (u.box.width = l + g.margin - u.box.x), p = u.margin, r = u.box, f.models.addActor(u);
|
|
1673
1673
|
}
|
|
1674
|
-
|
|
1674
|
+
r && f.models.addBox(r), f.bumpVerticalPos(x);
|
|
1675
1675
|
}, qt = async function(t, e, o, s) {
|
|
1676
1676
|
if (s) {
|
|
1677
|
-
let
|
|
1678
|
-
f.bumpVerticalPos(
|
|
1679
|
-
for (const
|
|
1680
|
-
const c = e[
|
|
1677
|
+
let i = 0;
|
|
1678
|
+
f.bumpVerticalPos(n.boxMargin * 2);
|
|
1679
|
+
for (const a of o) {
|
|
1680
|
+
const c = e[a];
|
|
1681
1681
|
c.stopy || (c.stopy = f.getVerticalPos());
|
|
1682
|
-
const l = await D.drawActor(t, c,
|
|
1683
|
-
|
|
1682
|
+
const l = await D.drawActor(t, c, n, !0);
|
|
1683
|
+
i = v.getMax(i, l);
|
|
1684
1684
|
}
|
|
1685
|
-
f.bumpVerticalPos(
|
|
1685
|
+
f.bumpVerticalPos(i + n.boxMargin);
|
|
1686
1686
|
} else
|
|
1687
|
-
for (const
|
|
1688
|
-
const
|
|
1689
|
-
await D.drawActor(t,
|
|
1687
|
+
for (const i of o) {
|
|
1688
|
+
const a = e[i];
|
|
1689
|
+
await D.drawActor(t, a, n, !1);
|
|
1690
1690
|
}
|
|
1691
1691
|
}, ge = function(t, e, o, s) {
|
|
1692
|
-
let
|
|
1692
|
+
let i = 0, a = 0;
|
|
1693
1693
|
for (const c of o) {
|
|
1694
|
-
const l = e[c],
|
|
1694
|
+
const l = e[c], p = R0(l), r = D.drawPopup(
|
|
1695
1695
|
t,
|
|
1696
1696
|
l,
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1697
|
+
p,
|
|
1698
|
+
n,
|
|
1699
|
+
n.forceMenus,
|
|
1700
1700
|
s
|
|
1701
1701
|
);
|
|
1702
|
-
|
|
1702
|
+
r.height > i && (i = r.height), r.width + l.x > a && (a = r.width + l.x);
|
|
1703
1703
|
}
|
|
1704
|
-
return { maxHeight:
|
|
1704
|
+
return { maxHeight: i, maxWidth: a };
|
|
1705
1705
|
}, xe = function(t) {
|
|
1706
|
-
|
|
1707
|
-
},
|
|
1706
|
+
Ie(n, t), t.fontFamily && (n.actorFontFamily = n.noteFontFamily = n.messageFontFamily = t.fontFamily), t.fontSize && (n.actorFontSize = n.noteFontSize = n.messageFontSize = t.fontSize), t.fontWeight && (n.actorFontWeight = n.noteFontWeight = n.messageFontWeight = t.fontWeight);
|
|
1707
|
+
}, St = function(t) {
|
|
1708
1708
|
return f.activations.filter(function(e) {
|
|
1709
1709
|
return e.actor === t;
|
|
1710
1710
|
});
|
|
1711
1711
|
}, jt = function(t, e) {
|
|
1712
|
-
const o = e[t], s =
|
|
1713
|
-
return
|
|
1714
|
-
}, o.x + o.width / 2 - 1),
|
|
1715
|
-
return
|
|
1712
|
+
const o = e[t], s = St(t), i = s.reduce(function(c, l) {
|
|
1713
|
+
return v.getMin(c, l.startx);
|
|
1714
|
+
}, o.x + o.width / 2 - 1), a = s.reduce(function(c, l) {
|
|
1715
|
+
return v.getMax(c, l.stopx);
|
|
1716
1716
|
}, o.x + o.width / 2 + 1);
|
|
1717
|
-
return [
|
|
1717
|
+
return [i, a];
|
|
1718
1718
|
};
|
|
1719
|
-
function
|
|
1719
|
+
function it(t, e, o, s, i) {
|
|
1720
1720
|
f.bumpVerticalPos(o);
|
|
1721
|
-
let
|
|
1721
|
+
let a = s;
|
|
1722
1722
|
if (e.id && e.message && t[e.id]) {
|
|
1723
|
-
const c = t[e.id].width, l = xt(
|
|
1724
|
-
e.message = B.wrapLabel(`[${e.message}]`, c - 2 *
|
|
1725
|
-
const
|
|
1726
|
-
|
|
1723
|
+
const c = t[e.id].width, l = xt(n);
|
|
1724
|
+
e.message = B.wrapLabel(`[${e.message}]`, c - 2 * n.wrapPadding, l), e.width = c, e.wrap = !0;
|
|
1725
|
+
const p = B.calculateTextDimensions(e.message, l), r = v.getMax(p.height, n.labelBoxHeight);
|
|
1726
|
+
a = s + r, X.debug(`${r} - ${e.message}`);
|
|
1727
1727
|
}
|
|
1728
|
-
|
|
1728
|
+
i(e), f.bumpVerticalPos(a);
|
|
1729
1729
|
}
|
|
1730
|
-
function
|
|
1731
|
-
function l(
|
|
1732
|
-
|
|
1730
|
+
function N0(t, e, o, s, i, a, c) {
|
|
1731
|
+
function l(r, x) {
|
|
1732
|
+
r.x < i[t.from].x ? (f.insert(
|
|
1733
1733
|
e.stopx - x,
|
|
1734
1734
|
e.starty,
|
|
1735
1735
|
e.startx,
|
|
1736
|
-
e.stopy +
|
|
1736
|
+
e.stopy + r.height / 2 + n.noteMargin
|
|
1737
1737
|
), e.stopx = e.stopx + x) : (f.insert(
|
|
1738
1738
|
e.startx,
|
|
1739
1739
|
e.starty,
|
|
1740
1740
|
e.stopx + x,
|
|
1741
|
-
e.stopy +
|
|
1741
|
+
e.stopy + r.height / 2 + n.noteMargin
|
|
1742
1742
|
), e.stopx = e.stopx - x);
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1745
|
-
|
|
1744
|
+
function p(r, x) {
|
|
1745
|
+
r.x < i[t.to].x ? (f.insert(
|
|
1746
1746
|
e.startx - x,
|
|
1747
1747
|
e.starty,
|
|
1748
1748
|
e.stopx,
|
|
1749
|
-
e.stopy +
|
|
1749
|
+
e.stopy + r.height / 2 + n.noteMargin
|
|
1750
1750
|
), e.startx = e.startx + x) : (f.insert(
|
|
1751
1751
|
e.stopx,
|
|
1752
1752
|
e.starty,
|
|
1753
1753
|
e.startx + x,
|
|
1754
|
-
e.stopy +
|
|
1754
|
+
e.stopy + r.height / 2 + n.noteMargin
|
|
1755
1755
|
), e.startx = e.startx - x);
|
|
1756
1756
|
}
|
|
1757
|
-
if (
|
|
1758
|
-
const
|
|
1759
|
-
l(
|
|
1757
|
+
if (a[t.to] == s) {
|
|
1758
|
+
const r = i[t.to], x = r.type == "actor" ? ft / 2 + 3 : r.width / 2 + 3;
|
|
1759
|
+
l(r, x), r.starty = o - r.height / 2, f.bumpVerticalPos(r.height / 2);
|
|
1760
1760
|
} else if (c[t.from] == s) {
|
|
1761
|
-
const
|
|
1762
|
-
if (
|
|
1763
|
-
const x =
|
|
1764
|
-
|
|
1761
|
+
const r = i[t.from];
|
|
1762
|
+
if (n.mirrorActors) {
|
|
1763
|
+
const x = r.type == "actor" ? ft / 2 : r.width / 2;
|
|
1764
|
+
p(r, x);
|
|
1765
1765
|
}
|
|
1766
|
-
|
|
1766
|
+
r.stopy = o - r.height / 2, f.bumpVerticalPos(r.height / 2);
|
|
1767
1767
|
} else if (c[t.to] == s) {
|
|
1768
|
-
const
|
|
1769
|
-
if (
|
|
1770
|
-
const x =
|
|
1771
|
-
l(
|
|
1768
|
+
const r = i[t.to];
|
|
1769
|
+
if (n.mirrorActors) {
|
|
1770
|
+
const x = r.type == "actor" ? ft / 2 + 3 : r.width / 2 + 3;
|
|
1771
|
+
l(r, x);
|
|
1772
1772
|
}
|
|
1773
|
-
|
|
1773
|
+
r.stopy = o - r.height / 2, f.bumpVerticalPos(r.height / 2);
|
|
1774
1774
|
}
|
|
1775
1775
|
}
|
|
1776
|
-
const
|
|
1777
|
-
const { securityLevel:
|
|
1778
|
-
|
|
1776
|
+
const S0 = async function(t, e, o, s) {
|
|
1777
|
+
const { securityLevel: i, sequence: a } = st();
|
|
1778
|
+
n = a;
|
|
1779
1779
|
let c;
|
|
1780
|
-
|
|
1781
|
-
const l =
|
|
1780
|
+
i === "sandbox" && (c = Lt("#i" + e));
|
|
1781
|
+
const l = i === "sandbox" ? Lt(c.nodes()[0].contentDocument.body) : Lt("body"), p = i === "sandbox" ? c.nodes()[0].contentDocument : document;
|
|
1782
1782
|
f.init(), X.debug(s.db);
|
|
1783
|
-
const
|
|
1783
|
+
const r = i === "sandbox" ? l.select(`[id="${e}"]`) : Lt(`[id="${e}"]`), x = s.db.getActors(), T = s.db.getCreatedActors(), u = s.db.getDestroyedActors(), g = s.db.getBoxes();
|
|
1784
1784
|
let m = s.db.getActorKeys();
|
|
1785
|
-
const
|
|
1786
|
-
if (
|
|
1785
|
+
const _ = s.db.getMessages(), I = s.db.getDiagramTitle(), V = s.db.hasAtLeastOneBox(), S = s.db.hasAtLeastOneBoxWithTitle(), O = await M0(x, _, s);
|
|
1786
|
+
if (n.height = await C0(x, O, g), D.insertComputerIcon(r), D.insertDatabaseIcon(r), D.insertClockIcon(r), V && (f.bumpVerticalPos(n.boxMargin), S && f.bumpVerticalPos(g[0].textMaxHeight)), n.hideUnusedParticipants === !0) {
|
|
1787
1787
|
const y = /* @__PURE__ */ new Set();
|
|
1788
|
-
|
|
1789
|
-
y.add(
|
|
1790
|
-
}), m = m.filter((
|
|
1791
|
-
}
|
|
1792
|
-
await
|
|
1793
|
-
const R = await O0(
|
|
1794
|
-
D.insertArrowHead(
|
|
1795
|
-
function q(y,
|
|
1788
|
+
_.forEach((P) => {
|
|
1789
|
+
y.add(P.from), y.add(P.to);
|
|
1790
|
+
}), m = m.filter((P) => y.has(P));
|
|
1791
|
+
}
|
|
1792
|
+
await A0(r, x, T, m, 0);
|
|
1793
|
+
const R = await O0(_, x, O, s);
|
|
1794
|
+
D.insertArrowHead(r), D.insertArrowCrossHead(r), D.insertArrowFilledHead(r), D.insertSequenceNumber(r);
|
|
1795
|
+
function q(y, P) {
|
|
1796
1796
|
const j = f.endActivation(y);
|
|
1797
|
-
j.starty + 18 >
|
|
1798
|
-
|
|
1797
|
+
j.starty + 18 > P && (j.starty = P - 6, P += 12), D.drawActivation(
|
|
1798
|
+
r,
|
|
1799
1799
|
j,
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
), f.insert(j.startx,
|
|
1800
|
+
P,
|
|
1801
|
+
n,
|
|
1802
|
+
St(y.from.actor).length
|
|
1803
|
+
), f.insert(j.startx, P - 10, j.stopx, P);
|
|
1804
1804
|
}
|
|
1805
1805
|
let z = 1, J = 1;
|
|
1806
1806
|
const $ = [], H = [];
|
|
1807
1807
|
let K = 0;
|
|
1808
|
-
for (const y of
|
|
1809
|
-
let
|
|
1808
|
+
for (const y of _) {
|
|
1809
|
+
let P, j, rt;
|
|
1810
1810
|
switch (y.type) {
|
|
1811
1811
|
case s.db.LINETYPE.NOTE:
|
|
1812
|
-
f.resetVerticalPos(), j = y.noteModel, await
|
|
1812
|
+
f.resetVerticalPos(), j = y.noteModel, await P0(r, j);
|
|
1813
1813
|
break;
|
|
1814
1814
|
case s.db.LINETYPE.ACTIVE_START:
|
|
1815
|
-
f.newActivation(y,
|
|
1815
|
+
f.newActivation(y, r, x);
|
|
1816
1816
|
break;
|
|
1817
1817
|
case s.db.LINETYPE.ACTIVE_END:
|
|
1818
1818
|
q(y, f.getVerticalPos());
|
|
1819
1819
|
break;
|
|
1820
1820
|
case s.db.LINETYPE.LOOP_START:
|
|
1821
|
-
|
|
1821
|
+
it(
|
|
1822
1822
|
R,
|
|
1823
1823
|
y,
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
(
|
|
1824
|
+
n.boxMargin,
|
|
1825
|
+
n.boxMargin + n.boxTextMargin,
|
|
1826
|
+
(A) => f.newLoop(A)
|
|
1827
1827
|
);
|
|
1828
1828
|
break;
|
|
1829
1829
|
case s.db.LINETYPE.LOOP_END:
|
|
1830
|
-
|
|
1830
|
+
P = f.endLoop(), await D.drawLoop(r, P, "loop", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
|
|
1831
1831
|
break;
|
|
1832
1832
|
case s.db.LINETYPE.RECT_START:
|
|
1833
|
-
|
|
1833
|
+
it(
|
|
1834
1834
|
R,
|
|
1835
1835
|
y,
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
(
|
|
1836
|
+
n.boxMargin,
|
|
1837
|
+
n.boxMargin,
|
|
1838
|
+
(A) => f.newLoop(void 0, A.message)
|
|
1839
1839
|
);
|
|
1840
1840
|
break;
|
|
1841
1841
|
case s.db.LINETYPE.RECT_END:
|
|
1842
|
-
|
|
1842
|
+
P = f.endLoop(), H.push(P), f.models.addLoop(P), f.bumpVerticalPos(P.stopy - f.getVerticalPos());
|
|
1843
1843
|
break;
|
|
1844
1844
|
case s.db.LINETYPE.OPT_START:
|
|
1845
|
-
|
|
1845
|
+
it(
|
|
1846
1846
|
R,
|
|
1847
1847
|
y,
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
(
|
|
1848
|
+
n.boxMargin,
|
|
1849
|
+
n.boxMargin + n.boxTextMargin,
|
|
1850
|
+
(A) => f.newLoop(A)
|
|
1851
1851
|
);
|
|
1852
1852
|
break;
|
|
1853
1853
|
case s.db.LINETYPE.OPT_END:
|
|
1854
|
-
|
|
1854
|
+
P = f.endLoop(), await D.drawLoop(r, P, "opt", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
|
|
1855
1855
|
break;
|
|
1856
1856
|
case s.db.LINETYPE.ALT_START:
|
|
1857
|
-
|
|
1857
|
+
it(
|
|
1858
1858
|
R,
|
|
1859
1859
|
y,
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
(
|
|
1860
|
+
n.boxMargin,
|
|
1861
|
+
n.boxMargin + n.boxTextMargin,
|
|
1862
|
+
(A) => f.newLoop(A)
|
|
1863
1863
|
);
|
|
1864
1864
|
break;
|
|
1865
1865
|
case s.db.LINETYPE.ALT_ELSE:
|
|
1866
|
-
|
|
1866
|
+
it(
|
|
1867
1867
|
R,
|
|
1868
1868
|
y,
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
(
|
|
1869
|
+
n.boxMargin + n.boxTextMargin,
|
|
1870
|
+
n.boxMargin,
|
|
1871
|
+
(A) => f.addSectionToLoop(A)
|
|
1872
1872
|
);
|
|
1873
1873
|
break;
|
|
1874
1874
|
case s.db.LINETYPE.ALT_END:
|
|
1875
|
-
|
|
1875
|
+
P = f.endLoop(), await D.drawLoop(r, P, "alt", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
|
|
1876
1876
|
break;
|
|
1877
1877
|
case s.db.LINETYPE.PAR_START:
|
|
1878
1878
|
case s.db.LINETYPE.PAR_OVER_START:
|
|
1879
|
-
|
|
1879
|
+
it(
|
|
1880
1880
|
R,
|
|
1881
1881
|
y,
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
(
|
|
1882
|
+
n.boxMargin,
|
|
1883
|
+
n.boxMargin + n.boxTextMargin,
|
|
1884
|
+
(A) => f.newLoop(A)
|
|
1885
1885
|
), f.saveVerticalPos();
|
|
1886
1886
|
break;
|
|
1887
1887
|
case s.db.LINETYPE.PAR_AND:
|
|
1888
|
-
|
|
1888
|
+
it(
|
|
1889
1889
|
R,
|
|
1890
1890
|
y,
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
(
|
|
1891
|
+
n.boxMargin + n.boxTextMargin,
|
|
1892
|
+
n.boxMargin,
|
|
1893
|
+
(A) => f.addSectionToLoop(A)
|
|
1894
1894
|
);
|
|
1895
1895
|
break;
|
|
1896
1896
|
case s.db.LINETYPE.PAR_END:
|
|
1897
|
-
|
|
1897
|
+
P = f.endLoop(), await D.drawLoop(r, P, "par", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
|
|
1898
1898
|
break;
|
|
1899
1899
|
case s.db.LINETYPE.AUTONUMBER:
|
|
1900
1900
|
z = y.message.start || z, J = y.message.step || J, y.message.visible ? s.db.enableSequenceNumbers() : s.db.disableSequenceNumbers();
|
|
1901
1901
|
break;
|
|
1902
1902
|
case s.db.LINETYPE.CRITICAL_START:
|
|
1903
|
-
|
|
1903
|
+
it(
|
|
1904
1904
|
R,
|
|
1905
1905
|
y,
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
(
|
|
1906
|
+
n.boxMargin,
|
|
1907
|
+
n.boxMargin + n.boxTextMargin,
|
|
1908
|
+
(A) => f.newLoop(A)
|
|
1909
1909
|
);
|
|
1910
1910
|
break;
|
|
1911
1911
|
case s.db.LINETYPE.CRITICAL_OPTION:
|
|
1912
|
-
|
|
1912
|
+
it(
|
|
1913
1913
|
R,
|
|
1914
1914
|
y,
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
(
|
|
1915
|
+
n.boxMargin + n.boxTextMargin,
|
|
1916
|
+
n.boxMargin,
|
|
1917
|
+
(A) => f.addSectionToLoop(A)
|
|
1918
1918
|
);
|
|
1919
1919
|
break;
|
|
1920
1920
|
case s.db.LINETYPE.CRITICAL_END:
|
|
1921
|
-
|
|
1921
|
+
P = f.endLoop(), await D.drawLoop(r, P, "critical", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
|
|
1922
1922
|
break;
|
|
1923
1923
|
case s.db.LINETYPE.BREAK_START:
|
|
1924
|
-
|
|
1924
|
+
it(
|
|
1925
1925
|
R,
|
|
1926
1926
|
y,
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
(
|
|
1927
|
+
n.boxMargin,
|
|
1928
|
+
n.boxMargin + n.boxTextMargin,
|
|
1929
|
+
(A) => f.newLoop(A)
|
|
1930
1930
|
);
|
|
1931
1931
|
break;
|
|
1932
1932
|
case s.db.LINETYPE.BREAK_END:
|
|
1933
|
-
|
|
1933
|
+
P = f.endLoop(), await D.drawLoop(r, P, "break", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
|
|
1934
1934
|
break;
|
|
1935
1935
|
default:
|
|
1936
1936
|
try {
|
|
1937
|
-
|
|
1938
|
-
const
|
|
1939
|
-
|
|
1937
|
+
rt = y.msgModel, rt.starty = f.getVerticalPos(), rt.sequenceIndex = z, rt.sequenceVisible = s.db.showSequenceNumbers();
|
|
1938
|
+
const A = await L0(r, rt);
|
|
1939
|
+
N0(
|
|
1940
1940
|
y,
|
|
1941
|
-
|
|
1942
|
-
|
|
1941
|
+
rt,
|
|
1942
|
+
A,
|
|
1943
1943
|
K,
|
|
1944
1944
|
x,
|
|
1945
1945
|
T,
|
|
1946
|
-
|
|
1947
|
-
), $.push({ messageModel:
|
|
1948
|
-
} catch (
|
|
1949
|
-
X.error("error while drawing message",
|
|
1946
|
+
u
|
|
1947
|
+
), $.push({ messageModel: rt, lineStartY: A }), f.models.addMessage(rt);
|
|
1948
|
+
} catch (A) {
|
|
1949
|
+
X.error("error while drawing message", A);
|
|
1950
1950
|
}
|
|
1951
1951
|
}
|
|
1952
1952
|
[
|
|
@@ -1960,59 +1960,59 @@ const v0 = async function(t, e, o, s) {
|
|
|
1960
1960
|
s.db.LINETYPE.DOTTED_POINT
|
|
1961
1961
|
].includes(y.type) && (z = z + J), K++;
|
|
1962
1962
|
}
|
|
1963
|
-
X.debug("createdActors", T), X.debug("destroyedActors",
|
|
1963
|
+
X.debug("createdActors", T), X.debug("destroyedActors", u), await qt(r, x, m, !1);
|
|
1964
1964
|
for (const y of $)
|
|
1965
|
-
await
|
|
1966
|
-
|
|
1965
|
+
await I0(r, y.messageModel, y.lineStartY, s);
|
|
1966
|
+
n.mirrorActors && await qt(r, x, m, !0), H.forEach((y) => D.drawBackgroundRect(r, y)), pe(r, x, m, n);
|
|
1967
1967
|
for (const y of f.models.boxes)
|
|
1968
|
-
y.height = f.getVerticalPos() - y.y, f.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(
|
|
1969
|
-
V && f.bumpVerticalPos(
|
|
1970
|
-
const F = ge(
|
|
1968
|
+
y.height = f.getVerticalPos() - y.y, f.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(r, y, n);
|
|
1969
|
+
V && f.bumpVerticalPos(n.boxMargin);
|
|
1970
|
+
const F = ge(r, x, m, p), { bounds: W } = f.getBounds();
|
|
1971
1971
|
let Z = W.stopy - W.starty;
|
|
1972
1972
|
Z < F.maxHeight && (Z = F.maxHeight);
|
|
1973
|
-
let U = Z + 2 *
|
|
1974
|
-
|
|
1973
|
+
let U = Z + 2 * n.diagramMarginY;
|
|
1974
|
+
n.mirrorActors && (U = U - n.boxMargin + n.bottomMarginAdj);
|
|
1975
1975
|
let Q = W.stopx - W.startx;
|
|
1976
1976
|
Q < F.maxWidth && (Q = F.maxWidth);
|
|
1977
|
-
const tt = Q + 2 *
|
|
1978
|
-
|
|
1979
|
-
const
|
|
1980
|
-
|
|
1977
|
+
const tt = Q + 2 * n.diagramMarginX;
|
|
1978
|
+
I && r.append("text").text(I).attr("x", (W.stopx - W.startx) / 2 - 2 * n.diagramMarginX).attr("y", -25), Le(r, U, tt, n.useMaxWidth);
|
|
1979
|
+
const N = I ? 40 : 0;
|
|
1980
|
+
r.attr(
|
|
1981
1981
|
"viewBox",
|
|
1982
|
-
W.startx -
|
|
1982
|
+
W.startx - n.diagramMarginX + " -" + (n.diagramMarginY + N) + " " + tt + " " + (U + N)
|
|
1983
1983
|
), X.debug("models:", f.models);
|
|
1984
1984
|
};
|
|
1985
1985
|
async function M0(t, e, o) {
|
|
1986
1986
|
const s = {};
|
|
1987
|
-
for (const
|
|
1988
|
-
if (t[
|
|
1989
|
-
const
|
|
1990
|
-
if (
|
|
1987
|
+
for (const i of e)
|
|
1988
|
+
if (t[i.to] && t[i.from]) {
|
|
1989
|
+
const a = t[i.to];
|
|
1990
|
+
if (i.placement === o.db.PLACEMENT.LEFTOF && !a.prevActor || i.placement === o.db.PLACEMENT.RIGHTOF && !a.nextActor)
|
|
1991
1991
|
continue;
|
|
1992
|
-
const c =
|
|
1993
|
-
l &&
|
|
1994
|
-
s[
|
|
1992
|
+
const c = i.placement !== void 0, l = !c, p = c ? Tt(n) : xt(n), r = i.wrap ? B.wrapLabel(i.message, n.width - 2 * n.wrapPadding, p) : i.message, T = (nt(r) ? await wt(i.message, st()) : B.calculateTextDimensions(r, p)).width + 2 * n.wrapPadding;
|
|
1993
|
+
l && i.from === a.nextActor ? s[i.to] = v.getMax(
|
|
1994
|
+
s[i.to] || 0,
|
|
1995
1995
|
T
|
|
1996
|
-
) : l &&
|
|
1997
|
-
s[
|
|
1996
|
+
) : l && i.from === a.prevActor ? s[i.from] = v.getMax(
|
|
1997
|
+
s[i.from] || 0,
|
|
1998
1998
|
T
|
|
1999
|
-
) : l &&
|
|
2000
|
-
s[
|
|
1999
|
+
) : l && i.from === i.to ? (s[i.from] = v.getMax(
|
|
2000
|
+
s[i.from] || 0,
|
|
2001
2001
|
T / 2
|
|
2002
|
-
), s[
|
|
2003
|
-
s[
|
|
2002
|
+
), s[i.to] = v.getMax(
|
|
2003
|
+
s[i.to] || 0,
|
|
2004
2004
|
T / 2
|
|
2005
|
-
)) :
|
|
2006
|
-
s[
|
|
2005
|
+
)) : i.placement === o.db.PLACEMENT.RIGHTOF ? s[i.from] = v.getMax(
|
|
2006
|
+
s[i.from] || 0,
|
|
2007
2007
|
T
|
|
2008
|
-
) :
|
|
2009
|
-
s[
|
|
2008
|
+
) : i.placement === o.db.PLACEMENT.LEFTOF ? s[a.prevActor] = v.getMax(
|
|
2009
|
+
s[a.prevActor] || 0,
|
|
2010
2010
|
T
|
|
2011
|
-
) :
|
|
2012
|
-
s[
|
|
2011
|
+
) : i.placement === o.db.PLACEMENT.OVER && (a.prevActor && (s[a.prevActor] = v.getMax(
|
|
2012
|
+
s[a.prevActor] || 0,
|
|
2013
2013
|
T / 2
|
|
2014
|
-
)),
|
|
2015
|
-
s[
|
|
2014
|
+
)), a.nextActor && (s[i.from] = v.getMax(
|
|
2015
|
+
s[i.from] || 0,
|
|
2016
2016
|
T / 2
|
|
2017
2017
|
)));
|
|
2018
2018
|
}
|
|
@@ -2020,60 +2020,60 @@ async function M0(t, e, o) {
|
|
|
2020
2020
|
}
|
|
2021
2021
|
const R0 = function(t) {
|
|
2022
2022
|
let e = 0;
|
|
2023
|
-
const o = Wt(
|
|
2023
|
+
const o = Wt(n);
|
|
2024
2024
|
for (const s in t.links) {
|
|
2025
|
-
const
|
|
2026
|
-
e <
|
|
2025
|
+
const a = B.calculateTextDimensions(s, o).width + 2 * n.wrapPadding + 2 * n.boxMargin;
|
|
2026
|
+
e < a && (e = a);
|
|
2027
2027
|
}
|
|
2028
2028
|
return e;
|
|
2029
2029
|
};
|
|
2030
2030
|
async function C0(t, e, o) {
|
|
2031
2031
|
let s = 0;
|
|
2032
|
-
for (const
|
|
2033
|
-
const c = t[
|
|
2032
|
+
for (const a of Object.keys(t)) {
|
|
2033
|
+
const c = t[a];
|
|
2034
2034
|
c.wrap && (c.description = B.wrapLabel(
|
|
2035
2035
|
c.description,
|
|
2036
|
-
|
|
2037
|
-
Wt(
|
|
2036
|
+
n.width - 2 * n.wrapPadding,
|
|
2037
|
+
Wt(n)
|
|
2038
2038
|
));
|
|
2039
|
-
const l =
|
|
2040
|
-
c.width = c.wrap ?
|
|
2039
|
+
const l = nt(c.description) ? await wt(c.description, st()) : B.calculateTextDimensions(c.description, Wt(n));
|
|
2040
|
+
c.width = c.wrap ? n.width : v.getMax(n.width, l.width + 2 * n.wrapPadding), c.height = c.wrap ? v.getMax(l.height, n.height) : n.height, s = v.getMax(s, c.height);
|
|
2041
2041
|
}
|
|
2042
|
-
for (const
|
|
2043
|
-
const c = t[
|
|
2042
|
+
for (const a in e) {
|
|
2043
|
+
const c = t[a];
|
|
2044
2044
|
if (!c)
|
|
2045
2045
|
continue;
|
|
2046
2046
|
const l = t[c.nextActor];
|
|
2047
2047
|
if (!l) {
|
|
2048
|
-
const T = e[
|
|
2049
|
-
c.margin =
|
|
2048
|
+
const T = e[a] + n.actorMargin - c.width / 2;
|
|
2049
|
+
c.margin = v.getMax(T, n.actorMargin);
|
|
2050
2050
|
continue;
|
|
2051
2051
|
}
|
|
2052
|
-
const
|
|
2053
|
-
c.margin =
|
|
2054
|
-
}
|
|
2055
|
-
let
|
|
2056
|
-
return o.forEach((
|
|
2057
|
-
const c = xt(
|
|
2058
|
-
let l =
|
|
2059
|
-
l -= 2 *
|
|
2060
|
-
const
|
|
2061
|
-
|
|
2062
|
-
const
|
|
2063
|
-
if (
|
|
2064
|
-
const x = (
|
|
2065
|
-
|
|
2052
|
+
const r = e[a] + n.actorMargin - c.width / 2 - l.width / 2;
|
|
2053
|
+
c.margin = v.getMax(r, n.actorMargin);
|
|
2054
|
+
}
|
|
2055
|
+
let i = 0;
|
|
2056
|
+
return o.forEach((a) => {
|
|
2057
|
+
const c = xt(n);
|
|
2058
|
+
let l = a.actorKeys.reduce((x, T) => x += t[T].width + (t[T].margin || 0), 0);
|
|
2059
|
+
l -= 2 * n.boxTextMargin, a.wrap && (a.name = B.wrapLabel(a.name, l - 2 * n.wrapPadding, c));
|
|
2060
|
+
const p = B.calculateTextDimensions(a.name, c);
|
|
2061
|
+
i = v.getMax(p.height, i);
|
|
2062
|
+
const r = v.getMax(l, p.width + 2 * n.wrapPadding);
|
|
2063
|
+
if (a.margin = n.boxTextMargin, l < r) {
|
|
2064
|
+
const x = (r - l) / 2;
|
|
2065
|
+
a.margin += x;
|
|
2066
2066
|
}
|
|
2067
|
-
}), o.forEach((
|
|
2067
|
+
}), o.forEach((a) => a.textMaxHeight = i), v.getMax(s, n.height);
|
|
2068
2068
|
}
|
|
2069
2069
|
const D0 = async function(t, e, o) {
|
|
2070
|
-
const s = e[t.from].x,
|
|
2071
|
-
let c =
|
|
2072
|
-
|
|
2073
|
-
Tt(
|
|
2070
|
+
const s = e[t.from].x, i = e[t.to].x, a = t.wrap && t.message;
|
|
2071
|
+
let c = nt(t.message) ? await wt(t.message, st()) : B.calculateTextDimensions(
|
|
2072
|
+
a ? B.wrapLabel(t.message, n.width, Tt(n)) : t.message,
|
|
2073
|
+
Tt(n)
|
|
2074
2074
|
);
|
|
2075
2075
|
const l = {
|
|
2076
|
-
width:
|
|
2076
|
+
width: a ? n.width : v.getMax(n.width, c.width + 2 * n.noteMargin),
|
|
2077
2077
|
height: 0,
|
|
2078
2078
|
startx: e[t.from].x,
|
|
2079
2079
|
stopx: 0,
|
|
@@ -2081,27 +2081,27 @@ const D0 = async function(t, e, o) {
|
|
|
2081
2081
|
stopy: 0,
|
|
2082
2082
|
message: t.message
|
|
2083
2083
|
};
|
|
2084
|
-
return t.placement === o.db.PLACEMENT.RIGHTOF ? (l.width =
|
|
2084
|
+
return t.placement === o.db.PLACEMENT.RIGHTOF ? (l.width = a ? v.getMax(n.width, c.width) : v.getMax(
|
|
2085
2085
|
e[t.from].width / 2 + e[t.to].width / 2,
|
|
2086
|
-
c.width + 2 *
|
|
2087
|
-
), l.startx = s + (e[t.from].width +
|
|
2086
|
+
c.width + 2 * n.noteMargin
|
|
2087
|
+
), l.startx = s + (e[t.from].width + n.actorMargin) / 2) : t.placement === o.db.PLACEMENT.LEFTOF ? (l.width = a ? v.getMax(n.width, c.width + 2 * n.noteMargin) : v.getMax(
|
|
2088
2088
|
e[t.from].width / 2 + e[t.to].width / 2,
|
|
2089
|
-
c.width + 2 *
|
|
2090
|
-
), l.startx = s - l.width + (e[t.from].width -
|
|
2091
|
-
|
|
2089
|
+
c.width + 2 * n.noteMargin
|
|
2090
|
+
), l.startx = s - l.width + (e[t.from].width - n.actorMargin) / 2) : t.to === t.from ? (c = B.calculateTextDimensions(
|
|
2091
|
+
a ? B.wrapLabel(
|
|
2092
2092
|
t.message,
|
|
2093
|
-
|
|
2094
|
-
Tt(
|
|
2093
|
+
v.getMax(n.width, e[t.from].width),
|
|
2094
|
+
Tt(n)
|
|
2095
2095
|
) : t.message,
|
|
2096
|
-
Tt(
|
|
2097
|
-
), l.width =
|
|
2096
|
+
Tt(n)
|
|
2097
|
+
), l.width = a ? v.getMax(n.width, e[t.from].width) : v.getMax(
|
|
2098
2098
|
e[t.from].width,
|
|
2099
|
-
|
|
2100
|
-
c.width + 2 *
|
|
2101
|
-
), l.startx = s + (e[t.from].width - l.width) / 2) : (l.width = Math.abs(s + e[t.from].width / 2 - (
|
|
2099
|
+
n.width,
|
|
2100
|
+
c.width + 2 * n.noteMargin
|
|
2101
|
+
), l.startx = s + (e[t.from].width - l.width) / 2) : (l.width = Math.abs(s + e[t.from].width / 2 - (i + e[t.to].width / 2)) + n.actorMargin, l.startx = s < i ? s + e[t.from].width / 2 - n.actorMargin / 2 : i + e[t.to].width / 2 - n.actorMargin / 2), a && (l.message = B.wrapLabel(
|
|
2102
2102
|
t.message,
|
|
2103
|
-
l.width - 2 *
|
|
2104
|
-
Tt(
|
|
2103
|
+
l.width - 2 * n.wrapPadding,
|
|
2104
|
+
Tt(n)
|
|
2105
2105
|
)), X.debug(
|
|
2106
2106
|
`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${t.message}]`
|
|
2107
2107
|
), l;
|
|
@@ -2117,39 +2117,39 @@ const D0 = async function(t, e, o) {
|
|
|
2117
2117
|
o.db.LINETYPE.DOTTED_POINT
|
|
2118
2118
|
].includes(t.type))
|
|
2119
2119
|
return {};
|
|
2120
|
-
const [s,
|
|
2121
|
-
let
|
|
2122
|
-
const x = Math.abs(
|
|
2123
|
-
t.from === t.to ?
|
|
2124
|
-
const
|
|
2120
|
+
const [s, i] = jt(t.from, e), [a, c] = jt(t.to, e), l = s <= a, p = l ? i : s;
|
|
2121
|
+
let r = l ? a : c;
|
|
2122
|
+
const x = Math.abs(a - c) > 2, T = (_) => l ? -_ : _;
|
|
2123
|
+
t.from === t.to ? r = p : (t.activate && !x && (r += T(n.activationWidth / 2 - 1)), [o.db.LINETYPE.SOLID_OPEN, o.db.LINETYPE.DOTTED_OPEN].includes(t.type) || (r += T(3)));
|
|
2124
|
+
const u = [s, i, a, c], g = Math.abs(p - r);
|
|
2125
2125
|
t.wrap && t.message && (t.message = B.wrapLabel(
|
|
2126
2126
|
t.message,
|
|
2127
|
-
|
|
2128
|
-
xt(
|
|
2127
|
+
v.getMax(g + 2 * n.wrapPadding, n.width),
|
|
2128
|
+
xt(n)
|
|
2129
2129
|
));
|
|
2130
|
-
const m = B.calculateTextDimensions(t.message, xt(
|
|
2130
|
+
const m = B.calculateTextDimensions(t.message, xt(n));
|
|
2131
2131
|
return {
|
|
2132
|
-
width:
|
|
2133
|
-
t.wrap ? 0 : m.width + 2 *
|
|
2134
|
-
g + 2 *
|
|
2135
|
-
|
|
2132
|
+
width: v.getMax(
|
|
2133
|
+
t.wrap ? 0 : m.width + 2 * n.wrapPadding,
|
|
2134
|
+
g + 2 * n.wrapPadding,
|
|
2135
|
+
n.width
|
|
2136
2136
|
),
|
|
2137
2137
|
height: 0,
|
|
2138
|
-
startx:
|
|
2139
|
-
stopx:
|
|
2138
|
+
startx: p,
|
|
2139
|
+
stopx: r,
|
|
2140
2140
|
starty: 0,
|
|
2141
2141
|
stopy: 0,
|
|
2142
2142
|
message: t.message,
|
|
2143
2143
|
type: t.type,
|
|
2144
2144
|
wrap: t.wrap,
|
|
2145
|
-
fromBounds: Math.min.apply(null,
|
|
2146
|
-
toBounds: Math.max.apply(null,
|
|
2145
|
+
fromBounds: Math.min.apply(null, u),
|
|
2146
|
+
toBounds: Math.max.apply(null, u)
|
|
2147
2147
|
};
|
|
2148
2148
|
}, O0 = async function(t, e, o, s) {
|
|
2149
|
-
const
|
|
2150
|
-
let c, l,
|
|
2151
|
-
for (const
|
|
2152
|
-
switch (
|
|
2149
|
+
const i = {}, a = [];
|
|
2150
|
+
let c, l, p;
|
|
2151
|
+
for (const r of t) {
|
|
2152
|
+
switch (r.id = B.random({ length: 10 }), r.type) {
|
|
2153
2153
|
case s.db.LINETYPE.LOOP_START:
|
|
2154
2154
|
case s.db.LINETYPE.ALT_START:
|
|
2155
2155
|
case s.db.LINETYPE.OPT_START:
|
|
@@ -2157,9 +2157,9 @@ const D0 = async function(t, e, o) {
|
|
|
2157
2157
|
case s.db.LINETYPE.PAR_OVER_START:
|
|
2158
2158
|
case s.db.LINETYPE.CRITICAL_START:
|
|
2159
2159
|
case s.db.LINETYPE.BREAK_START:
|
|
2160
|
-
|
|
2161
|
-
id:
|
|
2162
|
-
msg:
|
|
2160
|
+
a.push({
|
|
2161
|
+
id: r.id,
|
|
2162
|
+
msg: r.message,
|
|
2163
2163
|
from: Number.MAX_SAFE_INTEGER,
|
|
2164
2164
|
to: Number.MIN_SAFE_INTEGER,
|
|
2165
2165
|
width: 0
|
|
@@ -2168,7 +2168,7 @@ const D0 = async function(t, e, o) {
|
|
|
2168
2168
|
case s.db.LINETYPE.ALT_ELSE:
|
|
2169
2169
|
case s.db.LINETYPE.PAR_AND:
|
|
2170
2170
|
case s.db.LINETYPE.CRITICAL_OPTION:
|
|
2171
|
-
|
|
2171
|
+
r.message && (c = a.pop(), i[c.id] = c, i[r.id] = c, a.push(c));
|
|
2172
2172
|
break;
|
|
2173
2173
|
case s.db.LINETYPE.LOOP_END:
|
|
2174
2174
|
case s.db.LINETYPE.ALT_END:
|
|
@@ -2176,14 +2176,14 @@ const D0 = async function(t, e, o) {
|
|
|
2176
2176
|
case s.db.LINETYPE.PAR_END:
|
|
2177
2177
|
case s.db.LINETYPE.CRITICAL_END:
|
|
2178
2178
|
case s.db.LINETYPE.BREAK_END:
|
|
2179
|
-
c =
|
|
2179
|
+
c = a.pop(), i[c.id] = c;
|
|
2180
2180
|
break;
|
|
2181
2181
|
case s.db.LINETYPE.ACTIVE_START:
|
|
2182
2182
|
{
|
|
2183
|
-
const T = e[
|
|
2183
|
+
const T = e[r.from ? r.from.actor : r.to.actor], u = St(r.from ? r.from.actor : r.to.actor).length, g = T.x + T.width / 2 + (u - 1) * n.activationWidth / 2, m = {
|
|
2184
2184
|
startx: g,
|
|
2185
|
-
stopx: g +
|
|
2186
|
-
actor:
|
|
2185
|
+
stopx: g + n.activationWidth,
|
|
2186
|
+
actor: r.from.actor,
|
|
2187
2187
|
enabled: !0
|
|
2188
2188
|
};
|
|
2189
2189
|
f.activations.push(m);
|
|
@@ -2191,36 +2191,36 @@ const D0 = async function(t, e, o) {
|
|
|
2191
2191
|
break;
|
|
2192
2192
|
case s.db.LINETYPE.ACTIVE_END:
|
|
2193
2193
|
{
|
|
2194
|
-
const T = f.activations.map((
|
|
2194
|
+
const T = f.activations.map((u) => u.actor).lastIndexOf(r.from.actor);
|
|
2195
2195
|
delete f.activations.splice(T, 1)[0];
|
|
2196
2196
|
}
|
|
2197
2197
|
break;
|
|
2198
2198
|
}
|
|
2199
|
-
|
|
2200
|
-
c = T, c.from =
|
|
2201
|
-
})) : (
|
|
2202
|
-
if (c = T,
|
|
2203
|
-
const
|
|
2204
|
-
c.from =
|
|
2205
|
-
|
|
2206
|
-
|
|
2199
|
+
r.placement !== void 0 ? (l = await D0(r, e, s), r.noteModel = l, a.forEach((T) => {
|
|
2200
|
+
c = T, c.from = v.getMin(c.from, l.startx), c.to = v.getMax(c.to, l.startx + l.width), c.width = v.getMax(c.width, Math.abs(c.from - c.to)) - n.labelBoxWidth;
|
|
2201
|
+
})) : (p = V0(r, e, s), r.msgModel = p, p.startx && p.stopx && a.length > 0 && a.forEach((T) => {
|
|
2202
|
+
if (c = T, p.startx === p.stopx) {
|
|
2203
|
+
const u = e[r.from], g = e[r.to];
|
|
2204
|
+
c.from = v.getMin(
|
|
2205
|
+
u.x - p.width / 2,
|
|
2206
|
+
u.x - u.width / 2,
|
|
2207
2207
|
c.from
|
|
2208
|
-
), c.to =
|
|
2209
|
-
g.x + u.width / 2,
|
|
2208
|
+
), c.to = v.getMax(
|
|
2210
2209
|
g.x + p.width / 2,
|
|
2210
|
+
g.x + u.width / 2,
|
|
2211
2211
|
c.to
|
|
2212
|
-
), c.width =
|
|
2212
|
+
), c.width = v.getMax(c.width, Math.abs(c.to - c.from)) - n.labelBoxWidth;
|
|
2213
2213
|
} else
|
|
2214
|
-
c.from =
|
|
2214
|
+
c.from = v.getMin(p.startx, c.from), c.to = v.getMax(p.stopx, c.to), c.width = v.getMax(c.width, p.width) - n.labelBoxWidth;
|
|
2215
2215
|
}));
|
|
2216
2216
|
}
|
|
2217
|
-
return f.activations = [], X.debug("Loop type widths:",
|
|
2217
|
+
return f.activations = [], X.debug("Loop type widths:", i), i;
|
|
2218
2218
|
}, B0 = {
|
|
2219
2219
|
bounds: f,
|
|
2220
2220
|
drawActors: qt,
|
|
2221
2221
|
drawActorsPopup: ge,
|
|
2222
2222
|
setConf: xe,
|
|
2223
|
-
draw:
|
|
2223
|
+
draw: S0
|
|
2224
2224
|
}, q0 = {
|
|
2225
2225
|
parser: De,
|
|
2226
2226
|
db: Qt,
|