lowcoder-comps 2.4.14 → 2.4.16
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/{fc3b7856.js → 1043ea14.js} +247 -258
- package/{52a11357.js → 14530b4e.js} +5 -5
- package/{029476f8.js → 145794bd.js} +4 -4
- package/248f3eba.js +797 -0
- package/{e6f7d4a7.js → 28364e9c.js} +411 -451
- package/{a3820fc3.js → 38ec0f55.js} +3 -3
- package/{6296008d.js → 40bee586.js} +55069 -55754
- package/{256b619e.js → 428ebac9.js} +14 -15
- package/{21e8a932.js → 4407a5f9.js} +1 -1
- package/{286121b3.js → 474d7e5f.js} +6 -6
- package/{32d11caf.js → 48ca2a1e.js} +2 -2
- package/5b2c9b5c.js +206 -0
- package/{b42bc0a6.js → 633f4ede.js} +919 -969
- package/{35b2542e.js → 668d3da2.js} +1 -1
- package/{005a58c0.js → 78321d1a.js} +4 -4
- package/{2ea4f729.js → 7c479abc.js} +8 -8
- package/{09ab5d81.js → 7c7200e7.js} +7 -7
- package/{d42741f5.js → 7e6d090c.js} +1067 -1085
- package/7e78c333.js +373 -0
- package/{abadf1f6.js → 88415712.js} +140 -141
- package/{43254cb0.js → 8ae1f7a4.js} +4 -5
- package/{af28f5d5.js → 8e6be41e.js} +4 -4
- package/{a73a7fb8.js → 8ffe69e1.js} +6 -6
- package/{14a0be5d.js → 9afbfdff.js} +1 -1
- package/{25f232c1.js → a8987699.js} +6 -6
- package/afdeb8e9.js +190 -0
- package/c0405acc.js +1083 -0
- package/{08ea4a8f.js → ca993649.js} +2 -2
- package/{bf684fc8.js → cc8ba9a3.js} +12713 -12735
- package/{bcd4bce3.js → d27497a0.js} +18 -18
- package/{c69763fa.js → dbeb2d17.js} +2 -2
- package/{6741b2b9.js → de3e61cd.js} +68 -69
- package/df15a543.js +817 -0
- package/{47848c42.js → e5b014a9.js} +5 -5
- package/e86c3e3a.js +1264 -0
- package/{0f43fe1e.js → eb52cd1a.js} +8 -8
- package/{0da7ca4d.js → ebbe2009.js} +92 -92
- package/{cb338c34.js → ecab0a38.js} +96 -99
- package/{268c902c.js → f3455869.js} +26 -27
- package/f701d7da.js +433 -0
- package/{6402852d.js → fc681b47.js} +12 -12
- package/index.js +2 -2
- package/package.json +1 -1
- package/04c7d898.js +0 -819
- package/078d4a18.js +0 -818
- package/18cd6b56.js +0 -391
- package/1a8f0a25.js +0 -455
- package/2b4f4275.js +0 -1276
- package/2efee7c6.js +0 -1102
- package/a6a69647.js +0 -237
- package/c2bb8612.js +0 -208
|
@@ -1,34 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
i(r);
|
|
7
|
-
}
|
|
8
|
-
}, c = (p) => {
|
|
9
|
-
try {
|
|
10
|
-
l(o.throw(p));
|
|
11
|
-
} catch (r) {
|
|
12
|
-
i(r);
|
|
13
|
-
}
|
|
14
|
-
}, l = (p) => p.done ? s(p.value) : Promise.resolve(p.value).then(a, c);
|
|
15
|
-
l((o = o.apply(t, e)).next());
|
|
16
|
-
});
|
|
17
|
-
import { a as ve, G as _e, F as ke, e as rt, s as te, d as Pe, b as Le, H as Ie, l as J, f as Nt, m as v, h as Ae, j as It, k as Ne, C as B, a4 as ot, a5 as vt, o as ee, t as se, _ as Yt, Y as re, a6 as Se } from "./6296008d.js";
|
|
18
|
-
import { d as Me, a as Re, g as St, b as Ht, c as Ce, e as De } from "./14a0be5d.js";
|
|
19
|
-
var Ft = function() {
|
|
20
|
-
var t = function(pt, w, k, L) {
|
|
21
|
-
for (k = k || {}, L = pt.length; L--; k[pt[L]] = w)
|
|
1
|
+
import { a as we, G as ve, F as _e, e as st, s as $t, d as ke, b as Pe, H as Le, l as X, f as At, m as v, h as Ie, j as Lt, k as Ae, C as B, a4 as nt, a5 as wt, o as te, t as ee, _ as Bt, Y as se, a6 as Ne } from "./40bee586.js";
|
|
2
|
+
import { d as Se, a as Me, g as Nt, b as zt, c as Re, e as Ce } from "./9afbfdff.js";
|
|
3
|
+
var Yt = function() {
|
|
4
|
+
var t = function(dt, w, k, L) {
|
|
5
|
+
for (k = k || {}, L = dt.length; L--; k[dt[L]] = w)
|
|
22
6
|
;
|
|
23
7
|
return k;
|
|
24
|
-
}, e = [1, 2],
|
|
8
|
+
}, e = [1, 2], c = [1, 3], s = [1, 4], i = [2, 4], a = [1, 9], o = [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], U = [1, 38], F = [1, 39], W = [1, 41], Z = [1, 42], K = [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 = {
|
|
25
9
|
trace: function() {
|
|
26
10
|
},
|
|
27
11
|
yy: {},
|
|
28
12
|
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 },
|
|
29
13
|
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" },
|
|
30
14
|
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]],
|
|
31
|
-
performAction: function(w, k, L, b, M, h,
|
|
15
|
+
performAction: function(w, k, L, b, M, h, Et) {
|
|
32
16
|
var d = h.length - 1;
|
|
33
17
|
switch (M) {
|
|
34
18
|
case 3:
|
|
@@ -217,7 +201,7 @@ var Ft = function() {
|
|
|
217
201
|
break;
|
|
218
202
|
}
|
|
219
203
|
},
|
|
220
|
-
table: [{ 3: 1, 4: e, 5:
|
|
204
|
+
table: [{ 3: 1, 4: e, 5: c, 6: s }, { 1: [3] }, { 3: 5, 4: e, 5: c, 6: s }, { 3: 6, 4: e, 5: c, 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: o, 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: U, 53: F, 54: W, 59: Z, 60: K, 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: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, t(y, [2, 7]), t(y, [2, 8]), t(y, [2, 14]), { 12: 48, 50: H, 52: U, 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: U, 53: F }, { 5: [1, 129] }, t(y, [2, 19]), t(y, [2, 20]), t(y, [2, 22]), t(y, [2, 23]), { 4: a, 5: o, 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: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, { 4: a, 5: o, 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: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, { 4: a, 5: o, 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: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, { 16: [1, 133] }, { 4: a, 5: o, 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: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, { 16: [1, 135] }, { 4: a, 5: o, 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: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, { 16: [1, 137] }, { 16: [1, 138] }, { 4: a, 5: o, 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: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, { 4: a, 5: o, 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: U, 53: F, 54: W, 59: Z, 60: K, 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: U, 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] }],
|
|
221
205
|
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] },
|
|
222
206
|
parseError: function(w, k) {
|
|
223
207
|
if (k.recoverable)
|
|
@@ -228,60 +212,60 @@ var Ft = function() {
|
|
|
228
212
|
}
|
|
229
213
|
},
|
|
230
214
|
parse: function(w) {
|
|
231
|
-
var k = this, L = [0], b = [], M = [null], h = [],
|
|
232
|
-
for (var
|
|
233
|
-
Object.prototype.hasOwnProperty.call(this.yy,
|
|
234
|
-
Y.setInput(w,
|
|
235
|
-
var
|
|
236
|
-
h.push(
|
|
237
|
-
var
|
|
238
|
-
typeof
|
|
239
|
-
function
|
|
240
|
-
var
|
|
241
|
-
return
|
|
215
|
+
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: {} };
|
|
216
|
+
for (var Ct in this.yy)
|
|
217
|
+
Object.prototype.hasOwnProperty.call(this.yy, Ct) && (pt.yy[Ct] = this.yy[Ct]);
|
|
218
|
+
Y.setInput(w, pt.yy), pt.yy.lexer = Y, pt.yy.parser = this, typeof Y.yylloc > "u" && (Y.yylloc = {});
|
|
219
|
+
var Dt = Y.yylloc;
|
|
220
|
+
h.push(Dt);
|
|
221
|
+
var Ee = Y.options && Y.options.ranges;
|
|
222
|
+
typeof pt.yy.parseError == "function" ? this.parseError = pt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
223
|
+
function me() {
|
|
224
|
+
var lt;
|
|
225
|
+
return lt = b.pop() || Y.lex() || Jt, typeof lt != "number" && (lt instanceof Array && (b = lt, lt = b.pop()), lt = k.symbols_[lt] || lt), lt;
|
|
242
226
|
}
|
|
243
|
-
for (var
|
|
244
|
-
if (
|
|
245
|
-
var
|
|
246
|
-
|
|
247
|
-
for (
|
|
248
|
-
this.terminals_[
|
|
249
|
-
Y.showPosition ?
|
|
227
|
+
for (var G, ut, et, Vt, yt = {}, kt, ct, Zt, Pt; ; ) {
|
|
228
|
+
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]) {
|
|
229
|
+
var Ot = "";
|
|
230
|
+
Pt = [];
|
|
231
|
+
for (kt in Et[ut])
|
|
232
|
+
this.terminals_[kt] && kt > Te && Pt.push("'" + this.terminals_[kt] + "'");
|
|
233
|
+
Y.showPosition ? Ot = "Parse error on line " + (_t + 1) + `:
|
|
250
234
|
` + Y.showPosition() + `
|
|
251
|
-
Expecting ` +
|
|
235
|
+
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, {
|
|
252
236
|
text: Y.match,
|
|
253
|
-
token: this.terminals_[
|
|
237
|
+
token: this.terminals_[G] || G,
|
|
254
238
|
line: Y.yylineno,
|
|
255
|
-
loc:
|
|
256
|
-
expected:
|
|
239
|
+
loc: Dt,
|
|
240
|
+
expected: Pt
|
|
257
241
|
});
|
|
258
242
|
}
|
|
259
|
-
if (
|
|
260
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
261
|
-
switch (
|
|
243
|
+
if (et[0] instanceof Array && et.length > 1)
|
|
244
|
+
throw new Error("Parse Error: multiple actions possible at state: " + ut + ", token: " + G);
|
|
245
|
+
switch (et[0]) {
|
|
262
246
|
case 1:
|
|
263
|
-
L.push(
|
|
247
|
+
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;
|
|
264
248
|
break;
|
|
265
249
|
case 2:
|
|
266
|
-
if (
|
|
267
|
-
first_line: h[h.length - (
|
|
250
|
+
if (ct = this.productions_[et[1]][1], yt.$ = M[M.length - ct], yt._$ = {
|
|
251
|
+
first_line: h[h.length - (ct || 1)].first_line,
|
|
268
252
|
last_line: h[h.length - 1].last_line,
|
|
269
|
-
first_column: h[h.length - (
|
|
253
|
+
first_column: h[h.length - (ct || 1)].first_column,
|
|
270
254
|
last_column: h[h.length - 1].last_column
|
|
271
|
-
},
|
|
272
|
-
h[h.length - (
|
|
255
|
+
}, Ee && (yt._$.range = [
|
|
256
|
+
h[h.length - (ct || 1)].range[0],
|
|
273
257
|
h[h.length - 1].range[1]
|
|
274
|
-
]),
|
|
258
|
+
]), Vt = this.performAction.apply(yt, [
|
|
275
259
|
d,
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
260
|
+
Xt,
|
|
261
|
+
_t,
|
|
262
|
+
pt.yy,
|
|
263
|
+
et[1],
|
|
280
264
|
M,
|
|
281
265
|
h
|
|
282
|
-
].concat(
|
|
283
|
-
return
|
|
284
|
-
|
|
266
|
+
].concat(be)), typeof Vt < "u")
|
|
267
|
+
return Vt;
|
|
268
|
+
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);
|
|
285
269
|
break;
|
|
286
270
|
case 3:
|
|
287
271
|
return !0;
|
|
@@ -289,8 +273,8 @@ Expecting ` + Lt.join(", ") + ", got '" + (this.terminals_[X] || X) + "'" : Bt =
|
|
|
289
273
|
}
|
|
290
274
|
return !0;
|
|
291
275
|
}
|
|
292
|
-
},
|
|
293
|
-
var
|
|
276
|
+
}, ye = function() {
|
|
277
|
+
var dt = {
|
|
294
278
|
EOF: 1,
|
|
295
279
|
parseError: function(k, L) {
|
|
296
280
|
if (this.yy.parser)
|
|
@@ -600,17 +584,17 @@ Expecting ` + Lt.join(", ") + ", got '" + (this.terminals_[X] || X) + "'" : Bt =
|
|
|
600
584
|
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],
|
|
601
585
|
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 } }
|
|
602
586
|
};
|
|
603
|
-
return
|
|
587
|
+
return dt;
|
|
604
588
|
}();
|
|
605
|
-
|
|
606
|
-
function
|
|
589
|
+
Mt.lexer = ye;
|
|
590
|
+
function Rt() {
|
|
607
591
|
this.yy = {};
|
|
608
592
|
}
|
|
609
|
-
return
|
|
593
|
+
return Rt.prototype = Mt, Mt.Parser = Rt, new Rt();
|
|
610
594
|
}();
|
|
611
|
-
|
|
612
|
-
const
|
|
613
|
-
class
|
|
595
|
+
Yt.parser = Yt;
|
|
596
|
+
const De = Yt;
|
|
597
|
+
class Ve {
|
|
614
598
|
/**
|
|
615
599
|
* @param init - Function that creates the default state.
|
|
616
600
|
*/
|
|
@@ -621,7 +605,7 @@ class Oe {
|
|
|
621
605
|
this.records = this.init();
|
|
622
606
|
}
|
|
623
607
|
}
|
|
624
|
-
const E = new
|
|
608
|
+
const E = new Ve(() => ({
|
|
625
609
|
prevActor: void 0,
|
|
626
610
|
actors: {},
|
|
627
611
|
createdActors: {},
|
|
@@ -634,14 +618,14 @@ const E = new Oe(() => ({
|
|
|
634
618
|
currentBox: void 0,
|
|
635
619
|
lastCreated: void 0,
|
|
636
620
|
lastDestroyed: void 0
|
|
637
|
-
})),
|
|
621
|
+
})), Oe = function(t) {
|
|
638
622
|
E.records.boxes.push({
|
|
639
623
|
name: t.text,
|
|
640
|
-
wrap: t.wrap === void 0 &&
|
|
624
|
+
wrap: t.wrap === void 0 && gt() || !!t.wrap,
|
|
641
625
|
fill: t.color,
|
|
642
626
|
actorKeys: []
|
|
643
627
|
}), E.records.currentBox = E.records.boxes.slice(-1)[0];
|
|
644
|
-
},
|
|
628
|
+
}, Ft = function(t, e, c, s) {
|
|
645
629
|
let i = E.records.currentBox;
|
|
646
630
|
const a = E.records.actors[t];
|
|
647
631
|
if (a) {
|
|
@@ -649,14 +633,14 @@ const E = new Oe(() => ({
|
|
|
649
633
|
throw new Error(
|
|
650
634
|
"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."
|
|
651
635
|
);
|
|
652
|
-
if (i = a.box ? a.box : E.records.currentBox, a.box = i, a && e === a.name &&
|
|
636
|
+
if (i = a.box ? a.box : E.records.currentBox, a.box = i, a && e === a.name && c == null)
|
|
653
637
|
return;
|
|
654
638
|
}
|
|
655
|
-
(
|
|
639
|
+
(c == null || c.text == null) && (c = { text: e, wrap: null, type: s }), (s == null || c.text == null) && (c = { text: e, wrap: null, type: s }), E.records.actors[t] = {
|
|
656
640
|
box: i,
|
|
657
641
|
name: e,
|
|
658
|
-
description:
|
|
659
|
-
wrap:
|
|
642
|
+
description: c.text,
|
|
643
|
+
wrap: c.wrap === void 0 && gt() || !!c.wrap,
|
|
660
644
|
prevActor: E.records.prevActor,
|
|
661
645
|
links: {},
|
|
662
646
|
properties: {},
|
|
@@ -664,85 +648,85 @@ const E = new Oe(() => ({
|
|
|
664
648
|
rectData: null,
|
|
665
649
|
type: s || "participant"
|
|
666
650
|
}, E.records.prevActor && E.records.actors[E.records.prevActor] && (E.records.actors[E.records.prevActor].nextActor = t), E.records.currentBox && E.records.currentBox.actorKeys.push(t), E.records.prevActor = t;
|
|
667
|
-
},
|
|
668
|
-
let e,
|
|
651
|
+
}, Be = (t) => {
|
|
652
|
+
let e, c = 0;
|
|
669
653
|
for (e = 0; e < E.records.messages.length; e++)
|
|
670
|
-
E.records.messages[e].type ===
|
|
671
|
-
return
|
|
672
|
-
},
|
|
654
|
+
E.records.messages[e].type === mt.ACTIVE_START && E.records.messages[e].from.actor === t && c++, E.records.messages[e].type === mt.ACTIVE_END && E.records.messages[e].from.actor === t && c--;
|
|
655
|
+
return c;
|
|
656
|
+
}, Ye = function(t, e, c, s) {
|
|
673
657
|
E.records.messages.push({
|
|
674
658
|
from: t,
|
|
675
659
|
to: e,
|
|
676
|
-
message:
|
|
677
|
-
wrap:
|
|
660
|
+
message: c.text,
|
|
661
|
+
wrap: c.wrap === void 0 && gt() || !!c.wrap,
|
|
678
662
|
answer: s
|
|
679
663
|
});
|
|
680
|
-
}, C = function(t, e,
|
|
681
|
-
if (s ===
|
|
682
|
-
let
|
|
683
|
-
throw
|
|
664
|
+
}, C = function(t, e, c = { text: void 0, wrap: void 0 }, s, i = !1) {
|
|
665
|
+
if (s === mt.ACTIVE_END && Be(t.actor) < 1) {
|
|
666
|
+
let o = new Error("Trying to inactivate an inactive participant (" + t.actor + ")");
|
|
667
|
+
throw o.hash = {
|
|
684
668
|
text: "->>-",
|
|
685
669
|
token: "->>-",
|
|
686
670
|
line: "1",
|
|
687
671
|
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
|
|
688
672
|
expected: ["'ACTIVE_PARTICIPANT'"]
|
|
689
|
-
},
|
|
673
|
+
}, o;
|
|
690
674
|
}
|
|
691
675
|
return E.records.messages.push({
|
|
692
676
|
from: t,
|
|
693
677
|
to: e,
|
|
694
|
-
message:
|
|
695
|
-
wrap:
|
|
678
|
+
message: c.text,
|
|
679
|
+
wrap: c.wrap === void 0 && gt() || !!c.wrap,
|
|
696
680
|
type: s,
|
|
697
681
|
activate: i
|
|
698
682
|
}), !0;
|
|
699
|
-
},
|
|
683
|
+
}, Fe = function() {
|
|
700
684
|
return E.records.boxes.length > 0;
|
|
701
|
-
},
|
|
685
|
+
}, We = function() {
|
|
702
686
|
return E.records.boxes.some((t) => t.name);
|
|
703
|
-
},
|
|
687
|
+
}, qe = function() {
|
|
704
688
|
return E.records.messages;
|
|
705
|
-
},
|
|
689
|
+
}, ze = function() {
|
|
706
690
|
return E.records.boxes;
|
|
707
|
-
},
|
|
691
|
+
}, He = function() {
|
|
708
692
|
return E.records.actors;
|
|
709
|
-
},
|
|
693
|
+
}, Ue = function() {
|
|
710
694
|
return E.records.createdActors;
|
|
711
|
-
},
|
|
695
|
+
}, Ke = function() {
|
|
712
696
|
return E.records.destroyedActors;
|
|
713
|
-
},
|
|
697
|
+
}, vt = function(t) {
|
|
714
698
|
return E.records.actors[t];
|
|
715
|
-
},
|
|
699
|
+
}, Ge = function() {
|
|
716
700
|
return Object.keys(E.records.actors);
|
|
717
|
-
},
|
|
701
|
+
}, Xe = function() {
|
|
718
702
|
E.records.sequenceNumbersEnabled = !0;
|
|
719
|
-
},
|
|
703
|
+
}, Je = function() {
|
|
720
704
|
E.records.sequenceNumbersEnabled = !1;
|
|
721
|
-
},
|
|
705
|
+
}, Ze = () => E.records.sequenceNumbersEnabled, Qe = function(t) {
|
|
722
706
|
E.records.wrapEnabled = t;
|
|
723
|
-
},
|
|
724
|
-
E.reset(),
|
|
725
|
-
},
|
|
726
|
-
const e = t.trim(),
|
|
707
|
+
}, gt = () => E.records.wrapEnabled !== void 0 ? E.records.wrapEnabled : st().sequence.wrap, je = function() {
|
|
708
|
+
E.reset(), Le();
|
|
709
|
+
}, $e = function(t) {
|
|
710
|
+
const e = t.trim(), c = {
|
|
727
711
|
text: e.replace(/^:?(?:no)?wrap:/, "").trim(),
|
|
728
712
|
wrap: e.match(/^:?wrap:/) !== null ? !0 : e.match(/^:?nowrap:/) !== null ? !1 : void 0
|
|
729
713
|
};
|
|
730
|
-
return
|
|
731
|
-
},
|
|
714
|
+
return X.debug("parseMessage:", c), c;
|
|
715
|
+
}, t0 = function(t) {
|
|
732
716
|
const e = t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);
|
|
733
|
-
let
|
|
717
|
+
let c = e != null && e[1] ? e[1].trim() : "transparent", s = e != null && e[2] ? e[2].trim() : void 0;
|
|
734
718
|
if (window && window.CSS)
|
|
735
|
-
window.CSS.supports("color",
|
|
719
|
+
window.CSS.supports("color", c) || (c = "transparent", s = t.trim());
|
|
736
720
|
else {
|
|
737
721
|
const i = new Option().style;
|
|
738
|
-
i.color =
|
|
722
|
+
i.color = c, i.color !== c && (c = "transparent", s = t.trim());
|
|
739
723
|
}
|
|
740
724
|
return {
|
|
741
|
-
color:
|
|
742
|
-
text: s !== void 0 ?
|
|
725
|
+
color: c,
|
|
726
|
+
text: s !== void 0 ? At(s.replace(/^:?(?:no)?wrap:/, ""), st()) : void 0,
|
|
743
727
|
wrap: s !== void 0 ? s.match(/^:?wrap:/) !== null ? !0 : s.match(/^:?nowrap:/) !== null ? !1 : void 0 : void 0
|
|
744
728
|
};
|
|
745
|
-
},
|
|
729
|
+
}, mt = {
|
|
746
730
|
SOLID: 0,
|
|
747
731
|
DOTTED: 1,
|
|
748
732
|
NOTE: 2,
|
|
@@ -773,93 +757,93 @@ const E = new Oe(() => ({
|
|
|
773
757
|
BREAK_START: 30,
|
|
774
758
|
BREAK_END: 31,
|
|
775
759
|
PAR_OVER_START: 32
|
|
776
|
-
},
|
|
760
|
+
}, e0 = {
|
|
777
761
|
FILLED: 0,
|
|
778
762
|
OPEN: 1
|
|
779
|
-
},
|
|
763
|
+
}, s0 = {
|
|
780
764
|
LEFTOF: 0,
|
|
781
765
|
RIGHTOF: 1,
|
|
782
766
|
OVER: 2
|
|
783
|
-
},
|
|
767
|
+
}, re = function(t, e, c) {
|
|
784
768
|
const s = {
|
|
785
769
|
actor: t,
|
|
786
770
|
placement: e,
|
|
787
|
-
message:
|
|
788
|
-
wrap:
|
|
771
|
+
message: c.text,
|
|
772
|
+
wrap: c.wrap === void 0 && gt() || !!c.wrap
|
|
789
773
|
}, i = [].concat(t, t);
|
|
790
774
|
E.records.notes.push(s), E.records.messages.push({
|
|
791
775
|
from: i[0],
|
|
792
776
|
to: i[1],
|
|
793
|
-
message:
|
|
794
|
-
wrap:
|
|
795
|
-
type:
|
|
777
|
+
message: c.text,
|
|
778
|
+
wrap: c.wrap === void 0 && gt() || !!c.wrap,
|
|
779
|
+
type: mt.NOTE,
|
|
796
780
|
placement: e
|
|
797
781
|
});
|
|
798
|
-
},
|
|
799
|
-
const
|
|
782
|
+
}, ie = function(t, e) {
|
|
783
|
+
const c = vt(t);
|
|
800
784
|
try {
|
|
801
|
-
let s =
|
|
785
|
+
let s = At(e.text, st());
|
|
802
786
|
s = s.replace(/&/g, "&"), s = s.replace(/=/g, "=");
|
|
803
787
|
const i = JSON.parse(s);
|
|
804
|
-
|
|
788
|
+
Ht(c, i);
|
|
805
789
|
} catch (s) {
|
|
806
|
-
|
|
790
|
+
X.error("error while parsing actor link text", s);
|
|
807
791
|
}
|
|
808
|
-
},
|
|
809
|
-
const
|
|
792
|
+
}, r0 = function(t, e) {
|
|
793
|
+
const c = vt(t);
|
|
810
794
|
try {
|
|
811
|
-
const
|
|
812
|
-
let l =
|
|
795
|
+
const o = {};
|
|
796
|
+
let l = At(e.text, st());
|
|
813
797
|
var s = l.indexOf("@");
|
|
814
798
|
l = l.replace(/&/g, "&"), l = l.replace(/=/g, "=");
|
|
815
799
|
var i = l.slice(0, s - 1).trim(), a = l.slice(s + 1).trim();
|
|
816
|
-
|
|
817
|
-
} catch (
|
|
818
|
-
|
|
800
|
+
o[i] = a, Ht(c, o);
|
|
801
|
+
} catch (o) {
|
|
802
|
+
X.error("error while parsing actor link text", o);
|
|
819
803
|
}
|
|
820
804
|
};
|
|
821
|
-
function
|
|
805
|
+
function Ht(t, e) {
|
|
822
806
|
if (t.links == null)
|
|
823
807
|
t.links = e;
|
|
824
808
|
else
|
|
825
|
-
for (let
|
|
826
|
-
t.links[
|
|
809
|
+
for (let c in e)
|
|
810
|
+
t.links[c] = e[c];
|
|
827
811
|
}
|
|
828
|
-
const
|
|
829
|
-
const
|
|
812
|
+
const ae = function(t, e) {
|
|
813
|
+
const c = vt(t);
|
|
830
814
|
try {
|
|
831
|
-
let s =
|
|
815
|
+
let s = At(e.text, st());
|
|
832
816
|
const i = JSON.parse(s);
|
|
833
|
-
|
|
817
|
+
ne(c, i);
|
|
834
818
|
} catch (s) {
|
|
835
|
-
|
|
819
|
+
X.error("error while parsing actor properties text", s);
|
|
836
820
|
}
|
|
837
821
|
};
|
|
838
|
-
function
|
|
822
|
+
function ne(t, e) {
|
|
839
823
|
if (t.properties == null)
|
|
840
824
|
t.properties = e;
|
|
841
825
|
else
|
|
842
|
-
for (let
|
|
843
|
-
t.properties[
|
|
826
|
+
for (let c in e)
|
|
827
|
+
t.properties[c] = e[c];
|
|
844
828
|
}
|
|
845
|
-
function
|
|
829
|
+
function i0() {
|
|
846
830
|
E.records.currentBox = void 0;
|
|
847
831
|
}
|
|
848
|
-
const
|
|
849
|
-
const
|
|
832
|
+
const oe = function(t, e) {
|
|
833
|
+
const c = vt(t), s = document.getElementById(e.text);
|
|
850
834
|
try {
|
|
851
835
|
const i = s.innerHTML, a = JSON.parse(i);
|
|
852
|
-
a.properties &&
|
|
836
|
+
a.properties && ne(c, a.properties), a.links && Ht(c, a.links);
|
|
853
837
|
} catch (i) {
|
|
854
|
-
|
|
838
|
+
X.error("error while parsing actor details text", i);
|
|
855
839
|
}
|
|
856
|
-
},
|
|
840
|
+
}, a0 = function(t, e) {
|
|
857
841
|
if (t !== void 0 && t.properties !== void 0)
|
|
858
842
|
return t.properties[e];
|
|
859
|
-
},
|
|
843
|
+
}, ce = function(t) {
|
|
860
844
|
if (Array.isArray(t))
|
|
861
845
|
t.forEach(function(e) {
|
|
862
|
-
|
|
846
|
+
ce(e);
|
|
863
847
|
});
|
|
864
848
|
else
|
|
865
849
|
switch (t.type) {
|
|
@@ -877,14 +861,14 @@ const ce = function(t, e) {
|
|
|
877
861
|
});
|
|
878
862
|
break;
|
|
879
863
|
case "addParticipant":
|
|
880
|
-
|
|
864
|
+
Ft(t.actor, t.actor, t.description, t.draw);
|
|
881
865
|
break;
|
|
882
866
|
case "createParticipant":
|
|
883
867
|
if (E.records.actors[t.actor])
|
|
884
868
|
throw new Error(
|
|
885
869
|
"It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior"
|
|
886
870
|
);
|
|
887
|
-
E.records.lastCreated = t.actor,
|
|
871
|
+
E.records.lastCreated = t.actor, Ft(t.actor, t.actor, t.description, t.draw), E.records.createdActors[t.actor] = E.records.messages.length;
|
|
888
872
|
break;
|
|
889
873
|
case "destroyParticipant":
|
|
890
874
|
E.records.lastDestroyed = t.actor, E.records.destroyedActors[t.actor] = E.records.messages.length;
|
|
@@ -896,19 +880,19 @@ const ce = function(t, e) {
|
|
|
896
880
|
C(t.actor, void 0, void 0, t.signalType);
|
|
897
881
|
break;
|
|
898
882
|
case "addNote":
|
|
899
|
-
|
|
883
|
+
re(t.actor, t.placement, t.text);
|
|
900
884
|
break;
|
|
901
885
|
case "addLinks":
|
|
902
|
-
|
|
886
|
+
ie(t.actor, t.text);
|
|
903
887
|
break;
|
|
904
888
|
case "addALink":
|
|
905
|
-
|
|
889
|
+
r0(t.actor, t.text);
|
|
906
890
|
break;
|
|
907
891
|
case "addProperties":
|
|
908
|
-
|
|
892
|
+
ae(t.actor, t.text);
|
|
909
893
|
break;
|
|
910
894
|
case "addDetails":
|
|
911
|
-
|
|
895
|
+
oe(t.actor, t.text);
|
|
912
896
|
break;
|
|
913
897
|
case "addMessage":
|
|
914
898
|
if (E.records.lastCreated) {
|
|
@@ -927,10 +911,10 @@ const ce = function(t, e) {
|
|
|
927
911
|
C(t.from, t.to, t.msg, t.signalType, t.activate);
|
|
928
912
|
break;
|
|
929
913
|
case "boxStart":
|
|
930
|
-
|
|
914
|
+
Oe(t.boxData);
|
|
931
915
|
break;
|
|
932
916
|
case "boxEnd":
|
|
933
|
-
|
|
917
|
+
i0();
|
|
934
918
|
break;
|
|
935
919
|
case "loopStart":
|
|
936
920
|
C(void 0, void 0, t.loopText, t.signalType);
|
|
@@ -960,7 +944,7 @@ const ce = function(t, e) {
|
|
|
960
944
|
C(void 0, void 0, void 0, t.signalType);
|
|
961
945
|
break;
|
|
962
946
|
case "setAccTitle":
|
|
963
|
-
|
|
947
|
+
$t(t.text);
|
|
964
948
|
break;
|
|
965
949
|
case "parStart":
|
|
966
950
|
C(void 0, void 0, t.parText, t.signalType);
|
|
@@ -987,44 +971,44 @@ const ce = function(t, e) {
|
|
|
987
971
|
C(void 0, void 0, void 0, t.signalType);
|
|
988
972
|
break;
|
|
989
973
|
}
|
|
990
|
-
},
|
|
991
|
-
addActor:
|
|
992
|
-
addMessage:
|
|
974
|
+
}, Qt = {
|
|
975
|
+
addActor: Ft,
|
|
976
|
+
addMessage: Ye,
|
|
993
977
|
addSignal: C,
|
|
994
|
-
addLinks:
|
|
995
|
-
addDetails:
|
|
996
|
-
addProperties:
|
|
997
|
-
autoWrap:
|
|
998
|
-
setWrap:
|
|
999
|
-
enableSequenceNumbers:
|
|
1000
|
-
disableSequenceNumbers:
|
|
1001
|
-
showSequenceNumbers:
|
|
1002
|
-
getMessages:
|
|
1003
|
-
getActors:
|
|
1004
|
-
getCreatedActors:
|
|
1005
|
-
getDestroyedActors:
|
|
1006
|
-
getActor:
|
|
1007
|
-
getActorKeys:
|
|
1008
|
-
getActorProperty:
|
|
1009
|
-
getAccTitle:
|
|
1010
|
-
getBoxes:
|
|
1011
|
-
getDiagramTitle:
|
|
1012
|
-
setDiagramTitle:
|
|
1013
|
-
getConfig: () =>
|
|
1014
|
-
clear:
|
|
1015
|
-
parseMessage:
|
|
1016
|
-
parseBoxData:
|
|
1017
|
-
LINETYPE:
|
|
1018
|
-
ARROWTYPE:
|
|
1019
|
-
PLACEMENT:
|
|
1020
|
-
addNote:
|
|
1021
|
-
setAccTitle:
|
|
1022
|
-
apply:
|
|
1023
|
-
setAccDescription:
|
|
1024
|
-
getAccDescription:
|
|
1025
|
-
hasAtLeastOneBox:
|
|
1026
|
-
hasAtLeastOneBoxWithTitle:
|
|
1027
|
-
},
|
|
978
|
+
addLinks: ie,
|
|
979
|
+
addDetails: oe,
|
|
980
|
+
addProperties: ae,
|
|
981
|
+
autoWrap: gt,
|
|
982
|
+
setWrap: Qe,
|
|
983
|
+
enableSequenceNumbers: Xe,
|
|
984
|
+
disableSequenceNumbers: Je,
|
|
985
|
+
showSequenceNumbers: Ze,
|
|
986
|
+
getMessages: qe,
|
|
987
|
+
getActors: He,
|
|
988
|
+
getCreatedActors: Ue,
|
|
989
|
+
getDestroyedActors: Ke,
|
|
990
|
+
getActor: vt,
|
|
991
|
+
getActorKeys: Ge,
|
|
992
|
+
getActorProperty: a0,
|
|
993
|
+
getAccTitle: we,
|
|
994
|
+
getBoxes: ze,
|
|
995
|
+
getDiagramTitle: ve,
|
|
996
|
+
setDiagramTitle: _e,
|
|
997
|
+
getConfig: () => st().sequence,
|
|
998
|
+
clear: je,
|
|
999
|
+
parseMessage: $e,
|
|
1000
|
+
parseBoxData: t0,
|
|
1001
|
+
LINETYPE: mt,
|
|
1002
|
+
ARROWTYPE: e0,
|
|
1003
|
+
PLACEMENT: s0,
|
|
1004
|
+
addNote: re,
|
|
1005
|
+
setAccTitle: $t,
|
|
1006
|
+
apply: ce,
|
|
1007
|
+
setAccDescription: ke,
|
|
1008
|
+
getAccDescription: Pe,
|
|
1009
|
+
hasAtLeastOneBox: Fe,
|
|
1010
|
+
hasAtLeastOneBoxWithTitle: We
|
|
1011
|
+
}, n0 = (t) => `.actor {
|
|
1028
1012
|
stroke: ${t.actorBorder};
|
|
1029
1013
|
fill: ${t.actorBkg};
|
|
1030
1014
|
}
|
|
@@ -1140,25 +1124,25 @@ const ce = function(t, e) {
|
|
|
1140
1124
|
fill: ${t.actorBkg};
|
|
1141
1125
|
stroke-width: 2px;
|
|
1142
1126
|
}
|
|
1143
|
-
`,
|
|
1144
|
-
return
|
|
1145
|
-
},
|
|
1127
|
+
`, o0 = n0, ft = 18 * 2, le = "actor-top", he = "actor-bottom", Ut = function(t, e) {
|
|
1128
|
+
return Se(t, e);
|
|
1129
|
+
}, c0 = function(t, e, c, s, i) {
|
|
1146
1130
|
if (e.links === void 0 || e.links === null || Object.keys(e.links).length === 0)
|
|
1147
1131
|
return { height: 0, width: 0 };
|
|
1148
|
-
const a = e.links,
|
|
1132
|
+
const a = e.links, o = e.actorCnt, l = e.rectData;
|
|
1149
1133
|
var p = "none";
|
|
1150
1134
|
i && (p = "block !important");
|
|
1151
1135
|
const r = t.append("g");
|
|
1152
|
-
r.attr("id", "actor" +
|
|
1136
|
+
r.attr("id", "actor" + o + "_popup"), r.attr("class", "actorPopupMenu"), r.attr("display", p);
|
|
1153
1137
|
var x = "";
|
|
1154
1138
|
l.class !== void 0 && (x = " " + l.class);
|
|
1155
|
-
let T = l.width >
|
|
1139
|
+
let T = l.width > c ? l.width : c;
|
|
1156
1140
|
const u = r.append("rect");
|
|
1157
1141
|
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) {
|
|
1158
1142
|
var g = 20;
|
|
1159
1143
|
for (let I in a) {
|
|
1160
|
-
var m = r.append("a"), _ =
|
|
1161
|
-
m.attr("xlink:href", _), m.attr("target", "_blank"),
|
|
1144
|
+
var m = r.append("a"), _ = te.sanitizeUrl(a[I]);
|
|
1145
|
+
m.attr("xlink:href", _), m.attr("target", "_blank"), k0(s)(
|
|
1162
1146
|
I,
|
|
1163
1147
|
m,
|
|
1164
1148
|
l.x + 10,
|
|
@@ -1171,30 +1155,28 @@ const ce = function(t, e) {
|
|
|
1171
1155
|
}
|
|
1172
1156
|
}
|
|
1173
1157
|
return u.attr("height", g), { height: l.height + g, width: T };
|
|
1174
|
-
},
|
|
1158
|
+
}, l0 = function(t) {
|
|
1175
1159
|
return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
|
|
1176
|
-
},
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
l = p, p = x;
|
|
1190
|
-
}
|
|
1191
|
-
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));
|
|
1160
|
+
}, It = async function(t, e, c = null) {
|
|
1161
|
+
let s = t.append("foreignObject");
|
|
1162
|
+
const i = await ee(e.text, Bt()), o = s.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();
|
|
1163
|
+
if (s.attr("height", Math.round(o.height)).attr("width", Math.round(o.width)), e.class === "noteText") {
|
|
1164
|
+
const l = t.node().firstChild;
|
|
1165
|
+
l.setAttribute("height", o.height + 2 * e.textMargin);
|
|
1166
|
+
const p = l.getBBox();
|
|
1167
|
+
s.attr("x", Math.round(p.x + p.width / 2 - o.width / 2)).attr("y", Math.round(p.y + p.height / 2 - o.height / 2));
|
|
1168
|
+
} else if (c) {
|
|
1169
|
+
let { startx: l, stopx: p, starty: r } = c;
|
|
1170
|
+
if (l > p) {
|
|
1171
|
+
const x = l;
|
|
1172
|
+
l = p, p = x;
|
|
1192
1173
|
}
|
|
1193
|
-
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1174
|
+
s.attr("x", Math.round(l + Math.abs(l - p) / 2 - o.width / 2)), e.class === "loopText" ? s.attr("y", Math.round(r)) : s.attr("y", Math.round(r - o.height));
|
|
1175
|
+
}
|
|
1176
|
+
return [s];
|
|
1177
|
+
}, bt = function(t, e) {
|
|
1178
|
+
let c = 0, s = 0;
|
|
1179
|
+
const i = e.text.split(v.lineBreakRegex), [a, o] = se(e.fontSize);
|
|
1198
1180
|
let l = [], p = 0, r = () => e.y;
|
|
1199
1181
|
if (e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0)
|
|
1200
1182
|
switch (e.valign) {
|
|
@@ -1204,12 +1186,12 @@ const ce = function(t, e) {
|
|
|
1204
1186
|
break;
|
|
1205
1187
|
case "middle":
|
|
1206
1188
|
case "center":
|
|
1207
|
-
r = () => Math.round(e.y + (
|
|
1189
|
+
r = () => Math.round(e.y + (c + s + e.textMargin) / 2);
|
|
1208
1190
|
break;
|
|
1209
1191
|
case "bottom":
|
|
1210
1192
|
case "end":
|
|
1211
1193
|
r = () => Math.round(
|
|
1212
|
-
e.y + (
|
|
1194
|
+
e.y + (c + s + 2 * e.textMargin) - e.textMargin
|
|
1213
1195
|
);
|
|
1214
1196
|
break;
|
|
1215
1197
|
}
|
|
@@ -1231,170 +1213,160 @@ const ce = function(t, e) {
|
|
|
1231
1213
|
for (let [x, T] of i.entries()) {
|
|
1232
1214
|
e.textMargin !== void 0 && e.textMargin === 0 && a !== void 0 && (p = x * a);
|
|
1233
1215
|
const u = t.append("text");
|
|
1234
|
-
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),
|
|
1235
|
-
const g = T ||
|
|
1216
|
+
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), o !== void 0 && u.style("font-size", o), 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);
|
|
1217
|
+
const g = T || Ne;
|
|
1236
1218
|
if (e.tspan) {
|
|
1237
1219
|
const m = u.append("tspan");
|
|
1238
1220
|
m.attr("x", e.x), e.fill !== void 0 && m.attr("fill", e.fill), m.text(g);
|
|
1239
1221
|
} else
|
|
1240
1222
|
u.text(g);
|
|
1241
|
-
e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (s += (u._groups || u)[0][0].getBBox().height,
|
|
1223
|
+
e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (s += (u._groups || u)[0][0].getBBox().height, c = s), l.push(u);
|
|
1242
1224
|
}
|
|
1243
1225
|
return l;
|
|
1244
|
-
},
|
|
1245
|
-
function
|
|
1246
|
-
return i + "," + a + " " + (i +
|
|
1226
|
+
}, de = function(t, e) {
|
|
1227
|
+
function c(i, a, o, l, p) {
|
|
1228
|
+
return i + "," + a + " " + (i + o) + "," + a + " " + (i + o) + "," + (a + l - p) + " " + (i + o - p * 1.2) + "," + (a + l) + " " + i + "," + (a + l);
|
|
1247
1229
|
}
|
|
1248
1230
|
const s = t.append("polygon");
|
|
1249
|
-
return s.attr("points",
|
|
1231
|
+
return s.attr("points", c(e.x, e.y, e.width, e.height, 7)), s.attr("class", "labelBox"), e.y = e.y + e.height / 2, bt(t, e), s;
|
|
1250
1232
|
};
|
|
1251
|
-
let
|
|
1252
|
-
const
|
|
1253
|
-
t.select &&
|
|
1254
|
-
const a = e[i],
|
|
1255
|
-
!s.mirrorActors && a.stopy ?
|
|
1256
|
-
});
|
|
1257
|
-
}, d0 = function(t, e, o, s) {
|
|
1258
|
-
return F(this, null, function* () {
|
|
1259
|
-
const i = s ? e.stopy : e.starty, a = e.x + e.width / 2, c = i + 5, l = t.append("g").lower();
|
|
1260
|
-
var p = l;
|
|
1261
|
-
s || (nt++, Object.keys(e.links || {}).length && !o.forceMenus && p.attr("onclick", h0(`actor${nt}_popup`)).attr("cursor", "pointer"), p.append("line").attr("id", "actor" + nt).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 = nt, e.links != null && p.attr("id", "root-" + nt));
|
|
1262
|
-
const r = St();
|
|
1263
|
-
var x = "actor";
|
|
1264
|
-
e.properties != null && e.properties.class ? x = e.properties.class : r.fill = "#eaeaea", s ? x += ` ${de}` : x += ` ${he}`, 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;
|
|
1265
|
-
const T = Kt(p, r);
|
|
1266
|
-
if (e.rectData = r, e.properties != null && e.properties.icon) {
|
|
1267
|
-
const g = e.properties.icon.trim();
|
|
1268
|
-
g.charAt(0) === "@" ? Ce(p, r.x + r.width - 20, r.y + 10, g.substr(1)) : De(p, r.x + r.width - 20, r.y + 10, g);
|
|
1269
|
-
}
|
|
1270
|
-
yield Gt(o, ot(e.description))(
|
|
1271
|
-
e.description,
|
|
1272
|
-
p,
|
|
1273
|
-
r.x,
|
|
1274
|
-
r.y,
|
|
1275
|
-
r.width,
|
|
1276
|
-
r.height,
|
|
1277
|
-
{ class: "actor" },
|
|
1278
|
-
o
|
|
1279
|
-
);
|
|
1280
|
-
let u = e.height;
|
|
1281
|
-
if (T.node) {
|
|
1282
|
-
const g = T.node().getBBox();
|
|
1283
|
-
e.height = g.height, u = g.height;
|
|
1284
|
-
}
|
|
1285
|
-
return u;
|
|
1286
|
-
});
|
|
1287
|
-
}, p0 = function(t, e, o, s) {
|
|
1288
|
-
return F(this, null, function* () {
|
|
1289
|
-
const i = s ? e.stopy : e.starty, a = e.x + e.width / 2, c = i + 80;
|
|
1290
|
-
t.lower(), s || (nt++, t.append("line").attr("id", "actor" + nt).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 = nt);
|
|
1291
|
-
const l = t.append("g");
|
|
1292
|
-
let p = "actor-man";
|
|
1293
|
-
s ? p += ` ${de}` : p += ` ${he}`, l.attr("class", p), l.attr("name", e.name);
|
|
1294
|
-
const r = St();
|
|
1295
|
-
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" + nt).attr("x1", a).attr("y1", i + 25).attr("x2", a).attr("y2", i + 45), l.append("line").attr("id", "actor-man-arms" + nt).attr("x1", a - gt / 2).attr("y1", i + 33).attr("x2", a + gt / 2).attr("y2", i + 33), l.append("line").attr("x1", a - gt / 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 + gt / 2 - 2).attr("y2", i + 60);
|
|
1296
|
-
const x = l.append("circle");
|
|
1297
|
-
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);
|
|
1298
|
-
const T = l.node().getBBox();
|
|
1299
|
-
return e.height = T.height, yield Gt(o, ot(e.description))(
|
|
1300
|
-
e.description,
|
|
1301
|
-
l,
|
|
1302
|
-
r.x,
|
|
1303
|
-
r.y + 35,
|
|
1304
|
-
r.width,
|
|
1305
|
-
r.height,
|
|
1306
|
-
{ class: "actor" },
|
|
1307
|
-
o
|
|
1308
|
-
), e.height;
|
|
1309
|
-
});
|
|
1310
|
-
}, u0 = function(t, e, o, s) {
|
|
1311
|
-
return F(this, null, function* () {
|
|
1312
|
-
switch (e.type) {
|
|
1313
|
-
case "actor":
|
|
1314
|
-
return yield p0(t, e, o, s);
|
|
1315
|
-
case "participant":
|
|
1316
|
-
return yield d0(t, e, o, s);
|
|
1317
|
-
}
|
|
1233
|
+
let at = -1;
|
|
1234
|
+
const pe = (t, e, c, s) => {
|
|
1235
|
+
t.select && c.forEach((i) => {
|
|
1236
|
+
const a = e[i], o = t.select("#actor" + a.actorCnt);
|
|
1237
|
+
!s.mirrorActors && a.stopy ? o.attr("y2", a.stopy + a.height / 2) : s.mirrorActors && o.attr("y2", a.stopy);
|
|
1318
1238
|
});
|
|
1319
|
-
},
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1239
|
+
}, h0 = async function(t, e, c, s) {
|
|
1240
|
+
const i = s ? e.stopy : e.starty, a = e.x + e.width / 2, o = i + 5, l = t.append("g").lower();
|
|
1241
|
+
var p = l;
|
|
1242
|
+
s || (at++, Object.keys(e.links || {}).length && !c.forceMenus && p.attr("onclick", l0(`actor${at}_popup`)).attr("cursor", "pointer"), p.append("line").attr("id", "actor" + at).attr("x1", a).attr("y1", o).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));
|
|
1243
|
+
const r = Nt();
|
|
1244
|
+
var x = "actor";
|
|
1245
|
+
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;
|
|
1246
|
+
const T = Ut(p, r);
|
|
1247
|
+
if (e.rectData = r, e.properties != null && e.properties.icon) {
|
|
1248
|
+
const g = e.properties.icon.trim();
|
|
1249
|
+
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);
|
|
1250
|
+
}
|
|
1251
|
+
await Kt(c, nt(e.description))(
|
|
1252
|
+
e.description,
|
|
1253
|
+
p,
|
|
1254
|
+
r.x,
|
|
1255
|
+
r.y,
|
|
1256
|
+
r.width,
|
|
1257
|
+
r.height,
|
|
1258
|
+
{ class: "actor" },
|
|
1259
|
+
c
|
|
1260
|
+
);
|
|
1261
|
+
let u = e.height;
|
|
1262
|
+
if (T.node) {
|
|
1263
|
+
const g = T.node().getBBox();
|
|
1264
|
+
e.height = g.height, u = g.height;
|
|
1265
|
+
}
|
|
1266
|
+
return u;
|
|
1267
|
+
}, d0 = async function(t, e, c, s) {
|
|
1268
|
+
const i = s ? e.stopy : e.starty, a = e.x + e.width / 2, o = i + 80;
|
|
1269
|
+
t.lower(), s || (at++, t.append("line").attr("id", "actor" + at).attr("x1", a).attr("y1", o).attr("x2", a).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"), e.actorCnt = at);
|
|
1270
|
+
const l = t.append("g");
|
|
1271
|
+
let p = "actor-man";
|
|
1272
|
+
s ? p += ` ${he}` : p += ` ${le}`, l.attr("class", p), l.attr("name", e.name);
|
|
1273
|
+
const r = Nt();
|
|
1274
|
+
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);
|
|
1275
|
+
const x = l.append("circle");
|
|
1276
|
+
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);
|
|
1277
|
+
const T = l.node().getBBox();
|
|
1278
|
+
return e.height = T.height, await Kt(c, nt(e.description))(
|
|
1279
|
+
e.description,
|
|
1280
|
+
l,
|
|
1281
|
+
r.x,
|
|
1282
|
+
r.y + 35,
|
|
1283
|
+
r.width,
|
|
1284
|
+
r.height,
|
|
1285
|
+
{ class: "actor" },
|
|
1286
|
+
c
|
|
1287
|
+
), e.height;
|
|
1288
|
+
}, p0 = async function(t, e, c, s) {
|
|
1289
|
+
switch (e.type) {
|
|
1290
|
+
case "actor":
|
|
1291
|
+
return await d0(t, e, c, s);
|
|
1292
|
+
case "participant":
|
|
1293
|
+
return await h0(t, e, c, s);
|
|
1294
|
+
}
|
|
1295
|
+
}, u0 = async function(t, e, c) {
|
|
1296
|
+
const i = t.append("g");
|
|
1297
|
+
ue(i, e), e.name && await Kt(c)(
|
|
1298
|
+
e.name,
|
|
1299
|
+
i,
|
|
1300
|
+
e.x,
|
|
1301
|
+
e.y + (e.textMaxHeight || 0) / 2,
|
|
1302
|
+
e.width,
|
|
1303
|
+
0,
|
|
1304
|
+
{ class: "text" },
|
|
1305
|
+
c
|
|
1306
|
+
), i.lower();
|
|
1307
|
+
}, f0 = function(t) {
|
|
1334
1308
|
return t.append("g");
|
|
1335
|
-
},
|
|
1336
|
-
const a =
|
|
1337
|
-
a.x = e.startx, a.y = e.starty, a.class = "activation" + i % 3, a.width = e.stopx - e.startx, a.height =
|
|
1338
|
-
},
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
u(e.startx,
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
);
|
|
1356
|
-
});
|
|
1357
|
-
let g = Ht();
|
|
1358
|
-
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", pe(T, g), g = ge(), 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;
|
|
1359
|
-
let m = ot(g.text) ? yield At(T, g, e) : Et(T, g);
|
|
1360
|
-
if (e.sectionTitles !== void 0) {
|
|
1361
|
-
for (const [_, I] of Object.entries(e.sectionTitles))
|
|
1362
|
-
if (I.message) {
|
|
1363
|
-
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, ot(g.text) ? (e.starty = e.sections[_].y, yield At(T, g, e)) : Et(T, g);
|
|
1364
|
-
let V = Math.round(
|
|
1365
|
-
m.map((S) => (S._groups || S)[0][0].getBBox().height).reduce((S, O) => S + O)
|
|
1366
|
-
);
|
|
1367
|
-
e.sections[_].height += V - (i + a);
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
return e.height = Math.round(e.stopy - e.starty), T;
|
|
1309
|
+
}, g0 = function(t, e, c, s, i) {
|
|
1310
|
+
const a = Nt(), o = e.anchored;
|
|
1311
|
+
a.x = e.startx, a.y = e.starty, a.class = "activation" + i % 3, a.width = e.stopx - e.startx, a.height = c - e.starty, Ut(o, a);
|
|
1312
|
+
}, x0 = async function(t, e, c, s) {
|
|
1313
|
+
const {
|
|
1314
|
+
boxMargin: i,
|
|
1315
|
+
boxTextMargin: a,
|
|
1316
|
+
labelBoxHeight: o,
|
|
1317
|
+
labelBoxWidth: l,
|
|
1318
|
+
messageFontFamily: p,
|
|
1319
|
+
messageFontSize: r,
|
|
1320
|
+
messageFontWeight: x
|
|
1321
|
+
} = s, T = t.append("g"), u = function(_, I, V, S) {
|
|
1322
|
+
return T.append("line").attr("x1", _).attr("y1", I).attr("x2", V).attr("y2", S).attr("class", "loopLine");
|
|
1323
|
+
};
|
|
1324
|
+
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(_) {
|
|
1325
|
+
u(e.startx, _.y, e.stopx, _.y).style(
|
|
1326
|
+
"stroke-dasharray",
|
|
1327
|
+
"3, 3"
|
|
1328
|
+
);
|
|
1371
1329
|
});
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1330
|
+
let g = zt();
|
|
1331
|
+
g.text = c, 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 = o || 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;
|
|
1332
|
+
let m = nt(g.text) ? await It(T, g, e) : bt(T, g);
|
|
1333
|
+
if (e.sectionTitles !== void 0) {
|
|
1334
|
+
for (const [_, I] of Object.entries(e.sectionTitles))
|
|
1335
|
+
if (I.message) {
|
|
1336
|
+
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);
|
|
1337
|
+
let V = Math.round(
|
|
1338
|
+
m.map((S) => (S._groups || S)[0][0].getBBox().height).reduce((S, O) => S + O)
|
|
1339
|
+
);
|
|
1340
|
+
e.sections[_].height += V - (i + a);
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
return e.height = Math.round(e.stopy - e.starty), T;
|
|
1344
|
+
}, ue = function(t, e) {
|
|
1345
|
+
Me(t, e);
|
|
1346
|
+
}, y0 = function(t) {
|
|
1375
1347
|
t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
|
|
1376
1348
|
"d",
|
|
1377
1349
|
"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"
|
|
1378
1350
|
);
|
|
1379
|
-
},
|
|
1351
|
+
}, T0 = function(t) {
|
|
1380
1352
|
t.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1381
1353
|
"d",
|
|
1382
1354
|
"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"
|
|
1383
1355
|
);
|
|
1384
|
-
},
|
|
1356
|
+
}, b0 = function(t) {
|
|
1385
1357
|
t.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1386
1358
|
"d",
|
|
1387
1359
|
"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"
|
|
1388
1360
|
);
|
|
1389
|
-
},
|
|
1361
|
+
}, E0 = function(t) {
|
|
1390
1362
|
t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 7.9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
|
|
1391
|
-
},
|
|
1363
|
+
}, m0 = function(t) {
|
|
1392
1364
|
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");
|
|
1393
|
-
},
|
|
1365
|
+
}, w0 = function(t) {
|
|
1394
1366
|
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);
|
|
1395
|
-
},
|
|
1367
|
+
}, v0 = function(t) {
|
|
1396
1368
|
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");
|
|
1397
|
-
},
|
|
1369
|
+
}, fe = function() {
|
|
1398
1370
|
return {
|
|
1399
1371
|
x: 0,
|
|
1400
1372
|
y: 0,
|
|
@@ -1409,7 +1381,7 @@ const ue = (t, e, o, s) => {
|
|
|
1409
1381
|
tspan: !0,
|
|
1410
1382
|
valign: void 0
|
|
1411
1383
|
};
|
|
1412
|
-
},
|
|
1384
|
+
}, _0 = function() {
|
|
1413
1385
|
return {
|
|
1414
1386
|
x: 0,
|
|
1415
1387
|
y: 0,
|
|
@@ -1421,80 +1393,78 @@ const ue = (t, e, o, s) => {
|
|
|
1421
1393
|
rx: 0,
|
|
1422
1394
|
ry: 0
|
|
1423
1395
|
};
|
|
1424
|
-
},
|
|
1425
|
-
function t(a,
|
|
1426
|
-
const u =
|
|
1396
|
+
}, Kt = function() {
|
|
1397
|
+
function t(a, o, l, p, r, x, T) {
|
|
1398
|
+
const u = o.append("text").attr("x", l + r / 2).attr("y", p + x / 2 + 5).style("text-anchor", "middle").text(a);
|
|
1427
1399
|
i(u, T);
|
|
1428
1400
|
}
|
|
1429
|
-
function e(a,
|
|
1430
|
-
const { actorFontSize: g, actorFontFamily: m, actorFontWeight: _ } = u, [I, V] =
|
|
1401
|
+
function e(a, o, l, p, r, x, T, u) {
|
|
1402
|
+
const { actorFontSize: g, actorFontFamily: m, actorFontWeight: _ } = u, [I, V] = se(g), S = a.split(v.lineBreakRegex);
|
|
1431
1403
|
for (let O = 0; O < S.length; O++) {
|
|
1432
|
-
const R = O * I - I * (S.length - 1) / 2,
|
|
1433
|
-
|
|
1404
|
+
const R = O * I - I * (S.length - 1) / 2, q = o.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);
|
|
1405
|
+
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);
|
|
1434
1406
|
}
|
|
1435
1407
|
}
|
|
1436
|
-
function
|
|
1437
|
-
const g =
|
|
1408
|
+
function c(a, o, l, p, r, x, T, u) {
|
|
1409
|
+
const g = o.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%");
|
|
1438
1410
|
_.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);
|
|
1439
1411
|
}
|
|
1440
|
-
function s(a,
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
I.append("div").style("text-align", "center").style("vertical-align", "middle").html(yield se(a, Yt())), e(a, m, l, p, r, x, T, u), i(I, T);
|
|
1444
|
-
});
|
|
1412
|
+
async function s(a, o, l, p, r, x, T, u) {
|
|
1413
|
+
const g = await wt(a, Bt()), m = o.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%");
|
|
1414
|
+
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);
|
|
1445
1415
|
}
|
|
1446
|
-
function i(a,
|
|
1447
|
-
for (const l in
|
|
1448
|
-
|
|
1416
|
+
function i(a, o) {
|
|
1417
|
+
for (const l in o)
|
|
1418
|
+
o.hasOwnProperty(l) && a.attr(l, o[l]);
|
|
1449
1419
|
}
|
|
1450
|
-
return function(a,
|
|
1451
|
-
return
|
|
1420
|
+
return function(a, o = !1) {
|
|
1421
|
+
return o ? s : a.textPlacement === "fo" ? c : a.textPlacement === "old" ? t : e;
|
|
1452
1422
|
};
|
|
1453
|
-
}(),
|
|
1454
|
-
function t(i, a,
|
|
1455
|
-
const T = a.append("text").attr("x",
|
|
1423
|
+
}(), k0 = function() {
|
|
1424
|
+
function t(i, a, o, l, p, r, x) {
|
|
1425
|
+
const T = a.append("text").attr("x", o).attr("y", l).style("text-anchor", "start").text(i);
|
|
1456
1426
|
s(T, x);
|
|
1457
1427
|
}
|
|
1458
|
-
function e(i, a,
|
|
1428
|
+
function e(i, a, o, l, p, r, x, T) {
|
|
1459
1429
|
const { actorFontSize: u, actorFontFamily: g, actorFontWeight: m } = T, _ = i.split(v.lineBreakRegex);
|
|
1460
1430
|
for (let I = 0; I < _.length; I++) {
|
|
1461
|
-
const V = I * u - u * (_.length - 1) / 2, S = a.append("text").attr("x",
|
|
1462
|
-
S.append("tspan").attr("x",
|
|
1431
|
+
const V = I * u - u * (_.length - 1) / 2, S = a.append("text").attr("x", o).attr("y", l).style("text-anchor", "start").style("font-size", u).style("font-weight", m).style("font-family", g);
|
|
1432
|
+
S.append("tspan").attr("x", o).attr("dy", V).text(_[I]), S.attr("y", l + r / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), s(S, x);
|
|
1463
1433
|
}
|
|
1464
1434
|
}
|
|
1465
|
-
function
|
|
1466
|
-
const u = a.append("switch"), m = u.append("foreignObject").attr("x",
|
|
1467
|
-
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, u,
|
|
1435
|
+
function c(i, a, o, l, p, r, x, T) {
|
|
1436
|
+
const u = a.append("switch"), m = u.append("foreignObject").attr("x", o).attr("y", l).attr("width", p).attr("height", r).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1437
|
+
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, u, o, l, p, r, x, T), s(m, x);
|
|
1468
1438
|
}
|
|
1469
1439
|
function s(i, a) {
|
|
1470
|
-
for (const
|
|
1471
|
-
a.hasOwnProperty(
|
|
1440
|
+
for (const o in a)
|
|
1441
|
+
a.hasOwnProperty(o) && i.attr(o, a[o]);
|
|
1472
1442
|
}
|
|
1473
1443
|
return function(i) {
|
|
1474
|
-
return i.textPlacement === "fo" ?
|
|
1444
|
+
return i.textPlacement === "fo" ? c : i.textPlacement === "old" ? t : e;
|
|
1475
1445
|
};
|
|
1476
1446
|
}(), D = {
|
|
1477
|
-
drawRect:
|
|
1478
|
-
drawText:
|
|
1479
|
-
drawLabel:
|
|
1480
|
-
drawActor:
|
|
1481
|
-
drawBox:
|
|
1482
|
-
drawPopup:
|
|
1483
|
-
anchorElement:
|
|
1484
|
-
drawActivation:
|
|
1485
|
-
drawLoop:
|
|
1486
|
-
drawBackgroundRect:
|
|
1487
|
-
insertArrowHead:
|
|
1488
|
-
insertArrowFilledHead:
|
|
1489
|
-
insertSequenceNumber:
|
|
1490
|
-
insertArrowCrossHead:
|
|
1491
|
-
insertDatabaseIcon:
|
|
1492
|
-
insertComputerIcon:
|
|
1493
|
-
insertClockIcon:
|
|
1494
|
-
getTextObj:
|
|
1495
|
-
getNoteRect:
|
|
1496
|
-
fixLifeLineHeights:
|
|
1497
|
-
sanitizeUrl:
|
|
1447
|
+
drawRect: Ut,
|
|
1448
|
+
drawText: bt,
|
|
1449
|
+
drawLabel: de,
|
|
1450
|
+
drawActor: p0,
|
|
1451
|
+
drawBox: u0,
|
|
1452
|
+
drawPopup: c0,
|
|
1453
|
+
anchorElement: f0,
|
|
1454
|
+
drawActivation: g0,
|
|
1455
|
+
drawLoop: x0,
|
|
1456
|
+
drawBackgroundRect: ue,
|
|
1457
|
+
insertArrowHead: E0,
|
|
1458
|
+
insertArrowFilledHead: m0,
|
|
1459
|
+
insertSequenceNumber: w0,
|
|
1460
|
+
insertArrowCrossHead: v0,
|
|
1461
|
+
insertDatabaseIcon: y0,
|
|
1462
|
+
insertComputerIcon: T0,
|
|
1463
|
+
insertClockIcon: b0,
|
|
1464
|
+
getTextObj: fe,
|
|
1465
|
+
getNoteRect: _0,
|
|
1466
|
+
fixLifeLineHeights: pe,
|
|
1467
|
+
sanitizeUrl: te.sanitizeUrl
|
|
1498
1468
|
};
|
|
1499
1469
|
let n = {};
|
|
1500
1470
|
const f = {
|
|
@@ -1556,29 +1526,29 @@ const f = {
|
|
|
1556
1526
|
stopx: void 0,
|
|
1557
1527
|
starty: void 0,
|
|
1558
1528
|
stopy: void 0
|
|
1559
|
-
}, this.verticalPos = 0,
|
|
1529
|
+
}, this.verticalPos = 0, xe(st());
|
|
1560
1530
|
},
|
|
1561
|
-
updateVal: function(t, e,
|
|
1562
|
-
t[e] === void 0 ? t[e] =
|
|
1531
|
+
updateVal: function(t, e, c, s) {
|
|
1532
|
+
t[e] === void 0 ? t[e] = c : t[e] = s(c, t[e]);
|
|
1563
1533
|
},
|
|
1564
|
-
updateBounds: function(t, e,
|
|
1534
|
+
updateBounds: function(t, e, c, s) {
|
|
1565
1535
|
const i = this;
|
|
1566
1536
|
let a = 0;
|
|
1567
|
-
function
|
|
1537
|
+
function o(l) {
|
|
1568
1538
|
return function(r) {
|
|
1569
1539
|
a++;
|
|
1570
1540
|
const x = i.sequenceItems.length - a + 1;
|
|
1571
|
-
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",
|
|
1541
|
+
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", c + x * n.boxMargin, Math.max), l !== "activation" && (i.updateVal(r, "startx", t - x * n.boxMargin, Math.min), i.updateVal(r, "stopx", c + 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));
|
|
1572
1542
|
};
|
|
1573
1543
|
}
|
|
1574
|
-
this.sequenceItems.forEach(
|
|
1544
|
+
this.sequenceItems.forEach(o()), this.activations.forEach(o("activation"));
|
|
1575
1545
|
},
|
|
1576
|
-
insert: function(t, e,
|
|
1577
|
-
const i = v.getMin(t,
|
|
1578
|
-
this.updateVal(f.data, "startx", i, Math.min), this.updateVal(f.data, "starty",
|
|
1546
|
+
insert: function(t, e, c, s) {
|
|
1547
|
+
const i = v.getMin(t, c), a = v.getMax(t, c), o = v.getMin(e, s), l = v.getMax(e, s);
|
|
1548
|
+
this.updateVal(f.data, "startx", i, Math.min), this.updateVal(f.data, "starty", o, Math.min), this.updateVal(f.data, "stopx", a, Math.max), this.updateVal(f.data, "stopy", l, Math.max), this.updateBounds(i, o, a, l);
|
|
1579
1549
|
},
|
|
1580
|
-
newActivation: function(t, e,
|
|
1581
|
-
const s =
|
|
1550
|
+
newActivation: function(t, e, c) {
|
|
1551
|
+
const s = c[t.from.actor], i = St(t.from.actor).length || 0, a = s.x + s.width / 2 + (i - 1) * n.activationWidth / 2;
|
|
1582
1552
|
this.activations.push({
|
|
1583
1553
|
startx: a,
|
|
1584
1554
|
starty: this.verticalPos + 2,
|
|
@@ -1589,8 +1559,8 @@ const f = {
|
|
|
1589
1559
|
});
|
|
1590
1560
|
},
|
|
1591
1561
|
endActivation: function(t) {
|
|
1592
|
-
const e = this.activations.map(function(
|
|
1593
|
-
return
|
|
1562
|
+
const e = this.activations.map(function(c) {
|
|
1563
|
+
return c.actor;
|
|
1594
1564
|
}).lastIndexOf(t.from.actor);
|
|
1595
1565
|
return this.activations.splice(e, 1)[0];
|
|
1596
1566
|
},
|
|
@@ -1635,102 +1605,92 @@ const f = {
|
|
|
1635
1605
|
getBounds: function() {
|
|
1636
1606
|
return { bounds: this.data, models: this.models };
|
|
1637
1607
|
}
|
|
1638
|
-
},
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
});
|
|
1650
|
-
}, yt = (t) => ({
|
|
1608
|
+
}, P0 = async function(t, e) {
|
|
1609
|
+
f.bumpVerticalPos(n.boxMargin), e.height = n.boxMargin, e.starty = f.getVerticalPos();
|
|
1610
|
+
const c = Nt();
|
|
1611
|
+
c.x = e.startx, c.y = e.starty, c.width = e.width || n.width, c.class = "note";
|
|
1612
|
+
const s = t.append("g"), i = D.drawRect(s, c), a = zt();
|
|
1613
|
+
a.x = e.startx, a.y = e.starty, a.width = c.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";
|
|
1614
|
+
const o = nt(a.text) ? await It(s, a) : bt(s, a), l = Math.round(
|
|
1615
|
+
o.map((p) => (p._groups || p)[0][0].getBBox().height).reduce((p, r) => p + r)
|
|
1616
|
+
);
|
|
1617
|
+
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 + c.width, f.insert(e.startx, e.starty, e.stopx, e.stopy), f.models.addNote(e);
|
|
1618
|
+
}, xt = (t) => ({
|
|
1651
1619
|
fontFamily: t.messageFontFamily,
|
|
1652
1620
|
fontSize: t.messageFontSize,
|
|
1653
1621
|
fontWeight: t.messageFontWeight
|
|
1654
|
-
}),
|
|
1622
|
+
}), Tt = (t) => ({
|
|
1655
1623
|
fontFamily: t.noteFontFamily,
|
|
1656
1624
|
fontSize: t.noteFontSize,
|
|
1657
1625
|
fontWeight: t.noteFontWeight
|
|
1658
|
-
}),
|
|
1626
|
+
}), Wt = (t) => ({
|
|
1659
1627
|
fontFamily: t.actorFontFamily,
|
|
1660
1628
|
fontSize: t.actorFontSize,
|
|
1661
1629
|
fontWeight: t.actorFontWeight
|
|
1662
1630
|
});
|
|
1663
|
-
function
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
return f.bumpVerticalPos(r), e.height += r, e.stopy = e.starty + e.height, f.insert(e.fromBounds, e.starty, e.toBounds, e.stopy), p;
|
|
1685
|
-
});
|
|
1631
|
+
async function L0(t, e) {
|
|
1632
|
+
f.bumpVerticalPos(10);
|
|
1633
|
+
const { startx: c, stopx: s, message: i } = e, a = v.splitBreaks(i).length, o = nt(i), l = o ? await wt(i, st()) : B.calculateTextDimensions(i, xt(n));
|
|
1634
|
+
if (!o) {
|
|
1635
|
+
const T = l.height / a;
|
|
1636
|
+
e.height += T, f.bumpVerticalPos(T);
|
|
1637
|
+
}
|
|
1638
|
+
let p, r = l.height - 10;
|
|
1639
|
+
const x = l.width;
|
|
1640
|
+
if (c === s) {
|
|
1641
|
+
p = f.getVerticalPos() + r, n.rightAngles || (r += n.boxMargin, p = f.getVerticalPos() + r), r += 30;
|
|
1642
|
+
const T = v.getMax(x / 2, n.width / 2);
|
|
1643
|
+
f.insert(
|
|
1644
|
+
c - T,
|
|
1645
|
+
f.getVerticalPos() - 10 + r,
|
|
1646
|
+
s + T,
|
|
1647
|
+
f.getVerticalPos() + 30 + r
|
|
1648
|
+
);
|
|
1649
|
+
} else
|
|
1650
|
+
r += n.boxMargin, p = f.getVerticalPos() + r, f.insert(c, p - 10, s, p);
|
|
1651
|
+
return f.bumpVerticalPos(r), e.height += r, e.stopy = e.starty + e.height, f.insert(e.fromBounds, e.starty, e.toBounds, e.stopy), p;
|
|
1686
1652
|
}
|
|
1687
|
-
const
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1653
|
+
const I0 = async function(t, e, c, s) {
|
|
1654
|
+
const { startx: i, stopx: a, starty: o, message: l, type: p, sequenceIndex: r, sequenceVisible: x } = e, T = B.calculateTextDimensions(l, xt(n)), u = zt();
|
|
1655
|
+
u.x = i, u.y = o + 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: c }) : bt(t, u);
|
|
1656
|
+
const g = T.width;
|
|
1657
|
+
let m;
|
|
1658
|
+
i === a ? n.rightAngles ? m = t.append("path").attr(
|
|
1659
|
+
"d",
|
|
1660
|
+
`M ${i},${c} H ${i + v.getMax(n.width / 2, g / 2)} V ${c + 25} H ${i}`
|
|
1661
|
+
) : m = t.append("path").attr(
|
|
1662
|
+
"d",
|
|
1663
|
+
"M " + i + "," + c + " C " + (i + 60) + "," + (c - 10) + " " + (i + 60) + "," + (c + 30) + " " + i + "," + (c + 20)
|
|
1664
|
+
) : (m = t.append("line"), m.attr("x1", i), m.attr("y1", c), m.attr("x2", a), m.attr("y2", c)), 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");
|
|
1665
|
+
let _ = "";
|
|
1666
|
+
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", c + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(r));
|
|
1667
|
+
}, A0 = async function(t, e, c, s, i, a, o) {
|
|
1668
|
+
let l = 0, p = 0, r, x = 0;
|
|
1669
|
+
for (const T of s) {
|
|
1670
|
+
const u = e[T], g = u.box;
|
|
1671
|
+
r && r != g && (o || f.models.addBox(r), p += n.boxMargin + r.margin), g && g != r && (o || (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), c[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);
|
|
1672
|
+
}
|
|
1673
|
+
r && !o && f.models.addBox(r), f.bumpVerticalPos(x);
|
|
1674
|
+
}, qt = async function(t, e, c, s) {
|
|
1675
|
+
if (s) {
|
|
1676
|
+
let i = 0;
|
|
1677
|
+
f.bumpVerticalPos(n.boxMargin * 2);
|
|
1678
|
+
for (const a of c) {
|
|
1679
|
+
const o = e[a];
|
|
1680
|
+
o.stopy || (o.stopy = f.getVerticalPos());
|
|
1681
|
+
const l = await D.drawActor(t, o, n, !0);
|
|
1682
|
+
i = v.getMax(i, l);
|
|
1709
1683
|
}
|
|
1710
|
-
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
for (const a of o) {
|
|
1718
|
-
const c = e[a];
|
|
1719
|
-
c.stopy || (c.stopy = f.getVerticalPos());
|
|
1720
|
-
const l = yield D.drawActor(t, c, n, !0);
|
|
1721
|
-
i = v.getMax(i, l);
|
|
1722
|
-
}
|
|
1723
|
-
f.bumpVerticalPos(i + n.boxMargin);
|
|
1724
|
-
} else
|
|
1725
|
-
for (const i of o) {
|
|
1726
|
-
const a = e[i];
|
|
1727
|
-
yield D.drawActor(t, a, n, !1);
|
|
1728
|
-
}
|
|
1729
|
-
});
|
|
1730
|
-
}, xe = function(t, e, o, s) {
|
|
1684
|
+
f.bumpVerticalPos(i + n.boxMargin);
|
|
1685
|
+
} else
|
|
1686
|
+
for (const i of c) {
|
|
1687
|
+
const a = e[i];
|
|
1688
|
+
await D.drawActor(t, a, n, !1);
|
|
1689
|
+
}
|
|
1690
|
+
}, ge = function(t, e, c, s) {
|
|
1731
1691
|
let i = 0, a = 0;
|
|
1732
|
-
for (const
|
|
1733
|
-
const l = e[
|
|
1692
|
+
for (const o of c) {
|
|
1693
|
+
const l = e[o], p = R0(l), r = D.drawPopup(
|
|
1734
1694
|
t,
|
|
1735
1695
|
l,
|
|
1736
1696
|
p,
|
|
@@ -1741,32 +1701,32 @@ const A0 = function(t, e, o, s) {
|
|
|
1741
1701
|
r.height > i && (i = r.height), r.width + l.x > a && (a = r.width + l.x);
|
|
1742
1702
|
}
|
|
1743
1703
|
return { maxHeight: i, maxWidth: a };
|
|
1744
|
-
},
|
|
1745
|
-
|
|
1746
|
-
},
|
|
1704
|
+
}, xe = function(t) {
|
|
1705
|
+
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);
|
|
1706
|
+
}, St = function(t) {
|
|
1747
1707
|
return f.activations.filter(function(e) {
|
|
1748
1708
|
return e.actor === t;
|
|
1749
1709
|
});
|
|
1750
|
-
},
|
|
1751
|
-
const
|
|
1752
|
-
return v.getMin(
|
|
1753
|
-
},
|
|
1754
|
-
return v.getMax(
|
|
1755
|
-
},
|
|
1710
|
+
}, jt = function(t, e) {
|
|
1711
|
+
const c = e[t], s = St(t), i = s.reduce(function(o, l) {
|
|
1712
|
+
return v.getMin(o, l.startx);
|
|
1713
|
+
}, c.x + c.width / 2 - 1), a = s.reduce(function(o, l) {
|
|
1714
|
+
return v.getMax(o, l.stopx);
|
|
1715
|
+
}, c.x + c.width / 2 + 1);
|
|
1756
1716
|
return [i, a];
|
|
1757
1717
|
};
|
|
1758
|
-
function
|
|
1759
|
-
f.bumpVerticalPos(
|
|
1718
|
+
function it(t, e, c, s, i) {
|
|
1719
|
+
f.bumpVerticalPos(c);
|
|
1760
1720
|
let a = s;
|
|
1761
1721
|
if (e.id && e.message && t[e.id]) {
|
|
1762
|
-
const
|
|
1763
|
-
e.message = B.wrapLabel(`[${e.message}]`,
|
|
1722
|
+
const o = t[e.id].width, l = xt(n);
|
|
1723
|
+
e.message = B.wrapLabel(`[${e.message}]`, o - 2 * n.wrapPadding, l), e.width = o, e.wrap = !0;
|
|
1764
1724
|
const p = B.calculateTextDimensions(e.message, l), r = v.getMax(p.height, n.labelBoxHeight);
|
|
1765
|
-
a = s + r,
|
|
1725
|
+
a = s + r, X.debug(`${r} - ${e.message}`);
|
|
1766
1726
|
}
|
|
1767
1727
|
i(e), f.bumpVerticalPos(a);
|
|
1768
1728
|
}
|
|
1769
|
-
function
|
|
1729
|
+
function N0(t, e, c, s, i, a, o) {
|
|
1770
1730
|
function l(r, x) {
|
|
1771
1731
|
r.x < i[t.from].x ? (f.insert(
|
|
1772
1732
|
e.stopx - x,
|
|
@@ -1794,387 +1754,379 @@ function S0(t, e, o, s, i, a, c) {
|
|
|
1794
1754
|
), e.startx = e.startx - x);
|
|
1795
1755
|
}
|
|
1796
1756
|
if (a[t.to] == s) {
|
|
1797
|
-
const r = i[t.to], x = r.type == "actor" ?
|
|
1798
|
-
l(r, x), r.starty =
|
|
1799
|
-
} else if (
|
|
1757
|
+
const r = i[t.to], x = r.type == "actor" ? ft / 2 + 3 : r.width / 2 + 3;
|
|
1758
|
+
l(r, x), r.starty = c - r.height / 2, f.bumpVerticalPos(r.height / 2);
|
|
1759
|
+
} else if (o[t.from] == s) {
|
|
1800
1760
|
const r = i[t.from];
|
|
1801
1761
|
if (n.mirrorActors) {
|
|
1802
|
-
const x = r.type == "actor" ?
|
|
1762
|
+
const x = r.type == "actor" ? ft / 2 : r.width / 2;
|
|
1803
1763
|
p(r, x);
|
|
1804
1764
|
}
|
|
1805
|
-
r.stopy =
|
|
1806
|
-
} else if (
|
|
1765
|
+
r.stopy = c - r.height / 2, f.bumpVerticalPos(r.height / 2);
|
|
1766
|
+
} else if (o[t.to] == s) {
|
|
1807
1767
|
const r = i[t.to];
|
|
1808
1768
|
if (n.mirrorActors) {
|
|
1809
|
-
const x = r.type == "actor" ?
|
|
1769
|
+
const x = r.type == "actor" ? ft / 2 + 3 : r.width / 2 + 3;
|
|
1810
1770
|
l(r, x);
|
|
1811
1771
|
}
|
|
1812
|
-
r.stopy =
|
|
1772
|
+
r.stopy = c - r.height / 2, f.bumpVerticalPos(r.height / 2);
|
|
1813
1773
|
}
|
|
1814
1774
|
}
|
|
1815
|
-
const
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1775
|
+
const S0 = async function(t, e, c, s) {
|
|
1776
|
+
const { securityLevel: i, sequence: a } = st();
|
|
1777
|
+
n = a;
|
|
1778
|
+
let o;
|
|
1779
|
+
i === "sandbox" && (o = Lt("#i" + e));
|
|
1780
|
+
const l = i === "sandbox" ? Lt(o.nodes()[0].contentDocument.body) : Lt("body"), p = i === "sandbox" ? o.nodes()[0].contentDocument : document;
|
|
1781
|
+
f.init(), X.debug(s.db);
|
|
1782
|
+
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();
|
|
1783
|
+
let m = s.db.getActorKeys();
|
|
1784
|
+
const _ = s.db.getMessages(), I = s.db.getDiagramTitle(), V = s.db.hasAtLeastOneBox(), S = s.db.hasAtLeastOneBoxWithTitle(), O = await M0(x, _, s);
|
|
1785
|
+
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) {
|
|
1786
|
+
const y = /* @__PURE__ */ new Set();
|
|
1787
|
+
_.forEach((P) => {
|
|
1788
|
+
y.add(P.from), y.add(P.to);
|
|
1789
|
+
}), m = m.filter((P) => y.has(P));
|
|
1790
|
+
}
|
|
1791
|
+
await A0(r, x, T, m, 0, _, !1);
|
|
1792
|
+
const R = await O0(_, x, O, s);
|
|
1793
|
+
D.insertArrowHead(r), D.insertArrowCrossHead(r), D.insertArrowFilledHead(r), D.insertSequenceNumber(r);
|
|
1794
|
+
function q(y, P) {
|
|
1795
|
+
const j = f.endActivation(y);
|
|
1796
|
+
j.starty + 18 > P && (j.starty = P - 6, P += 12), D.drawActivation(
|
|
1797
|
+
r,
|
|
1798
|
+
j,
|
|
1799
|
+
P,
|
|
1800
|
+
n,
|
|
1801
|
+
St(y.from.actor).length
|
|
1802
|
+
), f.insert(j.startx, P - 10, j.stopx, P);
|
|
1803
|
+
}
|
|
1804
|
+
let z = 1, J = 1;
|
|
1805
|
+
const $ = [], H = [];
|
|
1806
|
+
let U = 0;
|
|
1807
|
+
for (const y of _) {
|
|
1808
|
+
let P, j, rt;
|
|
1809
|
+
switch (y.type) {
|
|
1810
|
+
case s.db.LINETYPE.NOTE:
|
|
1811
|
+
f.resetVerticalPos(), j = y.noteModel, await P0(r, j);
|
|
1812
|
+
break;
|
|
1813
|
+
case s.db.LINETYPE.ACTIVE_START:
|
|
1814
|
+
f.newActivation(y, r, x);
|
|
1815
|
+
break;
|
|
1816
|
+
case s.db.LINETYPE.ACTIVE_END:
|
|
1817
|
+
q(y, f.getVerticalPos());
|
|
1818
|
+
break;
|
|
1819
|
+
case s.db.LINETYPE.LOOP_START:
|
|
1820
|
+
it(
|
|
1821
|
+
R,
|
|
1822
|
+
y,
|
|
1823
|
+
n.boxMargin,
|
|
1824
|
+
n.boxMargin + n.boxTextMargin,
|
|
1825
|
+
(A) => f.newLoop(A)
|
|
1826
|
+
);
|
|
1827
|
+
break;
|
|
1828
|
+
case s.db.LINETYPE.LOOP_END:
|
|
1829
|
+
P = f.endLoop(), await D.drawLoop(r, P, "loop", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
|
|
1830
|
+
break;
|
|
1831
|
+
case s.db.LINETYPE.RECT_START:
|
|
1832
|
+
it(
|
|
1833
|
+
R,
|
|
1834
|
+
y,
|
|
1835
|
+
n.boxMargin,
|
|
1836
|
+
n.boxMargin,
|
|
1837
|
+
(A) => f.newLoop(void 0, A.message)
|
|
1838
|
+
);
|
|
1839
|
+
break;
|
|
1840
|
+
case s.db.LINETYPE.RECT_END:
|
|
1841
|
+
P = f.endLoop(), H.push(P), f.models.addLoop(P), f.bumpVerticalPos(P.stopy - f.getVerticalPos());
|
|
1842
|
+
break;
|
|
1843
|
+
case s.db.LINETYPE.OPT_START:
|
|
1844
|
+
it(
|
|
1845
|
+
R,
|
|
1846
|
+
y,
|
|
1847
|
+
n.boxMargin,
|
|
1848
|
+
n.boxMargin + n.boxTextMargin,
|
|
1849
|
+
(A) => f.newLoop(A)
|
|
1850
|
+
);
|
|
1851
|
+
break;
|
|
1852
|
+
case s.db.LINETYPE.OPT_END:
|
|
1853
|
+
P = f.endLoop(), await D.drawLoop(r, P, "opt", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
|
|
1854
|
+
break;
|
|
1855
|
+
case s.db.LINETYPE.ALT_START:
|
|
1856
|
+
it(
|
|
1857
|
+
R,
|
|
1858
|
+
y,
|
|
1859
|
+
n.boxMargin,
|
|
1860
|
+
n.boxMargin + n.boxTextMargin,
|
|
1861
|
+
(A) => f.newLoop(A)
|
|
1862
|
+
);
|
|
1863
|
+
break;
|
|
1864
|
+
case s.db.LINETYPE.ALT_ELSE:
|
|
1865
|
+
it(
|
|
1866
|
+
R,
|
|
1867
|
+
y,
|
|
1868
|
+
n.boxMargin + n.boxTextMargin,
|
|
1869
|
+
n.boxMargin,
|
|
1870
|
+
(A) => f.addSectionToLoop(A)
|
|
1871
|
+
);
|
|
1872
|
+
break;
|
|
1873
|
+
case s.db.LINETYPE.ALT_END:
|
|
1874
|
+
P = f.endLoop(), await D.drawLoop(r, P, "alt", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
|
|
1875
|
+
break;
|
|
1876
|
+
case s.db.LINETYPE.PAR_START:
|
|
1877
|
+
case s.db.LINETYPE.PAR_OVER_START:
|
|
1878
|
+
it(
|
|
1879
|
+
R,
|
|
1880
|
+
y,
|
|
1881
|
+
n.boxMargin,
|
|
1882
|
+
n.boxMargin + n.boxTextMargin,
|
|
1883
|
+
(A) => f.newLoop(A)
|
|
1884
|
+
), f.saveVerticalPos();
|
|
1885
|
+
break;
|
|
1886
|
+
case s.db.LINETYPE.PAR_AND:
|
|
1887
|
+
it(
|
|
1888
|
+
R,
|
|
1889
|
+
y,
|
|
1890
|
+
n.boxMargin + n.boxTextMargin,
|
|
1891
|
+
n.boxMargin,
|
|
1892
|
+
(A) => f.addSectionToLoop(A)
|
|
1893
|
+
);
|
|
1894
|
+
break;
|
|
1895
|
+
case s.db.LINETYPE.PAR_END:
|
|
1896
|
+
P = f.endLoop(), await D.drawLoop(r, P, "par", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
|
|
1897
|
+
break;
|
|
1898
|
+
case s.db.LINETYPE.AUTONUMBER:
|
|
1899
|
+
z = y.message.start || z, J = y.message.step || J, y.message.visible ? s.db.enableSequenceNumbers() : s.db.disableSequenceNumbers();
|
|
1900
|
+
break;
|
|
1901
|
+
case s.db.LINETYPE.CRITICAL_START:
|
|
1902
|
+
it(
|
|
1903
|
+
R,
|
|
1904
|
+
y,
|
|
1905
|
+
n.boxMargin,
|
|
1906
|
+
n.boxMargin + n.boxTextMargin,
|
|
1907
|
+
(A) => f.newLoop(A)
|
|
1908
|
+
);
|
|
1909
|
+
break;
|
|
1910
|
+
case s.db.LINETYPE.CRITICAL_OPTION:
|
|
1911
|
+
it(
|
|
1912
|
+
R,
|
|
1913
|
+
y,
|
|
1914
|
+
n.boxMargin + n.boxTextMargin,
|
|
1915
|
+
n.boxMargin,
|
|
1916
|
+
(A) => f.addSectionToLoop(A)
|
|
1917
|
+
);
|
|
1918
|
+
break;
|
|
1919
|
+
case s.db.LINETYPE.CRITICAL_END:
|
|
1920
|
+
P = f.endLoop(), await D.drawLoop(r, P, "critical", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
|
|
1921
|
+
break;
|
|
1922
|
+
case s.db.LINETYPE.BREAK_START:
|
|
1923
|
+
it(
|
|
1924
|
+
R,
|
|
1925
|
+
y,
|
|
1926
|
+
n.boxMargin,
|
|
1927
|
+
n.boxMargin + n.boxTextMargin,
|
|
1928
|
+
(A) => f.newLoop(A)
|
|
1929
|
+
);
|
|
1930
|
+
break;
|
|
1931
|
+
case s.db.LINETYPE.BREAK_END:
|
|
1932
|
+
P = f.endLoop(), await D.drawLoop(r, P, "break", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
|
|
1933
|
+
break;
|
|
1934
|
+
default:
|
|
1935
|
+
try {
|
|
1936
|
+
rt = y.msgModel, rt.starty = f.getVerticalPos(), rt.sequenceIndex = z, rt.sequenceVisible = s.db.showSequenceNumbers();
|
|
1937
|
+
const A = await L0(r, rt);
|
|
1938
|
+
N0(
|
|
1966
1939
|
y,
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
it = y.msgModel, it.starty = f.getVerticalPos(), it.sequenceIndex = H, it.sequenceVisible = s.db.showSequenceNumbers();
|
|
1978
|
-
const A = yield I0(r, it);
|
|
1979
|
-
S0(
|
|
1980
|
-
y,
|
|
1981
|
-
it,
|
|
1982
|
-
A,
|
|
1983
|
-
K,
|
|
1984
|
-
x,
|
|
1985
|
-
T,
|
|
1986
|
-
u
|
|
1987
|
-
), tt.push({ messageModel: it, lineStartY: A }), f.models.addMessage(it);
|
|
1988
|
-
} catch (A) {
|
|
1989
|
-
J.error("error while drawing message", A);
|
|
1990
|
-
}
|
|
1991
|
-
}
|
|
1992
|
-
[
|
|
1993
|
-
s.db.LINETYPE.SOLID_OPEN,
|
|
1994
|
-
s.db.LINETYPE.DOTTED_OPEN,
|
|
1995
|
-
s.db.LINETYPE.SOLID,
|
|
1996
|
-
s.db.LINETYPE.DOTTED,
|
|
1997
|
-
s.db.LINETYPE.SOLID_CROSS,
|
|
1998
|
-
s.db.LINETYPE.DOTTED_CROSS,
|
|
1999
|
-
s.db.LINETYPE.SOLID_POINT,
|
|
2000
|
-
s.db.LINETYPE.DOTTED_POINT
|
|
2001
|
-
].includes(y.type) && (H = H + Z), K++;
|
|
1940
|
+
rt,
|
|
1941
|
+
A,
|
|
1942
|
+
U,
|
|
1943
|
+
x,
|
|
1944
|
+
T,
|
|
1945
|
+
u
|
|
1946
|
+
), $.push({ messageModel: rt, lineStartY: A }), f.models.addMessage(rt);
|
|
1947
|
+
} catch (A) {
|
|
1948
|
+
X.error("error while drawing message", A);
|
|
1949
|
+
}
|
|
2002
1950
|
}
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
1951
|
+
[
|
|
1952
|
+
s.db.LINETYPE.SOLID_OPEN,
|
|
1953
|
+
s.db.LINETYPE.DOTTED_OPEN,
|
|
1954
|
+
s.db.LINETYPE.SOLID,
|
|
1955
|
+
s.db.LINETYPE.DOTTED,
|
|
1956
|
+
s.db.LINETYPE.SOLID_CROSS,
|
|
1957
|
+
s.db.LINETYPE.DOTTED_CROSS,
|
|
1958
|
+
s.db.LINETYPE.SOLID_POINT,
|
|
1959
|
+
s.db.LINETYPE.DOTTED_POINT
|
|
1960
|
+
].includes(y.type) && (z = z + J), U++;
|
|
1961
|
+
}
|
|
1962
|
+
X.debug("createdActors", T), X.debug("destroyedActors", u), await qt(r, x, m, !1);
|
|
1963
|
+
for (const y of $)
|
|
1964
|
+
await I0(r, y.messageModel, y.lineStartY, s);
|
|
1965
|
+
n.mirrorActors && await qt(r, x, m, !0), H.forEach((y) => D.drawBackgroundRect(r, y)), pe(r, x, m, n);
|
|
1966
|
+
for (const y of f.models.boxes)
|
|
1967
|
+
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);
|
|
1968
|
+
V && f.bumpVerticalPos(n.boxMargin);
|
|
1969
|
+
const F = ge(r, x, m, p), { bounds: W } = f.getBounds();
|
|
1970
|
+
let Z = W.stopy - W.starty;
|
|
1971
|
+
Z < F.maxHeight && (Z = F.maxHeight);
|
|
1972
|
+
let K = Z + 2 * n.diagramMarginY;
|
|
1973
|
+
n.mirrorActors && (K = K - n.boxMargin + n.bottomMarginAdj);
|
|
1974
|
+
let Q = W.stopx - W.startx;
|
|
1975
|
+
Q < F.maxWidth && (Q = F.maxWidth);
|
|
1976
|
+
const tt = Q + 2 * n.diagramMarginX;
|
|
1977
|
+
I && r.append("text").text(I).attr("x", (W.stopx - W.startx) / 2 - 2 * n.diagramMarginX).attr("y", -25), Ae(r, K, tt, n.useMaxWidth);
|
|
1978
|
+
const N = I ? 40 : 0;
|
|
1979
|
+
r.attr(
|
|
1980
|
+
"viewBox",
|
|
1981
|
+
W.startx - n.diagramMarginX + " -" + (n.diagramMarginY + N) + " " + tt + " " + (K + N)
|
|
1982
|
+
), X.debug("models:", f.models);
|
|
2025
1983
|
};
|
|
2026
|
-
function
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
return J.debug("maxMessageWidthPerActor:", s), s;
|
|
2062
|
-
});
|
|
1984
|
+
async function M0(t, e, c) {
|
|
1985
|
+
const s = {};
|
|
1986
|
+
for (const i of e)
|
|
1987
|
+
if (t[i.to] && t[i.from]) {
|
|
1988
|
+
const a = t[i.to];
|
|
1989
|
+
if (i.placement === c.db.PLACEMENT.LEFTOF && !a.prevActor || i.placement === c.db.PLACEMENT.RIGHTOF && !a.nextActor)
|
|
1990
|
+
continue;
|
|
1991
|
+
const o = i.placement !== void 0, l = !o, p = o ? 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;
|
|
1992
|
+
l && i.from === a.nextActor ? s[i.to] = v.getMax(
|
|
1993
|
+
s[i.to] || 0,
|
|
1994
|
+
T
|
|
1995
|
+
) : l && i.from === a.prevActor ? s[i.from] = v.getMax(
|
|
1996
|
+
s[i.from] || 0,
|
|
1997
|
+
T
|
|
1998
|
+
) : l && i.from === i.to ? (s[i.from] = v.getMax(
|
|
1999
|
+
s[i.from] || 0,
|
|
2000
|
+
T / 2
|
|
2001
|
+
), s[i.to] = v.getMax(
|
|
2002
|
+
s[i.to] || 0,
|
|
2003
|
+
T / 2
|
|
2004
|
+
)) : i.placement === c.db.PLACEMENT.RIGHTOF ? s[i.from] = v.getMax(
|
|
2005
|
+
s[i.from] || 0,
|
|
2006
|
+
T
|
|
2007
|
+
) : i.placement === c.db.PLACEMENT.LEFTOF ? s[a.prevActor] = v.getMax(
|
|
2008
|
+
s[a.prevActor] || 0,
|
|
2009
|
+
T
|
|
2010
|
+
) : i.placement === c.db.PLACEMENT.OVER && (a.prevActor && (s[a.prevActor] = v.getMax(
|
|
2011
|
+
s[a.prevActor] || 0,
|
|
2012
|
+
T / 2
|
|
2013
|
+
)), a.nextActor && (s[i.from] = v.getMax(
|
|
2014
|
+
s[i.from] || 0,
|
|
2015
|
+
T / 2
|
|
2016
|
+
)));
|
|
2017
|
+
}
|
|
2018
|
+
return X.debug("maxMessageWidthPerActor:", s), s;
|
|
2063
2019
|
}
|
|
2064
|
-
const
|
|
2020
|
+
const R0 = function(t) {
|
|
2065
2021
|
let e = 0;
|
|
2066
|
-
const
|
|
2022
|
+
const c = Wt(n);
|
|
2067
2023
|
for (const s in t.links) {
|
|
2068
|
-
const a = B.calculateTextDimensions(s,
|
|
2024
|
+
const a = B.calculateTextDimensions(s, c).width + 2 * n.wrapPadding + 2 * n.boxMargin;
|
|
2069
2025
|
e < a && (e = a);
|
|
2070
2026
|
}
|
|
2071
2027
|
return e;
|
|
2072
2028
|
};
|
|
2073
|
-
function
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2029
|
+
async function C0(t, e, c) {
|
|
2030
|
+
let s = 0;
|
|
2031
|
+
for (const a of Object.keys(t)) {
|
|
2032
|
+
const o = t[a];
|
|
2033
|
+
o.wrap && (o.description = B.wrapLabel(
|
|
2034
|
+
o.description,
|
|
2035
|
+
n.width - 2 * n.wrapPadding,
|
|
2036
|
+
Wt(n)
|
|
2037
|
+
));
|
|
2038
|
+
const l = nt(o.description) ? await wt(o.description, st()) : B.calculateTextDimensions(o.description, Wt(n));
|
|
2039
|
+
o.width = o.wrap ? n.width : v.getMax(n.width, l.width + 2 * n.wrapPadding), o.height = o.wrap ? v.getMax(l.height, n.height) : n.height, s = v.getMax(s, o.height);
|
|
2040
|
+
}
|
|
2041
|
+
for (const a in e) {
|
|
2042
|
+
const o = t[a];
|
|
2043
|
+
if (!o)
|
|
2044
|
+
continue;
|
|
2045
|
+
const l = t[o.nextActor];
|
|
2046
|
+
if (!l) {
|
|
2047
|
+
const T = e[a] + n.actorMargin - o.width / 2;
|
|
2048
|
+
o.margin = v.getMax(T, n.actorMargin);
|
|
2049
|
+
continue;
|
|
2085
2050
|
}
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2051
|
+
const r = e[a] + n.actorMargin - o.width / 2 - l.width / 2;
|
|
2052
|
+
o.margin = v.getMax(r, n.actorMargin);
|
|
2053
|
+
}
|
|
2054
|
+
let i = 0;
|
|
2055
|
+
return c.forEach((a) => {
|
|
2056
|
+
const o = xt(n);
|
|
2057
|
+
let l = a.actorKeys.reduce((x, T) => x += t[T].width + (t[T].margin || 0), 0);
|
|
2058
|
+
l -= 2 * n.boxTextMargin, a.wrap && (a.name = B.wrapLabel(a.name, l - 2 * n.wrapPadding, o));
|
|
2059
|
+
const p = B.calculateTextDimensions(a.name, o);
|
|
2060
|
+
i = v.getMax(p.height, i);
|
|
2061
|
+
const r = v.getMax(l, p.width + 2 * n.wrapPadding);
|
|
2062
|
+
if (a.margin = n.boxTextMargin, l < r) {
|
|
2063
|
+
const x = (r - l) / 2;
|
|
2064
|
+
a.margin += x;
|
|
2098
2065
|
}
|
|
2099
|
-
|
|
2100
|
-
return o.forEach((a) => {
|
|
2101
|
-
const c = yt(n);
|
|
2102
|
-
let l = a.actorKeys.reduce((x, T) => x += t[T].width + (t[T].margin || 0), 0);
|
|
2103
|
-
l -= 2 * n.boxTextMargin, a.wrap && (a.name = B.wrapLabel(a.name, l - 2 * n.wrapPadding, c));
|
|
2104
|
-
const p = B.calculateTextDimensions(a.name, c);
|
|
2105
|
-
i = v.getMax(p.height, i);
|
|
2106
|
-
const r = v.getMax(l, p.width + 2 * n.wrapPadding);
|
|
2107
|
-
if (a.margin = n.boxTextMargin, l < r) {
|
|
2108
|
-
const x = (r - l) / 2;
|
|
2109
|
-
a.margin += x;
|
|
2110
|
-
}
|
|
2111
|
-
}), o.forEach((a) => a.textMaxHeight = i), v.getMax(s, n.height);
|
|
2112
|
-
});
|
|
2066
|
+
}), c.forEach((a) => a.textMaxHeight = i), v.getMax(s, n.height);
|
|
2113
2067
|
}
|
|
2114
|
-
const
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
a ? B.wrapLabel(
|
|
2138
|
-
t.message,
|
|
2139
|
-
v.getMax(n.width, e[t.from].width),
|
|
2140
|
-
bt(n)
|
|
2141
|
-
) : t.message,
|
|
2142
|
-
bt(n)
|
|
2143
|
-
), l.width = a ? v.getMax(n.width, e[t.from].width) : v.getMax(
|
|
2144
|
-
e[t.from].width,
|
|
2145
|
-
n.width,
|
|
2146
|
-
c.width + 2 * n.noteMargin
|
|
2147
|
-
), 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(
|
|
2068
|
+
const D0 = async function(t, e, c) {
|
|
2069
|
+
const s = e[t.from].x, i = e[t.to].x, a = t.wrap && t.message;
|
|
2070
|
+
let o = nt(t.message) ? await wt(t.message, st()) : B.calculateTextDimensions(
|
|
2071
|
+
a ? B.wrapLabel(t.message, n.width, Tt(n)) : t.message,
|
|
2072
|
+
Tt(n)
|
|
2073
|
+
);
|
|
2074
|
+
const l = {
|
|
2075
|
+
width: a ? n.width : v.getMax(n.width, o.width + 2 * n.noteMargin),
|
|
2076
|
+
height: 0,
|
|
2077
|
+
startx: e[t.from].x,
|
|
2078
|
+
stopx: 0,
|
|
2079
|
+
starty: 0,
|
|
2080
|
+
stopy: 0,
|
|
2081
|
+
message: t.message
|
|
2082
|
+
};
|
|
2083
|
+
return t.placement === c.db.PLACEMENT.RIGHTOF ? (l.width = a ? v.getMax(n.width, o.width) : v.getMax(
|
|
2084
|
+
e[t.from].width / 2 + e[t.to].width / 2,
|
|
2085
|
+
o.width + 2 * n.noteMargin
|
|
2086
|
+
), l.startx = s + (e[t.from].width + n.actorMargin) / 2) : t.placement === c.db.PLACEMENT.LEFTOF ? (l.width = a ? v.getMax(n.width, o.width + 2 * n.noteMargin) : v.getMax(
|
|
2087
|
+
e[t.from].width / 2 + e[t.to].width / 2,
|
|
2088
|
+
o.width + 2 * n.noteMargin
|
|
2089
|
+
), l.startx = s - l.width + (e[t.from].width - n.actorMargin) / 2) : t.to === t.from ? (o = B.calculateTextDimensions(
|
|
2090
|
+
a ? B.wrapLabel(
|
|
2148
2091
|
t.message,
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
)
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2092
|
+
v.getMax(n.width, e[t.from].width),
|
|
2093
|
+
Tt(n)
|
|
2094
|
+
) : t.message,
|
|
2095
|
+
Tt(n)
|
|
2096
|
+
), l.width = a ? v.getMax(n.width, e[t.from].width) : v.getMax(
|
|
2097
|
+
e[t.from].width,
|
|
2098
|
+
n.width,
|
|
2099
|
+
o.width + 2 * n.noteMargin
|
|
2100
|
+
), 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(
|
|
2101
|
+
t.message,
|
|
2102
|
+
l.width - 2 * n.wrapPadding,
|
|
2103
|
+
Tt(n)
|
|
2104
|
+
)), X.debug(
|
|
2105
|
+
`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${t.message}]`
|
|
2106
|
+
), l;
|
|
2107
|
+
}, V0 = function(t, e, c) {
|
|
2156
2108
|
if (![
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2109
|
+
c.db.LINETYPE.SOLID_OPEN,
|
|
2110
|
+
c.db.LINETYPE.DOTTED_OPEN,
|
|
2111
|
+
c.db.LINETYPE.SOLID,
|
|
2112
|
+
c.db.LINETYPE.DOTTED,
|
|
2113
|
+
c.db.LINETYPE.SOLID_CROSS,
|
|
2114
|
+
c.db.LINETYPE.DOTTED_CROSS,
|
|
2115
|
+
c.db.LINETYPE.SOLID_POINT,
|
|
2116
|
+
c.db.LINETYPE.DOTTED_POINT
|
|
2165
2117
|
].includes(t.type))
|
|
2166
2118
|
return {};
|
|
2167
|
-
const [s, i] =
|
|
2168
|
-
let r = l ? a :
|
|
2169
|
-
const x = Math.abs(a -
|
|
2170
|
-
t.from === t.to ? r = p : (t.activate && !x && (r += T(n.activationWidth / 2 - 1)), [
|
|
2171
|
-
const u = [s, i, a,
|
|
2119
|
+
const [s, i] = jt(t.from, e), [a, o] = jt(t.to, e), l = s <= a, p = l ? i : s;
|
|
2120
|
+
let r = l ? a : o;
|
|
2121
|
+
const x = Math.abs(a - o) > 2, T = (_) => l ? -_ : _;
|
|
2122
|
+
t.from === t.to ? r = p : (t.activate && !x && (r += T(n.activationWidth / 2 - 1)), [c.db.LINETYPE.SOLID_OPEN, c.db.LINETYPE.DOTTED_OPEN].includes(t.type) || (r += T(3)));
|
|
2123
|
+
const u = [s, i, a, o], g = Math.abs(p - r);
|
|
2172
2124
|
t.wrap && t.message && (t.message = B.wrapLabel(
|
|
2173
2125
|
t.message,
|
|
2174
2126
|
v.getMax(g + 2 * n.wrapPadding, n.width),
|
|
2175
|
-
|
|
2127
|
+
xt(n)
|
|
2176
2128
|
));
|
|
2177
|
-
const m = B.calculateTextDimensions(t.message,
|
|
2129
|
+
const m = B.calculateTextDimensions(t.message, xt(n));
|
|
2178
2130
|
return {
|
|
2179
2131
|
width: v.getMax(
|
|
2180
2132
|
t.wrap ? 0 : m.width + 2 * n.wrapPadding,
|
|
@@ -2192,93 +2144,91 @@ const V0 = function(t, e, o) {
|
|
|
2192
2144
|
fromBounds: Math.min.apply(null, u),
|
|
2193
2145
|
toBounds: Math.max.apply(null, u)
|
|
2194
2146
|
};
|
|
2195
|
-
},
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
{
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
break;
|
|
2246
|
-
}
|
|
2247
|
-
r.placement !== void 0 ? (l = yield V0(r, e, s), r.noteModel = l, a.forEach((T) => {
|
|
2248
|
-
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;
|
|
2249
|
-
})) : (p = O0(r, e, s), r.msgModel = p, p.startx && p.stopx && a.length > 0 && a.forEach((T) => {
|
|
2250
|
-
if (c = T, p.startx === p.stopx) {
|
|
2251
|
-
const u = e[r.from], g = e[r.to];
|
|
2252
|
-
c.from = v.getMin(
|
|
2253
|
-
u.x - p.width / 2,
|
|
2254
|
-
u.x - u.width / 2,
|
|
2255
|
-
c.from
|
|
2256
|
-
), c.to = v.getMax(
|
|
2257
|
-
g.x + p.width / 2,
|
|
2258
|
-
g.x + u.width / 2,
|
|
2259
|
-
c.to
|
|
2260
|
-
), c.width = v.getMax(c.width, Math.abs(c.to - c.from)) - n.labelBoxWidth;
|
|
2261
|
-
} else
|
|
2262
|
-
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;
|
|
2263
|
-
}));
|
|
2147
|
+
}, O0 = async function(t, e, c, s) {
|
|
2148
|
+
const i = {}, a = [];
|
|
2149
|
+
let o, l, p;
|
|
2150
|
+
for (const r of t) {
|
|
2151
|
+
switch (r.id = B.random({ length: 10 }), r.type) {
|
|
2152
|
+
case s.db.LINETYPE.LOOP_START:
|
|
2153
|
+
case s.db.LINETYPE.ALT_START:
|
|
2154
|
+
case s.db.LINETYPE.OPT_START:
|
|
2155
|
+
case s.db.LINETYPE.PAR_START:
|
|
2156
|
+
case s.db.LINETYPE.PAR_OVER_START:
|
|
2157
|
+
case s.db.LINETYPE.CRITICAL_START:
|
|
2158
|
+
case s.db.LINETYPE.BREAK_START:
|
|
2159
|
+
a.push({
|
|
2160
|
+
id: r.id,
|
|
2161
|
+
msg: r.message,
|
|
2162
|
+
from: Number.MAX_SAFE_INTEGER,
|
|
2163
|
+
to: Number.MIN_SAFE_INTEGER,
|
|
2164
|
+
width: 0
|
|
2165
|
+
});
|
|
2166
|
+
break;
|
|
2167
|
+
case s.db.LINETYPE.ALT_ELSE:
|
|
2168
|
+
case s.db.LINETYPE.PAR_AND:
|
|
2169
|
+
case s.db.LINETYPE.CRITICAL_OPTION:
|
|
2170
|
+
r.message && (o = a.pop(), i[o.id] = o, i[r.id] = o, a.push(o));
|
|
2171
|
+
break;
|
|
2172
|
+
case s.db.LINETYPE.LOOP_END:
|
|
2173
|
+
case s.db.LINETYPE.ALT_END:
|
|
2174
|
+
case s.db.LINETYPE.OPT_END:
|
|
2175
|
+
case s.db.LINETYPE.PAR_END:
|
|
2176
|
+
case s.db.LINETYPE.CRITICAL_END:
|
|
2177
|
+
case s.db.LINETYPE.BREAK_END:
|
|
2178
|
+
o = a.pop(), i[o.id] = o;
|
|
2179
|
+
break;
|
|
2180
|
+
case s.db.LINETYPE.ACTIVE_START:
|
|
2181
|
+
{
|
|
2182
|
+
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 = {
|
|
2183
|
+
startx: g,
|
|
2184
|
+
stopx: g + n.activationWidth,
|
|
2185
|
+
actor: r.from.actor,
|
|
2186
|
+
enabled: !0
|
|
2187
|
+
};
|
|
2188
|
+
f.activations.push(m);
|
|
2189
|
+
}
|
|
2190
|
+
break;
|
|
2191
|
+
case s.db.LINETYPE.ACTIVE_END:
|
|
2192
|
+
{
|
|
2193
|
+
const T = f.activations.map((u) => u.actor).lastIndexOf(r.from.actor);
|
|
2194
|
+
delete f.activations.splice(T, 1)[0];
|
|
2195
|
+
}
|
|
2196
|
+
break;
|
|
2264
2197
|
}
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
},
|
|
2198
|
+
r.placement !== void 0 ? (l = await D0(r, e, s), r.noteModel = l, a.forEach((T) => {
|
|
2199
|
+
o = T, o.from = v.getMin(o.from, l.startx), o.to = v.getMax(o.to, l.startx + l.width), o.width = v.getMax(o.width, Math.abs(o.from - o.to)) - n.labelBoxWidth;
|
|
2200
|
+
})) : (p = V0(r, e, s), r.msgModel = p, p.startx && p.stopx && a.length > 0 && a.forEach((T) => {
|
|
2201
|
+
if (o = T, p.startx === p.stopx) {
|
|
2202
|
+
const u = e[r.from], g = e[r.to];
|
|
2203
|
+
o.from = v.getMin(
|
|
2204
|
+
u.x - p.width / 2,
|
|
2205
|
+
u.x - u.width / 2,
|
|
2206
|
+
o.from
|
|
2207
|
+
), o.to = v.getMax(
|
|
2208
|
+
g.x + p.width / 2,
|
|
2209
|
+
g.x + u.width / 2,
|
|
2210
|
+
o.to
|
|
2211
|
+
), o.width = v.getMax(o.width, Math.abs(o.to - o.from)) - n.labelBoxWidth;
|
|
2212
|
+
} else
|
|
2213
|
+
o.from = v.getMin(p.startx, o.from), o.to = v.getMax(p.stopx, o.to), o.width = v.getMax(o.width, p.width) - n.labelBoxWidth;
|
|
2214
|
+
}));
|
|
2215
|
+
}
|
|
2216
|
+
return f.activations = [], X.debug("Loop type widths:", i), i;
|
|
2217
|
+
}, B0 = {
|
|
2268
2218
|
bounds: f,
|
|
2269
|
-
drawActors:
|
|
2270
|
-
drawActorsPopup:
|
|
2271
|
-
setConf:
|
|
2272
|
-
draw:
|
|
2273
|
-
},
|
|
2274
|
-
parser:
|
|
2275
|
-
db:
|
|
2276
|
-
renderer:
|
|
2277
|
-
styles:
|
|
2219
|
+
drawActors: qt,
|
|
2220
|
+
drawActorsPopup: ge,
|
|
2221
|
+
setConf: xe,
|
|
2222
|
+
draw: S0
|
|
2223
|
+
}, W0 = {
|
|
2224
|
+
parser: De,
|
|
2225
|
+
db: Qt,
|
|
2226
|
+
renderer: B0,
|
|
2227
|
+
styles: o0,
|
|
2278
2228
|
init: ({ wrap: t }) => {
|
|
2279
|
-
|
|
2229
|
+
Qt.setWrap(t);
|
|
2280
2230
|
}
|
|
2281
2231
|
};
|
|
2282
2232
|
export {
|
|
2283
|
-
|
|
2233
|
+
W0 as diagram
|
|
2284
2234
|
};
|