@kong-ui-public/documentation 1.4.17-pr.2640.fb8bab909.0 → 1.4.17
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/_basePickBy-BCsiP0lE-DJBdvZNn.js +151 -0
- package/dist/{_baseUniq-SAfYgIkf-buEvGj9H.js → _baseUniq-CsvgMmt0-CCBG5z_B.js} +165 -165
- package/dist/arc-DYb5Ak6k-js8YHzj6.js +83 -0
- package/dist/architecture-U656AL7Q-LZu-yAfZ-CQD6AyxA.js +5 -0
- package/dist/architectureDiagram-KFL7JDKH-BK_an8l5-D20M_MXF.js +4665 -0
- package/dist/blockDiagram-ZYB65J3Q-C0KtqCEe-pwEm3-ie.js +2265 -0
- package/dist/{c4Diagram-6F5ED5ID-D5yqWyf0-DzlUmurv.js → c4Diagram-AAMF2YG6-DYHWlrmc-C6NWDsTV.js} +4 -4
- package/dist/{channel-bVcNKbrJ-NqcPkfCx.js → channel-3QVQMCTA-BwyrTaJi.js} +1 -1
- package/dist/{chunk-TMUBEWPD-BRIzn5gH-alZ9Sg3f.js → chunk-ANTBXLJU-BhR1MDfy-Bec7kb00.js} +1 -1
- package/dist/{chunk-KFBOBJHC-nixdujtH-CrTZo7r-.js → chunk-FHKO5MBM-z_nuC8Da-Dge2Nbr5.js} +1 -1
- package/dist/chunk-GLLZNHP4-DgwBbAOT-BUrsAxH8.js +19 -0
- package/dist/chunk-JBRWN2VN-CHua2TSC-BYWS19Oz.js +1374 -0
- package/dist/chunk-LXBSTHXV-CoED0jHL-Cc8w4JL1.js +1382 -0
- package/dist/chunk-NRVI72HA-DxsqT4Dt-Bo_vu9qn.js +20 -0
- package/dist/{chunk-ASOPGD6M-B5bA_saK-BiT875Ve.js → chunk-OMD6QJNC-_VI6zVGr-Bb4P7zNG.js} +1 -1
- package/dist/chunk-WVR4S24B-C4HIWky3-CkJ0DHSJ.js +8 -0
- package/dist/classDiagram-3BZAVTQC-DrmNjTt_-CS9fxl_R.js +16 -0
- package/dist/classDiagram-v2-QTMF73CY-DrmNjTt_-CS9fxl_R.js +16 -0
- package/dist/{clone-_5SW34SG-DOuhA6mG.js → clone-C0dvnYv6-BozdSvey.js} +1 -1
- package/dist/cytoscape.esm-CjI2IsL8-DYIumutE.js +18721 -0
- package/dist/{dagre-4EVJKHTY-CcAruc30-B3UMlKNl.js → dagre-2BBEFEWP-Bh_bYuL8-Cej31YXN.js} +53 -53
- package/dist/defaultLocale-D7EN2tov-CK6dgF7Y.js +171 -0
- package/dist/diagram-4IRLE6MV-34TaesxP-XfF-gcP2.js +533 -0
- package/dist/diagram-GUPCWM2R-Cr4-5_uX-B8mxM1Uc.js +143 -0
- package/dist/diagram-RP2FKANI-COpvHjzI-C-_mZxuk.js +221 -0
- package/dist/documentation.es.js +1 -1
- package/dist/documentation.umd.js +860 -399
- package/dist/erDiagram-HZWUO2LU-Cu2MerRS-KziSgDQg.js +840 -0
- package/dist/flowDiagram-THRYKUMA-CfrQTB8C-BYn8LF24.js +1627 -0
- package/dist/ganttDiagram-WV7ZQ7D5-gkieebY_-C7YOriZ4.js +2504 -0
- package/dist/gitGraph-F6HP7TQM-suE5ufvy-CQDQV2yP.js +5 -0
- package/dist/{gitGraphDiagram-NRZ2UAAF-B-t90-9e-BkGPAEnk.js → gitGraphDiagram-OJR772UL-CYA7EIoU-Bqc1qZk4.js} +103 -103
- package/dist/{graph-BYZMvqpu-BXRs5843.js → graph-B_1gOUDz-Dm6REFzZ.js} +2 -2
- package/dist/{index-CMZig9xg.js → index-BDD0CD9m.js} +9834 -9540
- package/dist/info-NVLQJR56-CdsHk-Jf-tf8zb8tD.js +5 -0
- package/dist/infoDiagram-6WOFNB3A-ajp3t5Lm-D80dGo5F.js +24 -0
- package/dist/{journeyDiagram-G5WM74LC-BE7U42Ad-y6YegUqL.js → journeyDiagram-FFXJYRFH-kgCEEPLo-CakI8CyJ.js} +357 -333
- package/dist/{kanban-definition-QRCXZQQD-C-5-UNRm-BOYYKTAB.js → kanban-definition-KOZQBZVT-CmM4CHe6-rjuufCiO.js} +75 -73
- package/dist/{katex-Qk2jHgyB-_qyJ_37x.js → katex-C0Lgw_Sx-CbX2I1cQ.js} +1864 -1814
- package/dist/{layout-BHI4imdk-CESYC-il.js → layout-9vIfpCf3-FfABA43y.js} +81 -81
- package/dist/linear-C-k9vokG-Md9dfBfB.js +259 -0
- package/dist/{mermaid-parser.core-Ce96PX3Q-CV9ue_xr.js → mermaid-parser.core-DHL9WXVx-DeKF3RZx.js} +4080 -3590
- package/dist/{mindmap-definition-GWI6TPTV-C98Syvj2-DUWC1UH5.js → mindmap-definition-LNHGMQRG-BsypuFYj-DSVrvuog.js} +1112 -1100
- package/dist/packet-BFZMPI3H-BcK9kJ-B-BxxCPBGn.js +5 -0
- package/dist/pie-7BOR55EZ-Vt5px0F3-BM7egbMh.js +5 -0
- package/dist/pieDiagram-DBDJKBY4-Bam6gKTi-BOqYeC6c.js +161 -0
- package/dist/{quadrantDiagram-OS5C2QUG-M57vVPSx-BRx-dMGe.js → quadrantDiagram-YPSRARAO-CJwMw09m-CN2OO-Le.js} +2 -2
- package/dist/radar-NHE76QYJ-Br11XWE4-4RP4MPFA.js +5 -0
- package/dist/requirementDiagram-EGVEC5DT-DkRytT0X-C2zigskn.js +850 -0
- package/dist/{sankeyDiagram-Y46BX6SQ-D6EdYPdp-D2Qzxmhx.js → sankeyDiagram-HRAUVNP4-08s1UHMk-2j8idkNs.js} +198 -193
- package/dist/{sequenceDiagram-G6AWOVSC-B171TAb1-KCpoI-Ck.js → sequenceDiagram-WFGC7UMF-6_s7-CN7-D-oTpLFJ.js} +1001 -992
- package/dist/stateDiagram-UUKSUZ4H-eWajY90l-BlM614AN.js +263 -0
- package/dist/stateDiagram-v2-EYPG3UTE-Dh7Ngu1O-YVMiocHE.js +16 -0
- package/dist/style.css +1 -1
- package/dist/timeline-definition-3HZDQTIS-4TPEOhE8-fDDLVlO8.js +799 -0
- package/dist/treemap-KMMF4GRG-nu7WEuPi-C1YG24W8.js +5 -0
- package/dist/{xychartDiagram-6QU3TZC5-CqbTSF5W-CUbJ50KT.js → xychartDiagram-FDP5SA34-BbtKlU7T-D1BI5nWs.js} +459 -423
- package/package.json +4 -4
- package/dist/_basePickBy-zlkqRmFy-D6w9JBLu.js +0 -151
- package/dist/arc-CK9P6CkJ-DVgfRhzX.js +0 -83
- package/dist/architecture-I3QFYML2-DJzmbE4M-C3v7Cpg0.js +0 -5
- package/dist/architectureDiagram-UYN6MBPD-DkZdgpXi-BTThTJ0F.js +0 -4592
- package/dist/blockDiagram-ZHA2E4KO-DnCMGCMN-DBXa-baO.js +0 -2247
- package/dist/chunk-5HRBRIJM-BjQ8go1b-CJmT3AYe.js +0 -24
- package/dist/chunk-7U56Z5CX-awhAxjZ0-Cs_UWlwk.js +0 -1213
- package/dist/chunk-T2TOU4HS-DqOVhIzl-O3PUl7Qp.js +0 -1301
- package/dist/classDiagram-LNE6IOMH-fQzyXfo--DYLd8UQH.js +0 -14
- package/dist/classDiagram-v2-MQ7JQ4JX-fQzyXfo--DYLd8UQH.js +0 -14
- package/dist/cytoscape.esm-DAyNQ0qu-i5PnoWfE.js +0 -16110
- package/dist/diagram-QW4FP2JN-DZT_0aFO-SYzM51ke.js +0 -126
- package/dist/erDiagram-6RL3IURR-BfgUC5jv-BrebVho-.js +0 -937
- package/dist/flowDiagram-7ASYPVHJ-Bo9CnsE7-Ds2vln_y.js +0 -1484
- package/dist/ganttDiagram-NTVNEXSI-8E9hjd6N-fR_cmeDc.js +0 -2491
- package/dist/gitGraph-YCYPL57B-BnErPIwo-DXUTceC1.js +0 -5
- package/dist/info-46DW6VJ7-DPpbx_vA-omPXKuBd.js +0 -5
- package/dist/infoDiagram-A4XQUW5V-Bo9uoOcA-CnlgI27B.js +0 -22
- package/dist/linear-C2PheBya-BHVXLcru.js +0 -423
- package/dist/packet-W2GHVCYJ-BLiQbm7T-BD1xX8XM.js +0 -5
- package/dist/pie-BEWT4RHE-D3Mbo3mT-B4n38n6N.js +0 -5
- package/dist/pieDiagram-YF2LJOPJ-BJV27s9B-DA7hy5wG.js +0 -161
- package/dist/requirementDiagram-MIRIMTAZ-D0KDg7rf-CRMUyo68.js +0 -768
- package/dist/stateDiagram-MAYHULR4-D7FUnT9_-aCApnrI4.js +0 -268
- package/dist/stateDiagram-v2-4JROLMXI-Cyc74STT-D-7hwTRo.js +0 -14
- package/dist/timeline-definition-U7ZMHBDA-Bw-dp1yf-C01CsNUU.js +0 -804
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { d as
|
|
2
|
-
import { e as
|
|
3
|
-
import { _ as
|
|
4
|
-
var
|
|
5
|
-
var t = /* @__PURE__ */
|
|
6
|
-
for (
|
|
7
|
-
return
|
|
8
|
-
}, "o"), e = [1, 2], n = [1, 3], a = [1, 4], s = [2, 4], r = [1, 9], c = [1, 11], h = [1, 13],
|
|
9
|
-
trace: /* @__PURE__ */
|
|
1
|
+
import { d as xe, p as $t, y as vt, x as ye, m as me, h as Te } from "./chunk-OMD6QJNC-_VI6zVGr-Bb4P7zNG.js";
|
|
2
|
+
import { e as fe } from "./chunk-FHKO5MBM-z_nuC8Da-Dge2Nbr5.js";
|
|
3
|
+
import { _ as g, aj as be, g as Q, a9 as It, l as j, ae as Gt, aa as Ee, ab as we, ag as L, a8 as Ut, a5 as Ie, an as Le, a7 as Pe, a6 as ve, ao as _e, at as ke, ad as Lt, am as $, be as Tt, bf as ct, aW as Jt, bg as Ae, bh as Ne, bi as Zt, aB as Dt } from "./index-BDD0CD9m.js";
|
|
4
|
+
var Rt = function() {
|
|
5
|
+
var t = /* @__PURE__ */ g(function(ot, E, P, b) {
|
|
6
|
+
for (P = P || {}, b = ot.length; b--; P[ot[b]] = E) ;
|
|
7
|
+
return P;
|
|
8
|
+
}, "o"), e = [1, 2], n = [1, 3], a = [1, 4], s = [2, 4], r = [1, 9], c = [1, 11], h = [1, 13], p = [1, 14], i = [1, 16], x = [1, 17], m = [1, 18], u = [1, 24], T = [1, 25], w = [1, 26], I = [1, 27], _ = [1, 28], R = [1, 29], M = [1, 30], C = [1, 31], S = [1, 32], V = [1, 33], F = [1, 34], X = [1, 35], tt = [1, 36], W = [1, 37], q = [1, 38], Y = [1, 39], O = [1, 41], G = [1, 42], z = [1, 43], J = [1, 44], et = [1, 45], N = [1, 46], f = [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], v = [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], st = [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], k = [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], Ft = [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], it = [68, 69, 70], dt = [1, 122], kt = {
|
|
9
|
+
trace: /* @__PURE__ */ g(function() {
|
|
10
10
|
}, "trace"),
|
|
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, BIDIRECTIONAL_SOLID_ARROW: 74, DOTTED_ARROW: 75, BIDIRECTIONAL_DOTTED_ARROW: 76, SOLID_CROSS: 77, DOTTED_CROSS: 78, SOLID_POINT: 79, DOTTED_POINT: 80, TXT: 81, $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: "BIDIRECTIONAL_SOLID_ARROW", 75: "DOTTED_ARROW", 76: "BIDIRECTIONAL_DOTTED_ARROW", 77: "SOLID_CROSS", 78: "DOTTED_CROSS", 79: "SOLID_POINT", 80: "DOTTED_POINT", 81: "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], [67, 1], [67, 1], [56, 1]],
|
|
15
|
-
performAction: /* @__PURE__ */
|
|
16
|
-
var
|
|
17
|
-
switch (
|
|
15
|
+
performAction: /* @__PURE__ */ g(function(ot, E, P, b, A, d, H) {
|
|
16
|
+
var l = d.length - 1;
|
|
17
|
+
switch (A) {
|
|
18
18
|
case 3:
|
|
19
|
-
return b.apply(d[
|
|
19
|
+
return b.apply(d[l]), d[l];
|
|
20
20
|
case 4:
|
|
21
21
|
case 9:
|
|
22
22
|
this.$ = [];
|
|
23
23
|
break;
|
|
24
24
|
case 5:
|
|
25
25
|
case 10:
|
|
26
|
-
d[
|
|
26
|
+
d[l - 1].push(d[l]), this.$ = d[l - 1];
|
|
27
27
|
break;
|
|
28
28
|
case 6:
|
|
29
29
|
case 7:
|
|
30
30
|
case 11:
|
|
31
31
|
case 12:
|
|
32
|
-
this.$ = d[
|
|
32
|
+
this.$ = d[l];
|
|
33
33
|
break;
|
|
34
34
|
case 8:
|
|
35
35
|
case 13:
|
|
36
36
|
this.$ = [];
|
|
37
37
|
break;
|
|
38
38
|
case 15:
|
|
39
|
-
d[
|
|
39
|
+
d[l].type = "createParticipant", this.$ = d[l];
|
|
40
40
|
break;
|
|
41
41
|
case 16:
|
|
42
|
-
d[
|
|
42
|
+
d[l - 1].unshift({ type: "boxStart", boxData: b.parseBoxData(d[l - 2]) }), d[l - 1].push({ type: "boxEnd", boxText: d[l - 2] }), this.$ = d[l - 1];
|
|
43
43
|
break;
|
|
44
44
|
case 18:
|
|
45
|
-
this.$ = { type: "sequenceIndex", sequenceIndex: Number(d[
|
|
45
|
+
this.$ = { type: "sequenceIndex", sequenceIndex: Number(d[l - 2]), sequenceIndexStep: Number(d[l - 1]), sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
|
|
46
46
|
break;
|
|
47
47
|
case 19:
|
|
48
|
-
this.$ = { type: "sequenceIndex", sequenceIndex: Number(d[
|
|
48
|
+
this.$ = { type: "sequenceIndex", sequenceIndex: Number(d[l - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
|
|
49
49
|
break;
|
|
50
50
|
case 20:
|
|
51
51
|
this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: b.LINETYPE.AUTONUMBER };
|
|
@@ -54,95 +54,95 @@ var Vt = function() {
|
|
|
54
54
|
this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
|
|
55
55
|
break;
|
|
56
56
|
case 22:
|
|
57
|
-
this.$ = { type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: d[
|
|
57
|
+
this.$ = { type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: d[l - 1].actor };
|
|
58
58
|
break;
|
|
59
59
|
case 23:
|
|
60
|
-
this.$ = { type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: d[
|
|
60
|
+
this.$ = { type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: d[l - 1].actor };
|
|
61
61
|
break;
|
|
62
62
|
case 29:
|
|
63
|
-
b.setDiagramTitle(d[
|
|
63
|
+
b.setDiagramTitle(d[l].substring(6)), this.$ = d[l].substring(6);
|
|
64
64
|
break;
|
|
65
65
|
case 30:
|
|
66
|
-
b.setDiagramTitle(d[
|
|
66
|
+
b.setDiagramTitle(d[l].substring(7)), this.$ = d[l].substring(7);
|
|
67
67
|
break;
|
|
68
68
|
case 31:
|
|
69
|
-
this.$ = d[
|
|
69
|
+
this.$ = d[l].trim(), b.setAccTitle(this.$);
|
|
70
70
|
break;
|
|
71
71
|
case 32:
|
|
72
72
|
case 33:
|
|
73
|
-
this.$ = d[
|
|
73
|
+
this.$ = d[l].trim(), b.setAccDescription(this.$);
|
|
74
74
|
break;
|
|
75
75
|
case 34:
|
|
76
|
-
d[
|
|
76
|
+
d[l - 1].unshift({ type: "loopStart", loopText: b.parseMessage(d[l - 2]), signalType: b.LINETYPE.LOOP_START }), d[l - 1].push({ type: "loopEnd", loopText: d[l - 2], signalType: b.LINETYPE.LOOP_END }), this.$ = d[l - 1];
|
|
77
77
|
break;
|
|
78
78
|
case 35:
|
|
79
|
-
d[
|
|
79
|
+
d[l - 1].unshift({ type: "rectStart", color: b.parseMessage(d[l - 2]), signalType: b.LINETYPE.RECT_START }), d[l - 1].push({ type: "rectEnd", color: b.parseMessage(d[l - 2]), signalType: b.LINETYPE.RECT_END }), this.$ = d[l - 1];
|
|
80
80
|
break;
|
|
81
81
|
case 36:
|
|
82
|
-
d[
|
|
82
|
+
d[l - 1].unshift({ type: "optStart", optText: b.parseMessage(d[l - 2]), signalType: b.LINETYPE.OPT_START }), d[l - 1].push({ type: "optEnd", optText: b.parseMessage(d[l - 2]), signalType: b.LINETYPE.OPT_END }), this.$ = d[l - 1];
|
|
83
83
|
break;
|
|
84
84
|
case 37:
|
|
85
|
-
d[
|
|
85
|
+
d[l - 1].unshift({ type: "altStart", altText: b.parseMessage(d[l - 2]), signalType: b.LINETYPE.ALT_START }), d[l - 1].push({ type: "altEnd", signalType: b.LINETYPE.ALT_END }), this.$ = d[l - 1];
|
|
86
86
|
break;
|
|
87
87
|
case 38:
|
|
88
|
-
d[
|
|
88
|
+
d[l - 1].unshift({ type: "parStart", parText: b.parseMessage(d[l - 2]), signalType: b.LINETYPE.PAR_START }), d[l - 1].push({ type: "parEnd", signalType: b.LINETYPE.PAR_END }), this.$ = d[l - 1];
|
|
89
89
|
break;
|
|
90
90
|
case 39:
|
|
91
|
-
d[
|
|
91
|
+
d[l - 1].unshift({ type: "parStart", parText: b.parseMessage(d[l - 2]), signalType: b.LINETYPE.PAR_OVER_START }), d[l - 1].push({ type: "parEnd", signalType: b.LINETYPE.PAR_END }), this.$ = d[l - 1];
|
|
92
92
|
break;
|
|
93
93
|
case 40:
|
|
94
|
-
d[
|
|
94
|
+
d[l - 1].unshift({ type: "criticalStart", criticalText: b.parseMessage(d[l - 2]), signalType: b.LINETYPE.CRITICAL_START }), d[l - 1].push({ type: "criticalEnd", signalType: b.LINETYPE.CRITICAL_END }), this.$ = d[l - 1];
|
|
95
95
|
break;
|
|
96
96
|
case 41:
|
|
97
|
-
d[
|
|
97
|
+
d[l - 1].unshift({ type: "breakStart", breakText: b.parseMessage(d[l - 2]), signalType: b.LINETYPE.BREAK_START }), d[l - 1].push({ type: "breakEnd", optText: b.parseMessage(d[l - 2]), signalType: b.LINETYPE.BREAK_END }), this.$ = d[l - 1];
|
|
98
98
|
break;
|
|
99
99
|
case 43:
|
|
100
|
-
this.$ = d[
|
|
100
|
+
this.$ = d[l - 3].concat([{ type: "option", optionText: b.parseMessage(d[l - 1]), signalType: b.LINETYPE.CRITICAL_OPTION }, d[l]]);
|
|
101
101
|
break;
|
|
102
102
|
case 45:
|
|
103
|
-
this.$ = d[
|
|
103
|
+
this.$ = d[l - 3].concat([{ type: "and", parText: b.parseMessage(d[l - 1]), signalType: b.LINETYPE.PAR_AND }, d[l]]);
|
|
104
104
|
break;
|
|
105
105
|
case 47:
|
|
106
|
-
this.$ = d[
|
|
106
|
+
this.$ = d[l - 3].concat([{ type: "else", altText: b.parseMessage(d[l - 1]), signalType: b.LINETYPE.ALT_ELSE }, d[l]]);
|
|
107
107
|
break;
|
|
108
108
|
case 48:
|
|
109
|
-
d[
|
|
109
|
+
d[l - 3].draw = "participant", d[l - 3].type = "addParticipant", d[l - 3].description = b.parseMessage(d[l - 1]), this.$ = d[l - 3];
|
|
110
110
|
break;
|
|
111
111
|
case 49:
|
|
112
|
-
d[
|
|
112
|
+
d[l - 1].draw = "participant", d[l - 1].type = "addParticipant", this.$ = d[l - 1];
|
|
113
113
|
break;
|
|
114
114
|
case 50:
|
|
115
|
-
d[
|
|
115
|
+
d[l - 3].draw = "actor", d[l - 3].type = "addParticipant", d[l - 3].description = b.parseMessage(d[l - 1]), this.$ = d[l - 3];
|
|
116
116
|
break;
|
|
117
117
|
case 51:
|
|
118
|
-
d[
|
|
118
|
+
d[l - 1].draw = "actor", d[l - 1].type = "addParticipant", this.$ = d[l - 1];
|
|
119
119
|
break;
|
|
120
120
|
case 52:
|
|
121
|
-
d[
|
|
121
|
+
d[l - 1].type = "destroyParticipant", this.$ = d[l - 1];
|
|
122
122
|
break;
|
|
123
123
|
case 53:
|
|
124
|
-
this.$ = [d[
|
|
124
|
+
this.$ = [d[l - 1], { type: "addNote", placement: d[l - 2], actor: d[l - 1].actor, text: d[l] }];
|
|
125
125
|
break;
|
|
126
126
|
case 54:
|
|
127
|
-
d[
|
|
127
|
+
d[l - 2] = [].concat(d[l - 1], d[l - 1]).slice(0, 2), d[l - 2][0] = d[l - 2][0].actor, d[l - 2][1] = d[l - 2][1].actor, this.$ = [d[l - 1], { type: "addNote", placement: b.PLACEMENT.OVER, actor: d[l - 2].slice(0, 2), text: d[l] }];
|
|
128
128
|
break;
|
|
129
129
|
case 55:
|
|
130
|
-
this.$ = [d[
|
|
130
|
+
this.$ = [d[l - 1], { type: "addLinks", actor: d[l - 1].actor, text: d[l] }];
|
|
131
131
|
break;
|
|
132
132
|
case 56:
|
|
133
|
-
this.$ = [d[
|
|
133
|
+
this.$ = [d[l - 1], { type: "addALink", actor: d[l - 1].actor, text: d[l] }];
|
|
134
134
|
break;
|
|
135
135
|
case 57:
|
|
136
|
-
this.$ = [d[
|
|
136
|
+
this.$ = [d[l - 1], { type: "addProperties", actor: d[l - 1].actor, text: d[l] }];
|
|
137
137
|
break;
|
|
138
138
|
case 58:
|
|
139
|
-
this.$ = [d[
|
|
139
|
+
this.$ = [d[l - 1], { type: "addDetails", actor: d[l - 1].actor, text: d[l] }];
|
|
140
140
|
break;
|
|
141
141
|
case 61:
|
|
142
|
-
this.$ = [d[
|
|
142
|
+
this.$ = [d[l - 2], d[l]];
|
|
143
143
|
break;
|
|
144
144
|
case 62:
|
|
145
|
-
this.$ = d[
|
|
145
|
+
this.$ = d[l];
|
|
146
146
|
break;
|
|
147
147
|
case 63:
|
|
148
148
|
this.$ = b.PLACEMENT.LEFTOF;
|
|
@@ -152,25 +152,25 @@ var Vt = function() {
|
|
|
152
152
|
break;
|
|
153
153
|
case 65:
|
|
154
154
|
this.$ = [
|
|
155
|
-
d[
|
|
156
|
-
d[
|
|
157
|
-
{ type: "addMessage", from: d[
|
|
158
|
-
{ type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: d[
|
|
155
|
+
d[l - 4],
|
|
156
|
+
d[l - 1],
|
|
157
|
+
{ type: "addMessage", from: d[l - 4].actor, to: d[l - 1].actor, signalType: d[l - 3], msg: d[l], activate: !0 },
|
|
158
|
+
{ type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: d[l - 1].actor }
|
|
159
159
|
];
|
|
160
160
|
break;
|
|
161
161
|
case 66:
|
|
162
162
|
this.$ = [
|
|
163
|
-
d[
|
|
164
|
-
d[
|
|
165
|
-
{ type: "addMessage", from: d[
|
|
166
|
-
{ type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: d[
|
|
163
|
+
d[l - 4],
|
|
164
|
+
d[l - 1],
|
|
165
|
+
{ type: "addMessage", from: d[l - 4].actor, to: d[l - 1].actor, signalType: d[l - 3], msg: d[l] },
|
|
166
|
+
{ type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: d[l - 4].actor }
|
|
167
167
|
];
|
|
168
168
|
break;
|
|
169
169
|
case 67:
|
|
170
|
-
this.$ = [d[
|
|
170
|
+
this.$ = [d[l - 3], d[l - 1], { type: "addMessage", from: d[l - 3].actor, to: d[l - 1].actor, signalType: d[l - 2], msg: d[l] }];
|
|
171
171
|
break;
|
|
172
172
|
case 68:
|
|
173
|
-
this.$ = { type: "addParticipant", actor: d[
|
|
173
|
+
this.$ = { type: "addParticipant", actor: d[l] };
|
|
174
174
|
break;
|
|
175
175
|
case 69:
|
|
176
176
|
this.$ = b.LINETYPE.SOLID_OPEN;
|
|
@@ -203,80 +203,80 @@ var Vt = function() {
|
|
|
203
203
|
this.$ = b.LINETYPE.DOTTED_POINT;
|
|
204
204
|
break;
|
|
205
205
|
case 79:
|
|
206
|
-
this.$ = b.parseMessage(d[
|
|
206
|
+
this.$ = b.parseMessage(d[l].trim().substring(1));
|
|
207
207
|
break;
|
|
208
208
|
}
|
|
209
209
|
}, "anonymous"),
|
|
210
|
-
table: [{ 3: 1, 4: e, 5: n, 6: a }, { 1: [3] }, { 3: 5, 4: e, 5: n, 6: a }, { 3: 6, 4: e, 5: n, 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: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14:
|
|
210
|
+
table: [{ 3: 1, 4: e, 5: n, 6: a }, { 1: [3] }, { 3: 5, 4: e, 5: n, 6: a }, { 3: 6, 4: e, 5: n, 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: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: p, 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: I, 35: _, 36: R, 37: M, 38: C, 39: S, 41: V, 43: F, 44: X, 46: tt, 50: W, 52: q, 53: Y, 54: O, 59: G, 60: z, 61: J, 62: et, 70: N }, t(f, [2, 5]), { 9: 47, 12: 12, 13: h, 14: p, 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: I, 35: _, 36: R, 37: M, 38: C, 39: S, 41: V, 43: F, 44: X, 46: tt, 50: W, 52: q, 53: Y, 54: O, 59: G, 60: z, 61: J, 62: et, 70: N }, t(f, [2, 7]), t(f, [2, 8]), t(f, [2, 14]), { 12: 48, 50: W, 52: q, 53: Y }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: N }, { 22: 55, 70: N }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, t(f, [2, 29]), t(f, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, t(f, [2, 33]), { 15: [1, 63] }, { 15: [1, 64] }, { 15: [1, 65] }, { 15: [1, 66] }, { 15: [1, 67] }, { 15: [1, 68] }, { 15: [1, 69] }, { 15: [1, 70] }, { 22: 71, 70: N }, { 22: 72, 70: N }, { 22: 73, 70: N }, { 67: 74, 71: [1, 75], 72: [1, 76], 73: [1, 77], 74: [1, 78], 75: [1, 79], 76: [1, 80], 77: [1, 81], 78: [1, 82], 79: [1, 83], 80: [1, 84] }, { 55: 85, 57: [1, 86], 65: [1, 87], 66: [1, 88] }, { 22: 89, 70: N }, { 22: 90, 70: N }, { 22: 91, 70: N }, { 22: 92, 70: N }, t([5, 51, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81], [2, 68]), t(f, [2, 6]), t(f, [2, 15]), t(v, [2, 9], { 10: 93 }), t(f, [2, 17]), { 5: [1, 95], 19: [1, 94] }, { 5: [1, 96] }, t(f, [2, 21]), { 5: [1, 97] }, { 5: [1, 98] }, t(f, [2, 24]), t(f, [2, 25]), t(f, [2, 26]), t(f, [2, 27]), t(f, [2, 28]), t(f, [2, 31]), t(f, [2, 32]), t(Z, s, { 7: 99 }), t(Z, s, { 7: 100 }), t(Z, s, { 7: 101 }), t(st, s, { 40: 102, 7: 103 }), t(k, s, { 42: 104, 7: 105 }), t(k, s, { 7: 105, 42: 106 }), t(Ft, s, { 45: 107, 7: 108 }), t(Z, s, { 7: 109 }), { 5: [1, 111], 51: [1, 110] }, { 5: [1, 113], 51: [1, 112] }, { 5: [1, 114] }, { 22: 117, 68: [1, 115], 69: [1, 116], 70: N }, t(it, [2, 69]), t(it, [2, 70]), t(it, [2, 71]), t(it, [2, 72]), t(it, [2, 73]), t(it, [2, 74]), t(it, [2, 75]), t(it, [2, 76]), t(it, [2, 77]), t(it, [2, 78]), { 22: 118, 70: N }, { 22: 120, 58: 119, 70: N }, { 70: [2, 63] }, { 70: [2, 64] }, { 56: 121, 81: dt }, { 56: 123, 81: dt }, { 56: 124, 81: dt }, { 56: 125, 81: dt }, { 4: [1, 128], 5: [1, 130], 11: 127, 12: 129, 16: [1, 126], 50: W, 52: q, 53: Y }, { 5: [1, 131] }, t(f, [2, 19]), t(f, [2, 20]), t(f, [2, 22]), t(f, [2, 23]), { 4: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: p, 16: [1, 132], 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: I, 35: _, 36: R, 37: M, 38: C, 39: S, 41: V, 43: F, 44: X, 46: tt, 50: W, 52: q, 53: Y, 54: O, 59: G, 60: z, 61: J, 62: et, 70: N }, { 4: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: p, 16: [1, 133], 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: I, 35: _, 36: R, 37: M, 38: C, 39: S, 41: V, 43: F, 44: X, 46: tt, 50: W, 52: q, 53: Y, 54: O, 59: G, 60: z, 61: J, 62: et, 70: N }, { 4: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: p, 16: [1, 134], 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: I, 35: _, 36: R, 37: M, 38: C, 39: S, 41: V, 43: F, 44: X, 46: tt, 50: W, 52: q, 53: Y, 54: O, 59: G, 60: z, 61: J, 62: et, 70: N }, { 16: [1, 135] }, { 4: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: p, 16: [2, 46], 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: I, 35: _, 36: R, 37: M, 38: C, 39: S, 41: V, 43: F, 44: X, 46: tt, 49: [1, 136], 50: W, 52: q, 53: Y, 54: O, 59: G, 60: z, 61: J, 62: et, 70: N }, { 16: [1, 137] }, { 4: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: p, 16: [2, 44], 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: I, 35: _, 36: R, 37: M, 38: C, 39: S, 41: V, 43: F, 44: X, 46: tt, 48: [1, 138], 50: W, 52: q, 53: Y, 54: O, 59: G, 60: z, 61: J, 62: et, 70: N }, { 16: [1, 139] }, { 16: [1, 140] }, { 4: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: p, 16: [2, 42], 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: I, 35: _, 36: R, 37: M, 38: C, 39: S, 41: V, 43: F, 44: X, 46: tt, 47: [1, 141], 50: W, 52: q, 53: Y, 54: O, 59: G, 60: z, 61: J, 62: et, 70: N }, { 4: r, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: p, 16: [1, 142], 17: 15, 18: i, 21: x, 22: 40, 23: m, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: T, 31: w, 33: I, 35: _, 36: R, 37: M, 38: C, 39: S, 41: V, 43: F, 44: X, 46: tt, 50: W, 52: q, 53: Y, 54: O, 59: G, 60: z, 61: J, 62: et, 70: N }, { 15: [1, 143] }, t(f, [2, 49]), { 15: [1, 144] }, t(f, [2, 51]), t(f, [2, 52]), { 22: 145, 70: N }, { 22: 146, 70: N }, { 56: 147, 81: dt }, { 56: 148, 81: dt }, { 56: 149, 81: dt }, { 64: [1, 150], 81: [2, 62] }, { 5: [2, 55] }, { 5: [2, 79] }, { 5: [2, 56] }, { 5: [2, 57] }, { 5: [2, 58] }, t(f, [2, 16]), t(v, [2, 10]), { 12: 151, 50: W, 52: q, 53: Y }, t(v, [2, 12]), t(v, [2, 13]), t(f, [2, 18]), t(f, [2, 34]), t(f, [2, 35]), t(f, [2, 36]), t(f, [2, 37]), { 15: [1, 152] }, t(f, [2, 38]), { 15: [1, 153] }, t(f, [2, 39]), t(f, [2, 40]), { 15: [1, 154] }, t(f, [2, 41]), { 5: [1, 155] }, { 5: [1, 156] }, { 56: 157, 81: dt }, { 56: 158, 81: dt }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 159, 70: N }, t(v, [2, 11]), t(st, s, { 7: 103, 40: 160 }), t(k, s, { 7: 105, 42: 161 }), t(Ft, s, { 7: 108, 45: 162 }), t(f, [2, 48]), t(f, [2, 50]), { 5: [2, 65] }, { 5: [2, 66] }, { 81: [2, 61] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }],
|
|
211
211
|
defaultActions: { 5: [2, 1], 6: [2, 2], 87: [2, 63], 88: [2, 64], 121: [2, 55], 122: [2, 79], 123: [2, 56], 124: [2, 57], 125: [2, 58], 147: [2, 67], 148: [2, 53], 149: [2, 54], 157: [2, 65], 158: [2, 66], 159: [2, 61], 160: [2, 47], 161: [2, 45], 162: [2, 43] },
|
|
212
|
-
parseError: /* @__PURE__ */
|
|
212
|
+
parseError: /* @__PURE__ */ g(function(ot, E) {
|
|
213
213
|
if (E.recoverable)
|
|
214
|
-
this.trace(
|
|
214
|
+
this.trace(ot);
|
|
215
215
|
else {
|
|
216
|
-
var
|
|
217
|
-
throw
|
|
216
|
+
var P = new Error(ot);
|
|
217
|
+
throw P.hash = E, P;
|
|
218
218
|
}
|
|
219
219
|
}, "parseError"),
|
|
220
|
-
parse: /* @__PURE__ */
|
|
221
|
-
var E = this,
|
|
222
|
-
for (var
|
|
223
|
-
Object.prototype.hasOwnProperty.call(this.yy,
|
|
224
|
-
|
|
225
|
-
var
|
|
226
|
-
d.push(
|
|
227
|
-
var
|
|
228
|
-
typeof
|
|
229
|
-
function
|
|
230
|
-
|
|
220
|
+
parse: /* @__PURE__ */ g(function(ot) {
|
|
221
|
+
var E = this, P = [0], b = [], A = [null], d = [], H = this.table, l = "", bt = 0, Wt = 0, le = 2, qt = 1, pe = d.slice.call(arguments, 1), B = Object.create(this.lexer), lt = { yy: {} };
|
|
222
|
+
for (var At in this.yy)
|
|
223
|
+
Object.prototype.hasOwnProperty.call(this.yy, At) && (lt.yy[At] = this.yy[At]);
|
|
224
|
+
B.setInput(ot, lt.yy), lt.yy.lexer = B, lt.yy.parser = this, typeof B.yylloc > "u" && (B.yylloc = {});
|
|
225
|
+
var Nt = B.yylloc;
|
|
226
|
+
d.push(Nt);
|
|
227
|
+
var ge = B.options && B.options.ranges;
|
|
228
|
+
typeof lt.yy.parseError == "function" ? this.parseError = lt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
229
|
+
function ue(K) {
|
|
230
|
+
P.length = P.length - 2 * K, A.length = A.length - K, d.length = d.length - K;
|
|
231
231
|
}
|
|
232
|
-
|
|
233
|
-
function
|
|
234
|
-
var
|
|
235
|
-
return
|
|
232
|
+
g(ue, "popStack");
|
|
233
|
+
function zt() {
|
|
234
|
+
var K;
|
|
235
|
+
return K = b.pop() || B.lex() || qt, typeof K != "number" && (K instanceof Array && (b = K, K = b.pop()), K = E.symbols_[K] || K), K;
|
|
236
236
|
}
|
|
237
|
-
|
|
238
|
-
for (var
|
|
239
|
-
if (
|
|
240
|
-
var
|
|
241
|
-
|
|
242
|
-
for (
|
|
243
|
-
this.terminals_[
|
|
244
|
-
|
|
245
|
-
` +
|
|
246
|
-
Expecting ` +
|
|
247
|
-
text:
|
|
248
|
-
token: this.terminals_[
|
|
249
|
-
line:
|
|
250
|
-
loc:
|
|
251
|
-
expected:
|
|
237
|
+
g(zt, "lex");
|
|
238
|
+
for (var U, pt, at, Mt, xt = {}, Et, ht, Ht, wt; ; ) {
|
|
239
|
+
if (pt = P[P.length - 1], this.defaultActions[pt] ? at = this.defaultActions[pt] : ((U === null || typeof U > "u") && (U = zt()), at = H[pt] && H[pt][U]), typeof at > "u" || !at.length || !at[0]) {
|
|
240
|
+
var Ot = "";
|
|
241
|
+
wt = [];
|
|
242
|
+
for (Et in H[pt])
|
|
243
|
+
this.terminals_[Et] && Et > le && wt.push("'" + this.terminals_[Et] + "'");
|
|
244
|
+
B.showPosition ? Ot = "Parse error on line " + (bt + 1) + `:
|
|
245
|
+
` + B.showPosition() + `
|
|
246
|
+
Expecting ` + wt.join(", ") + ", got '" + (this.terminals_[U] || U) + "'" : Ot = "Parse error on line " + (bt + 1) + ": Unexpected " + (U == qt ? "end of input" : "'" + (this.terminals_[U] || U) + "'"), this.parseError(Ot, {
|
|
247
|
+
text: B.match,
|
|
248
|
+
token: this.terminals_[U] || U,
|
|
249
|
+
line: B.yylineno,
|
|
250
|
+
loc: Nt,
|
|
251
|
+
expected: wt
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
|
-
if (
|
|
255
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
256
|
-
switch (
|
|
254
|
+
if (at[0] instanceof Array && at.length > 1)
|
|
255
|
+
throw new Error("Parse Error: multiple actions possible at state: " + pt + ", token: " + U);
|
|
256
|
+
switch (at[0]) {
|
|
257
257
|
case 1:
|
|
258
|
-
|
|
258
|
+
P.push(U), A.push(B.yytext), d.push(B.yylloc), P.push(at[1]), U = null, Wt = B.yyleng, l = B.yytext, bt = B.yylineno, Nt = B.yylloc;
|
|
259
259
|
break;
|
|
260
260
|
case 2:
|
|
261
|
-
if (
|
|
262
|
-
first_line: d[d.length - (
|
|
261
|
+
if (ht = this.productions_[at[1]][1], xt.$ = A[A.length - ht], xt._$ = {
|
|
262
|
+
first_line: d[d.length - (ht || 1)].first_line,
|
|
263
263
|
last_line: d[d.length - 1].last_line,
|
|
264
|
-
first_column: d[d.length - (
|
|
264
|
+
first_column: d[d.length - (ht || 1)].first_column,
|
|
265
265
|
last_column: d[d.length - 1].last_column
|
|
266
|
-
},
|
|
267
|
-
d[d.length - (
|
|
266
|
+
}, ge && (xt._$.range = [
|
|
267
|
+
d[d.length - (ht || 1)].range[0],
|
|
268
268
|
d[d.length - 1].range[1]
|
|
269
|
-
]),
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
269
|
+
]), Mt = this.performAction.apply(xt, [
|
|
270
|
+
l,
|
|
271
|
+
Wt,
|
|
272
|
+
bt,
|
|
273
|
+
lt.yy,
|
|
274
|
+
at[1],
|
|
275
|
+
A,
|
|
276
276
|
d
|
|
277
|
-
].concat(
|
|
278
|
-
return
|
|
279
|
-
|
|
277
|
+
].concat(pe)), typeof Mt < "u")
|
|
278
|
+
return Mt;
|
|
279
|
+
ht && (P = P.slice(0, -1 * ht * 2), A = A.slice(0, -1 * ht), d = d.slice(0, -1 * ht)), P.push(this.productions_[at[1]][0]), A.push(xt.$), d.push(xt._$), Ht = H[P[P.length - 2]][P[P.length - 1]], P.push(Ht);
|
|
280
280
|
break;
|
|
281
281
|
case 3:
|
|
282
282
|
return !0;
|
|
@@ -284,18 +284,18 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[K] || K) + "'" : $t =
|
|
|
284
284
|
}
|
|
285
285
|
return !0;
|
|
286
286
|
}, "parse")
|
|
287
|
-
},
|
|
288
|
-
var
|
|
287
|
+
}, he = /* @__PURE__ */ function() {
|
|
288
|
+
var ot = {
|
|
289
289
|
EOF: 1,
|
|
290
|
-
parseError: /* @__PURE__ */
|
|
290
|
+
parseError: /* @__PURE__ */ g(function(E, P) {
|
|
291
291
|
if (this.yy.parser)
|
|
292
|
-
this.yy.parser.parseError(E,
|
|
292
|
+
this.yy.parser.parseError(E, P);
|
|
293
293
|
else
|
|
294
294
|
throw new Error(E);
|
|
295
295
|
}, "parseError"),
|
|
296
296
|
// resets the lexer, sets new input
|
|
297
|
-
setInput: /* @__PURE__ */
|
|
298
|
-
return this.yy =
|
|
297
|
+
setInput: /* @__PURE__ */ g(function(E, P) {
|
|
298
|
+
return this.yy = P || this.yy || {}, this._input = E, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
299
299
|
first_line: 1,
|
|
300
300
|
first_column: 0,
|
|
301
301
|
last_line: 1,
|
|
@@ -303,32 +303,32 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[K] || K) + "'" : $t =
|
|
|
303
303
|
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
304
304
|
}, "setInput"),
|
|
305
305
|
// consumes and returns one char from the input
|
|
306
|
-
input: /* @__PURE__ */
|
|
306
|
+
input: /* @__PURE__ */ g(function() {
|
|
307
307
|
var E = this._input[0];
|
|
308
308
|
this.yytext += E, this.yyleng++, this.offset++, this.match += E, this.matched += E;
|
|
309
|
-
var
|
|
310
|
-
return
|
|
309
|
+
var P = E.match(/(?:\r\n?|\n).*/g);
|
|
310
|
+
return P ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), E;
|
|
311
311
|
}, "input"),
|
|
312
312
|
// unshifts one char (or a string) into the input
|
|
313
|
-
unput: /* @__PURE__ */
|
|
314
|
-
var
|
|
315
|
-
this._input = E + this._input, this.yytext = this.yytext.substr(0, this.yytext.length -
|
|
316
|
-
var
|
|
313
|
+
unput: /* @__PURE__ */ g(function(E) {
|
|
314
|
+
var P = E.length, b = E.split(/(?:\r\n?|\n)/g);
|
|
315
|
+
this._input = E + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - P), this.offset -= P;
|
|
316
|
+
var A = this.match.split(/(?:\r\n?|\n)/g);
|
|
317
317
|
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), b.length - 1 && (this.yylineno -= b.length - 1);
|
|
318
318
|
var d = this.yylloc.range;
|
|
319
319
|
return this.yylloc = {
|
|
320
320
|
first_line: this.yylloc.first_line,
|
|
321
321
|
last_line: this.yylineno + 1,
|
|
322
322
|
first_column: this.yylloc.first_column,
|
|
323
|
-
last_column: b ? (b.length ===
|
|
324
|
-
}, this.options.ranges && (this.yylloc.range = [d[0], d[0] + this.yyleng -
|
|
323
|
+
last_column: b ? (b.length === A.length ? this.yylloc.first_column : 0) + A[A.length - b.length].length - b[0].length : this.yylloc.first_column - P
|
|
324
|
+
}, this.options.ranges && (this.yylloc.range = [d[0], d[0] + this.yyleng - P]), this.yyleng = this.yytext.length, this;
|
|
325
325
|
}, "unput"),
|
|
326
326
|
// When called from action, caches matched text and appends it on next action
|
|
327
|
-
more: /* @__PURE__ */
|
|
327
|
+
more: /* @__PURE__ */ g(function() {
|
|
328
328
|
return this._more = !0, this;
|
|
329
329
|
}, "more"),
|
|
330
330
|
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
331
|
-
reject: /* @__PURE__ */
|
|
331
|
+
reject: /* @__PURE__ */ g(function() {
|
|
332
332
|
if (this.options.backtrack_lexer)
|
|
333
333
|
this._backtrack = !0;
|
|
334
334
|
else
|
|
@@ -341,28 +341,28 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[K] || K) + "'" : $t =
|
|
|
341
341
|
return this;
|
|
342
342
|
}, "reject"),
|
|
343
343
|
// retain first n characters of the match
|
|
344
|
-
less: /* @__PURE__ */
|
|
344
|
+
less: /* @__PURE__ */ g(function(E) {
|
|
345
345
|
this.unput(this.match.slice(E));
|
|
346
346
|
}, "less"),
|
|
347
347
|
// displays already matched input, i.e. for error messages
|
|
348
|
-
pastInput: /* @__PURE__ */
|
|
348
|
+
pastInput: /* @__PURE__ */ g(function() {
|
|
349
349
|
var E = this.matched.substr(0, this.matched.length - this.match.length);
|
|
350
350
|
return (E.length > 20 ? "..." : "") + E.substr(-20).replace(/\n/g, "");
|
|
351
351
|
}, "pastInput"),
|
|
352
352
|
// displays upcoming input, i.e. for error messages
|
|
353
|
-
upcomingInput: /* @__PURE__ */
|
|
353
|
+
upcomingInput: /* @__PURE__ */ g(function() {
|
|
354
354
|
var E = this.match;
|
|
355
355
|
return E.length < 20 && (E += this._input.substr(0, 20 - E.length)), (E.substr(0, 20) + (E.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
356
356
|
}, "upcomingInput"),
|
|
357
357
|
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
358
|
-
showPosition: /* @__PURE__ */
|
|
359
|
-
var E = this.pastInput(),
|
|
358
|
+
showPosition: /* @__PURE__ */ g(function() {
|
|
359
|
+
var E = this.pastInput(), P = new Array(E.length + 1).join("-");
|
|
360
360
|
return E + this.upcomingInput() + `
|
|
361
|
-
` +
|
|
361
|
+
` + P + "^";
|
|
362
362
|
}, "showPosition"),
|
|
363
363
|
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
364
|
-
test_match: /* @__PURE__ */
|
|
365
|
-
var b,
|
|
364
|
+
test_match: /* @__PURE__ */ g(function(E, P) {
|
|
365
|
+
var b, A, d;
|
|
366
366
|
if (this.options.backtrack_lexer && (d = {
|
|
367
367
|
yylineno: this.yylineno,
|
|
368
368
|
yylloc: {
|
|
@@ -382,41 +382,41 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[K] || K) + "'" : $t =
|
|
|
382
382
|
yy: this.yy,
|
|
383
383
|
conditionStack: this.conditionStack.slice(0),
|
|
384
384
|
done: this.done
|
|
385
|
-
}, this.options.ranges && (d.yylloc.range = this.yylloc.range.slice(0))),
|
|
385
|
+
}, this.options.ranges && (d.yylloc.range = this.yylloc.range.slice(0))), A = E[0].match(/(?:\r\n?|\n).*/g), A && (this.yylineno += A.length), this.yylloc = {
|
|
386
386
|
first_line: this.yylloc.last_line,
|
|
387
387
|
last_line: this.yylineno + 1,
|
|
388
388
|
first_column: this.yylloc.last_column,
|
|
389
|
-
last_column:
|
|
390
|
-
}, this.yytext += E[0], this.match += E[0], this.matches = E, 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(E[0].length), this.matched += E[0], b = this.performAction.call(this, this.yy, this,
|
|
389
|
+
last_column: A ? A[A.length - 1].length - A[A.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + E[0].length
|
|
390
|
+
}, this.yytext += E[0], this.match += E[0], this.matches = E, 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(E[0].length), this.matched += E[0], b = this.performAction.call(this, this.yy, this, P, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), b)
|
|
391
391
|
return b;
|
|
392
392
|
if (this._backtrack) {
|
|
393
|
-
for (var
|
|
394
|
-
this[
|
|
393
|
+
for (var H in d)
|
|
394
|
+
this[H] = d[H];
|
|
395
395
|
return !1;
|
|
396
396
|
}
|
|
397
397
|
return !1;
|
|
398
398
|
}, "test_match"),
|
|
399
399
|
// return next match in input
|
|
400
|
-
next: /* @__PURE__ */
|
|
400
|
+
next: /* @__PURE__ */ g(function() {
|
|
401
401
|
if (this.done)
|
|
402
402
|
return this.EOF;
|
|
403
403
|
this._input || (this.done = !0);
|
|
404
|
-
var E,
|
|
404
|
+
var E, P, b, A;
|
|
405
405
|
this._more || (this.yytext = "", this.match = "");
|
|
406
|
-
for (var d = this._currentRules(),
|
|
407
|
-
if (b = this._input.match(this.rules[d[
|
|
408
|
-
if (
|
|
409
|
-
if (E = this.test_match(b, d[
|
|
406
|
+
for (var d = this._currentRules(), H = 0; H < d.length; H++)
|
|
407
|
+
if (b = this._input.match(this.rules[d[H]]), b && (!P || b[0].length > P[0].length)) {
|
|
408
|
+
if (P = b, A = H, this.options.backtrack_lexer) {
|
|
409
|
+
if (E = this.test_match(b, d[H]), E !== !1)
|
|
410
410
|
return E;
|
|
411
411
|
if (this._backtrack) {
|
|
412
|
-
|
|
412
|
+
P = !1;
|
|
413
413
|
continue;
|
|
414
414
|
} else
|
|
415
415
|
return !1;
|
|
416
416
|
} else if (!this.options.flex)
|
|
417
417
|
break;
|
|
418
418
|
}
|
|
419
|
-
return
|
|
419
|
+
return P ? (E = this.test_match(P, d[A]), E !== !1 ? E : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
420
420
|
` + this.showPosition(), {
|
|
421
421
|
text: "",
|
|
422
422
|
token: null,
|
|
@@ -424,37 +424,37 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[K] || K) + "'" : $t =
|
|
|
424
424
|
});
|
|
425
425
|
}, "next"),
|
|
426
426
|
// return next match that has a token
|
|
427
|
-
lex: /* @__PURE__ */
|
|
427
|
+
lex: /* @__PURE__ */ g(function() {
|
|
428
428
|
var E = this.next();
|
|
429
429
|
return E || this.lex();
|
|
430
430
|
}, "lex"),
|
|
431
431
|
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
432
|
-
begin: /* @__PURE__ */
|
|
432
|
+
begin: /* @__PURE__ */ g(function(E) {
|
|
433
433
|
this.conditionStack.push(E);
|
|
434
434
|
}, "begin"),
|
|
435
435
|
// pop the previously active lexer condition state off the condition stack
|
|
436
|
-
popState: /* @__PURE__ */
|
|
436
|
+
popState: /* @__PURE__ */ g(function() {
|
|
437
437
|
var E = this.conditionStack.length - 1;
|
|
438
438
|
return E > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
439
439
|
}, "popState"),
|
|
440
440
|
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
441
|
-
_currentRules: /* @__PURE__ */
|
|
441
|
+
_currentRules: /* @__PURE__ */ g(function() {
|
|
442
442
|
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
443
443
|
}, "_currentRules"),
|
|
444
444
|
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
445
|
-
topState: /* @__PURE__ */
|
|
445
|
+
topState: /* @__PURE__ */ g(function(E) {
|
|
446
446
|
return E = this.conditionStack.length - 1 - Math.abs(E || 0), E >= 0 ? this.conditionStack[E] : "INITIAL";
|
|
447
447
|
}, "topState"),
|
|
448
448
|
// alias for begin(condition)
|
|
449
|
-
pushState: /* @__PURE__ */
|
|
449
|
+
pushState: /* @__PURE__ */ g(function(E) {
|
|
450
450
|
this.begin(E);
|
|
451
451
|
}, "pushState"),
|
|
452
452
|
// return the number of states currently on the stack
|
|
453
|
-
stateStackSize: /* @__PURE__ */
|
|
453
|
+
stateStackSize: /* @__PURE__ */ g(function() {
|
|
454
454
|
return this.conditionStack.length;
|
|
455
455
|
}, "stateStackSize"),
|
|
456
456
|
options: { "case-insensitive": !0 },
|
|
457
|
-
performAction: /* @__PURE__ */
|
|
457
|
+
performAction: /* @__PURE__ */ g(function(E, P, b, A) {
|
|
458
458
|
switch (b) {
|
|
459
459
|
case 0:
|
|
460
460
|
return 5;
|
|
@@ -481,7 +481,7 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[K] || K) + "'" : $t =
|
|
|
481
481
|
case 11:
|
|
482
482
|
return this.begin("ID"), 53;
|
|
483
483
|
case 12:
|
|
484
|
-
return
|
|
484
|
+
return P.yytext = P.yytext.trim(), this.begin("ALIAS"), 70;
|
|
485
485
|
case 13:
|
|
486
486
|
return this.popState(), this.popState(), this.begin("LINE"), 51;
|
|
487
487
|
case 14:
|
|
@@ -563,7 +563,7 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[K] || K) + "'" : $t =
|
|
|
563
563
|
case 51:
|
|
564
564
|
return 5;
|
|
565
565
|
case 52:
|
|
566
|
-
return
|
|
566
|
+
return P.yytext = P.yytext.trim(), 70;
|
|
567
567
|
case 53:
|
|
568
568
|
return 73;
|
|
569
569
|
case 54:
|
|
@@ -587,165 +587,30 @@ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[K] || K) + "'" : $t =
|
|
|
587
587
|
case 63:
|
|
588
588
|
return 81;
|
|
589
589
|
case 64:
|
|
590
|
-
return
|
|
590
|
+
return 81;
|
|
591
591
|
case 65:
|
|
592
|
-
return
|
|
592
|
+
return 68;
|
|
593
593
|
case 66:
|
|
594
|
-
return
|
|
594
|
+
return 69;
|
|
595
595
|
case 67:
|
|
596
|
+
return 5;
|
|
597
|
+
case 68:
|
|
596
598
|
return "INVALID";
|
|
597
599
|
}
|
|
598
600
|
}, "anonymous"),
|
|
599
|
-
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, /^(?:[
|
|
600
|
-
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, 66, 67], inclusive: !0 } }
|
|
601
|
+
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, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\)])/i, /^(?:--[\)])/i, /^(?::(?:(?:no)?wrap)?[^#\n;]*)/i, /^(?::)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i],
|
|
602
|
+
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, 66, 67, 68], inclusive: !0 } }
|
|
601
603
|
};
|
|
602
|
-
return
|
|
604
|
+
return ot;
|
|
603
605
|
}();
|
|
604
|
-
|
|
605
|
-
function
|
|
606
|
+
kt.lexer = he;
|
|
607
|
+
function ft() {
|
|
606
608
|
this.yy = {};
|
|
607
609
|
}
|
|
608
|
-
return
|
|
610
|
+
return g(ft, "Parser"), ft.prototype = kt, kt.Parser = ft, new ft();
|
|
609
611
|
}();
|
|
610
|
-
|
|
611
|
-
var
|
|
612
|
-
prevActor: void 0,
|
|
613
|
-
actors: /* @__PURE__ */ new Map(),
|
|
614
|
-
createdActors: /* @__PURE__ */ new Map(),
|
|
615
|
-
destroyedActors: /* @__PURE__ */ new Map(),
|
|
616
|
-
boxes: [],
|
|
617
|
-
messages: [],
|
|
618
|
-
notes: [],
|
|
619
|
-
sequenceNumbersEnabled: !1,
|
|
620
|
-
wrapEnabled: void 0,
|
|
621
|
-
currentBox: void 0,
|
|
622
|
-
lastCreated: void 0,
|
|
623
|
-
lastDestroyed: void 0
|
|
624
|
-
})), He = /* @__PURE__ */ l(function(t) {
|
|
625
|
-
I.records.boxes.push({
|
|
626
|
-
name: t.text,
|
|
627
|
-
wrap: t.wrap ?? yt(),
|
|
628
|
-
fill: t.color,
|
|
629
|
-
actorKeys: []
|
|
630
|
-
}), I.records.currentBox = I.records.boxes.slice(-1)[0];
|
|
631
|
-
}, "addBox"), Ft = /* @__PURE__ */ l(function(t, e, n, a) {
|
|
632
|
-
let s = I.records.currentBox;
|
|
633
|
-
const r = I.records.actors.get(t);
|
|
634
|
-
if (r) {
|
|
635
|
-
if (I.records.currentBox && r.box && I.records.currentBox !== r.box)
|
|
636
|
-
throw new Error(
|
|
637
|
-
`A same participant should only be defined in one Box: ${r.name} can't be in '${r.box.name}' and in '${I.records.currentBox.name}' at the same time.`
|
|
638
|
-
);
|
|
639
|
-
if (s = r.box ? r.box : I.records.currentBox, r.box = s, r && e === r.name && n == null)
|
|
640
|
-
return;
|
|
641
|
-
}
|
|
642
|
-
if ((n == null ? void 0 : n.text) == null && (n = { text: e, type: a }), (a == null || n.text == null) && (n = { text: e, type: a }), I.records.actors.set(t, {
|
|
643
|
-
box: s,
|
|
644
|
-
name: e,
|
|
645
|
-
description: n.text,
|
|
646
|
-
wrap: n.wrap ?? yt(),
|
|
647
|
-
prevActor: I.records.prevActor,
|
|
648
|
-
links: {},
|
|
649
|
-
properties: {},
|
|
650
|
-
actorCnt: null,
|
|
651
|
-
rectData: null,
|
|
652
|
-
type: a ?? "participant"
|
|
653
|
-
}), I.records.prevActor) {
|
|
654
|
-
const c = I.records.actors.get(I.records.prevActor);
|
|
655
|
-
c && (c.nextActor = t);
|
|
656
|
-
}
|
|
657
|
-
I.records.currentBox && I.records.currentBox.actorKeys.push(t), I.records.prevActor = t;
|
|
658
|
-
}, "addActor"), je = /* @__PURE__ */ l((t) => {
|
|
659
|
-
let e, n = 0;
|
|
660
|
-
if (!t)
|
|
661
|
-
return 0;
|
|
662
|
-
for (e = 0; e < I.records.messages.length; e++)
|
|
663
|
-
I.records.messages[e].type === Et.ACTIVE_START && I.records.messages[e].from === t && n++, I.records.messages[e].type === Et.ACTIVE_END && I.records.messages[e].from === t && n--;
|
|
664
|
-
return n;
|
|
665
|
-
}, "activationCount"), Ue = /* @__PURE__ */ l(function(t, e, n, a) {
|
|
666
|
-
I.records.messages.push({
|
|
667
|
-
from: t,
|
|
668
|
-
to: e,
|
|
669
|
-
message: n.text,
|
|
670
|
-
wrap: n.wrap ?? yt(),
|
|
671
|
-
answer: a
|
|
672
|
-
});
|
|
673
|
-
}, "addMessage"), R = /* @__PURE__ */ l(function(t, e, n, a, s = !1) {
|
|
674
|
-
if (a === Et.ACTIVE_END && je(t ?? "") < 1) {
|
|
675
|
-
const r = new Error("Trying to inactivate an inactive participant (" + t + ")");
|
|
676
|
-
throw r.hash = {
|
|
677
|
-
text: "->>-",
|
|
678
|
-
token: "->>-",
|
|
679
|
-
line: "1",
|
|
680
|
-
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
|
|
681
|
-
expected: ["'ACTIVE_PARTICIPANT'"]
|
|
682
|
-
}, r;
|
|
683
|
-
}
|
|
684
|
-
return I.records.messages.push({
|
|
685
|
-
from: t,
|
|
686
|
-
to: e,
|
|
687
|
-
message: (n == null ? void 0 : n.text) ?? "",
|
|
688
|
-
wrap: (n == null ? void 0 : n.wrap) ?? yt(),
|
|
689
|
-
type: a,
|
|
690
|
-
activate: s
|
|
691
|
-
}), !0;
|
|
692
|
-
}, "addSignal"), Ke = /* @__PURE__ */ l(function() {
|
|
693
|
-
return I.records.boxes.length > 0;
|
|
694
|
-
}, "hasAtLeastOneBox"), Ge = /* @__PURE__ */ l(function() {
|
|
695
|
-
return I.records.boxes.some((t) => t.name);
|
|
696
|
-
}, "hasAtLeastOneBoxWithTitle"), Je = /* @__PURE__ */ l(function() {
|
|
697
|
-
return I.records.messages;
|
|
698
|
-
}, "getMessages"), Ze = /* @__PURE__ */ l(function() {
|
|
699
|
-
return I.records.boxes;
|
|
700
|
-
}, "getBoxes"), Qe = /* @__PURE__ */ l(function() {
|
|
701
|
-
return I.records.actors;
|
|
702
|
-
}, "getActors"), Xe = /* @__PURE__ */ l(function() {
|
|
703
|
-
return I.records.createdActors;
|
|
704
|
-
}, "getCreatedActors"), ta = /* @__PURE__ */ l(function() {
|
|
705
|
-
return I.records.destroyedActors;
|
|
706
|
-
}, "getDestroyedActors"), It = /* @__PURE__ */ l(function(t) {
|
|
707
|
-
return I.records.actors.get(t);
|
|
708
|
-
}, "getActor"), ea = /* @__PURE__ */ l(function() {
|
|
709
|
-
return [...I.records.actors.keys()];
|
|
710
|
-
}, "getActorKeys"), aa = /* @__PURE__ */ l(function() {
|
|
711
|
-
I.records.sequenceNumbersEnabled = !0;
|
|
712
|
-
}, "enableSequenceNumbers"), sa = /* @__PURE__ */ l(function() {
|
|
713
|
-
I.records.sequenceNumbersEnabled = !1;
|
|
714
|
-
}, "disableSequenceNumbers"), ra = /* @__PURE__ */ l(() => I.records.sequenceNumbersEnabled, "showSequenceNumbers"), ia = /* @__PURE__ */ l(function(t) {
|
|
715
|
-
I.records.wrapEnabled = t;
|
|
716
|
-
}, "setWrap"), oe = /* @__PURE__ */ l((t) => {
|
|
717
|
-
if (t === void 0)
|
|
718
|
-
return {};
|
|
719
|
-
t = t.trim();
|
|
720
|
-
const e = /^:?wrap:/.exec(t) !== null ? !0 : /^:?nowrap:/.exec(t) !== null ? !1 : void 0;
|
|
721
|
-
return { cleanedText: (e === void 0 ? t : t.replace(/^:?(?:no)?wrap:/, "")).trim(), wrap: e };
|
|
722
|
-
}, "extractWrap"), yt = /* @__PURE__ */ l(() => {
|
|
723
|
-
var t;
|
|
724
|
-
return I.records.wrapEnabled !== void 0 ? I.records.wrapEnabled : ((t = rt().sequence) == null ? void 0 : t.wrap) ?? !1;
|
|
725
|
-
}, "autoWrap"), oa = /* @__PURE__ */ l(function() {
|
|
726
|
-
I.reset(), We();
|
|
727
|
-
}, "clear"), na = /* @__PURE__ */ l(function(t) {
|
|
728
|
-
const e = t.trim(), { wrap: n, cleanedText: a } = oe(e), s = {
|
|
729
|
-
text: a,
|
|
730
|
-
wrap: n
|
|
731
|
-
};
|
|
732
|
-
return G.debug(`parseMessage: ${JSON.stringify(s)}`), s;
|
|
733
|
-
}, "parseMessage"), ca = /* @__PURE__ */ l(function(t) {
|
|
734
|
-
const e = /^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);
|
|
735
|
-
let n = e != null && e[1] ? e[1].trim() : "transparent", a = e != null && e[2] ? e[2].trim() : void 0;
|
|
736
|
-
if (window != null && window.CSS)
|
|
737
|
-
window.CSS.supports("color", n) || (n = "transparent", a = t.trim());
|
|
738
|
-
else {
|
|
739
|
-
const c = new Option().style;
|
|
740
|
-
c.color = n, c.color !== n && (n = "transparent", a = t.trim());
|
|
741
|
-
}
|
|
742
|
-
const { wrap: s, cleanedText: r } = oe(a);
|
|
743
|
-
return {
|
|
744
|
-
text: r ? Mt(r, rt()) : void 0,
|
|
745
|
-
color: n,
|
|
746
|
-
wrap: s
|
|
747
|
-
};
|
|
748
|
-
}, "parseBoxData"), Et = {
|
|
612
|
+
Rt.parser = Rt;
|
|
613
|
+
var Me = Rt, Oe = {
|
|
749
614
|
SOLID: 0,
|
|
750
615
|
DOTTED: 1,
|
|
751
616
|
NOTE: 2,
|
|
@@ -778,260 +643,402 @@ var ze = Vt, I = new Se(() => ({
|
|
|
778
643
|
PAR_OVER_START: 32,
|
|
779
644
|
BIDIRECTIONAL_SOLID: 33,
|
|
780
645
|
BIDIRECTIONAL_DOTTED: 34
|
|
781
|
-
},
|
|
646
|
+
}, Se = {
|
|
782
647
|
FILLED: 0,
|
|
783
648
|
OPEN: 1
|
|
784
|
-
},
|
|
649
|
+
}, De = {
|
|
785
650
|
LEFTOF: 0,
|
|
786
651
|
RIGHTOF: 1,
|
|
787
652
|
OVER: 2
|
|
788
|
-
},
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
},
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
try {
|
|
858
|
-
const s = a.innerHTML, r = JSON.parse(s);
|
|
859
|
-
r.properties && Ht(n, r.properties), r.links && Ot(n, r.links);
|
|
860
|
-
} catch (s) {
|
|
861
|
-
G.error("error while parsing actor details text", s);
|
|
862
|
-
}
|
|
863
|
-
}, "addDetails"), pa = /* @__PURE__ */ l(function(t, e) {
|
|
864
|
-
if ((t == null ? void 0 : t.properties) !== void 0)
|
|
865
|
-
return t.properties[e];
|
|
866
|
-
}, "getActorProperty"), pe = /* @__PURE__ */ l(function(t) {
|
|
867
|
-
if (Array.isArray(t))
|
|
868
|
-
t.forEach(function(e) {
|
|
869
|
-
pe(e);
|
|
653
|
+
}, St, Re = (St = class {
|
|
654
|
+
constructor() {
|
|
655
|
+
this.state = new fe(() => ({
|
|
656
|
+
prevActor: void 0,
|
|
657
|
+
actors: /* @__PURE__ */ new Map(),
|
|
658
|
+
createdActors: /* @__PURE__ */ new Map(),
|
|
659
|
+
destroyedActors: /* @__PURE__ */ new Map(),
|
|
660
|
+
boxes: [],
|
|
661
|
+
messages: [],
|
|
662
|
+
notes: [],
|
|
663
|
+
sequenceNumbersEnabled: !1,
|
|
664
|
+
wrapEnabled: void 0,
|
|
665
|
+
currentBox: void 0,
|
|
666
|
+
lastCreated: void 0,
|
|
667
|
+
lastDestroyed: void 0
|
|
668
|
+
})), this.setAccTitle = Ut, this.setAccDescription = Ie, this.setDiagramTitle = Le, this.getAccTitle = Pe, this.getAccDescription = ve, this.getDiagramTitle = _e, this.apply = this.apply.bind(this), this.parseBoxData = this.parseBoxData.bind(this), this.parseMessage = this.parseMessage.bind(this), this.clear(), this.setWrap(Q().wrap), this.LINETYPE = Oe, this.ARROWTYPE = Se, this.PLACEMENT = De;
|
|
669
|
+
}
|
|
670
|
+
addBox(t) {
|
|
671
|
+
this.state.records.boxes.push({
|
|
672
|
+
name: t.text,
|
|
673
|
+
wrap: t.wrap ?? this.autoWrap(),
|
|
674
|
+
fill: t.color,
|
|
675
|
+
actorKeys: []
|
|
676
|
+
}), this.state.records.currentBox = this.state.records.boxes.slice(-1)[0];
|
|
677
|
+
}
|
|
678
|
+
addActor(t, e, n, a) {
|
|
679
|
+
let s = this.state.records.currentBox;
|
|
680
|
+
const r = this.state.records.actors.get(t);
|
|
681
|
+
if (r) {
|
|
682
|
+
if (this.state.records.currentBox && r.box && this.state.records.currentBox !== r.box)
|
|
683
|
+
throw new Error(
|
|
684
|
+
`A same participant should only be defined in one Box: ${r.name} can't be in '${r.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`
|
|
685
|
+
);
|
|
686
|
+
if (s = r.box ? r.box : this.state.records.currentBox, r.box = s, r && e === r.name && n == null)
|
|
687
|
+
return;
|
|
688
|
+
}
|
|
689
|
+
if ((n == null ? void 0 : n.text) == null && (n = { text: e, type: a }), (a == null || n.text == null) && (n = { text: e, type: a }), this.state.records.actors.set(t, {
|
|
690
|
+
box: s,
|
|
691
|
+
name: e,
|
|
692
|
+
description: n.text,
|
|
693
|
+
wrap: n.wrap ?? this.autoWrap(),
|
|
694
|
+
prevActor: this.state.records.prevActor,
|
|
695
|
+
links: {},
|
|
696
|
+
properties: {},
|
|
697
|
+
actorCnt: null,
|
|
698
|
+
rectData: null,
|
|
699
|
+
type: a ?? "participant"
|
|
700
|
+
}), this.state.records.prevActor) {
|
|
701
|
+
const c = this.state.records.actors.get(this.state.records.prevActor);
|
|
702
|
+
c && (c.nextActor = t);
|
|
703
|
+
}
|
|
704
|
+
this.state.records.currentBox && this.state.records.currentBox.actorKeys.push(t), this.state.records.prevActor = t;
|
|
705
|
+
}
|
|
706
|
+
activationCount(t) {
|
|
707
|
+
let e, n = 0;
|
|
708
|
+
if (!t)
|
|
709
|
+
return 0;
|
|
710
|
+
for (e = 0; e < this.state.records.messages.length; e++)
|
|
711
|
+
this.state.records.messages[e].type === this.LINETYPE.ACTIVE_START && this.state.records.messages[e].from === t && n++, this.state.records.messages[e].type === this.LINETYPE.ACTIVE_END && this.state.records.messages[e].from === t && n--;
|
|
712
|
+
return n;
|
|
713
|
+
}
|
|
714
|
+
addMessage(t, e, n, a) {
|
|
715
|
+
this.state.records.messages.push({
|
|
716
|
+
id: this.state.records.messages.length.toString(),
|
|
717
|
+
from: t,
|
|
718
|
+
to: e,
|
|
719
|
+
message: n.text,
|
|
720
|
+
wrap: n.wrap ?? this.autoWrap(),
|
|
721
|
+
answer: a
|
|
870
722
|
});
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
723
|
+
}
|
|
724
|
+
addSignal(t, e, n, a, s = !1) {
|
|
725
|
+
if (a === this.LINETYPE.ACTIVE_END && this.activationCount(t ?? "") < 1) {
|
|
726
|
+
const r = new Error("Trying to inactivate an inactive participant (" + t + ")");
|
|
727
|
+
throw r.hash = {
|
|
728
|
+
text: "->>-",
|
|
729
|
+
token: "->>-",
|
|
730
|
+
line: "1",
|
|
731
|
+
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
|
|
732
|
+
expected: ["'ACTIVE_PARTICIPANT'"]
|
|
733
|
+
}, r;
|
|
734
|
+
}
|
|
735
|
+
return this.state.records.messages.push({
|
|
736
|
+
id: this.state.records.messages.length.toString(),
|
|
737
|
+
from: t,
|
|
738
|
+
to: e,
|
|
739
|
+
message: (n == null ? void 0 : n.text) ?? "",
|
|
740
|
+
wrap: (n == null ? void 0 : n.wrap) ?? this.autoWrap(),
|
|
741
|
+
type: a,
|
|
742
|
+
activate: s
|
|
743
|
+
}), !0;
|
|
744
|
+
}
|
|
745
|
+
hasAtLeastOneBox() {
|
|
746
|
+
return this.state.records.boxes.length > 0;
|
|
747
|
+
}
|
|
748
|
+
hasAtLeastOneBoxWithTitle() {
|
|
749
|
+
return this.state.records.boxes.some((t) => t.name);
|
|
750
|
+
}
|
|
751
|
+
getMessages() {
|
|
752
|
+
return this.state.records.messages;
|
|
753
|
+
}
|
|
754
|
+
getBoxes() {
|
|
755
|
+
return this.state.records.boxes;
|
|
756
|
+
}
|
|
757
|
+
getActors() {
|
|
758
|
+
return this.state.records.actors;
|
|
759
|
+
}
|
|
760
|
+
getCreatedActors() {
|
|
761
|
+
return this.state.records.createdActors;
|
|
762
|
+
}
|
|
763
|
+
getDestroyedActors() {
|
|
764
|
+
return this.state.records.destroyedActors;
|
|
765
|
+
}
|
|
766
|
+
getActor(t) {
|
|
767
|
+
return this.state.records.actors.get(t);
|
|
768
|
+
}
|
|
769
|
+
getActorKeys() {
|
|
770
|
+
return [...this.state.records.actors.keys()];
|
|
771
|
+
}
|
|
772
|
+
enableSequenceNumbers() {
|
|
773
|
+
this.state.records.sequenceNumbersEnabled = !0;
|
|
774
|
+
}
|
|
775
|
+
disableSequenceNumbers() {
|
|
776
|
+
this.state.records.sequenceNumbersEnabled = !1;
|
|
777
|
+
}
|
|
778
|
+
showSequenceNumbers() {
|
|
779
|
+
return this.state.records.sequenceNumbersEnabled;
|
|
780
|
+
}
|
|
781
|
+
setWrap(t) {
|
|
782
|
+
this.state.records.wrapEnabled = t;
|
|
783
|
+
}
|
|
784
|
+
extractWrap(t) {
|
|
785
|
+
if (t === void 0)
|
|
786
|
+
return {};
|
|
787
|
+
t = t.trim();
|
|
788
|
+
const e = /^:?wrap:/.exec(t) !== null ? !0 : /^:?nowrap:/.exec(t) !== null ? !1 : void 0;
|
|
789
|
+
return { cleanedText: (e === void 0 ? t : t.replace(/^:?(?:no)?wrap:/, "")).trim(), wrap: e };
|
|
790
|
+
}
|
|
791
|
+
autoWrap() {
|
|
792
|
+
var t;
|
|
793
|
+
return this.state.records.wrapEnabled !== void 0 ? this.state.records.wrapEnabled : ((t = Q().sequence) == null ? void 0 : t.wrap) ?? !1;
|
|
794
|
+
}
|
|
795
|
+
clear() {
|
|
796
|
+
this.state.reset(), ke();
|
|
797
|
+
}
|
|
798
|
+
parseMessage(t) {
|
|
799
|
+
const e = t.trim(), { wrap: n, cleanedText: a } = this.extractWrap(e), s = {
|
|
800
|
+
text: a,
|
|
801
|
+
wrap: n
|
|
802
|
+
};
|
|
803
|
+
return j.debug(`parseMessage: ${JSON.stringify(s)}`), s;
|
|
804
|
+
}
|
|
805
|
+
// We expect the box statement to be color first then description
|
|
806
|
+
// The color can be rgb,rgba,hsl,hsla, or css code names #hex codes are not supported for now because of the way the char # is handled
|
|
807
|
+
// We extract first segment as color, the rest of the line is considered as text
|
|
808
|
+
parseBoxData(t) {
|
|
809
|
+
const e = /^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);
|
|
810
|
+
let n = e != null && e[1] ? e[1].trim() : "transparent", a = e != null && e[2] ? e[2].trim() : void 0;
|
|
811
|
+
if (window != null && window.CSS)
|
|
812
|
+
window.CSS.supports("color", n) || (n = "transparent", a = t.trim());
|
|
813
|
+
else {
|
|
814
|
+
const c = new Option().style;
|
|
815
|
+
c.color = n, c.color !== n && (n = "transparent", a = t.trim());
|
|
816
|
+
}
|
|
817
|
+
const { wrap: s, cleanedText: r } = this.extractWrap(a);
|
|
818
|
+
return {
|
|
819
|
+
text: r ? Lt(r, Q()) : void 0,
|
|
820
|
+
color: n,
|
|
821
|
+
wrap: s
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
addNote(t, e, n) {
|
|
825
|
+
const a = {
|
|
826
|
+
actor: t,
|
|
827
|
+
placement: e,
|
|
828
|
+
message: n.text,
|
|
829
|
+
wrap: n.wrap ?? this.autoWrap()
|
|
830
|
+
}, s = [].concat(t, t);
|
|
831
|
+
this.state.records.notes.push(a), this.state.records.messages.push({
|
|
832
|
+
id: this.state.records.messages.length.toString(),
|
|
833
|
+
from: s[0],
|
|
834
|
+
to: s[1],
|
|
835
|
+
message: n.text,
|
|
836
|
+
wrap: n.wrap ?? this.autoWrap(),
|
|
837
|
+
type: this.LINETYPE.NOTE,
|
|
838
|
+
placement: e
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
addLinks(t, e) {
|
|
842
|
+
const n = this.getActor(t);
|
|
843
|
+
try {
|
|
844
|
+
let a = Lt(e.text, Q());
|
|
845
|
+
a = a.replace(/=/g, "="), a = a.replace(/&/g, "&");
|
|
846
|
+
const s = JSON.parse(a);
|
|
847
|
+
this.insertLinks(n, s);
|
|
848
|
+
} catch (a) {
|
|
849
|
+
j.error("error while parsing actor link text", a);
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
addALink(t, e) {
|
|
853
|
+
const n = this.getActor(t);
|
|
854
|
+
try {
|
|
855
|
+
const a = {};
|
|
856
|
+
let s = Lt(e.text, Q());
|
|
857
|
+
const r = s.indexOf("@");
|
|
858
|
+
s = s.replace(/=/g, "="), s = s.replace(/&/g, "&");
|
|
859
|
+
const c = s.slice(0, r - 1).trim(), h = s.slice(r + 1).trim();
|
|
860
|
+
a[c] = h, this.insertLinks(n, a);
|
|
861
|
+
} catch (a) {
|
|
862
|
+
j.error("error while parsing actor link text", a);
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
insertLinks(t, e) {
|
|
866
|
+
if (t.links == null)
|
|
867
|
+
t.links = e;
|
|
868
|
+
else
|
|
869
|
+
for (const n in e)
|
|
870
|
+
t.links[n] = e[n];
|
|
871
|
+
}
|
|
872
|
+
addProperties(t, e) {
|
|
873
|
+
const n = this.getActor(t);
|
|
874
|
+
try {
|
|
875
|
+
const a = Lt(e.text, Q()), s = JSON.parse(a);
|
|
876
|
+
this.insertProperties(n, s);
|
|
877
|
+
} catch (a) {
|
|
878
|
+
j.error("error while parsing actor properties text", a);
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
insertProperties(t, e) {
|
|
882
|
+
if (t.properties == null)
|
|
883
|
+
t.properties = e;
|
|
884
|
+
else
|
|
885
|
+
for (const n in e)
|
|
886
|
+
t.properties[n] = e[n];
|
|
887
|
+
}
|
|
888
|
+
boxEnd() {
|
|
889
|
+
this.state.records.currentBox = void 0;
|
|
890
|
+
}
|
|
891
|
+
addDetails(t, e) {
|
|
892
|
+
const n = this.getActor(t), a = document.getElementById(e.text);
|
|
893
|
+
try {
|
|
894
|
+
const s = a.innerHTML, r = JSON.parse(s);
|
|
895
|
+
r.properties && this.insertProperties(n, r.properties), r.links && this.insertLinks(n, r.links);
|
|
896
|
+
} catch (s) {
|
|
897
|
+
j.error("error while parsing actor details text", s);
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
getActorProperty(t, e) {
|
|
901
|
+
if ((t == null ? void 0 : t.properties) !== void 0)
|
|
902
|
+
return t.properties[e];
|
|
903
|
+
}
|
|
904
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-redundant-type-constituents
|
|
905
|
+
apply(t) {
|
|
906
|
+
if (Array.isArray(t))
|
|
907
|
+
t.forEach((e) => {
|
|
908
|
+
this.apply(e);
|
|
909
|
+
});
|
|
910
|
+
else
|
|
911
|
+
switch (t.type) {
|
|
912
|
+
case "sequenceIndex":
|
|
913
|
+
this.state.records.messages.push({
|
|
914
|
+
id: this.state.records.messages.length.toString(),
|
|
915
|
+
from: void 0,
|
|
916
|
+
to: void 0,
|
|
917
|
+
message: {
|
|
918
|
+
start: t.sequenceIndex,
|
|
919
|
+
step: t.sequenceIndexStep,
|
|
920
|
+
visible: t.sequenceVisible
|
|
921
|
+
},
|
|
922
|
+
wrap: !1,
|
|
923
|
+
type: t.signalType
|
|
924
|
+
});
|
|
925
|
+
break;
|
|
926
|
+
case "addParticipant":
|
|
927
|
+
this.addActor(t.actor, t.actor, t.description, t.draw);
|
|
928
|
+
break;
|
|
929
|
+
case "createParticipant":
|
|
930
|
+
if (this.state.records.actors.has(t.actor))
|
|
929
931
|
throw new Error(
|
|
930
|
-
"
|
|
932
|
+
"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"
|
|
931
933
|
);
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
}
|
|
934
|
+
this.state.records.lastCreated = t.actor, this.addActor(t.actor, t.actor, t.description, t.draw), this.state.records.createdActors.set(t.actor, this.state.records.messages.length);
|
|
935
|
+
break;
|
|
936
|
+
case "destroyParticipant":
|
|
937
|
+
this.state.records.lastDestroyed = t.actor, this.state.records.destroyedActors.set(t.actor, this.state.records.messages.length);
|
|
938
|
+
break;
|
|
939
|
+
case "activeStart":
|
|
940
|
+
this.addSignal(t.actor, void 0, void 0, t.signalType);
|
|
941
|
+
break;
|
|
942
|
+
case "activeEnd":
|
|
943
|
+
this.addSignal(t.actor, void 0, void 0, t.signalType);
|
|
944
|
+
break;
|
|
945
|
+
case "addNote":
|
|
946
|
+
this.addNote(t.actor, t.placement, t.text);
|
|
947
|
+
break;
|
|
948
|
+
case "addLinks":
|
|
949
|
+
this.addLinks(t.actor, t.text);
|
|
950
|
+
break;
|
|
951
|
+
case "addALink":
|
|
952
|
+
this.addALink(t.actor, t.text);
|
|
953
|
+
break;
|
|
954
|
+
case "addProperties":
|
|
955
|
+
this.addProperties(t.actor, t.text);
|
|
956
|
+
break;
|
|
957
|
+
case "addDetails":
|
|
958
|
+
this.addDetails(t.actor, t.text);
|
|
959
|
+
break;
|
|
960
|
+
case "addMessage":
|
|
961
|
+
if (this.state.records.lastCreated) {
|
|
962
|
+
if (t.to !== this.state.records.lastCreated)
|
|
963
|
+
throw new Error(
|
|
964
|
+
"The created participant " + this.state.records.lastCreated.name + " does not have an associated creating message after its declaration. Please check the sequence diagram."
|
|
965
|
+
);
|
|
966
|
+
this.state.records.lastCreated = void 0;
|
|
967
|
+
} else if (this.state.records.lastDestroyed) {
|
|
968
|
+
if (t.to !== this.state.records.lastDestroyed && t.from !== this.state.records.lastDestroyed)
|
|
969
|
+
throw new Error(
|
|
970
|
+
"The destroyed participant " + this.state.records.lastDestroyed.name + " does not have an associated destroying message after its declaration. Please check the sequence diagram."
|
|
971
|
+
);
|
|
972
|
+
this.state.records.lastDestroyed = void 0;
|
|
973
|
+
}
|
|
974
|
+
this.addSignal(t.from, t.to, t.msg, t.signalType, t.activate);
|
|
975
|
+
break;
|
|
976
|
+
case "boxStart":
|
|
977
|
+
this.addBox(t.boxData);
|
|
978
|
+
break;
|
|
979
|
+
case "boxEnd":
|
|
980
|
+
this.boxEnd();
|
|
981
|
+
break;
|
|
982
|
+
case "loopStart":
|
|
983
|
+
this.addSignal(void 0, void 0, t.loopText, t.signalType);
|
|
984
|
+
break;
|
|
985
|
+
case "loopEnd":
|
|
986
|
+
this.addSignal(void 0, void 0, void 0, t.signalType);
|
|
987
|
+
break;
|
|
988
|
+
case "rectStart":
|
|
989
|
+
this.addSignal(void 0, void 0, t.color, t.signalType);
|
|
990
|
+
break;
|
|
991
|
+
case "rectEnd":
|
|
992
|
+
this.addSignal(void 0, void 0, void 0, t.signalType);
|
|
993
|
+
break;
|
|
994
|
+
case "optStart":
|
|
995
|
+
this.addSignal(void 0, void 0, t.optText, t.signalType);
|
|
996
|
+
break;
|
|
997
|
+
case "optEnd":
|
|
998
|
+
this.addSignal(void 0, void 0, void 0, t.signalType);
|
|
999
|
+
break;
|
|
1000
|
+
case "altStart":
|
|
1001
|
+
this.addSignal(void 0, void 0, t.altText, t.signalType);
|
|
1002
|
+
break;
|
|
1003
|
+
case "else":
|
|
1004
|
+
this.addSignal(void 0, void 0, t.altText, t.signalType);
|
|
1005
|
+
break;
|
|
1006
|
+
case "altEnd":
|
|
1007
|
+
this.addSignal(void 0, void 0, void 0, t.signalType);
|
|
1008
|
+
break;
|
|
1009
|
+
case "setAccTitle":
|
|
1010
|
+
Ut(t.text);
|
|
1011
|
+
break;
|
|
1012
|
+
case "parStart":
|
|
1013
|
+
this.addSignal(void 0, void 0, t.parText, t.signalType);
|
|
1014
|
+
break;
|
|
1015
|
+
case "and":
|
|
1016
|
+
this.addSignal(void 0, void 0, t.parText, t.signalType);
|
|
1017
|
+
break;
|
|
1018
|
+
case "parEnd":
|
|
1019
|
+
this.addSignal(void 0, void 0, void 0, t.signalType);
|
|
1020
|
+
break;
|
|
1021
|
+
case "criticalStart":
|
|
1022
|
+
this.addSignal(void 0, void 0, t.criticalText, t.signalType);
|
|
1023
|
+
break;
|
|
1024
|
+
case "option":
|
|
1025
|
+
this.addSignal(void 0, void 0, t.optionText, t.signalType);
|
|
1026
|
+
break;
|
|
1027
|
+
case "criticalEnd":
|
|
1028
|
+
this.addSignal(void 0, void 0, void 0, t.signalType);
|
|
1029
|
+
break;
|
|
1030
|
+
case "breakStart":
|
|
1031
|
+
this.addSignal(void 0, void 0, t.breakText, t.signalType);
|
|
1032
|
+
break;
|
|
1033
|
+
case "breakEnd":
|
|
1034
|
+
this.addSignal(void 0, void 0, void 0, t.signalType);
|
|
1035
|
+
break;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
getConfig() {
|
|
1039
|
+
return Q().sequence;
|
|
1040
|
+
}
|
|
1041
|
+
}, g(St, "SequenceDB"), St), Ce = /* @__PURE__ */ g((t) => `.actor {
|
|
1035
1042
|
stroke: ${t.actorBorder};
|
|
1036
1043
|
fill: ${t.actorBkg};
|
|
1037
1044
|
}
|
|
@@ -1147,73 +1154,73 @@ var he = /* @__PURE__ */ l(function(t, e) {
|
|
|
1147
1154
|
fill: ${t.actorBkg};
|
|
1148
1155
|
stroke-width: 2px;
|
|
1149
1156
|
}
|
|
1150
|
-
`, "getStyles"),
|
|
1151
|
-
return
|
|
1152
|
-
}, "drawRect"),
|
|
1157
|
+
`, "getStyles"), Be = Ce, gt = 36, Kt = "actor-top", Qt = "actor-bottom", $e = "actor-box", jt = "actor-man", Yt = /* @__PURE__ */ g(function(t, e) {
|
|
1158
|
+
return ye(t, e);
|
|
1159
|
+
}, "drawRect"), Ye = /* @__PURE__ */ g(function(t, e, n, a, s) {
|
|
1153
1160
|
if (e.links === void 0 || e.links === null || Object.keys(e.links).length === 0)
|
|
1154
1161
|
return { height: 0, width: 0 };
|
|
1155
1162
|
const r = e.links, c = e.actorCnt, h = e.rectData;
|
|
1156
|
-
var
|
|
1157
|
-
s && (
|
|
1163
|
+
var p = "none";
|
|
1164
|
+
s && (p = "block !important");
|
|
1158
1165
|
const i = t.append("g");
|
|
1159
|
-
i.attr("id", "actor" + c + "_popup"), i.attr("class", "actorPopupMenu"), i.attr("display",
|
|
1166
|
+
i.attr("id", "actor" + c + "_popup"), i.attr("class", "actorPopupMenu"), i.attr("display", p);
|
|
1160
1167
|
var x = "";
|
|
1161
1168
|
h.class !== void 0 && (x = " " + h.class);
|
|
1162
1169
|
let m = h.width > n ? h.width : n;
|
|
1163
1170
|
const u = i.append("rect");
|
|
1164
1171
|
if (u.attr("class", "actorPopupMenuPanel" + x), u.attr("x", h.x), u.attr("y", h.height), u.attr("fill", h.fill), u.attr("stroke", h.stroke), u.attr("width", m), u.attr("height", h.height), u.attr("rx", h.rx), u.attr("ry", h.ry), r != null) {
|
|
1165
|
-
var
|
|
1166
|
-
for (let
|
|
1167
|
-
var w = i.append("a"),
|
|
1168
|
-
w.attr("xlink:href",
|
|
1169
|
-
|
|
1172
|
+
var T = 20;
|
|
1173
|
+
for (let _ in r) {
|
|
1174
|
+
var w = i.append("a"), I = Gt.sanitizeUrl(r[_]);
|
|
1175
|
+
w.attr("xlink:href", I), w.attr("target", "_blank"), aa(a)(
|
|
1176
|
+
_,
|
|
1170
1177
|
w,
|
|
1171
1178
|
h.x + 10,
|
|
1172
|
-
h.height +
|
|
1179
|
+
h.height + T,
|
|
1173
1180
|
m,
|
|
1174
1181
|
20,
|
|
1175
1182
|
{ class: "actor" },
|
|
1176
1183
|
a
|
|
1177
|
-
),
|
|
1184
|
+
), T += 30;
|
|
1178
1185
|
}
|
|
1179
1186
|
}
|
|
1180
|
-
return u.attr("height",
|
|
1181
|
-
}, "drawPopup"),
|
|
1187
|
+
return u.attr("height", T), { height: h.height + T, width: m };
|
|
1188
|
+
}, "drawPopup"), Ve = /* @__PURE__ */ g(function(t) {
|
|
1182
1189
|
return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
|
|
1183
|
-
}, "popupMenuToggle"),
|
|
1190
|
+
}, "popupMenuToggle"), Pt = /* @__PURE__ */ g(async function(t, e, n = null) {
|
|
1184
1191
|
let a = t.append("foreignObject");
|
|
1185
|
-
const s = await
|
|
1192
|
+
const s = await Zt(e.text, Dt()), r = a.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();
|
|
1186
1193
|
if (a.attr("height", Math.round(r.height)).attr("width", Math.round(r.width)), e.class === "noteText") {
|
|
1187
1194
|
const c = t.node().firstChild;
|
|
1188
1195
|
c.setAttribute("height", r.height + 2 * e.textMargin);
|
|
1189
1196
|
const h = c.getBBox();
|
|
1190
1197
|
a.attr("x", Math.round(h.x + h.width / 2 - r.width / 2)).attr("y", Math.round(h.y + h.height / 2 - r.height / 2));
|
|
1191
1198
|
} else if (n) {
|
|
1192
|
-
let { startx: c, stopx: h, starty:
|
|
1199
|
+
let { startx: c, stopx: h, starty: p } = n;
|
|
1193
1200
|
if (c > h) {
|
|
1194
1201
|
const i = c;
|
|
1195
1202
|
c = h, h = i;
|
|
1196
1203
|
}
|
|
1197
|
-
a.attr("x", Math.round(c + Math.abs(c - h) / 2 - r.width / 2)), e.class === "loopText" ? a.attr("y", Math.round(
|
|
1204
|
+
a.attr("x", Math.round(c + Math.abs(c - h) / 2 - r.width / 2)), e.class === "loopText" ? a.attr("y", Math.round(p)) : a.attr("y", Math.round(p - r.height));
|
|
1198
1205
|
}
|
|
1199
1206
|
return [a];
|
|
1200
|
-
}, "drawKatex"),
|
|
1207
|
+
}, "drawKatex"), mt = /* @__PURE__ */ g(function(t, e) {
|
|
1201
1208
|
let n = 0, a = 0;
|
|
1202
|
-
const s = e.text.split(
|
|
1203
|
-
let h = [],
|
|
1209
|
+
const s = e.text.split(L.lineBreakRegex), [r, c] = Jt(e.fontSize);
|
|
1210
|
+
let h = [], p = 0, i = /* @__PURE__ */ g(() => e.y, "yfunc");
|
|
1204
1211
|
if (e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0)
|
|
1205
1212
|
switch (e.valign) {
|
|
1206
1213
|
case "top":
|
|
1207
1214
|
case "start":
|
|
1208
|
-
i = /* @__PURE__ */
|
|
1215
|
+
i = /* @__PURE__ */ g(() => Math.round(e.y + e.textMargin), "yfunc");
|
|
1209
1216
|
break;
|
|
1210
1217
|
case "middle":
|
|
1211
1218
|
case "center":
|
|
1212
|
-
i = /* @__PURE__ */
|
|
1219
|
+
i = /* @__PURE__ */ g(() => Math.round(e.y + (n + a + e.textMargin) / 2), "yfunc");
|
|
1213
1220
|
break;
|
|
1214
1221
|
case "bottom":
|
|
1215
1222
|
case "end":
|
|
1216
|
-
i = /* @__PURE__ */
|
|
1223
|
+
i = /* @__PURE__ */ g(() => Math.round(
|
|
1217
1224
|
e.y + (n + a + 2 * e.textMargin) - e.textMargin
|
|
1218
1225
|
), "yfunc");
|
|
1219
1226
|
break;
|
|
@@ -1234,162 +1241,162 @@ var he = /* @__PURE__ */ l(function(t, e) {
|
|
|
1234
1241
|
break;
|
|
1235
1242
|
}
|
|
1236
1243
|
for (let [x, m] of s.entries()) {
|
|
1237
|
-
e.textMargin !== void 0 && e.textMargin === 0 && r !== void 0 && (
|
|
1244
|
+
e.textMargin !== void 0 && e.textMargin === 0 && r !== void 0 && (p = x * r);
|
|
1238
1245
|
const u = t.append("text");
|
|
1239
|
-
u.attr("x", e.x), u.attr("y", i()), e.anchor !== void 0 && u.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), e.fontFamily !== void 0 && u.style("font-family", e.fontFamily), c !== void 0 && u.style("font-size", c), e.fontWeight !== void 0 && u.style("font-weight", e.fontWeight), e.fill !== void 0 && u.attr("fill", e.fill), e.class !== void 0 && u.attr("class", e.class), e.dy !== void 0 ? u.attr("dy", e.dy) :
|
|
1240
|
-
const
|
|
1246
|
+
u.attr("x", e.x), u.attr("y", i()), e.anchor !== void 0 && u.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), e.fontFamily !== void 0 && u.style("font-family", e.fontFamily), c !== void 0 && u.style("font-size", c), e.fontWeight !== void 0 && u.style("font-weight", e.fontWeight), e.fill !== void 0 && u.attr("fill", e.fill), e.class !== void 0 && u.attr("class", e.class), e.dy !== void 0 ? u.attr("dy", e.dy) : p !== 0 && u.attr("dy", p);
|
|
1247
|
+
const T = m || Ae;
|
|
1241
1248
|
if (e.tspan) {
|
|
1242
1249
|
const w = u.append("tspan");
|
|
1243
|
-
w.attr("x", e.x), e.fill !== void 0 && w.attr("fill", e.fill), w.text(
|
|
1250
|
+
w.attr("x", e.x), e.fill !== void 0 && w.attr("fill", e.fill), w.text(T);
|
|
1244
1251
|
} else
|
|
1245
|
-
u.text(
|
|
1252
|
+
u.text(T);
|
|
1246
1253
|
e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (a += (u._groups || u)[0][0].getBBox().height, n = a), h.push(u);
|
|
1247
1254
|
}
|
|
1248
1255
|
return h;
|
|
1249
|
-
}, "drawText"),
|
|
1250
|
-
function n(s, r, c, h,
|
|
1251
|
-
return s + "," + r + " " + (s + c) + "," + r + " " + (s + c) + "," + (r + h -
|
|
1256
|
+
}, "drawText"), te = /* @__PURE__ */ g(function(t, e) {
|
|
1257
|
+
function n(s, r, c, h, p) {
|
|
1258
|
+
return s + "," + r + " " + (s + c) + "," + r + " " + (s + c) + "," + (r + h - p) + " " + (s + c - p * 1.2) + "," + (r + h) + " " + s + "," + (r + h);
|
|
1252
1259
|
}
|
|
1253
|
-
|
|
1260
|
+
g(n, "genPoints");
|
|
1254
1261
|
const a = t.append("polygon");
|
|
1255
|
-
return a.attr("points", n(e.x, e.y, e.width, e.height, 7)), a.attr("class", "labelBox"), e.y = e.y + e.height / 2,
|
|
1256
|
-
}, "drawLabel"),
|
|
1262
|
+
return a.attr("points", n(e.x, e.y, e.width, e.height, 7)), a.attr("class", "labelBox"), e.y = e.y + e.height / 2, mt(t, e), a;
|
|
1263
|
+
}, "drawLabel"), nt = -1, ee = /* @__PURE__ */ g((t, e, n, a) => {
|
|
1257
1264
|
t.select && n.forEach((s) => {
|
|
1258
1265
|
const r = e.get(s), c = t.select("#actor" + r.actorCnt);
|
|
1259
1266
|
!a.mirrorActors && r.stopy ? c.attr("y2", r.stopy + r.height / 2) : a.mirrorActors && c.attr("y2", r.stopy);
|
|
1260
1267
|
});
|
|
1261
|
-
}, "fixLifeLineHeights"),
|
|
1268
|
+
}, "fixLifeLineHeights"), Fe = /* @__PURE__ */ g(function(t, e, n, a) {
|
|
1262
1269
|
var s, r;
|
|
1263
|
-
const c = a ? e.stopy : e.starty, h = e.x + e.width / 2,
|
|
1270
|
+
const c = a ? e.stopy : e.starty, h = e.x + e.width / 2, p = c + e.height, i = t.append("g").lower();
|
|
1264
1271
|
var x = i;
|
|
1265
|
-
a || (
|
|
1266
|
-
const m =
|
|
1272
|
+
a || (nt++, Object.keys(e.links || {}).length && !n.forceMenus && x.attr("onclick", Ve(`actor${nt}_popup`)).attr("cursor", "pointer"), x.append("line").attr("id", "actor" + nt).attr("x1", h).attr("y1", p).attr("x2", h).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", e.name), x = i.append("g"), e.actorCnt = nt, e.links != null && x.attr("id", "root-" + nt));
|
|
1273
|
+
const m = vt();
|
|
1267
1274
|
var u = "actor";
|
|
1268
|
-
(s = e.properties) != null && s.class ? u = e.properties.class : m.fill = "#eaeaea", a ? u += ` ${
|
|
1269
|
-
const
|
|
1275
|
+
(s = e.properties) != null && s.class ? u = e.properties.class : m.fill = "#eaeaea", a ? u += ` ${Qt}` : u += ` ${Kt}`, m.x = e.x, m.y = c, m.width = e.width, m.height = e.height, m.class = u, m.rx = 3, m.ry = 3, m.name = e.name;
|
|
1276
|
+
const T = Yt(x, m);
|
|
1270
1277
|
if (e.rectData = m, (r = e.properties) != null && r.icon) {
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1278
|
+
const I = e.properties.icon.trim();
|
|
1279
|
+
I.charAt(0) === "@" ? me(x, m.x + m.width - 20, m.y + 10, I.substr(1)) : Te(x, m.x + m.width - 20, m.y + 10, I);
|
|
1273
1280
|
}
|
|
1274
|
-
|
|
1281
|
+
Vt(n, ct(e.description))(
|
|
1275
1282
|
e.description,
|
|
1276
1283
|
x,
|
|
1277
1284
|
m.x,
|
|
1278
1285
|
m.y,
|
|
1279
1286
|
m.width,
|
|
1280
1287
|
m.height,
|
|
1281
|
-
{ class: `actor ${
|
|
1288
|
+
{ class: `actor ${$e}` },
|
|
1282
1289
|
n
|
|
1283
1290
|
);
|
|
1284
1291
|
let w = e.height;
|
|
1285
|
-
if (
|
|
1286
|
-
const
|
|
1287
|
-
e.height =
|
|
1292
|
+
if (T.node) {
|
|
1293
|
+
const I = T.node().getBBox();
|
|
1294
|
+
e.height = I.height, w = I.height;
|
|
1288
1295
|
}
|
|
1289
1296
|
return w;
|
|
1290
|
-
}, "drawActorTypeParticipant"),
|
|
1297
|
+
}, "drawActorTypeParticipant"), We = /* @__PURE__ */ g(function(t, e, n, a) {
|
|
1291
1298
|
const s = a ? e.stopy : e.starty, r = e.x + e.width / 2, c = s + 80, h = t.append("g").lower();
|
|
1292
|
-
a || (
|
|
1293
|
-
const
|
|
1294
|
-
let i =
|
|
1295
|
-
a ? i += ` ${
|
|
1296
|
-
const x =
|
|
1297
|
-
x.x = e.x, x.y = s, x.fill = "#eaeaea", x.width = e.width, x.height = e.height, x.class = "actor", x.rx = 3, x.ry = 3,
|
|
1298
|
-
const m =
|
|
1299
|
+
a || (nt++, h.append("line").attr("id", "actor" + nt).attr("x1", r).attr("y1", c).attr("x2", r).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", e.name), e.actorCnt = nt);
|
|
1300
|
+
const p = t.append("g");
|
|
1301
|
+
let i = jt;
|
|
1302
|
+
a ? i += ` ${Qt}` : i += ` ${Kt}`, p.attr("class", i), p.attr("name", e.name);
|
|
1303
|
+
const x = vt();
|
|
1304
|
+
x.x = e.x, x.y = s, x.fill = "#eaeaea", x.width = e.width, x.height = e.height, x.class = "actor", x.rx = 3, x.ry = 3, p.append("line").attr("id", "actor-man-torso" + nt).attr("x1", r).attr("y1", s + 25).attr("x2", r).attr("y2", s + 45), p.append("line").attr("id", "actor-man-arms" + nt).attr("x1", r - gt / 2).attr("y1", s + 33).attr("x2", r + gt / 2).attr("y2", s + 33), p.append("line").attr("x1", r - gt / 2).attr("y1", s + 60).attr("x2", r).attr("y2", s + 45), p.append("line").attr("x1", r).attr("y1", s + 45).attr("x2", r + gt / 2 - 2).attr("y2", s + 60);
|
|
1305
|
+
const m = p.append("circle");
|
|
1299
1306
|
m.attr("cx", e.x + e.width / 2), m.attr("cy", s + 10), m.attr("r", 15), m.attr("width", e.width), m.attr("height", e.height);
|
|
1300
|
-
const u =
|
|
1301
|
-
return e.height = u.height,
|
|
1307
|
+
const u = p.node().getBBox();
|
|
1308
|
+
return e.height = u.height, Vt(n, ct(e.description))(
|
|
1302
1309
|
e.description,
|
|
1303
|
-
|
|
1310
|
+
p,
|
|
1304
1311
|
x.x,
|
|
1305
1312
|
x.y + 35,
|
|
1306
1313
|
x.width,
|
|
1307
1314
|
x.height,
|
|
1308
|
-
{ class: `actor ${
|
|
1315
|
+
{ class: `actor ${jt}` },
|
|
1309
1316
|
n
|
|
1310
1317
|
), e.height;
|
|
1311
|
-
}, "drawActorTypeActor"),
|
|
1318
|
+
}, "drawActorTypeActor"), qe = /* @__PURE__ */ g(async function(t, e, n, a) {
|
|
1312
1319
|
switch (e.type) {
|
|
1313
1320
|
case "actor":
|
|
1314
|
-
return await
|
|
1321
|
+
return await We(t, e, n, a);
|
|
1315
1322
|
case "participant":
|
|
1316
|
-
return await
|
|
1323
|
+
return await Fe(t, e, n, a);
|
|
1317
1324
|
}
|
|
1318
|
-
}, "drawActor"),
|
|
1325
|
+
}, "drawActor"), ze = /* @__PURE__ */ g(function(t, e, n) {
|
|
1319
1326
|
const a = t.append("g");
|
|
1320
|
-
|
|
1327
|
+
ae(a, e), e.name && Vt(n)(
|
|
1321
1328
|
e.name,
|
|
1322
1329
|
a,
|
|
1323
1330
|
e.x,
|
|
1324
|
-
e.y + (e.textMaxHeight || 0) / 2,
|
|
1331
|
+
e.y + n.boxTextMargin + (e.textMaxHeight || 0) / 2,
|
|
1325
1332
|
e.width,
|
|
1326
1333
|
0,
|
|
1327
1334
|
{ class: "text" },
|
|
1328
1335
|
n
|
|
1329
1336
|
), a.lower();
|
|
1330
|
-
}, "drawBox"),
|
|
1337
|
+
}, "drawBox"), He = /* @__PURE__ */ g(function(t) {
|
|
1331
1338
|
return t.append("g");
|
|
1332
|
-
}, "anchorElement"),
|
|
1333
|
-
const r =
|
|
1334
|
-
r.x = e.startx, r.y = e.starty, r.class = "activation" + s % 3, r.width = e.stopx - e.startx, r.height = n - e.starty,
|
|
1335
|
-
}, "drawActivation"),
|
|
1339
|
+
}, "anchorElement"), Ue = /* @__PURE__ */ g(function(t, e, n, a, s) {
|
|
1340
|
+
const r = vt(), c = e.anchored;
|
|
1341
|
+
r.x = e.startx, r.y = e.starty, r.class = "activation" + s % 3, r.width = e.stopx - e.startx, r.height = n - e.starty, Yt(c, r);
|
|
1342
|
+
}, "drawActivation"), je = /* @__PURE__ */ g(async function(t, e, n, a) {
|
|
1336
1343
|
const {
|
|
1337
1344
|
boxMargin: s,
|
|
1338
1345
|
boxTextMargin: r,
|
|
1339
1346
|
labelBoxHeight: c,
|
|
1340
1347
|
labelBoxWidth: h,
|
|
1341
|
-
messageFontFamily:
|
|
1348
|
+
messageFontFamily: p,
|
|
1342
1349
|
messageFontSize: i,
|
|
1343
1350
|
messageFontWeight: x
|
|
1344
|
-
} = a, m = t.append("g"), u = /* @__PURE__ */
|
|
1345
|
-
return m.append("line").attr("x1",
|
|
1351
|
+
} = a, m = t.append("g"), u = /* @__PURE__ */ g(function(I, _, R, M) {
|
|
1352
|
+
return m.append("line").attr("x1", I).attr("y1", _).attr("x2", R).attr("y2", M).attr("class", "loopLine");
|
|
1346
1353
|
}, "drawLoopLine");
|
|
1347
|
-
u(e.startx, e.starty, e.stopx, e.starty), u(e.stopx, e.starty, e.stopx, e.stopy), u(e.startx, e.stopy, e.stopx, e.stopy), u(e.startx, e.starty, e.startx, e.stopy), e.sections !== void 0 && e.sections.forEach(function(
|
|
1348
|
-
u(e.startx,
|
|
1354
|
+
u(e.startx, e.starty, e.stopx, e.starty), u(e.stopx, e.starty, e.stopx, e.stopy), u(e.startx, e.stopy, e.stopx, e.stopy), u(e.startx, e.starty, e.startx, e.stopy), e.sections !== void 0 && e.sections.forEach(function(I) {
|
|
1355
|
+
u(e.startx, I.y, e.stopx, I.y).style(
|
|
1349
1356
|
"stroke-dasharray",
|
|
1350
1357
|
"3, 3"
|
|
1351
1358
|
);
|
|
1352
1359
|
});
|
|
1353
|
-
let
|
|
1354
|
-
|
|
1355
|
-
let w =
|
|
1360
|
+
let T = $t();
|
|
1361
|
+
T.text = n, T.x = e.startx, T.y = e.starty, T.fontFamily = p, T.fontSize = i, T.fontWeight = x, T.anchor = "middle", T.valign = "middle", T.tspan = !1, T.width = h || 50, T.height = c || 20, T.textMargin = r, T.class = "labelText", te(m, T), T = se(), T.text = e.title, T.x = e.startx + h / 2 + (e.stopx - e.startx) / 2, T.y = e.starty + s + r, T.anchor = "middle", T.valign = "middle", T.textMargin = r, T.class = "loopText", T.fontFamily = p, T.fontSize = i, T.fontWeight = x, T.wrap = !0;
|
|
1362
|
+
let w = ct(T.text) ? await Pt(m, T, e) : mt(m, T);
|
|
1356
1363
|
if (e.sectionTitles !== void 0) {
|
|
1357
|
-
for (const [
|
|
1358
|
-
if (
|
|
1359
|
-
|
|
1360
|
-
let
|
|
1361
|
-
w.map((
|
|
1364
|
+
for (const [I, _] of Object.entries(e.sectionTitles))
|
|
1365
|
+
if (_.message) {
|
|
1366
|
+
T.text = _.message, T.x = e.startx + (e.stopx - e.startx) / 2, T.y = e.sections[I].y + s + r, T.class = "loopText", T.anchor = "middle", T.valign = "middle", T.tspan = !1, T.fontFamily = p, T.fontSize = i, T.fontWeight = x, T.wrap = e.wrap, ct(T.text) ? (e.starty = e.sections[I].y, await Pt(m, T, e)) : mt(m, T);
|
|
1367
|
+
let R = Math.round(
|
|
1368
|
+
w.map((M) => (M._groups || M)[0][0].getBBox().height).reduce((M, C) => M + C)
|
|
1362
1369
|
);
|
|
1363
|
-
e.sections[
|
|
1370
|
+
e.sections[I].height += R - (s + r);
|
|
1364
1371
|
}
|
|
1365
1372
|
}
|
|
1366
1373
|
return e.height = Math.round(e.stopy - e.starty), m;
|
|
1367
|
-
}, "drawLoop"),
|
|
1368
|
-
|
|
1369
|
-
}, "drawBackgroundRect"),
|
|
1374
|
+
}, "drawLoop"), ae = /* @__PURE__ */ g(function(t, e) {
|
|
1375
|
+
xe(t, e);
|
|
1376
|
+
}, "drawBackgroundRect"), Xe = /* @__PURE__ */ g(function(t) {
|
|
1370
1377
|
t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
|
|
1371
1378
|
"d",
|
|
1372
1379
|
"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"
|
|
1373
1380
|
);
|
|
1374
|
-
}, "insertDatabaseIcon"),
|
|
1381
|
+
}, "insertDatabaseIcon"), Ge = /* @__PURE__ */ g(function(t) {
|
|
1375
1382
|
t.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1376
1383
|
"d",
|
|
1377
1384
|
"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"
|
|
1378
1385
|
);
|
|
1379
|
-
}, "insertComputerIcon"),
|
|
1386
|
+
}, "insertComputerIcon"), Je = /* @__PURE__ */ g(function(t) {
|
|
1380
1387
|
t.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1381
1388
|
"d",
|
|
1382
1389
|
"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"
|
|
1383
1390
|
);
|
|
1384
|
-
}, "insertClockIcon"),
|
|
1391
|
+
}, "insertClockIcon"), Ze = /* @__PURE__ */ g(function(t) {
|
|
1385
1392
|
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-start-reverse").append("path").attr("d", "M -1 0 L 10 5 L 0 10 z");
|
|
1386
|
-
}, "insertArrowHead"),
|
|
1393
|
+
}, "insertArrowHead"), Ke = /* @__PURE__ */ g(function(t) {
|
|
1387
1394
|
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");
|
|
1388
|
-
}, "insertArrowFilledHead"),
|
|
1395
|
+
}, "insertArrowFilledHead"), Qe = /* @__PURE__ */ g(function(t) {
|
|
1389
1396
|
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);
|
|
1390
|
-
}, "insertSequenceNumber"),
|
|
1397
|
+
}, "insertSequenceNumber"), ta = /* @__PURE__ */ g(function(t) {
|
|
1391
1398
|
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");
|
|
1392
|
-
}, "insertArrowCrossHead"),
|
|
1399
|
+
}, "insertArrowCrossHead"), se = /* @__PURE__ */ g(function() {
|
|
1393
1400
|
return {
|
|
1394
1401
|
x: 0,
|
|
1395
1402
|
y: 0,
|
|
@@ -1404,7 +1411,7 @@ var he = /* @__PURE__ */ l(function(t, e) {
|
|
|
1404
1411
|
tspan: !0,
|
|
1405
1412
|
valign: void 0
|
|
1406
1413
|
};
|
|
1407
|
-
}, "getTextObj"),
|
|
1414
|
+
}, "getTextObj"), ea = /* @__PURE__ */ g(function() {
|
|
1408
1415
|
return {
|
|
1409
1416
|
x: 0,
|
|
1410
1417
|
y: 0,
|
|
@@ -1416,85 +1423,85 @@ var he = /* @__PURE__ */ l(function(t, e) {
|
|
|
1416
1423
|
rx: 0,
|
|
1417
1424
|
ry: 0
|
|
1418
1425
|
};
|
|
1419
|
-
}, "getNoteRect"),
|
|
1420
|
-
function t(r, c, h,
|
|
1421
|
-
const u = c.append("text").attr("x", h + i / 2).attr("y",
|
|
1426
|
+
}, "getNoteRect"), Vt = /* @__PURE__ */ function() {
|
|
1427
|
+
function t(r, c, h, p, i, x, m) {
|
|
1428
|
+
const u = c.append("text").attr("x", h + i / 2).attr("y", p + x / 2 + 5).style("text-anchor", "middle").text(r);
|
|
1422
1429
|
s(u, m);
|
|
1423
1430
|
}
|
|
1424
|
-
|
|
1425
|
-
function e(r, c, h,
|
|
1426
|
-
const { actorFontSize:
|
|
1427
|
-
for (let
|
|
1428
|
-
const S =
|
|
1429
|
-
|
|
1431
|
+
g(t, "byText");
|
|
1432
|
+
function e(r, c, h, p, i, x, m, u) {
|
|
1433
|
+
const { actorFontSize: T, actorFontFamily: w, actorFontWeight: I } = u, [_, R] = Jt(T), M = r.split(L.lineBreakRegex);
|
|
1434
|
+
for (let C = 0; C < M.length; C++) {
|
|
1435
|
+
const S = C * _ - _ * (M.length - 1) / 2, V = c.append("text").attr("x", h + i / 2).attr("y", p).style("text-anchor", "middle").style("font-size", R).style("font-weight", I).style("font-family", w);
|
|
1436
|
+
V.append("tspan").attr("x", h + i / 2).attr("dy", S).text(M[C]), V.attr("y", p + x / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), s(V, m);
|
|
1430
1437
|
}
|
|
1431
1438
|
}
|
|
1432
|
-
|
|
1433
|
-
function n(r, c, h,
|
|
1434
|
-
const
|
|
1435
|
-
w.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(r), e(r,
|
|
1439
|
+
g(e, "byTspan");
|
|
1440
|
+
function n(r, c, h, p, i, x, m, u) {
|
|
1441
|
+
const T = c.append("switch"), w = T.append("foreignObject").attr("x", h).attr("y", p).attr("width", i).attr("height", x).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1442
|
+
w.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(r), e(r, T, h, p, i, x, m, u), s(w, m);
|
|
1436
1443
|
}
|
|
1437
|
-
|
|
1438
|
-
async function a(r, c, h,
|
|
1439
|
-
const
|
|
1440
|
-
|
|
1444
|
+
g(n, "byFo");
|
|
1445
|
+
async function a(r, c, h, p, i, x, m, u) {
|
|
1446
|
+
const T = await Tt(r, Dt()), w = c.append("switch"), I = w.append("foreignObject").attr("x", h + i / 2 - T.width / 2).attr("y", p + x / 2 - T.height / 2).attr("width", T.width).attr("height", T.height).append("xhtml:div").style("height", "100%").style("width", "100%");
|
|
1447
|
+
I.append("div").style("text-align", "center").style("vertical-align", "middle").html(await Zt(r, Dt())), e(r, w, h, p, i, x, m, u), s(I, m);
|
|
1441
1448
|
}
|
|
1442
|
-
|
|
1449
|
+
g(a, "byKatex");
|
|
1443
1450
|
function s(r, c) {
|
|
1444
1451
|
for (const h in c)
|
|
1445
1452
|
c.hasOwnProperty(h) && r.attr(h, c[h]);
|
|
1446
1453
|
}
|
|
1447
|
-
return
|
|
1454
|
+
return g(s, "_setTextAttrs"), function(r, c = !1) {
|
|
1448
1455
|
return c ? a : r.textPlacement === "fo" ? n : r.textPlacement === "old" ? t : e;
|
|
1449
1456
|
};
|
|
1450
|
-
}(),
|
|
1451
|
-
function t(s, r, c, h,
|
|
1457
|
+
}(), aa = /* @__PURE__ */ function() {
|
|
1458
|
+
function t(s, r, c, h, p, i, x) {
|
|
1452
1459
|
const m = r.append("text").attr("x", c).attr("y", h).style("text-anchor", "start").text(s);
|
|
1453
1460
|
a(m, x);
|
|
1454
1461
|
}
|
|
1455
|
-
|
|
1456
|
-
function e(s, r, c, h,
|
|
1457
|
-
const { actorFontSize: u, actorFontFamily:
|
|
1458
|
-
for (let
|
|
1459
|
-
const
|
|
1460
|
-
|
|
1462
|
+
g(t, "byText");
|
|
1463
|
+
function e(s, r, c, h, p, i, x, m) {
|
|
1464
|
+
const { actorFontSize: u, actorFontFamily: T, actorFontWeight: w } = m, I = s.split(L.lineBreakRegex);
|
|
1465
|
+
for (let _ = 0; _ < I.length; _++) {
|
|
1466
|
+
const R = _ * u - u * (I.length - 1) / 2, M = r.append("text").attr("x", c).attr("y", h).style("text-anchor", "start").style("font-size", u).style("font-weight", w).style("font-family", T);
|
|
1467
|
+
M.append("tspan").attr("x", c).attr("dy", R).text(I[_]), M.attr("y", h + i / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(M, x);
|
|
1461
1468
|
}
|
|
1462
1469
|
}
|
|
1463
|
-
|
|
1464
|
-
function n(s, r, c, h,
|
|
1465
|
-
const u = r.append("switch"),
|
|
1466
|
-
|
|
1470
|
+
g(e, "byTspan");
|
|
1471
|
+
function n(s, r, c, h, p, i, x, m) {
|
|
1472
|
+
const u = r.append("switch"), T = u.append("foreignObject").attr("x", c).attr("y", h).attr("width", p).attr("height", i).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1473
|
+
T.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), e(s, u, c, h, p, i, x, m), a(T, x);
|
|
1467
1474
|
}
|
|
1468
|
-
|
|
1475
|
+
g(n, "byFo");
|
|
1469
1476
|
function a(s, r) {
|
|
1470
1477
|
for (const c in r)
|
|
1471
1478
|
r.hasOwnProperty(c) && s.attr(c, r[c]);
|
|
1472
1479
|
}
|
|
1473
|
-
return
|
|
1480
|
+
return g(a, "_setTextAttrs"), function(s) {
|
|
1474
1481
|
return s.textPlacement === "fo" ? n : s.textPlacement === "old" ? t : e;
|
|
1475
1482
|
};
|
|
1476
|
-
}(),
|
|
1477
|
-
drawRect:
|
|
1478
|
-
drawText:
|
|
1479
|
-
drawLabel:
|
|
1480
|
-
drawActor:
|
|
1481
|
-
drawBox:
|
|
1482
|
-
drawPopup:
|
|
1483
|
-
anchorElement:
|
|
1484
|
-
drawActivation:
|
|
1485
|
-
drawLoop:
|
|
1486
|
-
drawBackgroundRect:
|
|
1487
|
-
insertArrowHead:
|
|
1488
|
-
insertArrowFilledHead:
|
|
1489
|
-
insertSequenceNumber:
|
|
1490
|
-
insertArrowCrossHead:
|
|
1491
|
-
insertDatabaseIcon:
|
|
1492
|
-
insertComputerIcon:
|
|
1493
|
-
insertClockIcon:
|
|
1494
|
-
getTextObj:
|
|
1495
|
-
getNoteRect:
|
|
1496
|
-
fixLifeLineHeights:
|
|
1497
|
-
sanitizeUrl:
|
|
1483
|
+
}(), D = {
|
|
1484
|
+
drawRect: Yt,
|
|
1485
|
+
drawText: mt,
|
|
1486
|
+
drawLabel: te,
|
|
1487
|
+
drawActor: qe,
|
|
1488
|
+
drawBox: ze,
|
|
1489
|
+
drawPopup: Ye,
|
|
1490
|
+
anchorElement: He,
|
|
1491
|
+
drawActivation: Ue,
|
|
1492
|
+
drawLoop: je,
|
|
1493
|
+
drawBackgroundRect: ae,
|
|
1494
|
+
insertArrowHead: Ze,
|
|
1495
|
+
insertArrowFilledHead: Ke,
|
|
1496
|
+
insertSequenceNumber: Qe,
|
|
1497
|
+
insertArrowCrossHead: ta,
|
|
1498
|
+
insertDatabaseIcon: Xe,
|
|
1499
|
+
insertComputerIcon: Ge,
|
|
1500
|
+
insertClockIcon: Je,
|
|
1501
|
+
getTextObj: se,
|
|
1502
|
+
getNoteRect: ea,
|
|
1503
|
+
fixLifeLineHeights: ee,
|
|
1504
|
+
sanitizeUrl: Gt.sanitizeUrl
|
|
1498
1505
|
}, o = {}, y = {
|
|
1499
1506
|
data: {
|
|
1500
1507
|
startx: void 0,
|
|
@@ -1506,40 +1513,40 @@ var he = /* @__PURE__ */ l(function(t, e) {
|
|
|
1506
1513
|
sequenceItems: [],
|
|
1507
1514
|
activations: [],
|
|
1508
1515
|
models: {
|
|
1509
|
-
getHeight: /* @__PURE__ */
|
|
1516
|
+
getHeight: /* @__PURE__ */ g(function() {
|
|
1510
1517
|
return Math.max.apply(
|
|
1511
1518
|
null,
|
|
1512
1519
|
this.actors.length === 0 ? [0] : this.actors.map((t) => t.height || 0)
|
|
1513
1520
|
) + (this.loops.length === 0 ? 0 : this.loops.map((t) => t.height || 0).reduce((t, e) => t + e)) + (this.messages.length === 0 ? 0 : this.messages.map((t) => t.height || 0).reduce((t, e) => t + e)) + (this.notes.length === 0 ? 0 : this.notes.map((t) => t.height || 0).reduce((t, e) => t + e));
|
|
1514
1521
|
}, "getHeight"),
|
|
1515
|
-
clear: /* @__PURE__ */
|
|
1522
|
+
clear: /* @__PURE__ */ g(function() {
|
|
1516
1523
|
this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
|
|
1517
1524
|
}, "clear"),
|
|
1518
|
-
addBox: /* @__PURE__ */
|
|
1525
|
+
addBox: /* @__PURE__ */ g(function(t) {
|
|
1519
1526
|
this.boxes.push(t);
|
|
1520
1527
|
}, "addBox"),
|
|
1521
|
-
addActor: /* @__PURE__ */
|
|
1528
|
+
addActor: /* @__PURE__ */ g(function(t) {
|
|
1522
1529
|
this.actors.push(t);
|
|
1523
1530
|
}, "addActor"),
|
|
1524
|
-
addLoop: /* @__PURE__ */
|
|
1531
|
+
addLoop: /* @__PURE__ */ g(function(t) {
|
|
1525
1532
|
this.loops.push(t);
|
|
1526
1533
|
}, "addLoop"),
|
|
1527
|
-
addMessage: /* @__PURE__ */
|
|
1534
|
+
addMessage: /* @__PURE__ */ g(function(t) {
|
|
1528
1535
|
this.messages.push(t);
|
|
1529
1536
|
}, "addMessage"),
|
|
1530
|
-
addNote: /* @__PURE__ */
|
|
1537
|
+
addNote: /* @__PURE__ */ g(function(t) {
|
|
1531
1538
|
this.notes.push(t);
|
|
1532
1539
|
}, "addNote"),
|
|
1533
|
-
lastActor: /* @__PURE__ */
|
|
1540
|
+
lastActor: /* @__PURE__ */ g(function() {
|
|
1534
1541
|
return this.actors[this.actors.length - 1];
|
|
1535
1542
|
}, "lastActor"),
|
|
1536
|
-
lastLoop: /* @__PURE__ */
|
|
1543
|
+
lastLoop: /* @__PURE__ */ g(function() {
|
|
1537
1544
|
return this.loops[this.loops.length - 1];
|
|
1538
1545
|
}, "lastLoop"),
|
|
1539
|
-
lastMessage: /* @__PURE__ */
|
|
1546
|
+
lastMessage: /* @__PURE__ */ g(function() {
|
|
1540
1547
|
return this.messages[this.messages.length - 1];
|
|
1541
1548
|
}, "lastMessage"),
|
|
1542
|
-
lastNote: /* @__PURE__ */
|
|
1549
|
+
lastNote: /* @__PURE__ */ g(function() {
|
|
1543
1550
|
return this.notes[this.notes.length - 1];
|
|
1544
1551
|
}, "lastNote"),
|
|
1545
1552
|
actors: [],
|
|
@@ -1548,51 +1555,51 @@ var he = /* @__PURE__ */ l(function(t, e) {
|
|
|
1548
1555
|
messages: [],
|
|
1549
1556
|
notes: []
|
|
1550
1557
|
},
|
|
1551
|
-
init: /* @__PURE__ */
|
|
1558
|
+
init: /* @__PURE__ */ g(function() {
|
|
1552
1559
|
this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = {
|
|
1553
1560
|
startx: void 0,
|
|
1554
1561
|
stopx: void 0,
|
|
1555
1562
|
starty: void 0,
|
|
1556
1563
|
stopy: void 0
|
|
1557
|
-
}, this.verticalPos = 0,
|
|
1564
|
+
}, this.verticalPos = 0, oe(Q());
|
|
1558
1565
|
}, "init"),
|
|
1559
|
-
updateVal: /* @__PURE__ */
|
|
1566
|
+
updateVal: /* @__PURE__ */ g(function(t, e, n, a) {
|
|
1560
1567
|
t[e] === void 0 ? t[e] = n : t[e] = a(n, t[e]);
|
|
1561
1568
|
}, "updateVal"),
|
|
1562
|
-
updateBounds: /* @__PURE__ */
|
|
1569
|
+
updateBounds: /* @__PURE__ */ g(function(t, e, n, a) {
|
|
1563
1570
|
const s = this;
|
|
1564
1571
|
let r = 0;
|
|
1565
1572
|
function c(h) {
|
|
1566
|
-
return /* @__PURE__ */
|
|
1573
|
+
return /* @__PURE__ */ g(function(p) {
|
|
1567
1574
|
r++;
|
|
1568
1575
|
const i = s.sequenceItems.length - r + 1;
|
|
1569
|
-
s.updateVal(
|
|
1576
|
+
s.updateVal(p, "starty", e - i * o.boxMargin, Math.min), s.updateVal(p, "stopy", a + i * o.boxMargin, Math.max), s.updateVal(y.data, "startx", t - i * o.boxMargin, Math.min), s.updateVal(y.data, "stopx", n + i * o.boxMargin, Math.max), h !== "activation" && (s.updateVal(p, "startx", t - i * o.boxMargin, Math.min), s.updateVal(p, "stopx", n + i * o.boxMargin, Math.max), s.updateVal(y.data, "starty", e - i * o.boxMargin, Math.min), s.updateVal(y.data, "stopy", a + i * o.boxMargin, Math.max));
|
|
1570
1577
|
}, "updateItemBounds");
|
|
1571
1578
|
}
|
|
1572
|
-
|
|
1579
|
+
g(c, "updateFn"), this.sequenceItems.forEach(c()), this.activations.forEach(c("activation"));
|
|
1573
1580
|
}, "updateBounds"),
|
|
1574
|
-
insert: /* @__PURE__ */
|
|
1575
|
-
const s =
|
|
1581
|
+
insert: /* @__PURE__ */ g(function(t, e, n, a) {
|
|
1582
|
+
const s = L.getMin(t, n), r = L.getMax(t, n), c = L.getMin(e, a), h = L.getMax(e, a);
|
|
1576
1583
|
this.updateVal(y.data, "startx", s, Math.min), this.updateVal(y.data, "starty", c, Math.min), this.updateVal(y.data, "stopx", r, Math.max), this.updateVal(y.data, "stopy", h, Math.max), this.updateBounds(s, c, r, h);
|
|
1577
1584
|
}, "insert"),
|
|
1578
|
-
newActivation: /* @__PURE__ */
|
|
1579
|
-
const a = n.get(t.from), s =
|
|
1585
|
+
newActivation: /* @__PURE__ */ g(function(t, e, n) {
|
|
1586
|
+
const a = n.get(t.from), s = _t(t.from).length || 0, r = a.x + a.width / 2 + (s - 1) * o.activationWidth / 2;
|
|
1580
1587
|
this.activations.push({
|
|
1581
1588
|
startx: r,
|
|
1582
1589
|
starty: this.verticalPos + 2,
|
|
1583
1590
|
stopx: r + o.activationWidth,
|
|
1584
1591
|
stopy: void 0,
|
|
1585
1592
|
actor: t.from,
|
|
1586
|
-
anchored:
|
|
1593
|
+
anchored: D.anchorElement(e)
|
|
1587
1594
|
});
|
|
1588
1595
|
}, "newActivation"),
|
|
1589
|
-
endActivation: /* @__PURE__ */
|
|
1596
|
+
endActivation: /* @__PURE__ */ g(function(t) {
|
|
1590
1597
|
const e = this.activations.map(function(n) {
|
|
1591
1598
|
return n.actor;
|
|
1592
1599
|
}).lastIndexOf(t.from);
|
|
1593
1600
|
return this.activations.splice(e, 1)[0];
|
|
1594
1601
|
}, "endActivation"),
|
|
1595
|
-
createLoop: /* @__PURE__ */
|
|
1602
|
+
createLoop: /* @__PURE__ */ g(function(t = { message: void 0, wrap: !1, width: void 0 }, e) {
|
|
1596
1603
|
return {
|
|
1597
1604
|
startx: void 0,
|
|
1598
1605
|
starty: this.verticalPos,
|
|
@@ -1605,69 +1612,69 @@ var he = /* @__PURE__ */ l(function(t, e) {
|
|
|
1605
1612
|
fill: e
|
|
1606
1613
|
};
|
|
1607
1614
|
}, "createLoop"),
|
|
1608
|
-
newLoop: /* @__PURE__ */
|
|
1615
|
+
newLoop: /* @__PURE__ */ g(function(t = { message: void 0, wrap: !1, width: void 0 }, e) {
|
|
1609
1616
|
this.sequenceItems.push(this.createLoop(t, e));
|
|
1610
1617
|
}, "newLoop"),
|
|
1611
|
-
endLoop: /* @__PURE__ */
|
|
1618
|
+
endLoop: /* @__PURE__ */ g(function() {
|
|
1612
1619
|
return this.sequenceItems.pop();
|
|
1613
1620
|
}, "endLoop"),
|
|
1614
|
-
isLoopOverlap: /* @__PURE__ */
|
|
1621
|
+
isLoopOverlap: /* @__PURE__ */ g(function() {
|
|
1615
1622
|
return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : !1;
|
|
1616
1623
|
}, "isLoopOverlap"),
|
|
1617
|
-
addSectionToLoop: /* @__PURE__ */
|
|
1624
|
+
addSectionToLoop: /* @__PURE__ */ g(function(t) {
|
|
1618
1625
|
const e = this.sequenceItems.pop();
|
|
1619
1626
|
e.sections = e.sections || [], e.sectionTitles = e.sectionTitles || [], e.sections.push({ y: y.getVerticalPos(), height: 0 }), e.sectionTitles.push(t), this.sequenceItems.push(e);
|
|
1620
1627
|
}, "addSectionToLoop"),
|
|
1621
|
-
saveVerticalPos: /* @__PURE__ */
|
|
1628
|
+
saveVerticalPos: /* @__PURE__ */ g(function() {
|
|
1622
1629
|
this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
|
|
1623
1630
|
}, "saveVerticalPos"),
|
|
1624
|
-
resetVerticalPos: /* @__PURE__ */
|
|
1631
|
+
resetVerticalPos: /* @__PURE__ */ g(function() {
|
|
1625
1632
|
this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
|
|
1626
1633
|
}, "resetVerticalPos"),
|
|
1627
|
-
bumpVerticalPos: /* @__PURE__ */
|
|
1628
|
-
this.verticalPos = this.verticalPos + t, this.data.stopy =
|
|
1634
|
+
bumpVerticalPos: /* @__PURE__ */ g(function(t) {
|
|
1635
|
+
this.verticalPos = this.verticalPos + t, this.data.stopy = L.getMax(this.data.stopy, this.verticalPos);
|
|
1629
1636
|
}, "bumpVerticalPos"),
|
|
1630
|
-
getVerticalPos: /* @__PURE__ */
|
|
1637
|
+
getVerticalPos: /* @__PURE__ */ g(function() {
|
|
1631
1638
|
return this.verticalPos;
|
|
1632
1639
|
}, "getVerticalPos"),
|
|
1633
|
-
getBounds: /* @__PURE__ */
|
|
1640
|
+
getBounds: /* @__PURE__ */ g(function() {
|
|
1634
1641
|
return { bounds: this.data, models: this.models };
|
|
1635
1642
|
}, "getBounds")
|
|
1636
|
-
},
|
|
1643
|
+
}, sa = /* @__PURE__ */ g(async function(t, e) {
|
|
1637
1644
|
y.bumpVerticalPos(o.boxMargin), e.height = o.boxMargin, e.starty = y.getVerticalPos();
|
|
1638
|
-
const n =
|
|
1645
|
+
const n = vt();
|
|
1639
1646
|
n.x = e.startx, n.y = e.starty, n.width = e.width || o.width, n.class = "note";
|
|
1640
|
-
const a = t.append("g"), s =
|
|
1647
|
+
const a = t.append("g"), s = D.drawRect(a, n), r = $t();
|
|
1641
1648
|
r.x = e.startx, r.y = e.starty, r.width = n.width, r.dy = "1em", r.text = e.message, r.class = "noteText", r.fontFamily = o.noteFontFamily, r.fontSize = o.noteFontSize, r.fontWeight = o.noteFontWeight, r.anchor = o.noteAlign, r.textMargin = o.noteMargin, r.valign = "center";
|
|
1642
|
-
const c =
|
|
1643
|
-
c.map((
|
|
1649
|
+
const c = ct(r.text) ? await Pt(a, r) : mt(a, r), h = Math.round(
|
|
1650
|
+
c.map((p) => (p._groups || p)[0][0].getBBox().height).reduce((p, i) => p + i)
|
|
1644
1651
|
);
|
|
1645
1652
|
s.attr("height", h + 2 * o.noteMargin), e.height += h + 2 * o.noteMargin, y.bumpVerticalPos(h + 2 * o.noteMargin), e.stopy = e.starty + h + 2 * o.noteMargin, e.stopx = e.startx + n.width, y.insert(e.startx, e.starty, e.stopx, e.stopy), y.models.addNote(e);
|
|
1646
|
-
}, "drawNote"),
|
|
1653
|
+
}, "drawNote"), ut = /* @__PURE__ */ g((t) => ({
|
|
1647
1654
|
fontFamily: t.messageFontFamily,
|
|
1648
1655
|
fontSize: t.messageFontSize,
|
|
1649
1656
|
fontWeight: t.messageFontWeight
|
|
1650
|
-
}), "messageFont"),
|
|
1657
|
+
}), "messageFont"), yt = /* @__PURE__ */ g((t) => ({
|
|
1651
1658
|
fontFamily: t.noteFontFamily,
|
|
1652
1659
|
fontSize: t.noteFontSize,
|
|
1653
1660
|
fontWeight: t.noteFontWeight
|
|
1654
|
-
}), "noteFont"),
|
|
1661
|
+
}), "noteFont"), Ct = /* @__PURE__ */ g((t) => ({
|
|
1655
1662
|
fontFamily: t.actorFontFamily,
|
|
1656
1663
|
fontSize: t.actorFontSize,
|
|
1657
1664
|
fontWeight: t.actorFontWeight
|
|
1658
1665
|
}), "actorFont");
|
|
1659
|
-
async function
|
|
1666
|
+
async function re(t, e) {
|
|
1660
1667
|
y.bumpVerticalPos(10);
|
|
1661
|
-
const { startx: n, stopx: a, message: s } = e, r =
|
|
1668
|
+
const { startx: n, stopx: a, message: s } = e, r = L.splitBreaks(s).length, c = ct(s), h = c ? await Tt(s, Q()) : $.calculateTextDimensions(s, ut(o));
|
|
1662
1669
|
if (!c) {
|
|
1663
1670
|
const m = h.height / r;
|
|
1664
1671
|
e.height += m, y.bumpVerticalPos(m);
|
|
1665
1672
|
}
|
|
1666
|
-
let
|
|
1673
|
+
let p, i = h.height - 10;
|
|
1667
1674
|
const x = h.width;
|
|
1668
1675
|
if (n === a) {
|
|
1669
|
-
|
|
1670
|
-
const m =
|
|
1676
|
+
p = y.getVerticalPos() + i, o.rightAngles || (i += o.boxMargin, p = y.getVerticalPos() + i), i += 30;
|
|
1677
|
+
const m = L.getMax(x / 2, o.width / 2);
|
|
1671
1678
|
y.insert(
|
|
1672
1679
|
n - m,
|
|
1673
1680
|
y.getVerticalPos() - 10 + i,
|
|
@@ -1675,54 +1682,54 @@ async function Te(t, e) {
|
|
|
1675
1682
|
y.getVerticalPos() + 30 + i
|
|
1676
1683
|
);
|
|
1677
1684
|
} else
|
|
1678
|
-
i += o.boxMargin,
|
|
1679
|
-
return y.bumpVerticalPos(i), e.height += i, e.stopy = e.starty + e.height, y.insert(e.fromBounds, e.starty, e.toBounds, e.stopy),
|
|
1685
|
+
i += o.boxMargin, p = y.getVerticalPos() + i, y.insert(n, p - 10, a, p);
|
|
1686
|
+
return y.bumpVerticalPos(i), e.height += i, e.stopy = e.starty + e.height, y.insert(e.fromBounds, e.starty, e.toBounds, e.stopy), p;
|
|
1680
1687
|
}
|
|
1681
|
-
|
|
1682
|
-
var
|
|
1683
|
-
const { startx: s, stopx: r, starty: c, message: h, type:
|
|
1684
|
-
u.x = s, u.y = c + 10, u.width = r - s, u.class = "messageText", u.dy = "1em", u.text = h, u.fontFamily = o.messageFontFamily, u.fontSize = o.messageFontSize, u.fontWeight = o.messageFontWeight, u.anchor = o.messageAlign, u.valign = "center", u.textMargin = o.wrapPadding, u.tspan = !1,
|
|
1685
|
-
const
|
|
1688
|
+
g(re, "boundMessage");
|
|
1689
|
+
var ra = /* @__PURE__ */ g(async function(t, e, n, a) {
|
|
1690
|
+
const { startx: s, stopx: r, starty: c, message: h, type: p, sequenceIndex: i, sequenceVisible: x } = e, m = $.calculateTextDimensions(h, ut(o)), u = $t();
|
|
1691
|
+
u.x = s, u.y = c + 10, u.width = r - s, u.class = "messageText", u.dy = "1em", u.text = h, u.fontFamily = o.messageFontFamily, u.fontSize = o.messageFontSize, u.fontWeight = o.messageFontWeight, u.anchor = o.messageAlign, u.valign = "center", u.textMargin = o.wrapPadding, u.tspan = !1, ct(u.text) ? await Pt(t, u, { startx: s, stopx: r, starty: n }) : mt(t, u);
|
|
1692
|
+
const T = m.width;
|
|
1686
1693
|
let w;
|
|
1687
1694
|
s === r ? o.rightAngles ? w = t.append("path").attr(
|
|
1688
1695
|
"d",
|
|
1689
|
-
`M ${s},${n} H ${s +
|
|
1696
|
+
`M ${s},${n} H ${s + L.getMax(o.width / 2, T / 2)} V ${n + 25} H ${s}`
|
|
1690
1697
|
) : w = t.append("path").attr(
|
|
1691
1698
|
"d",
|
|
1692
1699
|
"M " + s + "," + n + " C " + (s + 60) + "," + (n - 10) + " " + (s + 60) + "," + (n + 30) + " " + s + "," + (n + 20)
|
|
1693
|
-
) : (w = t.append("line"), w.attr("x1", s), w.attr("y1", n), w.attr("x2", r), w.attr("y2", n)),
|
|
1694
|
-
let
|
|
1695
|
-
o.arrowMarkerAbsolute && (
|
|
1696
|
-
}, "drawMessage"),
|
|
1697
|
-
let h = 0,
|
|
1700
|
+
) : (w = t.append("line"), w.attr("x1", s), w.attr("y1", n), w.attr("x2", r), w.attr("y2", n)), p === a.db.LINETYPE.DOTTED || p === a.db.LINETYPE.DOTTED_CROSS || p === a.db.LINETYPE.DOTTED_POINT || p === a.db.LINETYPE.DOTTED_OPEN || p === a.db.LINETYPE.BIDIRECTIONAL_DOTTED ? (w.style("stroke-dasharray", "3, 3"), w.attr("class", "messageLine1")) : w.attr("class", "messageLine0");
|
|
1701
|
+
let I = "";
|
|
1702
|
+
o.arrowMarkerAbsolute && (I = Ne(!0)), w.attr("stroke-width", 2), w.attr("stroke", "none"), w.style("fill", "none"), (p === a.db.LINETYPE.SOLID || p === a.db.LINETYPE.DOTTED) && w.attr("marker-end", "url(" + I + "#arrowhead)"), (p === a.db.LINETYPE.BIDIRECTIONAL_SOLID || p === a.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (w.attr("marker-start", "url(" + I + "#arrowhead)"), w.attr("marker-end", "url(" + I + "#arrowhead)")), (p === a.db.LINETYPE.SOLID_POINT || p === a.db.LINETYPE.DOTTED_POINT) && w.attr("marker-end", "url(" + I + "#filled-head)"), (p === a.db.LINETYPE.SOLID_CROSS || p === a.db.LINETYPE.DOTTED_CROSS) && w.attr("marker-end", "url(" + I + "#crosshead)"), (x || o.showSequenceNumbers) && (w.attr("marker-start", "url(" + I + "#sequencenumber)"), t.append("text").attr("x", s).attr("y", n + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(i));
|
|
1703
|
+
}, "drawMessage"), ia = /* @__PURE__ */ g(function(t, e, n, a, s, r, c) {
|
|
1704
|
+
let h = 0, p = 0, i, x = 0;
|
|
1698
1705
|
for (const m of a) {
|
|
1699
|
-
const u = e.get(m),
|
|
1700
|
-
i && i !=
|
|
1706
|
+
const u = e.get(m), T = u.box;
|
|
1707
|
+
i && i != T && (c || y.models.addBox(i), p += o.boxMargin + i.margin), T && T != i && (c || (T.x = h + p, T.y = s), p += T.margin), u.width = u.width || o.width, u.height = L.getMax(u.height || o.height, o.height), u.margin = u.margin || o.actorMargin, x = L.getMax(x, u.height), n.get(u.name) && (p += u.width / 2), u.x = h + p, u.starty = y.getVerticalPos(), y.insert(u.x, s, u.x + u.width, u.height), h += u.width + p, u.box && (u.box.width = h + T.margin - u.box.x), p = u.margin, i = u.box, y.models.addActor(u);
|
|
1701
1708
|
}
|
|
1702
1709
|
i && !c && y.models.addBox(i), y.bumpVerticalPos(x);
|
|
1703
|
-
}, "addActorRenderingData"),
|
|
1710
|
+
}, "addActorRenderingData"), Bt = /* @__PURE__ */ g(async function(t, e, n, a) {
|
|
1704
1711
|
if (a) {
|
|
1705
1712
|
let s = 0;
|
|
1706
1713
|
y.bumpVerticalPos(o.boxMargin * 2);
|
|
1707
1714
|
for (const r of n) {
|
|
1708
1715
|
const c = e.get(r);
|
|
1709
1716
|
c.stopy || (c.stopy = y.getVerticalPos());
|
|
1710
|
-
const h = await
|
|
1711
|
-
s =
|
|
1717
|
+
const h = await D.drawActor(t, c, o, !0);
|
|
1718
|
+
s = L.getMax(s, h);
|
|
1712
1719
|
}
|
|
1713
1720
|
y.bumpVerticalPos(s + o.boxMargin);
|
|
1714
1721
|
} else
|
|
1715
1722
|
for (const s of n) {
|
|
1716
1723
|
const r = e.get(s);
|
|
1717
|
-
await
|
|
1724
|
+
await D.drawActor(t, r, o, !1);
|
|
1718
1725
|
}
|
|
1719
|
-
}, "drawActors"),
|
|
1726
|
+
}, "drawActors"), ie = /* @__PURE__ */ g(function(t, e, n, a) {
|
|
1720
1727
|
let s = 0, r = 0;
|
|
1721
1728
|
for (const c of n) {
|
|
1722
|
-
const h = e.get(c),
|
|
1729
|
+
const h = e.get(c), p = na(h), i = D.drawPopup(
|
|
1723
1730
|
t,
|
|
1724
1731
|
h,
|
|
1725
|
-
|
|
1732
|
+
p,
|
|
1726
1733
|
o,
|
|
1727
1734
|
o.forceMenus,
|
|
1728
1735
|
a
|
|
@@ -1730,39 +1737,39 @@ var Ra = /* @__PURE__ */ l(async function(t, e, n, a) {
|
|
|
1730
1737
|
i.height > s && (s = i.height), i.width + h.x > r && (r = i.width + h.x);
|
|
1731
1738
|
}
|
|
1732
1739
|
return { maxHeight: s, maxWidth: r };
|
|
1733
|
-
}, "drawActorsPopup"),
|
|
1734
|
-
|
|
1735
|
-
}, "setConf"),
|
|
1740
|
+
}, "drawActorsPopup"), oe = /* @__PURE__ */ g(function(t) {
|
|
1741
|
+
we(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);
|
|
1742
|
+
}, "setConf"), _t = /* @__PURE__ */ g(function(t) {
|
|
1736
1743
|
return y.activations.filter(function(e) {
|
|
1737
1744
|
return e.actor === t;
|
|
1738
1745
|
});
|
|
1739
|
-
}, "actorActivations"),
|
|
1740
|
-
const n = e.get(t), a =
|
|
1746
|
+
}, "actorActivations"), Xt = /* @__PURE__ */ g(function(t, e) {
|
|
1747
|
+
const n = e.get(t), a = _t(t), s = a.reduce(
|
|
1741
1748
|
function(c, h) {
|
|
1742
|
-
return
|
|
1749
|
+
return L.getMin(c, h.startx);
|
|
1743
1750
|
},
|
|
1744
1751
|
n.x + n.width / 2 - 1
|
|
1745
1752
|
), r = a.reduce(
|
|
1746
1753
|
function(c, h) {
|
|
1747
|
-
return
|
|
1754
|
+
return L.getMax(c, h.stopx);
|
|
1748
1755
|
},
|
|
1749
1756
|
n.x + n.width / 2 + 1
|
|
1750
1757
|
);
|
|
1751
1758
|
return [s, r];
|
|
1752
1759
|
}, "activationBounds");
|
|
1753
|
-
function
|
|
1760
|
+
function rt(t, e, n, a, s) {
|
|
1754
1761
|
y.bumpVerticalPos(n);
|
|
1755
1762
|
let r = a;
|
|
1756
1763
|
if (e.id && e.message && t[e.id]) {
|
|
1757
|
-
const c = t[e.id].width, h =
|
|
1758
|
-
e.message =
|
|
1759
|
-
const
|
|
1760
|
-
r = a + i,
|
|
1764
|
+
const c = t[e.id].width, h = ut(o);
|
|
1765
|
+
e.message = $.wrapLabel(`[${e.message}]`, c - 2 * o.wrapPadding, h), e.width = c, e.wrap = !0;
|
|
1766
|
+
const p = $.calculateTextDimensions(e.message, h), i = L.getMax(p.height, o.labelBoxHeight);
|
|
1767
|
+
r = a + i, j.debug(`${i} - ${e.message}`);
|
|
1761
1768
|
}
|
|
1762
1769
|
s(e), y.bumpVerticalPos(r);
|
|
1763
1770
|
}
|
|
1764
|
-
|
|
1765
|
-
function
|
|
1771
|
+
g(rt, "adjustLoopHeightForWrap");
|
|
1772
|
+
function ne(t, e, n, a, s, r, c) {
|
|
1766
1773
|
function h(i, x) {
|
|
1767
1774
|
i.x < s.get(t.from).x ? (y.insert(
|
|
1768
1775
|
e.stopx - x,
|
|
@@ -1776,8 +1783,8 @@ function we(t, e, n, a, s, r, c) {
|
|
|
1776
1783
|
e.stopy + i.height / 2 + o.noteMargin
|
|
1777
1784
|
), e.stopx = e.stopx - x);
|
|
1778
1785
|
}
|
|
1779
|
-
|
|
1780
|
-
function
|
|
1786
|
+
g(h, "receiverAdjustment");
|
|
1787
|
+
function p(i, x) {
|
|
1781
1788
|
i.x < s.get(t.to).x ? (y.insert(
|
|
1782
1789
|
e.startx - x,
|
|
1783
1790
|
e.starty,
|
|
@@ -1790,201 +1797,201 @@ function we(t, e, n, a, s, r, c) {
|
|
|
1790
1797
|
e.stopy + i.height / 2 + o.noteMargin
|
|
1791
1798
|
), e.startx = e.startx - x);
|
|
1792
1799
|
}
|
|
1793
|
-
if (
|
|
1794
|
-
const i = s.get(t.to), x = i.type == "actor" ?
|
|
1800
|
+
if (g(p, "senderAdjustment"), r.get(t.to) == a) {
|
|
1801
|
+
const i = s.get(t.to), x = i.type == "actor" ? gt / 2 + 3 : i.width / 2 + 3;
|
|
1795
1802
|
h(i, x), i.starty = n - i.height / 2, y.bumpVerticalPos(i.height / 2);
|
|
1796
1803
|
} else if (c.get(t.from) == a) {
|
|
1797
1804
|
const i = s.get(t.from);
|
|
1798
1805
|
if (o.mirrorActors) {
|
|
1799
|
-
const x = i.type == "actor" ?
|
|
1800
|
-
|
|
1806
|
+
const x = i.type == "actor" ? gt / 2 : i.width / 2;
|
|
1807
|
+
p(i, x);
|
|
1801
1808
|
}
|
|
1802
1809
|
i.stopy = n - i.height / 2, y.bumpVerticalPos(i.height / 2);
|
|
1803
1810
|
} else if (c.get(t.to) == a) {
|
|
1804
1811
|
const i = s.get(t.to);
|
|
1805
1812
|
if (o.mirrorActors) {
|
|
1806
|
-
const x = i.type == "actor" ?
|
|
1813
|
+
const x = i.type == "actor" ? gt / 2 + 3 : i.width / 2 + 3;
|
|
1807
1814
|
h(i, x);
|
|
1808
1815
|
}
|
|
1809
1816
|
i.stopy = n - i.height / 2, y.bumpVerticalPos(i.height / 2);
|
|
1810
1817
|
}
|
|
1811
1818
|
}
|
|
1812
|
-
|
|
1813
|
-
var
|
|
1814
|
-
const { securityLevel: s, sequence: r } =
|
|
1819
|
+
g(ne, "adjustCreatedDestroyedData");
|
|
1820
|
+
var oa = /* @__PURE__ */ g(async function(t, e, n, a) {
|
|
1821
|
+
const { securityLevel: s, sequence: r } = Q();
|
|
1815
1822
|
o = r;
|
|
1816
1823
|
let c;
|
|
1817
|
-
s === "sandbox" && (c =
|
|
1818
|
-
const h = s === "sandbox" ?
|
|
1819
|
-
y.init(),
|
|
1820
|
-
const i = s === "sandbox" ? h.select(`[id="${e}"]`) :
|
|
1824
|
+
s === "sandbox" && (c = It("#i" + e));
|
|
1825
|
+
const h = s === "sandbox" ? It(c.nodes()[0].contentDocument.body) : It("body"), p = s === "sandbox" ? c.nodes()[0].contentDocument : document;
|
|
1826
|
+
y.init(), j.debug(a.db);
|
|
1827
|
+
const i = s === "sandbox" ? h.select(`[id="${e}"]`) : It(`[id="${e}"]`), x = a.db.getActors(), m = a.db.getCreatedActors(), u = a.db.getDestroyedActors(), T = a.db.getBoxes();
|
|
1821
1828
|
let w = a.db.getActorKeys();
|
|
1822
|
-
const
|
|
1823
|
-
if (o.height = await
|
|
1824
|
-
const
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
}), w = w.filter((
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
|
-
const S = await
|
|
1831
|
-
|
|
1832
|
-
function
|
|
1833
|
-
const
|
|
1834
|
-
|
|
1829
|
+
const I = a.db.getMessages(), _ = a.db.getDiagramTitle(), R = a.db.hasAtLeastOneBox(), M = a.db.hasAtLeastOneBoxWithTitle(), C = await ce(x, I, a);
|
|
1830
|
+
if (o.height = await de(x, C, T), D.insertComputerIcon(i), D.insertDatabaseIcon(i), D.insertClockIcon(i), R && (y.bumpVerticalPos(o.boxMargin), M && y.bumpVerticalPos(T[0].textMaxHeight)), o.hideUnusedParticipants === !0) {
|
|
1831
|
+
const f = /* @__PURE__ */ new Set();
|
|
1832
|
+
I.forEach((v) => {
|
|
1833
|
+
f.add(v.from), f.add(v.to);
|
|
1834
|
+
}), w = w.filter((v) => f.has(v));
|
|
1835
|
+
}
|
|
1836
|
+
ia(i, x, m, w, 0, I, !1);
|
|
1837
|
+
const S = await ha(I, x, C, a);
|
|
1838
|
+
D.insertArrowHead(i), D.insertArrowCrossHead(i), D.insertArrowFilledHead(i), D.insertSequenceNumber(i);
|
|
1839
|
+
function V(f, v) {
|
|
1840
|
+
const Z = y.endActivation(f);
|
|
1841
|
+
Z.starty + 18 > v && (Z.starty = v - 6, v += 12), D.drawActivation(
|
|
1835
1842
|
i,
|
|
1836
|
-
|
|
1837
|
-
|
|
1843
|
+
Z,
|
|
1844
|
+
v,
|
|
1838
1845
|
o,
|
|
1839
|
-
|
|
1840
|
-
), y.insert(
|
|
1841
|
-
}
|
|
1842
|
-
|
|
1843
|
-
let
|
|
1844
|
-
const
|
|
1845
|
-
let
|
|
1846
|
-
for (const
|
|
1847
|
-
let
|
|
1848
|
-
switch (
|
|
1846
|
+
_t(f.from).length
|
|
1847
|
+
), y.insert(Z.startx, v - 10, Z.stopx, v);
|
|
1848
|
+
}
|
|
1849
|
+
g(V, "activeEnd");
|
|
1850
|
+
let F = 1, X = 1;
|
|
1851
|
+
const tt = [], W = [];
|
|
1852
|
+
let q = 0;
|
|
1853
|
+
for (const f of I) {
|
|
1854
|
+
let v, Z, st;
|
|
1855
|
+
switch (f.type) {
|
|
1849
1856
|
case a.db.LINETYPE.NOTE:
|
|
1850
|
-
y.resetVerticalPos(),
|
|
1857
|
+
y.resetVerticalPos(), Z = f.noteModel, await sa(i, Z);
|
|
1851
1858
|
break;
|
|
1852
1859
|
case a.db.LINETYPE.ACTIVE_START:
|
|
1853
|
-
y.newActivation(
|
|
1860
|
+
y.newActivation(f, i, x);
|
|
1854
1861
|
break;
|
|
1855
1862
|
case a.db.LINETYPE.ACTIVE_END:
|
|
1856
|
-
|
|
1863
|
+
V(f, y.getVerticalPos());
|
|
1857
1864
|
break;
|
|
1858
1865
|
case a.db.LINETYPE.LOOP_START:
|
|
1859
|
-
|
|
1866
|
+
rt(
|
|
1860
1867
|
S,
|
|
1861
|
-
|
|
1868
|
+
f,
|
|
1862
1869
|
o.boxMargin,
|
|
1863
1870
|
o.boxMargin + o.boxTextMargin,
|
|
1864
|
-
(
|
|
1871
|
+
(k) => y.newLoop(k)
|
|
1865
1872
|
);
|
|
1866
1873
|
break;
|
|
1867
1874
|
case a.db.LINETYPE.LOOP_END:
|
|
1868
|
-
|
|
1875
|
+
v = y.endLoop(), await D.drawLoop(i, v, "loop", o), y.bumpVerticalPos(v.stopy - y.getVerticalPos()), y.models.addLoop(v);
|
|
1869
1876
|
break;
|
|
1870
1877
|
case a.db.LINETYPE.RECT_START:
|
|
1871
|
-
|
|
1878
|
+
rt(
|
|
1872
1879
|
S,
|
|
1873
|
-
|
|
1880
|
+
f,
|
|
1874
1881
|
o.boxMargin,
|
|
1875
1882
|
o.boxMargin,
|
|
1876
|
-
(
|
|
1883
|
+
(k) => y.newLoop(void 0, k.message)
|
|
1877
1884
|
);
|
|
1878
1885
|
break;
|
|
1879
1886
|
case a.db.LINETYPE.RECT_END:
|
|
1880
|
-
|
|
1887
|
+
v = y.endLoop(), W.push(v), y.models.addLoop(v), y.bumpVerticalPos(v.stopy - y.getVerticalPos());
|
|
1881
1888
|
break;
|
|
1882
1889
|
case a.db.LINETYPE.OPT_START:
|
|
1883
|
-
|
|
1890
|
+
rt(
|
|
1884
1891
|
S,
|
|
1885
|
-
|
|
1892
|
+
f,
|
|
1886
1893
|
o.boxMargin,
|
|
1887
1894
|
o.boxMargin + o.boxTextMargin,
|
|
1888
|
-
(
|
|
1895
|
+
(k) => y.newLoop(k)
|
|
1889
1896
|
);
|
|
1890
1897
|
break;
|
|
1891
1898
|
case a.db.LINETYPE.OPT_END:
|
|
1892
|
-
|
|
1899
|
+
v = y.endLoop(), await D.drawLoop(i, v, "opt", o), y.bumpVerticalPos(v.stopy - y.getVerticalPos()), y.models.addLoop(v);
|
|
1893
1900
|
break;
|
|
1894
1901
|
case a.db.LINETYPE.ALT_START:
|
|
1895
|
-
|
|
1902
|
+
rt(
|
|
1896
1903
|
S,
|
|
1897
|
-
|
|
1904
|
+
f,
|
|
1898
1905
|
o.boxMargin,
|
|
1899
1906
|
o.boxMargin + o.boxTextMargin,
|
|
1900
|
-
(
|
|
1907
|
+
(k) => y.newLoop(k)
|
|
1901
1908
|
);
|
|
1902
1909
|
break;
|
|
1903
1910
|
case a.db.LINETYPE.ALT_ELSE:
|
|
1904
|
-
|
|
1911
|
+
rt(
|
|
1905
1912
|
S,
|
|
1906
|
-
|
|
1913
|
+
f,
|
|
1907
1914
|
o.boxMargin + o.boxTextMargin,
|
|
1908
1915
|
o.boxMargin,
|
|
1909
|
-
(
|
|
1916
|
+
(k) => y.addSectionToLoop(k)
|
|
1910
1917
|
);
|
|
1911
1918
|
break;
|
|
1912
1919
|
case a.db.LINETYPE.ALT_END:
|
|
1913
|
-
|
|
1920
|
+
v = y.endLoop(), await D.drawLoop(i, v, "alt", o), y.bumpVerticalPos(v.stopy - y.getVerticalPos()), y.models.addLoop(v);
|
|
1914
1921
|
break;
|
|
1915
1922
|
case a.db.LINETYPE.PAR_START:
|
|
1916
1923
|
case a.db.LINETYPE.PAR_OVER_START:
|
|
1917
|
-
|
|
1924
|
+
rt(
|
|
1918
1925
|
S,
|
|
1919
|
-
|
|
1926
|
+
f,
|
|
1920
1927
|
o.boxMargin,
|
|
1921
1928
|
o.boxMargin + o.boxTextMargin,
|
|
1922
|
-
(
|
|
1929
|
+
(k) => y.newLoop(k)
|
|
1923
1930
|
), y.saveVerticalPos();
|
|
1924
1931
|
break;
|
|
1925
1932
|
case a.db.LINETYPE.PAR_AND:
|
|
1926
|
-
|
|
1933
|
+
rt(
|
|
1927
1934
|
S,
|
|
1928
|
-
|
|
1935
|
+
f,
|
|
1929
1936
|
o.boxMargin + o.boxTextMargin,
|
|
1930
1937
|
o.boxMargin,
|
|
1931
|
-
(
|
|
1938
|
+
(k) => y.addSectionToLoop(k)
|
|
1932
1939
|
);
|
|
1933
1940
|
break;
|
|
1934
1941
|
case a.db.LINETYPE.PAR_END:
|
|
1935
|
-
|
|
1942
|
+
v = y.endLoop(), await D.drawLoop(i, v, "par", o), y.bumpVerticalPos(v.stopy - y.getVerticalPos()), y.models.addLoop(v);
|
|
1936
1943
|
break;
|
|
1937
1944
|
case a.db.LINETYPE.AUTONUMBER:
|
|
1938
|
-
|
|
1945
|
+
F = f.message.start || F, X = f.message.step || X, f.message.visible ? a.db.enableSequenceNumbers() : a.db.disableSequenceNumbers();
|
|
1939
1946
|
break;
|
|
1940
1947
|
case a.db.LINETYPE.CRITICAL_START:
|
|
1941
|
-
|
|
1948
|
+
rt(
|
|
1942
1949
|
S,
|
|
1943
|
-
|
|
1950
|
+
f,
|
|
1944
1951
|
o.boxMargin,
|
|
1945
1952
|
o.boxMargin + o.boxTextMargin,
|
|
1946
|
-
(
|
|
1953
|
+
(k) => y.newLoop(k)
|
|
1947
1954
|
);
|
|
1948
1955
|
break;
|
|
1949
1956
|
case a.db.LINETYPE.CRITICAL_OPTION:
|
|
1950
|
-
|
|
1957
|
+
rt(
|
|
1951
1958
|
S,
|
|
1952
|
-
|
|
1959
|
+
f,
|
|
1953
1960
|
o.boxMargin + o.boxTextMargin,
|
|
1954
1961
|
o.boxMargin,
|
|
1955
|
-
(
|
|
1962
|
+
(k) => y.addSectionToLoop(k)
|
|
1956
1963
|
);
|
|
1957
1964
|
break;
|
|
1958
1965
|
case a.db.LINETYPE.CRITICAL_END:
|
|
1959
|
-
|
|
1966
|
+
v = y.endLoop(), await D.drawLoop(i, v, "critical", o), y.bumpVerticalPos(v.stopy - y.getVerticalPos()), y.models.addLoop(v);
|
|
1960
1967
|
break;
|
|
1961
1968
|
case a.db.LINETYPE.BREAK_START:
|
|
1962
|
-
|
|
1969
|
+
rt(
|
|
1963
1970
|
S,
|
|
1964
|
-
|
|
1971
|
+
f,
|
|
1965
1972
|
o.boxMargin,
|
|
1966
1973
|
o.boxMargin + o.boxTextMargin,
|
|
1967
|
-
(
|
|
1974
|
+
(k) => y.newLoop(k)
|
|
1968
1975
|
);
|
|
1969
1976
|
break;
|
|
1970
1977
|
case a.db.LINETYPE.BREAK_END:
|
|
1971
|
-
|
|
1978
|
+
v = y.endLoop(), await D.drawLoop(i, v, "break", o), y.bumpVerticalPos(v.stopy - y.getVerticalPos()), y.models.addLoop(v);
|
|
1972
1979
|
break;
|
|
1973
1980
|
default:
|
|
1974
1981
|
try {
|
|
1975
|
-
|
|
1976
|
-
const
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
+
st = f.msgModel, st.starty = y.getVerticalPos(), st.sequenceIndex = F, st.sequenceVisible = a.db.showSequenceNumbers();
|
|
1983
|
+
const k = await re(i, st);
|
|
1984
|
+
ne(
|
|
1985
|
+
f,
|
|
1986
|
+
st,
|
|
1987
|
+
k,
|
|
1988
|
+
q,
|
|
1982
1989
|
x,
|
|
1983
1990
|
m,
|
|
1984
1991
|
u
|
|
1985
|
-
),
|
|
1986
|
-
} catch (
|
|
1987
|
-
|
|
1992
|
+
), tt.push({ messageModel: st, lineStartY: k }), y.models.addMessage(st);
|
|
1993
|
+
} catch (k) {
|
|
1994
|
+
j.error("error while drawing message", k);
|
|
1988
1995
|
}
|
|
1989
1996
|
}
|
|
1990
1997
|
[
|
|
@@ -1998,88 +2005,88 @@ var Ba = /* @__PURE__ */ l(async function(t, e, n, a) {
|
|
|
1998
2005
|
a.db.LINETYPE.DOTTED_POINT,
|
|
1999
2006
|
a.db.LINETYPE.BIDIRECTIONAL_SOLID,
|
|
2000
2007
|
a.db.LINETYPE.BIDIRECTIONAL_DOTTED
|
|
2001
|
-
].includes(
|
|
2002
|
-
}
|
|
2003
|
-
|
|
2004
|
-
for (const
|
|
2005
|
-
await
|
|
2006
|
-
o.mirrorActors && await
|
|
2007
|
-
for (const
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
const
|
|
2011
|
-
|
|
2012
|
-
let
|
|
2013
|
-
|
|
2014
|
-
let
|
|
2015
|
-
o.mirrorActors && (
|
|
2016
|
-
let
|
|
2017
|
-
|
|
2018
|
-
const
|
|
2019
|
-
|
|
2020
|
-
const
|
|
2008
|
+
].includes(f.type) && (F = F + X), q++;
|
|
2009
|
+
}
|
|
2010
|
+
j.debug("createdActors", m), j.debug("destroyedActors", u), await Bt(i, x, w, !1);
|
|
2011
|
+
for (const f of tt)
|
|
2012
|
+
await ra(i, f.messageModel, f.lineStartY, a);
|
|
2013
|
+
o.mirrorActors && await Bt(i, x, w, !0), W.forEach((f) => D.drawBackgroundRect(i, f)), ee(i, x, w, o);
|
|
2014
|
+
for (const f of y.models.boxes)
|
|
2015
|
+
f.height = y.getVerticalPos() - f.y, y.insert(f.x, f.y, f.x + f.width, f.height), f.startx = f.x, f.starty = f.y, f.stopx = f.startx + f.width, f.stopy = f.starty + f.height, f.stroke = "rgb(0,0,0, 0.5)", D.drawBox(i, f, o);
|
|
2016
|
+
R && y.bumpVerticalPos(o.boxMargin);
|
|
2017
|
+
const Y = ie(i, x, w, p), { bounds: O } = y.getBounds();
|
|
2018
|
+
O.startx === void 0 && (O.startx = 0), O.starty === void 0 && (O.starty = 0), O.stopx === void 0 && (O.stopx = 0), O.stopy === void 0 && (O.stopy = 0);
|
|
2019
|
+
let G = O.stopy - O.starty;
|
|
2020
|
+
G < Y.maxHeight && (G = Y.maxHeight);
|
|
2021
|
+
let z = G + 2 * o.diagramMarginY;
|
|
2022
|
+
o.mirrorActors && (z = z - o.boxMargin + o.bottomMarginAdj);
|
|
2023
|
+
let J = O.stopx - O.startx;
|
|
2024
|
+
J < Y.maxWidth && (J = Y.maxWidth);
|
|
2025
|
+
const et = J + 2 * o.diagramMarginX;
|
|
2026
|
+
_ && i.append("text").text(_).attr("x", (O.stopx - O.startx) / 2 - 2 * o.diagramMarginX).attr("y", -25), Ee(i, z, et, o.useMaxWidth);
|
|
2027
|
+
const N = _ ? 40 : 0;
|
|
2021
2028
|
i.attr(
|
|
2022
2029
|
"viewBox",
|
|
2023
|
-
|
|
2024
|
-
),
|
|
2030
|
+
O.startx - o.diagramMarginX + " -" + (o.diagramMarginY + N) + " " + et + " " + (z + N)
|
|
2031
|
+
), j.debug("models:", y.models);
|
|
2025
2032
|
}, "draw");
|
|
2026
|
-
async function
|
|
2033
|
+
async function ce(t, e, n) {
|
|
2027
2034
|
const a = {};
|
|
2028
2035
|
for (const s of e)
|
|
2029
2036
|
if (t.get(s.to) && t.get(s.from)) {
|
|
2030
2037
|
const r = t.get(s.to);
|
|
2031
2038
|
if (s.placement === n.db.PLACEMENT.LEFTOF && !r.prevActor || s.placement === n.db.PLACEMENT.RIGHTOF && !r.nextActor)
|
|
2032
2039
|
continue;
|
|
2033
|
-
const c = s.placement !== void 0, h = !c,
|
|
2034
|
-
h && s.from === r.nextActor ? a[s.to] =
|
|
2040
|
+
const c = s.placement !== void 0, h = !c, p = c ? yt(o) : ut(o), i = s.wrap ? $.wrapLabel(s.message, o.width - 2 * o.wrapPadding, p) : s.message, x = (ct(i) ? await Tt(s.message, Q()) : $.calculateTextDimensions(i, p)).width + 2 * o.wrapPadding;
|
|
2041
|
+
h && s.from === r.nextActor ? a[s.to] = L.getMax(
|
|
2035
2042
|
a[s.to] || 0,
|
|
2036
2043
|
x
|
|
2037
|
-
) : h && s.from === r.prevActor ? a[s.from] =
|
|
2044
|
+
) : h && s.from === r.prevActor ? a[s.from] = L.getMax(
|
|
2038
2045
|
a[s.from] || 0,
|
|
2039
2046
|
x
|
|
2040
|
-
) : h && s.from === s.to ? (a[s.from] =
|
|
2047
|
+
) : h && s.from === s.to ? (a[s.from] = L.getMax(
|
|
2041
2048
|
a[s.from] || 0,
|
|
2042
2049
|
x / 2
|
|
2043
|
-
), a[s.to] =
|
|
2050
|
+
), a[s.to] = L.getMax(
|
|
2044
2051
|
a[s.to] || 0,
|
|
2045
2052
|
x / 2
|
|
2046
|
-
)) : s.placement === n.db.PLACEMENT.RIGHTOF ? a[s.from] =
|
|
2053
|
+
)) : s.placement === n.db.PLACEMENT.RIGHTOF ? a[s.from] = L.getMax(
|
|
2047
2054
|
a[s.from] || 0,
|
|
2048
2055
|
x
|
|
2049
|
-
) : s.placement === n.db.PLACEMENT.LEFTOF ? a[r.prevActor] =
|
|
2056
|
+
) : s.placement === n.db.PLACEMENT.LEFTOF ? a[r.prevActor] = L.getMax(
|
|
2050
2057
|
a[r.prevActor] || 0,
|
|
2051
2058
|
x
|
|
2052
|
-
) : s.placement === n.db.PLACEMENT.OVER && (r.prevActor && (a[r.prevActor] =
|
|
2059
|
+
) : s.placement === n.db.PLACEMENT.OVER && (r.prevActor && (a[r.prevActor] = L.getMax(
|
|
2053
2060
|
a[r.prevActor] || 0,
|
|
2054
2061
|
x / 2
|
|
2055
|
-
)), r.nextActor && (a[s.from] =
|
|
2062
|
+
)), r.nextActor && (a[s.from] = L.getMax(
|
|
2056
2063
|
a[s.from] || 0,
|
|
2057
2064
|
x / 2
|
|
2058
2065
|
)));
|
|
2059
2066
|
}
|
|
2060
|
-
return
|
|
2067
|
+
return j.debug("maxMessageWidthPerActor:", a), a;
|
|
2061
2068
|
}
|
|
2062
|
-
|
|
2063
|
-
var
|
|
2069
|
+
g(ce, "getMaxMessageWidthPerActor");
|
|
2070
|
+
var na = /* @__PURE__ */ g(function(t) {
|
|
2064
2071
|
let e = 0;
|
|
2065
|
-
const n =
|
|
2072
|
+
const n = Ct(o);
|
|
2066
2073
|
for (const a in t.links) {
|
|
2067
|
-
const s =
|
|
2074
|
+
const s = $.calculateTextDimensions(a, n).width + 2 * o.wrapPadding + 2 * o.boxMargin;
|
|
2068
2075
|
e < s && (e = s);
|
|
2069
2076
|
}
|
|
2070
2077
|
return e;
|
|
2071
2078
|
}, "getRequiredPopupWidth");
|
|
2072
|
-
async function
|
|
2079
|
+
async function de(t, e, n) {
|
|
2073
2080
|
let a = 0;
|
|
2074
2081
|
for (const r of t.keys()) {
|
|
2075
2082
|
const c = t.get(r);
|
|
2076
|
-
c.wrap && (c.description =
|
|
2083
|
+
c.wrap && (c.description = $.wrapLabel(
|
|
2077
2084
|
c.description,
|
|
2078
2085
|
o.width - 2 * o.wrapPadding,
|
|
2079
|
-
|
|
2086
|
+
Ct(o)
|
|
2080
2087
|
));
|
|
2081
|
-
const h =
|
|
2082
|
-
c.width = c.wrap ? o.width :
|
|
2088
|
+
const h = ct(c.description) ? await Tt(c.description, Q()) : $.calculateTextDimensions(c.description, Ct(o));
|
|
2089
|
+
c.width = c.wrap ? o.width : L.getMax(o.width, h.width + 2 * o.wrapPadding), c.height = c.wrap ? L.getMax(h.height, o.height) : o.height, a = L.getMax(a, c.height);
|
|
2083
2090
|
}
|
|
2084
2091
|
for (const r in e) {
|
|
2085
2092
|
const c = t.get(r);
|
|
@@ -2088,35 +2095,35 @@ async function Le(t, e, n) {
|
|
|
2088
2095
|
const h = t.get(c.nextActor);
|
|
2089
2096
|
if (!h) {
|
|
2090
2097
|
const i = e[r] + o.actorMargin - c.width / 2;
|
|
2091
|
-
c.margin =
|
|
2098
|
+
c.margin = L.getMax(i, o.actorMargin);
|
|
2092
2099
|
continue;
|
|
2093
2100
|
}
|
|
2094
|
-
const
|
|
2095
|
-
c.margin =
|
|
2101
|
+
const p = e[r] + o.actorMargin - c.width / 2 - h.width / 2;
|
|
2102
|
+
c.margin = L.getMax(p, o.actorMargin);
|
|
2096
2103
|
}
|
|
2097
2104
|
let s = 0;
|
|
2098
2105
|
return n.forEach((r) => {
|
|
2099
|
-
const c =
|
|
2106
|
+
const c = ut(o);
|
|
2100
2107
|
let h = r.actorKeys.reduce((x, m) => x += t.get(m).width + (t.get(m).margin || 0), 0);
|
|
2101
|
-
h -= 2 * o.boxTextMargin, r.wrap && (r.name =
|
|
2102
|
-
const
|
|
2103
|
-
s =
|
|
2104
|
-
const i =
|
|
2108
|
+
h -= 2 * o.boxTextMargin, r.wrap && (r.name = $.wrapLabel(r.name, h - 2 * o.wrapPadding, c));
|
|
2109
|
+
const p = $.calculateTextDimensions(r.name, c);
|
|
2110
|
+
s = L.getMax(p.height, s);
|
|
2111
|
+
const i = L.getMax(h, p.width + 2 * o.wrapPadding);
|
|
2105
2112
|
if (r.margin = o.boxTextMargin, h < i) {
|
|
2106
2113
|
const x = (i - h) / 2;
|
|
2107
2114
|
r.margin += x;
|
|
2108
2115
|
}
|
|
2109
|
-
}), n.forEach((r) => r.textMaxHeight = s),
|
|
2116
|
+
}), n.forEach((r) => r.textMaxHeight = s), L.getMax(a, o.height);
|
|
2110
2117
|
}
|
|
2111
|
-
|
|
2112
|
-
var
|
|
2118
|
+
g(de, "calculateActorMargins");
|
|
2119
|
+
var ca = /* @__PURE__ */ g(async function(t, e, n) {
|
|
2113
2120
|
const a = e.get(t.from), s = e.get(t.to), r = a.x, c = s.x, h = t.wrap && t.message;
|
|
2114
|
-
let
|
|
2115
|
-
h ?
|
|
2116
|
-
|
|
2121
|
+
let p = ct(t.message) ? await Tt(t.message, Q()) : $.calculateTextDimensions(
|
|
2122
|
+
h ? $.wrapLabel(t.message, o.width, yt(o)) : t.message,
|
|
2123
|
+
yt(o)
|
|
2117
2124
|
);
|
|
2118
2125
|
const i = {
|
|
2119
|
-
width: h ? o.width :
|
|
2126
|
+
width: h ? o.width : L.getMax(o.width, p.width + 2 * o.noteMargin),
|
|
2120
2127
|
height: 0,
|
|
2121
2128
|
startx: a.x,
|
|
2122
2129
|
stopx: 0,
|
|
@@ -2124,23 +2131,23 @@ var Ya = /* @__PURE__ */ l(async function(t, e, n) {
|
|
|
2124
2131
|
stopy: 0,
|
|
2125
2132
|
message: t.message
|
|
2126
2133
|
};
|
|
2127
|
-
return t.placement === n.db.PLACEMENT.RIGHTOF ? (i.width = h ?
|
|
2134
|
+
return t.placement === n.db.PLACEMENT.RIGHTOF ? (i.width = h ? L.getMax(o.width, p.width) : L.getMax(
|
|
2128
2135
|
a.width / 2 + s.width / 2,
|
|
2129
|
-
|
|
2130
|
-
), i.startx = r + (a.width + o.actorMargin) / 2) : t.placement === n.db.PLACEMENT.LEFTOF ? (i.width = h ?
|
|
2136
|
+
p.width + 2 * o.noteMargin
|
|
2137
|
+
), i.startx = r + (a.width + o.actorMargin) / 2) : t.placement === n.db.PLACEMENT.LEFTOF ? (i.width = h ? L.getMax(o.width, p.width + 2 * o.noteMargin) : L.getMax(
|
|
2131
2138
|
a.width / 2 + s.width / 2,
|
|
2132
|
-
|
|
2133
|
-
), i.startx = r - i.width + (a.width - o.actorMargin) / 2) : t.to === t.from ? (
|
|
2134
|
-
h ?
|
|
2135
|
-
|
|
2136
|
-
), i.width = h ?
|
|
2139
|
+
p.width + 2 * o.noteMargin
|
|
2140
|
+
), i.startx = r - i.width + (a.width - o.actorMargin) / 2) : t.to === t.from ? (p = $.calculateTextDimensions(
|
|
2141
|
+
h ? $.wrapLabel(t.message, L.getMax(o.width, a.width), yt(o)) : t.message,
|
|
2142
|
+
yt(o)
|
|
2143
|
+
), i.width = h ? L.getMax(o.width, a.width) : L.getMax(a.width, o.width, p.width + 2 * o.noteMargin), i.startx = r + (a.width - i.width) / 2) : (i.width = Math.abs(r + a.width / 2 - (c + s.width / 2)) + o.actorMargin, i.startx = r < c ? r + a.width / 2 - o.actorMargin / 2 : c + s.width / 2 - o.actorMargin / 2), h && (i.message = $.wrapLabel(
|
|
2137
2144
|
t.message,
|
|
2138
2145
|
i.width - 2 * o.wrapPadding,
|
|
2139
|
-
|
|
2140
|
-
)),
|
|
2146
|
+
yt(o)
|
|
2147
|
+
)), j.debug(
|
|
2141
2148
|
`NM:[${i.startx},${i.stopx},${i.starty},${i.stopy}:${i.width},${i.height}=${t.message}]`
|
|
2142
2149
|
), i;
|
|
2143
|
-
}, "buildNoteModel"),
|
|
2150
|
+
}, "buildNoteModel"), da = /* @__PURE__ */ g(function(t, e, n) {
|
|
2144
2151
|
if (![
|
|
2145
2152
|
n.db.LINETYPE.SOLID_OPEN,
|
|
2146
2153
|
n.db.LINETYPE.DOTTED_OPEN,
|
|
@@ -2154,27 +2161,27 @@ var Ya = /* @__PURE__ */ l(async function(t, e, n) {
|
|
|
2154
2161
|
n.db.LINETYPE.BIDIRECTIONAL_DOTTED
|
|
2155
2162
|
].includes(t.type))
|
|
2156
2163
|
return {};
|
|
2157
|
-
const [a, s] =
|
|
2158
|
-
let
|
|
2159
|
-
const x = Math.abs(r - c) > 2, m = /* @__PURE__ */
|
|
2160
|
-
t.from === t.to ? i =
|
|
2164
|
+
const [a, s] = Xt(t.from, e), [r, c] = Xt(t.to, e), h = a <= r;
|
|
2165
|
+
let p = h ? s : a, i = h ? r : c;
|
|
2166
|
+
const x = Math.abs(r - c) > 2, m = /* @__PURE__ */ g((I) => h ? -I : I, "adjustValue");
|
|
2167
|
+
t.from === t.to ? i = p : (t.activate && !x && (i += m(o.activationWidth / 2 - 1)), [n.db.LINETYPE.SOLID_OPEN, n.db.LINETYPE.DOTTED_OPEN].includes(t.type) || (i += m(3)), [n.db.LINETYPE.BIDIRECTIONAL_SOLID, n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(
|
|
2161
2168
|
t.type
|
|
2162
|
-
) && (
|
|
2163
|
-
const u = [a, s, r, c],
|
|
2164
|
-
t.wrap && t.message && (t.message =
|
|
2169
|
+
) && (p -= m(3)));
|
|
2170
|
+
const u = [a, s, r, c], T = Math.abs(p - i);
|
|
2171
|
+
t.wrap && t.message && (t.message = $.wrapLabel(
|
|
2165
2172
|
t.message,
|
|
2166
|
-
|
|
2167
|
-
|
|
2173
|
+
L.getMax(T + 2 * o.wrapPadding, o.width),
|
|
2174
|
+
ut(o)
|
|
2168
2175
|
));
|
|
2169
|
-
const w =
|
|
2176
|
+
const w = $.calculateTextDimensions(t.message, ut(o));
|
|
2170
2177
|
return {
|
|
2171
|
-
width:
|
|
2178
|
+
width: L.getMax(
|
|
2172
2179
|
t.wrap ? 0 : w.width + 2 * o.wrapPadding,
|
|
2173
|
-
|
|
2180
|
+
T + 2 * o.wrapPadding,
|
|
2174
2181
|
o.width
|
|
2175
2182
|
),
|
|
2176
2183
|
height: 0,
|
|
2177
|
-
startx:
|
|
2184
|
+
startx: p,
|
|
2178
2185
|
stopx: i,
|
|
2179
2186
|
starty: 0,
|
|
2180
2187
|
stopy: 0,
|
|
@@ -2184,11 +2191,11 @@ var Ya = /* @__PURE__ */ l(async function(t, e, n) {
|
|
|
2184
2191
|
fromBounds: Math.min.apply(null, u),
|
|
2185
2192
|
toBounds: Math.max.apply(null, u)
|
|
2186
2193
|
};
|
|
2187
|
-
}, "buildMessageModel"),
|
|
2194
|
+
}, "buildMessageModel"), ha = /* @__PURE__ */ g(async function(t, e, n, a) {
|
|
2188
2195
|
const s = {}, r = [];
|
|
2189
|
-
let c, h,
|
|
2196
|
+
let c, h, p;
|
|
2190
2197
|
for (const i of t) {
|
|
2191
|
-
switch (i.
|
|
2198
|
+
switch (i.type) {
|
|
2192
2199
|
case a.db.LINETYPE.LOOP_START:
|
|
2193
2200
|
case a.db.LINETYPE.ALT_START:
|
|
2194
2201
|
case a.db.LINETYPE.OPT_START:
|
|
@@ -2219,13 +2226,13 @@ var Ya = /* @__PURE__ */ l(async function(t, e, n) {
|
|
|
2219
2226
|
break;
|
|
2220
2227
|
case a.db.LINETYPE.ACTIVE_START:
|
|
2221
2228
|
{
|
|
2222
|
-
const x = e.get(i.from ? i.from : i.to.actor), m =
|
|
2229
|
+
const x = e.get(i.from ? i.from : i.to.actor), m = _t(i.from ? i.from : i.to.actor).length, u = x.x + x.width / 2 + (m - 1) * o.activationWidth / 2, T = {
|
|
2223
2230
|
startx: u,
|
|
2224
2231
|
stopx: u + o.activationWidth,
|
|
2225
2232
|
actor: i.from,
|
|
2226
2233
|
enabled: !0
|
|
2227
2234
|
};
|
|
2228
|
-
y.activations.push(
|
|
2235
|
+
y.activations.push(T);
|
|
2229
2236
|
}
|
|
2230
2237
|
break;
|
|
2231
2238
|
case a.db.LINETYPE.ACTIVE_END:
|
|
@@ -2235,40 +2242,42 @@ var Ya = /* @__PURE__ */ l(async function(t, e, n) {
|
|
|
2235
2242
|
}
|
|
2236
2243
|
break;
|
|
2237
2244
|
}
|
|
2238
|
-
i.placement !== void 0 ? (h = await
|
|
2239
|
-
c = x, c.from =
|
|
2240
|
-
})) : (
|
|
2241
|
-
if (c = x,
|
|
2245
|
+
i.placement !== void 0 ? (h = await ca(i, e, a), i.noteModel = h, r.forEach((x) => {
|
|
2246
|
+
c = x, c.from = L.getMin(c.from, h.startx), c.to = L.getMax(c.to, h.startx + h.width), c.width = L.getMax(c.width, Math.abs(c.from - c.to)) - o.labelBoxWidth;
|
|
2247
|
+
})) : (p = da(i, e, a), i.msgModel = p, p.startx && p.stopx && r.length > 0 && r.forEach((x) => {
|
|
2248
|
+
if (c = x, p.startx === p.stopx) {
|
|
2242
2249
|
const m = e.get(i.from), u = e.get(i.to);
|
|
2243
|
-
c.from =
|
|
2244
|
-
m.x -
|
|
2250
|
+
c.from = L.getMin(
|
|
2251
|
+
m.x - p.width / 2,
|
|
2245
2252
|
m.x - m.width / 2,
|
|
2246
2253
|
c.from
|
|
2247
|
-
), c.to =
|
|
2248
|
-
u.x +
|
|
2254
|
+
), c.to = L.getMax(
|
|
2255
|
+
u.x + p.width / 2,
|
|
2249
2256
|
u.x + m.width / 2,
|
|
2250
2257
|
c.to
|
|
2251
|
-
), c.width =
|
|
2258
|
+
), c.width = L.getMax(c.width, Math.abs(c.to - c.from)) - o.labelBoxWidth;
|
|
2252
2259
|
} else
|
|
2253
|
-
c.from =
|
|
2260
|
+
c.from = L.getMin(p.startx, c.from), c.to = L.getMax(p.stopx, c.to), c.width = L.getMax(c.width, p.width) - o.labelBoxWidth;
|
|
2254
2261
|
}));
|
|
2255
2262
|
}
|
|
2256
|
-
return y.activations = [],
|
|
2257
|
-
}, "calculateLoopBounds"),
|
|
2263
|
+
return y.activations = [], j.debug("Loop type widths:", s), s;
|
|
2264
|
+
}, "calculateLoopBounds"), la = {
|
|
2258
2265
|
bounds: y,
|
|
2259
|
-
drawActors:
|
|
2260
|
-
drawActorsPopup:
|
|
2261
|
-
setConf:
|
|
2262
|
-
draw:
|
|
2263
|
-
},
|
|
2264
|
-
parser:
|
|
2265
|
-
db
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2266
|
+
drawActors: Bt,
|
|
2267
|
+
drawActorsPopup: ie,
|
|
2268
|
+
setConf: oe,
|
|
2269
|
+
draw: oa
|
|
2270
|
+
}, xa = {
|
|
2271
|
+
parser: Me,
|
|
2272
|
+
get db() {
|
|
2273
|
+
return new Re();
|
|
2274
|
+
},
|
|
2275
|
+
renderer: la,
|
|
2276
|
+
styles: Be,
|
|
2277
|
+
init: /* @__PURE__ */ g((t) => {
|
|
2278
|
+
t.sequence || (t.sequence = {}), t.wrap && (t.sequence.wrap = t.wrap, be({ sequence: { wrap: t.wrap } }));
|
|
2270
2279
|
}, "init")
|
|
2271
2280
|
};
|
|
2272
2281
|
export {
|
|
2273
|
-
|
|
2282
|
+
xa as diagram
|
|
2274
2283
|
};
|