@kong-ui-public/documentation 0.7.20 → 0.7.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Tableau10-GLA_9iAD-BMurskAd.js → Tableau10-D7jGxypv-D3w6FIcJ.js} +1 -2
- package/dist/arc-CJ96KFKf-ZAEyyrBI.js +84 -0
- package/dist/{blockDiagram-6b2b5046-ZGxr7RGf-D4pbh8vR.js → blockDiagram-9f4a6865-DOUkHJlG-BPuF5-tK.js} +107 -108
- package/dist/{c4Diagram-b947cdbb-Bo6xALld-D8DXBmHw.js → c4Diagram-ae766693-qW59_Cjl-BSBtINzy.js} +133 -132
- package/dist/{channel-BX3TjCqa-Cdtt6hB1.js → channel-BkEGjNbZ-CzBFLYvk.js} +1 -1
- package/dist/{classDiagram-35230388-C60SAKfJ-FQHXcc4J.js → classDiagram-fb54d2a0-DaEnSnV7-BgUSoTGU.js} +8 -7
- package/dist/{classDiagram-v2-412acd34-CHK1KDqU-CiKmarbv.js → classDiagram-v2-a2b738ad-DVF-sdZH-lL0m0fQD.js} +8 -8
- package/dist/{clone-BSWoNj0I-CW2QP79u.js → clone-Bz5840kP-D3Uvm_gp.js} +1 -1
- package/dist/{createText-423428c9-DeHbckoy-r2CCACGx.js → createText-ca0c5216-DGjoI7Oz-8Az9WSXK.js} +14 -20
- package/dist/documentation.es.js +3 -3
- package/dist/documentation.umd.js +993 -723
- package/dist/{edges-d417c7a0-D7e9Y4V--DVOSTCB5.js → edges-066a5561-ByMuMaff-ipHdGCa_.js} +28 -27
- package/dist/{erDiagram-0ea73325-E3jchkiK-CfTqZxm6.js → erDiagram-09d1c15f-Ctl-zT4O-B9E7LRcs.js} +71 -72
- package/dist/{flowDb-d35e309a-Dch1VW7i-Bk557s4E.js → flowDb-c1833063-nJUM9bYy-B5f_hjwI.js} +4 -4
- package/dist/{flowDiagram-d949d7c1-CxjmKfBF-CuFUEya4.js → flowDiagram-b222e15a-BlrP8xne-DJ_sATm6.js} +339 -333
- package/dist/{flowDiagram-v2-49332944-Duf6j7PN-DgsEJ4Bo.js → flowDiagram-v2-13329dc7-DlqVPxH6-CgXruRZr.js} +5 -5
- package/dist/{flowchart-elk-definition-27cc417a-M-lK4i48-Bs8Ix10e.js → flowchart-elk-definition-ae0efee6-B2FZpaI4-C8o8y5J1.js} +343 -590
- package/dist/{ganttDiagram-5c869e3b-CgjZsm2H-Bon0v47P.js → ganttDiagram-b62c793e-BUkrtLIU-roFbcEhP.js} +513 -534
- package/dist/gitGraphDiagram-942e62fe-BIndO562-dNVJJzzm.js +1264 -0
- package/dist/{graph-Ch18bQn5-BLEKw6WT.js → graph-BN58fiEq-CyCz6HB3.js} +3 -4
- package/dist/{index-8fae9850-kUIz8xNo-CDn9_qZB.js → index-01f381cb-DHHDXut0-C1FToHnX.js} +11 -11
- package/dist/{index-CVS7cBlb.js → index-Dz46e5bv.js} +2354 -2515
- package/dist/{infoDiagram-db7b18fc-BpBtHVy2-DuX4gmA7.js → infoDiagram-94cd232f-CSzv-wTE-Bnonj1Cb.js} +7 -7
- package/dist/{journeyDiagram-d5636530-CZUFMDTA-D5VAFQAG.js → journeyDiagram-6625b456-Ca9U8tWI-DoKEPckV.js} +16 -16
- package/dist/katex-BXNjbZo7-CF_fuFJb.js +11637 -0
- package/dist/{layout-BzV691RN-Br8Ir03a.js → layout-DU4VNk5y-DEbr0_Pk.js} +112 -114
- package/dist/{line-JCh8JM-V-T9MVIZIE.js → line-CwSAou3c-dgS2jcU_.js} +3 -4
- package/dist/{linear-cwTFOJBq-B6q6qtlZ.js → linear-CngEzq0a-B6fRdJQY.js} +70 -94
- package/dist/{mindmap-definition-377f8f1f-BzIPdpBG-DD8FIpST.js → mindmap-definition-307c710a-CvpxqRPj-AB15RcM6.js} +343 -378
- package/dist/{ordinal-MUacOSdK-B1MUT0BL.js → ordinal-DfAQgscy-BEJTu10r.js} +3 -7
- package/dist/{path-Crsf9Nsj-SiSjwXsf.js → path-DLwuMfdd-EbErTa4c.js} +12 -19
- package/dist/{pieDiagram-b0208e96-BQfpnZHG-E8AMqTd3.js → pieDiagram-bb1d19e5-LP-9WGAS-DwilsWxb.js} +61 -61
- package/dist/{quadrantDiagram-0332be45-CNL4JCrn-BYyiYlYH.js → quadrantDiagram-c759a472-B_TsLXO0-BviiuQRe.js} +2 -2
- package/dist/{requirementDiagram-bf7890df-NBqqCuPF-CIHJhGNa.js → requirementDiagram-87253d64-o6jrBKBt-BDXpXGpQ.js} +30 -30
- package/dist/{sankeyDiagram-0acdec17-YE0ROy8d-CU1TmQZx.js → sankeyDiagram-707fac0f-BoEHDAJv-BBNylsjT.js} +44 -58
- package/dist/{sequenceDiagram-c18d009d-Yucxrjw7-D_cnXQcd.js → sequenceDiagram-6894f283-Dsj52Wsi-TDdIX1Wn.js} +845 -812
- package/dist/{stateDiagram-43596fc0-D9IY4Ssi-KJp_o1Vc.js → stateDiagram-5dee940d-COfohDXu-Dra8cHnR.js} +54 -54
- package/dist/{stateDiagram-v2-2ead4f9c-5IZQWbnV-Chm6qgaK.js → stateDiagram-v2-1992cada-v9z1blk7-b2WlcHGI.js} +12 -12
- package/dist/{styles-b2c874b6-pUAi9-OK-C7HwN-ih.js → styles-0784dbeb-DHDYpA72-BTX0XQJ5.js} +24 -24
- package/dist/{styles-7383a064-DLbSva3T-DWY6NPMf.js → styles-483fbfea-DUrqZeOP-BPfiLFkT.js} +140 -137
- package/dist/{styles-6860f46c-DHqkrPDU-JiuD19BB.js → styles-b83b31c9-R9NNyYA0-DnoGi25s.js} +29 -29
- package/dist/{svgDrawCommon-0ee1b4e9-rbw7BPwi-Boin581S.js → svgDrawCommon-5e1cfd1d-DeHC_PTd-44CTrnyq.js} +5 -5
- package/dist/{timeline-definition-d977decf-CtlVf6FF-BqqlH53Y.js → timeline-definition-bf702344-BzpRV6Z8-DHqazJ7N.js} +2 -2
- package/dist/{xychartDiagram-e50adddc-B9qgoJob-CqAKcFLo.js → xychartDiagram-f11f50a6-BMDfQSWf-CixUys_w.js} +40 -40
- package/package.json +6 -6
- package/dist/arc-TomPQHIy-B0wkvDWU.js +0 -86
- package/dist/gitGraphDiagram-b9d81de9-DhOfBQfl-BvCcUYjg.js +0 -1262
|
@@ -1,271 +1,271 @@
|
|
|
1
|
-
import { m as
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
4
|
-
var t = function(
|
|
5
|
-
for (k = k || {},
|
|
1
|
+
import { m as Zt, g as Ee, y as we, x as ve, c as at, s as Gt, b as _e, a as ke, j as v, aM as te, b0 as nt, A as Pe, l as K, d as It, r as ee, a$ as Ct, b1 as Le, b2 as Et, e as Ie, h as Pt, i as Me, z as C } from "./index-Dz46e5bv.js";
|
|
2
|
+
import { l as Ne, x as Ae, y as Se, h as Oe, g as Wt, p as Mt } from "./svgDrawCommon-5e1cfd1d-DeHC_PTd-44CTrnyq.js";
|
|
3
|
+
var Yt = function() {
|
|
4
|
+
var t = function(it, T, k, f) {
|
|
5
|
+
for (k = k || {}, f = it.length; f--; k[it[f]] = T)
|
|
6
6
|
;
|
|
7
7
|
return k;
|
|
8
|
-
}, e = [1, 2], c = [1, 3], a = [1, 4], s = [2, 4], i = [1, 9], l = [1, 11],
|
|
8
|
+
}, e = [1, 2], c = [1, 3], a = [1, 4], s = [2, 4], i = [1, 9], l = [1, 11], n = [1, 13], h = [1, 14], r = [1, 16], u = [1, 17], b = [1, 18], g = [1, 24], y = [1, 25], w = [1, 26], _ = [1, 27], L = [1, 28], R = [1, 29], N = [1, 30], $ = [1, 31], S = [1, 32], F = [1, 33], W = [1, 34], X = [1, 35], G = [1, 36], q = [1, 37], z = [1, 38], B = [1, 39], V = [1, 41], J = [1, 42], H = [1, 43], Q = [1, 44], tt = [1, 45], M = [1, 46], m = [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], Z = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], 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], I = [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], Ut = [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], pt = [68, 69, 70], ct = [1, 120], At = {
|
|
9
9
|
trace: function() {
|
|
10
10
|
},
|
|
11
11
|
yy: {},
|
|
12
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 },
|
|
13
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" },
|
|
14
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]],
|
|
15
|
-
performAction: function(
|
|
16
|
-
var
|
|
15
|
+
performAction: function(it, T, k, f, A, d, U) {
|
|
16
|
+
var p = d.length - 1;
|
|
17
17
|
switch (A) {
|
|
18
18
|
case 3:
|
|
19
|
-
return
|
|
19
|
+
return f.apply(d[p]), d[p];
|
|
20
20
|
case 4:
|
|
21
21
|
case 9:
|
|
22
22
|
this.$ = [];
|
|
23
23
|
break;
|
|
24
24
|
case 5:
|
|
25
25
|
case 10:
|
|
26
|
-
|
|
26
|
+
d[p - 1].push(d[p]), this.$ = d[p - 1];
|
|
27
27
|
break;
|
|
28
28
|
case 6:
|
|
29
29
|
case 7:
|
|
30
30
|
case 11:
|
|
31
31
|
case 12:
|
|
32
|
-
this.$ =
|
|
32
|
+
this.$ = d[p];
|
|
33
33
|
break;
|
|
34
34
|
case 8:
|
|
35
35
|
case 13:
|
|
36
36
|
this.$ = [];
|
|
37
37
|
break;
|
|
38
38
|
case 15:
|
|
39
|
-
|
|
39
|
+
d[p].type = "createParticipant", this.$ = d[p];
|
|
40
40
|
break;
|
|
41
41
|
case 16:
|
|
42
|
-
|
|
42
|
+
d[p - 1].unshift({ type: "boxStart", boxData: f.parseBoxData(d[p - 2]) }), d[p - 1].push({ type: "boxEnd", boxText: d[p - 2] }), this.$ = d[p - 1];
|
|
43
43
|
break;
|
|
44
44
|
case 18:
|
|
45
|
-
this.$ = { type: "sequenceIndex", sequenceIndex: Number(
|
|
45
|
+
this.$ = { type: "sequenceIndex", sequenceIndex: Number(d[p - 2]), sequenceIndexStep: Number(d[p - 1]), sequenceVisible: !0, signalType: f.LINETYPE.AUTONUMBER };
|
|
46
46
|
break;
|
|
47
47
|
case 19:
|
|
48
|
-
this.$ = { type: "sequenceIndex", sequenceIndex: Number(
|
|
48
|
+
this.$ = { type: "sequenceIndex", sequenceIndex: Number(d[p - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: f.LINETYPE.AUTONUMBER };
|
|
49
49
|
break;
|
|
50
50
|
case 20:
|
|
51
|
-
this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType:
|
|
51
|
+
this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: f.LINETYPE.AUTONUMBER };
|
|
52
52
|
break;
|
|
53
53
|
case 21:
|
|
54
|
-
this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType:
|
|
54
|
+
this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: f.LINETYPE.AUTONUMBER };
|
|
55
55
|
break;
|
|
56
56
|
case 22:
|
|
57
|
-
this.$ = { type: "activeStart", signalType:
|
|
57
|
+
this.$ = { type: "activeStart", signalType: f.LINETYPE.ACTIVE_START, actor: d[p - 1] };
|
|
58
58
|
break;
|
|
59
59
|
case 23:
|
|
60
|
-
this.$ = { type: "activeEnd", signalType:
|
|
60
|
+
this.$ = { type: "activeEnd", signalType: f.LINETYPE.ACTIVE_END, actor: d[p - 1] };
|
|
61
61
|
break;
|
|
62
62
|
case 29:
|
|
63
|
-
|
|
63
|
+
f.setDiagramTitle(d[p].substring(6)), this.$ = d[p].substring(6);
|
|
64
64
|
break;
|
|
65
65
|
case 30:
|
|
66
|
-
|
|
66
|
+
f.setDiagramTitle(d[p].substring(7)), this.$ = d[p].substring(7);
|
|
67
67
|
break;
|
|
68
68
|
case 31:
|
|
69
|
-
this.$ =
|
|
69
|
+
this.$ = d[p].trim(), f.setAccTitle(this.$);
|
|
70
70
|
break;
|
|
71
71
|
case 32:
|
|
72
72
|
case 33:
|
|
73
|
-
this.$ =
|
|
73
|
+
this.$ = d[p].trim(), f.setAccDescription(this.$);
|
|
74
74
|
break;
|
|
75
75
|
case 34:
|
|
76
|
-
|
|
76
|
+
d[p - 1].unshift({ type: "loopStart", loopText: f.parseMessage(d[p - 2]), signalType: f.LINETYPE.LOOP_START }), d[p - 1].push({ type: "loopEnd", loopText: d[p - 2], signalType: f.LINETYPE.LOOP_END }), this.$ = d[p - 1];
|
|
77
77
|
break;
|
|
78
78
|
case 35:
|
|
79
|
-
|
|
79
|
+
d[p - 1].unshift({ type: "rectStart", color: f.parseMessage(d[p - 2]), signalType: f.LINETYPE.RECT_START }), d[p - 1].push({ type: "rectEnd", color: f.parseMessage(d[p - 2]), signalType: f.LINETYPE.RECT_END }), this.$ = d[p - 1];
|
|
80
80
|
break;
|
|
81
81
|
case 36:
|
|
82
|
-
|
|
82
|
+
d[p - 1].unshift({ type: "optStart", optText: f.parseMessage(d[p - 2]), signalType: f.LINETYPE.OPT_START }), d[p - 1].push({ type: "optEnd", optText: f.parseMessage(d[p - 2]), signalType: f.LINETYPE.OPT_END }), this.$ = d[p - 1];
|
|
83
83
|
break;
|
|
84
84
|
case 37:
|
|
85
|
-
|
|
85
|
+
d[p - 1].unshift({ type: "altStart", altText: f.parseMessage(d[p - 2]), signalType: f.LINETYPE.ALT_START }), d[p - 1].push({ type: "altEnd", signalType: f.LINETYPE.ALT_END }), this.$ = d[p - 1];
|
|
86
86
|
break;
|
|
87
87
|
case 38:
|
|
88
|
-
|
|
88
|
+
d[p - 1].unshift({ type: "parStart", parText: f.parseMessage(d[p - 2]), signalType: f.LINETYPE.PAR_START }), d[p - 1].push({ type: "parEnd", signalType: f.LINETYPE.PAR_END }), this.$ = d[p - 1];
|
|
89
89
|
break;
|
|
90
90
|
case 39:
|
|
91
|
-
|
|
91
|
+
d[p - 1].unshift({ type: "parStart", parText: f.parseMessage(d[p - 2]), signalType: f.LINETYPE.PAR_OVER_START }), d[p - 1].push({ type: "parEnd", signalType: f.LINETYPE.PAR_END }), this.$ = d[p - 1];
|
|
92
92
|
break;
|
|
93
93
|
case 40:
|
|
94
|
-
|
|
94
|
+
d[p - 1].unshift({ type: "criticalStart", criticalText: f.parseMessage(d[p - 2]), signalType: f.LINETYPE.CRITICAL_START }), d[p - 1].push({ type: "criticalEnd", signalType: f.LINETYPE.CRITICAL_END }), this.$ = d[p - 1];
|
|
95
95
|
break;
|
|
96
96
|
case 41:
|
|
97
|
-
|
|
97
|
+
d[p - 1].unshift({ type: "breakStart", breakText: f.parseMessage(d[p - 2]), signalType: f.LINETYPE.BREAK_START }), d[p - 1].push({ type: "breakEnd", optText: f.parseMessage(d[p - 2]), signalType: f.LINETYPE.BREAK_END }), this.$ = d[p - 1];
|
|
98
98
|
break;
|
|
99
99
|
case 43:
|
|
100
|
-
this.$ =
|
|
100
|
+
this.$ = d[p - 3].concat([{ type: "option", optionText: f.parseMessage(d[p - 1]), signalType: f.LINETYPE.CRITICAL_OPTION }, d[p]]);
|
|
101
101
|
break;
|
|
102
102
|
case 45:
|
|
103
|
-
this.$ =
|
|
103
|
+
this.$ = d[p - 3].concat([{ type: "and", parText: f.parseMessage(d[p - 1]), signalType: f.LINETYPE.PAR_AND }, d[p]]);
|
|
104
104
|
break;
|
|
105
105
|
case 47:
|
|
106
|
-
this.$ =
|
|
106
|
+
this.$ = d[p - 3].concat([{ type: "else", altText: f.parseMessage(d[p - 1]), signalType: f.LINETYPE.ALT_ELSE }, d[p]]);
|
|
107
107
|
break;
|
|
108
108
|
case 48:
|
|
109
|
-
|
|
109
|
+
d[p - 3].draw = "participant", d[p - 3].type = "addParticipant", d[p - 3].description = f.parseMessage(d[p - 1]), this.$ = d[p - 3];
|
|
110
110
|
break;
|
|
111
111
|
case 49:
|
|
112
|
-
|
|
112
|
+
d[p - 1].draw = "participant", d[p - 1].type = "addParticipant", this.$ = d[p - 1];
|
|
113
113
|
break;
|
|
114
114
|
case 50:
|
|
115
|
-
|
|
115
|
+
d[p - 3].draw = "actor", d[p - 3].type = "addParticipant", d[p - 3].description = f.parseMessage(d[p - 1]), this.$ = d[p - 3];
|
|
116
116
|
break;
|
|
117
117
|
case 51:
|
|
118
|
-
|
|
118
|
+
d[p - 1].draw = "actor", d[p - 1].type = "addParticipant", this.$ = d[p - 1];
|
|
119
119
|
break;
|
|
120
120
|
case 52:
|
|
121
|
-
|
|
121
|
+
d[p - 1].type = "destroyParticipant", this.$ = d[p - 1];
|
|
122
122
|
break;
|
|
123
123
|
case 53:
|
|
124
|
-
this.$ = [
|
|
124
|
+
this.$ = [d[p - 1], { type: "addNote", placement: d[p - 2], actor: d[p - 1].actor, text: d[p] }];
|
|
125
125
|
break;
|
|
126
126
|
case 54:
|
|
127
|
-
|
|
127
|
+
d[p - 2] = [].concat(d[p - 1], d[p - 1]).slice(0, 2), d[p - 2][0] = d[p - 2][0].actor, d[p - 2][1] = d[p - 2][1].actor, this.$ = [d[p - 1], { type: "addNote", placement: f.PLACEMENT.OVER, actor: d[p - 2].slice(0, 2), text: d[p] }];
|
|
128
128
|
break;
|
|
129
129
|
case 55:
|
|
130
|
-
this.$ = [
|
|
130
|
+
this.$ = [d[p - 1], { type: "addLinks", actor: d[p - 1].actor, text: d[p] }];
|
|
131
131
|
break;
|
|
132
132
|
case 56:
|
|
133
|
-
this.$ = [
|
|
133
|
+
this.$ = [d[p - 1], { type: "addALink", actor: d[p - 1].actor, text: d[p] }];
|
|
134
134
|
break;
|
|
135
135
|
case 57:
|
|
136
|
-
this.$ = [
|
|
136
|
+
this.$ = [d[p - 1], { type: "addProperties", actor: d[p - 1].actor, text: d[p] }];
|
|
137
137
|
break;
|
|
138
138
|
case 58:
|
|
139
|
-
this.$ = [
|
|
139
|
+
this.$ = [d[p - 1], { type: "addDetails", actor: d[p - 1].actor, text: d[p] }];
|
|
140
140
|
break;
|
|
141
141
|
case 61:
|
|
142
|
-
this.$ = [
|
|
142
|
+
this.$ = [d[p - 2], d[p]];
|
|
143
143
|
break;
|
|
144
144
|
case 62:
|
|
145
|
-
this.$ =
|
|
145
|
+
this.$ = d[p];
|
|
146
146
|
break;
|
|
147
147
|
case 63:
|
|
148
|
-
this.$ =
|
|
148
|
+
this.$ = f.PLACEMENT.LEFTOF;
|
|
149
149
|
break;
|
|
150
150
|
case 64:
|
|
151
|
-
this.$ =
|
|
151
|
+
this.$ = f.PLACEMENT.RIGHTOF;
|
|
152
152
|
break;
|
|
153
153
|
case 65:
|
|
154
154
|
this.$ = [
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
{ type: "addMessage", from:
|
|
158
|
-
{ type: "activeStart", signalType:
|
|
155
|
+
d[p - 4],
|
|
156
|
+
d[p - 1],
|
|
157
|
+
{ type: "addMessage", from: d[p - 4].actor, to: d[p - 1].actor, signalType: d[p - 3], msg: d[p], activate: !0 },
|
|
158
|
+
{ type: "activeStart", signalType: f.LINETYPE.ACTIVE_START, actor: d[p - 1] }
|
|
159
159
|
];
|
|
160
160
|
break;
|
|
161
161
|
case 66:
|
|
162
162
|
this.$ = [
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
{ type: "addMessage", from:
|
|
166
|
-
{ type: "activeEnd", signalType:
|
|
163
|
+
d[p - 4],
|
|
164
|
+
d[p - 1],
|
|
165
|
+
{ type: "addMessage", from: d[p - 4].actor, to: d[p - 1].actor, signalType: d[p - 3], msg: d[p] },
|
|
166
|
+
{ type: "activeEnd", signalType: f.LINETYPE.ACTIVE_END, actor: d[p - 4] }
|
|
167
167
|
];
|
|
168
168
|
break;
|
|
169
169
|
case 67:
|
|
170
|
-
this.$ = [
|
|
170
|
+
this.$ = [d[p - 3], d[p - 1], { type: "addMessage", from: d[p - 3].actor, to: d[p - 1].actor, signalType: d[p - 2], msg: d[p] }];
|
|
171
171
|
break;
|
|
172
172
|
case 68:
|
|
173
|
-
this.$ = { type: "addParticipant", actor:
|
|
173
|
+
this.$ = { type: "addParticipant", actor: d[p] };
|
|
174
174
|
break;
|
|
175
175
|
case 69:
|
|
176
|
-
this.$ =
|
|
176
|
+
this.$ = f.LINETYPE.SOLID_OPEN;
|
|
177
177
|
break;
|
|
178
178
|
case 70:
|
|
179
|
-
this.$ =
|
|
179
|
+
this.$ = f.LINETYPE.DOTTED_OPEN;
|
|
180
180
|
break;
|
|
181
181
|
case 71:
|
|
182
|
-
this.$ =
|
|
182
|
+
this.$ = f.LINETYPE.SOLID;
|
|
183
183
|
break;
|
|
184
184
|
case 72:
|
|
185
|
-
this.$ =
|
|
185
|
+
this.$ = f.LINETYPE.DOTTED;
|
|
186
186
|
break;
|
|
187
187
|
case 73:
|
|
188
|
-
this.$ =
|
|
188
|
+
this.$ = f.LINETYPE.SOLID_CROSS;
|
|
189
189
|
break;
|
|
190
190
|
case 74:
|
|
191
|
-
this.$ =
|
|
191
|
+
this.$ = f.LINETYPE.DOTTED_CROSS;
|
|
192
192
|
break;
|
|
193
193
|
case 75:
|
|
194
|
-
this.$ =
|
|
194
|
+
this.$ = f.LINETYPE.SOLID_POINT;
|
|
195
195
|
break;
|
|
196
196
|
case 76:
|
|
197
|
-
this.$ =
|
|
197
|
+
this.$ = f.LINETYPE.DOTTED_POINT;
|
|
198
198
|
break;
|
|
199
199
|
case 77:
|
|
200
|
-
this.$ =
|
|
200
|
+
this.$ = f.parseMessage(d[p].trim().substring(1));
|
|
201
201
|
break;
|
|
202
202
|
}
|
|
203
203
|
},
|
|
204
|
-
table: [{ 3: 1, 4: e, 5: c, 6: a }, { 1: [3] }, { 3: 5, 4: e, 5: c, 6: a }, { 3: 6, 4: e, 5: c, 6: a }, 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], s, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13:
|
|
204
|
+
table: [{ 3: 1, 4: e, 5: c, 6: a }, { 1: [3] }, { 3: 5, 4: e, 5: c, 6: a }, { 3: 6, 4: e, 5: c, 6: a }, 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], s, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: n, 14: h, 17: 15, 18: r, 21: u, 22: 40, 23: b, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: y, 31: w, 33: _, 35: L, 36: R, 37: N, 38: $, 39: S, 41: F, 43: W, 44: X, 46: G, 50: q, 52: z, 53: B, 54: V, 59: J, 60: H, 61: Q, 62: tt, 70: M }, t(m, [2, 5]), { 9: 47, 12: 12, 13: n, 14: h, 17: 15, 18: r, 21: u, 22: 40, 23: b, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: y, 31: w, 33: _, 35: L, 36: R, 37: N, 38: $, 39: S, 41: F, 43: W, 44: X, 46: G, 50: q, 52: z, 53: B, 54: V, 59: J, 60: H, 61: Q, 62: tt, 70: M }, t(m, [2, 7]), t(m, [2, 8]), t(m, [2, 14]), { 12: 48, 50: q, 52: z, 53: B }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: M }, { 22: 55, 70: M }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, t(m, [2, 29]), t(m, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, t(m, [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: M }, { 22: 72, 70: M }, { 22: 73, 70: M }, { 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: M }, { 22: 88, 70: M }, { 22: 89, 70: M }, { 22: 90, 70: M }, t([5, 51, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79], [2, 68]), t(m, [2, 6]), t(m, [2, 15]), t(P, [2, 9], { 10: 91 }), t(m, [2, 17]), { 5: [1, 93], 19: [1, 92] }, { 5: [1, 94] }, t(m, [2, 21]), { 5: [1, 95] }, { 5: [1, 96] }, t(m, [2, 24]), t(m, [2, 25]), t(m, [2, 26]), t(m, [2, 27]), t(m, [2, 28]), t(m, [2, 31]), t(m, [2, 32]), t(Z, s, { 7: 97 }), t(Z, s, { 7: 98 }), t(Z, s, { 7: 99 }), t(rt, s, { 40: 100, 7: 101 }), t(I, s, { 42: 102, 7: 103 }), t(I, s, { 7: 103, 42: 104 }), t(Ut, s, { 45: 105, 7: 106 }), t(Z, s, { 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: M }, t(pt, [2, 69]), t(pt, [2, 70]), t(pt, [2, 71]), t(pt, [2, 72]), t(pt, [2, 73]), t(pt, [2, 74]), t(pt, [2, 75]), t(pt, [2, 76]), { 22: 116, 70: M }, { 22: 118, 58: 117, 70: M }, { 70: [2, 63] }, { 70: [2, 64] }, { 56: 119, 79: ct }, { 56: 121, 79: ct }, { 56: 122, 79: ct }, { 56: 123, 79: ct }, { 4: [1, 126], 5: [1, 128], 11: 125, 12: 127, 16: [1, 124], 50: q, 52: z, 53: B }, { 5: [1, 129] }, t(m, [2, 19]), t(m, [2, 20]), t(m, [2, 22]), t(m, [2, 23]), { 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: n, 14: h, 16: [1, 130], 17: 15, 18: r, 21: u, 22: 40, 23: b, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: y, 31: w, 33: _, 35: L, 36: R, 37: N, 38: $, 39: S, 41: F, 43: W, 44: X, 46: G, 50: q, 52: z, 53: B, 54: V, 59: J, 60: H, 61: Q, 62: tt, 70: M }, { 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: n, 14: h, 16: [1, 131], 17: 15, 18: r, 21: u, 22: 40, 23: b, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: y, 31: w, 33: _, 35: L, 36: R, 37: N, 38: $, 39: S, 41: F, 43: W, 44: X, 46: G, 50: q, 52: z, 53: B, 54: V, 59: J, 60: H, 61: Q, 62: tt, 70: M }, { 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: n, 14: h, 16: [1, 132], 17: 15, 18: r, 21: u, 22: 40, 23: b, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: y, 31: w, 33: _, 35: L, 36: R, 37: N, 38: $, 39: S, 41: F, 43: W, 44: X, 46: G, 50: q, 52: z, 53: B, 54: V, 59: J, 60: H, 61: Q, 62: tt, 70: M }, { 16: [1, 133] }, { 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: n, 14: h, 16: [2, 46], 17: 15, 18: r, 21: u, 22: 40, 23: b, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: y, 31: w, 33: _, 35: L, 36: R, 37: N, 38: $, 39: S, 41: F, 43: W, 44: X, 46: G, 49: [1, 134], 50: q, 52: z, 53: B, 54: V, 59: J, 60: H, 61: Q, 62: tt, 70: M }, { 16: [1, 135] }, { 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: n, 14: h, 16: [2, 44], 17: 15, 18: r, 21: u, 22: 40, 23: b, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: y, 31: w, 33: _, 35: L, 36: R, 37: N, 38: $, 39: S, 41: F, 43: W, 44: X, 46: G, 48: [1, 136], 50: q, 52: z, 53: B, 54: V, 59: J, 60: H, 61: Q, 62: tt, 70: M }, { 16: [1, 137] }, { 16: [1, 138] }, { 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: n, 14: h, 16: [2, 42], 17: 15, 18: r, 21: u, 22: 40, 23: b, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: y, 31: w, 33: _, 35: L, 36: R, 37: N, 38: $, 39: S, 41: F, 43: W, 44: X, 46: G, 47: [1, 139], 50: q, 52: z, 53: B, 54: V, 59: J, 60: H, 61: Q, 62: tt, 70: M }, { 4: i, 5: l, 8: 8, 9: 10, 12: 12, 13: n, 14: h, 16: [1, 140], 17: 15, 18: r, 21: u, 22: 40, 23: b, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: y, 31: w, 33: _, 35: L, 36: R, 37: N, 38: $, 39: S, 41: F, 43: W, 44: X, 46: G, 50: q, 52: z, 53: B, 54: V, 59: J, 60: H, 61: Q, 62: tt, 70: M }, { 15: [1, 141] }, t(m, [2, 49]), { 15: [1, 142] }, t(m, [2, 51]), t(m, [2, 52]), { 22: 143, 70: M }, { 22: 144, 70: M }, { 56: 145, 79: ct }, { 56: 146, 79: ct }, { 56: 147, 79: ct }, { 64: [1, 148], 79: [2, 62] }, { 5: [2, 55] }, { 5: [2, 77] }, { 5: [2, 56] }, { 5: [2, 57] }, { 5: [2, 58] }, t(m, [2, 16]), t(P, [2, 10]), { 12: 149, 50: q, 52: z, 53: B }, t(P, [2, 12]), t(P, [2, 13]), t(m, [2, 18]), t(m, [2, 34]), t(m, [2, 35]), t(m, [2, 36]), t(m, [2, 37]), { 15: [1, 150] }, t(m, [2, 38]), { 15: [1, 151] }, t(m, [2, 39]), t(m, [2, 40]), { 15: [1, 152] }, t(m, [2, 41]), { 5: [1, 153] }, { 5: [1, 154] }, { 56: 155, 79: ct }, { 56: 156, 79: ct }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 157, 70: M }, t(P, [2, 11]), t(rt, s, { 7: 101, 40: 158 }), t(I, s, { 7: 103, 42: 159 }), t(Ut, s, { 7: 106, 45: 160 }), t(m, [2, 48]), t(m, [2, 50]), { 5: [2, 65] }, { 5: [2, 66] }, { 79: [2, 61] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }],
|
|
205
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] },
|
|
206
|
-
parseError: function(
|
|
207
|
-
if (
|
|
208
|
-
this.trace(
|
|
206
|
+
parseError: function(it, T) {
|
|
207
|
+
if (T.recoverable)
|
|
208
|
+
this.trace(it);
|
|
209
209
|
else {
|
|
210
|
-
var k = new Error(
|
|
211
|
-
throw k.hash =
|
|
210
|
+
var k = new Error(it);
|
|
211
|
+
throw k.hash = T, k;
|
|
212
212
|
}
|
|
213
213
|
},
|
|
214
|
-
parse: function(
|
|
215
|
-
var
|
|
216
|
-
for (var
|
|
217
|
-
Object.prototype.hasOwnProperty.call(this.yy,
|
|
218
|
-
Y.setInput(
|
|
219
|
-
var
|
|
220
|
-
|
|
221
|
-
var
|
|
214
|
+
parse: function(it) {
|
|
215
|
+
var T = this, k = [0], f = [], A = [null], d = [], U = this.table, p = "", vt = 0, jt = 0, me = 2, Kt = 1, fe = d.slice.call(arguments, 1), Y = Object.create(this.lexer), ht = { yy: {} };
|
|
216
|
+
for (var Ot in this.yy)
|
|
217
|
+
Object.prototype.hasOwnProperty.call(this.yy, Ot) && (ht.yy[Ot] = this.yy[Ot]);
|
|
218
|
+
Y.setInput(it, ht.yy), ht.yy.lexer = Y, ht.yy.parser = this, typeof Y.yylloc > "u" && (Y.yylloc = {});
|
|
219
|
+
var Dt = Y.yylloc;
|
|
220
|
+
d.push(Dt);
|
|
221
|
+
var be = Y.options && Y.options.ranges;
|
|
222
222
|
typeof ht.yy.parseError == "function" ? this.parseError = ht.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
223
|
-
function
|
|
224
|
-
var
|
|
225
|
-
return
|
|
223
|
+
function Te() {
|
|
224
|
+
var dt;
|
|
225
|
+
return dt = f.pop() || Y.lex() || Kt, typeof dt != "number" && (dt instanceof Array && (f = dt, dt = f.pop()), dt = T.symbols_[dt] || dt), dt;
|
|
226
226
|
}
|
|
227
|
-
for (var
|
|
228
|
-
if (
|
|
229
|
-
var
|
|
230
|
-
|
|
231
|
-
for (
|
|
232
|
-
this.terminals_[
|
|
233
|
-
Y.showPosition ?
|
|
227
|
+
for (var j, gt, et, Rt, mt = {}, _t, lt, Xt, kt; ; ) {
|
|
228
|
+
if (gt = k[k.length - 1], this.defaultActions[gt] ? et = this.defaultActions[gt] : ((j === null || typeof j > "u") && (j = Te()), et = U[gt] && U[gt][j]), typeof et > "u" || !et.length || !et[0]) {
|
|
229
|
+
var $t = "";
|
|
230
|
+
kt = [];
|
|
231
|
+
for (_t in U[gt])
|
|
232
|
+
this.terminals_[_t] && _t > me && kt.push("'" + this.terminals_[_t] + "'");
|
|
233
|
+
Y.showPosition ? $t = "Parse error on line " + (vt + 1) + `:
|
|
234
234
|
` + Y.showPosition() + `
|
|
235
|
-
Expecting ` +
|
|
235
|
+
Expecting ` + kt.join(", ") + ", got '" + (this.terminals_[j] || j) + "'" : $t = "Parse error on line " + (vt + 1) + ": Unexpected " + (j == Kt ? "end of input" : "'" + (this.terminals_[j] || j) + "'"), this.parseError($t, {
|
|
236
236
|
text: Y.match,
|
|
237
|
-
token: this.terminals_[
|
|
237
|
+
token: this.terminals_[j] || j,
|
|
238
238
|
line: Y.yylineno,
|
|
239
|
-
loc:
|
|
240
|
-
expected:
|
|
239
|
+
loc: Dt,
|
|
240
|
+
expected: kt
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
if (
|
|
244
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
245
|
-
switch (
|
|
243
|
+
if (et[0] instanceof Array && et.length > 1)
|
|
244
|
+
throw new Error("Parse Error: multiple actions possible at state: " + gt + ", token: " + j);
|
|
245
|
+
switch (et[0]) {
|
|
246
246
|
case 1:
|
|
247
|
-
k.push(
|
|
247
|
+
k.push(j), A.push(Y.yytext), d.push(Y.yylloc), k.push(et[1]), j = null, jt = Y.yyleng, p = Y.yytext, vt = Y.yylineno, Dt = Y.yylloc;
|
|
248
248
|
break;
|
|
249
249
|
case 2:
|
|
250
|
-
if (
|
|
251
|
-
first_line:
|
|
252
|
-
last_line:
|
|
253
|
-
first_column:
|
|
254
|
-
last_column:
|
|
255
|
-
},
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
]),
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
250
|
+
if (lt = this.productions_[et[1]][1], mt.$ = A[A.length - lt], mt._$ = {
|
|
251
|
+
first_line: d[d.length - (lt || 1)].first_line,
|
|
252
|
+
last_line: d[d.length - 1].last_line,
|
|
253
|
+
first_column: d[d.length - (lt || 1)].first_column,
|
|
254
|
+
last_column: d[d.length - 1].last_column
|
|
255
|
+
}, be && (mt._$.range = [
|
|
256
|
+
d[d.length - (lt || 1)].range[0],
|
|
257
|
+
d[d.length - 1].range[1]
|
|
258
|
+
]), Rt = this.performAction.apply(mt, [
|
|
259
|
+
p,
|
|
260
|
+
jt,
|
|
261
|
+
vt,
|
|
262
262
|
ht.yy,
|
|
263
|
-
|
|
263
|
+
et[1],
|
|
264
264
|
A,
|
|
265
|
-
|
|
266
|
-
].concat(
|
|
267
|
-
return
|
|
268
|
-
|
|
265
|
+
d
|
|
266
|
+
].concat(fe)), typeof Rt < "u")
|
|
267
|
+
return Rt;
|
|
268
|
+
lt && (k = k.slice(0, -1 * lt * 2), A = A.slice(0, -1 * lt), d = d.slice(0, -1 * lt)), k.push(this.productions_[et[1]][0]), A.push(mt.$), d.push(mt._$), Xt = U[k[k.length - 2]][k[k.length - 1]], k.push(Xt);
|
|
269
269
|
break;
|
|
270
270
|
case 3:
|
|
271
271
|
return !0;
|
|
@@ -273,18 +273,18 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : Ot =
|
|
|
273
273
|
}
|
|
274
274
|
return !0;
|
|
275
275
|
}
|
|
276
|
-
},
|
|
277
|
-
var
|
|
276
|
+
}, ye = /* @__PURE__ */ function() {
|
|
277
|
+
var it = {
|
|
278
278
|
EOF: 1,
|
|
279
|
-
parseError: function(
|
|
279
|
+
parseError: function(T, k) {
|
|
280
280
|
if (this.yy.parser)
|
|
281
|
-
this.yy.parser.parseError(
|
|
281
|
+
this.yy.parser.parseError(T, k);
|
|
282
282
|
else
|
|
283
|
-
throw new Error(
|
|
283
|
+
throw new Error(T);
|
|
284
284
|
},
|
|
285
285
|
// resets the lexer, sets new input
|
|
286
|
-
setInput: function(
|
|
287
|
-
return this.yy = k || this.yy || {}, this._input =
|
|
286
|
+
setInput: function(T, k) {
|
|
287
|
+
return this.yy = k || this.yy || {}, this._input = T, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
288
288
|
first_line: 1,
|
|
289
289
|
first_column: 0,
|
|
290
290
|
last_line: 1,
|
|
@@ -293,24 +293,24 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : Ot =
|
|
|
293
293
|
},
|
|
294
294
|
// consumes and returns one char from the input
|
|
295
295
|
input: function() {
|
|
296
|
-
var
|
|
297
|
-
this.yytext +=
|
|
298
|
-
var k =
|
|
299
|
-
return k ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1),
|
|
296
|
+
var T = this._input[0];
|
|
297
|
+
this.yytext += T, this.yyleng++, this.offset++, this.match += T, this.matched += T;
|
|
298
|
+
var k = T.match(/(?:\r\n?|\n).*/g);
|
|
299
|
+
return k ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), T;
|
|
300
300
|
},
|
|
301
301
|
// unshifts one char (or a string) into the input
|
|
302
|
-
unput: function(
|
|
303
|
-
var k =
|
|
304
|
-
this._input =
|
|
302
|
+
unput: function(T) {
|
|
303
|
+
var k = T.length, f = T.split(/(?:\r\n?|\n)/g);
|
|
304
|
+
this._input = T + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - k), this.offset -= k;
|
|
305
305
|
var A = this.match.split(/(?:\r\n?|\n)/g);
|
|
306
|
-
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1),
|
|
307
|
-
var
|
|
306
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), f.length - 1 && (this.yylineno -= f.length - 1);
|
|
307
|
+
var d = this.yylloc.range;
|
|
308
308
|
return this.yylloc = {
|
|
309
309
|
first_line: this.yylloc.first_line,
|
|
310
310
|
last_line: this.yylineno + 1,
|
|
311
311
|
first_column: this.yylloc.first_column,
|
|
312
|
-
last_column:
|
|
313
|
-
}, this.options.ranges && (this.yylloc.range = [
|
|
312
|
+
last_column: f ? (f.length === A.length ? this.yylloc.first_column : 0) + A[A.length - f.length].length - f[0].length : this.yylloc.first_column - k
|
|
313
|
+
}, this.options.ranges && (this.yylloc.range = [d[0], d[0] + this.yyleng - k]), this.yyleng = this.yytext.length, this;
|
|
314
314
|
},
|
|
315
315
|
// When called from action, caches matched text and appends it on next action
|
|
316
316
|
more: function() {
|
|
@@ -330,29 +330,29 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : Ot =
|
|
|
330
330
|
return this;
|
|
331
331
|
},
|
|
332
332
|
// retain first n characters of the match
|
|
333
|
-
less: function(
|
|
334
|
-
this.unput(this.match.slice(
|
|
333
|
+
less: function(T) {
|
|
334
|
+
this.unput(this.match.slice(T));
|
|
335
335
|
},
|
|
336
336
|
// displays already matched input, i.e. for error messages
|
|
337
337
|
pastInput: function() {
|
|
338
|
-
var
|
|
339
|
-
return (
|
|
338
|
+
var T = this.matched.substr(0, this.matched.length - this.match.length);
|
|
339
|
+
return (T.length > 20 ? "..." : "") + T.substr(-20).replace(/\n/g, "");
|
|
340
340
|
},
|
|
341
341
|
// displays upcoming input, i.e. for error messages
|
|
342
342
|
upcomingInput: function() {
|
|
343
|
-
var
|
|
344
|
-
return
|
|
343
|
+
var T = this.match;
|
|
344
|
+
return T.length < 20 && (T += this._input.substr(0, 20 - T.length)), (T.substr(0, 20) + (T.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
345
345
|
},
|
|
346
346
|
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
347
347
|
showPosition: function() {
|
|
348
|
-
var
|
|
349
|
-
return
|
|
348
|
+
var T = this.pastInput(), k = new Array(T.length + 1).join("-");
|
|
349
|
+
return T + this.upcomingInput() + `
|
|
350
350
|
` + k + "^";
|
|
351
351
|
},
|
|
352
352
|
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
353
|
-
test_match: function(
|
|
354
|
-
var
|
|
355
|
-
if (this.options.backtrack_lexer && (
|
|
353
|
+
test_match: function(T, k) {
|
|
354
|
+
var f, A, d;
|
|
355
|
+
if (this.options.backtrack_lexer && (d = {
|
|
356
356
|
yylineno: this.yylineno,
|
|
357
357
|
yylloc: {
|
|
358
358
|
first_line: this.yylloc.first_line,
|
|
@@ -371,16 +371,16 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : Ot =
|
|
|
371
371
|
yy: this.yy,
|
|
372
372
|
conditionStack: this.conditionStack.slice(0),
|
|
373
373
|
done: this.done
|
|
374
|
-
}, this.options.ranges && (
|
|
374
|
+
}, this.options.ranges && (d.yylloc.range = this.yylloc.range.slice(0))), A = T[0].match(/(?:\r\n?|\n).*/g), A && (this.yylineno += A.length), this.yylloc = {
|
|
375
375
|
first_line: this.yylloc.last_line,
|
|
376
376
|
last_line: this.yylineno + 1,
|
|
377
377
|
first_column: this.yylloc.last_column,
|
|
378
|
-
last_column: A ? A[A.length - 1].length - A[A.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column +
|
|
379
|
-
}, this.yytext +=
|
|
380
|
-
return
|
|
378
|
+
last_column: A ? A[A.length - 1].length - A[A.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + T[0].length
|
|
379
|
+
}, this.yytext += T[0], this.match += T[0], this.matches = T, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(T[0].length), this.matched += T[0], f = this.performAction.call(this, this.yy, this, k, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), f)
|
|
380
|
+
return f;
|
|
381
381
|
if (this._backtrack) {
|
|
382
|
-
for (var
|
|
383
|
-
this[
|
|
382
|
+
for (var U in d)
|
|
383
|
+
this[U] = d[U];
|
|
384
384
|
return !1;
|
|
385
385
|
}
|
|
386
386
|
return !1;
|
|
@@ -390,13 +390,13 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : Ot =
|
|
|
390
390
|
if (this.done)
|
|
391
391
|
return this.EOF;
|
|
392
392
|
this._input || (this.done = !0);
|
|
393
|
-
var
|
|
393
|
+
var T, k, f, A;
|
|
394
394
|
this._more || (this.yytext = "", this.match = "");
|
|
395
|
-
for (var
|
|
396
|
-
if (
|
|
397
|
-
if (k =
|
|
398
|
-
if (
|
|
399
|
-
return
|
|
395
|
+
for (var d = this._currentRules(), U = 0; U < d.length; U++)
|
|
396
|
+
if (f = this._input.match(this.rules[d[U]]), f && (!k || f[0].length > k[0].length)) {
|
|
397
|
+
if (k = f, A = U, this.options.backtrack_lexer) {
|
|
398
|
+
if (T = this.test_match(f, d[U]), T !== !1)
|
|
399
|
+
return T;
|
|
400
400
|
if (this._backtrack) {
|
|
401
401
|
k = !1;
|
|
402
402
|
continue;
|
|
@@ -405,7 +405,7 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : Ot =
|
|
|
405
405
|
} else if (!this.options.flex)
|
|
406
406
|
break;
|
|
407
407
|
}
|
|
408
|
-
return k ? (
|
|
408
|
+
return k ? (T = this.test_match(k, d[A]), T !== !1 ? T : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
409
409
|
` + this.showPosition(), {
|
|
410
410
|
text: "",
|
|
411
411
|
token: null,
|
|
@@ -414,37 +414,37 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : Ot =
|
|
|
414
414
|
},
|
|
415
415
|
// return next match that has a token
|
|
416
416
|
lex: function() {
|
|
417
|
-
var
|
|
418
|
-
return
|
|
417
|
+
var T = this.next();
|
|
418
|
+
return T || this.lex();
|
|
419
419
|
},
|
|
420
420
|
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
421
|
-
begin: function(
|
|
422
|
-
this.conditionStack.push(
|
|
421
|
+
begin: function(T) {
|
|
422
|
+
this.conditionStack.push(T);
|
|
423
423
|
},
|
|
424
424
|
// pop the previously active lexer condition state off the condition stack
|
|
425
425
|
popState: function() {
|
|
426
|
-
var
|
|
427
|
-
return
|
|
426
|
+
var T = this.conditionStack.length - 1;
|
|
427
|
+
return T > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
428
428
|
},
|
|
429
429
|
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
430
430
|
_currentRules: function() {
|
|
431
431
|
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
432
432
|
},
|
|
433
433
|
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
434
|
-
topState: function(
|
|
435
|
-
return
|
|
434
|
+
topState: function(T) {
|
|
435
|
+
return T = this.conditionStack.length - 1 - Math.abs(T || 0), T >= 0 ? this.conditionStack[T] : "INITIAL";
|
|
436
436
|
},
|
|
437
437
|
// alias for begin(condition)
|
|
438
|
-
pushState: function(
|
|
439
|
-
this.begin(
|
|
438
|
+
pushState: function(T) {
|
|
439
|
+
this.begin(T);
|
|
440
440
|
},
|
|
441
441
|
// return the number of states currently on the stack
|
|
442
442
|
stateStackSize: function() {
|
|
443
443
|
return this.conditionStack.length;
|
|
444
444
|
},
|
|
445
445
|
options: { "case-insensitive": !0 },
|
|
446
|
-
performAction: function(
|
|
447
|
-
switch (
|
|
446
|
+
performAction: function(T, k, f, A) {
|
|
447
|
+
switch (f) {
|
|
448
448
|
case 0:
|
|
449
449
|
return 5;
|
|
450
450
|
case 1:
|
|
@@ -584,17 +584,17 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : Ot =
|
|
|
584
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],
|
|
585
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 } }
|
|
586
586
|
};
|
|
587
|
-
return
|
|
587
|
+
return it;
|
|
588
588
|
}();
|
|
589
|
-
|
|
590
|
-
function
|
|
589
|
+
At.lexer = ye;
|
|
590
|
+
function St() {
|
|
591
591
|
this.yy = {};
|
|
592
592
|
}
|
|
593
|
-
return
|
|
593
|
+
return St.prototype = At, At.Parser = St, new St();
|
|
594
594
|
}();
|
|
595
|
-
|
|
596
|
-
const
|
|
597
|
-
class
|
|
595
|
+
Yt.parser = Yt;
|
|
596
|
+
const De = Yt;
|
|
597
|
+
class Re {
|
|
598
598
|
/**
|
|
599
599
|
* @param init - Function that creates the default state.
|
|
600
600
|
*/
|
|
@@ -605,7 +605,7 @@ class Me {
|
|
|
605
605
|
this.records = this.init();
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
|
-
const
|
|
608
|
+
const E = new Re(() => ({
|
|
609
609
|
prevActor: void 0,
|
|
610
610
|
actors: {},
|
|
611
611
|
createdActors: {},
|
|
@@ -618,51 +618,51 @@ const T = new Me(() => ({
|
|
|
618
618
|
currentBox: void 0,
|
|
619
619
|
lastCreated: void 0,
|
|
620
620
|
lastDestroyed: void 0
|
|
621
|
-
})),
|
|
622
|
-
|
|
621
|
+
})), $e = function(t) {
|
|
622
|
+
E.records.boxes.push({
|
|
623
623
|
name: t.text,
|
|
624
|
-
wrap: t.wrap === void 0 &&
|
|
624
|
+
wrap: t.wrap === void 0 && xt() || !!t.wrap,
|
|
625
625
|
fill: t.color,
|
|
626
626
|
actorKeys: []
|
|
627
|
-
}),
|
|
628
|
-
},
|
|
629
|
-
let s =
|
|
630
|
-
const i =
|
|
627
|
+
}), E.records.currentBox = E.records.boxes.slice(-1)[0];
|
|
628
|
+
}, Bt = function(t, e, c, a) {
|
|
629
|
+
let s = E.records.currentBox;
|
|
630
|
+
const i = E.records.actors[t];
|
|
631
631
|
if (i) {
|
|
632
|
-
if (
|
|
632
|
+
if (E.records.currentBox && i.box && E.records.currentBox !== i.box)
|
|
633
633
|
throw new Error(
|
|
634
|
-
"A same participant should only be defined in one Box: " + i.name + " can't be in '" + i.box.name + "' and in '" +
|
|
634
|
+
"A same participant should only be defined in one Box: " + i.name + " can't be in '" + i.box.name + "' and in '" + E.records.currentBox.name + "' at the same time."
|
|
635
635
|
);
|
|
636
|
-
if (s = i.box ? i.box :
|
|
636
|
+
if (s = i.box ? i.box : E.records.currentBox, i.box = s, i && e === i.name && c == null)
|
|
637
637
|
return;
|
|
638
638
|
}
|
|
639
|
-
(c == null || c.text == null) && (c = { text: e, wrap: null, type: a }), (a == null || c.text == null) && (c = { text: e, wrap: null, type: a }),
|
|
639
|
+
(c == null || c.text == null) && (c = { text: e, wrap: null, type: a }), (a == null || c.text == null) && (c = { text: e, wrap: null, type: a }), E.records.actors[t] = {
|
|
640
640
|
box: s,
|
|
641
641
|
name: e,
|
|
642
642
|
description: c.text,
|
|
643
|
-
wrap: c.wrap === void 0 &&
|
|
644
|
-
prevActor:
|
|
643
|
+
wrap: c.wrap === void 0 && xt() || !!c.wrap,
|
|
644
|
+
prevActor: E.records.prevActor,
|
|
645
645
|
links: {},
|
|
646
646
|
properties: {},
|
|
647
647
|
actorCnt: null,
|
|
648
648
|
rectData: null,
|
|
649
649
|
type: a || "participant"
|
|
650
|
-
},
|
|
651
|
-
},
|
|
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;
|
|
651
|
+
}, Ce = (t) => {
|
|
652
652
|
let e, c = 0;
|
|
653
|
-
for (e = 0; e <
|
|
654
|
-
|
|
653
|
+
for (e = 0; e < E.records.messages.length; e++)
|
|
654
|
+
E.records.messages[e].type === Tt.ACTIVE_START && E.records.messages[e].from.actor === t && c++, E.records.messages[e].type === Tt.ACTIVE_END && E.records.messages[e].from.actor === t && c--;
|
|
655
655
|
return c;
|
|
656
|
-
},
|
|
657
|
-
|
|
656
|
+
}, Ye = function(t, e, c, a) {
|
|
657
|
+
E.records.messages.push({
|
|
658
658
|
from: t,
|
|
659
659
|
to: e,
|
|
660
660
|
message: c.text,
|
|
661
|
-
wrap: c.wrap === void 0 &&
|
|
661
|
+
wrap: c.wrap === void 0 && xt() || !!c.wrap,
|
|
662
662
|
answer: a
|
|
663
663
|
});
|
|
664
|
-
},
|
|
665
|
-
if (a ===
|
|
664
|
+
}, O = function(t, e, c = { text: void 0, wrap: void 0 }, a, s = !1) {
|
|
665
|
+
if (a === Tt.ACTIVE_END && Ce(t.actor) < 1) {
|
|
666
666
|
let i = new Error("Trying to inactivate an inactive participant (" + t.actor + ")");
|
|
667
667
|
throw i.hash = {
|
|
668
668
|
text: "->>-",
|
|
@@ -672,47 +672,47 @@ const T = new Me(() => ({
|
|
|
672
672
|
expected: ["'ACTIVE_PARTICIPANT'"]
|
|
673
673
|
}, i;
|
|
674
674
|
}
|
|
675
|
-
return
|
|
675
|
+
return E.records.messages.push({
|
|
676
676
|
from: t,
|
|
677
677
|
to: e,
|
|
678
678
|
message: c.text,
|
|
679
|
-
wrap: c.wrap === void 0 &&
|
|
679
|
+
wrap: c.wrap === void 0 && xt() || !!c.wrap,
|
|
680
680
|
type: a,
|
|
681
681
|
activate: s
|
|
682
682
|
}), !0;
|
|
683
|
-
}, De = function() {
|
|
684
|
-
return T.records.boxes.length > 0;
|
|
685
|
-
}, Re = function() {
|
|
686
|
-
return T.records.boxes.some((t) => t.name);
|
|
687
|
-
}, Ce = function() {
|
|
688
|
-
return T.records.messages;
|
|
689
|
-
}, $e = function() {
|
|
690
|
-
return T.records.boxes;
|
|
691
|
-
}, Ye = function() {
|
|
692
|
-
return T.records.actors;
|
|
693
683
|
}, Be = function() {
|
|
694
|
-
return
|
|
684
|
+
return E.records.boxes.length > 0;
|
|
695
685
|
}, Ve = function() {
|
|
696
|
-
return
|
|
697
|
-
}, Et = function(t) {
|
|
698
|
-
return T.records.actors[t];
|
|
686
|
+
return E.records.boxes.some((t) => t.name);
|
|
699
687
|
}, Fe = function() {
|
|
700
|
-
return
|
|
688
|
+
return E.records.messages;
|
|
701
689
|
}, We = function() {
|
|
702
|
-
|
|
690
|
+
return E.records.boxes;
|
|
703
691
|
}, qe = function() {
|
|
704
|
-
|
|
705
|
-
}, ze =
|
|
706
|
-
|
|
707
|
-
},
|
|
708
|
-
|
|
709
|
-
},
|
|
692
|
+
return E.records.actors;
|
|
693
|
+
}, ze = function() {
|
|
694
|
+
return E.records.createdActors;
|
|
695
|
+
}, He = function() {
|
|
696
|
+
return E.records.destroyedActors;
|
|
697
|
+
}, wt = function(t) {
|
|
698
|
+
return E.records.actors[t];
|
|
699
|
+
}, Ue = function() {
|
|
700
|
+
return Object.keys(E.records.actors);
|
|
701
|
+
}, je = function() {
|
|
702
|
+
E.records.sequenceNumbersEnabled = !0;
|
|
703
|
+
}, Ke = function() {
|
|
704
|
+
E.records.sequenceNumbersEnabled = !1;
|
|
705
|
+
}, Xe = () => E.records.sequenceNumbersEnabled, Je = function(t) {
|
|
706
|
+
E.records.wrapEnabled = t;
|
|
707
|
+
}, xt = () => E.records.wrapEnabled !== void 0 ? E.records.wrapEnabled : at().sequence.wrap, Qe = function() {
|
|
708
|
+
E.reset(), Pe();
|
|
709
|
+
}, Ze = function(t) {
|
|
710
710
|
const e = t.trim(), c = {
|
|
711
711
|
text: e.replace(/^:?(?:no)?wrap:/, "").trim(),
|
|
712
712
|
wrap: e.match(/^:?wrap:/) !== null ? !0 : e.match(/^:?nowrap:/) !== null ? !1 : void 0
|
|
713
713
|
};
|
|
714
|
-
return
|
|
715
|
-
},
|
|
714
|
+
return K.debug("parseMessage:", c), c;
|
|
715
|
+
}, Ge = function(t) {
|
|
716
716
|
const e = t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);
|
|
717
717
|
let c = e != null && e[1] ? e[1].trim() : "transparent", a = e != null && e[2] ? e[2].trim() : void 0;
|
|
718
718
|
if (window && window.CSS)
|
|
@@ -723,10 +723,10 @@ const T = new Me(() => ({
|
|
|
723
723
|
}
|
|
724
724
|
return {
|
|
725
725
|
color: c,
|
|
726
|
-
text: a !== void 0 ?
|
|
726
|
+
text: a !== void 0 ? It(a.replace(/^:?(?:no)?wrap:/, ""), at()) : void 0,
|
|
727
727
|
wrap: a !== void 0 ? a.match(/^:?wrap:/) !== null ? !0 : a.match(/^:?nowrap:/) !== null ? !1 : void 0 : void 0
|
|
728
728
|
};
|
|
729
|
-
},
|
|
729
|
+
}, Tt = {
|
|
730
730
|
SOLID: 0,
|
|
731
731
|
DOTTED: 1,
|
|
732
732
|
NOTE: 2,
|
|
@@ -757,98 +757,98 @@ const T = new Me(() => ({
|
|
|
757
757
|
BREAK_START: 30,
|
|
758
758
|
BREAK_END: 31,
|
|
759
759
|
PAR_OVER_START: 32
|
|
760
|
-
},
|
|
760
|
+
}, t0 = {
|
|
761
761
|
FILLED: 0,
|
|
762
762
|
OPEN: 1
|
|
763
|
-
},
|
|
763
|
+
}, e0 = {
|
|
764
764
|
LEFTOF: 0,
|
|
765
765
|
RIGHTOF: 1,
|
|
766
766
|
OVER: 2
|
|
767
|
-
},
|
|
767
|
+
}, ae = function(t, e, c) {
|
|
768
768
|
const a = {
|
|
769
769
|
actor: t,
|
|
770
770
|
placement: e,
|
|
771
771
|
message: c.text,
|
|
772
|
-
wrap: c.wrap === void 0 &&
|
|
772
|
+
wrap: c.wrap === void 0 && xt() || !!c.wrap
|
|
773
773
|
}, s = [].concat(t, t);
|
|
774
|
-
|
|
774
|
+
E.records.notes.push(a), E.records.messages.push({
|
|
775
775
|
from: s[0],
|
|
776
776
|
to: s[1],
|
|
777
777
|
message: c.text,
|
|
778
|
-
wrap: c.wrap === void 0 &&
|
|
779
|
-
type:
|
|
778
|
+
wrap: c.wrap === void 0 && xt() || !!c.wrap,
|
|
779
|
+
type: Tt.NOTE,
|
|
780
780
|
placement: e
|
|
781
781
|
});
|
|
782
|
-
},
|
|
783
|
-
const c =
|
|
782
|
+
}, re = function(t, e) {
|
|
783
|
+
const c = wt(t);
|
|
784
784
|
try {
|
|
785
|
-
let a =
|
|
785
|
+
let a = It(e.text, at());
|
|
786
786
|
a = a.replace(/&/g, "&"), a = a.replace(/=/g, "=");
|
|
787
787
|
const s = JSON.parse(a);
|
|
788
|
-
|
|
788
|
+
qt(c, s);
|
|
789
789
|
} catch (a) {
|
|
790
|
-
|
|
790
|
+
K.error("error while parsing actor link text", a);
|
|
791
791
|
}
|
|
792
|
-
},
|
|
793
|
-
const c =
|
|
792
|
+
}, a0 = function(t, e) {
|
|
793
|
+
const c = wt(t);
|
|
794
794
|
try {
|
|
795
795
|
const l = {};
|
|
796
|
-
let
|
|
797
|
-
var a =
|
|
798
|
-
|
|
799
|
-
var s =
|
|
800
|
-
l[s] = i,
|
|
796
|
+
let n = It(e.text, at());
|
|
797
|
+
var a = n.indexOf("@");
|
|
798
|
+
n = n.replace(/&/g, "&"), n = n.replace(/=/g, "=");
|
|
799
|
+
var s = n.slice(0, a - 1).trim(), i = n.slice(a + 1).trim();
|
|
800
|
+
l[s] = i, qt(c, l);
|
|
801
801
|
} catch (l) {
|
|
802
|
-
|
|
802
|
+
K.error("error while parsing actor link text", l);
|
|
803
803
|
}
|
|
804
804
|
};
|
|
805
|
-
function
|
|
805
|
+
function qt(t, e) {
|
|
806
806
|
if (t.links == null)
|
|
807
807
|
t.links = e;
|
|
808
808
|
else
|
|
809
809
|
for (let c in e)
|
|
810
810
|
t.links[c] = e[c];
|
|
811
811
|
}
|
|
812
|
-
const
|
|
813
|
-
const c =
|
|
812
|
+
const ie = function(t, e) {
|
|
813
|
+
const c = wt(t);
|
|
814
814
|
try {
|
|
815
|
-
let a =
|
|
815
|
+
let a = It(e.text, at());
|
|
816
816
|
const s = JSON.parse(a);
|
|
817
|
-
|
|
817
|
+
se(c, s);
|
|
818
818
|
} catch (a) {
|
|
819
|
-
|
|
819
|
+
K.error("error while parsing actor properties text", a);
|
|
820
820
|
}
|
|
821
821
|
};
|
|
822
|
-
function
|
|
822
|
+
function se(t, e) {
|
|
823
823
|
if (t.properties == null)
|
|
824
824
|
t.properties = e;
|
|
825
825
|
else
|
|
826
826
|
for (let c in e)
|
|
827
827
|
t.properties[c] = e[c];
|
|
828
828
|
}
|
|
829
|
-
function
|
|
830
|
-
|
|
829
|
+
function r0() {
|
|
830
|
+
E.records.currentBox = void 0;
|
|
831
831
|
}
|
|
832
|
-
const
|
|
833
|
-
const c =
|
|
832
|
+
const oe = function(t, e) {
|
|
833
|
+
const c = wt(t), a = document.getElementById(e.text);
|
|
834
834
|
try {
|
|
835
835
|
const s = a.innerHTML, i = JSON.parse(s);
|
|
836
|
-
i.properties &&
|
|
836
|
+
i.properties && se(c, i.properties), i.links && qt(c, i.links);
|
|
837
837
|
} catch (s) {
|
|
838
|
-
|
|
838
|
+
K.error("error while parsing actor details text", s);
|
|
839
839
|
}
|
|
840
|
-
},
|
|
840
|
+
}, i0 = function(t, e) {
|
|
841
841
|
if (t !== void 0 && t.properties !== void 0)
|
|
842
842
|
return t.properties[e];
|
|
843
|
-
},
|
|
843
|
+
}, ne = function(t) {
|
|
844
844
|
if (Array.isArray(t))
|
|
845
845
|
t.forEach(function(e) {
|
|
846
|
-
|
|
846
|
+
ne(e);
|
|
847
847
|
});
|
|
848
848
|
else
|
|
849
849
|
switch (t.type) {
|
|
850
850
|
case "sequenceIndex":
|
|
851
|
-
|
|
851
|
+
E.records.messages.push({
|
|
852
852
|
from: void 0,
|
|
853
853
|
to: void 0,
|
|
854
854
|
message: {
|
|
@@ -861,154 +861,154 @@ const ee = function(t, e) {
|
|
|
861
861
|
});
|
|
862
862
|
break;
|
|
863
863
|
case "addParticipant":
|
|
864
|
-
|
|
864
|
+
Bt(t.actor, t.actor, t.description, t.draw);
|
|
865
865
|
break;
|
|
866
866
|
case "createParticipant":
|
|
867
|
-
if (
|
|
867
|
+
if (E.records.actors[t.actor])
|
|
868
868
|
throw new Error(
|
|
869
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"
|
|
870
870
|
);
|
|
871
|
-
|
|
871
|
+
E.records.lastCreated = t.actor, Bt(t.actor, t.actor, t.description, t.draw), E.records.createdActors[t.actor] = E.records.messages.length;
|
|
872
872
|
break;
|
|
873
873
|
case "destroyParticipant":
|
|
874
|
-
|
|
874
|
+
E.records.lastDestroyed = t.actor, E.records.destroyedActors[t.actor] = E.records.messages.length;
|
|
875
875
|
break;
|
|
876
876
|
case "activeStart":
|
|
877
|
-
|
|
877
|
+
O(t.actor, void 0, void 0, t.signalType);
|
|
878
878
|
break;
|
|
879
879
|
case "activeEnd":
|
|
880
|
-
|
|
880
|
+
O(t.actor, void 0, void 0, t.signalType);
|
|
881
881
|
break;
|
|
882
882
|
case "addNote":
|
|
883
|
-
|
|
883
|
+
ae(t.actor, t.placement, t.text);
|
|
884
884
|
break;
|
|
885
885
|
case "addLinks":
|
|
886
|
-
|
|
886
|
+
re(t.actor, t.text);
|
|
887
887
|
break;
|
|
888
888
|
case "addALink":
|
|
889
|
-
|
|
889
|
+
a0(t.actor, t.text);
|
|
890
890
|
break;
|
|
891
891
|
case "addProperties":
|
|
892
|
-
|
|
892
|
+
ie(t.actor, t.text);
|
|
893
893
|
break;
|
|
894
894
|
case "addDetails":
|
|
895
|
-
|
|
895
|
+
oe(t.actor, t.text);
|
|
896
896
|
break;
|
|
897
897
|
case "addMessage":
|
|
898
|
-
if (
|
|
899
|
-
if (t.to !==
|
|
898
|
+
if (E.records.lastCreated) {
|
|
899
|
+
if (t.to !== E.records.lastCreated)
|
|
900
900
|
throw new Error(
|
|
901
|
-
"The created participant " +
|
|
901
|
+
"The created participant " + E.records.lastCreated + " does not have an associated creating message after its declaration. Please check the sequence diagram."
|
|
902
902
|
);
|
|
903
|
-
|
|
904
|
-
} else if (
|
|
905
|
-
if (t.to !==
|
|
903
|
+
E.records.lastCreated = void 0;
|
|
904
|
+
} else if (E.records.lastDestroyed) {
|
|
905
|
+
if (t.to !== E.records.lastDestroyed && t.from !== E.records.lastDestroyed)
|
|
906
906
|
throw new Error(
|
|
907
|
-
"The destroyed participant " +
|
|
907
|
+
"The destroyed participant " + E.records.lastDestroyed + " does not have an associated destroying message after its declaration. Please check the sequence diagram."
|
|
908
908
|
);
|
|
909
|
-
|
|
909
|
+
E.records.lastDestroyed = void 0;
|
|
910
910
|
}
|
|
911
|
-
|
|
911
|
+
O(t.from, t.to, t.msg, t.signalType, t.activate);
|
|
912
912
|
break;
|
|
913
913
|
case "boxStart":
|
|
914
|
-
|
|
914
|
+
$e(t.boxData);
|
|
915
915
|
break;
|
|
916
916
|
case "boxEnd":
|
|
917
|
-
|
|
917
|
+
r0();
|
|
918
918
|
break;
|
|
919
919
|
case "loopStart":
|
|
920
|
-
|
|
920
|
+
O(void 0, void 0, t.loopText, t.signalType);
|
|
921
921
|
break;
|
|
922
922
|
case "loopEnd":
|
|
923
|
-
|
|
923
|
+
O(void 0, void 0, void 0, t.signalType);
|
|
924
924
|
break;
|
|
925
925
|
case "rectStart":
|
|
926
|
-
|
|
926
|
+
O(void 0, void 0, t.color, t.signalType);
|
|
927
927
|
break;
|
|
928
928
|
case "rectEnd":
|
|
929
|
-
|
|
929
|
+
O(void 0, void 0, void 0, t.signalType);
|
|
930
930
|
break;
|
|
931
931
|
case "optStart":
|
|
932
|
-
|
|
932
|
+
O(void 0, void 0, t.optText, t.signalType);
|
|
933
933
|
break;
|
|
934
934
|
case "optEnd":
|
|
935
|
-
|
|
935
|
+
O(void 0, void 0, void 0, t.signalType);
|
|
936
936
|
break;
|
|
937
937
|
case "altStart":
|
|
938
|
-
|
|
938
|
+
O(void 0, void 0, t.altText, t.signalType);
|
|
939
939
|
break;
|
|
940
940
|
case "else":
|
|
941
|
-
|
|
941
|
+
O(void 0, void 0, t.altText, t.signalType);
|
|
942
942
|
break;
|
|
943
943
|
case "altEnd":
|
|
944
|
-
|
|
944
|
+
O(void 0, void 0, void 0, t.signalType);
|
|
945
945
|
break;
|
|
946
946
|
case "setAccTitle":
|
|
947
|
-
|
|
947
|
+
Gt(t.text);
|
|
948
948
|
break;
|
|
949
949
|
case "parStart":
|
|
950
|
-
|
|
950
|
+
O(void 0, void 0, t.parText, t.signalType);
|
|
951
951
|
break;
|
|
952
952
|
case "and":
|
|
953
|
-
|
|
953
|
+
O(void 0, void 0, t.parText, t.signalType);
|
|
954
954
|
break;
|
|
955
955
|
case "parEnd":
|
|
956
|
-
|
|
956
|
+
O(void 0, void 0, void 0, t.signalType);
|
|
957
957
|
break;
|
|
958
958
|
case "criticalStart":
|
|
959
|
-
|
|
959
|
+
O(void 0, void 0, t.criticalText, t.signalType);
|
|
960
960
|
break;
|
|
961
961
|
case "option":
|
|
962
|
-
|
|
962
|
+
O(void 0, void 0, t.optionText, t.signalType);
|
|
963
963
|
break;
|
|
964
964
|
case "criticalEnd":
|
|
965
|
-
|
|
965
|
+
O(void 0, void 0, void 0, t.signalType);
|
|
966
966
|
break;
|
|
967
967
|
case "breakStart":
|
|
968
|
-
|
|
968
|
+
O(void 0, void 0, t.breakText, t.signalType);
|
|
969
969
|
break;
|
|
970
970
|
case "breakEnd":
|
|
971
|
-
|
|
971
|
+
O(void 0, void 0, void 0, t.signalType);
|
|
972
972
|
break;
|
|
973
973
|
}
|
|
974
|
-
},
|
|
975
|
-
addActor:
|
|
976
|
-
addMessage:
|
|
977
|
-
addSignal:
|
|
978
|
-
addLinks:
|
|
979
|
-
addDetails:
|
|
980
|
-
addProperties:
|
|
981
|
-
autoWrap:
|
|
982
|
-
setWrap:
|
|
983
|
-
enableSequenceNumbers:
|
|
984
|
-
disableSequenceNumbers:
|
|
985
|
-
showSequenceNumbers:
|
|
986
|
-
getMessages:
|
|
987
|
-
getActors:
|
|
988
|
-
getCreatedActors:
|
|
989
|
-
getDestroyedActors:
|
|
990
|
-
getActor:
|
|
991
|
-
getActorKeys:
|
|
992
|
-
getActorProperty:
|
|
993
|
-
getAccTitle:
|
|
994
|
-
getBoxes:
|
|
995
|
-
getDiagramTitle:
|
|
996
|
-
setDiagramTitle:
|
|
997
|
-
getConfig: () =>
|
|
998
|
-
clear:
|
|
999
|
-
parseMessage:
|
|
1000
|
-
parseBoxData:
|
|
1001
|
-
LINETYPE:
|
|
1002
|
-
ARROWTYPE:
|
|
1003
|
-
PLACEMENT:
|
|
1004
|
-
addNote:
|
|
1005
|
-
setAccTitle:
|
|
1006
|
-
apply:
|
|
1007
|
-
setAccDescription:
|
|
1008
|
-
getAccDescription:
|
|
1009
|
-
hasAtLeastOneBox:
|
|
1010
|
-
hasAtLeastOneBoxWithTitle:
|
|
1011
|
-
},
|
|
974
|
+
}, Jt = {
|
|
975
|
+
addActor: Bt,
|
|
976
|
+
addMessage: Ye,
|
|
977
|
+
addSignal: O,
|
|
978
|
+
addLinks: re,
|
|
979
|
+
addDetails: oe,
|
|
980
|
+
addProperties: ie,
|
|
981
|
+
autoWrap: xt,
|
|
982
|
+
setWrap: Je,
|
|
983
|
+
enableSequenceNumbers: je,
|
|
984
|
+
disableSequenceNumbers: Ke,
|
|
985
|
+
showSequenceNumbers: Xe,
|
|
986
|
+
getMessages: Fe,
|
|
987
|
+
getActors: qe,
|
|
988
|
+
getCreatedActors: ze,
|
|
989
|
+
getDestroyedActors: He,
|
|
990
|
+
getActor: wt,
|
|
991
|
+
getActorKeys: Ue,
|
|
992
|
+
getActorProperty: i0,
|
|
993
|
+
getAccTitle: Ee,
|
|
994
|
+
getBoxes: We,
|
|
995
|
+
getDiagramTitle: we,
|
|
996
|
+
setDiagramTitle: ve,
|
|
997
|
+
getConfig: () => at().sequence,
|
|
998
|
+
clear: Qe,
|
|
999
|
+
parseMessage: Ze,
|
|
1000
|
+
parseBoxData: Ge,
|
|
1001
|
+
LINETYPE: Tt,
|
|
1002
|
+
ARROWTYPE: t0,
|
|
1003
|
+
PLACEMENT: e0,
|
|
1004
|
+
addNote: ae,
|
|
1005
|
+
setAccTitle: Gt,
|
|
1006
|
+
apply: ne,
|
|
1007
|
+
setAccDescription: _e,
|
|
1008
|
+
getAccDescription: ke,
|
|
1009
|
+
hasAtLeastOneBox: Be,
|
|
1010
|
+
hasAtLeastOneBoxWithTitle: Ve
|
|
1011
|
+
}, s0 = (t) => `.actor {
|
|
1012
1012
|
stroke: ${t.actorBorder};
|
|
1013
1013
|
fill: ${t.actorBkg};
|
|
1014
1014
|
}
|
|
@@ -1124,43 +1124,60 @@ const ee = function(t, e) {
|
|
|
1124
1124
|
fill: ${t.actorBkg};
|
|
1125
1125
|
stroke-width: 2px;
|
|
1126
1126
|
}
|
|
1127
|
-
`,
|
|
1128
|
-
return
|
|
1129
|
-
},
|
|
1127
|
+
`, o0 = s0, ut = 18 * 2, ce = "actor-top", le = "actor-bottom", zt = function(t, e) {
|
|
1128
|
+
return Ne(t, e);
|
|
1129
|
+
}, n0 = function(t, e, c, a, s) {
|
|
1130
1130
|
if (e.links === void 0 || e.links === null || Object.keys(e.links).length === 0)
|
|
1131
1131
|
return { height: 0, width: 0 };
|
|
1132
|
-
const i = e.links, l = e.actorCnt,
|
|
1133
|
-
var
|
|
1134
|
-
s && (
|
|
1132
|
+
const i = e.links, l = e.actorCnt, n = e.rectData;
|
|
1133
|
+
var h = "none";
|
|
1134
|
+
s && (h = "block !important");
|
|
1135
1135
|
const r = t.append("g");
|
|
1136
|
-
r.attr("id", "actor" + l + "_popup"), r.attr("class", "actorPopupMenu"), r.attr("display",
|
|
1137
|
-
var
|
|
1138
|
-
|
|
1139
|
-
let
|
|
1136
|
+
r.attr("id", "actor" + l + "_popup"), r.attr("class", "actorPopupMenu"), r.attr("display", h);
|
|
1137
|
+
var u = "";
|
|
1138
|
+
n.class !== void 0 && (u = " " + n.class);
|
|
1139
|
+
let b = n.width > c ? n.width : c;
|
|
1140
1140
|
const g = r.append("rect");
|
|
1141
|
-
if (g.attr("class", "actorPopupMenuPanel" +
|
|
1142
|
-
var
|
|
1143
|
-
for (let
|
|
1144
|
-
var w = r.append("a"),
|
|
1145
|
-
w.attr("xlink:href",
|
|
1146
|
-
|
|
1141
|
+
if (g.attr("class", "actorPopupMenuPanel" + u), g.attr("x", n.x), g.attr("y", n.height), g.attr("fill", n.fill), g.attr("stroke", n.stroke), g.attr("width", b), g.attr("height", n.height), g.attr("rx", n.rx), g.attr("ry", n.ry), i != null) {
|
|
1142
|
+
var y = 20;
|
|
1143
|
+
for (let L in i) {
|
|
1144
|
+
var w = r.append("a"), _ = Zt.sanitizeUrl(i[L]);
|
|
1145
|
+
w.attr("xlink:href", _), w.attr("target", "_blank"), _0(a)(
|
|
1146
|
+
L,
|
|
1147
1147
|
w,
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1148
|
+
n.x + 10,
|
|
1149
|
+
n.height + y,
|
|
1150
|
+
b,
|
|
1151
1151
|
20,
|
|
1152
1152
|
{ class: "actor" },
|
|
1153
1153
|
a
|
|
1154
|
-
),
|
|
1154
|
+
), y += 30;
|
|
1155
1155
|
}
|
|
1156
1156
|
}
|
|
1157
|
-
return g.attr("height",
|
|
1158
|
-
},
|
|
1157
|
+
return g.attr("height", y), { height: n.height + y, width: b };
|
|
1158
|
+
}, c0 = function(t) {
|
|
1159
1159
|
return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
|
|
1160
|
+
}, Lt = async function(t, e, c = null) {
|
|
1161
|
+
let a = t.append("foreignObject");
|
|
1162
|
+
const s = await ee(e.text, Ct()), i = a.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();
|
|
1163
|
+
if (a.attr("height", Math.round(i.height)).attr("width", Math.round(i.width)), e.class === "noteText") {
|
|
1164
|
+
const l = t.node().firstChild;
|
|
1165
|
+
l.setAttribute("height", i.height + 2 * e.textMargin);
|
|
1166
|
+
const n = l.getBBox();
|
|
1167
|
+
a.attr("x", Math.round(n.x + n.width / 2 - i.width / 2)).attr("y", Math.round(n.y + n.height / 2 - i.height / 2));
|
|
1168
|
+
} else if (c) {
|
|
1169
|
+
let { startx: l, stopx: n, starty: h } = c;
|
|
1170
|
+
if (l > n) {
|
|
1171
|
+
const r = l;
|
|
1172
|
+
l = n, n = r;
|
|
1173
|
+
}
|
|
1174
|
+
a.attr("x", Math.round(l + Math.abs(l - n) / 2 - i.width / 2)), e.class === "loopText" ? a.attr("y", Math.round(h)) : a.attr("y", Math.round(h - i.height));
|
|
1175
|
+
}
|
|
1176
|
+
return [a];
|
|
1160
1177
|
}, bt = function(t, e) {
|
|
1161
1178
|
let c = 0, a = 0;
|
|
1162
|
-
const s = e.text.split(
|
|
1163
|
-
let
|
|
1179
|
+
const s = e.text.split(v.lineBreakRegex), [i, l] = te(e.fontSize);
|
|
1180
|
+
let n = [], h = 0, r = () => e.y;
|
|
1164
1181
|
if (e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0)
|
|
1165
1182
|
switch (e.valign) {
|
|
1166
1183
|
case "top":
|
|
@@ -1193,47 +1210,47 @@ const ee = function(t, e) {
|
|
|
1193
1210
|
e.x = Math.round(e.x + e.width - e.textMargin), e.anchor = "end", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
|
|
1194
1211
|
break;
|
|
1195
1212
|
}
|
|
1196
|
-
for (let [
|
|
1197
|
-
e.textMargin !== void 0 && e.textMargin === 0 && i !== void 0 && (
|
|
1213
|
+
for (let [u, b] of s.entries()) {
|
|
1214
|
+
e.textMargin !== void 0 && e.textMargin === 0 && i !== void 0 && (h = u * i);
|
|
1198
1215
|
const g = t.append("text");
|
|
1199
|
-
g.attr("x", e.x), g.attr("y", r()), e.anchor !== void 0 && g.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), e.fontFamily !== void 0 && g.style("font-family", e.fontFamily), l !== void 0 && g.style("font-size", l), e.fontWeight !== void 0 && g.style("font-weight", e.fontWeight), e.fill !== void 0 && g.attr("fill", e.fill), e.class !== void 0 && g.attr("class", e.class), e.dy !== void 0 ? g.attr("dy", e.dy) :
|
|
1200
|
-
const
|
|
1216
|
+
g.attr("x", e.x), g.attr("y", r()), e.anchor !== void 0 && g.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), e.fontFamily !== void 0 && g.style("font-family", e.fontFamily), l !== void 0 && g.style("font-size", l), e.fontWeight !== void 0 && g.style("font-weight", e.fontWeight), e.fill !== void 0 && g.attr("fill", e.fill), e.class !== void 0 && g.attr("class", e.class), e.dy !== void 0 ? g.attr("dy", e.dy) : h !== 0 && g.attr("dy", h);
|
|
1217
|
+
const y = b || Le;
|
|
1201
1218
|
if (e.tspan) {
|
|
1202
1219
|
const w = g.append("tspan");
|
|
1203
|
-
w.attr("x", e.x), e.fill !== void 0 && w.attr("fill", e.fill), w.text(
|
|
1220
|
+
w.attr("x", e.x), e.fill !== void 0 && w.attr("fill", e.fill), w.text(y);
|
|
1204
1221
|
} else
|
|
1205
|
-
g.text(
|
|
1206
|
-
e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (a += (g._groups || g)[0][0].getBBox().height, c = a),
|
|
1222
|
+
g.text(y);
|
|
1223
|
+
e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (a += (g._groups || g)[0][0].getBBox().height, c = a), n.push(g);
|
|
1207
1224
|
}
|
|
1208
|
-
return
|
|
1209
|
-
},
|
|
1210
|
-
function c(s, i, l,
|
|
1211
|
-
return s + "," + i + " " + (s + l) + "," + i + " " + (s + l) + "," + (i +
|
|
1225
|
+
return n;
|
|
1226
|
+
}, de = function(t, e) {
|
|
1227
|
+
function c(s, i, l, n, h) {
|
|
1228
|
+
return s + "," + i + " " + (s + l) + "," + i + " " + (s + l) + "," + (i + n - h) + " " + (s + l - h * 1.2) + "," + (i + n) + " " + s + "," + (i + n);
|
|
1212
1229
|
}
|
|
1213
1230
|
const a = t.append("polygon");
|
|
1214
1231
|
return a.attr("points", c(e.x, e.y, e.width, e.height, 7)), a.attr("class", "labelBox"), e.y = e.y + e.height / 2, bt(t, e), a;
|
|
1215
1232
|
};
|
|
1216
|
-
let
|
|
1217
|
-
const
|
|
1233
|
+
let ot = -1;
|
|
1234
|
+
const pe = (t, e, c, a) => {
|
|
1218
1235
|
t.select && c.forEach((s) => {
|
|
1219
1236
|
const i = e[s], l = t.select("#actor" + i.actorCnt);
|
|
1220
1237
|
!a.mirrorActors && i.stopy ? l.attr("y2", i.stopy + i.height / 2) : a.mirrorActors && l.attr("y2", i.stopy);
|
|
1221
1238
|
});
|
|
1222
|
-
},
|
|
1223
|
-
const s = a ? e.stopy : e.starty, i = e.x + e.width / 2, l = s + 5,
|
|
1224
|
-
var
|
|
1225
|
-
a || (
|
|
1226
|
-
const r =
|
|
1227
|
-
var
|
|
1228
|
-
e.properties != null && e.properties.class ?
|
|
1229
|
-
const
|
|
1239
|
+
}, l0 = async function(t, e, c, a) {
|
|
1240
|
+
const s = a ? e.stopy : e.starty, i = e.x + e.width / 2, l = s + 5, n = t.append("g").lower();
|
|
1241
|
+
var h = n;
|
|
1242
|
+
a || (ot++, Object.keys(e.links || {}).length && !c.forceMenus && h.attr("onclick", c0(`actor${ot}_popup`)).attr("cursor", "pointer"), h.append("line").attr("id", "actor" + ot).attr("x1", i).attr("y1", l).attr("x2", i).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"), h = n.append("g"), e.actorCnt = ot, e.links != null && h.attr("id", "root-" + ot));
|
|
1243
|
+
const r = Mt();
|
|
1244
|
+
var u = "actor";
|
|
1245
|
+
e.properties != null && e.properties.class ? u = e.properties.class : r.fill = "#eaeaea", a ? u += ` ${le}` : u += ` ${ce}`, r.x = e.x, r.y = s, r.width = e.width, r.height = e.height, r.class = u, r.rx = 3, r.ry = 3, r.name = e.name;
|
|
1246
|
+
const b = zt(h, r);
|
|
1230
1247
|
if (e.rectData = r, e.properties != null && e.properties.icon) {
|
|
1231
|
-
const
|
|
1232
|
-
|
|
1248
|
+
const y = e.properties.icon.trim();
|
|
1249
|
+
y.charAt(0) === "@" ? Se(h, r.x + r.width - 20, r.y + 10, y.substr(1)) : Oe(h, r.x + r.width - 20, r.y + 10, y);
|
|
1233
1250
|
}
|
|
1234
|
-
|
|
1251
|
+
await Ht(c, nt(e.description))(
|
|
1235
1252
|
e.description,
|
|
1236
|
-
|
|
1253
|
+
h,
|
|
1237
1254
|
r.x,
|
|
1238
1255
|
r.y,
|
|
1239
1256
|
r.width,
|
|
@@ -1242,25 +1259,25 @@ const oe = (t, e, c, a) => {
|
|
|
1242
1259
|
c
|
|
1243
1260
|
);
|
|
1244
1261
|
let g = e.height;
|
|
1245
|
-
if (
|
|
1246
|
-
const
|
|
1247
|
-
e.height =
|
|
1262
|
+
if (b.node) {
|
|
1263
|
+
const y = b.node().getBBox();
|
|
1264
|
+
e.height = y.height, g = y.height;
|
|
1248
1265
|
}
|
|
1249
1266
|
return g;
|
|
1250
|
-
},
|
|
1267
|
+
}, d0 = async function(t, e, c, a) {
|
|
1251
1268
|
const s = a ? e.stopy : e.starty, i = e.x + e.width / 2, l = s + 80;
|
|
1252
|
-
t.lower(), a || (
|
|
1253
|
-
const
|
|
1254
|
-
let
|
|
1255
|
-
a ?
|
|
1256
|
-
const r =
|
|
1257
|
-
r.x = e.x, r.y = s, r.fill = "#eaeaea", r.width = e.width, r.height = e.height, r.class = "actor", r.rx = 3, r.ry = 3,
|
|
1258
|
-
const
|
|
1259
|
-
|
|
1260
|
-
const
|
|
1261
|
-
return e.height =
|
|
1269
|
+
t.lower(), a || (ot++, t.append("line").attr("id", "actor" + ot).attr("x1", i).attr("y1", l).attr("x2", i).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"), e.actorCnt = ot);
|
|
1270
|
+
const n = t.append("g");
|
|
1271
|
+
let h = "actor-man";
|
|
1272
|
+
a ? h += ` ${le}` : h += ` ${ce}`, n.attr("class", h), n.attr("name", e.name);
|
|
1273
|
+
const r = Mt();
|
|
1274
|
+
r.x = e.x, r.y = s, r.fill = "#eaeaea", r.width = e.width, r.height = e.height, r.class = "actor", r.rx = 3, r.ry = 3, n.append("line").attr("id", "actor-man-torso" + ot).attr("x1", i).attr("y1", s + 25).attr("x2", i).attr("y2", s + 45), n.append("line").attr("id", "actor-man-arms" + ot).attr("x1", i - ut / 2).attr("y1", s + 33).attr("x2", i + ut / 2).attr("y2", s + 33), n.append("line").attr("x1", i - ut / 2).attr("y1", s + 60).attr("x2", i).attr("y2", s + 45), n.append("line").attr("x1", i).attr("y1", s + 45).attr("x2", i + ut / 2 - 2).attr("y2", s + 60);
|
|
1275
|
+
const u = n.append("circle");
|
|
1276
|
+
u.attr("cx", e.x + e.width / 2), u.attr("cy", s + 10), u.attr("r", 15), u.attr("width", e.width), u.attr("height", e.height);
|
|
1277
|
+
const b = n.node().getBBox();
|
|
1278
|
+
return e.height = b.height, await Ht(c, nt(e.description))(
|
|
1262
1279
|
e.description,
|
|
1263
|
-
|
|
1280
|
+
n,
|
|
1264
1281
|
r.x,
|
|
1265
1282
|
r.y + 35,
|
|
1266
1283
|
r.width,
|
|
@@ -1268,16 +1285,16 @@ const oe = (t, e, c, a) => {
|
|
|
1268
1285
|
{ class: "actor" },
|
|
1269
1286
|
c
|
|
1270
1287
|
), e.height;
|
|
1271
|
-
},
|
|
1288
|
+
}, p0 = async function(t, e, c, a) {
|
|
1272
1289
|
switch (e.type) {
|
|
1273
1290
|
case "actor":
|
|
1274
|
-
return
|
|
1291
|
+
return await d0(t, e, c, a);
|
|
1275
1292
|
case "participant":
|
|
1276
|
-
return
|
|
1293
|
+
return await l0(t, e, c, a);
|
|
1277
1294
|
}
|
|
1278
|
-
},
|
|
1295
|
+
}, h0 = async function(t, e, c) {
|
|
1279
1296
|
const a = t.append("g");
|
|
1280
|
-
|
|
1297
|
+
he(a, e), e.name && await Ht(c)(
|
|
1281
1298
|
e.name,
|
|
1282
1299
|
a,
|
|
1283
1300
|
e.x,
|
|
@@ -1287,67 +1304,69 @@ const oe = (t, e, c, a) => {
|
|
|
1287
1304
|
{ class: "text" },
|
|
1288
1305
|
c
|
|
1289
1306
|
), a.lower();
|
|
1290
|
-
},
|
|
1307
|
+
}, g0 = function(t) {
|
|
1291
1308
|
return t.append("g");
|
|
1292
|
-
},
|
|
1293
|
-
const i =
|
|
1294
|
-
i.x = e.startx, i.y = e.starty, i.class = "activation" + s % 3, i.width = e.stopx - e.startx, i.height = c - e.starty,
|
|
1295
|
-
},
|
|
1309
|
+
}, u0 = function(t, e, c, a, s) {
|
|
1310
|
+
const i = Mt(), l = e.anchored;
|
|
1311
|
+
i.x = e.startx, i.y = e.starty, i.class = "activation" + s % 3, i.width = e.stopx - e.startx, i.height = c - e.starty, zt(l, i);
|
|
1312
|
+
}, x0 = async function(t, e, c, a) {
|
|
1296
1313
|
const {
|
|
1297
1314
|
boxMargin: s,
|
|
1298
1315
|
boxTextMargin: i,
|
|
1299
1316
|
labelBoxHeight: l,
|
|
1300
|
-
labelBoxWidth:
|
|
1301
|
-
messageFontFamily:
|
|
1317
|
+
labelBoxWidth: n,
|
|
1318
|
+
messageFontFamily: h,
|
|
1302
1319
|
messageFontSize: r,
|
|
1303
|
-
messageFontWeight:
|
|
1304
|
-
} = a,
|
|
1305
|
-
return
|
|
1320
|
+
messageFontWeight: u
|
|
1321
|
+
} = a, b = t.append("g"), g = function(_, L, R, N) {
|
|
1322
|
+
return b.append("line").attr("x1", _).attr("y1", L).attr("x2", R).attr("y2", N).attr("class", "loopLine");
|
|
1306
1323
|
};
|
|
1307
|
-
g(e.startx, e.starty, e.stopx, e.starty), g(e.stopx, e.starty, e.stopx, e.stopy), g(e.startx, e.stopy, e.stopx, e.stopy), g(e.startx, e.starty, e.startx, e.stopy), e.sections !== void 0 && e.sections.forEach(function(
|
|
1308
|
-
g(e.startx,
|
|
1324
|
+
g(e.startx, e.starty, e.stopx, e.starty), g(e.stopx, e.starty, e.stopx, e.stopy), g(e.startx, e.stopy, e.stopx, e.stopy), g(e.startx, e.starty, e.startx, e.stopy), e.sections !== void 0 && e.sections.forEach(function(_) {
|
|
1325
|
+
g(e.startx, _.y, e.stopx, _.y).style(
|
|
1309
1326
|
"stroke-dasharray",
|
|
1310
1327
|
"3, 3"
|
|
1311
1328
|
);
|
|
1312
1329
|
});
|
|
1313
|
-
let
|
|
1314
|
-
|
|
1315
|
-
let w = bt(
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
},
|
|
1330
|
+
let y = Wt();
|
|
1331
|
+
y.text = c, y.x = e.startx, y.y = e.starty, y.fontFamily = h, y.fontSize = r, y.fontWeight = u, y.anchor = "middle", y.valign = "middle", y.tspan = !1, y.width = n || 50, y.height = l || 20, y.textMargin = i, y.class = "labelText", de(b, y), y = ge(), y.text = e.title, y.x = e.startx + n / 2 + (e.stopx - e.startx) / 2, y.y = e.starty + s + i, y.anchor = "middle", y.valign = "middle", y.textMargin = i, y.class = "loopText", y.fontFamily = h, y.fontSize = r, y.fontWeight = u, y.wrap = !0;
|
|
1332
|
+
let w = nt(y.text) ? await Lt(b, y, e) : bt(b, y);
|
|
1333
|
+
if (e.sectionTitles !== void 0) {
|
|
1334
|
+
for (const [_, L] of Object.entries(e.sectionTitles))
|
|
1335
|
+
if (L.message) {
|
|
1336
|
+
y.text = L.message, y.x = e.startx + (e.stopx - e.startx) / 2, y.y = e.sections[_].y + s + i, y.class = "loopText", y.anchor = "middle", y.valign = "middle", y.tspan = !1, y.fontFamily = h, y.fontSize = r, y.fontWeight = u, y.wrap = e.wrap, nt(y.text) ? (e.starty = e.sections[_].y, await Lt(b, y, e)) : bt(b, y);
|
|
1337
|
+
let R = Math.round(
|
|
1338
|
+
w.map((N) => (N._groups || N)[0][0].getBBox().height).reduce((N, $) => N + $)
|
|
1339
|
+
);
|
|
1340
|
+
e.sections[_].height += R - (s + i);
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
return e.height = Math.round(e.stopy - e.starty), b;
|
|
1344
|
+
}, he = function(t, e) {
|
|
1345
|
+
Ae(t, e);
|
|
1346
|
+
}, y0 = function(t) {
|
|
1328
1347
|
t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
|
|
1329
1348
|
"d",
|
|
1330
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"
|
|
1331
1350
|
);
|
|
1332
|
-
},
|
|
1351
|
+
}, m0 = function(t) {
|
|
1333
1352
|
t.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1334
1353
|
"d",
|
|
1335
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"
|
|
1336
1355
|
);
|
|
1337
|
-
},
|
|
1356
|
+
}, f0 = function(t) {
|
|
1338
1357
|
t.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1339
1358
|
"d",
|
|
1340
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"
|
|
1341
1360
|
);
|
|
1342
|
-
},
|
|
1361
|
+
}, b0 = function(t) {
|
|
1343
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");
|
|
1344
|
-
},
|
|
1363
|
+
}, T0 = function(t) {
|
|
1345
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");
|
|
1346
|
-
},
|
|
1365
|
+
}, E0 = function(t) {
|
|
1347
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);
|
|
1348
|
-
},
|
|
1367
|
+
}, w0 = function(t) {
|
|
1349
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");
|
|
1350
|
-
},
|
|
1369
|
+
}, ge = function() {
|
|
1351
1370
|
return {
|
|
1352
1371
|
x: 0,
|
|
1353
1372
|
y: 0,
|
|
@@ -1362,7 +1381,7 @@ const oe = (t, e, c, a) => {
|
|
|
1362
1381
|
tspan: !0,
|
|
1363
1382
|
valign: void 0
|
|
1364
1383
|
};
|
|
1365
|
-
},
|
|
1384
|
+
}, v0 = function() {
|
|
1366
1385
|
return {
|
|
1367
1386
|
x: 0,
|
|
1368
1387
|
y: 0,
|
|
@@ -1374,44 +1393,48 @@ const oe = (t, e, c, a) => {
|
|
|
1374
1393
|
rx: 0,
|
|
1375
1394
|
ry: 0
|
|
1376
1395
|
};
|
|
1377
|
-
},
|
|
1378
|
-
function t(
|
|
1379
|
-
const
|
|
1380
|
-
|
|
1381
|
-
}
|
|
1382
|
-
function e(
|
|
1383
|
-
const { actorFontSize:
|
|
1384
|
-
for (let
|
|
1385
|
-
const
|
|
1386
|
-
|
|
1396
|
+
}, Ht = /* @__PURE__ */ function() {
|
|
1397
|
+
function t(i, l, n, h, r, u, b) {
|
|
1398
|
+
const g = l.append("text").attr("x", n + r / 2).attr("y", h + u / 2 + 5).style("text-anchor", "middle").text(i);
|
|
1399
|
+
s(g, b);
|
|
1400
|
+
}
|
|
1401
|
+
function e(i, l, n, h, r, u, b, g) {
|
|
1402
|
+
const { actorFontSize: y, actorFontFamily: w, actorFontWeight: _ } = g, [L, R] = te(y), N = i.split(v.lineBreakRegex);
|
|
1403
|
+
for (let $ = 0; $ < N.length; $++) {
|
|
1404
|
+
const S = $ * L - L * (N.length - 1) / 2, F = l.append("text").attr("x", n + r / 2).attr("y", h).style("text-anchor", "middle").style("font-size", R).style("font-weight", _).style("font-family", w);
|
|
1405
|
+
F.append("tspan").attr("x", n + r / 2).attr("dy", S).text(N[$]), F.attr("y", h + u / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), s(F, b);
|
|
1387
1406
|
}
|
|
1388
1407
|
}
|
|
1389
|
-
function c(
|
|
1390
|
-
const
|
|
1391
|
-
|
|
1408
|
+
function c(i, l, n, h, r, u, b, g) {
|
|
1409
|
+
const y = l.append("switch"), w = y.append("foreignObject").attr("x", n).attr("y", h).attr("width", r).attr("height", u).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1410
|
+
w.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, y, n, h, r, u, b, g), s(w, b);
|
|
1392
1411
|
}
|
|
1393
|
-
function a(
|
|
1394
|
-
|
|
1395
|
-
|
|
1412
|
+
async function a(i, l, n, h, r, u, b, g) {
|
|
1413
|
+
const y = await Et(i, Ct()), w = l.append("switch"), _ = w.append("foreignObject").attr("x", n + r / 2 - y.width / 2).attr("y", h + u / 2 - y.height / 2).attr("width", y.width).attr("height", y.height).append("xhtml:div").style("height", "100%").style("width", "100%");
|
|
1414
|
+
_.append("div").style("text-align", "center").style("vertical-align", "middle").html(await ee(i, Ct())), e(i, w, n, h, r, u, b, g), s(_, b);
|
|
1396
1415
|
}
|
|
1397
|
-
|
|
1398
|
-
|
|
1416
|
+
function s(i, l) {
|
|
1417
|
+
for (const n in l)
|
|
1418
|
+
l.hasOwnProperty(n) && i.attr(n, l[n]);
|
|
1419
|
+
}
|
|
1420
|
+
return function(i, l = !1) {
|
|
1421
|
+
return l ? a : i.textPlacement === "fo" ? c : i.textPlacement === "old" ? t : e;
|
|
1399
1422
|
};
|
|
1400
|
-
}(),
|
|
1401
|
-
function t(s, i, l,
|
|
1402
|
-
const
|
|
1403
|
-
a(
|
|
1404
|
-
}
|
|
1405
|
-
function e(s, i, l,
|
|
1406
|
-
const { actorFontSize: g, actorFontFamily:
|
|
1407
|
-
for (let
|
|
1408
|
-
const
|
|
1409
|
-
|
|
1423
|
+
}(), _0 = /* @__PURE__ */ function() {
|
|
1424
|
+
function t(s, i, l, n, h, r, u) {
|
|
1425
|
+
const b = i.append("text").attr("x", l).attr("y", n).style("text-anchor", "start").text(s);
|
|
1426
|
+
a(b, u);
|
|
1427
|
+
}
|
|
1428
|
+
function e(s, i, l, n, h, r, u, b) {
|
|
1429
|
+
const { actorFontSize: g, actorFontFamily: y, actorFontWeight: w } = b, _ = s.split(v.lineBreakRegex);
|
|
1430
|
+
for (let L = 0; L < _.length; L++) {
|
|
1431
|
+
const R = L * g - g * (_.length - 1) / 2, N = i.append("text").attr("x", l).attr("y", n).style("text-anchor", "start").style("font-size", g).style("font-weight", w).style("font-family", y);
|
|
1432
|
+
N.append("tspan").attr("x", l).attr("dy", R).text(_[L]), N.attr("y", n + r / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(N, u);
|
|
1410
1433
|
}
|
|
1411
1434
|
}
|
|
1412
|
-
function c(s, i, l,
|
|
1413
|
-
const g = i.append("switch"),
|
|
1414
|
-
|
|
1435
|
+
function c(s, i, l, n, h, r, u, b) {
|
|
1436
|
+
const g = i.append("switch"), y = g.append("foreignObject").attr("x", l).attr("y", n).attr("width", h).attr("height", r).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1437
|
+
y.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), e(s, g, l, n, h, r, u, b), a(y, u);
|
|
1415
1438
|
}
|
|
1416
1439
|
function a(s, i) {
|
|
1417
1440
|
for (const l in i)
|
|
@@ -1420,31 +1443,31 @@ const oe = (t, e, c, a) => {
|
|
|
1420
1443
|
return function(s) {
|
|
1421
1444
|
return s.textPlacement === "fo" ? c : s.textPlacement === "old" ? t : e;
|
|
1422
1445
|
};
|
|
1423
|
-
}(),
|
|
1424
|
-
drawRect:
|
|
1446
|
+
}(), D = {
|
|
1447
|
+
drawRect: zt,
|
|
1425
1448
|
drawText: bt,
|
|
1426
|
-
drawLabel:
|
|
1427
|
-
drawActor:
|
|
1428
|
-
drawBox:
|
|
1429
|
-
drawPopup:
|
|
1430
|
-
anchorElement:
|
|
1431
|
-
drawActivation:
|
|
1432
|
-
drawLoop:
|
|
1433
|
-
drawBackgroundRect:
|
|
1434
|
-
insertArrowHead:
|
|
1435
|
-
insertArrowFilledHead:
|
|
1436
|
-
insertSequenceNumber:
|
|
1437
|
-
insertArrowCrossHead:
|
|
1438
|
-
insertDatabaseIcon:
|
|
1439
|
-
insertComputerIcon:
|
|
1440
|
-
insertClockIcon:
|
|
1441
|
-
getTextObj:
|
|
1442
|
-
getNoteRect:
|
|
1443
|
-
fixLifeLineHeights:
|
|
1444
|
-
sanitizeUrl:
|
|
1449
|
+
drawLabel: de,
|
|
1450
|
+
drawActor: p0,
|
|
1451
|
+
drawBox: h0,
|
|
1452
|
+
drawPopup: n0,
|
|
1453
|
+
anchorElement: g0,
|
|
1454
|
+
drawActivation: u0,
|
|
1455
|
+
drawLoop: x0,
|
|
1456
|
+
drawBackgroundRect: he,
|
|
1457
|
+
insertArrowHead: b0,
|
|
1458
|
+
insertArrowFilledHead: T0,
|
|
1459
|
+
insertSequenceNumber: E0,
|
|
1460
|
+
insertArrowCrossHead: w0,
|
|
1461
|
+
insertDatabaseIcon: y0,
|
|
1462
|
+
insertComputerIcon: m0,
|
|
1463
|
+
insertClockIcon: f0,
|
|
1464
|
+
getTextObj: ge,
|
|
1465
|
+
getNoteRect: v0,
|
|
1466
|
+
fixLifeLineHeights: pe,
|
|
1467
|
+
sanitizeUrl: Zt.sanitizeUrl
|
|
1445
1468
|
};
|
|
1446
1469
|
let o = {};
|
|
1447
|
-
const
|
|
1470
|
+
const x = {
|
|
1448
1471
|
data: {
|
|
1449
1472
|
startx: void 0,
|
|
1450
1473
|
stopx: void 0,
|
|
@@ -1503,7 +1526,7 @@ const u = {
|
|
|
1503
1526
|
stopx: void 0,
|
|
1504
1527
|
starty: void 0,
|
|
1505
1528
|
stopy: void 0
|
|
1506
|
-
}, this.verticalPos = 0,
|
|
1529
|
+
}, this.verticalPos = 0, xe(at());
|
|
1507
1530
|
},
|
|
1508
1531
|
updateVal: function(t, e, c, a) {
|
|
1509
1532
|
t[e] === void 0 ? t[e] = c : t[e] = a(c, t[e]);
|
|
@@ -1511,28 +1534,28 @@ const u = {
|
|
|
1511
1534
|
updateBounds: function(t, e, c, a) {
|
|
1512
1535
|
const s = this;
|
|
1513
1536
|
let i = 0;
|
|
1514
|
-
function l(
|
|
1515
|
-
return function(
|
|
1537
|
+
function l(n) {
|
|
1538
|
+
return function(h) {
|
|
1516
1539
|
i++;
|
|
1517
1540
|
const r = s.sequenceItems.length - i + 1;
|
|
1518
|
-
s.updateVal(
|
|
1541
|
+
s.updateVal(h, "starty", e - r * o.boxMargin, Math.min), s.updateVal(h, "stopy", a + r * o.boxMargin, Math.max), s.updateVal(x.data, "startx", t - r * o.boxMargin, Math.min), s.updateVal(x.data, "stopx", c + r * o.boxMargin, Math.max), n !== "activation" && (s.updateVal(h, "startx", t - r * o.boxMargin, Math.min), s.updateVal(h, "stopx", c + r * o.boxMargin, Math.max), s.updateVal(x.data, "starty", e - r * o.boxMargin, Math.min), s.updateVal(x.data, "stopy", a + r * o.boxMargin, Math.max));
|
|
1519
1542
|
};
|
|
1520
1543
|
}
|
|
1521
1544
|
this.sequenceItems.forEach(l()), this.activations.forEach(l("activation"));
|
|
1522
1545
|
},
|
|
1523
1546
|
insert: function(t, e, c, a) {
|
|
1524
|
-
const s =
|
|
1525
|
-
this.updateVal(
|
|
1547
|
+
const s = v.getMin(t, c), i = v.getMax(t, c), l = v.getMin(e, a), n = v.getMax(e, a);
|
|
1548
|
+
this.updateVal(x.data, "startx", s, Math.min), this.updateVal(x.data, "starty", l, Math.min), this.updateVal(x.data, "stopx", i, Math.max), this.updateVal(x.data, "stopy", n, Math.max), this.updateBounds(s, l, i, n);
|
|
1526
1549
|
},
|
|
1527
1550
|
newActivation: function(t, e, c) {
|
|
1528
|
-
const a = c[t.from.actor], s =
|
|
1551
|
+
const a = c[t.from.actor], s = Nt(t.from.actor).length || 0, i = a.x + a.width / 2 + (s - 1) * o.activationWidth / 2;
|
|
1529
1552
|
this.activations.push({
|
|
1530
1553
|
startx: i,
|
|
1531
1554
|
starty: this.verticalPos + 2,
|
|
1532
1555
|
stopx: i + o.activationWidth,
|
|
1533
1556
|
stopy: void 0,
|
|
1534
1557
|
actor: t.from.actor,
|
|
1535
|
-
anchored:
|
|
1558
|
+
anchored: D.anchorElement(e)
|
|
1536
1559
|
});
|
|
1537
1560
|
},
|
|
1538
1561
|
endActivation: function(t) {
|
|
@@ -1565,7 +1588,7 @@ const u = {
|
|
|
1565
1588
|
},
|
|
1566
1589
|
addSectionToLoop: function(t) {
|
|
1567
1590
|
const e = this.sequenceItems.pop();
|
|
1568
|
-
e.sections = e.sections || [], e.sectionTitles = e.sectionTitles || [], e.sections.push({ y:
|
|
1591
|
+
e.sections = e.sections || [], e.sectionTitles = e.sectionTitles || [], e.sections.push({ y: x.getVerticalPos(), height: 0 }), e.sectionTitles.push(t), this.sequenceItems.push(e);
|
|
1569
1592
|
},
|
|
1570
1593
|
saveVerticalPos: function() {
|
|
1571
1594
|
this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
|
|
@@ -1574,7 +1597,7 @@ const u = {
|
|
|
1574
1597
|
this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
|
|
1575
1598
|
},
|
|
1576
1599
|
bumpVerticalPos: function(t) {
|
|
1577
|
-
this.verticalPos = this.verticalPos + t, this.data.stopy =
|
|
1600
|
+
this.verticalPos = this.verticalPos + t, this.data.stopy = v.getMax(this.data.stopy, this.verticalPos);
|
|
1578
1601
|
},
|
|
1579
1602
|
getVerticalPos: function() {
|
|
1580
1603
|
return this.verticalPos;
|
|
@@ -1582,343 +1605,347 @@ const u = {
|
|
|
1582
1605
|
getBounds: function() {
|
|
1583
1606
|
return { bounds: this.data, models: this.models };
|
|
1584
1607
|
}
|
|
1585
|
-
},
|
|
1586
|
-
|
|
1587
|
-
const c =
|
|
1608
|
+
}, k0 = async function(t, e) {
|
|
1609
|
+
x.bumpVerticalPos(o.boxMargin), e.height = o.boxMargin, e.starty = x.getVerticalPos();
|
|
1610
|
+
const c = Mt();
|
|
1588
1611
|
c.x = e.startx, c.y = e.starty, c.width = e.width || o.width, c.class = "note";
|
|
1589
|
-
const a = t.append("g"), s =
|
|
1612
|
+
const a = t.append("g"), s = D.drawRect(a, c), i = Wt();
|
|
1590
1613
|
i.x = e.startx, i.y = e.starty, i.width = c.width, i.dy = "1em", i.text = e.message, i.class = "noteText", i.fontFamily = o.noteFontFamily, i.fontSize = o.noteFontSize, i.fontWeight = o.noteFontWeight, i.anchor = o.noteAlign, i.textMargin = o.noteMargin, i.valign = "center";
|
|
1591
|
-
const l = bt(a, i),
|
|
1592
|
-
l.map((
|
|
1614
|
+
const l = nt(i.text) ? await Lt(a, i) : bt(a, i), n = Math.round(
|
|
1615
|
+
l.map((h) => (h._groups || h)[0][0].getBBox().height).reduce((h, r) => h + r)
|
|
1593
1616
|
);
|
|
1594
|
-
s.attr("height",
|
|
1595
|
-
},
|
|
1617
|
+
s.attr("height", n + 2 * o.noteMargin), e.height += n + 2 * o.noteMargin, x.bumpVerticalPos(n + 2 * o.noteMargin), e.stopy = e.starty + n + 2 * o.noteMargin, e.stopx = e.startx + c.width, x.insert(e.startx, e.starty, e.stopx, e.stopy), x.models.addNote(e);
|
|
1618
|
+
}, yt = (t) => ({
|
|
1596
1619
|
fontFamily: t.messageFontFamily,
|
|
1597
1620
|
fontSize: t.messageFontSize,
|
|
1598
1621
|
fontWeight: t.messageFontWeight
|
|
1599
|
-
}),
|
|
1622
|
+
}), ft = (t) => ({
|
|
1600
1623
|
fontFamily: t.noteFontFamily,
|
|
1601
1624
|
fontSize: t.noteFontSize,
|
|
1602
1625
|
fontWeight: t.noteFontWeight
|
|
1603
|
-
}),
|
|
1626
|
+
}), Vt = (t) => ({
|
|
1604
1627
|
fontFamily: t.actorFontFamily,
|
|
1605
1628
|
fontSize: t.actorFontSize,
|
|
1606
1629
|
fontWeight: t.actorFontWeight
|
|
1607
1630
|
});
|
|
1608
|
-
function
|
|
1609
|
-
|
|
1610
|
-
const { startx: c, stopx: a, message: s } = e, i =
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1631
|
+
async function P0(t, e) {
|
|
1632
|
+
x.bumpVerticalPos(10);
|
|
1633
|
+
const { startx: c, stopx: a, message: s } = e, i = v.splitBreaks(s).length, l = nt(s), n = l ? await Et(s, at()) : C.calculateTextDimensions(s, yt(o));
|
|
1634
|
+
if (!l) {
|
|
1635
|
+
const b = n.height / i;
|
|
1636
|
+
e.height += b, x.bumpVerticalPos(b);
|
|
1637
|
+
}
|
|
1638
|
+
let h, r = n.height - 10;
|
|
1639
|
+
const u = n.width;
|
|
1614
1640
|
if (c === a) {
|
|
1615
|
-
|
|
1616
|
-
const
|
|
1617
|
-
|
|
1618
|
-
c -
|
|
1619
|
-
|
|
1620
|
-
a +
|
|
1621
|
-
|
|
1641
|
+
h = x.getVerticalPos() + r, o.rightAngles || (r += o.boxMargin, h = x.getVerticalPos() + r), r += 30;
|
|
1642
|
+
const b = v.getMax(u / 2, o.width / 2);
|
|
1643
|
+
x.insert(
|
|
1644
|
+
c - b,
|
|
1645
|
+
x.getVerticalPos() - 10 + r,
|
|
1646
|
+
a + b,
|
|
1647
|
+
x.getVerticalPos() + 30 + r
|
|
1622
1648
|
);
|
|
1623
1649
|
} else
|
|
1624
|
-
r += o.boxMargin,
|
|
1625
|
-
return
|
|
1650
|
+
r += o.boxMargin, h = x.getVerticalPos() + r, x.insert(c, h - 10, a, h);
|
|
1651
|
+
return x.bumpVerticalPos(r), e.height += r, e.stopy = e.starty + e.height, x.insert(e.fromBounds, e.starty, e.toBounds, e.stopy), h;
|
|
1626
1652
|
}
|
|
1627
|
-
const
|
|
1628
|
-
const { startx: s, stopx: i, starty: l, message:
|
|
1629
|
-
g.x = s, g.y = l + 10, g.width = i - s, g.class = "messageText", g.dy = "1em", g.text =
|
|
1630
|
-
const
|
|
1653
|
+
const L0 = async function(t, e, c, a) {
|
|
1654
|
+
const { startx: s, stopx: i, starty: l, message: n, type: h, sequenceIndex: r, sequenceVisible: u } = e, b = C.calculateTextDimensions(n, yt(o)), g = Wt();
|
|
1655
|
+
g.x = s, g.y = l + 10, g.width = i - s, g.class = "messageText", g.dy = "1em", g.text = n, g.fontFamily = o.messageFontFamily, g.fontSize = o.messageFontSize, g.fontWeight = o.messageFontWeight, g.anchor = o.messageAlign, g.valign = "center", g.textMargin = o.wrapPadding, g.tspan = !1, nt(g.text) ? await Lt(t, g, { startx: s, stopx: i, starty: c }) : bt(t, g);
|
|
1656
|
+
const y = b.width;
|
|
1631
1657
|
let w;
|
|
1632
1658
|
s === i ? o.rightAngles ? w = t.append("path").attr(
|
|
1633
1659
|
"d",
|
|
1634
|
-
`M ${s},${c} H ${s +
|
|
1660
|
+
`M ${s},${c} H ${s + v.getMax(o.width / 2, y / 2)} V ${c + 25} H ${s}`
|
|
1635
1661
|
) : w = t.append("path").attr(
|
|
1636
1662
|
"d",
|
|
1637
1663
|
"M " + s + "," + c + " C " + (s + 60) + "," + (c - 10) + " " + (s + 60) + "," + (c + 30) + " " + s + "," + (c + 20)
|
|
1638
|
-
) : (w = t.append("line"), w.attr("x1", s), w.attr("y1", c), w.attr("x2", i), w.attr("y2", c)),
|
|
1639
|
-
let
|
|
1640
|
-
o.arrowMarkerAbsolute && (
|
|
1641
|
-
},
|
|
1642
|
-
let
|
|
1643
|
-
for (const
|
|
1644
|
-
const g = e[
|
|
1645
|
-
r && r !=
|
|
1646
|
-
}
|
|
1647
|
-
r && !l &&
|
|
1648
|
-
},
|
|
1664
|
+
) : (w = t.append("line"), w.attr("x1", s), w.attr("y1", c), w.attr("x2", i), w.attr("y2", c)), h === a.db.LINETYPE.DOTTED || h === a.db.LINETYPE.DOTTED_CROSS || h === a.db.LINETYPE.DOTTED_POINT || h === a.db.LINETYPE.DOTTED_OPEN ? (w.style("stroke-dasharray", "3, 3"), w.attr("class", "messageLine1")) : w.attr("class", "messageLine0");
|
|
1665
|
+
let _ = "";
|
|
1666
|
+
o.arrowMarkerAbsolute && (_ = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, _ = _.replace(/\(/g, "\\("), _ = _.replace(/\)/g, "\\)")), w.attr("stroke-width", 2), w.attr("stroke", "none"), w.style("fill", "none"), (h === a.db.LINETYPE.SOLID || h === a.db.LINETYPE.DOTTED) && w.attr("marker-end", "url(" + _ + "#arrowhead)"), (h === a.db.LINETYPE.SOLID_POINT || h === a.db.LINETYPE.DOTTED_POINT) && w.attr("marker-end", "url(" + _ + "#filled-head)"), (h === a.db.LINETYPE.SOLID_CROSS || h === a.db.LINETYPE.DOTTED_CROSS) && w.attr("marker-end", "url(" + _ + "#crosshead)"), (u || o.showSequenceNumbers) && (w.attr("marker-start", "url(" + _ + "#sequencenumber)"), t.append("text").attr("x", s).attr("y", c + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(r));
|
|
1667
|
+
}, I0 = async function(t, e, c, a, s, i, l) {
|
|
1668
|
+
let n = 0, h = 0, r, u = 0;
|
|
1669
|
+
for (const b of a) {
|
|
1670
|
+
const g = e[b], y = g.box;
|
|
1671
|
+
r && r != y && (x.models.addBox(r), h += o.boxMargin + r.margin), y && y != r && (y.x = n + h, y.y = s, h += y.margin), g.width = g.width || o.width, g.height = v.getMax(g.height || o.height, o.height), g.margin = g.margin || o.actorMargin, u = v.getMax(u, g.height), c[g.name] && (h += g.width / 2), g.x = n + h, g.starty = x.getVerticalPos(), x.insert(g.x, s, g.x + g.width, g.height), n += g.width + h, g.box && (g.box.width = n + y.margin - g.box.x), h = g.margin, r = g.box, x.models.addActor(g);
|
|
1672
|
+
}
|
|
1673
|
+
r && !l && x.models.addBox(r), x.bumpVerticalPos(u);
|
|
1674
|
+
}, Ft = async function(t, e, c, a) {
|
|
1649
1675
|
if (a) {
|
|
1650
1676
|
let s = 0;
|
|
1651
|
-
|
|
1677
|
+
x.bumpVerticalPos(o.boxMargin * 2);
|
|
1652
1678
|
for (const i of c) {
|
|
1653
1679
|
const l = e[i];
|
|
1654
|
-
l.stopy || (l.stopy =
|
|
1655
|
-
const
|
|
1656
|
-
s =
|
|
1680
|
+
l.stopy || (l.stopy = x.getVerticalPos());
|
|
1681
|
+
const n = await D.drawActor(t, l, o, !0);
|
|
1682
|
+
s = v.getMax(s, n);
|
|
1657
1683
|
}
|
|
1658
|
-
|
|
1684
|
+
x.bumpVerticalPos(s + o.boxMargin);
|
|
1659
1685
|
} else
|
|
1660
1686
|
for (const s of c) {
|
|
1661
1687
|
const i = e[s];
|
|
1662
|
-
|
|
1688
|
+
await D.drawActor(t, i, o, !1);
|
|
1663
1689
|
}
|
|
1664
|
-
},
|
|
1690
|
+
}, ue = function(t, e, c, a) {
|
|
1665
1691
|
let s = 0, i = 0;
|
|
1666
1692
|
for (const l of c) {
|
|
1667
|
-
const
|
|
1693
|
+
const n = e[l], h = S0(n), r = D.drawPopup(
|
|
1668
1694
|
t,
|
|
1669
|
-
|
|
1670
|
-
|
|
1695
|
+
n,
|
|
1696
|
+
h,
|
|
1671
1697
|
o,
|
|
1672
1698
|
o.forceMenus,
|
|
1673
1699
|
a
|
|
1674
1700
|
);
|
|
1675
|
-
r.height > s && (s = r.height), r.width +
|
|
1701
|
+
r.height > s && (s = r.height), r.width + n.x > i && (i = r.width + n.x);
|
|
1676
1702
|
}
|
|
1677
1703
|
return { maxHeight: s, maxWidth: i };
|
|
1678
|
-
},
|
|
1679
|
-
|
|
1680
|
-
},
|
|
1681
|
-
return
|
|
1704
|
+
}, xe = function(t) {
|
|
1705
|
+
Ie(o, t), t.fontFamily && (o.actorFontFamily = o.noteFontFamily = o.messageFontFamily = t.fontFamily), t.fontSize && (o.actorFontSize = o.noteFontSize = o.messageFontSize = t.fontSize), t.fontWeight && (o.actorFontWeight = o.noteFontWeight = o.messageFontWeight = t.fontWeight);
|
|
1706
|
+
}, Nt = function(t) {
|
|
1707
|
+
return x.activations.filter(function(e) {
|
|
1682
1708
|
return e.actor === t;
|
|
1683
1709
|
});
|
|
1684
|
-
},
|
|
1685
|
-
const c = e[t], a =
|
|
1686
|
-
return
|
|
1687
|
-
}, c.x + c.width / 2 - 1), i = a.reduce(function(l,
|
|
1688
|
-
return
|
|
1710
|
+
}, Qt = function(t, e) {
|
|
1711
|
+
const c = e[t], a = Nt(t), s = a.reduce(function(l, n) {
|
|
1712
|
+
return v.getMin(l, n.startx);
|
|
1713
|
+
}, c.x + c.width / 2 - 1), i = a.reduce(function(l, n) {
|
|
1714
|
+
return v.getMax(l, n.stopx);
|
|
1689
1715
|
}, c.x + c.width / 2 + 1);
|
|
1690
1716
|
return [s, i];
|
|
1691
1717
|
};
|
|
1692
|
-
function
|
|
1693
|
-
|
|
1718
|
+
function st(t, e, c, a, s) {
|
|
1719
|
+
x.bumpVerticalPos(c);
|
|
1694
1720
|
let i = a;
|
|
1695
1721
|
if (e.id && e.message && t[e.id]) {
|
|
1696
|
-
const l = t[e.id].width,
|
|
1697
|
-
e.message =
|
|
1698
|
-
const
|
|
1699
|
-
i = a + r,
|
|
1722
|
+
const l = t[e.id].width, n = yt(o);
|
|
1723
|
+
e.message = C.wrapLabel(`[${e.message}]`, l - 2 * o.wrapPadding, n), e.width = l, e.wrap = !0;
|
|
1724
|
+
const h = C.calculateTextDimensions(e.message, n), r = v.getMax(h.height, o.labelBoxHeight);
|
|
1725
|
+
i = a + r, K.debug(`${r} - ${e.message}`);
|
|
1700
1726
|
}
|
|
1701
|
-
s(e),
|
|
1727
|
+
s(e), x.bumpVerticalPos(i);
|
|
1702
1728
|
}
|
|
1703
|
-
function
|
|
1704
|
-
function
|
|
1705
|
-
r.x < s[t.from].x ? (
|
|
1706
|
-
e.stopx -
|
|
1729
|
+
function M0(t, e, c, a, s, i, l) {
|
|
1730
|
+
function n(r, u) {
|
|
1731
|
+
r.x < s[t.from].x ? (x.insert(
|
|
1732
|
+
e.stopx - u,
|
|
1707
1733
|
e.starty,
|
|
1708
1734
|
e.startx,
|
|
1709
1735
|
e.stopy + r.height / 2 + o.noteMargin
|
|
1710
|
-
), e.stopx = e.stopx +
|
|
1736
|
+
), e.stopx = e.stopx + u) : (x.insert(
|
|
1711
1737
|
e.startx,
|
|
1712
1738
|
e.starty,
|
|
1713
|
-
e.stopx +
|
|
1739
|
+
e.stopx + u,
|
|
1714
1740
|
e.stopy + r.height / 2 + o.noteMargin
|
|
1715
|
-
), e.stopx = e.stopx -
|
|
1741
|
+
), e.stopx = e.stopx - u);
|
|
1716
1742
|
}
|
|
1717
|
-
function
|
|
1718
|
-
r.x < s[t.to].x ? (
|
|
1719
|
-
e.startx -
|
|
1743
|
+
function h(r, u) {
|
|
1744
|
+
r.x < s[t.to].x ? (x.insert(
|
|
1745
|
+
e.startx - u,
|
|
1720
1746
|
e.starty,
|
|
1721
1747
|
e.stopx,
|
|
1722
1748
|
e.stopy + r.height / 2 + o.noteMargin
|
|
1723
|
-
), e.startx = e.startx +
|
|
1749
|
+
), e.startx = e.startx + u) : (x.insert(
|
|
1724
1750
|
e.stopx,
|
|
1725
1751
|
e.starty,
|
|
1726
|
-
e.startx +
|
|
1752
|
+
e.startx + u,
|
|
1727
1753
|
e.stopy + r.height / 2 + o.noteMargin
|
|
1728
|
-
), e.startx = e.startx -
|
|
1754
|
+
), e.startx = e.startx - u);
|
|
1729
1755
|
}
|
|
1730
1756
|
if (i[t.to] == a) {
|
|
1731
|
-
const r = s[t.to],
|
|
1732
|
-
|
|
1757
|
+
const r = s[t.to], u = r.type == "actor" ? ut / 2 + 3 : r.width / 2 + 3;
|
|
1758
|
+
n(r, u), r.starty = c - r.height / 2, x.bumpVerticalPos(r.height / 2);
|
|
1733
1759
|
} else if (l[t.from] == a) {
|
|
1734
1760
|
const r = s[t.from];
|
|
1735
1761
|
if (o.mirrorActors) {
|
|
1736
|
-
const
|
|
1737
|
-
|
|
1762
|
+
const u = r.type == "actor" ? ut / 2 : r.width / 2;
|
|
1763
|
+
h(r, u);
|
|
1738
1764
|
}
|
|
1739
|
-
r.stopy = c - r.height / 2,
|
|
1765
|
+
r.stopy = c - r.height / 2, x.bumpVerticalPos(r.height / 2);
|
|
1740
1766
|
} else if (l[t.to] == a) {
|
|
1741
1767
|
const r = s[t.to];
|
|
1742
1768
|
if (o.mirrorActors) {
|
|
1743
|
-
const
|
|
1744
|
-
|
|
1769
|
+
const u = r.type == "actor" ? ut / 2 + 3 : r.width / 2 + 3;
|
|
1770
|
+
n(r, u);
|
|
1745
1771
|
}
|
|
1746
|
-
r.stopy = c - r.height / 2,
|
|
1772
|
+
r.stopy = c - r.height / 2, x.bumpVerticalPos(r.height / 2);
|
|
1747
1773
|
}
|
|
1748
1774
|
}
|
|
1749
|
-
const
|
|
1750
|
-
const { securityLevel: s, sequence: i } =
|
|
1775
|
+
const N0 = async function(t, e, c, a) {
|
|
1776
|
+
const { securityLevel: s, sequence: i } = at();
|
|
1751
1777
|
o = i;
|
|
1752
1778
|
let l;
|
|
1753
|
-
s === "sandbox" && (l =
|
|
1754
|
-
const
|
|
1755
|
-
|
|
1756
|
-
const r = s === "sandbox" ?
|
|
1779
|
+
s === "sandbox" && (l = Pt("#i" + e));
|
|
1780
|
+
const n = s === "sandbox" ? Pt(l.nodes()[0].contentDocument.body) : Pt("body"), h = s === "sandbox" ? l.nodes()[0].contentDocument : document;
|
|
1781
|
+
x.init(), K.debug(a.db);
|
|
1782
|
+
const r = s === "sandbox" ? n.select(`[id="${e}"]`) : Pt(`[id="${e}"]`), u = a.db.getActors(), b = a.db.getCreatedActors(), g = a.db.getDestroyedActors(), y = a.db.getBoxes();
|
|
1757
1783
|
let w = a.db.getActorKeys();
|
|
1758
|
-
const
|
|
1759
|
-
if (o.height =
|
|
1760
|
-
const
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
}), w = w.filter((
|
|
1764
|
-
}
|
|
1765
|
-
|
|
1766
|
-
const S =
|
|
1767
|
-
|
|
1768
|
-
function
|
|
1769
|
-
const
|
|
1770
|
-
|
|
1784
|
+
const _ = a.db.getMessages(), L = a.db.getDiagramTitle(), R = a.db.hasAtLeastOneBox(), N = a.db.hasAtLeastOneBoxWithTitle(), $ = await A0(u, _, a);
|
|
1785
|
+
if (o.height = await O0(u, $, y), D.insertComputerIcon(r), D.insertDatabaseIcon(r), D.insertClockIcon(r), R && (x.bumpVerticalPos(o.boxMargin), N && x.bumpVerticalPos(y[0].textMaxHeight)), o.hideUnusedParticipants === !0) {
|
|
1786
|
+
const m = /* @__PURE__ */ new Set();
|
|
1787
|
+
_.forEach((P) => {
|
|
1788
|
+
m.add(P.from), m.add(P.to);
|
|
1789
|
+
}), w = w.filter((P) => m.has(P));
|
|
1790
|
+
}
|
|
1791
|
+
await I0(r, u, b, w, 0, _, !1);
|
|
1792
|
+
const S = await $0(_, u, $, a);
|
|
1793
|
+
D.insertArrowHead(r), D.insertArrowCrossHead(r), D.insertArrowFilledHead(r), D.insertSequenceNumber(r);
|
|
1794
|
+
function F(m, P) {
|
|
1795
|
+
const Z = x.endActivation(m);
|
|
1796
|
+
Z.starty + 18 > P && (Z.starty = P - 6, P += 12), D.drawActivation(
|
|
1771
1797
|
r,
|
|
1772
|
-
|
|
1773
|
-
|
|
1798
|
+
Z,
|
|
1799
|
+
P,
|
|
1774
1800
|
o,
|
|
1775
|
-
|
|
1776
|
-
),
|
|
1777
|
-
}
|
|
1778
|
-
let
|
|
1779
|
-
const G = [],
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1801
|
+
Nt(m.from.actor).length
|
|
1802
|
+
), x.insert(Z.startx, P - 10, Z.stopx, P);
|
|
1803
|
+
}
|
|
1804
|
+
let W = 1, X = 1;
|
|
1805
|
+
const G = [], q = [];
|
|
1806
|
+
let z = 0;
|
|
1807
|
+
for (const m of _) {
|
|
1808
|
+
let P, Z, rt;
|
|
1809
|
+
switch (m.type) {
|
|
1783
1810
|
case a.db.LINETYPE.NOTE:
|
|
1784
|
-
|
|
1811
|
+
x.resetVerticalPos(), Z = m.noteModel, await k0(r, Z);
|
|
1785
1812
|
break;
|
|
1786
1813
|
case a.db.LINETYPE.ACTIVE_START:
|
|
1787
|
-
|
|
1814
|
+
x.newActivation(m, r, u);
|
|
1788
1815
|
break;
|
|
1789
1816
|
case a.db.LINETYPE.ACTIVE_END:
|
|
1790
|
-
|
|
1817
|
+
F(m, x.getVerticalPos());
|
|
1791
1818
|
break;
|
|
1792
1819
|
case a.db.LINETYPE.LOOP_START:
|
|
1793
|
-
|
|
1820
|
+
st(
|
|
1794
1821
|
S,
|
|
1795
|
-
|
|
1822
|
+
m,
|
|
1796
1823
|
o.boxMargin,
|
|
1797
1824
|
o.boxMargin + o.boxTextMargin,
|
|
1798
|
-
(
|
|
1825
|
+
(I) => x.newLoop(I)
|
|
1799
1826
|
);
|
|
1800
1827
|
break;
|
|
1801
1828
|
case a.db.LINETYPE.LOOP_END:
|
|
1802
|
-
|
|
1829
|
+
P = x.endLoop(), await D.drawLoop(r, P, "loop", o), x.bumpVerticalPos(P.stopy - x.getVerticalPos()), x.models.addLoop(P);
|
|
1803
1830
|
break;
|
|
1804
1831
|
case a.db.LINETYPE.RECT_START:
|
|
1805
|
-
|
|
1832
|
+
st(
|
|
1806
1833
|
S,
|
|
1807
|
-
|
|
1834
|
+
m,
|
|
1808
1835
|
o.boxMargin,
|
|
1809
1836
|
o.boxMargin,
|
|
1810
|
-
(
|
|
1837
|
+
(I) => x.newLoop(void 0, I.message)
|
|
1811
1838
|
);
|
|
1812
1839
|
break;
|
|
1813
1840
|
case a.db.LINETYPE.RECT_END:
|
|
1814
|
-
|
|
1841
|
+
P = x.endLoop(), q.push(P), x.models.addLoop(P), x.bumpVerticalPos(P.stopy - x.getVerticalPos());
|
|
1815
1842
|
break;
|
|
1816
1843
|
case a.db.LINETYPE.OPT_START:
|
|
1817
|
-
|
|
1844
|
+
st(
|
|
1818
1845
|
S,
|
|
1819
|
-
|
|
1846
|
+
m,
|
|
1820
1847
|
o.boxMargin,
|
|
1821
1848
|
o.boxMargin + o.boxTextMargin,
|
|
1822
|
-
(
|
|
1849
|
+
(I) => x.newLoop(I)
|
|
1823
1850
|
);
|
|
1824
1851
|
break;
|
|
1825
1852
|
case a.db.LINETYPE.OPT_END:
|
|
1826
|
-
|
|
1853
|
+
P = x.endLoop(), await D.drawLoop(r, P, "opt", o), x.bumpVerticalPos(P.stopy - x.getVerticalPos()), x.models.addLoop(P);
|
|
1827
1854
|
break;
|
|
1828
1855
|
case a.db.LINETYPE.ALT_START:
|
|
1829
|
-
|
|
1856
|
+
st(
|
|
1830
1857
|
S,
|
|
1831
|
-
|
|
1858
|
+
m,
|
|
1832
1859
|
o.boxMargin,
|
|
1833
1860
|
o.boxMargin + o.boxTextMargin,
|
|
1834
|
-
(
|
|
1861
|
+
(I) => x.newLoop(I)
|
|
1835
1862
|
);
|
|
1836
1863
|
break;
|
|
1837
1864
|
case a.db.LINETYPE.ALT_ELSE:
|
|
1838
|
-
|
|
1865
|
+
st(
|
|
1839
1866
|
S,
|
|
1840
|
-
|
|
1867
|
+
m,
|
|
1841
1868
|
o.boxMargin + o.boxTextMargin,
|
|
1842
1869
|
o.boxMargin,
|
|
1843
|
-
(
|
|
1870
|
+
(I) => x.addSectionToLoop(I)
|
|
1844
1871
|
);
|
|
1845
1872
|
break;
|
|
1846
1873
|
case a.db.LINETYPE.ALT_END:
|
|
1847
|
-
|
|
1874
|
+
P = x.endLoop(), await D.drawLoop(r, P, "alt", o), x.bumpVerticalPos(P.stopy - x.getVerticalPos()), x.models.addLoop(P);
|
|
1848
1875
|
break;
|
|
1849
1876
|
case a.db.LINETYPE.PAR_START:
|
|
1850
1877
|
case a.db.LINETYPE.PAR_OVER_START:
|
|
1851
|
-
|
|
1878
|
+
st(
|
|
1852
1879
|
S,
|
|
1853
|
-
|
|
1880
|
+
m,
|
|
1854
1881
|
o.boxMargin,
|
|
1855
1882
|
o.boxMargin + o.boxTextMargin,
|
|
1856
|
-
(
|
|
1857
|
-
),
|
|
1883
|
+
(I) => x.newLoop(I)
|
|
1884
|
+
), x.saveVerticalPos();
|
|
1858
1885
|
break;
|
|
1859
1886
|
case a.db.LINETYPE.PAR_AND:
|
|
1860
|
-
|
|
1887
|
+
st(
|
|
1861
1888
|
S,
|
|
1862
|
-
|
|
1889
|
+
m,
|
|
1863
1890
|
o.boxMargin + o.boxTextMargin,
|
|
1864
1891
|
o.boxMargin,
|
|
1865
|
-
(
|
|
1892
|
+
(I) => x.addSectionToLoop(I)
|
|
1866
1893
|
);
|
|
1867
1894
|
break;
|
|
1868
1895
|
case a.db.LINETYPE.PAR_END:
|
|
1869
|
-
|
|
1896
|
+
P = x.endLoop(), await D.drawLoop(r, P, "par", o), x.bumpVerticalPos(P.stopy - x.getVerticalPos()), x.models.addLoop(P);
|
|
1870
1897
|
break;
|
|
1871
1898
|
case a.db.LINETYPE.AUTONUMBER:
|
|
1872
|
-
|
|
1899
|
+
W = m.message.start || W, X = m.message.step || X, m.message.visible ? a.db.enableSequenceNumbers() : a.db.disableSequenceNumbers();
|
|
1873
1900
|
break;
|
|
1874
1901
|
case a.db.LINETYPE.CRITICAL_START:
|
|
1875
|
-
|
|
1902
|
+
st(
|
|
1876
1903
|
S,
|
|
1877
|
-
|
|
1904
|
+
m,
|
|
1878
1905
|
o.boxMargin,
|
|
1879
1906
|
o.boxMargin + o.boxTextMargin,
|
|
1880
|
-
(
|
|
1907
|
+
(I) => x.newLoop(I)
|
|
1881
1908
|
);
|
|
1882
1909
|
break;
|
|
1883
1910
|
case a.db.LINETYPE.CRITICAL_OPTION:
|
|
1884
|
-
|
|
1911
|
+
st(
|
|
1885
1912
|
S,
|
|
1886
|
-
|
|
1913
|
+
m,
|
|
1887
1914
|
o.boxMargin + o.boxTextMargin,
|
|
1888
1915
|
o.boxMargin,
|
|
1889
|
-
(
|
|
1916
|
+
(I) => x.addSectionToLoop(I)
|
|
1890
1917
|
);
|
|
1891
1918
|
break;
|
|
1892
1919
|
case a.db.LINETYPE.CRITICAL_END:
|
|
1893
|
-
|
|
1920
|
+
P = x.endLoop(), await D.drawLoop(r, P, "critical", o), x.bumpVerticalPos(P.stopy - x.getVerticalPos()), x.models.addLoop(P);
|
|
1894
1921
|
break;
|
|
1895
1922
|
case a.db.LINETYPE.BREAK_START:
|
|
1896
|
-
|
|
1923
|
+
st(
|
|
1897
1924
|
S,
|
|
1898
|
-
|
|
1925
|
+
m,
|
|
1899
1926
|
o.boxMargin,
|
|
1900
1927
|
o.boxMargin + o.boxTextMargin,
|
|
1901
|
-
(
|
|
1928
|
+
(I) => x.newLoop(I)
|
|
1902
1929
|
);
|
|
1903
1930
|
break;
|
|
1904
1931
|
case a.db.LINETYPE.BREAK_END:
|
|
1905
|
-
|
|
1932
|
+
P = x.endLoop(), await D.drawLoop(r, P, "break", o), x.bumpVerticalPos(P.stopy - x.getVerticalPos()), x.models.addLoop(P);
|
|
1906
1933
|
break;
|
|
1907
1934
|
default:
|
|
1908
1935
|
try {
|
|
1909
|
-
|
|
1910
|
-
const
|
|
1911
|
-
|
|
1936
|
+
rt = m.msgModel, rt.starty = x.getVerticalPos(), rt.sequenceIndex = W, rt.sequenceVisible = a.db.showSequenceNumbers();
|
|
1937
|
+
const I = await P0(r, rt);
|
|
1938
|
+
M0(
|
|
1939
|
+
m,
|
|
1940
|
+
rt,
|
|
1941
|
+
I,
|
|
1942
|
+
z,
|
|
1943
|
+
u,
|
|
1912
1944
|
b,
|
|
1913
|
-
et,
|
|
1914
|
-
N,
|
|
1915
|
-
v,
|
|
1916
|
-
x,
|
|
1917
|
-
E,
|
|
1918
1945
|
g
|
|
1919
|
-
), G.push({ messageModel:
|
|
1920
|
-
} catch (
|
|
1921
|
-
|
|
1946
|
+
), G.push({ messageModel: rt, lineStartY: I }), x.models.addMessage(rt);
|
|
1947
|
+
} catch (I) {
|
|
1948
|
+
K.error("error while drawing message", I);
|
|
1922
1949
|
}
|
|
1923
1950
|
}
|
|
1924
1951
|
[
|
|
@@ -1930,117 +1957,122 @@ const k0 = function(t, e, c, a) {
|
|
|
1930
1957
|
a.db.LINETYPE.DOTTED_CROSS,
|
|
1931
1958
|
a.db.LINETYPE.SOLID_POINT,
|
|
1932
1959
|
a.db.LINETYPE.DOTTED_POINT
|
|
1933
|
-
].includes(
|
|
1934
|
-
}
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1960
|
+
].includes(m.type) && (W = W + X), z++;
|
|
1961
|
+
}
|
|
1962
|
+
K.debug("createdActors", b), K.debug("destroyedActors", g), await Ft(r, u, w, !1);
|
|
1963
|
+
for (const m of G)
|
|
1964
|
+
await L0(r, m.messageModel, m.lineStartY, a);
|
|
1965
|
+
o.mirrorActors && await Ft(r, u, w, !0), q.forEach((m) => D.drawBackgroundRect(r, m)), pe(r, u, w, o);
|
|
1966
|
+
for (const m of x.models.boxes)
|
|
1967
|
+
m.height = x.getVerticalPos() - m.y, x.insert(m.x, m.y, m.x + m.width, m.height), m.startx = m.x, m.starty = m.y, m.stopx = m.startx + m.width, m.stopy = m.starty + m.height, m.stroke = "rgb(0,0,0, 0.5)", await D.drawBox(r, m, o);
|
|
1968
|
+
R && x.bumpVerticalPos(o.boxMargin);
|
|
1969
|
+
const B = ue(r, u, w, h), { bounds: V } = x.getBounds();
|
|
1970
|
+
let J = V.stopy - V.starty;
|
|
1971
|
+
J < B.maxHeight && (J = B.maxHeight);
|
|
1972
|
+
let H = J + 2 * o.diagramMarginY;
|
|
1973
|
+
o.mirrorActors && (H = H - o.boxMargin + o.bottomMarginAdj);
|
|
1974
|
+
let Q = V.stopx - V.startx;
|
|
1975
|
+
Q < B.maxWidth && (Q = B.maxWidth);
|
|
1976
|
+
const tt = Q + 2 * o.diagramMarginX;
|
|
1977
|
+
L && r.append("text").text(L).attr("x", (V.stopx - V.startx) / 2 - 2 * o.diagramMarginX).attr("y", -25), Me(r, H, tt, o.useMaxWidth);
|
|
1978
|
+
const M = L ? 40 : 0;
|
|
1947
1979
|
r.attr(
|
|
1948
1980
|
"viewBox",
|
|
1949
|
-
|
|
1950
|
-
),
|
|
1981
|
+
V.startx - o.diagramMarginX + " -" + (o.diagramMarginY + M) + " " + tt + " " + (H + M)
|
|
1982
|
+
), K.debug("models:", x.models);
|
|
1951
1983
|
};
|
|
1952
|
-
function
|
|
1984
|
+
async function A0(t, e, c) {
|
|
1953
1985
|
const a = {};
|
|
1954
|
-
|
|
1986
|
+
for (const s of e)
|
|
1955
1987
|
if (t[s.to] && t[s.from]) {
|
|
1956
1988
|
const i = t[s.to];
|
|
1957
1989
|
if (s.placement === c.db.PLACEMENT.LEFTOF && !i.prevActor || s.placement === c.db.PLACEMENT.RIGHTOF && !i.nextActor)
|
|
1958
|
-
|
|
1959
|
-
const l = s.placement !== void 0,
|
|
1960
|
-
|
|
1990
|
+
continue;
|
|
1991
|
+
const l = s.placement !== void 0, n = !l, h = l ? ft(o) : yt(o), r = s.wrap ? C.wrapLabel(s.message, o.width - 2 * o.wrapPadding, h) : s.message, u = (nt(r) ? await Et(s.message, at()) : C.calculateTextDimensions(r, h)).width + 2 * o.wrapPadding;
|
|
1992
|
+
n && s.from === i.nextActor ? a[s.to] = v.getMax(
|
|
1961
1993
|
a[s.to] || 0,
|
|
1962
|
-
|
|
1963
|
-
) :
|
|
1994
|
+
u
|
|
1995
|
+
) : n && s.from === i.prevActor ? a[s.from] = v.getMax(
|
|
1964
1996
|
a[s.from] || 0,
|
|
1965
|
-
|
|
1966
|
-
) :
|
|
1997
|
+
u
|
|
1998
|
+
) : n && s.from === s.to ? (a[s.from] = v.getMax(
|
|
1967
1999
|
a[s.from] || 0,
|
|
1968
|
-
|
|
1969
|
-
), a[s.to] =
|
|
2000
|
+
u / 2
|
|
2001
|
+
), a[s.to] = v.getMax(
|
|
1970
2002
|
a[s.to] || 0,
|
|
1971
|
-
|
|
1972
|
-
)) : s.placement === c.db.PLACEMENT.RIGHTOF ? a[s.from] =
|
|
2003
|
+
u / 2
|
|
2004
|
+
)) : s.placement === c.db.PLACEMENT.RIGHTOF ? a[s.from] = v.getMax(
|
|
1973
2005
|
a[s.from] || 0,
|
|
1974
|
-
|
|
1975
|
-
) : s.placement === c.db.PLACEMENT.LEFTOF ? a[i.prevActor] =
|
|
2006
|
+
u
|
|
2007
|
+
) : s.placement === c.db.PLACEMENT.LEFTOF ? a[i.prevActor] = v.getMax(
|
|
1976
2008
|
a[i.prevActor] || 0,
|
|
1977
|
-
|
|
1978
|
-
) : s.placement === c.db.PLACEMENT.OVER && (i.prevActor && (a[i.prevActor] =
|
|
2009
|
+
u
|
|
2010
|
+
) : s.placement === c.db.PLACEMENT.OVER && (i.prevActor && (a[i.prevActor] = v.getMax(
|
|
1979
2011
|
a[i.prevActor] || 0,
|
|
1980
|
-
|
|
1981
|
-
)), i.nextActor && (a[s.from] =
|
|
2012
|
+
u / 2
|
|
2013
|
+
)), i.nextActor && (a[s.from] = v.getMax(
|
|
1982
2014
|
a[s.from] || 0,
|
|
1983
|
-
|
|
2015
|
+
u / 2
|
|
1984
2016
|
)));
|
|
1985
2017
|
}
|
|
1986
|
-
|
|
2018
|
+
return K.debug("maxMessageWidthPerActor:", a), a;
|
|
1987
2019
|
}
|
|
1988
|
-
const
|
|
2020
|
+
const S0 = function(t) {
|
|
1989
2021
|
let e = 0;
|
|
1990
|
-
const c =
|
|
2022
|
+
const c = Vt(o);
|
|
1991
2023
|
for (const a in t.links) {
|
|
1992
|
-
const s =
|
|
2024
|
+
const s = C.calculateTextDimensions(a, c).width + 2 * o.wrapPadding + 2 * o.boxMargin;
|
|
1993
2025
|
e < s && (e = s);
|
|
1994
2026
|
}
|
|
1995
2027
|
return e;
|
|
1996
2028
|
};
|
|
1997
|
-
function
|
|
2029
|
+
async function O0(t, e, c) {
|
|
1998
2030
|
let a = 0;
|
|
1999
|
-
Object.keys(t)
|
|
2031
|
+
for (const i of Object.keys(t)) {
|
|
2000
2032
|
const l = t[i];
|
|
2001
|
-
l.wrap && (l.description =
|
|
2033
|
+
l.wrap && (l.description = C.wrapLabel(
|
|
2002
2034
|
l.description,
|
|
2003
2035
|
o.width - 2 * o.wrapPadding,
|
|
2004
|
-
|
|
2036
|
+
Vt(o)
|
|
2005
2037
|
));
|
|
2006
|
-
const
|
|
2007
|
-
l.width = l.wrap ? o.width :
|
|
2008
|
-
}
|
|
2038
|
+
const n = nt(l.description) ? await Et(l.description, at()) : C.calculateTextDimensions(l.description, Vt(o));
|
|
2039
|
+
l.width = l.wrap ? o.width : v.getMax(o.width, n.width + 2 * o.wrapPadding), l.height = l.wrap ? v.getMax(n.height, o.height) : o.height, a = v.getMax(a, l.height);
|
|
2040
|
+
}
|
|
2009
2041
|
for (const i in e) {
|
|
2010
2042
|
const l = t[i];
|
|
2011
2043
|
if (!l)
|
|
2012
2044
|
continue;
|
|
2013
|
-
const
|
|
2014
|
-
if (!
|
|
2045
|
+
const n = t[l.nextActor];
|
|
2046
|
+
if (!n) {
|
|
2015
2047
|
const r = e[i] + o.actorMargin - l.width / 2;
|
|
2016
|
-
l.margin =
|
|
2048
|
+
l.margin = v.getMax(r, o.actorMargin);
|
|
2017
2049
|
continue;
|
|
2018
2050
|
}
|
|
2019
|
-
const
|
|
2020
|
-
l.margin =
|
|
2051
|
+
const h = e[i] + o.actorMargin - l.width / 2 - n.width / 2;
|
|
2052
|
+
l.margin = v.getMax(h, o.actorMargin);
|
|
2021
2053
|
}
|
|
2022
2054
|
let s = 0;
|
|
2023
2055
|
return c.forEach((i) => {
|
|
2024
|
-
const l =
|
|
2025
|
-
let
|
|
2026
|
-
|
|
2027
|
-
const
|
|
2028
|
-
s =
|
|
2029
|
-
const r =
|
|
2030
|
-
if (i.margin = o.boxTextMargin,
|
|
2031
|
-
const
|
|
2032
|
-
i.margin +=
|
|
2056
|
+
const l = yt(o);
|
|
2057
|
+
let n = i.actorKeys.reduce((u, b) => u += t[b].width + (t[b].margin || 0), 0);
|
|
2058
|
+
n -= 2 * o.boxTextMargin, i.wrap && (i.name = C.wrapLabel(i.name, n - 2 * o.wrapPadding, l));
|
|
2059
|
+
const h = C.calculateTextDimensions(i.name, l);
|
|
2060
|
+
s = v.getMax(h.height, s);
|
|
2061
|
+
const r = v.getMax(n, h.width + 2 * o.wrapPadding);
|
|
2062
|
+
if (i.margin = o.boxTextMargin, n < r) {
|
|
2063
|
+
const u = (r - n) / 2;
|
|
2064
|
+
i.margin += u;
|
|
2033
2065
|
}
|
|
2034
|
-
}), c.forEach((i) => i.textMaxHeight = s),
|
|
2066
|
+
}), c.forEach((i) => i.textMaxHeight = s), v.getMax(a, o.height);
|
|
2035
2067
|
}
|
|
2036
|
-
const
|
|
2068
|
+
const D0 = async function(t, e, c) {
|
|
2037
2069
|
const a = e[t.from].x, s = e[t.to].x, i = t.wrap && t.message;
|
|
2038
|
-
let l =
|
|
2039
|
-
i ?
|
|
2040
|
-
|
|
2070
|
+
let l = nt(t.message) ? await Et(t.message, at()) : C.calculateTextDimensions(
|
|
2071
|
+
i ? C.wrapLabel(t.message, o.width, ft(o)) : t.message,
|
|
2072
|
+
ft(o)
|
|
2041
2073
|
);
|
|
2042
|
-
const
|
|
2043
|
-
width: i ? o.width :
|
|
2074
|
+
const n = {
|
|
2075
|
+
width: i ? o.width : v.getMax(o.width, l.width + 2 * o.noteMargin),
|
|
2044
2076
|
height: 0,
|
|
2045
2077
|
startx: e[t.from].x,
|
|
2046
2078
|
stopx: 0,
|
|
@@ -2048,31 +2080,31 @@ const N0 = function(t, e, c) {
|
|
|
2048
2080
|
stopy: 0,
|
|
2049
2081
|
message: t.message
|
|
2050
2082
|
};
|
|
2051
|
-
return t.placement === c.db.PLACEMENT.RIGHTOF ? (
|
|
2083
|
+
return t.placement === c.db.PLACEMENT.RIGHTOF ? (n.width = i ? v.getMax(o.width, l.width) : v.getMax(
|
|
2052
2084
|
e[t.from].width / 2 + e[t.to].width / 2,
|
|
2053
2085
|
l.width + 2 * o.noteMargin
|
|
2054
|
-
),
|
|
2086
|
+
), n.startx = a + (e[t.from].width + o.actorMargin) / 2) : t.placement === c.db.PLACEMENT.LEFTOF ? (n.width = i ? v.getMax(o.width, l.width + 2 * o.noteMargin) : v.getMax(
|
|
2055
2087
|
e[t.from].width / 2 + e[t.to].width / 2,
|
|
2056
2088
|
l.width + 2 * o.noteMargin
|
|
2057
|
-
),
|
|
2058
|
-
i ?
|
|
2089
|
+
), n.startx = a - n.width + (e[t.from].width - o.actorMargin) / 2) : t.to === t.from ? (l = C.calculateTextDimensions(
|
|
2090
|
+
i ? C.wrapLabel(
|
|
2059
2091
|
t.message,
|
|
2060
|
-
|
|
2061
|
-
|
|
2092
|
+
v.getMax(o.width, e[t.from].width),
|
|
2093
|
+
ft(o)
|
|
2062
2094
|
) : t.message,
|
|
2063
|
-
|
|
2064
|
-
),
|
|
2095
|
+
ft(o)
|
|
2096
|
+
), n.width = i ? v.getMax(o.width, e[t.from].width) : v.getMax(
|
|
2065
2097
|
e[t.from].width,
|
|
2066
2098
|
o.width,
|
|
2067
2099
|
l.width + 2 * o.noteMargin
|
|
2068
|
-
),
|
|
2100
|
+
), n.startx = a + (e[t.from].width - n.width) / 2) : (n.width = Math.abs(a + e[t.from].width / 2 - (s + e[t.to].width / 2)) + o.actorMargin, n.startx = a < s ? a + e[t.from].width / 2 - o.actorMargin / 2 : s + e[t.to].width / 2 - o.actorMargin / 2), i && (n.message = C.wrapLabel(
|
|
2069
2101
|
t.message,
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
)),
|
|
2073
|
-
`NM:[${
|
|
2074
|
-
),
|
|
2075
|
-
},
|
|
2102
|
+
n.width - 2 * o.wrapPadding,
|
|
2103
|
+
ft(o)
|
|
2104
|
+
)), K.debug(
|
|
2105
|
+
`NM:[${n.startx},${n.stopx},${n.starty},${n.stopy}:${n.width},${n.height}=${t.message}]`
|
|
2106
|
+
), n;
|
|
2107
|
+
}, R0 = function(t, e, c) {
|
|
2076
2108
|
if (![
|
|
2077
2109
|
c.db.LINETYPE.SOLID_OPEN,
|
|
2078
2110
|
c.db.LINETYPE.DOTTED_OPEN,
|
|
@@ -2084,25 +2116,25 @@ const N0 = function(t, e, c) {
|
|
|
2084
2116
|
c.db.LINETYPE.DOTTED_POINT
|
|
2085
2117
|
].includes(t.type))
|
|
2086
2118
|
return {};
|
|
2087
|
-
const [a, s] =
|
|
2088
|
-
let r =
|
|
2089
|
-
const
|
|
2090
|
-
t.from === t.to ? r =
|
|
2091
|
-
const g = [a, s, i, l],
|
|
2092
|
-
t.wrap && t.message && (t.message =
|
|
2119
|
+
const [a, s] = Qt(t.from, e), [i, l] = Qt(t.to, e), n = a <= i, h = n ? s : a;
|
|
2120
|
+
let r = n ? i : l;
|
|
2121
|
+
const u = Math.abs(i - l) > 2, b = (_) => n ? -_ : _;
|
|
2122
|
+
t.from === t.to ? r = h : (t.activate && !u && (r += b(o.activationWidth / 2 - 1)), [c.db.LINETYPE.SOLID_OPEN, c.db.LINETYPE.DOTTED_OPEN].includes(t.type) || (r += b(3)));
|
|
2123
|
+
const g = [a, s, i, l], y = Math.abs(h - r);
|
|
2124
|
+
t.wrap && t.message && (t.message = C.wrapLabel(
|
|
2093
2125
|
t.message,
|
|
2094
|
-
|
|
2095
|
-
|
|
2126
|
+
v.getMax(y + 2 * o.wrapPadding, o.width),
|
|
2127
|
+
yt(o)
|
|
2096
2128
|
));
|
|
2097
|
-
const w =
|
|
2129
|
+
const w = C.calculateTextDimensions(t.message, yt(o));
|
|
2098
2130
|
return {
|
|
2099
|
-
width:
|
|
2131
|
+
width: v.getMax(
|
|
2100
2132
|
t.wrap ? 0 : w.width + 2 * o.wrapPadding,
|
|
2101
|
-
|
|
2133
|
+
y + 2 * o.wrapPadding,
|
|
2102
2134
|
o.width
|
|
2103
2135
|
),
|
|
2104
2136
|
height: 0,
|
|
2105
|
-
startx:
|
|
2137
|
+
startx: h,
|
|
2106
2138
|
stopx: r,
|
|
2107
2139
|
starty: 0,
|
|
2108
2140
|
stopy: 0,
|
|
@@ -2112,11 +2144,11 @@ const N0 = function(t, e, c) {
|
|
|
2112
2144
|
fromBounds: Math.min.apply(null, g),
|
|
2113
2145
|
toBounds: Math.max.apply(null, g)
|
|
2114
2146
|
};
|
|
2115
|
-
},
|
|
2147
|
+
}, $0 = async function(t, e, c, a) {
|
|
2116
2148
|
const s = {}, i = [];
|
|
2117
|
-
let l,
|
|
2118
|
-
|
|
2119
|
-
switch (r.id =
|
|
2149
|
+
let l, n, h;
|
|
2150
|
+
for (const r of t) {
|
|
2151
|
+
switch (r.id = C.random({ length: 10 }), r.type) {
|
|
2120
2152
|
case a.db.LINETYPE.LOOP_START:
|
|
2121
2153
|
case a.db.LINETYPE.ALT_START:
|
|
2122
2154
|
case a.db.LINETYPE.OPT_START:
|
|
@@ -2147,55 +2179,56 @@ const N0 = function(t, e, c) {
|
|
|
2147
2179
|
break;
|
|
2148
2180
|
case a.db.LINETYPE.ACTIVE_START:
|
|
2149
2181
|
{
|
|
2150
|
-
const
|
|
2182
|
+
const u = e[r.from ? r.from.actor : r.to.actor], b = Nt(r.from ? r.from.actor : r.to.actor).length, g = u.x + u.width / 2 + (b - 1) * o.activationWidth / 2, y = {
|
|
2151
2183
|
startx: g,
|
|
2152
2184
|
stopx: g + o.activationWidth,
|
|
2153
2185
|
actor: r.from.actor,
|
|
2154
2186
|
enabled: !0
|
|
2155
2187
|
};
|
|
2156
|
-
|
|
2188
|
+
x.activations.push(y);
|
|
2157
2189
|
}
|
|
2158
2190
|
break;
|
|
2159
2191
|
case a.db.LINETYPE.ACTIVE_END:
|
|
2160
2192
|
{
|
|
2161
|
-
const
|
|
2162
|
-
delete
|
|
2193
|
+
const u = x.activations.map((b) => b.actor).lastIndexOf(r.from.actor);
|
|
2194
|
+
delete x.activations.splice(u, 1)[0];
|
|
2163
2195
|
}
|
|
2164
2196
|
break;
|
|
2165
2197
|
}
|
|
2166
|
-
r.placement !== void 0 ? (
|
|
2167
|
-
l =
|
|
2168
|
-
})) : (
|
|
2169
|
-
if (l =
|
|
2170
|
-
const
|
|
2171
|
-
l.from =
|
|
2172
|
-
|
|
2173
|
-
|
|
2198
|
+
r.placement !== void 0 ? (n = await D0(r, e, a), r.noteModel = n, i.forEach((u) => {
|
|
2199
|
+
l = u, l.from = v.getMin(l.from, n.startx), l.to = v.getMax(l.to, n.startx + n.width), l.width = v.getMax(l.width, Math.abs(l.from - l.to)) - o.labelBoxWidth;
|
|
2200
|
+
})) : (h = R0(r, e, a), r.msgModel = h, h.startx && h.stopx && i.length > 0 && i.forEach((u) => {
|
|
2201
|
+
if (l = u, h.startx === h.stopx) {
|
|
2202
|
+
const b = e[r.from], g = e[r.to];
|
|
2203
|
+
l.from = v.getMin(
|
|
2204
|
+
b.x - h.width / 2,
|
|
2205
|
+
b.x - b.width / 2,
|
|
2174
2206
|
l.from
|
|
2175
|
-
), l.to =
|
|
2176
|
-
g.x +
|
|
2177
|
-
g.x +
|
|
2207
|
+
), l.to = v.getMax(
|
|
2208
|
+
g.x + h.width / 2,
|
|
2209
|
+
g.x + b.width / 2,
|
|
2178
2210
|
l.to
|
|
2179
|
-
), l.width =
|
|
2211
|
+
), l.width = v.getMax(l.width, Math.abs(l.to - l.from)) - o.labelBoxWidth;
|
|
2180
2212
|
} else
|
|
2181
|
-
l.from =
|
|
2213
|
+
l.from = v.getMin(h.startx, l.from), l.to = v.getMax(h.stopx, l.to), l.width = v.getMax(l.width, h.width) - o.labelBoxWidth;
|
|
2182
2214
|
}));
|
|
2183
|
-
}
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2215
|
+
}
|
|
2216
|
+
return x.activations = [], K.debug("Loop type widths:", s), s;
|
|
2217
|
+
}, C0 = {
|
|
2218
|
+
bounds: x,
|
|
2219
|
+
drawActors: Ft,
|
|
2220
|
+
drawActorsPopup: ue,
|
|
2221
|
+
setConf: xe,
|
|
2222
|
+
draw: N0
|
|
2223
|
+
}, V0 = {
|
|
2224
|
+
parser: De,
|
|
2225
|
+
db: Jt,
|
|
2226
|
+
renderer: C0,
|
|
2227
|
+
styles: o0,
|
|
2195
2228
|
init: ({ wrap: t }) => {
|
|
2196
|
-
|
|
2229
|
+
Jt.setWrap(t);
|
|
2197
2230
|
}
|
|
2198
2231
|
};
|
|
2199
2232
|
export {
|
|
2200
|
-
|
|
2233
|
+
V0 as diagram
|
|
2201
2234
|
};
|